From 0c4538265f36094db16b85cf0ebbeaf1b82b5af7 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Mon, 19 Aug 2024 08:31:46 +0000 Subject: [PATCH] Built from commit '2a6a794' --- .nojekyll | 0 404.html | 13 + assets/css/styles.de9a69f2.css | 1 + assets/js/0bdfdd3e.80e95944.js | 1 + assets/js/1.1ee68f45.js | 10323 +++ assets/js/1176.c653568f.js | 1 + assets/js/11859ee7.bc3b29fc.js | 1 + assets/js/121.0b1ee707.js | 28583 +++++++++ assets/js/130.97c3c1fe.js | 18475 ++++++ assets/js/147.e6f324c2.js | 20516 ++++++ assets/js/14eb3368.c4cc24ac.js | 1 + assets/js/1555.924b970a.js | 1 + assets/js/17896441.244ddac3.js | 2 + assets/js/17896441.244ddac3.js.LICENSE.txt | 9 + assets/js/1df93b7f.add0d0ab.js | 1 + assets/js/200.ef07ecb8.js | 1227 + assets/js/211.25fcccf8.js | 3478 ++ assets/js/2130.3d3496a1.js | 1 + assets/js/2235.de976e0b.js | 1 + assets/js/2237.3ee39997.js | 1 + assets/js/2317.e4f1577d.js | 1 + assets/js/235.d2e2ae6a.js | 24006 +++++++ assets/js/2662fbc1.16d1fb5d.js | 1 + assets/js/2746.90938529.js | 1 + assets/js/307.48d39973.js | 10065 +++ assets/js/317.bfe1114e.js | 26888 ++++++++ assets/js/327.b1507568.js | 1323 + assets/js/358.7f285e68.js | 1 + assets/js/3771.5dded75d.js | 2 + assets/js/3771.5dded75d.js.LICENSE.txt | 9 + assets/js/3863.4e79c37a.js | 1 + assets/js/3a55b9ff.2fb2e80e.js | 1 + assets/js/3b435a04.119fc3ad.js | 1 + assets/js/4.4581e262.js | 26263 ++++++++ assets/js/4.d4e84adf.js | 1 + assets/js/440.99fb5fa5.js | 1410 + assets/js/469.5198d491.js | 540 + assets/js/4f9ad5cc.d8973fd1.js | 1 + assets/js/506.f8e135de.js | 1820 + assets/js/51515e66.559d977c.js | 1 + assets/js/555.245cb126.js | 2105 + assets/js/5642.92622fe6.js | 1 + assets/js/5688.9d57ae43.js | 1 + assets/js/59f922ef.d5e41fd4.js | 1 + assets/js/5e95c892.ad8f2bde.js | 1 + assets/js/6063.c242930b.js | 1 + assets/js/609.fc671e1c.js | 10814 ++++ assets/js/6216.9c87e670.js | 1 + assets/js/6292.4446f967.js | 1 + assets/js/63.f064aa03.js | 742 + assets/js/642.72d21411.js | 1242 + assets/js/6506.9bc7806f.js | 1 + assets/js/67db73f0.e7ff6635.js | 1 + assets/js/688.b0db22c8.js | 26176 ++++++++ assets/js/69795df0.ec00bcca.js | 1 + assets/js/7121.4973c936.js | 1 + assets/js/7147.4c64959b.js | 1 + assets/js/7200.a1f6288d.js | 1 + assets/js/7211.a0650c88.js | 1 + assets/js/7308.998b0e41.js | 1 + assets/js/7438851d.1e66115a.js | 1 + assets/js/7440.6f324626.js | 1 + assets/js/751.56e1e341.js | 10825 ++++ assets/js/751.ef6780cb.js | 1 + assets/js/771.648de544.js | 51832 ++++++++++++++++ assets/js/7dbb84ad.de990a0e.js | 1 + assets/js/8159.f171b590.js | 1 + assets/js/8327.dda91e63.js | 1 + assets/js/8609.f71bdfb8.js | 1 + assets/js/863.1b5358f2.js | 2605 + assets/js/8747.7d832047.js | 1 + assets/js/8947.2ac7d40e.js | 1 + assets/js/9469.d0368221.js | 1 + assets/js/947.6a173dc7.js | 14654 +++++ assets/js/9688.ee807478.js | 1 + assets/js/980a27ad.1e6de9b3.js | 1 + assets/js/a7456010.51a4a774.js | 1 + assets/js/a7bd4aaa.3b66ce73.js | 1 + assets/js/a94703ab.52311314.js | 1 + assets/js/aba21aa0.49179dbc.js | 1 + assets/js/b0ef962e.4c4597cd.js | 1 + assets/js/common.020bfe42.js | 1 + assets/js/df9ca9a0.40b4d145.js | 1 + assets/js/ebd56198.35101d17.js | 1 + assets/js/f146017a.4804e705.js | 1 + assets/js/main.099aabdf.js | 2 + assets/js/main.099aabdf.js.LICENSE.txt | 64 + assets/js/runtime~main.aebe066b.js | 1 + docs/about/introduction/index.html | 46 + docs/about/usage/basic-usage/index.html | 160 + docs/about/usage/caching/index.html | 27 + docs/about/usage/data-source/index.html | 48 + docs/about/usage/fetching-metadata/index.html | 22 + docs/about/usage/time-zone/index.html | 35 + docs/category/developer-guide/index.html | 13 + docs/category/usage/index.html | 13 + .../development-guide/publishing/index.html | 14 + .../development-guide/setup/index.html | 46 + .../development-guide/testing/index.html | 14 + .../development-guide/upgrading/index.html | 14 + docs/contribute/documentation/index.html | 27 + docs/contribute/ground-rules/index.html | 25 + .../how-to-start-contributing/index.html | 33 + docs/contribute/overview/index.html | 19 + img/favicon.png | Bin 0 -> 493 bytes img/logo.svg | 7 + index.html | 13 + sitemap.xml | 1 + 108 files changed, 296647 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 assets/css/styles.de9a69f2.css create mode 100644 assets/js/0bdfdd3e.80e95944.js create mode 100644 assets/js/1.1ee68f45.js create mode 100644 assets/js/1176.c653568f.js create mode 100644 assets/js/11859ee7.bc3b29fc.js create mode 100644 assets/js/121.0b1ee707.js create mode 100644 assets/js/130.97c3c1fe.js create mode 100644 assets/js/147.e6f324c2.js create mode 100644 assets/js/14eb3368.c4cc24ac.js create mode 100644 assets/js/1555.924b970a.js create mode 100644 assets/js/17896441.244ddac3.js create mode 100644 assets/js/17896441.244ddac3.js.LICENSE.txt create mode 100644 assets/js/1df93b7f.add0d0ab.js create mode 100644 assets/js/200.ef07ecb8.js create mode 100644 assets/js/211.25fcccf8.js create mode 100644 assets/js/2130.3d3496a1.js create mode 100644 assets/js/2235.de976e0b.js create mode 100644 assets/js/2237.3ee39997.js create mode 100644 assets/js/2317.e4f1577d.js create mode 100644 assets/js/235.d2e2ae6a.js create mode 100644 assets/js/2662fbc1.16d1fb5d.js create mode 100644 assets/js/2746.90938529.js create mode 100644 assets/js/307.48d39973.js create mode 100644 assets/js/317.bfe1114e.js create mode 100644 assets/js/327.b1507568.js create mode 100644 assets/js/358.7f285e68.js create mode 100644 assets/js/3771.5dded75d.js create mode 100644 assets/js/3771.5dded75d.js.LICENSE.txt create mode 100644 assets/js/3863.4e79c37a.js create mode 100644 assets/js/3a55b9ff.2fb2e80e.js create mode 100644 assets/js/3b435a04.119fc3ad.js create mode 100644 assets/js/4.4581e262.js create mode 100644 assets/js/4.d4e84adf.js create mode 100644 assets/js/440.99fb5fa5.js create mode 100644 assets/js/469.5198d491.js create mode 100644 assets/js/4f9ad5cc.d8973fd1.js create mode 100644 assets/js/506.f8e135de.js create mode 100644 assets/js/51515e66.559d977c.js create mode 100644 assets/js/555.245cb126.js create mode 100644 assets/js/5642.92622fe6.js create mode 100644 assets/js/5688.9d57ae43.js create mode 100644 assets/js/59f922ef.d5e41fd4.js create mode 100644 assets/js/5e95c892.ad8f2bde.js create mode 100644 assets/js/6063.c242930b.js create mode 100644 assets/js/609.fc671e1c.js create mode 100644 assets/js/6216.9c87e670.js create mode 100644 assets/js/6292.4446f967.js create mode 100644 assets/js/63.f064aa03.js create mode 100644 assets/js/642.72d21411.js create mode 100644 assets/js/6506.9bc7806f.js create mode 100644 assets/js/67db73f0.e7ff6635.js create mode 100644 assets/js/688.b0db22c8.js create mode 100644 assets/js/69795df0.ec00bcca.js create mode 100644 assets/js/7121.4973c936.js create mode 100644 assets/js/7147.4c64959b.js create mode 100644 assets/js/7200.a1f6288d.js create mode 100644 assets/js/7211.a0650c88.js create mode 100644 assets/js/7308.998b0e41.js create mode 100644 assets/js/7438851d.1e66115a.js create mode 100644 assets/js/7440.6f324626.js create mode 100644 assets/js/751.56e1e341.js create mode 100644 assets/js/751.ef6780cb.js create mode 100644 assets/js/771.648de544.js create mode 100644 assets/js/7dbb84ad.de990a0e.js create mode 100644 assets/js/8159.f171b590.js create mode 100644 assets/js/8327.dda91e63.js create mode 100644 assets/js/8609.f71bdfb8.js create mode 100644 assets/js/863.1b5358f2.js create mode 100644 assets/js/8747.7d832047.js create mode 100644 assets/js/8947.2ac7d40e.js create mode 100644 assets/js/9469.d0368221.js create mode 100644 assets/js/947.6a173dc7.js create mode 100644 assets/js/9688.ee807478.js create mode 100644 assets/js/980a27ad.1e6de9b3.js create mode 100644 assets/js/a7456010.51a4a774.js create mode 100644 assets/js/a7bd4aaa.3b66ce73.js create mode 100644 assets/js/a94703ab.52311314.js create mode 100644 assets/js/aba21aa0.49179dbc.js create mode 100644 assets/js/b0ef962e.4c4597cd.js create mode 100644 assets/js/common.020bfe42.js create mode 100644 assets/js/df9ca9a0.40b4d145.js create mode 100644 assets/js/ebd56198.35101d17.js create mode 100644 assets/js/f146017a.4804e705.js create mode 100644 assets/js/main.099aabdf.js create mode 100644 assets/js/main.099aabdf.js.LICENSE.txt create mode 100644 assets/js/runtime~main.aebe066b.js create mode 100644 docs/about/introduction/index.html create mode 100644 docs/about/usage/basic-usage/index.html create mode 100644 docs/about/usage/caching/index.html create mode 100644 docs/about/usage/data-source/index.html create mode 100644 docs/about/usage/fetching-metadata/index.html create mode 100644 docs/about/usage/time-zone/index.html create mode 100644 docs/category/developer-guide/index.html create mode 100644 docs/category/usage/index.html create mode 100644 docs/contribute/development-guide/publishing/index.html create mode 100644 docs/contribute/development-guide/setup/index.html create mode 100644 docs/contribute/development-guide/testing/index.html create mode 100644 docs/contribute/development-guide/upgrading/index.html create mode 100644 docs/contribute/documentation/index.html create mode 100644 docs/contribute/ground-rules/index.html create mode 100644 docs/contribute/how-to-start-contributing/index.html create mode 100644 docs/contribute/overview/index.html create mode 100644 img/favicon.png create mode 100644 img/logo.svg create mode 100644 index.html create mode 100644 sitemap.xml diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..c56d6957 --- /dev/null +++ b/404.html @@ -0,0 +1,13 @@ + + + + + +Page Not Found | Tagreader + + + + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

+ + \ No newline at end of file diff --git a/assets/css/styles.de9a69f2.css b/assets/css/styles.de9a69f2.css new file mode 100644 index 00000000..e8752fa6 --- /dev/null +++ b/assets/css/styles.de9a69f2.css @@ -0,0 +1 @@ +.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.clean-list,.containsTaskList_mC6p,.details_lb9f>summary,.dropdown__menu,.menu__list{list-style:none}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:#0000;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:#0000000d;--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 #0000001a;--ifm-global-shadow-md:0 5px 40px #0003;--ifm-global-shadow-tl:0 12px 28px 0 #0003,0 2px 4px 0 #0000001a;--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:#0000;--ifm-table-stripe-background:#00000008;--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem;--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-color-primary:#2e8555;--ifm-color-primary-dark:#29784c;--ifm-color-primary-darker:#277148;--ifm-color-primary-darkest:#205d3b;--ifm-color-primary-light:#33925d;--ifm-color-primary-lighter:#359962;--ifm-color-primary-lightest:#3cad6e;--ifm-code-font-size:95%;--docusaurus-highlighted-code-line-bg:#0000001a;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docusaurus-collapse-button-bg:#0000;--docusaurus-collapse-button-bg-hover:#0000001a;--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--docusaurus-announcement-bar-height:auto}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:#0000}*{box-sizing:border-box}html{background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;-webkit-text-size-adjust:100%;text-size-adjust:100%}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.list_eTzJ article:last-child,.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid #0000001a;border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:initial;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}.container_lyt7,.container_lyt7>svg,img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul,.tabList__CuJ{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_Gvgb,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:#3578e526;--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:#ebedf026;--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:#00a40026;--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:#54c7ec26;--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:#ffba0026;--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:#fa383e26;--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:any-link:hover,.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:#0000;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor #0000;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.admonitionContent_BuS1>:last-child,.cardContainer_fWXF :last-child,.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;top:0;visibility:hidden;left:0}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;filter:var(--ifm-menu-link-sublist-icon-filter);content:""}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:#ffffff1a;--ifm-navbar-search-input-placeholder-color:#ffffff80;color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:#ffffff0d;--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:1rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);position:fixed;transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:#0009;position:fixed;right:0;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover{text-decoration:none}.pagination-nav{display:grid;grid-gap:var(--ifm-spacing-horizontal);gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid #0000;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:#ffffff0d;--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:#ffffff1a;--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:#ffffff12;--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}[data-theme=dark]{--ifm-color-primary:#25c2a0;--ifm-color-primary-dark:#21af90;--ifm-color-primary-darker:#1fa588;--ifm-color-primary-darkest:#1a8870;--ifm-color-primary-light:#29d5b0;--ifm-color-primary-lighter:#32d8b4;--ifm-color-primary-lightest:#4fddbf;--docusaurus-highlighted-code-line-bg:#0000004d}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.lastUpdated_JAkA{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tocCollapsibleContent_vkbj a{display:block}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}.docSidebarContainer_YfHR,.sidebarLogo_isFc,.themedComponent_mlkZ{display:none}[data-theme=dark] .themedComponent--dark_xIcU,[data-theme=light] .themedComponent--light_NVdE,html:not([data-theme]) .themedComponent--light_NVdE{display:initial}[data-theme=dark]:root{--docusaurus-collapse-button-bg:#ffffff0d;--docusaurus-collapse-button-bg-hover:#ffffff1a}.collapseSidebarButton_PEFL{display:none;margin:0}.iconExternalLink_nPIU{margin-left:.3rem}.docMainContainer_TBSr,.docRoot_UBD9{display:flex;width:100%}.docsWrapper_hBAB{display:flex;flex:1 0 auto}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;user-select:none}.hash-link:before{content:"#"}.footerLogoLink_BH7S:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.cardContainer_fWXF{--ifm-link-color:var(--ifm-color-emphasis-800);--ifm-link-hover-color:var(--ifm-color-emphasis-700);--ifm-link-hover-decoration:none;border:1px solid var(--ifm-color-emphasis-200);box-shadow:0 1.5px 3px 0 #00000026;transition:all var(--ifm-transition-fast) ease;transition-property:border,box-shadow}.cardContainer_fWXF:hover{border-color:var(--ifm-color-primary);box-shadow:0 3px 6px 0 #0003}.cardTitle_rnsV{font-size:1.2rem}.cardDescription_PWke{font-size:.8rem}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{left:0;position:absolute;top:0;fill:currentColor;height:inherit;opacity:inherit;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:#0000 #0000 #0000 var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.img_ev3q{height:auto}.admonition_xJq3{margin-bottom:1em}.admonitionHeading_Gvgb{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family)}.admonitionHeading_Gvgb:not(:last-child){margin-bottom:.3rem}.admonitionHeading_Gvgb code{text-transform:none}.admonitionIcon_Rf37{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_Rf37 svg{display:inline-block;height:1.6em;width:1.6em;fill:var(--ifm-alert-foreground-color)}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit;text-decoration:underline}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}#__docusaurus-base-url-issue-banner-container,.navbarSearchContainer_Bca1:empty,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_aARS{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}.dropdownNavbarItemMobile_S0Fm{cursor:pointer}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.errorBoundaryFallback_VBag{color:red;padding:.55rem}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}.title_kItE{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-leading)*1.25)}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_TmdG{background-color:var(--docusaurus-collapse-button-bg)}.lastUpdated_JAkA{text-align:right}.tocMobile_ITEo{display:none}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_i1dp,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_TmdG:focus,.expandButton_TmdG:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_TmdG{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_i1dp{transform:rotate(180deg)}.docSidebarContainer_YfHR{border-right:1px solid var(--ifm-toc-border-color);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_DPk8{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_aRkj{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_TBSr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_lQrH{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_JWYK{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.navbarSearchContainer_Bca1{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.docItemCol_VOVn,.generatedIndexPage_vN6x{max-width:75%!important}.list_eTzJ article:nth-last-child(-n+2){margin-bottom:0!important}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.docItemContainer_F8PC{padding:0 .3rem}.navbarSearchContainer_Bca1{position:absolute;right:var(--ifm-navbar-padding-horizontal)}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/js/0bdfdd3e.80e95944.js b/assets/js/0bdfdd3e.80e95944.js new file mode 100644 index 00000000..3d32ec4f --- /dev/null +++ b/assets/js/0bdfdd3e.80e95944.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[6631],{6859:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Developer guide","description":"This section of the documentation lists instructions and guidelines on how to start developing","slug":"/category/developer-guide","permalink":"/tagreader-python/docs/category/developer-guide","sidebar":"contribute","navigation":{"previous":{"title":"Ground rules","permalink":"/tagreader-python/docs/contribute/ground-rules"},"next":{"title":"Publishing","permalink":"/tagreader-python/docs/contribute/development-guide/publishing"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/1.1ee68f45.js b/assets/js/1.1ee68f45.js new file mode 100644 index 00000000..7272ea63 --- /dev/null +++ b/assets/js/1.1ee68f45.js @@ -0,0 +1,10323 @@ +"use strict"; +exports.id = 1; +exports.ids = [1]; +exports.modules = { + +/***/ 1176: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + Zp: () => (/* reexport */ layout) +}); + +// UNUSED EXPORTS: acyclic, normalize, rank + +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js +var uniqueId = __webpack_require__(5664); +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/map.js +var map = __webpack_require__(4722); +// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules +var range = __webpack_require__(1395); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js +var graphlib = __webpack_require__(697); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js +/* + * Simple doubly linked list implementation derived from Cormen, et al., + * "Introduction to Algorithms". + */ + + + +class List { + constructor() { + var sentinel = {}; + sentinel._next = sentinel._prev = sentinel; + this._sentinel = sentinel; + } + dequeue() { + var sentinel = this._sentinel; + var entry = sentinel._prev; + if (entry !== sentinel) { + unlink(entry); + return entry; + } + } + enqueue(entry) { + var sentinel = this._sentinel; + if (entry._prev && entry._next) { + unlink(entry); + } + entry._next = sentinel._next; + sentinel._next._prev = entry; + sentinel._next = entry; + entry._prev = sentinel; + } + toString() { + var strs = []; + var sentinel = this._sentinel; + var curr = sentinel._prev; + while (curr !== sentinel) { + strs.push(JSON.stringify(curr, filterOutLinks)); + curr = curr._prev; + } + return '[' + strs.join(', ') + ']'; + } +} + +function unlink(entry) { + entry._prev._next = entry._next; + entry._next._prev = entry._prev; + delete entry._next; + delete entry._prev; +} + +function filterOutLinks(k, v) { + if (k !== '_next' && k !== '_prev') { + return v; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js + + + + +/* + * A greedy heuristic for finding a feedback arc set for a graph. A feedback + * arc set is a set of edges that can be removed to make a graph acyclic. + * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and + * effective heuristic for the feedback arc set problem." This implementation + * adjusts that from the paper to allow for weighted edges. + */ + + +var DEFAULT_WEIGHT_FN = constant/* default */.A(1); + +function greedyFAS(g, weightFn) { + if (g.nodeCount() <= 1) { + return []; + } + var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); + var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); + + // Expand multi-edges + return flatten/* default */.A( + map/* default */.A(results, function (e) { + return g.outEdges(e.v, e.w); + }) + ); +} + +function doGreedyFAS(g, buckets, zeroIdx) { + var results = []; + var sources = buckets[buckets.length - 1]; + var sinks = buckets[0]; + + var entry; + while (g.nodeCount()) { + while ((entry = sinks.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + while ((entry = sources.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + if (g.nodeCount()) { + for (var i = buckets.length - 2; i > 0; --i) { + entry = buckets[i].dequeue(); + if (entry) { + results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); + break; + } + } + } + } + + return results; +} + +function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { + var results = collectPredecessors ? [] : undefined; + + forEach/* default */.A(g.inEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var uEntry = g.node(edge.v); + + if (collectPredecessors) { + results.push({ v: edge.v, w: edge.w }); + } + + uEntry.out -= weight; + assignBucket(buckets, zeroIdx, uEntry); + }); + + forEach/* default */.A(g.outEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var w = edge.w; + var wEntry = g.node(w); + wEntry['in'] -= weight; + assignBucket(buckets, zeroIdx, wEntry); + }); + + g.removeNode(entry.v); + + return results; +} + +function buildState(g, weightFn) { + var fasGraph = new graphlib/* Graph */.T(); + var maxIn = 0; + var maxOut = 0; + + forEach/* default */.A(g.nodes(), function (v) { + fasGraph.setNode(v, { v: v, in: 0, out: 0 }); + }); + + // Aggregate weights on nodes, but also sum the weights across multi-edges + // into a single edge for the fasGraph. + forEach/* default */.A(g.edges(), function (e) { + var prevWeight = fasGraph.edge(e.v, e.w) || 0; + var weight = weightFn(e); + var edgeWeight = prevWeight + weight; + fasGraph.setEdge(e.v, e.w, edgeWeight); + maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); + maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); + }); + + var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { + return new List(); + }); + var zeroIdx = maxIn + 1; + + forEach/* default */.A(fasGraph.nodes(), function (v) { + assignBucket(buckets, zeroIdx, fasGraph.node(v)); + }); + + return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; +} + +function assignBucket(buckets, zeroIdx, entry) { + if (!entry.out) { + buckets[0].enqueue(entry); + } else if (!entry['in']) { + buckets[buckets.length - 1].enqueue(entry); + } else { + buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js + + + + + +function run(g) { + var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); + forEach/* default */.A(fas, function (e) { + var label = g.edge(e); + g.removeEdge(e); + label.forwardName = e.name; + label.reversed = true; + g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); + }); + + function weightFn(g) { + return function (e) { + return g.edge(e).weight; + }; + } +} + +function dfsFAS(g) { + var fas = []; + var stack = {}; + var visited = {}; + + function dfs(v) { + if (has/* default */.A(visited, v)) { + return; + } + visited[v] = true; + stack[v] = true; + forEach/* default */.A(g.outEdges(v), function (e) { + if (has/* default */.A(stack, e.w)) { + fas.push(e); + } else { + dfs(e.w); + } + }); + delete stack[v]; + } + + forEach/* default */.A(g.nodes(), dfs); + return fas; +} + +function undo(g) { + forEach/* default */.A(g.edges(), function (e) { + var label = g.edge(e); + if (label.reversed) { + g.removeEdge(e); + + var forwardName = label.forwardName; + delete label.reversed; + delete label.forwardName; + g.setEdge(e.w, e.v, label, forwardName); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules +var merge = __webpack_require__(8879); +// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules +var pick = __webpack_require__(1942); +// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js +var defaults = __webpack_require__(3068); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js + + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !(0,isSymbol/* default */.A)(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +/* harmony default export */ const _baseExtremum = (baseExtremum); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +/* harmony default export */ const _baseGt = (baseGt); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js + + + + +/** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ +function max(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseGt) + : undefined; +} + +/* harmony default export */ const lodash_es_max = (max); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +/* harmony default export */ const lodash_es_last = (last); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js +var _baseAssignValue = __webpack_require__(2528); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js + + + + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); + + (0,_baseForOwn/* default */.A)(object, function(value, key, object) { + (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ const lodash_es_mapValues = (mapValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +/* harmony default export */ const _baseLt = (baseLt); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js + + + + +/** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ +function min(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_min = (min); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js +var _root = __webpack_require__(1917); +;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js + + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return _root/* default */.A.Date.now(); +}; + +/* harmony default export */ const lodash_es_now = (now); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js + + + + + +/* + * Adds a dummy node to the graph and return v. + */ +function addDummyNode(g, type, attrs, name) { + var v; + do { + v = uniqueId/* default */.A(name); + } while (g.hasNode(v)); + + attrs.dummy = type; + g.setNode(v, attrs); + return v; +} + +/* + * Returns a new graph with only simple edges. Handles aggregation of data + * associated with multi-edges. + */ +function simplify(g) { + var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + simplified.setNode(v, g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; + var label = g.edge(e); + simplified.setEdge(e.v, e.w, { + weight: simpleLabel.weight + label.weight, + minlen: Math.max(simpleLabel.minlen, label.minlen), + }); + }); + return simplified; +} + +function asNonCompoundGraph(g) { + var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + if (!g.children(v).length) { + simplified.setNode(v, g.node(v)); + } + }); + forEach/* default */.A(g.edges(), function (e) { + simplified.setEdge(e, g.edge(e)); + }); + return simplified; +} + +function successorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var sucs = {}; + _.forEach(g.outEdges(v), function (e) { + sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; + }); + return sucs; + }); + return _.zipObject(g.nodes(), weightMap); +} + +function predecessorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var preds = {}; + _.forEach(g.inEdges(v), function (e) { + preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; + }); + return preds; + }); + return _.zipObject(g.nodes(), weightMap); +} + +/* + * Finds where a line starting at point ({x, y}) would intersect a rectangle + * ({x, y, width, height}) if it were pointing at the rectangle's center. + */ +function intersectRect(rect, point) { + var x = rect.x; + var y = rect.y; + + // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes + var dx = point.x - x; + var dy = point.y - y; + var w = rect.width / 2; + var h = rect.height / 2; + + if (!dx && !dy) { + throw new Error('Not possible to find intersection inside of the rectangle'); + } + + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } + sx = (h * dx) / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } + sx = w; + sy = (w * dy) / dx; + } + + return { x: x + sx, y: y + sy }; +} + +/* + * Given a DAG with each node assigned "rank" and "order" properties, this + * function will produce a matrix with the ids of each node. + */ +function buildLayerMatrix(g) { + var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { + return []; + }); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + var rank = node.rank; + if (!isUndefined/* default */.A(rank)) { + layering[rank][node.order] = v; + } + }); + return layering; +} + +/* + * Adjusts the ranks for all nodes in the graph such that all nodes v have + * rank(v) >= 0 and at least one node w has rank(w) = 0. + */ +function normalizeRanks(g) { + var min = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (has/* default */.A(node, 'rank')) { + node.rank -= min; + } + }); +} + +function removeEmptyRanks(g) { + // Ranks may not start at 0, so we need to offset them + var offset = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + + var layers = []; + forEach/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank - offset; + if (!layers[rank]) { + layers[rank] = []; + } + layers[rank].push(v); + }); + + var delta = 0; + var nodeRankFactor = g.graph().nodeRankFactor; + forEach/* default */.A(layers, function (vs, i) { + if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { + --delta; + } else if (delta) { + forEach/* default */.A(vs, function (v) { + g.node(v).rank += delta; + }); + } + }); +} + +function addBorderNode(g, prefix, rank, order) { + var node = { + width: 0, + height: 0, + }; + if (arguments.length >= 4) { + node.rank = rank; + node.order = order; + } + return addDummyNode(g, 'border', node, prefix); +} + +function util_maxRank(g) { + return lodash_es_max( + map/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank; + if (!isUndefined/* default */.A(rank)) { + return rank; + } + }) + ); +} + +/* + * Partition a collection into two groups: `lhs` and `rhs`. If the supplied + * function returns true for an entry it goes into `lhs`. Otherwise it goes + * into `rhs. + */ +function partition(collection, fn) { + var result = { lhs: [], rhs: [] }; + forEach/* default */.A(collection, function (value) { + if (fn(value)) { + result.lhs.push(value); + } else { + result.rhs.push(value); + } + }); + return result; +} + +/* + * Returns a new function that wraps `fn` with a timer. The wrapper logs the + * time it takes to execute the function. + */ +function util_time(name, fn) { + var start = lodash_es_now(); + try { + return fn(); + } finally { + console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); + } +} + +function notime(name, fn) { + return fn(); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js + + + + + +function addBorderSegments(g) { + function dfs(v) { + var children = g.children(v); + var node = g.node(v); + if (children.length) { + forEach/* default */.A(children, dfs); + } + + if (has/* default */.A(node, 'minRank')) { + node.borderLeft = []; + node.borderRight = []; + for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { + add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); + add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); + } + } + } + + forEach/* default */.A(g.children(), dfs); +} + +function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { + var label = { width: 0, height: 0, rank: rank, borderType: prop }; + var prev = sgNode[prop][rank - 1]; + var curr = addDummyNode(g, 'border', label, prefix); + sgNode[prop][rank] = curr; + g.setParent(curr, sg); + if (prev) { + g.setEdge(prev, curr, { weight: 1 }); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js + + + + +function adjust(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'lr' || rankDir === 'rl') { + swapWidthHeight(g); + } +} + +function coordinate_system_undo(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'bt' || rankDir === 'rl') { + reverseY(g); + } + + if (rankDir === 'lr' || rankDir === 'rl') { + swapXY(g); + swapWidthHeight(g); + } +} + +function swapWidthHeight(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapWidthHeightOne(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + swapWidthHeightOne(g.edge(e)); + }); +} + +function swapWidthHeightOne(attrs) { + var w = attrs.width; + attrs.width = attrs.height; + attrs.height = w; +} + +function reverseY(g) { + forEach/* default */.A(g.nodes(), function (v) { + reverseYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, reverseYOne); + if (has/* default */.A(edge, 'y')) { + reverseYOne(edge); + } + }); +} + +function reverseYOne(attrs) { + attrs.y = -attrs.y; +} + +function swapXY(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapXYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, swapXYOne); + if (has/* default */.A(edge, 'x')) { + swapXYOne(edge); + } + }); +} + +function swapXYOne(attrs) { + var x = attrs.x; + attrs.x = attrs.y; + attrs.y = x; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js + + + + + +/* + * Breaks any long edges in the graph into short segments that span 1 layer + * each. This operation is undoable with the denormalize function. + * + * Pre-conditions: + * + * 1. The input graph is a DAG. + * 2. Each node in the graph has a "rank" property. + * + * Post-condition: + * + * 1. All edges in the graph have a length of 1. + * 2. Dummy nodes are added where edges have been split into segments. + * 3. The graph is augmented with a "dummyChains" attribute which contains + * the first dummy in each chain of dummy nodes produced. + */ +function normalize_run(g) { + g.graph().dummyChains = []; + forEach/* default */.A(g.edges(), function (edge) { + normalizeEdge(g, edge); + }); +} + +function normalizeEdge(g, e) { + var v = e.v; + var vRank = g.node(v).rank; + var w = e.w; + var wRank = g.node(w).rank; + var name = e.name; + var edgeLabel = g.edge(e); + var labelRank = edgeLabel.labelRank; + + if (wRank === vRank + 1) return; + + g.removeEdge(e); + + var dummy, attrs, i; + for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { + edgeLabel.points = []; + attrs = { + width: 0, + height: 0, + edgeLabel: edgeLabel, + edgeObj: e, + rank: vRank, + }; + dummy = addDummyNode(g, 'edge', attrs, '_d'); + if (vRank === labelRank) { + attrs.width = edgeLabel.width; + attrs.height = edgeLabel.height; + // @ts-expect-error + attrs.dummy = 'edge-label'; + // @ts-expect-error + attrs.labelpos = edgeLabel.labelpos; + } + g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); + if (i === 0) { + g.graph().dummyChains.push(dummy); + } + v = dummy; + } + + g.setEdge(v, w, { weight: edgeLabel.weight }, name); +} + +function normalize_undo(g) { + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var origLabel = node.edgeLabel; + var w; + g.setEdge(node.edgeObj, origLabel); + while (node.dummy) { + w = g.successors(v)[0]; + g.removeNode(v); + origLabel.points.push({ x: node.x, y: node.y }); + if (node.dummy === 'edge-label') { + origLabel.x = node.x; + origLabel.y = node.y; + origLabel.width = node.width; + origLabel.height = node.height; + } + v = w; + node = g.node(v); + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js + + + + +/** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ +function minBy(array, iteratee) { + return (array && array.length) + ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_minBy = (minBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js + + + + +/* + * Initializes ranks for the input graph using the longest path algorithm. This + * algorithm scales well and is fast in practice, it yields rather poor + * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom + * ranks wide and leaving edges longer than necessary. However, due to its + * speed, this algorithm is good for getting an initial ranking that can be fed + * into other algorithms. + * + * This algorithm does not normalize layers because it will be used by other + * algorithms in most cases. If using this algorithm directly, be sure to + * run normalize at the end. + * + * Pre-conditions: + * + * 1. Input graph is a DAG. + * 2. Input graph node labels can be assigned properties. + * + * Post-conditions: + * + * 1. Each node will be assign an (unnormalized) "rank" property. + */ +function longestPath(g) { + var visited = {}; + + function dfs(v) { + var label = g.node(v); + if (has/* default */.A(visited, v)) { + return label.rank; + } + visited[v] = true; + + var rank = lodash_es_min( + map/* default */.A(g.outEdges(v), function (e) { + return dfs(e.w) - g.edge(e).minlen; + }) + ); + + if ( + rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + rank === undefined || // return value of _.map([]) for Lodash 4 + rank === null + ) { + // return value of _.map([null]) + rank = 0; + } + + return (label.rank = rank); + } + + forEach/* default */.A(g.sources(), dfs); +} + +/* + * Returns the amount of slack for the given edge. The slack is defined as the + * difference between the length of the edge and its minimum length. + */ +function slack(g, e) { + return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js + + + + + + +/* + * Constructs a spanning tree with tight edges and adjusted the input node's + * ranks to achieve this. A tight edge is one that is has a length that matches + * its "minlen" attribute. + * + * The basic structure for this function is derived from Gansner, et al., "A + * Technique for Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a DAG. + * 2. Graph must be connected. + * 3. Graph must have at least one node. + * 5. Graph nodes must have been previously assigned a "rank" property that + * respects the "minlen" property of incident edges. + * 6. Graph edges must have a "minlen" property. + * + * Post-conditions: + * + * - Graph nodes will have their rank adjusted to ensure that all edges are + * tight. + * + * Returns a tree (undirected graph) that is constructed using only "tight" + * edges. + */ +function feasibleTree(g) { + var t = new graphlib/* Graph */.T({ directed: false }); + + // Choose arbitrary node from which to start our tree + var start = g.nodes()[0]; + var size = g.nodeCount(); + t.setNode(start, {}); + + var edge, delta; + while (tightTree(t, g) < size) { + edge = findMinSlackEdge(t, g); + delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); + shiftRanks(t, g, delta); + } + + return t; +} + +/* + * Finds a maximal tree of tight edges and returns the number of nodes in the + * tree. + */ +function tightTree(t, g) { + function dfs(v) { + forEach/* default */.A(g.nodeEdges(v), function (e) { + var edgeV = e.v, + w = v === edgeV ? e.w : edgeV; + if (!t.hasNode(w) && !slack(g, e)) { + t.setNode(w, {}); + t.setEdge(v, w, {}); + dfs(w); + } + }); + } + + forEach/* default */.A(t.nodes(), dfs); + return t.nodeCount(); +} + +/* + * Finds the edge with the smallest slack that is incident on tree and returns + * it. + */ +function findMinSlackEdge(t, g) { + return lodash_es_minBy(g.edges(), function (e) { + if (t.hasNode(e.v) !== t.hasNode(e.w)) { + return slack(g, e); + } + }); +} + +function shiftRanks(t, g, delta) { + forEach/* default */.A(t.nodes(), function (v) { + g.node(v).rank += delta; + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js + + + + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!(0,isArrayLike/* default */.A)(collection)) { + var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); + collection = (0,keys/* default */.A)(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +/* harmony default export */ const _createFind = (createFind); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js + + +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = (0,toFinite/* default */.A)(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +/* harmony default export */ const lodash_es_toInteger = (toInteger); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); +} + +/* harmony default export */ const lodash_es_findIndex = (findIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js + + + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = _createFind(lodash_es_findIndex); + +/* harmony default export */ const lodash_es_find = (find); + +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js + + + + + +var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function dijkstra_dijkstra(g, source, weightFn, edgeFn) { + return runDijkstra( + g, + String(source), + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runDijkstra(g, source, weightFn, edgeFn) { + var results = {}; + var pq = new PriorityQueue(); + var v, vEntry; + + var updateNeighbors = function (edge) { + var w = edge.v !== v ? edge.v : edge.w; + var wEntry = results[w]; + var weight = weightFn(edge); + var distance = vEntry.distance + weight; + + if (weight < 0) { + throw new Error( + 'dijkstra does not allow negative edge weights. ' + + 'Bad edge: ' + + edge + + ' Weight: ' + + weight + ); + } + + if (distance < wEntry.distance) { + wEntry.distance = distance; + wEntry.predecessor = v; + pq.decrease(w, distance); + } + }; + + g.nodes().forEach(function (v) { + var distance = v === source ? 0 : Number.POSITIVE_INFINITY; + results[v] = { distance: distance }; + pq.add(v, distance); + }); + + while (pq.size() > 0) { + v = pq.removeMin(); + vEntry = results[v]; + if (vEntry.distance === Number.POSITIVE_INFINITY) { + break; + } + + edgeFn(v).forEach(updateNeighbors); + } + + return results; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js + + + + + +function dijkstraAll(g, weightFunc, edgeFunc) { + return _.transform( + g.nodes(), + function (acc, v) { + acc[v] = dijkstra(g, v, weightFunc, edgeFunc); + }, + {} + ); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js + + + + +var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function floydWarshall(g, weightFn, edgeFn) { + return runFloydWarshall( + g, + weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runFloydWarshall(g, weightFn, edgeFn) { + var results = {}; + var nodes = g.nodes(); + + nodes.forEach(function (v) { + results[v] = {}; + results[v][v] = { distance: 0 }; + nodes.forEach(function (w) { + if (v !== w) { + results[v][w] = { distance: Number.POSITIVE_INFINITY }; + } + }); + edgeFn(v).forEach(function (edge) { + var w = edge.v === v ? edge.w : edge.v; + var d = weightFn(edge); + results[v][w] = { distance: d, predecessor: v }; + }); + }); + + nodes.forEach(function (k) { + var rowK = results[k]; + nodes.forEach(function (i) { + var rowI = results[i]; + nodes.forEach(function (j) { + var ik = rowI[k]; + var kj = rowK[j]; + var ij = rowI[j]; + var altDistance = ik.distance + kj.distance; + if (altDistance < ij.distance) { + ij.distance = altDistance; + ij.predecessor = kj.predecessor; + } + }); + }); + }); + + return results; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules +var _baseKeys = __webpack_require__(1852); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules +var _baseGetTag = __webpack_require__(8496); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js + + + + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); +} + +/* harmony default export */ const lodash_es_isString = (isString); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js + + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = (0,_baseProperty/* default */.A)('length'); + +/* harmony default export */ const _asciiSize = (asciiSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/* harmony default export */ const _hasUnicode = (hasUnicode); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js +/** Used to compose unicode character classes. */ +var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', + _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', + _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', + _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', + _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, + _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', + rsCombo = '[' + _unicodeSize_rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + _unicodeSize_rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', + rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +/* harmony default export */ const _unicodeSize = (unicodeSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js + + + + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return _hasUnicode(string) + ? _unicodeSize(string) + : _asciiSize(string); +} + +/* harmony default export */ const _stringSize = (stringSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + if (collection == null) { + return 0; + } + if ((0,isArrayLike/* default */.A)(collection)) { + return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; + } + var tag = (0,_getTag/* default */.A)(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return (0,_baseKeys/* default */.A)(collection).length; +} + +/* harmony default export */ const lodash_es_size = (size); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js + + + + +topsort_topsort.CycleException = topsort_CycleException; + +function topsort_topsort(g) { + var visited = {}; + var stack = {}; + var results = []; + + function visit(node) { + if (has/* default */.A(stack, node)) { + throw new topsort_CycleException(); + } + + if (!has/* default */.A(visited, node)) { + stack[node] = true; + visited[node] = true; + forEach/* default */.A(g.predecessors(node), visit); + delete stack[node]; + results.push(node); + } + } + + forEach/* default */.A(g.sinks(), visit); + + if (lodash_es_size(visited) !== g.nodeCount()) { + throw new topsort_CycleException(); + } + + return results; +} + +function topsort_CycleException() {} +topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js + + + + +function isAcyclic(g) { + try { + topsort(g); + } catch (e) { + if (e instanceof CycleException) { + return false; + } + throw e; + } + return true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js + + + + +/* + * A helper that preforms a pre- or post-order traversal on the input graph + * and returns the nodes in the order they were visited. If the graph is + * undirected then this algorithm will navigate using neighbors. If the graph + * is directed then this algorithm will navigate using successors. + * + * Order must be one of "pre" or "post". + */ +function dfs(g, vs, order) { + if (!isArray/* default */.A(vs)) { + vs = [vs]; + } + + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); + + var acc = []; + var visited = {}; + forEach/* default */.A(vs, function (v) { + if (!g.hasNode(v)) { + throw new Error('Graph does not have node: ' + v); + } + + doDfs(g, v, order === 'post', visited, navigation, acc); + }); + return acc; +} + +function doDfs(g, v, postorder, visited, navigation, acc) { + if (!has/* default */.A(visited, v)) { + visited[v] = true; + + if (!postorder) { + acc.push(v); + } + forEach/* default */.A(navigation(v), function (w) { + doDfs(g, w, postorder, visited, navigation, acc); + }); + if (postorder) { + acc.push(v); + } + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js + + + + +function postorder(g, vs) { + return dfs(g, vs, 'post'); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js + + + + +function preorder(g, vs) { + return dfs(g, vs, 'pre'); +} + +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules +var graph = __webpack_require__(3046); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js + + + + + + +function prim(g, weightFunc) { + var result = new Graph(); + var parents = {}; + var pq = new PriorityQueue(); + var v; + + function updateNeighbors(edge) { + var w = edge.v === v ? edge.w : edge.v; + var pri = pq.priority(w); + if (pri !== undefined) { + var edgeWeight = weightFunc(edge); + if (edgeWeight < pri) { + parents[w] = v; + pq.decrease(w, edgeWeight); + } + } + } + + if (g.nodeCount() === 0) { + return result; + } + + _.each(g.nodes(), function (v) { + pq.add(v, Number.POSITIVE_INFINITY); + result.setNode(v); + }); + + // Start from an arbitrary node + pq.decrease(g.nodes()[0], 0); + + var init = false; + while (pq.size() > 0) { + v = pq.removeMin(); + if (_.has(parents, v)) { + result.setEdge(v, parents[v]); + } else if (init) { + throw new Error('Input graph is not connected: ' + g); + } else { + init = true; + } + + g.nodeEdges(v).forEach(updateNeighbors); + } + + return result; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js + + + + + + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js + + + + + + + + +// Expose some internals for testing purposes +networkSimplex.initLowLimValues = initLowLimValues; +networkSimplex.initCutValues = initCutValues; +networkSimplex.calcCutValue = calcCutValue; +networkSimplex.leaveEdge = leaveEdge; +networkSimplex.enterEdge = enterEdge; +networkSimplex.exchangeEdges = exchangeEdges; + +/* + * The network simplex algorithm assigns ranks to each node in the input graph + * and iteratively improves the ranking to reduce the length of edges. + * + * Preconditions: + * + * 1. The input graph must be a DAG. + * 2. All nodes in the graph must have an object value. + * 3. All edges in the graph must have "minlen" and "weight" attributes. + * + * Postconditions: + * + * 1. All nodes in the graph will have an assigned "rank" attribute that has + * been optimized by the network simplex algorithm. Ranks start at 0. + * + * + * A rough sketch of the algorithm is as follows: + * + * 1. Assign initial ranks to each node. We use the longest path algorithm, + * which assigns ranks to the lowest position possible. In general this + * leads to very wide bottom ranks and unnecessarily long edges. + * 2. Construct a feasible tight tree. A tight tree is one such that all + * edges in the tree have no slack (difference between length of edge + * and minlen for the edge). This by itself greatly improves the assigned + * rankings by shorting edges. + * 3. Iteratively find edges that have negative cut values. Generally a + * negative cut value indicates that the edge could be removed and a new + * tree edge could be added to produce a more compact graph. + * + * Much of the algorithms here are derived from Gansner, et al., "A Technique + * for Drawing Directed Graphs." The structure of the file roughly follows the + * structure of the overall algorithm. + */ +function networkSimplex(g) { + g = simplify(g); + longestPath(g); + var t = feasibleTree(g); + initLowLimValues(t); + initCutValues(t, g); + + var e, f; + while ((e = leaveEdge(t))) { + f = enterEdge(t, g, e); + exchangeEdges(t, g, e, f); + } +} + +/* + * Initializes cut values for all edges in the tree. + */ +function initCutValues(t, g) { + var vs = postorder(t, t.nodes()); + vs = vs.slice(0, vs.length - 1); + forEach/* default */.A(vs, function (v) { + assignCutValue(t, g, v); + }); +} + +function assignCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + t.edge(child, parent).cutvalue = calcCutValue(t, g, child); +} + +/* + * Given the tight tree, its graph, and a child in the graph calculate and + * return the cut value for the edge between the child and its parent. + */ +function calcCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + // True if the child is on the tail end of the edge in the directed graph + var childIsTail = true; + // The graph's view of the tree edge we're inspecting + var graphEdge = g.edge(child, parent); + // The accumulated cut value for the edge between this node and its parent + var cutValue = 0; + + if (!graphEdge) { + childIsTail = false; + graphEdge = g.edge(parent, child); + } + + cutValue = graphEdge.weight; + + forEach/* default */.A(g.nodeEdges(child), function (e) { + var isOutEdge = e.v === child, + other = isOutEdge ? e.w : e.v; + + if (other !== parent) { + var pointsToHead = isOutEdge === childIsTail, + otherWeight = g.edge(e).weight; + + cutValue += pointsToHead ? otherWeight : -otherWeight; + if (isTreeEdge(t, child, other)) { + var otherCutValue = t.edge(child, other).cutvalue; + cutValue += pointsToHead ? -otherCutValue : otherCutValue; + } + } + }); + + return cutValue; +} + +function initLowLimValues(tree, root) { + if (arguments.length < 2) { + root = tree.nodes()[0]; + } + dfsAssignLowLim(tree, {}, 1, root); +} + +function dfsAssignLowLim(tree, visited, nextLim, v, parent) { + var low = nextLim; + var label = tree.node(v); + + visited[v] = true; + forEach/* default */.A(tree.neighbors(v), function (w) { + if (!has/* default */.A(visited, w)) { + nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); + } + }); + + label.low = low; + label.lim = nextLim++; + if (parent) { + label.parent = parent; + } else { + // TODO should be able to remove this when we incrementally update low lim + delete label.parent; + } + + return nextLim; +} + +function leaveEdge(tree) { + return lodash_es_find(tree.edges(), function (e) { + return tree.edge(e).cutvalue < 0; + }); +} + +function enterEdge(t, g, edge) { + var v = edge.v; + var w = edge.w; + + // For the rest of this function we assume that v is the tail and w is the + // head, so if we don't have this edge in the graph we should flip it to + // match the correct orientation. + if (!g.hasEdge(v, w)) { + v = edge.w; + w = edge.v; + } + + var vLabel = t.node(v); + var wLabel = t.node(w); + var tailLabel = vLabel; + var flip = false; + + // If the root is in the tail of the edge then we need to flip the logic that + // checks for the head and tail nodes in the candidates function below. + if (vLabel.lim > wLabel.lim) { + tailLabel = wLabel; + flip = true; + } + + var candidates = filter/* default */.A(g.edges(), function (edge) { + return ( + flip === isDescendant(t, t.node(edge.v), tailLabel) && + flip !== isDescendant(t, t.node(edge.w), tailLabel) + ); + }); + + return lodash_es_minBy(candidates, function (edge) { + return slack(g, edge); + }); +} + +function exchangeEdges(t, g, e, f) { + var v = e.v; + var w = e.w; + t.removeEdge(v, w); + t.setEdge(f.v, f.w, {}); + initLowLimValues(t); + initCutValues(t, g); + updateRanks(t, g); +} + +function updateRanks(t, g) { + var root = lodash_es_find(t.nodes(), function (v) { + return !g.node(v).parent; + }); + var vs = preorder(t, root); + vs = vs.slice(1); + forEach/* default */.A(vs, function (v) { + var parent = t.node(v).parent, + edge = g.edge(v, parent), + flipped = false; + + if (!edge) { + edge = g.edge(parent, v); + flipped = true; + } + + g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); + }); +} + +/* + * Returns true if the edge is in the tree. + */ +function isTreeEdge(tree, u, v) { + return tree.hasEdge(u, v); +} + +/* + * Returns true if the specified node is descendant of the root node per the + * assigned low and lim attributes in the tree. + */ +function isDescendant(tree, vLabel, rootLabel) { + return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js + + + + + + +/* + * Assigns a rank to each node in the input graph that respects the "minlen" + * constraint specified on edges between nodes. + * + * This basic structure is derived from Gansner, et al., "A Technique for + * Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a connected DAG + * 2. Graph nodes must be objects + * 3. Graph edges must have "weight" and "minlen" attributes + * + * Post-conditions: + * + * 1. Graph nodes will have a "rank" attribute based on the results of the + * algorithm. Ranks can start at any index (including negative), we'll + * fix them up later. + */ +function rank(g) { + switch (g.graph().ranker) { + case 'network-simplex': + networkSimplexRanker(g); + break; + case 'tight-tree': + tightTreeRanker(g); + break; + case 'longest-path': + longestPathRanker(g); + break; + default: + networkSimplexRanker(g); + } +} + +// A fast and simple ranker, but results are far from optimal. +var longestPathRanker = longestPath; + +function tightTreeRanker(g) { + longestPath(g); + feasibleTree(g); +} + +function networkSimplexRanker(g) { + networkSimplex(g); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js + + + + + +/* + * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, + * adds appropriate edges to ensure that all cluster nodes are placed between + * these boundries, and ensures that the graph is connected. + * + * In addition we ensure, through the use of the minlen property, that nodes + * and subgraph border nodes to not end up on the same rank. + * + * Preconditions: + * + * 1. Input graph is a DAG + * 2. Nodes in the input graph has a minlen attribute + * + * Postconditions: + * + * 1. Input graph is connected. + * 2. Dummy nodes are added for the tops and bottoms of subgraphs. + * 3. The minlen attribute for nodes is adjusted to ensure nodes do not + * get placed on the same rank as subgraph border nodes. + * + * The nesting graph idea comes from Sander, "Layout of Compound Directed + * Graphs." + */ +function nesting_graph_run(g) { + var root = addDummyNode(g, 'root', {}, '_root'); + var depths = treeDepths(g); + var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array + var nodeSep = 2 * height + 1; + + g.graph().nestingRoot = root; + + // Multiply minlen by nodeSep to align nodes on non-border ranks. + forEach/* default */.A(g.edges(), function (e) { + g.edge(e).minlen *= nodeSep; + }); + + // Calculate a weight that is sufficient to keep subgraphs vertically compact + var weight = sumWeights(g) + 1; + + // Create border nodes and link them up + forEach/* default */.A(g.children(), function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + }); + + // Save the multiplier for node layers for later removal of empty border + // layers. + g.graph().nodeRankFactor = nodeSep; +} + +function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { + var children = g.children(v); + if (!children.length) { + if (v !== root) { + g.setEdge(root, v, { weight: 0, minlen: nodeSep }); + } + return; + } + + var top = addBorderNode(g, '_bt'); + var bottom = addBorderNode(g, '_bb'); + var label = g.node(v); + + g.setParent(top, v); + label.borderTop = top; + g.setParent(bottom, v); + label.borderBottom = bottom; + + forEach/* default */.A(children, function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + + var childNode = g.node(child); + var childTop = childNode.borderTop ? childNode.borderTop : child; + var childBottom = childNode.borderBottom ? childNode.borderBottom : child; + var thisWeight = childNode.borderTop ? weight : 2 * weight; + var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; + + g.setEdge(top, childTop, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + + g.setEdge(childBottom, bottom, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + }); + + if (!g.parent(v)) { + g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); + } +} + +function treeDepths(g) { + var depths = {}; + function dfs(v, depth) { + var children = g.children(v); + if (children && children.length) { + forEach/* default */.A(children, function (child) { + dfs(child, depth + 1); + }); + } + depths[v] = depth; + } + forEach/* default */.A(g.children(), function (v) { + dfs(v, 1); + }); + return depths; +} + +function sumWeights(g) { + return reduce/* default */.A( + g.edges(), + function (acc, e) { + return acc + g.edge(e).weight; + }, + 0 + ); +} + +function cleanup(g) { + var graphLabel = g.graph(); + g.removeNode(graphLabel.nestingRoot); + delete graphLabel.nestingRoot; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.nestingEdge) { + g.removeEdge(e); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules +var _baseClone = __webpack_require__(1641); +;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js + + + + +function addSubgraphConstraints(g, cg, vs) { + var prev = {}, + rootPrev; + + forEach/* default */.A(vs, function (v) { + var child = g.parent(v), + parent, + prevChild; + while (child) { + parent = g.parent(child); + if (parent) { + prevChild = prev[parent]; + prev[parent] = child; + } else { + prevChild = rootPrev; + rootPrev = child; + } + if (prevChild && prevChild !== child) { + cg.setEdge(prevChild, child); + return; + } + child = parent; + } + }); + + /* + function dfs(v) { + var children = v ? g.children(v) : g.children(); + if (children.length) { + var min = Number.POSITIVE_INFINITY, + subgraphs = []; + _.each(children, function(child) { + var childMin = dfs(child); + if (g.children(child).length) { + subgraphs.push({ v: child, order: childMin }); + } + min = Math.min(min, childMin); + }); + _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { + cg.setEdge(prev.v, curr.v); + return curr; + }); + return min; + } + return g.node(v).order; + } + dfs(undefined); + */ +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js + + + + + +/* + * Constructs a graph that can be used to sort a layer of nodes. The graph will + * contain all base and subgraph nodes from the request layer in their original + * hierarchy and any edges that are incident on these nodes and are of the type + * requested by the "relationship" parameter. + * + * Nodes from the requested rank that do not have parents are assigned a root + * node in the output graph, which is set in the root graph attribute. This + * makes it easy to walk the hierarchy of movable nodes during ordering. + * + * Pre-conditions: + * + * 1. Input graph is a DAG + * 2. Base nodes in the input graph have a rank attribute + * 3. Subgraph nodes in the input graph has minRank and maxRank attributes + * 4. Edges have an assigned weight + * + * Post-conditions: + * + * 1. Output graph has all nodes in the movable rank with preserved + * hierarchy. + * 2. Root nodes in the movable layer are made children of the node + * indicated by the root attribute of the graph. + * 3. Non-movable nodes incident on movable nodes, selected by the + * relationship parameter, are included in the graph (without hierarchy). + * 4. Edges incident on movable nodes, selected by the relationship + * parameter, are added to the output graph. + * 5. The weights for copied edges are aggregated as need, since the output + * graph is not a multi-graph. + */ +function buildLayerGraph(g, rank, relationship) { + var root = createRootNode(g), + result = new graphlib/* Graph */.T({ compound: true }) + .setGraph({ root: root }) + .setDefaultNodeLabel(function (v) { + return g.node(v); + }); + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v), + parent = g.parent(v); + + if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { + result.setNode(v); + result.setParent(v, parent || root); + + // This assumes we have only short edges! + forEach/* default */.A(g[relationship](v), function (e) { + var u = e.v === v ? e.w : e.v, + edge = result.edge(u, v), + weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; + result.setEdge(u, v, { weight: g.edge(e).weight + weight }); + }); + + if (has/* default */.A(node, 'minRank')) { + result.setNode(v, { + borderLeft: node.borderLeft[rank], + borderRight: node.borderRight[rank], + }); + } + } + }); + + return result; +} + +function createRootNode(g) { + var v; + while (g.hasNode((v = uniqueId/* default */.A('_root')))); + return v; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +/* harmony default export */ const _baseZipObject = (baseZipObject); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js + + + +/** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ +function zipObject(props, values) { + return _baseZipObject(props || [], values || [], _assignValue/* default */.A); +} + +/* harmony default export */ const lodash_es_zipObject = (zipObject); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js +var _baseMap = __webpack_require__(2568); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +/* harmony default export */ const _baseSortBy = (baseSortBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js + + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = (0,isSymbol/* default */.A)(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = (0,isSymbol/* default */.A)(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +/* harmony default export */ const _compareAscending = (compareAscending); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js + + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = _compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +/* harmony default export */ const _compareMultiple = (compareMultiple); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js + + + + + + + + + + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + if ((0,isArray/* default */.A)(iteratee)) { + return function(value) { + return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity/* default */.A]; + } + + var index = -1; + iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); + + var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { + var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return _baseSortBy(result, function(object, other) { + return _compareMultiple(object, other, orders); + }); +} + +/* harmony default export */ const _baseOrderBy = (baseOrderBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js + + + + + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ +var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); +}); + +/* harmony default export */ const lodash_es_sortBy = (sortBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js + + + + +/* + * A function that takes a layering (an array of layers, each with an array of + * ordererd nodes) and a graph and returns a weighted crossing count. + * + * Pre-conditions: + * + * 1. Input graph must be simple (not a multigraph), directed, and include + * only simple edges. + * 2. Edges in the input graph must have assigned weights. + * + * Post-conditions: + * + * 1. The graph and layering matrix are left unchanged. + * + * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." + */ +function crossCount(g, layering) { + var cc = 0; + for (var i = 1; i < layering.length; ++i) { + cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); + } + return cc; +} + +function twoLayerCrossCount(g, northLayer, southLayer) { + // Sort all of the edges between the north and south layers by their position + // in the north layer and then the south. Map these edges to the position of + // their head in the south layer. + var southPos = lodash_es_zipObject( + southLayer, + map/* default */.A(southLayer, function (v, i) { + return i; + }) + ); + var southEntries = flatten/* default */.A( + map/* default */.A(northLayer, function (v) { + return lodash_es_sortBy( + map/* default */.A(g.outEdges(v), function (e) { + return { pos: southPos[e.w], weight: g.edge(e).weight }; + }), + 'pos' + ); + }) + ); + + // Build the accumulator tree + var firstIndex = 1; + while (firstIndex < southLayer.length) firstIndex <<= 1; + var treeSize = 2 * firstIndex - 1; + firstIndex -= 1; + var tree = map/* default */.A(new Array(treeSize), function () { + return 0; + }); + + // Calculate the weighted crossings + var cc = 0; + forEach/* default */.A( + // @ts-expect-error + southEntries.forEach(function (entry) { + var index = entry.pos + firstIndex; + tree[index] += entry.weight; + var weightSum = 0; + // @ts-expect-error + while (index > 0) { + // @ts-expect-error + if (index % 2) { + weightSum += tree[index + 1]; + } + // @ts-expect-error + index = (index - 1) >> 1; + tree[index] += entry.weight; + } + cc += entry.weight * weightSum; + }) + ); + + return cc; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js + + + + +/* + * Assigns an initial order value for each node by performing a DFS search + * starting from nodes in the first rank. Nodes are assigned an order in their + * rank as they are first visited. + * + * This approach comes from Gansner, et al., "A Technique for Drawing Directed + * Graphs." + * + * Returns a layering matrix with an array per layer and each layer sorted by + * the order of its nodes. + */ +function initOrder(g) { + var visited = {}; + var simpleNodes = filter/* default */.A(g.nodes(), function (v) { + return !g.children(v).length; + }); + var maxRank = lodash_es_max( + map/* default */.A(simpleNodes, function (v) { + return g.node(v).rank; + }) + ); + var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { + return []; + }); + + function dfs(v) { + if (has/* default */.A(visited, v)) return; + visited[v] = true; + var node = g.node(v); + layers[node.rank].push(v); + forEach/* default */.A(g.successors(v), dfs); + } + + var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { + return g.node(v).rank; + }); + forEach/* default */.A(orderedVs, dfs); + + return layers; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js + + + + +function barycenter(g, movable) { + return map/* default */.A(movable, function (v) { + var inV = g.inEdges(v); + if (!inV.length) { + return { v: v }; + } else { + var result = reduce/* default */.A( + inV, + function (acc, e) { + var edge = g.edge(e), + nodeU = g.node(e.v); + return { + sum: acc.sum + edge.weight * nodeU.order, + weight: acc.weight + edge.weight, + }; + }, + { sum: 0, weight: 0 } + ); + + return { + v: v, + barycenter: result.sum / result.weight, + weight: result.weight, + }; + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js + + + + +/* + * Given a list of entries of the form {v, barycenter, weight} and a + * constraint graph this function will resolve any conflicts between the + * constraint graph and the barycenters for the entries. If the barycenters for + * an entry would violate a constraint in the constraint graph then we coalesce + * the nodes in the conflict into a new node that respects the contraint and + * aggregates barycenter and weight information. + * + * This implementation is based on the description in Forster, "A Fast and + * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it + * differs in some specific details. + * + * Pre-conditions: + * + * 1. Each entry has the form {v, barycenter, weight}, or if the node has + * no barycenter, then {v}. + * + * Returns: + * + * A new list of entries of the form {vs, i, barycenter, weight}. The list + * `vs` may either be a singleton or it may be an aggregation of nodes + * ordered such that they do not violate constraints from the constraint + * graph. The property `i` is the lowest original index of any of the + * elements in `vs`. + */ +function resolveConflicts(entries, cg) { + var mappedEntries = {}; + forEach/* default */.A(entries, function (entry, i) { + var tmp = (mappedEntries[entry.v] = { + indegree: 0, + in: [], + out: [], + vs: [entry.v], + i: i, + }); + if (!isUndefined/* default */.A(entry.barycenter)) { + // @ts-expect-error + tmp.barycenter = entry.barycenter; + // @ts-expect-error + tmp.weight = entry.weight; + } + }); + + forEach/* default */.A(cg.edges(), function (e) { + var entryV = mappedEntries[e.v]; + var entryW = mappedEntries[e.w]; + if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { + entryW.indegree++; + entryV.out.push(mappedEntries[e.w]); + } + }); + + var sourceSet = filter/* default */.A(mappedEntries, function (entry) { + // @ts-expect-error + return !entry.indegree; + }); + + return doResolveConflicts(sourceSet); +} + +function doResolveConflicts(sourceSet) { + var entries = []; + + function handleIn(vEntry) { + return function (uEntry) { + if (uEntry.merged) { + return; + } + if ( + isUndefined/* default */.A(uEntry.barycenter) || + isUndefined/* default */.A(vEntry.barycenter) || + uEntry.barycenter >= vEntry.barycenter + ) { + mergeEntries(vEntry, uEntry); + } + }; + } + + function handleOut(vEntry) { + return function (wEntry) { + wEntry['in'].push(vEntry); + if (--wEntry.indegree === 0) { + sourceSet.push(wEntry); + } + }; + } + + while (sourceSet.length) { + var entry = sourceSet.pop(); + entries.push(entry); + forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); + forEach/* default */.A(entry.out, handleOut(entry)); + } + + return map/* default */.A( + filter/* default */.A(entries, function (entry) { + return !entry.merged; + }), + function (entry) { + return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); + } + ); +} + +function mergeEntries(target, source) { + var sum = 0; + var weight = 0; + + if (target.weight) { + sum += target.barycenter * target.weight; + weight += target.weight; + } + + if (source.weight) { + sum += source.barycenter * source.weight; + weight += source.weight; + } + + target.vs = source.vs.concat(target.vs); + target.barycenter = sum / weight; + target.weight = weight; + target.i = Math.min(source.i, target.i); + source.merged = true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js + + + + + +function sort(entries, biasRight) { + var parts = partition(entries, function (entry) { + return has/* default */.A(entry, 'barycenter'); + }); + var sortable = parts.lhs, + unsortable = lodash_es_sortBy(parts.rhs, function (entry) { + return -entry.i; + }), + vs = [], + sum = 0, + weight = 0, + vsIndex = 0; + + sortable.sort(compareWithBias(!!biasRight)); + + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + + forEach/* default */.A(sortable, function (entry) { + vsIndex += entry.vs.length; + vs.push(entry.vs); + sum += entry.barycenter * entry.weight; + weight += entry.weight; + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + }); + + var result = { vs: flatten/* default */.A(vs) }; + if (weight) { + result.barycenter = sum / weight; + result.weight = weight; + } + return result; +} + +function consumeUnsortable(vs, unsortable, index) { + var last; + while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { + unsortable.pop(); + vs.push(last.vs); + index++; + } + return index; +} + +function compareWithBias(bias) { + return function (entryV, entryW) { + if (entryV.barycenter < entryW.barycenter) { + return -1; + } else if (entryV.barycenter > entryW.barycenter) { + return 1; + } + + return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; + }; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js + + + + + + + +function sortSubgraph(g, v, cg, biasRight) { + var movable = g.children(v); + var node = g.node(v); + var bl = node ? node.borderLeft : undefined; + var br = node ? node.borderRight : undefined; + var subgraphs = {}; + + if (bl) { + movable = filter/* default */.A(movable, function (w) { + return w !== bl && w !== br; + }); + } + + var barycenters = barycenter(g, movable); + forEach/* default */.A(barycenters, function (entry) { + if (g.children(entry.v).length) { + var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); + subgraphs[entry.v] = subgraphResult; + if (has/* default */.A(subgraphResult, 'barycenter')) { + mergeBarycenters(entry, subgraphResult); + } + } + }); + + var entries = resolveConflicts(barycenters, cg); + expandSubgraphs(entries, subgraphs); + + var result = sort(entries, biasRight); + + if (bl) { + result.vs = flatten/* default */.A([bl, result.vs, br]); + if (g.predecessors(bl).length) { + var blPred = g.node(g.predecessors(bl)[0]), + brPred = g.node(g.predecessors(br)[0]); + if (!has/* default */.A(result, 'barycenter')) { + result.barycenter = 0; + result.weight = 0; + } + result.barycenter = + (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); + result.weight += 2; + } + } + + return result; +} + +function expandSubgraphs(entries, subgraphs) { + forEach/* default */.A(entries, function (entry) { + entry.vs = flatten/* default */.A( + entry.vs.map(function (v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }) + ); + }); +} + +function mergeBarycenters(target, other) { + if (!isUndefined/* default */.A(target.barycenter)) { + target.barycenter = + (target.barycenter * target.weight + other.barycenter * other.weight) / + (target.weight + other.weight); + target.weight += other.weight; + } else { + target.barycenter = other.barycenter; + target.weight = other.weight; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js + + + + + + + + + + + +/* + * Applies heuristics to minimize edge crossings in the graph and sets the best + * order solution as an order attribute on each node. + * + * Pre-conditions: + * + * 1. Graph must be DAG + * 2. Graph nodes must be objects with a "rank" attribute + * 3. Graph edges must have the "weight" attribute + * + * Post-conditions: + * + * 1. Graph nodes will have an "order" attribute based on the results of the + * algorithm. + */ +function order(g) { + var maxRank = util_maxRank(g), + downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), + upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); + + var layering = initOrder(g); + assignOrder(g, layering); + + var bestCC = Number.POSITIVE_INFINITY, + best; + + for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { + sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); + + layering = buildLayerMatrix(g); + var cc = crossCount(g, layering); + if (cc < bestCC) { + lastBest = 0; + best = lodash_es_cloneDeep(layering); + bestCC = cc; + } + } + + assignOrder(g, best); +} + +function buildLayerGraphs(g, ranks, relationship) { + return map/* default */.A(ranks, function (rank) { + return buildLayerGraph(g, rank, relationship); + }); +} + +function sweepLayerGraphs(layerGraphs, biasRight) { + var cg = new graphlib/* Graph */.T(); + forEach/* default */.A(layerGraphs, function (lg) { + var root = lg.graph().root; + var sorted = sortSubgraph(lg, root, cg, biasRight); + forEach/* default */.A(sorted.vs, function (v, i) { + lg.node(v).order = i; + }); + addSubgraphConstraints(lg, cg, sorted.vs); + }); +} + +function assignOrder(g, layering) { + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, i) { + g.node(v).order = i; + }); + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js + + + + +function parentDummyChains(g) { + var postorderNums = parent_dummy_chains_postorder(g); + + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var edgeObj = node.edgeObj; + var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); + var path = pathData.path; + var lca = pathData.lca; + var pathIdx = 0; + var pathV = path[pathIdx]; + var ascending = true; + + while (v !== edgeObj.w) { + node = g.node(v); + + if (ascending) { + while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { + pathIdx++; + } + + if (pathV === lca) { + ascending = false; + } + } + + if (!ascending) { + while ( + pathIdx < path.length - 1 && + g.node((pathV = path[pathIdx + 1])).minRank <= node.rank + ) { + pathIdx++; + } + pathV = path[pathIdx]; + } + + g.setParent(v, pathV); + v = g.successors(v)[0]; + } + }); +} + +// Find a path from v to w through the lowest common ancestor (LCA). Return the +// full path and the LCA. +function findPath(g, postorderNums, v, w) { + var vPath = []; + var wPath = []; + var low = Math.min(postorderNums[v].low, postorderNums[w].low); + var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); + var parent; + var lca; + + // Traverse up from v to find the LCA + parent = v; + do { + parent = g.parent(parent); + vPath.push(parent); + } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); + lca = parent; + + // Traverse from w to LCA + parent = w; + while ((parent = g.parent(parent)) !== lca) { + wPath.push(parent); + } + + return { path: vPath.concat(wPath.reverse()), lca: lca }; +} + +function parent_dummy_chains_postorder(g) { + var result = {}; + var lim = 0; + + function dfs(v) { + var low = lim; + forEach/* default */.A(g.children(v), dfs); + result[v] = { low: low, lim: lim++ }; + } + forEach/* default */.A(g.children(), dfs); + + return result; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js +var _castFunction = __webpack_require__(9922); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js + + + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); +} + +/* harmony default export */ const lodash_es_forOwn = (forOwn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules +var _baseFor = __webpack_require__(4574); +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js + + + + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); +} + +/* harmony default export */ const lodash_es_forIn = (forIn); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js + + + + +/* + * This module provides coordinate assignment based on Brandes and Köpf, "Fast + * and Simple Horizontal Coordinate Assignment." + */ + + + +/* + * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" + * property. A type-1 conflict is one where a non-inner segment crosses an + * inner segment. An inner segment is an edge with both incident nodes marked + * with the "dummy" property. + * + * This algorithm scans layer by layer, starting with the second, for type-1 + * conflicts between the current layer and the previous layer. For each layer + * it scans the nodes from left to right until it reaches one that is incident + * on an inner segment. It then scans predecessors to determine if they have + * edges that cross that inner segment. At the end a final scan is done for all + * nodes on the current rank to see if they cross the last visited inner + * segment. + * + * This algorithm (safely) assumes that a dummy node will only be incident on a + * single node in the layers being scanned. + */ +function findType1Conflicts(g, layering) { + var conflicts = {}; + + function visitLayer(prevLayer, layer) { + var // last visited node in the previous layer that is incident on an inner + // segment. + k0 = 0, + // Tracks the last node in this layer scanned for crossings with a type-1 + // segment. + scanPos = 0, + prevLayerLength = prevLayer.length, + lastNode = lodash_es_last(layer); + + forEach/* default */.A(layer, function (v, i) { + var w = findOtherInnerSegmentNode(g, v), + k1 = w ? g.node(w).order : prevLayerLength; + + if (w || v === lastNode) { + forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { + forEach/* default */.A(g.predecessors(scanNode), function (u) { + var uLabel = g.node(u), + uPos = uLabel.order; + if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { + addConflict(conflicts, u, scanNode); + } + }); + }); + // @ts-expect-error + scanPos = i + 1; + k0 = k1; + } + }); + + return layer; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findType2Conflicts(g, layering) { + var conflicts = {}; + + function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { + var v; + forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { + v = south[i]; + if (g.node(v).dummy) { + forEach/* default */.A(g.predecessors(v), function (u) { + var uNode = g.node(u); + if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { + addConflict(conflicts, u, v); + } + }); + } + }); + } + + function visitLayer(north, south) { + var prevNorthPos = -1, + nextNorthPos, + southPos = 0; + + forEach/* default */.A(south, function (v, southLookahead) { + if (g.node(v).dummy === 'border') { + var predecessors = g.predecessors(v); + if (predecessors.length) { + nextNorthPos = g.node(predecessors[0]).order; + scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); + // @ts-expect-error + southPos = southLookahead; + prevNorthPos = nextNorthPos; + } + } + scan(south, southPos, south.length, nextNorthPos, north.length); + }); + + return south; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findOtherInnerSegmentNode(g, v) { + if (g.node(v).dummy) { + return lodash_es_find(g.predecessors(v), function (u) { + return g.node(u).dummy; + }); + } +} + +function addConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + + var conflictsV = conflicts[v]; + if (!conflictsV) { + conflicts[v] = conflictsV = {}; + } + conflictsV[w] = true; +} + +function hasConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + return has/* default */.A(conflicts[v], w); +} + +/* + * Try to align nodes into vertical "blocks" where possible. This algorithm + * attempts to align a node with one of its median neighbors. If the edge + * connecting a neighbor is a type-1 conflict then we ignore that possibility. + * If a previous node has already formed a block with a node after the node + * we're trying to form a block with, we also ignore that possibility - our + * blocks would be split in that scenario. + */ +function verticalAlignment(g, layering, conflicts, neighborFn) { + var root = {}, + align = {}, + pos = {}; + + // We cache the position here based on the layering because the graph and + // layering may be out of sync. The layering matrix is manipulated to + // generate different extreme alignments. + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, order) { + root[v] = v; + align[v] = v; + pos[v] = order; + }); + }); + + forEach/* default */.A(layering, function (layer) { + var prevIdx = -1; + forEach/* default */.A(layer, function (v) { + var ws = neighborFn(v); + if (ws.length) { + ws = lodash_es_sortBy(ws, function (w) { + return pos[w]; + }); + var mp = (ws.length - 1) / 2; + for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { + var w = ws[i]; + if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { + align[w] = v; + align[v] = root[v] = root[w]; + prevIdx = pos[w]; + } + } + } + }); + }); + + return { root: root, align: align }; +} + +function horizontalCompaction(g, layering, root, align, reverseSep) { + // This portion of the algorithm differs from BK due to a number of problems. + // Instead of their algorithm we construct a new block graph and do two + // sweeps. The first sweep places blocks with the smallest possible + // coordinates. The second sweep removes unused space by moving blocks to the + // greatest coordinates without violating separation. + var xs = {}, + blockG = buildBlockGraph(g, layering, root, reverseSep), + borderType = reverseSep ? 'borderLeft' : 'borderRight'; + + function iterate(setXsFunc, nextNodesFunc) { + var stack = blockG.nodes(); + var elem = stack.pop(); + var visited = {}; + while (elem) { + if (visited[elem]) { + setXsFunc(elem); + } else { + visited[elem] = true; + stack.push(elem); + stack = stack.concat(nextNodesFunc(elem)); + } + + elem = stack.pop(); + } + } + + // First pass, assign smallest coordinates + function pass1(elem) { + xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { + return Math.max(acc, xs[e.v] + blockG.edge(e)); + }, 0); + } + + // Second pass, assign greatest coordinates + function pass2(elem) { + var min = blockG.outEdges(elem).reduce(function (acc, e) { + return Math.min(acc, xs[e.w] - blockG.edge(e)); + }, Number.POSITIVE_INFINITY); + + var node = g.node(elem); + if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { + xs[elem] = Math.max(xs[elem], min); + } + } + + iterate(pass1, blockG.predecessors.bind(blockG)); + iterate(pass2, blockG.successors.bind(blockG)); + + // Assign x coordinates to all nodes + forEach/* default */.A(align, function (v) { + xs[v] = xs[root[v]]; + }); + + return xs; +} + +function buildBlockGraph(g, layering, root, reverseSep) { + var blockGraph = new graphlib/* Graph */.T(), + graphLabel = g.graph(), + sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); + + forEach/* default */.A(layering, function (layer) { + var u; + forEach/* default */.A(layer, function (v) { + var vRoot = root[v]; + blockGraph.setNode(vRoot); + if (u) { + var uRoot = root[u], + prevMax = blockGraph.edge(uRoot, vRoot); + blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); + } + u = v; + }); + }); + + return blockGraph; +} + +/* + * Returns the alignment that has the smallest width of the given alignments. + */ +function findSmallestWidthAlignment(g, xss) { + return lodash_es_minBy(values/* default */.A(xss), function (xs) { + var max = Number.NEGATIVE_INFINITY; + var min = Number.POSITIVE_INFINITY; + + lodash_es_forIn(xs, function (x, v) { + var halfWidth = width(g, v) / 2; + + max = Math.max(x + halfWidth, max); + min = Math.min(x - halfWidth, min); + }); + + return max - min; + }); +} + +/* + * Align the coordinates of each of the layout alignments such that + * left-biased alignments have their minimum coordinate at the same point as + * the minimum coordinate of the smallest width alignment and right-biased + * alignments have their maximum coordinate at the same point as the maximum + * coordinate of the smallest width alignment. + */ +function alignCoordinates(xss, alignTo) { + var alignToVals = values/* default */.A(alignTo), + alignToMin = lodash_es_min(alignToVals), + alignToMax = lodash_es_max(alignToVals); + + forEach/* default */.A(['u', 'd'], function (vert) { + forEach/* default */.A(['l', 'r'], function (horiz) { + var alignment = vert + horiz, + xs = xss[alignment], + delta; + if (xs === alignTo) return; + + var xsVals = values/* default */.A(xs); + delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); + + if (delta) { + xss[alignment] = lodash_es_mapValues(xs, function (x) { + return x + delta; + }); + } + }); + }); +} + +function balance(xss, align) { + return lodash_es_mapValues(xss.ul, function (ignore, v) { + if (align) { + return xss[align.toLowerCase()][v]; + } else { + var xs = lodash_es_sortBy(map/* default */.A(xss, v)); + return (xs[1] + xs[2]) / 2; + } + }); +} + +function positionX(g) { + var layering = buildLayerMatrix(g); + var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); + + var xss = {}; + var adjustedLayering; + forEach/* default */.A(['u', 'd'], function (vert) { + adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); + forEach/* default */.A(['l', 'r'], function (horiz) { + if (horiz === 'r') { + adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { + return values/* default */.A(inner).reverse(); + }); + } + + var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); + var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); + var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); + if (horiz === 'r') { + xs = lodash_es_mapValues(xs, function (x) { + return -x; + }); + } + xss[vert + horiz] = xs; + }); + }); + + var smallestWidth = findSmallestWidthAlignment(g, xss); + alignCoordinates(xss, smallestWidth); + return balance(xss, g.graph().align); +} + +function sep(nodeSep, edgeSep, reverseSep) { + return function (g, v, w) { + var vLabel = g.node(v); + var wLabel = g.node(w); + var sum = 0; + var delta; + + sum += vLabel.width / 2; + if (has/* default */.A(vLabel, 'labelpos')) { + switch (vLabel.labelpos.toLowerCase()) { + case 'l': + delta = -vLabel.width / 2; + break; + case 'r': + delta = vLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; + sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; + + sum += wLabel.width / 2; + if (has/* default */.A(wLabel, 'labelpos')) { + switch (wLabel.labelpos.toLowerCase()) { + case 'l': + delta = wLabel.width / 2; + break; + case 'r': + delta = -wLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + return sum; + }; +} + +function width(g, v) { + return g.node(v).width; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js + + + + + + +function position(g) { + g = asNonCompoundGraph(g); + + positionY(g); + lodash_es_forOwn(positionX(g), function (x, v) { + g.node(v).x = x; + }); +} + +function positionY(g) { + var layering = buildLayerMatrix(g); + var rankSep = g.graph().ranksep; + var prevY = 0; + forEach/* default */.A(layering, function (layer) { + var maxHeight = lodash_es_max( + map/* default */.A(layer, function (v) { + return g.node(v).height; + }) + ); + forEach/* default */.A(layer, function (v) { + g.node(v).y = prevY + maxHeight / 2; + }); + prevY += maxHeight + rankSep; + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js + + + + + + + + + + + + + + + +function layout(g, opts) { + var time = opts && opts.debugTiming ? util_time : notime; + time('layout', function () { + var layoutGraph = time(' buildLayoutGraph', function () { + return buildLayoutGraph(g); + }); + time(' runLayout', function () { + runLayout(layoutGraph, time); + }); + time(' updateInputGraph', function () { + updateInputGraph(g, layoutGraph); + }); + }); +} + +function runLayout(g, time) { + time(' makeSpaceForEdgeLabels', function () { + makeSpaceForEdgeLabels(g); + }); + time(' removeSelfEdges', function () { + removeSelfEdges(g); + }); + time(' acyclic', function () { + run(g); + }); + time(' nestingGraph.run', function () { + nesting_graph_run(g); + }); + time(' rank', function () { + rank(asNonCompoundGraph(g)); + }); + time(' injectEdgeLabelProxies', function () { + injectEdgeLabelProxies(g); + }); + time(' removeEmptyRanks', function () { + removeEmptyRanks(g); + }); + time(' nestingGraph.cleanup', function () { + cleanup(g); + }); + time(' normalizeRanks', function () { + normalizeRanks(g); + }); + time(' assignRankMinMax', function () { + assignRankMinMax(g); + }); + time(' removeEdgeLabelProxies', function () { + removeEdgeLabelProxies(g); + }); + time(' normalize.run', function () { + normalize_run(g); + }); + time(' parentDummyChains', function () { + parentDummyChains(g); + }); + time(' addBorderSegments', function () { + addBorderSegments(g); + }); + time(' order', function () { + order(g); + }); + time(' insertSelfEdges', function () { + insertSelfEdges(g); + }); + time(' adjustCoordinateSystem', function () { + adjust(g); + }); + time(' position', function () { + position(g); + }); + time(' positionSelfEdges', function () { + positionSelfEdges(g); + }); + time(' removeBorderNodes', function () { + removeBorderNodes(g); + }); + time(' normalize.undo', function () { + normalize_undo(g); + }); + time(' fixupEdgeLabelCoords', function () { + fixupEdgeLabelCoords(g); + }); + time(' undoCoordinateSystem', function () { + coordinate_system_undo(g); + }); + time(' translateGraph', function () { + translateGraph(g); + }); + time(' assignNodeIntersects', function () { + assignNodeIntersects(g); + }); + time(' reversePoints', function () { + reversePointsForReversedEdges(g); + }); + time(' acyclic.undo', function () { + undo(g); + }); +} + +/* + * Copies final layout information from the layout graph back to the input + * graph. This process only copies whitelisted attributes from the layout graph + * to the input graph, so it serves as a good place to determine what + * attributes can influence layout. + */ +function updateInputGraph(inputGraph, layoutGraph) { + forEach/* default */.A(inputGraph.nodes(), function (v) { + var inputLabel = inputGraph.node(v); + var layoutLabel = layoutGraph.node(v); + + if (inputLabel) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + + if (layoutGraph.children(v).length) { + inputLabel.width = layoutLabel.width; + inputLabel.height = layoutLabel.height; + } + } + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var inputLabel = inputGraph.edge(e); + var layoutLabel = layoutGraph.edge(e); + + inputLabel.points = layoutLabel.points; + if (has/* default */.A(layoutLabel, 'x')) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + } + }); + + inputGraph.graph().width = layoutGraph.graph().width; + inputGraph.graph().height = layoutGraph.graph().height; +} + +var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; +var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; +var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; +var nodeNumAttrs = ['width', 'height']; +var nodeDefaults = { width: 0, height: 0 }; +var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; +var edgeDefaults = { + minlen: 1, + weight: 1, + width: 0, + height: 0, + labeloffset: 10, + labelpos: 'r', +}; +var edgeAttrs = ['labelpos']; + +/* + * Constructs a new graph from the input graph, which can be used for layout. + * This process copies only whitelisted attributes from the input graph to the + * layout graph. Thus this function serves as a good place to determine what + * attributes can influence layout. + */ +function buildLayoutGraph(inputGraph) { + var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); + var graph = canonicalize(inputGraph.graph()); + + g.setGraph( + merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) + ); + + forEach/* default */.A(inputGraph.nodes(), function (v) { + var node = canonicalize(inputGraph.node(v)); + g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); + g.setParent(v, inputGraph.parent(v)); + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var edge = canonicalize(inputGraph.edge(e)); + g.setEdge( + e, + merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) + ); + }); + + return g; +} + +/* + * This idea comes from the Gansner paper: to account for edge labels in our + * layout we split each rank in half by doubling minlen and halving ranksep. + * Then we can place labels at these mid-points between nodes. + * + * We also add some minimal padding to the width to push the label for the edge + * away from the edge itself a bit. + */ +function makeSpaceForEdgeLabels(g) { + var graph = g.graph(); + graph.ranksep /= 2; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + edge.minlen *= 2; + if (edge.labelpos.toLowerCase() !== 'c') { + if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { + edge.width += edge.labeloffset; + } else { + edge.height += edge.labeloffset; + } + } + }); +} + +/* + * Creates temporary dummy nodes that capture the rank in which each edge's + * label is going to, if it has one of non-zero width and height. We do this + * so that we can safely remove empty ranks while preserving balance for the + * label's position. + */ +function injectEdgeLabelProxies(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.width && edge.height) { + var v = g.node(e.v); + var w = g.node(e.w); + var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; + addDummyNode(g, 'edge-proxy', label, '_ep'); + } + }); +} + +function assignRankMinMax(g) { + var maxRank = 0; + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.borderTop) { + node.minRank = g.node(node.borderTop).rank; + node.maxRank = g.node(node.borderBottom).rank; + // @ts-expect-error + maxRank = lodash_es_max(maxRank, node.maxRank); + } + }); + g.graph().maxRank = maxRank; +} + +function removeEdgeLabelProxies(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'edge-proxy') { + g.edge(node.e).labelRank = node.rank; + g.removeNode(v); + } + }); +} + +function translateGraph(g) { + var minX = Number.POSITIVE_INFINITY; + var maxX = 0; + var minY = Number.POSITIVE_INFINITY; + var maxY = 0; + var graphLabel = g.graph(); + var marginX = graphLabel.marginx || 0; + var marginY = graphLabel.marginy || 0; + + function getExtremes(attrs) { + var x = attrs.x; + var y = attrs.y; + var w = attrs.width; + var h = attrs.height; + minX = Math.min(minX, x - w / 2); + maxX = Math.max(maxX, x + w / 2); + minY = Math.min(minY, y - h / 2); + maxY = Math.max(maxY, y + h / 2); + } + + forEach/* default */.A(g.nodes(), function (v) { + getExtremes(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + getExtremes(edge); + } + }); + + minX -= marginX; + minY -= marginY; + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + node.x -= minX; + node.y -= minY; + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, function (p) { + p.x -= minX; + p.y -= minY; + }); + if (has/* default */.A(edge, 'x')) { + edge.x -= minX; + } + if (has/* default */.A(edge, 'y')) { + edge.y -= minY; + } + }); + + graphLabel.width = maxX - minX + marginX; + graphLabel.height = maxY - minY + marginY; +} + +function assignNodeIntersects(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + var nodeV = g.node(e.v); + var nodeW = g.node(e.w); + var p1, p2; + if (!edge.points) { + edge.points = []; + p1 = nodeW; + p2 = nodeV; + } else { + p1 = edge.points[0]; + p2 = edge.points[edge.points.length - 1]; + } + edge.points.unshift(intersectRect(nodeV, p1)); + edge.points.push(intersectRect(nodeW, p2)); + }); +} + +function fixupEdgeLabelCoords(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + if (edge.labelpos === 'l' || edge.labelpos === 'r') { + edge.width -= edge.labeloffset; + } + switch (edge.labelpos) { + case 'l': + edge.x -= edge.width / 2 + edge.labeloffset; + break; + case 'r': + edge.x += edge.width / 2 + edge.labeloffset; + break; + } + } + }); +} + +function reversePointsForReversedEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.reversed) { + edge.points.reverse(); + } + }); +} + +function removeBorderNodes(g) { + forEach/* default */.A(g.nodes(), function (v) { + if (g.children(v).length) { + var node = g.node(v); + var t = g.node(node.borderTop); + var b = g.node(node.borderBottom); + var l = g.node(lodash_es_last(node.borderLeft)); + var r = g.node(lodash_es_last(node.borderRight)); + + node.width = Math.abs(r.x - l.x); + node.height = Math.abs(b.y - t.y); + node.x = l.x + node.width / 2; + node.y = t.y + node.height / 2; + } + }); + + forEach/* default */.A(g.nodes(), function (v) { + if (g.node(v).dummy === 'border') { + g.removeNode(v); + } + }); +} + +function removeSelfEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + if (e.v === e.w) { + var node = g.node(e.v); + if (!node.selfEdges) { + node.selfEdges = []; + } + node.selfEdges.push({ e: e, label: g.edge(e) }); + g.removeEdge(e); + } + }); +} + +function insertSelfEdges(g) { + var layers = buildLayerMatrix(g); + forEach/* default */.A(layers, function (layer) { + var orderShift = 0; + forEach/* default */.A(layer, function (v, i) { + var node = g.node(v); + node.order = i + orderShift; + forEach/* default */.A(node.selfEdges, function (selfEdge) { + addDummyNode( + g, + 'selfedge', + { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node.rank, + order: i + ++orderShift, + e: selfEdge.e, + label: selfEdge.label, + }, + '_se' + ); + }); + delete node.selfEdges; + }); + }); +} + +function positionSelfEdges(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'selfedge') { + var selfNode = g.node(node.e.v); + var x = selfNode.x + selfNode.width / 2; + var y = selfNode.y; + var dx = node.x - x; + var dy = selfNode.height / 2; + g.setEdge(node.e, node.label); + g.removeNode(v); + node.label.points = [ + { x: x + (2 * dx) / 3, y: y - dy }, + { x: x + (5 * dx) / 6, y: y - dy }, + { x: x + dx, y: y }, + { x: x + (5 * dx) / 6, y: y + dy }, + { x: x + (2 * dx) / 3, y: y + dy }, + ]; + node.label.x = node.x; + node.label.y = node.y; + } + }); +} + +function selectNumberAttrs(obj, attrs) { + return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); +} + +function canonicalize(attrs) { + var newAttrs = {}; + forEach/* default */.A(attrs, function (v, k) { + newAttrs[k.toLowerCase()] = v; + }); + return newAttrs; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + + + + + + + + +/***/ }), + +/***/ 3046: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + T: () => (/* binding */ Graph) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js +var isFunction = __webpack_require__(9610); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js +var isEmpty = __webpack_require__(6401); +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/* harmony default export */ const _baseIsNaN = (baseIsNaN); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/* harmony default export */ const _strictIndexOf = (strictIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js + + + + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? _strictIndexOf(array, value, fromIndex) + : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); +} + +/* harmony default export */ const _baseIndexOf = (baseIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js + + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && _baseIndexOf(array, value, 0) > -1; +} + +/* harmony default export */ const _arrayIncludes = (arrayIncludes); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js +var _Set = __webpack_require__(9857); +;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +/* harmony default export */ const lodash_es_noop = (noop); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { + return new _Set/* default */.A(values); +}; + +/* harmony default export */ const _createSet = (createSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js + + + + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = _arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = _arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : _createSet(array); + if (set) { + return (0,_setToArray/* default */.A)(set); + } + isCommon = false; + includes = _cacheHas/* default */.A; + seen = new _SetCache/* default */.A; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/* harmony default export */ const _baseUniq = (baseUniq); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js +var isArrayLikeObject = __webpack_require__(3533); +;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js + + + + + +/** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ +var union = (0,_baseRest/* default */.A)(function(arrays) { + return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); +}); + +/* harmony default export */ const lodash_es_union = (union); + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + + +var DEFAULT_EDGE_NAME = '\x00'; +var GRAPH_NODE = '\x00'; +var EDGE_KEY_DELIM = '\x01'; + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. +class Graph { + constructor(opts = {}) { + this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; + this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; + this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; + + // Label for the graph itself + this._label = undefined; + + // Defaults to be set when creating a new node + this._defaultNodeLabelFn = constant/* default */.A(undefined); + + // Defaults to be set when creating a new edge + this._defaultEdgeLabelFn = constant/* default */.A(undefined); + + // v -> label + this._nodes = {}; + + if (this._isCompound) { + // v -> parent + this._parent = {}; + + // v -> children + this._children = {}; + this._children[GRAPH_NODE] = {}; + } + + // v -> edgeObj + this._in = {}; + + // u -> v -> Number + this._preds = {}; + + // v -> edgeObj + this._out = {}; + + // v -> w -> Number + this._sucs = {}; + + // e -> edgeObj + this._edgeObjs = {}; + + // e -> label + this._edgeLabels = {}; + } + /* === Graph functions ========= */ + isDirected() { + return this._isDirected; + } + isMultigraph() { + return this._isMultigraph; + } + isCompound() { + return this._isCompound; + } + setGraph(label) { + this._label = label; + return this; + } + graph() { + return this._label; + } + /* === Node functions ========== */ + setDefaultNodeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; + } + nodeCount() { + return this._nodeCount; + } + nodes() { + return keys/* default */.A(this._nodes); + } + sources() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._in[v]); + }); + } + sinks() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._out[v]); + }); + } + setNodes(vs, value) { + var args = arguments; + var self = this; + forEach/* default */.A(vs, function (v) { + if (args.length > 1) { + self.setNode(v, value); + } else { + self.setNode(v); + } + }); + return this; + } + setNode(v, value) { + if (has/* default */.A(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; + } + return this; + } + + // @ts-expect-error + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; + } + node(v) { + return this._nodes[v]; + } + hasNode(v) { + return has/* default */.A(this._nodes, v); + } + removeNode(v) { + var self = this; + if (has/* default */.A(this._nodes, v)) { + var removeEdge = function (e) { + self.removeEdge(self._edgeObjs[e]); + }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + forEach/* default */.A(this.children(v), function (child) { + self.setParent(child); + }); + delete this._children[v]; + } + forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; + } + setParent(v, parent) { + if (!this._isCompound) { + throw new Error('Cannot set parent in a non-compound graph'); + } + + if (isUndefined/* default */.A(parent)) { + parent = GRAPH_NODE; + } else { + // Coerce parent to string + parent += ''; + for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); + } + } + + this.setNode(parent); + } + + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; + } + _removeFromParentsChildList(v) { + delete this._children[this._parent[v]][v]; + } + parent(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } + } + children(v) { + if (isUndefined/* default */.A(v)) { + v = GRAPH_NODE; + } + + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return keys/* default */.A(children); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } + } + predecessors(v) { + var predsV = this._preds[v]; + if (predsV) { + return keys/* default */.A(predsV); + } + } + successors(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return keys/* default */.A(sucsV); + } + } + neighbors(v) { + var preds = this.predecessors(v); + if (preds) { + return lodash_es_union(preds, this.successors(v)); + } + } + isLeaf(v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; + } + filterNodes(filter) { + // @ts-expect-error + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound, + }); + + copy.setGraph(this.graph()); + + var self = this; + forEach/* default */.A(this._nodes, function (value, v) { + if (filter(v)) { + copy.setNode(v, value); + } + }); + + forEach/* default */.A(this._edgeObjs, function (e) { + // @ts-expect-error + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self.edge(e)); + } + }); + + var parents = {}; + function findParent(v) { + var parent = self.parent(v); + if (parent === undefined || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); + } + } + + if (this._isCompound) { + forEach/* default */.A(copy.nodes(), function (v) { + copy.setParent(v, findParent(v)); + }); + } + + return copy; + } + /* === Edge functions ========== */ + setDefaultEdgeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; + } + edgeCount() { + return this._edgeCount; + } + edges() { + return values/* default */.A(this._edgeObjs); + } + setPath(vs, value) { + var self = this; + var args = arguments; + reduce/* default */.A(vs, function (v, w) { + if (args.length > 1) { + self.setEdge(v, w, value); + } else { + self.setEdge(v, w); + } + return w; + }); + return this; + } + /* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ + setEdge() { + var v, w, name, value; + var valueSpecified = false; + var arg0 = arguments[0]; + + if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; + } + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; + } + } + + v = '' + v; + w = '' + w; + if (!isUndefined/* default */.A(name)) { + name = '' + name; + } + + var e = edgeArgsToId(this._isDirected, v, w, name); + if (has/* default */.A(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; + } + return this; + } + + if (!isUndefined/* default */.A(name) && !this._isMultigraph) { + throw new Error('Cannot set a named edge when isMultigraph = false'); + } + + // It didn't exist, so we need to create it. + // First ensure the nodes exist. + this.setNode(v); + this.setNode(w); + + // @ts-expect-error + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + // Ensure we add undirected edges in a consistent way. + v = edgeObj.v; + w = edgeObj.w; + + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; + } + edge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return this._edgeLabels[e]; + } + hasEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return has/* default */.A(this._edgeLabels, e); + } + removeEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; + } + inEdges(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = values/* default */.A(inV); + if (!u) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.v === u; + }); + } + } + outEdges(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = values/* default */.A(outV); + if (!w) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.w === w; + }); + } + } + nodeEdges(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } + } +} + +/* Number of nodes in the graph. Should only be changed by the implementation. */ +Graph.prototype._nodeCount = 0; + +/* Number of edges in the graph. Should only be changed by the implementation. */ +Graph.prototype._edgeCount = 0; + +function incrementOrInitEntry(map, k) { + if (map[k]) { + map[k]++; + } else { + map[k] = 1; + } +} + +function decrementOrRemoveEntry(map, k) { + if (!--map[k]) { + delete map[k]; + } +} + +function edgeArgsToId(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); +} + +function edgeArgsToObj(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v: v, w: w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; +} + +function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); +} + + +/***/ }), + +/***/ 697: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) +/* harmony export */ }); +/* unused harmony export version */ +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); +// Includes only the "core" of graphlib + + + +const version = '2.1.9-pre'; + + + + +/***/ }), + +/***/ 2062: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _SetCache) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules +var _MapCache = __webpack_require__(9471); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/* harmony default export */ const _setCacheAdd = (setCacheAdd); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ const _setCacheHas = (setCacheHas); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new _MapCache/* default */.A; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; +SetCache.prototype.has = _setCacheHas; + +/* harmony default export */ const _SetCache = (SetCache); + + +/***/ }), + +/***/ 2641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); + + +/***/ }), + +/***/ 2634: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); + + +/***/ }), + +/***/ 5572: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); + + +/***/ }), + +/***/ 6912: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); + + +/***/ }), + +/***/ 1641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseClone) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js +var _arrayEach = __webpack_require__(2641); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js +var _copyObject = __webpack_require__(2031); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js + + + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssign = (baseAssign); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js + + + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssignIn = (baseAssignIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js +var _cloneBuffer = __webpack_require__(154); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js +var _copyArray = __webpack_require__(9759); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js +var _getSymbols = __webpack_require__(4792); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js + + + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); +} + +/* harmony default export */ const _copySymbols = (copySymbols); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js +var _getPrototype = __webpack_require__(5647); +// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js +var stubArray = __webpack_require__(3153); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { + var result = []; + while (object) { + (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); + object = (0,_getPrototype/* default */.A)(object); + } + return result; +}; + +/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js + + + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); +} + +/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js +var _baseGetAllKeys = __webpack_require__(3831); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js + + + + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); +} + +/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/* harmony default export */ const _initCloneArray = (initCloneArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js +var _cloneArrayBuffer = __webpack_require__(565); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js + + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/* harmony default export */ const _cloneDataView = (cloneDataView); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/* harmony default export */ const _cloneRegExp = (cloneRegExp); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js + + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/* harmony default export */ const _cloneSymbol = (cloneSymbol); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js +var _cloneTypedArray = __webpack_require__(1801); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js + + + + + + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return (0,_cloneArrayBuffer/* default */.A)(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return _cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return (0,_cloneTypedArray/* default */.A)(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return _cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return _cloneSymbol(object); + } +} + +/* harmony default export */ const _initCloneByTag = (initCloneByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules +var _initCloneObject = __webpack_require__(8598); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js + + + +/** `Object#toString` result references. */ +var _baseIsMap_mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; +} + +/* harmony default export */ const _baseIsMap = (baseIsMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js +var _nodeUtil = __webpack_require__(4841); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js + + + + +/* Node.js helper references. */ +var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; + +/* harmony default export */ const lodash_es_isMap = (isMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js + + + +/** `Object#toString` result references. */ +var _baseIsSet_setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; +} + +/* harmony default export */ const _baseIsSet = (baseIsSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js + + + + +/* Node.js helper references. */ +var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; + +/* harmony default export */ const lodash_es_isSet = (isSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js + + + + + + + + + + + + + + + + + + + + + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + _baseClone_boolTag = '[object Boolean]', + _baseClone_dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + _baseClone_mapTag = '[object Map]', + _baseClone_numberTag = '[object Number]', + objectTag = '[object Object]', + _baseClone_regexpTag = '[object RegExp]', + _baseClone_setTag = '[object Set]', + _baseClone_stringTag = '[object String]', + _baseClone_symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var _baseClone_arrayBufferTag = '[object ArrayBuffer]', + _baseClone_dataViewTag = '[object DataView]', + _baseClone_float32Tag = '[object Float32Array]', + _baseClone_float64Tag = '[object Float64Array]', + _baseClone_int8Tag = '[object Int8Array]', + _baseClone_int16Tag = '[object Int16Array]', + _baseClone_int32Tag = '[object Int32Array]', + _baseClone_uint8Tag = '[object Uint8Array]', + _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', + _baseClone_uint16Tag = '[object Uint16Array]', + _baseClone_uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = +cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = +cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = +cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = +cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = +cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = +cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = +cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = +cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = +cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!(0,isObject/* default */.A)(value)) { + return value; + } + var isArr = (0,isArray/* default */.A)(value); + if (isArr) { + result = _initCloneArray(value); + if (!isDeep) { + return (0,_copyArray/* default */.A)(value, result); + } + } else { + var tag = (0,_getTag/* default */.A)(value), + isFunc = tag == funcTag || tag == genTag; + + if ((0,isBuffer/* default */.A)(value)) { + return (0,_cloneBuffer/* default */.A)(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); + if (!isDeep) { + return isFlat + ? _copySymbolsIn(value, _baseAssignIn(result, value)) + : _copySymbols(value, _baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = _initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new _Stack/* default */.A); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (lodash_es_isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (lodash_es_isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) + : (isFlat ? keysIn/* default */.A : keys/* default */.A); + + var props = isArr ? undefined : keysFunc(value); + (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +/* harmony default export */ const _baseClone = (baseClone); + + +/***/ }), + +/***/ 6240: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseEach) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js + + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!(0,isArrayLike/* default */.A)(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +/* harmony default export */ const _createBaseEach = (createBaseEach); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js + + + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = _createBaseEach(_baseForOwn/* default */.A); + +/* harmony default export */ const _baseEach = (baseEach); + + +/***/ }), + +/***/ 5707: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); + + +/***/ }), + +/***/ 3588: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseFlatten) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules +var isArguments = __webpack_require__(2274); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js + + + + +/** Built-in value references. */ +var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/* harmony default export */ const _isFlattenable = (isFlattenable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js + + + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = _isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + (0,_arrayPush/* default */.A)(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/* harmony default export */ const _baseFlatten = (baseFlatten); + + +/***/ }), + +/***/ 9841: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); + + +/***/ }), + +/***/ 6318: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); + + +/***/ }), + +/***/ 3831: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6912); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); + + +/***/ }), + +/***/ 9574: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseIteratee) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arraySome = (arraySome); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!_arraySome(other, function(othValue, othIndex) { + if (!(0,_cacheHas/* default */.A)(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalArrays = (equalArrays); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js +var _Uint8Array = __webpack_require__(3988); +// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js +var eq = __webpack_require__(6984); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ const _mapToArray = (mapToArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _equalByTag_COMPARE_PARTIAL_FLAG = 1, + _equalByTag_COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return (0,eq/* default */.A)(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = _mapToArray; + + case setTag: + var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; + convert || (convert = _setToArray/* default */.A); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ const _equalByTag = (equalByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js + + +/** Used to compose bitmasks for value comparisons. */ +var _equalObjects_COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, + objProps = (0,_getAllKeys/* default */.A)(object), + objLength = objProps.length, + othProps = (0,_getAllKeys/* default */.A)(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalObjects = (equalObjects); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules +var isTypedArray = __webpack_require__(3858); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var _baseIsEqualDeep_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = (0,isArray/* default */.A)(object), + othIsArr = (0,isArray/* default */.A)(other), + objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), + othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && (0,isBuffer/* default */.A)(object)) { + if (!(0,isBuffer/* default */.A)(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new _Stack/* default */.A); + return (objIsArr || (0,isTypedArray/* default */.A)(object)) + ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new _Stack/* default */.A); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new _Stack/* default */.A); + return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { + return value !== value && other !== other; + } + return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ const _baseIsEqual = (baseIsEqual); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, + _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new _Stack/* default */.A; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ const _baseIsMatch = (baseIsMatch); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !(0,isObject/* default */.A)(value); +} + +/* harmony default export */ const _isStrictComparable = (isStrictComparable); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = (0,keys/* default */.A)(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, _isStrictComparable(value)]; + } + return result; +} + +/* harmony default export */ const _getMatchData = (getMatchData); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = _getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return _matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || _baseIsMatch(object, source, matchData); + }; +} + +/* harmony default export */ const _baseMatches = (baseMatches); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ const lodash_es_get = (get); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, + _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { + return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); + } + return function(object) { + var objValue = lodash_es_get(object, path); + return (objValue === undefined && objValue === srcValue) + ? (0,hasIn/* default */.A)(object, path) + : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return (0,_baseGet/* default */.A)(object, path); + }; +} + +/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); +} + +/* harmony default export */ const lodash_es_property = (property); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity/* default */.A; + } + if (typeof value == 'object') { + return (0,isArray/* default */.A)(value) + ? _baseMatchesProperty(value[0], value[1]) + : _baseMatches(value); + } + return lodash_es_property(value); +} + +/* harmony default export */ const _baseIteratee = (baseIteratee); + + +/***/ }), + +/***/ 2568: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; + + (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); + + +/***/ }), + +/***/ 805: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); + + +/***/ }), + +/***/ 4099: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); + + +/***/ }), + +/***/ 9922: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9008); + + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); + + +/***/ }), + +/***/ 7819: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _castPath) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js +var memoize = __webpack_require__(6632); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = (0,memoize/* default */.A)(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ const _memoizeCapped = (memoizeCapped); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js + + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = _memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ const _stringToPath = (stringToPath); + +// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules +var lodash_es_toString = __webpack_require__(8894); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if ((0,isArray/* default */.A)(value)) { + return value; + } + return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); +} + +/* harmony default export */ const _castPath = (castPath); + + +/***/ }), + +/***/ 9042: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3831); +/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4792); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); + + +/***/ }), + +/***/ 4792: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); +/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3153); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); + + +/***/ }), + +/***/ 5054: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2274); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2049); +/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5353); +/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && + ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); + + +/***/ }), + +/***/ 6586: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1882); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); + + +/***/ }), + +/***/ 9959: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); + + +/***/ }), + +/***/ 3282: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1882); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); + + +/***/ }), + +/***/ 3068: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4326); +/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6984); +/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); +/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5615); + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); + + +/***/ }), + +/***/ 1662: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_filter) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js +var _arrayFilter = __webpack_require__(2634); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js + + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + (0,_baseEach/* default */.A)(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +/* harmony default export */ const _baseFilter = (baseFilter); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js + + + + + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ +function filter(collection, predicate) { + var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; + return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); +} + +/* harmony default export */ const lodash_es_filter = (filter); + + +/***/ }), + +/***/ 4098: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3588); + + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); + + +/***/ }), + +/***/ 8058: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2641); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); +/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9922); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); + + +/***/ }), + +/***/ 8585: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_has) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && _baseHas_hasOwnProperty.call(object, key); +} + +/* harmony default export */ const _baseHas = (baseHas); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js + + + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); +} + +/* harmony default export */ const lodash_es_has = (has); + + +/***/ }), + +/***/ 9188: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_hasIn) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ const _baseHasIn = (baseHasIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); +} + +/* harmony default export */ const lodash_es_hasIn = (hasIn); + + +/***/ }), + +/***/ 1882: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8496); +/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3098); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); + + +/***/ }), + +/***/ 9592: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); + + +/***/ }), + +/***/ 2184: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3607); +/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1852); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); + + +/***/ }), + +/***/ 4722: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5572); +/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9574); +/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2568); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); + + +/***/ }), + +/***/ 1942: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_pick) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules +var _castPath = __webpack_require__(7819); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js +var _isIndex = __webpack_require__(5353); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js + + + + + + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!(0,isObject/* default */.A)(object)) { + return object; + } + path = (0,_castPath/* default */.A)(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = (0,_toKey/* default */.A)(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = (0,isObject/* default */.A)(objValue) + ? objValue + : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); + } + } + (0,_assignValue/* default */.A)(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/* harmony default export */ const _baseSet = (baseSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js + + + + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = (0,_baseGet/* default */.A)(object, path); + + if (predicate(value, path)) { + _baseSet(result, (0,_castPath/* default */.A)(path, object), value); + } + } + return result; +} + +/* harmony default export */ const _basePickBy = (basePickBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js + + + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return _basePickBy(object, paths, function(value, path) { + return (0,hasIn/* default */.A)(object, path); + }); +} + +/* harmony default export */ const _basePick = (basePick); + +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules +var _overRest = __webpack_require__(6875); +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules +var _setToString = __webpack_require__(7525); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js + + + + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); +} + +/* harmony default export */ const _flatRest = (flatRest); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js + + + +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = _flatRest(function(object, paths) { + return object == null ? {} : _basePick(object, paths); +}); + +/* harmony default export */ const lodash_es_pick = (pick); + + +/***/ }), + +/***/ 1395: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_range) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +/* harmony default export */ const _baseRange = (baseRange); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js + + + + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = (0,toFinite/* default */.A)(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = (0,toFinite/* default */.A)(end); + } + step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); + return _baseRange(start, end, step, fromRight); + }; +} + +/* harmony default export */ const _createRange = (createRange); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js + + +/** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ +var range = _createRange(); + +/* harmony default export */ const lodash_es_range = (range); + + +/***/ }), + +/***/ 9463: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_reduce) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/* harmony default export */ const _arrayReduce = (arrayReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +/* harmony default export */ const _baseReduce = (baseReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js + + + + + + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ +function reduce(collection, iteratee, accumulator) { + var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, + initAccum = arguments.length < 3; + + return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); +} + +/* harmony default export */ const lodash_es_reduce = (reduce); + + +/***/ }), + +/***/ 3153: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); + + +/***/ }), + +/***/ 4342: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toFinite) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js +/** Used to match a single whitespace character. */ +var reWhitespace = /\s/; + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ +function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; +} + +/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js + + +/** Used to match leading whitespace. */ +var reTrimStart = /^\s+/; + +/** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ +function baseTrim(string) { + return string + ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; +} + +/* harmony default export */ const _baseTrim = (baseTrim); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js + + + + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if ((0,isSymbol/* default */.A)(value)) { + return NAN; + } + if ((0,isObject/* default */.A)(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = (0,isObject/* default */.A)(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = _baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +/* harmony default export */ const lodash_es_toNumber = (toNumber); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = lodash_es_toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +/* harmony default export */ const lodash_es_toFinite = (toFinite); + + +/***/ }), + +/***/ 8894: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toString) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if ((0,isArray/* default */.A)(value)) { + // Recursively convert values (susceptible to call stack limits). + return (0,_arrayMap/* default */.A)(value, baseToString) + ''; + } + if ((0,isSymbol/* default */.A)(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const _baseToString = (baseToString); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString_toString(value) { + return value == null ? '' : _baseToString(value); +} + +/* harmony default export */ const lodash_es_toString = (toString_toString); + + +/***/ }), + +/***/ 5664: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8894); + + +/** Used to generate unique IDs. */ +var idCounter = 0; + +/** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ +function uniqueId(prefix) { + var id = ++idCounter; + return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); + + +/***/ }), + +/***/ 8207: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_values) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js + + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return (0,_arrayMap/* default */.A)(props, function(key) { + return object[key]; + }); +} + +/* harmony default export */ const _baseValues = (baseValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js + + + +/** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ +function values(object) { + return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); +} + +/* harmony default export */ const lodash_es_values = (values); + + +/***/ }), + +/***/ 9001: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + diagram: () => (/* binding */ diagram) +}); + +// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-f47111a7.js + 8 modules +var mermaid_f47111a7 = __webpack_require__(6257); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js +var graphlib = __webpack_require__(697); +// EXTERNAL MODULE: ./node_modules/d3/src/index.js + 197 modules +var src = __webpack_require__(6312); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + 64 modules +var dagre = __webpack_require__(1176); +;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/stringify.js + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).slice(1)); +} + +function unsafeStringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; +} + +function stringify(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!validate(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +/* harmony default export */ const esm_node_stringify = ((/* unused pure expression or super */ null && (stringify))); +;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/regex.js +/* harmony default export */ const regex = (/^(?:[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); +;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/validate.js + + +function validate_validate(uuid) { + return typeof uuid === 'string' && regex.test(uuid); +} + +/* harmony default export */ const esm_node_validate = (validate_validate); +;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/parse.js + + +function parse(uuid) { + if (!esm_node_validate(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +/* harmony default export */ const esm_node_parse = (parse); +;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/v35.js + + + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = esm_node_parse(namespace); + } + + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return unsafeStringify(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} +// EXTERNAL MODULE: external "crypto" +var external_crypto_ = __webpack_require__(6982); +var external_crypto_default = /*#__PURE__*/__webpack_require__.n(external_crypto_); +;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/sha1.js + + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return external_crypto_default().createHash('sha1').update(bytes).digest(); +} + +/* harmony default export */ const esm_node_sha1 = (sha1); +;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/v5.js + + +const v5 = v35('v5', 0x50, esm_node_sha1); +/* harmony default export */ const esm_node_v5 = (v5); +// EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js +var dayjs_min = __webpack_require__(4353); +// EXTERNAL MODULE: ./node_modules/@braintree/sanitize-url/dist/index.js +var dist = __webpack_require__(6750); +// EXTERNAL MODULE: ./node_modules/dompurify/dist/purify.es.mjs +var purify_es = __webpack_require__(9418); +;// CONCATENATED MODULE: ./node_modules/mermaid/dist/erDiagram-47591fe2.js + + + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 20, 22, 24, 26, 27, 28], $V1 = [1, 10], $V2 = [1, 11], $V3 = [1, 12], $V4 = [1, 13], $V5 = [1, 14], $V6 = [1, 15], $V7 = [1, 21], $V8 = [1, 22], $V9 = [1, 23], $Va = [1, 24], $Vb = [1, 25], $Vc = [6, 8, 10, 13, 15, 18, 19, 20, 22, 24, 26, 27, 28, 41, 42, 43, 44, 45], $Vd = [1, 34], $Ve = [27, 28, 46, 47], $Vf = [41, 42, 43, 44, 45], $Vg = [17, 34], $Vh = [1, 54], $Vi = [1, 53], $Vj = [17, 34, 36, 38]; + var parser2 = { + trace: function trace() { + }, + 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 anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + break; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.addEntity($$[$0 - 4]); + yy.addEntity($$[$0 - 2]); + yy.addRelationship($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 3]); + break; + case 9: + yy.addEntity($$[$0 - 3]); + yy.addAttributes($$[$0 - 3], $$[$0 - 1]); + break; + case 10: + yy.addEntity($$[$0 - 2]); + break; + case 11: + yy.addEntity($$[$0]); + break; + case 12: + yy.addEntity($$[$0 - 6], $$[$0 - 4]); + yy.addAttributes($$[$0 - 6], $$[$0 - 1]); + break; + case 13: + yy.addEntity($$[$0 - 5], $$[$0 - 3]); + break; + case 14: + yy.addEntity($$[$0 - 3], $$[$0 - 1]); + break; + case 15: + case 16: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 17: + case 18: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 19: + case 43: + this.$ = $$[$0]; + break; + case 20: + case 41: + case 42: + this.$ = $$[$0].replace(/"/g, ""); + break; + case 21: + case 29: + this.$ = [$$[$0]]; + break; + case 22: + $$[$0].push($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 23: + this.$ = { attributeType: $$[$0 - 1], attributeName: $$[$0] }; + break; + case 24: + this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeKeyTypeList: $$[$0] }; + break; + case 25: + this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeComment: $$[$0] }; + break; + case 26: + this.$ = { attributeType: $$[$0 - 3], attributeName: $$[$0 - 2], attributeKeyTypeList: $$[$0 - 1], attributeComment: $$[$0] }; + break; + case 27: + case 28: + case 31: + this.$ = $$[$0]; + break; + case 30: + $$[$0 - 2].push($$[$0]); + this.$ = $$[$0 - 2]; + break; + case 32: + this.$ = $$[$0].replace(/"/g, ""); + break; + case 33: + this.$ = { cardA: $$[$0], relType: $$[$0 - 1], cardB: $$[$0 - 2] }; + break; + case 34: + this.$ = yy.Cardinality.ZERO_OR_ONE; + break; + case 35: + this.$ = yy.Cardinality.ZERO_OR_MORE; + break; + case 36: + this.$ = yy.Cardinality.ONE_OR_MORE; + break; + case 37: + this.$ = yy.Cardinality.ONLY_ONE; + break; + case 38: + this.$ = yy.Cardinality.MD_PARENT; + break; + case 39: + this.$ = yy.Identification.NON_IDENTIFYING; + break; + case 40: + this.$ = yy.Identification.IDENTIFYING; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 20: $V1, 22: $V2, 24: $V3, 26: $V4, 27: $V5, 28: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 16, 11: 9, 20: $V1, 22: $V2, 24: $V3, 26: $V4, 27: $V5, 28: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 11], { 12: 17, 39: 20, 15: [1, 18], 18: [1, 19], 41: $V7, 42: $V8, 43: $V9, 44: $Va, 45: $Vb }), { 21: [1, 26] }, { 23: [1, 27] }, { 25: [1, 28] }, o($V0, [2, 18]), o($Vc, [2, 19]), o($Vc, [2, 20]), o($V0, [2, 4]), { 11: 29, 27: $V5, 28: $V6 }, { 16: 30, 17: [1, 31], 29: 32, 30: 33, 34: $Vd }, { 11: 35, 27: $V5, 28: $V6 }, { 40: 36, 46: [1, 37], 47: [1, 38] }, o($Ve, [2, 34]), o($Ve, [2, 35]), o($Ve, [2, 36]), o($Ve, [2, 37]), o($Ve, [2, 38]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), { 13: [1, 39] }, { 17: [1, 40] }, o($V0, [2, 10]), { 16: 41, 17: [2, 21], 29: 32, 30: 33, 34: $Vd }, { 31: 42, 34: [1, 43] }, { 34: [2, 27] }, { 19: [1, 44] }, { 39: 45, 41: $V7, 42: $V8, 43: $V9, 44: $Va, 45: $Vb }, o($Vf, [2, 39]), o($Vf, [2, 40]), { 14: 46, 27: [1, 49], 28: [1, 48], 48: [1, 47] }, o($V0, [2, 9]), { 17: [2, 22] }, o($Vg, [2, 23], { 32: 50, 33: 51, 35: 52, 37: $Vh, 38: $Vi }), o([17, 34, 37, 38], [2, 28]), o($V0, [2, 14], { 15: [1, 55] }), o([27, 28], [2, 33]), o($V0, [2, 8]), o($V0, [2, 41]), o($V0, [2, 42]), o($V0, [2, 43]), o($Vg, [2, 24], { 33: 56, 36: [1, 57], 38: $Vi }), o($Vg, [2, 25]), o($Vj, [2, 29]), o($Vg, [2, 32]), o($Vj, [2, 31]), { 16: 58, 17: [1, 59], 29: 32, 30: 33, 34: $Vd }, o($Vg, [2, 26]), { 35: 60, 37: $Vh }, { 17: [1, 61] }, o($V0, [2, 13]), o($Vj, [2, 30]), o($V0, [2, 12])], + defaultActions: { 34: [2, 27], 41: [2, 22] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 22; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 24; + case 3: + this.popState(); + return "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: + this.begin("block"); + return 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: + this.popState(); + return 17; + case 22: + return yy_.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 yy_.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": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "block": { "rules": [14, 15, 16, 17, 18, 19, 20, 21, 22], "inclusive": false }, "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": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const erParser = parser; +let entities = {}; +let relationships = []; +const Cardinality = { + 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" +}; +const Identification = { + NON_IDENTIFYING: "NON_IDENTIFYING", + IDENTIFYING: "IDENTIFYING" +}; +const addEntity = function(name, alias = void 0) { + if (entities[name] === void 0) { + entities[name] = { attributes: [], alias }; + mermaid_f47111a7.l.info("Added new entity :", name); + } else if (entities[name] && !entities[name].alias && alias) { + entities[name].alias = alias; + mermaid_f47111a7.l.info(`Add alias '${alias}' to entity '${name}'`); + } + return entities[name]; +}; +const getEntities = () => entities; +const addAttributes = function(entityName, attribs) { + let entity = addEntity(entityName); + let i; + for (i = attribs.length - 1; i >= 0; i--) { + entity.attributes.push(attribs[i]); + mermaid_f47111a7.l.debug("Added attribute ", attribs[i].attributeName); + } +}; +const addRelationship = function(entA, rolA, entB, rSpec) { + let rel = { + entityA: entA, + roleA: rolA, + entityB: entB, + relSpec: rSpec + }; + relationships.push(rel); + mermaid_f47111a7.l.debug("Added new relationship :", rel); +}; +const getRelationships = () => relationships; +const clear = function() { + entities = {}; + relationships = []; + (0,mermaid_f47111a7.v)(); +}; +const erDb = { + Cardinality, + Identification, + getConfig: () => (0,mermaid_f47111a7.c)().er, + addEntity, + addAttributes, + getEntities, + addRelationship, + getRelationships, + clear, + setAccTitle: mermaid_f47111a7.s, + getAccTitle: mermaid_f47111a7.g, + setAccDescription: mermaid_f47111a7.b, + getAccDescription: mermaid_f47111a7.a, + setDiagramTitle: mermaid_f47111a7.q, + getDiagramTitle: mermaid_f47111a7.t +}; +const ERMarkers = { + 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" +}; +const insertMarkers = function(elem, conf2) { + let marker; + elem.append("defs").append("marker").attr("id", ERMarkers.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"); + elem.append("defs").append("marker").attr("id", ERMarkers.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"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONLY_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M9,0 L9,18 M15,0 L15,18"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONLY_ONE_END).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M3,0 L3,18 M9,0 L9,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M9,0 L9,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_ONE_END).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M21,0 L21,18"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONE_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"); + elem.append("defs").append("marker").attr("id", ERMarkers.ONE_OR_MORE_END).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18"); + marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_MORE_END).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"); + marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6); + marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18"); + return; +}; +const erMarkers = { + ERMarkers, + insertMarkers +}; +const BAD_ID_CHARS_REGEXP = /[^\dA-Za-z](\W)*/g; +let conf = {}; +let entityNameIds = /* @__PURE__ */ new Map(); +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + conf[key] = cnf[key]; + } +}; +const drawAttributes = (groupNode, entityTextNode, attributes) => { + const heightPadding = conf.entityPadding / 3; + const widthPadding = conf.entityPadding / 3; + const attrFontSize = conf.fontSize * 0.85; + const labelBBox = entityTextNode.node().getBBox(); + const attributeNodes = []; + let hasKeyType = false; + let hasComment = false; + let maxTypeWidth = 0; + let maxNameWidth = 0; + let maxKeyWidth = 0; + let maxCommentWidth = 0; + let cumulativeHeight = labelBBox.height + heightPadding * 2; + let attrNum = 1; + attributes.forEach((item) => { + if (item.attributeKeyTypeList !== void 0 && item.attributeKeyTypeList.length > 0) { + hasKeyType = true; + } + if (item.attributeComment !== void 0) { + hasComment = true; + } + }); + attributes.forEach((item) => { + const attrPrefix = `${entityTextNode.node().id}-attr-${attrNum}`; + let nodeHeight = 0; + const attributeType = (0,mermaid_f47111a7.x)(item.attributeType); + const typeNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-type`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", (0,mermaid_f47111a7.c)().fontFamily).style("font-size", attrFontSize + "px").text(attributeType); + const nameNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-name`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", (0,mermaid_f47111a7.c)().fontFamily).style("font-size", attrFontSize + "px").text(item.attributeName); + const attributeNode = {}; + attributeNode.tn = typeNode; + attributeNode.nn = nameNode; + const typeBBox = typeNode.node().getBBox(); + const nameBBox = nameNode.node().getBBox(); + maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width); + maxNameWidth = Math.max(maxNameWidth, nameBBox.width); + nodeHeight = Math.max(typeBBox.height, nameBBox.height); + if (hasKeyType) { + const keyTypeNodeText = item.attributeKeyTypeList !== void 0 ? item.attributeKeyTypeList.join(",") : ""; + const keyTypeNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-key`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", (0,mermaid_f47111a7.c)().fontFamily).style("font-size", attrFontSize + "px").text(keyTypeNodeText); + attributeNode.kn = keyTypeNode; + const keyTypeBBox = keyTypeNode.node().getBBox(); + maxKeyWidth = Math.max(maxKeyWidth, keyTypeBBox.width); + nodeHeight = Math.max(nodeHeight, keyTypeBBox.height); + } + if (hasComment) { + const commentNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-comment`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", (0,mermaid_f47111a7.c)().fontFamily).style("font-size", attrFontSize + "px").text(item.attributeComment || ""); + attributeNode.cn = commentNode; + const commentNodeBBox = commentNode.node().getBBox(); + maxCommentWidth = Math.max(maxCommentWidth, commentNodeBBox.width); + nodeHeight = Math.max(nodeHeight, commentNodeBBox.height); + } + attributeNode.height = nodeHeight; + attributeNodes.push(attributeNode); + cumulativeHeight += nodeHeight + heightPadding * 2; + attrNum += 1; + }); + let widthPaddingFactor = 4; + if (hasKeyType) { + widthPaddingFactor += 2; + } + if (hasComment) { + widthPaddingFactor += 2; + } + const maxWidth = maxTypeWidth + maxNameWidth + maxKeyWidth + maxCommentWidth; + const bBox = { + width: Math.max( + conf.minEntityWidth, + Math.max( + labelBBox.width + conf.entityPadding * 2, + maxWidth + widthPadding * widthPaddingFactor + ) + ), + height: attributes.length > 0 ? cumulativeHeight : Math.max(conf.minEntityHeight, labelBBox.height + conf.entityPadding * 2) + }; + if (attributes.length > 0) { + const spareColumnWidth = Math.max( + 0, + (bBox.width - maxWidth - widthPadding * widthPaddingFactor) / (widthPaddingFactor / 2) + ); + entityTextNode.attr( + "transform", + "translate(" + bBox.width / 2 + "," + (heightPadding + labelBBox.height / 2) + ")" + ); + let heightOffset = labelBBox.height + heightPadding * 2; + let attribStyle = "attributeBoxOdd"; + attributeNodes.forEach((attributeNode) => { + const alignY = heightOffset + heightPadding + attributeNode.height / 2; + attributeNode.tn.attr("transform", "translate(" + widthPadding + "," + alignY + ")"); + const typeRect = groupNode.insert("rect", "#" + attributeNode.tn.node().id).classed(`er ${attribStyle}`, true).attr("x", 0).attr("y", heightOffset).attr("width", maxTypeWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + const nameXOffset = parseFloat(typeRect.attr("x")) + parseFloat(typeRect.attr("width")); + attributeNode.nn.attr( + "transform", + "translate(" + (nameXOffset + widthPadding) + "," + alignY + ")" + ); + const nameRect = groupNode.insert("rect", "#" + attributeNode.nn.node().id).classed(`er ${attribStyle}`, true).attr("x", nameXOffset).attr("y", heightOffset).attr("width", maxNameWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + let keyTypeAndCommentXOffset = parseFloat(nameRect.attr("x")) + parseFloat(nameRect.attr("width")); + if (hasKeyType) { + attributeNode.kn.attr( + "transform", + "translate(" + (keyTypeAndCommentXOffset + widthPadding) + "," + alignY + ")" + ); + const keyTypeRect = groupNode.insert("rect", "#" + attributeNode.kn.node().id).classed(`er ${attribStyle}`, true).attr("x", keyTypeAndCommentXOffset).attr("y", heightOffset).attr("width", maxKeyWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + keyTypeAndCommentXOffset = parseFloat(keyTypeRect.attr("x")) + parseFloat(keyTypeRect.attr("width")); + } + if (hasComment) { + attributeNode.cn.attr( + "transform", + "translate(" + (keyTypeAndCommentXOffset + widthPadding) + "," + alignY + ")" + ); + groupNode.insert("rect", "#" + attributeNode.cn.node().id).classed(`er ${attribStyle}`, "true").attr("x", keyTypeAndCommentXOffset).attr("y", heightOffset).attr("width", maxCommentWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2); + } + heightOffset += attributeNode.height + heightPadding * 2; + attribStyle = attribStyle === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd"; + }); + } else { + bBox.height = Math.max(conf.minEntityHeight, cumulativeHeight); + entityTextNode.attr("transform", "translate(" + bBox.width / 2 + "," + bBox.height / 2 + ")"); + } + return bBox; +}; +const drawEntities = function(svgNode, entities2, graph) { + const keys = Object.keys(entities2); + let firstOne; + keys.forEach(function(entityName) { + const entityId = generateId(entityName, "entity"); + entityNameIds.set(entityName, entityId); + const groupNode = svgNode.append("g").attr("id", entityId); + firstOne = firstOne === void 0 ? entityId : firstOne; + const textId = "text-" + entityId; + const textNode = groupNode.append("text").classed("er entityLabel", true).attr("id", textId).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "middle").style("font-family", (0,mermaid_f47111a7.c)().fontFamily).style("font-size", conf.fontSize + "px").text(entities2[entityName].alias ?? entityName); + const { width: entityWidth, height: entityHeight } = drawAttributes( + groupNode, + textNode, + entities2[entityName].attributes + ); + const rectNode = groupNode.insert("rect", "#" + textId).classed("er entityBox", true).attr("x", 0).attr("y", 0).attr("width", entityWidth).attr("height", entityHeight); + const rectBBox = rectNode.node().getBBox(); + graph.setNode(entityId, { + width: rectBBox.width, + height: rectBBox.height, + shape: "rect", + id: entityId + }); + }); + return firstOne; +}; +const adjustEntities = function(svgNode, graph) { + graph.nodes().forEach(function(v) { + if (v !== void 0 && graph.node(v) !== void 0) { + svgNode.select("#" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )" + ); + } + }); +}; +const getEdgeName = function(rel) { + return (rel.entityA + rel.roleA + rel.entityB).replace(/\s/g, ""); +}; +const addRelationships = function(relationships2, g) { + relationships2.forEach(function(r) { + g.setEdge( + entityNameIds.get(r.entityA), + entityNameIds.get(r.entityB), + { relationship: r }, + getEdgeName(r) + ); + }); + return relationships2; +}; +let relCnt = 0; +const drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) { + relCnt++; + const edge = g.edge( + entityNameIds.get(rel.entityA), + entityNameIds.get(rel.entityB), + getEdgeName(rel) + ); + const lineFunction = (0,src/* line */.n8j)().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }).curve(src/* curveBasis */.qrM); + const svgPath = svg.insert("path", "#" + insert).classed("er relationshipLine", true).attr("d", lineFunction(edge.points)).style("stroke", conf.stroke).style("fill", "none"); + if (rel.relSpec.relType === diagObj.db.Identification.NON_IDENTIFYING) { + svgPath.attr("stroke-dasharray", "8,8"); + } + let url = ""; + if (conf.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + switch (rel.relSpec.cardA) { + case diagObj.db.Cardinality.ZERO_OR_ONE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_ONE_END + ")"); + break; + case diagObj.db.Cardinality.ZERO_OR_MORE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_MORE_END + ")"); + break; + case diagObj.db.Cardinality.ONE_OR_MORE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ONE_OR_MORE_END + ")"); + break; + case diagObj.db.Cardinality.ONLY_ONE: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.ONLY_ONE_END + ")"); + break; + case diagObj.db.Cardinality.MD_PARENT: + svgPath.attr("marker-end", "url(" + url + "#" + erMarkers.ERMarkers.MD_PARENT_END + ")"); + break; + } + switch (rel.relSpec.cardB) { + case diagObj.db.Cardinality.ZERO_OR_ONE: + svgPath.attr( + "marker-start", + "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_ONE_START + ")" + ); + break; + case diagObj.db.Cardinality.ZERO_OR_MORE: + svgPath.attr( + "marker-start", + "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_MORE_START + ")" + ); + break; + case diagObj.db.Cardinality.ONE_OR_MORE: + svgPath.attr( + "marker-start", + "url(" + url + "#" + erMarkers.ERMarkers.ONE_OR_MORE_START + ")" + ); + break; + case diagObj.db.Cardinality.ONLY_ONE: + svgPath.attr("marker-start", "url(" + url + "#" + erMarkers.ERMarkers.ONLY_ONE_START + ")"); + break; + case diagObj.db.Cardinality.MD_PARENT: + svgPath.attr("marker-start", "url(" + url + "#" + erMarkers.ERMarkers.MD_PARENT_START + ")"); + break; + } + const len = svgPath.node().getTotalLength(); + const labelPoint = svgPath.node().getPointAtLength(len * 0.5); + const labelId = "rel" + relCnt; + const labelNode = svg.append("text").classed("er relationshipLabel", true).attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).style("text-anchor", "middle").style("dominant-baseline", "middle").style("font-family", (0,mermaid_f47111a7.c)().fontFamily).style("font-size", conf.fontSize + "px").text(rel.roleA); + const labelBBox = labelNode.node().getBBox(); + svg.insert("rect", "#" + labelId).classed("er relationshipLabelBox", true).attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height); +}; +const draw = function(text, id, _version, diagObj) { + conf = (0,mermaid_f47111a7.c)().er; + mermaid_f47111a7.l.info("Drawing ER diagram"); + const securityLevel = (0,mermaid_f47111a7.c)().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,src/* select */.Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,src/* select */.Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,src/* select */.Ltv)("body"); + const svg = root.select(`[id='${id}']`); + erMarkers.insertMarkers(svg, conf); + let g; + g = new graphlib/* Graph */.T({ + multigraph: true, + directed: true, + compound: false + }).setGraph({ + rankdir: conf.layoutDirection, + marginx: 20, + marginy: 20, + nodesep: 100, + edgesep: 100, + ranksep: 100 + }).setDefaultEdgeLabel(function() { + return {}; + }); + const firstEntity = drawEntities(svg, diagObj.db.getEntities(), g); + const relationships2 = addRelationships(diagObj.db.getRelationships(), g); + (0,dagre/* layout */.Zp)(g); + adjustEntities(svg, g); + relationships2.forEach(function(rel) { + drawRelationshipFromLayout(svg, rel, g, firstEntity, diagObj); + }); + const padding = conf.diagramPadding; + mermaid_f47111a7.u.insertTitle(svg, "entityTitleText", conf.titleTopMargin, diagObj.db.getDiagramTitle()); + const svgBounds = svg.node().getBBox(); + const width = svgBounds.width + padding * 2; + const height = svgBounds.height + padding * 2; + (0,mermaid_f47111a7.i)(svg, height, width, conf.useMaxWidth); + svg.attr("viewBox", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`); +}; +const MERMAID_ERDIAGRAM_UUID = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c"; +function generateId(str = "", prefix = "") { + const simplifiedStr = str.replace(BAD_ID_CHARS_REGEXP, ""); + return `${strWithHyphen(prefix)}${strWithHyphen(simplifiedStr)}${esm_node_v5( + str, + MERMAID_ERDIAGRAM_UUID + )}`; +} +function strWithHyphen(str = "") { + return str.length > 0 ? `${str}-` : ""; +} +const erRenderer = { + setConf, + draw +}; +const getStyles = (options) => ` + .entityBox { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + } + + .attributeBoxOdd { + fill: ${options.attributeBackgroundColorOdd}; + stroke: ${options.nodeBorder}; + } + + .attributeBoxEven { + fill: ${options.attributeBackgroundColorEven}; + stroke: ${options.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${options.tertiaryColor}; + opacity: 0.7; + background-color: ${options.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .relationshipLine { + stroke: ${options.lineColor}; + } + + .entityTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } + #MD_PARENT_START { + fill: #f5f5f5 !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; + } + #MD_PARENT_END { + fill: #f5f5f5 !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; + } + +`; +const erStyles = getStyles; +const diagram = { + parser: erParser, + db: erDb, + renderer: erRenderer, + styles: erStyles +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/1176.c653568f.js b/assets/js/1176.c653568f.js new file mode 100644 index 00000000..65298a7f --- /dev/null +++ b/assets/js/1176.c653568f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[1176],{1176:(n,e,r)=>{r.d(e,{Zp:()=>Ce});var t=r(8058),o=r(5664),i=r(8585),u=r(9142),a=r(4098),d=r(4722),c=r(1395),f=r(697);class s{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,e=n._prev;if(e!==n)return v(e),e}enqueue(n){var e=this._sentinel;n._prev&&n._next&&v(n),n._next=e._next,e._next._prev=n,e._next=n,n._prev=e}toString(){for(var n=[],e=this._sentinel,r=e._prev;r!==e;)n.push(JSON.stringify(r,g)),r=r._prev;return"["+n.join(", ")+"]"}}function v(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function g(n,e){if("_next"!==n&&"_prev"!==n)return e}var h=u.A(1);function l(n,e){if(n.nodeCount()<=1)return[];var r=function(n,e){var r=new f.T,o=0,i=0;t.A(n.nodes(),(function(n){r.setNode(n,{v:n,in:0,out:0})})),t.A(n.edges(),(function(n){var t=r.edge(n.v,n.w)||0,u=e(n),a=t+u;r.setEdge(n.v,n.w,a),i=Math.max(i,r.node(n.v).out+=u),o=Math.max(o,r.node(n.w).in+=u)}));var u=c.A(i+o+3).map((function(){return new s})),a=o+1;return t.A(r.nodes(),(function(n){p(u,a,r.node(n))})),{graph:r,buckets:u,zeroIdx:a}}(n,e||h),o=function(n,e,r){var t,o=[],i=e[e.length-1],u=e[0];for(;n.nodeCount();){for(;t=u.dequeue();)A(n,e,r,t);for(;t=i.dequeue();)A(n,e,r,t);if(n.nodeCount())for(var a=e.length-2;a>0;--a)if(t=e[a].dequeue()){o=o.concat(A(n,e,r,t,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return a.A(d.A(o,(function(e){return n.outEdges(e.v,e.w)})))}function A(n,e,r,o,i){var u=i?[]:void 0;return t.A(n.inEdges(o.v),(function(t){var o=n.edge(t),a=n.node(t.v);i&&u.push({v:t.v,w:t.w}),a.out-=o,p(e,r,a)})),t.A(n.outEdges(o.v),(function(t){var o=n.edge(t),i=t.w,u=n.node(i);u.in-=o,p(e,r,u)})),n.removeNode(o.v),u}function p(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function w(n){var e="greedy"===n.graph().acyclicer?l(n,function(n){return function(e){return n.edge(e).weight}}(n)):function(n){var e=[],r={},o={};function u(a){i.A(o,a)||(o[a]=!0,r[a]=!0,t.A(n.outEdges(a),(function(n){i.A(r,n.w)?e.push(n):u(n.w)})),delete r[a])}return t.A(n.nodes(),u),e}(n);t.A(e,(function(e){var r=n.edge(e);n.removeEdge(e),r.forwardName=e.name,r.reversed=!0,n.setEdge(e.w,e.v,r,o.A("rev"))}))}var m=r(8879),b=r(1942),y=r(3068),x=r(1882);const k=function(n,e,r){for(var t=-1,o=n.length;++te};var N=r(9008);const _=function(n){return n&&n.length?k(n,N.A,E):void 0};const I=function(n){var e=null==n?0:n.length;return e?n[e-1]:void 0};var T=r(2528),R=r(9841),M=r(9574);const L=function(n,e){var r={};return e=(0,M.A)(e,3),(0,R.A)(n,(function(n,t,o){(0,T.A)(r,t,e(n,t,o))})),r};var C=r(9592);const O=function(n,e){return nMath.abs(u)*c?(a<0&&(c=-c),r=c*u/a,t=c):(u<0&&(d=-d),r=d,t=d*a/u),{x:o+r,y:i+t}}function B(n){var e=d.A(c.A(Y(n)+1),(function(){return[]}));return t.A(n.nodes(),(function(r){var t=n.node(r),o=t.rank;C.A(o)||(e[o][t.order]=r)})),e}function q(n,e,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),F(n,"border",o,e)}function Y(n){return _(d.A(n.nodes(),(function(e){var r=n.node(e).rank;if(!C.A(r))return r})))}function z(n,e){var r=j();try{return e()}finally{console.log(n+" time: "+(j()-r)+"ms")}}function D(n,e){return e()}function $(n,e,r,t,o,i){var u={width:0,height:0,rank:i,borderType:e},a=o[e][i-1],d=F(n,"border",u,r);o[e][i]=d,n.setParent(d,t),a&&n.setEdge(a,d,{weight:1})}function J(n){var e=n.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(n){t.A(n.nodes(),(function(e){K(n.node(e))})),t.A(n.edges(),(function(e){var r=n.edge(e);t.A(r.points,K),i.A(r,"y")&&K(r)}))}(n),"lr"!==e&&"rl"!==e||(!function(n){t.A(n.nodes(),(function(e){Q(n.node(e))})),t.A(n.edges(),(function(e){var r=n.edge(e);t.A(r.points,Q),i.A(r,"x")&&Q(r)}))}(n),Z(n))}function Z(n){t.A(n.nodes(),(function(e){H(n.node(e))})),t.A(n.edges(),(function(e){H(n.edge(e))}))}function H(n){var e=n.width;n.width=n.height,n.height=e}function K(n){n.y=-n.y}function Q(n){var e=n.x;n.x=n.y,n.y=e}function U(n){n.graph().dummyChains=[],t.A(n.edges(),(function(e){!function(n,e){var r,t,o,i=e.v,u=n.node(i).rank,a=e.w,d=n.node(a).rank,c=e.name,f=n.edge(e),s=f.labelRank;if(d===u+1)return;for(n.removeEdge(e),o=0,++u;u-1?o[i?e[u]:u]:void 0}};var cn=r(5707),fn=r(4342);const sn=function(n){var e=(0,fn.A)(n),r=e%1;return e==e?r?e-r:e:0};var vn=Math.max;const gn=dn((function(n,e,r){var t=null==n?0:n.length;if(!t)return-1;var o=null==r?0:sn(r);return o<0&&(o=vn(t+o,0)),(0,cn.A)(n,(0,M.A)(e,3),o)}));var hn=r(1662);u.A(1);u.A(1);r(1852),r(9779),r(8496);var ln=r(2049);r(3098);(0,r(805).A)("length");RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var An="\\ud800-\\udfff",pn="["+An+"]",wn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",mn="\\ud83c[\\udffb-\\udfff]",bn="[^"+An+"]",yn="(?:\\ud83c[\\udde6-\\uddff]){2}",xn="[\\ud800-\\udbff][\\udc00-\\udfff]",kn="(?:"+wn+"|"+mn+")"+"?",En="[\\ufe0e\\ufe0f]?",Nn=En+kn+("(?:\\u200d(?:"+[bn,yn,xn].join("|")+")"+En+kn+")*"),_n="(?:"+[bn+wn+"?",wn,yn,xn,pn].join("|")+")";RegExp(mn+"(?="+mn+")|"+_n+Nn,"g");function In(){}function Tn(n,e,r){ln.A(e)||(e=[e]);var o=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],u={};return t.A(e,(function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);Rn(n,e,"post"===r,u,o,i)})),i}function Rn(n,e,r,o,u,a){i.A(o,e)||(o[e]=!0,r||a.push(e),t.A(u(e),(function(e){Rn(n,e,r,o,u,a)})),r&&a.push(e))}In.prototype=new Error;r(3046);function Mn(n){n=function(n){var e=(new f.T).setGraph(n.graph());return t.A(n.nodes(),(function(r){e.setNode(r,n.node(r))})),t.A(n.edges(),(function(r){var t=e.edge(r.v,r.w)||{weight:0,minlen:1},o=n.edge(r);e.setEdge(r.v,r.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})})),e}(n),X(n);var e,r=en(n);for(On(r),Ln(r,n);e=Sn(r);)Fn(r,n,e,jn(r,n,e))}function Ln(n,e){var r=function(n,e){return Tn(n,e,"post")}(n,n.nodes());r=r.slice(0,r.length-1),t.A(r,(function(r){!function(n,e,r){var t=n.node(r),o=t.parent;n.edge(r,o).cutvalue=Cn(n,e,r)}(n,e,r)}))}function Cn(n,e,r){var o=n.node(r).parent,i=!0,u=e.edge(r,o),a=0;return u||(i=!1,u=e.edge(o,r)),a=u.weight,t.A(e.nodeEdges(r),(function(t){var u,d,c=t.v===r,f=c?t.w:t.v;if(f!==o){var s=c===i,v=e.edge(t).weight;if(a+=s?v:-v,u=r,d=f,n.hasEdge(u,d)){var g=n.edge(r,f).cutvalue;a+=s?-g:g}}})),a}function On(n,e){arguments.length<2&&(e=n.nodes()[0]),Pn(n,{},1,e)}function Pn(n,e,r,o,u){var a=r,d=n.node(o);return e[o]=!0,t.A(n.neighbors(o),(function(t){i.A(e,t)||(r=Pn(n,e,r,t,o))})),d.low=a,d.lim=r++,u?d.parent=u:delete d.parent,r}function Sn(n){return gn(n.edges(),(function(e){return n.edge(e).cutvalue<0}))}function jn(n,e,r){var t=r.v,o=r.w;e.hasEdge(t,o)||(t=r.w,o=r.v);var i=n.node(t),u=n.node(o),a=i,d=!1;i.lim>u.lim&&(a=u,d=!0);var c=hn.A(e.edges(),(function(e){return d===Gn(n,n.node(e.v),a)&&d!==Gn(n,n.node(e.w),a)}));return W(c,(function(n){return nn(e,n)}))}function Fn(n,e,r,o){var i=r.v,u=r.w;n.removeEdge(i,u),n.setEdge(o.v,o.w,{}),On(n),Ln(n,e),function(n,e){var r=gn(n.nodes(),(function(n){return!e.node(n).parent})),o=function(n,e){return Tn(n,e,"pre")}(n,r);o=o.slice(1),t.A(o,(function(r){var t=n.node(r).parent,o=e.edge(r,t),i=!1;o||(o=e.edge(t,r),i=!0),e.node(r).rank=e.node(t).rank+(i?o.minlen:-o.minlen)}))}(n,e)}function Gn(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function Vn(n){switch(n.graph().ranker){case"network-simplex":default:qn(n);break;case"tight-tree":!function(n){X(n),en(n)}(n);break;case"longest-path":Bn(n)}}Mn.initLowLimValues=On,Mn.initCutValues=Ln,Mn.calcCutValue=Cn,Mn.leaveEdge=Sn,Mn.enterEdge=jn,Mn.exchangeEdges=Fn;var Bn=X;function qn(n){Mn(n)}var Yn=r(8207),zn=r(9463);function Dn(n){var e=F(n,"root",{},"_root"),r=function(n){var e={};function r(o,i){var u=n.children(o);u&&u.length&&t.A(u,(function(n){r(n,i+1)})),e[o]=i}return t.A(n.children(),(function(n){r(n,1)})),e}(n),o=_(Yn.A(r))-1,i=2*o+1;n.graph().nestingRoot=e,t.A(n.edges(),(function(e){n.edge(e).minlen*=i}));var u=function(n){return zn.A(n.edges(),(function(e,r){return e+n.edge(r).weight}),0)}(n)+1;t.A(n.children(),(function(t){$n(n,e,i,u,o,r,t)})),n.graph().nodeRankFactor=i}function $n(n,e,r,o,i,u,a){var d=n.children(a);if(d.length){var c=q(n,"_bt"),f=q(n,"_bb"),s=n.node(a);n.setParent(c,a),s.borderTop=c,n.setParent(f,a),s.borderBottom=f,t.A(d,(function(t){$n(n,e,r,o,i,u,t);var d=n.node(t),s=d.borderTop?d.borderTop:t,v=d.borderBottom?d.borderBottom:t,g=d.borderTop?o:2*o,h=s!==v?1:i-u[a]+1;n.setEdge(c,s,{weight:g,minlen:h,nestingEdge:!0}),n.setEdge(v,f,{weight:g,minlen:h,nestingEdge:!0})})),n.parent(a)||n.setEdge(e,c,{weight:0,minlen:i+u[a]})}else a!==e&&n.setEdge(e,a,{weight:0,minlen:r})}var Jn=r(1641);const Zn=function(n){return(0,Jn.A)(n,5)};function Hn(n,e,r){var u=function(n){var e;for(;n.hasNode(e=o.A("_root")););return e}(n),a=new f.T({compound:!0}).setGraph({root:u}).setDefaultNodeLabel((function(e){return n.node(e)}));return t.A(n.nodes(),(function(o){var d=n.node(o),c=n.parent(o);(d.rank===e||d.minRank<=e&&e<=d.maxRank)&&(a.setNode(o),a.setParent(o,c||u),t.A(n[r](o),(function(e){var r=e.v===o?e.w:e.v,t=a.edge(r,o),i=C.A(t)?0:t.weight;a.setEdge(r,o,{weight:n.edge(e).weight+i})})),i.A(d,"minRank")&&a.setNode(o,{borderLeft:d.borderLeft[e],borderRight:d.borderRight[e]}))})),a}var Kn=r(2851);const Qn=function(n,e,r){for(var t=-1,o=n.length,i=e.length,u={};++te||i&&u&&d&&!a&&!c||t&&u&&d||!r&&d||!o)return 1;if(!t&&!i&&!c&&n=a?d:d*("desc"==r[t]?-1:1)}return n.index-e.index};const ue=function(n,e,r){e=e.length?(0,Xn.A)(e,(function(n){return(0,ln.A)(n)?function(e){return(0,ne.A)(e,1===n.length?n[0]:n)}:n})):[N.A];var t=-1;e=(0,Xn.A)(e,(0,te.A)(M.A));var o=(0,ee.A)(n,(function(n,r,o){return{criteria:(0,Xn.A)(e,(function(e){return e(n)})),index:++t,value:n}}));return re(o,(function(n,e){return ie(n,e,r)}))};var ae=r(4326),de=r(6832);const ce=(0,ae.A)((function(n,e){if(null==n)return[];var r=e.length;return r>1&&(0,de.A)(n,e[0],e[1])?e=[]:r>2&&(0,de.A)(e[0],e[1],e[2])&&(e=[e[0]]),ue(n,(0,Wn.A)(e,1),[])}));function fe(n,e){for(var r=0,t=1;t0;)e%2&&(r+=f[e+1]),f[e=e-1>>1]+=n.weight;s+=n.weight*r}))),s}function ve(n,e){var r={};return t.A(n,(function(n,e){var t=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:e};C.A(n.barycenter)||(t.barycenter=n.barycenter,t.weight=n.weight)})),t.A(e.edges(),(function(n){var e=r[n.v],t=r[n.w];C.A(e)||C.A(t)||(t.indegree++,e.out.push(r[n.w]))})),function(n){var e=[];function r(n){return function(e){e.merged||(C.A(e.barycenter)||C.A(n.barycenter)||e.barycenter>=n.barycenter)&&function(n,e){var r=0,t=0;n.weight&&(r+=n.barycenter*n.weight,t+=n.weight);e.weight&&(r+=e.barycenter*e.weight,t+=e.weight);n.vs=e.vs.concat(n.vs),n.barycenter=r/t,n.weight=t,n.i=Math.min(e.i,n.i),e.merged=!0}(n,e)}}function o(e){return function(r){r.in.push(e),0==--r.indegree&&n.push(r)}}for(;n.length;){var i=n.pop();e.push(i),t.A(i.in.reverse(),r(i)),t.A(i.out,o(i))}return d.A(hn.A(e,(function(n){return!n.merged})),(function(n){return b.A(n,["vs","i","barycenter","weight"])}))}(hn.A(r,(function(n){return!n.indegree})))}function ge(n,e){var r,o=function(n,e){var r={lhs:[],rhs:[]};return t.A(n,(function(n){e(n)?r.lhs.push(n):r.rhs.push(n)})),r}(n,(function(n){return i.A(n,"barycenter")})),u=o.lhs,d=ce(o.rhs,(function(n){return-n.i})),c=[],f=0,s=0,v=0;u.sort((r=!!e,function(n,e){return n.barycentere.barycenter?1:r?e.i-n.i:n.i-e.i})),v=he(c,d,v),t.A(u,(function(n){v+=n.vs.length,c.push(n.vs),f+=n.barycenter*n.weight,s+=n.weight,v=he(c,d,v)}));var g={vs:a.A(c)};return s&&(g.barycenter=f/s,g.weight=s),g}function he(n,e,r){for(var t;e.length&&(t=I(e)).i<=r;)e.pop(),n.push(t.vs),r++;return r}function le(n,e,r,o){var u=n.children(e),c=n.node(e),f=c?c.borderLeft:void 0,s=c?c.borderRight:void 0,v={};f&&(u=hn.A(u,(function(n){return n!==f&&n!==s})));var g=function(n,e){return d.A(e,(function(e){var r=n.inEdges(e);if(r.length){var t=zn.A(r,(function(e,r){var t=n.edge(r),o=n.node(r.v);return{sum:e.sum+t.weight*o.order,weight:e.weight+t.weight}}),{sum:0,weight:0});return{v:e,barycenter:t.sum/t.weight,weight:t.weight}}return{v:e}}))}(n,u);t.A(g,(function(e){if(n.children(e.v).length){var t=le(n,e.v,r,o);v[e.v]=t,i.A(t,"barycenter")&&(u=e,a=t,C.A(u.barycenter)?(u.barycenter=a.barycenter,u.weight=a.weight):(u.barycenter=(u.barycenter*u.weight+a.barycenter*a.weight)/(u.weight+a.weight),u.weight+=a.weight))}var u,a}));var h=ve(g,r);!function(n,e){t.A(n,(function(n){n.vs=a.A(n.vs.map((function(n){return e[n]?e[n].vs:n})))}))}(h,v);var l=ge(h,o);if(f&&(l.vs=a.A([f,l.vs,s]),n.predecessors(f).length)){var A=n.node(n.predecessors(f)[0]),p=n.node(n.predecessors(s)[0]);i.A(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+A.order+p.order)/(l.weight+2),l.weight+=2}return l}function Ae(n){var e=Y(n),r=pe(n,c.A(1,e+1),"inEdges"),o=pe(n,c.A(e-1,-1,-1),"outEdges"),u=function(n){var e={},r=hn.A(n.nodes(),(function(e){return!n.children(e).length})),o=_(d.A(r,(function(e){return n.node(e).rank}))),u=d.A(c.A(o+1),(function(){return[]})),a=ce(r,(function(e){return n.node(e).rank}));return t.A(a,(function r(o){if(!i.A(e,o)){e[o]=!0;var a=n.node(o);u[a.rank].push(o),t.A(n.successors(o),r)}})),u}(n);me(n,u);for(var a,f=Number.POSITIVE_INFINITY,s=0,v=0;v<4;++s,++v){we(s%2?r:o,s%4>=2);var g=fe(n,u=B(n));gd||c>e[o].lim));i=o,o=t;for(;(o=n.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(n,e,o.v,o.w),u=i.path,a=i.lca,d=0,c=u[d],f=!0;r!==o.w;){if(t=n.node(r),f){for(;(c=u[d])!==a&&n.node(c).maxRankr){var t=e;e=r,r=t}var o=n[e];o||(n[e]=o={}),o[r]=!0}function Te(n,e,r){if(e>r){var t=e;e=r,r=t}return i.A(n[e],r)}function Re(n,e,r,o,u){var a={},d=function(n,e,r,o){var u=new f.T,a=n.graph(),d=function(n,e,r){return function(t,o,u){var a,d=t.node(o),c=t.node(u),f=0;if(f+=d.width/2,i.A(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":a=-d.width/2;break;case"r":a=d.width/2}if(a&&(f+=r?a:-a),a=0,f+=(d.dummy?e:n)/2,f+=(c.dummy?e:n)/2,f+=c.width/2,i.A(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":a=c.width/2;break;case"r":a=-c.width/2}return a&&(f+=r?a:-a),a=0,f}}(a.nodesep,a.edgesep,o);return t.A(e,(function(e){var o;t.A(e,(function(e){var t=r[e];if(u.setNode(t),o){var i=r[o],a=u.edge(i,t);u.setEdge(i,t,Math.max(d(n,e,o),a||0))}o=e}))})),u}(n,e,r,u),c=u?"borderLeft":"borderRight";function s(n,e){for(var r=d.nodes(),t=r.pop(),o={};t;)o[t]?n(t):(o[t]=!0,r.push(t),r=r.concat(e(t))),t=r.pop()}return s((function(n){a[n]=d.inEdges(n).reduce((function(n,e){return Math.max(n,a[e.v]+d.edge(e))}),0)}),d.predecessors.bind(d)),s((function(e){var r=d.outEdges(e).reduce((function(n,e){return Math.min(n,a[e.w]-d.edge(e))}),Number.POSITIVE_INFINITY),t=n.node(e);r!==Number.POSITIVE_INFINITY&&t.borderType!==c&&(a[e]=Math.max(a[e],r))}),d.successors.bind(d)),t.A(o,(function(n){a[n]=a[r[n]]})),a}function Me(n){var e,r=B(n),o=m.A(_e(n,r),function(n,e){var r={};function o(e,o,i,u,a){var d;t.A(c.A(o,i),(function(o){d=e[o],n.node(d).dummy&&t.A(n.predecessors(d),(function(e){var t=n.node(e);t.dummy&&(t.ordera)&&Ie(r,e,d)}))}))}return zn.A(e,(function(e,r){var i,u=-1,a=0;return t.A(r,(function(t,d){if("border"===n.node(t).dummy){var c=n.predecessors(t);c.length&&(i=n.node(c[0]).order,o(r,a,d,u,i),a=d,u=i)}o(r,a,r.length,i,e.length)})),r})),r}(n,r)),i={};t.A(["u","d"],(function(u){e="u"===u?r:Yn.A(r).reverse(),t.A(["l","r"],(function(r){"r"===r&&(e=d.A(e,(function(n){return Yn.A(n).reverse()})));var a=("u"===u?n.predecessors:n.successors).bind(n),c=function(n,e,r,o){var i={},u={},a={};return t.A(e,(function(n){t.A(n,(function(n,e){i[n]=n,u[n]=n,a[n]=e}))})),t.A(e,(function(n){var e=-1;t.A(n,(function(n){var t=o(n);if(t.length){t=ce(t,(function(n){return a[n]}));for(var d=(t.length-1)/2,c=Math.floor(d),f=Math.ceil(d);c<=f;++c){var s=t[c];u[n]===n&&e{r.d(e,{A:()=>i});var t=r(6240),o=r(8446);const i=function(n,e){var r=-1,i=(0,o.A)(n)?Array(n.length):[];return(0,t.A)(n,(function(n,t,o){i[++r]=e(n,t,o)})),i}},3068:(n,e,r)=>{r.d(e,{A:()=>c});var t=r(4326),o=r(6984),i=r(6832),u=r(5615),a=Object.prototype,d=a.hasOwnProperty;const c=(0,t.A)((function(n,e){n=Object(n);var r=-1,t=e.length,c=t>2?e[2]:void 0;for(c&&(0,i.A)(e[0],e[1],c)&&(t=1);++r{r.d(e,{A:()=>o});var t=r(3588);const o=function(n){return(null==n?0:n.length)?(0,t.A)(n,1):[]}},4722:(n,e,r)=>{r.d(e,{A:()=>a});var t=r(5572),o=r(9574),i=r(2568),u=r(2049);const a=function(n,e){return((0,u.A)(n)?t.A:i.A)(n,(0,o.A)(e,3))}},1942:(n,e,r)=>{r.d(e,{A:()=>A});var t=r(6318),o=r(2851),i=r(7819),u=r(5353),a=r(3149),d=r(901);const c=function(n,e,r,t){if(!(0,a.A)(n))return n;for(var c=-1,f=(e=(0,i.A)(e,n)).length,s=f-1,v=n;null!=v&&++c{r.d(e,{A:()=>d});var t=Math.ceil,o=Math.max;const i=function(n,e,r,i){for(var u=-1,a=o(t((e-n)/(r||1)),0),d=Array(a);a--;)d[i?a:++u]=n,n+=r;return d};var u=r(6832),a=r(4342);const d=function(n){return function(e,r,t){return t&&"number"!=typeof t&&(0,u.A)(e,r,t)&&(r=t=void 0),e=(0,a.A)(e),void 0===r?(r=e,e=0):r=(0,a.A)(r),t=void 0===t?e{r.d(e,{A:()=>l});var t=/\s/;const o=function(n){for(var e=n.length;e--&&t.test(n.charAt(e)););return e};var i=/^\s+/;const u=function(n){return n?n.slice(0,o(n)+1).replace(i,""):n};var a=r(3149),d=r(1882),c=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,s=/^0o[0-7]+$/i,v=parseInt;const g=function(n){if("number"==typeof n)return n;if((0,d.A)(n))return NaN;if((0,a.A)(n)){var e="function"==typeof n.valueOf?n.valueOf():n;n=(0,a.A)(e)?e+"":e}if("string"!=typeof n)return 0===n?n:+n;n=u(n);var r=f.test(n);return r||s.test(n)?v(n.slice(2),r?2:8):c.test(n)?NaN:+n};var h=1/0;const l=function(n){return n?(n=g(n))===h||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}},5664:(n,e,r)=>{r.d(e,{A:()=>i});var t=r(8894),o=0;const i=function(n){var e=++o;return(0,t.A)(n)+e}}}]); \ No newline at end of file diff --git a/assets/js/11859ee7.bc3b29fc.js b/assets/js/11859ee7.bc3b29fc.js new file mode 100644 index 00000000..d212d76a --- /dev/null +++ b/assets/js/11859ee7.bc3b29fc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[9538],{6477:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>d,default:()=>l,frontMatter:()=>o,metadata:()=>u,toc:()=>c});var i=n(4848),r=n(8453);const o={},d="Publishing",u={id:"contribute/development-guide/publishing",title:"Publishing",description:"TBD",source:"@site/docs/contribute/development-guide/publishing.md",sourceDirName:"contribute/development-guide",slug:"/contribute/development-guide/publishing",permalink:"/tagreader-python/docs/contribute/development-guide/publishing",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/contribute/development-guide/publishing.md",tags:[],version:"current",frontMatter:{},sidebar:"contribute",previous:{title:"Developer guide",permalink:"/tagreader-python/docs/category/developer-guide"},next:{title:"Setup",permalink:"/tagreader-python/docs/contribute/development-guide/setup"}},s={},c=[];function p(e){const t={h1:"h1",header:"header",p:"p",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"publishing",children:"Publishing"})}),"\n",(0,i.jsx)(t.p,{children:"TBD"})]})}function l(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}}}]); \ No newline at end of file diff --git a/assets/js/121.0b1ee707.js b/assets/js/121.0b1ee707.js new file mode 100644 index 00000000..5cc07385 --- /dev/null +++ b/assets/js/121.0b1ee707.js @@ -0,0 +1,28583 @@ +"use strict"; +exports.id = 121; +exports.ids = [121]; +exports.modules = { + +/***/ 646: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ H: () => (/* binding */ addHtmlLabel) +/* harmony export */ }); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2933); + + + + +function addHtmlLabel(root, node) { + var fo = root.append('foreignObject').attr('width', '100000'); + + var div = fo.append('xhtml:div'); + div.attr('xmlns', 'http://www.w3.org/1999/xhtml'); + + var label = node.label; + switch (typeof label) { + case 'function': + div.insert(label); + break; + case 'object': + // Currently we assume this is a DOM object. + div.insert(function () { + return label; + }); + break; + default: + div.html(label); + } + + _util_js__WEBPACK_IMPORTED_MODULE_0__/* .applyStyle */ .AV(div, node.labelStyle); + div.style('display', 'inline-block'); + // Fix for firefox + div.style('white-space', 'nowrap'); + + var client = div.node().getBoundingClientRect(); + fo.attr('width', client.width).attr('height', client.height); + + return fo; +} + + +/***/ }), + +/***/ 2933: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AV: () => (/* binding */ applyStyle), +/* harmony export */ De: () => (/* binding */ isSubgraph), +/* harmony export */ c$: () => (/* binding */ applyTransition), +/* harmony export */ gh: () => (/* binding */ edgeToId), +/* harmony export */ nh: () => (/* binding */ applyClass) +/* harmony export */ }); +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4963); +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9610); + + +// Public utility functions + + +/* + * Returns true if the specified node in the graph is a subgraph node. A + * subgraph node is one that contains other nodes. + */ +function isSubgraph(g, v) { + return !!g.children(v).length; +} + +function edgeToId(e) { + return escapeId(e.v) + ':' + escapeId(e.w) + ':' + escapeId(e.name); +} + +var ID_DELIM = /:/g; +function escapeId(str) { + return str ? String(str).replace(ID_DELIM, '\\:') : ''; +} + +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr('style', styleFn); + } +} + +function applyClass(dom, classFn, otherClasses) { + if (classFn) { + dom.attr('class', classFn).attr('class', otherClasses + ' ' + dom.attr('class')); + } +} + +function applyTransition(selection, g) { + var graph = g.graph(); + + if (lodash_es__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A(graph)) { + var transition = graph.transition; + if (lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(transition)) { + return transition(selection); + } + } + + return selection; +} + + +/***/ }), + +/***/ 1176: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + Zp: () => (/* reexport */ layout) +}); + +// UNUSED EXPORTS: acyclic, normalize, rank + +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js +var uniqueId = __webpack_require__(5664); +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/map.js +var map = __webpack_require__(4722); +// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules +var range = __webpack_require__(1395); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js +var graphlib = __webpack_require__(697); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js +/* + * Simple doubly linked list implementation derived from Cormen, et al., + * "Introduction to Algorithms". + */ + + + +class List { + constructor() { + var sentinel = {}; + sentinel._next = sentinel._prev = sentinel; + this._sentinel = sentinel; + } + dequeue() { + var sentinel = this._sentinel; + var entry = sentinel._prev; + if (entry !== sentinel) { + unlink(entry); + return entry; + } + } + enqueue(entry) { + var sentinel = this._sentinel; + if (entry._prev && entry._next) { + unlink(entry); + } + entry._next = sentinel._next; + sentinel._next._prev = entry; + sentinel._next = entry; + entry._prev = sentinel; + } + toString() { + var strs = []; + var sentinel = this._sentinel; + var curr = sentinel._prev; + while (curr !== sentinel) { + strs.push(JSON.stringify(curr, filterOutLinks)); + curr = curr._prev; + } + return '[' + strs.join(', ') + ']'; + } +} + +function unlink(entry) { + entry._prev._next = entry._next; + entry._next._prev = entry._prev; + delete entry._next; + delete entry._prev; +} + +function filterOutLinks(k, v) { + if (k !== '_next' && k !== '_prev') { + return v; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js + + + + +/* + * A greedy heuristic for finding a feedback arc set for a graph. A feedback + * arc set is a set of edges that can be removed to make a graph acyclic. + * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and + * effective heuristic for the feedback arc set problem." This implementation + * adjusts that from the paper to allow for weighted edges. + */ + + +var DEFAULT_WEIGHT_FN = constant/* default */.A(1); + +function greedyFAS(g, weightFn) { + if (g.nodeCount() <= 1) { + return []; + } + var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); + var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); + + // Expand multi-edges + return flatten/* default */.A( + map/* default */.A(results, function (e) { + return g.outEdges(e.v, e.w); + }) + ); +} + +function doGreedyFAS(g, buckets, zeroIdx) { + var results = []; + var sources = buckets[buckets.length - 1]; + var sinks = buckets[0]; + + var entry; + while (g.nodeCount()) { + while ((entry = sinks.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + while ((entry = sources.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + if (g.nodeCount()) { + for (var i = buckets.length - 2; i > 0; --i) { + entry = buckets[i].dequeue(); + if (entry) { + results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); + break; + } + } + } + } + + return results; +} + +function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { + var results = collectPredecessors ? [] : undefined; + + forEach/* default */.A(g.inEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var uEntry = g.node(edge.v); + + if (collectPredecessors) { + results.push({ v: edge.v, w: edge.w }); + } + + uEntry.out -= weight; + assignBucket(buckets, zeroIdx, uEntry); + }); + + forEach/* default */.A(g.outEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var w = edge.w; + var wEntry = g.node(w); + wEntry['in'] -= weight; + assignBucket(buckets, zeroIdx, wEntry); + }); + + g.removeNode(entry.v); + + return results; +} + +function buildState(g, weightFn) { + var fasGraph = new graphlib/* Graph */.T(); + var maxIn = 0; + var maxOut = 0; + + forEach/* default */.A(g.nodes(), function (v) { + fasGraph.setNode(v, { v: v, in: 0, out: 0 }); + }); + + // Aggregate weights on nodes, but also sum the weights across multi-edges + // into a single edge for the fasGraph. + forEach/* default */.A(g.edges(), function (e) { + var prevWeight = fasGraph.edge(e.v, e.w) || 0; + var weight = weightFn(e); + var edgeWeight = prevWeight + weight; + fasGraph.setEdge(e.v, e.w, edgeWeight); + maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); + maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); + }); + + var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { + return new List(); + }); + var zeroIdx = maxIn + 1; + + forEach/* default */.A(fasGraph.nodes(), function (v) { + assignBucket(buckets, zeroIdx, fasGraph.node(v)); + }); + + return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; +} + +function assignBucket(buckets, zeroIdx, entry) { + if (!entry.out) { + buckets[0].enqueue(entry); + } else if (!entry['in']) { + buckets[buckets.length - 1].enqueue(entry); + } else { + buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js + + + + + +function run(g) { + var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); + forEach/* default */.A(fas, function (e) { + var label = g.edge(e); + g.removeEdge(e); + label.forwardName = e.name; + label.reversed = true; + g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); + }); + + function weightFn(g) { + return function (e) { + return g.edge(e).weight; + }; + } +} + +function dfsFAS(g) { + var fas = []; + var stack = {}; + var visited = {}; + + function dfs(v) { + if (has/* default */.A(visited, v)) { + return; + } + visited[v] = true; + stack[v] = true; + forEach/* default */.A(g.outEdges(v), function (e) { + if (has/* default */.A(stack, e.w)) { + fas.push(e); + } else { + dfs(e.w); + } + }); + delete stack[v]; + } + + forEach/* default */.A(g.nodes(), dfs); + return fas; +} + +function undo(g) { + forEach/* default */.A(g.edges(), function (e) { + var label = g.edge(e); + if (label.reversed) { + g.removeEdge(e); + + var forwardName = label.forwardName; + delete label.reversed; + delete label.forwardName; + g.setEdge(e.w, e.v, label, forwardName); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules +var merge = __webpack_require__(8879); +// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules +var pick = __webpack_require__(1942); +// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js +var defaults = __webpack_require__(3068); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js + + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !(0,isSymbol/* default */.A)(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +/* harmony default export */ const _baseExtremum = (baseExtremum); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +/* harmony default export */ const _baseGt = (baseGt); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js + + + + +/** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ +function max(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseGt) + : undefined; +} + +/* harmony default export */ const lodash_es_max = (max); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +/* harmony default export */ const lodash_es_last = (last); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js +var _baseAssignValue = __webpack_require__(2528); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js + + + + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); + + (0,_baseForOwn/* default */.A)(object, function(value, key, object) { + (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ const lodash_es_mapValues = (mapValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +/* harmony default export */ const _baseLt = (baseLt); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js + + + + +/** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ +function min(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_min = (min); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js +var _root = __webpack_require__(1917); +;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js + + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return _root/* default */.A.Date.now(); +}; + +/* harmony default export */ const lodash_es_now = (now); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js + + + + + +/* + * Adds a dummy node to the graph and return v. + */ +function addDummyNode(g, type, attrs, name) { + var v; + do { + v = uniqueId/* default */.A(name); + } while (g.hasNode(v)); + + attrs.dummy = type; + g.setNode(v, attrs); + return v; +} + +/* + * Returns a new graph with only simple edges. Handles aggregation of data + * associated with multi-edges. + */ +function simplify(g) { + var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + simplified.setNode(v, g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; + var label = g.edge(e); + simplified.setEdge(e.v, e.w, { + weight: simpleLabel.weight + label.weight, + minlen: Math.max(simpleLabel.minlen, label.minlen), + }); + }); + return simplified; +} + +function asNonCompoundGraph(g) { + var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + if (!g.children(v).length) { + simplified.setNode(v, g.node(v)); + } + }); + forEach/* default */.A(g.edges(), function (e) { + simplified.setEdge(e, g.edge(e)); + }); + return simplified; +} + +function successorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var sucs = {}; + _.forEach(g.outEdges(v), function (e) { + sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; + }); + return sucs; + }); + return _.zipObject(g.nodes(), weightMap); +} + +function predecessorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var preds = {}; + _.forEach(g.inEdges(v), function (e) { + preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; + }); + return preds; + }); + return _.zipObject(g.nodes(), weightMap); +} + +/* + * Finds where a line starting at point ({x, y}) would intersect a rectangle + * ({x, y, width, height}) if it were pointing at the rectangle's center. + */ +function intersectRect(rect, point) { + var x = rect.x; + var y = rect.y; + + // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes + var dx = point.x - x; + var dy = point.y - y; + var w = rect.width / 2; + var h = rect.height / 2; + + if (!dx && !dy) { + throw new Error('Not possible to find intersection inside of the rectangle'); + } + + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } + sx = (h * dx) / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } + sx = w; + sy = (w * dy) / dx; + } + + return { x: x + sx, y: y + sy }; +} + +/* + * Given a DAG with each node assigned "rank" and "order" properties, this + * function will produce a matrix with the ids of each node. + */ +function buildLayerMatrix(g) { + var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { + return []; + }); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + var rank = node.rank; + if (!isUndefined/* default */.A(rank)) { + layering[rank][node.order] = v; + } + }); + return layering; +} + +/* + * Adjusts the ranks for all nodes in the graph such that all nodes v have + * rank(v) >= 0 and at least one node w has rank(w) = 0. + */ +function normalizeRanks(g) { + var min = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (has/* default */.A(node, 'rank')) { + node.rank -= min; + } + }); +} + +function removeEmptyRanks(g) { + // Ranks may not start at 0, so we need to offset them + var offset = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + + var layers = []; + forEach/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank - offset; + if (!layers[rank]) { + layers[rank] = []; + } + layers[rank].push(v); + }); + + var delta = 0; + var nodeRankFactor = g.graph().nodeRankFactor; + forEach/* default */.A(layers, function (vs, i) { + if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { + --delta; + } else if (delta) { + forEach/* default */.A(vs, function (v) { + g.node(v).rank += delta; + }); + } + }); +} + +function addBorderNode(g, prefix, rank, order) { + var node = { + width: 0, + height: 0, + }; + if (arguments.length >= 4) { + node.rank = rank; + node.order = order; + } + return addDummyNode(g, 'border', node, prefix); +} + +function util_maxRank(g) { + return lodash_es_max( + map/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank; + if (!isUndefined/* default */.A(rank)) { + return rank; + } + }) + ); +} + +/* + * Partition a collection into two groups: `lhs` and `rhs`. If the supplied + * function returns true for an entry it goes into `lhs`. Otherwise it goes + * into `rhs. + */ +function partition(collection, fn) { + var result = { lhs: [], rhs: [] }; + forEach/* default */.A(collection, function (value) { + if (fn(value)) { + result.lhs.push(value); + } else { + result.rhs.push(value); + } + }); + return result; +} + +/* + * Returns a new function that wraps `fn` with a timer. The wrapper logs the + * time it takes to execute the function. + */ +function util_time(name, fn) { + var start = lodash_es_now(); + try { + return fn(); + } finally { + console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); + } +} + +function notime(name, fn) { + return fn(); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js + + + + + +function addBorderSegments(g) { + function dfs(v) { + var children = g.children(v); + var node = g.node(v); + if (children.length) { + forEach/* default */.A(children, dfs); + } + + if (has/* default */.A(node, 'minRank')) { + node.borderLeft = []; + node.borderRight = []; + for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { + add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); + add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); + } + } + } + + forEach/* default */.A(g.children(), dfs); +} + +function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { + var label = { width: 0, height: 0, rank: rank, borderType: prop }; + var prev = sgNode[prop][rank - 1]; + var curr = addDummyNode(g, 'border', label, prefix); + sgNode[prop][rank] = curr; + g.setParent(curr, sg); + if (prev) { + g.setEdge(prev, curr, { weight: 1 }); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js + + + + +function adjust(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'lr' || rankDir === 'rl') { + swapWidthHeight(g); + } +} + +function coordinate_system_undo(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'bt' || rankDir === 'rl') { + reverseY(g); + } + + if (rankDir === 'lr' || rankDir === 'rl') { + swapXY(g); + swapWidthHeight(g); + } +} + +function swapWidthHeight(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapWidthHeightOne(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + swapWidthHeightOne(g.edge(e)); + }); +} + +function swapWidthHeightOne(attrs) { + var w = attrs.width; + attrs.width = attrs.height; + attrs.height = w; +} + +function reverseY(g) { + forEach/* default */.A(g.nodes(), function (v) { + reverseYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, reverseYOne); + if (has/* default */.A(edge, 'y')) { + reverseYOne(edge); + } + }); +} + +function reverseYOne(attrs) { + attrs.y = -attrs.y; +} + +function swapXY(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapXYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, swapXYOne); + if (has/* default */.A(edge, 'x')) { + swapXYOne(edge); + } + }); +} + +function swapXYOne(attrs) { + var x = attrs.x; + attrs.x = attrs.y; + attrs.y = x; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js + + + + + +/* + * Breaks any long edges in the graph into short segments that span 1 layer + * each. This operation is undoable with the denormalize function. + * + * Pre-conditions: + * + * 1. The input graph is a DAG. + * 2. Each node in the graph has a "rank" property. + * + * Post-condition: + * + * 1. All edges in the graph have a length of 1. + * 2. Dummy nodes are added where edges have been split into segments. + * 3. The graph is augmented with a "dummyChains" attribute which contains + * the first dummy in each chain of dummy nodes produced. + */ +function normalize_run(g) { + g.graph().dummyChains = []; + forEach/* default */.A(g.edges(), function (edge) { + normalizeEdge(g, edge); + }); +} + +function normalizeEdge(g, e) { + var v = e.v; + var vRank = g.node(v).rank; + var w = e.w; + var wRank = g.node(w).rank; + var name = e.name; + var edgeLabel = g.edge(e); + var labelRank = edgeLabel.labelRank; + + if (wRank === vRank + 1) return; + + g.removeEdge(e); + + var dummy, attrs, i; + for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { + edgeLabel.points = []; + attrs = { + width: 0, + height: 0, + edgeLabel: edgeLabel, + edgeObj: e, + rank: vRank, + }; + dummy = addDummyNode(g, 'edge', attrs, '_d'); + if (vRank === labelRank) { + attrs.width = edgeLabel.width; + attrs.height = edgeLabel.height; + // @ts-expect-error + attrs.dummy = 'edge-label'; + // @ts-expect-error + attrs.labelpos = edgeLabel.labelpos; + } + g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); + if (i === 0) { + g.graph().dummyChains.push(dummy); + } + v = dummy; + } + + g.setEdge(v, w, { weight: edgeLabel.weight }, name); +} + +function normalize_undo(g) { + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var origLabel = node.edgeLabel; + var w; + g.setEdge(node.edgeObj, origLabel); + while (node.dummy) { + w = g.successors(v)[0]; + g.removeNode(v); + origLabel.points.push({ x: node.x, y: node.y }); + if (node.dummy === 'edge-label') { + origLabel.x = node.x; + origLabel.y = node.y; + origLabel.width = node.width; + origLabel.height = node.height; + } + v = w; + node = g.node(v); + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js + + + + +/** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ +function minBy(array, iteratee) { + return (array && array.length) + ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_minBy = (minBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js + + + + +/* + * Initializes ranks for the input graph using the longest path algorithm. This + * algorithm scales well and is fast in practice, it yields rather poor + * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom + * ranks wide and leaving edges longer than necessary. However, due to its + * speed, this algorithm is good for getting an initial ranking that can be fed + * into other algorithms. + * + * This algorithm does not normalize layers because it will be used by other + * algorithms in most cases. If using this algorithm directly, be sure to + * run normalize at the end. + * + * Pre-conditions: + * + * 1. Input graph is a DAG. + * 2. Input graph node labels can be assigned properties. + * + * Post-conditions: + * + * 1. Each node will be assign an (unnormalized) "rank" property. + */ +function longestPath(g) { + var visited = {}; + + function dfs(v) { + var label = g.node(v); + if (has/* default */.A(visited, v)) { + return label.rank; + } + visited[v] = true; + + var rank = lodash_es_min( + map/* default */.A(g.outEdges(v), function (e) { + return dfs(e.w) - g.edge(e).minlen; + }) + ); + + if ( + rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + rank === undefined || // return value of _.map([]) for Lodash 4 + rank === null + ) { + // return value of _.map([null]) + rank = 0; + } + + return (label.rank = rank); + } + + forEach/* default */.A(g.sources(), dfs); +} + +/* + * Returns the amount of slack for the given edge. The slack is defined as the + * difference between the length of the edge and its minimum length. + */ +function slack(g, e) { + return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js + + + + + + +/* + * Constructs a spanning tree with tight edges and adjusted the input node's + * ranks to achieve this. A tight edge is one that is has a length that matches + * its "minlen" attribute. + * + * The basic structure for this function is derived from Gansner, et al., "A + * Technique for Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a DAG. + * 2. Graph must be connected. + * 3. Graph must have at least one node. + * 5. Graph nodes must have been previously assigned a "rank" property that + * respects the "minlen" property of incident edges. + * 6. Graph edges must have a "minlen" property. + * + * Post-conditions: + * + * - Graph nodes will have their rank adjusted to ensure that all edges are + * tight. + * + * Returns a tree (undirected graph) that is constructed using only "tight" + * edges. + */ +function feasibleTree(g) { + var t = new graphlib/* Graph */.T({ directed: false }); + + // Choose arbitrary node from which to start our tree + var start = g.nodes()[0]; + var size = g.nodeCount(); + t.setNode(start, {}); + + var edge, delta; + while (tightTree(t, g) < size) { + edge = findMinSlackEdge(t, g); + delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); + shiftRanks(t, g, delta); + } + + return t; +} + +/* + * Finds a maximal tree of tight edges and returns the number of nodes in the + * tree. + */ +function tightTree(t, g) { + function dfs(v) { + forEach/* default */.A(g.nodeEdges(v), function (e) { + var edgeV = e.v, + w = v === edgeV ? e.w : edgeV; + if (!t.hasNode(w) && !slack(g, e)) { + t.setNode(w, {}); + t.setEdge(v, w, {}); + dfs(w); + } + }); + } + + forEach/* default */.A(t.nodes(), dfs); + return t.nodeCount(); +} + +/* + * Finds the edge with the smallest slack that is incident on tree and returns + * it. + */ +function findMinSlackEdge(t, g) { + return lodash_es_minBy(g.edges(), function (e) { + if (t.hasNode(e.v) !== t.hasNode(e.w)) { + return slack(g, e); + } + }); +} + +function shiftRanks(t, g, delta) { + forEach/* default */.A(t.nodes(), function (v) { + g.node(v).rank += delta; + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js + + + + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!(0,isArrayLike/* default */.A)(collection)) { + var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); + collection = (0,keys/* default */.A)(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +/* harmony default export */ const _createFind = (createFind); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js + + +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = (0,toFinite/* default */.A)(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +/* harmony default export */ const lodash_es_toInteger = (toInteger); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); +} + +/* harmony default export */ const lodash_es_findIndex = (findIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js + + + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = _createFind(lodash_es_findIndex); + +/* harmony default export */ const lodash_es_find = (find); + +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js + + + + + +var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function dijkstra_dijkstra(g, source, weightFn, edgeFn) { + return runDijkstra( + g, + String(source), + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runDijkstra(g, source, weightFn, edgeFn) { + var results = {}; + var pq = new PriorityQueue(); + var v, vEntry; + + var updateNeighbors = function (edge) { + var w = edge.v !== v ? edge.v : edge.w; + var wEntry = results[w]; + var weight = weightFn(edge); + var distance = vEntry.distance + weight; + + if (weight < 0) { + throw new Error( + 'dijkstra does not allow negative edge weights. ' + + 'Bad edge: ' + + edge + + ' Weight: ' + + weight + ); + } + + if (distance < wEntry.distance) { + wEntry.distance = distance; + wEntry.predecessor = v; + pq.decrease(w, distance); + } + }; + + g.nodes().forEach(function (v) { + var distance = v === source ? 0 : Number.POSITIVE_INFINITY; + results[v] = { distance: distance }; + pq.add(v, distance); + }); + + while (pq.size() > 0) { + v = pq.removeMin(); + vEntry = results[v]; + if (vEntry.distance === Number.POSITIVE_INFINITY) { + break; + } + + edgeFn(v).forEach(updateNeighbors); + } + + return results; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js + + + + + +function dijkstraAll(g, weightFunc, edgeFunc) { + return _.transform( + g.nodes(), + function (acc, v) { + acc[v] = dijkstra(g, v, weightFunc, edgeFunc); + }, + {} + ); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js + + + + +var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function floydWarshall(g, weightFn, edgeFn) { + return runFloydWarshall( + g, + weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runFloydWarshall(g, weightFn, edgeFn) { + var results = {}; + var nodes = g.nodes(); + + nodes.forEach(function (v) { + results[v] = {}; + results[v][v] = { distance: 0 }; + nodes.forEach(function (w) { + if (v !== w) { + results[v][w] = { distance: Number.POSITIVE_INFINITY }; + } + }); + edgeFn(v).forEach(function (edge) { + var w = edge.v === v ? edge.w : edge.v; + var d = weightFn(edge); + results[v][w] = { distance: d, predecessor: v }; + }); + }); + + nodes.forEach(function (k) { + var rowK = results[k]; + nodes.forEach(function (i) { + var rowI = results[i]; + nodes.forEach(function (j) { + var ik = rowI[k]; + var kj = rowK[j]; + var ij = rowI[j]; + var altDistance = ik.distance + kj.distance; + if (altDistance < ij.distance) { + ij.distance = altDistance; + ij.predecessor = kj.predecessor; + } + }); + }); + }); + + return results; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules +var _baseKeys = __webpack_require__(1852); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules +var _baseGetTag = __webpack_require__(8496); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js + + + + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); +} + +/* harmony default export */ const lodash_es_isString = (isString); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js + + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = (0,_baseProperty/* default */.A)('length'); + +/* harmony default export */ const _asciiSize = (asciiSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/* harmony default export */ const _hasUnicode = (hasUnicode); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js +/** Used to compose unicode character classes. */ +var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', + _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', + _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', + _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', + _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, + _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', + rsCombo = '[' + _unicodeSize_rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + _unicodeSize_rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', + rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +/* harmony default export */ const _unicodeSize = (unicodeSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js + + + + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return _hasUnicode(string) + ? _unicodeSize(string) + : _asciiSize(string); +} + +/* harmony default export */ const _stringSize = (stringSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + if (collection == null) { + return 0; + } + if ((0,isArrayLike/* default */.A)(collection)) { + return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; + } + var tag = (0,_getTag/* default */.A)(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return (0,_baseKeys/* default */.A)(collection).length; +} + +/* harmony default export */ const lodash_es_size = (size); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js + + + + +topsort_topsort.CycleException = topsort_CycleException; + +function topsort_topsort(g) { + var visited = {}; + var stack = {}; + var results = []; + + function visit(node) { + if (has/* default */.A(stack, node)) { + throw new topsort_CycleException(); + } + + if (!has/* default */.A(visited, node)) { + stack[node] = true; + visited[node] = true; + forEach/* default */.A(g.predecessors(node), visit); + delete stack[node]; + results.push(node); + } + } + + forEach/* default */.A(g.sinks(), visit); + + if (lodash_es_size(visited) !== g.nodeCount()) { + throw new topsort_CycleException(); + } + + return results; +} + +function topsort_CycleException() {} +topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js + + + + +function isAcyclic(g) { + try { + topsort(g); + } catch (e) { + if (e instanceof CycleException) { + return false; + } + throw e; + } + return true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js + + + + +/* + * A helper that preforms a pre- or post-order traversal on the input graph + * and returns the nodes in the order they were visited. If the graph is + * undirected then this algorithm will navigate using neighbors. If the graph + * is directed then this algorithm will navigate using successors. + * + * Order must be one of "pre" or "post". + */ +function dfs(g, vs, order) { + if (!isArray/* default */.A(vs)) { + vs = [vs]; + } + + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); + + var acc = []; + var visited = {}; + forEach/* default */.A(vs, function (v) { + if (!g.hasNode(v)) { + throw new Error('Graph does not have node: ' + v); + } + + doDfs(g, v, order === 'post', visited, navigation, acc); + }); + return acc; +} + +function doDfs(g, v, postorder, visited, navigation, acc) { + if (!has/* default */.A(visited, v)) { + visited[v] = true; + + if (!postorder) { + acc.push(v); + } + forEach/* default */.A(navigation(v), function (w) { + doDfs(g, w, postorder, visited, navigation, acc); + }); + if (postorder) { + acc.push(v); + } + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js + + + + +function postorder(g, vs) { + return dfs(g, vs, 'post'); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js + + + + +function preorder(g, vs) { + return dfs(g, vs, 'pre'); +} + +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules +var graph = __webpack_require__(3046); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js + + + + + + +function prim(g, weightFunc) { + var result = new Graph(); + var parents = {}; + var pq = new PriorityQueue(); + var v; + + function updateNeighbors(edge) { + var w = edge.v === v ? edge.w : edge.v; + var pri = pq.priority(w); + if (pri !== undefined) { + var edgeWeight = weightFunc(edge); + if (edgeWeight < pri) { + parents[w] = v; + pq.decrease(w, edgeWeight); + } + } + } + + if (g.nodeCount() === 0) { + return result; + } + + _.each(g.nodes(), function (v) { + pq.add(v, Number.POSITIVE_INFINITY); + result.setNode(v); + }); + + // Start from an arbitrary node + pq.decrease(g.nodes()[0], 0); + + var init = false; + while (pq.size() > 0) { + v = pq.removeMin(); + if (_.has(parents, v)) { + result.setEdge(v, parents[v]); + } else if (init) { + throw new Error('Input graph is not connected: ' + g); + } else { + init = true; + } + + g.nodeEdges(v).forEach(updateNeighbors); + } + + return result; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js + + + + + + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js + + + + + + + + +// Expose some internals for testing purposes +networkSimplex.initLowLimValues = initLowLimValues; +networkSimplex.initCutValues = initCutValues; +networkSimplex.calcCutValue = calcCutValue; +networkSimplex.leaveEdge = leaveEdge; +networkSimplex.enterEdge = enterEdge; +networkSimplex.exchangeEdges = exchangeEdges; + +/* + * The network simplex algorithm assigns ranks to each node in the input graph + * and iteratively improves the ranking to reduce the length of edges. + * + * Preconditions: + * + * 1. The input graph must be a DAG. + * 2. All nodes in the graph must have an object value. + * 3. All edges in the graph must have "minlen" and "weight" attributes. + * + * Postconditions: + * + * 1. All nodes in the graph will have an assigned "rank" attribute that has + * been optimized by the network simplex algorithm. Ranks start at 0. + * + * + * A rough sketch of the algorithm is as follows: + * + * 1. Assign initial ranks to each node. We use the longest path algorithm, + * which assigns ranks to the lowest position possible. In general this + * leads to very wide bottom ranks and unnecessarily long edges. + * 2. Construct a feasible tight tree. A tight tree is one such that all + * edges in the tree have no slack (difference between length of edge + * and minlen for the edge). This by itself greatly improves the assigned + * rankings by shorting edges. + * 3. Iteratively find edges that have negative cut values. Generally a + * negative cut value indicates that the edge could be removed and a new + * tree edge could be added to produce a more compact graph. + * + * Much of the algorithms here are derived from Gansner, et al., "A Technique + * for Drawing Directed Graphs." The structure of the file roughly follows the + * structure of the overall algorithm. + */ +function networkSimplex(g) { + g = simplify(g); + longestPath(g); + var t = feasibleTree(g); + initLowLimValues(t); + initCutValues(t, g); + + var e, f; + while ((e = leaveEdge(t))) { + f = enterEdge(t, g, e); + exchangeEdges(t, g, e, f); + } +} + +/* + * Initializes cut values for all edges in the tree. + */ +function initCutValues(t, g) { + var vs = postorder(t, t.nodes()); + vs = vs.slice(0, vs.length - 1); + forEach/* default */.A(vs, function (v) { + assignCutValue(t, g, v); + }); +} + +function assignCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + t.edge(child, parent).cutvalue = calcCutValue(t, g, child); +} + +/* + * Given the tight tree, its graph, and a child in the graph calculate and + * return the cut value for the edge between the child and its parent. + */ +function calcCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + // True if the child is on the tail end of the edge in the directed graph + var childIsTail = true; + // The graph's view of the tree edge we're inspecting + var graphEdge = g.edge(child, parent); + // The accumulated cut value for the edge between this node and its parent + var cutValue = 0; + + if (!graphEdge) { + childIsTail = false; + graphEdge = g.edge(parent, child); + } + + cutValue = graphEdge.weight; + + forEach/* default */.A(g.nodeEdges(child), function (e) { + var isOutEdge = e.v === child, + other = isOutEdge ? e.w : e.v; + + if (other !== parent) { + var pointsToHead = isOutEdge === childIsTail, + otherWeight = g.edge(e).weight; + + cutValue += pointsToHead ? otherWeight : -otherWeight; + if (isTreeEdge(t, child, other)) { + var otherCutValue = t.edge(child, other).cutvalue; + cutValue += pointsToHead ? -otherCutValue : otherCutValue; + } + } + }); + + return cutValue; +} + +function initLowLimValues(tree, root) { + if (arguments.length < 2) { + root = tree.nodes()[0]; + } + dfsAssignLowLim(tree, {}, 1, root); +} + +function dfsAssignLowLim(tree, visited, nextLim, v, parent) { + var low = nextLim; + var label = tree.node(v); + + visited[v] = true; + forEach/* default */.A(tree.neighbors(v), function (w) { + if (!has/* default */.A(visited, w)) { + nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); + } + }); + + label.low = low; + label.lim = nextLim++; + if (parent) { + label.parent = parent; + } else { + // TODO should be able to remove this when we incrementally update low lim + delete label.parent; + } + + return nextLim; +} + +function leaveEdge(tree) { + return lodash_es_find(tree.edges(), function (e) { + return tree.edge(e).cutvalue < 0; + }); +} + +function enterEdge(t, g, edge) { + var v = edge.v; + var w = edge.w; + + // For the rest of this function we assume that v is the tail and w is the + // head, so if we don't have this edge in the graph we should flip it to + // match the correct orientation. + if (!g.hasEdge(v, w)) { + v = edge.w; + w = edge.v; + } + + var vLabel = t.node(v); + var wLabel = t.node(w); + var tailLabel = vLabel; + var flip = false; + + // If the root is in the tail of the edge then we need to flip the logic that + // checks for the head and tail nodes in the candidates function below. + if (vLabel.lim > wLabel.lim) { + tailLabel = wLabel; + flip = true; + } + + var candidates = filter/* default */.A(g.edges(), function (edge) { + return ( + flip === isDescendant(t, t.node(edge.v), tailLabel) && + flip !== isDescendant(t, t.node(edge.w), tailLabel) + ); + }); + + return lodash_es_minBy(candidates, function (edge) { + return slack(g, edge); + }); +} + +function exchangeEdges(t, g, e, f) { + var v = e.v; + var w = e.w; + t.removeEdge(v, w); + t.setEdge(f.v, f.w, {}); + initLowLimValues(t); + initCutValues(t, g); + updateRanks(t, g); +} + +function updateRanks(t, g) { + var root = lodash_es_find(t.nodes(), function (v) { + return !g.node(v).parent; + }); + var vs = preorder(t, root); + vs = vs.slice(1); + forEach/* default */.A(vs, function (v) { + var parent = t.node(v).parent, + edge = g.edge(v, parent), + flipped = false; + + if (!edge) { + edge = g.edge(parent, v); + flipped = true; + } + + g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); + }); +} + +/* + * Returns true if the edge is in the tree. + */ +function isTreeEdge(tree, u, v) { + return tree.hasEdge(u, v); +} + +/* + * Returns true if the specified node is descendant of the root node per the + * assigned low and lim attributes in the tree. + */ +function isDescendant(tree, vLabel, rootLabel) { + return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js + + + + + + +/* + * Assigns a rank to each node in the input graph that respects the "minlen" + * constraint specified on edges between nodes. + * + * This basic structure is derived from Gansner, et al., "A Technique for + * Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a connected DAG + * 2. Graph nodes must be objects + * 3. Graph edges must have "weight" and "minlen" attributes + * + * Post-conditions: + * + * 1. Graph nodes will have a "rank" attribute based on the results of the + * algorithm. Ranks can start at any index (including negative), we'll + * fix them up later. + */ +function rank(g) { + switch (g.graph().ranker) { + case 'network-simplex': + networkSimplexRanker(g); + break; + case 'tight-tree': + tightTreeRanker(g); + break; + case 'longest-path': + longestPathRanker(g); + break; + default: + networkSimplexRanker(g); + } +} + +// A fast and simple ranker, but results are far from optimal. +var longestPathRanker = longestPath; + +function tightTreeRanker(g) { + longestPath(g); + feasibleTree(g); +} + +function networkSimplexRanker(g) { + networkSimplex(g); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js + + + + + +/* + * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, + * adds appropriate edges to ensure that all cluster nodes are placed between + * these boundries, and ensures that the graph is connected. + * + * In addition we ensure, through the use of the minlen property, that nodes + * and subgraph border nodes to not end up on the same rank. + * + * Preconditions: + * + * 1. Input graph is a DAG + * 2. Nodes in the input graph has a minlen attribute + * + * Postconditions: + * + * 1. Input graph is connected. + * 2. Dummy nodes are added for the tops and bottoms of subgraphs. + * 3. The minlen attribute for nodes is adjusted to ensure nodes do not + * get placed on the same rank as subgraph border nodes. + * + * The nesting graph idea comes from Sander, "Layout of Compound Directed + * Graphs." + */ +function nesting_graph_run(g) { + var root = addDummyNode(g, 'root', {}, '_root'); + var depths = treeDepths(g); + var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array + var nodeSep = 2 * height + 1; + + g.graph().nestingRoot = root; + + // Multiply minlen by nodeSep to align nodes on non-border ranks. + forEach/* default */.A(g.edges(), function (e) { + g.edge(e).minlen *= nodeSep; + }); + + // Calculate a weight that is sufficient to keep subgraphs vertically compact + var weight = sumWeights(g) + 1; + + // Create border nodes and link them up + forEach/* default */.A(g.children(), function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + }); + + // Save the multiplier for node layers for later removal of empty border + // layers. + g.graph().nodeRankFactor = nodeSep; +} + +function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { + var children = g.children(v); + if (!children.length) { + if (v !== root) { + g.setEdge(root, v, { weight: 0, minlen: nodeSep }); + } + return; + } + + var top = addBorderNode(g, '_bt'); + var bottom = addBorderNode(g, '_bb'); + var label = g.node(v); + + g.setParent(top, v); + label.borderTop = top; + g.setParent(bottom, v); + label.borderBottom = bottom; + + forEach/* default */.A(children, function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + + var childNode = g.node(child); + var childTop = childNode.borderTop ? childNode.borderTop : child; + var childBottom = childNode.borderBottom ? childNode.borderBottom : child; + var thisWeight = childNode.borderTop ? weight : 2 * weight; + var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; + + g.setEdge(top, childTop, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + + g.setEdge(childBottom, bottom, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + }); + + if (!g.parent(v)) { + g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); + } +} + +function treeDepths(g) { + var depths = {}; + function dfs(v, depth) { + var children = g.children(v); + if (children && children.length) { + forEach/* default */.A(children, function (child) { + dfs(child, depth + 1); + }); + } + depths[v] = depth; + } + forEach/* default */.A(g.children(), function (v) { + dfs(v, 1); + }); + return depths; +} + +function sumWeights(g) { + return reduce/* default */.A( + g.edges(), + function (acc, e) { + return acc + g.edge(e).weight; + }, + 0 + ); +} + +function cleanup(g) { + var graphLabel = g.graph(); + g.removeNode(graphLabel.nestingRoot); + delete graphLabel.nestingRoot; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.nestingEdge) { + g.removeEdge(e); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules +var _baseClone = __webpack_require__(1641); +;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js + + + + +function addSubgraphConstraints(g, cg, vs) { + var prev = {}, + rootPrev; + + forEach/* default */.A(vs, function (v) { + var child = g.parent(v), + parent, + prevChild; + while (child) { + parent = g.parent(child); + if (parent) { + prevChild = prev[parent]; + prev[parent] = child; + } else { + prevChild = rootPrev; + rootPrev = child; + } + if (prevChild && prevChild !== child) { + cg.setEdge(prevChild, child); + return; + } + child = parent; + } + }); + + /* + function dfs(v) { + var children = v ? g.children(v) : g.children(); + if (children.length) { + var min = Number.POSITIVE_INFINITY, + subgraphs = []; + _.each(children, function(child) { + var childMin = dfs(child); + if (g.children(child).length) { + subgraphs.push({ v: child, order: childMin }); + } + min = Math.min(min, childMin); + }); + _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { + cg.setEdge(prev.v, curr.v); + return curr; + }); + return min; + } + return g.node(v).order; + } + dfs(undefined); + */ +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js + + + + + +/* + * Constructs a graph that can be used to sort a layer of nodes. The graph will + * contain all base and subgraph nodes from the request layer in their original + * hierarchy and any edges that are incident on these nodes and are of the type + * requested by the "relationship" parameter. + * + * Nodes from the requested rank that do not have parents are assigned a root + * node in the output graph, which is set in the root graph attribute. This + * makes it easy to walk the hierarchy of movable nodes during ordering. + * + * Pre-conditions: + * + * 1. Input graph is a DAG + * 2. Base nodes in the input graph have a rank attribute + * 3. Subgraph nodes in the input graph has minRank and maxRank attributes + * 4. Edges have an assigned weight + * + * Post-conditions: + * + * 1. Output graph has all nodes in the movable rank with preserved + * hierarchy. + * 2. Root nodes in the movable layer are made children of the node + * indicated by the root attribute of the graph. + * 3. Non-movable nodes incident on movable nodes, selected by the + * relationship parameter, are included in the graph (without hierarchy). + * 4. Edges incident on movable nodes, selected by the relationship + * parameter, are added to the output graph. + * 5. The weights for copied edges are aggregated as need, since the output + * graph is not a multi-graph. + */ +function buildLayerGraph(g, rank, relationship) { + var root = createRootNode(g), + result = new graphlib/* Graph */.T({ compound: true }) + .setGraph({ root: root }) + .setDefaultNodeLabel(function (v) { + return g.node(v); + }); + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v), + parent = g.parent(v); + + if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { + result.setNode(v); + result.setParent(v, parent || root); + + // This assumes we have only short edges! + forEach/* default */.A(g[relationship](v), function (e) { + var u = e.v === v ? e.w : e.v, + edge = result.edge(u, v), + weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; + result.setEdge(u, v, { weight: g.edge(e).weight + weight }); + }); + + if (has/* default */.A(node, 'minRank')) { + result.setNode(v, { + borderLeft: node.borderLeft[rank], + borderRight: node.borderRight[rank], + }); + } + } + }); + + return result; +} + +function createRootNode(g) { + var v; + while (g.hasNode((v = uniqueId/* default */.A('_root')))); + return v; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +/* harmony default export */ const _baseZipObject = (baseZipObject); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js + + + +/** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ +function zipObject(props, values) { + return _baseZipObject(props || [], values || [], _assignValue/* default */.A); +} + +/* harmony default export */ const lodash_es_zipObject = (zipObject); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js +var _baseMap = __webpack_require__(2568); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +/* harmony default export */ const _baseSortBy = (baseSortBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js + + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = (0,isSymbol/* default */.A)(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = (0,isSymbol/* default */.A)(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +/* harmony default export */ const _compareAscending = (compareAscending); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js + + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = _compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +/* harmony default export */ const _compareMultiple = (compareMultiple); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js + + + + + + + + + + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + if ((0,isArray/* default */.A)(iteratee)) { + return function(value) { + return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity/* default */.A]; + } + + var index = -1; + iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); + + var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { + var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return _baseSortBy(result, function(object, other) { + return _compareMultiple(object, other, orders); + }); +} + +/* harmony default export */ const _baseOrderBy = (baseOrderBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js + + + + + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ +var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); +}); + +/* harmony default export */ const lodash_es_sortBy = (sortBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js + + + + +/* + * A function that takes a layering (an array of layers, each with an array of + * ordererd nodes) and a graph and returns a weighted crossing count. + * + * Pre-conditions: + * + * 1. Input graph must be simple (not a multigraph), directed, and include + * only simple edges. + * 2. Edges in the input graph must have assigned weights. + * + * Post-conditions: + * + * 1. The graph and layering matrix are left unchanged. + * + * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." + */ +function crossCount(g, layering) { + var cc = 0; + for (var i = 1; i < layering.length; ++i) { + cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); + } + return cc; +} + +function twoLayerCrossCount(g, northLayer, southLayer) { + // Sort all of the edges between the north and south layers by their position + // in the north layer and then the south. Map these edges to the position of + // their head in the south layer. + var southPos = lodash_es_zipObject( + southLayer, + map/* default */.A(southLayer, function (v, i) { + return i; + }) + ); + var southEntries = flatten/* default */.A( + map/* default */.A(northLayer, function (v) { + return lodash_es_sortBy( + map/* default */.A(g.outEdges(v), function (e) { + return { pos: southPos[e.w], weight: g.edge(e).weight }; + }), + 'pos' + ); + }) + ); + + // Build the accumulator tree + var firstIndex = 1; + while (firstIndex < southLayer.length) firstIndex <<= 1; + var treeSize = 2 * firstIndex - 1; + firstIndex -= 1; + var tree = map/* default */.A(new Array(treeSize), function () { + return 0; + }); + + // Calculate the weighted crossings + var cc = 0; + forEach/* default */.A( + // @ts-expect-error + southEntries.forEach(function (entry) { + var index = entry.pos + firstIndex; + tree[index] += entry.weight; + var weightSum = 0; + // @ts-expect-error + while (index > 0) { + // @ts-expect-error + if (index % 2) { + weightSum += tree[index + 1]; + } + // @ts-expect-error + index = (index - 1) >> 1; + tree[index] += entry.weight; + } + cc += entry.weight * weightSum; + }) + ); + + return cc; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js + + + + +/* + * Assigns an initial order value for each node by performing a DFS search + * starting from nodes in the first rank. Nodes are assigned an order in their + * rank as they are first visited. + * + * This approach comes from Gansner, et al., "A Technique for Drawing Directed + * Graphs." + * + * Returns a layering matrix with an array per layer and each layer sorted by + * the order of its nodes. + */ +function initOrder(g) { + var visited = {}; + var simpleNodes = filter/* default */.A(g.nodes(), function (v) { + return !g.children(v).length; + }); + var maxRank = lodash_es_max( + map/* default */.A(simpleNodes, function (v) { + return g.node(v).rank; + }) + ); + var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { + return []; + }); + + function dfs(v) { + if (has/* default */.A(visited, v)) return; + visited[v] = true; + var node = g.node(v); + layers[node.rank].push(v); + forEach/* default */.A(g.successors(v), dfs); + } + + var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { + return g.node(v).rank; + }); + forEach/* default */.A(orderedVs, dfs); + + return layers; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js + + + + +function barycenter(g, movable) { + return map/* default */.A(movable, function (v) { + var inV = g.inEdges(v); + if (!inV.length) { + return { v: v }; + } else { + var result = reduce/* default */.A( + inV, + function (acc, e) { + var edge = g.edge(e), + nodeU = g.node(e.v); + return { + sum: acc.sum + edge.weight * nodeU.order, + weight: acc.weight + edge.weight, + }; + }, + { sum: 0, weight: 0 } + ); + + return { + v: v, + barycenter: result.sum / result.weight, + weight: result.weight, + }; + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js + + + + +/* + * Given a list of entries of the form {v, barycenter, weight} and a + * constraint graph this function will resolve any conflicts between the + * constraint graph and the barycenters for the entries. If the barycenters for + * an entry would violate a constraint in the constraint graph then we coalesce + * the nodes in the conflict into a new node that respects the contraint and + * aggregates barycenter and weight information. + * + * This implementation is based on the description in Forster, "A Fast and + * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it + * differs in some specific details. + * + * Pre-conditions: + * + * 1. Each entry has the form {v, barycenter, weight}, or if the node has + * no barycenter, then {v}. + * + * Returns: + * + * A new list of entries of the form {vs, i, barycenter, weight}. The list + * `vs` may either be a singleton or it may be an aggregation of nodes + * ordered such that they do not violate constraints from the constraint + * graph. The property `i` is the lowest original index of any of the + * elements in `vs`. + */ +function resolveConflicts(entries, cg) { + var mappedEntries = {}; + forEach/* default */.A(entries, function (entry, i) { + var tmp = (mappedEntries[entry.v] = { + indegree: 0, + in: [], + out: [], + vs: [entry.v], + i: i, + }); + if (!isUndefined/* default */.A(entry.barycenter)) { + // @ts-expect-error + tmp.barycenter = entry.barycenter; + // @ts-expect-error + tmp.weight = entry.weight; + } + }); + + forEach/* default */.A(cg.edges(), function (e) { + var entryV = mappedEntries[e.v]; + var entryW = mappedEntries[e.w]; + if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { + entryW.indegree++; + entryV.out.push(mappedEntries[e.w]); + } + }); + + var sourceSet = filter/* default */.A(mappedEntries, function (entry) { + // @ts-expect-error + return !entry.indegree; + }); + + return doResolveConflicts(sourceSet); +} + +function doResolveConflicts(sourceSet) { + var entries = []; + + function handleIn(vEntry) { + return function (uEntry) { + if (uEntry.merged) { + return; + } + if ( + isUndefined/* default */.A(uEntry.barycenter) || + isUndefined/* default */.A(vEntry.barycenter) || + uEntry.barycenter >= vEntry.barycenter + ) { + mergeEntries(vEntry, uEntry); + } + }; + } + + function handleOut(vEntry) { + return function (wEntry) { + wEntry['in'].push(vEntry); + if (--wEntry.indegree === 0) { + sourceSet.push(wEntry); + } + }; + } + + while (sourceSet.length) { + var entry = sourceSet.pop(); + entries.push(entry); + forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); + forEach/* default */.A(entry.out, handleOut(entry)); + } + + return map/* default */.A( + filter/* default */.A(entries, function (entry) { + return !entry.merged; + }), + function (entry) { + return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); + } + ); +} + +function mergeEntries(target, source) { + var sum = 0; + var weight = 0; + + if (target.weight) { + sum += target.barycenter * target.weight; + weight += target.weight; + } + + if (source.weight) { + sum += source.barycenter * source.weight; + weight += source.weight; + } + + target.vs = source.vs.concat(target.vs); + target.barycenter = sum / weight; + target.weight = weight; + target.i = Math.min(source.i, target.i); + source.merged = true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js + + + + + +function sort(entries, biasRight) { + var parts = partition(entries, function (entry) { + return has/* default */.A(entry, 'barycenter'); + }); + var sortable = parts.lhs, + unsortable = lodash_es_sortBy(parts.rhs, function (entry) { + return -entry.i; + }), + vs = [], + sum = 0, + weight = 0, + vsIndex = 0; + + sortable.sort(compareWithBias(!!biasRight)); + + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + + forEach/* default */.A(sortable, function (entry) { + vsIndex += entry.vs.length; + vs.push(entry.vs); + sum += entry.barycenter * entry.weight; + weight += entry.weight; + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + }); + + var result = { vs: flatten/* default */.A(vs) }; + if (weight) { + result.barycenter = sum / weight; + result.weight = weight; + } + return result; +} + +function consumeUnsortable(vs, unsortable, index) { + var last; + while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { + unsortable.pop(); + vs.push(last.vs); + index++; + } + return index; +} + +function compareWithBias(bias) { + return function (entryV, entryW) { + if (entryV.barycenter < entryW.barycenter) { + return -1; + } else if (entryV.barycenter > entryW.barycenter) { + return 1; + } + + return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; + }; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js + + + + + + + +function sortSubgraph(g, v, cg, biasRight) { + var movable = g.children(v); + var node = g.node(v); + var bl = node ? node.borderLeft : undefined; + var br = node ? node.borderRight : undefined; + var subgraphs = {}; + + if (bl) { + movable = filter/* default */.A(movable, function (w) { + return w !== bl && w !== br; + }); + } + + var barycenters = barycenter(g, movable); + forEach/* default */.A(barycenters, function (entry) { + if (g.children(entry.v).length) { + var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); + subgraphs[entry.v] = subgraphResult; + if (has/* default */.A(subgraphResult, 'barycenter')) { + mergeBarycenters(entry, subgraphResult); + } + } + }); + + var entries = resolveConflicts(barycenters, cg); + expandSubgraphs(entries, subgraphs); + + var result = sort(entries, biasRight); + + if (bl) { + result.vs = flatten/* default */.A([bl, result.vs, br]); + if (g.predecessors(bl).length) { + var blPred = g.node(g.predecessors(bl)[0]), + brPred = g.node(g.predecessors(br)[0]); + if (!has/* default */.A(result, 'barycenter')) { + result.barycenter = 0; + result.weight = 0; + } + result.barycenter = + (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); + result.weight += 2; + } + } + + return result; +} + +function expandSubgraphs(entries, subgraphs) { + forEach/* default */.A(entries, function (entry) { + entry.vs = flatten/* default */.A( + entry.vs.map(function (v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }) + ); + }); +} + +function mergeBarycenters(target, other) { + if (!isUndefined/* default */.A(target.barycenter)) { + target.barycenter = + (target.barycenter * target.weight + other.barycenter * other.weight) / + (target.weight + other.weight); + target.weight += other.weight; + } else { + target.barycenter = other.barycenter; + target.weight = other.weight; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js + + + + + + + + + + + +/* + * Applies heuristics to minimize edge crossings in the graph and sets the best + * order solution as an order attribute on each node. + * + * Pre-conditions: + * + * 1. Graph must be DAG + * 2. Graph nodes must be objects with a "rank" attribute + * 3. Graph edges must have the "weight" attribute + * + * Post-conditions: + * + * 1. Graph nodes will have an "order" attribute based on the results of the + * algorithm. + */ +function order(g) { + var maxRank = util_maxRank(g), + downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), + upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); + + var layering = initOrder(g); + assignOrder(g, layering); + + var bestCC = Number.POSITIVE_INFINITY, + best; + + for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { + sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); + + layering = buildLayerMatrix(g); + var cc = crossCount(g, layering); + if (cc < bestCC) { + lastBest = 0; + best = lodash_es_cloneDeep(layering); + bestCC = cc; + } + } + + assignOrder(g, best); +} + +function buildLayerGraphs(g, ranks, relationship) { + return map/* default */.A(ranks, function (rank) { + return buildLayerGraph(g, rank, relationship); + }); +} + +function sweepLayerGraphs(layerGraphs, biasRight) { + var cg = new graphlib/* Graph */.T(); + forEach/* default */.A(layerGraphs, function (lg) { + var root = lg.graph().root; + var sorted = sortSubgraph(lg, root, cg, biasRight); + forEach/* default */.A(sorted.vs, function (v, i) { + lg.node(v).order = i; + }); + addSubgraphConstraints(lg, cg, sorted.vs); + }); +} + +function assignOrder(g, layering) { + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, i) { + g.node(v).order = i; + }); + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js + + + + +function parentDummyChains(g) { + var postorderNums = parent_dummy_chains_postorder(g); + + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var edgeObj = node.edgeObj; + var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); + var path = pathData.path; + var lca = pathData.lca; + var pathIdx = 0; + var pathV = path[pathIdx]; + var ascending = true; + + while (v !== edgeObj.w) { + node = g.node(v); + + if (ascending) { + while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { + pathIdx++; + } + + if (pathV === lca) { + ascending = false; + } + } + + if (!ascending) { + while ( + pathIdx < path.length - 1 && + g.node((pathV = path[pathIdx + 1])).minRank <= node.rank + ) { + pathIdx++; + } + pathV = path[pathIdx]; + } + + g.setParent(v, pathV); + v = g.successors(v)[0]; + } + }); +} + +// Find a path from v to w through the lowest common ancestor (LCA). Return the +// full path and the LCA. +function findPath(g, postorderNums, v, w) { + var vPath = []; + var wPath = []; + var low = Math.min(postorderNums[v].low, postorderNums[w].low); + var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); + var parent; + var lca; + + // Traverse up from v to find the LCA + parent = v; + do { + parent = g.parent(parent); + vPath.push(parent); + } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); + lca = parent; + + // Traverse from w to LCA + parent = w; + while ((parent = g.parent(parent)) !== lca) { + wPath.push(parent); + } + + return { path: vPath.concat(wPath.reverse()), lca: lca }; +} + +function parent_dummy_chains_postorder(g) { + var result = {}; + var lim = 0; + + function dfs(v) { + var low = lim; + forEach/* default */.A(g.children(v), dfs); + result[v] = { low: low, lim: lim++ }; + } + forEach/* default */.A(g.children(), dfs); + + return result; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js +var _castFunction = __webpack_require__(9922); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js + + + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); +} + +/* harmony default export */ const lodash_es_forOwn = (forOwn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules +var _baseFor = __webpack_require__(4574); +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js + + + + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); +} + +/* harmony default export */ const lodash_es_forIn = (forIn); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js + + + + +/* + * This module provides coordinate assignment based on Brandes and Köpf, "Fast + * and Simple Horizontal Coordinate Assignment." + */ + + + +/* + * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" + * property. A type-1 conflict is one where a non-inner segment crosses an + * inner segment. An inner segment is an edge with both incident nodes marked + * with the "dummy" property. + * + * This algorithm scans layer by layer, starting with the second, for type-1 + * conflicts between the current layer and the previous layer. For each layer + * it scans the nodes from left to right until it reaches one that is incident + * on an inner segment. It then scans predecessors to determine if they have + * edges that cross that inner segment. At the end a final scan is done for all + * nodes on the current rank to see if they cross the last visited inner + * segment. + * + * This algorithm (safely) assumes that a dummy node will only be incident on a + * single node in the layers being scanned. + */ +function findType1Conflicts(g, layering) { + var conflicts = {}; + + function visitLayer(prevLayer, layer) { + var // last visited node in the previous layer that is incident on an inner + // segment. + k0 = 0, + // Tracks the last node in this layer scanned for crossings with a type-1 + // segment. + scanPos = 0, + prevLayerLength = prevLayer.length, + lastNode = lodash_es_last(layer); + + forEach/* default */.A(layer, function (v, i) { + var w = findOtherInnerSegmentNode(g, v), + k1 = w ? g.node(w).order : prevLayerLength; + + if (w || v === lastNode) { + forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { + forEach/* default */.A(g.predecessors(scanNode), function (u) { + var uLabel = g.node(u), + uPos = uLabel.order; + if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { + addConflict(conflicts, u, scanNode); + } + }); + }); + // @ts-expect-error + scanPos = i + 1; + k0 = k1; + } + }); + + return layer; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findType2Conflicts(g, layering) { + var conflicts = {}; + + function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { + var v; + forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { + v = south[i]; + if (g.node(v).dummy) { + forEach/* default */.A(g.predecessors(v), function (u) { + var uNode = g.node(u); + if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { + addConflict(conflicts, u, v); + } + }); + } + }); + } + + function visitLayer(north, south) { + var prevNorthPos = -1, + nextNorthPos, + southPos = 0; + + forEach/* default */.A(south, function (v, southLookahead) { + if (g.node(v).dummy === 'border') { + var predecessors = g.predecessors(v); + if (predecessors.length) { + nextNorthPos = g.node(predecessors[0]).order; + scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); + // @ts-expect-error + southPos = southLookahead; + prevNorthPos = nextNorthPos; + } + } + scan(south, southPos, south.length, nextNorthPos, north.length); + }); + + return south; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findOtherInnerSegmentNode(g, v) { + if (g.node(v).dummy) { + return lodash_es_find(g.predecessors(v), function (u) { + return g.node(u).dummy; + }); + } +} + +function addConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + + var conflictsV = conflicts[v]; + if (!conflictsV) { + conflicts[v] = conflictsV = {}; + } + conflictsV[w] = true; +} + +function hasConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + return has/* default */.A(conflicts[v], w); +} + +/* + * Try to align nodes into vertical "blocks" where possible. This algorithm + * attempts to align a node with one of its median neighbors. If the edge + * connecting a neighbor is a type-1 conflict then we ignore that possibility. + * If a previous node has already formed a block with a node after the node + * we're trying to form a block with, we also ignore that possibility - our + * blocks would be split in that scenario. + */ +function verticalAlignment(g, layering, conflicts, neighborFn) { + var root = {}, + align = {}, + pos = {}; + + // We cache the position here based on the layering because the graph and + // layering may be out of sync. The layering matrix is manipulated to + // generate different extreme alignments. + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, order) { + root[v] = v; + align[v] = v; + pos[v] = order; + }); + }); + + forEach/* default */.A(layering, function (layer) { + var prevIdx = -1; + forEach/* default */.A(layer, function (v) { + var ws = neighborFn(v); + if (ws.length) { + ws = lodash_es_sortBy(ws, function (w) { + return pos[w]; + }); + var mp = (ws.length - 1) / 2; + for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { + var w = ws[i]; + if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { + align[w] = v; + align[v] = root[v] = root[w]; + prevIdx = pos[w]; + } + } + } + }); + }); + + return { root: root, align: align }; +} + +function horizontalCompaction(g, layering, root, align, reverseSep) { + // This portion of the algorithm differs from BK due to a number of problems. + // Instead of their algorithm we construct a new block graph and do two + // sweeps. The first sweep places blocks with the smallest possible + // coordinates. The second sweep removes unused space by moving blocks to the + // greatest coordinates without violating separation. + var xs = {}, + blockG = buildBlockGraph(g, layering, root, reverseSep), + borderType = reverseSep ? 'borderLeft' : 'borderRight'; + + function iterate(setXsFunc, nextNodesFunc) { + var stack = blockG.nodes(); + var elem = stack.pop(); + var visited = {}; + while (elem) { + if (visited[elem]) { + setXsFunc(elem); + } else { + visited[elem] = true; + stack.push(elem); + stack = stack.concat(nextNodesFunc(elem)); + } + + elem = stack.pop(); + } + } + + // First pass, assign smallest coordinates + function pass1(elem) { + xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { + return Math.max(acc, xs[e.v] + blockG.edge(e)); + }, 0); + } + + // Second pass, assign greatest coordinates + function pass2(elem) { + var min = blockG.outEdges(elem).reduce(function (acc, e) { + return Math.min(acc, xs[e.w] - blockG.edge(e)); + }, Number.POSITIVE_INFINITY); + + var node = g.node(elem); + if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { + xs[elem] = Math.max(xs[elem], min); + } + } + + iterate(pass1, blockG.predecessors.bind(blockG)); + iterate(pass2, blockG.successors.bind(blockG)); + + // Assign x coordinates to all nodes + forEach/* default */.A(align, function (v) { + xs[v] = xs[root[v]]; + }); + + return xs; +} + +function buildBlockGraph(g, layering, root, reverseSep) { + var blockGraph = new graphlib/* Graph */.T(), + graphLabel = g.graph(), + sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); + + forEach/* default */.A(layering, function (layer) { + var u; + forEach/* default */.A(layer, function (v) { + var vRoot = root[v]; + blockGraph.setNode(vRoot); + if (u) { + var uRoot = root[u], + prevMax = blockGraph.edge(uRoot, vRoot); + blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); + } + u = v; + }); + }); + + return blockGraph; +} + +/* + * Returns the alignment that has the smallest width of the given alignments. + */ +function findSmallestWidthAlignment(g, xss) { + return lodash_es_minBy(values/* default */.A(xss), function (xs) { + var max = Number.NEGATIVE_INFINITY; + var min = Number.POSITIVE_INFINITY; + + lodash_es_forIn(xs, function (x, v) { + var halfWidth = width(g, v) / 2; + + max = Math.max(x + halfWidth, max); + min = Math.min(x - halfWidth, min); + }); + + return max - min; + }); +} + +/* + * Align the coordinates of each of the layout alignments such that + * left-biased alignments have their minimum coordinate at the same point as + * the minimum coordinate of the smallest width alignment and right-biased + * alignments have their maximum coordinate at the same point as the maximum + * coordinate of the smallest width alignment. + */ +function alignCoordinates(xss, alignTo) { + var alignToVals = values/* default */.A(alignTo), + alignToMin = lodash_es_min(alignToVals), + alignToMax = lodash_es_max(alignToVals); + + forEach/* default */.A(['u', 'd'], function (vert) { + forEach/* default */.A(['l', 'r'], function (horiz) { + var alignment = vert + horiz, + xs = xss[alignment], + delta; + if (xs === alignTo) return; + + var xsVals = values/* default */.A(xs); + delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); + + if (delta) { + xss[alignment] = lodash_es_mapValues(xs, function (x) { + return x + delta; + }); + } + }); + }); +} + +function balance(xss, align) { + return lodash_es_mapValues(xss.ul, function (ignore, v) { + if (align) { + return xss[align.toLowerCase()][v]; + } else { + var xs = lodash_es_sortBy(map/* default */.A(xss, v)); + return (xs[1] + xs[2]) / 2; + } + }); +} + +function positionX(g) { + var layering = buildLayerMatrix(g); + var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); + + var xss = {}; + var adjustedLayering; + forEach/* default */.A(['u', 'd'], function (vert) { + adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); + forEach/* default */.A(['l', 'r'], function (horiz) { + if (horiz === 'r') { + adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { + return values/* default */.A(inner).reverse(); + }); + } + + var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); + var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); + var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); + if (horiz === 'r') { + xs = lodash_es_mapValues(xs, function (x) { + return -x; + }); + } + xss[vert + horiz] = xs; + }); + }); + + var smallestWidth = findSmallestWidthAlignment(g, xss); + alignCoordinates(xss, smallestWidth); + return balance(xss, g.graph().align); +} + +function sep(nodeSep, edgeSep, reverseSep) { + return function (g, v, w) { + var vLabel = g.node(v); + var wLabel = g.node(w); + var sum = 0; + var delta; + + sum += vLabel.width / 2; + if (has/* default */.A(vLabel, 'labelpos')) { + switch (vLabel.labelpos.toLowerCase()) { + case 'l': + delta = -vLabel.width / 2; + break; + case 'r': + delta = vLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; + sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; + + sum += wLabel.width / 2; + if (has/* default */.A(wLabel, 'labelpos')) { + switch (wLabel.labelpos.toLowerCase()) { + case 'l': + delta = wLabel.width / 2; + break; + case 'r': + delta = -wLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + return sum; + }; +} + +function width(g, v) { + return g.node(v).width; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js + + + + + + +function position(g) { + g = asNonCompoundGraph(g); + + positionY(g); + lodash_es_forOwn(positionX(g), function (x, v) { + g.node(v).x = x; + }); +} + +function positionY(g) { + var layering = buildLayerMatrix(g); + var rankSep = g.graph().ranksep; + var prevY = 0; + forEach/* default */.A(layering, function (layer) { + var maxHeight = lodash_es_max( + map/* default */.A(layer, function (v) { + return g.node(v).height; + }) + ); + forEach/* default */.A(layer, function (v) { + g.node(v).y = prevY + maxHeight / 2; + }); + prevY += maxHeight + rankSep; + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js + + + + + + + + + + + + + + + +function layout(g, opts) { + var time = opts && opts.debugTiming ? util_time : notime; + time('layout', function () { + var layoutGraph = time(' buildLayoutGraph', function () { + return buildLayoutGraph(g); + }); + time(' runLayout', function () { + runLayout(layoutGraph, time); + }); + time(' updateInputGraph', function () { + updateInputGraph(g, layoutGraph); + }); + }); +} + +function runLayout(g, time) { + time(' makeSpaceForEdgeLabels', function () { + makeSpaceForEdgeLabels(g); + }); + time(' removeSelfEdges', function () { + removeSelfEdges(g); + }); + time(' acyclic', function () { + run(g); + }); + time(' nestingGraph.run', function () { + nesting_graph_run(g); + }); + time(' rank', function () { + rank(asNonCompoundGraph(g)); + }); + time(' injectEdgeLabelProxies', function () { + injectEdgeLabelProxies(g); + }); + time(' removeEmptyRanks', function () { + removeEmptyRanks(g); + }); + time(' nestingGraph.cleanup', function () { + cleanup(g); + }); + time(' normalizeRanks', function () { + normalizeRanks(g); + }); + time(' assignRankMinMax', function () { + assignRankMinMax(g); + }); + time(' removeEdgeLabelProxies', function () { + removeEdgeLabelProxies(g); + }); + time(' normalize.run', function () { + normalize_run(g); + }); + time(' parentDummyChains', function () { + parentDummyChains(g); + }); + time(' addBorderSegments', function () { + addBorderSegments(g); + }); + time(' order', function () { + order(g); + }); + time(' insertSelfEdges', function () { + insertSelfEdges(g); + }); + time(' adjustCoordinateSystem', function () { + adjust(g); + }); + time(' position', function () { + position(g); + }); + time(' positionSelfEdges', function () { + positionSelfEdges(g); + }); + time(' removeBorderNodes', function () { + removeBorderNodes(g); + }); + time(' normalize.undo', function () { + normalize_undo(g); + }); + time(' fixupEdgeLabelCoords', function () { + fixupEdgeLabelCoords(g); + }); + time(' undoCoordinateSystem', function () { + coordinate_system_undo(g); + }); + time(' translateGraph', function () { + translateGraph(g); + }); + time(' assignNodeIntersects', function () { + assignNodeIntersects(g); + }); + time(' reversePoints', function () { + reversePointsForReversedEdges(g); + }); + time(' acyclic.undo', function () { + undo(g); + }); +} + +/* + * Copies final layout information from the layout graph back to the input + * graph. This process only copies whitelisted attributes from the layout graph + * to the input graph, so it serves as a good place to determine what + * attributes can influence layout. + */ +function updateInputGraph(inputGraph, layoutGraph) { + forEach/* default */.A(inputGraph.nodes(), function (v) { + var inputLabel = inputGraph.node(v); + var layoutLabel = layoutGraph.node(v); + + if (inputLabel) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + + if (layoutGraph.children(v).length) { + inputLabel.width = layoutLabel.width; + inputLabel.height = layoutLabel.height; + } + } + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var inputLabel = inputGraph.edge(e); + var layoutLabel = layoutGraph.edge(e); + + inputLabel.points = layoutLabel.points; + if (has/* default */.A(layoutLabel, 'x')) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + } + }); + + inputGraph.graph().width = layoutGraph.graph().width; + inputGraph.graph().height = layoutGraph.graph().height; +} + +var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; +var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; +var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; +var nodeNumAttrs = ['width', 'height']; +var nodeDefaults = { width: 0, height: 0 }; +var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; +var edgeDefaults = { + minlen: 1, + weight: 1, + width: 0, + height: 0, + labeloffset: 10, + labelpos: 'r', +}; +var edgeAttrs = ['labelpos']; + +/* + * Constructs a new graph from the input graph, which can be used for layout. + * This process copies only whitelisted attributes from the input graph to the + * layout graph. Thus this function serves as a good place to determine what + * attributes can influence layout. + */ +function buildLayoutGraph(inputGraph) { + var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); + var graph = canonicalize(inputGraph.graph()); + + g.setGraph( + merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) + ); + + forEach/* default */.A(inputGraph.nodes(), function (v) { + var node = canonicalize(inputGraph.node(v)); + g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); + g.setParent(v, inputGraph.parent(v)); + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var edge = canonicalize(inputGraph.edge(e)); + g.setEdge( + e, + merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) + ); + }); + + return g; +} + +/* + * This idea comes from the Gansner paper: to account for edge labels in our + * layout we split each rank in half by doubling minlen and halving ranksep. + * Then we can place labels at these mid-points between nodes. + * + * We also add some minimal padding to the width to push the label for the edge + * away from the edge itself a bit. + */ +function makeSpaceForEdgeLabels(g) { + var graph = g.graph(); + graph.ranksep /= 2; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + edge.minlen *= 2; + if (edge.labelpos.toLowerCase() !== 'c') { + if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { + edge.width += edge.labeloffset; + } else { + edge.height += edge.labeloffset; + } + } + }); +} + +/* + * Creates temporary dummy nodes that capture the rank in which each edge's + * label is going to, if it has one of non-zero width and height. We do this + * so that we can safely remove empty ranks while preserving balance for the + * label's position. + */ +function injectEdgeLabelProxies(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.width && edge.height) { + var v = g.node(e.v); + var w = g.node(e.w); + var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; + addDummyNode(g, 'edge-proxy', label, '_ep'); + } + }); +} + +function assignRankMinMax(g) { + var maxRank = 0; + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.borderTop) { + node.minRank = g.node(node.borderTop).rank; + node.maxRank = g.node(node.borderBottom).rank; + // @ts-expect-error + maxRank = lodash_es_max(maxRank, node.maxRank); + } + }); + g.graph().maxRank = maxRank; +} + +function removeEdgeLabelProxies(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'edge-proxy') { + g.edge(node.e).labelRank = node.rank; + g.removeNode(v); + } + }); +} + +function translateGraph(g) { + var minX = Number.POSITIVE_INFINITY; + var maxX = 0; + var minY = Number.POSITIVE_INFINITY; + var maxY = 0; + var graphLabel = g.graph(); + var marginX = graphLabel.marginx || 0; + var marginY = graphLabel.marginy || 0; + + function getExtremes(attrs) { + var x = attrs.x; + var y = attrs.y; + var w = attrs.width; + var h = attrs.height; + minX = Math.min(minX, x - w / 2); + maxX = Math.max(maxX, x + w / 2); + minY = Math.min(minY, y - h / 2); + maxY = Math.max(maxY, y + h / 2); + } + + forEach/* default */.A(g.nodes(), function (v) { + getExtremes(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + getExtremes(edge); + } + }); + + minX -= marginX; + minY -= marginY; + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + node.x -= minX; + node.y -= minY; + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, function (p) { + p.x -= minX; + p.y -= minY; + }); + if (has/* default */.A(edge, 'x')) { + edge.x -= minX; + } + if (has/* default */.A(edge, 'y')) { + edge.y -= minY; + } + }); + + graphLabel.width = maxX - minX + marginX; + graphLabel.height = maxY - minY + marginY; +} + +function assignNodeIntersects(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + var nodeV = g.node(e.v); + var nodeW = g.node(e.w); + var p1, p2; + if (!edge.points) { + edge.points = []; + p1 = nodeW; + p2 = nodeV; + } else { + p1 = edge.points[0]; + p2 = edge.points[edge.points.length - 1]; + } + edge.points.unshift(intersectRect(nodeV, p1)); + edge.points.push(intersectRect(nodeW, p2)); + }); +} + +function fixupEdgeLabelCoords(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + if (edge.labelpos === 'l' || edge.labelpos === 'r') { + edge.width -= edge.labeloffset; + } + switch (edge.labelpos) { + case 'l': + edge.x -= edge.width / 2 + edge.labeloffset; + break; + case 'r': + edge.x += edge.width / 2 + edge.labeloffset; + break; + } + } + }); +} + +function reversePointsForReversedEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.reversed) { + edge.points.reverse(); + } + }); +} + +function removeBorderNodes(g) { + forEach/* default */.A(g.nodes(), function (v) { + if (g.children(v).length) { + var node = g.node(v); + var t = g.node(node.borderTop); + var b = g.node(node.borderBottom); + var l = g.node(lodash_es_last(node.borderLeft)); + var r = g.node(lodash_es_last(node.borderRight)); + + node.width = Math.abs(r.x - l.x); + node.height = Math.abs(b.y - t.y); + node.x = l.x + node.width / 2; + node.y = t.y + node.height / 2; + } + }); + + forEach/* default */.A(g.nodes(), function (v) { + if (g.node(v).dummy === 'border') { + g.removeNode(v); + } + }); +} + +function removeSelfEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + if (e.v === e.w) { + var node = g.node(e.v); + if (!node.selfEdges) { + node.selfEdges = []; + } + node.selfEdges.push({ e: e, label: g.edge(e) }); + g.removeEdge(e); + } + }); +} + +function insertSelfEdges(g) { + var layers = buildLayerMatrix(g); + forEach/* default */.A(layers, function (layer) { + var orderShift = 0; + forEach/* default */.A(layer, function (v, i) { + var node = g.node(v); + node.order = i + orderShift; + forEach/* default */.A(node.selfEdges, function (selfEdge) { + addDummyNode( + g, + 'selfedge', + { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node.rank, + order: i + ++orderShift, + e: selfEdge.e, + label: selfEdge.label, + }, + '_se' + ); + }); + delete node.selfEdges; + }); + }); +} + +function positionSelfEdges(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'selfedge') { + var selfNode = g.node(node.e.v); + var x = selfNode.x + selfNode.width / 2; + var y = selfNode.y; + var dx = node.x - x; + var dy = selfNode.height / 2; + g.setEdge(node.e, node.label); + g.removeNode(v); + node.label.points = [ + { x: x + (2 * dx) / 3, y: y - dy }, + { x: x + (5 * dx) / 6, y: y - dy }, + { x: x + dx, y: y }, + { x: x + (5 * dx) / 6, y: y + dy }, + { x: x + (2 * dx) / 3, y: y + dy }, + ]; + node.label.x = node.x; + node.label.y = node.y; + } + }); +} + +function selectNumberAttrs(obj, attrs) { + return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); +} + +function canonicalize(attrs) { + var newAttrs = {}; + forEach/* default */.A(attrs, function (v, k) { + newAttrs[k.toLowerCase()] = v; + }); + return newAttrs; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + + + + + + + + +/***/ }), + +/***/ 3046: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + T: () => (/* binding */ Graph) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js +var isFunction = __webpack_require__(9610); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js +var isEmpty = __webpack_require__(6401); +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/* harmony default export */ const _baseIsNaN = (baseIsNaN); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/* harmony default export */ const _strictIndexOf = (strictIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js + + + + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? _strictIndexOf(array, value, fromIndex) + : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); +} + +/* harmony default export */ const _baseIndexOf = (baseIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js + + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && _baseIndexOf(array, value, 0) > -1; +} + +/* harmony default export */ const _arrayIncludes = (arrayIncludes); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js +var _Set = __webpack_require__(9857); +;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +/* harmony default export */ const lodash_es_noop = (noop); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { + return new _Set/* default */.A(values); +}; + +/* harmony default export */ const _createSet = (createSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js + + + + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = _arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = _arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : _createSet(array); + if (set) { + return (0,_setToArray/* default */.A)(set); + } + isCommon = false; + includes = _cacheHas/* default */.A; + seen = new _SetCache/* default */.A; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/* harmony default export */ const _baseUniq = (baseUniq); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js +var isArrayLikeObject = __webpack_require__(3533); +;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js + + + + + +/** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ +var union = (0,_baseRest/* default */.A)(function(arrays) { + return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); +}); + +/* harmony default export */ const lodash_es_union = (union); + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + + +var DEFAULT_EDGE_NAME = '\x00'; +var GRAPH_NODE = '\x00'; +var EDGE_KEY_DELIM = '\x01'; + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. +class Graph { + constructor(opts = {}) { + this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; + this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; + this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; + + // Label for the graph itself + this._label = undefined; + + // Defaults to be set when creating a new node + this._defaultNodeLabelFn = constant/* default */.A(undefined); + + // Defaults to be set when creating a new edge + this._defaultEdgeLabelFn = constant/* default */.A(undefined); + + // v -> label + this._nodes = {}; + + if (this._isCompound) { + // v -> parent + this._parent = {}; + + // v -> children + this._children = {}; + this._children[GRAPH_NODE] = {}; + } + + // v -> edgeObj + this._in = {}; + + // u -> v -> Number + this._preds = {}; + + // v -> edgeObj + this._out = {}; + + // v -> w -> Number + this._sucs = {}; + + // e -> edgeObj + this._edgeObjs = {}; + + // e -> label + this._edgeLabels = {}; + } + /* === Graph functions ========= */ + isDirected() { + return this._isDirected; + } + isMultigraph() { + return this._isMultigraph; + } + isCompound() { + return this._isCompound; + } + setGraph(label) { + this._label = label; + return this; + } + graph() { + return this._label; + } + /* === Node functions ========== */ + setDefaultNodeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; + } + nodeCount() { + return this._nodeCount; + } + nodes() { + return keys/* default */.A(this._nodes); + } + sources() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._in[v]); + }); + } + sinks() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._out[v]); + }); + } + setNodes(vs, value) { + var args = arguments; + var self = this; + forEach/* default */.A(vs, function (v) { + if (args.length > 1) { + self.setNode(v, value); + } else { + self.setNode(v); + } + }); + return this; + } + setNode(v, value) { + if (has/* default */.A(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; + } + return this; + } + + // @ts-expect-error + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; + } + node(v) { + return this._nodes[v]; + } + hasNode(v) { + return has/* default */.A(this._nodes, v); + } + removeNode(v) { + var self = this; + if (has/* default */.A(this._nodes, v)) { + var removeEdge = function (e) { + self.removeEdge(self._edgeObjs[e]); + }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + forEach/* default */.A(this.children(v), function (child) { + self.setParent(child); + }); + delete this._children[v]; + } + forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; + } + setParent(v, parent) { + if (!this._isCompound) { + throw new Error('Cannot set parent in a non-compound graph'); + } + + if (isUndefined/* default */.A(parent)) { + parent = GRAPH_NODE; + } else { + // Coerce parent to string + parent += ''; + for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); + } + } + + this.setNode(parent); + } + + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; + } + _removeFromParentsChildList(v) { + delete this._children[this._parent[v]][v]; + } + parent(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } + } + children(v) { + if (isUndefined/* default */.A(v)) { + v = GRAPH_NODE; + } + + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return keys/* default */.A(children); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } + } + predecessors(v) { + var predsV = this._preds[v]; + if (predsV) { + return keys/* default */.A(predsV); + } + } + successors(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return keys/* default */.A(sucsV); + } + } + neighbors(v) { + var preds = this.predecessors(v); + if (preds) { + return lodash_es_union(preds, this.successors(v)); + } + } + isLeaf(v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; + } + filterNodes(filter) { + // @ts-expect-error + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound, + }); + + copy.setGraph(this.graph()); + + var self = this; + forEach/* default */.A(this._nodes, function (value, v) { + if (filter(v)) { + copy.setNode(v, value); + } + }); + + forEach/* default */.A(this._edgeObjs, function (e) { + // @ts-expect-error + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self.edge(e)); + } + }); + + var parents = {}; + function findParent(v) { + var parent = self.parent(v); + if (parent === undefined || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); + } + } + + if (this._isCompound) { + forEach/* default */.A(copy.nodes(), function (v) { + copy.setParent(v, findParent(v)); + }); + } + + return copy; + } + /* === Edge functions ========== */ + setDefaultEdgeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; + } + edgeCount() { + return this._edgeCount; + } + edges() { + return values/* default */.A(this._edgeObjs); + } + setPath(vs, value) { + var self = this; + var args = arguments; + reduce/* default */.A(vs, function (v, w) { + if (args.length > 1) { + self.setEdge(v, w, value); + } else { + self.setEdge(v, w); + } + return w; + }); + return this; + } + /* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ + setEdge() { + var v, w, name, value; + var valueSpecified = false; + var arg0 = arguments[0]; + + if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; + } + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; + } + } + + v = '' + v; + w = '' + w; + if (!isUndefined/* default */.A(name)) { + name = '' + name; + } + + var e = edgeArgsToId(this._isDirected, v, w, name); + if (has/* default */.A(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; + } + return this; + } + + if (!isUndefined/* default */.A(name) && !this._isMultigraph) { + throw new Error('Cannot set a named edge when isMultigraph = false'); + } + + // It didn't exist, so we need to create it. + // First ensure the nodes exist. + this.setNode(v); + this.setNode(w); + + // @ts-expect-error + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + // Ensure we add undirected edges in a consistent way. + v = edgeObj.v; + w = edgeObj.w; + + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; + } + edge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return this._edgeLabels[e]; + } + hasEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return has/* default */.A(this._edgeLabels, e); + } + removeEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; + } + inEdges(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = values/* default */.A(inV); + if (!u) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.v === u; + }); + } + } + outEdges(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = values/* default */.A(outV); + if (!w) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.w === w; + }); + } + } + nodeEdges(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } + } +} + +/* Number of nodes in the graph. Should only be changed by the implementation. */ +Graph.prototype._nodeCount = 0; + +/* Number of edges in the graph. Should only be changed by the implementation. */ +Graph.prototype._edgeCount = 0; + +function incrementOrInitEntry(map, k) { + if (map[k]) { + map[k]++; + } else { + map[k] = 1; + } +} + +function decrementOrRemoveEntry(map, k) { + if (!--map[k]) { + delete map[k]; + } +} + +function edgeArgsToId(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); +} + +function edgeArgsToObj(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v: v, w: w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; +} + +function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); +} + + +/***/ }), + +/***/ 697: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) +/* harmony export */ }); +/* unused harmony export version */ +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); +// Includes only the "core" of graphlib + + + +const version = '2.1.9-pre'; + + + + +/***/ }), + +/***/ 4075: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ M: () => (/* binding */ write) +/* harmony export */ }); +/* unused harmony export read */ +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9592); +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53); +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4722); +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); + + + + + +function write(g) { + var json = { + options: { + directed: g.isDirected(), + multigraph: g.isMultigraph(), + compound: g.isCompound(), + }, + nodes: writeNodes(g), + edges: writeEdges(g), + }; + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(g.graph())) { + json.value = lodash_es__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A(g.graph()); + } + return json; +} + +function writeNodes(g) { + return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.nodes(), function (v) { + var nodeValue = g.node(v); + var parent = g.parent(v); + var node = { v: v }; + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(nodeValue)) { + node.value = nodeValue; + } + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(parent)) { + node.parent = parent; + } + return node; + }); +} + +function writeEdges(g) { + return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.edges(), function (e) { + var edgeValue = g.edge(e); + var edge = { v: e.v, w: e.w }; + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(e.name)) { + edge.name = e.name; + } + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(edgeValue)) { + edge.value = edgeValue; + } + return edge; + }); +} + +function read(json) { + var g = new Graph(json.options).setGraph(json.value); + _.each(json.nodes, function (entry) { + g.setNode(entry.v, entry.value); + if (entry.parent) { + g.setParent(entry.v, entry.parent); + } + }); + _.each(json.edges, function (entry) { + g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); + }); + return g; +} + + +/***/ }), + +/***/ 5937: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2453); +/* harmony import */ var _color_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4886); +/* IMPORT */ + + +/* MAIN */ +const channel = (color, channel) => { + return _utils_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.lang.round(_color_index_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.parse(color)[channel]); +}; +/* EXPORT */ +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (channel); + + +/***/ }), + +/***/ 2062: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _SetCache) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules +var _MapCache = __webpack_require__(9471); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/* harmony default export */ const _setCacheAdd = (setCacheAdd); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ const _setCacheHas = (setCacheHas); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new _MapCache/* default */.A; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; +SetCache.prototype.has = _setCacheHas; + +/* harmony default export */ const _SetCache = (SetCache); + + +/***/ }), + +/***/ 2641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); + + +/***/ }), + +/***/ 2634: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); + + +/***/ }), + +/***/ 5572: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); + + +/***/ }), + +/***/ 6912: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); + + +/***/ }), + +/***/ 1641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseClone) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js +var _arrayEach = __webpack_require__(2641); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js +var _copyObject = __webpack_require__(2031); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js + + + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssign = (baseAssign); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js + + + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssignIn = (baseAssignIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js +var _cloneBuffer = __webpack_require__(154); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js +var _copyArray = __webpack_require__(9759); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js +var _getSymbols = __webpack_require__(4792); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js + + + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); +} + +/* harmony default export */ const _copySymbols = (copySymbols); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js +var _getPrototype = __webpack_require__(5647); +// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js +var stubArray = __webpack_require__(3153); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { + var result = []; + while (object) { + (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); + object = (0,_getPrototype/* default */.A)(object); + } + return result; +}; + +/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js + + + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); +} + +/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js +var _baseGetAllKeys = __webpack_require__(3831); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js + + + + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); +} + +/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/* harmony default export */ const _initCloneArray = (initCloneArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js +var _cloneArrayBuffer = __webpack_require__(565); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js + + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/* harmony default export */ const _cloneDataView = (cloneDataView); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/* harmony default export */ const _cloneRegExp = (cloneRegExp); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js + + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/* harmony default export */ const _cloneSymbol = (cloneSymbol); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js +var _cloneTypedArray = __webpack_require__(1801); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js + + + + + + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return (0,_cloneArrayBuffer/* default */.A)(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return _cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return (0,_cloneTypedArray/* default */.A)(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return _cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return _cloneSymbol(object); + } +} + +/* harmony default export */ const _initCloneByTag = (initCloneByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules +var _initCloneObject = __webpack_require__(8598); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js + + + +/** `Object#toString` result references. */ +var _baseIsMap_mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; +} + +/* harmony default export */ const _baseIsMap = (baseIsMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js +var _nodeUtil = __webpack_require__(4841); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js + + + + +/* Node.js helper references. */ +var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; + +/* harmony default export */ const lodash_es_isMap = (isMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js + + + +/** `Object#toString` result references. */ +var _baseIsSet_setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; +} + +/* harmony default export */ const _baseIsSet = (baseIsSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js + + + + +/* Node.js helper references. */ +var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; + +/* harmony default export */ const lodash_es_isSet = (isSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js + + + + + + + + + + + + + + + + + + + + + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + _baseClone_boolTag = '[object Boolean]', + _baseClone_dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + _baseClone_mapTag = '[object Map]', + _baseClone_numberTag = '[object Number]', + objectTag = '[object Object]', + _baseClone_regexpTag = '[object RegExp]', + _baseClone_setTag = '[object Set]', + _baseClone_stringTag = '[object String]', + _baseClone_symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var _baseClone_arrayBufferTag = '[object ArrayBuffer]', + _baseClone_dataViewTag = '[object DataView]', + _baseClone_float32Tag = '[object Float32Array]', + _baseClone_float64Tag = '[object Float64Array]', + _baseClone_int8Tag = '[object Int8Array]', + _baseClone_int16Tag = '[object Int16Array]', + _baseClone_int32Tag = '[object Int32Array]', + _baseClone_uint8Tag = '[object Uint8Array]', + _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', + _baseClone_uint16Tag = '[object Uint16Array]', + _baseClone_uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = +cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = +cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = +cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = +cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = +cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = +cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = +cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = +cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = +cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!(0,isObject/* default */.A)(value)) { + return value; + } + var isArr = (0,isArray/* default */.A)(value); + if (isArr) { + result = _initCloneArray(value); + if (!isDeep) { + return (0,_copyArray/* default */.A)(value, result); + } + } else { + var tag = (0,_getTag/* default */.A)(value), + isFunc = tag == funcTag || tag == genTag; + + if ((0,isBuffer/* default */.A)(value)) { + return (0,_cloneBuffer/* default */.A)(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); + if (!isDeep) { + return isFlat + ? _copySymbolsIn(value, _baseAssignIn(result, value)) + : _copySymbols(value, _baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = _initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new _Stack/* default */.A); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (lodash_es_isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (lodash_es_isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) + : (isFlat ? keysIn/* default */.A : keys/* default */.A); + + var props = isArr ? undefined : keysFunc(value); + (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +/* harmony default export */ const _baseClone = (baseClone); + + +/***/ }), + +/***/ 6240: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseEach) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js + + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!(0,isArrayLike/* default */.A)(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +/* harmony default export */ const _createBaseEach = (createBaseEach); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js + + + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = _createBaseEach(_baseForOwn/* default */.A); + +/* harmony default export */ const _baseEach = (baseEach); + + +/***/ }), + +/***/ 5707: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); + + +/***/ }), + +/***/ 3588: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseFlatten) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules +var isArguments = __webpack_require__(2274); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js + + + + +/** Built-in value references. */ +var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/* harmony default export */ const _isFlattenable = (isFlattenable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js + + + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = _isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + (0,_arrayPush/* default */.A)(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/* harmony default export */ const _baseFlatten = (baseFlatten); + + +/***/ }), + +/***/ 9841: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); + + +/***/ }), + +/***/ 6318: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); + + +/***/ }), + +/***/ 3831: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6912); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); + + +/***/ }), + +/***/ 9574: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseIteratee) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arraySome = (arraySome); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!_arraySome(other, function(othValue, othIndex) { + if (!(0,_cacheHas/* default */.A)(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalArrays = (equalArrays); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js +var _Uint8Array = __webpack_require__(3988); +// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js +var eq = __webpack_require__(6984); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ const _mapToArray = (mapToArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _equalByTag_COMPARE_PARTIAL_FLAG = 1, + _equalByTag_COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return (0,eq/* default */.A)(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = _mapToArray; + + case setTag: + var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; + convert || (convert = _setToArray/* default */.A); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ const _equalByTag = (equalByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js + + +/** Used to compose bitmasks for value comparisons. */ +var _equalObjects_COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, + objProps = (0,_getAllKeys/* default */.A)(object), + objLength = objProps.length, + othProps = (0,_getAllKeys/* default */.A)(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalObjects = (equalObjects); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules +var isTypedArray = __webpack_require__(3858); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var _baseIsEqualDeep_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = (0,isArray/* default */.A)(object), + othIsArr = (0,isArray/* default */.A)(other), + objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), + othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && (0,isBuffer/* default */.A)(object)) { + if (!(0,isBuffer/* default */.A)(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new _Stack/* default */.A); + return (objIsArr || (0,isTypedArray/* default */.A)(object)) + ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new _Stack/* default */.A); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new _Stack/* default */.A); + return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { + return value !== value && other !== other; + } + return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ const _baseIsEqual = (baseIsEqual); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, + _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new _Stack/* default */.A; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ const _baseIsMatch = (baseIsMatch); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !(0,isObject/* default */.A)(value); +} + +/* harmony default export */ const _isStrictComparable = (isStrictComparable); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = (0,keys/* default */.A)(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, _isStrictComparable(value)]; + } + return result; +} + +/* harmony default export */ const _getMatchData = (getMatchData); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = _getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return _matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || _baseIsMatch(object, source, matchData); + }; +} + +/* harmony default export */ const _baseMatches = (baseMatches); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ const lodash_es_get = (get); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, + _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { + return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); + } + return function(object) { + var objValue = lodash_es_get(object, path); + return (objValue === undefined && objValue === srcValue) + ? (0,hasIn/* default */.A)(object, path) + : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return (0,_baseGet/* default */.A)(object, path); + }; +} + +/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); +} + +/* harmony default export */ const lodash_es_property = (property); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity/* default */.A; + } + if (typeof value == 'object') { + return (0,isArray/* default */.A)(value) + ? _baseMatchesProperty(value[0], value[1]) + : _baseMatches(value); + } + return lodash_es_property(value); +} + +/* harmony default export */ const _baseIteratee = (baseIteratee); + + +/***/ }), + +/***/ 2568: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; + + (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); + + +/***/ }), + +/***/ 805: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); + + +/***/ }), + +/***/ 4099: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); + + +/***/ }), + +/***/ 9922: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9008); + + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); + + +/***/ }), + +/***/ 7819: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _castPath) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js +var memoize = __webpack_require__(6632); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = (0,memoize/* default */.A)(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ const _memoizeCapped = (memoizeCapped); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js + + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = _memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ const _stringToPath = (stringToPath); + +// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules +var lodash_es_toString = __webpack_require__(8894); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if ((0,isArray/* default */.A)(value)) { + return value; + } + return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); +} + +/* harmony default export */ const _castPath = (castPath); + + +/***/ }), + +/***/ 9042: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3831); +/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4792); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); + + +/***/ }), + +/***/ 4792: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); +/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3153); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); + + +/***/ }), + +/***/ 5054: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2274); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2049); +/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5353); +/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && + ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); + + +/***/ }), + +/***/ 6586: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1882); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); + + +/***/ }), + +/***/ 9959: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); + + +/***/ }), + +/***/ 3282: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1882); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); + + +/***/ }), + +/***/ 53: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseClone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1641); + + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ +function clone(value) { + return (0,_baseClone_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value, CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone); + + +/***/ }), + +/***/ 3068: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4326); +/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6984); +/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); +/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5615); + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); + + +/***/ }), + +/***/ 1662: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_filter) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js +var _arrayFilter = __webpack_require__(2634); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js + + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + (0,_baseEach/* default */.A)(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +/* harmony default export */ const _baseFilter = (baseFilter); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js + + + + + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ +function filter(collection, predicate) { + var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; + return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); +} + +/* harmony default export */ const lodash_es_filter = (filter); + + +/***/ }), + +/***/ 4098: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3588); + + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); + + +/***/ }), + +/***/ 8058: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2641); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); +/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9922); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); + + +/***/ }), + +/***/ 8585: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_has) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && _baseHas_hasOwnProperty.call(object, key); +} + +/* harmony default export */ const _baseHas = (baseHas); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js + + + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); +} + +/* harmony default export */ const lodash_es_has = (has); + + +/***/ }), + +/***/ 9188: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_hasIn) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ const _baseHasIn = (baseHasIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); +} + +/* harmony default export */ const lodash_es_hasIn = (hasIn); + + +/***/ }), + +/***/ 1882: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8496); +/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3098); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); + + +/***/ }), + +/***/ 9592: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); + + +/***/ }), + +/***/ 2184: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3607); +/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1852); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); + + +/***/ }), + +/***/ 4722: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5572); +/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9574); +/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2568); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); + + +/***/ }), + +/***/ 1942: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_pick) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules +var _castPath = __webpack_require__(7819); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js +var _isIndex = __webpack_require__(5353); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js + + + + + + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!(0,isObject/* default */.A)(object)) { + return object; + } + path = (0,_castPath/* default */.A)(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = (0,_toKey/* default */.A)(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = (0,isObject/* default */.A)(objValue) + ? objValue + : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); + } + } + (0,_assignValue/* default */.A)(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/* harmony default export */ const _baseSet = (baseSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js + + + + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = (0,_baseGet/* default */.A)(object, path); + + if (predicate(value, path)) { + _baseSet(result, (0,_castPath/* default */.A)(path, object), value); + } + } + return result; +} + +/* harmony default export */ const _basePickBy = (basePickBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js + + + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return _basePickBy(object, paths, function(value, path) { + return (0,hasIn/* default */.A)(object, path); + }); +} + +/* harmony default export */ const _basePick = (basePick); + +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules +var _overRest = __webpack_require__(6875); +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules +var _setToString = __webpack_require__(7525); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js + + + + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); +} + +/* harmony default export */ const _flatRest = (flatRest); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js + + + +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = _flatRest(function(object, paths) { + return object == null ? {} : _basePick(object, paths); +}); + +/* harmony default export */ const lodash_es_pick = (pick); + + +/***/ }), + +/***/ 1395: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_range) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +/* harmony default export */ const _baseRange = (baseRange); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js + + + + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = (0,toFinite/* default */.A)(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = (0,toFinite/* default */.A)(end); + } + step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); + return _baseRange(start, end, step, fromRight); + }; +} + +/* harmony default export */ const _createRange = (createRange); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js + + +/** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ +var range = _createRange(); + +/* harmony default export */ const lodash_es_range = (range); + + +/***/ }), + +/***/ 9463: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_reduce) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/* harmony default export */ const _arrayReduce = (arrayReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +/* harmony default export */ const _baseReduce = (baseReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js + + + + + + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ +function reduce(collection, iteratee, accumulator) { + var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, + initAccum = arguments.length < 3; + + return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); +} + +/* harmony default export */ const lodash_es_reduce = (reduce); + + +/***/ }), + +/***/ 3153: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); + + +/***/ }), + +/***/ 4342: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toFinite) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js +/** Used to match a single whitespace character. */ +var reWhitespace = /\s/; + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ +function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; +} + +/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js + + +/** Used to match leading whitespace. */ +var reTrimStart = /^\s+/; + +/** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ +function baseTrim(string) { + return string + ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; +} + +/* harmony default export */ const _baseTrim = (baseTrim); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js + + + + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if ((0,isSymbol/* default */.A)(value)) { + return NAN; + } + if ((0,isObject/* default */.A)(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = (0,isObject/* default */.A)(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = _baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +/* harmony default export */ const lodash_es_toNumber = (toNumber); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = lodash_es_toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +/* harmony default export */ const lodash_es_toFinite = (toFinite); + + +/***/ }), + +/***/ 8894: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toString) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if ((0,isArray/* default */.A)(value)) { + // Recursively convert values (susceptible to call stack limits). + return (0,_arrayMap/* default */.A)(value, baseToString) + ''; + } + if ((0,isSymbol/* default */.A)(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const _baseToString = (baseToString); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString_toString(value) { + return value == null ? '' : _baseToString(value); +} + +/* harmony default export */ const lodash_es_toString = (toString_toString); + + +/***/ }), + +/***/ 5664: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8894); + + +/** Used to generate unique IDs. */ +var idCounter = 0; + +/** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ +function uniqueId(prefix) { + var id = ++idCounter; + return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); + + +/***/ }), + +/***/ 8207: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_values) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js + + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return (0,_arrayMap/* default */.A)(props, function(key) { + return object[key]; + }); +} + +/* harmony default export */ const _baseValues = (baseValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js + + + +/** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ +function values(object) { + return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); +} + +/* harmony default export */ const lodash_es_values = (values); + + +/***/ }), + +/***/ 3791: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + a: () => (/* binding */ createText), + c: () => (/* binding */ computeDimensionOfText) +}); + +// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +var constructs_namespaceObject = {}; +__webpack_require__.r(constructs_namespaceObject); +__webpack_require__.d(constructs_namespaceObject, { + attentionMarkers: () => (attentionMarkers), + contentInitial: () => (contentInitial), + disable: () => (disable), + document: () => (constructs_document), + flow: () => (constructs_flow), + flowInitial: () => (flowInitial), + insideSpan: () => (insideSpan), + string: () => (constructs_string), + text: () => (constructs_text) +}); + +// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-f47111a7.js + 8 modules +var mermaid_f47111a7 = __webpack_require__(6257); +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js +/** + * @typedef {import('mdast').Root|import('mdast').Content} Node + * + * @typedef Options + * Configuration (optional). + * @property {boolean | null | undefined} [includeImageAlt=true] + * Whether to use `alt` for `image`s. + * @property {boolean | null | undefined} [includeHtml=true] + * Whether to use `value` of HTML. + */ + +/** @type {Options} */ +const emptyOptions = {} + +/** + * Get the text content of a node or list of nodes. + * + * Prefers the node’s plain-text fields, otherwise serializes its children, + * and if the given value is an array, serialize the nodes in it. + * + * @param {unknown} value + * Thing to serialize, typically `Node`. + * @param {Options | null | undefined} [options] + * Configuration (optional). + * @returns {string} + * Serialized `value`. + */ +function lib_toString(value, options) { + const settings = options || emptyOptions + const includeImageAlt = + typeof settings.includeImageAlt === 'boolean' + ? settings.includeImageAlt + : true + const includeHtml = + typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true + + return one(value, includeImageAlt, includeHtml) +} + +/** + * One node or several nodes. + * + * @param {unknown} value + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized node. + */ +function one(value, includeImageAlt, includeHtml) { + if (node(value)) { + if ('value' in value) { + return value.type === 'html' && !includeHtml ? '' : value.value + } + + if (includeImageAlt && 'alt' in value && value.alt) { + return value.alt + } + + if ('children' in value) { + return lib_all(value.children, includeImageAlt, includeHtml) + } + } + + if (Array.isArray(value)) { + return lib_all(value, includeImageAlt, includeHtml) + } + + return '' +} + +/** + * Serialize a list of nodes. + * + * @param {Array} values + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized nodes. + */ +function lib_all(values, includeImageAlt, includeHtml) { + /** @type {Array} */ + const result = [] + let index = -1 + + while (++index < values.length) { + result[index] = one(values[index], includeImageAlt, includeHtml) + } + + return result.join('') +} + +/** + * Check if `value` looks like a node. + * + * @param {unknown} value + * Thing. + * @returns {value is Node} + * Whether `value` is a node. + */ +function node(value) { + return Boolean(value && typeof value === 'object') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array} list + * List to operate on. + * @param {Array} items + * Items to add to `list`. + * @returns {Array} + * Either `list` or `items`. + */ +function push(list, items) { + if (list.length > 0) { + splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + * @typedef {import('micromark-util-types').Handles} Handles + * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension + * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension + */ + + + +const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty + +/** + * Combine multiple syntax extensions into one. + * + * @param {Array} extensions + * List of syntax extensions. + * @returns {NormalizedExtension} + * A single combined extension. + */ +function combineExtensions(extensions) { + /** @type {NormalizedExtension} */ + const all = {} + let index = -1 + + while (++index < extensions.length) { + syntaxExtension(all, extensions[index]) + } + + return all +} + +/** + * Merge `extension` into `all`. + * + * @param {NormalizedExtension} all + * Extension to merge into. + * @param {Extension} extension + * Extension to merge. + * @returns {void} + */ +function syntaxExtension(all, extension) { + /** @type {keyof Extension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + /** @type {Record} */ + const left = maybe || (all[hook] = {}) + /** @type {Record | undefined} */ + const right = extension[hook] + /** @type {string} */ + let code + + if (right) { + for (code in right) { + if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] + const value = right[code] + constructs( + // @ts-expect-error Looks like a list. + left[code], + Array.isArray(value) ? value : value ? [value] : [] + ) + } + } + } +} + +/** + * Merge `list` into `existing` (both lists of constructs). + * Mutates `existing`. + * + * @param {Array} existing + * @param {Array} list + * @returns {void} + */ +function constructs(existing, list) { + let index = -1 + /** @type {Array} */ + const before = [] + + while (++index < list.length) { + // @ts-expect-error Looks like an object. + ;(list[index].add === 'after' ? existing : before).push(list[index]) + } + + splice(existing, 0, 0, before) +} + +/** + * Combine multiple HTML extensions into one. + * + * @param {Array} htmlExtensions + * List of HTML extensions. + * @returns {HtmlExtension} + * A single combined HTML extension. + */ +function combineHtmlExtensions(htmlExtensions) { + /** @type {HtmlExtension} */ + const handlers = {} + let index = -1 + + while (++index < htmlExtensions.length) { + htmlExtension(handlers, htmlExtensions[index]) + } + + return handlers +} + +/** + * Merge `extension` into `all`. + * + * @param {HtmlExtension} all + * Extension to merge into. + * @param {HtmlExtension} extension + * Extension to merge. + * @returns {void} + */ +function htmlExtension(all, extension) { + /** @type {keyof HtmlExtension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + const left = maybe || (all[hook] = {}) + const right = extension[hook] + /** @type {keyof Handles} */ + let type + + if (right) { + for (type in right) { + // @ts-expect-error assume document vs regular handler are managed correctly. + left[type] = right[type] + } + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +// This module is generated by `script/`. +// +// CommonMark handles attention (emphasis, strong) markers based on what comes +// before or after them. +// One such difference is if those characters are Unicode punctuation. +// This script is generated from the Unicode data. + +/** + * Regular expression that matches a unicode punctuation character. + */ +const unicodePunctuationRegex = + /[!-\/:-@\[-`\{-~\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]/ + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + + +/** + * Check whether the character code represents an ASCII alpha (`a` through `z`, + * case insensitive). + * + * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. + * + * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) + * to U+005A (`Z`). + * + * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) + * to U+007A (`z`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlpha = regexCheck(/[A-Za-z]/) + +/** + * Check whether the character code represents an ASCII alphanumeric (`a` + * through `z`, case insensitive, or `0` through `9`). + * + * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha + * (see `asciiAlpha`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) + +/** + * Check whether the character code represents an ASCII atext. + * + * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in + * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), + * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F + * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E + * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE + * (`{`) to U+007E TILDE (`~`). + * + * See: + * **\[RFC5322]**: + * [Internet Message Format](https://tools.ietf.org/html/rfc5322). + * P. Resnick. + * IETF. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) + +/** + * Check whether a character code is an ASCII control character. + * + * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) + * to U+001F (US), or U+007F (DEL). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code !== null && (code < 32 || code === 127) + ) +} + +/** + * Check whether the character code represents an ASCII digit (`0` through `9`). + * + * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to + * U+0039 (`9`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiDigit = regexCheck(/\d/) + +/** + * Check whether the character code represents an ASCII hex digit (`a` through + * `f`, case insensitive, or `0` through `9`). + * + * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex + * digit, or an ASCII lower hex digit. + * + * An **ASCII upper hex digit** is a character in the inclusive range U+0041 + * (`A`) to U+0046 (`F`). + * + * An **ASCII lower hex digit** is a character in the inclusive range U+0061 + * (`a`) to U+0066 (`f`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) + +/** + * Check whether the character code represents ASCII punctuation. + * + * An **ASCII punctuation** is a character in the inclusive ranges U+0021 + * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT + * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT + * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) + +/** + * Check whether a character code is a markdown line ending. + * + * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN + * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). + * + * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE + * RETURN (CR) are replaced by these virtual characters depending on whether + * they occurred together. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEnding(code) { + return code !== null && code < -2 +} + +/** + * Check whether a character code is a markdown line ending (see + * `markdownLineEnding`) or markdown space (see `markdownSpace`). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEndingOrSpace(code) { + return code !== null && (code < 0 || code === 32) +} + +/** + * Check whether a character code is a markdown space. + * + * A **markdown space** is the concrete character U+0020 SPACE (SP) and the + * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). + * + * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is + * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL + * SPACE (VS) characters, depending on the column at which the tab occurred. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownSpace(code) { + return code === -2 || code === -1 || code === 32 +} + +// Size note: removing ASCII from the regex and using `asciiPunctuation` here +// In fact adds to the bundle size. +/** + * Check whether the character code represents Unicode punctuation. + * + * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, + * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` + * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` + * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII + * punctuation (see `asciiPunctuation`). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodePunctuation = regexCheck(unicodePunctuationRegex) + +/** + * Check whether the character code represents Unicode whitespace. + * + * Note that this does handle micromark specific markdown whitespace characters. + * See `markdownLineEndingOrSpace` to check that. + * + * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, + * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), + * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodeWhitespace = regexCheck(/\s/) + +/** + * Create a code check from a regex. + * + * @param {RegExp} regex + * @returns {(code: Code) => boolean} + */ +function regexCheck(regex) { + return check + + /** + * Check whether a code matches the bound regex. + * + * @param {Code} code + * Character code. + * @returns {boolean} + * Whether the character code matches the bound regex. + */ + function check(code) { + return code !== null && regex.test(String.fromCharCode(code)) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * spaces in markdown are often optional, in which case this factory can be + * used and `ok` will be switched to whether spaces were found or not + * * one line ending or space can be detected with `markdownSpace(code)` right + * before using `factorySpace` + * + * ###### Examples + * + * Where `␉` represents a tab (plus how much it expands) and `␠` represents a + * single space. + * + * ```markdown + * ␉ + * ␠␠␠␠ + * ␉␠ + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {TokenType} type + * Type (`' \t'`). + * @param {number | undefined} [max=Infinity] + * Max (exclusive). + * @returns + * Start state. + */ +function factorySpace(effects, ok, type, max) { + const limit = max ? max - 1 : Number.POSITIVE_INFINITY + let size = 0 + return start + + /** @type {State} */ + function start(code) { + if (markdownSpace(code)) { + effects.enter(type) + return prefix(code) + } + return ok(code) + } + + /** @type {State} */ + function prefix(code) { + if (markdownSpace(code) && size++ < limit) { + effects.consume(code) + return prefix + } + effects.exit(type) + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + +/** @type {InitialConstruct} */ +const content = { + tokenize: initializeContent +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeContent(effects) { + const contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ) + /** @type {Token} */ + let previous + return contentStart + + /** @type {State} */ + function afterContentStartConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, contentStart, 'linePrefix') + } + + /** @type {State} */ + function paragraphInitial(code) { + effects.enter('paragraph') + return lineStart(code) + } + + /** @type {State} */ + function lineStart(code) { + const token = effects.enter('chunkText', { + contentType: 'text', + previous + }) + if (previous) { + previous.next = token + } + previous = token + return data(code) + } + + /** @type {State} */ + function data(code) { + if (code === null) { + effects.exit('chunkText') + effects.exit('paragraph') + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + effects.exit('chunkText') + return lineStart + } + + // Data. + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + +/** + * @typedef {[Construct, ContainerState]} StackItem + */ + + + + +/** @type {InitialConstruct} */ +const document_document = { + tokenize: initializeDocument +} + +/** @type {Construct} */ +const containerConstruct = { + tokenize: tokenizeContainer +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeDocument(effects) { + const self = this + /** @type {Array} */ + const stack = [] + let continued = 0 + /** @type {TokenizeContext | undefined} */ + let childFlow + /** @type {Token | undefined} */ + let childToken + /** @type {number} */ + let lineStartOffset + return start + + /** @type {State} */ + function start(code) { + // First we iterate through the open blocks, starting with the root + // document, and descending through last children down to the last open + // block. + // Each block imposes a condition that the line must satisfy if the block is + // to remain open. + // For example, a block quote requires a `>` character. + // A paragraph requires a non-blank line. + // In this phase we may match all or just some of the open blocks. + // But we cannot close unmatched blocks yet, because we may have a lazy + // continuation line. + if (continued < stack.length) { + const item = stack[continued] + self.containerState = item[1] + return effects.attempt( + item[0].continuation, + documentContinue, + checkNewContainers + )(code) + } + + // Done. + return checkNewContainers(code) + } + + /** @type {State} */ + function documentContinue(code) { + continued++ + + // Note: this field is called `_closeFlow` but it also closes containers. + // Perhaps a good idea to rename it but it’s already used in the wild by + // extensions. + if (self.containerState._closeFlow) { + self.containerState._closeFlow = undefined + if (childFlow) { + closeFlow() + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when dealing with lazy lines in `writeToChild`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {Point | undefined} */ + let point + + // Find the flow chunk. + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + point = self.events[indexBeforeFlow][1].end + break + } + } + exitContainers(continued) + + // Fix positions. + let index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + return checkNewContainers(code) + } + return start(code) + } + + /** @type {State} */ + function checkNewContainers(code) { + // Next, after consuming the continuation markers for existing blocks, we + // look for new block starts (e.g. `>` for a block quote). + // If we encounter a new block start, we close any blocks unmatched in + // step 1 before creating the new block as a child of the last matched + // block. + if (continued === stack.length) { + // No need to `check` whether there’s a container, of `exitContainers` + // would be moot. + // We can instead immediately `attempt` to parse one. + if (!childFlow) { + return documentContinued(code) + } + + // If we have concrete content, such as block HTML or fenced code, + // we can’t have containers “pierce” into them, so we can immediately + // start. + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { + return flowStart(code) + } + + // If we do have flow, it could still be a blank line, + // but we’d be interrupting it w/ a new container if there’s a current + // construct. + // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer + // needed in micromark-extension-gfm-table@1.0.6). + self.interrupt = Boolean( + childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack + ) + } + + // Check if there is a new container. + self.containerState = {} + return effects.check( + containerConstruct, + thereIsANewContainer, + thereIsNoNewContainer + )(code) + } + + /** @type {State} */ + function thereIsANewContainer(code) { + if (childFlow) closeFlow() + exitContainers(continued) + return documentContinued(code) + } + + /** @type {State} */ + function thereIsNoNewContainer(code) { + self.parser.lazy[self.now().line] = continued !== stack.length + lineStartOffset = self.now().offset + return flowStart(code) + } + + /** @type {State} */ + function documentContinued(code) { + // Try new containers. + self.containerState = {} + return effects.attempt( + containerConstruct, + containerContinue, + flowStart + )(code) + } + + /** @type {State} */ + function containerContinue(code) { + continued++ + stack.push([self.currentConstruct, self.containerState]) + // Try another. + return documentContinued(code) + } + + /** @type {State} */ + function flowStart(code) { + if (code === null) { + if (childFlow) closeFlow() + exitContainers(0) + effects.consume(code) + return + } + childFlow = childFlow || self.parser.flow(self.now()) + effects.enter('chunkFlow', { + contentType: 'flow', + previous: childToken, + _tokenizer: childFlow + }) + return flowContinue(code) + } + + /** @type {State} */ + function flowContinue(code) { + if (code === null) { + writeToChild(effects.exit('chunkFlow'), true) + exitContainers(0) + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + writeToChild(effects.exit('chunkFlow')) + // Get ready for the next line. + continued = 0 + self.interrupt = undefined + return start + } + effects.consume(code) + return flowContinue + } + + /** + * @param {Token} token + * @param {boolean | undefined} [eof] + * @returns {void} + */ + function writeToChild(token, eof) { + const stream = self.sliceStream(token) + if (eof) stream.push(null) + token.previous = childToken + if (childToken) childToken.next = token + childToken = token + childFlow.defineSkip(token.start) + childFlow.write(stream) + + // Alright, so we just added a lazy line: + // + // ```markdown + // > a + // b. + // + // Or: + // + // > ~~~c + // d + // + // Or: + // + // > | e | + // f + // ``` + // + // The construct in the second example (fenced code) does not accept lazy + // lines, so it marked itself as done at the end of its first line, and + // then the content construct parses `d`. + // Most constructs in markdown match on the first line: if the first line + // forms a construct, a non-lazy line can’t “unmake” it. + // + // The construct in the third example is potentially a GFM table, and + // those are *weird*. + // It *could* be a table, from the first line, if the following line + // matches a condition. + // In this case, that second line is lazy, which “unmakes” the first line + // and turns the whole into one content block. + // + // We’ve now parsed the non-lazy and the lazy line, and can figure out + // whether the lazy line started a new flow block. + // If it did, we exit the current containers between the two flow blocks. + if (self.parser.lazy[token.start.line]) { + let index = childFlow.events.length + while (index--) { + if ( + // The token starts before the line ending… + childFlow.events[index][1].start.offset < lineStartOffset && + // …and either is not ended yet… + (!childFlow.events[index][1].end || + // …or ends after it. + childFlow.events[index][1].end.offset > lineStartOffset) + ) { + // Exit: there’s still something open, which means it’s a lazy line + // part of something. + return + } + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when closing flow in `documentContinue`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {boolean | undefined} */ + let seen + /** @type {Point | undefined} */ + let point + + // Find the previous chunk (the one before the lazy line). + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + if (seen) { + point = self.events[indexBeforeFlow][1].end + break + } + seen = true + } + } + exitContainers(continued) + + // Fix positions. + index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + } + } + + /** + * @param {number} size + * @returns {void} + */ + function exitContainers(size) { + let index = stack.length + + // Exit open containers. + while (index-- > size) { + const entry = stack[index] + self.containerState = entry[1] + entry[0].exit.call(self, effects) + } + stack.length = size + } + function closeFlow() { + childFlow.write([null]) + childToken = undefined + childFlow = undefined + self.containerState._closeFlow = undefined + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContainer(effects, ok, nok) { + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok, nok), + 'linePrefix', + this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blankLine = { + tokenize: tokenizeBlankLine, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLine(effects, ok, nok) { + return start + + /** + * Start of blank line. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + return markdownSpace(code) + ? factorySpace(effects, after, 'linePrefix')(code) + : after(code) + } + + /** + * At eof/eol, after optional whitespace. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function micromark_util_chunked_splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array} list + * List to operate on. + * @param {Array} items + * Items to add to `list`. + * @returns {Array} + * Either `list` or `items`. + */ +function micromark_util_chunked_push(list, items) { + if (list.length > 0) { + micromark_util_chunked_splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Token} Token + */ + + +/** + * Tokenize subcontent. + * + * @param {Array} events + * List of events. + * @returns {boolean} + * Whether subtokens were found. + */ +function subtokenize(events) { + /** @type {Record} */ + const jumps = {} + let index = -1 + /** @type {Event} */ + let event + /** @type {number | undefined} */ + let lineIndex + /** @type {number} */ + let otherIndex + /** @type {Event} */ + let otherEvent + /** @type {Array} */ + let parameters + /** @type {Array} */ + let subevents + /** @type {boolean | undefined} */ + let more + while (++index < events.length) { + while (index in jumps) { + index = jumps[index] + } + event = events[index] + + // Add a hook for the GFM tasklist extension, which needs to know if text + // is in the first content of a list item. + if ( + index && + event[1].type === 'chunkFlow' && + events[index - 1][1].type === 'listItemPrefix' + ) { + subevents = event[1]._tokenizer.events + otherIndex = 0 + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'lineEndingBlank' + ) { + otherIndex += 2 + } + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'content' + ) { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === 'content') { + break + } + if (subevents[otherIndex][1].type === 'chunkText') { + subevents[otherIndex][1]._isInFirstContentOfListItem = true + otherIndex++ + } + } + } + } + + // Enter. + if (event[0] === 'enter') { + if (event[1].contentType) { + Object.assign(jumps, subcontent(events, index)) + index = jumps[index] + more = true + } + } + // Exit. + else if (event[1]._container) { + otherIndex = index + lineIndex = undefined + while (otherIndex--) { + otherEvent = events[otherIndex] + if ( + otherEvent[1].type === 'lineEnding' || + otherEvent[1].type === 'lineEndingBlank' + ) { + if (otherEvent[0] === 'enter') { + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + } + otherEvent[1].type = 'lineEnding' + lineIndex = otherIndex + } + } else { + break + } + } + if (lineIndex) { + // Fix position. + event[1].end = Object.assign({}, events[lineIndex][1].start) + + // Switch container exit w/ line endings. + parameters = events.slice(lineIndex, index) + parameters.unshift(event) + micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) + } + } + } + return !more +} + +/** + * Tokenize embedded tokens. + * + * @param {Array} events + * @param {number} eventIndex + * @returns {Record} + */ +function subcontent(events, eventIndex) { + const token = events[eventIndex][1] + const context = events[eventIndex][2] + let startPosition = eventIndex - 1 + /** @type {Array} */ + const startPositions = [] + const tokenizer = + token._tokenizer || context.parser[token.contentType](token.start) + const childEvents = tokenizer.events + /** @type {Array<[number, number]>} */ + const jumps = [] + /** @type {Record} */ + const gaps = {} + /** @type {Array} */ + let stream + /** @type {Token | undefined} */ + let previous + let index = -1 + /** @type {Token | undefined} */ + let current = token + let adjust = 0 + let start = 0 + const breaks = [start] + + // Loop forward through the linked tokens to pass them in order to the + // subtokenizer. + while (current) { + // Find the position of the event for this token. + while (events[++startPosition][1] !== current) { + // Empty. + } + startPositions.push(startPosition) + if (!current._tokenizer) { + stream = context.sliceStream(current) + if (!current.next) { + stream.push(null) + } + if (previous) { + tokenizer.defineSkip(current.start) + } + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true + } + tokenizer.write(stream) + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = undefined + } + } + + // Unravel the next token. + previous = current + current = current.next + } + + // Now, loop back through all events (and linked tokens), to figure out which + // parts belong where. + current = token + while (++index < childEvents.length) { + if ( + // Find a void token that includes a break. + childEvents[index][0] === 'exit' && + childEvents[index - 1][0] === 'enter' && + childEvents[index][1].type === childEvents[index - 1][1].type && + childEvents[index][1].start.line !== childEvents[index][1].end.line + ) { + start = index + 1 + breaks.push(start) + // Help GC. + current._tokenizer = undefined + current.previous = undefined + current = current.next + } + } + + // Help GC. + tokenizer.events = [] + + // If there’s one more token (which is the cases for lines that end in an + // EOF), that’s perfect: the last point we found starts it. + // If there isn’t then make sure any remaining content is added to it. + if (current) { + // Help GC. + current._tokenizer = undefined + current.previous = undefined + } else { + breaks.pop() + } + + // Now splice the events from the subtokenizer into the current events, + // moving back to front so that splice indices aren’t affected. + index = breaks.length + while (index--) { + const slice = childEvents.slice(breaks[index], breaks[index + 1]) + const start = startPositions.pop() + jumps.unshift([start, start + slice.length - 1]) + micromark_util_chunked_splice(events, start, 2, slice) + } + index = -1 + while (++index < jumps.length) { + gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] + adjust += jumps[index][1] - jumps[index][0] - 1 + } + return gaps +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** + * No name because it must not be turned off. + * @type {Construct} + */ +const content_content = { + tokenize: tokenizeContent, + resolve: resolveContent +} + +/** @type {Construct} */ +const continuationConstruct = { + tokenize: tokenizeContinuation, + partial: true +} + +/** + * Content is transparent: it’s parsed right now. That way, definitions are also + * parsed right now: before text in paragraphs (specifically, media) are parsed. + * + * @type {Resolver} + */ +function resolveContent(events) { + subtokenize(events) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContent(effects, ok) { + /** @type {Token | undefined} */ + let previous + return chunkStart + + /** + * Before a content chunk. + * + * ```markdown + * > | abc + * ^ + * ``` + * + * @type {State} + */ + function chunkStart(code) { + effects.enter('content') + previous = effects.enter('chunkContent', { + contentType: 'content' + }) + return chunkInside(code) + } + + /** + * In a content chunk. + * + * ```markdown + * > | abc + * ^^^ + * ``` + * + * @type {State} + */ + function chunkInside(code) { + if (code === null) { + return contentEnd(code) + } + + // To do: in `markdown-rs`, each line is parsed on its own, and everything + // is stitched together resolving. + if (markdownLineEnding(code)) { + return effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code) + } + + // Data. + effects.consume(code) + return chunkInside + } + + /** + * + * + * @type {State} + */ + function contentEnd(code) { + effects.exit('chunkContent') + effects.exit('content') + return ok(code) + } + + /** + * + * + * @type {State} + */ + function contentContinue(code) { + effects.consume(code) + effects.exit('chunkContent') + previous.next = effects.enter('chunkContent', { + contentType: 'content', + previous + }) + previous = previous.next + return chunkInside + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContinuation(effects, ok, nok) { + const self = this + return startLookahead + + /** + * + * + * @type {State} + */ + function startLookahead(code) { + effects.exit('chunkContent') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, prefixed, 'linePrefix') + } + + /** + * + * + * @type {State} + */ + function prefixed(code) { + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + + // Always populated by defaults. + + const tail = self.events[self.events.length - 1] + if ( + !self.parser.constructs.disable.null.includes('codeIndented') && + tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ) { + return ok(code) + } + return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + + +/** @type {InitialConstruct} */ +const flow = { + tokenize: initializeFlow +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeFlow(effects) { + const self = this + const initial = effects.attempt( + // Try to parse a blank line. + blankLine, + atBlankEnding, + // Try to parse initial flow (essentially, only code). + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content_content, afterConstruct) + ), + 'linePrefix' + ) + ) + ) + return initial + + /** @type {State} */ + function atBlankEnding(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEndingBlank') + effects.consume(code) + effects.exit('lineEndingBlank') + self.currentConstruct = undefined + return initial + } + + /** @type {State} */ + function afterConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + self.currentConstruct = undefined + return initial + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +const resolver = { + resolveAll: createResolver() +} +const string = initializeFactory('string') +const text_text = initializeFactory('text') + +/** + * @param {'string' | 'text'} field + * @returns {InitialConstruct} + */ +function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: createResolver( + field === 'text' ? resolveAllLineSuffixes : undefined + ) + } + + /** + * @this {TokenizeContext} + * @type {Initializer} + */ + function initializeText(effects) { + const self = this + const constructs = this.parser.constructs[field] + const text = effects.attempt(constructs, start, notText) + return start + + /** @type {State} */ + function start(code) { + return atBreak(code) ? text(code) : notText(code) + } + + /** @type {State} */ + function notText(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('data') + effects.consume(code) + return data + } + + /** @type {State} */ + function data(code) { + if (atBreak(code)) { + effects.exit('data') + return text(code) + } + + // Data. + effects.consume(code) + return data + } + + /** + * @param {Code} code + * @returns {boolean} + */ + function atBreak(code) { + if (code === null) { + return true + } + const list = constructs[code] + let index = -1 + if (list) { + // Always populated by defaults. + + while (++index < list.length) { + const item = list[index] + if (!item.previous || item.previous.call(self, self.previous)) { + return true + } + } + } + return false + } + } +} + +/** + * @param {Resolver | undefined} [extraResolver] + * @returns {Resolver} + */ +function createResolver(extraResolver) { + return resolveAllText + + /** @type {Resolver} */ + function resolveAllText(events, context) { + let index = -1 + /** @type {number | undefined} */ + let enter + + // A rather boring computation (to merge adjacent `data` events) which + // improves mm performance by 29%. + while (++index <= events.length) { + if (enter === undefined) { + if (events[index] && events[index][1].type === 'data') { + enter = index + index++ + } + } else if (!events[index] || events[index][1].type !== 'data') { + // Don’t do anything if there is one data token. + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + index = enter + 2 + } + enter = undefined + } + } + return extraResolver ? extraResolver(events, context) : events + } +} + +/** + * A rather ugly set of instructions which again looks at chunks in the input + * stream. + * The reason to do this here is that it is *much* faster to parse in reverse. + * And that we can’t hook into `null` to split the line suffix before an EOF. + * To do: figure out if we can make this into a clean utility, or even in core. + * As it will be useful for GFMs literal autolink extension (and maybe even + * tables?) + * + * @type {Resolver} + */ +function resolveAllLineSuffixes(events, context) { + let eventIndex = 0 // Skip first. + + while (++eventIndex <= events.length) { + if ( + (eventIndex === events.length || + events[eventIndex][1].type === 'lineEnding') && + events[eventIndex - 1][1].type === 'data' + ) { + const data = events[eventIndex - 1][1] + const chunks = context.sliceStream(data) + let index = chunks.length + let bufferIndex = -1 + let size = 0 + /** @type {boolean | undefined} */ + let tabs + while (index--) { + const chunk = chunks[index] + if (typeof chunk === 'string') { + bufferIndex = chunk.length + while (chunk.charCodeAt(bufferIndex - 1) === 32) { + size++ + bufferIndex-- + } + if (bufferIndex) break + bufferIndex = -1 + } + // Number + else if (chunk === -2) { + tabs = true + size++ + } else if (chunk === -1) { + // Empty + } else { + // Replacement character, exit. + index++ + break + } + } + if (size) { + const token = { + type: + eventIndex === events.length || tabs || size < 2 + ? 'lineSuffix' + : 'hardBreakTrailing', + start: { + line: data.end.line, + column: data.end.column - size, + offset: data.end.offset - size, + _index: data.start._index + index, + _bufferIndex: index + ? bufferIndex + : data.start._bufferIndex + bufferIndex + }, + end: Object.assign({}, data.end) + } + data.end = Object.assign({}, token.start) + if (data.start.offset === data.end.offset) { + Object.assign(data, token) + } else { + events.splice( + eventIndex, + 0, + ['enter', token, context], + ['exit', token, context] + ) + eventIndex += 2 + } + } + eventIndex++ + } + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js +/** + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * Call all `resolveAll`s. + * + * @param {Array<{resolveAll?: Resolver | undefined}>} constructs + * List of constructs, optionally with `resolveAll`s. + * @param {Array} events + * List of events. + * @param {TokenizeContext} context + * Context used by `tokenize`. + * @returns {Array} + * Changed events. + */ +function resolveAll(constructs, events, context) { + /** @type {Array} */ + const called = [] + let index = -1 + + while (++index < constructs.length) { + const resolve = constructs[index].resolveAll + + if (resolve && !called.includes(resolve)) { + events = resolve(events, context) + called.push(resolve) + } + } + + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenType} TokenType + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * @callback Restore + * @returns {void} + * + * @typedef Info + * @property {Restore} restore + * @property {number} from + * + * @callback ReturnHandle + * Handle a successful run. + * @param {Construct} construct + * @param {Info} info + * @returns {void} + */ + + + + +/** + * Create a tokenizer. + * Tokenizers deal with one type of data (e.g., containers, flow, text). + * The parser is the object dealing with it all. + * `initialize` works like other constructs, except that only its `tokenize` + * function is used, in which case it doesn’t receive an `ok` or `nok`. + * `from` can be given to set the point before the first character, although + * when further lines are indented, they must be set with `defineSkip`. + * + * @param {ParseContext} parser + * @param {InitialConstruct} initialize + * @param {Omit | undefined} [from] + * @returns {TokenizeContext} + */ +function createTokenizer(parser, initialize, from) { + /** @type {Point} */ + let point = Object.assign( + from + ? Object.assign({}, from) + : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ) + /** @type {Record} */ + const columnStart = {} + /** @type {Array} */ + const resolveAllConstructs = [] + /** @type {Array} */ + let chunks = [] + /** @type {Array} */ + let stack = [] + /** @type {boolean | undefined} */ + let consumed = true + + /** + * Tools used for tokenizing. + * + * @type {Effects} + */ + const effects = { + consume, + enter, + exit, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, { + interrupt: true + }) + } + + /** + * State and tools for resolving and serializing. + * + * @type {TokenizeContext} + */ + const context = { + previous: null, + code: null, + containerState: {}, + events: [], + parser, + sliceStream, + sliceSerialize, + now, + defineSkip, + write + } + + /** + * The state function. + * + * @type {State | void} + */ + let state = initialize.tokenize.call(context, effects) + + /** + * Track which character we expect to be consumed, to catch bugs. + * + * @type {Code} + */ + let expectedCode + if (initialize.resolveAll) { + resolveAllConstructs.push(initialize) + } + return context + + /** @type {TokenizeContext['write']} */ + function write(slice) { + chunks = push(chunks, slice) + main() + + // Exit if we’re not done, resolve might change stuff. + if (chunks[chunks.length - 1] !== null) { + return [] + } + addResult(initialize, 0) + + // Otherwise, resolve, and exit. + context.events = resolveAll(resolveAllConstructs, context.events, context) + return context.events + } + + // + // Tools. + // + + /** @type {TokenizeContext['sliceSerialize']} */ + function sliceSerialize(token, expandTabs) { + return serializeChunks(sliceStream(token), expandTabs) + } + + /** @type {TokenizeContext['sliceStream']} */ + function sliceStream(token) { + return sliceChunks(chunks, token) + } + + /** @type {TokenizeContext['now']} */ + function now() { + // This is a hot path, so we clone manually instead of `Object.assign({}, point)` + const {line, column, offset, _index, _bufferIndex} = point + return { + line, + column, + offset, + _index, + _bufferIndex + } + } + + /** @type {TokenizeContext['defineSkip']} */ + function defineSkip(value) { + columnStart[value.line] = value.column + accountForPotentialSkip() + } + + // + // State management. + // + + /** + * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by + * `consume`). + * Here is where we walk through the chunks, which either include strings of + * several characters, or numerical character codes. + * The reason to do this in a loop instead of a call is so the stack can + * drain. + * + * @returns {void} + */ + function main() { + /** @type {number} */ + let chunkIndex + while (point._index < chunks.length) { + const chunk = chunks[point._index] + + // If we’re in a buffer chunk, loop through it. + if (typeof chunk === 'string') { + chunkIndex = point._index + if (point._bufferIndex < 0) { + point._bufferIndex = 0 + } + while ( + point._index === chunkIndex && + point._bufferIndex < chunk.length + ) { + go(chunk.charCodeAt(point._bufferIndex)) + } + } else { + go(chunk) + } + } + } + + /** + * Deal with one code. + * + * @param {Code} code + * @returns {void} + */ + function go(code) { + consumed = undefined + expectedCode = code + state = state(code) + } + + /** @type {Effects['consume']} */ + function consume(code) { + if (markdownLineEnding(code)) { + point.line++ + point.column = 1 + point.offset += code === -3 ? 2 : 1 + accountForPotentialSkip() + } else if (code !== -1) { + point.column++ + point.offset++ + } + + // Not in a string chunk. + if (point._bufferIndex < 0) { + point._index++ + } else { + point._bufferIndex++ + + // At end of string chunk. + // @ts-expect-error Points w/ non-negative `_bufferIndex` reference + // strings. + if (point._bufferIndex === chunks[point._index].length) { + point._bufferIndex = -1 + point._index++ + } + } + + // Expose the previous character. + context.previous = code + + // Mark as consumed. + consumed = true + } + + /** @type {Effects['enter']} */ + function enter(type, fields) { + /** @type {Token} */ + // @ts-expect-error Patch instead of assign required fields to help GC. + const token = fields || {} + token.type = type + token.start = now() + context.events.push(['enter', token, context]) + stack.push(token) + return token + } + + /** @type {Effects['exit']} */ + function exit(type) { + const token = stack.pop() + token.end = now() + context.events.push(['exit', token, context]) + return token + } + + /** + * Use results. + * + * @type {ReturnHandle} + */ + function onsuccessfulconstruct(construct, info) { + addResult(construct, info.from) + } + + /** + * Discard results. + * + * @type {ReturnHandle} + */ + function onsuccessfulcheck(_, info) { + info.restore() + } + + /** + * Factory to attempt/check/interrupt. + * + * @param {ReturnHandle} onreturn + * @param {{interrupt?: boolean | undefined} | undefined} [fields] + */ + function constructFactory(onreturn, fields) { + return hook + + /** + * Handle either an object mapping codes to constructs, a list of + * constructs, or a single construct. + * + * @param {Array | Construct | ConstructRecord} constructs + * @param {State} returnState + * @param {State | undefined} [bogusState] + * @returns {State} + */ + function hook(constructs, returnState, bogusState) { + /** @type {Array} */ + let listOfConstructs + /** @type {number} */ + let constructIndex + /** @type {Construct} */ + let currentConstruct + /** @type {Info} */ + let info + return Array.isArray(constructs) /* c8 ignore next 1 */ + ? handleListOfConstructs(constructs) + : 'tokenize' in constructs + ? // @ts-expect-error Looks like a construct. + handleListOfConstructs([constructs]) + : handleMapOfConstructs(constructs) + + /** + * Handle a list of construct. + * + * @param {ConstructRecord} map + * @returns {State} + */ + function handleMapOfConstructs(map) { + return start + + /** @type {State} */ + function start(code) { + const def = code !== null && map[code] + const all = code !== null && map.null + const list = [ + // To do: add more extension tests. + /* c8 ignore next 2 */ + ...(Array.isArray(def) ? def : def ? [def] : []), + ...(Array.isArray(all) ? all : all ? [all] : []) + ] + return handleListOfConstructs(list)(code) + } + } + + /** + * Handle a list of construct. + * + * @param {Array} list + * @returns {State} + */ + function handleListOfConstructs(list) { + listOfConstructs = list + constructIndex = 0 + if (list.length === 0) { + return bogusState + } + return handleConstruct(list[constructIndex]) + } + + /** + * Handle a single construct. + * + * @param {Construct} construct + * @returns {State} + */ + function handleConstruct(construct) { + return start + + /** @type {State} */ + function start(code) { + // To do: not needed to store if there is no bogus state, probably? + // Currently doesn’t work because `inspect` in document does a check + // w/o a bogus, which doesn’t make sense. But it does seem to help perf + // by not storing. + info = store() + currentConstruct = construct + if (!construct.partial) { + context.currentConstruct = construct + } + + // Always populated by defaults. + + if ( + construct.name && + context.parser.constructs.disable.null.includes(construct.name) + ) { + return nok(code) + } + return construct.tokenize.call( + // If we do have fields, create an object w/ `context` as its + // prototype. + // This allows a “live binding”, which is needed for `interrupt`. + fields ? Object.assign(Object.create(context), fields) : context, + effects, + ok, + nok + )(code) + } + } + + /** @type {State} */ + function ok(code) { + consumed = true + onreturn(currentConstruct, info) + return returnState + } + + /** @type {State} */ + function nok(code) { + consumed = true + info.restore() + if (++constructIndex < listOfConstructs.length) { + return handleConstruct(listOfConstructs[constructIndex]) + } + return bogusState + } + } + } + + /** + * @param {Construct} construct + * @param {number} from + * @returns {void} + */ + function addResult(construct, from) { + if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { + resolveAllConstructs.push(construct) + } + if (construct.resolve) { + splice( + context.events, + from, + context.events.length - from, + construct.resolve(context.events.slice(from), context) + ) + } + if (construct.resolveTo) { + context.events = construct.resolveTo(context.events, context) + } + } + + /** + * Store state. + * + * @returns {Info} + */ + function store() { + const startPoint = now() + const startPrevious = context.previous + const startCurrentConstruct = context.currentConstruct + const startEventsIndex = context.events.length + const startStack = Array.from(stack) + return { + restore, + from: startEventsIndex + } + + /** + * Restore state. + * + * @returns {void} + */ + function restore() { + point = startPoint + context.previous = startPrevious + context.currentConstruct = startCurrentConstruct + context.events.length = startEventsIndex + stack = startStack + accountForPotentialSkip() + } + } + + /** + * Move the current point a bit forward in the line when it’s on a column + * skip. + * + * @returns {void} + */ + function accountForPotentialSkip() { + if (point.line in columnStart && point.column < 2) { + point.column = columnStart[point.line] + point.offset += columnStart[point.line] - 1 + } + } +} + +/** + * Get the chunks from a slice of chunks in the range of a token. + * + * @param {Array} chunks + * @param {Pick} token + * @returns {Array} + */ +function sliceChunks(chunks, token) { + const startIndex = token.start._index + const startBufferIndex = token.start._bufferIndex + const endIndex = token.end._index + const endBufferIndex = token.end._bufferIndex + /** @type {Array} */ + let view + if (startIndex === endIndex) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] + } else { + view = chunks.slice(startIndex, endIndex) + if (startBufferIndex > -1) { + const head = view[0] + if (typeof head === 'string') { + view[0] = head.slice(startBufferIndex) + } else { + view.shift() + } + } + if (endBufferIndex > 0) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view.push(chunks[endIndex].slice(0, endBufferIndex)) + } + } + return view +} + +/** + * Get the string value of a slice of chunks. + * + * @param {Array} chunks + * @param {boolean | undefined} [expandTabs=false] + * @returns {string} + */ +function serializeChunks(chunks, expandTabs) { + let index = -1 + /** @type {Array} */ + const result = [] + /** @type {boolean | undefined} */ + let atTab + while (++index < chunks.length) { + const chunk = chunks[index] + /** @type {string} */ + let value + if (typeof chunk === 'string') { + value = chunk + } else + switch (chunk) { + case -5: { + value = '\r' + break + } + case -4: { + value = '\n' + break + } + case -3: { + value = '\r' + '\n' + break + } + case -2: { + value = expandTabs ? ' ' : '\t' + break + } + case -1: { + if (!expandTabs && atTab) continue + value = ' ' + break + } + default: { + // Currently only replacement character. + value = String.fromCharCode(chunk) + } + } + atTab = chunk === -2 + result.push(value) + } + return result.join('') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const thematicBreak = { + name: 'thematicBreak', + tokenize: tokenizeThematicBreak +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeThematicBreak(effects, ok, nok) { + let size = 0 + /** @type {NonNullable} */ + let marker + return start + + /** + * Start of thematic break. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('thematicBreak') + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * After optional whitespace, at marker. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + marker = code + return atBreak(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.enter('thematicBreakSequence') + return sequence(code) + } + if (size >= 3 && (code === null || markdownLineEnding(code))) { + effects.exit('thematicBreak') + return ok(code) + } + return nok(code) + } + + /** + * In sequence. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function sequence(code) { + if (code === marker) { + effects.consume(code) + size++ + return sequence + } + effects.exit('thematicBreakSequence') + return markdownSpace(code) + ? factorySpace(effects, atBreak, 'whitespace')(code) + : atBreak(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + +/** @type {Construct} */ +const list = { + name: 'list', + tokenize: tokenizeListStart, + continuation: { + tokenize: tokenizeListContinuation + }, + exit: tokenizeListEnd +} + +/** @type {Construct} */ +const listItemPrefixWhitespaceConstruct = { + tokenize: tokenizeListItemPrefixWhitespace, + partial: true +} + +/** @type {Construct} */ +const indentConstruct = { + tokenize: tokenizeIndent, + partial: true +} + +// To do: `markdown-rs` parses list items on their own and later stitches them +// together. + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListStart(effects, ok, nok) { + const self = this + const tail = self.events[self.events.length - 1] + let initialSize = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + let size = 0 + return start + + /** @type {State} */ + function start(code) { + const kind = + self.containerState.type || + (code === 42 || code === 43 || code === 45 + ? 'listUnordered' + : 'listOrdered') + if ( + kind === 'listUnordered' + ? !self.containerState.marker || code === self.containerState.marker + : asciiDigit(code) + ) { + if (!self.containerState.type) { + self.containerState.type = kind + effects.enter(kind, { + _container: true + }) + } + if (kind === 'listUnordered') { + effects.enter('listItemPrefix') + return code === 42 || code === 45 + ? effects.check(thematicBreak, nok, atMarker)(code) + : atMarker(code) + } + if (!self.interrupt || code === 49) { + effects.enter('listItemPrefix') + effects.enter('listItemValue') + return inside(code) + } + } + return nok(code) + } + + /** @type {State} */ + function inside(code) { + if (asciiDigit(code) && ++size < 10) { + effects.consume(code) + return inside + } + if ( + (!self.interrupt || size < 2) && + (self.containerState.marker + ? code === self.containerState.marker + : code === 41 || code === 46) + ) { + effects.exit('listItemValue') + return atMarker(code) + } + return nok(code) + } + + /** + * @type {State} + **/ + function atMarker(code) { + effects.enter('listItemMarker') + effects.consume(code) + effects.exit('listItemMarker') + self.containerState.marker = self.containerState.marker || code + return effects.check( + blankLine, + // Can’t be empty when interrupting. + self.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ) + } + + /** @type {State} */ + function onBlank(code) { + self.containerState.initialBlankLine = true + initialSize++ + return endOfPrefix(code) + } + + /** @type {State} */ + function otherPrefix(code) { + if (markdownSpace(code)) { + effects.enter('listItemPrefixWhitespace') + effects.consume(code) + effects.exit('listItemPrefixWhitespace') + return endOfPrefix + } + return nok(code) + } + + /** @type {State} */ + function endOfPrefix(code) { + self.containerState.size = + initialSize + + self.sliceSerialize(effects.exit('listItemPrefix'), true).length + return ok(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListContinuation(effects, ok, nok) { + const self = this + self.containerState._closeFlow = undefined + return effects.check(blankLine, onBlank, notBlank) + + /** @type {State} */ + function onBlank(code) { + self.containerState.furtherBlankLines = + self.containerState.furtherBlankLines || + self.containerState.initialBlankLine + + // We have a blank line. + // Still, try to consume at most the items size. + return factorySpace( + effects, + ok, + 'listItemIndent', + self.containerState.size + 1 + )(code) + } + + /** @type {State} */ + function notBlank(code) { + if (self.containerState.furtherBlankLines || !markdownSpace(code)) { + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return notInCurrentItem(code) + } + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) + } + + /** @type {State} */ + function notInCurrentItem(code) { + // While we do continue, we signal that the flow should be closed. + self.containerState._closeFlow = true + // As we’re closing flow, we’re no longer interrupting. + self.interrupt = undefined + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(list, ok, nok), + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeIndent(effects, ok, nok) { + const self = this + return factorySpace( + effects, + afterPrefix, + 'listItemIndent', + self.containerState.size + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'listItemIndent' && + tail[2].sliceSerialize(tail[1], true).length === self.containerState.size + ? ok(code) + : nok(code) + } +} + +/** + * @type {Exiter} + * @this {TokenizeContext} + */ +function tokenizeListEnd(effects) { + effects.exit(this.containerState.type) +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListItemPrefixWhitespace(effects, ok, nok) { + const self = this + + // Always populated by defaults. + + return factorySpace( + effects, + afterPrefix, + 'listItemPrefixWhitespace', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return !markdownSpace(code) && + tail && + tail[1].type === 'listItemPrefixWhitespace' + ? ok(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blockQuote = { + name: 'blockQuote', + tokenize: tokenizeBlockQuoteStart, + continuation: { + tokenize: tokenizeBlockQuoteContinuation + }, + exit +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteStart(effects, ok, nok) { + const self = this + return start + + /** + * Start of block quote. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 62) { + const state = self.containerState + if (!state.open) { + effects.enter('blockQuote', { + _container: true + }) + state.open = true + } + effects.enter('blockQuotePrefix') + effects.enter('blockQuoteMarker') + effects.consume(code) + effects.exit('blockQuoteMarker') + return after + } + return nok(code) + } + + /** + * After `>`, before optional whitespace. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownSpace(code)) { + effects.enter('blockQuotePrefixWhitespace') + effects.consume(code) + effects.exit('blockQuotePrefixWhitespace') + effects.exit('blockQuotePrefix') + return ok + } + effects.exit('blockQuotePrefix') + return ok(code) + } +} + +/** + * Start of block quote continuation. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteContinuation(effects, ok, nok) { + const self = this + return contStart + + /** + * Start of block quote continuation. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contStart(code) { + if (markdownSpace(code)) { + // Always populated by defaults. + + return factorySpace( + effects, + contBefore, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } + return contBefore(code) + } + + /** + * At `>`, after optional whitespace. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contBefore(code) { + return effects.attempt(blockQuote, ok, nok)(code) + } +} + +/** @type {Exiter} */ +function exit(effects) { + effects.exit('blockQuote') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse destinations. + * + * ###### Examples + * + * ```markdown + * + * b> + * + * + * a + * a\)b + * a(b)c + * a(b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type for whole (`` or `b`). + * @param {TokenType} literalType + * Type when enclosed (``). + * @param {TokenType} literalMarkerType + * Type for enclosing (`<` and `>`). + * @param {TokenType} rawType + * Type when not enclosed (`b`). + * @param {TokenType} stringType + * Type for the value (`a` or `b`). + * @param {number | undefined} [max=Infinity] + * Depth of nested parens (inclusive). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryDestination( + effects, + ok, + nok, + type, + literalType, + literalMarkerType, + rawType, + stringType, + max +) { + const limit = max || Number.POSITIVE_INFINITY + let balance = 0 + return start + + /** + * Start of destination. + * + * ```markdown + * > | + * ^ + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 60) { + effects.enter(type) + effects.enter(literalType) + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + return enclosedBefore + } + + // ASCII control, space, closing paren. + if (code === null || code === 32 || code === 41 || asciiControl(code)) { + return nok(code) + } + effects.enter(type) + effects.enter(rawType) + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return raw(code) + } + + /** + * After `<`, at an enclosed destination. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function enclosedBefore(code) { + if (code === 62) { + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + effects.exit(literalType) + effects.exit(type) + return ok + } + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return enclosed(code) + } + + /** + * In enclosed destination. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function enclosed(code) { + if (code === 62) { + effects.exit('chunkString') + effects.exit(stringType) + return enclosedBefore(code) + } + if (code === null || code === 60 || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? enclosedEscape : enclosed + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function enclosedEscape(code) { + if (code === 60 || code === 62 || code === 92) { + effects.consume(code) + return enclosed + } + return enclosed(code) + } + + /** + * In raw destination. + * + * ```markdown + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function raw(code) { + if ( + !balance && + (code === null || code === 41 || markdownLineEndingOrSpace(code)) + ) { + effects.exit('chunkString') + effects.exit(stringType) + effects.exit(rawType) + effects.exit(type) + return ok(code) + } + if (balance < limit && code === 40) { + effects.consume(code) + balance++ + return raw + } + if (code === 41) { + effects.consume(code) + balance-- + return raw + } + + // ASCII control (but *not* `\0`) and space and `(`. + // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it + // doesn’t. + if (code === null || code === 32 || code === 40 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? rawEscape : raw + } + + /** + * After `\`, at special character. + * + * ```markdown + * > | a\*a + * ^ + * ``` + * + * @type {State} + */ + function rawEscape(code) { + if (code === 40 || code === 41 || code === 92) { + effects.consume(code) + return raw + } + return raw(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse labels. + * + * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. + * + * ###### Examples + * + * ```markdown + * [a] + * [a + * b] + * [a\]b] + * ``` + * + * @this {TokenizeContext} + * Tokenize context. + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole label (`[a]`). + * @param {TokenType} markerType + * Type for the markers (`[` and `]`). + * @param {TokenType} stringType + * Type for the identifier (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryLabel(effects, ok, nok, type, markerType, stringType) { + const self = this + let size = 0 + /** @type {boolean} */ + let seen + return start + + /** + * Start of label. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.enter(stringType) + return atBreak + } + + /** + * In label, at something, before something else. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if ( + size > 999 || + code === null || + code === 91 || + (code === 93 && !seen) || + // To do: remove in the future once we’ve switched from + // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + // which doesn’t need this. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + (code === 94 && + !size && + '_hiddenFootnoteSupport' in self.parser.constructs) + ) { + return nok(code) + } + if (code === 93) { + effects.exit(stringType) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + + // To do: indent? Link chunks and EOLs together? + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return atBreak + } + effects.enter('chunkString', { + contentType: 'string' + }) + return labelInside(code) + } + + /** + * In label, in text. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function labelInside(code) { + if ( + code === null || + code === 91 || + code === 93 || + markdownLineEnding(code) || + size++ > 999 + ) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + if (!seen) seen = !markdownSpace(code) + return code === 92 ? labelEscape : labelInside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | [a\*a] + * ^ + * ``` + * + * @type {State} + */ + function labelEscape(code) { + if (code === 91 || code === 92 || code === 93) { + effects.consume(code) + size++ + return labelInside + } + return labelInside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +/** + * Parse titles. + * + * ###### Examples + * + * ```markdown + * "a" + * 'b' + * (c) + * "a + * b" + * 'a + * b' + * (a\)b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole title (`"a"`, `'b'`, `(c)`). + * @param {TokenType} markerType + * Type for the markers (`"`, `'`, `(`, and `)`). + * @param {TokenType} stringType + * Type for the value (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryTitle(effects, ok, nok, type, markerType, stringType) { + /** @type {NonNullable} */ + let marker + return start + + /** + * Start of title. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 34 || code === 39 || code === 40) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + marker = code === 40 ? 41 : code + return begin + } + return nok(code) + } + + /** + * After opening marker. + * + * This is also used at the closing marker. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function begin(code) { + if (code === marker) { + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + effects.enter(stringType) + return atBreak(code) + } + + /** + * At something, before something else. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.exit(stringType) + return begin(marker) + } + if (code === null) { + return nok(code) + } + + // Note: blank lines can’t exist in content. + if (markdownLineEnding(code)) { + // To do: use `space_or_tab_eol_with_options`, connect. + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, atBreak, 'linePrefix') + } + effects.enter('chunkString', { + contentType: 'string' + }) + return inside(code) + } + + /** + * + * + * @type {State} + */ + function inside(code) { + if (code === marker || code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + return code === 92 ? escape : inside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | "a\*b" + * ^ + * ``` + * + * @type {State} + */ + function escape(code) { + if (code === marker || code === 92) { + effects.consume(code) + return inside + } + return inside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + */ + + + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * line endings or spaces in markdown are often optional, in which case this + * factory can be used and `ok` will be switched to whether spaces were found + * or not + * * one line ending or space can be detected with + * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @returns + * Start state. + */ +function factoryWhitespace(effects, ok) { + /** @type {boolean} */ + let seen + return start + + /** @type {State} */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + seen = true + return start + } + if (markdownSpace(code)) { + return factorySpace( + effects, + start, + seen ? 'linePrefix' : 'lineSuffix' + )(code) + } + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js +/** + * Normalize an identifier (as found in references, definitions). + * + * Collapses markdown whitespace, trim, and then lower- and uppercase. + * + * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their + * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different + * uppercase character (U+0398 (`Θ`)). + * So, to get a canonical form, we perform both lower- and uppercase. + * + * Using uppercase last makes sure keys will never interact with default + * prototypal values (such as `constructor`): nothing in the prototype of + * `Object` is uppercase. + * + * @param {string} value + * Identifier to normalize. + * @returns {string} + * Normalized identifier. + */ +function normalizeIdentifier(value) { + return ( + value + // Collapse markdown whitespace. + .replace(/[\t\n\r ]+/g, ' ') + // Trim. + .replace(/^ | $/g, '') + // Some characters are considered “uppercase”, but if their lowercase + // counterpart is uppercased will result in a different uppercase + // character. + // Hence, to get that form, we perform both lower- and uppercase. + // Upper case makes sure keys will not interact with default prototypal + // methods: no method is uppercase. + .toLowerCase() + .toUpperCase() + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + +/** @type {Construct} */ +const definition = { + name: 'definition', + tokenize: tokenizeDefinition +} + +/** @type {Construct} */ +const titleBefore = { + tokenize: tokenizeTitleBefore, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeDefinition(effects, ok, nok) { + const self = this + /** @type {string} */ + let identifier + return start + + /** + * At start of a definition. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Do not interrupt paragraphs (but do follow definitions). + // To do: do `interrupt` the way `markdown-rs` does. + // To do: parse whitespace the way `markdown-rs` does. + effects.enter('definition') + return before(code) + } + + /** + * After optional whitespace, at `[`. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + // To do: parse whitespace the way `markdown-rs` does. + + return factoryLabel.call( + self, + effects, + labelAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionLabel', + 'definitionLabelMarker', + 'definitionLabelString' + )(code) + } + + /** + * After label. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function labelAfter(code) { + identifier = normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + if (code === 58) { + effects.enter('definitionMarker') + effects.consume(code) + effects.exit('definitionMarker') + return markerAfter + } + return nok(code) + } + + /** + * After marker. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function markerAfter(code) { + // Note: whitespace is optional. + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, destinationBefore)(code) + : destinationBefore(code) + } + + /** + * Before destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationBefore(code) { + return factoryDestination( + effects, + destinationAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionDestination', + 'definitionDestinationLiteral', + 'definitionDestinationLiteralMarker', + 'definitionDestinationRaw', + 'definitionDestinationString' + )(code) + } + + /** + * After destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationAfter(code) { + return effects.attempt(titleBefore, after, after)(code) + } + + /** + * After definition. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return markdownSpace(code) + ? factorySpace(effects, afterWhitespace, 'whitespace')(code) + : afterWhitespace(code) + } + + /** + * After definition, after optional whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function afterWhitespace(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('definition') + + // Note: we don’t care about uniqueness. + // It’s likely that that doesn’t happen very frequently. + // It is more likely that it wastes precious time. + self.parser.defined.push(identifier) + + // To do: `markdown-rs` interrupt. + // // You’d be interrupting. + // tokenizer.interrupt = true + return ok(code) + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeTitleBefore(effects, ok, nok) { + return titleBefore + + /** + * After destination, at whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, beforeMarker)(code) + : nok(code) + } + + /** + * At title. + * + * ```markdown + * | [a]: b + * > | "c" + * ^ + * ``` + * + * @type {State} + */ + function beforeMarker(code) { + return factoryTitle( + effects, + titleAfter, + nok, + 'definitionTitle', + 'definitionTitleMarker', + 'definitionTitleString' + )(code) + } + + /** + * After title. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfter(code) { + return markdownSpace(code) + ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) + : titleAfterOptionalWhitespace(code) + } + + /** + * After title, after optional whitespace. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfterOptionalWhitespace(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const codeIndented = { + name: 'codeIndented', + tokenize: tokenizeCodeIndented +} + +/** @type {Construct} */ +const furtherStart = { + tokenize: tokenizeFurtherStart, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeIndented(effects, ok, nok) { + const self = this + return start + + /** + * Start of code (indented). + * + * > **Parsing note**: it is not needed to check if this first line is a + * > filled line (that it has a non-whitespace character), because blank lines + * > are parsed already, so we never run into that. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: manually check if interrupting like `markdown-rs`. + + effects.enter('codeIndented') + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? atBreak(code) + : nok(code) + } + + /** + * At a break. + * + * ```markdown + * > | aaa + * ^ ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === null) { + return after(code) + } + if (markdownLineEnding(code)) { + return effects.attempt(furtherStart, atBreak, after)(code) + } + effects.enter('codeFlowValue') + return inside(code) + } + + /** + * In code content. + * + * ```markdown + * > | aaa + * ^^^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return atBreak(code) + } + effects.consume(code) + return inside + } + + /** @type {State} */ + function after(code) { + effects.exit('codeIndented') + // To do: allow interrupting like `markdown-rs`. + // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeFurtherStart(effects, ok, nok) { + const self = this + return furtherStart + + /** + * At eol, trying to parse another indent. + * + * ```markdown + * > | aaa + * ^ + * | bbb + * ``` + * + * @type {State} + */ + function furtherStart(code) { + // To do: improve `lazy` / `pierce` handling. + // If this is a lazy line, it can’t be code. + if (self.parser.lazy[self.now().line]) { + return nok(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return furtherStart + } + + // To do: the code here in `micromark-js` is a bit different from + // `markdown-rs` because there it can attempt spaces. + // We can’t yet. + // + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? ok(code) + : markdownLineEnding(code) + ? furtherStart(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const headingAtx = { + name: 'headingAtx', + tokenize: tokenizeHeadingAtx, + resolve: resolveHeadingAtx +} + +/** @type {Resolver} */ +function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2 + let contentStart = 3 + /** @type {Token} */ + let content + /** @type {Token} */ + let text + + // Prefix whitespace, part of the opening. + if (events[contentStart][1].type === 'whitespace') { + contentStart += 2 + } + + // Suffix whitespace, part of the closing. + if ( + contentEnd - 2 > contentStart && + events[contentEnd][1].type === 'whitespace' + ) { + contentEnd -= 2 + } + if ( + events[contentEnd][1].type === 'atxHeadingSequence' && + (contentStart === contentEnd - 1 || + (contentEnd - 4 > contentStart && + events[contentEnd - 2][1].type === 'whitespace')) + ) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 + } + if (contentEnd > contentStart) { + content = { + type: 'atxHeadingText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end + } + text = { + type: 'chunkText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + contentType: 'text' + } + splice(events, contentStart, contentEnd - contentStart + 1, [ + ['enter', content, context], + ['enter', text, context], + ['exit', text, context], + ['exit', content, context] + ]) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHeadingAtx(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of a heading (atx). + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + effects.enter('atxHeading') + return before(code) + } + + /** + * After optional whitespace, at `#`. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('atxHeadingSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 35 && size++ < 6) { + effects.consume(code) + return sequenceOpen + } + + // Always at least one `#`. + if (code === null || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingSequence') + return atBreak(code) + } + return nok(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === 35) { + effects.enter('atxHeadingSequence') + return sequenceFurther(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('atxHeading') + // To do: interrupt like `markdown-rs`. + // // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } + if (markdownSpace(code)) { + return factorySpace(effects, atBreak, 'whitespace')(code) + } + + // To do: generate `data` tokens, add the `text` token later. + // Needs edit map, see: `markdown.rs`. + effects.enter('atxHeadingText') + return data(code) + } + + /** + * In further sequence (after whitespace). + * + * Could be normal “visible” hashes in the heading or a final sequence. + * + * ```markdown + * > | ## aa ## + * ^ + * ``` + * + * @type {State} + */ + function sequenceFurther(code) { + if (code === 35) { + effects.consume(code) + return sequenceFurther + } + effects.exit('atxHeadingSequence') + return atBreak(code) + } + + /** + * In text. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingText') + return atBreak(code) + } + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const setextUnderline = { + name: 'setextUnderline', + tokenize: tokenizeSetextUnderline, + resolveTo: resolveToSetextUnderline +} + +/** @type {Resolver} */ +function resolveToSetextUnderline(events, context) { + // To do: resolve like `markdown-rs`. + let index = events.length + /** @type {number | undefined} */ + let content + /** @type {number | undefined} */ + let text + /** @type {number | undefined} */ + let definition + + // Find the opening of the content. + // It’ll always exist: we don’t tokenize if it isn’t there. + while (index--) { + if (events[index][0] === 'enter') { + if (events[index][1].type === 'content') { + content = index + break + } + if (events[index][1].type === 'paragraph') { + text = index + } + } + // Exit + else { + if (events[index][1].type === 'content') { + // Remove the content end (if needed we’ll add it later) + events.splice(index, 1) + } + if (!definition && events[index][1].type === 'definition') { + definition = index + } + } + } + const heading = { + type: 'setextHeading', + start: Object.assign({}, events[text][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + + // Change the paragraph to setext heading text. + events[text][1].type = 'setextHeadingText' + + // If we have definitions in the content, we’ll keep on having content, + // but we need move it. + if (definition) { + events.splice(text, 0, ['enter', heading, context]) + events.splice(definition + 1, 0, ['exit', events[content][1], context]) + events[content][1].end = Object.assign({}, events[definition][1].end) + } else { + events[content][1] = heading + } + + // Add the heading exit at the end. + events.push(['exit', heading, context]) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeSetextUnderline(effects, ok, nok) { + const self = this + /** @type {NonNullable} */ + let marker + return start + + /** + * At start of heading (setext) underline. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + let index = self.events.length + /** @type {boolean | undefined} */ + let paragraph + // Find an opening. + while (index--) { + // Skip enter/exit of line ending, line prefix, and content. + // We can now either have a definition or a paragraph. + if ( + self.events[index][1].type !== 'lineEnding' && + self.events[index][1].type !== 'linePrefix' && + self.events[index][1].type !== 'content' + ) { + paragraph = self.events[index][1].type === 'paragraph' + break + } + } + + // To do: handle lazy/pierce like `markdown-rs`. + // To do: parse indent like `markdown-rs`. + if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { + effects.enter('setextHeadingLine') + marker = code + return before(code) + } + return nok(code) + } + + /** + * After optional whitespace, at `-` or `=`. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('setextHeadingLineSequence') + return inside(code) + } + + /** + * In sequence. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + effects.exit('setextHeadingLineSequence') + return markdownSpace(code) + ? factorySpace(effects, after, 'lineSuffix')(code) + : after(code) + } + + /** + * After sequence, after optional whitespace. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('setextHeadingLine') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js +/** + * List of lowercase HTML “block” tag names. + * + * The list, when parsing HTML (flow), results in more relaxed rules (condition + * 6). + * Because they are known blocks, the HTML-like syntax doesn’t have to be + * strictly parsed. + * For tag names not in this list, a more strict algorithm (condition 7) is used + * to detect whether the HTML-like syntax is seen as HTML (flow) or not. + * + * This is copied from: + * . + * + * > 👉 **Note**: `search` was added in `CommonMark@0.31`. + */ +const htmlBlockNames = [ + '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' +] + +/** + * List of lowercase HTML “raw” tag names. + * + * The list, when parsing HTML (flow), results in HTML that can include lines + * without exiting, until a closing tag also in this list is found (condition + * 1). + * + * This module is copied from: + * . + * + * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. + */ +const htmlRawNames = ['pre', 'script', 'style', 'textarea'] + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + +/** @type {Construct} */ +const htmlFlow = { + name: 'htmlFlow', + tokenize: tokenizeHtmlFlow, + resolveTo: resolveToHtmlFlow, + concrete: true +} + +/** @type {Construct} */ +const blankLineBefore = { + tokenize: tokenizeBlankLineBefore, + partial: true +} +const nonLazyContinuationStart = { + tokenize: tokenizeNonLazyContinuationStart, + partial: true +} + +/** @type {Resolver} */ +function resolveToHtmlFlow(events) { + let index = events.length + while (index--) { + if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { + break + } + } + if (index > 1 && events[index - 2][1].type === 'linePrefix') { + // Add the prefix start to the HTML token. + events[index][1].start = events[index - 2][1].start + // Add the prefix start to the HTML line token. + events[index + 1][1].start = events[index - 2][1].start + // Remove the line prefix. + events.splice(index - 2, 2) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlFlow(effects, ok, nok) { + const self = this + /** @type {number} */ + let marker + /** @type {boolean} */ + let closingTag + /** @type {string} */ + let buffer + /** @type {number} */ + let index + /** @type {Code} */ + let markerB + return start + + /** + * Start of HTML (flow). + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * At `<`, after optional whitespace. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('htmlFlow') + effects.enter('htmlFlowData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * > | + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + closingTag = true + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + marker = 3 + // To do: + // tokenizer.concrete = true + // To do: use `markdown-rs` style interrupt. + // While we’re in an instruction instead of a declaration, we’re on a `?` + // right now, so we do need to search for `>`, similar to declarations. + return self.interrupt ? ok : continuationDeclarationInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After ` | + * ^ + * > | + * ^ + * > | &<]]> + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + marker = 2 + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + marker = 5 + index = 0 + return cdataOpenInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + marker = 4 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After ` | + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After ` | &<]]> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + if (index === value.length) { + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return cdataOpenInside + } + return nok(code) + } + + /** + * After ` | + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * In tag name. + * + * ```markdown + * > | + * ^^ + * > | + * ^^ + * ``` + * + * @type {State} + */ + function tagName(code) { + if ( + code === null || + code === 47 || + code === 62 || + markdownLineEndingOrSpace(code) + ) { + const slash = code === 47 + const name = buffer.toLowerCase() + if (!slash && !closingTag && htmlRawNames.includes(name)) { + marker = 1 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + if (htmlBlockNames.includes(buffer.toLowerCase())) { + marker = 6 + if (slash) { + effects.consume(code) + return basicSelfClosing + } + + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + marker = 7 + // Do not support complete HTML when interrupting. + return self.interrupt && !self.parser.lazy[self.now().line] + ? nok(code) + : closingTag + ? completeClosingTagAfter(code) + : completeAttributeNameBefore(code) + } + + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + buffer += String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After closing slash of a basic tag name. + * + * ```markdown + * > |
+ * ^ + * ``` + * + * @type {State} + */ + function basicSelfClosing(code) { + if (code === 62) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return nok(code) + } + + /** + * After closing slash of a complete tag name. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeClosingTagAfter(code) { + if (markdownSpace(code)) { + effects.consume(code) + return completeClosingTagAfter + } + return completeEnd(code) + } + + /** + * At an attribute name. + * + * At first, this state is used after a complete tag name, after whitespace, + * where it expects optional attributes or the end of the tag. + * It is also reused after attributes, when expecting more optional + * attributes. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * > | + * ^ + * > | + * ^ + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameBefore(code) { + if (code === 47) { + effects.consume(code) + return completeEnd + } + + // ASCII alphanumerical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return completeAttributeName + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameBefore + } + return completeEnd(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeName(code) { + // ASCII alphanumerical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return completeAttributeName + } + return completeAttributeNameAfter(code) + } + + /** + * After attribute name, at an optional initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return completeAttributeValueBefore + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameAfter + } + return completeAttributeNameBefore(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + markerB = code + return completeAttributeValueQuoted + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeValueBefore + } + return completeAttributeValueUnquoted(code) + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuoted(code) { + if (code === markerB) { + effects.consume(code) + markerB = null + return completeAttributeValueQuotedAfter + } + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return completeAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 47 || + code === 60 || + code === 61 || + code === 62 || + code === 96 || + markdownLineEndingOrSpace(code) + ) { + return completeAttributeNameAfter(code) + } + effects.consume(code) + return completeAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the + * end of the tag. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownSpace(code)) { + return completeAttributeNameBefore(code) + } + return nok(code) + } + + /** + * In certain circumstances of a complete tag where only an `>` is allowed. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeEnd(code) { + if (code === 62) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * After `>` in a complete tag. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAfter(code) { + if (code === null || markdownLineEnding(code)) { + // // Do not form containers. + // tokenizer.concrete = true + return continuation(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * In continuation of any HTML kind. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function continuation(code) { + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationCommentInside + } + if (code === 60 && marker === 1) { + effects.consume(code) + return continuationRawTagOpen + } + if (code === 62 && marker === 4) { + effects.consume(code) + return continuationClose + } + if (code === 63 && marker === 3) { + effects.consume(code) + return continuationDeclarationInside + } + if (code === 93 && marker === 5) { + effects.consume(code) + return continuationCdataInside + } + if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { + effects.exit('htmlFlowData') + return effects.check( + blankLineBefore, + continuationAfter, + continuationStart + )(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationStart(code) + } + effects.consume(code) + return continuation + } + + /** + * In continuation, at eol. + * + * ```markdown + * > | + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStart(code) { + return effects.check( + nonLazyContinuationStart, + continuationStartNonLazy, + continuationAfter + )(code) + } + + /** + * In continuation, at eol, before non-lazy content. + * + * ```markdown + * > | + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStartNonLazy(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return continuationBefore + } + + /** + * In continuation, before non-lazy content. + * + * ```markdown + * | + * > | asd + * ^ + * ``` + * + * @type {State} + */ + function continuationBefore(code) { + if (code === null || markdownLineEnding(code)) { + return continuationStart(code) + } + effects.enter('htmlFlowData') + return continuation(code) + } + + /** + * In comment continuation, after one `-`, expecting another. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function continuationCommentInside(code) { + if (code === 45) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In raw continuation, after `<`, at `/`. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function continuationRawTagOpen(code) { + if (code === 47) { + effects.consume(code) + buffer = '' + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In raw continuation, after ` | + * ^^^^^^ + * ``` + * + * @type {State} + */ + function continuationRawEndTag(code) { + if (code === 62) { + const name = buffer.toLowerCase() + if (htmlRawNames.includes(name)) { + effects.consume(code) + return continuationClose + } + return continuation(code) + } + if (asciiAlpha(code) && buffer.length < 8) { + effects.consume(code) + // @ts-expect-error: not null. + buffer += String.fromCharCode(code) + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In cdata continuation, after `]`, expecting `]>`. + * + * ```markdown + * > | &<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationCdataInside(code) { + if (code === 93) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In declaration or instruction continuation, at `>`. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * > | + * ^ + * > | + * ^ + * > | &<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationDeclarationInside(code) { + if (code === 62) { + effects.consume(code) + return continuationClose + } + + // More dashes. + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In closed continuation: everything we get until the eol/eof is part of it. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function continuationClose(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationAfter(code) + } + effects.consume(code) + return continuationClose + } + + /** + * Done. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function continuationAfter(code) { + effects.exit('htmlFlow') + // // Feel free to interrupt. + // tokenizer.interrupt = false + // // No longer concrete. + // tokenizer.concrete = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuationStart(effects, ok, nok) { + const self = this + return start + + /** + * At eol, before continuation. + * + * ```markdown + * > | * ```js + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return after + } + return nok(code) + } + + /** + * A continuation. + * + * ```markdown + * | * ```js + * > | b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLineBefore(effects, ok, nok) { + return start + + /** + * Before eol, expecting blank line. + * + * ```markdown + * > |
+ * ^ + * | + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return effects.attempt(blankLine, ok, nok) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const nonLazyContinuation = { + tokenize: tokenizeNonLazyContinuation, + partial: true +} + +/** @type {Construct} */ +const codeFenced = { + name: 'codeFenced', + tokenize: tokenizeCodeFenced, + concrete: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeFenced(effects, ok, nok) { + const self = this + /** @type {Construct} */ + const closeStart = { + tokenize: tokenizeCloseStart, + partial: true + } + let initialPrefix = 0 + let sizeOpen = 0 + /** @type {NonNullable} */ + let marker + return start + + /** + * Start of code. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse whitespace like `markdown-rs`. + return beforeSequenceOpen(code) + } + + /** + * In opening fence, after prefix, at sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeSequenceOpen(code) { + const tail = self.events[self.events.length - 1] + initialPrefix = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + marker = code + effects.enter('codeFenced') + effects.enter('codeFencedFence') + effects.enter('codeFencedFenceSequence') + return sequenceOpen(code) + } + + /** + * In opening fence sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === marker) { + sizeOpen++ + effects.consume(code) + return sequenceOpen + } + if (sizeOpen < 3) { + return nok(code) + } + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, infoBefore, 'whitespace')(code) + : infoBefore(code) + } + + /** + * In opening fence, after the sequence (and optional whitespace), before info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function infoBefore(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return self.interrupt + ? ok(code) + : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFencedFenceInfo') + effects.enter('chunkString', { + contentType: 'string' + }) + return info(code) + } + + /** + * In info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function info(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return infoBefore(code) + } + if (markdownSpace(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return factorySpace(effects, metaBefore, 'whitespace')(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return info + } + + /** + * In opening fence, after info and whitespace, before meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function metaBefore(code) { + if (code === null || markdownLineEnding(code)) { + return infoBefore(code) + } + effects.enter('codeFencedFenceMeta') + effects.enter('chunkString', { + contentType: 'string' + }) + return meta(code) + } + + /** + * In meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function meta(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceMeta') + return infoBefore(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return meta + } + + /** + * At eol/eof in code, before a non-lazy closing fence or content. + * + * ```markdown + * > | ~~~js + * ^ + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function atNonLazyBreak(code) { + return effects.attempt(closeStart, after, contentBefore)(code) + } + + /** + * Before code content, not a closing fence, at eol. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return contentStart + } + + /** + * Before code content, not a closing fence. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentStart(code) { + return initialPrefix > 0 && markdownSpace(code) + ? factorySpace( + effects, + beforeContentChunk, + 'linePrefix', + initialPrefix + 1 + )(code) + : beforeContentChunk(code) + } + + /** + * Before code content, after optional prefix. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeContentChunk(code) { + if (code === null || markdownLineEnding(code)) { + return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFlowValue') + return contentChunk(code) + } + + /** + * In code content. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^^^^^^^^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentChunk(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return beforeContentChunk(code) + } + effects.consume(code) + return contentChunk + } + + /** + * After code. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + effects.exit('codeFenced') + return ok(code) + } + + /** + * @this {TokenizeContext} + * @type {Tokenizer} + */ + function tokenizeCloseStart(effects, ok, nok) { + let size = 0 + return startBefore + + /** + * + * + * @type {State} + */ + function startBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return start + } + + /** + * Before closing fence, at optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Always populated by defaults. + + // To do: `enter` here or in next state? + effects.enter('codeFencedFence') + return markdownSpace(code) + ? factorySpace( + effects, + beforeSequenceClose, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : beforeSequenceClose(code) + } + + /** + * In closing fence, after optional whitespace, at sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function beforeSequenceClose(code) { + if (code === marker) { + effects.enter('codeFencedFenceSequence') + return sequenceClose(code) + } + return nok(code) + } + + /** + * In closing fence sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + if (code === marker) { + size++ + effects.consume(code) + return sequenceClose + } + if (size >= sizeOpen) { + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) + : sequenceCloseAfter(code) + } + return nok(code) + } + + /** + * After closing fence sequence, after optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceCloseAfter(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return ok(code) + } + return nok(code) + } + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuation(effects, ok, nok) { + const self = this + return start + + /** + * + * + * @type {State} + */ + function start(code) { + if (code === null) { + return nok(code) + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineStart + } + + /** + * + * + * @type {State} + */ + function lineStart(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/character-entities/index.js +/** + * Map of named character references. + * + * @type {Record} + */ +const characterEntities = { + AElig: 'Æ', + AMP: '&', + Aacute: 'Á', + Abreve: 'Ă', + Acirc: 'Â', + Acy: 'А', + Afr: '𝔄', + Agrave: 'À', + Alpha: 'Α', + Amacr: 'Ā', + And: '⩓', + Aogon: 'Ą', + Aopf: '𝔸', + ApplyFunction: '⁡', + Aring: 'Å', + Ascr: '𝒜', + Assign: '≔', + Atilde: 'Ã', + Auml: 'Ä', + Backslash: '∖', + Barv: '⫧', + Barwed: '⌆', + Bcy: 'Б', + Because: '∵', + Bernoullis: 'ℬ', + Beta: 'Β', + Bfr: '𝔅', + Bopf: '𝔹', + Breve: '˘', + Bscr: 'ℬ', + Bumpeq: '≎', + CHcy: 'Ч', + COPY: '©', + Cacute: 'Ć', + Cap: '⋒', + CapitalDifferentialD: 'ⅅ', + Cayleys: 'ℭ', + Ccaron: 'Č', + Ccedil: 'Ç', + Ccirc: 'Ĉ', + Cconint: '∰', + Cdot: 'Ċ', + Cedilla: '¸', + CenterDot: '·', + Cfr: 'ℭ', + Chi: 'Χ', + CircleDot: '⊙', + CircleMinus: '⊖', + CirclePlus: '⊕', + CircleTimes: '⊗', + ClockwiseContourIntegral: '∲', + CloseCurlyDoubleQuote: '”', + CloseCurlyQuote: '’', + Colon: '∷', + Colone: '⩴', + Congruent: '≡', + Conint: '∯', + ContourIntegral: '∮', + Copf: 'ℂ', + Coproduct: '∐', + CounterClockwiseContourIntegral: '∳', + Cross: '⨯', + Cscr: '𝒞', + Cup: '⋓', + CupCap: '≍', + DD: 'ⅅ', + DDotrahd: '⤑', + DJcy: 'Ђ', + DScy: 'Ѕ', + DZcy: 'Џ', + Dagger: '‡', + Darr: '↡', + Dashv: '⫤', + Dcaron: 'Ď', + Dcy: 'Д', + Del: '∇', + Delta: 'Δ', + Dfr: '𝔇', + DiacriticalAcute: '´', + DiacriticalDot: '˙', + DiacriticalDoubleAcute: '˝', + DiacriticalGrave: '`', + DiacriticalTilde: '˜', + Diamond: '⋄', + DifferentialD: 'ⅆ', + Dopf: '𝔻', + Dot: '¨', + DotDot: '⃜', + DotEqual: '≐', + DoubleContourIntegral: '∯', + DoubleDot: '¨', + DoubleDownArrow: '⇓', + DoubleLeftArrow: '⇐', + DoubleLeftRightArrow: '⇔', + DoubleLeftTee: '⫤', + DoubleLongLeftArrow: '⟸', + DoubleLongLeftRightArrow: '⟺', + DoubleLongRightArrow: '⟹', + DoubleRightArrow: '⇒', + DoubleRightTee: '⊨', + DoubleUpArrow: '⇑', + DoubleUpDownArrow: '⇕', + DoubleVerticalBar: '∥', + DownArrow: '↓', + DownArrowBar: '⤓', + DownArrowUpArrow: '⇵', + DownBreve: '̑', + DownLeftRightVector: '⥐', + DownLeftTeeVector: '⥞', + DownLeftVector: '↽', + DownLeftVectorBar: '⥖', + DownRightTeeVector: '⥟', + DownRightVector: '⇁', + DownRightVectorBar: '⥗', + DownTee: '⊤', + DownTeeArrow: '↧', + Downarrow: '⇓', + Dscr: '𝒟', + Dstrok: 'Đ', + ENG: 'Ŋ', + ETH: 'Ð', + Eacute: 'É', + Ecaron: 'Ě', + Ecirc: 'Ê', + Ecy: 'Э', + Edot: 'Ė', + Efr: '𝔈', + Egrave: 'È', + Element: '∈', + Emacr: 'Ē', + EmptySmallSquare: '◻', + EmptyVerySmallSquare: '▫', + Eogon: 'Ę', + Eopf: '𝔼', + Epsilon: 'Ε', + Equal: '⩵', + EqualTilde: '≂', + Equilibrium: '⇌', + Escr: 'ℰ', + Esim: '⩳', + Eta: 'Η', + Euml: 'Ë', + Exists: '∃', + ExponentialE: 'ⅇ', + Fcy: 'Ф', + Ffr: '𝔉', + FilledSmallSquare: '◼', + FilledVerySmallSquare: '▪', + Fopf: '𝔽', + ForAll: '∀', + Fouriertrf: 'ℱ', + Fscr: 'ℱ', + GJcy: 'Ѓ', + GT: '>', + Gamma: 'Γ', + Gammad: 'Ϝ', + Gbreve: 'Ğ', + Gcedil: 'Ģ', + Gcirc: 'Ĝ', + Gcy: 'Г', + Gdot: 'Ġ', + Gfr: '𝔊', + Gg: '⋙', + Gopf: '𝔾', + GreaterEqual: '≥', + GreaterEqualLess: '⋛', + GreaterFullEqual: '≧', + GreaterGreater: '⪢', + GreaterLess: '≷', + GreaterSlantEqual: '⩾', + GreaterTilde: '≳', + Gscr: '𝒢', + Gt: '≫', + HARDcy: 'Ъ', + Hacek: 'ˇ', + Hat: '^', + Hcirc: 'Ĥ', + Hfr: 'ℌ', + HilbertSpace: 'ℋ', + Hopf: 'ℍ', + HorizontalLine: '─', + Hscr: 'ℋ', + Hstrok: 'Ħ', + HumpDownHump: '≎', + HumpEqual: '≏', + IEcy: 'Е', + IJlig: 'IJ', + IOcy: 'Ё', + Iacute: 'Í', + Icirc: 'Î', + Icy: 'И', + Idot: 'İ', + Ifr: 'ℑ', + Igrave: 'Ì', + Im: 'ℑ', + Imacr: 'Ī', + ImaginaryI: 'ⅈ', + Implies: '⇒', + Int: '∬', + Integral: '∫', + Intersection: '⋂', + InvisibleComma: '⁣', + InvisibleTimes: '⁢', + Iogon: 'Į', + Iopf: '𝕀', + Iota: 'Ι', + Iscr: 'ℐ', + Itilde: 'Ĩ', + Iukcy: 'І', + Iuml: 'Ï', + Jcirc: 'Ĵ', + Jcy: 'Й', + Jfr: '𝔍', + Jopf: '𝕁', + Jscr: '𝒥', + Jsercy: 'Ј', + Jukcy: 'Є', + KHcy: 'Х', + KJcy: 'Ќ', + Kappa: 'Κ', + Kcedil: 'Ķ', + Kcy: 'К', + Kfr: '𝔎', + Kopf: '𝕂', + Kscr: '𝒦', + LJcy: 'Љ', + LT: '<', + Lacute: 'Ĺ', + Lambda: 'Λ', + Lang: '⟪', + Laplacetrf: 'ℒ', + Larr: '↞', + Lcaron: 'Ľ', + Lcedil: 'Ļ', + Lcy: 'Л', + LeftAngleBracket: '⟨', + LeftArrow: '←', + LeftArrowBar: '⇤', + LeftArrowRightArrow: '⇆', + LeftCeiling: '⌈', + LeftDoubleBracket: '⟦', + LeftDownTeeVector: '⥡', + LeftDownVector: '⇃', + LeftDownVectorBar: '⥙', + LeftFloor: '⌊', + LeftRightArrow: '↔', + LeftRightVector: '⥎', + LeftTee: '⊣', + LeftTeeArrow: '↤', + LeftTeeVector: '⥚', + LeftTriangle: '⊲', + LeftTriangleBar: '⧏', + LeftTriangleEqual: '⊴', + LeftUpDownVector: '⥑', + LeftUpTeeVector: '⥠', + LeftUpVector: '↿', + LeftUpVectorBar: '⥘', + LeftVector: '↼', + LeftVectorBar: '⥒', + Leftarrow: '⇐', + Leftrightarrow: '⇔', + LessEqualGreater: '⋚', + LessFullEqual: '≦', + LessGreater: '≶', + LessLess: '⪡', + LessSlantEqual: '⩽', + LessTilde: '≲', + Lfr: '𝔏', + Ll: '⋘', + Lleftarrow: '⇚', + Lmidot: 'Ŀ', + LongLeftArrow: '⟵', + LongLeftRightArrow: '⟷', + LongRightArrow: '⟶', + Longleftarrow: '⟸', + Longleftrightarrow: '⟺', + Longrightarrow: '⟹', + Lopf: '𝕃', + LowerLeftArrow: '↙', + LowerRightArrow: '↘', + Lscr: 'ℒ', + Lsh: '↰', + Lstrok: 'Ł', + Lt: '≪', + Map: '⤅', + Mcy: 'М', + MediumSpace: ' ', + Mellintrf: 'ℳ', + Mfr: '𝔐', + MinusPlus: '∓', + Mopf: '𝕄', + Mscr: 'ℳ', + Mu: 'Μ', + NJcy: 'Њ', + Nacute: 'Ń', + Ncaron: 'Ň', + Ncedil: 'Ņ', + Ncy: 'Н', + NegativeMediumSpace: '​', + NegativeThickSpace: '​', + NegativeThinSpace: '​', + NegativeVeryThinSpace: '​', + NestedGreaterGreater: '≫', + NestedLessLess: '≪', + NewLine: '\n', + Nfr: '𝔑', + NoBreak: '⁠', + NonBreakingSpace: ' ', + Nopf: 'ℕ', + Not: '⫬', + NotCongruent: '≢', + NotCupCap: '≭', + NotDoubleVerticalBar: '∦', + NotElement: '∉', + NotEqual: '≠', + NotEqualTilde: '≂̸', + NotExists: '∄', + NotGreater: '≯', + NotGreaterEqual: '≱', + NotGreaterFullEqual: '≧̸', + NotGreaterGreater: '≫̸', + NotGreaterLess: '≹', + NotGreaterSlantEqual: '⩾̸', + NotGreaterTilde: '≵', + NotHumpDownHump: '≎̸', + NotHumpEqual: '≏̸', + NotLeftTriangle: '⋪', + NotLeftTriangleBar: '⧏̸', + NotLeftTriangleEqual: '⋬', + NotLess: '≮', + NotLessEqual: '≰', + NotLessGreater: '≸', + NotLessLess: '≪̸', + NotLessSlantEqual: '⩽̸', + NotLessTilde: '≴', + NotNestedGreaterGreater: '⪢̸', + NotNestedLessLess: '⪡̸', + NotPrecedes: '⊀', + NotPrecedesEqual: '⪯̸', + NotPrecedesSlantEqual: '⋠', + NotReverseElement: '∌', + NotRightTriangle: '⋫', + NotRightTriangleBar: '⧐̸', + NotRightTriangleEqual: '⋭', + NotSquareSubset: '⊏̸', + NotSquareSubsetEqual: '⋢', + NotSquareSuperset: '⊐̸', + NotSquareSupersetEqual: '⋣', + NotSubset: '⊂⃒', + NotSubsetEqual: '⊈', + NotSucceeds: '⊁', + NotSucceedsEqual: '⪰̸', + NotSucceedsSlantEqual: '⋡', + NotSucceedsTilde: '≿̸', + NotSuperset: '⊃⃒', + NotSupersetEqual: '⊉', + NotTilde: '≁', + NotTildeEqual: '≄', + NotTildeFullEqual: '≇', + NotTildeTilde: '≉', + NotVerticalBar: '∤', + Nscr: '𝒩', + Ntilde: 'Ñ', + Nu: 'Ν', + OElig: 'Œ', + Oacute: 'Ó', + Ocirc: 'Ô', + Ocy: 'О', + Odblac: 'Ő', + Ofr: '𝔒', + Ograve: 'Ò', + Omacr: 'Ō', + Omega: 'Ω', + Omicron: 'Ο', + Oopf: '𝕆', + OpenCurlyDoubleQuote: '“', + OpenCurlyQuote: '‘', + Or: '⩔', + Oscr: '𝒪', + Oslash: 'Ø', + Otilde: 'Õ', + Otimes: '⨷', + Ouml: 'Ö', + OverBar: '‾', + OverBrace: '⏞', + OverBracket: '⎴', + OverParenthesis: '⏜', + PartialD: '∂', + Pcy: 'П', + Pfr: '𝔓', + Phi: 'Φ', + Pi: 'Π', + PlusMinus: '±', + Poincareplane: 'ℌ', + Popf: 'ℙ', + Pr: '⪻', + Precedes: '≺', + PrecedesEqual: '⪯', + PrecedesSlantEqual: '≼', + PrecedesTilde: '≾', + Prime: '″', + Product: '∏', + Proportion: '∷', + Proportional: '∝', + Pscr: '𝒫', + Psi: 'Ψ', + QUOT: '"', + Qfr: '𝔔', + Qopf: 'ℚ', + Qscr: '𝒬', + RBarr: '⤐', + REG: '®', + Racute: 'Ŕ', + Rang: '⟫', + Rarr: '↠', + Rarrtl: '⤖', + Rcaron: 'Ř', + Rcedil: 'Ŗ', + Rcy: 'Р', + Re: 'ℜ', + ReverseElement: '∋', + ReverseEquilibrium: '⇋', + ReverseUpEquilibrium: '⥯', + Rfr: 'ℜ', + Rho: 'Ρ', + RightAngleBracket: '⟩', + RightArrow: '→', + RightArrowBar: '⇥', + RightArrowLeftArrow: '⇄', + RightCeiling: '⌉', + RightDoubleBracket: '⟧', + RightDownTeeVector: '⥝', + RightDownVector: '⇂', + RightDownVectorBar: '⥕', + RightFloor: '⌋', + RightTee: '⊢', + RightTeeArrow: '↦', + RightTeeVector: '⥛', + RightTriangle: '⊳', + RightTriangleBar: '⧐', + RightTriangleEqual: '⊵', + RightUpDownVector: '⥏', + RightUpTeeVector: '⥜', + RightUpVector: '↾', + RightUpVectorBar: '⥔', + RightVector: '⇀', + RightVectorBar: '⥓', + Rightarrow: '⇒', + Ropf: 'ℝ', + RoundImplies: '⥰', + Rrightarrow: '⇛', + Rscr: 'ℛ', + Rsh: '↱', + RuleDelayed: '⧴', + SHCHcy: 'Щ', + SHcy: 'Ш', + SOFTcy: 'Ь', + Sacute: 'Ś', + Sc: '⪼', + Scaron: 'Š', + Scedil: 'Ş', + Scirc: 'Ŝ', + Scy: 'С', + Sfr: '𝔖', + ShortDownArrow: '↓', + ShortLeftArrow: '←', + ShortRightArrow: '→', + ShortUpArrow: '↑', + Sigma: 'Σ', + SmallCircle: '∘', + Sopf: '𝕊', + Sqrt: '√', + Square: '□', + SquareIntersection: '⊓', + SquareSubset: '⊏', + SquareSubsetEqual: '⊑', + SquareSuperset: '⊐', + SquareSupersetEqual: '⊒', + SquareUnion: '⊔', + Sscr: '𝒮', + Star: '⋆', + Sub: '⋐', + Subset: '⋐', + SubsetEqual: '⊆', + Succeeds: '≻', + SucceedsEqual: '⪰', + SucceedsSlantEqual: '≽', + SucceedsTilde: '≿', + SuchThat: '∋', + Sum: '∑', + Sup: '⋑', + Superset: '⊃', + SupersetEqual: '⊇', + Supset: '⋑', + THORN: 'Þ', + TRADE: '™', + TSHcy: 'Ћ', + TScy: 'Ц', + Tab: '\t', + Tau: 'Τ', + Tcaron: 'Ť', + Tcedil: 'Ţ', + Tcy: 'Т', + Tfr: '𝔗', + Therefore: '∴', + Theta: 'Θ', + ThickSpace: '  ', + ThinSpace: ' ', + Tilde: '∼', + TildeEqual: '≃', + TildeFullEqual: '≅', + TildeTilde: '≈', + Topf: '𝕋', + TripleDot: '⃛', + Tscr: '𝒯', + Tstrok: 'Ŧ', + Uacute: 'Ú', + Uarr: '↟', + Uarrocir: '⥉', + Ubrcy: 'Ў', + Ubreve: 'Ŭ', + Ucirc: 'Û', + Ucy: 'У', + Udblac: 'Ű', + Ufr: '𝔘', + Ugrave: 'Ù', + Umacr: 'Ū', + UnderBar: '_', + UnderBrace: '⏟', + UnderBracket: '⎵', + UnderParenthesis: '⏝', + Union: '⋃', + UnionPlus: '⊎', + Uogon: 'Ų', + Uopf: '𝕌', + UpArrow: '↑', + UpArrowBar: '⤒', + UpArrowDownArrow: '⇅', + UpDownArrow: '↕', + UpEquilibrium: '⥮', + UpTee: '⊥', + UpTeeArrow: '↥', + Uparrow: '⇑', + Updownarrow: '⇕', + UpperLeftArrow: '↖', + UpperRightArrow: '↗', + Upsi: 'ϒ', + Upsilon: 'Υ', + Uring: 'Ů', + Uscr: '𝒰', + Utilde: 'Ũ', + Uuml: 'Ü', + VDash: '⊫', + Vbar: '⫫', + Vcy: 'В', + Vdash: '⊩', + Vdashl: '⫦', + Vee: '⋁', + Verbar: '‖', + Vert: '‖', + VerticalBar: '∣', + VerticalLine: '|', + VerticalSeparator: '❘', + VerticalTilde: '≀', + VeryThinSpace: ' ', + Vfr: '𝔙', + Vopf: '𝕍', + Vscr: '𝒱', + Vvdash: '⊪', + Wcirc: 'Ŵ', + Wedge: '⋀', + Wfr: '𝔚', + Wopf: '𝕎', + Wscr: '𝒲', + Xfr: '𝔛', + Xi: 'Ξ', + Xopf: '𝕏', + Xscr: '𝒳', + YAcy: 'Я', + YIcy: 'Ї', + YUcy: 'Ю', + Yacute: 'Ý', + Ycirc: 'Ŷ', + Ycy: 'Ы', + Yfr: '𝔜', + Yopf: '𝕐', + Yscr: '𝒴', + Yuml: 'Ÿ', + ZHcy: 'Ж', + Zacute: 'Ź', + Zcaron: 'Ž', + Zcy: 'З', + Zdot: 'Ż', + ZeroWidthSpace: '​', + Zeta: 'Ζ', + Zfr: 'ℨ', + Zopf: 'ℤ', + Zscr: '𝒵', + aacute: 'á', + abreve: 'ă', + ac: '∾', + acE: '∾̳', + acd: '∿', + acirc: 'â', + acute: '´', + acy: 'а', + aelig: 'æ', + af: '⁡', + afr: '𝔞', + agrave: 'à', + alefsym: 'ℵ', + aleph: 'ℵ', + alpha: 'α', + amacr: 'ā', + amalg: '⨿', + amp: '&', + and: '∧', + andand: '⩕', + andd: '⩜', + andslope: '⩘', + andv: '⩚', + ang: '∠', + ange: '⦤', + angle: '∠', + angmsd: '∡', + angmsdaa: '⦨', + angmsdab: '⦩', + angmsdac: '⦪', + angmsdad: '⦫', + angmsdae: '⦬', + angmsdaf: '⦭', + angmsdag: '⦮', + angmsdah: '⦯', + angrt: '∟', + angrtvb: '⊾', + angrtvbd: '⦝', + angsph: '∢', + angst: 'Å', + angzarr: '⍼', + aogon: 'ą', + aopf: '𝕒', + ap: '≈', + apE: '⩰', + apacir: '⩯', + ape: '≊', + apid: '≋', + apos: "'", + approx: '≈', + approxeq: '≊', + aring: 'å', + ascr: '𝒶', + ast: '*', + asymp: '≈', + asympeq: '≍', + atilde: 'ã', + auml: 'ä', + awconint: '∳', + awint: '⨑', + bNot: '⫭', + backcong: '≌', + backepsilon: '϶', + backprime: '‵', + backsim: '∽', + backsimeq: '⋍', + barvee: '⊽', + barwed: '⌅', + barwedge: '⌅', + bbrk: '⎵', + bbrktbrk: '⎶', + bcong: '≌', + bcy: 'б', + bdquo: '„', + becaus: '∵', + because: '∵', + bemptyv: '⦰', + bepsi: '϶', + bernou: 'ℬ', + beta: 'β', + beth: 'ℶ', + between: '≬', + bfr: '𝔟', + bigcap: '⋂', + bigcirc: '◯', + bigcup: '⋃', + bigodot: '⨀', + bigoplus: '⨁', + bigotimes: '⨂', + bigsqcup: '⨆', + bigstar: '★', + bigtriangledown: '▽', + bigtriangleup: '△', + biguplus: '⨄', + bigvee: '⋁', + bigwedge: '⋀', + bkarow: '⤍', + blacklozenge: '⧫', + blacksquare: '▪', + blacktriangle: '▴', + blacktriangledown: '▾', + blacktriangleleft: '◂', + blacktriangleright: '▸', + blank: '␣', + blk12: '▒', + blk14: '░', + blk34: '▓', + block: '█', + bne: '=⃥', + bnequiv: '≡⃥', + bnot: '⌐', + bopf: '𝕓', + bot: '⊥', + bottom: '⊥', + bowtie: '⋈', + boxDL: '╗', + boxDR: '╔', + boxDl: '╖', + boxDr: '╓', + boxH: '═', + boxHD: '╦', + boxHU: '╩', + boxHd: '╤', + boxHu: '╧', + boxUL: '╝', + boxUR: '╚', + boxUl: '╜', + boxUr: '╙', + boxV: '║', + boxVH: '╬', + boxVL: '╣', + boxVR: '╠', + boxVh: '╫', + boxVl: '╢', + boxVr: '╟', + boxbox: '⧉', + boxdL: '╕', + boxdR: '╒', + boxdl: '┐', + boxdr: '┌', + boxh: '─', + boxhD: '╥', + boxhU: '╨', + boxhd: '┬', + boxhu: '┴', + boxminus: '⊟', + boxplus: '⊞', + boxtimes: '⊠', + boxuL: '╛', + boxuR: '╘', + boxul: '┘', + boxur: '└', + boxv: '│', + boxvH: '╪', + boxvL: '╡', + boxvR: '╞', + boxvh: '┼', + boxvl: '┤', + boxvr: '├', + bprime: '‵', + breve: '˘', + brvbar: '¦', + bscr: '𝒷', + bsemi: '⁏', + bsim: '∽', + bsime: '⋍', + bsol: '\\', + bsolb: '⧅', + bsolhsub: '⟈', + bull: '•', + bullet: '•', + bump: '≎', + bumpE: '⪮', + bumpe: '≏', + bumpeq: '≏', + cacute: 'ć', + cap: '∩', + capand: '⩄', + capbrcup: '⩉', + capcap: '⩋', + capcup: '⩇', + capdot: '⩀', + caps: '∩︀', + caret: '⁁', + caron: 'ˇ', + ccaps: '⩍', + ccaron: 'č', + ccedil: 'ç', + ccirc: 'ĉ', + ccups: '⩌', + ccupssm: '⩐', + cdot: 'ċ', + cedil: '¸', + cemptyv: '⦲', + cent: '¢', + centerdot: '·', + cfr: '𝔠', + chcy: 'ч', + check: '✓', + checkmark: '✓', + chi: 'χ', + cir: '○', + cirE: '⧃', + circ: 'ˆ', + circeq: '≗', + circlearrowleft: '↺', + circlearrowright: '↻', + circledR: '®', + circledS: 'Ⓢ', + circledast: '⊛', + circledcirc: '⊚', + circleddash: '⊝', + cire: '≗', + cirfnint: '⨐', + cirmid: '⫯', + cirscir: '⧂', + clubs: '♣', + clubsuit: '♣', + colon: ':', + colone: '≔', + coloneq: '≔', + comma: ',', + commat: '@', + comp: '∁', + compfn: '∘', + complement: '∁', + complexes: 'ℂ', + cong: '≅', + congdot: '⩭', + conint: '∮', + copf: '𝕔', + coprod: '∐', + copy: '©', + copysr: '℗', + crarr: '↵', + cross: '✗', + cscr: '𝒸', + csub: '⫏', + csube: '⫑', + csup: '⫐', + csupe: '⫒', + ctdot: '⋯', + cudarrl: '⤸', + cudarrr: '⤵', + cuepr: '⋞', + cuesc: '⋟', + cularr: '↶', + cularrp: '⤽', + cup: '∪', + cupbrcap: '⩈', + cupcap: '⩆', + cupcup: '⩊', + cupdot: '⊍', + cupor: '⩅', + cups: '∪︀', + curarr: '↷', + curarrm: '⤼', + curlyeqprec: '⋞', + curlyeqsucc: '⋟', + curlyvee: '⋎', + curlywedge: '⋏', + curren: '¤', + curvearrowleft: '↶', + curvearrowright: '↷', + cuvee: '⋎', + cuwed: '⋏', + cwconint: '∲', + cwint: '∱', + cylcty: '⌭', + dArr: '⇓', + dHar: '⥥', + dagger: '†', + daleth: 'ℸ', + darr: '↓', + dash: '‐', + dashv: '⊣', + dbkarow: '⤏', + dblac: '˝', + dcaron: 'ď', + dcy: 'д', + dd: 'ⅆ', + ddagger: '‡', + ddarr: '⇊', + ddotseq: '⩷', + deg: '°', + delta: 'δ', + demptyv: '⦱', + dfisht: '⥿', + dfr: '𝔡', + dharl: '⇃', + dharr: '⇂', + diam: '⋄', + diamond: '⋄', + diamondsuit: '♦', + diams: '♦', + die: '¨', + digamma: 'ϝ', + disin: '⋲', + div: '÷', + divide: '÷', + divideontimes: '⋇', + divonx: '⋇', + djcy: 'ђ', + dlcorn: '⌞', + dlcrop: '⌍', + dollar: '$', + dopf: '𝕕', + dot: '˙', + doteq: '≐', + doteqdot: '≑', + dotminus: '∸', + dotplus: '∔', + dotsquare: '⊡', + doublebarwedge: '⌆', + downarrow: '↓', + downdownarrows: '⇊', + downharpoonleft: '⇃', + downharpoonright: '⇂', + drbkarow: '⤐', + drcorn: '⌟', + drcrop: '⌌', + dscr: '𝒹', + dscy: 'ѕ', + dsol: '⧶', + dstrok: 'đ', + dtdot: '⋱', + dtri: '▿', + dtrif: '▾', + duarr: '⇵', + duhar: '⥯', + dwangle: '⦦', + dzcy: 'џ', + dzigrarr: '⟿', + eDDot: '⩷', + eDot: '≑', + eacute: 'é', + easter: '⩮', + ecaron: 'ě', + ecir: '≖', + ecirc: 'ê', + ecolon: '≕', + ecy: 'э', + edot: 'ė', + ee: 'ⅇ', + efDot: '≒', + efr: '𝔢', + eg: '⪚', + egrave: 'è', + egs: '⪖', + egsdot: '⪘', + el: '⪙', + elinters: '⏧', + ell: 'ℓ', + els: '⪕', + elsdot: '⪗', + emacr: 'ē', + empty: '∅', + emptyset: '∅', + emptyv: '∅', + emsp13: ' ', + emsp14: ' ', + emsp: ' ', + eng: 'ŋ', + ensp: ' ', + eogon: 'ę', + eopf: '𝕖', + epar: '⋕', + eparsl: '⧣', + eplus: '⩱', + epsi: 'ε', + epsilon: 'ε', + epsiv: 'ϵ', + eqcirc: '≖', + eqcolon: '≕', + eqsim: '≂', + eqslantgtr: '⪖', + eqslantless: '⪕', + equals: '=', + equest: '≟', + equiv: '≡', + equivDD: '⩸', + eqvparsl: '⧥', + erDot: '≓', + erarr: '⥱', + escr: 'ℯ', + esdot: '≐', + esim: '≂', + eta: 'η', + eth: 'ð', + euml: 'ë', + euro: '€', + excl: '!', + exist: '∃', + expectation: 'ℰ', + exponentiale: 'ⅇ', + fallingdotseq: '≒', + fcy: 'ф', + female: '♀', + ffilig: 'ffi', + fflig: 'ff', + ffllig: 'ffl', + ffr: '𝔣', + filig: 'fi', + fjlig: 'fj', + flat: '♭', + fllig: 'fl', + fltns: '▱', + fnof: 'ƒ', + fopf: '𝕗', + forall: '∀', + fork: '⋔', + forkv: '⫙', + fpartint: '⨍', + frac12: '½', + frac13: '⅓', + frac14: '¼', + frac15: '⅕', + frac16: '⅙', + frac18: '⅛', + frac23: '⅔', + frac25: '⅖', + frac34: '¾', + frac35: '⅗', + frac38: '⅜', + frac45: '⅘', + frac56: '⅚', + frac58: '⅝', + frac78: '⅞', + frasl: '⁄', + frown: '⌢', + fscr: '𝒻', + gE: '≧', + gEl: '⪌', + gacute: 'ǵ', + gamma: 'γ', + gammad: 'ϝ', + gap: '⪆', + gbreve: 'ğ', + gcirc: 'ĝ', + gcy: 'г', + gdot: 'ġ', + ge: '≥', + gel: '⋛', + geq: '≥', + geqq: '≧', + geqslant: '⩾', + ges: '⩾', + gescc: '⪩', + gesdot: '⪀', + gesdoto: '⪂', + gesdotol: '⪄', + gesl: '⋛︀', + gesles: '⪔', + gfr: '𝔤', + gg: '≫', + ggg: '⋙', + gimel: 'ℷ', + gjcy: 'ѓ', + gl: '≷', + glE: '⪒', + gla: '⪥', + glj: '⪤', + gnE: '≩', + gnap: '⪊', + gnapprox: '⪊', + gne: '⪈', + gneq: '⪈', + gneqq: '≩', + gnsim: '⋧', + gopf: '𝕘', + grave: '`', + gscr: 'ℊ', + gsim: '≳', + gsime: '⪎', + gsiml: '⪐', + gt: '>', + gtcc: '⪧', + gtcir: '⩺', + gtdot: '⋗', + gtlPar: '⦕', + gtquest: '⩼', + gtrapprox: '⪆', + gtrarr: '⥸', + gtrdot: '⋗', + gtreqless: '⋛', + gtreqqless: '⪌', + gtrless: '≷', + gtrsim: '≳', + gvertneqq: '≩︀', + gvnE: '≩︀', + hArr: '⇔', + hairsp: ' ', + half: '½', + hamilt: 'ℋ', + hardcy: 'ъ', + harr: '↔', + harrcir: '⥈', + harrw: '↭', + hbar: 'ℏ', + hcirc: 'ĥ', + hearts: '♥', + heartsuit: '♥', + hellip: '…', + hercon: '⊹', + hfr: '𝔥', + hksearow: '⤥', + hkswarow: '⤦', + hoarr: '⇿', + homtht: '∻', + hookleftarrow: '↩', + hookrightarrow: '↪', + hopf: '𝕙', + horbar: '―', + hscr: '𝒽', + hslash: 'ℏ', + hstrok: 'ħ', + hybull: '⁃', + hyphen: '‐', + iacute: 'í', + ic: '⁣', + icirc: 'î', + icy: 'и', + iecy: 'е', + iexcl: '¡', + iff: '⇔', + ifr: '𝔦', + igrave: 'ì', + ii: 'ⅈ', + iiiint: '⨌', + iiint: '∭', + iinfin: '⧜', + iiota: '℩', + ijlig: 'ij', + imacr: 'ī', + image: 'ℑ', + imagline: 'ℐ', + imagpart: 'ℑ', + imath: 'ı', + imof: '⊷', + imped: 'Ƶ', + in: '∈', + incare: '℅', + infin: '∞', + infintie: '⧝', + inodot: 'ı', + int: '∫', + intcal: '⊺', + integers: 'ℤ', + intercal: '⊺', + intlarhk: '⨗', + intprod: '⨼', + iocy: 'ё', + iogon: 'į', + iopf: '𝕚', + iota: 'ι', + iprod: '⨼', + iquest: '¿', + iscr: '𝒾', + isin: '∈', + isinE: '⋹', + isindot: '⋵', + isins: '⋴', + isinsv: '⋳', + isinv: '∈', + it: '⁢', + itilde: 'ĩ', + iukcy: 'і', + iuml: 'ï', + jcirc: 'ĵ', + jcy: 'й', + jfr: '𝔧', + jmath: 'ȷ', + jopf: '𝕛', + jscr: '𝒿', + jsercy: 'ј', + jukcy: 'є', + kappa: 'κ', + kappav: 'ϰ', + kcedil: 'ķ', + kcy: 'к', + kfr: '𝔨', + kgreen: 'ĸ', + khcy: 'х', + kjcy: 'ќ', + kopf: '𝕜', + kscr: '𝓀', + lAarr: '⇚', + lArr: '⇐', + lAtail: '⤛', + lBarr: '⤎', + lE: '≦', + lEg: '⪋', + lHar: '⥢', + lacute: 'ĺ', + laemptyv: '⦴', + lagran: 'ℒ', + lambda: 'λ', + lang: '⟨', + langd: '⦑', + langle: '⟨', + lap: '⪅', + laquo: '«', + larr: '←', + larrb: '⇤', + larrbfs: '⤟', + larrfs: '⤝', + larrhk: '↩', + larrlp: '↫', + larrpl: '⤹', + larrsim: '⥳', + larrtl: '↢', + lat: '⪫', + latail: '⤙', + late: '⪭', + lates: '⪭︀', + lbarr: '⤌', + lbbrk: '❲', + lbrace: '{', + lbrack: '[', + lbrke: '⦋', + lbrksld: '⦏', + lbrkslu: '⦍', + lcaron: 'ľ', + lcedil: 'ļ', + lceil: '⌈', + lcub: '{', + lcy: 'л', + ldca: '⤶', + ldquo: '“', + ldquor: '„', + ldrdhar: '⥧', + ldrushar: '⥋', + ldsh: '↲', + le: '≤', + leftarrow: '←', + leftarrowtail: '↢', + leftharpoondown: '↽', + leftharpoonup: '↼', + leftleftarrows: '⇇', + leftrightarrow: '↔', + leftrightarrows: '⇆', + leftrightharpoons: '⇋', + leftrightsquigarrow: '↭', + leftthreetimes: '⋋', + leg: '⋚', + leq: '≤', + leqq: '≦', + leqslant: '⩽', + les: '⩽', + lescc: '⪨', + lesdot: '⩿', + lesdoto: '⪁', + lesdotor: '⪃', + lesg: '⋚︀', + lesges: '⪓', + lessapprox: '⪅', + lessdot: '⋖', + lesseqgtr: '⋚', + lesseqqgtr: '⪋', + lessgtr: '≶', + lesssim: '≲', + lfisht: '⥼', + lfloor: '⌊', + lfr: '𝔩', + lg: '≶', + lgE: '⪑', + lhard: '↽', + lharu: '↼', + lharul: '⥪', + lhblk: '▄', + ljcy: 'љ', + ll: '≪', + llarr: '⇇', + llcorner: '⌞', + llhard: '⥫', + lltri: '◺', + lmidot: 'ŀ', + lmoust: '⎰', + lmoustache: '⎰', + lnE: '≨', + lnap: '⪉', + lnapprox: '⪉', + lne: '⪇', + lneq: '⪇', + lneqq: '≨', + lnsim: '⋦', + loang: '⟬', + loarr: '⇽', + lobrk: '⟦', + longleftarrow: '⟵', + longleftrightarrow: '⟷', + longmapsto: '⟼', + longrightarrow: '⟶', + looparrowleft: '↫', + looparrowright: '↬', + lopar: '⦅', + lopf: '𝕝', + loplus: '⨭', + lotimes: '⨴', + lowast: '∗', + lowbar: '_', + loz: '◊', + lozenge: '◊', + lozf: '⧫', + lpar: '(', + lparlt: '⦓', + lrarr: '⇆', + lrcorner: '⌟', + lrhar: '⇋', + lrhard: '⥭', + lrm: '‎', + lrtri: '⊿', + lsaquo: '‹', + lscr: '𝓁', + lsh: '↰', + lsim: '≲', + lsime: '⪍', + lsimg: '⪏', + lsqb: '[', + lsquo: '‘', + lsquor: '‚', + lstrok: 'ł', + lt: '<', + ltcc: '⪦', + ltcir: '⩹', + ltdot: '⋖', + lthree: '⋋', + ltimes: '⋉', + ltlarr: '⥶', + ltquest: '⩻', + ltrPar: '⦖', + ltri: '◃', + ltrie: '⊴', + ltrif: '◂', + lurdshar: '⥊', + luruhar: '⥦', + lvertneqq: '≨︀', + lvnE: '≨︀', + mDDot: '∺', + macr: '¯', + male: '♂', + malt: '✠', + maltese: '✠', + map: '↦', + mapsto: '↦', + mapstodown: '↧', + mapstoleft: '↤', + mapstoup: '↥', + marker: '▮', + mcomma: '⨩', + mcy: 'м', + mdash: '—', + measuredangle: '∡', + mfr: '𝔪', + mho: '℧', + micro: 'µ', + mid: '∣', + midast: '*', + midcir: '⫰', + middot: '·', + minus: '−', + minusb: '⊟', + minusd: '∸', + minusdu: '⨪', + mlcp: '⫛', + mldr: '…', + mnplus: '∓', + models: '⊧', + mopf: '𝕞', + mp: '∓', + mscr: '𝓂', + mstpos: '∾', + mu: 'μ', + multimap: '⊸', + mumap: '⊸', + nGg: '⋙̸', + nGt: '≫⃒', + nGtv: '≫̸', + nLeftarrow: '⇍', + nLeftrightarrow: '⇎', + nLl: '⋘̸', + nLt: '≪⃒', + nLtv: '≪̸', + nRightarrow: '⇏', + nVDash: '⊯', + nVdash: '⊮', + nabla: '∇', + nacute: 'ń', + nang: '∠⃒', + nap: '≉', + napE: '⩰̸', + napid: '≋̸', + napos: 'ʼn', + napprox: '≉', + natur: '♮', + natural: '♮', + naturals: 'ℕ', + nbsp: ' ', + nbump: '≎̸', + nbumpe: '≏̸', + ncap: '⩃', + ncaron: 'ň', + ncedil: 'ņ', + ncong: '≇', + ncongdot: '⩭̸', + ncup: '⩂', + ncy: 'н', + ndash: '–', + ne: '≠', + neArr: '⇗', + nearhk: '⤤', + nearr: '↗', + nearrow: '↗', + nedot: '≐̸', + nequiv: '≢', + nesear: '⤨', + nesim: '≂̸', + nexist: '∄', + nexists: '∄', + nfr: '𝔫', + ngE: '≧̸', + nge: '≱', + ngeq: '≱', + ngeqq: '≧̸', + ngeqslant: '⩾̸', + nges: '⩾̸', + ngsim: '≵', + ngt: '≯', + ngtr: '≯', + nhArr: '⇎', + nharr: '↮', + nhpar: '⫲', + ni: '∋', + nis: '⋼', + nisd: '⋺', + niv: '∋', + njcy: 'њ', + nlArr: '⇍', + nlE: '≦̸', + nlarr: '↚', + nldr: '‥', + nle: '≰', + nleftarrow: '↚', + nleftrightarrow: '↮', + nleq: '≰', + nleqq: '≦̸', + nleqslant: '⩽̸', + nles: '⩽̸', + nless: '≮', + nlsim: '≴', + nlt: '≮', + nltri: '⋪', + nltrie: '⋬', + nmid: '∤', + nopf: '𝕟', + not: '¬', + notin: '∉', + notinE: '⋹̸', + notindot: '⋵̸', + notinva: '∉', + notinvb: '⋷', + notinvc: '⋶', + notni: '∌', + notniva: '∌', + notnivb: '⋾', + notnivc: '⋽', + npar: '∦', + nparallel: '∦', + nparsl: '⫽⃥', + npart: '∂̸', + npolint: '⨔', + npr: '⊀', + nprcue: '⋠', + npre: '⪯̸', + nprec: '⊀', + npreceq: '⪯̸', + nrArr: '⇏', + nrarr: '↛', + nrarrc: '⤳̸', + nrarrw: '↝̸', + nrightarrow: '↛', + nrtri: '⋫', + nrtrie: '⋭', + nsc: '⊁', + nsccue: '⋡', + nsce: '⪰̸', + nscr: '𝓃', + nshortmid: '∤', + nshortparallel: '∦', + nsim: '≁', + nsime: '≄', + nsimeq: '≄', + nsmid: '∤', + nspar: '∦', + nsqsube: '⋢', + nsqsupe: '⋣', + nsub: '⊄', + nsubE: '⫅̸', + nsube: '⊈', + nsubset: '⊂⃒', + nsubseteq: '⊈', + nsubseteqq: '⫅̸', + nsucc: '⊁', + nsucceq: '⪰̸', + nsup: '⊅', + nsupE: '⫆̸', + nsupe: '⊉', + nsupset: '⊃⃒', + nsupseteq: '⊉', + nsupseteqq: '⫆̸', + ntgl: '≹', + ntilde: 'ñ', + ntlg: '≸', + ntriangleleft: '⋪', + ntrianglelefteq: '⋬', + ntriangleright: '⋫', + ntrianglerighteq: '⋭', + nu: 'ν', + num: '#', + numero: '№', + numsp: ' ', + nvDash: '⊭', + nvHarr: '⤄', + nvap: '≍⃒', + nvdash: '⊬', + nvge: '≥⃒', + nvgt: '>⃒', + nvinfin: '⧞', + nvlArr: '⤂', + nvle: '≤⃒', + nvlt: '<⃒', + nvltrie: '⊴⃒', + nvrArr: '⤃', + nvrtrie: '⊵⃒', + nvsim: '∼⃒', + nwArr: '⇖', + nwarhk: '⤣', + nwarr: '↖', + nwarrow: '↖', + nwnear: '⤧', + oS: 'Ⓢ', + oacute: 'ó', + oast: '⊛', + ocir: '⊚', + ocirc: 'ô', + ocy: 'о', + odash: '⊝', + odblac: 'ő', + odiv: '⨸', + odot: '⊙', + odsold: '⦼', + oelig: 'œ', + ofcir: '⦿', + ofr: '𝔬', + ogon: '˛', + ograve: 'ò', + ogt: '⧁', + ohbar: '⦵', + ohm: 'Ω', + oint: '∮', + olarr: '↺', + olcir: '⦾', + olcross: '⦻', + oline: '‾', + olt: '⧀', + omacr: 'ō', + omega: 'ω', + omicron: 'ο', + omid: '⦶', + ominus: '⊖', + oopf: '𝕠', + opar: '⦷', + operp: '⦹', + oplus: '⊕', + or: '∨', + orarr: '↻', + ord: '⩝', + order: 'ℴ', + orderof: 'ℴ', + ordf: 'ª', + ordm: 'º', + origof: '⊶', + oror: '⩖', + orslope: '⩗', + orv: '⩛', + oscr: 'ℴ', + oslash: 'ø', + osol: '⊘', + otilde: 'õ', + otimes: '⊗', + otimesas: '⨶', + ouml: 'ö', + ovbar: '⌽', + par: '∥', + para: '¶', + parallel: '∥', + parsim: '⫳', + parsl: '⫽', + part: '∂', + pcy: 'п', + percnt: '%', + period: '.', + permil: '‰', + perp: '⊥', + pertenk: '‱', + pfr: '𝔭', + phi: 'φ', + phiv: 'ϕ', + phmmat: 'ℳ', + phone: '☎', + pi: 'π', + pitchfork: '⋔', + piv: 'ϖ', + planck: 'ℏ', + planckh: 'ℎ', + plankv: 'ℏ', + plus: '+', + plusacir: '⨣', + plusb: '⊞', + pluscir: '⨢', + plusdo: '∔', + plusdu: '⨥', + pluse: '⩲', + plusmn: '±', + plussim: '⨦', + plustwo: '⨧', + pm: '±', + pointint: '⨕', + popf: '𝕡', + pound: '£', + pr: '≺', + prE: '⪳', + prap: '⪷', + prcue: '≼', + pre: '⪯', + prec: '≺', + precapprox: '⪷', + preccurlyeq: '≼', + preceq: '⪯', + precnapprox: '⪹', + precneqq: '⪵', + precnsim: '⋨', + precsim: '≾', + prime: '′', + primes: 'ℙ', + prnE: '⪵', + prnap: '⪹', + prnsim: '⋨', + prod: '∏', + profalar: '⌮', + profline: '⌒', + profsurf: '⌓', + prop: '∝', + propto: '∝', + prsim: '≾', + prurel: '⊰', + pscr: '𝓅', + psi: 'ψ', + puncsp: ' ', + qfr: '𝔮', + qint: '⨌', + qopf: '𝕢', + qprime: '⁗', + qscr: '𝓆', + quaternions: 'ℍ', + quatint: '⨖', + quest: '?', + questeq: '≟', + quot: '"', + rAarr: '⇛', + rArr: '⇒', + rAtail: '⤜', + rBarr: '⤏', + rHar: '⥤', + race: '∽̱', + racute: 'ŕ', + radic: '√', + raemptyv: '⦳', + rang: '⟩', + rangd: '⦒', + range: '⦥', + rangle: '⟩', + raquo: '»', + rarr: '→', + rarrap: '⥵', + rarrb: '⇥', + rarrbfs: '⤠', + rarrc: '⤳', + rarrfs: '⤞', + rarrhk: '↪', + rarrlp: '↬', + rarrpl: '⥅', + rarrsim: '⥴', + rarrtl: '↣', + rarrw: '↝', + ratail: '⤚', + ratio: '∶', + rationals: 'ℚ', + rbarr: '⤍', + rbbrk: '❳', + rbrace: '}', + rbrack: ']', + rbrke: '⦌', + rbrksld: '⦎', + rbrkslu: '⦐', + rcaron: 'ř', + rcedil: 'ŗ', + rceil: '⌉', + rcub: '}', + rcy: 'р', + rdca: '⤷', + rdldhar: '⥩', + rdquo: '”', + rdquor: '”', + rdsh: '↳', + real: 'ℜ', + realine: 'ℛ', + realpart: 'ℜ', + reals: 'ℝ', + rect: '▭', + reg: '®', + rfisht: '⥽', + rfloor: '⌋', + rfr: '𝔯', + rhard: '⇁', + rharu: '⇀', + rharul: '⥬', + rho: 'ρ', + rhov: 'ϱ', + rightarrow: '→', + rightarrowtail: '↣', + rightharpoondown: '⇁', + rightharpoonup: '⇀', + rightleftarrows: '⇄', + rightleftharpoons: '⇌', + rightrightarrows: '⇉', + rightsquigarrow: '↝', + rightthreetimes: '⋌', + ring: '˚', + risingdotseq: '≓', + rlarr: '⇄', + rlhar: '⇌', + rlm: '‏', + rmoust: '⎱', + rmoustache: '⎱', + rnmid: '⫮', + roang: '⟭', + roarr: '⇾', + robrk: '⟧', + ropar: '⦆', + ropf: '𝕣', + roplus: '⨮', + rotimes: '⨵', + rpar: ')', + rpargt: '⦔', + rppolint: '⨒', + rrarr: '⇉', + rsaquo: '›', + rscr: '𝓇', + rsh: '↱', + rsqb: ']', + rsquo: '’', + rsquor: '’', + rthree: '⋌', + rtimes: '⋊', + rtri: '▹', + rtrie: '⊵', + rtrif: '▸', + rtriltri: '⧎', + ruluhar: '⥨', + rx: '℞', + sacute: 'ś', + sbquo: '‚', + sc: '≻', + scE: '⪴', + scap: '⪸', + scaron: 'š', + sccue: '≽', + sce: '⪰', + scedil: 'ş', + scirc: 'ŝ', + scnE: '⪶', + scnap: '⪺', + scnsim: '⋩', + scpolint: '⨓', + scsim: '≿', + scy: 'с', + sdot: '⋅', + sdotb: '⊡', + sdote: '⩦', + seArr: '⇘', + searhk: '⤥', + searr: '↘', + searrow: '↘', + sect: '§', + semi: ';', + seswar: '⤩', + setminus: '∖', + setmn: '∖', + sext: '✶', + sfr: '𝔰', + sfrown: '⌢', + sharp: '♯', + shchcy: 'щ', + shcy: 'ш', + shortmid: '∣', + shortparallel: '∥', + shy: '­', + sigma: 'σ', + sigmaf: 'ς', + sigmav: 'ς', + sim: '∼', + simdot: '⩪', + sime: '≃', + simeq: '≃', + simg: '⪞', + simgE: '⪠', + siml: '⪝', + simlE: '⪟', + simne: '≆', + simplus: '⨤', + simrarr: '⥲', + slarr: '←', + smallsetminus: '∖', + smashp: '⨳', + smeparsl: '⧤', + smid: '∣', + smile: '⌣', + smt: '⪪', + smte: '⪬', + smtes: '⪬︀', + softcy: 'ь', + sol: '/', + solb: '⧄', + solbar: '⌿', + sopf: '𝕤', + spades: '♠', + spadesuit: '♠', + spar: '∥', + sqcap: '⊓', + sqcaps: '⊓︀', + sqcup: '⊔', + sqcups: '⊔︀', + sqsub: '⊏', + sqsube: '⊑', + sqsubset: '⊏', + sqsubseteq: '⊑', + sqsup: '⊐', + sqsupe: '⊒', + sqsupset: '⊐', + sqsupseteq: '⊒', + squ: '□', + square: '□', + squarf: '▪', + squf: '▪', + srarr: '→', + sscr: '𝓈', + ssetmn: '∖', + ssmile: '⌣', + sstarf: '⋆', + star: '☆', + starf: '★', + straightepsilon: 'ϵ', + straightphi: 'ϕ', + strns: '¯', + sub: '⊂', + subE: '⫅', + subdot: '⪽', + sube: '⊆', + subedot: '⫃', + submult: '⫁', + subnE: '⫋', + subne: '⊊', + subplus: '⪿', + subrarr: '⥹', + subset: '⊂', + subseteq: '⊆', + subseteqq: '⫅', + subsetneq: '⊊', + subsetneqq: '⫋', + subsim: '⫇', + subsub: '⫕', + subsup: '⫓', + succ: '≻', + succapprox: '⪸', + succcurlyeq: '≽', + succeq: '⪰', + succnapprox: '⪺', + succneqq: '⪶', + succnsim: '⋩', + succsim: '≿', + sum: '∑', + sung: '♪', + sup1: '¹', + sup2: '²', + sup3: '³', + sup: '⊃', + supE: '⫆', + supdot: '⪾', + supdsub: '⫘', + supe: '⊇', + supedot: '⫄', + suphsol: '⟉', + suphsub: '⫗', + suplarr: '⥻', + supmult: '⫂', + supnE: '⫌', + supne: '⊋', + supplus: '⫀', + supset: '⊃', + supseteq: '⊇', + supseteqq: '⫆', + supsetneq: '⊋', + supsetneqq: '⫌', + supsim: '⫈', + supsub: '⫔', + supsup: '⫖', + swArr: '⇙', + swarhk: '⤦', + swarr: '↙', + swarrow: '↙', + swnwar: '⤪', + szlig: 'ß', + target: '⌖', + tau: 'τ', + tbrk: '⎴', + tcaron: 'ť', + tcedil: 'ţ', + tcy: 'т', + tdot: '⃛', + telrec: '⌕', + tfr: '𝔱', + there4: '∴', + therefore: '∴', + theta: 'θ', + thetasym: 'ϑ', + thetav: 'ϑ', + thickapprox: '≈', + thicksim: '∼', + thinsp: ' ', + thkap: '≈', + thksim: '∼', + thorn: 'þ', + tilde: '˜', + times: '×', + timesb: '⊠', + timesbar: '⨱', + timesd: '⨰', + tint: '∭', + toea: '⤨', + top: '⊤', + topbot: '⌶', + topcir: '⫱', + topf: '𝕥', + topfork: '⫚', + tosa: '⤩', + tprime: '‴', + trade: '™', + triangle: '▵', + triangledown: '▿', + triangleleft: '◃', + trianglelefteq: '⊴', + triangleq: '≜', + triangleright: '▹', + trianglerighteq: '⊵', + tridot: '◬', + trie: '≜', + triminus: '⨺', + triplus: '⨹', + trisb: '⧍', + tritime: '⨻', + trpezium: '⏢', + tscr: '𝓉', + tscy: 'ц', + tshcy: 'ћ', + tstrok: 'ŧ', + twixt: '≬', + twoheadleftarrow: '↞', + twoheadrightarrow: '↠', + uArr: '⇑', + uHar: '⥣', + uacute: 'ú', + uarr: '↑', + ubrcy: 'ў', + ubreve: 'ŭ', + ucirc: 'û', + ucy: 'у', + udarr: '⇅', + udblac: 'ű', + udhar: '⥮', + ufisht: '⥾', + ufr: '𝔲', + ugrave: 'ù', + uharl: '↿', + uharr: '↾', + uhblk: '▀', + ulcorn: '⌜', + ulcorner: '⌜', + ulcrop: '⌏', + ultri: '◸', + umacr: 'ū', + uml: '¨', + uogon: 'ų', + uopf: '𝕦', + uparrow: '↑', + updownarrow: '↕', + upharpoonleft: '↿', + upharpoonright: '↾', + uplus: '⊎', + upsi: 'υ', + upsih: 'ϒ', + upsilon: 'υ', + upuparrows: '⇈', + urcorn: '⌝', + urcorner: '⌝', + urcrop: '⌎', + uring: 'ů', + urtri: '◹', + uscr: '𝓊', + utdot: '⋰', + utilde: 'ũ', + utri: '▵', + utrif: '▴', + uuarr: '⇈', + uuml: 'ü', + uwangle: '⦧', + vArr: '⇕', + vBar: '⫨', + vBarv: '⫩', + vDash: '⊨', + vangrt: '⦜', + varepsilon: 'ϵ', + varkappa: 'ϰ', + varnothing: '∅', + varphi: 'ϕ', + varpi: 'ϖ', + varpropto: '∝', + varr: '↕', + varrho: 'ϱ', + varsigma: 'ς', + varsubsetneq: '⊊︀', + varsubsetneqq: '⫋︀', + varsupsetneq: '⊋︀', + varsupsetneqq: '⫌︀', + vartheta: 'ϑ', + vartriangleleft: '⊲', + vartriangleright: '⊳', + vcy: 'в', + vdash: '⊢', + vee: '∨', + veebar: '⊻', + veeeq: '≚', + vellip: '⋮', + verbar: '|', + vert: '|', + vfr: '𝔳', + vltri: '⊲', + vnsub: '⊂⃒', + vnsup: '⊃⃒', + vopf: '𝕧', + vprop: '∝', + vrtri: '⊳', + vscr: '𝓋', + vsubnE: '⫋︀', + vsubne: '⊊︀', + vsupnE: '⫌︀', + vsupne: '⊋︀', + vzigzag: '⦚', + wcirc: 'ŵ', + wedbar: '⩟', + wedge: '∧', + wedgeq: '≙', + weierp: '℘', + wfr: '𝔴', + wopf: '𝕨', + wp: '℘', + wr: '≀', + wreath: '≀', + wscr: '𝓌', + xcap: '⋂', + xcirc: '◯', + xcup: '⋃', + xdtri: '▽', + xfr: '𝔵', + xhArr: '⟺', + xharr: '⟷', + xi: 'ξ', + xlArr: '⟸', + xlarr: '⟵', + xmap: '⟼', + xnis: '⋻', + xodot: '⨀', + xopf: '𝕩', + xoplus: '⨁', + xotime: '⨂', + xrArr: '⟹', + xrarr: '⟶', + xscr: '𝓍', + xsqcup: '⨆', + xuplus: '⨄', + xutri: '△', + xvee: '⋁', + xwedge: '⋀', + yacute: 'ý', + yacy: 'я', + ycirc: 'ŷ', + ycy: 'ы', + yen: '¥', + yfr: '𝔶', + yicy: 'ї', + yopf: '𝕪', + yscr: '𝓎', + yucy: 'ю', + yuml: 'ÿ', + zacute: 'ź', + zcaron: 'ž', + zcy: 'з', + zdot: 'ż', + zeetrf: 'ℨ', + zeta: 'ζ', + zfr: '𝔷', + zhcy: 'ж', + zigrarr: '⇝', + zopf: '𝕫', + zscr: '𝓏', + zwj: '‍', + zwnj: '‌' +} + +;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js + + +const own = {}.hasOwnProperty + +/** + * Decode a single character reference (without the `&` or `;`). + * You probably only need this when you’re building parsers yourself that follow + * different rules compared to HTML. + * This is optimized to be tiny in browsers. + * + * @param {string} value + * `notin` (named), `#123` (deci), `#x123` (hexa). + * @returns {string|false} + * Decoded reference. + */ +function decodeNamedCharacterReference(value) { + return own.call(characterEntities, value) ? characterEntities[value] : false +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const characterReference = { + name: 'characterReference', + tokenize: tokenizeCharacterReference +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterReference(effects, ok, nok) { + const self = this + let size = 0 + /** @type {number} */ + let max + /** @type {(code: Code) => boolean} */ + let test + return start + + /** + * Start of character reference. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterReference') + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + return open + } + + /** + * After `&`, at `#` for numeric references or alphanumeric for named + * references. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 35) { + effects.enter('characterReferenceMarkerNumeric') + effects.consume(code) + effects.exit('characterReferenceMarkerNumeric') + return numeric + } + effects.enter('characterReferenceValue') + max = 31 + test = asciiAlphanumeric + return value(code) + } + + /** + * After `#`, at `x` for hexadecimals or digit for decimals. + * + * ```markdown + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function numeric(code) { + if (code === 88 || code === 120) { + effects.enter('characterReferenceMarkerHexadecimal') + effects.consume(code) + effects.exit('characterReferenceMarkerHexadecimal') + effects.enter('characterReferenceValue') + max = 6 + test = asciiHexDigit + return value + } + effects.enter('characterReferenceValue') + max = 7 + test = asciiDigit + return value(code) + } + + /** + * After markers (`&#x`, `&#`, or `&`), in value, before `;`. + * + * The character reference kind defines what and how many characters are + * allowed. + * + * ```markdown + * > | a&b + * ^^^ + * > | a{b + * ^^^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function value(code) { + if (code === 59 && size) { + const token = effects.exit('characterReferenceValue') + if ( + test === asciiAlphanumeric && + !decodeNamedCharacterReference(self.sliceSerialize(token)) + ) { + return nok(code) + } + + // To do: `markdown-rs` uses a different name: + // `CharacterReferenceMarkerSemi`. + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + effects.exit('characterReference') + return ok + } + if (test(code) && size++ < max) { + effects.consume(code) + return value + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const characterEscape = { + name: 'characterEscape', + tokenize: tokenizeCharacterEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterEscape(effects, ok, nok) { + return start + + /** + * Start of character escape. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterEscape') + effects.enter('escapeMarker') + effects.consume(code) + effects.exit('escapeMarker') + return inside + } + + /** + * After `\`, at punctuation. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + // ASCII punctuation. + if (asciiPunctuation(code)) { + effects.enter('characterEscapeValue') + effects.consume(code) + effects.exit('characterEscapeValue') + effects.exit('characterEscape') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const lineEnding = { + name: 'lineEnding', + tokenize: tokenizeLineEnding +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLineEnding(effects, ok) { + return start + + /** @type {State} */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, ok, 'linePrefix') + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + + +/** @type {Construct} */ +const labelEnd = { + name: 'labelEnd', + tokenize: tokenizeLabelEnd, + resolveTo: resolveToLabelEnd, + resolveAll: resolveAllLabelEnd +} + +/** @type {Construct} */ +const resourceConstruct = { + tokenize: tokenizeResource +} +/** @type {Construct} */ +const referenceFullConstruct = { + tokenize: tokenizeReferenceFull +} +/** @type {Construct} */ +const referenceCollapsedConstruct = { + tokenize: tokenizeReferenceCollapsed +} + +/** @type {Resolver} */ +function resolveAllLabelEnd(events) { + let index = -1 + while (++index < events.length) { + const token = events[index][1] + if ( + token.type === 'labelImage' || + token.type === 'labelLink' || + token.type === 'labelEnd' + ) { + // Remove the marker. + events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) + token.type = 'data' + index++ + } + } + return events +} + +/** @type {Resolver} */ +function resolveToLabelEnd(events, context) { + let index = events.length + let offset = 0 + /** @type {Token} */ + let token + /** @type {number | undefined} */ + let open + /** @type {number | undefined} */ + let close + /** @type {Array} */ + let media + + // Find an opening. + while (index--) { + token = events[index][1] + if (open) { + // If we see another link, or inactive link label, we’ve been here before. + if ( + token.type === 'link' || + (token.type === 'labelLink' && token._inactive) + ) { + break + } + + // Mark other link openings as inactive, as we can’t have links in + // links. + if (events[index][0] === 'enter' && token.type === 'labelLink') { + token._inactive = true + } + } else if (close) { + if ( + events[index][0] === 'enter' && + (token.type === 'labelImage' || token.type === 'labelLink') && + !token._balanced + ) { + open = index + if (token.type !== 'labelLink') { + offset = 2 + break + } + } + } else if (token.type === 'labelEnd') { + close = index + } + } + const group = { + type: events[open][1].type === 'labelLink' ? 'link' : 'image', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + const label = { + type: 'label', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[close][1].end) + } + const text = { + type: 'labelText', + start: Object.assign({}, events[open + offset + 2][1].end), + end: Object.assign({}, events[close - 2][1].start) + } + media = [ + ['enter', group, context], + ['enter', label, context] + ] + + // Opening marker. + media = push(media, events.slice(open + 1, open + offset + 3)) + + // Text open. + media = push(media, [['enter', text, context]]) + + // Always populated by defaults. + + // Between. + media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ) + + // Text close, marker close, label close. + media = push(media, [ + ['exit', text, context], + events[close - 2], + events[close - 1], + ['exit', label, context] + ]) + + // Reference, resource, or so. + media = push(media, events.slice(close + 1)) + + // Media close. + media = push(media, [['exit', group, context]]) + splice(events, open, events.length, media) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelEnd(effects, ok, nok) { + const self = this + let index = self.events.length + /** @type {Token} */ + let labelStart + /** @type {boolean} */ + let defined + + // Find an opening. + while (index--) { + if ( + (self.events[index][1].type === 'labelImage' || + self.events[index][1].type === 'labelLink') && + !self.events[index][1]._balanced + ) { + labelStart = self.events[index][1] + break + } + } + return start + + /** + * Start of label end. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ``` + * + * @type {State} + */ + function start(code) { + // If there is not an okay opening. + if (!labelStart) { + return nok(code) + } + + // If the corresponding label (link) start is marked as inactive, + // it means we’d be wrapping a link, like this: + // + // ```markdown + // > | a [b [c](d) e](f) g. + // ^ + // ``` + // + // We can’t have that, so it’s just balanced brackets. + if (labelStart._inactive) { + return labelEndNok(code) + } + defined = self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize({ + start: labelStart.end, + end: self.now() + }) + ) + ) + effects.enter('labelEnd') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelEnd') + return after + } + + /** + * After `]`. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + // Note: `markdown-rs` also parses GFM footnotes here, which for us is in + // an extension. + + // Resource (`[asd](fgh)`)? + if (code === 40) { + return effects.attempt( + resourceConstruct, + labelEndOk, + defined ? labelEndOk : labelEndNok + )(code) + } + + // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? + if (code === 91) { + return effects.attempt( + referenceFullConstruct, + labelEndOk, + defined ? referenceNotFull : labelEndNok + )(code) + } + + // Shortcut (`[asd]`) reference? + return defined ? labelEndOk(code) : labelEndNok(code) + } + + /** + * After `]`, at `[`, but not at a full reference. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function referenceNotFull(code) { + return effects.attempt( + referenceCollapsedConstruct, + labelEndOk, + labelEndNok + )(code) + } + + /** + * Done, we found something. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndOk(code) { + // Note: `markdown-rs` does a bunch of stuff here. + return ok(code) + } + + /** + * Done, it’s nothing. + * + * There was an okay opening, but we didn’t match anything. + * + * ```markdown + * > | [a](b c + * ^ + * > | [a][b c + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndNok(code) { + labelStart._balanced = true + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeResource(effects, ok, nok) { + return resourceStart + + /** + * At a resource. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceStart(code) { + effects.enter('resource') + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + return resourceBefore + } + + /** + * In resource, after `(`, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceOpen)(code) + : resourceOpen(code) + } + + /** + * In resource, after optional whitespace, at `)` or a destination. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceOpen(code) { + if (code === 41) { + return resourceEnd(code) + } + return factoryDestination( + effects, + resourceDestinationAfter, + resourceDestinationMissing, + 'resourceDestination', + 'resourceDestinationLiteral', + 'resourceDestinationLiteralMarker', + 'resourceDestinationRaw', + 'resourceDestinationString', + 32 + )(code) + } + + /** + * In resource, after destination, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceBetween)(code) + : resourceEnd(code) + } + + /** + * At invalid destination. + * + * ```markdown + * > | [a](<<) b + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationMissing(code) { + return nok(code) + } + + /** + * In resource, after destination and whitespace, at `(` or title. + * + * ```markdown + * > | [a](b ) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBetween(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + resourceTitleAfter, + nok, + 'resourceTitle', + 'resourceTitleMarker', + 'resourceTitleString' + )(code) + } + return resourceEnd(code) + } + + /** + * In resource, after title, at optional whitespace. + * + * ```markdown + * > | [a](b "c") d + * ^ + * ``` + * + * @type {State} + */ + function resourceTitleAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceEnd)(code) + : resourceEnd(code) + } + + /** + * In resource, at `)`. + * + * ```markdown + * > | [a](b) d + * ^ + * ``` + * + * @type {State} + */ + function resourceEnd(code) { + if (code === 41) { + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + effects.exit('resource') + return ok + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceFull(effects, ok, nok) { + const self = this + return referenceFull + + /** + * In a reference (full), at the `[`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFull(code) { + return factoryLabel.call( + self, + effects, + referenceFullAfter, + referenceFullMissing, + 'reference', + 'referenceMarker', + 'referenceString' + )(code) + } + + /** + * In a reference (full), after `]`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullAfter(code) { + return self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + ) + ? ok(code) + : nok(code) + } + + /** + * In reference (full) that was missing. + * + * ```markdown + * > | [a][b d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullMissing(code) { + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceCollapsed(effects, ok, nok) { + return referenceCollapsedStart + + /** + * In reference (collapsed), at `[`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedStart(code) { + // We only attempt a collapsed label if there’s a `[`. + + effects.enter('reference') + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + return referenceCollapsedOpen + } + + /** + * In reference (collapsed), at `]`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedOpen(code) { + if (code === 93) { + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + effects.exit('reference') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartImage = { + name: 'labelStartImage', + tokenize: tokenizeLabelStartImage, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartImage(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (image) start. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelImage') + effects.enter('labelImageMarker') + effects.consume(code) + effects.exit('labelImageMarker') + return open + } + + /** + * After `!`, at `[`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 91) { + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelImage') + return after + } + return nok(code) + } + + /** + * After `![`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * This is needed in because, when GFM footnotes are enabled, images never + * form when started with a `^`. + * Instead, links form: + * + * ```markdown + * ![^a](b) + * + * ![^a][b] + * + * [b]: c + * ``` + * + * ```html + *

!^a

+ *

!^a

+ * ``` + * + * @type {State} + */ + function after(code) { + // To do: use a new field to do this, this is still needed for + // `micromark-extension-gfm-footnote`, but the `label-start-link` + // behavior isn’t. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + +/** + * Classify whether a code represents whitespace, punctuation, or something + * else. + * + * Used for attention (emphasis, strong), whose sequences can open or close + * based on the class of surrounding characters. + * + * > 👉 **Note**: eof (`null`) is seen as whitespace. + * + * @param {Code} code + * Code. + * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} + * Group. + */ +function classifyCharacter(code) { + if ( + code === null || + markdownLineEndingOrSpace(code) || + unicodeWhitespace(code) + ) { + return 1 + } + if (unicodePunctuation(code)) { + return 2 + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const attention = { + name: 'attention', + tokenize: tokenizeAttention, + resolveAll: resolveAllAttention +} + +/** + * Take all events and resolve attention to emphasis or strong. + * + * @type {Resolver} + */ +function resolveAllAttention(events, context) { + let index = -1 + /** @type {number} */ + let open + /** @type {Token} */ + let group + /** @type {Token} */ + let text + /** @type {Token} */ + let openingSequence + /** @type {Token} */ + let closingSequence + /** @type {number} */ + let use + /** @type {Array} */ + let nextEvents + /** @type {number} */ + let offset + + // Walk through all events. + // + // Note: performance of this is fine on an mb of normal markdown, but it’s + // a bottleneck for malicious stuff. + while (++index < events.length) { + // Find a token that can close. + if ( + events[index][0] === 'enter' && + events[index][1].type === 'attentionSequence' && + events[index][1]._close + ) { + open = index + + // Now walk back to find an opener. + while (open--) { + // Find a token that can open the closer. + if ( + events[open][0] === 'exit' && + events[open][1].type === 'attentionSequence' && + events[open][1]._open && + // If the markers are the same: + context.sliceSerialize(events[open][1]).charCodeAt(0) === + context.sliceSerialize(events[index][1]).charCodeAt(0) + ) { + // If the opening can close or the closing can open, + // and the close size *is not* a multiple of three, + // but the sum of the opening and closing size *is* multiple of three, + // then don’t match. + if ( + (events[open][1]._close || events[index][1]._open) && + (events[index][1].end.offset - events[index][1].start.offset) % 3 && + !( + (events[open][1].end.offset - + events[open][1].start.offset + + events[index][1].end.offset - + events[index][1].start.offset) % + 3 + ) + ) { + continue + } + + // Number of markers to use from the sequence. + use = + events[open][1].end.offset - events[open][1].start.offset > 1 && + events[index][1].end.offset - events[index][1].start.offset > 1 + ? 2 + : 1 + const start = Object.assign({}, events[open][1].end) + const end = Object.assign({}, events[index][1].start) + movePoint(start, -use) + movePoint(end, use) + openingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start, + end: Object.assign({}, events[open][1].end) + } + closingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start: Object.assign({}, events[index][1].start), + end + } + text = { + type: use > 1 ? 'strongText' : 'emphasisText', + start: Object.assign({}, events[open][1].end), + end: Object.assign({}, events[index][1].start) + } + group = { + type: use > 1 ? 'strong' : 'emphasis', + start: Object.assign({}, openingSequence.start), + end: Object.assign({}, closingSequence.end) + } + events[open][1].end = Object.assign({}, openingSequence.start) + events[index][1].start = Object.assign({}, closingSequence.end) + nextEvents = [] + + // If there are more markers in the opening, add them before. + if (events[open][1].end.offset - events[open][1].start.offset) { + nextEvents = push(nextEvents, [ + ['enter', events[open][1], context], + ['exit', events[open][1], context] + ]) + } + + // Opening. + nextEvents = push(nextEvents, [ + ['enter', group, context], + ['enter', openingSequence, context], + ['exit', openingSequence, context], + ['enter', text, context] + ]) + + // Always populated by defaults. + + // Between. + nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index), + context + ) + ) + + // Closing. + nextEvents = push(nextEvents, [ + ['exit', text, context], + ['enter', closingSequence, context], + ['exit', closingSequence, context], + ['exit', group, context] + ]) + + // If there are more markers in the closing, add them after. + if (events[index][1].end.offset - events[index][1].start.offset) { + offset = 2 + nextEvents = push(nextEvents, [ + ['enter', events[index][1], context], + ['exit', events[index][1], context] + ]) + } else { + offset = 0 + } + splice(events, open - 1, index - open + 3, nextEvents) + index = open + nextEvents.length - offset - 2 + break + } + } + } + } + + // Remove remaining sequences. + index = -1 + while (++index < events.length) { + if (events[index][1].type === 'attentionSequence') { + events[index][1].type = 'data' + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAttention(effects, ok) { + const attentionMarkers = this.parser.constructs.attentionMarkers.null + const previous = this.previous + const before = classifyCharacter(previous) + + /** @type {NonNullable} */ + let marker + return start + + /** + * Before a sequence. + * + * ```markdown + * > | ** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + marker = code + effects.enter('attentionSequence') + return inside(code) + } + + /** + * In a sequence. + * + * ```markdown + * > | ** + * ^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + const token = effects.exit('attentionSequence') + + // To do: next major: move this to resolver, just like `markdown-rs`. + const after = classifyCharacter(code) + + // Always populated by defaults. + + const open = + !after || (after === 2 && before) || attentionMarkers.includes(code) + const close = + !before || (before === 2 && after) || attentionMarkers.includes(previous) + token._open = Boolean(marker === 42 ? open : open && (before || !close)) + token._close = Boolean(marker === 42 ? close : close && (after || !open)) + return ok(code) + } +} + +/** + * Move a point a bit. + * + * Note: `move` only works inside lines! It’s not possible to move past other + * chunks (replacement characters, tabs, or line endings). + * + * @param {Point} point + * @param {number} offset + * @returns {void} + */ +function movePoint(point, offset) { + point.column += offset + point.offset += offset + point._bufferIndex += offset +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const autolink = { + name: 'autolink', + tokenize: tokenizeAutolink +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAutolink(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of an autolink. + * + * ```markdown + * > | ab + * ^ + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('autolink') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.enter('autolinkProtocol') + return open + } + + /** + * After `<`, at protocol or atext. + * + * ```markdown + * > | ab + * ^ + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (asciiAlpha(code)) { + effects.consume(code) + return schemeOrEmailAtext + } + return emailAtext(code) + } + + /** + * At second byte of protocol or atext. + * + * ```markdown + * > | ab + * ^ + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function schemeOrEmailAtext(code) { + // ASCII alphanumeric and `+`, `-`, and `.`. + if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { + // Count the previous alphabetical from `open` too. + size = 1 + return schemeInsideOrEmailAtext(code) + } + return emailAtext(code) + } + + /** + * In ambiguous protocol or atext. + * + * ```markdown + * > | ab + * ^ + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function schemeInsideOrEmailAtext(code) { + if (code === 58) { + effects.consume(code) + size = 0 + return urlInside + } + + // ASCII alphanumeric and `+`, `-`, and `.`. + if ( + (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && + size++ < 32 + ) { + effects.consume(code) + return schemeInsideOrEmailAtext + } + size = 0 + return emailAtext(code) + } + + /** + * After protocol, in URL. + * + * ```markdown + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function urlInside(code) { + if (code === 62) { + effects.exit('autolinkProtocol') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + + // ASCII control, space, or `<`. + if (code === null || code === 32 || code === 60 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return urlInside + } + + /** + * In email atext. + * + * ```markdown + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function emailAtext(code) { + if (code === 64) { + effects.consume(code) + return emailAtSignOrDot + } + if (asciiAtext(code)) { + effects.consume(code) + return emailAtext + } + return nok(code) + } + + /** + * In label, after at-sign or dot. + * + * ```markdown + * > | ab + * ^ ^ + * ``` + * + * @type {State} + */ + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) + } + + /** + * In label, where `.` and `>` are allowed. + * + * ```markdown + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function emailLabel(code) { + if (code === 46) { + effects.consume(code) + size = 0 + return emailAtSignOrDot + } + if (code === 62) { + // Exit, then change the token type. + effects.exit('autolinkProtocol').type = 'autolinkEmail' + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + return emailValue(code) + } + + /** + * In label, where `.` and `>` are *not* allowed. + * + * Though, this is also used in `emailLabel` to parse other values. + * + * ```markdown + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function emailValue(code) { + // ASCII alphanumeric or `-`. + if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { + const next = code === 45 ? emailValue : emailLabel + effects.consume(code) + return next + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const htmlText = { + name: 'htmlText', + tokenize: tokenizeHtmlText +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlText(effects, ok, nok) { + const self = this + /** @type {NonNullable | undefined} */ + let marker + /** @type {number} */ + let index + /** @type {State} */ + let returnState + return start + + /** + * Start of HTML (text). + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('htmlText') + effects.enter('htmlTextData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | a c + * ^ + * > | a c + * ^ + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + return instruction + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagOpen + } + return nok(code) + } + + /** + * After ` | a c + * ^ + * > | a c + * ^ + * > | a &<]]> c + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + index = 0 + return cdataOpenInside + } + if (asciiAlpha(code)) { + effects.consume(code) + return declaration + } + return nok(code) + } + + /** + * In a comment, after ` | a c + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return nok(code) + } + + /** + * In comment. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function comment(code) { + if (code === null) { + return nok(code) + } + if (code === 45) { + effects.consume(code) + return commentClose + } + if (markdownLineEnding(code)) { + returnState = comment + return lineEndingBefore(code) + } + effects.consume(code) + return comment + } + + /** + * In comment, after `-`. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function commentClose(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return comment(code) + } + + /** + * In comment, after `--`. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function commentEnd(code) { + return code === 62 + ? end(code) + : code === 45 + ? commentClose(code) + : comment(code) + } + + /** + * After ` | a &<]]> b + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + return index === value.length ? cdata : cdataOpenInside + } + return nok(code) + } + + /** + * In CDATA. + * + * ```markdown + * > | a &<]]> b + * ^^^ + * ``` + * + * @type {State} + */ + function cdata(code) { + if (code === null) { + return nok(code) + } + if (code === 93) { + effects.consume(code) + return cdataClose + } + if (markdownLineEnding(code)) { + returnState = cdata + return lineEndingBefore(code) + } + effects.consume(code) + return cdata + } + + /** + * In CDATA, after `]`, at another `]`. + * + * ```markdown + * > | a &<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataClose(code) { + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In CDATA, after `]]`, at `>`. + * + * ```markdown + * > | a &<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataEnd(code) { + if (code === 62) { + return end(code) + } + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In declaration. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function declaration(code) { + if (code === null || code === 62) { + return end(code) + } + if (markdownLineEnding(code)) { + returnState = declaration + return lineEndingBefore(code) + } + effects.consume(code) + return declaration + } + + /** + * In instruction. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function instruction(code) { + if (code === null) { + return nok(code) + } + if (code === 63) { + effects.consume(code) + return instructionClose + } + if (markdownLineEnding(code)) { + returnState = instruction + return lineEndingBefore(code) + } + effects.consume(code) + return instruction + } + + /** + * In instruction, after `?`, at `>`. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function instructionClose(code) { + return code === 62 ? end(code) : instruction(code) + } + + /** + * After ` | a c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagClose + } + return nok(code) + } + + /** + * After ` | a c + * ^ + * ``` + * + * @type {State} + */ + function tagClose(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagClose + } + return tagCloseBetween(code) + } + + /** + * In closing tag, after tag name. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseBetween(code) { + if (markdownLineEnding(code)) { + returnState = tagCloseBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagCloseBetween + } + return end(code) + } + + /** + * After ` | a c + * ^ + * ``` + * + * @type {State} + */ + function tagOpen(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagOpen + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In opening tag, after tag name. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function tagOpenBetween(code) { + if (code === 47) { + effects.consume(code) + return end + } + + // ASCII alphabetical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return tagOpenAttributeName + } + if (markdownLineEnding(code)) { + returnState = tagOpenBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenBetween + } + return end(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | a d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeName(code) { + // ASCII alphabetical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return tagOpenAttributeName + } + return tagOpenAttributeNameAfter(code) + } + + /** + * After attribute name, before initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | a d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeNameAfter + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeNameAfter + } + return tagOpenBetween(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | a e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + marker = code + return tagOpenAttributeValueQuoted + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueBefore + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | a e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code) + marker = undefined + return tagOpenAttributeValueQuotedAfter + } + if (code === null) { + return nok(code) + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueQuoted + return lineEndingBefore(code) + } + effects.consume(code) + return tagOpenAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | a e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 60 || + code === 61 || + code === 96 + ) { + return nok(code) + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the end + * of the tag. + * + * ```markdown + * > | a e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In certain circumstances of a tag where only an `>` is allowed. + * + * ```markdown + * > | a e + * ^ + * ``` + * + * @type {State} + */ + function end(code) { + if (code === 62) { + effects.consume(code) + effects.exit('htmlTextData') + effects.exit('htmlText') + return ok + } + return nok(code) + } + + /** + * At eol. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * > | a + * ``` + * + * @type {State} + */ + function lineEndingBefore(code) { + effects.exit('htmlTextData') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineEndingAfter + } + + /** + * After eol, at optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfter(code) { + // Always populated by defaults. + + return markdownSpace(code) + ? factorySpace( + effects, + lineEndingAfterPrefix, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : lineEndingAfterPrefix(code) + } + + /** + * After eol, after optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfterPrefix(code) { + effects.enter('htmlTextData') + return returnState(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartLink = { + name: 'labelStartLink', + tokenize: tokenizeLabelStartLink, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartLink(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (link) start. + * + * ```markdown + * > | a [b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelLink') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelLink') + return after + } + + /** @type {State} */ + function after(code) { + // To do: this isn’t needed in `micromark-extension-gfm-footnote`, + // remove. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const hardBreakEscape = { + name: 'hardBreakEscape', + tokenize: tokenizeHardBreakEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHardBreakEscape(effects, ok, nok) { + return start + + /** + * Start of a hard break (escape). + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('hardBreakEscape') + effects.consume(code) + return after + } + + /** + * After `\`, at eol. + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownLineEnding(code)) { + effects.exit('hardBreakEscape') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Previous} Previous + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const codeText = { + name: 'codeText', + tokenize: tokenizeCodeText, + resolve: resolveCodeText, + previous +} + +// To do: next major: don’t resolve, like `markdown-rs`. +/** @type {Resolver} */ +function resolveCodeText(events) { + let tailExitIndex = events.length - 4 + let headEnterIndex = 3 + /** @type {number} */ + let index + /** @type {number | undefined} */ + let enter + + // If we start and end with an EOL or a space. + if ( + (events[headEnterIndex][1].type === 'lineEnding' || + events[headEnterIndex][1].type === 'space') && + (events[tailExitIndex][1].type === 'lineEnding' || + events[tailExitIndex][1].type === 'space') + ) { + index = headEnterIndex + + // And we have data. + while (++index < tailExitIndex) { + if (events[index][1].type === 'codeTextData') { + // Then we have padding. + events[headEnterIndex][1].type = 'codeTextPadding' + events[tailExitIndex][1].type = 'codeTextPadding' + headEnterIndex += 2 + tailExitIndex -= 2 + break + } + } + } + + // Merge adjacent spaces and data. + index = headEnterIndex - 1 + tailExitIndex++ + while (++index <= tailExitIndex) { + if (enter === undefined) { + if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { + enter = index + } + } else if ( + index === tailExitIndex || + events[index][1].type === 'lineEnding' + ) { + events[enter][1].type = 'codeTextData' + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + tailExitIndex -= index - enter - 2 + index = enter + 2 + } + enter = undefined + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Previous} + */ +function previous(code) { + // If there is a previous code, there will always be a tail. + return ( + code !== 96 || + this.events[this.events.length - 1][1].type === 'characterEscape' + ) +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeText(effects, ok, nok) { + const self = this + let sizeOpen = 0 + /** @type {number} */ + let size + /** @type {Token} */ + let token + return start + + /** + * Start of code (text). + * + * ```markdown + * > | `a` + * ^ + * > | \`a` + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('codeText') + effects.enter('codeTextSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 96) { + effects.consume(code) + sizeOpen++ + return sequenceOpen + } + effects.exit('codeTextSequence') + return between(code) + } + + /** + * Between something and something else. + * + * ```markdown + * > | `a` + * ^^ + * ``` + * + * @type {State} + */ + function between(code) { + // EOF. + if (code === null) { + return nok(code) + } + + // To do: next major: don’t do spaces in resolve, but when compiling, + // like `markdown-rs`. + // Tabs don’t work, and virtual spaces don’t make sense. + if (code === 32) { + effects.enter('space') + effects.consume(code) + effects.exit('space') + return between + } + + // Closing fence? Could also be data. + if (code === 96) { + token = effects.enter('codeTextSequence') + size = 0 + return sequenceClose(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return between + } + + // Data. + effects.enter('codeTextData') + return data(code) + } + + /** + * In data. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if ( + code === null || + code === 32 || + code === 96 || + markdownLineEnding(code) + ) { + effects.exit('codeTextData') + return between(code) + } + effects.consume(code) + return data + } + + /** + * In closing sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + // More. + if (code === 96) { + effects.consume(code) + size++ + return sequenceClose + } + + // Done! + if (size === sizeOpen) { + effects.exit('codeTextSequence') + effects.exit('codeText') + return ok(code) + } + + // More or less accents: mark as data. + token.type = 'codeTextData' + return data(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + */ + + + + +/** @satisfies {Extension['document']} */ +const constructs_document = { + [42]: list, + [43]: list, + [45]: list, + [48]: list, + [49]: list, + [50]: list, + [51]: list, + [52]: list, + [53]: list, + [54]: list, + [55]: list, + [56]: list, + [57]: list, + [62]: blockQuote +} + +/** @satisfies {Extension['contentInitial']} */ +const contentInitial = { + [91]: definition +} + +/** @satisfies {Extension['flowInitial']} */ +const flowInitial = { + [-2]: codeIndented, + [-1]: codeIndented, + [32]: codeIndented +} + +/** @satisfies {Extension['flow']} */ +const constructs_flow = { + [35]: headingAtx, + [42]: thematicBreak, + [45]: [setextUnderline, thematicBreak], + [60]: htmlFlow, + [61]: setextUnderline, + [95]: thematicBreak, + [96]: codeFenced, + [126]: codeFenced +} + +/** @satisfies {Extension['string']} */ +const constructs_string = { + [38]: characterReference, + [92]: characterEscape +} + +/** @satisfies {Extension['text']} */ +const constructs_text = { + [-5]: lineEnding, + [-4]: lineEnding, + [-3]: lineEnding, + [33]: labelStartImage, + [38]: characterReference, + [42]: attention, + [60]: [autolink, htmlText], + [91]: labelStartLink, + [92]: [hardBreakEscape, characterEscape], + [93]: labelEnd, + [95]: attention, + [96]: codeText +} + +/** @satisfies {Extension['insideSpan']} */ +const insideSpan = { + null: [attention, resolver] +} + +/** @satisfies {Extension['attentionMarkers']} */ +const attentionMarkers = { + null: [42, 95] +} + +/** @satisfies {Extension['disable']} */ +const disable = { + null: [] +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js +/** + * @typedef {import('micromark-util-types').Create} Create + * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + */ + + + + + + + + + +/** + * @param {ParseOptions | null | undefined} [options] + * @returns {ParseContext} + */ +function parse(options) { + const settings = options || {} + const constructs = + /** @type {FullNormalizedExtension} */ + combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) + + /** @type {ParseContext} */ + const parser = { + defined: [], + lazy: {}, + constructs, + content: create(content), + document: create(document_document), + flow: create(flow), + string: create(string), + text: create(text_text) + } + return parser + + /** + * @param {InitialConstruct} initial + */ + function create(initial) { + return creator + /** @type {Create} */ + function creator(from) { + return createTokenizer(parser, initial, from) + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Value} Value + */ + +/** + * @callback Preprocessor + * @param {Value} value + * @param {Encoding | null | undefined} [encoding] + * @param {boolean | null | undefined} [end=false] + * @returns {Array} + */ + +const search = /[\0\t\n\r]/g + +/** + * @returns {Preprocessor} + */ +function preprocess() { + let column = 1 + let buffer = '' + /** @type {boolean | undefined} */ + let start = true + /** @type {boolean | undefined} */ + let atCarriageReturn + return preprocessor + + /** @type {Preprocessor} */ + function preprocessor(value, encoding, end) { + /** @type {Array} */ + const chunks = [] + /** @type {RegExpMatchArray | null} */ + let match + /** @type {number} */ + let next + /** @type {number} */ + let startPosition + /** @type {number} */ + let endPosition + /** @type {Code} */ + let code + + // @ts-expect-error `Buffer` does allow an encoding. + value = buffer + value.toString(encoding) + startPosition = 0 + buffer = '' + if (start) { + // To do: `markdown-rs` actually parses BOMs (byte order mark). + if (value.charCodeAt(0) === 65279) { + startPosition++ + } + start = undefined + } + while (startPosition < value.length) { + search.lastIndex = startPosition + match = search.exec(value) + endPosition = + match && match.index !== undefined ? match.index : value.length + code = value.charCodeAt(endPosition) + if (!match) { + buffer = value.slice(startPosition) + break + } + if (code === 10 && startPosition === endPosition && atCarriageReturn) { + chunks.push(-3) + atCarriageReturn = undefined + } else { + if (atCarriageReturn) { + chunks.push(-5) + atCarriageReturn = undefined + } + if (startPosition < endPosition) { + chunks.push(value.slice(startPosition, endPosition)) + column += endPosition - startPosition + } + switch (code) { + case 0: { + chunks.push(65533) + column++ + break + } + case 9: { + next = Math.ceil(column / 4) * 4 + chunks.push(-2) + while (column++ < next) chunks.push(-1) + break + } + case 10: { + chunks.push(-4) + column = 1 + break + } + default: { + atCarriageReturn = true + column = 1 + } + } + } + startPosition = endPosition + 1 + } + if (end) { + if (atCarriageReturn) chunks.push(-5) + if (buffer) chunks.push(buffer) + chunks.push(null) + } + return chunks + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js +/** + * @typedef {import('micromark-util-types').Event} Event + */ + + + +/** + * @param {Array} events + * @returns {Array} + */ +function postprocess(events) { + while (!subtokenize(events)) { + // Empty + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js +/** + * Turn the number (in string form as either hexa- or plain decimal) coming from + * a numeric character reference into a character. + * + * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes + * non-characters and control characters safe. + * + * @param {string} value + * Value to decode. + * @param {number} base + * Numeric base. + * @returns {string} + * Character. + */ +function decodeNumericCharacterReference(value, base) { + const code = Number.parseInt(value, base) + if ( + // C0 except for HT, LF, FF, CR, space. + code < 9 || + code === 11 || + (code > 13 && code < 32) || + // Control character (DEL) of C0, and C1 controls. + (code > 126 && code < 160) || + // Lone high surrogates and low surrogates. + (code > 55295 && code < 57344) || + // Noncharacters. + (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || + (code & 65535) === 65535 || + (code & 65535) === 65534 /* eslint-enable no-bitwise */ || + // Out of range + code > 1114111 + ) { + return '\uFFFD' + } + return String.fromCharCode(code) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js + + +const characterEscapeOrReference = + /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi + +/** + * Decode markdown strings (which occur in places such as fenced code info + * strings, destinations, labels, and titles). + * + * The “string” content type allows character escapes and -references. + * This decodes those. + * + * @param {string} value + * Value to decode. + * @returns {string} + * Decoded value. + */ +function decodeString(value) { + return value.replace(characterEscapeOrReference, decode) +} + +/** + * @param {string} $0 + * @param {string} $1 + * @param {string} $2 + * @returns {string} + */ +function decode($0, $1, $2) { + if ($1) { + // Escape. + return $1 + } + + // Reference. + const head = $2.charCodeAt(0) + if (head === 35) { + const head = $2.charCodeAt(1) + const hex = head === 120 || head === 88 + return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) + } + return decodeNamedCharacterReference($2) || $0 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js +/** + * @typedef {import('unist').Node} Node + * @typedef {import('unist').Point} Point + * @typedef {import('unist').Position} Position + */ + +/** + * @typedef NodeLike + * @property {string} type + * @property {PositionLike | null | undefined} [position] + * + * @typedef PositionLike + * @property {PointLike | null | undefined} [start] + * @property {PointLike | null | undefined} [end] + * + * @typedef PointLike + * @property {number | null | undefined} [line] + * @property {number | null | undefined} [column] + * @property {number | null | undefined} [offset] + */ + +/** + * Serialize the positional info of a point, position (start and end points), + * or node. + * + * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] + * Node, position, or point. + * @returns {string} + * Pretty printed positional info of a node (`string`). + * + * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) + * or a point `l:c` (when given `point`), where `l` stands for line, `c` for + * column, `s` for `start`, and `e` for end. + * An empty string (`''`) is returned if the given value is neither `node`, + * `position`, nor `point`. + */ +function stringifyPosition(value) { + // Nothing. + if (!value || typeof value !== 'object') { + return '' + } + + // Node. + if ('position' in value || 'type' in value) { + return position(value.position) + } + + // Position. + if ('start' in value || 'end' in value) { + return position(value) + } + + // Point. + if ('line' in value || 'column' in value) { + return point(value) + } + + // ? + return '' +} + +/** + * @param {Point | PointLike | null | undefined} point + * @returns {string} + */ +function point(point) { + return index(point && point.line) + ':' + index(point && point.column) +} + +/** + * @param {Position | PositionLike | null | undefined} pos + * @returns {string} + */ +function position(pos) { + return point(pos && pos.start) + '-' + point(pos && pos.end) +} + +/** + * @param {number | null | undefined} value + * @returns {number} + */ +function index(value) { + return value && typeof value === 'number' ? value : 1 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js +/** + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Value} Value + * + * @typedef {import('unist').Parent} UnistParent + * @typedef {import('unist').Point} Point + * + * @typedef {import('mdast').PhrasingContent} PhrasingContent + * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent + * @typedef {import('mdast').Content} Content + * @typedef {import('mdast').Break} Break + * @typedef {import('mdast').Blockquote} Blockquote + * @typedef {import('mdast').Code} Code + * @typedef {import('mdast').Definition} Definition + * @typedef {import('mdast').Emphasis} Emphasis + * @typedef {import('mdast').Heading} Heading + * @typedef {import('mdast').HTML} HTML + * @typedef {import('mdast').Image} Image + * @typedef {import('mdast').ImageReference} ImageReference + * @typedef {import('mdast').InlineCode} InlineCode + * @typedef {import('mdast').Link} Link + * @typedef {import('mdast').LinkReference} LinkReference + * @typedef {import('mdast').List} List + * @typedef {import('mdast').ListItem} ListItem + * @typedef {import('mdast').Paragraph} Paragraph + * @typedef {import('mdast').Root} Root + * @typedef {import('mdast').Strong} Strong + * @typedef {import('mdast').Text} Text + * @typedef {import('mdast').ThematicBreak} ThematicBreak + * @typedef {import('mdast').ReferenceType} ReferenceType + * @typedef {import('../index.js').CompileData} CompileData + */ + +/** + * @typedef {Root | Content} Node + * @typedef {Extract} Parent + * + * @typedef {Omit & {type: 'fragment', children: Array}} Fragment + */ + +/** + * @callback Transform + * Extra transform, to change the AST afterwards. + * @param {Root} tree + * Tree to transform. + * @returns {Root | undefined | null | void} + * New tree or nothing (in which case the current tree is used). + * + * @callback Handle + * Handle a token. + * @param {CompileContext} this + * Context. + * @param {Token} token + * Current token. + * @returns {void} + * Nothing. + * + * @typedef {Record} Handles + * Token types mapping to handles + * + * @callback OnEnterError + * Handle the case where the `right` token is open, but it is closed (by the + * `left` token) or because we reached the end of the document. + * @param {Omit} this + * Context. + * @param {Token | undefined} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @callback OnExitError + * Handle the case where the `right` token is open but it is closed by + * exiting the `left` token. + * @param {Omit} this + * Context. + * @param {Token} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @typedef {[Token, OnEnterError | undefined]} TokenTuple + * Open token on the stack, with an optional error handler for when + * that token isn’t closed properly. + */ + +/** + * @typedef Config + * Configuration. + * + * We have our defaults, but extensions will add more. + * @property {Array} canContainEols + * Token types where line endings are used. + * @property {Handles} enter + * Opening handles. + * @property {Handles} exit + * Closing handles. + * @property {Array} transforms + * Tree transforms. + * + * @typedef {Partial} Extension + * Change how markdown tokens from micromark are turned into mdast. + * + * @typedef CompileContext + * mdast compiler context. + * @property {Array} stack + * Stack of nodes. + * @property {Array} tokenStack + * Stack of tokens. + * @property {(key: Key) => CompileData[Key]} getData + * Get data from the key/value store. + * @property {(key: Key, value?: CompileData[Key]) => void} setData + * Set data into the key/value store. + * @property {(this: CompileContext) => void} buffer + * Capture some of the output data. + * @property {(this: CompileContext) => string} resume + * Stop capturing and access the output data. + * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter + * Enter a token. + * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit + * Exit a token. + * @property {TokenizeContext['sliceSerialize']} sliceSerialize + * Get the string value of a token. + * @property {Config} config + * Configuration. + * + * @typedef FromMarkdownOptions + * Configuration for how to build mdast. + * @property {Array> | null | undefined} [mdastExtensions] + * Extensions for this utility to change how tokens are turned into a tree. + * + * @typedef {ParseOptions & FromMarkdownOptions} Options + * Configuration. + */ + +// To do: micromark: create a registry of tokens? +// To do: next major: don’t return given `Node` from `enter`. +// To do: next major: remove setter/getter. + + + + + + + + + + +const lib_own = {}.hasOwnProperty + +/** + * @param value + * Markdown to parse. + * @param encoding + * Character encoding for when `value` is `Buffer`. + * @param options + * Configuration. + * @returns + * mdast tree. + */ +const fromMarkdown = + /** + * @type {( + * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & + * ((value: Value, options?: Options | null | undefined) => Root) + * )} + */ + + /** + * @param {Value} value + * @param {Encoding | Options | null | undefined} [encoding] + * @param {Options | null | undefined} [options] + * @returns {Root} + */ + function (value, encoding, options) { + if (typeof encoding !== 'string') { + options = encoding + encoding = undefined + } + return compiler(options)( + postprocess( + parse(options).document().write(preprocess()(value, encoding, true)) + ) + ) + } + +/** + * Note this compiler only understand complete buffering, not streaming. + * + * @param {Options | null | undefined} [options] + */ +function compiler(options) { + /** @type {Config} */ + const config = { + transforms: [], + canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], + enter: { + autolink: opener(link), + autolinkProtocol: onenterdata, + autolinkEmail: onenterdata, + atxHeading: opener(heading), + blockQuote: opener(blockQuote), + characterEscape: onenterdata, + characterReference: onenterdata, + codeFenced: opener(codeFlow), + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: opener(codeFlow, buffer), + codeText: opener(codeText, buffer), + codeTextData: onenterdata, + data: onenterdata, + codeFlowValue: onenterdata, + definition: opener(definition), + definitionDestinationString: buffer, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: opener(emphasis), + hardBreakEscape: opener(hardBreak), + hardBreakTrailing: opener(hardBreak), + htmlFlow: opener(html, buffer), + htmlFlowData: onenterdata, + htmlText: opener(html, buffer), + htmlTextData: onenterdata, + image: opener(image), + label: buffer, + link: opener(link), + listItem: opener(listItem), + listItemValue: onenterlistitemvalue, + listOrdered: opener(list, onenterlistordered), + listUnordered: opener(list), + paragraph: opener(paragraph), + reference: onenterreference, + referenceString: buffer, + resourceDestinationString: buffer, + resourceTitleString: buffer, + setextHeading: opener(heading), + strong: opener(strong), + thematicBreak: opener(thematicBreak) + }, + exit: { + atxHeading: closer(), + atxHeadingSequence: onexitatxheadingsequence, + autolink: closer(), + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: closer(), + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: closer(onexitcodefenced), + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: onexitcodefencedfencemeta, + codeFlowValue: onexitdata, + codeIndented: closer(onexitcodeindented), + codeText: closer(onexitcodetext), + codeTextData: onexitdata, + data: onexitdata, + definition: closer(), + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: closer(), + hardBreakEscape: closer(onexithardbreak), + hardBreakTrailing: closer(onexithardbreak), + htmlFlow: closer(onexithtmlflow), + htmlFlowData: onexitdata, + htmlText: closer(onexithtmltext), + htmlTextData: onexitdata, + image: closer(onexitimage), + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: closer(onexitlink), + listItem: closer(), + listOrdered: closer(), + listUnordered: closer(), + paragraph: closer(), + referenceString: onexitreferencestring, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + resource: onexitresource, + setextHeading: closer(onexitsetextheading), + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: closer(), + thematicBreak: closer() + } + } + configure(config, (options || {}).mdastExtensions || []) + + /** @type {CompileData} */ + const data = {} + return compile + + /** + * Turn micromark events into an mdast tree. + * + * @param {Array} events + * Events. + * @returns {Root} + * mdast tree. + */ + function compile(events) { + /** @type {Root} */ + let tree = { + type: 'root', + children: [] + } + /** @type {Omit} */ + const context = { + stack: [tree], + tokenStack: [], + config, + enter, + exit, + buffer, + resume, + setData, + getData + } + /** @type {Array} */ + const listStack = [] + let index = -1 + while (++index < events.length) { + // We preprocess lists to add `listItem` tokens, and to infer whether + // items the list itself are spread out. + if ( + events[index][1].type === 'listOrdered' || + events[index][1].type === 'listUnordered' + ) { + if (events[index][0] === 'enter') { + listStack.push(index) + } else { + const tail = listStack.pop() + index = prepareList(events, tail, index) + } + } + } + index = -1 + while (++index < events.length) { + const handler = config[events[index][0]] + if (lib_own.call(handler, events[index][1].type)) { + handler[events[index][1].type].call( + Object.assign( + { + sliceSerialize: events[index][2].sliceSerialize + }, + context + ), + events[index][1] + ) + } + } + + // Handle tokens still being open. + if (context.tokenStack.length > 0) { + const tail = context.tokenStack[context.tokenStack.length - 1] + const handler = tail[1] || defaultOnError + handler.call(context, undefined, tail[0]) + } + + // Figure out `root` position. + tree.position = { + start: lib_point( + events.length > 0 + ? events[0][1].start + : { + line: 1, + column: 1, + offset: 0 + } + ), + end: lib_point( + events.length > 0 + ? events[events.length - 2][1].end + : { + line: 1, + column: 1, + offset: 0 + } + ) + } + + // Call transforms. + index = -1 + while (++index < config.transforms.length) { + tree = config.transforms[index](tree) || tree + } + return tree + } + + /** + * @param {Array} events + * @param {number} start + * @param {number} length + * @returns {number} + */ + function prepareList(events, start, length) { + let index = start - 1 + let containerBalance = -1 + let listSpread = false + /** @type {Token | undefined} */ + let listItem + /** @type {number | undefined} */ + let lineIndex + /** @type {number | undefined} */ + let firstBlankLineIndex + /** @type {boolean | undefined} */ + let atMarker + while (++index <= length) { + const event = events[index] + if ( + event[1].type === 'listUnordered' || + event[1].type === 'listOrdered' || + event[1].type === 'blockQuote' + ) { + if (event[0] === 'enter') { + containerBalance++ + } else { + containerBalance-- + } + atMarker = undefined + } else if (event[1].type === 'lineEndingBlank') { + if (event[0] === 'enter') { + if ( + listItem && + !atMarker && + !containerBalance && + !firstBlankLineIndex + ) { + firstBlankLineIndex = index + } + atMarker = undefined + } + } else if ( + event[1].type === 'linePrefix' || + event[1].type === 'listItemValue' || + event[1].type === 'listItemMarker' || + event[1].type === 'listItemPrefix' || + event[1].type === 'listItemPrefixWhitespace' + ) { + // Empty. + } else { + atMarker = undefined + } + if ( + (!containerBalance && + event[0] === 'enter' && + event[1].type === 'listItemPrefix') || + (containerBalance === -1 && + event[0] === 'exit' && + (event[1].type === 'listUnordered' || + event[1].type === 'listOrdered')) + ) { + if (listItem) { + let tailIndex = index + lineIndex = undefined + while (tailIndex--) { + const tailEvent = events[tailIndex] + if ( + tailEvent[1].type === 'lineEnding' || + tailEvent[1].type === 'lineEndingBlank' + ) { + if (tailEvent[0] === 'exit') continue + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + listSpread = true + } + tailEvent[1].type = 'lineEnding' + lineIndex = tailIndex + } else if ( + tailEvent[1].type === 'linePrefix' || + tailEvent[1].type === 'blockQuotePrefix' || + tailEvent[1].type === 'blockQuotePrefixWhitespace' || + tailEvent[1].type === 'blockQuoteMarker' || + tailEvent[1].type === 'listItemIndent' + ) { + // Empty + } else { + break + } + } + if ( + firstBlankLineIndex && + (!lineIndex || firstBlankLineIndex < lineIndex) + ) { + listItem._spread = true + } + + // Fix position. + listItem.end = Object.assign( + {}, + lineIndex ? events[lineIndex][1].start : event[1].end + ) + events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) + index++ + length++ + } + + // Create a new list item. + if (event[1].type === 'listItemPrefix') { + listItem = { + type: 'listItem', + _spread: false, + start: Object.assign({}, event[1].start), + // @ts-expect-error: we’ll add `end` in a second. + end: undefined + } + // @ts-expect-error: `listItem` is most definitely defined, TS... + events.splice(index, 0, ['enter', listItem, event[2]]) + index++ + length++ + firstBlankLineIndex = undefined + atMarker = true + } + } + } + events[start][1]._spread = listSpread + return length + } + + /** + * Set data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @param {CompileData[Key]} [value] + * New value. + * @returns {void} + * Nothing. + */ + function setData(key, value) { + data[key] = value + } + + /** + * Get data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @returns {CompileData[Key]} + * Value. + */ + function getData(key) { + return data[key] + } + + /** + * Create an opener handle. + * + * @param {(token: Token) => Node} create + * Create a node. + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function opener(create, and) { + return open + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function open(token) { + enter.call(this, create(token), token) + if (and) and.call(this, token) + } + } + + /** + * @this {CompileContext} + * @returns {void} + */ + function buffer() { + this.stack.push({ + type: 'fragment', + children: [] + }) + } + + /** + * @template {Node} Kind + * Node type. + * @this {CompileContext} + * Context. + * @param {Kind} node + * Node to enter. + * @param {Token} token + * Corresponding token. + * @param {OnEnterError | undefined} [errorHandler] + * Handle the case where this token is open, but it is closed by something else. + * @returns {Kind} + * The given node. + */ + function enter(node, token, errorHandler) { + const parent = this.stack[this.stack.length - 1] + // @ts-expect-error: Assume `Node` can exist as a child of `parent`. + parent.children.push(node) + this.stack.push(node) + this.tokenStack.push([token, errorHandler]) + // @ts-expect-error: `end` will be patched later. + node.position = { + start: lib_point(token.start) + } + return node + } + + /** + * Create a closer handle. + * + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function closer(and) { + return close + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function close(token) { + if (and) and.call(this, token) + exit.call(this, token) + } + } + + /** + * @this {CompileContext} + * Context. + * @param {Token} token + * Corresponding token. + * @param {OnExitError | undefined} [onExitError] + * Handle the case where another token is open. + * @returns {Node} + * The closed node. + */ + function exit(token, onExitError) { + const node = this.stack.pop() + const open = this.tokenStack.pop() + if (!open) { + throw new Error( + 'Cannot close `' + + token.type + + '` (' + + stringifyPosition({ + start: token.start, + end: token.end + }) + + '): it’s not open' + ) + } else if (open[0].type !== token.type) { + if (onExitError) { + onExitError.call(this, token, open[0]) + } else { + const handler = open[1] || defaultOnError + handler.call(this, token, open[0]) + } + } + node.position.end = lib_point(token.end) + return node + } + + /** + * @this {CompileContext} + * @returns {string} + */ + function resume() { + return lib_toString(this.stack.pop()) + } + + // + // Handlers. + // + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistordered() { + setData('expectingFirstListItemValue', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistitemvalue(token) { + if (getData('expectingFirstListItemValue')) { + const ancestor = this.stack[this.stack.length - 2] + ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) + setData('expectingFirstListItemValue') + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfenceinfo() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.lang = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfencemeta() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.meta = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfence() { + // Exit if this is the closing fence. + if (getData('flowCodeInside')) return + this.buffer() + setData('flowCodeInside', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefenced() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') + setData('flowCodeInside') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodeindented() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/(\r?\n|\r)$/g, '') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitionlabelstring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + node.label = label + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiontitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiondestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitatxheadingsequence(token) { + const node = this.stack[this.stack.length - 1] + if (!node.depth) { + const depth = this.sliceSerialize(token).length + node.depth = depth + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadingtext() { + setData('setextHeadingSlurpLineEnding', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadinglinesequence(token) { + const node = this.stack[this.stack.length - 1] + node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheading() { + setData('setextHeadingSlurpLineEnding') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterdata(token) { + const node = this.stack[this.stack.length - 1] + let tail = node.children[node.children.length - 1] + if (!tail || tail.type !== 'text') { + // Add a new text node. + tail = text() + // @ts-expect-error: we’ll add `end` later. + tail.position = { + start: lib_point(token.start) + } + // @ts-expect-error: Assume `parent` accepts `text`. + node.children.push(tail) + } + this.stack.push(tail) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitdata(token) { + const tail = this.stack.pop() + tail.value += this.sliceSerialize(token) + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlineending(token) { + const context = this.stack[this.stack.length - 1] + // If we’re at a hard break, include the line ending in there. + if (getData('atHardBreak')) { + const tail = context.children[context.children.length - 1] + tail.position.end = lib_point(token.end) + setData('atHardBreak') + return + } + if ( + !getData('setextHeadingSlurpLineEnding') && + config.canContainEols.includes(context.type) + ) { + onenterdata.call(this, token) + onexitdata.call(this, token) + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithardbreak() { + setData('atHardBreak', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmlflow() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmltext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcodetext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlink() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitimage() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabeltext(token) { + const string = this.sliceSerialize(token) + const ancestor = this.stack[this.stack.length - 2] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + ancestor.label = decodeString(string) + // @ts-expect-error: same as above. + ancestor.identifier = normalizeIdentifier(string).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabel() { + const fragment = this.stack[this.stack.length - 1] + const value = this.resume() + const node = this.stack[this.stack.length - 1] + // Assume a reference. + setData('inReference', true) + if (node.type === 'link') { + /** @type {Array} */ + // @ts-expect-error: Assume static phrasing content. + const children = fragment.children + node.children = children + } else { + node.alt = value + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcedestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcetitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresource() { + setData('inReference') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterreference() { + setData('referenceType', 'collapsed') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitreferencestring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + node.label = label + // @ts-expect-error: same as above. + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + setData('referenceType', 'full') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcharacterreferencemarker(token) { + setData('characterReferenceType', token.type) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcharacterreferencevalue(token) { + const data = this.sliceSerialize(token) + const type = getData('characterReferenceType') + /** @type {string} */ + let value + if (type) { + value = decodeNumericCharacterReference( + data, + type === 'characterReferenceMarkerNumeric' ? 10 : 16 + ) + setData('characterReferenceType') + } else { + const result = decodeNamedCharacterReference(data) + value = result + } + const tail = this.stack.pop() + tail.value += value + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkprotocol(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = this.sliceSerialize(token) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkemail(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = 'mailto:' + this.sliceSerialize(token) + } + + // + // Creaters. + // + + /** @returns {Blockquote} */ + function blockQuote() { + return { + type: 'blockquote', + children: [] + } + } + + /** @returns {Code} */ + function codeFlow() { + return { + type: 'code', + lang: null, + meta: null, + value: '' + } + } + + /** @returns {InlineCode} */ + function codeText() { + return { + type: 'inlineCode', + value: '' + } + } + + /** @returns {Definition} */ + function definition() { + return { + type: 'definition', + identifier: '', + label: null, + title: null, + url: '' + } + } + + /** @returns {Emphasis} */ + function emphasis() { + return { + type: 'emphasis', + children: [] + } + } + + /** @returns {Heading} */ + function heading() { + // @ts-expect-error `depth` will be set later. + return { + type: 'heading', + depth: undefined, + children: [] + } + } + + /** @returns {Break} */ + function hardBreak() { + return { + type: 'break' + } + } + + /** @returns {HTML} */ + function html() { + return { + type: 'html', + value: '' + } + } + + /** @returns {Image} */ + function image() { + return { + type: 'image', + title: null, + url: '', + alt: null + } + } + + /** @returns {Link} */ + function link() { + return { + type: 'link', + title: null, + url: '', + children: [] + } + } + + /** + * @param {Token} token + * @returns {List} + */ + function list(token) { + return { + type: 'list', + ordered: token.type === 'listOrdered', + start: null, + spread: token._spread, + children: [] + } + } + + /** + * @param {Token} token + * @returns {ListItem} + */ + function listItem(token) { + return { + type: 'listItem', + spread: token._spread, + checked: null, + children: [] + } + } + + /** @returns {Paragraph} */ + function paragraph() { + return { + type: 'paragraph', + children: [] + } + } + + /** @returns {Strong} */ + function strong() { + return { + type: 'strong', + children: [] + } + } + + /** @returns {Text} */ + function text() { + return { + type: 'text', + value: '' + } + } + + /** @returns {ThematicBreak} */ + function thematicBreak() { + return { + type: 'thematicBreak' + } + } +} + +/** + * Copy a point-like value. + * + * @param {Point} d + * Point-like value. + * @returns {Point} + * unist point. + */ +function lib_point(d) { + return { + line: d.line, + column: d.column, + offset: d.offset + } +} + +/** + * @param {Config} combined + * @param {Array>} extensions + * @returns {void} + */ +function configure(combined, extensions) { + let index = -1 + while (++index < extensions.length) { + const value = extensions[index] + if (Array.isArray(value)) { + configure(combined, value) + } else { + extension(combined, value) + } + } +} + +/** + * @param {Config} combined + * @param {Extension} extension + * @returns {void} + */ +function extension(combined, extension) { + /** @type {keyof Extension} */ + let key + for (key in extension) { + if (lib_own.call(extension, key)) { + if (key === 'canContainEols') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'transforms') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'enter' || key === 'exit') { + const right = extension[key] + if (right) { + Object.assign(combined[key], right) + } + } + } + } +} + +/** @type {OnEnterError} */ +function defaultOnError(left, right) { + if (left) { + throw new Error( + 'Cannot close `' + + left.type + + '` (' + + stringifyPosition({ + start: left.start, + end: left.end + }) + + '): a different token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is open' + ) + } else { + throw new Error( + 'Cannot close document, a token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is still open' + ) + } +} + +// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js +var esm = __webpack_require__(513); +;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-6b48ae7d.js + + + +function preprocessMarkdown(markdown) { + const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); + const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); + return withoutExtraSpaces; +} +function markdownToLines(markdown) { + const preprocessedMarkdown = preprocessMarkdown(markdown); + const { children } = fromMarkdown(preprocessedMarkdown); + const lines = [[]]; + let currentLine = 0; + function processNode(node, parentType = "normal") { + if (node.type === "text") { + const textLines = node.value.split("\n"); + textLines.forEach((textLine, index) => { + if (index !== 0) { + currentLine++; + lines.push([]); + } + textLine.split(" ").forEach((word) => { + if (word) { + lines[currentLine].push({ content: word, type: parentType }); + } + }); + }); + } else if (node.type === "strong" || node.type === "emphasis") { + node.children.forEach((contentNode) => { + processNode(contentNode, node.type); + }); + } + } + children.forEach((treeNode) => { + if (treeNode.type === "paragraph") { + treeNode.children.forEach((contentNode) => { + processNode(contentNode); + }); + } + }); + return lines; +} +function markdownToHTML(markdown) { + const { children } = fromMarkdown(markdown); + function output(node) { + if (node.type === "text") { + return node.value.replace(/\n/g, "
"); + } else if (node.type === "strong") { + return `${node.children.map(output).join("")}`; + } else if (node.type === "emphasis") { + return `${node.children.map(output).join("")}`; + } else if (node.type === "paragraph") { + return `

${node.children.map(output).join("")}

`; + } + return `Unsupported markdown: ${node.type}`; + } + return children.map(output).join(""); +} +function splitTextToChars(text) { + if (Intl.Segmenter) { + return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); + } + return [...text]; +} +function splitWordToFitWidth(checkFit, word) { + const characters = splitTextToChars(word.content); + return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); +} +function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { + if (remainingChars.length === 0) { + return [ + { content: usedChars.join(""), type }, + { content: "", type } + ]; + } + const [nextChar, ...rest] = remainingChars; + const newWord = [...usedChars, nextChar]; + if (checkFit([{ content: newWord.join(""), type }])) { + return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); + } + if (usedChars.length === 0 && nextChar) { + usedChars.push(nextChar); + remainingChars.shift(); + } + return [ + { content: usedChars.join(""), type }, + { content: remainingChars.join(""), type } + ]; +} +function splitLineToFitWidth(line, checkFit) { + if (line.some(({ content }) => content.includes("\n"))) { + throw new Error("splitLineToFitWidth does not support newlines in the line"); + } + return splitLineToFitWidthRecursion(line, checkFit); +} +function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { + if (words.length === 0) { + if (newLine.length > 0) { + lines.push(newLine); + } + return lines.length > 0 ? lines : []; + } + let joiner = ""; + if (words[0].content === " ") { + joiner = " "; + words.shift(); + } + const nextWord = words.shift() ?? { content: " ", type: "normal" }; + const lineWithNextWord = [...newLine]; + if (joiner !== "") { + lineWithNextWord.push({ content: joiner, type: "normal" }); + } + lineWithNextWord.push(nextWord); + if (checkFit(lineWithNextWord)) { + return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); + } + if (newLine.length > 0) { + lines.push(newLine); + words.unshift(nextWord); + } else if (nextWord.content) { + const [line, rest] = splitWordToFitWidth(checkFit, nextWord); + lines.push([line]); + if (rest.content) { + words.unshift(rest); + } + } + return splitLineToFitWidthRecursion(words, checkFit, lines); +} +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlSpan(element, node, width, classes, addBackground = false) { + const fo = element.append("foreignObject"); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + ` + " + label + "" + ); + applyStyle(div, node.labelStyle); + div.style("display", "table-cell"); + div.style("white-space", "nowrap"); + div.style("max-width", width + "px"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + if (addBackground) { + div.attr("class", "labelBkg"); + } + let bbox = div.node().getBoundingClientRect(); + if (bbox.width === width) { + div.style("display", "table"); + div.style("white-space", "break-spaces"); + div.style("width", width + "px"); + bbox = div.node().getBoundingClientRect(); + } + fo.style("width", bbox.width); + fo.style("height", bbox.height); + return fo.node(); +} +function createTspan(textElement, lineIndex, lineHeight) { + return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); +} +function computeWidthOfText(parentNode, lineHeight, line) { + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, line); + const textLength = testSpan.node().getComputedTextLength(); + testElement.remove(); + return textLength; +} +function computeDimensionOfText(parentNode, lineHeight, text) { + var _a; + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); + const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); + if (textDimension) { + testElement.remove(); + } + return textDimension; +} +function createFormattedText(width, g, structuredText, addBackground = false) { + const lineHeight = 1.1; + const labelGroup = g.append("g"); + const bkg = labelGroup.insert("rect").attr("class", "background"); + const textElement = labelGroup.append("text").attr("y", "-10.1"); + let lineIndex = 0; + for (const line of structuredText) { + const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; + const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); + for (const preparedLine of linesUnderWidth) { + const tspan = createTspan(textElement, lineIndex, lineHeight); + updateTextContentAndStyles(tspan, preparedLine); + lineIndex++; + } + } + if (addBackground) { + const bbox = textElement.node().getBBox(); + const padding = 2; + bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); + return labelGroup.node(); + } else { + return textElement.node(); + } +} +function updateTextContentAndStyles(tspan, wrappedLine) { + tspan.text(""); + wrappedLine.forEach((word, index) => { + const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); + if (index === 0) { + innerTspan.text(word.content); + } else { + innerTspan.text(" " + word.content); + } + }); +} +const createText = (el, text = "", { + style = "", + isTitle = false, + classes = "", + useHtmlLabels = true, + isNode = true, + width = 200, + addSvgBackground = false +} = {}) => { + mermaid_f47111a7.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); + if (useHtmlLabels) { + const htmlText = markdownToHTML(text); + const node = { + isNode, + label: (0,mermaid_f47111a7.M)(htmlText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `` + ), + labelStyle: style.replace("fill:", "color:") + }; + const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); + return vertexNode; + } else { + const structuredText = markdownToLines(text); + const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); + return svgLabel; + } +}; + + + +/***/ }), + +/***/ 8747: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ a: () => (/* binding */ insertMarkers$1), +/* harmony export */ b: () => (/* binding */ clear$1), +/* harmony export */ c: () => (/* binding */ createLabel$1), +/* harmony export */ d: () => (/* binding */ clear), +/* harmony export */ e: () => (/* binding */ insertNode), +/* harmony export */ f: () => (/* binding */ insertEdgeLabel), +/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins), +/* harmony export */ h: () => (/* binding */ insertEdge), +/* harmony export */ i: () => (/* binding */ intersectRect$1), +/* harmony export */ j: () => (/* binding */ positionEdgeLabel), +/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset), +/* harmony export */ l: () => (/* binding */ labelHelper), +/* harmony export */ m: () => (/* binding */ addEdgeMarkers), +/* harmony export */ p: () => (/* binding */ positionNode), +/* harmony export */ s: () => (/* binding */ setNodeElem), +/* harmony export */ u: () => (/* binding */ updateNodeBounds) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3791); + + + +const insertMarkers = (elem, markerArray, type, id) => { + markerArray.forEach((markerName) => { + markers[markerName](elem, type, id); + }); +}; +const extension = (elem, type, id) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).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"); +}; +const composition = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).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"); +}; +const aggregation = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).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"); +}; +const dependency = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).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"); +}; +const lollipop = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).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); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).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); +}; +const point = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).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"); +}; +const circle$1 = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).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"); +}; +const cross = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).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"); +}; +const barb = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-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"); +}; +const markers = { + extension, + composition, + aggregation, + dependency, + lollipop, + point, + circle: circle$1, + cross, + barb +}; +const insertMarkers$1 = insertMarkers; +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlLabel(node) { + const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + '" + label + "" + ); + applyStyle(div, node.labelStyle); + div.style("display", "inline-block"); + div.style("white-space", "nowrap"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + return fo.node(); +} +const createLabel = (_vertexText, style, isTitle, isNode) => { + let vertexText = _vertexText || ""; + if (typeof vertexText === "object") { + vertexText = vertexText[0]; + } + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + vertexText = vertexText.replace(/\\n|\n/g, "
"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText); + const node = { + isNode, + label: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `` + ), + labelStyle: style.replace("fill:", "color:") + }; + let vertexNode = addHtmlLabel(node); + return vertexNode; + } else { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", style.replace("color:", "fill:")); + let rows = []; + if (typeof vertexText === "string") { + rows = vertexText.split(/\\n|\n|/gi); + } else if (Array.isArray(vertexText)) { + rows = vertexText; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + if (isTitle) { + tspan.setAttribute("class", "title-row"); + } else { + tspan.setAttribute("class", "row"); + } + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; + } +}; +const createLabel$1 = createLabel; +const labelHelper = async (parent, node, _classes, isNode) => { + let classes; + const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); + if (!_classes) { + classes = "node default"; + } else { + classes = _classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); + let labelText; + if (node.labelText === void 0) { + labelText = ""; + } else { + labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; + } + const textNode = label.node(); + let text; + if (node.labelType === "markdown") { + text = (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), { + useHtmlLabels, + width: node.width || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth, + classes: "markdown-node-label" + }); + } else { + text = textNode.appendChild( + createLabel$1( + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), + node.labelStyle, + false, + isNode + ) + ); + } + let bbox = text.getBBox(); + const halfPadding = node.padding / 2; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); + const images = div.getElementsByTagName("img"); + if (images) { + const noImgText = labelText.replace(/]*>/g, "").trim() === ""; + await Promise.all( + [...images].map( + (img) => new Promise((res) => { + function setupImage() { + img.style.display = "flex"; + img.style.flexDirection = "column"; + if (noImgText) { + const bodyFontSize = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize; + const enlargingFactor = 5; + const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; + img.style.minWidth = width; + img.style.maxWidth = width; + } else { + img.style.width = "100%"; + } + res(img); + } + setTimeout(() => { + if (img.complete) { + setupImage(); + } + }); + img.addEventListener("error", setupImage); + img.addEventListener("load", setupImage); + }) + ) + ); + } + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (useHtmlLabels) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } else { + label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); + } + if (node.centerLabel) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } + label.insert("rect", ":first-child"); + return { shapeSvg, bbox, halfPadding, label }; +}; +const updateNodeBounds = (node, element) => { + const bbox = element.node().getBBox(); + node.width = bbox.width; + node.height = bbox.height; +}; +function insertPolygonShape(parent, w, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); +} +function intersectNode(node, point2) { + return node.intersect(point2); +} +function intersectEllipse(node, rx, ry, point2) { + var cx = node.x; + var cy = node.y; + var px = cx - point2.x; + var py = cy - point2.y; + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + var dx = Math.abs(rx * ry * px / det); + if (point2.x < cx) { + dx = -dx; + } + var dy = Math.abs(rx * ry * py / det); + if (point2.y < cy) { + dy = -dy; + } + return { x: cx + dx, y: cy + dy }; +} +function intersectCircle(node, rx, point2) { + return intersectEllipse(node, rx, rx, point2); +} +function intersectLine(p1, p2, q1, q2) { + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x, y; + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; + if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { + return; + } + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; + if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { + return; + } + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return; + } + offset = Math.abs(denom / 2); + num = b1 * c2 - b2 * c1; + x = num < 0 ? (num - offset) / denom : (num + offset) / denom; + num = a2 * c1 - a1 * c2; + y = num < 0 ? (num - offset) / denom : (num + offset) / denom; + return { x, y }; +} +function sameSign(r1, r2) { + return r1 * r2 > 0; +} +function intersectPolygon(node, polyPoints, point2) { + var x1 = node.x; + var y1 = node.y; + var intersections = []; + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + if (typeof polyPoints.forEach === "function") { + polyPoints.forEach(function(entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + } else { + minX = Math.min(minX, polyPoints.x); + minY = Math.min(minY, polyPoints.y); + } + var left = x1 - node.width / 2 - minX; + var top = y1 - node.height / 2 - minY; + for (var i = 0; i < polyPoints.length; i++) { + var p1 = polyPoints[i]; + var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; + var intersect2 = intersectLine( + node, + point2, + { x: left + p1.x, y: top + p1.y }, + { x: left + p2.x, y: top + p2.y } + ); + if (intersect2) { + intersections.push(intersect2); + } + } + if (!intersections.length) { + return node; + } + if (intersections.length > 1) { + intersections.sort(function(p, q) { + var pdx = p.x - point2.x; + var pdy = p.y - point2.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + var qdx = q.x - point2.x; + var qdy = q.y - point2.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); + } + return intersections[0]; +} +const intersectRect = (node, point2) => { + var x = node.x; + var y = node.y; + var dx = point2.x - x; + var dy = point2.y - y; + var w = node.width / 2; + var h = node.height / 2; + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w = -w; + } + sx = w; + sy = dx === 0 ? 0 : w * dy / dx; + } + return { x: x + sx, y: y + sy }; +}; +const intersectRect$1 = intersectRect; +const intersect = { + node: intersectNode, + circle: intersectCircle, + ellipse: intersectEllipse, + polygon: intersectPolygon, + rect: intersectRect$1 +}; +const note = async (parent, node) => { + const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels; + if (!useHtmlLabels) { + node.centerLabel = true; + } + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes); + const rect2 = shapeSvg.insert("rect", ":first-child"); + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const note$1 = note; +const expandAndDeduplicateDirections = (directions) => { + const uniqueDirections = /* @__PURE__ */ new Set(); + for (const direction of directions) { + switch (direction) { + case "x": + uniqueDirections.add("right"); + uniqueDirections.add("left"); + break; + case "y": + uniqueDirections.add("up"); + uniqueDirections.add("down"); + break; + default: + uniqueDirections.add(direction); + break; + } + } + return uniqueDirections; +}; +const getArrowPoints = (duplicatedDirections, bbox, node) => { + const directions = expandAndDeduplicateDirections(duplicatedDirections); + const f = 2; + const height = bbox.height + 2 * node.padding; + const midpoint = height / f; + const width = bbox.width + 2 * midpoint + node.padding; + const padding = node.padding / 2; + if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) { + return [ + // Bottom + { x: 0, y: 0 }, + { x: midpoint, y: 0 }, + { x: width / 2, y: 2 * padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: 0 }, + // Right + { x: width, y: -height / 3 }, + { x: width + 2 * padding, y: -height / 2 }, + { x: width, y: -2 * height / 3 }, + { x: width, y: -height }, + // Top + { x: width - midpoint, y: -height }, + { x: width / 2, y: -height - 2 * padding }, + { x: midpoint, y: -height }, + // Left + { x: 0, y: -height }, + { x: 0, y: -2 * height / 3 }, + { x: -2 * padding, y: -height / 2 }, + { x: 0, y: -height / 3 } + ]; + } + if (directions.has("right") && directions.has("left") && directions.has("up")) { + return [ + { x: midpoint, y: 0 }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("right") && directions.has("left") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: midpoint, y: -height }, + { x: width - midpoint, y: -height }, + { x: width, y: 0 } + ]; + } + if (directions.has("right") && directions.has("up") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: width, y: -midpoint }, + { x: width, y: -height + midpoint }, + { x: 0, y: -height } + ]; + } + if (directions.has("left") && directions.has("up") && directions.has("down")) { + return [ + { x: width, y: 0 }, + { x: 0, y: -midpoint }, + { x: 0, y: -height + midpoint }, + { x: width, y: -height } + ]; + } + if (directions.has("right") && directions.has("left")) { + return [ + { x: midpoint, y: 0 }, + { x: midpoint, y: -padding }, + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: width - midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("up") && directions.has("down")) { + return [ + // Bottom center + { x: width / 2, y: 0 }, + // Left pont of bottom arrow + { x: 0, y: -padding }, + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: 0, y: -height + padding }, + // Top of arrow + { x: width / 2, y: -height }, + { x: width, y: -height + padding }, + // Top of right vertical bar + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding }, + { x: width, y: -padding } + ]; + } + if (directions.has("right") && directions.has("up")) { + return [ + { x: 0, y: 0 }, + { x: width, y: -midpoint }, + { x: 0, y: -height } + ]; + } + if (directions.has("right") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: width, y: 0 }, + { x: 0, y: -height } + ]; + } + if (directions.has("left") && directions.has("up")) { + return [ + { x: width, y: 0 }, + { x: 0, y: -midpoint }, + { x: width, y: -height } + ]; + } + if (directions.has("left") && directions.has("down")) { + return [ + { x: width, y: 0 }, + { x: 0, y: 0 }, + { x: width, y: -height } + ]; + } + if (directions.has("right")) { + return [ + { x: midpoint, y: -padding }, + { x: midpoint, y: -padding }, + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: width - midpoint, y: -height + padding }, + // top left corner of arrow + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding } + ]; + } + if (directions.has("left")) { + return [ + { x: midpoint, y: 0 }, + { x: midpoint, y: -padding }, + // Two points, the right corners + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("up")) { + return [ + // Bottom center + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: 0, y: -height + padding }, + // Top of arrow + { x: width / 2, y: -height }, + { x: width, y: -height + padding }, + // Top of right vertical bar + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding } + ]; + } + if (directions.has("down")) { + return [ + // Bottom center + { x: width / 2, y: 0 }, + // Left pont of bottom arrow + { x: 0, y: -padding }, + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding }, + { x: width, y: -padding } + ]; + } + return [{ x: 0, y: 0 }]; +}; +const formatClass = (str) => { + if (str) { + return " " + str; + } + return ""; +}; +const getClassesFromNode = (node, otherClasses) => { + return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( + node.class + )}`; +}; +const question = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const s = w + h; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)"); + const questionElem = insertPolygonShape(shapeSvg, s, s, points); + questionElem.attr("style", node.style); + updateNodeBounds(node, questionElem); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called"); + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const choice = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const s = 28; + const points = [ + { x: 0, y: s / 2 }, + { x: s / 2, y: 0 }, + { x: 0, y: -s / 2 }, + { x: -s / 2, y: 0 } + ]; + const choice2 = shapeSvg.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ); + choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); + node.width = 28; + node.height = 28; + node.intersect = function(point2) { + return intersect.circle(node, 14, point2); + }; + return shapeSvg; +}; +const hexagon = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const f = 4; + const h = bbox.height + node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const hex = insertPolygonShape(shapeSvg, w, h, points); + hex.attr("style", node.style); + updateNodeBounds(node, hex); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const block_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true); + const f = 2; + const h = bbox.height + 2 * node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = getArrowPoints(node.directions, bbox, node); + const blockArrow = insertPolygonShape(shapeSvg, w, h, points); + blockArrow.attr("style", node.style); + updateNodeBounds(node, blockArrow); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_left_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -h / 2, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + node.width = w + h; + node.height = h; + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_right = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_left = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w + h / 6, y: 0 }, + { x: w - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w + 2 * h / 6, y: 0 }, + { x: w - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const inv_trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_right_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w + h / 2, y: 0 }, + { x: w, y: -h / 2 }, + { x: w + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const cylinder = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const rx = w / 2; + const ry = rx / (2.5 + w / 50); + const h = bbox.height + ry + node.padding; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; + const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); + updateNodeBounds(node, el); + node.intersect = function(point2) { + const pos = intersect.rect(node, point2); + const x = pos.x - node.x; + if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { + let y = ry * ry * (1 - x * x / (rx * rx)); + if (y != 0) { + y = Math.sqrt(y); + } + y = ry - y; + if (point2.y - node.y > 0) { + y = -y; + } + pos.y += y; + } + return pos; + }; + return shapeSvg; +}; +const rect = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes + " " + node.class, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = node.positioned ? node.width : bbox.width + node.padding; + const totalHeight = node.positioned ? node.height : bbox.height + node.padding; + const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; + const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; + rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const composite = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = node.positioned ? node.width : bbox.width + node.padding; + const totalHeight = node.positioned ? node.height : bbox.height + node.padding; + const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; + const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; + rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const labelRect = async (parent, node) => { + const { shapeSvg } = await labelHelper(parent, node, "label", true); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = 0; + const totalHeight = 0; + rect2.attr("width", totalWidth).attr("height", totalHeight); + shapeSvg.attr("class", "label edgeLabel"); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { + const strokeDashArray = []; + const addBorder = (length) => { + strokeDashArray.push(length, 0); + }; + const skipBorder = (length) => { + strokeDashArray.push(0, length); + }; + if (borders.includes("t")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("r")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + if (borders.includes("b")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("l")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); +} +const rectWithTitle = (parent, node) => { + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const innerLine = shapeSvg.insert("line"); + const label = shapeSvg.insert("g").attr("class", "label"); + const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; + let title = ""; + if (typeof text2 === "object") { + title = text2[0]; + } else { + title = text2; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object"); + const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); + let bbox = { width: 0, height: 0 }; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2); + const textRows = text2.slice(1, text2.length); + let titleBox = text.getBBox(); + const descr = label.node().appendChild( + createLabel$1(textRows.join ? textRows.join("
") : textRows, node.labelStyle, true, true) + ); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = descr.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const halfPadding = node.padding / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" + ); + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" + ); + bbox = label.node().getBBox(); + label.attr( + "transform", + "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" + ); + rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const stadium = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const h = bbox.height + node.padding; + const w = bbox.width + h / 4 + node.padding; + const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const circle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main"); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding, point2); + }; + return shapeSvg; +}; +const doublecircle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const gap = 5; + const circleGroup = shapeSvg.insert("g", ":first-child"); + const outerCircle = circleGroup.insert("circle"); + const innerCircle = circleGroup.insert("circle"); + circleGroup.attr("class", node.class); + outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); + innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main"); + updateNodeBounds(node, outerCircle); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); + }; + return shapeSvg; +}; +const subroutine = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w + 8, y: 0 }, + { x: w + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const start = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const forkJoin = (parent, node, dir) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + let width = 70; + let height = 10; + if (dir === "LR") { + width = 10; + height = 70; + } + const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); + updateNodeBounds(node, shape); + node.height = node.height + node.padding / 2; + node.width = node.width + node.padding / 2; + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const end = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const innerCircle = shapeSvg.insert("circle", ":first-child"); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const class_box = (parent, node) => { + const halfPadding = node.padding / 2; + const rowPadding = 4; + const lineHeight = 8; + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const topLine = shapeSvg.insert("line"); + const bottomLine = shapeSvg.insert("line"); + let maxWidth = 0; + let maxHeight = rowPadding; + const labelContainer = shapeSvg.insert("g").attr("class", "label"); + let verticalPos = 0; + const hasInterface = node.classData.annotations && node.classData.annotations[0]; + const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; + const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); + let interfaceBBox = interfaceLabel.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = interfaceLabel.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel); + interfaceBBox = div.getBoundingClientRect(); + dv.attr("width", interfaceBBox.width); + dv.attr("height", interfaceBBox.height); + } + if (node.classData.annotations[0]) { + maxHeight += interfaceBBox.height + rowPadding; + maxWidth += interfaceBBox.width; + } + let classTitleString = node.classData.label; + if (node.classData.type !== void 0 && node.classData.type !== "") { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + classTitleString += "<" + node.classData.type + ">"; + } else { + classTitleString += "<" + node.classData.type + ">"; + } + } + const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle"); + let classTitleBBox = classTitleLabel.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = classTitleLabel.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel); + classTitleBBox = div.getBoundingClientRect(); + dv.attr("width", classTitleBBox.width); + dv.attr("height", classTitleBBox.height); + } + maxHeight += classTitleBBox.height + rowPadding; + if (classTitleBBox.width > maxWidth) { + maxWidth = classTitleBBox.width; + } + const classAttributes = []; + node.classData.members.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let parsedText = parsedInfo.displayText; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + parsedText = parsedText.replace(//g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + parsedText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classAttributes.push(lbl); + }); + maxHeight += lineHeight; + const classMethods = []; + node.classData.methods.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let displayText = parsedInfo.displayText; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + displayText = displayText.replace(//g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + displayText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classMethods.push(lbl); + }); + maxHeight += lineHeight; + if (hasInterface) { + let diffX2 = (maxWidth - interfaceBBox.width) / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" + ); + verticalPos = interfaceBBox.height + rowPadding; + } + let diffX = (maxWidth - classTitleBBox.width) / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + verticalPos += classTitleBBox.height + rowPadding; + topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classAttributes.forEach((lbl) => { + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + verticalPos += lineHeight; + bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classMethods.forEach((lbl) => { + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const shapes = { + rhombus: question, + composite, + question, + rect, + labelRect, + rectWithTitle, + choice, + circle, + doublecircle, + stadium, + hexagon, + block_arrow, + rect_left_inv_arrow, + lean_right, + lean_left, + trapezoid, + inv_trapezoid, + rect_right_inv_arrow, + cylinder, + start, + end, + note: note$1, + subroutine, + fork: forkJoin, + join: forkJoin, + class_box +}; +let nodeElems = {}; +const insertNode = async (elem, node, dir) => { + let newEl; + let el; + if (node.link) { + let target; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") { + target = "_top"; + } else if (node.linkTarget) { + target = node.linkTarget || "_blank"; + } + newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); + el = await shapes[node.shape](newEl, node, dir); + } else { + el = await shapes[node.shape](elem, node, dir); + newEl = el; + } + if (node.tooltip) { + el.attr("title", node.tooltip); + } + if (node.class) { + el.attr("class", "node default " + node.class); + } + newEl.attr("data-node", "true"); + newEl.attr("data-id", node.id); + nodeElems[node.id] = newEl; + if (node.haveCallback) { + nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); + } + return newEl; +}; +const setNodeElem = (elem, node) => { + nodeElems[node.id] = elem; +}; +const clear$1 = () => { + nodeElems = {}; +}; +const positionNode = (node) => { + const el = nodeElems[node.id]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace( + "Transforming node", + node.diff, + node, + "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" + ); + const padding = 8; + const diff = node.diff || 0; + if (node.clusterNode) { + el.attr( + "transform", + "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" + ); + } else { + el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); + } + return diff; +}; +const getSubGraphTitleMargins = ({ + flowchart +}) => { + var _a, _b; + const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0; + const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0; + const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; + return { + subGraphTitleTopMargin, + subGraphTitleBottomMargin, + subGraphTitleTotalMargin + }; +}; +const markerOffsets = { + aggregation: 18, + extension: 18, + composition: 18, + dependency: 6, + lollipop: 13.5, + arrow_point: 5.3 +}; +function calculateDeltaAndAngle(point1, point2) { + if (point1 === void 0 || point2 === void 0) { + return { angle: 0, deltaX: 0, deltaY: 0 }; + } + point1 = pointTransformer(point1); + point2 = pointTransformer(point2); + const [x1, y1] = [point1.x, point1.y]; + const [x2, y2] = [point2.x, point2.y]; + const deltaX = x2 - x1; + const deltaY = y2 - y1; + return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; +} +const pointTransformer = (data) => { + if (Array.isArray(data)) { + return { x: data[0], y: data[1] }; + } + return data; +}; +const getLineFunctionsWithOffset = (edge) => { + return { + x: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaX } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } + return pointTransformer(d).x + offset; + }, + y: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaY } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } + return pointTransformer(d).y + offset; + } + }; +}; +const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => { + if (edge.arrowTypeStart) { + addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType); + } + if (edge.arrowTypeEnd) { + addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType); + } +}; +const arrowTypesMap = { + arrow_cross: "cross", + arrow_point: "point", + arrow_barb: "barb", + arrow_circle: "circle", + aggregation: "aggregation", + extension: "extension", + composition: "composition", + dependency: "dependency", + lollipop: "lollipop" +}; +const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => { + const endMarkerType = arrowTypesMap[arrowType]; + if (!endMarkerType) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`); + return; + } + const suffix = position === "start" ? "Start" : "End"; + svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`); +}; +let edgeLabels = {}; +let terminalLabels = {}; +const clear = () => { + edgeLabels = {}; + terminalLabels = {}; +}; +const insertEdgeLabel = (elem, edge) => { + const useHtmlLabels = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); + const labelElement = edge.labelType === "markdown" ? (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, { + style: edge.labelStyle, + useHtmlLabels, + addSvgBackground: true + }) : createLabel$1(edge.label, edge.labelStyle); + const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); + const label = edgeLabel.insert("g").attr("class", "label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + if (useHtmlLabels) { + const div = labelElement.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + edgeLabels[edge.id] = edgeLabel; + edge.width = bbox.width; + edge.height = bbox.height; + let fo; + if (edge.startLabelLeft) { + const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); + const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startLeft = startEdgeLabelLeft; + setTerminalWidth(fo, edge.startLabelLeft); + } + if (edge.startLabelRight) { + const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); + const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); + fo = startEdgeLabelRight.node().appendChild(startLabelElement); + inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startRight = startEdgeLabelRight; + setTerminalWidth(fo, edge.startLabelRight); + } + if (edge.endLabelLeft) { + const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); + const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelLeft.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endLeft = endEdgeLabelLeft; + setTerminalWidth(fo, edge.endLabelLeft); + } + if (edge.endLabelRight) { + const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); + const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelRight.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endRight = endEdgeLabelRight; + setTerminalWidth(fo, edge.endLabelRight); + } + return labelElement; +}; +function setTerminalWidth(fo, value) { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) { + fo.style.width = value.length * 9 + "px"; + fo.style.height = "12px"; + } +} +const positionEdgeLabel = (edge, paths) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths); + let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig); + if (edge.label) { + const el = edgeLabels[edge.id]; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug( + "Moving label " + edge.label + " from (", + x, + ",", + y, + ") to (", + pos.x, + ",", + pos.y, + ") abc88" + ); + if (paths.updatedPath) { + x = pos.x; + y = pos.y; + } + } + el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`); + } + if (edge.startLabelLeft) { + const el = terminalLabels[edge.id].startLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.startLabelRight) { + const el = terminalLabels[edge.id].startRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition( + edge.arrowTypeStart ? 10 : 0, + "start_right", + path + ); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.endLabelLeft) { + const el = terminalLabels[edge.id].endLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.endLabelRight) { + const el = terminalLabels[edge.id].endRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } +}; +const outsideNode = (node, point2) => { + const x = node.x; + const y = node.y; + const dx = Math.abs(point2.x - x); + const dy = Math.abs(point2.y - y); + const w = node.width / 2; + const h = node.height / 2; + if (dx >= w || dy >= h) { + return true; + } + return false; +}; +const intersection = (node, outsidePoint, insidePoint) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(outsidePoint)} + insidePoint : ${JSON.stringify(insidePoint)} + node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); + const x = node.x; + const y = node.y; + const dx = Math.abs(x - insidePoint.x); + const w = node.width / 2; + let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; + const h = node.height / 2; + const Q = Math.abs(outsidePoint.y - insidePoint.y); + const R = Math.abs(outsidePoint.x - insidePoint.x); + if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { + let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; + r = R * q / Q; + const res = { + x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, + y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q + }; + if (r === 0) { + res.x = outsidePoint.x; + res.y = outsidePoint.y; + } + if (R === 0) { + res.x = outsidePoint.x; + } + if (Q === 0) { + res.y = outsidePoint.y; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); + return res; + } else { + if (insidePoint.x < outsidePoint.x) { + r = outsidePoint.x - w - x; + } else { + r = x - w - outsidePoint.x; + } + let q = Q * r / R; + let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; + let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); + if (r === 0) { + _x = outsidePoint.x; + _y = outsidePoint.y; + } + if (R === 0) { + _x = outsidePoint.x; + } + if (Q === 0) { + _y = outsidePoint.y; + } + return { x: _x, y: _y }; + } +}; +const cutPathAtIntersect = (_points, boundaryNode) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode); + let points = []; + let lastPointOutside = _points[0]; + let isInside = false; + _points.forEach((point2) => { + if (!outsideNode(boundaryNode, point2) && !isInside) { + const inter = intersection(boundaryNode, lastPointOutside, point2); + let pointPresent = false; + points.forEach((p) => { + pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; + }); + if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { + points.push(inter); + } + isInside = true; + } else { + lastPointOutside = point2; + if (!isInside) { + points.push(point2); + } + } + }); + return points; +}; +const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { + let points = edge.points; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e); + let pointsHasChanged = false; + const tail = graph.node(e.v); + var head = graph.node(e.w); + if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) { + points = points.slice(1, edge.points.length - 1); + points.unshift(tail.intersect(points[0])); + points.push(head.intersect(points[points.length - 1])); + } + if (edge.toCluster) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]); + points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); + pointsHasChanged = true; + } + if (edge.fromCluster) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]); + points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); + pointsHasChanged = true; + } + const lineData = points.filter((p) => !Number.isNaN(p.y)); + let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM; + if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { + curve = edge.curve; + } + const { x, y } = getLineFunctionsWithOffset(edge); + const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve); + let strokeClasses; + switch (edge.thickness) { + case "normal": + strokeClasses = "edge-thickness-normal"; + break; + case "thick": + strokeClasses = "edge-thickness-thick"; + break; + case "invisible": + strokeClasses = "edge-thickness-thick"; + break; + default: + strokeClasses = ""; + } + switch (edge.pattern) { + case "solid": + strokeClasses += " edge-pattern-solid"; + break; + case "dotted": + strokeClasses += " edge-pattern-dotted"; + break; + case "dashed": + strokeClasses += " edge-pattern-dashed"; + break; + } + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); + let url = ""; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + addEdgeMarkers(svgPath, edge, url, id, diagramType); + let paths = {}; + if (pointsHasChanged) { + paths.updatedPath = points; + } + paths.originalPath = edge.points; + return paths; +}; + + + +/***/ }), + +/***/ 6216: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ d: () => (/* binding */ db), +/* harmony export */ f: () => (/* binding */ flowDb), +/* harmony export */ p: () => (/* binding */ parser$1) +/* harmony export */ }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [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], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 49], $Ve = [1, 48], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 44], $Vl = [1, 46], $Vm = [1, 42], $Vn = [1, 47], $Vo = [1, 43], $Vp = [1, 50], $Vq = [1, 45], $Vr = [1, 51], $Vs = [1, 52], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 57], $Vy = [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], $Vz = [1, 61], $VA = [1, 60], $VB = [1, 62], $VC = [8, 9, 11, 73, 75], $VD = [1, 88], $VE = [1, 93], $VF = [1, 92], $VG = [1, 89], $VH = [1, 85], $VI = [1, 91], $VJ = [1, 87], $VK = [1, 94], $VL = [1, 90], $VM = [1, 95], $VN = [1, 86], $VO = [8, 9, 10, 11, 73, 75], $VP = [8, 9, 10, 11, 44, 73, 75], $VQ = [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], $VR = [8, 9, 11, 42, 58, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VS = [42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VT = [1, 121], $VU = [1, 120], $VV = [1, 128], $VW = [1, 142], $VX = [1, 143], $VY = [1, 144], $VZ = [1, 145], $V_ = [1, 130], $V$ = [1, 132], $V01 = [1, 136], $V11 = [1, 137], $V21 = [1, 138], $V31 = [1, 139], $V41 = [1, 140], $V51 = [1, 141], $V61 = [1, 146], $V71 = [1, 147], $V81 = [1, 126], $V91 = [1, 127], $Va1 = [1, 134], $Vb1 = [1, 129], $Vc1 = [1, 133], $Vd1 = [1, 131], $Ve1 = [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], $Vf1 = [1, 149], $Vg1 = [8, 9, 11], $Vh1 = [8, 9, 10, 11, 14, 42, 58, 86, 102, 103, 106, 108, 111, 112, 113], $Vi1 = [1, 169], $Vj1 = [1, 165], $Vk1 = [1, 166], $Vl1 = [1, 170], $Vm1 = [1, 167], $Vn1 = [1, 168], $Vo1 = [75, 113, 116], $Vp1 = [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], $Vq1 = [10, 103], $Vr1 = [31, 47, 49, 51, 53, 55, 60, 62, 64, 65, 67, 69, 113, 114, 115], $Vs1 = [1, 235], $Vt1 = [1, 233], $Vu1 = [1, 237], $Vv1 = [1, 231], $Vw1 = [1, 232], $Vx1 = [1, 234], $Vy1 = [1, 236], $Vz1 = [1, 238], $VA1 = [1, 255], $VB1 = [8, 9, 11, 103], $VC1 = [8, 9, 10, 11, 58, 81, 102, 103, 106, 107, 108, 109]; + var parser2 = { + trace: function trace() { + }, + 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 anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 2: + this.$ = []; + break; + case 3: + if (!Array.isArray($$[$0]) || $$[$0].length > 0) { + $$[$0 - 1].push($$[$0]); + } + this.$ = $$[$0 - 1]; + break; + case 4: + case 176: + this.$ = $$[$0]; + break; + case 11: + yy.setDirection("TB"); + this.$ = "TB"; + break; + case 12: + yy.setDirection($$[$0 - 1]); + this.$ = $$[$0 - 1]; + break; + case 27: + this.$ = $$[$0 - 1].nodes; + break; + case 28: + case 29: + case 30: + case 31: + case 32: + this.$ = []; + break; + case 33: + this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]); + break; + case 34: + this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]); + break; + case 35: + this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0); + break; + case 37: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 38: + case 39: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 43: + yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]); + this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) }; + break; + case 44: + yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]); + this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) }; + break; + case 45: + this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] }; + break; + case 46: + this.$ = { stmt: $$[$0], nodes: $$[$0] }; + break; + case 47: + this.$ = [$$[$0]]; + break; + case 48: + this.$ = $$[$0 - 4].concat($$[$0]); + break; + case 49: + this.$ = $$[$0]; + break; + case 50: + this.$ = $$[$0 - 2]; + yy.setClass($$[$0 - 2], $$[$0]); + break; + case 51: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "square"); + break; + case 52: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle"); + break; + case 53: + this.$ = $$[$0 - 5]; + yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle"); + break; + case 54: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse"); + break; + case 55: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium"); + break; + case 56: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine"); + break; + case 57: + this.$ = $$[$0 - 7]; + yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]])); + break; + case 58: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder"); + break; + case 59: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "round"); + break; + case 60: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond"); + break; + case 61: + this.$ = $$[$0 - 5]; + yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon"); + break; + case 62: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd"); + break; + case 63: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid"); + break; + case 64: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid"); + break; + case 65: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right"); + break; + case 66: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left"); + break; + case 67: + this.$ = $$[$0]; + yy.addVertex($$[$0]); + break; + case 68: + $$[$0 - 1].text = $$[$0]; + this.$ = $$[$0 - 1]; + break; + case 69: + case 70: + $$[$0 - 2].text = $$[$0 - 1]; + this.$ = $$[$0 - 2]; + break; + case 71: + this.$ = $$[$0]; + break; + case 72: + var inf = yy.destructLink($$[$0], $$[$0 - 2]); + this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] }; + break; + case 73: + this.$ = { text: $$[$0], type: "text" }; + break; + case 74: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 75: + this.$ = { text: $$[$0], type: "string" }; + break; + case 76: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 77: + var inf = yy.destructLink($$[$0]); + this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length }; + break; + case 78: + this.$ = $$[$0 - 1]; + break; + case 79: + this.$ = { text: $$[$0], type: "text" }; + break; + case 80: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 81: + this.$ = { text: $$[$0], type: "string" }; + break; + case 82: + case 97: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 94: + this.$ = { text: $$[$0], type: "text" }; + break; + case 95: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 96: + this.$ = { text: $$[$0], type: "text" }; + break; + case 98: + this.$ = $$[$0 - 4]; + yy.addClass($$[$0 - 2], $$[$0]); + break; + case 99: + this.$ = $$[$0 - 4]; + yy.setClass($$[$0 - 2], $$[$0]); + break; + case 100: + case 108: + this.$ = $$[$0 - 1]; + yy.setClickEvent($$[$0 - 1], $$[$0]); + break; + case 101: + case 109: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 102: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 103: + this.$ = $$[$0 - 4]; + yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 4], $$[$0]); + break; + case 104: + this.$ = $$[$0 - 2]; + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 105: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 4], $$[$0 - 2]); + yy.setTooltip($$[$0 - 4], $$[$0]); + break; + case 106: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 107: + this.$ = $$[$0 - 6]; + yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]); + yy.setTooltip($$[$0 - 6], $$[$0 - 2]); + break; + case 110: + this.$ = $$[$0 - 1]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 111: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 112: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); + break; + case 113: + this.$ = $$[$0 - 5]; + yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]); + yy.setTooltip($$[$0 - 5], $$[$0 - 2]); + break; + case 114: + this.$ = $$[$0 - 4]; + yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]); + break; + case 115: + this.$ = $$[$0 - 4]; + yy.updateLink([$$[$0 - 2]], $$[$0]); + break; + case 116: + this.$ = $$[$0 - 4]; + yy.updateLink($$[$0 - 2], $$[$0]); + break; + case 117: + this.$ = $$[$0 - 8]; + yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]); + yy.updateLink([$$[$0 - 6]], $$[$0]); + break; + case 118: + this.$ = $$[$0 - 8]; + yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]); + yy.updateLink($$[$0 - 6], $$[$0]); + break; + case 119: + this.$ = $$[$0 - 6]; + yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]); + break; + case 120: + this.$ = $$[$0 - 6]; + yy.updateLinkInterpolate($$[$0 - 4], $$[$0]); + break; + case 121: + case 123: + this.$ = [$$[$0]]; + break; + case 122: + case 124: + $$[$0 - 2].push($$[$0]); + this.$ = $$[$0 - 2]; + break; + case 126: + this.$ = $$[$0 - 1] + $$[$0]; + break; + case 174: + this.$ = $$[$0]; + break; + case 175: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + case 177: + this.$ = $$[$0 - 1] + "" + $$[$0]; + 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: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: $Vx, 15: 53, 18: 56 }, o($Vy, [2, 3]), o($Vy, [2, 4]), o($Vy, [2, 5]), o($Vy, [2, 6]), o($Vy, [2, 7]), o($Vy, [2, 8]), { 8: $Vz, 9: $VA, 11: $VB, 21: 58, 39: 59, 70: 63, 73: [1, 64], 75: [1, 65] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 66 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 67 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 68 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 69 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 70 }, { 8: $Vz, 9: $VA, 10: [1, 71], 11: $VB, 21: 72 }, o($Vy, [2, 36]), { 35: [1, 73] }, { 37: [1, 74] }, o($Vy, [2, 39]), o($VC, [2, 46], { 18: 75, 10: $Vx }), { 10: [1, 76] }, { 10: [1, 77] }, { 10: [1, 78] }, { 10: [1, 79] }, { 14: $VD, 42: $VE, 58: $VF, 77: [1, 83], 86: $VG, 92: [1, 80], 94: [1, 81], 98: 82, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, o($Vy, [2, 178]), o($Vy, [2, 179]), o($Vy, [2, 180]), o($Vy, [2, 181]), o($VO, [2, 47]), o($VO, [2, 49], { 44: [1, 96] }), o($VP, [2, 67], { 110: 109, 29: [1, 97], 42: $Vd, 46: [1, 98], 48: [1, 99], 50: [1, 100], 52: [1, 101], 54: [1, 102], 56: [1, 103], 58: $Ve, 61: [1, 104], 63: [1, 105], 65: [1, 106], 66: [1, 107], 68: [1, 108], 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($VQ, [2, 174]), o($VQ, [2, 135]), o($VQ, [2, 136]), o($VQ, [2, 137]), o($VQ, [2, 138]), o($VQ, [2, 139]), o($VQ, [2, 140]), o($VQ, [2, 141]), o($VQ, [2, 142]), o($VQ, [2, 143]), o($VQ, [2, 144]), o($VQ, [2, 145]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 110] }, o($VR, [2, 26], { 18: 111, 10: $Vx }), o($Vy, [2, 27]), { 40: 112, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vy, [2, 40]), o($Vy, [2, 41]), o($Vy, [2, 42]), o($VS, [2, 71], { 71: 113, 60: [1, 115], 72: [1, 114] }), { 74: 116, 76: 117, 77: [1, 118], 78: [1, 119], 113: $VT, 116: $VU }, o([42, 58, 60, 72, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 77]), o($Vy, [2, 28]), o($Vy, [2, 29]), o($Vy, [2, 30]), o($Vy, [2, 31]), o($Vy, [2, 32]), { 10: $VV, 12: $VW, 14: $VX, 27: $VY, 28: 122, 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 77: [1, 124], 78: [1, 125], 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 123, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Ve1, $V4, { 5: 148 }), o($Vy, [2, 37]), o($Vy, [2, 38]), o($VC, [2, 45], { 42: $Vf1 }), { 42: $Vd, 45: 150, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 99: [1, 151], 100: 152, 102: [1, 153] }, { 42: $Vd, 45: 154, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 42: $Vd, 45: 155, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 100], { 10: [1, 156], 93: [1, 157] }), { 77: [1, 158] }, o($Vg1, [2, 108], { 117: 160, 10: [1, 159], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 110], { 10: [1, 161] }), o($Vh1, [2, 176]), o($Vh1, [2, 163]), o($Vh1, [2, 164]), o($Vh1, [2, 165]), o($Vh1, [2, 166]), o($Vh1, [2, 167]), o($Vh1, [2, 168]), o($Vh1, [2, 169]), o($Vh1, [2, 170]), o($Vh1, [2, 171]), o($Vh1, [2, 172]), o($Vh1, [2, 173]), { 42: $Vd, 45: 162, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 30: 163, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 171, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 173, 48: [1, 172], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 174, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 175, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 176, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 106: [1, 177] }, { 30: 178, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 179, 63: [1, 180], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 181, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 182, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 183, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VQ, [2, 175]), o($V3, [2, 20]), o($VR, [2, 25]), o($VC, [2, 43], { 18: 184, 10: $Vx }), o($VS, [2, 68], { 10: [1, 185] }), { 10: [1, 186] }, { 30: 187, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 75: [1, 188], 76: 189, 113: $VT, 116: $VU }, o($Vo1, [2, 73]), o($Vo1, [2, 75]), o($Vo1, [2, 76]), o($Vo1, [2, 161]), o($Vo1, [2, 162]), { 8: $Vz, 9: $VA, 10: $VV, 11: $VB, 12: $VW, 14: $VX, 21: 191, 27: $VY, 29: [1, 190], 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 192, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Vp1, [2, 94]), o($Vp1, [2, 96]), o($Vp1, [2, 97]), o($Vp1, [2, 150]), o($Vp1, [2, 151]), o($Vp1, [2, 152]), o($Vp1, [2, 153]), o($Vp1, [2, 154]), o($Vp1, [2, 155]), o($Vp1, [2, 156]), o($Vp1, [2, 157]), o($Vp1, [2, 158]), o($Vp1, [2, 159]), o($Vp1, [2, 160]), o($Vp1, [2, 83]), o($Vp1, [2, 84]), o($Vp1, [2, 85]), o($Vp1, [2, 86]), o($Vp1, [2, 87]), o($Vp1, [2, 88]), o($Vp1, [2, 89]), o($Vp1, [2, 90]), o($Vp1, [2, 91]), o($Vp1, [2, 92]), o($Vp1, [2, 93]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 193], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vx, 18: 194 }, { 10: [1, 195], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 196] }, { 10: [1, 197], 103: [1, 198] }, o($Vq1, [2, 121]), { 10: [1, 199], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 200], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 77: [1, 201] }, o($Vg1, [2, 102], { 10: [1, 202] }), o($Vg1, [2, 104], { 10: [1, 203] }), { 77: [1, 204] }, o($Vh1, [2, 177]), { 77: [1, 205], 95: [1, 206] }, o($VO, [2, 50], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), { 31: [1, 207], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Vr1, [2, 79]), o($Vr1, [2, 81]), o($Vr1, [2, 82]), o($Vr1, [2, 146]), o($Vr1, [2, 147]), o($Vr1, [2, 148]), o($Vr1, [2, 149]), { 47: [1, 209], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 210, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 49: [1, 211], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 51: [1, 212], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 53: [1, 213], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 55: [1, 214], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 58: [1, 215] }, { 62: [1, 216], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 64: [1, 217], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 218, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 31: [1, 219], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 220], 69: [1, 221], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 223], 69: [1, 222], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VC, [2, 44], { 42: $Vf1 }), o($VS, [2, 70]), o($VS, [2, 69]), { 60: [1, 224], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VS, [2, 72]), o($Vo1, [2, 74]), { 30: 225, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Ve1, $V4, { 5: 226 }), o($Vp1, [2, 95]), o($Vy, [2, 35]), { 41: 227, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 228, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 239, 101: [1, 240], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 241, 101: [1, 242], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 102: [1, 243] }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 244, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 42: $Vd, 45: 245, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 101]), { 77: [1, 246] }, { 77: [1, 247], 95: [1, 248] }, o($Vg1, [2, 109]), o($Vg1, [2, 111], { 10: [1, 249] }), o($Vg1, [2, 112]), o($VP, [2, 51]), o($Vr1, [2, 80]), o($VP, [2, 52]), { 49: [1, 250], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 59]), o($VP, [2, 54]), o($VP, [2, 55]), o($VP, [2, 56]), { 106: [1, 251] }, o($VP, [2, 58]), o($VP, [2, 60]), { 64: [1, 252], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 62]), o($VP, [2, 63]), o($VP, [2, 65]), o($VP, [2, 64]), o($VP, [2, 66]), o([10, 42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 78]), { 31: [1, 253], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 254], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($VO, [2, 48]), o($Vg1, [2, 114], { 103: $VA1 }), o($VB1, [2, 123], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($VC1, [2, 125]), o($VC1, [2, 127]), o($VC1, [2, 128]), o($VC1, [2, 129]), o($VC1, [2, 130]), o($VC1, [2, 131]), o($VC1, [2, 132]), o($VC1, [2, 133]), o($VC1, [2, 134]), o($Vg1, [2, 115], { 103: $VA1 }), { 10: [1, 257] }, o($Vg1, [2, 116], { 103: $VA1 }), { 10: [1, 258] }, o($Vq1, [2, 122]), o($Vg1, [2, 98], { 103: $VA1 }), o($Vg1, [2, 99], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($Vg1, [2, 103]), o($Vg1, [2, 105], { 10: [1, 259] }), o($Vg1, [2, 106]), { 95: [1, 260] }, { 49: [1, 261] }, { 60: [1, 262] }, { 64: [1, 263] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 264 }, o($Vy, [2, 34]), { 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 104: 265, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VC1, [2, 126]), { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 266, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 267, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 95: [1, 268] }, o($Vg1, [2, 113]), o($VP, [2, 53]), { 30: 269, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 61]), o($Ve1, $V4, { 5: 270 }), o($VB1, [2, 124], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($Vg1, [2, 119], { 117: 160, 10: [1, 271], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 120], { 117: 160, 10: [1, 272], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 107]), { 31: [1, 273], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 274], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 275, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 276, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VP, [2, 57]), o($Vy, [2, 33]), o($Vg1, [2, 117], { 103: $VA1 }), o($Vg1, [2, 118], { 103: $VA1 })], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 34; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 36; + case 3: + this.popState(); + return "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: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 30: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 31: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 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: + this.popState(); + return 13; + case 39: + this.popState(); + return 14; + case 40: + this.popState(); + return 14; + case 41: + this.popState(); + return 14; + case 42: + this.popState(); + return 14; + case 43: + this.popState(); + return 14; + case 44: + this.popState(); + return 14; + case 45: + this.popState(); + return 14; + case 46: + this.popState(); + return 14; + case 47: + this.popState(); + return 14; + case 48: + this.popState(); + return 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: + this.popState(); + return 75; + case 62: + this.pushState("edgeText"); + return 73; + case 63: + return 116; + case 64: + this.popState(); + return 75; + case 65: + this.pushState("thickEdgeText"); + return 73; + case 66: + return 116; + case 67: + this.popState(); + return 75; + case 68: + this.pushState("dottedEdgeText"); + return 73; + case 69: + return 116; + case 70: + return 75; + case 71: + this.popState(); + return 51; + case 72: + return "TEXT"; + case 73: + this.pushState("ellipseText"); + return 50; + case 74: + this.popState(); + return 53; + case 75: + this.pushState("text"); + return 52; + case 76: + this.popState(); + return 55; + case 77: + this.pushState("text"); + return 54; + case 78: + return 56; + case 79: + this.pushState("text"); + return 65; + case 80: + this.popState(); + return 62; + case 81: + this.pushState("text"); + return 61; + case 82: + this.popState(); + return 47; + case 83: + this.pushState("text"); + return 46; + case 84: + this.popState(); + return 67; + case 85: + this.popState(); + return 69; + case 86: + return 114; + case 87: + this.pushState("trapText"); + return 66; + case 88: + this.pushState("trapText"); + return 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: + this.popState(); + return 60; + case 101: + this.pushState("text"); + return 60; + case 102: + this.popState(); + return 49; + case 103: + this.pushState("text"); + return 48; + case 104: + this.popState(); + return 31; + case 105: + this.pushState("text"); + return 29; + case 106: + this.popState(); + return 64; + case 107: + this.pushState("text"); + return 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": false }, "callbackname": { "rules": [8, 9, 10, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "href": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "click": { "rules": [15, 18, 27, 28, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dottedEdgeText": { "rules": [15, 18, 67, 69, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "thickEdgeText": { "rules": [15, 18, 64, 66, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "edgeText": { "rules": [15, 18, 61, 63, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "trapText": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 84, 85, 86, 87, 88, 101, 103, 105, 107], "inclusive": false }, "ellipseText": { "rules": [15, 18, 70, 71, 72, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "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": false }, "vertex": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "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": false }, "acc_descr_multiline": { "rules": [5, 6, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr": { "rules": [3, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_title": { "rules": [1, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "md_string": { "rules": [13, 14, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "string": { "rules": [15, 16, 17, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "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": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const MERMAID_DOM_ID_PREFIX = "flowchart-"; +let vertexCounter = 0; +let config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); +let vertices = {}; +let edges = []; +let classes = {}; +let subGraphs = []; +let subGraphLookup = {}; +let tooltips = {}; +let subCount = 0; +let firstGraphFlag = true; +let direction; +let version; +let funs = []; +const sanitizeText = (txt) => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, config); +const lookUpDomId = function(id) { + const vertexKeys = Object.keys(vertices); + for (const vertexKey of vertexKeys) { + if (vertices[vertexKey].id === id) { + return vertices[vertexKey].domId; + } + } + return id; +}; +const addVertex = function(_id, textObj, type, style, classes2, dir, props = {}) { + let txt; + let id = _id; + if (id === void 0) { + return; + } + if (id.trim().length === 0) { + return; + } + if (vertices[id] === void 0) { + vertices[id] = { + id, + labelType: "text", + domId: MERMAID_DOM_ID_PREFIX + id + "-" + vertexCounter, + styles: [], + classes: [] + }; + } + vertexCounter++; + if (textObj !== void 0) { + config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + txt = sanitizeText(textObj.text.trim()); + vertices[id].labelType = textObj.type; + if (txt[0] === '"' && txt[txt.length - 1] === '"') { + txt = txt.substring(1, txt.length - 1); + } + vertices[id].text = txt; + } else { + if (vertices[id].text === void 0) { + vertices[id].text = _id; + } + } + if (type !== void 0) { + vertices[id].type = type; + } + if (style !== void 0 && style !== null) { + style.forEach(function(s) { + vertices[id].styles.push(s); + }); + } + if (classes2 !== void 0 && classes2 !== null) { + classes2.forEach(function(s) { + vertices[id].classes.push(s); + }); + } + if (dir !== void 0) { + vertices[id].dir = dir; + } + if (vertices[id].props === void 0) { + vertices[id].props = props; + } else if (props !== void 0) { + Object.assign(vertices[id].props, props); + } +}; +const addSingleLink = function(_start, _end, type) { + let start = _start; + let end = _end; + const edge = { start, end, type: void 0, text: "", labelType: "text" }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 Got edge...", edge); + const linkTextObj = type.text; + if (linkTextObj !== void 0) { + edge.text = sanitizeText(linkTextObj.text.trim()); + if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') { + edge.text = edge.text.substring(1, edge.text.length - 1); + } + edge.labelType = linkTextObj.type; + } + if (type !== void 0) { + edge.type = type.type; + edge.stroke = type.stroke; + edge.length = type.length; + } + if ((edge == null ? void 0 : edge.length) > 10) { + edge.length = 10; + } + if (edges.length < (config.maxEdges ?? 500)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 pushing edge..."); + edges.push(edge); + } else { + throw new Error( + `Edge limit exceeded. ${edges.length} edges found, but the limit is ${config.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.` + ); + } +}; +const addLink = function(_start, _end, type) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("addLink (abc78)", _start, _end, type); + let i, j; + for (i = 0; i < _start.length; i++) { + for (j = 0; j < _end.length; j++) { + addSingleLink(_start[i], _end[j], type); + } + } +}; +const updateLinkInterpolate = function(positions, interp) { + positions.forEach(function(pos) { + if (pos === "default") { + edges.defaultInterpolate = interp; + } else { + edges[pos].interpolate = interp; + } + }); +}; +const updateLink = function(positions, style) { + positions.forEach(function(pos) { + if (pos >= edges.length) { + throw new Error( + `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)` + ); + } + if (pos === "default") { + edges.defaultStyle = style; + } else { + if (_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.isSubstringInArray("fill", style) === -1) { + style.push("fill:none"); + } + edges[pos].style = style; + } + }); +}; +const addClass = function(ids, style) { + ids.split(",").forEach(function(id) { + if (classes[id] === void 0) { + classes[id] = { id, styles: [], textStyles: [] }; + } + if (style !== void 0 && style !== null) { + style.forEach(function(s) { + if (s.match("color")) { + const newStyle = s.replace("fill", "bgFill").replace("color", "fill"); + classes[id].textStyles.push(newStyle); + } + classes[id].styles.push(s); + }); + } + }); +}; +const setDirection = function(dir) { + direction = dir; + if (direction.match(/.*/)) { + direction = "LR"; + } + if (direction.match(/.*v/)) { + direction = "TB"; + } + if (direction === "TD") { + direction = "TB"; + } +}; +const setClass = function(ids, className) { + ids.split(",").forEach(function(_id) { + let id = _id; + if (vertices[id] !== void 0) { + vertices[id].classes.push(className); + } + if (subGraphLookup[id] !== void 0) { + subGraphLookup[id].classes.push(className); + } + }); +}; +const setTooltip = function(ids, tooltip) { + ids.split(",").forEach(function(id) { + if (tooltip !== void 0) { + tooltips[version === "gen-1" ? lookUpDomId(id) : id] = sanitizeText(tooltip); + } + }); +}; +const setClickFun = function(id, functionName, functionArgs) { + let domId = lookUpDomId(id); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i = 0; i < argList.length; i++) { + let item = argList[i].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i] = item; + } + } + if (argList.length === 0) { + argList.push(id); + } + if (vertices[id] !== void 0) { + vertices[id].haveCallback = true; + funs.push(function() { + const elem = document.querySelector(`[id="${domId}"]`); + if (elem !== null) { + elem.addEventListener( + "click", + function() { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList); + }, + false + ); + } + }); + } +}; +const setLink = function(ids, linkStr, target) { + ids.split(",").forEach(function(id) { + if (vertices[id] !== void 0) { + vertices[id].link = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config); + vertices[id].linkTarget = target; + } + }); + setClass(ids, "clickable"); +}; +const getTooltip = function(id) { + if (tooltips.hasOwnProperty(id)) { + return tooltips[id]; + } + return void 0; +}; +const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id) { + setClickFun(id, functionName, functionArgs); + }); + setClass(ids, "clickable"); +}; +const bindFunctions = function(element) { + funs.forEach(function(fun) { + fun(element); + }); +}; +const getDirection = function() { + return direction.trim(); +}; +const getVertices = function() { + return vertices; +}; +const getEdges = function() { + return edges; +}; +const getClasses = function() { + return classes; +}; +const setupToolTips = function(element) { + let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(".mermaidTooltip"); + if ((tooltipElem._groups || tooltipElem)[0][0] === null) { + tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); + } + const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(element).select("svg"); + const nodes = svg.selectAll("g.node"); + nodes.on("mouseover", function() { + const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); + const title = el.attr("title"); + if (title === null) { + return; + } + const rect = this.getBoundingClientRect(); + tooltipElem.transition().duration(200).style("opacity", ".9"); + tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px"); + tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
")); + el.classed("hover", true); + }).on("mouseout", function() { + tooltipElem.transition().duration(500).style("opacity", 0); + const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); + el.classed("hover", false); + }); +}; +funs.push(setupToolTips); +const clear = function(ver = "gen-1") { + vertices = {}; + classes = {}; + edges = []; + funs = [setupToolTips]; + subGraphs = []; + subGraphLookup = {}; + subCount = 0; + tooltips = {}; + firstGraphFlag = true; + version = ver; + config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.v)(); +}; +const setGen = (ver) => { + version = ver || "gen-2"; +}; +const defaultStyle = function() { + return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"; +}; +const addSubGraph = function(_id, list, _title) { + let id = _id.text.trim(); + let title = _title.text; + if (_id === _title && _title.text.match(/\s/)) { + id = void 0; + } + function uniq(a) { + const prims = { boolean: {}, number: {}, string: {} }; + const objs = []; + let dir2; + const nodeList2 = a.filter(function(item) { + const type = typeof item; + if (item.stmt && item.stmt === "dir") { + dir2 = item.value; + return false; + } + if (item.trim() === "") { + return false; + } + if (type in prims) { + return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true; + } else { + return objs.includes(item) ? false : objs.push(item); + } + }); + return { nodeList: nodeList2, dir: dir2 }; + } + let nodeList = []; + const { nodeList: nl, dir } = uniq(nodeList.concat.apply(nodeList, list)); + nodeList = nl; + if (version === "gen-1") { + for (let i = 0; i < nodeList.length; i++) { + nodeList[i] = lookUpDomId(nodeList[i]); + } + } + id = id || "subGraph" + subCount; + title = title || ""; + title = sanitizeText(title); + subCount = subCount + 1; + const subGraph = { + id, + nodes: nodeList, + title: title.trim(), + classes: [], + dir, + labelType: _title.type + }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir); + subGraph.nodes = makeUniq(subGraph, subGraphs).nodes; + subGraphs.push(subGraph); + subGraphLookup[id] = subGraph; + return id; +}; +const getPosForId = function(id) { + for (const [i, subGraph] of subGraphs.entries()) { + if (subGraph.id === id) { + return i; + } + } + return -1; +}; +let secCount = -1; +const posCrossRef = []; +const indexNodes2 = function(id, pos) { + const nodes = subGraphs[pos].nodes; + secCount = secCount + 1; + if (secCount > 2e3) { + return; + } + posCrossRef[secCount] = pos; + if (subGraphs[pos].id === id) { + return { + result: true, + count: 0 + }; + } + let count = 0; + let posCount = 1; + while (count < nodes.length) { + const childPos = getPosForId(nodes[count]); + if (childPos >= 0) { + const res = indexNodes2(id, childPos); + if (res.result) { + return { + result: true, + count: posCount + res.count + }; + } else { + posCount = posCount + res.count; + } + } + count = count + 1; + } + return { + result: false, + count: posCount + }; +}; +const getDepthFirstPos = function(pos) { + return posCrossRef[pos]; +}; +const indexNodes = function() { + secCount = -1; + if (subGraphs.length > 0) { + indexNodes2("none", subGraphs.length - 1); + } +}; +const getSubGraphs = function() { + return subGraphs; +}; +const firstGraph = () => { + if (firstGraphFlag) { + firstGraphFlag = false; + return true; + } + return false; +}; +const destructStartLink = (_str) => { + let str = _str.trim(); + let type = "arrow_open"; + switch (str[0]) { + case "<": + type = "arrow_point"; + str = str.slice(1); + break; + case "x": + type = "arrow_cross"; + str = str.slice(1); + break; + case "o": + type = "arrow_circle"; + str = str.slice(1); + break; + } + let stroke = "normal"; + if (str.includes("=")) { + stroke = "thick"; + } + if (str.includes(".")) { + stroke = "dotted"; + } + return { type, stroke }; +}; +const countChar = (char, str) => { + const length = str.length; + let count = 0; + for (let i = 0; i < length; ++i) { + if (str[i] === char) { + ++count; + } + } + return count; +}; +const destructEndLink = (_str) => { + const str = _str.trim(); + let line = str.slice(0, -1); + let type = "arrow_open"; + switch (str.slice(-1)) { + case "x": + type = "arrow_cross"; + if (str[0] === "x") { + type = "double_" + type; + line = line.slice(1); + } + break; + case ">": + type = "arrow_point"; + if (str[0] === "<") { + type = "double_" + type; + line = line.slice(1); + } + break; + case "o": + type = "arrow_circle"; + if (str[0] === "o") { + type = "double_" + type; + line = line.slice(1); + } + break; + } + let stroke = "normal"; + let length = line.length - 1; + if (line[0] === "=") { + stroke = "thick"; + } + if (line[0] === "~") { + stroke = "invisible"; + } + let dots = countChar(".", line); + if (dots) { + stroke = "dotted"; + length = dots; + } + return { type, stroke, length }; +}; +const destructLink = (_str, _startStr) => { + const info = destructEndLink(_str); + let startInfo; + if (_startStr) { + startInfo = destructStartLink(_startStr); + if (startInfo.stroke !== info.stroke) { + return { type: "INVALID", stroke: "INVALID" }; + } + if (startInfo.type === "arrow_open") { + startInfo.type = info.type; + } else { + if (startInfo.type !== info.type) { + return { type: "INVALID", stroke: "INVALID" }; + } + startInfo.type = "double_" + startInfo.type; + } + if (startInfo.type === "double_arrow") { + startInfo.type = "double_arrow_point"; + } + startInfo.length = info.length; + return startInfo; + } + return info; +}; +const exists = (allSgs, _id) => { + let res = false; + allSgs.forEach((sg) => { + const pos = sg.nodes.indexOf(_id); + if (pos >= 0) { + res = true; + } + }); + return res; +}; +const makeUniq = (sg, allSubgraphs) => { + const res = []; + sg.nodes.forEach((_id, pos) => { + if (!exists(allSubgraphs, _id)) { + res.push(sg.nodes[pos]); + } + }); + return { nodes: res }; +}; +const lex = { + firstGraph +}; +const flowDb = { + defaultConfig: () => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.K.flowchart, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.g, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.a, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.b, + addVertex, + lookUpDomId, + addLink, + updateLinkInterpolate, + updateLink, + addClass, + setDirection, + setClass, + setTooltip, + getTooltip, + setClickEvent, + setLink, + bindFunctions, + getDirection, + getVertices, + getEdges, + getClasses, + clear, + setGen, + defaultStyle, + addSubGraph, + getDepthFirstPos, + indexNodes, + getSubGraphs, + destructLink, + lex, + exists, + makeUniq, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.t +}; +const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addClass, + addLink, + addSingleLink, + addSubGraph, + addVertex, + bindFunctions, + clear, + default: flowDb, + defaultStyle, + destructLink, + firstGraph, + getClasses, + getDepthFirstPos, + getDirection, + getEdges, + getSubGraphs, + getTooltip, + getVertices, + indexNodes, + lex, + lookUpDomId, + setClass, + setClickEvent, + setDirection, + setGen, + setLink, + updateLink, + updateLinkInterpolate +}, Symbol.toStringTag, { value: "Module" })); + + + +/***/ }), + +/***/ 9502: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + diagram: () => (/* binding */ diagram) +}); + +// EXTERNAL MODULE: ./node_modules/mermaid/dist/flowDb-4b19a42f.js +var flowDb_4b19a42f = __webpack_require__(6216); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js +var graphlib = __webpack_require__(697); +// EXTERNAL MODULE: ./node_modules/d3/src/index.js + 197 modules +var src = __webpack_require__(6312); +// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-f47111a7.js + 8 modules +var mermaid_f47111a7 = __webpack_require__(6257); +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js +var defaults = __webpack_require__(3068); +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + 64 modules +var dagre = __webpack_require__(1176); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/dagre-js/util.js +var util = __webpack_require__(2933); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/arrows.js + + + + +var arrows = { + normal, + vee, + undirected, +}; + +function setArrows(value) { + arrows = value; +} + +function normal(parent, id, edge, type) { + var marker = parent + .append('marker') + .attr('id', id) + .attr('viewBox', '0 0 10 10') + .attr('refX', 9) + .attr('refY', 5) + .attr('markerUnits', 'strokeWidth') + .attr('markerWidth', 8) + .attr('markerHeight', 6) + .attr('orient', 'auto'); + + var path = marker + .append('path') + .attr('d', 'M 0 0 L 10 5 L 0 10 z') + .style('stroke-width', 1) + .style('stroke-dasharray', '1,0'); + util/* applyStyle */.AV(path, edge[type + 'Style']); + if (edge[type + 'Class']) { + path.attr('class', edge[type + 'Class']); + } +} + +function vee(parent, id, edge, type) { + var marker = parent + .append('marker') + .attr('id', id) + .attr('viewBox', '0 0 10 10') + .attr('refX', 9) + .attr('refY', 5) + .attr('markerUnits', 'strokeWidth') + .attr('markerWidth', 8) + .attr('markerHeight', 6) + .attr('orient', 'auto'); + + var path = marker + .append('path') + .attr('d', 'M 0 0 L 10 5 L 0 10 L 4 5 z') + .style('stroke-width', 1) + .style('stroke-dasharray', '1,0'); + util/* applyStyle */.AV(path, edge[type + 'Style']); + if (edge[type + 'Class']) { + path.attr('class', edge[type + 'Class']); + } +} + +function undirected(parent, id, edge, type) { + var marker = parent + .append('marker') + .attr('id', id) + .attr('viewBox', '0 0 10 10') + .attr('refX', 9) + .attr('refY', 5) + .attr('markerUnits', 'strokeWidth') + .attr('markerWidth', 8) + .attr('markerHeight', 6) + .attr('orient', 'auto'); + + var path = marker + .append('path') + .attr('d', 'M 0 5 L 10 5') + .style('stroke-width', 1) + .style('stroke-dasharray', '1,0'); + util/* applyStyle */.AV(path, edge[type + 'Style']); + if (edge[type + 'Class']) { + path.attr('class', edge[type + 'Class']); + } +} + +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/dagre-js/label/add-html-label.js +var add_html_label = __webpack_require__(646); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/label/add-svg-label.js + + + + +function addSVGLabel(root, node) { + var domNode = root; + + domNode.node().appendChild(node.label); + + util/* applyStyle */.AV(domNode, node.labelStyle); + + return domNode; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/label/add-text-label.js + + + + +/* + * Attaches a text label to the specified root. Handles escape sequences. + */ +function addTextLabel(root, node) { + var domNode = root.append('text'); + + var lines = processEscapeSequences(node.label).split('\n'); + for (var i = 0; i < lines.length; i++) { + domNode + .append('tspan') + .attr('xml:space', 'preserve') + .attr('dy', '1em') + .attr('x', '1') + .text(lines[i]); + } + + util/* applyStyle */.AV(domNode, node.labelStyle); + + return domNode; +} + +function processEscapeSequences(text) { + var newText = ''; + var escaped = false; + var ch; + for (var i = 0; i < text.length; ++i) { + ch = text[i]; + if (escaped) { + switch (ch) { + case 'n': + newText += '\n'; + break; + default: + newText += ch; + } + escaped = false; + } else if (ch === '\\') { + escaped = true; + } else { + newText += ch; + } + } + return newText; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/label/add-label.js + + + + + + +function addLabel(root, node, location) { + var label = node.label; + var labelSvg = root.append('g'); + + // Allow the label to be a string, a function that returns a DOM element, or + // a DOM element itself. + if (node.labelType === 'svg') { + addSVGLabel(labelSvg, node); + } else if (typeof label !== 'string' || node.labelType === 'html') { + (0,add_html_label/* addHtmlLabel */.H)(labelSvg, node); + } else { + addTextLabel(labelSvg, node); + } + + var labelBBox = labelSvg.node().getBBox(); + var y; + switch (location) { + case 'top': + y = -node.height / 2; + break; + case 'bottom': + y = node.height / 2 - labelBBox.height; + break; + default: + y = -labelBBox.height / 2; + } + labelSvg.attr('transform', 'translate(' + -labelBBox.width / 2 + ',' + y + ')'); + + return labelSvg; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/create-clusters.js + + + + + + +var createClusters = function (selection, g) { + var clusters = g.nodes().filter(function (v) { + return util/* isSubgraph */.De(g, v); + }); + var svgClusters = selection.selectAll('g.cluster').data(clusters, function (v) { + return v; + }); + + util/* applyTransition */.c$(svgClusters.exit(), g).style('opacity', 0).remove(); + + var enterSelection = svgClusters + .enter() + .append('g') + .attr('class', 'cluster') + .attr('id', function (v) { + var node = g.node(v); + return node.id; + }) + .style('opacity', 0) + .each(function (v) { + var node = g.node(v); + var thisGroup = src/* select */.Ltv(this); + src/* select */.Ltv(this).append('rect'); + var labelGroup = thisGroup.append('g').attr('class', 'label'); + addLabel(labelGroup, node, node.clusterLabelPos); + }); + + svgClusters = svgClusters.merge(enterSelection); + + svgClusters = util/* applyTransition */.c$(svgClusters, g).style('opacity', 1); + + svgClusters.selectAll('rect').each(function (c) { + var node = g.node(c); + var domCluster = src/* select */.Ltv(this); + util/* applyStyle */.AV(domCluster, node.style); + }); + + return svgClusters; +}; + +function setCreateClusters(value) { + createClusters = value; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/create-edge-labels.js + + + + + + + +let createEdgeLabels = function (selection, g) { + var svgEdgeLabels = selection + .selectAll('g.edgeLabel') + .data(g.edges(), function (e) { + return util/* edgeToId */.gh(e); + }) + .classed('update', true); + + svgEdgeLabels.exit().remove(); + svgEdgeLabels.enter().append('g').classed('edgeLabel', true).style('opacity', 0); + + svgEdgeLabels = selection.selectAll('g.edgeLabel'); + + svgEdgeLabels.each(function (e) { + var root = src/* select */.Ltv(this); + root.select('.label').remove(); + var edge = g.edge(e); + var label = addLabel(root, g.edge(e), 0).classed('label', true); + var bbox = label.node().getBBox(); + + if (edge.labelId) { + label.attr('id', edge.labelId); + } + if (!has/* default */.A(edge, 'width')) { + edge.width = bbox.width; + } + if (!has/* default */.A(edge, 'height')) { + edge.height = bbox.height; + } + }); + + var exitSelection; + + if (svgEdgeLabels.exit) { + exitSelection = svgEdgeLabels.exit(); + } else { + exitSelection = svgEdgeLabels.selectAll(null); // empty selection + } + + util/* applyTransition */.c$(exitSelection, g).style('opacity', 0).remove(); + + return svgEdgeLabels; +}; + +function setCreateEdgeLabels(value) { + createEdgeLabels = value; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js +var uniqueId = __webpack_require__(5664); +// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules +var range = __webpack_require__(1395); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-node.js + + +function intersectNode(node, point) { + return node.intersect(point); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/create-edge-paths.js + + + + + + + +var createEdgePaths = function (selection, g, arrows) { + var previousPaths = selection + .selectAll('g.edgePath') + .data(g.edges(), function (e) { + return util/* edgeToId */.gh(e); + }) + .classed('update', true); + + var newPaths = enter(previousPaths, g); + exit(previousPaths, g); + + var svgPaths = previousPaths.merge !== undefined ? previousPaths.merge(newPaths) : previousPaths; + util/* applyTransition */.c$(svgPaths, g).style('opacity', 1); + + // Save DOM element in the path group, and set ID and class + svgPaths.each(function (e) { + var domEdge = src/* select */.Ltv(this); + var edge = g.edge(e); + edge.elem = this; + + if (edge.id) { + domEdge.attr('id', edge.id); + } + + util/* applyClass */.nh( + domEdge, + edge['class'], + (domEdge.classed('update') ? 'update ' : '') + 'edgePath' + ); + }); + + svgPaths.selectAll('path.path').each(function (e) { + var edge = g.edge(e); + edge.arrowheadId = uniqueId/* default */.A('arrowhead'); + + var domEdge = src/* select */.Ltv(this) + .attr('marker-end', function () { + return 'url(' + makeFragmentRef(location.href, edge.arrowheadId) + ')'; + }) + .style('fill', 'none'); + + util/* applyTransition */.c$(domEdge, g).attr('d', function (e) { + return calcPoints(g, e); + }); + + util/* applyStyle */.AV(domEdge, edge.style); + }); + + svgPaths.selectAll('defs *').remove(); + svgPaths.selectAll('defs').each(function (e) { + var edge = g.edge(e); + var arrowhead = arrows[edge.arrowhead]; + arrowhead(src/* select */.Ltv(this), edge.arrowheadId, edge, 'arrowhead'); + }); + + return svgPaths; +}; + +function setCreateEdgePaths(value) { + createEdgePaths = value; +} + +function makeFragmentRef(url, fragmentId) { + var baseUrl = url.split('#')[0]; + return baseUrl + '#' + fragmentId; +} + +function calcPoints(g, e) { + var edge = g.edge(e); + var tail = g.node(e.v); + var head = g.node(e.w); + var points = edge.points.slice(1, edge.points.length - 1); + points.unshift(intersectNode(tail, points[0])); + points.push(intersectNode(head, points[points.length - 1])); + + return createLine(edge, points); +} + +function createLine(edge, points) { + // @ts-expect-error + var line = (src/* line */.n8j || src/* svg */.JWy.line)() + .x(function (d) { + return d.x; + }) + .y(function (d) { + return d.y; + }); + + (line.curve || line.interpolate)(edge.curve); + + return line(points); +} + +function getCoords(elem) { + var bbox = elem.getBBox(); + var matrix = elem.ownerSVGElement + .getScreenCTM() + .inverse() + .multiply(elem.getScreenCTM()) + .translate(bbox.width / 2, bbox.height / 2); + return { x: matrix.e, y: matrix.f }; +} + +function enter(svgPaths, g) { + var svgPathsEnter = svgPaths.enter().append('g').attr('class', 'edgePath').style('opacity', 0); + svgPathsEnter + .append('path') + .attr('class', 'path') + .attr('d', function (e) { + var edge = g.edge(e); + var sourceElem = g.node(e.v).elem; + var points = range/* default */.A(edge.points.length).map(function () { + return getCoords(sourceElem); + }); + return createLine(edge, points); + }); + svgPathsEnter.append('defs'); + return svgPathsEnter; +} + +function exit(svgPaths, g) { + var svgPathExit = svgPaths.exit(); + util/* applyTransition */.c$(svgPathExit, g).style('opacity', 0).remove(); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules +var pick = __webpack_require__(1942); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/create-nodes.js + + + + + + + +var createNodes = function (selection, g, shapes) { + var simpleNodes = g.nodes().filter(function (v) { + return !util/* isSubgraph */.De(g, v); + }); + var svgNodes = selection + .selectAll('g.node') + .data(simpleNodes, function (v) { + return v; + }) + .classed('update', true); + + svgNodes.exit().remove(); + + svgNodes.enter().append('g').attr('class', 'node').style('opacity', 0); + + svgNodes = selection.selectAll('g.node'); + + svgNodes.each(function (v) { + var node = g.node(v); + var thisGroup = src/* select */.Ltv(this); + util/* applyClass */.nh( + thisGroup, + node['class'], + (thisGroup.classed('update') ? 'update ' : '') + 'node' + ); + + thisGroup.select('g.label').remove(); + var labelGroup = thisGroup.append('g').attr('class', 'label'); + var labelDom = addLabel(labelGroup, node); + var shape = shapes[node.shape]; + var bbox = pick/* default */.A(labelDom.node().getBBox(), 'width', 'height'); + + node.elem = this; + + if (node.id) { + thisGroup.attr('id', node.id); + } + if (node.labelId) { + labelGroup.attr('id', node.labelId); + } + + if (has/* default */.A(node, 'width')) { + bbox.width = node.width; + } + if (has/* default */.A(node, 'height')) { + bbox.height = node.height; + } + + bbox.width += node.paddingLeft + node.paddingRight; + bbox.height += node.paddingTop + node.paddingBottom; + labelGroup.attr( + 'transform', + 'translate(' + + (node.paddingLeft - node.paddingRight) / 2 + + ',' + + (node.paddingTop - node.paddingBottom) / 2 + + ')' + ); + + var root = src/* select */.Ltv(this); + root.select('.label-container').remove(); + var shapeSvg = shape(root, bbox, node).classed('label-container', true); + util/* applyStyle */.AV(shapeSvg, node.style); + + var shapeBBox = shapeSvg.node().getBBox(); + node.width = shapeBBox.width; + node.height = shapeBBox.height; + }); + + var exitSelection; + + if (svgNodes.exit) { + exitSelection = svgNodes.exit(); + } else { + exitSelection = svgNodes.selectAll(null); // empty selection + } + + util/* applyTransition */.c$(exitSelection, g).style('opacity', 0).remove(); + + return svgNodes; +}; + +function setCreateNodes(value) { + createNodes = value; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/position-clusters.js + + + + + +function positionClusters(selection, g) { + var created = selection.filter(function () { + return !src/* select */.Ltv(this).classed('update'); + }); + + function translate(v) { + var node = g.node(v); + return 'translate(' + node.x + ',' + node.y + ')'; + } + + created.attr('transform', translate); + + util/* applyTransition */.c$(selection, g).style('opacity', 1).attr('transform', translate); + + util/* applyTransition */.c$(created.selectAll('rect'), g) + .attr('width', function (v) { + return g.node(v).width; + }) + .attr('height', function (v) { + return g.node(v).height; + }) + .attr('x', function (v) { + var node = g.node(v); + return -node.width / 2; + }) + .attr('y', function (v) { + var node = g.node(v); + return -node.height / 2; + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/position-edge-labels.js + + + + + + +function positionEdgeLabels(selection, g) { + var created = selection.filter(function () { + return !src/* select */.Ltv(this).classed('update'); + }); + + function translate(e) { + var edge = g.edge(e); + return has/* default */.A(edge, 'x') ? 'translate(' + edge.x + ',' + edge.y + ')' : ''; + } + + created.attr('transform', translate); + + util/* applyTransition */.c$(selection, g).style('opacity', 1).attr('transform', translate); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/position-nodes.js + + + + + +function positionNodes(selection, g) { + var created = selection.filter(function () { + return !src/* select */.Ltv(this).classed('update'); + }); + + function translate(v) { + var node = g.node(v); + return 'translate(' + node.x + ',' + node.y + ')'; + } + + created.attr('transform', translate); + + util/* applyTransition */.c$(selection, g).style('opacity', 1).attr('transform', translate); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-ellipse.js + + +function intersectEllipse(node, rx, ry, point) { + // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html + + var cx = node.x; + var cy = node.y; + + var px = cx - point.x; + var py = cy - point.y; + + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + + var dx = Math.abs((rx * ry * px) / det); + if (point.x < cx) { + dx = -dx; + } + var dy = Math.abs((rx * ry * py) / det); + if (point.y < cy) { + dy = -dy; + } + + return { x: cx + dx, y: cy + dy }; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-circle.js + + + + +function intersectCircle(node, rx, point) { + return intersectEllipse(node, rx, rx, point); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-line.js + + +/* + * Returns the point at which two lines, p and q, intersect or returns + * undefined if they do not intersect. + */ +function intersectLine(p1, p2, q1, q2) { + // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994, + // p7 and p473. + + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x, y; + + // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x + + // b1 y + c1 = 0. + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; + + // Compute r3 and r4. + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; + + // Check signs of r3 and r4. If both point 3 and point 4 lie on + // same side of line 1, the line segments do not intersect. + if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { + return /*DONT_INTERSECT*/; + } + + // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0 + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; + + // Compute r1 and r2 + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; + + // Check signs of r1 and r2. If both point 1 and point 2 lie + // on same side of second line segment, the line segments do + // not intersect. + if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { + return /*DONT_INTERSECT*/; + } + + // Line segments intersect: compute intersection point. + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return /*COLLINEAR*/; + } + + offset = Math.abs(denom / 2); + + // The denom/2 is to get rounding instead of truncating. It + // is added or subtracted to the numerator, depending upon the + // sign of the numerator. + num = b1 * c2 - b2 * c1; + x = num < 0 ? (num - offset) / denom : (num + offset) / denom; + + num = a2 * c1 - a1 * c2; + y = num < 0 ? (num - offset) / denom : (num + offset) / denom; + + return { x: x, y: y }; +} + +function sameSign(r1, r2) { + return r1 * r2 > 0; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-polygon.js + + + + +/* + * Returns the point ({x, y}) at which the point argument intersects with the + * node argument assuming that it has the shape specified by polygon. + */ +function intersectPolygon(node, polyPoints, point) { + var x1 = node.x; + var y1 = node.y; + + var intersections = []; + + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + polyPoints.forEach(function (entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + + var left = x1 - node.width / 2 - minX; + var top = y1 - node.height / 2 - minY; + + for (var i = 0; i < polyPoints.length; i++) { + var p1 = polyPoints[i]; + var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; + var intersect = intersectLine( + node, + point, + { x: left + p1.x, y: top + p1.y }, + { x: left + p2.x, y: top + p2.y } + ); + if (intersect) { + intersections.push(intersect); + } + } + + if (!intersections.length) { + console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node); + return node; + } + + if (intersections.length > 1) { + // More intersections, find the one nearest to edge end point + intersections.sort(function (p, q) { + var pdx = p.x - point.x; + var pdy = p.y - point.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + + var qdx = q.x - point.x; + var qdy = q.y - point.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); + } + return intersections[0]; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/intersect/intersect-rect.js + + +function intersectRect(node, point) { + var x = node.x; + var y = node.y; + + // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes + var dx = point.x - x; + var dy = point.y - y; + var w = node.width / 2; + var h = node.height / 2; + + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : (h * dx) / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } + sx = w; + sy = dx === 0 ? 0 : (w * dy) / dx; + } + + return { x: x + sx, y: y + sy }; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/shapes.js + + + + + + + +var shapes = { + rect, + ellipse, + circle, + diamond, +}; + +function setShapes(value) { + shapes = value; +} + +function rect(parent, bbox, node) { + var shapeSvg = parent + .insert('rect', ':first-child') + .attr('rx', node.rx) + .attr('ry', node.ry) + .attr('x', -bbox.width / 2) + .attr('y', -bbox.height / 2) + .attr('width', bbox.width) + .attr('height', bbox.height); + + node.intersect = function (point) { + return intersectRect(node, point); + }; + + return shapeSvg; +} + +function ellipse(parent, bbox, node) { + var rx = bbox.width / 2; + var ry = bbox.height / 2; + var shapeSvg = parent + .insert('ellipse', ':first-child') + .attr('x', -bbox.width / 2) + .attr('y', -bbox.height / 2) + .attr('rx', rx) + .attr('ry', ry); + + node.intersect = function (point) { + return intersectEllipse(node, rx, ry, point); + }; + + return shapeSvg; +} + +function circle(parent, bbox, node) { + var r = Math.max(bbox.width, bbox.height) / 2; + var shapeSvg = parent + .insert('circle', ':first-child') + .attr('x', -bbox.width / 2) + .attr('y', -bbox.height / 2) + .attr('r', r); + + node.intersect = function (point) { + return intersectCircle(node, r, point); + }; + + return shapeSvg; +} + +// Circumscribe an ellipse for the bounding box with a diamond shape. I derived +// the function to calculate the diamond shape from: +// http://mathforum.org/kb/message.jspa?messageID=3750236 +function diamond(parent, bbox, node) { + var w = (bbox.width * Math.SQRT2) / 2; + var h = (bbox.height * Math.SQRT2) / 2; + var points = [ + { x: 0, y: -h }, + { x: -w, y: 0 }, + { x: 0, y: h }, + { x: w, y: 0 }, + ]; + var shapeSvg = parent.insert('polygon', ':first-child').attr( + 'points', + points + .map(function (p) { + return p.x + ',' + p.y; + }) + .join(' ') + ); + + node.intersect = function (p) { + return intersectPolygon(node, points, p); + }; + + return shapeSvg; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre-js/render.js + + + + + + + + + + + + + + + +// This design is based on http://bost.ocks.org/mike/chart/. +function render() { + var fn = function (svg, g) { + preProcessGraph(g); + + var outputGroup = createOrSelectGroup(svg, 'output'); + var clustersGroup = createOrSelectGroup(outputGroup, 'clusters'); + var edgePathsGroup = createOrSelectGroup(outputGroup, 'edgePaths'); + var edgeLabels = createEdgeLabels(createOrSelectGroup(outputGroup, 'edgeLabels'), g); + var nodes = createNodes(createOrSelectGroup(outputGroup, 'nodes'), g, shapes); + + (0,dagre/* layout */.Zp)(g); + + positionNodes(nodes, g); + positionEdgeLabels(edgeLabels, g); + createEdgePaths(edgePathsGroup, g, arrows); + + var clusters = createClusters(clustersGroup, g); + positionClusters(clusters, g); + + postProcessGraph(g); + }; + + fn.createNodes = function (value) { + if (!arguments.length) return createNodes; + setCreateNodes(value); + return fn; + }; + + fn.createClusters = function (value) { + if (!arguments.length) return createClusters; + setCreateClusters(value); + return fn; + }; + + fn.createEdgeLabels = function (value) { + if (!arguments.length) return createEdgeLabels; + setCreateEdgeLabels(value); + return fn; + }; + + fn.createEdgePaths = function (value) { + if (!arguments.length) return createEdgePaths; + setCreateEdgePaths(value); + return fn; + }; + + fn.shapes = function (value) { + if (!arguments.length) return shapes; + setShapes(value); + return fn; + }; + + fn.arrows = function (value) { + if (!arguments.length) return arrows; + setArrows(value); + return fn; + }; + + return fn; +} + +var NODE_DEFAULT_ATTRS = { + paddingLeft: 10, + paddingRight: 10, + paddingTop: 10, + paddingBottom: 10, + rx: 0, + ry: 0, + shape: 'rect', +}; + +var EDGE_DEFAULT_ATTRS = { + arrowhead: 'normal', + curve: src/* curveLinear */.lUB, +}; + +function preProcessGraph(g) { + g.nodes().forEach(function (v) { + var node = g.node(v); + if (!has/* default */.A(node, 'label') && !g.children(v).length) { + node.label = v; + } + + if (has/* default */.A(node, 'paddingX')) { + defaults/* default */.A(node, { + paddingLeft: node.paddingX, + paddingRight: node.paddingX, + }); + } + + if (has/* default */.A(node, 'paddingY')) { + defaults/* default */.A(node, { + paddingTop: node.paddingY, + paddingBottom: node.paddingY, + }); + } + + if (has/* default */.A(node, 'padding')) { + defaults/* default */.A(node, { + paddingLeft: node.padding, + paddingRight: node.padding, + paddingTop: node.padding, + paddingBottom: node.padding, + }); + } + + defaults/* default */.A(node, NODE_DEFAULT_ATTRS); + + forEach/* default */.A(['paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom'], function (k) { + node[k] = Number(node[k]); + }); + + // Save dimensions for restore during post-processing + if (has/* default */.A(node, 'width')) { + node._prevWidth = node.width; + } + if (has/* default */.A(node, 'height')) { + node._prevHeight = node.height; + } + }); + + g.edges().forEach(function (e) { + var edge = g.edge(e); + if (!has/* default */.A(edge, 'label')) { + edge.label = ''; + } + defaults/* default */.A(edge, EDGE_DEFAULT_ATTRS); + }); +} + +function postProcessGraph(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + + // Restore original dimensions + if (has/* default */.A(node, '_prevWidth')) { + node.width = node._prevWidth; + } else { + delete node.width; + } + + if (has/* default */.A(node, '_prevHeight')) { + node.height = node._prevHeight; + } else { + delete node.height; + } + + delete node._prevWidth; + delete node._prevHeight; + }); +} + +function createOrSelectGroup(root, name) { + var selection = root.select('g.' + name); + if (selection.empty()) { + selection = root.append('g').attr('class', name); + } + return selection; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/index.js + + + + + + + +// EXTERNAL MODULE: ./node_modules/mermaid/dist/styles-3ed67cfa.js +var styles_3ed67cfa = __webpack_require__(8696); +// EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js +var dayjs_min = __webpack_require__(4353); +// EXTERNAL MODULE: ./node_modules/@braintree/sanitize-url/dist/index.js +var dist = __webpack_require__(6750); +// EXTERNAL MODULE: ./node_modules/dompurify/dist/purify.es.mjs +var purify_es = __webpack_require__(9418); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/json.js +var json = __webpack_require__(4075); +;// CONCATENATED MODULE: ./node_modules/mermaid/dist/flowDiagram-5540d9b9.js + + + + + + + + + + + + + + + + + + + + + + + + + +function question(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const s = (w + h) * 0.9; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + const shapeSvg = insertPolygonShape(parent, s, s, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function hexagon(parent, bbox, node) { + const f = 4; + const h = bbox.height; + const m = h / f; + const w = bbox.width + 2 * m; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function rect_left_inv_arrow(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: -h / 2, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function lean_right(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function lean_left(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w + h / 6, y: 0 }, + { x: w - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function trapezoid(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w + 2 * h / 6, y: 0 }, + { x: w - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function inv_trapezoid(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function rect_right_inv_arrow(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: 0, y: 0 }, + { x: w + h / 2, y: 0 }, + { x: w, y: -h / 2 }, + { x: w + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function stadium(parent, bbox, node) { + const h = bbox.height; + const w = bbox.width + h / 4; + const shapeSvg = parent.insert("rect", ":first-child").attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); + node.intersect = function(point) { + return intersectRect(node, point); + }; + return shapeSvg; +} +function subroutine(parent, bbox, node) { + const w = bbox.width; + const h = bbox.height; + const points = [ + { x: 0, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w + 8, y: 0 }, + { x: w + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const shapeSvg = insertPolygonShape(parent, w, h, points); + node.intersect = function(point) { + return intersectPolygon(node, points, point); + }; + return shapeSvg; +} +function cylinder(parent, bbox, node) { + const w = bbox.width; + const rx = w / 2; + const ry = rx / (2.5 + w / 50); + const h = bbox.height + ry; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; + const shapeSvg = parent.attr("label-offset-y", ry).insert("path", ":first-child").attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); + node.intersect = function(point) { + const pos = intersectRect(node, point); + const x = pos.x - node.x; + if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { + let y = ry * ry * (1 - x * x / (rx * rx)); + if (y != 0) { + y = Math.sqrt(y); + } + y = ry - y; + if (point.y - node.y > 0) { + y = -y; + } + pos.y += y; + } + return pos; + }; + return shapeSvg; +} +function addToRender(render2) { + render2.shapes().question = question; + render2.shapes().hexagon = hexagon; + render2.shapes().stadium = stadium; + render2.shapes().subroutine = subroutine; + render2.shapes().cylinder = cylinder; + render2.shapes().rect_left_inv_arrow = rect_left_inv_arrow; + render2.shapes().lean_right = lean_right; + render2.shapes().lean_left = lean_left; + render2.shapes().trapezoid = trapezoid; + render2.shapes().inv_trapezoid = inv_trapezoid; + render2.shapes().rect_right_inv_arrow = rect_right_inv_arrow; +} +function addToRenderV2(addShape) { + addShape({ question }); + addShape({ hexagon }); + addShape({ stadium }); + addShape({ subroutine }); + addShape({ cylinder }); + addShape({ rect_left_inv_arrow }); + addShape({ lean_right }); + addShape({ lean_left }); + addShape({ trapezoid }); + addShape({ inv_trapezoid }); + addShape({ rect_right_inv_arrow }); +} +function insertPolygonShape(parent, w, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); +} +const flowChartShapes = { + addToRender, + addToRenderV2 +}; +const conf = {}; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + conf[key] = cnf[key]; + } +}; +const addVertices = async function(vert, g, svgId, root, _doc, diagObj) { + const svg = !root ? (0,src/* select */.Ltv)(`[id="${svgId}"]`) : root.select(`[id="${svgId}"]`); + const doc = !_doc ? document : _doc; + const keys = Object.keys(vert); + for (const id of keys) { + const vertex = vert[id]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + const styles = (0,mermaid_f47111a7.k)(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + let vertexNode; + if ((0,mermaid_f47111a7.m)((0,mermaid_f47111a7.c)().flowchart.htmlLabels)) { + const node = { + label: await (0,mermaid_f47111a7.r)( + vertexText.replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell:disable-line + (s) => `` + ), + (0,mermaid_f47111a7.c)() + ) + }; + vertexNode = (0,add_html_label/* addHtmlLabel */.H)(svg, node).node(); + vertexNode.parentNode.removeChild(vertexNode); + } else { + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", styles.labelStyle.replace("color:", "fill:")); + const rows = vertexText.split(mermaid_f47111a7.e.lineBreakRegex); + for (const row of rows) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "1"); + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + vertexNode = svgLabel; + } + let radius = 0; + let _shape = ""; + switch (vertex.type) { + case "round": + radius = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + default: + _shape = "rect"; + } + mermaid_f47111a7.l.warn("Adding node", vertex.id, vertex.domId); + g.setNode(diagObj.db.lookUpDomId(vertex.id), { + labelType: "svg", + labelStyle: styles.labelStyle, + shape: _shape, + label: vertexNode, + rx: radius, + ry: radius, + class: classStr, + style: styles.style, + id: diagObj.db.lookUpDomId(vertex.id) + }); + } +}; +const addEdges = async function(edges, g, diagObj) { + let cnt = 0; + let defaultStyle; + let defaultLabelStyle; + if (edges.defaultStyle !== void 0) { + const defaultStyles = (0,mermaid_f47111a7.k)(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + for (const edge of edges) { + cnt++; + const linkId = "L-" + edge.start + "-" + edge.end; + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = {}; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + let style = ""; + let labelStyle = ""; + if (edge.style !== void 0) { + const styles = (0,mermaid_f47111a7.k)(edge.style); + style = styles.style; + labelStyle = styles.labelStyle; + } else { + switch (edge.stroke) { + case "normal": + style = "fill:none"; + if (defaultStyle !== void 0) { + style = defaultStyle; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + break; + case "dotted": + style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + style = " stroke-width: 3.5px;fill:none"; + break; + } + } + edgeData.style = style; + edgeData.labelStyle = labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = (0,mermaid_f47111a7.n)(edge.interpolate, src/* curveLinear */.lUB); + } else if (edges.defaultInterpolate !== void 0) { + edgeData.curve = (0,mermaid_f47111a7.n)(edges.defaultInterpolate, src/* curveLinear */.lUB); + } else { + edgeData.curve = (0,mermaid_f47111a7.n)(conf.curve, src/* curveLinear */.lUB); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + if ((0,mermaid_f47111a7.m)((0,mermaid_f47111a7.c)().flowchart.htmlLabels)) { + edgeData.labelType = "html"; + edgeData.label = `${await (0,mermaid_f47111a7.r)( + edge.text.replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell:disable-line + (s) => `` + ), + (0,mermaid_f47111a7.c)() + )}`; + } else { + edgeData.labelType = "text"; + edgeData.label = edge.text.replace(mermaid_f47111a7.e.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + } + } + edgeData.id = linkId; + edgeData.class = linkNameStart + " " + linkNameEnd; + edgeData.minlen = edge.length || 1; + g.setEdge(diagObj.db.lookUpDomId(edge.start), diagObj.db.lookUpDomId(edge.end), edgeData, cnt); + } +}; +const getClasses = function(text, diagObj) { + mermaid_f47111a7.l.info("Extracting classes"); + return diagObj.db.getClasses(); +}; +const draw = async function(text, id, _version, diagObj) { + mermaid_f47111a7.l.info("Drawing flowchart"); + const { securityLevel, flowchart: conf2 } = (0,mermaid_f47111a7.c)(); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,src/* select */.Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,src/* select */.Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,src/* select */.Ltv)("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + let dir = diagObj.db.getDirection(); + if (dir === void 0) { + dir = "TD"; + } + const nodeSpacing = conf2.nodeSpacing || 50; + const rankSpacing = conf2.rankSpacing || 50; + const g = new graphlib/* Graph */.T({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let subG; + const subGraphs = diagObj.db.getSubGraphs(); + for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) { + subG = subGraphs[i2]; + diagObj.db.addVertex(subG.id, subG.title, "group", void 0, subG.classes); + } + const vert = diagObj.db.getVertices(); + mermaid_f47111a7.l.warn("Get vertices", vert); + const edges = diagObj.db.getEdges(); + let i = 0; + for (i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + (0,src/* selectAll */.Ubm)("cluster").append("text"); + for (let j = 0; j < subG.nodes.length; j++) { + mermaid_f47111a7.l.warn( + "Setting subgraph", + subG.nodes[j], + diagObj.db.lookUpDomId(subG.nodes[j]), + diagObj.db.lookUpDomId(subG.id) + ); + g.setParent(diagObj.db.lookUpDomId(subG.nodes[j]), diagObj.db.lookUpDomId(subG.id)); + } + } + await addVertices(vert, g, id, root, doc, diagObj); + await addEdges(edges, g, diagObj); + const render$1 = new render(); + flowChartShapes.addToRender(render$1); + render$1.arrows().none = function normal(parent, id2, edge, type) { + const marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + const path = marker.append("path").attr("d", "M 0 0 L 0 0 L 0 0 z"); + (0,util/* applyStyle */.AV)(path, edge[type + "Style"]); + }; + render$1.arrows().normal = function normal(parent, id2) { + const marker = parent.append("marker").attr("id", id2).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"); + marker.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"); + }; + const svg = root.select(`[id="${id}"]`); + const element = root.select("#" + id + " g"); + render$1(element, g); + element.selectAll("g.node").attr("title", function() { + return diagObj.db.getTooltip(this.id); + }); + diagObj.db.indexNodes("subGraph" + i); + for (i = 0; i < subGraphs.length; i++) { + subG = subGraphs[i]; + if (subG.title !== "undefined") { + const clusterRects = doc.querySelectorAll( + "#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"] rect' + ); + const clusterEl = doc.querySelectorAll( + "#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"]' + ); + const xPos = clusterRects[0].x.baseVal.value; + const yPos = clusterRects[0].y.baseVal.value; + const _width = clusterRects[0].width.baseVal.value; + const cluster = (0,src/* select */.Ltv)(clusterEl[0]); + const te = cluster.select(".label"); + te.attr("transform", `translate(${xPos + _width / 2}, ${yPos + 14})`); + te.attr("id", id + "Text"); + for (let j = 0; j < subG.classes.length; j++) { + clusterEl[0].classList.add(subG.classes[j]); + } + } + } + if (!conf2.htmlLabels) { + const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect.setAttribute("rx", 0); + rect.setAttribute("ry", 0); + rect.setAttribute("width", dim.width); + rect.setAttribute("height", dim.height); + label.insertBefore(rect, label.firstChild); + } + } + (0,mermaid_f47111a7.o)(g, svg, conf2.diagramPadding, conf2.useMaxWidth); + const keys = Object.keys(vert); + keys.forEach(function(key) { + const vertex = vert[key]; + if (vertex.link) { + const node = root.select("#" + id + ' [id="' + diagObj.db.lookUpDomId(key) + '"]'); + if (node) { + const link = doc.createElementNS("http://www.w3.org/2000/svg", "a"); + link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" ")); + link.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link); + link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"); + if (securityLevel === "sandbox") { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top"); + } else if (vertex.linkTarget) { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget); + } + const linkNode = node.insert(function() { + return link; + }, ":first-child"); + const shape = node.select(".label-container"); + if (shape) { + linkNode.append(function() { + return shape.node(); + }); + } + const label = node.select(".label"); + if (label) { + linkNode.append(function() { + return label.node(); + }); + } + } + } + }); +}; +const flowRenderer = { + setConf, + addVertices, + addEdges, + getClasses, + draw +}; +const diagram = { + parser: flowDb_4b19a42f.p, + db: flowDb_4b19a42f.f, + renderer: styles_3ed67cfa.f, + styles: styles_3ed67cfa.a, + init: (cnf) => { + if (!cnf.flowchart) { + cnf.flowchart = {}; + } + cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + flowRenderer.setConf(cnf.flowchart); + flowDb_4b19a42f.f.clear(); + flowDb_4b19a42f.f.setGen("gen-1"); + } +}; + + + +/***/ }), + +/***/ 2746: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ r: () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1176); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4075); +/* harmony import */ var _edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8747); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); +/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3791); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6312); + + + + + + + +let clusterDb = {}; +let descendants = {}; +let parents = {}; +const clear$1 = () => { + descendants = {}; + parents = {}; + clusterDb = {}; +}; +const isDescendant = (id, ancestorId) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("In isDescendant", ancestorId, " ", id, " = ", descendants[ancestorId].includes(id)); + if (descendants[ancestorId].includes(id)) { + return true; + } + return false; +}; +const edgeInCluster = (edge, clusterId) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Descendants of ", clusterId, " is ", descendants[clusterId]); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge is ", edge); + if (edge.v === clusterId) { + return false; + } + if (edge.w === clusterId) { + return false; + } + if (!descendants[clusterId]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Tilt, ", clusterId, ",not in descendants"); + return false; + } + return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w); +}; +const copy = (clusterId, graph, newGraph, rootId) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Copying children of ", + clusterId, + "root", + rootId, + "data", + graph.node(clusterId), + rootId + ); + const nodes = graph.children(clusterId) || []; + if (clusterId !== rootId) { + nodes.push(clusterId); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes); + nodes.forEach((node) => { + if (graph.children(node).length > 0) { + copy(node, graph, newGraph, rootId); + } else { + const data = graph.node(node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("cp ", node, " to ", rootId, " with parent ", clusterId); + newGraph.setNode(node, data); + if (rootId !== graph.parent(node)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Setting parent", node, graph.parent(node)); + newGraph.setParent(node, graph.parent(node)); + } + if (clusterId !== rootId && node !== clusterId) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Setting parent", node, clusterId); + newGraph.setParent(node, clusterId); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( + "Not Setting parent for node=", + node, + "cluster!==rootId", + clusterId !== rootId, + "node!==clusterId", + node !== clusterId + ); + } + const edges = graph.edges(node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Copying Edges", edges); + edges.forEach((edge) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge", edge); + const data2 = graph.edge(edge.v, edge.w, edge.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge data", data2, rootId); + try { + if (edgeInCluster(edge, rootId)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Copying as ", edge.v, edge.w, data2, edge.name); + newGraph.setEdge(edge.v, edge.w, data2, edge.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0])); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info( + "Skipping copy of edge ", + edge.v, + "-->", + edge.w, + " rootId: ", + rootId, + " clusterId:", + clusterId + ); + } + } catch (e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error(e); + } + }); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Removing node", node); + graph.removeNode(node); + }); +}; +const extractDescendants = (id, graph) => { + const children = graph.children(id); + let res = [...children]; + for (const child of children) { + parents[child] = id; + res = [...res, ...extractDescendants(child, graph)]; + } + return res; +}; +const findNonClusterChild = (id, graph) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching", id); + const children = graph.children(id); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching children of id ", id, children); + if (children.length < 1) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("This is a valid node", id); + return id; + } + for (const child of children) { + const _id = findNonClusterChild(child, graph); + if (_id) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Found replacement for", id, " => ", _id); + return _id; + } + } +}; +const getAnchorId = (id) => { + if (!clusterDb[id]) { + return id; + } + if (!clusterDb[id].externalConnections) { + return id; + } + if (clusterDb[id]) { + return clusterDb[id].id; + } + return id; +}; +const adjustClustersAndEdges = (graph, depth) => { + if (!graph || depth > 10) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting out, no graph "); + return; + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting in, graph "); + } + graph.nodes().forEach(function(id) { + const children = graph.children(id); + if (children.length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Cluster identified", + id, + " Replacement id in edges: ", + findNonClusterChild(id, graph) + ); + descendants[id] = extractDescendants(id, graph); + clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) }; + } + }); + graph.nodes().forEach(function(id) { + const children = graph.children(id); + const edges = graph.edges(); + if (children.length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Cluster identified", id, descendants); + edges.forEach((edge) => { + if (edge.v !== id && edge.w !== id) { + const d1 = isDescendant(edge.v, id); + const d2 = isDescendant(edge.w, id); + if (d1 ^ d2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge: ", edge, " leaves cluster ", id); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Descendants of XXX ", id, ": ", descendants[id]); + clusterDb[id].externalConnections = true; + } + } + }); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster ", id, descendants); + } + }); + for (let id of Object.keys(clusterDb)) { + const nonClusterChild = clusterDb[id].id; + const parent = graph.parent(nonClusterChild); + if (parent !== id && clusterDb[parent] && !clusterDb[parent].externalConnections) { + clusterDb[id].id = parent; + } + } + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); + let v = e.v; + let w = e.w; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Fix XXX", + clusterDb, + "ids:", + e.v, + e.w, + "Translating: ", + clusterDb[e.v], + " --- ", + clusterDb[e.w] + ); + if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + const specialId = e.w + "---" + e.v; + graph.setNode(specialId, { + domId: specialId, + id: specialId, + labelStyle: "", + labelText: edge.label, + padding: 0, + shape: "labelRect", + style: "" + }); + const edge1 = structuredClone(edge); + const edge2 = structuredClone(edge); + edge1.label = ""; + edge1.arrowTypeEnd = "none"; + edge2.label = ""; + edge1.fromCluster = e.v; + edge2.toCluster = e.v; + graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special"); + graph.setEdge(specialId, w, edge2, e.name + "-cyclic-special"); + } else if (clusterDb[e.v] || clusterDb[e.w]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + if (v !== e.v) { + const parent = graph.parent(v); + clusterDb[parent].externalConnections = true; + edge.fromCluster = e.v; + } + if (w !== e.w) { + const parent = graph.parent(w); + clusterDb[parent].externalConnections = true; + edge.toCluster = e.w; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fix Replacing with XXX", v, w, e.name); + graph.setEdge(v, w, edge, e.name); + } + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Adjusted Graph", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + extractor(graph, 0); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace(clusterDb); +}; +const extractor = (graph, depth) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("extractor - ", depth, dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), graph.children("D")); + if (depth > 10) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error("Bailing out"); + return; + } + let nodes = graph.nodes(); + let hasChildren = false; + for (const node of nodes) { + const children = graph.children(node); + hasChildren = hasChildren || children.length > 0; + } + if (!hasChildren) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Done, no node has children", graph.nodes()); + return; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Nodes = ", nodes, depth); + for (const node of nodes) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( + "Extracting node", + node, + clusterDb, + clusterDb[node] && !clusterDb[node].externalConnections, + !graph.parent(node), + graph.node(node), + graph.children("D"), + " Depth ", + depth + ); + if (!clusterDb[node]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster", node, depth); + } else if (!clusterDb[node].externalConnections && // !graph.parent(node) && + graph.children(node) && graph.children(node).length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Cluster without external connections, without a parent and with children", + node, + depth + ); + const graphSettings = graph.graph(); + let dir = graphSettings.rankdir === "TB" ? "LR" : "TB"; + if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) { + dir = clusterDb[node].clusterData.dir; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing dir", clusterDb[node].clusterData.dir, dir); + } + const clusterGraph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + // Todo: set proper spacing + nodesep: 50, + ranksep: 50, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Old graph before copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + copy(node, graph, clusterGraph, node); + graph.setNode(node, { + clusterNode: true, + id: node, + clusterData: clusterDb[node].clusterData, + labelText: clusterDb[node].labelText, + graph: clusterGraph + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New graph after copy node: (", node, ")", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(clusterGraph)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Old graph after copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Cluster ** ", + node, + " **not meeting the criteria !externalConnections:", + !clusterDb[node].externalConnections, + " no parent: ", + !graph.parent(node), + " children ", + graph.children(node) && graph.children(node).length > 0, + graph.children("D"), + depth + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(clusterDb); + } + } + nodes = graph.nodes(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New list of nodes", nodes); + for (const node of nodes) { + const data = graph.node(node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(" Now next level", node, data); + if (data.clusterNode) { + extractor(data.graph, depth + 1); + } + } +}; +const sorter = (graph, nodes) => { + if (nodes.length === 0) { + return []; + } + let result = Object.assign(nodes); + nodes.forEach((node) => { + const children = graph.children(node); + const sorted = sorter(graph, children); + result = [...result, ...sorted]; + }); + return result; +}; +const sortNodesByHierarchy = (graph) => sorter(graph, graph.children()); +const rect = (parent, node) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Creating subgraph rect for ", node.id, node); + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + const shapeSvg = parent.insert("g").attr("class", "cluster" + (node.class ? " " + node.class : "")).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const useHtmlLabels = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const text = node.labelType === "markdown" ? (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_5__.a)(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild((0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); + let bbox = text.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const padding = 0 * node.padding; + const halfPadding = padding / 2; + const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width; + if (node.width <= bbox.width + padding) { + node.diff = (bbox.width - node.width) / 2 - node.padding / 2; + } else { + node.diff = -node.padding / 2; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Data ", node, JSON.stringify(node)); + rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding); + const { subGraphTitleTopMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); + if (useHtmlLabels) { + label.attr( + "transform", + // This puts the label on top of the box instead of inside it + `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` + ); + } else { + label.attr( + "transform", + // This puts the label on top of the box instead of inside it + `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` + ); + } + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const noteGroup = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", node.width + padding).attr("height", node.height + padding).attr("fill", "none"); + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const roundedWithTitle = (parent, node) => { + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const innerRect = shapeSvg.append("rect"); + const text = label.node().appendChild((0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); + let bbox = text.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + bbox = text.getBBox(); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width; + if (node.width <= bbox.width + node.padding) { + node.diff = (bbox.width + node.padding * 0 - node.width) / 2; + } else { + node.diff = -node.padding / 2; + } + rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding); + innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3); + const { subGraphTitleTopMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); + label.attr( + "transform", + `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 - node.padding / 3 + ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels) ? 5 : 3) + subGraphTitleTopMargin})` + ); + const rectBox = rect2.node().getBBox(); + node.height = rectBox.height; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const divider = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + rect2.attr("class", "divider").attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2).attr("width", node.width + padding).attr("height", node.height + padding); + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.diff = -node.padding / 2; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const shapes = { rect, roundedWithTitle, noteGroup, divider }; +let clusterElems = {}; +const insertCluster = (elem, node) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Inserting cluster"); + const shape = node.shape || "rect"; + clusterElems[node.id] = shapes[shape](elem, node); +}; +const clear = () => { + clusterElems = {}; +}; +const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph in recursive render: XXX", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), parentCluster); + const dir = graph.graph().rankdir; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Dir in recursive render - dir:", dir); + const elem = _elem.insert("g").attr("class", "root"); + if (!graph.nodes()) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("No nodes found for", graph); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Recursive render XXX", graph.nodes()); + } + if (graph.edges().length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Recursive edges", graph.edge(graph.edges()[0])); + } + const clusters = elem.insert("g").attr("class", "clusters"); + const edgePaths = elem.insert("g").attr("class", "edgePaths"); + const edgeLabels = elem.insert("g").attr("class", "edgeLabels"); + const nodes = elem.insert("g").attr("class", "nodes"); + await Promise.all( + graph.nodes().map(async function(v) { + const node = graph.node(v); + if (parentCluster !== void 0) { + const data = JSON.parse(JSON.stringify(parentCluster.clusterData)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Setting data for cluster XXX (", v, ") ", data, parentCluster); + graph.setNode(parentCluster.id, data); + if (!graph.parent(v)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Setting parent", v, parentCluster.id); + graph.setParent(v, parentCluster.id, data); + } + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v))); + if (node && node.clusterNode) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster identified", v, node.width, graph.node(v)); + const o = await recursiveRender( + nodes, + node.graph, + diagramType, + id, + graph.node(v), + siteConfig + ); + const newEl = o.elem; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.u)(node, newEl); + node.diff = o.diff || 0; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node bounds (abc123)", v, node, node.width, node.x, node.y); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.s)(newEl, node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Recursive render complete ", newEl, node); + } else { + if (graph.children(v).length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster - the non recursive path XXX", v, node.id, node, graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(findNonClusterChild(node.id, graph)); + clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node }; + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node - the non recursive path", v, node.id, node); + await (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.e)(nodes, graph.node(v), dir); + } + } + }) + ); + graph.edges().forEach(function(e) { + const edge = graph.edge(e.v, e.w, e.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e))); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Fix", clusterDb, "ids:", e.v, e.w, "Translating: ", clusterDb[e.v], clusterDb[e.w]); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.f)(edgeLabels, edge); + }); + graph.edges().forEach(function(e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("### Layout ###"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(graph); + (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__/* .layout */ .Zp)(graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph after layout:", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + let diff = 0; + const { subGraphTitleTotalMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); + sortNodesByHierarchy(graph).forEach(function(v) { + const node = graph.node(v); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Position " + v + ": " + JSON.stringify(graph.node(v))); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info( + "Position " + v + ": (" + node.x, + "," + node.y, + ") width: ", + node.width, + " height: ", + node.height + ); + if (node && node.clusterNode) { + node.y += subGraphTitleTotalMargin; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); + } else { + if (graph.children(v).length > 0) { + node.height += subGraphTitleTotalMargin; + insertCluster(clusters, node); + clusterDb[node.id].node = node; + } else { + node.y += subGraphTitleTotalMargin / 2; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); + } + } + }); + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge); + edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2); + const paths = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.h)(edgePaths, e, edge, clusterDb, diagramType, graph, id); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.j)(edge, paths); + }); + graph.nodes().forEach(function(v) { + const n = graph.node(v); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(v, n.type, n.diff); + if (n.type === "group") { + diff = n.diff; + } + }); + return { elem, diff }; +}; +const render = async (elem, graph, markers, diagramType, id) => { + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.a)(elem, markers, diagramType, id); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.b)(); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.d)(); + clear(); + clear$1(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph at first:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); + adjustClustersAndEdges(graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph after:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + await recursiveRender(elem, graph, diagramType, id, void 0, siteConfig); +}; + + + +/***/ }), + +/***/ 8696: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ a: () => (/* binding */ flowStyles), +/* harmony export */ f: () => (/* binding */ flowRendererV2) +/* harmony export */ }); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(697); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6312); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6257); +/* harmony import */ var _index_fc10efb0_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2746); +/* harmony import */ var dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(646); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5937); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5582); + + + + + + +const conf = {}; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + conf[key] = cnf[key]; + } +}; +const addVertices = async function(vert, g, svgId, root, doc, diagObj) { + const svg = root.select(`[id="${svgId}"]`); + const keys = Object.keys(vert); + for (const id of keys) { + const vertex = vert[id]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + classStr = classStr + " flowchart-label"; + const styles = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.k)(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + let vertexNode; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("vertex", vertex, vertex.labelType); + if (vertex.labelType === "markdown") { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("vertex", vertex, vertex.labelType); + } else { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.htmlLabels)) { + const node = { + label: vertexText + }; + vertexNode = (0,dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_3__/* .addHtmlLabel */ .H)(svg, node).node(); + vertexNode.parentNode.removeChild(vertexNode); + } else { + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", styles.labelStyle.replace("color:", "fill:")); + const rows = vertexText.split(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.e.lineBreakRegex); + for (const row of rows) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "1"); + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + vertexNode = svgLabel; + } + } + let radius = 0; + let _shape = ""; + switch (vertex.type) { + case "round": + radius = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + case "doublecircle": + _shape = "doublecircle"; + break; + default: + _shape = "rect"; + } + const labelText = await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.r)(vertexText, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)()); + g.setNode(vertex.id, { + labelStyle: styles.labelStyle, + shape: _shape, + labelText, + labelType: vertex.labelType, + rx: radius, + ry: radius, + class: classStr, + style: styles.style, + id: vertex.id, + link: vertex.link, + linkTarget: vertex.linkTarget, + tooltip: diagObj.db.getTooltip(vertex.id) || "", + domId: diagObj.db.lookUpDomId(vertex.id), + haveCallback: vertex.haveCallback, + width: vertex.type === "group" ? 500 : void 0, + dir: vertex.dir, + type: vertex.type, + props: vertex.props, + padding: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.padding + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("setNode", { + labelStyle: styles.labelStyle, + labelType: vertex.labelType, + shape: _shape, + labelText, + rx: radius, + ry: radius, + class: classStr, + style: styles.style, + id: vertex.id, + domId: diagObj.db.lookUpDomId(vertex.id), + width: vertex.type === "group" ? 500 : void 0, + type: vertex.type, + dir: vertex.dir, + props: vertex.props, + padding: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.padding + }); + } +}; +const addEdges = async function(edges, g, diagObj) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 edges = ", edges); + let cnt = 0; + let linkIdCnt = {}; + let defaultStyle; + let defaultLabelStyle; + if (edges.defaultStyle !== void 0) { + const defaultStyles = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.k)(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + for (const edge of edges) { + cnt++; + const linkIdBase = "L-" + edge.start + "-" + edge.end; + if (linkIdCnt[linkIdBase] === void 0) { + linkIdCnt[linkIdBase] = 0; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } else { + linkIdCnt[linkIdBase]++; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } + let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = { style: "", labelStyle: "" }; + edgeData.minlen = edge.length || 1; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + edgeData.arrowTypeStart = "arrow_open"; + edgeData.arrowTypeEnd = "arrow_open"; + switch (edge.type) { + case "double_arrow_cross": + edgeData.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + edgeData.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + edgeData.arrowTypeStart = "arrow_point"; + case "arrow_point": + edgeData.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + edgeData.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + edgeData.arrowTypeEnd = "arrow_circle"; + break; + } + let style = ""; + let labelStyle = ""; + switch (edge.stroke) { + case "normal": + style = "fill:none;"; + if (defaultStyle !== void 0) { + style = defaultStyle; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + edgeData.thickness = "normal"; + edgeData.pattern = "solid"; + break; + case "dotted": + edgeData.thickness = "normal"; + edgeData.pattern = "dotted"; + edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + edgeData.thickness = "thick"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 3.5px;fill:none;"; + break; + case "invisible": + edgeData.thickness = "invisible"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 0;fill:none;"; + break; + } + if (edge.style !== void 0) { + const styles = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.k)(edge.style); + style = styles.style; + labelStyle = styles.labelStyle; + } + edgeData.style = edgeData.style += style; + edgeData.labelStyle = edgeData.labelStyle += labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.n)(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB); + } else if (edges.defaultInterpolate !== void 0) { + edgeData.curve = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.n)(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB); + } else { + edgeData.curve = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.n)(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + } + edgeData.labelType = edge.labelType; + edgeData.label = await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.r)(edge.text.replace(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.e.lineBreakRegex, "\n"), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)()); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + edgeData.id = linkId; + edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; + g.setEdge(edge.start, edge.end, edgeData, cnt); + } +}; +const getClasses = function(text, diagObj) { + return diagObj.db.getClasses(); +}; +const draw = async function(text, id, _version, diagObj) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Drawing flowchart"); + let dir = diagObj.db.getDirection(); + if (dir === void 0) { + dir = "TD"; + } + const { securityLevel, flowchart: conf2 } = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)(); + const nodeSpacing = conf2.nodeSpacing || 50; + const rankSpacing = conf2.rankSpacing || 50; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Graph */ .T({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 0, + marginy: 0 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let subG; + const subGraphs = diagObj.db.getSubGraphs(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Subgraphs - ", subGraphs); + for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) { + subG = subGraphs[i2]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Subgraph - ", subG); + diagObj.db.addVertex( + subG.id, + { text: subG.title, type: subG.labelType }, + "group", + void 0, + subG.classes, + subG.dir + ); + } + const vert = diagObj.db.getVertices(); + const edges = diagObj.db.getEdges(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Edges", edges); + let i = 0; + for (i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .selectAll */ .Ubm)("cluster").append("text"); + for (let j = 0; j < subG.nodes.length; j++) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Setting up subgraphs", subG.nodes[j], subG.id); + g.setParent(subG.nodes[j], subG.id); + } + } + await addVertices(vert, g, id, root, doc, diagObj); + await addEdges(edges, g); + const svg = root.select(`[id="${id}"]`); + const element = root.select("#" + id + " g"); + await (0,_index_fc10efb0_js__WEBPACK_IMPORTED_MODULE_4__.r)(element, g, ["point", "circle", "cross"], "flowchart", id); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.u.insertTitle(svg, "flowchartTitleText", conf2.titleTopMargin, diagObj.db.getDiagramTitle()); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.o)(g, svg, conf2.diagramPadding, conf2.useMaxWidth); + diagObj.db.indexNodes("subGraph" + i); + if (!conf2.htmlLabels) { + const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect.setAttribute("rx", 0); + rect.setAttribute("ry", 0); + rect.setAttribute("width", dim.width); + rect.setAttribute("height", dim.height); + label.insertBefore(rect, label.firstChild); + } + } + const keys = Object.keys(vert); + keys.forEach(function(key) { + const vertex = vert[key]; + if (vertex.link) { + const node = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#" + id + ' [id="' + key + '"]'); + if (node) { + const link = doc.createElementNS("http://www.w3.org/2000/svg", "a"); + link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" ")); + link.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link); + link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"); + if (securityLevel === "sandbox") { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top"); + } else if (vertex.linkTarget) { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget); + } + const linkNode = node.insert(function() { + return link; + }, ":first-child"); + const shape = node.select(".label-container"); + if (shape) { + linkNode.append(function() { + return shape.node(); + }); + } + const label = node.select(".label"); + if (label) { + linkNode.append(function() { + return label.node(); + }); + } + } + } + }); +}; +const flowRendererV2 = { + setConf, + addVertices, + addEdges, + getClasses, + draw +}; +const fade = (color, opacity) => { + const channel = khroma__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A; + const r = channel(color, "r"); + const g = channel(color, "g"); + const b = channel(color, "b"); + return khroma__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A(r, g, b, opacity); +}; +const getStyles = (options) => `.label { + font-family: ${options.fontFamily}; + color: ${options.nodeTextColor || options.textColor}; + } + .cluster-label text { + fill: ${options.titleColor}; + } + .cluster-label span,p { + color: ${options.titleColor}; + } + + .label text,span,p { + fill: ${options.nodeTextColor || options.textColor}; + color: ${options.nodeTextColor || options.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${options.edgeLabelBackground}; + fill: ${options.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${fade(options.edgeLabelBackground, 0.5)}; + // background-color: + } + + .cluster rect { + fill: ${options.clusterBkg}; + stroke: ${options.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${options.titleColor}; + } + + .cluster span,p { + color: ${options.titleColor}; + } + /* .cluster div { + color: ${options.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${options.fontFamily}; + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } +`; +const flowStyles = getStyles; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/130.97c3c1fe.js b/assets/js/130.97c3c1fe.js new file mode 100644 index 00000000..068e62dc --- /dev/null +++ b/assets/js/130.97c3c1fe.js @@ -0,0 +1,18475 @@ +"use strict"; +exports.id = 130; +exports.ids = [130]; +exports.modules = { + +/***/ 2130: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ katex) +/* harmony export */ }); +/** + * Lexing or parsing positional information for error reporting. + * This object is immutable. + */ +class SourceLocation { + // The + prefix indicates that these fields aren't writeable + // Lexer holding the input string. + // Start offset, zero-based inclusive. + // End offset, zero-based exclusive. + constructor(lexer, start, end) { + this.lexer = void 0; + this.start = void 0; + this.end = void 0; + this.lexer = lexer; + this.start = start; + this.end = end; + } + /** + * Merges two `SourceLocation`s from location providers, given they are + * provided in order of appearance. + * - Returns the first one's location if only the first is provided. + * - Returns a merged range of the first and the last if both are provided + * and their lexers match. + * - Otherwise, returns null. + */ + + + static range(first, second) { + if (!second) { + return first && first.loc; + } else if (!first || !first.loc || !second.loc || first.loc.lexer !== second.loc.lexer) { + return null; + } else { + return new SourceLocation(first.loc.lexer, first.loc.start, second.loc.end); + } + } + +} + +/** + * Interface required to break circular dependency between Token, Lexer, and + * ParseError. + */ + +/** + * The resulting token returned from `lex`. + * + * It consists of the token text plus some position information. + * The position information is essentially a range in an input string, + * but instead of referencing the bare input string, we refer to the lexer. + * That way it is possible to attach extra metadata to the input string, + * like for example a file name or similar. + * + * The position information is optional, so it is OK to construct synthetic + * tokens if appropriate. Not providing available position information may + * lead to degraded error reporting, though. + */ +class Token { + // don't expand the token + // used in \noexpand + constructor(text, // the text of this token + loc) { + this.text = void 0; + this.loc = void 0; + this.noexpand = void 0; + this.treatAsRelax = void 0; + this.text = text; + this.loc = loc; + } + /** + * Given a pair of tokens (this and endToken), compute a `Token` encompassing + * the whole input range enclosed by these two. + */ + + + range(endToken, // last token of the range, inclusive + text // the text of the newly constructed token + ) { + return new Token(text, SourceLocation.range(this, endToken)); + } + +} + +/** + * This is the ParseError class, which is the main error thrown by KaTeX + * functions when something has gone wrong. This is used to distinguish internal + * errors from errors in the expression that the user provided. + * + * If possible, a caller should provide a Token or ParseNode with information + * about where in the source string the problem occurred. + */ +class ParseError { + // Error start position based on passed-in Token or ParseNode. + // Length of affected text based on passed-in Token or ParseNode. + // The underlying error message without any context added. + constructor(message, // The error message + token // An object providing position information + ) { + this.name = void 0; + this.position = void 0; + this.length = void 0; + this.rawMessage = void 0; + var error = "KaTeX parse error: " + message; + var start; + var end; + var loc = token && token.loc; + + if (loc && loc.start <= loc.end) { + // If we have the input and a position, make the error a bit fancier + // Get the input + var input = loc.lexer.input; // Prepend some information + + start = loc.start; + end = loc.end; + + if (start === input.length) { + error += " at end of input: "; + } else { + error += " at position " + (start + 1) + ": "; + } // Underline token in question using combining underscores + + + var underlined = input.slice(start, end).replace(/[^]/g, "$&\u0332"); // Extract some context from the input and add it to the error + + var left; + + if (start > 15) { + left = "…" + input.slice(start - 15, start); + } else { + left = input.slice(0, start); + } + + var right; + + if (end + 15 < input.length) { + right = input.slice(end, end + 15) + "…"; + } else { + right = input.slice(end); + } + + error += left + underlined + right; + } // Some hackery to make ParseError a prototype of Error + // See http://stackoverflow.com/a/8460753 + // $FlowFixMe + + + var self = new Error(error); + self.name = "ParseError"; // $FlowFixMe + + self.__proto__ = ParseError.prototype; + self.position = start; + + if (start != null && end != null) { + self.length = end - start; + } + + self.rawMessage = message; + return self; + } + +} // $FlowFixMe More hackery + + +ParseError.prototype.__proto__ = Error.prototype; + +/** + * This file contains a list of utility functions which are useful in other + * files. + */ + +/** + * Return whether an element is contained in a list + */ +var contains = function contains(list, elem) { + return list.indexOf(elem) !== -1; +}; +/** + * Provide a default value if a setting is undefined + * NOTE: Couldn't use `T` as the output type due to facebook/flow#5022. + */ + + +var deflt = function deflt(setting, defaultIfUndefined) { + return setting === undefined ? defaultIfUndefined : setting; +}; // hyphenate and escape adapted from Facebook's React under Apache 2 license + + +var uppercase = /([A-Z])/g; + +var hyphenate = function hyphenate(str) { + return str.replace(uppercase, "-$1").toLowerCase(); +}; + +var ESCAPE_LOOKUP = { + "&": "&", + ">": ">", + "<": "<", + "\"": """, + "'": "'" +}; +var ESCAPE_REGEX = /[&><"']/g; +/** + * Escapes text to prevent scripting attacks. + */ + +function escape(text) { + return String(text).replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]); +} +/** + * Sometimes we want to pull out the innermost element of a group. In most + * cases, this will just be the group itself, but when ordgroups and colors have + * a single element, we want to pull that out. + */ + + +var getBaseElem = function getBaseElem(group) { + if (group.type === "ordgroup") { + if (group.body.length === 1) { + return getBaseElem(group.body[0]); + } else { + return group; + } + } else if (group.type === "color") { + if (group.body.length === 1) { + return getBaseElem(group.body[0]); + } else { + return group; + } + } else if (group.type === "font") { + return getBaseElem(group.body); + } else { + return group; + } +}; +/** + * TeXbook algorithms often reference "character boxes", which are simply groups + * with a single character in them. To decide if something is a character box, + * we find its innermost group, and see if it is a single character. + */ + + +var isCharacterBox = function isCharacterBox(group) { + var baseElem = getBaseElem(group); // These are all they types of groups which hold single characters + + return baseElem.type === "mathord" || baseElem.type === "textord" || baseElem.type === "atom"; +}; + +var assert = function assert(value) { + if (!value) { + throw new Error('Expected non-null, but got ' + String(value)); + } + + return value; +}; +/** + * Return the protocol of a URL, or "_relative" if the URL does not specify a + * protocol (and thus is relative), or `null` if URL has invalid protocol + * (so should be outright rejected). + */ + +var protocolFromUrl = function protocolFromUrl(url) { + // Check for possible leading protocol. + // https://url.spec.whatwg.org/#url-parsing strips leading whitespace + // (U+20) or C0 control (U+00-U+1F) characters. + // eslint-disable-next-line no-control-regex + var protocol = /^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(url); + + if (!protocol) { + return "_relative"; + } // Reject weird colons + + + if (protocol[2] !== ":") { + return null; + } // Reject invalid characters in scheme according to + // https://datatracker.ietf.org/doc/html/rfc3986#section-3.1 + + + if (!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(protocol[1])) { + return null; + } // Lowercase the protocol + + + return protocol[1].toLowerCase(); +}; +var utils = { + contains, + deflt, + escape, + hyphenate, + getBaseElem, + isCharacterBox, + protocolFromUrl +}; + +/* eslint no-console:0 */ +// TODO: automatically generate documentation +// TODO: check all properties on Settings exist +// TODO: check the type of a property on Settings matches +var SETTINGS_SCHEMA = { + displayMode: { + type: "boolean", + description: "Render math in display mode, which puts the math in " + "display style (so \\int and \\sum are large, for example), and " + "centers the math on the page on its own line.", + cli: "-d, --display-mode" + }, + output: { + type: { + enum: ["htmlAndMathml", "html", "mathml"] + }, + description: "Determines the markup language of the output.", + cli: "-F, --format " + }, + leqno: { + type: "boolean", + description: "Render display math in leqno style (left-justified tags)." + }, + fleqn: { + type: "boolean", + description: "Render display math flush left." + }, + throwOnError: { + type: "boolean", + default: true, + cli: "-t, --no-throw-on-error", + cliDescription: "Render errors (in the color given by --error-color) ins" + "tead of throwing a ParseError exception when encountering an error." + }, + errorColor: { + type: "string", + default: "#cc0000", + cli: "-c, --error-color ", + cliDescription: "A color string given in the format 'rgb' or 'rrggbb' " + "(no #). This option determines the color of errors rendered by the " + "-t option.", + cliProcessor: color => "#" + color + }, + macros: { + type: "object", + cli: "-m, --macro ", + cliDescription: "Define custom macro of the form '\\foo:expansion' (use " + "multiple -m arguments for multiple macros).", + cliDefault: [], + cliProcessor: (def, defs) => { + defs.push(def); + return defs; + } + }, + minRuleThickness: { + type: "number", + description: "Specifies a minimum thickness, in ems, for fraction lines," + " `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, " + "`\\hdashline`, `\\underline`, `\\overline`, and the borders of " + "`\\fbox`, `\\boxed`, and `\\fcolorbox`.", + processor: t => Math.max(0, t), + cli: "--min-rule-thickness ", + cliProcessor: parseFloat + }, + colorIsTextColor: { + type: "boolean", + description: "Makes \\color behave like LaTeX's 2-argument \\textcolor, " + "instead of LaTeX's one-argument \\color mode change.", + cli: "-b, --color-is-text-color" + }, + strict: { + type: [{ + enum: ["warn", "ignore", "error"] + }, "boolean", "function"], + description: "Turn on strict / LaTeX faithfulness mode, which throws an " + "error if the input uses features that are not supported by LaTeX.", + cli: "-S, --strict", + cliDefault: false + }, + trust: { + type: ["boolean", "function"], + description: "Trust the input, enabling all HTML features such as \\url.", + cli: "-T, --trust" + }, + maxSize: { + type: "number", + default: Infinity, + description: "If non-zero, all user-specified sizes, e.g. in " + "\\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, " + "elements and spaces can be arbitrarily large", + processor: s => Math.max(0, s), + cli: "-s, --max-size ", + cliProcessor: parseInt + }, + maxExpand: { + type: "number", + default: 1000, + description: "Limit the number of macro expansions to the specified " + "number, to prevent e.g. infinite macro loops. If set to Infinity, " + "the macro expander will try to fully expand as in LaTeX.", + processor: n => Math.max(0, n), + cli: "-e, --max-expand ", + cliProcessor: n => n === "Infinity" ? Infinity : parseInt(n) + }, + globalGroup: { + type: "boolean", + cli: false + } +}; + +function getDefaultValue(schema) { + if (schema.default) { + return schema.default; + } + + var type = schema.type; + var defaultType = Array.isArray(type) ? type[0] : type; + + if (typeof defaultType !== 'string') { + return defaultType.enum[0]; + } + + switch (defaultType) { + case 'boolean': + return false; + + case 'string': + return ''; + + case 'number': + return 0; + + case 'object': + return {}; + } +} +/** + * The main Settings object + * + * The current options stored are: + * - displayMode: Whether the expression should be typeset as inline math + * (false, the default), meaning that the math starts in + * \textstyle and is placed in an inline-block); or as display + * math (true), meaning that the math starts in \displaystyle + * and is placed in a block with vertical margin. + */ + + +class Settings { + constructor(options) { + this.displayMode = void 0; + this.output = void 0; + this.leqno = void 0; + this.fleqn = void 0; + this.throwOnError = void 0; + this.errorColor = void 0; + this.macros = void 0; + this.minRuleThickness = void 0; + this.colorIsTextColor = void 0; + this.strict = void 0; + this.trust = void 0; + this.maxSize = void 0; + this.maxExpand = void 0; + this.globalGroup = void 0; + // allow null options + options = options || {}; + + for (var prop in SETTINGS_SCHEMA) { + if (SETTINGS_SCHEMA.hasOwnProperty(prop)) { + // $FlowFixMe + var schema = SETTINGS_SCHEMA[prop]; // TODO: validate options + // $FlowFixMe + + this[prop] = options[prop] !== undefined ? schema.processor ? schema.processor(options[prop]) : options[prop] : getDefaultValue(schema); + } + } + } + /** + * Report nonstrict (non-LaTeX-compatible) input. + * Can safely not be called if `this.strict` is false in JavaScript. + */ + + + reportNonstrict(errorCode, errorMsg, token) { + var strict = this.strict; + + if (typeof strict === "function") { + // Allow return value of strict function to be boolean or string + // (or null/undefined, meaning no further processing). + strict = strict(errorCode, errorMsg, token); + } + + if (!strict || strict === "ignore") { + return; + } else if (strict === true || strict === "error") { + throw new ParseError("LaTeX-incompatible input and strict mode is set to 'error': " + (errorMsg + " [" + errorCode + "]"), token); + } else if (strict === "warn") { + typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (errorMsg + " [" + errorCode + "]")); + } else { + // won't happen in type-safe code + typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + strict + "': " + errorMsg + " [" + errorCode + "]")); + } + } + /** + * Check whether to apply strict (LaTeX-adhering) behavior for unusual + * input (like `\\`). Unlike `nonstrict`, will not throw an error; + * instead, "error" translates to a return value of `true`, while "ignore" + * translates to a return value of `false`. May still print a warning: + * "warn" prints a warning and returns `false`. + * This is for the second category of `errorCode`s listed in the README. + */ + + + useStrictBehavior(errorCode, errorMsg, token) { + var strict = this.strict; + + if (typeof strict === "function") { + // Allow return value of strict function to be boolean or string + // (or null/undefined, meaning no further processing). + // But catch any exceptions thrown by function, treating them + // like "error". + try { + strict = strict(errorCode, errorMsg, token); + } catch (error) { + strict = "error"; + } + } + + if (!strict || strict === "ignore") { + return false; + } else if (strict === true || strict === "error") { + return true; + } else if (strict === "warn") { + typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (errorMsg + " [" + errorCode + "]")); + return false; + } else { + // won't happen in type-safe code + typeof console !== "undefined" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + strict + "': " + errorMsg + " [" + errorCode + "]")); + return false; + } + } + /** + * Check whether to test potentially dangerous input, and return + * `true` (trusted) or `false` (untrusted). The sole argument `context` + * should be an object with `command` field specifying the relevant LaTeX + * command (as a string starting with `\`), and any other arguments, etc. + * If `context` has a `url` field, a `protocol` field will automatically + * get added by this function (changing the specified object). + */ + + + isTrusted(context) { + if (context.url && !context.protocol) { + var protocol = utils.protocolFromUrl(context.url); + + if (protocol == null) { + return false; + } + + context.protocol = protocol; + } + + var trust = typeof this.trust === "function" ? this.trust(context) : this.trust; + return Boolean(trust); + } + +} + +/** + * This file contains information and classes for the various kinds of styles + * used in TeX. It provides a generic `Style` class, which holds information + * about a specific style. It then provides instances of all the different kinds + * of styles possible, and provides functions to move between them and get + * information about them. + */ + +/** + * The main style class. Contains a unique id for the style, a size (which is + * the same for cramped and uncramped version of a style), and a cramped flag. + */ +class Style { + constructor(id, size, cramped) { + this.id = void 0; + this.size = void 0; + this.cramped = void 0; + this.id = id; + this.size = size; + this.cramped = cramped; + } + /** + * Get the style of a superscript given a base in the current style. + */ + + + sup() { + return styles[sup[this.id]]; + } + /** + * Get the style of a subscript given a base in the current style. + */ + + + sub() { + return styles[sub[this.id]]; + } + /** + * Get the style of a fraction numerator given the fraction in the current + * style. + */ + + + fracNum() { + return styles[fracNum[this.id]]; + } + /** + * Get the style of a fraction denominator given the fraction in the current + * style. + */ + + + fracDen() { + return styles[fracDen[this.id]]; + } + /** + * Get the cramped version of a style (in particular, cramping a cramped style + * doesn't change the style). + */ + + + cramp() { + return styles[cramp[this.id]]; + } + /** + * Get a text or display version of this style. + */ + + + text() { + return styles[text$1[this.id]]; + } + /** + * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle) + */ + + + isTight() { + return this.size >= 2; + } + +} // Export an interface for type checking, but don't expose the implementation. +// This way, no more styles can be generated. + + +// IDs of the different styles +var D = 0; +var Dc = 1; +var T = 2; +var Tc = 3; +var S = 4; +var Sc = 5; +var SS = 6; +var SSc = 7; // Instances of the different styles + +var styles = [new Style(D, 0, false), new Style(Dc, 0, true), new Style(T, 1, false), new Style(Tc, 1, true), new Style(S, 2, false), new Style(Sc, 2, true), new Style(SS, 3, false), new Style(SSc, 3, true)]; // Lookup tables for switching from one style to another + +var sup = [S, Sc, S, Sc, SS, SSc, SS, SSc]; +var sub = [Sc, Sc, Sc, Sc, SSc, SSc, SSc, SSc]; +var fracNum = [T, Tc, S, Sc, SS, SSc, SS, SSc]; +var fracDen = [Tc, Tc, Sc, Sc, SSc, SSc, SSc, SSc]; +var cramp = [Dc, Dc, Tc, Tc, Sc, Sc, SSc, SSc]; +var text$1 = [D, Dc, T, Tc, T, Tc, T, Tc]; // We only export some of the styles. + +var Style$1 = { + DISPLAY: styles[D], + TEXT: styles[T], + SCRIPT: styles[S], + SCRIPTSCRIPT: styles[SS] +}; + +/* + * This file defines the Unicode scripts and script families that we + * support. To add new scripts or families, just add a new entry to the + * scriptData array below. Adding scripts to the scriptData array allows + * characters from that script to appear in \text{} environments. + */ + +/** + * Each script or script family has a name and an array of blocks. + * Each block is an array of two numbers which specify the start and + * end points (inclusive) of a block of Unicode codepoints. + */ + +/** + * Unicode block data for the families of scripts we support in \text{}. + * Scripts only need to appear here if they do not have font metrics. + */ +var scriptData = [{ + // Latin characters beyond the Latin-1 characters we have metrics for. + // Needed for Czech, Hungarian and Turkish text, for example. + name: 'latin', + blocks: [[0x0100, 0x024f], // Latin Extended-A and Latin Extended-B + [0x0300, 0x036f] // Combining Diacritical marks + ] +}, { + // The Cyrillic script used by Russian and related languages. + // A Cyrillic subset used to be supported as explicitly defined + // symbols in symbols.js + name: 'cyrillic', + blocks: [[0x0400, 0x04ff]] +}, { + // Armenian + name: 'armenian', + blocks: [[0x0530, 0x058F]] +}, { + // The Brahmic scripts of South and Southeast Asia + // Devanagari (0900–097F) + // Bengali (0980–09FF) + // Gurmukhi (0A00–0A7F) + // Gujarati (0A80–0AFF) + // Oriya (0B00–0B7F) + // Tamil (0B80–0BFF) + // Telugu (0C00–0C7F) + // Kannada (0C80–0CFF) + // Malayalam (0D00–0D7F) + // Sinhala (0D80–0DFF) + // Thai (0E00–0E7F) + // Lao (0E80–0EFF) + // Tibetan (0F00–0FFF) + // Myanmar (1000–109F) + name: 'brahmic', + blocks: [[0x0900, 0x109F]] +}, { + name: 'georgian', + blocks: [[0x10A0, 0x10ff]] +}, { + // Chinese and Japanese. + // The "k" in cjk is for Korean, but we've separated Korean out + name: "cjk", + blocks: [[0x3000, 0x30FF], // CJK symbols and punctuation, Hiragana, Katakana + [0x4E00, 0x9FAF], // CJK ideograms + [0xFF00, 0xFF60] // Fullwidth punctuation + // TODO: add halfwidth Katakana and Romanji glyphs + ] +}, { + // Korean + name: 'hangul', + blocks: [[0xAC00, 0xD7AF]] +}]; +/** + * Given a codepoint, return the name of the script or script family + * it is from, or null if it is not part of a known block + */ + +function scriptFromCodepoint(codepoint) { + for (var i = 0; i < scriptData.length; i++) { + var script = scriptData[i]; + + for (var _i = 0; _i < script.blocks.length; _i++) { + var block = script.blocks[_i]; + + if (codepoint >= block[0] && codepoint <= block[1]) { + return script.name; + } + } + } + + return null; +} +/** + * A flattened version of all the supported blocks in a single array. + * This is an optimization to make supportedCodepoint() fast. + */ + +var allBlocks = []; +scriptData.forEach(s => s.blocks.forEach(b => allBlocks.push(...b))); +/** + * Given a codepoint, return true if it falls within one of the + * scripts or script families defined above and false otherwise. + * + * Micro benchmarks shows that this is faster than + * /[\u3000-\u30FF\u4E00-\u9FAF\uFF00-\uFF60\uAC00-\uD7AF\u0900-\u109F]/.test() + * in Firefox, Chrome and Node. + */ + +function supportedCodepoint(codepoint) { + for (var i = 0; i < allBlocks.length; i += 2) { + if (codepoint >= allBlocks[i] && codepoint <= allBlocks[i + 1]) { + return true; + } + } + + return false; +} + +/** + * This file provides support to domTree.js and delimiter.js. + * It's a storehouse of path geometry for SVG images. + */ +// In all paths below, the viewBox-to-em scale is 1000:1. +var hLinePad = 80; // padding above a sqrt vinculum. Prevents image cropping. +// The vinculum of a \sqrt can be made thicker by a KaTeX rendering option. +// Think of variable extraVinculum as two detours in the SVG path. +// The detour begins at the lower left of the area labeled extraVinculum below. +// The detour proceeds one extraVinculum distance up and slightly to the right, +// displacing the radiused corner between surd and vinculum. The radius is +// traversed as usual, then the detour resumes. It goes right, to the end of +// the very long vinculum, then down one extraVinculum distance, +// after which it resumes regular path geometry for the radical. + +/* vinculum + / + /▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒←extraVinculum + / █████████████████████←0.04em (40 unit) std vinculum thickness + / / + / / + / /\ + / / surd +*/ + +var sqrtMain = function sqrtMain(extraVinculum, hLinePad) { + // sqrtMain path geometry is from glyph U221A in the font KaTeX Main + return "M95," + (622 + extraVinculum + hLinePad) + "\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl" + extraVinculum / 2.075 + " -" + extraVinculum + "\nc5.3,-9.3,12,-14,20,-14\nH400000v" + (40 + extraVinculum) + "H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM" + (834 + extraVinculum) + " " + hLinePad + "h400000v" + (40 + extraVinculum) + "h-400000z"; +}; + +var sqrtSize1 = function sqrtSize1(extraVinculum, hLinePad) { + // size1 is from glyph U221A in the font KaTeX_Size1-Regular + return "M263," + (601 + extraVinculum + hLinePad) + "c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl" + extraVinculum / 2.084 + " -" + extraVinculum + "\nc4.7,-7.3,11,-11,19,-11\nH40000v" + (40 + extraVinculum) + "H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM" + (1001 + extraVinculum) + " " + hLinePad + "h400000v" + (40 + extraVinculum) + "h-400000z"; +}; + +var sqrtSize2 = function sqrtSize2(extraVinculum, hLinePad) { + // size2 is from glyph U221A in the font KaTeX_Size2-Regular + return "M983 " + (10 + extraVinculum + hLinePad) + "\nl" + extraVinculum / 3.13 + " -" + extraVinculum + "\nc4,-6.7,10,-10,18,-10 H400000v" + (40 + extraVinculum) + "\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM" + (1001 + extraVinculum) + " " + hLinePad + "h400000v" + (40 + extraVinculum) + "h-400000z"; +}; + +var sqrtSize3 = function sqrtSize3(extraVinculum, hLinePad) { + // size3 is from glyph U221A in the font KaTeX_Size3-Regular + return "M424," + (2398 + extraVinculum + hLinePad) + "\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl" + extraVinculum / 4.223 + " -" + extraVinculum + "c4,-6.7,10,-10,18,-10 H400000\nv" + (40 + extraVinculum) + "H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M" + (1001 + extraVinculum) + " " + hLinePad + "\nh400000v" + (40 + extraVinculum) + "h-400000z"; +}; + +var sqrtSize4 = function sqrtSize4(extraVinculum, hLinePad) { + // size4 is from glyph U221A in the font KaTeX_Size4-Regular + return "M473," + (2713 + extraVinculum + hLinePad) + "\nc339.3,-1799.3,509.3,-2700,510,-2702 l" + extraVinculum / 5.298 + " -" + extraVinculum + "\nc3.3,-7.3,9.3,-11,18,-11 H400000v" + (40 + extraVinculum) + "H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM" + (1001 + extraVinculum) + " " + hLinePad + "h400000v" + (40 + extraVinculum) + "H1017.7z"; +}; + +var phasePath = function phasePath(y) { + var x = y / 2; // x coordinate at top of angle + + return "M400000 " + y + " H0 L" + x + " 0 l65 45 L145 " + (y - 80) + " H400000z"; +}; + +var sqrtTall = function sqrtTall(extraVinculum, hLinePad, viewBoxHeight) { + // sqrtTall is from glyph U23B7 in the font KaTeX_Size4-Regular + // One path edge has a variable length. It runs vertically from the vinculum + // to a point near (14 units) the bottom of the surd. The vinculum + // is normally 40 units thick. So the length of the line in question is: + var vertSegment = viewBoxHeight - 54 - hLinePad - extraVinculum; + return "M702 " + (extraVinculum + hLinePad) + "H400000" + (40 + extraVinculum) + "\nH742v" + vertSegment + "l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 " + hLinePad + "H400000v" + (40 + extraVinculum) + "H742z"; +}; + +var sqrtPath = function sqrtPath(size, extraVinculum, viewBoxHeight) { + extraVinculum = 1000 * extraVinculum; // Convert from document ems to viewBox. + + var path = ""; + + switch (size) { + case "sqrtMain": + path = sqrtMain(extraVinculum, hLinePad); + break; + + case "sqrtSize1": + path = sqrtSize1(extraVinculum, hLinePad); + break; + + case "sqrtSize2": + path = sqrtSize2(extraVinculum, hLinePad); + break; + + case "sqrtSize3": + path = sqrtSize3(extraVinculum, hLinePad); + break; + + case "sqrtSize4": + path = sqrtSize4(extraVinculum, hLinePad); + break; + + case "sqrtTall": + path = sqrtTall(extraVinculum, hLinePad, viewBoxHeight); + } + + return path; +}; +var innerPath = function innerPath(name, height) { + // The inner part of stretchy tall delimiters + switch (name) { + case "\u239c": + return "M291 0 H417 V" + height + " H291z M291 0 H417 V" + height + " H291z"; + + case "\u2223": + return "M145 0 H188 V" + height + " H145z M145 0 H188 V" + height + " H145z"; + + case "\u2225": + return "M145 0 H188 V" + height + " H145z M145 0 H188 V" + height + " H145z" + ("M367 0 H410 V" + height + " H367z M367 0 H410 V" + height + " H367z"); + + case "\u239f": + return "M457 0 H583 V" + height + " H457z M457 0 H583 V" + height + " H457z"; + + case "\u23a2": + return "M319 0 H403 V" + height + " H319z M319 0 H403 V" + height + " H319z"; + + case "\u23a5": + return "M263 0 H347 V" + height + " H263z M263 0 H347 V" + height + " H263z"; + + case "\u23aa": + return "M384 0 H504 V" + height + " H384z M384 0 H504 V" + height + " H384z"; + + case "\u23d0": + return "M312 0 H355 V" + height + " H312z M312 0 H355 V" + height + " H312z"; + + case "\u2016": + return "M257 0 H300 V" + height + " H257z M257 0 H300 V" + height + " H257z" + ("M478 0 H521 V" + height + " H478z M478 0 H521 V" + height + " H478z"); + + default: + return ""; + } +}; +var path = { + // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main + doubleleftarrow: "M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z", + // doublerightarrow is from glyph U+21D2 in font KaTeX Main + doublerightarrow: "M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z", + // leftarrow is from glyph U+2190 in font KaTeX Main + leftarrow: "M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z", + // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular + leftbrace: "M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z", + leftbraceunder: "M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z", + // overgroup is from the MnSymbol package (public domain) + leftgroup: "M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z", + leftgroupunder: "M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z", + // Harpoons are from glyph U+21BD in font KaTeX Main + leftharpoon: "M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z", + leftharpoonplus: "M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z", + leftharpoondown: "M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z", + leftharpoondownplus: "M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z", + // hook is from glyph U+21A9 in font KaTeX Main + lefthook: "M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z", + leftlinesegment: "M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z", + leftmapsto: "M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z", + // tofrom is from glyph U+21C4 in font KaTeX AMS Regular + leftToFrom: "M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z", + longequal: "M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z", + midbrace: "M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z", + midbraceunder: "M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z", + oiintSize1: "M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z", + oiintSize2: "M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z", + oiiintSize1: "M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z", + oiiintSize2: "M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z", + rightarrow: "M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z", + rightbrace: "M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z", + rightbraceunder: "M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z", + rightgroup: "M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z", + rightgroupunder: "M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z", + rightharpoon: "M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z", + rightharpoonplus: "M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z", + rightharpoondown: "M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z", + rightharpoondownplus: "M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z", + righthook: "M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z", + rightlinesegment: "M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z", + rightToFrom: "M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z", + // twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular + twoheadleftarrow: "M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z", + twoheadrightarrow: "M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z", + // tilde1 is a modified version of a glyph from the MnSymbol package + tilde1: "M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z", + // ditto tilde2, tilde3, & tilde4 + tilde2: "M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z", + tilde3: "M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z", + tilde4: "M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z", + // vec is from glyph U+20D7 in font KaTeX Main + vec: "M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z", + // widehat1 is a modified version of a glyph from the MnSymbol package + widehat1: "M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z", + // ditto widehat2, widehat3, & widehat4 + widehat2: "M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z", + widehat3: "M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z", + widehat4: "M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z", + // widecheck paths are all inverted versions of widehat + widecheck1: "M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z", + widecheck2: "M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z", + widecheck3: "M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z", + widecheck4: "M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z", + // The next ten paths support reaction arrows from the mhchem package. + // Arrows for \ce{<-->} are offset from xAxis by 0.22ex, per mhchem in LaTeX + // baraboveleftarrow is mostly from glyph U+2190 in font KaTeX Main + baraboveleftarrow: "M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z", + // rightarrowabovebar is mostly from glyph U+2192, KaTeX Main + rightarrowabovebar: "M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z", + // The short left harpoon has 0.5em (i.e. 500 units) kern on the left end. + // Ref from mhchem.sty: \rlap{\raisebox{-.22ex}{$\kern0.5em + baraboveshortleftharpoon: "M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z", + rightharpoonaboveshortbar: "M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z", + shortbaraboveleftharpoon: "M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z", + shortrightharpoonabovebar: "M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z" +}; +var tallDelim = function tallDelim(label, midHeight) { + switch (label) { + case "lbrack": + return "M403 1759 V84 H666 V0 H319 V1759 v" + midHeight + " v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v" + midHeight + " v1759 h84z"; + + case "rbrack": + return "M347 1759 V0 H0 V84 H263 V1759 v" + midHeight + " v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v" + midHeight + " v1759 h84z"; + + case "vert": + return "M145 15 v585 v" + midHeight + " v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v" + -midHeight + " v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v" + midHeight + " v585 h43z"; + + case "doublevert": + return "M145 15 v585 v" + midHeight + " v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v" + -midHeight + " v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v" + midHeight + " v585 h43z\nM367 15 v585 v" + midHeight + " v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v" + -midHeight + " v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v" + midHeight + " v585 h43z"; + + case "lfloor": + return "M319 602 V0 H403 V602 v" + midHeight + " v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v" + midHeight + " v1715 H319z"; + + case "rfloor": + return "M319 602 V0 H403 V602 v" + midHeight + " v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v" + midHeight + " v1715 H319z"; + + case "lceil": + return "M403 1759 V84 H666 V0 H319 V1759 v" + midHeight + " v602 h84z\nM403 1759 V0 H319 V1759 v" + midHeight + " v602 h84z"; + + case "rceil": + return "M347 1759 V0 H0 V84 H263 V1759 v" + midHeight + " v602 h84z\nM347 1759 V0 h-84 V1759 v" + midHeight + " v602 h84z"; + + case "lparen": + return "M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0," + (midHeight + 84) + "c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-" + (midHeight + 92) + "c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z"; + + case "rparen": + return "M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0," + (midHeight + 9) + "\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-" + (midHeight + 144) + "c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z"; + + default: + // We should not ever get here. + throw new Error("Unknown stretchy delimiter."); + } +}; + +/** + * This node represents a document fragment, which contains elements, but when + * placed into the DOM doesn't have any representation itself. It only contains + * children and doesn't have any DOM node properties. + */ +class DocumentFragment { + // HtmlDomNode + // Never used; needed for satisfying interface. + constructor(children) { + this.children = void 0; + this.classes = void 0; + this.height = void 0; + this.depth = void 0; + this.maxFontSize = void 0; + this.style = void 0; + this.children = children; + this.classes = []; + this.height = 0; + this.depth = 0; + this.maxFontSize = 0; + this.style = {}; + } + + hasClass(className) { + return utils.contains(this.classes, className); + } + /** Convert the fragment into a node. */ + + + toNode() { + var frag = document.createDocumentFragment(); + + for (var i = 0; i < this.children.length; i++) { + frag.appendChild(this.children[i].toNode()); + } + + return frag; + } + /** Convert the fragment into HTML markup. */ + + + toMarkup() { + var markup = ""; // Simply concatenate the markup for the children together. + + for (var i = 0; i < this.children.length; i++) { + markup += this.children[i].toMarkup(); + } + + return markup; + } + /** + * Converts the math node into a string, similar to innerText. Applies to + * MathDomNode's only. + */ + + + toText() { + // To avoid this, we would subclass documentFragment separately for + // MathML, but polyfills for subclassing is expensive per PR 1469. + // $FlowFixMe: Only works for ChildType = MathDomNode. + var toText = child => child.toText(); + + return this.children.map(toText).join(""); + } + +} + +// This file is GENERATED by buildMetrics.sh. DO NOT MODIFY. +var fontMetricsData = { + "AMS-Regular": { + "32": [0, 0, 0, 0, 0.25], + "65": [0, 0.68889, 0, 0, 0.72222], + "66": [0, 0.68889, 0, 0, 0.66667], + "67": [0, 0.68889, 0, 0, 0.72222], + "68": [0, 0.68889, 0, 0, 0.72222], + "69": [0, 0.68889, 0, 0, 0.66667], + "70": [0, 0.68889, 0, 0, 0.61111], + "71": [0, 0.68889, 0, 0, 0.77778], + "72": [0, 0.68889, 0, 0, 0.77778], + "73": [0, 0.68889, 0, 0, 0.38889], + "74": [0.16667, 0.68889, 0, 0, 0.5], + "75": [0, 0.68889, 0, 0, 0.77778], + "76": [0, 0.68889, 0, 0, 0.66667], + "77": [0, 0.68889, 0, 0, 0.94445], + "78": [0, 0.68889, 0, 0, 0.72222], + "79": [0.16667, 0.68889, 0, 0, 0.77778], + "80": [0, 0.68889, 0, 0, 0.61111], + "81": [0.16667, 0.68889, 0, 0, 0.77778], + "82": [0, 0.68889, 0, 0, 0.72222], + "83": [0, 0.68889, 0, 0, 0.55556], + "84": [0, 0.68889, 0, 0, 0.66667], + "85": [0, 0.68889, 0, 0, 0.72222], + "86": [0, 0.68889, 0, 0, 0.72222], + "87": [0, 0.68889, 0, 0, 1.0], + "88": [0, 0.68889, 0, 0, 0.72222], + "89": [0, 0.68889, 0, 0, 0.72222], + "90": [0, 0.68889, 0, 0, 0.66667], + "107": [0, 0.68889, 0, 0, 0.55556], + "160": [0, 0, 0, 0, 0.25], + "165": [0, 0.675, 0.025, 0, 0.75], + "174": [0.15559, 0.69224, 0, 0, 0.94666], + "240": [0, 0.68889, 0, 0, 0.55556], + "295": [0, 0.68889, 0, 0, 0.54028], + "710": [0, 0.825, 0, 0, 2.33334], + "732": [0, 0.9, 0, 0, 2.33334], + "770": [0, 0.825, 0, 0, 2.33334], + "771": [0, 0.9, 0, 0, 2.33334], + "989": [0.08167, 0.58167, 0, 0, 0.77778], + "1008": [0, 0.43056, 0.04028, 0, 0.66667], + "8245": [0, 0.54986, 0, 0, 0.275], + "8463": [0, 0.68889, 0, 0, 0.54028], + "8487": [0, 0.68889, 0, 0, 0.72222], + "8498": [0, 0.68889, 0, 0, 0.55556], + "8502": [0, 0.68889, 0, 0, 0.66667], + "8503": [0, 0.68889, 0, 0, 0.44445], + "8504": [0, 0.68889, 0, 0, 0.66667], + "8513": [0, 0.68889, 0, 0, 0.63889], + "8592": [-0.03598, 0.46402, 0, 0, 0.5], + "8594": [-0.03598, 0.46402, 0, 0, 0.5], + "8602": [-0.13313, 0.36687, 0, 0, 1.0], + "8603": [-0.13313, 0.36687, 0, 0, 1.0], + "8606": [0.01354, 0.52239, 0, 0, 1.0], + "8608": [0.01354, 0.52239, 0, 0, 1.0], + "8610": [0.01354, 0.52239, 0, 0, 1.11111], + "8611": [0.01354, 0.52239, 0, 0, 1.11111], + "8619": [0, 0.54986, 0, 0, 1.0], + "8620": [0, 0.54986, 0, 0, 1.0], + "8621": [-0.13313, 0.37788, 0, 0, 1.38889], + "8622": [-0.13313, 0.36687, 0, 0, 1.0], + "8624": [0, 0.69224, 0, 0, 0.5], + "8625": [0, 0.69224, 0, 0, 0.5], + "8630": [0, 0.43056, 0, 0, 1.0], + "8631": [0, 0.43056, 0, 0, 1.0], + "8634": [0.08198, 0.58198, 0, 0, 0.77778], + "8635": [0.08198, 0.58198, 0, 0, 0.77778], + "8638": [0.19444, 0.69224, 0, 0, 0.41667], + "8639": [0.19444, 0.69224, 0, 0, 0.41667], + "8642": [0.19444, 0.69224, 0, 0, 0.41667], + "8643": [0.19444, 0.69224, 0, 0, 0.41667], + "8644": [0.1808, 0.675, 0, 0, 1.0], + "8646": [0.1808, 0.675, 0, 0, 1.0], + "8647": [0.1808, 0.675, 0, 0, 1.0], + "8648": [0.19444, 0.69224, 0, 0, 0.83334], + "8649": [0.1808, 0.675, 0, 0, 1.0], + "8650": [0.19444, 0.69224, 0, 0, 0.83334], + "8651": [0.01354, 0.52239, 0, 0, 1.0], + "8652": [0.01354, 0.52239, 0, 0, 1.0], + "8653": [-0.13313, 0.36687, 0, 0, 1.0], + "8654": [-0.13313, 0.36687, 0, 0, 1.0], + "8655": [-0.13313, 0.36687, 0, 0, 1.0], + "8666": [0.13667, 0.63667, 0, 0, 1.0], + "8667": [0.13667, 0.63667, 0, 0, 1.0], + "8669": [-0.13313, 0.37788, 0, 0, 1.0], + "8672": [-0.064, 0.437, 0, 0, 1.334], + "8674": [-0.064, 0.437, 0, 0, 1.334], + "8705": [0, 0.825, 0, 0, 0.5], + "8708": [0, 0.68889, 0, 0, 0.55556], + "8709": [0.08167, 0.58167, 0, 0, 0.77778], + "8717": [0, 0.43056, 0, 0, 0.42917], + "8722": [-0.03598, 0.46402, 0, 0, 0.5], + "8724": [0.08198, 0.69224, 0, 0, 0.77778], + "8726": [0.08167, 0.58167, 0, 0, 0.77778], + "8733": [0, 0.69224, 0, 0, 0.77778], + "8736": [0, 0.69224, 0, 0, 0.72222], + "8737": [0, 0.69224, 0, 0, 0.72222], + "8738": [0.03517, 0.52239, 0, 0, 0.72222], + "8739": [0.08167, 0.58167, 0, 0, 0.22222], + "8740": [0.25142, 0.74111, 0, 0, 0.27778], + "8741": [0.08167, 0.58167, 0, 0, 0.38889], + "8742": [0.25142, 0.74111, 0, 0, 0.5], + "8756": [0, 0.69224, 0, 0, 0.66667], + "8757": [0, 0.69224, 0, 0, 0.66667], + "8764": [-0.13313, 0.36687, 0, 0, 0.77778], + "8765": [-0.13313, 0.37788, 0, 0, 0.77778], + "8769": [-0.13313, 0.36687, 0, 0, 0.77778], + "8770": [-0.03625, 0.46375, 0, 0, 0.77778], + "8774": [0.30274, 0.79383, 0, 0, 0.77778], + "8776": [-0.01688, 0.48312, 0, 0, 0.77778], + "8778": [0.08167, 0.58167, 0, 0, 0.77778], + "8782": [0.06062, 0.54986, 0, 0, 0.77778], + "8783": [0.06062, 0.54986, 0, 0, 0.77778], + "8785": [0.08198, 0.58198, 0, 0, 0.77778], + "8786": [0.08198, 0.58198, 0, 0, 0.77778], + "8787": [0.08198, 0.58198, 0, 0, 0.77778], + "8790": [0, 0.69224, 0, 0, 0.77778], + "8791": [0.22958, 0.72958, 0, 0, 0.77778], + "8796": [0.08198, 0.91667, 0, 0, 0.77778], + "8806": [0.25583, 0.75583, 0, 0, 0.77778], + "8807": [0.25583, 0.75583, 0, 0, 0.77778], + "8808": [0.25142, 0.75726, 0, 0, 0.77778], + "8809": [0.25142, 0.75726, 0, 0, 0.77778], + "8812": [0.25583, 0.75583, 0, 0, 0.5], + "8814": [0.20576, 0.70576, 0, 0, 0.77778], + "8815": [0.20576, 0.70576, 0, 0, 0.77778], + "8816": [0.30274, 0.79383, 0, 0, 0.77778], + "8817": [0.30274, 0.79383, 0, 0, 0.77778], + "8818": [0.22958, 0.72958, 0, 0, 0.77778], + "8819": [0.22958, 0.72958, 0, 0, 0.77778], + "8822": [0.1808, 0.675, 0, 0, 0.77778], + "8823": [0.1808, 0.675, 0, 0, 0.77778], + "8828": [0.13667, 0.63667, 0, 0, 0.77778], + "8829": [0.13667, 0.63667, 0, 0, 0.77778], + "8830": [0.22958, 0.72958, 0, 0, 0.77778], + "8831": [0.22958, 0.72958, 0, 0, 0.77778], + "8832": [0.20576, 0.70576, 0, 0, 0.77778], + "8833": [0.20576, 0.70576, 0, 0, 0.77778], + "8840": [0.30274, 0.79383, 0, 0, 0.77778], + "8841": [0.30274, 0.79383, 0, 0, 0.77778], + "8842": [0.13597, 0.63597, 0, 0, 0.77778], + "8843": [0.13597, 0.63597, 0, 0, 0.77778], + "8847": [0.03517, 0.54986, 0, 0, 0.77778], + "8848": [0.03517, 0.54986, 0, 0, 0.77778], + "8858": [0.08198, 0.58198, 0, 0, 0.77778], + "8859": [0.08198, 0.58198, 0, 0, 0.77778], + "8861": [0.08198, 0.58198, 0, 0, 0.77778], + "8862": [0, 0.675, 0, 0, 0.77778], + "8863": [0, 0.675, 0, 0, 0.77778], + "8864": [0, 0.675, 0, 0, 0.77778], + "8865": [0, 0.675, 0, 0, 0.77778], + "8872": [0, 0.69224, 0, 0, 0.61111], + "8873": [0, 0.69224, 0, 0, 0.72222], + "8874": [0, 0.69224, 0, 0, 0.88889], + "8876": [0, 0.68889, 0, 0, 0.61111], + "8877": [0, 0.68889, 0, 0, 0.61111], + "8878": [0, 0.68889, 0, 0, 0.72222], + "8879": [0, 0.68889, 0, 0, 0.72222], + "8882": [0.03517, 0.54986, 0, 0, 0.77778], + "8883": [0.03517, 0.54986, 0, 0, 0.77778], + "8884": [0.13667, 0.63667, 0, 0, 0.77778], + "8885": [0.13667, 0.63667, 0, 0, 0.77778], + "8888": [0, 0.54986, 0, 0, 1.11111], + "8890": [0.19444, 0.43056, 0, 0, 0.55556], + "8891": [0.19444, 0.69224, 0, 0, 0.61111], + "8892": [0.19444, 0.69224, 0, 0, 0.61111], + "8901": [0, 0.54986, 0, 0, 0.27778], + "8903": [0.08167, 0.58167, 0, 0, 0.77778], + "8905": [0.08167, 0.58167, 0, 0, 0.77778], + "8906": [0.08167, 0.58167, 0, 0, 0.77778], + "8907": [0, 0.69224, 0, 0, 0.77778], + "8908": [0, 0.69224, 0, 0, 0.77778], + "8909": [-0.03598, 0.46402, 0, 0, 0.77778], + "8910": [0, 0.54986, 0, 0, 0.76042], + "8911": [0, 0.54986, 0, 0, 0.76042], + "8912": [0.03517, 0.54986, 0, 0, 0.77778], + "8913": [0.03517, 0.54986, 0, 0, 0.77778], + "8914": [0, 0.54986, 0, 0, 0.66667], + "8915": [0, 0.54986, 0, 0, 0.66667], + "8916": [0, 0.69224, 0, 0, 0.66667], + "8918": [0.0391, 0.5391, 0, 0, 0.77778], + "8919": [0.0391, 0.5391, 0, 0, 0.77778], + "8920": [0.03517, 0.54986, 0, 0, 1.33334], + "8921": [0.03517, 0.54986, 0, 0, 1.33334], + "8922": [0.38569, 0.88569, 0, 0, 0.77778], + "8923": [0.38569, 0.88569, 0, 0, 0.77778], + "8926": [0.13667, 0.63667, 0, 0, 0.77778], + "8927": [0.13667, 0.63667, 0, 0, 0.77778], + "8928": [0.30274, 0.79383, 0, 0, 0.77778], + "8929": [0.30274, 0.79383, 0, 0, 0.77778], + "8934": [0.23222, 0.74111, 0, 0, 0.77778], + "8935": [0.23222, 0.74111, 0, 0, 0.77778], + "8936": [0.23222, 0.74111, 0, 0, 0.77778], + "8937": [0.23222, 0.74111, 0, 0, 0.77778], + "8938": [0.20576, 0.70576, 0, 0, 0.77778], + "8939": [0.20576, 0.70576, 0, 0, 0.77778], + "8940": [0.30274, 0.79383, 0, 0, 0.77778], + "8941": [0.30274, 0.79383, 0, 0, 0.77778], + "8994": [0.19444, 0.69224, 0, 0, 0.77778], + "8995": [0.19444, 0.69224, 0, 0, 0.77778], + "9416": [0.15559, 0.69224, 0, 0, 0.90222], + "9484": [0, 0.69224, 0, 0, 0.5], + "9488": [0, 0.69224, 0, 0, 0.5], + "9492": [0, 0.37788, 0, 0, 0.5], + "9496": [0, 0.37788, 0, 0, 0.5], + "9585": [0.19444, 0.68889, 0, 0, 0.88889], + "9586": [0.19444, 0.74111, 0, 0, 0.88889], + "9632": [0, 0.675, 0, 0, 0.77778], + "9633": [0, 0.675, 0, 0, 0.77778], + "9650": [0, 0.54986, 0, 0, 0.72222], + "9651": [0, 0.54986, 0, 0, 0.72222], + "9654": [0.03517, 0.54986, 0, 0, 0.77778], + "9660": [0, 0.54986, 0, 0, 0.72222], + "9661": [0, 0.54986, 0, 0, 0.72222], + "9664": [0.03517, 0.54986, 0, 0, 0.77778], + "9674": [0.11111, 0.69224, 0, 0, 0.66667], + "9733": [0.19444, 0.69224, 0, 0, 0.94445], + "10003": [0, 0.69224, 0, 0, 0.83334], + "10016": [0, 0.69224, 0, 0, 0.83334], + "10731": [0.11111, 0.69224, 0, 0, 0.66667], + "10846": [0.19444, 0.75583, 0, 0, 0.61111], + "10877": [0.13667, 0.63667, 0, 0, 0.77778], + "10878": [0.13667, 0.63667, 0, 0, 0.77778], + "10885": [0.25583, 0.75583, 0, 0, 0.77778], + "10886": [0.25583, 0.75583, 0, 0, 0.77778], + "10887": [0.13597, 0.63597, 0, 0, 0.77778], + "10888": [0.13597, 0.63597, 0, 0, 0.77778], + "10889": [0.26167, 0.75726, 0, 0, 0.77778], + "10890": [0.26167, 0.75726, 0, 0, 0.77778], + "10891": [0.48256, 0.98256, 0, 0, 0.77778], + "10892": [0.48256, 0.98256, 0, 0, 0.77778], + "10901": [0.13667, 0.63667, 0, 0, 0.77778], + "10902": [0.13667, 0.63667, 0, 0, 0.77778], + "10933": [0.25142, 0.75726, 0, 0, 0.77778], + "10934": [0.25142, 0.75726, 0, 0, 0.77778], + "10935": [0.26167, 0.75726, 0, 0, 0.77778], + "10936": [0.26167, 0.75726, 0, 0, 0.77778], + "10937": [0.26167, 0.75726, 0, 0, 0.77778], + "10938": [0.26167, 0.75726, 0, 0, 0.77778], + "10949": [0.25583, 0.75583, 0, 0, 0.77778], + "10950": [0.25583, 0.75583, 0, 0, 0.77778], + "10955": [0.28481, 0.79383, 0, 0, 0.77778], + "10956": [0.28481, 0.79383, 0, 0, 0.77778], + "57350": [0.08167, 0.58167, 0, 0, 0.22222], + "57351": [0.08167, 0.58167, 0, 0, 0.38889], + "57352": [0.08167, 0.58167, 0, 0, 0.77778], + "57353": [0, 0.43056, 0.04028, 0, 0.66667], + "57356": [0.25142, 0.75726, 0, 0, 0.77778], + "57357": [0.25142, 0.75726, 0, 0, 0.77778], + "57358": [0.41951, 0.91951, 0, 0, 0.77778], + "57359": [0.30274, 0.79383, 0, 0, 0.77778], + "57360": [0.30274, 0.79383, 0, 0, 0.77778], + "57361": [0.41951, 0.91951, 0, 0, 0.77778], + "57366": [0.25142, 0.75726, 0, 0, 0.77778], + "57367": [0.25142, 0.75726, 0, 0, 0.77778], + "57368": [0.25142, 0.75726, 0, 0, 0.77778], + "57369": [0.25142, 0.75726, 0, 0, 0.77778], + "57370": [0.13597, 0.63597, 0, 0, 0.77778], + "57371": [0.13597, 0.63597, 0, 0, 0.77778] + }, + "Caligraphic-Regular": { + "32": [0, 0, 0, 0, 0.25], + "65": [0, 0.68333, 0, 0.19445, 0.79847], + "66": [0, 0.68333, 0.03041, 0.13889, 0.65681], + "67": [0, 0.68333, 0.05834, 0.13889, 0.52653], + "68": [0, 0.68333, 0.02778, 0.08334, 0.77139], + "69": [0, 0.68333, 0.08944, 0.11111, 0.52778], + "70": [0, 0.68333, 0.09931, 0.11111, 0.71875], + "71": [0.09722, 0.68333, 0.0593, 0.11111, 0.59487], + "72": [0, 0.68333, 0.00965, 0.11111, 0.84452], + "73": [0, 0.68333, 0.07382, 0, 0.54452], + "74": [0.09722, 0.68333, 0.18472, 0.16667, 0.67778], + "75": [0, 0.68333, 0.01445, 0.05556, 0.76195], + "76": [0, 0.68333, 0, 0.13889, 0.68972], + "77": [0, 0.68333, 0, 0.13889, 1.2009], + "78": [0, 0.68333, 0.14736, 0.08334, 0.82049], + "79": [0, 0.68333, 0.02778, 0.11111, 0.79611], + "80": [0, 0.68333, 0.08222, 0.08334, 0.69556], + "81": [0.09722, 0.68333, 0, 0.11111, 0.81667], + "82": [0, 0.68333, 0, 0.08334, 0.8475], + "83": [0, 0.68333, 0.075, 0.13889, 0.60556], + "84": [0, 0.68333, 0.25417, 0, 0.54464], + "85": [0, 0.68333, 0.09931, 0.08334, 0.62583], + "86": [0, 0.68333, 0.08222, 0, 0.61278], + "87": [0, 0.68333, 0.08222, 0.08334, 0.98778], + "88": [0, 0.68333, 0.14643, 0.13889, 0.7133], + "89": [0.09722, 0.68333, 0.08222, 0.08334, 0.66834], + "90": [0, 0.68333, 0.07944, 0.13889, 0.72473], + "160": [0, 0, 0, 0, 0.25] + }, + "Fraktur-Regular": { + "32": [0, 0, 0, 0, 0.25], + "33": [0, 0.69141, 0, 0, 0.29574], + "34": [0, 0.69141, 0, 0, 0.21471], + "38": [0, 0.69141, 0, 0, 0.73786], + "39": [0, 0.69141, 0, 0, 0.21201], + "40": [0.24982, 0.74947, 0, 0, 0.38865], + "41": [0.24982, 0.74947, 0, 0, 0.38865], + "42": [0, 0.62119, 0, 0, 0.27764], + "43": [0.08319, 0.58283, 0, 0, 0.75623], + "44": [0, 0.10803, 0, 0, 0.27764], + "45": [0.08319, 0.58283, 0, 0, 0.75623], + "46": [0, 0.10803, 0, 0, 0.27764], + "47": [0.24982, 0.74947, 0, 0, 0.50181], + "48": [0, 0.47534, 0, 0, 0.50181], + "49": [0, 0.47534, 0, 0, 0.50181], + "50": [0, 0.47534, 0, 0, 0.50181], + "51": [0.18906, 0.47534, 0, 0, 0.50181], + "52": [0.18906, 0.47534, 0, 0, 0.50181], + "53": [0.18906, 0.47534, 0, 0, 0.50181], + "54": [0, 0.69141, 0, 0, 0.50181], + "55": [0.18906, 0.47534, 0, 0, 0.50181], + "56": [0, 0.69141, 0, 0, 0.50181], + "57": [0.18906, 0.47534, 0, 0, 0.50181], + "58": [0, 0.47534, 0, 0, 0.21606], + "59": [0.12604, 0.47534, 0, 0, 0.21606], + "61": [-0.13099, 0.36866, 0, 0, 0.75623], + "63": [0, 0.69141, 0, 0, 0.36245], + "65": [0, 0.69141, 0, 0, 0.7176], + "66": [0, 0.69141, 0, 0, 0.88397], + "67": [0, 0.69141, 0, 0, 0.61254], + "68": [0, 0.69141, 0, 0, 0.83158], + "69": [0, 0.69141, 0, 0, 0.66278], + "70": [0.12604, 0.69141, 0, 0, 0.61119], + "71": [0, 0.69141, 0, 0, 0.78539], + "72": [0.06302, 0.69141, 0, 0, 0.7203], + "73": [0, 0.69141, 0, 0, 0.55448], + "74": [0.12604, 0.69141, 0, 0, 0.55231], + "75": [0, 0.69141, 0, 0, 0.66845], + "76": [0, 0.69141, 0, 0, 0.66602], + "77": [0, 0.69141, 0, 0, 1.04953], + "78": [0, 0.69141, 0, 0, 0.83212], + "79": [0, 0.69141, 0, 0, 0.82699], + "80": [0.18906, 0.69141, 0, 0, 0.82753], + "81": [0.03781, 0.69141, 0, 0, 0.82699], + "82": [0, 0.69141, 0, 0, 0.82807], + "83": [0, 0.69141, 0, 0, 0.82861], + "84": [0, 0.69141, 0, 0, 0.66899], + "85": [0, 0.69141, 0, 0, 0.64576], + "86": [0, 0.69141, 0, 0, 0.83131], + "87": [0, 0.69141, 0, 0, 1.04602], + "88": [0, 0.69141, 0, 0, 0.71922], + "89": [0.18906, 0.69141, 0, 0, 0.83293], + "90": [0.12604, 0.69141, 0, 0, 0.60201], + "91": [0.24982, 0.74947, 0, 0, 0.27764], + "93": [0.24982, 0.74947, 0, 0, 0.27764], + "94": [0, 0.69141, 0, 0, 0.49965], + "97": [0, 0.47534, 0, 0, 0.50046], + "98": [0, 0.69141, 0, 0, 0.51315], + "99": [0, 0.47534, 0, 0, 0.38946], + "100": [0, 0.62119, 0, 0, 0.49857], + "101": [0, 0.47534, 0, 0, 0.40053], + "102": [0.18906, 0.69141, 0, 0, 0.32626], + "103": [0.18906, 0.47534, 0, 0, 0.5037], + "104": [0.18906, 0.69141, 0, 0, 0.52126], + "105": [0, 0.69141, 0, 0, 0.27899], + "106": [0, 0.69141, 0, 0, 0.28088], + "107": [0, 0.69141, 0, 0, 0.38946], + "108": [0, 0.69141, 0, 0, 0.27953], + "109": [0, 0.47534, 0, 0, 0.76676], + "110": [0, 0.47534, 0, 0, 0.52666], + "111": [0, 0.47534, 0, 0, 0.48885], + "112": [0.18906, 0.52396, 0, 0, 0.50046], + "113": [0.18906, 0.47534, 0, 0, 0.48912], + "114": [0, 0.47534, 0, 0, 0.38919], + "115": [0, 0.47534, 0, 0, 0.44266], + "116": [0, 0.62119, 0, 0, 0.33301], + "117": [0, 0.47534, 0, 0, 0.5172], + "118": [0, 0.52396, 0, 0, 0.5118], + "119": [0, 0.52396, 0, 0, 0.77351], + "120": [0.18906, 0.47534, 0, 0, 0.38865], + "121": [0.18906, 0.47534, 0, 0, 0.49884], + "122": [0.18906, 0.47534, 0, 0, 0.39054], + "160": [0, 0, 0, 0, 0.25], + "8216": [0, 0.69141, 0, 0, 0.21471], + "8217": [0, 0.69141, 0, 0, 0.21471], + "58112": [0, 0.62119, 0, 0, 0.49749], + "58113": [0, 0.62119, 0, 0, 0.4983], + "58114": [0.18906, 0.69141, 0, 0, 0.33328], + "58115": [0.18906, 0.69141, 0, 0, 0.32923], + "58116": [0.18906, 0.47534, 0, 0, 0.50343], + "58117": [0, 0.69141, 0, 0, 0.33301], + "58118": [0, 0.62119, 0, 0, 0.33409], + "58119": [0, 0.47534, 0, 0, 0.50073] + }, + "Main-Bold": { + "32": [0, 0, 0, 0, 0.25], + "33": [0, 0.69444, 0, 0, 0.35], + "34": [0, 0.69444, 0, 0, 0.60278], + "35": [0.19444, 0.69444, 0, 0, 0.95833], + "36": [0.05556, 0.75, 0, 0, 0.575], + "37": [0.05556, 0.75, 0, 0, 0.95833], + "38": [0, 0.69444, 0, 0, 0.89444], + "39": [0, 0.69444, 0, 0, 0.31944], + "40": [0.25, 0.75, 0, 0, 0.44722], + "41": [0.25, 0.75, 0, 0, 0.44722], + "42": [0, 0.75, 0, 0, 0.575], + "43": [0.13333, 0.63333, 0, 0, 0.89444], + "44": [0.19444, 0.15556, 0, 0, 0.31944], + "45": [0, 0.44444, 0, 0, 0.38333], + "46": [0, 0.15556, 0, 0, 0.31944], + "47": [0.25, 0.75, 0, 0, 0.575], + "48": [0, 0.64444, 0, 0, 0.575], + "49": [0, 0.64444, 0, 0, 0.575], + "50": [0, 0.64444, 0, 0, 0.575], + "51": [0, 0.64444, 0, 0, 0.575], + "52": [0, 0.64444, 0, 0, 0.575], + "53": [0, 0.64444, 0, 0, 0.575], + "54": [0, 0.64444, 0, 0, 0.575], + "55": [0, 0.64444, 0, 0, 0.575], + "56": [0, 0.64444, 0, 0, 0.575], + "57": [0, 0.64444, 0, 0, 0.575], + "58": [0, 0.44444, 0, 0, 0.31944], + "59": [0.19444, 0.44444, 0, 0, 0.31944], + "60": [0.08556, 0.58556, 0, 0, 0.89444], + "61": [-0.10889, 0.39111, 0, 0, 0.89444], + "62": [0.08556, 0.58556, 0, 0, 0.89444], + "63": [0, 0.69444, 0, 0, 0.54305], + "64": [0, 0.69444, 0, 0, 0.89444], + "65": [0, 0.68611, 0, 0, 0.86944], + "66": [0, 0.68611, 0, 0, 0.81805], + "67": [0, 0.68611, 0, 0, 0.83055], + "68": [0, 0.68611, 0, 0, 0.88194], + "69": [0, 0.68611, 0, 0, 0.75555], + "70": [0, 0.68611, 0, 0, 0.72361], + "71": [0, 0.68611, 0, 0, 0.90416], + "72": [0, 0.68611, 0, 0, 0.9], + "73": [0, 0.68611, 0, 0, 0.43611], + "74": [0, 0.68611, 0, 0, 0.59444], + "75": [0, 0.68611, 0, 0, 0.90138], + "76": [0, 0.68611, 0, 0, 0.69166], + "77": [0, 0.68611, 0, 0, 1.09166], + "78": [0, 0.68611, 0, 0, 0.9], + "79": [0, 0.68611, 0, 0, 0.86388], + "80": [0, 0.68611, 0, 0, 0.78611], + "81": [0.19444, 0.68611, 0, 0, 0.86388], + "82": [0, 0.68611, 0, 0, 0.8625], + "83": [0, 0.68611, 0, 0, 0.63889], + "84": [0, 0.68611, 0, 0, 0.8], + "85": [0, 0.68611, 0, 0, 0.88472], + "86": [0, 0.68611, 0.01597, 0, 0.86944], + "87": [0, 0.68611, 0.01597, 0, 1.18888], + "88": [0, 0.68611, 0, 0, 0.86944], + "89": [0, 0.68611, 0.02875, 0, 0.86944], + "90": [0, 0.68611, 0, 0, 0.70277], + "91": [0.25, 0.75, 0, 0, 0.31944], + "92": [0.25, 0.75, 0, 0, 0.575], + "93": [0.25, 0.75, 0, 0, 0.31944], + "94": [0, 0.69444, 0, 0, 0.575], + "95": [0.31, 0.13444, 0.03194, 0, 0.575], + "97": [0, 0.44444, 0, 0, 0.55902], + "98": [0, 0.69444, 0, 0, 0.63889], + "99": [0, 0.44444, 0, 0, 0.51111], + "100": [0, 0.69444, 0, 0, 0.63889], + "101": [0, 0.44444, 0, 0, 0.52708], + "102": [0, 0.69444, 0.10903, 0, 0.35139], + "103": [0.19444, 0.44444, 0.01597, 0, 0.575], + "104": [0, 0.69444, 0, 0, 0.63889], + "105": [0, 0.69444, 0, 0, 0.31944], + "106": [0.19444, 0.69444, 0, 0, 0.35139], + "107": [0, 0.69444, 0, 0, 0.60694], + "108": [0, 0.69444, 0, 0, 0.31944], + "109": [0, 0.44444, 0, 0, 0.95833], + "110": [0, 0.44444, 0, 0, 0.63889], + "111": [0, 0.44444, 0, 0, 0.575], + "112": [0.19444, 0.44444, 0, 0, 0.63889], + "113": [0.19444, 0.44444, 0, 0, 0.60694], + "114": [0, 0.44444, 0, 0, 0.47361], + "115": [0, 0.44444, 0, 0, 0.45361], + "116": [0, 0.63492, 0, 0, 0.44722], + "117": [0, 0.44444, 0, 0, 0.63889], + "118": [0, 0.44444, 0.01597, 0, 0.60694], + "119": [0, 0.44444, 0.01597, 0, 0.83055], + "120": [0, 0.44444, 0, 0, 0.60694], + "121": [0.19444, 0.44444, 0.01597, 0, 0.60694], + "122": [0, 0.44444, 0, 0, 0.51111], + "123": [0.25, 0.75, 0, 0, 0.575], + "124": [0.25, 0.75, 0, 0, 0.31944], + "125": [0.25, 0.75, 0, 0, 0.575], + "126": [0.35, 0.34444, 0, 0, 0.575], + "160": [0, 0, 0, 0, 0.25], + "163": [0, 0.69444, 0, 0, 0.86853], + "168": [0, 0.69444, 0, 0, 0.575], + "172": [0, 0.44444, 0, 0, 0.76666], + "176": [0, 0.69444, 0, 0, 0.86944], + "177": [0.13333, 0.63333, 0, 0, 0.89444], + "184": [0.17014, 0, 0, 0, 0.51111], + "198": [0, 0.68611, 0, 0, 1.04166], + "215": [0.13333, 0.63333, 0, 0, 0.89444], + "216": [0.04861, 0.73472, 0, 0, 0.89444], + "223": [0, 0.69444, 0, 0, 0.59722], + "230": [0, 0.44444, 0, 0, 0.83055], + "247": [0.13333, 0.63333, 0, 0, 0.89444], + "248": [0.09722, 0.54167, 0, 0, 0.575], + "305": [0, 0.44444, 0, 0, 0.31944], + "338": [0, 0.68611, 0, 0, 1.16944], + "339": [0, 0.44444, 0, 0, 0.89444], + "567": [0.19444, 0.44444, 0, 0, 0.35139], + "710": [0, 0.69444, 0, 0, 0.575], + "711": [0, 0.63194, 0, 0, 0.575], + "713": [0, 0.59611, 0, 0, 0.575], + "714": [0, 0.69444, 0, 0, 0.575], + "715": [0, 0.69444, 0, 0, 0.575], + "728": [0, 0.69444, 0, 0, 0.575], + "729": [0, 0.69444, 0, 0, 0.31944], + "730": [0, 0.69444, 0, 0, 0.86944], + "732": [0, 0.69444, 0, 0, 0.575], + "733": [0, 0.69444, 0, 0, 0.575], + "915": [0, 0.68611, 0, 0, 0.69166], + "916": [0, 0.68611, 0, 0, 0.95833], + "920": [0, 0.68611, 0, 0, 0.89444], + "923": [0, 0.68611, 0, 0, 0.80555], + "926": [0, 0.68611, 0, 0, 0.76666], + "928": [0, 0.68611, 0, 0, 0.9], + "931": [0, 0.68611, 0, 0, 0.83055], + "933": [0, 0.68611, 0, 0, 0.89444], + "934": [0, 0.68611, 0, 0, 0.83055], + "936": [0, 0.68611, 0, 0, 0.89444], + "937": [0, 0.68611, 0, 0, 0.83055], + "8211": [0, 0.44444, 0.03194, 0, 0.575], + "8212": [0, 0.44444, 0.03194, 0, 1.14999], + "8216": [0, 0.69444, 0, 0, 0.31944], + "8217": [0, 0.69444, 0, 0, 0.31944], + "8220": [0, 0.69444, 0, 0, 0.60278], + "8221": [0, 0.69444, 0, 0, 0.60278], + "8224": [0.19444, 0.69444, 0, 0, 0.51111], + "8225": [0.19444, 0.69444, 0, 0, 0.51111], + "8242": [0, 0.55556, 0, 0, 0.34444], + "8407": [0, 0.72444, 0.15486, 0, 0.575], + "8463": [0, 0.69444, 0, 0, 0.66759], + "8465": [0, 0.69444, 0, 0, 0.83055], + "8467": [0, 0.69444, 0, 0, 0.47361], + "8472": [0.19444, 0.44444, 0, 0, 0.74027], + "8476": [0, 0.69444, 0, 0, 0.83055], + "8501": [0, 0.69444, 0, 0, 0.70277], + "8592": [-0.10889, 0.39111, 0, 0, 1.14999], + "8593": [0.19444, 0.69444, 0, 0, 0.575], + "8594": [-0.10889, 0.39111, 0, 0, 1.14999], + "8595": [0.19444, 0.69444, 0, 0, 0.575], + "8596": [-0.10889, 0.39111, 0, 0, 1.14999], + "8597": [0.25, 0.75, 0, 0, 0.575], + "8598": [0.19444, 0.69444, 0, 0, 1.14999], + "8599": [0.19444, 0.69444, 0, 0, 1.14999], + "8600": [0.19444, 0.69444, 0, 0, 1.14999], + "8601": [0.19444, 0.69444, 0, 0, 1.14999], + "8636": [-0.10889, 0.39111, 0, 0, 1.14999], + "8637": [-0.10889, 0.39111, 0, 0, 1.14999], + "8640": [-0.10889, 0.39111, 0, 0, 1.14999], + "8641": [-0.10889, 0.39111, 0, 0, 1.14999], + "8656": [-0.10889, 0.39111, 0, 0, 1.14999], + "8657": [0.19444, 0.69444, 0, 0, 0.70277], + "8658": [-0.10889, 0.39111, 0, 0, 1.14999], + "8659": [0.19444, 0.69444, 0, 0, 0.70277], + "8660": [-0.10889, 0.39111, 0, 0, 1.14999], + "8661": [0.25, 0.75, 0, 0, 0.70277], + "8704": [0, 0.69444, 0, 0, 0.63889], + "8706": [0, 0.69444, 0.06389, 0, 0.62847], + "8707": [0, 0.69444, 0, 0, 0.63889], + "8709": [0.05556, 0.75, 0, 0, 0.575], + "8711": [0, 0.68611, 0, 0, 0.95833], + "8712": [0.08556, 0.58556, 0, 0, 0.76666], + "8715": [0.08556, 0.58556, 0, 0, 0.76666], + "8722": [0.13333, 0.63333, 0, 0, 0.89444], + "8723": [0.13333, 0.63333, 0, 0, 0.89444], + "8725": [0.25, 0.75, 0, 0, 0.575], + "8726": [0.25, 0.75, 0, 0, 0.575], + "8727": [-0.02778, 0.47222, 0, 0, 0.575], + "8728": [-0.02639, 0.47361, 0, 0, 0.575], + "8729": [-0.02639, 0.47361, 0, 0, 0.575], + "8730": [0.18, 0.82, 0, 0, 0.95833], + "8733": [0, 0.44444, 0, 0, 0.89444], + "8734": [0, 0.44444, 0, 0, 1.14999], + "8736": [0, 0.69224, 0, 0, 0.72222], + "8739": [0.25, 0.75, 0, 0, 0.31944], + "8741": [0.25, 0.75, 0, 0, 0.575], + "8743": [0, 0.55556, 0, 0, 0.76666], + "8744": [0, 0.55556, 0, 0, 0.76666], + "8745": [0, 0.55556, 0, 0, 0.76666], + "8746": [0, 0.55556, 0, 0, 0.76666], + "8747": [0.19444, 0.69444, 0.12778, 0, 0.56875], + "8764": [-0.10889, 0.39111, 0, 0, 0.89444], + "8768": [0.19444, 0.69444, 0, 0, 0.31944], + "8771": [0.00222, 0.50222, 0, 0, 0.89444], + "8773": [0.027, 0.638, 0, 0, 0.894], + "8776": [0.02444, 0.52444, 0, 0, 0.89444], + "8781": [0.00222, 0.50222, 0, 0, 0.89444], + "8801": [0.00222, 0.50222, 0, 0, 0.89444], + "8804": [0.19667, 0.69667, 0, 0, 0.89444], + "8805": [0.19667, 0.69667, 0, 0, 0.89444], + "8810": [0.08556, 0.58556, 0, 0, 1.14999], + "8811": [0.08556, 0.58556, 0, 0, 1.14999], + "8826": [0.08556, 0.58556, 0, 0, 0.89444], + "8827": [0.08556, 0.58556, 0, 0, 0.89444], + "8834": [0.08556, 0.58556, 0, 0, 0.89444], + "8835": [0.08556, 0.58556, 0, 0, 0.89444], + "8838": [0.19667, 0.69667, 0, 0, 0.89444], + "8839": [0.19667, 0.69667, 0, 0, 0.89444], + "8846": [0, 0.55556, 0, 0, 0.76666], + "8849": [0.19667, 0.69667, 0, 0, 0.89444], + "8850": [0.19667, 0.69667, 0, 0, 0.89444], + "8851": [0, 0.55556, 0, 0, 0.76666], + "8852": [0, 0.55556, 0, 0, 0.76666], + "8853": [0.13333, 0.63333, 0, 0, 0.89444], + "8854": [0.13333, 0.63333, 0, 0, 0.89444], + "8855": [0.13333, 0.63333, 0, 0, 0.89444], + "8856": [0.13333, 0.63333, 0, 0, 0.89444], + "8857": [0.13333, 0.63333, 0, 0, 0.89444], + "8866": [0, 0.69444, 0, 0, 0.70277], + "8867": [0, 0.69444, 0, 0, 0.70277], + "8868": [0, 0.69444, 0, 0, 0.89444], + "8869": [0, 0.69444, 0, 0, 0.89444], + "8900": [-0.02639, 0.47361, 0, 0, 0.575], + "8901": [-0.02639, 0.47361, 0, 0, 0.31944], + "8902": [-0.02778, 0.47222, 0, 0, 0.575], + "8968": [0.25, 0.75, 0, 0, 0.51111], + "8969": [0.25, 0.75, 0, 0, 0.51111], + "8970": [0.25, 0.75, 0, 0, 0.51111], + "8971": [0.25, 0.75, 0, 0, 0.51111], + "8994": [-0.13889, 0.36111, 0, 0, 1.14999], + "8995": [-0.13889, 0.36111, 0, 0, 1.14999], + "9651": [0.19444, 0.69444, 0, 0, 1.02222], + "9657": [-0.02778, 0.47222, 0, 0, 0.575], + "9661": [0.19444, 0.69444, 0, 0, 1.02222], + "9667": [-0.02778, 0.47222, 0, 0, 0.575], + "9711": [0.19444, 0.69444, 0, 0, 1.14999], + "9824": [0.12963, 0.69444, 0, 0, 0.89444], + "9825": [0.12963, 0.69444, 0, 0, 0.89444], + "9826": [0.12963, 0.69444, 0, 0, 0.89444], + "9827": [0.12963, 0.69444, 0, 0, 0.89444], + "9837": [0, 0.75, 0, 0, 0.44722], + "9838": [0.19444, 0.69444, 0, 0, 0.44722], + "9839": [0.19444, 0.69444, 0, 0, 0.44722], + "10216": [0.25, 0.75, 0, 0, 0.44722], + "10217": [0.25, 0.75, 0, 0, 0.44722], + "10815": [0, 0.68611, 0, 0, 0.9], + "10927": [0.19667, 0.69667, 0, 0, 0.89444], + "10928": [0.19667, 0.69667, 0, 0, 0.89444], + "57376": [0.19444, 0.69444, 0, 0, 0] + }, + "Main-BoldItalic": { + "32": [0, 0, 0, 0, 0.25], + "33": [0, 0.69444, 0.11417, 0, 0.38611], + "34": [0, 0.69444, 0.07939, 0, 0.62055], + "35": [0.19444, 0.69444, 0.06833, 0, 0.94444], + "37": [0.05556, 0.75, 0.12861, 0, 0.94444], + "38": [0, 0.69444, 0.08528, 0, 0.88555], + "39": [0, 0.69444, 0.12945, 0, 0.35555], + "40": [0.25, 0.75, 0.15806, 0, 0.47333], + "41": [0.25, 0.75, 0.03306, 0, 0.47333], + "42": [0, 0.75, 0.14333, 0, 0.59111], + "43": [0.10333, 0.60333, 0.03306, 0, 0.88555], + "44": [0.19444, 0.14722, 0, 0, 0.35555], + "45": [0, 0.44444, 0.02611, 0, 0.41444], + "46": [0, 0.14722, 0, 0, 0.35555], + "47": [0.25, 0.75, 0.15806, 0, 0.59111], + "48": [0, 0.64444, 0.13167, 0, 0.59111], + "49": [0, 0.64444, 0.13167, 0, 0.59111], + "50": [0, 0.64444, 0.13167, 0, 0.59111], + "51": [0, 0.64444, 0.13167, 0, 0.59111], + "52": [0.19444, 0.64444, 0.13167, 0, 0.59111], + "53": [0, 0.64444, 0.13167, 0, 0.59111], + "54": [0, 0.64444, 0.13167, 0, 0.59111], + "55": [0.19444, 0.64444, 0.13167, 0, 0.59111], + "56": [0, 0.64444, 0.13167, 0, 0.59111], + "57": [0, 0.64444, 0.13167, 0, 0.59111], + "58": [0, 0.44444, 0.06695, 0, 0.35555], + "59": [0.19444, 0.44444, 0.06695, 0, 0.35555], + "61": [-0.10889, 0.39111, 0.06833, 0, 0.88555], + "63": [0, 0.69444, 0.11472, 0, 0.59111], + "64": [0, 0.69444, 0.09208, 0, 0.88555], + "65": [0, 0.68611, 0, 0, 0.86555], + "66": [0, 0.68611, 0.0992, 0, 0.81666], + "67": [0, 0.68611, 0.14208, 0, 0.82666], + "68": [0, 0.68611, 0.09062, 0, 0.87555], + "69": [0, 0.68611, 0.11431, 0, 0.75666], + "70": [0, 0.68611, 0.12903, 0, 0.72722], + "71": [0, 0.68611, 0.07347, 0, 0.89527], + "72": [0, 0.68611, 0.17208, 0, 0.8961], + "73": [0, 0.68611, 0.15681, 0, 0.47166], + "74": [0, 0.68611, 0.145, 0, 0.61055], + "75": [0, 0.68611, 0.14208, 0, 0.89499], + "76": [0, 0.68611, 0, 0, 0.69777], + "77": [0, 0.68611, 0.17208, 0, 1.07277], + "78": [0, 0.68611, 0.17208, 0, 0.8961], + "79": [0, 0.68611, 0.09062, 0, 0.85499], + "80": [0, 0.68611, 0.0992, 0, 0.78721], + "81": [0.19444, 0.68611, 0.09062, 0, 0.85499], + "82": [0, 0.68611, 0.02559, 0, 0.85944], + "83": [0, 0.68611, 0.11264, 0, 0.64999], + "84": [0, 0.68611, 0.12903, 0, 0.7961], + "85": [0, 0.68611, 0.17208, 0, 0.88083], + "86": [0, 0.68611, 0.18625, 0, 0.86555], + "87": [0, 0.68611, 0.18625, 0, 1.15999], + "88": [0, 0.68611, 0.15681, 0, 0.86555], + "89": [0, 0.68611, 0.19803, 0, 0.86555], + "90": [0, 0.68611, 0.14208, 0, 0.70888], + "91": [0.25, 0.75, 0.1875, 0, 0.35611], + "93": [0.25, 0.75, 0.09972, 0, 0.35611], + "94": [0, 0.69444, 0.06709, 0, 0.59111], + "95": [0.31, 0.13444, 0.09811, 0, 0.59111], + "97": [0, 0.44444, 0.09426, 0, 0.59111], + "98": [0, 0.69444, 0.07861, 0, 0.53222], + "99": [0, 0.44444, 0.05222, 0, 0.53222], + "100": [0, 0.69444, 0.10861, 0, 0.59111], + "101": [0, 0.44444, 0.085, 0, 0.53222], + "102": [0.19444, 0.69444, 0.21778, 0, 0.4], + "103": [0.19444, 0.44444, 0.105, 0, 0.53222], + "104": [0, 0.69444, 0.09426, 0, 0.59111], + "105": [0, 0.69326, 0.11387, 0, 0.35555], + "106": [0.19444, 0.69326, 0.1672, 0, 0.35555], + "107": [0, 0.69444, 0.11111, 0, 0.53222], + "108": [0, 0.69444, 0.10861, 0, 0.29666], + "109": [0, 0.44444, 0.09426, 0, 0.94444], + "110": [0, 0.44444, 0.09426, 0, 0.64999], + "111": [0, 0.44444, 0.07861, 0, 0.59111], + "112": [0.19444, 0.44444, 0.07861, 0, 0.59111], + "113": [0.19444, 0.44444, 0.105, 0, 0.53222], + "114": [0, 0.44444, 0.11111, 0, 0.50167], + "115": [0, 0.44444, 0.08167, 0, 0.48694], + "116": [0, 0.63492, 0.09639, 0, 0.385], + "117": [0, 0.44444, 0.09426, 0, 0.62055], + "118": [0, 0.44444, 0.11111, 0, 0.53222], + "119": [0, 0.44444, 0.11111, 0, 0.76777], + "120": [0, 0.44444, 0.12583, 0, 0.56055], + "121": [0.19444, 0.44444, 0.105, 0, 0.56166], + "122": [0, 0.44444, 0.13889, 0, 0.49055], + "126": [0.35, 0.34444, 0.11472, 0, 0.59111], + "160": [0, 0, 0, 0, 0.25], + "168": [0, 0.69444, 0.11473, 0, 0.59111], + "176": [0, 0.69444, 0, 0, 0.94888], + "184": [0.17014, 0, 0, 0, 0.53222], + "198": [0, 0.68611, 0.11431, 0, 1.02277], + "216": [0.04861, 0.73472, 0.09062, 0, 0.88555], + "223": [0.19444, 0.69444, 0.09736, 0, 0.665], + "230": [0, 0.44444, 0.085, 0, 0.82666], + "248": [0.09722, 0.54167, 0.09458, 0, 0.59111], + "305": [0, 0.44444, 0.09426, 0, 0.35555], + "338": [0, 0.68611, 0.11431, 0, 1.14054], + "339": [0, 0.44444, 0.085, 0, 0.82666], + "567": [0.19444, 0.44444, 0.04611, 0, 0.385], + "710": [0, 0.69444, 0.06709, 0, 0.59111], + "711": [0, 0.63194, 0.08271, 0, 0.59111], + "713": [0, 0.59444, 0.10444, 0, 0.59111], + "714": [0, 0.69444, 0.08528, 0, 0.59111], + "715": [0, 0.69444, 0, 0, 0.59111], + "728": [0, 0.69444, 0.10333, 0, 0.59111], + "729": [0, 0.69444, 0.12945, 0, 0.35555], + "730": [0, 0.69444, 0, 0, 0.94888], + "732": [0, 0.69444, 0.11472, 0, 0.59111], + "733": [0, 0.69444, 0.11472, 0, 0.59111], + "915": [0, 0.68611, 0.12903, 0, 0.69777], + "916": [0, 0.68611, 0, 0, 0.94444], + "920": [0, 0.68611, 0.09062, 0, 0.88555], + "923": [0, 0.68611, 0, 0, 0.80666], + "926": [0, 0.68611, 0.15092, 0, 0.76777], + "928": [0, 0.68611, 0.17208, 0, 0.8961], + "931": [0, 0.68611, 0.11431, 0, 0.82666], + "933": [0, 0.68611, 0.10778, 0, 0.88555], + "934": [0, 0.68611, 0.05632, 0, 0.82666], + "936": [0, 0.68611, 0.10778, 0, 0.88555], + "937": [0, 0.68611, 0.0992, 0, 0.82666], + "8211": [0, 0.44444, 0.09811, 0, 0.59111], + "8212": [0, 0.44444, 0.09811, 0, 1.18221], + "8216": [0, 0.69444, 0.12945, 0, 0.35555], + "8217": [0, 0.69444, 0.12945, 0, 0.35555], + "8220": [0, 0.69444, 0.16772, 0, 0.62055], + "8221": [0, 0.69444, 0.07939, 0, 0.62055] + }, + "Main-Italic": { + "32": [0, 0, 0, 0, 0.25], + "33": [0, 0.69444, 0.12417, 0, 0.30667], + "34": [0, 0.69444, 0.06961, 0, 0.51444], + "35": [0.19444, 0.69444, 0.06616, 0, 0.81777], + "37": [0.05556, 0.75, 0.13639, 0, 0.81777], + "38": [0, 0.69444, 0.09694, 0, 0.76666], + "39": [0, 0.69444, 0.12417, 0, 0.30667], + "40": [0.25, 0.75, 0.16194, 0, 0.40889], + "41": [0.25, 0.75, 0.03694, 0, 0.40889], + "42": [0, 0.75, 0.14917, 0, 0.51111], + "43": [0.05667, 0.56167, 0.03694, 0, 0.76666], + "44": [0.19444, 0.10556, 0, 0, 0.30667], + "45": [0, 0.43056, 0.02826, 0, 0.35778], + "46": [0, 0.10556, 0, 0, 0.30667], + "47": [0.25, 0.75, 0.16194, 0, 0.51111], + "48": [0, 0.64444, 0.13556, 0, 0.51111], + "49": [0, 0.64444, 0.13556, 0, 0.51111], + "50": [0, 0.64444, 0.13556, 0, 0.51111], + "51": [0, 0.64444, 0.13556, 0, 0.51111], + "52": [0.19444, 0.64444, 0.13556, 0, 0.51111], + "53": [0, 0.64444, 0.13556, 0, 0.51111], + "54": [0, 0.64444, 0.13556, 0, 0.51111], + "55": [0.19444, 0.64444, 0.13556, 0, 0.51111], + "56": [0, 0.64444, 0.13556, 0, 0.51111], + "57": [0, 0.64444, 0.13556, 0, 0.51111], + "58": [0, 0.43056, 0.0582, 0, 0.30667], + "59": [0.19444, 0.43056, 0.0582, 0, 0.30667], + "61": [-0.13313, 0.36687, 0.06616, 0, 0.76666], + "63": [0, 0.69444, 0.1225, 0, 0.51111], + "64": [0, 0.69444, 0.09597, 0, 0.76666], + "65": [0, 0.68333, 0, 0, 0.74333], + "66": [0, 0.68333, 0.10257, 0, 0.70389], + "67": [0, 0.68333, 0.14528, 0, 0.71555], + "68": [0, 0.68333, 0.09403, 0, 0.755], + "69": [0, 0.68333, 0.12028, 0, 0.67833], + "70": [0, 0.68333, 0.13305, 0, 0.65277], + "71": [0, 0.68333, 0.08722, 0, 0.77361], + "72": [0, 0.68333, 0.16389, 0, 0.74333], + "73": [0, 0.68333, 0.15806, 0, 0.38555], + "74": [0, 0.68333, 0.14028, 0, 0.525], + "75": [0, 0.68333, 0.14528, 0, 0.76888], + "76": [0, 0.68333, 0, 0, 0.62722], + "77": [0, 0.68333, 0.16389, 0, 0.89666], + "78": [0, 0.68333, 0.16389, 0, 0.74333], + "79": [0, 0.68333, 0.09403, 0, 0.76666], + "80": [0, 0.68333, 0.10257, 0, 0.67833], + "81": [0.19444, 0.68333, 0.09403, 0, 0.76666], + "82": [0, 0.68333, 0.03868, 0, 0.72944], + "83": [0, 0.68333, 0.11972, 0, 0.56222], + "84": [0, 0.68333, 0.13305, 0, 0.71555], + "85": [0, 0.68333, 0.16389, 0, 0.74333], + "86": [0, 0.68333, 0.18361, 0, 0.74333], + "87": [0, 0.68333, 0.18361, 0, 0.99888], + "88": [0, 0.68333, 0.15806, 0, 0.74333], + "89": [0, 0.68333, 0.19383, 0, 0.74333], + "90": [0, 0.68333, 0.14528, 0, 0.61333], + "91": [0.25, 0.75, 0.1875, 0, 0.30667], + "93": [0.25, 0.75, 0.10528, 0, 0.30667], + "94": [0, 0.69444, 0.06646, 0, 0.51111], + "95": [0.31, 0.12056, 0.09208, 0, 0.51111], + "97": [0, 0.43056, 0.07671, 0, 0.51111], + "98": [0, 0.69444, 0.06312, 0, 0.46], + "99": [0, 0.43056, 0.05653, 0, 0.46], + "100": [0, 0.69444, 0.10333, 0, 0.51111], + "101": [0, 0.43056, 0.07514, 0, 0.46], + "102": [0.19444, 0.69444, 0.21194, 0, 0.30667], + "103": [0.19444, 0.43056, 0.08847, 0, 0.46], + "104": [0, 0.69444, 0.07671, 0, 0.51111], + "105": [0, 0.65536, 0.1019, 0, 0.30667], + "106": [0.19444, 0.65536, 0.14467, 0, 0.30667], + "107": [0, 0.69444, 0.10764, 0, 0.46], + "108": [0, 0.69444, 0.10333, 0, 0.25555], + "109": [0, 0.43056, 0.07671, 0, 0.81777], + "110": [0, 0.43056, 0.07671, 0, 0.56222], + "111": [0, 0.43056, 0.06312, 0, 0.51111], + "112": [0.19444, 0.43056, 0.06312, 0, 0.51111], + "113": [0.19444, 0.43056, 0.08847, 0, 0.46], + "114": [0, 0.43056, 0.10764, 0, 0.42166], + "115": [0, 0.43056, 0.08208, 0, 0.40889], + "116": [0, 0.61508, 0.09486, 0, 0.33222], + "117": [0, 0.43056, 0.07671, 0, 0.53666], + "118": [0, 0.43056, 0.10764, 0, 0.46], + "119": [0, 0.43056, 0.10764, 0, 0.66444], + "120": [0, 0.43056, 0.12042, 0, 0.46389], + "121": [0.19444, 0.43056, 0.08847, 0, 0.48555], + "122": [0, 0.43056, 0.12292, 0, 0.40889], + "126": [0.35, 0.31786, 0.11585, 0, 0.51111], + "160": [0, 0, 0, 0, 0.25], + "168": [0, 0.66786, 0.10474, 0, 0.51111], + "176": [0, 0.69444, 0, 0, 0.83129], + "184": [0.17014, 0, 0, 0, 0.46], + "198": [0, 0.68333, 0.12028, 0, 0.88277], + "216": [0.04861, 0.73194, 0.09403, 0, 0.76666], + "223": [0.19444, 0.69444, 0.10514, 0, 0.53666], + "230": [0, 0.43056, 0.07514, 0, 0.71555], + "248": [0.09722, 0.52778, 0.09194, 0, 0.51111], + "338": [0, 0.68333, 0.12028, 0, 0.98499], + "339": [0, 0.43056, 0.07514, 0, 0.71555], + "710": [0, 0.69444, 0.06646, 0, 0.51111], + "711": [0, 0.62847, 0.08295, 0, 0.51111], + "713": [0, 0.56167, 0.10333, 0, 0.51111], + "714": [0, 0.69444, 0.09694, 0, 0.51111], + "715": [0, 0.69444, 0, 0, 0.51111], + "728": [0, 0.69444, 0.10806, 0, 0.51111], + "729": [0, 0.66786, 0.11752, 0, 0.30667], + "730": [0, 0.69444, 0, 0, 0.83129], + "732": [0, 0.66786, 0.11585, 0, 0.51111], + "733": [0, 0.69444, 0.1225, 0, 0.51111], + "915": [0, 0.68333, 0.13305, 0, 0.62722], + "916": [0, 0.68333, 0, 0, 0.81777], + "920": [0, 0.68333, 0.09403, 0, 0.76666], + "923": [0, 0.68333, 0, 0, 0.69222], + "926": [0, 0.68333, 0.15294, 0, 0.66444], + "928": [0, 0.68333, 0.16389, 0, 0.74333], + "931": [0, 0.68333, 0.12028, 0, 0.71555], + "933": [0, 0.68333, 0.11111, 0, 0.76666], + "934": [0, 0.68333, 0.05986, 0, 0.71555], + "936": [0, 0.68333, 0.11111, 0, 0.76666], + "937": [0, 0.68333, 0.10257, 0, 0.71555], + "8211": [0, 0.43056, 0.09208, 0, 0.51111], + "8212": [0, 0.43056, 0.09208, 0, 1.02222], + "8216": [0, 0.69444, 0.12417, 0, 0.30667], + "8217": [0, 0.69444, 0.12417, 0, 0.30667], + "8220": [0, 0.69444, 0.1685, 0, 0.51444], + "8221": [0, 0.69444, 0.06961, 0, 0.51444], + "8463": [0, 0.68889, 0, 0, 0.54028] + }, + "Main-Regular": { + "32": [0, 0, 0, 0, 0.25], + "33": [0, 0.69444, 0, 0, 0.27778], + "34": [0, 0.69444, 0, 0, 0.5], + "35": [0.19444, 0.69444, 0, 0, 0.83334], + "36": [0.05556, 0.75, 0, 0, 0.5], + "37": [0.05556, 0.75, 0, 0, 0.83334], + "38": [0, 0.69444, 0, 0, 0.77778], + "39": [0, 0.69444, 0, 0, 0.27778], + "40": [0.25, 0.75, 0, 0, 0.38889], + "41": [0.25, 0.75, 0, 0, 0.38889], + "42": [0, 0.75, 0, 0, 0.5], + "43": [0.08333, 0.58333, 0, 0, 0.77778], + "44": [0.19444, 0.10556, 0, 0, 0.27778], + "45": [0, 0.43056, 0, 0, 0.33333], + "46": [0, 0.10556, 0, 0, 0.27778], + "47": [0.25, 0.75, 0, 0, 0.5], + "48": [0, 0.64444, 0, 0, 0.5], + "49": [0, 0.64444, 0, 0, 0.5], + "50": [0, 0.64444, 0, 0, 0.5], + "51": [0, 0.64444, 0, 0, 0.5], + "52": [0, 0.64444, 0, 0, 0.5], + "53": [0, 0.64444, 0, 0, 0.5], + "54": [0, 0.64444, 0, 0, 0.5], + "55": [0, 0.64444, 0, 0, 0.5], + "56": [0, 0.64444, 0, 0, 0.5], + "57": [0, 0.64444, 0, 0, 0.5], + "58": [0, 0.43056, 0, 0, 0.27778], + "59": [0.19444, 0.43056, 0, 0, 0.27778], + "60": [0.0391, 0.5391, 0, 0, 0.77778], + "61": [-0.13313, 0.36687, 0, 0, 0.77778], + "62": [0.0391, 0.5391, 0, 0, 0.77778], + "63": [0, 0.69444, 0, 0, 0.47222], + "64": [0, 0.69444, 0, 0, 0.77778], + "65": [0, 0.68333, 0, 0, 0.75], + "66": [0, 0.68333, 0, 0, 0.70834], + "67": [0, 0.68333, 0, 0, 0.72222], + "68": [0, 0.68333, 0, 0, 0.76389], + "69": [0, 0.68333, 0, 0, 0.68056], + "70": [0, 0.68333, 0, 0, 0.65278], + "71": [0, 0.68333, 0, 0, 0.78472], + "72": [0, 0.68333, 0, 0, 0.75], + "73": [0, 0.68333, 0, 0, 0.36111], + "74": [0, 0.68333, 0, 0, 0.51389], + "75": [0, 0.68333, 0, 0, 0.77778], + "76": [0, 0.68333, 0, 0, 0.625], + "77": [0, 0.68333, 0, 0, 0.91667], + "78": [0, 0.68333, 0, 0, 0.75], + "79": [0, 0.68333, 0, 0, 0.77778], + "80": [0, 0.68333, 0, 0, 0.68056], + "81": [0.19444, 0.68333, 0, 0, 0.77778], + "82": [0, 0.68333, 0, 0, 0.73611], + "83": [0, 0.68333, 0, 0, 0.55556], + "84": [0, 0.68333, 0, 0, 0.72222], + "85": [0, 0.68333, 0, 0, 0.75], + "86": [0, 0.68333, 0.01389, 0, 0.75], + "87": [0, 0.68333, 0.01389, 0, 1.02778], + "88": [0, 0.68333, 0, 0, 0.75], + "89": [0, 0.68333, 0.025, 0, 0.75], + "90": [0, 0.68333, 0, 0, 0.61111], + "91": [0.25, 0.75, 0, 0, 0.27778], + "92": [0.25, 0.75, 0, 0, 0.5], + "93": [0.25, 0.75, 0, 0, 0.27778], + "94": [0, 0.69444, 0, 0, 0.5], + "95": [0.31, 0.12056, 0.02778, 0, 0.5], + "97": [0, 0.43056, 0, 0, 0.5], + "98": [0, 0.69444, 0, 0, 0.55556], + "99": [0, 0.43056, 0, 0, 0.44445], + "100": [0, 0.69444, 0, 0, 0.55556], + "101": [0, 0.43056, 0, 0, 0.44445], + "102": [0, 0.69444, 0.07778, 0, 0.30556], + "103": [0.19444, 0.43056, 0.01389, 0, 0.5], + "104": [0, 0.69444, 0, 0, 0.55556], + "105": [0, 0.66786, 0, 0, 0.27778], + "106": [0.19444, 0.66786, 0, 0, 0.30556], + "107": [0, 0.69444, 0, 0, 0.52778], + "108": [0, 0.69444, 0, 0, 0.27778], + "109": [0, 0.43056, 0, 0, 0.83334], + "110": [0, 0.43056, 0, 0, 0.55556], + "111": [0, 0.43056, 0, 0, 0.5], + "112": [0.19444, 0.43056, 0, 0, 0.55556], + "113": [0.19444, 0.43056, 0, 0, 0.52778], + "114": [0, 0.43056, 0, 0, 0.39167], + "115": [0, 0.43056, 0, 0, 0.39445], + "116": [0, 0.61508, 0, 0, 0.38889], + "117": [0, 0.43056, 0, 0, 0.55556], + "118": [0, 0.43056, 0.01389, 0, 0.52778], + "119": [0, 0.43056, 0.01389, 0, 0.72222], + "120": [0, 0.43056, 0, 0, 0.52778], + "121": [0.19444, 0.43056, 0.01389, 0, 0.52778], + "122": [0, 0.43056, 0, 0, 0.44445], + "123": [0.25, 0.75, 0, 0, 0.5], + "124": [0.25, 0.75, 0, 0, 0.27778], + "125": [0.25, 0.75, 0, 0, 0.5], + "126": [0.35, 0.31786, 0, 0, 0.5], + "160": [0, 0, 0, 0, 0.25], + "163": [0, 0.69444, 0, 0, 0.76909], + "167": [0.19444, 0.69444, 0, 0, 0.44445], + "168": [0, 0.66786, 0, 0, 0.5], + "172": [0, 0.43056, 0, 0, 0.66667], + "176": [0, 0.69444, 0, 0, 0.75], + "177": [0.08333, 0.58333, 0, 0, 0.77778], + "182": [0.19444, 0.69444, 0, 0, 0.61111], + "184": [0.17014, 0, 0, 0, 0.44445], + "198": [0, 0.68333, 0, 0, 0.90278], + "215": [0.08333, 0.58333, 0, 0, 0.77778], + "216": [0.04861, 0.73194, 0, 0, 0.77778], + "223": [0, 0.69444, 0, 0, 0.5], + "230": [0, 0.43056, 0, 0, 0.72222], + "247": [0.08333, 0.58333, 0, 0, 0.77778], + "248": [0.09722, 0.52778, 0, 0, 0.5], + "305": [0, 0.43056, 0, 0, 0.27778], + "338": [0, 0.68333, 0, 0, 1.01389], + "339": [0, 0.43056, 0, 0, 0.77778], + "567": [0.19444, 0.43056, 0, 0, 0.30556], + "710": [0, 0.69444, 0, 0, 0.5], + "711": [0, 0.62847, 0, 0, 0.5], + "713": [0, 0.56778, 0, 0, 0.5], + "714": [0, 0.69444, 0, 0, 0.5], + "715": [0, 0.69444, 0, 0, 0.5], + "728": [0, 0.69444, 0, 0, 0.5], + "729": [0, 0.66786, 0, 0, 0.27778], + "730": [0, 0.69444, 0, 0, 0.75], + "732": [0, 0.66786, 0, 0, 0.5], + "733": [0, 0.69444, 0, 0, 0.5], + "915": [0, 0.68333, 0, 0, 0.625], + "916": [0, 0.68333, 0, 0, 0.83334], + "920": [0, 0.68333, 0, 0, 0.77778], + "923": [0, 0.68333, 0, 0, 0.69445], + "926": [0, 0.68333, 0, 0, 0.66667], + "928": [0, 0.68333, 0, 0, 0.75], + "931": [0, 0.68333, 0, 0, 0.72222], + "933": [0, 0.68333, 0, 0, 0.77778], + "934": [0, 0.68333, 0, 0, 0.72222], + "936": [0, 0.68333, 0, 0, 0.77778], + "937": [0, 0.68333, 0, 0, 0.72222], + "8211": [0, 0.43056, 0.02778, 0, 0.5], + "8212": [0, 0.43056, 0.02778, 0, 1.0], + "8216": [0, 0.69444, 0, 0, 0.27778], + "8217": [0, 0.69444, 0, 0, 0.27778], + "8220": [0, 0.69444, 0, 0, 0.5], + "8221": [0, 0.69444, 0, 0, 0.5], + "8224": [0.19444, 0.69444, 0, 0, 0.44445], + "8225": [0.19444, 0.69444, 0, 0, 0.44445], + "8230": [0, 0.123, 0, 0, 1.172], + "8242": [0, 0.55556, 0, 0, 0.275], + "8407": [0, 0.71444, 0.15382, 0, 0.5], + "8463": [0, 0.68889, 0, 0, 0.54028], + "8465": [0, 0.69444, 0, 0, 0.72222], + "8467": [0, 0.69444, 0, 0.11111, 0.41667], + "8472": [0.19444, 0.43056, 0, 0.11111, 0.63646], + "8476": [0, 0.69444, 0, 0, 0.72222], + "8501": [0, 0.69444, 0, 0, 0.61111], + "8592": [-0.13313, 0.36687, 0, 0, 1.0], + "8593": [0.19444, 0.69444, 0, 0, 0.5], + "8594": [-0.13313, 0.36687, 0, 0, 1.0], + "8595": [0.19444, 0.69444, 0, 0, 0.5], + "8596": [-0.13313, 0.36687, 0, 0, 1.0], + "8597": [0.25, 0.75, 0, 0, 0.5], + "8598": [0.19444, 0.69444, 0, 0, 1.0], + "8599": [0.19444, 0.69444, 0, 0, 1.0], + "8600": [0.19444, 0.69444, 0, 0, 1.0], + "8601": [0.19444, 0.69444, 0, 0, 1.0], + "8614": [0.011, 0.511, 0, 0, 1.0], + "8617": [0.011, 0.511, 0, 0, 1.126], + "8618": [0.011, 0.511, 0, 0, 1.126], + "8636": [-0.13313, 0.36687, 0, 0, 1.0], + "8637": [-0.13313, 0.36687, 0, 0, 1.0], + "8640": [-0.13313, 0.36687, 0, 0, 1.0], + "8641": [-0.13313, 0.36687, 0, 0, 1.0], + "8652": [0.011, 0.671, 0, 0, 1.0], + "8656": [-0.13313, 0.36687, 0, 0, 1.0], + "8657": [0.19444, 0.69444, 0, 0, 0.61111], + "8658": [-0.13313, 0.36687, 0, 0, 1.0], + "8659": [0.19444, 0.69444, 0, 0, 0.61111], + "8660": [-0.13313, 0.36687, 0, 0, 1.0], + "8661": [0.25, 0.75, 0, 0, 0.61111], + "8704": [0, 0.69444, 0, 0, 0.55556], + "8706": [0, 0.69444, 0.05556, 0.08334, 0.5309], + "8707": [0, 0.69444, 0, 0, 0.55556], + "8709": [0.05556, 0.75, 0, 0, 0.5], + "8711": [0, 0.68333, 0, 0, 0.83334], + "8712": [0.0391, 0.5391, 0, 0, 0.66667], + "8715": [0.0391, 0.5391, 0, 0, 0.66667], + "8722": [0.08333, 0.58333, 0, 0, 0.77778], + "8723": [0.08333, 0.58333, 0, 0, 0.77778], + "8725": [0.25, 0.75, 0, 0, 0.5], + "8726": [0.25, 0.75, 0, 0, 0.5], + "8727": [-0.03472, 0.46528, 0, 0, 0.5], + "8728": [-0.05555, 0.44445, 0, 0, 0.5], + "8729": [-0.05555, 0.44445, 0, 0, 0.5], + "8730": [0.2, 0.8, 0, 0, 0.83334], + "8733": [0, 0.43056, 0, 0, 0.77778], + "8734": [0, 0.43056, 0, 0, 1.0], + "8736": [0, 0.69224, 0, 0, 0.72222], + "8739": [0.25, 0.75, 0, 0, 0.27778], + "8741": [0.25, 0.75, 0, 0, 0.5], + "8743": [0, 0.55556, 0, 0, 0.66667], + "8744": [0, 0.55556, 0, 0, 0.66667], + "8745": [0, 0.55556, 0, 0, 0.66667], + "8746": [0, 0.55556, 0, 0, 0.66667], + "8747": [0.19444, 0.69444, 0.11111, 0, 0.41667], + "8764": [-0.13313, 0.36687, 0, 0, 0.77778], + "8768": [0.19444, 0.69444, 0, 0, 0.27778], + "8771": [-0.03625, 0.46375, 0, 0, 0.77778], + "8773": [-0.022, 0.589, 0, 0, 0.778], + "8776": [-0.01688, 0.48312, 0, 0, 0.77778], + "8781": [-0.03625, 0.46375, 0, 0, 0.77778], + "8784": [-0.133, 0.673, 0, 0, 0.778], + "8801": [-0.03625, 0.46375, 0, 0, 0.77778], + "8804": [0.13597, 0.63597, 0, 0, 0.77778], + "8805": [0.13597, 0.63597, 0, 0, 0.77778], + "8810": [0.0391, 0.5391, 0, 0, 1.0], + "8811": [0.0391, 0.5391, 0, 0, 1.0], + "8826": [0.0391, 0.5391, 0, 0, 0.77778], + "8827": [0.0391, 0.5391, 0, 0, 0.77778], + "8834": [0.0391, 0.5391, 0, 0, 0.77778], + "8835": [0.0391, 0.5391, 0, 0, 0.77778], + "8838": [0.13597, 0.63597, 0, 0, 0.77778], + "8839": [0.13597, 0.63597, 0, 0, 0.77778], + "8846": [0, 0.55556, 0, 0, 0.66667], + "8849": [0.13597, 0.63597, 0, 0, 0.77778], + "8850": [0.13597, 0.63597, 0, 0, 0.77778], + "8851": [0, 0.55556, 0, 0, 0.66667], + "8852": [0, 0.55556, 0, 0, 0.66667], + "8853": [0.08333, 0.58333, 0, 0, 0.77778], + "8854": [0.08333, 0.58333, 0, 0, 0.77778], + "8855": [0.08333, 0.58333, 0, 0, 0.77778], + "8856": [0.08333, 0.58333, 0, 0, 0.77778], + "8857": [0.08333, 0.58333, 0, 0, 0.77778], + "8866": [0, 0.69444, 0, 0, 0.61111], + "8867": [0, 0.69444, 0, 0, 0.61111], + "8868": [0, 0.69444, 0, 0, 0.77778], + "8869": [0, 0.69444, 0, 0, 0.77778], + "8872": [0.249, 0.75, 0, 0, 0.867], + "8900": [-0.05555, 0.44445, 0, 0, 0.5], + "8901": [-0.05555, 0.44445, 0, 0, 0.27778], + "8902": [-0.03472, 0.46528, 0, 0, 0.5], + "8904": [0.005, 0.505, 0, 0, 0.9], + "8942": [0.03, 0.903, 0, 0, 0.278], + "8943": [-0.19, 0.313, 0, 0, 1.172], + "8945": [-0.1, 0.823, 0, 0, 1.282], + "8968": [0.25, 0.75, 0, 0, 0.44445], + "8969": [0.25, 0.75, 0, 0, 0.44445], + "8970": [0.25, 0.75, 0, 0, 0.44445], + "8971": [0.25, 0.75, 0, 0, 0.44445], + "8994": [-0.14236, 0.35764, 0, 0, 1.0], + "8995": [-0.14236, 0.35764, 0, 0, 1.0], + "9136": [0.244, 0.744, 0, 0, 0.412], + "9137": [0.244, 0.745, 0, 0, 0.412], + "9651": [0.19444, 0.69444, 0, 0, 0.88889], + "9657": [-0.03472, 0.46528, 0, 0, 0.5], + "9661": [0.19444, 0.69444, 0, 0, 0.88889], + "9667": [-0.03472, 0.46528, 0, 0, 0.5], + "9711": [0.19444, 0.69444, 0, 0, 1.0], + "9824": [0.12963, 0.69444, 0, 0, 0.77778], + "9825": [0.12963, 0.69444, 0, 0, 0.77778], + "9826": [0.12963, 0.69444, 0, 0, 0.77778], + "9827": [0.12963, 0.69444, 0, 0, 0.77778], + "9837": [0, 0.75, 0, 0, 0.38889], + "9838": [0.19444, 0.69444, 0, 0, 0.38889], + "9839": [0.19444, 0.69444, 0, 0, 0.38889], + "10216": [0.25, 0.75, 0, 0, 0.38889], + "10217": [0.25, 0.75, 0, 0, 0.38889], + "10222": [0.244, 0.744, 0, 0, 0.412], + "10223": [0.244, 0.745, 0, 0, 0.412], + "10229": [0.011, 0.511, 0, 0, 1.609], + "10230": [0.011, 0.511, 0, 0, 1.638], + "10231": [0.011, 0.511, 0, 0, 1.859], + "10232": [0.024, 0.525, 0, 0, 1.609], + "10233": [0.024, 0.525, 0, 0, 1.638], + "10234": [0.024, 0.525, 0, 0, 1.858], + "10236": [0.011, 0.511, 0, 0, 1.638], + "10815": [0, 0.68333, 0, 0, 0.75], + "10927": [0.13597, 0.63597, 0, 0, 0.77778], + "10928": [0.13597, 0.63597, 0, 0, 0.77778], + "57376": [0.19444, 0.69444, 0, 0, 0] + }, + "Math-BoldItalic": { + "32": [0, 0, 0, 0, 0.25], + "48": [0, 0.44444, 0, 0, 0.575], + "49": [0, 0.44444, 0, 0, 0.575], + "50": [0, 0.44444, 0, 0, 0.575], + "51": [0.19444, 0.44444, 0, 0, 0.575], + "52": [0.19444, 0.44444, 0, 0, 0.575], + "53": [0.19444, 0.44444, 0, 0, 0.575], + "54": [0, 0.64444, 0, 0, 0.575], + "55": [0.19444, 0.44444, 0, 0, 0.575], + "56": [0, 0.64444, 0, 0, 0.575], + "57": [0.19444, 0.44444, 0, 0, 0.575], + "65": [0, 0.68611, 0, 0, 0.86944], + "66": [0, 0.68611, 0.04835, 0, 0.8664], + "67": [0, 0.68611, 0.06979, 0, 0.81694], + "68": [0, 0.68611, 0.03194, 0, 0.93812], + "69": [0, 0.68611, 0.05451, 0, 0.81007], + "70": [0, 0.68611, 0.15972, 0, 0.68889], + "71": [0, 0.68611, 0, 0, 0.88673], + "72": [0, 0.68611, 0.08229, 0, 0.98229], + "73": [0, 0.68611, 0.07778, 0, 0.51111], + "74": [0, 0.68611, 0.10069, 0, 0.63125], + "75": [0, 0.68611, 0.06979, 0, 0.97118], + "76": [0, 0.68611, 0, 0, 0.75555], + "77": [0, 0.68611, 0.11424, 0, 1.14201], + "78": [0, 0.68611, 0.11424, 0, 0.95034], + "79": [0, 0.68611, 0.03194, 0, 0.83666], + "80": [0, 0.68611, 0.15972, 0, 0.72309], + "81": [0.19444, 0.68611, 0, 0, 0.86861], + "82": [0, 0.68611, 0.00421, 0, 0.87235], + "83": [0, 0.68611, 0.05382, 0, 0.69271], + "84": [0, 0.68611, 0.15972, 0, 0.63663], + "85": [0, 0.68611, 0.11424, 0, 0.80027], + "86": [0, 0.68611, 0.25555, 0, 0.67778], + "87": [0, 0.68611, 0.15972, 0, 1.09305], + "88": [0, 0.68611, 0.07778, 0, 0.94722], + "89": [0, 0.68611, 0.25555, 0, 0.67458], + "90": [0, 0.68611, 0.06979, 0, 0.77257], + "97": [0, 0.44444, 0, 0, 0.63287], + "98": [0, 0.69444, 0, 0, 0.52083], + "99": [0, 0.44444, 0, 0, 0.51342], + "100": [0, 0.69444, 0, 0, 0.60972], + "101": [0, 0.44444, 0, 0, 0.55361], + "102": [0.19444, 0.69444, 0.11042, 0, 0.56806], + "103": [0.19444, 0.44444, 0.03704, 0, 0.5449], + "104": [0, 0.69444, 0, 0, 0.66759], + "105": [0, 0.69326, 0, 0, 0.4048], + "106": [0.19444, 0.69326, 0.0622, 0, 0.47083], + "107": [0, 0.69444, 0.01852, 0, 0.6037], + "108": [0, 0.69444, 0.0088, 0, 0.34815], + "109": [0, 0.44444, 0, 0, 1.0324], + "110": [0, 0.44444, 0, 0, 0.71296], + "111": [0, 0.44444, 0, 0, 0.58472], + "112": [0.19444, 0.44444, 0, 0, 0.60092], + "113": [0.19444, 0.44444, 0.03704, 0, 0.54213], + "114": [0, 0.44444, 0.03194, 0, 0.5287], + "115": [0, 0.44444, 0, 0, 0.53125], + "116": [0, 0.63492, 0, 0, 0.41528], + "117": [0, 0.44444, 0, 0, 0.68102], + "118": [0, 0.44444, 0.03704, 0, 0.56666], + "119": [0, 0.44444, 0.02778, 0, 0.83148], + "120": [0, 0.44444, 0, 0, 0.65903], + "121": [0.19444, 0.44444, 0.03704, 0, 0.59028], + "122": [0, 0.44444, 0.04213, 0, 0.55509], + "160": [0, 0, 0, 0, 0.25], + "915": [0, 0.68611, 0.15972, 0, 0.65694], + "916": [0, 0.68611, 0, 0, 0.95833], + "920": [0, 0.68611, 0.03194, 0, 0.86722], + "923": [0, 0.68611, 0, 0, 0.80555], + "926": [0, 0.68611, 0.07458, 0, 0.84125], + "928": [0, 0.68611, 0.08229, 0, 0.98229], + "931": [0, 0.68611, 0.05451, 0, 0.88507], + "933": [0, 0.68611, 0.15972, 0, 0.67083], + "934": [0, 0.68611, 0, 0, 0.76666], + "936": [0, 0.68611, 0.11653, 0, 0.71402], + "937": [0, 0.68611, 0.04835, 0, 0.8789], + "945": [0, 0.44444, 0, 0, 0.76064], + "946": [0.19444, 0.69444, 0.03403, 0, 0.65972], + "947": [0.19444, 0.44444, 0.06389, 0, 0.59003], + "948": [0, 0.69444, 0.03819, 0, 0.52222], + "949": [0, 0.44444, 0, 0, 0.52882], + "950": [0.19444, 0.69444, 0.06215, 0, 0.50833], + "951": [0.19444, 0.44444, 0.03704, 0, 0.6], + "952": [0, 0.69444, 0.03194, 0, 0.5618], + "953": [0, 0.44444, 0, 0, 0.41204], + "954": [0, 0.44444, 0, 0, 0.66759], + "955": [0, 0.69444, 0, 0, 0.67083], + "956": [0.19444, 0.44444, 0, 0, 0.70787], + "957": [0, 0.44444, 0.06898, 0, 0.57685], + "958": [0.19444, 0.69444, 0.03021, 0, 0.50833], + "959": [0, 0.44444, 0, 0, 0.58472], + "960": [0, 0.44444, 0.03704, 0, 0.68241], + "961": [0.19444, 0.44444, 0, 0, 0.6118], + "962": [0.09722, 0.44444, 0.07917, 0, 0.42361], + "963": [0, 0.44444, 0.03704, 0, 0.68588], + "964": [0, 0.44444, 0.13472, 0, 0.52083], + "965": [0, 0.44444, 0.03704, 0, 0.63055], + "966": [0.19444, 0.44444, 0, 0, 0.74722], + "967": [0.19444, 0.44444, 0, 0, 0.71805], + "968": [0.19444, 0.69444, 0.03704, 0, 0.75833], + "969": [0, 0.44444, 0.03704, 0, 0.71782], + "977": [0, 0.69444, 0, 0, 0.69155], + "981": [0.19444, 0.69444, 0, 0, 0.7125], + "982": [0, 0.44444, 0.03194, 0, 0.975], + "1009": [0.19444, 0.44444, 0, 0, 0.6118], + "1013": [0, 0.44444, 0, 0, 0.48333], + "57649": [0, 0.44444, 0, 0, 0.39352], + "57911": [0.19444, 0.44444, 0, 0, 0.43889] + }, + "Math-Italic": { + "32": [0, 0, 0, 0, 0.25], + "48": [0, 0.43056, 0, 0, 0.5], + "49": [0, 0.43056, 0, 0, 0.5], + "50": [0, 0.43056, 0, 0, 0.5], + "51": [0.19444, 0.43056, 0, 0, 0.5], + "52": [0.19444, 0.43056, 0, 0, 0.5], + "53": [0.19444, 0.43056, 0, 0, 0.5], + "54": [0, 0.64444, 0, 0, 0.5], + "55": [0.19444, 0.43056, 0, 0, 0.5], + "56": [0, 0.64444, 0, 0, 0.5], + "57": [0.19444, 0.43056, 0, 0, 0.5], + "65": [0, 0.68333, 0, 0.13889, 0.75], + "66": [0, 0.68333, 0.05017, 0.08334, 0.75851], + "67": [0, 0.68333, 0.07153, 0.08334, 0.71472], + "68": [0, 0.68333, 0.02778, 0.05556, 0.82792], + "69": [0, 0.68333, 0.05764, 0.08334, 0.7382], + "70": [0, 0.68333, 0.13889, 0.08334, 0.64306], + "71": [0, 0.68333, 0, 0.08334, 0.78625], + "72": [0, 0.68333, 0.08125, 0.05556, 0.83125], + "73": [0, 0.68333, 0.07847, 0.11111, 0.43958], + "74": [0, 0.68333, 0.09618, 0.16667, 0.55451], + "75": [0, 0.68333, 0.07153, 0.05556, 0.84931], + "76": [0, 0.68333, 0, 0.02778, 0.68056], + "77": [0, 0.68333, 0.10903, 0.08334, 0.97014], + "78": [0, 0.68333, 0.10903, 0.08334, 0.80347], + "79": [0, 0.68333, 0.02778, 0.08334, 0.76278], + "80": [0, 0.68333, 0.13889, 0.08334, 0.64201], + "81": [0.19444, 0.68333, 0, 0.08334, 0.79056], + "82": [0, 0.68333, 0.00773, 0.08334, 0.75929], + "83": [0, 0.68333, 0.05764, 0.08334, 0.6132], + "84": [0, 0.68333, 0.13889, 0.08334, 0.58438], + "85": [0, 0.68333, 0.10903, 0.02778, 0.68278], + "86": [0, 0.68333, 0.22222, 0, 0.58333], + "87": [0, 0.68333, 0.13889, 0, 0.94445], + "88": [0, 0.68333, 0.07847, 0.08334, 0.82847], + "89": [0, 0.68333, 0.22222, 0, 0.58056], + "90": [0, 0.68333, 0.07153, 0.08334, 0.68264], + "97": [0, 0.43056, 0, 0, 0.52859], + "98": [0, 0.69444, 0, 0, 0.42917], + "99": [0, 0.43056, 0, 0.05556, 0.43276], + "100": [0, 0.69444, 0, 0.16667, 0.52049], + "101": [0, 0.43056, 0, 0.05556, 0.46563], + "102": [0.19444, 0.69444, 0.10764, 0.16667, 0.48959], + "103": [0.19444, 0.43056, 0.03588, 0.02778, 0.47697], + "104": [0, 0.69444, 0, 0, 0.57616], + "105": [0, 0.65952, 0, 0, 0.34451], + "106": [0.19444, 0.65952, 0.05724, 0, 0.41181], + "107": [0, 0.69444, 0.03148, 0, 0.5206], + "108": [0, 0.69444, 0.01968, 0.08334, 0.29838], + "109": [0, 0.43056, 0, 0, 0.87801], + "110": [0, 0.43056, 0, 0, 0.60023], + "111": [0, 0.43056, 0, 0.05556, 0.48472], + "112": [0.19444, 0.43056, 0, 0.08334, 0.50313], + "113": [0.19444, 0.43056, 0.03588, 0.08334, 0.44641], + "114": [0, 0.43056, 0.02778, 0.05556, 0.45116], + "115": [0, 0.43056, 0, 0.05556, 0.46875], + "116": [0, 0.61508, 0, 0.08334, 0.36111], + "117": [0, 0.43056, 0, 0.02778, 0.57246], + "118": [0, 0.43056, 0.03588, 0.02778, 0.48472], + "119": [0, 0.43056, 0.02691, 0.08334, 0.71592], + "120": [0, 0.43056, 0, 0.02778, 0.57153], + "121": [0.19444, 0.43056, 0.03588, 0.05556, 0.49028], + "122": [0, 0.43056, 0.04398, 0.05556, 0.46505], + "160": [0, 0, 0, 0, 0.25], + "915": [0, 0.68333, 0.13889, 0.08334, 0.61528], + "916": [0, 0.68333, 0, 0.16667, 0.83334], + "920": [0, 0.68333, 0.02778, 0.08334, 0.76278], + "923": [0, 0.68333, 0, 0.16667, 0.69445], + "926": [0, 0.68333, 0.07569, 0.08334, 0.74236], + "928": [0, 0.68333, 0.08125, 0.05556, 0.83125], + "931": [0, 0.68333, 0.05764, 0.08334, 0.77986], + "933": [0, 0.68333, 0.13889, 0.05556, 0.58333], + "934": [0, 0.68333, 0, 0.08334, 0.66667], + "936": [0, 0.68333, 0.11, 0.05556, 0.61222], + "937": [0, 0.68333, 0.05017, 0.08334, 0.7724], + "945": [0, 0.43056, 0.0037, 0.02778, 0.6397], + "946": [0.19444, 0.69444, 0.05278, 0.08334, 0.56563], + "947": [0.19444, 0.43056, 0.05556, 0, 0.51773], + "948": [0, 0.69444, 0.03785, 0.05556, 0.44444], + "949": [0, 0.43056, 0, 0.08334, 0.46632], + "950": [0.19444, 0.69444, 0.07378, 0.08334, 0.4375], + "951": [0.19444, 0.43056, 0.03588, 0.05556, 0.49653], + "952": [0, 0.69444, 0.02778, 0.08334, 0.46944], + "953": [0, 0.43056, 0, 0.05556, 0.35394], + "954": [0, 0.43056, 0, 0, 0.57616], + "955": [0, 0.69444, 0, 0, 0.58334], + "956": [0.19444, 0.43056, 0, 0.02778, 0.60255], + "957": [0, 0.43056, 0.06366, 0.02778, 0.49398], + "958": [0.19444, 0.69444, 0.04601, 0.11111, 0.4375], + "959": [0, 0.43056, 0, 0.05556, 0.48472], + "960": [0, 0.43056, 0.03588, 0, 0.57003], + "961": [0.19444, 0.43056, 0, 0.08334, 0.51702], + "962": [0.09722, 0.43056, 0.07986, 0.08334, 0.36285], + "963": [0, 0.43056, 0.03588, 0, 0.57141], + "964": [0, 0.43056, 0.1132, 0.02778, 0.43715], + "965": [0, 0.43056, 0.03588, 0.02778, 0.54028], + "966": [0.19444, 0.43056, 0, 0.08334, 0.65417], + "967": [0.19444, 0.43056, 0, 0.05556, 0.62569], + "968": [0.19444, 0.69444, 0.03588, 0.11111, 0.65139], + "969": [0, 0.43056, 0.03588, 0, 0.62245], + "977": [0, 0.69444, 0, 0.08334, 0.59144], + "981": [0.19444, 0.69444, 0, 0.08334, 0.59583], + "982": [0, 0.43056, 0.02778, 0, 0.82813], + "1009": [0.19444, 0.43056, 0, 0.08334, 0.51702], + "1013": [0, 0.43056, 0, 0.05556, 0.4059], + "57649": [0, 0.43056, 0, 0.02778, 0.32246], + "57911": [0.19444, 0.43056, 0, 0.08334, 0.38403] + }, + "SansSerif-Bold": { + "32": [0, 0, 0, 0, 0.25], + "33": [0, 0.69444, 0, 0, 0.36667], + "34": [0, 0.69444, 0, 0, 0.55834], + "35": [0.19444, 0.69444, 0, 0, 0.91667], + "36": [0.05556, 0.75, 0, 0, 0.55], + "37": [0.05556, 0.75, 0, 0, 1.02912], + "38": [0, 0.69444, 0, 0, 0.83056], + "39": [0, 0.69444, 0, 0, 0.30556], + "40": [0.25, 0.75, 0, 0, 0.42778], + "41": [0.25, 0.75, 0, 0, 0.42778], + "42": [0, 0.75, 0, 0, 0.55], + "43": [0.11667, 0.61667, 0, 0, 0.85556], + "44": [0.10556, 0.13056, 0, 0, 0.30556], + "45": [0, 0.45833, 0, 0, 0.36667], + "46": [0, 0.13056, 0, 0, 0.30556], + "47": [0.25, 0.75, 0, 0, 0.55], + "48": [0, 0.69444, 0, 0, 0.55], + "49": [0, 0.69444, 0, 0, 0.55], + "50": [0, 0.69444, 0, 0, 0.55], + "51": [0, 0.69444, 0, 0, 0.55], + "52": [0, 0.69444, 0, 0, 0.55], + "53": [0, 0.69444, 0, 0, 0.55], + "54": [0, 0.69444, 0, 0, 0.55], + "55": [0, 0.69444, 0, 0, 0.55], + "56": [0, 0.69444, 0, 0, 0.55], + "57": [0, 0.69444, 0, 0, 0.55], + "58": [0, 0.45833, 0, 0, 0.30556], + "59": [0.10556, 0.45833, 0, 0, 0.30556], + "61": [-0.09375, 0.40625, 0, 0, 0.85556], + "63": [0, 0.69444, 0, 0, 0.51945], + "64": [0, 0.69444, 0, 0, 0.73334], + "65": [0, 0.69444, 0, 0, 0.73334], + "66": [0, 0.69444, 0, 0, 0.73334], + "67": [0, 0.69444, 0, 0, 0.70278], + "68": [0, 0.69444, 0, 0, 0.79445], + "69": [0, 0.69444, 0, 0, 0.64167], + "70": [0, 0.69444, 0, 0, 0.61111], + "71": [0, 0.69444, 0, 0, 0.73334], + "72": [0, 0.69444, 0, 0, 0.79445], + "73": [0, 0.69444, 0, 0, 0.33056], + "74": [0, 0.69444, 0, 0, 0.51945], + "75": [0, 0.69444, 0, 0, 0.76389], + "76": [0, 0.69444, 0, 0, 0.58056], + "77": [0, 0.69444, 0, 0, 0.97778], + "78": [0, 0.69444, 0, 0, 0.79445], + "79": [0, 0.69444, 0, 0, 0.79445], + "80": [0, 0.69444, 0, 0, 0.70278], + "81": [0.10556, 0.69444, 0, 0, 0.79445], + "82": [0, 0.69444, 0, 0, 0.70278], + "83": [0, 0.69444, 0, 0, 0.61111], + "84": [0, 0.69444, 0, 0, 0.73334], + "85": [0, 0.69444, 0, 0, 0.76389], + "86": [0, 0.69444, 0.01528, 0, 0.73334], + "87": [0, 0.69444, 0.01528, 0, 1.03889], + "88": [0, 0.69444, 0, 0, 0.73334], + "89": [0, 0.69444, 0.0275, 0, 0.73334], + "90": [0, 0.69444, 0, 0, 0.67223], + "91": [0.25, 0.75, 0, 0, 0.34306], + "93": [0.25, 0.75, 0, 0, 0.34306], + "94": [0, 0.69444, 0, 0, 0.55], + "95": [0.35, 0.10833, 0.03056, 0, 0.55], + "97": [0, 0.45833, 0, 0, 0.525], + "98": [0, 0.69444, 0, 0, 0.56111], + "99": [0, 0.45833, 0, 0, 0.48889], + "100": [0, 0.69444, 0, 0, 0.56111], + "101": [0, 0.45833, 0, 0, 0.51111], + "102": [0, 0.69444, 0.07639, 0, 0.33611], + "103": [0.19444, 0.45833, 0.01528, 0, 0.55], + "104": [0, 0.69444, 0, 0, 0.56111], + "105": [0, 0.69444, 0, 0, 0.25556], + "106": [0.19444, 0.69444, 0, 0, 0.28611], + "107": [0, 0.69444, 0, 0, 0.53056], + "108": [0, 0.69444, 0, 0, 0.25556], + "109": [0, 0.45833, 0, 0, 0.86667], + "110": [0, 0.45833, 0, 0, 0.56111], + "111": [0, 0.45833, 0, 0, 0.55], + "112": [0.19444, 0.45833, 0, 0, 0.56111], + "113": [0.19444, 0.45833, 0, 0, 0.56111], + "114": [0, 0.45833, 0.01528, 0, 0.37222], + "115": [0, 0.45833, 0, 0, 0.42167], + "116": [0, 0.58929, 0, 0, 0.40417], + "117": [0, 0.45833, 0, 0, 0.56111], + "118": [0, 0.45833, 0.01528, 0, 0.5], + "119": [0, 0.45833, 0.01528, 0, 0.74445], + "120": [0, 0.45833, 0, 0, 0.5], + "121": [0.19444, 0.45833, 0.01528, 0, 0.5], + "122": [0, 0.45833, 0, 0, 0.47639], + "126": [0.35, 0.34444, 0, 0, 0.55], + "160": [0, 0, 0, 0, 0.25], + "168": [0, 0.69444, 0, 0, 0.55], + "176": [0, 0.69444, 0, 0, 0.73334], + "180": [0, 0.69444, 0, 0, 0.55], + "184": [0.17014, 0, 0, 0, 0.48889], + "305": [0, 0.45833, 0, 0, 0.25556], + "567": [0.19444, 0.45833, 0, 0, 0.28611], + "710": [0, 0.69444, 0, 0, 0.55], + "711": [0, 0.63542, 0, 0, 0.55], + "713": [0, 0.63778, 0, 0, 0.55], + "728": [0, 0.69444, 0, 0, 0.55], + "729": [0, 0.69444, 0, 0, 0.30556], + "730": [0, 0.69444, 0, 0, 0.73334], + "732": [0, 0.69444, 0, 0, 0.55], + "733": [0, 0.69444, 0, 0, 0.55], + "915": [0, 0.69444, 0, 0, 0.58056], + "916": [0, 0.69444, 0, 0, 0.91667], + "920": [0, 0.69444, 0, 0, 0.85556], + "923": [0, 0.69444, 0, 0, 0.67223], + "926": [0, 0.69444, 0, 0, 0.73334], + "928": [0, 0.69444, 0, 0, 0.79445], + "931": [0, 0.69444, 0, 0, 0.79445], + "933": [0, 0.69444, 0, 0, 0.85556], + "934": [0, 0.69444, 0, 0, 0.79445], + "936": [0, 0.69444, 0, 0, 0.85556], + "937": [0, 0.69444, 0, 0, 0.79445], + "8211": [0, 0.45833, 0.03056, 0, 0.55], + "8212": [0, 0.45833, 0.03056, 0, 1.10001], + "8216": [0, 0.69444, 0, 0, 0.30556], + "8217": [0, 0.69444, 0, 0, 0.30556], + "8220": [0, 0.69444, 0, 0, 0.55834], + "8221": [0, 0.69444, 0, 0, 0.55834] + }, + "SansSerif-Italic": { + "32": [0, 0, 0, 0, 0.25], + "33": [0, 0.69444, 0.05733, 0, 0.31945], + "34": [0, 0.69444, 0.00316, 0, 0.5], + "35": [0.19444, 0.69444, 0.05087, 0, 0.83334], + "36": [0.05556, 0.75, 0.11156, 0, 0.5], + "37": [0.05556, 0.75, 0.03126, 0, 0.83334], + "38": [0, 0.69444, 0.03058, 0, 0.75834], + "39": [0, 0.69444, 0.07816, 0, 0.27778], + "40": [0.25, 0.75, 0.13164, 0, 0.38889], + "41": [0.25, 0.75, 0.02536, 0, 0.38889], + "42": [0, 0.75, 0.11775, 0, 0.5], + "43": [0.08333, 0.58333, 0.02536, 0, 0.77778], + "44": [0.125, 0.08333, 0, 0, 0.27778], + "45": [0, 0.44444, 0.01946, 0, 0.33333], + "46": [0, 0.08333, 0, 0, 0.27778], + "47": [0.25, 0.75, 0.13164, 0, 0.5], + "48": [0, 0.65556, 0.11156, 0, 0.5], + "49": [0, 0.65556, 0.11156, 0, 0.5], + "50": [0, 0.65556, 0.11156, 0, 0.5], + "51": [0, 0.65556, 0.11156, 0, 0.5], + "52": [0, 0.65556, 0.11156, 0, 0.5], + "53": [0, 0.65556, 0.11156, 0, 0.5], + "54": [0, 0.65556, 0.11156, 0, 0.5], + "55": [0, 0.65556, 0.11156, 0, 0.5], + "56": [0, 0.65556, 0.11156, 0, 0.5], + "57": [0, 0.65556, 0.11156, 0, 0.5], + "58": [0, 0.44444, 0.02502, 0, 0.27778], + "59": [0.125, 0.44444, 0.02502, 0, 0.27778], + "61": [-0.13, 0.37, 0.05087, 0, 0.77778], + "63": [0, 0.69444, 0.11809, 0, 0.47222], + "64": [0, 0.69444, 0.07555, 0, 0.66667], + "65": [0, 0.69444, 0, 0, 0.66667], + "66": [0, 0.69444, 0.08293, 0, 0.66667], + "67": [0, 0.69444, 0.11983, 0, 0.63889], + "68": [0, 0.69444, 0.07555, 0, 0.72223], + "69": [0, 0.69444, 0.11983, 0, 0.59722], + "70": [0, 0.69444, 0.13372, 0, 0.56945], + "71": [0, 0.69444, 0.11983, 0, 0.66667], + "72": [0, 0.69444, 0.08094, 0, 0.70834], + "73": [0, 0.69444, 0.13372, 0, 0.27778], + "74": [0, 0.69444, 0.08094, 0, 0.47222], + "75": [0, 0.69444, 0.11983, 0, 0.69445], + "76": [0, 0.69444, 0, 0, 0.54167], + "77": [0, 0.69444, 0.08094, 0, 0.875], + "78": [0, 0.69444, 0.08094, 0, 0.70834], + "79": [0, 0.69444, 0.07555, 0, 0.73611], + "80": [0, 0.69444, 0.08293, 0, 0.63889], + "81": [0.125, 0.69444, 0.07555, 0, 0.73611], + "82": [0, 0.69444, 0.08293, 0, 0.64584], + "83": [0, 0.69444, 0.09205, 0, 0.55556], + "84": [0, 0.69444, 0.13372, 0, 0.68056], + "85": [0, 0.69444, 0.08094, 0, 0.6875], + "86": [0, 0.69444, 0.1615, 0, 0.66667], + "87": [0, 0.69444, 0.1615, 0, 0.94445], + "88": [0, 0.69444, 0.13372, 0, 0.66667], + "89": [0, 0.69444, 0.17261, 0, 0.66667], + "90": [0, 0.69444, 0.11983, 0, 0.61111], + "91": [0.25, 0.75, 0.15942, 0, 0.28889], + "93": [0.25, 0.75, 0.08719, 0, 0.28889], + "94": [0, 0.69444, 0.0799, 0, 0.5], + "95": [0.35, 0.09444, 0.08616, 0, 0.5], + "97": [0, 0.44444, 0.00981, 0, 0.48056], + "98": [0, 0.69444, 0.03057, 0, 0.51667], + "99": [0, 0.44444, 0.08336, 0, 0.44445], + "100": [0, 0.69444, 0.09483, 0, 0.51667], + "101": [0, 0.44444, 0.06778, 0, 0.44445], + "102": [0, 0.69444, 0.21705, 0, 0.30556], + "103": [0.19444, 0.44444, 0.10836, 0, 0.5], + "104": [0, 0.69444, 0.01778, 0, 0.51667], + "105": [0, 0.67937, 0.09718, 0, 0.23889], + "106": [0.19444, 0.67937, 0.09162, 0, 0.26667], + "107": [0, 0.69444, 0.08336, 0, 0.48889], + "108": [0, 0.69444, 0.09483, 0, 0.23889], + "109": [0, 0.44444, 0.01778, 0, 0.79445], + "110": [0, 0.44444, 0.01778, 0, 0.51667], + "111": [0, 0.44444, 0.06613, 0, 0.5], + "112": [0.19444, 0.44444, 0.0389, 0, 0.51667], + "113": [0.19444, 0.44444, 0.04169, 0, 0.51667], + "114": [0, 0.44444, 0.10836, 0, 0.34167], + "115": [0, 0.44444, 0.0778, 0, 0.38333], + "116": [0, 0.57143, 0.07225, 0, 0.36111], + "117": [0, 0.44444, 0.04169, 0, 0.51667], + "118": [0, 0.44444, 0.10836, 0, 0.46111], + "119": [0, 0.44444, 0.10836, 0, 0.68334], + "120": [0, 0.44444, 0.09169, 0, 0.46111], + "121": [0.19444, 0.44444, 0.10836, 0, 0.46111], + "122": [0, 0.44444, 0.08752, 0, 0.43472], + "126": [0.35, 0.32659, 0.08826, 0, 0.5], + "160": [0, 0, 0, 0, 0.25], + "168": [0, 0.67937, 0.06385, 0, 0.5], + "176": [0, 0.69444, 0, 0, 0.73752], + "184": [0.17014, 0, 0, 0, 0.44445], + "305": [0, 0.44444, 0.04169, 0, 0.23889], + "567": [0.19444, 0.44444, 0.04169, 0, 0.26667], + "710": [0, 0.69444, 0.0799, 0, 0.5], + "711": [0, 0.63194, 0.08432, 0, 0.5], + "713": [0, 0.60889, 0.08776, 0, 0.5], + "714": [0, 0.69444, 0.09205, 0, 0.5], + "715": [0, 0.69444, 0, 0, 0.5], + "728": [0, 0.69444, 0.09483, 0, 0.5], + "729": [0, 0.67937, 0.07774, 0, 0.27778], + "730": [0, 0.69444, 0, 0, 0.73752], + "732": [0, 0.67659, 0.08826, 0, 0.5], + "733": [0, 0.69444, 0.09205, 0, 0.5], + "915": [0, 0.69444, 0.13372, 0, 0.54167], + "916": [0, 0.69444, 0, 0, 0.83334], + "920": [0, 0.69444, 0.07555, 0, 0.77778], + "923": [0, 0.69444, 0, 0, 0.61111], + "926": [0, 0.69444, 0.12816, 0, 0.66667], + "928": [0, 0.69444, 0.08094, 0, 0.70834], + "931": [0, 0.69444, 0.11983, 0, 0.72222], + "933": [0, 0.69444, 0.09031, 0, 0.77778], + "934": [0, 0.69444, 0.04603, 0, 0.72222], + "936": [0, 0.69444, 0.09031, 0, 0.77778], + "937": [0, 0.69444, 0.08293, 0, 0.72222], + "8211": [0, 0.44444, 0.08616, 0, 0.5], + "8212": [0, 0.44444, 0.08616, 0, 1.0], + "8216": [0, 0.69444, 0.07816, 0, 0.27778], + "8217": [0, 0.69444, 0.07816, 0, 0.27778], + "8220": [0, 0.69444, 0.14205, 0, 0.5], + "8221": [0, 0.69444, 0.00316, 0, 0.5] + }, + "SansSerif-Regular": { + "32": [0, 0, 0, 0, 0.25], + "33": [0, 0.69444, 0, 0, 0.31945], + "34": [0, 0.69444, 0, 0, 0.5], + "35": [0.19444, 0.69444, 0, 0, 0.83334], + "36": [0.05556, 0.75, 0, 0, 0.5], + "37": [0.05556, 0.75, 0, 0, 0.83334], + "38": [0, 0.69444, 0, 0, 0.75834], + "39": [0, 0.69444, 0, 0, 0.27778], + "40": [0.25, 0.75, 0, 0, 0.38889], + "41": [0.25, 0.75, 0, 0, 0.38889], + "42": [0, 0.75, 0, 0, 0.5], + "43": [0.08333, 0.58333, 0, 0, 0.77778], + "44": [0.125, 0.08333, 0, 0, 0.27778], + "45": [0, 0.44444, 0, 0, 0.33333], + "46": [0, 0.08333, 0, 0, 0.27778], + "47": [0.25, 0.75, 0, 0, 0.5], + "48": [0, 0.65556, 0, 0, 0.5], + "49": [0, 0.65556, 0, 0, 0.5], + "50": [0, 0.65556, 0, 0, 0.5], + "51": [0, 0.65556, 0, 0, 0.5], + "52": [0, 0.65556, 0, 0, 0.5], + "53": [0, 0.65556, 0, 0, 0.5], + "54": [0, 0.65556, 0, 0, 0.5], + "55": [0, 0.65556, 0, 0, 0.5], + "56": [0, 0.65556, 0, 0, 0.5], + "57": [0, 0.65556, 0, 0, 0.5], + "58": [0, 0.44444, 0, 0, 0.27778], + "59": [0.125, 0.44444, 0, 0, 0.27778], + "61": [-0.13, 0.37, 0, 0, 0.77778], + "63": [0, 0.69444, 0, 0, 0.47222], + "64": [0, 0.69444, 0, 0, 0.66667], + "65": [0, 0.69444, 0, 0, 0.66667], + "66": [0, 0.69444, 0, 0, 0.66667], + "67": [0, 0.69444, 0, 0, 0.63889], + "68": [0, 0.69444, 0, 0, 0.72223], + "69": [0, 0.69444, 0, 0, 0.59722], + "70": [0, 0.69444, 0, 0, 0.56945], + "71": [0, 0.69444, 0, 0, 0.66667], + "72": [0, 0.69444, 0, 0, 0.70834], + "73": [0, 0.69444, 0, 0, 0.27778], + "74": [0, 0.69444, 0, 0, 0.47222], + "75": [0, 0.69444, 0, 0, 0.69445], + "76": [0, 0.69444, 0, 0, 0.54167], + "77": [0, 0.69444, 0, 0, 0.875], + "78": [0, 0.69444, 0, 0, 0.70834], + "79": [0, 0.69444, 0, 0, 0.73611], + "80": [0, 0.69444, 0, 0, 0.63889], + "81": [0.125, 0.69444, 0, 0, 0.73611], + "82": [0, 0.69444, 0, 0, 0.64584], + "83": [0, 0.69444, 0, 0, 0.55556], + "84": [0, 0.69444, 0, 0, 0.68056], + "85": [0, 0.69444, 0, 0, 0.6875], + "86": [0, 0.69444, 0.01389, 0, 0.66667], + "87": [0, 0.69444, 0.01389, 0, 0.94445], + "88": [0, 0.69444, 0, 0, 0.66667], + "89": [0, 0.69444, 0.025, 0, 0.66667], + "90": [0, 0.69444, 0, 0, 0.61111], + "91": [0.25, 0.75, 0, 0, 0.28889], + "93": [0.25, 0.75, 0, 0, 0.28889], + "94": [0, 0.69444, 0, 0, 0.5], + "95": [0.35, 0.09444, 0.02778, 0, 0.5], + "97": [0, 0.44444, 0, 0, 0.48056], + "98": [0, 0.69444, 0, 0, 0.51667], + "99": [0, 0.44444, 0, 0, 0.44445], + "100": [0, 0.69444, 0, 0, 0.51667], + "101": [0, 0.44444, 0, 0, 0.44445], + "102": [0, 0.69444, 0.06944, 0, 0.30556], + "103": [0.19444, 0.44444, 0.01389, 0, 0.5], + "104": [0, 0.69444, 0, 0, 0.51667], + "105": [0, 0.67937, 0, 0, 0.23889], + "106": [0.19444, 0.67937, 0, 0, 0.26667], + "107": [0, 0.69444, 0, 0, 0.48889], + "108": [0, 0.69444, 0, 0, 0.23889], + "109": [0, 0.44444, 0, 0, 0.79445], + "110": [0, 0.44444, 0, 0, 0.51667], + "111": [0, 0.44444, 0, 0, 0.5], + "112": [0.19444, 0.44444, 0, 0, 0.51667], + "113": [0.19444, 0.44444, 0, 0, 0.51667], + "114": [0, 0.44444, 0.01389, 0, 0.34167], + "115": [0, 0.44444, 0, 0, 0.38333], + "116": [0, 0.57143, 0, 0, 0.36111], + "117": [0, 0.44444, 0, 0, 0.51667], + "118": [0, 0.44444, 0.01389, 0, 0.46111], + "119": [0, 0.44444, 0.01389, 0, 0.68334], + "120": [0, 0.44444, 0, 0, 0.46111], + "121": [0.19444, 0.44444, 0.01389, 0, 0.46111], + "122": [0, 0.44444, 0, 0, 0.43472], + "126": [0.35, 0.32659, 0, 0, 0.5], + "160": [0, 0, 0, 0, 0.25], + "168": [0, 0.67937, 0, 0, 0.5], + "176": [0, 0.69444, 0, 0, 0.66667], + "184": [0.17014, 0, 0, 0, 0.44445], + "305": [0, 0.44444, 0, 0, 0.23889], + "567": [0.19444, 0.44444, 0, 0, 0.26667], + "710": [0, 0.69444, 0, 0, 0.5], + "711": [0, 0.63194, 0, 0, 0.5], + "713": [0, 0.60889, 0, 0, 0.5], + "714": [0, 0.69444, 0, 0, 0.5], + "715": [0, 0.69444, 0, 0, 0.5], + "728": [0, 0.69444, 0, 0, 0.5], + "729": [0, 0.67937, 0, 0, 0.27778], + "730": [0, 0.69444, 0, 0, 0.66667], + "732": [0, 0.67659, 0, 0, 0.5], + "733": [0, 0.69444, 0, 0, 0.5], + "915": [0, 0.69444, 0, 0, 0.54167], + "916": [0, 0.69444, 0, 0, 0.83334], + "920": [0, 0.69444, 0, 0, 0.77778], + "923": [0, 0.69444, 0, 0, 0.61111], + "926": [0, 0.69444, 0, 0, 0.66667], + "928": [0, 0.69444, 0, 0, 0.70834], + "931": [0, 0.69444, 0, 0, 0.72222], + "933": [0, 0.69444, 0, 0, 0.77778], + "934": [0, 0.69444, 0, 0, 0.72222], + "936": [0, 0.69444, 0, 0, 0.77778], + "937": [0, 0.69444, 0, 0, 0.72222], + "8211": [0, 0.44444, 0.02778, 0, 0.5], + "8212": [0, 0.44444, 0.02778, 0, 1.0], + "8216": [0, 0.69444, 0, 0, 0.27778], + "8217": [0, 0.69444, 0, 0, 0.27778], + "8220": [0, 0.69444, 0, 0, 0.5], + "8221": [0, 0.69444, 0, 0, 0.5] + }, + "Script-Regular": { + "32": [0, 0, 0, 0, 0.25], + "65": [0, 0.7, 0.22925, 0, 0.80253], + "66": [0, 0.7, 0.04087, 0, 0.90757], + "67": [0, 0.7, 0.1689, 0, 0.66619], + "68": [0, 0.7, 0.09371, 0, 0.77443], + "69": [0, 0.7, 0.18583, 0, 0.56162], + "70": [0, 0.7, 0.13634, 0, 0.89544], + "71": [0, 0.7, 0.17322, 0, 0.60961], + "72": [0, 0.7, 0.29694, 0, 0.96919], + "73": [0, 0.7, 0.19189, 0, 0.80907], + "74": [0.27778, 0.7, 0.19189, 0, 1.05159], + "75": [0, 0.7, 0.31259, 0, 0.91364], + "76": [0, 0.7, 0.19189, 0, 0.87373], + "77": [0, 0.7, 0.15981, 0, 1.08031], + "78": [0, 0.7, 0.3525, 0, 0.9015], + "79": [0, 0.7, 0.08078, 0, 0.73787], + "80": [0, 0.7, 0.08078, 0, 1.01262], + "81": [0, 0.7, 0.03305, 0, 0.88282], + "82": [0, 0.7, 0.06259, 0, 0.85], + "83": [0, 0.7, 0.19189, 0, 0.86767], + "84": [0, 0.7, 0.29087, 0, 0.74697], + "85": [0, 0.7, 0.25815, 0, 0.79996], + "86": [0, 0.7, 0.27523, 0, 0.62204], + "87": [0, 0.7, 0.27523, 0, 0.80532], + "88": [0, 0.7, 0.26006, 0, 0.94445], + "89": [0, 0.7, 0.2939, 0, 0.70961], + "90": [0, 0.7, 0.24037, 0, 0.8212], + "160": [0, 0, 0, 0, 0.25] + }, + "Size1-Regular": { + "32": [0, 0, 0, 0, 0.25], + "40": [0.35001, 0.85, 0, 0, 0.45834], + "41": [0.35001, 0.85, 0, 0, 0.45834], + "47": [0.35001, 0.85, 0, 0, 0.57778], + "91": [0.35001, 0.85, 0, 0, 0.41667], + "92": [0.35001, 0.85, 0, 0, 0.57778], + "93": [0.35001, 0.85, 0, 0, 0.41667], + "123": [0.35001, 0.85, 0, 0, 0.58334], + "125": [0.35001, 0.85, 0, 0, 0.58334], + "160": [0, 0, 0, 0, 0.25], + "710": [0, 0.72222, 0, 0, 0.55556], + "732": [0, 0.72222, 0, 0, 0.55556], + "770": [0, 0.72222, 0, 0, 0.55556], + "771": [0, 0.72222, 0, 0, 0.55556], + "8214": [-0.00099, 0.601, 0, 0, 0.77778], + "8593": [1e-05, 0.6, 0, 0, 0.66667], + "8595": [1e-05, 0.6, 0, 0, 0.66667], + "8657": [1e-05, 0.6, 0, 0, 0.77778], + "8659": [1e-05, 0.6, 0, 0, 0.77778], + "8719": [0.25001, 0.75, 0, 0, 0.94445], + "8720": [0.25001, 0.75, 0, 0, 0.94445], + "8721": [0.25001, 0.75, 0, 0, 1.05556], + "8730": [0.35001, 0.85, 0, 0, 1.0], + "8739": [-0.00599, 0.606, 0, 0, 0.33333], + "8741": [-0.00599, 0.606, 0, 0, 0.55556], + "8747": [0.30612, 0.805, 0.19445, 0, 0.47222], + "8748": [0.306, 0.805, 0.19445, 0, 0.47222], + "8749": [0.306, 0.805, 0.19445, 0, 0.47222], + "8750": [0.30612, 0.805, 0.19445, 0, 0.47222], + "8896": [0.25001, 0.75, 0, 0, 0.83334], + "8897": [0.25001, 0.75, 0, 0, 0.83334], + "8898": [0.25001, 0.75, 0, 0, 0.83334], + "8899": [0.25001, 0.75, 0, 0, 0.83334], + "8968": [0.35001, 0.85, 0, 0, 0.47222], + "8969": [0.35001, 0.85, 0, 0, 0.47222], + "8970": [0.35001, 0.85, 0, 0, 0.47222], + "8971": [0.35001, 0.85, 0, 0, 0.47222], + "9168": [-0.00099, 0.601, 0, 0, 0.66667], + "10216": [0.35001, 0.85, 0, 0, 0.47222], + "10217": [0.35001, 0.85, 0, 0, 0.47222], + "10752": [0.25001, 0.75, 0, 0, 1.11111], + "10753": [0.25001, 0.75, 0, 0, 1.11111], + "10754": [0.25001, 0.75, 0, 0, 1.11111], + "10756": [0.25001, 0.75, 0, 0, 0.83334], + "10758": [0.25001, 0.75, 0, 0, 0.83334] + }, + "Size2-Regular": { + "32": [0, 0, 0, 0, 0.25], + "40": [0.65002, 1.15, 0, 0, 0.59722], + "41": [0.65002, 1.15, 0, 0, 0.59722], + "47": [0.65002, 1.15, 0, 0, 0.81111], + "91": [0.65002, 1.15, 0, 0, 0.47222], + "92": [0.65002, 1.15, 0, 0, 0.81111], + "93": [0.65002, 1.15, 0, 0, 0.47222], + "123": [0.65002, 1.15, 0, 0, 0.66667], + "125": [0.65002, 1.15, 0, 0, 0.66667], + "160": [0, 0, 0, 0, 0.25], + "710": [0, 0.75, 0, 0, 1.0], + "732": [0, 0.75, 0, 0, 1.0], + "770": [0, 0.75, 0, 0, 1.0], + "771": [0, 0.75, 0, 0, 1.0], + "8719": [0.55001, 1.05, 0, 0, 1.27778], + "8720": [0.55001, 1.05, 0, 0, 1.27778], + "8721": [0.55001, 1.05, 0, 0, 1.44445], + "8730": [0.65002, 1.15, 0, 0, 1.0], + "8747": [0.86225, 1.36, 0.44445, 0, 0.55556], + "8748": [0.862, 1.36, 0.44445, 0, 0.55556], + "8749": [0.862, 1.36, 0.44445, 0, 0.55556], + "8750": [0.86225, 1.36, 0.44445, 0, 0.55556], + "8896": [0.55001, 1.05, 0, 0, 1.11111], + "8897": [0.55001, 1.05, 0, 0, 1.11111], + "8898": [0.55001, 1.05, 0, 0, 1.11111], + "8899": [0.55001, 1.05, 0, 0, 1.11111], + "8968": [0.65002, 1.15, 0, 0, 0.52778], + "8969": [0.65002, 1.15, 0, 0, 0.52778], + "8970": [0.65002, 1.15, 0, 0, 0.52778], + "8971": [0.65002, 1.15, 0, 0, 0.52778], + "10216": [0.65002, 1.15, 0, 0, 0.61111], + "10217": [0.65002, 1.15, 0, 0, 0.61111], + "10752": [0.55001, 1.05, 0, 0, 1.51112], + "10753": [0.55001, 1.05, 0, 0, 1.51112], + "10754": [0.55001, 1.05, 0, 0, 1.51112], + "10756": [0.55001, 1.05, 0, 0, 1.11111], + "10758": [0.55001, 1.05, 0, 0, 1.11111] + }, + "Size3-Regular": { + "32": [0, 0, 0, 0, 0.25], + "40": [0.95003, 1.45, 0, 0, 0.73611], + "41": [0.95003, 1.45, 0, 0, 0.73611], + "47": [0.95003, 1.45, 0, 0, 1.04445], + "91": [0.95003, 1.45, 0, 0, 0.52778], + "92": [0.95003, 1.45, 0, 0, 1.04445], + "93": [0.95003, 1.45, 0, 0, 0.52778], + "123": [0.95003, 1.45, 0, 0, 0.75], + "125": [0.95003, 1.45, 0, 0, 0.75], + "160": [0, 0, 0, 0, 0.25], + "710": [0, 0.75, 0, 0, 1.44445], + "732": [0, 0.75, 0, 0, 1.44445], + "770": [0, 0.75, 0, 0, 1.44445], + "771": [0, 0.75, 0, 0, 1.44445], + "8730": [0.95003, 1.45, 0, 0, 1.0], + "8968": [0.95003, 1.45, 0, 0, 0.58334], + "8969": [0.95003, 1.45, 0, 0, 0.58334], + "8970": [0.95003, 1.45, 0, 0, 0.58334], + "8971": [0.95003, 1.45, 0, 0, 0.58334], + "10216": [0.95003, 1.45, 0, 0, 0.75], + "10217": [0.95003, 1.45, 0, 0, 0.75] + }, + "Size4-Regular": { + "32": [0, 0, 0, 0, 0.25], + "40": [1.25003, 1.75, 0, 0, 0.79167], + "41": [1.25003, 1.75, 0, 0, 0.79167], + "47": [1.25003, 1.75, 0, 0, 1.27778], + "91": [1.25003, 1.75, 0, 0, 0.58334], + "92": [1.25003, 1.75, 0, 0, 1.27778], + "93": [1.25003, 1.75, 0, 0, 0.58334], + "123": [1.25003, 1.75, 0, 0, 0.80556], + "125": [1.25003, 1.75, 0, 0, 0.80556], + "160": [0, 0, 0, 0, 0.25], + "710": [0, 0.825, 0, 0, 1.8889], + "732": [0, 0.825, 0, 0, 1.8889], + "770": [0, 0.825, 0, 0, 1.8889], + "771": [0, 0.825, 0, 0, 1.8889], + "8730": [1.25003, 1.75, 0, 0, 1.0], + "8968": [1.25003, 1.75, 0, 0, 0.63889], + "8969": [1.25003, 1.75, 0, 0, 0.63889], + "8970": [1.25003, 1.75, 0, 0, 0.63889], + "8971": [1.25003, 1.75, 0, 0, 0.63889], + "9115": [0.64502, 1.155, 0, 0, 0.875], + "9116": [1e-05, 0.6, 0, 0, 0.875], + "9117": [0.64502, 1.155, 0, 0, 0.875], + "9118": [0.64502, 1.155, 0, 0, 0.875], + "9119": [1e-05, 0.6, 0, 0, 0.875], + "9120": [0.64502, 1.155, 0, 0, 0.875], + "9121": [0.64502, 1.155, 0, 0, 0.66667], + "9122": [-0.00099, 0.601, 0, 0, 0.66667], + "9123": [0.64502, 1.155, 0, 0, 0.66667], + "9124": [0.64502, 1.155, 0, 0, 0.66667], + "9125": [-0.00099, 0.601, 0, 0, 0.66667], + "9126": [0.64502, 1.155, 0, 0, 0.66667], + "9127": [1e-05, 0.9, 0, 0, 0.88889], + "9128": [0.65002, 1.15, 0, 0, 0.88889], + "9129": [0.90001, 0, 0, 0, 0.88889], + "9130": [0, 0.3, 0, 0, 0.88889], + "9131": [1e-05, 0.9, 0, 0, 0.88889], + "9132": [0.65002, 1.15, 0, 0, 0.88889], + "9133": [0.90001, 0, 0, 0, 0.88889], + "9143": [0.88502, 0.915, 0, 0, 1.05556], + "10216": [1.25003, 1.75, 0, 0, 0.80556], + "10217": [1.25003, 1.75, 0, 0, 0.80556], + "57344": [-0.00499, 0.605, 0, 0, 1.05556], + "57345": [-0.00499, 0.605, 0, 0, 1.05556], + "57680": [0, 0.12, 0, 0, 0.45], + "57681": [0, 0.12, 0, 0, 0.45], + "57682": [0, 0.12, 0, 0, 0.45], + "57683": [0, 0.12, 0, 0, 0.45] + }, + "Typewriter-Regular": { + "32": [0, 0, 0, 0, 0.525], + "33": [0, 0.61111, 0, 0, 0.525], + "34": [0, 0.61111, 0, 0, 0.525], + "35": [0, 0.61111, 0, 0, 0.525], + "36": [0.08333, 0.69444, 0, 0, 0.525], + "37": [0.08333, 0.69444, 0, 0, 0.525], + "38": [0, 0.61111, 0, 0, 0.525], + "39": [0, 0.61111, 0, 0, 0.525], + "40": [0.08333, 0.69444, 0, 0, 0.525], + "41": [0.08333, 0.69444, 0, 0, 0.525], + "42": [0, 0.52083, 0, 0, 0.525], + "43": [-0.08056, 0.53055, 0, 0, 0.525], + "44": [0.13889, 0.125, 0, 0, 0.525], + "45": [-0.08056, 0.53055, 0, 0, 0.525], + "46": [0, 0.125, 0, 0, 0.525], + "47": [0.08333, 0.69444, 0, 0, 0.525], + "48": [0, 0.61111, 0, 0, 0.525], + "49": [0, 0.61111, 0, 0, 0.525], + "50": [0, 0.61111, 0, 0, 0.525], + "51": [0, 0.61111, 0, 0, 0.525], + "52": [0, 0.61111, 0, 0, 0.525], + "53": [0, 0.61111, 0, 0, 0.525], + "54": [0, 0.61111, 0, 0, 0.525], + "55": [0, 0.61111, 0, 0, 0.525], + "56": [0, 0.61111, 0, 0, 0.525], + "57": [0, 0.61111, 0, 0, 0.525], + "58": [0, 0.43056, 0, 0, 0.525], + "59": [0.13889, 0.43056, 0, 0, 0.525], + "60": [-0.05556, 0.55556, 0, 0, 0.525], + "61": [-0.19549, 0.41562, 0, 0, 0.525], + "62": [-0.05556, 0.55556, 0, 0, 0.525], + "63": [0, 0.61111, 0, 0, 0.525], + "64": [0, 0.61111, 0, 0, 0.525], + "65": [0, 0.61111, 0, 0, 0.525], + "66": [0, 0.61111, 0, 0, 0.525], + "67": [0, 0.61111, 0, 0, 0.525], + "68": [0, 0.61111, 0, 0, 0.525], + "69": [0, 0.61111, 0, 0, 0.525], + "70": [0, 0.61111, 0, 0, 0.525], + "71": [0, 0.61111, 0, 0, 0.525], + "72": [0, 0.61111, 0, 0, 0.525], + "73": [0, 0.61111, 0, 0, 0.525], + "74": [0, 0.61111, 0, 0, 0.525], + "75": [0, 0.61111, 0, 0, 0.525], + "76": [0, 0.61111, 0, 0, 0.525], + "77": [0, 0.61111, 0, 0, 0.525], + "78": [0, 0.61111, 0, 0, 0.525], + "79": [0, 0.61111, 0, 0, 0.525], + "80": [0, 0.61111, 0, 0, 0.525], + "81": [0.13889, 0.61111, 0, 0, 0.525], + "82": [0, 0.61111, 0, 0, 0.525], + "83": [0, 0.61111, 0, 0, 0.525], + "84": [0, 0.61111, 0, 0, 0.525], + "85": [0, 0.61111, 0, 0, 0.525], + "86": [0, 0.61111, 0, 0, 0.525], + "87": [0, 0.61111, 0, 0, 0.525], + "88": [0, 0.61111, 0, 0, 0.525], + "89": [0, 0.61111, 0, 0, 0.525], + "90": [0, 0.61111, 0, 0, 0.525], + "91": [0.08333, 0.69444, 0, 0, 0.525], + "92": [0.08333, 0.69444, 0, 0, 0.525], + "93": [0.08333, 0.69444, 0, 0, 0.525], + "94": [0, 0.61111, 0, 0, 0.525], + "95": [0.09514, 0, 0, 0, 0.525], + "96": [0, 0.61111, 0, 0, 0.525], + "97": [0, 0.43056, 0, 0, 0.525], + "98": [0, 0.61111, 0, 0, 0.525], + "99": [0, 0.43056, 0, 0, 0.525], + "100": [0, 0.61111, 0, 0, 0.525], + "101": [0, 0.43056, 0, 0, 0.525], + "102": [0, 0.61111, 0, 0, 0.525], + "103": [0.22222, 0.43056, 0, 0, 0.525], + "104": [0, 0.61111, 0, 0, 0.525], + "105": [0, 0.61111, 0, 0, 0.525], + "106": [0.22222, 0.61111, 0, 0, 0.525], + "107": [0, 0.61111, 0, 0, 0.525], + "108": [0, 0.61111, 0, 0, 0.525], + "109": [0, 0.43056, 0, 0, 0.525], + "110": [0, 0.43056, 0, 0, 0.525], + "111": [0, 0.43056, 0, 0, 0.525], + "112": [0.22222, 0.43056, 0, 0, 0.525], + "113": [0.22222, 0.43056, 0, 0, 0.525], + "114": [0, 0.43056, 0, 0, 0.525], + "115": [0, 0.43056, 0, 0, 0.525], + "116": [0, 0.55358, 0, 0, 0.525], + "117": [0, 0.43056, 0, 0, 0.525], + "118": [0, 0.43056, 0, 0, 0.525], + "119": [0, 0.43056, 0, 0, 0.525], + "120": [0, 0.43056, 0, 0, 0.525], + "121": [0.22222, 0.43056, 0, 0, 0.525], + "122": [0, 0.43056, 0, 0, 0.525], + "123": [0.08333, 0.69444, 0, 0, 0.525], + "124": [0.08333, 0.69444, 0, 0, 0.525], + "125": [0.08333, 0.69444, 0, 0, 0.525], + "126": [0, 0.61111, 0, 0, 0.525], + "127": [0, 0.61111, 0, 0, 0.525], + "160": [0, 0, 0, 0, 0.525], + "176": [0, 0.61111, 0, 0, 0.525], + "184": [0.19445, 0, 0, 0, 0.525], + "305": [0, 0.43056, 0, 0, 0.525], + "567": [0.22222, 0.43056, 0, 0, 0.525], + "711": [0, 0.56597, 0, 0, 0.525], + "713": [0, 0.56555, 0, 0, 0.525], + "714": [0, 0.61111, 0, 0, 0.525], + "715": [0, 0.61111, 0, 0, 0.525], + "728": [0, 0.61111, 0, 0, 0.525], + "730": [0, 0.61111, 0, 0, 0.525], + "770": [0, 0.61111, 0, 0, 0.525], + "771": [0, 0.61111, 0, 0, 0.525], + "776": [0, 0.61111, 0, 0, 0.525], + "915": [0, 0.61111, 0, 0, 0.525], + "916": [0, 0.61111, 0, 0, 0.525], + "920": [0, 0.61111, 0, 0, 0.525], + "923": [0, 0.61111, 0, 0, 0.525], + "926": [0, 0.61111, 0, 0, 0.525], + "928": [0, 0.61111, 0, 0, 0.525], + "931": [0, 0.61111, 0, 0, 0.525], + "933": [0, 0.61111, 0, 0, 0.525], + "934": [0, 0.61111, 0, 0, 0.525], + "936": [0, 0.61111, 0, 0, 0.525], + "937": [0, 0.61111, 0, 0, 0.525], + "8216": [0, 0.61111, 0, 0, 0.525], + "8217": [0, 0.61111, 0, 0, 0.525], + "8242": [0, 0.61111, 0, 0, 0.525], + "9251": [0.11111, 0.21944, 0, 0, 0.525] + } +}; + +/** + * This file contains metrics regarding fonts and individual symbols. The sigma + * and xi variables, as well as the metricMap map contain data extracted from + * TeX, TeX font metrics, and the TTF files. These data are then exposed via the + * `metrics` variable and the getCharacterMetrics function. + */ +// In TeX, there are actually three sets of dimensions, one for each of +// textstyle (size index 5 and higher: >=9pt), scriptstyle (size index 3 and 4: +// 7-8pt), and scriptscriptstyle (size index 1 and 2: 5-6pt). These are +// provided in the arrays below, in that order. +// +// The font metrics are stored in fonts cmsy10, cmsy7, and cmsy5 respectively. +// This was determined by running the following script: +// +// latex -interaction=nonstopmode \ +// '\documentclass{article}\usepackage{amsmath}\begin{document}' \ +// '$a$ \expandafter\show\the\textfont2' \ +// '\expandafter\show\the\scriptfont2' \ +// '\expandafter\show\the\scriptscriptfont2' \ +// '\stop' +// +// The metrics themselves were retrieved using the following commands: +// +// tftopl cmsy10 +// tftopl cmsy7 +// tftopl cmsy5 +// +// The output of each of these commands is quite lengthy. The only part we +// care about is the FONTDIMEN section. Each value is measured in EMs. +var sigmasAndXis = { + slant: [0.250, 0.250, 0.250], + // sigma1 + space: [0.000, 0.000, 0.000], + // sigma2 + stretch: [0.000, 0.000, 0.000], + // sigma3 + shrink: [0.000, 0.000, 0.000], + // sigma4 + xHeight: [0.431, 0.431, 0.431], + // sigma5 + quad: [1.000, 1.171, 1.472], + // sigma6 + extraSpace: [0.000, 0.000, 0.000], + // sigma7 + num1: [0.677, 0.732, 0.925], + // sigma8 + num2: [0.394, 0.384, 0.387], + // sigma9 + num3: [0.444, 0.471, 0.504], + // sigma10 + denom1: [0.686, 0.752, 1.025], + // sigma11 + denom2: [0.345, 0.344, 0.532], + // sigma12 + sup1: [0.413, 0.503, 0.504], + // sigma13 + sup2: [0.363, 0.431, 0.404], + // sigma14 + sup3: [0.289, 0.286, 0.294], + // sigma15 + sub1: [0.150, 0.143, 0.200], + // sigma16 + sub2: [0.247, 0.286, 0.400], + // sigma17 + supDrop: [0.386, 0.353, 0.494], + // sigma18 + subDrop: [0.050, 0.071, 0.100], + // sigma19 + delim1: [2.390, 1.700, 1.980], + // sigma20 + delim2: [1.010, 1.157, 1.420], + // sigma21 + axisHeight: [0.250, 0.250, 0.250], + // sigma22 + // These font metrics are extracted from TeX by using tftopl on cmex10.tfm; + // they correspond to the font parameters of the extension fonts (family 3). + // See the TeXbook, page 441. In AMSTeX, the extension fonts scale; to + // match cmex7, we'd use cmex7.tfm values for script and scriptscript + // values. + defaultRuleThickness: [0.04, 0.049, 0.049], + // xi8; cmex7: 0.049 + bigOpSpacing1: [0.111, 0.111, 0.111], + // xi9 + bigOpSpacing2: [0.166, 0.166, 0.166], + // xi10 + bigOpSpacing3: [0.2, 0.2, 0.2], + // xi11 + bigOpSpacing4: [0.6, 0.611, 0.611], + // xi12; cmex7: 0.611 + bigOpSpacing5: [0.1, 0.143, 0.143], + // xi13; cmex7: 0.143 + // The \sqrt rule width is taken from the height of the surd character. + // Since we use the same font at all sizes, this thickness doesn't scale. + sqrtRuleThickness: [0.04, 0.04, 0.04], + // This value determines how large a pt is, for metrics which are defined + // in terms of pts. + // This value is also used in katex.scss; if you change it make sure the + // values match. + ptPerEm: [10.0, 10.0, 10.0], + // The space between adjacent `|` columns in an array definition. From + // `\showthe\doublerulesep` in LaTeX. Equals 2.0 / ptPerEm. + doubleRuleSep: [0.2, 0.2, 0.2], + // The width of separator lines in {array} environments. From + // `\showthe\arrayrulewidth` in LaTeX. Equals 0.4 / ptPerEm. + arrayRuleWidth: [0.04, 0.04, 0.04], + // Two values from LaTeX source2e: + fboxsep: [0.3, 0.3, 0.3], + // 3 pt / ptPerEm + fboxrule: [0.04, 0.04, 0.04] // 0.4 pt / ptPerEm + +}; // This map contains a mapping from font name and character code to character +// should have Latin-1 and Cyrillic characters, but may not depending on the +// operating system. The metrics do not account for extra height from the +// accents. In the case of Cyrillic characters which have both ascenders and +// descenders we prefer approximations with ascenders, primarily to prevent +// the fraction bar or root line from intersecting the glyph. +// TODO(kevinb) allow union of multiple glyph metrics for better accuracy. + +var extraCharacterMap = { + // Latin-1 + 'Å': 'A', + 'Ð': 'D', + 'Þ': 'o', + 'å': 'a', + 'ð': 'd', + 'þ': 'o', + // Cyrillic + 'А': 'A', + 'Б': 'B', + 'В': 'B', + 'Г': 'F', + 'Д': 'A', + 'Е': 'E', + 'Ж': 'K', + 'З': '3', + 'И': 'N', + 'Й': 'N', + 'К': 'K', + 'Л': 'N', + 'М': 'M', + 'Н': 'H', + 'О': 'O', + 'П': 'N', + 'Р': 'P', + 'С': 'C', + 'Т': 'T', + 'У': 'y', + 'Ф': 'O', + 'Х': 'X', + 'Ц': 'U', + 'Ч': 'h', + 'Ш': 'W', + 'Щ': 'W', + 'Ъ': 'B', + 'Ы': 'X', + 'Ь': 'B', + 'Э': '3', + 'Ю': 'X', + 'Я': 'R', + 'а': 'a', + 'б': 'b', + 'в': 'a', + 'г': 'r', + 'д': 'y', + 'е': 'e', + 'ж': 'm', + 'з': 'e', + 'и': 'n', + 'й': 'n', + 'к': 'n', + 'л': 'n', + 'м': 'm', + 'н': 'n', + 'о': 'o', + 'п': 'n', + 'р': 'p', + 'с': 'c', + 'т': 'o', + 'у': 'y', + 'ф': 'b', + 'х': 'x', + 'ц': 'n', + 'ч': 'n', + 'ш': 'w', + 'щ': 'w', + 'ъ': 'a', + 'ы': 'm', + 'ь': 'a', + 'э': 'e', + 'ю': 'm', + 'я': 'r' +}; + +/** + * This function adds new font metrics to default metricMap + * It can also override existing metrics + */ +function setFontMetrics(fontName, metrics) { + fontMetricsData[fontName] = metrics; +} +/** + * This function is a convenience function for looking up information in the + * metricMap table. It takes a character as a string, and a font. + * + * Note: the `width` property may be undefined if fontMetricsData.js wasn't + * built using `Make extended_metrics`. + */ + +function getCharacterMetrics(character, font, mode) { + if (!fontMetricsData[font]) { + throw new Error("Font metrics not found for font: " + font + "."); + } + + var ch = character.charCodeAt(0); + var metrics = fontMetricsData[font][ch]; + + if (!metrics && character[0] in extraCharacterMap) { + ch = extraCharacterMap[character[0]].charCodeAt(0); + metrics = fontMetricsData[font][ch]; + } + + if (!metrics && mode === 'text') { + // We don't typically have font metrics for Asian scripts. + // But since we support them in text mode, we need to return + // some sort of metrics. + // So if the character is in a script we support but we + // don't have metrics for it, just use the metrics for + // the Latin capital letter M. This is close enough because + // we (currently) only care about the height of the glyph + // not its width. + if (supportedCodepoint(ch)) { + metrics = fontMetricsData[font][77]; // 77 is the charcode for 'M' + } + } + + if (metrics) { + return { + depth: metrics[0], + height: metrics[1], + italic: metrics[2], + skew: metrics[3], + width: metrics[4] + }; + } +} +var fontMetricsBySizeIndex = {}; +/** + * Get the font metrics for a given size. + */ + +function getGlobalMetrics(size) { + var sizeIndex; + + if (size >= 5) { + sizeIndex = 0; + } else if (size >= 3) { + sizeIndex = 1; + } else { + sizeIndex = 2; + } + + if (!fontMetricsBySizeIndex[sizeIndex]) { + var metrics = fontMetricsBySizeIndex[sizeIndex] = { + cssEmPerMu: sigmasAndXis.quad[sizeIndex] / 18 + }; + + for (var key in sigmasAndXis) { + if (sigmasAndXis.hasOwnProperty(key)) { + metrics[key] = sigmasAndXis[key][sizeIndex]; + } + } + } + + return fontMetricsBySizeIndex[sizeIndex]; +} + +/** + * This file contains information about the options that the Parser carries + * around with it while parsing. Data is held in an `Options` object, and when + * recursing, a new `Options` object can be created with the `.with*` and + * `.reset` functions. + */ +var sizeStyleMap = [// Each element contains [textsize, scriptsize, scriptscriptsize]. +// The size mappings are taken from TeX with \normalsize=10pt. +[1, 1, 1], // size1: [5, 5, 5] \tiny +[2, 1, 1], // size2: [6, 5, 5] +[3, 1, 1], // size3: [7, 5, 5] \scriptsize +[4, 2, 1], // size4: [8, 6, 5] \footnotesize +[5, 2, 1], // size5: [9, 6, 5] \small +[6, 3, 1], // size6: [10, 7, 5] \normalsize +[7, 4, 2], // size7: [12, 8, 6] \large +[8, 6, 3], // size8: [14.4, 10, 7] \Large +[9, 7, 6], // size9: [17.28, 12, 10] \LARGE +[10, 8, 7], // size10: [20.74, 14.4, 12] \huge +[11, 10, 9] // size11: [24.88, 20.74, 17.28] \HUGE +]; +var sizeMultipliers = [// fontMetrics.js:getGlobalMetrics also uses size indexes, so if +// you change size indexes, change that function. +0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.44, 1.728, 2.074, 2.488]; + +var sizeAtStyle = function sizeAtStyle(size, style) { + return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1]; +}; // In these types, "" (empty string) means "no change". + + +/** + * This is the main options class. It contains the current style, size, color, + * and font. + * + * Options objects should not be modified. To create a new Options with + * different properties, call a `.having*` method. + */ +class Options { + // A font family applies to a group of fonts (i.e. SansSerif), while a font + // represents a specific font (i.e. SansSerif Bold). + // See: https://tex.stackexchange.com/questions/22350/difference-between-textrm-and-mathrm + + /** + * The base size index. + */ + constructor(data) { + this.style = void 0; + this.color = void 0; + this.size = void 0; + this.textSize = void 0; + this.phantom = void 0; + this.font = void 0; + this.fontFamily = void 0; + this.fontWeight = void 0; + this.fontShape = void 0; + this.sizeMultiplier = void 0; + this.maxSize = void 0; + this.minRuleThickness = void 0; + this._fontMetrics = void 0; + this.style = data.style; + this.color = data.color; + this.size = data.size || Options.BASESIZE; + this.textSize = data.textSize || this.size; + this.phantom = !!data.phantom; + this.font = data.font || ""; + this.fontFamily = data.fontFamily || ""; + this.fontWeight = data.fontWeight || ''; + this.fontShape = data.fontShape || ''; + this.sizeMultiplier = sizeMultipliers[this.size - 1]; + this.maxSize = data.maxSize; + this.minRuleThickness = data.minRuleThickness; + this._fontMetrics = undefined; + } + /** + * Returns a new options object with the same properties as "this". Properties + * from "extension" will be copied to the new options object. + */ + + + extend(extension) { + var data = { + style: this.style, + size: this.size, + textSize: this.textSize, + color: this.color, + phantom: this.phantom, + font: this.font, + fontFamily: this.fontFamily, + fontWeight: this.fontWeight, + fontShape: this.fontShape, + maxSize: this.maxSize, + minRuleThickness: this.minRuleThickness + }; + + for (var key in extension) { + if (extension.hasOwnProperty(key)) { + data[key] = extension[key]; + } + } + + return new Options(data); + } + /** + * Return an options object with the given style. If `this.style === style`, + * returns `this`. + */ + + + havingStyle(style) { + if (this.style === style) { + return this; + } else { + return this.extend({ + style: style, + size: sizeAtStyle(this.textSize, style) + }); + } + } + /** + * Return an options object with a cramped version of the current style. If + * the current style is cramped, returns `this`. + */ + + + havingCrampedStyle() { + return this.havingStyle(this.style.cramp()); + } + /** + * Return an options object with the given size and in at least `\textstyle`. + * Returns `this` if appropriate. + */ + + + havingSize(size) { + if (this.size === size && this.textSize === size) { + return this; + } else { + return this.extend({ + style: this.style.text(), + size: size, + textSize: size, + sizeMultiplier: sizeMultipliers[size - 1] + }); + } + } + /** + * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted, + * changes to at least `\textstyle`. + */ + + + havingBaseStyle(style) { + style = style || this.style.text(); + var wantSize = sizeAtStyle(Options.BASESIZE, style); + + if (this.size === wantSize && this.textSize === Options.BASESIZE && this.style === style) { + return this; + } else { + return this.extend({ + style: style, + size: wantSize + }); + } + } + /** + * Remove the effect of sizing changes such as \Huge. + * Keep the effect of the current style, such as \scriptstyle. + */ + + + havingBaseSizing() { + var size; + + switch (this.style.id) { + case 4: + case 5: + size = 3; // normalsize in scriptstyle + + break; + + case 6: + case 7: + size = 1; // normalsize in scriptscriptstyle + + break; + + default: + size = 6; + // normalsize in textstyle or displaystyle + } + + return this.extend({ + style: this.style.text(), + size: size + }); + } + /** + * Create a new options object with the given color. + */ + + + withColor(color) { + return this.extend({ + color: color + }); + } + /** + * Create a new options object with "phantom" set to true. + */ + + + withPhantom() { + return this.extend({ + phantom: true + }); + } + /** + * Creates a new options object with the given math font or old text font. + * @type {[type]} + */ + + + withFont(font) { + return this.extend({ + font + }); + } + /** + * Create a new options objects with the given fontFamily. + */ + + + withTextFontFamily(fontFamily) { + return this.extend({ + fontFamily, + font: "" + }); + } + /** + * Creates a new options object with the given font weight + */ + + + withTextFontWeight(fontWeight) { + return this.extend({ + fontWeight, + font: "" + }); + } + /** + * Creates a new options object with the given font weight + */ + + + withTextFontShape(fontShape) { + return this.extend({ + fontShape, + font: "" + }); + } + /** + * Return the CSS sizing classes required to switch from enclosing options + * `oldOptions` to `this`. Returns an array of classes. + */ + + + sizingClasses(oldOptions) { + if (oldOptions.size !== this.size) { + return ["sizing", "reset-size" + oldOptions.size, "size" + this.size]; + } else { + return []; + } + } + /** + * Return the CSS sizing classes required to switch to the base size. Like + * `this.havingSize(BASESIZE).sizingClasses(this)`. + */ + + + baseSizingClasses() { + if (this.size !== Options.BASESIZE) { + return ["sizing", "reset-size" + this.size, "size" + Options.BASESIZE]; + } else { + return []; + } + } + /** + * Return the font metrics for this size. + */ + + + fontMetrics() { + if (!this._fontMetrics) { + this._fontMetrics = getGlobalMetrics(this.size); + } + + return this._fontMetrics; + } + /** + * Gets the CSS color of the current options object + */ + + + getColor() { + if (this.phantom) { + return "transparent"; + } else { + return this.color; + } + } + +} + +Options.BASESIZE = 6; + +/** + * This file does conversion between units. In particular, it provides + * calculateSize to convert other units into ems. + */ +// Thus, multiplying a length by this number converts the length from units +// into pts. Dividing the result by ptPerEm gives the number of ems +// *assuming* a font size of ptPerEm (normal size, normal style). + +var ptPerUnit = { + // https://en.wikibooks.org/wiki/LaTeX/Lengths and + // https://tex.stackexchange.com/a/8263 + "pt": 1, + // TeX point + "mm": 7227 / 2540, + // millimeter + "cm": 7227 / 254, + // centimeter + "in": 72.27, + // inch + "bp": 803 / 800, + // big (PostScript) points + "pc": 12, + // pica + "dd": 1238 / 1157, + // didot + "cc": 14856 / 1157, + // cicero (12 didot) + "nd": 685 / 642, + // new didot + "nc": 1370 / 107, + // new cicero (12 new didot) + "sp": 1 / 65536, + // scaled point (TeX's internal smallest unit) + // https://tex.stackexchange.com/a/41371 + "px": 803 / 800 // \pdfpxdimen defaults to 1 bp in pdfTeX and LuaTeX + +}; // Dictionary of relative units, for fast validity testing. + +var relativeUnit = { + "ex": true, + "em": true, + "mu": true +}; + +/** + * Determine whether the specified unit (either a string defining the unit + * or a "size" parse node containing a unit field) is valid. + */ +var validUnit = function validUnit(unit) { + if (typeof unit !== "string") { + unit = unit.unit; + } + + return unit in ptPerUnit || unit in relativeUnit || unit === "ex"; +}; +/* + * Convert a "size" parse node (with numeric "number" and string "unit" fields, + * as parsed by functions.js argType "size") into a CSS em value for the + * current style/scale. `options` gives the current options. + */ + +var calculateSize = function calculateSize(sizeValue, options) { + var scale; + + if (sizeValue.unit in ptPerUnit) { + // Absolute units + scale = ptPerUnit[sizeValue.unit] // Convert unit to pt + / options.fontMetrics().ptPerEm // Convert pt to CSS em + / options.sizeMultiplier; // Unscale to make absolute units + } else if (sizeValue.unit === "mu") { + // `mu` units scale with scriptstyle/scriptscriptstyle. + scale = options.fontMetrics().cssEmPerMu; + } else { + // Other relative units always refer to the *textstyle* font + // in the current size. + var unitOptions; + + if (options.style.isTight()) { + // isTight() means current style is script/scriptscript. + unitOptions = options.havingStyle(options.style.text()); + } else { + unitOptions = options; + } // TODO: In TeX these units are relative to the quad of the current + // *text* font, e.g. cmr10. KaTeX instead uses values from the + // comparably-sized *Computer Modern symbol* font. At 10pt, these + // match. At 7pt and 5pt, they differ: cmr7=1.138894, cmsy7=1.170641; + // cmr5=1.361133, cmsy5=1.472241. Consider $\scriptsize a\kern1emb$. + // TeX \showlists shows a kern of 1.13889 * fontsize; + // KaTeX shows a kern of 1.171 * fontsize. + + + if (sizeValue.unit === "ex") { + scale = unitOptions.fontMetrics().xHeight; + } else if (sizeValue.unit === "em") { + scale = unitOptions.fontMetrics().quad; + } else { + throw new ParseError("Invalid unit: '" + sizeValue.unit + "'"); + } + + if (unitOptions !== options) { + scale *= unitOptions.sizeMultiplier / options.sizeMultiplier; + } + } + + return Math.min(sizeValue.number * scale, options.maxSize); +}; +/** + * Round `n` to 4 decimal places, or to the nearest 1/10,000th em. See + * https://github.com/KaTeX/KaTeX/pull/2460. + */ + +var makeEm = function makeEm(n) { + return +n.toFixed(4) + "em"; +}; + +/** + * These objects store the data about the DOM nodes we create, as well as some + * extra data. They can then be transformed into real DOM nodes with the + * `toNode` function or HTML markup using `toMarkup`. They are useful for both + * storing extra properties on the nodes, as well as providing a way to easily + * work with the DOM. + * + * Similar functions for working with MathML nodes exist in mathMLTree.js. + * + * TODO: refactor `span` and `anchor` into common superclass when + * target environments support class inheritance + */ + +/** + * Create an HTML className based on a list of classes. In addition to joining + * with spaces, we also remove empty classes. + */ +var createClass = function createClass(classes) { + return classes.filter(cls => cls).join(" "); +}; + +var initNode = function initNode(classes, options, style) { + this.classes = classes || []; + this.attributes = {}; + this.height = 0; + this.depth = 0; + this.maxFontSize = 0; + this.style = style || {}; + + if (options) { + if (options.style.isTight()) { + this.classes.push("mtight"); + } + + var color = options.getColor(); + + if (color) { + this.style.color = color; + } + } +}; +/** + * Convert into an HTML node + */ + + +var toNode = function toNode(tagName) { + var node = document.createElement(tagName); // Apply the class + + node.className = createClass(this.classes); // Apply inline styles + + for (var style in this.style) { + if (this.style.hasOwnProperty(style)) { + // $FlowFixMe Flow doesn't seem to understand span.style's type. + node.style[style] = this.style[style]; + } + } // Apply attributes + + + for (var attr in this.attributes) { + if (this.attributes.hasOwnProperty(attr)) { + node.setAttribute(attr, this.attributes[attr]); + } + } // Append the children, also as HTML nodes + + + for (var i = 0; i < this.children.length; i++) { + node.appendChild(this.children[i].toNode()); + } + + return node; +}; +/** + * Convert into an HTML markup string + */ + + +var toMarkup = function toMarkup(tagName) { + var markup = "<" + tagName; // Add the class + + if (this.classes.length) { + markup += " class=\"" + utils.escape(createClass(this.classes)) + "\""; + } + + var styles = ""; // Add the styles, after hyphenation + + for (var style in this.style) { + if (this.style.hasOwnProperty(style)) { + styles += utils.hyphenate(style) + ":" + this.style[style] + ";"; + } + } + + if (styles) { + markup += " style=\"" + utils.escape(styles) + "\""; + } // Add the attributes + + + for (var attr in this.attributes) { + if (this.attributes.hasOwnProperty(attr)) { + markup += " " + attr + "=\"" + utils.escape(this.attributes[attr]) + "\""; + } + } + + markup += ">"; // Add the markup of the children, also as markup + + for (var i = 0; i < this.children.length; i++) { + markup += this.children[i].toMarkup(); + } + + markup += ""; + return markup; +}; // Making the type below exact with all optional fields doesn't work due to +// - https://github.com/facebook/flow/issues/4582 +// - https://github.com/facebook/flow/issues/5688 +// However, since *all* fields are optional, $Shape<> works as suggested in 5688 +// above. +// This type does not include all CSS properties. Additional properties should +// be added as needed. + + +/** + * This node represents a span node, with a className, a list of children, and + * an inline style. It also contains information about its height, depth, and + * maxFontSize. + * + * Represents two types with different uses: SvgSpan to wrap an SVG and DomSpan + * otherwise. This typesafety is important when HTML builders access a span's + * children. + */ +class Span { + constructor(classes, children, options, style) { + this.children = void 0; + this.attributes = void 0; + this.classes = void 0; + this.height = void 0; + this.depth = void 0; + this.width = void 0; + this.maxFontSize = void 0; + this.style = void 0; + initNode.call(this, classes, options, style); + this.children = children || []; + } + /** + * Sets an arbitrary attribute on the span. Warning: use this wisely. Not + * all browsers support attributes the same, and having too many custom + * attributes is probably bad. + */ + + + setAttribute(attribute, value) { + this.attributes[attribute] = value; + } + + hasClass(className) { + return utils.contains(this.classes, className); + } + + toNode() { + return toNode.call(this, "span"); + } + + toMarkup() { + return toMarkup.call(this, "span"); + } + +} +/** + * This node represents an anchor () element with a hyperlink. See `span` + * for further details. + */ + +class Anchor { + constructor(href, classes, children, options) { + this.children = void 0; + this.attributes = void 0; + this.classes = void 0; + this.height = void 0; + this.depth = void 0; + this.maxFontSize = void 0; + this.style = void 0; + initNode.call(this, classes, options); + this.children = children || []; + this.setAttribute('href', href); + } + + setAttribute(attribute, value) { + this.attributes[attribute] = value; + } + + hasClass(className) { + return utils.contains(this.classes, className); + } + + toNode() { + return toNode.call(this, "a"); + } + + toMarkup() { + return toMarkup.call(this, "a"); + } + +} +/** + * This node represents an image embed () element. + */ + +class Img { + constructor(src, alt, style) { + this.src = void 0; + this.alt = void 0; + this.classes = void 0; + this.height = void 0; + this.depth = void 0; + this.maxFontSize = void 0; + this.style = void 0; + this.alt = alt; + this.src = src; + this.classes = ["mord"]; + this.style = style; + } + + hasClass(className) { + return utils.contains(this.classes, className); + } + + toNode() { + var node = document.createElement("img"); + node.src = this.src; + node.alt = this.alt; + node.className = "mord"; // Apply inline styles + + for (var style in this.style) { + if (this.style.hasOwnProperty(style)) { + // $FlowFixMe + node.style[style] = this.style[style]; + } + } + + return node; + } + + toMarkup() { + var markup = "\"" 0) { + span = document.createElement("span"); + span.style.marginRight = makeEm(this.italic); + } + + if (this.classes.length > 0) { + span = span || document.createElement("span"); + span.className = createClass(this.classes); + } + + for (var style in this.style) { + if (this.style.hasOwnProperty(style)) { + span = span || document.createElement("span"); // $FlowFixMe Flow doesn't seem to understand span.style's type. + + span.style[style] = this.style[style]; + } + } + + if (span) { + span.appendChild(node); + return span; + } else { + return node; + } + } + /** + * Creates markup for a symbol node. + */ + + + toMarkup() { + // TODO(alpert): More duplication than I'd like from + // span.prototype.toMarkup and symbolNode.prototype.toNode... + var needsSpan = false; + var markup = " 0) { + styles += "margin-right:" + this.italic + "em;"; + } + + for (var style in this.style) { + if (this.style.hasOwnProperty(style)) { + styles += utils.hyphenate(style) + ":" + this.style[style] + ";"; + } + } + + if (styles) { + needsSpan = true; + markup += " style=\"" + utils.escape(styles) + "\""; + } + + var escaped = utils.escape(this.text); + + if (needsSpan) { + markup += ">"; + markup += escaped; + markup += ""; + return markup; + } else { + return escaped; + } + } + +} +/** + * SVG nodes are used to render stretchy wide elements. + */ + +class SvgNode { + constructor(children, attributes) { + this.children = void 0; + this.attributes = void 0; + this.children = children || []; + this.attributes = attributes || {}; + } + + toNode() { + var svgNS = "http://www.w3.org/2000/svg"; + var node = document.createElementNS(svgNS, "svg"); // Apply attributes + + for (var attr in this.attributes) { + if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) { + node.setAttribute(attr, this.attributes[attr]); + } + } + + for (var i = 0; i < this.children.length; i++) { + node.appendChild(this.children[i].toNode()); + } + + return node; + } + + toMarkup() { + var markup = ""; + } else { + return ""; + } + } + +} +class LineNode { + constructor(attributes) { + this.attributes = void 0; + this.attributes = attributes || {}; + } + + toNode() { + var svgNS = "http://www.w3.org/2000/svg"; + var node = document.createElementNS(svgNS, "line"); // Apply attributes + + for (var attr in this.attributes) { + if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) { + node.setAttribute(attr, this.attributes[attr]); + } + } + + return node; + } + + toMarkup() { + var markup = " but got " + String(group) + "."); + } +} + +/** + * This file holds a list of all no-argument functions and single-character + * symbols (like 'a' or ';'). + * + * For each of the symbols, there are three properties they can have: + * - font (required): the font to be used for this symbol. Either "main" (the + normal font), or "ams" (the ams fonts). + * - group (required): the ParseNode group type the symbol should have (i.e. + "textord", "mathord", etc). + See https://github.com/KaTeX/KaTeX/wiki/Examining-TeX#group-types + * - replace: the character that this symbol or function should be + * replaced with (i.e. "\phi" has a replace value of "\u03d5", the phi + * character in the main font). + * + * The outermost map in the table indicates what mode the symbols should be + * accepted in (e.g. "math" or "text"). + */ +// Some of these have a "-token" suffix since these are also used as `ParseNode` +// types for raw text tokens, and we want to avoid conflicts with higher-level +// `ParseNode` types. These `ParseNode`s are constructed within `Parser` by +// looking up the `symbols` map. +var ATOMS = { + "bin": 1, + "close": 1, + "inner": 1, + "open": 1, + "punct": 1, + "rel": 1 +}; +var NON_ATOMS = { + "accent-token": 1, + "mathord": 1, + "op-token": 1, + "spacing": 1, + "textord": 1 +}; +var symbols = { + "math": {}, + "text": {} +}; +/** `acceptUnicodeChar = true` is only applicable if `replace` is set. */ + +function defineSymbol(mode, font, group, replace, name, acceptUnicodeChar) { + symbols[mode][name] = { + font, + group, + replace + }; + + if (acceptUnicodeChar && replace) { + symbols[mode][replace] = symbols[mode][name]; + } +} // Some abbreviations for commonly used strings. +// This helps minify the code, and also spotting typos using jshint. +// modes: + +var math = "math"; +var text = "text"; // fonts: + +var main = "main"; +var ams = "ams"; // groups: + +var accent = "accent-token"; +var bin = "bin"; +var close = "close"; +var inner = "inner"; +var mathord = "mathord"; +var op = "op-token"; +var open = "open"; +var punct = "punct"; +var rel = "rel"; +var spacing = "spacing"; +var textord = "textord"; // Now comes the symbol table +// Relation Symbols + +defineSymbol(math, main, rel, "\u2261", "\\equiv", true); +defineSymbol(math, main, rel, "\u227a", "\\prec", true); +defineSymbol(math, main, rel, "\u227b", "\\succ", true); +defineSymbol(math, main, rel, "\u223c", "\\sim", true); +defineSymbol(math, main, rel, "\u22a5", "\\perp"); +defineSymbol(math, main, rel, "\u2aaf", "\\preceq", true); +defineSymbol(math, main, rel, "\u2ab0", "\\succeq", true); +defineSymbol(math, main, rel, "\u2243", "\\simeq", true); +defineSymbol(math, main, rel, "\u2223", "\\mid", true); +defineSymbol(math, main, rel, "\u226a", "\\ll", true); +defineSymbol(math, main, rel, "\u226b", "\\gg", true); +defineSymbol(math, main, rel, "\u224d", "\\asymp", true); +defineSymbol(math, main, rel, "\u2225", "\\parallel"); +defineSymbol(math, main, rel, "\u22c8", "\\bowtie", true); +defineSymbol(math, main, rel, "\u2323", "\\smile", true); +defineSymbol(math, main, rel, "\u2291", "\\sqsubseteq", true); +defineSymbol(math, main, rel, "\u2292", "\\sqsupseteq", true); +defineSymbol(math, main, rel, "\u2250", "\\doteq", true); +defineSymbol(math, main, rel, "\u2322", "\\frown", true); +defineSymbol(math, main, rel, "\u220b", "\\ni", true); +defineSymbol(math, main, rel, "\u221d", "\\propto", true); +defineSymbol(math, main, rel, "\u22a2", "\\vdash", true); +defineSymbol(math, main, rel, "\u22a3", "\\dashv", true); +defineSymbol(math, main, rel, "\u220b", "\\owns"); // Punctuation + +defineSymbol(math, main, punct, "\u002e", "\\ldotp"); +defineSymbol(math, main, punct, "\u22c5", "\\cdotp"); // Misc Symbols + +defineSymbol(math, main, textord, "\u0023", "\\#"); +defineSymbol(text, main, textord, "\u0023", "\\#"); +defineSymbol(math, main, textord, "\u0026", "\\&"); +defineSymbol(text, main, textord, "\u0026", "\\&"); +defineSymbol(math, main, textord, "\u2135", "\\aleph", true); +defineSymbol(math, main, textord, "\u2200", "\\forall", true); +defineSymbol(math, main, textord, "\u210f", "\\hbar", true); +defineSymbol(math, main, textord, "\u2203", "\\exists", true); +defineSymbol(math, main, textord, "\u2207", "\\nabla", true); +defineSymbol(math, main, textord, "\u266d", "\\flat", true); +defineSymbol(math, main, textord, "\u2113", "\\ell", true); +defineSymbol(math, main, textord, "\u266e", "\\natural", true); +defineSymbol(math, main, textord, "\u2663", "\\clubsuit", true); +defineSymbol(math, main, textord, "\u2118", "\\wp", true); +defineSymbol(math, main, textord, "\u266f", "\\sharp", true); +defineSymbol(math, main, textord, "\u2662", "\\diamondsuit", true); +defineSymbol(math, main, textord, "\u211c", "\\Re", true); +defineSymbol(math, main, textord, "\u2661", "\\heartsuit", true); +defineSymbol(math, main, textord, "\u2111", "\\Im", true); +defineSymbol(math, main, textord, "\u2660", "\\spadesuit", true); +defineSymbol(math, main, textord, "\u00a7", "\\S", true); +defineSymbol(text, main, textord, "\u00a7", "\\S"); +defineSymbol(math, main, textord, "\u00b6", "\\P", true); +defineSymbol(text, main, textord, "\u00b6", "\\P"); // Math and Text + +defineSymbol(math, main, textord, "\u2020", "\\dag"); +defineSymbol(text, main, textord, "\u2020", "\\dag"); +defineSymbol(text, main, textord, "\u2020", "\\textdagger"); +defineSymbol(math, main, textord, "\u2021", "\\ddag"); +defineSymbol(text, main, textord, "\u2021", "\\ddag"); +defineSymbol(text, main, textord, "\u2021", "\\textdaggerdbl"); // Large Delimiters + +defineSymbol(math, main, close, "\u23b1", "\\rmoustache", true); +defineSymbol(math, main, open, "\u23b0", "\\lmoustache", true); +defineSymbol(math, main, close, "\u27ef", "\\rgroup", true); +defineSymbol(math, main, open, "\u27ee", "\\lgroup", true); // Binary Operators + +defineSymbol(math, main, bin, "\u2213", "\\mp", true); +defineSymbol(math, main, bin, "\u2296", "\\ominus", true); +defineSymbol(math, main, bin, "\u228e", "\\uplus", true); +defineSymbol(math, main, bin, "\u2293", "\\sqcap", true); +defineSymbol(math, main, bin, "\u2217", "\\ast"); +defineSymbol(math, main, bin, "\u2294", "\\sqcup", true); +defineSymbol(math, main, bin, "\u25ef", "\\bigcirc", true); +defineSymbol(math, main, bin, "\u2219", "\\bullet", true); +defineSymbol(math, main, bin, "\u2021", "\\ddagger"); +defineSymbol(math, main, bin, "\u2240", "\\wr", true); +defineSymbol(math, main, bin, "\u2a3f", "\\amalg"); +defineSymbol(math, main, bin, "\u0026", "\\And"); // from amsmath +// Arrow Symbols + +defineSymbol(math, main, rel, "\u27f5", "\\longleftarrow", true); +defineSymbol(math, main, rel, "\u21d0", "\\Leftarrow", true); +defineSymbol(math, main, rel, "\u27f8", "\\Longleftarrow", true); +defineSymbol(math, main, rel, "\u27f6", "\\longrightarrow", true); +defineSymbol(math, main, rel, "\u21d2", "\\Rightarrow", true); +defineSymbol(math, main, rel, "\u27f9", "\\Longrightarrow", true); +defineSymbol(math, main, rel, "\u2194", "\\leftrightarrow", true); +defineSymbol(math, main, rel, "\u27f7", "\\longleftrightarrow", true); +defineSymbol(math, main, rel, "\u21d4", "\\Leftrightarrow", true); +defineSymbol(math, main, rel, "\u27fa", "\\Longleftrightarrow", true); +defineSymbol(math, main, rel, "\u21a6", "\\mapsto", true); +defineSymbol(math, main, rel, "\u27fc", "\\longmapsto", true); +defineSymbol(math, main, rel, "\u2197", "\\nearrow", true); +defineSymbol(math, main, rel, "\u21a9", "\\hookleftarrow", true); +defineSymbol(math, main, rel, "\u21aa", "\\hookrightarrow", true); +defineSymbol(math, main, rel, "\u2198", "\\searrow", true); +defineSymbol(math, main, rel, "\u21bc", "\\leftharpoonup", true); +defineSymbol(math, main, rel, "\u21c0", "\\rightharpoonup", true); +defineSymbol(math, main, rel, "\u2199", "\\swarrow", true); +defineSymbol(math, main, rel, "\u21bd", "\\leftharpoondown", true); +defineSymbol(math, main, rel, "\u21c1", "\\rightharpoondown", true); +defineSymbol(math, main, rel, "\u2196", "\\nwarrow", true); +defineSymbol(math, main, rel, "\u21cc", "\\rightleftharpoons", true); // AMS Negated Binary Relations + +defineSymbol(math, ams, rel, "\u226e", "\\nless", true); // Symbol names preceded by "@" each have a corresponding macro. + +defineSymbol(math, ams, rel, "\ue010", "\\@nleqslant"); +defineSymbol(math, ams, rel, "\ue011", "\\@nleqq"); +defineSymbol(math, ams, rel, "\u2a87", "\\lneq", true); +defineSymbol(math, ams, rel, "\u2268", "\\lneqq", true); +defineSymbol(math, ams, rel, "\ue00c", "\\@lvertneqq"); +defineSymbol(math, ams, rel, "\u22e6", "\\lnsim", true); +defineSymbol(math, ams, rel, "\u2a89", "\\lnapprox", true); +defineSymbol(math, ams, rel, "\u2280", "\\nprec", true); // unicode-math maps \u22e0 to \npreccurlyeq. We'll use the AMS synonym. + +defineSymbol(math, ams, rel, "\u22e0", "\\npreceq", true); +defineSymbol(math, ams, rel, "\u22e8", "\\precnsim", true); +defineSymbol(math, ams, rel, "\u2ab9", "\\precnapprox", true); +defineSymbol(math, ams, rel, "\u2241", "\\nsim", true); +defineSymbol(math, ams, rel, "\ue006", "\\@nshortmid"); +defineSymbol(math, ams, rel, "\u2224", "\\nmid", true); +defineSymbol(math, ams, rel, "\u22ac", "\\nvdash", true); +defineSymbol(math, ams, rel, "\u22ad", "\\nvDash", true); +defineSymbol(math, ams, rel, "\u22ea", "\\ntriangleleft"); +defineSymbol(math, ams, rel, "\u22ec", "\\ntrianglelefteq", true); +defineSymbol(math, ams, rel, "\u228a", "\\subsetneq", true); +defineSymbol(math, ams, rel, "\ue01a", "\\@varsubsetneq"); +defineSymbol(math, ams, rel, "\u2acb", "\\subsetneqq", true); +defineSymbol(math, ams, rel, "\ue017", "\\@varsubsetneqq"); +defineSymbol(math, ams, rel, "\u226f", "\\ngtr", true); +defineSymbol(math, ams, rel, "\ue00f", "\\@ngeqslant"); +defineSymbol(math, ams, rel, "\ue00e", "\\@ngeqq"); +defineSymbol(math, ams, rel, "\u2a88", "\\gneq", true); +defineSymbol(math, ams, rel, "\u2269", "\\gneqq", true); +defineSymbol(math, ams, rel, "\ue00d", "\\@gvertneqq"); +defineSymbol(math, ams, rel, "\u22e7", "\\gnsim", true); +defineSymbol(math, ams, rel, "\u2a8a", "\\gnapprox", true); +defineSymbol(math, ams, rel, "\u2281", "\\nsucc", true); // unicode-math maps \u22e1 to \nsucccurlyeq. We'll use the AMS synonym. + +defineSymbol(math, ams, rel, "\u22e1", "\\nsucceq", true); +defineSymbol(math, ams, rel, "\u22e9", "\\succnsim", true); +defineSymbol(math, ams, rel, "\u2aba", "\\succnapprox", true); // unicode-math maps \u2246 to \simneqq. We'll use the AMS synonym. + +defineSymbol(math, ams, rel, "\u2246", "\\ncong", true); +defineSymbol(math, ams, rel, "\ue007", "\\@nshortparallel"); +defineSymbol(math, ams, rel, "\u2226", "\\nparallel", true); +defineSymbol(math, ams, rel, "\u22af", "\\nVDash", true); +defineSymbol(math, ams, rel, "\u22eb", "\\ntriangleright"); +defineSymbol(math, ams, rel, "\u22ed", "\\ntrianglerighteq", true); +defineSymbol(math, ams, rel, "\ue018", "\\@nsupseteqq"); +defineSymbol(math, ams, rel, "\u228b", "\\supsetneq", true); +defineSymbol(math, ams, rel, "\ue01b", "\\@varsupsetneq"); +defineSymbol(math, ams, rel, "\u2acc", "\\supsetneqq", true); +defineSymbol(math, ams, rel, "\ue019", "\\@varsupsetneqq"); +defineSymbol(math, ams, rel, "\u22ae", "\\nVdash", true); +defineSymbol(math, ams, rel, "\u2ab5", "\\precneqq", true); +defineSymbol(math, ams, rel, "\u2ab6", "\\succneqq", true); +defineSymbol(math, ams, rel, "\ue016", "\\@nsubseteqq"); +defineSymbol(math, ams, bin, "\u22b4", "\\unlhd"); +defineSymbol(math, ams, bin, "\u22b5", "\\unrhd"); // AMS Negated Arrows + +defineSymbol(math, ams, rel, "\u219a", "\\nleftarrow", true); +defineSymbol(math, ams, rel, "\u219b", "\\nrightarrow", true); +defineSymbol(math, ams, rel, "\u21cd", "\\nLeftarrow", true); +defineSymbol(math, ams, rel, "\u21cf", "\\nRightarrow", true); +defineSymbol(math, ams, rel, "\u21ae", "\\nleftrightarrow", true); +defineSymbol(math, ams, rel, "\u21ce", "\\nLeftrightarrow", true); // AMS Misc + +defineSymbol(math, ams, rel, "\u25b3", "\\vartriangle"); +defineSymbol(math, ams, textord, "\u210f", "\\hslash"); +defineSymbol(math, ams, textord, "\u25bd", "\\triangledown"); +defineSymbol(math, ams, textord, "\u25ca", "\\lozenge"); +defineSymbol(math, ams, textord, "\u24c8", "\\circledS"); +defineSymbol(math, ams, textord, "\u00ae", "\\circledR"); +defineSymbol(text, ams, textord, "\u00ae", "\\circledR"); +defineSymbol(math, ams, textord, "\u2221", "\\measuredangle", true); +defineSymbol(math, ams, textord, "\u2204", "\\nexists"); +defineSymbol(math, ams, textord, "\u2127", "\\mho"); +defineSymbol(math, ams, textord, "\u2132", "\\Finv", true); +defineSymbol(math, ams, textord, "\u2141", "\\Game", true); +defineSymbol(math, ams, textord, "\u2035", "\\backprime"); +defineSymbol(math, ams, textord, "\u25b2", "\\blacktriangle"); +defineSymbol(math, ams, textord, "\u25bc", "\\blacktriangledown"); +defineSymbol(math, ams, textord, "\u25a0", "\\blacksquare"); +defineSymbol(math, ams, textord, "\u29eb", "\\blacklozenge"); +defineSymbol(math, ams, textord, "\u2605", "\\bigstar"); +defineSymbol(math, ams, textord, "\u2222", "\\sphericalangle", true); +defineSymbol(math, ams, textord, "\u2201", "\\complement", true); // unicode-math maps U+F0 to \matheth. We map to AMS function \eth + +defineSymbol(math, ams, textord, "\u00f0", "\\eth", true); +defineSymbol(text, main, textord, "\u00f0", "\u00f0"); +defineSymbol(math, ams, textord, "\u2571", "\\diagup"); +defineSymbol(math, ams, textord, "\u2572", "\\diagdown"); +defineSymbol(math, ams, textord, "\u25a1", "\\square"); +defineSymbol(math, ams, textord, "\u25a1", "\\Box"); +defineSymbol(math, ams, textord, "\u25ca", "\\Diamond"); // unicode-math maps U+A5 to \mathyen. We map to AMS function \yen + +defineSymbol(math, ams, textord, "\u00a5", "\\yen", true); +defineSymbol(text, ams, textord, "\u00a5", "\\yen", true); +defineSymbol(math, ams, textord, "\u2713", "\\checkmark", true); +defineSymbol(text, ams, textord, "\u2713", "\\checkmark"); // AMS Hebrew + +defineSymbol(math, ams, textord, "\u2136", "\\beth", true); +defineSymbol(math, ams, textord, "\u2138", "\\daleth", true); +defineSymbol(math, ams, textord, "\u2137", "\\gimel", true); // AMS Greek + +defineSymbol(math, ams, textord, "\u03dd", "\\digamma", true); +defineSymbol(math, ams, textord, "\u03f0", "\\varkappa"); // AMS Delimiters + +defineSymbol(math, ams, open, "\u250c", "\\@ulcorner", true); +defineSymbol(math, ams, close, "\u2510", "\\@urcorner", true); +defineSymbol(math, ams, open, "\u2514", "\\@llcorner", true); +defineSymbol(math, ams, close, "\u2518", "\\@lrcorner", true); // AMS Binary Relations + +defineSymbol(math, ams, rel, "\u2266", "\\leqq", true); +defineSymbol(math, ams, rel, "\u2a7d", "\\leqslant", true); +defineSymbol(math, ams, rel, "\u2a95", "\\eqslantless", true); +defineSymbol(math, ams, rel, "\u2272", "\\lesssim", true); +defineSymbol(math, ams, rel, "\u2a85", "\\lessapprox", true); +defineSymbol(math, ams, rel, "\u224a", "\\approxeq", true); +defineSymbol(math, ams, bin, "\u22d6", "\\lessdot"); +defineSymbol(math, ams, rel, "\u22d8", "\\lll", true); +defineSymbol(math, ams, rel, "\u2276", "\\lessgtr", true); +defineSymbol(math, ams, rel, "\u22da", "\\lesseqgtr", true); +defineSymbol(math, ams, rel, "\u2a8b", "\\lesseqqgtr", true); +defineSymbol(math, ams, rel, "\u2251", "\\doteqdot"); +defineSymbol(math, ams, rel, "\u2253", "\\risingdotseq", true); +defineSymbol(math, ams, rel, "\u2252", "\\fallingdotseq", true); +defineSymbol(math, ams, rel, "\u223d", "\\backsim", true); +defineSymbol(math, ams, rel, "\u22cd", "\\backsimeq", true); +defineSymbol(math, ams, rel, "\u2ac5", "\\subseteqq", true); +defineSymbol(math, ams, rel, "\u22d0", "\\Subset", true); +defineSymbol(math, ams, rel, "\u228f", "\\sqsubset", true); +defineSymbol(math, ams, rel, "\u227c", "\\preccurlyeq", true); +defineSymbol(math, ams, rel, "\u22de", "\\curlyeqprec", true); +defineSymbol(math, ams, rel, "\u227e", "\\precsim", true); +defineSymbol(math, ams, rel, "\u2ab7", "\\precapprox", true); +defineSymbol(math, ams, rel, "\u22b2", "\\vartriangleleft"); +defineSymbol(math, ams, rel, "\u22b4", "\\trianglelefteq"); +defineSymbol(math, ams, rel, "\u22a8", "\\vDash", true); +defineSymbol(math, ams, rel, "\u22aa", "\\Vvdash", true); +defineSymbol(math, ams, rel, "\u2323", "\\smallsmile"); +defineSymbol(math, ams, rel, "\u2322", "\\smallfrown"); +defineSymbol(math, ams, rel, "\u224f", "\\bumpeq", true); +defineSymbol(math, ams, rel, "\u224e", "\\Bumpeq", true); +defineSymbol(math, ams, rel, "\u2267", "\\geqq", true); +defineSymbol(math, ams, rel, "\u2a7e", "\\geqslant", true); +defineSymbol(math, ams, rel, "\u2a96", "\\eqslantgtr", true); +defineSymbol(math, ams, rel, "\u2273", "\\gtrsim", true); +defineSymbol(math, ams, rel, "\u2a86", "\\gtrapprox", true); +defineSymbol(math, ams, bin, "\u22d7", "\\gtrdot"); +defineSymbol(math, ams, rel, "\u22d9", "\\ggg", true); +defineSymbol(math, ams, rel, "\u2277", "\\gtrless", true); +defineSymbol(math, ams, rel, "\u22db", "\\gtreqless", true); +defineSymbol(math, ams, rel, "\u2a8c", "\\gtreqqless", true); +defineSymbol(math, ams, rel, "\u2256", "\\eqcirc", true); +defineSymbol(math, ams, rel, "\u2257", "\\circeq", true); +defineSymbol(math, ams, rel, "\u225c", "\\triangleq", true); +defineSymbol(math, ams, rel, "\u223c", "\\thicksim"); +defineSymbol(math, ams, rel, "\u2248", "\\thickapprox"); +defineSymbol(math, ams, rel, "\u2ac6", "\\supseteqq", true); +defineSymbol(math, ams, rel, "\u22d1", "\\Supset", true); +defineSymbol(math, ams, rel, "\u2290", "\\sqsupset", true); +defineSymbol(math, ams, rel, "\u227d", "\\succcurlyeq", true); +defineSymbol(math, ams, rel, "\u22df", "\\curlyeqsucc", true); +defineSymbol(math, ams, rel, "\u227f", "\\succsim", true); +defineSymbol(math, ams, rel, "\u2ab8", "\\succapprox", true); +defineSymbol(math, ams, rel, "\u22b3", "\\vartriangleright"); +defineSymbol(math, ams, rel, "\u22b5", "\\trianglerighteq"); +defineSymbol(math, ams, rel, "\u22a9", "\\Vdash", true); +defineSymbol(math, ams, rel, "\u2223", "\\shortmid"); +defineSymbol(math, ams, rel, "\u2225", "\\shortparallel"); +defineSymbol(math, ams, rel, "\u226c", "\\between", true); +defineSymbol(math, ams, rel, "\u22d4", "\\pitchfork", true); +defineSymbol(math, ams, rel, "\u221d", "\\varpropto"); +defineSymbol(math, ams, rel, "\u25c0", "\\blacktriangleleft"); // unicode-math says that \therefore is a mathord atom. +// We kept the amssymb atom type, which is rel. + +defineSymbol(math, ams, rel, "\u2234", "\\therefore", true); +defineSymbol(math, ams, rel, "\u220d", "\\backepsilon"); +defineSymbol(math, ams, rel, "\u25b6", "\\blacktriangleright"); // unicode-math says that \because is a mathord atom. +// We kept the amssymb atom type, which is rel. + +defineSymbol(math, ams, rel, "\u2235", "\\because", true); +defineSymbol(math, ams, rel, "\u22d8", "\\llless"); +defineSymbol(math, ams, rel, "\u22d9", "\\gggtr"); +defineSymbol(math, ams, bin, "\u22b2", "\\lhd"); +defineSymbol(math, ams, bin, "\u22b3", "\\rhd"); +defineSymbol(math, ams, rel, "\u2242", "\\eqsim", true); +defineSymbol(math, main, rel, "\u22c8", "\\Join"); +defineSymbol(math, ams, rel, "\u2251", "\\Doteq", true); // AMS Binary Operators + +defineSymbol(math, ams, bin, "\u2214", "\\dotplus", true); +defineSymbol(math, ams, bin, "\u2216", "\\smallsetminus"); +defineSymbol(math, ams, bin, "\u22d2", "\\Cap", true); +defineSymbol(math, ams, bin, "\u22d3", "\\Cup", true); +defineSymbol(math, ams, bin, "\u2a5e", "\\doublebarwedge", true); +defineSymbol(math, ams, bin, "\u229f", "\\boxminus", true); +defineSymbol(math, ams, bin, "\u229e", "\\boxplus", true); +defineSymbol(math, ams, bin, "\u22c7", "\\divideontimes", true); +defineSymbol(math, ams, bin, "\u22c9", "\\ltimes", true); +defineSymbol(math, ams, bin, "\u22ca", "\\rtimes", true); +defineSymbol(math, ams, bin, "\u22cb", "\\leftthreetimes", true); +defineSymbol(math, ams, bin, "\u22cc", "\\rightthreetimes", true); +defineSymbol(math, ams, bin, "\u22cf", "\\curlywedge", true); +defineSymbol(math, ams, bin, "\u22ce", "\\curlyvee", true); +defineSymbol(math, ams, bin, "\u229d", "\\circleddash", true); +defineSymbol(math, ams, bin, "\u229b", "\\circledast", true); +defineSymbol(math, ams, bin, "\u22c5", "\\centerdot"); +defineSymbol(math, ams, bin, "\u22ba", "\\intercal", true); +defineSymbol(math, ams, bin, "\u22d2", "\\doublecap"); +defineSymbol(math, ams, bin, "\u22d3", "\\doublecup"); +defineSymbol(math, ams, bin, "\u22a0", "\\boxtimes", true); // AMS Arrows +// Note: unicode-math maps \u21e2 to their own function \rightdasharrow. +// We'll map it to AMS function \dashrightarrow. It produces the same atom. + +defineSymbol(math, ams, rel, "\u21e2", "\\dashrightarrow", true); // unicode-math maps \u21e0 to \leftdasharrow. We'll use the AMS synonym. + +defineSymbol(math, ams, rel, "\u21e0", "\\dashleftarrow", true); +defineSymbol(math, ams, rel, "\u21c7", "\\leftleftarrows", true); +defineSymbol(math, ams, rel, "\u21c6", "\\leftrightarrows", true); +defineSymbol(math, ams, rel, "\u21da", "\\Lleftarrow", true); +defineSymbol(math, ams, rel, "\u219e", "\\twoheadleftarrow", true); +defineSymbol(math, ams, rel, "\u21a2", "\\leftarrowtail", true); +defineSymbol(math, ams, rel, "\u21ab", "\\looparrowleft", true); +defineSymbol(math, ams, rel, "\u21cb", "\\leftrightharpoons", true); +defineSymbol(math, ams, rel, "\u21b6", "\\curvearrowleft", true); // unicode-math maps \u21ba to \acwopencirclearrow. We'll use the AMS synonym. + +defineSymbol(math, ams, rel, "\u21ba", "\\circlearrowleft", true); +defineSymbol(math, ams, rel, "\u21b0", "\\Lsh", true); +defineSymbol(math, ams, rel, "\u21c8", "\\upuparrows", true); +defineSymbol(math, ams, rel, "\u21bf", "\\upharpoonleft", true); +defineSymbol(math, ams, rel, "\u21c3", "\\downharpoonleft", true); +defineSymbol(math, main, rel, "\u22b6", "\\origof", true); // not in font + +defineSymbol(math, main, rel, "\u22b7", "\\imageof", true); // not in font + +defineSymbol(math, ams, rel, "\u22b8", "\\multimap", true); +defineSymbol(math, ams, rel, "\u21ad", "\\leftrightsquigarrow", true); +defineSymbol(math, ams, rel, "\u21c9", "\\rightrightarrows", true); +defineSymbol(math, ams, rel, "\u21c4", "\\rightleftarrows", true); +defineSymbol(math, ams, rel, "\u21a0", "\\twoheadrightarrow", true); +defineSymbol(math, ams, rel, "\u21a3", "\\rightarrowtail", true); +defineSymbol(math, ams, rel, "\u21ac", "\\looparrowright", true); +defineSymbol(math, ams, rel, "\u21b7", "\\curvearrowright", true); // unicode-math maps \u21bb to \cwopencirclearrow. We'll use the AMS synonym. + +defineSymbol(math, ams, rel, "\u21bb", "\\circlearrowright", true); +defineSymbol(math, ams, rel, "\u21b1", "\\Rsh", true); +defineSymbol(math, ams, rel, "\u21ca", "\\downdownarrows", true); +defineSymbol(math, ams, rel, "\u21be", "\\upharpoonright", true); +defineSymbol(math, ams, rel, "\u21c2", "\\downharpoonright", true); +defineSymbol(math, ams, rel, "\u21dd", "\\rightsquigarrow", true); +defineSymbol(math, ams, rel, "\u21dd", "\\leadsto"); +defineSymbol(math, ams, rel, "\u21db", "\\Rrightarrow", true); +defineSymbol(math, ams, rel, "\u21be", "\\restriction"); +defineSymbol(math, main, textord, "\u2018", "`"); +defineSymbol(math, main, textord, "$", "\\$"); +defineSymbol(text, main, textord, "$", "\\$"); +defineSymbol(text, main, textord, "$", "\\textdollar"); +defineSymbol(math, main, textord, "%", "\\%"); +defineSymbol(text, main, textord, "%", "\\%"); +defineSymbol(math, main, textord, "_", "\\_"); +defineSymbol(text, main, textord, "_", "\\_"); +defineSymbol(text, main, textord, "_", "\\textunderscore"); +defineSymbol(math, main, textord, "\u2220", "\\angle", true); +defineSymbol(math, main, textord, "\u221e", "\\infty", true); +defineSymbol(math, main, textord, "\u2032", "\\prime"); +defineSymbol(math, main, textord, "\u25b3", "\\triangle"); +defineSymbol(math, main, textord, "\u0393", "\\Gamma", true); +defineSymbol(math, main, textord, "\u0394", "\\Delta", true); +defineSymbol(math, main, textord, "\u0398", "\\Theta", true); +defineSymbol(math, main, textord, "\u039b", "\\Lambda", true); +defineSymbol(math, main, textord, "\u039e", "\\Xi", true); +defineSymbol(math, main, textord, "\u03a0", "\\Pi", true); +defineSymbol(math, main, textord, "\u03a3", "\\Sigma", true); +defineSymbol(math, main, textord, "\u03a5", "\\Upsilon", true); +defineSymbol(math, main, textord, "\u03a6", "\\Phi", true); +defineSymbol(math, main, textord, "\u03a8", "\\Psi", true); +defineSymbol(math, main, textord, "\u03a9", "\\Omega", true); +defineSymbol(math, main, textord, "A", "\u0391"); +defineSymbol(math, main, textord, "B", "\u0392"); +defineSymbol(math, main, textord, "E", "\u0395"); +defineSymbol(math, main, textord, "Z", "\u0396"); +defineSymbol(math, main, textord, "H", "\u0397"); +defineSymbol(math, main, textord, "I", "\u0399"); +defineSymbol(math, main, textord, "K", "\u039A"); +defineSymbol(math, main, textord, "M", "\u039C"); +defineSymbol(math, main, textord, "N", "\u039D"); +defineSymbol(math, main, textord, "O", "\u039F"); +defineSymbol(math, main, textord, "P", "\u03A1"); +defineSymbol(math, main, textord, "T", "\u03A4"); +defineSymbol(math, main, textord, "X", "\u03A7"); +defineSymbol(math, main, textord, "\u00ac", "\\neg", true); +defineSymbol(math, main, textord, "\u00ac", "\\lnot"); +defineSymbol(math, main, textord, "\u22a4", "\\top"); +defineSymbol(math, main, textord, "\u22a5", "\\bot"); +defineSymbol(math, main, textord, "\u2205", "\\emptyset"); +defineSymbol(math, ams, textord, "\u2205", "\\varnothing"); +defineSymbol(math, main, mathord, "\u03b1", "\\alpha", true); +defineSymbol(math, main, mathord, "\u03b2", "\\beta", true); +defineSymbol(math, main, mathord, "\u03b3", "\\gamma", true); +defineSymbol(math, main, mathord, "\u03b4", "\\delta", true); +defineSymbol(math, main, mathord, "\u03f5", "\\epsilon", true); +defineSymbol(math, main, mathord, "\u03b6", "\\zeta", true); +defineSymbol(math, main, mathord, "\u03b7", "\\eta", true); +defineSymbol(math, main, mathord, "\u03b8", "\\theta", true); +defineSymbol(math, main, mathord, "\u03b9", "\\iota", true); +defineSymbol(math, main, mathord, "\u03ba", "\\kappa", true); +defineSymbol(math, main, mathord, "\u03bb", "\\lambda", true); +defineSymbol(math, main, mathord, "\u03bc", "\\mu", true); +defineSymbol(math, main, mathord, "\u03bd", "\\nu", true); +defineSymbol(math, main, mathord, "\u03be", "\\xi", true); +defineSymbol(math, main, mathord, "\u03bf", "\\omicron", true); +defineSymbol(math, main, mathord, "\u03c0", "\\pi", true); +defineSymbol(math, main, mathord, "\u03c1", "\\rho", true); +defineSymbol(math, main, mathord, "\u03c3", "\\sigma", true); +defineSymbol(math, main, mathord, "\u03c4", "\\tau", true); +defineSymbol(math, main, mathord, "\u03c5", "\\upsilon", true); +defineSymbol(math, main, mathord, "\u03d5", "\\phi", true); +defineSymbol(math, main, mathord, "\u03c7", "\\chi", true); +defineSymbol(math, main, mathord, "\u03c8", "\\psi", true); +defineSymbol(math, main, mathord, "\u03c9", "\\omega", true); +defineSymbol(math, main, mathord, "\u03b5", "\\varepsilon", true); +defineSymbol(math, main, mathord, "\u03d1", "\\vartheta", true); +defineSymbol(math, main, mathord, "\u03d6", "\\varpi", true); +defineSymbol(math, main, mathord, "\u03f1", "\\varrho", true); +defineSymbol(math, main, mathord, "\u03c2", "\\varsigma", true); +defineSymbol(math, main, mathord, "\u03c6", "\\varphi", true); +defineSymbol(math, main, bin, "\u2217", "*", true); +defineSymbol(math, main, bin, "+", "+"); +defineSymbol(math, main, bin, "\u2212", "-", true); +defineSymbol(math, main, bin, "\u22c5", "\\cdot", true); +defineSymbol(math, main, bin, "\u2218", "\\circ", true); +defineSymbol(math, main, bin, "\u00f7", "\\div", true); +defineSymbol(math, main, bin, "\u00b1", "\\pm", true); +defineSymbol(math, main, bin, "\u00d7", "\\times", true); +defineSymbol(math, main, bin, "\u2229", "\\cap", true); +defineSymbol(math, main, bin, "\u222a", "\\cup", true); +defineSymbol(math, main, bin, "\u2216", "\\setminus", true); +defineSymbol(math, main, bin, "\u2227", "\\land"); +defineSymbol(math, main, bin, "\u2228", "\\lor"); +defineSymbol(math, main, bin, "\u2227", "\\wedge", true); +defineSymbol(math, main, bin, "\u2228", "\\vee", true); +defineSymbol(math, main, textord, "\u221a", "\\surd"); +defineSymbol(math, main, open, "\u27e8", "\\langle", true); +defineSymbol(math, main, open, "\u2223", "\\lvert"); +defineSymbol(math, main, open, "\u2225", "\\lVert"); +defineSymbol(math, main, close, "?", "?"); +defineSymbol(math, main, close, "!", "!"); +defineSymbol(math, main, close, "\u27e9", "\\rangle", true); +defineSymbol(math, main, close, "\u2223", "\\rvert"); +defineSymbol(math, main, close, "\u2225", "\\rVert"); +defineSymbol(math, main, rel, "=", "="); +defineSymbol(math, main, rel, ":", ":"); +defineSymbol(math, main, rel, "\u2248", "\\approx", true); +defineSymbol(math, main, rel, "\u2245", "\\cong", true); +defineSymbol(math, main, rel, "\u2265", "\\ge"); +defineSymbol(math, main, rel, "\u2265", "\\geq", true); +defineSymbol(math, main, rel, "\u2190", "\\gets"); +defineSymbol(math, main, rel, ">", "\\gt", true); +defineSymbol(math, main, rel, "\u2208", "\\in", true); +defineSymbol(math, main, rel, "\ue020", "\\@not"); +defineSymbol(math, main, rel, "\u2282", "\\subset", true); +defineSymbol(math, main, rel, "\u2283", "\\supset", true); +defineSymbol(math, main, rel, "\u2286", "\\subseteq", true); +defineSymbol(math, main, rel, "\u2287", "\\supseteq", true); +defineSymbol(math, ams, rel, "\u2288", "\\nsubseteq", true); +defineSymbol(math, ams, rel, "\u2289", "\\nsupseteq", true); +defineSymbol(math, main, rel, "\u22a8", "\\models"); +defineSymbol(math, main, rel, "\u2190", "\\leftarrow", true); +defineSymbol(math, main, rel, "\u2264", "\\le"); +defineSymbol(math, main, rel, "\u2264", "\\leq", true); +defineSymbol(math, main, rel, "<", "\\lt", true); +defineSymbol(math, main, rel, "\u2192", "\\rightarrow", true); +defineSymbol(math, main, rel, "\u2192", "\\to"); +defineSymbol(math, ams, rel, "\u2271", "\\ngeq", true); +defineSymbol(math, ams, rel, "\u2270", "\\nleq", true); +defineSymbol(math, main, spacing, "\u00a0", "\\ "); +defineSymbol(math, main, spacing, "\u00a0", "\\space"); // Ref: LaTeX Source 2e: \DeclareRobustCommand{\nobreakspace}{% + +defineSymbol(math, main, spacing, "\u00a0", "\\nobreakspace"); +defineSymbol(text, main, spacing, "\u00a0", "\\ "); +defineSymbol(text, main, spacing, "\u00a0", " "); +defineSymbol(text, main, spacing, "\u00a0", "\\space"); +defineSymbol(text, main, spacing, "\u00a0", "\\nobreakspace"); +defineSymbol(math, main, spacing, null, "\\nobreak"); +defineSymbol(math, main, spacing, null, "\\allowbreak"); +defineSymbol(math, main, punct, ",", ","); +defineSymbol(math, main, punct, ";", ";"); +defineSymbol(math, ams, bin, "\u22bc", "\\barwedge", true); +defineSymbol(math, ams, bin, "\u22bb", "\\veebar", true); +defineSymbol(math, main, bin, "\u2299", "\\odot", true); +defineSymbol(math, main, bin, "\u2295", "\\oplus", true); +defineSymbol(math, main, bin, "\u2297", "\\otimes", true); +defineSymbol(math, main, textord, "\u2202", "\\partial", true); +defineSymbol(math, main, bin, "\u2298", "\\oslash", true); +defineSymbol(math, ams, bin, "\u229a", "\\circledcirc", true); +defineSymbol(math, ams, bin, "\u22a1", "\\boxdot", true); +defineSymbol(math, main, bin, "\u25b3", "\\bigtriangleup"); +defineSymbol(math, main, bin, "\u25bd", "\\bigtriangledown"); +defineSymbol(math, main, bin, "\u2020", "\\dagger"); +defineSymbol(math, main, bin, "\u22c4", "\\diamond"); +defineSymbol(math, main, bin, "\u22c6", "\\star"); +defineSymbol(math, main, bin, "\u25c3", "\\triangleleft"); +defineSymbol(math, main, bin, "\u25b9", "\\triangleright"); +defineSymbol(math, main, open, "{", "\\{"); +defineSymbol(text, main, textord, "{", "\\{"); +defineSymbol(text, main, textord, "{", "\\textbraceleft"); +defineSymbol(math, main, close, "}", "\\}"); +defineSymbol(text, main, textord, "}", "\\}"); +defineSymbol(text, main, textord, "}", "\\textbraceright"); +defineSymbol(math, main, open, "{", "\\lbrace"); +defineSymbol(math, main, close, "}", "\\rbrace"); +defineSymbol(math, main, open, "[", "\\lbrack", true); +defineSymbol(text, main, textord, "[", "\\lbrack", true); +defineSymbol(math, main, close, "]", "\\rbrack", true); +defineSymbol(text, main, textord, "]", "\\rbrack", true); +defineSymbol(math, main, open, "(", "\\lparen", true); +defineSymbol(math, main, close, ")", "\\rparen", true); +defineSymbol(text, main, textord, "<", "\\textless", true); // in T1 fontenc + +defineSymbol(text, main, textord, ">", "\\textgreater", true); // in T1 fontenc + +defineSymbol(math, main, open, "\u230a", "\\lfloor", true); +defineSymbol(math, main, close, "\u230b", "\\rfloor", true); +defineSymbol(math, main, open, "\u2308", "\\lceil", true); +defineSymbol(math, main, close, "\u2309", "\\rceil", true); +defineSymbol(math, main, textord, "\\", "\\backslash"); +defineSymbol(math, main, textord, "\u2223", "|"); +defineSymbol(math, main, textord, "\u2223", "\\vert"); +defineSymbol(text, main, textord, "|", "\\textbar", true); // in T1 fontenc + +defineSymbol(math, main, textord, "\u2225", "\\|"); +defineSymbol(math, main, textord, "\u2225", "\\Vert"); +defineSymbol(text, main, textord, "\u2225", "\\textbardbl"); +defineSymbol(text, main, textord, "~", "\\textasciitilde"); +defineSymbol(text, main, textord, "\\", "\\textbackslash"); +defineSymbol(text, main, textord, "^", "\\textasciicircum"); +defineSymbol(math, main, rel, "\u2191", "\\uparrow", true); +defineSymbol(math, main, rel, "\u21d1", "\\Uparrow", true); +defineSymbol(math, main, rel, "\u2193", "\\downarrow", true); +defineSymbol(math, main, rel, "\u21d3", "\\Downarrow", true); +defineSymbol(math, main, rel, "\u2195", "\\updownarrow", true); +defineSymbol(math, main, rel, "\u21d5", "\\Updownarrow", true); +defineSymbol(math, main, op, "\u2210", "\\coprod"); +defineSymbol(math, main, op, "\u22c1", "\\bigvee"); +defineSymbol(math, main, op, "\u22c0", "\\bigwedge"); +defineSymbol(math, main, op, "\u2a04", "\\biguplus"); +defineSymbol(math, main, op, "\u22c2", "\\bigcap"); +defineSymbol(math, main, op, "\u22c3", "\\bigcup"); +defineSymbol(math, main, op, "\u222b", "\\int"); +defineSymbol(math, main, op, "\u222b", "\\intop"); +defineSymbol(math, main, op, "\u222c", "\\iint"); +defineSymbol(math, main, op, "\u222d", "\\iiint"); +defineSymbol(math, main, op, "\u220f", "\\prod"); +defineSymbol(math, main, op, "\u2211", "\\sum"); +defineSymbol(math, main, op, "\u2a02", "\\bigotimes"); +defineSymbol(math, main, op, "\u2a01", "\\bigoplus"); +defineSymbol(math, main, op, "\u2a00", "\\bigodot"); +defineSymbol(math, main, op, "\u222e", "\\oint"); +defineSymbol(math, main, op, "\u222f", "\\oiint"); +defineSymbol(math, main, op, "\u2230", "\\oiiint"); +defineSymbol(math, main, op, "\u2a06", "\\bigsqcup"); +defineSymbol(math, main, op, "\u222b", "\\smallint"); +defineSymbol(text, main, inner, "\u2026", "\\textellipsis"); +defineSymbol(math, main, inner, "\u2026", "\\mathellipsis"); +defineSymbol(text, main, inner, "\u2026", "\\ldots", true); +defineSymbol(math, main, inner, "\u2026", "\\ldots", true); +defineSymbol(math, main, inner, "\u22ef", "\\@cdots", true); +defineSymbol(math, main, inner, "\u22f1", "\\ddots", true); +defineSymbol(math, main, textord, "\u22ee", "\\varvdots"); // \vdots is a macro + +defineSymbol(math, main, accent, "\u02ca", "\\acute"); +defineSymbol(math, main, accent, "\u02cb", "\\grave"); +defineSymbol(math, main, accent, "\u00a8", "\\ddot"); +defineSymbol(math, main, accent, "\u007e", "\\tilde"); +defineSymbol(math, main, accent, "\u02c9", "\\bar"); +defineSymbol(math, main, accent, "\u02d8", "\\breve"); +defineSymbol(math, main, accent, "\u02c7", "\\check"); +defineSymbol(math, main, accent, "\u005e", "\\hat"); +defineSymbol(math, main, accent, "\u20d7", "\\vec"); +defineSymbol(math, main, accent, "\u02d9", "\\dot"); +defineSymbol(math, main, accent, "\u02da", "\\mathring"); // \imath and \jmath should be invariant to \mathrm, \mathbf, etc., so use PUA + +defineSymbol(math, main, mathord, "\ue131", "\\@imath"); +defineSymbol(math, main, mathord, "\ue237", "\\@jmath"); +defineSymbol(math, main, textord, "\u0131", "\u0131"); +defineSymbol(math, main, textord, "\u0237", "\u0237"); +defineSymbol(text, main, textord, "\u0131", "\\i", true); +defineSymbol(text, main, textord, "\u0237", "\\j", true); +defineSymbol(text, main, textord, "\u00df", "\\ss", true); +defineSymbol(text, main, textord, "\u00e6", "\\ae", true); +defineSymbol(text, main, textord, "\u0153", "\\oe", true); +defineSymbol(text, main, textord, "\u00f8", "\\o", true); +defineSymbol(text, main, textord, "\u00c6", "\\AE", true); +defineSymbol(text, main, textord, "\u0152", "\\OE", true); +defineSymbol(text, main, textord, "\u00d8", "\\O", true); +defineSymbol(text, main, accent, "\u02ca", "\\'"); // acute + +defineSymbol(text, main, accent, "\u02cb", "\\`"); // grave + +defineSymbol(text, main, accent, "\u02c6", "\\^"); // circumflex + +defineSymbol(text, main, accent, "\u02dc", "\\~"); // tilde + +defineSymbol(text, main, accent, "\u02c9", "\\="); // macron + +defineSymbol(text, main, accent, "\u02d8", "\\u"); // breve + +defineSymbol(text, main, accent, "\u02d9", "\\."); // dot above + +defineSymbol(text, main, accent, "\u00b8", "\\c"); // cedilla + +defineSymbol(text, main, accent, "\u02da", "\\r"); // ring above + +defineSymbol(text, main, accent, "\u02c7", "\\v"); // caron + +defineSymbol(text, main, accent, "\u00a8", '\\"'); // diaresis + +defineSymbol(text, main, accent, "\u02dd", "\\H"); // double acute + +defineSymbol(text, main, accent, "\u25ef", "\\textcircled"); // \bigcirc glyph +// These ligatures are detected and created in Parser.js's `formLigatures`. + +var ligatures = { + "--": true, + "---": true, + "``": true, + "''": true +}; +defineSymbol(text, main, textord, "\u2013", "--", true); +defineSymbol(text, main, textord, "\u2013", "\\textendash"); +defineSymbol(text, main, textord, "\u2014", "---", true); +defineSymbol(text, main, textord, "\u2014", "\\textemdash"); +defineSymbol(text, main, textord, "\u2018", "`", true); +defineSymbol(text, main, textord, "\u2018", "\\textquoteleft"); +defineSymbol(text, main, textord, "\u2019", "'", true); +defineSymbol(text, main, textord, "\u2019", "\\textquoteright"); +defineSymbol(text, main, textord, "\u201c", "``", true); +defineSymbol(text, main, textord, "\u201c", "\\textquotedblleft"); +defineSymbol(text, main, textord, "\u201d", "''", true); +defineSymbol(text, main, textord, "\u201d", "\\textquotedblright"); // \degree from gensymb package + +defineSymbol(math, main, textord, "\u00b0", "\\degree", true); +defineSymbol(text, main, textord, "\u00b0", "\\degree"); // \textdegree from inputenc package + +defineSymbol(text, main, textord, "\u00b0", "\\textdegree", true); // TODO: In LaTeX, \pounds can generate a different character in text and math +// mode, but among our fonts, only Main-Regular defines this character "163". + +defineSymbol(math, main, textord, "\u00a3", "\\pounds"); +defineSymbol(math, main, textord, "\u00a3", "\\mathsterling", true); +defineSymbol(text, main, textord, "\u00a3", "\\pounds"); +defineSymbol(text, main, textord, "\u00a3", "\\textsterling", true); +defineSymbol(math, ams, textord, "\u2720", "\\maltese"); +defineSymbol(text, ams, textord, "\u2720", "\\maltese"); // There are lots of symbols which are the same, so we add them in afterwards. +// All of these are textords in math mode + +var mathTextSymbols = "0123456789/@.\""; + +for (var i = 0; i < mathTextSymbols.length; i++) { + var ch = mathTextSymbols.charAt(i); + defineSymbol(math, main, textord, ch, ch); +} // All of these are textords in text mode + + +var textSymbols = "0123456789!@*()-=+\";:?/.,"; + +for (var _i = 0; _i < textSymbols.length; _i++) { + var _ch = textSymbols.charAt(_i); + + defineSymbol(text, main, textord, _ch, _ch); +} // All of these are textords in text mode, and mathords in math mode + + +var letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + +for (var _i2 = 0; _i2 < letters.length; _i2++) { + var _ch2 = letters.charAt(_i2); + + defineSymbol(math, main, mathord, _ch2, _ch2); + defineSymbol(text, main, textord, _ch2, _ch2); +} // Blackboard bold and script letters in Unicode range + + +defineSymbol(math, ams, textord, "C", "\u2102"); // blackboard bold + +defineSymbol(text, ams, textord, "C", "\u2102"); +defineSymbol(math, ams, textord, "H", "\u210D"); +defineSymbol(text, ams, textord, "H", "\u210D"); +defineSymbol(math, ams, textord, "N", "\u2115"); +defineSymbol(text, ams, textord, "N", "\u2115"); +defineSymbol(math, ams, textord, "P", "\u2119"); +defineSymbol(text, ams, textord, "P", "\u2119"); +defineSymbol(math, ams, textord, "Q", "\u211A"); +defineSymbol(text, ams, textord, "Q", "\u211A"); +defineSymbol(math, ams, textord, "R", "\u211D"); +defineSymbol(text, ams, textord, "R", "\u211D"); +defineSymbol(math, ams, textord, "Z", "\u2124"); +defineSymbol(text, ams, textord, "Z", "\u2124"); +defineSymbol(math, main, mathord, "h", "\u210E"); // italic h, Planck constant + +defineSymbol(text, main, mathord, "h", "\u210E"); // The next loop loads wide (surrogate pair) characters. +// We support some letters in the Unicode range U+1D400 to U+1D7FF, +// Mathematical Alphanumeric Symbols. +// Some editors do not deal well with wide characters. So don't write the +// string into this file. Instead, create the string from the surrogate pair. + +var wideChar = ""; + +for (var _i3 = 0; _i3 < letters.length; _i3++) { + var _ch3 = letters.charAt(_i3); // The hex numbers in the next line are a surrogate pair. + // 0xD835 is the high surrogate for all letters in the range we support. + // 0xDC00 is the low surrogate for bold A. + + + wideChar = String.fromCharCode(0xD835, 0xDC00 + _i3); // A-Z a-z bold + + defineSymbol(math, main, mathord, _ch3, wideChar); + defineSymbol(text, main, textord, _ch3, wideChar); + wideChar = String.fromCharCode(0xD835, 0xDC34 + _i3); // A-Z a-z italic + + defineSymbol(math, main, mathord, _ch3, wideChar); + defineSymbol(text, main, textord, _ch3, wideChar); + wideChar = String.fromCharCode(0xD835, 0xDC68 + _i3); // A-Z a-z bold italic + + defineSymbol(math, main, mathord, _ch3, wideChar); + defineSymbol(text, main, textord, _ch3, wideChar); + wideChar = String.fromCharCode(0xD835, 0xDD04 + _i3); // A-Z a-z Fraktur + + defineSymbol(math, main, mathord, _ch3, wideChar); + defineSymbol(text, main, textord, _ch3, wideChar); + wideChar = String.fromCharCode(0xD835, 0xDD6C + _i3); // A-Z a-z bold Fraktur + + defineSymbol(math, main, mathord, _ch3, wideChar); + defineSymbol(text, main, textord, _ch3, wideChar); + wideChar = String.fromCharCode(0xD835, 0xDDA0 + _i3); // A-Z a-z sans-serif + + defineSymbol(math, main, mathord, _ch3, wideChar); + defineSymbol(text, main, textord, _ch3, wideChar); + wideChar = String.fromCharCode(0xD835, 0xDDD4 + _i3); // A-Z a-z sans bold + + defineSymbol(math, main, mathord, _ch3, wideChar); + defineSymbol(text, main, textord, _ch3, wideChar); + wideChar = String.fromCharCode(0xD835, 0xDE08 + _i3); // A-Z a-z sans italic + + defineSymbol(math, main, mathord, _ch3, wideChar); + defineSymbol(text, main, textord, _ch3, wideChar); + wideChar = String.fromCharCode(0xD835, 0xDE70 + _i3); // A-Z a-z monospace + + defineSymbol(math, main, mathord, _ch3, wideChar); + defineSymbol(text, main, textord, _ch3, wideChar); + + if (_i3 < 26) { + // KaTeX fonts have only capital letters for blackboard bold and script. + // See exception for k below. + wideChar = String.fromCharCode(0xD835, 0xDD38 + _i3); // A-Z double struck + + defineSymbol(math, main, mathord, _ch3, wideChar); + defineSymbol(text, main, textord, _ch3, wideChar); + wideChar = String.fromCharCode(0xD835, 0xDC9C + _i3); // A-Z script + + defineSymbol(math, main, mathord, _ch3, wideChar); + defineSymbol(text, main, textord, _ch3, wideChar); + } // TODO: Add bold script when it is supported by a KaTeX font. + +} // "k" is the only double struck lower case letter in the KaTeX fonts. + + +wideChar = String.fromCharCode(0xD835, 0xDD5C); // k double struck + +defineSymbol(math, main, mathord, "k", wideChar); +defineSymbol(text, main, textord, "k", wideChar); // Next, some wide character numerals + +for (var _i4 = 0; _i4 < 10; _i4++) { + var _ch4 = _i4.toString(); + + wideChar = String.fromCharCode(0xD835, 0xDFCE + _i4); // 0-9 bold + + defineSymbol(math, main, mathord, _ch4, wideChar); + defineSymbol(text, main, textord, _ch4, wideChar); + wideChar = String.fromCharCode(0xD835, 0xDFE2 + _i4); // 0-9 sans serif + + defineSymbol(math, main, mathord, _ch4, wideChar); + defineSymbol(text, main, textord, _ch4, wideChar); + wideChar = String.fromCharCode(0xD835, 0xDFEC + _i4); // 0-9 bold sans + + defineSymbol(math, main, mathord, _ch4, wideChar); + defineSymbol(text, main, textord, _ch4, wideChar); + wideChar = String.fromCharCode(0xD835, 0xDFF6 + _i4); // 0-9 monospace + + defineSymbol(math, main, mathord, _ch4, wideChar); + defineSymbol(text, main, textord, _ch4, wideChar); +} // We add these Latin-1 letters as symbols for backwards-compatibility, +// but they are not actually in the font, nor are they supported by the +// Unicode accent mechanism, so they fall back to Times font and look ugly. +// TODO(edemaine): Fix this. + + +var extraLatin = "\u00d0\u00de\u00fe"; + +for (var _i5 = 0; _i5 < extraLatin.length; _i5++) { + var _ch5 = extraLatin.charAt(_i5); + + defineSymbol(math, main, mathord, _ch5, _ch5); + defineSymbol(text, main, textord, _ch5, _ch5); +} + +/** + * This file provides support for Unicode range U+1D400 to U+1D7FF, + * Mathematical Alphanumeric Symbols. + * + * Function wideCharacterFont takes a wide character as input and returns + * the font information necessary to render it properly. + */ +/** + * Data below is from https://www.unicode.org/charts/PDF/U1D400.pdf + * That document sorts characters into groups by font type, say bold or italic. + * + * In the arrays below, each subarray consists three elements: + * * The CSS class of that group when in math mode. + * * The CSS class of that group when in text mode. + * * The font name, so that KaTeX can get font metrics. + */ + +var wideLatinLetterData = [["mathbf", "textbf", "Main-Bold"], // A-Z bold upright +["mathbf", "textbf", "Main-Bold"], // a-z bold upright +["mathnormal", "textit", "Math-Italic"], // A-Z italic +["mathnormal", "textit", "Math-Italic"], // a-z italic +["boldsymbol", "boldsymbol", "Main-BoldItalic"], // A-Z bold italic +["boldsymbol", "boldsymbol", "Main-BoldItalic"], // a-z bold italic +// Map fancy A-Z letters to script, not calligraphic. +// This aligns with unicode-math and math fonts (except Cambria Math). +["mathscr", "textscr", "Script-Regular"], // A-Z script +["", "", ""], // a-z script. No font +["", "", ""], // A-Z bold script. No font +["", "", ""], // a-z bold script. No font +["mathfrak", "textfrak", "Fraktur-Regular"], // A-Z Fraktur +["mathfrak", "textfrak", "Fraktur-Regular"], // a-z Fraktur +["mathbb", "textbb", "AMS-Regular"], // A-Z double-struck +["mathbb", "textbb", "AMS-Regular"], // k double-struck +// Note that we are using a bold font, but font metrics for regular Fraktur. +["mathboldfrak", "textboldfrak", "Fraktur-Regular"], // A-Z bold Fraktur +["mathboldfrak", "textboldfrak", "Fraktur-Regular"], // a-z bold Fraktur +["mathsf", "textsf", "SansSerif-Regular"], // A-Z sans-serif +["mathsf", "textsf", "SansSerif-Regular"], // a-z sans-serif +["mathboldsf", "textboldsf", "SansSerif-Bold"], // A-Z bold sans-serif +["mathboldsf", "textboldsf", "SansSerif-Bold"], // a-z bold sans-serif +["mathitsf", "textitsf", "SansSerif-Italic"], // A-Z italic sans-serif +["mathitsf", "textitsf", "SansSerif-Italic"], // a-z italic sans-serif +["", "", ""], // A-Z bold italic sans. No font +["", "", ""], // a-z bold italic sans. No font +["mathtt", "texttt", "Typewriter-Regular"], // A-Z monospace +["mathtt", "texttt", "Typewriter-Regular"] // a-z monospace +]; +var wideNumeralData = [["mathbf", "textbf", "Main-Bold"], // 0-9 bold +["", "", ""], // 0-9 double-struck. No KaTeX font. +["mathsf", "textsf", "SansSerif-Regular"], // 0-9 sans-serif +["mathboldsf", "textboldsf", "SansSerif-Bold"], // 0-9 bold sans-serif +["mathtt", "texttt", "Typewriter-Regular"] // 0-9 monospace +]; +var wideCharacterFont = function wideCharacterFont(wideChar, mode) { + // IE doesn't support codePointAt(). So work with the surrogate pair. + var H = wideChar.charCodeAt(0); // high surrogate + + var L = wideChar.charCodeAt(1); // low surrogate + + var codePoint = (H - 0xD800) * 0x400 + (L - 0xDC00) + 0x10000; + var j = mode === "math" ? 0 : 1; // column index for CSS class. + + if (0x1D400 <= codePoint && codePoint < 0x1D6A4) { + // wideLatinLetterData contains exactly 26 chars on each row. + // So we can calculate the relevant row. No traverse necessary. + var i = Math.floor((codePoint - 0x1D400) / 26); + return [wideLatinLetterData[i][2], wideLatinLetterData[i][j]]; + } else if (0x1D7CE <= codePoint && codePoint <= 0x1D7FF) { + // Numerals, ten per row. + var _i = Math.floor((codePoint - 0x1D7CE) / 10); + + return [wideNumeralData[_i][2], wideNumeralData[_i][j]]; + } else if (codePoint === 0x1D6A5 || codePoint === 0x1D6A6) { + // dotless i or j + return [wideLatinLetterData[0][2], wideLatinLetterData[0][j]]; + } else if (0x1D6A6 < codePoint && codePoint < 0x1D7CE) { + // Greek letters. Not supported, yet. + return ["", ""]; + } else { + // We don't support any wide characters outside 1D400–1D7FF. + throw new ParseError("Unsupported character: " + wideChar); + } +}; + +/* eslint no-console:0 */ + +/** + * Looks up the given symbol in fontMetrics, after applying any symbol + * replacements defined in symbol.js + */ +var lookupSymbol = function lookupSymbol(value, // TODO(#963): Use a union type for this. +fontName, mode) { + // Replace the value with its replaced value from symbol.js + if (symbols[mode][value] && symbols[mode][value].replace) { + value = symbols[mode][value].replace; + } + + return { + value: value, + metrics: getCharacterMetrics(value, fontName, mode) + }; +}; +/** + * Makes a symbolNode after translation via the list of symbols in symbols.js. + * Correctly pulls out metrics for the character, and optionally takes a list of + * classes to be attached to the node. + * + * TODO: make argument order closer to makeSpan + * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which + * should if present come first in `classes`. + * TODO(#953): Make `options` mandatory and always pass it in. + */ + + +var makeSymbol = function makeSymbol(value, fontName, mode, options, classes) { + var lookup = lookupSymbol(value, fontName, mode); + var metrics = lookup.metrics; + value = lookup.value; + var symbolNode; + + if (metrics) { + var italic = metrics.italic; + + if (mode === "text" || options && options.font === "mathit") { + italic = 0; + } + + symbolNode = new SymbolNode(value, metrics.height, metrics.depth, italic, metrics.skew, metrics.width, classes); + } else { + // TODO(emily): Figure out a good way to only print this in development + typeof console !== "undefined" && console.warn("No character metrics " + ("for '" + value + "' in style '" + fontName + "' and mode '" + mode + "'")); + symbolNode = new SymbolNode(value, 0, 0, 0, 0, 0, classes); + } + + if (options) { + symbolNode.maxFontSize = options.sizeMultiplier; + + if (options.style.isTight()) { + symbolNode.classes.push("mtight"); + } + + var color = options.getColor(); + + if (color) { + symbolNode.style.color = color; + } + } + + return symbolNode; +}; +/** + * Makes a symbol in Main-Regular or AMS-Regular. + * Used for rel, bin, open, close, inner, and punct. + */ + + +var mathsym = function mathsym(value, mode, options, classes) { + if (classes === void 0) { + classes = []; + } + + // Decide what font to render the symbol in by its entry in the symbols + // table. + // Have a special case for when the value = \ because the \ is used as a + // textord in unsupported command errors but cannot be parsed as a regular + // text ordinal and is therefore not present as a symbol in the symbols + // table for text, as well as a special case for boldsymbol because it + // can be used for bold + and - + if (options.font === "boldsymbol" && lookupSymbol(value, "Main-Bold", mode).metrics) { + return makeSymbol(value, "Main-Bold", mode, options, classes.concat(["mathbf"])); + } else if (value === "\\" || symbols[mode][value].font === "main") { + return makeSymbol(value, "Main-Regular", mode, options, classes); + } else { + return makeSymbol(value, "AMS-Regular", mode, options, classes.concat(["amsrm"])); + } +}; +/** + * Determines which of the two font names (Main-Bold and Math-BoldItalic) and + * corresponding style tags (mathbf or boldsymbol) to use for font "boldsymbol", + * depending on the symbol. Use this function instead of fontMap for font + * "boldsymbol". + */ + + +var boldsymbol = function boldsymbol(value, mode, options, classes, type) { + if (type !== "textord" && lookupSymbol(value, "Math-BoldItalic", mode).metrics) { + return { + fontName: "Math-BoldItalic", + fontClass: "boldsymbol" + }; + } else { + // Some glyphs do not exist in Math-BoldItalic so we need to use + // Main-Bold instead. + return { + fontName: "Main-Bold", + fontClass: "mathbf" + }; + } +}; +/** + * Makes either a mathord or textord in the correct font and color. + */ + + +var makeOrd = function makeOrd(group, options, type) { + var mode = group.mode; + var text = group.text; + var classes = ["mord"]; // Math mode or Old font (i.e. \rm) + + var isFont = mode === "math" || mode === "text" && options.font; + var fontOrFamily = isFont ? options.font : options.fontFamily; + var wideFontName = ""; + var wideFontClass = ""; + + if (text.charCodeAt(0) === 0xD835) { + [wideFontName, wideFontClass] = wideCharacterFont(text, mode); + } + + if (wideFontName.length > 0) { + // surrogate pairs get special treatment + return makeSymbol(text, wideFontName, mode, options, classes.concat(wideFontClass)); + } else if (fontOrFamily) { + var fontName; + var fontClasses; + + if (fontOrFamily === "boldsymbol") { + var fontData = boldsymbol(text, mode, options, classes, type); + fontName = fontData.fontName; + fontClasses = [fontData.fontClass]; + } else if (isFont) { + fontName = fontMap[fontOrFamily].fontName; + fontClasses = [fontOrFamily]; + } else { + fontName = retrieveTextFontName(fontOrFamily, options.fontWeight, options.fontShape); + fontClasses = [fontOrFamily, options.fontWeight, options.fontShape]; + } + + if (lookupSymbol(text, fontName, mode).metrics) { + return makeSymbol(text, fontName, mode, options, classes.concat(fontClasses)); + } else if (ligatures.hasOwnProperty(text) && fontName.slice(0, 10) === "Typewriter") { + // Deconstruct ligatures in monospace fonts (\texttt, \tt). + var parts = []; + + for (var i = 0; i < text.length; i++) { + parts.push(makeSymbol(text[i], fontName, mode, options, classes.concat(fontClasses))); + } + + return makeFragment(parts); + } + } // Makes a symbol in the default font for mathords and textords. + + + if (type === "mathord") { + return makeSymbol(text, "Math-Italic", mode, options, classes.concat(["mathnormal"])); + } else if (type === "textord") { + var font = symbols[mode][text] && symbols[mode][text].font; + + if (font === "ams") { + var _fontName = retrieveTextFontName("amsrm", options.fontWeight, options.fontShape); + + return makeSymbol(text, _fontName, mode, options, classes.concat("amsrm", options.fontWeight, options.fontShape)); + } else if (font === "main" || !font) { + var _fontName2 = retrieveTextFontName("textrm", options.fontWeight, options.fontShape); + + return makeSymbol(text, _fontName2, mode, options, classes.concat(options.fontWeight, options.fontShape)); + } else { + // fonts added by plugins + var _fontName3 = retrieveTextFontName(font, options.fontWeight, options.fontShape); // We add font name as a css class + + + return makeSymbol(text, _fontName3, mode, options, classes.concat(_fontName3, options.fontWeight, options.fontShape)); + } + } else { + throw new Error("unexpected type: " + type + " in makeOrd"); + } +}; +/** + * Returns true if subsequent symbolNodes have the same classes, skew, maxFont, + * and styles. + */ + + +var canCombine = (prev, next) => { + if (createClass(prev.classes) !== createClass(next.classes) || prev.skew !== next.skew || prev.maxFontSize !== next.maxFontSize) { + return false; + } // If prev and next both are just "mbin"s or "mord"s we don't combine them + // so that the proper spacing can be preserved. + + + if (prev.classes.length === 1) { + var cls = prev.classes[0]; + + if (cls === "mbin" || cls === "mord") { + return false; + } + } + + for (var style in prev.style) { + if (prev.style.hasOwnProperty(style) && prev.style[style] !== next.style[style]) { + return false; + } + } + + for (var _style in next.style) { + if (next.style.hasOwnProperty(_style) && prev.style[_style] !== next.style[_style]) { + return false; + } + } + + return true; +}; +/** + * Combine consecutive domTree.symbolNodes into a single symbolNode. + * Note: this function mutates the argument. + */ + + +var tryCombineChars = chars => { + for (var i = 0; i < chars.length - 1; i++) { + var prev = chars[i]; + var next = chars[i + 1]; + + if (prev instanceof SymbolNode && next instanceof SymbolNode && canCombine(prev, next)) { + prev.text += next.text; + prev.height = Math.max(prev.height, next.height); + prev.depth = Math.max(prev.depth, next.depth); // Use the last character's italic correction since we use + // it to add padding to the right of the span created from + // the combined characters. + + prev.italic = next.italic; + chars.splice(i + 1, 1); + i--; + } + } + + return chars; +}; +/** + * Calculate the height, depth, and maxFontSize of an element based on its + * children. + */ + + +var sizeElementFromChildren = function sizeElementFromChildren(elem) { + var height = 0; + var depth = 0; + var maxFontSize = 0; + + for (var i = 0; i < elem.children.length; i++) { + var child = elem.children[i]; + + if (child.height > height) { + height = child.height; + } + + if (child.depth > depth) { + depth = child.depth; + } + + if (child.maxFontSize > maxFontSize) { + maxFontSize = child.maxFontSize; + } + } + + elem.height = height; + elem.depth = depth; + elem.maxFontSize = maxFontSize; +}; +/** + * Makes a span with the given list of classes, list of children, and options. + * + * TODO(#953): Ensure that `options` is always provided (currently some call + * sites don't pass it) and make the type below mandatory. + * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which + * should if present come first in `classes`. + */ + + +var makeSpan$2 = function makeSpan(classes, children, options, style) { + var span = new Span(classes, children, options, style); + sizeElementFromChildren(span); + return span; +}; // SVG one is simpler -- doesn't require height, depth, max-font setting. +// This is also a separate method for typesafety. + + +var makeSvgSpan = (classes, children, options, style) => new Span(classes, children, options, style); + +var makeLineSpan = function makeLineSpan(className, options, thickness) { + var line = makeSpan$2([className], [], options); + line.height = Math.max(thickness || options.fontMetrics().defaultRuleThickness, options.minRuleThickness); + line.style.borderBottomWidth = makeEm(line.height); + line.maxFontSize = 1.0; + return line; +}; +/** + * Makes an anchor with the given href, list of classes, list of children, + * and options. + */ + + +var makeAnchor = function makeAnchor(href, classes, children, options) { + var anchor = new Anchor(href, classes, children, options); + sizeElementFromChildren(anchor); + return anchor; +}; +/** + * Makes a document fragment with the given list of children. + */ + + +var makeFragment = function makeFragment(children) { + var fragment = new DocumentFragment(children); + sizeElementFromChildren(fragment); + return fragment; +}; +/** + * Wraps group in a span if it's a document fragment, allowing to apply classes + * and styles + */ + + +var wrapFragment = function wrapFragment(group, options) { + if (group instanceof DocumentFragment) { + return makeSpan$2([], [group], options); + } + + return group; +}; // These are exact object types to catch typos in the names of the optional fields. + + +// Computes the updated `children` list and the overall depth. +// +// This helper function for makeVList makes it easier to enforce type safety by +// allowing early exits (returns) in the logic. +var getVListChildrenAndDepth = function getVListChildrenAndDepth(params) { + if (params.positionType === "individualShift") { + var oldChildren = params.children; + var children = [oldChildren[0]]; // Add in kerns to the list of params.children to get each element to be + // shifted to the correct specified shift + + var _depth = -oldChildren[0].shift - oldChildren[0].elem.depth; + + var currPos = _depth; + + for (var i = 1; i < oldChildren.length; i++) { + var diff = -oldChildren[i].shift - currPos - oldChildren[i].elem.depth; + var size = diff - (oldChildren[i - 1].elem.height + oldChildren[i - 1].elem.depth); + currPos = currPos + diff; + children.push({ + type: "kern", + size + }); + children.push(oldChildren[i]); + } + + return { + children, + depth: _depth + }; + } + + var depth; + + if (params.positionType === "top") { + // We always start at the bottom, so calculate the bottom by adding up + // all the sizes + var bottom = params.positionData; + + for (var _i = 0; _i < params.children.length; _i++) { + var child = params.children[_i]; + bottom -= child.type === "kern" ? child.size : child.elem.height + child.elem.depth; + } + + depth = bottom; + } else if (params.positionType === "bottom") { + depth = -params.positionData; + } else { + var firstChild = params.children[0]; + + if (firstChild.type !== "elem") { + throw new Error('First child must have type "elem".'); + } + + if (params.positionType === "shift") { + depth = -firstChild.elem.depth - params.positionData; + } else if (params.positionType === "firstBaseline") { + depth = -firstChild.elem.depth; + } else { + throw new Error("Invalid positionType " + params.positionType + "."); + } + } + + return { + children: params.children, + depth + }; +}; +/** + * Makes a vertical list by stacking elements and kerns on top of each other. + * Allows for many different ways of specifying the positioning method. + * + * See VListParam documentation above. + */ + + +var makeVList = function makeVList(params, options) { + var { + children, + depth + } = getVListChildrenAndDepth(params); // Create a strut that is taller than any list item. The strut is added to + // each item, where it will determine the item's baseline. Since it has + // `overflow:hidden`, the strut's top edge will sit on the item's line box's + // top edge and the strut's bottom edge will sit on the item's baseline, + // with no additional line-height spacing. This allows the item baseline to + // be positioned precisely without worrying about font ascent and + // line-height. + + var pstrutSize = 0; + + for (var i = 0; i < children.length; i++) { + var child = children[i]; + + if (child.type === "elem") { + var elem = child.elem; + pstrutSize = Math.max(pstrutSize, elem.maxFontSize, elem.height); + } + } + + pstrutSize += 2; + var pstrut = makeSpan$2(["pstrut"], []); + pstrut.style.height = makeEm(pstrutSize); // Create a new list of actual children at the correct offsets + + var realChildren = []; + var minPos = depth; + var maxPos = depth; + var currPos = depth; + + for (var _i2 = 0; _i2 < children.length; _i2++) { + var _child = children[_i2]; + + if (_child.type === "kern") { + currPos += _child.size; + } else { + var _elem = _child.elem; + var classes = _child.wrapperClasses || []; + var style = _child.wrapperStyle || {}; + var childWrap = makeSpan$2(classes, [pstrut, _elem], undefined, style); + childWrap.style.top = makeEm(-pstrutSize - currPos - _elem.depth); + + if (_child.marginLeft) { + childWrap.style.marginLeft = _child.marginLeft; + } + + if (_child.marginRight) { + childWrap.style.marginRight = _child.marginRight; + } + + realChildren.push(childWrap); + currPos += _elem.height + _elem.depth; + } + + minPos = Math.min(minPos, currPos); + maxPos = Math.max(maxPos, currPos); + } // The vlist contents go in a table-cell with `vertical-align:bottom`. + // This cell's bottom edge will determine the containing table's baseline + // without overly expanding the containing line-box. + + + var vlist = makeSpan$2(["vlist"], realChildren); + vlist.style.height = makeEm(maxPos); // A second row is used if necessary to represent the vlist's depth. + + var rows; + + if (minPos < 0) { + // We will define depth in an empty span with display: table-cell. + // It should render with the height that we define. But Chrome, in + // contenteditable mode only, treats that span as if it contains some + // text content. And that min-height over-rides our desired height. + // So we put another empty span inside the depth strut span. + var emptySpan = makeSpan$2([], []); + var depthStrut = makeSpan$2(["vlist"], [emptySpan]); + depthStrut.style.height = makeEm(-minPos); // Safari wants the first row to have inline content; otherwise it + // puts the bottom of the *second* row on the baseline. + + var topStrut = makeSpan$2(["vlist-s"], [new SymbolNode("\u200b")]); + rows = [makeSpan$2(["vlist-r"], [vlist, topStrut]), makeSpan$2(["vlist-r"], [depthStrut])]; + } else { + rows = [makeSpan$2(["vlist-r"], [vlist])]; + } + + var vtable = makeSpan$2(["vlist-t"], rows); + + if (rows.length === 2) { + vtable.classes.push("vlist-t2"); + } + + vtable.height = maxPos; + vtable.depth = -minPos; + return vtable; +}; // Glue is a concept from TeX which is a flexible space between elements in +// either a vertical or horizontal list. In KaTeX, at least for now, it's +// static space between elements in a horizontal layout. + + +var makeGlue = (measurement, options) => { + // Make an empty span for the space + var rule = makeSpan$2(["mspace"], [], options); + var size = calculateSize(measurement, options); + rule.style.marginRight = makeEm(size); + return rule; +}; // Takes font options, and returns the appropriate fontLookup name + + +var retrieveTextFontName = function retrieveTextFontName(fontFamily, fontWeight, fontShape) { + var baseFontName = ""; + + switch (fontFamily) { + case "amsrm": + baseFontName = "AMS"; + break; + + case "textrm": + baseFontName = "Main"; + break; + + case "textsf": + baseFontName = "SansSerif"; + break; + + case "texttt": + baseFontName = "Typewriter"; + break; + + default: + baseFontName = fontFamily; + // use fonts added by a plugin + } + + var fontStylesName; + + if (fontWeight === "textbf" && fontShape === "textit") { + fontStylesName = "BoldItalic"; + } else if (fontWeight === "textbf") { + fontStylesName = "Bold"; + } else if (fontWeight === "textit") { + fontStylesName = "Italic"; + } else { + fontStylesName = "Regular"; + } + + return baseFontName + "-" + fontStylesName; +}; +/** + * Maps TeX font commands to objects containing: + * - variant: string used for "mathvariant" attribute in buildMathML.js + * - fontName: the "style" parameter to fontMetrics.getCharacterMetrics + */ +// A map between tex font commands an MathML mathvariant attribute values + + +var fontMap = { + // styles + "mathbf": { + variant: "bold", + fontName: "Main-Bold" + }, + "mathrm": { + variant: "normal", + fontName: "Main-Regular" + }, + "textit": { + variant: "italic", + fontName: "Main-Italic" + }, + "mathit": { + variant: "italic", + fontName: "Main-Italic" + }, + "mathnormal": { + variant: "italic", + fontName: "Math-Italic" + }, + // "boldsymbol" is missing because they require the use of multiple fonts: + // Math-BoldItalic and Main-Bold. This is handled by a special case in + // makeOrd which ends up calling boldsymbol. + // families + "mathbb": { + variant: "double-struck", + fontName: "AMS-Regular" + }, + "mathcal": { + variant: "script", + fontName: "Caligraphic-Regular" + }, + "mathfrak": { + variant: "fraktur", + fontName: "Fraktur-Regular" + }, + "mathscr": { + variant: "script", + fontName: "Script-Regular" + }, + "mathsf": { + variant: "sans-serif", + fontName: "SansSerif-Regular" + }, + "mathtt": { + variant: "monospace", + fontName: "Typewriter-Regular" + } +}; +var svgData = { + // path, width, height + vec: ["vec", 0.471, 0.714], + // values from the font glyph + oiintSize1: ["oiintSize1", 0.957, 0.499], + // oval to overlay the integrand + oiintSize2: ["oiintSize2", 1.472, 0.659], + oiiintSize1: ["oiiintSize1", 1.304, 0.499], + oiiintSize2: ["oiiintSize2", 1.98, 0.659] +}; + +var staticSvg = function staticSvg(value, options) { + // Create a span with inline SVG for the element. + var [pathName, width, height] = svgData[value]; + var path = new PathNode(pathName); + var svgNode = new SvgNode([path], { + "width": makeEm(width), + "height": makeEm(height), + // Override CSS rule `.katex svg { width: 100% }` + "style": "width:" + makeEm(width), + "viewBox": "0 0 " + 1000 * width + " " + 1000 * height, + "preserveAspectRatio": "xMinYMin" + }); + var span = makeSvgSpan(["overlay"], [svgNode], options); + span.height = height; + span.style.height = makeEm(height); + span.style.width = makeEm(width); + return span; +}; + +var buildCommon = { + fontMap, + makeSymbol, + mathsym, + makeSpan: makeSpan$2, + makeSvgSpan, + makeLineSpan, + makeAnchor, + makeFragment, + wrapFragment, + makeVList, + makeOrd, + makeGlue, + staticSvg, + svgData, + tryCombineChars +}; + +/** + * Describes spaces between different classes of atoms. + */ +var thinspace = { + number: 3, + unit: "mu" +}; +var mediumspace = { + number: 4, + unit: "mu" +}; +var thickspace = { + number: 5, + unit: "mu" +}; // Making the type below exact with all optional fields doesn't work due to +// - https://github.com/facebook/flow/issues/4582 +// - https://github.com/facebook/flow/issues/5688 +// However, since *all* fields are optional, $Shape<> works as suggested in 5688 +// above. + +// Spacing relationships for display and text styles +var spacings = { + mord: { + mop: thinspace, + mbin: mediumspace, + mrel: thickspace, + minner: thinspace + }, + mop: { + mord: thinspace, + mop: thinspace, + mrel: thickspace, + minner: thinspace + }, + mbin: { + mord: mediumspace, + mop: mediumspace, + mopen: mediumspace, + minner: mediumspace + }, + mrel: { + mord: thickspace, + mop: thickspace, + mopen: thickspace, + minner: thickspace + }, + mopen: {}, + mclose: { + mop: thinspace, + mbin: mediumspace, + mrel: thickspace, + minner: thinspace + }, + mpunct: { + mord: thinspace, + mop: thinspace, + mrel: thickspace, + mopen: thinspace, + mclose: thinspace, + mpunct: thinspace, + minner: thinspace + }, + minner: { + mord: thinspace, + mop: thinspace, + mbin: mediumspace, + mrel: thickspace, + mopen: thinspace, + mpunct: thinspace, + minner: thinspace + } +}; // Spacing relationships for script and scriptscript styles + +var tightSpacings = { + mord: { + mop: thinspace + }, + mop: { + mord: thinspace, + mop: thinspace + }, + mbin: {}, + mrel: {}, + mopen: {}, + mclose: { + mop: thinspace + }, + mpunct: {}, + minner: { + mop: thinspace + } +}; + +/** Context provided to function handlers for error messages. */ +// Note: reverse the order of the return type union will cause a flow error. +// See https://github.com/facebook/flow/issues/3663. +// More general version of `HtmlBuilder` for nodes (e.g. \sum, accent types) +// whose presence impacts super/subscripting. In this case, ParseNode<"supsub"> +// delegates its HTML building to the HtmlBuilder corresponding to these nodes. + +/** + * Final function spec for use at parse time. + * This is almost identical to `FunctionPropSpec`, except it + * 1. includes the function handler, and + * 2. requires all arguments except argTypes. + * It is generated by `defineFunction()` below. + */ + +/** + * All registered functions. + * `functions.js` just exports this same dictionary again and makes it public. + * `Parser.js` requires this dictionary. + */ +var _functions = {}; +/** + * All HTML builders. Should be only used in the `define*` and the `build*ML` + * functions. + */ + +var _htmlGroupBuilders = {}; +/** + * All MathML builders. Should be only used in the `define*` and the `build*ML` + * functions. + */ + +var _mathmlGroupBuilders = {}; +function defineFunction(_ref) { + var { + type, + names, + props, + handler, + htmlBuilder, + mathmlBuilder + } = _ref; + // Set default values of functions + var data = { + type, + numArgs: props.numArgs, + argTypes: props.argTypes, + allowedInArgument: !!props.allowedInArgument, + allowedInText: !!props.allowedInText, + allowedInMath: props.allowedInMath === undefined ? true : props.allowedInMath, + numOptionalArgs: props.numOptionalArgs || 0, + infix: !!props.infix, + primitive: !!props.primitive, + handler: handler + }; + + for (var i = 0; i < names.length; ++i) { + _functions[names[i]] = data; + } + + if (type) { + if (htmlBuilder) { + _htmlGroupBuilders[type] = htmlBuilder; + } + + if (mathmlBuilder) { + _mathmlGroupBuilders[type] = mathmlBuilder; + } + } +} +/** + * Use this to register only the HTML and MathML builders for a function (e.g. + * if the function's ParseNode is generated in Parser.js rather than via a + * stand-alone handler provided to `defineFunction`). + */ + +function defineFunctionBuilders(_ref2) { + var { + type, + htmlBuilder, + mathmlBuilder + } = _ref2; + defineFunction({ + type, + names: [], + props: { + numArgs: 0 + }, + + handler() { + throw new Error('Should never be called.'); + }, + + htmlBuilder, + mathmlBuilder + }); +} +var normalizeArgument = function normalizeArgument(arg) { + return arg.type === "ordgroup" && arg.body.length === 1 ? arg.body[0] : arg; +}; // Since the corresponding buildHTML/buildMathML function expects a +// list of elements, we normalize for different kinds of arguments + +var ordargument = function ordargument(arg) { + return arg.type === "ordgroup" ? arg.body : [arg]; +}; + +/** + * This file does the main work of building a domTree structure from a parse + * tree. The entry point is the `buildHTML` function, which takes a parse tree. + * Then, the buildExpression, buildGroup, and various groupBuilders functions + * are called, to produce a final HTML tree. + */ +var makeSpan$1 = buildCommon.makeSpan; // Binary atoms (first class `mbin`) change into ordinary atoms (`mord`) +// depending on their surroundings. See TeXbook pg. 442-446, Rules 5 and 6, +// and the text before Rule 19. + +var binLeftCanceller = ["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"]; +var binRightCanceller = ["rightmost", "mrel", "mclose", "mpunct"]; +var styleMap$1 = { + "display": Style$1.DISPLAY, + "text": Style$1.TEXT, + "script": Style$1.SCRIPT, + "scriptscript": Style$1.SCRIPTSCRIPT +}; +var DomEnum = { + mord: "mord", + mop: "mop", + mbin: "mbin", + mrel: "mrel", + mopen: "mopen", + mclose: "mclose", + mpunct: "mpunct", + minner: "minner" +}; + +/** + * Take a list of nodes, build them in order, and return a list of the built + * nodes. documentFragments are flattened into their contents, so the + * returned list contains no fragments. `isRealGroup` is true if `expression` + * is a real group (no atoms will be added on either side), as opposed to + * a partial group (e.g. one created by \color). `surrounding` is an array + * consisting type of nodes that will be added to the left and right. + */ +var buildExpression$1 = function buildExpression(expression, options, isRealGroup, surrounding) { + if (surrounding === void 0) { + surrounding = [null, null]; + } + + // Parse expressions into `groups`. + var groups = []; + + for (var i = 0; i < expression.length; i++) { + var output = buildGroup$1(expression[i], options); + + if (output instanceof DocumentFragment) { + var children = output.children; + groups.push(...children); + } else { + groups.push(output); + } + } // Combine consecutive domTree.symbolNodes into a single symbolNode. + + + buildCommon.tryCombineChars(groups); // If `expression` is a partial group, let the parent handle spacings + // to avoid processing groups multiple times. + + if (!isRealGroup) { + return groups; + } + + var glueOptions = options; + + if (expression.length === 1) { + var node = expression[0]; + + if (node.type === "sizing") { + glueOptions = options.havingSize(node.size); + } else if (node.type === "styling") { + glueOptions = options.havingStyle(styleMap$1[node.style]); + } + } // Dummy spans for determining spacings between surrounding atoms. + // If `expression` has no atoms on the left or right, class "leftmost" + // or "rightmost", respectively, is used to indicate it. + + + var dummyPrev = makeSpan$1([surrounding[0] || "leftmost"], [], options); + var dummyNext = makeSpan$1([surrounding[1] || "rightmost"], [], options); // TODO: These code assumes that a node's math class is the first element + // of its `classes` array. A later cleanup should ensure this, for + // instance by changing the signature of `makeSpan`. + // Before determining what spaces to insert, perform bin cancellation. + // Binary operators change to ordinary symbols in some contexts. + + var isRoot = isRealGroup === "root"; + traverseNonSpaceNodes(groups, (node, prev) => { + var prevType = prev.classes[0]; + var type = node.classes[0]; + + if (prevType === "mbin" && utils.contains(binRightCanceller, type)) { + prev.classes[0] = "mord"; + } else if (type === "mbin" && utils.contains(binLeftCanceller, prevType)) { + node.classes[0] = "mord"; + } + }, { + node: dummyPrev + }, dummyNext, isRoot); + traverseNonSpaceNodes(groups, (node, prev) => { + var prevType = getTypeOfDomTree(prev); + var type = getTypeOfDomTree(node); // 'mtight' indicates that the node is script or scriptscript style. + + var space = prevType && type ? node.hasClass("mtight") ? tightSpacings[prevType][type] : spacings[prevType][type] : null; + + if (space) { + // Insert glue (spacing) after the `prev`. + return buildCommon.makeGlue(space, glueOptions); + } + }, { + node: dummyPrev + }, dummyNext, isRoot); + return groups; +}; // Depth-first traverse non-space `nodes`, calling `callback` with the current and +// previous node as arguments, optionally returning a node to insert after the +// previous node. `prev` is an object with the previous node and `insertAfter` +// function to insert after it. `next` is a node that will be added to the right. +// Used for bin cancellation and inserting spacings. + +var traverseNonSpaceNodes = function traverseNonSpaceNodes(nodes, callback, prev, next, isRoot) { + if (next) { + // temporarily append the right node, if exists + nodes.push(next); + } + + var i = 0; + + for (; i < nodes.length; i++) { + var node = nodes[i]; + var partialGroup = checkPartialGroup(node); + + if (partialGroup) { + // Recursive DFS + // $FlowFixMe: make nodes a $ReadOnlyArray by returning a new array + traverseNonSpaceNodes(partialGroup.children, callback, prev, null, isRoot); + continue; + } // Ignore explicit spaces (e.g., \;, \,) when determining what implicit + // spacing should go between atoms of different classes + + + var nonspace = !node.hasClass("mspace"); + + if (nonspace) { + var result = callback(node, prev.node); + + if (result) { + if (prev.insertAfter) { + prev.insertAfter(result); + } else { + // insert at front + nodes.unshift(result); + i++; + } + } + } + + if (nonspace) { + prev.node = node; + } else if (isRoot && node.hasClass("newline")) { + prev.node = makeSpan$1(["leftmost"]); // treat like beginning of line + } + + prev.insertAfter = (index => n => { + nodes.splice(index + 1, 0, n); + i++; + })(i); + } + + if (next) { + nodes.pop(); + } +}; // Check if given node is a partial group, i.e., does not affect spacing around. + + +var checkPartialGroup = function checkPartialGroup(node) { + if (node instanceof DocumentFragment || node instanceof Anchor || node instanceof Span && node.hasClass("enclosing")) { + return node; + } + + return null; +}; // Return the outermost node of a domTree. + + +var getOutermostNode = function getOutermostNode(node, side) { + var partialGroup = checkPartialGroup(node); + + if (partialGroup) { + var children = partialGroup.children; + + if (children.length) { + if (side === "right") { + return getOutermostNode(children[children.length - 1], "right"); + } else if (side === "left") { + return getOutermostNode(children[0], "left"); + } + } + } + + return node; +}; // Return math atom class (mclass) of a domTree. +// If `side` is given, it will get the type of the outermost node at given side. + + +var getTypeOfDomTree = function getTypeOfDomTree(node, side) { + if (!node) { + return null; + } + + if (side) { + node = getOutermostNode(node, side); + } // This makes a lot of assumptions as to where the type of atom + // appears. We should do a better job of enforcing this. + + + return DomEnum[node.classes[0]] || null; +}; +var makeNullDelimiter = function makeNullDelimiter(options, classes) { + var moreClasses = ["nulldelimiter"].concat(options.baseSizingClasses()); + return makeSpan$1(classes.concat(moreClasses)); +}; +/** + * buildGroup is the function that takes a group and calls the correct groupType + * function for it. It also handles the interaction of size and style changes + * between parents and children. + */ + +var buildGroup$1 = function buildGroup(group, options, baseOptions) { + if (!group) { + return makeSpan$1(); + } + + if (_htmlGroupBuilders[group.type]) { + // Call the groupBuilders function + // $FlowFixMe + var groupNode = _htmlGroupBuilders[group.type](group, options); // If the size changed between the parent and the current group, account + // for that size difference. + + if (baseOptions && options.size !== baseOptions.size) { + groupNode = makeSpan$1(options.sizingClasses(baseOptions), [groupNode], options); + var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier; + groupNode.height *= multiplier; + groupNode.depth *= multiplier; + } + + return groupNode; + } else { + throw new ParseError("Got group of unknown type: '" + group.type + "'"); + } +}; +/** + * Combine an array of HTML DOM nodes (e.g., the output of `buildExpression`) + * into an unbreakable HTML node of class .base, with proper struts to + * guarantee correct vertical extent. `buildHTML` calls this repeatedly to + * make up the entire expression as a sequence of unbreakable units. + */ + +function buildHTMLUnbreakable(children, options) { + // Compute height and depth of this chunk. + var body = makeSpan$1(["base"], children, options); // Add strut, which ensures that the top of the HTML element falls at + // the height of the expression, and the bottom of the HTML element + // falls at the depth of the expression. + + var strut = makeSpan$1(["strut"]); + strut.style.height = makeEm(body.height + body.depth); + + if (body.depth) { + strut.style.verticalAlign = makeEm(-body.depth); + } + + body.children.unshift(strut); + return body; +} +/** + * Take an entire parse tree, and build it into an appropriate set of HTML + * nodes. + */ + + +function buildHTML(tree, options) { + // Strip off outer tag wrapper for processing below. + var tag = null; + + if (tree.length === 1 && tree[0].type === "tag") { + tag = tree[0].tag; + tree = tree[0].body; + } // Build the expression contained in the tree + + + var expression = buildExpression$1(tree, options, "root"); + var eqnNum; + + if (expression.length === 2 && expression[1].hasClass("tag")) { + // An environment with automatic equation numbers, e.g. {gather}. + eqnNum = expression.pop(); + } + + var children = []; // Create one base node for each chunk between potential line breaks. + // The TeXBook [p.173] says "A formula will be broken only after a + // relation symbol like $=$ or $<$ or $\rightarrow$, or after a binary + // operation symbol like $+$ or $-$ or $\times$, where the relation or + // binary operation is on the ``outer level'' of the formula (i.e., not + // enclosed in {...} and not part of an \over construction)." + + var parts = []; + + for (var i = 0; i < expression.length; i++) { + parts.push(expression[i]); + + if (expression[i].hasClass("mbin") || expression[i].hasClass("mrel") || expression[i].hasClass("allowbreak")) { + // Put any post-operator glue on same line as operator. + // Watch for \nobreak along the way, and stop at \newline. + var nobreak = false; + + while (i < expression.length - 1 && expression[i + 1].hasClass("mspace") && !expression[i + 1].hasClass("newline")) { + i++; + parts.push(expression[i]); + + if (expression[i].hasClass("nobreak")) { + nobreak = true; + } + } // Don't allow break if \nobreak among the post-operator glue. + + + if (!nobreak) { + children.push(buildHTMLUnbreakable(parts, options)); + parts = []; + } + } else if (expression[i].hasClass("newline")) { + // Write the line except the newline + parts.pop(); + + if (parts.length > 0) { + children.push(buildHTMLUnbreakable(parts, options)); + parts = []; + } // Put the newline at the top level + + + children.push(expression[i]); + } + } + + if (parts.length > 0) { + children.push(buildHTMLUnbreakable(parts, options)); + } // Now, if there was a tag, build it too and append it as a final child. + + + var tagChild; + + if (tag) { + tagChild = buildHTMLUnbreakable(buildExpression$1(tag, options, true)); + tagChild.classes = ["tag"]; + children.push(tagChild); + } else if (eqnNum) { + children.push(eqnNum); + } + + var htmlNode = makeSpan$1(["katex-html"], children); + htmlNode.setAttribute("aria-hidden", "true"); // Adjust the strut of the tag to be the maximum height of all children + // (the height of the enclosing htmlNode) for proper vertical alignment. + + if (tagChild) { + var strut = tagChild.children[0]; + strut.style.height = makeEm(htmlNode.height + htmlNode.depth); + + if (htmlNode.depth) { + strut.style.verticalAlign = makeEm(-htmlNode.depth); + } + } + + return htmlNode; +} + +/** + * These objects store data about MathML nodes. This is the MathML equivalent + * of the types in domTree.js. Since MathML handles its own rendering, and + * since we're mainly using MathML to improve accessibility, we don't manage + * any of the styling state that the plain DOM nodes do. + * + * The `toNode` and `toMarkup` functions work similarly to how they do in + * domTree.js, creating namespaced DOM nodes and HTML text markup respectively. + */ +function newDocumentFragment(children) { + return new DocumentFragment(children); +} +/** + * This node represents a general purpose MathML node of any type. The + * constructor requires the type of node to create (for example, `"mo"` or + * `"mspace"`, corresponding to `` and `` tags). + */ + +class MathNode { + constructor(type, children, classes) { + this.type = void 0; + this.attributes = void 0; + this.children = void 0; + this.classes = void 0; + this.type = type; + this.attributes = {}; + this.children = children || []; + this.classes = classes || []; + } + /** + * Sets an attribute on a MathML node. MathML depends on attributes to convey a + * semantic content, so this is used heavily. + */ + + + setAttribute(name, value) { + this.attributes[name] = value; + } + /** + * Gets an attribute on a MathML node. + */ + + + getAttribute(name) { + return this.attributes[name]; + } + /** + * Converts the math node into a MathML-namespaced DOM element. + */ + + + toNode() { + var node = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type); + + for (var attr in this.attributes) { + if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) { + node.setAttribute(attr, this.attributes[attr]); + } + } + + if (this.classes.length > 0) { + node.className = createClass(this.classes); + } + + for (var i = 0; i < this.children.length; i++) { + node.appendChild(this.children[i].toNode()); + } + + return node; + } + /** + * Converts the math node into an HTML markup string. + */ + + + toMarkup() { + var markup = "<" + this.type; // Add the attributes + + for (var attr in this.attributes) { + if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) { + markup += " " + attr + "=\""; + markup += utils.escape(this.attributes[attr]); + markup += "\""; + } + } + + if (this.classes.length > 0) { + markup += " class =\"" + utils.escape(createClass(this.classes)) + "\""; + } + + markup += ">"; + + for (var i = 0; i < this.children.length; i++) { + markup += this.children[i].toMarkup(); + } + + markup += ""; + return markup; + } + /** + * Converts the math node into a string, similar to innerText, but escaped. + */ + + + toText() { + return this.children.map(child => child.toText()).join(""); + } + +} +/** + * This node represents a piece of text. + */ + +class TextNode { + constructor(text) { + this.text = void 0; + this.text = text; + } + /** + * Converts the text node into a DOM text node. + */ + + + toNode() { + return document.createTextNode(this.text); + } + /** + * Converts the text node into escaped HTML markup + * (representing the text itself). + */ + + + toMarkup() { + return utils.escape(this.toText()); + } + /** + * Converts the text node into a string + * (representing the text itself). + */ + + + toText() { + return this.text; + } + +} +/** + * This node represents a space, but may render as or as text, + * depending on the width. + */ + +class SpaceNode { + /** + * Create a Space node with width given in CSS ems. + */ + constructor(width) { + this.width = void 0; + this.character = void 0; + this.width = width; // See https://www.w3.org/TR/2000/WD-MathML2-20000328/chapter6.html + // for a table of space-like characters. We use Unicode + // representations instead of &LongNames; as it's not clear how to + // make the latter via document.createTextNode. + + if (width >= 0.05555 && width <= 0.05556) { + this.character = "\u200a"; //   + } else if (width >= 0.1666 && width <= 0.1667) { + this.character = "\u2009"; //   + } else if (width >= 0.2222 && width <= 0.2223) { + this.character = "\u2005"; //   + } else if (width >= 0.2777 && width <= 0.2778) { + this.character = "\u2005\u200a"; //    + } else if (width >= -0.05556 && width <= -0.05555) { + this.character = "\u200a\u2063"; // ​ + } else if (width >= -0.1667 && width <= -0.1666) { + this.character = "\u2009\u2063"; // ​ + } else if (width >= -0.2223 && width <= -0.2222) { + this.character = "\u205f\u2063"; // ​ + } else if (width >= -0.2778 && width <= -0.2777) { + this.character = "\u2005\u2063"; // ​ + } else { + this.character = null; + } + } + /** + * Converts the math node into a MathML-namespaced DOM element. + */ + + + toNode() { + if (this.character) { + return document.createTextNode(this.character); + } else { + var node = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace"); + node.setAttribute("width", makeEm(this.width)); + return node; + } + } + /** + * Converts the math node into an HTML markup string. + */ + + + toMarkup() { + if (this.character) { + return "" + this.character + ""; + } else { + return ""; + } + } + /** + * Converts the math node into a string, similar to innerText. + */ + + + toText() { + if (this.character) { + return this.character; + } else { + return " "; + } + } + +} + +var mathMLTree = { + MathNode, + TextNode, + SpaceNode, + newDocumentFragment +}; + +/** + * This file converts a parse tree into a corresponding MathML tree. The main + * entry point is the `buildMathML` function, which takes a parse tree from the + * parser. + */ + +/** + * Takes a symbol and converts it into a MathML text node after performing + * optional replacement from symbols.js. + */ +var makeText = function makeText(text, mode, options) { + if (symbols[mode][text] && symbols[mode][text].replace && text.charCodeAt(0) !== 0xD835 && !(ligatures.hasOwnProperty(text) && options && (options.fontFamily && options.fontFamily.slice(4, 6) === "tt" || options.font && options.font.slice(4, 6) === "tt"))) { + text = symbols[mode][text].replace; + } + + return new mathMLTree.TextNode(text); +}; +/** + * Wrap the given array of nodes in an node if needed, i.e., + * unless the array has length 1. Always returns a single node. + */ + +var makeRow = function makeRow(body) { + if (body.length === 1) { + return body[0]; + } else { + return new mathMLTree.MathNode("mrow", body); + } +}; +/** + * Returns the math variant as a string or null if none is required. + */ + +var getVariant = function getVariant(group, options) { + // Handle \text... font specifiers as best we can. + // MathML has a limited list of allowable mathvariant specifiers; see + // https://www.w3.org/TR/MathML3/chapter3.html#presm.commatt + if (options.fontFamily === "texttt") { + return "monospace"; + } else if (options.fontFamily === "textsf") { + if (options.fontShape === "textit" && options.fontWeight === "textbf") { + return "sans-serif-bold-italic"; + } else if (options.fontShape === "textit") { + return "sans-serif-italic"; + } else if (options.fontWeight === "textbf") { + return "bold-sans-serif"; + } else { + return "sans-serif"; + } + } else if (options.fontShape === "textit" && options.fontWeight === "textbf") { + return "bold-italic"; + } else if (options.fontShape === "textit") { + return "italic"; + } else if (options.fontWeight === "textbf") { + return "bold"; + } + + var font = options.font; + + if (!font || font === "mathnormal") { + return null; + } + + var mode = group.mode; + + if (font === "mathit") { + return "italic"; + } else if (font === "boldsymbol") { + return group.type === "textord" ? "bold" : "bold-italic"; + } else if (font === "mathbf") { + return "bold"; + } else if (font === "mathbb") { + return "double-struck"; + } else if (font === "mathfrak") { + return "fraktur"; + } else if (font === "mathscr" || font === "mathcal") { + // MathML makes no distinction between script and calligraphic + return "script"; + } else if (font === "mathsf") { + return "sans-serif"; + } else if (font === "mathtt") { + return "monospace"; + } + + var text = group.text; + + if (utils.contains(["\\imath", "\\jmath"], text)) { + return null; + } + + if (symbols[mode][text] && symbols[mode][text].replace) { + text = symbols[mode][text].replace; + } + + var fontName = buildCommon.fontMap[font].fontName; + + if (getCharacterMetrics(text, fontName, mode)) { + return buildCommon.fontMap[font].variant; + } + + return null; +}; +/** + * Takes a list of nodes, builds them, and returns a list of the generated + * MathML nodes. Also combine consecutive outputs into a single + * tag. + */ + +var buildExpression = function buildExpression(expression, options, isOrdgroup) { + if (expression.length === 1) { + var group = buildGroup(expression[0], options); + + if (isOrdgroup && group instanceof MathNode && group.type === "mo") { + // When TeX writers want to suppress spacing on an operator, + // they often put the operator by itself inside braces. + group.setAttribute("lspace", "0em"); + group.setAttribute("rspace", "0em"); + } + + return [group]; + } + + var groups = []; + var lastGroup; + + for (var i = 0; i < expression.length; i++) { + var _group = buildGroup(expression[i], options); + + if (_group instanceof MathNode && lastGroup instanceof MathNode) { + // Concatenate adjacent s + if (_group.type === 'mtext' && lastGroup.type === 'mtext' && _group.getAttribute('mathvariant') === lastGroup.getAttribute('mathvariant')) { + lastGroup.children.push(..._group.children); + continue; // Concatenate adjacent s + } else if (_group.type === 'mn' && lastGroup.type === 'mn') { + lastGroup.children.push(..._group.children); + continue; // Concatenate ... followed by . + } else if (_group.type === 'mi' && _group.children.length === 1 && lastGroup.type === 'mn') { + var child = _group.children[0]; + + if (child instanceof TextNode && child.text === '.') { + lastGroup.children.push(..._group.children); + continue; + } + } else if (lastGroup.type === 'mi' && lastGroup.children.length === 1) { + var lastChild = lastGroup.children[0]; + + if (lastChild instanceof TextNode && lastChild.text === '\u0338' && (_group.type === 'mo' || _group.type === 'mi' || _group.type === 'mn')) { + var _child = _group.children[0]; + + if (_child instanceof TextNode && _child.text.length > 0) { + // Overlay with combining character long solidus + _child.text = _child.text.slice(0, 1) + "\u0338" + _child.text.slice(1); + groups.pop(); + } + } + } + } + + groups.push(_group); + lastGroup = _group; + } + + return groups; +}; +/** + * Equivalent to buildExpression, but wraps the elements in an + * if there's more than one. Returns a single node instead of an array. + */ + +var buildExpressionRow = function buildExpressionRow(expression, options, isOrdgroup) { + return makeRow(buildExpression(expression, options, isOrdgroup)); +}; +/** + * Takes a group from the parser and calls the appropriate groupBuilders function + * on it to produce a MathML node. + */ + +var buildGroup = function buildGroup(group, options) { + if (!group) { + return new mathMLTree.MathNode("mrow"); + } + + if (_mathmlGroupBuilders[group.type]) { + // Call the groupBuilders function + // $FlowFixMe + var result = _mathmlGroupBuilders[group.type](group, options); // $FlowFixMe + + return result; + } else { + throw new ParseError("Got group of unknown type: '" + group.type + "'"); + } +}; +/** + * Takes a full parse tree and settings and builds a MathML representation of + * it. In particular, we put the elements from building the parse tree into a + * tag so we can also include that TeX source as an annotation. + * + * Note that we actually return a domTree element with a `` inside it so + * we can do appropriate styling. + */ + +function buildMathML(tree, texExpression, options, isDisplayMode, forMathmlOnly) { + var expression = buildExpression(tree, options); // TODO: Make a pass thru the MathML similar to buildHTML.traverseNonSpaceNodes + // and add spacing nodes. This is necessary only adjacent to math operators + // like \sin or \lim or to subsup elements that contain math operators. + // MathML takes care of the other spacing issues. + // Wrap up the expression in an mrow so it is presented in the semantics + // tag correctly, unless it's a single or . + + var wrapper; + + if (expression.length === 1 && expression[0] instanceof MathNode && utils.contains(["mrow", "mtable"], expression[0].type)) { + wrapper = expression[0]; + } else { + wrapper = new mathMLTree.MathNode("mrow", expression); + } // Build a TeX annotation of the source + + + var annotation = new mathMLTree.MathNode("annotation", [new mathMLTree.TextNode(texExpression)]); + annotation.setAttribute("encoding", "application/x-tex"); + var semantics = new mathMLTree.MathNode("semantics", [wrapper, annotation]); + var math = new mathMLTree.MathNode("math", [semantics]); + math.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML"); + + if (isDisplayMode) { + math.setAttribute("display", "block"); + } // You can't style nodes, so we wrap the node in a span. + // NOTE: The span class is not typed to have nodes as children, and + // we don't want to make the children type more generic since the children + // of span are expected to have more fields in `buildHtml` contexts. + + + var wrapperClass = forMathmlOnly ? "katex" : "katex-mathml"; // $FlowFixMe + + return buildCommon.makeSpan([wrapperClass], [math]); +} + +var optionsFromSettings = function optionsFromSettings(settings) { + return new Options({ + style: settings.displayMode ? Style$1.DISPLAY : Style$1.TEXT, + maxSize: settings.maxSize, + minRuleThickness: settings.minRuleThickness + }); +}; + +var displayWrap = function displayWrap(node, settings) { + if (settings.displayMode) { + var classes = ["katex-display"]; + + if (settings.leqno) { + classes.push("leqno"); + } + + if (settings.fleqn) { + classes.push("fleqn"); + } + + node = buildCommon.makeSpan(classes, [node]); + } + + return node; +}; + +var buildTree = function buildTree(tree, expression, settings) { + var options = optionsFromSettings(settings); + var katexNode; + + if (settings.output === "mathml") { + return buildMathML(tree, expression, options, settings.displayMode, true); + } else if (settings.output === "html") { + var htmlNode = buildHTML(tree, options); + katexNode = buildCommon.makeSpan(["katex"], [htmlNode]); + } else { + var mathMLNode = buildMathML(tree, expression, options, settings.displayMode, false); + + var _htmlNode = buildHTML(tree, options); + + katexNode = buildCommon.makeSpan(["katex"], [mathMLNode, _htmlNode]); + } + + return displayWrap(katexNode, settings); +}; +var buildHTMLTree = function buildHTMLTree(tree, expression, settings) { + var options = optionsFromSettings(settings); + var htmlNode = buildHTML(tree, options); + var katexNode = buildCommon.makeSpan(["katex"], [htmlNode]); + return displayWrap(katexNode, settings); +}; + +/** + * This file provides support to buildMathML.js and buildHTML.js + * for stretchy wide elements rendered from SVG files + * and other CSS trickery. + */ +var stretchyCodePoint = { + widehat: "^", + widecheck: "ˇ", + widetilde: "~", + utilde: "~", + overleftarrow: "\u2190", + underleftarrow: "\u2190", + xleftarrow: "\u2190", + overrightarrow: "\u2192", + underrightarrow: "\u2192", + xrightarrow: "\u2192", + underbrace: "\u23df", + overbrace: "\u23de", + overgroup: "\u23e0", + undergroup: "\u23e1", + overleftrightarrow: "\u2194", + underleftrightarrow: "\u2194", + xleftrightarrow: "\u2194", + Overrightarrow: "\u21d2", + xRightarrow: "\u21d2", + overleftharpoon: "\u21bc", + xleftharpoonup: "\u21bc", + overrightharpoon: "\u21c0", + xrightharpoonup: "\u21c0", + xLeftarrow: "\u21d0", + xLeftrightarrow: "\u21d4", + xhookleftarrow: "\u21a9", + xhookrightarrow: "\u21aa", + xmapsto: "\u21a6", + xrightharpoondown: "\u21c1", + xleftharpoondown: "\u21bd", + xrightleftharpoons: "\u21cc", + xleftrightharpoons: "\u21cb", + xtwoheadleftarrow: "\u219e", + xtwoheadrightarrow: "\u21a0", + xlongequal: "=", + xtofrom: "\u21c4", + xrightleftarrows: "\u21c4", + xrightequilibrium: "\u21cc", + // Not a perfect match. + xleftequilibrium: "\u21cb", + // None better available. + "\\cdrightarrow": "\u2192", + "\\cdleftarrow": "\u2190", + "\\cdlongequal": "=" +}; + +var mathMLnode = function mathMLnode(label) { + var node = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(stretchyCodePoint[label.replace(/^\\/, '')])]); + node.setAttribute("stretchy", "true"); + return node; +}; // Many of the KaTeX SVG images have been adapted from glyphs in KaTeX fonts. +// Copyright (c) 2009-2010, Design Science, Inc. () +// Copyright (c) 2014-2017 Khan Academy () +// Licensed under the SIL Open Font License, Version 1.1. +// See \nhttp://scripts.sil.org/OFL +// Very Long SVGs +// Many of the KaTeX stretchy wide elements use a long SVG image and an +// overflow: hidden tactic to achieve a stretchy image while avoiding +// distortion of arrowheads or brace corners. +// The SVG typically contains a very long (400 em) arrow. +// The SVG is in a container span that has overflow: hidden, so the span +// acts like a window that exposes only part of the SVG. +// The SVG always has a longer, thinner aspect ratio than the container span. +// After the SVG fills 100% of the height of the container span, +// there is a long arrow shaft left over. That left-over shaft is not shown. +// Instead, it is sliced off because the span's CSS has overflow: hidden. +// Thus, the reader sees an arrow that matches the subject matter width +// without distortion. +// Some functions, such as \cancel, need to vary their aspect ratio. These +// functions do not get the overflow SVG treatment. +// Second Brush Stroke +// Low resolution monitors struggle to display images in fine detail. +// So browsers apply anti-aliasing. A long straight arrow shaft therefore +// will sometimes appear as if it has a blurred edge. +// To mitigate this, these SVG files contain a second "brush-stroke" on the +// arrow shafts. That is, a second long thin rectangular SVG path has been +// written directly on top of each arrow shaft. This reinforcement causes +// some of the screen pixels to display as black instead of the anti-aliased +// gray pixel that a single path would generate. So we get arrow shafts +// whose edges appear to be sharper. +// In the katexImagesData object just below, the dimensions all +// correspond to path geometry inside the relevant SVG. +// For example, \overrightarrow uses the same arrowhead as glyph U+2192 +// from the KaTeX Main font. The scaling factor is 1000. +// That is, inside the font, that arrowhead is 522 units tall, which +// corresponds to 0.522 em inside the document. + + +var katexImagesData = { + // path(s), minWidth, height, align + overrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"], + overleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"], + underrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"], + underleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"], + xrightarrow: [["rightarrow"], 1.469, 522, "xMaxYMin"], + "\\cdrightarrow": [["rightarrow"], 3.0, 522, "xMaxYMin"], + // CD minwwidth2.5pc + xleftarrow: [["leftarrow"], 1.469, 522, "xMinYMin"], + "\\cdleftarrow": [["leftarrow"], 3.0, 522, "xMinYMin"], + Overrightarrow: [["doublerightarrow"], 0.888, 560, "xMaxYMin"], + xRightarrow: [["doublerightarrow"], 1.526, 560, "xMaxYMin"], + xLeftarrow: [["doubleleftarrow"], 1.526, 560, "xMinYMin"], + overleftharpoon: [["leftharpoon"], 0.888, 522, "xMinYMin"], + xleftharpoonup: [["leftharpoon"], 0.888, 522, "xMinYMin"], + xleftharpoondown: [["leftharpoondown"], 0.888, 522, "xMinYMin"], + overrightharpoon: [["rightharpoon"], 0.888, 522, "xMaxYMin"], + xrightharpoonup: [["rightharpoon"], 0.888, 522, "xMaxYMin"], + xrightharpoondown: [["rightharpoondown"], 0.888, 522, "xMaxYMin"], + xlongequal: [["longequal"], 0.888, 334, "xMinYMin"], + "\\cdlongequal": [["longequal"], 3.0, 334, "xMinYMin"], + xtwoheadleftarrow: [["twoheadleftarrow"], 0.888, 334, "xMinYMin"], + xtwoheadrightarrow: [["twoheadrightarrow"], 0.888, 334, "xMaxYMin"], + overleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522], + overbrace: [["leftbrace", "midbrace", "rightbrace"], 1.6, 548], + underbrace: [["leftbraceunder", "midbraceunder", "rightbraceunder"], 1.6, 548], + underleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522], + xleftrightarrow: [["leftarrow", "rightarrow"], 1.75, 522], + xLeftrightarrow: [["doubleleftarrow", "doublerightarrow"], 1.75, 560], + xrightleftharpoons: [["leftharpoondownplus", "rightharpoonplus"], 1.75, 716], + xleftrightharpoons: [["leftharpoonplus", "rightharpoondownplus"], 1.75, 716], + xhookleftarrow: [["leftarrow", "righthook"], 1.08, 522], + xhookrightarrow: [["lefthook", "rightarrow"], 1.08, 522], + overlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522], + underlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522], + overgroup: [["leftgroup", "rightgroup"], 0.888, 342], + undergroup: [["leftgroupunder", "rightgroupunder"], 0.888, 342], + xmapsto: [["leftmapsto", "rightarrow"], 1.5, 522], + xtofrom: [["leftToFrom", "rightToFrom"], 1.75, 528], + // The next three arrows are from the mhchem package. + // In mhchem.sty, min-length is 2.0em. But these arrows might appear in the + // document as \xrightarrow or \xrightleftharpoons. Those have + // min-length = 1.75em, so we set min-length on these next three to match. + xrightleftarrows: [["baraboveleftarrow", "rightarrowabovebar"], 1.75, 901], + xrightequilibrium: [["baraboveshortleftharpoon", "rightharpoonaboveshortbar"], 1.75, 716], + xleftequilibrium: [["shortbaraboveleftharpoon", "shortrightharpoonabovebar"], 1.75, 716] +}; + +var groupLength = function groupLength(arg) { + if (arg.type === "ordgroup") { + return arg.body.length; + } else { + return 1; + } +}; + +var svgSpan = function svgSpan(group, options) { + // Create a span with inline SVG for the element. + function buildSvgSpan_() { + var viewBoxWidth = 400000; // default + + var label = group.label.slice(1); + + if (utils.contains(["widehat", "widecheck", "widetilde", "utilde"], label)) { + // Each type in the `if` statement corresponds to one of the ParseNode + // types below. This narrowing is required to access `grp.base`. + // $FlowFixMe + var grp = group; // There are four SVG images available for each function. + // Choose a taller image when there are more characters. + + var numChars = groupLength(grp.base); + var viewBoxHeight; + var pathName; + + var _height; + + if (numChars > 5) { + if (label === "widehat" || label === "widecheck") { + viewBoxHeight = 420; + viewBoxWidth = 2364; + _height = 0.42; + pathName = label + "4"; + } else { + viewBoxHeight = 312; + viewBoxWidth = 2340; + _height = 0.34; + pathName = "tilde4"; + } + } else { + var imgIndex = [1, 1, 2, 2, 3, 3][numChars]; + + if (label === "widehat" || label === "widecheck") { + viewBoxWidth = [0, 1062, 2364, 2364, 2364][imgIndex]; + viewBoxHeight = [0, 239, 300, 360, 420][imgIndex]; + _height = [0, 0.24, 0.3, 0.3, 0.36, 0.42][imgIndex]; + pathName = label + imgIndex; + } else { + viewBoxWidth = [0, 600, 1033, 2339, 2340][imgIndex]; + viewBoxHeight = [0, 260, 286, 306, 312][imgIndex]; + _height = [0, 0.26, 0.286, 0.3, 0.306, 0.34][imgIndex]; + pathName = "tilde" + imgIndex; + } + } + + var path = new PathNode(pathName); + var svgNode = new SvgNode([path], { + "width": "100%", + "height": makeEm(_height), + "viewBox": "0 0 " + viewBoxWidth + " " + viewBoxHeight, + "preserveAspectRatio": "none" + }); + return { + span: buildCommon.makeSvgSpan([], [svgNode], options), + minWidth: 0, + height: _height + }; + } else { + var spans = []; + var data = katexImagesData[label]; + var [paths, _minWidth, _viewBoxHeight] = data; + + var _height2 = _viewBoxHeight / 1000; + + var numSvgChildren = paths.length; + var widthClasses; + var aligns; + + if (numSvgChildren === 1) { + // $FlowFixMe: All these cases must be of the 4-tuple type. + var align1 = data[3]; + widthClasses = ["hide-tail"]; + aligns = [align1]; + } else if (numSvgChildren === 2) { + widthClasses = ["halfarrow-left", "halfarrow-right"]; + aligns = ["xMinYMin", "xMaxYMin"]; + } else if (numSvgChildren === 3) { + widthClasses = ["brace-left", "brace-center", "brace-right"]; + aligns = ["xMinYMin", "xMidYMin", "xMaxYMin"]; + } else { + throw new Error("Correct katexImagesData or update code here to support\n " + numSvgChildren + " children."); + } + + for (var i = 0; i < numSvgChildren; i++) { + var _path = new PathNode(paths[i]); + + var _svgNode = new SvgNode([_path], { + "width": "400em", + "height": makeEm(_height2), + "viewBox": "0 0 " + viewBoxWidth + " " + _viewBoxHeight, + "preserveAspectRatio": aligns[i] + " slice" + }); + + var _span = buildCommon.makeSvgSpan([widthClasses[i]], [_svgNode], options); + + if (numSvgChildren === 1) { + return { + span: _span, + minWidth: _minWidth, + height: _height2 + }; + } else { + _span.style.height = makeEm(_height2); + spans.push(_span); + } + } + + return { + span: buildCommon.makeSpan(["stretchy"], spans, options), + minWidth: _minWidth, + height: _height2 + }; + } + } // buildSvgSpan_() + + + var { + span, + minWidth, + height + } = buildSvgSpan_(); // Note that we are returning span.depth = 0. + // Any adjustments relative to the baseline must be done in buildHTML. + + span.height = height; + span.style.height = makeEm(height); + + if (minWidth > 0) { + span.style.minWidth = makeEm(minWidth); + } + + return span; +}; + +var encloseSpan = function encloseSpan(inner, label, topPad, bottomPad, options) { + // Return an image span for \cancel, \bcancel, \xcancel, \fbox, or \angl + var img; + var totalHeight = inner.height + inner.depth + topPad + bottomPad; + + if (/fbox|color|angl/.test(label)) { + img = buildCommon.makeSpan(["stretchy", label], [], options); + + if (label === "fbox") { + var color = options.color && options.getColor(); + + if (color) { + img.style.borderColor = color; + } + } + } else { + // \cancel, \bcancel, or \xcancel + // Since \cancel's SVG is inline and it omits the viewBox attribute, + // its stroke-width will not vary with span area. + var lines = []; + + if (/^[bx]cancel$/.test(label)) { + lines.push(new LineNode({ + "x1": "0", + "y1": "0", + "x2": "100%", + "y2": "100%", + "stroke-width": "0.046em" + })); + } + + if (/^x?cancel$/.test(label)) { + lines.push(new LineNode({ + "x1": "0", + "y1": "100%", + "x2": "100%", + "y2": "0", + "stroke-width": "0.046em" + })); + } + + var svgNode = new SvgNode(lines, { + "width": "100%", + "height": makeEm(totalHeight) + }); + img = buildCommon.makeSvgSpan([], [svgNode], options); + } + + img.height = totalHeight; + img.style.height = makeEm(totalHeight); + return img; +}; + +var stretchy = { + encloseSpan, + mathMLnode, + svgSpan +}; + +/** + * Asserts that the node is of the given type and returns it with stricter + * typing. Throws if the node's type does not match. + */ +function assertNodeType(node, type) { + if (!node || node.type !== type) { + throw new Error("Expected node of type " + type + ", but got " + (node ? "node of type " + node.type : String(node))); + } // $FlowFixMe, >=0.125 + + + return node; +} +/** + * Returns the node more strictly typed iff it is of the given type. Otherwise, + * returns null. + */ + +function assertSymbolNodeType(node) { + var typedNode = checkSymbolNodeType(node); + + if (!typedNode) { + throw new Error("Expected node of symbol group type, but got " + (node ? "node of type " + node.type : String(node))); + } + + return typedNode; +} +/** + * Returns the node more strictly typed iff it is of the given type. Otherwise, + * returns null. + */ + +function checkSymbolNodeType(node) { + if (node && (node.type === "atom" || NON_ATOMS.hasOwnProperty(node.type))) { + // $FlowFixMe + return node; + } + + return null; +} + +// NOTE: Unlike most `htmlBuilder`s, this one handles not only "accent", but +// also "supsub" since an accent can affect super/subscripting. +var htmlBuilder$a = (grp, options) => { + // Accents are handled in the TeXbook pg. 443, rule 12. + var base; + var group; + var supSubGroup; + + if (grp && grp.type === "supsub") { + // If our base is a character box, and we have superscripts and + // subscripts, the supsub will defer to us. In particular, we want + // to attach the superscripts and subscripts to the inner body (so + // that the position of the superscripts and subscripts won't be + // affected by the height of the accent). We accomplish this by + // sticking the base of the accent into the base of the supsub, and + // rendering that, while keeping track of where the accent is. + // The real accent group is the base of the supsub group + group = assertNodeType(grp.base, "accent"); // The character box is the base of the accent group + + base = group.base; // Stick the character box into the base of the supsub group + + grp.base = base; // Rerender the supsub group with its new base, and store that + // result. + + supSubGroup = assertSpan(buildGroup$1(grp, options)); // reset original base + + grp.base = group; + } else { + group = assertNodeType(grp, "accent"); + base = group.base; + } // Build the base group + + + var body = buildGroup$1(base, options.havingCrampedStyle()); // Does the accent need to shift for the skew of a character? + + var mustShift = group.isShifty && utils.isCharacterBox(base); // Calculate the skew of the accent. This is based on the line "If the + // nucleus is not a single character, let s = 0; otherwise set s to the + // kern amount for the nucleus followed by the \skewchar of its font." + // Note that our skew metrics are just the kern between each character + // and the skewchar. + + var skew = 0; + + if (mustShift) { + // If the base is a character box, then we want the skew of the + // innermost character. To do that, we find the innermost character: + var baseChar = utils.getBaseElem(base); // Then, we render its group to get the symbol inside it + + var baseGroup = buildGroup$1(baseChar, options.havingCrampedStyle()); // Finally, we pull the skew off of the symbol. + + skew = assertSymbolDomNode(baseGroup).skew; // Note that we now throw away baseGroup, because the layers we + // removed with getBaseElem might contain things like \color which + // we can't get rid of. + // TODO(emily): Find a better way to get the skew + } + + var accentBelow = group.label === "\\c"; // calculate the amount of space between the body and the accent + + var clearance = accentBelow ? body.height + body.depth : Math.min(body.height, options.fontMetrics().xHeight); // Build the accent + + var accentBody; + + if (!group.isStretchy) { + var accent; + var width; + + if (group.label === "\\vec") { + // Before version 0.9, \vec used the combining font glyph U+20D7. + // But browsers, especially Safari, are not consistent in how they + // render combining characters when not preceded by a character. + // So now we use an SVG. + // If Safari reforms, we should consider reverting to the glyph. + accent = buildCommon.staticSvg("vec", options); + width = buildCommon.svgData.vec[1]; + } else { + accent = buildCommon.makeOrd({ + mode: group.mode, + text: group.label + }, options, "textord"); + accent = assertSymbolDomNode(accent); // Remove the italic correction of the accent, because it only serves to + // shift the accent over to a place we don't want. + + accent.italic = 0; + width = accent.width; + + if (accentBelow) { + clearance += accent.depth; + } + } + + accentBody = buildCommon.makeSpan(["accent-body"], [accent]); // "Full" accents expand the width of the resulting symbol to be + // at least the width of the accent, and overlap directly onto the + // character without any vertical offset. + + var accentFull = group.label === "\\textcircled"; + + if (accentFull) { + accentBody.classes.push('accent-full'); + clearance = body.height; + } // Shift the accent over by the skew. + + + var left = skew; // CSS defines `.katex .accent .accent-body:not(.accent-full) { width: 0 }` + // so that the accent doesn't contribute to the bounding box. + // We need to shift the character by its width (effectively half + // its width) to compensate. + + if (!accentFull) { + left -= width / 2; + } + + accentBody.style.left = makeEm(left); // \textcircled uses the \bigcirc glyph, so it needs some + // vertical adjustment to match LaTeX. + + if (group.label === "\\textcircled") { + accentBody.style.top = ".2em"; + } + + accentBody = buildCommon.makeVList({ + positionType: "firstBaseline", + children: [{ + type: "elem", + elem: body + }, { + type: "kern", + size: -clearance + }, { + type: "elem", + elem: accentBody + }] + }, options); + } else { + accentBody = stretchy.svgSpan(group, options); + accentBody = buildCommon.makeVList({ + positionType: "firstBaseline", + children: [{ + type: "elem", + elem: body + }, { + type: "elem", + elem: accentBody, + wrapperClasses: ["svg-align"], + wrapperStyle: skew > 0 ? { + width: "calc(100% - " + makeEm(2 * skew) + ")", + marginLeft: makeEm(2 * skew) + } : undefined + }] + }, options); + } + + var accentWrap = buildCommon.makeSpan(["mord", "accent"], [accentBody], options); + + if (supSubGroup) { + // Here, we replace the "base" child of the supsub with our newly + // generated accent. + supSubGroup.children[0] = accentWrap; // Since we don't rerun the height calculation after replacing the + // accent, we manually recalculate height. + + supSubGroup.height = Math.max(accentWrap.height, supSubGroup.height); // Accents should always be ords, even when their innards are not. + + supSubGroup.classes[0] = "mord"; + return supSubGroup; + } else { + return accentWrap; + } +}; + +var mathmlBuilder$9 = (group, options) => { + var accentNode = group.isStretchy ? stretchy.mathMLnode(group.label) : new mathMLTree.MathNode("mo", [makeText(group.label, group.mode)]); + var node = new mathMLTree.MathNode("mover", [buildGroup(group.base, options), accentNode]); + node.setAttribute("accent", "true"); + return node; +}; + +var NON_STRETCHY_ACCENT_REGEX = new RegExp(["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring"].map(accent => "\\" + accent).join("|")); // Accents + +defineFunction({ + type: "accent", + names: ["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring", "\\widecheck", "\\widehat", "\\widetilde", "\\overrightarrow", "\\overleftarrow", "\\Overrightarrow", "\\overleftrightarrow", "\\overgroup", "\\overlinesegment", "\\overleftharpoon", "\\overrightharpoon"], + props: { + numArgs: 1 + }, + handler: (context, args) => { + var base = normalizeArgument(args[0]); + var isStretchy = !NON_STRETCHY_ACCENT_REGEX.test(context.funcName); + var isShifty = !isStretchy || context.funcName === "\\widehat" || context.funcName === "\\widetilde" || context.funcName === "\\widecheck"; + return { + type: "accent", + mode: context.parser.mode, + label: context.funcName, + isStretchy: isStretchy, + isShifty: isShifty, + base: base + }; + }, + htmlBuilder: htmlBuilder$a, + mathmlBuilder: mathmlBuilder$9 +}); // Text-mode accents + +defineFunction({ + type: "accent", + names: ["\\'", "\\`", "\\^", "\\~", "\\=", "\\u", "\\.", '\\"', "\\c", "\\r", "\\H", "\\v", "\\textcircled"], + props: { + numArgs: 1, + allowedInText: true, + allowedInMath: true, + // unless in strict mode + argTypes: ["primitive"] + }, + handler: (context, args) => { + var base = args[0]; + var mode = context.parser.mode; + + if (mode === "math") { + context.parser.settings.reportNonstrict("mathVsTextAccents", "LaTeX's accent " + context.funcName + " works only in text mode"); + mode = "text"; + } + + return { + type: "accent", + mode: mode, + label: context.funcName, + isStretchy: false, + isShifty: true, + base: base + }; + }, + htmlBuilder: htmlBuilder$a, + mathmlBuilder: mathmlBuilder$9 +}); + +// Horizontal overlap functions +defineFunction({ + type: "accentUnder", + names: ["\\underleftarrow", "\\underrightarrow", "\\underleftrightarrow", "\\undergroup", "\\underlinesegment", "\\utilde"], + props: { + numArgs: 1 + }, + handler: (_ref, args) => { + var { + parser, + funcName + } = _ref; + var base = args[0]; + return { + type: "accentUnder", + mode: parser.mode, + label: funcName, + base: base + }; + }, + htmlBuilder: (group, options) => { + // Treat under accents much like underlines. + var innerGroup = buildGroup$1(group.base, options); + var accentBody = stretchy.svgSpan(group, options); + var kern = group.label === "\\utilde" ? 0.12 : 0; // Generate the vlist, with the appropriate kerns + + var vlist = buildCommon.makeVList({ + positionType: "top", + positionData: innerGroup.height, + children: [{ + type: "elem", + elem: accentBody, + wrapperClasses: ["svg-align"] + }, { + type: "kern", + size: kern + }, { + type: "elem", + elem: innerGroup + }] + }, options); + return buildCommon.makeSpan(["mord", "accentunder"], [vlist], options); + }, + mathmlBuilder: (group, options) => { + var accentNode = stretchy.mathMLnode(group.label); + var node = new mathMLTree.MathNode("munder", [buildGroup(group.base, options), accentNode]); + node.setAttribute("accentunder", "true"); + return node; + } +}); + +// Helper function +var paddedNode = group => { + var node = new mathMLTree.MathNode("mpadded", group ? [group] : []); + node.setAttribute("width", "+0.6em"); + node.setAttribute("lspace", "0.3em"); + return node; +}; // Stretchy arrows with an optional argument + + +defineFunction({ + type: "xArrow", + names: ["\\xleftarrow", "\\xrightarrow", "\\xLeftarrow", "\\xRightarrow", "\\xleftrightarrow", "\\xLeftrightarrow", "\\xhookleftarrow", "\\xhookrightarrow", "\\xmapsto", "\\xrightharpoondown", "\\xrightharpoonup", "\\xleftharpoondown", "\\xleftharpoonup", "\\xrightleftharpoons", "\\xleftrightharpoons", "\\xlongequal", "\\xtwoheadrightarrow", "\\xtwoheadleftarrow", "\\xtofrom", // The next 3 functions are here to support the mhchem extension. + // Direct use of these functions is discouraged and may break someday. + "\\xrightleftarrows", "\\xrightequilibrium", "\\xleftequilibrium", // The next 3 functions are here only to support the {CD} environment. + "\\\\cdrightarrow", "\\\\cdleftarrow", "\\\\cdlongequal"], + props: { + numArgs: 1, + numOptionalArgs: 1 + }, + + handler(_ref, args, optArgs) { + var { + parser, + funcName + } = _ref; + return { + type: "xArrow", + mode: parser.mode, + label: funcName, + body: args[0], + below: optArgs[0] + }; + }, + + // Flow is unable to correctly infer the type of `group`, even though it's + // unambiguously determined from the passed-in `type` above. + htmlBuilder(group, options) { + var style = options.style; // Build the argument groups in the appropriate style. + // Ref: amsmath.dtx: \hbox{$\scriptstyle\mkern#3mu{#6}\mkern#4mu$}% + // Some groups can return document fragments. Handle those by wrapping + // them in a span. + + var newOptions = options.havingStyle(style.sup()); + var upperGroup = buildCommon.wrapFragment(buildGroup$1(group.body, newOptions, options), options); + var arrowPrefix = group.label.slice(0, 2) === "\\x" ? "x" : "cd"; + upperGroup.classes.push(arrowPrefix + "-arrow-pad"); + var lowerGroup; + + if (group.below) { + // Build the lower group + newOptions = options.havingStyle(style.sub()); + lowerGroup = buildCommon.wrapFragment(buildGroup$1(group.below, newOptions, options), options); + lowerGroup.classes.push(arrowPrefix + "-arrow-pad"); + } + + var arrowBody = stretchy.svgSpan(group, options); // Re shift: Note that stretchy.svgSpan returned arrowBody.depth = 0. + // The point we want on the math axis is at 0.5 * arrowBody.height. + + var arrowShift = -options.fontMetrics().axisHeight + 0.5 * arrowBody.height; // 2 mu kern. Ref: amsmath.dtx: #7\if0#2\else\mkern#2mu\fi + + var upperShift = -options.fontMetrics().axisHeight - 0.5 * arrowBody.height - 0.111; // 0.111 em = 2 mu + + if (upperGroup.depth > 0.25 || group.label === "\\xleftequilibrium") { + upperShift -= upperGroup.depth; // shift up if depth encroaches + } // Generate the vlist + + + var vlist; + + if (lowerGroup) { + var lowerShift = -options.fontMetrics().axisHeight + lowerGroup.height + 0.5 * arrowBody.height + 0.111; + vlist = buildCommon.makeVList({ + positionType: "individualShift", + children: [{ + type: "elem", + elem: upperGroup, + shift: upperShift + }, { + type: "elem", + elem: arrowBody, + shift: arrowShift + }, { + type: "elem", + elem: lowerGroup, + shift: lowerShift + }] + }, options); + } else { + vlist = buildCommon.makeVList({ + positionType: "individualShift", + children: [{ + type: "elem", + elem: upperGroup, + shift: upperShift + }, { + type: "elem", + elem: arrowBody, + shift: arrowShift + }] + }, options); + } // $FlowFixMe: Replace this with passing "svg-align" into makeVList. + + + vlist.children[0].children[0].children[1].classes.push("svg-align"); + return buildCommon.makeSpan(["mrel", "x-arrow"], [vlist], options); + }, + + mathmlBuilder(group, options) { + var arrowNode = stretchy.mathMLnode(group.label); + arrowNode.setAttribute("minsize", group.label.charAt(0) === "x" ? "1.75em" : "3.0em"); + var node; + + if (group.body) { + var upperNode = paddedNode(buildGroup(group.body, options)); + + if (group.below) { + var lowerNode = paddedNode(buildGroup(group.below, options)); + node = new mathMLTree.MathNode("munderover", [arrowNode, lowerNode, upperNode]); + } else { + node = new mathMLTree.MathNode("mover", [arrowNode, upperNode]); + } + } else if (group.below) { + var _lowerNode = paddedNode(buildGroup(group.below, options)); + + node = new mathMLTree.MathNode("munder", [arrowNode, _lowerNode]); + } else { + // This should never happen. + // Parser.js throws an error if there is no argument. + node = paddedNode(); + node = new mathMLTree.MathNode("mover", [arrowNode, node]); + } + + return node; + } + +}); + +var makeSpan = buildCommon.makeSpan; + +function htmlBuilder$9(group, options) { + var elements = buildExpression$1(group.body, options, true); + return makeSpan([group.mclass], elements, options); +} + +function mathmlBuilder$8(group, options) { + var node; + var inner = buildExpression(group.body, options); + + if (group.mclass === "minner") { + node = new mathMLTree.MathNode("mpadded", inner); + } else if (group.mclass === "mord") { + if (group.isCharacterBox) { + node = inner[0]; + node.type = "mi"; + } else { + node = new mathMLTree.MathNode("mi", inner); + } + } else { + if (group.isCharacterBox) { + node = inner[0]; + node.type = "mo"; + } else { + node = new mathMLTree.MathNode("mo", inner); + } // Set spacing based on what is the most likely adjacent atom type. + // See TeXbook p170. + + + if (group.mclass === "mbin") { + node.attributes.lspace = "0.22em"; // medium space + + node.attributes.rspace = "0.22em"; + } else if (group.mclass === "mpunct") { + node.attributes.lspace = "0em"; + node.attributes.rspace = "0.17em"; // thinspace + } else if (group.mclass === "mopen" || group.mclass === "mclose") { + node.attributes.lspace = "0em"; + node.attributes.rspace = "0em"; + } else if (group.mclass === "minner") { + node.attributes.lspace = "0.0556em"; // 1 mu is the most likely option + + node.attributes.width = "+0.1111em"; + } // MathML default space is 5/18 em, so needs no action. + // Ref: https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mo + + } + + return node; +} // Math class commands except \mathop + + +defineFunction({ + type: "mclass", + names: ["\\mathord", "\\mathbin", "\\mathrel", "\\mathopen", "\\mathclose", "\\mathpunct", "\\mathinner"], + props: { + numArgs: 1, + primitive: true + }, + + handler(_ref, args) { + var { + parser, + funcName + } = _ref; + var body = args[0]; + return { + type: "mclass", + mode: parser.mode, + mclass: "m" + funcName.slice(5), + // TODO(kevinb): don't prefix with 'm' + body: ordargument(body), + isCharacterBox: utils.isCharacterBox(body) + }; + }, + + htmlBuilder: htmlBuilder$9, + mathmlBuilder: mathmlBuilder$8 +}); +var binrelClass = arg => { + // \binrel@ spacing varies with (bin|rel|ord) of the atom in the argument. + // (by rendering separately and with {}s before and after, and measuring + // the change in spacing). We'll do roughly the same by detecting the + // atom type directly. + var atom = arg.type === "ordgroup" && arg.body.length ? arg.body[0] : arg; + + if (atom.type === "atom" && (atom.family === "bin" || atom.family === "rel")) { + return "m" + atom.family; + } else { + return "mord"; + } +}; // \@binrel{x}{y} renders like y but as mbin/mrel/mord if x is mbin/mrel/mord. +// This is equivalent to \binrel@{x}\binrel@@{y} in AMSTeX. + +defineFunction({ + type: "mclass", + names: ["\\@binrel"], + props: { + numArgs: 2 + }, + + handler(_ref2, args) { + var { + parser + } = _ref2; + return { + type: "mclass", + mode: parser.mode, + mclass: binrelClass(args[0]), + body: ordargument(args[1]), + isCharacterBox: utils.isCharacterBox(args[1]) + }; + } + +}); // Build a relation or stacked op by placing one symbol on top of another + +defineFunction({ + type: "mclass", + names: ["\\stackrel", "\\overset", "\\underset"], + props: { + numArgs: 2 + }, + + handler(_ref3, args) { + var { + parser, + funcName + } = _ref3; + var baseArg = args[1]; + var shiftedArg = args[0]; + var mclass; + + if (funcName !== "\\stackrel") { + // LaTeX applies \binrel spacing to \overset and \underset. + mclass = binrelClass(baseArg); + } else { + mclass = "mrel"; // for \stackrel + } + + var baseOp = { + type: "op", + mode: baseArg.mode, + limits: true, + alwaysHandleSupSub: true, + parentIsSupSub: false, + symbol: false, + suppressBaseShift: funcName !== "\\stackrel", + body: ordargument(baseArg) + }; + var supsub = { + type: "supsub", + mode: shiftedArg.mode, + base: baseOp, + sup: funcName === "\\underset" ? null : shiftedArg, + sub: funcName === "\\underset" ? shiftedArg : null + }; + return { + type: "mclass", + mode: parser.mode, + mclass, + body: [supsub], + isCharacterBox: utils.isCharacterBox(supsub) + }; + }, + + htmlBuilder: htmlBuilder$9, + mathmlBuilder: mathmlBuilder$8 +}); + +// \pmb is a simulation of bold font. +// The version of \pmb in ambsy.sty works by typesetting three copies +// with small offsets. We use CSS text-shadow. +// It's a hack. Not as good as a real bold font. Better than nothing. +defineFunction({ + type: "pmb", + names: ["\\pmb"], + props: { + numArgs: 1, + allowedInText: true + }, + + handler(_ref, args) { + var { + parser + } = _ref; + return { + type: "pmb", + mode: parser.mode, + mclass: binrelClass(args[0]), + body: ordargument(args[0]) + }; + }, + + htmlBuilder(group, options) { + var elements = buildExpression$1(group.body, options, true); + var node = buildCommon.makeSpan([group.mclass], elements, options); + node.style.textShadow = "0.02em 0.01em 0.04px"; + return node; + }, + + mathmlBuilder(group, style) { + var inner = buildExpression(group.body, style); // Wrap with an element. + + var node = new mathMLTree.MathNode("mstyle", inner); + node.setAttribute("style", "text-shadow: 0.02em 0.01em 0.04px"); + return node; + } + +}); + +var cdArrowFunctionName = { + ">": "\\\\cdrightarrow", + "<": "\\\\cdleftarrow", + "=": "\\\\cdlongequal", + "A": "\\uparrow", + "V": "\\downarrow", + "|": "\\Vert", + ".": "no arrow" +}; + +var newCell = () => { + // Create an empty cell, to be filled below with parse nodes. + // The parseTree from this module must be constructed like the + // one created by parseArray(), so an empty CD cell must + // be a ParseNode<"styling">. And CD is always displaystyle. + // So these values are fixed and flow can do implicit typing. + return { + type: "styling", + body: [], + mode: "math", + style: "display" + }; +}; + +var isStartOfArrow = node => { + return node.type === "textord" && node.text === "@"; +}; + +var isLabelEnd = (node, endChar) => { + return (node.type === "mathord" || node.type === "atom") && node.text === endChar; +}; + +function cdArrow(arrowChar, labels, parser) { + // Return a parse tree of an arrow and its labels. + // This acts in a way similar to a macro expansion. + var funcName = cdArrowFunctionName[arrowChar]; + + switch (funcName) { + case "\\\\cdrightarrow": + case "\\\\cdleftarrow": + return parser.callFunction(funcName, [labels[0]], [labels[1]]); + + case "\\uparrow": + case "\\downarrow": + { + var leftLabel = parser.callFunction("\\\\cdleft", [labels[0]], []); + var bareArrow = { + type: "atom", + text: funcName, + mode: "math", + family: "rel" + }; + var sizedArrow = parser.callFunction("\\Big", [bareArrow], []); + var rightLabel = parser.callFunction("\\\\cdright", [labels[1]], []); + var arrowGroup = { + type: "ordgroup", + mode: "math", + body: [leftLabel, sizedArrow, rightLabel] + }; + return parser.callFunction("\\\\cdparent", [arrowGroup], []); + } + + case "\\\\cdlongequal": + return parser.callFunction("\\\\cdlongequal", [], []); + + case "\\Vert": + { + var arrow = { + type: "textord", + text: "\\Vert", + mode: "math" + }; + return parser.callFunction("\\Big", [arrow], []); + } + + default: + return { + type: "textord", + text: " ", + mode: "math" + }; + } +} + +function parseCD(parser) { + // Get the array's parse nodes with \\ temporarily mapped to \cr. + var parsedRows = []; + parser.gullet.beginGroup(); + parser.gullet.macros.set("\\cr", "\\\\\\relax"); + parser.gullet.beginGroup(); + + while (true) { + // eslint-disable-line no-constant-condition + // Get the parse nodes for the next row. + parsedRows.push(parser.parseExpression(false, "\\\\")); + parser.gullet.endGroup(); + parser.gullet.beginGroup(); + var next = parser.fetch().text; + + if (next === "&" || next === "\\\\") { + parser.consume(); + } else if (next === "\\end") { + if (parsedRows[parsedRows.length - 1].length === 0) { + parsedRows.pop(); // final row ended in \\ + } + + break; + } else { + throw new ParseError("Expected \\\\ or \\cr or \\end", parser.nextToken); + } + } + + var row = []; + var body = [row]; // Loop thru the parse nodes. Collect them into cells and arrows. + + for (var i = 0; i < parsedRows.length; i++) { + // Start a new row. + var rowNodes = parsedRows[i]; // Create the first cell. + + var cell = newCell(); + + for (var j = 0; j < rowNodes.length; j++) { + if (!isStartOfArrow(rowNodes[j])) { + // If a parseNode is not an arrow, it goes into a cell. + cell.body.push(rowNodes[j]); + } else { + // Parse node j is an "@", the start of an arrow. + // Before starting on the arrow, push the cell into `row`. + row.push(cell); // Now collect parseNodes into an arrow. + // The character after "@" defines the arrow type. + + j += 1; + var arrowChar = assertSymbolNodeType(rowNodes[j]).text; // Create two empty label nodes. We may or may not use them. + + var labels = new Array(2); + labels[0] = { + type: "ordgroup", + mode: "math", + body: [] + }; + labels[1] = { + type: "ordgroup", + mode: "math", + body: [] + }; // Process the arrow. + + if ("=|.".indexOf(arrowChar) > -1) ; else if ("<>AV".indexOf(arrowChar) > -1) { + // Four arrows, `@>>>`, `@<<<`, `@AAA`, and `@VVV`, each take + // two optional labels. E.g. the right-point arrow syntax is + // really: @>{optional label}>{optional label}> + // Collect parseNodes into labels. + for (var labelNum = 0; labelNum < 2; labelNum++) { + var inLabel = true; + + for (var k = j + 1; k < rowNodes.length; k++) { + if (isLabelEnd(rowNodes[k], arrowChar)) { + inLabel = false; + j = k; + break; + } + + if (isStartOfArrow(rowNodes[k])) { + throw new ParseError("Missing a " + arrowChar + " character to complete a CD arrow.", rowNodes[k]); + } + + labels[labelNum].body.push(rowNodes[k]); + } + + if (inLabel) { + // isLabelEnd never returned a true. + throw new ParseError("Missing a " + arrowChar + " character to complete a CD arrow.", rowNodes[j]); + } + } + } else { + throw new ParseError("Expected one of \"<>AV=|.\" after @", rowNodes[j]); + } // Now join the arrow to its labels. + + + var arrow = cdArrow(arrowChar, labels, parser); // Wrap the arrow in ParseNode<"styling">. + // This is done to match parseArray() behavior. + + var wrappedArrow = { + type: "styling", + body: [arrow], + mode: "math", + style: "display" // CD is always displaystyle. + + }; + row.push(wrappedArrow); // In CD's syntax, cells are implicit. That is, everything that + // is not an arrow gets collected into a cell. So create an empty + // cell now. It will collect upcoming parseNodes. + + cell = newCell(); + } + } + + if (i % 2 === 0) { + // Even-numbered rows consist of: cell, arrow, cell, arrow, ... cell + // The last cell is not yet pushed into `row`, so: + row.push(cell); + } else { + // Odd-numbered rows consist of: vert arrow, empty cell, ... vert arrow + // Remove the empty cell that was placed at the beginning of `row`. + row.shift(); + } + + row = []; + body.push(row); + } // End row group + + + parser.gullet.endGroup(); // End array group defining \\ + + parser.gullet.endGroup(); // define column separation. + + var cols = new Array(body[0].length).fill({ + type: "align", + align: "c", + pregap: 0.25, + // CD package sets \enskip between columns. + postgap: 0.25 // So pre and post each get half an \enskip, i.e. 0.25em. + + }); + return { + type: "array", + mode: "math", + body, + arraystretch: 1, + addJot: true, + rowGaps: [null], + cols, + colSeparationType: "CD", + hLinesBeforeRow: new Array(body.length + 1).fill([]) + }; +} // The functions below are not available for general use. +// They are here only for internal use by the {CD} environment in placing labels +// next to vertical arrows. +// We don't need any such functions for horizontal arrows because we can reuse +// the functionality that already exists for extensible arrows. + +defineFunction({ + type: "cdlabel", + names: ["\\\\cdleft", "\\\\cdright"], + props: { + numArgs: 1 + }, + + handler(_ref, args) { + var { + parser, + funcName + } = _ref; + return { + type: "cdlabel", + mode: parser.mode, + side: funcName.slice(4), + label: args[0] + }; + }, + + htmlBuilder(group, options) { + var newOptions = options.havingStyle(options.style.sup()); + var label = buildCommon.wrapFragment(buildGroup$1(group.label, newOptions, options), options); + label.classes.push("cd-label-" + group.side); + label.style.bottom = makeEm(0.8 - label.depth); // Zero out label height & depth, so vertical align of arrow is set + // by the arrow height, not by the label. + + label.height = 0; + label.depth = 0; + return label; + }, + + mathmlBuilder(group, options) { + var label = new mathMLTree.MathNode("mrow", [buildGroup(group.label, options)]); + label = new mathMLTree.MathNode("mpadded", [label]); + label.setAttribute("width", "0"); + + if (group.side === "left") { + label.setAttribute("lspace", "-1width"); + } // We have to guess at vertical alignment. We know the arrow is 1.8em tall, + // But we don't know the height or depth of the label. + + + label.setAttribute("voffset", "0.7em"); + label = new mathMLTree.MathNode("mstyle", [label]); + label.setAttribute("displaystyle", "false"); + label.setAttribute("scriptlevel", "1"); + return label; + } + +}); +defineFunction({ + type: "cdlabelparent", + names: ["\\\\cdparent"], + props: { + numArgs: 1 + }, + + handler(_ref2, args) { + var { + parser + } = _ref2; + return { + type: "cdlabelparent", + mode: parser.mode, + fragment: args[0] + }; + }, + + htmlBuilder(group, options) { + // Wrap the vertical arrow and its labels. + // The parent gets position: relative. The child gets position: absolute. + // So CSS can locate the label correctly. + var parent = buildCommon.wrapFragment(buildGroup$1(group.fragment, options), options); + parent.classes.push("cd-vert-arrow"); + return parent; + }, + + mathmlBuilder(group, options) { + return new mathMLTree.MathNode("mrow", [buildGroup(group.fragment, options)]); + } + +}); + +// {123} and converts into symbol with code 123. It is used by the *macro* +// \char defined in macros.js. + +defineFunction({ + type: "textord", + names: ["\\@char"], + props: { + numArgs: 1, + allowedInText: true + }, + + handler(_ref, args) { + var { + parser + } = _ref; + var arg = assertNodeType(args[0], "ordgroup"); + var group = arg.body; + var number = ""; + + for (var i = 0; i < group.length; i++) { + var node = assertNodeType(group[i], "textord"); + number += node.text; + } + + var code = parseInt(number); + var text; + + if (isNaN(code)) { + throw new ParseError("\\@char has non-numeric argument " + number); // If we drop IE support, the following code could be replaced with + // text = String.fromCodePoint(code) + } else if (code < 0 || code >= 0x10ffff) { + throw new ParseError("\\@char with invalid code point " + number); + } else if (code <= 0xffff) { + text = String.fromCharCode(code); + } else { + // Astral code point; split into surrogate halves + code -= 0x10000; + text = String.fromCharCode((code >> 10) + 0xd800, (code & 0x3ff) + 0xdc00); + } + + return { + type: "textord", + mode: parser.mode, + text: text + }; + } + +}); + +var htmlBuilder$8 = (group, options) => { + var elements = buildExpression$1(group.body, options.withColor(group.color), false); // \color isn't supposed to affect the type of the elements it contains. + // To accomplish this, we wrap the results in a fragment, so the inner + // elements will be able to directly interact with their neighbors. For + // example, `\color{red}{2 +} 3` has the same spacing as `2 + 3` + + return buildCommon.makeFragment(elements); +}; + +var mathmlBuilder$7 = (group, options) => { + var inner = buildExpression(group.body, options.withColor(group.color)); + var node = new mathMLTree.MathNode("mstyle", inner); + node.setAttribute("mathcolor", group.color); + return node; +}; + +defineFunction({ + type: "color", + names: ["\\textcolor"], + props: { + numArgs: 2, + allowedInText: true, + argTypes: ["color", "original"] + }, + + handler(_ref, args) { + var { + parser + } = _ref; + var color = assertNodeType(args[0], "color-token").color; + var body = args[1]; + return { + type: "color", + mode: parser.mode, + color, + body: ordargument(body) + }; + }, + + htmlBuilder: htmlBuilder$8, + mathmlBuilder: mathmlBuilder$7 +}); +defineFunction({ + type: "color", + names: ["\\color"], + props: { + numArgs: 1, + allowedInText: true, + argTypes: ["color"] + }, + + handler(_ref2, args) { + var { + parser, + breakOnTokenText + } = _ref2; + var color = assertNodeType(args[0], "color-token").color; // Set macro \current@color in current namespace to store the current + // color, mimicking the behavior of color.sty. + // This is currently used just to correctly color a \right + // that follows a \color command. + + parser.gullet.macros.set("\\current@color", color); // Parse out the implicit body that should be colored. + + var body = parser.parseExpression(true, breakOnTokenText); + return { + type: "color", + mode: parser.mode, + color, + body + }; + }, + + htmlBuilder: htmlBuilder$8, + mathmlBuilder: mathmlBuilder$7 +}); + +// Row breaks within tabular environments, and line breaks at top level + +defineFunction({ + type: "cr", + names: ["\\\\"], + props: { + numArgs: 0, + numOptionalArgs: 0, + allowedInText: true + }, + + handler(_ref, args, optArgs) { + var { + parser + } = _ref; + var size = parser.gullet.future().text === "[" ? parser.parseSizeGroup(true) : null; + var newLine = !parser.settings.displayMode || !parser.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline " + "does nothing in display mode"); + return { + type: "cr", + mode: parser.mode, + newLine, + size: size && assertNodeType(size, "size").value + }; + }, + + // The following builders are called only at the top level, + // not within tabular/array environments. + htmlBuilder(group, options) { + var span = buildCommon.makeSpan(["mspace"], [], options); + + if (group.newLine) { + span.classes.push("newline"); + + if (group.size) { + span.style.marginTop = makeEm(calculateSize(group.size, options)); + } + } + + return span; + }, + + mathmlBuilder(group, options) { + var node = new mathMLTree.MathNode("mspace"); + + if (group.newLine) { + node.setAttribute("linebreak", "newline"); + + if (group.size) { + node.setAttribute("height", makeEm(calculateSize(group.size, options))); + } + } + + return node; + } + +}); + +var globalMap = { + "\\global": "\\global", + "\\long": "\\\\globallong", + "\\\\globallong": "\\\\globallong", + "\\def": "\\gdef", + "\\gdef": "\\gdef", + "\\edef": "\\xdef", + "\\xdef": "\\xdef", + "\\let": "\\\\globallet", + "\\futurelet": "\\\\globalfuture" +}; + +var checkControlSequence = tok => { + var name = tok.text; + + if (/^(?:[\\{}$&#^_]|EOF)$/.test(name)) { + throw new ParseError("Expected a control sequence", tok); + } + + return name; +}; + +var getRHS = parser => { + var tok = parser.gullet.popToken(); + + if (tok.text === "=") { + // consume optional equals + tok = parser.gullet.popToken(); + + if (tok.text === " ") { + // consume one optional space + tok = parser.gullet.popToken(); + } + } + + return tok; +}; + +var letCommand = (parser, name, tok, global) => { + var macro = parser.gullet.macros.get(tok.text); + + if (macro == null) { + // don't expand it later even if a macro with the same name is defined + // e.g., \let\foo=\frac \def\frac{\relax} \frac12 + tok.noexpand = true; + macro = { + tokens: [tok], + numArgs: 0, + // reproduce the same behavior in expansion + unexpandable: !parser.gullet.isExpandable(tok.text) + }; + } + + parser.gullet.macros.set(name, macro, global); +}; // -> | +// -> |\global +// -> | +// -> \global|\long|\outer + + +defineFunction({ + type: "internal", + names: ["\\global", "\\long", "\\\\globallong" // can’t be entered directly + ], + props: { + numArgs: 0, + allowedInText: true + }, + + handler(_ref) { + var { + parser, + funcName + } = _ref; + parser.consumeSpaces(); + var token = parser.fetch(); + + if (globalMap[token.text]) { + // KaTeX doesn't have \par, so ignore \long + if (funcName === "\\global" || funcName === "\\\\globallong") { + token.text = globalMap[token.text]; + } + + return assertNodeType(parser.parseFunction(), "internal"); + } + + throw new ParseError("Invalid token after macro prefix", token); + } + +}); // Basic support for macro definitions: \def, \gdef, \edef, \xdef +// -> +// -> \def|\gdef|\edef|\xdef +// -> + +defineFunction({ + type: "internal", + names: ["\\def", "\\gdef", "\\edef", "\\xdef"], + props: { + numArgs: 0, + allowedInText: true, + primitive: true + }, + + handler(_ref2) { + var { + parser, + funcName + } = _ref2; + var tok = parser.gullet.popToken(); + var name = tok.text; + + if (/^(?:[\\{}$&#^_]|EOF)$/.test(name)) { + throw new ParseError("Expected a control sequence", tok); + } + + var numArgs = 0; + var insert; + var delimiters = [[]]; // contains no braces + + while (parser.gullet.future().text !== "{") { + tok = parser.gullet.popToken(); + + if (tok.text === "#") { + // If the very last character of the is #, so that + // this # is immediately followed by {, TeX will behave as if the { + // had been inserted at the right end of both the parameter text + // and the replacement text. + if (parser.gullet.future().text === "{") { + insert = parser.gullet.future(); + delimiters[numArgs].push("{"); + break; + } // A parameter, the first appearance of # must be followed by 1, + // the next by 2, and so on; up to nine #’s are allowed + + + tok = parser.gullet.popToken(); + + if (!/^[1-9]$/.test(tok.text)) { + throw new ParseError("Invalid argument number \"" + tok.text + "\""); + } + + if (parseInt(tok.text) !== numArgs + 1) { + throw new ParseError("Argument number \"" + tok.text + "\" out of order"); + } + + numArgs++; + delimiters.push([]); + } else if (tok.text === "EOF") { + throw new ParseError("Expected a macro definition"); + } else { + delimiters[numArgs].push(tok.text); + } + } // replacement text, enclosed in '{' and '}' and properly nested + + + var { + tokens + } = parser.gullet.consumeArg(); + + if (insert) { + tokens.unshift(insert); + } + + if (funcName === "\\edef" || funcName === "\\xdef") { + tokens = parser.gullet.expandTokens(tokens); + tokens.reverse(); // to fit in with stack order + } // Final arg is the expansion of the macro + + + parser.gullet.macros.set(name, { + tokens, + numArgs, + delimiters + }, funcName === globalMap[funcName]); + return { + type: "internal", + mode: parser.mode + }; + } + +}); // -> +// -> \futurelet +// | \let +// -> |= + +defineFunction({ + type: "internal", + names: ["\\let", "\\\\globallet" // can’t be entered directly + ], + props: { + numArgs: 0, + allowedInText: true, + primitive: true + }, + + handler(_ref3) { + var { + parser, + funcName + } = _ref3; + var name = checkControlSequence(parser.gullet.popToken()); + parser.gullet.consumeSpaces(); + var tok = getRHS(parser); + letCommand(parser, name, tok, funcName === "\\\\globallet"); + return { + type: "internal", + mode: parser.mode + }; + } + +}); // ref: https://www.tug.org/TUGboat/tb09-3/tb22bechtolsheim.pdf + +defineFunction({ + type: "internal", + names: ["\\futurelet", "\\\\globalfuture" // can’t be entered directly + ], + props: { + numArgs: 0, + allowedInText: true, + primitive: true + }, + + handler(_ref4) { + var { + parser, + funcName + } = _ref4; + var name = checkControlSequence(parser.gullet.popToken()); + var middle = parser.gullet.popToken(); + var tok = parser.gullet.popToken(); + letCommand(parser, name, tok, funcName === "\\\\globalfuture"); + parser.gullet.pushToken(tok); + parser.gullet.pushToken(middle); + return { + type: "internal", + mode: parser.mode + }; + } + +}); + +/** + * This file deals with creating delimiters of various sizes. The TeXbook + * discusses these routines on page 441-442, in the "Another subroutine sets box + * x to a specified variable delimiter" paragraph. + * + * There are three main routines here. `makeSmallDelim` makes a delimiter in the + * normal font, but in either text, script, or scriptscript style. + * `makeLargeDelim` makes a delimiter in textstyle, but in one of the Size1, + * Size2, Size3, or Size4 fonts. `makeStackedDelim` makes a delimiter out of + * smaller pieces that are stacked on top of one another. + * + * The functions take a parameter `center`, which determines if the delimiter + * should be centered around the axis. + * + * Then, there are three exposed functions. `sizedDelim` makes a delimiter in + * one of the given sizes. This is used for things like `\bigl`. + * `customSizedDelim` makes a delimiter with a given total height+depth. It is + * called in places like `\sqrt`. `leftRightDelim` makes an appropriate + * delimiter which surrounds an expression of a given height an depth. It is + * used in `\left` and `\right`. + */ + +/** + * Get the metrics for a given symbol and font, after transformation (i.e. + * after following replacement from symbols.js) + */ +var getMetrics = function getMetrics(symbol, font, mode) { + var replace = symbols.math[symbol] && symbols.math[symbol].replace; + var metrics = getCharacterMetrics(replace || symbol, font, mode); + + if (!metrics) { + throw new Error("Unsupported symbol " + symbol + " and font size " + font + "."); + } + + return metrics; +}; +/** + * Puts a delimiter span in a given style, and adds appropriate height, depth, + * and maxFontSizes. + */ + + +var styleWrap = function styleWrap(delim, toStyle, options, classes) { + var newOptions = options.havingBaseStyle(toStyle); + var span = buildCommon.makeSpan(classes.concat(newOptions.sizingClasses(options)), [delim], options); + var delimSizeMultiplier = newOptions.sizeMultiplier / options.sizeMultiplier; + span.height *= delimSizeMultiplier; + span.depth *= delimSizeMultiplier; + span.maxFontSize = newOptions.sizeMultiplier; + return span; +}; + +var centerSpan = function centerSpan(span, options, style) { + var newOptions = options.havingBaseStyle(style); + var shift = (1 - options.sizeMultiplier / newOptions.sizeMultiplier) * options.fontMetrics().axisHeight; + span.classes.push("delimcenter"); + span.style.top = makeEm(shift); + span.height -= shift; + span.depth += shift; +}; +/** + * Makes a small delimiter. This is a delimiter that comes in the Main-Regular + * font, but is restyled to either be in textstyle, scriptstyle, or + * scriptscriptstyle. + */ + + +var makeSmallDelim = function makeSmallDelim(delim, style, center, options, mode, classes) { + var text = buildCommon.makeSymbol(delim, "Main-Regular", mode, options); + var span = styleWrap(text, style, options, classes); + + if (center) { + centerSpan(span, options, style); + } + + return span; +}; +/** + * Builds a symbol in the given font size (note size is an integer) + */ + + +var mathrmSize = function mathrmSize(value, size, mode, options) { + return buildCommon.makeSymbol(value, "Size" + size + "-Regular", mode, options); +}; +/** + * Makes a large delimiter. This is a delimiter that comes in the Size1, Size2, + * Size3, or Size4 fonts. It is always rendered in textstyle. + */ + + +var makeLargeDelim = function makeLargeDelim(delim, size, center, options, mode, classes) { + var inner = mathrmSize(delim, size, mode, options); + var span = styleWrap(buildCommon.makeSpan(["delimsizing", "size" + size], [inner], options), Style$1.TEXT, options, classes); + + if (center) { + centerSpan(span, options, Style$1.TEXT); + } + + return span; +}; +/** + * Make a span from a font glyph with the given offset and in the given font. + * This is used in makeStackedDelim to make the stacking pieces for the delimiter. + */ + + +var makeGlyphSpan = function makeGlyphSpan(symbol, font, mode) { + var sizeClass; // Apply the correct CSS class to choose the right font. + + if (font === "Size1-Regular") { + sizeClass = "delim-size1"; + } else + /* if (font === "Size4-Regular") */ + { + sizeClass = "delim-size4"; + } + + var corner = buildCommon.makeSpan(["delimsizinginner", sizeClass], [buildCommon.makeSpan([], [buildCommon.makeSymbol(symbol, font, mode)])]); // Since this will be passed into `makeVList` in the end, wrap the element + // in the appropriate tag that VList uses. + + return { + type: "elem", + elem: corner + }; +}; + +var makeInner = function makeInner(ch, height, options) { + // Create a span with inline SVG for the inner part of a tall stacked delimiter. + var width = fontMetricsData['Size4-Regular'][ch.charCodeAt(0)] ? fontMetricsData['Size4-Regular'][ch.charCodeAt(0)][4] : fontMetricsData['Size1-Regular'][ch.charCodeAt(0)][4]; + var path = new PathNode("inner", innerPath(ch, Math.round(1000 * height))); + var svgNode = new SvgNode([path], { + "width": makeEm(width), + "height": makeEm(height), + // Override CSS rule `.katex svg { width: 100% }` + "style": "width:" + makeEm(width), + "viewBox": "0 0 " + 1000 * width + " " + Math.round(1000 * height), + "preserveAspectRatio": "xMinYMin" + }); + var span = buildCommon.makeSvgSpan([], [svgNode], options); + span.height = height; + span.style.height = makeEm(height); + span.style.width = makeEm(width); + return { + type: "elem", + elem: span + }; +}; // Helpers for makeStackedDelim + + +var lapInEms = 0.008; +var lap = { + type: "kern", + size: -1 * lapInEms +}; +var verts = ["|", "\\lvert", "\\rvert", "\\vert"]; +var doubleVerts = ["\\|", "\\lVert", "\\rVert", "\\Vert"]; +/** + * Make a stacked delimiter out of a given delimiter, with the total height at + * least `heightTotal`. This routine is mentioned on page 442 of the TeXbook. + */ + +var makeStackedDelim = function makeStackedDelim(delim, heightTotal, center, options, mode, classes) { + // There are four parts, the top, an optional middle, a repeated part, and a + // bottom. + var top; + var middle; + var repeat; + var bottom; + var svgLabel = ""; + var viewBoxWidth = 0; + top = repeat = bottom = delim; + middle = null; // Also keep track of what font the delimiters are in + + var font = "Size1-Regular"; // We set the parts and font based on the symbol. Note that we use + // '\u23d0' instead of '|' and '\u2016' instead of '\\|' for the + // repeats of the arrows + + if (delim === "\\uparrow") { + repeat = bottom = "\u23d0"; + } else if (delim === "\\Uparrow") { + repeat = bottom = "\u2016"; + } else if (delim === "\\downarrow") { + top = repeat = "\u23d0"; + } else if (delim === "\\Downarrow") { + top = repeat = "\u2016"; + } else if (delim === "\\updownarrow") { + top = "\\uparrow"; + repeat = "\u23d0"; + bottom = "\\downarrow"; + } else if (delim === "\\Updownarrow") { + top = "\\Uparrow"; + repeat = "\u2016"; + bottom = "\\Downarrow"; + } else if (utils.contains(verts, delim)) { + repeat = "\u2223"; + svgLabel = "vert"; + viewBoxWidth = 333; + } else if (utils.contains(doubleVerts, delim)) { + repeat = "\u2225"; + svgLabel = "doublevert"; + viewBoxWidth = 556; + } else if (delim === "[" || delim === "\\lbrack") { + top = "\u23a1"; + repeat = "\u23a2"; + bottom = "\u23a3"; + font = "Size4-Regular"; + svgLabel = "lbrack"; + viewBoxWidth = 667; + } else if (delim === "]" || delim === "\\rbrack") { + top = "\u23a4"; + repeat = "\u23a5"; + bottom = "\u23a6"; + font = "Size4-Regular"; + svgLabel = "rbrack"; + viewBoxWidth = 667; + } else if (delim === "\\lfloor" || delim === "\u230a") { + repeat = top = "\u23a2"; + bottom = "\u23a3"; + font = "Size4-Regular"; + svgLabel = "lfloor"; + viewBoxWidth = 667; + } else if (delim === "\\lceil" || delim === "\u2308") { + top = "\u23a1"; + repeat = bottom = "\u23a2"; + font = "Size4-Regular"; + svgLabel = "lceil"; + viewBoxWidth = 667; + } else if (delim === "\\rfloor" || delim === "\u230b") { + repeat = top = "\u23a5"; + bottom = "\u23a6"; + font = "Size4-Regular"; + svgLabel = "rfloor"; + viewBoxWidth = 667; + } else if (delim === "\\rceil" || delim === "\u2309") { + top = "\u23a4"; + repeat = bottom = "\u23a5"; + font = "Size4-Regular"; + svgLabel = "rceil"; + viewBoxWidth = 667; + } else if (delim === "(" || delim === "\\lparen") { + top = "\u239b"; + repeat = "\u239c"; + bottom = "\u239d"; + font = "Size4-Regular"; + svgLabel = "lparen"; + viewBoxWidth = 875; + } else if (delim === ")" || delim === "\\rparen") { + top = "\u239e"; + repeat = "\u239f"; + bottom = "\u23a0"; + font = "Size4-Regular"; + svgLabel = "rparen"; + viewBoxWidth = 875; + } else if (delim === "\\{" || delim === "\\lbrace") { + top = "\u23a7"; + middle = "\u23a8"; + bottom = "\u23a9"; + repeat = "\u23aa"; + font = "Size4-Regular"; + } else if (delim === "\\}" || delim === "\\rbrace") { + top = "\u23ab"; + middle = "\u23ac"; + bottom = "\u23ad"; + repeat = "\u23aa"; + font = "Size4-Regular"; + } else if (delim === "\\lgroup" || delim === "\u27ee") { + top = "\u23a7"; + bottom = "\u23a9"; + repeat = "\u23aa"; + font = "Size4-Regular"; + } else if (delim === "\\rgroup" || delim === "\u27ef") { + top = "\u23ab"; + bottom = "\u23ad"; + repeat = "\u23aa"; + font = "Size4-Regular"; + } else if (delim === "\\lmoustache" || delim === "\u23b0") { + top = "\u23a7"; + bottom = "\u23ad"; + repeat = "\u23aa"; + font = "Size4-Regular"; + } else if (delim === "\\rmoustache" || delim === "\u23b1") { + top = "\u23ab"; + bottom = "\u23a9"; + repeat = "\u23aa"; + font = "Size4-Regular"; + } // Get the metrics of the four sections + + + var topMetrics = getMetrics(top, font, mode); + var topHeightTotal = topMetrics.height + topMetrics.depth; + var repeatMetrics = getMetrics(repeat, font, mode); + var repeatHeightTotal = repeatMetrics.height + repeatMetrics.depth; + var bottomMetrics = getMetrics(bottom, font, mode); + var bottomHeightTotal = bottomMetrics.height + bottomMetrics.depth; + var middleHeightTotal = 0; + var middleFactor = 1; + + if (middle !== null) { + var middleMetrics = getMetrics(middle, font, mode); + middleHeightTotal = middleMetrics.height + middleMetrics.depth; + middleFactor = 2; // repeat symmetrically above and below middle + } // Calculate the minimal height that the delimiter can have. + // It is at least the size of the top, bottom, and optional middle combined. + + + var minHeight = topHeightTotal + bottomHeightTotal + middleHeightTotal; // Compute the number of copies of the repeat symbol we will need + + var repeatCount = Math.max(0, Math.ceil((heightTotal - minHeight) / (middleFactor * repeatHeightTotal))); // Compute the total height of the delimiter including all the symbols + + var realHeightTotal = minHeight + repeatCount * middleFactor * repeatHeightTotal; // The center of the delimiter is placed at the center of the axis. Note + // that in this context, "center" means that the delimiter should be + // centered around the axis in the current style, while normally it is + // centered around the axis in textstyle. + + var axisHeight = options.fontMetrics().axisHeight; + + if (center) { + axisHeight *= options.sizeMultiplier; + } // Calculate the depth + + + var depth = realHeightTotal / 2 - axisHeight; // Now, we start building the pieces that will go into the vlist + // Keep a list of the pieces of the stacked delimiter + + var stack = []; + + if (svgLabel.length > 0) { + // Instead of stacking glyphs, create a single SVG. + // This evades browser problems with imprecise positioning of spans. + var midHeight = realHeightTotal - topHeightTotal - bottomHeightTotal; + var viewBoxHeight = Math.round(realHeightTotal * 1000); + var pathStr = tallDelim(svgLabel, Math.round(midHeight * 1000)); + var path = new PathNode(svgLabel, pathStr); + var width = (viewBoxWidth / 1000).toFixed(3) + "em"; + var height = (viewBoxHeight / 1000).toFixed(3) + "em"; + var svg = new SvgNode([path], { + "width": width, + "height": height, + "viewBox": "0 0 " + viewBoxWidth + " " + viewBoxHeight + }); + var wrapper = buildCommon.makeSvgSpan([], [svg], options); + wrapper.height = viewBoxHeight / 1000; + wrapper.style.width = width; + wrapper.style.height = height; + stack.push({ + type: "elem", + elem: wrapper + }); + } else { + // Stack glyphs + // Start by adding the bottom symbol + stack.push(makeGlyphSpan(bottom, font, mode)); + stack.push(lap); // overlap + + if (middle === null) { + // The middle section will be an SVG. Make it an extra 0.016em tall. + // We'll overlap by 0.008em at top and bottom. + var innerHeight = realHeightTotal - topHeightTotal - bottomHeightTotal + 2 * lapInEms; + stack.push(makeInner(repeat, innerHeight, options)); + } else { + // When there is a middle bit, we need the middle part and two repeated + // sections + var _innerHeight = (realHeightTotal - topHeightTotal - bottomHeightTotal - middleHeightTotal) / 2 + 2 * lapInEms; + + stack.push(makeInner(repeat, _innerHeight, options)); // Now insert the middle of the brace. + + stack.push(lap); + stack.push(makeGlyphSpan(middle, font, mode)); + stack.push(lap); + stack.push(makeInner(repeat, _innerHeight, options)); + } // Add the top symbol + + + stack.push(lap); + stack.push(makeGlyphSpan(top, font, mode)); + } // Finally, build the vlist + + + var newOptions = options.havingBaseStyle(Style$1.TEXT); + var inner = buildCommon.makeVList({ + positionType: "bottom", + positionData: depth, + children: stack + }, newOptions); + return styleWrap(buildCommon.makeSpan(["delimsizing", "mult"], [inner], newOptions), Style$1.TEXT, options, classes); +}; // All surds have 0.08em padding above the vinculum inside the SVG. +// That keeps browser span height rounding error from pinching the line. + + +var vbPad = 80; // padding above the surd, measured inside the viewBox. + +var emPad = 0.08; // padding, in ems, measured in the document. + +var sqrtSvg = function sqrtSvg(sqrtName, height, viewBoxHeight, extraVinculum, options) { + var path = sqrtPath(sqrtName, extraVinculum, viewBoxHeight); + var pathNode = new PathNode(sqrtName, path); + var svg = new SvgNode([pathNode], { + // Note: 1000:1 ratio of viewBox to document em width. + "width": "400em", + "height": makeEm(height), + "viewBox": "0 0 400000 " + viewBoxHeight, + "preserveAspectRatio": "xMinYMin slice" + }); + return buildCommon.makeSvgSpan(["hide-tail"], [svg], options); +}; +/** + * Make a sqrt image of the given height, + */ + + +var makeSqrtImage = function makeSqrtImage(height, options) { + // Define a newOptions that removes the effect of size changes such as \Huge. + // We don't pick different a height surd for \Huge. For it, we scale up. + var newOptions = options.havingBaseSizing(); // Pick the desired surd glyph from a sequence of surds. + + var delim = traverseSequence("\\surd", height * newOptions.sizeMultiplier, stackLargeDelimiterSequence, newOptions); + var sizeMultiplier = newOptions.sizeMultiplier; // default + // The standard sqrt SVGs each have a 0.04em thick vinculum. + // If Settings.minRuleThickness is larger than that, we add extraVinculum. + + var extraVinculum = Math.max(0, options.minRuleThickness - options.fontMetrics().sqrtRuleThickness); // Create a span containing an SVG image of a sqrt symbol. + + var span; + var spanHeight = 0; + var texHeight = 0; + var viewBoxHeight = 0; + var advanceWidth; // We create viewBoxes with 80 units of "padding" above each surd. + // Then browser rounding error on the parent span height will not + // encroach on the ink of the vinculum. But that padding is not + // included in the TeX-like `height` used for calculation of + // vertical alignment. So texHeight = span.height < span.style.height. + + if (delim.type === "small") { + // Get an SVG that is derived from glyph U+221A in font KaTeX-Main. + // 1000 unit normal glyph height. + viewBoxHeight = 1000 + 1000 * extraVinculum + vbPad; + + if (height < 1.0) { + sizeMultiplier = 1.0; // mimic a \textfont radical + } else if (height < 1.4) { + sizeMultiplier = 0.7; // mimic a \scriptfont radical + } + + spanHeight = (1.0 + extraVinculum + emPad) / sizeMultiplier; + texHeight = (1.00 + extraVinculum) / sizeMultiplier; + span = sqrtSvg("sqrtMain", spanHeight, viewBoxHeight, extraVinculum, options); + span.style.minWidth = "0.853em"; + advanceWidth = 0.833 / sizeMultiplier; // from the font. + } else if (delim.type === "large") { + // These SVGs come from fonts: KaTeX_Size1, _Size2, etc. + viewBoxHeight = (1000 + vbPad) * sizeToMaxHeight[delim.size]; + texHeight = (sizeToMaxHeight[delim.size] + extraVinculum) / sizeMultiplier; + spanHeight = (sizeToMaxHeight[delim.size] + extraVinculum + emPad) / sizeMultiplier; + span = sqrtSvg("sqrtSize" + delim.size, spanHeight, viewBoxHeight, extraVinculum, options); + span.style.minWidth = "1.02em"; + advanceWidth = 1.0 / sizeMultiplier; // 1.0 from the font. + } else { + // Tall sqrt. In TeX, this would be stacked using multiple glyphs. + // We'll use a single SVG to accomplish the same thing. + spanHeight = height + extraVinculum + emPad; + texHeight = height + extraVinculum; + viewBoxHeight = Math.floor(1000 * height + extraVinculum) + vbPad; + span = sqrtSvg("sqrtTall", spanHeight, viewBoxHeight, extraVinculum, options); + span.style.minWidth = "0.742em"; + advanceWidth = 1.056; + } + + span.height = texHeight; + span.style.height = makeEm(spanHeight); + return { + span, + advanceWidth, + // Calculate the actual line width. + // This actually should depend on the chosen font -- e.g. \boldmath + // should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and + // have thicker rules. + ruleWidth: (options.fontMetrics().sqrtRuleThickness + extraVinculum) * sizeMultiplier + }; +}; // There are three kinds of delimiters, delimiters that stack when they become +// too large + + +var stackLargeDelimiters = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "\u230a", "\u230b", "\\lceil", "\\rceil", "\u2308", "\u2309", "\\surd"]; // delimiters that always stack + +var stackAlwaysDelimiters = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "\u27ee", "\u27ef", "\\lmoustache", "\\rmoustache", "\u23b0", "\u23b1"]; // and delimiters that never stack + +var stackNeverDelimiters = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"]; // Metrics of the different sizes. Found by looking at TeX's output of +// $\bigl| // \Bigl| \biggl| \Biggl| \showlists$ +// Used to create stacked delimiters of appropriate sizes in makeSizedDelim. + +var sizeToMaxHeight = [0, 1.2, 1.8, 2.4, 3.0]; +/** + * Used to create a delimiter of a specific size, where `size` is 1, 2, 3, or 4. + */ + +var makeSizedDelim = function makeSizedDelim(delim, size, options, mode, classes) { + // < and > turn into \langle and \rangle in delimiters + if (delim === "<" || delim === "\\lt" || delim === "\u27e8") { + delim = "\\langle"; + } else if (delim === ">" || delim === "\\gt" || delim === "\u27e9") { + delim = "\\rangle"; + } // Sized delimiters are never centered. + + + if (utils.contains(stackLargeDelimiters, delim) || utils.contains(stackNeverDelimiters, delim)) { + return makeLargeDelim(delim, size, false, options, mode, classes); + } else if (utils.contains(stackAlwaysDelimiters, delim)) { + return makeStackedDelim(delim, sizeToMaxHeight[size], false, options, mode, classes); + } else { + throw new ParseError("Illegal delimiter: '" + delim + "'"); + } +}; +/** + * There are three different sequences of delimiter sizes that the delimiters + * follow depending on the kind of delimiter. This is used when creating custom + * sized delimiters to decide whether to create a small, large, or stacked + * delimiter. + * + * In real TeX, these sequences aren't explicitly defined, but are instead + * defined inside the font metrics. Since there are only three sequences that + * are possible for the delimiters that TeX defines, it is easier to just encode + * them explicitly here. + */ + + +// Delimiters that never stack try small delimiters and large delimiters only +var stackNeverDelimiterSequence = [{ + type: "small", + style: Style$1.SCRIPTSCRIPT +}, { + type: "small", + style: Style$1.SCRIPT +}, { + type: "small", + style: Style$1.TEXT +}, { + type: "large", + size: 1 +}, { + type: "large", + size: 2 +}, { + type: "large", + size: 3 +}, { + type: "large", + size: 4 +}]; // Delimiters that always stack try the small delimiters first, then stack + +var stackAlwaysDelimiterSequence = [{ + type: "small", + style: Style$1.SCRIPTSCRIPT +}, { + type: "small", + style: Style$1.SCRIPT +}, { + type: "small", + style: Style$1.TEXT +}, { + type: "stack" +}]; // Delimiters that stack when large try the small and then large delimiters, and +// stack afterwards + +var stackLargeDelimiterSequence = [{ + type: "small", + style: Style$1.SCRIPTSCRIPT +}, { + type: "small", + style: Style$1.SCRIPT +}, { + type: "small", + style: Style$1.TEXT +}, { + type: "large", + size: 1 +}, { + type: "large", + size: 2 +}, { + type: "large", + size: 3 +}, { + type: "large", + size: 4 +}, { + type: "stack" +}]; +/** + * Get the font used in a delimiter based on what kind of delimiter it is. + * TODO(#963) Use more specific font family return type once that is introduced. + */ + +var delimTypeToFont = function delimTypeToFont(type) { + if (type.type === "small") { + return "Main-Regular"; + } else if (type.type === "large") { + return "Size" + type.size + "-Regular"; + } else if (type.type === "stack") { + return "Size4-Regular"; + } else { + throw new Error("Add support for delim type '" + type.type + "' here."); + } +}; +/** + * Traverse a sequence of types of delimiters to decide what kind of delimiter + * should be used to create a delimiter of the given height+depth. + */ + + +var traverseSequence = function traverseSequence(delim, height, sequence, options) { + // Here, we choose the index we should start at in the sequences. In smaller + // sizes (which correspond to larger numbers in style.size) we start earlier + // in the sequence. Thus, scriptscript starts at index 3-3=0, script starts + // at index 3-2=1, text starts at 3-1=2, and display starts at min(2,3-0)=2 + var start = Math.min(2, 3 - options.style.size); + + for (var i = start; i < sequence.length; i++) { + if (sequence[i].type === "stack") { + // This is always the last delimiter, so we just break the loop now. + break; + } + + var metrics = getMetrics(delim, delimTypeToFont(sequence[i]), "math"); + var heightDepth = metrics.height + metrics.depth; // Small delimiters are scaled down versions of the same font, so we + // account for the style change size. + + if (sequence[i].type === "small") { + var newOptions = options.havingBaseStyle(sequence[i].style); + heightDepth *= newOptions.sizeMultiplier; + } // Check if the delimiter at this size works for the given height. + + + if (heightDepth > height) { + return sequence[i]; + } + } // If we reached the end of the sequence, return the last sequence element. + + + return sequence[sequence.length - 1]; +}; +/** + * Make a delimiter of a given height+depth, with optional centering. Here, we + * traverse the sequences, and create a delimiter that the sequence tells us to. + */ + + +var makeCustomSizedDelim = function makeCustomSizedDelim(delim, height, center, options, mode, classes) { + if (delim === "<" || delim === "\\lt" || delim === "\u27e8") { + delim = "\\langle"; + } else if (delim === ">" || delim === "\\gt" || delim === "\u27e9") { + delim = "\\rangle"; + } // Decide what sequence to use + + + var sequence; + + if (utils.contains(stackNeverDelimiters, delim)) { + sequence = stackNeverDelimiterSequence; + } else if (utils.contains(stackLargeDelimiters, delim)) { + sequence = stackLargeDelimiterSequence; + } else { + sequence = stackAlwaysDelimiterSequence; + } // Look through the sequence + + + var delimType = traverseSequence(delim, height, sequence, options); // Get the delimiter from font glyphs. + // Depending on the sequence element we decided on, call the + // appropriate function. + + if (delimType.type === "small") { + return makeSmallDelim(delim, delimType.style, center, options, mode, classes); + } else if (delimType.type === "large") { + return makeLargeDelim(delim, delimType.size, center, options, mode, classes); + } else + /* if (delimType.type === "stack") */ + { + return makeStackedDelim(delim, height, center, options, mode, classes); + } +}; +/** + * Make a delimiter for use with `\left` and `\right`, given a height and depth + * of an expression that the delimiters surround. + */ + + +var makeLeftRightDelim = function makeLeftRightDelim(delim, height, depth, options, mode, classes) { + // We always center \left/\right delimiters, so the axis is always shifted + var axisHeight = options.fontMetrics().axisHeight * options.sizeMultiplier; // Taken from TeX source, tex.web, function make_left_right + + var delimiterFactor = 901; + var delimiterExtend = 5.0 / options.fontMetrics().ptPerEm; + var maxDistFromAxis = Math.max(height - axisHeight, depth + axisHeight); + var totalHeight = Math.max( // In real TeX, calculations are done using integral values which are + // 65536 per pt, or 655360 per em. So, the division here truncates in + // TeX but doesn't here, producing different results. If we wanted to + // exactly match TeX's calculation, we could do + // Math.floor(655360 * maxDistFromAxis / 500) * + // delimiterFactor / 655360 + // (To see the difference, compare + // x^{x^{\left(\rule{0.1em}{0.68em}\right)}} + // in TeX and KaTeX) + maxDistFromAxis / 500 * delimiterFactor, 2 * maxDistFromAxis - delimiterExtend); // Finally, we defer to `makeCustomSizedDelim` with our calculated total + // height + + return makeCustomSizedDelim(delim, totalHeight, true, options, mode, classes); +}; + +var delimiter = { + sqrtImage: makeSqrtImage, + sizedDelim: makeSizedDelim, + sizeToMaxHeight: sizeToMaxHeight, + customSizedDelim: makeCustomSizedDelim, + leftRightDelim: makeLeftRightDelim +}; + +// Extra data needed for the delimiter handler down below +var delimiterSizes = { + "\\bigl": { + mclass: "mopen", + size: 1 + }, + "\\Bigl": { + mclass: "mopen", + size: 2 + }, + "\\biggl": { + mclass: "mopen", + size: 3 + }, + "\\Biggl": { + mclass: "mopen", + size: 4 + }, + "\\bigr": { + mclass: "mclose", + size: 1 + }, + "\\Bigr": { + mclass: "mclose", + size: 2 + }, + "\\biggr": { + mclass: "mclose", + size: 3 + }, + "\\Biggr": { + mclass: "mclose", + size: 4 + }, + "\\bigm": { + mclass: "mrel", + size: 1 + }, + "\\Bigm": { + mclass: "mrel", + size: 2 + }, + "\\biggm": { + mclass: "mrel", + size: 3 + }, + "\\Biggm": { + mclass: "mrel", + size: 4 + }, + "\\big": { + mclass: "mord", + size: 1 + }, + "\\Big": { + mclass: "mord", + size: 2 + }, + "\\bigg": { + mclass: "mord", + size: 3 + }, + "\\Bigg": { + mclass: "mord", + size: 4 + } +}; +var delimiters = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "\u230a", "\u230b", "\\lceil", "\\rceil", "\u2308", "\u2309", "<", ">", "\\langle", "\u27e8", "\\rangle", "\u27e9", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "\u27ee", "\u27ef", "\\lmoustache", "\\rmoustache", "\u23b0", "\u23b1", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."]; + +// Delimiter functions +function checkDelimiter(delim, context) { + var symDelim = checkSymbolNodeType(delim); + + if (symDelim && utils.contains(delimiters, symDelim.text)) { + return symDelim; + } else if (symDelim) { + throw new ParseError("Invalid delimiter '" + symDelim.text + "' after '" + context.funcName + "'", delim); + } else { + throw new ParseError("Invalid delimiter type '" + delim.type + "'", delim); + } +} + +defineFunction({ + type: "delimsizing", + names: ["\\bigl", "\\Bigl", "\\biggl", "\\Biggl", "\\bigr", "\\Bigr", "\\biggr", "\\Biggr", "\\bigm", "\\Bigm", "\\biggm", "\\Biggm", "\\big", "\\Big", "\\bigg", "\\Bigg"], + props: { + numArgs: 1, + argTypes: ["primitive"] + }, + handler: (context, args) => { + var delim = checkDelimiter(args[0], context); + return { + type: "delimsizing", + mode: context.parser.mode, + size: delimiterSizes[context.funcName].size, + mclass: delimiterSizes[context.funcName].mclass, + delim: delim.text + }; + }, + htmlBuilder: (group, options) => { + if (group.delim === ".") { + // Empty delimiters still count as elements, even though they don't + // show anything. + return buildCommon.makeSpan([group.mclass]); + } // Use delimiter.sizedDelim to generate the delimiter. + + + return delimiter.sizedDelim(group.delim, group.size, options, group.mode, [group.mclass]); + }, + mathmlBuilder: group => { + var children = []; + + if (group.delim !== ".") { + children.push(makeText(group.delim, group.mode)); + } + + var node = new mathMLTree.MathNode("mo", children); + + if (group.mclass === "mopen" || group.mclass === "mclose") { + // Only some of the delimsizing functions act as fences, and they + // return "mopen" or "mclose" mclass. + node.setAttribute("fence", "true"); + } else { + // Explicitly disable fencing if it's not a fence, to override the + // defaults. + node.setAttribute("fence", "false"); + } + + node.setAttribute("stretchy", "true"); + var size = makeEm(delimiter.sizeToMaxHeight[group.size]); + node.setAttribute("minsize", size); + node.setAttribute("maxsize", size); + return node; + } +}); + +function assertParsed(group) { + if (!group.body) { + throw new Error("Bug: The leftright ParseNode wasn't fully parsed."); + } +} + +defineFunction({ + type: "leftright-right", + names: ["\\right"], + props: { + numArgs: 1, + primitive: true + }, + handler: (context, args) => { + // \left case below triggers parsing of \right in + // `const right = parser.parseFunction();` + // uses this return value. + var color = context.parser.gullet.macros.get("\\current@color"); + + if (color && typeof color !== "string") { + throw new ParseError("\\current@color set to non-string in \\right"); + } + + return { + type: "leftright-right", + mode: context.parser.mode, + delim: checkDelimiter(args[0], context).text, + color // undefined if not set via \color + + }; + } +}); +defineFunction({ + type: "leftright", + names: ["\\left"], + props: { + numArgs: 1, + primitive: true + }, + handler: (context, args) => { + var delim = checkDelimiter(args[0], context); + var parser = context.parser; // Parse out the implicit body + + ++parser.leftrightDepth; // parseExpression stops before '\\right' + + var body = parser.parseExpression(false); + --parser.leftrightDepth; // Check the next token + + parser.expect("\\right", false); + var right = assertNodeType(parser.parseFunction(), "leftright-right"); + return { + type: "leftright", + mode: parser.mode, + body, + left: delim.text, + right: right.delim, + rightColor: right.color + }; + }, + htmlBuilder: (group, options) => { + assertParsed(group); // Build the inner expression + + var inner = buildExpression$1(group.body, options, true, ["mopen", "mclose"]); + var innerHeight = 0; + var innerDepth = 0; + var hadMiddle = false; // Calculate its height and depth + + for (var i = 0; i < inner.length; i++) { + // Property `isMiddle` not defined on `span`. See comment in + // "middle"'s htmlBuilder. + // $FlowFixMe + if (inner[i].isMiddle) { + hadMiddle = true; + } else { + innerHeight = Math.max(inner[i].height, innerHeight); + innerDepth = Math.max(inner[i].depth, innerDepth); + } + } // The size of delimiters is the same, regardless of what style we are + // in. Thus, to correctly calculate the size of delimiter we need around + // a group, we scale down the inner size based on the size. + + + innerHeight *= options.sizeMultiplier; + innerDepth *= options.sizeMultiplier; + var leftDelim; + + if (group.left === ".") { + // Empty delimiters in \left and \right make null delimiter spaces. + leftDelim = makeNullDelimiter(options, ["mopen"]); + } else { + // Otherwise, use leftRightDelim to generate the correct sized + // delimiter. + leftDelim = delimiter.leftRightDelim(group.left, innerHeight, innerDepth, options, group.mode, ["mopen"]); + } // Add it to the beginning of the expression + + + inner.unshift(leftDelim); // Handle middle delimiters + + if (hadMiddle) { + for (var _i = 1; _i < inner.length; _i++) { + var middleDelim = inner[_i]; // Property `isMiddle` not defined on `span`. See comment in + // "middle"'s htmlBuilder. + // $FlowFixMe + + var isMiddle = middleDelim.isMiddle; + + if (isMiddle) { + // Apply the options that were active when \middle was called + inner[_i] = delimiter.leftRightDelim(isMiddle.delim, innerHeight, innerDepth, isMiddle.options, group.mode, []); + } + } + } + + var rightDelim; // Same for the right delimiter, but using color specified by \color + + if (group.right === ".") { + rightDelim = makeNullDelimiter(options, ["mclose"]); + } else { + var colorOptions = group.rightColor ? options.withColor(group.rightColor) : options; + rightDelim = delimiter.leftRightDelim(group.right, innerHeight, innerDepth, colorOptions, group.mode, ["mclose"]); + } // Add it to the end of the expression. + + + inner.push(rightDelim); + return buildCommon.makeSpan(["minner"], inner, options); + }, + mathmlBuilder: (group, options) => { + assertParsed(group); + var inner = buildExpression(group.body, options); + + if (group.left !== ".") { + var leftNode = new mathMLTree.MathNode("mo", [makeText(group.left, group.mode)]); + leftNode.setAttribute("fence", "true"); + inner.unshift(leftNode); + } + + if (group.right !== ".") { + var rightNode = new mathMLTree.MathNode("mo", [makeText(group.right, group.mode)]); + rightNode.setAttribute("fence", "true"); + + if (group.rightColor) { + rightNode.setAttribute("mathcolor", group.rightColor); + } + + inner.push(rightNode); + } + + return makeRow(inner); + } +}); +defineFunction({ + type: "middle", + names: ["\\middle"], + props: { + numArgs: 1, + primitive: true + }, + handler: (context, args) => { + var delim = checkDelimiter(args[0], context); + + if (!context.parser.leftrightDepth) { + throw new ParseError("\\middle without preceding \\left", delim); + } + + return { + type: "middle", + mode: context.parser.mode, + delim: delim.text + }; + }, + htmlBuilder: (group, options) => { + var middleDelim; + + if (group.delim === ".") { + middleDelim = makeNullDelimiter(options, []); + } else { + middleDelim = delimiter.sizedDelim(group.delim, 1, options, group.mode, []); + var isMiddle = { + delim: group.delim, + options + }; // Property `isMiddle` not defined on `span`. It is only used in + // this file above. + // TODO: Fix this violation of the `span` type and possibly rename + // things since `isMiddle` sounds like a boolean, but is a struct. + // $FlowFixMe + + middleDelim.isMiddle = isMiddle; + } + + return middleDelim; + }, + mathmlBuilder: (group, options) => { + // A Firefox \middle will stretch a character vertically only if it + // is in the fence part of the operator dictionary at: + // https://www.w3.org/TR/MathML3/appendixc.html. + // So we need to avoid U+2223 and use plain "|" instead. + var textNode = group.delim === "\\vert" || group.delim === "|" ? makeText("|", "text") : makeText(group.delim, group.mode); + var middleNode = new mathMLTree.MathNode("mo", [textNode]); + middleNode.setAttribute("fence", "true"); // MathML gives 5/18em spacing to each element. + // \middle should get delimiter spacing instead. + + middleNode.setAttribute("lspace", "0.05em"); + middleNode.setAttribute("rspace", "0.05em"); + return middleNode; + } +}); + +var htmlBuilder$7 = (group, options) => { + // \cancel, \bcancel, \xcancel, \sout, \fbox, \colorbox, \fcolorbox, \phase + // Some groups can return document fragments. Handle those by wrapping + // them in a span. + var inner = buildCommon.wrapFragment(buildGroup$1(group.body, options), options); + var label = group.label.slice(1); + var scale = options.sizeMultiplier; + var img; + var imgShift = 0; // In the LaTeX cancel package, line geometry is slightly different + // depending on whether the subject is wider than it is tall, or vice versa. + // We don't know the width of a group, so as a proxy, we test if + // the subject is a single character. This captures most of the + // subjects that should get the "tall" treatment. + + var isSingleChar = utils.isCharacterBox(group.body); + + if (label === "sout") { + img = buildCommon.makeSpan(["stretchy", "sout"]); + img.height = options.fontMetrics().defaultRuleThickness / scale; + imgShift = -0.5 * options.fontMetrics().xHeight; + } else if (label === "phase") { + // Set a couple of dimensions from the steinmetz package. + var lineWeight = calculateSize({ + number: 0.6, + unit: "pt" + }, options); + var clearance = calculateSize({ + number: 0.35, + unit: "ex" + }, options); // Prevent size changes like \Huge from affecting line thickness + + var newOptions = options.havingBaseSizing(); + scale = scale / newOptions.sizeMultiplier; + var angleHeight = inner.height + inner.depth + lineWeight + clearance; // Reserve a left pad for the angle. + + inner.style.paddingLeft = makeEm(angleHeight / 2 + lineWeight); // Create an SVG + + var viewBoxHeight = Math.floor(1000 * angleHeight * scale); + var path = phasePath(viewBoxHeight); + var svgNode = new SvgNode([new PathNode("phase", path)], { + "width": "400em", + "height": makeEm(viewBoxHeight / 1000), + "viewBox": "0 0 400000 " + viewBoxHeight, + "preserveAspectRatio": "xMinYMin slice" + }); // Wrap it in a span with overflow: hidden. + + img = buildCommon.makeSvgSpan(["hide-tail"], [svgNode], options); + img.style.height = makeEm(angleHeight); + imgShift = inner.depth + lineWeight + clearance; + } else { + // Add horizontal padding + if (/cancel/.test(label)) { + if (!isSingleChar) { + inner.classes.push("cancel-pad"); + } + } else if (label === "angl") { + inner.classes.push("anglpad"); + } else { + inner.classes.push("boxpad"); + } // Add vertical padding + + + var topPad = 0; + var bottomPad = 0; + var ruleThickness = 0; // ref: cancel package: \advance\totalheight2\p@ % "+2" + + if (/box/.test(label)) { + ruleThickness = Math.max(options.fontMetrics().fboxrule, // default + options.minRuleThickness // User override. + ); + topPad = options.fontMetrics().fboxsep + (label === "colorbox" ? 0 : ruleThickness); + bottomPad = topPad; + } else if (label === "angl") { + ruleThickness = Math.max(options.fontMetrics().defaultRuleThickness, options.minRuleThickness); + topPad = 4 * ruleThickness; // gap = 3 × line, plus the line itself. + + bottomPad = Math.max(0, 0.25 - inner.depth); + } else { + topPad = isSingleChar ? 0.2 : 0; + bottomPad = topPad; + } + + img = stretchy.encloseSpan(inner, label, topPad, bottomPad, options); + + if (/fbox|boxed|fcolorbox/.test(label)) { + img.style.borderStyle = "solid"; + img.style.borderWidth = makeEm(ruleThickness); + } else if (label === "angl" && ruleThickness !== 0.049) { + img.style.borderTopWidth = makeEm(ruleThickness); + img.style.borderRightWidth = makeEm(ruleThickness); + } + + imgShift = inner.depth + bottomPad; + + if (group.backgroundColor) { + img.style.backgroundColor = group.backgroundColor; + + if (group.borderColor) { + img.style.borderColor = group.borderColor; + } + } + } + + var vlist; + + if (group.backgroundColor) { + vlist = buildCommon.makeVList({ + positionType: "individualShift", + children: [// Put the color background behind inner; + { + type: "elem", + elem: img, + shift: imgShift + }, { + type: "elem", + elem: inner, + shift: 0 + }] + }, options); + } else { + var classes = /cancel|phase/.test(label) ? ["svg-align"] : []; + vlist = buildCommon.makeVList({ + positionType: "individualShift", + children: [// Write the \cancel stroke on top of inner. + { + type: "elem", + elem: inner, + shift: 0 + }, { + type: "elem", + elem: img, + shift: imgShift, + wrapperClasses: classes + }] + }, options); + } + + if (/cancel/.test(label)) { + // The cancel package documentation says that cancel lines add their height + // to the expression, but tests show that isn't how it actually works. + vlist.height = inner.height; + vlist.depth = inner.depth; + } + + if (/cancel/.test(label) && !isSingleChar) { + // cancel does not create horiz space for its line extension. + return buildCommon.makeSpan(["mord", "cancel-lap"], [vlist], options); + } else { + return buildCommon.makeSpan(["mord"], [vlist], options); + } +}; + +var mathmlBuilder$6 = (group, options) => { + var fboxsep = 0; + var node = new mathMLTree.MathNode(group.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [buildGroup(group.body, options)]); + + switch (group.label) { + case "\\cancel": + node.setAttribute("notation", "updiagonalstrike"); + break; + + case "\\bcancel": + node.setAttribute("notation", "downdiagonalstrike"); + break; + + case "\\phase": + node.setAttribute("notation", "phasorangle"); + break; + + case "\\sout": + node.setAttribute("notation", "horizontalstrike"); + break; + + case "\\fbox": + node.setAttribute("notation", "box"); + break; + + case "\\angl": + node.setAttribute("notation", "actuarial"); + break; + + case "\\fcolorbox": + case "\\colorbox": + // doesn't have a good notation option. So use + // instead. Set some attributes that come included with . + fboxsep = options.fontMetrics().fboxsep * options.fontMetrics().ptPerEm; + node.setAttribute("width", "+" + 2 * fboxsep + "pt"); + node.setAttribute("height", "+" + 2 * fboxsep + "pt"); + node.setAttribute("lspace", fboxsep + "pt"); // + + node.setAttribute("voffset", fboxsep + "pt"); + + if (group.label === "\\fcolorbox") { + var thk = Math.max(options.fontMetrics().fboxrule, // default + options.minRuleThickness // user override + ); + node.setAttribute("style", "border: " + thk + "em solid " + String(group.borderColor)); + } + + break; + + case "\\xcancel": + node.setAttribute("notation", "updiagonalstrike downdiagonalstrike"); + break; + } + + if (group.backgroundColor) { + node.setAttribute("mathbackground", group.backgroundColor); + } + + return node; +}; + +defineFunction({ + type: "enclose", + names: ["\\colorbox"], + props: { + numArgs: 2, + allowedInText: true, + argTypes: ["color", "text"] + }, + + handler(_ref, args, optArgs) { + var { + parser, + funcName + } = _ref; + var color = assertNodeType(args[0], "color-token").color; + var body = args[1]; + return { + type: "enclose", + mode: parser.mode, + label: funcName, + backgroundColor: color, + body + }; + }, + + htmlBuilder: htmlBuilder$7, + mathmlBuilder: mathmlBuilder$6 +}); +defineFunction({ + type: "enclose", + names: ["\\fcolorbox"], + props: { + numArgs: 3, + allowedInText: true, + argTypes: ["color", "color", "text"] + }, + + handler(_ref2, args, optArgs) { + var { + parser, + funcName + } = _ref2; + var borderColor = assertNodeType(args[0], "color-token").color; + var backgroundColor = assertNodeType(args[1], "color-token").color; + var body = args[2]; + return { + type: "enclose", + mode: parser.mode, + label: funcName, + backgroundColor, + borderColor, + body + }; + }, + + htmlBuilder: htmlBuilder$7, + mathmlBuilder: mathmlBuilder$6 +}); +defineFunction({ + type: "enclose", + names: ["\\fbox"], + props: { + numArgs: 1, + argTypes: ["hbox"], + allowedInText: true + }, + + handler(_ref3, args) { + var { + parser + } = _ref3; + return { + type: "enclose", + mode: parser.mode, + label: "\\fbox", + body: args[0] + }; + } + +}); +defineFunction({ + type: "enclose", + names: ["\\cancel", "\\bcancel", "\\xcancel", "\\sout", "\\phase"], + props: { + numArgs: 1 + }, + + handler(_ref4, args) { + var { + parser, + funcName + } = _ref4; + var body = args[0]; + return { + type: "enclose", + mode: parser.mode, + label: funcName, + body + }; + }, + + htmlBuilder: htmlBuilder$7, + mathmlBuilder: mathmlBuilder$6 +}); +defineFunction({ + type: "enclose", + names: ["\\angl"], + props: { + numArgs: 1, + argTypes: ["hbox"], + allowedInText: false + }, + + handler(_ref5, args) { + var { + parser + } = _ref5; + return { + type: "enclose", + mode: parser.mode, + label: "\\angl", + body: args[0] + }; + } + +}); + +/** + * All registered environments. + * `environments.js` exports this same dictionary again and makes it public. + * `Parser.js` requires this dictionary via `environments.js`. + */ +var _environments = {}; +function defineEnvironment(_ref) { + var { + type, + names, + props, + handler, + htmlBuilder, + mathmlBuilder + } = _ref; + // Set default values of environments. + var data = { + type, + numArgs: props.numArgs || 0, + allowedInText: false, + numOptionalArgs: 0, + handler + }; + + for (var i = 0; i < names.length; ++i) { + // TODO: The value type of _environments should be a type union of all + // possible `EnvSpec<>` possibilities instead of `EnvSpec<*>`, which is + // an existential type. + _environments[names[i]] = data; + } + + if (htmlBuilder) { + _htmlGroupBuilders[type] = htmlBuilder; + } + + if (mathmlBuilder) { + _mathmlGroupBuilders[type] = mathmlBuilder; + } +} + +/** + * All registered global/built-in macros. + * `macros.js` exports this same dictionary again and makes it public. + * `Parser.js` requires this dictionary via `macros.js`. + */ +var _macros = {}; // This function might one day accept an additional argument and do more things. + +function defineMacro(name, body) { + _macros[name] = body; +} + +// Helper functions +function getHLines(parser) { + // Return an array. The array length = number of hlines. + // Each element in the array tells if the line is dashed. + var hlineInfo = []; + parser.consumeSpaces(); + var nxt = parser.fetch().text; + + if (nxt === "\\relax") { + // \relax is an artifact of the \cr macro below + parser.consume(); + parser.consumeSpaces(); + nxt = parser.fetch().text; + } + + while (nxt === "\\hline" || nxt === "\\hdashline") { + parser.consume(); + hlineInfo.push(nxt === "\\hdashline"); + parser.consumeSpaces(); + nxt = parser.fetch().text; + } + + return hlineInfo; +} + +var validateAmsEnvironmentContext = context => { + var settings = context.parser.settings; + + if (!settings.displayMode) { + throw new ParseError("{" + context.envName + "} can be used only in" + " display mode."); + } +}; // autoTag (an argument to parseArray) can be one of three values: +// * undefined: Regular (not-top-level) array; no tags on each row +// * true: Automatic equation numbering, overridable by \tag +// * false: Tags allowed on each row, but no automatic numbering +// This function *doesn't* work with the "split" environment name. + + +function getAutoTag(name) { + if (name.indexOf("ed") === -1) { + return name.indexOf("*") === -1; + } // return undefined; + +} +/** + * Parse the body of the environment, with rows delimited by \\ and + * columns delimited by &, and create a nested list in row-major order + * with one group per cell. If given an optional argument style + * ("text", "display", etc.), then each cell is cast into that style. + */ + + +function parseArray(parser, _ref, style) { + var { + hskipBeforeAndAfter, + addJot, + cols, + arraystretch, + colSeparationType, + autoTag, + singleRow, + emptySingleRow, + maxNumCols, + leqno + } = _ref; + parser.gullet.beginGroup(); + + if (!singleRow) { + // \cr is equivalent to \\ without the optional size argument (see below) + // TODO: provide helpful error when \cr is used outside array environment + parser.gullet.macros.set("\\cr", "\\\\\\relax"); + } // Get current arraystretch if it's not set by the environment + + + if (!arraystretch) { + var stretch = parser.gullet.expandMacroAsText("\\arraystretch"); + + if (stretch == null) { + // Default \arraystretch from lttab.dtx + arraystretch = 1; + } else { + arraystretch = parseFloat(stretch); + + if (!arraystretch || arraystretch < 0) { + throw new ParseError("Invalid \\arraystretch: " + stretch); + } + } + } // Start group for first cell + + + parser.gullet.beginGroup(); + var row = []; + var body = [row]; + var rowGaps = []; + var hLinesBeforeRow = []; + var tags = autoTag != null ? [] : undefined; // amsmath uses \global\@eqnswtrue and \global\@eqnswfalse to represent + // whether this row should have an equation number. Simulate this with + // a \@eqnsw macro set to 1 or 0. + + function beginRow() { + if (autoTag) { + parser.gullet.macros.set("\\@eqnsw", "1", true); + } + } + + function endRow() { + if (tags) { + if (parser.gullet.macros.get("\\df@tag")) { + tags.push(parser.subparse([new Token("\\df@tag")])); + parser.gullet.macros.set("\\df@tag", undefined, true); + } else { + tags.push(Boolean(autoTag) && parser.gullet.macros.get("\\@eqnsw") === "1"); + } + } + } + + beginRow(); // Test for \hline at the top of the array. + + hLinesBeforeRow.push(getHLines(parser)); + + while (true) { + // eslint-disable-line no-constant-condition + // Parse each cell in its own group (namespace) + var cell = parser.parseExpression(false, singleRow ? "\\end" : "\\\\"); + parser.gullet.endGroup(); + parser.gullet.beginGroup(); + cell = { + type: "ordgroup", + mode: parser.mode, + body: cell + }; + + if (style) { + cell = { + type: "styling", + mode: parser.mode, + style, + body: [cell] + }; + } + + row.push(cell); + var next = parser.fetch().text; + + if (next === "&") { + if (maxNumCols && row.length === maxNumCols) { + if (singleRow || colSeparationType) { + // {equation} or {split} + throw new ParseError("Too many tab characters: &", parser.nextToken); + } else { + // {array} environment + parser.settings.reportNonstrict("textEnv", "Too few columns " + "specified in the {array} column argument."); + } + } + + parser.consume(); + } else if (next === "\\end") { + endRow(); // Arrays terminate newlines with `\crcr` which consumes a `\cr` if + // the last line is empty. However, AMS environments keep the + // empty row if it's the only one. + // NOTE: Currently, `cell` is the last item added into `row`. + + if (row.length === 1 && cell.type === "styling" && cell.body[0].body.length === 0 && (body.length > 1 || !emptySingleRow)) { + body.pop(); + } + + if (hLinesBeforeRow.length < body.length + 1) { + hLinesBeforeRow.push([]); + } + + break; + } else if (next === "\\\\") { + parser.consume(); + var size = void 0; // \def\Let@{\let\\\math@cr} + // \def\math@cr{...\math@cr@} + // \def\math@cr@{\new@ifnextchar[\math@cr@@{\math@cr@@[\z@]}} + // \def\math@cr@@[#1]{...\math@cr@@@...} + // \def\math@cr@@@{\cr} + + if (parser.gullet.future().text !== " ") { + size = parser.parseSizeGroup(true); + } + + rowGaps.push(size ? size.value : null); + endRow(); // check for \hline(s) following the row separator + + hLinesBeforeRow.push(getHLines(parser)); + row = []; + body.push(row); + beginRow(); + } else { + throw new ParseError("Expected & or \\\\ or \\cr or \\end", parser.nextToken); + } + } // End cell group + + + parser.gullet.endGroup(); // End array group defining \cr + + parser.gullet.endGroup(); + return { + type: "array", + mode: parser.mode, + addJot, + arraystretch, + body, + cols, + rowGaps, + hskipBeforeAndAfter, + hLinesBeforeRow, + colSeparationType, + tags, + leqno + }; +} // Decides on a style for cells in an array according to whether the given +// environment name starts with the letter 'd'. + + +function dCellStyle(envName) { + if (envName.slice(0, 1) === "d") { + return "display"; + } else { + return "text"; + } +} + +var htmlBuilder$6 = function htmlBuilder(group, options) { + var r; + var c; + var nr = group.body.length; + var hLinesBeforeRow = group.hLinesBeforeRow; + var nc = 0; + var body = new Array(nr); + var hlines = []; + var ruleThickness = Math.max( // From LaTeX \showthe\arrayrulewidth. Equals 0.04 em. + options.fontMetrics().arrayRuleWidth, options.minRuleThickness // User override. + ); // Horizontal spacing + + var pt = 1 / options.fontMetrics().ptPerEm; + var arraycolsep = 5 * pt; // default value, i.e. \arraycolsep in article.cls + + if (group.colSeparationType && group.colSeparationType === "small") { + // We're in a {smallmatrix}. Default column space is \thickspace, + // i.e. 5/18em = 0.2778em, per amsmath.dtx for {smallmatrix}. + // But that needs adjustment because LaTeX applies \scriptstyle to the + // entire array, including the colspace, but this function applies + // \scriptstyle only inside each element. + var localMultiplier = options.havingStyle(Style$1.SCRIPT).sizeMultiplier; + arraycolsep = 0.2778 * (localMultiplier / options.sizeMultiplier); + } // Vertical spacing + + + var baselineskip = group.colSeparationType === "CD" ? calculateSize({ + number: 3, + unit: "ex" + }, options) : 12 * pt; // see size10.clo + // Default \jot from ltmath.dtx + // TODO(edemaine): allow overriding \jot via \setlength (#687) + + var jot = 3 * pt; + var arrayskip = group.arraystretch * baselineskip; + var arstrutHeight = 0.7 * arrayskip; // \strutbox in ltfsstrc.dtx and + + var arstrutDepth = 0.3 * arrayskip; // \@arstrutbox in lttab.dtx + + var totalHeight = 0; // Set a position for \hline(s) at the top of the array, if any. + + function setHLinePos(hlinesInGap) { + for (var i = 0; i < hlinesInGap.length; ++i) { + if (i > 0) { + totalHeight += 0.25; + } + + hlines.push({ + pos: totalHeight, + isDashed: hlinesInGap[i] + }); + } + } + + setHLinePos(hLinesBeforeRow[0]); + + for (r = 0; r < group.body.length; ++r) { + var inrow = group.body[r]; + var height = arstrutHeight; // \@array adds an \@arstrut + + var depth = arstrutDepth; // to each tow (via the template) + + if (nc < inrow.length) { + nc = inrow.length; + } + + var outrow = new Array(inrow.length); + + for (c = 0; c < inrow.length; ++c) { + var elt = buildGroup$1(inrow[c], options); + + if (depth < elt.depth) { + depth = elt.depth; + } + + if (height < elt.height) { + height = elt.height; + } + + outrow[c] = elt; + } + + var rowGap = group.rowGaps[r]; + var gap = 0; + + if (rowGap) { + gap = calculateSize(rowGap, options); + + if (gap > 0) { + // \@argarraycr + gap += arstrutDepth; + + if (depth < gap) { + depth = gap; // \@xargarraycr + } + + gap = 0; + } + } // In AMS multiline environments such as aligned and gathered, rows + // correspond to lines that have additional \jot added to the + // \baselineskip via \openup. + + + if (group.addJot) { + depth += jot; + } + + outrow.height = height; + outrow.depth = depth; + totalHeight += height; + outrow.pos = totalHeight; + totalHeight += depth + gap; // \@yargarraycr + + body[r] = outrow; // Set a position for \hline(s), if any. + + setHLinePos(hLinesBeforeRow[r + 1]); + } + + var offset = totalHeight / 2 + options.fontMetrics().axisHeight; + var colDescriptions = group.cols || []; + var cols = []; + var colSep; + var colDescrNum; + var tagSpans = []; + + if (group.tags && group.tags.some(tag => tag)) { + // An environment with manual tags and/or automatic equation numbers. + // Create node(s), the latter of which trigger CSS counter increment. + for (r = 0; r < nr; ++r) { + var rw = body[r]; + var shift = rw.pos - offset; + var tag = group.tags[r]; + var tagSpan = void 0; + + if (tag === true) { + // automatic numbering + tagSpan = buildCommon.makeSpan(["eqn-num"], [], options); + } else if (tag === false) { + // \nonumber/\notag or starred environment + tagSpan = buildCommon.makeSpan([], [], options); + } else { + // manual \tag + tagSpan = buildCommon.makeSpan([], buildExpression$1(tag, options, true), options); + } + + tagSpan.depth = rw.depth; + tagSpan.height = rw.height; + tagSpans.push({ + type: "elem", + elem: tagSpan, + shift + }); + } + } + + for (c = 0, colDescrNum = 0; // Continue while either there are more columns or more column + // descriptions, so trailing separators don't get lost. + c < nc || colDescrNum < colDescriptions.length; ++c, ++colDescrNum) { + var colDescr = colDescriptions[colDescrNum] || {}; + var firstSeparator = true; + + while (colDescr.type === "separator") { + // If there is more than one separator in a row, add a space + // between them. + if (!firstSeparator) { + colSep = buildCommon.makeSpan(["arraycolsep"], []); + colSep.style.width = makeEm(options.fontMetrics().doubleRuleSep); + cols.push(colSep); + } + + if (colDescr.separator === "|" || colDescr.separator === ":") { + var lineType = colDescr.separator === "|" ? "solid" : "dashed"; + var separator = buildCommon.makeSpan(["vertical-separator"], [], options); + separator.style.height = makeEm(totalHeight); + separator.style.borderRightWidth = makeEm(ruleThickness); + separator.style.borderRightStyle = lineType; + separator.style.margin = "0 " + makeEm(-ruleThickness / 2); + + var _shift = totalHeight - offset; + + if (_shift) { + separator.style.verticalAlign = makeEm(-_shift); + } + + cols.push(separator); + } else { + throw new ParseError("Invalid separator type: " + colDescr.separator); + } + + colDescrNum++; + colDescr = colDescriptions[colDescrNum] || {}; + firstSeparator = false; + } + + if (c >= nc) { + continue; + } + + var sepwidth = void 0; + + if (c > 0 || group.hskipBeforeAndAfter) { + sepwidth = utils.deflt(colDescr.pregap, arraycolsep); + + if (sepwidth !== 0) { + colSep = buildCommon.makeSpan(["arraycolsep"], []); + colSep.style.width = makeEm(sepwidth); + cols.push(colSep); + } + } + + var col = []; + + for (r = 0; r < nr; ++r) { + var row = body[r]; + var elem = row[c]; + + if (!elem) { + continue; + } + + var _shift2 = row.pos - offset; + + elem.depth = row.depth; + elem.height = row.height; + col.push({ + type: "elem", + elem: elem, + shift: _shift2 + }); + } + + col = buildCommon.makeVList({ + positionType: "individualShift", + children: col + }, options); + col = buildCommon.makeSpan(["col-align-" + (colDescr.align || "c")], [col]); + cols.push(col); + + if (c < nc - 1 || group.hskipBeforeAndAfter) { + sepwidth = utils.deflt(colDescr.postgap, arraycolsep); + + if (sepwidth !== 0) { + colSep = buildCommon.makeSpan(["arraycolsep"], []); + colSep.style.width = makeEm(sepwidth); + cols.push(colSep); + } + } + } + + body = buildCommon.makeSpan(["mtable"], cols); // Add \hline(s), if any. + + if (hlines.length > 0) { + var line = buildCommon.makeLineSpan("hline", options, ruleThickness); + var dashes = buildCommon.makeLineSpan("hdashline", options, ruleThickness); + var vListElems = [{ + type: "elem", + elem: body, + shift: 0 + }]; + + while (hlines.length > 0) { + var hline = hlines.pop(); + var lineShift = hline.pos - offset; + + if (hline.isDashed) { + vListElems.push({ + type: "elem", + elem: dashes, + shift: lineShift + }); + } else { + vListElems.push({ + type: "elem", + elem: line, + shift: lineShift + }); + } + } + + body = buildCommon.makeVList({ + positionType: "individualShift", + children: vListElems + }, options); + } + + if (tagSpans.length === 0) { + return buildCommon.makeSpan(["mord"], [body], options); + } else { + var eqnNumCol = buildCommon.makeVList({ + positionType: "individualShift", + children: tagSpans + }, options); + eqnNumCol = buildCommon.makeSpan(["tag"], [eqnNumCol], options); + return buildCommon.makeFragment([body, eqnNumCol]); + } +}; + +var alignMap = { + c: "center ", + l: "left ", + r: "right " +}; + +var mathmlBuilder$5 = function mathmlBuilder(group, options) { + var tbl = []; + var glue = new mathMLTree.MathNode("mtd", [], ["mtr-glue"]); + var tag = new mathMLTree.MathNode("mtd", [], ["mml-eqn-num"]); + + for (var i = 0; i < group.body.length; i++) { + var rw = group.body[i]; + var row = []; + + for (var j = 0; j < rw.length; j++) { + row.push(new mathMLTree.MathNode("mtd", [buildGroup(rw[j], options)])); + } + + if (group.tags && group.tags[i]) { + row.unshift(glue); + row.push(glue); + + if (group.leqno) { + row.unshift(tag); + } else { + row.push(tag); + } + } + + tbl.push(new mathMLTree.MathNode("mtr", row)); + } + + var table = new mathMLTree.MathNode("mtable", tbl); // Set column alignment, row spacing, column spacing, and + // array lines by setting attributes on the table element. + // Set the row spacing. In MathML, we specify a gap distance. + // We do not use rowGap[] because MathML automatically increases + // cell height with the height/depth of the element content. + // LaTeX \arraystretch multiplies the row baseline-to-baseline distance. + // We simulate this by adding (arraystretch - 1)em to the gap. This + // does a reasonable job of adjusting arrays containing 1 em tall content. + // The 0.16 and 0.09 values are found empirically. They produce an array + // similar to LaTeX and in which content does not interfere with \hlines. + + var gap = group.arraystretch === 0.5 ? 0.1 // {smallmatrix}, {subarray} + : 0.16 + group.arraystretch - 1 + (group.addJot ? 0.09 : 0); + table.setAttribute("rowspacing", makeEm(gap)); // MathML table lines go only between cells. + // To place a line on an edge we'll use , if necessary. + + var menclose = ""; + var align = ""; + + if (group.cols && group.cols.length > 0) { + // Find column alignment, column spacing, and vertical lines. + var cols = group.cols; + var columnLines = ""; + var prevTypeWasAlign = false; + var iStart = 0; + var iEnd = cols.length; + + if (cols[0].type === "separator") { + menclose += "top "; + iStart = 1; + } + + if (cols[cols.length - 1].type === "separator") { + menclose += "bottom "; + iEnd -= 1; + } + + for (var _i = iStart; _i < iEnd; _i++) { + if (cols[_i].type === "align") { + align += alignMap[cols[_i].align]; + + if (prevTypeWasAlign) { + columnLines += "none "; + } + + prevTypeWasAlign = true; + } else if (cols[_i].type === "separator") { + // MathML accepts only single lines between cells. + // So we read only the first of consecutive separators. + if (prevTypeWasAlign) { + columnLines += cols[_i].separator === "|" ? "solid " : "dashed "; + prevTypeWasAlign = false; + } + } + } + + table.setAttribute("columnalign", align.trim()); + + if (/[sd]/.test(columnLines)) { + table.setAttribute("columnlines", columnLines.trim()); + } + } // Set column spacing. + + + if (group.colSeparationType === "align") { + var _cols = group.cols || []; + + var spacing = ""; + + for (var _i2 = 1; _i2 < _cols.length; _i2++) { + spacing += _i2 % 2 ? "0em " : "1em "; + } + + table.setAttribute("columnspacing", spacing.trim()); + } else if (group.colSeparationType === "alignat" || group.colSeparationType === "gather") { + table.setAttribute("columnspacing", "0em"); + } else if (group.colSeparationType === "small") { + table.setAttribute("columnspacing", "0.2778em"); + } else if (group.colSeparationType === "CD") { + table.setAttribute("columnspacing", "0.5em"); + } else { + table.setAttribute("columnspacing", "1em"); + } // Address \hline and \hdashline + + + var rowLines = ""; + var hlines = group.hLinesBeforeRow; + menclose += hlines[0].length > 0 ? "left " : ""; + menclose += hlines[hlines.length - 1].length > 0 ? "right " : ""; + + for (var _i3 = 1; _i3 < hlines.length - 1; _i3++) { + rowLines += hlines[_i3].length === 0 ? "none " // MathML accepts only a single line between rows. Read one element. + : hlines[_i3][0] ? "dashed " : "solid "; + } + + if (/[sd]/.test(rowLines)) { + table.setAttribute("rowlines", rowLines.trim()); + } + + if (menclose !== "") { + table = new mathMLTree.MathNode("menclose", [table]); + table.setAttribute("notation", menclose.trim()); + } + + if (group.arraystretch && group.arraystretch < 1) { + // A small array. Wrap in scriptstyle so row gap is not too large. + table = new mathMLTree.MathNode("mstyle", [table]); + table.setAttribute("scriptlevel", "1"); + } + + return table; +}; // Convenience function for align, align*, aligned, alignat, alignat*, alignedat. + + +var alignedHandler = function alignedHandler(context, args) { + if (context.envName.indexOf("ed") === -1) { + validateAmsEnvironmentContext(context); + } + + var cols = []; + var separationType = context.envName.indexOf("at") > -1 ? "alignat" : "align"; + var isSplit = context.envName === "split"; + var res = parseArray(context.parser, { + cols, + addJot: true, + autoTag: isSplit ? undefined : getAutoTag(context.envName), + emptySingleRow: true, + colSeparationType: separationType, + maxNumCols: isSplit ? 2 : undefined, + leqno: context.parser.settings.leqno + }, "display"); // Determining number of columns. + // 1. If the first argument is given, we use it as a number of columns, + // and makes sure that each row doesn't exceed that number. + // 2. Otherwise, just count number of columns = maximum number + // of cells in each row ("aligned" mode -- isAligned will be true). + // + // At the same time, prepend empty group {} at beginning of every second + // cell in each row (starting with second cell) so that operators become + // binary. This behavior is implemented in amsmath's \start@aligned. + + var numMaths; + var numCols = 0; + var emptyGroup = { + type: "ordgroup", + mode: context.mode, + body: [] + }; + + if (args[0] && args[0].type === "ordgroup") { + var arg0 = ""; + + for (var i = 0; i < args[0].body.length; i++) { + var textord = assertNodeType(args[0].body[i], "textord"); + arg0 += textord.text; + } + + numMaths = Number(arg0); + numCols = numMaths * 2; + } + + var isAligned = !numCols; + res.body.forEach(function (row) { + for (var _i4 = 1; _i4 < row.length; _i4 += 2) { + // Modify ordgroup node within styling node + var styling = assertNodeType(row[_i4], "styling"); + var ordgroup = assertNodeType(styling.body[0], "ordgroup"); + ordgroup.body.unshift(emptyGroup); + } + + if (!isAligned) { + // Case 1 + var curMaths = row.length / 2; + + if (numMaths < curMaths) { + throw new ParseError("Too many math in a row: " + ("expected " + numMaths + ", but got " + curMaths), row[0]); + } + } else if (numCols < row.length) { + // Case 2 + numCols = row.length; + } + }); // Adjusting alignment. + // In aligned mode, we add one \qquad between columns; + // otherwise we add nothing. + + for (var _i5 = 0; _i5 < numCols; ++_i5) { + var align = "r"; + var pregap = 0; + + if (_i5 % 2 === 1) { + align = "l"; + } else if (_i5 > 0 && isAligned) { + // "aligned" mode. + pregap = 1; // add one \quad + } + + cols[_i5] = { + type: "align", + align: align, + pregap: pregap, + postgap: 0 + }; + } + + res.colSeparationType = isAligned ? "align" : "alignat"; + return res; +}; // Arrays are part of LaTeX, defined in lttab.dtx so its documentation +// is part of the source2e.pdf file of LaTeX2e source documentation. +// {darray} is an {array} environment where cells are set in \displaystyle, +// as defined in nccmath.sty. + + +defineEnvironment({ + type: "array", + names: ["array", "darray"], + props: { + numArgs: 1 + }, + + handler(context, args) { + // Since no types are specified above, the two possibilities are + // - The argument is wrapped in {} or [], in which case Parser's + // parseGroup() returns an "ordgroup" wrapping some symbol node. + // - The argument is a bare symbol node. + var symNode = checkSymbolNodeType(args[0]); + var colalign = symNode ? [args[0]] : assertNodeType(args[0], "ordgroup").body; + var cols = colalign.map(function (nde) { + var node = assertSymbolNodeType(nde); + var ca = node.text; + + if ("lcr".indexOf(ca) !== -1) { + return { + type: "align", + align: ca + }; + } else if (ca === "|") { + return { + type: "separator", + separator: "|" + }; + } else if (ca === ":") { + return { + type: "separator", + separator: ":" + }; + } + + throw new ParseError("Unknown column alignment: " + ca, nde); + }); + var res = { + cols, + hskipBeforeAndAfter: true, + // \@preamble in lttab.dtx + maxNumCols: cols.length + }; + return parseArray(context.parser, res, dCellStyle(context.envName)); + }, + + htmlBuilder: htmlBuilder$6, + mathmlBuilder: mathmlBuilder$5 +}); // The matrix environments of amsmath builds on the array environment +// of LaTeX, which is discussed above. +// The mathtools package adds starred versions of the same environments. +// These have an optional argument to choose left|center|right justification. + +defineEnvironment({ + type: "array", + names: ["matrix", "pmatrix", "bmatrix", "Bmatrix", "vmatrix", "Vmatrix", "matrix*", "pmatrix*", "bmatrix*", "Bmatrix*", "vmatrix*", "Vmatrix*"], + props: { + numArgs: 0 + }, + + handler(context) { + var delimiters = { + "matrix": null, + "pmatrix": ["(", ")"], + "bmatrix": ["[", "]"], + "Bmatrix": ["\\{", "\\}"], + "vmatrix": ["|", "|"], + "Vmatrix": ["\\Vert", "\\Vert"] + }[context.envName.replace("*", "")]; // \hskip -\arraycolsep in amsmath + + var colAlign = "c"; + var payload = { + hskipBeforeAndAfter: false, + cols: [{ + type: "align", + align: colAlign + }] + }; + + if (context.envName.charAt(context.envName.length - 1) === "*") { + // It's one of the mathtools starred functions. + // Parse the optional alignment argument. + var parser = context.parser; + parser.consumeSpaces(); + + if (parser.fetch().text === "[") { + parser.consume(); + parser.consumeSpaces(); + colAlign = parser.fetch().text; + + if ("lcr".indexOf(colAlign) === -1) { + throw new ParseError("Expected l or c or r", parser.nextToken); + } + + parser.consume(); + parser.consumeSpaces(); + parser.expect("]"); + parser.consume(); + payload.cols = [{ + type: "align", + align: colAlign + }]; + } + } + + var res = parseArray(context.parser, payload, dCellStyle(context.envName)); // Populate cols with the correct number of column alignment specs. + + var numCols = Math.max(0, ...res.body.map(row => row.length)); + res.cols = new Array(numCols).fill({ + type: "align", + align: colAlign + }); + return delimiters ? { + type: "leftright", + mode: context.mode, + body: [res], + left: delimiters[0], + right: delimiters[1], + rightColor: undefined // \right uninfluenced by \color in array + + } : res; + }, + + htmlBuilder: htmlBuilder$6, + mathmlBuilder: mathmlBuilder$5 +}); +defineEnvironment({ + type: "array", + names: ["smallmatrix"], + props: { + numArgs: 0 + }, + + handler(context) { + var payload = { + arraystretch: 0.5 + }; + var res = parseArray(context.parser, payload, "script"); + res.colSeparationType = "small"; + return res; + }, + + htmlBuilder: htmlBuilder$6, + mathmlBuilder: mathmlBuilder$5 +}); +defineEnvironment({ + type: "array", + names: ["subarray"], + props: { + numArgs: 1 + }, + + handler(context, args) { + // Parsing of {subarray} is similar to {array} + var symNode = checkSymbolNodeType(args[0]); + var colalign = symNode ? [args[0]] : assertNodeType(args[0], "ordgroup").body; + var cols = colalign.map(function (nde) { + var node = assertSymbolNodeType(nde); + var ca = node.text; // {subarray} only recognizes "l" & "c" + + if ("lc".indexOf(ca) !== -1) { + return { + type: "align", + align: ca + }; + } + + throw new ParseError("Unknown column alignment: " + ca, nde); + }); + + if (cols.length > 1) { + throw new ParseError("{subarray} can contain only one column"); + } + + var res = { + cols, + hskipBeforeAndAfter: false, + arraystretch: 0.5 + }; + res = parseArray(context.parser, res, "script"); + + if (res.body.length > 0 && res.body[0].length > 1) { + throw new ParseError("{subarray} can contain only one column"); + } + + return res; + }, + + htmlBuilder: htmlBuilder$6, + mathmlBuilder: mathmlBuilder$5 +}); // A cases environment (in amsmath.sty) is almost equivalent to +// \def\arraystretch{1.2}% +// \left\{\begin{array}{@{}l@{\quad}l@{}} … \end{array}\right. +// {dcases} is a {cases} environment where cells are set in \displaystyle, +// as defined in mathtools.sty. +// {rcases} is another mathtools environment. It's brace is on the right side. + +defineEnvironment({ + type: "array", + names: ["cases", "dcases", "rcases", "drcases"], + props: { + numArgs: 0 + }, + + handler(context) { + var payload = { + arraystretch: 1.2, + cols: [{ + type: "align", + align: "l", + pregap: 0, + // TODO(kevinb) get the current style. + // For now we use the metrics for TEXT style which is what we were + // doing before. Before attempting to get the current style we + // should look at TeX's behavior especially for \over and matrices. + postgap: 1.0 + /* 1em quad */ + + }, { + type: "align", + align: "l", + pregap: 0, + postgap: 0 + }] + }; + var res = parseArray(context.parser, payload, dCellStyle(context.envName)); + return { + type: "leftright", + mode: context.mode, + body: [res], + left: context.envName.indexOf("r") > -1 ? "." : "\\{", + right: context.envName.indexOf("r") > -1 ? "\\}" : ".", + rightColor: undefined + }; + }, + + htmlBuilder: htmlBuilder$6, + mathmlBuilder: mathmlBuilder$5 +}); // In the align environment, one uses ampersands, &, to specify number of +// columns in each row, and to locate spacing between each column. +// align gets automatic numbering. align* and aligned do not. +// The alignedat environment can be used in math mode. +// Note that we assume \nomallineskiplimit to be zero, +// so that \strut@ is the same as \strut. + +defineEnvironment({ + type: "array", + names: ["align", "align*", "aligned", "split"], + props: { + numArgs: 0 + }, + handler: alignedHandler, + htmlBuilder: htmlBuilder$6, + mathmlBuilder: mathmlBuilder$5 +}); // A gathered environment is like an array environment with one centered +// column, but where rows are considered lines so get \jot line spacing +// and contents are set in \displaystyle. + +defineEnvironment({ + type: "array", + names: ["gathered", "gather", "gather*"], + props: { + numArgs: 0 + }, + + handler(context) { + if (utils.contains(["gather", "gather*"], context.envName)) { + validateAmsEnvironmentContext(context); + } + + var res = { + cols: [{ + type: "align", + align: "c" + }], + addJot: true, + colSeparationType: "gather", + autoTag: getAutoTag(context.envName), + emptySingleRow: true, + leqno: context.parser.settings.leqno + }; + return parseArray(context.parser, res, "display"); + }, + + htmlBuilder: htmlBuilder$6, + mathmlBuilder: mathmlBuilder$5 +}); // alignat environment is like an align environment, but one must explicitly +// specify maximum number of columns in each row, and can adjust spacing between +// each columns. + +defineEnvironment({ + type: "array", + names: ["alignat", "alignat*", "alignedat"], + props: { + numArgs: 1 + }, + handler: alignedHandler, + htmlBuilder: htmlBuilder$6, + mathmlBuilder: mathmlBuilder$5 +}); +defineEnvironment({ + type: "array", + names: ["equation", "equation*"], + props: { + numArgs: 0 + }, + + handler(context) { + validateAmsEnvironmentContext(context); + var res = { + autoTag: getAutoTag(context.envName), + emptySingleRow: true, + singleRow: true, + maxNumCols: 1, + leqno: context.parser.settings.leqno + }; + return parseArray(context.parser, res, "display"); + }, + + htmlBuilder: htmlBuilder$6, + mathmlBuilder: mathmlBuilder$5 +}); +defineEnvironment({ + type: "array", + names: ["CD"], + props: { + numArgs: 0 + }, + + handler(context) { + validateAmsEnvironmentContext(context); + return parseCD(context.parser); + }, + + htmlBuilder: htmlBuilder$6, + mathmlBuilder: mathmlBuilder$5 +}); +defineMacro("\\nonumber", "\\gdef\\@eqnsw{0}"); +defineMacro("\\notag", "\\nonumber"); // Catch \hline outside array environment + +defineFunction({ + type: "text", + // Doesn't matter what this is. + names: ["\\hline", "\\hdashline"], + props: { + numArgs: 0, + allowedInText: true, + allowedInMath: true + }, + + handler(context, args) { + throw new ParseError(context.funcName + " valid only within array environment"); + } + +}); + +var environments = _environments; + +// defineEnvironment definitions. + +defineFunction({ + type: "environment", + names: ["\\begin", "\\end"], + props: { + numArgs: 1, + argTypes: ["text"] + }, + + handler(_ref, args) { + var { + parser, + funcName + } = _ref; + var nameGroup = args[0]; + + if (nameGroup.type !== "ordgroup") { + throw new ParseError("Invalid environment name", nameGroup); + } + + var envName = ""; + + for (var i = 0; i < nameGroup.body.length; ++i) { + envName += assertNodeType(nameGroup.body[i], "textord").text; + } + + if (funcName === "\\begin") { + // begin...end is similar to left...right + if (!environments.hasOwnProperty(envName)) { + throw new ParseError("No such environment: " + envName, nameGroup); + } // Build the environment object. Arguments and other information will + // be made available to the begin and end methods using properties. + + + var env = environments[envName]; + var { + args: _args, + optArgs + } = parser.parseArguments("\\begin{" + envName + "}", env); + var context = { + mode: parser.mode, + envName, + parser + }; + var result = env.handler(context, _args, optArgs); + parser.expect("\\end", false); + var endNameToken = parser.nextToken; + var end = assertNodeType(parser.parseFunction(), "environment"); + + if (end.name !== envName) { + throw new ParseError("Mismatch: \\begin{" + envName + "} matched by \\end{" + end.name + "}", endNameToken); + } // $FlowFixMe, "environment" handler returns an environment ParseNode + + + return result; + } + + return { + type: "environment", + mode: parser.mode, + name: envName, + nameGroup + }; + } + +}); + +// TODO(kevinb): implement \\sl and \\sc + +var htmlBuilder$5 = (group, options) => { + var font = group.font; + var newOptions = options.withFont(font); + return buildGroup$1(group.body, newOptions); +}; + +var mathmlBuilder$4 = (group, options) => { + var font = group.font; + var newOptions = options.withFont(font); + return buildGroup(group.body, newOptions); +}; + +var fontAliases = { + "\\Bbb": "\\mathbb", + "\\bold": "\\mathbf", + "\\frak": "\\mathfrak", + "\\bm": "\\boldsymbol" +}; +defineFunction({ + type: "font", + names: [// styles, except \boldsymbol defined below + "\\mathrm", "\\mathit", "\\mathbf", "\\mathnormal", // families + "\\mathbb", "\\mathcal", "\\mathfrak", "\\mathscr", "\\mathsf", "\\mathtt", // aliases, except \bm defined below + "\\Bbb", "\\bold", "\\frak"], + props: { + numArgs: 1, + allowedInArgument: true + }, + handler: (_ref, args) => { + var { + parser, + funcName + } = _ref; + var body = normalizeArgument(args[0]); + var func = funcName; + + if (func in fontAliases) { + func = fontAliases[func]; + } + + return { + type: "font", + mode: parser.mode, + font: func.slice(1), + body + }; + }, + htmlBuilder: htmlBuilder$5, + mathmlBuilder: mathmlBuilder$4 +}); +defineFunction({ + type: "mclass", + names: ["\\boldsymbol", "\\bm"], + props: { + numArgs: 1 + }, + handler: (_ref2, args) => { + var { + parser + } = _ref2; + var body = args[0]; + var isCharacterBox = utils.isCharacterBox(body); // amsbsy.sty's \boldsymbol uses \binrel spacing to inherit the + // argument's bin|rel|ord status + + return { + type: "mclass", + mode: parser.mode, + mclass: binrelClass(body), + body: [{ + type: "font", + mode: parser.mode, + font: "boldsymbol", + body + }], + isCharacterBox: isCharacterBox + }; + } +}); // Old font changing functions + +defineFunction({ + type: "font", + names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it", "\\cal"], + props: { + numArgs: 0, + allowedInText: true + }, + handler: (_ref3, args) => { + var { + parser, + funcName, + breakOnTokenText + } = _ref3; + var { + mode + } = parser; + var body = parser.parseExpression(true, breakOnTokenText); + var style = "math" + funcName.slice(1); + return { + type: "font", + mode: mode, + font: style, + body: { + type: "ordgroup", + mode: parser.mode, + body + } + }; + }, + htmlBuilder: htmlBuilder$5, + mathmlBuilder: mathmlBuilder$4 +}); + +var adjustStyle = (size, originalStyle) => { + // Figure out what style this fraction should be in based on the + // function used + var style = originalStyle; + + if (size === "display") { + // Get display style as a default. + // If incoming style is sub/sup, use style.text() to get correct size. + style = style.id >= Style$1.SCRIPT.id ? style.text() : Style$1.DISPLAY; + } else if (size === "text" && style.size === Style$1.DISPLAY.size) { + // We're in a \tfrac but incoming style is displaystyle, so: + style = Style$1.TEXT; + } else if (size === "script") { + style = Style$1.SCRIPT; + } else if (size === "scriptscript") { + style = Style$1.SCRIPTSCRIPT; + } + + return style; +}; + +var htmlBuilder$4 = (group, options) => { + // Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e). + var style = adjustStyle(group.size, options.style); + var nstyle = style.fracNum(); + var dstyle = style.fracDen(); + var newOptions; + newOptions = options.havingStyle(nstyle); + var numerm = buildGroup$1(group.numer, newOptions, options); + + if (group.continued) { + // \cfrac inserts a \strut into the numerator. + // Get \strut dimensions from TeXbook page 353. + var hStrut = 8.5 / options.fontMetrics().ptPerEm; + var dStrut = 3.5 / options.fontMetrics().ptPerEm; + numerm.height = numerm.height < hStrut ? hStrut : numerm.height; + numerm.depth = numerm.depth < dStrut ? dStrut : numerm.depth; + } + + newOptions = options.havingStyle(dstyle); + var denomm = buildGroup$1(group.denom, newOptions, options); + var rule; + var ruleWidth; + var ruleSpacing; + + if (group.hasBarLine) { + if (group.barSize) { + ruleWidth = calculateSize(group.barSize, options); + rule = buildCommon.makeLineSpan("frac-line", options, ruleWidth); + } else { + rule = buildCommon.makeLineSpan("frac-line", options); + } + + ruleWidth = rule.height; + ruleSpacing = rule.height; + } else { + rule = null; + ruleWidth = 0; + ruleSpacing = options.fontMetrics().defaultRuleThickness; + } // Rule 15b + + + var numShift; + var clearance; + var denomShift; + + if (style.size === Style$1.DISPLAY.size || group.size === "display") { + numShift = options.fontMetrics().num1; + + if (ruleWidth > 0) { + clearance = 3 * ruleSpacing; + } else { + clearance = 7 * ruleSpacing; + } + + denomShift = options.fontMetrics().denom1; + } else { + if (ruleWidth > 0) { + numShift = options.fontMetrics().num2; + clearance = ruleSpacing; + } else { + numShift = options.fontMetrics().num3; + clearance = 3 * ruleSpacing; + } + + denomShift = options.fontMetrics().denom2; + } + + var frac; + + if (!rule) { + // Rule 15c + var candidateClearance = numShift - numerm.depth - (denomm.height - denomShift); + + if (candidateClearance < clearance) { + numShift += 0.5 * (clearance - candidateClearance); + denomShift += 0.5 * (clearance - candidateClearance); + } + + frac = buildCommon.makeVList({ + positionType: "individualShift", + children: [{ + type: "elem", + elem: denomm, + shift: denomShift + }, { + type: "elem", + elem: numerm, + shift: -numShift + }] + }, options); + } else { + // Rule 15d + var axisHeight = options.fontMetrics().axisHeight; + + if (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth) < clearance) { + numShift += clearance - (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth)); + } + + if (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift) < clearance) { + denomShift += clearance - (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift)); + } + + var midShift = -(axisHeight - 0.5 * ruleWidth); + frac = buildCommon.makeVList({ + positionType: "individualShift", + children: [{ + type: "elem", + elem: denomm, + shift: denomShift + }, { + type: "elem", + elem: rule, + shift: midShift + }, { + type: "elem", + elem: numerm, + shift: -numShift + }] + }, options); + } // Since we manually change the style sometimes (with \dfrac or \tfrac), + // account for the possible size change here. + + + newOptions = options.havingStyle(style); + frac.height *= newOptions.sizeMultiplier / options.sizeMultiplier; + frac.depth *= newOptions.sizeMultiplier / options.sizeMultiplier; // Rule 15e + + var delimSize; + + if (style.size === Style$1.DISPLAY.size) { + delimSize = options.fontMetrics().delim1; + } else if (style.size === Style$1.SCRIPTSCRIPT.size) { + delimSize = options.havingStyle(Style$1.SCRIPT).fontMetrics().delim2; + } else { + delimSize = options.fontMetrics().delim2; + } + + var leftDelim; + var rightDelim; + + if (group.leftDelim == null) { + leftDelim = makeNullDelimiter(options, ["mopen"]); + } else { + leftDelim = delimiter.customSizedDelim(group.leftDelim, delimSize, true, options.havingStyle(style), group.mode, ["mopen"]); + } + + if (group.continued) { + rightDelim = buildCommon.makeSpan([]); // zero width for \cfrac + } else if (group.rightDelim == null) { + rightDelim = makeNullDelimiter(options, ["mclose"]); + } else { + rightDelim = delimiter.customSizedDelim(group.rightDelim, delimSize, true, options.havingStyle(style), group.mode, ["mclose"]); + } + + return buildCommon.makeSpan(["mord"].concat(newOptions.sizingClasses(options)), [leftDelim, buildCommon.makeSpan(["mfrac"], [frac]), rightDelim], options); +}; + +var mathmlBuilder$3 = (group, options) => { + var node = new mathMLTree.MathNode("mfrac", [buildGroup(group.numer, options), buildGroup(group.denom, options)]); + + if (!group.hasBarLine) { + node.setAttribute("linethickness", "0px"); + } else if (group.barSize) { + var ruleWidth = calculateSize(group.barSize, options); + node.setAttribute("linethickness", makeEm(ruleWidth)); + } + + var style = adjustStyle(group.size, options.style); + + if (style.size !== options.style.size) { + node = new mathMLTree.MathNode("mstyle", [node]); + var isDisplay = style.size === Style$1.DISPLAY.size ? "true" : "false"; + node.setAttribute("displaystyle", isDisplay); + node.setAttribute("scriptlevel", "0"); + } + + if (group.leftDelim != null || group.rightDelim != null) { + var withDelims = []; + + if (group.leftDelim != null) { + var leftOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.leftDelim.replace("\\", ""))]); + leftOp.setAttribute("fence", "true"); + withDelims.push(leftOp); + } + + withDelims.push(node); + + if (group.rightDelim != null) { + var rightOp = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode(group.rightDelim.replace("\\", ""))]); + rightOp.setAttribute("fence", "true"); + withDelims.push(rightOp); + } + + return makeRow(withDelims); + } + + return node; +}; + +defineFunction({ + type: "genfrac", + names: ["\\dfrac", "\\frac", "\\tfrac", "\\dbinom", "\\binom", "\\tbinom", "\\\\atopfrac", // can’t be entered directly + "\\\\bracefrac", "\\\\brackfrac" // ditto + ], + props: { + numArgs: 2, + allowedInArgument: true + }, + handler: (_ref, args) => { + var { + parser, + funcName + } = _ref; + var numer = args[0]; + var denom = args[1]; + var hasBarLine; + var leftDelim = null; + var rightDelim = null; + var size = "auto"; + + switch (funcName) { + case "\\dfrac": + case "\\frac": + case "\\tfrac": + hasBarLine = true; + break; + + case "\\\\atopfrac": + hasBarLine = false; + break; + + case "\\dbinom": + case "\\binom": + case "\\tbinom": + hasBarLine = false; + leftDelim = "("; + rightDelim = ")"; + break; + + case "\\\\bracefrac": + hasBarLine = false; + leftDelim = "\\{"; + rightDelim = "\\}"; + break; + + case "\\\\brackfrac": + hasBarLine = false; + leftDelim = "["; + rightDelim = "]"; + break; + + default: + throw new Error("Unrecognized genfrac command"); + } + + switch (funcName) { + case "\\dfrac": + case "\\dbinom": + size = "display"; + break; + + case "\\tfrac": + case "\\tbinom": + size = "text"; + break; + } + + return { + type: "genfrac", + mode: parser.mode, + continued: false, + numer, + denom, + hasBarLine, + leftDelim, + rightDelim, + size, + barSize: null + }; + }, + htmlBuilder: htmlBuilder$4, + mathmlBuilder: mathmlBuilder$3 +}); +defineFunction({ + type: "genfrac", + names: ["\\cfrac"], + props: { + numArgs: 2 + }, + handler: (_ref2, args) => { + var { + parser, + funcName + } = _ref2; + var numer = args[0]; + var denom = args[1]; + return { + type: "genfrac", + mode: parser.mode, + continued: true, + numer, + denom, + hasBarLine: true, + leftDelim: null, + rightDelim: null, + size: "display", + barSize: null + }; + } +}); // Infix generalized fractions -- these are not rendered directly, but replaced +// immediately by one of the variants above. + +defineFunction({ + type: "infix", + names: ["\\over", "\\choose", "\\atop", "\\brace", "\\brack"], + props: { + numArgs: 0, + infix: true + }, + + handler(_ref3) { + var { + parser, + funcName, + token + } = _ref3; + var replaceWith; + + switch (funcName) { + case "\\over": + replaceWith = "\\frac"; + break; + + case "\\choose": + replaceWith = "\\binom"; + break; + + case "\\atop": + replaceWith = "\\\\atopfrac"; + break; + + case "\\brace": + replaceWith = "\\\\bracefrac"; + break; + + case "\\brack": + replaceWith = "\\\\brackfrac"; + break; + + default: + throw new Error("Unrecognized infix genfrac command"); + } + + return { + type: "infix", + mode: parser.mode, + replaceWith, + token + }; + } + +}); +var stylArray = ["display", "text", "script", "scriptscript"]; + +var delimFromValue = function delimFromValue(delimString) { + var delim = null; + + if (delimString.length > 0) { + delim = delimString; + delim = delim === "." ? null : delim; + } + + return delim; +}; + +defineFunction({ + type: "genfrac", + names: ["\\genfrac"], + props: { + numArgs: 6, + allowedInArgument: true, + argTypes: ["math", "math", "size", "text", "math", "math"] + }, + + handler(_ref4, args) { + var { + parser + } = _ref4; + var numer = args[4]; + var denom = args[5]; // Look into the parse nodes to get the desired delimiters. + + var leftNode = normalizeArgument(args[0]); + var leftDelim = leftNode.type === "atom" && leftNode.family === "open" ? delimFromValue(leftNode.text) : null; + var rightNode = normalizeArgument(args[1]); + var rightDelim = rightNode.type === "atom" && rightNode.family === "close" ? delimFromValue(rightNode.text) : null; + var barNode = assertNodeType(args[2], "size"); + var hasBarLine; + var barSize = null; + + if (barNode.isBlank) { + // \genfrac acts differently than \above. + // \genfrac treats an empty size group as a signal to use a + // standard bar size. \above would see size = 0 and omit the bar. + hasBarLine = true; + } else { + barSize = barNode.value; + hasBarLine = barSize.number > 0; + } // Find out if we want displaystyle, textstyle, etc. + + + var size = "auto"; + var styl = args[3]; + + if (styl.type === "ordgroup") { + if (styl.body.length > 0) { + var textOrd = assertNodeType(styl.body[0], "textord"); + size = stylArray[Number(textOrd.text)]; + } + } else { + styl = assertNodeType(styl, "textord"); + size = stylArray[Number(styl.text)]; + } + + return { + type: "genfrac", + mode: parser.mode, + numer, + denom, + continued: false, + hasBarLine, + barSize, + leftDelim, + rightDelim, + size + }; + }, + + htmlBuilder: htmlBuilder$4, + mathmlBuilder: mathmlBuilder$3 +}); // \above is an infix fraction that also defines a fraction bar size. + +defineFunction({ + type: "infix", + names: ["\\above"], + props: { + numArgs: 1, + argTypes: ["size"], + infix: true + }, + + handler(_ref5, args) { + var { + parser, + funcName, + token + } = _ref5; + return { + type: "infix", + mode: parser.mode, + replaceWith: "\\\\abovefrac", + size: assertNodeType(args[0], "size").value, + token + }; + } + +}); +defineFunction({ + type: "genfrac", + names: ["\\\\abovefrac"], + props: { + numArgs: 3, + argTypes: ["math", "size", "math"] + }, + handler: (_ref6, args) => { + var { + parser, + funcName + } = _ref6; + var numer = args[0]; + var barSize = assert(assertNodeType(args[1], "infix").size); + var denom = args[2]; + var hasBarLine = barSize.number > 0; + return { + type: "genfrac", + mode: parser.mode, + numer, + denom, + continued: false, + hasBarLine, + barSize, + leftDelim: null, + rightDelim: null, + size: "auto" + }; + }, + htmlBuilder: htmlBuilder$4, + mathmlBuilder: mathmlBuilder$3 +}); + +// NOTE: Unlike most `htmlBuilder`s, this one handles not only "horizBrace", but +// also "supsub" since an over/underbrace can affect super/subscripting. +var htmlBuilder$3 = (grp, options) => { + var style = options.style; // Pull out the `ParseNode<"horizBrace">` if `grp` is a "supsub" node. + + var supSubGroup; + var group; + + if (grp.type === "supsub") { + // Ref: LaTeX source2e: }}}}\limits} + // i.e. LaTeX treats the brace similar to an op and passes it + // with \limits, so we need to assign supsub style. + supSubGroup = grp.sup ? buildGroup$1(grp.sup, options.havingStyle(style.sup()), options) : buildGroup$1(grp.sub, options.havingStyle(style.sub()), options); + group = assertNodeType(grp.base, "horizBrace"); + } else { + group = assertNodeType(grp, "horizBrace"); + } // Build the base group + + + var body = buildGroup$1(group.base, options.havingBaseStyle(Style$1.DISPLAY)); // Create the stretchy element + + var braceBody = stretchy.svgSpan(group, options); // Generate the vlist, with the appropriate kerns ┏━━━━━━━━┓ + // This first vlist contains the content and the brace: equation + + var vlist; + + if (group.isOver) { + vlist = buildCommon.makeVList({ + positionType: "firstBaseline", + children: [{ + type: "elem", + elem: body + }, { + type: "kern", + size: 0.1 + }, { + type: "elem", + elem: braceBody + }] + }, options); // $FlowFixMe: Replace this with passing "svg-align" into makeVList. + + vlist.children[0].children[0].children[1].classes.push("svg-align"); + } else { + vlist = buildCommon.makeVList({ + positionType: "bottom", + positionData: body.depth + 0.1 + braceBody.height, + children: [{ + type: "elem", + elem: braceBody + }, { + type: "kern", + size: 0.1 + }, { + type: "elem", + elem: body + }] + }, options); // $FlowFixMe: Replace this with passing "svg-align" into makeVList. + + vlist.children[0].children[0].children[0].classes.push("svg-align"); + } + + if (supSubGroup) { + // To write the supsub, wrap the first vlist in another vlist: + // They can't all go in the same vlist, because the note might be + // wider than the equation. We want the equation to control the + // brace width. + // note long note long note + // ┏━━━━━━━━┓ or ┏━━━┓ not ┏━━━━━━━━━┓ + // equation eqn eqn + var vSpan = buildCommon.makeSpan(["mord", group.isOver ? "mover" : "munder"], [vlist], options); + + if (group.isOver) { + vlist = buildCommon.makeVList({ + positionType: "firstBaseline", + children: [{ + type: "elem", + elem: vSpan + }, { + type: "kern", + size: 0.2 + }, { + type: "elem", + elem: supSubGroup + }] + }, options); + } else { + vlist = buildCommon.makeVList({ + positionType: "bottom", + positionData: vSpan.depth + 0.2 + supSubGroup.height + supSubGroup.depth, + children: [{ + type: "elem", + elem: supSubGroup + }, { + type: "kern", + size: 0.2 + }, { + type: "elem", + elem: vSpan + }] + }, options); + } + } + + return buildCommon.makeSpan(["mord", group.isOver ? "mover" : "munder"], [vlist], options); +}; + +var mathmlBuilder$2 = (group, options) => { + var accentNode = stretchy.mathMLnode(group.label); + return new mathMLTree.MathNode(group.isOver ? "mover" : "munder", [buildGroup(group.base, options), accentNode]); +}; // Horizontal stretchy braces + + +defineFunction({ + type: "horizBrace", + names: ["\\overbrace", "\\underbrace"], + props: { + numArgs: 1 + }, + + handler(_ref, args) { + var { + parser, + funcName + } = _ref; + return { + type: "horizBrace", + mode: parser.mode, + label: funcName, + isOver: /^\\over/.test(funcName), + base: args[0] + }; + }, + + htmlBuilder: htmlBuilder$3, + mathmlBuilder: mathmlBuilder$2 +}); + +defineFunction({ + type: "href", + names: ["\\href"], + props: { + numArgs: 2, + argTypes: ["url", "original"], + allowedInText: true + }, + handler: (_ref, args) => { + var { + parser + } = _ref; + var body = args[1]; + var href = assertNodeType(args[0], "url").url; + + if (!parser.settings.isTrusted({ + command: "\\href", + url: href + })) { + return parser.formatUnsupportedCmd("\\href"); + } + + return { + type: "href", + mode: parser.mode, + href, + body: ordargument(body) + }; + }, + htmlBuilder: (group, options) => { + var elements = buildExpression$1(group.body, options, false); + return buildCommon.makeAnchor(group.href, [], elements, options); + }, + mathmlBuilder: (group, options) => { + var math = buildExpressionRow(group.body, options); + + if (!(math instanceof MathNode)) { + math = new MathNode("mrow", [math]); + } + + math.setAttribute("href", group.href); + return math; + } +}); +defineFunction({ + type: "href", + names: ["\\url"], + props: { + numArgs: 1, + argTypes: ["url"], + allowedInText: true + }, + handler: (_ref2, args) => { + var { + parser + } = _ref2; + var href = assertNodeType(args[0], "url").url; + + if (!parser.settings.isTrusted({ + command: "\\url", + url: href + })) { + return parser.formatUnsupportedCmd("\\url"); + } + + var chars = []; + + for (var i = 0; i < href.length; i++) { + var c = href[i]; + + if (c === "~") { + c = "\\textasciitilde"; + } + + chars.push({ + type: "textord", + mode: "text", + text: c + }); + } + + var body = { + type: "text", + mode: parser.mode, + font: "\\texttt", + body: chars + }; + return { + type: "href", + mode: parser.mode, + href, + body: ordargument(body) + }; + } +}); + +// In LaTeX, \vcenter can act only on a box, as in +// \vcenter{\hbox{$\frac{a+b}{\dfrac{c}{d}}$}} +// This function by itself doesn't do anything but prevent a soft line break. + +defineFunction({ + type: "hbox", + names: ["\\hbox"], + props: { + numArgs: 1, + argTypes: ["text"], + allowedInText: true, + primitive: true + }, + + handler(_ref, args) { + var { + parser + } = _ref; + return { + type: "hbox", + mode: parser.mode, + body: ordargument(args[0]) + }; + }, + + htmlBuilder(group, options) { + var elements = buildExpression$1(group.body, options, false); + return buildCommon.makeFragment(elements); + }, + + mathmlBuilder(group, options) { + return new mathMLTree.MathNode("mrow", buildExpression(group.body, options)); + } + +}); + +defineFunction({ + type: "html", + names: ["\\htmlClass", "\\htmlId", "\\htmlStyle", "\\htmlData"], + props: { + numArgs: 2, + argTypes: ["raw", "original"], + allowedInText: true + }, + handler: (_ref, args) => { + var { + parser, + funcName, + token + } = _ref; + var value = assertNodeType(args[0], "raw").string; + var body = args[1]; + + if (parser.settings.strict) { + parser.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode"); + } + + var trustContext; + var attributes = {}; + + switch (funcName) { + case "\\htmlClass": + attributes.class = value; + trustContext = { + command: "\\htmlClass", + class: value + }; + break; + + case "\\htmlId": + attributes.id = value; + trustContext = { + command: "\\htmlId", + id: value + }; + break; + + case "\\htmlStyle": + attributes.style = value; + trustContext = { + command: "\\htmlStyle", + style: value + }; + break; + + case "\\htmlData": + { + var data = value.split(","); + + for (var i = 0; i < data.length; i++) { + var keyVal = data[i].split("="); + + if (keyVal.length !== 2) { + throw new ParseError("Error parsing key-value for \\htmlData"); + } + + attributes["data-" + keyVal[0].trim()] = keyVal[1].trim(); + } + + trustContext = { + command: "\\htmlData", + attributes + }; + break; + } + + default: + throw new Error("Unrecognized html command"); + } + + if (!parser.settings.isTrusted(trustContext)) { + return parser.formatUnsupportedCmd(funcName); + } + + return { + type: "html", + mode: parser.mode, + attributes, + body: ordargument(body) + }; + }, + htmlBuilder: (group, options) => { + var elements = buildExpression$1(group.body, options, false); + var classes = ["enclosing"]; + + if (group.attributes.class) { + classes.push(...group.attributes.class.trim().split(/\s+/)); + } + + var span = buildCommon.makeSpan(classes, elements, options); + + for (var attr in group.attributes) { + if (attr !== "class" && group.attributes.hasOwnProperty(attr)) { + span.setAttribute(attr, group.attributes[attr]); + } + } + + return span; + }, + mathmlBuilder: (group, options) => { + return buildExpressionRow(group.body, options); + } +}); + +defineFunction({ + type: "htmlmathml", + names: ["\\html@mathml"], + props: { + numArgs: 2, + allowedInText: true + }, + handler: (_ref, args) => { + var { + parser + } = _ref; + return { + type: "htmlmathml", + mode: parser.mode, + html: ordargument(args[0]), + mathml: ordargument(args[1]) + }; + }, + htmlBuilder: (group, options) => { + var elements = buildExpression$1(group.html, options, false); + return buildCommon.makeFragment(elements); + }, + mathmlBuilder: (group, options) => { + return buildExpressionRow(group.mathml, options); + } +}); + +var sizeData = function sizeData(str) { + if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(str)) { + // str is a number with no unit specified. + // default unit is bp, per graphix package. + return { + number: +str, + unit: "bp" + }; + } else { + var match = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(str); + + if (!match) { + throw new ParseError("Invalid size: '" + str + "' in \\includegraphics"); + } + + var data = { + number: +(match[1] + match[2]), + // sign + magnitude, cast to number + unit: match[3] + }; + + if (!validUnit(data)) { + throw new ParseError("Invalid unit: '" + data.unit + "' in \\includegraphics."); + } + + return data; + } +}; + +defineFunction({ + type: "includegraphics", + names: ["\\includegraphics"], + props: { + numArgs: 1, + numOptionalArgs: 1, + argTypes: ["raw", "url"], + allowedInText: false + }, + handler: (_ref, args, optArgs) => { + var { + parser + } = _ref; + var width = { + number: 0, + unit: "em" + }; + var height = { + number: 0.9, + unit: "em" + }; // sorta character sized. + + var totalheight = { + number: 0, + unit: "em" + }; + var alt = ""; + + if (optArgs[0]) { + var attributeStr = assertNodeType(optArgs[0], "raw").string; // Parser.js does not parse key/value pairs. We get a string. + + var attributes = attributeStr.split(","); + + for (var i = 0; i < attributes.length; i++) { + var keyVal = attributes[i].split("="); + + if (keyVal.length === 2) { + var str = keyVal[1].trim(); + + switch (keyVal[0].trim()) { + case "alt": + alt = str; + break; + + case "width": + width = sizeData(str); + break; + + case "height": + height = sizeData(str); + break; + + case "totalheight": + totalheight = sizeData(str); + break; + + default: + throw new ParseError("Invalid key: '" + keyVal[0] + "' in \\includegraphics."); + } + } + } + } + + var src = assertNodeType(args[0], "url").url; + + if (alt === "") { + // No alt given. Use the file name. Strip away the path. + alt = src; + alt = alt.replace(/^.*[\\/]/, ''); + alt = alt.substring(0, alt.lastIndexOf('.')); + } + + if (!parser.settings.isTrusted({ + command: "\\includegraphics", + url: src + })) { + return parser.formatUnsupportedCmd("\\includegraphics"); + } + + return { + type: "includegraphics", + mode: parser.mode, + alt: alt, + width: width, + height: height, + totalheight: totalheight, + src: src + }; + }, + htmlBuilder: (group, options) => { + var height = calculateSize(group.height, options); + var depth = 0; + + if (group.totalheight.number > 0) { + depth = calculateSize(group.totalheight, options) - height; + } + + var width = 0; + + if (group.width.number > 0) { + width = calculateSize(group.width, options); + } + + var style = { + height: makeEm(height + depth) + }; + + if (width > 0) { + style.width = makeEm(width); + } + + if (depth > 0) { + style.verticalAlign = makeEm(-depth); + } + + var node = new Img(group.src, group.alt, style); + node.height = height; + node.depth = depth; + return node; + }, + mathmlBuilder: (group, options) => { + var node = new mathMLTree.MathNode("mglyph", []); + node.setAttribute("alt", group.alt); + var height = calculateSize(group.height, options); + var depth = 0; + + if (group.totalheight.number > 0) { + depth = calculateSize(group.totalheight, options) - height; + node.setAttribute("valign", makeEm(-depth)); + } + + node.setAttribute("height", makeEm(height + depth)); + + if (group.width.number > 0) { + var width = calculateSize(group.width, options); + node.setAttribute("width", makeEm(width)); + } + + node.setAttribute("src", group.src); + return node; + } +}); + +// Horizontal spacing commands + +defineFunction({ + type: "kern", + names: ["\\kern", "\\mkern", "\\hskip", "\\mskip"], + props: { + numArgs: 1, + argTypes: ["size"], + primitive: true, + allowedInText: true + }, + + handler(_ref, args) { + var { + parser, + funcName + } = _ref; + var size = assertNodeType(args[0], "size"); + + if (parser.settings.strict) { + var mathFunction = funcName[1] === 'm'; // \mkern, \mskip + + var muUnit = size.value.unit === 'mu'; + + if (mathFunction) { + if (!muUnit) { + parser.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + funcName + " supports only mu units, " + ("not " + size.value.unit + " units")); + } + + if (parser.mode !== "math") { + parser.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + funcName + " works only in math mode"); + } + } else { + // !mathFunction + if (muUnit) { + parser.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + funcName + " doesn't support mu units"); + } + } + } + + return { + type: "kern", + mode: parser.mode, + dimension: size.value + }; + }, + + htmlBuilder(group, options) { + return buildCommon.makeGlue(group.dimension, options); + }, + + mathmlBuilder(group, options) { + var dimension = calculateSize(group.dimension, options); + return new mathMLTree.SpaceNode(dimension); + } + +}); + +// Horizontal overlap functions +defineFunction({ + type: "lap", + names: ["\\mathllap", "\\mathrlap", "\\mathclap"], + props: { + numArgs: 1, + allowedInText: true + }, + handler: (_ref, args) => { + var { + parser, + funcName + } = _ref; + var body = args[0]; + return { + type: "lap", + mode: parser.mode, + alignment: funcName.slice(5), + body + }; + }, + htmlBuilder: (group, options) => { + // mathllap, mathrlap, mathclap + var inner; + + if (group.alignment === "clap") { + // ref: https://www.math.lsu.edu/~aperlis/publications/mathclap/ + inner = buildCommon.makeSpan([], [buildGroup$1(group.body, options)]); // wrap, since CSS will center a .clap > .inner > span + + inner = buildCommon.makeSpan(["inner"], [inner], options); + } else { + inner = buildCommon.makeSpan(["inner"], [buildGroup$1(group.body, options)]); + } + + var fix = buildCommon.makeSpan(["fix"], []); + var node = buildCommon.makeSpan([group.alignment], [inner, fix], options); // At this point, we have correctly set horizontal alignment of the + // two items involved in the lap. + // Next, use a strut to set the height of the HTML bounding box. + // Otherwise, a tall argument may be misplaced. + // This code resolved issue #1153 + + var strut = buildCommon.makeSpan(["strut"]); + strut.style.height = makeEm(node.height + node.depth); + + if (node.depth) { + strut.style.verticalAlign = makeEm(-node.depth); + } + + node.children.unshift(strut); // Next, prevent vertical misplacement when next to something tall. + // This code resolves issue #1234 + + node = buildCommon.makeSpan(["thinbox"], [node], options); + return buildCommon.makeSpan(["mord", "vbox"], [node], options); + }, + mathmlBuilder: (group, options) => { + // mathllap, mathrlap, mathclap + var node = new mathMLTree.MathNode("mpadded", [buildGroup(group.body, options)]); + + if (group.alignment !== "rlap") { + var offset = group.alignment === "llap" ? "-1" : "-0.5"; + node.setAttribute("lspace", offset + "width"); + } + + node.setAttribute("width", "0px"); + return node; + } +}); + +defineFunction({ + type: "styling", + names: ["\\(", "$"], + props: { + numArgs: 0, + allowedInText: true, + allowedInMath: false + }, + + handler(_ref, args) { + var { + funcName, + parser + } = _ref; + var outerMode = parser.mode; + parser.switchMode("math"); + var close = funcName === "\\(" ? "\\)" : "$"; + var body = parser.parseExpression(false, close); + parser.expect(close); + parser.switchMode(outerMode); + return { + type: "styling", + mode: parser.mode, + style: "text", + body + }; + } + +}); // Check for extra closing math delimiters + +defineFunction({ + type: "text", + // Doesn't matter what this is. + names: ["\\)", "\\]"], + props: { + numArgs: 0, + allowedInText: true, + allowedInMath: false + }, + + handler(context, args) { + throw new ParseError("Mismatched " + context.funcName); + } + +}); + +var chooseMathStyle = (group, options) => { + switch (options.style.size) { + case Style$1.DISPLAY.size: + return group.display; + + case Style$1.TEXT.size: + return group.text; + + case Style$1.SCRIPT.size: + return group.script; + + case Style$1.SCRIPTSCRIPT.size: + return group.scriptscript; + + default: + return group.text; + } +}; + +defineFunction({ + type: "mathchoice", + names: ["\\mathchoice"], + props: { + numArgs: 4, + primitive: true + }, + handler: (_ref, args) => { + var { + parser + } = _ref; + return { + type: "mathchoice", + mode: parser.mode, + display: ordargument(args[0]), + text: ordargument(args[1]), + script: ordargument(args[2]), + scriptscript: ordargument(args[3]) + }; + }, + htmlBuilder: (group, options) => { + var body = chooseMathStyle(group, options); + var elements = buildExpression$1(body, options, false); + return buildCommon.makeFragment(elements); + }, + mathmlBuilder: (group, options) => { + var body = chooseMathStyle(group, options); + return buildExpressionRow(body, options); + } +}); + +var assembleSupSub = (base, supGroup, subGroup, options, style, slant, baseShift) => { + base = buildCommon.makeSpan([], [base]); + var subIsSingleCharacter = subGroup && utils.isCharacterBox(subGroup); + var sub; + var sup; // We manually have to handle the superscripts and subscripts. This, + // aside from the kern calculations, is copied from supsub. + + if (supGroup) { + var elem = buildGroup$1(supGroup, options.havingStyle(style.sup()), options); + sup = { + elem, + kern: Math.max(options.fontMetrics().bigOpSpacing1, options.fontMetrics().bigOpSpacing3 - elem.depth) + }; + } + + if (subGroup) { + var _elem = buildGroup$1(subGroup, options.havingStyle(style.sub()), options); + + sub = { + elem: _elem, + kern: Math.max(options.fontMetrics().bigOpSpacing2, options.fontMetrics().bigOpSpacing4 - _elem.height) + }; + } // Build the final group as a vlist of the possible subscript, base, + // and possible superscript. + + + var finalGroup; + + if (sup && sub) { + var bottom = options.fontMetrics().bigOpSpacing5 + sub.elem.height + sub.elem.depth + sub.kern + base.depth + baseShift; + finalGroup = buildCommon.makeVList({ + positionType: "bottom", + positionData: bottom, + children: [{ + type: "kern", + size: options.fontMetrics().bigOpSpacing5 + }, { + type: "elem", + elem: sub.elem, + marginLeft: makeEm(-slant) + }, { + type: "kern", + size: sub.kern + }, { + type: "elem", + elem: base + }, { + type: "kern", + size: sup.kern + }, { + type: "elem", + elem: sup.elem, + marginLeft: makeEm(slant) + }, { + type: "kern", + size: options.fontMetrics().bigOpSpacing5 + }] + }, options); + } else if (sub) { + var top = base.height - baseShift; // Shift the limits by the slant of the symbol. Note + // that we are supposed to shift the limits by 1/2 of the slant, + // but since we are centering the limits adding a full slant of + // margin will shift by 1/2 that. + + finalGroup = buildCommon.makeVList({ + positionType: "top", + positionData: top, + children: [{ + type: "kern", + size: options.fontMetrics().bigOpSpacing5 + }, { + type: "elem", + elem: sub.elem, + marginLeft: makeEm(-slant) + }, { + type: "kern", + size: sub.kern + }, { + type: "elem", + elem: base + }] + }, options); + } else if (sup) { + var _bottom = base.depth + baseShift; + + finalGroup = buildCommon.makeVList({ + positionType: "bottom", + positionData: _bottom, + children: [{ + type: "elem", + elem: base + }, { + type: "kern", + size: sup.kern + }, { + type: "elem", + elem: sup.elem, + marginLeft: makeEm(slant) + }, { + type: "kern", + size: options.fontMetrics().bigOpSpacing5 + }] + }, options); + } else { + // This case probably shouldn't occur (this would mean the + // supsub was sending us a group with no superscript or + // subscript) but be safe. + return base; + } + + var parts = [finalGroup]; + + if (sub && slant !== 0 && !subIsSingleCharacter) { + // A negative margin-left was applied to the lower limit. + // Avoid an overlap by placing a spacer on the left on the group. + var spacer = buildCommon.makeSpan(["mspace"], [], options); + spacer.style.marginRight = makeEm(slant); + parts.unshift(spacer); + } + + return buildCommon.makeSpan(["mop", "op-limits"], parts, options); +}; + +// Limits, symbols +// Most operators have a large successor symbol, but these don't. +var noSuccessor = ["\\smallint"]; // NOTE: Unlike most `htmlBuilder`s, this one handles not only "op", but also +// "supsub" since some of them (like \int) can affect super/subscripting. + +var htmlBuilder$2 = (grp, options) => { + // Operators are handled in the TeXbook pg. 443-444, rule 13(a). + var supGroup; + var subGroup; + var hasLimits = false; + var group; + + if (grp.type === "supsub") { + // If we have limits, supsub will pass us its group to handle. Pull + // out the superscript and subscript and set the group to the op in + // its base. + supGroup = grp.sup; + subGroup = grp.sub; + group = assertNodeType(grp.base, "op"); + hasLimits = true; + } else { + group = assertNodeType(grp, "op"); + } + + var style = options.style; + var large = false; + + if (style.size === Style$1.DISPLAY.size && group.symbol && !utils.contains(noSuccessor, group.name)) { + // Most symbol operators get larger in displaystyle (rule 13) + large = true; + } + + var base; + + if (group.symbol) { + // If this is a symbol, create the symbol. + var fontName = large ? "Size2-Regular" : "Size1-Regular"; + var stash = ""; + + if (group.name === "\\oiint" || group.name === "\\oiiint") { + // No font glyphs yet, so use a glyph w/o the oval. + // TODO: When font glyphs are available, delete this code. + stash = group.name.slice(1); + group.name = stash === "oiint" ? "\\iint" : "\\iiint"; + } + + base = buildCommon.makeSymbol(group.name, fontName, "math", options, ["mop", "op-symbol", large ? "large-op" : "small-op"]); + + if (stash.length > 0) { + // We're in \oiint or \oiiint. Overlay the oval. + // TODO: When font glyphs are available, delete this code. + var italic = base.italic; + var oval = buildCommon.staticSvg(stash + "Size" + (large ? "2" : "1"), options); + base = buildCommon.makeVList({ + positionType: "individualShift", + children: [{ + type: "elem", + elem: base, + shift: 0 + }, { + type: "elem", + elem: oval, + shift: large ? 0.08 : 0 + }] + }, options); + group.name = "\\" + stash; + base.classes.unshift("mop"); // $FlowFixMe + + base.italic = italic; + } + } else if (group.body) { + // If this is a list, compose that list. + var inner = buildExpression$1(group.body, options, true); + + if (inner.length === 1 && inner[0] instanceof SymbolNode) { + base = inner[0]; + base.classes[0] = "mop"; // replace old mclass + } else { + base = buildCommon.makeSpan(["mop"], inner, options); + } + } else { + // Otherwise, this is a text operator. Build the text from the + // operator's name. + var output = []; + + for (var i = 1; i < group.name.length; i++) { + output.push(buildCommon.mathsym(group.name[i], group.mode, options)); + } + + base = buildCommon.makeSpan(["mop"], output, options); + } // If content of op is a single symbol, shift it vertically. + + + var baseShift = 0; + var slant = 0; + + if ((base instanceof SymbolNode || group.name === "\\oiint" || group.name === "\\oiiint") && !group.suppressBaseShift) { + // We suppress the shift of the base of \overset and \underset. Otherwise, + // shift the symbol so its center lies on the axis (rule 13). It + // appears that our fonts have the centers of the symbols already + // almost on the axis, so these numbers are very small. Note we + // don't actually apply this here, but instead it is used either in + // the vlist creation or separately when there are no limits. + baseShift = (base.height - base.depth) / 2 - options.fontMetrics().axisHeight; // The slant of the symbol is just its italic correction. + // $FlowFixMe + + slant = base.italic; + } + + if (hasLimits) { + return assembleSupSub(base, supGroup, subGroup, options, style, slant, baseShift); + } else { + if (baseShift) { + base.style.position = "relative"; + base.style.top = makeEm(baseShift); + } + + return base; + } +}; + +var mathmlBuilder$1 = (group, options) => { + var node; + + if (group.symbol) { + // This is a symbol. Just add the symbol. + node = new MathNode("mo", [makeText(group.name, group.mode)]); + + if (utils.contains(noSuccessor, group.name)) { + node.setAttribute("largeop", "false"); + } + } else if (group.body) { + // This is an operator with children. Add them. + node = new MathNode("mo", buildExpression(group.body, options)); + } else { + // This is a text operator. Add all of the characters from the + // operator's name. + node = new MathNode("mi", [new TextNode(group.name.slice(1))]); // Append an . + // ref: https://www.w3.org/TR/REC-MathML/chap3_2.html#sec3.2.4 + + var operator = new MathNode("mo", [makeText("\u2061", "text")]); + + if (group.parentIsSupSub) { + node = new MathNode("mrow", [node, operator]); + } else { + node = newDocumentFragment([node, operator]); + } + } + + return node; +}; + +var singleCharBigOps = { + "\u220F": "\\prod", + "\u2210": "\\coprod", + "\u2211": "\\sum", + "\u22c0": "\\bigwedge", + "\u22c1": "\\bigvee", + "\u22c2": "\\bigcap", + "\u22c3": "\\bigcup", + "\u2a00": "\\bigodot", + "\u2a01": "\\bigoplus", + "\u2a02": "\\bigotimes", + "\u2a04": "\\biguplus", + "\u2a06": "\\bigsqcup" +}; +defineFunction({ + type: "op", + names: ["\\coprod", "\\bigvee", "\\bigwedge", "\\biguplus", "\\bigcap", "\\bigcup", "\\intop", "\\prod", "\\sum", "\\bigotimes", "\\bigoplus", "\\bigodot", "\\bigsqcup", "\\smallint", "\u220F", "\u2210", "\u2211", "\u22c0", "\u22c1", "\u22c2", "\u22c3", "\u2a00", "\u2a01", "\u2a02", "\u2a04", "\u2a06"], + props: { + numArgs: 0 + }, + handler: (_ref, args) => { + var { + parser, + funcName + } = _ref; + var fName = funcName; + + if (fName.length === 1) { + fName = singleCharBigOps[fName]; + } + + return { + type: "op", + mode: parser.mode, + limits: true, + parentIsSupSub: false, + symbol: true, + name: fName + }; + }, + htmlBuilder: htmlBuilder$2, + mathmlBuilder: mathmlBuilder$1 +}); // Note: calling defineFunction with a type that's already been defined only +// works because the same htmlBuilder and mathmlBuilder are being used. + +defineFunction({ + type: "op", + names: ["\\mathop"], + props: { + numArgs: 1, + primitive: true + }, + handler: (_ref2, args) => { + var { + parser + } = _ref2; + var body = args[0]; + return { + type: "op", + mode: parser.mode, + limits: false, + parentIsSupSub: false, + symbol: false, + body: ordargument(body) + }; + }, + htmlBuilder: htmlBuilder$2, + mathmlBuilder: mathmlBuilder$1 +}); // There are 2 flags for operators; whether they produce limits in +// displaystyle, and whether they are symbols and should grow in +// displaystyle. These four groups cover the four possible choices. + +var singleCharIntegrals = { + "\u222b": "\\int", + "\u222c": "\\iint", + "\u222d": "\\iiint", + "\u222e": "\\oint", + "\u222f": "\\oiint", + "\u2230": "\\oiiint" +}; // No limits, not symbols + +defineFunction({ + type: "op", + names: ["\\arcsin", "\\arccos", "\\arctan", "\\arctg", "\\arcctg", "\\arg", "\\ch", "\\cos", "\\cosec", "\\cosh", "\\cot", "\\cotg", "\\coth", "\\csc", "\\ctg", "\\cth", "\\deg", "\\dim", "\\exp", "\\hom", "\\ker", "\\lg", "\\ln", "\\log", "\\sec", "\\sin", "\\sinh", "\\sh", "\\tan", "\\tanh", "\\tg", "\\th"], + props: { + numArgs: 0 + }, + + handler(_ref3) { + var { + parser, + funcName + } = _ref3; + return { + type: "op", + mode: parser.mode, + limits: false, + parentIsSupSub: false, + symbol: false, + name: funcName + }; + }, + + htmlBuilder: htmlBuilder$2, + mathmlBuilder: mathmlBuilder$1 +}); // Limits, not symbols + +defineFunction({ + type: "op", + names: ["\\det", "\\gcd", "\\inf", "\\lim", "\\max", "\\min", "\\Pr", "\\sup"], + props: { + numArgs: 0 + }, + + handler(_ref4) { + var { + parser, + funcName + } = _ref4; + return { + type: "op", + mode: parser.mode, + limits: true, + parentIsSupSub: false, + symbol: false, + name: funcName + }; + }, + + htmlBuilder: htmlBuilder$2, + mathmlBuilder: mathmlBuilder$1 +}); // No limits, symbols + +defineFunction({ + type: "op", + names: ["\\int", "\\iint", "\\iiint", "\\oint", "\\oiint", "\\oiiint", "\u222b", "\u222c", "\u222d", "\u222e", "\u222f", "\u2230"], + props: { + numArgs: 0 + }, + + handler(_ref5) { + var { + parser, + funcName + } = _ref5; + var fName = funcName; + + if (fName.length === 1) { + fName = singleCharIntegrals[fName]; + } + + return { + type: "op", + mode: parser.mode, + limits: false, + parentIsSupSub: false, + symbol: true, + name: fName + }; + }, + + htmlBuilder: htmlBuilder$2, + mathmlBuilder: mathmlBuilder$1 +}); + +// NOTE: Unlike most `htmlBuilder`s, this one handles not only +// "operatorname", but also "supsub" since \operatorname* can +// affect super/subscripting. +var htmlBuilder$1 = (grp, options) => { + // Operators are handled in the TeXbook pg. 443-444, rule 13(a). + var supGroup; + var subGroup; + var hasLimits = false; + var group; + + if (grp.type === "supsub") { + // If we have limits, supsub will pass us its group to handle. Pull + // out the superscript and subscript and set the group to the op in + // its base. + supGroup = grp.sup; + subGroup = grp.sub; + group = assertNodeType(grp.base, "operatorname"); + hasLimits = true; + } else { + group = assertNodeType(grp, "operatorname"); + } + + var base; + + if (group.body.length > 0) { + var body = group.body.map(child => { + // $FlowFixMe: Check if the node has a string `text` property. + var childText = child.text; + + if (typeof childText === "string") { + return { + type: "textord", + mode: child.mode, + text: childText + }; + } else { + return child; + } + }); // Consolidate function names into symbol characters. + + var expression = buildExpression$1(body, options.withFont("mathrm"), true); + + for (var i = 0; i < expression.length; i++) { + var child = expression[i]; + + if (child instanceof SymbolNode) { + // Per amsopn package, + // change minus to hyphen and \ast to asterisk + child.text = child.text.replace(/\u2212/, "-").replace(/\u2217/, "*"); + } + } + + base = buildCommon.makeSpan(["mop"], expression, options); + } else { + base = buildCommon.makeSpan(["mop"], [], options); + } + + if (hasLimits) { + return assembleSupSub(base, supGroup, subGroup, options, options.style, 0, 0); + } else { + return base; + } +}; + +var mathmlBuilder = (group, options) => { + // The steps taken here are similar to the html version. + var expression = buildExpression(group.body, options.withFont("mathrm")); // Is expression a string or has it something like a fraction? + + var isAllString = true; // default + + for (var i = 0; i < expression.length; i++) { + var node = expression[i]; + + if (node instanceof mathMLTree.SpaceNode) ; else if (node instanceof mathMLTree.MathNode) { + switch (node.type) { + case "mi": + case "mn": + case "ms": + case "mspace": + case "mtext": + break; + // Do nothing yet. + + case "mo": + { + var child = node.children[0]; + + if (node.children.length === 1 && child instanceof mathMLTree.TextNode) { + child.text = child.text.replace(/\u2212/, "-").replace(/\u2217/, "*"); + } else { + isAllString = false; + } + + break; + } + + default: + isAllString = false; + } + } else { + isAllString = false; + } + } + + if (isAllString) { + // Write a single TextNode instead of multiple nested tags. + var word = expression.map(node => node.toText()).join(""); + expression = [new mathMLTree.TextNode(word)]; + } + + var identifier = new mathMLTree.MathNode("mi", expression); + identifier.setAttribute("mathvariant", "normal"); // \u2061 is the same as ⁡ + // ref: https://www.w3schools.com/charsets/ref_html_entities_a.asp + + var operator = new mathMLTree.MathNode("mo", [makeText("\u2061", "text")]); + + if (group.parentIsSupSub) { + return new mathMLTree.MathNode("mrow", [identifier, operator]); + } else { + return mathMLTree.newDocumentFragment([identifier, operator]); + } +}; // \operatorname +// amsopn.dtx: \mathop{#1\kern\z@\operator@font#3}\newmcodes@ + + +defineFunction({ + type: "operatorname", + names: ["\\operatorname@", "\\operatornamewithlimits"], + props: { + numArgs: 1 + }, + handler: (_ref, args) => { + var { + parser, + funcName + } = _ref; + var body = args[0]; + return { + type: "operatorname", + mode: parser.mode, + body: ordargument(body), + alwaysHandleSupSub: funcName === "\\operatornamewithlimits", + limits: false, + parentIsSupSub: false + }; + }, + htmlBuilder: htmlBuilder$1, + mathmlBuilder +}); +defineMacro("\\operatorname", "\\@ifstar\\operatornamewithlimits\\operatorname@"); + +defineFunctionBuilders({ + type: "ordgroup", + + htmlBuilder(group, options) { + if (group.semisimple) { + return buildCommon.makeFragment(buildExpression$1(group.body, options, false)); + } + + return buildCommon.makeSpan(["mord"], buildExpression$1(group.body, options, true), options); + }, + + mathmlBuilder(group, options) { + return buildExpressionRow(group.body, options, true); + } + +}); + +defineFunction({ + type: "overline", + names: ["\\overline"], + props: { + numArgs: 1 + }, + + handler(_ref, args) { + var { + parser + } = _ref; + var body = args[0]; + return { + type: "overline", + mode: parser.mode, + body + }; + }, + + htmlBuilder(group, options) { + // Overlines are handled in the TeXbook pg 443, Rule 9. + // Build the inner group in the cramped style. + var innerGroup = buildGroup$1(group.body, options.havingCrampedStyle()); // Create the line above the body + + var line = buildCommon.makeLineSpan("overline-line", options); // Generate the vlist, with the appropriate kerns + + var defaultRuleThickness = options.fontMetrics().defaultRuleThickness; + var vlist = buildCommon.makeVList({ + positionType: "firstBaseline", + children: [{ + type: "elem", + elem: innerGroup + }, { + type: "kern", + size: 3 * defaultRuleThickness + }, { + type: "elem", + elem: line + }, { + type: "kern", + size: defaultRuleThickness + }] + }, options); + return buildCommon.makeSpan(["mord", "overline"], [vlist], options); + }, + + mathmlBuilder(group, options) { + var operator = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode("\u203e")]); + operator.setAttribute("stretchy", "true"); + var node = new mathMLTree.MathNode("mover", [buildGroup(group.body, options), operator]); + node.setAttribute("accent", "true"); + return node; + } + +}); + +defineFunction({ + type: "phantom", + names: ["\\phantom"], + props: { + numArgs: 1, + allowedInText: true + }, + handler: (_ref, args) => { + var { + parser + } = _ref; + var body = args[0]; + return { + type: "phantom", + mode: parser.mode, + body: ordargument(body) + }; + }, + htmlBuilder: (group, options) => { + var elements = buildExpression$1(group.body, options.withPhantom(), false); // \phantom isn't supposed to affect the elements it contains. + // See "color" for more details. + + return buildCommon.makeFragment(elements); + }, + mathmlBuilder: (group, options) => { + var inner = buildExpression(group.body, options); + return new mathMLTree.MathNode("mphantom", inner); + } +}); +defineFunction({ + type: "hphantom", + names: ["\\hphantom"], + props: { + numArgs: 1, + allowedInText: true + }, + handler: (_ref2, args) => { + var { + parser + } = _ref2; + var body = args[0]; + return { + type: "hphantom", + mode: parser.mode, + body + }; + }, + htmlBuilder: (group, options) => { + var node = buildCommon.makeSpan([], [buildGroup$1(group.body, options.withPhantom())]); + node.height = 0; + node.depth = 0; + + if (node.children) { + for (var i = 0; i < node.children.length; i++) { + node.children[i].height = 0; + node.children[i].depth = 0; + } + } // See smash for comment re: use of makeVList + + + node = buildCommon.makeVList({ + positionType: "firstBaseline", + children: [{ + type: "elem", + elem: node + }] + }, options); // For spacing, TeX treats \smash as a math group (same spacing as ord). + + return buildCommon.makeSpan(["mord"], [node], options); + }, + mathmlBuilder: (group, options) => { + var inner = buildExpression(ordargument(group.body), options); + var phantom = new mathMLTree.MathNode("mphantom", inner); + var node = new mathMLTree.MathNode("mpadded", [phantom]); + node.setAttribute("height", "0px"); + node.setAttribute("depth", "0px"); + return node; + } +}); +defineFunction({ + type: "vphantom", + names: ["\\vphantom"], + props: { + numArgs: 1, + allowedInText: true + }, + handler: (_ref3, args) => { + var { + parser + } = _ref3; + var body = args[0]; + return { + type: "vphantom", + mode: parser.mode, + body + }; + }, + htmlBuilder: (group, options) => { + var inner = buildCommon.makeSpan(["inner"], [buildGroup$1(group.body, options.withPhantom())]); + var fix = buildCommon.makeSpan(["fix"], []); + return buildCommon.makeSpan(["mord", "rlap"], [inner, fix], options); + }, + mathmlBuilder: (group, options) => { + var inner = buildExpression(ordargument(group.body), options); + var phantom = new mathMLTree.MathNode("mphantom", inner); + var node = new mathMLTree.MathNode("mpadded", [phantom]); + node.setAttribute("width", "0px"); + return node; + } +}); + +defineFunction({ + type: "raisebox", + names: ["\\raisebox"], + props: { + numArgs: 2, + argTypes: ["size", "hbox"], + allowedInText: true + }, + + handler(_ref, args) { + var { + parser + } = _ref; + var amount = assertNodeType(args[0], "size").value; + var body = args[1]; + return { + type: "raisebox", + mode: parser.mode, + dy: amount, + body + }; + }, + + htmlBuilder(group, options) { + var body = buildGroup$1(group.body, options); + var dy = calculateSize(group.dy, options); + return buildCommon.makeVList({ + positionType: "shift", + positionData: -dy, + children: [{ + type: "elem", + elem: body + }] + }, options); + }, + + mathmlBuilder(group, options) { + var node = new mathMLTree.MathNode("mpadded", [buildGroup(group.body, options)]); + var dy = group.dy.number + group.dy.unit; + node.setAttribute("voffset", dy); + return node; + } + +}); + +defineFunction({ + type: "internal", + names: ["\\relax"], + props: { + numArgs: 0, + allowedInText: true + }, + + handler(_ref) { + var { + parser + } = _ref; + return { + type: "internal", + mode: parser.mode + }; + } + +}); + +defineFunction({ + type: "rule", + names: ["\\rule"], + props: { + numArgs: 2, + numOptionalArgs: 1, + argTypes: ["size", "size", "size"] + }, + + handler(_ref, args, optArgs) { + var { + parser + } = _ref; + var shift = optArgs[0]; + var width = assertNodeType(args[0], "size"); + var height = assertNodeType(args[1], "size"); + return { + type: "rule", + mode: parser.mode, + shift: shift && assertNodeType(shift, "size").value, + width: width.value, + height: height.value + }; + }, + + htmlBuilder(group, options) { + // Make an empty span for the rule + var rule = buildCommon.makeSpan(["mord", "rule"], [], options); // Calculate the shift, width, and height of the rule, and account for units + + var width = calculateSize(group.width, options); + var height = calculateSize(group.height, options); + var shift = group.shift ? calculateSize(group.shift, options) : 0; // Style the rule to the right size + + rule.style.borderRightWidth = makeEm(width); + rule.style.borderTopWidth = makeEm(height); + rule.style.bottom = makeEm(shift); // Record the height and width + + rule.width = width; + rule.height = height + shift; + rule.depth = -shift; // Font size is the number large enough that the browser will + // reserve at least `absHeight` space above the baseline. + // The 1.125 factor was empirically determined + + rule.maxFontSize = height * 1.125 * options.sizeMultiplier; + return rule; + }, + + mathmlBuilder(group, options) { + var width = calculateSize(group.width, options); + var height = calculateSize(group.height, options); + var shift = group.shift ? calculateSize(group.shift, options) : 0; + var color = options.color && options.getColor() || "black"; + var rule = new mathMLTree.MathNode("mspace"); + rule.setAttribute("mathbackground", color); + rule.setAttribute("width", makeEm(width)); + rule.setAttribute("height", makeEm(height)); + var wrapper = new mathMLTree.MathNode("mpadded", [rule]); + + if (shift >= 0) { + wrapper.setAttribute("height", makeEm(shift)); + } else { + wrapper.setAttribute("height", makeEm(shift)); + wrapper.setAttribute("depth", makeEm(-shift)); + } + + wrapper.setAttribute("voffset", makeEm(shift)); + return wrapper; + } + +}); + +function sizingGroup(value, options, baseOptions) { + var inner = buildExpression$1(value, options, false); + var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier; // Add size-resetting classes to the inner list and set maxFontSize + // manually. Handle nested size changes. + + for (var i = 0; i < inner.length; i++) { + var pos = inner[i].classes.indexOf("sizing"); + + if (pos < 0) { + Array.prototype.push.apply(inner[i].classes, options.sizingClasses(baseOptions)); + } else if (inner[i].classes[pos + 1] === "reset-size" + options.size) { + // This is a nested size change: e.g., inner[i] is the "b" in + // `\Huge a \small b`. Override the old size (the `reset-` class) + // but not the new size. + inner[i].classes[pos + 1] = "reset-size" + baseOptions.size; + } + + inner[i].height *= multiplier; + inner[i].depth *= multiplier; + } + + return buildCommon.makeFragment(inner); +} +var sizeFuncs = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"]; +var htmlBuilder = (group, options) => { + // Handle sizing operators like \Huge. Real TeX doesn't actually allow + // these functions inside of math expressions, so we do some special + // handling. + var newOptions = options.havingSize(group.size); + return sizingGroup(group.body, newOptions, options); +}; +defineFunction({ + type: "sizing", + names: sizeFuncs, + props: { + numArgs: 0, + allowedInText: true + }, + handler: (_ref, args) => { + var { + breakOnTokenText, + funcName, + parser + } = _ref; + var body = parser.parseExpression(false, breakOnTokenText); + return { + type: "sizing", + mode: parser.mode, + // Figure out what size to use based on the list of functions above + size: sizeFuncs.indexOf(funcName) + 1, + body + }; + }, + htmlBuilder, + mathmlBuilder: (group, options) => { + var newOptions = options.havingSize(group.size); + var inner = buildExpression(group.body, newOptions); + var node = new mathMLTree.MathNode("mstyle", inner); // TODO(emily): This doesn't produce the correct size for nested size + // changes, because we don't keep state of what style we're currently + // in, so we can't reset the size to normal before changing it. Now + // that we're passing an options parameter we should be able to fix + // this. + + node.setAttribute("mathsize", makeEm(newOptions.sizeMultiplier)); + return node; + } +}); + +// smash, with optional [tb], as in AMS +defineFunction({ + type: "smash", + names: ["\\smash"], + props: { + numArgs: 1, + numOptionalArgs: 1, + allowedInText: true + }, + handler: (_ref, args, optArgs) => { + var { + parser + } = _ref; + var smashHeight = false; + var smashDepth = false; + var tbArg = optArgs[0] && assertNodeType(optArgs[0], "ordgroup"); + + if (tbArg) { + // Optional [tb] argument is engaged. + // ref: amsmath: \renewcommand{\smash}[1][tb]{% + // def\mb@t{\ht}\def\mb@b{\dp}\def\mb@tb{\ht\z@\z@\dp}% + var letter = ""; + + for (var i = 0; i < tbArg.body.length; ++i) { + var node = tbArg.body[i]; // $FlowFixMe: Not every node type has a `text` property. + + letter = node.text; + + if (letter === "t") { + smashHeight = true; + } else if (letter === "b") { + smashDepth = true; + } else { + smashHeight = false; + smashDepth = false; + break; + } + } + } else { + smashHeight = true; + smashDepth = true; + } + + var body = args[0]; + return { + type: "smash", + mode: parser.mode, + body, + smashHeight, + smashDepth + }; + }, + htmlBuilder: (group, options) => { + var node = buildCommon.makeSpan([], [buildGroup$1(group.body, options)]); + + if (!group.smashHeight && !group.smashDepth) { + return node; + } + + if (group.smashHeight) { + node.height = 0; // In order to influence makeVList, we have to reset the children. + + if (node.children) { + for (var i = 0; i < node.children.length; i++) { + node.children[i].height = 0; + } + } + } + + if (group.smashDepth) { + node.depth = 0; + + if (node.children) { + for (var _i = 0; _i < node.children.length; _i++) { + node.children[_i].depth = 0; + } + } + } // At this point, we've reset the TeX-like height and depth values. + // But the span still has an HTML line height. + // makeVList applies "display: table-cell", which prevents the browser + // from acting on that line height. So we'll call makeVList now. + + + var smashedNode = buildCommon.makeVList({ + positionType: "firstBaseline", + children: [{ + type: "elem", + elem: node + }] + }, options); // For spacing, TeX treats \hphantom as a math group (same spacing as ord). + + return buildCommon.makeSpan(["mord"], [smashedNode], options); + }, + mathmlBuilder: (group, options) => { + var node = new mathMLTree.MathNode("mpadded", [buildGroup(group.body, options)]); + + if (group.smashHeight) { + node.setAttribute("height", "0px"); + } + + if (group.smashDepth) { + node.setAttribute("depth", "0px"); + } + + return node; + } +}); + +defineFunction({ + type: "sqrt", + names: ["\\sqrt"], + props: { + numArgs: 1, + numOptionalArgs: 1 + }, + + handler(_ref, args, optArgs) { + var { + parser + } = _ref; + var index = optArgs[0]; + var body = args[0]; + return { + type: "sqrt", + mode: parser.mode, + body, + index + }; + }, + + htmlBuilder(group, options) { + // Square roots are handled in the TeXbook pg. 443, Rule 11. + // First, we do the same steps as in overline to build the inner group + // and line + var inner = buildGroup$1(group.body, options.havingCrampedStyle()); + + if (inner.height === 0) { + // Render a small surd. + inner.height = options.fontMetrics().xHeight; + } // Some groups can return document fragments. Handle those by wrapping + // them in a span. + + + inner = buildCommon.wrapFragment(inner, options); // Calculate the minimum size for the \surd delimiter + + var metrics = options.fontMetrics(); + var theta = metrics.defaultRuleThickness; + var phi = theta; + + if (options.style.id < Style$1.TEXT.id) { + phi = options.fontMetrics().xHeight; + } // Calculate the clearance between the body and line + + + var lineClearance = theta + phi / 4; + var minDelimiterHeight = inner.height + inner.depth + lineClearance + theta; // Create a sqrt SVG of the required minimum size + + var { + span: img, + ruleWidth, + advanceWidth + } = delimiter.sqrtImage(minDelimiterHeight, options); + var delimDepth = img.height - ruleWidth; // Adjust the clearance based on the delimiter size + + if (delimDepth > inner.height + inner.depth + lineClearance) { + lineClearance = (lineClearance + delimDepth - inner.height - inner.depth) / 2; + } // Shift the sqrt image + + + var imgShift = img.height - inner.height - lineClearance - ruleWidth; + inner.style.paddingLeft = makeEm(advanceWidth); // Overlay the image and the argument. + + var body = buildCommon.makeVList({ + positionType: "firstBaseline", + children: [{ + type: "elem", + elem: inner, + wrapperClasses: ["svg-align"] + }, { + type: "kern", + size: -(inner.height + imgShift) + }, { + type: "elem", + elem: img + }, { + type: "kern", + size: ruleWidth + }] + }, options); + + if (!group.index) { + return buildCommon.makeSpan(["mord", "sqrt"], [body], options); + } else { + // Handle the optional root index + // The index is always in scriptscript style + var newOptions = options.havingStyle(Style$1.SCRIPTSCRIPT); + var rootm = buildGroup$1(group.index, newOptions, options); // The amount the index is shifted by. This is taken from the TeX + // source, in the definition of `\r@@t`. + + var toShift = 0.6 * (body.height - body.depth); // Build a VList with the superscript shifted up correctly + + var rootVList = buildCommon.makeVList({ + positionType: "shift", + positionData: -toShift, + children: [{ + type: "elem", + elem: rootm + }] + }, options); // Add a class surrounding it so we can add on the appropriate + // kerning + + var rootVListWrap = buildCommon.makeSpan(["root"], [rootVList]); + return buildCommon.makeSpan(["mord", "sqrt"], [rootVListWrap, body], options); + } + }, + + mathmlBuilder(group, options) { + var { + body, + index + } = group; + return index ? new mathMLTree.MathNode("mroot", [buildGroup(body, options), buildGroup(index, options)]) : new mathMLTree.MathNode("msqrt", [buildGroup(body, options)]); + } + +}); + +var styleMap = { + "display": Style$1.DISPLAY, + "text": Style$1.TEXT, + "script": Style$1.SCRIPT, + "scriptscript": Style$1.SCRIPTSCRIPT +}; +defineFunction({ + type: "styling", + names: ["\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle"], + props: { + numArgs: 0, + allowedInText: true, + primitive: true + }, + + handler(_ref, args) { + var { + breakOnTokenText, + funcName, + parser + } = _ref; + // parse out the implicit body + var body = parser.parseExpression(true, breakOnTokenText); // TODO: Refactor to avoid duplicating styleMap in multiple places (e.g. + // here and in buildHTML and de-dupe the enumeration of all the styles). + // $FlowFixMe: The names above exactly match the styles. + + var style = funcName.slice(1, funcName.length - 5); + return { + type: "styling", + mode: parser.mode, + // Figure out what style to use by pulling out the style from + // the function name + style, + body + }; + }, + + htmlBuilder(group, options) { + // Style changes are handled in the TeXbook on pg. 442, Rule 3. + var newStyle = styleMap[group.style]; + var newOptions = options.havingStyle(newStyle).withFont(''); + return sizingGroup(group.body, newOptions, options); + }, + + mathmlBuilder(group, options) { + // Figure out what style we're changing to. + var newStyle = styleMap[group.style]; + var newOptions = options.havingStyle(newStyle); + var inner = buildExpression(group.body, newOptions); + var node = new mathMLTree.MathNode("mstyle", inner); + var styleAttributes = { + "display": ["0", "true"], + "text": ["0", "false"], + "script": ["1", "false"], + "scriptscript": ["2", "false"] + }; + var attr = styleAttributes[group.style]; + node.setAttribute("scriptlevel", attr[0]); + node.setAttribute("displaystyle", attr[1]); + return node; + } + +}); + +/** + * Sometimes, groups perform special rules when they have superscripts or + * subscripts attached to them. This function lets the `supsub` group know that + * Sometimes, groups perform special rules when they have superscripts or + * its inner element should handle the superscripts and subscripts instead of + * handling them itself. + */ +var htmlBuilderDelegate = function htmlBuilderDelegate(group, options) { + var base = group.base; + + if (!base) { + return null; + } else if (base.type === "op") { + // Operators handle supsubs differently when they have limits + // (e.g. `\displaystyle\sum_2^3`) + var delegate = base.limits && (options.style.size === Style$1.DISPLAY.size || base.alwaysHandleSupSub); + return delegate ? htmlBuilder$2 : null; + } else if (base.type === "operatorname") { + var _delegate = base.alwaysHandleSupSub && (options.style.size === Style$1.DISPLAY.size || base.limits); + + return _delegate ? htmlBuilder$1 : null; + } else if (base.type === "accent") { + return utils.isCharacterBox(base.base) ? htmlBuilder$a : null; + } else if (base.type === "horizBrace") { + var isSup = !group.sub; + return isSup === base.isOver ? htmlBuilder$3 : null; + } else { + return null; + } +}; // Super scripts and subscripts, whose precise placement can depend on other +// functions that precede them. + + +defineFunctionBuilders({ + type: "supsub", + + htmlBuilder(group, options) { + // Superscript and subscripts are handled in the TeXbook on page + // 445-446, rules 18(a-f). + // Here is where we defer to the inner group if it should handle + // superscripts and subscripts itself. + var builderDelegate = htmlBuilderDelegate(group, options); + + if (builderDelegate) { + return builderDelegate(group, options); + } + + var { + base: valueBase, + sup: valueSup, + sub: valueSub + } = group; + var base = buildGroup$1(valueBase, options); + var supm; + var subm; + var metrics = options.fontMetrics(); // Rule 18a + + var supShift = 0; + var subShift = 0; + var isCharacterBox = valueBase && utils.isCharacterBox(valueBase); + + if (valueSup) { + var newOptions = options.havingStyle(options.style.sup()); + supm = buildGroup$1(valueSup, newOptions, options); + + if (!isCharacterBox) { + supShift = base.height - newOptions.fontMetrics().supDrop * newOptions.sizeMultiplier / options.sizeMultiplier; + } + } + + if (valueSub) { + var _newOptions = options.havingStyle(options.style.sub()); + + subm = buildGroup$1(valueSub, _newOptions, options); + + if (!isCharacterBox) { + subShift = base.depth + _newOptions.fontMetrics().subDrop * _newOptions.sizeMultiplier / options.sizeMultiplier; + } + } // Rule 18c + + + var minSupShift; + + if (options.style === Style$1.DISPLAY) { + minSupShift = metrics.sup1; + } else if (options.style.cramped) { + minSupShift = metrics.sup3; + } else { + minSupShift = metrics.sup2; + } // scriptspace is a font-size-independent size, so scale it + // appropriately for use as the marginRight. + + + var multiplier = options.sizeMultiplier; + var marginRight = makeEm(0.5 / metrics.ptPerEm / multiplier); + var marginLeft = null; + + if (subm) { + // Subscripts shouldn't be shifted by the base's italic correction. + // Account for that by shifting the subscript back the appropriate + // amount. Note we only do this when the base is a single symbol. + var isOiint = group.base && group.base.type === "op" && group.base.name && (group.base.name === "\\oiint" || group.base.name === "\\oiiint"); + + if (base instanceof SymbolNode || isOiint) { + // $FlowFixMe + marginLeft = makeEm(-base.italic); + } + } + + var supsub; + + if (supm && subm) { + supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight); + subShift = Math.max(subShift, metrics.sub2); + var ruleWidth = metrics.defaultRuleThickness; // Rule 18e + + var maxWidth = 4 * ruleWidth; + + if (supShift - supm.depth - (subm.height - subShift) < maxWidth) { + subShift = maxWidth - (supShift - supm.depth) + subm.height; + var psi = 0.8 * metrics.xHeight - (supShift - supm.depth); + + if (psi > 0) { + supShift += psi; + subShift -= psi; + } + } + + var vlistElem = [{ + type: "elem", + elem: subm, + shift: subShift, + marginRight, + marginLeft + }, { + type: "elem", + elem: supm, + shift: -supShift, + marginRight + }]; + supsub = buildCommon.makeVList({ + positionType: "individualShift", + children: vlistElem + }, options); + } else if (subm) { + // Rule 18b + subShift = Math.max(subShift, metrics.sub1, subm.height - 0.8 * metrics.xHeight); + var _vlistElem = [{ + type: "elem", + elem: subm, + marginLeft, + marginRight + }]; + supsub = buildCommon.makeVList({ + positionType: "shift", + positionData: subShift, + children: _vlistElem + }, options); + } else if (supm) { + // Rule 18c, d + supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight); + supsub = buildCommon.makeVList({ + positionType: "shift", + positionData: -supShift, + children: [{ + type: "elem", + elem: supm, + marginRight + }] + }, options); + } else { + throw new Error("supsub must have either sup or sub."); + } // Wrap the supsub vlist in a span.msupsub to reset text-align. + + + var mclass = getTypeOfDomTree(base, "right") || "mord"; + return buildCommon.makeSpan([mclass], [base, buildCommon.makeSpan(["msupsub"], [supsub])], options); + }, + + mathmlBuilder(group, options) { + // Is the inner group a relevant horizonal brace? + var isBrace = false; + var isOver; + var isSup; + + if (group.base && group.base.type === "horizBrace") { + isSup = !!group.sup; + + if (isSup === group.base.isOver) { + isBrace = true; + isOver = group.base.isOver; + } + } + + if (group.base && (group.base.type === "op" || group.base.type === "operatorname")) { + group.base.parentIsSupSub = true; + } + + var children = [buildGroup(group.base, options)]; + + if (group.sub) { + children.push(buildGroup(group.sub, options)); + } + + if (group.sup) { + children.push(buildGroup(group.sup, options)); + } + + var nodeType; + + if (isBrace) { + nodeType = isOver ? "mover" : "munder"; + } else if (!group.sub) { + var base = group.base; + + if (base && base.type === "op" && base.limits && (options.style === Style$1.DISPLAY || base.alwaysHandleSupSub)) { + nodeType = "mover"; + } else if (base && base.type === "operatorname" && base.alwaysHandleSupSub && (base.limits || options.style === Style$1.DISPLAY)) { + nodeType = "mover"; + } else { + nodeType = "msup"; + } + } else if (!group.sup) { + var _base = group.base; + + if (_base && _base.type === "op" && _base.limits && (options.style === Style$1.DISPLAY || _base.alwaysHandleSupSub)) { + nodeType = "munder"; + } else if (_base && _base.type === "operatorname" && _base.alwaysHandleSupSub && (_base.limits || options.style === Style$1.DISPLAY)) { + nodeType = "munder"; + } else { + nodeType = "msub"; + } + } else { + var _base2 = group.base; + + if (_base2 && _base2.type === "op" && _base2.limits && options.style === Style$1.DISPLAY) { + nodeType = "munderover"; + } else if (_base2 && _base2.type === "operatorname" && _base2.alwaysHandleSupSub && (options.style === Style$1.DISPLAY || _base2.limits)) { + nodeType = "munderover"; + } else { + nodeType = "msubsup"; + } + } + + return new mathMLTree.MathNode(nodeType, children); + } + +}); + +defineFunctionBuilders({ + type: "atom", + + htmlBuilder(group, options) { + return buildCommon.mathsym(group.text, group.mode, options, ["m" + group.family]); + }, + + mathmlBuilder(group, options) { + var node = new mathMLTree.MathNode("mo", [makeText(group.text, group.mode)]); + + if (group.family === "bin") { + var variant = getVariant(group, options); + + if (variant === "bold-italic") { + node.setAttribute("mathvariant", variant); + } + } else if (group.family === "punct") { + node.setAttribute("separator", "true"); + } else if (group.family === "open" || group.family === "close") { + // Delims built here should not stretch vertically. + // See delimsizing.js for stretchy delims. + node.setAttribute("stretchy", "false"); + } + + return node; + } + +}); + +// "mathord" and "textord" ParseNodes created in Parser.js from symbol Groups in +// src/symbols.js. +var defaultVariant = { + "mi": "italic", + "mn": "normal", + "mtext": "normal" +}; +defineFunctionBuilders({ + type: "mathord", + + htmlBuilder(group, options) { + return buildCommon.makeOrd(group, options, "mathord"); + }, + + mathmlBuilder(group, options) { + var node = new mathMLTree.MathNode("mi", [makeText(group.text, group.mode, options)]); + var variant = getVariant(group, options) || "italic"; + + if (variant !== defaultVariant[node.type]) { + node.setAttribute("mathvariant", variant); + } + + return node; + } + +}); +defineFunctionBuilders({ + type: "textord", + + htmlBuilder(group, options) { + return buildCommon.makeOrd(group, options, "textord"); + }, + + mathmlBuilder(group, options) { + var text = makeText(group.text, group.mode, options); + var variant = getVariant(group, options) || "normal"; + var node; + + if (group.mode === 'text') { + node = new mathMLTree.MathNode("mtext", [text]); + } else if (/[0-9]/.test(group.text)) { + node = new mathMLTree.MathNode("mn", [text]); + } else if (group.text === "\\prime") { + node = new mathMLTree.MathNode("mo", [text]); + } else { + node = new mathMLTree.MathNode("mi", [text]); + } + + if (variant !== defaultVariant[node.type]) { + node.setAttribute("mathvariant", variant); + } + + return node; + } + +}); + +var cssSpace = { + "\\nobreak": "nobreak", + "\\allowbreak": "allowbreak" +}; // A lookup table to determine whether a spacing function/symbol should be +// treated like a regular space character. If a symbol or command is a key +// in this table, then it should be a regular space character. Furthermore, +// the associated value may have a `className` specifying an extra CSS class +// to add to the created `span`. + +var regularSpace = { + " ": {}, + "\\ ": {}, + "~": { + className: "nobreak" + }, + "\\space": {}, + "\\nobreakspace": { + className: "nobreak" + } +}; // ParseNode<"spacing"> created in Parser.js from the "spacing" symbol Groups in +// src/symbols.js. + +defineFunctionBuilders({ + type: "spacing", + + htmlBuilder(group, options) { + if (regularSpace.hasOwnProperty(group.text)) { + var className = regularSpace[group.text].className || ""; // Spaces are generated by adding an actual space. Each of these + // things has an entry in the symbols table, so these will be turned + // into appropriate outputs. + + if (group.mode === "text") { + var ord = buildCommon.makeOrd(group, options, "textord"); + ord.classes.push(className); + return ord; + } else { + return buildCommon.makeSpan(["mspace", className], [buildCommon.mathsym(group.text, group.mode, options)], options); + } + } else if (cssSpace.hasOwnProperty(group.text)) { + // Spaces based on just a CSS class. + return buildCommon.makeSpan(["mspace", cssSpace[group.text]], [], options); + } else { + throw new ParseError("Unknown type of space \"" + group.text + "\""); + } + }, + + mathmlBuilder(group, options) { + var node; + + if (regularSpace.hasOwnProperty(group.text)) { + node = new mathMLTree.MathNode("mtext", [new mathMLTree.TextNode("\u00a0")]); + } else if (cssSpace.hasOwnProperty(group.text)) { + // CSS-based MathML spaces (\nobreak, \allowbreak) are ignored + return new mathMLTree.MathNode("mspace"); + } else { + throw new ParseError("Unknown type of space \"" + group.text + "\""); + } + + return node; + } + +}); + +var pad = () => { + var padNode = new mathMLTree.MathNode("mtd", []); + padNode.setAttribute("width", "50%"); + return padNode; +}; + +defineFunctionBuilders({ + type: "tag", + + mathmlBuilder(group, options) { + var table = new mathMLTree.MathNode("mtable", [new mathMLTree.MathNode("mtr", [pad(), new mathMLTree.MathNode("mtd", [buildExpressionRow(group.body, options)]), pad(), new mathMLTree.MathNode("mtd", [buildExpressionRow(group.tag, options)])])]); + table.setAttribute("width", "100%"); + return table; // TODO: Left-aligned tags. + // Currently, the group and options passed here do not contain + // enough info to set tag alignment. `leqno` is in Settings but it is + // not passed to Options. On the HTML side, leqno is + // set by a CSS class applied in buildTree.js. That would have worked + // in MathML if browsers supported . Since they don't, we + // need to rewrite the way this function is called. + } + +}); + +var textFontFamilies = { + "\\text": undefined, + "\\textrm": "textrm", + "\\textsf": "textsf", + "\\texttt": "texttt", + "\\textnormal": "textrm" +}; +var textFontWeights = { + "\\textbf": "textbf", + "\\textmd": "textmd" +}; +var textFontShapes = { + "\\textit": "textit", + "\\textup": "textup" +}; + +var optionsWithFont = (group, options) => { + var font = group.font; // Checks if the argument is a font family or a font style. + + if (!font) { + return options; + } else if (textFontFamilies[font]) { + return options.withTextFontFamily(textFontFamilies[font]); + } else if (textFontWeights[font]) { + return options.withTextFontWeight(textFontWeights[font]); + } else if (font === "\\emph") { + return options.fontShape === "textit" ? options.withTextFontShape("textup") : options.withTextFontShape("textit"); + } + + return options.withTextFontShape(textFontShapes[font]); +}; + +defineFunction({ + type: "text", + names: [// Font families + "\\text", "\\textrm", "\\textsf", "\\texttt", "\\textnormal", // Font weights + "\\textbf", "\\textmd", // Font Shapes + "\\textit", "\\textup", "\\emph"], + props: { + numArgs: 1, + argTypes: ["text"], + allowedInArgument: true, + allowedInText: true + }, + + handler(_ref, args) { + var { + parser, + funcName + } = _ref; + var body = args[0]; + return { + type: "text", + mode: parser.mode, + body: ordargument(body), + font: funcName + }; + }, + + htmlBuilder(group, options) { + var newOptions = optionsWithFont(group, options); + var inner = buildExpression$1(group.body, newOptions, true); + return buildCommon.makeSpan(["mord", "text"], inner, newOptions); + }, + + mathmlBuilder(group, options) { + var newOptions = optionsWithFont(group, options); + return buildExpressionRow(group.body, newOptions); + } + +}); + +defineFunction({ + type: "underline", + names: ["\\underline"], + props: { + numArgs: 1, + allowedInText: true + }, + + handler(_ref, args) { + var { + parser + } = _ref; + return { + type: "underline", + mode: parser.mode, + body: args[0] + }; + }, + + htmlBuilder(group, options) { + // Underlines are handled in the TeXbook pg 443, Rule 10. + // Build the inner group. + var innerGroup = buildGroup$1(group.body, options); // Create the line to go below the body + + var line = buildCommon.makeLineSpan("underline-line", options); // Generate the vlist, with the appropriate kerns + + var defaultRuleThickness = options.fontMetrics().defaultRuleThickness; + var vlist = buildCommon.makeVList({ + positionType: "top", + positionData: innerGroup.height, + children: [{ + type: "kern", + size: defaultRuleThickness + }, { + type: "elem", + elem: line + }, { + type: "kern", + size: 3 * defaultRuleThickness + }, { + type: "elem", + elem: innerGroup + }] + }, options); + return buildCommon.makeSpan(["mord", "underline"], [vlist], options); + }, + + mathmlBuilder(group, options) { + var operator = new mathMLTree.MathNode("mo", [new mathMLTree.TextNode("\u203e")]); + operator.setAttribute("stretchy", "true"); + var node = new mathMLTree.MathNode("munder", [buildGroup(group.body, options), operator]); + node.setAttribute("accentunder", "true"); + return node; + } + +}); + +defineFunction({ + type: "vcenter", + names: ["\\vcenter"], + props: { + numArgs: 1, + argTypes: ["original"], + // In LaTeX, \vcenter can act only on a box. + allowedInText: false + }, + + handler(_ref, args) { + var { + parser + } = _ref; + return { + type: "vcenter", + mode: parser.mode, + body: args[0] + }; + }, + + htmlBuilder(group, options) { + var body = buildGroup$1(group.body, options); + var axisHeight = options.fontMetrics().axisHeight; + var dy = 0.5 * (body.height - axisHeight - (body.depth + axisHeight)); + return buildCommon.makeVList({ + positionType: "shift", + positionData: dy, + children: [{ + type: "elem", + elem: body + }] + }, options); + }, + + mathmlBuilder(group, options) { + // There is no way to do this in MathML. + // Write a class as a breadcrumb in case some post-processor wants + // to perform a vcenter adjustment. + return new mathMLTree.MathNode("mpadded", [buildGroup(group.body, options)], ["vcenter"]); + } + +}); + +defineFunction({ + type: "verb", + names: ["\\verb"], + props: { + numArgs: 0, + allowedInText: true + }, + + handler(context, args, optArgs) { + // \verb and \verb* are dealt with directly in Parser.js. + // If we end up here, it's because of a failure to match the two delimiters + // in the regex in Lexer.js. LaTeX raises the following error when \verb is + // terminated by end of line (or file). + throw new ParseError("\\verb ended by end of line instead of matching delimiter"); + }, + + htmlBuilder(group, options) { + var text = makeVerb(group); + var body = []; // \verb enters text mode and therefore is sized like \textstyle + + var newOptions = options.havingStyle(options.style.text()); + + for (var i = 0; i < text.length; i++) { + var c = text[i]; + + if (c === '~') { + c = '\\textasciitilde'; + } + + body.push(buildCommon.makeSymbol(c, "Typewriter-Regular", group.mode, newOptions, ["mord", "texttt"])); + } + + return buildCommon.makeSpan(["mord", "text"].concat(newOptions.sizingClasses(options)), buildCommon.tryCombineChars(body), newOptions); + }, + + mathmlBuilder(group, options) { + var text = new mathMLTree.TextNode(makeVerb(group)); + var node = new mathMLTree.MathNode("mtext", [text]); + node.setAttribute("mathvariant", "monospace"); + return node; + } + +}); +/** + * Converts verb group into body string. + * + * \verb* replaces each space with an open box \u2423 + * \verb replaces each space with a no-break space \xA0 + */ + +var makeVerb = group => group.body.replace(/ /g, group.star ? '\u2423' : '\xA0'); + +/** Include this to ensure that all functions are defined. */ +var functions = _functions; + +/** + * The Lexer class handles tokenizing the input in various ways. Since our + * parser expects us to be able to backtrack, the lexer allows lexing from any + * given starting point. + * + * Its main exposed function is the `lex` function, which takes a position to + * lex from and a type of token to lex. It defers to the appropriate `_innerLex` + * function. + * + * The various `_innerLex` functions perform the actual lexing of different + * kinds. + */ + +/* The following tokenRegex + * - matches typical whitespace (but not NBSP etc.) using its first group + * - does not match any control character \x00-\x1f except whitespace + * - does not match a bare backslash + * - matches any ASCII character except those just mentioned + * - does not match the BMP private use area \uE000-\uF8FF + * - does not match bare surrogate code units + * - matches any BMP character except for those just described + * - matches any valid Unicode surrogate pair + * - matches a backslash followed by one or more whitespace characters + * - matches a backslash followed by one or more letters then whitespace + * - matches a backslash followed by any BMP character + * Capturing groups: + * [1] regular whitespace + * [2] backslash followed by whitespace + * [3] anything else, which may include: + * [4] left character of \verb* + * [5] left character of \verb + * [6] backslash followed by word, excluding any trailing whitespace + * Just because the Lexer matches something doesn't mean it's valid input: + * If there is no matching function or symbol definition, the Parser will + * still reject the input. + */ +var spaceRegexString = "[ \r\n\t]"; +var controlWordRegexString = "\\\\[a-zA-Z@]+"; +var controlSymbolRegexString = "\\\\[^\uD800-\uDFFF]"; +var controlWordWhitespaceRegexString = "(" + controlWordRegexString + ")" + spaceRegexString + "*"; +var controlSpaceRegexString = "\\\\(\n|[ \r\t]+\n?)[ \r\t]*"; +var combiningDiacriticalMarkString = "[\u0300-\u036f]"; +var combiningDiacriticalMarksEndRegex = new RegExp(combiningDiacriticalMarkString + "+$"); +var tokenRegexString = "(" + spaceRegexString + "+)|" + ( // whitespace +controlSpaceRegexString + "|") + // \whitespace +"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]" + ( // single codepoint +combiningDiacriticalMarkString + "*") + // ...plus accents +"|[\uD800-\uDBFF][\uDC00-\uDFFF]" + ( // surrogate pair +combiningDiacriticalMarkString + "*") + // ...plus accents +"|\\\\verb\\*([^]).*?\\4" + // \verb* +"|\\\\verb([^*a-zA-Z]).*?\\5" + ( // \verb unstarred +"|" + controlWordWhitespaceRegexString) + ( // \macroName + spaces +"|" + controlSymbolRegexString + ")"); // \\, \', etc. + +/** Main Lexer class */ + +class Lexer { + // Category codes. The lexer only supports comment characters (14) for now. + // MacroExpander additionally distinguishes active (13). + constructor(input, settings) { + this.input = void 0; + this.settings = void 0; + this.tokenRegex = void 0; + this.catcodes = void 0; + // Separate accents from characters + this.input = input; + this.settings = settings; + this.tokenRegex = new RegExp(tokenRegexString, 'g'); + this.catcodes = { + "%": 14, + // comment character + "~": 13 // active character + + }; + } + + setCatcode(char, code) { + this.catcodes[char] = code; + } + /** + * This function lexes a single token. + */ + + + lex() { + var input = this.input; + var pos = this.tokenRegex.lastIndex; + + if (pos === input.length) { + return new Token("EOF", new SourceLocation(this, pos, pos)); + } + + var match = this.tokenRegex.exec(input); + + if (match === null || match.index !== pos) { + throw new ParseError("Unexpected character: '" + input[pos] + "'", new Token(input[pos], new SourceLocation(this, pos, pos + 1))); + } + + var text = match[6] || match[3] || (match[2] ? "\\ " : " "); + + if (this.catcodes[text] === 14) { + // comment character + var nlIndex = input.indexOf('\n', this.tokenRegex.lastIndex); + + if (nlIndex === -1) { + this.tokenRegex.lastIndex = input.length; // EOF + + this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would " + "fail because of commenting the end of math mode (e.g. $)"); + } else { + this.tokenRegex.lastIndex = nlIndex + 1; + } + + return this.lex(); + } + + return new Token(text, new SourceLocation(this, pos, this.tokenRegex.lastIndex)); + } + +} + +/** + * A `Namespace` refers to a space of nameable things like macros or lengths, + * which can be `set` either globally or local to a nested group, using an + * undo stack similar to how TeX implements this functionality. + * Performance-wise, `get` and local `set` take constant time, while global + * `set` takes time proportional to the depth of group nesting. + */ +class Namespace { + /** + * Both arguments are optional. The first argument is an object of + * built-in mappings which never change. The second argument is an object + * of initial (global-level) mappings, which will constantly change + * according to any global/top-level `set`s done. + */ + constructor(builtins, globalMacros) { + if (builtins === void 0) { + builtins = {}; + } + + if (globalMacros === void 0) { + globalMacros = {}; + } + + this.current = void 0; + this.builtins = void 0; + this.undefStack = void 0; + this.current = globalMacros; + this.builtins = builtins; + this.undefStack = []; + } + /** + * Start a new nested group, affecting future local `set`s. + */ + + + beginGroup() { + this.undefStack.push({}); + } + /** + * End current nested group, restoring values before the group began. + */ + + + endGroup() { + if (this.undefStack.length === 0) { + throw new ParseError("Unbalanced namespace destruction: attempt " + "to pop global namespace; please report this as a bug"); + } + + var undefs = this.undefStack.pop(); + + for (var undef in undefs) { + if (undefs.hasOwnProperty(undef)) { + if (undefs[undef] == null) { + delete this.current[undef]; + } else { + this.current[undef] = undefs[undef]; + } + } + } + } + /** + * Ends all currently nested groups (if any), restoring values before the + * groups began. Useful in case of an error in the middle of parsing. + */ + + + endGroups() { + while (this.undefStack.length > 0) { + this.endGroup(); + } + } + /** + * Detect whether `name` has a definition. Equivalent to + * `get(name) != null`. + */ + + + has(name) { + return this.current.hasOwnProperty(name) || this.builtins.hasOwnProperty(name); + } + /** + * Get the current value of a name, or `undefined` if there is no value. + * + * Note: Do not use `if (namespace.get(...))` to detect whether a macro + * is defined, as the definition may be the empty string which evaluates + * to `false` in JavaScript. Use `if (namespace.get(...) != null)` or + * `if (namespace.has(...))`. + */ + + + get(name) { + if (this.current.hasOwnProperty(name)) { + return this.current[name]; + } else { + return this.builtins[name]; + } + } + /** + * Set the current value of a name, and optionally set it globally too. + * Local set() sets the current value and (when appropriate) adds an undo + * operation to the undo stack. Global set() may change the undo + * operation at every level, so takes time linear in their number. + * A value of undefined means to delete existing definitions. + */ + + + set(name, value, global) { + if (global === void 0) { + global = false; + } + + if (global) { + // Global set is equivalent to setting in all groups. Simulate this + // by destroying any undos currently scheduled for this name, + // and adding an undo with the *new* value (in case it later gets + // locally reset within this environment). + for (var i = 0; i < this.undefStack.length; i++) { + delete this.undefStack[i][name]; + } + + if (this.undefStack.length > 0) { + this.undefStack[this.undefStack.length - 1][name] = value; + } + } else { + // Undo this set at end of this group (possibly to `undefined`), + // unless an undo is already in place, in which case that older + // value is the correct one. + var top = this.undefStack[this.undefStack.length - 1]; + + if (top && !top.hasOwnProperty(name)) { + top[name] = this.current[name]; + } + } + + if (value == null) { + delete this.current[name]; + } else { + this.current[name] = value; + } + } + +} + +/** + * Predefined macros for KaTeX. + * This can be used to define some commands in terms of others. + */ +var macros = _macros; +// macro tools + +defineMacro("\\noexpand", function (context) { + // The expansion is the token itself; but that token is interpreted + // as if its meaning were ‘\relax’ if it is a control sequence that + // would ordinarily be expanded by TeX’s expansion rules. + var t = context.popToken(); + + if (context.isExpandable(t.text)) { + t.noexpand = true; + t.treatAsRelax = true; + } + + return { + tokens: [t], + numArgs: 0 + }; +}); +defineMacro("\\expandafter", function (context) { + // TeX first reads the token that comes immediately after \expandafter, + // without expanding it; let’s call this token t. Then TeX reads the + // token that comes after t (and possibly more tokens, if that token + // has an argument), replacing it by its expansion. Finally TeX puts + // t back in front of that expansion. + var t = context.popToken(); + context.expandOnce(true); // expand only an expandable token + + return { + tokens: [t], + numArgs: 0 + }; +}); // LaTeX's \@firstoftwo{#1}{#2} expands to #1, skipping #2 +// TeX source: \long\def\@firstoftwo#1#2{#1} + +defineMacro("\\@firstoftwo", function (context) { + var args = context.consumeArgs(2); + return { + tokens: args[0], + numArgs: 0 + }; +}); // LaTeX's \@secondoftwo{#1}{#2} expands to #2, skipping #1 +// TeX source: \long\def\@secondoftwo#1#2{#2} + +defineMacro("\\@secondoftwo", function (context) { + var args = context.consumeArgs(2); + return { + tokens: args[1], + numArgs: 0 + }; +}); // LaTeX's \@ifnextchar{#1}{#2}{#3} looks ahead to the next (unexpanded) +// symbol that isn't a space, consuming any spaces but not consuming the +// first nonspace character. If that nonspace character matches #1, then +// the macro expands to #2; otherwise, it expands to #3. + +defineMacro("\\@ifnextchar", function (context) { + var args = context.consumeArgs(3); // symbol, if, else + + context.consumeSpaces(); + var nextToken = context.future(); + + if (args[0].length === 1 && args[0][0].text === nextToken.text) { + return { + tokens: args[1], + numArgs: 0 + }; + } else { + return { + tokens: args[2], + numArgs: 0 + }; + } +}); // LaTeX's \@ifstar{#1}{#2} looks ahead to the next (unexpanded) symbol. +// If it is `*`, then it consumes the symbol, and the macro expands to #1; +// otherwise, the macro expands to #2 (without consuming the symbol). +// TeX source: \def\@ifstar#1{\@ifnextchar *{\@firstoftwo{#1}}} + +defineMacro("\\@ifstar", "\\@ifnextchar *{\\@firstoftwo{#1}}"); // LaTeX's \TextOrMath{#1}{#2} expands to #1 in text mode, #2 in math mode + +defineMacro("\\TextOrMath", function (context) { + var args = context.consumeArgs(2); + + if (context.mode === 'text') { + return { + tokens: args[0], + numArgs: 0 + }; + } else { + return { + tokens: args[1], + numArgs: 0 + }; + } +}); // Lookup table for parsing numbers in base 8 through 16 + +var digitToNumber = { + "0": 0, + "1": 1, + "2": 2, + "3": 3, + "4": 4, + "5": 5, + "6": 6, + "7": 7, + "8": 8, + "9": 9, + "a": 10, + "A": 10, + "b": 11, + "B": 11, + "c": 12, + "C": 12, + "d": 13, + "D": 13, + "e": 14, + "E": 14, + "f": 15, + "F": 15 +}; // TeX \char makes a literal character (catcode 12) using the following forms: +// (see The TeXBook, p. 43) +// \char123 -- decimal +// \char'123 -- octal +// \char"123 -- hex +// \char`x -- character that can be written (i.e. isn't active) +// \char`\x -- character that cannot be written (e.g. %) +// These all refer to characters from the font, so we turn them into special +// calls to a function \@char dealt with in the Parser. + +defineMacro("\\char", function (context) { + var token = context.popToken(); + var base; + var number = ''; + + if (token.text === "'") { + base = 8; + token = context.popToken(); + } else if (token.text === '"') { + base = 16; + token = context.popToken(); + } else if (token.text === "`") { + token = context.popToken(); + + if (token.text[0] === "\\") { + number = token.text.charCodeAt(1); + } else if (token.text === "EOF") { + throw new ParseError("\\char` missing argument"); + } else { + number = token.text.charCodeAt(0); + } + } else { + base = 10; + } + + if (base) { + // Parse a number in the given base, starting with first `token`. + number = digitToNumber[token.text]; + + if (number == null || number >= base) { + throw new ParseError("Invalid base-" + base + " digit " + token.text); + } + + var digit; + + while ((digit = digitToNumber[context.future().text]) != null && digit < base) { + number *= base; + number += digit; + context.popToken(); + } + } + + return "\\@char{" + number + "}"; +}); // \newcommand{\macro}[args]{definition} +// \renewcommand{\macro}[args]{definition} +// TODO: Optional arguments: \newcommand{\macro}[args][default]{definition} + +var newcommand = (context, existsOK, nonexistsOK) => { + var arg = context.consumeArg().tokens; + + if (arg.length !== 1) { + throw new ParseError("\\newcommand's first argument must be a macro name"); + } + + var name = arg[0].text; + var exists = context.isDefined(name); + + if (exists && !existsOK) { + throw new ParseError("\\newcommand{" + name + "} attempting to redefine " + (name + "; use \\renewcommand")); + } + + if (!exists && !nonexistsOK) { + throw new ParseError("\\renewcommand{" + name + "} when command " + name + " " + "does not yet exist; use \\newcommand"); + } + + var numArgs = 0; + arg = context.consumeArg().tokens; + + if (arg.length === 1 && arg[0].text === "[") { + var argText = ''; + var token = context.expandNextToken(); + + while (token.text !== "]" && token.text !== "EOF") { + // TODO: Should properly expand arg, e.g., ignore {}s + argText += token.text; + token = context.expandNextToken(); + } + + if (!argText.match(/^\s*[0-9]+\s*$/)) { + throw new ParseError("Invalid number of arguments: " + argText); + } + + numArgs = parseInt(argText); + arg = context.consumeArg().tokens; + } // Final arg is the expansion of the macro + + + context.macros.set(name, { + tokens: arg, + numArgs + }); + return ''; +}; + +defineMacro("\\newcommand", context => newcommand(context, false, true)); +defineMacro("\\renewcommand", context => newcommand(context, true, false)); +defineMacro("\\providecommand", context => newcommand(context, true, true)); // terminal (console) tools + +defineMacro("\\message", context => { + var arg = context.consumeArgs(1)[0]; // eslint-disable-next-line no-console + + console.log(arg.reverse().map(token => token.text).join("")); + return ''; +}); +defineMacro("\\errmessage", context => { + var arg = context.consumeArgs(1)[0]; // eslint-disable-next-line no-console + + console.error(arg.reverse().map(token => token.text).join("")); + return ''; +}); +defineMacro("\\show", context => { + var tok = context.popToken(); + var name = tok.text; // eslint-disable-next-line no-console + + console.log(tok, context.macros.get(name), functions[name], symbols.math[name], symbols.text[name]); + return ''; +}); ////////////////////////////////////////////////////////////////////// +// Grouping +// \let\bgroup={ \let\egroup=} + +defineMacro("\\bgroup", "{"); +defineMacro("\\egroup", "}"); // Symbols from latex.ltx: +// \def~{\nobreakspace{}} +// \def\lq{`} +// \def\rq{'} +// \def \aa {\r a} +// \def \AA {\r A} + +defineMacro("~", "\\nobreakspace"); +defineMacro("\\lq", "`"); +defineMacro("\\rq", "'"); +defineMacro("\\aa", "\\r a"); +defineMacro("\\AA", "\\r A"); // Copyright (C) and registered (R) symbols. Use raw symbol in MathML. +// \DeclareTextCommandDefault{\textcopyright}{\textcircled{c}} +// \DeclareTextCommandDefault{\textregistered}{\textcircled{% +// \check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont R}} +// \DeclareRobustCommand{\copyright}{% +// \ifmmode{\nfss@text{\textcopyright}}\else\textcopyright\fi} + +defineMacro("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}"); +defineMacro("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"); +defineMacro("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"); // Characters omitted from Unicode range 1D400–1D7FF + +defineMacro("\u212C", "\\mathscr{B}"); // script + +defineMacro("\u2130", "\\mathscr{E}"); +defineMacro("\u2131", "\\mathscr{F}"); +defineMacro("\u210B", "\\mathscr{H}"); +defineMacro("\u2110", "\\mathscr{I}"); +defineMacro("\u2112", "\\mathscr{L}"); +defineMacro("\u2133", "\\mathscr{M}"); +defineMacro("\u211B", "\\mathscr{R}"); +defineMacro("\u212D", "\\mathfrak{C}"); // Fraktur + +defineMacro("\u210C", "\\mathfrak{H}"); +defineMacro("\u2128", "\\mathfrak{Z}"); // Define \Bbbk with a macro that works in both HTML and MathML. + +defineMacro("\\Bbbk", "\\Bbb{k}"); // Unicode middle dot +// The KaTeX fonts do not contain U+00B7. Instead, \cdotp displays +// the dot at U+22C5 and gives it punct spacing. + +defineMacro("\u00b7", "\\cdotp"); // \llap and \rlap render their contents in text mode + +defineMacro("\\llap", "\\mathllap{\\textrm{#1}}"); +defineMacro("\\rlap", "\\mathrlap{\\textrm{#1}}"); +defineMacro("\\clap", "\\mathclap{\\textrm{#1}}"); // \mathstrut from the TeXbook, p 360 + +defineMacro("\\mathstrut", "\\vphantom{(}"); // \underbar from TeXbook p 353 + +defineMacro("\\underbar", "\\underline{\\text{#1}}"); // \not is defined by base/fontmath.ltx via +// \DeclareMathSymbol{\not}{\mathrel}{symbols}{"36} +// It's thus treated like a \mathrel, but defined by a symbol that has zero +// width but extends to the right. We use \rlap to get that spacing. +// For MathML we write U+0338 here. buildMathML.js will then do the overlay. + +defineMacro("\\not", '\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'); // Negated symbols from base/fontmath.ltx: +// \def\neq{\not=} \let\ne=\neq +// \DeclareRobustCommand +// \notin{\mathrel{\m@th\mathpalette\c@ncel\in}} +// \def\c@ncel#1#2{\m@th\ooalign{$\hfil#1\mkern1mu/\hfil$\crcr$#1#2$}} + +defineMacro("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"); +defineMacro("\\ne", "\\neq"); +defineMacro("\u2260", "\\neq"); +defineMacro("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}" + "{\\mathrel{\\char`∉}}"); +defineMacro("\u2209", "\\notin"); // Unicode stacked relations + +defineMacro("\u2258", "\\html@mathml{" + "\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}" + "}{\\mathrel{\\char`\u2258}}"); +defineMacro("\u2259", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"); +defineMacro("\u225A", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"); +defineMacro("\u225B", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}" + "{\\mathrel{\\char`\u225B}}"); +defineMacro("\u225D", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}" + "{\\mathrel{\\char`\u225D}}"); +defineMacro("\u225E", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}" + "{\\mathrel{\\char`\u225E}}"); +defineMacro("\u225F", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"); // Misc Unicode + +defineMacro("\u27C2", "\\perp"); +defineMacro("\u203C", "\\mathclose{!\\mkern-0.8mu!}"); +defineMacro("\u220C", "\\notni"); +defineMacro("\u231C", "\\ulcorner"); +defineMacro("\u231D", "\\urcorner"); +defineMacro("\u231E", "\\llcorner"); +defineMacro("\u231F", "\\lrcorner"); +defineMacro("\u00A9", "\\copyright"); +defineMacro("\u00AE", "\\textregistered"); +defineMacro("\uFE0F", "\\textregistered"); // The KaTeX fonts have corners at codepoints that don't match Unicode. +// For MathML purposes, use the Unicode code point. + +defineMacro("\\ulcorner", "\\html@mathml{\\@ulcorner}{\\mathop{\\char\"231c}}"); +defineMacro("\\urcorner", "\\html@mathml{\\@urcorner}{\\mathop{\\char\"231d}}"); +defineMacro("\\llcorner", "\\html@mathml{\\@llcorner}{\\mathop{\\char\"231e}}"); +defineMacro("\\lrcorner", "\\html@mathml{\\@lrcorner}{\\mathop{\\char\"231f}}"); ////////////////////////////////////////////////////////////////////// +// LaTeX_2ε +// \vdots{\vbox{\baselineskip4\p@ \lineskiplimit\z@ +// \kern6\p@\hbox{.}\hbox{.}\hbox{.}}} +// We'll call \varvdots, which gets a glyph from symbols.js. +// The zero-width rule gets us an equivalent to the vertical 6pt kern. + +defineMacro("\\vdots", "\\mathord{\\varvdots\\rule{0pt}{15pt}}"); +defineMacro("\u22ee", "\\vdots"); ////////////////////////////////////////////////////////////////////// +// amsmath.sty +// http://mirrors.concertpass.com/tex-archive/macros/latex/required/amsmath/amsmath.pdf +// Italic Greek capital letters. AMS defines these with \DeclareMathSymbol, +// but they are equivalent to \mathit{\Letter}. + +defineMacro("\\varGamma", "\\mathit{\\Gamma}"); +defineMacro("\\varDelta", "\\mathit{\\Delta}"); +defineMacro("\\varTheta", "\\mathit{\\Theta}"); +defineMacro("\\varLambda", "\\mathit{\\Lambda}"); +defineMacro("\\varXi", "\\mathit{\\Xi}"); +defineMacro("\\varPi", "\\mathit{\\Pi}"); +defineMacro("\\varSigma", "\\mathit{\\Sigma}"); +defineMacro("\\varUpsilon", "\\mathit{\\Upsilon}"); +defineMacro("\\varPhi", "\\mathit{\\Phi}"); +defineMacro("\\varPsi", "\\mathit{\\Psi}"); +defineMacro("\\varOmega", "\\mathit{\\Omega}"); //\newcommand{\substack}[1]{\subarray{c}#1\endsubarray} + +defineMacro("\\substack", "\\begin{subarray}{c}#1\\end{subarray}"); // \renewcommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript +// \mkern-\thinmuskip{:}\mskip6muplus1mu\relax} + +defineMacro("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}" + "\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"); // \newcommand{\boxed}[1]{\fbox{\m@th$\displaystyle#1$}} + +defineMacro("\\boxed", "\\fbox{$\\displaystyle{#1}$}"); // \def\iff{\DOTSB\;\Longleftrightarrow\;} +// \def\implies{\DOTSB\;\Longrightarrow\;} +// \def\impliedby{\DOTSB\;\Longleftarrow\;} + +defineMacro("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;"); +defineMacro("\\implies", "\\DOTSB\\;\\Longrightarrow\\;"); +defineMacro("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;"); // AMSMath's automatic \dots, based on \mdots@@ macro. + +var dotsByToken = { + ',': '\\dotsc', + '\\not': '\\dotsb', + // \keybin@ checks for the following: + '+': '\\dotsb', + '=': '\\dotsb', + '<': '\\dotsb', + '>': '\\dotsb', + '-': '\\dotsb', + '*': '\\dotsb', + ':': '\\dotsb', + // Symbols whose definition starts with \DOTSB: + '\\DOTSB': '\\dotsb', + '\\coprod': '\\dotsb', + '\\bigvee': '\\dotsb', + '\\bigwedge': '\\dotsb', + '\\biguplus': '\\dotsb', + '\\bigcap': '\\dotsb', + '\\bigcup': '\\dotsb', + '\\prod': '\\dotsb', + '\\sum': '\\dotsb', + '\\bigotimes': '\\dotsb', + '\\bigoplus': '\\dotsb', + '\\bigodot': '\\dotsb', + '\\bigsqcup': '\\dotsb', + '\\And': '\\dotsb', + '\\longrightarrow': '\\dotsb', + '\\Longrightarrow': '\\dotsb', + '\\longleftarrow': '\\dotsb', + '\\Longleftarrow': '\\dotsb', + '\\longleftrightarrow': '\\dotsb', + '\\Longleftrightarrow': '\\dotsb', + '\\mapsto': '\\dotsb', + '\\longmapsto': '\\dotsb', + '\\hookrightarrow': '\\dotsb', + '\\doteq': '\\dotsb', + // Symbols whose definition starts with \mathbin: + '\\mathbin': '\\dotsb', + // Symbols whose definition starts with \mathrel: + '\\mathrel': '\\dotsb', + '\\relbar': '\\dotsb', + '\\Relbar': '\\dotsb', + '\\xrightarrow': '\\dotsb', + '\\xleftarrow': '\\dotsb', + // Symbols whose definition starts with \DOTSI: + '\\DOTSI': '\\dotsi', + '\\int': '\\dotsi', + '\\oint': '\\dotsi', + '\\iint': '\\dotsi', + '\\iiint': '\\dotsi', + '\\iiiint': '\\dotsi', + '\\idotsint': '\\dotsi', + // Symbols whose definition starts with \DOTSX: + '\\DOTSX': '\\dotsx' +}; +defineMacro("\\dots", function (context) { + // TODO: If used in text mode, should expand to \textellipsis. + // However, in KaTeX, \textellipsis and \ldots behave the same + // (in text mode), and it's unlikely we'd see any of the math commands + // that affect the behavior of \dots when in text mode. So fine for now + // (until we support \ifmmode ... \else ... \fi). + var thedots = '\\dotso'; + var next = context.expandAfterFuture().text; + + if (next in dotsByToken) { + thedots = dotsByToken[next]; + } else if (next.slice(0, 4) === '\\not') { + thedots = '\\dotsb'; + } else if (next in symbols.math) { + if (utils.contains(['bin', 'rel'], symbols.math[next].group)) { + thedots = '\\dotsb'; + } + } + + return thedots; +}); +var spaceAfterDots = { + // \rightdelim@ checks for the following: + ')': true, + ']': true, + '\\rbrack': true, + '\\}': true, + '\\rbrace': true, + '\\rangle': true, + '\\rceil': true, + '\\rfloor': true, + '\\rgroup': true, + '\\rmoustache': true, + '\\right': true, + '\\bigr': true, + '\\biggr': true, + '\\Bigr': true, + '\\Biggr': true, + // \extra@ also tests for the following: + '$': true, + // \extrap@ checks for the following: + ';': true, + '.': true, + ',': true +}; +defineMacro("\\dotso", function (context) { + var next = context.future().text; + + if (next in spaceAfterDots) { + return "\\ldots\\,"; + } else { + return "\\ldots"; + } +}); +defineMacro("\\dotsc", function (context) { + var next = context.future().text; // \dotsc uses \extra@ but not \extrap@, instead specially checking for + // ';' and '.', but doesn't check for ','. + + if (next in spaceAfterDots && next !== ',') { + return "\\ldots\\,"; + } else { + return "\\ldots"; + } +}); +defineMacro("\\cdots", function (context) { + var next = context.future().text; + + if (next in spaceAfterDots) { + return "\\@cdots\\,"; + } else { + return "\\@cdots"; + } +}); +defineMacro("\\dotsb", "\\cdots"); +defineMacro("\\dotsm", "\\cdots"); +defineMacro("\\dotsi", "\\!\\cdots"); // amsmath doesn't actually define \dotsx, but \dots followed by a macro +// starting with \DOTSX implies \dotso, and then \extra@ detects this case +// and forces the added `\,`. + +defineMacro("\\dotsx", "\\ldots\\,"); // \let\DOTSI\relax +// \let\DOTSB\relax +// \let\DOTSX\relax + +defineMacro("\\DOTSI", "\\relax"); +defineMacro("\\DOTSB", "\\relax"); +defineMacro("\\DOTSX", "\\relax"); // Spacing, based on amsmath.sty's override of LaTeX defaults +// \DeclareRobustCommand{\tmspace}[3]{% +// \ifmmode\mskip#1#2\else\kern#1#3\fi\relax} + +defineMacro("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"); // \renewcommand{\,}{\tmspace+\thinmuskip{.1667em}} +// TODO: math mode should use \thinmuskip + +defineMacro("\\,", "\\tmspace+{3mu}{.1667em}"); // \let\thinspace\, + +defineMacro("\\thinspace", "\\,"); // \def\>{\mskip\medmuskip} +// \renewcommand{\:}{\tmspace+\medmuskip{.2222em}} +// TODO: \> and math mode of \: should use \medmuskip = 4mu plus 2mu minus 4mu + +defineMacro("\\>", "\\mskip{4mu}"); +defineMacro("\\:", "\\tmspace+{4mu}{.2222em}"); // \let\medspace\: + +defineMacro("\\medspace", "\\:"); // \renewcommand{\;}{\tmspace+\thickmuskip{.2777em}} +// TODO: math mode should use \thickmuskip = 5mu plus 5mu + +defineMacro("\\;", "\\tmspace+{5mu}{.2777em}"); // \let\thickspace\; + +defineMacro("\\thickspace", "\\;"); // \renewcommand{\!}{\tmspace-\thinmuskip{.1667em}} +// TODO: math mode should use \thinmuskip + +defineMacro("\\!", "\\tmspace-{3mu}{.1667em}"); // \let\negthinspace\! + +defineMacro("\\negthinspace", "\\!"); // \newcommand{\negmedspace}{\tmspace-\medmuskip{.2222em}} +// TODO: math mode should use \medmuskip + +defineMacro("\\negmedspace", "\\tmspace-{4mu}{.2222em}"); // \newcommand{\negthickspace}{\tmspace-\thickmuskip{.2777em}} +// TODO: math mode should use \thickmuskip + +defineMacro("\\negthickspace", "\\tmspace-{5mu}{.277em}"); // \def\enspace{\kern.5em } + +defineMacro("\\enspace", "\\kern.5em "); // \def\enskip{\hskip.5em\relax} + +defineMacro("\\enskip", "\\hskip.5em\\relax"); // \def\quad{\hskip1em\relax} + +defineMacro("\\quad", "\\hskip1em\\relax"); // \def\qquad{\hskip2em\relax} + +defineMacro("\\qquad", "\\hskip2em\\relax"); // \tag@in@display form of \tag + +defineMacro("\\tag", "\\@ifstar\\tag@literal\\tag@paren"); +defineMacro("\\tag@paren", "\\tag@literal{({#1})}"); +defineMacro("\\tag@literal", context => { + if (context.macros.get("\\df@tag")) { + throw new ParseError("Multiple \\tag"); + } + + return "\\gdef\\df@tag{\\text{#1}}"; +}); // \renewcommand{\bmod}{\nonscript\mskip-\medmuskip\mkern5mu\mathbin +// {\operator@font mod}\penalty900 +// \mkern5mu\nonscript\mskip-\medmuskip} +// \newcommand{\pod}[1]{\allowbreak +// \if@display\mkern18mu\else\mkern8mu\fi(#1)} +// \renewcommand{\pmod}[1]{\pod{{\operator@font mod}\mkern6mu#1}} +// \newcommand{\mod}[1]{\allowbreak\if@display\mkern18mu +// \else\mkern12mu\fi{\operator@font mod}\,\,#1} +// TODO: math mode should use \medmuskip = 4mu plus 2mu minus 4mu + +defineMacro("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}" + "\\mathbin{\\rm mod}" + "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"); +defineMacro("\\pod", "\\allowbreak" + "\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"); +defineMacro("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}"); +defineMacro("\\mod", "\\allowbreak" + "\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}" + "{\\rm mod}\\,\\,#1"); ////////////////////////////////////////////////////////////////////// +// LaTeX source2e +// \expandafter\let\expandafter\@normalcr +// \csname\expandafter\@gobble\string\\ \endcsname +// \DeclareRobustCommand\newline{\@normalcr\relax} + +defineMacro("\\newline", "\\\\\\relax"); // \def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@} +// TODO: Doesn't normally work in math mode because \@ fails. KaTeX doesn't +// support \@ yet, so that's omitted, and we add \text so that the result +// doesn't look funny in math mode. + +defineMacro("\\TeX", "\\textrm{\\html@mathml{" + "T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX" + "}{TeX}}"); // \DeclareRobustCommand{\LaTeX}{L\kern-.36em% +// {\sbox\z@ T% +// \vbox to\ht\z@{\hbox{\check@mathfonts +// \fontsize\sf@size\z@ +// \math@fontsfalse\selectfont +// A}% +// \vss}% +// }% +// \kern-.15em% +// \TeX} +// This code aligns the top of the A with the T (from the perspective of TeX's +// boxes, though visually the A appears to extend above slightly). +// We compute the corresponding \raisebox when A is rendered in \normalsize +// \scriptstyle, which has a scale factor of 0.7 (see Options.js). + +var latexRaiseA = makeEm(fontMetricsData['Main-Regular']["T".charCodeAt(0)][1] - 0.7 * fontMetricsData['Main-Regular']["A".charCodeAt(0)][1]); +defineMacro("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + latexRaiseA + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"); // New KaTeX logo based on tweaking LaTeX logo + +defineMacro("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + latexRaiseA + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"); // \DeclareRobustCommand\hspace{\@ifstar\@hspacer\@hspace} +// \def\@hspace#1{\hskip #1\relax} +// \def\@hspacer#1{\vrule \@width\z@\nobreak +// \hskip #1\hskip \z@skip} + +defineMacro("\\hspace", "\\@ifstar\\@hspacer\\@hspace"); +defineMacro("\\@hspace", "\\hskip #1\\relax"); +defineMacro("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax"); ////////////////////////////////////////////////////////////////////// +// mathtools.sty +//\providecommand\ordinarycolon{:} + +defineMacro("\\ordinarycolon", ":"); //\def\vcentcolon{\mathrel{\mathop\ordinarycolon}} +//TODO(edemaine): Not yet centered. Fix via \raisebox or #726 + +defineMacro("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"); // \providecommand*\dblcolon{\vcentcolon\mathrel{\mkern-.9mu}\vcentcolon} + +defineMacro("\\dblcolon", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}" + "{\\mathop{\\char\"2237}}"); // \providecommand*\coloneqq{\vcentcolon\mathrel{\mkern-1.2mu}=} + +defineMacro("\\coloneqq", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}" + "{\\mathop{\\char\"2254}}"); // ≔ +// \providecommand*\Coloneqq{\dblcolon\mathrel{\mkern-1.2mu}=} + +defineMacro("\\Coloneqq", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}" + "{\\mathop{\\char\"2237\\char\"3d}}"); // \providecommand*\coloneq{\vcentcolon\mathrel{\mkern-1.2mu}\mathrel{-}} + +defineMacro("\\coloneq", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}" + "{\\mathop{\\char\"3a\\char\"2212}}"); // \providecommand*\Coloneq{\dblcolon\mathrel{\mkern-1.2mu}\mathrel{-}} + +defineMacro("\\Coloneq", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}" + "{\\mathop{\\char\"2237\\char\"2212}}"); // \providecommand*\eqqcolon{=\mathrel{\mkern-1.2mu}\vcentcolon} + +defineMacro("\\eqqcolon", "\\html@mathml{" + "\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}" + "{\\mathop{\\char\"2255}}"); // ≕ +// \providecommand*\Eqqcolon{=\mathrel{\mkern-1.2mu}\dblcolon} + +defineMacro("\\Eqqcolon", "\\html@mathml{" + "\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}" + "{\\mathop{\\char\"3d\\char\"2237}}"); // \providecommand*\eqcolon{\mathrel{-}\mathrel{\mkern-1.2mu}\vcentcolon} + +defineMacro("\\eqcolon", "\\html@mathml{" + "\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}" + "{\\mathop{\\char\"2239}}"); // \providecommand*\Eqcolon{\mathrel{-}\mathrel{\mkern-1.2mu}\dblcolon} + +defineMacro("\\Eqcolon", "\\html@mathml{" + "\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}" + "{\\mathop{\\char\"2212\\char\"2237}}"); // \providecommand*\colonapprox{\vcentcolon\mathrel{\mkern-1.2mu}\approx} + +defineMacro("\\colonapprox", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}" + "{\\mathop{\\char\"3a\\char\"2248}}"); // \providecommand*\Colonapprox{\dblcolon\mathrel{\mkern-1.2mu}\approx} + +defineMacro("\\Colonapprox", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}" + "{\\mathop{\\char\"2237\\char\"2248}}"); // \providecommand*\colonsim{\vcentcolon\mathrel{\mkern-1.2mu}\sim} + +defineMacro("\\colonsim", "\\html@mathml{" + "\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}" + "{\\mathop{\\char\"3a\\char\"223c}}"); // \providecommand*\Colonsim{\dblcolon\mathrel{\mkern-1.2mu}\sim} + +defineMacro("\\Colonsim", "\\html@mathml{" + "\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}" + "{\\mathop{\\char\"2237\\char\"223c}}"); // Some Unicode characters are implemented with macros to mathtools functions. + +defineMacro("\u2237", "\\dblcolon"); // :: + +defineMacro("\u2239", "\\eqcolon"); // -: + +defineMacro("\u2254", "\\coloneqq"); // := + +defineMacro("\u2255", "\\eqqcolon"); // =: + +defineMacro("\u2A74", "\\Coloneqq"); // ::= +////////////////////////////////////////////////////////////////////// +// colonequals.sty +// Alternate names for mathtools's macros: + +defineMacro("\\ratio", "\\vcentcolon"); +defineMacro("\\coloncolon", "\\dblcolon"); +defineMacro("\\colonequals", "\\coloneqq"); +defineMacro("\\coloncolonequals", "\\Coloneqq"); +defineMacro("\\equalscolon", "\\eqqcolon"); +defineMacro("\\equalscoloncolon", "\\Eqqcolon"); +defineMacro("\\colonminus", "\\coloneq"); +defineMacro("\\coloncolonminus", "\\Coloneq"); +defineMacro("\\minuscolon", "\\eqcolon"); +defineMacro("\\minuscoloncolon", "\\Eqcolon"); // \colonapprox name is same in mathtools and colonequals. + +defineMacro("\\coloncolonapprox", "\\Colonapprox"); // \colonsim name is same in mathtools and colonequals. + +defineMacro("\\coloncolonsim", "\\Colonsim"); // Additional macros, implemented by analogy with mathtools definitions: + +defineMacro("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"); +defineMacro("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"); +defineMacro("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"); +defineMacro("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"); // Present in newtxmath, pxfonts and txfonts + +defineMacro("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"); +defineMacro("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}"); +defineMacro("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}"); ////////////////////////////////////////////////////////////////////// +// From amsopn.sty + +defineMacro("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}"); +defineMacro("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}"); +defineMacro("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}"); +defineMacro("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}"); +defineMacro("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}"); +defineMacro("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}"); ////////////////////////////////////////////////////////////////////// +// MathML alternates for KaTeX glyphs in the Unicode private area + +defineMacro("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{\u2269}"); +defineMacro("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{\u2268}"); +defineMacro("\\ngeqq", "\\html@mathml{\\@ngeqq}{\u2271}"); +defineMacro("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{\u2271}"); +defineMacro("\\nleqq", "\\html@mathml{\\@nleqq}{\u2270}"); +defineMacro("\\nleqslant", "\\html@mathml{\\@nleqslant}{\u2270}"); +defineMacro("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}"); +defineMacro("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}"); +defineMacro("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{\u2288}"); +defineMacro("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{\u2289}"); +defineMacro("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}"); +defineMacro("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}"); +defineMacro("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}"); +defineMacro("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"); +defineMacro("\\imath", "\\html@mathml{\\@imath}{\u0131}"); +defineMacro("\\jmath", "\\html@mathml{\\@jmath}{\u0237}"); ////////////////////////////////////////////////////////////////////// +// stmaryrd and semantic +// The stmaryrd and semantic packages render the next four items by calling a +// glyph. Those glyphs do not exist in the KaTeX fonts. Hence the macros. + +defineMacro("\\llbracket", "\\html@mathml{" + "\\mathopen{[\\mkern-3.2mu[}}" + "{\\mathopen{\\char`\u27e6}}"); +defineMacro("\\rrbracket", "\\html@mathml{" + "\\mathclose{]\\mkern-3.2mu]}}" + "{\\mathclose{\\char`\u27e7}}"); +defineMacro("\u27e6", "\\llbracket"); // blackboard bold [ + +defineMacro("\u27e7", "\\rrbracket"); // blackboard bold ] + +defineMacro("\\lBrace", "\\html@mathml{" + "\\mathopen{\\{\\mkern-3.2mu[}}" + "{\\mathopen{\\char`\u2983}}"); +defineMacro("\\rBrace", "\\html@mathml{" + "\\mathclose{]\\mkern-3.2mu\\}}}" + "{\\mathclose{\\char`\u2984}}"); +defineMacro("\u2983", "\\lBrace"); // blackboard bold { + +defineMacro("\u2984", "\\rBrace"); // blackboard bold } +// TODO: Create variable sized versions of the last two items. I believe that +// will require new font glyphs. +// The stmaryrd function `\minuso` provides a "Plimsoll" symbol that +// superimposes the characters \circ and \mathminus. Used in chemistry. + +defineMacro("\\minuso", "\\mathbin{\\html@mathml{" + "{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}" + "{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}" + "{\\char`⦵}}"); +defineMacro("⦵", "\\minuso"); ////////////////////////////////////////////////////////////////////// +// texvc.sty +// The texvc package contains macros available in mediawiki pages. +// We omit the functions deprecated at +// https://en.wikipedia.org/wiki/Help:Displaying_a_formula#Deprecated_syntax +// We also omit texvc's \O, which conflicts with \text{\O} + +defineMacro("\\darr", "\\downarrow"); +defineMacro("\\dArr", "\\Downarrow"); +defineMacro("\\Darr", "\\Downarrow"); +defineMacro("\\lang", "\\langle"); +defineMacro("\\rang", "\\rangle"); +defineMacro("\\uarr", "\\uparrow"); +defineMacro("\\uArr", "\\Uparrow"); +defineMacro("\\Uarr", "\\Uparrow"); +defineMacro("\\N", "\\mathbb{N}"); +defineMacro("\\R", "\\mathbb{R}"); +defineMacro("\\Z", "\\mathbb{Z}"); +defineMacro("\\alef", "\\aleph"); +defineMacro("\\alefsym", "\\aleph"); +defineMacro("\\Alpha", "\\mathrm{A}"); +defineMacro("\\Beta", "\\mathrm{B}"); +defineMacro("\\bull", "\\bullet"); +defineMacro("\\Chi", "\\mathrm{X}"); +defineMacro("\\clubs", "\\clubsuit"); +defineMacro("\\cnums", "\\mathbb{C}"); +defineMacro("\\Complex", "\\mathbb{C}"); +defineMacro("\\Dagger", "\\ddagger"); +defineMacro("\\diamonds", "\\diamondsuit"); +defineMacro("\\empty", "\\emptyset"); +defineMacro("\\Epsilon", "\\mathrm{E}"); +defineMacro("\\Eta", "\\mathrm{H}"); +defineMacro("\\exist", "\\exists"); +defineMacro("\\harr", "\\leftrightarrow"); +defineMacro("\\hArr", "\\Leftrightarrow"); +defineMacro("\\Harr", "\\Leftrightarrow"); +defineMacro("\\hearts", "\\heartsuit"); +defineMacro("\\image", "\\Im"); +defineMacro("\\infin", "\\infty"); +defineMacro("\\Iota", "\\mathrm{I}"); +defineMacro("\\isin", "\\in"); +defineMacro("\\Kappa", "\\mathrm{K}"); +defineMacro("\\larr", "\\leftarrow"); +defineMacro("\\lArr", "\\Leftarrow"); +defineMacro("\\Larr", "\\Leftarrow"); +defineMacro("\\lrarr", "\\leftrightarrow"); +defineMacro("\\lrArr", "\\Leftrightarrow"); +defineMacro("\\Lrarr", "\\Leftrightarrow"); +defineMacro("\\Mu", "\\mathrm{M}"); +defineMacro("\\natnums", "\\mathbb{N}"); +defineMacro("\\Nu", "\\mathrm{N}"); +defineMacro("\\Omicron", "\\mathrm{O}"); +defineMacro("\\plusmn", "\\pm"); +defineMacro("\\rarr", "\\rightarrow"); +defineMacro("\\rArr", "\\Rightarrow"); +defineMacro("\\Rarr", "\\Rightarrow"); +defineMacro("\\real", "\\Re"); +defineMacro("\\reals", "\\mathbb{R}"); +defineMacro("\\Reals", "\\mathbb{R}"); +defineMacro("\\Rho", "\\mathrm{P}"); +defineMacro("\\sdot", "\\cdot"); +defineMacro("\\sect", "\\S"); +defineMacro("\\spades", "\\spadesuit"); +defineMacro("\\sub", "\\subset"); +defineMacro("\\sube", "\\subseteq"); +defineMacro("\\supe", "\\supseteq"); +defineMacro("\\Tau", "\\mathrm{T}"); +defineMacro("\\thetasym", "\\vartheta"); // TODO: defineMacro("\\varcoppa", "\\\mbox{\\coppa}"); + +defineMacro("\\weierp", "\\wp"); +defineMacro("\\Zeta", "\\mathrm{Z}"); ////////////////////////////////////////////////////////////////////// +// statmath.sty +// https://ctan.math.illinois.edu/macros/latex/contrib/statmath/statmath.pdf + +defineMacro("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}"); +defineMacro("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}"); +defineMacro("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"); ////////////////////////////////////////////////////////////////////// +// braket.sty +// http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/braket/braket.pdf + +defineMacro("\\bra", "\\mathinner{\\langle{#1}|}"); +defineMacro("\\ket", "\\mathinner{|{#1}\\rangle}"); +defineMacro("\\braket", "\\mathinner{\\langle{#1}\\rangle}"); +defineMacro("\\Bra", "\\left\\langle#1\\right|"); +defineMacro("\\Ket", "\\left|#1\\right\\rangle"); + +var braketHelper = one => context => { + var left = context.consumeArg().tokens; + var middle = context.consumeArg().tokens; + var middleDouble = context.consumeArg().tokens; + var right = context.consumeArg().tokens; + var oldMiddle = context.macros.get("|"); + var oldMiddleDouble = context.macros.get("\\|"); + context.macros.beginGroup(); + + var midMacro = double => context => { + if (one) { + // Only modify the first instance of | or \| + context.macros.set("|", oldMiddle); + + if (middleDouble.length) { + context.macros.set("\\|", oldMiddleDouble); + } + } + + var doubled = double; + + if (!double && middleDouble.length) { + // Mimic \@ifnextchar + var nextToken = context.future(); + + if (nextToken.text === "|") { + context.popToken(); + doubled = true; + } + } + + return { + tokens: doubled ? middleDouble : middle, + numArgs: 0 + }; + }; + + context.macros.set("|", midMacro(false)); + + if (middleDouble.length) { + context.macros.set("\\|", midMacro(true)); + } + + var arg = context.consumeArg().tokens; + var expanded = context.expandTokens([...right, ...arg, ...left // reversed + ]); + context.macros.endGroup(); + return { + tokens: expanded.reverse(), + numArgs: 0 + }; +}; + +defineMacro("\\bra@ket", braketHelper(false)); +defineMacro("\\bra@set", braketHelper(true)); +defineMacro("\\Braket", "\\bra@ket{\\left\\langle}" + "{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"); +defineMacro("\\Set", "\\bra@set{\\left\\{\\:}" + "{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"); +defineMacro("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"); // has no support for special || or \| +////////////////////////////////////////////////////////////////////// +// actuarialangle.dtx + +defineMacro("\\angln", "{\\angl n}"); // Custom Khan Academy colors, should be moved to an optional package + +defineMacro("\\blue", "\\textcolor{##6495ed}{#1}"); +defineMacro("\\orange", "\\textcolor{##ffa500}{#1}"); +defineMacro("\\pink", "\\textcolor{##ff00af}{#1}"); +defineMacro("\\red", "\\textcolor{##df0030}{#1}"); +defineMacro("\\green", "\\textcolor{##28ae7b}{#1}"); +defineMacro("\\gray", "\\textcolor{gray}{#1}"); +defineMacro("\\purple", "\\textcolor{##9d38bd}{#1}"); +defineMacro("\\blueA", "\\textcolor{##ccfaff}{#1}"); +defineMacro("\\blueB", "\\textcolor{##80f6ff}{#1}"); +defineMacro("\\blueC", "\\textcolor{##63d9ea}{#1}"); +defineMacro("\\blueD", "\\textcolor{##11accd}{#1}"); +defineMacro("\\blueE", "\\textcolor{##0c7f99}{#1}"); +defineMacro("\\tealA", "\\textcolor{##94fff5}{#1}"); +defineMacro("\\tealB", "\\textcolor{##26edd5}{#1}"); +defineMacro("\\tealC", "\\textcolor{##01d1c1}{#1}"); +defineMacro("\\tealD", "\\textcolor{##01a995}{#1}"); +defineMacro("\\tealE", "\\textcolor{##208170}{#1}"); +defineMacro("\\greenA", "\\textcolor{##b6ffb0}{#1}"); +defineMacro("\\greenB", "\\textcolor{##8af281}{#1}"); +defineMacro("\\greenC", "\\textcolor{##74cf70}{#1}"); +defineMacro("\\greenD", "\\textcolor{##1fab54}{#1}"); +defineMacro("\\greenE", "\\textcolor{##0d923f}{#1}"); +defineMacro("\\goldA", "\\textcolor{##ffd0a9}{#1}"); +defineMacro("\\goldB", "\\textcolor{##ffbb71}{#1}"); +defineMacro("\\goldC", "\\textcolor{##ff9c39}{#1}"); +defineMacro("\\goldD", "\\textcolor{##e07d10}{#1}"); +defineMacro("\\goldE", "\\textcolor{##a75a05}{#1}"); +defineMacro("\\redA", "\\textcolor{##fca9a9}{#1}"); +defineMacro("\\redB", "\\textcolor{##ff8482}{#1}"); +defineMacro("\\redC", "\\textcolor{##f9685d}{#1}"); +defineMacro("\\redD", "\\textcolor{##e84d39}{#1}"); +defineMacro("\\redE", "\\textcolor{##bc2612}{#1}"); +defineMacro("\\maroonA", "\\textcolor{##ffbde0}{#1}"); +defineMacro("\\maroonB", "\\textcolor{##ff92c6}{#1}"); +defineMacro("\\maroonC", "\\textcolor{##ed5fa6}{#1}"); +defineMacro("\\maroonD", "\\textcolor{##ca337c}{#1}"); +defineMacro("\\maroonE", "\\textcolor{##9e034e}{#1}"); +defineMacro("\\purpleA", "\\textcolor{##ddd7ff}{#1}"); +defineMacro("\\purpleB", "\\textcolor{##c6b9fc}{#1}"); +defineMacro("\\purpleC", "\\textcolor{##aa87ff}{#1}"); +defineMacro("\\purpleD", "\\textcolor{##7854ab}{#1}"); +defineMacro("\\purpleE", "\\textcolor{##543b78}{#1}"); +defineMacro("\\mintA", "\\textcolor{##f5f9e8}{#1}"); +defineMacro("\\mintB", "\\textcolor{##edf2df}{#1}"); +defineMacro("\\mintC", "\\textcolor{##e0e5cc}{#1}"); +defineMacro("\\grayA", "\\textcolor{##f6f7f7}{#1}"); +defineMacro("\\grayB", "\\textcolor{##f0f1f2}{#1}"); +defineMacro("\\grayC", "\\textcolor{##e3e5e6}{#1}"); +defineMacro("\\grayD", "\\textcolor{##d6d8da}{#1}"); +defineMacro("\\grayE", "\\textcolor{##babec2}{#1}"); +defineMacro("\\grayF", "\\textcolor{##888d93}{#1}"); +defineMacro("\\grayG", "\\textcolor{##626569}{#1}"); +defineMacro("\\grayH", "\\textcolor{##3b3e40}{#1}"); +defineMacro("\\grayI", "\\textcolor{##21242c}{#1}"); +defineMacro("\\kaBlue", "\\textcolor{##314453}{#1}"); +defineMacro("\\kaGreen", "\\textcolor{##71B307}{#1}"); + +/** + * This file contains the “gullet” where macros are expanded + * until only non-macro tokens remain. + */ +// List of commands that act like macros but aren't defined as a macro, +// function, or symbol. Used in `isDefined`. +var implicitCommands = { + "^": true, + // Parser.js + "_": true, + // Parser.js + "\\limits": true, + // Parser.js + "\\nolimits": true // Parser.js + +}; +class MacroExpander { + constructor(input, settings, mode) { + this.settings = void 0; + this.expansionCount = void 0; + this.lexer = void 0; + this.macros = void 0; + this.stack = void 0; + this.mode = void 0; + this.settings = settings; + this.expansionCount = 0; + this.feed(input); // Make new global namespace + + this.macros = new Namespace(macros, settings.macros); + this.mode = mode; + this.stack = []; // contains tokens in REVERSE order + } + /** + * Feed a new input string to the same MacroExpander + * (with existing macros etc.). + */ + + + feed(input) { + this.lexer = new Lexer(input, this.settings); + } + /** + * Switches between "text" and "math" modes. + */ + + + switchMode(newMode) { + this.mode = newMode; + } + /** + * Start a new group nesting within all namespaces. + */ + + + beginGroup() { + this.macros.beginGroup(); + } + /** + * End current group nesting within all namespaces. + */ + + + endGroup() { + this.macros.endGroup(); + } + /** + * Ends all currently nested groups (if any), restoring values before the + * groups began. Useful in case of an error in the middle of parsing. + */ + + + endGroups() { + this.macros.endGroups(); + } + /** + * Returns the topmost token on the stack, without expanding it. + * Similar in behavior to TeX's `\futurelet`. + */ + + + future() { + if (this.stack.length === 0) { + this.pushToken(this.lexer.lex()); + } + + return this.stack[this.stack.length - 1]; + } + /** + * Remove and return the next unexpanded token. + */ + + + popToken() { + this.future(); // ensure non-empty stack + + return this.stack.pop(); + } + /** + * Add a given token to the token stack. In particular, this get be used + * to put back a token returned from one of the other methods. + */ + + + pushToken(token) { + this.stack.push(token); + } + /** + * Append an array of tokens to the token stack. + */ + + + pushTokens(tokens) { + this.stack.push(...tokens); + } + /** + * Find an macro argument without expanding tokens and append the array of + * tokens to the token stack. Uses Token as a container for the result. + */ + + + scanArgument(isOptional) { + var start; + var end; + var tokens; + + if (isOptional) { + this.consumeSpaces(); // \@ifnextchar gobbles any space following it + + if (this.future().text !== "[") { + return null; + } + + start = this.popToken(); // don't include [ in tokens + + ({ + tokens, + end + } = this.consumeArg(["]"])); + } else { + ({ + tokens, + start, + end + } = this.consumeArg()); + } // indicate the end of an argument + + + this.pushToken(new Token("EOF", end.loc)); + this.pushTokens(tokens); + return start.range(end, ""); + } + /** + * Consume all following space tokens, without expansion. + */ + + + consumeSpaces() { + for (;;) { + var token = this.future(); + + if (token.text === " ") { + this.stack.pop(); + } else { + break; + } + } + } + /** + * Consume an argument from the token stream, and return the resulting array + * of tokens and start/end token. + */ + + + consumeArg(delims) { + // The argument for a delimited parameter is the shortest (possibly + // empty) sequence of tokens with properly nested {...} groups that is + // followed ... by this particular list of non-parameter tokens. + // The argument for an undelimited parameter is the next nonblank + // token, unless that token is ‘{’, when the argument will be the + // entire {...} group that follows. + var tokens = []; + var isDelimited = delims && delims.length > 0; + + if (!isDelimited) { + // Ignore spaces between arguments. As the TeXbook says: + // "After you have said ‘\def\row#1#2{...}’, you are allowed to + // put spaces between the arguments (e.g., ‘\row x n’), because + // TeX doesn’t use single spaces as undelimited arguments." + this.consumeSpaces(); + } + + var start = this.future(); + var tok; + var depth = 0; + var match = 0; + + do { + tok = this.popToken(); + tokens.push(tok); + + if (tok.text === "{") { + ++depth; + } else if (tok.text === "}") { + --depth; + + if (depth === -1) { + throw new ParseError("Extra }", tok); + } + } else if (tok.text === "EOF") { + throw new ParseError("Unexpected end of input in a macro argument" + ", expected '" + (delims && isDelimited ? delims[match] : "}") + "'", tok); + } + + if (delims && isDelimited) { + if ((depth === 0 || depth === 1 && delims[match] === "{") && tok.text === delims[match]) { + ++match; + + if (match === delims.length) { + // don't include delims in tokens + tokens.splice(-match, match); + break; + } + } else { + match = 0; + } + } + } while (depth !== 0 || isDelimited); // If the argument found ... has the form ‘{}’, + // ... the outermost braces enclosing the argument are removed + + + if (start.text === "{" && tokens[tokens.length - 1].text === "}") { + tokens.pop(); + tokens.shift(); + } + + tokens.reverse(); // to fit in with stack order + + return { + tokens, + start, + end: tok + }; + } + /** + * Consume the specified number of (delimited) arguments from the token + * stream and return the resulting array of arguments. + */ + + + consumeArgs(numArgs, delimiters) { + if (delimiters) { + if (delimiters.length !== numArgs + 1) { + throw new ParseError("The length of delimiters doesn't match the number of args!"); + } + + var delims = delimiters[0]; + + for (var i = 0; i < delims.length; i++) { + var tok = this.popToken(); + + if (delims[i] !== tok.text) { + throw new ParseError("Use of the macro doesn't match its definition", tok); + } + } + } + + var args = []; + + for (var _i = 0; _i < numArgs; _i++) { + args.push(this.consumeArg(delimiters && delimiters[_i + 1]).tokens); + } + + return args; + } + /** + * Increment `expansionCount` by the specified amount. + * Throw an error if it exceeds `maxExpand`. + */ + + + countExpansion(amount) { + this.expansionCount += amount; + + if (this.expansionCount > this.settings.maxExpand) { + throw new ParseError("Too many expansions: infinite loop or " + "need to increase maxExpand setting"); + } + } + /** + * Expand the next token only once if possible. + * + * If the token is expanded, the resulting tokens will be pushed onto + * the stack in reverse order, and the number of such tokens will be + * returned. This number might be zero or positive. + * + * If not, the return value is `false`, and the next token remains at the + * top of the stack. + * + * In either case, the next token will be on the top of the stack, + * or the stack will be empty (in case of empty expansion + * and no other tokens). + * + * Used to implement `expandAfterFuture` and `expandNextToken`. + * + * If expandableOnly, only expandable tokens are expanded and + * an undefined control sequence results in an error. + */ + + + expandOnce(expandableOnly) { + var topToken = this.popToken(); + var name = topToken.text; + var expansion = !topToken.noexpand ? this._getExpansion(name) : null; + + if (expansion == null || expandableOnly && expansion.unexpandable) { + if (expandableOnly && expansion == null && name[0] === "\\" && !this.isDefined(name)) { + throw new ParseError("Undefined control sequence: " + name); + } + + this.pushToken(topToken); + return false; + } + + this.countExpansion(1); + var tokens = expansion.tokens; + var args = this.consumeArgs(expansion.numArgs, expansion.delimiters); + + if (expansion.numArgs) { + // paste arguments in place of the placeholders + tokens = tokens.slice(); // make a shallow copy + + for (var i = tokens.length - 1; i >= 0; --i) { + var tok = tokens[i]; + + if (tok.text === "#") { + if (i === 0) { + throw new ParseError("Incomplete placeholder at end of macro body", tok); + } + + tok = tokens[--i]; // next token on stack + + if (tok.text === "#") { + // ## → # + tokens.splice(i + 1, 1); // drop first # + } else if (/^[1-9]$/.test(tok.text)) { + // replace the placeholder with the indicated argument + tokens.splice(i, 2, ...args[+tok.text - 1]); + } else { + throw new ParseError("Not a valid argument number", tok); + } + } + } + } // Concatenate expansion onto top of stack. + + + this.pushTokens(tokens); + return tokens.length; + } + /** + * Expand the next token only once (if possible), and return the resulting + * top token on the stack (without removing anything from the stack). + * Similar in behavior to TeX's `\expandafter\futurelet`. + * Equivalent to expandOnce() followed by future(). + */ + + + expandAfterFuture() { + this.expandOnce(); + return this.future(); + } + /** + * Recursively expand first token, then return first non-expandable token. + */ + + + expandNextToken() { + for (;;) { + if (this.expandOnce() === false) { + // fully expanded + var token = this.stack.pop(); // the token after \noexpand is interpreted as if its meaning + // were ‘\relax’ + + if (token.treatAsRelax) { + token.text = "\\relax"; + } + + return token; + } + } // Flow unable to figure out that this pathway is impossible. + // https://github.com/facebook/flow/issues/4808 + + + throw new Error(); // eslint-disable-line no-unreachable + } + /** + * Fully expand the given macro name and return the resulting list of + * tokens, or return `undefined` if no such macro is defined. + */ + + + expandMacro(name) { + return this.macros.has(name) ? this.expandTokens([new Token(name)]) : undefined; + } + /** + * Fully expand the given token stream and return the resulting list of + * tokens. Note that the input tokens are in reverse order, but the + * output tokens are in forward order. + */ + + + expandTokens(tokens) { + var output = []; + var oldStackLength = this.stack.length; + this.pushTokens(tokens); + + while (this.stack.length > oldStackLength) { + // Expand only expandable tokens + if (this.expandOnce(true) === false) { + // fully expanded + var token = this.stack.pop(); + + if (token.treatAsRelax) { + // the expansion of \noexpand is the token itself + token.noexpand = false; + token.treatAsRelax = false; + } + + output.push(token); + } + } // Count all of these tokens as additional expansions, to prevent + // exponential blowup from linearly many \edef's. + + + this.countExpansion(output.length); + return output; + } + /** + * Fully expand the given macro name and return the result as a string, + * or return `undefined` if no such macro is defined. + */ + + + expandMacroAsText(name) { + var tokens = this.expandMacro(name); + + if (tokens) { + return tokens.map(token => token.text).join(""); + } else { + return tokens; + } + } + /** + * Returns the expanded macro as a reversed array of tokens and a macro + * argument count. Or returns `null` if no such macro. + */ + + + _getExpansion(name) { + var definition = this.macros.get(name); + + if (definition == null) { + // mainly checking for undefined here + return definition; + } // If a single character has an associated catcode other than 13 + // (active character), then don't expand it. + + + if (name.length === 1) { + var catcode = this.lexer.catcodes[name]; + + if (catcode != null && catcode !== 13) { + return; + } + } + + var expansion = typeof definition === "function" ? definition(this) : definition; + + if (typeof expansion === "string") { + var numArgs = 0; + + if (expansion.indexOf("#") !== -1) { + var stripped = expansion.replace(/##/g, ""); + + while (stripped.indexOf("#" + (numArgs + 1)) !== -1) { + ++numArgs; + } + } + + var bodyLexer = new Lexer(expansion, this.settings); + var tokens = []; + var tok = bodyLexer.lex(); + + while (tok.text !== "EOF") { + tokens.push(tok); + tok = bodyLexer.lex(); + } + + tokens.reverse(); // to fit in with stack using push and pop + + var expanded = { + tokens, + numArgs + }; + return expanded; + } + + return expansion; + } + /** + * Determine whether a command is currently "defined" (has some + * functionality), meaning that it's a macro (in the current group), + * a function, a symbol, or one of the special commands listed in + * `implicitCommands`. + */ + + + isDefined(name) { + return this.macros.has(name) || functions.hasOwnProperty(name) || symbols.math.hasOwnProperty(name) || symbols.text.hasOwnProperty(name) || implicitCommands.hasOwnProperty(name); + } + /** + * Determine whether a command is expandable. + */ + + + isExpandable(name) { + var macro = this.macros.get(name); + return macro != null ? typeof macro === "string" || typeof macro === "function" || !macro.unexpandable : functions.hasOwnProperty(name) && !functions[name].primitive; + } + +} + +// Helpers for Parser.js handling of Unicode (sub|super)script characters. +var unicodeSubRegEx = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/; +var uSubsAndSups = Object.freeze({ + '₊': '+', + '₋': '-', + '₌': '=', + '₍': '(', + '₎': ')', + '₀': '0', + '₁': '1', + '₂': '2', + '₃': '3', + '₄': '4', + '₅': '5', + '₆': '6', + '₇': '7', + '₈': '8', + '₉': '9', + '\u2090': 'a', + '\u2091': 'e', + '\u2095': 'h', + '\u1D62': 'i', + '\u2C7C': 'j', + '\u2096': 'k', + '\u2097': 'l', + '\u2098': 'm', + '\u2099': 'n', + '\u2092': 'o', + '\u209A': 'p', + '\u1D63': 'r', + '\u209B': 's', + '\u209C': 't', + '\u1D64': 'u', + '\u1D65': 'v', + '\u2093': 'x', + '\u1D66': 'β', + '\u1D67': 'γ', + '\u1D68': 'ρ', + '\u1D69': '\u03d5', + '\u1D6A': 'χ', + '⁺': '+', + '⁻': '-', + '⁼': '=', + '⁽': '(', + '⁾': ')', + '⁰': '0', + '¹': '1', + '²': '2', + '³': '3', + '⁴': '4', + '⁵': '5', + '⁶': '6', + '⁷': '7', + '⁸': '8', + '⁹': '9', + '\u1D2C': 'A', + '\u1D2E': 'B', + '\u1D30': 'D', + '\u1D31': 'E', + '\u1D33': 'G', + '\u1D34': 'H', + '\u1D35': 'I', + '\u1D36': 'J', + '\u1D37': 'K', + '\u1D38': 'L', + '\u1D39': 'M', + '\u1D3A': 'N', + '\u1D3C': 'O', + '\u1D3E': 'P', + '\u1D3F': 'R', + '\u1D40': 'T', + '\u1D41': 'U', + '\u2C7D': 'V', + '\u1D42': 'W', + '\u1D43': 'a', + '\u1D47': 'b', + '\u1D9C': 'c', + '\u1D48': 'd', + '\u1D49': 'e', + '\u1DA0': 'f', + '\u1D4D': 'g', + '\u02B0': 'h', + '\u2071': 'i', + '\u02B2': 'j', + '\u1D4F': 'k', + '\u02E1': 'l', + '\u1D50': 'm', + '\u207F': 'n', + '\u1D52': 'o', + '\u1D56': 'p', + '\u02B3': 'r', + '\u02E2': 's', + '\u1D57': 't', + '\u1D58': 'u', + '\u1D5B': 'v', + '\u02B7': 'w', + '\u02E3': 'x', + '\u02B8': 'y', + '\u1DBB': 'z', + '\u1D5D': 'β', + '\u1D5E': 'γ', + '\u1D5F': 'δ', + '\u1D60': '\u03d5', + '\u1D61': 'χ', + '\u1DBF': 'θ' +}); + +/* eslint no-constant-condition:0 */ + +var unicodeAccents = { + "́": { + "text": "\\'", + "math": "\\acute" + }, + "̀": { + "text": "\\`", + "math": "\\grave" + }, + "̈": { + "text": "\\\"", + "math": "\\ddot" + }, + "̃": { + "text": "\\~", + "math": "\\tilde" + }, + "̄": { + "text": "\\=", + "math": "\\bar" + }, + "̆": { + "text": "\\u", + "math": "\\breve" + }, + "̌": { + "text": "\\v", + "math": "\\check" + }, + "̂": { + "text": "\\^", + "math": "\\hat" + }, + "̇": { + "text": "\\.", + "math": "\\dot" + }, + "̊": { + "text": "\\r", + "math": "\\mathring" + }, + "̋": { + "text": "\\H" + }, + "̧": { + "text": "\\c" + } +}; +var unicodeSymbols = { + "á": "á", + "à": "à", + "ä": "ä", + "ǟ": "ǟ", + "ã": "ã", + "ā": "ā", + "ă": "ă", + "ắ": "ắ", + "ằ": "ằ", + "ẵ": "ẵ", + "ǎ": "ǎ", + "â": "â", + "ấ": "ấ", + "ầ": "ầ", + "ẫ": "ẫ", + "ȧ": "ȧ", + "ǡ": "ǡ", + "å": "å", + "ǻ": "ǻ", + "ḃ": "ḃ", + "ć": "ć", + "ḉ": "ḉ", + "č": "č", + "ĉ": "ĉ", + "ċ": "ċ", + "ç": "ç", + "ď": "ď", + "ḋ": "ḋ", + "ḑ": "ḑ", + "é": "é", + "è": "è", + "ë": "ë", + "ẽ": "ẽ", + "ē": "ē", + "ḗ": "ḗ", + "ḕ": "ḕ", + "ĕ": "ĕ", + "ḝ": "ḝ", + "ě": "ě", + "ê": "ê", + "ế": "ế", + "ề": "ề", + "ễ": "ễ", + "ė": "ė", + "ȩ": "ȩ", + "ḟ": "ḟ", + "ǵ": "ǵ", + "ḡ": "ḡ", + "ğ": "ğ", + "ǧ": "ǧ", + "ĝ": "ĝ", + "ġ": "ġ", + "ģ": "ģ", + "ḧ": "ḧ", + "ȟ": "ȟ", + "ĥ": "ĥ", + "ḣ": "ḣ", + "ḩ": "ḩ", + "í": "í", + "ì": "ì", + "ï": "ï", + "ḯ": "ḯ", + "ĩ": "ĩ", + "ī": "ī", + "ĭ": "ĭ", + "ǐ": "ǐ", + "î": "î", + "ǰ": "ǰ", + "ĵ": "ĵ", + "ḱ": "ḱ", + "ǩ": "ǩ", + "ķ": "ķ", + "ĺ": "ĺ", + "ľ": "ľ", + "ļ": "ļ", + "ḿ": "ḿ", + "ṁ": "ṁ", + "ń": "ń", + "ǹ": "ǹ", + "ñ": "ñ", + "ň": "ň", + "ṅ": "ṅ", + "ņ": "ņ", + "ó": "ó", + "ò": "ò", + "ö": "ö", + "ȫ": "ȫ", + "õ": "õ", + "ṍ": "ṍ", + "ṏ": "ṏ", + "ȭ": "ȭ", + "ō": "ō", + "ṓ": "ṓ", + "ṑ": "ṑ", + "ŏ": "ŏ", + "ǒ": "ǒ", + "ô": "ô", + "ố": "ố", + "ồ": "ồ", + "ỗ": "ỗ", + "ȯ": "ȯ", + "ȱ": "ȱ", + "ő": "ő", + "ṕ": "ṕ", + "ṗ": "ṗ", + "ŕ": "ŕ", + "ř": "ř", + "ṙ": "ṙ", + "ŗ": "ŗ", + "ś": "ś", + "ṥ": "ṥ", + "š": "š", + "ṧ": "ṧ", + "ŝ": "ŝ", + "ṡ": "ṡ", + "ş": "ş", + "ẗ": "ẗ", + "ť": "ť", + "ṫ": "ṫ", + "ţ": "ţ", + "ú": "ú", + "ù": "ù", + "ü": "ü", + "ǘ": "ǘ", + "ǜ": "ǜ", + "ǖ": "ǖ", + "ǚ": "ǚ", + "ũ": "ũ", + "ṹ": "ṹ", + "ū": "ū", + "ṻ": "ṻ", + "ŭ": "ŭ", + "ǔ": "ǔ", + "û": "û", + "ů": "ů", + "ű": "ű", + "ṽ": "ṽ", + "ẃ": "ẃ", + "ẁ": "ẁ", + "ẅ": "ẅ", + "ŵ": "ŵ", + "ẇ": "ẇ", + "ẘ": "ẘ", + "ẍ": "ẍ", + "ẋ": "ẋ", + "ý": "ý", + "ỳ": "ỳ", + "ÿ": "ÿ", + "ỹ": "ỹ", + "ȳ": "ȳ", + "ŷ": "ŷ", + "ẏ": "ẏ", + "ẙ": "ẙ", + "ź": "ź", + "ž": "ž", + "ẑ": "ẑ", + "ż": "ż", + "Á": "Á", + "À": "À", + "Ä": "Ä", + "Ǟ": "Ǟ", + "Ã": "Ã", + "Ā": "Ā", + "Ă": "Ă", + "Ắ": "Ắ", + "Ằ": "Ằ", + "Ẵ": "Ẵ", + "Ǎ": "Ǎ", + "Â": "Â", + "Ấ": "Ấ", + "Ầ": "Ầ", + "Ẫ": "Ẫ", + "Ȧ": "Ȧ", + "Ǡ": "Ǡ", + "Å": "Å", + "Ǻ": "Ǻ", + "Ḃ": "Ḃ", + "Ć": "Ć", + "Ḉ": "Ḉ", + "Č": "Č", + "Ĉ": "Ĉ", + "Ċ": "Ċ", + "Ç": "Ç", + "Ď": "Ď", + "Ḋ": "Ḋ", + "Ḑ": "Ḑ", + "É": "É", + "È": "È", + "Ë": "Ë", + "Ẽ": "Ẽ", + "Ē": "Ē", + "Ḗ": "Ḗ", + "Ḕ": "Ḕ", + "Ĕ": "Ĕ", + "Ḝ": "Ḝ", + "Ě": "Ě", + "Ê": "Ê", + "Ế": "Ế", + "Ề": "Ề", + "Ễ": "Ễ", + "Ė": "Ė", + "Ȩ": "Ȩ", + "Ḟ": "Ḟ", + "Ǵ": "Ǵ", + "Ḡ": "Ḡ", + "Ğ": "Ğ", + "Ǧ": "Ǧ", + "Ĝ": "Ĝ", + "Ġ": "Ġ", + "Ģ": "Ģ", + "Ḧ": "Ḧ", + "Ȟ": "Ȟ", + "Ĥ": "Ĥ", + "Ḣ": "Ḣ", + "Ḩ": "Ḩ", + "Í": "Í", + "Ì": "Ì", + "Ï": "Ï", + "Ḯ": "Ḯ", + "Ĩ": "Ĩ", + "Ī": "Ī", + "Ĭ": "Ĭ", + "Ǐ": "Ǐ", + "Î": "Î", + "İ": "İ", + "Ĵ": "Ĵ", + "Ḱ": "Ḱ", + "Ǩ": "Ǩ", + "Ķ": "Ķ", + "Ĺ": "Ĺ", + "Ľ": "Ľ", + "Ļ": "Ļ", + "Ḿ": "Ḿ", + "Ṁ": "Ṁ", + "Ń": "Ń", + "Ǹ": "Ǹ", + "Ñ": "Ñ", + "Ň": "Ň", + "Ṅ": "Ṅ", + "Ņ": "Ņ", + "Ó": "Ó", + "Ò": "Ò", + "Ö": "Ö", + "Ȫ": "Ȫ", + "Õ": "Õ", + "Ṍ": "Ṍ", + "Ṏ": "Ṏ", + "Ȭ": "Ȭ", + "Ō": "Ō", + "Ṓ": "Ṓ", + "Ṑ": "Ṑ", + "Ŏ": "Ŏ", + "Ǒ": "Ǒ", + "Ô": "Ô", + "Ố": "Ố", + "Ồ": "Ồ", + "Ỗ": "Ỗ", + "Ȯ": "Ȯ", + "Ȱ": "Ȱ", + "Ő": "Ő", + "Ṕ": "Ṕ", + "Ṗ": "Ṗ", + "Ŕ": "Ŕ", + "Ř": "Ř", + "Ṙ": "Ṙ", + "Ŗ": "Ŗ", + "Ś": "Ś", + "Ṥ": "Ṥ", + "Š": "Š", + "Ṧ": "Ṧ", + "Ŝ": "Ŝ", + "Ṡ": "Ṡ", + "Ş": "Ş", + "Ť": "Ť", + "Ṫ": "Ṫ", + "Ţ": "Ţ", + "Ú": "Ú", + "Ù": "Ù", + "Ü": "Ü", + "Ǘ": "Ǘ", + "Ǜ": "Ǜ", + "Ǖ": "Ǖ", + "Ǚ": "Ǚ", + "Ũ": "Ũ", + "Ṹ": "Ṹ", + "Ū": "Ū", + "Ṻ": "Ṻ", + "Ŭ": "Ŭ", + "Ǔ": "Ǔ", + "Û": "Û", + "Ů": "Ů", + "Ű": "Ű", + "Ṽ": "Ṽ", + "Ẃ": "Ẃ", + "Ẁ": "Ẁ", + "Ẅ": "Ẅ", + "Ŵ": "Ŵ", + "Ẇ": "Ẇ", + "Ẍ": "Ẍ", + "Ẋ": "Ẋ", + "Ý": "Ý", + "Ỳ": "Ỳ", + "Ÿ": "Ÿ", + "Ỹ": "Ỹ", + "Ȳ": "Ȳ", + "Ŷ": "Ŷ", + "Ẏ": "Ẏ", + "Ź": "Ź", + "Ž": "Ž", + "Ẑ": "Ẑ", + "Ż": "Ż", + "ά": "ά", + "ὰ": "ὰ", + "ᾱ": "ᾱ", + "ᾰ": "ᾰ", + "έ": "έ", + "ὲ": "ὲ", + "ή": "ή", + "ὴ": "ὴ", + "ί": "ί", + "ὶ": "ὶ", + "ϊ": "ϊ", + "ΐ": "ΐ", + "ῒ": "ῒ", + "ῑ": "ῑ", + "ῐ": "ῐ", + "ό": "ό", + "ὸ": "ὸ", + "ύ": "ύ", + "ὺ": "ὺ", + "ϋ": "ϋ", + "ΰ": "ΰ", + "ῢ": "ῢ", + "ῡ": "ῡ", + "ῠ": "ῠ", + "ώ": "ώ", + "ὼ": "ὼ", + "Ύ": "Ύ", + "Ὺ": "Ὺ", + "Ϋ": "Ϋ", + "Ῡ": "Ῡ", + "Ῠ": "Ῠ", + "Ώ": "Ώ", + "Ὼ": "Ὼ" +}; + +/** + * This file contains the parser used to parse out a TeX expression from the + * input. Since TeX isn't context-free, standard parsers don't work particularly + * well. + * + * The strategy of this parser is as such: + * + * The main functions (the `.parse...` ones) take a position in the current + * parse string to parse tokens from. The lexer (found in Lexer.js, stored at + * this.gullet.lexer) also supports pulling out tokens at arbitrary places. When + * individual tokens are needed at a position, the lexer is called to pull out a + * token, which is then used. + * + * The parser has a property called "mode" indicating the mode that + * the parser is currently in. Currently it has to be one of "math" or + * "text", which denotes whether the current environment is a math-y + * one or a text-y one (e.g. inside \text). Currently, this serves to + * limit the functions which can be used in text mode. + * + * The main functions then return an object which contains the useful data that + * was parsed at its given point, and a new position at the end of the parsed + * data. The main functions can call each other and continue the parsing by + * using the returned position as a new starting point. + * + * There are also extra `.handle...` functions, which pull out some reused + * functionality into self-contained functions. + * + * The functions return ParseNodes. + */ +class Parser { + constructor(input, settings) { + this.mode = void 0; + this.gullet = void 0; + this.settings = void 0; + this.leftrightDepth = void 0; + this.nextToken = void 0; + // Start in math mode + this.mode = "math"; // Create a new macro expander (gullet) and (indirectly via that) also a + // new lexer (mouth) for this parser (stomach, in the language of TeX) + + this.gullet = new MacroExpander(input, settings, this.mode); // Store the settings for use in parsing + + this.settings = settings; // Count leftright depth (for \middle errors) + + this.leftrightDepth = 0; + } + /** + * Checks a result to make sure it has the right type, and throws an + * appropriate error otherwise. + */ + + + expect(text, consume) { + if (consume === void 0) { + consume = true; + } + + if (this.fetch().text !== text) { + throw new ParseError("Expected '" + text + "', got '" + this.fetch().text + "'", this.fetch()); + } + + if (consume) { + this.consume(); + } + } + /** + * Discards the current lookahead token, considering it consumed. + */ + + + consume() { + this.nextToken = null; + } + /** + * Return the current lookahead token, or if there isn't one (at the + * beginning, or if the previous lookahead token was consume()d), + * fetch the next token as the new lookahead token and return it. + */ + + + fetch() { + if (this.nextToken == null) { + this.nextToken = this.gullet.expandNextToken(); + } + + return this.nextToken; + } + /** + * Switches between "text" and "math" modes. + */ + + + switchMode(newMode) { + this.mode = newMode; + this.gullet.switchMode(newMode); + } + /** + * Main parsing function, which parses an entire input. + */ + + + parse() { + if (!this.settings.globalGroup) { + // Create a group namespace for the math expression. + // (LaTeX creates a new group for every $...$, $$...$$, \[...\].) + this.gullet.beginGroup(); + } // Use old \color behavior (same as LaTeX's \textcolor) if requested. + // We do this within the group for the math expression, so it doesn't + // pollute settings.macros. + + + if (this.settings.colorIsTextColor) { + this.gullet.macros.set("\\color", "\\textcolor"); + } + + try { + // Try to parse the input + var parse = this.parseExpression(false); // If we succeeded, make sure there's an EOF at the end + + this.expect("EOF"); // End the group namespace for the expression + + if (!this.settings.globalGroup) { + this.gullet.endGroup(); + } + + return parse; // Close any leftover groups in case of a parse error. + } finally { + this.gullet.endGroups(); + } + } + /** + * Fully parse a separate sequence of tokens as a separate job. + * Tokens should be specified in reverse order, as in a MacroDefinition. + */ + + + subparse(tokens) { + // Save the next token from the current job. + var oldToken = this.nextToken; + this.consume(); // Run the new job, terminating it with an excess '}' + + this.gullet.pushToken(new Token("}")); + this.gullet.pushTokens(tokens); + var parse = this.parseExpression(false); + this.expect("}"); // Restore the next token from the current job. + + this.nextToken = oldToken; + return parse; + } + + /** + * Parses an "expression", which is a list of atoms. + * + * `breakOnInfix`: Should the parsing stop when we hit infix nodes? This + * happens when functions have higher precedence han infix + * nodes in implicit parses. + * + * `breakOnTokenText`: The text of the token that the expression should end + * with, or `null` if something else should end the + * expression. + */ + parseExpression(breakOnInfix, breakOnTokenText) { + var body = []; // Keep adding atoms to the body until we can't parse any more atoms (either + // we reached the end, a }, or a \right) + + while (true) { + // Ignore spaces in math mode + if (this.mode === "math") { + this.consumeSpaces(); + } + + var lex = this.fetch(); + + if (Parser.endOfExpression.indexOf(lex.text) !== -1) { + break; + } + + if (breakOnTokenText && lex.text === breakOnTokenText) { + break; + } + + if (breakOnInfix && functions[lex.text] && functions[lex.text].infix) { + break; + } + + var atom = this.parseAtom(breakOnTokenText); + + if (!atom) { + break; + } else if (atom.type === "internal") { + continue; + } + + body.push(atom); + } + + if (this.mode === "text") { + this.formLigatures(body); + } + + return this.handleInfixNodes(body); + } + /** + * Rewrites infix operators such as \over with corresponding commands such + * as \frac. + * + * There can only be one infix operator per group. If there's more than one + * then the expression is ambiguous. This can be resolved by adding {}. + */ + + + handleInfixNodes(body) { + var overIndex = -1; + var funcName; + + for (var i = 0; i < body.length; i++) { + if (body[i].type === "infix") { + if (overIndex !== -1) { + throw new ParseError("only one infix operator per group", body[i].token); + } + + overIndex = i; + funcName = body[i].replaceWith; + } + } + + if (overIndex !== -1 && funcName) { + var numerNode; + var denomNode; + var numerBody = body.slice(0, overIndex); + var denomBody = body.slice(overIndex + 1); + + if (numerBody.length === 1 && numerBody[0].type === "ordgroup") { + numerNode = numerBody[0]; + } else { + numerNode = { + type: "ordgroup", + mode: this.mode, + body: numerBody + }; + } + + if (denomBody.length === 1 && denomBody[0].type === "ordgroup") { + denomNode = denomBody[0]; + } else { + denomNode = { + type: "ordgroup", + mode: this.mode, + body: denomBody + }; + } + + var node; + + if (funcName === "\\\\abovefrac") { + node = this.callFunction(funcName, [numerNode, body[overIndex], denomNode], []); + } else { + node = this.callFunction(funcName, [numerNode, denomNode], []); + } + + return [node]; + } else { + return body; + } + } + /** + * Handle a subscript or superscript with nice errors. + */ + + + handleSupSubscript(name // For error reporting. + ) { + var symbolToken = this.fetch(); + var symbol = symbolToken.text; + this.consume(); + this.consumeSpaces(); // ignore spaces before sup/subscript argument + + var group = this.parseGroup(name); + + if (!group) { + throw new ParseError("Expected group after '" + symbol + "'", symbolToken); + } + + return group; + } + /** + * Converts the textual input of an unsupported command into a text node + * contained within a color node whose color is determined by errorColor + */ + + + formatUnsupportedCmd(text) { + var textordArray = []; + + for (var i = 0; i < text.length; i++) { + textordArray.push({ + type: "textord", + mode: "text", + text: text[i] + }); + } + + var textNode = { + type: "text", + mode: this.mode, + body: textordArray + }; + var colorNode = { + type: "color", + mode: this.mode, + color: this.settings.errorColor, + body: [textNode] + }; + return colorNode; + } + /** + * Parses a group with optional super/subscripts. + */ + + + parseAtom(breakOnTokenText) { + // The body of an atom is an implicit group, so that things like + // \left(x\right)^2 work correctly. + var base = this.parseGroup("atom", breakOnTokenText); // In text mode, we don't have superscripts or subscripts + + if (this.mode === "text") { + return base; + } // Note that base may be empty (i.e. null) at this point. + + + var superscript; + var subscript; + + while (true) { + // Guaranteed in math mode, so eat any spaces first. + this.consumeSpaces(); // Lex the first token + + var lex = this.fetch(); + + if (lex.text === "\\limits" || lex.text === "\\nolimits") { + // We got a limit control + if (base && base.type === "op") { + var limits = lex.text === "\\limits"; + base.limits = limits; + base.alwaysHandleSupSub = true; + } else if (base && base.type === "operatorname") { + if (base.alwaysHandleSupSub) { + base.limits = lex.text === "\\limits"; + } + } else { + throw new ParseError("Limit controls must follow a math operator", lex); + } + + this.consume(); + } else if (lex.text === "^") { + // We got a superscript start + if (superscript) { + throw new ParseError("Double superscript", lex); + } + + superscript = this.handleSupSubscript("superscript"); + } else if (lex.text === "_") { + // We got a subscript start + if (subscript) { + throw new ParseError("Double subscript", lex); + } + + subscript = this.handleSupSubscript("subscript"); + } else if (lex.text === "'") { + // We got a prime + if (superscript) { + throw new ParseError("Double superscript", lex); + } + + var prime = { + type: "textord", + mode: this.mode, + text: "\\prime" + }; // Many primes can be grouped together, so we handle this here + + var primes = [prime]; + this.consume(); // Keep lexing tokens until we get something that's not a prime + + while (this.fetch().text === "'") { + // For each one, add another prime to the list + primes.push(prime); + this.consume(); + } // If there's a superscript following the primes, combine that + // superscript in with the primes. + + + if (this.fetch().text === "^") { + primes.push(this.handleSupSubscript("superscript")); + } // Put everything into an ordgroup as the superscript + + + superscript = { + type: "ordgroup", + mode: this.mode, + body: primes + }; + } else if (uSubsAndSups[lex.text]) { + // A Unicode subscript or superscript character. + // We treat these similarly to the unicode-math package. + // So we render a string of Unicode (sub|super)scripts the + // same as a (sub|super)script of regular characters. + var isSub = unicodeSubRegEx.test(lex.text); + var subsupTokens = []; + subsupTokens.push(new Token(uSubsAndSups[lex.text])); + this.consume(); // Continue fetching tokens to fill out the string. + + while (true) { + var token = this.fetch().text; + + if (!uSubsAndSups[token]) { + break; + } + + if (unicodeSubRegEx.test(token) !== isSub) { + break; + } + + subsupTokens.unshift(new Token(uSubsAndSups[token])); + this.consume(); + } // Now create a (sub|super)script. + + + var body = this.subparse(subsupTokens); + + if (isSub) { + subscript = { + type: "ordgroup", + mode: "math", + body + }; + } else { + superscript = { + type: "ordgroup", + mode: "math", + body + }; + } + } else { + // If it wasn't ^, _, or ', stop parsing super/subscripts + break; + } + } // Base must be set if superscript or subscript are set per logic above, + // but need to check here for type check to pass. + + + if (superscript || subscript) { + // If we got either a superscript or subscript, create a supsub + return { + type: "supsub", + mode: this.mode, + base: base, + sup: superscript, + sub: subscript + }; + } else { + // Otherwise return the original body + return base; + } + } + /** + * Parses an entire function, including its base and all of its arguments. + */ + + + parseFunction(breakOnTokenText, name // For determining its context + ) { + var token = this.fetch(); + var func = token.text; + var funcData = functions[func]; + + if (!funcData) { + return null; + } + + this.consume(); // consume command token + + if (name && name !== "atom" && !funcData.allowedInArgument) { + throw new ParseError("Got function '" + func + "' with no arguments" + (name ? " as " + name : ""), token); + } else if (this.mode === "text" && !funcData.allowedInText) { + throw new ParseError("Can't use function '" + func + "' in text mode", token); + } else if (this.mode === "math" && funcData.allowedInMath === false) { + throw new ParseError("Can't use function '" + func + "' in math mode", token); + } + + var { + args, + optArgs + } = this.parseArguments(func, funcData); + return this.callFunction(func, args, optArgs, token, breakOnTokenText); + } + /** + * Call a function handler with a suitable context and arguments. + */ + + + callFunction(name, args, optArgs, token, breakOnTokenText) { + var context = { + funcName: name, + parser: this, + token, + breakOnTokenText + }; + var func = functions[name]; + + if (func && func.handler) { + return func.handler(context, args, optArgs); + } else { + throw new ParseError("No function handler for " + name); + } + } + /** + * Parses the arguments of a function or environment + */ + + + parseArguments(func, // Should look like "\name" or "\begin{name}". + funcData) { + var totalArgs = funcData.numArgs + funcData.numOptionalArgs; + + if (totalArgs === 0) { + return { + args: [], + optArgs: [] + }; + } + + var args = []; + var optArgs = []; + + for (var i = 0; i < totalArgs; i++) { + var argType = funcData.argTypes && funcData.argTypes[i]; + var isOptional = i < funcData.numOptionalArgs; + + if (funcData.primitive && argType == null || // \sqrt expands into primitive if optional argument doesn't exist + funcData.type === "sqrt" && i === 1 && optArgs[0] == null) { + argType = "primitive"; + } + + var arg = this.parseGroupOfType("argument to '" + func + "'", argType, isOptional); + + if (isOptional) { + optArgs.push(arg); + } else if (arg != null) { + args.push(arg); + } else { + // should be unreachable + throw new ParseError("Null argument, please report this as a bug"); + } + } + + return { + args, + optArgs + }; + } + /** + * Parses a group when the mode is changing. + */ + + + parseGroupOfType(name, type, optional) { + switch (type) { + case "color": + return this.parseColorGroup(optional); + + case "size": + return this.parseSizeGroup(optional); + + case "url": + return this.parseUrlGroup(optional); + + case "math": + case "text": + return this.parseArgumentGroup(optional, type); + + case "hbox": + { + // hbox argument type wraps the argument in the equivalent of + // \hbox, which is like \text but switching to \textstyle size. + var group = this.parseArgumentGroup(optional, "text"); + return group != null ? { + type: "styling", + mode: group.mode, + body: [group], + style: "text" // simulate \textstyle + + } : null; + } + + case "raw": + { + var token = this.parseStringGroup("raw", optional); + return token != null ? { + type: "raw", + mode: "text", + string: token.text + } : null; + } + + case "primitive": + { + if (optional) { + throw new ParseError("A primitive argument cannot be optional"); + } + + var _group = this.parseGroup(name); + + if (_group == null) { + throw new ParseError("Expected group as " + name, this.fetch()); + } + + return _group; + } + + case "original": + case null: + case undefined: + return this.parseArgumentGroup(optional); + + default: + throw new ParseError("Unknown group type as " + name, this.fetch()); + } + } + /** + * Discard any space tokens, fetching the next non-space token. + */ + + + consumeSpaces() { + while (this.fetch().text === " ") { + this.consume(); + } + } + /** + * Parses a group, essentially returning the string formed by the + * brace-enclosed tokens plus some position information. + */ + + + parseStringGroup(modeName, // Used to describe the mode in error messages. + optional) { + var argToken = this.gullet.scanArgument(optional); + + if (argToken == null) { + return null; + } + + var str = ""; + var nextToken; + + while ((nextToken = this.fetch()).text !== "EOF") { + str += nextToken.text; + this.consume(); + } + + this.consume(); // consume the end of the argument + + argToken.text = str; + return argToken; + } + /** + * Parses a regex-delimited group: the largest sequence of tokens + * whose concatenated strings match `regex`. Returns the string + * formed by the tokens plus some position information. + */ + + + parseRegexGroup(regex, modeName // Used to describe the mode in error messages. + ) { + var firstToken = this.fetch(); + var lastToken = firstToken; + var str = ""; + var nextToken; + + while ((nextToken = this.fetch()).text !== "EOF" && regex.test(str + nextToken.text)) { + lastToken = nextToken; + str += lastToken.text; + this.consume(); + } + + if (str === "") { + throw new ParseError("Invalid " + modeName + ": '" + firstToken.text + "'", firstToken); + } + + return firstToken.range(lastToken, str); + } + /** + * Parses a color description. + */ + + + parseColorGroup(optional) { + var res = this.parseStringGroup("color", optional); + + if (res == null) { + return null; + } + + var match = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(res.text); + + if (!match) { + throw new ParseError("Invalid color: '" + res.text + "'", res); + } + + var color = match[0]; + + if (/^[0-9a-f]{6}$/i.test(color)) { + // We allow a 6-digit HTML color spec without a leading "#". + // This follows the xcolor package's HTML color model. + // Predefined color names are all missed by this RegEx pattern. + color = "#" + color; + } + + return { + type: "color-token", + mode: this.mode, + color + }; + } + /** + * Parses a size specification, consisting of magnitude and unit. + */ + + + parseSizeGroup(optional) { + var res; + var isBlank = false; // don't expand before parseStringGroup + + this.gullet.consumeSpaces(); + + if (!optional && this.gullet.future().text !== "{") { + res = this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size"); + } else { + res = this.parseStringGroup("size", optional); + } + + if (!res) { + return null; + } + + if (!optional && res.text.length === 0) { + // Because we've tested for what is !optional, this block won't + // affect \kern, \hspace, etc. It will capture the mandatory arguments + // to \genfrac and \above. + res.text = "0pt"; // Enable \above{} + + isBlank = true; // This is here specifically for \genfrac + } + + var match = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(res.text); + + if (!match) { + throw new ParseError("Invalid size: '" + res.text + "'", res); + } + + var data = { + number: +(match[1] + match[2]), + // sign + magnitude, cast to number + unit: match[3] + }; + + if (!validUnit(data)) { + throw new ParseError("Invalid unit: '" + data.unit + "'", res); + } + + return { + type: "size", + mode: this.mode, + value: data, + isBlank + }; + } + /** + * Parses an URL, checking escaped letters and allowed protocols, + * and setting the catcode of % as an active character (as in \hyperref). + */ + + + parseUrlGroup(optional) { + this.gullet.lexer.setCatcode("%", 13); // active character + + this.gullet.lexer.setCatcode("~", 12); // other character + + var res = this.parseStringGroup("url", optional); + this.gullet.lexer.setCatcode("%", 14); // comment character + + this.gullet.lexer.setCatcode("~", 13); // active character + + if (res == null) { + return null; + } // hyperref package allows backslashes alone in href, but doesn't + // generate valid links in such cases; we interpret this as + // "undefined" behaviour, and keep them as-is. Some browser will + // replace backslashes with forward slashes. + + + var url = res.text.replace(/\\([#$%&~_^{}])/g, '$1'); + return { + type: "url", + mode: this.mode, + url + }; + } + /** + * Parses an argument with the mode specified. + */ + + + parseArgumentGroup(optional, mode) { + var argToken = this.gullet.scanArgument(optional); + + if (argToken == null) { + return null; + } + + var outerMode = this.mode; + + if (mode) { + // Switch to specified mode + this.switchMode(mode); + } + + this.gullet.beginGroup(); + var expression = this.parseExpression(false, "EOF"); // TODO: find an alternative way to denote the end + + this.expect("EOF"); // expect the end of the argument + + this.gullet.endGroup(); + var result = { + type: "ordgroup", + mode: this.mode, + loc: argToken.loc, + body: expression + }; + + if (mode) { + // Switch mode back + this.switchMode(outerMode); + } + + return result; + } + /** + * Parses an ordinary group, which is either a single nucleus (like "x") + * or an expression in braces (like "{x+y}") or an implicit group, a group + * that starts at the current position, and ends right before a higher explicit + * group ends, or at EOF. + */ + + + parseGroup(name, // For error reporting. + breakOnTokenText) { + var firstToken = this.fetch(); + var text = firstToken.text; + var result; // Try to parse an open brace or \begingroup + + if (text === "{" || text === "\\begingroup") { + this.consume(); + var groupEnd = text === "{" ? "}" : "\\endgroup"; + this.gullet.beginGroup(); // If we get a brace, parse an expression + + var expression = this.parseExpression(false, groupEnd); + var lastToken = this.fetch(); + this.expect(groupEnd); // Check that we got a matching closing brace + + this.gullet.endGroup(); + result = { + type: "ordgroup", + mode: this.mode, + loc: SourceLocation.range(firstToken, lastToken), + body: expression, + // A group formed by \begingroup...\endgroup is a semi-simple group + // which doesn't affect spacing in math mode, i.e., is transparent. + // https://tex.stackexchange.com/questions/1930/when-should-one- + // use-begingroup-instead-of-bgroup + semisimple: text === "\\begingroup" || undefined + }; + } else { + // If there exists a function with this name, parse the function. + // Otherwise, just return a nucleus + result = this.parseFunction(breakOnTokenText, name) || this.parseSymbol(); + + if (result == null && text[0] === "\\" && !implicitCommands.hasOwnProperty(text)) { + if (this.settings.throwOnError) { + throw new ParseError("Undefined control sequence: " + text, firstToken); + } + + result = this.formatUnsupportedCmd(text); + this.consume(); + } + } + + return result; + } + /** + * Form ligature-like combinations of characters for text mode. + * This includes inputs like "--", "---", "``" and "''". + * The result will simply replace multiple textord nodes with a single + * character in each value by a single textord node having multiple + * characters in its value. The representation is still ASCII source. + * The group will be modified in place. + */ + + + formLigatures(group) { + var n = group.length - 1; + + for (var i = 0; i < n; ++i) { + var a = group[i]; // $FlowFixMe: Not every node type has a `text` property. + + var v = a.text; + + if (v === "-" && group[i + 1].text === "-") { + if (i + 1 < n && group[i + 2].text === "-") { + group.splice(i, 3, { + type: "textord", + mode: "text", + loc: SourceLocation.range(a, group[i + 2]), + text: "---" + }); + n -= 2; + } else { + group.splice(i, 2, { + type: "textord", + mode: "text", + loc: SourceLocation.range(a, group[i + 1]), + text: "--" + }); + n -= 1; + } + } + + if ((v === "'" || v === "`") && group[i + 1].text === v) { + group.splice(i, 2, { + type: "textord", + mode: "text", + loc: SourceLocation.range(a, group[i + 1]), + text: v + v + }); + n -= 1; + } + } + } + /** + * Parse a single symbol out of the string. Here, we handle single character + * symbols and special functions like \verb. + */ + + + parseSymbol() { + var nucleus = this.fetch(); + var text = nucleus.text; + + if (/^\\verb[^a-zA-Z]/.test(text)) { + this.consume(); + var arg = text.slice(5); + var star = arg.charAt(0) === "*"; + + if (star) { + arg = arg.slice(1); + } // Lexer's tokenRegex is constructed to always have matching + // first/last characters. + + + if (arg.length < 2 || arg.charAt(0) !== arg.slice(-1)) { + throw new ParseError("\\verb assertion failed --\n please report what input caused this bug"); + } + + arg = arg.slice(1, -1); // remove first and last char + + return { + type: "verb", + mode: "text", + body: arg, + star + }; + } // At this point, we should have a symbol, possibly with accents. + // First expand any accented base symbol according to unicodeSymbols. + + + if (unicodeSymbols.hasOwnProperty(text[0]) && !symbols[this.mode][text[0]]) { + // This behavior is not strict (XeTeX-compatible) in math mode. + if (this.settings.strict && this.mode === "math") { + this.settings.reportNonstrict("unicodeTextInMathMode", "Accented Unicode text character \"" + text[0] + "\" used in " + "math mode", nucleus); + } + + text = unicodeSymbols[text[0]] + text.slice(1); + } // Strip off any combining characters + + + var match = combiningDiacriticalMarksEndRegex.exec(text); + + if (match) { + text = text.substring(0, match.index); + + if (text === 'i') { + text = '\u0131'; // dotless i, in math and text mode + } else if (text === 'j') { + text = '\u0237'; // dotless j, in math and text mode + } + } // Recognize base symbol + + + var symbol; + + if (symbols[this.mode][text]) { + if (this.settings.strict && this.mode === 'math' && extraLatin.indexOf(text) >= 0) { + this.settings.reportNonstrict("unicodeTextInMathMode", "Latin-1/Unicode text character \"" + text[0] + "\" used in " + "math mode", nucleus); + } + + var group = symbols[this.mode][text].group; + var loc = SourceLocation.range(nucleus); + var s; + + if (ATOMS.hasOwnProperty(group)) { + // $FlowFixMe + var family = group; + s = { + type: "atom", + mode: this.mode, + family, + loc, + text + }; + } else { + // $FlowFixMe + s = { + type: group, + mode: this.mode, + loc, + text + }; + } // $FlowFixMe + + + symbol = s; + } else if (text.charCodeAt(0) >= 0x80) { + // no symbol for e.g. ^ + if (this.settings.strict) { + if (!supportedCodepoint(text.charCodeAt(0))) { + this.settings.reportNonstrict("unknownSymbol", "Unrecognized Unicode character \"" + text[0] + "\"" + (" (" + text.charCodeAt(0) + ")"), nucleus); + } else if (this.mode === "math") { + this.settings.reportNonstrict("unicodeTextInMathMode", "Unicode text character \"" + text[0] + "\" used in math mode", nucleus); + } + } // All nonmathematical Unicode characters are rendered as if they + // are in text mode (wrapped in \text) because that's what it + // takes to render them in LaTeX. Setting `mode: this.mode` is + // another natural choice (the user requested math mode), but + // this makes it more difficult for getCharacterMetrics() to + // distinguish Unicode characters without metrics and those for + // which we want to simulate the letter M. + + + symbol = { + type: "textord", + mode: "text", + loc: SourceLocation.range(nucleus), + text + }; + } else { + return null; // EOF, ^, _, {, }, etc. + } + + this.consume(); // Transform combining characters into accents + + if (match) { + for (var i = 0; i < match[0].length; i++) { + var accent = match[0][i]; + + if (!unicodeAccents[accent]) { + throw new ParseError("Unknown accent ' " + accent + "'", nucleus); + } + + var command = unicodeAccents[accent][this.mode] || unicodeAccents[accent].text; + + if (!command) { + throw new ParseError("Accent " + accent + " unsupported in " + this.mode + " mode", nucleus); + } + + symbol = { + type: "accent", + mode: this.mode, + loc: SourceLocation.range(nucleus), + label: command, + isStretchy: false, + isShifty: true, + // $FlowFixMe + base: symbol + }; + } + } // $FlowFixMe + + + return symbol; + } + +} +Parser.endOfExpression = ["}", "\\endgroup", "\\end", "\\right", "&"]; + +/** + * Provides a single function for parsing an expression using a Parser + * TODO(emily): Remove this + */ + +/** + * Parses an expression using a Parser, then returns the parsed result. + */ +var parseTree = function parseTree(toParse, settings) { + if (!(typeof toParse === 'string' || toParse instanceof String)) { + throw new TypeError('KaTeX can only parse string typed expression'); + } + + var parser = new Parser(toParse, settings); // Blank out any \df@tag to avoid spurious "Duplicate \tag" errors + + delete parser.gullet.macros.current["\\df@tag"]; + var tree = parser.parse(); // Prevent a color definition from persisting between calls to katex.render(). + + delete parser.gullet.macros.current["\\current@color"]; + delete parser.gullet.macros.current["\\color"]; // If the input used \tag, it will set the \df@tag macro to the tag. + // In this case, we separately parse the tag and wrap the tree. + + if (parser.gullet.macros.get("\\df@tag")) { + if (!settings.displayMode) { + throw new ParseError("\\tag works only in display equations"); + } + + tree = [{ + type: "tag", + mode: "text", + body: tree, + tag: parser.subparse([new Token("\\df@tag")]) + }]; + } + + return tree; +}; + +/* eslint no-console:0 */ + +/** + * Parse and build an expression, and place that expression in the DOM node + * given. + */ +var render = function render(expression, baseNode, options) { + baseNode.textContent = ""; + var node = renderToDomTree(expression, options).toNode(); + baseNode.appendChild(node); +}; // KaTeX's styles don't work properly in quirks mode. Print out an error, and +// disable rendering. + + +if (typeof document !== "undefined") { + if (document.compatMode !== "CSS1Compat") { + typeof console !== "undefined" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your " + "website has a suitable doctype."); + + render = function render() { + throw new ParseError("KaTeX doesn't work in quirks mode."); + }; + } +} +/** + * Parse and build an expression, and return the markup for that. + */ + + +var renderToString = function renderToString(expression, options) { + var markup = renderToDomTree(expression, options).toMarkup(); + return markup; +}; +/** + * Parse an expression and return the parse tree. + */ + + +var generateParseTree = function generateParseTree(expression, options) { + var settings = new Settings(options); + return parseTree(expression, settings); +}; +/** + * If the given error is a KaTeX ParseError and options.throwOnError is false, + * renders the invalid LaTeX as a span with hover title giving the KaTeX + * error message. Otherwise, simply throws the error. + */ + + +var renderError = function renderError(error, expression, options) { + if (options.throwOnError || !(error instanceof ParseError)) { + throw error; + } + + var node = buildCommon.makeSpan(["katex-error"], [new SymbolNode(expression)]); + node.setAttribute("title", error.toString()); + node.setAttribute("style", "color:" + options.errorColor); + return node; +}; +/** + * Generates and returns the katex build tree. This is used for advanced + * use cases (like rendering to custom output). + */ + + +var renderToDomTree = function renderToDomTree(expression, options) { + var settings = new Settings(options); + + try { + var tree = parseTree(expression, settings); + return buildTree(tree, expression, settings); + } catch (error) { + return renderError(error, expression, settings); + } +}; +/** + * Generates and returns the katex build tree, with just HTML (no MathML). + * This is used for advanced use cases (like rendering to custom output). + */ + + +var renderToHTMLTree = function renderToHTMLTree(expression, options) { + var settings = new Settings(options); + + try { + var tree = parseTree(expression, settings); + return buildHTMLTree(tree, expression, settings); + } catch (error) { + return renderError(error, expression, settings); + } +}; + +var katex = { + /** + * Current KaTeX version + */ + version: "0.16.11", + + /** + * Renders the given LaTeX into an HTML+MathML combination, and adds + * it as a child to the specified DOM node. + */ + render, + + /** + * Renders the given LaTeX into an HTML+MathML combination string, + * for sending to the client. + */ + renderToString, + + /** + * KaTeX error, usually during parsing. + */ + ParseError, + + /** + * The shema of Settings + */ + SETTINGS_SCHEMA, + + /** + * Parses the given LaTeX into KaTeX's internal parse tree structure, + * without rendering to HTML or MathML. + * + * NOTE: This method is not currently recommended for public use. + * The internal tree representation is unstable and is very likely + * to change. Use at your own risk. + */ + __parse: generateParseTree, + + /** + * Renders the given LaTeX into an HTML+MathML internal DOM tree + * representation, without flattening that representation to a string. + * + * NOTE: This method is not currently recommended for public use. + * The internal tree representation is unstable and is very likely + * to change. Use at your own risk. + */ + __renderToDomTree: renderToDomTree, + + /** + * Renders the given LaTeX into an HTML internal DOM tree representation, + * without MathML and without flattening that representation to a string. + * + * NOTE: This method is not currently recommended for public use. + * The internal tree representation is unstable and is very likely + * to change. Use at your own risk. + */ + __renderToHTMLTree: renderToHTMLTree, + + /** + * extends internal font metrics object with a new object + * each key in the new object represents a font name + */ + __setFontMetrics: setFontMetrics, + + /** + * adds a new symbol to builtin symbols table + */ + __defineSymbol: defineSymbol, + + /** + * adds a new function to builtin function list, + * which directly produce parse tree elements + * and have their own html/mathml builders + */ + __defineFunction: defineFunction, + + /** + * adds a new macro to builtin macro list + */ + __defineMacro: defineMacro, + + /** + * Expose the dom tree node types, which can be useful for type checking nodes. + * + * NOTE: This method is not currently recommended for public use. + * The internal tree representation is unstable and is very likely + * to change. Use at your own risk. + */ + __domTree: { + Span, + Anchor, + SymbolNode, + SvgNode, + PathNode, + LineNode + } +}; + + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/147.e6f324c2.js b/assets/js/147.e6f324c2.js new file mode 100644 index 00000000..80a8143f --- /dev/null +++ b/assets/js/147.e6f324c2.js @@ -0,0 +1,20516 @@ +"use strict"; +exports.id = 147; +exports.ids = [147]; +exports.modules = { + +/***/ 3046: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + T: () => (/* binding */ Graph) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js +var isFunction = __webpack_require__(9610); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js +var isEmpty = __webpack_require__(6401); +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/* harmony default export */ const _baseIsNaN = (baseIsNaN); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/* harmony default export */ const _strictIndexOf = (strictIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js + + + + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? _strictIndexOf(array, value, fromIndex) + : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); +} + +/* harmony default export */ const _baseIndexOf = (baseIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js + + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && _baseIndexOf(array, value, 0) > -1; +} + +/* harmony default export */ const _arrayIncludes = (arrayIncludes); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js +var _Set = __webpack_require__(9857); +;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +/* harmony default export */ const lodash_es_noop = (noop); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { + return new _Set/* default */.A(values); +}; + +/* harmony default export */ const _createSet = (createSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js + + + + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = _arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = _arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : _createSet(array); + if (set) { + return (0,_setToArray/* default */.A)(set); + } + isCommon = false; + includes = _cacheHas/* default */.A; + seen = new _SetCache/* default */.A; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/* harmony default export */ const _baseUniq = (baseUniq); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js +var isArrayLikeObject = __webpack_require__(3533); +;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js + + + + + +/** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ +var union = (0,_baseRest/* default */.A)(function(arrays) { + return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); +}); + +/* harmony default export */ const lodash_es_union = (union); + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + + +var DEFAULT_EDGE_NAME = '\x00'; +var GRAPH_NODE = '\x00'; +var EDGE_KEY_DELIM = '\x01'; + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. +class Graph { + constructor(opts = {}) { + this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; + this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; + this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; + + // Label for the graph itself + this._label = undefined; + + // Defaults to be set when creating a new node + this._defaultNodeLabelFn = constant/* default */.A(undefined); + + // Defaults to be set when creating a new edge + this._defaultEdgeLabelFn = constant/* default */.A(undefined); + + // v -> label + this._nodes = {}; + + if (this._isCompound) { + // v -> parent + this._parent = {}; + + // v -> children + this._children = {}; + this._children[GRAPH_NODE] = {}; + } + + // v -> edgeObj + this._in = {}; + + // u -> v -> Number + this._preds = {}; + + // v -> edgeObj + this._out = {}; + + // v -> w -> Number + this._sucs = {}; + + // e -> edgeObj + this._edgeObjs = {}; + + // e -> label + this._edgeLabels = {}; + } + /* === Graph functions ========= */ + isDirected() { + return this._isDirected; + } + isMultigraph() { + return this._isMultigraph; + } + isCompound() { + return this._isCompound; + } + setGraph(label) { + this._label = label; + return this; + } + graph() { + return this._label; + } + /* === Node functions ========== */ + setDefaultNodeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; + } + nodeCount() { + return this._nodeCount; + } + nodes() { + return keys/* default */.A(this._nodes); + } + sources() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._in[v]); + }); + } + sinks() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._out[v]); + }); + } + setNodes(vs, value) { + var args = arguments; + var self = this; + forEach/* default */.A(vs, function (v) { + if (args.length > 1) { + self.setNode(v, value); + } else { + self.setNode(v); + } + }); + return this; + } + setNode(v, value) { + if (has/* default */.A(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; + } + return this; + } + + // @ts-expect-error + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; + } + node(v) { + return this._nodes[v]; + } + hasNode(v) { + return has/* default */.A(this._nodes, v); + } + removeNode(v) { + var self = this; + if (has/* default */.A(this._nodes, v)) { + var removeEdge = function (e) { + self.removeEdge(self._edgeObjs[e]); + }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + forEach/* default */.A(this.children(v), function (child) { + self.setParent(child); + }); + delete this._children[v]; + } + forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; + } + setParent(v, parent) { + if (!this._isCompound) { + throw new Error('Cannot set parent in a non-compound graph'); + } + + if (isUndefined/* default */.A(parent)) { + parent = GRAPH_NODE; + } else { + // Coerce parent to string + parent += ''; + for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); + } + } + + this.setNode(parent); + } + + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; + } + _removeFromParentsChildList(v) { + delete this._children[this._parent[v]][v]; + } + parent(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } + } + children(v) { + if (isUndefined/* default */.A(v)) { + v = GRAPH_NODE; + } + + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return keys/* default */.A(children); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } + } + predecessors(v) { + var predsV = this._preds[v]; + if (predsV) { + return keys/* default */.A(predsV); + } + } + successors(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return keys/* default */.A(sucsV); + } + } + neighbors(v) { + var preds = this.predecessors(v); + if (preds) { + return lodash_es_union(preds, this.successors(v)); + } + } + isLeaf(v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; + } + filterNodes(filter) { + // @ts-expect-error + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound, + }); + + copy.setGraph(this.graph()); + + var self = this; + forEach/* default */.A(this._nodes, function (value, v) { + if (filter(v)) { + copy.setNode(v, value); + } + }); + + forEach/* default */.A(this._edgeObjs, function (e) { + // @ts-expect-error + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self.edge(e)); + } + }); + + var parents = {}; + function findParent(v) { + var parent = self.parent(v); + if (parent === undefined || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); + } + } + + if (this._isCompound) { + forEach/* default */.A(copy.nodes(), function (v) { + copy.setParent(v, findParent(v)); + }); + } + + return copy; + } + /* === Edge functions ========== */ + setDefaultEdgeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; + } + edgeCount() { + return this._edgeCount; + } + edges() { + return values/* default */.A(this._edgeObjs); + } + setPath(vs, value) { + var self = this; + var args = arguments; + reduce/* default */.A(vs, function (v, w) { + if (args.length > 1) { + self.setEdge(v, w, value); + } else { + self.setEdge(v, w); + } + return w; + }); + return this; + } + /* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ + setEdge() { + var v, w, name, value; + var valueSpecified = false; + var arg0 = arguments[0]; + + if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; + } + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; + } + } + + v = '' + v; + w = '' + w; + if (!isUndefined/* default */.A(name)) { + name = '' + name; + } + + var e = edgeArgsToId(this._isDirected, v, w, name); + if (has/* default */.A(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; + } + return this; + } + + if (!isUndefined/* default */.A(name) && !this._isMultigraph) { + throw new Error('Cannot set a named edge when isMultigraph = false'); + } + + // It didn't exist, so we need to create it. + // First ensure the nodes exist. + this.setNode(v); + this.setNode(w); + + // @ts-expect-error + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + // Ensure we add undirected edges in a consistent way. + v = edgeObj.v; + w = edgeObj.w; + + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; + } + edge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return this._edgeLabels[e]; + } + hasEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return has/* default */.A(this._edgeLabels, e); + } + removeEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; + } + inEdges(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = values/* default */.A(inV); + if (!u) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.v === u; + }); + } + } + outEdges(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = values/* default */.A(outV); + if (!w) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.w === w; + }); + } + } + nodeEdges(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } + } +} + +/* Number of nodes in the graph. Should only be changed by the implementation. */ +Graph.prototype._nodeCount = 0; + +/* Number of edges in the graph. Should only be changed by the implementation. */ +Graph.prototype._edgeCount = 0; + +function incrementOrInitEntry(map, k) { + if (map[k]) { + map[k]++; + } else { + map[k] = 1; + } +} + +function decrementOrRemoveEntry(map, k) { + if (!--map[k]) { + delete map[k]; + } +} + +function edgeArgsToId(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); +} + +function edgeArgsToObj(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v: v, w: w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; +} + +function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); +} + + +/***/ }), + +/***/ 697: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) +/* harmony export */ }); +/* unused harmony export version */ +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); +// Includes only the "core" of graphlib + + + +const version = '2.1.9-pre'; + + + + +/***/ }), + +/***/ 5937: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2453); +/* harmony import */ var _color_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4886); +/* IMPORT */ + + +/* MAIN */ +const channel = (color, channel) => { + return _utils_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.lang.round(_color_index_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.parse(color)[channel]); +}; +/* EXPORT */ +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (channel); + + +/***/ }), + +/***/ 2062: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _SetCache) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules +var _MapCache = __webpack_require__(9471); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/* harmony default export */ const _setCacheAdd = (setCacheAdd); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ const _setCacheHas = (setCacheHas); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new _MapCache/* default */.A; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; +SetCache.prototype.has = _setCacheHas; + +/* harmony default export */ const _SetCache = (SetCache); + + +/***/ }), + +/***/ 2641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); + + +/***/ }), + +/***/ 2634: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); + + +/***/ }), + +/***/ 5572: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); + + +/***/ }), + +/***/ 6912: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); + + +/***/ }), + +/***/ 1641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseClone) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js +var _arrayEach = __webpack_require__(2641); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js +var _copyObject = __webpack_require__(2031); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js + + + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssign = (baseAssign); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js + + + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssignIn = (baseAssignIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js +var _cloneBuffer = __webpack_require__(154); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js +var _copyArray = __webpack_require__(9759); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js +var _getSymbols = __webpack_require__(4792); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js + + + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); +} + +/* harmony default export */ const _copySymbols = (copySymbols); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js +var _getPrototype = __webpack_require__(5647); +// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js +var stubArray = __webpack_require__(3153); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { + var result = []; + while (object) { + (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); + object = (0,_getPrototype/* default */.A)(object); + } + return result; +}; + +/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js + + + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); +} + +/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js +var _baseGetAllKeys = __webpack_require__(3831); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js + + + + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); +} + +/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/* harmony default export */ const _initCloneArray = (initCloneArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js +var _cloneArrayBuffer = __webpack_require__(565); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js + + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/* harmony default export */ const _cloneDataView = (cloneDataView); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/* harmony default export */ const _cloneRegExp = (cloneRegExp); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js + + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/* harmony default export */ const _cloneSymbol = (cloneSymbol); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js +var _cloneTypedArray = __webpack_require__(1801); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js + + + + + + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return (0,_cloneArrayBuffer/* default */.A)(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return _cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return (0,_cloneTypedArray/* default */.A)(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return _cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return _cloneSymbol(object); + } +} + +/* harmony default export */ const _initCloneByTag = (initCloneByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules +var _initCloneObject = __webpack_require__(8598); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js + + + +/** `Object#toString` result references. */ +var _baseIsMap_mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; +} + +/* harmony default export */ const _baseIsMap = (baseIsMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js +var _nodeUtil = __webpack_require__(4841); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js + + + + +/* Node.js helper references. */ +var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; + +/* harmony default export */ const lodash_es_isMap = (isMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js + + + +/** `Object#toString` result references. */ +var _baseIsSet_setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; +} + +/* harmony default export */ const _baseIsSet = (baseIsSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js + + + + +/* Node.js helper references. */ +var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; + +/* harmony default export */ const lodash_es_isSet = (isSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js + + + + + + + + + + + + + + + + + + + + + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + _baseClone_boolTag = '[object Boolean]', + _baseClone_dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + _baseClone_mapTag = '[object Map]', + _baseClone_numberTag = '[object Number]', + objectTag = '[object Object]', + _baseClone_regexpTag = '[object RegExp]', + _baseClone_setTag = '[object Set]', + _baseClone_stringTag = '[object String]', + _baseClone_symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var _baseClone_arrayBufferTag = '[object ArrayBuffer]', + _baseClone_dataViewTag = '[object DataView]', + _baseClone_float32Tag = '[object Float32Array]', + _baseClone_float64Tag = '[object Float64Array]', + _baseClone_int8Tag = '[object Int8Array]', + _baseClone_int16Tag = '[object Int16Array]', + _baseClone_int32Tag = '[object Int32Array]', + _baseClone_uint8Tag = '[object Uint8Array]', + _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', + _baseClone_uint16Tag = '[object Uint16Array]', + _baseClone_uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = +cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = +cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = +cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = +cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = +cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = +cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = +cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = +cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = +cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!(0,isObject/* default */.A)(value)) { + return value; + } + var isArr = (0,isArray/* default */.A)(value); + if (isArr) { + result = _initCloneArray(value); + if (!isDeep) { + return (0,_copyArray/* default */.A)(value, result); + } + } else { + var tag = (0,_getTag/* default */.A)(value), + isFunc = tag == funcTag || tag == genTag; + + if ((0,isBuffer/* default */.A)(value)) { + return (0,_cloneBuffer/* default */.A)(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); + if (!isDeep) { + return isFlat + ? _copySymbolsIn(value, _baseAssignIn(result, value)) + : _copySymbols(value, _baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = _initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new _Stack/* default */.A); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (lodash_es_isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (lodash_es_isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) + : (isFlat ? keysIn/* default */.A : keys/* default */.A); + + var props = isArr ? undefined : keysFunc(value); + (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +/* harmony default export */ const _baseClone = (baseClone); + + +/***/ }), + +/***/ 6240: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseEach) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js + + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!(0,isArrayLike/* default */.A)(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +/* harmony default export */ const _createBaseEach = (createBaseEach); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js + + + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = _createBaseEach(_baseForOwn/* default */.A); + +/* harmony default export */ const _baseEach = (baseEach); + + +/***/ }), + +/***/ 5707: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); + + +/***/ }), + +/***/ 3588: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseFlatten) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules +var isArguments = __webpack_require__(2274); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js + + + + +/** Built-in value references. */ +var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/* harmony default export */ const _isFlattenable = (isFlattenable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js + + + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = _isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + (0,_arrayPush/* default */.A)(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/* harmony default export */ const _baseFlatten = (baseFlatten); + + +/***/ }), + +/***/ 9841: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); + + +/***/ }), + +/***/ 6318: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); + + +/***/ }), + +/***/ 3831: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6912); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); + + +/***/ }), + +/***/ 9574: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseIteratee) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arraySome = (arraySome); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!_arraySome(other, function(othValue, othIndex) { + if (!(0,_cacheHas/* default */.A)(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalArrays = (equalArrays); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js +var _Uint8Array = __webpack_require__(3988); +// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js +var eq = __webpack_require__(6984); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ const _mapToArray = (mapToArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _equalByTag_COMPARE_PARTIAL_FLAG = 1, + _equalByTag_COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return (0,eq/* default */.A)(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = _mapToArray; + + case setTag: + var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; + convert || (convert = _setToArray/* default */.A); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ const _equalByTag = (equalByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js + + +/** Used to compose bitmasks for value comparisons. */ +var _equalObjects_COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, + objProps = (0,_getAllKeys/* default */.A)(object), + objLength = objProps.length, + othProps = (0,_getAllKeys/* default */.A)(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalObjects = (equalObjects); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules +var isTypedArray = __webpack_require__(3858); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var _baseIsEqualDeep_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = (0,isArray/* default */.A)(object), + othIsArr = (0,isArray/* default */.A)(other), + objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), + othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && (0,isBuffer/* default */.A)(object)) { + if (!(0,isBuffer/* default */.A)(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new _Stack/* default */.A); + return (objIsArr || (0,isTypedArray/* default */.A)(object)) + ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new _Stack/* default */.A); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new _Stack/* default */.A); + return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { + return value !== value && other !== other; + } + return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ const _baseIsEqual = (baseIsEqual); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, + _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new _Stack/* default */.A; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ const _baseIsMatch = (baseIsMatch); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !(0,isObject/* default */.A)(value); +} + +/* harmony default export */ const _isStrictComparable = (isStrictComparable); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = (0,keys/* default */.A)(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, _isStrictComparable(value)]; + } + return result; +} + +/* harmony default export */ const _getMatchData = (getMatchData); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = _getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return _matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || _baseIsMatch(object, source, matchData); + }; +} + +/* harmony default export */ const _baseMatches = (baseMatches); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ const lodash_es_get = (get); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, + _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { + return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); + } + return function(object) { + var objValue = lodash_es_get(object, path); + return (objValue === undefined && objValue === srcValue) + ? (0,hasIn/* default */.A)(object, path) + : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return (0,_baseGet/* default */.A)(object, path); + }; +} + +/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); +} + +/* harmony default export */ const lodash_es_property = (property); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity/* default */.A; + } + if (typeof value == 'object') { + return (0,isArray/* default */.A)(value) + ? _baseMatchesProperty(value[0], value[1]) + : _baseMatches(value); + } + return lodash_es_property(value); +} + +/* harmony default export */ const _baseIteratee = (baseIteratee); + + +/***/ }), + +/***/ 805: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); + + +/***/ }), + +/***/ 4099: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); + + +/***/ }), + +/***/ 9922: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9008); + + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); + + +/***/ }), + +/***/ 7819: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _castPath) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js +var memoize = __webpack_require__(6632); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = (0,memoize/* default */.A)(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ const _memoizeCapped = (memoizeCapped); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js + + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = _memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ const _stringToPath = (stringToPath); + +// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules +var lodash_es_toString = __webpack_require__(8894); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if ((0,isArray/* default */.A)(value)) { + return value; + } + return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); +} + +/* harmony default export */ const _castPath = (castPath); + + +/***/ }), + +/***/ 9042: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3831); +/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4792); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); + + +/***/ }), + +/***/ 4792: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); +/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3153); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); + + +/***/ }), + +/***/ 5054: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2274); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2049); +/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5353); +/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && + ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); + + +/***/ }), + +/***/ 6586: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1882); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); + + +/***/ }), + +/***/ 9959: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); + + +/***/ }), + +/***/ 3282: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1882); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); + + +/***/ }), + +/***/ 53: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseClone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1641); + + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ +function clone(value) { + return (0,_baseClone_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value, CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone); + + +/***/ }), + +/***/ 1662: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_filter) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js +var _arrayFilter = __webpack_require__(2634); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js + + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + (0,_baseEach/* default */.A)(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +/* harmony default export */ const _baseFilter = (baseFilter); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js + + + + + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ +function filter(collection, predicate) { + var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; + return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); +} + +/* harmony default export */ const lodash_es_filter = (filter); + + +/***/ }), + +/***/ 8058: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2641); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); +/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9922); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); + + +/***/ }), + +/***/ 8585: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_has) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && _baseHas_hasOwnProperty.call(object, key); +} + +/* harmony default export */ const _baseHas = (baseHas); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js + + + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); +} + +/* harmony default export */ const lodash_es_has = (has); + + +/***/ }), + +/***/ 9188: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_hasIn) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ const _baseHasIn = (baseHasIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); +} + +/* harmony default export */ const lodash_es_hasIn = (hasIn); + + +/***/ }), + +/***/ 1882: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8496); +/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3098); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); + + +/***/ }), + +/***/ 9592: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); + + +/***/ }), + +/***/ 2184: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3607); +/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1852); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); + + +/***/ }), + +/***/ 9463: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_reduce) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/* harmony default export */ const _arrayReduce = (arrayReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +/* harmony default export */ const _baseReduce = (baseReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js + + + + + + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ +function reduce(collection, iteratee, accumulator) { + var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, + initAccum = arguments.length < 3; + + return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); +} + +/* harmony default export */ const lodash_es_reduce = (reduce); + + +/***/ }), + +/***/ 3153: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); + + +/***/ }), + +/***/ 8894: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toString) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if ((0,isArray/* default */.A)(value)) { + // Recursively convert values (susceptible to call stack limits). + return (0,_arrayMap/* default */.A)(value, baseToString) + ''; + } + if ((0,isSymbol/* default */.A)(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const _baseToString = (baseToString); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString_toString(value) { + return value == null ? '' : _baseToString(value); +} + +/* harmony default export */ const lodash_es_toString = (toString_toString); + + +/***/ }), + +/***/ 8207: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_values) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js + + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return (0,_arrayMap/* default */.A)(props, function(key) { + return object[key]; + }); +} + +/* harmony default export */ const _baseValues = (baseValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js + + + +/** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ +function values(object) { + return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); +} + +/* harmony default export */ const lodash_es_values = (values); + + +/***/ }), + +/***/ 7147: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6257); +/* harmony import */ var lodash_es_clone_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5937); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(5582); +/* harmony import */ var _edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(8747); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(697); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6312); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9418); +var _a, _b; + + + + + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 7], $V1 = [1, 13], $V2 = [1, 14], $V3 = [1, 15], $V4 = [1, 19], $V5 = [1, 16], $V6 = [1, 17], $V7 = [1, 18], $V8 = [8, 30], $V9 = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], $Va = [1, 23], $Vb = [1, 24], $Vc = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], $Vd = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], $Ve = [1, 49]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "spaceLines": 3, "SPACELINE": 4, "NL": 5, "separator": 6, "SPACE": 7, "EOF": 8, "start": 9, "BLOCK_DIAGRAM_KEY": 10, "document": 11, "stop": 12, "statement": 13, "link": 14, "LINK": 15, "START_LINK": 16, "LINK_LABEL": 17, "STR": 18, "nodeStatement": 19, "columnsStatement": 20, "SPACE_BLOCK": 21, "blockStatement": 22, "classDefStatement": 23, "cssClassStatement": 24, "styleStatement": 25, "node": 26, "SIZE": 27, "COLUMNS": 28, "id-block": 29, "end": 30, "block": 31, "NODE_ID": 32, "nodeShapeNLabel": 33, "dirList": 34, "DIR": 35, "NODE_DSTART": 36, "NODE_DEND": 37, "BLOCK_ARROW_START": 38, "BLOCK_ARROW_END": 39, "classDef": 40, "CLASSDEF_ID": 41, "CLASSDEF_STYLEOPTS": 42, "DEFAULT": 43, "class": 44, "CLASSENTITY_IDS": 45, "STYLECLASS": 46, "style": 47, "STYLE_ENTITY_IDS": 48, "STYLE_DEFINITION_DATA": 49, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "block", 32: "NODE_ID", 35: "DIR", 36: "NODE_DSTART", 37: "NODE_DEND", 38: "BLOCK_ARROW_START", 39: "BLOCK_ARROW_END", 40: "classDef", 41: "CLASSDEF_ID", 42: "CLASSDEF_STYLEOPTS", 43: "DEFAULT", 44: "class", 45: "CLASSENTITY_IDS", 46: "STYLECLASS", 47: "style", 48: "STYLE_ENTITY_IDS", 49: "STYLE_DEFINITION_DATA" }, + productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [34, 1], [34, 2], [33, 3], [33, 4], [23, 3], [23, 3], [24, 3], [25, 3]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 4: + yy.getLogger().debug("Rule: separator (NL) "); + break; + case 5: + yy.getLogger().debug("Rule: separator (Space) "); + break; + case 6: + yy.getLogger().debug("Rule: separator (EOF) "); + break; + case 7: + yy.getLogger().debug("Rule: hierarchy: ", $$[$0 - 1]); + yy.setHierarchy($$[$0 - 1]); + break; + case 8: + yy.getLogger().debug("Stop NL "); + break; + case 9: + yy.getLogger().debug("Stop EOF "); + break; + case 10: + yy.getLogger().debug("Stop NL2 "); + break; + case 11: + yy.getLogger().debug("Stop EOF2 "); + break; + case 12: + yy.getLogger().debug("Rule: statement: ", $$[$0]); + typeof $$[$0].length === "number" ? this.$ = $$[$0] : this.$ = [$$[$0]]; + break; + case 13: + yy.getLogger().debug("Rule: statement #2: ", $$[$0 - 1]); + this.$ = [$$[$0 - 1]].concat($$[$0]); + break; + case 14: + yy.getLogger().debug("Rule: link: ", $$[$0], yytext); + this.$ = { edgeTypeStr: $$[$0], label: "" }; + break; + case 15: + yy.getLogger().debug("Rule: LABEL link: ", $$[$0 - 3], $$[$0 - 1], $$[$0]); + this.$ = { edgeTypeStr: $$[$0], label: $$[$0 - 1] }; + break; + case 18: + const num = parseInt($$[$0]); + const spaceId = yy.generateId(); + this.$ = { id: spaceId, type: "space", label: "", width: num, children: [] }; + break; + case 23: + yy.getLogger().debug("Rule: (nodeStatement link node) ", $$[$0 - 2], $$[$0 - 1], $$[$0], " typestr: ", $$[$0 - 1].edgeTypeStr); + const edgeData = yy.edgeStrToEdgeData($$[$0 - 1].edgeTypeStr); + this.$ = [ + { id: $$[$0 - 2].id, label: $$[$0 - 2].label, type: $$[$0 - 2].type, directions: $$[$0 - 2].directions }, + { id: $$[$0 - 2].id + "-" + $$[$0].id, start: $$[$0 - 2].id, end: $$[$0].id, label: $$[$0 - 1].label, type: "edge", directions: $$[$0].directions, arrowTypeEnd: edgeData, arrowTypeStart: "arrow_open" }, + { id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions } + ]; + break; + case 24: + yy.getLogger().debug("Rule: nodeStatement (abc88 node size) ", $$[$0 - 1], $$[$0]); + this.$ = { id: $$[$0 - 1].id, label: $$[$0 - 1].label, type: yy.typeStr2Type($$[$0 - 1].typeStr), directions: $$[$0 - 1].directions, widthInColumns: parseInt($$[$0], 10) }; + break; + case 25: + yy.getLogger().debug("Rule: nodeStatement (node) ", $$[$0]); + this.$ = { id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions, widthInColumns: 1 }; + break; + case 26: + yy.getLogger().debug("APA123", this ? this : "na"); + yy.getLogger().debug("COLUMNS: ", $$[$0]); + this.$ = { type: "column-setting", columns: $$[$0] === "auto" ? -1 : parseInt($$[$0]) }; + break; + case 27: + yy.getLogger().debug("Rule: id-block statement : ", $$[$0 - 2], $$[$0 - 1]); + yy.generateId(); + this.$ = { ...$$[$0 - 2], type: "composite", children: $$[$0 - 1] }; + break; + case 28: + yy.getLogger().debug("Rule: blockStatement : ", $$[$0 - 2], $$[$0 - 1], $$[$0]); + const id = yy.generateId(); + this.$ = { id, type: "composite", label: "", children: $$[$0 - 1] }; + break; + case 29: + yy.getLogger().debug("Rule: node (NODE_ID separator): ", $$[$0]); + this.$ = { id: $$[$0] }; + break; + case 30: + yy.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", $$[$0 - 1], $$[$0]); + this.$ = { id: $$[$0 - 1], label: $$[$0].label, typeStr: $$[$0].typeStr, directions: $$[$0].directions }; + break; + case 31: + yy.getLogger().debug("Rule: dirList: ", $$[$0]); + this.$ = [$$[$0]]; + break; + case 32: + yy.getLogger().debug("Rule: dirList: ", $$[$0 - 1], $$[$0]); + this.$ = [$$[$0 - 1]].concat($$[$0]); + break; + case 33: + yy.getLogger().debug("Rule: nodeShapeNLabel: ", $$[$0 - 2], $$[$0 - 1], $$[$0]); + this.$ = { typeStr: $$[$0 - 2] + $$[$0], label: $$[$0 - 1] }; + break; + case 34: + yy.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", $$[$0 - 3], $$[$0 - 2], " #3:", $$[$0 - 1], $$[$0]); + this.$ = { typeStr: $$[$0 - 3] + $$[$0], label: $$[$0 - 2], directions: $$[$0 - 1] }; + break; + case 35: + case 36: + this.$ = { type: "classDef", id: $$[$0 - 1].trim(), css: $$[$0].trim() }; + break; + case 37: + this.$ = { type: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() }; + break; + case 38: + this.$ = { type: "applyStyles", id: $$[$0 - 1].trim(), stylesStr: $$[$0].trim() }; + break; + } + }, + table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: $V0, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: $V1, 29: $V2, 31: $V3, 32: $V4, 40: $V5, 44: $V6, 47: $V7 }, { 8: [1, 20] }, o($V8, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: $V0, 28: $V1, 29: $V2, 31: $V3, 32: $V4, 40: $V5, 44: $V6, 47: $V7 }), o($V9, [2, 16], { 14: 22, 15: $Va, 16: $Vb }), o($V9, [2, 17]), o($V9, [2, 18]), o($V9, [2, 19]), o($V9, [2, 20]), o($V9, [2, 21]), o($V9, [2, 22]), o($Vc, [2, 25], { 27: [1, 25] }), o($V9, [2, 26]), { 19: 26, 26: 12, 32: $V4 }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: $V0, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: $V1, 29: $V2, 31: $V3, 32: $V4, 40: $V5, 44: $V6, 47: $V7 }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, o($Vd, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, o($V8, [2, 13]), { 26: 35, 32: $V4 }, { 32: [2, 14] }, { 17: [1, 36] }, o($Vc, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: $Va, 16: $Vb, 19: 5, 20: 6, 21: $V0, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: $V1, 29: $V2, 31: $V3, 32: $V4, 40: $V5, 44: $V6, 47: $V7 }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, o($Vd, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, o($Vc, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, o($V9, [2, 28]), o($V9, [2, 35]), o($V9, [2, 36]), o($V9, [2, 37]), o($V9, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: $Ve }, { 15: [1, 50] }, o($V9, [2, 27]), o($Vd, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: $Ve, 39: [2, 31] }, { 32: [2, 15] }, o($Vd, [2, 34]), { 39: [2, 32] }], + defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 10; + case 1: + yy.getLogger().debug("Found space-block"); + return 31; + case 2: + yy.getLogger().debug("Found nl-block"); + return 31; + case 3: + yy.getLogger().debug("Found space-block"); + return 29; + case 4: + yy.getLogger().debug(".", yy_.yytext); + break; + case 5: + yy.getLogger().debug("_", yy_.yytext); + break; + case 6: + return 5; + case 7: + yy_.yytext = -1; + return 28; + case 8: + yy_.yytext = yy_.yytext.replace(/columns\s+/, ""); + yy.getLogger().debug("COLUMNS (LEX)", yy_.yytext); + return 28; + case 9: + this.pushState("md_string"); + break; + case 10: + return "MD_STR"; + case 11: + this.popState(); + break; + case 12: + this.pushState("string"); + break; + case 13: + yy.getLogger().debug("LEX: POPPING STR:", yy_.yytext); + this.popState(); + break; + case 14: + yy.getLogger().debug("LEX: STR end:", yy_.yytext); + return "STR"; + case 15: + yy_.yytext = yy_.yytext.replace(/space\:/, ""); + yy.getLogger().debug("SPACE NUM (LEX)", yy_.yytext); + return 21; + case 16: + yy_.yytext = "1"; + yy.getLogger().debug("COLUMNS (LEX)", yy_.yytext); + return 21; + case 17: + return 43; + case 18: + return "LINKSTYLE"; + case 19: + return "INTERPOLATE"; + case 20: + this.pushState("CLASSDEF"); + return 40; + case 21: + this.popState(); + this.pushState("CLASSDEFID"); + return "DEFAULT_CLASSDEF_ID"; + case 22: + this.popState(); + this.pushState("CLASSDEFID"); + return 41; + case 23: + this.popState(); + return 42; + case 24: + this.pushState("CLASS"); + return 44; + case 25: + this.popState(); + this.pushState("CLASS_STYLE"); + return 45; + case 26: + this.popState(); + return 46; + case 27: + this.pushState("STYLE_STMNT"); + return 47; + case 28: + this.popState(); + this.pushState("STYLE_DEFINITION"); + return 48; + case 29: + this.popState(); + return 49; + case 30: + this.pushState("acc_title"); + return "acc_title"; + case 31: + this.popState(); + return "acc_title_value"; + case 32: + this.pushState("acc_descr"); + return "acc_descr"; + case 33: + this.popState(); + return "acc_descr_value"; + case 34: + this.pushState("acc_descr_multiline"); + break; + case 35: + this.popState(); + break; + case 36: + return "acc_descr_multiline_value"; + case 37: + return 30; + case 38: + this.popState(); + yy.getLogger().debug("Lex: (("); + return "NODE_DEND"; + case 39: + this.popState(); + yy.getLogger().debug("Lex: (("); + return "NODE_DEND"; + case 40: + this.popState(); + yy.getLogger().debug("Lex: ))"); + return "NODE_DEND"; + case 41: + this.popState(); + yy.getLogger().debug("Lex: (("); + return "NODE_DEND"; + case 42: + this.popState(); + yy.getLogger().debug("Lex: (("); + return "NODE_DEND"; + case 43: + this.popState(); + yy.getLogger().debug("Lex: (-"); + return "NODE_DEND"; + case 44: + this.popState(); + yy.getLogger().debug("Lex: -)"); + return "NODE_DEND"; + case 45: + this.popState(); + yy.getLogger().debug("Lex: (("); + return "NODE_DEND"; + case 46: + this.popState(); + yy.getLogger().debug("Lex: ]]"); + return "NODE_DEND"; + case 47: + this.popState(); + yy.getLogger().debug("Lex: ("); + return "NODE_DEND"; + case 48: + this.popState(); + yy.getLogger().debug("Lex: ])"); + return "NODE_DEND"; + case 49: + this.popState(); + yy.getLogger().debug("Lex: /]"); + return "NODE_DEND"; + case 50: + this.popState(); + yy.getLogger().debug("Lex: /]"); + return "NODE_DEND"; + case 51: + this.popState(); + yy.getLogger().debug("Lex: )]"); + return "NODE_DEND"; + case 52: + this.popState(); + yy.getLogger().debug("Lex: )"); + return "NODE_DEND"; + case 53: + this.popState(); + yy.getLogger().debug("Lex: ]>"); + return "NODE_DEND"; + case 54: + this.popState(); + yy.getLogger().debug("Lex: ]"); + return "NODE_DEND"; + case 55: + yy.getLogger().debug("Lexa: -)"); + this.pushState("NODE"); + return 36; + case 56: + yy.getLogger().debug("Lexa: (-"); + this.pushState("NODE"); + return 36; + case 57: + yy.getLogger().debug("Lexa: ))"); + this.pushState("NODE"); + return 36; + case 58: + yy.getLogger().debug("Lexa: )"); + this.pushState("NODE"); + return 36; + case 59: + yy.getLogger().debug("Lex: ((("); + this.pushState("NODE"); + return 36; + case 60: + yy.getLogger().debug("Lexa: )"); + this.pushState("NODE"); + return 36; + case 61: + yy.getLogger().debug("Lexa: )"); + this.pushState("NODE"); + return 36; + case 62: + yy.getLogger().debug("Lexa: )"); + this.pushState("NODE"); + return 36; + case 63: + yy.getLogger().debug("Lexc: >"); + this.pushState("NODE"); + return 36; + case 64: + yy.getLogger().debug("Lexa: (["); + this.pushState("NODE"); + return 36; + case 65: + yy.getLogger().debug("Lexa: )"); + this.pushState("NODE"); + return 36; + case 66: + this.pushState("NODE"); + return 36; + case 67: + this.pushState("NODE"); + return 36; + case 68: + this.pushState("NODE"); + return 36; + case 69: + this.pushState("NODE"); + return 36; + case 70: + this.pushState("NODE"); + return 36; + case 71: + this.pushState("NODE"); + return 36; + case 72: + this.pushState("NODE"); + return 36; + case 73: + yy.getLogger().debug("Lexa: ["); + this.pushState("NODE"); + return 36; + case 74: + this.pushState("BLOCK_ARROW"); + yy.getLogger().debug("LEX ARR START"); + return 38; + case 75: + yy.getLogger().debug("Lex: NODE_ID", yy_.yytext); + return 32; + case 76: + yy.getLogger().debug("Lex: EOF", yy_.yytext); + return 8; + case 77: + this.pushState("md_string"); + break; + case 78: + this.pushState("md_string"); + break; + case 79: + return "NODE_DESCR"; + case 80: + this.popState(); + break; + case 81: + yy.getLogger().debug("Lex: Starting string"); + this.pushState("string"); + break; + case 82: + yy.getLogger().debug("LEX ARR: Starting string"); + this.pushState("string"); + break; + case 83: + yy.getLogger().debug("LEX: NODE_DESCR:", yy_.yytext); + return "NODE_DESCR"; + case 84: + yy.getLogger().debug("LEX POPPING"); + this.popState(); + break; + case 85: + yy.getLogger().debug("Lex: =>BAE"); + this.pushState("ARROW_DIR"); + break; + case 86: + yy_.yytext = yy_.yytext.replace(/^,\s*/, ""); + yy.getLogger().debug("Lex (right): dir:", yy_.yytext); + return "DIR"; + case 87: + yy_.yytext = yy_.yytext.replace(/^,\s*/, ""); + yy.getLogger().debug("Lex (left):", yy_.yytext); + return "DIR"; + case 88: + yy_.yytext = yy_.yytext.replace(/^,\s*/, ""); + yy.getLogger().debug("Lex (x):", yy_.yytext); + return "DIR"; + case 89: + yy_.yytext = yy_.yytext.replace(/^,\s*/, ""); + yy.getLogger().debug("Lex (y):", yy_.yytext); + return "DIR"; + case 90: + yy_.yytext = yy_.yytext.replace(/^,\s*/, ""); + yy.getLogger().debug("Lex (up):", yy_.yytext); + return "DIR"; + case 91: + yy_.yytext = yy_.yytext.replace(/^,\s*/, ""); + yy.getLogger().debug("Lex (down):", yy_.yytext); + return "DIR"; + case 92: + yy_.yytext = "]>"; + yy.getLogger().debug("Lex (ARROW_DIR end):", yy_.yytext); + this.popState(); + this.popState(); + return "BLOCK_ARROW_END"; + case 93: + yy.getLogger().debug("Lex: LINK", "#" + yy_.yytext + "#"); + return 15; + case 94: + yy.getLogger().debug("Lex: LINK", yy_.yytext); + return 15; + case 95: + yy.getLogger().debug("Lex: LINK", yy_.yytext); + return 15; + case 96: + yy.getLogger().debug("Lex: LINK", yy_.yytext); + return 15; + case 97: + yy.getLogger().debug("Lex: START_LINK", yy_.yytext); + this.pushState("LLABEL"); + return 16; + case 98: + yy.getLogger().debug("Lex: START_LINK", yy_.yytext); + this.pushState("LLABEL"); + return 16; + case 99: + yy.getLogger().debug("Lex: START_LINK", yy_.yytext); + this.pushState("LLABEL"); + return 16; + case 100: + this.pushState("md_string"); + break; + case 101: + yy.getLogger().debug("Lex: Starting string"); + this.pushState("string"); + return "LINK_LABEL"; + case 102: + this.popState(); + yy.getLogger().debug("Lex: LINK", "#" + yy_.yytext + "#"); + return 15; + case 103: + this.popState(); + yy.getLogger().debug("Lex: LINK", yy_.yytext); + return 15; + case 104: + this.popState(); + yy.getLogger().debug("Lex: LINK", yy_.yytext); + return 15; + case 105: + yy.getLogger().debug("Lex: COLON", yy_.yytext); + yy_.yytext = yy_.yytext.slice(1); + return 27; + } + }, + rules: [/^(?:block-beta\b)/, /^(?:block\s+)/, /^(?:block\n+)/, /^(?:block:)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/], + conditions: { "STYLE_DEFINITION": { "rules": [29], "inclusive": false }, "STYLE_STMNT": { "rules": [28], "inclusive": false }, "CLASSDEFID": { "rules": [23], "inclusive": false }, "CLASSDEF": { "rules": [21, 22], "inclusive": false }, "CLASS_STYLE": { "rules": [26], "inclusive": false }, "CLASS": { "rules": [25], "inclusive": false }, "LLABEL": { "rules": [100, 101, 102, 103, 104], "inclusive": false }, "ARROW_DIR": { "rules": [86, 87, 88, 89, 90, 91, 92], "inclusive": false }, "BLOCK_ARROW": { "rules": [77, 82, 85], "inclusive": false }, "NODE": { "rules": [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 78, 81], "inclusive": false }, "md_string": { "rules": [10, 11, 79, 80], "inclusive": false }, "space": { "rules": [], "inclusive": false }, "string": { "rules": [13, 14, 83, 84], "inclusive": false }, "acc_descr_multiline": { "rules": [35, 36], "inclusive": false }, "acc_descr": { "rules": [33], "inclusive": false }, "acc_title": { "rules": [31], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 16, 17, 18, 19, 20, 24, 27, 30, 32, 34, 37, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 93, 94, 95, 96, 97, 98, 99, 105], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let blockDatabase = {}; +let edgeList = []; +let edgeCount = {}; +const COLOR_KEYWORD = "color"; +const FILL_KEYWORD = "fill"; +const BG_FILL = "bgFill"; +const STYLECLASS_SEP = ","; +let classes = {}; +const addStyleClass = function(id, styleAttributes = "") { + if (classes[id] === void 0) { + classes[id] = { id, styles: [], textStyles: [] }; + } + const foundClass = classes[id]; + if (styleAttributes !== void 0 && styleAttributes !== null) { + styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => { + const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim(); + if (attrib.match(COLOR_KEYWORD)) { + const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL); + const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD); + foundClass.textStyles.push(newStyle2); + } + foundClass.styles.push(fixedAttrib); + }); + } +}; +const addStyle2Node = function(id, styles = "") { + const foundBlock = blockDatabase[id]; + if (styles !== void 0 && styles !== null) { + foundBlock.styles = styles.split(STYLECLASS_SEP); + } +}; +const setCssClass = function(itemIds, cssClassName) { + itemIds.split(",").forEach(function(id) { + let foundBlock = blockDatabase[id]; + if (foundBlock === void 0) { + const trimmedId = id.trim(); + blockDatabase[trimmedId] = { id: trimmedId, type: "na", children: [] }; + foundBlock = blockDatabase[trimmedId]; + } + if (!foundBlock.classes) { + foundBlock.classes = []; + } + foundBlock.classes.push(cssClassName); + }); +}; +const populateBlockDatabase = (_blockList, parent) => { + const blockList = _blockList.flat(); + const children = []; + for (const block of blockList) { + if (block.type === "classDef") { + addStyleClass(block.id, block.css); + continue; + } + if (block.type === "applyClass") { + setCssClass(block.id, (block == null ? void 0 : block.styleClass) || ""); + continue; + } + if (block.type === "applyStyles") { + if (block == null ? void 0 : block.stylesStr) { + addStyle2Node(block.id, block == null ? void 0 : block.stylesStr); + } + continue; + } + if (block.type === "column-setting") { + parent.columns = block.columns || -1; + } else if (block.type === "edge") { + if (edgeCount[block.id]) { + edgeCount[block.id]++; + } else { + edgeCount[block.id] = 1; + } + block.id = edgeCount[block.id] + "-" + block.id; + edgeList.push(block); + } else { + if (!block.label) { + if (block.type === "composite") { + block.label = ""; + } else { + block.label = block.id; + } + } + const newBlock = !blockDatabase[block.id]; + if (newBlock) { + blockDatabase[block.id] = block; + } else { + if (block.type !== "na") { + blockDatabase[block.id].type = block.type; + } + if (block.label !== block.id) { + blockDatabase[block.id].label = block.label; + } + } + if (block.children) { + populateBlockDatabase(block.children, block); + } + if (block.type === "space") { + const w = block.width || 1; + for (let j = 0; j < w; j++) { + const newBlock2 = (0,lodash_es_clone_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(block); + newBlock2.id = newBlock2.id + "-" + j; + blockDatabase[newBlock2.id] = newBlock2; + children.push(newBlock2); + } + } else if (newBlock) { + children.push(block); + } + } + } + parent.children = children; +}; +let blocks = []; +let rootBlock = { id: "root", type: "composite", children: [], columns: -1 }; +const clear = () => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Clear called"); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.v)(); + rootBlock = { id: "root", type: "composite", children: [], columns: -1 }; + blockDatabase = { root: rootBlock }; + blocks = []; + classes = {}; + edgeList = []; + edgeCount = {}; +}; +function typeStr2Type(typeStr) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("typeStr2Type", typeStr); + switch (typeStr) { + case "[]": + return "square"; + case "()": + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("we have a round"); + return "round"; + case "(())": + return "circle"; + case ">]": + return "rect_left_inv_arrow"; + case "{}": + return "diamond"; + case "{{}}": + return "hexagon"; + case "([])": + return "stadium"; + case "[[]]": + return "subroutine"; + case "[()]": + return "cylinder"; + case "((()))": + return "doublecircle"; + case "[//]": + return "lean_right"; + case "[\\\\]": + return "lean_left"; + case "[/\\]": + return "trapezoid"; + case "[\\/]": + return "inv_trapezoid"; + case "<[]>": + return "block_arrow"; + default: + return "na"; + } +} +function edgeTypeStr2Type(typeStr) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("typeStr2Type", typeStr); + switch (typeStr) { + case "==": + return "thick"; + default: + return "normal"; + } +} +function edgeStrToEdgeData(typeStr) { + switch (typeStr.trim()) { + case "--x": + return "arrow_cross"; + case "--o": + return "arrow_circle"; + default: + return "arrow_point"; + } +} +let cnt = 0; +const generateId = () => { + cnt++; + return "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt; +}; +const setHierarchy = (block) => { + rootBlock.children = block; + populateBlockDatabase(block, rootBlock); + blocks = rootBlock.children; +}; +const getColumns = (blockId) => { + const block = blockDatabase[blockId]; + if (!block) { + return -1; + } + if (block.columns) { + return block.columns; + } + if (!block.children) { + return -1; + } + return block.children.length; +}; +const getBlocksFlat = () => { + return [...Object.values(blockDatabase)]; +}; +const getBlocks = () => { + return blocks || []; +}; +const getEdges = () => { + return edgeList; +}; +const getBlock = (id) => { + return blockDatabase[id]; +}; +const setBlock = (block) => { + blockDatabase[block.id] = block; +}; +const getLogger = () => console; +const getClasses$1 = function() { + return classes; +}; +const db = { + getConfig: () => (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.F)().block, + typeStr2Type, + edgeTypeStr2Type, + edgeStrToEdgeData, + getLogger, + getBlocksFlat, + getBlocks, + getEdges, + setHierarchy, + getBlock, + setBlock, + getColumns, + getClasses: getClasses$1, + clear, + generateId +}; +const db$1 = db; +const fade = (color, opacity) => { + const channel = khroma__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A; + const r = channel(color, "r"); + const g = channel(color, "g"); + const b = channel(color, "b"); + return khroma__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A(r, g, b, opacity); +}; +const getStyles = (options) => `.label { + font-family: ${options.fontFamily}; + color: ${options.nodeTextColor || options.textColor}; + } + .cluster-label text { + fill: ${options.titleColor}; + } + .cluster-label span,p { + color: ${options.titleColor}; + } + + + + .label text,span,p { + fill: ${options.nodeTextColor || options.textColor}; + color: ${options.nodeTextColor || options.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${options.edgeLabelBackground}; + fill: ${options.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${fade(options.edgeLabelBackground, 0.5)}; + // background-color: + } + + .node .cluster { + // fill: ${fade(options.mainBkg, 0.5)}; + fill: ${fade(options.clusterBkg, 0.5)}; + stroke: ${fade(options.clusterBorder, 0.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${options.titleColor}; + } + + .cluster span,p { + color: ${options.titleColor}; + } + /* .cluster div { + color: ${options.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${options.fontFamily}; + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } +`; +const flowStyles = getStyles; +function getNodeFromBlock(block, db2, positioned = false) { + var _a2, _b2, _c; + const vertex = block; + let classStr = "default"; + if ((((_a2 = vertex == null ? void 0 : vertex.classes) == null ? void 0 : _a2.length) || 0) > 0) { + classStr = ((vertex == null ? void 0 : vertex.classes) || []).join(" "); + } + classStr = classStr + " flowchart-label"; + let radius = 0; + let shape = ""; + let padding2; + switch (vertex.type) { + case "round": + radius = 5; + shape = "rect"; + break; + case "composite": + radius = 0; + shape = "composite"; + padding2 = 0; + break; + case "square": + shape = "rect"; + break; + case "diamond": + shape = "question"; + break; + case "hexagon": + shape = "hexagon"; + break; + case "block_arrow": + shape = "block_arrow"; + break; + case "odd": + shape = "rect_left_inv_arrow"; + break; + case "lean_right": + shape = "lean_right"; + break; + case "lean_left": + shape = "lean_left"; + break; + case "trapezoid": + shape = "trapezoid"; + break; + case "inv_trapezoid": + shape = "inv_trapezoid"; + break; + case "rect_left_inv_arrow": + shape = "rect_left_inv_arrow"; + break; + case "circle": + shape = "circle"; + break; + case "ellipse": + shape = "ellipse"; + break; + case "stadium": + shape = "stadium"; + break; + case "subroutine": + shape = "subroutine"; + break; + case "cylinder": + shape = "cylinder"; + break; + case "group": + shape = "rect"; + break; + case "doublecircle": + shape = "doublecircle"; + break; + default: + shape = "rect"; + } + const styles = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.k)((vertex == null ? void 0 : vertex.styles) || []); + const vertexText = vertex.label; + const bounds = vertex.size || { width: 0, height: 0, x: 0, y: 0 }; + const node = { + labelStyle: styles.labelStyle, + shape, + labelText: vertexText, + rx: radius, + ry: radius, + class: classStr, + style: styles.style, + id: vertex.id, + directions: vertex.directions, + width: bounds.width, + height: bounds.height, + x: bounds.x, + y: bounds.y, + positioned, + intersect: void 0, + type: vertex.type, + padding: padding2 ?? (((_c = (_b2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.F)()) == null ? void 0 : _b2.block) == null ? void 0 : _c.padding) || 0) + }; + return node; +} +async function calculateBlockSize(elem, block, db2) { + const node = getNodeFromBlock(block, db2, false); + if (node.type === "group") { + return; + } + const nodeEl = await (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_9__.e)(elem, node); + const boundingBox = nodeEl.node().getBBox(); + const obj = db2.getBlock(node.id); + obj.size = { width: boundingBox.width, height: boundingBox.height, x: 0, y: 0, node: nodeEl }; + db2.setBlock(obj); + nodeEl.remove(); +} +async function insertBlockPositioned(elem, block, db2) { + const node = getNodeFromBlock(block, db2, true); + const obj = db2.getBlock(node.id); + if (obj.type !== "space") { + await (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_9__.e)(elem, node); + block.intersect = node == null ? void 0 : node.intersect; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_9__.p)(node); + } +} +async function performOperations(elem, blocks2, db2, operation) { + for (const block of blocks2) { + await operation(elem, block, db2); + if (block.children) { + await performOperations(elem, block.children, db2, operation); + } + } +} +async function calculateBlockSizes(elem, blocks2, db2) { + await performOperations(elem, blocks2, db2, calculateBlockSize); +} +async function insertBlocks(elem, blocks2, db2) { + await performOperations(elem, blocks2, db2, insertBlockPositioned); +} +async function insertEdges(elem, edges, blocks2, db2, id) { + const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Graph */ .T({ + multigraph: true, + compound: true + }); + g.setGraph({ + rankdir: "TB", + nodesep: 10, + ranksep: 10, + marginx: 8, + marginy: 8 + }); + for (const block of blocks2) { + if (block.size) { + g.setNode(block.id, { + width: block.size.width, + height: block.size.height, + intersect: block.intersect + }); + } + } + for (const edge of edges) { + if (edge.start && edge.end) { + const startBlock = db2.getBlock(edge.start); + const endBlock = db2.getBlock(edge.end); + if ((startBlock == null ? void 0 : startBlock.size) && (endBlock == null ? void 0 : endBlock.size)) { + const start = startBlock.size; + const end = endBlock.size; + const points = [ + { x: start.x, y: start.y }, + { x: start.x + (end.x - start.x) / 2, y: start.y + (end.y - start.y) / 2 }, + { x: end.x, y: end.y } + ]; + await (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_9__.h)( + elem, + { v: edge.start, w: edge.end, name: edge.id }, + { + ...edge, + arrowTypeEnd: edge.arrowTypeEnd, + arrowTypeStart: edge.arrowTypeStart, + points, + classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1" + }, + void 0, + "block", + g, + id + ); + if (edge.label) { + await (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_9__.f)(elem, { + ...edge, + label: edge.label, + labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;", + arrowTypeEnd: edge.arrowTypeEnd, + arrowTypeStart: edge.arrowTypeStart, + points, + classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1" + }); + await (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_9__.j)( + { ...edge, x: points[1].x, y: points[1].y }, + { + originalPath: points + } + ); + } + } + } + } +} +const padding = ((_b = (_a = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)()) == null ? void 0 : _a.block) == null ? void 0 : _b.padding) || 8; +function calculateBlockPosition(columns, position) { + if (columns === 0 || !Number.isInteger(columns)) { + throw new Error("Columns must be an integer !== 0."); + } + if (position < 0 || !Number.isInteger(position)) { + throw new Error("Position must be a non-negative integer." + position); + } + if (columns < 0) { + return { px: position, py: 0 }; + } + if (columns === 1) { + return { px: 0, py: position }; + } + const px = position % columns; + const py = Math.floor(position / columns); + return { px, py }; +} +const getMaxChildSize = (block) => { + let maxWidth = 0; + let maxHeight = 0; + for (const child of block.children) { + const { width, height, x, y } = child.size || { width: 0, height: 0, x: 0, y: 0 }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug( + "getMaxChildSize abc95 child:", + child.id, + "width:", + width, + "height:", + height, + "x:", + x, + "y:", + y, + child.type + ); + if (child.type === "space") { + continue; + } + if (width > maxWidth) { + maxWidth = width / (block.widthInColumns || 1); + } + if (height > maxHeight) { + maxHeight = height; + } + } + return { width: maxWidth, height: maxHeight }; +}; +function setBlockSizes(block, db2, siblingWidth = 0, siblingHeight = 0) { + var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug( + "setBlockSizes abc95 (start)", + block.id, + (_a2 = block == null ? void 0 : block.size) == null ? void 0 : _a2.x, + "block width =", + block == null ? void 0 : block.size, + "sieblingWidth", + siblingWidth + ); + if (!((_b2 = block == null ? void 0 : block.size) == null ? void 0 : _b2.width)) { + block.size = { + width: siblingWidth, + height: siblingHeight, + x: 0, + y: 0 + }; + } + let maxWidth = 0; + let maxHeight = 0; + if (((_c = block.children) == null ? void 0 : _c.length) > 0) { + for (const child of block.children) { + setBlockSizes(child, db2); + } + const childSize = getMaxChildSize(block); + maxWidth = childSize.width; + maxHeight = childSize.height; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("setBlockSizes abc95 maxWidth of", block.id, ":s children is ", maxWidth, maxHeight); + for (const child of block.children) { + if (child.size) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug( + `abc95 Setting size of children of ${block.id} id=${child.id} ${maxWidth} ${maxHeight} ${child.size}` + ); + child.size.width = maxWidth * (child.widthInColumns || 1) + padding * ((child.widthInColumns || 1) - 1); + child.size.height = maxHeight; + child.size.x = 0; + child.size.y = 0; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug( + `abc95 updating size of ${block.id} children child:${child.id} maxWidth:${maxWidth} maxHeight:${maxHeight}` + ); + } + } + for (const child of block.children) { + setBlockSizes(child, db2, maxWidth, maxHeight); + } + const columns = block.columns || -1; + let numItems = 0; + for (const child of block.children) { + numItems += child.widthInColumns || 1; + } + let xSize = block.children.length; + if (columns > 0 && columns < numItems) { + xSize = columns; + } + block.widthInColumns || 1; + const ySize = Math.ceil(numItems / xSize); + let width = xSize * (maxWidth + padding) + padding; + let height = ySize * (maxHeight + padding) + padding; + if (width < siblingWidth) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug( + `Detected to small siebling: abc95 ${block.id} sieblingWidth ${siblingWidth} sieblingHeight ${siblingHeight} width ${width}` + ); + width = siblingWidth; + height = siblingHeight; + const childWidth = (siblingWidth - xSize * padding - padding) / xSize; + const childHeight = (siblingHeight - ySize * padding - padding) / ySize; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Size indata abc88", block.id, "childWidth", childWidth, "maxWidth", maxWidth); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Size indata abc88", block.id, "childHeight", childHeight, "maxHeight", maxHeight); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Size indata abc88 xSize", xSize, "padding", padding); + for (const child of block.children) { + if (child.size) { + child.size.width = childWidth; + child.size.height = childHeight; + child.size.x = 0; + child.size.y = 0; + } + } + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug( + `abc95 (finale calc) ${block.id} xSize ${xSize} ySize ${ySize} columns ${columns}${block.children.length} width=${Math.max(width, ((_d = block.size) == null ? void 0 : _d.width) || 0)}` + ); + if (width < (((_e = block == null ? void 0 : block.size) == null ? void 0 : _e.width) || 0)) { + width = ((_f = block == null ? void 0 : block.size) == null ? void 0 : _f.width) || 0; + const num = columns > 0 ? Math.min(block.children.length, columns) : block.children.length; + if (num > 0) { + const childWidth = (width - num * padding - padding) / num; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("abc95 (growing to fit) width", block.id, width, (_g = block.size) == null ? void 0 : _g.width, childWidth); + for (const child of block.children) { + if (child.size) { + child.size.width = childWidth; + } + } + } + } + block.size = { + width, + height, + x: 0, + y: 0 + }; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug( + "setBlockSizes abc94 (done)", + block.id, + (_h = block == null ? void 0 : block.size) == null ? void 0 : _h.x, + (_i = block == null ? void 0 : block.size) == null ? void 0 : _i.width, + (_j = block == null ? void 0 : block.size) == null ? void 0 : _j.y, + (_k = block == null ? void 0 : block.size) == null ? void 0 : _k.height + ); +} +function layoutBlocks(block, db2) { + var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug( + `abc85 layout blocks (=>layoutBlocks) ${block.id} x: ${(_a2 = block == null ? void 0 : block.size) == null ? void 0 : _a2.x} y: ${(_b2 = block == null ? void 0 : block.size) == null ? void 0 : _b2.y} width: ${(_c = block == null ? void 0 : block.size) == null ? void 0 : _c.width}` + ); + const columns = block.columns || -1; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("layoutBlocks columns abc95", block.id, "=>", columns, block); + if (block.children && // find max width of children + block.children.length > 0) { + const width = ((_e = (_d = block == null ? void 0 : block.children[0]) == null ? void 0 : _d.size) == null ? void 0 : _e.width) || 0; + const widthOfChildren = block.children.length * width + (block.children.length - 1) * padding; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("widthOfChildren 88", widthOfChildren, "posX"); + let columnPos = 0; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("abc91 block?.size?.x", block.id, (_f = block == null ? void 0 : block.size) == null ? void 0 : _f.x); + let startingPosX = ((_g = block == null ? void 0 : block.size) == null ? void 0 : _g.x) ? ((_h = block == null ? void 0 : block.size) == null ? void 0 : _h.x) + (-((_i = block == null ? void 0 : block.size) == null ? void 0 : _i.width) / 2 || 0) : -padding; + let rowPos = 0; + for (const child of block.children) { + const parent = block; + if (!child.size) { + continue; + } + const { width: width2, height } = child.size; + const { px, py } = calculateBlockPosition(columns, columnPos); + if (py != rowPos) { + rowPos = py; + startingPosX = ((_j = block == null ? void 0 : block.size) == null ? void 0 : _j.x) ? ((_k = block == null ? void 0 : block.size) == null ? void 0 : _k.x) + (-((_l = block == null ? void 0 : block.size) == null ? void 0 : _l.width) / 2 || 0) : -padding; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("New row in layout for block", block.id, " and child ", child.id, rowPos); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug( + `abc89 layout blocks (child) id: ${child.id} Pos: ${columnPos} (px, py) ${px},${py} (${(_m = parent == null ? void 0 : parent.size) == null ? void 0 : _m.x},${(_n = parent == null ? void 0 : parent.size) == null ? void 0 : _n.y}) parent: ${parent.id} width: ${width2}${padding}` + ); + if (parent.size) { + const halfWidth = width2 / 2; + child.size.x = startingPosX + padding + halfWidth; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug( + `abc91 layout blocks (calc) px, pyid:${child.id} startingPos=X${startingPosX} new startingPosX${child.size.x} ${halfWidth} padding=${padding} width=${width2} halfWidth=${halfWidth} => x:${child.size.x} y:${child.size.y} ${child.widthInColumns} (width * (child?.w || 1)) / 2 ${width2 * ((child == null ? void 0 : child.widthInColumns) || 1) / 2}` + ); + startingPosX = child.size.x + halfWidth; + child.size.y = parent.size.y - parent.size.height / 2 + py * (height + padding) + height / 2 + padding; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug( + `abc88 layout blocks (calc) px, pyid:${child.id}startingPosX${startingPosX}${padding}${halfWidth}=>x:${child.size.x}y:${child.size.y}${child.widthInColumns}(width * (child?.w || 1)) / 2${width2 * ((child == null ? void 0 : child.widthInColumns) || 1) / 2}` + ); + } + if (child.children) { + layoutBlocks(child); + } + columnPos += (child == null ? void 0 : child.widthInColumns) || 1; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("abc88 columnsPos", child, columnPos); + } + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug( + `layout blocks (<==layoutBlocks) ${block.id} x: ${(_o = block == null ? void 0 : block.size) == null ? void 0 : _o.x} y: ${(_p = block == null ? void 0 : block.size) == null ? void 0 : _p.y} width: ${(_q = block == null ? void 0 : block.size) == null ? void 0 : _q.width}` + ); +} +function findBounds(block, { minX, minY, maxX, maxY } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) { + if (block.size && block.id !== "root") { + const { x, y, width, height } = block.size; + if (x - width / 2 < minX) { + minX = x - width / 2; + } + if (y - height / 2 < minY) { + minY = y - height / 2; + } + if (x + width / 2 > maxX) { + maxX = x + width / 2; + } + if (y + height / 2 > maxY) { + maxY = y + height / 2; + } + } + if (block.children) { + for (const child of block.children) { + ({ minX, minY, maxX, maxY } = findBounds(child, { minX, minY, maxX, maxY })); + } + } + return { minX, minY, maxX, maxY }; +} +function layout(db2) { + const root = db2.getBlock("root"); + if (!root) { + return; + } + setBlockSizes(root, db2, 0, 0); + layoutBlocks(root); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("getBlocks", JSON.stringify(root, null, 2)); + const { minX, minY, maxX, maxY } = findBounds(root); + const height = maxY - minY; + const width = maxX - minX; + return { x: minX, y: minY, width, height }; +} +const getClasses = function(text, diagObj) { + return diagObj.db.getClasses(); +}; +const draw = async function(text, id, _version, diagObj) { + const { securityLevel, block: conf } = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.F)(); + const db2 = diagObj.db; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body"); + const svg = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(`[id="${id}"]`); + const markers = ["point", "circle", "cross"]; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_9__.a)(svg, markers, diagObj.type, id); + const bl = db2.getBlocks(); + const blArr = db2.getBlocksFlat(); + const edges = db2.getEdges(); + const nodes = svg.insert("g").attr("class", "block"); + await calculateBlockSizes(nodes, bl, db2); + const bounds = layout(db2); + await insertBlocks(nodes, bl, db2); + await insertEdges(nodes, edges, blArr, db2, id); + if (bounds) { + const bounds2 = bounds; + const magicFactor = Math.max(1, Math.round(0.125 * (bounds2.width / bounds2.height))); + const height = bounds2.height + magicFactor + 10; + const width = bounds2.width + 10; + const { useMaxWidth } = conf; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.i)(svg, height, width, !!useMaxWidth); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Here Bounds", bounds, bounds2); + svg.attr( + "viewBox", + `${bounds2.x - 5} ${bounds2.y - 5} ${bounds2.width + 10} ${bounds2.height + 10}` + ); + } + (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .scaleOrdinal */ .UMr)(d3__WEBPACK_IMPORTED_MODULE_1__/* .schemeTableau10 */ .zt); +}; +const renderer = { + draw, + getClasses +}; +const diagram = { + parser: parser$1, + db: db$1, + renderer, + styles: flowStyles +}; + + + +/***/ }), + +/***/ 3791: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + a: () => (/* binding */ createText), + c: () => (/* binding */ computeDimensionOfText) +}); + +// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +var constructs_namespaceObject = {}; +__webpack_require__.r(constructs_namespaceObject); +__webpack_require__.d(constructs_namespaceObject, { + attentionMarkers: () => (attentionMarkers), + contentInitial: () => (contentInitial), + disable: () => (disable), + document: () => (constructs_document), + flow: () => (constructs_flow), + flowInitial: () => (flowInitial), + insideSpan: () => (insideSpan), + string: () => (constructs_string), + text: () => (constructs_text) +}); + +// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-f47111a7.js + 8 modules +var mermaid_f47111a7 = __webpack_require__(6257); +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js +/** + * @typedef {import('mdast').Root|import('mdast').Content} Node + * + * @typedef Options + * Configuration (optional). + * @property {boolean | null | undefined} [includeImageAlt=true] + * Whether to use `alt` for `image`s. + * @property {boolean | null | undefined} [includeHtml=true] + * Whether to use `value` of HTML. + */ + +/** @type {Options} */ +const emptyOptions = {} + +/** + * Get the text content of a node or list of nodes. + * + * Prefers the node’s plain-text fields, otherwise serializes its children, + * and if the given value is an array, serialize the nodes in it. + * + * @param {unknown} value + * Thing to serialize, typically `Node`. + * @param {Options | null | undefined} [options] + * Configuration (optional). + * @returns {string} + * Serialized `value`. + */ +function lib_toString(value, options) { + const settings = options || emptyOptions + const includeImageAlt = + typeof settings.includeImageAlt === 'boolean' + ? settings.includeImageAlt + : true + const includeHtml = + typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true + + return one(value, includeImageAlt, includeHtml) +} + +/** + * One node or several nodes. + * + * @param {unknown} value + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized node. + */ +function one(value, includeImageAlt, includeHtml) { + if (node(value)) { + if ('value' in value) { + return value.type === 'html' && !includeHtml ? '' : value.value + } + + if (includeImageAlt && 'alt' in value && value.alt) { + return value.alt + } + + if ('children' in value) { + return lib_all(value.children, includeImageAlt, includeHtml) + } + } + + if (Array.isArray(value)) { + return lib_all(value, includeImageAlt, includeHtml) + } + + return '' +} + +/** + * Serialize a list of nodes. + * + * @param {Array} values + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized nodes. + */ +function lib_all(values, includeImageAlt, includeHtml) { + /** @type {Array} */ + const result = [] + let index = -1 + + while (++index < values.length) { + result[index] = one(values[index], includeImageAlt, includeHtml) + } + + return result.join('') +} + +/** + * Check if `value` looks like a node. + * + * @param {unknown} value + * Thing. + * @returns {value is Node} + * Whether `value` is a node. + */ +function node(value) { + return Boolean(value && typeof value === 'object') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array} list + * List to operate on. + * @param {Array} items + * Items to add to `list`. + * @returns {Array} + * Either `list` or `items`. + */ +function push(list, items) { + if (list.length > 0) { + splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + * @typedef {import('micromark-util-types').Handles} Handles + * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension + * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension + */ + + + +const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty + +/** + * Combine multiple syntax extensions into one. + * + * @param {Array} extensions + * List of syntax extensions. + * @returns {NormalizedExtension} + * A single combined extension. + */ +function combineExtensions(extensions) { + /** @type {NormalizedExtension} */ + const all = {} + let index = -1 + + while (++index < extensions.length) { + syntaxExtension(all, extensions[index]) + } + + return all +} + +/** + * Merge `extension` into `all`. + * + * @param {NormalizedExtension} all + * Extension to merge into. + * @param {Extension} extension + * Extension to merge. + * @returns {void} + */ +function syntaxExtension(all, extension) { + /** @type {keyof Extension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + /** @type {Record} */ + const left = maybe || (all[hook] = {}) + /** @type {Record | undefined} */ + const right = extension[hook] + /** @type {string} */ + let code + + if (right) { + for (code in right) { + if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] + const value = right[code] + constructs( + // @ts-expect-error Looks like a list. + left[code], + Array.isArray(value) ? value : value ? [value] : [] + ) + } + } + } +} + +/** + * Merge `list` into `existing` (both lists of constructs). + * Mutates `existing`. + * + * @param {Array} existing + * @param {Array} list + * @returns {void} + */ +function constructs(existing, list) { + let index = -1 + /** @type {Array} */ + const before = [] + + while (++index < list.length) { + // @ts-expect-error Looks like an object. + ;(list[index].add === 'after' ? existing : before).push(list[index]) + } + + splice(existing, 0, 0, before) +} + +/** + * Combine multiple HTML extensions into one. + * + * @param {Array} htmlExtensions + * List of HTML extensions. + * @returns {HtmlExtension} + * A single combined HTML extension. + */ +function combineHtmlExtensions(htmlExtensions) { + /** @type {HtmlExtension} */ + const handlers = {} + let index = -1 + + while (++index < htmlExtensions.length) { + htmlExtension(handlers, htmlExtensions[index]) + } + + return handlers +} + +/** + * Merge `extension` into `all`. + * + * @param {HtmlExtension} all + * Extension to merge into. + * @param {HtmlExtension} extension + * Extension to merge. + * @returns {void} + */ +function htmlExtension(all, extension) { + /** @type {keyof HtmlExtension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + const left = maybe || (all[hook] = {}) + const right = extension[hook] + /** @type {keyof Handles} */ + let type + + if (right) { + for (type in right) { + // @ts-expect-error assume document vs regular handler are managed correctly. + left[type] = right[type] + } + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +// This module is generated by `script/`. +// +// CommonMark handles attention (emphasis, strong) markers based on what comes +// before or after them. +// One such difference is if those characters are Unicode punctuation. +// This script is generated from the Unicode data. + +/** + * Regular expression that matches a unicode punctuation character. + */ +const unicodePunctuationRegex = + /[!-\/:-@\[-`\{-~\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]/ + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + + +/** + * Check whether the character code represents an ASCII alpha (`a` through `z`, + * case insensitive). + * + * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. + * + * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) + * to U+005A (`Z`). + * + * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) + * to U+007A (`z`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlpha = regexCheck(/[A-Za-z]/) + +/** + * Check whether the character code represents an ASCII alphanumeric (`a` + * through `z`, case insensitive, or `0` through `9`). + * + * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha + * (see `asciiAlpha`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) + +/** + * Check whether the character code represents an ASCII atext. + * + * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in + * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), + * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F + * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E + * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE + * (`{`) to U+007E TILDE (`~`). + * + * See: + * **\[RFC5322]**: + * [Internet Message Format](https://tools.ietf.org/html/rfc5322). + * P. Resnick. + * IETF. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) + +/** + * Check whether a character code is an ASCII control character. + * + * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) + * to U+001F (US), or U+007F (DEL). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code !== null && (code < 32 || code === 127) + ) +} + +/** + * Check whether the character code represents an ASCII digit (`0` through `9`). + * + * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to + * U+0039 (`9`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiDigit = regexCheck(/\d/) + +/** + * Check whether the character code represents an ASCII hex digit (`a` through + * `f`, case insensitive, or `0` through `9`). + * + * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex + * digit, or an ASCII lower hex digit. + * + * An **ASCII upper hex digit** is a character in the inclusive range U+0041 + * (`A`) to U+0046 (`F`). + * + * An **ASCII lower hex digit** is a character in the inclusive range U+0061 + * (`a`) to U+0066 (`f`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) + +/** + * Check whether the character code represents ASCII punctuation. + * + * An **ASCII punctuation** is a character in the inclusive ranges U+0021 + * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT + * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT + * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) + +/** + * Check whether a character code is a markdown line ending. + * + * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN + * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). + * + * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE + * RETURN (CR) are replaced by these virtual characters depending on whether + * they occurred together. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEnding(code) { + return code !== null && code < -2 +} + +/** + * Check whether a character code is a markdown line ending (see + * `markdownLineEnding`) or markdown space (see `markdownSpace`). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEndingOrSpace(code) { + return code !== null && (code < 0 || code === 32) +} + +/** + * Check whether a character code is a markdown space. + * + * A **markdown space** is the concrete character U+0020 SPACE (SP) and the + * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). + * + * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is + * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL + * SPACE (VS) characters, depending on the column at which the tab occurred. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownSpace(code) { + return code === -2 || code === -1 || code === 32 +} + +// Size note: removing ASCII from the regex and using `asciiPunctuation` here +// In fact adds to the bundle size. +/** + * Check whether the character code represents Unicode punctuation. + * + * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, + * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` + * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` + * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII + * punctuation (see `asciiPunctuation`). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodePunctuation = regexCheck(unicodePunctuationRegex) + +/** + * Check whether the character code represents Unicode whitespace. + * + * Note that this does handle micromark specific markdown whitespace characters. + * See `markdownLineEndingOrSpace` to check that. + * + * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, + * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), + * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodeWhitespace = regexCheck(/\s/) + +/** + * Create a code check from a regex. + * + * @param {RegExp} regex + * @returns {(code: Code) => boolean} + */ +function regexCheck(regex) { + return check + + /** + * Check whether a code matches the bound regex. + * + * @param {Code} code + * Character code. + * @returns {boolean} + * Whether the character code matches the bound regex. + */ + function check(code) { + return code !== null && regex.test(String.fromCharCode(code)) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * spaces in markdown are often optional, in which case this factory can be + * used and `ok` will be switched to whether spaces were found or not + * * one line ending or space can be detected with `markdownSpace(code)` right + * before using `factorySpace` + * + * ###### Examples + * + * Where `␉` represents a tab (plus how much it expands) and `␠` represents a + * single space. + * + * ```markdown + * ␉ + * ␠␠␠␠ + * ␉␠ + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {TokenType} type + * Type (`' \t'`). + * @param {number | undefined} [max=Infinity] + * Max (exclusive). + * @returns + * Start state. + */ +function factorySpace(effects, ok, type, max) { + const limit = max ? max - 1 : Number.POSITIVE_INFINITY + let size = 0 + return start + + /** @type {State} */ + function start(code) { + if (markdownSpace(code)) { + effects.enter(type) + return prefix(code) + } + return ok(code) + } + + /** @type {State} */ + function prefix(code) { + if (markdownSpace(code) && size++ < limit) { + effects.consume(code) + return prefix + } + effects.exit(type) + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + +/** @type {InitialConstruct} */ +const content = { + tokenize: initializeContent +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeContent(effects) { + const contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ) + /** @type {Token} */ + let previous + return contentStart + + /** @type {State} */ + function afterContentStartConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, contentStart, 'linePrefix') + } + + /** @type {State} */ + function paragraphInitial(code) { + effects.enter('paragraph') + return lineStart(code) + } + + /** @type {State} */ + function lineStart(code) { + const token = effects.enter('chunkText', { + contentType: 'text', + previous + }) + if (previous) { + previous.next = token + } + previous = token + return data(code) + } + + /** @type {State} */ + function data(code) { + if (code === null) { + effects.exit('chunkText') + effects.exit('paragraph') + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + effects.exit('chunkText') + return lineStart + } + + // Data. + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + +/** + * @typedef {[Construct, ContainerState]} StackItem + */ + + + + +/** @type {InitialConstruct} */ +const document_document = { + tokenize: initializeDocument +} + +/** @type {Construct} */ +const containerConstruct = { + tokenize: tokenizeContainer +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeDocument(effects) { + const self = this + /** @type {Array} */ + const stack = [] + let continued = 0 + /** @type {TokenizeContext | undefined} */ + let childFlow + /** @type {Token | undefined} */ + let childToken + /** @type {number} */ + let lineStartOffset + return start + + /** @type {State} */ + function start(code) { + // First we iterate through the open blocks, starting with the root + // document, and descending through last children down to the last open + // block. + // Each block imposes a condition that the line must satisfy if the block is + // to remain open. + // For example, a block quote requires a `>` character. + // A paragraph requires a non-blank line. + // In this phase we may match all or just some of the open blocks. + // But we cannot close unmatched blocks yet, because we may have a lazy + // continuation line. + if (continued < stack.length) { + const item = stack[continued] + self.containerState = item[1] + return effects.attempt( + item[0].continuation, + documentContinue, + checkNewContainers + )(code) + } + + // Done. + return checkNewContainers(code) + } + + /** @type {State} */ + function documentContinue(code) { + continued++ + + // Note: this field is called `_closeFlow` but it also closes containers. + // Perhaps a good idea to rename it but it’s already used in the wild by + // extensions. + if (self.containerState._closeFlow) { + self.containerState._closeFlow = undefined + if (childFlow) { + closeFlow() + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when dealing with lazy lines in `writeToChild`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {Point | undefined} */ + let point + + // Find the flow chunk. + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + point = self.events[indexBeforeFlow][1].end + break + } + } + exitContainers(continued) + + // Fix positions. + let index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + return checkNewContainers(code) + } + return start(code) + } + + /** @type {State} */ + function checkNewContainers(code) { + // Next, after consuming the continuation markers for existing blocks, we + // look for new block starts (e.g. `>` for a block quote). + // If we encounter a new block start, we close any blocks unmatched in + // step 1 before creating the new block as a child of the last matched + // block. + if (continued === stack.length) { + // No need to `check` whether there’s a container, of `exitContainers` + // would be moot. + // We can instead immediately `attempt` to parse one. + if (!childFlow) { + return documentContinued(code) + } + + // If we have concrete content, such as block HTML or fenced code, + // we can’t have containers “pierce” into them, so we can immediately + // start. + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { + return flowStart(code) + } + + // If we do have flow, it could still be a blank line, + // but we’d be interrupting it w/ a new container if there’s a current + // construct. + // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer + // needed in micromark-extension-gfm-table@1.0.6). + self.interrupt = Boolean( + childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack + ) + } + + // Check if there is a new container. + self.containerState = {} + return effects.check( + containerConstruct, + thereIsANewContainer, + thereIsNoNewContainer + )(code) + } + + /** @type {State} */ + function thereIsANewContainer(code) { + if (childFlow) closeFlow() + exitContainers(continued) + return documentContinued(code) + } + + /** @type {State} */ + function thereIsNoNewContainer(code) { + self.parser.lazy[self.now().line] = continued !== stack.length + lineStartOffset = self.now().offset + return flowStart(code) + } + + /** @type {State} */ + function documentContinued(code) { + // Try new containers. + self.containerState = {} + return effects.attempt( + containerConstruct, + containerContinue, + flowStart + )(code) + } + + /** @type {State} */ + function containerContinue(code) { + continued++ + stack.push([self.currentConstruct, self.containerState]) + // Try another. + return documentContinued(code) + } + + /** @type {State} */ + function flowStart(code) { + if (code === null) { + if (childFlow) closeFlow() + exitContainers(0) + effects.consume(code) + return + } + childFlow = childFlow || self.parser.flow(self.now()) + effects.enter('chunkFlow', { + contentType: 'flow', + previous: childToken, + _tokenizer: childFlow + }) + return flowContinue(code) + } + + /** @type {State} */ + function flowContinue(code) { + if (code === null) { + writeToChild(effects.exit('chunkFlow'), true) + exitContainers(0) + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + writeToChild(effects.exit('chunkFlow')) + // Get ready for the next line. + continued = 0 + self.interrupt = undefined + return start + } + effects.consume(code) + return flowContinue + } + + /** + * @param {Token} token + * @param {boolean | undefined} [eof] + * @returns {void} + */ + function writeToChild(token, eof) { + const stream = self.sliceStream(token) + if (eof) stream.push(null) + token.previous = childToken + if (childToken) childToken.next = token + childToken = token + childFlow.defineSkip(token.start) + childFlow.write(stream) + + // Alright, so we just added a lazy line: + // + // ```markdown + // > a + // b. + // + // Or: + // + // > ~~~c + // d + // + // Or: + // + // > | e | + // f + // ``` + // + // The construct in the second example (fenced code) does not accept lazy + // lines, so it marked itself as done at the end of its first line, and + // then the content construct parses `d`. + // Most constructs in markdown match on the first line: if the first line + // forms a construct, a non-lazy line can’t “unmake” it. + // + // The construct in the third example is potentially a GFM table, and + // those are *weird*. + // It *could* be a table, from the first line, if the following line + // matches a condition. + // In this case, that second line is lazy, which “unmakes” the first line + // and turns the whole into one content block. + // + // We’ve now parsed the non-lazy and the lazy line, and can figure out + // whether the lazy line started a new flow block. + // If it did, we exit the current containers between the two flow blocks. + if (self.parser.lazy[token.start.line]) { + let index = childFlow.events.length + while (index--) { + if ( + // The token starts before the line ending… + childFlow.events[index][1].start.offset < lineStartOffset && + // …and either is not ended yet… + (!childFlow.events[index][1].end || + // …or ends after it. + childFlow.events[index][1].end.offset > lineStartOffset) + ) { + // Exit: there’s still something open, which means it’s a lazy line + // part of something. + return + } + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when closing flow in `documentContinue`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {boolean | undefined} */ + let seen + /** @type {Point | undefined} */ + let point + + // Find the previous chunk (the one before the lazy line). + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + if (seen) { + point = self.events[indexBeforeFlow][1].end + break + } + seen = true + } + } + exitContainers(continued) + + // Fix positions. + index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + } + } + + /** + * @param {number} size + * @returns {void} + */ + function exitContainers(size) { + let index = stack.length + + // Exit open containers. + while (index-- > size) { + const entry = stack[index] + self.containerState = entry[1] + entry[0].exit.call(self, effects) + } + stack.length = size + } + function closeFlow() { + childFlow.write([null]) + childToken = undefined + childFlow = undefined + self.containerState._closeFlow = undefined + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContainer(effects, ok, nok) { + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok, nok), + 'linePrefix', + this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blankLine = { + tokenize: tokenizeBlankLine, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLine(effects, ok, nok) { + return start + + /** + * Start of blank line. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + return markdownSpace(code) + ? factorySpace(effects, after, 'linePrefix')(code) + : after(code) + } + + /** + * At eof/eol, after optional whitespace. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function micromark_util_chunked_splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array} list + * List to operate on. + * @param {Array} items + * Items to add to `list`. + * @returns {Array} + * Either `list` or `items`. + */ +function micromark_util_chunked_push(list, items) { + if (list.length > 0) { + micromark_util_chunked_splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Token} Token + */ + + +/** + * Tokenize subcontent. + * + * @param {Array} events + * List of events. + * @returns {boolean} + * Whether subtokens were found. + */ +function subtokenize(events) { + /** @type {Record} */ + const jumps = {} + let index = -1 + /** @type {Event} */ + let event + /** @type {number | undefined} */ + let lineIndex + /** @type {number} */ + let otherIndex + /** @type {Event} */ + let otherEvent + /** @type {Array} */ + let parameters + /** @type {Array} */ + let subevents + /** @type {boolean | undefined} */ + let more + while (++index < events.length) { + while (index in jumps) { + index = jumps[index] + } + event = events[index] + + // Add a hook for the GFM tasklist extension, which needs to know if text + // is in the first content of a list item. + if ( + index && + event[1].type === 'chunkFlow' && + events[index - 1][1].type === 'listItemPrefix' + ) { + subevents = event[1]._tokenizer.events + otherIndex = 0 + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'lineEndingBlank' + ) { + otherIndex += 2 + } + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'content' + ) { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === 'content') { + break + } + if (subevents[otherIndex][1].type === 'chunkText') { + subevents[otherIndex][1]._isInFirstContentOfListItem = true + otherIndex++ + } + } + } + } + + // Enter. + if (event[0] === 'enter') { + if (event[1].contentType) { + Object.assign(jumps, subcontent(events, index)) + index = jumps[index] + more = true + } + } + // Exit. + else if (event[1]._container) { + otherIndex = index + lineIndex = undefined + while (otherIndex--) { + otherEvent = events[otherIndex] + if ( + otherEvent[1].type === 'lineEnding' || + otherEvent[1].type === 'lineEndingBlank' + ) { + if (otherEvent[0] === 'enter') { + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + } + otherEvent[1].type = 'lineEnding' + lineIndex = otherIndex + } + } else { + break + } + } + if (lineIndex) { + // Fix position. + event[1].end = Object.assign({}, events[lineIndex][1].start) + + // Switch container exit w/ line endings. + parameters = events.slice(lineIndex, index) + parameters.unshift(event) + micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) + } + } + } + return !more +} + +/** + * Tokenize embedded tokens. + * + * @param {Array} events + * @param {number} eventIndex + * @returns {Record} + */ +function subcontent(events, eventIndex) { + const token = events[eventIndex][1] + const context = events[eventIndex][2] + let startPosition = eventIndex - 1 + /** @type {Array} */ + const startPositions = [] + const tokenizer = + token._tokenizer || context.parser[token.contentType](token.start) + const childEvents = tokenizer.events + /** @type {Array<[number, number]>} */ + const jumps = [] + /** @type {Record} */ + const gaps = {} + /** @type {Array} */ + let stream + /** @type {Token | undefined} */ + let previous + let index = -1 + /** @type {Token | undefined} */ + let current = token + let adjust = 0 + let start = 0 + const breaks = [start] + + // Loop forward through the linked tokens to pass them in order to the + // subtokenizer. + while (current) { + // Find the position of the event for this token. + while (events[++startPosition][1] !== current) { + // Empty. + } + startPositions.push(startPosition) + if (!current._tokenizer) { + stream = context.sliceStream(current) + if (!current.next) { + stream.push(null) + } + if (previous) { + tokenizer.defineSkip(current.start) + } + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true + } + tokenizer.write(stream) + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = undefined + } + } + + // Unravel the next token. + previous = current + current = current.next + } + + // Now, loop back through all events (and linked tokens), to figure out which + // parts belong where. + current = token + while (++index < childEvents.length) { + if ( + // Find a void token that includes a break. + childEvents[index][0] === 'exit' && + childEvents[index - 1][0] === 'enter' && + childEvents[index][1].type === childEvents[index - 1][1].type && + childEvents[index][1].start.line !== childEvents[index][1].end.line + ) { + start = index + 1 + breaks.push(start) + // Help GC. + current._tokenizer = undefined + current.previous = undefined + current = current.next + } + } + + // Help GC. + tokenizer.events = [] + + // If there’s one more token (which is the cases for lines that end in an + // EOF), that’s perfect: the last point we found starts it. + // If there isn’t then make sure any remaining content is added to it. + if (current) { + // Help GC. + current._tokenizer = undefined + current.previous = undefined + } else { + breaks.pop() + } + + // Now splice the events from the subtokenizer into the current events, + // moving back to front so that splice indices aren’t affected. + index = breaks.length + while (index--) { + const slice = childEvents.slice(breaks[index], breaks[index + 1]) + const start = startPositions.pop() + jumps.unshift([start, start + slice.length - 1]) + micromark_util_chunked_splice(events, start, 2, slice) + } + index = -1 + while (++index < jumps.length) { + gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] + adjust += jumps[index][1] - jumps[index][0] - 1 + } + return gaps +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** + * No name because it must not be turned off. + * @type {Construct} + */ +const content_content = { + tokenize: tokenizeContent, + resolve: resolveContent +} + +/** @type {Construct} */ +const continuationConstruct = { + tokenize: tokenizeContinuation, + partial: true +} + +/** + * Content is transparent: it’s parsed right now. That way, definitions are also + * parsed right now: before text in paragraphs (specifically, media) are parsed. + * + * @type {Resolver} + */ +function resolveContent(events) { + subtokenize(events) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContent(effects, ok) { + /** @type {Token | undefined} */ + let previous + return chunkStart + + /** + * Before a content chunk. + * + * ```markdown + * > | abc + * ^ + * ``` + * + * @type {State} + */ + function chunkStart(code) { + effects.enter('content') + previous = effects.enter('chunkContent', { + contentType: 'content' + }) + return chunkInside(code) + } + + /** + * In a content chunk. + * + * ```markdown + * > | abc + * ^^^ + * ``` + * + * @type {State} + */ + function chunkInside(code) { + if (code === null) { + return contentEnd(code) + } + + // To do: in `markdown-rs`, each line is parsed on its own, and everything + // is stitched together resolving. + if (markdownLineEnding(code)) { + return effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code) + } + + // Data. + effects.consume(code) + return chunkInside + } + + /** + * + * + * @type {State} + */ + function contentEnd(code) { + effects.exit('chunkContent') + effects.exit('content') + return ok(code) + } + + /** + * + * + * @type {State} + */ + function contentContinue(code) { + effects.consume(code) + effects.exit('chunkContent') + previous.next = effects.enter('chunkContent', { + contentType: 'content', + previous + }) + previous = previous.next + return chunkInside + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContinuation(effects, ok, nok) { + const self = this + return startLookahead + + /** + * + * + * @type {State} + */ + function startLookahead(code) { + effects.exit('chunkContent') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, prefixed, 'linePrefix') + } + + /** + * + * + * @type {State} + */ + function prefixed(code) { + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + + // Always populated by defaults. + + const tail = self.events[self.events.length - 1] + if ( + !self.parser.constructs.disable.null.includes('codeIndented') && + tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ) { + return ok(code) + } + return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + + +/** @type {InitialConstruct} */ +const flow = { + tokenize: initializeFlow +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeFlow(effects) { + const self = this + const initial = effects.attempt( + // Try to parse a blank line. + blankLine, + atBlankEnding, + // Try to parse initial flow (essentially, only code). + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content_content, afterConstruct) + ), + 'linePrefix' + ) + ) + ) + return initial + + /** @type {State} */ + function atBlankEnding(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEndingBlank') + effects.consume(code) + effects.exit('lineEndingBlank') + self.currentConstruct = undefined + return initial + } + + /** @type {State} */ + function afterConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + self.currentConstruct = undefined + return initial + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +const resolver = { + resolveAll: createResolver() +} +const string = initializeFactory('string') +const text_text = initializeFactory('text') + +/** + * @param {'string' | 'text'} field + * @returns {InitialConstruct} + */ +function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: createResolver( + field === 'text' ? resolveAllLineSuffixes : undefined + ) + } + + /** + * @this {TokenizeContext} + * @type {Initializer} + */ + function initializeText(effects) { + const self = this + const constructs = this.parser.constructs[field] + const text = effects.attempt(constructs, start, notText) + return start + + /** @type {State} */ + function start(code) { + return atBreak(code) ? text(code) : notText(code) + } + + /** @type {State} */ + function notText(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('data') + effects.consume(code) + return data + } + + /** @type {State} */ + function data(code) { + if (atBreak(code)) { + effects.exit('data') + return text(code) + } + + // Data. + effects.consume(code) + return data + } + + /** + * @param {Code} code + * @returns {boolean} + */ + function atBreak(code) { + if (code === null) { + return true + } + const list = constructs[code] + let index = -1 + if (list) { + // Always populated by defaults. + + while (++index < list.length) { + const item = list[index] + if (!item.previous || item.previous.call(self, self.previous)) { + return true + } + } + } + return false + } + } +} + +/** + * @param {Resolver | undefined} [extraResolver] + * @returns {Resolver} + */ +function createResolver(extraResolver) { + return resolveAllText + + /** @type {Resolver} */ + function resolveAllText(events, context) { + let index = -1 + /** @type {number | undefined} */ + let enter + + // A rather boring computation (to merge adjacent `data` events) which + // improves mm performance by 29%. + while (++index <= events.length) { + if (enter === undefined) { + if (events[index] && events[index][1].type === 'data') { + enter = index + index++ + } + } else if (!events[index] || events[index][1].type !== 'data') { + // Don’t do anything if there is one data token. + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + index = enter + 2 + } + enter = undefined + } + } + return extraResolver ? extraResolver(events, context) : events + } +} + +/** + * A rather ugly set of instructions which again looks at chunks in the input + * stream. + * The reason to do this here is that it is *much* faster to parse in reverse. + * And that we can’t hook into `null` to split the line suffix before an EOF. + * To do: figure out if we can make this into a clean utility, or even in core. + * As it will be useful for GFMs literal autolink extension (and maybe even + * tables?) + * + * @type {Resolver} + */ +function resolveAllLineSuffixes(events, context) { + let eventIndex = 0 // Skip first. + + while (++eventIndex <= events.length) { + if ( + (eventIndex === events.length || + events[eventIndex][1].type === 'lineEnding') && + events[eventIndex - 1][1].type === 'data' + ) { + const data = events[eventIndex - 1][1] + const chunks = context.sliceStream(data) + let index = chunks.length + let bufferIndex = -1 + let size = 0 + /** @type {boolean | undefined} */ + let tabs + while (index--) { + const chunk = chunks[index] + if (typeof chunk === 'string') { + bufferIndex = chunk.length + while (chunk.charCodeAt(bufferIndex - 1) === 32) { + size++ + bufferIndex-- + } + if (bufferIndex) break + bufferIndex = -1 + } + // Number + else if (chunk === -2) { + tabs = true + size++ + } else if (chunk === -1) { + // Empty + } else { + // Replacement character, exit. + index++ + break + } + } + if (size) { + const token = { + type: + eventIndex === events.length || tabs || size < 2 + ? 'lineSuffix' + : 'hardBreakTrailing', + start: { + line: data.end.line, + column: data.end.column - size, + offset: data.end.offset - size, + _index: data.start._index + index, + _bufferIndex: index + ? bufferIndex + : data.start._bufferIndex + bufferIndex + }, + end: Object.assign({}, data.end) + } + data.end = Object.assign({}, token.start) + if (data.start.offset === data.end.offset) { + Object.assign(data, token) + } else { + events.splice( + eventIndex, + 0, + ['enter', token, context], + ['exit', token, context] + ) + eventIndex += 2 + } + } + eventIndex++ + } + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js +/** + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * Call all `resolveAll`s. + * + * @param {Array<{resolveAll?: Resolver | undefined}>} constructs + * List of constructs, optionally with `resolveAll`s. + * @param {Array} events + * List of events. + * @param {TokenizeContext} context + * Context used by `tokenize`. + * @returns {Array} + * Changed events. + */ +function resolveAll(constructs, events, context) { + /** @type {Array} */ + const called = [] + let index = -1 + + while (++index < constructs.length) { + const resolve = constructs[index].resolveAll + + if (resolve && !called.includes(resolve)) { + events = resolve(events, context) + called.push(resolve) + } + } + + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenType} TokenType + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * @callback Restore + * @returns {void} + * + * @typedef Info + * @property {Restore} restore + * @property {number} from + * + * @callback ReturnHandle + * Handle a successful run. + * @param {Construct} construct + * @param {Info} info + * @returns {void} + */ + + + + +/** + * Create a tokenizer. + * Tokenizers deal with one type of data (e.g., containers, flow, text). + * The parser is the object dealing with it all. + * `initialize` works like other constructs, except that only its `tokenize` + * function is used, in which case it doesn’t receive an `ok` or `nok`. + * `from` can be given to set the point before the first character, although + * when further lines are indented, they must be set with `defineSkip`. + * + * @param {ParseContext} parser + * @param {InitialConstruct} initialize + * @param {Omit | undefined} [from] + * @returns {TokenizeContext} + */ +function createTokenizer(parser, initialize, from) { + /** @type {Point} */ + let point = Object.assign( + from + ? Object.assign({}, from) + : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ) + /** @type {Record} */ + const columnStart = {} + /** @type {Array} */ + const resolveAllConstructs = [] + /** @type {Array} */ + let chunks = [] + /** @type {Array} */ + let stack = [] + /** @type {boolean | undefined} */ + let consumed = true + + /** + * Tools used for tokenizing. + * + * @type {Effects} + */ + const effects = { + consume, + enter, + exit, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, { + interrupt: true + }) + } + + /** + * State and tools for resolving and serializing. + * + * @type {TokenizeContext} + */ + const context = { + previous: null, + code: null, + containerState: {}, + events: [], + parser, + sliceStream, + sliceSerialize, + now, + defineSkip, + write + } + + /** + * The state function. + * + * @type {State | void} + */ + let state = initialize.tokenize.call(context, effects) + + /** + * Track which character we expect to be consumed, to catch bugs. + * + * @type {Code} + */ + let expectedCode + if (initialize.resolveAll) { + resolveAllConstructs.push(initialize) + } + return context + + /** @type {TokenizeContext['write']} */ + function write(slice) { + chunks = push(chunks, slice) + main() + + // Exit if we’re not done, resolve might change stuff. + if (chunks[chunks.length - 1] !== null) { + return [] + } + addResult(initialize, 0) + + // Otherwise, resolve, and exit. + context.events = resolveAll(resolveAllConstructs, context.events, context) + return context.events + } + + // + // Tools. + // + + /** @type {TokenizeContext['sliceSerialize']} */ + function sliceSerialize(token, expandTabs) { + return serializeChunks(sliceStream(token), expandTabs) + } + + /** @type {TokenizeContext['sliceStream']} */ + function sliceStream(token) { + return sliceChunks(chunks, token) + } + + /** @type {TokenizeContext['now']} */ + function now() { + // This is a hot path, so we clone manually instead of `Object.assign({}, point)` + const {line, column, offset, _index, _bufferIndex} = point + return { + line, + column, + offset, + _index, + _bufferIndex + } + } + + /** @type {TokenizeContext['defineSkip']} */ + function defineSkip(value) { + columnStart[value.line] = value.column + accountForPotentialSkip() + } + + // + // State management. + // + + /** + * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by + * `consume`). + * Here is where we walk through the chunks, which either include strings of + * several characters, or numerical character codes. + * The reason to do this in a loop instead of a call is so the stack can + * drain. + * + * @returns {void} + */ + function main() { + /** @type {number} */ + let chunkIndex + while (point._index < chunks.length) { + const chunk = chunks[point._index] + + // If we’re in a buffer chunk, loop through it. + if (typeof chunk === 'string') { + chunkIndex = point._index + if (point._bufferIndex < 0) { + point._bufferIndex = 0 + } + while ( + point._index === chunkIndex && + point._bufferIndex < chunk.length + ) { + go(chunk.charCodeAt(point._bufferIndex)) + } + } else { + go(chunk) + } + } + } + + /** + * Deal with one code. + * + * @param {Code} code + * @returns {void} + */ + function go(code) { + consumed = undefined + expectedCode = code + state = state(code) + } + + /** @type {Effects['consume']} */ + function consume(code) { + if (markdownLineEnding(code)) { + point.line++ + point.column = 1 + point.offset += code === -3 ? 2 : 1 + accountForPotentialSkip() + } else if (code !== -1) { + point.column++ + point.offset++ + } + + // Not in a string chunk. + if (point._bufferIndex < 0) { + point._index++ + } else { + point._bufferIndex++ + + // At end of string chunk. + // @ts-expect-error Points w/ non-negative `_bufferIndex` reference + // strings. + if (point._bufferIndex === chunks[point._index].length) { + point._bufferIndex = -1 + point._index++ + } + } + + // Expose the previous character. + context.previous = code + + // Mark as consumed. + consumed = true + } + + /** @type {Effects['enter']} */ + function enter(type, fields) { + /** @type {Token} */ + // @ts-expect-error Patch instead of assign required fields to help GC. + const token = fields || {} + token.type = type + token.start = now() + context.events.push(['enter', token, context]) + stack.push(token) + return token + } + + /** @type {Effects['exit']} */ + function exit(type) { + const token = stack.pop() + token.end = now() + context.events.push(['exit', token, context]) + return token + } + + /** + * Use results. + * + * @type {ReturnHandle} + */ + function onsuccessfulconstruct(construct, info) { + addResult(construct, info.from) + } + + /** + * Discard results. + * + * @type {ReturnHandle} + */ + function onsuccessfulcheck(_, info) { + info.restore() + } + + /** + * Factory to attempt/check/interrupt. + * + * @param {ReturnHandle} onreturn + * @param {{interrupt?: boolean | undefined} | undefined} [fields] + */ + function constructFactory(onreturn, fields) { + return hook + + /** + * Handle either an object mapping codes to constructs, a list of + * constructs, or a single construct. + * + * @param {Array | Construct | ConstructRecord} constructs + * @param {State} returnState + * @param {State | undefined} [bogusState] + * @returns {State} + */ + function hook(constructs, returnState, bogusState) { + /** @type {Array} */ + let listOfConstructs + /** @type {number} */ + let constructIndex + /** @type {Construct} */ + let currentConstruct + /** @type {Info} */ + let info + return Array.isArray(constructs) /* c8 ignore next 1 */ + ? handleListOfConstructs(constructs) + : 'tokenize' in constructs + ? // @ts-expect-error Looks like a construct. + handleListOfConstructs([constructs]) + : handleMapOfConstructs(constructs) + + /** + * Handle a list of construct. + * + * @param {ConstructRecord} map + * @returns {State} + */ + function handleMapOfConstructs(map) { + return start + + /** @type {State} */ + function start(code) { + const def = code !== null && map[code] + const all = code !== null && map.null + const list = [ + // To do: add more extension tests. + /* c8 ignore next 2 */ + ...(Array.isArray(def) ? def : def ? [def] : []), + ...(Array.isArray(all) ? all : all ? [all] : []) + ] + return handleListOfConstructs(list)(code) + } + } + + /** + * Handle a list of construct. + * + * @param {Array} list + * @returns {State} + */ + function handleListOfConstructs(list) { + listOfConstructs = list + constructIndex = 0 + if (list.length === 0) { + return bogusState + } + return handleConstruct(list[constructIndex]) + } + + /** + * Handle a single construct. + * + * @param {Construct} construct + * @returns {State} + */ + function handleConstruct(construct) { + return start + + /** @type {State} */ + function start(code) { + // To do: not needed to store if there is no bogus state, probably? + // Currently doesn’t work because `inspect` in document does a check + // w/o a bogus, which doesn’t make sense. But it does seem to help perf + // by not storing. + info = store() + currentConstruct = construct + if (!construct.partial) { + context.currentConstruct = construct + } + + // Always populated by defaults. + + if ( + construct.name && + context.parser.constructs.disable.null.includes(construct.name) + ) { + return nok(code) + } + return construct.tokenize.call( + // If we do have fields, create an object w/ `context` as its + // prototype. + // This allows a “live binding”, which is needed for `interrupt`. + fields ? Object.assign(Object.create(context), fields) : context, + effects, + ok, + nok + )(code) + } + } + + /** @type {State} */ + function ok(code) { + consumed = true + onreturn(currentConstruct, info) + return returnState + } + + /** @type {State} */ + function nok(code) { + consumed = true + info.restore() + if (++constructIndex < listOfConstructs.length) { + return handleConstruct(listOfConstructs[constructIndex]) + } + return bogusState + } + } + } + + /** + * @param {Construct} construct + * @param {number} from + * @returns {void} + */ + function addResult(construct, from) { + if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { + resolveAllConstructs.push(construct) + } + if (construct.resolve) { + splice( + context.events, + from, + context.events.length - from, + construct.resolve(context.events.slice(from), context) + ) + } + if (construct.resolveTo) { + context.events = construct.resolveTo(context.events, context) + } + } + + /** + * Store state. + * + * @returns {Info} + */ + function store() { + const startPoint = now() + const startPrevious = context.previous + const startCurrentConstruct = context.currentConstruct + const startEventsIndex = context.events.length + const startStack = Array.from(stack) + return { + restore, + from: startEventsIndex + } + + /** + * Restore state. + * + * @returns {void} + */ + function restore() { + point = startPoint + context.previous = startPrevious + context.currentConstruct = startCurrentConstruct + context.events.length = startEventsIndex + stack = startStack + accountForPotentialSkip() + } + } + + /** + * Move the current point a bit forward in the line when it’s on a column + * skip. + * + * @returns {void} + */ + function accountForPotentialSkip() { + if (point.line in columnStart && point.column < 2) { + point.column = columnStart[point.line] + point.offset += columnStart[point.line] - 1 + } + } +} + +/** + * Get the chunks from a slice of chunks in the range of a token. + * + * @param {Array} chunks + * @param {Pick} token + * @returns {Array} + */ +function sliceChunks(chunks, token) { + const startIndex = token.start._index + const startBufferIndex = token.start._bufferIndex + const endIndex = token.end._index + const endBufferIndex = token.end._bufferIndex + /** @type {Array} */ + let view + if (startIndex === endIndex) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] + } else { + view = chunks.slice(startIndex, endIndex) + if (startBufferIndex > -1) { + const head = view[0] + if (typeof head === 'string') { + view[0] = head.slice(startBufferIndex) + } else { + view.shift() + } + } + if (endBufferIndex > 0) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view.push(chunks[endIndex].slice(0, endBufferIndex)) + } + } + return view +} + +/** + * Get the string value of a slice of chunks. + * + * @param {Array} chunks + * @param {boolean | undefined} [expandTabs=false] + * @returns {string} + */ +function serializeChunks(chunks, expandTabs) { + let index = -1 + /** @type {Array} */ + const result = [] + /** @type {boolean | undefined} */ + let atTab + while (++index < chunks.length) { + const chunk = chunks[index] + /** @type {string} */ + let value + if (typeof chunk === 'string') { + value = chunk + } else + switch (chunk) { + case -5: { + value = '\r' + break + } + case -4: { + value = '\n' + break + } + case -3: { + value = '\r' + '\n' + break + } + case -2: { + value = expandTabs ? ' ' : '\t' + break + } + case -1: { + if (!expandTabs && atTab) continue + value = ' ' + break + } + default: { + // Currently only replacement character. + value = String.fromCharCode(chunk) + } + } + atTab = chunk === -2 + result.push(value) + } + return result.join('') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const thematicBreak = { + name: 'thematicBreak', + tokenize: tokenizeThematicBreak +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeThematicBreak(effects, ok, nok) { + let size = 0 + /** @type {NonNullable} */ + let marker + return start + + /** + * Start of thematic break. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('thematicBreak') + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * After optional whitespace, at marker. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + marker = code + return atBreak(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.enter('thematicBreakSequence') + return sequence(code) + } + if (size >= 3 && (code === null || markdownLineEnding(code))) { + effects.exit('thematicBreak') + return ok(code) + } + return nok(code) + } + + /** + * In sequence. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function sequence(code) { + if (code === marker) { + effects.consume(code) + size++ + return sequence + } + effects.exit('thematicBreakSequence') + return markdownSpace(code) + ? factorySpace(effects, atBreak, 'whitespace')(code) + : atBreak(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + +/** @type {Construct} */ +const list = { + name: 'list', + tokenize: tokenizeListStart, + continuation: { + tokenize: tokenizeListContinuation + }, + exit: tokenizeListEnd +} + +/** @type {Construct} */ +const listItemPrefixWhitespaceConstruct = { + tokenize: tokenizeListItemPrefixWhitespace, + partial: true +} + +/** @type {Construct} */ +const indentConstruct = { + tokenize: tokenizeIndent, + partial: true +} + +// To do: `markdown-rs` parses list items on their own and later stitches them +// together. + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListStart(effects, ok, nok) { + const self = this + const tail = self.events[self.events.length - 1] + let initialSize = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + let size = 0 + return start + + /** @type {State} */ + function start(code) { + const kind = + self.containerState.type || + (code === 42 || code === 43 || code === 45 + ? 'listUnordered' + : 'listOrdered') + if ( + kind === 'listUnordered' + ? !self.containerState.marker || code === self.containerState.marker + : asciiDigit(code) + ) { + if (!self.containerState.type) { + self.containerState.type = kind + effects.enter(kind, { + _container: true + }) + } + if (kind === 'listUnordered') { + effects.enter('listItemPrefix') + return code === 42 || code === 45 + ? effects.check(thematicBreak, nok, atMarker)(code) + : atMarker(code) + } + if (!self.interrupt || code === 49) { + effects.enter('listItemPrefix') + effects.enter('listItemValue') + return inside(code) + } + } + return nok(code) + } + + /** @type {State} */ + function inside(code) { + if (asciiDigit(code) && ++size < 10) { + effects.consume(code) + return inside + } + if ( + (!self.interrupt || size < 2) && + (self.containerState.marker + ? code === self.containerState.marker + : code === 41 || code === 46) + ) { + effects.exit('listItemValue') + return atMarker(code) + } + return nok(code) + } + + /** + * @type {State} + **/ + function atMarker(code) { + effects.enter('listItemMarker') + effects.consume(code) + effects.exit('listItemMarker') + self.containerState.marker = self.containerState.marker || code + return effects.check( + blankLine, + // Can’t be empty when interrupting. + self.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ) + } + + /** @type {State} */ + function onBlank(code) { + self.containerState.initialBlankLine = true + initialSize++ + return endOfPrefix(code) + } + + /** @type {State} */ + function otherPrefix(code) { + if (markdownSpace(code)) { + effects.enter('listItemPrefixWhitespace') + effects.consume(code) + effects.exit('listItemPrefixWhitespace') + return endOfPrefix + } + return nok(code) + } + + /** @type {State} */ + function endOfPrefix(code) { + self.containerState.size = + initialSize + + self.sliceSerialize(effects.exit('listItemPrefix'), true).length + return ok(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListContinuation(effects, ok, nok) { + const self = this + self.containerState._closeFlow = undefined + return effects.check(blankLine, onBlank, notBlank) + + /** @type {State} */ + function onBlank(code) { + self.containerState.furtherBlankLines = + self.containerState.furtherBlankLines || + self.containerState.initialBlankLine + + // We have a blank line. + // Still, try to consume at most the items size. + return factorySpace( + effects, + ok, + 'listItemIndent', + self.containerState.size + 1 + )(code) + } + + /** @type {State} */ + function notBlank(code) { + if (self.containerState.furtherBlankLines || !markdownSpace(code)) { + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return notInCurrentItem(code) + } + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) + } + + /** @type {State} */ + function notInCurrentItem(code) { + // While we do continue, we signal that the flow should be closed. + self.containerState._closeFlow = true + // As we’re closing flow, we’re no longer interrupting. + self.interrupt = undefined + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(list, ok, nok), + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeIndent(effects, ok, nok) { + const self = this + return factorySpace( + effects, + afterPrefix, + 'listItemIndent', + self.containerState.size + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'listItemIndent' && + tail[2].sliceSerialize(tail[1], true).length === self.containerState.size + ? ok(code) + : nok(code) + } +} + +/** + * @type {Exiter} + * @this {TokenizeContext} + */ +function tokenizeListEnd(effects) { + effects.exit(this.containerState.type) +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListItemPrefixWhitespace(effects, ok, nok) { + const self = this + + // Always populated by defaults. + + return factorySpace( + effects, + afterPrefix, + 'listItemPrefixWhitespace', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return !markdownSpace(code) && + tail && + tail[1].type === 'listItemPrefixWhitespace' + ? ok(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blockQuote = { + name: 'blockQuote', + tokenize: tokenizeBlockQuoteStart, + continuation: { + tokenize: tokenizeBlockQuoteContinuation + }, + exit +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteStart(effects, ok, nok) { + const self = this + return start + + /** + * Start of block quote. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 62) { + const state = self.containerState + if (!state.open) { + effects.enter('blockQuote', { + _container: true + }) + state.open = true + } + effects.enter('blockQuotePrefix') + effects.enter('blockQuoteMarker') + effects.consume(code) + effects.exit('blockQuoteMarker') + return after + } + return nok(code) + } + + /** + * After `>`, before optional whitespace. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownSpace(code)) { + effects.enter('blockQuotePrefixWhitespace') + effects.consume(code) + effects.exit('blockQuotePrefixWhitespace') + effects.exit('blockQuotePrefix') + return ok + } + effects.exit('blockQuotePrefix') + return ok(code) + } +} + +/** + * Start of block quote continuation. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteContinuation(effects, ok, nok) { + const self = this + return contStart + + /** + * Start of block quote continuation. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contStart(code) { + if (markdownSpace(code)) { + // Always populated by defaults. + + return factorySpace( + effects, + contBefore, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } + return contBefore(code) + } + + /** + * At `>`, after optional whitespace. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contBefore(code) { + return effects.attempt(blockQuote, ok, nok)(code) + } +} + +/** @type {Exiter} */ +function exit(effects) { + effects.exit('blockQuote') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse destinations. + * + * ###### Examples + * + * ```markdown + * + * b> + * + * + * a + * a\)b + * a(b)c + * a(b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type for whole (`` or `b`). + * @param {TokenType} literalType + * Type when enclosed (``). + * @param {TokenType} literalMarkerType + * Type for enclosing (`<` and `>`). + * @param {TokenType} rawType + * Type when not enclosed (`b`). + * @param {TokenType} stringType + * Type for the value (`a` or `b`). + * @param {number | undefined} [max=Infinity] + * Depth of nested parens (inclusive). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryDestination( + effects, + ok, + nok, + type, + literalType, + literalMarkerType, + rawType, + stringType, + max +) { + const limit = max || Number.POSITIVE_INFINITY + let balance = 0 + return start + + /** + * Start of destination. + * + * ```markdown + * > | + * ^ + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 60) { + effects.enter(type) + effects.enter(literalType) + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + return enclosedBefore + } + + // ASCII control, space, closing paren. + if (code === null || code === 32 || code === 41 || asciiControl(code)) { + return nok(code) + } + effects.enter(type) + effects.enter(rawType) + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return raw(code) + } + + /** + * After `<`, at an enclosed destination. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function enclosedBefore(code) { + if (code === 62) { + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + effects.exit(literalType) + effects.exit(type) + return ok + } + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return enclosed(code) + } + + /** + * In enclosed destination. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function enclosed(code) { + if (code === 62) { + effects.exit('chunkString') + effects.exit(stringType) + return enclosedBefore(code) + } + if (code === null || code === 60 || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? enclosedEscape : enclosed + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function enclosedEscape(code) { + if (code === 60 || code === 62 || code === 92) { + effects.consume(code) + return enclosed + } + return enclosed(code) + } + + /** + * In raw destination. + * + * ```markdown + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function raw(code) { + if ( + !balance && + (code === null || code === 41 || markdownLineEndingOrSpace(code)) + ) { + effects.exit('chunkString') + effects.exit(stringType) + effects.exit(rawType) + effects.exit(type) + return ok(code) + } + if (balance < limit && code === 40) { + effects.consume(code) + balance++ + return raw + } + if (code === 41) { + effects.consume(code) + balance-- + return raw + } + + // ASCII control (but *not* `\0`) and space and `(`. + // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it + // doesn’t. + if (code === null || code === 32 || code === 40 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? rawEscape : raw + } + + /** + * After `\`, at special character. + * + * ```markdown + * > | a\*a + * ^ + * ``` + * + * @type {State} + */ + function rawEscape(code) { + if (code === 40 || code === 41 || code === 92) { + effects.consume(code) + return raw + } + return raw(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse labels. + * + * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. + * + * ###### Examples + * + * ```markdown + * [a] + * [a + * b] + * [a\]b] + * ``` + * + * @this {TokenizeContext} + * Tokenize context. + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole label (`[a]`). + * @param {TokenType} markerType + * Type for the markers (`[` and `]`). + * @param {TokenType} stringType + * Type for the identifier (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryLabel(effects, ok, nok, type, markerType, stringType) { + const self = this + let size = 0 + /** @type {boolean} */ + let seen + return start + + /** + * Start of label. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.enter(stringType) + return atBreak + } + + /** + * In label, at something, before something else. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if ( + size > 999 || + code === null || + code === 91 || + (code === 93 && !seen) || + // To do: remove in the future once we’ve switched from + // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + // which doesn’t need this. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + (code === 94 && + !size && + '_hiddenFootnoteSupport' in self.parser.constructs) + ) { + return nok(code) + } + if (code === 93) { + effects.exit(stringType) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + + // To do: indent? Link chunks and EOLs together? + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return atBreak + } + effects.enter('chunkString', { + contentType: 'string' + }) + return labelInside(code) + } + + /** + * In label, in text. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function labelInside(code) { + if ( + code === null || + code === 91 || + code === 93 || + markdownLineEnding(code) || + size++ > 999 + ) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + if (!seen) seen = !markdownSpace(code) + return code === 92 ? labelEscape : labelInside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | [a\*a] + * ^ + * ``` + * + * @type {State} + */ + function labelEscape(code) { + if (code === 91 || code === 92 || code === 93) { + effects.consume(code) + size++ + return labelInside + } + return labelInside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +/** + * Parse titles. + * + * ###### Examples + * + * ```markdown + * "a" + * 'b' + * (c) + * "a + * b" + * 'a + * b' + * (a\)b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole title (`"a"`, `'b'`, `(c)`). + * @param {TokenType} markerType + * Type for the markers (`"`, `'`, `(`, and `)`). + * @param {TokenType} stringType + * Type for the value (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryTitle(effects, ok, nok, type, markerType, stringType) { + /** @type {NonNullable} */ + let marker + return start + + /** + * Start of title. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 34 || code === 39 || code === 40) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + marker = code === 40 ? 41 : code + return begin + } + return nok(code) + } + + /** + * After opening marker. + * + * This is also used at the closing marker. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function begin(code) { + if (code === marker) { + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + effects.enter(stringType) + return atBreak(code) + } + + /** + * At something, before something else. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.exit(stringType) + return begin(marker) + } + if (code === null) { + return nok(code) + } + + // Note: blank lines can’t exist in content. + if (markdownLineEnding(code)) { + // To do: use `space_or_tab_eol_with_options`, connect. + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, atBreak, 'linePrefix') + } + effects.enter('chunkString', { + contentType: 'string' + }) + return inside(code) + } + + /** + * + * + * @type {State} + */ + function inside(code) { + if (code === marker || code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + return code === 92 ? escape : inside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | "a\*b" + * ^ + * ``` + * + * @type {State} + */ + function escape(code) { + if (code === marker || code === 92) { + effects.consume(code) + return inside + } + return inside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + */ + + + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * line endings or spaces in markdown are often optional, in which case this + * factory can be used and `ok` will be switched to whether spaces were found + * or not + * * one line ending or space can be detected with + * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @returns + * Start state. + */ +function factoryWhitespace(effects, ok) { + /** @type {boolean} */ + let seen + return start + + /** @type {State} */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + seen = true + return start + } + if (markdownSpace(code)) { + return factorySpace( + effects, + start, + seen ? 'linePrefix' : 'lineSuffix' + )(code) + } + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js +/** + * Normalize an identifier (as found in references, definitions). + * + * Collapses markdown whitespace, trim, and then lower- and uppercase. + * + * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their + * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different + * uppercase character (U+0398 (`Θ`)). + * So, to get a canonical form, we perform both lower- and uppercase. + * + * Using uppercase last makes sure keys will never interact with default + * prototypal values (such as `constructor`): nothing in the prototype of + * `Object` is uppercase. + * + * @param {string} value + * Identifier to normalize. + * @returns {string} + * Normalized identifier. + */ +function normalizeIdentifier(value) { + return ( + value + // Collapse markdown whitespace. + .replace(/[\t\n\r ]+/g, ' ') + // Trim. + .replace(/^ | $/g, '') + // Some characters are considered “uppercase”, but if their lowercase + // counterpart is uppercased will result in a different uppercase + // character. + // Hence, to get that form, we perform both lower- and uppercase. + // Upper case makes sure keys will not interact with default prototypal + // methods: no method is uppercase. + .toLowerCase() + .toUpperCase() + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + +/** @type {Construct} */ +const definition = { + name: 'definition', + tokenize: tokenizeDefinition +} + +/** @type {Construct} */ +const titleBefore = { + tokenize: tokenizeTitleBefore, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeDefinition(effects, ok, nok) { + const self = this + /** @type {string} */ + let identifier + return start + + /** + * At start of a definition. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Do not interrupt paragraphs (but do follow definitions). + // To do: do `interrupt` the way `markdown-rs` does. + // To do: parse whitespace the way `markdown-rs` does. + effects.enter('definition') + return before(code) + } + + /** + * After optional whitespace, at `[`. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + // To do: parse whitespace the way `markdown-rs` does. + + return factoryLabel.call( + self, + effects, + labelAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionLabel', + 'definitionLabelMarker', + 'definitionLabelString' + )(code) + } + + /** + * After label. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function labelAfter(code) { + identifier = normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + if (code === 58) { + effects.enter('definitionMarker') + effects.consume(code) + effects.exit('definitionMarker') + return markerAfter + } + return nok(code) + } + + /** + * After marker. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function markerAfter(code) { + // Note: whitespace is optional. + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, destinationBefore)(code) + : destinationBefore(code) + } + + /** + * Before destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationBefore(code) { + return factoryDestination( + effects, + destinationAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionDestination', + 'definitionDestinationLiteral', + 'definitionDestinationLiteralMarker', + 'definitionDestinationRaw', + 'definitionDestinationString' + )(code) + } + + /** + * After destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationAfter(code) { + return effects.attempt(titleBefore, after, after)(code) + } + + /** + * After definition. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return markdownSpace(code) + ? factorySpace(effects, afterWhitespace, 'whitespace')(code) + : afterWhitespace(code) + } + + /** + * After definition, after optional whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function afterWhitespace(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('definition') + + // Note: we don’t care about uniqueness. + // It’s likely that that doesn’t happen very frequently. + // It is more likely that it wastes precious time. + self.parser.defined.push(identifier) + + // To do: `markdown-rs` interrupt. + // // You’d be interrupting. + // tokenizer.interrupt = true + return ok(code) + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeTitleBefore(effects, ok, nok) { + return titleBefore + + /** + * After destination, at whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, beforeMarker)(code) + : nok(code) + } + + /** + * At title. + * + * ```markdown + * | [a]: b + * > | "c" + * ^ + * ``` + * + * @type {State} + */ + function beforeMarker(code) { + return factoryTitle( + effects, + titleAfter, + nok, + 'definitionTitle', + 'definitionTitleMarker', + 'definitionTitleString' + )(code) + } + + /** + * After title. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfter(code) { + return markdownSpace(code) + ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) + : titleAfterOptionalWhitespace(code) + } + + /** + * After title, after optional whitespace. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfterOptionalWhitespace(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const codeIndented = { + name: 'codeIndented', + tokenize: tokenizeCodeIndented +} + +/** @type {Construct} */ +const furtherStart = { + tokenize: tokenizeFurtherStart, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeIndented(effects, ok, nok) { + const self = this + return start + + /** + * Start of code (indented). + * + * > **Parsing note**: it is not needed to check if this first line is a + * > filled line (that it has a non-whitespace character), because blank lines + * > are parsed already, so we never run into that. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: manually check if interrupting like `markdown-rs`. + + effects.enter('codeIndented') + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? atBreak(code) + : nok(code) + } + + /** + * At a break. + * + * ```markdown + * > | aaa + * ^ ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === null) { + return after(code) + } + if (markdownLineEnding(code)) { + return effects.attempt(furtherStart, atBreak, after)(code) + } + effects.enter('codeFlowValue') + return inside(code) + } + + /** + * In code content. + * + * ```markdown + * > | aaa + * ^^^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return atBreak(code) + } + effects.consume(code) + return inside + } + + /** @type {State} */ + function after(code) { + effects.exit('codeIndented') + // To do: allow interrupting like `markdown-rs`. + // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeFurtherStart(effects, ok, nok) { + const self = this + return furtherStart + + /** + * At eol, trying to parse another indent. + * + * ```markdown + * > | aaa + * ^ + * | bbb + * ``` + * + * @type {State} + */ + function furtherStart(code) { + // To do: improve `lazy` / `pierce` handling. + // If this is a lazy line, it can’t be code. + if (self.parser.lazy[self.now().line]) { + return nok(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return furtherStart + } + + // To do: the code here in `micromark-js` is a bit different from + // `markdown-rs` because there it can attempt spaces. + // We can’t yet. + // + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? ok(code) + : markdownLineEnding(code) + ? furtherStart(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const headingAtx = { + name: 'headingAtx', + tokenize: tokenizeHeadingAtx, + resolve: resolveHeadingAtx +} + +/** @type {Resolver} */ +function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2 + let contentStart = 3 + /** @type {Token} */ + let content + /** @type {Token} */ + let text + + // Prefix whitespace, part of the opening. + if (events[contentStart][1].type === 'whitespace') { + contentStart += 2 + } + + // Suffix whitespace, part of the closing. + if ( + contentEnd - 2 > contentStart && + events[contentEnd][1].type === 'whitespace' + ) { + contentEnd -= 2 + } + if ( + events[contentEnd][1].type === 'atxHeadingSequence' && + (contentStart === contentEnd - 1 || + (contentEnd - 4 > contentStart && + events[contentEnd - 2][1].type === 'whitespace')) + ) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 + } + if (contentEnd > contentStart) { + content = { + type: 'atxHeadingText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end + } + text = { + type: 'chunkText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + contentType: 'text' + } + splice(events, contentStart, contentEnd - contentStart + 1, [ + ['enter', content, context], + ['enter', text, context], + ['exit', text, context], + ['exit', content, context] + ]) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHeadingAtx(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of a heading (atx). + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + effects.enter('atxHeading') + return before(code) + } + + /** + * After optional whitespace, at `#`. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('atxHeadingSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 35 && size++ < 6) { + effects.consume(code) + return sequenceOpen + } + + // Always at least one `#`. + if (code === null || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingSequence') + return atBreak(code) + } + return nok(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === 35) { + effects.enter('atxHeadingSequence') + return sequenceFurther(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('atxHeading') + // To do: interrupt like `markdown-rs`. + // // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } + if (markdownSpace(code)) { + return factorySpace(effects, atBreak, 'whitespace')(code) + } + + // To do: generate `data` tokens, add the `text` token later. + // Needs edit map, see: `markdown.rs`. + effects.enter('atxHeadingText') + return data(code) + } + + /** + * In further sequence (after whitespace). + * + * Could be normal “visible” hashes in the heading or a final sequence. + * + * ```markdown + * > | ## aa ## + * ^ + * ``` + * + * @type {State} + */ + function sequenceFurther(code) { + if (code === 35) { + effects.consume(code) + return sequenceFurther + } + effects.exit('atxHeadingSequence') + return atBreak(code) + } + + /** + * In text. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingText') + return atBreak(code) + } + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const setextUnderline = { + name: 'setextUnderline', + tokenize: tokenizeSetextUnderline, + resolveTo: resolveToSetextUnderline +} + +/** @type {Resolver} */ +function resolveToSetextUnderline(events, context) { + // To do: resolve like `markdown-rs`. + let index = events.length + /** @type {number | undefined} */ + let content + /** @type {number | undefined} */ + let text + /** @type {number | undefined} */ + let definition + + // Find the opening of the content. + // It’ll always exist: we don’t tokenize if it isn’t there. + while (index--) { + if (events[index][0] === 'enter') { + if (events[index][1].type === 'content') { + content = index + break + } + if (events[index][1].type === 'paragraph') { + text = index + } + } + // Exit + else { + if (events[index][1].type === 'content') { + // Remove the content end (if needed we’ll add it later) + events.splice(index, 1) + } + if (!definition && events[index][1].type === 'definition') { + definition = index + } + } + } + const heading = { + type: 'setextHeading', + start: Object.assign({}, events[text][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + + // Change the paragraph to setext heading text. + events[text][1].type = 'setextHeadingText' + + // If we have definitions in the content, we’ll keep on having content, + // but we need move it. + if (definition) { + events.splice(text, 0, ['enter', heading, context]) + events.splice(definition + 1, 0, ['exit', events[content][1], context]) + events[content][1].end = Object.assign({}, events[definition][1].end) + } else { + events[content][1] = heading + } + + // Add the heading exit at the end. + events.push(['exit', heading, context]) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeSetextUnderline(effects, ok, nok) { + const self = this + /** @type {NonNullable} */ + let marker + return start + + /** + * At start of heading (setext) underline. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + let index = self.events.length + /** @type {boolean | undefined} */ + let paragraph + // Find an opening. + while (index--) { + // Skip enter/exit of line ending, line prefix, and content. + // We can now either have a definition or a paragraph. + if ( + self.events[index][1].type !== 'lineEnding' && + self.events[index][1].type !== 'linePrefix' && + self.events[index][1].type !== 'content' + ) { + paragraph = self.events[index][1].type === 'paragraph' + break + } + } + + // To do: handle lazy/pierce like `markdown-rs`. + // To do: parse indent like `markdown-rs`. + if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { + effects.enter('setextHeadingLine') + marker = code + return before(code) + } + return nok(code) + } + + /** + * After optional whitespace, at `-` or `=`. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('setextHeadingLineSequence') + return inside(code) + } + + /** + * In sequence. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + effects.exit('setextHeadingLineSequence') + return markdownSpace(code) + ? factorySpace(effects, after, 'lineSuffix')(code) + : after(code) + } + + /** + * After sequence, after optional whitespace. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('setextHeadingLine') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js +/** + * List of lowercase HTML “block” tag names. + * + * The list, when parsing HTML (flow), results in more relaxed rules (condition + * 6). + * Because they are known blocks, the HTML-like syntax doesn’t have to be + * strictly parsed. + * For tag names not in this list, a more strict algorithm (condition 7) is used + * to detect whether the HTML-like syntax is seen as HTML (flow) or not. + * + * This is copied from: + * . + * + * > 👉 **Note**: `search` was added in `CommonMark@0.31`. + */ +const htmlBlockNames = [ + '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' +] + +/** + * List of lowercase HTML “raw” tag names. + * + * The list, when parsing HTML (flow), results in HTML that can include lines + * without exiting, until a closing tag also in this list is found (condition + * 1). + * + * This module is copied from: + * . + * + * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. + */ +const htmlRawNames = ['pre', 'script', 'style', 'textarea'] + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + +/** @type {Construct} */ +const htmlFlow = { + name: 'htmlFlow', + tokenize: tokenizeHtmlFlow, + resolveTo: resolveToHtmlFlow, + concrete: true +} + +/** @type {Construct} */ +const blankLineBefore = { + tokenize: tokenizeBlankLineBefore, + partial: true +} +const nonLazyContinuationStart = { + tokenize: tokenizeNonLazyContinuationStart, + partial: true +} + +/** @type {Resolver} */ +function resolveToHtmlFlow(events) { + let index = events.length + while (index--) { + if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { + break + } + } + if (index > 1 && events[index - 2][1].type === 'linePrefix') { + // Add the prefix start to the HTML token. + events[index][1].start = events[index - 2][1].start + // Add the prefix start to the HTML line token. + events[index + 1][1].start = events[index - 2][1].start + // Remove the line prefix. + events.splice(index - 2, 2) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlFlow(effects, ok, nok) { + const self = this + /** @type {number} */ + let marker + /** @type {boolean} */ + let closingTag + /** @type {string} */ + let buffer + /** @type {number} */ + let index + /** @type {Code} */ + let markerB + return start + + /** + * Start of HTML (flow). + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * At `<`, after optional whitespace. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('htmlFlow') + effects.enter('htmlFlowData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * > | + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + closingTag = true + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + marker = 3 + // To do: + // tokenizer.concrete = true + // To do: use `markdown-rs` style interrupt. + // While we’re in an instruction instead of a declaration, we’re on a `?` + // right now, so we do need to search for `>`, similar to declarations. + return self.interrupt ? ok : continuationDeclarationInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After ` | + * ^ + * > | + * ^ + * > | &<]]> + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + marker = 2 + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + marker = 5 + index = 0 + return cdataOpenInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + marker = 4 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After ` | + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After ` | &<]]> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + if (index === value.length) { + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return cdataOpenInside + } + return nok(code) + } + + /** + * After ` | + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * In tag name. + * + * ```markdown + * > | + * ^^ + * > | + * ^^ + * ``` + * + * @type {State} + */ + function tagName(code) { + if ( + code === null || + code === 47 || + code === 62 || + markdownLineEndingOrSpace(code) + ) { + const slash = code === 47 + const name = buffer.toLowerCase() + if (!slash && !closingTag && htmlRawNames.includes(name)) { + marker = 1 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + if (htmlBlockNames.includes(buffer.toLowerCase())) { + marker = 6 + if (slash) { + effects.consume(code) + return basicSelfClosing + } + + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + marker = 7 + // Do not support complete HTML when interrupting. + return self.interrupt && !self.parser.lazy[self.now().line] + ? nok(code) + : closingTag + ? completeClosingTagAfter(code) + : completeAttributeNameBefore(code) + } + + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + buffer += String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After closing slash of a basic tag name. + * + * ```markdown + * > |
+ * ^ + * ``` + * + * @type {State} + */ + function basicSelfClosing(code) { + if (code === 62) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return nok(code) + } + + /** + * After closing slash of a complete tag name. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeClosingTagAfter(code) { + if (markdownSpace(code)) { + effects.consume(code) + return completeClosingTagAfter + } + return completeEnd(code) + } + + /** + * At an attribute name. + * + * At first, this state is used after a complete tag name, after whitespace, + * where it expects optional attributes or the end of the tag. + * It is also reused after attributes, when expecting more optional + * attributes. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * > | + * ^ + * > | + * ^ + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameBefore(code) { + if (code === 47) { + effects.consume(code) + return completeEnd + } + + // ASCII alphanumerical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return completeAttributeName + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameBefore + } + return completeEnd(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeName(code) { + // ASCII alphanumerical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return completeAttributeName + } + return completeAttributeNameAfter(code) + } + + /** + * After attribute name, at an optional initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return completeAttributeValueBefore + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameAfter + } + return completeAttributeNameBefore(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + markerB = code + return completeAttributeValueQuoted + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeValueBefore + } + return completeAttributeValueUnquoted(code) + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuoted(code) { + if (code === markerB) { + effects.consume(code) + markerB = null + return completeAttributeValueQuotedAfter + } + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return completeAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 47 || + code === 60 || + code === 61 || + code === 62 || + code === 96 || + markdownLineEndingOrSpace(code) + ) { + return completeAttributeNameAfter(code) + } + effects.consume(code) + return completeAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the + * end of the tag. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownSpace(code)) { + return completeAttributeNameBefore(code) + } + return nok(code) + } + + /** + * In certain circumstances of a complete tag where only an `>` is allowed. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeEnd(code) { + if (code === 62) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * After `>` in a complete tag. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function completeAfter(code) { + if (code === null || markdownLineEnding(code)) { + // // Do not form containers. + // tokenizer.concrete = true + return continuation(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * In continuation of any HTML kind. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function continuation(code) { + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationCommentInside + } + if (code === 60 && marker === 1) { + effects.consume(code) + return continuationRawTagOpen + } + if (code === 62 && marker === 4) { + effects.consume(code) + return continuationClose + } + if (code === 63 && marker === 3) { + effects.consume(code) + return continuationDeclarationInside + } + if (code === 93 && marker === 5) { + effects.consume(code) + return continuationCdataInside + } + if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { + effects.exit('htmlFlowData') + return effects.check( + blankLineBefore, + continuationAfter, + continuationStart + )(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationStart(code) + } + effects.consume(code) + return continuation + } + + /** + * In continuation, at eol. + * + * ```markdown + * > | + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStart(code) { + return effects.check( + nonLazyContinuationStart, + continuationStartNonLazy, + continuationAfter + )(code) + } + + /** + * In continuation, at eol, before non-lazy content. + * + * ```markdown + * > | + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStartNonLazy(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return continuationBefore + } + + /** + * In continuation, before non-lazy content. + * + * ```markdown + * | + * > | asd + * ^ + * ``` + * + * @type {State} + */ + function continuationBefore(code) { + if (code === null || markdownLineEnding(code)) { + return continuationStart(code) + } + effects.enter('htmlFlowData') + return continuation(code) + } + + /** + * In comment continuation, after one `-`, expecting another. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function continuationCommentInside(code) { + if (code === 45) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In raw continuation, after `<`, at `/`. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function continuationRawTagOpen(code) { + if (code === 47) { + effects.consume(code) + buffer = '' + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In raw continuation, after ` | + * ^^^^^^ + * ``` + * + * @type {State} + */ + function continuationRawEndTag(code) { + if (code === 62) { + const name = buffer.toLowerCase() + if (htmlRawNames.includes(name)) { + effects.consume(code) + return continuationClose + } + return continuation(code) + } + if (asciiAlpha(code) && buffer.length < 8) { + effects.consume(code) + // @ts-expect-error: not null. + buffer += String.fromCharCode(code) + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In cdata continuation, after `]`, expecting `]>`. + * + * ```markdown + * > | &<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationCdataInside(code) { + if (code === 93) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In declaration or instruction continuation, at `>`. + * + * ```markdown + * > | + * ^ + * > | + * ^ + * > | + * ^ + * > | + * ^ + * > | &<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationDeclarationInside(code) { + if (code === 62) { + effects.consume(code) + return continuationClose + } + + // More dashes. + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In closed continuation: everything we get until the eol/eof is part of it. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function continuationClose(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationAfter(code) + } + effects.consume(code) + return continuationClose + } + + /** + * Done. + * + * ```markdown + * > | + * ^ + * ``` + * + * @type {State} + */ + function continuationAfter(code) { + effects.exit('htmlFlow') + // // Feel free to interrupt. + // tokenizer.interrupt = false + // // No longer concrete. + // tokenizer.concrete = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuationStart(effects, ok, nok) { + const self = this + return start + + /** + * At eol, before continuation. + * + * ```markdown + * > | * ```js + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return after + } + return nok(code) + } + + /** + * A continuation. + * + * ```markdown + * | * ```js + * > | b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLineBefore(effects, ok, nok) { + return start + + /** + * Before eol, expecting blank line. + * + * ```markdown + * > |
+ * ^ + * | + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return effects.attempt(blankLine, ok, nok) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const nonLazyContinuation = { + tokenize: tokenizeNonLazyContinuation, + partial: true +} + +/** @type {Construct} */ +const codeFenced = { + name: 'codeFenced', + tokenize: tokenizeCodeFenced, + concrete: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeFenced(effects, ok, nok) { + const self = this + /** @type {Construct} */ + const closeStart = { + tokenize: tokenizeCloseStart, + partial: true + } + let initialPrefix = 0 + let sizeOpen = 0 + /** @type {NonNullable} */ + let marker + return start + + /** + * Start of code. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse whitespace like `markdown-rs`. + return beforeSequenceOpen(code) + } + + /** + * In opening fence, after prefix, at sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeSequenceOpen(code) { + const tail = self.events[self.events.length - 1] + initialPrefix = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + marker = code + effects.enter('codeFenced') + effects.enter('codeFencedFence') + effects.enter('codeFencedFenceSequence') + return sequenceOpen(code) + } + + /** + * In opening fence sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === marker) { + sizeOpen++ + effects.consume(code) + return sequenceOpen + } + if (sizeOpen < 3) { + return nok(code) + } + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, infoBefore, 'whitespace')(code) + : infoBefore(code) + } + + /** + * In opening fence, after the sequence (and optional whitespace), before info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function infoBefore(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return self.interrupt + ? ok(code) + : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFencedFenceInfo') + effects.enter('chunkString', { + contentType: 'string' + }) + return info(code) + } + + /** + * In info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function info(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return infoBefore(code) + } + if (markdownSpace(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return factorySpace(effects, metaBefore, 'whitespace')(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return info + } + + /** + * In opening fence, after info and whitespace, before meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function metaBefore(code) { + if (code === null || markdownLineEnding(code)) { + return infoBefore(code) + } + effects.enter('codeFencedFenceMeta') + effects.enter('chunkString', { + contentType: 'string' + }) + return meta(code) + } + + /** + * In meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function meta(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceMeta') + return infoBefore(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return meta + } + + /** + * At eol/eof in code, before a non-lazy closing fence or content. + * + * ```markdown + * > | ~~~js + * ^ + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function atNonLazyBreak(code) { + return effects.attempt(closeStart, after, contentBefore)(code) + } + + /** + * Before code content, not a closing fence, at eol. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return contentStart + } + + /** + * Before code content, not a closing fence. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentStart(code) { + return initialPrefix > 0 && markdownSpace(code) + ? factorySpace( + effects, + beforeContentChunk, + 'linePrefix', + initialPrefix + 1 + )(code) + : beforeContentChunk(code) + } + + /** + * Before code content, after optional prefix. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeContentChunk(code) { + if (code === null || markdownLineEnding(code)) { + return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFlowValue') + return contentChunk(code) + } + + /** + * In code content. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^^^^^^^^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentChunk(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return beforeContentChunk(code) + } + effects.consume(code) + return contentChunk + } + + /** + * After code. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + effects.exit('codeFenced') + return ok(code) + } + + /** + * @this {TokenizeContext} + * @type {Tokenizer} + */ + function tokenizeCloseStart(effects, ok, nok) { + let size = 0 + return startBefore + + /** + * + * + * @type {State} + */ + function startBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return start + } + + /** + * Before closing fence, at optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Always populated by defaults. + + // To do: `enter` here or in next state? + effects.enter('codeFencedFence') + return markdownSpace(code) + ? factorySpace( + effects, + beforeSequenceClose, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : beforeSequenceClose(code) + } + + /** + * In closing fence, after optional whitespace, at sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function beforeSequenceClose(code) { + if (code === marker) { + effects.enter('codeFencedFenceSequence') + return sequenceClose(code) + } + return nok(code) + } + + /** + * In closing fence sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + if (code === marker) { + size++ + effects.consume(code) + return sequenceClose + } + if (size >= sizeOpen) { + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) + : sequenceCloseAfter(code) + } + return nok(code) + } + + /** + * After closing fence sequence, after optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceCloseAfter(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return ok(code) + } + return nok(code) + } + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuation(effects, ok, nok) { + const self = this + return start + + /** + * + * + * @type {State} + */ + function start(code) { + if (code === null) { + return nok(code) + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineStart + } + + /** + * + * + * @type {State} + */ + function lineStart(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/character-entities/index.js +/** + * Map of named character references. + * + * @type {Record} + */ +const characterEntities = { + AElig: 'Æ', + AMP: '&', + Aacute: 'Á', + Abreve: 'Ă', + Acirc: 'Â', + Acy: 'А', + Afr: '𝔄', + Agrave: 'À', + Alpha: 'Α', + Amacr: 'Ā', + And: '⩓', + Aogon: 'Ą', + Aopf: '𝔸', + ApplyFunction: '⁡', + Aring: 'Å', + Ascr: '𝒜', + Assign: '≔', + Atilde: 'Ã', + Auml: 'Ä', + Backslash: '∖', + Barv: '⫧', + Barwed: '⌆', + Bcy: 'Б', + Because: '∵', + Bernoullis: 'ℬ', + Beta: 'Β', + Bfr: '𝔅', + Bopf: '𝔹', + Breve: '˘', + Bscr: 'ℬ', + Bumpeq: '≎', + CHcy: 'Ч', + COPY: '©', + Cacute: 'Ć', + Cap: '⋒', + CapitalDifferentialD: 'ⅅ', + Cayleys: 'ℭ', + Ccaron: 'Č', + Ccedil: 'Ç', + Ccirc: 'Ĉ', + Cconint: '∰', + Cdot: 'Ċ', + Cedilla: '¸', + CenterDot: '·', + Cfr: 'ℭ', + Chi: 'Χ', + CircleDot: '⊙', + CircleMinus: '⊖', + CirclePlus: '⊕', + CircleTimes: '⊗', + ClockwiseContourIntegral: '∲', + CloseCurlyDoubleQuote: '”', + CloseCurlyQuote: '’', + Colon: '∷', + Colone: '⩴', + Congruent: '≡', + Conint: '∯', + ContourIntegral: '∮', + Copf: 'ℂ', + Coproduct: '∐', + CounterClockwiseContourIntegral: '∳', + Cross: '⨯', + Cscr: '𝒞', + Cup: '⋓', + CupCap: '≍', + DD: 'ⅅ', + DDotrahd: '⤑', + DJcy: 'Ђ', + DScy: 'Ѕ', + DZcy: 'Џ', + Dagger: '‡', + Darr: '↡', + Dashv: '⫤', + Dcaron: 'Ď', + Dcy: 'Д', + Del: '∇', + Delta: 'Δ', + Dfr: '𝔇', + DiacriticalAcute: '´', + DiacriticalDot: '˙', + DiacriticalDoubleAcute: '˝', + DiacriticalGrave: '`', + DiacriticalTilde: '˜', + Diamond: '⋄', + DifferentialD: 'ⅆ', + Dopf: '𝔻', + Dot: '¨', + DotDot: '⃜', + DotEqual: '≐', + DoubleContourIntegral: '∯', + DoubleDot: '¨', + DoubleDownArrow: '⇓', + DoubleLeftArrow: '⇐', + DoubleLeftRightArrow: '⇔', + DoubleLeftTee: '⫤', + DoubleLongLeftArrow: '⟸', + DoubleLongLeftRightArrow: '⟺', + DoubleLongRightArrow: '⟹', + DoubleRightArrow: '⇒', + DoubleRightTee: '⊨', + DoubleUpArrow: '⇑', + DoubleUpDownArrow: '⇕', + DoubleVerticalBar: '∥', + DownArrow: '↓', + DownArrowBar: '⤓', + DownArrowUpArrow: '⇵', + DownBreve: '̑', + DownLeftRightVector: '⥐', + DownLeftTeeVector: '⥞', + DownLeftVector: '↽', + DownLeftVectorBar: '⥖', + DownRightTeeVector: '⥟', + DownRightVector: '⇁', + DownRightVectorBar: '⥗', + DownTee: '⊤', + DownTeeArrow: '↧', + Downarrow: '⇓', + Dscr: '𝒟', + Dstrok: 'Đ', + ENG: 'Ŋ', + ETH: 'Ð', + Eacute: 'É', + Ecaron: 'Ě', + Ecirc: 'Ê', + Ecy: 'Э', + Edot: 'Ė', + Efr: '𝔈', + Egrave: 'È', + Element: '∈', + Emacr: 'Ē', + EmptySmallSquare: '◻', + EmptyVerySmallSquare: '▫', + Eogon: 'Ę', + Eopf: '𝔼', + Epsilon: 'Ε', + Equal: '⩵', + EqualTilde: '≂', + Equilibrium: '⇌', + Escr: 'ℰ', + Esim: '⩳', + Eta: 'Η', + Euml: 'Ë', + Exists: '∃', + ExponentialE: 'ⅇ', + Fcy: 'Ф', + Ffr: '𝔉', + FilledSmallSquare: '◼', + FilledVerySmallSquare: '▪', + Fopf: '𝔽', + ForAll: '∀', + Fouriertrf: 'ℱ', + Fscr: 'ℱ', + GJcy: 'Ѓ', + GT: '>', + Gamma: 'Γ', + Gammad: 'Ϝ', + Gbreve: 'Ğ', + Gcedil: 'Ģ', + Gcirc: 'Ĝ', + Gcy: 'Г', + Gdot: 'Ġ', + Gfr: '𝔊', + Gg: '⋙', + Gopf: '𝔾', + GreaterEqual: '≥', + GreaterEqualLess: '⋛', + GreaterFullEqual: '≧', + GreaterGreater: '⪢', + GreaterLess: '≷', + GreaterSlantEqual: '⩾', + GreaterTilde: '≳', + Gscr: '𝒢', + Gt: '≫', + HARDcy: 'Ъ', + Hacek: 'ˇ', + Hat: '^', + Hcirc: 'Ĥ', + Hfr: 'ℌ', + HilbertSpace: 'ℋ', + Hopf: 'ℍ', + HorizontalLine: '─', + Hscr: 'ℋ', + Hstrok: 'Ħ', + HumpDownHump: '≎', + HumpEqual: '≏', + IEcy: 'Е', + IJlig: 'IJ', + IOcy: 'Ё', + Iacute: 'Í', + Icirc: 'Î', + Icy: 'И', + Idot: 'İ', + Ifr: 'ℑ', + Igrave: 'Ì', + Im: 'ℑ', + Imacr: 'Ī', + ImaginaryI: 'ⅈ', + Implies: '⇒', + Int: '∬', + Integral: '∫', + Intersection: '⋂', + InvisibleComma: '⁣', + InvisibleTimes: '⁢', + Iogon: 'Į', + Iopf: '𝕀', + Iota: 'Ι', + Iscr: 'ℐ', + Itilde: 'Ĩ', + Iukcy: 'І', + Iuml: 'Ï', + Jcirc: 'Ĵ', + Jcy: 'Й', + Jfr: '𝔍', + Jopf: '𝕁', + Jscr: '𝒥', + Jsercy: 'Ј', + Jukcy: 'Є', + KHcy: 'Х', + KJcy: 'Ќ', + Kappa: 'Κ', + Kcedil: 'Ķ', + Kcy: 'К', + Kfr: '𝔎', + Kopf: '𝕂', + Kscr: '𝒦', + LJcy: 'Љ', + LT: '<', + Lacute: 'Ĺ', + Lambda: 'Λ', + Lang: '⟪', + Laplacetrf: 'ℒ', + Larr: '↞', + Lcaron: 'Ľ', + Lcedil: 'Ļ', + Lcy: 'Л', + LeftAngleBracket: '⟨', + LeftArrow: '←', + LeftArrowBar: '⇤', + LeftArrowRightArrow: '⇆', + LeftCeiling: '⌈', + LeftDoubleBracket: '⟦', + LeftDownTeeVector: '⥡', + LeftDownVector: '⇃', + LeftDownVectorBar: '⥙', + LeftFloor: '⌊', + LeftRightArrow: '↔', + LeftRightVector: '⥎', + LeftTee: '⊣', + LeftTeeArrow: '↤', + LeftTeeVector: '⥚', + LeftTriangle: '⊲', + LeftTriangleBar: '⧏', + LeftTriangleEqual: '⊴', + LeftUpDownVector: '⥑', + LeftUpTeeVector: '⥠', + LeftUpVector: '↿', + LeftUpVectorBar: '⥘', + LeftVector: '↼', + LeftVectorBar: '⥒', + Leftarrow: '⇐', + Leftrightarrow: '⇔', + LessEqualGreater: '⋚', + LessFullEqual: '≦', + LessGreater: '≶', + LessLess: '⪡', + LessSlantEqual: '⩽', + LessTilde: '≲', + Lfr: '𝔏', + Ll: '⋘', + Lleftarrow: '⇚', + Lmidot: 'Ŀ', + LongLeftArrow: '⟵', + LongLeftRightArrow: '⟷', + LongRightArrow: '⟶', + Longleftarrow: '⟸', + Longleftrightarrow: '⟺', + Longrightarrow: '⟹', + Lopf: '𝕃', + LowerLeftArrow: '↙', + LowerRightArrow: '↘', + Lscr: 'ℒ', + Lsh: '↰', + Lstrok: 'Ł', + Lt: '≪', + Map: '⤅', + Mcy: 'М', + MediumSpace: ' ', + Mellintrf: 'ℳ', + Mfr: '𝔐', + MinusPlus: '∓', + Mopf: '𝕄', + Mscr: 'ℳ', + Mu: 'Μ', + NJcy: 'Њ', + Nacute: 'Ń', + Ncaron: 'Ň', + Ncedil: 'Ņ', + Ncy: 'Н', + NegativeMediumSpace: '​', + NegativeThickSpace: '​', + NegativeThinSpace: '​', + NegativeVeryThinSpace: '​', + NestedGreaterGreater: '≫', + NestedLessLess: '≪', + NewLine: '\n', + Nfr: '𝔑', + NoBreak: '⁠', + NonBreakingSpace: ' ', + Nopf: 'ℕ', + Not: '⫬', + NotCongruent: '≢', + NotCupCap: '≭', + NotDoubleVerticalBar: '∦', + NotElement: '∉', + NotEqual: '≠', + NotEqualTilde: '≂̸', + NotExists: '∄', + NotGreater: '≯', + NotGreaterEqual: '≱', + NotGreaterFullEqual: '≧̸', + NotGreaterGreater: '≫̸', + NotGreaterLess: '≹', + NotGreaterSlantEqual: '⩾̸', + NotGreaterTilde: '≵', + NotHumpDownHump: '≎̸', + NotHumpEqual: '≏̸', + NotLeftTriangle: '⋪', + NotLeftTriangleBar: '⧏̸', + NotLeftTriangleEqual: '⋬', + NotLess: '≮', + NotLessEqual: '≰', + NotLessGreater: '≸', + NotLessLess: '≪̸', + NotLessSlantEqual: '⩽̸', + NotLessTilde: '≴', + NotNestedGreaterGreater: '⪢̸', + NotNestedLessLess: '⪡̸', + NotPrecedes: '⊀', + NotPrecedesEqual: '⪯̸', + NotPrecedesSlantEqual: '⋠', + NotReverseElement: '∌', + NotRightTriangle: '⋫', + NotRightTriangleBar: '⧐̸', + NotRightTriangleEqual: '⋭', + NotSquareSubset: '⊏̸', + NotSquareSubsetEqual: '⋢', + NotSquareSuperset: '⊐̸', + NotSquareSupersetEqual: '⋣', + NotSubset: '⊂⃒', + NotSubsetEqual: '⊈', + NotSucceeds: '⊁', + NotSucceedsEqual: '⪰̸', + NotSucceedsSlantEqual: '⋡', + NotSucceedsTilde: '≿̸', + NotSuperset: '⊃⃒', + NotSupersetEqual: '⊉', + NotTilde: '≁', + NotTildeEqual: '≄', + NotTildeFullEqual: '≇', + NotTildeTilde: '≉', + NotVerticalBar: '∤', + Nscr: '𝒩', + Ntilde: 'Ñ', + Nu: 'Ν', + OElig: 'Œ', + Oacute: 'Ó', + Ocirc: 'Ô', + Ocy: 'О', + Odblac: 'Ő', + Ofr: '𝔒', + Ograve: 'Ò', + Omacr: 'Ō', + Omega: 'Ω', + Omicron: 'Ο', + Oopf: '𝕆', + OpenCurlyDoubleQuote: '“', + OpenCurlyQuote: '‘', + Or: '⩔', + Oscr: '𝒪', + Oslash: 'Ø', + Otilde: 'Õ', + Otimes: '⨷', + Ouml: 'Ö', + OverBar: '‾', + OverBrace: '⏞', + OverBracket: '⎴', + OverParenthesis: '⏜', + PartialD: '∂', + Pcy: 'П', + Pfr: '𝔓', + Phi: 'Φ', + Pi: 'Π', + PlusMinus: '±', + Poincareplane: 'ℌ', + Popf: 'ℙ', + Pr: '⪻', + Precedes: '≺', + PrecedesEqual: '⪯', + PrecedesSlantEqual: '≼', + PrecedesTilde: '≾', + Prime: '″', + Product: '∏', + Proportion: '∷', + Proportional: '∝', + Pscr: '𝒫', + Psi: 'Ψ', + QUOT: '"', + Qfr: '𝔔', + Qopf: 'ℚ', + Qscr: '𝒬', + RBarr: '⤐', + REG: '®', + Racute: 'Ŕ', + Rang: '⟫', + Rarr: '↠', + Rarrtl: '⤖', + Rcaron: 'Ř', + Rcedil: 'Ŗ', + Rcy: 'Р', + Re: 'ℜ', + ReverseElement: '∋', + ReverseEquilibrium: '⇋', + ReverseUpEquilibrium: '⥯', + Rfr: 'ℜ', + Rho: 'Ρ', + RightAngleBracket: '⟩', + RightArrow: '→', + RightArrowBar: '⇥', + RightArrowLeftArrow: '⇄', + RightCeiling: '⌉', + RightDoubleBracket: '⟧', + RightDownTeeVector: '⥝', + RightDownVector: '⇂', + RightDownVectorBar: '⥕', + RightFloor: '⌋', + RightTee: '⊢', + RightTeeArrow: '↦', + RightTeeVector: '⥛', + RightTriangle: '⊳', + RightTriangleBar: '⧐', + RightTriangleEqual: '⊵', + RightUpDownVector: '⥏', + RightUpTeeVector: '⥜', + RightUpVector: '↾', + RightUpVectorBar: '⥔', + RightVector: '⇀', + RightVectorBar: '⥓', + Rightarrow: '⇒', + Ropf: 'ℝ', + RoundImplies: '⥰', + Rrightarrow: '⇛', + Rscr: 'ℛ', + Rsh: '↱', + RuleDelayed: '⧴', + SHCHcy: 'Щ', + SHcy: 'Ш', + SOFTcy: 'Ь', + Sacute: 'Ś', + Sc: '⪼', + Scaron: 'Š', + Scedil: 'Ş', + Scirc: 'Ŝ', + Scy: 'С', + Sfr: '𝔖', + ShortDownArrow: '↓', + ShortLeftArrow: '←', + ShortRightArrow: '→', + ShortUpArrow: '↑', + Sigma: 'Σ', + SmallCircle: '∘', + Sopf: '𝕊', + Sqrt: '√', + Square: '□', + SquareIntersection: '⊓', + SquareSubset: '⊏', + SquareSubsetEqual: '⊑', + SquareSuperset: '⊐', + SquareSupersetEqual: '⊒', + SquareUnion: '⊔', + Sscr: '𝒮', + Star: '⋆', + Sub: '⋐', + Subset: '⋐', + SubsetEqual: '⊆', + Succeeds: '≻', + SucceedsEqual: '⪰', + SucceedsSlantEqual: '≽', + SucceedsTilde: '≿', + SuchThat: '∋', + Sum: '∑', + Sup: '⋑', + Superset: '⊃', + SupersetEqual: '⊇', + Supset: '⋑', + THORN: 'Þ', + TRADE: '™', + TSHcy: 'Ћ', + TScy: 'Ц', + Tab: '\t', + Tau: 'Τ', + Tcaron: 'Ť', + Tcedil: 'Ţ', + Tcy: 'Т', + Tfr: '𝔗', + Therefore: '∴', + Theta: 'Θ', + ThickSpace: '  ', + ThinSpace: ' ', + Tilde: '∼', + TildeEqual: '≃', + TildeFullEqual: '≅', + TildeTilde: '≈', + Topf: '𝕋', + TripleDot: '⃛', + Tscr: '𝒯', + Tstrok: 'Ŧ', + Uacute: 'Ú', + Uarr: '↟', + Uarrocir: '⥉', + Ubrcy: 'Ў', + Ubreve: 'Ŭ', + Ucirc: 'Û', + Ucy: 'У', + Udblac: 'Ű', + Ufr: '𝔘', + Ugrave: 'Ù', + Umacr: 'Ū', + UnderBar: '_', + UnderBrace: '⏟', + UnderBracket: '⎵', + UnderParenthesis: '⏝', + Union: '⋃', + UnionPlus: '⊎', + Uogon: 'Ų', + Uopf: '𝕌', + UpArrow: '↑', + UpArrowBar: '⤒', + UpArrowDownArrow: '⇅', + UpDownArrow: '↕', + UpEquilibrium: '⥮', + UpTee: '⊥', + UpTeeArrow: '↥', + Uparrow: '⇑', + Updownarrow: '⇕', + UpperLeftArrow: '↖', + UpperRightArrow: '↗', + Upsi: 'ϒ', + Upsilon: 'Υ', + Uring: 'Ů', + Uscr: '𝒰', + Utilde: 'Ũ', + Uuml: 'Ü', + VDash: '⊫', + Vbar: '⫫', + Vcy: 'В', + Vdash: '⊩', + Vdashl: '⫦', + Vee: '⋁', + Verbar: '‖', + Vert: '‖', + VerticalBar: '∣', + VerticalLine: '|', + VerticalSeparator: '❘', + VerticalTilde: '≀', + VeryThinSpace: ' ', + Vfr: '𝔙', + Vopf: '𝕍', + Vscr: '𝒱', + Vvdash: '⊪', + Wcirc: 'Ŵ', + Wedge: '⋀', + Wfr: '𝔚', + Wopf: '𝕎', + Wscr: '𝒲', + Xfr: '𝔛', + Xi: 'Ξ', + Xopf: '𝕏', + Xscr: '𝒳', + YAcy: 'Я', + YIcy: 'Ї', + YUcy: 'Ю', + Yacute: 'Ý', + Ycirc: 'Ŷ', + Ycy: 'Ы', + Yfr: '𝔜', + Yopf: '𝕐', + Yscr: '𝒴', + Yuml: 'Ÿ', + ZHcy: 'Ж', + Zacute: 'Ź', + Zcaron: 'Ž', + Zcy: 'З', + Zdot: 'Ż', + ZeroWidthSpace: '​', + Zeta: 'Ζ', + Zfr: 'ℨ', + Zopf: 'ℤ', + Zscr: '𝒵', + aacute: 'á', + abreve: 'ă', + ac: '∾', + acE: '∾̳', + acd: '∿', + acirc: 'â', + acute: '´', + acy: 'а', + aelig: 'æ', + af: '⁡', + afr: '𝔞', + agrave: 'à', + alefsym: 'ℵ', + aleph: 'ℵ', + alpha: 'α', + amacr: 'ā', + amalg: '⨿', + amp: '&', + and: '∧', + andand: '⩕', + andd: '⩜', + andslope: '⩘', + andv: '⩚', + ang: '∠', + ange: '⦤', + angle: '∠', + angmsd: '∡', + angmsdaa: '⦨', + angmsdab: '⦩', + angmsdac: '⦪', + angmsdad: '⦫', + angmsdae: '⦬', + angmsdaf: '⦭', + angmsdag: '⦮', + angmsdah: '⦯', + angrt: '∟', + angrtvb: '⊾', + angrtvbd: '⦝', + angsph: '∢', + angst: 'Å', + angzarr: '⍼', + aogon: 'ą', + aopf: '𝕒', + ap: '≈', + apE: '⩰', + apacir: '⩯', + ape: '≊', + apid: '≋', + apos: "'", + approx: '≈', + approxeq: '≊', + aring: 'å', + ascr: '𝒶', + ast: '*', + asymp: '≈', + asympeq: '≍', + atilde: 'ã', + auml: 'ä', + awconint: '∳', + awint: '⨑', + bNot: '⫭', + backcong: '≌', + backepsilon: '϶', + backprime: '‵', + backsim: '∽', + backsimeq: '⋍', + barvee: '⊽', + barwed: '⌅', + barwedge: '⌅', + bbrk: '⎵', + bbrktbrk: '⎶', + bcong: '≌', + bcy: 'б', + bdquo: '„', + becaus: '∵', + because: '∵', + bemptyv: '⦰', + bepsi: '϶', + bernou: 'ℬ', + beta: 'β', + beth: 'ℶ', + between: '≬', + bfr: '𝔟', + bigcap: '⋂', + bigcirc: '◯', + bigcup: '⋃', + bigodot: '⨀', + bigoplus: '⨁', + bigotimes: '⨂', + bigsqcup: '⨆', + bigstar: '★', + bigtriangledown: '▽', + bigtriangleup: '△', + biguplus: '⨄', + bigvee: '⋁', + bigwedge: '⋀', + bkarow: '⤍', + blacklozenge: '⧫', + blacksquare: '▪', + blacktriangle: '▴', + blacktriangledown: '▾', + blacktriangleleft: '◂', + blacktriangleright: '▸', + blank: '␣', + blk12: '▒', + blk14: '░', + blk34: '▓', + block: '█', + bne: '=⃥', + bnequiv: '≡⃥', + bnot: '⌐', + bopf: '𝕓', + bot: '⊥', + bottom: '⊥', + bowtie: '⋈', + boxDL: '╗', + boxDR: '╔', + boxDl: '╖', + boxDr: '╓', + boxH: '═', + boxHD: '╦', + boxHU: '╩', + boxHd: '╤', + boxHu: '╧', + boxUL: '╝', + boxUR: '╚', + boxUl: '╜', + boxUr: '╙', + boxV: '║', + boxVH: '╬', + boxVL: '╣', + boxVR: '╠', + boxVh: '╫', + boxVl: '╢', + boxVr: '╟', + boxbox: '⧉', + boxdL: '╕', + boxdR: '╒', + boxdl: '┐', + boxdr: '┌', + boxh: '─', + boxhD: '╥', + boxhU: '╨', + boxhd: '┬', + boxhu: '┴', + boxminus: '⊟', + boxplus: '⊞', + boxtimes: '⊠', + boxuL: '╛', + boxuR: '╘', + boxul: '┘', + boxur: '└', + boxv: '│', + boxvH: '╪', + boxvL: '╡', + boxvR: '╞', + boxvh: '┼', + boxvl: '┤', + boxvr: '├', + bprime: '‵', + breve: '˘', + brvbar: '¦', + bscr: '𝒷', + bsemi: '⁏', + bsim: '∽', + bsime: '⋍', + bsol: '\\', + bsolb: '⧅', + bsolhsub: '⟈', + bull: '•', + bullet: '•', + bump: '≎', + bumpE: '⪮', + bumpe: '≏', + bumpeq: '≏', + cacute: 'ć', + cap: '∩', + capand: '⩄', + capbrcup: '⩉', + capcap: '⩋', + capcup: '⩇', + capdot: '⩀', + caps: '∩︀', + caret: '⁁', + caron: 'ˇ', + ccaps: '⩍', + ccaron: 'č', + ccedil: 'ç', + ccirc: 'ĉ', + ccups: '⩌', + ccupssm: '⩐', + cdot: 'ċ', + cedil: '¸', + cemptyv: '⦲', + cent: '¢', + centerdot: '·', + cfr: '𝔠', + chcy: 'ч', + check: '✓', + checkmark: '✓', + chi: 'χ', + cir: '○', + cirE: '⧃', + circ: 'ˆ', + circeq: '≗', + circlearrowleft: '↺', + circlearrowright: '↻', + circledR: '®', + circledS: 'Ⓢ', + circledast: '⊛', + circledcirc: '⊚', + circleddash: '⊝', + cire: '≗', + cirfnint: '⨐', + cirmid: '⫯', + cirscir: '⧂', + clubs: '♣', + clubsuit: '♣', + colon: ':', + colone: '≔', + coloneq: '≔', + comma: ',', + commat: '@', + comp: '∁', + compfn: '∘', + complement: '∁', + complexes: 'ℂ', + cong: '≅', + congdot: '⩭', + conint: '∮', + copf: '𝕔', + coprod: '∐', + copy: '©', + copysr: '℗', + crarr: '↵', + cross: '✗', + cscr: '𝒸', + csub: '⫏', + csube: '⫑', + csup: '⫐', + csupe: '⫒', + ctdot: '⋯', + cudarrl: '⤸', + cudarrr: '⤵', + cuepr: '⋞', + cuesc: '⋟', + cularr: '↶', + cularrp: '⤽', + cup: '∪', + cupbrcap: '⩈', + cupcap: '⩆', + cupcup: '⩊', + cupdot: '⊍', + cupor: '⩅', + cups: '∪︀', + curarr: '↷', + curarrm: '⤼', + curlyeqprec: '⋞', + curlyeqsucc: '⋟', + curlyvee: '⋎', + curlywedge: '⋏', + curren: '¤', + curvearrowleft: '↶', + curvearrowright: '↷', + cuvee: '⋎', + cuwed: '⋏', + cwconint: '∲', + cwint: '∱', + cylcty: '⌭', + dArr: '⇓', + dHar: '⥥', + dagger: '†', + daleth: 'ℸ', + darr: '↓', + dash: '‐', + dashv: '⊣', + dbkarow: '⤏', + dblac: '˝', + dcaron: 'ď', + dcy: 'д', + dd: 'ⅆ', + ddagger: '‡', + ddarr: '⇊', + ddotseq: '⩷', + deg: '°', + delta: 'δ', + demptyv: '⦱', + dfisht: '⥿', + dfr: '𝔡', + dharl: '⇃', + dharr: '⇂', + diam: '⋄', + diamond: '⋄', + diamondsuit: '♦', + diams: '♦', + die: '¨', + digamma: 'ϝ', + disin: '⋲', + div: '÷', + divide: '÷', + divideontimes: '⋇', + divonx: '⋇', + djcy: 'ђ', + dlcorn: '⌞', + dlcrop: '⌍', + dollar: '$', + dopf: '𝕕', + dot: '˙', + doteq: '≐', + doteqdot: '≑', + dotminus: '∸', + dotplus: '∔', + dotsquare: '⊡', + doublebarwedge: '⌆', + downarrow: '↓', + downdownarrows: '⇊', + downharpoonleft: '⇃', + downharpoonright: '⇂', + drbkarow: '⤐', + drcorn: '⌟', + drcrop: '⌌', + dscr: '𝒹', + dscy: 'ѕ', + dsol: '⧶', + dstrok: 'đ', + dtdot: '⋱', + dtri: '▿', + dtrif: '▾', + duarr: '⇵', + duhar: '⥯', + dwangle: '⦦', + dzcy: 'џ', + dzigrarr: '⟿', + eDDot: '⩷', + eDot: '≑', + eacute: 'é', + easter: '⩮', + ecaron: 'ě', + ecir: '≖', + ecirc: 'ê', + ecolon: '≕', + ecy: 'э', + edot: 'ė', + ee: 'ⅇ', + efDot: '≒', + efr: '𝔢', + eg: '⪚', + egrave: 'è', + egs: '⪖', + egsdot: '⪘', + el: '⪙', + elinters: '⏧', + ell: 'ℓ', + els: '⪕', + elsdot: '⪗', + emacr: 'ē', + empty: '∅', + emptyset: '∅', + emptyv: '∅', + emsp13: ' ', + emsp14: ' ', + emsp: ' ', + eng: 'ŋ', + ensp: ' ', + eogon: 'ę', + eopf: '𝕖', + epar: '⋕', + eparsl: '⧣', + eplus: '⩱', + epsi: 'ε', + epsilon: 'ε', + epsiv: 'ϵ', + eqcirc: '≖', + eqcolon: '≕', + eqsim: '≂', + eqslantgtr: '⪖', + eqslantless: '⪕', + equals: '=', + equest: '≟', + equiv: '≡', + equivDD: '⩸', + eqvparsl: '⧥', + erDot: '≓', + erarr: '⥱', + escr: 'ℯ', + esdot: '≐', + esim: '≂', + eta: 'η', + eth: 'ð', + euml: 'ë', + euro: '€', + excl: '!', + exist: '∃', + expectation: 'ℰ', + exponentiale: 'ⅇ', + fallingdotseq: '≒', + fcy: 'ф', + female: '♀', + ffilig: 'ffi', + fflig: 'ff', + ffllig: 'ffl', + ffr: '𝔣', + filig: 'fi', + fjlig: 'fj', + flat: '♭', + fllig: 'fl', + fltns: '▱', + fnof: 'ƒ', + fopf: '𝕗', + forall: '∀', + fork: '⋔', + forkv: '⫙', + fpartint: '⨍', + frac12: '½', + frac13: '⅓', + frac14: '¼', + frac15: '⅕', + frac16: '⅙', + frac18: '⅛', + frac23: '⅔', + frac25: '⅖', + frac34: '¾', + frac35: '⅗', + frac38: '⅜', + frac45: '⅘', + frac56: '⅚', + frac58: '⅝', + frac78: '⅞', + frasl: '⁄', + frown: '⌢', + fscr: '𝒻', + gE: '≧', + gEl: '⪌', + gacute: 'ǵ', + gamma: 'γ', + gammad: 'ϝ', + gap: '⪆', + gbreve: 'ğ', + gcirc: 'ĝ', + gcy: 'г', + gdot: 'ġ', + ge: '≥', + gel: '⋛', + geq: '≥', + geqq: '≧', + geqslant: '⩾', + ges: '⩾', + gescc: '⪩', + gesdot: '⪀', + gesdoto: '⪂', + gesdotol: '⪄', + gesl: '⋛︀', + gesles: '⪔', + gfr: '𝔤', + gg: '≫', + ggg: '⋙', + gimel: 'ℷ', + gjcy: 'ѓ', + gl: '≷', + glE: '⪒', + gla: '⪥', + glj: '⪤', + gnE: '≩', + gnap: '⪊', + gnapprox: '⪊', + gne: '⪈', + gneq: '⪈', + gneqq: '≩', + gnsim: '⋧', + gopf: '𝕘', + grave: '`', + gscr: 'ℊ', + gsim: '≳', + gsime: '⪎', + gsiml: '⪐', + gt: '>', + gtcc: '⪧', + gtcir: '⩺', + gtdot: '⋗', + gtlPar: '⦕', + gtquest: '⩼', + gtrapprox: '⪆', + gtrarr: '⥸', + gtrdot: '⋗', + gtreqless: '⋛', + gtreqqless: '⪌', + gtrless: '≷', + gtrsim: '≳', + gvertneqq: '≩︀', + gvnE: '≩︀', + hArr: '⇔', + hairsp: ' ', + half: '½', + hamilt: 'ℋ', + hardcy: 'ъ', + harr: '↔', + harrcir: '⥈', + harrw: '↭', + hbar: 'ℏ', + hcirc: 'ĥ', + hearts: '♥', + heartsuit: '♥', + hellip: '…', + hercon: '⊹', + hfr: '𝔥', + hksearow: '⤥', + hkswarow: '⤦', + hoarr: '⇿', + homtht: '∻', + hookleftarrow: '↩', + hookrightarrow: '↪', + hopf: '𝕙', + horbar: '―', + hscr: '𝒽', + hslash: 'ℏ', + hstrok: 'ħ', + hybull: '⁃', + hyphen: '‐', + iacute: 'í', + ic: '⁣', + icirc: 'î', + icy: 'и', + iecy: 'е', + iexcl: '¡', + iff: '⇔', + ifr: '𝔦', + igrave: 'ì', + ii: 'ⅈ', + iiiint: '⨌', + iiint: '∭', + iinfin: '⧜', + iiota: '℩', + ijlig: 'ij', + imacr: 'ī', + image: 'ℑ', + imagline: 'ℐ', + imagpart: 'ℑ', + imath: 'ı', + imof: '⊷', + imped: 'Ƶ', + in: '∈', + incare: '℅', + infin: '∞', + infintie: '⧝', + inodot: 'ı', + int: '∫', + intcal: '⊺', + integers: 'ℤ', + intercal: '⊺', + intlarhk: '⨗', + intprod: '⨼', + iocy: 'ё', + iogon: 'į', + iopf: '𝕚', + iota: 'ι', + iprod: '⨼', + iquest: '¿', + iscr: '𝒾', + isin: '∈', + isinE: '⋹', + isindot: '⋵', + isins: '⋴', + isinsv: '⋳', + isinv: '∈', + it: '⁢', + itilde: 'ĩ', + iukcy: 'і', + iuml: 'ï', + jcirc: 'ĵ', + jcy: 'й', + jfr: '𝔧', + jmath: 'ȷ', + jopf: '𝕛', + jscr: '𝒿', + jsercy: 'ј', + jukcy: 'є', + kappa: 'κ', + kappav: 'ϰ', + kcedil: 'ķ', + kcy: 'к', + kfr: '𝔨', + kgreen: 'ĸ', + khcy: 'х', + kjcy: 'ќ', + kopf: '𝕜', + kscr: '𝓀', + lAarr: '⇚', + lArr: '⇐', + lAtail: '⤛', + lBarr: '⤎', + lE: '≦', + lEg: '⪋', + lHar: '⥢', + lacute: 'ĺ', + laemptyv: '⦴', + lagran: 'ℒ', + lambda: 'λ', + lang: '⟨', + langd: '⦑', + langle: '⟨', + lap: '⪅', + laquo: '«', + larr: '←', + larrb: '⇤', + larrbfs: '⤟', + larrfs: '⤝', + larrhk: '↩', + larrlp: '↫', + larrpl: '⤹', + larrsim: '⥳', + larrtl: '↢', + lat: '⪫', + latail: '⤙', + late: '⪭', + lates: '⪭︀', + lbarr: '⤌', + lbbrk: '❲', + lbrace: '{', + lbrack: '[', + lbrke: '⦋', + lbrksld: '⦏', + lbrkslu: '⦍', + lcaron: 'ľ', + lcedil: 'ļ', + lceil: '⌈', + lcub: '{', + lcy: 'л', + ldca: '⤶', + ldquo: '“', + ldquor: '„', + ldrdhar: '⥧', + ldrushar: '⥋', + ldsh: '↲', + le: '≤', + leftarrow: '←', + leftarrowtail: '↢', + leftharpoondown: '↽', + leftharpoonup: '↼', + leftleftarrows: '⇇', + leftrightarrow: '↔', + leftrightarrows: '⇆', + leftrightharpoons: '⇋', + leftrightsquigarrow: '↭', + leftthreetimes: '⋋', + leg: '⋚', + leq: '≤', + leqq: '≦', + leqslant: '⩽', + les: '⩽', + lescc: '⪨', + lesdot: '⩿', + lesdoto: '⪁', + lesdotor: '⪃', + lesg: '⋚︀', + lesges: '⪓', + lessapprox: '⪅', + lessdot: '⋖', + lesseqgtr: '⋚', + lesseqqgtr: '⪋', + lessgtr: '≶', + lesssim: '≲', + lfisht: '⥼', + lfloor: '⌊', + lfr: '𝔩', + lg: '≶', + lgE: '⪑', + lhard: '↽', + lharu: '↼', + lharul: '⥪', + lhblk: '▄', + ljcy: 'љ', + ll: '≪', + llarr: '⇇', + llcorner: '⌞', + llhard: '⥫', + lltri: '◺', + lmidot: 'ŀ', + lmoust: '⎰', + lmoustache: '⎰', + lnE: '≨', + lnap: '⪉', + lnapprox: '⪉', + lne: '⪇', + lneq: '⪇', + lneqq: '≨', + lnsim: '⋦', + loang: '⟬', + loarr: '⇽', + lobrk: '⟦', + longleftarrow: '⟵', + longleftrightarrow: '⟷', + longmapsto: '⟼', + longrightarrow: '⟶', + looparrowleft: '↫', + looparrowright: '↬', + lopar: '⦅', + lopf: '𝕝', + loplus: '⨭', + lotimes: '⨴', + lowast: '∗', + lowbar: '_', + loz: '◊', + lozenge: '◊', + lozf: '⧫', + lpar: '(', + lparlt: '⦓', + lrarr: '⇆', + lrcorner: '⌟', + lrhar: '⇋', + lrhard: '⥭', + lrm: '‎', + lrtri: '⊿', + lsaquo: '‹', + lscr: '𝓁', + lsh: '↰', + lsim: '≲', + lsime: '⪍', + lsimg: '⪏', + lsqb: '[', + lsquo: '‘', + lsquor: '‚', + lstrok: 'ł', + lt: '<', + ltcc: '⪦', + ltcir: '⩹', + ltdot: '⋖', + lthree: '⋋', + ltimes: '⋉', + ltlarr: '⥶', + ltquest: '⩻', + ltrPar: '⦖', + ltri: '◃', + ltrie: '⊴', + ltrif: '◂', + lurdshar: '⥊', + luruhar: '⥦', + lvertneqq: '≨︀', + lvnE: '≨︀', + mDDot: '∺', + macr: '¯', + male: '♂', + malt: '✠', + maltese: '✠', + map: '↦', + mapsto: '↦', + mapstodown: '↧', + mapstoleft: '↤', + mapstoup: '↥', + marker: '▮', + mcomma: '⨩', + mcy: 'м', + mdash: '—', + measuredangle: '∡', + mfr: '𝔪', + mho: '℧', + micro: 'µ', + mid: '∣', + midast: '*', + midcir: '⫰', + middot: '·', + minus: '−', + minusb: '⊟', + minusd: '∸', + minusdu: '⨪', + mlcp: '⫛', + mldr: '…', + mnplus: '∓', + models: '⊧', + mopf: '𝕞', + mp: '∓', + mscr: '𝓂', + mstpos: '∾', + mu: 'μ', + multimap: '⊸', + mumap: '⊸', + nGg: '⋙̸', + nGt: '≫⃒', + nGtv: '≫̸', + nLeftarrow: '⇍', + nLeftrightarrow: '⇎', + nLl: '⋘̸', + nLt: '≪⃒', + nLtv: '≪̸', + nRightarrow: '⇏', + nVDash: '⊯', + nVdash: '⊮', + nabla: '∇', + nacute: 'ń', + nang: '∠⃒', + nap: '≉', + napE: '⩰̸', + napid: '≋̸', + napos: 'ʼn', + napprox: '≉', + natur: '♮', + natural: '♮', + naturals: 'ℕ', + nbsp: ' ', + nbump: '≎̸', + nbumpe: '≏̸', + ncap: '⩃', + ncaron: 'ň', + ncedil: 'ņ', + ncong: '≇', + ncongdot: '⩭̸', + ncup: '⩂', + ncy: 'н', + ndash: '–', + ne: '≠', + neArr: '⇗', + nearhk: '⤤', + nearr: '↗', + nearrow: '↗', + nedot: '≐̸', + nequiv: '≢', + nesear: '⤨', + nesim: '≂̸', + nexist: '∄', + nexists: '∄', + nfr: '𝔫', + ngE: '≧̸', + nge: '≱', + ngeq: '≱', + ngeqq: '≧̸', + ngeqslant: '⩾̸', + nges: '⩾̸', + ngsim: '≵', + ngt: '≯', + ngtr: '≯', + nhArr: '⇎', + nharr: '↮', + nhpar: '⫲', + ni: '∋', + nis: '⋼', + nisd: '⋺', + niv: '∋', + njcy: 'њ', + nlArr: '⇍', + nlE: '≦̸', + nlarr: '↚', + nldr: '‥', + nle: '≰', + nleftarrow: '↚', + nleftrightarrow: '↮', + nleq: '≰', + nleqq: '≦̸', + nleqslant: '⩽̸', + nles: '⩽̸', + nless: '≮', + nlsim: '≴', + nlt: '≮', + nltri: '⋪', + nltrie: '⋬', + nmid: '∤', + nopf: '𝕟', + not: '¬', + notin: '∉', + notinE: '⋹̸', + notindot: '⋵̸', + notinva: '∉', + notinvb: '⋷', + notinvc: '⋶', + notni: '∌', + notniva: '∌', + notnivb: '⋾', + notnivc: '⋽', + npar: '∦', + nparallel: '∦', + nparsl: '⫽⃥', + npart: '∂̸', + npolint: '⨔', + npr: '⊀', + nprcue: '⋠', + npre: '⪯̸', + nprec: '⊀', + npreceq: '⪯̸', + nrArr: '⇏', + nrarr: '↛', + nrarrc: '⤳̸', + nrarrw: '↝̸', + nrightarrow: '↛', + nrtri: '⋫', + nrtrie: '⋭', + nsc: '⊁', + nsccue: '⋡', + nsce: '⪰̸', + nscr: '𝓃', + nshortmid: '∤', + nshortparallel: '∦', + nsim: '≁', + nsime: '≄', + nsimeq: '≄', + nsmid: '∤', + nspar: '∦', + nsqsube: '⋢', + nsqsupe: '⋣', + nsub: '⊄', + nsubE: '⫅̸', + nsube: '⊈', + nsubset: '⊂⃒', + nsubseteq: '⊈', + nsubseteqq: '⫅̸', + nsucc: '⊁', + nsucceq: '⪰̸', + nsup: '⊅', + nsupE: '⫆̸', + nsupe: '⊉', + nsupset: '⊃⃒', + nsupseteq: '⊉', + nsupseteqq: '⫆̸', + ntgl: '≹', + ntilde: 'ñ', + ntlg: '≸', + ntriangleleft: '⋪', + ntrianglelefteq: '⋬', + ntriangleright: '⋫', + ntrianglerighteq: '⋭', + nu: 'ν', + num: '#', + numero: '№', + numsp: ' ', + nvDash: '⊭', + nvHarr: '⤄', + nvap: '≍⃒', + nvdash: '⊬', + nvge: '≥⃒', + nvgt: '>⃒', + nvinfin: '⧞', + nvlArr: '⤂', + nvle: '≤⃒', + nvlt: '<⃒', + nvltrie: '⊴⃒', + nvrArr: '⤃', + nvrtrie: '⊵⃒', + nvsim: '∼⃒', + nwArr: '⇖', + nwarhk: '⤣', + nwarr: '↖', + nwarrow: '↖', + nwnear: '⤧', + oS: 'Ⓢ', + oacute: 'ó', + oast: '⊛', + ocir: '⊚', + ocirc: 'ô', + ocy: 'о', + odash: '⊝', + odblac: 'ő', + odiv: '⨸', + odot: '⊙', + odsold: '⦼', + oelig: 'œ', + ofcir: '⦿', + ofr: '𝔬', + ogon: '˛', + ograve: 'ò', + ogt: '⧁', + ohbar: '⦵', + ohm: 'Ω', + oint: '∮', + olarr: '↺', + olcir: '⦾', + olcross: '⦻', + oline: '‾', + olt: '⧀', + omacr: 'ō', + omega: 'ω', + omicron: 'ο', + omid: '⦶', + ominus: '⊖', + oopf: '𝕠', + opar: '⦷', + operp: '⦹', + oplus: '⊕', + or: '∨', + orarr: '↻', + ord: '⩝', + order: 'ℴ', + orderof: 'ℴ', + ordf: 'ª', + ordm: 'º', + origof: '⊶', + oror: '⩖', + orslope: '⩗', + orv: '⩛', + oscr: 'ℴ', + oslash: 'ø', + osol: '⊘', + otilde: 'õ', + otimes: '⊗', + otimesas: '⨶', + ouml: 'ö', + ovbar: '⌽', + par: '∥', + para: '¶', + parallel: '∥', + parsim: '⫳', + parsl: '⫽', + part: '∂', + pcy: 'п', + percnt: '%', + period: '.', + permil: '‰', + perp: '⊥', + pertenk: '‱', + pfr: '𝔭', + phi: 'φ', + phiv: 'ϕ', + phmmat: 'ℳ', + phone: '☎', + pi: 'π', + pitchfork: '⋔', + piv: 'ϖ', + planck: 'ℏ', + planckh: 'ℎ', + plankv: 'ℏ', + plus: '+', + plusacir: '⨣', + plusb: '⊞', + pluscir: '⨢', + plusdo: '∔', + plusdu: '⨥', + pluse: '⩲', + plusmn: '±', + plussim: '⨦', + plustwo: '⨧', + pm: '±', + pointint: '⨕', + popf: '𝕡', + pound: '£', + pr: '≺', + prE: '⪳', + prap: '⪷', + prcue: '≼', + pre: '⪯', + prec: '≺', + precapprox: '⪷', + preccurlyeq: '≼', + preceq: '⪯', + precnapprox: '⪹', + precneqq: '⪵', + precnsim: '⋨', + precsim: '≾', + prime: '′', + primes: 'ℙ', + prnE: '⪵', + prnap: '⪹', + prnsim: '⋨', + prod: '∏', + profalar: '⌮', + profline: '⌒', + profsurf: '⌓', + prop: '∝', + propto: '∝', + prsim: '≾', + prurel: '⊰', + pscr: '𝓅', + psi: 'ψ', + puncsp: ' ', + qfr: '𝔮', + qint: '⨌', + qopf: '𝕢', + qprime: '⁗', + qscr: '𝓆', + quaternions: 'ℍ', + quatint: '⨖', + quest: '?', + questeq: '≟', + quot: '"', + rAarr: '⇛', + rArr: '⇒', + rAtail: '⤜', + rBarr: '⤏', + rHar: '⥤', + race: '∽̱', + racute: 'ŕ', + radic: '√', + raemptyv: '⦳', + rang: '⟩', + rangd: '⦒', + range: '⦥', + rangle: '⟩', + raquo: '»', + rarr: '→', + rarrap: '⥵', + rarrb: '⇥', + rarrbfs: '⤠', + rarrc: '⤳', + rarrfs: '⤞', + rarrhk: '↪', + rarrlp: '↬', + rarrpl: '⥅', + rarrsim: '⥴', + rarrtl: '↣', + rarrw: '↝', + ratail: '⤚', + ratio: '∶', + rationals: 'ℚ', + rbarr: '⤍', + rbbrk: '❳', + rbrace: '}', + rbrack: ']', + rbrke: '⦌', + rbrksld: '⦎', + rbrkslu: '⦐', + rcaron: 'ř', + rcedil: 'ŗ', + rceil: '⌉', + rcub: '}', + rcy: 'р', + rdca: '⤷', + rdldhar: '⥩', + rdquo: '”', + rdquor: '”', + rdsh: '↳', + real: 'ℜ', + realine: 'ℛ', + realpart: 'ℜ', + reals: 'ℝ', + rect: '▭', + reg: '®', + rfisht: '⥽', + rfloor: '⌋', + rfr: '𝔯', + rhard: '⇁', + rharu: '⇀', + rharul: '⥬', + rho: 'ρ', + rhov: 'ϱ', + rightarrow: '→', + rightarrowtail: '↣', + rightharpoondown: '⇁', + rightharpoonup: '⇀', + rightleftarrows: '⇄', + rightleftharpoons: '⇌', + rightrightarrows: '⇉', + rightsquigarrow: '↝', + rightthreetimes: '⋌', + ring: '˚', + risingdotseq: '≓', + rlarr: '⇄', + rlhar: '⇌', + rlm: '‏', + rmoust: '⎱', + rmoustache: '⎱', + rnmid: '⫮', + roang: '⟭', + roarr: '⇾', + robrk: '⟧', + ropar: '⦆', + ropf: '𝕣', + roplus: '⨮', + rotimes: '⨵', + rpar: ')', + rpargt: '⦔', + rppolint: '⨒', + rrarr: '⇉', + rsaquo: '›', + rscr: '𝓇', + rsh: '↱', + rsqb: ']', + rsquo: '’', + rsquor: '’', + rthree: '⋌', + rtimes: '⋊', + rtri: '▹', + rtrie: '⊵', + rtrif: '▸', + rtriltri: '⧎', + ruluhar: '⥨', + rx: '℞', + sacute: 'ś', + sbquo: '‚', + sc: '≻', + scE: '⪴', + scap: '⪸', + scaron: 'š', + sccue: '≽', + sce: '⪰', + scedil: 'ş', + scirc: 'ŝ', + scnE: '⪶', + scnap: '⪺', + scnsim: '⋩', + scpolint: '⨓', + scsim: '≿', + scy: 'с', + sdot: '⋅', + sdotb: '⊡', + sdote: '⩦', + seArr: '⇘', + searhk: '⤥', + searr: '↘', + searrow: '↘', + sect: '§', + semi: ';', + seswar: '⤩', + setminus: '∖', + setmn: '∖', + sext: '✶', + sfr: '𝔰', + sfrown: '⌢', + sharp: '♯', + shchcy: 'щ', + shcy: 'ш', + shortmid: '∣', + shortparallel: '∥', + shy: '­', + sigma: 'σ', + sigmaf: 'ς', + sigmav: 'ς', + sim: '∼', + simdot: '⩪', + sime: '≃', + simeq: '≃', + simg: '⪞', + simgE: '⪠', + siml: '⪝', + simlE: '⪟', + simne: '≆', + simplus: '⨤', + simrarr: '⥲', + slarr: '←', + smallsetminus: '∖', + smashp: '⨳', + smeparsl: '⧤', + smid: '∣', + smile: '⌣', + smt: '⪪', + smte: '⪬', + smtes: '⪬︀', + softcy: 'ь', + sol: '/', + solb: '⧄', + solbar: '⌿', + sopf: '𝕤', + spades: '♠', + spadesuit: '♠', + spar: '∥', + sqcap: '⊓', + sqcaps: '⊓︀', + sqcup: '⊔', + sqcups: '⊔︀', + sqsub: '⊏', + sqsube: '⊑', + sqsubset: '⊏', + sqsubseteq: '⊑', + sqsup: '⊐', + sqsupe: '⊒', + sqsupset: '⊐', + sqsupseteq: '⊒', + squ: '□', + square: '□', + squarf: '▪', + squf: '▪', + srarr: '→', + sscr: '𝓈', + ssetmn: '∖', + ssmile: '⌣', + sstarf: '⋆', + star: '☆', + starf: '★', + straightepsilon: 'ϵ', + straightphi: 'ϕ', + strns: '¯', + sub: '⊂', + subE: '⫅', + subdot: '⪽', + sube: '⊆', + subedot: '⫃', + submult: '⫁', + subnE: '⫋', + subne: '⊊', + subplus: '⪿', + subrarr: '⥹', + subset: '⊂', + subseteq: '⊆', + subseteqq: '⫅', + subsetneq: '⊊', + subsetneqq: '⫋', + subsim: '⫇', + subsub: '⫕', + subsup: '⫓', + succ: '≻', + succapprox: '⪸', + succcurlyeq: '≽', + succeq: '⪰', + succnapprox: '⪺', + succneqq: '⪶', + succnsim: '⋩', + succsim: '≿', + sum: '∑', + sung: '♪', + sup1: '¹', + sup2: '²', + sup3: '³', + sup: '⊃', + supE: '⫆', + supdot: '⪾', + supdsub: '⫘', + supe: '⊇', + supedot: '⫄', + suphsol: '⟉', + suphsub: '⫗', + suplarr: '⥻', + supmult: '⫂', + supnE: '⫌', + supne: '⊋', + supplus: '⫀', + supset: '⊃', + supseteq: '⊇', + supseteqq: '⫆', + supsetneq: '⊋', + supsetneqq: '⫌', + supsim: '⫈', + supsub: '⫔', + supsup: '⫖', + swArr: '⇙', + swarhk: '⤦', + swarr: '↙', + swarrow: '↙', + swnwar: '⤪', + szlig: 'ß', + target: '⌖', + tau: 'τ', + tbrk: '⎴', + tcaron: 'ť', + tcedil: 'ţ', + tcy: 'т', + tdot: '⃛', + telrec: '⌕', + tfr: '𝔱', + there4: '∴', + therefore: '∴', + theta: 'θ', + thetasym: 'ϑ', + thetav: 'ϑ', + thickapprox: '≈', + thicksim: '∼', + thinsp: ' ', + thkap: '≈', + thksim: '∼', + thorn: 'þ', + tilde: '˜', + times: '×', + timesb: '⊠', + timesbar: '⨱', + timesd: '⨰', + tint: '∭', + toea: '⤨', + top: '⊤', + topbot: '⌶', + topcir: '⫱', + topf: '𝕥', + topfork: '⫚', + tosa: '⤩', + tprime: '‴', + trade: '™', + triangle: '▵', + triangledown: '▿', + triangleleft: '◃', + trianglelefteq: '⊴', + triangleq: '≜', + triangleright: '▹', + trianglerighteq: '⊵', + tridot: '◬', + trie: '≜', + triminus: '⨺', + triplus: '⨹', + trisb: '⧍', + tritime: '⨻', + trpezium: '⏢', + tscr: '𝓉', + tscy: 'ц', + tshcy: 'ћ', + tstrok: 'ŧ', + twixt: '≬', + twoheadleftarrow: '↞', + twoheadrightarrow: '↠', + uArr: '⇑', + uHar: '⥣', + uacute: 'ú', + uarr: '↑', + ubrcy: 'ў', + ubreve: 'ŭ', + ucirc: 'û', + ucy: 'у', + udarr: '⇅', + udblac: 'ű', + udhar: '⥮', + ufisht: '⥾', + ufr: '𝔲', + ugrave: 'ù', + uharl: '↿', + uharr: '↾', + uhblk: '▀', + ulcorn: '⌜', + ulcorner: '⌜', + ulcrop: '⌏', + ultri: '◸', + umacr: 'ū', + uml: '¨', + uogon: 'ų', + uopf: '𝕦', + uparrow: '↑', + updownarrow: '↕', + upharpoonleft: '↿', + upharpoonright: '↾', + uplus: '⊎', + upsi: 'υ', + upsih: 'ϒ', + upsilon: 'υ', + upuparrows: '⇈', + urcorn: '⌝', + urcorner: '⌝', + urcrop: '⌎', + uring: 'ů', + urtri: '◹', + uscr: '𝓊', + utdot: '⋰', + utilde: 'ũ', + utri: '▵', + utrif: '▴', + uuarr: '⇈', + uuml: 'ü', + uwangle: '⦧', + vArr: '⇕', + vBar: '⫨', + vBarv: '⫩', + vDash: '⊨', + vangrt: '⦜', + varepsilon: 'ϵ', + varkappa: 'ϰ', + varnothing: '∅', + varphi: 'ϕ', + varpi: 'ϖ', + varpropto: '∝', + varr: '↕', + varrho: 'ϱ', + varsigma: 'ς', + varsubsetneq: '⊊︀', + varsubsetneqq: '⫋︀', + varsupsetneq: '⊋︀', + varsupsetneqq: '⫌︀', + vartheta: 'ϑ', + vartriangleleft: '⊲', + vartriangleright: '⊳', + vcy: 'в', + vdash: '⊢', + vee: '∨', + veebar: '⊻', + veeeq: '≚', + vellip: '⋮', + verbar: '|', + vert: '|', + vfr: '𝔳', + vltri: '⊲', + vnsub: '⊂⃒', + vnsup: '⊃⃒', + vopf: '𝕧', + vprop: '∝', + vrtri: '⊳', + vscr: '𝓋', + vsubnE: '⫋︀', + vsubne: '⊊︀', + vsupnE: '⫌︀', + vsupne: '⊋︀', + vzigzag: '⦚', + wcirc: 'ŵ', + wedbar: '⩟', + wedge: '∧', + wedgeq: '≙', + weierp: '℘', + wfr: '𝔴', + wopf: '𝕨', + wp: '℘', + wr: '≀', + wreath: '≀', + wscr: '𝓌', + xcap: '⋂', + xcirc: '◯', + xcup: '⋃', + xdtri: '▽', + xfr: '𝔵', + xhArr: '⟺', + xharr: '⟷', + xi: 'ξ', + xlArr: '⟸', + xlarr: '⟵', + xmap: '⟼', + xnis: '⋻', + xodot: '⨀', + xopf: '𝕩', + xoplus: '⨁', + xotime: '⨂', + xrArr: '⟹', + xrarr: '⟶', + xscr: '𝓍', + xsqcup: '⨆', + xuplus: '⨄', + xutri: '△', + xvee: '⋁', + xwedge: '⋀', + yacute: 'ý', + yacy: 'я', + ycirc: 'ŷ', + ycy: 'ы', + yen: '¥', + yfr: '𝔶', + yicy: 'ї', + yopf: '𝕪', + yscr: '𝓎', + yucy: 'ю', + yuml: 'ÿ', + zacute: 'ź', + zcaron: 'ž', + zcy: 'з', + zdot: 'ż', + zeetrf: 'ℨ', + zeta: 'ζ', + zfr: '𝔷', + zhcy: 'ж', + zigrarr: '⇝', + zopf: '𝕫', + zscr: '𝓏', + zwj: '‍', + zwnj: '‌' +} + +;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js + + +const own = {}.hasOwnProperty + +/** + * Decode a single character reference (without the `&` or `;`). + * You probably only need this when you’re building parsers yourself that follow + * different rules compared to HTML. + * This is optimized to be tiny in browsers. + * + * @param {string} value + * `notin` (named), `#123` (deci), `#x123` (hexa). + * @returns {string|false} + * Decoded reference. + */ +function decodeNamedCharacterReference(value) { + return own.call(characterEntities, value) ? characterEntities[value] : false +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const characterReference = { + name: 'characterReference', + tokenize: tokenizeCharacterReference +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterReference(effects, ok, nok) { + const self = this + let size = 0 + /** @type {number} */ + let max + /** @type {(code: Code) => boolean} */ + let test + return start + + /** + * Start of character reference. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterReference') + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + return open + } + + /** + * After `&`, at `#` for numeric references or alphanumeric for named + * references. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 35) { + effects.enter('characterReferenceMarkerNumeric') + effects.consume(code) + effects.exit('characterReferenceMarkerNumeric') + return numeric + } + effects.enter('characterReferenceValue') + max = 31 + test = asciiAlphanumeric + return value(code) + } + + /** + * After `#`, at `x` for hexadecimals or digit for decimals. + * + * ```markdown + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function numeric(code) { + if (code === 88 || code === 120) { + effects.enter('characterReferenceMarkerHexadecimal') + effects.consume(code) + effects.exit('characterReferenceMarkerHexadecimal') + effects.enter('characterReferenceValue') + max = 6 + test = asciiHexDigit + return value + } + effects.enter('characterReferenceValue') + max = 7 + test = asciiDigit + return value(code) + } + + /** + * After markers (`&#x`, `&#`, or `&`), in value, before `;`. + * + * The character reference kind defines what and how many characters are + * allowed. + * + * ```markdown + * > | a&b + * ^^^ + * > | a{b + * ^^^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function value(code) { + if (code === 59 && size) { + const token = effects.exit('characterReferenceValue') + if ( + test === asciiAlphanumeric && + !decodeNamedCharacterReference(self.sliceSerialize(token)) + ) { + return nok(code) + } + + // To do: `markdown-rs` uses a different name: + // `CharacterReferenceMarkerSemi`. + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + effects.exit('characterReference') + return ok + } + if (test(code) && size++ < max) { + effects.consume(code) + return value + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const characterEscape = { + name: 'characterEscape', + tokenize: tokenizeCharacterEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterEscape(effects, ok, nok) { + return start + + /** + * Start of character escape. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterEscape') + effects.enter('escapeMarker') + effects.consume(code) + effects.exit('escapeMarker') + return inside + } + + /** + * After `\`, at punctuation. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + // ASCII punctuation. + if (asciiPunctuation(code)) { + effects.enter('characterEscapeValue') + effects.consume(code) + effects.exit('characterEscapeValue') + effects.exit('characterEscape') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const lineEnding = { + name: 'lineEnding', + tokenize: tokenizeLineEnding +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLineEnding(effects, ok) { + return start + + /** @type {State} */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, ok, 'linePrefix') + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + + +/** @type {Construct} */ +const labelEnd = { + name: 'labelEnd', + tokenize: tokenizeLabelEnd, + resolveTo: resolveToLabelEnd, + resolveAll: resolveAllLabelEnd +} + +/** @type {Construct} */ +const resourceConstruct = { + tokenize: tokenizeResource +} +/** @type {Construct} */ +const referenceFullConstruct = { + tokenize: tokenizeReferenceFull +} +/** @type {Construct} */ +const referenceCollapsedConstruct = { + tokenize: tokenizeReferenceCollapsed +} + +/** @type {Resolver} */ +function resolveAllLabelEnd(events) { + let index = -1 + while (++index < events.length) { + const token = events[index][1] + if ( + token.type === 'labelImage' || + token.type === 'labelLink' || + token.type === 'labelEnd' + ) { + // Remove the marker. + events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) + token.type = 'data' + index++ + } + } + return events +} + +/** @type {Resolver} */ +function resolveToLabelEnd(events, context) { + let index = events.length + let offset = 0 + /** @type {Token} */ + let token + /** @type {number | undefined} */ + let open + /** @type {number | undefined} */ + let close + /** @type {Array} */ + let media + + // Find an opening. + while (index--) { + token = events[index][1] + if (open) { + // If we see another link, or inactive link label, we’ve been here before. + if ( + token.type === 'link' || + (token.type === 'labelLink' && token._inactive) + ) { + break + } + + // Mark other link openings as inactive, as we can’t have links in + // links. + if (events[index][0] === 'enter' && token.type === 'labelLink') { + token._inactive = true + } + } else if (close) { + if ( + events[index][0] === 'enter' && + (token.type === 'labelImage' || token.type === 'labelLink') && + !token._balanced + ) { + open = index + if (token.type !== 'labelLink') { + offset = 2 + break + } + } + } else if (token.type === 'labelEnd') { + close = index + } + } + const group = { + type: events[open][1].type === 'labelLink' ? 'link' : 'image', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + const label = { + type: 'label', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[close][1].end) + } + const text = { + type: 'labelText', + start: Object.assign({}, events[open + offset + 2][1].end), + end: Object.assign({}, events[close - 2][1].start) + } + media = [ + ['enter', group, context], + ['enter', label, context] + ] + + // Opening marker. + media = push(media, events.slice(open + 1, open + offset + 3)) + + // Text open. + media = push(media, [['enter', text, context]]) + + // Always populated by defaults. + + // Between. + media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ) + + // Text close, marker close, label close. + media = push(media, [ + ['exit', text, context], + events[close - 2], + events[close - 1], + ['exit', label, context] + ]) + + // Reference, resource, or so. + media = push(media, events.slice(close + 1)) + + // Media close. + media = push(media, [['exit', group, context]]) + splice(events, open, events.length, media) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelEnd(effects, ok, nok) { + const self = this + let index = self.events.length + /** @type {Token} */ + let labelStart + /** @type {boolean} */ + let defined + + // Find an opening. + while (index--) { + if ( + (self.events[index][1].type === 'labelImage' || + self.events[index][1].type === 'labelLink') && + !self.events[index][1]._balanced + ) { + labelStart = self.events[index][1] + break + } + } + return start + + /** + * Start of label end. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ``` + * + * @type {State} + */ + function start(code) { + // If there is not an okay opening. + if (!labelStart) { + return nok(code) + } + + // If the corresponding label (link) start is marked as inactive, + // it means we’d be wrapping a link, like this: + // + // ```markdown + // > | a [b [c](d) e](f) g. + // ^ + // ``` + // + // We can’t have that, so it’s just balanced brackets. + if (labelStart._inactive) { + return labelEndNok(code) + } + defined = self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize({ + start: labelStart.end, + end: self.now() + }) + ) + ) + effects.enter('labelEnd') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelEnd') + return after + } + + /** + * After `]`. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + // Note: `markdown-rs` also parses GFM footnotes here, which for us is in + // an extension. + + // Resource (`[asd](fgh)`)? + if (code === 40) { + return effects.attempt( + resourceConstruct, + labelEndOk, + defined ? labelEndOk : labelEndNok + )(code) + } + + // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? + if (code === 91) { + return effects.attempt( + referenceFullConstruct, + labelEndOk, + defined ? referenceNotFull : labelEndNok + )(code) + } + + // Shortcut (`[asd]`) reference? + return defined ? labelEndOk(code) : labelEndNok(code) + } + + /** + * After `]`, at `[`, but not at a full reference. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function referenceNotFull(code) { + return effects.attempt( + referenceCollapsedConstruct, + labelEndOk, + labelEndNok + )(code) + } + + /** + * Done, we found something. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndOk(code) { + // Note: `markdown-rs` does a bunch of stuff here. + return ok(code) + } + + /** + * Done, it’s nothing. + * + * There was an okay opening, but we didn’t match anything. + * + * ```markdown + * > | [a](b c + * ^ + * > | [a][b c + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndNok(code) { + labelStart._balanced = true + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeResource(effects, ok, nok) { + return resourceStart + + /** + * At a resource. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceStart(code) { + effects.enter('resource') + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + return resourceBefore + } + + /** + * In resource, after `(`, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceOpen)(code) + : resourceOpen(code) + } + + /** + * In resource, after optional whitespace, at `)` or a destination. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceOpen(code) { + if (code === 41) { + return resourceEnd(code) + } + return factoryDestination( + effects, + resourceDestinationAfter, + resourceDestinationMissing, + 'resourceDestination', + 'resourceDestinationLiteral', + 'resourceDestinationLiteralMarker', + 'resourceDestinationRaw', + 'resourceDestinationString', + 32 + )(code) + } + + /** + * In resource, after destination, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceBetween)(code) + : resourceEnd(code) + } + + /** + * At invalid destination. + * + * ```markdown + * > | [a](<<) b + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationMissing(code) { + return nok(code) + } + + /** + * In resource, after destination and whitespace, at `(` or title. + * + * ```markdown + * > | [a](b ) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBetween(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + resourceTitleAfter, + nok, + 'resourceTitle', + 'resourceTitleMarker', + 'resourceTitleString' + )(code) + } + return resourceEnd(code) + } + + /** + * In resource, after title, at optional whitespace. + * + * ```markdown + * > | [a](b "c") d + * ^ + * ``` + * + * @type {State} + */ + function resourceTitleAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceEnd)(code) + : resourceEnd(code) + } + + /** + * In resource, at `)`. + * + * ```markdown + * > | [a](b) d + * ^ + * ``` + * + * @type {State} + */ + function resourceEnd(code) { + if (code === 41) { + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + effects.exit('resource') + return ok + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceFull(effects, ok, nok) { + const self = this + return referenceFull + + /** + * In a reference (full), at the `[`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFull(code) { + return factoryLabel.call( + self, + effects, + referenceFullAfter, + referenceFullMissing, + 'reference', + 'referenceMarker', + 'referenceString' + )(code) + } + + /** + * In a reference (full), after `]`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullAfter(code) { + return self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + ) + ? ok(code) + : nok(code) + } + + /** + * In reference (full) that was missing. + * + * ```markdown + * > | [a][b d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullMissing(code) { + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceCollapsed(effects, ok, nok) { + return referenceCollapsedStart + + /** + * In reference (collapsed), at `[`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedStart(code) { + // We only attempt a collapsed label if there’s a `[`. + + effects.enter('reference') + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + return referenceCollapsedOpen + } + + /** + * In reference (collapsed), at `]`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedOpen(code) { + if (code === 93) { + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + effects.exit('reference') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartImage = { + name: 'labelStartImage', + tokenize: tokenizeLabelStartImage, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartImage(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (image) start. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelImage') + effects.enter('labelImageMarker') + effects.consume(code) + effects.exit('labelImageMarker') + return open + } + + /** + * After `!`, at `[`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 91) { + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelImage') + return after + } + return nok(code) + } + + /** + * After `![`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * This is needed in because, when GFM footnotes are enabled, images never + * form when started with a `^`. + * Instead, links form: + * + * ```markdown + * ![^a](b) + * + * ![^a][b] + * + * [b]: c + * ``` + * + * ```html + *

!^a

+ *

!^a

+ * ``` + * + * @type {State} + */ + function after(code) { + // To do: use a new field to do this, this is still needed for + // `micromark-extension-gfm-footnote`, but the `label-start-link` + // behavior isn’t. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + +/** + * Classify whether a code represents whitespace, punctuation, or something + * else. + * + * Used for attention (emphasis, strong), whose sequences can open or close + * based on the class of surrounding characters. + * + * > 👉 **Note**: eof (`null`) is seen as whitespace. + * + * @param {Code} code + * Code. + * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} + * Group. + */ +function classifyCharacter(code) { + if ( + code === null || + markdownLineEndingOrSpace(code) || + unicodeWhitespace(code) + ) { + return 1 + } + if (unicodePunctuation(code)) { + return 2 + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const attention = { + name: 'attention', + tokenize: tokenizeAttention, + resolveAll: resolveAllAttention +} + +/** + * Take all events and resolve attention to emphasis or strong. + * + * @type {Resolver} + */ +function resolveAllAttention(events, context) { + let index = -1 + /** @type {number} */ + let open + /** @type {Token} */ + let group + /** @type {Token} */ + let text + /** @type {Token} */ + let openingSequence + /** @type {Token} */ + let closingSequence + /** @type {number} */ + let use + /** @type {Array} */ + let nextEvents + /** @type {number} */ + let offset + + // Walk through all events. + // + // Note: performance of this is fine on an mb of normal markdown, but it’s + // a bottleneck for malicious stuff. + while (++index < events.length) { + // Find a token that can close. + if ( + events[index][0] === 'enter' && + events[index][1].type === 'attentionSequence' && + events[index][1]._close + ) { + open = index + + // Now walk back to find an opener. + while (open--) { + // Find a token that can open the closer. + if ( + events[open][0] === 'exit' && + events[open][1].type === 'attentionSequence' && + events[open][1]._open && + // If the markers are the same: + context.sliceSerialize(events[open][1]).charCodeAt(0) === + context.sliceSerialize(events[index][1]).charCodeAt(0) + ) { + // If the opening can close or the closing can open, + // and the close size *is not* a multiple of three, + // but the sum of the opening and closing size *is* multiple of three, + // then don’t match. + if ( + (events[open][1]._close || events[index][1]._open) && + (events[index][1].end.offset - events[index][1].start.offset) % 3 && + !( + (events[open][1].end.offset - + events[open][1].start.offset + + events[index][1].end.offset - + events[index][1].start.offset) % + 3 + ) + ) { + continue + } + + // Number of markers to use from the sequence. + use = + events[open][1].end.offset - events[open][1].start.offset > 1 && + events[index][1].end.offset - events[index][1].start.offset > 1 + ? 2 + : 1 + const start = Object.assign({}, events[open][1].end) + const end = Object.assign({}, events[index][1].start) + movePoint(start, -use) + movePoint(end, use) + openingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start, + end: Object.assign({}, events[open][1].end) + } + closingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start: Object.assign({}, events[index][1].start), + end + } + text = { + type: use > 1 ? 'strongText' : 'emphasisText', + start: Object.assign({}, events[open][1].end), + end: Object.assign({}, events[index][1].start) + } + group = { + type: use > 1 ? 'strong' : 'emphasis', + start: Object.assign({}, openingSequence.start), + end: Object.assign({}, closingSequence.end) + } + events[open][1].end = Object.assign({}, openingSequence.start) + events[index][1].start = Object.assign({}, closingSequence.end) + nextEvents = [] + + // If there are more markers in the opening, add them before. + if (events[open][1].end.offset - events[open][1].start.offset) { + nextEvents = push(nextEvents, [ + ['enter', events[open][1], context], + ['exit', events[open][1], context] + ]) + } + + // Opening. + nextEvents = push(nextEvents, [ + ['enter', group, context], + ['enter', openingSequence, context], + ['exit', openingSequence, context], + ['enter', text, context] + ]) + + // Always populated by defaults. + + // Between. + nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index), + context + ) + ) + + // Closing. + nextEvents = push(nextEvents, [ + ['exit', text, context], + ['enter', closingSequence, context], + ['exit', closingSequence, context], + ['exit', group, context] + ]) + + // If there are more markers in the closing, add them after. + if (events[index][1].end.offset - events[index][1].start.offset) { + offset = 2 + nextEvents = push(nextEvents, [ + ['enter', events[index][1], context], + ['exit', events[index][1], context] + ]) + } else { + offset = 0 + } + splice(events, open - 1, index - open + 3, nextEvents) + index = open + nextEvents.length - offset - 2 + break + } + } + } + } + + // Remove remaining sequences. + index = -1 + while (++index < events.length) { + if (events[index][1].type === 'attentionSequence') { + events[index][1].type = 'data' + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAttention(effects, ok) { + const attentionMarkers = this.parser.constructs.attentionMarkers.null + const previous = this.previous + const before = classifyCharacter(previous) + + /** @type {NonNullable} */ + let marker + return start + + /** + * Before a sequence. + * + * ```markdown + * > | ** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + marker = code + effects.enter('attentionSequence') + return inside(code) + } + + /** + * In a sequence. + * + * ```markdown + * > | ** + * ^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + const token = effects.exit('attentionSequence') + + // To do: next major: move this to resolver, just like `markdown-rs`. + const after = classifyCharacter(code) + + // Always populated by defaults. + + const open = + !after || (after === 2 && before) || attentionMarkers.includes(code) + const close = + !before || (before === 2 && after) || attentionMarkers.includes(previous) + token._open = Boolean(marker === 42 ? open : open && (before || !close)) + token._close = Boolean(marker === 42 ? close : close && (after || !open)) + return ok(code) + } +} + +/** + * Move a point a bit. + * + * Note: `move` only works inside lines! It’s not possible to move past other + * chunks (replacement characters, tabs, or line endings). + * + * @param {Point} point + * @param {number} offset + * @returns {void} + */ +function movePoint(point, offset) { + point.column += offset + point.offset += offset + point._bufferIndex += offset +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const autolink = { + name: 'autolink', + tokenize: tokenizeAutolink +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAutolink(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of an autolink. + * + * ```markdown + * > | ab + * ^ + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('autolink') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.enter('autolinkProtocol') + return open + } + + /** + * After `<`, at protocol or atext. + * + * ```markdown + * > | ab + * ^ + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (asciiAlpha(code)) { + effects.consume(code) + return schemeOrEmailAtext + } + return emailAtext(code) + } + + /** + * At second byte of protocol or atext. + * + * ```markdown + * > | ab + * ^ + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function schemeOrEmailAtext(code) { + // ASCII alphanumeric and `+`, `-`, and `.`. + if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { + // Count the previous alphabetical from `open` too. + size = 1 + return schemeInsideOrEmailAtext(code) + } + return emailAtext(code) + } + + /** + * In ambiguous protocol or atext. + * + * ```markdown + * > | ab + * ^ + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function schemeInsideOrEmailAtext(code) { + if (code === 58) { + effects.consume(code) + size = 0 + return urlInside + } + + // ASCII alphanumeric and `+`, `-`, and `.`. + if ( + (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && + size++ < 32 + ) { + effects.consume(code) + return schemeInsideOrEmailAtext + } + size = 0 + return emailAtext(code) + } + + /** + * After protocol, in URL. + * + * ```markdown + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function urlInside(code) { + if (code === 62) { + effects.exit('autolinkProtocol') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + + // ASCII control, space, or `<`. + if (code === null || code === 32 || code === 60 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return urlInside + } + + /** + * In email atext. + * + * ```markdown + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function emailAtext(code) { + if (code === 64) { + effects.consume(code) + return emailAtSignOrDot + } + if (asciiAtext(code)) { + effects.consume(code) + return emailAtext + } + return nok(code) + } + + /** + * In label, after at-sign or dot. + * + * ```markdown + * > | ab + * ^ ^ + * ``` + * + * @type {State} + */ + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) + } + + /** + * In label, where `.` and `>` are allowed. + * + * ```markdown + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function emailLabel(code) { + if (code === 46) { + effects.consume(code) + size = 0 + return emailAtSignOrDot + } + if (code === 62) { + // Exit, then change the token type. + effects.exit('autolinkProtocol').type = 'autolinkEmail' + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + return emailValue(code) + } + + /** + * In label, where `.` and `>` are *not* allowed. + * + * Though, this is also used in `emailLabel` to parse other values. + * + * ```markdown + * > | ab + * ^ + * ``` + * + * @type {State} + */ + function emailValue(code) { + // ASCII alphanumeric or `-`. + if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { + const next = code === 45 ? emailValue : emailLabel + effects.consume(code) + return next + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const htmlText = { + name: 'htmlText', + tokenize: tokenizeHtmlText +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlText(effects, ok, nok) { + const self = this + /** @type {NonNullable | undefined} */ + let marker + /** @type {number} */ + let index + /** @type {State} */ + let returnState + return start + + /** + * Start of HTML (text). + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('htmlText') + effects.enter('htmlTextData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | a c + * ^ + * > | a c + * ^ + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + return instruction + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagOpen + } + return nok(code) + } + + /** + * After ` | a c + * ^ + * > | a c + * ^ + * > | a &<]]> c + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + index = 0 + return cdataOpenInside + } + if (asciiAlpha(code)) { + effects.consume(code) + return declaration + } + return nok(code) + } + + /** + * In a comment, after ` | a c + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return nok(code) + } + + /** + * In comment. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function comment(code) { + if (code === null) { + return nok(code) + } + if (code === 45) { + effects.consume(code) + return commentClose + } + if (markdownLineEnding(code)) { + returnState = comment + return lineEndingBefore(code) + } + effects.consume(code) + return comment + } + + /** + * In comment, after `-`. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function commentClose(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return comment(code) + } + + /** + * In comment, after `--`. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function commentEnd(code) { + return code === 62 + ? end(code) + : code === 45 + ? commentClose(code) + : comment(code) + } + + /** + * After ` | a &<]]> b + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + return index === value.length ? cdata : cdataOpenInside + } + return nok(code) + } + + /** + * In CDATA. + * + * ```markdown + * > | a &<]]> b + * ^^^ + * ``` + * + * @type {State} + */ + function cdata(code) { + if (code === null) { + return nok(code) + } + if (code === 93) { + effects.consume(code) + return cdataClose + } + if (markdownLineEnding(code)) { + returnState = cdata + return lineEndingBefore(code) + } + effects.consume(code) + return cdata + } + + /** + * In CDATA, after `]`, at another `]`. + * + * ```markdown + * > | a &<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataClose(code) { + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In CDATA, after `]]`, at `>`. + * + * ```markdown + * > | a &<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataEnd(code) { + if (code === 62) { + return end(code) + } + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In declaration. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function declaration(code) { + if (code === null || code === 62) { + return end(code) + } + if (markdownLineEnding(code)) { + returnState = declaration + return lineEndingBefore(code) + } + effects.consume(code) + return declaration + } + + /** + * In instruction. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function instruction(code) { + if (code === null) { + return nok(code) + } + if (code === 63) { + effects.consume(code) + return instructionClose + } + if (markdownLineEnding(code)) { + returnState = instruction + return lineEndingBefore(code) + } + effects.consume(code) + return instruction + } + + /** + * In instruction, after `?`, at `>`. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function instructionClose(code) { + return code === 62 ? end(code) : instruction(code) + } + + /** + * After ` | a c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagClose + } + return nok(code) + } + + /** + * After ` | a c + * ^ + * ``` + * + * @type {State} + */ + function tagClose(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagClose + } + return tagCloseBetween(code) + } + + /** + * In closing tag, after tag name. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseBetween(code) { + if (markdownLineEnding(code)) { + returnState = tagCloseBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagCloseBetween + } + return end(code) + } + + /** + * After ` | a c + * ^ + * ``` + * + * @type {State} + */ + function tagOpen(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagOpen + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In opening tag, after tag name. + * + * ```markdown + * > | a c + * ^ + * ``` + * + * @type {State} + */ + function tagOpenBetween(code) { + if (code === 47) { + effects.consume(code) + return end + } + + // ASCII alphabetical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return tagOpenAttributeName + } + if (markdownLineEnding(code)) { + returnState = tagOpenBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenBetween + } + return end(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | a d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeName(code) { + // ASCII alphabetical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return tagOpenAttributeName + } + return tagOpenAttributeNameAfter(code) + } + + /** + * After attribute name, before initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | a d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeNameAfter + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeNameAfter + } + return tagOpenBetween(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | a e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + marker = code + return tagOpenAttributeValueQuoted + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueBefore + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | a e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code) + marker = undefined + return tagOpenAttributeValueQuotedAfter + } + if (code === null) { + return nok(code) + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueQuoted + return lineEndingBefore(code) + } + effects.consume(code) + return tagOpenAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | a e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 60 || + code === 61 || + code === 96 + ) { + return nok(code) + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the end + * of the tag. + * + * ```markdown + * > | a e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In certain circumstances of a tag where only an `>` is allowed. + * + * ```markdown + * > | a e + * ^ + * ``` + * + * @type {State} + */ + function end(code) { + if (code === 62) { + effects.consume(code) + effects.exit('htmlTextData') + effects.exit('htmlText') + return ok + } + return nok(code) + } + + /** + * At eol. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * > | a + * ``` + * + * @type {State} + */ + function lineEndingBefore(code) { + effects.exit('htmlTextData') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineEndingAfter + } + + /** + * After eol, at optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfter(code) { + // Always populated by defaults. + + return markdownSpace(code) + ? factorySpace( + effects, + lineEndingAfterPrefix, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : lineEndingAfterPrefix(code) + } + + /** + * After eol, after optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfterPrefix(code) { + effects.enter('htmlTextData') + return returnState(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartLink = { + name: 'labelStartLink', + tokenize: tokenizeLabelStartLink, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartLink(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (link) start. + * + * ```markdown + * > | a [b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelLink') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelLink') + return after + } + + /** @type {State} */ + function after(code) { + // To do: this isn’t needed in `micromark-extension-gfm-footnote`, + // remove. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const hardBreakEscape = { + name: 'hardBreakEscape', + tokenize: tokenizeHardBreakEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHardBreakEscape(effects, ok, nok) { + return start + + /** + * Start of a hard break (escape). + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('hardBreakEscape') + effects.consume(code) + return after + } + + /** + * After `\`, at eol. + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownLineEnding(code)) { + effects.exit('hardBreakEscape') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Previous} Previous + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const codeText = { + name: 'codeText', + tokenize: tokenizeCodeText, + resolve: resolveCodeText, + previous +} + +// To do: next major: don’t resolve, like `markdown-rs`. +/** @type {Resolver} */ +function resolveCodeText(events) { + let tailExitIndex = events.length - 4 + let headEnterIndex = 3 + /** @type {number} */ + let index + /** @type {number | undefined} */ + let enter + + // If we start and end with an EOL or a space. + if ( + (events[headEnterIndex][1].type === 'lineEnding' || + events[headEnterIndex][1].type === 'space') && + (events[tailExitIndex][1].type === 'lineEnding' || + events[tailExitIndex][1].type === 'space') + ) { + index = headEnterIndex + + // And we have data. + while (++index < tailExitIndex) { + if (events[index][1].type === 'codeTextData') { + // Then we have padding. + events[headEnterIndex][1].type = 'codeTextPadding' + events[tailExitIndex][1].type = 'codeTextPadding' + headEnterIndex += 2 + tailExitIndex -= 2 + break + } + } + } + + // Merge adjacent spaces and data. + index = headEnterIndex - 1 + tailExitIndex++ + while (++index <= tailExitIndex) { + if (enter === undefined) { + if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { + enter = index + } + } else if ( + index === tailExitIndex || + events[index][1].type === 'lineEnding' + ) { + events[enter][1].type = 'codeTextData' + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + tailExitIndex -= index - enter - 2 + index = enter + 2 + } + enter = undefined + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Previous} + */ +function previous(code) { + // If there is a previous code, there will always be a tail. + return ( + code !== 96 || + this.events[this.events.length - 1][1].type === 'characterEscape' + ) +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeText(effects, ok, nok) { + const self = this + let sizeOpen = 0 + /** @type {number} */ + let size + /** @type {Token} */ + let token + return start + + /** + * Start of code (text). + * + * ```markdown + * > | `a` + * ^ + * > | \`a` + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('codeText') + effects.enter('codeTextSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 96) { + effects.consume(code) + sizeOpen++ + return sequenceOpen + } + effects.exit('codeTextSequence') + return between(code) + } + + /** + * Between something and something else. + * + * ```markdown + * > | `a` + * ^^ + * ``` + * + * @type {State} + */ + function between(code) { + // EOF. + if (code === null) { + return nok(code) + } + + // To do: next major: don’t do spaces in resolve, but when compiling, + // like `markdown-rs`. + // Tabs don’t work, and virtual spaces don’t make sense. + if (code === 32) { + effects.enter('space') + effects.consume(code) + effects.exit('space') + return between + } + + // Closing fence? Could also be data. + if (code === 96) { + token = effects.enter('codeTextSequence') + size = 0 + return sequenceClose(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return between + } + + // Data. + effects.enter('codeTextData') + return data(code) + } + + /** + * In data. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if ( + code === null || + code === 32 || + code === 96 || + markdownLineEnding(code) + ) { + effects.exit('codeTextData') + return between(code) + } + effects.consume(code) + return data + } + + /** + * In closing sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + // More. + if (code === 96) { + effects.consume(code) + size++ + return sequenceClose + } + + // Done! + if (size === sizeOpen) { + effects.exit('codeTextSequence') + effects.exit('codeText') + return ok(code) + } + + // More or less accents: mark as data. + token.type = 'codeTextData' + return data(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + */ + + + + +/** @satisfies {Extension['document']} */ +const constructs_document = { + [42]: list, + [43]: list, + [45]: list, + [48]: list, + [49]: list, + [50]: list, + [51]: list, + [52]: list, + [53]: list, + [54]: list, + [55]: list, + [56]: list, + [57]: list, + [62]: blockQuote +} + +/** @satisfies {Extension['contentInitial']} */ +const contentInitial = { + [91]: definition +} + +/** @satisfies {Extension['flowInitial']} */ +const flowInitial = { + [-2]: codeIndented, + [-1]: codeIndented, + [32]: codeIndented +} + +/** @satisfies {Extension['flow']} */ +const constructs_flow = { + [35]: headingAtx, + [42]: thematicBreak, + [45]: [setextUnderline, thematicBreak], + [60]: htmlFlow, + [61]: setextUnderline, + [95]: thematicBreak, + [96]: codeFenced, + [126]: codeFenced +} + +/** @satisfies {Extension['string']} */ +const constructs_string = { + [38]: characterReference, + [92]: characterEscape +} + +/** @satisfies {Extension['text']} */ +const constructs_text = { + [-5]: lineEnding, + [-4]: lineEnding, + [-3]: lineEnding, + [33]: labelStartImage, + [38]: characterReference, + [42]: attention, + [60]: [autolink, htmlText], + [91]: labelStartLink, + [92]: [hardBreakEscape, characterEscape], + [93]: labelEnd, + [95]: attention, + [96]: codeText +} + +/** @satisfies {Extension['insideSpan']} */ +const insideSpan = { + null: [attention, resolver] +} + +/** @satisfies {Extension['attentionMarkers']} */ +const attentionMarkers = { + null: [42, 95] +} + +/** @satisfies {Extension['disable']} */ +const disable = { + null: [] +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js +/** + * @typedef {import('micromark-util-types').Create} Create + * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + */ + + + + + + + + + +/** + * @param {ParseOptions | null | undefined} [options] + * @returns {ParseContext} + */ +function parse(options) { + const settings = options || {} + const constructs = + /** @type {FullNormalizedExtension} */ + combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) + + /** @type {ParseContext} */ + const parser = { + defined: [], + lazy: {}, + constructs, + content: create(content), + document: create(document_document), + flow: create(flow), + string: create(string), + text: create(text_text) + } + return parser + + /** + * @param {InitialConstruct} initial + */ + function create(initial) { + return creator + /** @type {Create} */ + function creator(from) { + return createTokenizer(parser, initial, from) + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Value} Value + */ + +/** + * @callback Preprocessor + * @param {Value} value + * @param {Encoding | null | undefined} [encoding] + * @param {boolean | null | undefined} [end=false] + * @returns {Array} + */ + +const search = /[\0\t\n\r]/g + +/** + * @returns {Preprocessor} + */ +function preprocess() { + let column = 1 + let buffer = '' + /** @type {boolean | undefined} */ + let start = true + /** @type {boolean | undefined} */ + let atCarriageReturn + return preprocessor + + /** @type {Preprocessor} */ + function preprocessor(value, encoding, end) { + /** @type {Array} */ + const chunks = [] + /** @type {RegExpMatchArray | null} */ + let match + /** @type {number} */ + let next + /** @type {number} */ + let startPosition + /** @type {number} */ + let endPosition + /** @type {Code} */ + let code + + // @ts-expect-error `Buffer` does allow an encoding. + value = buffer + value.toString(encoding) + startPosition = 0 + buffer = '' + if (start) { + // To do: `markdown-rs` actually parses BOMs (byte order mark). + if (value.charCodeAt(0) === 65279) { + startPosition++ + } + start = undefined + } + while (startPosition < value.length) { + search.lastIndex = startPosition + match = search.exec(value) + endPosition = + match && match.index !== undefined ? match.index : value.length + code = value.charCodeAt(endPosition) + if (!match) { + buffer = value.slice(startPosition) + break + } + if (code === 10 && startPosition === endPosition && atCarriageReturn) { + chunks.push(-3) + atCarriageReturn = undefined + } else { + if (atCarriageReturn) { + chunks.push(-5) + atCarriageReturn = undefined + } + if (startPosition < endPosition) { + chunks.push(value.slice(startPosition, endPosition)) + column += endPosition - startPosition + } + switch (code) { + case 0: { + chunks.push(65533) + column++ + break + } + case 9: { + next = Math.ceil(column / 4) * 4 + chunks.push(-2) + while (column++ < next) chunks.push(-1) + break + } + case 10: { + chunks.push(-4) + column = 1 + break + } + default: { + atCarriageReturn = true + column = 1 + } + } + } + startPosition = endPosition + 1 + } + if (end) { + if (atCarriageReturn) chunks.push(-5) + if (buffer) chunks.push(buffer) + chunks.push(null) + } + return chunks + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js +/** + * @typedef {import('micromark-util-types').Event} Event + */ + + + +/** + * @param {Array} events + * @returns {Array} + */ +function postprocess(events) { + while (!subtokenize(events)) { + // Empty + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js +/** + * Turn the number (in string form as either hexa- or plain decimal) coming from + * a numeric character reference into a character. + * + * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes + * non-characters and control characters safe. + * + * @param {string} value + * Value to decode. + * @param {number} base + * Numeric base. + * @returns {string} + * Character. + */ +function decodeNumericCharacterReference(value, base) { + const code = Number.parseInt(value, base) + if ( + // C0 except for HT, LF, FF, CR, space. + code < 9 || + code === 11 || + (code > 13 && code < 32) || + // Control character (DEL) of C0, and C1 controls. + (code > 126 && code < 160) || + // Lone high surrogates and low surrogates. + (code > 55295 && code < 57344) || + // Noncharacters. + (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || + (code & 65535) === 65535 || + (code & 65535) === 65534 /* eslint-enable no-bitwise */ || + // Out of range + code > 1114111 + ) { + return '\uFFFD' + } + return String.fromCharCode(code) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js + + +const characterEscapeOrReference = + /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi + +/** + * Decode markdown strings (which occur in places such as fenced code info + * strings, destinations, labels, and titles). + * + * The “string” content type allows character escapes and -references. + * This decodes those. + * + * @param {string} value + * Value to decode. + * @returns {string} + * Decoded value. + */ +function decodeString(value) { + return value.replace(characterEscapeOrReference, decode) +} + +/** + * @param {string} $0 + * @param {string} $1 + * @param {string} $2 + * @returns {string} + */ +function decode($0, $1, $2) { + if ($1) { + // Escape. + return $1 + } + + // Reference. + const head = $2.charCodeAt(0) + if (head === 35) { + const head = $2.charCodeAt(1) + const hex = head === 120 || head === 88 + return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) + } + return decodeNamedCharacterReference($2) || $0 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js +/** + * @typedef {import('unist').Node} Node + * @typedef {import('unist').Point} Point + * @typedef {import('unist').Position} Position + */ + +/** + * @typedef NodeLike + * @property {string} type + * @property {PositionLike | null | undefined} [position] + * + * @typedef PositionLike + * @property {PointLike | null | undefined} [start] + * @property {PointLike | null | undefined} [end] + * + * @typedef PointLike + * @property {number | null | undefined} [line] + * @property {number | null | undefined} [column] + * @property {number | null | undefined} [offset] + */ + +/** + * Serialize the positional info of a point, position (start and end points), + * or node. + * + * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] + * Node, position, or point. + * @returns {string} + * Pretty printed positional info of a node (`string`). + * + * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) + * or a point `l:c` (when given `point`), where `l` stands for line, `c` for + * column, `s` for `start`, and `e` for end. + * An empty string (`''`) is returned if the given value is neither `node`, + * `position`, nor `point`. + */ +function stringifyPosition(value) { + // Nothing. + if (!value || typeof value !== 'object') { + return '' + } + + // Node. + if ('position' in value || 'type' in value) { + return position(value.position) + } + + // Position. + if ('start' in value || 'end' in value) { + return position(value) + } + + // Point. + if ('line' in value || 'column' in value) { + return point(value) + } + + // ? + return '' +} + +/** + * @param {Point | PointLike | null | undefined} point + * @returns {string} + */ +function point(point) { + return index(point && point.line) + ':' + index(point && point.column) +} + +/** + * @param {Position | PositionLike | null | undefined} pos + * @returns {string} + */ +function position(pos) { + return point(pos && pos.start) + '-' + point(pos && pos.end) +} + +/** + * @param {number | null | undefined} value + * @returns {number} + */ +function index(value) { + return value && typeof value === 'number' ? value : 1 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js +/** + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Value} Value + * + * @typedef {import('unist').Parent} UnistParent + * @typedef {import('unist').Point} Point + * + * @typedef {import('mdast').PhrasingContent} PhrasingContent + * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent + * @typedef {import('mdast').Content} Content + * @typedef {import('mdast').Break} Break + * @typedef {import('mdast').Blockquote} Blockquote + * @typedef {import('mdast').Code} Code + * @typedef {import('mdast').Definition} Definition + * @typedef {import('mdast').Emphasis} Emphasis + * @typedef {import('mdast').Heading} Heading + * @typedef {import('mdast').HTML} HTML + * @typedef {import('mdast').Image} Image + * @typedef {import('mdast').ImageReference} ImageReference + * @typedef {import('mdast').InlineCode} InlineCode + * @typedef {import('mdast').Link} Link + * @typedef {import('mdast').LinkReference} LinkReference + * @typedef {import('mdast').List} List + * @typedef {import('mdast').ListItem} ListItem + * @typedef {import('mdast').Paragraph} Paragraph + * @typedef {import('mdast').Root} Root + * @typedef {import('mdast').Strong} Strong + * @typedef {import('mdast').Text} Text + * @typedef {import('mdast').ThematicBreak} ThematicBreak + * @typedef {import('mdast').ReferenceType} ReferenceType + * @typedef {import('../index.js').CompileData} CompileData + */ + +/** + * @typedef {Root | Content} Node + * @typedef {Extract} Parent + * + * @typedef {Omit & {type: 'fragment', children: Array}} Fragment + */ + +/** + * @callback Transform + * Extra transform, to change the AST afterwards. + * @param {Root} tree + * Tree to transform. + * @returns {Root | undefined | null | void} + * New tree or nothing (in which case the current tree is used). + * + * @callback Handle + * Handle a token. + * @param {CompileContext} this + * Context. + * @param {Token} token + * Current token. + * @returns {void} + * Nothing. + * + * @typedef {Record} Handles + * Token types mapping to handles + * + * @callback OnEnterError + * Handle the case where the `right` token is open, but it is closed (by the + * `left` token) or because we reached the end of the document. + * @param {Omit} this + * Context. + * @param {Token | undefined} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @callback OnExitError + * Handle the case where the `right` token is open but it is closed by + * exiting the `left` token. + * @param {Omit} this + * Context. + * @param {Token} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @typedef {[Token, OnEnterError | undefined]} TokenTuple + * Open token on the stack, with an optional error handler for when + * that token isn’t closed properly. + */ + +/** + * @typedef Config + * Configuration. + * + * We have our defaults, but extensions will add more. + * @property {Array} canContainEols + * Token types where line endings are used. + * @property {Handles} enter + * Opening handles. + * @property {Handles} exit + * Closing handles. + * @property {Array} transforms + * Tree transforms. + * + * @typedef {Partial} Extension + * Change how markdown tokens from micromark are turned into mdast. + * + * @typedef CompileContext + * mdast compiler context. + * @property {Array} stack + * Stack of nodes. + * @property {Array} tokenStack + * Stack of tokens. + * @property {(key: Key) => CompileData[Key]} getData + * Get data from the key/value store. + * @property {(key: Key, value?: CompileData[Key]) => void} setData + * Set data into the key/value store. + * @property {(this: CompileContext) => void} buffer + * Capture some of the output data. + * @property {(this: CompileContext) => string} resume + * Stop capturing and access the output data. + * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter + * Enter a token. + * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit + * Exit a token. + * @property {TokenizeContext['sliceSerialize']} sliceSerialize + * Get the string value of a token. + * @property {Config} config + * Configuration. + * + * @typedef FromMarkdownOptions + * Configuration for how to build mdast. + * @property {Array> | null | undefined} [mdastExtensions] + * Extensions for this utility to change how tokens are turned into a tree. + * + * @typedef {ParseOptions & FromMarkdownOptions} Options + * Configuration. + */ + +// To do: micromark: create a registry of tokens? +// To do: next major: don’t return given `Node` from `enter`. +// To do: next major: remove setter/getter. + + + + + + + + + + +const lib_own = {}.hasOwnProperty + +/** + * @param value + * Markdown to parse. + * @param encoding + * Character encoding for when `value` is `Buffer`. + * @param options + * Configuration. + * @returns + * mdast tree. + */ +const fromMarkdown = + /** + * @type {( + * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & + * ((value: Value, options?: Options | null | undefined) => Root) + * )} + */ + + /** + * @param {Value} value + * @param {Encoding | Options | null | undefined} [encoding] + * @param {Options | null | undefined} [options] + * @returns {Root} + */ + function (value, encoding, options) { + if (typeof encoding !== 'string') { + options = encoding + encoding = undefined + } + return compiler(options)( + postprocess( + parse(options).document().write(preprocess()(value, encoding, true)) + ) + ) + } + +/** + * Note this compiler only understand complete buffering, not streaming. + * + * @param {Options | null | undefined} [options] + */ +function compiler(options) { + /** @type {Config} */ + const config = { + transforms: [], + canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], + enter: { + autolink: opener(link), + autolinkProtocol: onenterdata, + autolinkEmail: onenterdata, + atxHeading: opener(heading), + blockQuote: opener(blockQuote), + characterEscape: onenterdata, + characterReference: onenterdata, + codeFenced: opener(codeFlow), + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: opener(codeFlow, buffer), + codeText: opener(codeText, buffer), + codeTextData: onenterdata, + data: onenterdata, + codeFlowValue: onenterdata, + definition: opener(definition), + definitionDestinationString: buffer, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: opener(emphasis), + hardBreakEscape: opener(hardBreak), + hardBreakTrailing: opener(hardBreak), + htmlFlow: opener(html, buffer), + htmlFlowData: onenterdata, + htmlText: opener(html, buffer), + htmlTextData: onenterdata, + image: opener(image), + label: buffer, + link: opener(link), + listItem: opener(listItem), + listItemValue: onenterlistitemvalue, + listOrdered: opener(list, onenterlistordered), + listUnordered: opener(list), + paragraph: opener(paragraph), + reference: onenterreference, + referenceString: buffer, + resourceDestinationString: buffer, + resourceTitleString: buffer, + setextHeading: opener(heading), + strong: opener(strong), + thematicBreak: opener(thematicBreak) + }, + exit: { + atxHeading: closer(), + atxHeadingSequence: onexitatxheadingsequence, + autolink: closer(), + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: closer(), + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: closer(onexitcodefenced), + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: onexitcodefencedfencemeta, + codeFlowValue: onexitdata, + codeIndented: closer(onexitcodeindented), + codeText: closer(onexitcodetext), + codeTextData: onexitdata, + data: onexitdata, + definition: closer(), + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: closer(), + hardBreakEscape: closer(onexithardbreak), + hardBreakTrailing: closer(onexithardbreak), + htmlFlow: closer(onexithtmlflow), + htmlFlowData: onexitdata, + htmlText: closer(onexithtmltext), + htmlTextData: onexitdata, + image: closer(onexitimage), + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: closer(onexitlink), + listItem: closer(), + listOrdered: closer(), + listUnordered: closer(), + paragraph: closer(), + referenceString: onexitreferencestring, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + resource: onexitresource, + setextHeading: closer(onexitsetextheading), + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: closer(), + thematicBreak: closer() + } + } + configure(config, (options || {}).mdastExtensions || []) + + /** @type {CompileData} */ + const data = {} + return compile + + /** + * Turn micromark events into an mdast tree. + * + * @param {Array} events + * Events. + * @returns {Root} + * mdast tree. + */ + function compile(events) { + /** @type {Root} */ + let tree = { + type: 'root', + children: [] + } + /** @type {Omit} */ + const context = { + stack: [tree], + tokenStack: [], + config, + enter, + exit, + buffer, + resume, + setData, + getData + } + /** @type {Array} */ + const listStack = [] + let index = -1 + while (++index < events.length) { + // We preprocess lists to add `listItem` tokens, and to infer whether + // items the list itself are spread out. + if ( + events[index][1].type === 'listOrdered' || + events[index][1].type === 'listUnordered' + ) { + if (events[index][0] === 'enter') { + listStack.push(index) + } else { + const tail = listStack.pop() + index = prepareList(events, tail, index) + } + } + } + index = -1 + while (++index < events.length) { + const handler = config[events[index][0]] + if (lib_own.call(handler, events[index][1].type)) { + handler[events[index][1].type].call( + Object.assign( + { + sliceSerialize: events[index][2].sliceSerialize + }, + context + ), + events[index][1] + ) + } + } + + // Handle tokens still being open. + if (context.tokenStack.length > 0) { + const tail = context.tokenStack[context.tokenStack.length - 1] + const handler = tail[1] || defaultOnError + handler.call(context, undefined, tail[0]) + } + + // Figure out `root` position. + tree.position = { + start: lib_point( + events.length > 0 + ? events[0][1].start + : { + line: 1, + column: 1, + offset: 0 + } + ), + end: lib_point( + events.length > 0 + ? events[events.length - 2][1].end + : { + line: 1, + column: 1, + offset: 0 + } + ) + } + + // Call transforms. + index = -1 + while (++index < config.transforms.length) { + tree = config.transforms[index](tree) || tree + } + return tree + } + + /** + * @param {Array} events + * @param {number} start + * @param {number} length + * @returns {number} + */ + function prepareList(events, start, length) { + let index = start - 1 + let containerBalance = -1 + let listSpread = false + /** @type {Token | undefined} */ + let listItem + /** @type {number | undefined} */ + let lineIndex + /** @type {number | undefined} */ + let firstBlankLineIndex + /** @type {boolean | undefined} */ + let atMarker + while (++index <= length) { + const event = events[index] + if ( + event[1].type === 'listUnordered' || + event[1].type === 'listOrdered' || + event[1].type === 'blockQuote' + ) { + if (event[0] === 'enter') { + containerBalance++ + } else { + containerBalance-- + } + atMarker = undefined + } else if (event[1].type === 'lineEndingBlank') { + if (event[0] === 'enter') { + if ( + listItem && + !atMarker && + !containerBalance && + !firstBlankLineIndex + ) { + firstBlankLineIndex = index + } + atMarker = undefined + } + } else if ( + event[1].type === 'linePrefix' || + event[1].type === 'listItemValue' || + event[1].type === 'listItemMarker' || + event[1].type === 'listItemPrefix' || + event[1].type === 'listItemPrefixWhitespace' + ) { + // Empty. + } else { + atMarker = undefined + } + if ( + (!containerBalance && + event[0] === 'enter' && + event[1].type === 'listItemPrefix') || + (containerBalance === -1 && + event[0] === 'exit' && + (event[1].type === 'listUnordered' || + event[1].type === 'listOrdered')) + ) { + if (listItem) { + let tailIndex = index + lineIndex = undefined + while (tailIndex--) { + const tailEvent = events[tailIndex] + if ( + tailEvent[1].type === 'lineEnding' || + tailEvent[1].type === 'lineEndingBlank' + ) { + if (tailEvent[0] === 'exit') continue + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + listSpread = true + } + tailEvent[1].type = 'lineEnding' + lineIndex = tailIndex + } else if ( + tailEvent[1].type === 'linePrefix' || + tailEvent[1].type === 'blockQuotePrefix' || + tailEvent[1].type === 'blockQuotePrefixWhitespace' || + tailEvent[1].type === 'blockQuoteMarker' || + tailEvent[1].type === 'listItemIndent' + ) { + // Empty + } else { + break + } + } + if ( + firstBlankLineIndex && + (!lineIndex || firstBlankLineIndex < lineIndex) + ) { + listItem._spread = true + } + + // Fix position. + listItem.end = Object.assign( + {}, + lineIndex ? events[lineIndex][1].start : event[1].end + ) + events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) + index++ + length++ + } + + // Create a new list item. + if (event[1].type === 'listItemPrefix') { + listItem = { + type: 'listItem', + _spread: false, + start: Object.assign({}, event[1].start), + // @ts-expect-error: we’ll add `end` in a second. + end: undefined + } + // @ts-expect-error: `listItem` is most definitely defined, TS... + events.splice(index, 0, ['enter', listItem, event[2]]) + index++ + length++ + firstBlankLineIndex = undefined + atMarker = true + } + } + } + events[start][1]._spread = listSpread + return length + } + + /** + * Set data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @param {CompileData[Key]} [value] + * New value. + * @returns {void} + * Nothing. + */ + function setData(key, value) { + data[key] = value + } + + /** + * Get data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @returns {CompileData[Key]} + * Value. + */ + function getData(key) { + return data[key] + } + + /** + * Create an opener handle. + * + * @param {(token: Token) => Node} create + * Create a node. + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function opener(create, and) { + return open + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function open(token) { + enter.call(this, create(token), token) + if (and) and.call(this, token) + } + } + + /** + * @this {CompileContext} + * @returns {void} + */ + function buffer() { + this.stack.push({ + type: 'fragment', + children: [] + }) + } + + /** + * @template {Node} Kind + * Node type. + * @this {CompileContext} + * Context. + * @param {Kind} node + * Node to enter. + * @param {Token} token + * Corresponding token. + * @param {OnEnterError | undefined} [errorHandler] + * Handle the case where this token is open, but it is closed by something else. + * @returns {Kind} + * The given node. + */ + function enter(node, token, errorHandler) { + const parent = this.stack[this.stack.length - 1] + // @ts-expect-error: Assume `Node` can exist as a child of `parent`. + parent.children.push(node) + this.stack.push(node) + this.tokenStack.push([token, errorHandler]) + // @ts-expect-error: `end` will be patched later. + node.position = { + start: lib_point(token.start) + } + return node + } + + /** + * Create a closer handle. + * + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function closer(and) { + return close + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function close(token) { + if (and) and.call(this, token) + exit.call(this, token) + } + } + + /** + * @this {CompileContext} + * Context. + * @param {Token} token + * Corresponding token. + * @param {OnExitError | undefined} [onExitError] + * Handle the case where another token is open. + * @returns {Node} + * The closed node. + */ + function exit(token, onExitError) { + const node = this.stack.pop() + const open = this.tokenStack.pop() + if (!open) { + throw new Error( + 'Cannot close `' + + token.type + + '` (' + + stringifyPosition({ + start: token.start, + end: token.end + }) + + '): it’s not open' + ) + } else if (open[0].type !== token.type) { + if (onExitError) { + onExitError.call(this, token, open[0]) + } else { + const handler = open[1] || defaultOnError + handler.call(this, token, open[0]) + } + } + node.position.end = lib_point(token.end) + return node + } + + /** + * @this {CompileContext} + * @returns {string} + */ + function resume() { + return lib_toString(this.stack.pop()) + } + + // + // Handlers. + // + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistordered() { + setData('expectingFirstListItemValue', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistitemvalue(token) { + if (getData('expectingFirstListItemValue')) { + const ancestor = this.stack[this.stack.length - 2] + ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) + setData('expectingFirstListItemValue') + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfenceinfo() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.lang = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfencemeta() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.meta = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfence() { + // Exit if this is the closing fence. + if (getData('flowCodeInside')) return + this.buffer() + setData('flowCodeInside', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefenced() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') + setData('flowCodeInside') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodeindented() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/(\r?\n|\r)$/g, '') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitionlabelstring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + node.label = label + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiontitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiondestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitatxheadingsequence(token) { + const node = this.stack[this.stack.length - 1] + if (!node.depth) { + const depth = this.sliceSerialize(token).length + node.depth = depth + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadingtext() { + setData('setextHeadingSlurpLineEnding', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadinglinesequence(token) { + const node = this.stack[this.stack.length - 1] + node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheading() { + setData('setextHeadingSlurpLineEnding') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterdata(token) { + const node = this.stack[this.stack.length - 1] + let tail = node.children[node.children.length - 1] + if (!tail || tail.type !== 'text') { + // Add a new text node. + tail = text() + // @ts-expect-error: we’ll add `end` later. + tail.position = { + start: lib_point(token.start) + } + // @ts-expect-error: Assume `parent` accepts `text`. + node.children.push(tail) + } + this.stack.push(tail) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitdata(token) { + const tail = this.stack.pop() + tail.value += this.sliceSerialize(token) + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlineending(token) { + const context = this.stack[this.stack.length - 1] + // If we’re at a hard break, include the line ending in there. + if (getData('atHardBreak')) { + const tail = context.children[context.children.length - 1] + tail.position.end = lib_point(token.end) + setData('atHardBreak') + return + } + if ( + !getData('setextHeadingSlurpLineEnding') && + config.canContainEols.includes(context.type) + ) { + onenterdata.call(this, token) + onexitdata.call(this, token) + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithardbreak() { + setData('atHardBreak', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmlflow() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmltext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcodetext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlink() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitimage() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabeltext(token) { + const string = this.sliceSerialize(token) + const ancestor = this.stack[this.stack.length - 2] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + ancestor.label = decodeString(string) + // @ts-expect-error: same as above. + ancestor.identifier = normalizeIdentifier(string).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabel() { + const fragment = this.stack[this.stack.length - 1] + const value = this.resume() + const node = this.stack[this.stack.length - 1] + // Assume a reference. + setData('inReference', true) + if (node.type === 'link') { + /** @type {Array} */ + // @ts-expect-error: Assume static phrasing content. + const children = fragment.children + node.children = children + } else { + node.alt = value + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcedestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcetitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresource() { + setData('inReference') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterreference() { + setData('referenceType', 'collapsed') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitreferencestring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + node.label = label + // @ts-expect-error: same as above. + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + setData('referenceType', 'full') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcharacterreferencemarker(token) { + setData('characterReferenceType', token.type) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcharacterreferencevalue(token) { + const data = this.sliceSerialize(token) + const type = getData('characterReferenceType') + /** @type {string} */ + let value + if (type) { + value = decodeNumericCharacterReference( + data, + type === 'characterReferenceMarkerNumeric' ? 10 : 16 + ) + setData('characterReferenceType') + } else { + const result = decodeNamedCharacterReference(data) + value = result + } + const tail = this.stack.pop() + tail.value += value + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkprotocol(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = this.sliceSerialize(token) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkemail(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = 'mailto:' + this.sliceSerialize(token) + } + + // + // Creaters. + // + + /** @returns {Blockquote} */ + function blockQuote() { + return { + type: 'blockquote', + children: [] + } + } + + /** @returns {Code} */ + function codeFlow() { + return { + type: 'code', + lang: null, + meta: null, + value: '' + } + } + + /** @returns {InlineCode} */ + function codeText() { + return { + type: 'inlineCode', + value: '' + } + } + + /** @returns {Definition} */ + function definition() { + return { + type: 'definition', + identifier: '', + label: null, + title: null, + url: '' + } + } + + /** @returns {Emphasis} */ + function emphasis() { + return { + type: 'emphasis', + children: [] + } + } + + /** @returns {Heading} */ + function heading() { + // @ts-expect-error `depth` will be set later. + return { + type: 'heading', + depth: undefined, + children: [] + } + } + + /** @returns {Break} */ + function hardBreak() { + return { + type: 'break' + } + } + + /** @returns {HTML} */ + function html() { + return { + type: 'html', + value: '' + } + } + + /** @returns {Image} */ + function image() { + return { + type: 'image', + title: null, + url: '', + alt: null + } + } + + /** @returns {Link} */ + function link() { + return { + type: 'link', + title: null, + url: '', + children: [] + } + } + + /** + * @param {Token} token + * @returns {List} + */ + function list(token) { + return { + type: 'list', + ordered: token.type === 'listOrdered', + start: null, + spread: token._spread, + children: [] + } + } + + /** + * @param {Token} token + * @returns {ListItem} + */ + function listItem(token) { + return { + type: 'listItem', + spread: token._spread, + checked: null, + children: [] + } + } + + /** @returns {Paragraph} */ + function paragraph() { + return { + type: 'paragraph', + children: [] + } + } + + /** @returns {Strong} */ + function strong() { + return { + type: 'strong', + children: [] + } + } + + /** @returns {Text} */ + function text() { + return { + type: 'text', + value: '' + } + } + + /** @returns {ThematicBreak} */ + function thematicBreak() { + return { + type: 'thematicBreak' + } + } +} + +/** + * Copy a point-like value. + * + * @param {Point} d + * Point-like value. + * @returns {Point} + * unist point. + */ +function lib_point(d) { + return { + line: d.line, + column: d.column, + offset: d.offset + } +} + +/** + * @param {Config} combined + * @param {Array>} extensions + * @returns {void} + */ +function configure(combined, extensions) { + let index = -1 + while (++index < extensions.length) { + const value = extensions[index] + if (Array.isArray(value)) { + configure(combined, value) + } else { + extension(combined, value) + } + } +} + +/** + * @param {Config} combined + * @param {Extension} extension + * @returns {void} + */ +function extension(combined, extension) { + /** @type {keyof Extension} */ + let key + for (key in extension) { + if (lib_own.call(extension, key)) { + if (key === 'canContainEols') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'transforms') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'enter' || key === 'exit') { + const right = extension[key] + if (right) { + Object.assign(combined[key], right) + } + } + } + } +} + +/** @type {OnEnterError} */ +function defaultOnError(left, right) { + if (left) { + throw new Error( + 'Cannot close `' + + left.type + + '` (' + + stringifyPosition({ + start: left.start, + end: left.end + }) + + '): a different token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is open' + ) + } else { + throw new Error( + 'Cannot close document, a token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is still open' + ) + } +} + +// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js +var esm = __webpack_require__(513); +;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-6b48ae7d.js + + + +function preprocessMarkdown(markdown) { + const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); + const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); + return withoutExtraSpaces; +} +function markdownToLines(markdown) { + const preprocessedMarkdown = preprocessMarkdown(markdown); + const { children } = fromMarkdown(preprocessedMarkdown); + const lines = [[]]; + let currentLine = 0; + function processNode(node, parentType = "normal") { + if (node.type === "text") { + const textLines = node.value.split("\n"); + textLines.forEach((textLine, index) => { + if (index !== 0) { + currentLine++; + lines.push([]); + } + textLine.split(" ").forEach((word) => { + if (word) { + lines[currentLine].push({ content: word, type: parentType }); + } + }); + }); + } else if (node.type === "strong" || node.type === "emphasis") { + node.children.forEach((contentNode) => { + processNode(contentNode, node.type); + }); + } + } + children.forEach((treeNode) => { + if (treeNode.type === "paragraph") { + treeNode.children.forEach((contentNode) => { + processNode(contentNode); + }); + } + }); + return lines; +} +function markdownToHTML(markdown) { + const { children } = fromMarkdown(markdown); + function output(node) { + if (node.type === "text") { + return node.value.replace(/\n/g, "
"); + } else if (node.type === "strong") { + return `${node.children.map(output).join("")}`; + } else if (node.type === "emphasis") { + return `${node.children.map(output).join("")}`; + } else if (node.type === "paragraph") { + return `

${node.children.map(output).join("")}

`; + } + return `Unsupported markdown: ${node.type}`; + } + return children.map(output).join(""); +} +function splitTextToChars(text) { + if (Intl.Segmenter) { + return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); + } + return [...text]; +} +function splitWordToFitWidth(checkFit, word) { + const characters = splitTextToChars(word.content); + return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); +} +function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { + if (remainingChars.length === 0) { + return [ + { content: usedChars.join(""), type }, + { content: "", type } + ]; + } + const [nextChar, ...rest] = remainingChars; + const newWord = [...usedChars, nextChar]; + if (checkFit([{ content: newWord.join(""), type }])) { + return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); + } + if (usedChars.length === 0 && nextChar) { + usedChars.push(nextChar); + remainingChars.shift(); + } + return [ + { content: usedChars.join(""), type }, + { content: remainingChars.join(""), type } + ]; +} +function splitLineToFitWidth(line, checkFit) { + if (line.some(({ content }) => content.includes("\n"))) { + throw new Error("splitLineToFitWidth does not support newlines in the line"); + } + return splitLineToFitWidthRecursion(line, checkFit); +} +function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { + if (words.length === 0) { + if (newLine.length > 0) { + lines.push(newLine); + } + return lines.length > 0 ? lines : []; + } + let joiner = ""; + if (words[0].content === " ") { + joiner = " "; + words.shift(); + } + const nextWord = words.shift() ?? { content: " ", type: "normal" }; + const lineWithNextWord = [...newLine]; + if (joiner !== "") { + lineWithNextWord.push({ content: joiner, type: "normal" }); + } + lineWithNextWord.push(nextWord); + if (checkFit(lineWithNextWord)) { + return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); + } + if (newLine.length > 0) { + lines.push(newLine); + words.unshift(nextWord); + } else if (nextWord.content) { + const [line, rest] = splitWordToFitWidth(checkFit, nextWord); + lines.push([line]); + if (rest.content) { + words.unshift(rest); + } + } + return splitLineToFitWidthRecursion(words, checkFit, lines); +} +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlSpan(element, node, width, classes, addBackground = false) { + const fo = element.append("foreignObject"); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + ` + " + label + "" + ); + applyStyle(div, node.labelStyle); + div.style("display", "table-cell"); + div.style("white-space", "nowrap"); + div.style("max-width", width + "px"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + if (addBackground) { + div.attr("class", "labelBkg"); + } + let bbox = div.node().getBoundingClientRect(); + if (bbox.width === width) { + div.style("display", "table"); + div.style("white-space", "break-spaces"); + div.style("width", width + "px"); + bbox = div.node().getBoundingClientRect(); + } + fo.style("width", bbox.width); + fo.style("height", bbox.height); + return fo.node(); +} +function createTspan(textElement, lineIndex, lineHeight) { + return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); +} +function computeWidthOfText(parentNode, lineHeight, line) { + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, line); + const textLength = testSpan.node().getComputedTextLength(); + testElement.remove(); + return textLength; +} +function computeDimensionOfText(parentNode, lineHeight, text) { + var _a; + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); + const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); + if (textDimension) { + testElement.remove(); + } + return textDimension; +} +function createFormattedText(width, g, structuredText, addBackground = false) { + const lineHeight = 1.1; + const labelGroup = g.append("g"); + const bkg = labelGroup.insert("rect").attr("class", "background"); + const textElement = labelGroup.append("text").attr("y", "-10.1"); + let lineIndex = 0; + for (const line of structuredText) { + const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; + const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); + for (const preparedLine of linesUnderWidth) { + const tspan = createTspan(textElement, lineIndex, lineHeight); + updateTextContentAndStyles(tspan, preparedLine); + lineIndex++; + } + } + if (addBackground) { + const bbox = textElement.node().getBBox(); + const padding = 2; + bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); + return labelGroup.node(); + } else { + return textElement.node(); + } +} +function updateTextContentAndStyles(tspan, wrappedLine) { + tspan.text(""); + wrappedLine.forEach((word, index) => { + const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); + if (index === 0) { + innerTspan.text(word.content); + } else { + innerTspan.text(" " + word.content); + } + }); +} +const createText = (el, text = "", { + style = "", + isTitle = false, + classes = "", + useHtmlLabels = true, + isNode = true, + width = 200, + addSvgBackground = false +} = {}) => { + mermaid_f47111a7.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); + if (useHtmlLabels) { + const htmlText = markdownToHTML(text); + const node = { + isNode, + label: (0,mermaid_f47111a7.M)(htmlText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `` + ), + labelStyle: style.replace("fill:", "color:") + }; + const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); + return vertexNode; + } else { + const structuredText = markdownToLines(text); + const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); + return svgLabel; + } +}; + + + +/***/ }), + +/***/ 8747: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ a: () => (/* binding */ insertMarkers$1), +/* harmony export */ b: () => (/* binding */ clear$1), +/* harmony export */ c: () => (/* binding */ createLabel$1), +/* harmony export */ d: () => (/* binding */ clear), +/* harmony export */ e: () => (/* binding */ insertNode), +/* harmony export */ f: () => (/* binding */ insertEdgeLabel), +/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins), +/* harmony export */ h: () => (/* binding */ insertEdge), +/* harmony export */ i: () => (/* binding */ intersectRect$1), +/* harmony export */ j: () => (/* binding */ positionEdgeLabel), +/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset), +/* harmony export */ l: () => (/* binding */ labelHelper), +/* harmony export */ m: () => (/* binding */ addEdgeMarkers), +/* harmony export */ p: () => (/* binding */ positionNode), +/* harmony export */ s: () => (/* binding */ setNodeElem), +/* harmony export */ u: () => (/* binding */ updateNodeBounds) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3791); + + + +const insertMarkers = (elem, markerArray, type, id) => { + markerArray.forEach((markerName) => { + markers[markerName](elem, type, id); + }); +}; +const extension = (elem, type, id) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).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"); +}; +const composition = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).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"); +}; +const aggregation = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).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"); +}; +const dependency = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).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"); +}; +const lollipop = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).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); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).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); +}; +const point = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).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"); +}; +const circle$1 = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).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"); +}; +const cross = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).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"); +}; +const barb = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-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"); +}; +const markers = { + extension, + composition, + aggregation, + dependency, + lollipop, + point, + circle: circle$1, + cross, + barb +}; +const insertMarkers$1 = insertMarkers; +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlLabel(node) { + const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + '" + label + "" + ); + applyStyle(div, node.labelStyle); + div.style("display", "inline-block"); + div.style("white-space", "nowrap"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + return fo.node(); +} +const createLabel = (_vertexText, style, isTitle, isNode) => { + let vertexText = _vertexText || ""; + if (typeof vertexText === "object") { + vertexText = vertexText[0]; + } + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + vertexText = vertexText.replace(/\\n|\n/g, "
"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText); + const node = { + isNode, + label: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `` + ), + labelStyle: style.replace("fill:", "color:") + }; + let vertexNode = addHtmlLabel(node); + return vertexNode; + } else { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", style.replace("color:", "fill:")); + let rows = []; + if (typeof vertexText === "string") { + rows = vertexText.split(/\\n|\n|/gi); + } else if (Array.isArray(vertexText)) { + rows = vertexText; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + if (isTitle) { + tspan.setAttribute("class", "title-row"); + } else { + tspan.setAttribute("class", "row"); + } + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; + } +}; +const createLabel$1 = createLabel; +const labelHelper = async (parent, node, _classes, isNode) => { + let classes; + const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); + if (!_classes) { + classes = "node default"; + } else { + classes = _classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); + let labelText; + if (node.labelText === void 0) { + labelText = ""; + } else { + labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; + } + const textNode = label.node(); + let text; + if (node.labelType === "markdown") { + text = (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), { + useHtmlLabels, + width: node.width || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth, + classes: "markdown-node-label" + }); + } else { + text = textNode.appendChild( + createLabel$1( + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), + node.labelStyle, + false, + isNode + ) + ); + } + let bbox = text.getBBox(); + const halfPadding = node.padding / 2; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); + const images = div.getElementsByTagName("img"); + if (images) { + const noImgText = labelText.replace(/]*>/g, "").trim() === ""; + await Promise.all( + [...images].map( + (img) => new Promise((res) => { + function setupImage() { + img.style.display = "flex"; + img.style.flexDirection = "column"; + if (noImgText) { + const bodyFontSize = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize; + const enlargingFactor = 5; + const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; + img.style.minWidth = width; + img.style.maxWidth = width; + } else { + img.style.width = "100%"; + } + res(img); + } + setTimeout(() => { + if (img.complete) { + setupImage(); + } + }); + img.addEventListener("error", setupImage); + img.addEventListener("load", setupImage); + }) + ) + ); + } + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (useHtmlLabels) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } else { + label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); + } + if (node.centerLabel) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } + label.insert("rect", ":first-child"); + return { shapeSvg, bbox, halfPadding, label }; +}; +const updateNodeBounds = (node, element) => { + const bbox = element.node().getBBox(); + node.width = bbox.width; + node.height = bbox.height; +}; +function insertPolygonShape(parent, w, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); +} +function intersectNode(node, point2) { + return node.intersect(point2); +} +function intersectEllipse(node, rx, ry, point2) { + var cx = node.x; + var cy = node.y; + var px = cx - point2.x; + var py = cy - point2.y; + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + var dx = Math.abs(rx * ry * px / det); + if (point2.x < cx) { + dx = -dx; + } + var dy = Math.abs(rx * ry * py / det); + if (point2.y < cy) { + dy = -dy; + } + return { x: cx + dx, y: cy + dy }; +} +function intersectCircle(node, rx, point2) { + return intersectEllipse(node, rx, rx, point2); +} +function intersectLine(p1, p2, q1, q2) { + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x, y; + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; + if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { + return; + } + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; + if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { + return; + } + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return; + } + offset = Math.abs(denom / 2); + num = b1 * c2 - b2 * c1; + x = num < 0 ? (num - offset) / denom : (num + offset) / denom; + num = a2 * c1 - a1 * c2; + y = num < 0 ? (num - offset) / denom : (num + offset) / denom; + return { x, y }; +} +function sameSign(r1, r2) { + return r1 * r2 > 0; +} +function intersectPolygon(node, polyPoints, point2) { + var x1 = node.x; + var y1 = node.y; + var intersections = []; + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + if (typeof polyPoints.forEach === "function") { + polyPoints.forEach(function(entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + } else { + minX = Math.min(minX, polyPoints.x); + minY = Math.min(minY, polyPoints.y); + } + var left = x1 - node.width / 2 - minX; + var top = y1 - node.height / 2 - minY; + for (var i = 0; i < polyPoints.length; i++) { + var p1 = polyPoints[i]; + var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; + var intersect2 = intersectLine( + node, + point2, + { x: left + p1.x, y: top + p1.y }, + { x: left + p2.x, y: top + p2.y } + ); + if (intersect2) { + intersections.push(intersect2); + } + } + if (!intersections.length) { + return node; + } + if (intersections.length > 1) { + intersections.sort(function(p, q) { + var pdx = p.x - point2.x; + var pdy = p.y - point2.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + var qdx = q.x - point2.x; + var qdy = q.y - point2.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); + } + return intersections[0]; +} +const intersectRect = (node, point2) => { + var x = node.x; + var y = node.y; + var dx = point2.x - x; + var dy = point2.y - y; + var w = node.width / 2; + var h = node.height / 2; + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w = -w; + } + sx = w; + sy = dx === 0 ? 0 : w * dy / dx; + } + return { x: x + sx, y: y + sy }; +}; +const intersectRect$1 = intersectRect; +const intersect = { + node: intersectNode, + circle: intersectCircle, + ellipse: intersectEllipse, + polygon: intersectPolygon, + rect: intersectRect$1 +}; +const note = async (parent, node) => { + const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels; + if (!useHtmlLabels) { + node.centerLabel = true; + } + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes); + const rect2 = shapeSvg.insert("rect", ":first-child"); + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const note$1 = note; +const expandAndDeduplicateDirections = (directions) => { + const uniqueDirections = /* @__PURE__ */ new Set(); + for (const direction of directions) { + switch (direction) { + case "x": + uniqueDirections.add("right"); + uniqueDirections.add("left"); + break; + case "y": + uniqueDirections.add("up"); + uniqueDirections.add("down"); + break; + default: + uniqueDirections.add(direction); + break; + } + } + return uniqueDirections; +}; +const getArrowPoints = (duplicatedDirections, bbox, node) => { + const directions = expandAndDeduplicateDirections(duplicatedDirections); + const f = 2; + const height = bbox.height + 2 * node.padding; + const midpoint = height / f; + const width = bbox.width + 2 * midpoint + node.padding; + const padding = node.padding / 2; + if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) { + return [ + // Bottom + { x: 0, y: 0 }, + { x: midpoint, y: 0 }, + { x: width / 2, y: 2 * padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: 0 }, + // Right + { x: width, y: -height / 3 }, + { x: width + 2 * padding, y: -height / 2 }, + { x: width, y: -2 * height / 3 }, + { x: width, y: -height }, + // Top + { x: width - midpoint, y: -height }, + { x: width / 2, y: -height - 2 * padding }, + { x: midpoint, y: -height }, + // Left + { x: 0, y: -height }, + { x: 0, y: -2 * height / 3 }, + { x: -2 * padding, y: -height / 2 }, + { x: 0, y: -height / 3 } + ]; + } + if (directions.has("right") && directions.has("left") && directions.has("up")) { + return [ + { x: midpoint, y: 0 }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("right") && directions.has("left") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: midpoint, y: -height }, + { x: width - midpoint, y: -height }, + { x: width, y: 0 } + ]; + } + if (directions.has("right") && directions.has("up") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: width, y: -midpoint }, + { x: width, y: -height + midpoint }, + { x: 0, y: -height } + ]; + } + if (directions.has("left") && directions.has("up") && directions.has("down")) { + return [ + { x: width, y: 0 }, + { x: 0, y: -midpoint }, + { x: 0, y: -height + midpoint }, + { x: width, y: -height } + ]; + } + if (directions.has("right") && directions.has("left")) { + return [ + { x: midpoint, y: 0 }, + { x: midpoint, y: -padding }, + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: width - midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("up") && directions.has("down")) { + return [ + // Bottom center + { x: width / 2, y: 0 }, + // Left pont of bottom arrow + { x: 0, y: -padding }, + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: 0, y: -height + padding }, + // Top of arrow + { x: width / 2, y: -height }, + { x: width, y: -height + padding }, + // Top of right vertical bar + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding }, + { x: width, y: -padding } + ]; + } + if (directions.has("right") && directions.has("up")) { + return [ + { x: 0, y: 0 }, + { x: width, y: -midpoint }, + { x: 0, y: -height } + ]; + } + if (directions.has("right") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: width, y: 0 }, + { x: 0, y: -height } + ]; + } + if (directions.has("left") && directions.has("up")) { + return [ + { x: width, y: 0 }, + { x: 0, y: -midpoint }, + { x: width, y: -height } + ]; + } + if (directions.has("left") && directions.has("down")) { + return [ + { x: width, y: 0 }, + { x: 0, y: 0 }, + { x: width, y: -height } + ]; + } + if (directions.has("right")) { + return [ + { x: midpoint, y: -padding }, + { x: midpoint, y: -padding }, + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: width - midpoint, y: -height + padding }, + // top left corner of arrow + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding } + ]; + } + if (directions.has("left")) { + return [ + { x: midpoint, y: 0 }, + { x: midpoint, y: -padding }, + // Two points, the right corners + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("up")) { + return [ + // Bottom center + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: 0, y: -height + padding }, + // Top of arrow + { x: width / 2, y: -height }, + { x: width, y: -height + padding }, + // Top of right vertical bar + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding } + ]; + } + if (directions.has("down")) { + return [ + // Bottom center + { x: width / 2, y: 0 }, + // Left pont of bottom arrow + { x: 0, y: -padding }, + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding }, + { x: width, y: -padding } + ]; + } + return [{ x: 0, y: 0 }]; +}; +const formatClass = (str) => { + if (str) { + return " " + str; + } + return ""; +}; +const getClassesFromNode = (node, otherClasses) => { + return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( + node.class + )}`; +}; +const question = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const s = w + h; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)"); + const questionElem = insertPolygonShape(shapeSvg, s, s, points); + questionElem.attr("style", node.style); + updateNodeBounds(node, questionElem); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called"); + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const choice = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const s = 28; + const points = [ + { x: 0, y: s / 2 }, + { x: s / 2, y: 0 }, + { x: 0, y: -s / 2 }, + { x: -s / 2, y: 0 } + ]; + const choice2 = shapeSvg.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ); + choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); + node.width = 28; + node.height = 28; + node.intersect = function(point2) { + return intersect.circle(node, 14, point2); + }; + return shapeSvg; +}; +const hexagon = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const f = 4; + const h = bbox.height + node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const hex = insertPolygonShape(shapeSvg, w, h, points); + hex.attr("style", node.style); + updateNodeBounds(node, hex); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const block_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true); + const f = 2; + const h = bbox.height + 2 * node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = getArrowPoints(node.directions, bbox, node); + const blockArrow = insertPolygonShape(shapeSvg, w, h, points); + blockArrow.attr("style", node.style); + updateNodeBounds(node, blockArrow); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_left_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -h / 2, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + node.width = w + h; + node.height = h; + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_right = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_left = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w + h / 6, y: 0 }, + { x: w - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w + 2 * h / 6, y: 0 }, + { x: w - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const inv_trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_right_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w + h / 2, y: 0 }, + { x: w, y: -h / 2 }, + { x: w + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const cylinder = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const rx = w / 2; + const ry = rx / (2.5 + w / 50); + const h = bbox.height + ry + node.padding; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; + const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); + updateNodeBounds(node, el); + node.intersect = function(point2) { + const pos = intersect.rect(node, point2); + const x = pos.x - node.x; + if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { + let y = ry * ry * (1 - x * x / (rx * rx)); + if (y != 0) { + y = Math.sqrt(y); + } + y = ry - y; + if (point2.y - node.y > 0) { + y = -y; + } + pos.y += y; + } + return pos; + }; + return shapeSvg; +}; +const rect = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes + " " + node.class, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = node.positioned ? node.width : bbox.width + node.padding; + const totalHeight = node.positioned ? node.height : bbox.height + node.padding; + const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; + const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; + rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const composite = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = node.positioned ? node.width : bbox.width + node.padding; + const totalHeight = node.positioned ? node.height : bbox.height + node.padding; + const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; + const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; + rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const labelRect = async (parent, node) => { + const { shapeSvg } = await labelHelper(parent, node, "label", true); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = 0; + const totalHeight = 0; + rect2.attr("width", totalWidth).attr("height", totalHeight); + shapeSvg.attr("class", "label edgeLabel"); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { + const strokeDashArray = []; + const addBorder = (length) => { + strokeDashArray.push(length, 0); + }; + const skipBorder = (length) => { + strokeDashArray.push(0, length); + }; + if (borders.includes("t")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("r")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + if (borders.includes("b")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("l")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); +} +const rectWithTitle = (parent, node) => { + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const innerLine = shapeSvg.insert("line"); + const label = shapeSvg.insert("g").attr("class", "label"); + const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; + let title = ""; + if (typeof text2 === "object") { + title = text2[0]; + } else { + title = text2; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object"); + const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); + let bbox = { width: 0, height: 0 }; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2); + const textRows = text2.slice(1, text2.length); + let titleBox = text.getBBox(); + const descr = label.node().appendChild( + createLabel$1(textRows.join ? textRows.join("
") : textRows, node.labelStyle, true, true) + ); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = descr.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const halfPadding = node.padding / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" + ); + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" + ); + bbox = label.node().getBBox(); + label.attr( + "transform", + "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" + ); + rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const stadium = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const h = bbox.height + node.padding; + const w = bbox.width + h / 4 + node.padding; + const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const circle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main"); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding, point2); + }; + return shapeSvg; +}; +const doublecircle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const gap = 5; + const circleGroup = shapeSvg.insert("g", ":first-child"); + const outerCircle = circleGroup.insert("circle"); + const innerCircle = circleGroup.insert("circle"); + circleGroup.attr("class", node.class); + outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); + innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main"); + updateNodeBounds(node, outerCircle); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); + }; + return shapeSvg; +}; +const subroutine = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w + 8, y: 0 }, + { x: w + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const start = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const forkJoin = (parent, node, dir) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + let width = 70; + let height = 10; + if (dir === "LR") { + width = 10; + height = 70; + } + const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); + updateNodeBounds(node, shape); + node.height = node.height + node.padding / 2; + node.width = node.width + node.padding / 2; + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const end = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const innerCircle = shapeSvg.insert("circle", ":first-child"); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const class_box = (parent, node) => { + const halfPadding = node.padding / 2; + const rowPadding = 4; + const lineHeight = 8; + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const topLine = shapeSvg.insert("line"); + const bottomLine = shapeSvg.insert("line"); + let maxWidth = 0; + let maxHeight = rowPadding; + const labelContainer = shapeSvg.insert("g").attr("class", "label"); + let verticalPos = 0; + const hasInterface = node.classData.annotations && node.classData.annotations[0]; + const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; + const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); + let interfaceBBox = interfaceLabel.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = interfaceLabel.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel); + interfaceBBox = div.getBoundingClientRect(); + dv.attr("width", interfaceBBox.width); + dv.attr("height", interfaceBBox.height); + } + if (node.classData.annotations[0]) { + maxHeight += interfaceBBox.height + rowPadding; + maxWidth += interfaceBBox.width; + } + let classTitleString = node.classData.label; + if (node.classData.type !== void 0 && node.classData.type !== "") { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + classTitleString += "<" + node.classData.type + ">"; + } else { + classTitleString += "<" + node.classData.type + ">"; + } + } + const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle"); + let classTitleBBox = classTitleLabel.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = classTitleLabel.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel); + classTitleBBox = div.getBoundingClientRect(); + dv.attr("width", classTitleBBox.width); + dv.attr("height", classTitleBBox.height); + } + maxHeight += classTitleBBox.height + rowPadding; + if (classTitleBBox.width > maxWidth) { + maxWidth = classTitleBBox.width; + } + const classAttributes = []; + node.classData.members.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let parsedText = parsedInfo.displayText; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + parsedText = parsedText.replace(//g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + parsedText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classAttributes.push(lbl); + }); + maxHeight += lineHeight; + const classMethods = []; + node.classData.methods.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let displayText = parsedInfo.displayText; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + displayText = displayText.replace(//g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + displayText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classMethods.push(lbl); + }); + maxHeight += lineHeight; + if (hasInterface) { + let diffX2 = (maxWidth - interfaceBBox.width) / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" + ); + verticalPos = interfaceBBox.height + rowPadding; + } + let diffX = (maxWidth - classTitleBBox.width) / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + verticalPos += classTitleBBox.height + rowPadding; + topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classAttributes.forEach((lbl) => { + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + verticalPos += lineHeight; + bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classMethods.forEach((lbl) => { + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const shapes = { + rhombus: question, + composite, + question, + rect, + labelRect, + rectWithTitle, + choice, + circle, + doublecircle, + stadium, + hexagon, + block_arrow, + rect_left_inv_arrow, + lean_right, + lean_left, + trapezoid, + inv_trapezoid, + rect_right_inv_arrow, + cylinder, + start, + end, + note: note$1, + subroutine, + fork: forkJoin, + join: forkJoin, + class_box +}; +let nodeElems = {}; +const insertNode = async (elem, node, dir) => { + let newEl; + let el; + if (node.link) { + let target; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") { + target = "_top"; + } else if (node.linkTarget) { + target = node.linkTarget || "_blank"; + } + newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); + el = await shapes[node.shape](newEl, node, dir); + } else { + el = await shapes[node.shape](elem, node, dir); + newEl = el; + } + if (node.tooltip) { + el.attr("title", node.tooltip); + } + if (node.class) { + el.attr("class", "node default " + node.class); + } + newEl.attr("data-node", "true"); + newEl.attr("data-id", node.id); + nodeElems[node.id] = newEl; + if (node.haveCallback) { + nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); + } + return newEl; +}; +const setNodeElem = (elem, node) => { + nodeElems[node.id] = elem; +}; +const clear$1 = () => { + nodeElems = {}; +}; +const positionNode = (node) => { + const el = nodeElems[node.id]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace( + "Transforming node", + node.diff, + node, + "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" + ); + const padding = 8; + const diff = node.diff || 0; + if (node.clusterNode) { + el.attr( + "transform", + "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" + ); + } else { + el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); + } + return diff; +}; +const getSubGraphTitleMargins = ({ + flowchart +}) => { + var _a, _b; + const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0; + const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0; + const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; + return { + subGraphTitleTopMargin, + subGraphTitleBottomMargin, + subGraphTitleTotalMargin + }; +}; +const markerOffsets = { + aggregation: 18, + extension: 18, + composition: 18, + dependency: 6, + lollipop: 13.5, + arrow_point: 5.3 +}; +function calculateDeltaAndAngle(point1, point2) { + if (point1 === void 0 || point2 === void 0) { + return { angle: 0, deltaX: 0, deltaY: 0 }; + } + point1 = pointTransformer(point1); + point2 = pointTransformer(point2); + const [x1, y1] = [point1.x, point1.y]; + const [x2, y2] = [point2.x, point2.y]; + const deltaX = x2 - x1; + const deltaY = y2 - y1; + return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; +} +const pointTransformer = (data) => { + if (Array.isArray(data)) { + return { x: data[0], y: data[1] }; + } + return data; +}; +const getLineFunctionsWithOffset = (edge) => { + return { + x: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaX } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } + return pointTransformer(d).x + offset; + }, + y: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaY } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } + return pointTransformer(d).y + offset; + } + }; +}; +const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => { + if (edge.arrowTypeStart) { + addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType); + } + if (edge.arrowTypeEnd) { + addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType); + } +}; +const arrowTypesMap = { + arrow_cross: "cross", + arrow_point: "point", + arrow_barb: "barb", + arrow_circle: "circle", + aggregation: "aggregation", + extension: "extension", + composition: "composition", + dependency: "dependency", + lollipop: "lollipop" +}; +const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => { + const endMarkerType = arrowTypesMap[arrowType]; + if (!endMarkerType) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`); + return; + } + const suffix = position === "start" ? "Start" : "End"; + svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`); +}; +let edgeLabels = {}; +let terminalLabels = {}; +const clear = () => { + edgeLabels = {}; + terminalLabels = {}; +}; +const insertEdgeLabel = (elem, edge) => { + const useHtmlLabels = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); + const labelElement = edge.labelType === "markdown" ? (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, { + style: edge.labelStyle, + useHtmlLabels, + addSvgBackground: true + }) : createLabel$1(edge.label, edge.labelStyle); + const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); + const label = edgeLabel.insert("g").attr("class", "label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + if (useHtmlLabels) { + const div = labelElement.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + edgeLabels[edge.id] = edgeLabel; + edge.width = bbox.width; + edge.height = bbox.height; + let fo; + if (edge.startLabelLeft) { + const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); + const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startLeft = startEdgeLabelLeft; + setTerminalWidth(fo, edge.startLabelLeft); + } + if (edge.startLabelRight) { + const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); + const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); + fo = startEdgeLabelRight.node().appendChild(startLabelElement); + inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startRight = startEdgeLabelRight; + setTerminalWidth(fo, edge.startLabelRight); + } + if (edge.endLabelLeft) { + const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); + const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelLeft.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endLeft = endEdgeLabelLeft; + setTerminalWidth(fo, edge.endLabelLeft); + } + if (edge.endLabelRight) { + const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); + const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelRight.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endRight = endEdgeLabelRight; + setTerminalWidth(fo, edge.endLabelRight); + } + return labelElement; +}; +function setTerminalWidth(fo, value) { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) { + fo.style.width = value.length * 9 + "px"; + fo.style.height = "12px"; + } +} +const positionEdgeLabel = (edge, paths) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths); + let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig); + if (edge.label) { + const el = edgeLabels[edge.id]; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug( + "Moving label " + edge.label + " from (", + x, + ",", + y, + ") to (", + pos.x, + ",", + pos.y, + ") abc88" + ); + if (paths.updatedPath) { + x = pos.x; + y = pos.y; + } + } + el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`); + } + if (edge.startLabelLeft) { + const el = terminalLabels[edge.id].startLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.startLabelRight) { + const el = terminalLabels[edge.id].startRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition( + edge.arrowTypeStart ? 10 : 0, + "start_right", + path + ); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.endLabelLeft) { + const el = terminalLabels[edge.id].endLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.endLabelRight) { + const el = terminalLabels[edge.id].endRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } +}; +const outsideNode = (node, point2) => { + const x = node.x; + const y = node.y; + const dx = Math.abs(point2.x - x); + const dy = Math.abs(point2.y - y); + const w = node.width / 2; + const h = node.height / 2; + if (dx >= w || dy >= h) { + return true; + } + return false; +}; +const intersection = (node, outsidePoint, insidePoint) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(outsidePoint)} + insidePoint : ${JSON.stringify(insidePoint)} + node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); + const x = node.x; + const y = node.y; + const dx = Math.abs(x - insidePoint.x); + const w = node.width / 2; + let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; + const h = node.height / 2; + const Q = Math.abs(outsidePoint.y - insidePoint.y); + const R = Math.abs(outsidePoint.x - insidePoint.x); + if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { + let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; + r = R * q / Q; + const res = { + x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, + y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q + }; + if (r === 0) { + res.x = outsidePoint.x; + res.y = outsidePoint.y; + } + if (R === 0) { + res.x = outsidePoint.x; + } + if (Q === 0) { + res.y = outsidePoint.y; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); + return res; + } else { + if (insidePoint.x < outsidePoint.x) { + r = outsidePoint.x - w - x; + } else { + r = x - w - outsidePoint.x; + } + let q = Q * r / R; + let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; + let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); + if (r === 0) { + _x = outsidePoint.x; + _y = outsidePoint.y; + } + if (R === 0) { + _x = outsidePoint.x; + } + if (Q === 0) { + _y = outsidePoint.y; + } + return { x: _x, y: _y }; + } +}; +const cutPathAtIntersect = (_points, boundaryNode) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode); + let points = []; + let lastPointOutside = _points[0]; + let isInside = false; + _points.forEach((point2) => { + if (!outsideNode(boundaryNode, point2) && !isInside) { + const inter = intersection(boundaryNode, lastPointOutside, point2); + let pointPresent = false; + points.forEach((p) => { + pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; + }); + if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { + points.push(inter); + } + isInside = true; + } else { + lastPointOutside = point2; + if (!isInside) { + points.push(point2); + } + } + }); + return points; +}; +const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { + let points = edge.points; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e); + let pointsHasChanged = false; + const tail = graph.node(e.v); + var head = graph.node(e.w); + if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) { + points = points.slice(1, edge.points.length - 1); + points.unshift(tail.intersect(points[0])); + points.push(head.intersect(points[points.length - 1])); + } + if (edge.toCluster) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]); + points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); + pointsHasChanged = true; + } + if (edge.fromCluster) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]); + points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); + pointsHasChanged = true; + } + const lineData = points.filter((p) => !Number.isNaN(p.y)); + let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM; + if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { + curve = edge.curve; + } + const { x, y } = getLineFunctionsWithOffset(edge); + const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve); + let strokeClasses; + switch (edge.thickness) { + case "normal": + strokeClasses = "edge-thickness-normal"; + break; + case "thick": + strokeClasses = "edge-thickness-thick"; + break; + case "invisible": + strokeClasses = "edge-thickness-thick"; + break; + default: + strokeClasses = ""; + } + switch (edge.pattern) { + case "solid": + strokeClasses += " edge-pattern-solid"; + break; + case "dotted": + strokeClasses += " edge-pattern-dotted"; + break; + case "dashed": + strokeClasses += " edge-pattern-dashed"; + break; + } + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); + let url = ""; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + addEdgeMarkers(svgPath, edge, url, id, diagramType); + let paths = {}; + if (pointsHasChanged) { + paths.updatedPath = points; + } + paths.originalPath = edge.points; + return paths; +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/14eb3368.c4cc24ac.js b/assets/js/14eb3368.c4cc24ac.js new file mode 100644 index 00000000..05cc49ce --- /dev/null +++ b/assets/js/14eb3368.c4cc24ac.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[6969],{1243:(e,t,n)=>{n.d(t,{A:()=>g});n(6540);var s=n(4164),r=n(7559),i=n(4718),a=n(9169),l=n(8774),o=n(1312),c=n(6025),d=n(4848);function u(e){return(0,d.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,d.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const m={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function h(){const e=(0,c.Ay)("/");return(0,d.jsx)("li",{className:"breadcrumbs__item",children:(0,d.jsx)(l.A,{"aria-label":(0,o.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,d.jsx)(u,{className:m.breadcrumbHomeIcon})})})}const b={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function x(e){let{children:t,href:n,isLast:s}=e;const r="breadcrumbs__link";return s?(0,d.jsx)("span",{className:r,itemProp:"name",children:t}):n?(0,d.jsx)(l.A,{className:r,href:n,itemProp:"item",children:(0,d.jsx)("span",{itemProp:"name",children:t})}):(0,d.jsx)("span",{className:r,children:t})}function p(e){let{children:t,active:n,index:r,addMicrodata:i}=e;return(0,d.jsxs)("li",{...i&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,s.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,d.jsx)("meta",{itemProp:"position",content:String(r+1)})]})}function g(){const e=(0,i.OF)(),t=(0,a.Dt)();return e?(0,d.jsx)("nav",{className:(0,s.A)(r.G.docs.docBreadcrumbs,b.breadcrumbsContainer),"aria-label":(0,o.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,d.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,d.jsx)(h,{}),e.map(((t,n)=>{const s=n===e.length-1,r="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,d.jsx)(p,{active:s,index:n,addMicrodata:!!r,children:(0,d.jsx)(x,{href:r,isLast:s,children:t.label})},n)}))]})}):null}},7247:(e,t,n)=>{n.r(t),n.d(t,{default:()=>V});var s=n(6540),r=n(1003),i=n(4718),a=n(6025),l=n(4164),o=n(8774),c=n(4586);const d=["zero","one","two","few","many","other"];function u(e){return d.filter((t=>e.includes(t)))}const m={locale:"en",pluralForms:u(["one","other"]),select:e=>1===e?"one":"other"};function h(){const{i18n:{currentLocale:e}}=(0,c.A)();return(0,s.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:u(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),m}}),[e])}function b(){const e=h();return{selectMessage:(t,n)=>function(e,t,n){const s=e.split("|");if(1===s.length)return s[0];s.length>n.pluralForms.length&&console.error(`For locale=${n.locale}, a maximum of ${n.pluralForms.length} plural forms are expected (${n.pluralForms.join(",")}), but the message contains ${s.length}: ${e}`);const r=n.select(t),i=n.pluralForms.indexOf(r);return s[Math.min(i,s.length-1)]}(n,t,e)}}var x=n(6654),p=n(1312),g=n(1107);const v={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var f=n(4848);function j(e){let{href:t,children:n}=e;return(0,f.jsx)(o.A,{href:t,className:(0,l.A)("card padding--lg",v.cardContainer),children:n})}function A(e){let{href:t,icon:n,title:s,description:r}=e;return(0,f.jsxs)(j,{href:t,children:[(0,f.jsxs)(g.A,{as:"h2",className:(0,l.A)("text--truncate",v.cardTitle),title:s,children:[n," ",s]}),r&&(0,f.jsx)("p",{className:(0,l.A)("text--truncate",v.cardDescription),title:r,children:r})]})}function N(e){let{item:t}=e;const n=(0,i.Nr)(t),s=function(){const{selectMessage:e}=b();return t=>e(t,(0,p.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t}))}();return n?(0,f.jsx)(A,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:t.description??s(t.items.length)}):null}function T(e){let{item:t}=e;const n=(0,x.A)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,i.cC)(t.docId??void 0);return(0,f.jsx)(A,{href:t.href,icon:n,title:t.label,description:t.description??s?.description})}function L(e){let{item:t}=e;switch(t.type){case"link":return(0,f.jsx)(T,{item:t});case"category":return(0,f.jsx)(N,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function _(e){let{className:t}=e;const n=(0,i.$S)();return(0,f.jsx)(k,{items:n.items,className:t})}function k(e){const{items:t,className:n}=e;if(!t)return(0,f.jsx)(_,{...e});const s=(0,i.d1)(t);return(0,f.jsx)("section",{className:(0,l.A)("row",n),children:s.map(((e,t)=>(0,f.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,f.jsx)(L,{item:e})},t)))})}var y=n(6929),w=n(1878),I=n(4267),C=n(1243);const F={generatedIndexPage:"generatedIndexPage_vN6x",list:"list_eTzJ",title:"title_kItE"};function M(e){let{categoryGeneratedIndex:t}=e;return(0,f.jsx)(r.be,{title:t.title,description:t.description,keywords:t.keywords,image:(0,a.Ay)(t.image)})}function P(e){let{categoryGeneratedIndex:t}=e;const n=(0,i.$S)();return(0,f.jsxs)("div",{className:F.generatedIndexPage,children:[(0,f.jsx)(w.A,{}),(0,f.jsx)(C.A,{}),(0,f.jsx)(I.A,{}),(0,f.jsxs)("header",{children:[(0,f.jsx)(g.A,{as:"h1",className:F.title,children:t.title}),t.description&&(0,f.jsx)("p",{children:t.description})]}),(0,f.jsx)("article",{className:"margin-top--lg",children:(0,f.jsx)(k,{items:n.items,className:F.list})}),(0,f.jsx)("footer",{className:"margin-top--lg",children:(0,f.jsx)(y.A,{previous:t.navigation.previous,next:t.navigation.next})})]})}function V(e){return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(M,{...e}),(0,f.jsx)(P,{...e})]})}},6929:(e,t,n)=>{n.d(t,{A:()=>o});n(6540);var s=n(1312),r=n(4164),i=n(8774),a=n(4848);function l(e){const{permalink:t,title:n,subLabel:s,isNext:l}=e;return(0,a.jsxs)(i.A,{className:(0,r.A)("pagination-nav__link",l?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t,children:[s&&(0,a.jsx)("div",{className:"pagination-nav__sublabel",children:s}),(0,a.jsx)("div",{className:"pagination-nav__label",children:n})]})}function o(e){const{previous:t,next:n}=e;return(0,a.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,s.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,a.jsx)(l,{...t,subLabel:(0,a.jsx)(s.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),n&&(0,a.jsx)(l,{...n,subLabel:(0,a.jsx)(s.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},4267:(e,t,n)=>{n.d(t,{A:()=>o});n(6540);var s=n(4164),r=n(1312),i=n(7559),a=n(3025),l=n(4848);function o(e){let{className:t}=e;const n=(0,a.r)();return n.badge?(0,l.jsx)("span",{className:(0,s.A)(t,i.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,l.jsx)(r.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label},children:"Version: {versionLabel}"})}):null}},1878:(e,t,n)=>{n.d(t,{A:()=>p});n(6540);var s=n(4164),r=n(4586),i=n(8774),a=n(1312),l=n(4070),o=n(7559),c=n(3886),d=n(3025),u=n(4848);const m={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(a.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return(0,u.jsx)(a.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:(0,u.jsx)("b",{children:n.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function h(e){const t=m[e.versionMetadata.banner];return(0,u.jsx)(t,{...e})}function b(e){let{versionLabel:t,to:n,onClick:s}=e;return(0,u.jsx)(a.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:(0,u.jsx)("b",{children:(0,u.jsx)(i.A,{to:n,onClick:s,children:(0,u.jsx)(a.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function x(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:i}}=(0,r.A)(),{pluginId:a}=(0,l.vT)({failfast:!0}),{savePreferredVersionName:d}=(0,c.g1)(a),{latestDocSuggestion:m,latestVersionSuggestion:x}=(0,l.HW)(a),p=m??(g=x).docs.find((e=>e.id===g.mainDocId));var g;return(0,u.jsxs)("div",{className:(0,s.A)(t,o.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,u.jsx)("div",{children:(0,u.jsx)(h,{siteTitle:i,versionMetadata:n})}),(0,u.jsx)("div",{className:"margin-top--md",children:(0,u.jsx)(b,{versionLabel:x.label,to:p.path,onClick:()=>d(x.name)})})]})}function p(e){let{className:t}=e;const n=(0,d.r)();return n.banner?(0,u.jsx)(x,{className:t,versionMetadata:n}):null}}}]); \ No newline at end of file diff --git a/assets/js/1555.924b970a.js b/assets/js/1555.924b970a.js new file mode 100644 index 00000000..e078ec23 --- /dev/null +++ b/assets/js/1555.924b970a.js @@ -0,0 +1 @@ +(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[1555],{7375:function(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}}));return i.bind(this)(r)}}}()},445:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,r={},a=function(t){return(t=+t)+(t>68?1900:2e3)},o=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],l=function(t){var e=r[t];return e&&(e.indexOf?e:e.s.concat(e.f))},d=function(t,e){var n,i=r.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},u={A:[s,function(t){this.afternoon=d(t,!1)}],a:[s,function(t){this.afternoon=d(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,o("seconds")],ss:[i,o("seconds")],m:[i,o("minutes")],mm:[i,o("minutes")],H:[i,o("hours")],h:[i,o("hours")],HH:[i,o("hours")],hh:[i,o("hours")],D:[i,o("day")],DD:[n,o("day")],Do:[s,function(t){var e=r.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],M:[i,o("month")],MM:[n,o("month")],MMM:[s,function(t){var e=l("months"),n=(l("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[s,function(t){var e=l("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,o("year")],YY:[n,function(t){this.year=a(t)}],YYYY:[/\d{4}/,o("year")],Z:c,ZZ:c};function h(n){var i,s;i=n,s=r&&r.formats;for(var a=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=a.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var i=h(e)(t),s=i.year,r=i.month,a=i.day,o=i.hours,c=i.minutes,l=i.seconds,d=i.milliseconds,u=i.zone,f=new Date,y=a||(s||r?1:f.getDate()),m=s||f.getFullYear(),k=0;s&&!r||(k=r>0?r-1:f.getMonth());var p=o||0,g=c||0,b=l||0,v=d||0;return u?new Date(Date.UTC(m,k,y,p,g,b,v+60*u.offset*1e3)):n?new Date(Date.UTC(m,k,y,p,g,b,v)):new Date(m,k,y,p,g,b,v)}catch(t){return new Date("")}}(e,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),r={}}else if(o instanceof Array)for(var f=o.length,y=1;y<=f;y+=1){a[1]=o[y-1];var m=n.apply(this,a);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}y===f&&(this.$d=new Date(""))}else s.call(this,t)}}}()},8313:function(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var s=function(e){return e.add(4-e.isoWeekday(),t)},r=n.prototype;r.isoWeekYear=function(){return s(this).year()},r.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,r,a,o=s(this),c=(n=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,t));return o.diff(c,"week")+1},r.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=r.startOf;r.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}()},1555:(t,e,n)=>{"use strict";n.d(e,{diagram:()=>q});var i=n(6750),s=n(4353),r=n(8313),a=n(445),o=n(7375),c=n(6257),l=n(6312),d=(n(2838),function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[6,8,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,32,33,35,37],n=[1,25],i=[1,26],s=[1,27],r=[1,28],a=[1,29],o=[1,30],c=[1,31],l=[1,9],d=[1,10],u=[1,11],h=[1,12],f=[1,13],y=[1,14],m=[1,15],k=[1,16],p=[1,18],g=[1,19],b=[1,20],v=[1,21],T=[1,22],x=[1,24],w=[1,32],_={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,dateFormat:19,inclusiveEndDates:20,topAxis:21,axisFormat:22,tickInterval:23,excludes:24,includes:25,todayMarker:26,title:27,acc_title:28,acc_title_value:29,acc_descr:30,acc_descr_value:31,acc_descr_multiline_value:32,section:33,clickStatement:34,taskTxt:35,taskData:36,click:37,callbackname:38,callbackargs:39,href:40,clickStatementDebug:41,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",19:"dateFormat",20:"inclusiveEndDates",21:"topAxis",22:"axisFormat",23:"tickInterval",24:"excludes",25:"includes",26:"todayMarker",27:"title",28:"acc_title",29:"acc_title_value",30:"acc_descr",31:"acc_descr_value",32:"acc_descr_multiline_value",33:"section",35:"taskTxt",36:"taskData",37:"click",38:"callbackname",39:"callbackargs",40:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[34,2],[34,3],[34,3],[34,4],[34,3],[34,4],[34,2],[41,2],[41,3],[41,3],[41,4],[41,3],[41,4],[41,2]],performAction:function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 16:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 17:i.TopAxis(),this.$=r[o].substr(8);break;case 18:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 19:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 20:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 21:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 22:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 24:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 25:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 28:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 30:i.addTask(r[o-1],r[o]),this.$="task";break;case 31:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 32:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 33:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 34:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 36:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 37:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 38:case 44:this.$=r[o-1]+" "+r[o];break;case 39:case 40:case 42:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 41:case 43:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[o]}},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:17,12:n,13:i,14:s,15:r,16:a,17:o,18:c,19:l,20:d,21:u,22:h,23:f,24:y,25:m,26:k,27:p,28:g,30:b,32:v,33:T,34:23,35:x,37:w},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:33,11:17,12:n,13:i,14:s,15:r,16:a,17:o,18:c,19:l,20:d,21:u,22:h,23:f,24:y,25:m,26:k,27:p,28:g,30:b,32:v,33:T,34:23,35:x,37:w},t(e,[2,5]),t(e,[2,6]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),{29:[1,34]},{31:[1,35]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),{36:[1,36]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),{38:[1,37],40:[1,38]},t(e,[2,4]),t(e,[2,25]),t(e,[2,26]),t(e,[2,30]),t(e,[2,31],{39:[1,39],40:[1,40]}),t(e,[2,37],{38:[1,41]}),t(e,[2,32],{40:[1,42]}),t(e,[2,33]),t(e,[2,35],{39:[1,43]}),t(e,[2,34]),t(e,[2,36])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,o="",c=0,l=0,d=r.slice.call(arguments,1),u=Object.create(this.lexer),h={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(h.yy[f]=this.yy[f]);u.setInput(t,h.yy),h.yy.lexer=u,h.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var y=u.yylloc;r.push(y);var m=u.options&&u.options.ranges;"function"==typeof h.yy.parseError?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var k,p,g,b,v,T,x,w,_,$={};;){if(p=n[n.length-1],this.defaultActions[p]?g=this.defaultActions[p]:(null==k&&(_=void 0,"number"!=typeof(_=i.pop()||u.lex()||1)&&(_ instanceof Array&&(_=(i=_).pop()),_=e.symbols_[_]||_),k=_),g=a[p]&&a[p][k]),void 0===g||!g.length||!g[0]){var D="";for(v in w=[],a[p])this.terminals_[v]&&v>2&&w.push("'"+this.terminals_[v]+"'");D=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(D,{text:u.match,token:this.terminals_[k]||k,line:u.yylineno,loc:y,expected:w})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+k);switch(g[0]){case 1:n.push(k),s.push(u.yytext),r.push(u.yylloc),n.push(g[1]),k=null,l=u.yyleng,o=u.yytext,c=u.yylineno,y=u.yylloc;break;case 2:if(T=this.productions_[g[1]][1],$.$=s[s.length-T],$._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},m&&($._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply($,[o,l,c,h.yy,g[1],s,r].concat(d))))return b;T&&(n=n.slice(0,-1*T*2),s=s.slice(0,-1*T),r=r.slice(0,-1*T)),n.push(this.productions_[g[1]][0]),s.push($.$),r.push($._$),x=a[n[n.length-2]][n[n.length-1]],n.push(x);break;case 3:return!0}}return!0}},$={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),28;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),30;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 40;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 38;case 22:return 39;case 23:this.begin("click");break;case 25:return 37;case 26:return 4;case 27:return 19;case 28:return 20;case 29:return 21;case 30:return 22;case 31:return 23;case 32:return 25;case 33:return 24;case 34:return 26;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return"date";case 43:return 27;case 44:return"accDescription";case 45:return 33;case 46:return 35;case 47:return 36;case 48:return":";case 49:return 6;case 50:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,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],inclusive:!0}}};function D(){this.yy={}}return _.lexer=$,D.prototype=_,_.Parser=D,new D}());d.parser=d;const u=d;s.extend(r),s.extend(a),s.extend(o);let h,f="",y="",m="",k=[],p=[],g={},b=[],v=[],T="",x="";const w=["active","done","crit","milestone"];let _=[],$=!1,D=!1,C="sunday",S=0;const E=function(t,e,n,i){return!i.includes(t.format(e.trim()))&&(!!(t.isoWeekday()>=6&&n.includes("weekends"))||(!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim()))))},A=function(t,e,n,i){if(!n.length||t.manualEndTime)return;let r,a;r=t.startTime instanceof Date?s(t.startTime):s(t.startTime,e,!0),r=r.add(1,"d"),a=t.endTime instanceof Date?s(t.endTime):s(t.endTime,e,!0);const[o,c]=M(r,a,e,n,i);t.endTime=o.toDate(),t.renderEndTime=c},M=function(t,e,n,i,s){let r=!1,a=null;for(;t<=e;)r||(a=e.toDate()),r=E(t,n,i,s),r&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},Y=function(t,e,n){n=n.trim();const i=/^after\s+(?[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const n of i.groups.ids.split(" ")){let e=N(n);void 0!==e&&(!t||e.endTime>t.endTime)&&(t=e)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let r=s(n,e.trim(),!0);if(r.isValid())return r.toDate();{c.l.debug("Invalid date:"+n),c.l.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}},L=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},I=function(t,e,n,i=!1){n=n.trim();const r=/^until\s+(?[\d\w- ]+)/.exec(n);if(null!==r){let t=null;for(const n of r.groups.ids.split(" ")){let e=N(n);void 0!==e&&(!t||e.startTime(0,c.c)().gantt,clear:function(){b=[],v=[],T="",_=[],O=0,F=void 0,P=void 0,B=[],f="",y="",x="",h=void 0,m="",k=[],p=[],$=!1,D=!1,S=0,g={},(0,c.v)(),C="sunday"},setDateFormat:function(t){f=t},getDateFormat:function(){return f},enableInclusiveEndDates:function(){$=!0},endDatesAreInclusive:function(){return $},enableTopAxis:function(){D=!0},topAxisEnabled:function(){return D},setAxisFormat:function(t){y=t},getAxisFormat:function(){return y},setTickInterval:function(t){h=t},getTickInterval:function(){return h},setTodayMarker:function(t){m=t},getTodayMarker:function(){return m},setAccTitle:c.s,getAccTitle:c.g,setDiagramTitle:c.q,getDiagramTitle:c.t,setDisplayMode:function(t){x=t},getDisplayMode:function(){return x},setAccDescription:c.b,getAccDescription:c.a,addSection:function(t){T=t,b.push(t)},getSections:function(){return b},getTasks:function(){let t=G();let e=0;for(;!t&&e<10;)t=G(),e++;return v=B,v},addTask:function(t,e){const n={section:T,type:T,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};R(i,s,w);for(let r=0;r{c.u.runFunc(e,...i)}))}(t,e,n)})),H(t,"clickable")},setLink:function(t,e){let n=e;"loose"!==(0,c.c)().securityLevel&&(n=(0,i.Jf)(e)),t.split(",").forEach((function(t){void 0!==N(t)&&(j(t,(()=>{window.open(n,"_self")})),g[t]=n)})),H(t,"clickable")},getLinks:function(){return g},bindFunctions:function(t){_.forEach((function(e){e(t)}))},parseDuration:L,isInvalidDate:E,setWeekday:function(t){C=t},getWeekday:function(){return C}};function R(t,e,n){let i=!0;for(;i;)i=!1,n.forEach((function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)}))}const V={monday:l.ABi,tuesday:l.PGu,wednesday:l.GuW,thursday:l.Mol,friday:l.TUC,saturday:l.rGn,sunday:l.YPH},Z=(t,e)=>{let n=[...t].map((()=>-1/0)),i=[...t].sort(((t,e)=>t.startTime-e.startTime||t.order-e.order)),s=0;for(const r of i)for(let t=0;t=n[t]){n[t]=r.endTime,r.order=t+e,t>s&&(s=t);break}return s};let X;const q={parser:u,db:U,renderer:{setConf:function(){c.l.debug("Something is calling, setConf, remove the call")},draw:function(t,e,n,i){const r=(0,c.c)().gantt,a=(0,c.c)().securityLevel;let o;"sandbox"===a&&(o=(0,l.Ltv)("#i"+e));const d="sandbox"===a?(0,l.Ltv)(o.nodes()[0].contentDocument.body):(0,l.Ltv)("body"),u="sandbox"===a?o.nodes()[0].contentDocument:document,h=u.getElementById(e);X=h.parentElement.offsetWidth,void 0===X&&(X=1200),void 0!==r.useWidth&&(X=r.useWidth);const f=i.db.getTasks();let y=[];for(const s of f)y.push(s.type);y=function(t){const e={},n=[];for(let i=0,s=t.length;ie.type===t)).length}h.setAttribute("viewBox","0 0 "+X+" "+k);const p=d.select(`[id="${e}"]`),g=(0,l.w7C)().domain([(0,l.jkA)(f,(function(t){return t.startTime})),(0,l.T9B)(f,(function(t){return t.endTime}))]).rangeRound([0,X-r.leftPadding-r.rightPadding]);f.sort((function(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:nf)&&(f=s);if(!h||!f)return;if(s(f).diff(s(h),"year")>5)return void c.l.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const y=i.db.getDateFormat(),m=[];let k=null,b=s(h);for(;b.valueOf()<=f;)i.db.isInvalidDate(b,y,d,u)?k?k.end=b:k={start:b,end:b}:k&&(m.push(k),k=null),b=b.add(1,"d");p.append("g").selectAll("rect").data(m).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return g(t.start)+n})).attr("y",r.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return g(e)-g(t.start)})).attr("height",o-e-r.gridLineStartPadding).attr("transform-origin",(function(e,i){return(g(e.start)+n+.5*(g(e.end)-g(e.start))).toString()+"px "+(i*t+.5*o).toString()+"px"})).attr("class","exclude-range")})(d,h,f,0,a,t,i.db.getExcludes(),i.db.getIncludes()),function(t,e,n,s){let a=(0,l.l78)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,l.DCK)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));const o=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||r.tickInterval);if(null!==o){const t=o[1],e=o[2],n=i.db.getWeekday()||r.weekday;switch(e){case"millisecond":a.ticks(l.t6C.every(t));break;case"second":a.ticks(l.ucG.every(t));break;case"minute":a.ticks(l.wXd.every(t));break;case"hour":a.ticks(l.Agd.every(t));break;case"day":a.ticks(l.UAC.every(t));break;case"week":a.ticks(V[n].every(t));break;case"month":a.ticks(l.Ui6.every(t))}}if(p.append("g").attr("class","grid").attr("transform","translate("+t+", "+(s-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||r.topAxis){let n=(0,l.tlR)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,l.DCK)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));if(null!==o){const t=o[1],e=o[2],s=i.db.getWeekday()||r.weekday;switch(e){case"millisecond":n.ticks(l.t6C.every(t));break;case"second":n.ticks(l.ucG.every(t));break;case"minute":n.ticks(l.wXd.every(t));break;case"hour":n.ticks(l.Agd.every(t));break;case"day":n.ticks(l.UAC.every(t));break;case"week":n.ticks(V[s].every(t));break;case"month":n.ticks(l.Ui6.every(t))}}p.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(f,h,0,a),function(t,n,s,a,o,d,u){const h=[...new Set(t.map((t=>t.order)))].map((e=>t.find((t=>t.order===e))));p.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*n+s-2})).attr("width",(function(){return u-r.rightPadding/2})).attr("height",n).attr("class",(function(t){for(const[e,n]of y.entries())if(t.type===n)return"section section"+e%r.numberSectionStyles;return"section section0"}));const f=p.append("g").selectAll("rect").data(t).enter(),m=i.db.getLinks();f.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?g(t.startTime)+a+.5*(g(t.endTime)-g(t.startTime))-.5*o:g(t.startTime)+a})).attr("y",(function(t,e){return t.order*n+s})).attr("width",(function(t){return t.milestone?o:g(t.renderEndTime||t.endTime)-g(t.startTime)})).attr("height",o).attr("transform-origin",(function(t,e){return e=t.order,(g(t.startTime)+a+.5*(g(t.endTime)-g(t.startTime))).toString()+"px "+(e*n+s+.5*o).toString()+"px"})).attr("class",(function(t){const e="task";let n="";t.classes.length>0&&(n=t.classes.join(" "));let i=0;for(const[a,o]of y.entries())t.type===o&&(i=a%r.numberSectionStyles);let s="";return t.active?t.crit?s+=" activeCrit":s=" active":t.done?s=t.crit?" doneCrit":" done":t.crit&&(s+=" crit"),0===s.length&&(s=" task"),t.milestone&&(s=" milestone "+s),s+=i,s+=" "+n,e+s})),f.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",r.fontSize).attr("x",(function(t){let e=g(t.startTime),n=g(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(g(t.endTime)-g(t.startTime))-.5*o),t.milestone&&(n=e+o);const i=this.getBBox().width;return i>n-e?n+i+1.5*r.leftPadding>u?e+a-5:n+a+5:(n-e)/2+e+a})).attr("y",(function(t,e){return t.order*n+r.barHeight/2+(r.fontSize/2-2)+s})).attr("text-height",o).attr("class",(function(t){const e=g(t.startTime);let n=g(t.endTime);t.milestone&&(n=e+o);const i=this.getBBox().width;let s="";t.classes.length>0&&(s=t.classes.join(" "));let a=0;for(const[o,l]of y.entries())t.type===l&&(a=o%r.numberSectionStyles);let c="";return t.active&&(c=t.crit?"activeCritText"+a:"activeText"+a),t.done?c=t.crit?c+" doneCritText"+a:c+" doneText"+a:t.crit&&(c=c+" critText"+a),t.milestone&&(c+=" milestoneText"),i>n-e?n+i+1.5*r.leftPadding>u?s+" taskTextOutsideLeft taskTextOutside"+a+" "+c:s+" taskTextOutsideRight taskTextOutside"+a+" "+c+" width-"+i:s+" taskText taskText"+a+" "+c+" width-"+i}));if("sandbox"===(0,c.c)().securityLevel){let t;t=(0,l.Ltv)("#i"+e);const n=t.nodes()[0].contentDocument;f.filter((function(t){return void 0!==m[t.id]})).each((function(t){var e=n.querySelector("#"+t.id),i=n.querySelector("#"+t.id+"-text");const s=e.parentNode;var r=n.createElement("a");r.setAttribute("xlink:href",m[t.id]),r.setAttribute("target","_top"),s.appendChild(r),r.appendChild(e),r.appendChild(i)}))}}(t,d,h,f,o,0,n),function(t,e){let n=0;const i=Object.keys(m).map((t=>[t,m[t]]));p.append("g").selectAll("text").data(i).enter().append((function(t){const e=t[0].split(c.e.lineBreakRegex),n=-(e.length-1)/2,i=u.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[s,r]of e.entries()){const t=u.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),s>0&&t.setAttribute("dy","1em"),t.textContent=r,i.appendChild(t)}return i})).attr("x",10).attr("y",(function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a`\n .mermaid-main-font {\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n`}}}]); \ No newline at end of file diff --git a/assets/js/17896441.244ddac3.js b/assets/js/17896441.244ddac3.js new file mode 100644 index 00000000..500e3530 --- /dev/null +++ b/assets/js/17896441.244ddac3.js @@ -0,0 +1,2 @@ +/*! For license information please see 17896441.244ddac3.js.LICENSE.txt */ +(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[8401],{6750:(t,e)=>{"use strict";e.Jf=e.dz=void 0;var i=/^([^\w]*)(javascript|data|vbscript)/im,r=/&#(\w+)(^\w|;)?/g,n=/&(newline|tab);/gi,o=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,a=/^.+(:|:)/gim,s=[".","/"];e.dz="about:blank",e.Jf=function(t){if(!t)return e.dz;var l,c=(l=t,l.replace(o,"").replace(r,(function(t,e){return String.fromCharCode(e)}))).replace(n,"").replace(o,"").trim();if(!c)return e.dz;if(function(t){return s.indexOf(t[0])>-1}(c))return c;var h=c.match(a);if(!h)return c;var u=h[0];return i.test(u)?e.dz:c}},1243:(t,e,i)=>{"use strict";i.d(e,{A:()=>y});i(6540);var r=i(4164),n=i(7559),o=i(4718),a=i(9169),s=i(8774),l=i(1312),c=i(6025),h=i(4848);function u(t){return(0,h.jsx)("svg",{viewBox:"0 0 24 24",...t,children:(0,h.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const d={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function f(){const t=(0,c.Ay)("/");return(0,h.jsx)("li",{className:"breadcrumbs__item",children:(0,h.jsx)(s.A,{"aria-label":(0,l.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:t,children:(0,h.jsx)(u,{className:d.breadcrumbHomeIcon})})})}const p={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function g(t){let{children:e,href:i,isLast:r}=t;const n="breadcrumbs__link";return r?(0,h.jsx)("span",{className:n,itemProp:"name",children:e}):i?(0,h.jsx)(s.A,{className:n,href:i,itemProp:"item",children:(0,h.jsx)("span",{itemProp:"name",children:e})}):(0,h.jsx)("span",{className:n,children:e})}function m(t){let{children:e,active:i,index:n,addMicrodata:o}=t;return(0,h.jsxs)("li",{...o&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,r.A)("breadcrumbs__item",{"breadcrumbs__item--active":i}),children:[e,(0,h.jsx)("meta",{itemProp:"position",content:String(n+1)})]})}function y(){const t=(0,o.OF)(),e=(0,a.Dt)();return t?(0,h.jsx)("nav",{className:(0,r.A)(n.G.docs.docBreadcrumbs,p.breadcrumbsContainer),"aria-label":(0,l.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,h.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[e&&(0,h.jsx)(f,{}),t.map(((e,i)=>{const r=i===t.length-1,n="category"===e.type&&e.linkUnlisted?void 0:e.href;return(0,h.jsx)(m,{active:r,index:i,addMicrodata:!!n,children:(0,h.jsx)(g,{href:n,isLast:r,children:e.label})},i)}))]})}):null}},8038:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>Re});var r=i(6540),n=i(1003),o=i(9532),a=i(4848);const s=r.createContext(null);function l(t){let{children:e,content:i}=t;const n=function(t){return(0,r.useMemo)((()=>({metadata:t.metadata,frontMatter:t.frontMatter,assets:t.assets,contentTitle:t.contentTitle,toc:t.toc})),[t])}(i);return(0,a.jsx)(s.Provider,{value:n,children:e})}function c(){const t=(0,r.useContext)(s);if(null===t)throw new o.dV("DocProvider");return t}function h(){const{metadata:t,frontMatter:e,assets:i}=c();return(0,a.jsx)(n.be,{title:t.title,description:t.description,keywords:e.keywords,image:i.image??e.image})}var u=i(4164),d=i(4581),f=i(6929);function p(){const{metadata:t}=c();return(0,a.jsx)(f.A,{previous:t.previous,next:t.next})}var g=i(1878),m=i(4267),y=i(7559),x=i(1312),b=i(8774);const C={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function _(t){let{permalink:e,label:i,count:r,description:n}=t;return(0,a.jsxs)(b.A,{href:e,title:n,className:(0,u.A)(C.tag,r?C.tagWithCount:C.tagRegular),children:[i,r&&(0,a.jsx)("span",{children:r})]})}const v={tags:"tags_jXut",tag:"tag_QGVx"};function k(t){let{tags:e}=t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("b",{children:(0,a.jsx)(x.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,a.jsx)("ul",{className:(0,u.A)(v.tags,"padding--none","margin-left--sm"),children:e.map((t=>(0,a.jsx)("li",{className:v.tag,children:(0,a.jsx)(_,{...t})},t.permalink)))})]})}const T={iconEdit:"iconEdit_Z9Sw"};function A(t){let{className:e,...i}=t;return(0,a.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.A)(T.iconEdit,e),"aria-hidden":"true",...i,children:(0,a.jsx)("g",{children:(0,a.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})})}function w(t){let{editUrl:e}=t;return(0,a.jsxs)(b.A,{to:e,className:y.G.common.editThisPage,children:[(0,a.jsx)(A,{}),(0,a.jsx)(x.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}var S=i(4586);function B(t){void 0===t&&(t={});const{i18n:{currentLocale:e}}=(0,S.A)(),i=function(){const{i18n:{currentLocale:t,localeConfigs:e}}=(0,S.A)();return e[t].calendar}();return new Intl.DateTimeFormat(e,{calendar:i,...t})}function L(t){let{lastUpdatedAt:e}=t;const i=new Date(e),r=B({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(i);return(0,a.jsx)(x.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,a.jsx)("b",{children:(0,a.jsx)("time",{dateTime:i.toISOString(),itemProp:"dateModified",children:r})})},children:" on {date}"})}function F(t){let{lastUpdatedBy:e}=t;return(0,a.jsx)(x.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,a.jsx)("b",{children:e})},children:" by {user}"})}function M(t){let{lastUpdatedAt:e,lastUpdatedBy:i}=t;return(0,a.jsxs)("span",{className:y.G.common.lastUpdated,children:[(0,a.jsx)(x.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:e?(0,a.jsx)(L,{lastUpdatedAt:e}):"",byUser:i?(0,a.jsx)(F,{lastUpdatedBy:i}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const E={lastUpdated:"lastUpdated_JAkA"};function N(t){let{className:e,editUrl:i,lastUpdatedAt:r,lastUpdatedBy:n}=t;return(0,a.jsxs)("div",{className:(0,u.A)("row",e),children:[(0,a.jsx)("div",{className:"col",children:i&&(0,a.jsx)(w,{editUrl:i})}),(0,a.jsx)("div",{className:(0,u.A)("col",E.lastUpdated),children:(r||n)&&(0,a.jsx)(M,{lastUpdatedAt:r,lastUpdatedBy:n})})]})}function j(){const{metadata:t}=c(),{editUrl:e,lastUpdatedAt:i,lastUpdatedBy:r,tags:n}=t,o=n.length>0,s=!!(e||i||r);return o||s?(0,a.jsxs)("footer",{className:(0,u.A)(y.G.docs.docFooter,"docusaurus-mt-lg"),children:[o&&(0,a.jsx)("div",{className:(0,u.A)("row margin-top--sm",y.G.docs.docFooterTagsRow),children:(0,a.jsx)("div",{className:"col",children:(0,a.jsx)(k,{tags:n})})}),s&&(0,a.jsx)(N,{className:(0,u.A)("margin-top--sm",y.G.docs.docFooterEditMetaRow),editUrl:e,lastUpdatedAt:i,lastUpdatedBy:r})]}):null}var O=i(1422),I=i(6342);function D(t){const e=t.map((t=>({...t,parentIndex:-1,children:[]}))),i=Array(7).fill(-1);e.forEach(((t,e)=>{const r=i.slice(2,t.level);t.parentIndex=Math.max(...r),i[t.level]=e}));const r=[];return e.forEach((t=>{const{parentIndex:i,...n}=t;i>=0?e[i].children.push(n):r.push(n)})),r}function q(t){let{toc:e,minHeadingLevel:i,maxHeadingLevel:r}=t;return e.flatMap((t=>{const e=q({toc:t.children,minHeadingLevel:i,maxHeadingLevel:r});return function(t){return t.level>=i&&t.level<=r}(t)?[{...t,children:e}]:e}))}function $(t){const e=t.getBoundingClientRect();return e.top===e.bottom?$(t.parentNode):e}function z(t,e){let{anchorTopOffset:i}=e;const r=t.find((t=>$(t).top>=i));if(r){return function(t){return t.top>0&&t.bottom{t.current=e?0:document.querySelector(".navbar").clientHeight}),[e]),t}function R(t){const e=(0,r.useRef)(void 0),i=P();(0,r.useEffect)((()=>{if(!t)return()=>{};const{linkClassName:r,linkActiveClassName:n,minHeadingLevel:o,maxHeadingLevel:a}=t;function s(){const t=function(t){return Array.from(document.getElementsByClassName(t))}(r),s=function(t){let{minHeadingLevel:e,maxHeadingLevel:i}=t;const r=[];for(let n=e;n<=i;n+=1)r.push(`h${n}.anchor`);return Array.from(document.querySelectorAll(r.join()))}({minHeadingLevel:o,maxHeadingLevel:a}),l=z(s,{anchorTopOffset:i.current}),c=t.find((t=>l&&l.id===function(t){return decodeURIComponent(t.href.substring(t.href.indexOf("#")+1))}(t)));t.forEach((t=>{!function(t,i){i?(e.current&&e.current!==t&&e.current.classList.remove(n),t.classList.add(n),e.current=t):t.classList.remove(n)}(t,t===c)}))}return document.addEventListener("scroll",s),document.addEventListener("resize",s),s(),()=>{document.removeEventListener("scroll",s),document.removeEventListener("resize",s)}}),[t,i])}function H(t){let{toc:e,className:i,linkClassName:r,isChild:n}=t;return e.length?(0,a.jsx)("ul",{className:n?void 0:i,children:e.map((t=>(0,a.jsxs)("li",{children:[(0,a.jsx)(b.A,{to:`#${t.id}`,className:r??void 0,dangerouslySetInnerHTML:{__html:t.value}}),(0,a.jsx)(H,{isChild:!0,toc:t.children,className:i,linkClassName:r})]},t.id)))}):null}const W=r.memo(H);function U(t){let{toc:e,className:i="table-of-contents table-of-contents__left-border",linkClassName:n="table-of-contents__link",linkActiveClassName:o,minHeadingLevel:s,maxHeadingLevel:l,...c}=t;const h=(0,I.p)(),u=s??h.tableOfContents.minHeadingLevel,d=l??h.tableOfContents.maxHeadingLevel,f=function(t){let{toc:e,minHeadingLevel:i,maxHeadingLevel:n}=t;return(0,r.useMemo)((()=>q({toc:D(e),minHeadingLevel:i,maxHeadingLevel:n})),[e,i,n])}({toc:e,minHeadingLevel:u,maxHeadingLevel:d});return R((0,r.useMemo)((()=>{if(n&&o)return{linkClassName:n,linkActiveClassName:o,minHeadingLevel:u,maxHeadingLevel:d}}),[n,o,u,d])),(0,a.jsx)(W,{toc:f,className:i,linkClassName:n,...c})}const Y={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};function V(t){let{collapsed:e,...i}=t;return(0,a.jsx)("button",{type:"button",...i,className:(0,u.A)("clean-btn",Y.tocCollapsibleButton,!e&&Y.tocCollapsibleButtonExpanded,i.className),children:(0,a.jsx)(x.A,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component",children:"On this page"})})}const G={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function X(t){let{toc:e,className:i,minHeadingLevel:r,maxHeadingLevel:n}=t;const{collapsed:o,toggleCollapsed:s}=(0,O.u)({initialState:!0});return(0,a.jsxs)("div",{className:(0,u.A)(G.tocCollapsible,!o&&G.tocCollapsibleExpanded,i),children:[(0,a.jsx)(V,{collapsed:o,onClick:s}),(0,a.jsx)(O.N,{lazy:!0,className:G.tocCollapsibleContent,collapsed:o,children:(0,a.jsx)(U,{toc:e,minHeadingLevel:r,maxHeadingLevel:n})})]})}const Z={tocMobile:"tocMobile_ITEo"};function J(){const{toc:t,frontMatter:e}=c();return(0,a.jsx)(X,{toc:t,minHeadingLevel:e.toc_min_heading_level,maxHeadingLevel:e.toc_max_heading_level,className:(0,u.A)(y.G.docs.docTocMobile,Z.tocMobile)})}const Q={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},K="table-of-contents__link toc-highlight",tt="table-of-contents__link--active";function et(t){let{className:e,...i}=t;return(0,a.jsx)("div",{className:(0,u.A)(Q.tableOfContents,"thin-scrollbar",e),children:(0,a.jsx)(U,{...i,linkClassName:K,linkActiveClassName:tt})})}function it(){const{toc:t,frontMatter:e}=c();return(0,a.jsx)(et,{toc:t,minHeadingLevel:e.toc_min_heading_level,maxHeadingLevel:e.toc_max_heading_level,className:y.G.docs.docTocDesktop})}var rt=i(1107),nt=i(8453),ot=i(5260),at=i(2303),st=i(5293);function lt(){const{prism:t}=(0,I.p)(),{colorMode:e}=(0,st.G)(),i=t.theme,r=t.darkTheme||i;return"dark"===e?r:i}var ct=i(8426),ht=i.n(ct);const ut=/title=(?["'])(?.*?)\1/,dt=/\{(?<range>[\d,-]+)\}/,ft={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},pt={...ft,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},gt=Object.keys(ft);function mt(t,e){const i=t.map((t=>{const{start:i,end:r}=pt[t];return`(?:${i}\\s*(${e.flatMap((t=>[t.line,t.block?.start,t.block?.end].filter(Boolean))).join("|")})\\s*${r})`})).join("|");return new RegExp(`^\\s*(?:${i})\\s*$`)}function yt(t,e){let i=t.replace(/\n$/,"");const{language:r,magicComments:n,metastring:o}=e;if(o&&dt.test(o)){const t=o.match(dt).groups.range;if(0===n.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${o}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const e=n[0].className,r=ht()(t).filter((t=>t>0)).map((t=>[t-1,[e]]));return{lineClassNames:Object.fromEntries(r),code:i}}if(void 0===r)return{lineClassNames:{},code:i};const a=function(t,e){switch(t){case"js":case"javascript":case"ts":case"typescript":return mt(["js","jsBlock"],e);case"jsx":case"tsx":return mt(["js","jsBlock","jsx"],e);case"html":return mt(["js","jsBlock","html"],e);case"python":case"py":case"bash":return mt(["bash"],e);case"markdown":case"md":return mt(["html","jsx","bash"],e);case"tex":case"latex":case"matlab":return mt(["tex"],e);case"lua":case"haskell":case"sql":return mt(["lua"],e);case"wasm":return mt(["wasm"],e);case"vb":case"vba":case"visual-basic":return mt(["vb","rem"],e);case"vbnet":return mt(["vbnet","rem"],e);case"batch":return mt(["rem"],e);case"basic":return mt(["rem","f90"],e);case"fsharp":return mt(["js","ml"],e);case"ocaml":case"sml":return mt(["ml"],e);case"fortran":return mt(["f90"],e);case"cobol":return mt(["cobol"],e);default:return mt(gt,e)}}(r,n),s=i.split("\n"),l=Object.fromEntries(n.map((t=>[t.className,{start:0,range:""}]))),c=Object.fromEntries(n.filter((t=>t.line)).map((t=>{let{className:e,line:i}=t;return[i,e]}))),h=Object.fromEntries(n.filter((t=>t.block)).map((t=>{let{className:e,block:i}=t;return[i.start,e]}))),u=Object.fromEntries(n.filter((t=>t.block)).map((t=>{let{className:e,block:i}=t;return[i.end,e]})));for(let f=0;f<s.length;){const t=s[f].match(a);if(!t){f+=1;continue}const e=t.slice(1).find((t=>void 0!==t));c[e]?l[c[e]].range+=`${f},`:h[e]?l[h[e]].start=f:u[e]&&(l[u[e]].range+=`${l[u[e]].start}-${f-1},`),s.splice(f,1)}i=s.join("\n");const d={};return Object.entries(l).forEach((t=>{let[e,{range:i}]=t;ht()(i).forEach((t=>{d[t]??=[],d[t].push(e)}))})),{lineClassNames:d,code:i}}const xt={codeBlockContainer:"codeBlockContainer_Ckt0"};function bt(t){let{as:e,...i}=t;const r=function(t){const e={color:"--prism-color",backgroundColor:"--prism-background-color"},i={};return Object.entries(t.plain).forEach((t=>{let[r,n]=t;const o=e[r];o&&"string"==typeof n&&(i[o]=n)})),i}(lt());return(0,a.jsx)(e,{...i,style:r,className:(0,u.A)(i.className,xt.codeBlockContainer,y.G.common.codeBlock)})}const Ct={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function _t(t){let{children:e,className:i}=t;return(0,a.jsx)(bt,{as:"pre",tabIndex:0,className:(0,u.A)(Ct.codeBlockStandalone,"thin-scrollbar",i),children:(0,a.jsx)("code",{className:Ct.codeBlockLines,children:e})})}const vt={attributes:!0,characterData:!0,childList:!0,subtree:!0};function kt(t,e){const[i,n]=(0,r.useState)(),a=(0,r.useCallback)((()=>{n(t.current?.closest("[role=tabpanel][hidden]"))}),[t,n]);(0,r.useEffect)((()=>{a()}),[a]),function(t,e,i){void 0===i&&(i=vt);const n=(0,o._q)(e),a=(0,o.Be)(i);(0,r.useEffect)((()=>{const e=new MutationObserver(n);return t&&e.observe(t,a),()=>e.disconnect()}),[t,n,a])}(i,(t=>{t.forEach((t=>{"attributes"===t.type&&"hidden"===t.attributeName&&(e(),a())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var Tt=i(1765);const At={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function wt(t){let{line:e,classNames:i,showLineNumbers:r,getLineProps:n,getTokenProps:o}=t;1===e.length&&"\n"===e[0].content&&(e[0].content="");const s=n({line:e,className:(0,u.A)(i,r&&At.codeLine)}),l=e.map(((t,e)=>(0,a.jsx)("span",{...o({token:t})},e)));return(0,a.jsxs)("span",{...s,children:[r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:At.codeLineNumber}),(0,a.jsx)("span",{className:At.codeLineContent,children:l})]}):l,(0,a.jsx)("br",{})]})}function St(t){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",...t,children:(0,a.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function Bt(t){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",...t,children:(0,a.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const Lt={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function Ft(t){let{code:e,className:i}=t;const[n,o]=(0,r.useState)(!1),s=(0,r.useRef)(void 0),l=(0,r.useCallback)((()=>{!function(t,e){let{target:i=document.body}=void 0===e?{}:e;if("string"!=typeof t)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof t}\`.`);const r=document.createElement("textarea"),n=document.activeElement;r.value=t,r.setAttribute("readonly",""),r.style.contain="strict",r.style.position="absolute",r.style.left="-9999px",r.style.fontSize="12pt";const o=document.getSelection(),a=o.rangeCount>0&&o.getRangeAt(0);i.append(r),r.select(),r.selectionStart=0,r.selectionEnd=t.length;let s=!1;try{s=document.execCommand("copy")}catch{}r.remove(),a&&(o.removeAllRanges(),o.addRange(a)),n&&n.focus()}(e),o(!0),s.current=window.setTimeout((()=>{o(!1)}),1e3)}),[e]);return(0,r.useEffect)((()=>()=>window.clearTimeout(s.current)),[]),(0,a.jsx)("button",{type:"button","aria-label":n?(0,x.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,x.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,x.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.A)("clean-btn",i,Lt.copyButton,n&&Lt.copyButtonCopied),onClick:l,children:(0,a.jsxs)("span",{className:Lt.copyButtonIcons,"aria-hidden":"true",children:[(0,a.jsx)(St,{className:Lt.copyButtonIcon}),(0,a.jsx)(Bt,{className:Lt.copyButtonSuccessIcon})]})})}function Mt(t){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",...t,children:(0,a.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const Et={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Nt(t){let{className:e,onClick:i,isEnabled:r}=t;const n=(0,x.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,a.jsx)("button",{type:"button",onClick:i,className:(0,u.A)("clean-btn",e,r&&Et.wordWrapButtonEnabled),"aria-label":n,title:n,children:(0,a.jsx)(Mt,{className:Et.wordWrapButtonIcon,"aria-hidden":"true"})})}function jt(t){let{children:e,className:i="",metastring:n,title:o,showLineNumbers:s,language:l}=t;const{prism:{defaultLanguage:c,magicComments:h}}=(0,I.p)(),d=function(t){return t?.toLowerCase()}(l??function(t){const e=t.split(" ").find((t=>t.startsWith("language-")));return e?.replace(/language-/,"")}(i)??c),f=lt(),p=function(){const[t,e]=(0,r.useState)(!1),[i,n]=(0,r.useState)(!1),o=(0,r.useRef)(null),a=(0,r.useCallback)((()=>{const i=o.current.querySelector("code");t?i.removeAttribute("style"):(i.style.whiteSpace="pre-wrap",i.style.overflowWrap="anywhere"),e((t=>!t))}),[o,t]),s=(0,r.useCallback)((()=>{const{scrollWidth:t,clientWidth:e}=o.current,i=t>e||o.current.querySelector("code").hasAttribute("style");n(i)}),[o]);return kt(o,s),(0,r.useEffect)((()=>{s()}),[t,s]),(0,r.useEffect)((()=>(window.addEventListener("resize",s,{passive:!0}),()=>{window.removeEventListener("resize",s)})),[s]),{codeBlockRef:o,isEnabled:t,isCodeScrollable:i,toggle:a}}(),g=function(t){return t?.match(ut)?.groups.title??""}(n)||o,{lineClassNames:m,code:y}=yt(e,{metastring:n,language:d,magicComments:h}),x=s??function(t){return Boolean(t?.includes("showLineNumbers"))}(n);return(0,a.jsxs)(bt,{as:"div",className:(0,u.A)(i,d&&!i.includes(`language-${d}`)&&`language-${d}`),children:[g&&(0,a.jsx)("div",{className:Ct.codeBlockTitle,children:g}),(0,a.jsxs)("div",{className:Ct.codeBlockContent,children:[(0,a.jsx)(Tt.f4,{theme:f,code:y,language:d??"text",children:t=>{let{className:e,style:i,tokens:r,getLineProps:n,getTokenProps:o}=t;return(0,a.jsx)("pre",{tabIndex:0,ref:p.codeBlockRef,className:(0,u.A)(e,Ct.codeBlock,"thin-scrollbar"),style:i,children:(0,a.jsx)("code",{className:(0,u.A)(Ct.codeBlockLines,x&&Ct.codeBlockLinesWithNumbering),children:r.map(((t,e)=>(0,a.jsx)(wt,{line:t,getLineProps:n,getTokenProps:o,classNames:m[e],showLineNumbers:x},e)))})})}}),(0,a.jsxs)("div",{className:Ct.buttonGroup,children:[(p.isEnabled||p.isCodeScrollable)&&(0,a.jsx)(Nt,{className:Ct.codeButton,onClick:()=>p.toggle(),isEnabled:p.isEnabled}),(0,a.jsx)(Ft,{className:Ct.codeButton,code:y})]})]})]})}function Ot(t){let{children:e,...i}=t;const n=(0,at.A)(),o=function(t){return r.Children.toArray(t).some((t=>(0,r.isValidElement)(t)))?t:Array.isArray(t)?t.join(""):t}(e),s="string"==typeof o?jt:_t;return(0,a.jsx)(s,{...i,children:o},String(n))}function It(t){return(0,a.jsx)("code",{...t})}var Dt=i(3427);const qt={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function $t(t){return!!t&&("SUMMARY"===t.tagName||$t(t.parentElement))}function zt(t,e){return!!t&&(t===e||zt(t.parentElement,e))}function Pt(t){let{summary:e,children:i,...n}=t;(0,Dt.A)().collectAnchor(n.id);const o=(0,at.A)(),s=(0,r.useRef)(null),{collapsed:l,setCollapsed:c}=(0,O.u)({initialState:!n.open}),[h,d]=(0,r.useState)(n.open),f=r.isValidElement(e)?e:(0,a.jsx)("summary",{children:e??"Details"});return(0,a.jsxs)("details",{...n,ref:s,open:h,"data-collapsed":l,className:(0,u.A)(qt.details,o&&qt.isBrowser,n.className),onMouseDown:t=>{$t(t.target)&&t.detail>1&&t.preventDefault()},onClick:t=>{t.stopPropagation();const e=t.target;$t(e)&&zt(e,s.current)&&(t.preventDefault(),l?(c(!1),d(!0)):c(!0))},children:[f,(0,a.jsx)(O.N,{lazy:!1,collapsed:l,disableSSRStyle:!0,onCollapseTransitionEnd:t=>{c(t),d(!t)},children:(0,a.jsx)("div",{className:qt.collapsibleContent,children:i})})]})}const Rt={details:"details_b_Ee"},Ht="alert alert--info";function Wt(t){let{...e}=t;return(0,a.jsx)(Pt,{...e,className:(0,u.A)(Ht,Rt.details,e.className)})}function Ut(t){const e=r.Children.toArray(t.children),i=e.find((t=>r.isValidElement(t)&&"summary"===t.type)),n=(0,a.jsx)(a.Fragment,{children:e.filter((t=>t!==i))});return(0,a.jsx)(Wt,{...t,summary:i,children:n})}function Yt(t){return(0,a.jsx)(rt.A,{...t})}const Vt={containsTaskList:"containsTaskList_mC6p"};function Gt(t){if(void 0!==t)return(0,u.A)(t,t?.includes("contains-task-list")&&Vt.containsTaskList)}const Xt={img:"img_ev3q"};function Zt(t){const{mdxAdmonitionTitle:e,rest:i}=function(t){const e=r.Children.toArray(t),i=e.find((t=>r.isValidElement(t)&&"mdxAdmonitionTitle"===t.type)),n=e.filter((t=>t!==i)),o=i?.props.children;return{mdxAdmonitionTitle:o,rest:n.length>0?(0,a.jsx)(a.Fragment,{children:n}):null}}(t.children),n=t.title??e;return{...t,...n&&{title:n},children:i}}const Jt={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function Qt(t){let{type:e,className:i,children:r}=t;return(0,a.jsx)("div",{className:(0,u.A)(y.G.common.admonition,y.G.common.admonitionType(e),Jt.admonition,i),children:r})}function Kt(t){let{icon:e,title:i}=t;return(0,a.jsxs)("div",{className:Jt.admonitionHeading,children:[(0,a.jsx)("span",{className:Jt.admonitionIcon,children:e}),i]})}function te(t){let{children:e}=t;return e?(0,a.jsx)("div",{className:Jt.admonitionContent,children:e}):null}function ee(t){const{type:e,icon:i,title:r,children:n,className:o}=t;return(0,a.jsxs)(Qt,{type:e,className:o,children:[r||i?(0,a.jsx)(Kt,{title:r,icon:i}):null,(0,a.jsx)(te,{children:n})]})}function ie(t){return(0,a.jsx)("svg",{viewBox:"0 0 14 16",...t,children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const re={icon:(0,a.jsx)(ie,{}),title:(0,a.jsx)(x.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function ne(t){return(0,a.jsx)(ee,{...re,...t,className:(0,u.A)("alert alert--secondary",t.className),children:t.children})}function oe(t){return(0,a.jsx)("svg",{viewBox:"0 0 12 16",...t,children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const ae={icon:(0,a.jsx)(oe,{}),title:(0,a.jsx)(x.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function se(t){return(0,a.jsx)(ee,{...ae,...t,className:(0,u.A)("alert alert--success",t.className),children:t.children})}function le(t){return(0,a.jsx)("svg",{viewBox:"0 0 14 16",...t,children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const ce={icon:(0,a.jsx)(le,{}),title:(0,a.jsx)(x.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function he(t){return(0,a.jsx)(ee,{...ce,...t,className:(0,u.A)("alert alert--info",t.className),children:t.children})}function ue(t){return(0,a.jsx)("svg",{viewBox:"0 0 16 16",...t,children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const de={icon:(0,a.jsx)(ue,{}),title:(0,a.jsx)(x.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function fe(t){return(0,a.jsx)("svg",{viewBox:"0 0 12 16",...t,children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const pe={icon:(0,a.jsx)(fe,{}),title:(0,a.jsx)(x.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const ge={icon:(0,a.jsx)(ue,{}),title:(0,a.jsx)(x.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const me={...{note:ne,tip:se,info:he,warning:function(t){return(0,a.jsx)(ee,{...de,...t,className:(0,u.A)("alert alert--warning",t.className),children:t.children})},danger:function(t){return(0,a.jsx)(ee,{...pe,...t,className:(0,u.A)("alert alert--danger",t.className),children:t.children})}},...{secondary:t=>(0,a.jsx)(ne,{title:"secondary",...t}),important:t=>(0,a.jsx)(he,{title:"important",...t}),success:t=>(0,a.jsx)(se,{title:"success",...t}),caution:function(t){return(0,a.jsx)(ee,{...ge,...t,className:(0,u.A)("alert alert--warning",t.className),children:t.children})}}};function ye(t){const e=Zt(t),i=(r=e.type,me[r]||(console.warn(`No admonition component found for admonition type "${r}". Using Info as fallback.`),me.info));var r;return(0,a.jsx)(i,{...e})}var xe=i(7489),be=i(2181),Ce=i(6257);const _e="docusaurus-mermaid-container";function ve(){const{colorMode:t}=(0,st.G)(),e=(0,I.p)().mermaid,i=e.theme[t],{options:n}=e;return(0,r.useMemo)((()=>({startOnLoad:!1,...n,theme:i})),[i,n])}function ke(t){let{text:e,config:i}=t;const[n,o]=(0,r.useState)(null),a=(0,r.useRef)(`mermaid-svg-${Math.round(1e7*Math.random())}`).current,s=ve(),l=i??s;return(0,r.useEffect)((()=>{(async function(t){let{id:e,text:i,config:r}=t;Ce.N.mermaidAPI.initialize(r);try{return await Ce.N.render(e,i)}catch(n){throw document.querySelector(`#d${e}`)?.remove(),n}})({id:a,text:e,config:l}).then(o).catch((t=>{o((()=>{throw t}))}))}),[a,e,l]),n}const Te={container:"container_lyt7"};function Ae(t){let{renderResult:e}=t;const i=(0,r.useRef)(null);return(0,r.useEffect)((()=>{const t=i.current;e.bindFunctions?.(t)}),[e]),(0,a.jsx)("div",{ref:i,className:`${_e} ${Te.container}`,dangerouslySetInnerHTML:{__html:e.svg}})}function we(t){let{value:e}=t;const i=ke({text:e});return null===i?null:(0,a.jsx)(Ae,{renderResult:i})}const Se={Head:ot.A,details:Ut,Details:Ut,code:function(t){return function(t){return void 0!==t.children&&r.Children.toArray(t.children).every((t=>"string"==typeof t&&!t.includes("\n")))}(t)?(0,a.jsx)(It,{...t}):(0,a.jsx)(Ot,{...t})},a:function(t){return(0,a.jsx)(b.A,{...t})},pre:function(t){return(0,a.jsx)(a.Fragment,{children:t.children})},ul:function(t){return(0,a.jsx)("ul",{...t,className:Gt(t.className)})},li:function(t){return(0,Dt.A)().collectAnchor(t.id),(0,a.jsx)("li",{...t})},img:function(t){return(0,a.jsx)("img",{decoding:"async",loading:"lazy",...t,className:(e=t.className,(0,u.A)(e,Xt.img))});var e},h1:t=>(0,a.jsx)(Yt,{as:"h1",...t}),h2:t=>(0,a.jsx)(Yt,{as:"h2",...t}),h3:t=>(0,a.jsx)(Yt,{as:"h3",...t}),h4:t=>(0,a.jsx)(Yt,{as:"h4",...t}),h5:t=>(0,a.jsx)(Yt,{as:"h5",...t}),h6:t=>(0,a.jsx)(Yt,{as:"h6",...t}),admonition:ye,mermaid:function(t){return(0,a.jsx)(xe.A,{fallback:t=>(0,a.jsx)(be.MN,{...t}),children:(0,a.jsx)(we,{...t})})}};function Be(t){let{children:e}=t;return(0,a.jsx)(nt.x,{components:Se,children:e})}function Le(t){let{children:e}=t;const i=function(){const{metadata:t,frontMatter:e,contentTitle:i}=c();return e.hide_title||void 0!==i?null:t.title}();return(0,a.jsxs)("div",{className:(0,u.A)(y.G.docs.docMarkdown,"markdown"),children:[i&&(0,a.jsx)("header",{children:(0,a.jsx)(rt.A,{as:"h1",children:i})}),(0,a.jsx)(Be,{children:e})]})}var Fe=i(1243);function Me(){return(0,a.jsx)(x.A,{id:"theme.contentVisibility.unlistedBanner.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Ee(){return(0,a.jsx)(x.A,{id:"theme.contentVisibility.unlistedBanner.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function Ne(){return(0,a.jsx)(ot.A,{children:(0,a.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function je(){return(0,a.jsx)(x.A,{id:"theme.contentVisibility.draftBanner.title",description:"The draft content banner title",children:"Draft page"})}function Oe(){return(0,a.jsx)(x.A,{id:"theme.contentVisibility.draftBanner.message",description:"The draft content banner message",children:"This page is a draft. It will only be visible in dev and be excluded from the production build."})}function Ie(t){let{className:e}=t;return(0,a.jsx)(ye,{type:"caution",title:(0,a.jsx)(je,{}),className:(0,u.A)(e,y.G.common.draftBanner),children:(0,a.jsx)(Oe,{})})}function De(t){let{className:e}=t;return(0,a.jsx)(ye,{type:"caution",title:(0,a.jsx)(Me,{}),className:(0,u.A)(e,y.G.common.unlistedBanner),children:(0,a.jsx)(Ee,{})})}function qe(t){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ne,{}),(0,a.jsx)(De,{...t})]})}function $e(t){let{metadata:e}=t;const{unlisted:i,frontMatter:r}=e;return(0,a.jsxs)(a.Fragment,{children:[(i||r.unlisted)&&(0,a.jsx)(qe,{}),r.draft&&(0,a.jsx)(Ie,{})]})}const ze={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Pe(t){let{children:e}=t;const i=function(){const{frontMatter:t,toc:e}=c(),i=(0,d.l)(),r=t.hide_table_of_contents,n=!r&&e.length>0;return{hidden:r,mobile:n?(0,a.jsx)(J,{}):void 0,desktop:!n||"desktop"!==i&&"ssr"!==i?void 0:(0,a.jsx)(it,{})}}(),{metadata:r}=c();return(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("div",{className:(0,u.A)("col",!i.hidden&&ze.docItemCol),children:[(0,a.jsx)($e,{metadata:r}),(0,a.jsx)(g.A,{}),(0,a.jsxs)("div",{className:ze.docItemContainer,children:[(0,a.jsxs)("article",{children:[(0,a.jsx)(Fe.A,{}),(0,a.jsx)(m.A,{}),i.mobile,(0,a.jsx)(Le,{children:e}),(0,a.jsx)(j,{})]}),(0,a.jsx)(p,{})]})]}),i.desktop&&(0,a.jsx)("div",{className:"col col--3",children:i.desktop})]})}function Re(t){const e=`docs-doc-id-${t.content.metadata.id}`,i=t.content;return(0,a.jsx)(l,{content:t.content,children:(0,a.jsxs)(n.e3,{className:e,children:[(0,a.jsx)(h,{}),(0,a.jsx)(Pe,{children:(0,a.jsx)(i,{})})]})})}},6929:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});i(6540);var r=i(1312),n=i(4164),o=i(8774),a=i(4848);function s(t){const{permalink:e,title:i,subLabel:r,isNext:s}=t;return(0,a.jsxs)(o.A,{className:(0,n.A)("pagination-nav__link",s?"pagination-nav__link--next":"pagination-nav__link--prev"),to:e,children:[r&&(0,a.jsx)("div",{className:"pagination-nav__sublabel",children:r}),(0,a.jsx)("div",{className:"pagination-nav__label",children:i})]})}function l(t){const{previous:e,next:i}=t;return(0,a.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,r.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[e&&(0,a.jsx)(s,{...e,subLabel:(0,a.jsx)(r.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),i&&(0,a.jsx)(s,{...i,subLabel:(0,a.jsx)(r.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},4267:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});i(6540);var r=i(4164),n=i(1312),o=i(7559),a=i(3025),s=i(4848);function l(t){let{className:e}=t;const i=(0,a.r)();return i.badge?(0,s.jsx)("span",{className:(0,r.A)(e,o.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,s.jsx)(n.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:i.label},children:"Version: {versionLabel}"})}):null}},1878:(t,e,i)=>{"use strict";i.d(e,{A:()=>m});i(6540);var r=i(4164),n=i(4586),o=i(8774),a=i(1312),s=i(4070),l=i(7559),c=i(3886),h=i(3025),u=i(4848);const d={unreleased:function(t){let{siteTitle:e,versionMetadata:i}=t;return(0,u.jsx)(a.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:e,versionLabel:(0,u.jsx)("b",{children:i.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(t){let{siteTitle:e,versionMetadata:i}=t;return(0,u.jsx)(a.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:e,versionLabel:(0,u.jsx)("b",{children:i.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function f(t){const e=d[t.versionMetadata.banner];return(0,u.jsx)(e,{...t})}function p(t){let{versionLabel:e,to:i,onClick:r}=t;return(0,u.jsx)(a.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:e,latestVersionLink:(0,u.jsx)("b",{children:(0,u.jsx)(o.A,{to:i,onClick:r,children:(0,u.jsx)(a.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function g(t){let{className:e,versionMetadata:i}=t;const{siteConfig:{title:o}}=(0,n.A)(),{pluginId:a}=(0,s.vT)({failfast:!0}),{savePreferredVersionName:h}=(0,c.g1)(a),{latestDocSuggestion:d,latestVersionSuggestion:g}=(0,s.HW)(a),m=d??(y=g).docs.find((t=>t.id===y.mainDocId));var y;return(0,u.jsxs)("div",{className:(0,r.A)(e,l.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,u.jsx)("div",{children:(0,u.jsx)(f,{siteTitle:o,versionMetadata:i})}),(0,u.jsx)("div",{className:"margin-top--md",children:(0,u.jsx)(p,{versionLabel:g.label,to:m.path,onClick:()=>h(g.name)})})]})}function m(t){let{className:e}=t;const i=(0,h.r)();return i.banner?(0,u.jsx)(g,{className:e,versionMetadata:i}):null}},4353:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,i=36e5,r="millisecond",n="second",o="minute",a="hour",s="day",l="week",c="month",h="quarter",u="year",d="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],i=t%100;return"["+t+(e[(i-20)%10]||e[i]||e[0])+"]"}},y=function(t,e,i){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(i)+t},x={s:y,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),r=Math.floor(i/60),n=i%60;return(e<=0?"+":"-")+y(r,2,"0")+":"+y(n,2,"0")},m:function t(e,i){if(e.date()<i.date())return-t(i,e);var r=12*(i.year()-e.year())+(i.month()-e.month()),n=e.clone().add(r,c),o=i-n<0,a=e.clone().add(r+(o?-1:1),c);return+(-(r+(i-n)/(o?n-a:a-n))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:u,w:l,d:s,D:d,h:a,m:o,s:n,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",C={};C[b]=m;var _="$isDayjsObject",v=function(t){return t instanceof w||!(!t||!t[_])},k=function t(e,i,r){var n;if(!e)return b;if("string"==typeof e){var o=e.toLowerCase();C[o]&&(n=o),i&&(C[o]=i,n=o);var a=e.split("-");if(!n&&a.length>1)return t(a[0])}else{var s=e.name;C[s]=e,n=s}return!r&&n&&(b=n),n||!r&&b},T=function(t,e){if(v(t))return t.clone();var i="object"==typeof e?e:{};return i.date=t,i.args=arguments,new w(i)},A=x;A.l=k,A.i=v,A.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var w=function(){function m(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[_]=!0}var y=m.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,i=t.utc;if(null===e)return new Date(NaN);if(A.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var n=r[2]-1||0,o=(r[7]||"0").substring(0,3);return i?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return A},y.isValid=function(){return!(this.$d.toString()===f)},y.isSame=function(t,e){var i=T(t);return this.startOf(e)<=i&&i<=this.endOf(e)},y.isAfter=function(t,e){return T(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<T(t)},y.$g=function(t,e,i){return A.u(t)?this[e]:this.set(i,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var i=this,r=!!A.u(e)||e,h=A.p(t),f=function(t,e){var n=A.w(i.$u?Date.UTC(i.$y,e,t):new Date(i.$y,e,t),i);return r?n:n.endOf(s)},p=function(t,e){return A.w(i.toDate()[t].apply(i.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),i)},g=this.$W,m=this.$M,y=this.$D,x="set"+(this.$u?"UTC":"");switch(h){case u:return r?f(1,0):f(31,11);case c:return r?f(1,m):f(0,m+1);case l:var b=this.$locale().weekStart||0,C=(g<b?g+7:g)-b;return f(r?y-C:y+(6-C),m);case s:case d:return p(x+"Hours",0);case a:return p(x+"Minutes",1);case o:return p(x+"Seconds",2);case n:return p(x+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var i,l=A.p(t),h="set"+(this.$u?"UTC":""),f=(i={},i[s]=h+"Date",i[d]=h+"Date",i[c]=h+"Month",i[u]=h+"FullYear",i[a]=h+"Hours",i[o]=h+"Minutes",i[n]=h+"Seconds",i[r]=h+"Milliseconds",i)[l],p=l===s?this.$D+(e-this.$W):e;if(l===c||l===u){var g=this.clone().set(d,1);g.$d[f](p),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[A.p(t)]()},y.add=function(r,h){var d,f=this;r=Number(r);var p=A.p(h),g=function(t){var e=T(f);return A.w(e.date(e.date()+Math.round(t*r)),f)};if(p===c)return this.set(c,this.$M+r);if(p===u)return this.set(u,this.$y+r);if(p===s)return g(1);if(p===l)return g(7);var m=(d={},d[o]=e,d[a]=i,d[n]=t,d)[p]||1,y=this.$d.getTime()+r*m;return A.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,i=this.$locale();if(!this.isValid())return i.invalidDate||f;var r=t||"YYYY-MM-DDTHH:mm:ssZ",n=A.z(this),o=this.$H,a=this.$m,s=this.$M,l=i.weekdays,c=i.months,h=i.meridiem,u=function(t,i,n,o){return t&&(t[i]||t(e,r))||n[i].slice(0,o)},d=function(t){return A.s(o%12||12,t,"0")},p=h||function(t,e,i){var r=t<12?"AM":"PM";return i?r.toLowerCase():r};return r.replace(g,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return A.s(e.$y,4,"0");case"M":return s+1;case"MM":return A.s(s+1,2,"0");case"MMM":return u(i.monthsShort,s,c,3);case"MMMM":return u(c,s);case"D":return e.$D;case"DD":return A.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return u(i.weekdaysMin,e.$W,l,2);case"ddd":return u(i.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(o);case"HH":return A.s(o,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(o,a,!0);case"A":return p(o,a,!1);case"m":return String(a);case"mm":return A.s(a,2,"0");case"s":return String(e.$s);case"ss":return A.s(e.$s,2,"0");case"SSS":return A.s(e.$ms,3,"0");case"Z":return n}return null}(t)||n.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,d,f){var p,g=this,m=A.p(d),y=T(r),x=(y.utcOffset()-this.utcOffset())*e,b=this-y,C=function(){return A.m(g,y)};switch(m){case u:p=C()/12;break;case c:p=C();break;case h:p=C()/3;break;case l:p=(b-x)/6048e5;break;case s:p=(b-x)/864e5;break;case a:p=b/i;break;case o:p=b/e;break;case n:p=b/t;break;default:p=b}return f?p:A.a(p)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return C[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var i=this.clone(),r=k(t,e,!0);return r&&(i.$L=r),i},y.clone=function(){return A.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},m}(),S=w.prototype;return T.prototype=S,[["$ms",r],["$s",n],["$m",o],["$H",a],["$W",s],["$M",c],["$y",u],["$D",d]].forEach((function(t){S[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),T.extend=function(t,e){return t.$i||(t(e,w,T),t.$i=!0),T},T.locale=k,T.isDayjs=v,T.unix=function(t){return T(1e3*t)},T.en=C[b],T.Ls=C,T.p={},T}()},2838:function(t){t.exports=function(){"use strict";const{entries:t,setPrototypeOf:e,isFrozen:i,getPrototypeOf:r,getOwnPropertyDescriptor:n}=Object;let{freeze:o,seal:a,create:s}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;o||(o=function(t){return t}),a||(a=function(t){return t}),l||(l=function(t,e,i){return t.apply(e,i)}),c||(c=function(t,e){return new t(...e)});const h=v(Array.prototype.forEach),u=v(Array.prototype.pop),d=v(Array.prototype.push),f=v(String.prototype.toLowerCase),p=v(String.prototype.toString),g=v(String.prototype.match),m=v(String.prototype.replace),y=v(String.prototype.indexOf),x=v(String.prototype.trim),b=v(Object.prototype.hasOwnProperty),C=v(RegExp.prototype.test),_=k(TypeError);function v(t){return function(e){for(var i=arguments.length,r=new Array(i>1?i-1:0),n=1;n<i;n++)r[n-1]=arguments[n];return l(t,e,r)}}function k(t){return function(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return c(t,i)}}function T(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;e&&e(t,null);let o=r.length;for(;o--;){let e=r[o];if("string"==typeof e){const t=n(e);t!==e&&(i(r)||(r[o]=t),e=t)}t[e]=!0}return t}function A(t){for(let e=0;e<t.length;e++)b(t,e)||(t[e]=null);return t}function w(e){const i=s(null);for(const[r,n]of t(e))b(e,r)&&(Array.isArray(n)?i[r]=A(n):n&&"object"==typeof n&&n.constructor===Object?i[r]=w(n):i[r]=n);return i}function S(t,e){for(;null!==t;){const i=n(t,e);if(i){if(i.get)return v(i.get);if("function"==typeof i.value)return v(i.value)}t=r(t)}function i(){return null}return i}const B=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),F=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),E=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),N=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),j=o(["#text"]),O=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),I=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),D=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),q=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),z=a(/<%[\w\W]*|[\w\W]*%>/gm),P=a(/\${[\w\W]*}/gm),R=a(/^data-[\-\w.\u00B7-\uFFFF]/),H=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),U=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=a(/^html$/i),G=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var X=Object.freeze({__proto__:null,MUSTACHE_EXPR:$,ERB_EXPR:z,TMPLIT_EXPR:P,DATA_ATTR:R,ARIA_ATTR:H,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:U,ATTR_WHITESPACE:Y,DOCTYPE_NAME:V,CUSTOM_ELEMENT:G});const Z=function(){return"undefined"==typeof window?null:window},J=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(i=e.getAttribute(r));const n="dompurify"+(i?"#"+i:"");try{return t.createPolicy(n,{createHTML:t=>t,createScriptURL:t=>t})}catch(o){return console.warn("TrustedTypes policy "+n+" could not be created."),null}};function Q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z();const i=t=>Q(t);if(i.version="3.0.11",i.removed=[],!e||!e.document||9!==e.document.nodeType)return i.isSupported=!1,i;let{document:r}=e;const n=r,a=n.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:v,Element:k,NodeFilter:A,NamedNodeMap:$=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:z,DOMParser:P,trustedTypes:R}=e,H=k.prototype,U=S(H,"cloneNode"),Y=S(H,"nextSibling"),G=S(H,"childNodes"),K=S(H,"parentNode");if("function"==typeof c){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let tt,et="";const{implementation:it,createNodeIterator:rt,createDocumentFragment:nt,getElementsByTagName:ot}=r,{importNode:at}=n;let st={};i.isSupported="function"==typeof t&&"function"==typeof K&&it&&void 0!==it.createHTMLDocument;const{MUSTACHE_EXPR:lt,ERB_EXPR:ct,TMPLIT_EXPR:ht,DATA_ATTR:ut,ARIA_ATTR:dt,IS_SCRIPT_OR_DATA:ft,ATTR_WHITESPACE:pt,CUSTOM_ELEMENT:gt}=X;let{IS_ALLOWED_URI:mt}=X,yt=null;const xt=T({},[...B,...L,...F,...E,...j]);let bt=null;const Ct=T({},[...O,...I,...D,...q]);let _t=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),vt=null,kt=null,Tt=!0,At=!0,wt=!1,St=!0,Bt=!1,Lt=!1,Ft=!1,Mt=!1,Et=!1,Nt=!1,jt=!1,Ot=!0,It=!1;const Dt="user-content-";let qt=!0,$t=!1,zt={},Pt=null;const Rt=T({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ht=null;const Wt=T({},["audio","video","img","source","image","track"]);let Ut=null;const Yt=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vt="http://www.w3.org/1998/Math/MathML",Gt="http://www.w3.org/2000/svg",Xt="http://www.w3.org/1999/xhtml";let Zt=Xt,Jt=!1,Qt=null;const Kt=T({},[Vt,Gt,Xt],p);let te=null;const ee=["application/xhtml+xml","text/html"],ie="text/html";let re=null,ne=null;const oe=r.createElement("form"),ae=function(t){return t instanceof RegExp||t instanceof Function},se=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ne||ne!==t){if(t&&"object"==typeof t||(t={}),t=w(t),te=-1===ee.indexOf(t.PARSER_MEDIA_TYPE)?ie:t.PARSER_MEDIA_TYPE,re="application/xhtml+xml"===te?p:f,yt=b(t,"ALLOWED_TAGS")?T({},t.ALLOWED_TAGS,re):xt,bt=b(t,"ALLOWED_ATTR")?T({},t.ALLOWED_ATTR,re):Ct,Qt=b(t,"ALLOWED_NAMESPACES")?T({},t.ALLOWED_NAMESPACES,p):Kt,Ut=b(t,"ADD_URI_SAFE_ATTR")?T(w(Yt),t.ADD_URI_SAFE_ATTR,re):Yt,Ht=b(t,"ADD_DATA_URI_TAGS")?T(w(Wt),t.ADD_DATA_URI_TAGS,re):Wt,Pt=b(t,"FORBID_CONTENTS")?T({},t.FORBID_CONTENTS,re):Rt,vt=b(t,"FORBID_TAGS")?T({},t.FORBID_TAGS,re):{},kt=b(t,"FORBID_ATTR")?T({},t.FORBID_ATTR,re):{},zt=!!b(t,"USE_PROFILES")&&t.USE_PROFILES,Tt=!1!==t.ALLOW_ARIA_ATTR,At=!1!==t.ALLOW_DATA_ATTR,wt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,St=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Bt=t.SAFE_FOR_TEMPLATES||!1,Lt=t.WHOLE_DOCUMENT||!1,Et=t.RETURN_DOM||!1,Nt=t.RETURN_DOM_FRAGMENT||!1,jt=t.RETURN_TRUSTED_TYPE||!1,Mt=t.FORCE_BODY||!1,Ot=!1!==t.SANITIZE_DOM,It=t.SANITIZE_NAMED_PROPS||!1,qt=!1!==t.KEEP_CONTENT,$t=t.IN_PLACE||!1,mt=t.ALLOWED_URI_REGEXP||W,Zt=t.NAMESPACE||Xt,_t=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ae(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_t.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ae(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_t.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_t.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Bt&&(At=!1),Nt&&(Et=!0),zt&&(yt=T({},j),bt=[],!0===zt.html&&(T(yt,B),T(bt,O)),!0===zt.svg&&(T(yt,L),T(bt,I),T(bt,q)),!0===zt.svgFilters&&(T(yt,F),T(bt,I),T(bt,q)),!0===zt.mathMl&&(T(yt,E),T(bt,D),T(bt,q))),t.ADD_TAGS&&(yt===xt&&(yt=w(yt)),T(yt,t.ADD_TAGS,re)),t.ADD_ATTR&&(bt===Ct&&(bt=w(bt)),T(bt,t.ADD_ATTR,re)),t.ADD_URI_SAFE_ATTR&&T(Ut,t.ADD_URI_SAFE_ATTR,re),t.FORBID_CONTENTS&&(Pt===Rt&&(Pt=w(Pt)),T(Pt,t.FORBID_CONTENTS,re)),qt&&(yt["#text"]=!0),Lt&&T(yt,["html","head","body"]),yt.table&&(T(yt,["tbody"]),delete vt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');tt=t.TRUSTED_TYPES_POLICY,et=tt.createHTML("")}else void 0===tt&&(tt=J(R,a)),null!==tt&&"string"==typeof et&&(et=tt.createHTML(""));o&&o(t),ne=t}},le=T({},["mi","mo","mn","ms","mtext"]),ce=T({},["foreignobject","desc","title","annotation-xml"]),he=T({},["title","style","font","a","script"]),ue=T({},[...L,...F,...M]),de=T({},[...E,...N]),fe=function(t){let e=K(t);e&&e.tagName||(e={namespaceURI:Zt,tagName:"template"});const i=f(t.tagName),r=f(e.tagName);return!!Qt[t.namespaceURI]&&(t.namespaceURI===Gt?e.namespaceURI===Xt?"svg"===i:e.namespaceURI===Vt?"svg"===i&&("annotation-xml"===r||le[r]):Boolean(ue[i]):t.namespaceURI===Vt?e.namespaceURI===Xt?"math"===i:e.namespaceURI===Gt?"math"===i&&ce[r]:Boolean(de[i]):t.namespaceURI===Xt?!(e.namespaceURI===Gt&&!ce[r])&&!(e.namespaceURI===Vt&&!le[r])&&!de[i]&&(he[i]||!ue[i]):!("application/xhtml+xml"!==te||!Qt[t.namespaceURI]))},pe=function(t){d(i.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}},ge=function(t,e){try{d(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(r){d(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!bt[t])if(Et||Nt)try{pe(e)}catch(r){}else try{e.setAttribute(t,"")}catch(r){}},me=function(t){let e=null,i=null;if(Mt)t="<remove></remove>"+t;else{const e=g(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===te&&Zt===Xt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const n=tt?tt.createHTML(t):t;if(Zt===Xt)try{e=(new P).parseFromString(n,te)}catch(a){}if(!e||!e.documentElement){e=it.createDocument(Zt,"template",null);try{e.documentElement.innerHTML=Jt?et:n}catch(a){}}const o=e.body||e.documentElement;return t&&i&&o.insertBefore(r.createTextNode(i),o.childNodes[0]||null),Zt===Xt?ot.call(e,Lt?"html":"body")[0]:Lt?e.documentElement:o},ye=function(t){return rt.call(t.ownerDocument||t,t,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT|A.SHOW_PROCESSING_INSTRUCTION|A.SHOW_CDATA_SECTION,null)},xe=function(t){return t instanceof z&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof $)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},be=function(t){return"function"==typeof v&&t instanceof v},Ce=function(t,e,r){st[t]&&h(st[t],(t=>{t.call(i,e,r,ne)}))},_e=function(t){let e=null;if(Ce("beforeSanitizeElements",t,null),xe(t))return pe(t),!0;const r=re(t.nodeName);if(Ce("uponSanitizeElement",t,{tagName:r,allowedTags:yt}),t.hasChildNodes()&&!be(t.firstElementChild)&&C(/<[/\w]/g,t.innerHTML)&&C(/<[/\w]/g,t.textContent))return pe(t),!0;if(7===t.nodeType)return pe(t),!0;if(!yt[r]||vt[r]){if(!vt[r]&&ke(r)){if(_t.tagNameCheck instanceof RegExp&&C(_t.tagNameCheck,r))return!1;if(_t.tagNameCheck instanceof Function&&_t.tagNameCheck(r))return!1}if(qt&&!Pt[r]){const e=K(t)||t.parentNode,i=G(t)||t.childNodes;if(i&&e)for(let r=i.length-1;r>=0;--r)e.insertBefore(U(i[r],!0),Y(t))}return pe(t),!0}return t instanceof k&&!fe(t)?(pe(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!C(/<\/no(script|embed|frames)/i,t.innerHTML)?(Bt&&3===t.nodeType&&(e=t.textContent,h([lt,ct,ht],(t=>{e=m(e,t," ")})),t.textContent!==e&&(d(i.removed,{element:t.cloneNode()}),t.textContent=e)),Ce("afterSanitizeElements",t,null),!1):(pe(t),!0)},ve=function(t,e,i){if(Ot&&("id"===e||"name"===e)&&(i in r||i in oe))return!1;if(At&&!kt[e]&&C(ut,e));else if(Tt&&C(dt,e));else if(!bt[e]||kt[e]){if(!(ke(t)&&(_t.tagNameCheck instanceof RegExp&&C(_t.tagNameCheck,t)||_t.tagNameCheck instanceof Function&&_t.tagNameCheck(t))&&(_t.attributeNameCheck instanceof RegExp&&C(_t.attributeNameCheck,e)||_t.attributeNameCheck instanceof Function&&_t.attributeNameCheck(e))||"is"===e&&_t.allowCustomizedBuiltInElements&&(_t.tagNameCheck instanceof RegExp&&C(_t.tagNameCheck,i)||_t.tagNameCheck instanceof Function&&_t.tagNameCheck(i))))return!1}else if(Ut[e]);else if(C(mt,m(i,pt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==y(i,"data:")||!Ht[t])if(wt&&!C(ft,m(i,pt,"")));else if(i)return!1;return!0},ke=function(t){return"annotation-xml"!==t&&g(t,gt)},Te=function(t){Ce("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:bt};let n=e.length;for(;n--;){const a=e[n],{name:s,namespaceURI:l,value:c}=a,d=re(s);let f="value"===s?c:x(c);if(r.attrName=d,r.attrValue=f,r.keepAttr=!0,r.forceKeepAttr=void 0,Ce("uponSanitizeAttribute",t,r),f=r.attrValue,r.forceKeepAttr)continue;if(ge(s,t),!r.keepAttr)continue;if(!St&&C(/\/>/i,f)){ge(s,t);continue}Bt&&h([lt,ct,ht],(t=>{f=m(f,t," ")}));const p=re(t.nodeName);if(ve(p,d,f)){if(!It||"id"!==d&&"name"!==d||(ge(s,t),f=Dt+f),tt&&"object"==typeof R&&"function"==typeof R.getAttributeType)if(l);else switch(R.getAttributeType(p,d)){case"TrustedHTML":f=tt.createHTML(f);break;case"TrustedScriptURL":f=tt.createScriptURL(f)}try{l?t.setAttributeNS(l,s,f):t.setAttribute(s,f),u(i.removed)}catch(o){}}}Ce("afterSanitizeAttributes",t,null)},Ae=function t(e){let i=null;const r=ye(e);for(Ce("beforeSanitizeShadowDOM",e,null);i=r.nextNode();)Ce("uponSanitizeShadowNode",i,null),_e(i)||(i.content instanceof l&&t(i.content),Te(i));Ce("afterSanitizeShadowDOM",e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,a=null,s=null;if(Jt=!t,Jt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!be(t)){if("function"!=typeof t.toString)throw _("toString is not a function");if("string"!=typeof(t=t.toString()))throw _("dirty is not a string, aborting")}if(!i.isSupported)return t;if(Ft||se(e),i.removed=[],"string"==typeof t&&($t=!1),$t){if(t.nodeName){const e=re(t.nodeName);if(!yt[e]||vt[e])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof v)r=me("\x3c!----\x3e"),o=r.ownerDocument.importNode(t,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!Et&&!Bt&&!Lt&&-1===t.indexOf("<"))return tt&&jt?tt.createHTML(t):t;if(r=me(t),!r)return Et?null:jt?et:""}r&&Mt&&pe(r.firstChild);const c=ye($t?t:r);for(;a=c.nextNode();)_e(a)||(a.content instanceof l&&Ae(a.content),Te(a));if($t)return t;if(Et){if(Nt)for(s=nt.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(bt.shadowroot||bt.shadowrootmode)&&(s=at.call(n,s,!0)),s}let u=Lt?r.outerHTML:r.innerHTML;return Lt&&yt["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&C(V,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),Bt&&h([lt,ct,ht],(t=>{u=m(u,t," ")})),tt&&jt?tt.createHTML(u):u},i.setConfig=function(){se(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ft=!0},i.clearConfig=function(){ne=null,Ft=!1},i.isValidAttribute=function(t,e,i){ne||se({});const r=re(t),n=re(e);return ve(r,n,i)},i.addHook=function(t,e){"function"==typeof e&&(st[t]=st[t]||[],d(st[t],e))},i.removeHook=function(t){if(st[t])return u(st[t])},i.removeHooks=function(t){st[t]&&(st[t]=[])},i.removeAllHooks=function(){st={}},i}return Q()}()},8426:(t,e)=>{function i(t){let e,i=[];for(let r of t.split(",").map((t=>t.trim())))if(/^-?\d+$/.test(r))i.push(parseInt(r,10));else if(e=r.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[t,r,n,o]=e;if(r&&o){r=parseInt(r),o=parseInt(o);const t=r<o?1:-1;"-"!==n&&".."!==n&&"\u2025"!==n||(o+=t);for(let e=r;e!==o;e+=t)i.push(e)}}return i}e.default=i,t.exports=i},513:(t,e,i)=>{"use strict";function r(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var r=Array.from("string"==typeof t?[t]:t);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var n=r.reduce((function(t,e){var i=e.match(/\n([\t ]+|(?!\s).)/g);return i?t.concat(i.map((function(t){var e,i;return null!==(i=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==i?i:0}))):t}),[]);if(n.length){var o=new RegExp("\n[\t ]{"+Math.min.apply(Math,n)+"}","g");r=r.map((function(t){return t.replace(o,"\n")}))}r[0]=r[0].replace(/^\r?\n/,"");var a=r[0];return e.forEach((function(t,e){var i=a.match(/(?:^|\n)( *)$/),n=i?i[1]:"",o=t;"string"==typeof t&&t.includes("\n")&&(o=String(t).split("\n").map((function(t,e){return 0===e?t:""+n+t})).join("\n")),a+=o+r[e+1]})),a}i.d(e,{T:()=>r})},6312:(t,e,i)=>{"use strict";function r(t,e){let i;if(void 0===e)for(const r of t)null!=r&&(i<r||void 0===i&&r>=r)&&(i=r);else{let r=-1;for(let n of t)null!=(n=e(n,++r,t))&&(i<n||void 0===i&&n>=n)&&(i=n)}return i}function n(t,e){let i;if(void 0===e)for(const r of t)null!=r&&(i>r||void 0===i&&r>=r)&&(i=r);else{let r=-1;for(let n of t)null!=(n=e(n,++r,t))&&(i>n||void 0===i&&n>=n)&&(i=n)}return i}function o(t){return t}i.d(e,{JLW:()=>cs,l78:()=>x,tlR:()=>y,qrM:()=>vs,Yu4:()=>Ts,IA3:()=>ws,Wi0:()=>Bs,PGM:()=>Ls,OEq:()=>Ms,y8u:()=>js,olC:()=>Is,IrU:()=>qs,oDi:()=>Ps,Q7f:()=>Hs,cVp:()=>Us,lUB:()=>ds,Lx9:()=>Vs,nVG:()=>el,uxU:()=>il,Xf2:()=>ol,GZz:()=>sl,UPb:()=>cl,dyv:()=>ll,bEH:()=>pr,n8j:()=>gs,T9B:()=>r,jkA:()=>n,rLf:()=>xs,WH:()=>kr,m4Y:()=>mn,UMr:()=>vr,w7C:()=>Na,zt:()=>ja,Ltv:()=>Oa,Ubm:()=>Ia,JWy:()=>Vi,UAC:()=>Nn,DCK:()=>uo,TUC:()=>Rn,Agd:()=>Mn,t6C:()=>Sn,wXd:()=>Ln,ABi:()=>qn,Ui6:()=>Qn,rGn:()=>Hn,ucG:()=>Bn,YPH:()=>Dn,Mol:()=>Pn,PGu:()=>$n,GuW:()=>zn});var a=1,s=2,l=3,c=4,h=1e-6;function u(t){return"translate("+t+",0)"}function d(t){return"translate(0,"+t+")"}function f(t){return e=>+t(e)}function p(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),i=>+t(i)+e}function g(){return!this.__axis}function m(t,e){var i=[],r=null,n=null,m=6,y=6,x=3,b="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,C=t===a||t===c?-1:1,_=t===c||t===s?"x":"y",v=t===a||t===l?u:d;function k(u){var d=null==r?e.ticks?e.ticks.apply(e,i):e.domain():r,k=null==n?e.tickFormat?e.tickFormat.apply(e,i):o:n,T=Math.max(m,0)+x,A=e.range(),w=+A[0]+b,S=+A[A.length-1]+b,B=(e.bandwidth?p:f)(e.copy(),b),L=u.selection?u.selection():u,F=L.selectAll(".domain").data([null]),M=L.selectAll(".tick").data(d,e).order(),E=M.exit(),N=M.enter().append("g").attr("class","tick"),j=M.select("line"),O=M.select("text");F=F.merge(F.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(N),j=j.merge(N.append("line").attr("stroke","currentColor").attr(_+"2",C*m)),O=O.merge(N.append("text").attr("fill","currentColor").attr(_,C*T).attr("dy",t===a?"0em":t===l?"0.71em":"0.32em")),u!==L&&(F=F.transition(u),M=M.transition(u),j=j.transition(u),O=O.transition(u),E=E.transition(u).attr("opacity",h).attr("transform",(function(t){return isFinite(t=B(t))?v(t+b):this.getAttribute("transform")})),N.attr("opacity",h).attr("transform",(function(t){var e=this.parentNode.__axis;return v((e&&isFinite(e=e(t))?e:B(t))+b)}))),E.remove(),F.attr("d",t===c||t===s?y?"M"+C*y+","+w+"H"+b+"V"+S+"H"+C*y:"M"+b+","+w+"V"+S:y?"M"+w+","+C*y+"V"+b+"H"+S+"V"+C*y:"M"+w+","+b+"H"+S),M.attr("opacity",1).attr("transform",(function(t){return v(B(t)+b)})),j.attr(_+"2",C*m),O.attr(_,C*T).text(k),L.filter(g).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===s?"start":t===c?"end":"middle"),L.each((function(){this.__axis=B}))}return k.scale=function(t){return arguments.length?(e=t,k):e},k.ticks=function(){return i=Array.from(arguments),k},k.tickArguments=function(t){return arguments.length?(i=null==t?[]:Array.from(t),k):i.slice()},k.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),k):r&&r.slice()},k.tickFormat=function(t){return arguments.length?(n=t,k):n},k.tickSize=function(t){return arguments.length?(m=y=+t,k):m},k.tickSizeInner=function(t){return arguments.length?(m=+t,k):m},k.tickSizeOuter=function(t){return arguments.length?(y=+t,k):y},k.tickPadding=function(t){return arguments.length?(x=+t,k):x},k.offset=function(t){return arguments.length?(b=+t,k):b},k}function y(t){return m(a,t)}function x(t){return m(l,t)}function b(){}function C(t){return null==t?b:function(){return this.querySelector(t)}}function _(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function v(){return[]}function k(t){return null==t?v:function(){return this.querySelectorAll(t)}}function T(t){return function(){return this.matches(t)}}function A(t){return function(e){return e.matches(t)}}var w=Array.prototype.find;function S(){return this.firstElementChild}var B=Array.prototype.filter;function L(){return Array.from(this.children)}function F(t){return new Array(t.length)}function M(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function E(t,e,i,r,n,o){for(var a,s=0,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):i[s]=new M(t,o[s]);for(;s<l;++s)(a=e[s])&&(n[s]=a)}function N(t,e,i,r,n,o,a){var s,l,c,h=new Map,u=e.length,d=o.length,f=new Array(u);for(s=0;s<u;++s)(l=e[s])&&(f[s]=c=a.call(l,l.__data__,s,e)+"",h.has(c)?n[s]=l:h.set(c,l));for(s=0;s<d;++s)c=a.call(t,o[s],s,o)+"",(l=h.get(c))?(r[s]=l,l.__data__=o[s],h.delete(c)):i[s]=new M(t,o[s]);for(s=0;s<u;++s)(l=e[s])&&h.get(f[s])===l&&(n[s]=l)}function j(t){return t.__data__}function O(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function I(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}M.prototype={constructor:M,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var D="http://www.w3.org/1999/xhtml";const q={svg:"http://www.w3.org/2000/svg",xhtml:D,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $(t){var e=t+="",i=e.indexOf(":");return i>=0&&"xmlns"!==(e=t.slice(0,i))&&(t=t.slice(i+1)),q.hasOwnProperty(e)?{space:q[e],local:t}:t}function z(t){return function(){this.removeAttribute(t)}}function P(t){return function(){this.removeAttributeNS(t.space,t.local)}}function R(t,e){return function(){this.setAttribute(t,e)}}function H(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function W(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function U(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function Y(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function V(t){return function(){this.style.removeProperty(t)}}function G(t,e,i){return function(){this.style.setProperty(t,e,i)}}function X(t,e,i){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,i)}}function Z(t,e){return t.style.getPropertyValue(e)||Y(t).getComputedStyle(t,null).getPropertyValue(e)}function J(t){return function(){delete this[t]}}function Q(t,e){return function(){this[t]=e}}function K(t,e){return function(){var i=e.apply(this,arguments);null==i?delete this[t]:this[t]=i}}function tt(t){return t.trim().split(/^|\s+/)}function et(t){return t.classList||new it(t)}function it(t){this._node=t,this._names=tt(t.getAttribute("class")||"")}function rt(t,e){for(var i=et(t),r=-1,n=e.length;++r<n;)i.add(e[r])}function nt(t,e){for(var i=et(t),r=-1,n=e.length;++r<n;)i.remove(e[r])}function ot(t){return function(){rt(this,t)}}function at(t){return function(){nt(this,t)}}function st(t,e){return function(){(e.apply(this,arguments)?rt:nt)(this,t)}}function lt(){this.textContent=""}function ct(t){return function(){this.textContent=t}}function ht(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ut(){this.innerHTML=""}function dt(t){return function(){this.innerHTML=t}}function ft(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function pt(){this.nextSibling&&this.parentNode.appendChild(this)}function gt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mt(t){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===D&&e.documentElement.namespaceURI===D?e.createElement(t):e.createElementNS(i,t)}}function yt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function xt(t){var e=$(t);return(e.local?yt:mt)(e)}function bt(){return null}function Ct(){var t=this.parentNode;t&&t.removeChild(this)}function _t(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function vt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function kt(t){return function(){var e=this.__on;if(e){for(var i,r=0,n=-1,o=e.length;r<o;++r)i=e[r],t.type&&i.type!==t.type||i.name!==t.name?e[++n]=i:this.removeEventListener(i.type,i.listener,i.options);++n?e.length=n:delete this.__on}}}function Tt(t,e,i){return function(){var r,n=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(n)for(var a=0,s=n.length;a<s;++a)if((r=n[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=i),void(r.value=e);this.addEventListener(t.type,o,i),r={type:t.type,name:t.name,value:e,listener:o,options:i},n?n.push(r):this.__on=[r]}}function At(t,e,i){var r=Y(t),n=r.CustomEvent;"function"==typeof n?n=new n(e,i):(n=r.document.createEvent("Event"),i?(n.initEvent(e,i.bubbles,i.cancelable),n.detail=i.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function wt(t,e){return function(){return At(this,t,e)}}function St(t,e){return function(){return At(this,t,e.apply(this,arguments))}}it.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Bt=[null];function Lt(t,e){this._groups=t,this._parents=e}function Ft(){return new Lt([[document.documentElement]],Bt)}Lt.prototype=Ft.prototype={constructor:Lt,select:function(t){"function"!=typeof t&&(t=C(t));for(var e=this._groups,i=e.length,r=new Array(i),n=0;n<i;++n)for(var o,a,s=e[n],l=s.length,c=r[n]=new Array(l),h=0;h<l;++h)(o=s[h])&&(a=t.call(o,o.__data__,h,s))&&("__data__"in o&&(a.__data__=o.__data__),c[h]=a);return new Lt(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return _(t.apply(this,arguments))}}(t):k(t);for(var e=this._groups,i=e.length,r=[],n=[],o=0;o<i;++o)for(var a,s=e[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),n.push(a));return new Lt(r,n)},selectChild:function(t){return this.select(null==t?S:function(t){return function(){return w.call(this.children,t)}}("function"==typeof t?t:A(t)))},selectChildren:function(t){return this.selectAll(null==t?L:function(t){return function(){return B.call(this.children,t)}}("function"==typeof t?t:A(t)))},filter:function(t){"function"!=typeof t&&(t=T(t));for(var e=this._groups,i=e.length,r=new Array(i),n=0;n<i;++n)for(var o,a=e[n],s=a.length,l=r[n]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&l.push(o);return new Lt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,j);var i,r=e?N:E,n=this._parents,o=this._groups;"function"!=typeof t&&(i=t,t=function(){return i});for(var a=o.length,s=new Array(a),l=new Array(a),c=new Array(a),h=0;h<a;++h){var u=n[h],d=o[h],f=d.length,p=O(t.call(u,u&&u.__data__,h,n)),g=p.length,m=l[h]=new Array(g),y=s[h]=new Array(g);r(u,d,m,y,c[h]=new Array(f),p,e);for(var x,b,C=0,_=0;C<g;++C)if(x=m[C]){for(C>=_&&(_=C+1);!(b=y[_])&&++_<g;);x._next=b||null}}return(s=new Lt(s,n))._enter=l,s._exit=c,s},enter:function(){return new Lt(this._enter||this._groups.map(F),this._parents)},exit:function(){return new Lt(this._exit||this._groups.map(F),this._parents)},join:function(t,e,i){var r=this.enter(),n=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(n=e(n))&&(n=n.selection()),null==i?o.remove():i(o),r&&n?r.merge(n).order():n},merge:function(t){for(var e=t.selection?t.selection():t,i=this._groups,r=e._groups,n=i.length,o=r.length,a=Math.min(n,o),s=new Array(n),l=0;l<a;++l)for(var c,h=i[l],u=r[l],d=h.length,f=s[l]=new Array(d),p=0;p<d;++p)(c=h[p]||u[p])&&(f[p]=c);for(;l<n;++l)s[l]=i[l];return new Lt(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,i=t.length;++e<i;)for(var r,n=t[e],o=n.length-1,a=n[o];--o>=0;)(r=n[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,i){return e&&i?t(e.__data__,i.__data__):!e-!i}t||(t=I);for(var i=this._groups,r=i.length,n=new Array(r),o=0;o<r;++o){for(var a,s=i[o],l=s.length,c=n[o]=new Array(l),h=0;h<l;++h)(a=s[h])&&(c[h]=a);c.sort(e)}return new Lt(n,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var r=t[e],n=0,o=r.length;n<o;++n){var a=r[n];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,i=0,r=e.length;i<r;++i)for(var n,o=e[i],a=0,s=o.length;a<s;++a)(n=o[a])&&t.call(n,n.__data__,a,o);return this},attr:function(t,e){var i=$(t);if(arguments.length<2){var r=this.node();return i.local?r.getAttributeNS(i.space,i.local):r.getAttribute(i)}return this.each((null==e?i.local?P:z:"function"==typeof e?i.local?U:W:i.local?H:R)(i,e))},style:function(t,e,i){return arguments.length>1?this.each((null==e?V:"function"==typeof e?X:G)(t,e,null==i?"":i)):Z(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?J:"function"==typeof e?K:Q)(t,e)):this.node()[t]},classed:function(t,e){var i=tt(t+"");if(arguments.length<2){for(var r=et(this.node()),n=-1,o=i.length;++n<o;)if(!r.contains(i[n]))return!1;return!0}return this.each(("function"==typeof e?st:e?ot:at)(i,e))},text:function(t){return arguments.length?this.each(null==t?lt:("function"==typeof t?ht:ct)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ut:("function"==typeof t?ft:dt)(t)):this.node().innerHTML},raise:function(){return this.each(pt)},lower:function(){return this.each(gt)},append:function(t){var e="function"==typeof t?t:xt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var i="function"==typeof t?t:xt(t),r=null==e?bt:"function"==typeof e?e:C(e);return this.select((function(){return this.insertBefore(i.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Ct)},clone:function(t){return this.select(t?vt:_t)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,i){var r,n,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",i=t.indexOf(".");return i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Tt:kt,r=0;r<a;++r)this.each(s(o[r],e,i));return this}var s=this.node().__on;if(s)for(var l,c=0,h=s.length;c<h;++c)for(r=0,l=s[c];r<a;++r)if((n=o[r]).type===l.type&&n.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?St:wt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var r,n=t[e],o=0,a=n.length;o<a;++o)(r=n[o])&&(yield r)}};const Mt=Ft;var Et={value:()=>{}};function Nt(){for(var t,e=0,i=arguments.length,r={};e<i;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new jt(r)}function jt(t){this._=t}function Ot(t,e){for(var i,r=0,n=t.length;r<n;++r)if((i=t[r]).name===e)return i.value}function It(t,e,i){for(var r=0,n=t.length;r<n;++r)if(t[r].name===e){t[r]=Et,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=i&&t.push({name:e,value:i}),t}jt.prototype=Nt.prototype={constructor:jt,on:function(t,e){var i,r,n=this._,o=(r=n,(t+"").trim().split(/^|\s+/).map((function(t){var e="",i=t.indexOf(".");if(i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(i=(t=o[a]).type)n[i]=It(n[i],t.name,e);else if(null==e)for(i in n)n[i]=It(n[i],t.name,null);return this}for(;++a<s;)if((i=(t=o[a]).type)&&(i=Ot(n[i],t.name)))return i},copy:function(){var t={},e=this._;for(var i in e)t[i]=e[i].slice();return new jt(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var i,r,n=new Array(i),o=0;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,i=(r=this._[t]).length;o<i;++o)r[o].value.apply(e,n)},apply:function(t,e,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],n=0,o=r.length;n<o;++n)r[n].value.apply(e,i)}};const Dt=Nt;var qt,$t,zt=0,Pt=0,Rt=0,Ht=1e3,Wt=0,Ut=0,Yt=0,Vt="object"==typeof performance&&performance.now?performance:Date,Gt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Xt(){return Ut||(Gt(Zt),Ut=Vt.now()+Yt)}function Zt(){Ut=0}function Jt(){this._call=this._time=this._next=null}function Qt(t,e,i){var r=new Jt;return r.restart(t,e,i),r}function Kt(){Ut=(Wt=Vt.now())+Yt,zt=Pt=0;try{!function(){Xt(),++zt;for(var t,e=qt;e;)(t=Ut-e._time)>=0&&e._call.call(void 0,t),e=e._next;--zt}()}finally{zt=0,function(){var t,e,i=qt,r=1/0;for(;i;)i._call?(r>i._time&&(r=i._time),t=i,i=i._next):(e=i._next,i._next=null,i=t?t._next=e:qt=e);$t=t,ee(r)}(),Ut=0}}function te(){var t=Vt.now(),e=t-Wt;e>Ht&&(Yt-=e,Wt=t)}function ee(t){zt||(Pt&&(Pt=clearTimeout(Pt)),t-Ut>24?(t<1/0&&(Pt=setTimeout(Kt,t-Vt.now()-Yt)),Rt&&(Rt=clearInterval(Rt))):(Rt||(Wt=Vt.now(),Rt=setInterval(te,Ht)),zt=1,Gt(Kt)))}function ie(t,e,i){var r=new Jt;return e=null==e?0:+e,r.restart((i=>{r.stop(),t(i+e)}),e,i),r}Jt.prototype=Qt.prototype={constructor:Jt,restart:function(t,e,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?Xt():+i)+(null==e?0:+e),this._next||$t===this||($t?$t._next=this:qt=this,$t=this),this._call=t,this._time=i,ee()},stop:function(){this._call&&(this._call=null,this._time=1/0,ee())}};var re=Dt("start","end","cancel","interrupt"),ne=[],oe=0,ae=1,se=2,le=3,ce=4,he=5,ue=6;function de(t,e,i,r,n,o){var a=t.__transition;if(a){if(i in a)return}else t.__transition={};!function(t,e,i){var r,n=t.__transition;function o(t){i.state=ae,i.timer.restart(a,i.delay,i.time),i.delay<=t&&a(t-i.delay)}function a(o){var c,h,u,d;if(i.state!==ae)return l();for(c in n)if((d=n[c]).name===i.name){if(d.state===le)return ie(a);d.state===ce?(d.state=ue,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[c]):+c<e&&(d.state=ue,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete n[c])}if(ie((function(){i.state===le&&(i.state=ce,i.timer.restart(s,i.delay,i.time),s(o))})),i.state=se,i.on.call("start",t,t.__data__,i.index,i.group),i.state===se){for(i.state=le,r=new Array(u=i.tween.length),c=0,h=-1;c<u;++c)(d=i.tween[c].value.call(t,t.__data__,i.index,i.group))&&(r[++h]=d);r.length=h+1}}function s(e){for(var n=e<i.duration?i.ease.call(null,e/i.duration):(i.timer.restart(l),i.state=he,1),o=-1,a=r.length;++o<a;)r[o].call(t,n);i.state===he&&(i.on.call("end",t,t.__data__,i.index,i.group),l())}function l(){for(var r in i.state=ue,i.timer.stop(),delete n[e],n)return;delete t.__transition}n[e]=i,i.timer=Qt(o,0,i.time)}(t,i,{name:e,index:r,group:n,on:re,tween:ne,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:oe})}function fe(t,e){var i=ge(t,e);if(i.state>oe)throw new Error("too late; already scheduled");return i}function pe(t,e){var i=ge(t,e);if(i.state>le)throw new Error("too late; already running");return i}function ge(t,e){var i=t.__transition;if(!i||!(i=i[e]))throw new Error("transition not found");return i}function me(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}}var ye,xe=180/Math.PI,be={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ce(t,e,i,r,n,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*i+e*r)&&(i-=t*l,r-=e*l),(s=Math.sqrt(i*i+r*r))&&(i/=s,r/=s,l/=s),t*r<e*i&&(t=-t,e=-e,l=-l,a=-a),{translateX:n,translateY:o,rotate:Math.atan2(e,t)*xe,skewX:Math.atan(l)*xe,scaleX:a,scaleY:s}}function _e(t,e,i,r){function n(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],l=[];return o=t(o),a=t(a),function(t,r,n,o,a,s){if(t!==n||r!==o){var l=a.push("translate(",null,e,null,i);s.push({i:l-4,x:me(t,n)},{i:l-2,x:me(r,o)})}else(n||o)&&a.push("translate("+n+e+o+i)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(t,e,i,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:i.push(n(i)+"rotate(",null,r)-2,x:me(t,e)})):e&&i.push(n(i)+"rotate("+e+r)}(o.rotate,a.rotate,s,l),function(t,e,i,o){t!==e?o.push({i:i.push(n(i)+"skewX(",null,r)-2,x:me(t,e)}):e&&i.push(n(i)+"skewX("+e+r)}(o.skewX,a.skewX,s,l),function(t,e,i,r,o,a){if(t!==i||e!==r){var s=o.push(n(o)+"scale(",null,",",null,")");a.push({i:s-4,x:me(t,i)},{i:s-2,x:me(e,r)})}else 1===i&&1===r||o.push(n(o)+"scale("+i+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(t){for(var e,i=-1,r=l.length;++i<r;)s[(e=l[i]).i]=e.x(t);return s.join("")}}}var ve=_e((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?be:Ce(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),ke=_e((function(t){return null==t?be:(ye||(ye=document.createElementNS("http://www.w3.org/2000/svg","g")),ye.setAttribute("transform",t),(t=ye.transform.baseVal.consolidate())?Ce((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):be)}),", ",")",")");function Te(t,e){var i,r;return function(){var n=pe(this,t),o=n.tween;if(o!==i)for(var a=0,s=(r=i=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}n.tween=r}}function Ae(t,e,i){var r,n;if("function"!=typeof i)throw new Error;return function(){var o=pe(this,t),a=o.tween;if(a!==r){n=(r=a).slice();for(var s={name:e,value:i},l=0,c=n.length;l<c;++l)if(n[l].name===e){n[l]=s;break}l===c&&n.push(s)}o.tween=n}}function we(t,e,i){var r=t._id;return t.each((function(){var t=pe(this,r);(t.value||(t.value={}))[e]=i.apply(this,arguments)})),function(t){return ge(t,r).value[e]}}function Se(t,e,i){t.prototype=e.prototype=i,i.constructor=t}function Be(t,e){var i=Object.create(t.prototype);for(var r in e)i[r]=e[r];return i}function Le(){}var Fe=.7,Me=1/Fe,Ee="\\s*([+-]?\\d+)\\s*",Ne="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Oe=/^#([0-9a-f]{3,8})$/,Ie=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),De=new RegExp(`^rgb\\(${je},${je},${je}\\)$`),qe=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${Ne}\\)$`),$e=new RegExp(`^rgba\\(${je},${je},${je},${Ne}\\)$`),ze=new RegExp(`^hsl\\(${Ne},${je},${je}\\)$`),Pe=new RegExp(`^hsla\\(${Ne},${je},${je},${Ne}\\)$`),Re={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function He(){return this.rgb().formatHex()}function We(){return this.rgb().formatRgb()}function Ue(t){var e,i;return t=(t+"").trim().toLowerCase(),(e=Oe.exec(t))?(i=e[1].length,e=parseInt(e[1],16),6===i?Ye(e):3===i?new Ze(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===i?Ve(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===i?Ve(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ie.exec(t))?new Ze(e[1],e[2],e[3],1):(e=De.exec(t))?new Ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=qe.exec(t))?Ve(e[1],e[2],e[3],e[4]):(e=$e.exec(t))?Ve(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ze.exec(t))?ii(e[1],e[2]/100,e[3]/100,1):(e=Pe.exec(t))?ii(e[1],e[2]/100,e[3]/100,e[4]):Re.hasOwnProperty(t)?Ye(Re[t]):"transparent"===t?new Ze(NaN,NaN,NaN,0):null}function Ye(t){return new Ze(t>>16&255,t>>8&255,255&t,1)}function Ve(t,e,i,r){return r<=0&&(t=e=i=NaN),new Ze(t,e,i,r)}function Ge(t){return t instanceof Le||(t=Ue(t)),t?new Ze((t=t.rgb()).r,t.g,t.b,t.opacity):new Ze}function Xe(t,e,i,r){return 1===arguments.length?Ge(t):new Ze(t,e,i,null==r?1:r)}function Ze(t,e,i,r){this.r=+t,this.g=+e,this.b=+i,this.opacity=+r}function Je(){return`#${ei(this.r)}${ei(this.g)}${ei(this.b)}`}function Qe(){const t=Ke(this.opacity);return`${1===t?"rgb(":"rgba("}${ti(this.r)}, ${ti(this.g)}, ${ti(this.b)}${1===t?")":`, ${t})`}`}function Ke(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ti(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ei(t){return((t=ti(t))<16?"0":"")+t.toString(16)}function ii(t,e,i,r){return r<=0?t=e=i=NaN:i<=0||i>=1?t=e=NaN:e<=0&&(t=NaN),new ni(t,e,i,r)}function ri(t){if(t instanceof ni)return new ni(t.h,t.s,t.l,t.opacity);if(t instanceof Le||(t=Ue(t)),!t)return new ni;if(t instanceof ni)return t;var e=(t=t.rgb()).r/255,i=t.g/255,r=t.b/255,n=Math.min(e,i,r),o=Math.max(e,i,r),a=NaN,s=o-n,l=(o+n)/2;return s?(a=e===o?(i-r)/s+6*(i<r):i===o?(r-e)/s+2:(e-i)/s+4,s/=l<.5?o+n:2-o-n,a*=60):s=l>0&&l<1?0:a,new ni(a,s,l,t.opacity)}function ni(t,e,i,r){this.h=+t,this.s=+e,this.l=+i,this.opacity=+r}function oi(t){return(t=(t||0)%360)<0?t+360:t}function ai(t){return Math.max(0,Math.min(1,t||0))}function si(t,e,i){return 255*(t<60?e+(i-e)*t/60:t<180?i:t<240?e+(i-e)*(240-t)/60:e)}function li(t,e,i,r,n){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*i+(1+3*t+3*o-3*a)*r+a*n)/6}Se(Le,Ue,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:He,formatHex:He,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ri(this).formatHsl()},formatRgb:We,toString:We}),Se(Ze,Xe,Be(Le,{brighter(t){return t=null==t?Me:Math.pow(Me,t),new Ze(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Fe:Math.pow(Fe,t),new Ze(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ze(ti(this.r),ti(this.g),ti(this.b),Ke(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Je,formatHex:Je,formatHex8:function(){return`#${ei(this.r)}${ei(this.g)}${ei(this.b)}${ei(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Qe,toString:Qe})),Se(ni,(function(t,e,i,r){return 1===arguments.length?ri(t):new ni(t,e,i,null==r?1:r)}),Be(Le,{brighter(t){return t=null==t?Me:Math.pow(Me,t),new ni(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Fe:Math.pow(Fe,t),new ni(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,r=i+(i<.5?i:1-i)*e,n=2*i-r;return new Ze(si(t>=240?t-240:t+120,n,r),si(t,n,r),si(t<120?t+240:t-120,n,r),this.opacity)},clamp(){return new ni(oi(this.h),ai(this.s),ai(this.l),Ke(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ke(this.opacity);return`${1===t?"hsl(":"hsla("}${oi(this.h)}, ${100*ai(this.s)}%, ${100*ai(this.l)}%${1===t?")":`, ${t})`}`}}));const ci=t=>()=>t;function hi(t,e){return function(i){return t+i*e}}function ui(t){return 1==(t=+t)?di:function(e,i){return i-e?function(t,e,i){return t=Math.pow(t,i),e=Math.pow(e,i)-t,i=1/i,function(r){return Math.pow(t+r*e,i)}}(e,i,t):ci(isNaN(e)?i:e)}}function di(t,e){var i=e-t;return i?hi(t,i):ci(isNaN(t)?e:t)}const fi=function t(e){var i=ui(e);function r(t,e){var r=i((t=Xe(t)).r,(e=Xe(e)).r),n=i(t.g,e.g),o=i(t.b,e.b),a=di(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=n(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function pi(t){return function(e){var i,r,n=e.length,o=new Array(n),a=new Array(n),s=new Array(n);for(i=0;i<n;++i)r=Xe(e[i]),o[i]=r.r||0,a[i]=r.g||0,s[i]=r.b||0;return o=t(o),a=t(a),s=t(s),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=s(t),r+""}}}pi((function(t){var e=t.length-1;return function(i){var r=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),n=t[r],o=t[r+1],a=r>0?t[r-1]:2*n-o,s=r<e-1?t[r+2]:2*o-n;return li((i-r/e)*e,a,n,o,s)}})),pi((function(t){var e=t.length;return function(i){var r=Math.floor(((i%=1)<0?++i:i)*e),n=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return li((i-r/e)*e,n,o,a,s)}}));var gi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mi=new RegExp(gi.source,"g");function yi(t,e){var i,r,n,o=gi.lastIndex=mi.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(i=gi.exec(t))&&(r=mi.exec(e));)(n=r.index)>o&&(n=e.slice(o,n),s[a]?s[a]+=n:s[++a]=n),(i=i[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:me(i,r)})),o=mi.lastIndex;return o<e.length&&(n=e.slice(o),s[a]?s[a]+=n:s[++a]=n),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var i,r=0;r<e;++r)s[(i=l[r]).i]=i.x(t);return s.join("")})}function xi(t,e){var i;return("number"==typeof e?me:e instanceof Ue?fi:(i=Ue(e))?(e=i,fi):yi)(t,e)}function bi(t){return function(){this.removeAttribute(t)}}function Ci(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _i(t,e,i){var r,n,o=i+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?n:n=e(r=a,i)}}function vi(t,e,i){var r,n,o=i+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?n:n=e(r=a,i)}}function ki(t,e,i){var r,n,o;return function(){var a,s,l=i(this);if(null!=l)return(a=this.getAttribute(t))===(s=l+"")?null:a===r&&s===n?o:(n=s,o=e(r=a,l));this.removeAttribute(t)}}function Ti(t,e,i){var r,n,o;return function(){var a,s,l=i(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===r&&s===n?o:(n=s,o=e(r=a,l));this.removeAttributeNS(t.space,t.local)}}function Ai(t,e){var i,r;function n(){var n=e.apply(this,arguments);return n!==r&&(i=(r=n)&&function(t,e){return function(i){this.setAttributeNS(t.space,t.local,e.call(this,i))}}(t,n)),i}return n._value=e,n}function wi(t,e){var i,r;function n(){var n=e.apply(this,arguments);return n!==r&&(i=(r=n)&&function(t,e){return function(i){this.setAttribute(t,e.call(this,i))}}(t,n)),i}return n._value=e,n}function Si(t,e){return function(){fe(this,t).delay=+e.apply(this,arguments)}}function Bi(t,e){return e=+e,function(){fe(this,t).delay=e}}function Li(t,e){return function(){pe(this,t).duration=+e.apply(this,arguments)}}function Fi(t,e){return e=+e,function(){pe(this,t).duration=e}}var Mi=Mt.prototype.constructor;function Ei(t){return function(){this.style.removeProperty(t)}}var Ni=0;function ji(t,e,i,r){this._groups=t,this._parents=e,this._name=i,this._id=r}function Oi(){return++Ni}var Ii=Mt.prototype;ji.prototype=function(t){return Mt().transition(t)}.prototype={constructor:ji,select:function(t){var e=this._name,i=this._id;"function"!=typeof t&&(t=C(t));for(var r=this._groups,n=r.length,o=new Array(n),a=0;a<n;++a)for(var s,l,c=r[a],h=c.length,u=o[a]=new Array(h),d=0;d<h;++d)(s=c[d])&&(l=t.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),u[d]=l,de(u[d],e,i,d,u,ge(s,i)));return new ji(o,this._parents,e,i)},selectAll:function(t){var e=this._name,i=this._id;"function"!=typeof t&&(t=k(t));for(var r=this._groups,n=r.length,o=[],a=[],s=0;s<n;++s)for(var l,c=r[s],h=c.length,u=0;u<h;++u)if(l=c[u]){for(var d,f=t.call(l,l.__data__,u,c),p=ge(l,i),g=0,m=f.length;g<m;++g)(d=f[g])&&de(d,e,i,g,f,p);o.push(f),a.push(l)}return new ji(o,a,e,i)},selectChild:Ii.selectChild,selectChildren:Ii.selectChildren,filter:function(t){"function"!=typeof t&&(t=T(t));for(var e=this._groups,i=e.length,r=new Array(i),n=0;n<i;++n)for(var o,a=e[n],s=a.length,l=r[n]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&l.push(o);return new ji(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,i=t._groups,r=e.length,n=i.length,o=Math.min(r,n),a=new Array(r),s=0;s<o;++s)for(var l,c=e[s],h=i[s],u=c.length,d=a[s]=new Array(u),f=0;f<u;++f)(l=c[f]||h[f])&&(d[f]=l);for(;s<r;++s)a[s]=e[s];return new ji(a,this._parents,this._name,this._id)},selection:function(){return new Mi(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,i=Oi(),r=this._groups,n=r.length,o=0;o<n;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)if(a=s[c]){var h=ge(a,e);de(a,t,i,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new ji(r,this._parents,t,i)},call:Ii.call,nodes:Ii.nodes,node:Ii.node,size:Ii.size,empty:Ii.empty,each:Ii.each,on:function(t,e){var i=this._id;return arguments.length<2?ge(this.node(),i).on.on(t):this.each(function(t,e,i){var r,n,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?fe:pe;return function(){var a=o(this,t),s=a.on;s!==r&&(n=(r=s).copy()).on(e,i),a.on=n}}(i,t,e))},attr:function(t,e){var i=$(t),r="transform"===i?ke:xi;return this.attrTween(t,"function"==typeof e?(i.local?Ti:ki)(i,r,we(this,"attr."+t,e)):null==e?(i.local?Ci:bi)(i):(i.local?vi:_i)(i,r,e))},attrTween:function(t,e){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;var r=$(t);return this.tween(i,(r.local?Ai:wi)(r,e))},style:function(t,e,i){var r="transform"==(t+="")?ve:xi;return null==e?this.styleTween(t,function(t,e){var i,r,n;return function(){var o=Z(this,t),a=(this.style.removeProperty(t),Z(this,t));return o===a?null:o===i&&a===r?n:n=e(i=o,r=a)}}(t,r)).on("end.style."+t,Ei(t)):"function"==typeof e?this.styleTween(t,function(t,e,i){var r,n,o;return function(){var a=Z(this,t),s=i(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=Z(this,t)),a===l?null:a===r&&l===n?o:(n=l,o=e(r=a,s))}}(t,r,we(this,"style."+t,e))).each(function(t,e){var i,r,n,o,a="style."+e,s="end."+a;return function(){var l=pe(this,t),c=l.on,h=null==l.value[a]?o||(o=Ei(e)):void 0;c===i&&n===h||(r=(i=c).copy()).on(s,n=h),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,i){var r,n,o=i+"";return function(){var a=Z(this,t);return a===o?null:a===r?n:n=e(r=a,i)}}(t,r,e),i).on("end.style."+t,null)},styleTween:function(t,e,i){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,i){var r,n;function o(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&function(t,e,i){return function(r){this.style.setProperty(t,e.call(this,r),i)}}(t,o,i)),r}return o._value=e,o}(t,e,null==i?"":i))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(we(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,i;function r(){var r=t.apply(this,arguments);return r!==i&&(e=(i=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var i=this._id;if(t+="",arguments.length<2){for(var r,n=ge(this.node(),i).tween,o=0,a=n.length;o<a;++o)if((r=n[o]).name===t)return r.value;return null}return this.each((null==e?Te:Ae)(i,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Si:Bi)(e,t)):ge(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Li:Fi)(e,t)):ge(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){pe(this,t).ease=e}}(e,t)):ge(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var i=e.apply(this,arguments);if("function"!=typeof i)throw new Error;pe(this,t).ease=i}}(this._id,t))},end:function(){var t,e,i=this,r=i._id,n=i.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0==--n&&o()}};i.each((function(){var i=pe(this,r),n=i.on;n!==t&&((e=(t=n).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),i.on=e})),0===n&&o()}))},[Symbol.iterator]:Ii[Symbol.iterator]};var Di={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function qi(t,e){for(var i;!(i=t.__transition)||!(i=i[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return i}Mt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var i,r,n,o=t.__transition,a=!0;if(o){for(n in e=null==e?null:e+"",o)(i=o[n]).name===e?(r=i.state>se&&i.state<he,i.state=ue,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete o[n]):a=!1;a&&delete t.__transition}}(this,t)}))},Mt.prototype.transition=function(t){var e,i;t instanceof ji?(e=t._id,t=t._name):(e=Oi(),(i=Di).time=Xt(),t=null==t?null:t+"");for(var r=this._groups,n=r.length,o=0;o<n;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)(a=s[c])&&de(a,t,e,c,s,i||qi(a,e));return new ji(r,this._parents,t,e)};const{abs:$i,max:zi,min:Pi}=Math;function Ri(t){return[+t[0],+t[1]]}function Hi(t){return[Ri(t[0]),Ri(t[1])]}["w","e"].map(Wi),["n","s"].map(Wi),["n","w","e","s","nw","ne","sw","se"].map(Wi);function Wi(t){return{type:t}}function Ui(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Yi(t){return(e,i)=>function(t,e){return fetch(t,e).then(Ui)}(e,i).then((e=>(new DOMParser).parseFromString(e,t)))}Yi("application/xml");Yi("text/html");var Vi=Yi("image/svg+xml");const Gi=Math.PI/180,Xi=180/Math.PI,Zi=.96422,Ji=1,Qi=.82521,Ki=4/29,tr=6/29,er=3*tr*tr,ir=tr*tr*tr;function rr(t){if(t instanceof nr)return new nr(t.l,t.a,t.b,t.opacity);if(t instanceof ur)return dr(t);t instanceof Ze||(t=Ge(t));var e,i,r=lr(t.r),n=lr(t.g),o=lr(t.b),a=or((.2225045*r+.7168786*n+.0606169*o)/Ji);return r===n&&n===o?e=i=a:(e=or((.4360747*r+.3850649*n+.1430804*o)/Zi),i=or((.0139322*r+.0971045*n+.7141733*o)/Qi)),new nr(116*a-16,500*(e-a),200*(a-i),t.opacity)}function nr(t,e,i,r){this.l=+t,this.a=+e,this.b=+i,this.opacity=+r}function or(t){return t>ir?Math.pow(t,1/3):t/er+Ki}function ar(t){return t>tr?t*t*t:er*(t-Ki)}function sr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function lr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function cr(t){if(t instanceof ur)return new ur(t.h,t.c,t.l,t.opacity);if(t instanceof nr||(t=rr(t)),0===t.a&&0===t.b)return new ur(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Xi;return new ur(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function hr(t,e,i,r){return 1===arguments.length?cr(t):new ur(t,e,i,null==r?1:r)}function ur(t,e,i,r){this.h=+t,this.c=+e,this.l=+i,this.opacity=+r}function dr(t){if(isNaN(t.h))return new nr(t.l,0,0,t.opacity);var e=t.h*Gi;return new nr(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function fr(t){return function(e,i){var r=t((e=hr(e)).h,(i=hr(i)).h),n=di(e.c,i.c),o=di(e.l,i.l),a=di(e.opacity,i.opacity);return function(t){return e.h=r(t),e.c=n(t),e.l=o(t),e.opacity=a(t),e+""}}}Se(nr,(function(t,e,i,r){return 1===arguments.length?rr(t):new nr(t,e,i,null==r?1:r)}),Be(Le,{brighter(t){return new nr(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new nr(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,i=isNaN(this.b)?t:t-this.b/200;return new Ze(sr(3.1338561*(e=Zi*ar(e))-1.6168667*(t=Ji*ar(t))-.4906146*(i=Qi*ar(i))),sr(-.9787684*e+1.9161415*t+.033454*i),sr(.0719453*e-.2289914*t+1.4052427*i),this.opacity)}})),Se(ur,hr,Be(Le,{brighter(t){return new ur(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new ur(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return dr(this).rgb()}}));const pr=fr((function(t,e){var i=e-t;return i?hi(t,i>180||i<-180?i-360*Math.round(i/360):i):ci(isNaN(t)?e:t)}));fr(di);function gr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class mr extends Map{constructor(t,e=Cr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[i,r]of t)this.set(i,r)}get(t){return super.get(yr(this,t))}has(t){return super.has(yr(this,t))}set(t,e){return super.set(xr(this,t),e)}delete(t){return super.delete(br(this,t))}}Set;function yr({_intern:t,_key:e},i){const r=e(i);return t.has(r)?t.get(r):i}function xr({_intern:t,_key:e},i){const r=e(i);return t.has(r)?t.get(r):(t.set(r,i),i)}function br({_intern:t,_key:e},i){const r=e(i);return t.has(r)&&(i=t.get(r),t.delete(r)),i}function Cr(t){return null!==t&&"object"==typeof t?t.valueOf():t}const _r=Symbol("implicit");function vr(){var t=new mr,e=[],i=[],r=_r;function n(n){let o=t.get(n);if(void 0===o){if(r!==_r)return r;t.set(n,o=e.push(n)-1)}return i[o%i.length]}return n.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new mr;for(const r of i)t.has(r)||t.set(r,e.push(r)-1);return n},n.range=function(t){return arguments.length?(i=Array.from(t),n):i.slice()},n.unknown=function(t){return arguments.length?(r=t,n):r},n.copy=function(){return vr(e,i).unknown(r)},gr.apply(n,arguments),n}function kr(){var t,e,i=vr().unknown(void 0),r=i.domain,n=i.range,o=0,a=1,s=!1,l=0,c=0,h=.5;function u(){var i=r().length,u=a<o,d=u?a:o,f=u?o:a;t=(f-d)/Math.max(1,i-l+2*c),s&&(t=Math.floor(t)),d+=(f-d-t*(i-l))*h,e=t*(1-l),s&&(d=Math.round(d),e=Math.round(e));var p=function(t,e,i){t=+t,e=+e,i=(n=arguments.length)<2?(e=t,t=0,1):n<3?1:+i;for(var r=-1,n=0|Math.max(0,Math.ceil((e-t)/i)),o=new Array(n);++r<n;)o[r]=t+r*i;return o}(i).map((function(e){return d+t*e}));return n(u?p.reverse():p)}return delete i.unknown,i.domain=function(t){return arguments.length?(r(t),u()):r()},i.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,u()):[o,a]},i.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,s=!0,u()},i.bandwidth=function(){return e},i.step=function(){return t},i.round=function(t){return arguments.length?(s=!!t,u()):s},i.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),u()):l},i.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),u()):l},i.paddingOuter=function(t){return arguments.length?(c=+t,u()):c},i.align=function(t){return arguments.length?(h=Math.max(0,Math.min(1,t)),u()):h},i.copy=function(){return kr(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(h)},gr.apply(u(),arguments)}const Tr=Math.sqrt(50),Ar=Math.sqrt(10),wr=Math.sqrt(2);function Sr(t,e,i){const r=(e-t)/Math.max(0,i),n=Math.floor(Math.log10(r)),o=r/Math.pow(10,n),a=o>=Tr?10:o>=Ar?5:o>=wr?2:1;let s,l,c;return n<0?(c=Math.pow(10,-n)/a,s=Math.round(t*c),l=Math.round(e*c),s/c<t&&++s,l/c>e&&--l,c=-c):(c=Math.pow(10,n)*a,s=Math.round(t/c),l=Math.round(e/c),s*c<t&&++s,l*c>e&&--l),l<s&&.5<=i&&i<2?Sr(t,e,2*i):[s,l,c]}function Br(t,e,i){return Sr(t=+t,e=+e,i=+i)[2]}function Lr(t,e,i){i=+i;const r=(e=+e)<(t=+t),n=r?Br(e,t,i):Br(t,e,i);return(r?-1:1)*(n<0?1/-n:n)}function Fr(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Mr(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Er(t){let e,i,r;function n(t,r,n=0,o=t.length){if(n<o){if(0!==e(r,r))return o;do{const e=n+o>>>1;i(t[e],r)<0?n=e+1:o=e}while(n<o)}return n}return 2!==t.length?(e=Fr,i=(e,i)=>Fr(t(e),i),r=(e,i)=>t(e)-i):(e=t===Fr||t===Mr?t:Nr,i=t,r=t),{left:n,center:function(t,e,i=0,o=t.length){const a=n(t,e,i,o-1);return a>i&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r,n=0,o=t.length){if(n<o){if(0!==e(r,r))return o;do{const e=n+o>>>1;i(t[e],r)<=0?n=e+1:o=e}while(n<o)}return n}}}function Nr(){return 0}const jr=Er(Fr),Or=jr.right,Ir=(jr.left,Er((function(t){return null===t?NaN:+t})).center,Or);function Dr(t,e){var i,r=e?e.length:0,n=t?Math.min(r,t.length):0,o=new Array(n),a=new Array(r);for(i=0;i<n;++i)o[i]=Pr(t[i],e[i]);for(;i<r;++i)a[i]=e[i];return function(t){for(i=0;i<n;++i)a[i]=o[i](t);return a}}function qr(t,e){var i=new Date;return t=+t,e=+e,function(r){return i.setTime(t*(1-r)+e*r),i}}function $r(t,e){var i,r={},n={};for(i in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)i in t?r[i]=Pr(t[i],e[i]):n[i]=e[i];return function(t){for(i in r)n[i]=r[i](t);return n}}function zr(t,e){e||(e=[]);var i,r=t?Math.min(e.length,t.length):0,n=e.slice();return function(o){for(i=0;i<r;++i)n[i]=t[i]*(1-o)+e[i]*o;return n}}function Pr(t,e){var i,r,n=typeof e;return null==e||"boolean"===n?ci(e):("number"===n?me:"string"===n?(i=Ue(e))?(e=i,fi):yi:e instanceof Ue?fi:e instanceof Date?qr:(r=e,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(e)?Dr:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?$r:me:zr))(t,e)}function Rr(t,e){return t=+t,e=+e,function(i){return Math.round(t*(1-i)+e*i)}}function Hr(t){return+t}var Wr=[0,1];function Ur(t){return t}function Yr(t,e){return(e-=t=+t)?function(i){return(i-t)/e}:(i=isNaN(e)?NaN:.5,function(){return i});var i}function Vr(t,e,i){var r=t[0],n=t[1],o=e[0],a=e[1];return n<r?(r=Yr(n,r),o=i(a,o)):(r=Yr(r,n),o=i(o,a)),function(t){return o(r(t))}}function Gr(t,e,i){var r=Math.min(t.length,e.length)-1,n=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)n[a]=Yr(t[a],t[a+1]),o[a]=i(e[a],e[a+1]);return function(e){var i=Ir(t,e,1,r)-1;return o[i](n[i](e))}}function Xr(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Zr(){var t,e,i,r,n,o,a=Wr,s=Wr,l=Pr,c=Ur;function h(){var t,e,i,l=Math.min(a.length,s.length);return c!==Ur&&(t=a[0],e=a[l-1],t>e&&(i=t,t=e,e=i),c=function(i){return Math.max(t,Math.min(e,i))}),r=l>2?Gr:Vr,n=o=null,u}function u(e){return null==e||isNaN(e=+e)?i:(n||(n=r(a.map(t),s,l)))(t(c(e)))}return u.invert=function(i){return c(e((o||(o=r(s,a.map(t),me)))(i)))},u.domain=function(t){return arguments.length?(a=Array.from(t,Hr),h()):a.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),h()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=Rr,h()},u.clamp=function(t){return arguments.length?(c=!!t||Ur,h()):c!==Ur},u.interpolate=function(t){return arguments.length?(l=t,h()):l},u.unknown=function(t){return arguments.length?(i=t,u):i},function(i,r){return t=i,e=r,h()}}function Jr(){return Zr()(Ur,Ur)}var Qr,Kr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function tn(t){if(!(e=Kr.exec(t)))throw new Error("invalid format: "+t);var e;return new en({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function en(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function rn(t,e){if((i=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var i,r=t.slice(0,i);return[r.length>1?r[0]+r.slice(2):r,+t.slice(i+1)]}function nn(t){return(t=rn(Math.abs(t)))?t[1]:NaN}function on(t,e){var i=rn(t,e);if(!i)return t+"";var r=i[0],n=i[1];return n<0?"0."+new Array(-n).join("0")+r:r.length>n+1?r.slice(0,n+1)+"."+r.slice(n+1):r+new Array(n-r.length+2).join("0")}tn.prototype=en.prototype,en.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const an={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>on(100*t,e),r:on,s:function(t,e){var i=rn(t,e);if(!i)return t+"";var r=i[0],n=i[1],o=n-(Qr=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+rn(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function sn(t){return t}var ln,cn,hn,un=Array.prototype.map,dn=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function fn(t){var e,i,r=void 0===t.grouping||void 0===t.thousands?sn:(e=un.call(t.grouping,Number),i=t.thousands+"",function(t,r){for(var n=t.length,o=[],a=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(t.substring(n-=s,n+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(i)}),n=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?sn:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(un.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"\u2212":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=tn(t)).fill,i=t.align,u=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,m=t.precision,y=t.trim,x=t.type;"n"===x?(g=!0,x="g"):an[x]||(void 0===m&&(m=12),y=!0,x="g"),(f||"0"===e&&"="===i)&&(f=!0,e="0",i="=");var b="$"===d?n:"#"===d&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",C="$"===d?o:/[%p]/.test(x)?l:"",_=an[x],v=/[defgprs%]/.test(x);function k(t){var n,o,l,d=b,k=C;if("c"===x)k=_(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:_(Math.abs(t),m),y&&(t=function(t){t:for(var e,i=t.length,r=1,n=-1;r<i;++r)switch(t[r]){case".":n=e=r;break;case"0":0===n&&(n=r),e=r;break;default:if(!+t[r])break t;n>0&&(n=0)}return n>0?t.slice(0,n)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==u&&(T=!1),d=(T?"("===u?u:c:"-"===u||"("===u?"":u)+d,k=("s"===x?dn[8+Qr/3]:"")+k+(T&&"("===u?")":""),v)for(n=-1,o=t.length;++n<o;)if(48>(l=t.charCodeAt(n))||l>57){k=(46===l?a+t.slice(n+1):t.slice(n))+k,t=t.slice(0,n);break}}g&&!f&&(t=r(t,1/0));var A=d.length+t.length+k.length,w=A<p?new Array(p-A+1).join(e):"";switch(g&&f&&(t=r(w+t,w.length?p-k.length:1/0),w=""),i){case"<":t=d+t+k+w;break;case"=":t=d+w+t+k;break;case"^":t=w.slice(0,A=w.length>>1)+d+t+k+w.slice(A);break;default:t=w+d+t+k}return s(t)}return m=void 0===m?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),k.toString=function(){return t+""},k}return{format:u,formatPrefix:function(t,e){var i=u(((t=tn(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(nn(e)/3))),n=Math.pow(10,-r),o=dn[8+r/3];return function(t){return i(n*t)+o}}}}function pn(t,e,i,r){var n,o=Lr(t,e,i);switch((r=tn(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(n=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(nn(e)/3)))-nn(Math.abs(t)))}(o,a))||(r.precision=n),hn(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(n=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,nn(e)-nn(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=n-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(n=function(t){return Math.max(0,-nn(Math.abs(t)))}(o))||(r.precision=n-2*("%"===r.type))}return cn(r)}function gn(t){var e=t.domain;return t.ticks=function(t){var i=e();return function(t,e,i){if(!((i=+i)>0))return[];if((t=+t)==(e=+e))return[t];const r=e<t,[n,o,a]=r?Sr(e,t,i):Sr(t,e,i);if(!(o>=n))return[];const s=o-n+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(n+c)/-a;else for(let c=0;c<s;++c)l[c]=(n+c)*a;return l}(i[0],i[i.length-1],null==t?10:t)},t.tickFormat=function(t,i){var r=e();return pn(r[0],r[r.length-1],null==t?10:t,i)},t.nice=function(i){null==i&&(i=10);var r,n,o=e(),a=0,s=o.length-1,l=o[a],c=o[s],h=10;for(c<l&&(n=l,l=c,c=n,n=a,a=s,s=n);h-- >0;){if((n=Br(l,c,i))===r)return o[a]=l,o[s]=c,e(o);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}r=n}return t},t}function mn(){var t=Jr();return t.copy=function(){return Xr(t,mn())},gr.apply(t,arguments),gn(t)}ln=fn({thousands:",",grouping:[3],currency:["$",""]}),cn=ln.format,hn=ln.formatPrefix;const yn=1e3,xn=6e4,bn=36e5,Cn=864e5,_n=6048e5,vn=2592e6,kn=31536e6,Tn=new Date,An=new Date;function wn(t,e,i,r){function n(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return n.floor=e=>(t(e=new Date(+e)),e),n.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),n.round=t=>{const e=n(t),i=n.ceil(t);return t-e<i-t?e:i},n.offset=(t,i)=>(e(t=new Date(+t),null==i?1:Math.floor(i)),t),n.range=(i,r,o)=>{const a=[];if(i=n.ceil(i),o=null==o?1:Math.floor(o),!(i<r&&o>0))return a;let s;do{a.push(s=new Date(+i)),e(i,o),t(i)}while(s<i&&i<r);return a},n.filter=i=>wn((e=>{if(e>=e)for(;t(e),!i(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!i(t););else for(;--r>=0;)for(;e(t,1),!i(t););})),i&&(n.count=(e,r)=>(Tn.setTime(+e),An.setTime(+r),t(Tn),t(An),Math.floor(i(Tn,An))),n.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?n.filter(r?e=>r(e)%t==0:e=>n.count(0,e)%t==0):n:null)),n}const Sn=wn((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));Sn.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?wn((e=>{e.setTime(Math.floor(e/t)*t)}),((e,i)=>{e.setTime(+e+i*t)}),((e,i)=>(i-e)/t)):Sn:null);Sn.range;const Bn=wn((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*yn)}),((t,e)=>(e-t)/yn),(t=>t.getUTCSeconds())),Ln=(Bn.range,wn((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*yn)}),((t,e)=>{t.setTime(+t+e*xn)}),((t,e)=>(e-t)/xn),(t=>t.getMinutes()))),Fn=(Ln.range,wn((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*xn)}),((t,e)=>(e-t)/xn),(t=>t.getUTCMinutes()))),Mn=(Fn.range,wn((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*yn-t.getMinutes()*xn)}),((t,e)=>{t.setTime(+t+e*bn)}),((t,e)=>(e-t)/bn),(t=>t.getHours()))),En=(Mn.range,wn((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*bn)}),((t,e)=>(e-t)/bn),(t=>t.getUTCHours()))),Nn=(En.range,wn((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*xn)/Cn),(t=>t.getDate()-1))),jn=(Nn.range,wn((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/Cn),(t=>t.getUTCDate()-1))),On=(jn.range,wn((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/Cn),(t=>Math.floor(t/Cn))));On.range;function In(t){return wn((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*xn)/_n))}const Dn=In(0),qn=In(1),$n=In(2),zn=In(3),Pn=In(4),Rn=In(5),Hn=In(6);Dn.range,qn.range,$n.range,zn.range,Pn.range,Rn.range,Hn.range;function Wn(t){return wn((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/_n))}const Un=Wn(0),Yn=Wn(1),Vn=Wn(2),Gn=Wn(3),Xn=Wn(4),Zn=Wn(5),Jn=Wn(6),Qn=(Un.range,Yn.range,Vn.range,Gn.range,Xn.range,Zn.range,Jn.range,wn((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),Kn=(Qn.range,wn((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),to=(Kn.range,wn((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));to.every=t=>isFinite(t=Math.floor(t))&&t>0?wn((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,i)=>{e.setFullYear(e.getFullYear()+i*t)})):null;to.range;const eo=wn((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));eo.every=t=>isFinite(t=Math.floor(t))&&t>0?wn((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,i)=>{e.setUTCFullYear(e.getUTCFullYear()+i*t)})):null;eo.range;function io(t,e,i,r,n,o){const a=[[Bn,1,yn],[Bn,5,5e3],[Bn,15,15e3],[Bn,30,3e4],[o,1,xn],[o,5,3e5],[o,15,9e5],[o,30,18e5],[n,1,bn],[n,3,108e5],[n,6,216e5],[n,12,432e5],[r,1,Cn],[r,2,1728e5],[i,1,_n],[e,1,vn],[e,3,7776e6],[t,1,kn]];function s(e,i,r){const n=Math.abs(i-e)/r,o=Er((([,,t])=>t)).right(a,n);if(o===a.length)return t.every(Lr(e/kn,i/kn,r));if(0===o)return Sn.every(Math.max(Lr(e,i,r),1));const[s,l]=a[n/a[o-1][2]<a[o][2]/n?o-1:o];return s.every(l)}return[function(t,e,i){const r=e<t;r&&([t,e]=[e,t]);const n=i&&"function"==typeof i.range?i:s(t,e,i),o=n?n.range(t,+e+1):[];return r?o.reverse():o},s]}const[ro,no]=io(eo,Kn,Un,On,En,Fn),[oo,ao]=io(to,Qn,Dn,Nn,Mn,Ln);function so(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function lo(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function co(t,e,i){return{y:t,m:e,d:i,H:0,M:0,S:0,L:0}}var ho,uo,fo={"-":"",_:" ",0:"0"},po=/^\s*\d+/,go=/^%/,mo=/[\\^$*+?|[\]().{}]/g;function yo(t,e,i){var r=t<0?"-":"",n=(r?-t:t)+"",o=n.length;return r+(o<i?new Array(i-o+1).join(e)+n:n)}function xo(t){return t.replace(mo,"\\$&")}function bo(t){return new RegExp("^(?:"+t.map(xo).join("|")+")","i")}function Co(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function _o(t,e,i){var r=po.exec(e.slice(i,i+1));return r?(t.w=+r[0],i+r[0].length):-1}function vo(t,e,i){var r=po.exec(e.slice(i,i+1));return r?(t.u=+r[0],i+r[0].length):-1}function ko(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.U=+r[0],i+r[0].length):-1}function To(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.V=+r[0],i+r[0].length):-1}function Ao(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.W=+r[0],i+r[0].length):-1}function wo(t,e,i){var r=po.exec(e.slice(i,i+4));return r?(t.y=+r[0],i+r[0].length):-1}function So(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),i+r[0].length):-1}function Bo(t,e,i){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(i,i+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),i+r[0].length):-1}function Lo(t,e,i){var r=po.exec(e.slice(i,i+1));return r?(t.q=3*r[0]-3,i+r[0].length):-1}function Fo(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.m=r[0]-1,i+r[0].length):-1}function Mo(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.d=+r[0],i+r[0].length):-1}function Eo(t,e,i){var r=po.exec(e.slice(i,i+3));return r?(t.m=0,t.d=+r[0],i+r[0].length):-1}function No(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.H=+r[0],i+r[0].length):-1}function jo(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.M=+r[0],i+r[0].length):-1}function Oo(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.S=+r[0],i+r[0].length):-1}function Io(t,e,i){var r=po.exec(e.slice(i,i+3));return r?(t.L=+r[0],i+r[0].length):-1}function Do(t,e,i){var r=po.exec(e.slice(i,i+6));return r?(t.L=Math.floor(r[0]/1e3),i+r[0].length):-1}function qo(t,e,i){var r=go.exec(e.slice(i,i+1));return r?i+r[0].length:-1}function $o(t,e,i){var r=po.exec(e.slice(i));return r?(t.Q=+r[0],i+r[0].length):-1}function zo(t,e,i){var r=po.exec(e.slice(i));return r?(t.s=+r[0],i+r[0].length):-1}function Po(t,e){return yo(t.getDate(),e,2)}function Ro(t,e){return yo(t.getHours(),e,2)}function Ho(t,e){return yo(t.getHours()%12||12,e,2)}function Wo(t,e){return yo(1+Nn.count(to(t),t),e,3)}function Uo(t,e){return yo(t.getMilliseconds(),e,3)}function Yo(t,e){return Uo(t,e)+"000"}function Vo(t,e){return yo(t.getMonth()+1,e,2)}function Go(t,e){return yo(t.getMinutes(),e,2)}function Xo(t,e){return yo(t.getSeconds(),e,2)}function Zo(t){var e=t.getDay();return 0===e?7:e}function Jo(t,e){return yo(Dn.count(to(t)-1,t),e,2)}function Qo(t){var e=t.getDay();return e>=4||0===e?Pn(t):Pn.ceil(t)}function Ko(t,e){return t=Qo(t),yo(Pn.count(to(t),t)+(4===to(t).getDay()),e,2)}function ta(t){return t.getDay()}function ea(t,e){return yo(qn.count(to(t)-1,t),e,2)}function ia(t,e){return yo(t.getFullYear()%100,e,2)}function ra(t,e){return yo((t=Qo(t)).getFullYear()%100,e,2)}function na(t,e){return yo(t.getFullYear()%1e4,e,4)}function oa(t,e){var i=t.getDay();return yo((t=i>=4||0===i?Pn(t):Pn.ceil(t)).getFullYear()%1e4,e,4)}function aa(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+yo(e/60|0,"0",2)+yo(e%60,"0",2)}function sa(t,e){return yo(t.getUTCDate(),e,2)}function la(t,e){return yo(t.getUTCHours(),e,2)}function ca(t,e){return yo(t.getUTCHours()%12||12,e,2)}function ha(t,e){return yo(1+jn.count(eo(t),t),e,3)}function ua(t,e){return yo(t.getUTCMilliseconds(),e,3)}function da(t,e){return ua(t,e)+"000"}function fa(t,e){return yo(t.getUTCMonth()+1,e,2)}function pa(t,e){return yo(t.getUTCMinutes(),e,2)}function ga(t,e){return yo(t.getUTCSeconds(),e,2)}function ma(t){var e=t.getUTCDay();return 0===e?7:e}function ya(t,e){return yo(Un.count(eo(t)-1,t),e,2)}function xa(t){var e=t.getUTCDay();return e>=4||0===e?Xn(t):Xn.ceil(t)}function ba(t,e){return t=xa(t),yo(Xn.count(eo(t),t)+(4===eo(t).getUTCDay()),e,2)}function Ca(t){return t.getUTCDay()}function _a(t,e){return yo(Yn.count(eo(t)-1,t),e,2)}function va(t,e){return yo(t.getUTCFullYear()%100,e,2)}function ka(t,e){return yo((t=xa(t)).getUTCFullYear()%100,e,2)}function Ta(t,e){return yo(t.getUTCFullYear()%1e4,e,4)}function Aa(t,e){var i=t.getUTCDay();return yo((t=i>=4||0===i?Xn(t):Xn.ceil(t)).getUTCFullYear()%1e4,e,4)}function wa(){return"+0000"}function Sa(){return"%"}function Ba(t){return+t}function La(t){return Math.floor(+t/1e3)}function Fa(t){return new Date(t)}function Ma(t){return t instanceof Date?+t:+new Date(+t)}function Ea(t,e,i,r,n,o,a,s,l,c){var h=Jr(),u=h.invert,d=h.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),x=c("%b %d"),b=c("%B"),C=c("%Y");function _(t){return(l(t)<t?f:s(t)<t?p:a(t)<t?g:o(t)<t?m:r(t)<t?n(t)<t?y:x:i(t)<t?b:C)(t)}return h.invert=function(t){return new Date(u(t))},h.domain=function(t){return arguments.length?d(Array.from(t,Ma)):d().map(Fa)},h.ticks=function(e){var i=d();return t(i[0],i[i.length-1],null==e?10:e)},h.tickFormat=function(t,e){return null==e?_:c(e)},h.nice=function(t){var i=d();return t&&"function"==typeof t.range||(t=e(i[0],i[i.length-1],null==t?10:t)),t?d(function(t,e){var i,r=0,n=(t=t.slice()).length-1,o=t[r],a=t[n];return a<o&&(i=r,r=n,n=i,i=o,o=a,a=i),t[r]=e.floor(o),t[n]=e.ceil(a),t}(i,t)):h},h.copy=function(){return Xr(h,Ea(t,e,i,r,n,o,a,s,l,c))},h}function Na(){return gr.apply(Ea(oo,ao,to,Qn,Dn,Nn,Mn,Ln,Bn,uo).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}!function(t){ho=function(t){var e=t.dateTime,i=t.date,r=t.time,n=t.periods,o=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,c=bo(n),h=Co(n),u=bo(o),d=Co(o),f=bo(a),p=Co(a),g=bo(s),m=Co(s),y=bo(l),x=Co(l),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Po,e:Po,f:Yo,g:ra,G:oa,H:Ro,I:Ho,j:Wo,L:Uo,m:Vo,M:Go,p:function(t){return n[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ba,s:La,S:Xo,u:Zo,U:Jo,V:Ko,w:ta,W:ea,x:null,X:null,y:ia,Y:na,Z:aa,"%":Sa},C={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:sa,e:sa,f:da,g:ka,G:Aa,H:la,I:ca,j:ha,L:ua,m:fa,M:pa,p:function(t){return n[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ba,s:La,S:ga,u:ma,U:ya,V:ba,w:Ca,W:_a,x:null,X:null,y:va,Y:Ta,Z:wa,"%":Sa},_={a:function(t,e,i){var r=f.exec(e.slice(i));return r?(t.w=p.get(r[0].toLowerCase()),i+r[0].length):-1},A:function(t,e,i){var r=u.exec(e.slice(i));return r?(t.w=d.get(r[0].toLowerCase()),i+r[0].length):-1},b:function(t,e,i){var r=y.exec(e.slice(i));return r?(t.m=x.get(r[0].toLowerCase()),i+r[0].length):-1},B:function(t,e,i){var r=g.exec(e.slice(i));return r?(t.m=m.get(r[0].toLowerCase()),i+r[0].length):-1},c:function(t,i,r){return T(t,e,i,r)},d:Mo,e:Mo,f:Do,g:So,G:wo,H:No,I:No,j:Eo,L:Io,m:Fo,M:jo,p:function(t,e,i){var r=c.exec(e.slice(i));return r?(t.p=h.get(r[0].toLowerCase()),i+r[0].length):-1},q:Lo,Q:$o,s:zo,S:Oo,u:vo,U:ko,V:To,w:_o,W:Ao,x:function(t,e,r){return T(t,i,e,r)},X:function(t,e,i){return T(t,r,e,i)},y:So,Y:wo,Z:Bo,"%":qo};function v(t,e){return function(i){var r,n,o,a=[],s=-1,l=0,c=t.length;for(i instanceof Date||(i=new Date(+i));++s<c;)37===t.charCodeAt(s)&&(a.push(t.slice(l,s)),null!=(n=fo[r=t.charAt(++s)])?r=t.charAt(++s):n="e"===r?" ":"0",(o=e[r])&&(r=o(i,n)),a.push(r),l=s+1);return a.push(t.slice(l,s)),a.join("")}}function k(t,e){return function(i){var r,n,o=co(1900,void 0,1);if(T(o,t,i+="",0)!=i.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(e&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(n=(r=lo(co(o.y,0,1))).getUTCDay(),r=n>4||0===n?Yn.ceil(r):Yn(r),r=jn.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(n=(r=so(co(o.y,0,1))).getDay(),r=n>4||0===n?qn.ceil(r):qn(r),r=Nn.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),n="Z"in o?lo(co(o.y,0,1)).getUTCDay():so(co(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(n+5)%7:o.w+7*o.U-(n+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,lo(o)):so(o)}}function T(t,e,i,r){for(var n,o,a=0,s=e.length,l=i.length;a<s;){if(r>=l)return-1;if(37===(n=e.charCodeAt(a++))){if(n=e.charAt(a++),!(o=_[n in fo?e.charAt(a++):n])||(r=o(t,i,r))<0)return-1}else if(n!=i.charCodeAt(r++))return-1}return r}return b.x=v(i,b),b.X=v(r,b),b.c=v(e,b),C.x=v(i,C),C.X=v(r,C),C.c=v(e,C),{format:function(t){var e=v(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=v(t+="",C);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}(t),uo=ho.format,ho.parse,ho.utcFormat,ho.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const ja=function(t){for(var e=t.length/6|0,i=new Array(e),r=0;r<e;)i[r]="#"+t.slice(6*r,6*++r);return i}("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Oa(t){return"string"==typeof t?new Lt([[document.querySelector(t)]],[document.documentElement]):new Lt([[t]],Bt)}function Ia(t){return"string"==typeof t?new Lt([document.querySelectorAll(t)],[document.documentElement]):new Lt([_(t)],Bt)}function Da(t){return function(){return t}}const qa=Math.abs,$a=Math.atan2,za=Math.cos,Pa=Math.max,Ra=Math.min,Ha=Math.sin,Wa=Math.sqrt,Ua=1e-12,Ya=Math.PI,Va=Ya/2,Ga=2*Ya;function Xa(t){return t>=1?Va:t<=-1?-Va:Math.asin(t)}const Za=Math.PI,Ja=2*Za,Qa=1e-6,Ka=Ja-Qa;function ts(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=arguments[e]+t[e]}class es{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?ts:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return ts;const i=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*i)/i+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,i,r){this._append`Q${+t},${+e},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(t,e,i,r,n,o){this._append`C${+t},${+e},${+i},${+r},${this._x1=+n},${this._y1=+o}`}arcTo(t,e,i,r,n){if(t=+t,e=+e,i=+i,r=+r,(n=+n)<0)throw new Error(`negative radius: ${n}`);let o=this._x1,a=this._y1,s=i-t,l=r-e,c=o-t,h=a-e,u=c*c+h*h;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(u>Qa)if(Math.abs(h*s-l*c)>Qa&&n){let d=i-o,f=r-a,p=s*s+l*l,g=d*d+f*f,m=Math.sqrt(p),y=Math.sqrt(u),x=n*Math.tan((Za-Math.acos((p+u-g)/(2*m*y)))/2),b=x/y,C=x/m;Math.abs(b-1)>Qa&&this._append`L${t+b*c},${e+b*h}`,this._append`A${n},${n},0,0,${+(h*d>c*f)},${this._x1=t+C*s},${this._y1=e+C*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,i,r,n,o){if(t=+t,e=+e,o=!!o,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),s=i*Math.sin(r),l=t+a,c=e+s,h=1^o,u=o?r-n:n-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Qa||Math.abs(this._y1-c)>Qa)&&this._append`L${l},${c}`,i&&(u<0&&(u=u%Ja+Ja),u>Ka?this._append`A${i},${i},0,1,${h},${t-a},${e-s}A${i},${i},0,1,${h},${this._x1=l},${this._y1=c}`:u>Qa&&this._append`A${i},${i},0,${+(u>=Za)},${h},${this._x1=t+i*Math.cos(n)},${this._y1=e+i*Math.sin(n)}`)}rect(t,e,i,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function is(t){let e=3;return t.digits=function(i){if(!arguments.length)return e;if(null==i)e=null;else{const t=Math.floor(i);if(!(t>=0))throw new RangeError(`invalid digits: ${i}`);e=t}return t},()=>new es(e)}function rs(t){return t.innerRadius}function ns(t){return t.outerRadius}function os(t){return t.startAngle}function as(t){return t.endAngle}function ss(t){return t&&t.padAngle}function ls(t,e,i,r,n,o,a){var s=t-i,l=e-r,c=(a?o:-o)/Wa(s*s+l*l),h=c*l,u=-c*s,d=t+h,f=e+u,p=i+h,g=r+u,m=(d+p)/2,y=(f+g)/2,x=p-d,b=g-f,C=x*x+b*b,_=n-o,v=d*g-p*f,k=(b<0?-1:1)*Wa(Pa(0,_*_*C-v*v)),T=(v*b-x*k)/C,A=(-v*x-b*k)/C,w=(v*b+x*k)/C,S=(-v*x+b*k)/C,B=T-m,L=A-y,F=w-m,M=S-y;return B*B+L*L>F*F+M*M&&(T=w,A=S),{cx:T,cy:A,x01:-h,y01:-u,x11:T*(n/_-1),y11:A*(n/_-1)}}function cs(){var t=rs,e=ns,i=Da(0),r=null,n=os,o=as,a=ss,s=null,l=is(c);function c(){var c,h,u,d=+t.apply(this,arguments),f=+e.apply(this,arguments),p=n.apply(this,arguments)-Va,g=o.apply(this,arguments)-Va,m=qa(g-p),y=g>p;if(s||(s=c=l()),f<d&&(h=f,f=d,d=h),f>Ua)if(m>Ga-Ua)s.moveTo(f*za(p),f*Ha(p)),s.arc(0,0,f,p,g,!y),d>Ua&&(s.moveTo(d*za(g),d*Ha(g)),s.arc(0,0,d,g,p,y));else{var x,b,C=p,_=g,v=p,k=g,T=m,A=m,w=a.apply(this,arguments)/2,S=w>Ua&&(r?+r.apply(this,arguments):Wa(d*d+f*f)),B=Ra(qa(f-d)/2,+i.apply(this,arguments)),L=B,F=B;if(S>Ua){var M=Xa(S/d*Ha(w)),E=Xa(S/f*Ha(w));(T-=2*M)>Ua?(v+=M*=y?1:-1,k-=M):(T=0,v=k=(p+g)/2),(A-=2*E)>Ua?(C+=E*=y?1:-1,_-=E):(A=0,C=_=(p+g)/2)}var N=f*za(C),j=f*Ha(C),O=d*za(k),I=d*Ha(k);if(B>Ua){var D,q=f*za(_),$=f*Ha(_),z=d*za(v),P=d*Ha(v);if(m<Ya)if(D=function(t,e,i,r,n,o,a,s){var l=i-t,c=r-e,h=a-n,u=s-o,d=u*l-h*c;if(!(d*d<Ua))return[t+(d=(h*(e-o)-u*(t-n))/d)*l,e+d*c]}(N,j,z,P,q,$,O,I)){var R=N-D[0],H=j-D[1],W=q-D[0],U=$-D[1],Y=1/Ha(((u=(R*W+H*U)/(Wa(R*R+H*H)*Wa(W*W+U*U)))>1?0:u<-1?Ya:Math.acos(u))/2),V=Wa(D[0]*D[0]+D[1]*D[1]);L=Ra(B,(d-V)/(Y-1)),F=Ra(B,(f-V)/(Y+1))}else L=F=0}A>Ua?F>Ua?(x=ls(z,P,N,j,f,F,y),b=ls(q,$,O,I,f,F,y),s.moveTo(x.cx+x.x01,x.cy+x.y01),F<B?s.arc(x.cx,x.cy,F,$a(x.y01,x.x01),$a(b.y01,b.x01),!y):(s.arc(x.cx,x.cy,F,$a(x.y01,x.x01),$a(x.y11,x.x11),!y),s.arc(0,0,f,$a(x.cy+x.y11,x.cx+x.x11),$a(b.cy+b.y11,b.cx+b.x11),!y),s.arc(b.cx,b.cy,F,$a(b.y11,b.x11),$a(b.y01,b.x01),!y))):(s.moveTo(N,j),s.arc(0,0,f,C,_,!y)):s.moveTo(N,j),d>Ua&&T>Ua?L>Ua?(x=ls(O,I,q,$,d,-L,y),b=ls(N,j,z,P,d,-L,y),s.lineTo(x.cx+x.x01,x.cy+x.y01),L<B?s.arc(x.cx,x.cy,L,$a(x.y01,x.x01),$a(b.y01,b.x01),!y):(s.arc(x.cx,x.cy,L,$a(x.y01,x.x01),$a(x.y11,x.x11),!y),s.arc(0,0,d,$a(x.cy+x.y11,x.cx+x.x11),$a(b.cy+b.y11,b.cx+b.x11),y),s.arc(b.cx,b.cy,L,$a(b.y11,b.x11),$a(b.y01,b.x01),!y))):s.arc(0,0,d,k,v,y):s.lineTo(O,I)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var i=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+n.apply(this,arguments)+ +o.apply(this,arguments))/2-Ya/2;return[za(r)*i,Ha(r)*i]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Da(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Da(+t),c):e},c.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:Da(+t),c):i},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Da(+t),c):r},c.startAngle=function(t){return arguments.length?(n="function"==typeof t?t:Da(+t),c):n},c.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Da(+t),c):o},c.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Da(+t),c):a},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}es.prototype;Array.prototype.slice;function hs(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function us(t){this._context=t}function ds(t){return new us(t)}function fs(t){return t[0]}function ps(t){return t[1]}function gs(t,e){var i=Da(!0),r=null,n=ds,o=null,a=is(s);function s(s){var l,c,h,u=(s=hs(s)).length,d=!1;for(null==r&&(o=n(h=a())),l=0;l<=u;++l)!(l<u&&i(c=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+t(c,l,s),+e(c,l,s));if(h)return o=null,h+""||null}return t="function"==typeof t?t:void 0===t?fs:Da(t),e="function"==typeof e?e:void 0===e?ps:Da(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:Da(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:Da(+t),s):e},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:Da(!!t),s):i},s.curve=function(t){return arguments.length?(n=t,null!=r&&(o=n(r)),s):n},s.context=function(t){return arguments.length?(null==t?r=o=null:o=n(r=t),s):r},s}function ms(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function ys(t){return t}function xs(){var t=ys,e=ms,i=null,r=Da(0),n=Da(Ga),o=Da(0);function a(a){var s,l,c,h,u,d=(a=hs(a)).length,f=0,p=new Array(d),g=new Array(d),m=+r.apply(this,arguments),y=Math.min(Ga,Math.max(-Ga,n.apply(this,arguments)-m)),x=Math.min(Math.abs(y)/d,o.apply(this,arguments)),b=x*(y<0?-1:1);for(s=0;s<d;++s)(u=g[p[s]=s]=+t(a[s],s,a))>0&&(f+=u);for(null!=e?p.sort((function(t,i){return e(g[t],g[i])})):null!=i&&p.sort((function(t,e){return i(a[t],a[e])})),s=0,c=f?(y-d*b)/f:0;s<d;++s,m=h)l=p[s],h=m+((u=g[l])>0?u*c:0)+b,g[l]={data:a[l],index:s,value:u,startAngle:m,endAngle:h,padAngle:x};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Da(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,i=null,a):e},a.sort=function(t){return arguments.length?(i=t,e=null,a):i},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Da(+t),a):r},a.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:Da(+t),a):n},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Da(+t),a):o},a}function bs(){}function Cs(t,e,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+i)/6)}function _s(t){this._context=t}function vs(t){return new _s(t)}function ks(t){this._context=t}function Ts(t){return new ks(t)}function As(t){this._context=t}function ws(t){return new As(t)}us.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},_s.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Cs(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Cs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ks.prototype={areaStart:bs,areaEnd:bs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Cs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},As.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,r):this._context.moveTo(i,r);break;case 3:this._point=4;default:Cs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class Ss{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function Bs(t){return new Ss(t,!0)}function Ls(t){return new Ss(t,!1)}function Fs(t,e){this._basis=new _s(t),this._beta=e}Fs.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,i=t.length-1;if(i>0)for(var r,n=t[0],o=e[0],a=t[i]-n,s=e[i]-o,l=-1;++l<=i;)r=l/i,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+r*a),this._beta*e[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Ms=function t(e){function i(t){return 1===e?new _s(t):new Fs(t,e)}return i.beta=function(e){return t(+e)},i}(.85);function Es(t,e,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function Ns(t,e){this._context=t,this._k=(1-e)/6}Ns.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Es(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Es(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const js=function t(e){function i(t){return new Ns(t,e)}return i.tension=function(e){return t(+e)},i}(0);function Os(t,e){this._context=t,this._k=(1-e)/6}Os.prototype={areaStart:bs,areaEnd:bs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Es(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Is=function t(e){function i(t){return new Os(t,e)}return i.tension=function(e){return t(+e)},i}(0);function Ds(t,e){this._context=t,this._k=(1-e)/6}Ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Es(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const qs=function t(e){function i(t){return new Ds(t,e)}return i.tension=function(e){return t(+e)},i}(0);function $s(t,e,i){var r=t._x1,n=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ua){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Ua){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/h,a=(a*c+t._y1*t._l23_2a-i*t._l12_2a)/h}t._context.bezierCurveTo(r,n,o,a,t._x2,t._y2)}function zs(t,e){this._context=t,this._alpha=e}zs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:$s(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ps=function t(e){function i(t){return e?new zs(t,e):new Ns(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function Rs(t,e){this._context=t,this._alpha=e}Rs.prototype={areaStart:bs,areaEnd:bs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:$s(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Hs=function t(e){function i(t){return e?new Rs(t,e):new Os(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function Ws(t,e){this._context=t,this._alpha=e}Ws.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:$s(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Us=function t(e){function i(t){return e?new Ws(t,e):new Ds(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function Ys(t){this._context=t}function Vs(t){return new Ys(t)}function Gs(t){return t<0?-1:1}function Xs(t,e,i){var r=t._x1-t._x0,n=e-t._x1,o=(t._y1-t._y0)/(r||n<0&&-0),a=(i-t._y1)/(n||r<0&&-0),s=(o*n+a*r)/(r+n);return(Gs(o)+Gs(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Zs(t,e){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-e)/2:e}function Js(t,e,i){var r=t._x0,n=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,n+s*e,o-s,a-s*i,o,a)}function Qs(t){this._context=t}function Ks(t){this._context=new tl(t)}function tl(t){this._context=t}function el(t){return new Qs(t)}function il(t){return new Ks(t)}function rl(t){this._context=t}function nl(t){var e,i,r=t.length-1,n=new Array(r),o=new Array(r),a=new Array(r);for(n[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)n[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(n[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)i=n[e]/o[e-1],o[e]-=i,a[e]-=i*a[e-1];for(n[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)n[e]=(a[e]-n[e+1])/o[e];for(o[r-1]=(t[r]+n[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-n[e+1];return[n,o]}function ol(t){return new rl(t)}function al(t,e){this._context=t,this._t=e}function sl(t){return new al(t,.5)}function ll(t){return new al(t,0)}function cl(t){return new al(t,1)}function hl(t,e,i){this.k=t,this.x=e,this.y=i}Ys.prototype={areaStart:bs,areaEnd:bs,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Qs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Js(this,this._t0,Zs(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var i=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Js(this,Zs(this,i=Xs(this,t,e)),i);break;default:Js(this,this._t0,i=Xs(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=i}}},(Ks.prototype=Object.create(Qs.prototype)).point=function(t,e){Qs.prototype.point.call(this,e,t)},tl.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,i,r,n,o){this._context.bezierCurveTo(e,t,r,i,o,n)}},rl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===i)this._context.lineTo(t[1],e[1]);else for(var r=nl(t),n=nl(e),o=0,a=1;a<i;++o,++a)this._context.bezierCurveTo(r[0][o],n[0][o],r[1][o],n[1][o],t[a],e[a]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},al.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}}this._x=t,this._y=e}},hl.prototype={constructor:hl,scale:function(t){return 1===t?this:new hl(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new hl(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new hl(1,0,0);hl.prototype},3539:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var r=i(2453),n=i(3122);const o=class{constructor(){this.type=n.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=n.Z.ALL}is(t){return this.type===t}};const a=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new o}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=n.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:i,l:n}=t;void 0===e&&(t.h=r.A.channel.rgb2hsl(t,"h")),void 0===i&&(t.s=r.A.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=r.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:i,b:n}=t;void 0===e&&(t.r=r.A.channel.hsl2rgb(t,"r")),void 0===i&&(t.g=r.A.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=r.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),r.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),r.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),r.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),r.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),r.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),r.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},4886:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var r=i(3539),n=i(3122);const o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(o.re);if(!e)return;const i=e[1],n=parseInt(i,16),a=i.length,s=a%4==0,l=a>4,c=l?1:17,h=l?8:4,u=s?0:-1,d=l?255:15;return r.A.set({r:(n>>h*(u+3)&d)*c,g:(n>>h*(u+2)&d)*c,b:(n>>h*(u+1)&d)*c,a:s?(n&d)*c/255:1},t)},stringify:t=>{const{r:e,g:i,b:r,a:o}=t;return o<1?`#${n.Y[Math.round(e)]}${n.Y[Math.round(i)]}${n.Y[Math.round(r)]}${n.Y[Math.round(255*o)]}`:`#${n.Y[Math.round(e)]}${n.Y[Math.round(i)]}${n.Y[Math.round(r)]}`}},a=o;var s=i(2453);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,i]=e;switch(i){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const i=t.match(l.re);if(!i)return;const[,n,o,a,c,h]=i;return r.A.set({h:l._hue2deg(n),s:s.A.channel.clamp.s(parseFloat(o)),l:s.A.channel.clamp.l(parseFloat(a)),a:c?s.A.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{h:e,s:i,l:r,a:n}=t;return n<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(i)}%, ${s.A.lang.round(r)}%, ${n})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(i)}%, ${s.A.lang.round(r)}%)`}},c=l,h={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=h.colors[t];if(e)return a.parse(e)},stringify:t=>{const e=a.stringify(t);for(const i in h.colors)if(h.colors[i]===e)return i}},u=h,d={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const i=t.match(d.re);if(!i)return;const[,n,o,a,l,c,h,u,f]=i;return r.A.set({r:s.A.channel.clamp.r(o?2.55*parseFloat(n):parseFloat(n)),g:s.A.channel.clamp.g(l?2.55*parseFloat(a):parseFloat(a)),b:s.A.channel.clamp.b(h?2.55*parseFloat(c):parseFloat(c)),a:u?s.A.channel.clamp.a(f?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:i,b:r,a:n}=t;return n<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(i)}, ${s.A.lang.round(r)}, ${s.A.lang.round(n)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(i)}, ${s.A.lang.round(r)})`}},f=d,p={format:{keyword:h,hex:a,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=a.parse(t)||f.parse(t)||c.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(n.Z.HSL)||void 0===t.data.r?c.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?f.stringify(t):a.stringify(t)},g=p},3122:(t,e,i)=>{"use strict";i.d(e,{Y:()=>n,Z:()=>o});var r=i(2453);const n={};for(let a=0;a<=255;a++)n[a]=r.A.unit.dec2hex(a);const o={ALL:0,RGB:1,HSL:2}},5635:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(2453),n=i(4886);const o=(t,e,i)=>{const o=n.A.parse(t),a=o[e],s=r.A.channel.clamp[e](a+i);return a!==s&&(o[e]=s),n.A.stringify(o)}},8232:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(2453),n=i(4886);const o=(t,e)=>{const i=n.A.parse(t);for(const n in e)i[n]=r.A.channel.clamp[n](e[n]);return n.A.stringify(i)}},5263:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(5635);const n=(t,e)=>(0,r.A)(t,"l",-e)},3219:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var r=i(2453),n=i(4886);const o=t=>{const{r:e,g:i,b:o}=n.A.parse(t),a=.2126*r.A.channel.toLinear(e)+.7152*r.A.channel.toLinear(i)+.0722*r.A.channel.toLinear(o);return r.A.lang.round(a)},a=t=>o(t)>=.5,s=t=>!a(t)},8041:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(5635);const n=(t,e)=>(0,r.A)(t,"l",e)},5582:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var r=i(2453),n=i(3539),o=i(4886),a=i(8232);const s=(t,e,i=0,s=1)=>{if("number"!=typeof t)return(0,a.A)(t,{a:e});const l=n.A.set({r:r.A.channel.clamp.r(t),g:r.A.channel.clamp.g(e),b:r.A.channel.clamp.b(i),a:r.A.channel.clamp.a(s)});return o.A.stringify(l)}},2453:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const r={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t),hsl2rgb:({h:t,s:e,l:i},n)=>{if(!e)return 2.55*i;t/=360,e/=100;const o=(i/=100)<.5?i*(1+e):i+e-i*e,a=2*i-o;switch(n){case"r":return 255*r.hue2rgb(a,o,t+1/3);case"g":return 255*r.hue2rgb(a,o,t);case"b":return 255*r.hue2rgb(a,o,t-1/3)}},rgb2hsl:({r:t,g:e,b:i},r)=>{t/=255,e/=255,i/=255;const n=Math.max(t,e,i),o=Math.min(t,e,i),a=(n+o)/2;if("l"===r)return 100*a;if(n===o)return 0;const s=n-o;if("s"===r)return 100*(a>.5?s/(2-n-o):s/(n+o));switch(n){case t:return 60*((e-i)/s+(e<i?6:0));case e:return 60*((i-t)/s+2);case i:return 60*((t-e)/s+4);default:return-1}}},n={channel:r,lang:{clamp:(t,e,i)=>e>i?Math.min(e,Math.max(i,t)):Math.min(i,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},127:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});const r=function(){this.__data__=[],this.size=0};var n=i(6984);const o=function(t,e){for(var i=t.length;i--;)if((0,n.A)(t[i][0],e))return i;return-1};var a=Array.prototype.splice;const s=function(t){var e=this.__data__,i=o(e,t);return!(i<0)&&(i==e.length-1?e.pop():a.call(e,i,1),--this.size,!0)};const l=function(t){var e=this.__data__,i=o(e,t);return i<0?void 0:e[i][1]};const c=function(t){return o(this.__data__,t)>-1};const h=function(t,e){var i=this.__data__,r=o(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this};function u(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=s,u.prototype.get=l,u.prototype.has=c,u.prototype.set=h;const d=u},8335:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(8744),n=i(1917);const o=(0,r.A)(n.A,"Map")},9471:(t,e,i)=>{"use strict";i.d(e,{A:()=>k});const r=(0,i(8744).A)(Object,"create");const n=function(){this.__data__=r?r(null):{},this.size=0};const o=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var a=Object.prototype.hasOwnProperty;const s=function(t){var e=this.__data__;if(r){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return a.call(e,t)?e[t]:void 0};var l=Object.prototype.hasOwnProperty;const c=function(t){var e=this.__data__;return r?void 0!==e[t]:l.call(e,t)};const h=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this};function u(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=c,u.prototype.set=h;const d=u;var f=i(127),p=i(8335);const g=function(){this.size=0,this.__data__={hash:new d,map:new(p.A||f.A),string:new d}};const m=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const y=function(t,e){var i=t.__data__;return m(e)?i["string"==typeof e?"string":"hash"]:i.map};const x=function(t){var e=y(this,t).delete(t);return this.size-=e?1:0,e};const b=function(t){return y(this,t).get(t)};const C=function(t){return y(this,t).has(t)};const _=function(t,e){var i=y(this,t),r=i.size;return i.set(t,e),this.size+=i.size==r?0:1,this};function v(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}v.prototype.clear=g,v.prototype.delete=x,v.prototype.get=b,v.prototype.has=C,v.prototype.set=_;const k=v},9857:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(8744),n=i(1917);const o=(0,r.A)(n.A,"Set")},1754:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var r=i(127);const n=function(){this.__data__=new r.A,this.size=0};const o=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i};const a=function(t){return this.__data__.get(t)};const s=function(t){return this.__data__.has(t)};var l=i(8335),c=i(9471);const h=function(t,e){var i=this.__data__;if(i instanceof r.A){var n=i.__data__;if(!l.A||n.length<199)return n.push([t,e]),this.size=++i.size,this;i=this.__data__=new c.A(n)}return i.set(t,e),this.size=i.size,this};function u(t){var e=this.__data__=new r.A(t);this.size=e.size}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=h;const d=u},241:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=i(1917).A.Symbol},3988:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=i(1917).A.Uint8Array},3607:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});const r=function(t,e){for(var i=-1,r=Array(t);++i<t;)r[i]=e(i);return r};var n=i(2274),o=i(2049),a=i(9912),s=i(5353),l=i(3858),c=Object.prototype.hasOwnProperty;const h=function(t,e){var i=(0,o.A)(t),h=!i&&(0,n.A)(t),u=!i&&!h&&(0,a.A)(t),d=!i&&!h&&!u&&(0,l.A)(t),f=i||h||u||d,p=f?r(t.length,String):[],g=p.length;for(var m in t)!e&&!c.call(t,m)||f&&("length"==m||u&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||(0,s.A)(m,g))||p.push(m);return p}},2851:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var r=i(2528),n=i(6984),o=Object.prototype.hasOwnProperty;const a=function(t,e,i){var a=t[e];o.call(t,e)&&(0,n.A)(a,i)&&(void 0!==i||e in t)||(0,r.A)(t,e,i)}},2528:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(4171);const n=function(t,e,i){"__proto__"==e&&r.A?(0,r.A)(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}},4574:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){return function(e,i,r){for(var n=-1,o=Object(e),a=r(e),s=a.length;s--;){var l=a[t?s:++n];if(!1===i(o[l],l,o))break}return e}}()},8496:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var r=i(241),n=Object.prototype,o=n.hasOwnProperty,a=n.toString,s=r.A?r.A.toStringTag:void 0;const l=function(t){var e=o.call(t,s),i=t[s];try{t[s]=void 0;var r=!0}catch(l){}var n=a.call(t);return r&&(e?t[s]=i:delete t[s]),n};var c=Object.prototype.toString;const h=function(t){return c.call(t)};var u=r.A?r.A.toStringTag:void 0;const d=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?l(t):h(t)}},1852:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var r=i(7271);const n=(0,i(367).A)(Object.keys,Object);var o=Object.prototype.hasOwnProperty;const a=function(t){if(!(0,r.A)(t))return n(t);var e=[];for(var i in Object(t))o.call(t,i)&&"constructor"!=i&&e.push(i);return e}},4326:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var r=i(9008),n=i(6875),o=i(7525);const a=function(t,e){return(0,o.A)((0,n.A)(t,e,r.A),t+"")}},2789:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){return function(e){return t(e)}}},565:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(3988);const n=function(t){var e=new t.constructor(t.byteLength);return new r.A(e).set(new r.A(t)),e}},154:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var r=i(1917),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===n?r.A.Buffer:void 0,s=a?a.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var i=t.length,r=s?s(i):new t.constructor(i);return t.copy(r),r}},1801:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(565);const n=function(t,e){var i=e?(0,r.A)(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}},9759:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t,e){var i=-1,r=t.length;for(e||(e=Array(r));++i<r;)e[i]=t[i];return e}},2031:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(2851),n=i(2528);const o=function(t,e,i,o){var a=!i;i||(i={});for(var s=-1,l=e.length;++s<l;){var c=e[s],h=o?o(i[c],t[c],c,i,t):void 0;void 0===h&&(h=t[c]),a?(0,n.A)(i,c,h):(0,r.A)(i,c,h)}return i}},4171:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(8744);const n=function(){try{var t=(0,r.A)(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()},2136:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},8744:(t,e,i)=>{"use strict";i.d(e,{A:()=>x});var r=i(9610);const n=i(1917).A["__core-js_shared__"];var o,a=(o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";const s=function(t){return!!a&&a in t};var l=i(3149),c=i(1121),h=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,f=u.toString,p=d.hasOwnProperty,g=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(t){return!(!(0,l.A)(t)||s(t))&&((0,r.A)(t)?g:h).test((0,c.A)(t))};const y=function(t,e){return null==t?void 0:t[e]};const x=function(t,e){var i=y(t,e);return m(i)?i:void 0}},5647:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=(0,i(367).A)(Object.getPrototypeOf,Object)},9779:(t,e,i)=>{"use strict";i.d(e,{A:()=>k});var r=i(8744),n=i(1917);const o=(0,r.A)(n.A,"DataView");var a=i(8335);const s=(0,r.A)(n.A,"Promise");var l=i(9857);const c=(0,r.A)(n.A,"WeakMap");var h=i(8496),u=i(1121),d="[object Map]",f="[object Promise]",p="[object Set]",g="[object WeakMap]",m="[object DataView]",y=(0,u.A)(o),x=(0,u.A)(a.A),b=(0,u.A)(s),C=(0,u.A)(l.A),_=(0,u.A)(c),v=h.A;(o&&v(new o(new ArrayBuffer(1)))!=m||a.A&&v(new a.A)!=d||s&&v(s.resolve())!=f||l.A&&v(new l.A)!=p||c&&v(new c)!=g)&&(v=function(t){var e=(0,h.A)(t),i="[object Object]"==e?t.constructor:void 0,r=i?(0,u.A)(i):"";if(r)switch(r){case y:return m;case x:return d;case b:return f;case C:return p;case _:return g}return e});const k=v},8598:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var r=i(3149),n=Object.create;const o=function(){function t(){}return function(e){if(!(0,r.A)(e))return{};if(n)return n(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}}();var a=i(5647),s=i(7271);const l=function(t){return"function"!=typeof t.constructor||(0,s.A)(t)?{}:o((0,a.A)(t))}},5353:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=/^(?:0|[1-9]\d*)$/;const n=function(t,e){var i=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&r.test(t))&&t>-1&&t%1==0&&t<e}},6832:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var r=i(6984),n=i(8446),o=i(5353),a=i(3149);const s=function(t,e,i){if(!(0,a.A)(i))return!1;var s=typeof e;return!!("number"==s?(0,n.A)(i)&&(0,o.A)(e,i.length):"string"==s&&e in i)&&(0,r.A)(i[e],t)}},7271:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=Object.prototype;const n=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},4841:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var r=i(2136),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===n&&r.A.process;const s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(e){}}()},367:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t,e){return function(i){return t(e(i))}}},6875:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});const r=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)};var n=Math.max;const o=function(t,e,i){return e=n(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=n(o.length-e,0),l=Array(s);++a<s;)l[a]=o[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=o[a];return c[e]=i(l),r(t,this,c)}}},1917:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(2136),n="object"==typeof self&&self&&self.Object===Object&&self;const o=r.A||n||Function("return this")()},7525:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var r=i(9142),n=i(4171),o=i(9008);const a=n.A?function(t,e){return(0,n.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,r.A)(e),writable:!0})}:o.A;var s=Date.now;const l=function(t){var e=0,i=0;return function(){var r=s(),n=16-(r-i);if(i=r,n>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(a)},1121:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=Function.prototype.toString;const n=function(t){if(null!=t){try{return r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},9142:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){return function(){return t}}},6984:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t,e){return t===e||t!=t&&e!=e}},9008:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){return t}},2274:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var r=i(8496),n=i(3098);const o=function(t){return(0,n.A)(t)&&"[object Arguments]"==(0,r.A)(t)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;const c=o(function(){return arguments}())?o:function(t){return(0,n.A)(t)&&s.call(t,"callee")&&!l.call(t,"callee")}},2049:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=Array.isArray},8446:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(9610),n=i(5254);const o=function(t){return null!=t&&(0,n.A)(t.length)&&!(0,r.A)(t)}},3533:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(8446),n=i(3098);const o=function(t){return(0,n.A)(t)&&(0,r.A)(t)}},9912:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var r=i(1917);const n=function(){return!1};var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=a&&a.exports===o?r.A.Buffer:void 0;const l=(s?s.isBuffer:void 0)||n},6401:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var r=i(1852),n=i(9779),o=i(2274),a=i(2049),s=i(8446),l=i(9912),c=i(7271),h=i(3858),u=Object.prototype.hasOwnProperty;const d=function(t){if(null==t)return!0;if((0,s.A)(t)&&((0,a.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.A)(t)||(0,h.A)(t)||(0,o.A)(t)))return!t.length;var e=(0,n.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,c.A)(t))return!(0,r.A)(t).length;for(var i in t)if(u.call(t,i))return!1;return!0}},9610:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(8496),n=i(3149);const o=function(t){if(!(0,n.A)(t))return!1;var e=(0,r.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5254:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3149:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3098:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});const r=function(t){return null!=t&&"object"==typeof t}},4963:(t,e,i)=>{"use strict";i.d(e,{A:()=>u});var r=i(8496),n=i(5647),o=i(3098),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,h=l.call(Object);const u=function(t){if(!(0,o.A)(t)||"[object Object]"!=(0,r.A)(t))return!1;var e=(0,n.A)(t);if(null===e)return!0;var i=c.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&l.call(i)==h}},3858:(t,e,i)=>{"use strict";i.d(e,{A:()=>u});var r=i(8496),n=i(5254),o=i(3098),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;const s=function(t){return(0,o.A)(t)&&(0,n.A)(t.length)&&!!a[(0,r.A)(t)]};var l=i(2789),c=i(4841),h=c.A&&c.A.isTypedArray;const u=h?(0,l.A)(h):s},5615:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var r=i(3607),n=i(3149),o=i(7271);const a=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e};var s=Object.prototype.hasOwnProperty;const l=function(t){if(!(0,n.A)(t))return a(t);var e=(0,o.A)(t),i=[];for(var r in t)("constructor"!=r||!e&&s.call(t,r))&&i.push(r);return i};var c=i(8446);const h=function(t){return(0,c.A)(t)?(0,r.A)(t,!0):l(t)}},6632:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var r=i(9471);function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var i=function(){var r=arguments,n=e?e.apply(this,r):r[0],o=i.cache;if(o.has(n))return o.get(n);var a=t.apply(this,r);return i.cache=o.set(n,a)||o,a};return i.cache=new(n.Cache||r.A),i}n.Cache=r.A;const o=n},8879:(t,e,i)=>{"use strict";i.d(e,{A:()=>B});var r=i(1754),n=i(2528),o=i(6984);const a=function(t,e,i){(void 0!==i&&!(0,o.A)(t[e],i)||void 0===i&&!(e in t))&&(0,n.A)(t,e,i)};var s=i(4574),l=i(154),c=i(1801),h=i(9759),u=i(8598),d=i(2274),f=i(2049),p=i(3533),g=i(9912),m=i(9610),y=i(3149),x=i(4963),b=i(3858);const C=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var _=i(2031),v=i(5615);const k=function(t){return(0,_.A)(t,(0,v.A)(t))};const T=function(t,e,i,r,n,o,s){var _=C(t,i),v=C(e,i),T=s.get(v);if(T)a(t,i,T);else{var A=o?o(_,v,i+"",t,e,s):void 0,w=void 0===A;if(w){var S=(0,f.A)(v),B=!S&&(0,g.A)(v),L=!S&&!B&&(0,b.A)(v);A=v,S||B||L?(0,f.A)(_)?A=_:(0,p.A)(_)?A=(0,h.A)(_):B?(w=!1,A=(0,l.A)(v,!0)):L?(w=!1,A=(0,c.A)(v,!0)):A=[]:(0,x.A)(v)||(0,d.A)(v)?(A=_,(0,d.A)(_)?A=k(_):(0,y.A)(_)&&!(0,m.A)(_)||(A=(0,u.A)(v))):w=!1}w&&(s.set(v,A),n(A,v,r,o,s),s.delete(v)),a(t,i,A)}};const A=function t(e,i,n,o,l){e!==i&&(0,s.A)(i,(function(s,c){if(l||(l=new r.A),(0,y.A)(s))T(e,i,c,n,t,o,l);else{var h=o?o(C(e,c),s,c+"",e,i,l):void 0;void 0===h&&(h=s),a(e,c,h)}}),v.A)};var w=i(4326),S=i(6832);const B=function(t){return(0,w.A)((function(e,i){var r=-1,n=i.length,o=n>1?i[n-1]:void 0,a=n>2?i[2]:void 0;for(o=t.length>3&&"function"==typeof o?(n--,o):void 0,a&&(0,S.A)(i[0],i[1],a)&&(o=n<3?void 0:o,n=1),e=Object(e);++r<n;){var s=i[r];s&&t(e,s,r,o)}return e}))}((function(t,e,i){A(t,e,i)}))},6257:(t,e,i)=>{"use strict";i.d(e,{A:()=>Ui,B:()=>Rt,C:()=>ve,D:()=>_e,E:()=>jt,F:()=>je,G:()=>Tt,H:()=>At,I:()=>ue,J:()=>ht,K:()=>qi,L:()=>Ni,M:()=>Te,N:()=>co,Z:()=>ee,a:()=>Fi,b:()=>Li,c:()=>Ii,d:()=>pt,e:()=>St,f:()=>te,g:()=>Bi,h:()=>ye,i:()=>xi,j:()=>me,k:()=>ce,l:()=>st,m:()=>yt,n:()=>oe,o:()=>bi,p:()=>Di,q:()=>Mi,r:()=>wt,s:()=>Si,t:()=>Ei,u:()=>ke,v:()=>wi,w:()=>pe,x:()=>xt,y:()=>de,z:()=>zi});var r=i(513),n=i(4353),o=i(6750),a=i(6312),s=i(2838),l=i(4886),c=i(8232);const h=(t,e)=>{const i=l.A.parse(t),r={};for(const n in e)e[n]&&(r[n]=i[n]+e[n]);return(0,c.A)(t,r)};var u=i(5582);const d=(t,e,i=50)=>{const{r:r,g:n,b:o,a:a}=l.A.parse(t),{r:s,g:c,b:h,a:d}=l.A.parse(e),f=i/100,p=2*f-1,g=a-d,m=((p*g==-1?p:(p+g)/(1+p*g))+1)/2,y=1-m,x=r*m+s*y,b=n*m+c*y,C=o*m+h*y,_=a*f+d*(1-f);return(0,u.A)(x,b,C,_)},f=(t,e=100)=>{const i=l.A.parse(t);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,d(i,t,e)};var p=i(5263),g=i(8041),m=i(3219),y=i(6632),x=i(8879),b="comm",C="rule",_="decl",v=Math.abs,k=String.fromCharCode;Object.assign;function T(t){return t.trim()}function A(t,e,i){return t.replace(e,i)}function w(t,e,i){return t.indexOf(e,i)}function S(t,e){return 0|t.charCodeAt(e)}function B(t,e,i){return t.slice(e,i)}function L(t){return t.length}function F(t,e){return e.push(t),t}function M(t,e){for(var i="",r=0;r<t.length;r++)i+=e(t[r],r,t,e)||"";return i}function E(t,e,i,r){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case _:return t.return=t.return||t.value;case b:return"";case"@keyframes":return t.return=t.value+"{"+M(t.children,r)+"}";case C:if(!L(t.value=t.props.join(",")))return""}return L(i=M(t.children,r))?t.return=t.value+"{"+i+"}":""}var N=1,j=1,O=0,I=0,D=0,q="";function $(t,e,i,r,n,o,a,s){return{value:t,root:e,parent:i,type:r,props:n,children:o,line:N,column:j,length:a,return:"",siblings:s}}function z(){return D=I>0?S(q,--I):0,j--,10===D&&(j=1,N--),D}function P(){return D=I<O?S(q,I++):0,j++,10===D&&(j=1,N++),D}function R(){return S(q,I)}function H(){return I}function W(t,e){return B(q,t,e)}function U(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Y(t){return N=j=1,O=L(q=t),I=0,[]}function V(t){return q="",t}function G(t){return T(W(I-1,J(91===t?t+2:40===t?t+1:t)))}function X(t){for(;(D=R())&&D<33;)P();return U(t)>2||U(D)>3?"":" "}function Z(t,e){for(;--e&&P()&&!(D<48||D>102||D>57&&D<65||D>70&&D<97););return W(t,H()+(e<6&&32==R()&&32==P()))}function J(t){for(;P();)switch(D){case t:return I;case 34:case 39:34!==t&&39!==t&&J(D);break;case 40:41===t&&J(t);break;case 92:P()}return I}function Q(t,e){for(;P()&&t+D!==57&&(t+D!==84||47!==R()););return"/*"+W(e,I-1)+"*"+k(47===t?t:P())}function K(t){for(;!U(R());)P();return W(t,I)}function tt(t){return V(et("",null,null,null,[""],t=Y(t),0,[0],t))}function et(t,e,i,r,n,o,a,s,l){for(var c=0,h=0,u=a,d=0,f=0,p=0,g=1,m=1,y=1,x=0,b="",C=n,_=o,T=r,B=b;m;)switch(p=x,x=P()){case 40:if(108!=p&&58==S(B,u-1)){-1!=w(B+=A(G(x),"&","&\f"),"&\f",v(c?s[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:B+=G(x);break;case 9:case 10:case 13:case 32:B+=X(p);break;case 92:B+=Z(H()-1,7);continue;case 47:switch(R()){case 42:case 47:F(rt(Q(P(),H()),e,i,l),l);break;default:B+="/"}break;case 123*g:s[c++]=L(B)*y;case 125*g:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+h:-1==y&&(B=A(B,/\f/g,"")),f>0&&L(B)-u&&F(f>32?nt(B+";",r,i,u-1,l):nt(A(B," ","")+";",r,i,u-2,l),l);break;case 59:B+=";";default:if(F(T=it(B,e,i,c,h,n,s,b,C=[],_=[],u,o),o),123===x)if(0===h)et(B,e,T,T,C,o,u,s,_);else switch(99===d&&110===S(B,3)?100:d){case 100:case 108:case 109:case 115:et(t,T,T,r&&F(it(t,T,T,0,0,n,s,b,n,C=[],u,_),_),n,_,u,s,r?C:_);break;default:et(B,T,T,T,[""],_,0,s,_)}}c=h=f=0,g=y=1,b=B="",u=a;break;case 58:u=1+L(B),f=p;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==z())continue;switch(B+=k(x),x*g){case 38:y=h>0?1:(B+="\f",-1);break;case 44:s[c++]=(L(B)-1)*y,y=1;break;case 64:45===R()&&(B+=G(P())),d=R(),h=u=L(b=B+=K(H())),x++;break;case 45:45===p&&2==L(B)&&(g=0)}}return o}function it(t,e,i,r,n,o,a,s,l,c,h,u){for(var d=n-1,f=0===n?o:[""],p=function(t){return t.length}(f),g=0,m=0,y=0;g<r;++g)for(var x=0,b=B(t,d+1,d=v(m=a[g])),_=t;x<p;++x)(_=T(m>0?f[x]+" "+b:A(b,/&\f/g,f[x])))&&(l[y++]=_);return $(t,e,i,0===n?C:s,l,c,h,u)}function rt(t,e,i,r){return $(t,e,i,b,k(D),B(t,2,-2),0,r)}function nt(t,e,i,r,n){return $(t,e,i,_,B(t,0,r),B(t,r+1,-1),r,n)}var ot=i(6401);const at={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},st={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},lt=function(t="fatal"){let e=at.fatal;"string"==typeof t?(t=t.toLowerCase())in at&&(e=at[t]):"number"==typeof t&&(e=t),st.trace=()=>{},st.debug=()=>{},st.info=()=>{},st.warn=()=>{},st.error=()=>{},st.fatal=()=>{},e<=at.fatal&&(st.fatal=console.error?console.error.bind(console,ct("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",ct("FATAL"))),e<=at.error&&(st.error=console.error?console.error.bind(console,ct("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",ct("ERROR"))),e<=at.warn&&(st.warn=console.warn?console.warn.bind(console,ct("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",ct("WARN"))),e<=at.info&&(st.info=console.info?console.info.bind(console,ct("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",ct("INFO"))),e<=at.debug&&(st.debug=console.debug?console.debug.bind(console,ct("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",ct("DEBUG"))),e<=at.trace&&(st.trace=console.debug?console.debug.bind(console,ct("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",ct("TRACE")))},ct=t=>`%c${n().format("ss.SSS")} : ${t} : `,ht=/<br\s*\/?>/gi,ut=(()=>{let t=!1;return()=>{t||(!function(){const t="data-temp-href-target";s.addHook("beforeSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")||"")})),s.addHook("afterSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)||""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}(),t=!0)}})();const dt=t=>{ut();return s.sanitize(t)},ft=(t,e)=>{var i;if(!1!==(null==(i=e.flowchart)?void 0:i.htmlLabels)){const i=e.securityLevel;"antiscript"===i||"strict"===i?t=dt(t):"loose"!==i&&(t=(t=(t=mt(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),t=gt(t))}return t},pt=(t,e)=>t?t=e.dompurifyConfig?s.sanitize(ft(t,e),e.dompurifyConfig).toString():s.sanitize(ft(t,e),{FORBID_TAGS:["style"]}).toString():t,gt=t=>t.replace(/#br#/g,"<br/>"),mt=t=>t.replace(ht,"#br#"),yt=t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),xt=function(t){const e=t.split(/(,)/),i=[];for(let r=0;r<e.length;r++){let t=e[r];if(","===t&&r>0&&r+1<e.length){const n=e[r-1],o=e[r+1];Ct(n,o)&&(t=n+","+o,r++,i.pop())}i.push(_t(t))}return i.join("")},bt=(t,e)=>Math.max(0,t.split(e).length-1),Ct=(t,e)=>{const i=bt(t,"~"),r=bt(e,"~");return 1===i&&1===r},_t=t=>{const e=bt(t,"~");let i=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),i=!0);const r=[...t];let n=r.indexOf("~"),o=r.lastIndexOf("~");for(;-1!==n&&-1!==o&&n!==o;)r[n]="<",r[o]=">",n=r.indexOf("~"),o=r.lastIndexOf("~");return i&&r.unshift("~"),r.join("")},vt=()=>void 0!==window.MathMLElement,kt=/\$\$(.*)\$\$/g,Tt=t=>{var e;return((null==(e=t.match(kt))?void 0:e.length)??0)>0},At=async(t,e)=>{t=await wt(t,e);const i=document.createElement("div");i.innerHTML=t,i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0";const r=document.querySelector("body");null==r||r.insertAdjacentElement("beforeend",i);const n={width:i.clientWidth,height:i.clientHeight};return i.remove(),n},wt=async(t,e)=>{if(!Tt(t))return t;if(!vt()&&!e.legacyMathML)return t.replace(kt,"MathML is unsupported in this environment.");const{default:r}=await i.e(2130).then(i.bind(i,2130));return t.split(ht).map((t=>Tt(t)?`\n <div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">\n ${t}\n </div>\n `:`<div>${t}</div>`)).join("").replace(kt,((t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:vt()?"mathml":"htmlAndMathml"}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,"")))},St={getRows:t=>{if(!t)return[""];return mt(t).replace(/\\n/g,"#br#").split("#br#")},sanitizeText:pt,sanitizeTextOrArray:(t,e)=>"string"==typeof t?pt(t,e):t.flat().map((t=>pt(t,e))),hasBreaks:t=>ht.test(t),splitBreaks:t=>t.split(ht),lineBreakRegex:ht,removeScript:dt,getUrl:t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},evaluate:yt,getMax:function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)},getMin:function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}},Bt=(t,e)=>h(t,e?{s:-40,l:10}:{s:-40,l:-10}),Lt="#ffffff",Ft="#f2f2f2";let Mt=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var t,e,i,r,n,o,a,s,l,c,u;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||h(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||h(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||f(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||f(this.tertiaryColor),this.lineColor=this.lineColor||f(this.background),this.arrowheadColor=this.arrowheadColor||f(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,p.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,p.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||f(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,g.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||h(this.primaryColor,{h:30}),this.cScale4=this.cScale4||h(this.primaryColor,{h:60}),this.cScale5=this.cScale5||h(this.primaryColor,{h:90}),this.cScale6=this.cScale6||h(this.primaryColor,{h:120}),this.cScale7=this.cScale7||h(this.primaryColor,{h:150}),this.cScale8=this.cScale8||h(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||h(this.primaryColor,{h:270}),this.cScale10=this.cScale10||h(this.primaryColor,{h:300}),this.cScale11=this.cScale11||h(this.primaryColor,{h:330}),this.darkMode)for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["cScale"+h]=(0,p.A)(this["cScale"+h],75);else for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["cScale"+h]=(0,p.A)(this["cScale"+h],25);for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["cScaleInv"+h]=this["cScaleInv"+h]||f(this["cScale"+h]);for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this.darkMode?this["cScalePeer"+h]=this["cScalePeer"+h]||(0,g.A)(this["cScale"+h],10):this["cScalePeer"+h]=this["cScalePeer"+h]||(0,p.A)(this["cScale"+h],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["cScaleLabel"+h]=this["cScaleLabel"+h]||this.scaleLabelColor;const d=this.darkMode?-4:-1;for(let f=0;f<5;f++)this["surface"+f]=this["surface"+f]||h(this.mainBkg,{h:180,s:-15,l:d*(5+3*f)}),this["surfacePeer"+f]=this["surfacePeer"+f]||h(this.mainBkg,{h:180,s:-15,l:d*(8+3*f)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||h(this.primaryColor,{h:64}),this.fillType3=this.fillType3||h(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||h(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||h(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||h(this.primaryColor,{h:128}),this.fillType7=this.fillType7||h(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||h(this.primaryColor,{l:-10}),this.pie5=this.pie5||h(this.secondaryColor,{l:-10}),this.pie6=this.pie6||h(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||h(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||h(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||h(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||h(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||h(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||h(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||h(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||h(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||h(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||h(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||h(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||h(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,m.A)(this.quadrant1Fill)?(0,g.A)(this.quadrant1Fill):(0,p.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(i=this.xyChart)?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(r=this.xyChart)?void 0:r.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(n=this.xyChart)?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(o=this.xyChart)?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(a=this.xyChart)?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(c=this.xyChart)?void 0:c.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(u=this.xyChart)?void 0:u.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,p.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||h(this.primaryColor,{h:-30}),this.git4=this.git4||h(this.primaryColor,{h:-60}),this.git5=this.git5||h(this.primaryColor,{h:-90}),this.git6=this.git6||h(this.primaryColor,{h:60}),this.git7=this.git7||h(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,g.A)(this.git0,25),this.git1=(0,g.A)(this.git1,25),this.git2=(0,g.A)(this.git2,25),this.git3=(0,g.A)(this.git3,25),this.git4=(0,g.A)(this.git4,25),this.git5=(0,g.A)(this.git5,25),this.git6=(0,g.A)(this.git6,25),this.git7=(0,g.A)(this.git7,25)):(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)),this.gitInv0=this.gitInv0||f(this.git0),this.gitInv1=this.gitInv1||f(this.git1),this.gitInv2=this.gitInv2||f(this.git2),this.gitInv3=this.gitInv3||f(this.git3),this.gitInv4=this.gitInv4||f(this.git4),this.gitInv5=this.gitInv5||f(this.git5),this.gitInv6=this.gitInv6||f(this.git6),this.gitInv7=this.gitInv7||f(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ft}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};let Et=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,g.A)(this.primaryColor,16),this.tertiaryColor=h(this.primaryColor,{h:-160}),this.primaryBorderColor=f(this.background),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=f(this.primaryColor),this.secondaryTextColor=f(this.secondaryColor),this.tertiaryTextColor=f(this.tertiaryColor),this.lineColor=f(this.background),this.textColor=f(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,g.A)(f("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=(0,u.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,p.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,p.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,u.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,u.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,e,i,r,n,o,a,s,l,c,u;this.secondBkg=(0,g.A)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,g.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,g.A)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=h(this.primaryColor,{h:64}),this.fillType3=h(this.secondaryColor,{h:64}),this.fillType4=h(this.primaryColor,{h:-64}),this.fillType5=h(this.secondaryColor,{h:-64}),this.fillType6=h(this.primaryColor,{h:128}),this.fillType7=h(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||h(this.primaryColor,{h:30}),this.cScale4=this.cScale4||h(this.primaryColor,{h:60}),this.cScale5=this.cScale5||h(this.primaryColor,{h:90}),this.cScale6=this.cScale6||h(this.primaryColor,{h:120}),this.cScale7=this.cScale7||h(this.primaryColor,{h:150}),this.cScale8=this.cScale8||h(this.primaryColor,{h:210}),this.cScale9=this.cScale9||h(this.primaryColor,{h:270}),this.cScale10=this.cScale10||h(this.primaryColor,{h:300}),this.cScale11=this.cScale11||h(this.primaryColor,{h:330});for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["cScaleInv"+h]=this["cScaleInv"+h]||f(this["cScale"+h]);for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["cScalePeer"+h]=this["cScalePeer"+h]||(0,g.A)(this["cScale"+h],10);for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||h(this.mainBkg,{h:30,s:-30,l:-(4*d-10)}),this["surfacePeer"+d]=this["surfacePeer"+d]||h(this.mainBkg,{h:30,s:-30,l:-(4*d-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["cScaleLabel"+h]=this["cScaleLabel"+h]||this.scaleLabelColor;for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["pie"+h]=this["cScale"+h];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||h(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||h(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||h(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||h(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||h(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||h(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,m.A)(this.quadrant1Fill)?(0,g.A)(this.quadrant1Fill):(0,p.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(i=this.xyChart)?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(r=this.xyChart)?void 0:r.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(n=this.xyChart)?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(o=this.xyChart)?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(a=this.xyChart)?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(c=this.xyChart)?void 0:c.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(u=this.xyChart)?void 0:u.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,p.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,g.A)(this.secondaryColor,20),this.git1=(0,g.A)(this.pie2||this.secondaryColor,20),this.git2=(0,g.A)(this.pie3||this.tertiaryColor,20),this.git3=(0,g.A)(this.pie4||h(this.primaryColor,{h:-30}),20),this.git4=(0,g.A)(this.pie5||h(this.primaryColor,{h:-60}),20),this.git5=(0,g.A)(this.pie6||h(this.primaryColor,{h:-90}),10),this.git6=(0,g.A)(this.pie7||h(this.primaryColor,{h:60}),10),this.git7=(0,g.A)(this.pie8||h(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||f(this.git0),this.gitInv1=this.gitInv1||f(this.git1),this.gitInv2=this.gitInv2||f(this.git2),this.gitInv3=this.gitInv3||f(this.git3),this.gitInv4=this.gitInv4||f(this.git4),this.gitInv5=this.gitInv5||f(this.git5),this.gitInv6=this.gitInv6||f(this.git6),this.gitInv7=this.gitInv7||f(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||f(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||f(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,g.A)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,g.A)(this.background,2)}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};let Nt=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=h(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=h(this.primaryColor,{h:-160}),this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=f(this.primaryColor),this.secondaryTextColor=f(this.secondaryColor),this.tertiaryTextColor=f(this.tertiaryColor),this.lineColor=f(this.background),this.textColor=f(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=(0,u.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,e,i,r,n,o,a,s,l,c,u;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||h(this.primaryColor,{h:30}),this.cScale4=this.cScale4||h(this.primaryColor,{h:60}),this.cScale5=this.cScale5||h(this.primaryColor,{h:90}),this.cScale6=this.cScale6||h(this.primaryColor,{h:120}),this.cScale7=this.cScale7||h(this.primaryColor,{h:150}),this.cScale8=this.cScale8||h(this.primaryColor,{h:210}),this.cScale9=this.cScale9||h(this.primaryColor,{h:270}),this.cScale10=this.cScale10||h(this.primaryColor,{h:300}),this.cScale11=this.cScale11||h(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,p.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,p.A)(this.tertiaryColor,40);for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["cScale"+h]=(0,p.A)(this["cScale"+h],10),this["cScalePeer"+h]=this["cScalePeer"+h]||(0,p.A)(this["cScale"+h],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||h(this["cScale"+d],{h:180});for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||h(this.mainBkg,{h:30,l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||h(this.mainBkg,{h:30,l:-(7+5*d)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||f(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||f(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=(0,g.A)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=h(this.primaryColor,{h:64}),this.fillType3=h(this.secondaryColor,{h:64}),this.fillType4=h(this.primaryColor,{h:-64}),this.fillType5=h(this.secondaryColor,{h:-64}),this.fillType6=h(this.primaryColor,{h:128}),this.fillType7=h(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||h(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||h(this.primaryColor,{l:-10}),this.pie5=this.pie5||h(this.secondaryColor,{l:-30}),this.pie6=this.pie6||h(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||h(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||h(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||h(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||h(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||h(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||h(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||h(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||h(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||h(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||h(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||h(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||h(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,m.A)(this.quadrant1Fill)?(0,g.A)(this.quadrant1Fill):(0,p.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(i=this.xyChart)?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(r=this.xyChart)?void 0:r.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(n=this.xyChart)?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(o=this.xyChart)?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(a=this.xyChart)?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(c=this.xyChart)?void 0:c.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(u=this.xyChart)?void 0:u.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||h(this.primaryColor,{h:-30}),this.git4=this.git4||h(this.primaryColor,{h:-60}),this.git5=this.git5||h(this.primaryColor,{h:-90}),this.git6=this.git6||h(this.primaryColor,{h:60}),this.git7=this.git7||h(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,g.A)(this.git0,25),this.git1=(0,g.A)(this.git1,25),this.git2=(0,g.A)(this.git2,25),this.git3=(0,g.A)(this.git3,25),this.git4=(0,g.A)(this.git4,25),this.git5=(0,g.A)(this.git5,25),this.git6=(0,g.A)(this.git6,25),this.git7=(0,g.A)(this.git7,25)):(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,p.A)(f(this.git0),25),this.gitInv1=this.gitInv1||f(this.git1),this.gitInv2=this.gitInv2||f(this.git2),this.gitInv3=this.gitInv3||f(this.git3),this.gitInv4=this.gitInv4||f(this.git4),this.gitInv5=this.gitInv5||f(this.git5),this.gitInv6=this.gitInv6||f(this.git6),this.gitInv7=this.gitInv7||f(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||f(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||f(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ft}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};const jt=t=>{const e=new Nt;return e.calculate(t),e};let Ot=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,g.A)("#cde498",10),this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=f(this.primaryColor),this.secondaryTextColor=f(this.secondaryColor),this.tertiaryTextColor=f(this.primaryColor),this.lineColor=f(this.background),this.textColor=f(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,i,r,n,o,a,s,l,c,u;this.actorBorder=(0,p.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||h(this.primaryColor,{h:30}),this.cScale4=this.cScale4||h(this.primaryColor,{h:60}),this.cScale5=this.cScale5||h(this.primaryColor,{h:90}),this.cScale6=this.cScale6||h(this.primaryColor,{h:120}),this.cScale7=this.cScale7||h(this.primaryColor,{h:150}),this.cScale8=this.cScale8||h(this.primaryColor,{h:210}),this.cScale9=this.cScale9||h(this.primaryColor,{h:270}),this.cScale10=this.cScale10||h(this.primaryColor,{h:300}),this.cScale11=this.cScale11||h(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,p.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,p.A)(this.tertiaryColor,40);for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["cScale"+h]=(0,p.A)(this["cScale"+h],10),this["cScalePeer"+h]=this["cScalePeer"+h]||(0,p.A)(this["cScale"+h],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||h(this["cScale"+d],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["cScaleLabel"+h]=this["cScaleLabel"+h]||this.scaleLabelColor;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||h(this.mainBkg,{h:30,s:-30,l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||h(this.mainBkg,{h:30,s:-30,l:-(8+5*d)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=h(this.primaryColor,{h:64}),this.fillType3=h(this.secondaryColor,{h:64}),this.fillType4=h(this.primaryColor,{h:-64}),this.fillType5=h(this.secondaryColor,{h:-64}),this.fillType6=h(this.primaryColor,{h:128}),this.fillType7=h(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||h(this.primaryColor,{l:-30}),this.pie5=this.pie5||h(this.secondaryColor,{l:-30}),this.pie6=this.pie6||h(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||h(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||h(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||h(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||h(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||h(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||h(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||h(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||h(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||h(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||h(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||h(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||h(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,m.A)(this.quadrant1Fill)?(0,g.A)(this.quadrant1Fill):(0,p.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(i=this.xyChart)?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(r=this.xyChart)?void 0:r.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(n=this.xyChart)?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(o=this.xyChart)?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(a=this.xyChart)?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(c=this.xyChart)?void 0:c.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(u=this.xyChart)?void 0:u.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||h(this.primaryColor,{h:-30}),this.git4=this.git4||h(this.primaryColor,{h:-60}),this.git5=this.git5||h(this.primaryColor,{h:-90}),this.git6=this.git6||h(this.primaryColor,{h:60}),this.git7=this.git7||h(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,g.A)(this.git0,25),this.git1=(0,g.A)(this.git1,25),this.git2=(0,g.A)(this.git2,25),this.git3=(0,g.A)(this.git3,25),this.git4=(0,g.A)(this.git4,25),this.git5=(0,g.A)(this.git5,25),this.git6=(0,g.A)(this.git6,25),this.git7=(0,g.A)(this.git7,25)):(this.git0=(0,p.A)(this.git0,25),this.git1=(0,p.A)(this.git1,25),this.git2=(0,p.A)(this.git2,25),this.git3=(0,p.A)(this.git3,25),this.git4=(0,p.A)(this.git4,25),this.git5=(0,p.A)(this.git5,25),this.git6=(0,p.A)(this.git6,25),this.git7=(0,p.A)(this.git7,25)),this.gitInv0=this.gitInv0||f(this.git0),this.gitInv1=this.gitInv1||f(this.git1),this.gitInv2=this.gitInv2||f(this.git2),this.gitInv3=this.gitInv3||f(this.git3),this.gitInv4=this.gitInv4||f(this.git4),this.gitInv5=this.gitInv5||f(this.git5),this.gitInv6=this.gitInv6||f(this.git6),this.gitInv7=this.gitInv7||f(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||f(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||f(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ft}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};class It{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,g.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=h(this.primaryColor,{h:-160}),this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=f(this.primaryColor),this.secondaryTextColor=f(this.secondaryColor),this.tertiaryTextColor=f(this.tertiaryColor),this.lineColor=f(this.background),this.textColor=f(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,i,r,n,o,a,s,l,c,u;this.secondBkg=(0,g.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,g.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["cScaleInv"+h]=this["cScaleInv"+h]||f(this["cScale"+h]);for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this.darkMode?this["cScalePeer"+h]=this["cScalePeer"+h]||(0,g.A)(this["cScale"+h],10):this["cScalePeer"+h]=this["cScalePeer"+h]||(0,p.A)(this["cScale"+h],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["cScaleLabel"+h]=this["cScaleLabel"+h]||this.scaleLabelColor;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||h(this.mainBkg,{l:-(5+5*d)}),this["surfacePeer"+d]=this["surfacePeer"+d]||h(this.mainBkg,{l:-(8+5*d)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=(0,g.A)(this.contrast,30),this.sectionBkgColor2=(0,g.A)(this.contrast,30),this.taskBorderColor=(0,p.A)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,g.A)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,p.A)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=h(this.primaryColor,{h:64}),this.fillType3=h(this.secondaryColor,{h:64}),this.fillType4=h(this.primaryColor,{h:-64}),this.fillType5=h(this.secondaryColor,{h:-64}),this.fillType6=h(this.primaryColor,{h:128}),this.fillType7=h(this.secondaryColor,{h:128});for(let h=0;h<this.THEME_COLOR_LIMIT;h++)this["pie"+h]=this["cScale"+h];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||h(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||h(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||h(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||h(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||h(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||h(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,m.A)(this.quadrant1Fill)?(0,g.A)(this.quadrant1Fill):(0,p.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:(null==(t=this.xyChart)?void 0:t.backgroundColor)||this.background,titleColor:(null==(e=this.xyChart)?void 0:e.titleColor)||this.primaryTextColor,xAxisTitleColor:(null==(i=this.xyChart)?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(null==(r=this.xyChart)?void 0:r.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(null==(n=this.xyChart)?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:(null==(o=this.xyChart)?void 0:o.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:(null==(a=this.xyChart)?void 0:a.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:(null==(s=this.xyChart)?void 0:s.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(null==(l=this.xyChart)?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(null==(c=this.xyChart)?void 0:c.yAxisLineColor)||this.primaryTextColor,plotColorPalette:(null==(u=this.xyChart)?void 0:u.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,p.A)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||h(this.primaryColor,{h:-30}),this.git4=this.pie5||h(this.primaryColor,{h:-60}),this.git5=this.pie6||h(this.primaryColor,{h:-90}),this.git6=this.pie7||h(this.primaryColor,{h:60}),this.git7=this.pie8||h(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||f(this.git0),this.gitInv1=this.gitInv1||f(this.git1),this.gitInv2=this.gitInv2||f(this.git2),this.gitInv3=this.gitInv3||f(this.git3),this.gitInv4=this.gitInv4||f(this.git4),this.gitInv5=this.gitInv5||f(this.git5),this.gitInv6=this.gitInv6||f(this.git6),this.gitInv7=this.gitInv7||f(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Lt,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ft}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}const Dt={base:{getThemeVariables:t=>{const e=new Mt;return e.calculate(t),e}},dark:{getThemeVariables:t=>{const e=new Et;return e.calculate(t),e}},default:{getThemeVariables:jt},forest:{getThemeVariables:t=>{const e=new Ot;return e.calculate(t),e}},neutral:{getThemeVariables:t=>{const e=new It;return e.calculate(t),e}}},qt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},theme:"default",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","maxEdges"],legacyMathML:!1,deterministicIds:!1,fontSize:16},$t={...qt,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:Dt.default.getThemeVariables(),sequence:{...qt.sequence,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{...qt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...qt.c4,useWidth:void 0,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}},pie:{...qt.pie,useWidth:984},xyChart:{...qt.xyChart,useWidth:void 0},requirement:{...qt.requirement,useWidth:void 0},gitGraph:{...qt.gitGraph,useMaxWidth:!1},sankey:{...qt.sankey,useMaxWidth:!1}},zt=(t,e="")=>Object.keys(t).reduce(((i,r)=>Array.isArray(t[r])?i:"object"==typeof t[r]&&null!==t[r]?[...i,e+r,...zt(t[r],"")]:[...i,e+r]),[]),Pt=new Set(zt($t,"")),Rt=$t,Ht=t=>{if(st.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>Ht(t)));else{for(const e of Object.keys(t)){if(st.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Pt.has(e)||null==t[e]){st.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){st.debug("sanitizing object",e),Ht(t[e]);continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const r of i)e.includes(r)&&(st.debug("sanitizing css option",e),t[e]=Wt(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const i=t.themeVariables[e];(null==i?void 0:i.match)&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}st.debug("After sanitization",t)}},Wt=t=>{let e=0,i=0;for(const r of t){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";"{"===r?e++:"}"===r&&i++}return e!==i?"{ /* ERROR: Unbalanced CSS */ }":t},Ut=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Yt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Vt=/\s*%%.*\n/gm;class Gt extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}}const Xt={},Zt=function(t,e){t=t.replace(Ut,"").replace(Yt,"").replace(Vt,"\n");for(const[i,{detector:r}]of Object.entries(Xt)){if(r(t,e))return i}throw new Gt(`No diagram type detected matching given configuration for text: ${t}`)},Jt=(...t)=>{for(const{id:e,detector:i,loader:r}of t)Qt(e,i,r)},Qt=(t,e,i)=>{Xt[t]?st.error(`Detector with key ${t} already exists`):Xt[t]={detector:e,loader:i},st.debug(`Detector with key ${t} added${i?" with loader":""}`)},Kt=(t,e,{depth:i=2,clobber:r=!1}={})=>{const n={depth:i,clobber:r};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>Kt(t,e,n))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||i<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((n=>{"object"!=typeof e[n]||void 0!==t[n]&&"object"!=typeof t[n]?(r||"object"!=typeof t[n]&&"object"!=typeof e[n])&&(t[n]=e[n]):(void 0===t[n]&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=Kt(t[n],e[n],{depth:i-1,clobber:r}))})),t)},te=Kt,ee="\u200b",ie={curveBasis:a.qrM,curveBasisClosed:a.Yu4,curveBasisOpen:a.IA3,curveBumpX:a.Wi0,curveBumpY:a.PGM,curveBundle:a.OEq,curveCardinalClosed:a.olC,curveCardinalOpen:a.IrU,curveCardinal:a.y8u,curveCatmullRomClosed:a.Q7f,curveCatmullRomOpen:a.cVp,curveCatmullRom:a.oDi,curveLinear:a.lUB,curveLinearClosed:a.Lx9,curveMonotoneX:a.nVG,curveMonotoneY:a.uxU,curveNatural:a.Xf2,curveStep:a.GZz,curveStepAfter:a.UPb,curveStepBefore:a.dyv},re=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ne=function(t,e=null){try{const i=new RegExp(`[%]{2}(?![{]${re.source})(?=[}][%]{2}).*\n`,"ig");let r;t=t.trim().replace(i,"").replace(/'/gm,'"'),st.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const n=[];for(;null!==(r=Yt.exec(t));)if(r.index===Yt.lastIndex&&Yt.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){const t=r[1]?r[1]:r[2],e=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;n.push({type:t,args:e})}return 0===n.length?{type:t,args:null}:1===n.length?n[0]:n}catch(i){return st.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}};function oe(t,e){if(!t)return e;const i=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return ie[i]??e}function ae(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}const se=(t,e=2)=>{const i=Math.pow(10,e);return Math.round(t*i)/i},le=(t,e)=>{let i,r=e;for(const n of t){if(i){const t=ae(n,i);if(t<r)r-=t;else{const e=r/t;if(e<=0)return i;if(e>=1)return{x:n.x,y:n.y};if(e>0&&e<1)return{x:se((1-e)*i.x+e*n.x,5),y:se((1-e)*i.y+e*n.y,5)}}}i=n}throw new Error("Could not find a suitable point for the given distance")};function ce(t){let e="",i="";for(const r of t)void 0!==r&&(r.startsWith("color:")||r.startsWith("text-align:")?i=i+r+";":e=e+r+";");return{style:e,labelStyle:i}}let he=0;const ue=()=>(he++,"id-"+Math.random().toString(36).substr(2,12)+"-"+he);const de=t=>function(t){let e="";const i="0123456789abcdef";for(let r=0;r<t;r++)e+=i.charAt(Math.floor(16*Math.random()));return e}(t.length),fe=function(t,e){const i=e.text.replace(St.lineBreakRegex," "),[,r]=_e(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",r),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),void 0!==e.class&&n.attr("class",e.class);const o=n.append("tspan");return o.attr("x",e.x+2*e.textMargin),o.attr("fill",e.fill),o.text(i),n},pe=(0,y.A)(((t,e,i)=>{if(!t)return t;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),St.lineBreakRegex.test(t))return t;const r=t.split(" "),n=[];let o="";return r.forEach(((t,a)=>{const s=ye(`${t} `,i),l=ye(o,i);if(s>e){const{hyphenatedStrings:r,remainingWord:a}=ge(t,e,"-",i);n.push(o,...r),o=a}else l+s>=e?(n.push(o),o=t):o=[o,t].filter(Boolean).join(" ");a+1===r.length&&n.push(o)})),n.filter((t=>""!==t)).join(i.joinWith)}),((t,e,i)=>`${t}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`)),ge=(0,y.A)(((t,e,i="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const n=[...t],o=[];let a="";return n.forEach(((t,s)=>{const l=`${a}${t}`;if(ye(l,r)>=e){const t=s+1,e=n.length===t,r=`${l}${i}`;o.push(e?l:r),a=""}else a=l})),{hyphenatedStrings:o,remainingWord:a}}),((t,e,i="-",r)=>`${t}${e}${i}${r.fontSize}${r.fontWeight}${r.fontFamily}`));function me(t,e){return xe(t,e).height}function ye(t,e){return xe(t,e).width}const xe=(0,y.A)(((t,e)=>{const{fontSize:i=12,fontFamily:r="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};const[,o]=_e(i),s=["sans-serif",r],l=t.split(St.lineBreakRegex),c=[],h=(0,a.Ltv)("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const a of s){let t=0;const e={width:0,height:0,lineHeight:0};for(const i of l){const r={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""};r.text=i||ee;const s=fe(u,r).style("font-size",o).style("font-weight",n).style("font-family",a),l=(s._groups||s)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,l.width)),t=Math.round(l.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}c.push(e)}u.remove();return c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`));let be;function Ce(t){return"str"in t}const _e=t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]};function ve(t,e){return(0,x.A)({},t,e)}const ke={assignWithDepth:te,wrapLabel:pe,calculateTextHeight:me,calculateTextWidth:ye,calculateTextDimensions:xe,cleanAndMerge:ve,detectInit:function(t,e){const i=ne(t,/(?:init\b)|(?:initialize\b)/);let r={};if(Array.isArray(i)){const t=i.map((t=>t.args));Ht(t),r=te(r,[...t])}else r=i.args;if(!r)return;let n=Zt(t,e);const o="config";return void 0!==r[o]&&("flowchart-v2"===n&&(n="flowchart"),r[n]=r[o],delete r[o]),r},detectDirective:ne,isSubstringInArray:function(t,e){for(const[i,r]of e.entries())if(r.match(t))return i;return-1},interpolateToCurve:oe,calcLabelPosition:function(t){return 1===t.length?t[0]:function(t){let e,i=0;return t.forEach((t=>{i+=ae(t,e),e=t})),le(t,i/2)}(t)},calcCardinalityPosition:(t,e,i)=>{st.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());const r=le(e,25),n=t?10:5,o=Math.atan2(e[0].y-r.y,e[0].x-r.x),a={x:0,y:0};return a.x=Math.sin(o)*n+(e[0].x+r.x)/2,a.y=-Math.cos(o)*n+(e[0].y+r.y)/2,a},calcTerminalLabelPosition:function(t,e,i){const r=structuredClone(i);st.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse();const n=le(r,25+t),o=10+.5*t,a=Math.atan2(r[0].y-n.y,r[0].x-n.x),s={x:0,y:0};return"start_left"===e?(s.x=Math.sin(a+Math.PI)*o+(r[0].x+n.x)/2,s.y=-Math.cos(a+Math.PI)*o+(r[0].y+n.y)/2):"end_right"===e?(s.x=Math.sin(a-Math.PI)*o+(r[0].x+n.x)/2-5,s.y=-Math.cos(a-Math.PI)*o+(r[0].y+n.y)/2-5):"end_left"===e?(s.x=Math.sin(a)*o+(r[0].x+n.x)/2-5,s.y=-Math.cos(a)*o+(r[0].y+n.y)/2-5):(s.x=Math.sin(a)*o+(r[0].x+n.x)/2,s.y=-Math.cos(a)*o+(r[0].y+n.y)/2),s},formatUrl:function(t,e){const i=t.trim();if(i)return"loose"!==e.securityLevel?(0,o.Jf)(i):i},getStylesFromArray:ce,generateId:ue,random:de,runFunc:(t,...e)=>{const i=t.split("."),r=i.length-1,n=i[r];let o=window;for(let a=0;a<r;a++)if(o=o[i[a]],!o)return void st.error(`Function name: ${t} not found in window`);o[n](...e)},entityDecode:function(t){return be=be||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),be.innerHTML=t,unescape(be.textContent)},insertTitle:(t,e,i,r)=>{var n;if(!r)return;const o=null==(n=t.node())?void 0:n.getBBox();o&&t.append("text").text(r).attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},parseFontSize:_e,InitIDGenerator:class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}}},Te=function(t){return t.replace(/\ufb02\xb0\xb0/g,"&#").replace(/\ufb02\xb0/g,"&").replace(/\xb6\xdf/g,";")},Ae="10.9.0",we=Object.freeze(Rt);let Se,Be=te({},we),Le=[],Fe=te({},we);const Me=(t,e)=>{let i=te({},t),r={};for(const n of e)Oe(n),r=te(r,n);if(i=te(i,r),r.theme&&r.theme in Dt){const t=te({},Se),e=te(t.themeVariables||{},r.themeVariables);i.theme&&i.theme in Dt&&(i.themeVariables=Dt[i.theme].getThemeVariables(e))}return Fe=i,ze(Fe),Fe},Ee=()=>te({},Be),Ne=t=>(ze(t),te(Fe,t),je()),je=()=>te({},Fe),Oe=t=>{t&&(["secure",...Be.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(st.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{e.startsWith("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&Oe(t[e])})))},Ie=t=>{Ht(t),!t.fontFamily||t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}),Le.push(t),Me(Be,Le)},De=(t=Be)=>{Le=[],Me(t,Le)},qe={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},$e={},ze=t=>{var e;t&&((t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&($e[e="LAZY_LOAD_DEPRECATED"]||(st.warn(qe[e]),$e[e]=!0)))},Pe={id:"c4",detector:t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),loader:async()=>{const{diagram:t}=await i.e(3863).then(i.bind(i,3863));return{id:"c4",diagram:t}}},Re="flowchart",He={id:Re,detector:(t,e)=>{var i,r;return"dagre-wrapper"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&"elk"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&/^\s*graph/.test(t)},loader:async()=>{const{diagram:t}=await Promise.all([i.e(2076),i.e(358),i.e(1176),i.e(8747),i.e(2746),i.e(6216),i.e(7121)]).then(i.bind(i,9502));return{id:Re,diagram:t}}},We="flowchart-v2",Ue={id:We,detector:(t,e)=>{var i,r,n;return"dagre-d3"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&"elk"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&(!(!/^\s*graph/.test(t)||"dagre-wrapper"!==(null==(n=null==e?void 0:e.flowchart)?void 0:n.defaultRenderer))||/^\s*flowchart/.test(t))},loader:async()=>{const{diagram:t}=await Promise.all([i.e(2076),i.e(358),i.e(1176),i.e(8747),i.e(2746),i.e(6216),i.e(2317)]).then(i.bind(i,2317));return{id:We,diagram:t}}},Ye={id:"er",detector:t=>/^\s*erDiagram/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(2076),i.e(1176),i.e(8159)]).then(i.bind(i,8159));return{id:"er",diagram:t}}},Ve="gitGraph",Ge={id:Ve,detector:t=>/^\s*gitGraph/.test(t),loader:async()=>{const{diagram:t}=await i.e(6506).then(i.bind(i,6506));return{id:Ve,diagram:t}}},Xe="gantt",Ze={id:Xe,detector:t=>/^\s*gantt/.test(t),loader:async()=>{const{diagram:t}=await i.e(1555).then(i.bind(i,1555));return{id:Xe,diagram:t}}},Je="info",Qe={id:Je,detector:t=>/^\s*info/.test(t),loader:async()=>{const{diagram:t}=await i.e(9469).then(i.bind(i,9469));return{id:Je,diagram:t}}},Ke={id:"pie",detector:t=>/^\s*pie/.test(t),loader:async()=>{const{diagram:t}=await i.e(6063).then(i.bind(i,6063));return{id:"pie",diagram:t}}},ti="quadrantChart",ei={id:ti,detector:t=>/^\s*quadrantChart/.test(t),loader:async()=>{const{diagram:t}=await i.e(7200).then(i.bind(i,7200));return{id:ti,diagram:t}}},ii="xychart",ri={id:ii,detector:t=>/^\s*xychart-beta/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(358),i.e(8947)]).then(i.bind(i,8947));return{id:ii,diagram:t}}},ni="requirement",oi={id:ni,detector:t=>/^\s*requirement(Diagram)?/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(2076),i.e(1176),i.e(9688)]).then(i.bind(i,9688));return{id:ni,diagram:t}}},ai="sequence",si={id:ai,detector:t=>/^\s*sequenceDiagram/.test(t),loader:async()=>{const{diagram:t}=await i.e(7211).then(i.bind(i,7211));return{id:ai,diagram:t}}},li="class",ci={id:li,detector:(t,e)=>{var i;return"dagre-wrapper"!==(null==(i=null==e?void 0:e.class)?void 0:i.defaultRenderer)&&/^\s*classDiagram/.test(t)},loader:async()=>{const{diagram:t}=await Promise.all([i.e(2076),i.e(1176),i.e(7308),i.e(751)]).then(i.bind(i,751));return{id:li,diagram:t}}},hi="classDiagram",ui={id:hi,detector:(t,e)=>{var i;return!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==(null==(i=null==e?void 0:e.class)?void 0:i.defaultRenderer))||/^\s*classDiagram-v2/.test(t)},loader:async()=>{const{diagram:t}=await Promise.all([i.e(2076),i.e(358),i.e(1176),i.e(8747),i.e(2746),i.e(7308),i.e(4)]).then(i.bind(i,4));return{id:hi,diagram:t}}},di="state",fi={id:di,detector:(t,e)=>{var i;return"dagre-wrapper"!==(null==(i=null==e?void 0:e.state)?void 0:i.defaultRenderer)&&/^\s*stateDiagram/.test(t)},loader:async()=>{const{diagram:t}=await Promise.all([i.e(2076),i.e(1176),i.e(6292),i.e(8609)]).then(i.bind(i,8609));return{id:di,diagram:t}}},pi="stateDiagram",gi={id:pi,detector:(t,e)=>{var i;return!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==(null==(i=null==e?void 0:e.state)?void 0:i.defaultRenderer))},loader:async()=>{const{diagram:t}=await Promise.all([i.e(2076),i.e(358),i.e(1176),i.e(8747),i.e(2746),i.e(6292),i.e(5688)]).then(i.bind(i,5688));return{id:pi,diagram:t}}},mi="journey",yi={id:mi,detector:t=>/^\s*journey/.test(t),loader:async()=>{const{diagram:t}=await i.e(8327).then(i.bind(i,8327));return{id:mi,diagram:t}}},xi=function(t,e,i,r){const n=function(t,e,i){let r=new Map;return i?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r}(e,i,r);!function(t,e){for(let i of e)t.attr(i[0],i[1])}(t,n)},bi=function(t,e,i,r){const n=e.node().getBBox(),o=n.width,a=n.height;st.info(`SVG bounds: ${o}x${a}`,n);let s=0,l=0;st.info(`Graph bounds: ${s}x${l}`,t),s=o+2*i,l=a+2*i,st.info(`Calculated bounds: ${s}x${l}`),xi(e,l,s,r);const c=`${n.x-i} ${n.y-i} ${n.width+2*i} ${n.height+2*i}`;e.attr("viewBox",c)},Ci={},_i=(t,e,i)=>{let r="";return t in Ci&&Ci[t]?r=Ci[t](i):st.warn(`No theme found for ${t}`),` & {\n font-family: ${i.fontFamily};\n font-size: ${i.fontSize};\n fill: ${i.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${i.errorBkgColor};\n }\n & .error-text {\n fill: ${i.errorTextColor};\n stroke: ${i.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 2px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${i.lineColor};\n stroke: ${i.lineColor};\n }\n & .marker.cross {\n stroke: ${i.lineColor};\n }\n\n & svg {\n font-family: ${i.fontFamily};\n font-size: ${i.fontSize};\n }\n\n ${r}\n\n ${e}\n`};let vi="",ki="",Ti="";const Ai=t=>pt(t,je()),wi=()=>{vi="",Ti="",ki=""},Si=t=>{vi=Ai(t).replace(/^\s+/g,"")},Bi=()=>vi,Li=t=>{Ti=Ai(t).replace(/\n\s+/g,"\n")},Fi=()=>Ti,Mi=t=>{ki=Ai(t)},Ei=()=>ki,Ni=Object.freeze(Object.defineProperty({__proto__:null,clear:wi,getAccDescription:Fi,getAccTitle:Bi,getDiagramTitle:Ei,setAccDescription:Li,setAccTitle:Si,setDiagramTitle:Mi},Symbol.toStringTag,{value:"Module"})),ji=st,Oi=lt,Ii=je,Di=Ne,qi=we,$i=t=>pt(t,Ii()),zi=bi,Pi={},Ri=(t,e,i)=>{var r,n,o;if(Pi[t])throw new Error(`Diagram ${t} already registered.`);Pi[t]=e,i&&Qt(t,i),n=t,void 0!==(o=e.styles)&&(Ci[n]=o),null==(r=e.injectUtils)||r.call(e,ji,Oi,Ii,$i,zi,Ni,(()=>{}))},Hi=t=>{if(t in Pi)return Pi[t];throw new Wi(t)};class Wi extends Error{constructor(t){super(`Diagram ${t} not found.`)}}const Ui=t=>{var e;const{securityLevel:i}=Ii();let r=(0,a.Ltv)("body");if("sandbox"===i){const i=(null==(e=(0,a.Ltv)(`#i${t}`).node())?void 0:e.contentDocument)??document;r=(0,a.Ltv)(i.body)}return r.select(`#${t}`)},Yi={draw:(t,e,i)=>{st.debug("rendering svg for syntax error\n");const r=Ui(e),n=r.append("g");r.attr("viewBox","0 0 2412 512"),xi(r,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)}},Vi=Yi,Gi={db:{},renderer:Yi,parser:{parser:{yy:{}},parse:()=>{}}},Xi="flowchart-elk",Zi={id:Xi,detector:(t,e)=>{var i;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer))},loader:async()=>{const{diagram:t}=await Promise.all([i.e(358),i.e(8747),i.e(6216),i.e(2235)]).then(i.bind(i,2235));return{id:Xi,diagram:t}}},Ji="timeline",Qi={id:Ji,detector:t=>/^\s*timeline/.test(t),loader:async()=>{const{diagram:t}=await i.e(5642).then(i.bind(i,5642));return{id:Ji,diagram:t}}},Ki="mindmap",tr={id:Ki,detector:t=>/^\s*mindmap/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(358),i.e(3771)]).then(i.bind(i,3771));return{id:Ki,diagram:t}}},er="sankey",ir={id:er,detector:t=>/^\s*sankey-beta/.test(t),loader:async()=>{const{diagram:t}=await i.e(7440).then(i.bind(i,7440));return{id:er,diagram:t}}},rr="block",nr={id:rr,detector:t=>/^\s*block-beta/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(2076),i.e(358),i.e(8747),i.e(7147)]).then(i.bind(i,7147));return{id:rr,diagram:t}}};let or=!1;const ar=()=>{or||(or=!0,Ri("error",Gi,(t=>"error"===t.toLowerCase().trim())),Ri("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")}},init:()=>null},(t=>t.toLowerCase().trimStart().startsWith("---"))),Jt(Pe,ui,ci,Ye,Ze,Qe,Ke,oi,si,Zi,Ue,He,tr,Qi,Ge,gi,fi,yi,ei,ir,ri,nr))};class sr{constructor(t,e={}){this.text=t,this.metadata=e,this.type="graph",this.text=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\ufb02\xb0\xb0"+e+"\xb6\xdf":"\ufb02\xb0"+e+"\xb6\xdf"})),e}(t),this.text+="\n";const i=je();try{this.type=Zt(t,i)}catch(n){this.type="error",this.detectError=n}const r=Hi(this.type);st.debug("Type "+this.type),this.db=r.db,this.renderer=r.renderer,this.parser=r.parser,this.parser.parser.yy=this.db,this.init=r.init,this.parse()}parse(){var t,e,i,r,n;if(this.detectError)throw this.detectError;null==(e=(t=this.db).clear)||e.call(t);const o=je();null==(i=this.init)||i.call(this,o),this.metadata.title&&(null==(n=(r=this.db).setDiagramTitle)||n.call(r,this.metadata.title)),this.parser.parse(this.text)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}}const lr=async(t,e={})=>{const i=Zt(t,je());try{Hi(i)}catch(r){const t=Xt[i].loader;if(!t)throw new Gt(`Diagram ${i} not found.`);const{id:e,diagram:n}=await t();Ri(e,n)}return new sr(t,e)};let cr=[];const hr="graphics-document document";const ur=t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();function dr(t){return null==t}var fr={isNothing:dr,isObject:function(t){return"object"==typeof t&&null!==t},toArray:function(t){return Array.isArray(t)?t:dr(t)?[]:[t]},repeat:function(t,e){var i,r="";for(i=0;i<e;i+=1)r+=t;return r},isNegativeZero:function(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t},extend:function(t,e){var i,r,n,o;if(e)for(i=0,r=(o=Object.keys(e)).length;i<r;i+=1)t[n=o[i]]=e[n];return t}};function pr(t,e){var i="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(i+="\n\n"+t.mark.snippet),r+" "+i):r}function gr(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=pr(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}gr.prototype=Object.create(Error.prototype),gr.prototype.constructor=gr,gr.prototype.toString=function(t){return this.name+": "+pr(this,t)};var mr=gr;function yr(t,e,i,r,n){var o="",a="",s=Math.floor(n/2)-1;return r-e>s&&(e=r-s+(o=" ... ").length),i-r>s&&(i=r+s-(a=" ...").length),{str:o+t.slice(e,i).replace(/\t/g,"\u2192")+a,pos:r-e+o.length}}function xr(t,e){return fr.repeat(" ",e-t.length)+t}var br=function(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var i,r=/\r?\n|\r|\0/g,n=[0],o=[],a=-1;i=r.exec(t.buffer);)o.push(i.index),n.push(i.index+i[0].length),t.position<=i.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var s,l,c="",h=Math.min(t.line+e.linesAfter,o.length).toString().length,u=e.maxLength-(e.indent+h+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=yr(t.buffer,n[a-s],o[a-s],t.position-(n[a]-n[a-s]),u),c=fr.repeat(" ",e.indent)+xr((t.line-s+1).toString(),h)+" | "+l.str+"\n"+c;for(l=yr(t.buffer,n[a],o[a],t.position,u),c+=fr.repeat(" ",e.indent)+xr((t.line+1).toString(),h)+" | "+l.str+"\n",c+=fr.repeat("-",e.indent+h+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=o.length);s++)l=yr(t.buffer,n[a+s],o[a+s],t.position-(n[a]-n[a+s]),u),c+=fr.repeat(" ",e.indent)+xr((t.line+s+1).toString(),h)+" | "+l.str+"\n";return c.replace(/\n$/,"")},Cr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],_r=["scalar","sequence","mapping"];var vr=function(t,e){var i,r;if(e=e||{},Object.keys(e).forEach((function(e){if(-1===Cr.indexOf(e))throw new mr('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=(i=e.styleAliases||null,r={},null!==i&&Object.keys(i).forEach((function(t){i[t].forEach((function(e){r[String(e)]=t}))})),r),-1===_r.indexOf(this.kind))throw new mr('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function kr(t,e){var i=[];return t[e].forEach((function(t){var e=i.length;i.forEach((function(i,r){i.tag===t.tag&&i.kind===t.kind&&i.multi===t.multi&&(e=r)})),i[e]=t})),i}function Tr(t){return this.extend(t)}Tr.prototype.extend=function(t){var e=[],i=[];if(t instanceof vr)i.push(t);else if(Array.isArray(t))i=i.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new mr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof vr))throw new mr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new mr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new mr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),i.forEach((function(t){if(!(t instanceof vr))throw new mr("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var r=Object.create(Tr.prototype);return r.implicit=(this.implicit||[]).concat(e),r.explicit=(this.explicit||[]).concat(i),r.compiledImplicit=kr(r,"implicit"),r.compiledExplicit=kr(r,"explicit"),r.compiledTypeMap=function(){var t,e,i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(t){t.multi?(i.multi[t.kind].push(t),i.multi.fallback.push(t)):i[t.kind][t.tag]=i.fallback[t.tag]=t}for(t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(r);return i}(r.compiledImplicit,r.compiledExplicit),r};var Ar=new Tr({explicit:[new vr("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}}),new vr("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}}),new vr("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})]});var wr=new vr("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)},construct:function(){return null},predicate:function(t){return null===t},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var Sr=new vr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)},construct:function(t){return"true"===t||"True"===t||"TRUE"===t},predicate:function(t){return"[object Boolean]"===Object.prototype.toString.call(t)},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function Br(t){return 48<=t&&t<=55}function Lr(t){return 48<=t&&t<=57}var Fr=new vr("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,i,r=t.length,n=0,o=!1;if(!r)return!1;if("-"!==(e=t[n])&&"+"!==e||(e=t[++n]),"0"===e){if(n+1===r)return!0;if("b"===(e=t[++n])){for(n++;n<r;n++)if("_"!==(e=t[n])){if("0"!==e&&"1"!==e)return!1;o=!0}return o&&"_"!==e}if("x"===e){for(n++;n<r;n++)if("_"!==(e=t[n])){if(!(48<=(i=t.charCodeAt(n))&&i<=57||65<=i&&i<=70||97<=i&&i<=102))return!1;o=!0}return o&&"_"!==e}if("o"===e){for(n++;n<r;n++)if("_"!==(e=t[n])){if(!Br(t.charCodeAt(n)))return!1;o=!0}return o&&"_"!==e}}if("_"===e)return!1;for(;n<r;n++)if("_"!==(e=t[n])){if(!Lr(t.charCodeAt(n)))return!1;o=!0}return!(!o||"_"===e)},construct:function(t){var e,i=t,r=1;if(-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),"-"!==(e=i[0])&&"+"!==e||("-"===e&&(r=-1),e=(i=i.slice(1))[0]),"0"===i)return 0;if("0"===e){if("b"===i[1])return r*parseInt(i.slice(2),2);if("x"===i[1])return r*parseInt(i.slice(2),16);if("o"===i[1])return r*parseInt(i.slice(2),8)}return r*parseInt(i,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!fr.isNegativeZero(t)},represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Mr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var Er=/^[-+]?[0-9]+e/;var Nr=new vr("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!Mr.test(t)||"_"===t[t.length-1])},construct:function(t){var e,i;return i="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:i*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||fr.isNegativeZero(t))},represent:function(t,e){var i;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(fr.isNegativeZero(t))return"-0.0";return i=t.toString(10),Er.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),jr=Ar.extend({implicit:[wr,Sr,Fr,Nr]}),Or=jr,Ir=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Dr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var qr=new vr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==Ir.exec(t)||null!==Dr.exec(t))},construct:function(t){var e,i,r,n,o,a,s,l,c=0,h=null;if(null===(e=Ir.exec(t))&&(e=Dr.exec(t)),null===e)throw new Error("Date resolve error");if(i=+e[1],r=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(i,r,n));if(o=+e[4],a=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(i,r,n,o,a,s,c)),h&&l.setTime(l.getTime()-h),l},instanceOf:Date,represent:function(t){return t.toISOString()}});var $r=new vr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),zr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Pr=new vr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,i,r=0,n=t.length,o=zr;for(i=0;i<n;i++)if(!((e=o.indexOf(t.charAt(i)))>64)){if(e<0)return!1;r+=6}return r%8==0},construct:function(t){var e,i,r=t.replace(/[\r\n=]/g,""),n=r.length,o=zr,a=0,s=[];for(e=0;e<n;e++)e%4==0&&e&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(r.charAt(e));return 0===(i=n%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===i?(s.push(a>>10&255),s.push(a>>2&255)):12===i&&s.push(a>>4&255),new Uint8Array(s)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,i,r="",n=0,o=t.length,a=zr;for(e=0;e<o;e++)e%3==0&&e&&(r+=a[n>>18&63],r+=a[n>>12&63],r+=a[n>>6&63],r+=a[63&n]),n=(n<<8)+t[e];return 0===(i=o%3)?(r+=a[n>>18&63],r+=a[n>>12&63],r+=a[n>>6&63],r+=a[63&n]):2===i?(r+=a[n>>10&63],r+=a[n>>4&63],r+=a[n<<2&63],r+=a[64]):1===i&&(r+=a[n>>2&63],r+=a[n<<4&63],r+=a[64],r+=a[64]),r}}),Rr=Object.prototype.hasOwnProperty,Hr=Object.prototype.toString;var Wr=new vr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,i,r,n,o,a=[],s=t;for(e=0,i=s.length;e<i;e+=1){if(r=s[e],o=!1,"[object Object]"!==Hr.call(r))return!1;for(n in r)if(Rr.call(r,n)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==a.indexOf(n))return!1;a.push(n)}return!0},construct:function(t){return null!==t?t:[]}}),Ur=Object.prototype.toString;var Yr=new vr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,i,r,n,o,a=t;for(o=new Array(a.length),e=0,i=a.length;e<i;e+=1){if(r=a[e],"[object Object]"!==Ur.call(r))return!1;if(1!==(n=Object.keys(r)).length)return!1;o[e]=[n[0],r[n[0]]]}return!0},construct:function(t){if(null===t)return[];var e,i,r,n,o,a=t;for(o=new Array(a.length),e=0,i=a.length;e<i;e+=1)r=a[e],n=Object.keys(r),o[e]=[n[0],r[n[0]]];return o}}),Vr=Object.prototype.hasOwnProperty;var Gr=new vr("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){if(null===t)return!0;var e,i=t;for(e in i)if(Vr.call(i,e)&&null!==i[e])return!1;return!0},construct:function(t){return null!==t?t:{}}}),Xr=Or.extend({implicit:[qr,$r],explicit:[Pr,Wr,Yr,Gr]}),Zr=Object.prototype.hasOwnProperty,Jr=1,Qr=2,Kr=3,tn=4,en=1,rn=2,nn=3,on=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,an=/[\x85\u2028\u2029]/,sn=/[,\[\]\{\}]/,ln=/^(?:!|!!|![a-z\-]+!)$/i,cn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function hn(t){return Object.prototype.toString.call(t)}function un(t){return 10===t||13===t}function dn(t){return 9===t||32===t}function fn(t){return 9===t||32===t||10===t||13===t}function pn(t){return 44===t||91===t||93===t||123===t||125===t}function gn(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function mn(t){return 48===t?"\0":97===t?"\x07":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"\x1b":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"\x85":95===t?"\xa0":76===t?"\u2028":80===t?"\u2029":""}function yn(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}for(var xn=new Array(256),bn=new Array(256),Cn=0;Cn<256;Cn++)xn[Cn]=mn(Cn)?1:0,bn[Cn]=mn(Cn);function _n(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Xr,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function vn(t,e){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=br(i),new mr(e,i)}function kn(t,e){throw vn(t,e)}function Tn(t,e){t.onWarning&&t.onWarning.call(null,vn(t,e))}var An={YAML:function(t,e,i){var r,n,o;null!==t.version&&kn(t,"duplication of %YAML directive"),1!==i.length&&kn(t,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))&&kn(t,"ill-formed argument of the YAML directive"),n=parseInt(r[1],10),o=parseInt(r[2],10),1!==n&&kn(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&Tn(t,"unsupported YAML version of the document")},TAG:function(t,e,i){var r,n;2!==i.length&&kn(t,"TAG directive accepts exactly two arguments"),r=i[0],n=i[1],ln.test(r)||kn(t,"ill-formed tag handle (first argument) of the TAG directive"),Zr.call(t.tagMap,r)&&kn(t,'there is a previously declared suffix for "'+r+'" tag handle'),cn.test(n)||kn(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(o){kn(t,"tag prefix is malformed: "+n)}t.tagMap[r]=n}};function wn(t,e,i,r){var n,o,a,s;if(e<i){if(s=t.input.slice(e,i),r)for(n=0,o=s.length;n<o;n+=1)9===(a=s.charCodeAt(n))||32<=a&&a<=1114111||kn(t,"expected valid JSON character");else on.test(s)&&kn(t,"the stream contains non-printable characters");t.result+=s}}function Sn(t,e,i,r){var n,o,a,s;for(fr.isObject(i)||kn(t,"cannot merge mappings; the provided source object is unacceptable"),a=0,s=(n=Object.keys(i)).length;a<s;a+=1)o=n[a],Zr.call(e,o)||(e[o]=i[o],r[o]=!0)}function Bn(t,e,i,r,n,o,a,s,l){var c,h;if(Array.isArray(n))for(c=0,h=(n=Array.prototype.slice.call(n)).length;c<h;c+=1)Array.isArray(n[c])&&kn(t,"nested arrays are not supported inside keys"),"object"==typeof n&&"[object Object]"===hn(n[c])&&(n[c]="[object Object]");if("object"==typeof n&&"[object Object]"===hn(n)&&(n="[object Object]"),n=String(n),null===e&&(e={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(o))for(c=0,h=o.length;c<h;c+=1)Sn(t,e,o[c],i);else Sn(t,e,o,i);else t.json||Zr.call(i,n)||!Zr.call(e,n)||(t.line=a||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,kn(t,"duplicated mapping key")),"__proto__"===n?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:o}):e[n]=o,delete i[n];return e}function Ln(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):kn(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Fn(t,e,i){for(var r=0,n=t.input.charCodeAt(t.position);0!==n;){for(;dn(n);)9===n&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&35===n)do{n=t.input.charCodeAt(++t.position)}while(10!==n&&13!==n&&0!==n);if(!un(n))break;for(Ln(t),n=t.input.charCodeAt(t.position),r++,t.lineIndent=0;32===n;)t.lineIndent++,n=t.input.charCodeAt(++t.position)}return-1!==i&&0!==r&&t.lineIndent<i&&Tn(t,"deficient indentation"),r}function Mn(t){var e,i=t.position;return!(45!==(e=t.input.charCodeAt(i))&&46!==e||e!==t.input.charCodeAt(i+1)||e!==t.input.charCodeAt(i+2)||(i+=3,0!==(e=t.input.charCodeAt(i))&&!fn(e)))}function En(t,e){1===e?t.result+=" ":e>1&&(t.result+=fr.repeat("\n",e-1))}function Nn(t,e){var i,r,n=t.tag,o=t.anchor,a=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),r=t.input.charCodeAt(t.position);0!==r&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,kn(t,"tab characters must not be used in indentation")),45===r)&&fn(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,Fn(t,!0,-1)&&t.lineIndent<=e)a.push(null),r=t.input.charCodeAt(t.position);else if(i=t.line,In(t,e,Kr,!1,!0),a.push(t.result),Fn(t,!0,-1),r=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>e)&&0!==r)kn(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=n,t.anchor=o,t.kind="sequence",t.result=a,!0)}function jn(t){var e,i,r,n,o=!1,a=!1;if(33!==(n=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&kn(t,"duplication of a tag property"),60===(n=t.input.charCodeAt(++t.position))?(o=!0,n=t.input.charCodeAt(++t.position)):33===n?(a=!0,i="!!",n=t.input.charCodeAt(++t.position)):i="!",e=t.position,o){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&62!==n);t.position<t.length?(r=t.input.slice(e,t.position),n=t.input.charCodeAt(++t.position)):kn(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==n&&!fn(n);)33===n&&(a?kn(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),ln.test(i)||kn(t,"named tag handle cannot contain such characters"),a=!0,e=t.position+1)),n=t.input.charCodeAt(++t.position);r=t.input.slice(e,t.position),sn.test(r)&&kn(t,"tag suffix cannot contain flow indicator characters")}r&&!cn.test(r)&&kn(t,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(s){kn(t,"tag name is malformed: "+r)}return o?t.tag=r:Zr.call(t.tagMap,i)?t.tag=t.tagMap[i]+r:"!"===i?t.tag="!"+r:"!!"===i?t.tag="tag:yaml.org,2002:"+r:kn(t,'undeclared tag handle "'+i+'"'),!0}function On(t){var e,i;if(38!==(i=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&kn(t,"duplication of an anchor property"),i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!fn(i)&&!pn(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&kn(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function In(t,e,i,r,n){var o,a,s,l,c,h,u,d,f,p=1,g=!1,m=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=a=s=tn===i||Kr===i,r&&Fn(t,!0,-1)&&(g=!0,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)),1===p)for(;jn(t)||On(t);)Fn(t,!0,-1)?(g=!0,s=o,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)):s=!1;if(s&&(s=g||n),1!==p&&tn!==i||(d=Jr===i||Qr===i?e:e+1,f=t.position-t.lineStart,1===p?s&&(Nn(t,f)||function(t,e,i){var r,n,o,a,s,l,c,h=t.tag,u=t.anchor,d={},f=Object.create(null),p=null,g=null,m=null,y=!1,x=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=d),c=t.input.charCodeAt(t.position);0!==c;){if(y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,kn(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),o=t.line,63!==c&&58!==c||!fn(r)){if(a=t.line,s=t.lineStart,l=t.position,!In(t,i,Qr,!1,!0))break;if(t.line===o){for(c=t.input.charCodeAt(t.position);dn(c);)c=t.input.charCodeAt(++t.position);if(58===c)fn(c=t.input.charCodeAt(++t.position))||kn(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Bn(t,d,f,p,g,null,a,s,l),p=g=m=null),x=!0,y=!1,n=!1,p=t.tag,g=t.result;else{if(!x)return t.tag=h,t.anchor=u,!0;kn(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!x)return t.tag=h,t.anchor=u,!0;kn(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(Bn(t,d,f,p,g,null,a,s,l),p=g=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):kn(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,c=r;if((t.line===o||t.lineIndent>e)&&(y&&(a=t.line,s=t.lineStart,l=t.position),In(t,e,tn,!0,n)&&(y?g=t.result:m=t.result),y||(Bn(t,d,f,p,g,m,a,s,l),p=g=m=null),Fn(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&0!==c)kn(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&Bn(t,d,f,p,g,null,a,s,l),x&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=d),x}(t,f,d))||function(t,e){var i,r,n,o,a,s,l,c,h,u,d,f,p=!0,g=t.tag,m=t.anchor,y=Object.create(null);if(91===(f=t.input.charCodeAt(t.position)))a=93,c=!1,o=[];else{if(123!==f)return!1;a=125,c=!0,o={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),f=t.input.charCodeAt(++t.position);0!==f;){if(Fn(t,!0,e),(f=t.input.charCodeAt(t.position))===a)return t.position++,t.tag=g,t.anchor=m,t.kind=c?"mapping":"sequence",t.result=o,!0;p?44===f&&kn(t,"expected the node content, but found ','"):kn(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===f&&fn(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,Fn(t,!0,e)),i=t.line,r=t.lineStart,n=t.position,In(t,e,Jr,!1,!0),u=t.tag,h=t.result,Fn(t,!0,e),f=t.input.charCodeAt(t.position),!l&&t.line!==i||58!==f||(s=!0,f=t.input.charCodeAt(++t.position),Fn(t,!0,e),In(t,e,Jr,!1,!0),d=t.result),c?Bn(t,o,y,u,h,d,i,r,n):s?o.push(Bn(t,null,y,u,h,d,i,r,n)):o.push(h),Fn(t,!0,e),44===(f=t.input.charCodeAt(t.position))?(p=!0,f=t.input.charCodeAt(++t.position)):p=!1}kn(t,"unexpected end of the stream within a flow collection")}(t,d)?m=!0:(a&&function(t,e){var i,r,n,o,a,s=en,l=!1,c=!1,h=e,u=0,d=!1;if(124===(o=t.input.charCodeAt(t.position)))r=!1;else{if(62!==o)return!1;r=!0}for(t.kind="scalar",t.result="";0!==o;)if(43===(o=t.input.charCodeAt(++t.position))||45===o)en===s?s=43===o?nn:rn:kn(t,"repeat of a chomping mode identifier");else{if(!((n=48<=(a=o)&&a<=57?a-48:-1)>=0))break;0===n?kn(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?kn(t,"repeat of an indentation width identifier"):(h=e+n-1,c=!0)}if(dn(o)){do{o=t.input.charCodeAt(++t.position)}while(dn(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!un(o)&&0!==o)}for(;0!==o;){for(Ln(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!c||t.lineIndent<h)&&32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position);if(!c&&t.lineIndent>h&&(h=t.lineIndent),un(o))u++;else{if(t.lineIndent<h){s===nn?t.result+=fr.repeat("\n",l?1+u:u):s===en&&l&&(t.result+="\n");break}for(r?dn(o)?(d=!0,t.result+=fr.repeat("\n",l?1+u:u)):d?(d=!1,t.result+=fr.repeat("\n",u+1)):0===u?l&&(t.result+=" "):t.result+=fr.repeat("\n",u):t.result+=fr.repeat("\n",l?1+u:u),l=!0,c=!0,u=0,i=t.position;!un(o)&&0!==o;)o=t.input.charCodeAt(++t.position);wn(t,i,t.position,!1)}}return!0}(t,d)||function(t,e){var i,r,n;if(39!==(i=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(i=t.input.charCodeAt(t.position));)if(39===i){if(wn(t,r,t.position,!0),39!==(i=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,n=t.position}else un(i)?(wn(t,r,n,!0),En(t,Fn(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Mn(t)?kn(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);kn(t,"unexpected end of the stream within a single quoted scalar")}(t,d)||function(t,e){var i,r,n,o,a,s,l;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=r=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return wn(t,i,t.position,!0),t.position++,!0;if(92===s){if(wn(t,i,t.position,!0),un(s=t.input.charCodeAt(++t.position)))Fn(t,!1,e);else if(s<256&&xn[s])t.result+=bn[s],t.position++;else if((a=120===(l=s)?2:117===l?4:85===l?8:0)>0){for(n=a,o=0;n>0;n--)(a=gn(s=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+a:kn(t,"expected hexadecimal character");t.result+=yn(o),t.position++}else kn(t,"unknown escape sequence");i=r=t.position}else un(s)?(wn(t,i,r,!0),En(t,Fn(t,!1,e)),i=r=t.position):t.position===t.lineStart&&Mn(t)?kn(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}kn(t,"unexpected end of the stream within a double quoted scalar")}(t,d)?m=!0:!function(t){var e,i,r;if(42!==(r=t.input.charCodeAt(t.position)))return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!fn(r)&&!pn(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&kn(t,"name of an alias node must contain at least one character"),i=t.input.slice(e,t.position),Zr.call(t.anchorMap,i)||kn(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],Fn(t,!0,-1),!0}(t)?function(t,e,i){var r,n,o,a,s,l,c,h,u=t.kind,d=t.result;if(fn(h=t.input.charCodeAt(t.position))||pn(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(fn(r=t.input.charCodeAt(t.position+1))||i&&pn(r)))return!1;for(t.kind="scalar",t.result="",n=o=t.position,a=!1;0!==h;){if(58===h){if(fn(r=t.input.charCodeAt(t.position+1))||i&&pn(r))break}else if(35===h){if(fn(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&Mn(t)||i&&pn(h))break;if(un(h)){if(s=t.line,l=t.lineStart,c=t.lineIndent,Fn(t,!1,-1),t.lineIndent>=e){a=!0,h=t.input.charCodeAt(t.position);continue}t.position=o,t.line=s,t.lineStart=l,t.lineIndent=c;break}}a&&(wn(t,n,o,!1),En(t,t.line-s),n=o=t.position,a=!1),dn(h)||(o=t.position+1),h=t.input.charCodeAt(++t.position)}return wn(t,n,o,!1),!!t.result||(t.kind=u,t.result=d,!1)}(t,d,Jr===i)&&(m=!0,null===t.tag&&(t.tag="?")):(m=!0,null===t.tag&&null===t.anchor||kn(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===p&&(m=s&&Nn(t,f))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&kn(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l<c;l+=1)if((u=t.implicitTypes[l]).resolve(t.result)){t.result=u.construct(t.result),t.tag=u.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(Zr.call(t.typeMap[t.kind||"fallback"],t.tag))u=t.typeMap[t.kind||"fallback"][t.tag];else for(u=null,l=0,c=(h=t.typeMap.multi[t.kind||"fallback"]).length;l<c;l+=1)if(t.tag.slice(0,h[l].tag.length)===h[l].tag){u=h[l];break}u||kn(t,"unknown tag !<"+t.tag+">"),null!==t.result&&u.kind!==t.kind&&kn(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):kn(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||m}function Dn(t){var e,i,r,n,o=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(Fn(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==n));){for(a=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!fn(n);)n=t.input.charCodeAt(++t.position);for(r=[],(i=t.input.slice(e,t.position)).length<1&&kn(t,"directive name must not be less than one character in length");0!==n;){for(;dn(n);)n=t.input.charCodeAt(++t.position);if(35===n){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&!un(n));break}if(un(n))break;for(e=t.position;0!==n&&!fn(n);)n=t.input.charCodeAt(++t.position);r.push(t.input.slice(e,t.position))}0!==n&&Ln(t),Zr.call(An,i)?An[i](t,i,r):Tn(t,'unknown document directive "'+i+'"')}Fn(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,Fn(t,!0,-1)):a&&kn(t,"directives end mark is expected"),In(t,t.lineIndent-1,tn,!1,!0),Fn(t,!0,-1),t.checkLineBreaks&&an.test(t.input.slice(o,t.position))&&Tn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Mn(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,Fn(t,!0,-1)):t.position<t.length-1&&kn(t,"end of the stream or a document separator is expected")}function qn(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var i=new _n(t,e),r=t.indexOf("\0");for(-1!==r&&(i.position=r,kn(i,"null byte is not allowed in input")),i.input+="\0";32===i.input.charCodeAt(i.position);)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)Dn(i);return i.documents}var $n=jr,zn={loadAll:function(t,e,i){null!==e&&"object"==typeof e&&void 0===i&&(i=e,e=null);var r=qn(t,i);if("function"!=typeof e)return r;for(var n=0,o=r.length;n<o;n+=1)e(r[n])},load:function(t,e){var i=qn(t,e);if(0!==i.length){if(1===i.length)return i[0];throw new mr("expected a single document in the stream, but found more")}}}.load;const Pn=t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,i)=>"<"+e+i.replace(/="([^"]*)"/g,"='$1'")+">")),Rn=t=>{const{text:e,metadata:i}=function(t){const e=t.match(Ut);if(!e)return{text:t,metadata:{}};let i=zn(e[1],{schema:$n})??{};i="object"!=typeof i||Array.isArray(i)?{}:i;const r={};return i.displayMode&&(r.displayMode=i.displayMode.toString()),i.title&&(r.title=i.title.toString()),i.config&&(r.config=i.config),{text:t.slice(e[0].length),metadata:r}}(t),{displayMode:r,title:n,config:o={}}=i;return r&&(o.gantt||(o.gantt={}),o.gantt.displayMode=r),{title:n,config:o,text:e}},Hn=t=>{const e=ke.detectInit(t)??{},i=ke.detectDirective(t,"wrap");return Array.isArray(i)?e.wrap=i.some((({type:t})=>{})):"wrap"===(null==i?void 0:i.type)&&(e.wrap=!0),{text:(r=t,r.replace(Yt,"")),directive:e};var r};function Wn(t){const e=Pn(t),i=Rn(e),r=Hn(i.text),n=ve(i.config,r.directive);return{code:t=ur(r.text),title:i.title,config:n}}const Un=["foreignobject"],Yn=["dominant-baseline"];function Vn(t){const e=Wn(t);return De(),Ie(e.config??{}),e}const Gn=(t,e,i=[])=>`\n.${t} ${e} { ${i.join(" !important; ")} !important; }`,Xn=(t,e,i,r)=>{const n=((t,e={})=>{var i;let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!(0,ot.A)(e)){const n=t.htmlLabels||(null==(i=t.flowchart)?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const t in e){const i=e[t];(0,ot.A)(i.styles)||n.forEach((t=>{r+=Gn(i.id,t,i.styles)})),(0,ot.A)(i.textStyles)||(r+=Gn(i.id,"tspan",i.textStyles))}}return r})(t,i);return M(tt(`${r}{${_i(e,n,t.themeVariables)}}`),E)},Zn=(t,e,i,r,n)=>{const o=t.append("div");o.attr("id",i),r&&o.attr("style",r);const a=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return n&&a.attr("xmlns:xlink",n),a.append("g"),t};function Jn(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const Qn=(t,e={})=>{const{code:i}=Wn(t);return lr(i,e)};const Kn=Object.freeze({render:async function(t,e,i){var r,n,o,l,c,h;ar();const u=Vn(e);e=u.code;const d=je();st.debug(d),e.length>((null==d?void 0:d.maxTextSize)??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const f="#"+t,p="i"+t,g="#"+p,m="d"+t,y="#"+m;let x=(0,a.Ltv)("body");const b="sandbox"===d.securityLevel,C="loose"===d.securityLevel,_=d.fontFamily;if(void 0!==i){if(i&&(i.innerHTML=""),b){const t=Jn((0,a.Ltv)(i),p);x=(0,a.Ltv)(t.nodes()[0].contentDocument.body),x.node().style.margin=0}else x=(0,a.Ltv)(i);Zn(x,t,m,`font-family: ${_}`,"http://www.w3.org/1999/xlink")}else{if(((t,e,i,r)=>{var n,o,a;null==(n=t.getElementById(e))||n.remove(),null==(o=t.getElementById(i))||o.remove(),null==(a=t.getElementById(r))||a.remove()})(document,t,m,p),b){const t=Jn((0,a.Ltv)("body"),p);x=(0,a.Ltv)(t.nodes()[0].contentDocument.body),x.node().style.margin=0}else x=(0,a.Ltv)("body");Zn(x,t,m)}let v,k;try{v=await Qn(e,{title:u.title})}catch(j){v=new sr("error"),k=j}const T=x.select(y).node(),A=v.type,w=T.firstChild,S=w.firstChild,B=null==(n=(r=v.renderer).getClasses)?void 0:n.call(r,e,v),L=Xn(d,A,B,f),F=document.createElement("style");F.innerHTML=L,w.insertBefore(F,S);try{await v.renderer.draw(e,t,Ae,v)}catch(O){throw Vi.draw(e,t,Ae),O}!function(t,e,i,r){(function(t,e){t.attr("role",hr),""!==e&&t.attr("aria-roledescription",e)})(e,t),function(t,e,i,r){if(void 0!==t.insert){if(i){const e=`chart-desc-${r}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(i)}if(e){const i=`chart-title-${r}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}(e,i,r,e.attr("id"))}(A,x.select(`${y} svg`),null==(l=(o=v.db).getAccTitle)?void 0:l.call(o),null==(h=(c=v.db).getAccDescription)?void 0:h.call(c)),x.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let M=x.select(y).node().innerHTML;if(st.debug("config.arrowMarkerAbsolute",d.arrowMarkerAbsolute),M=((t="",e,i)=>{let r=t;return i||e||(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=Te(r),r=r.replace(/<br>/g,"<br/>"),r})(M,b,yt(d.arrowMarkerAbsolute)),b){M=((t="",e)=>{var i,r;return`<iframe style="width:100%;height:${(null==(r=null==(i=null==e?void 0:e.viewBox)?void 0:i.baseVal)?void 0:r.height)?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;base64,${btoa('<body style="margin:0">'+t+"</body>")}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`})(M,x.select(y+" svg").node())}else C||(M=s.sanitize(M,{ADD_TAGS:Un,ADD_ATTR:Yn}));if(cr.forEach((t=>{t()})),cr=[],k)throw k;const E=b?g:y,N=(0,a.Ltv)(E).node();return N&&"remove"in N&&N.remove(),{svg:M,bindFunctions:v.db.bindFunctions}},parse:async function(t,e){ar(),t=Vn(t).code;try{await Qn(t)}catch(i){if(null==e?void 0:e.suppressErrors)return!1;throw i}return!0},getDiagramFromText:Qn,initialize:function(t={}){var e;(null==t?void 0:t.fontFamily)&&!(null==(e=t.themeVariables)?void 0:e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Se=te({},t),(null==t?void 0:t.theme)&&t.theme in Dt?t.themeVariables=Dt[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Dt.default.getThemeVariables(t.themeVariables));const i="object"==typeof t?(t=>(Be=te({},we),Be=te(Be,t),t.theme&&Dt[t.theme]&&(Be.themeVariables=Dt[t.theme].getThemeVariables(t.themeVariables)),Me(Be,Le),Be))(t):Ee();lt(i.logLevel),ar()},getConfig:je,setConfig:Ne,getSiteConfig:Ee,updateSiteConfig:t=>(Be=te(Be,t),Me(Be,Le),Be),reset:()=>{De()},globalReset:()=>{De(we)},defaultConfig:we});lt(je().logLevel),De(je());const to=(t,e,i)=>{st.warn(t),Ce(t)?(i&&i(t.str,t.hash),e.push({...t,message:t.str,error:t})):(i&&i(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},eo=async function(t={querySelector:".mermaid"}){try{await io(t)}catch(e){if(Ce(e)&&st.error(e.str),co.parseError&&co.parseError(e),!t.suppressErrors)throw st.error("Use the suppressErrors option to suppress these errors"),e}},io=async function({postRenderCallback:t,querySelector:e,nodes:i}={querySelector:".mermaid"}){const n=Kn.getConfig();let o;if(st.debug((t?"":"No ")+"Callback function found"),i)o=i;else{if(!e)throw new Error("Nodes and querySelector are both undefined");o=document.querySelectorAll(e)}st.debug(`Found ${o.length} diagrams`),void 0!==(null==n?void 0:n.startOnLoad)&&(st.debug("Start On Load: "+(null==n?void 0:n.startOnLoad)),Kn.updateSiteConfig({startOnLoad:null==n?void 0:n.startOnLoad}));const a=new ke.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let s;const l=[];for(const h of Array.from(o)){if(st.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const e=`mermaid-${a.next()}`;s=h.innerHTML,s=(0,r.T)(ke.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const i=ke.detectInit(s);i&&st.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:r}=await lo(e,s,h);h.innerHTML=i,t&&await t(e),r&&r(h)}catch(c){to(c,l,co.parseError)}}if(l.length>0)throw l[0]},ro=function(t){Kn.initialize(t)},no=function(){if(co.startOnLoad){const{startOnLoad:t}=Kn.getConfig();t&&co.run().catch((t=>st.error("Mermaid failed to initialize",t)))}};"undefined"!=typeof document&&window.addEventListener("load",no,!1);const oo=[];let ao=!1;const so=async()=>{if(!ao){for(ao=!0;oo.length>0;){const e=oo.shift();if(e)try{await e()}catch(t){st.error("Error executing queue",t)}}ao=!1}},lo=(t,e,i)=>new Promise(((r,n)=>{oo.push((()=>new Promise(((o,a)=>{Kn.render(t,e,i).then((t=>{o(t),r(t)}),(t=>{var e;st.error("Error parsing",t),null==(e=co.parseError)||e.call(co,t),a(t),n(t)}))})))),so().catch(n)})),co={startOnLoad:!0,mermaidAPI:Kn,parse:async(t,e)=>new Promise(((i,r)=>{oo.push((()=>new Promise(((n,o)=>{Kn.parse(t,e).then((t=>{n(t),i(t)}),(t=>{var e;st.error("Error parsing",t),null==(e=co.parseError)||e.call(co,t),o(t),r(t)}))})))),so().catch(r)})),render:lo,init:async function(t,e,i){st.warn("mermaid.init is deprecated. Please use run instead."),t&&ro(t);const r={postRenderCallback:i,querySelector:".mermaid"};"string"==typeof e?r.querySelector=e:e&&(e instanceof HTMLElement?r.nodes=[e]:r.nodes=e),await eo(r)},run:eo,registerExternalDiagrams:async(t,{lazyLoad:e=!0}={})=>{Jt(...t),!1===e&&await(async()=>{st.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Xt).map((async([t,{detector:e,loader:i}])=>{if(i)try{Hi(t)}catch(r){try{const{diagram:t,id:r}=await i();Ri(r,t,e)}catch(n){throw st.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Xt[t],n}}})))).filter((t=>"rejected"===t.status));if(t.length>0){st.error(`Failed to load ${t.length} external diagrams`);for(const e of t)st.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}})()},initialize:ro,parseError:void 0,contentLoaded:no,setParseErrorHandler:function(t){co.parseError=t},detectType:Zt}}}]); \ No newline at end of file diff --git a/assets/js/17896441.244ddac3.js.LICENSE.txt b/assets/js/17896441.244ddac3.js.LICENSE.txt new file mode 100644 index 00000000..4298ea11 --- /dev/null +++ b/assets/js/17896441.244ddac3.js.LICENSE.txt @@ -0,0 +1,9 @@ +/*! + * Wait for document loaded before starting the execution + */ + +/*! @license DOMPurify 3.0.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.11/LICENSE */ + +/*! Check if previously processed */ + +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ diff --git a/assets/js/1df93b7f.add0d0ab.js b/assets/js/1df93b7f.add0d0ab.js new file mode 100644 index 00000000..9496e5b9 --- /dev/null +++ b/assets/js/1df93b7f.add0d0ab.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[4583],{6866:(t,n,u)=>{u.r(n),u.d(n,{default:()=>c});u(6540);var o=u(6347),e=u(4848);function c(){return(0,e.jsx)(o.rd,{to:"docs/about/introduction"})}}}]); \ No newline at end of file diff --git a/assets/js/200.ef07ecb8.js b/assets/js/200.ef07ecb8.js new file mode 100644 index 00000000..0639dd4b --- /dev/null +++ b/assets/js/200.ef07ecb8.js @@ -0,0 +1,1227 @@ +"use strict"; +exports.id = 200; +exports.ids = [200]; +exports.modules = { + +/***/ 7200: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9418); + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 7], $V5 = [1, 5, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V6 = [1, 5, 6, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V7 = [32, 33, 34], $V8 = [2, 7], $V9 = [1, 13], $Va = [1, 17], $Vb = [1, 18], $Vc = [1, 19], $Vd = [1, 20], $Ve = [1, 21], $Vf = [1, 22], $Vg = [1, 23], $Vh = [1, 24], $Vi = [1, 25], $Vj = [1, 26], $Vk = [1, 27], $Vl = [1, 30], $Vm = [1, 31], $Vn = [1, 32], $Vo = [1, 33], $Vp = [1, 34], $Vq = [1, 35], $Vr = [1, 36], $Vs = [1, 37], $Vt = [1, 38], $Vu = [1, 39], $Vv = [1, 40], $Vw = [1, 41], $Vx = [1, 42], $Vy = [1, 57], $Vz = [1, 58], $VA = [5, 22, 26, 32, 33, 34, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "SPACE": 5, "QUADRANT": 6, "document": 7, "line": 8, "statement": 9, "axisDetails": 10, "quadrantDetails": 11, "points": 12, "title": 13, "title_value": 14, "acc_title": 15, "acc_title_value": 16, "acc_descr": 17, "acc_descr_value": 18, "acc_descr_multiline_value": 19, "section": 20, "text": 21, "point_start": 22, "point_x": 23, "point_y": 24, "X-AXIS": 25, "AXIS-TEXT-DELIMITER": 26, "Y-AXIS": 27, "QUADRANT_1": 28, "QUADRANT_2": 29, "QUADRANT_3": 30, "QUADRANT_4": 31, "NEWLINE": 32, "SEMI": 33, "EOF": 34, "alphaNumToken": 35, "textNoTagsToken": 36, "STR": 37, "MD_STR": 38, "alphaNum": 39, "PUNCTUATION": 40, "AMP": 41, "NUM": 42, "ALPHA": 43, "COMMA": 44, "PLUS": 45, "EQUALS": 46, "MULT": 47, "DOT": 48, "BRKT": 49, "UNDERSCORE": 50, "MINUS": 51, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "SPACE", 6: "QUADRANT", 13: "title", 14: "title_value", 15: "acc_title", 16: "acc_title_value", 17: "acc_descr", 18: "acc_descr_value", 19: "acc_descr_multiline_value", 20: "section", 22: "point_start", 23: "point_x", 24: "point_y", 25: "X-AXIS", 26: "AXIS-TEXT-DELIMITER", 27: "Y-AXIS", 28: "QUADRANT_1", 29: "QUADRANT_2", 30: "QUADRANT_3", 31: "QUADRANT_4", 32: "NEWLINE", 33: "SEMI", 34: "EOF", 37: "STR", 38: "MD_STR", 40: "PUNCTUATION", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "COMMA", 45: "PLUS", 46: "EQUALS", 47: "MULT", 48: "DOT", 49: "BRKT", 50: "UNDERSCORE", 51: "MINUS" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [9, 0], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [12, 4], [10, 4], [10, 3], [10, 2], [10, 4], [10, 3], [10, 2], [11, 2], [11, 2], [11, 2], [11, 2], [4, 1], [4, 1], [4, 1], [21, 1], [21, 2], [21, 1], [21, 1], [39, 1], [39, 2], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [36, 1], [36, 1], [36, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 12: + this.$ = $$[$0].trim(); + yy.setDiagramTitle(this.$); + break; + case 13: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 14: + case 15: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 16: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 17: + yy.addPoint($$[$0 - 3], $$[$0 - 1], $$[$0]); + break; + case 18: + yy.setXAxisLeftText($$[$0 - 2]); + yy.setXAxisRightText($$[$0]); + break; + case 19: + $$[$0 - 1].text += " ⟶ "; + yy.setXAxisLeftText($$[$0 - 1]); + break; + case 20: + yy.setXAxisLeftText($$[$0]); + break; + case 21: + yy.setYAxisBottomText($$[$0 - 2]); + yy.setYAxisTopText($$[$0]); + break; + case 22: + $$[$0 - 1].text += " ⟶ "; + yy.setYAxisBottomText($$[$0 - 1]); + break; + case 23: + yy.setYAxisBottomText($$[$0]); + break; + case 24: + yy.setQuadrant1Text($$[$0]); + break; + case 25: + yy.setQuadrant2Text($$[$0]); + break; + case 26: + yy.setQuadrant3Text($$[$0]); + break; + case 27: + yy.setQuadrant4Text($$[$0]); + break; + case 31: + this.$ = { text: $$[$0], type: "text" }; + break; + case 32: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 33: + this.$ = { text: $$[$0], type: "text" }; + break; + case 34: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 35: + this.$ = $$[$0]; + break; + case 36: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 1: [3] }, { 3: 8, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 3: 9, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, o($V5, [2, 4], { 7: 10 }), o($V6, [2, 28]), o($V6, [2, 29]), o($V6, [2, 30]), { 1: [2, 1] }, { 1: [2, 2] }, o($V7, $V8, { 8: 11, 9: 12, 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 1: [2, 3], 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V5, [2, 5]), { 4: 43, 32: $V2, 33: $V3, 34: $V4 }, o($V7, $V8, { 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 9: 44, 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11]), { 14: [1, 45] }, { 16: [1, 46] }, { 18: [1, 47] }, o($V7, [2, 15]), o($V7, [2, 16]), { 21: 48, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 49, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 50, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 51, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 52, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 53, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 5: $Vy, 22: [1, 54], 35: 56, 36: 55, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }, o($VA, [2, 31]), o($VA, [2, 33]), o($VA, [2, 34]), o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), o($VA, [2, 40]), o($VA, [2, 41]), o($VA, [2, 42]), o($VA, [2, 43]), o($VA, [2, 44]), o($VA, [2, 45]), o($VA, [2, 46]), o($VA, [2, 47]), o($V5, [2, 6]), o($V7, [2, 8]), o($V7, [2, 12]), o($V7, [2, 13]), o($V7, [2, 14]), o($V7, [2, 20], { 36: 55, 35: 56, 5: $Vy, 26: [1, 59], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 23], { 36: 55, 35: 56, 5: $Vy, 26: [1, 60], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 24], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 25], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 26], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 27], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), { 23: [1, 61] }, o($VA, [2, 32]), o($VA, [2, 48]), o($VA, [2, 49]), o($VA, [2, 50]), o($V7, [2, 19], { 35: 29, 21: 62, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 22], { 35: 29, 21: 63, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), { 24: [1, 64] }, o($V7, [2, 18], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 21], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 17])], + defaultActions: { 8: [2, 1], 9: [2, 2] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 32; + case 3: + break; + case 4: + this.begin("title"); + return 13; + case 5: + this.popState(); + return "title_value"; + case 6: + this.begin("acc_title"); + return 15; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 17; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + return 25; + case 14: + return 27; + case 15: + return 26; + case 16: + return 28; + case 17: + return 29; + case 18: + return 30; + case 19: + return 31; + case 20: + this.begin("md_string"); + break; + case 21: + return "MD_STR"; + case 22: + this.popState(); + break; + case 23: + this.begin("string"); + break; + case 24: + this.popState(); + break; + case 25: + return "STR"; + case 26: + this.begin("point_start"); + return 22; + case 27: + this.begin("point_x"); + return 23; + case 28: + this.popState(); + break; + case 29: + this.popState(); + this.begin("point_y"); + break; + case 30: + this.popState(); + return 24; + case 31: + return 6; + case 32: + return 43; + case 33: + return "COLON"; + case 34: + return 45; + case 35: + return 44; + case 36: + return 46; + case 37: + return 46; + case 38: + return 47; + case 39: + return 49; + case 40: + return 50; + case 41: + return 48; + case 42: + return 41; + case 43: + return 51; + case 44: + return 42; + case 45: + return 5; + case 46: + return 33; + case 47: + return 40; + case 48: + return 34; + } + }, + rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i], + conditions: { "point_y": { "rules": [30], "inclusive": false }, "point_x": { "rules": [29], "inclusive": false }, "point_start": { "rules": [27, 28], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "title": { "rules": [5], "inclusive": false }, "md_string": { "rules": [21, 22], "inclusive": false }, "string": { "rules": [24, 25], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 23, 26, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const defaultThemeVariables = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.E)(); +class QuadrantBuilder { + constructor() { + this.config = this.getDefaultConfig(); + this.themeConfig = this.getDefaultThemeConfig(); + this.data = this.getDefaultData(); + } + getDefaultData() { + return { + titleText: "", + quadrant1Text: "", + quadrant2Text: "", + quadrant3Text: "", + quadrant4Text: "", + xAxisLeftText: "", + xAxisRightText: "", + yAxisBottomText: "", + yAxisTopText: "", + points: [] + }; + } + getDefaultConfig() { + var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r; + return { + showXAxis: true, + showYAxis: true, + showTitle: true, + chartHeight: ((_a = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _a.chartWidth) || 500, + chartWidth: ((_b = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _b.chartHeight) || 500, + titlePadding: ((_c = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _c.titlePadding) || 10, + titleFontSize: ((_d = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _d.titleFontSize) || 20, + quadrantPadding: ((_e = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _e.quadrantPadding) || 5, + xAxisLabelPadding: ((_f = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _f.xAxisLabelPadding) || 5, + yAxisLabelPadding: ((_g = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _g.yAxisLabelPadding) || 5, + xAxisLabelFontSize: ((_h = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _h.xAxisLabelFontSize) || 16, + yAxisLabelFontSize: ((_i = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _i.yAxisLabelFontSize) || 16, + quadrantLabelFontSize: ((_j = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _j.quadrantLabelFontSize) || 16, + quadrantTextTopPadding: ((_k = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _k.quadrantTextTopPadding) || 5, + pointTextPadding: ((_l = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _l.pointTextPadding) || 5, + pointLabelFontSize: ((_m = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _m.pointLabelFontSize) || 12, + pointRadius: ((_n = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _n.pointRadius) || 5, + xAxisPosition: ((_o = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _o.xAxisPosition) || "top", + yAxisPosition: ((_p = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _p.yAxisPosition) || "left", + quadrantInternalBorderStrokeWidth: ((_q = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _q.quadrantInternalBorderStrokeWidth) || 1, + quadrantExternalBorderStrokeWidth: ((_r = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.quadrantChart) == null ? void 0 : _r.quadrantExternalBorderStrokeWidth) || 2 + }; + } + getDefaultThemeConfig() { + return { + quadrant1Fill: defaultThemeVariables.quadrant1Fill, + quadrant2Fill: defaultThemeVariables.quadrant2Fill, + quadrant3Fill: defaultThemeVariables.quadrant3Fill, + quadrant4Fill: defaultThemeVariables.quadrant4Fill, + quadrant1TextFill: defaultThemeVariables.quadrant1TextFill, + quadrant2TextFill: defaultThemeVariables.quadrant2TextFill, + quadrant3TextFill: defaultThemeVariables.quadrant3TextFill, + quadrant4TextFill: defaultThemeVariables.quadrant4TextFill, + quadrantPointFill: defaultThemeVariables.quadrantPointFill, + quadrantPointTextFill: defaultThemeVariables.quadrantPointTextFill, + quadrantXAxisTextFill: defaultThemeVariables.quadrantXAxisTextFill, + quadrantYAxisTextFill: defaultThemeVariables.quadrantYAxisTextFill, + quadrantTitleFill: defaultThemeVariables.quadrantTitleFill, + quadrantInternalBorderStrokeFill: defaultThemeVariables.quadrantInternalBorderStrokeFill, + quadrantExternalBorderStrokeFill: defaultThemeVariables.quadrantExternalBorderStrokeFill + }; + } + clear() { + this.config = this.getDefaultConfig(); + this.themeConfig = this.getDefaultThemeConfig(); + this.data = this.getDefaultData(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("clear called"); + } + setData(data) { + this.data = { ...this.data, ...data }; + } + addPoints(points) { + this.data.points = [...points, ...this.data.points]; + } + setConfig(config2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("setConfig called with: ", config2); + this.config = { ...this.config, ...config2 }; + } + setThemeConfig(themeConfig) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("setThemeConfig called with: ", themeConfig); + this.themeConfig = { ...this.themeConfig, ...themeConfig }; + } + calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle) { + const xAxisSpaceCalculation = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize; + const xAxisSpace = { + top: xAxisPosition === "top" && showXAxis ? xAxisSpaceCalculation : 0, + bottom: xAxisPosition === "bottom" && showXAxis ? xAxisSpaceCalculation : 0 + }; + const yAxisSpaceCalculation = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize; + const yAxisSpace = { + left: this.config.yAxisPosition === "left" && showYAxis ? yAxisSpaceCalculation : 0, + right: this.config.yAxisPosition === "right" && showYAxis ? yAxisSpaceCalculation : 0 + }; + const titleSpaceCalculation = this.config.titleFontSize + this.config.titlePadding * 2; + const titleSpace = { + top: showTitle ? titleSpaceCalculation : 0 + }; + const quadrantLeft = this.config.quadrantPadding + yAxisSpace.left; + const quadrantTop = this.config.quadrantPadding + xAxisSpace.top + titleSpace.top; + const quadrantWidth = this.config.chartWidth - this.config.quadrantPadding * 2 - yAxisSpace.left - yAxisSpace.right; + const quadrantHeight = this.config.chartHeight - this.config.quadrantPadding * 2 - xAxisSpace.top - xAxisSpace.bottom - titleSpace.top; + const quadrantHalfWidth = quadrantWidth / 2; + const quadrantHalfHeight = quadrantHeight / 2; + const quadrantSpace = { + quadrantLeft, + quadrantTop, + quadrantWidth, + quadrantHalfWidth, + quadrantHeight, + quadrantHalfHeight + }; + return { + xAxisSpace, + yAxisSpace, + titleSpace, + quadrantSpace + }; + } + getAxisLabels(xAxisPosition, showXAxis, showYAxis, spaceData) { + const { quadrantSpace, titleSpace } = spaceData; + const { + quadrantHalfHeight, + quadrantHeight, + quadrantLeft, + quadrantHalfWidth, + quadrantTop, + quadrantWidth + } = quadrantSpace; + const drawXAxisLabelsInMiddle = Boolean(this.data.xAxisRightText); + const drawYAxisLabelsInMiddle = Boolean(this.data.yAxisTopText); + const axisLabels = []; + if (this.data.xAxisLeftText && showXAxis) { + axisLabels.push({ + text: this.data.xAxisLeftText, + fill: this.themeConfig.quadrantXAxisTextFill, + x: quadrantLeft + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0), + y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding, + fontSize: this.config.xAxisLabelFontSize, + verticalPos: drawXAxisLabelsInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: 0 + }); + } + if (this.data.xAxisRightText && showXAxis) { + axisLabels.push({ + text: this.data.xAxisRightText, + fill: this.themeConfig.quadrantXAxisTextFill, + x: quadrantLeft + quadrantHalfWidth + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0), + y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding, + fontSize: this.config.xAxisLabelFontSize, + verticalPos: drawXAxisLabelsInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: 0 + }); + } + if (this.data.yAxisBottomText && showYAxis) { + axisLabels.push({ + text: this.data.yAxisBottomText, + fill: this.themeConfig.quadrantYAxisTextFill, + x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding, + y: quadrantTop + quadrantHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0), + fontSize: this.config.yAxisLabelFontSize, + verticalPos: drawYAxisLabelsInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: -90 + }); + } + if (this.data.yAxisTopText && showYAxis) { + axisLabels.push({ + text: this.data.yAxisTopText, + fill: this.themeConfig.quadrantYAxisTextFill, + x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding, + y: quadrantTop + quadrantHalfHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0), + fontSize: this.config.yAxisLabelFontSize, + verticalPos: drawYAxisLabelsInMiddle ? "center" : "left", + horizontalPos: "top", + rotation: -90 + }); + } + return axisLabels; + } + getQuadrants(spaceData) { + const { quadrantSpace } = spaceData; + const { quadrantHalfHeight, quadrantLeft, quadrantHalfWidth, quadrantTop } = quadrantSpace; + const quadrants = [ + { + text: { + text: this.data.quadrant1Text, + fill: this.themeConfig.quadrant1TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft + quadrantHalfWidth, + y: quadrantTop, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant1Fill + }, + { + text: { + text: this.data.quadrant2Text, + fill: this.themeConfig.quadrant2TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft, + y: quadrantTop, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant2Fill + }, + { + text: { + text: this.data.quadrant3Text, + fill: this.themeConfig.quadrant3TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft, + y: quadrantTop + quadrantHalfHeight, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant3Fill + }, + { + text: { + text: this.data.quadrant4Text, + fill: this.themeConfig.quadrant4TextFill, + x: 0, + y: 0, + fontSize: this.config.quadrantLabelFontSize, + verticalPos: "center", + horizontalPos: "middle", + rotation: 0 + }, + x: quadrantLeft + quadrantHalfWidth, + y: quadrantTop + quadrantHalfHeight, + width: quadrantHalfWidth, + height: quadrantHalfHeight, + fill: this.themeConfig.quadrant4Fill + } + ]; + for (const quadrant of quadrants) { + quadrant.text.x = quadrant.x + quadrant.width / 2; + if (this.data.points.length === 0) { + quadrant.text.y = quadrant.y + quadrant.height / 2; + quadrant.text.horizontalPos = "middle"; + } else { + quadrant.text.y = quadrant.y + this.config.quadrantTextTopPadding; + quadrant.text.horizontalPos = "top"; + } + } + return quadrants; + } + getQuadrantPoints(spaceData) { + const { quadrantSpace } = spaceData; + const { quadrantHeight, quadrantLeft, quadrantTop, quadrantWidth } = quadrantSpace; + const xAxis = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleLinear */ .m4Y)().domain([0, 1]).range([quadrantLeft, quadrantWidth + quadrantLeft]); + const yAxis = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleLinear */ .m4Y)().domain([0, 1]).range([quadrantHeight + quadrantTop, quadrantTop]); + const points = this.data.points.map((point) => { + const props = { + x: xAxis(point.x), + y: yAxis(point.y), + fill: this.themeConfig.quadrantPointFill, + radius: this.config.pointRadius, + text: { + text: point.text, + fill: this.themeConfig.quadrantPointTextFill, + x: xAxis(point.x), + y: yAxis(point.y) + this.config.pointTextPadding, + verticalPos: "center", + horizontalPos: "top", + fontSize: this.config.pointLabelFontSize, + rotation: 0 + } + }; + return props; + }); + return points; + } + getBorders(spaceData) { + const halfExternalBorderWidth = this.config.quadrantExternalBorderStrokeWidth / 2; + const { quadrantSpace } = spaceData; + const { + quadrantHalfHeight, + quadrantHeight, + quadrantLeft, + quadrantHalfWidth, + quadrantTop, + quadrantWidth + } = quadrantSpace; + const borderLines = [ + // top border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft - halfExternalBorderWidth, + y1: quadrantTop, + x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth, + y2: quadrantTop + }, + // right border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft + quadrantWidth, + y1: quadrantTop + halfExternalBorderWidth, + x2: quadrantLeft + quadrantWidth, + y2: quadrantTop + quadrantHeight - halfExternalBorderWidth + }, + // bottom border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft - halfExternalBorderWidth, + y1: quadrantTop + quadrantHeight, + x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth, + y2: quadrantTop + quadrantHeight + }, + // left border + { + strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill, + strokeWidth: this.config.quadrantExternalBorderStrokeWidth, + x1: quadrantLeft, + y1: quadrantTop + halfExternalBorderWidth, + x2: quadrantLeft, + y2: quadrantTop + quadrantHeight - halfExternalBorderWidth + }, + // vertical inner border + { + strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill, + strokeWidth: this.config.quadrantInternalBorderStrokeWidth, + x1: quadrantLeft + quadrantHalfWidth, + y1: quadrantTop + halfExternalBorderWidth, + x2: quadrantLeft + quadrantHalfWidth, + y2: quadrantTop + quadrantHeight - halfExternalBorderWidth + }, + // horizontal inner border + { + strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill, + strokeWidth: this.config.quadrantInternalBorderStrokeWidth, + x1: quadrantLeft + halfExternalBorderWidth, + y1: quadrantTop + quadrantHalfHeight, + x2: quadrantLeft + quadrantWidth - halfExternalBorderWidth, + y2: quadrantTop + quadrantHalfHeight + } + ]; + return borderLines; + } + getTitle(showTitle) { + if (showTitle) { + return { + text: this.data.titleText, + fill: this.themeConfig.quadrantTitleFill, + fontSize: this.config.titleFontSize, + horizontalPos: "top", + verticalPos: "center", + rotation: 0, + y: this.config.titlePadding, + x: this.config.chartWidth / 2 + }; + } + return; + } + build() { + const showXAxis = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText); + const showYAxis = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText); + const showTitle = this.config.showTitle && !!this.data.titleText; + const xAxisPosition = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition; + const calculatedSpace = this.calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle); + return { + points: this.getQuadrantPoints(calculatedSpace), + quadrants: this.getQuadrants(calculatedSpace), + axisLabels: this.getAxisLabels(xAxisPosition, showXAxis, showYAxis, calculatedSpace), + borderLines: this.getBorders(calculatedSpace), + title: this.getTitle(showTitle) + }; + } +} +const config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); +function textSanitizer(text) { + return (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.trim(), config); +} +const quadrantBuilder = new QuadrantBuilder(); +function setQuadrant1Text(textObj) { + quadrantBuilder.setData({ quadrant1Text: textSanitizer(textObj.text) }); +} +function setQuadrant2Text(textObj) { + quadrantBuilder.setData({ quadrant2Text: textSanitizer(textObj.text) }); +} +function setQuadrant3Text(textObj) { + quadrantBuilder.setData({ quadrant3Text: textSanitizer(textObj.text) }); +} +function setQuadrant4Text(textObj) { + quadrantBuilder.setData({ quadrant4Text: textSanitizer(textObj.text) }); +} +function setXAxisLeftText(textObj) { + quadrantBuilder.setData({ xAxisLeftText: textSanitizer(textObj.text) }); +} +function setXAxisRightText(textObj) { + quadrantBuilder.setData({ xAxisRightText: textSanitizer(textObj.text) }); +} +function setYAxisTopText(textObj) { + quadrantBuilder.setData({ yAxisTopText: textSanitizer(textObj.text) }); +} +function setYAxisBottomText(textObj) { + quadrantBuilder.setData({ yAxisBottomText: textSanitizer(textObj.text) }); +} +function addPoint(textObj, x, y) { + quadrantBuilder.addPoints([{ x, y, text: textSanitizer(textObj.text) }]); +} +function setWidth(width) { + quadrantBuilder.setConfig({ chartWidth: width }); +} +function setHeight(height) { + quadrantBuilder.setConfig({ chartHeight: height }); +} +function getQuadrantData() { + const config2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + const { themeVariables, quadrantChart: quadrantChartConfig } = config2; + if (quadrantChartConfig) { + quadrantBuilder.setConfig(quadrantChartConfig); + } + quadrantBuilder.setThemeConfig({ + quadrant1Fill: themeVariables.quadrant1Fill, + quadrant2Fill: themeVariables.quadrant2Fill, + quadrant3Fill: themeVariables.quadrant3Fill, + quadrant4Fill: themeVariables.quadrant4Fill, + quadrant1TextFill: themeVariables.quadrant1TextFill, + quadrant2TextFill: themeVariables.quadrant2TextFill, + quadrant3TextFill: themeVariables.quadrant3TextFill, + quadrant4TextFill: themeVariables.quadrant4TextFill, + quadrantPointFill: themeVariables.quadrantPointFill, + quadrantPointTextFill: themeVariables.quadrantPointTextFill, + quadrantXAxisTextFill: themeVariables.quadrantXAxisTextFill, + quadrantYAxisTextFill: themeVariables.quadrantYAxisTextFill, + quadrantExternalBorderStrokeFill: themeVariables.quadrantExternalBorderStrokeFill, + quadrantInternalBorderStrokeFill: themeVariables.quadrantInternalBorderStrokeFill, + quadrantTitleFill: themeVariables.quadrantTitleFill + }); + quadrantBuilder.setData({ titleText: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.t)() }); + return quadrantBuilder.build(); +} +const clear = function() { + quadrantBuilder.clear(); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.v)(); +}; +const db = { + setWidth, + setHeight, + setQuadrant1Text, + setQuadrant2Text, + setQuadrant3Text, + setQuadrant4Text, + setXAxisLeftText, + setXAxisRightText, + setYAxisTopText, + setYAxisBottomText, + addPoint, + getQuadrantData, + clear, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.g, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.t, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.a, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.b +}; +const draw = (txt, id, _version, diagObj) => { + var _a, _b, _c; + function getDominantBaseLine(horizontalPos) { + return horizontalPos === "top" ? "hanging" : "middle"; + } + function getTextAnchor(verticalPos) { + return verticalPos === "left" ? "start" : "middle"; + } + function getTransformation(data) { + return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`; + } + const conf = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Rendering quadrant chart\n" + txt); + const securityLevel = conf.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); + const svg = root.select(`[id="${id}"]`); + const group = svg.append("g").attr("class", "main"); + const width = ((_a = conf.quadrantChart) == null ? void 0 : _a.chartWidth) || 500; + const height = ((_b = conf.quadrantChart) == null ? void 0 : _b.chartHeight) || 500; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.i)(svg, height, width, ((_c = conf.quadrantChart) == null ? void 0 : _c.useMaxWidth) || true); + svg.attr("viewBox", "0 0 " + width + " " + height); + diagObj.db.setHeight(height); + diagObj.db.setWidth(width); + const quadrantData = diagObj.db.getQuadrantData(); + const quadrantsGroup = group.append("g").attr("class", "quadrants"); + const borderGroup = group.append("g").attr("class", "border"); + const dataPointGroup = group.append("g").attr("class", "data-points"); + const labelGroup = group.append("g").attr("class", "labels"); + const titleGroup = group.append("g").attr("class", "title"); + if (quadrantData.title) { + titleGroup.append("text").attr("x", 0).attr("y", 0).attr("fill", quadrantData.title.fill).attr("font-size", quadrantData.title.fontSize).attr("dominant-baseline", getDominantBaseLine(quadrantData.title.horizontalPos)).attr("text-anchor", getTextAnchor(quadrantData.title.verticalPos)).attr("transform", getTransformation(quadrantData.title)).text(quadrantData.title.text); + } + if (quadrantData.borderLines) { + borderGroup.selectAll("line").data(quadrantData.borderLines).enter().append("line").attr("x1", (data) => data.x1).attr("y1", (data) => data.y1).attr("x2", (data) => data.x2).attr("y2", (data) => data.y2).style("stroke", (data) => data.strokeFill).style("stroke-width", (data) => data.strokeWidth); + } + const quadrants = quadrantsGroup.selectAll("g.quadrant").data(quadrantData.quadrants).enter().append("g").attr("class", "quadrant"); + quadrants.append("rect").attr("x", (data) => data.x).attr("y", (data) => data.y).attr("width", (data) => data.width).attr("height", (data) => data.height).attr("fill", (data) => data.fill); + quadrants.append("text").attr("x", 0).attr("y", 0).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr( + "dominant-baseline", + (data) => getDominantBaseLine(data.text.horizontalPos) + ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)).text((data) => data.text.text); + const labels = labelGroup.selectAll("g.label").data(quadrantData.axisLabels).enter().append("g").attr("class", "label"); + labels.append("text").attr("x", 0).attr("y", 0).text((data) => data.text).attr("fill", (data) => data.fill).attr("font-size", (data) => data.fontSize).attr("dominant-baseline", (data) => getDominantBaseLine(data.horizontalPos)).attr("text-anchor", (data) => getTextAnchor(data.verticalPos)).attr("transform", (data) => getTransformation(data)); + const dataPoints = dataPointGroup.selectAll("g.data-point").data(quadrantData.points).enter().append("g").attr("class", "data-point"); + dataPoints.append("circle").attr("cx", (data) => data.x).attr("cy", (data) => data.y).attr("r", (data) => data.radius).attr("fill", (data) => data.fill); + dataPoints.append("text").attr("x", 0).attr("y", 0).text((data) => data.text.text).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr( + "dominant-baseline", + (data) => getDominantBaseLine(data.text.horizontalPos) + ).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)); +}; +const renderer = { + draw +}; +const diagram = { + parser: parser$1, + db, + renderer, + styles: () => "" +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/211.25fcccf8.js b/assets/js/211.25fcccf8.js new file mode 100644 index 00000000..0156927f --- /dev/null +++ b/assets/js/211.25fcccf8.js @@ -0,0 +1,3478 @@ +"use strict"; +exports.id = 211; +exports.ids = [211]; +exports.modules = { + +/***/ 7211: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8886); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6750); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4353); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9418); + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 13], $V7 = [1, 14], $V8 = [1, 16], $V9 = [1, 17], $Va = [1, 18], $Vb = [1, 24], $Vc = [1, 25], $Vd = [1, 26], $Ve = [1, 27], $Vf = [1, 28], $Vg = [1, 29], $Vh = [1, 30], $Vi = [1, 31], $Vj = [1, 32], $Vk = [1, 33], $Vl = [1, 34], $Vm = [1, 35], $Vn = [1, 36], $Vo = [1, 37], $Vp = [1, 38], $Vq = [1, 39], $Vr = [1, 41], $Vs = [1, 42], $Vt = [1, 43], $Vu = [1, 44], $Vv = [1, 45], $Vw = [1, 46], $Vx = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $Vy = [4, 5, 16, 50, 52, 53], $Vz = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VA = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VB = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VC = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VD = [68, 69, 70], $VE = [1, 120]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SPACE": 4, "NEWLINE": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "box_section": 10, "box_line": 11, "participant_statement": 12, "create": 13, "box": 14, "restOfLine": 15, "end": 16, "signal": 17, "autonumber": 18, "NUM": 19, "off": 20, "activate": 21, "actor": 22, "deactivate": 23, "note_statement": 24, "links_statement": 25, "link_statement": 26, "properties_statement": 27, "details_statement": 28, "title": 29, "legacy_title": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "loop": 36, "rect": 37, "opt": 38, "alt": 39, "else_sections": 40, "par": 41, "par_sections": 42, "par_over": 43, "critical": 44, "option_sections": 45, "break": 46, "option": 47, "and": 48, "else": 49, "participant": 50, "AS": 51, "participant_actor": 52, "destroy": 53, "note": 54, "placement": 55, "text2": 56, "over": 57, "actor_pair": 58, "links": 59, "link": 60, "properties": 61, "details": 62, "spaceList": 63, ",": 64, "left_of": 65, "right_of": 66, "signaltype": 67, "+": 68, "-": 69, "ACTOR": 70, "SOLID_OPEN_ARROW": 71, "DOTTED_OPEN_ARROW": 72, "SOLID_ARROW": 73, "DOTTED_ARROW": 74, "SOLID_CROSS": 75, "DOTTED_CROSS": 76, "SOLID_POINT": 77, "DOTTED_POINT": 78, "TXT": 79, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 29: "title", 30: "legacy_title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "loop", 37: "rect", 38: "opt", 39: "alt", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "DOTTED_ARROW", 75: "SOLID_CROSS", 76: "DOTTED_CROSS", 77: "SOLID_POINT", 78: "DOTTED_POINT", 79: "TXT" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 1], [9, 1], [9, 2], [9, 4], [9, 2], [9, 4], [9, 3], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.apply($$[$0]); + return $$[$0]; + case 4: + case 9: + this.$ = []; + break; + case 5: + case 10: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 6: + case 7: + case 11: + case 12: + this.$ = $$[$0]; + break; + case 8: + case 13: + this.$ = []; + break; + case 15: + $$[$0].type = "createParticipant"; + this.$ = $$[$0]; + break; + case 16: + $$[$0 - 1].unshift({ type: "boxStart", boxData: yy.parseBoxData($$[$0 - 2]) }); + $$[$0 - 1].push({ type: "boxEnd", boxText: $$[$0 - 2] }); + this.$ = $$[$0 - 1]; + break; + case 18: + this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 2]), sequenceIndexStep: Number($$[$0 - 1]), sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 19: + this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 1]), sequenceIndexStep: 1, sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 20: + this.$ = { type: "sequenceIndex", sequenceVisible: false, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 21: + this.$ = { type: "sequenceIndex", sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER }; + break; + case 22: + this.$ = { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] }; + break; + case 23: + this.$ = { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 1] }; + break; + case 29: + yy.setDiagramTitle($$[$0].substring(6)); + this.$ = $$[$0].substring(6); + break; + case 30: + yy.setDiagramTitle($$[$0].substring(7)); + this.$ = $$[$0].substring(7); + break; + case 31: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 32: + case 33: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 34: + $$[$0 - 1].unshift({ type: "loopStart", loopText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.LOOP_START }); + $$[$0 - 1].push({ type: "loopEnd", loopText: $$[$0 - 2], signalType: yy.LINETYPE.LOOP_END }); + this.$ = $$[$0 - 1]; + break; + case 35: + $$[$0 - 1].unshift({ type: "rectStart", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_START }); + $$[$0 - 1].push({ type: "rectEnd", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_END }); + this.$ = $$[$0 - 1]; + break; + case 36: + $$[$0 - 1].unshift({ type: "optStart", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_START }); + $$[$0 - 1].push({ type: "optEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_END }); + this.$ = $$[$0 - 1]; + break; + case 37: + $$[$0 - 1].unshift({ type: "altStart", altText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.ALT_START }); + $$[$0 - 1].push({ type: "altEnd", signalType: yy.LINETYPE.ALT_END }); + this.$ = $$[$0 - 1]; + break; + case 38: + $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_START }); + $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END }); + this.$ = $$[$0 - 1]; + break; + case 39: + $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_OVER_START }); + $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END }); + this.$ = $$[$0 - 1]; + break; + case 40: + $$[$0 - 1].unshift({ type: "criticalStart", criticalText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.CRITICAL_START }); + $$[$0 - 1].push({ type: "criticalEnd", signalType: yy.LINETYPE.CRITICAL_END }); + this.$ = $$[$0 - 1]; + break; + case 41: + $$[$0 - 1].unshift({ type: "breakStart", breakText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_START }); + $$[$0 - 1].push({ type: "breakEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_END }); + this.$ = $$[$0 - 1]; + break; + case 43: + this.$ = $$[$0 - 3].concat([{ type: "option", optionText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.CRITICAL_OPTION }, $$[$0]]); + break; + case 45: + this.$ = $$[$0 - 3].concat([{ type: "and", parText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.PAR_AND }, $$[$0]]); + break; + case 47: + this.$ = $$[$0 - 3].concat([{ type: "else", altText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.ALT_ELSE }, $$[$0]]); + break; + case 48: + $$[$0 - 3].draw = "participant"; + $$[$0 - 3].type = "addParticipant"; + $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]); + this.$ = $$[$0 - 3]; + break; + case 49: + $$[$0 - 1].draw = "participant"; + $$[$0 - 1].type = "addParticipant"; + this.$ = $$[$0 - 1]; + break; + case 50: + $$[$0 - 3].draw = "actor"; + $$[$0 - 3].type = "addParticipant"; + $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]); + this.$ = $$[$0 - 3]; + break; + case 51: + $$[$0 - 1].draw = "actor"; + $$[$0 - 1].type = "addParticipant"; + this.$ = $$[$0 - 1]; + break; + case 52: + $$[$0 - 1].type = "destroyParticipant"; + this.$ = $$[$0 - 1]; + break; + case 53: + this.$ = [$$[$0 - 1], { type: "addNote", placement: $$[$0 - 2], actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 54: + $$[$0 - 2] = [].concat($$[$0 - 1], $$[$0 - 1]).slice(0, 2); + $$[$0 - 2][0] = $$[$0 - 2][0].actor; + $$[$0 - 2][1] = $$[$0 - 2][1].actor; + this.$ = [$$[$0 - 1], { type: "addNote", placement: yy.PLACEMENT.OVER, actor: $$[$0 - 2].slice(0, 2), text: $$[$0] }]; + break; + case 55: + this.$ = [$$[$0 - 1], { type: "addLinks", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 56: + this.$ = [$$[$0 - 1], { type: "addALink", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 57: + this.$ = [$$[$0 - 1], { type: "addProperties", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 58: + this.$ = [$$[$0 - 1], { type: "addDetails", actor: $$[$0 - 1].actor, text: $$[$0] }]; + break; + case 61: + this.$ = [$$[$0 - 2], $$[$0]]; + break; + case 62: + this.$ = $$[$0]; + break; + case 63: + this.$ = yy.PLACEMENT.LEFTOF; + break; + case 64: + this.$ = yy.PLACEMENT.RIGHTOF; + break; + case 65: + this.$ = [ + $$[$0 - 4], + $$[$0 - 1], + { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0], activate: true }, + { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] } + ]; + break; + case 66: + this.$ = [ + $$[$0 - 4], + $$[$0 - 1], + { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0] }, + { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 4] } + ]; + break; + case 67: + this.$ = [$$[$0 - 3], $$[$0 - 1], { type: "addMessage", from: $$[$0 - 3].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 2], msg: $$[$0] }]; + break; + case 68: + this.$ = { type: "addParticipant", actor: $$[$0] }; + break; + case 69: + this.$ = yy.LINETYPE.SOLID_OPEN; + break; + case 70: + this.$ = yy.LINETYPE.DOTTED_OPEN; + break; + case 71: + this.$ = yy.LINETYPE.SOLID; + break; + case 72: + this.$ = yy.LINETYPE.DOTTED; + break; + case 73: + this.$ = yy.LINETYPE.SOLID_CROSS; + break; + case 74: + this.$ = yy.LINETYPE.DOTTED_CROSS; + break; + case 75: + this.$ = yy.LINETYPE.SOLID_POINT; + break; + case 76: + this.$ = yy.LINETYPE.DOTTED_POINT; + break; + case 77: + this.$ = yy.parseMessage($$[$0].trim().substring(1)); + break; + } + }, + table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 5]), { 9: 47, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 7]), o($Vx, [2, 8]), o($Vx, [2, 14]), { 12: 48, 50: $Vo, 52: $Vp, 53: $Vq }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: $Vw }, { 22: 55, 70: $Vw }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, o($Vx, [2, 29]), o($Vx, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, o($Vx, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: $Vw }, { 22: 72, 70: $Vw }, { 22: 73, 70: $Vw }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82] }, { 55: 83, 57: [1, 84], 65: [1, 85], 66: [1, 86] }, { 22: 87, 70: $Vw }, { 22: 88, 70: $Vw }, { 22: 89, 70: $Vw }, { 22: 90, 70: $Vw }, o([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79], [2, 68]), o($Vx, [2, 6]), o($Vx, [2, 15]), o($Vy, [2, 9], { 10: 91 }), o($Vx, [2, 17]), { 5: [1, 93], 19: [1, 92] }, { 5: [1, 94] }, o($Vx, [2, 21]), { 5: [1, 95] }, { 5: [1, 96] }, o($Vx, [2, 24]), o($Vx, [2, 25]), o($Vx, [2, 26]), o($Vx, [2, 27]), o($Vx, [2, 28]), o($Vx, [2, 31]), o($Vx, [2, 32]), o($Vz, $V3, { 7: 97 }), o($Vz, $V3, { 7: 98 }), o($Vz, $V3, { 7: 99 }), o($VA, $V3, { 40: 100, 7: 101 }), o($VB, $V3, { 42: 102, 7: 103 }), o($VB, $V3, { 7: 103, 42: 104 }), o($VC, $V3, { 45: 105, 7: 106 }), o($Vz, $V3, { 7: 107 }), { 5: [1, 109], 51: [1, 108] }, { 5: [1, 111], 51: [1, 110] }, { 5: [1, 112] }, { 22: 115, 68: [1, 113], 69: [1, 114], 70: $Vw }, o($VD, [2, 69]), o($VD, [2, 70]), o($VD, [2, 71]), o($VD, [2, 72]), o($VD, [2, 73]), o($VD, [2, 74]), o($VD, [2, 75]), o($VD, [2, 76]), { 22: 116, 70: $Vw }, { 22: 118, 58: 117, 70: $Vw }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 119, 79: $VE }, { 56: 121, 79: $VE }, { 56: 122, 79: $VE }, { 56: 123, 79: $VE }, { 4: [1, 126], 5: [1, 128], 11: 125, 12: 127, 16: [1, 124], 50: $Vo, 52: $Vp, 53: $Vq }, { 5: [1, 129] }, o($Vx, [2, 19]), o($Vx, [2, 20]), o($Vx, [2, 22]), o($Vx, [2, 23]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 130], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 131], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 132], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 133] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 46], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 49: [1, 134], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 135] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 44], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 48: [1, 136], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 42], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 47: [1, 139], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 140], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 15: [1, 141] }, o($Vx, [2, 49]), { 15: [1, 142] }, o($Vx, [2, 51]), o($Vx, [2, 52]), { 22: 143, 70: $Vw }, { 22: 144, 70: $Vw }, { 56: 145, 79: $VE }, { 56: 146, 79: $VE }, { 56: 147, 79: $VE }, { 64: [1, 148], 79: [2, 62] }, { 5: [2, 55] }, { 5: [2, 77] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, o($Vx, [2, 16]), o($Vy, [2, 10]), { 12: 149, 50: $Vo, 52: $Vp, 53: $Vq }, o($Vy, [2, 12]), o($Vy, [2, 13]), o($Vx, [2, 18]), o($Vx, [2, 34]), o($Vx, [2, 35]), o($Vx, [2, 36]), o($Vx, [2, 37]), { 15: [1, 150] }, o($Vx, [2, 38]), { 15: [1, 151] }, o($Vx, [2, 39]), o($Vx, [2, 40]), { 15: [1, 152] }, o($Vx, [2, 41]), { 5: [1, 153] }, { 5: [1, 154] }, { 56: 155, 79: $VE }, { 56: 156, 79: $VE }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 157, 70: $Vw }, o($Vy, [2, 11]), o($VA, $V3, { 7: 101, 40: 158 }), o($VB, $V3, { 7: 103, 42: 159 }), o($VC, $V3, { 7: 106, 45: 160 }), o($Vx, [2, 48]), o($Vx, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 79: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }], + defaultActions: { 5: [2, 1], 6: [2, 2], 85: [2, 63], 86: [2, 64], 119: [2, 55], 120: [2, 77], 121: [2, 56], 122: [2, 57], 123: [2, 58], 145: [2, 67], 146: [2, 53], 147: [2, 54], 155: [2, 65], 156: [2, 66], 157: [2, 61], 158: [2, 47], 159: [2, 45], 160: [2, 43] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state2, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state2 = stack[stack.length - 1]; + if (this.defaultActions[state2]) { + action = this.defaultActions[state2]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state2] && table[state2][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state2]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 5; + case 1: + break; + case 2: + break; + case 3: + break; + case 4: + break; + case 5: + break; + case 6: + return 19; + case 7: + this.begin("LINE"); + return 14; + case 8: + this.begin("ID"); + return 50; + case 9: + this.begin("ID"); + return 52; + case 10: + return 13; + case 11: + this.begin("ID"); + return 53; + case 12: + yy_.yytext = yy_.yytext.trim(); + this.begin("ALIAS"); + return 70; + case 13: + this.popState(); + this.popState(); + this.begin("LINE"); + return 51; + case 14: + this.popState(); + this.popState(); + return 5; + case 15: + this.begin("LINE"); + return 36; + case 16: + this.begin("LINE"); + return 37; + case 17: + this.begin("LINE"); + return 38; + case 18: + this.begin("LINE"); + return 39; + case 19: + this.begin("LINE"); + return 49; + case 20: + this.begin("LINE"); + return 41; + case 21: + this.begin("LINE"); + return 43; + case 22: + this.begin("LINE"); + return 48; + case 23: + this.begin("LINE"); + return 44; + case 24: + this.begin("LINE"); + return 47; + case 25: + this.begin("LINE"); + return 46; + case 26: + this.popState(); + return 15; + case 27: + return 16; + case 28: + return 65; + case 29: + return 66; + case 30: + return 59; + case 31: + return 60; + case 32: + return 61; + case 33: + return 62; + case 34: + return 57; + case 35: + return 54; + case 36: + this.begin("ID"); + return 21; + case 37: + this.begin("ID"); + return 23; + case 38: + return 29; + case 39: + return 30; + case 40: + this.begin("acc_title"); + return 31; + case 41: + this.popState(); + return "acc_title_value"; + case 42: + this.begin("acc_descr"); + return 33; + case 43: + this.popState(); + return "acc_descr_value"; + case 44: + this.begin("acc_descr_multiline"); + break; + case 45: + this.popState(); + break; + case 46: + return "acc_descr_multiline_value"; + case 47: + return 6; + case 48: + return 18; + case 49: + return 20; + case 50: + return 64; + case 51: + return 5; + case 52: + yy_.yytext = yy_.yytext.trim(); + return 70; + case 53: + return 73; + case 54: + return 74; + case 55: + return 71; + case 56: + return 72; + case 57: + return 75; + case 58: + return 76; + case 59: + return 77; + case 60: + return 78; + case 61: + return 79; + case 62: + return 68; + case 63: + return 69; + case 64: + return 5; + case 65: + return "INVALID"; + } + }, + rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:par_over\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [45, 46], "inclusive": false }, "acc_descr": { "rules": [43], "inclusive": false }, "acc_title": { "rules": [41], "inclusive": false }, "ID": { "rules": [2, 3, 12], "inclusive": false }, "ALIAS": { "rules": [2, 3, 13, 14], "inclusive": false }, "LINE": { "rules": [2, 3, 26], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +class ImperativeState { + /** + * @param init - Function that creates the default state. + */ + constructor(init) { + this.init = init; + this.records = this.init(); + } + reset() { + this.records = this.init(); + } +} +const state = new ImperativeState(() => ({ + prevActor: void 0, + actors: {}, + createdActors: {}, + destroyedActors: {}, + boxes: [], + messages: [], + notes: [], + sequenceNumbersEnabled: false, + wrapEnabled: void 0, + currentBox: void 0, + lastCreated: void 0, + lastDestroyed: void 0 +})); +const addBox = function(data) { + state.records.boxes.push({ + name: data.text, + wrap: data.wrap === void 0 && autoWrap() || !!data.wrap, + fill: data.color, + actorKeys: [] + }); + state.records.currentBox = state.records.boxes.slice(-1)[0]; +}; +const addActor = function(id, name, description, type) { + let assignedBox = state.records.currentBox; + const old = state.records.actors[id]; + if (old) { + if (state.records.currentBox && old.box && state.records.currentBox !== old.box) { + throw new Error( + "A same participant should only be defined in one Box: " + old.name + " can't be in '" + old.box.name + "' and in '" + state.records.currentBox.name + "' at the same time." + ); + } + assignedBox = old.box ? old.box : state.records.currentBox; + old.box = assignedBox; + if (old && name === old.name && description == null) { + return; + } + } + if (description == null || description.text == null) { + description = { text: name, wrap: null, type }; + } + if (type == null || description.text == null) { + description = { text: name, wrap: null, type }; + } + state.records.actors[id] = { + box: assignedBox, + name, + description: description.text, + wrap: description.wrap === void 0 && autoWrap() || !!description.wrap, + prevActor: state.records.prevActor, + links: {}, + properties: {}, + actorCnt: null, + rectData: null, + type: type || "participant" + }; + if (state.records.prevActor && state.records.actors[state.records.prevActor]) { + state.records.actors[state.records.prevActor].nextActor = id; + } + if (state.records.currentBox) { + state.records.currentBox.actorKeys.push(id); + } + state.records.prevActor = id; +}; +const activationCount = (part) => { + let i; + let count = 0; + for (i = 0; i < state.records.messages.length; i++) { + if (state.records.messages[i].type === LINETYPE.ACTIVE_START && state.records.messages[i].from.actor === part) { + count++; + } + if (state.records.messages[i].type === LINETYPE.ACTIVE_END && state.records.messages[i].from.actor === part) { + count--; + } + } + return count; +}; +const addMessage = function(idFrom, idTo, message, answer) { + state.records.messages.push({ + from: idFrom, + to: idTo, + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, + answer + }); +}; +const addSignal = function(idFrom, idTo, message = { text: void 0, wrap: void 0 }, messageType, activate = false) { + if (messageType === LINETYPE.ACTIVE_END) { + const cnt = activationCount(idFrom.actor); + if (cnt < 1) { + let error = new Error("Trying to inactivate an inactive participant (" + idFrom.actor + ")"); + error.hash = { + text: "->>-", + token: "->>-", + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["'ACTIVE_PARTICIPANT'"] + }; + throw error; + } + } + state.records.messages.push({ + from: idFrom, + to: idTo, + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, + type: messageType, + activate + }); + return true; +}; +const hasAtLeastOneBox = function() { + return state.records.boxes.length > 0; +}; +const hasAtLeastOneBoxWithTitle = function() { + return state.records.boxes.some((b) => b.name); +}; +const getMessages = function() { + return state.records.messages; +}; +const getBoxes = function() { + return state.records.boxes; +}; +const getActors = function() { + return state.records.actors; +}; +const getCreatedActors = function() { + return state.records.createdActors; +}; +const getDestroyedActors = function() { + return state.records.destroyedActors; +}; +const getActor = function(id) { + return state.records.actors[id]; +}; +const getActorKeys = function() { + return Object.keys(state.records.actors); +}; +const enableSequenceNumbers = function() { + state.records.sequenceNumbersEnabled = true; +}; +const disableSequenceNumbers = function() { + state.records.sequenceNumbersEnabled = false; +}; +const showSequenceNumbers = () => state.records.sequenceNumbersEnabled; +const setWrap = function(wrapSetting) { + state.records.wrapEnabled = wrapSetting; +}; +const autoWrap = () => { + if (state.records.wrapEnabled !== void 0) { + return state.records.wrapEnabled; + } + return (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().sequence.wrap; +}; +const clear = function() { + state.reset(); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.v)(); +}; +const parseMessage = function(str) { + const _str = str.trim(); + const message = { + text: _str.replace(/^:?(?:no)?wrap:/, "").trim(), + wrap: _str.match(/^:?wrap:/) !== null ? true : _str.match(/^:?nowrap:/) !== null ? false : void 0 + }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("parseMessage:", message); + return message; +}; +const parseBoxData = function(str) { + const match = str.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/); + let color = match != null && match[1] ? match[1].trim() : "transparent"; + let title = match != null && match[2] ? match[2].trim() : void 0; + if (window && window.CSS) { + if (!window.CSS.supports("color", color)) { + color = "transparent"; + title = str.trim(); + } + } else { + const style = new Option().style; + style.color = color; + if (style.color !== color) { + color = "transparent"; + title = str.trim(); + } + } + return { + color, + text: title !== void 0 ? (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.d)(title.replace(/^:?(?:no)?wrap:/, ""), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()) : void 0, + wrap: title !== void 0 ? title.match(/^:?wrap:/) !== null ? true : title.match(/^:?nowrap:/) !== null ? false : void 0 : void 0 + }; +}; +const LINETYPE = { + SOLID: 0, + DOTTED: 1, + NOTE: 2, + SOLID_CROSS: 3, + DOTTED_CROSS: 4, + SOLID_OPEN: 5, + DOTTED_OPEN: 6, + LOOP_START: 10, + LOOP_END: 11, + ALT_START: 12, + ALT_ELSE: 13, + ALT_END: 14, + OPT_START: 15, + OPT_END: 16, + ACTIVE_START: 17, + ACTIVE_END: 18, + PAR_START: 19, + PAR_AND: 20, + PAR_END: 21, + RECT_START: 22, + RECT_END: 23, + SOLID_POINT: 24, + DOTTED_POINT: 25, + AUTONUMBER: 26, + CRITICAL_START: 27, + CRITICAL_OPTION: 28, + CRITICAL_END: 29, + BREAK_START: 30, + BREAK_END: 31, + PAR_OVER_START: 32 +}; +const ARROWTYPE = { + FILLED: 0, + OPEN: 1 +}; +const PLACEMENT = { + LEFTOF: 0, + RIGHTOF: 1, + OVER: 2 +}; +const addNote = function(actor, placement, message) { + const note = { + actor, + placement, + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap + }; + const actors = [].concat(actor, actor); + state.records.notes.push(note); + state.records.messages.push({ + from: actors[0], + to: actors[1], + message: message.text, + wrap: message.wrap === void 0 && autoWrap() || !!message.wrap, + type: LINETYPE.NOTE, + placement + }); +}; +const addLinks = function(actorId, text) { + const actor = getActor(actorId); + try { + let sanitizedText = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.text, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + sanitizedText = sanitizedText.replace(/&/g, "&"); + sanitizedText = sanitizedText.replace(/=/g, "="); + const links = JSON.parse(sanitizedText); + insertLinks(actor, links); + } catch (e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor link text", e); + } +}; +const addALink = function(actorId, text) { + const actor = getActor(actorId); + try { + const links = {}; + let sanitizedText = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.text, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + var sep = sanitizedText.indexOf("@"); + sanitizedText = sanitizedText.replace(/&/g, "&"); + sanitizedText = sanitizedText.replace(/=/g, "="); + var label = sanitizedText.slice(0, sep - 1).trim(); + var link = sanitizedText.slice(sep + 1).trim(); + links[label] = link; + insertLinks(actor, links); + } catch (e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor link text", e); + } +}; +function insertLinks(actor, links) { + if (actor.links == null) { + actor.links = links; + } else { + for (let key in links) { + actor.links[key] = links[key]; + } + } +} +const addProperties = function(actorId, text) { + const actor = getActor(actorId); + try { + let sanitizedText = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.text, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + const properties = JSON.parse(sanitizedText); + insertProperties(actor, properties); + } catch (e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor properties text", e); + } +}; +function insertProperties(actor, properties) { + if (actor.properties == null) { + actor.properties = properties; + } else { + for (let key in properties) { + actor.properties[key] = properties[key]; + } + } +} +function boxEnd() { + state.records.currentBox = void 0; +} +const addDetails = function(actorId, text) { + const actor = getActor(actorId); + const elem = document.getElementById(text.text); + try { + const text2 = elem.innerHTML; + const details = JSON.parse(text2); + if (details["properties"]) { + insertProperties(actor, details["properties"]); + } + if (details["links"]) { + insertLinks(actor, details["links"]); + } + } catch (e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor details text", e); + } +}; +const getActorProperty = function(actor, key) { + if (actor !== void 0 && actor.properties !== void 0) { + return actor.properties[key]; + } + return void 0; +}; +const apply = function(param) { + if (Array.isArray(param)) { + param.forEach(function(item) { + apply(item); + }); + } else { + switch (param.type) { + case "sequenceIndex": + state.records.messages.push({ + from: void 0, + to: void 0, + message: { + start: param.sequenceIndex, + step: param.sequenceIndexStep, + visible: param.sequenceVisible + }, + wrap: false, + type: param.signalType + }); + break; + case "addParticipant": + addActor(param.actor, param.actor, param.description, param.draw); + break; + case "createParticipant": + if (state.records.actors[param.actor]) { + throw new Error( + "It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior" + ); + } + state.records.lastCreated = param.actor; + addActor(param.actor, param.actor, param.description, param.draw); + state.records.createdActors[param.actor] = state.records.messages.length; + break; + case "destroyParticipant": + state.records.lastDestroyed = param.actor; + state.records.destroyedActors[param.actor] = state.records.messages.length; + break; + case "activeStart": + addSignal(param.actor, void 0, void 0, param.signalType); + break; + case "activeEnd": + addSignal(param.actor, void 0, void 0, param.signalType); + break; + case "addNote": + addNote(param.actor, param.placement, param.text); + break; + case "addLinks": + addLinks(param.actor, param.text); + break; + case "addALink": + addALink(param.actor, param.text); + break; + case "addProperties": + addProperties(param.actor, param.text); + break; + case "addDetails": + addDetails(param.actor, param.text); + break; + case "addMessage": + if (state.records.lastCreated) { + if (param.to !== state.records.lastCreated) { + throw new Error( + "The created participant " + state.records.lastCreated + " does not have an associated creating message after its declaration. Please check the sequence diagram." + ); + } else { + state.records.lastCreated = void 0; + } + } else if (state.records.lastDestroyed) { + if (param.to !== state.records.lastDestroyed && param.from !== state.records.lastDestroyed) { + throw new Error( + "The destroyed participant " + state.records.lastDestroyed + " does not have an associated destroying message after its declaration. Please check the sequence diagram." + ); + } else { + state.records.lastDestroyed = void 0; + } + } + addSignal(param.from, param.to, param.msg, param.signalType, param.activate); + break; + case "boxStart": + addBox(param.boxData); + break; + case "boxEnd": + boxEnd(); + break; + case "loopStart": + addSignal(void 0, void 0, param.loopText, param.signalType); + break; + case "loopEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "rectStart": + addSignal(void 0, void 0, param.color, param.signalType); + break; + case "rectEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "optStart": + addSignal(void 0, void 0, param.optText, param.signalType); + break; + case "optEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "altStart": + addSignal(void 0, void 0, param.altText, param.signalType); + break; + case "else": + addSignal(void 0, void 0, param.altText, param.signalType); + break; + case "altEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "setAccTitle": + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.s)(param.text); + break; + case "parStart": + addSignal(void 0, void 0, param.parText, param.signalType); + break; + case "and": + addSignal(void 0, void 0, param.parText, param.signalType); + break; + case "parEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "criticalStart": + addSignal(void 0, void 0, param.criticalText, param.signalType); + break; + case "option": + addSignal(void 0, void 0, param.optionText, param.signalType); + break; + case "criticalEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + case "breakStart": + addSignal(void 0, void 0, param.breakText, param.signalType); + break; + case "breakEnd": + addSignal(void 0, void 0, void 0, param.signalType); + break; + } + } +}; +const db = { + addActor, + addMessage, + addSignal, + addLinks, + addDetails, + addProperties, + autoWrap, + setWrap, + enableSequenceNumbers, + disableSequenceNumbers, + showSequenceNumbers, + getMessages, + getActors, + getCreatedActors, + getDestroyedActors, + getActor, + getActorKeys, + getActorProperty, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.g, + getBoxes, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.t, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.q, + getConfig: () => (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().sequence, + clear, + parseMessage, + parseBoxData, + LINETYPE, + ARROWTYPE, + PLACEMENT, + addNote, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.s, + apply, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.b, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.a, + hasAtLeastOneBox, + hasAtLeastOneBoxWithTitle +}; +const getStyles = (options) => `.actor { + stroke: ${options.actorBorder}; + fill: ${options.actorBkg}; + } + + text.actor > tspan { + fill: ${options.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${options.actorLineColor}; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${options.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${options.signalColor}; + } + + #arrowhead path { + fill: ${options.signalColor}; + stroke: ${options.signalColor}; + } + + .sequenceNumber { + fill: ${options.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${options.signalColor}; + } + + #crosshead path { + fill: ${options.signalColor}; + stroke: ${options.signalColor}; + } + + .messageText { + fill: ${options.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${options.labelBoxBorderColor}; + fill: ${options.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${options.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${options.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${options.labelBoxBorderColor}; + fill: ${options.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${options.noteBorderColor}; + fill: ${options.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${options.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${options.activationBkgColor}; + stroke: ${options.activationBorderColor}; + } + + .activation1 { + fill: ${options.activationBkgColor}; + stroke: ${options.activationBorderColor}; + } + + .activation2 { + fill: ${options.activationBkgColor}; + stroke: ${options.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${options.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${options.actorBorder}; + fill: ${options.actorBkg}; + } + .actor-man circle, line { + stroke: ${options.actorBorder}; + fill: ${options.actorBkg}; + stroke-width: 2px; + } +`; +const styles = getStyles; +const ACTOR_TYPE_WIDTH = 18 * 2; +const TOP_ACTOR_CLASS = "actor-top"; +const BOTTOM_ACTOR_CLASS = "actor-bottom"; +const drawRect = function(elem, rectData) { + return (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.d)(elem, rectData); +}; +const drawPopup = function(elem, actor, minMenuWidth, textAttrs, forceMenus) { + if (actor.links === void 0 || actor.links === null || Object.keys(actor.links).length === 0) { + return { height: 0, width: 0 }; + } + const links = actor.links; + const actorCnt2 = actor.actorCnt; + const rectData = actor.rectData; + var displayValue = "none"; + if (forceMenus) { + displayValue = "block !important"; + } + const g = elem.append("g"); + g.attr("id", "actor" + actorCnt2 + "_popup"); + g.attr("class", "actorPopupMenu"); + g.attr("display", displayValue); + var actorClass = ""; + if (rectData.class !== void 0) { + actorClass = " " + rectData.class; + } + let menuWidth = rectData.width > minMenuWidth ? rectData.width : minMenuWidth; + const rectElem = g.append("rect"); + rectElem.attr("class", "actorPopupMenuPanel" + actorClass); + rectElem.attr("x", rectData.x); + rectElem.attr("y", rectData.height); + rectElem.attr("fill", rectData.fill); + rectElem.attr("stroke", rectData.stroke); + rectElem.attr("width", menuWidth); + rectElem.attr("height", rectData.height); + rectElem.attr("rx", rectData.rx); + rectElem.attr("ry", rectData.ry); + if (links != null) { + var linkY = 20; + for (let key in links) { + var linkElem = g.append("a"); + var sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .Jf)(links[key]); + linkElem.attr("xlink:href", sanitizedLink); + linkElem.attr("target", "_blank"); + _drawMenuItemTextCandidateFunc(textAttrs)( + key, + linkElem, + rectData.x + 10, + rectData.height + linkY, + menuWidth, + 20, + { class: "actor" }, + textAttrs + ); + linkY += 30; + } + } + rectElem.attr("height", linkY); + return { height: rectData.height + linkY, width: menuWidth }; +}; +const popupMenuToggle = function(popId) { + return "var pu = document.getElementById('" + popId + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"; +}; +const drawKatex = async function(elem, textData, msgModel = null) { + let textElem = elem.append("foreignObject"); + const lines = await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.r)(textData.text, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.F)()); + const divElem = textElem.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(lines); + const dim = divElem.node().getBoundingClientRect(); + textElem.attr("height", Math.round(dim.height)).attr("width", Math.round(dim.width)); + if (textData.class === "noteText") { + const rectElem = elem.node().firstChild; + rectElem.setAttribute("height", dim.height + 2 * textData.textMargin); + const rectDim = rectElem.getBBox(); + textElem.attr("x", Math.round(rectDim.x + rectDim.width / 2 - dim.width / 2)).attr("y", Math.round(rectDim.y + rectDim.height / 2 - dim.height / 2)); + } else if (msgModel) { + let { startx, stopx, starty } = msgModel; + if (startx > stopx) { + const temp = startx; + startx = stopx; + stopx = temp; + } + textElem.attr("x", Math.round(startx + Math.abs(startx - stopx) / 2 - dim.width / 2)); + if (textData.class === "loopText") { + textElem.attr("y", Math.round(starty)); + } else { + textElem.attr("y", Math.round(starty - dim.height)); + } + } + return [textElem]; +}; +const drawText = function(elem, textData) { + let prevTextHeight = 0; + let textHeight = 0; + const lines = textData.text.split(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex); + const [_textFontSize, _textFontSizePx] = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.D)(textData.fontSize); + let textElems = []; + let dy = 0; + let yfunc = () => textData.y; + if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) { + switch (textData.valign) { + case "top": + case "start": + yfunc = () => Math.round(textData.y + textData.textMargin); + break; + case "middle": + case "center": + yfunc = () => Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2); + break; + case "bottom": + case "end": + yfunc = () => Math.round( + textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin + ); + break; + } + } + if (textData.anchor !== void 0 && textData.textMargin !== void 0 && textData.width !== void 0) { + switch (textData.anchor) { + case "left": + case "start": + textData.x = Math.round(textData.x + textData.textMargin); + textData.anchor = "start"; + textData.dominantBaseline = "middle"; + textData.alignmentBaseline = "middle"; + break; + case "middle": + case "center": + textData.x = Math.round(textData.x + textData.width / 2); + textData.anchor = "middle"; + textData.dominantBaseline = "middle"; + textData.alignmentBaseline = "middle"; + break; + case "right": + case "end": + textData.x = Math.round(textData.x + textData.width - textData.textMargin); + textData.anchor = "end"; + textData.dominantBaseline = "middle"; + textData.alignmentBaseline = "middle"; + break; + } + } + for (let [i, line] of lines.entries()) { + if (textData.textMargin !== void 0 && textData.textMargin === 0 && _textFontSize !== void 0) { + dy = i * _textFontSize; + } + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", yfunc()); + if (textData.anchor !== void 0) { + textElem.attr("text-anchor", textData.anchor).attr("dominant-baseline", textData.dominantBaseline).attr("alignment-baseline", textData.alignmentBaseline); + } + if (textData.fontFamily !== void 0) { + textElem.style("font-family", textData.fontFamily); + } + if (_textFontSizePx !== void 0) { + textElem.style("font-size", _textFontSizePx); + } + if (textData.fontWeight !== void 0) { + textElem.style("font-weight", textData.fontWeight); + } + if (textData.fill !== void 0) { + textElem.attr("fill", textData.fill); + } + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + if (textData.dy !== void 0) { + textElem.attr("dy", textData.dy); + } else if (dy !== 0) { + textElem.attr("dy", dy); + } + const text = line || _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.Z; + if (textData.tspan) { + const span = textElem.append("tspan"); + span.attr("x", textData.x); + if (textData.fill !== void 0) { + span.attr("fill", textData.fill); + } + span.text(text); + } else { + textElem.text(text); + } + if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) { + textHeight += (textElem._groups || textElem)[0][0].getBBox().height; + prevTextHeight = textHeight; + } + textElems.push(textElem); + } + return textElems; +}; +const drawLabel = function(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.height / 2; + drawText(elem, txtObject); + return polygon; +}; +let actorCnt = -1; +const fixLifeLineHeights = (diagram2, actors, actorKeys, conf2) => { + if (!diagram2.select) { + return; + } + actorKeys.forEach((actorKey) => { + const actor = actors[actorKey]; + const actorDOM = diagram2.select("#actor" + actor.actorCnt); + if (!conf2.mirrorActors && actor.stopy) { + actorDOM.attr("y2", actor.stopy + actor.height / 2); + } else if (conf2.mirrorActors) { + actorDOM.attr("y2", actor.stopy); + } + }); +}; +const drawActorTypeParticipant = async function(elem, actor, conf2, isFooter) { + const actorY = isFooter ? actor.stopy : actor.starty; + const center = actor.x + actor.width / 2; + const centerY = actorY + 5; + const boxplusLineGroup = elem.append("g").lower(); + var g = boxplusLineGroup; + if (!isFooter) { + actorCnt++; + if (Object.keys(actor.links || {}).length && !conf2.forceMenus) { + g.attr("onclick", popupMenuToggle(`actor${actorCnt}_popup`)).attr("cursor", "pointer"); + } + g.append("line").attr("id", "actor" + actorCnt).attr("x1", center).attr("y1", centerY).attr("x2", center).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"); + g = boxplusLineGroup.append("g"); + actor.actorCnt = actorCnt; + if (actor.links != null) { + g.attr("id", "root-" + actorCnt); + } + } + const rect = (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.g)(); + var cssclass = "actor"; + if (actor.properties != null && actor.properties["class"]) { + cssclass = actor.properties["class"]; + } else { + rect.fill = "#eaeaea"; + } + if (isFooter) { + cssclass += ` ${BOTTOM_ACTOR_CLASS}`; + } else { + cssclass += ` ${TOP_ACTOR_CLASS}`; + } + rect.x = actor.x; + rect.y = actorY; + rect.width = actor.width; + rect.height = actor.height; + rect.class = cssclass; + rect.rx = 3; + rect.ry = 3; + rect.name = actor.name; + const rectElem = drawRect(g, rect); + actor.rectData = rect; + if (actor.properties != null && actor.properties["icon"]) { + const iconSrc = actor.properties["icon"].trim(); + if (iconSrc.charAt(0) === "@") { + (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.b)(g, rect.x + rect.width - 20, rect.y + 10, iconSrc.substr(1)); + } else { + (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.c)(g, rect.x + rect.width - 20, rect.y + 10, iconSrc); + } + } + await _drawTextCandidateFunc(conf2, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.G)(actor.description))( + actor.description, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "actor" }, + conf2 + ); + let height = actor.height; + if (rectElem.node) { + const bounds2 = rectElem.node().getBBox(); + actor.height = bounds2.height; + height = bounds2.height; + } + return height; +}; +const drawActorTypeActor = async function(elem, actor, conf2, isFooter) { + const actorY = isFooter ? actor.stopy : actor.starty; + const center = actor.x + actor.width / 2; + const centerY = actorY + 80; + elem.lower(); + if (!isFooter) { + actorCnt++; + elem.append("line").attr("id", "actor" + actorCnt).attr("x1", center).attr("y1", centerY).attr("x2", center).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999"); + actor.actorCnt = actorCnt; + } + const actElem = elem.append("g"); + let cssClass = "actor-man"; + if (isFooter) { + cssClass += ` ${BOTTOM_ACTOR_CLASS}`; + } else { + cssClass += ` ${TOP_ACTOR_CLASS}`; + } + actElem.attr("class", cssClass); + actElem.attr("name", actor.name); + const rect = (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.g)(); + rect.x = actor.x; + rect.y = actorY; + rect.fill = "#eaeaea"; + rect.width = actor.width; + rect.height = actor.height; + rect.class = "actor"; + rect.rx = 3; + rect.ry = 3; + actElem.append("line").attr("id", "actor-man-torso" + actorCnt).attr("x1", center).attr("y1", actorY + 25).attr("x2", center).attr("y2", actorY + 45); + actElem.append("line").attr("id", "actor-man-arms" + actorCnt).attr("x1", center - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 33).attr("x2", center + ACTOR_TYPE_WIDTH / 2).attr("y2", actorY + 33); + actElem.append("line").attr("x1", center - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 60).attr("x2", center).attr("y2", actorY + 45); + actElem.append("line").attr("x1", center).attr("y1", actorY + 45).attr("x2", center + ACTOR_TYPE_WIDTH / 2 - 2).attr("y2", actorY + 60); + const circle = actElem.append("circle"); + circle.attr("cx", actor.x + actor.width / 2); + circle.attr("cy", actorY + 10); + circle.attr("r", 15); + circle.attr("width", actor.width); + circle.attr("height", actor.height); + const bounds2 = actElem.node().getBBox(); + actor.height = bounds2.height; + await _drawTextCandidateFunc(conf2, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.G)(actor.description))( + actor.description, + actElem, + rect.x, + rect.y + 35, + rect.width, + rect.height, + { class: "actor" }, + conf2 + ); + return actor.height; +}; +const drawActor = async function(elem, actor, conf2, isFooter) { + switch (actor.type) { + case "actor": + return await drawActorTypeActor(elem, actor, conf2, isFooter); + case "participant": + return await drawActorTypeParticipant(elem, actor, conf2, isFooter); + } +}; +const drawBox = async function(elem, box, conf2) { + const boxplusTextGroup = elem.append("g"); + const g = boxplusTextGroup; + drawBackgroundRect(g, box); + if (box.name) { + await _drawTextCandidateFunc(conf2)( + box.name, + g, + box.x, + box.y + (box.textMaxHeight || 0) / 2, + box.width, + 0, + { class: "text" }, + conf2 + ); + } + g.lower(); +}; +const anchorElement = function(elem) { + return elem.append("g"); +}; +const drawActivation = function(elem, bounds2, verticalPos, conf2, actorActivations2) { + const rect = (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.g)(); + const g = bounds2.anchored; + rect.x = bounds2.startx; + rect.y = bounds2.starty; + rect.class = "activation" + actorActivations2 % 3; + rect.width = bounds2.stopx - bounds2.startx; + rect.height = verticalPos - bounds2.starty; + drawRect(g, rect); +}; +const drawLoop = async function(elem, loopModel, labelText, conf2) { + const { + boxMargin, + boxTextMargin, + labelBoxHeight, + labelBoxWidth, + messageFontFamily: fontFamily, + messageFontSize: fontSize, + messageFontWeight: fontWeight + } = conf2; + const g = elem.append("g"); + const drawLoopLine = function(startx, starty, stopx, stopy) { + return g.append("line").attr("x1", startx).attr("y1", starty).attr("x2", stopx).attr("y2", stopy).attr("class", "loopLine"); + }; + drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty); + drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy); + drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy); + drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy); + if (loopModel.sections !== void 0) { + loopModel.sections.forEach(function(item) { + drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style( + "stroke-dasharray", + "3, 3" + ); + }); + } + let txt = (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.e)(); + txt.text = labelText; + txt.x = loopModel.startx; + txt.y = loopModel.starty; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.anchor = "middle"; + txt.valign = "middle"; + txt.tspan = false; + txt.width = labelBoxWidth || 50; + txt.height = labelBoxHeight || 20; + txt.textMargin = boxTextMargin; + txt.class = "labelText"; + drawLabel(g, txt); + txt = getTextObj(); + txt.text = loopModel.title; + txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2; + txt.y = loopModel.starty + boxMargin + boxTextMargin; + txt.anchor = "middle"; + txt.valign = "middle"; + txt.textMargin = boxTextMargin; + txt.class = "loopText"; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.wrap = true; + let textElem = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.G)(txt.text) ? await drawKatex(g, txt, loopModel) : drawText(g, txt); + if (loopModel.sectionTitles !== void 0) { + for (const [idx, item] of Object.entries(loopModel.sectionTitles)) { + if (item.message) { + txt.text = item.message; + txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2; + txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin; + txt.class = "loopText"; + txt.anchor = "middle"; + txt.valign = "middle"; + txt.tspan = false; + txt.fontFamily = fontFamily; + txt.fontSize = fontSize; + txt.fontWeight = fontWeight; + txt.wrap = loopModel.wrap; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.G)(txt.text)) { + loopModel.starty = loopModel.sections[idx].y; + await drawKatex(g, txt, loopModel); + } else { + drawText(g, txt); + } + let sectionHeight = Math.round( + textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr) + ); + loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin); + } + } + } + loopModel.height = Math.round(loopModel.stopy - loopModel.starty); + return g; +}; +const drawBackgroundRect = function(elem, bounds2) { + (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.a)(elem, bounds2); +}; +const insertDatabaseIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" + ); +}; +const insertComputerIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" + ); +}; +const insertClockIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" + ); +}; +const insertArrowHead = function(elem) { + elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).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"); +}; +const insertArrowFilledHead = function(elem) { + elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 15.5).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"); +}; +const insertSequenceNumber = function(elem) { + elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6); +}; +const insertArrowCrossHead = function(elem) { + const defs = elem.append("defs"); + const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5); + marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7"); +}; +const getTextObj = function() { + return { + x: 0, + y: 0, + fill: void 0, + anchor: void 0, + style: "#666", + width: void 0, + height: void 0, + textMargin: 0, + rx: 0, + ry: 0, + tspan: true, + valign: void 0 + }; +}; +const getNoteRect = function() { + return { + x: 0, + y: 0, + fill: "#EDF2AE", + stroke: "#666", + width: 100, + anchor: "start", + height: 100, + rx: 0, + ry: 0 + }; +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2) { + const { actorFontSize, actorFontFamily, actorFontWeight } = conf2; + const [_actorFontSize, _actorFontSizePx] = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.D)(actorFontSize); + const lines = content.split(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex); + for (let i = 0; i < lines.length; i++) { + const dy = i * _actorFontSize - _actorFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").style("font-size", _actorFontSizePx).style("font-weight", actorFontWeight).style("font-family", actorFontFamily); + text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const s = g.append("switch"); + const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, s, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + async function byKatex(content, g, x, y, width, height, textAttrs, conf2) { + const dim = await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.H)(content, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.F)()); + const s = g.append("switch"); + const f = s.append("foreignObject").attr("x", x + width / 2 - dim.width / 2).attr("y", y + height / 2 - dim.height / 2).attr("width", dim.width).attr("height", dim.height); + const text = f.append("xhtml:div").style("height", "100%").style("width", "100%"); + text.append("div").style("text-align", "center").style("vertical-align", "middle").html(await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.r)(content, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.F)())); + byTspan(content, s, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2, hasKatex2 = false) { + if (hasKatex2) { + return byKatex; + } + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const _drawMenuItemTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs) { + const text = g.append("text").attr("x", x).attr("y", y).style("text-anchor", "start").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2) { + const { actorFontSize, actorFontFamily, actorFontWeight } = conf2; + const lines = content.split(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex); + for (let i = 0; i < lines.length; i++) { + const dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x).attr("y", y).style("text-anchor", "start").style("font-size", actorFontSize).style("font-weight", actorFontWeight).style("font-family", actorFontFamily); + text.append("tspan").attr("x", x).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const s = g.append("switch"); + const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, s, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const svgDraw = { + drawRect, + drawText, + drawLabel, + drawActor, + drawBox, + drawPopup, + anchorElement, + drawActivation, + drawLoop, + drawBackgroundRect, + insertArrowHead, + insertArrowFilledHead, + insertSequenceNumber, + insertArrowCrossHead, + insertDatabaseIcon, + insertComputerIcon, + insertClockIcon, + getTextObj, + getNoteRect, + fixLifeLineHeights, + sanitizeUrl: _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .Jf +}; +let conf = {}; +const bounds = { + data: { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }, + verticalPos: 0, + sequenceItems: [], + activations: [], + models: { + getHeight: function() { + return Math.max.apply( + null, + this.actors.length === 0 ? [0] : this.actors.map((actor) => actor.height || 0) + ) + (this.loops.length === 0 ? 0 : this.loops.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.messages.length === 0 ? 0 : this.messages.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.notes.length === 0 ? 0 : this.notes.map((it) => it.height || 0).reduce((acc, h) => acc + h)); + }, + clear: function() { + this.actors = []; + this.boxes = []; + this.loops = []; + this.messages = []; + this.notes = []; + }, + addBox: function(boxModel) { + this.boxes.push(boxModel); + }, + addActor: function(actorModel) { + this.actors.push(actorModel); + }, + addLoop: function(loopModel) { + this.loops.push(loopModel); + }, + addMessage: function(msgModel) { + this.messages.push(msgModel); + }, + addNote: function(noteModel) { + this.notes.push(noteModel); + }, + lastActor: function() { + return this.actors[this.actors.length - 1]; + }, + lastLoop: function() { + return this.loops[this.loops.length - 1]; + }, + lastMessage: function() { + return this.messages[this.messages.length - 1]; + }, + lastNote: function() { + return this.notes[this.notes.length - 1]; + }, + actors: [], + boxes: [], + loops: [], + messages: [], + notes: [] + }, + init: function() { + this.sequenceItems = []; + this.activations = []; + this.models.clear(); + this.data = { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }; + this.verticalPos = 0; + setConf((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + }, + updateVal: function(obj, key, val, fun) { + if (obj[key] === void 0) { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + }, + updateBounds: function(startx, starty, stopx, stopy) { + const _self = this; + let cnt = 0; + function updateFn(type) { + return function updateItemBounds(item) { + cnt++; + const n = _self.sequenceItems.length - cnt + 1; + _self.updateVal(item, "starty", starty - n * conf.boxMargin, Math.min); + _self.updateVal(item, "stopy", stopy + n * conf.boxMargin, Math.max); + _self.updateVal(bounds.data, "startx", startx - n * conf.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopx", stopx + n * conf.boxMargin, Math.max); + if (!(type === "activation")) { + _self.updateVal(item, "startx", startx - n * conf.boxMargin, Math.min); + _self.updateVal(item, "stopx", stopx + n * conf.boxMargin, Math.max); + _self.updateVal(bounds.data, "starty", starty - n * conf.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopy", stopy + n * conf.boxMargin, Math.max); + } + }; + } + this.sequenceItems.forEach(updateFn()); + this.activations.forEach(updateFn("activation")); + }, + insert: function(startx, starty, stopx, stopy) { + const _startx = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(startx, stopx); + const _stopx = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(startx, stopx); + const _starty = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(starty, stopy); + const _stopy = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(starty, stopy); + this.updateVal(bounds.data, "startx", _startx, Math.min); + this.updateVal(bounds.data, "starty", _starty, Math.min); + this.updateVal(bounds.data, "stopx", _stopx, Math.max); + this.updateVal(bounds.data, "stopy", _stopy, Math.max); + this.updateBounds(_startx, _starty, _stopx, _stopy); + }, + newActivation: function(message, diagram2, actors) { + const actorRect = actors[message.from.actor]; + const stackedSize = actorActivations(message.from.actor).length || 0; + const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2; + this.activations.push({ + startx: x, + starty: this.verticalPos + 2, + stopx: x + conf.activationWidth, + stopy: void 0, + actor: message.from.actor, + anchored: svgDraw.anchorElement(diagram2) + }); + }, + endActivation: function(message) { + const lastActorActivationIdx = this.activations.map(function(activation) { + return activation.actor; + }).lastIndexOf(message.from.actor); + return this.activations.splice(lastActorActivationIdx, 1)[0]; + }, + createLoop: function(title = { message: void 0, wrap: false, width: void 0 }, fill) { + return { + startx: void 0, + starty: this.verticalPos, + stopx: void 0, + stopy: void 0, + title: title.message, + wrap: title.wrap, + width: title.width, + height: 0, + fill + }; + }, + newLoop: function(title = { message: void 0, wrap: false, width: void 0 }, fill) { + this.sequenceItems.push(this.createLoop(title, fill)); + }, + endLoop: function() { + return this.sequenceItems.pop(); + }, + isLoopOverlap: function() { + return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : false; + }, + addSectionToLoop: function(message) { + const loop = this.sequenceItems.pop(); + loop.sections = loop.sections || []; + loop.sectionTitles = loop.sectionTitles || []; + loop.sections.push({ y: bounds.getVerticalPos(), height: 0 }); + loop.sectionTitles.push(message); + this.sequenceItems.push(loop); + }, + saveVerticalPos: function() { + if (this.isLoopOverlap()) { + this.savedVerticalPos = this.verticalPos; + } + }, + resetVerticalPos: function() { + if (this.isLoopOverlap()) { + this.verticalPos = this.savedVerticalPos; + } + }, + bumpVerticalPos: function(bump) { + this.verticalPos = this.verticalPos + bump; + this.data.stopy = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(this.data.stopy, this.verticalPos); + }, + getVerticalPos: function() { + return this.verticalPos; + }, + getBounds: function() { + return { bounds: this.data, models: this.models }; + } +}; +const drawNote = async function(elem, noteModel) { + bounds.bumpVerticalPos(conf.boxMargin); + noteModel.height = conf.boxMargin; + noteModel.starty = bounds.getVerticalPos(); + const rect = (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.g)(); + rect.x = noteModel.startx; + rect.y = noteModel.starty; + rect.width = noteModel.width || conf.width; + rect.class = "note"; + const g = elem.append("g"); + const rectElem = svgDraw.drawRect(g, rect); + const textObj = (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.e)(); + textObj.x = noteModel.startx; + textObj.y = noteModel.starty; + textObj.width = rect.width; + textObj.dy = "1em"; + textObj.text = noteModel.message; + textObj.class = "noteText"; + textObj.fontFamily = conf.noteFontFamily; + textObj.fontSize = conf.noteFontSize; + textObj.fontWeight = conf.noteFontWeight; + textObj.anchor = conf.noteAlign; + textObj.textMargin = conf.noteMargin; + textObj.valign = "center"; + const textElem = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.G)(textObj.text) ? await drawKatex(g, textObj) : drawText(g, textObj); + const textHeight = Math.round( + textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr) + ); + rectElem.attr("height", textHeight + 2 * conf.noteMargin); + noteModel.height += textHeight + 2 * conf.noteMargin; + bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin); + noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin; + noteModel.stopx = noteModel.startx + rect.width; + bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy); + bounds.models.addNote(noteModel); +}; +const messageFont = (cnf) => { + return { + fontFamily: cnf.messageFontFamily, + fontSize: cnf.messageFontSize, + fontWeight: cnf.messageFontWeight + }; +}; +const noteFont = (cnf) => { + return { + fontFamily: cnf.noteFontFamily, + fontSize: cnf.noteFontSize, + fontWeight: cnf.noteFontWeight + }; +}; +const actorFont = (cnf) => { + return { + fontFamily: cnf.actorFontFamily, + fontSize: cnf.actorFontSize, + fontWeight: cnf.actorFontWeight + }; +}; +async function boundMessage(_diagram, msgModel) { + bounds.bumpVerticalPos(10); + const { startx, stopx, message } = msgModel; + const lines = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.splitBreaks(message).length; + const isKatexMsg = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.G)(message); + const textDims = isKatexMsg ? await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.H)(message, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()) : _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(message, messageFont(conf)); + if (!isKatexMsg) { + const lineHeight = textDims.height / lines; + msgModel.height += lineHeight; + bounds.bumpVerticalPos(lineHeight); + } + let lineStartY; + let totalOffset = textDims.height - 10; + const textWidth = textDims.width; + if (startx === stopx) { + lineStartY = bounds.getVerticalPos() + totalOffset; + if (!conf.rightAngles) { + totalOffset += conf.boxMargin; + lineStartY = bounds.getVerticalPos() + totalOffset; + } + totalOffset += 30; + const dx = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(textWidth / 2, conf.width / 2); + bounds.insert( + startx - dx, + bounds.getVerticalPos() - 10 + totalOffset, + stopx + dx, + bounds.getVerticalPos() + 30 + totalOffset + ); + } else { + totalOffset += conf.boxMargin; + lineStartY = bounds.getVerticalPos() + totalOffset; + bounds.insert(startx, lineStartY - 10, stopx, lineStartY); + } + bounds.bumpVerticalPos(totalOffset); + msgModel.height += totalOffset; + msgModel.stopy = msgModel.starty + msgModel.height; + bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy); + return lineStartY; +} +const drawMessage = async function(diagram2, msgModel, lineStartY, diagObj) { + const { startx, stopx, starty, message, type, sequenceIndex, sequenceVisible } = msgModel; + const textDims = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(message, messageFont(conf)); + const textObj = (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.e)(); + textObj.x = startx; + textObj.y = starty + 10; + textObj.width = stopx - startx; + textObj.class = "messageText"; + textObj.dy = "1em"; + textObj.text = message; + textObj.fontFamily = conf.messageFontFamily; + textObj.fontSize = conf.messageFontSize; + textObj.fontWeight = conf.messageFontWeight; + textObj.anchor = conf.messageAlign; + textObj.valign = "center"; + textObj.textMargin = conf.wrapPadding; + textObj.tspan = false; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.G)(textObj.text) ? await drawKatex(diagram2, textObj, { startx, stopx, starty: lineStartY }) : drawText(diagram2, textObj); + const textWidth = textDims.width; + let line; + if (startx === stopx) { + if (conf.rightAngles) { + line = diagram2.append("path").attr( + "d", + `M ${startx},${lineStartY} H ${startx + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width / 2, textWidth / 2)} V ${lineStartY + 25} H ${startx}` + ); + } else { + line = diagram2.append("path").attr( + "d", + "M " + startx + "," + lineStartY + " C " + (startx + 60) + "," + (lineStartY - 10) + " " + (startx + 60) + "," + (lineStartY + 30) + " " + startx + "," + (lineStartY + 20) + ); + } + } else { + line = diagram2.append("line"); + line.attr("x1", startx); + line.attr("y1", lineStartY); + line.attr("x2", stopx); + line.attr("y2", lineStartY); + } + if (type === diagObj.db.LINETYPE.DOTTED || type === diagObj.db.LINETYPE.DOTTED_CROSS || type === diagObj.db.LINETYPE.DOTTED_POINT || type === diagObj.db.LINETYPE.DOTTED_OPEN) { + line.style("stroke-dasharray", "3, 3"); + line.attr("class", "messageLine1"); + } else { + line.attr("class", "messageLine0"); + } + let url = ""; + if (conf.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + line.attr("stroke-width", 2); + line.attr("stroke", "none"); + line.style("fill", "none"); + if (type === diagObj.db.LINETYPE.SOLID || type === diagObj.db.LINETYPE.DOTTED) { + line.attr("marker-end", "url(" + url + "#arrowhead)"); + } + if (type === diagObj.db.LINETYPE.SOLID_POINT || type === diagObj.db.LINETYPE.DOTTED_POINT) { + line.attr("marker-end", "url(" + url + "#filled-head)"); + } + if (type === diagObj.db.LINETYPE.SOLID_CROSS || type === diagObj.db.LINETYPE.DOTTED_CROSS) { + line.attr("marker-end", "url(" + url + "#crosshead)"); + } + if (sequenceVisible || conf.showSequenceNumbers) { + line.attr("marker-start", "url(" + url + "#sequencenumber)"); + diagram2.append("text").attr("x", startx).attr("y", lineStartY + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(sequenceIndex); + } +}; +const addActorRenderingData = async function(diagram2, actors, createdActors, actorKeys, verticalPos, messages, isFooter) { + let prevWidth = 0; + let prevMargin = 0; + let prevBox = void 0; + let maxHeight = 0; + for (const actorKey of actorKeys) { + const actor = actors[actorKey]; + const box = actor.box; + if (prevBox && prevBox != box) { + if (!isFooter) { + bounds.models.addBox(prevBox); + } + prevMargin += conf.boxMargin + prevBox.margin; + } + if (box && box != prevBox) { + if (!isFooter) { + box.x = prevWidth + prevMargin; + box.y = verticalPos; + } + prevMargin += box.margin; + } + actor.width = actor.width || conf.width; + actor.height = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actor.height || conf.height, conf.height); + actor.margin = actor.margin || conf.actorMargin; + maxHeight = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, actor.height); + if (createdActors[actor.name]) { + prevMargin += actor.width / 2; + } + actor.x = prevWidth + prevMargin; + actor.starty = bounds.getVerticalPos(); + bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height); + prevWidth += actor.width + prevMargin; + if (actor.box) { + actor.box.width = prevWidth + box.margin - actor.box.x; + } + prevMargin = actor.margin; + prevBox = actor.box; + bounds.models.addActor(actor); + } + if (prevBox && !isFooter) { + bounds.models.addBox(prevBox); + } + bounds.bumpVerticalPos(maxHeight); +}; +const drawActors = async function(diagram2, actors, actorKeys, isFooter) { + if (!isFooter) { + for (const actorKey of actorKeys) { + const actor = actors[actorKey]; + await svgDraw.drawActor(diagram2, actor, conf, false); + } + } else { + let maxHeight = 0; + bounds.bumpVerticalPos(conf.boxMargin * 2); + for (const actorKey of actorKeys) { + const actor = actors[actorKey]; + if (!actor.stopy) { + actor.stopy = bounds.getVerticalPos(); + } + const height = await svgDraw.drawActor(diagram2, actor, conf, true); + maxHeight = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, height); + } + bounds.bumpVerticalPos(maxHeight + conf.boxMargin); + } +}; +const drawActorsPopup = function(diagram2, actors, actorKeys, doc) { + let maxHeight = 0; + let maxWidth = 0; + for (const actorKey of actorKeys) { + const actor = actors[actorKey]; + const minMenuWidth = getRequiredPopupWidth(actor); + const menuDimensions = svgDraw.drawPopup( + diagram2, + actor, + minMenuWidth, + conf, + conf.forceMenus, + doc + ); + if (menuDimensions.height > maxHeight) { + maxHeight = menuDimensions.height; + } + if (menuDimensions.width + actor.x > maxWidth) { + maxWidth = menuDimensions.width + actor.x; + } + } + return { maxHeight, maxWidth }; +}; +const setConf = function(cnf) { + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.f)(conf, cnf); + if (cnf.fontFamily) { + conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily; + } + if (cnf.fontSize) { + conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize; + } + if (cnf.fontWeight) { + conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight; + } +}; +const actorActivations = function(actor) { + return bounds.activations.filter(function(activation) { + return activation.actor === actor; + }); +}; +const activationBounds = function(actor, actors) { + const actorObj = actors[actor]; + const activations = actorActivations(actor); + const left = activations.reduce(function(acc, activation) { + return _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(acc, activation.startx); + }, actorObj.x + actorObj.width / 2 - 1); + const right = activations.reduce(function(acc, activation) { + return _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(acc, activation.stopx); + }, actorObj.x + actorObj.width / 2 + 1); + return [left, right]; +}; +function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) { + bounds.bumpVerticalPos(preMargin); + let heightAdjust = postMargin; + if (msg.id && msg.message && loopWidths[msg.id]) { + const loopWidth = loopWidths[msg.id].width; + const textConf = messageFont(conf); + msg.message = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(`[${msg.message}]`, loopWidth - 2 * conf.wrapPadding, textConf); + msg.width = loopWidth; + msg.wrap = true; + const textDims = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(msg.message, textConf); + const totalOffset = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(textDims.height, conf.labelBoxHeight); + heightAdjust = postMargin + totalOffset; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`${totalOffset} - ${msg.message}`); + } + addLoopFn(msg); + bounds.bumpVerticalPos(heightAdjust); +} +function adjustCreatedDestroyedData(msg, msgModel, lineStartY, index, actors, createdActors, destroyedActors) { + function receiverAdjustment(actor, adjustment) { + if (actor.x < actors[msg.from].x) { + bounds.insert( + msgModel.stopx - adjustment, + msgModel.starty, + msgModel.startx, + msgModel.stopy + actor.height / 2 + conf.noteMargin + ); + msgModel.stopx = msgModel.stopx + adjustment; + } else { + bounds.insert( + msgModel.startx, + msgModel.starty, + msgModel.stopx + adjustment, + msgModel.stopy + actor.height / 2 + conf.noteMargin + ); + msgModel.stopx = msgModel.stopx - adjustment; + } + } + function senderAdjustment(actor, adjustment) { + if (actor.x < actors[msg.to].x) { + bounds.insert( + msgModel.startx - adjustment, + msgModel.starty, + msgModel.stopx, + msgModel.stopy + actor.height / 2 + conf.noteMargin + ); + msgModel.startx = msgModel.startx + adjustment; + } else { + bounds.insert( + msgModel.stopx, + msgModel.starty, + msgModel.startx + adjustment, + msgModel.stopy + actor.height / 2 + conf.noteMargin + ); + msgModel.startx = msgModel.startx - adjustment; + } + } + if (createdActors[msg.to] == index) { + const actor = actors[msg.to]; + const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3; + receiverAdjustment(actor, adjustment); + actor.starty = lineStartY - actor.height / 2; + bounds.bumpVerticalPos(actor.height / 2); + } else if (destroyedActors[msg.from] == index) { + const actor = actors[msg.from]; + if (conf.mirrorActors) { + const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 : actor.width / 2; + senderAdjustment(actor, adjustment); + } + actor.stopy = lineStartY - actor.height / 2; + bounds.bumpVerticalPos(actor.height / 2); + } else if (destroyedActors[msg.to] == index) { + const actor = actors[msg.to]; + if (conf.mirrorActors) { + const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3; + receiverAdjustment(actor, adjustment); + } + actor.stopy = lineStartY - actor.height / 2; + bounds.bumpVerticalPos(actor.height / 2); + } +} +const draw = async function(_text, id, _version, diagObj) { + const { securityLevel, sequence } = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + conf = sequence; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + bounds.init(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(diagObj.db); + const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(`[id="${id}"]`); + const actors = diagObj.db.getActors(); + const createdActors = diagObj.db.getCreatedActors(); + const destroyedActors = diagObj.db.getDestroyedActors(); + const boxes = diagObj.db.getBoxes(); + let actorKeys = diagObj.db.getActorKeys(); + const messages = diagObj.db.getMessages(); + const title = diagObj.db.getDiagramTitle(); + const hasBoxes = diagObj.db.hasAtLeastOneBox(); + const hasBoxTitles = diagObj.db.hasAtLeastOneBoxWithTitle(); + const maxMessageWidthPerActor = await getMaxMessageWidthPerActor(actors, messages, diagObj); + conf.height = await calculateActorMargins(actors, maxMessageWidthPerActor, boxes); + svgDraw.insertComputerIcon(diagram2); + svgDraw.insertDatabaseIcon(diagram2); + svgDraw.insertClockIcon(diagram2); + if (hasBoxes) { + bounds.bumpVerticalPos(conf.boxMargin); + if (hasBoxTitles) { + bounds.bumpVerticalPos(boxes[0].textMaxHeight); + } + } + if (conf.hideUnusedParticipants === true) { + const newActors = /* @__PURE__ */ new Set(); + messages.forEach((message) => { + newActors.add(message.from); + newActors.add(message.to); + }); + actorKeys = actorKeys.filter((actorKey) => newActors.has(actorKey)); + } + await addActorRenderingData(diagram2, actors, createdActors, actorKeys, 0, messages, false); + const loopWidths = await calculateLoopBounds(messages, actors, maxMessageWidthPerActor, diagObj); + svgDraw.insertArrowHead(diagram2); + svgDraw.insertArrowCrossHead(diagram2); + svgDraw.insertArrowFilledHead(diagram2); + svgDraw.insertSequenceNumber(diagram2); + function activeEnd(msg, verticalPos) { + const activationData = bounds.endActivation(msg); + if (activationData.starty + 18 > verticalPos) { + activationData.starty = verticalPos - 6; + verticalPos += 12; + } + svgDraw.drawActivation( + diagram2, + activationData, + verticalPos, + conf, + actorActivations(msg.from.actor).length + ); + bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos); + } + let sequenceIndex = 1; + let sequenceIndexStep = 1; + const messagesToDraw = []; + const backgrounds = []; + let index = 0; + for (const msg of messages) { + let loopModel, noteModel, msgModel; + switch (msg.type) { + case diagObj.db.LINETYPE.NOTE: + bounds.resetVerticalPos(); + noteModel = msg.noteModel; + await drawNote(diagram2, noteModel); + break; + case diagObj.db.LINETYPE.ACTIVE_START: + bounds.newActivation(msg, diagram2, actors); + break; + case diagObj.db.LINETYPE.ACTIVE_END: + activeEnd(msg, bounds.getVerticalPos()); + break; + case diagObj.db.LINETYPE.LOOP_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.LOOP_END: + loopModel = bounds.endLoop(); + await svgDraw.drawLoop(diagram2, loopModel, "loop", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.RECT_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin, + (message) => bounds.newLoop(void 0, message.message) + ); + break; + case diagObj.db.LINETYPE.RECT_END: + loopModel = bounds.endLoop(); + backgrounds.push(loopModel); + bounds.models.addLoop(loopModel); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + break; + case diagObj.db.LINETYPE.OPT_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.OPT_END: + loopModel = bounds.endLoop(); + await svgDraw.drawLoop(diagram2, loopModel, "opt", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.ALT_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.ALT_ELSE: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin + conf.boxTextMargin, + conf.boxMargin, + (message) => bounds.addSectionToLoop(message) + ); + break; + case diagObj.db.LINETYPE.ALT_END: + loopModel = bounds.endLoop(); + await svgDraw.drawLoop(diagram2, loopModel, "alt", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.PAR_START: + case diagObj.db.LINETYPE.PAR_OVER_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + bounds.saveVerticalPos(); + break; + case diagObj.db.LINETYPE.PAR_AND: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin + conf.boxTextMargin, + conf.boxMargin, + (message) => bounds.addSectionToLoop(message) + ); + break; + case diagObj.db.LINETYPE.PAR_END: + loopModel = bounds.endLoop(); + await svgDraw.drawLoop(diagram2, loopModel, "par", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.AUTONUMBER: + sequenceIndex = msg.message.start || sequenceIndex; + sequenceIndexStep = msg.message.step || sequenceIndexStep; + if (msg.message.visible) { + diagObj.db.enableSequenceNumbers(); + } else { + diagObj.db.disableSequenceNumbers(); + } + break; + case diagObj.db.LINETYPE.CRITICAL_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.CRITICAL_OPTION: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin + conf.boxTextMargin, + conf.boxMargin, + (message) => bounds.addSectionToLoop(message) + ); + break; + case diagObj.db.LINETYPE.CRITICAL_END: + loopModel = bounds.endLoop(); + await svgDraw.drawLoop(diagram2, loopModel, "critical", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + case diagObj.db.LINETYPE.BREAK_START: + adjustLoopHeightForWrap( + loopWidths, + msg, + conf.boxMargin, + conf.boxMargin + conf.boxTextMargin, + (message) => bounds.newLoop(message) + ); + break; + case diagObj.db.LINETYPE.BREAK_END: + loopModel = bounds.endLoop(); + await svgDraw.drawLoop(diagram2, loopModel, "break", conf); + bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos()); + bounds.models.addLoop(loopModel); + break; + default: + try { + msgModel = msg.msgModel; + msgModel.starty = bounds.getVerticalPos(); + msgModel.sequenceIndex = sequenceIndex; + msgModel.sequenceVisible = diagObj.db.showSequenceNumbers(); + const lineStartY = await boundMessage(diagram2, msgModel); + adjustCreatedDestroyedData( + msg, + msgModel, + lineStartY, + index, + actors, + createdActors, + destroyedActors + ); + messagesToDraw.push({ messageModel: msgModel, lineStartY }); + bounds.models.addMessage(msgModel); + } catch (e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while drawing message", e); + } + } + if ([ + diagObj.db.LINETYPE.SOLID_OPEN, + diagObj.db.LINETYPE.DOTTED_OPEN, + diagObj.db.LINETYPE.SOLID, + diagObj.db.LINETYPE.DOTTED, + diagObj.db.LINETYPE.SOLID_CROSS, + diagObj.db.LINETYPE.DOTTED_CROSS, + diagObj.db.LINETYPE.SOLID_POINT, + diagObj.db.LINETYPE.DOTTED_POINT + ].includes(msg.type)) { + sequenceIndex = sequenceIndex + sequenceIndexStep; + } + index++; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("createdActors", createdActors); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("destroyedActors", destroyedActors); + await drawActors(diagram2, actors, actorKeys, false); + for (const e of messagesToDraw) { + await drawMessage(diagram2, e.messageModel, e.lineStartY, diagObj); + } + if (conf.mirrorActors) { + await drawActors(diagram2, actors, actorKeys, true); + } + backgrounds.forEach((e) => svgDraw.drawBackgroundRect(diagram2, e)); + fixLifeLineHeights(diagram2, actors, actorKeys, conf); + for (const box2 of bounds.models.boxes) { + box2.height = bounds.getVerticalPos() - box2.y; + bounds.insert(box2.x, box2.y, box2.x + box2.width, box2.height); + box2.startx = box2.x; + box2.starty = box2.y; + box2.stopx = box2.startx + box2.width; + box2.stopy = box2.starty + box2.height; + box2.stroke = "rgb(0,0,0, 0.5)"; + await svgDraw.drawBox(diagram2, box2, conf); + } + if (hasBoxes) { + bounds.bumpVerticalPos(conf.boxMargin); + } + const requiredBoxSize = drawActorsPopup(diagram2, actors, actorKeys, doc); + const { bounds: box } = bounds.getBounds(); + let boxHeight = box.stopy - box.starty; + if (boxHeight < requiredBoxSize.maxHeight) { + boxHeight = requiredBoxSize.maxHeight; + } + let height = boxHeight + 2 * conf.diagramMarginY; + if (conf.mirrorActors) { + height = height - conf.boxMargin + conf.bottomMarginAdj; + } + let boxWidth = box.stopx - box.startx; + if (boxWidth < requiredBoxSize.maxWidth) { + boxWidth = requiredBoxSize.maxWidth; + } + const width = boxWidth + 2 * conf.diagramMarginX; + if (title) { + diagram2.append("text").text(title).attr("x", (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr("y", -25); + } + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.i)(diagram2, height, width, conf.useMaxWidth); + const extraVertForTitle = title ? 40 : 0; + diagram2.attr( + "viewBox", + box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle) + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`models:`, bounds.models); +}; +async function getMaxMessageWidthPerActor(actors, messages, diagObj) { + const maxMessageWidthPerActor = {}; + for (const msg of messages) { + if (actors[msg.to] && actors[msg.from]) { + const actor = actors[msg.to]; + if (msg.placement === diagObj.db.PLACEMENT.LEFTOF && !actor.prevActor) { + continue; + } + if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF && !actor.nextActor) { + continue; + } + const isNote = msg.placement !== void 0; + const isMessage = !isNote; + const textFont = isNote ? noteFont(conf) : messageFont(conf); + const wrappedMessage = msg.wrap ? _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont) : msg.message; + const messageDimensions = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.G)(wrappedMessage) ? await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.H)(msg.message, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()) : _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(wrappedMessage, textFont); + const messageWidth = messageDimensions.width + 2 * conf.wrapPadding; + if (isMessage && msg.from === actor.nextActor) { + maxMessageWidthPerActor[msg.to] = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + maxMessageWidthPerActor[msg.to] || 0, + messageWidth + ); + } else if (isMessage && msg.from === actor.prevActor) { + maxMessageWidthPerActor[msg.from] = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth + ); + } else if (isMessage && msg.from === msg.to) { + maxMessageWidthPerActor[msg.from] = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth / 2 + ); + maxMessageWidthPerActor[msg.to] = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + maxMessageWidthPerActor[msg.to] || 0, + messageWidth / 2 + ); + } else if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) { + maxMessageWidthPerActor[msg.from] = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth + ); + } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) { + maxMessageWidthPerActor[actor.prevActor] = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + maxMessageWidthPerActor[actor.prevActor] || 0, + messageWidth + ); + } else if (msg.placement === diagObj.db.PLACEMENT.OVER) { + if (actor.prevActor) { + maxMessageWidthPerActor[actor.prevActor] = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + maxMessageWidthPerActor[actor.prevActor] || 0, + messageWidth / 2 + ); + } + if (actor.nextActor) { + maxMessageWidthPerActor[msg.from] = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth / 2 + ); + } + } + } + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("maxMessageWidthPerActor:", maxMessageWidthPerActor); + return maxMessageWidthPerActor; +} +const getRequiredPopupWidth = function(actor) { + let requiredPopupWidth = 0; + const textFont = actorFont(conf); + for (const key in actor.links) { + const labelDimensions = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(key, textFont); + const labelWidth = labelDimensions.width + 2 * conf.wrapPadding + 2 * conf.boxMargin; + if (requiredPopupWidth < labelWidth) { + requiredPopupWidth = labelWidth; + } + } + return requiredPopupWidth; +}; +async function calculateActorMargins(actors, actorToMessageWidth, boxes) { + let maxHeight = 0; + for (const prop of Object.keys(actors)) { + const actor = actors[prop]; + if (actor.wrap) { + actor.description = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel( + actor.description, + conf.width - 2 * conf.wrapPadding, + actorFont(conf) + ); + } + const actDims = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.G)(actor.description) ? await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.H)(actor.description, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()) : _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(actor.description, actorFont(conf)); + actor.width = actor.wrap ? conf.width : _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, actDims.width + 2 * conf.wrapPadding); + actor.height = actor.wrap ? _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actDims.height, conf.height) : conf.height; + maxHeight = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, actor.height); + } + for (const actorKey in actorToMessageWidth) { + const actor = actors[actorKey]; + if (!actor) { + continue; + } + const nextActor = actors[actor.nextActor]; + if (!nextActor) { + const messageWidth2 = actorToMessageWidth[actorKey]; + const actorWidth2 = messageWidth2 + conf.actorMargin - actor.width / 2; + actor.margin = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actorWidth2, conf.actorMargin); + continue; + } + const messageWidth = actorToMessageWidth[actorKey]; + const actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2; + actor.margin = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actorWidth, conf.actorMargin); + } + let maxBoxHeight = 0; + boxes.forEach((box) => { + const textFont = messageFont(conf); + let totalWidth = box.actorKeys.reduce((total, aKey) => { + return total += actors[aKey].width + (actors[aKey].margin || 0); + }, 0); + totalWidth -= 2 * conf.boxTextMargin; + if (box.wrap) { + box.name = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(box.name, totalWidth - 2 * conf.wrapPadding, textFont); + } + const boxMsgDimensions = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(box.name, textFont); + maxBoxHeight = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(boxMsgDimensions.height, maxBoxHeight); + const minWidth = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(totalWidth, boxMsgDimensions.width + 2 * conf.wrapPadding); + box.margin = conf.boxTextMargin; + if (totalWidth < minWidth) { + const missing = (minWidth - totalWidth) / 2; + box.margin += missing; + } + }); + boxes.forEach((box) => box.textMaxHeight = maxBoxHeight); + return _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, conf.height); +} +const buildNoteModel = async function(msg, actors, diagObj) { + const startx = actors[msg.from].x; + const stopx = actors[msg.to].x; + const shouldWrap = msg.wrap && msg.message; + let textDimensions = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.G)(msg.message) ? await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.H)(msg.message, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()) : _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions( + shouldWrap ? _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message, + noteFont(conf) + ); + const noteModel = { + width: shouldWrap ? conf.width : _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin), + height: 0, + startx: actors[msg.from].x, + stopx: 0, + starty: 0, + stopy: 0, + message: msg.message + }; + if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) { + noteModel.width = shouldWrap ? _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, textDimensions.width) : _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + actors[msg.from].width / 2 + actors[msg.to].width / 2, + textDimensions.width + 2 * conf.noteMargin + ); + noteModel.startx = startx + (actors[msg.from].width + conf.actorMargin) / 2; + } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) { + noteModel.width = shouldWrap ? _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin) : _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + actors[msg.from].width / 2 + actors[msg.to].width / 2, + textDimensions.width + 2 * conf.noteMargin + ); + noteModel.startx = startx - noteModel.width + (actors[msg.from].width - conf.actorMargin) / 2; + } else if (msg.to === msg.from) { + textDimensions = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions( + shouldWrap ? _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel( + msg.message, + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, actors[msg.from].width), + noteFont(conf) + ) : msg.message, + noteFont(conf) + ); + noteModel.width = shouldWrap ? _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, actors[msg.from].width) : _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + actors[msg.from].width, + conf.width, + textDimensions.width + 2 * conf.noteMargin + ); + noteModel.startx = startx + (actors[msg.from].width - noteModel.width) / 2; + } else { + noteModel.width = Math.abs(startx + actors[msg.from].width / 2 - (stopx + actors[msg.to].width / 2)) + conf.actorMargin; + noteModel.startx = startx < stopx ? startx + actors[msg.from].width / 2 - conf.actorMargin / 2 : stopx + actors[msg.to].width / 2 - conf.actorMargin / 2; + } + if (shouldWrap) { + noteModel.message = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel( + msg.message, + noteModel.width - 2 * conf.wrapPadding, + noteFont(conf) + ); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( + `NM:[${noteModel.startx},${noteModel.stopx},${noteModel.starty},${noteModel.stopy}:${noteModel.width},${noteModel.height}=${msg.message}]` + ); + return noteModel; +}; +const buildMessageModel = function(msg, actors, diagObj) { + if (![ + diagObj.db.LINETYPE.SOLID_OPEN, + diagObj.db.LINETYPE.DOTTED_OPEN, + diagObj.db.LINETYPE.SOLID, + diagObj.db.LINETYPE.DOTTED, + diagObj.db.LINETYPE.SOLID_CROSS, + diagObj.db.LINETYPE.DOTTED_CROSS, + diagObj.db.LINETYPE.SOLID_POINT, + diagObj.db.LINETYPE.DOTTED_POINT + ].includes(msg.type)) { + return {}; + } + const [fromLeft, fromRight] = activationBounds(msg.from, actors); + const [toLeft, toRight] = activationBounds(msg.to, actors); + const isArrowToRight = fromLeft <= toLeft; + const startx = isArrowToRight ? fromRight : fromLeft; + let stopx = isArrowToRight ? toLeft : toRight; + const isArrowToActivation = Math.abs(toLeft - toRight) > 2; + const adjustValue = (value) => { + return isArrowToRight ? -value : value; + }; + if (msg.from === msg.to) { + stopx = startx; + } else { + if (msg.activate && !isArrowToActivation) { + stopx += adjustValue(conf.activationWidth / 2 - 1); + } + if (![diagObj.db.LINETYPE.SOLID_OPEN, diagObj.db.LINETYPE.DOTTED_OPEN].includes(msg.type)) { + stopx += adjustValue(3); + } + } + const allBounds = [fromLeft, fromRight, toLeft, toRight]; + const boundedWidth = Math.abs(startx - stopx); + if (msg.wrap && msg.message) { + msg.message = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel( + msg.message, + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(boundedWidth + 2 * conf.wrapPadding, conf.width), + messageFont(conf) + ); + } + const msgDims = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(msg.message, messageFont(conf)); + return { + width: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding, + boundedWidth + 2 * conf.wrapPadding, + conf.width + ), + height: 0, + startx, + stopx, + starty: 0, + stopy: 0, + message: msg.message, + type: msg.type, + wrap: msg.wrap, + fromBounds: Math.min.apply(null, allBounds), + toBounds: Math.max.apply(null, allBounds) + }; +}; +const calculateLoopBounds = async function(messages, actors, _maxWidthPerActor, diagObj) { + const loops = {}; + const stack = []; + let current, noteModel, msgModel; + for (const msg of messages) { + msg.id = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.random({ length: 10 }); + switch (msg.type) { + case diagObj.db.LINETYPE.LOOP_START: + case diagObj.db.LINETYPE.ALT_START: + case diagObj.db.LINETYPE.OPT_START: + case diagObj.db.LINETYPE.PAR_START: + case diagObj.db.LINETYPE.PAR_OVER_START: + case diagObj.db.LINETYPE.CRITICAL_START: + case diagObj.db.LINETYPE.BREAK_START: + stack.push({ + id: msg.id, + msg: msg.message, + from: Number.MAX_SAFE_INTEGER, + to: Number.MIN_SAFE_INTEGER, + width: 0 + }); + break; + case diagObj.db.LINETYPE.ALT_ELSE: + case diagObj.db.LINETYPE.PAR_AND: + case diagObj.db.LINETYPE.CRITICAL_OPTION: + if (msg.message) { + current = stack.pop(); + loops[current.id] = current; + loops[msg.id] = current; + stack.push(current); + } + break; + case diagObj.db.LINETYPE.LOOP_END: + case diagObj.db.LINETYPE.ALT_END: + case diagObj.db.LINETYPE.OPT_END: + case diagObj.db.LINETYPE.PAR_END: + case diagObj.db.LINETYPE.CRITICAL_END: + case diagObj.db.LINETYPE.BREAK_END: + current = stack.pop(); + loops[current.id] = current; + break; + case diagObj.db.LINETYPE.ACTIVE_START: + { + const actorRect = actors[msg.from ? msg.from.actor : msg.to.actor]; + const stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length; + const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2; + const toAdd = { + startx: x, + stopx: x + conf.activationWidth, + actor: msg.from.actor, + enabled: true + }; + bounds.activations.push(toAdd); + } + break; + case diagObj.db.LINETYPE.ACTIVE_END: + { + const lastActorActivationIdx = bounds.activations.map((a) => a.actor).lastIndexOf(msg.from.actor); + delete bounds.activations.splice(lastActorActivationIdx, 1)[0]; + } + break; + } + const isNote = msg.placement !== void 0; + if (isNote) { + noteModel = await buildNoteModel(msg, actors, diagObj); + msg.noteModel = noteModel; + stack.forEach((stk) => { + current = stk; + current.from = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(current.from, noteModel.startx); + current.to = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.to, noteModel.startx + noteModel.width); + current.width = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth; + }); + } else { + msgModel = buildMessageModel(msg, actors, diagObj); + msg.msgModel = msgModel; + if (msgModel.startx && msgModel.stopx && stack.length > 0) { + stack.forEach((stk) => { + current = stk; + if (msgModel.startx === msgModel.stopx) { + const from = actors[msg.from]; + const to = actors[msg.to]; + current.from = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin( + from.x - msgModel.width / 2, + from.x - from.width / 2, + current.from + ); + current.to = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax( + to.x + msgModel.width / 2, + to.x + from.width / 2, + current.to + ); + current.width = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth; + } else { + current.from = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(msgModel.startx, current.from); + current.to = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(msgModel.stopx, current.to); + current.width = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.width, msgModel.width) - conf.labelBoxWidth; + } + }); + } + } + } + bounds.activations = []; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Loop type widths:", loops); + return loops; +}; +const renderer = { + bounds, + drawActors, + drawActorsPopup, + setConf, + draw +}; +const diagram = { + parser: parser$1, + db, + renderer, + styles, + init: ({ wrap }) => { + db.setWrap(wrap); + } +}; + + + +/***/ }), + +/***/ 8886: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ a: () => (/* binding */ drawBackgroundRect), +/* harmony export */ b: () => (/* binding */ drawEmbeddedImage), +/* harmony export */ c: () => (/* binding */ drawImage), +/* harmony export */ d: () => (/* binding */ drawRect), +/* harmony export */ e: () => (/* binding */ getTextObj), +/* harmony export */ f: () => (/* binding */ drawText), +/* harmony export */ g: () => (/* binding */ getNoteRect) +/* harmony export */ }); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6750); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); + + +const drawRect = (element, rectData) => { + const rectElement = element.append("rect"); + rectElement.attr("x", rectData.x); + rectElement.attr("y", rectData.y); + rectElement.attr("fill", rectData.fill); + rectElement.attr("stroke", rectData.stroke); + rectElement.attr("width", rectData.width); + rectElement.attr("height", rectData.height); + if (rectData.name) { + rectElement.attr("name", rectData.name); + } + rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx); + rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry); + if (rectData.attrs !== void 0) { + for (const attrKey in rectData.attrs) { + rectElement.attr(attrKey, rectData.attrs[attrKey]); + } + } + rectData.class !== void 0 && rectElement.attr("class", rectData.class); + return rectElement; +}; +const drawBackgroundRect = (element, bounds) => { + const rectData = { + x: bounds.startx, + y: bounds.starty, + width: bounds.stopx - bounds.startx, + height: bounds.stopy - bounds.starty, + fill: bounds.fill, + stroke: bounds.stroke, + class: "rect" + }; + const rectElement = drawRect(element, rectData); + rectElement.lower(); +}; +const drawText = (element, textData) => { + const nText = textData.text.replace(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.J, " "); + const textElem = element.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.attr("class", "legend"); + textElem.style("text-anchor", textData.anchor); + textData.class !== void 0 && textElem.attr("class", textData.class); + const tspan = textElem.append("tspan"); + tspan.attr("x", textData.x + textData.textMargin * 2); + tspan.text(nText); + return textElem; +}; +const drawImage = (elem, x, y, link) => { + const imageElement = elem.append("image"); + imageElement.attr("x", x); + imageElement.attr("y", y); + const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(link); + imageElement.attr("xlink:href", sanitizedLink); +}; +const drawEmbeddedImage = (element, x, y, link) => { + const imageElement = element.append("use"); + imageElement.attr("x", x); + imageElement.attr("y", y); + const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(link); + imageElement.attr("xlink:href", `#${sanitizedLink}`); +}; +const getNoteRect = () => { + const noteRectData = { + x: 0, + y: 0, + width: 100, + height: 100, + fill: "#EDF2AE", + stroke: "#666", + anchor: "start", + rx: 0, + ry: 0 + }; + return noteRectData; +}; +const getTextObj = () => { + const testObject = { + x: 0, + y: 0, + width: 100, + height: 100, + "text-anchor": "start", + style: "#666", + textMargin: 0, + rx: 0, + ry: 0, + tspan: true + }; + return testObject; +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/2130.3d3496a1.js b/assets/js/2130.3d3496a1.js new file mode 100644 index 00000000..9ce0a18d --- /dev/null +++ b/assets/js/2130.3d3496a1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[2130],{2130:(e,t,r)=>{r.d(t,{default:()=>Ja});class a{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new a(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class n{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new n(t,a.range(this,e))}}class i{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,a,n="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start,a=o.end,r===s.length?n+=" at end of input: ":n+=" at position "+(r+1)+": ";var l=s.slice(r,a).replace(/[^]/g,"$&\u0332");n+=(r>15?"\u2026"+s.slice(r-15,r):s.slice(0,r))+l+(a+15<s.length?s.slice(a,a+15)+"\u2026":s.slice(a))}var h=new Error(n);return h.name="ParseError",h.__proto__=i.prototype,h.position=r,null!=r&&null!=a&&(h.length=a-r),h.rawMessage=e,h}}i.prototype.__proto__=Error.prototype;var o=/([A-Z])/g,s={"&":"&",">":">","<":"<",'"':""","'":"'"},l=/[&><"']/g;var h=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},m={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(l,(e=>s[e]))},hyphenate:function(e){return e.replace(o,"-$1").toLowerCase()},getBaseElem:h,isCharacterBox:function(e){var t=h(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},c={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function p(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class u{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},c)if(c.hasOwnProperty(t)){var r=c[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:p(r)}}reportNonstrict(e,t,r){var a=this.strict;if("function"==typeof a&&(a=a(e,t,r)),a&&"ignore"!==a){if(!0===a||"error"===a)throw new i("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===a?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var a=this.strict;if("function"==typeof a)try{a=a(e,t,r)}catch(n){a="error"}return!(!a||"ignore"===a)&&(!0===a||"error"===a||("warn"===a?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=m.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var r="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(r)}}class d{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return g[f[this.id]]}sub(){return g[v[this.id]]}fracNum(){return g[b[this.id]]}fracDen(){return g[y[this.id]]}cramp(){return g[x[this.id]]}text(){return g[w[this.id]]}isTight(){return this.size>=2}}var g=[new d(0,0,!1),new d(1,0,!0),new d(2,1,!1),new d(3,1,!0),new d(4,2,!1),new d(5,2,!0),new d(6,3,!1),new d(7,3,!0)],f=[4,5,4,5,6,7,6,7],v=[5,5,5,5,7,7,7,7],b=[2,3,4,5,6,7,6,7],y=[3,3,5,5,7,7,7,7],x=[1,1,3,3,5,5,7,7],w=[0,1,2,3,2,3,2,3],k={DISPLAY:g[0],TEXT:g[2],SCRIPT:g[4],SCRIPTSCRIPT:g[6]},S=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var M=[];function z(e){for(var t=0;t<M.length;t+=2)if(e>=M[t]&&e<=M[t+1])return!0;return!1}S.forEach((e=>e.blocks.forEach((e=>M.push(...e)))));var A=80,T={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class B{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return m.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}var C={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},N={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},q={"\xc5":"A","\xd0":"D","\xde":"o","\xe5":"a","\xf0":"d","\xfe":"o","\u0410":"A","\u0411":"B","\u0412":"B","\u0413":"F","\u0414":"A","\u0415":"E","\u0416":"K","\u0417":"3","\u0418":"N","\u0419":"N","\u041a":"K","\u041b":"N","\u041c":"M","\u041d":"H","\u041e":"O","\u041f":"N","\u0420":"P","\u0421":"C","\u0422":"T","\u0423":"y","\u0424":"O","\u0425":"X","\u0426":"U","\u0427":"h","\u0428":"W","\u0429":"W","\u042a":"B","\u042b":"X","\u042c":"B","\u042d":"3","\u042e":"X","\u042f":"R","\u0430":"a","\u0431":"b","\u0432":"a","\u0433":"r","\u0434":"y","\u0435":"e","\u0436":"m","\u0437":"e","\u0438":"n","\u0439":"n","\u043a":"n","\u043b":"n","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"n","\u0440":"p","\u0441":"c","\u0442":"o","\u0443":"y","\u0444":"b","\u0445":"x","\u0446":"n","\u0447":"n","\u0448":"w","\u0449":"w","\u044a":"a","\u044b":"m","\u044c":"a","\u044d":"e","\u044e":"m","\u044f":"r"};function I(e,t,r){if(!C[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),n=C[t][a];if(!n&&e[0]in q&&(a=q[e[0]].charCodeAt(0),n=C[t][a]),n||"text"!==r||z(a)&&(n=C[t][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var R={};var H=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],O=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],E=function(e,t){return t.size<2?e:H[e-1][t.size-1]};class L{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||L.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=O[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new L(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:E(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:O[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=E(L.BASESIZE,e);return this.size===t&&this.textSize===L.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==L.BASESIZE?["sizing","reset-size"+this.size,"size"+L.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!R[t=e>=5?0:e>=3?1:2]){var r=R[t]={cssEmPerMu:N.quad[t]/18};for(var a in N)N.hasOwnProperty(a)&&(r[a]=N[a][t])}return R[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}L.BASESIZE=6;var D={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},V={ex:!0,em:!0,mu:!0},P=function(e){return"string"!=typeof e&&(e=e.unit),e in D||e in V||"ex"===e},F=function(e,t){var r;if(e.unit in D)r=D[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var a;if(a=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=a.fontMetrics().xHeight;else{if("em"!==e.unit)throw new i("Invalid unit: '"+e.unit+"'");r=a.fontMetrics().quad}a!==t&&(r*=a.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},G=function(e){return+e.toFixed(4)+"em"},U=function(e){return e.filter((e=>e)).join(" ")},Y=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var a=t.getColor();a&&(this.style.color=a)}},X=function(e){var t=document.createElement(e);for(var r in t.className=U(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t},W=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+m.escape(U(this.classes))+'"');var r="";for(var a in this.style)this.style.hasOwnProperty(a)&&(r+=m.hyphenate(a)+":"+this.style[a]+";");for(var n in r&&(t+=' style="'+m.escape(r)+'"'),this.attributes)this.attributes.hasOwnProperty(n)&&(t+=" "+n+'="'+m.escape(this.attributes[n])+'"');t+=">";for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+="</"+e+">"};class _{constructor(e,t,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Y.call(this,e,r,a),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return m.contains(this.classes,e)}toNode(){return X.call(this,"span")}toMarkup(){return W.call(this,"span")}}class j{constructor(e,t,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Y.call(this,t,a),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return m.contains(this.classes,e)}toNode(){return X.call(this,"a")}toMarkup(){return W.call(this,"a")}}class ${constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return m.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+m.escape(this.src)+'" alt="'+m.escape(this.alt)+'"',t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=m.hyphenate(r)+":"+this.style[r]+";");return t&&(e+=' style="'+m.escape(t)+'"'),e+="'/>"}}var Z={"\xee":"\u0131\u0302","\xef":"\u0131\u0308","\xed":"\u0131\u0301","\xec":"\u0131\u0300"};class K{constructor(e,t,r,a,n,i,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=a||0,this.skew=n||0,this.width=i||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<S.length;t++)for(var r=S[t],a=0;a<r.blocks.length;a++){var n=r.blocks[a];if(e>=n[0]&&e<=n[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=Z[this.text])}hasClass(e){return m.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=G(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=U(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=m.escape(U(this.classes)),t+='"');var r="";for(var a in this.italic>0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(a)&&(r+=m.hyphenate(a)+":"+this.style[a]+";");r&&(e=!0,t+=' style="'+m.escape(r)+'"');var n=m.escape(this.text);return e?(t+=">",t+=n,t+="</span>"):n}}class J{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+m.escape(this.attributes[t])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>"}}class Q{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",T[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+m.escape(this.alternate)+'"/>':'<path d="'+m.escape(T[this.pathName])+'"/>'}}class ee{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+m.escape(this.attributes[t])+'"');return e+="/>"}}function te(e){if(e instanceof K)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var re={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ae={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ne={math:{},text:{}};function ie(e,t,r,a,n,i){ne[e][n]={font:t,group:r,replace:a},i&&a&&(ne[e][a]=ne[e][n])}var oe="math",se="text",le="main",he="ams",me="accent-token",ce="bin",pe="close",ue="inner",de="mathord",ge="op-token",fe="open",ve="punct",be="rel",ye="spacing",xe="textord";ie(oe,le,be,"\u2261","\\equiv",!0),ie(oe,le,be,"\u227a","\\prec",!0),ie(oe,le,be,"\u227b","\\succ",!0),ie(oe,le,be,"\u223c","\\sim",!0),ie(oe,le,be,"\u22a5","\\perp"),ie(oe,le,be,"\u2aaf","\\preceq",!0),ie(oe,le,be,"\u2ab0","\\succeq",!0),ie(oe,le,be,"\u2243","\\simeq",!0),ie(oe,le,be,"\u2223","\\mid",!0),ie(oe,le,be,"\u226a","\\ll",!0),ie(oe,le,be,"\u226b","\\gg",!0),ie(oe,le,be,"\u224d","\\asymp",!0),ie(oe,le,be,"\u2225","\\parallel"),ie(oe,le,be,"\u22c8","\\bowtie",!0),ie(oe,le,be,"\u2323","\\smile",!0),ie(oe,le,be,"\u2291","\\sqsubseteq",!0),ie(oe,le,be,"\u2292","\\sqsupseteq",!0),ie(oe,le,be,"\u2250","\\doteq",!0),ie(oe,le,be,"\u2322","\\frown",!0),ie(oe,le,be,"\u220b","\\ni",!0),ie(oe,le,be,"\u221d","\\propto",!0),ie(oe,le,be,"\u22a2","\\vdash",!0),ie(oe,le,be,"\u22a3","\\dashv",!0),ie(oe,le,be,"\u220b","\\owns"),ie(oe,le,ve,".","\\ldotp"),ie(oe,le,ve,"\u22c5","\\cdotp"),ie(oe,le,xe,"#","\\#"),ie(se,le,xe,"#","\\#"),ie(oe,le,xe,"&","\\&"),ie(se,le,xe,"&","\\&"),ie(oe,le,xe,"\u2135","\\aleph",!0),ie(oe,le,xe,"\u2200","\\forall",!0),ie(oe,le,xe,"\u210f","\\hbar",!0),ie(oe,le,xe,"\u2203","\\exists",!0),ie(oe,le,xe,"\u2207","\\nabla",!0),ie(oe,le,xe,"\u266d","\\flat",!0),ie(oe,le,xe,"\u2113","\\ell",!0),ie(oe,le,xe,"\u266e","\\natural",!0),ie(oe,le,xe,"\u2663","\\clubsuit",!0),ie(oe,le,xe,"\u2118","\\wp",!0),ie(oe,le,xe,"\u266f","\\sharp",!0),ie(oe,le,xe,"\u2662","\\diamondsuit",!0),ie(oe,le,xe,"\u211c","\\Re",!0),ie(oe,le,xe,"\u2661","\\heartsuit",!0),ie(oe,le,xe,"\u2111","\\Im",!0),ie(oe,le,xe,"\u2660","\\spadesuit",!0),ie(oe,le,xe,"\xa7","\\S",!0),ie(se,le,xe,"\xa7","\\S"),ie(oe,le,xe,"\xb6","\\P",!0),ie(se,le,xe,"\xb6","\\P"),ie(oe,le,xe,"\u2020","\\dag"),ie(se,le,xe,"\u2020","\\dag"),ie(se,le,xe,"\u2020","\\textdagger"),ie(oe,le,xe,"\u2021","\\ddag"),ie(se,le,xe,"\u2021","\\ddag"),ie(se,le,xe,"\u2021","\\textdaggerdbl"),ie(oe,le,pe,"\u23b1","\\rmoustache",!0),ie(oe,le,fe,"\u23b0","\\lmoustache",!0),ie(oe,le,pe,"\u27ef","\\rgroup",!0),ie(oe,le,fe,"\u27ee","\\lgroup",!0),ie(oe,le,ce,"\u2213","\\mp",!0),ie(oe,le,ce,"\u2296","\\ominus",!0),ie(oe,le,ce,"\u228e","\\uplus",!0),ie(oe,le,ce,"\u2293","\\sqcap",!0),ie(oe,le,ce,"\u2217","\\ast"),ie(oe,le,ce,"\u2294","\\sqcup",!0),ie(oe,le,ce,"\u25ef","\\bigcirc",!0),ie(oe,le,ce,"\u2219","\\bullet",!0),ie(oe,le,ce,"\u2021","\\ddagger"),ie(oe,le,ce,"\u2240","\\wr",!0),ie(oe,le,ce,"\u2a3f","\\amalg"),ie(oe,le,ce,"&","\\And"),ie(oe,le,be,"\u27f5","\\longleftarrow",!0),ie(oe,le,be,"\u21d0","\\Leftarrow",!0),ie(oe,le,be,"\u27f8","\\Longleftarrow",!0),ie(oe,le,be,"\u27f6","\\longrightarrow",!0),ie(oe,le,be,"\u21d2","\\Rightarrow",!0),ie(oe,le,be,"\u27f9","\\Longrightarrow",!0),ie(oe,le,be,"\u2194","\\leftrightarrow",!0),ie(oe,le,be,"\u27f7","\\longleftrightarrow",!0),ie(oe,le,be,"\u21d4","\\Leftrightarrow",!0),ie(oe,le,be,"\u27fa","\\Longleftrightarrow",!0),ie(oe,le,be,"\u21a6","\\mapsto",!0),ie(oe,le,be,"\u27fc","\\longmapsto",!0),ie(oe,le,be,"\u2197","\\nearrow",!0),ie(oe,le,be,"\u21a9","\\hookleftarrow",!0),ie(oe,le,be,"\u21aa","\\hookrightarrow",!0),ie(oe,le,be,"\u2198","\\searrow",!0),ie(oe,le,be,"\u21bc","\\leftharpoonup",!0),ie(oe,le,be,"\u21c0","\\rightharpoonup",!0),ie(oe,le,be,"\u2199","\\swarrow",!0),ie(oe,le,be,"\u21bd","\\leftharpoondown",!0),ie(oe,le,be,"\u21c1","\\rightharpoondown",!0),ie(oe,le,be,"\u2196","\\nwarrow",!0),ie(oe,le,be,"\u21cc","\\rightleftharpoons",!0),ie(oe,he,be,"\u226e","\\nless",!0),ie(oe,he,be,"\ue010","\\@nleqslant"),ie(oe,he,be,"\ue011","\\@nleqq"),ie(oe,he,be,"\u2a87","\\lneq",!0),ie(oe,he,be,"\u2268","\\lneqq",!0),ie(oe,he,be,"\ue00c","\\@lvertneqq"),ie(oe,he,be,"\u22e6","\\lnsim",!0),ie(oe,he,be,"\u2a89","\\lnapprox",!0),ie(oe,he,be,"\u2280","\\nprec",!0),ie(oe,he,be,"\u22e0","\\npreceq",!0),ie(oe,he,be,"\u22e8","\\precnsim",!0),ie(oe,he,be,"\u2ab9","\\precnapprox",!0),ie(oe,he,be,"\u2241","\\nsim",!0),ie(oe,he,be,"\ue006","\\@nshortmid"),ie(oe,he,be,"\u2224","\\nmid",!0),ie(oe,he,be,"\u22ac","\\nvdash",!0),ie(oe,he,be,"\u22ad","\\nvDash",!0),ie(oe,he,be,"\u22ea","\\ntriangleleft"),ie(oe,he,be,"\u22ec","\\ntrianglelefteq",!0),ie(oe,he,be,"\u228a","\\subsetneq",!0),ie(oe,he,be,"\ue01a","\\@varsubsetneq"),ie(oe,he,be,"\u2acb","\\subsetneqq",!0),ie(oe,he,be,"\ue017","\\@varsubsetneqq"),ie(oe,he,be,"\u226f","\\ngtr",!0),ie(oe,he,be,"\ue00f","\\@ngeqslant"),ie(oe,he,be,"\ue00e","\\@ngeqq"),ie(oe,he,be,"\u2a88","\\gneq",!0),ie(oe,he,be,"\u2269","\\gneqq",!0),ie(oe,he,be,"\ue00d","\\@gvertneqq"),ie(oe,he,be,"\u22e7","\\gnsim",!0),ie(oe,he,be,"\u2a8a","\\gnapprox",!0),ie(oe,he,be,"\u2281","\\nsucc",!0),ie(oe,he,be,"\u22e1","\\nsucceq",!0),ie(oe,he,be,"\u22e9","\\succnsim",!0),ie(oe,he,be,"\u2aba","\\succnapprox",!0),ie(oe,he,be,"\u2246","\\ncong",!0),ie(oe,he,be,"\ue007","\\@nshortparallel"),ie(oe,he,be,"\u2226","\\nparallel",!0),ie(oe,he,be,"\u22af","\\nVDash",!0),ie(oe,he,be,"\u22eb","\\ntriangleright"),ie(oe,he,be,"\u22ed","\\ntrianglerighteq",!0),ie(oe,he,be,"\ue018","\\@nsupseteqq"),ie(oe,he,be,"\u228b","\\supsetneq",!0),ie(oe,he,be,"\ue01b","\\@varsupsetneq"),ie(oe,he,be,"\u2acc","\\supsetneqq",!0),ie(oe,he,be,"\ue019","\\@varsupsetneqq"),ie(oe,he,be,"\u22ae","\\nVdash",!0),ie(oe,he,be,"\u2ab5","\\precneqq",!0),ie(oe,he,be,"\u2ab6","\\succneqq",!0),ie(oe,he,be,"\ue016","\\@nsubseteqq"),ie(oe,he,ce,"\u22b4","\\unlhd"),ie(oe,he,ce,"\u22b5","\\unrhd"),ie(oe,he,be,"\u219a","\\nleftarrow",!0),ie(oe,he,be,"\u219b","\\nrightarrow",!0),ie(oe,he,be,"\u21cd","\\nLeftarrow",!0),ie(oe,he,be,"\u21cf","\\nRightarrow",!0),ie(oe,he,be,"\u21ae","\\nleftrightarrow",!0),ie(oe,he,be,"\u21ce","\\nLeftrightarrow",!0),ie(oe,he,be,"\u25b3","\\vartriangle"),ie(oe,he,xe,"\u210f","\\hslash"),ie(oe,he,xe,"\u25bd","\\triangledown"),ie(oe,he,xe,"\u25ca","\\lozenge"),ie(oe,he,xe,"\u24c8","\\circledS"),ie(oe,he,xe,"\xae","\\circledR"),ie(se,he,xe,"\xae","\\circledR"),ie(oe,he,xe,"\u2221","\\measuredangle",!0),ie(oe,he,xe,"\u2204","\\nexists"),ie(oe,he,xe,"\u2127","\\mho"),ie(oe,he,xe,"\u2132","\\Finv",!0),ie(oe,he,xe,"\u2141","\\Game",!0),ie(oe,he,xe,"\u2035","\\backprime"),ie(oe,he,xe,"\u25b2","\\blacktriangle"),ie(oe,he,xe,"\u25bc","\\blacktriangledown"),ie(oe,he,xe,"\u25a0","\\blacksquare"),ie(oe,he,xe,"\u29eb","\\blacklozenge"),ie(oe,he,xe,"\u2605","\\bigstar"),ie(oe,he,xe,"\u2222","\\sphericalangle",!0),ie(oe,he,xe,"\u2201","\\complement",!0),ie(oe,he,xe,"\xf0","\\eth",!0),ie(se,le,xe,"\xf0","\xf0"),ie(oe,he,xe,"\u2571","\\diagup"),ie(oe,he,xe,"\u2572","\\diagdown"),ie(oe,he,xe,"\u25a1","\\square"),ie(oe,he,xe,"\u25a1","\\Box"),ie(oe,he,xe,"\u25ca","\\Diamond"),ie(oe,he,xe,"\xa5","\\yen",!0),ie(se,he,xe,"\xa5","\\yen",!0),ie(oe,he,xe,"\u2713","\\checkmark",!0),ie(se,he,xe,"\u2713","\\checkmark"),ie(oe,he,xe,"\u2136","\\beth",!0),ie(oe,he,xe,"\u2138","\\daleth",!0),ie(oe,he,xe,"\u2137","\\gimel",!0),ie(oe,he,xe,"\u03dd","\\digamma",!0),ie(oe,he,xe,"\u03f0","\\varkappa"),ie(oe,he,fe,"\u250c","\\@ulcorner",!0),ie(oe,he,pe,"\u2510","\\@urcorner",!0),ie(oe,he,fe,"\u2514","\\@llcorner",!0),ie(oe,he,pe,"\u2518","\\@lrcorner",!0),ie(oe,he,be,"\u2266","\\leqq",!0),ie(oe,he,be,"\u2a7d","\\leqslant",!0),ie(oe,he,be,"\u2a95","\\eqslantless",!0),ie(oe,he,be,"\u2272","\\lesssim",!0),ie(oe,he,be,"\u2a85","\\lessapprox",!0),ie(oe,he,be,"\u224a","\\approxeq",!0),ie(oe,he,ce,"\u22d6","\\lessdot"),ie(oe,he,be,"\u22d8","\\lll",!0),ie(oe,he,be,"\u2276","\\lessgtr",!0),ie(oe,he,be,"\u22da","\\lesseqgtr",!0),ie(oe,he,be,"\u2a8b","\\lesseqqgtr",!0),ie(oe,he,be,"\u2251","\\doteqdot"),ie(oe,he,be,"\u2253","\\risingdotseq",!0),ie(oe,he,be,"\u2252","\\fallingdotseq",!0),ie(oe,he,be,"\u223d","\\backsim",!0),ie(oe,he,be,"\u22cd","\\backsimeq",!0),ie(oe,he,be,"\u2ac5","\\subseteqq",!0),ie(oe,he,be,"\u22d0","\\Subset",!0),ie(oe,he,be,"\u228f","\\sqsubset",!0),ie(oe,he,be,"\u227c","\\preccurlyeq",!0),ie(oe,he,be,"\u22de","\\curlyeqprec",!0),ie(oe,he,be,"\u227e","\\precsim",!0),ie(oe,he,be,"\u2ab7","\\precapprox",!0),ie(oe,he,be,"\u22b2","\\vartriangleleft"),ie(oe,he,be,"\u22b4","\\trianglelefteq"),ie(oe,he,be,"\u22a8","\\vDash",!0),ie(oe,he,be,"\u22aa","\\Vvdash",!0),ie(oe,he,be,"\u2323","\\smallsmile"),ie(oe,he,be,"\u2322","\\smallfrown"),ie(oe,he,be,"\u224f","\\bumpeq",!0),ie(oe,he,be,"\u224e","\\Bumpeq",!0),ie(oe,he,be,"\u2267","\\geqq",!0),ie(oe,he,be,"\u2a7e","\\geqslant",!0),ie(oe,he,be,"\u2a96","\\eqslantgtr",!0),ie(oe,he,be,"\u2273","\\gtrsim",!0),ie(oe,he,be,"\u2a86","\\gtrapprox",!0),ie(oe,he,ce,"\u22d7","\\gtrdot"),ie(oe,he,be,"\u22d9","\\ggg",!0),ie(oe,he,be,"\u2277","\\gtrless",!0),ie(oe,he,be,"\u22db","\\gtreqless",!0),ie(oe,he,be,"\u2a8c","\\gtreqqless",!0),ie(oe,he,be,"\u2256","\\eqcirc",!0),ie(oe,he,be,"\u2257","\\circeq",!0),ie(oe,he,be,"\u225c","\\triangleq",!0),ie(oe,he,be,"\u223c","\\thicksim"),ie(oe,he,be,"\u2248","\\thickapprox"),ie(oe,he,be,"\u2ac6","\\supseteqq",!0),ie(oe,he,be,"\u22d1","\\Supset",!0),ie(oe,he,be,"\u2290","\\sqsupset",!0),ie(oe,he,be,"\u227d","\\succcurlyeq",!0),ie(oe,he,be,"\u22df","\\curlyeqsucc",!0),ie(oe,he,be,"\u227f","\\succsim",!0),ie(oe,he,be,"\u2ab8","\\succapprox",!0),ie(oe,he,be,"\u22b3","\\vartriangleright"),ie(oe,he,be,"\u22b5","\\trianglerighteq"),ie(oe,he,be,"\u22a9","\\Vdash",!0),ie(oe,he,be,"\u2223","\\shortmid"),ie(oe,he,be,"\u2225","\\shortparallel"),ie(oe,he,be,"\u226c","\\between",!0),ie(oe,he,be,"\u22d4","\\pitchfork",!0),ie(oe,he,be,"\u221d","\\varpropto"),ie(oe,he,be,"\u25c0","\\blacktriangleleft"),ie(oe,he,be,"\u2234","\\therefore",!0),ie(oe,he,be,"\u220d","\\backepsilon"),ie(oe,he,be,"\u25b6","\\blacktriangleright"),ie(oe,he,be,"\u2235","\\because",!0),ie(oe,he,be,"\u22d8","\\llless"),ie(oe,he,be,"\u22d9","\\gggtr"),ie(oe,he,ce,"\u22b2","\\lhd"),ie(oe,he,ce,"\u22b3","\\rhd"),ie(oe,he,be,"\u2242","\\eqsim",!0),ie(oe,le,be,"\u22c8","\\Join"),ie(oe,he,be,"\u2251","\\Doteq",!0),ie(oe,he,ce,"\u2214","\\dotplus",!0),ie(oe,he,ce,"\u2216","\\smallsetminus"),ie(oe,he,ce,"\u22d2","\\Cap",!0),ie(oe,he,ce,"\u22d3","\\Cup",!0),ie(oe,he,ce,"\u2a5e","\\doublebarwedge",!0),ie(oe,he,ce,"\u229f","\\boxminus",!0),ie(oe,he,ce,"\u229e","\\boxplus",!0),ie(oe,he,ce,"\u22c7","\\divideontimes",!0),ie(oe,he,ce,"\u22c9","\\ltimes",!0),ie(oe,he,ce,"\u22ca","\\rtimes",!0),ie(oe,he,ce,"\u22cb","\\leftthreetimes",!0),ie(oe,he,ce,"\u22cc","\\rightthreetimes",!0),ie(oe,he,ce,"\u22cf","\\curlywedge",!0),ie(oe,he,ce,"\u22ce","\\curlyvee",!0),ie(oe,he,ce,"\u229d","\\circleddash",!0),ie(oe,he,ce,"\u229b","\\circledast",!0),ie(oe,he,ce,"\u22c5","\\centerdot"),ie(oe,he,ce,"\u22ba","\\intercal",!0),ie(oe,he,ce,"\u22d2","\\doublecap"),ie(oe,he,ce,"\u22d3","\\doublecup"),ie(oe,he,ce,"\u22a0","\\boxtimes",!0),ie(oe,he,be,"\u21e2","\\dashrightarrow",!0),ie(oe,he,be,"\u21e0","\\dashleftarrow",!0),ie(oe,he,be,"\u21c7","\\leftleftarrows",!0),ie(oe,he,be,"\u21c6","\\leftrightarrows",!0),ie(oe,he,be,"\u21da","\\Lleftarrow",!0),ie(oe,he,be,"\u219e","\\twoheadleftarrow",!0),ie(oe,he,be,"\u21a2","\\leftarrowtail",!0),ie(oe,he,be,"\u21ab","\\looparrowleft",!0),ie(oe,he,be,"\u21cb","\\leftrightharpoons",!0),ie(oe,he,be,"\u21b6","\\curvearrowleft",!0),ie(oe,he,be,"\u21ba","\\circlearrowleft",!0),ie(oe,he,be,"\u21b0","\\Lsh",!0),ie(oe,he,be,"\u21c8","\\upuparrows",!0),ie(oe,he,be,"\u21bf","\\upharpoonleft",!0),ie(oe,he,be,"\u21c3","\\downharpoonleft",!0),ie(oe,le,be,"\u22b6","\\origof",!0),ie(oe,le,be,"\u22b7","\\imageof",!0),ie(oe,he,be,"\u22b8","\\multimap",!0),ie(oe,he,be,"\u21ad","\\leftrightsquigarrow",!0),ie(oe,he,be,"\u21c9","\\rightrightarrows",!0),ie(oe,he,be,"\u21c4","\\rightleftarrows",!0),ie(oe,he,be,"\u21a0","\\twoheadrightarrow",!0),ie(oe,he,be,"\u21a3","\\rightarrowtail",!0),ie(oe,he,be,"\u21ac","\\looparrowright",!0),ie(oe,he,be,"\u21b7","\\curvearrowright",!0),ie(oe,he,be,"\u21bb","\\circlearrowright",!0),ie(oe,he,be,"\u21b1","\\Rsh",!0),ie(oe,he,be,"\u21ca","\\downdownarrows",!0),ie(oe,he,be,"\u21be","\\upharpoonright",!0),ie(oe,he,be,"\u21c2","\\downharpoonright",!0),ie(oe,he,be,"\u21dd","\\rightsquigarrow",!0),ie(oe,he,be,"\u21dd","\\leadsto"),ie(oe,he,be,"\u21db","\\Rrightarrow",!0),ie(oe,he,be,"\u21be","\\restriction"),ie(oe,le,xe,"\u2018","`"),ie(oe,le,xe,"$","\\$"),ie(se,le,xe,"$","\\$"),ie(se,le,xe,"$","\\textdollar"),ie(oe,le,xe,"%","\\%"),ie(se,le,xe,"%","\\%"),ie(oe,le,xe,"_","\\_"),ie(se,le,xe,"_","\\_"),ie(se,le,xe,"_","\\textunderscore"),ie(oe,le,xe,"\u2220","\\angle",!0),ie(oe,le,xe,"\u221e","\\infty",!0),ie(oe,le,xe,"\u2032","\\prime"),ie(oe,le,xe,"\u25b3","\\triangle"),ie(oe,le,xe,"\u0393","\\Gamma",!0),ie(oe,le,xe,"\u0394","\\Delta",!0),ie(oe,le,xe,"\u0398","\\Theta",!0),ie(oe,le,xe,"\u039b","\\Lambda",!0),ie(oe,le,xe,"\u039e","\\Xi",!0),ie(oe,le,xe,"\u03a0","\\Pi",!0),ie(oe,le,xe,"\u03a3","\\Sigma",!0),ie(oe,le,xe,"\u03a5","\\Upsilon",!0),ie(oe,le,xe,"\u03a6","\\Phi",!0),ie(oe,le,xe,"\u03a8","\\Psi",!0),ie(oe,le,xe,"\u03a9","\\Omega",!0),ie(oe,le,xe,"A","\u0391"),ie(oe,le,xe,"B","\u0392"),ie(oe,le,xe,"E","\u0395"),ie(oe,le,xe,"Z","\u0396"),ie(oe,le,xe,"H","\u0397"),ie(oe,le,xe,"I","\u0399"),ie(oe,le,xe,"K","\u039a"),ie(oe,le,xe,"M","\u039c"),ie(oe,le,xe,"N","\u039d"),ie(oe,le,xe,"O","\u039f"),ie(oe,le,xe,"P","\u03a1"),ie(oe,le,xe,"T","\u03a4"),ie(oe,le,xe,"X","\u03a7"),ie(oe,le,xe,"\xac","\\neg",!0),ie(oe,le,xe,"\xac","\\lnot"),ie(oe,le,xe,"\u22a4","\\top"),ie(oe,le,xe,"\u22a5","\\bot"),ie(oe,le,xe,"\u2205","\\emptyset"),ie(oe,he,xe,"\u2205","\\varnothing"),ie(oe,le,de,"\u03b1","\\alpha",!0),ie(oe,le,de,"\u03b2","\\beta",!0),ie(oe,le,de,"\u03b3","\\gamma",!0),ie(oe,le,de,"\u03b4","\\delta",!0),ie(oe,le,de,"\u03f5","\\epsilon",!0),ie(oe,le,de,"\u03b6","\\zeta",!0),ie(oe,le,de,"\u03b7","\\eta",!0),ie(oe,le,de,"\u03b8","\\theta",!0),ie(oe,le,de,"\u03b9","\\iota",!0),ie(oe,le,de,"\u03ba","\\kappa",!0),ie(oe,le,de,"\u03bb","\\lambda",!0),ie(oe,le,de,"\u03bc","\\mu",!0),ie(oe,le,de,"\u03bd","\\nu",!0),ie(oe,le,de,"\u03be","\\xi",!0),ie(oe,le,de,"\u03bf","\\omicron",!0),ie(oe,le,de,"\u03c0","\\pi",!0),ie(oe,le,de,"\u03c1","\\rho",!0),ie(oe,le,de,"\u03c3","\\sigma",!0),ie(oe,le,de,"\u03c4","\\tau",!0),ie(oe,le,de,"\u03c5","\\upsilon",!0),ie(oe,le,de,"\u03d5","\\phi",!0),ie(oe,le,de,"\u03c7","\\chi",!0),ie(oe,le,de,"\u03c8","\\psi",!0),ie(oe,le,de,"\u03c9","\\omega",!0),ie(oe,le,de,"\u03b5","\\varepsilon",!0),ie(oe,le,de,"\u03d1","\\vartheta",!0),ie(oe,le,de,"\u03d6","\\varpi",!0),ie(oe,le,de,"\u03f1","\\varrho",!0),ie(oe,le,de,"\u03c2","\\varsigma",!0),ie(oe,le,de,"\u03c6","\\varphi",!0),ie(oe,le,ce,"\u2217","*",!0),ie(oe,le,ce,"+","+"),ie(oe,le,ce,"\u2212","-",!0),ie(oe,le,ce,"\u22c5","\\cdot",!0),ie(oe,le,ce,"\u2218","\\circ",!0),ie(oe,le,ce,"\xf7","\\div",!0),ie(oe,le,ce,"\xb1","\\pm",!0),ie(oe,le,ce,"\xd7","\\times",!0),ie(oe,le,ce,"\u2229","\\cap",!0),ie(oe,le,ce,"\u222a","\\cup",!0),ie(oe,le,ce,"\u2216","\\setminus",!0),ie(oe,le,ce,"\u2227","\\land"),ie(oe,le,ce,"\u2228","\\lor"),ie(oe,le,ce,"\u2227","\\wedge",!0),ie(oe,le,ce,"\u2228","\\vee",!0),ie(oe,le,xe,"\u221a","\\surd"),ie(oe,le,fe,"\u27e8","\\langle",!0),ie(oe,le,fe,"\u2223","\\lvert"),ie(oe,le,fe,"\u2225","\\lVert"),ie(oe,le,pe,"?","?"),ie(oe,le,pe,"!","!"),ie(oe,le,pe,"\u27e9","\\rangle",!0),ie(oe,le,pe,"\u2223","\\rvert"),ie(oe,le,pe,"\u2225","\\rVert"),ie(oe,le,be,"=","="),ie(oe,le,be,":",":"),ie(oe,le,be,"\u2248","\\approx",!0),ie(oe,le,be,"\u2245","\\cong",!0),ie(oe,le,be,"\u2265","\\ge"),ie(oe,le,be,"\u2265","\\geq",!0),ie(oe,le,be,"\u2190","\\gets"),ie(oe,le,be,">","\\gt",!0),ie(oe,le,be,"\u2208","\\in",!0),ie(oe,le,be,"\ue020","\\@not"),ie(oe,le,be,"\u2282","\\subset",!0),ie(oe,le,be,"\u2283","\\supset",!0),ie(oe,le,be,"\u2286","\\subseteq",!0),ie(oe,le,be,"\u2287","\\supseteq",!0),ie(oe,he,be,"\u2288","\\nsubseteq",!0),ie(oe,he,be,"\u2289","\\nsupseteq",!0),ie(oe,le,be,"\u22a8","\\models"),ie(oe,le,be,"\u2190","\\leftarrow",!0),ie(oe,le,be,"\u2264","\\le"),ie(oe,le,be,"\u2264","\\leq",!0),ie(oe,le,be,"<","\\lt",!0),ie(oe,le,be,"\u2192","\\rightarrow",!0),ie(oe,le,be,"\u2192","\\to"),ie(oe,he,be,"\u2271","\\ngeq",!0),ie(oe,he,be,"\u2270","\\nleq",!0),ie(oe,le,ye,"\xa0","\\ "),ie(oe,le,ye,"\xa0","\\space"),ie(oe,le,ye,"\xa0","\\nobreakspace"),ie(se,le,ye,"\xa0","\\ "),ie(se,le,ye,"\xa0"," "),ie(se,le,ye,"\xa0","\\space"),ie(se,le,ye,"\xa0","\\nobreakspace"),ie(oe,le,ye,null,"\\nobreak"),ie(oe,le,ye,null,"\\allowbreak"),ie(oe,le,ve,",",","),ie(oe,le,ve,";",";"),ie(oe,he,ce,"\u22bc","\\barwedge",!0),ie(oe,he,ce,"\u22bb","\\veebar",!0),ie(oe,le,ce,"\u2299","\\odot",!0),ie(oe,le,ce,"\u2295","\\oplus",!0),ie(oe,le,ce,"\u2297","\\otimes",!0),ie(oe,le,xe,"\u2202","\\partial",!0),ie(oe,le,ce,"\u2298","\\oslash",!0),ie(oe,he,ce,"\u229a","\\circledcirc",!0),ie(oe,he,ce,"\u22a1","\\boxdot",!0),ie(oe,le,ce,"\u25b3","\\bigtriangleup"),ie(oe,le,ce,"\u25bd","\\bigtriangledown"),ie(oe,le,ce,"\u2020","\\dagger"),ie(oe,le,ce,"\u22c4","\\diamond"),ie(oe,le,ce,"\u22c6","\\star"),ie(oe,le,ce,"\u25c3","\\triangleleft"),ie(oe,le,ce,"\u25b9","\\triangleright"),ie(oe,le,fe,"{","\\{"),ie(se,le,xe,"{","\\{"),ie(se,le,xe,"{","\\textbraceleft"),ie(oe,le,pe,"}","\\}"),ie(se,le,xe,"}","\\}"),ie(se,le,xe,"}","\\textbraceright"),ie(oe,le,fe,"{","\\lbrace"),ie(oe,le,pe,"}","\\rbrace"),ie(oe,le,fe,"[","\\lbrack",!0),ie(se,le,xe,"[","\\lbrack",!0),ie(oe,le,pe,"]","\\rbrack",!0),ie(se,le,xe,"]","\\rbrack",!0),ie(oe,le,fe,"(","\\lparen",!0),ie(oe,le,pe,")","\\rparen",!0),ie(se,le,xe,"<","\\textless",!0),ie(se,le,xe,">","\\textgreater",!0),ie(oe,le,fe,"\u230a","\\lfloor",!0),ie(oe,le,pe,"\u230b","\\rfloor",!0),ie(oe,le,fe,"\u2308","\\lceil",!0),ie(oe,le,pe,"\u2309","\\rceil",!0),ie(oe,le,xe,"\\","\\backslash"),ie(oe,le,xe,"\u2223","|"),ie(oe,le,xe,"\u2223","\\vert"),ie(se,le,xe,"|","\\textbar",!0),ie(oe,le,xe,"\u2225","\\|"),ie(oe,le,xe,"\u2225","\\Vert"),ie(se,le,xe,"\u2225","\\textbardbl"),ie(se,le,xe,"~","\\textasciitilde"),ie(se,le,xe,"\\","\\textbackslash"),ie(se,le,xe,"^","\\textasciicircum"),ie(oe,le,be,"\u2191","\\uparrow",!0),ie(oe,le,be,"\u21d1","\\Uparrow",!0),ie(oe,le,be,"\u2193","\\downarrow",!0),ie(oe,le,be,"\u21d3","\\Downarrow",!0),ie(oe,le,be,"\u2195","\\updownarrow",!0),ie(oe,le,be,"\u21d5","\\Updownarrow",!0),ie(oe,le,ge,"\u2210","\\coprod"),ie(oe,le,ge,"\u22c1","\\bigvee"),ie(oe,le,ge,"\u22c0","\\bigwedge"),ie(oe,le,ge,"\u2a04","\\biguplus"),ie(oe,le,ge,"\u22c2","\\bigcap"),ie(oe,le,ge,"\u22c3","\\bigcup"),ie(oe,le,ge,"\u222b","\\int"),ie(oe,le,ge,"\u222b","\\intop"),ie(oe,le,ge,"\u222c","\\iint"),ie(oe,le,ge,"\u222d","\\iiint"),ie(oe,le,ge,"\u220f","\\prod"),ie(oe,le,ge,"\u2211","\\sum"),ie(oe,le,ge,"\u2a02","\\bigotimes"),ie(oe,le,ge,"\u2a01","\\bigoplus"),ie(oe,le,ge,"\u2a00","\\bigodot"),ie(oe,le,ge,"\u222e","\\oint"),ie(oe,le,ge,"\u222f","\\oiint"),ie(oe,le,ge,"\u2230","\\oiiint"),ie(oe,le,ge,"\u2a06","\\bigsqcup"),ie(oe,le,ge,"\u222b","\\smallint"),ie(se,le,ue,"\u2026","\\textellipsis"),ie(oe,le,ue,"\u2026","\\mathellipsis"),ie(se,le,ue,"\u2026","\\ldots",!0),ie(oe,le,ue,"\u2026","\\ldots",!0),ie(oe,le,ue,"\u22ef","\\@cdots",!0),ie(oe,le,ue,"\u22f1","\\ddots",!0),ie(oe,le,xe,"\u22ee","\\varvdots"),ie(oe,le,me,"\u02ca","\\acute"),ie(oe,le,me,"\u02cb","\\grave"),ie(oe,le,me,"\xa8","\\ddot"),ie(oe,le,me,"~","\\tilde"),ie(oe,le,me,"\u02c9","\\bar"),ie(oe,le,me,"\u02d8","\\breve"),ie(oe,le,me,"\u02c7","\\check"),ie(oe,le,me,"^","\\hat"),ie(oe,le,me,"\u20d7","\\vec"),ie(oe,le,me,"\u02d9","\\dot"),ie(oe,le,me,"\u02da","\\mathring"),ie(oe,le,de,"\ue131","\\@imath"),ie(oe,le,de,"\ue237","\\@jmath"),ie(oe,le,xe,"\u0131","\u0131"),ie(oe,le,xe,"\u0237","\u0237"),ie(se,le,xe,"\u0131","\\i",!0),ie(se,le,xe,"\u0237","\\j",!0),ie(se,le,xe,"\xdf","\\ss",!0),ie(se,le,xe,"\xe6","\\ae",!0),ie(se,le,xe,"\u0153","\\oe",!0),ie(se,le,xe,"\xf8","\\o",!0),ie(se,le,xe,"\xc6","\\AE",!0),ie(se,le,xe,"\u0152","\\OE",!0),ie(se,le,xe,"\xd8","\\O",!0),ie(se,le,me,"\u02ca","\\'"),ie(se,le,me,"\u02cb","\\`"),ie(se,le,me,"\u02c6","\\^"),ie(se,le,me,"\u02dc","\\~"),ie(se,le,me,"\u02c9","\\="),ie(se,le,me,"\u02d8","\\u"),ie(se,le,me,"\u02d9","\\."),ie(se,le,me,"\xb8","\\c"),ie(se,le,me,"\u02da","\\r"),ie(se,le,me,"\u02c7","\\v"),ie(se,le,me,"\xa8",'\\"'),ie(se,le,me,"\u02dd","\\H"),ie(se,le,me,"\u25ef","\\textcircled");var we={"--":!0,"---":!0,"``":!0,"''":!0};ie(se,le,xe,"\u2013","--",!0),ie(se,le,xe,"\u2013","\\textendash"),ie(se,le,xe,"\u2014","---",!0),ie(se,le,xe,"\u2014","\\textemdash"),ie(se,le,xe,"\u2018","`",!0),ie(se,le,xe,"\u2018","\\textquoteleft"),ie(se,le,xe,"\u2019","'",!0),ie(se,le,xe,"\u2019","\\textquoteright"),ie(se,le,xe,"\u201c","``",!0),ie(se,le,xe,"\u201c","\\textquotedblleft"),ie(se,le,xe,"\u201d","''",!0),ie(se,le,xe,"\u201d","\\textquotedblright"),ie(oe,le,xe,"\xb0","\\degree",!0),ie(se,le,xe,"\xb0","\\degree"),ie(se,le,xe,"\xb0","\\textdegree",!0),ie(oe,le,xe,"\xa3","\\pounds"),ie(oe,le,xe,"\xa3","\\mathsterling",!0),ie(se,le,xe,"\xa3","\\pounds"),ie(se,le,xe,"\xa3","\\textsterling",!0),ie(oe,he,xe,"\u2720","\\maltese"),ie(se,he,xe,"\u2720","\\maltese");for(var ke='0123456789/@."',Se=0;Se<14;Se++){var Me=ke.charAt(Se);ie(oe,le,xe,Me,Me)}for(var ze='0123456789!@*()-=+";:?/.,',Ae=0;Ae<25;Ae++){var Te=ze.charAt(Ae);ie(se,le,xe,Te,Te)}for(var Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ce=0;Ce<52;Ce++){var Ne=Be.charAt(Ce);ie(oe,le,de,Ne,Ne),ie(se,le,xe,Ne,Ne)}ie(oe,he,xe,"C","\u2102"),ie(se,he,xe,"C","\u2102"),ie(oe,he,xe,"H","\u210d"),ie(se,he,xe,"H","\u210d"),ie(oe,he,xe,"N","\u2115"),ie(se,he,xe,"N","\u2115"),ie(oe,he,xe,"P","\u2119"),ie(se,he,xe,"P","\u2119"),ie(oe,he,xe,"Q","\u211a"),ie(se,he,xe,"Q","\u211a"),ie(oe,he,xe,"R","\u211d"),ie(se,he,xe,"R","\u211d"),ie(oe,he,xe,"Z","\u2124"),ie(se,he,xe,"Z","\u2124"),ie(oe,le,de,"h","\u210e"),ie(se,le,de,"h","\u210e");for(var qe="",Ie=0;Ie<52;Ie++){var Re=Be.charAt(Ie);ie(oe,le,de,Re,qe=String.fromCharCode(55349,56320+Ie)),ie(se,le,xe,Re,qe),ie(oe,le,de,Re,qe=String.fromCharCode(55349,56372+Ie)),ie(se,le,xe,Re,qe),ie(oe,le,de,Re,qe=String.fromCharCode(55349,56424+Ie)),ie(se,le,xe,Re,qe),ie(oe,le,de,Re,qe=String.fromCharCode(55349,56580+Ie)),ie(se,le,xe,Re,qe),ie(oe,le,de,Re,qe=String.fromCharCode(55349,56684+Ie)),ie(se,le,xe,Re,qe),ie(oe,le,de,Re,qe=String.fromCharCode(55349,56736+Ie)),ie(se,le,xe,Re,qe),ie(oe,le,de,Re,qe=String.fromCharCode(55349,56788+Ie)),ie(se,le,xe,Re,qe),ie(oe,le,de,Re,qe=String.fromCharCode(55349,56840+Ie)),ie(se,le,xe,Re,qe),ie(oe,le,de,Re,qe=String.fromCharCode(55349,56944+Ie)),ie(se,le,xe,Re,qe),Ie<26&&(ie(oe,le,de,Re,qe=String.fromCharCode(55349,56632+Ie)),ie(se,le,xe,Re,qe),ie(oe,le,de,Re,qe=String.fromCharCode(55349,56476+Ie)),ie(se,le,xe,Re,qe))}ie(oe,le,de,"k",qe=String.fromCharCode(55349,56668)),ie(se,le,xe,"k",qe);for(var He=0;He<10;He++){var Oe=He.toString();ie(oe,le,de,Oe,qe=String.fromCharCode(55349,57294+He)),ie(se,le,xe,Oe,qe),ie(oe,le,de,Oe,qe=String.fromCharCode(55349,57314+He)),ie(se,le,xe,Oe,qe),ie(oe,le,de,Oe,qe=String.fromCharCode(55349,57324+He)),ie(se,le,xe,Oe,qe),ie(oe,le,de,Oe,qe=String.fromCharCode(55349,57334+He)),ie(se,le,xe,Oe,qe)}for(var Ee="\xd0\xde\xfe",Le=0;Le<3;Le++){var De=Ee.charAt(Le);ie(oe,le,de,De,De),ie(se,le,xe,De,De)}var Ve=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Pe=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Fe=function(e,t,r){return ne[r][e]&&ne[r][e].replace&&(e=ne[r][e].replace),{value:e,metrics:I(e,t,r)}},Ge=function(e,t,r,a,n){var i,o=Fe(e,t,r),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===r||a&&"mathit"===a.font)&&(l=0),i=new K(e,s.height,s.depth,l,s.skew,s.width,n)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new K(e,0,0,0,0,0,n);if(a){i.maxFontSize=a.sizeMultiplier,a.style.isTight()&&i.classes.push("mtight");var h=a.getColor();h&&(i.style.color=h)}return i},Ue=(e,t)=>{if(U(e.classes)!==U(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var a in e.style)if(e.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},Ye=function(e){for(var t=0,r=0,a=0,n=0;n<e.children.length;n++){var i=e.children[n];i.height>t&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>a&&(a=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=a},Xe=function(e,t,r,a){var n=new _(e,t,r,a);return Ye(n),n},We=(e,t,r,a)=>new _(e,t,r,a),_e=function(e){var t=new B(e);return Ye(t),t},je=function(e,t,r){var a="";switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return a+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},$e={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ze={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Ke={fontMap:$e,makeSymbol:Ge,mathsym:function(e,t,r,a){return void 0===a&&(a=[]),"boldsymbol"===r.font&&Fe(e,"Main-Bold",t).metrics?Ge(e,"Main-Bold",t,r,a.concat(["mathbf"])):"\\"===e||"main"===ne[t][e].font?Ge(e,"Main-Regular",t,r,a):Ge(e,"AMS-Regular",t,r,a.concat(["amsrm"]))},makeSpan:Xe,makeSvgSpan:We,makeLineSpan:function(e,t,r){var a=Xe([e],[],t);return a.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),a.style.borderBottomWidth=G(a.height),a.maxFontSize=1,a},makeAnchor:function(e,t,r,a){var n=new j(e,t,r,a);return Ye(n),n},makeFragment:_e,wrapFragment:function(e,t){return e instanceof B?Xe([],[e],t):e},makeVList:function(e,t){for(var{children:r,depth:a}=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],a=-t[0].shift-t[0].elem.depth,n=a,i=1;i<t.length;i++){var o=-t[i].shift-n-t[i].elem.depth,s=o-(t[i-1].elem.height+t[i-1].elem.depth);n+=o,r.push({type:"kern",size:s}),r.push(t[i])}return{children:r,depth:a}}var l;if("top"===e.positionType){for(var h=e.positionData,m=0;m<e.children.length;m++){var c=e.children[m];h-="kern"===c.type?c.size:c.elem.height+c.elem.depth}l=h}else if("bottom"===e.positionType)l=-e.positionData;else{var p=e.children[0];if("elem"!==p.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-p.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-p.elem.depth}}return{children:e.children,depth:l}}(e),n=0,i=0;i<r.length;i++){var o=r[i];if("elem"===o.type){var s=o.elem;n=Math.max(n,s.maxFontSize,s.height)}}n+=2;var l=Xe(["pstrut"],[]);l.style.height=G(n);for(var h=[],m=a,c=a,p=a,u=0;u<r.length;u++){var d=r[u];if("kern"===d.type)p+=d.size;else{var g=d.elem,f=d.wrapperClasses||[],v=d.wrapperStyle||{},b=Xe(f,[l,g],void 0,v);b.style.top=G(-n-p-g.depth),d.marginLeft&&(b.style.marginLeft=d.marginLeft),d.marginRight&&(b.style.marginRight=d.marginRight),h.push(b),p+=g.height+g.depth}m=Math.min(m,p),c=Math.max(c,p)}var y,x=Xe(["vlist"],h);if(x.style.height=G(c),m<0){var w=Xe([],[]),k=Xe(["vlist"],[w]);k.style.height=G(-m);var S=Xe(["vlist-s"],[new K("\u200b")]);y=[Xe(["vlist-r"],[x,S]),Xe(["vlist-r"],[k])]}else y=[Xe(["vlist-r"],[x])];var M=Xe(["vlist-t"],y);return 2===y.length&&M.classes.push("vlist-t2"),M.height=c,M.depth=-m,M},makeOrd:function(e,t,r){var a=e.mode,n=e.text,o=["mord"],s="math"===a||"text"===a&&t.font,l=s?t.font:t.fontFamily,h="",m="";if(55349===n.charCodeAt(0)&&([h,m]=function(e,t){var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,a="math"===t?0:1;if(119808<=r&&r<120484){var n=Math.floor((r-119808)/26);return[Ve[n][2],Ve[n][a]]}if(120782<=r&&r<=120831){var o=Math.floor((r-120782)/10);return[Pe[o][2],Pe[o][a]]}if(120485===r||120486===r)return[Ve[0][2],Ve[0][a]];if(120486<r&&r<120782)return["",""];throw new i("Unsupported character: "+e)}(n,a)),h.length>0)return Ge(n,h,a,t,o.concat(m));if(l){var c,p;if("boldsymbol"===l){var u=function(e,t,r,a,n){return"textord"!==n&&Fe(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(n,a,0,0,r);c=u.fontName,p=[u.fontClass]}else s?(c=$e[l].fontName,p=[l]):(c=je(l,t.fontWeight,t.fontShape),p=[l,t.fontWeight,t.fontShape]);if(Fe(n,c,a).metrics)return Ge(n,c,a,t,o.concat(p));if(we.hasOwnProperty(n)&&"Typewriter"===c.slice(0,10)){for(var d=[],g=0;g<n.length;g++)d.push(Ge(n[g],c,a,t,o.concat(p)));return _e(d)}}if("mathord"===r)return Ge(n,"Math-Italic",a,t,o.concat(["mathnormal"]));if("textord"===r){var f=ne[a][n]&&ne[a][n].font;if("ams"===f){var v=je("amsrm",t.fontWeight,t.fontShape);return Ge(n,v,a,t,o.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==f&&f){var b=je(f,t.fontWeight,t.fontShape);return Ge(n,b,a,t,o.concat(b,t.fontWeight,t.fontShape))}var y=je("textrm",t.fontWeight,t.fontShape);return Ge(n,y,a,t,o.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+r+" in makeOrd")},makeGlue:(e,t)=>{var r=Xe(["mspace"],[],t),a=F(e,t);return r.style.marginRight=G(a),r},staticSvg:function(e,t){var[r,a,n]=Ze[e],i=new Q(r),o=new J([i],{width:G(a),height:G(n),style:"width:"+G(a),viewBox:"0 0 "+1e3*a+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),s=We(["overlay"],[o],t);return s.height=n,s.style.height=G(n),s.style.width=G(a),s},svgData:Ze,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var r=e[t],a=e[t+1];r instanceof K&&a instanceof K&&Ue(r,a)&&(r.text+=a.text,r.height=Math.max(r.height,a.height),r.depth=Math.max(r.depth,a.depth),r.italic=a.italic,e.splice(t+1,1),t--)}return e}},Je={number:3,unit:"mu"},Qe={number:4,unit:"mu"},et={number:5,unit:"mu"},tt={mord:{mop:Je,mbin:Qe,mrel:et,minner:Je},mop:{mord:Je,mop:Je,mrel:et,minner:Je},mbin:{mord:Qe,mop:Qe,mopen:Qe,minner:Qe},mrel:{mord:et,mop:et,mopen:et,minner:et},mopen:{},mclose:{mop:Je,mbin:Qe,mrel:et,minner:Je},mpunct:{mord:Je,mop:Je,mrel:et,mopen:Je,mclose:Je,mpunct:Je,minner:Je},minner:{mord:Je,mop:Je,mbin:Qe,mrel:et,mopen:Je,mpunct:Je,minner:Je}},rt={mord:{mop:Je},mop:{mord:Je,mop:Je},mbin:{},mrel:{},mopen:{},mclose:{mop:Je},mpunct:{},minner:{mop:Je}},at={},nt={},it={};function ot(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:void 0===a.allowedInMath||a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},l=0;l<r.length;++l)at[r[l]]=s;t&&(i&&(nt[t]=i),o&&(it[t]=o))}function st(e){var{type:t,htmlBuilder:r,mathmlBuilder:a}=e;ot({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:a})}var lt=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},ht=function(e){return"ordgroup"===e.type?e.body:[e]},mt=Ke.makeSpan,ct=["leftmost","mbin","mopen","mrel","mop","mpunct"],pt=["rightmost","mrel","mclose","mpunct"],ut={display:k.DISPLAY,text:k.TEXT,script:k.SCRIPT,scriptscript:k.SCRIPTSCRIPT},dt={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},gt=function(e,t,r,a){void 0===a&&(a=[null,null]);for(var n=[],i=0;i<e.length;i++){var o=wt(e[i],t);if(o instanceof B){var s=o.children;n.push(...s)}else n.push(o)}if(Ke.tryCombineChars(n),!r)return n;var l=t;if(1===e.length){var h=e[0];"sizing"===h.type?l=t.havingSize(h.size):"styling"===h.type&&(l=t.havingStyle(ut[h.style]))}var c=mt([a[0]||"leftmost"],[],t),p=mt([a[1]||"rightmost"],[],t),u="root"===r;return ft(n,((e,t)=>{var r=t.classes[0],a=e.classes[0];"mbin"===r&&m.contains(pt,a)?t.classes[0]="mord":"mbin"===a&&m.contains(ct,r)&&(e.classes[0]="mord")}),{node:c},p,u),ft(n,((e,t)=>{var r=yt(t),a=yt(e),n=r&&a?e.hasClass("mtight")?rt[r][a]:tt[r][a]:null;if(n)return Ke.makeGlue(n,l)}),{node:c},p,u),n},ft=function e(t,r,a,n,i){n&&t.push(n);for(var o=0;o<t.length;o++){var s=t[o],l=vt(s);if(l)e(l.children,r,a,null,i);else{var h=!s.hasClass("mspace");if(h){var m=r(s,a.node);m&&(a.insertAfter?a.insertAfter(m):(t.unshift(m),o++))}h?a.node=s:i&&s.hasClass("newline")&&(a.node=mt(["leftmost"])),a.insertAfter=(e=>r=>{t.splice(e+1,0,r),o++})(o)}}n&&t.pop()},vt=function(e){return e instanceof B||e instanceof j||e instanceof _&&e.hasClass("enclosing")?e:null},bt=function e(t,r){var a=vt(t);if(a){var n=a.children;if(n.length){if("right"===r)return e(n[n.length-1],"right");if("left"===r)return e(n[0],"left")}}return t},yt=function(e,t){return e?(t&&(e=bt(e,t)),dt[e.classes[0]]||null):null},xt=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return mt(t.concat(r))},wt=function(e,t,r){if(!e)return mt();if(nt[e.type]){var a=nt[e.type](e,t);if(r&&t.size!==r.size){a=mt(t.sizingClasses(r),[a],t);var n=t.sizeMultiplier/r.sizeMultiplier;a.height*=n,a.depth*=n}return a}throw new i("Got group of unknown type: '"+e.type+"'")};function kt(e,t){var r=mt(["base"],e,t),a=mt(["strut"]);return a.style.height=G(r.height+r.depth),r.depth&&(a.style.verticalAlign=G(-r.depth)),r.children.unshift(a),r}function St(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var a,n=gt(e,t,"root");2===n.length&&n[1].hasClass("tag")&&(a=n.pop());for(var i,o=[],s=[],l=0;l<n.length;l++)if(s.push(n[l]),n[l].hasClass("mbin")||n[l].hasClass("mrel")||n[l].hasClass("allowbreak")){for(var h=!1;l<n.length-1&&n[l+1].hasClass("mspace")&&!n[l+1].hasClass("newline");)l++,s.push(n[l]),n[l].hasClass("nobreak")&&(h=!0);h||(o.push(kt(s,t)),s=[])}else n[l].hasClass("newline")&&(s.pop(),s.length>0&&(o.push(kt(s,t)),s=[]),o.push(n[l]));s.length>0&&o.push(kt(s,t)),r?((i=kt(gt(r,t,!0))).classes=["tag"],o.push(i)):a&&o.push(a);var m=mt(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var c=i.children[0];c.style.height=G(m.height+m.depth),m.depth&&(c.style.verticalAlign=G(-m.depth))}return m}function Mt(e){return new B(e)}class zt{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=U(this.classes));for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=m.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+m.escape(U(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class At{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return m.escape(this.toText())}toText(){return this.text}}var Tt={MathNode:zt,TextNode:At,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",G(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+G(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:Mt},Bt=function(e,t,r){return!ne[t][e]||!ne[t][e].replace||55349===e.charCodeAt(0)||we.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=ne[t][e].replace),new Tt.TextNode(e)},Ct=function(e){return 1===e.length?e[0]:new Tt.MathNode("mrow",e)},Nt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var a=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var n=e.text;return m.contains(["\\imath","\\jmath"],n)?null:(ne[a][n]&&ne[a][n].replace&&(n=ne[a][n].replace),I(n,Ke.fontMap[r].fontName,a)?Ke.fontMap[r].variant:null)},qt=function(e,t,r){if(1===e.length){var a=Rt(e[0],t);return r&&a instanceof zt&&"mo"===a.type&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var n,i=[],o=0;o<e.length;o++){var s=Rt(e[o],t);if(s instanceof zt&&n instanceof zt){if("mtext"===s.type&&"mtext"===n.type&&s.getAttribute("mathvariant")===n.getAttribute("mathvariant")){n.children.push(...s.children);continue}if("mn"===s.type&&"mn"===n.type){n.children.push(...s.children);continue}if("mi"===s.type&&1===s.children.length&&"mn"===n.type){var l=s.children[0];if(l instanceof At&&"."===l.text){n.children.push(...s.children);continue}}else if("mi"===n.type&&1===n.children.length){var h=n.children[0];if(h instanceof At&&"\u0338"===h.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var m=s.children[0];m instanceof At&&m.text.length>0&&(m.text=m.text.slice(0,1)+"\u0338"+m.text.slice(1),i.pop())}}}i.push(s),n=s}return i},It=function(e,t,r){return Ct(qt(e,t,r))},Rt=function(e,t){if(!e)return new Tt.MathNode("mrow");if(it[e.type])return it[e.type](e,t);throw new i("Got group of unknown type: '"+e.type+"'")};function Ht(e,t,r,a,n){var i,o=qt(e,r);i=1===o.length&&o[0]instanceof zt&&m.contains(["mrow","mtable"],o[0].type)?o[0]:new Tt.MathNode("mrow",o);var s=new Tt.MathNode("annotation",[new Tt.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var l=new Tt.MathNode("semantics",[i,s]),h=new Tt.MathNode("math",[l]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&h.setAttribute("display","block");var c=n?"katex":"katex-mathml";return Ke.makeSpan([c],[h])}var Ot=function(e){return new L({style:e.displayMode?k.DISPLAY:k.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Et=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Ke.makeSpan(r,[e])}return e},Lt={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Dt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Vt=function(e,t,r,a,n){var i,o=e.height+e.depth+r+a;if(/fbox|color|angl/.test(t)){if(i=Ke.makeSpan(["stretchy",t],[],n),"fbox"===t){var s=n.color&&n.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new ee({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new ee({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new J(l,{width:"100%",height:G(o)});i=Ke.makeSvgSpan([],[h],n)}return i.height=o,i.style.height=G(o),i},Pt=function(e){var t=new Tt.MathNode("mo",[new Tt.TextNode(Lt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Ft=function(e,t){var{span:r,minWidth:a,height:n}=function(){var r=4e5,a=e.label.slice(1);if(m.contains(["widehat","widecheck","widetilde","utilde"],a)){var n,i,o,s="ordgroup"===(d=e.base).type?d.body.length:1;if(s>5)"widehat"===a||"widecheck"===a?(n=420,r=2364,o=.42,i=a+"4"):(n=312,r=2340,o=.34,i="tilde4");else{var l=[1,1,2,2,3,3][s];"widehat"===a||"widecheck"===a?(r=[0,1062,2364,2364,2364][l],n=[0,239,300,360,420][l],o=[0,.24,.3,.3,.36,.42][l],i=a+l):(r=[0,600,1033,2339,2340][l],n=[0,260,286,306,312][l],o=[0,.26,.286,.3,.306,.34][l],i="tilde"+l)}var h=new Q(i),c=new J([h],{width:"100%",height:G(o),viewBox:"0 0 "+r+" "+n,preserveAspectRatio:"none"});return{span:Ke.makeSvgSpan([],[c],t),minWidth:0,height:o}}var p,u,d,g=[],f=Dt[a],[v,b,y]=f,x=y/1e3,w=v.length;if(1===w)p=["hide-tail"],u=[f[3]];else if(2===w)p=["halfarrow-left","halfarrow-right"],u=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");p=["brace-left","brace-center","brace-right"],u=["xMinYMin","xMidYMin","xMaxYMin"]}for(var k=0;k<w;k++){var S=new Q(v[k]),M=new J([S],{width:"400em",height:G(x),viewBox:"0 0 "+r+" "+y,preserveAspectRatio:u[k]+" slice"}),z=Ke.makeSvgSpan([p[k]],[M],t);if(1===w)return{span:z,minWidth:b,height:x};z.style.height=G(x),g.push(z)}return{span:Ke.makeSpan(["stretchy"],g,t),minWidth:b,height:x}}();return r.height=n,r.style.height=G(n),a>0&&(r.style.minWidth=G(a)),r};function Gt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Ut(e){var t=Yt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Yt(e){return e&&("atom"===e.type||ae.hasOwnProperty(e.type))?e:null}var Xt=(e,t)=>{var r,a,n;e&&"supsub"===e.type?(r=(a=Gt(e.base,"accent")).base,e.base=r,n=function(e){if(e instanceof _)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(wt(e,t)),e.base=a):r=(a=Gt(e,"accent")).base;var i=wt(r,t.havingCrampedStyle()),o=0;if(a.isShifty&&m.isCharacterBox(r)){var s=m.getBaseElem(r);o=te(wt(s,t.havingCrampedStyle())).skew}var l,h="\\c"===a.label,c=h?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(a.isStretchy)l=Ft(a,t),l=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+G(2*o)+")",marginLeft:G(2*o)}:void 0}]},t);else{var p,u;"\\vec"===a.label?(p=Ke.staticSvg("vec",t),u=Ke.svgData.vec[1]):((p=te(p=Ke.makeOrd({mode:a.mode,text:a.label},t,"textord"))).italic=0,u=p.width,h&&(c+=p.depth)),l=Ke.makeSpan(["accent-body"],[p]);var d="\\textcircled"===a.label;d&&(l.classes.push("accent-full"),c=i.height);var g=o;d||(g-=u/2),l.style.left=G(g),"\\textcircled"===a.label&&(l.style.top=".2em"),l=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-c},{type:"elem",elem:l}]},t)}var f=Ke.makeSpan(["mord","accent"],[l],t);return n?(n.children[0]=f,n.height=Math.max(f.height,n.height),n.classes[0]="mord",n):f},Wt=(e,t)=>{var r=e.isStretchy?Pt(e.label):new Tt.MathNode("mo",[Bt(e.label,e.mode)]),a=new Tt.MathNode("mover",[Rt(e.base,t),r]);return a.setAttribute("accent","true"),a},_t=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));ot({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=lt(t[0]),a=!_t.test(e.funcName),n=!a||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:n,base:r}},htmlBuilder:Xt,mathmlBuilder:Wt}),ot({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],a=e.parser.mode;return"math"===a&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Xt,mathmlBuilder:Wt}),ot({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"accentUnder",mode:r.mode,label:a,base:n}},htmlBuilder:(e,t)=>{var r=wt(e.base,t),a=Ft(e,t),n="\\utilde"===e.label?.12:0,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=Pt(e.label),a=new Tt.MathNode("munder",[Rt(e.base,t),r]);return a.setAttribute("accentunder","true"),a}});var jt=e=>{var t=new Tt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};ot({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a,funcName:n}=e;return{type:"xArrow",mode:a.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,a=t.style,n=t.havingStyle(a.sup()),i=Ke.wrapFragment(wt(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(a.sub()),(r=Ke.wrapFragment(wt(e.below,n,t),t)).classes.push(o+"-arrow-pad"));var s,l=Ft(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,m=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var c=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h},{type:"elem",elem:r,shift:c}]},t)}else s=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),Ke.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var r,a=Pt(e.label);if(a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=jt(Rt(e.body,t));if(e.below){var i=jt(Rt(e.below,t));r=new Tt.MathNode("munderover",[a,i,n])}else r=new Tt.MathNode("mover",[a,n])}else if(e.below){var o=jt(Rt(e.below,t));r=new Tt.MathNode("munder",[a,o])}else r=jt(),r=new Tt.MathNode("mover",[a,r]);return r}});var $t=Ke.makeSpan;function Zt(e,t){var r=gt(e.body,t,!0);return $t([e.mclass],r,t)}function Kt(e,t){var r,a=qt(e.body,t);return"minner"===e.mclass?r=new Tt.MathNode("mpadded",a):"mord"===e.mclass?e.isCharacterBox?(r=a[0]).type="mi":r=new Tt.MathNode("mi",a):(e.isCharacterBox?(r=a[0]).type="mo":r=new Tt.MathNode("mo",a),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ot({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+a.slice(5),body:ht(n),isCharacterBox:m.isCharacterBox(n)}},htmlBuilder:Zt,mathmlBuilder:Kt});var Jt=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};ot({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:Jt(t[0]),body:ht(t[1]),isCharacterBox:m.isCharacterBox(t[1])}}}),ot({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var r,{parser:a,funcName:n}=e,i=t[1],o=t[0];r="\\stackrel"!==n?Jt(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:ht(i)},l={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===n?null:o,sub:"\\underset"===n?o:null};return{type:"mclass",mode:a.mode,mclass:r,body:[l],isCharacterBox:m.isCharacterBox(l)}},htmlBuilder:Zt,mathmlBuilder:Kt}),ot({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:Jt(t[0]),body:ht(t[0])}},htmlBuilder(e,t){var r=gt(e.body,t,!0),a=Ke.makeSpan([e.mclass],r,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var r=qt(e.body,t),a=new Tt.MathNode("mstyle",r);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var Qt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},er=e=>"textord"===e.type&&"@"===e.text;function tr(e,t,r){var a=Qt[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n={type:"atom",text:a,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[n],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}ot({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"cdlabel",mode:r.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),a=Ke.wrapFragment(wt(e.label,r,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=G(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var r=new Tt.MathNode("mrow",[Rt(e.label,t)]);return(r=new Tt.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Tt.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),ot({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=Ke.wrapFragment(wt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(e,t)=>new Tt.MathNode("mrow",[Rt(e.fragment,t)])}),ot({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,a=Gt(t[0],"ordgroup").body,n="",o=0;o<a.length;o++){n+=Gt(a[o],"textord").text}var s,l=parseInt(n);if(isNaN(l))throw new i("\\@char has non-numeric argument "+n);if(l<0||l>=1114111)throw new i("\\@char with invalid code point "+n);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var rr=(e,t)=>{var r=gt(e.body,t.withColor(e.color),!1);return Ke.makeFragment(r)},ar=(e,t)=>{var r=qt(e.body,t.withColor(e.color)),a=new Tt.MathNode("mstyle",r);return a.setAttribute("mathcolor",e.color),a};ot({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,a=Gt(t[0],"color-token").color,n=t[1];return{type:"color",mode:r.mode,color:a,body:ht(n)}},htmlBuilder:rr,mathmlBuilder:ar}),ot({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:a}=e,n=Gt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",n);var i=r.parseExpression(!0,a);return{type:"color",mode:r.mode,color:n,body:i}},htmlBuilder:rr,mathmlBuilder:ar}),ot({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:a}=e,n="["===a.gullet.future().text?a.parseSizeGroup(!0):null,i=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:i,size:n&&Gt(n,"size").value}},htmlBuilder(e,t){var r=Ke.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=G(F(e.size,t)))),r},mathmlBuilder(e,t){var r=new Tt.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",G(F(e.size,t)))),r}});var nr={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},ir=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new i("Expected a control sequence",e);return t},or=(e,t,r,a)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,a)};ot({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var a=t.fetch();if(nr[a.text])return"\\global"!==r&&"\\\\globallong"!==r||(a.text=nr[a.text]),Gt(t.parseFunction(),"internal");throw new i("Invalid token after macro prefix",a)}}),ot({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=t.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new i("Expected a control sequence",a);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(a=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new i('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new i('Argument number "'+a.text+'" out of order');s++,l.push([])}else{if("EOF"===a.text)throw new i("Expected a macro definition");l[s].push(a.text)}var{tokens:h}=t.gullet.consumeArg();return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(n,{tokens:h,numArgs:s,delimiters:l},r===nr[r]),{type:"internal",mode:t.mode}}}),ot({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=ir(t.gullet.popToken());t.gullet.consumeSpaces();var n=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return or(t,a,n,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),ot({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=ir(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return or(t,a,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var sr=function(e,t,r){var a=I(ne.math[e]&&ne.math[e].replace||e,t,r);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return a},lr=function(e,t,r,a){var n=r.havingBaseStyle(t),i=Ke.makeSpan(a.concat(n.sizingClasses(r)),[e],r),o=n.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=n.sizeMultiplier,i},hr=function(e,t,r){var a=t.havingBaseStyle(r),n=(1-t.sizeMultiplier/a.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=G(n),e.height-=n,e.depth+=n},mr=function(e,t,r,a,n,i){var o=function(e,t,r,a){return Ke.makeSymbol(e,"Size"+t+"-Regular",r,a)}(e,t,n,a),s=lr(Ke.makeSpan(["delimsizing","size"+t],[o],a),k.TEXT,a,i);return r&&hr(s,a,k.TEXT),s},cr=function(e,t,r){var a;return a="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Ke.makeSpan(["delimsizinginner",a],[Ke.makeSpan([],[Ke.makeSymbol(e,t,r)])])}},pr=function(e,t,r){var a=C["Size4-Regular"][e.charCodeAt(0)]?C["Size4-Regular"][e.charCodeAt(0)][4]:C["Size1-Regular"][e.charCodeAt(0)][4],n=new Q("inner",function(e,t){switch(e){case"\u239c":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"\u239f":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23a2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23a5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23aa":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23d0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new J([n],{width:G(a),height:G(t),style:"width:"+G(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Ke.makeSvgSpan([],[i],r);return o.height=t,o.style.height=G(t),o.style.width=G(a),{type:"elem",elem:o}},ur={type:"kern",size:-.008},dr=["|","\\lvert","\\rvert","\\vert"],gr=["\\|","\\lVert","\\rVert","\\Vert"],fr=function(e,t,r,a,n,i){var o,s,l,h,c="",p=0;o=l=h=e,s=null;var u="Size1-Regular";"\\uparrow"===e?l=h="\u23d0":"\\Uparrow"===e?l=h="\u2016":"\\downarrow"===e?o=l="\u23d0":"\\Downarrow"===e?o=l="\u2016":"\\updownarrow"===e?(o="\\uparrow",l="\u23d0",h="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="\u2016",h="\\Downarrow"):m.contains(dr,e)?(l="\u2223",c="vert",p=333):m.contains(gr,e)?(l="\u2225",c="doublevert",p=556):"["===e||"\\lbrack"===e?(o="\u23a1",l="\u23a2",h="\u23a3",u="Size4-Regular",c="lbrack",p=667):"]"===e||"\\rbrack"===e?(o="\u23a4",l="\u23a5",h="\u23a6",u="Size4-Regular",c="rbrack",p=667):"\\lfloor"===e||"\u230a"===e?(l=o="\u23a2",h="\u23a3",u="Size4-Regular",c="lfloor",p=667):"\\lceil"===e||"\u2308"===e?(o="\u23a1",l=h="\u23a2",u="Size4-Regular",c="lceil",p=667):"\\rfloor"===e||"\u230b"===e?(l=o="\u23a5",h="\u23a6",u="Size4-Regular",c="rfloor",p=667):"\\rceil"===e||"\u2309"===e?(o="\u23a4",l=h="\u23a5",u="Size4-Regular",c="rceil",p=667):"("===e||"\\lparen"===e?(o="\u239b",l="\u239c",h="\u239d",u="Size4-Regular",c="lparen",p=875):")"===e||"\\rparen"===e?(o="\u239e",l="\u239f",h="\u23a0",u="Size4-Regular",c="rparen",p=875):"\\{"===e||"\\lbrace"===e?(o="\u23a7",s="\u23a8",h="\u23a9",l="\u23aa",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="\u23ab",s="\u23ac",h="\u23ad",l="\u23aa",u="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(o="\u23a7",h="\u23a9",l="\u23aa",u="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(o="\u23ab",h="\u23ad",l="\u23aa",u="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(o="\u23a7",h="\u23ad",l="\u23aa",u="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(o="\u23ab",h="\u23a9",l="\u23aa",u="Size4-Regular");var d=sr(o,u,n),g=d.height+d.depth,f=sr(l,u,n),v=f.height+f.depth,b=sr(h,u,n),y=b.height+b.depth,x=0,w=1;if(null!==s){var S=sr(s,u,n);x=S.height+S.depth,w=2}var M=g+y+x,z=M+Math.max(0,Math.ceil((t-M)/(w*v)))*w*v,A=a.fontMetrics().axisHeight;r&&(A*=a.sizeMultiplier);var T=z/2-A,B=[];if(c.length>0){var C=z-g-y,N=Math.round(1e3*z),q=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(c,Math.round(1e3*C)),I=new Q(c,q),R=(p/1e3).toFixed(3)+"em",H=(N/1e3).toFixed(3)+"em",O=new J([I],{width:R,height:H,viewBox:"0 0 "+p+" "+N}),E=Ke.makeSvgSpan([],[O],a);E.height=N/1e3,E.style.width=R,E.style.height=H,B.push({type:"elem",elem:E})}else{if(B.push(cr(h,u,n)),B.push(ur),null===s){var L=z-g-y+.016;B.push(pr(l,L,a))}else{var D=(z-g-y-x)/2+.016;B.push(pr(l,D,a)),B.push(ur),B.push(cr(s,u,n)),B.push(ur),B.push(pr(l,D,a))}B.push(ur),B.push(cr(o,u,n))}var V=a.havingBaseStyle(k.TEXT),P=Ke.makeVList({positionType:"bottom",positionData:T,children:B},V);return lr(Ke.makeSpan(["delimsizing","mult"],[P],V),k.TEXT,a,i)},vr=.08,br=function(e,t,r,a,n){var i=function(e,t,r){t*=1e3;var a="";switch(e){case"sqrtMain":a=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,A);break;case"sqrtSize1":a=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,A);break;case"sqrtSize2":a=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,A);break;case"sqrtSize3":a=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,A);break;case"sqrtSize4":a=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,A);break;case"sqrtTall":a=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,A,r)}return a}(e,a,r),o=new Q(e,i),s=new J([o],{width:"400em",height:G(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ke.makeSvgSpan(["hide-tail"],[s],n)},yr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"],xr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"],wr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],kr=[0,1.2,1.8,2.4,3],Sr=[{type:"small",style:k.SCRIPTSCRIPT},{type:"small",style:k.SCRIPT},{type:"small",style:k.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Mr=[{type:"small",style:k.SCRIPTSCRIPT},{type:"small",style:k.SCRIPT},{type:"small",style:k.TEXT},{type:"stack"}],zr=[{type:"small",style:k.SCRIPTSCRIPT},{type:"small",style:k.SCRIPT},{type:"small",style:k.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Ar=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Tr=function(e,t,r,a){for(var n=Math.min(2,3-a.style.size);n<r.length&&"stack"!==r[n].type;n++){var i=sr(e,Ar(r[n]),"math"),o=i.height+i.depth;if("small"===r[n].type&&(o*=a.havingBaseStyle(r[n].style).sizeMultiplier),o>t)return r[n]}return r[r.length-1]},Br=function(e,t,r,a,n,i){var o;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),o=m.contains(wr,e)?Sr:m.contains(yr,e)?zr:Mr;var s=Tr(e,t,o,a);return"small"===s.type?function(e,t,r,a,n,i){var o=Ke.makeSymbol(e,"Main-Regular",n,a),s=lr(o,t,a,i);return r&&hr(s,a,t),s}(e,s.style,r,a,n,i):"large"===s.type?mr(e,s.size,r,a,n,i):fr(e,t,r,a,n,i)},Cr={sqrtImage:function(e,t){var r,a,n=t.havingBaseSizing(),i=Tr("\\surd",e*n.sizeMultiplier,zr,n),o=n.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,h=0,m=0;return"small"===i.type?(e<1?o=1:e<1.4&&(o=.7),h=(1+s)/o,(r=br("sqrtMain",l=(1+s+vr)/o,m=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",a=.833/o):"large"===i.type?(m=1080*kr[i.size],h=(kr[i.size]+s)/o,l=(kr[i.size]+s+vr)/o,(r=br("sqrtSize"+i.size,l,m,s,t)).style.minWidth="1.02em",a=1/o):(l=e+s+vr,h=e+s,m=Math.floor(1e3*e+s)+80,(r=br("sqrtTall",l,m,s,t)).style.minWidth="0.742em",a=1.056),r.height=h,r.style.height=G(l),{span:r,advanceWidth:a,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},sizedDelim:function(e,t,r,a,n){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),m.contains(yr,e)||m.contains(wr,e))return mr(e,t,!1,r,a,n);if(m.contains(xr,e))return fr(e,kr[t],!1,r,a,n);throw new i("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:kr,customSizedDelim:Br,leftRightDelim:function(e,t,r,a,n,i){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,s=5/a.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return Br(e,h,!0,a,n,i)}},Nr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},qr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Ir(e,t){var r=Yt(e);if(r&&m.contains(qr,r.text))return r;throw new i(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Rr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ot({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=Ir(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Nr[e.funcName].size,mclass:Nr[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?Ke.makeSpan([e.mclass]):Cr.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Bt(e.delim,e.mode));var r=new Tt.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var a=G(Cr.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",a),r.setAttribute("maxsize",a),r}}),ot({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new i("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Ir(t[0],e).text,color:r}}}),ot({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Ir(t[0],e),a=e.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var i=Gt(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{Rr(e);for(var r,a,n=gt(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l<n.length;l++)n[l].isMiddle?s=!0:(i=Math.max(n[l].height,i),o=Math.max(n[l].depth,o));if(i*=t.sizeMultiplier,o*=t.sizeMultiplier,r="."===e.left?xt(t,["mopen"]):Cr.leftRightDelim(e.left,i,o,t,e.mode,["mopen"]),n.unshift(r),s)for(var h=1;h<n.length;h++){var m=n[h].isMiddle;m&&(n[h]=Cr.leftRightDelim(m.delim,i,o,m.options,e.mode,[]))}if("."===e.right)a=xt(t,["mclose"]);else{var c=e.rightColor?t.withColor(e.rightColor):t;a=Cr.leftRightDelim(e.right,i,o,c,e.mode,["mclose"])}return n.push(a),Ke.makeSpan(["minner"],n,t)},mathmlBuilder:(e,t)=>{Rr(e);var r=qt(e.body,t);if("."!==e.left){var a=new Tt.MathNode("mo",[Bt(e.left,e.mode)]);a.setAttribute("fence","true"),r.unshift(a)}if("."!==e.right){var n=new Tt.MathNode("mo",[Bt(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),r.push(n)}return Ct(r)}}),ot({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Ir(t[0],e);if(!e.parser.leftrightDepth)throw new i("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if("."===e.delim)r=xt(t,[]);else{r=Cr.sizedDelim(e.delim,1,t,e.mode,[]);var a={delim:e.delim,options:t};r.isMiddle=a}return r},mathmlBuilder:(e,t)=>{var r="\\vert"===e.delim||"|"===e.delim?Bt("|","text"):Bt(e.delim,e.mode),a=new Tt.MathNode("mo",[r]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var Hr=(e,t)=>{var r,a,n,i=Ke.wrapFragment(wt(e.body,t),t),o=e.label.slice(1),s=t.sizeMultiplier,l=0,h=m.isCharacterBox(e.body);if("sout"===o)(r=Ke.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,l=-.5*t.fontMetrics().xHeight;else if("phase"===o){var c=F({number:.6,unit:"pt"},t),p=F({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var u=i.height+i.depth+c+p;i.style.paddingLeft=G(u/2+c);var d=Math.floor(1e3*u*s),g="M400000 "+(a=d)+" H0 L"+a/2+" 0 l65 45 L145 "+(a-80)+" H400000z",f=new J([new Q("phase",g)],{width:"400em",height:G(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});(r=Ke.makeSvgSpan(["hide-tail"],[f],t)).style.height=G(u),l=i.depth+c+p}else{/cancel/.test(o)?h||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var v=0,b=0,y=0;/box/.test(o)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=v=t.fontMetrics().fboxsep+("colorbox"===o?0:y)):"angl"===o?(v=4*(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-i.depth)):b=v=h?.2:0,r=Vt(i,o,v,b,t),/fbox|boxed|fcolorbox/.test(o)?(r.style.borderStyle="solid",r.style.borderWidth=G(y)):"angl"===o&&.049!==y&&(r.style.borderTopWidth=G(y),r.style.borderRightWidth=G(y)),l=i.depth+b,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)n=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:l},{type:"elem",elem:i,shift:0}]},t);else{var x=/cancel|phase/.test(o)?["svg-align"]:[];n=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:r,shift:l,wrapperClasses:x}]},t)}return/cancel/.test(o)&&(n.height=i.height,n.depth=i.depth),/cancel/.test(o)&&!h?Ke.makeSpan(["mord","cancel-lap"],[n],t):Ke.makeSpan(["mord"],[n],t)},Or=(e,t)=>{var r=0,a=new Tt.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Rt(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*r+"pt"),a.setAttribute("height","+"+2*r+"pt"),a.setAttribute("lspace",r+"pt"),a.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};ot({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=Gt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:i,body:o}},htmlBuilder:Hr,mathmlBuilder:Or}),ot({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=Gt(t[0],"color-token").color,o=Gt(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:Hr,mathmlBuilder:Or}),ot({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),ot({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"enclose",mode:r.mode,label:a,body:n}},htmlBuilder:Hr,mathmlBuilder:Or}),ot({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var Er={};function Lr(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l<r.length;++l)Er[r[l]]=s;i&&(nt[t]=i),o&&(it[t]=o)}var Dr={};function Vr(e,t){Dr[e]=t}function Pr(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}var Fr=e=>{if(!e.parser.settings.displayMode)throw new i("{"+e.envName+"} can be used only in display mode.")};function Gr(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Ur(e,t,r){var{hskipBeforeAndAfter:a,addJot:o,cols:s,arraystretch:l,colSeparationType:h,autoTag:m,singleRow:c,emptySingleRow:p,maxNumCols:u,leqno:d}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!l){var g=e.gullet.expandMacroAsText("\\arraystretch");if(null==g)l=1;else if(!(l=parseFloat(g))||l<0)throw new i("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var f=[],v=[f],b=[],y=[],x=null!=m?[]:void 0;function w(){m&&e.gullet.macros.set("\\@eqnsw","1",!0)}function k(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new n("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(Boolean(m)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(w(),y.push(Pr(e));;){var S=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),S={type:"ordgroup",mode:e.mode,body:S},r&&(S={type:"styling",mode:e.mode,style:r,body:[S]}),f.push(S);var M=e.fetch().text;if("&"===M){if(u&&f.length===u){if(c||h)throw new i("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===M){k(),1===f.length&&"styling"===S.type&&0===S.body[0].body.length&&(v.length>1||!p)&&v.pop(),y.length<v.length+1&&y.push([]);break}if("\\\\"!==M)throw new i("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var z=void 0;" "!==e.gullet.future().text&&(z=e.parseSizeGroup(!0)),b.push(z?z.value:null),k(),y.push(Pr(e)),f=[],v.push(f),w()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:o,arraystretch:l,body:v,cols:s,rowGaps:b,hskipBeforeAndAfter:a,hLinesBeforeRow:y,colSeparationType:h,tags:x,leqno:d}}function Yr(e){return"d"===e.slice(0,1)?"display":"text"}var Xr=function(e,t){var r,a,n=e.body.length,o=e.hLinesBeforeRow,s=0,l=new Array(n),h=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),p=1/t.fontMetrics().ptPerEm,u=5*p;e.colSeparationType&&"small"===e.colSeparationType&&(u=t.havingStyle(k.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var d="CD"===e.colSeparationType?F({number:3,unit:"ex"},t):12*p,g=3*p,f=e.arraystretch*d,v=.7*f,b=.3*f,y=0;function x(e){for(var t=0;t<e.length;++t)t>0&&(y+=.25),h.push({pos:y,isDashed:e[t]})}for(x(o[0]),r=0;r<e.body.length;++r){var w=e.body[r],S=v,M=b;s<w.length&&(s=w.length);var z=new Array(w.length);for(a=0;a<w.length;++a){var A=wt(w[a],t);M<A.depth&&(M=A.depth),S<A.height&&(S=A.height),z[a]=A}var T=e.rowGaps[r],B=0;T&&(B=F(T,t))>0&&(M<(B+=b)&&(M=B),B=0),e.addJot&&(M+=g),z.height=S,z.depth=M,y+=S,z.pos=y,y+=M+B,l[r]=z,x(o[r+1])}var C,N,q=y/2+t.fontMetrics().axisHeight,I=e.cols||[],R=[],H=[];if(e.tags&&e.tags.some((e=>e)))for(r=0;r<n;++r){var O=l[r],E=O.pos-q,L=e.tags[r],D=void 0;(D=!0===L?Ke.makeSpan(["eqn-num"],[],t):!1===L?Ke.makeSpan([],[],t):Ke.makeSpan([],gt(L,t,!0),t)).depth=O.depth,D.height=O.height,H.push({type:"elem",elem:D,shift:E})}for(a=0,N=0;a<s||N<I.length;++a,++N){for(var V=I[N]||{},P=!0;"separator"===V.type;){if(P||((C=Ke.makeSpan(["arraycolsep"],[])).style.width=G(t.fontMetrics().doubleRuleSep),R.push(C)),"|"!==V.separator&&":"!==V.separator)throw new i("Invalid separator type: "+V.separator);var U="|"===V.separator?"solid":"dashed",Y=Ke.makeSpan(["vertical-separator"],[],t);Y.style.height=G(y),Y.style.borderRightWidth=G(c),Y.style.borderRightStyle=U,Y.style.margin="0 "+G(-c/2);var X=y-q;X&&(Y.style.verticalAlign=G(-X)),R.push(Y),V=I[++N]||{},P=!1}if(!(a>=s)){var W=void 0;(a>0||e.hskipBeforeAndAfter)&&0!==(W=m.deflt(V.pregap,u))&&((C=Ke.makeSpan(["arraycolsep"],[])).style.width=G(W),R.push(C));var _=[];for(r=0;r<n;++r){var j=l[r],$=j[a];if($){var Z=j.pos-q;$.depth=j.depth,$.height=j.height,_.push({type:"elem",elem:$,shift:Z})}}_=Ke.makeVList({positionType:"individualShift",children:_},t),_=Ke.makeSpan(["col-align-"+(V.align||"c")],[_]),R.push(_),(a<s-1||e.hskipBeforeAndAfter)&&0!==(W=m.deflt(V.postgap,u))&&((C=Ke.makeSpan(["arraycolsep"],[])).style.width=G(W),R.push(C))}}if(l=Ke.makeSpan(["mtable"],R),h.length>0){for(var K=Ke.makeLineSpan("hline",t,c),J=Ke.makeLineSpan("hdashline",t,c),Q=[{type:"elem",elem:l,shift:0}];h.length>0;){var ee=h.pop(),te=ee.pos-q;ee.isDashed?Q.push({type:"elem",elem:J,shift:te}):Q.push({type:"elem",elem:K,shift:te})}l=Ke.makeVList({positionType:"individualShift",children:Q},t)}if(0===H.length)return Ke.makeSpan(["mord"],[l],t);var re=Ke.makeVList({positionType:"individualShift",children:H},t);return re=Ke.makeSpan(["tag"],[re],t),Ke.makeFragment([l,re])},Wr={c:"center ",l:"left ",r:"right "},_r=function(e,t){for(var r=[],a=new Tt.MathNode("mtd",[],["mtr-glue"]),n=new Tt.MathNode("mtd",[],["mml-eqn-num"]),i=0;i<e.body.length;i++){for(var o=e.body[i],s=[],l=0;l<o.length;l++)s.push(new Tt.MathNode("mtd",[Rt(o[l],t)]));e.tags&&e.tags[i]&&(s.unshift(a),s.push(a),e.leqno?s.unshift(n):s.push(n)),r.push(new Tt.MathNode("mtr",s))}var h=new Tt.MathNode("mtable",r),m=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);h.setAttribute("rowspacing",G(m));var c="",p="";if(e.cols&&e.cols.length>0){var u=e.cols,d="",g=!1,f=0,v=u.length;"separator"===u[0].type&&(c+="top ",f=1),"separator"===u[u.length-1].type&&(c+="bottom ",v-=1);for(var b=f;b<v;b++)"align"===u[b].type?(p+=Wr[u[b].align],g&&(d+="none "),g=!0):"separator"===u[b].type&&g&&(d+="|"===u[b].separator?"solid ":"dashed ",g=!1);h.setAttribute("columnalign",p.trim()),/[sd]/.test(d)&&h.setAttribute("columnlines",d.trim())}if("align"===e.colSeparationType){for(var y=e.cols||[],x="",w=1;w<y.length;w++)x+=w%2?"0em ":"1em ";h.setAttribute("columnspacing",x.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?h.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?h.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?h.setAttribute("columnspacing","0.5em"):h.setAttribute("columnspacing","1em");var k="",S=e.hLinesBeforeRow;c+=S[0].length>0?"left ":"",c+=S[S.length-1].length>0?"right ":"";for(var M=1;M<S.length-1;M++)k+=0===S[M].length?"none ":S[M][0]?"dashed ":"solid ";return/[sd]/.test(k)&&h.setAttribute("rowlines",k.trim()),""!==c&&(h=new Tt.MathNode("menclose",[h])).setAttribute("notation",c.trim()),e.arraystretch&&e.arraystretch<1&&(h=new Tt.MathNode("mstyle",[h])).setAttribute("scriptlevel","1"),h},jr=function(e,t){-1===e.envName.indexOf("ed")&&Fr(e);var r,a=[],n=e.envName.indexOf("at")>-1?"alignat":"align",o="split"===e.envName,s=Ur(e.parser,{cols:a,addJot:!0,autoTag:o?void 0:Gr(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var m="",c=0;c<t[0].body.length;c++){m+=Gt(t[0].body[c],"textord").text}r=Number(m),l=2*r}var p=!l;s.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var a=Gt(e[t],"styling");Gt(a.body[0],"ordgroup").body.unshift(h)}if(p)l<e.length&&(l=e.length);else{var n=e.length/2;if(r<n)throw new i("Too many math in a row: expected "+r+", but got "+n,e[0])}}));for(var u=0;u<l;++u){var d="r",g=0;u%2==1?d="l":u>0&&p&&(g=1),a[u]={type:"align",align:d,pregap:g,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};Lr({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=(Yt(t[0])?[t[0]]:Gt(t[0],"ordgroup").body).map((function(e){var t=Ut(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new i("Unknown column alignment: "+t,e)})),a={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Ur(e.parser,a,Yr(e.envName))},htmlBuilder:Xr,mathmlBuilder:_r}),Lr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var n=e.parser;if(n.consumeSpaces(),"["===n.fetch().text){if(n.consume(),n.consumeSpaces(),r=n.fetch().text,-1==="lcr".indexOf(r))throw new i("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:r}]}}var o=Ur(e.parser,a,Yr(e.envName)),s=Math.max(0,...o.body.map((e=>e.length)));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:Xr,mathmlBuilder:_r}),Lr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=Ur(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Xr,mathmlBuilder:_r}),Lr({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=(Yt(t[0])?[t[0]]:Gt(t[0],"ordgroup").body).map((function(e){var t=Ut(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new i("Unknown column alignment: "+t,e)}));if(r.length>1)throw new i("{subarray} can contain only one column");var a={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((a=Ur(e.parser,a,"script")).body.length>0&&a.body[0].length>1)throw new i("{subarray} can contain only one column");return a},htmlBuilder:Xr,mathmlBuilder:_r}),Lr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=Ur(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Yr(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Xr,mathmlBuilder:_r}),Lr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:jr,htmlBuilder:Xr,mathmlBuilder:_r}),Lr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){m.contains(["gather","gather*"],e.envName)&&Fr(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Gr(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Ur(e.parser,t,"display")},htmlBuilder:Xr,mathmlBuilder:_r}),Lr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:jr,htmlBuilder:Xr,mathmlBuilder:_r}),Lr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Fr(e);var t={autoTag:Gr(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Ur(e.parser,t,"display")},htmlBuilder:Xr,mathmlBuilder:_r}),Lr({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Fr(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new i("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var a,n,o=[],s=[o],l=0;l<t.length;l++){for(var h=t[l],m={type:"styling",body:[],mode:"math",style:"display"},c=0;c<h.length;c++)if(er(h[c])){o.push(m);var p=Ut(h[c+=1]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(p)>-1);else{if(!("<>AV".indexOf(p)>-1))throw new i('Expected one of "<>AV=|." after @',h[c]);for(var d=0;d<2;d++){for(var g=!0,f=c+1;f<h.length;f++){if(n=p,("mathord"===(a=h[f]).type||"atom"===a.type)&&a.text===n){g=!1,c=f;break}if(er(h[f]))throw new i("Missing a "+p+" character to complete a CD arrow.",h[f]);u[d].body.push(h[f])}if(g)throw new i("Missing a "+p+" character to complete a CD arrow.",h[c])}}var v={type:"styling",body:[tr(p,u,e)],mode:"math",style:"display"};o.push(v),m={type:"styling",body:[],mode:"math",style:"display"}}else m.body.push(h[c]);l%2==0?o.push(m):o.shift(),o=[],s.push(o)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}(e.parser)),htmlBuilder:Xr,mathmlBuilder:_r}),Vr("\\nonumber","\\gdef\\@eqnsw{0}"),Vr("\\notag","\\nonumber"),ot({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new i(e.funcName+" valid only within array environment")}});var $r=Er;ot({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];if("ordgroup"!==n.type)throw new i("Invalid environment name",n);for(var o="",s=0;s<n.body.length;++s)o+=Gt(n.body[s],"textord").text;if("\\begin"===a){if(!$r.hasOwnProperty(o))throw new i("No such environment: "+o,n);var l=$r[o],{args:h,optArgs:m}=r.parseArguments("\\begin{"+o+"}",l),c={mode:r.mode,envName:o,parser:r},p=l.handler(c,h,m);r.expect("\\end",!1);var u=r.nextToken,d=Gt(r.parseFunction(),"environment");if(d.name!==o)throw new i("Mismatch: \\begin{"+o+"} matched by \\end{"+d.name+"}",u);return p}return{type:"environment",mode:r.mode,name:o,nameGroup:n}}});var Zr=(e,t)=>{var r=e.font,a=t.withFont(r);return wt(e.body,a)},Kr=(e,t)=>{var r=e.font,a=t.withFont(r);return Rt(e.body,a)},Jr={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ot({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=lt(t[0]),i=a;return i in Jr&&(i=Jr[i]),{type:"font",mode:r.mode,font:i.slice(1),body:n}},htmlBuilder:Zr,mathmlBuilder:Kr}),ot({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,a=t[0],n=m.isCharacterBox(a);return{type:"mclass",mode:r.mode,mclass:Jt(a),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}}),ot({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a,breakOnTokenText:n}=e,{mode:i}=r,o=r.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+a.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:Zr,mathmlBuilder:Kr});var Qr=(e,t)=>{var r=t;return"display"===e?r=r.id>=k.SCRIPT.id?r.text():k.DISPLAY:"text"===e&&r.size===k.DISPLAY.size?r=k.TEXT:"script"===e?r=k.SCRIPT:"scriptscript"===e&&(r=k.SCRIPTSCRIPT),r},ea=(e,t)=>{var r,a=Qr(e.size,t.style),n=a.fracNum(),i=a.fracDen();r=t.havingStyle(n);var o=wt(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<l?l:o.depth}r=t.havingStyle(i);var h,m,c,p,u,d,g,f,v,b,y=wt(e.denom,r,t);if(e.hasBarLine?(e.barSize?(m=F(e.barSize,t),h=Ke.makeLineSpan("frac-line",t,m)):h=Ke.makeLineSpan("frac-line",t),m=h.height,c=h.height):(h=null,m=0,c=t.fontMetrics().defaultRuleThickness),a.size===k.DISPLAY.size||"display"===e.size?(p=t.fontMetrics().num1,u=m>0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(p=t.fontMetrics().num2,u=c):(p=t.fontMetrics().num3,u=3*c),d=t.fontMetrics().denom2),h){var x=t.fontMetrics().axisHeight;p-o.depth-(x+.5*m)<u&&(p+=u-(p-o.depth-(x+.5*m))),x-.5*m-(y.height-d)<u&&(d+=u-(x-.5*m-(y.height-d)));var w=-(x-.5*m);g=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:h,shift:w},{type:"elem",elem:o,shift:-p}]},t)}else{var S=p-o.depth-(y.height-d);S<u&&(p+=.5*(u-S),d+=.5*(u-S)),g=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:o,shift:-p}]},t)}return r=t.havingStyle(a),g.height*=r.sizeMultiplier/t.sizeMultiplier,g.depth*=r.sizeMultiplier/t.sizeMultiplier,f=a.size===k.DISPLAY.size?t.fontMetrics().delim1:a.size===k.SCRIPTSCRIPT.size?t.havingStyle(k.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?xt(t,["mopen"]):Cr.customSizedDelim(e.leftDelim,f,!0,t.havingStyle(a),e.mode,["mopen"]),b=e.continued?Ke.makeSpan([]):null==e.rightDelim?xt(t,["mclose"]):Cr.customSizedDelim(e.rightDelim,f,!0,t.havingStyle(a),e.mode,["mclose"]),Ke.makeSpan(["mord"].concat(r.sizingClasses(t)),[v,Ke.makeSpan(["mfrac"],[g]),b],t)},ta=(e,t)=>{var r=new Tt.MathNode("mfrac",[Rt(e.numer,t),Rt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var a=F(e.barSize,t);r.setAttribute("linethickness",G(a))}}else r.setAttribute("linethickness","0px");var n=Qr(e.size,t.style);if(n.size!==t.style.size){r=new Tt.MathNode("mstyle",[r]);var i=n.size===k.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",i),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var s=new Tt.MathNode("mo",[new Tt.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(r),null!=e.rightDelim){var l=new Tt.MathNode("mo",[new Tt.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return Ct(o)}return r};ot({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var r,{parser:a,funcName:n}=e,i=t[0],o=t[1],s=null,l=null,h="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",l=")";break;case"\\\\bracefrac":r=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text"}return{type:"genfrac",mode:a.mode,continued:!1,numer:i,denom:o,hasBarLine:r,leftDelim:s,rightDelim:l,size:h,barSize:null}},htmlBuilder:ea,mathmlBuilder:ta}),ot({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:n,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),ot({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:r,funcName:a,token:n}=e;switch(a){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:n}}});var ra=["display","text","script","scriptscript"],aa=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,{parser:a}=e,n=t[4],i=t[5],o=lt(t[0]),s="atom"===o.type&&"open"===o.family?aa(o.text):null,l=lt(t[1]),h="atom"===l.type&&"close"===l.family?aa(l.text):null,m=Gt(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var p="auto",u=t[3];if("ordgroup"===u.type){if(u.body.length>0){var d=Gt(u.body[0],"textord");p=ra[Number(d.text)]}}else u=Gt(u,"textord"),p=ra[Number(u.text)];return{type:"genfrac",mode:a.mode,numer:n,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h,size:p}},htmlBuilder:ea,mathmlBuilder:ta}),ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:a,token:n}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Gt(t[0],"size").value,token:n}}}),ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Gt(t[1],"infix").size),o=t[2],s=i.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:s,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:ea,mathmlBuilder:ta});var na=(e,t)=>{var r,a,n=t.style;"supsub"===e.type?(r=e.sup?wt(e.sup,t.havingStyle(n.sup()),t):wt(e.sub,t.havingStyle(n.sub()),t),a=Gt(e.base,"horizBrace")):a=Gt(e,"horizBrace");var i,o=wt(a.base,t.havingBaseStyle(k.DISPLAY)),s=Ft(a,t);if(a.isOver?(i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Ke.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Ke.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t);i=a.isOver?Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Ke.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ke.makeSpan(["mord",a.isOver?"mover":"munder"],[i],t)};ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"horizBrace",mode:r.mode,label:a,isOver:/^\\over/.test(a),base:t[0]}},htmlBuilder:na,mathmlBuilder:(e,t)=>{var r=Pt(e.label);return new Tt.MathNode(e.isOver?"mover":"munder",[Rt(e.base,t),r])}}),ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[1],n=Gt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:r.mode,href:n,body:ht(a)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=gt(e.body,t,!1);return Ke.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=It(e.body,t);return r instanceof zt||(r=new zt("mrow",[r])),r.setAttribute("href",e.href),r}}),ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=Gt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:a}))return r.formatUnsupportedCmd("\\url");for(var n=[],i=0;i<a.length;i++){var o=a[i];"~"===o&&(o="\\textasciitilde"),n.push({type:"textord",mode:"text",text:o})}var s={type:"text",mode:r.mode,font:"\\texttt",body:n};return{type:"href",mode:r.mode,href:a,body:ht(s)}}}),ot({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:ht(t[0])}},htmlBuilder(e,t){var r=gt(e.body,t,!1);return Ke.makeFragment(r)},mathmlBuilder:(e,t)=>new Tt.MathNode("mrow",qt(e.body,t))}),ot({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var r,{parser:a,funcName:n,token:o}=e,s=Gt(t[0],"raw").string,l=t[1];a.settings.strict&&a.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h={};switch(n){case"\\htmlClass":h.class=s,r={command:"\\htmlClass",class:s};break;case"\\htmlId":h.id=s,r={command:"\\htmlId",id:s};break;case"\\htmlStyle":h.style=s,r={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var m=s.split(","),c=0;c<m.length;c++){var p=m[c].split("=");if(2!==p.length)throw new i("Error parsing key-value for \\htmlData");h["data-"+p[0].trim()]=p[1].trim()}r={command:"\\htmlData",attributes:h};break;default:throw new Error("Unrecognized html command")}return a.settings.isTrusted(r)?{type:"html",mode:a.mode,attributes:h,body:ht(l)}:a.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=gt(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var n=Ke.makeSpan(a,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&n.setAttribute(i,e.attributes[i]);return n},mathmlBuilder:(e,t)=>It(e.body,t)}),ot({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:ht(t[0]),mathml:ht(t[1])}},htmlBuilder:(e,t)=>{var r=gt(e.html,t,!1);return Ke.makeFragment(r)},mathmlBuilder:(e,t)=>It(e.mathml,t)});var ia=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new i("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!P(r))throw new i("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ot({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:a}=e,n={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var h=Gt(r[0],"raw").string.split(","),m=0;m<h.length;m++){var c=h[m].split("=");if(2===c.length){var p=c[1].trim();switch(c[0].trim()){case"alt":l=p;break;case"width":n=ia(p);break;case"height":o=ia(p);break;case"totalheight":s=ia(p);break;default:throw new i("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}var u=Gt(t[0],"url").url;return""===l&&(l=(l=(l=u).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:u})?{type:"includegraphics",mode:a.mode,alt:l,width:n,height:o,totalheight:s,src:u}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=F(e.height,t),a=0;e.totalheight.number>0&&(a=F(e.totalheight,t)-r);var n=0;e.width.number>0&&(n=F(e.width,t));var i={height:G(r+a)};n>0&&(i.width=G(n)),a>0&&(i.verticalAlign=G(-a));var o=new $(e.src,e.alt,i);return o.height=r,o.depth=a,o},mathmlBuilder:(e,t)=>{var r=new Tt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var a=F(e.height,t),n=0;if(e.totalheight.number>0&&(n=F(e.totalheight,t)-a,r.setAttribute("valign",G(-n))),r.setAttribute("height",G(a+n)),e.width.number>0){var i=F(e.width,t);r.setAttribute("width",G(i))}return r.setAttribute("src",e.src),r}}),ot({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=Gt(t[0],"size");if(r.settings.strict){var i="m"===a[1],o="mu"===n.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, not "+n.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:n.value}},htmlBuilder:(e,t)=>Ke.makeGlue(e.dimension,t),mathmlBuilder(e,t){var r=F(e.dimension,t);return new Tt.SpaceNode(r)}}),ot({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"lap",mode:r.mode,alignment:a.slice(5),body:n}},htmlBuilder:(e,t)=>{var r;"clap"===e.alignment?(r=Ke.makeSpan([],[wt(e.body,t)]),r=Ke.makeSpan(["inner"],[r],t)):r=Ke.makeSpan(["inner"],[wt(e.body,t)]);var a=Ke.makeSpan(["fix"],[]),n=Ke.makeSpan([e.alignment],[r,a],t),i=Ke.makeSpan(["strut"]);return i.style.height=G(n.height+n.depth),n.depth&&(i.style.verticalAlign=G(-n.depth)),n.children.unshift(i),n=Ke.makeSpan(["thinbox"],[n],t),Ke.makeSpan(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var r=new Tt.MathNode("mpadded",[Rt(e.body,t)]);if("rlap"!==e.alignment){var a="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",a+"width")}return r.setAttribute("width","0px"),r}}),ot({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:a}=e,n=a.mode;a.switchMode("math");var i="\\("===r?"\\)":"$",o=a.parseExpression(!1,i);return a.expect(i),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}}),ot({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new i("Mismatched "+e.funcName)}});var oa=(e,t)=>{switch(t.style.size){case k.DISPLAY.size:return e.display;case k.TEXT.size:return e.text;case k.SCRIPT.size:return e.script;case k.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ot({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:ht(t[0]),text:ht(t[1]),script:ht(t[2]),scriptscript:ht(t[3])}},htmlBuilder:(e,t)=>{var r=oa(e,t),a=gt(r,t,!1);return Ke.makeFragment(a)},mathmlBuilder:(e,t)=>{var r=oa(e,t);return It(r,t)}});var sa=(e,t,r,a,n,i,o)=>{e=Ke.makeSpan([],[e]);var s,l,h,c=r&&m.isCharacterBox(r);if(t){var p=wt(t,a.havingStyle(n.sup()),a);l={elem:p,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-p.depth)}}if(r){var u=wt(r,a.havingStyle(n.sub()),a);s={elem:u,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-u.height)}}if(l&&s){var d=a.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;h=Ke.makeVList({positionType:"bottom",positionData:d,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:G(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:G(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(s){var g=e.height-o;h=Ke.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:G(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},a)}else{if(!l)return e;var f=e.depth+o;h=Ke.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:G(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}var v=[h];if(s&&0!==i&&!c){var b=Ke.makeSpan(["mspace"],[],a);b.style.marginRight=G(i),v.unshift(b)}return Ke.makeSpan(["mop","op-limits"],v,a)},la=["\\smallint"],ha=(e,t)=>{var r,a,n,i=!1;"supsub"===e.type?(r=e.sup,a=e.sub,n=Gt(e.base,"op"),i=!0):n=Gt(e,"op");var o,s=t.style,l=!1;if(s.size===k.DISPLAY.size&&n.symbol&&!m.contains(la,n.name)&&(l=!0),n.symbol){var h=l?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(c=n.name.slice(1),n.name="oiint"===c?"\\iint":"\\iiint"),o=Ke.makeSymbol(n.name,h,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),c.length>0){var p=o.italic,u=Ke.staticSvg(c+"Size"+(l?"2":"1"),t);o=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:u,shift:l?.08:0}]},t),n.name="\\"+c,o.classes.unshift("mop"),o.italic=p}}else if(n.body){var d=gt(n.body,t,!0);1===d.length&&d[0]instanceof K?(o=d[0]).classes[0]="mop":o=Ke.makeSpan(["mop"],d,t)}else{for(var g=[],f=1;f<n.name.length;f++)g.push(Ke.mathsym(n.name[f],n.mode,t));o=Ke.makeSpan(["mop"],g,t)}var v=0,b=0;return(o instanceof K||"\\oiint"===n.name||"\\oiiint"===n.name)&&!n.suppressBaseShift&&(v=(o.height-o.depth)/2-t.fontMetrics().axisHeight,b=o.italic),i?sa(o,r,a,t,s,b,v):(v&&(o.style.position="relative",o.style.top=G(v)),o)},ma=(e,t)=>{var r;if(e.symbol)r=new zt("mo",[Bt(e.name,e.mode)]),m.contains(la,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new zt("mo",qt(e.body,t));else{r=new zt("mi",[new At(e.name.slice(1))]);var a=new zt("mo",[Bt("\u2061","text")]);r=e.parentIsSupSub?new zt("mrow",[r,a]):Mt([r,a])}return r},ca={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};ot({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=a;return 1===n.length&&(n=ca[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:ha,mathmlBuilder:ma}),ot({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ht(a)}},htmlBuilder:ha,mathmlBuilder:ma});var pa={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};ot({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:ha,mathmlBuilder:ma}),ot({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:ha,mathmlBuilder:ma}),ot({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e,a=r;return 1===a.length&&(a=pa[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:ha,mathmlBuilder:ma});var ua=(e,t)=>{var r,a,n,i,o=!1;if("supsub"===e.type?(r=e.sup,a=e.sub,n=Gt(e.base,"operatorname"),o=!0):n=Gt(e,"operatorname"),n.body.length>0){for(var s=n.body.map((e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=gt(s,t.withFont("mathrm"),!0),h=0;h<l.length;h++){var m=l[h];m instanceof K&&(m.text=m.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=Ke.makeSpan(["mop"],l,t)}else i=Ke.makeSpan(["mop"],[],t);return o?sa(i,r,a,t,t.style,0,0):i};function da(e,t,r){for(var a=gt(e,t,!1),n=t.sizeMultiplier/r.sizeMultiplier,i=0;i<a.length;i++){var o=a[i].classes.indexOf("sizing");o<0?Array.prototype.push.apply(a[i].classes,t.sizingClasses(r)):a[i].classes[o+1]==="reset-size"+t.size&&(a[i].classes[o+1]="reset-size"+r.size),a[i].height*=n,a[i].depth*=n}return Ke.makeFragment(a)}ot({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"operatorname",mode:r.mode,body:ht(n),alwaysHandleSupSub:"\\operatornamewithlimits"===a,limits:!1,parentIsSupSub:!1}},htmlBuilder:ua,mathmlBuilder:(e,t)=>{for(var r=qt(e.body,t.withFont("mathrm")),a=!0,n=0;n<r.length;n++){var i=r[n];if(i instanceof Tt.SpaceNode);else if(i instanceof Tt.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var o=i.children[0];1===i.children.length&&o instanceof Tt.TextNode?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break;default:a=!1}else a=!1}if(a){var s=r.map((e=>e.toText())).join("");r=[new Tt.TextNode(s)]}var l=new Tt.MathNode("mi",r);l.setAttribute("mathvariant","normal");var h=new Tt.MathNode("mo",[Bt("\u2061","text")]);return e.parentIsSupSub?new Tt.MathNode("mrow",[l,h]):Tt.newDocumentFragment([l,h])}}),Vr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),st({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?Ke.makeFragment(gt(e.body,t,!1)):Ke.makeSpan(["mord"],gt(e.body,t,!0),t),mathmlBuilder:(e,t)=>It(e.body,t,!0)}),ot({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,a=t[0];return{type:"overline",mode:r.mode,body:a}},htmlBuilder(e,t){var r=wt(e.body,t.havingCrampedStyle()),a=Ke.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},t);return Ke.makeSpan(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new Tt.MathNode("mo",[new Tt.TextNode("\u203e")]);r.setAttribute("stretchy","true");var a=new Tt.MathNode("mover",[Rt(e.body,t),r]);return a.setAttribute("accent","true"),a}}),ot({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"phantom",mode:r.mode,body:ht(a)}},htmlBuilder:(e,t)=>{var r=gt(e.body,t.withPhantom(),!1);return Ke.makeFragment(r)},mathmlBuilder:(e,t)=>{var r=qt(e.body,t);return new Tt.MathNode("mphantom",r)}}),ot({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"hphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=Ke.makeSpan([],[wt(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var a=0;a<r.children.length;a++)r.children[a].height=0,r.children[a].depth=0;return r=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Ke.makeSpan(["mord"],[r],t)},mathmlBuilder:(e,t)=>{var r=qt(ht(e.body),t),a=new Tt.MathNode("mphantom",r),n=new Tt.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}}),ot({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"vphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=Ke.makeSpan(["inner"],[wt(e.body,t.withPhantom())]),a=Ke.makeSpan(["fix"],[]);return Ke.makeSpan(["mord","rlap"],[r,a],t)},mathmlBuilder:(e,t)=>{var r=qt(ht(e.body),t),a=new Tt.MathNode("mphantom",r),n=new Tt.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}}),ot({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,a=Gt(t[0],"size").value,n=t[1];return{type:"raisebox",mode:r.mode,dy:a,body:n}},htmlBuilder(e,t){var r=wt(e.body,t),a=F(e.dy,t);return Ke.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){var r=new Tt.MathNode("mpadded",[Rt(e.body,t)]),a=e.dy.number+e.dy.unit;return r.setAttribute("voffset",a),r}}),ot({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),ot({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,r){var{parser:a}=e,n=r[0],i=Gt(t[0],"size"),o=Gt(t[1],"size");return{type:"rule",mode:a.mode,shift:n&&Gt(n,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=Ke.makeSpan(["mord","rule"],[],t),a=F(e.width,t),n=F(e.height,t),i=e.shift?F(e.shift,t):0;return r.style.borderRightWidth=G(a),r.style.borderTopWidth=G(n),r.style.bottom=G(i),r.width=a,r.height=n+i,r.depth=-i,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=F(e.width,t),a=F(e.height,t),n=e.shift?F(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new Tt.MathNode("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",G(r)),o.setAttribute("height",G(a));var s=new Tt.MathNode("mpadded",[o]);return n>=0?s.setAttribute("height",G(n)):(s.setAttribute("height",G(n)),s.setAttribute("depth",G(-n))),s.setAttribute("voffset",G(n)),s}});var ga=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ot({type:"sizing",names:ga,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!1,r);return{type:"sizing",mode:n.mode,size:ga.indexOf(a)+1,body:i}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return da(e.body,r,t)},mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),a=qt(e.body,r),n=new Tt.MathNode("mstyle",a);return n.setAttribute("mathsize",G(r.sizeMultiplier)),n}}),ot({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:a}=e,n=!1,i=!1,o=r[0]&&Gt(r[0],"ordgroup");if(o)for(var s="",l=0;l<o.body.length;++l){if("t"===(s=o.body[l].text))n=!0;else{if("b"!==s){n=!1,i=!1;break}i=!0}}else n=!0,i=!0;var h=t[0];return{type:"smash",mode:a.mode,body:h,smashHeight:n,smashDepth:i}},htmlBuilder:(e,t)=>{var r=Ke.makeSpan([],[wt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var a=0;a<r.children.length;a++)r.children[a].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].depth=0;var i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var r=new Tt.MathNode("mpadded",[Rt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),ot({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a}=e,n=r[0],i=t[0];return{type:"sqrt",mode:a.mode,body:i,index:n}},htmlBuilder(e,t){var r=wt(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Ke.wrapFragment(r,t);var a=t.fontMetrics().defaultRuleThickness,n=a;t.style.id<k.TEXT.id&&(n=t.fontMetrics().xHeight);var i=a+n/4,o=r.height+r.depth+i+a,{span:s,ruleWidth:l,advanceWidth:h}=Cr.sqrtImage(o,t),m=s.height-l;m>r.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var c=s.height-r.height-i-l;r.style.paddingLeft=G(h);var p=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+c)},{type:"elem",elem:s},{type:"kern",size:l}]},t);if(e.index){var u=t.havingStyle(k.SCRIPTSCRIPT),d=wt(e.index,u,t),g=.6*(p.height-p.depth),f=Ke.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:d}]},t),v=Ke.makeSpan(["root"],[f]);return Ke.makeSpan(["mord","sqrt"],[v,p],t)}return Ke.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:r,index:a}=e;return a?new Tt.MathNode("mroot",[Rt(r,t),Rt(a,t)]):new Tt.MathNode("msqrt",[Rt(r,t)])}});var fa={display:k.DISPLAY,text:k.TEXT,script:k.SCRIPT,scriptscript:k.SCRIPTSCRIPT};ot({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!0,r),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:i}},htmlBuilder(e,t){var r=fa[e.style],a=t.havingStyle(r).withFont("");return da(e.body,a,t)},mathmlBuilder(e,t){var r=fa[e.style],a=t.havingStyle(r),n=qt(e.body,a),i=new Tt.MathNode("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});st({type:"supsub",htmlBuilder(e,t){var r=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===k.DISPLAY.size||r.alwaysHandleSupSub)?ha:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===k.DISPLAY.size||r.limits)?ua:null:"accent"===r.type?m.isCharacterBox(r.base)?Xt:null:"horizBrace"===r.type&&!e.sub===r.isOver?na:null:null}(e,t);if(r)return r(e,t);var a,n,i,{base:o,sup:s,sub:l}=e,h=wt(o,t),c=t.fontMetrics(),p=0,u=0,d=o&&m.isCharacterBox(o);if(s){var g=t.havingStyle(t.style.sup());a=wt(s,g,t),d||(p=h.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());n=wt(l,f,t),d||(u=h.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}i=t.style===k.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;var v,b=t.sizeMultiplier,y=G(.5/c.ptPerEm/b),x=null;if(n){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(h instanceof K||w)&&(x=G(-h.italic))}if(a&&n){p=Math.max(p,i,a.depth+.25*c.xHeight),u=Math.max(u,c.sub2);var S=4*c.defaultRuleThickness;if(p-a.depth-(n.height-u)<S){u=S-(p-a.depth)+n.height;var M=.8*c.xHeight-(p-a.depth);M>0&&(p+=M,u-=M)}var z=[{type:"elem",elem:n,shift:u,marginRight:y,marginLeft:x},{type:"elem",elem:a,shift:-p,marginRight:y}];v=Ke.makeVList({positionType:"individualShift",children:z},t)}else if(n){u=Math.max(u,c.sub1,n.height-.8*c.xHeight);var A=[{type:"elem",elem:n,marginLeft:x,marginRight:y}];v=Ke.makeVList({positionType:"shift",positionData:u,children:A},t)}else{if(!a)throw new Error("supsub must have either sup or sub.");p=Math.max(p,i,a.depth+.25*c.xHeight),v=Ke.makeVList({positionType:"shift",positionData:-p,children:[{type:"elem",elem:a,marginRight:y}]},t)}var T=yt(h,"right")||"mord";return Ke.makeSpan([T],[h,Ke.makeSpan(["msupsub"],[v])],t)},mathmlBuilder(e,t){var r,a=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(a=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var n,i=[Rt(e.base,t)];if(e.sub&&i.push(Rt(e.sub,t)),e.sup&&i.push(Rt(e.sup,t)),a)n=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;n=o&&"op"===o.type&&o.limits&&t.style===k.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===k.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;n=s&&"op"===s.type&&s.limits&&(t.style===k.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===k.DISPLAY)?"munder":"msub"}else{var l=e.base;n=l&&"op"===l.type&&l.limits&&(t.style===k.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===k.DISPLAY)?"mover":"msup"}return new Tt.MathNode(n,i)}}),st({type:"atom",htmlBuilder:(e,t)=>Ke.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var r=new Tt.MathNode("mo",[Bt(e.text,e.mode)]);if("bin"===e.family){var a=Nt(e,t);"bold-italic"===a&&r.setAttribute("mathvariant",a)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var va={mi:"italic",mn:"normal",mtext:"normal"};st({type:"mathord",htmlBuilder:(e,t)=>Ke.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var r=new Tt.MathNode("mi",[Bt(e.text,e.mode,t)]),a=Nt(e,t)||"italic";return a!==va[r.type]&&r.setAttribute("mathvariant",a),r}}),st({type:"textord",htmlBuilder:(e,t)=>Ke.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var r,a=Bt(e.text,e.mode,t),n=Nt(e,t)||"normal";return r="text"===e.mode?new Tt.MathNode("mtext",[a]):/[0-9]/.test(e.text)?new Tt.MathNode("mn",[a]):"\\prime"===e.text?new Tt.MathNode("mo",[a]):new Tt.MathNode("mi",[a]),n!==va[r.type]&&r.setAttribute("mathvariant",n),r}});var ba={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ya={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};st({type:"spacing",htmlBuilder(e,t){if(ya.hasOwnProperty(e.text)){var r=ya[e.text].className||"";if("text"===e.mode){var a=Ke.makeOrd(e,t,"textord");return a.classes.push(r),a}return Ke.makeSpan(["mspace",r],[Ke.mathsym(e.text,e.mode,t)],t)}if(ba.hasOwnProperty(e.text))return Ke.makeSpan(["mspace",ba[e.text]],[],t);throw new i('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!ya.hasOwnProperty(e.text)){if(ba.hasOwnProperty(e.text))return new Tt.MathNode("mspace");throw new i('Unknown type of space "'+e.text+'"')}return new Tt.MathNode("mtext",[new Tt.TextNode("\xa0")])}});var xa=()=>{var e=new Tt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};st({type:"tag",mathmlBuilder(e,t){var r=new Tt.MathNode("mtable",[new Tt.MathNode("mtr",[xa(),new Tt.MathNode("mtd",[It(e.body,t)]),xa(),new Tt.MathNode("mtd",[It(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var wa={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},ka={"\\textbf":"textbf","\\textmd":"textmd"},Sa={"\\textit":"textit","\\textup":"textup"},Ma=(e,t)=>{var r=e.font;return r?wa[r]?t.withTextFontFamily(wa[r]):ka[r]?t.withTextFontWeight(ka[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Sa[r]):t};ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"text",mode:r.mode,body:ht(n),font:a}},htmlBuilder(e,t){var r=Ma(e,t),a=gt(e.body,r,!0);return Ke.makeSpan(["mord","text"],a,r)},mathmlBuilder(e,t){var r=Ma(e,t);return It(e.body,r)}}),ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=wt(e.body,t),a=Ke.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new Tt.MathNode("mo",[new Tt.TextNode("\u203e")]);r.setAttribute("stretchy","true");var a=new Tt.MathNode("munder",[Rt(e.body,t),r]);return a.setAttribute("accentunder","true"),a}}),ot({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=wt(e.body,t),a=t.fontMetrics().axisHeight,n=.5*(r.height-a-(r.depth+a));return Ke.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:(e,t)=>new Tt.MathNode("mpadded",[Rt(e.body,t)],["vcenter"])}),ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new i("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=za(e),a=[],n=t.havingStyle(t.style.text()),i=0;i<r.length;i++){var o=r[i];"~"===o&&(o="\\textasciitilde"),a.push(Ke.makeSymbol(o,"Typewriter-Regular",e.mode,n,["mord","texttt"]))}return Ke.makeSpan(["mord","text"].concat(n.sizingClasses(t)),Ke.tryCombineChars(a),n)},mathmlBuilder(e,t){var r=new Tt.TextNode(za(e)),a=new Tt.MathNode("mtext",[r]);return a.setAttribute("mathvariant","monospace"),a}});var za=e=>e.body.replace(/ /g,e.star?"\u2423":"\xa0"),Aa=at,Ta="[ \r\n\t]",Ba="(\\\\[a-zA-Z@]+)"+Ta+"*",Ca="[\u0300-\u036f]",Na=new RegExp(Ca+"+$"),qa="("+Ta+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff]"+Ca+"*|[\ud800-\udbff][\udc00-\udfff]"+Ca+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Ba+"|\\\\[^\ud800-\udfff])";class Ia{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(qa,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new n("EOF",new a(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new i("Unexpected character: '"+e[t]+"'",new n(e[t],new a(this,t,t+1)));var o=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[o]){var s=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===s?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new n(o,new a(this,t,this.tokenRegex.lastIndex))}}class Ra{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new i("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(var a=0;a<this.undefStack.length;a++)delete this.undefStack[a][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Ha=Dr;Vr("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Vr("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Vr("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Vr("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Vr("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Vr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Vr("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Oa={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Vr("\\char",(function(e){var t,r=e.popToken(),a="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])a=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new i("\\char` missing argument");a=r.text.charCodeAt(0)}else t=10;if(t){if(null==(a=Oa[r.text])||a>=t)throw new i("Invalid base-"+t+" digit "+r.text);for(var n;null!=(n=Oa[e.future().text])&&n<t;)a*=t,a+=n,e.popToken()}return"\\@char{"+a+"}"}));var Ea=(e,t,r)=>{var a=e.consumeArg().tokens;if(1!==a.length)throw new i("\\newcommand's first argument must be a macro name");var n=a[0].text,o=e.isDefined(n);if(o&&!t)throw new i("\\newcommand{"+n+"} attempting to redefine "+n+"; use \\renewcommand");if(!o&&!r)throw new i("\\renewcommand{"+n+"} when command "+n+" does not yet exist; use \\newcommand");var s=0;if(1===(a=e.consumeArg().tokens).length&&"["===a[0].text){for(var l="",h=e.expandNextToken();"]"!==h.text&&"EOF"!==h.text;)l+=h.text,h=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new i("Invalid number of arguments: "+l);s=parseInt(l),a=e.consumeArg().tokens}return e.macros.set(n,{tokens:a,numArgs:s}),""};Vr("\\newcommand",(e=>Ea(e,!1,!0))),Vr("\\renewcommand",(e=>Ea(e,!0,!1))),Vr("\\providecommand",(e=>Ea(e,!0,!0))),Vr("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Vr("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Vr("\\show",(e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Aa[r],ne.math[r],ne.text[r]),""})),Vr("\\bgroup","{"),Vr("\\egroup","}"),Vr("~","\\nobreakspace"),Vr("\\lq","`"),Vr("\\rq","'"),Vr("\\aa","\\r a"),Vr("\\AA","\\r A"),Vr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),Vr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Vr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),Vr("\u212c","\\mathscr{B}"),Vr("\u2130","\\mathscr{E}"),Vr("\u2131","\\mathscr{F}"),Vr("\u210b","\\mathscr{H}"),Vr("\u2110","\\mathscr{I}"),Vr("\u2112","\\mathscr{L}"),Vr("\u2133","\\mathscr{M}"),Vr("\u211b","\\mathscr{R}"),Vr("\u212d","\\mathfrak{C}"),Vr("\u210c","\\mathfrak{H}"),Vr("\u2128","\\mathfrak{Z}"),Vr("\\Bbbk","\\Bbb{k}"),Vr("\xb7","\\cdotp"),Vr("\\llap","\\mathllap{\\textrm{#1}}"),Vr("\\rlap","\\mathrlap{\\textrm{#1}}"),Vr("\\clap","\\mathclap{\\textrm{#1}}"),Vr("\\mathstrut","\\vphantom{(}"),Vr("\\underbar","\\underline{\\text{#1}}"),Vr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Vr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Vr("\\ne","\\neq"),Vr("\u2260","\\neq"),Vr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Vr("\u2209","\\notin"),Vr("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Vr("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Vr("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),Vr("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),Vr("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),Vr("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),Vr("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),Vr("\u27c2","\\perp"),Vr("\u203c","\\mathclose{!\\mkern-0.8mu!}"),Vr("\u220c","\\notni"),Vr("\u231c","\\ulcorner"),Vr("\u231d","\\urcorner"),Vr("\u231e","\\llcorner"),Vr("\u231f","\\lrcorner"),Vr("\xa9","\\copyright"),Vr("\xae","\\textregistered"),Vr("\ufe0f","\\textregistered"),Vr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Vr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Vr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Vr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Vr("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Vr("\u22ee","\\vdots"),Vr("\\varGamma","\\mathit{\\Gamma}"),Vr("\\varDelta","\\mathit{\\Delta}"),Vr("\\varTheta","\\mathit{\\Theta}"),Vr("\\varLambda","\\mathit{\\Lambda}"),Vr("\\varXi","\\mathit{\\Xi}"),Vr("\\varPi","\\mathit{\\Pi}"),Vr("\\varSigma","\\mathit{\\Sigma}"),Vr("\\varUpsilon","\\mathit{\\Upsilon}"),Vr("\\varPhi","\\mathit{\\Phi}"),Vr("\\varPsi","\\mathit{\\Psi}"),Vr("\\varOmega","\\mathit{\\Omega}"),Vr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Vr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Vr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Vr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Vr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Vr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var La={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Vr("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in La?t=La[r]:("\\not"===r.slice(0,4)||r in ne.math&&m.contains(["bin","rel"],ne.math[r].group))&&(t="\\dotsb"),t}));var Da={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Vr("\\dotso",(function(e){return e.future().text in Da?"\\ldots\\,":"\\ldots"})),Vr("\\dotsc",(function(e){var t=e.future().text;return t in Da&&","!==t?"\\ldots\\,":"\\ldots"})),Vr("\\cdots",(function(e){return e.future().text in Da?"\\@cdots\\,":"\\@cdots"})),Vr("\\dotsb","\\cdots"),Vr("\\dotsm","\\cdots"),Vr("\\dotsi","\\!\\cdots"),Vr("\\dotsx","\\ldots\\,"),Vr("\\DOTSI","\\relax"),Vr("\\DOTSB","\\relax"),Vr("\\DOTSX","\\relax"),Vr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Vr("\\,","\\tmspace+{3mu}{.1667em}"),Vr("\\thinspace","\\,"),Vr("\\>","\\mskip{4mu}"),Vr("\\:","\\tmspace+{4mu}{.2222em}"),Vr("\\medspace","\\:"),Vr("\\;","\\tmspace+{5mu}{.2777em}"),Vr("\\thickspace","\\;"),Vr("\\!","\\tmspace-{3mu}{.1667em}"),Vr("\\negthinspace","\\!"),Vr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Vr("\\negthickspace","\\tmspace-{5mu}{.277em}"),Vr("\\enspace","\\kern.5em "),Vr("\\enskip","\\hskip.5em\\relax"),Vr("\\quad","\\hskip1em\\relax"),Vr("\\qquad","\\hskip2em\\relax"),Vr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Vr("\\tag@paren","\\tag@literal{({#1})}"),Vr("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new i("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Vr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Vr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Vr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Vr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Vr("\\newline","\\\\\\relax"),Vr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Va=G(C["Main-Regular"]["T".charCodeAt(0)][1]-.7*C["Main-Regular"]["A".charCodeAt(0)][1]);Vr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Va+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Vr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Va+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Vr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Vr("\\@hspace","\\hskip #1\\relax"),Vr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Vr("\\ordinarycolon",":"),Vr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Vr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Vr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Vr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Vr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Vr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Vr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Vr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Vr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Vr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Vr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Vr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Vr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Vr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Vr("\u2237","\\dblcolon"),Vr("\u2239","\\eqcolon"),Vr("\u2254","\\coloneqq"),Vr("\u2255","\\eqqcolon"),Vr("\u2a74","\\Coloneqq"),Vr("\\ratio","\\vcentcolon"),Vr("\\coloncolon","\\dblcolon"),Vr("\\colonequals","\\coloneqq"),Vr("\\coloncolonequals","\\Coloneqq"),Vr("\\equalscolon","\\eqqcolon"),Vr("\\equalscoloncolon","\\Eqqcolon"),Vr("\\colonminus","\\coloneq"),Vr("\\coloncolonminus","\\Coloneq"),Vr("\\minuscolon","\\eqcolon"),Vr("\\minuscoloncolon","\\Eqcolon"),Vr("\\coloncolonapprox","\\Colonapprox"),Vr("\\coloncolonsim","\\Colonsim"),Vr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Vr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Vr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Vr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Vr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Vr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Vr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Vr("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Vr("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Vr("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Vr("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Vr("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Vr("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Vr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Vr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Vr("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Vr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Vr("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Vr("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Vr("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Vr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Vr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Vr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Vr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Vr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Vr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Vr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Vr("\\imath","\\html@mathml{\\@imath}{\u0131}"),Vr("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Vr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Vr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Vr("\u27e6","\\llbracket"),Vr("\u27e7","\\rrbracket"),Vr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Vr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Vr("\u2983","\\lBrace"),Vr("\u2984","\\rBrace"),Vr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Vr("\u29b5","\\minuso"),Vr("\\darr","\\downarrow"),Vr("\\dArr","\\Downarrow"),Vr("\\Darr","\\Downarrow"),Vr("\\lang","\\langle"),Vr("\\rang","\\rangle"),Vr("\\uarr","\\uparrow"),Vr("\\uArr","\\Uparrow"),Vr("\\Uarr","\\Uparrow"),Vr("\\N","\\mathbb{N}"),Vr("\\R","\\mathbb{R}"),Vr("\\Z","\\mathbb{Z}"),Vr("\\alef","\\aleph"),Vr("\\alefsym","\\aleph"),Vr("\\Alpha","\\mathrm{A}"),Vr("\\Beta","\\mathrm{B}"),Vr("\\bull","\\bullet"),Vr("\\Chi","\\mathrm{X}"),Vr("\\clubs","\\clubsuit"),Vr("\\cnums","\\mathbb{C}"),Vr("\\Complex","\\mathbb{C}"),Vr("\\Dagger","\\ddagger"),Vr("\\diamonds","\\diamondsuit"),Vr("\\empty","\\emptyset"),Vr("\\Epsilon","\\mathrm{E}"),Vr("\\Eta","\\mathrm{H}"),Vr("\\exist","\\exists"),Vr("\\harr","\\leftrightarrow"),Vr("\\hArr","\\Leftrightarrow"),Vr("\\Harr","\\Leftrightarrow"),Vr("\\hearts","\\heartsuit"),Vr("\\image","\\Im"),Vr("\\infin","\\infty"),Vr("\\Iota","\\mathrm{I}"),Vr("\\isin","\\in"),Vr("\\Kappa","\\mathrm{K}"),Vr("\\larr","\\leftarrow"),Vr("\\lArr","\\Leftarrow"),Vr("\\Larr","\\Leftarrow"),Vr("\\lrarr","\\leftrightarrow"),Vr("\\lrArr","\\Leftrightarrow"),Vr("\\Lrarr","\\Leftrightarrow"),Vr("\\Mu","\\mathrm{M}"),Vr("\\natnums","\\mathbb{N}"),Vr("\\Nu","\\mathrm{N}"),Vr("\\Omicron","\\mathrm{O}"),Vr("\\plusmn","\\pm"),Vr("\\rarr","\\rightarrow"),Vr("\\rArr","\\Rightarrow"),Vr("\\Rarr","\\Rightarrow"),Vr("\\real","\\Re"),Vr("\\reals","\\mathbb{R}"),Vr("\\Reals","\\mathbb{R}"),Vr("\\Rho","\\mathrm{P}"),Vr("\\sdot","\\cdot"),Vr("\\sect","\\S"),Vr("\\spades","\\spadesuit"),Vr("\\sub","\\subset"),Vr("\\sube","\\subseteq"),Vr("\\supe","\\supseteq"),Vr("\\Tau","\\mathrm{T}"),Vr("\\thetasym","\\vartheta"),Vr("\\weierp","\\wp"),Vr("\\Zeta","\\mathrm{Z}"),Vr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Vr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Vr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Vr("\\bra","\\mathinner{\\langle{#1}|}"),Vr("\\ket","\\mathinner{|{#1}\\rangle}"),Vr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Vr("\\Bra","\\left\\langle#1\\right|"),Vr("\\Ket","\\left|#1\\right\\rangle");var Pa=e=>t=>{var r=t.consumeArg().tokens,a=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>r=>{e&&(r.macros.set("|",o),n.length&&r.macros.set("\\|",s));var i=t;!t&&n.length&&("|"===r.future().text&&(r.popToken(),i=!0));return{tokens:i?n:a,numArgs:0}};t.macros.set("|",l(!1)),n.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,m=t.expandTokens([...i,...h,...r]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};Vr("\\bra@ket",Pa(!1)),Vr("\\bra@set",Pa(!0)),Vr("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Vr("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Vr("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Vr("\\angln","{\\angl n}"),Vr("\\blue","\\textcolor{##6495ed}{#1}"),Vr("\\orange","\\textcolor{##ffa500}{#1}"),Vr("\\pink","\\textcolor{##ff00af}{#1}"),Vr("\\red","\\textcolor{##df0030}{#1}"),Vr("\\green","\\textcolor{##28ae7b}{#1}"),Vr("\\gray","\\textcolor{gray}{#1}"),Vr("\\purple","\\textcolor{##9d38bd}{#1}"),Vr("\\blueA","\\textcolor{##ccfaff}{#1}"),Vr("\\blueB","\\textcolor{##80f6ff}{#1}"),Vr("\\blueC","\\textcolor{##63d9ea}{#1}"),Vr("\\blueD","\\textcolor{##11accd}{#1}"),Vr("\\blueE","\\textcolor{##0c7f99}{#1}"),Vr("\\tealA","\\textcolor{##94fff5}{#1}"),Vr("\\tealB","\\textcolor{##26edd5}{#1}"),Vr("\\tealC","\\textcolor{##01d1c1}{#1}"),Vr("\\tealD","\\textcolor{##01a995}{#1}"),Vr("\\tealE","\\textcolor{##208170}{#1}"),Vr("\\greenA","\\textcolor{##b6ffb0}{#1}"),Vr("\\greenB","\\textcolor{##8af281}{#1}"),Vr("\\greenC","\\textcolor{##74cf70}{#1}"),Vr("\\greenD","\\textcolor{##1fab54}{#1}"),Vr("\\greenE","\\textcolor{##0d923f}{#1}"),Vr("\\goldA","\\textcolor{##ffd0a9}{#1}"),Vr("\\goldB","\\textcolor{##ffbb71}{#1}"),Vr("\\goldC","\\textcolor{##ff9c39}{#1}"),Vr("\\goldD","\\textcolor{##e07d10}{#1}"),Vr("\\goldE","\\textcolor{##a75a05}{#1}"),Vr("\\redA","\\textcolor{##fca9a9}{#1}"),Vr("\\redB","\\textcolor{##ff8482}{#1}"),Vr("\\redC","\\textcolor{##f9685d}{#1}"),Vr("\\redD","\\textcolor{##e84d39}{#1}"),Vr("\\redE","\\textcolor{##bc2612}{#1}"),Vr("\\maroonA","\\textcolor{##ffbde0}{#1}"),Vr("\\maroonB","\\textcolor{##ff92c6}{#1}"),Vr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Vr("\\maroonD","\\textcolor{##ca337c}{#1}"),Vr("\\maroonE","\\textcolor{##9e034e}{#1}"),Vr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Vr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Vr("\\purpleC","\\textcolor{##aa87ff}{#1}"),Vr("\\purpleD","\\textcolor{##7854ab}{#1}"),Vr("\\purpleE","\\textcolor{##543b78}{#1}"),Vr("\\mintA","\\textcolor{##f5f9e8}{#1}"),Vr("\\mintB","\\textcolor{##edf2df}{#1}"),Vr("\\mintC","\\textcolor{##e0e5cc}{#1}"),Vr("\\grayA","\\textcolor{##f6f7f7}{#1}"),Vr("\\grayB","\\textcolor{##f0f1f2}{#1}"),Vr("\\grayC","\\textcolor{##e3e5e6}{#1}"),Vr("\\grayD","\\textcolor{##d6d8da}{#1}"),Vr("\\grayE","\\textcolor{##babec2}{#1}"),Vr("\\grayF","\\textcolor{##888d93}{#1}"),Vr("\\grayG","\\textcolor{##626569}{#1}"),Vr("\\grayH","\\textcolor{##3b3e40}{#1}"),Vr("\\grayI","\\textcolor{##21242c}{#1}"),Vr("\\kaBlue","\\textcolor{##314453}{#1}"),Vr("\\kaGreen","\\textcolor{##71B307}{#1}");var Fa={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Ga{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Ra(Ha,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Ia(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,a;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:a,end:r}=this.consumeArg(["]"]))}else({tokens:a,start:t,end:r}=this.consumeArg());return this.pushToken(new n("EOF",r.loc)),this.pushTokens(a),t.range(r,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var a,n=this.future(),o=0,s=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++o;else if("}"===a.text){if(-1===--o)throw new i("Extra }",a)}else if("EOF"===a.text)throw new i("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",a);if(e&&r)if((0===o||1===o&&"{"===e[s])&&a.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===n.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:a}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new i("The length of delimiters doesn't match the number of args!");for(var r=t[0],a=0;a<r.length;a++){var n=this.popToken();if(r[a]!==n.text)throw new i("Use of the macro doesn't match its definition",n)}}for(var o=[],s=0;s<e;s++)o.push(this.consumeArg(t&&t[s+1]).tokens);return o}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new i("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,a=t.noexpand?null:this._getExpansion(r);if(null==a||e&&a.unexpandable){if(e&&null==a&&"\\"===r[0]&&!this.isDefined(r))throw new i("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var n=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs)for(var s=(n=n.slice()).length-1;s>=0;--s){var l=n[s];if("#"===l.text){if(0===s)throw new i("Incomplete placeholder at end of macro body",l);if("#"===(l=n[--s]).text)n.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new i("Not a valid argument number",l);n.splice(s,2,...o[+l.text-1])}}}return this.pushTokens(n),n.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new n(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),t.push(a)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var a="function"==typeof t?t(this):t;if("string"==typeof a){var n=0;if(-1!==a.indexOf("#"))for(var i=a.replace(/##/g,"");-1!==i.indexOf("#"+(n+1));)++n;for(var o=new Ia(a,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:n}}return a}isDefined(e){return this.macros.has(e)||Aa.hasOwnProperty(e)||ne.math.hasOwnProperty(e)||ne.text.hasOwnProperty(e)||Fa.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Aa.hasOwnProperty(e)&&!Aa[e].primitive}}var Ua=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,Ya=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),Xa={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},Wa={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"};class _a{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Ga(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new i("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new n("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(-1!==_a.endOfExpression.indexOf(a.text))break;if(t&&a.text===t)break;if(e&&Aa[a.text]&&Aa[a.text].infix)break;var n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r=-1,a=0;a<e.length;a++)if("infix"===e[a].type){if(-1!==r)throw new i("only one infix operator per group",e[a].token);r=a,t=e[a].replaceWith}if(-1!==r&&t){var n,o,s=e.slice(0,r),l=e.slice(r+1);return n=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},o=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[n,e[r],o],[]):this.callFunction(t,[n,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();var a=this.parseGroup(e);if(!a)throw new i("Expected group after '"+r+"'",t);return a}formatUnsupportedCmd(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var a={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[a]}}parseAtom(e){var t,r,a=this.parseGroup("atom",e);if("text"===this.mode)return a;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(a&&"op"===a.type){var s="\\limits"===o.text;a.limits=s,a.alwaysHandleSupSub=!0}else{if(!a||"operatorname"!==a.type)throw new i("Limit controls must follow a math operator",o);a.alwaysHandleSupSub&&(a.limits="\\limits"===o.text)}this.consume()}else if("^"===o.text){if(t)throw new i("Double superscript",o);t=this.handleSupSubscript("superscript")}else if("_"===o.text){if(r)throw new i("Double subscript",o);r=this.handleSupSubscript("subscript")}else if("'"===o.text){if(t)throw new i("Double superscript",o);var l={type:"textord",mode:this.mode,text:"\\prime"},h=[l];for(this.consume();"'"===this.fetch().text;)h.push(l),this.consume();"^"===this.fetch().text&&h.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:h}}else{if(!Ya[o.text])break;var m=Ua.test(o.text),c=[];for(c.push(new n(Ya[o.text])),this.consume();;){var p=this.fetch().text;if(!Ya[p])break;if(Ua.test(p)!==m)break;c.unshift(new n(Ya[p])),this.consume()}var u=this.subparse(c);m?r={type:"ordgroup",mode:"math",body:u}:t={type:"ordgroup",mode:"math",body:u}}}return t||r?{type:"supsub",mode:this.mode,base:a,sup:t,sub:r}:a}parseFunction(e,t){var r=this.fetch(),a=r.text,n=Aa[a];if(!n)return null;if(this.consume(),t&&"atom"!==t&&!n.allowedInArgument)throw new i("Got function '"+a+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!n.allowedInText)throw new i("Can't use function '"+a+"' in text mode",r);if("math"===this.mode&&!1===n.allowedInMath)throw new i("Can't use function '"+a+"' in math mode",r);var{args:o,optArgs:s}=this.parseArguments(a,n);return this.callFunction(a,o,s,r,e)}callFunction(e,t,r,a,n){var o={funcName:e,parser:this,token:a,breakOnTokenText:n},s=Aa[e];if(s&&s.handler)return s.handler(o,t,r);throw new i("No function handler for "+e)}parseArguments(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var a=[],n=[],o=0;o<r;o++){var s=t.argTypes&&t.argTypes[o],l=o<t.numOptionalArgs;(t.primitive&&null==s||"sqrt"===t.type&&1===o&&null==n[0])&&(s="primitive");var h=this.parseGroupOfType("argument to '"+e+"'",s,l);if(l)n.push(h);else{if(null==h)throw new i("Null argument, please report this as a bug");a.push(h)}}return{args:a,optArgs:n}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var a=this.parseArgumentGroup(r,"text");return null!=a?{type:"styling",mode:a.mode,body:[a],style:"text"}:null;case"raw":var n=this.parseStringGroup("raw",r);return null!=n?{type:"raw",mode:"text",string:n.text}:null;case"primitive":if(r)throw new i("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new i("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new i("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var r=this.gullet.scanArgument(t);if(null==r)return null;for(var a,n="";"EOF"!==(a=this.fetch()).text;)n+=a.text,this.consume();return this.consume(),r.text=n,r}parseRegexGroup(e,t){for(var r,a=this.fetch(),n=a,o="";"EOF"!==(r=this.fetch()).text&&e.test(o+r.text);)o+=(n=r).text,this.consume();if(""===o)throw new i("Invalid "+t+": '"+a.text+"'",a);return a.range(n,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new i("Invalid color: '"+t.text+"'",t);var a=r[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}}parseSizeGroup(e){var t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",r=!0);var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!a)throw new i("Invalid size: '"+t.text+"'",t);var n={number:+(a[1]+a[2]),unit:a[3]};if(!P(n))throw new i("Invalid unit: '"+n.unit+"'",t);return{type:"size",mode:this.mode,value:n,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){var r=this.gullet.scanArgument(e);if(null==r)return null;var a=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var n=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:r.loc,body:n};return t&&this.switchMode(a),i}parseGroup(e,t){var r,n=this.fetch(),o=n.text;if("{"===o||"\\begingroup"===o){this.consume();var s="{"===o?"}":"\\endgroup";this.gullet.beginGroup();var l=this.parseExpression(!1,s),h=this.fetch();this.expect(s),this.gullet.endGroup(),r={type:"ordgroup",mode:this.mode,loc:a.range(n,h),body:l,semisimple:"\\begingroup"===o||void 0}}else if(null==(r=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===o[0]&&!Fa.hasOwnProperty(o)){if(this.settings.throwOnError)throw new i("Undefined control sequence: "+o,n);r=this.formatUnsupportedCmd(o),this.consume()}return r}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var n=e[r],i=n.text;"-"===i&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:a.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:a.range(n,e[r+1]),text:"--"}),t-=1)),"'"!==i&&"`"!==i||e[r+1].text!==i||(e.splice(r,2,{type:"textord",mode:"text",loc:a.range(n,e[r+1]),text:i+i}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var r=t.slice(5),n="*"===r.charAt(0);if(n&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new i("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:r=r.slice(1,-1),star:n}}Wa.hasOwnProperty(t[0])&&!ne[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=Wa[t[0]]+t.slice(1));var o,s=Na.exec(t);if(s&&("i"===(t=t.substring(0,s.index))?t="\u0131":"j"===t&&(t="\u0237")),ne[this.mode][t]){this.settings.strict&&"math"===this.mode&&Ee.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var l,h=ne[this.mode][t].group,m=a.range(e);if(re.hasOwnProperty(h)){var c=h;l={type:"atom",mode:this.mode,family:c,loc:m,text:t}}else l={type:h,mode:this.mode,loc:m,text:t};o=l}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(z(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:a.range(e),text:t}}if(this.consume(),s)for(var p=0;p<s[0].length;p++){var u=s[0][p];if(!Xa[u])throw new i("Unknown accent ' "+u+"'",e);var d=Xa[u][this.mode]||Xa[u].text;if(!d)throw new i("Accent "+u+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:a.range(e),label:d,isStretchy:!1,isShifty:!0,base:o}}return o}}_a.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var ja=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new _a(e,t);delete r.gullet.macros.current["\\df@tag"];var a=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new i("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:r.subparse([new n("\\df@tag")])}]}return a},$a=function(e,t,r){t.textContent="";var a=Ka(e,r).toNode();t.appendChild(a)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),$a=function(){throw new i("KaTeX doesn't work in quirks mode.")});var Za=function(e,t,r){if(r.throwOnError||!(e instanceof i))throw e;var a=Ke.makeSpan(["katex-error"],[new K(t)]);return a.setAttribute("title",e.toString()),a.setAttribute("style","color:"+r.errorColor),a},Ka=function(e,t){var r=new u(t);try{return function(e,t,r){var a,n=Ot(r);if("mathml"===r.output)return Ht(e,t,n,r.displayMode,!0);if("html"===r.output){var i=St(e,n);a=Ke.makeSpan(["katex"],[i])}else{var o=Ht(e,t,n,r.displayMode,!1),s=St(e,n);a=Ke.makeSpan(["katex"],[o,s])}return Et(a,r)}(ja(e,r),e,r)}catch(a){return Za(a,e,r)}},Ja={version:"0.16.11",render:$a,renderToString:function(e,t){return Ka(e,t).toMarkup()},ParseError:i,SETTINGS_SCHEMA:c,__parse:function(e,t){var r=new u(t);return ja(e,r)},__renderToDomTree:Ka,__renderToHTMLTree:function(e,t){var r=new u(t);try{return function(e,t,r){var a=St(e,Ot(r)),n=Ke.makeSpan(["katex"],[a]);return Et(n,r)}(ja(e,r),0,r)}catch(a){return Za(a,e,r)}},__setFontMetrics:function(e,t){C[e]=t},__defineSymbol:ie,__defineFunction:ot,__defineMacro:Vr,__domTree:{Span:_,Anchor:j,SymbolNode:K,SvgNode:J,PathNode:Q,LineNode:ee}}}}]); \ No newline at end of file diff --git a/assets/js/2235.de976e0b.js b/assets/js/2235.de976e0b.js new file mode 100644 index 00000000..d09e601a --- /dev/null +++ b/assets/js/2235.de976e0b.js @@ -0,0 +1 @@ +(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[2235],{2954:(n,t,e)=>{n.exports=function(){function n(t,e,i){function r(a,o){if(!e[a]){if(!t[a]){if(c)return c(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var s=e[a]={exports:{}};t[a][0].call(s.exports,(function(n){return r(t[a][1][n]||n)}),s,s.exports,n,t,e,i)}return e[a].exports}for(var c=void 0,a=0;a<i.length;a++)r(i[a]);return r}return n}()({1:[function(n,t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function n(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}return function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}}();function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}var c=function(){function n(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.defaultLayoutOptions,c=void 0===i?{}:i,o=e.algorithms,u=void 0===o?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:o,s=e.workerFactory,h=e.workerUrl;if(r(this,n),this.defaultLayoutOptions=c,this.initialized=!1,void 0===h&&void 0===s)throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var f=s;void 0!==h&&void 0===s&&(f=function(n){return new Worker(n)});var l=f(h);if("function"!=typeof l.postMessage)throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new a(l),this.worker.postMessage({cmd:"register",algorithms:u}).then((function(n){return t.initialized=!0})).catch(console.err)}return i(n,[{key:"layout",value:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.layoutOptions,i=void 0===e?this.defaultLayoutOptions:e,r=t.logging,c=void 0!==r&&r,a=t.measureExecutionTime,o=void 0!==a&&a;return n?this.worker.postMessage({cmd:"layout",graph:n,layoutOptions:i,options:{logging:c,measureExecutionTime:o}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker.terminate()}}]),n}();e.default=c;var a=function(){function n(t){var e=this;if(r(this,n),void 0===t)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=t,this.worker.onmessage=function(n){setTimeout((function(){e.receive(e,n)}),0)}}return i(n,[{key:"postMessage",value:function(n){var t=this.id||0;this.id=t+1,n.id=t;var e=this;return new Promise((function(i,r){e.resolvers[t]=function(n,t){n?(e.convertGwtStyleError(n),r(n)):i(t)},e.worker.postMessage(n)}))}},{key:"receive",value:function(n,t){var e=t.data,i=n.resolvers[e.id];i&&(delete n.resolvers[e.id],e.error?i(e.error):i(null,e.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(n){if(n){var t=n.__java$exception;t&&(t.cause&&t.cause.backingJsObject&&(n.cause=t.cause.backingJsObject,this.convertGwtStyleError(n.cause)),delete n.__java$exception)}}}]),n}()},{}],2:[function(n,t,i){(function(n){(function(){"use strict";var e;function r(){}function c(){}function a(){}function o(){}function u(){}function s(){}function h(){}function f(){}function l(){}function b(){}function w(){}function d(){}function g(){}function p(){}function m(){}function v(){}function k(){}function y(){}function M(){}function T(){}function j(){}function E(){}function S(){}function P(){}function C(){}function I(){}function O(){}function A(){}function L(){}function N(){}function $(){}function D(){}function x(){}function R(){}function K(){}function F(){}function _(){}function B(){}function H(){}function U(){}function G(){}function q(){}function X(){}function z(){}function V(){}function W(){}function Q(){}function J(){}function Y(){}function Z(){}function nn(){}function tn(){}function en(){}function rn(){}function cn(){}function an(){}function on(){}function un(){}function sn(){}function hn(){}function fn(){}function ln(){}function bn(){}function wn(){}function dn(){}function gn(){}function pn(){}function mn(){}function vn(){}function kn(){}function yn(){}function Mn(){}function Tn(){}function jn(){}function En(){}function Sn(){}function Pn(){}function Cn(){}function In(){}function On(){}function An(){}function Ln(){}function Nn(){}function $n(){}function Dn(){}function xn(){}function Rn(){}function Kn(){}function Fn(){}function _n(){}function Bn(){}function Hn(){}function Un(){}function Gn(){}function qn(){}function Xn(){}function zn(){}function Vn(){}function Wn(){}function Qn(){}function Jn(){}function Yn(){}function Zn(){}function nt(){}function tt(){}function et(){}function it(){}function rt(){}function ct(){}function at(){}function ot(){}function ut(){}function st(){}function ht(){}function ft(){}function lt(){}function bt(){}function wt(){}function dt(){}function gt(){}function pt(){}function mt(){}function vt(){}function kt(){}function yt(){}function Mt(){}function Tt(){}function jt(){}function Et(){}function St(){}function Pt(){}function Ct(){}function It(){}function Ot(){}function At(){}function Lt(){}function Nt(){}function $t(){}function Dt(){}function xt(){}function Rt(){}function Kt(){}function Ft(){}function _t(){}function Bt(){}function Ht(){}function Ut(){}function Gt(){}function qt(){}function Xt(){}function zt(){}function Vt(){}function Wt(){}function Qt(){}function Jt(){}function Yt(){}function Zt(){}function ne(){}function te(){}function ee(){}function ie(){}function re(){}function ce(){}function ae(){}function oe(){}function ue(){}function se(){}function he(){}function fe(){}function le(){}function be(){}function we(){}function de(){}function ge(){}function pe(){}function me(){}function ve(){}function ke(){}function ye(){}function Me(){}function Te(){}function je(){}function Ee(){}function Se(){}function Pe(){}function Ce(){}function Ie(){}function Oe(){}function Ae(){}function Le(){}function Ne(){}function $e(){}function De(){}function xe(){}function Re(){}function Ke(){}function Fe(){}function _e(){}function Be(){}function He(){}function Ue(){}function Ge(){}function qe(){}function Xe(){}function ze(){}function Ve(){}function We(){}function Qe(){}function Je(){}function Ye(){}function Ze(){}function ni(){}function ti(){}function ei(){}function ii(){}function ri(){}function ci(){}function ai(){}function oi(){}function ui(){}function si(){}function hi(){}function fi(){}function li(){}function bi(){}function wi(){}function di(){}function gi(){}function pi(){}function mi(){}function vi(){}function ki(){}function yi(){}function Mi(){}function Ti(){}function ji(){}function Ei(){}function Si(){}function Pi(){}function Ci(){}function Ii(){}function Oi(){}function Ai(){}function Li(){}function Ni(){}function $i(){}function Di(){}function xi(){}function Ri(){}function Ki(){}function Fi(){}function _i(){}function Bi(){}function Hi(){}function Ui(){}function Gi(){}function qi(){}function Xi(){}function zi(){}function Vi(){}function Wi(){}function Qi(){}function Ji(){}function Yi(){}function Zi(){}function nr(){}function tr(){}function er(){}function ir(){}function rr(){}function cr(){}function ar(){}function or(){}function ur(){}function sr(){}function hr(){}function fr(){}function lr(){}function br(){}function wr(){}function dr(){}function gr(){}function pr(){}function mr(){}function vr(){}function kr(){}function yr(){}function Mr(){}function Tr(){}function jr(){}function Er(){}function Sr(){}function Pr(){}function Cr(){}function Ir(){}function Or(){}function Ar(){}function Lr(){}function Nr(){}function $r(){}function Dr(){}function xr(){}function Rr(){}function Kr(){}function Fr(){}function _r(){}function Br(){}function Hr(){}function Ur(){}function Gr(){}function qr(){}function Xr(){}function zr(){}function Vr(){}function Wr(){}function Qr(){}function Jr(){}function Yr(){}function Zr(){}function nc(){}function tc(){}function ec(){}function ic(){}function rc(){}function cc(){}function ac(){}function oc(){}function uc(){}function sc(){}function hc(){}function fc(){}function lc(){}function bc(){}function wc(){}function dc(){}function gc(){}function pc(){}function mc(){}function vc(){}function kc(){}function yc(){}function Mc(){}function Tc(){}function jc(){}function Ec(){}function Sc(){}function Pc(){}function Cc(){}function Ic(){}function Oc(){}function Ac(){}function Lc(){}function Nc(){}function $c(){}function Dc(){}function xc(){}function Rc(){}function Kc(){}function Fc(){}function _c(){}function Bc(){}function Hc(){}function Uc(){}function Gc(){}function qc(){}function Xc(){}function zc(){}function Vc(){}function Wc(){}function Qc(){}function Jc(){}function Yc(){}function Zc(){}function na(){}function ta(){}function ea(){}function ia(){}function ra(){}function ca(){}function aa(){}function oa(){}function ua(){}function sa(){}function ha(){}function fa(){}function la(){}function ba(){}function wa(){}function da(){}function ga(){}function pa(){}function ma(){}function va(){}function ka(){}function ya(){}function Ma(){}function Ta(){}function ja(){}function Ea(){}function Sa(){}function Pa(){}function Ca(){}function Ia(){}function Oa(){}function Aa(){}function La(){}function Na(){}function $a(){}function Da(){}function xa(){}function Ra(){}function Ka(){}function Fa(){}function _a(){}function Ba(){}function Ha(){}function Ua(){}function Ga(){}function qa(){}function Xa(){}function za(){}function Va(){}function Wa(){}function Qa(){}function Ja(){}function Ya(){}function Za(){}function no(){}function to(){}function eo(){}function io(){}function ro(){}function co(){}function ao(){}function oo(){}function uo(){}function so(){}function ho(){}function fo(){}function lo(){}function bo(){}function wo(){}function go(){}function po(){}function mo(){}function vo(){}function ko(){}function yo(){}function Mo(){}function To(){}function jo(){}function Eo(){}function So(){}function Po(){}function Co(){}function Io(){}function Oo(){}function Ao(){}function Lo(){}function No(){}function $o(){}function Do(){}function xo(){}function Ro(){}function Ko(){}function Fo(){}function _o(){}function Bo(){}function Ho(){}function Uo(){}function Go(){}function qo(){}function Xo(){}function zo(){}function Vo(){}function Wo(){}function Qo(){}function Jo(){}function Yo(){}function Zo(){}function nu(){}function tu(){}function eu(){}function iu(){}function ru(){}function cu(){}function au(){}function ou(){}function uu(){}function su(){}function hu(){}function fu(){}function lu(){}function bu(){}function wu(){}function du(){}function gu(){}function pu(){}function mu(){}function vu(){}function ku(){}function yu(){}function Mu(){}function Tu(){}function ju(){}function Eu(){}function Su(){}function Pu(){}function Cu(){}function Iu(){}function Ou(){}function Au(){}function Lu(){}function Nu(){}function $u(){}function Du(){}function xu(){}function Ru(){}function Ku(){}function Fu(){}function _u(){}function Bu(){}function Hu(){}function Uu(){}function Gu(){}function qu(){}function Xu(){}function zu(){}function Vu(){}function Wu(){}function Qu(){}function Ju(){}function Yu(){}function Zu(){}function ns(){}function ts(){}function es(){}function is(){}function rs(){}function cs(){}function as(){}function os(){}function us(){}function ss(){}function hs(){}function fs(){}function ls(){}function bs(){}function ws(){}function ds(){}function gs(){}function ps(){}function ms(){}function vs(){}function ks(){}function ys(){}function Ms(){}function Ts(){}function js(){}function Es(){}function Ss(){}function Ps(){}function Cs(){}function Is(){}function Os(){}function As(){}function Ls(){}function Ns(){}function $s(){}function Ds(){}function xs(){}function Rs(){}function Ks(){}function Fs(){}function _s(){}function Bs(){}function Hs(){}function Us(){}function Gs(){}function qs(){}function Xs(){}function zs(){}function Vs(){}function Ws(){}function Qs(){}function Js(){}function Ys(){}function Zs(){}function nh(){}function th(){}function eh(){}function ih(){}function rh(){}function ch(){}function ah(){}function oh(){}function uh(){}function sh(){}function hh(){}function fh(){}function lh(){}function bh(){}function wh(){}function dh(){}function gh(){}function ph(){}function mh(){}function vh(){}function kh(){}function yh(){}function Mh(){}function Th(){}function jh(){}function Eh(){}function Sh(){}function Ph(){}function Ch(){}function Ih(){}function Oh(){}function Ah(){}function Lh(){}function Nh(){}function $h(){}function Dh(){}function xh(){}function Rh(){}function Kh(){}function Fh(){}function _h(){}function Bh(){}function Hh(){}function Uh(){}function Gh(){}function qh(){}function Xh(){}function zh(){}function Vh(){}function Wh(){}function Qh(){}function Jh(){}function Yh(){}function Zh(){}function nf(){}function tf(){}function ef(){}function rf(){}function cf(){}function af(){}function of(){}function uf(){}function sf(){}function hf(){}function ff(){}function lf(){}function bf(){}function wf(){}function df(){}function gf(){}function pf(){}function mf(){}function vf(){}function kf(){}function yf(){}function Mf(){}function Tf(){}function jf(){}function Ef(){}function Sf(){}function Pf(){}function Cf(){}function If(){}function Of(){}function Af(){}function Lf(){}function Nf(){}function $f(){}function Df(){}function xf(){}function Rf(n){}function Kf(n){}function Ff(){gy()}function _f(){VS()}function Bf(){MEn()}function Hf(){pbn()}function Uf(){ryn()}function Gf(){oOn()}function qf(){cGn()}function Xf(){yjn()}function zf(){Bjn()}function Vf(){WS()}function Wf(){HB()}function Qf(){QS()}function Jf(){Pun()}function Yf(){F7()}function Zf(){Ean()}function nl(){Y0()}function tl(){Pan()}function el(){Unn()}function il(){Q0()}function rl(){Cln()}function cl(){Ian()}function al(){Can()}function ol(){c6()}function ul(){Oan()}function sl(){jIn()}function hl(){YS()}function fl(){VYn()}function ll(){jYn()}function bl(){Aan()}function wl(){Iun()}function dl(){Z0()}function gl(){Pjn()}function pl(){t2()}function ml(){gUn()}function vl(){eDn()}function kl(){tcn()}function yl(){Kdn()}function Ml(){QGn()}function Tl(){e3()}function jl(){ncn()}function El(){EHn()}function Sl(){jOn()}function Pl(){IHn()}function Cl(){S_n()}function Il(){fIn()}function Ol(){uBn()}function Al(){jMn()}function Ll(){oB()}function Nl(){Stn()}function $l(){lIn()}function Dl(){XYn()}function xl(){Iln()}function Rl(){Wmn()}function Kl(){Oun()}function Fl(){tXn()}function _l(){vGn()}function Bl(n){tJ(n)}function Hl(n){this.a=n}function Ul(n){this.a=n}function Gl(n){this.a=n}function ql(n){this.a=n}function Xl(n){this.a=n}function zl(n){this.a=n}function Vl(n){this.a=n}function Wl(n){this.a=n}function Ql(n){this.a=n}function Jl(n){this.a=n}function Yl(n){this.a=n}function Zl(n){this.a=n}function nb(n){this.a=n}function tb(n){this.a=n}function eb(n){this.a=n}function ib(n){this.a=n}function rb(n){this.a=n}function cb(n){this.a=n}function ab(n){this.a=n}function ob(n){this.a=n}function ub(n){this.a=n}function sb(n){this.a=n}function hb(n){this.b=n}function fb(n){this.c=n}function lb(n){this.a=n}function bb(n){this.a=n}function wb(n){this.a=n}function db(n){this.a=n}function gb(n){this.a=n}function pb(n){this.a=n}function mb(n){this.a=n}function vb(n){this.a=n}function kb(n){this.a=n}function yb(n){this.a=n}function Mb(n){this.a=n}function Tb(n){this.a=n}function jb(n){this.a=n}function Eb(n){this.a=n}function Sb(n){this.a=n}function Pb(n){this.a=n}function Cb(n){this.a=n}function Ib(){this.a=[]}function Ob(n,t){n.a=t}function Ab(n,t){n.a=t}function Lb(n,t){n.b=t}function Nb(n,t){n.b=t}function $b(n,t){n.b=t}function Db(n,t){n.j=t}function xb(n,t){n.g=t}function Rb(n,t){n.i=t}function Kb(n,t){n.c=t}function Fb(n,t){n.c=t}function _b(n,t){n.d=t}function Bb(n,t){n.d=t}function Hb(n,t){n.k=t}function Ub(n,t){n.c=t}function Gb(n,t){n.c=t}function qb(n,t){n.a=t}function Xb(n,t){n.a=t}function zb(n,t){n.f=t}function Vb(n,t){n.a=t}function Wb(n,t){n.b=t}function Qb(n,t){n.d=t}function Jb(n,t){n.i=t}function Yb(n,t){n.o=t}function Zb(n,t){n.r=t}function nw(n,t){n.a=t}function tw(n,t){n.b=t}function ew(n,t){n.e=t}function iw(n,t){n.f=t}function rw(n,t){n.g=t}function cw(n,t){n.e=t}function aw(n,t){n.f=t}function ow(n,t){n.f=t}function uw(n,t){n.a=t}function sw(n,t){n.b=t}function hw(n,t){n.n=t}function fw(n,t){n.a=t}function lw(n,t){n.c=t}function bw(n,t){n.c=t}function ww(n,t){n.c=t}function dw(n,t){n.a=t}function gw(n,t){n.a=t}function pw(n,t){n.d=t}function mw(n,t){n.d=t}function vw(n,t){n.e=t}function kw(n,t){n.e=t}function yw(n,t){n.g=t}function Mw(n,t){n.f=t}function Tw(n,t){n.j=t}function jw(n,t){n.a=t}function Ew(n,t){n.a=t}function Sw(n,t){n.b=t}function Pw(n){n.b=n.a}function Cw(n){n.c=n.d.d}function Iw(n){this.a=n}function Ow(n){this.a=n}function Aw(n){this.a=n}function Lw(n){this.a=n}function Nw(n){this.a=n}function $w(n){this.a=n}function Dw(n){this.a=n}function xw(n){this.a=n}function Rw(n){this.a=n}function Kw(n){this.a=n}function Fw(n){this.a=n}function _w(n){this.a=n}function Bw(n){this.a=n}function Hw(n){this.a=n}function Uw(n){this.b=n}function Gw(n){this.b=n}function qw(n){this.b=n}function Xw(n){this.a=n}function zw(n){this.a=n}function Vw(n){this.c=n}function Ww(n){this.c=n}function Qw(n){this.c=n}function Jw(n){this.d=n}function Yw(n){this.a=n}function Zw(n){this.a=n}function nd(n){this.a=n}function td(n){this.a=n}function ed(n){this.a=n}function id(n){this.a=n}function rd(n){this.a=n}function cd(n){this.a=n}function ad(n){this.a=n}function od(n){this.a=n}function ud(n){this.a=n}function sd(n){this.a=n}function hd(n){this.a=n}function fd(n){this.a=n}function ld(n){this.a=n}function bd(n){this.a=n}function wd(n){this.a=n}function dd(n){this.a=n}function gd(n){this.a=n}function pd(n){this.a=n}function md(n){this.a=n}function vd(n){this.a=n}function kd(n){this.a=n}function yd(n){this.a=n}function Md(n){this.a=n}function Td(n){this.a=n}function jd(n){this.a=n}function Ed(n){this.a=n}function Sd(n){this.a=n}function Pd(n){this.a=n}function Cd(n){this.a=n}function Id(n){this.a=n}function Od(n){this.a=n}function Ad(n){this.a=n}function Ld(n){this.a=n}function Nd(n){this.a=n}function $d(n){this.a=n}function Dd(n){this.a=n}function xd(n){this.a=n}function Rd(n){this.a=n}function Kd(n){this.a=n}function Fd(n){this.a=n}function _d(n){this.a=n}function Bd(n){this.a=n}function Hd(n){this.a=n}function Ud(n){this.a=n}function Gd(n){this.a=n}function qd(n){this.a=n}function Xd(n){this.e=n}function zd(n){this.a=n}function Vd(n){this.a=n}function Wd(n){this.a=n}function Qd(n){this.a=n}function Jd(n){this.a=n}function Yd(n){this.a=n}function Zd(n){this.a=n}function ng(n){this.a=n}function tg(n){this.a=n}function eg(n){this.a=n}function ig(n){this.a=n}function rg(n){this.a=n}function cg(n){this.a=n}function ag(n){this.a=n}function og(n){this.a=n}function ug(n){this.a=n}function sg(n){this.a=n}function hg(n){this.a=n}function fg(n){this.a=n}function lg(n){this.a=n}function bg(n){this.a=n}function wg(n){this.a=n}function dg(n){this.a=n}function gg(n){this.a=n}function pg(n){this.a=n}function mg(n){this.a=n}function vg(n){this.a=n}function kg(n){this.a=n}function yg(n){this.a=n}function Mg(n){this.a=n}function Tg(n){this.a=n}function jg(n){this.a=n}function Eg(n){this.a=n}function Sg(n){this.a=n}function Pg(n){this.a=n}function Cg(n){this.a=n}function Ig(n){this.a=n}function Og(n){this.a=n}function Ag(n){this.a=n}function Lg(n){this.a=n}function Ng(n){this.a=n}function $g(n){this.a=n}function Dg(n){this.a=n}function xg(n){this.a=n}function Rg(n){this.a=n}function Kg(n){this.a=n}function Fg(n){this.a=n}function _g(n){this.a=n}function Bg(n){this.a=n}function Hg(n){this.a=n}function Ug(n){this.a=n}function Gg(n){this.a=n}function qg(n){this.a=n}function Xg(n){this.a=n}function zg(n){this.c=n}function Vg(n){this.b=n}function Wg(n){this.a=n}function Qg(n){this.a=n}function Jg(n){this.a=n}function Yg(n){this.a=n}function Zg(n){this.a=n}function np(n){this.a=n}function tp(n){this.a=n}function ep(n){this.a=n}function ip(n){this.a=n}function rp(n){this.a=n}function cp(n){this.a=n}function ap(n){this.a=n}function op(n){this.a=n}function up(n){this.a=n}function sp(n){this.a=n}function hp(n){this.a=n}function fp(n){this.a=n}function lp(n){this.a=n}function bp(n){this.a=n}function wp(n){this.a=n}function dp(n){this.a=n}function gp(n){this.a=n}function pp(n){this.a=n}function mp(n){this.a=n}function vp(n){this.a=n}function kp(n){this.a=n}function yp(n){this.a=n}function Mp(n){this.a=n}function Tp(n){this.a=n}function jp(n){this.a=n}function Ep(n){this.a=n}function Sp(n){this.a=n}function Pp(n){this.a=n}function Cp(n){this.a=n}function Ip(n){this.a=n}function Op(n){this.a=n}function Ap(n){this.a=n}function Lp(n){this.a=n}function Np(n){this.a=n}function $p(n){this.a=n}function Dp(n){this.a=n}function xp(n){this.a=n}function Rp(n){this.a=n}function Kp(n){this.a=n}function Fp(n){this.a=n}function _p(n){this.a=n}function Bp(n){this.a=n}function Hp(n){this.a=n}function Up(n){this.a=n}function Gp(n){this.a=n}function qp(n){this.a=n}function Xp(n){this.a=n}function zp(n){this.a=n}function Vp(n){this.a=n}function Wp(n){this.a=n}function Qp(n){this.a=n}function Jp(n){this.f=n}function Yp(n){this.a=n}function Zp(n){this.a=n}function nm(n){this.a=n}function tm(n){this.a=n}function em(n){this.a=n}function im(n){this.a=n}function rm(n){this.a=n}function cm(n){this.a=n}function am(n){this.a=n}function om(n){this.a=n}function um(n){this.a=n}function sm(n){this.a=n}function hm(n){this.a=n}function fm(n){this.a=n}function lm(n){this.a=n}function bm(n){this.a=n}function wm(n){this.a=n}function dm(n){this.a=n}function gm(n){this.a=n}function pm(n){this.a=n}function mm(n){this.a=n}function vm(n){this.a=n}function km(n){this.a=n}function ym(n){this.a=n}function Mm(n){this.a=n}function Tm(n){this.a=n}function jm(n){this.a=n}function Em(n){this.a=n}function Sm(n){this.a=n}function Pm(n){this.a=n}function Cm(n){this.b=n}function Im(n){this.a=n}function Om(n){this.a=n}function Am(n){this.a=n}function Lm(n){this.a=n}function Nm(n){this.a=n}function $m(n){this.a=n}function Dm(n){this.a=n}function xm(n){this.b=n}function Rm(n){this.a=n}function Km(n){this.a=n}function Fm(n){this.a=n}function _m(n){this.a=n}function Bm(n){this.c=n}function Hm(n){this.e=n}function Um(n){this.a=n}function Gm(n){this.a=n}function qm(n){this.a=n}function Xm(n){this.d=n}function zm(n){this.a=n}function Vm(n){this.a=n}function Wm(n){this.a=n}function Qm(n){this.e=n}function Jm(){this.a=0}function Ym(){$V(this)}function Zm(){IN(this)}function nv(){XQ(this)}function tv(){Rf(this)}function ev(){this.c=nBt}function iv(n,t){n.b+=t}function rv(n,t){t.Wb(n)}function cv(n){return n.a}function av(n){return n.a}function ov(n){return n.a}function uv(n){return n.a}function sv(n){return n.a}function hv(n){return n.e}function fv(){return null}function lv(){return null}function bv(){mj(),xJn()}function wv(n){n.b.Of(n.e)}function dv(n){n.b=new rT}function gv(n,t){n.b=t-n.b}function pv(n,t){n.a=t-n.a}function mv(n,t){n.push(t)}function vv(n,t){n.sort(t)}function kv(n,t){t.jd(n.a)}function yv(n,t){NLn(t,n)}function Mv(n,t,e){n.Yd(e,t)}function Tv(n,t){n.e=t,t.b=n}function jv(n){sB(),this.a=n}function Ev(n){sB(),this.a=n}function Sv(n){sB(),this.a=n}function Pv(n){ZW(),this.a=n}function Cv(n){EZ(),_at.le(n)}function Iv(){Iv=E,new Ym}function Ov(){vx.call(this)}function Av(){vx.call(this)}function Lv(){Ov.call(this)}function Nv(){Ov.call(this)}function $v(){Ov.call(this)}function Dv(){Ov.call(this)}function xv(){Ov.call(this)}function Rv(){Ov.call(this)}function Kv(){Ov.call(this)}function Fv(){Ov.call(this)}function _v(){Ov.call(this)}function Bv(){Ov.call(this)}function Hv(){Ov.call(this)}function Uv(){this.a=this}function Gv(){this.Bb|=256}function qv(){this.b=new hL}function Xv(n,t){n.length=t}function zv(n,t){kD(n.a,t)}function Vv(n,t){LOn(n.c,t)}function Wv(n,t){FV(n.b,t)}function Qv(n,t){bMn(n.a,t)}function Jv(n,t){Vdn(n.a,t)}function Yv(n,t){Msn(n.e,t)}function Zv(n){C$n(n.c,n.b)}function nk(n,t){n.kc().Nb(t)}function tk(n){this.a=Agn(n)}function ek(){this.a=new Ym}function ik(){this.a=new Ym}function rk(){this.a=new hS}function ck(){this.a=new Zm}function ak(){this.a=new Zm}function ok(){this.a=new Zm}function uk(){this.a=new kn}function sk(){this.a=new g7}function hk(){this.a=new lt}function fk(){this.a=new V0}function lk(){this.a=new NF}function bk(){this.a=new Zm}function wk(){this.a=new Zm}function dk(){this.a=new Zm}function gk(){this.a=new Zm}function pk(){this.d=new Zm}function mk(){this.a=new i4}function vk(){this.a=new ek}function kk(){this.a=new Ym}function yk(){this.b=new Ym}function Mk(){this.b=new Zm}function Tk(){this.e=new Zm}function jk(){this.a=new sl}function Ek(){this.d=new Zm}function Sk(){BZ.call(this)}function Pk(){BZ.call(this)}function Ck(){Zm.call(this)}function Ik(){Lv.call(this)}function Ok(){ck.call(this)}function Ak(){HF.call(this)}function Lk(){gk.call(this)}function Nk(){tv.call(this)}function $k(){Nk.call(this)}function Dk(){tv.call(this)}function xk(){Dk.call(this)}function Rk(){oy.call(this)}function Kk(){oy.call(this)}function Fk(){oy.call(this)}function _k(){hy.call(this)}function Bk(){ts.call(this)}function Hk(){ts.call(this)}function Uk(){lS.call(this)}function Gk(){wy.call(this)}function qk(){wy.call(this)}function Xk(){Ym.call(this)}function zk(){Ym.call(this)}function Vk(){Ym.call(this)}function Wk(){Kan.call(this)}function Qk(){ek.call(this)}function Jk(){Gv.call(this)}function Yk(){$D.call(this)}function Zk(){Ym.call(this)}function ny(){$D.call(this)}function ty(){Ym.call(this)}function ey(){Ym.call(this)}function iy(){ps.call(this)}function ry(){iy.call(this)}function cy(){ps.call(this)}function ay(){$f.call(this)}function oy(){this.a=new ek}function uy(){this.a=new Ym}function sy(){this.a=new Zm}function hy(){this.a=new Ym}function fy(){this.a=new lS}function ly(){this.j=new Zm}function by(){this.a=new zj}function wy(){this.a=new gs}function dy(){this.a=new Do}function gy(){gy=E,wat=new c}function py(){py=E,Mat=new ky}function my(){my=E,Tat=new vy}function vy(){ib.call(this,"")}function ky(){ib.call(this,"")}function yy(n){Arn.call(this,n)}function My(n){Arn.call(this,n)}function Ty(n){Ql.call(this,n)}function jy(n){HE.call(this,n)}function Ey(n){HE.call(this,n)}function Sy(n){jy.call(this,n)}function Py(n){jy.call(this,n)}function Cy(n){jy.call(this,n)}function Iy(n){c8.call(this,n)}function Oy(n){c8.call(this,n)}function Ay(n){K_.call(this,n)}function Ly(n){XE.call(this,n)}function Ny(n){WE.call(this,n)}function $y(n){WE.call(this,n)}function Dy(n){WE.call(this,n)}function xy(n){cOn.call(this,n)}function Ry(n){xy.call(this,n)}function Ky(n){Uz.call(this,n)}function Fy(n){Ky.call(this,n)}function _y(){Cb.call(this,{})}function By(){By=E,Vat=new T}function Hy(){Hy=E,Iat=new X$}function Uy(){Uy=E,Dat=new r}function Gy(){Gy=E,Fat=new p}function qy(){qy=E,Hat=new k}function Xy(n){UD(),this.a=n}function zy(n){Cun(),this.a=n}function Vy(n){rz(),this.f=n}function Wy(n){rz(),this.f=n}function Qy(n){aB(),this.a=n}function Jy(n){n.b=null,n.c=0}function Yy(n,t){n.e=t,yFn(n,t)}function Zy(n,t){n.a=t,WAn(n)}function nM(n,t,e){n.a[t.g]=e}function tM(n,t,e){nSn(e,n,t)}function eM(n,t){F_(t.i,n.n)}function iM(n,t){yln(n).Cd(t)}function rM(n,t){n.a.ec().Mc(t)}function cM(n,t){return n.g-t.g}function aM(n,t){return n*n/t}function oM(n){return tJ(n),n}function uM(n){return tJ(n),n}function sM(n){return tJ(n),n}function hM(n){return new Pb(n)}function fM(n){return new QW(n)}function lM(n){return tJ(n),n}function bM(n){return tJ(n),n}function wM(n){Ky.call(this,n)}function dM(n){Ky.call(this,n)}function gM(n){Ky.call(this,n)}function pM(n){Uz.call(this,n)}function mM(n){Ky.call(this,n)}function vM(n){Ky.call(this,n)}function kM(n){Ky.call(this,n)}function yM(n){Ky.call(this,n)}function MM(n){Ky.call(this,n)}function TM(n){Ky.call(this,n)}function jM(n){Ky.call(this,n)}function EM(n){Ky.call(this,n)}function SM(n){Ky.call(this,n)}function PM(n){Ky.call(this,n)}function CM(n){Ky.call(this,n)}function IM(n){tJ(n),this.a=n}function OM(n){return hln(n),n}function AM(n){zV(n,n.length)}function LM(n){return n.b==n.c}function NM(n){return!!n&&n.b}function $M(n){return!!n&&n.k}function DM(n){return!!n&&n.j}function xM(n,t,e){n.c.Ef(t,e)}function RM(n,t){n.be(t),t.ae(n)}function KM(n){sB(),this.a=WW(n)}function FM(){this.a=mK(WW(TZn))}function _M(){throw hv(new Kv)}function BM(){throw hv(new Kv)}function HM(){throw hv(new Kv)}function UM(){throw hv(new Kv)}function GM(){throw hv(new Kv)}function qM(){throw hv(new Kv)}function XM(){XM=E,EZ()}function zM(){$w.call(this,"")}function VM(){$w.call(this,"")}function WM(){$w.call(this,"")}function QM(){$w.call(this,"")}function JM(n){dM.call(this,n)}function YM(n){dM.call(this,n)}function ZM(n){vM.call(this,n)}function nT(n){qw.call(this,n)}function tT(n){nT.call(this,n)}function eT(n){gx.call(this,n)}function iT(n){Qx.call(this,n,0)}function rT(){L2.call(this,12,3)}function cT(n,t){return B0(n,t)}function aT(n,t){return Ltn(n,t)}function oT(n,t){return n.a-t.a}function uT(n,t){return n.a-t.a}function sT(n,t){return n.a-t.a}function hT(n,t){return t in n.a}function fT(n){return n.a?n.b:0}function lT(n){return n.a?n.b:0}function bT(n,t,e){t.Cd(n.a[e])}function wT(n,t,e){t.Pe(n.a[e])}function dT(n,t){n.b=new eN(t)}function gT(n,t){return n.b=t,n}function pT(n,t){return n.c=t,n}function mT(n,t){return n.f=t,n}function vT(n,t){return n.g=t,n}function kT(n,t){return n.a=t,n}function yT(n,t){return n.f=t,n}function MT(n,t){return n.k=t,n}function TT(n,t){return n.a=t,n}function jT(n,t){return n.e=t,n}function ET(n,t){return n.e=t,n}function ST(n,t){return n.f=t,n}function PT(n,t){n.b=!0,n.d=t}function CT(n,t){return n.b-t.b}function IT(n,t){return n.g-t.g}function OT(n,t){return n?0:t-1}function AT(n,t){return n?0:t-1}function LT(n,t){return n?t-1:0}function NT(n,t){return n.s-t.s}function $T(n,t){return t.rg(n)}function DT(n,t){return n.b=t,n}function xT(n,t){return n.a=t,n}function RT(n,t){return n.c=t,n}function KT(n,t){return n.d=t,n}function FT(n,t){return n.e=t,n}function _T(n,t){return n.f=t,n}function BT(n,t){return n.a=t,n}function HT(n,t){return n.b=t,n}function UT(n,t){return n.c=t,n}function GT(n,t){return n.c=t,n}function qT(n,t){return n.b=t,n}function XT(n,t){return n.d=t,n}function zT(n,t){return n.e=t,n}function VT(n,t){return n.f=t,n}function WT(n,t){return n.g=t,n}function QT(n,t){return n.a=t,n}function JT(n,t){return n.i=t,n}function YT(n,t){return n.j=t,n}function ZT(n,t){jIn(),o2(t,n)}function nj(n,t,e){az(n.a,t,e)}function tj(n){Y_.call(this,n)}function ej(n){dpn.call(this,n)}function ij(n){TY.call(this,n)}function rj(n){TY.call(this,n)}function cj(n){Drn.call(this,n)}function aj(n){HY.call(this,n)}function oj(n){HY.call(this,n)}function uj(){S$.call(this,"")}function sj(){this.a=0,this.b=0}function hj(){this.b=0,this.a=0}function fj(n,t){n.b=0,Ccn(n,t)}function lj(n,t){return n.k=t,n}function bj(n,t){return n.j=t,n}function wj(n,t){n.c=t,n.b=!0}function dj(){dj=E,rut=ePn()}function gj(){gj=E,xKt=AEn()}function pj(){pj=E,RKt=VPn()}function mj(){mj=E,NFt=aan()}function vj(){vj=E,y_t=LEn()}function kj(){kj=E,xBt=NEn()}function yj(){yj=E,RBt=qAn()}function Mj(n){return n.e&&n.e()}function Tj(n){return n.l|n.m<<22}function jj(n,t){return n.c._b(t)}function Ej(n,t){return Uwn(n.b,t)}function Sj(n){return n?n.d:null}function Pj(n){return n?n.g:null}function Cj(n){return n?n.i:null}function Ij(n){return vK(n),n.o}function Oj(n,t){return n.a+=t,n}function Aj(n,t){return n.a+=t,n}function Lj(n,t){return n.a+=t,n}function Nj(n,t){return n.a+=t,n}function $j(n,t){for(;n.Bd(t););}function Dj(n){this.a=new sS(n)}function xj(){throw hv(new Kv)}function Rj(){throw hv(new Kv)}function Kj(){throw hv(new Kv)}function Fj(){throw hv(new Kv)}function _j(){throw hv(new Kv)}function Bj(){throw hv(new Kv)}function Hj(n){this.a=new Hz(n)}function Uj(){this.a=new mKn(iIt)}function Gj(){this.b=new mKn(ZSt)}function qj(){this.a=new mKn(dOt)}function Xj(){this.b=new mKn(VAt)}function zj(){this.b=new mKn(VAt)}function Vj(n){this.a=0,this.b=n}function Wj(n){CQn(),uYn(this,n)}function Qj(n){return GQ(n),n.a}function Jj(n){return n.b!=n.d.c}function Yj(n,t){return n.d[t.p]}function Zj(n,t){return vFn(n,t)}function nE(n,t,e){n.splice(t,e)}function tE(n,t){for(;n.Re(t););}function eE(n){n.c?P_n(n):C_n(n)}function iE(){throw hv(new Kv)}function rE(){throw hv(new Kv)}function cE(){throw hv(new Kv)}function aE(){throw hv(new Kv)}function oE(){throw hv(new Kv)}function uE(){throw hv(new Kv)}function sE(){throw hv(new Kv)}function hE(){throw hv(new Kv)}function fE(){throw hv(new Kv)}function lE(){throw hv(new Kv)}function bE(){throw hv(new Bv)}function wE(){throw hv(new Bv)}function dE(n){this.a=new gE(n)}function gE(n){Zan(this,n,fOn())}function pE(n){return!n||FQ(n)}function mE(n){return-1!=dHt[n]}function vE(){0!=Uat&&(Uat=0),qat=-1}function kE(){null==hZn&&(hZn=[])}function yE(n,t){RD.call(this,n,t)}function ME(n,t){yE.call(this,n,t)}function TE(n,t){this.a=n,this.b=t}function jE(n,t){this.a=n,this.b=t}function EE(n,t){this.a=n,this.b=t}function SE(n,t){this.a=n,this.b=t}function PE(n,t){this.a=n,this.b=t}function CE(n,t){this.a=n,this.b=t}function IE(n,t){this.a=n,this.b=t}function OE(n,t){this.e=n,this.d=t}function AE(n,t){this.b=n,this.c=t}function LE(n,t){this.b=n,this.a=t}function NE(n,t){this.b=n,this.a=t}function $E(n,t){this.b=n,this.a=t}function DE(n,t){this.b=n,this.a=t}function xE(n,t){this.a=n,this.b=t}function RE(n,t){this.a=n,this.b=t}function KE(n,t){this.a=n,this.f=t}function FE(n,t){this.g=n,this.i=t}function _E(n,t){this.f=n,this.g=t}function BE(n,t){this.b=n,this.c=t}function HE(n){FD(n.dc()),this.c=n}function UE(n,t){this.a=n,this.b=t}function GE(n,t){this.a=n,this.b=t}function qE(n){this.a=uG(WW(n),15)}function XE(n){this.a=uG(WW(n),15)}function zE(n){this.a=uG(WW(n),85)}function VE(n){this.b=uG(WW(n),85)}function WE(n){this.b=uG(WW(n),51)}function QE(){this.q=new e.Date}function JE(n,t){this.a=n,this.b=t}function YE(n,t){return PV(n.b,t)}function ZE(n,t){return n.b.Hc(t)}function nS(n,t){return n.b.Ic(t)}function tS(n,t){return n.b.Qc(t)}function eS(n,t){return n.b.Hc(t)}function iS(n,t){return n.c.uc(t)}function rS(n,t){return udn(n.c,t)}function cS(n,t){return n.a._b(t)}function aS(n,t){return n>t&&t<d1n}function oS(n){return n.f.c+n.i.c}function uS(n){return xW(),n?zat:Xat}function sS(n){Nfn.call(this,n,0)}function hS(){Hz.call(this,null)}function fS(n){this.c=n,Sin(this)}function lS(){O$(this),BY(this)}function bS(){bS=E,Eot=new S}function wS(){wS=E,Qot=new I}function dS(){dS=E,hut=new uL}function gS(){gS=E,fut=new sL}function pS(){pS=E,Eut=new U}function mS(){Fnn.call(this,null)}function vS(){vS=E,Kut=new sn}function kS(n,t){GQ(n),n.a.Nb(t)}function yS(n,t){return n.a.Xc(t)}function MS(n,t){return n.a.Yc(t)}function TS(n,t){return n.a.$c(t)}function jS(n,t){return n.a._c(t)}function ES(n,t){return n.Gc(t),n}function SS(n,t){return Qon(n,t),n}function PS(n,t){V$n(gZ(n.a),t)}function CS(n,t){V$n(gZ(n.a),t)}function IS(n,t){return n.Gc(t),n}function OS(n,t){return n.a.f=t,n}function AS(n,t){return n.a.d=t,n}function LS(n,t){return n.a.g=t,n}function NS(n,t){return n.a.j=t,n}function $S(n,t){return n.a.a=t,n}function DS(n,t){return n.a.d=t,n}function xS(n,t){return n.a.e=t,n}function RS(n,t){return n.a.g=t,n}function KS(n,t){return n.a.f=t,n}function FS(n){return n.b=!1,n}function _S(){_S=E,Uut=new wn}function BS(){BS=E,Kht=new qR}function HS(){HS=E,Olt=new wt}function US(){US=E,Alt=new Mt}function GS(){GS=E,Dlt=new nz}function qS(){qS=E,Qlt=new St}function XS(){XS=E,cbt=new Rt}function zS(){zS=E,ubt=new Kt}function VS(){VS=E,Cbt=new be}function WS(){WS=E,Pbt=new sj}function QS(){QS=E,Bwt=new Je}function JS(){JS=E,idt=new Nr}function YS(){YS=E,Fdt=new rc}function ZS(){ZS=E,VTt=new Gu}function nP(){nP=E,zAt=new rP}function tP(){tP=E,QAt=new GR}function eP(){eP=E,GLt=new pJ}function iP(){San(),this.c=new rT}function rP(){_E.call(this,R6n,0)}function cP(n,t,e){r2(n.d,t.f,e)}function aP(n,t,e,i){xyn(n,i,t,e)}function oP(n,t,e,i){QRn(i,n,t,e)}function uP(n,t,e,i){jQn(i,n,t,e)}function sP(n,t){Akn(n.c.c,t.b,t)}function hP(n,t){Akn(n.c.b,t.c,t)}function fP(n){return n.e.b+n.f.b}function lP(n){return n.e.a+n.f.a}function bP(n){return n.b?n.b:n.a}function wP(n){return(n.c+n.a)/2}function dP(n,t){return Fjn(n.a,t)}function gP(n,t){return n.a=t.g,n}function pP(){pP=E,k_t=new ey}function mP(){mP=E,b_t=new Vk}function vP(){vP=E,NKt=new qu}function kP(){kP=E,WKt=new os}function yP(){yP=E,r_t=new zk}function MP(){MP=E,l_t=new Zk}function TP(){TP=E,_Ft=new Ym}function jP(){jP=E,tBt=new G$}function EP(){EP=E,eBt=new q$}function SP(){SP=E,EBt=new Ah}function PP(){PP=E,PBt=new Lh}function CP(){CP=E,XHt=new xf}function IP(){IP=E,gBt=new Zm}function OP(n){return uG(n,44).ld()}function AP(n){return n.b<n.d.gc()}function LP(n,t){return t.split(n)}function NP(n,t){return dwn(n,t)>0}function $P(n,t){return dwn(n,t)<0}function DP(n,t){return RX(n.a,t)}function xP(n,t){U0.call(this,n,t)}function RP(n){nQ(),K_.call(this,n)}function KP(n,t){zX(n,n.length,t)}function FP(n,t){dW(n,n.length,t)}function _P(n,t){return n.a.get(t)}function BP(n,t){return PV(n.e,t)}function HP(n){return tJ(n),!1}function UP(n){this.a=uG(WW(n),229)}function GP(n){h3.call(this,n,21)}function qP(n,t){_E.call(this,n,t)}function XP(n,t){_E.call(this,n,t)}function zP(n,t){this.b=n,this.a=t}function VP(n,t){this.d=n,this.e=t}function WP(n,t){this.a=n,this.b=t}function QP(n,t){this.a=n,this.b=t}function JP(n,t){this.a=n,this.b=t}function YP(n,t){this.a=n,this.b=t}function ZP(n,t){this.a=n,this.b=t}function nC(n,t){this.b=n,this.a=t}function tC(n,t){this.b=n,this.a=t}function eC(n,t){_E.call(this,n,t)}function iC(n,t){_E.call(this,n,t)}function rC(n,t){_E.call(this,n,t)}function cC(n,t){_E.call(this,n,t)}function aC(n,t){_E.call(this,n,t)}function oC(n,t){_E.call(this,n,t)}function uC(n,t){_E.call(this,n,t)}function sC(n,t){this.b=n,this.a=t}function hC(n,t){_E.call(this,n,t)}function fC(n,t){this.b=n,this.a=t}function lC(n,t){_E.call(this,n,t)}function bC(n,t){this.b=n,this.a=t}function wC(n,t){_E.call(this,n,t)}function dC(n,t){_E.call(this,n,t)}function gC(n,t){_E.call(this,n,t)}function pC(n,t,e){n.splice(t,0,e)}function mC(n,t,e){n.Mb(e)&&t.Cd(e)}function vC(n,t,e){t.Pe(n.a.Ye(e))}function kC(n,t,e){t.Dd(n.a.Ze(e))}function yC(n,t,e){t.Cd(n.a.Kb(e))}function MC(n,t){return $x(n.c,t)}function TC(n,t){return $x(n.e,t)}function jC(n,t){_E.call(this,n,t)}function EC(n,t){_E.call(this,n,t)}function SC(n,t){_E.call(this,n,t)}function PC(n,t){_E.call(this,n,t)}function CC(n,t){_E.call(this,n,t)}function IC(n,t){_E.call(this,n,t)}function OC(n,t){this.a=n,this.b=t}function AC(n,t){this.a=n,this.b=t}function LC(n,t){this.a=n,this.b=t}function NC(n,t){this.a=n,this.b=t}function $C(n,t){this.a=n,this.b=t}function DC(n,t){this.a=n,this.b=t}function xC(n,t){this.b=n,this.a=t}function RC(n,t){this.b=n,this.a=t}function KC(n,t){this.b=n,this.a=t}function FC(n,t){this.c=n,this.d=t}function _C(n,t){this.e=n,this.d=t}function BC(n,t){this.a=n,this.b=t}function HC(n,t){this.a=n,this.b=t}function UC(n,t){this.a=n,this.b=t}function GC(n,t){this.b=n,this.a=t}function qC(n,t){this.b=t,this.c=n}function XC(n,t){_E.call(this,n,t)}function zC(n,t){_E.call(this,n,t)}function VC(n,t){_E.call(this,n,t)}function WC(n,t){_E.call(this,n,t)}function QC(n,t){_E.call(this,n,t)}function JC(n,t){_E.call(this,n,t)}function YC(n,t){_E.call(this,n,t)}function ZC(n,t){_E.call(this,n,t)}function nI(n,t){_E.call(this,n,t)}function tI(n,t){_E.call(this,n,t)}function eI(n,t){_E.call(this,n,t)}function iI(n,t){_E.call(this,n,t)}function rI(n,t){_E.call(this,n,t)}function cI(n,t){_E.call(this,n,t)}function aI(n,t){_E.call(this,n,t)}function oI(n,t){_E.call(this,n,t)}function uI(n,t){_E.call(this,n,t)}function sI(n,t){_E.call(this,n,t)}function hI(n,t){_E.call(this,n,t)}function fI(n,t){_E.call(this,n,t)}function lI(n,t){_E.call(this,n,t)}function bI(n,t){_E.call(this,n,t)}function wI(n,t){_E.call(this,n,t)}function dI(n,t){_E.call(this,n,t)}function gI(n,t){_E.call(this,n,t)}function pI(n,t){_E.call(this,n,t)}function mI(n,t){_E.call(this,n,t)}function vI(n,t){_E.call(this,n,t)}function kI(n,t){_E.call(this,n,t)}function yI(n,t){_E.call(this,n,t)}function MI(n,t){_E.call(this,n,t)}function TI(n,t){_E.call(this,n,t)}function jI(n,t){_E.call(this,n,t)}function EI(n,t){this.b=n,this.a=t}function SI(n,t){_E.call(this,n,t)}function PI(n,t){this.a=n,this.b=t}function CI(n,t){this.a=n,this.b=t}function II(n,t){this.a=n,this.b=t}function OI(n,t){_E.call(this,n,t)}function AI(n,t){_E.call(this,n,t)}function LI(n,t){this.a=n,this.b=t}function NI(n,t){return PU(),t!=n}function $I(n){return MK(n.a),n.b}function DI(n){return K$n(n,n.c),n}function xI(){return dj(),new rut}function RI(){UB(),this.a=new xF}function KI(){oFn(),this.a=new ek}function FI(){e2(),this.b=new ek}function _I(n,t){this.b=n,this.d=t}function BI(n,t){this.a=n,this.b=t}function HI(n,t){this.a=n,this.b=t}function UI(n,t){this.a=n,this.b=t}function GI(n,t){this.b=n,this.a=t}function qI(n,t){_E.call(this,n,t)}function XI(n,t){_E.call(this,n,t)}function zI(n,t){_E.call(this,n,t)}function VI(n,t){_E.call(this,n,t)}function WI(n,t){_E.call(this,n,t)}function QI(n,t){_E.call(this,n,t)}function JI(n,t){_E.call(this,n,t)}function YI(n,t){_E.call(this,n,t)}function ZI(n,t){_E.call(this,n,t)}function nO(n,t){_E.call(this,n,t)}function tO(n,t){_E.call(this,n,t)}function eO(n,t){_E.call(this,n,t)}function iO(n,t){_E.call(this,n,t)}function rO(n,t){_E.call(this,n,t)}function cO(n,t){_E.call(this,n,t)}function aO(n,t){_E.call(this,n,t)}function oO(n,t){_E.call(this,n,t)}function uO(n,t){_E.call(this,n,t)}function sO(n,t){_E.call(this,n,t)}function hO(n,t){_E.call(this,n,t)}function fO(n,t){_E.call(this,n,t)}function lO(n,t){_E.call(this,n,t)}function bO(n,t){_E.call(this,n,t)}function wO(n,t){_E.call(this,n,t)}function dO(n,t){this.b=n,this.a=t}function gO(n,t){this.b=n,this.a=t}function pO(n,t){this.b=n,this.a=t}function mO(n,t){this.b=n,this.a=t}function vO(n,t){this.a=n,this.b=t}function kO(n,t){this.a=n,this.b=t}function yO(n,t){this.a=n,this.b=t}function MO(n,t){this.a=n,this.b=t}function TO(n,t){_E.call(this,n,t)}function jO(n,t){_E.call(this,n,t)}function EO(n,t){_E.call(this,n,t)}function SO(n,t){_E.call(this,n,t)}function PO(n,t){_E.call(this,n,t)}function CO(n,t){_E.call(this,n,t)}function IO(n,t){_E.call(this,n,t)}function OO(n,t){_E.call(this,n,t)}function AO(n,t){_E.call(this,n,t)}function LO(n,t){_E.call(this,n,t)}function NO(n,t){_E.call(this,n,t)}function $O(n,t){_E.call(this,n,t)}function DO(n,t){_E.call(this,n,t)}function xO(n,t){_E.call(this,n,t)}function RO(n,t){_E.call(this,n,t)}function KO(n,t){_E.call(this,n,t)}function FO(n,t){_E.call(this,n,t)}function _O(n,t){_E.call(this,n,t)}function BO(n,t){_E.call(this,n,t)}function HO(n,t){_E.call(this,n,t)}function UO(n,t){this.a=n,this.b=t}function GO(n,t){this.a=n,this.b=t}function qO(n,t){this.a=n,this.b=t}function XO(n,t){this.a=n,this.b=t}function zO(n,t){this.a=n,this.b=t}function VO(n,t){this.a=n,this.b=t}function WO(n,t){this.a=n,this.b=t}function QO(n,t){this.a=n,this.b=t}function JO(n,t){this.a=n,this.b=t}function YO(n,t){this.a=n,this.b=t}function ZO(n,t){this.a=n,this.b=t}function nA(n,t){this.a=n,this.b=t}function tA(n,t){this.a=n,this.b=t}function eA(n,t){this.b=n,this.a=t}function iA(n,t){this.b=n,this.a=t}function rA(n,t){this.b=n,this.a=t}function cA(n,t){this.b=n,this.a=t}function aA(n,t){this.a=n,this.b=t}function oA(n,t){this.a=n,this.b=t}function uA(n,t){_E.call(this,n,t)}function sA(n,t){this.a=n,this.b=t}function hA(n,t){this.a=n,this.b=t}function fA(n,t){_E.call(this,n,t)}function lA(n,t){this.f=n,this.c=t}function bA(n,t){return $x(n.g,t)}function wA(n,t){return $x(t.b,n)}function dA(n,t){return ymn(n.a,t)}function gA(n,t){return-n.b.af(t)}function pA(n,t){n&&vJ(AFt,n,t)}function mA(n,t){n.i=null,lon(n,t)}function vA(n,t,e){MSn(t,jAn(n,e))}function kA(n,t,e){MSn(t,jAn(n,e))}function yA(n,t){BRn(n.a,uG(t,58))}function MA(n,t){aen(n.a,uG(t,12))}function TA(n,t){this.a=n,this.b=t}function jA(n,t){this.a=n,this.b=t}function EA(n,t){this.a=n,this.b=t}function SA(n,t){this.a=n,this.b=t}function PA(n,t){this.a=n,this.b=t}function CA(n,t){this.d=n,this.b=t}function IA(n,t){this.e=n,this.a=t}function OA(n,t){this.b=n,this.c=t}function AA(n,t){this.i=n,this.g=t}function LA(n,t){this.d=n,this.e=t}function NA(n,t){Iin(new DD(n),t)}function $A(n){return kmn(n.c,n.b)}function DA(n){return n?n.md():null}function xA(n){return null==n?null:n}function RA(n){return typeof n===pZn}function KA(n){return typeof n===dZn}function FA(n){return typeof n===gZn}function _A(n,t){return 0==dwn(n,t)}function BA(n,t){return dwn(n,t)>=0}function HA(n,t){return 0!=dwn(n,t)}function UA(n,t){return Zun(n.Kc(),t)}function GA(n,t){return n.Rd().Xb(t)}function qA(n){return bpn(n),n.d.gc()}function XA(n){return Fq(null==n),n}function zA(n,t){return n.a+=""+t,n}function VA(n,t){return n.a+=""+t,n}function WA(n,t){return n.a+=""+t,n}function QA(n,t){return n.a+=""+t,n}function JA(n,t){return n.a+=""+t,n}function YA(n,t){return n.a+=""+t,n}function ZA(n){return""+(tJ(n),n)}function nL(n){$V(this),xun(this,n)}function tL(){J0(),ez.call(this)}function eL(n,t){Bz.call(this,n,t)}function iL(n,t){Bz.call(this,n,t)}function rL(n,t){Bz.call(this,n,t)}function cL(n,t){s8(n,t,n.c.b,n.c)}function aL(n,t){s8(n,t,n.a,n.a.a)}function oL(n){return u3(n,0),null}function uL(){this.b=0,this.a=!1}function sL(){this.b=0,this.a=!1}function hL(){this.b=new sS(orn(12))}function fL(){fL=E,fht=Abn(Nkn())}function lL(){lL=E,_wt=Abn(bKn())}function bL(){bL=E,bPt=Abn(usn())}function wL(){wL=E,Iv(),Bat=new Ym}function dL(n){return n.a=0,n.b=0,n}function gL(n,t){return n.a=t.g+1,n}function pL(n,t){w_.call(this,n,t)}function mL(n,t){uF.call(this,n,t)}function vL(n,t){AA.call(this,n,t)}function kL(n,t){zx.call(this,n,t)}function yL(n,t){Zsn.call(this,n,t)}function ML(n,t){TP(),vJ(_Ft,n,t)}function TL(n,t){n.q.setTime(W4(t))}function jL(n){e.clearTimeout(n)}function EL(n){return WW(n),new iN(n)}function SL(n,t){return xA(n)===xA(t)}function PL(n,t){return n.a.a.a.cc(t)}function CL(n,t){return r1(n.a,0,t)}function IL(n){return jW(uG(n,74))}function OL(n){return t0((tJ(n),n))}function AL(n){return t0((tJ(n),n))}function LL(n){return p$(n.l,n.m,n.h)}function NL(n,t){return d$(n.a,t.a)}function $L(n,t){return rW(n.a,t.a)}function DL(n,t){return ugn(n.a,t.a)}function xL(n,t){return n.indexOf(t)}function RL(n,t){return 2==n.j[t.p]}function KL(n,t){return n==t?0:n?1:-1}function FL(n){return n<10?"0"+n:""+n}function _L(n){return typeof n===gZn}function BL(n){return n==Flt||n==Hlt}function HL(n){return n==Flt||n==_lt}function UL(n,t){return d$(n.g,t.g)}function GL(n){return Ten(n.b.b,n,0)}function qL(){lX.call(this,0,0,0,0)}function XL(){td.call(this,new u8)}function zL(n,t){Ntn(n,0,n.length,t)}function VL(n,t){return kD(n.a,t),t}function WL(n,t){return GB(),t.a+=n}function QL(n,t){return GB(),t.a+=n}function JL(n,t){return GB(),t.c+=n}function YL(n,t){return kD(n.c,t),n}function ZL(n,t){return gsn(n.a,t),n}function nN(n){this.a=xI(),this.b=n}function tN(n){this.a=xI(),this.b=n}function eN(n){this.a=n.a,this.b=n.b}function iN(n){this.a=n,Ff.call(this)}function rN(n){this.a=n,Ff.call(this)}function cN(){gY.call(this,0,0,0,0)}function aN(n){return gsn(new wJ,n)}function oN(n){return xJ(uG(n,123))}function uN(n){return n.vh()&&n.wh()}function sN(n){return n!=uRt&&n!=sRt}function hN(n){return n==JDt||n==YDt}function fN(n){return n==nxt||n==QDt}function lN(n){return n==wjt||n==bjt}function bN(n,t){return d$(n.g,t.g)}function wN(n,t){return new Zsn(t,n)}function dN(n,t){return new Zsn(t,n)}function gN(n){return nG(n.b.Kc(),n.a)}function pN(n,t){sbn(n,t),Ocn(n,n.D)}function mN(n,t,e){Scn(n,t),pcn(n,e)}function vN(n,t,e){kcn(n,t),vcn(n,e)}function kN(n,t,e){ycn(n,t),Mcn(n,e)}function yN(n,t,e){mcn(n,t),jcn(n,e)}function MN(n,t,e){Tcn(n,t),Ecn(n,e)}function TN(n,t,e){AK.call(this,n,t,e)}function jN(n){lA.call(this,n,!0)}function EN(){qP.call(this,"Tail",3)}function SN(){qP.call(this,"Head",1)}function PN(n){cHn(),Bun.call(this,n)}function CN(n){lX.call(this,n,n,n,n)}function IN(n){n.c=Inn(dat,EZn,1,0,5,1)}function ON(n){return n.b&&sXn(n),n.a}function AN(n){return n.b&&sXn(n),n.c}function LN(n,t){Nut||(n.b=t)}function NN(n,t){return n[n.length]=t}function $N(n,t){return n[n.length]=t}function DN(n,t){return Ern(t,h0(n))}function xN(n,t){return Ern(t,h0(n))}function RN(n,t){return kan(UW(n.d),t)}function KN(n,t){return kan(UW(n.g),t)}function FN(n,t){return kan(UW(n.j),t)}function _N(n,t){uF.call(this,n.b,t)}function BN(n,t){ttn(z5(n.a),v2(t))}function HN(n,t){ttn(Aen(n.a),k2(t))}function UN(n,t,e){kN(e,e.i+n,e.j+t)}function GN(n,t,e){uQ(n.c[t.g],t.g,e)}function qN(n,t,e){uG(n.c,71).Gi(t,e)}function XN(n,t,e){return uQ(n,t,e),e}function zN(n){Prn(n.Sf(),new Od(n))}function VN(n){return null!=n?Hon(n):0}function WN(n){return null==n?0:Hon(n)}function QN(n){QYn(),Qm.call(this,n)}function JN(n){this.a=n,WU.call(this,n)}function YN(){YN=E,e.Math.log(2)}function ZN(){ZN=E,kP(),rBt=WKt}function n$(){n$=E,vSt=new rpn(kxt)}function t$(){t$=E,new e$,new Zm}function e$(){new Ym,new Ym,new Ym}function i$(){throw hv(new TM(hat))}function r$(){throw hv(new TM(hat))}function c$(){throw hv(new TM(fat))}function a$(){throw hv(new TM(fat))}function o$(n){this.a=n,VE.call(this,n)}function u$(n){this.a=n,VE.call(this,n)}function s$(n,t){ZW(),this.a=n,this.b=t}function h$(n,t){WW(t),uY(n).Jc(new b)}function f$(n,t){UX(n.c,n.c.length,t)}function l$(n){return n.a<n.c.c.length}function b$(n){return n.a<n.c.a.length}function w$(n,t){return n.a?n.b:t.We()}function d$(n,t){return n<t?-1:n>t?1:0}function g$(n,t){return dwn(n,t)>0?n:t}function p$(n,t,e){return{l:n,m:t,h:e}}function m$(n,t){null!=n.a&&MA(t,n.a)}function v$(n){c2(n,null),u2(n,null)}function k$(n,t,e){return vJ(n.g,e,t)}function y$(n,t,e){return avn(t,e,n.c)}function M$(n,t,e){return vJ(n.k,e,t)}function T$(n,t,e){return gWn(n,t,e),e}function j$(n,t){return n2(),t.n.b+=n}function E$(n){HZ.call(this),this.b=n}function S$(n){LF.call(this),this.a=n}function P$(){qP.call(this,"Range",2)}function C$(n){this.b=n,this.a=new Zm}function I$(n){this.b=new tt,this.a=n}function O$(n){n.a=new R,n.c=new R}function A$(n){n.a=new Ym,n.d=new Ym}function L$(n){s2(n,null),h2(n,null)}function N$(n,t){return kWn(n.a,t,null)}function $$(n,t){return vJ(n.a,t.a,t)}function D$(n){return new MO(n.a,n.b)}function x$(n){return new MO(n.c,n.d)}function R$(n){return new MO(n.c,n.d)}function K$(n,t){return rVn(n.c,n.b,t)}function F$(n,t){return null!=n&&Eyn(n,t)}function _$(n,t){return-1!=Yhn(n.Kc(),t)}function B$(n){return n.Ob()?n.Pb():null}function H$(n){this.b=(hZ(),new Vw(n))}function U$(n){this.a=n,Ym.call(this)}function G$(){zx.call(this,null,null)}function q$(){Vx.call(this,null,null)}function X$(){_E.call(this,"INSTANCE",0)}function z$(){FEn(),this.a=new mKn(Llt)}function V$(n){return mvn(n,0,n.length)}function W$(n,t){return new ex(n.Kc(),t)}function Q$(n,t){return null!=n.a.Bc(t)}function J$(n,t){Czn(n),n.Gc(uG(t,15))}function Y$(n,t,e){n.c.bd(t,uG(e,136))}function Z$(n,t,e){n.c.Ui(t,uG(e,136))}function nD(n,t){n.c&&(cq(t),B1(t))}function tD(n,t){n.q.setHours(t),Iqn(n,t)}function eD(n,t){KR(t,n.a.a.a,n.a.a.b)}function iD(n,t,e,i){uQ(n.a[t.g],e.g,i)}function rD(n,t,e){return n.a[t.g][e.g]}function cD(n,t){return n.e[t.c.p][t.p]}function aD(n,t){return n.c[t.c.p][t.p]}function oD(n,t){return n.a[t.c.p][t.p]}function uD(n,t){return n.j[t.p]=oRn(t)}function sD(n,t){return null!=n.a.Bc(t)}function hD(n,t){return uM(pK(t.a))<=n}function fD(n,t){return uM(pK(t.a))>=n}function lD(n,t){return r7(n.f,t.Pg())}function bD(n,t){return n.a*t.a+n.b*t.b}function wD(n,t){return n.a<Q_(t)?-1:1}function dD(n,t){return r7(n.b,t.Pg())}function gD(n,t,e){return e?0!=t:t!=n-1}function pD(n,t,e){n.a=1502^t,n.b=e^X0n}function mD(n,t,e){return n.a=t,n.b=e,n}function vD(n,t){return n.a*=t,n.b*=t,n}function kD(n,t){return mv(n.c,t),!0}function yD(n,t,e){return uQ(n.g,t,e),e}function MD(n,t,e){FG.call(this,n,t,e)}function TD(n,t,e){MD.call(this,n,t,e)}function jD(n,t,e){_G.call(this,n,t,e)}function ED(n,t,e){_G.call(this,n,t,e)}function SD(n,t,e){jD.call(this,n,t,e)}function PD(n,t,e){MD.call(this,n,t,e)}function CD(n,t,e){TD.call(this,n,t,e)}function ID(n,t,e){FG.call(this,n,t,e)}function OD(n,t,e){FG.call(this,n,t,e)}function AD(n,t,e){ID.call(this,n,t,e)}function LD(n){n.j=Inn(jot,zZn,319,0,0,1)}function ND(){this.a=Inn(dat,EZn,1,8,5,1)}function $D(){this.Bb|=256,this.Bb|=512}function DD(n){this.i=n,this.f=this.i.j}function xD(n){this.c=n,this.a=this.c.a}function RD(n,t){this.a=n,VE.call(this,t)}function KD(n,t){return Hgn(n,new WM,t).a}function FD(n){if(!n)throw hv(new Dv)}function _D(n){if(!n)throw hv(new xv)}function BD(){(BD=E)(),dut=new _}function HD(){HD=E,SP(),SBt=new _l}function UD(){UD=E,sut=new Xy(null)}function GD(n){ZZ(n,Uet),ARn(n,zQn(n))}function qD(n){n.a=uG(Lsn(n.b.a,4),129)}function XD(n){n.a=uG(Lsn(n.b.a,4),129)}function zD(n){n.b.Qb(),--n.d.f.d,DX(n.d)}function VD(n){this.a=n,fb.call(this,n.d)}function WD(n,t){this.a=n,iT.call(this,t)}function QD(n,t){this.a=n,iT.call(this,t)}function JD(n,t){this.a=n,iT.call(this,t)}function YD(n,t){this.a=t,iT.call(this,n)}function ZD(n,t){this.a=t,c8.call(this,n)}function nx(n,t){this.a=n,c8.call(this,t)}function tx(n,t){this.a=t,WE.call(this,n)}function ex(n,t){this.a=t,WE.call(this,n)}function ix(n,t){return WW(t),new tx(n,t)}function rx(n,t){return new EAn(n.a,n.b,t)}function cx(n,t,e){return n.indexOf(t,e)}function ax(n,t){return n.lastIndexOf(t)}function ox(n){return null==n?IZn:cpn(n)}function ux(n){return null==n?null:n.name}function sx(n){return n.l+n.m*w0n+n.h*d0n}function hx(n){return Jj(n.a)?y2(n):null}function fx(n){$w.call(this,(tJ(n),n))}function lx(n){$w.call(this,(tJ(n),n))}function bx(n){ib.call(this,uG(WW(n),34))}function wx(n){ib.call(this,uG(WW(n),34))}function dx(n){td.call(this,new Bnn(n))}function gx(n){qw.call(this,n),this.a=n}function px(n){Gw.call(this,n),this.a=n}function mx(n){nT.call(this,n),this.a=n}function vx(){LD(this),KY(this),this.je()}function kx(n){this.a=n,Uw.call(this,n)}function yx(n){return MK(null!=n.a),n.a}function Mx(n,t){return kD(t.a,n.a),n.a}function Tx(n,t){return kD(t.b,n.a),n.a}function jx(n,t){return kD(t.a,n.a),n.a}function Ex(n,t,e){return psn(n,t,t,e),n}function Sx(n,t){return++n.b,kD(n.a,t)}function Px(n,t){return++n.b,men(n.a,t)}function Cx(n,t){return ugn(n.c.d,t.c.d)}function Ix(n,t){return ugn(n.c.c,t.c.c)}function Ox(n,t){return ugn(n.n.a,t.n.a)}function Ax(n,t){return uG(Y9(n.b,t),15)}function Lx(n,t){return n.n.b=(tJ(t),t)}function Nx(n,t){return n.n.b=(tJ(t),t)}function $x(n,t){return!!t&&n.b[t.g]==t}function Dx(n){return l$(n.a)||l$(n.b)}function xx(n){return n.$H||(n.$H=++_ut)}function Rx(n){return null!=n.a?n.a:null}function Kx(n,t){return ugn(n.e.b,t.e.b)}function Fx(n,t){return ugn(n.e.a,t.e.a)}function _x(n,t,e){return m5(n,t,e,n.b)}function Bx(n,t,e){return m5(n,t,e,n.c)}function Hx(n){return GB(),!!n&&!n.dc()}function Ux(){JS(),this.b=new Eg(this)}function Gx(){Gx=E,bht=new uF(i3n,0)}function qx(){qx=E,tot=!1,eot=!0}function Xx(n){var t;t=n.a,n.a=n.b,n.b=t}function zx(n,t){jP(),this.a=n,this.b=t}function Vx(n,t){EP(),this.b=n,this.c=t}function Wx(n,t){rz(),this.f=t,this.d=n}function Qx(n,t){e7(t,n),this.d=n,this.c=t}function Jx(n,t){Yvn.call(this,n,t,null)}function Yx(n,t,e,i){qz.call(this,n,t,e,i)}function Zx(n){this.d=n,DD.call(this,n)}function nR(n){this.c=n,DD.call(this,n)}function tR(n){this.c=n,Zx.call(this,n)}function eR(n){return new n8(3,n)}function iR(n){return man(n,g1n),new R7(n)}function rR(n){return EZ(),parseInt(n)||-1}function cR(n){return Hy(),Fcn((d0(),Aat),n)}function aR(n,t,e){return cx(n,$Cn(t),e)}function oR(n,t){return new $_(n,n.gc(),t)}function uR(n,t){return Tz(n.c).Md().Xb(t)}function sR(n,t,e){n.fd(t).Rb(e)}function hR(n,t,e){uG(xen(n,t),21).Fc(e)}function fR(n,t,e){Vdn(n.a,e),bMn(n.a,t)}function lR(n){F$(n,158)&&uG(n,158).pi()}function bR(n){bG.call(this,n,null,null)}function wR(n){dS(),this.b=n,this.a=!0}function dR(n){gS(),this.b=n,this.a=!0}function gR(n){return MK(0!=n.b),n.a.a.c}function pR(n){return MK(0!=n.b),n.c.b.c}function mR(n,t){return psn(n,t,t+1,""),n}function vR(n,t){return!!n.q&&PV(n.q,t)}function kR(n){return n.b=uG(_Y(n.a),44)}function yR(n){return null!=n.f?n.f:""+n.g}function MR(n){return null!=n.f?n.f:""+n.g}function TR(n,t){return n>0?t/(n*n):100*t}function jR(n,t){return n>0?t*t/n:t*t*100}function ER(n,t){return uG(ain(n.a,t),34)}function SR(n,t){return jIn(),UNn(n,t.e,t)}function PR(n,t,e){return ZS(),e.Mg(n,t)}function CR(n){return tcn(),n.e.a+n.f.a/2}function IR(n,t,e){return tcn(),e.e.a-n*t}function OR(n){return tcn(),n.e.b+n.f.b/2}function AR(n,t,e){return tcn(),e.e.b-n*t}function LR(n){n.d=new bR(n),n.e=new Ym}function NR(){this.a=new K1,this.b=new K1}function $R(n){this.c=n,this.a=1,this.b=1}function DR(n){aYn(),dv(this),this.Ff(n)}function xR(n,t,e){Stn(),n.pf(t)&&e.Cd(n)}function RR(n,t,e){return kD(t,xpn(n,e))}function KR(n,t,e){return n.a+=t,n.b+=e,n}function FR(n,t,e){return n.a*=t,n.b*=e,n}function _R(n,t){return n.a=t.a,n.b=t.b,n}function BR(n){return n.a=-n.a,n.b=-n.b,n}function HR(n,t,e){return n.a-=t,n.b-=e,n}function UR(n){lS.call(this),dan(this,n)}function GR(){_E.call(this,"GROW_TREE",0)}function qR(){_E.call(this,"POLYOMINO",0)}function XR(n,t,e){ltn.call(this,n,t,e,2)}function zR(n,t,e){$dn(z5(n.a),t,v2(e))}function VR(n,t){jP(),zx.call(this,n,t)}function WR(n,t){EP(),Vx.call(this,n,t)}function QR(n,t){EP(),WR.call(this,n,t)}function JR(n,t){EP(),Vx.call(this,n,t)}function YR(n,t){return n.c.Fc(uG(t,136))}function ZR(n,t,e){$dn(Aen(n.a),t,k2(e))}function nK(n){this.c=n,ycn(n,0),Mcn(n,0)}function tK(n,t){ZN(),OX.call(this,n,t)}function eK(n,t){ZN(),tK.call(this,n,t)}function iK(n,t){ZN(),tK.call(this,n,t)}function rK(n,t){ZN(),OX.call(this,n,t)}function cK(n,t){ZN(),iK.call(this,n,t)}function aK(n,t){ZN(),rK.call(this,n,t)}function oK(n,t){ZN(),OX.call(this,n,t)}function uK(n,t,e){return t.zl(n.e,n.c,e)}function sK(n,t,e){return t.Al(n.e,n.c,e)}function hK(n,t,e){return JXn(Len(n,t),e)}function fK(n,t){return mwn(n.e,uG(t,54))}function lK(n){return null==n?null:AQn(n)}function bK(n){return null==n?null:mOn(n)}function wK(n){return null==n?null:cpn(n)}function dK(n){return null==n?null:cpn(n)}function gK(n){return Fq(null==n||KA(n)),n}function pK(n){return Fq(null==n||FA(n)),n}function mK(n){return Fq(null==n||RA(n)),n}function vK(n){null==n.o&&axn(n)}function kK(n){if(!n)throw hv(new Dv)}function yK(n){if(!n)throw hv(new Nv)}function MK(n){if(!n)throw hv(new Bv)}function TK(n){if(!n)throw hv(new xv)}function jK(n){if(!n)throw hv(new Fv)}function EK(){EK=E,KFt=new Gk,new qk}function SK(){SK=E,zCt=new Cm("root")}function PK(){Kan.call(this),this.Bb|=P0n}function CK(n,t){this.d=n,Cw(this),this.b=t}function IK(n,t){Fnn.call(this,n),this.a=t}function OK(n,t){Fnn.call(this,n),this.a=t}function AK(n,t,e){A7.call(this,n,t,e,null)}function LK(n,t,e){A7.call(this,n,t,e,null)}function NK(n,t){this.c=n,OE.call(this,n,t)}function $K(n,t){this.a=n,NK.call(this,n,t)}function DK(n){this.q=new e.Date(W4(n))}function xK(n){return n>8?0:n+1}function RK(n,t){Nut||kD(n.a,t)}function KK(n,t){return WS(),jsn(t.d.i,n)}function FK(n,t){return Pun(),new oHn(t,n)}function _K(n,t,e){return n.Ne(t,e)<=0?e:t}function BK(n,t,e){return n.Ne(t,e)<=0?t:e}function HK(n,t){return uG(ain(n.b,t),143)}function UK(n,t){return uG(ain(n.c,t),233)}function GK(n){return uG(zq(n.a,n.b),294)}function qK(n){return new MO(n.c,n.d+n.a)}function XK(n){return tJ(n),n?1231:1237}function zK(n){return n2(),lN(uG(n,203))}function VK(){VK=E,lht=ggn((Qmn(),JRt))}function WK(n,t){t.a?W$n(n,t):sD(n.a,t.b)}function QK(n,t,e){++n.j,n.tj(),Ann(n,t,e)}function JK(n,t,e){++n.j,n.qj(t,n.Zi(t,e))}function YK(n,t,e){n.fd(t).Rb(e)}function ZK(n,t,e){return e=DUn(n,t,6,e)}function nF(n,t,e){return e=DUn(n,t,3,e)}function tF(n,t,e){return e=DUn(n,t,9,e)}function eF(n,t){return ZZ(t,W2n),n.f=t,n}function iF(n,t){return(t&vZn)%n.d.length}function rF(n,t,e){return fXn(n.c,n.b,t,e)}function cF(n,t){this.c=n,Drn.call(this,t)}function aF(n,t){this.a=n,xm.call(this,t)}function oF(n,t){this.a=n,xm.call(this,t)}function uF(n,t){Cm.call(this,n),this.a=t}function sF(n,t){Bm.call(this,n),this.a=t}function hF(n,t){Bm.call(this,n),this.a=t}function fF(n){smn.call(this,0,0),this.f=n}function lF(n,t,e){return n.a+=mvn(t,0,e),n}function bF(n){return!n.a&&(n.a=new M),n.a}function wF(n,t){var e;return e=n.e,n.e=t,e}function dF(n,t){var e;return e=t,!!n.Fe(e)}function gF(n,t){return qx(),n==t?0:n?1:-1}function pF(n,t){n.a.bd(n.b,t),++n.b,n.c=-1}function mF(n){n.b?mF(n.b):n.f.c.zc(n.e,n.d)}function vF(n){$V(n.e),n.d.b=n.d,n.d.a=n.d}function kF(n,t,e){vS(),Ob(n,t.Ve(n.a,e))}function yF(n,t,e){return UV(n,uG(t,22),e)}function MF(n,t){return aT(new Array(t),n)}function TF(n){return pz(Dz(n,32))^pz(n)}function jF(n){return String.fromCharCode(n)}function EF(n){return null==n?null:n.message}function SF(n,t,e){return n.apply(t,e)}function PF(n,t){n[U0n].call(n,t)}function CF(n,t){n[U0n].call(n,t)}function IF(n,t){return WS(),!jsn(t.d.i,n)}function OF(n,t,e,i){lX.call(this,n,t,e,i)}function AF(){HF.call(this),this.a=new sj}function LF(){this.n=new sj,this.o=new sj}function NF(){this.b=new sj,this.c=new Zm}function $F(){this.a=new Zm,this.b=new Zm}function DF(){this.a=new lt,this.b=new qv}function xF(){this.b=new u8,this.a=new u8}function RF(){this.b=new ek,this.a=new ek}function KF(){this.b=new Ym,this.a=new Ym}function FF(){this.b=new Gj,this.a=new Ma}function _F(){this.a=new hl,this.b=new oc}function BF(){this.a=new Zm,this.d=new Zm}function HF(){this.n=new Dk,this.i=new cN}function UF(n){this.a=(man(n,g1n),new R7(n))}function GF(n){this.a=(man(n,g1n),new R7(n))}function qF(n){return n<100?null:new cj(n)}function XF(n,t){return n.n.a=(tJ(t),t+10)}function zF(n,t){return n.n.a=(tJ(t),t+10)}function VF(n,t){return t==n||sSn(mRn(t),n)}function WF(n,t){return null==vJ(n.a,t,"")}function QF(n,t){return t.qi(n.a)}function JF(n,t){return n.a+=t.a,n.b+=t.b,n}function YF(n,t){return n.a-=t.a,n.b-=t.b,n}function ZF(n){return Xv(n.j.c,0),n.a=-1,n}function n_(n,t,e){return e=DUn(n,t,11,e)}function t_(n,t,e){null!=e&&Xan(t,gTn(n,e))}function e_(n,t,e){null!=e&&zan(t,gTn(n,e))}function i_(n,t,e,i){fV.call(this,n,t,e,i)}function r_(n,t,e,i){fV.call(this,n,t,e,i)}function c_(n,t,e,i){r_.call(this,n,t,e,i)}function a_(n,t,e,i){wV.call(this,n,t,e,i)}function o_(n,t,e,i){wV.call(this,n,t,e,i)}function u_(n,t,e,i){wV.call(this,n,t,e,i)}function s_(n,t,e,i){o_.call(this,n,t,e,i)}function h_(n,t,e,i){o_.call(this,n,t,e,i)}function f_(n,t,e,i){u_.call(this,n,t,e,i)}function l_(n,t,e,i){h_.call(this,n,t,e,i)}function b_(n,t,e,i){kV.call(this,n,t,e,i)}function w_(n,t){dM.call(this,Hit+n+Vet+t)}function d_(n,t){return n.jk().wi().ri(n,t)}function g_(n,t){return n.jk().wi().ti(n,t)}function p_(n,t){return tJ(n),xA(n)===xA(t)}function m_(n,t){return tJ(n),xA(n)===xA(t)}function v_(n,t){return n.b.Bd(new QP(n,t))}function k_(n,t){return n.b.Bd(new JP(n,t))}function y_(n,t){return n.b.Bd(new YP(n,t))}function M_(n,t){return n.e=uG(n.d.Kb(t),159)}function T_(n,t,e){return n.lastIndexOf(t,e)}function j_(n,t,e){return ugn(n[t.a],n[e.a])}function E_(n,t){return kfn(t,(jYn(),Oyt),n)}function S_(n,t){return d$(t.a.d.p,n.a.d.p)}function P_(n,t){return d$(n.a.d.p,t.a.d.p)}function C_(n,t){return ugn(n.c-n.s,t.c-t.s)}function I_(n,t){return ugn(n.b.e.a,t.b.e.a)}function O_(n,t){return ugn(n.c.e.a,t.c.e.a)}function A_(n){return n.c?Ten(n.c.a,n,0):-1}function L_(n){return n==rRt||n==aRt||n==cRt}function N_(n,t){this.c=n,QV.call(this,n,t)}function $_(n,t,e){this.a=n,Qx.call(this,t,e)}function D_(n){this.c=n,rL.call(this,YZn,0)}function x_(n,t,e){this.c=t,this.b=e,this.a=n}function R_(n){PU(),this.d=n,this.a=new ND}function K_(n){sB(),this.a=(hZ(),new nT(n))}function F_(n,t){hN(n.f)?JDn(n,t):wCn(n,t)}function __(n,t){sG.call(this,n,n.length,t)}function B_(n,t){Nut||t&&(n.d=t)}function H_(n,t){return F$(t,15)&&G_n(n.c,t)}function U_(n,t,e){return uG(n.c,71).Wk(t,e)}function G_(n,t,e){return uG(n.c,71).Xk(t,e)}function q_(n,t,e){return uK(n,uG(t,343),e)}function X_(n,t,e){return sK(n,uG(t,343),e)}function z_(n,t,e){return yPn(n,uG(t,343),e)}function V_(n,t,e){return FCn(n,uG(t,343),e)}function W_(n,t){return null==t?null:Xwn(n.b,t)}function Q_(n){return FA(n)?(tJ(n),n):n.ue()}function J_(n){return!isNaN(n)&&!isFinite(n)}function Y_(n){O$(this),BY(this),Qon(this,n)}function Z_(n){IN(this),dG(this.c,0,n.Pc())}function nB(n,t,e){this.a=n,this.b=t,this.c=e}function tB(n,t,e){this.a=n,this.b=t,this.c=e}function eB(n,t,e){this.d=n,this.b=e,this.a=t}function iB(n){this.a=n,bS(),Bsn(Date.now())}function rB(n){LQ(n.a),Lnn(n.c,n.b),n.b=null}function cB(){cB=E,out=new K,uut=new F}function aB(){aB=E,DFt=Inn(dat,EZn,1,0,5,1)}function oB(){oB=E,X_t=Inn(dat,EZn,1,0,5,1)}function uB(){uB=E,z_t=Inn(dat,EZn,1,0,5,1)}function sB(){sB=E,new jv((hZ(),hZ(),zot))}function hB(n){return Rtn(),Fcn((xtn(),Mut),n)}function fB(n){return ybn(),Fcn((bnn(),xut),n)}function lB(n){return _kn(),Fcn((k8(),Jut),n)}function bB(n){return Xin(),Fcn((y8(),tst),n)}function wB(n){return W_n(),Fcn((uhn(),kst),n)}function dB(n){return Yrn(),Fcn((fnn(),Cst),n)}function gB(n){return Ktn(),Fcn((hnn(),Dst),n)}function pB(n){return Yen(),Fcn((lnn(),Bst),n)}function mB(n){return JYn(),Fcn((fL(),fht),n)}function vB(n){return ehn(),Fcn((_tn(),vht),n)}function kB(n){return vyn(),Fcn((Htn(),Eht),n)}function yB(n){return myn(),Fcn((Btn(),Rht),n)}function MB(n){return BS(),Fcn((r6(),_ht),n)}function TB(n){return zin(),Fcn((M8(),vft),n)}function jB(n){return Jen(),Fcn((wnn(),vlt),n)}function EB(n){return uIn(),Fcn(($in(),Ilt),n)}function SB(n){return Xhn(),Fcn((Gtn(),Glt),n)}function PB(n){return Uvn(),Fcn((Utn(),ibt),n)}function CB(n,t){if(!n)throw hv(new vM(t))}function IB(n){if(!n)throw hv(new kM(PZn))}function OB(n,t){if(n!=t)throw hv(new Fv)}function AB(n,t,e){this.a=n,this.b=t,this.c=e}function LB(n,t,e){this.a=n,this.b=t,this.c=e}function NB(n,t,e){this.a=n,this.b=t,this.c=e}function $B(n,t,e){this.b=n,this.a=t,this.c=e}function DB(n,t,e){this.b=n,this.c=t,this.a=e}function xB(n,t,e){this.a=n,this.b=t,this.c=e}function RB(n,t,e){this.e=t,this.b=n,this.d=e}function KB(n,t,e){this.b=n,this.a=t,this.c=e}function FB(n,t,e){return vS(),n.a.Yd(t,e),t}function _B(n){var t;return(t=new yn).e=n,t}function BB(n){var t;return(t=new pk).b=n,t}function HB(){HB=E,Nbt=new $e,$bt=new De}function UB(){UB=E,Jwt=new ui,Qwt=new si}function GB(){GB=E,rdt=new mr,cdt=new vr}function qB(n){return gon(),Fcn((q7(),Cdt),n)}function XB(n){return zYn(),Fcn((lL(),_wt),n)}function zB(n){return Ghn(),Fcn((Xtn(),Wwt),n)}function VB(n){return qhn(),Fcn((qtn(),ldt),n)}function WB(n){return gPn(),Fcn((Din(),vdt),n)}function QB(n){return h_n(),Fcn((osn(),Kdt),n)}function JB(n){return vAn(),Fcn((ecn(),zdt),n)}function YB(n){return H7(),Fcn((I8(),Jdt),n)}function ZB(n){return jan(),Fcn((U7(),egt),n)}function nH(n){return ran(),Fcn((G7(),ogt),n)}function tH(n){return kvn(),Fcn((xin(),wgt),n)}function eH(n){return Vin(),Fcn((E8(),mgt),n)}function iH(n){return RIn(),Fcn((ccn(),Jgt),n)}function rH(n){return r_n(),Fcn((Efn(),spt),n)}function cH(n){return ihn(),Fcn((z7(),wpt),n)}function aH(n){return Zen(),Fcn((V7(),vpt),n)}function oH(n){return Y6(),Fcn((j8(),Tpt),n)}function uH(n){return ESn(),Fcn((rcn(),Ugt),n)}function sH(n){return Pfn(),Fcn((X7(),Tgt),n)}function hH(n){return tOn(),Fcn((icn(),Agt),n)}function fH(n){return Wtn(),Fcn((S8(),Dgt),n)}function lH(n){return Gpn(),Fcn((Kin(),$mt),n)}function bH(n){return MKn(),Fcn((chn(),ojt),n)}function wH(n){return Cwn(),Fcn((W7(),ljt),n)}function dH(n){return Yyn(),Fcn((ztn(),mjt),n)}function gH(n){return pyn(),Fcn((Rin(),Ejt),n)}function pH(n){return THn(),Fcn((Sfn(),Rjt),n)}function mH(n){return yvn(),Fcn((Vtn(),Ujt),n)}function vH(n){return nin(),Fcn((P8(),zjt),n)}function kH(n){return can(),Fcn((Y7(),Yjt),n)}function yH(n){return isn(),Fcn((Q7(),iEt),n)}function MH(n){return Sln(),Fcn((J7(),uEt),n)}function TH(n){return kbn(),Fcn((Z7(),bEt),n)}function jH(n){return ian(),Fcn((nnn(),mEt),n)}function EH(n){return zhn(),Fcn((tnn(),TEt),n)}function SH(n){return ean(),Fcn((snn(),GEt),n)}function PH(n){return Z6(),Fcn((C8(),nSt),n)}function CH(n){return b0(),Fcn((L8(),bSt),n)}function IH(n){return w0(),Fcn((N8(),pSt),n)}function OH(n){return _7(),Fcn(($8(),RSt),n)}function AH(n){return l0(),Fcn((D8(),XSt),n)}function LH(n){return Cjn(),Fcn((sen(),YSt),n)}function NH(n){return OHn(),Fcn((bL(),bPt),n)}function $H(n){return Pln(),Fcn((enn(),mPt),n)}function DH(n){return mbn(),Fcn((uen(),KCt),n)}function xH(n){return i3(),Fcn((O8(),HCt),n)}function RH(n){return pon(),Fcn((A8(),JCt),n)}function KH(n){return zPn(),Fcn((Fin(),rIt),n)}function FH(n){return vbn(),Fcn((inn(),bIt),n)}function _H(n){return Ptn(),Fcn((x8(),uIt),n)}function BH(n){return dTn(),Fcn((oen(),tOt),n)}function HH(n){return esn(),Fcn((rnn(),aOt),n)}function UH(n){return Jmn(),Fcn((cnn(),fOt),n)}function GH(n){return Zyn(),Fcn((ann(),gOt),n)}function qH(n){return Bgn(),Fcn((onn(),LOt),n)}function XH(n){return a9(),Fcn((R8(),jAt),n)}function zH(n){return Aun(),Fcn((T8(),Lbt),n)}function VH(n){return zIn(),Fcn((acn(),mbt),n)}function WH(n){return den(),Fcn((unn(),IAt),n)}function QH(n){return rhn(),Fcn((K8(),NAt),n)}function JH(n){return _Rn(),Fcn((_in(),BAt),n)}function YH(n){return nP(),Fcn(($6(),WAt),n)}function ZH(n){return Rdn(),Fcn((gnn(),XAt),n)}function nU(n){return tP(),Fcn((D6(),YAt),n)}function tU(n){return B7(),Fcn((F8(),eLt),n)}function eU(n){return pOn(),Fcn((Bin(),sLt),n)}function iU(n){return eP(),Fcn((x6(),XLt),n)}function rU(n){return Vhn(),Fcn((_8(),QLt),n)}function cU(n){return Rkn(),Fcn((Uin(),bNt),n)}function aU(n){return lAn(),Fcn((csn(),TNt),n)}function oU(n){return nMn(),Fcn((ocn(),DNt),n)}function uU(n){return ZSn(),Fcn((ucn(),t$t),n)}function sU(n){return xdn(),Fcn((Hin(),ext),n)}function hU(n){return Zrn(),Fcn((pnn(),oxt),n)}function fU(n){return _gn(),Fcn((hen(),bxt),n)}function lU(n){return RCn(),Fcn((scn(),yxt),n)}function bU(n){return Own(),Fcn((dnn(),Nxt),n)}function wU(n){return Ajn(),Fcn((fen(),Fxt),n)}function dU(n){return VDn(),Fcn((ohn(),Qxt),n)}function gU(n){return Vkn(),Fcn((Gin(),iRt),n)}function pU(n){return $Pn(),Fcn((hcn(),fRt),n)}function mU(n){return eNn(),Fcn((fcn(),vRt),n)}function vU(n){return KQn(),Fcn((qin(),HRt),n)}function kU(n){return Qmn(),Fcn((len(),ZRt),n)}function yU(n){return oUn(),Fcn((ahn(),hKt),n)}function MU(n){return Iwn(),Fcn((mnn(),dKt),n)}function TU(n,t){return tJ(n),n+(tJ(t),t)}function jU(n){return CU(),Fcn((B8(),vKt),n)}function EU(n){return qpn(),Fcn((ben(),EKt),n)}function SU(n){return Eln(),Fcn((wen(),LKt),n)}function PU(){PU=E,KQn(),zEt=_Rt,VEt=kRt}function CU(){CU=E,gKt=new Pq,pKt=new gV}function IU(n){return!n.e&&(n.e=new Zm),n.e}function OU(n,t){this.c=n,this.a=t,this.b=t-n}function AU(n,t,e){this.a=n,this.b=t,this.c=e}function LU(n,t,e){this.a=n,this.b=t,this.c=e}function NU(n,t,e){this.a=n,this.b=t,this.c=e}function $U(n,t,e){this.a=n,this.b=t,this.c=e}function DU(n,t,e){this.a=n,this.b=t,this.c=e}function xU(n,t,e){this.a=n,this.b=t,this.c=e}function RU(n,t,e){this.e=n,this.a=t,this.c=e}function KU(n,t,e){ZN(),_1.call(this,n,t,e)}function FU(n,t,e){ZN(),CQ.call(this,n,t,e)}function _U(n,t,e){ZN(),CQ.call(this,n,t,e)}function BU(n,t,e){ZN(),CQ.call(this,n,t,e)}function HU(n,t,e){ZN(),FU.call(this,n,t,e)}function UU(n,t,e){ZN(),FU.call(this,n,t,e)}function GU(n,t,e){ZN(),UU.call(this,n,t,e)}function qU(n,t,e){ZN(),_U.call(this,n,t,e)}function XU(n,t,e){ZN(),BU.call(this,n,t,e)}function zU(n){lX.call(this,n.d,n.c,n.a,n.b)}function VU(n){lX.call(this,n.d,n.c,n.a,n.b)}function WU(n){this.d=n,Cw(this),this.b=Ez(n.d)}function QU(n){return rDn(),Fcn((asn(),SFt),n)}function JU(n,t){return WW(n),WW(t),new jE(n,t)}function YU(n,t){return WW(n),WW(t),new WG(n,t)}function ZU(n,t){return WW(n),WW(t),new QG(n,t)}function nG(n,t){return WW(n),WW(t),new DE(n,t)}function tG(n){return MK(0!=n.b),Lrn(n,n.a.a)}function eG(n){return MK(0!=n.b),Lrn(n,n.c.b)}function iG(n){return!n.c&&(n.c=new Ks),n.c}function rG(n){var t;return cin(t=new Zm,n),t}function cG(n){var t;return cin(t=new ek,n),t}function aG(n){var t;return Fon(t=new rk,n),t}function oG(n){var t;return Fon(t=new lS,n),t}function uG(n,t){return Fq(null==n||Eyn(n,t)),n}function sG(n,t,e){_z.call(this,t,e),this.a=n}function hG(n,t){this.c=n,this.b=t,this.a=!1}function fG(){this.a=";,;",this.b="",this.c=""}function lG(n,t,e){this.b=n,eL.call(this,t,e)}function bG(n,t,e){this.c=n,VP.call(this,t,e)}function wG(n,t,e){FC.call(this,n,t),this.b=e}function dG(n,t,e){b$n(e,0,n,t,e.length,!1)}function gG(n,t,e,i,r){n.b=t,n.c=e,n.d=i,n.a=r}function pG(n,t,e,i,r){n.d=t,n.c=e,n.a=i,n.b=r}function mG(n,t){t&&(n.b=t,n.a=(GQ(t),t.a))}function vG(n,t){if(!n)throw hv(new vM(t))}function kG(n,t){if(!n)throw hv(new kM(t))}function yG(n,t){if(!n)throw hv(new gM(t))}function MG(n,t){return YS(),d$(n.d.p,t.d.p)}function TG(n,t){return tcn(),ugn(n.e.b,t.e.b)}function jG(n,t){return tcn(),ugn(n.e.a,t.e.a)}function EG(n,t){return d$(wq(n.d),wq(t.d))}function SG(n,t){return t&&$Q(n,t.d)?t:null}function PG(n,t){return t==(KQn(),_Rt)?n.c:n.d}function CG(n){return Esn(LV(_L(n)?Gsn(n):n))}function IG(n){return new MO(n.c+n.b,n.d+n.a)}function OG(n){return null!=n&&!mpn(n,n_t,t_t)}function AG(n,t){return(ldn(n)<<4|ldn(t))&D1n}function LG(n,t,e,i,r){n.c=t,n.d=e,n.b=i,n.a=r}function NG(n){var t,e;t=n.b,e=n.c,n.b=e,n.c=t}function $G(n){var t,e;e=n.d,t=n.a,n.d=t,n.a=e}function DG(n,t){var e;return e=n.c,Jan(n,t),e}function xG(n,t){return n.g=t<0?-1:t,n}function RG(n,t){return Brn(n),n.a*=t,n.b*=t,n}function KG(n,t,e){Orn.call(this,t,e),this.d=n}function FG(n,t,e){LA.call(this,n,t),this.c=e}function _G(n,t,e){LA.call(this,n,t),this.c=e}function BG(n){uB(),ps.call(this),this.ci(n)}function HG(){N7(),OQ.call(this,(MP(),l_t))}function UG(n){return QYn(),new IX(0,n)}function GG(){GG=E,hZ(),CBt=new Xw(bct)}function qG(){qG=E,new Gyn((my(),Tat),(py(),Mat))}function XG(){XG=E,bot=Inn(dot,zZn,17,256,0,1)}function zG(){this.b=uM(pK(Jkn((cGn(),Bft))))}function VG(n){this.b=n,this.a=Mz(this.b.a).Od()}function WG(n,t){this.b=n,this.a=t,Ff.call(this)}function QG(n,t){this.a=n,this.b=t,Ff.call(this)}function JG(n,t,e){this.a=n,vL.call(this,t,e)}function YG(n,t,e){this.a=n,vL.call(this,t,e)}function ZG(n,t,e){nrn(n,t,new QW(e))}function nq(n,t,e){var i;return i=n[t],n[t]=e,i}function tq(n){return Ltn(n.slice(),n)}function eq(n){var t;return t=n.n,n.a.b+t.d+t.a}function iq(n){var t;return t=n.n,n.e.b+t.d+t.a}function rq(n){var t;return t=n.n,n.e.a+t.b+t.c}function cq(n){n.a.b=n.b,n.b.a=n.a,n.a=n.b=null}function aq(n,t){return s8(n,t,n.c.b,n.c),!0}function oq(n){return n.a?n.a:sY(n)}function uq(n){return lZ(),bIn(n)==R0(gIn(n))}function sq(n){return lZ(),gIn(n)==R0(bIn(n))}function hq(n,t){return CEn(n,new FC(t.a,t.b))}function fq(n,t){return TJ(),IMn(n,t),new bJ(n,t)}function lq(n,t){return n.c<t.c?-1:n.c==t.c?0:1}function bq(n){return n.b.c.length-n.e.c.length}function wq(n){return n.e.c.length-n.g.c.length}function dq(n){return n.e.c.length+n.g.c.length}function gq(n){return 0==n||isNaN(n)?n:n<0?-1:1}function pq(n){return!v9(n)&&n.c.i.c==n.d.i.c}function mq(n){return n2(),(KQn(),ERt).Hc(n.j)}function vq(n,t,e){return tcn(),e.e.a+e.f.a+n*t}function kq(n,t,e){return tcn(),e.e.b+e.f.b+n*t}function yq(n,t,e){return vJ(n.b,uG(e.b,18),t)}function Mq(n,t,e){return vJ(n.b,uG(e.b,18),t)}function Tq(n,t,e){eQn(n.a,n.b,n.c,uG(t,166),e)}function jq(n,t,e,i){Mvn.call(this,n,t,e,i,0,0)}function Eq(n){uB(),BG.call(this,n),this.a=-1}function Sq(n,t){_z.call(this,t,1040),this.a=n}function Pq(){BO.call(this,"COUNT_CHILDREN",0)}function Cq(n,t){OA.call(this,n,t),this.a=this}function Iq(n,t){var e;return(e=VW(n,t)).i=2,e}function Oq(n,t){return++n.j,n.Cj(t)}function Aq(n,t,e){return n.a=-1,hR(n,t.g,e),n}function Lq(n,t){return kD(n,new MO(t.a,t.b))}function Nq(n){return ncn(),Inn(lPt,z9n,40,n,0,1)}function $q(n){return n.e.Rd().gc()*n.c.Rd().gc()}function Dq(n,t,e){return new x_(BQ(n)._e(),e,t)}function xq(n,t){Yan(n,null==t?null:(tJ(t),t))}function Rq(n,t){Qan(n,null==t?null:(tJ(t),t))}function Kq(n,t){Qan(n,null==t?null:(tJ(t),t))}function Fq(n){if(!n)throw hv(new mM(null))}function _q(n){if(n.c.e!=n.a)throw hv(new Fv)}function Bq(n){if(n.e.c!=n.b)throw hv(new Fv)}function Hq(n){for(WW(n);n.Ob();)n.Pb(),n.Qb()}function Uq(n){ZW(),this.a=(hZ(),new Xw(WW(n)))}function Gq(n){this.c=n,this.b=this.c.d.vc().Kc()}function qq(n){n.a.ld(),uG(n.a.md(),16).gc(),HM()}function Xq(n,t){return n.a+=mvn(t,0,t.length),n}function zq(n,t){return u3(t,n.c.length),n.c[t]}function Vq(n,t){return u3(t,n.a.length),n.a[t]}function Wq(n,t){return tJ(t),Dun(t,(tJ(n),n))}function Qq(n,t){return tJ(n),Dun(n,(tJ(t),t))}function Jq(n,t,e,i,r,c){return NSn(n,t,e,i,r,0,c)}function Yq(n,t){return uQ(t,0,nX(t[0],Hvn(1)))}function Zq(n,t){return Hvn(Lgn(Hvn(n.a).a,t.a))}function nX(n,t){return Zq(uG(n,168),uG(t,168))}function tX(){tX=E,got=Inn(yot,zZn,168,256,0,1)}function eX(){eX=E,Mot=Inn(Tot,zZn,191,256,0,1)}function iX(){iX=E,aot=Inn(uot,zZn,222,256,0,1)}function rX(){rX=E,sot=Inn(hot,zZn,180,128,0,1)}function cX(){gG(this,!1,!1,!1,!1)}function aX(n){td.call(this,new u8),Qon(this,n)}function oX(n){this.a=new sS(n.gc()),Qon(this,n)}function uX(n){this.c=n,this.a=new fS(this.c.a)}function sX(n){this.a=n,this.c=new Ym,jfn(this)}function hX(){this.d=new MO(0,0),this.e=new ek}function fX(n,t){vS(),Fnn.call(this,n),this.a=t}function lX(n,t,e,i){Rf(this),pG(this,n,t,e,i)}function bX(n,t,e){return d$(t.d[n.g],e.d[n.g])}function wX(n,t,e){return d$(n.d[t.p],n.d[e.p])}function dX(n,t,e){return d$(n.d[t.p],n.d[e.p])}function gX(n,t,e){return d$(n.d[t.p],n.d[e.p])}function pX(n,t,e){return d$(n.d[t.p],n.d[e.p])}function mX(n,t,i){return e.Math.min(i/n,1/t)}function vX(n,t){return n?0:e.Math.max(0,t-1)}function kX(n,t){return null==n?null==t:m_(n,t)}function yX(n,t){return null==n?null==t:Bvn(n,t)}function MX(n){return n.q?n.q:(hZ(),hZ(),Vot)}function TX(n){return n.c-uG(zq(n.a,n.b),294).b}function jX(n){return n.c?n.c.f:n.e.b}function EX(n){return n.c?n.c.g:n.e.a}function SX(n,t){return null==n.a&&fBn(n),n.a[t]}function PX(n){var t;return(t=GSn(n))?PX(t):n}function CX(n,t){return QYn(),new eW(n,t)}function IX(n,t){QYn(),Qm.call(this,n),this.a=t}function OX(n,t){ZN(),Hm.call(this,t),this.a=n}function AX(n,t,e){this.a=n,MD.call(this,t,e,2)}function LX(n){this.b=new lS,this.a=n,this.c=-1}function NX(n){Qx.call(this,0,0),this.a=n,this.b=0}function $X(n){Drn.call(this,n.gc()),CW(this,n)}function DX(n){n.b?DX(n.b):n.d.dc()&&n.f.c.Bc(n.e)}function xX(n){return Array.isArray(n)&&n.Tm===j}function RX(n,t){return F$(t,22)&&$x(n,uG(t,22))}function KX(n,t){return F$(t,22)&&Nrn(n,uG(t,22))}function FX(n,t){return Ibn(n,t,A9(n,n.b.Ce(t)))}function _X(n,t){return!(void 0===n.a.get(t))}function BX(n){return uRn(n,26)*G0n+uRn(n,27)*q0n}function HX(n,t){return yan(new Z,new fd(n),t)}function UX(n,t,e){ubn(0,t,n.length),Ntn(n,0,t,e)}function GX(n,t,e){o3(t,n.c.length),pC(n.c,t,e)}function qX(n,t,e){var i;n&&((i=n.i).c=t,i.b=e)}function XX(n,t,e){var i;n&&((i=n.i).d=t,i.a=e)}function zX(n,t,e){var i;for(i=0;i<t;++i)n[i]=e}function VX(n,t){var e;for(e=0;e<t;++e)n[e]=-1}function WX(n,t){var e;return Dfn(e=ggn(n),t),e}function QX(n,t){return!n&&(n=[]),n[n.length]=t,n}function JX(n,t){JF(n.c,t),n.b.c+=t.a,n.b.d+=t.b}function YX(n,t){JX(n,YF(new MO(t.a,t.b),n.c))}function ZX(n,t){this.b=new lS,this.a=n,this.c=t}function nz(){this.b=new Et,this.c=new FZ(this)}function tz(){this.d=new mn,this.e=new KZ(this)}function ez(){J0(),this.f=new lS,this.e=new lS}function iz(){n2(),this.k=new Ym,this.d=new ek}function rz(){rz=E,$Kt=new _N((XYn(),uDt),0)}function cz(){cz=E,Pat=new NX(Inn(dat,EZn,1,0,5,1))}function az(n,t,e){return FV(n,new ZP(t.a,e.a))}function oz(n,t,e){return-d$(n.f[t.p],n.f[e.p])}function uz(n,t,e){HDn(e,n,1),kD(t,new $C(e,n))}function sz(n,t,e){TEn(e,n,1),kD(t,new RC(e,n))}function hz(n,t,e){this.a=n,TD.call(this,t,e,22)}function fz(n,t,e){this.a=n,TD.call(this,t,e,14)}function lz(n,t,e,i){ZN(),d4.call(this,n,t,e,i)}function bz(n,t,e,i){ZN(),d4.call(this,n,t,e,i)}function wz(n,t,e){return n.a=-1,hR(n,t.g+1,e),n}function dz(n,t,e){return e=DUn(n,uG(t,54),7,e)}function gz(n,t,e){return e=DUn(n,uG(t,54),3,e)}function pz(n){return _L(n)?0|n:Tj(n)}function mz(n){return QYn(),new F1(10,n,0)}function vz(n){return n.f||(n.f=n.Dc())}function kz(n){return n.i||(n.i=n.bc())}function yz(n){if(n.e.j!=n.d)throw hv(new Fv)}function Mz(n){return n.c?n.c:n.c=n.Sd()}function Tz(n){return n.d?n.d:n.d=n.Td()}function jz(n,t){return Gvn(Len(n,t))?t.zi():null}function Ez(n){return F$(n,15)?uG(n,15).ed():n.Kc()}function Sz(n){return n.Qc(Inn(dat,EZn,1,n.gc(),5,1))}function Pz(n){return null!=n&&NV(n)&&!(n.Tm===j)}function Cz(n){return!Array.isArray(n)&&n.Tm===j}function Iz(n,t){return WW(t),n.a.Jd(t)&&!n.b.Jd(t)}function Oz(n,t){return p$(n.l&t.l,n.m&t.m,n.h&t.h)}function Az(n,t){return p$(n.l|t.l,n.m|t.m,n.h|t.h)}function Lz(n,t){return p$(n.l^t.l,n.m^t.m,n.h^t.h)}function Nz(n,t){return Esn(JIn(_L(n)?Gsn(n):n,t))}function $z(n,t){return Esn(gDn(_L(n)?Gsn(n):n,t))}function Dz(n,t){return Esn(FOn(_L(n)?Gsn(n):n,t))}function xz(n,t){return gF((tJ(n),n),(tJ(t),t))}function Rz(n,t){return ugn((tJ(n),n),(tJ(t),t))}function Kz(n){this.b=new R7(11),this.a=(sZ(),n)}function Fz(n){this.a=(cz(),Pat),this.d=uG(WW(n),51)}function _z(n,t){this.c=0,this.d=n,this.b=64|t|VZn}function Bz(n,t){this.e=n,this.d=64&t?t|VZn:t}function Hz(n){this.b=null,this.a=(sZ(),n||Jot)}function Uz(n){LD(this),this.g=n,KY(this),this.je()}function Gz(n){CP(),this.a=0,this.b=n-1,this.c=1}function qz(n,t,e,i){this.a=n,A7.call(this,n,t,e,i)}function Xz(n,t,e){n.a.Mb(e)&&(n.b=!0,t.Cd(e))}function zz(n){n.d||(n.d=n.b.Kc(),n.c=n.b.gc())}function Vz(n,t){if(n<0||n>=t)throw hv(new Ik)}function Wz(n,t){return cdn(n,(tJ(t),new ud(t)))}function Qz(n,t){return cdn(n,(tJ(t),new sd(t)))}function Jz(n,t,e){return BYn(n,uG(t,12),uG(e,12))}function Yz(n){return Lun(),0!=uG(n,12).g.c.length}function Zz(n){return Lun(),0!=uG(n,12).e.c.length}function nV(n,t){return Pun(),ugn(t.a.o.a,n.a.o.a)}function tV(n,t){t.Bb&Qtt&&!n.a.o&&(n.a.o=t)}function eV(n,t){t.Ug("General 'Rotator",1),lQn(n)}function iV(n,t,e){t.qf(e,uM(pK(cQ(n.b,e)))*n.a)}function rV(n,t,e){return l_n(),qun(n,t)&&qun(n,e)}function cV(n){return eNn(),!n.Hc(wRt)&&!n.Hc(gRt)}function aV(n){return n.e?T7(n.e):null}function oV(n){return _L(n)?""+n:K_n(n)}function uV(n){var t;for(t=n;t.f;)t=t.f;return t}function sV(n,t,e){return uQ(t,0,nX(t[0],e[0])),t}function hV(n,t,e,i){var r;(r=n.i).i=t,r.a=e,r.b=i}function fV(n,t,e,i){MD.call(this,n,t,e),this.b=i}function lV(n,t,e,i,r){btn.call(this,n,t,e,i,r,-1)}function bV(n,t,e,i,r){wtn.call(this,n,t,e,i,r,-1)}function wV(n,t,e,i){FG.call(this,n,t,e),this.b=i}function dV(n){lA.call(this,n,!1),this.a=!1}function gV(){BO.call(this,"LOOKAHEAD_LAYOUT",1)}function pV(n){this.b=n,Zx.call(this,n),qD(this)}function mV(n){this.b=n,tR.call(this,n),XD(this)}function vV(n,t,e){this.a=n,i_.call(this,t,e,5,6)}function kV(n,t,e,i){this.b=n,MD.call(this,t,e,i)}function yV(n,t){this.b=n,fb.call(this,n.b),this.a=t}function MV(n){this.a=Fyn(n.a),this.b=new Z_(n.b)}function TV(n,t){ZW(),UE.call(this,n,Dwn(new IM(t)))}function jV(n,t){return QYn(),new PQ(n,t,0)}function EV(n,t){return QYn(),new PQ(6,n,t)}function SV(n,t){for(tJ(t);n.Ob();)t.Cd(n.Pb())}function PV(n,t){return RA(t)?AZ(n,t):!!FX(n.f,t)}function CV(n,t){return t.Vh()?mwn(n.b,uG(t,54)):t}function IV(n,t){return m_(n.substr(0,t.length),t)}function OV(n){return new Fz(new YD(n.a.length,n.a))}function AV(n){return new MO(n.c+n.b/2,n.d+n.a/2)}function LV(n){return p$(~n.l&f0n,~n.m&f0n,~n.h&l0n)}function NV(n){return typeof n===wZn||typeof n===mZn}function $V(n){n.f=new nN(n),n.i=new tN(n),++n.g}function DV(n){if(!n)throw hv(new Bv);return n.d}function xV(n){var t;return MK(null!=(t=Rfn(n))),t}function RV(n){var t;return MK(null!=(t=sgn(n))),t}function KV(n,t){var e;return e7(t,e=n.a.gc()),e-t}function FV(n,t){return null==n.a.zc(t,n)}function _V(n,t){return null==n.a.zc(t,(qx(),tot))}function BV(n){return new fX(null,oW(n,n.length))}function HV(n,t,e){return HXn(n,uG(t,42),uG(e,176))}function UV(n,t,e){return Mon(n.a,t),nq(n.b,t.g,e)}function GV(n,t,e){Vz(e,n.a.c.length),Y8(n.a,e,t)}function qV(n,t,e,i){ubn(t,e,n.length),XV(n,t,e,i)}function XV(n,t,e,i){var r;for(r=t;r<e;++r)n[r]=i}function zV(n,t){var e;for(e=0;e<t;++e)n[e]=!1}function VV(n,t,e){cHn(),this.e=n,this.d=t,this.a=e}function WV(n,t,e){this.c=n,this.a=t,hZ(),this.b=e}function QV(n,t){this.d=n,DD.call(this,n),this.e=t}function JV(n,t,e){return bbn(n,t.g,e),Mon(n.c,t),n}function YV(n){return qWn(n,(xdn(),JDt)),n.d=!0,n}function ZV(n){return!n.j&&Tw(n,FHn(n.g,n.b)),n.j}function nW(n){n.a=null,n.e=null,$V(n.b),n.d=0,++n.c}function tW(n){TK(-1!=n.b),i7(n.c,n.a=n.b),n.b=-1}function eW(n,t){Qm.call(this,1),this.a=n,this.b=t}function iW(n,t){return n>0?e.Math.log(n/t):-100}function rW(n,t){return dwn(n,t)<0?-1:dwn(n,t)>0?1:0}function cW(n,t){J$(n,F$(t,160)?t:uG(t,2036).Rl())}function aW(n,t){if(null==n)throw hv(new MM(t))}function oW(n,t){return $rn(t,n.length),new Sq(n,t)}function uW(n,t){return!!t&&Qon(n,t)}function sW(){return Hy(),Uhn(cT(Lat,1),p1n,549,0,[Iat])}function hW(n){return 0==n.e?n:new VV(-n.e,n.d,n.a)}function fW(n,t){return ugn(n.c.c+n.c.b,t.c.c+t.c.b)}function lW(n,t){s8(n.d,t,n.b.b,n.b),++n.a,n.c=null}function bW(n,t){return n.c?bW(n.c,t):kD(n.b,t),n}function wW(n,t,e){var i;return i=uin(n,t),W5(n,t,e),i}function dW(n,t,e){var i;for(i=0;i<t;++i)uQ(n,i,e)}function gW(n,t,e,i,r){for(;t<e;)i[r++]=VJ(n,t++)}function pW(n,t,e,i,r){TCn(n,uG(Y9(t.k,e),15),e,i,r)}function mW(n,t){kS(YJ(n.Oc(),new Kr),new $g(t))}function vW(n,t){return ugn(n.e.a+n.f.a,t.e.a+t.f.a)}function kW(n,t){return ugn(n.e.b+n.f.b,t.e.b+t.f.b)}function yW(n){return e.Math.abs(n.d.e-n.e.e)-n.a}function MW(n){return n==M0n?yct:n==T0n?"-INF":""+n}function TW(n){return n==M0n?yct:n==T0n?"-INF":""+n}function jW(n){return lZ(),R0(bIn(n))==R0(gIn(n))}function EW(n,t,e){return uG(n.c.hd(t,uG(e,136)),44)}function SW(n,t){pQ(n,new QW(null!=t.f?t.f:""+t.g))}function PW(n,t){pQ(n,new QW(null!=t.f?t.f:""+t.g))}function CW(n,t){return n.Si()&&(t=A0(n,t)),n.Fi(t)}function IW(n,t){return t=n.Yk(null,t),pCn(n,null,t)}function OW(n,t){++n.j,WPn(n,n.i,t),xNn(n,uG(t,343))}function AW(n){n?UPn(n,(bS(),Eot),""):a1((bS(),n))}function LW(n){this.d=(tJ(n),n),this.a=0,this.c=YZn}function NW(n,t){this.d=_dn(n),this.c=t,this.a=.5*t}function $W(n){HZ.call(this),this.a=n,kD(n.a,this)}function DW(){u8.call(this),this.a=!0,this.b=!0}function xW(){xW=E,Xat=new Sb(!1),zat=new Sb(!0)}function RW(n){return n.g||(n.g=new Ql(n))}function KW(n){return n.k||(n.k=new Jl(n))}function FW(n){return n.k||(n.k=new Jl(n))}function _W(n){return n.i||(n.i=new tb(n))}function BW(n){return n.f||(n.f=new VD(n))}function HW(n){return n.j||(n.j=new mb(n))}function UW(n){return n.d||(n.d=new rb(n))}function GW(n,t,e){return QYn(),new R3(n,t,e)}function qW(n,t){return q4(t,n.c.b.c.gc()),new TE(n,t)}function XW(n,t){var e;return q4(t,e=n.a.gc()),e-1-t}function zW(n,t,e){var i;return Rcn(e,i=VW(n,t)),i}function VW(n,t){var e;return(e=new Ifn).j=n,e.d=t,e}function WW(n){if(null==n)throw hv(new Rv);return n}function QW(n){if(null==n)throw hv(new Rv);this.a=n}function JW(n){Iv(),this.b=new Zm,this.a=n,xVn(this,n)}function YW(n){this.b=n,this.a=uG(nJ(this.b.a.e),227)}function ZW(){ZW=E,sB(),jat=new t1((hZ(),hZ(),zot))}function nQ(){nQ=E,sB(),Nat=new RP((hZ(),hZ(),Wot))}function tQ(){tQ=E,M_t=DNn(),YYn(),j_t&&kEn()}function eQ(n){n.s=NaN,n.c=NaN,X$n(n,n.e),X$n(n,n.j)}function iQ(n){return(null==n.i&&eqn(n),n.i).length}function rQ(n,t){return uG(Mz(n.a).Md().Xb(t),44).ld()}function cQ(n,t){return RA(t)?U1(n,t):DA(FX(n.f,t))}function aQ(n,t){return lZ(),n==bIn(t)?gIn(t):bIn(t)}function oQ(n,t,e,i){return 0==e||(e-i)/e<n.e||t>=n.g}function uQ(n,t,e){return yK(null==e||aGn(n,e)),n[t]=e}function sQ(n,t){return s3(t,n.length+1),n.substr(t)}function hQ(n,t){for(tJ(t);n.c<n.d;)n.Se(t,n.c++)}function fQ(n){this.d=n,this.c=n.a.d.a,this.b=n.a.e.g}function lQ(n){this.c=n,this.a=new lS,this.b=new lS}function bQ(n){this.c=new sj,this.a=new Zm,this.b=n}function wQ(n){this.b=new Zm,this.a=new Zm,this.c=n}function dQ(n,t,e){uG(t.b,68),Prn(t.a,new NU(n,e,t))}function gQ(n,t){return Pun(),uG(AJ(n,t.d),15).Fc(t)}function pQ(n,t){var e;uin(n,e=n.a.length),W5(n,e,t)}function mQ(n,t){console[n].call(console,t)}function vQ(n,t){var e;++n.j,e=n.Ej(),n.rj(n.Zi(e,t))}function kQ(n,t,e){return NBn(n,Aon(n,t,e))}function yQ(n){return!n.d&&(n.d=new MD(g_t,n,1)),n.d}function MQ(n){return!n.a&&(n.a=new MD(nFt,n,4)),n.a}function TQ(n,t){return n.a+=String.fromCharCode(t),n}function jQ(n,t){return n.a+=String.fromCharCode(t),n}function EQ(n,t,e){this.a=n,Bm.call(this,t),this.b=e}function SQ(n,t,e){this.a=n,E6.call(this,8,t,null,e)}function PQ(n,t,e){Qm.call(this,n),this.a=t,this.b=e}function CQ(n,t,e){Hm.call(this,t),this.a=n,this.b=e}function IQ(n){this.c=n,this.b=this.c.a,this.a=this.c.e}function OQ(n){this.a=(tJ(Ert),Ert),this.b=n,new Zk}function AQ(n){oY(n.a),n.b=Inn(dat,EZn,1,n.b.length,5,1)}function LQ(n){TK(-1!=n.c),n.d.gd(n.c),n.b=n.c,n.c=-1}function NQ(n){return e.Math.sqrt(n.a*n.a+n.b*n.b)}function $Q(n,t){return ljn(n.c,n.f,t,n.b,n.a,n.e,n.d)}function DQ(n,t){return Vz(t,n.a.c.length),zq(n.a,t)}function xQ(n,t){return xA(n)===xA(t)||null!=n&&udn(n,t)}function RQ(n){return F$(n,102)&&!!(uG(n,19).Bb&Qtt)}function KQ(n){return nJ(n),F$(n,484)?uG(n,484):cpn(n)}function FQ(n){return n?n.dc():!n.Kc().Ob()}function _Q(n){return!!zHt&&AZ(zHt,n)}function BQ(n){return 0>=n?new mS:ton(n-1)}function HQ(n){return!n.a&&n.c?n.c.b:n.a}function UQ(n){return F$(n,616)?n:new e0(n)}function GQ(n){n.c?GQ(n.c):(vgn(n),n.d=!0)}function qQ(n){n.c?n.c.$e():(n.d=!0,uKn(n))}function XQ(n){n.b=!1,n.c=!1,n.d=!1,n.a=!1}function zQ(n){return n.c.i.c==n.d.i.c}function VQ(n,t){var e;(e=n.Ih(t))>=0?n.ki(e):zLn(n,t)}function WQ(n,t){n.c<0||n.b.b<n.c?cL(n.b,t):n.a.tf(t)}function QQ(n,t){ttn((!n.a&&(n.a=new oF(n,n)),n.a),t)}function JQ(n,t){JX(uG(t.b,68),n),Prn(t.a,new Dd(n))}function YQ(n,t){return d$(t.j.c.length,n.j.c.length)}function ZQ(n,t,e){return Whn(),e.Lg(n,uG(t.ld(),149))}function nJ(n){if(null==n)throw hv(new Rv);return n}function tJ(n){if(null==n)throw hv(new Rv);return n}function eJ(n){if(4!=n.p)throw hv(new xv);return n.e}function iJ(n){if(3!=n.p)throw hv(new xv);return n.e}function rJ(n){if(3!=n.p)throw hv(new xv);return n.j}function cJ(n){if(4!=n.p)throw hv(new xv);return n.j}function aJ(n){if(6!=n.p)throw hv(new xv);return n.f}function oJ(n){if(6!=n.p)throw hv(new xv);return n.k}function uJ(n){return!n.b&&(n.b=new Um(new ty)),n.b}function sJ(n){return-2==n.c&&ww(n,XCn(n.g,n.b)),n.c}function hJ(n,t){var e;return(e=VW("",n)).n=t,e.i=1,e}function fJ(n,t,e,i){FE.call(this,n,e),this.a=t,this.f=i}function lJ(n,t,e,i){FE.call(this,n,t),this.d=e,this.a=i}function bJ(n,t){H$.call(this,eon(WW(n),WW(t))),this.a=t}function wJ(){ly.call(this),Xv(this.j.c,0),this.a=-1}function dJ(){iIn.call(this,Drt,(vj(),y_t)),zXn(this)}function gJ(){iIn.call(this,lct,(kj(),xBt)),hVn(this)}function pJ(){_E.call(this,"DELAUNAY_TRIANGULATION",0)}function mJ(n){return String.fromCharCode.apply(null,n)}function vJ(n,t,e){return RA(t)?r2(n,t,e):VAn(n.f,t,e)}function kJ(n){return hZ(),n?n.Oe():(sZ(),sZ(),Zot)}function yJ(n){return man(n,v1n),arn(Lgn(Lgn(5,n),n/10|0))}function MJ(n,t){return qG(),new Gyn(new wx(n),new bx(t))}function TJ(){TJ=E,Eat=new Ry(Uhn(cT(Sat,1),c1n,44,0,[]))}function jJ(n){return!n.d&&(n.d=new qw(n.c.Cc())),n.d}function EJ(n){return!n.a&&(n.a=new tT(n.c.vc())),n.a}function SJ(n){return!n.b&&(n.b=new nT(n.c.ec())),n.b}function PJ(n,t){for(;t-- >0;)n=n<<1|(n<0?1:0);return n}function CJ(n,t){var e;return e=new bQ(n),mv(t.c,e),e}function IJ(n,t){n.u.Hc((eNn(),wRt))&&vNn(n,t),knn(n,t)}function OJ(n,t){return xA(n)===xA(t)||null!=n&&udn(n,t)}function AJ(n,t){return RX(n.a,t)?n.b[uG(t,22).g]:null}function LJ(){return BS(),Uhn(cT(oft,1),p1n,489,0,[Kht])}function NJ(){return nP(),Uhn(cT(JAt,1),p1n,490,0,[zAt])}function $J(){return tP(),Uhn(cT(tLt,1),p1n,558,0,[QAt])}function DJ(){return eP(),Uhn(cT(WLt,1),p1n,539,0,[GLt])}function xJ(n){return!n.n&&(n.n=new fV(lFt,n,1,7)),n.n}function RJ(n){return!n.c&&(n.c=new fV(wFt,n,9,9)),n.c}function KJ(n){return!n.c&&(n.c=new f_(cFt,n,5,8)),n.c}function FJ(n){return!n.b&&(n.b=new f_(cFt,n,4,7)),n.b}function _J(n){return n.j.c.length=0,oY(n.c),ZF(n.a),n}function BJ(n){return n.e==wct&&kw(n,akn(n.g,n.b)),n.e}function HJ(n){return n.f==wct&&Mw(n,tEn(n.g,n.b)),n.f}function UJ(n,t,e,i){return Dsn(n,t,e,!1),pdn(n,i),n}function GJ(n,t){this.b=n,QV.call(this,n,t),qD(this)}function qJ(n,t){this.b=n,N_.call(this,n,t),XD(this)}function XJ(n){this.d=n,this.a=this.d.b,this.b=this.d.c}function zJ(n,t){this.b=n,this.c=t,this.a=new fS(this.b)}function VJ(n,t){return s3(t,n.length),n.charCodeAt(t)}function WJ(n,t){jgn(n,uM($cn(t,"x")),uM($cn(t,"y")))}function QJ(n,t){jgn(n,uM($cn(t,"x")),uM($cn(t,"y")))}function JJ(n,t){return vgn(n),new fX(n,new ien(t,n.a))}function YJ(n,t){return vgn(n),new fX(n,new f7(t,n.a))}function ZJ(n,t){return vgn(n),new IK(n,new s7(t,n.a))}function nY(n,t){return vgn(n),new OK(n,new h7(t,n.a))}function tY(n,t){return new MZ(uG(WW(n),50),uG(WW(t),50))}function eY(n,t){return ugn(n.d.c+n.d.b/2,t.d.c+t.d.b/2)}function iY(n,t,e){e.a?Mcn(n,t.b-n.f/2):ycn(n,t.a-n.g/2)}function rY(n,t){return ugn(n.g.c+n.g.b/2,t.g.c+t.g.b/2)}function cY(n,t){return qS(),ugn((tJ(n),n),(tJ(t),t))}function aY(n){return null!=n&&ZE(UFt,n.toLowerCase())}function oY(n){var t;for(t=n.Kc();t.Ob();)t.Pb(),t.Qb()}function uY(n){var t;return!(t=n.b)&&(n.b=t=new Yl(n)),t}function sY(n){return con(n)||null}function hY(n,t){var e,i;return(e=n/t)>(i=t0(e))&&++i,i}function fY(n,t,e){var i;(i=uG(n.d.Kb(e),159))&&i.Nb(t)}function lY(n,t,e){KXn(n.a,e),jhn(e),EDn(n.b,e),Tzn(t,e)}function bY(n,t,e,i){this.a=n,this.c=t,this.b=e,this.d=i}function wY(n,t,e,i){this.c=n,this.b=t,this.a=e,this.d=i}function dY(n,t,e,i){this.c=n,this.b=t,this.d=e,this.a=i}function gY(n,t,e,i){this.c=n,this.d=t,this.b=e,this.a=i}function pY(n,t,e,i){this.a=n,this.d=t,this.c=e,this.b=i}function mY(n,t,e,i){this.a=n,this.e=t,this.d=e,this.c=i}function vY(n,t,e,i){this.a=n,this.c=t,this.d=e,this.b=i}function kY(n,t,e){this.a=L1n,this.d=n,this.b=t,this.c=e}function yY(n,t,e,i){_E.call(this,n,t),this.a=e,this.b=i}function MY(n,t){this.d=(tJ(n),n),this.a=16449,this.c=t}function TY(n){this.a=new Zm,this.e=Inn(YHt,zZn,53,n,0,2)}function jY(n){n.Ug("No crossing minimization",1),n.Vg()}function EY(){Ky.call(this,"There is no more element.")}function SY(n,t,e,i){this.a=n,this.b=t,this.c=e,this.d=i}function PY(n,t,e,i){this.a=n,this.b=t,this.c=e,this.d=i}function CY(n,t,e,i){this.e=n,this.a=t,this.c=e,this.d=i}function IY(n,t,e,i){this.a=n,this.c=t,this.d=e,this.b=i}function OY(n,t,e,i){ZN(),l7.call(this,t,e,i),this.a=n}function AY(n,t,e,i){ZN(),l7.call(this,t,e,i),this.a=n}function LY(n,t,e){var i;return i=eJn(n),t.ti(e,i)}function NY(n){var t;return Urn(t=new ev,n),t}function $Y(n){var t;return MIn(t=new ev,n),t}function DY(n,t){return Qun(t,cQ(n.f,t)),null}function xY(n){return!n.b&&(n.b=new fV(aFt,n,12,3)),n.b}function RY(n){return Fq(null==n||NV(n)&&!(n.Tm===j)),n}function KY(n){return n.n&&(n.e!==E1n&&n.je(),n.j=null),n}function FY(n){if(bpn(n.d),n.d.d!=n.c)throw hv(new Fv)}function _Y(n){return MK(n.b<n.d.gc()),n.d.Xb(n.c=n.b++)}function BY(n){n.a.a=n.c,n.c.b=n.a,n.a.b=n.c.a=null,n.b=0}function HY(n){this.f=n,this.c=this.f.e,n.f>0&&XEn(this)}function UY(n,t){this.a=n,CK.call(this,n,uG(n.d,15).fd(t))}function GY(n,t){return ugn(EX(n)*jX(n),EX(t)*jX(t))}function qY(n,t){return ugn(EX(n)*jX(n),EX(t)*jX(t))}function XY(n){return BNn(n)&&oM(gK(zDn(n,(jYn(),hMt))))}function zY(n,t){return UNn(n,uG(oIn(t,(jYn(),UMt)),17),t)}function VY(n,t){return uG(oIn(n,(GYn(),Vpt)),15).Fc(t),t}function WY(n,t){return n.b=t.b,n.c=t.c,n.d=t.d,n.a=t.a,n}function QY(n,t,e,i){this.b=n,this.c=i,rL.call(this,t,e)}function JY(n,t,e){n.i=0,n.e=0,t!=e&&tln(n,t,e)}function YY(n,t,e){n.i=0,n.e=0,t!=e&&eln(n,t,e)}function ZY(n,t,e){return JS(),opn(uG(cQ(n.e,t),529),e)}function nZ(n){return n.f||(n.f=new OE(n,n.c))}function tZ(n,t){return Hwn(n.j,t.s,t.c)+Hwn(t.e,n.s,n.c)}function eZ(n,t){n.e&&!n.e.a&&(iv(n.e,t),eZ(n.e,t))}function iZ(n,t){n.d&&!n.d.a&&(iv(n.d,t),iZ(n.d,t))}function rZ(n,t){return-ugn(EX(n)*jX(n),EX(t)*jX(t))}function cZ(n){return uG(n.ld(),149).Pg()+":"+cpn(n.md())}function aZ(){HIn(this,new Fl),this.wb=(tQ(),M_t),vj()}function oZ(n){this.b=new Zm,Ohn(this.b,this.b),this.a=n}function uZ(n,t){new lS,this.a=new Uk,this.b=n,this.c=t}function sZ(){sZ=E,Jot=new N,Yot=new N,Zot=new $}function hZ(){hZ=E,zot=new C,Vot=new O,Wot=new A}function fZ(){fZ=E,Gut=new dn,Xut=new tz,qut=new gn}function lZ(){lZ=E,aft=new Zm,cft=new Ym,rft=new Zm}function bZ(n,t){if(null==n)throw hv(new MM(t));return n}function wZ(n){return!n.a&&(n.a=new fV(bFt,n,10,11)),n.a}function dZ(n){return!n.q&&(n.q=new fV(p_t,n,11,10)),n.q}function gZ(n){return!n.s&&(n.s=new fV(o_t,n,21,17)),n.s}function pZ(n){return WW(n),KMn(new Fz(ix(n.a.Kc(),new h)))}function mZ(n,t){return Tbn(n),Tbn(t),cM(uG(n,22),uG(t,22))}function vZ(n,t,e){nrn(n,t,new Pb(Q_(e)))}function kZ(n,t,e,i,r,c){wtn.call(this,n,t,e,i,r,c?-2:-1)}function yZ(n,t,e,i){LA.call(this,t,e),this.b=n,this.a=i}function MZ(n,t){Sy.call(this,new Hz(n)),this.a=n,this.b=t}function TZ(n){this.b=n,this.c=n,n.e=null,n.c=null,this.a=1}function jZ(n){var t;GB(),(t=uG(n.g,10)).n.a=n.d.c+t.d.b}function EZ(){var n,t;EZ=E,t=!ovn(),n=new v,_at=t?new m:n}function SZ(n){return hZ(),F$(n,59)?new eT(n):new gx(n)}function PZ(n){return F$(n,16)?new oX(uG(n,16)):cG(n.Kc())}function CZ(n){return new WD(n,n.e.Rd().gc()*n.c.Rd().gc())}function IZ(n){return new QD(n,n.e.Rd().gc()*n.c.Rd().gc())}function OZ(n){return n&&n.hashCode?n.hashCode():xx(n)}function AZ(n,t){return null==t?!!FX(n.f,null):_X(n.i,t)}function LZ(n,t){var e;return(e=Q$(n.a,t))&&(t.d=null),e}function NZ(n,t,e){return!!n.f&&n.f.ef(t,e)}function $Z(n,t,e,i){uQ(n.c[t.g],e.g,i),uQ(n.c[e.g],t.g,i)}function DZ(n,t,e,i){uQ(n.c[t.g],t.g,e),uQ(n.b[t.g],t.g,i)}function xZ(n,t,e){return uM(pK(e.a))<=n&&uM(pK(e.b))>=t}function RZ(n,t){this.g=n,this.d=Uhn(cT(pbt,1),e6n,10,0,[t])}function KZ(n){this.c=n,this.b=new Hj(uG(WW(new pn),50))}function FZ(n){this.c=n,this.b=new Hj(uG(WW(new jt),50))}function _Z(n){this.b=n,this.a=new Hj(uG(WW(new nt),50))}function BZ(){this.b=new ek,this.d=new lS,this.e=new Ok}function HZ(){this.c=new sj,this.d=new sj,this.e=new sj}function UZ(){this.a=new Uk,this.b=(man(3,g1n),new R7(3))}function GZ(n,t){this.e=n,this.a=dat,this.b=$Bn(t),this.c=t}function qZ(n){this.c=n.c,this.d=n.d,this.b=n.b,this.a=n.a}function XZ(n,t,e,i,r,c){this.a=n,Ran.call(this,t,e,i,r,c)}function zZ(n,t,e,i,r,c){this.a=n,Ran.call(this,t,e,i,r,c)}function VZ(n,t,e,i,r,c,a){return new i8(n.e,t,e,i,r,c,a)}function WZ(n,t,e){return e>=0&&m_(n.substr(e,t.length),t)}function QZ(n,t){return F$(t,149)&&m_(n.b,uG(t,149).Pg())}function JZ(n,t){return n.a?t.Gh().Kc():uG(t.Gh(),71).Ii()}function YZ(n,t){var e;return w8(e=n.b.Qc(t),n.b.gc()),e}function ZZ(n,t){if(null==n)throw hv(new MM(t));return n}function n1(n){return n.u||(y9(n),n.u=new aF(n,n)),n.u}function t1(n){this.a=(hZ(),F$(n,59)?new eT(n):new gx(n))}function e1(n){return uG(Lsn(n,16),29)||n.ii()}function i1(n,t){var e;return e=Ij(n.Rm),null==t?e:e+": "+t}function r1(n,t,e){return Knn(t,e,n.length),n.substr(t,e-t)}function c1(n,t){HF.call(this),Qrn(this),this.a=n,this.c=t}function a1(n){n&&i1(n,n.ie()),String.fromCharCode(10)}function o1(n){XM(),e.setTimeout((function(){throw n}),0)}function u1(){return _kn(),Uhn(cT(nst,1),p1n,436,0,[Wut,Vut])}function s1(){return Xin(),Uhn(cT(mst,1),p1n,435,0,[Yut,Zut])}function h1(){return zin(),Uhn(cT(mlt,1),p1n,432,0,[gft,pft])}function f1(){return Aun(),Uhn(cT(Dbt,1),p1n,517,0,[Obt,Ibt])}function l1(){return Y6(),Uhn(cT(Nmt,1),p1n,429,0,[kpt,ypt])}function b1(){return Vin(),Uhn(cT(Mgt,1),p1n,428,0,[dgt,ggt])}function w1(){return H7(),Uhn(cT(tgt,1),p1n,431,0,[Vdt,Wdt])}function d1(){return nin(),Uhn(cT(Jjt,1),p1n,430,0,[Gjt,qjt])}function g1(){return Z6(),Uhn(cT(cSt,1),p1n,531,0,[YEt,JEt])}function p1(){return pon(),Uhn(cT(iIt,1),p1n,501,0,[VCt,WCt])}function m1(){return b0(),Uhn(cT(gSt,1),p1n,523,0,[fSt,hSt])}function v1(){return w0(),Uhn(cT(xSt,1),p1n,522,0,[wSt,dSt])}function k1(){return _7(),Uhn(cT(qSt,1),p1n,528,0,[DSt,$St])}function y1(){return Wtn(),Uhn(cT(Hgt,1),p1n,488,0,[Ngt,Lgt])}function M1(){return a9(),Uhn(cT(CAt,1),p1n,491,0,[yAt,MAt])}function T1(){return rhn(),Uhn(cT($At,1),p1n,492,0,[OAt,AAt])}function j1(){return i3(),Uhn(cT(QCt,1),p1n,433,0,[_Ct,FCt])}function E1(){return Ptn(),Uhn(cT(lIt,1),p1n,434,0,[cIt,aIt])}function S1(){return l0(),Uhn(cT(JSt,1),p1n,465,0,[USt,GSt])}function P1(){return B7(),Uhn(cT(uLt,1),p1n,438,0,[nLt,ZAt])}function C1(){return Vhn(),Uhn(cT(JLt,1),p1n,437,0,[VLt,zLt])}function I1(){return CU(),Uhn(cT(jKt,1),p1n,347,0,[gKt,pKt])}function O1(n,t,e,i){return e>=0?n.Uh(t,e,i):n.Ch(null,e,i)}function A1(n){return 0==n.b.b?n.a.sf():tG(n.b)}function L1(n){if(5!=n.p)throw hv(new xv);return pz(n.f)}function N1(n){if(5!=n.p)throw hv(new xv);return pz(n.k)}function $1(n){return xA(n.a)===xA((Oun(),Q_t))&&eVn(n),n.a}function D1(n,t){n.b=t,n.c>0&&n.b>0&&(n.g=mX(n.c,n.b,n.a))}function x1(n,t){n.c=t,n.c>0&&n.b>0&&(n.g=mX(n.c,n.b,n.a))}function R1(n,t){nw(this,new MO(n.a,n.b)),tw(this,oG(t))}function K1(){Py.call(this,new sS(orn(12))),FD(!0),this.a=2}function F1(n,t,e){QYn(),Qm.call(this,n),this.b=t,this.a=e}function _1(n,t,e){ZN(),Hm.call(this,t),this.a=n,this.b=e}function B1(n){var t;t=n.c.d.b,n.b=t,n.a=n.c.d,t.a=n.c.d.b=n}function H1(n){return 0==n.b?null:(MK(0!=n.b),Lrn(n,n.a.a))}function U1(n,t){return null==t?DA(FX(n.f,null)):_P(n.i,t)}function G1(n,t,e,i,r){return new AOn(n,(Rtn(),vut),t,e,i,r)}function q1(n,t){return V5(t),Jcn(n,Inn(YHt,W1n,28,t,15,1),t)}function X1(n,t){return bZ(n,"set1"),bZ(t,"set2"),new GE(n,t)}function z1(n,t){var e=Rat[n.charCodeAt(0)];return null==e?n:e}function V1(n,t){var e;return pWn(n,t,e=new B),e.d}function W1(n,t,e,i){var r;r=new AF,t.a[e.g]=r,UV(n.b,i,r)}function Q1(n,t){return JF(BR(Lcn(n.f,t)),n.f.d)}function J1(n){Lan(n.a),zN(n.a),Apn(new Ad(n.a))}function Y1(n,t){iBn(n,!0),Prn(n.e.Rf(),new DB(n,!0,t))}function Z1(n,t){return lZ(),n==R0(bIn(t))||n==R0(gIn(t))}function n0(n,t){return tcn(),uG(oIn(t,(QGn(),ACt)),17).a==n}function t0(n){return 0|Math.max(Math.min(n,vZn),-2147483648)}function e0(n){this.a=uG(WW(n),277),this.b=(hZ(),new mx(n))}function i0(n,t,e){this.i=new Zm,this.b=n,this.g=t,this.a=e}function r0(n,t,e){this.a=new Zm,this.e=n,this.f=t,this.c=e}function c0(n,t,e){this.c=new Zm,this.e=n,this.f=t,this.b=e}function a0(n){HF.call(this),Qrn(this),this.a=n,this.c=!0}function o0(n){function t(){}return t.prototype=n||{},new t}function u0(n){if(n.Ae())return null;var t=n.n;return sZn[t]}function s0(n){return n.Db>>16!=3?null:uG(n.Cb,27)}function h0(n){return n.Db>>16!=9?null:uG(n.Cb,27)}function f0(n){return n.Db>>16!=6?null:uG(n.Cb,74)}function l0(){l0=E,USt=new XI(z2n,0),GSt=new XI(V2n,1)}function b0(){b0=E,fSt=new OI(V2n,0),hSt=new OI(z2n,1)}function w0(){w0=E,wSt=new AI(c3n,0),dSt=new AI("UP",1)}function d0(){d0=E,Aat=Abn((Hy(),Uhn(cT(Lat,1),p1n,549,0,[Iat])))}function g0(n){var t;return Dfn(t=new Dj(orn(n.length)),n),t}function p0(n,t){return n.b+=t.b,n.c+=t.c,n.d+=t.d,n.a+=t.a,n}function m0(n,t){return!!Chn(n,t)&&(lan(n),!0)}function v0(n,t){if(null==t)throw hv(new Rv);return Tvn(n,t)}function k0(n,t){var e;e=n.q.getHours(),n.q.setDate(t),Iqn(n,e)}function y0(n,t,e){var i;(i=n.Ih(t))>=0?n.bi(i,e):lRn(n,t,e)}function M0(n,t){var e;return(e=n.Ih(t))>=0?n.Wh(e):$Nn(n,t)}function T0(n,t){var e;for(WW(t),e=n.a;e;e=e.c)t.Yd(e.g,e.i)}function j0(n,t,e){var i;i=Ufn(n,t,e),n.b=new Don(i.c.length)}function E0(n,t,e){W0(),n&&vJ(LFt,n,t),n&&vJ(AFt,n,e)}function S0(n,t){return UB(),qx(),uG(t.a,17).a<n}function P0(n,t){return UB(),qx(),uG(t.b,17).a<n}function C0(n,t){return e.Math.abs(n)<e.Math.abs(t)?n:t}function I0(n){return!n.a&&(n.a=new fV(bFt,n,10,11)),n.a.i>0}function O0(n){var t;return t=n.d,t=n.bj(n.f),ttn(n,t),t.Ob()}function A0(n,t){var e;return zCn(e=new aX(t),n),new Z_(e)}function L0(n){if(0!=n.p)throw hv(new xv);return HA(n.f,0)}function N0(n){if(0!=n.p)throw hv(new xv);return HA(n.k,0)}function $0(n){return n.Db>>16!=7?null:uG(n.Cb,241)}function D0(n){return n.Db>>16!=6?null:uG(n.Cb,241)}function x0(n){return n.Db>>16!=7?null:uG(n.Cb,167)}function R0(n){return n.Db>>16!=11?null:uG(n.Cb,27)}function K0(n){return n.Db>>16!=17?null:uG(n.Cb,29)}function F0(n){return n.Db>>16!=3?null:uG(n.Cb,155)}function _0(n){return vgn(n),JJ(n,new Md(new ek))}function B0(n,t){var e=n.a=n.a||[];return e[t]||(e[t]=n.ve(t))}function H0(n,t){var e;e=n.q.getHours(),n.q.setMonth(t),Iqn(n,e)}function U0(n,t){LD(this),this.f=t,this.g=n,KY(this),this.je()}function G0(n,t){this.a=n,this.c=D$(this.a),this.b=new qZ(t)}function q0(n,t,e){this.a=t,this.c=n,this.b=(WW(e),new Z_(e))}function X0(n,t,e){this.a=t,this.c=n,this.b=(WW(e),new Z_(e))}function z0(n){this.a=n,this.b=Inn(WEt,zZn,2043,n.e.length,0,2)}function V0(){this.a=new XL,this.e=new ek,this.g=0,this.i=0}function W0(){W0=E,LFt=new Ym,AFt=new Ym,pA(iut,new fs)}function Q0(){Q0=E,jEt=wz(new wJ,(uIn(),Plt),(zYn(),Owt))}function J0(){J0=E,EEt=wz(new wJ,(uIn(),Plt),(zYn(),Owt))}function Y0(){Y0=E,PEt=wz(new wJ,(uIn(),Plt),(zYn(),Owt))}function Z0(){Z0=E,tSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt))}function n2(){n2=E,aSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt))}function t2(){t2=E,sSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt))}function e2(){e2=E,mSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt))}function i2(n,t,e,i,r,c){return new Ken(n.e,t,n.Lj(),e,i,r,c)}function r2(n,t,e){return null==t?VAn(n.f,null,e):kgn(n.i,t,e)}function c2(n,t){n.c&&men(n.c.g,n),n.c=t,n.c&&kD(n.c.g,n)}function a2(n,t){n.c&&men(n.c.a,n),n.c=t,n.c&&kD(n.c.a,n)}function o2(n,t){n.i&&men(n.i.j,n),n.i=t,n.i&&kD(n.i.j,n)}function u2(n,t){n.d&&men(n.d.e,n),n.d=t,n.d&&kD(n.d.e,n)}function s2(n,t){n.a&&men(n.a.k,n),n.a=t,n.a&&kD(n.a.k,n)}function h2(n,t){n.b&&men(n.b.f,n),n.b=t,n.b&&kD(n.b.f,n)}function f2(n,t){dQ(n,n.b,n.c),uG(n.b.b,68),t&&uG(t.b,68).b}function l2(n,t){return ugn(uG(n.c,65).c.e.b,uG(t.c,65).c.e.b)}function b2(n,t){return ugn(uG(n.c,65).c.e.a,uG(t.c,65).c.e.a)}function w2(n){return Mbn(),qx(),0!=uG(n.a,86).d.e}function d2(n,t){F$(n.Cb,184)&&(uG(n.Cb,184).tb=null),qon(n,t)}function g2(n,t){F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),4),qon(n,t)}function p2(n,t){Pgn(n,t),F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),2)}function m2(n,t){null!=t.c&&pQ(n,new QW(t.c))}function v2(n){var t;return vj(),Urn(t=new ev,n),t}function k2(n){var t;return vj(),Urn(t=new ev,n),t}function y2(n){for(var t;;)if(t=n.Pb(),!n.Ob())return t}function M2(n,t,e){return kD(n.a,(TJ(),IMn(t,e),new FE(t,e))),n}function T2(n,t){return PP(),ein(t)?new Cq(t,n):new OA(t,n)}function j2(n){return cHn(),dwn(n,0)>=0?Rmn(n):hW(Rmn(Men(n)))}function E2(n){var t;return t=uG(tq(n.b),9),new nB(n.a,t,n.c)}function S2(n,t){var e;return(e=uG(Xwn(nZ(n.a),t),16))?e.gc():0}function P2(n,t,e){var i;hdn(t,e,n.c.length),i=e-t,nE(n.c,t,i)}function C2(n,t,e){hdn(t,e,n.gc()),this.c=n,this.a=t,this.b=e-t}function I2(n){this.c=new lS,this.b=n.b,this.d=n.c,this.a=n.a}function O2(n){this.a=e.Math.cos(n),this.b=e.Math.sin(n)}function A2(n,t,e,i){this.c=n,this.d=i,s2(this,t),h2(this,e)}function L2(n,t){Ey.call(this,new sS(orn(n))),man(t,XZn),this.a=t}function N2(n,t,e){return new AOn(n,(Rtn(),mut),null,!1,t,e)}function $2(n,t,e){return new AOn(n,(Rtn(),kut),t,e,null,!1)}function D2(){return ybn(),Uhn(cT(Rut,1),p1n,108,0,[Cut,Iut,Out])}function x2(){return Yen(),Uhn(cT(hht,1),p1n,472,0,[Fst,Kst,Rst])}function R2(){return Ktn(),Uhn(cT(xst,1),p1n,471,0,[Ast,Ost,Lst])}function K2(){return Yrn(),Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])}function F2(){return Jen(),Uhn(cT(Clt,1),p1n,391,0,[glt,dlt,plt])}function _2(){return gon(),Uhn(cT(Rdt,1),p1n,372,0,[Sdt,Edt,jdt])}function B2(){return jan(),Uhn(cT(agt,1),p1n,322,0,[Zdt,Ydt,ngt])}function H2(){return ran(),Uhn(cT(bgt,1),p1n,351,0,[igt,cgt,rgt])}function U2(){return Pfn(),Uhn(cT(Ogt,1),p1n,460,0,[kgt,vgt,ygt])}function G2(){return ihn(),Uhn(cT(mpt,1),p1n,299,0,[fpt,lpt,hpt])}function q2(){return Zen(),Uhn(cT(Mpt,1),p1n,311,0,[gpt,ppt,dpt])}function X2(){return Cwn(),Uhn(cT(pjt,1),p1n,390,0,[ujt,sjt,hjt])}function z2(){return can(),Uhn(cT(eEt,1),p1n,463,0,[Qjt,Vjt,Wjt])}function V2(){return isn(),Uhn(cT(oEt,1),p1n,387,0,[Zjt,nEt,tEt])}function W2(){return Sln(),Uhn(cT(lEt,1),p1n,349,0,[aEt,rEt,cEt])}function Q2(){return kbn(),Uhn(cT(pEt,1),p1n,350,0,[sEt,hEt,fEt])}function J2(){return ian(),Uhn(cT(MEt,1),p1n,352,0,[gEt,wEt,dEt])}function Y2(){return zhn(),Uhn(cT(xEt,1),p1n,388,0,[kEt,yEt,vEt])}function Z2(){return ean(),Uhn(cT(qEt,1),p1n,464,0,[_Et,BEt,HEt])}function n3(n){return Gfn(Uhn(cT(PNt,1),zZn,8,0,[n.i.n,n.n,n.a]))}function t3(){return Pln(),Uhn(cT(RCt,1),p1n,392,0,[gPt,dPt,wPt])}function e3(){e3=E,UCt=wz(new wJ,(Cjn(),WSt),(OHn(),ePt))}function i3(){i3=E,_Ct=new JI("DFS",0),FCt=new JI("BFS",1)}function r3(n,t,e){var i;(i=new ia).b=t,i.a=e,++t.b,kD(n.d,i)}function c3(n,t,e){var i;JF(i=new eN(e.d),n),jgn(t,i.a,i.b)}function a3(n,t){pD(n,pz(E3($z(t,24),W0n)),pz(E3(t,W0n)))}function o3(n,t){if(n<0||n>t)throw hv(new dM(h2n+n+f2n+t))}function u3(n,t){if(n<0||n>=t)throw hv(new dM(h2n+n+f2n+t))}function s3(n,t){if(n<0||n>=t)throw hv(new JM(h2n+n+f2n+t))}function h3(n,t){this.b=(tJ(n),n),this.a=t&j0n?t:64|t|VZn}function f3(n){return vgn(n),sZ(),sZ(),krn(n,Yot)}function l3(n,t,e){var i;return(i=uXn(n,t,!1)).b<=t&&i.a<=e}function b3(){return den(),Uhn(cT(LAt,1),p1n,439,0,[EAt,PAt,SAt])}function w3(){return Bgn(),Uhn(cT(kAt,1),p1n,394,0,[IOt,OOt,COt])}function d3(){return Jmn(),Uhn(cT(dOt,1),p1n,445,0,[oOt,uOt,sOt])}function g3(){return Zyn(),Uhn(cT(AOt,1),p1n,456,0,[lOt,wOt,bOt])}function p3(){return vbn(),Uhn(cT(nOt,1),p1n,393,0,[sIt,hIt,fIt])}function m3(){return esn(),Uhn(cT(hOt,1),p1n,300,0,[iOt,rOt,eOt])}function v3(){return Own(),Uhn(cT(Kxt,1),p1n,346,0,[Oxt,Ixt,Axt])}function k3(){return Rdn(),Uhn(cT(VAt,1),p1n,444,0,[HAt,UAt,GAt])}function y3(){return Zrn(),Uhn(cT(lxt,1),p1n,278,0,[ixt,rxt,cxt])}function M3(){return Iwn(),Uhn(cT(mKt,1),p1n,280,0,[lKt,fKt,bKt])}function T3(n){return WW(n),F$(n,16)?new Z_(uG(n,16)):rG(n.Kc())}function j3(n,t){return n&&n.equals?n.equals(t):xA(n)===xA(t)}function E3(n,t){return Esn(Oz(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function S3(n,t){return Esn(Az(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function P3(n,t){return Esn(Lz(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function C3(n,t){var e;return kK(!!(e=(tJ(n),n).g)),tJ(t),e(t)}function I3(n,t){var e,i;return i=KV(n,t),e=n.a.fd(i),new BE(n,e)}function O3(n){return n.Db>>16!=6?null:uG(J$n(n),241)}function A3(n){if(2!=n.p)throw hv(new xv);return pz(n.f)&D1n}function L3(n){if(2!=n.p)throw hv(new xv);return pz(n.k)&D1n}function N3(n){return MK(n.a<n.c.c.length),n.b=n.a++,n.c.c[n.b]}function $3(n,t){n.b=n.b|t.b,n.c=n.c|t.c,n.d=n.d|t.d,n.a=n.a|t.a}function D3(n,t){var e;e=uM(pK(n.a.of((XYn(),LDt)))),pJn(n,t,e)}function x3(n,t){VV.call(this,1,2,Uhn(cT(YHt,1),W1n,28,15,[n,t]))}function R3(n,t,e){Qm.call(this,25),this.b=n,this.a=t,this.c=e}function K3(n){QYn(),Qm.call(this,n),this.c=!1,this.a=!1}function F3(n){return n.a==(N7(),TBt)&&gw(n,X_n(n.g,n.b)),n.a}function _3(n){return n.d==(N7(),TBt)&&mw(n,oqn(n.g,n.b)),n.d}function B3(n,t){return Win(),n.c==t.c?ugn(t.d,n.d):ugn(t.c,n.c)}function H3(n,t){return Win(),n.c==t.c?ugn(t.d,n.d):ugn(n.c,t.c)}function U3(n,t){return Win(),n.c==t.c?ugn(n.d,t.d):ugn(n.c,t.c)}function G3(n,t){return Win(),n.c==t.c?ugn(n.d,t.d):ugn(t.c,n.c)}function q3(n,t){return KX(n.a,t)?nq(n.b,uG(t,22).g,null):null}function X3(n){return Lgn(Nz(Bsn(uRn(n,32)),32),Bsn(uRn(n,32)))}function z3(n){return null==n.b||0==n.b.length?"n_"+n.a:"n_"+n.b}function V3(n){return null==n.c||0==n.c.length?"n_"+n.g:"n_"+n.c}function W3(n,t){var e;for(e=n+"";e.length<t;)e="0"+e;return e}function Q3(n,t){var e;e=uG(cQ(n.g,t),60),Prn(t.d,new HC(n,e))}function J3(n,t){var e,i;return(e=qTn(n))<(i=qTn(t))?-1:e>i?1:0}function Y3(n,t){var e;return e=jen(t),uG(cQ(n.c,e),17).a}function Z3(n,t,e){var i;i=n.d[t.p],n.d[t.p]=n.d[e.p],n.d[e.p]=i}function n4(n,t,e){var i;n.n&&t&&e&&(i=new Yu,kD(n.e,i))}function t4(n,t){if(FV(n.a,t),t.d)throw hv(new Ky(p2n));t.d=n}function e4(n,t){this.a=new Zm,this.d=new Zm,this.f=n,this.c=t}function i4(){this.c=new z$,this.a=new p7,this.b=new yk,XS()}function r4(){Whn(),this.b=new Ym,this.a=new Ym,this.c=new Zm}function c4(n,t,e){this.d=n,this.j=t,this.e=e,this.o=-1,this.p=3}function a4(n,t,e){this.d=n,this.k=t,this.f=e,this.o=-1,this.p=5}function o4(n,t,e,i,r,c){Bcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function u4(n,t,e,i,r,c){Hcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function s4(n,t,e,i,r,c){E9.call(this,n,t,e,i,r),c&&(this.o=-2)}function h4(n,t,e,i,r,c){qcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function f4(n,t,e,i,r,c){S9.call(this,n,t,e,i,r),c&&(this.o=-2)}function l4(n,t,e,i,r,c){Ucn.call(this,n,t,e,i,r),c&&(this.o=-2)}function b4(n,t,e,i,r,c){Gcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function w4(n,t,e,i,r,c){P9.call(this,n,t,e,i,r),c&&(this.o=-2)}function d4(n,t,e,i){Hm.call(this,e),this.b=n,this.c=t,this.d=i}function g4(n,t){this.f=n,this.a=(N7(),MBt),this.c=MBt,this.b=t}function p4(n,t){this.g=n,this.d=(N7(),TBt),this.a=TBt,this.b=t}function m4(n,t){!n.c&&(n.c=new wsn(n,0)),BXn(n.c,(uVn(),nHt),t)}function v4(n,t){return lxn(n,t,F$(t,102)&&!!(uG(t,19).Bb&P0n))}function k4(n,t){return rW(Bsn(n.q.getTime()),Bsn(t.q.getTime()))}function y4(n){return Dq(n.e.Rd().gc()*n.c.Rd().gc(),16,new zl(n))}function M4(n){return!(!n.u||0==z5(n.u.a).i||n.n&&yMn(n.n))}function T4(n){return!(!n.a||0==Aen(n.a.a).i||n.b&&MMn(n.b))}function j4(n,t){return 0==t?!!n.o&&0!=n.o.f:Wkn(n,t)}function E4(n,t,e){var i;return!!(i=uG(n.Zb().xc(t),16))&&i.Hc(e)}function S4(n,t,e){var i;return!!(i=uG(n.Zb().xc(t),16))&&i.Mc(e)}function P4(n,t){var e;return e=1-t,n.a[e]=Ton(n.a[e],e),Ton(n,t)}function C4(n,t){var e;return e=E3(n,L0n),S3(Nz(t,32),e)}function I4(n,t,e){WW(n),mjn(new q0(new Z_(n),t,e))}function O4(n,t,e){WW(n),vjn(new X0(new Z_(n),t,e))}function A4(n,t,e,i,r,c){return Dsn(n,t,e,c),gdn(n,i),vdn(n,r),n}function L4(n,t,e,i){return n.a+=""+r1(null==t?IZn:cpn(t),e,i),n}function N4(n,t){this.a=n,Jw.call(this,n),o3(t,n.gc()),this.b=t}function $4(n){this.a=Inn(dat,EZn,1,pfn(e.Math.max(8,n))<<1,5,1)}function D4(n){return uG(Ekn(n,Inn(pbt,e6n,10,n.c.length,0,1)),199)}function x4(n){return uG(Ekn(n,Inn(obt,t6n,18,n.c.length,0,1)),483)}function R4(n){return n.a?0==n.e.length?n.a.a:n.a.a+""+n.e:n.c}function K4(n){for(;n.d>0&&0==n.a[--n.d];);0==n.a[n.d++]&&(n.e=0)}function F4(n){return MK(n.b.b!=n.d.a),n.c=n.b=n.b.b,--n.a,n.c.c}function _4(n,t,e){n.a=t,n.c=e,n.b.a.$b(),BY(n.d),Xv(n.e.a.c,0)}function B4(n,t){var e;n.e=new dy,f$(e=GFn(t),n.c),T_n(n,e,0)}function H4(n,t,e,i){var r;(r=new gu).a=t,r.b=e,r.c=i,aq(n.a,r)}function U4(n,t,e,i){var r;(r=new gu).a=t,r.b=e,r.c=i,aq(n.b,r)}function G4(n,t,e){if(n<0||t<n||t>e)throw hv(new dM(QOn(n,t,e)))}function q4(n,t){if(n<0||n>=t)throw hv(new dM(TLn(n,t)));return n}function X4(n){if(!("stack"in n))try{throw n}catch(t){}return n}function z4(n){return JS(),F$(n.g,10)?uG(n.g,10):null}function V4(n){return!uY(n).dc()&&(h$(n,new w),!0)}function W4(n){var t;return _L(n)?-0==(t=n)?0:t:Gen(n)}function Q4(n,t){return!!F$(t,44)&&sTn(n.a,uG(t,44))}function J4(n,t){return!!F$(t,44)&&sTn(n.a,uG(t,44))}function Y4(n,t){return!!F$(t,44)&&sTn(n.a,uG(t,44))}function Z4(n){var t;return GQ(n),t=new D,tE(n.a,new vd(t)),t}function n6(){var n,t;return n=new ev,kD(gBt,t=n),t}function t6(n){var t;return GQ(n),t=new x,tE(n.a,new kd(t)),t}function e6(n,t){return n.a<=n.b&&(t.Dd(n.a++),!0)}function i6(n){dun.call(this,n,(Rtn(),put),null,!1,null,!1)}function r6(){r6=E,_ht=Abn((BS(),Uhn(cT(oft,1),p1n,489,0,[Kht])))}function c6(){c6=E,$Et=MJ(xwn(1),xwn(4)),NEt=MJ(xwn(1),xwn(2))}function a6(n,t){return new LU(t,HR(D$(t.e),n,n),(qx(),!0))}function o6(n){return new R7((man(n,v1n),arn(Lgn(Lgn(5,n),n/10|0))))}function u6(n){return Dq(n.e.Rd().gc()*n.c.Rd().gc(),273,new Xl(n))}function s6(n){return uG(Ekn(n,Inn(Abt,i6n,12,n.c.length,0,1)),2042)}function h6(n){return n2(),!(v9(n)||!v9(n)&&n.c.i.c==n.d.i.c)}function f6(n,t){return ncn(),uG(oIn(t,(QGn(),kCt)),17).a>=n.gc()}function l6(n,t){_Jn(t,n),NG(n.d),NG(uG(oIn(n,(jYn(),SMt)),214))}function b6(n,t){BJn(t,n),$G(n.d),$G(uG(oIn(n,(jYn(),SMt)),214))}function w6(n,t,e){n.d&&men(n.d.e,n),n.d=t,n.d&&GX(n.d.e,e,n)}function d6(n,t,e){return e.f.c.length>0?HV(n.a,t,e):HV(n.b,t,e)}function g6(n,t,e){var i;i=bkn();try{return SF(n,t,e)}finally{m8(i)}}function p6(n,t){var e,i;return i=null,(e=v0(n,t))&&(i=e.pe()),i}function m6(n,t){var e,i;return i=null,(e=v0(n,t))&&(i=e.se()),i}function v6(n,t){var e,i;return i=null,(e=uin(n,t))&&(i=e.se()),i}function k6(n,t){var e,i;return i=null,(e=v0(n,t))&&(i=uAn(e)),i}function y6(n,t,e){var i;return i=jvn(e),yHn(n.g,i,t),yHn(n.i,t,e),t}function M6(n,t,e){this.d=new qg(this),this.e=n,this.i=t,this.f=e}function T6(n,t,e,i){this.e=null,this.c=n,this.d=t,this.a=e,this.b=i}function j6(n,t,e,i){A$(this),this.c=n,this.e=t,this.f=e,this.b=i}function E6(n,t,e,i){this.d=n,this.n=t,this.g=e,this.o=i,this.p=-1}function S6(n,t,e,i){return F$(e,59)?new Yx(n,t,e,i):new qz(n,t,e,i)}function P6(n){return F$(n,16)?uG(n,16).dc():!n.Kc().Ob()}function C6(n){if(n.e.g!=n.b)throw hv(new Fv);return!!n.c&&n.d>0}function I6(n){return MK(n.b!=n.d.c),n.c=n.b,n.b=n.b.a,++n.a,n.c.c}function O6(n,t){tJ(t),uQ(n.a,n.c,t),n.c=n.c+1&n.a.length-1,JTn(n)}function A6(n,t){tJ(t),n.b=n.b-1&n.a.length-1,uQ(n.a,n.b,t),JTn(n)}function L6(n){var t;t=n.Gh(),this.a=F$(t,71)?uG(t,71).Ii():t.Kc()}function N6(n){return new h3(Vrn(uG(n.a.md(),16).gc(),n.a.ld()),16)}function $6(){$6=E,WAt=Abn((nP(),Uhn(cT(JAt,1),p1n,490,0,[zAt])))}function D6(){D6=E,YAt=Abn((tP(),Uhn(cT(tLt,1),p1n,558,0,[QAt])))}function x6(){x6=E,XLt=Abn((eP(),Uhn(cT(WLt,1),p1n,539,0,[GLt])))}function R6(){return Uvn(),Uhn(cT(abt,1),p1n,389,0,[tbt,Zlt,Ylt,nbt])}function K6(){return Rtn(),Uhn(cT(Tut,1),p1n,304,0,[put,mut,vut,kut])}function F6(){return vyn(),Uhn(cT(Sht,1),p1n,332,0,[yht,kht,Mht,Tht])}function _6(){return myn(),Uhn(cT(Fht,1),p1n,406,0,[Nht,Lht,$ht,Dht])}function B6(){return ehn(),Uhn(cT(jht,1),p1n,417,0,[pht,wht,dht,ght])}function H6(){return Xhn(),Uhn(cT(ebt,1),p1n,416,0,[Flt,Hlt,_lt,Blt])}function U6(){return qhn(),Uhn(cT(mdt,1),p1n,421,0,[odt,udt,sdt,hdt])}function G6(){return Ghn(),Uhn(cT(adt,1),p1n,371,0,[zwt,qwt,Xwt,Gwt])}function q6(){return Yyn(),Uhn(cT(jjt,1),p1n,203,0,[djt,gjt,wjt,bjt])}function X6(){return yvn(),Uhn(cT(Xjt,1),p1n,284,0,[Fjt,Kjt,_jt,Bjt])}function z6(n){return n.j==(KQn(),KRt)&&$x(_$n(n),kRt)}function V6(n,t){var e;c2(e=t.a,t.c.d),u2(e,t.d.d),Xun(e.a,n.n)}function W6(n,t){var e;return!(e=uG(ain(n.b,t),67))&&(e=new lS),e}function Q6(n){return JS(),F$(n.g,154)?uG(n.g,154):null}function J6(n){n.a=null,n.e=null,Xv(n.b.c,0),Xv(n.f.c,0),n.c=null}function Y6(){Y6=E,kpt=new sI(G2n,0),ypt=new sI("TOP_LEFT",1)}function Z6(){Z6=E,YEt=new SI("UPPER",0),JEt=new SI("LOWER",1)}function n5(n,t){return bD(new MO(t.e.a+t.f.a/2,t.e.b+t.f.b/2),n)}function t5(n,t){return uG(yx(Wz(uG(Y9(n.k,t),15).Oc(),Fdt)),113)}function e5(n,t){return uG(yx(Qz(uG(Y9(n.k,t),15).Oc(),Fdt)),113)}function i5(){return Cjn(),Uhn(cT(ZSt,1),p1n,405,0,[zSt,VSt,WSt,QSt])}function r5(){return mbn(),Uhn(cT(BCt,1),p1n,353,0,[xCt,$Ct,DCt,NCt])}function c5(){return dTn(),Uhn(cT(cOt,1),p1n,354,0,[ZIt,JIt,YIt,QIt])}function a5(){return Qmn(),Uhn(cT(sKt,1),p1n,386,0,[QRt,JRt,WRt,VRt])}function o5(){return Ajn(),Uhn(cT(Wxt,1),p1n,291,0,[Rxt,$xt,Dxt,xxt])}function u5(){return _gn(),Uhn(cT(kxt,1),p1n,223,0,[fxt,sxt,uxt,hxt])}function s5(){return qpn(),Uhn(cT(SKt,1),p1n,320,0,[TKt,kKt,MKt,yKt])}function h5(){return Eln(),Uhn(cT(DKt,1),p1n,415,0,[CKt,IKt,PKt,OKt])}function f5(n){return W0(),PV(LFt,n)?uG(cQ(LFt,n),341).Qg():null}function l5(n,t,e){return t<0?$Nn(n,e):uG(e,69).wk().Bk(n,n.hi(),t)}function b5(n,t,e){var i;return i=jvn(e),yHn(n.j,i,t),vJ(n.k,t,e),t}function w5(n,t,e){var i;return i=jvn(e),yHn(n.d,i,t),vJ(n.e,t,e),t}function d5(n){var t;return gj(),t=new es,n&&ARn(t,n),t}function g5(n){var t;return t=n.aj(n.i),n.i>0&&qGn(n.g,0,t,0,n.i),t}function p5(n,t){var e;for(e=n.j.c.length;e<t;e++)kD(n.j,n.Ng())}function m5(n,t,e,i){var r;return r=i[t.g][e.g],uM(pK(oIn(n.a,r)))}function v5(n,t){var e;return TP(),!(e=uG(cQ(_Ft,n),57))||e.fk(t)}function k5(n){if(1!=n.p)throw hv(new xv);return pz(n.f)<<24>>24}function y5(n){if(1!=n.p)throw hv(new xv);return pz(n.k)<<24>>24}function M5(n){if(7!=n.p)throw hv(new xv);return pz(n.k)<<16>>16}function T5(n){if(7!=n.p)throw hv(new xv);return pz(n.f)<<16>>16}function j5(n,t){return 0==t.e||0==n.e?_ot:(b_n(),yKn(n,t))}function E5(n,t){return xA(t)===xA(n)?"(this Map)":null==t?IZn:cpn(t)}function S5(n,t,e){return Rz(pK(DA(FX(n.f,t))),pK(DA(FX(n.f,e))))}function P5(n,t,e){var i;i=uG(cQ(n.g,e),60),kD(n.a.c,new WO(t,i))}function C5(n,t,e){n.i=0,n.e=0,t!=e&&(eln(n,t,e),tln(n,t,e))}function I5(n,t,e,i,r){kD(t,uLn(r,Bxn(r,e,i))),LIn(n,r,t)}function O5(n,t,e,i,r){this.i=n,this.a=t,this.e=e,this.j=i,this.f=r}function A5(n,t){HZ.call(this),this.a=n,this.b=t,kD(this.a.b,this)}function L5(n){this.b=new Ym,this.c=new Ym,this.d=new Ym,this.a=n}function N5(n,t){var e;return e=new QM,n.Gd(e),e.a+="..",t.Hd(e),e.a}function $5(n,t){var e;for(e=t;e;)KR(n,e.i,e.j),e=R0(e);return n}function D5(n,t,e){var i;return i=jvn(e),vJ(n.b,i,t),vJ(n.c,t,e),t}function x5(n){var t;for(t=0;n.Ob();)n.Pb(),t=Lgn(t,1);return arn(t)}function R5(n,t){var e;return PP(),uOn(e=uG(n,69).vk(),t),e.xl(t)}function K5(n,t,e){if(e){var i=e.oe();n.a[t]=i(e)}else delete n.a[t]}function F5(n,t){var e;e=n.q.getHours(),n.q.setFullYear(t+V1n),Iqn(n,e)}function _5(n,t){return uG(null==t?DA(FX(n.f,null)):_P(n.i,t),288)}function B5(n,t){return n==(zIn(),dbt)&&t==dbt?4:n==dbt||t==dbt?8:32}function H5(n,t,e){return aqn(n,t,e,F$(t,102)&&!!(uG(t,19).Bb&P0n))}function U5(n,t,e){return Dqn(n,t,e,F$(t,102)&&!!(uG(t,19).Bb&P0n))}function G5(n,t,e){return Cxn(n,t,e,F$(t,102)&&!!(uG(t,19).Bb&P0n))}function q5(n){n.b!=n.c&&(n.a=Inn(dat,EZn,1,8,5,1),n.b=0,n.c=0)}function X5(n){return MK(n.a<n.c.a.length),n.b=n.a,Sin(n),n.c.b[n.b]}function z5(n){return n.n||(y9(n),n.n=new hz(n,g_t,n),n1(n)),n.n}function V5(n){if(n<0)throw hv(new yM("Negative array size: "+n))}function W5(n,t,e){if(e){var i=e.oe();e=i(e)}else e=void 0;n.a[t]=e}function Q5(n,t){var e;return Cln(),0!=(e=n.j.g-t.j.g)?e:0}function J5(n,t){return bS(),String.fromCharCode(10),ttn(gZ(n.a),t)}function Y5(n,t){return bS(),String.fromCharCode(10),ttn(gZ(n.a),t)}function Z5(n,t){cHn(),VV.call(this,n,1,Uhn(cT(YHt,1),W1n,28,15,[t]))}function n8(n,t){QYn(),Qm.call(this,n),this.a=t,this.c=-1,this.b=-1}function t8(n,t,e,i){c4.call(this,1,e,i),Kf(this),this.c=n,this.b=t}function e8(n,t,e,i){a4.call(this,1,e,i),Kf(this),this.c=n,this.b=t}function i8(n,t,e,i,r,c,a){Ran.call(this,t,i,r,c,a),this.c=n,this.a=e}function r8(n,t,e){this.e=n,this.a=dat,this.b=$Bn(t),this.c=t,this.d=e}function c8(n){this.e=n,this.c=this.e.a,this.b=this.e.g,this.d=this.e.i}function a8(n){this.d=n,this.b=this.d.a.entries(),this.a=this.b.next()}function o8(n){this.c=n,this.a=uG(bEn(n),156),this.b=this.a.jk().wi()}function u8(){Ym.call(this),LR(this),this.d.b=this.d,this.d.a=this.d}function s8(n,t,e,i){var r;(r=new R).c=t,r.b=e,r.a=i,i.b=e.a=r,++n.b}function h8(n,t){return XA(null!=t?U1(n,t):DA(FX(n.f,t)))}function f8(n,t){return XA(null!=t?U1(n,t):DA(FX(n.f,t)))}function l8(n,t){return t.b.Kb(ven(n,t.c.Xe(),new jd(t)))}function b8(n,t){var e;return V5(t),(e=n.slice(0,t)).length=t,Ltn(e,n)}function w8(n,t){var e;for(e=0;e<t;++e)uQ(n,e,new Yw(uG(n[e],44)))}function d8(n,t){var e;for(e=n.d-1;e>=0&&n.a[e]===t[e];e--);return e<0}function g8(n){var t;return n?new aX(n):(Fon(t=new XL,n),t)}function p8(n,t){var e,i;i=!1;do{i|=e=Tfn(n,t)}while(e);return i}function m8(n){n&&Cin((Gy(),Fat)),--Uat,n&&-1!=qat&&(jL(qat),qat=-1)}function v8(n){aCn(),pD(this,pz(E3($z(n,24),W0n)),pz(E3(n,W0n)))}function k8(){k8=E,Jut=Abn((_kn(),Uhn(cT(nst,1),p1n,436,0,[Wut,Vut])))}function y8(){y8=E,tst=Abn((Xin(),Uhn(cT(mst,1),p1n,435,0,[Yut,Zut])))}function M8(){M8=E,vft=Abn((zin(),Uhn(cT(mlt,1),p1n,432,0,[gft,pft])))}function T8(){T8=E,Lbt=Abn((Aun(),Uhn(cT(Dbt,1),p1n,517,0,[Obt,Ibt])))}function j8(){j8=E,Tpt=Abn((Y6(),Uhn(cT(Nmt,1),p1n,429,0,[kpt,ypt])))}function E8(){E8=E,mgt=Abn((Vin(),Uhn(cT(Mgt,1),p1n,428,0,[dgt,ggt])))}function S8(){S8=E,Dgt=Abn((Wtn(),Uhn(cT(Hgt,1),p1n,488,0,[Ngt,Lgt])))}function P8(){P8=E,zjt=Abn((nin(),Uhn(cT(Jjt,1),p1n,430,0,[Gjt,qjt])))}function C8(){C8=E,nSt=Abn((Z6(),Uhn(cT(cSt,1),p1n,531,0,[YEt,JEt])))}function I8(){I8=E,Jdt=Abn((H7(),Uhn(cT(tgt,1),p1n,431,0,[Vdt,Wdt])))}function O8(){O8=E,HCt=Abn((i3(),Uhn(cT(QCt,1),p1n,433,0,[_Ct,FCt])))}function A8(){A8=E,JCt=Abn((pon(),Uhn(cT(iIt,1),p1n,501,0,[VCt,WCt])))}function L8(){L8=E,bSt=Abn((b0(),Uhn(cT(gSt,1),p1n,523,0,[fSt,hSt])))}function N8(){N8=E,pSt=Abn((w0(),Uhn(cT(xSt,1),p1n,522,0,[wSt,dSt])))}function $8(){$8=E,RSt=Abn((_7(),Uhn(cT(qSt,1),p1n,528,0,[DSt,$St])))}function D8(){D8=E,XSt=Abn((l0(),Uhn(cT(JSt,1),p1n,465,0,[USt,GSt])))}function x8(){x8=E,uIt=Abn((Ptn(),Uhn(cT(lIt,1),p1n,434,0,[cIt,aIt])))}function R8(){R8=E,jAt=Abn((a9(),Uhn(cT(CAt,1),p1n,491,0,[yAt,MAt])))}function K8(){K8=E,NAt=Abn((rhn(),Uhn(cT($At,1),p1n,492,0,[OAt,AAt])))}function F8(){F8=E,eLt=Abn((B7(),Uhn(cT(uLt,1),p1n,438,0,[nLt,ZAt])))}function _8(){_8=E,QLt=Abn((Vhn(),Uhn(cT(JLt,1),p1n,437,0,[VLt,zLt])))}function B8(){B8=E,vKt=Abn((CU(),Uhn(cT(jKt,1),p1n,347,0,[gKt,pKt])))}function H8(){return xdn(),Uhn(cT(axt,1),p1n,88,0,[ZDt,YDt,JDt,QDt,nxt])}function U8(){return KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])}function G8(n,t,e){return uG(null==t?VAn(n.f,null,e):kgn(n.i,t,e),288)}function q8(n){return(n.k==(zIn(),dbt)||n.k==lbt)&&vR(n,(GYn(),$pt))}function X8(n){return n.c&&n.d?z3(n.c)+"->"+z3(n.d):"e_"+xx(n)}function z8(n,t){var e,i;for(tJ(t),i=n.Kc();i.Ob();)e=i.Pb(),t.Cd(e)}function V8(n,t){var e;vZ(e=new _y,"x",t.a),vZ(e,"y",t.b),pQ(n,e)}function W8(n,t){var e;vZ(e=new _y,"x",t.a),vZ(e,"y",t.b),pQ(n,e)}function Q8(n,t){var e;for(e=t;e;)KR(n,-e.i,-e.j),e=R0(e);return n}function J8(n,t){var e,i;for(e=t,i=0;e>0;)i+=n.a[e],e-=e&-e;return i}function Y8(n,t,e){var i;return u3(t,n.c.length),i=n.c[t],n.c[t]=e,i}function Z8(n,t,e){n.a.c.length=0,sVn(n,t,e),0==n.a.c.length||mUn(n,t)}function n9(n){n.i=0,FP(n.b,null),FP(n.c,null),n.a=null,n.e=null,++n.g}function t9(){t9=E,Nut=!0,Aut=!1,Lut=!1,Dut=!1,$ut=!1}function e9(n){t9(),Nut||(this.c=n,this.e=!0,this.a=new Zm)}function i9(n,t){this.c=0,this.b=t,iL.call(this,n,17493),this.a=this.c}function r9(n){NYn(),dv(this),this.a=new lS,Lln(this,n),aq(this.a,n)}function c9(){IN(this),this.b=new MO(M0n,M0n),this.a=new MO(T0n,T0n)}function a9(){a9=E,yAt=new oO(x6n,0),MAt=new oO("TARGET_WIDTH",1)}function o9(n,t){return(vgn(n),Qj(new fX(n,new ien(t,n.a)))).Bd(Kut)}function u9(){return uIn(),Uhn(cT(Llt,1),p1n,367,0,[Tlt,jlt,Elt,Slt,Plt])}function s9(){return gPn(),Uhn(cT(Pdt,1),p1n,375,0,[wdt,gdt,pdt,ddt,bdt])}function h9(){return kvn(),Uhn(cT(pgt,1),p1n,348,0,[sgt,ugt,fgt,lgt,hgt])}function f9(){return pyn(),Uhn(cT(xjt,1),p1n,323,0,[Tjt,kjt,yjt,vjt,Mjt])}function l9(){return Gpn(),Uhn(cT(ajt,1),p1n,171,0,[Lmt,Cmt,Imt,Omt,Amt])}function b9(){return zPn(),Uhn(cT(oIt,1),p1n,368,0,[tIt,YCt,eIt,ZCt,nIt])}function w9(){return _Rn(),Uhn(cT(qAt,1),p1n,373,0,[xAt,DAt,KAt,RAt,FAt])}function d9(){return pOn(),Uhn(cT(qLt,1),p1n,324,0,[iLt,rLt,oLt,cLt,aLt])}function g9(){return Rkn(),Uhn(cT(MNt,1),p1n,170,0,[hNt,sNt,oNt,fNt,uNt])}function p9(){return Vkn(),Uhn(cT(hRt,1),p1n,256,0,[Zxt,tRt,Jxt,Yxt,nRt])}function m9(n){return XM(),function(){return g6(n,this,arguments)}}function v9(n){return!(!n.c||!n.d||!n.c.i||n.c.i!=n.d.i)}function k9(n,t){return!!F$(t,143)&&m_(n.c,uG(t,143).c)}function y9(n){return n.t||(n.t=new $m(n),$dn(new Qy(n),0,n.t)),n.t}function M9(n){this.b=n,DD.call(this,n),this.a=uG(Lsn(this.b.a,4),129)}function T9(n){this.b=n,nR.call(this,n),this.a=uG(Lsn(this.b.a,4),129)}function j9(n,t,e,i,r){b7.call(this,t,i,r),Kf(this),this.c=n,this.b=e}function E9(n,t,e,i,r){c4.call(this,t,i,r),Kf(this),this.c=n,this.a=e}function S9(n,t,e,i,r){a4.call(this,t,i,r),Kf(this),this.c=n,this.a=e}function P9(n,t,e,i,r){b7.call(this,t,i,r),Kf(this),this.c=n,this.a=e}function C9(n,t){return uG(ain(n.d,t),23)||uG(ain(n.e,t),23)}function I9(n,t){var e,i;return e=t.ld(),!!(i=n.Fe(e))&&OJ(i.e,t.md())}function O9(n,t){var e;return new FE(e=t.ld(),n.e.pc(e,uG(t.md(),16)))}function A9(n,t){var e;return null==(e=n.a.get(t))?Inn(dat,EZn,1,0,5,1):e}function L9(n){var t;return t=n.length,m_(S0n.substr(S0n.length-t,t),n)}function N9(n){if(hDn(n))return n.c=n.a,n.a.Pb();throw hv(new Bv)}function $9(n,t){return 0==t||0==n.e?n:t>0?MFn(n,t):rvn(n,-t)}function D9(n,t){return 0==t||0==n.e?n:t>0?rvn(n,t):MFn(n,-t)}function x9(n){xP.call(this,null==n?IZn:cpn(n),F$(n,82)?uG(n,82):null)}function R9(n){var t;return n.c||F$(t=n.r,90)&&(n.c=uG(t,29)),n.c}function K9(n){var t;return zsn(t=new UZ,n),kfn(t,(jYn(),bMt),null),t}function F9(n){var t,e;return t=n.c.i,e=n.d.i,t.k==(zIn(),lbt)&&e.k==lbt}function _9(n){return p$(n&f0n,n>>22&f0n,n<0?l0n:0)}function B9(n){var t,e,i;for(e=0,i=(t=n).length;e<i;++e)qQ(t[e])}function H9(n,t){var e,i;(e=uG(zwn(n.c,t),16))&&(i=e.gc(),e.$b(),n.d-=i)}function U9(n,t,e){var i;return(i=n.Ih(t))>=0?n.Lh(i,e,!0):YNn(n,t,e)}function G9(n,t,e){return ugn(bD($kn(n),D$(t.b)),bD($kn(n),D$(e.b)))}function q9(n,t,e){return ugn(bD($kn(n),D$(t.e)),bD($kn(n),D$(e.e)))}function X9(n,t){return e.Math.min(atn(t.a,n.d.d.c),atn(t.b,n.d.d.c))}function z9(n,t){n._i(n.i+1),yD(n,n.i,n.Zi(n.i,t)),n.Mi(n.i++,t),n.Ni()}function V9(n){var t,e;++n.j,t=n.g,e=n.i,n.g=null,n.i=0,n.Oi(e,t),n.Ni()}function W9(n,t,e){var i;xun(i=new U$(n.a),n.a.a),VAn(i.f,t,e),n.a.a=i}function Q9(n,t,e,i){var r;for(r=0;r<$st;r++)qX(n.a[r][t.g],e,i[t.g])}function J9(n,t,e,i){var r;for(r=0;r<Nst;r++)XX(n.a[t.g][r],e,i[t.g])}function Y9(n,t){var e;return!(e=uG(n.c.xc(t),16))&&(e=n.ic(t)),n.pc(t,e)}function Z9(n){var t;return WW(n),_An(t=n?new Z_(n):rG(n.Kc())),Dwn(t)}function n7(n){var t;return WW(n),Dfn(t=new R7(yJ(n.length)),n),t}function t7(n,t,e,i){var r;return rCn(r=Inn(YHt,W1n,28,t,15,1),n,t,e,i),r}function e7(n,t){if(n<0||n>t)throw hv(new dM(iLn(n,t,"index")));return n}function i7(n,t){var e;return u3(t,n.c.length),e=n.c[t],nE(n.c,t,1),e}function r7(n,t){var e,i;return tJ(n),e=n,tJ(t),e==(i=t)?0:e<i?-1:1}function c7(n){var t;return t=n.e+n.f,isNaN(t)&&J_(n.d)?n.d:t}function a7(n){return n.e=3,n.d=n.Yb(),2!=n.e&&(n.e=0,!0)}function o7(n,t){return n.a?JA(n.a,n.b):n.a=new lx(n.d),WA(n.a,t),n}function u7(n,t){return RA(t)?null==t?Y$n(n.f,null):Vsn(n.i,t):Y$n(n.f,t)}function s7(n,t){eL.call(this,t.zd(),-6&t.yd()),tJ(n),this.a=n,this.b=t}function h7(n,t){iL.call(this,t.zd(),-6&t.yd()),tJ(n),this.a=n,this.b=t}function f7(n,t){rL.call(this,t.zd(),-6&t.yd()),tJ(n),this.a=n,this.b=t}function l7(n,t,e){Hm.call(this,e),this.b=n,this.c=t,this.d=(Pmn(),lBt)}function b7(n,t,e){this.d=n,this.k=t?1:0,this.f=e?1:0,this.o=-1,this.p=0}function w7(n){this.c=n,this.a=new Ww(this.c.a),this.b=new Ww(this.c.b)}function d7(){this.e=new Zm,this.c=new Zm,this.d=new Zm,this.b=new Zm}function g7(){this.g=new ok,this.b=new ok,this.a=new Zm,this.k=new Zm}function p7(){this.a=new gk,this.b=new Lk,this.d=new Ct,this.e=new Dt}function m7(n,t,e){this.a=n,this.c=t,this.d=e,kD(t.e,this),kD(e.b,this)}function v7(n,t,e){var i,r;for(i=0,r=0;r<t.length;r++)i+=n.tg(t[r],i,e)}function k7(n,t){var e;return e=$Vn(n,t),n.b=new Don(e.c.length),$zn(n,e)}function y7(n,t){var e;e=n.q.getHours()+(t/60|0),n.q.setMinutes(t),Iqn(n,e)}function M7(n){var t;return 0==(t=n.b).b?null:uG(hyn(t,0),65).b}function T7(n){return n.a?n.e?T7(n.e):null:n}function j7(n,t){return n.p<t.p?1:n.p>t.p?-1:0}function E7(n){var t;return n.a||F$(t=n.r,156)&&(n.a=uG(t,156)),n.a}function S7(n,t,e){return++n.e,--n.f,uG(n.d[t].gd(e),136).md()}function P7(n){var t;return t=n.ld(),JU(uG(n.md(),16).Nc(),new Wl(t))}function C7(n,t){return!!PV(n.a,t)&&(u7(n.a,t),!0)}function I7(n,t,e){return q4(t,n.e.Rd().gc()),q4(e,n.c.Rd().gc()),n.a[t][e]}function O7(n,t,e){this.a=n,this.b=t,this.c=e,kD(n.t,this),kD(t.i,this)}function A7(n,t,e,i){this.f=n,this.e=t,this.d=e,this.b=i,this.c=i?i.d:null}function L7(){this.b=new lS,this.a=new lS,this.b=new lS,this.a=new lS}function N7(){var n,t;N7=E,vj(),t=new Gv,MBt=t,n=new Wk,TBt=n}function $7(n){return vgn(n),new IK(n,new lG(n,n.a.e,4|n.a.d))}function D7(n){var t;for(GQ(n),t=0;n.a.Bd(new hn);)t=Lgn(t,1);return t}function x7(n,t){return tJ(t),n.c<n.d&&(n.Se(t,n.c++),!0)}function R7(n){IN(this),vG(n>=0,"Initial capacity must not be negative")}function K7(){K7=E,jNt=new Cm("org.eclipse.elk.labels.labelManager")}function F7(){F7=E,Uwt=new uF("separateLayerConnections",(Ghn(),zwt))}function _7(){_7=E,DSt=new qI("REGULAR",0),$St=new qI("CRITICAL",1)}function B7(){B7=E,nLt=new lO("FIXED",0),ZAt=new lO("CENTER_NODE",1)}function H7(){H7=E,Vdt=new WC("QUADRATIC",0),Wdt=new WC("SCANLINE",1)}function U7(){U7=E,egt=Abn((jan(),Uhn(cT(agt,1),p1n,322,0,[Zdt,Ydt,ngt])))}function G7(){G7=E,ogt=Abn((ran(),Uhn(cT(bgt,1),p1n,351,0,[igt,cgt,rgt])))}function q7(){q7=E,Cdt=Abn((gon(),Uhn(cT(Rdt,1),p1n,372,0,[Sdt,Edt,jdt])))}function X7(){X7=E,Tgt=Abn((Pfn(),Uhn(cT(Ogt,1),p1n,460,0,[kgt,vgt,ygt])))}function z7(){z7=E,wpt=Abn((ihn(),Uhn(cT(mpt,1),p1n,299,0,[fpt,lpt,hpt])))}function V7(){V7=E,vpt=Abn((Zen(),Uhn(cT(Mpt,1),p1n,311,0,[gpt,ppt,dpt])))}function W7(){W7=E,ljt=Abn((Cwn(),Uhn(cT(pjt,1),p1n,390,0,[ujt,sjt,hjt])))}function Q7(){Q7=E,iEt=Abn((isn(),Uhn(cT(oEt,1),p1n,387,0,[Zjt,nEt,tEt])))}function J7(){J7=E,uEt=Abn((Sln(),Uhn(cT(lEt,1),p1n,349,0,[aEt,rEt,cEt])))}function Y7(){Y7=E,Yjt=Abn((can(),Uhn(cT(eEt,1),p1n,463,0,[Qjt,Vjt,Wjt])))}function Z7(){Z7=E,bEt=Abn((kbn(),Uhn(cT(pEt,1),p1n,350,0,[sEt,hEt,fEt])))}function nnn(){nnn=E,mEt=Abn((ian(),Uhn(cT(MEt,1),p1n,352,0,[gEt,wEt,dEt])))}function tnn(){tnn=E,TEt=Abn((zhn(),Uhn(cT(xEt,1),p1n,388,0,[kEt,yEt,vEt])))}function enn(){enn=E,mPt=Abn((Pln(),Uhn(cT(RCt,1),p1n,392,0,[gPt,dPt,wPt])))}function inn(){inn=E,bIt=Abn((vbn(),Uhn(cT(nOt,1),p1n,393,0,[sIt,hIt,fIt])))}function rnn(){rnn=E,aOt=Abn((esn(),Uhn(cT(hOt,1),p1n,300,0,[iOt,rOt,eOt])))}function cnn(){cnn=E,fOt=Abn((Jmn(),Uhn(cT(dOt,1),p1n,445,0,[oOt,uOt,sOt])))}function ann(){ann=E,gOt=Abn((Zyn(),Uhn(cT(AOt,1),p1n,456,0,[lOt,wOt,bOt])))}function onn(){onn=E,LOt=Abn((Bgn(),Uhn(cT(kAt,1),p1n,394,0,[IOt,OOt,COt])))}function unn(){unn=E,IAt=Abn((den(),Uhn(cT(LAt,1),p1n,439,0,[EAt,PAt,SAt])))}function snn(){snn=E,GEt=Abn((ean(),Uhn(cT(qEt,1),p1n,464,0,[_Et,BEt,HEt])))}function hnn(){hnn=E,Dst=Abn((Ktn(),Uhn(cT(xst,1),p1n,471,0,[Ast,Ost,Lst])))}function fnn(){fnn=E,Cst=Abn((Yrn(),Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])))}function lnn(){lnn=E,Bst=Abn((Yen(),Uhn(cT(hht,1),p1n,472,0,[Fst,Kst,Rst])))}function bnn(){bnn=E,xut=Abn((ybn(),Uhn(cT(Rut,1),p1n,108,0,[Cut,Iut,Out])))}function wnn(){wnn=E,vlt=Abn((Jen(),Uhn(cT(Clt,1),p1n,391,0,[glt,dlt,plt])))}function dnn(){dnn=E,Nxt=Abn((Own(),Uhn(cT(Kxt,1),p1n,346,0,[Oxt,Ixt,Axt])))}function gnn(){gnn=E,XAt=Abn((Rdn(),Uhn(cT(VAt,1),p1n,444,0,[HAt,UAt,GAt])))}function pnn(){pnn=E,oxt=Abn((Zrn(),Uhn(cT(lxt,1),p1n,278,0,[ixt,rxt,cxt])))}function mnn(){mnn=E,dKt=Abn((Iwn(),Uhn(cT(mKt,1),p1n,280,0,[lKt,fKt,bKt])))}function vnn(n,t){return!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),ymn(n.o,t)}function knn(n,t){var e;n.C&&((e=uG(AJ(n.b,t),127).n).d=n.C.d,e.a=n.C.a)}function ynn(n){var t,e,i,r;r=n.d,t=n.a,e=n.b,i=n.c,n.d=e,n.a=i,n.b=r,n.c=t}function Mnn(n){return!n.g&&(n.g=new ds),!n.g.b&&(n.g.b=new Om(n)),n.g.b}function Tnn(n){return!n.g&&(n.g=new ds),!n.g.c&&(n.g.c=new Nm(n)),n.g.c}function jnn(n){return!n.g&&(n.g=new ds),!n.g.d&&(n.g.d=new Am(n)),n.g.d}function Enn(n){return!n.g&&(n.g=new ds),!n.g.a&&(n.g.a=new Lm(n)),n.g.a}function Snn(n,t,e,i){return e&&(i=e.Rh(t,emn(e.Dh(),n.c.uk()),null,i)),i}function Pnn(n,t,e,i){return e&&(i=e.Th(t,emn(e.Dh(),n.c.uk()),null,i)),i}function Cnn(n,t,e,i){var r;return KGn(r=Inn(YHt,W1n,28,t+1,15,1),n,t,e,i),r}function Inn(n,t,e,i,r,c){var a;return a=PTn(r,i),10!=r&&Uhn(cT(n,c),t,e,r,a),a}function Onn(n,t,e){var i,r;for(r=new Zsn(t,n),i=0;i<e;++i)_yn(r);return r}function Ann(n,t,e){var i,r;if(null!=e)for(i=0;i<t;++i)r=e[i],n.Qi(i,r)}function Lnn(n,t){var e;return(e=new B).c=!0,e.d=t.md(),pWn(n,t.ld(),e)}function Nnn(n,t){var e;e=n.q.getHours()+(t/3600|0),n.q.setSeconds(t),Iqn(n,e)}function $nn(n,t){var e,i;return i=SZ(rG(new Een(n,e=t))),Hq(new Een(n,e)),i}function Dnn(n,t){t.Ug("Label management",1),XA(oIn(n,(K7(),jNt))),t.Vg()}function xnn(n,t,e,i){EGn(n,t,e,Dqn(n,t,i,F$(t,102)&&!!(uG(t,19).Bb&P0n)))}function Rnn(n,t,e){uG(n.b,68),uG(n.b,68),uG(n.b,68),Prn(n.a,new AB(e,t,n))}function Knn(n,t,e){if(n<0||t>e||t<n)throw hv(new JM(o2n+n+s2n+t+Q0n+e))}function Fnn(n){n?(this.c=n,this.b=null):(this.c=null,this.b=new Zm)}function _nn(n,t){VP.call(this,n,t),this.a=Inn(yut,c1n,447,2,0,1),this.b=!0}function Bnn(n){Nfn.call(this,n,0),LR(this),this.d.b=this.d,this.d.a=this.d}function Hnn(n){this.e=n,this.b=this.e.a.entries(),this.a=Inn(dat,EZn,1,0,5,1)}function Unn(){Unn=E,SEt=wz(Aq(new wJ,(uIn(),Tlt),(zYn(),uwt)),Plt,Owt)}function Gnn(){return tOn(),Uhn(cT($gt,1),p1n,283,0,[Egt,jgt,Pgt,Sgt,Igt,Cgt])}function qnn(){return ESn(),Uhn(cT(Qgt,1),p1n,281,0,[Fgt,Kgt,Bgt,Rgt,_gt,xgt])}function Xnn(){return RIn(),Uhn(cT(upt,1),p1n,282,0,[Vgt,qgt,Wgt,zgt,Xgt,Ggt])}function znn(){return vAn(),Uhn(cT(Qdt,1),p1n,232,0,[Hdt,Gdt,Bdt,Udt,qdt,_dt])}function Vnn(){return zIn(),Uhn(cT(vbt,1),p1n,273,0,[dbt,wbt,lbt,gbt,bbt,fbt])}function Wnn(){return eNn(),Uhn(cT(BRt,1),p1n,279,0,[gRt,wRt,dRt,bRt,lRt,pRt])}function Qnn(){return $Pn(),Uhn(cT(mRt,1),p1n,101,0,[sRt,uRt,oRt,rRt,aRt,cRt])}function Jnn(){return RCn(),Uhn(cT(Lxt,1),p1n,321,0,[mxt,gxt,vxt,wxt,pxt,dxt])}function Ynn(){return nMn(),Uhn(cT(n$t,1),p1n,255,0,[CNt,ANt,LNt,NNt,INt,ONt])}function Znn(){return ZSn(),Uhn(cT(txt,1),p1n,298,0,[ZNt,YNt,JNt,WNt,VNt,QNt])}function ntn(n){var t;return n.a||-1==n.b||(t=n.c.Dh(),n.a=ern(t,n.b)),n.a}function ttn(n,t){return!(n.Si()&&n.Hc(t)||(n.Hi(t),0))}function etn(n,t){return ZZ(t,"Horizontal alignment cannot be null"),n.b=t,n}function itn(n,t,e){var i;return QYn(),i=kJn(n,t),e&&i&&_Q(n)&&(i=null),i}function rtn(n,t,e){var i;(i=n.b[e.c.p][e.p]).b+=t.b,i.c+=t.c,i.a+=t.a,++i.a}function ctn(n,t,i){var r;n.d[t.g]=i,(r=n.g.c)[t.g]=e.Math.max(r[t.g],i+1)}function atn(n,t){var i,r;return i=n.a-t.a,r=n.b-t.b,e.Math.sqrt(i*i+r*r)}function otn(n,t){var e;for(e=t.Kc();e.Ob();)_Hn(n,uG(e.Pb(),36),0,0)}function utn(n,t,e){var i;for(i=n.Kc();i.Ob();)tHn(uG(i.Pb(),36),t,e)}function stn(n){var t;for(t=Fkn(n.a,0);t.b!=t.d.c;)hNn(uG(I6(t),65))}function htn(n,t){return BP(n.e,t)||Akn(n.e,t,new Bkn(t)),uG(ain(n.e,t),113)}function ftn(n,t,e,i){return tJ(n),tJ(t),tJ(e),tJ(i),new WV(n,t,new H)}function ltn(n,t,e,i){this.ak(),this.a=t,this.b=n,this.c=new kV(this,t,e,i)}function btn(n,t,e,i,r,c){E6.call(this,t,i,r,c),Kf(this),this.c=n,this.b=e}function wtn(n,t,e,i,r,c){E6.call(this,t,i,r,c),Kf(this),this.c=n,this.a=e}function dtn(n,t){var e,i,r;return r=n.r,i=n.d,(e=uXn(n,t,!0)).b!=r||e.a!=i}function gtn(n,t,e){var i;return(i=jxn(n.b,t))?JXn(Len(n,i),e):null}function ptn(n,t,e){var i,r;r=null,(i=v0(n,e))&&(r=uAn(i)),Tkn(t,e,r)}function mtn(n,t,e){var i,r;r=null,(i=v0(n,e))&&(r=uAn(i)),Tkn(t,e,r)}function vtn(n,t){var e;return(e=n.Ih(t))>=0?n.Lh(e,!0,!0):YNn(n,t,!0)}function ktn(n,t,e){var i;return i=Ufn(n,t,e),n.b=new Don(i.c.length),ZFn(n,i)}function ytn(n){if(n.b<=0)throw hv(new Bv);return--n.b,n.a-=n.c.c,xwn(n.a)}function Mtn(n){var t;if(!n.a)throw hv(new EY);return t=n.a,n.a=R0(n.a),t}function Ttn(n){for(;!n.a;)if(!y_(n.c,new yd(n)))return!1;return!0}function jtn(n){return WW(n),F$(n,204)?uG(n,204):new sb(n)}function Etn(n){Stn(),uG(n.of((XYn(),bDt)),181).Fc((eNn(),dRt)),n.qf(lDt,null)}function Stn(){Stn=E,tNt=new hu,iNt=new fu,eNt=Rln((XYn(),lDt),tNt,q$t,iNt)}function Ptn(){Ptn=E,cIt=new nO("LEAF_NUMBER",0),aIt=new nO("NODE_SIZE",1)}function Ctn(n){n.a=Inn(YHt,W1n,28,n.b+1,15,1),n.c=Inn(YHt,W1n,28,n.b,15,1),n.d=0}function Itn(n,t){n.a.Ne(t.d,n.b)>0&&(kD(n.c,new wG(t.c,t.d,n.d)),n.b=t.d)}function Otn(n,t){if(null==n.g||t>=n.i)throw hv(new pL(t,n.i));return n.g[t]}function Atn(n,t,e){if(gln(n,e),null!=e&&!n.fk(e))throw hv(new Nv);return e}function Ltn(n,t){return 10!=Min(t)&&Uhn(Tbn(t),t.Sm,t.__elementTypeId$,Min(t),n),n}function Ntn(n,t,e,i){sZ(),i=i||Jot,rLn(n.slice(t,e),n,t,e,-t,i)}function $tn(n,t,e,i,r){return t<0?YNn(n,e,i):uG(e,69).wk().yk(n,n.hi(),t,i,r)}function Dtn(n,t){return ugn(uM(pK(oIn(n,(GYn(),bmt)))),uM(pK(oIn(t,bmt))))}function xtn(){xtn=E,Mut=Abn((Rtn(),Uhn(cT(Tut,1),p1n,304,0,[put,mut,vut,kut])))}function Rtn(){Rtn=E,put=new qP("All",0),mut=new SN,vut=new P$,kut=new EN}function Ktn(){Ktn=E,Ast=new aC(z2n,0),Ost=new aC(G2n,1),Lst=new aC(V2n,2)}function Ftn(){Ftn=E,tXn(),sHt=M0n,uHt=T0n,fHt=new Rw(M0n),hHt=new Rw(T0n)}function _tn(){_tn=E,vht=Abn((ehn(),Uhn(cT(jht,1),p1n,417,0,[pht,wht,dht,ght])))}function Btn(){Btn=E,Rht=Abn((myn(),Uhn(cT(Fht,1),p1n,406,0,[Nht,Lht,$ht,Dht])))}function Htn(){Htn=E,Eht=Abn((vyn(),Uhn(cT(Sht,1),p1n,332,0,[yht,kht,Mht,Tht])))}function Utn(){Utn=E,ibt=Abn((Uvn(),Uhn(cT(abt,1),p1n,389,0,[tbt,Zlt,Ylt,nbt])))}function Gtn(){Gtn=E,Glt=Abn((Xhn(),Uhn(cT(ebt,1),p1n,416,0,[Flt,Hlt,_lt,Blt])))}function qtn(){qtn=E,ldt=Abn((qhn(),Uhn(cT(mdt,1),p1n,421,0,[odt,udt,sdt,hdt])))}function Xtn(){Xtn=E,Wwt=Abn((Ghn(),Uhn(cT(adt,1),p1n,371,0,[zwt,qwt,Xwt,Gwt])))}function ztn(){ztn=E,mjt=Abn((Yyn(),Uhn(cT(jjt,1),p1n,203,0,[djt,gjt,wjt,bjt])))}function Vtn(){Vtn=E,Ujt=Abn((yvn(),Uhn(cT(Xjt,1),p1n,284,0,[Fjt,Kjt,_jt,Bjt])))}function Wtn(){Wtn=E,Ngt=new iI(q4n,0),Lgt=new iI("IMPROVE_STRAIGHTNESS",1)}function Qtn(n,t){var e,i;return i=t/n.c.Rd().gc()|0,e=t%n.c.Rd().gc(),I7(n,i,e)}function Jtn(n){var t;if(n.nl())for(t=n.i-1;t>=0;--t)zrn(n,t);return g5(n)}function Ytn(n){var t,e;if(!n.b)return null;for(e=n.b;t=e.a[0];)e=t;return e}function Ztn(n){var t,e;if(!n.b)return null;for(e=n.b;t=e.a[1];)e=t;return e}function nen(n){return F$(n,180)?""+uG(n,180).a:null==n?null:cpn(n)}function ten(n){return F$(n,180)?""+uG(n,180).a:null==n?null:cpn(n)}function een(n,t){if(t.a)throw hv(new Ky(p2n));FV(n.a,t),t.a=n,!n.j&&(n.j=t)}function ien(n,t){rL.call(this,t.zd(),-16449&t.yd()),tJ(n),this.a=n,this.c=t}function ren(n,t){return new LU(t,KR(D$(t.e),t.f.a+n,t.f.b+n),(qx(),!1))}function cen(n,t){return PU(),kD(n,new WO(t,xwn(t.e.c.length+t.g.c.length)))}function aen(n,t){return PU(),kD(n,new WO(t,xwn(t.e.c.length+t.g.c.length)))}function oen(){oen=E,tOt=Abn((dTn(),Uhn(cT(cOt,1),p1n,354,0,[ZIt,JIt,YIt,QIt])))}function uen(){uen=E,KCt=Abn((mbn(),Uhn(cT(BCt,1),p1n,353,0,[xCt,$Ct,DCt,NCt])))}function sen(){sen=E,YSt=Abn((Cjn(),Uhn(cT(ZSt,1),p1n,405,0,[zSt,VSt,WSt,QSt])))}function hen(){hen=E,bxt=Abn((_gn(),Uhn(cT(kxt,1),p1n,223,0,[fxt,sxt,uxt,hxt])))}function fen(){fen=E,Fxt=Abn((Ajn(),Uhn(cT(Wxt,1),p1n,291,0,[Rxt,$xt,Dxt,xxt])))}function len(){len=E,ZRt=Abn((Qmn(),Uhn(cT(sKt,1),p1n,386,0,[QRt,JRt,WRt,VRt])))}function ben(){ben=E,EKt=Abn((qpn(),Uhn(cT(SKt,1),p1n,320,0,[TKt,kKt,MKt,yKt])))}function wen(){wen=E,LKt=Abn((Eln(),Uhn(cT(DKt,1),p1n,415,0,[CKt,IKt,PKt,OKt])))}function den(){den=E,EAt=new uO(g7n,0),PAt=new uO(k9n,1),SAt=new uO(q4n,2)}function gen(n,t,e,i,r){return tJ(n),tJ(t),tJ(e),tJ(i),tJ(r),new WV(n,t,i)}function pen(n,t){var e;return(e=uG(u7(n.e,t),400))?(cq(e),e.e):null}function men(n,t){var e;return-1!=(e=Ten(n,t,0))&&(i7(n,e),!0)}function ven(n,t,e){var i;return GQ(n),(i=new un).a=t,n.a.Nb(new nC(i,e)),i.a}function ken(n){var t;return GQ(n),t=Inn(eUt,I0n,28,0,15,1),tE(n.a,new md(t)),t}function yen(n){var t;if(!oon(n))throw hv(new Bv);return n.e=1,t=n.d,n.d=null,t}function Men(n){var t;return _L(n)&&(t=0-n,!isNaN(t))?t:Esn(gfn(n))}function Ten(n,t,e){for(;e<n.c.length;++e)if(OJ(t,n.c[e]))return e;return-1}function jen(n){var t;return t=uG(zq(n.j,0),12),uG(oIn(t,(GYn(),rmt)),12)}function Een(n,t){var e;this.f=n,this.b=t,e=uG(cQ(n.b,t),260),this.c=e?e.b:null}function Sen(){GB(),this.b=new Ym,this.f=new Ym,this.g=new Ym,this.e=new Ym}function Pen(n){LD(this),this.g=n?i1(n,n.ie()):null,this.f=n,KY(this),this.je()}function Cen(n){var t;null!=(t=n.jj())&&-1!=n.d&&uG(t,94).xh(n),n.i&&n.i.oj()}function Ien(n){var t;for(t=n.p+1;t<n.c.a.c.length;++t)--uG(zq(n.c.a,t),10).p}function Oen(n){TK(!!n.c),OB(n.f.g,n.d),n.c.Qb(),n.c=null,n.b=Phn(n),n.d=n.f.g}function Aen(n){return n.b||(n.b=new fz(n,g_t,n),!n.a&&(n.a=new oF(n,n))),n.b}function Len(n,t){var e,i;return!(i=(e=uG(t,690)).xi())&&e.Ai(i=new IA(n,t)),i}function Nen(n,t){var e,i;return!(i=(e=uG(t,692)).$k())&&e.cl(i=new p4(n,t)),i}function $en(n,t){var e,i;return JS(),e=Q6(n),i=Q6(t),!!e&&!!i&&!Tyn(e.k,i.k)}function Den(n,t){return OJ(t,zq(n.f,0))||OJ(t,zq(n.f,1))||OJ(t,zq(n.f,2))}function xen(n,t){if(t<0)throw hv(new dM(Nnt+t));return p5(n,t+1),zq(n.j,t)}function Ren(n,t,e,i){if(!n)throw hv(new vM(LBn(t,Uhn(cT(dat,1),EZn,1,5,[e,i]))))}function Ken(n,t,e,i,r,c,a){Ran.call(this,t,i,r,c,a),Kf(this),this.c=n,this.b=e}function Fen(n,t,e){var i,r;for(i=10,r=0;r<e-1;r++)t<i&&(n.a+="0"),i*=10;n.a+=t}function _en(n){var t,e;return gW(n,0,e=n.length,t=Inn(JHt,N1n,28,e,15,1),0),t}function Ben(n){var t,e;return iX(),!(e=aot[t=n+128])&&(e=aot[t]=new Dw(n)),e}function Hen(n){return OB(n.d.a.e.g,n.b),MK(n.c!=n.d.a.d),n.a=n.c,n.c=n.c.a,n.a}function Uen(n){switch(n.g){case 0:return vZn;case 1:return-1;default:return 0}}function Gen(n){return yEn(n,(tin(),not))<0?-sx(gfn(n)):n.l+n.m*w0n+n.h*d0n}function qen(n){(this.q?this.q:(hZ(),hZ(),Vot)).Ac(n.q?n.q:(hZ(),hZ(),Vot))}function Xen(n,t){L_(uG(uG(n.f,27).of((XYn(),sDt)),101))&&ppn(RJ(uG(n.f,27)),t)}function zen(n,t){var e;return(e=emn(n.d,t))>=0?Dyn(n,e,!0,!0):YNn(n,t,!0)}function Ven(n){var t;return null==(t=Kcn(Lsn(n,32)))&&($vn(n),t=Kcn(Lsn(n,32))),t}function Wen(n){var t;return n.Oh()||(t=iQ(n.Dh())-n.ji(),n.$h().Mk(t)),n.zh()}function Qen(n,t){Iht=new et,xht=t,uG((Cht=n).b,68),Rnn(Cht,Iht,null),Szn(Cht)}function Jen(){Jen=E,glt=new dC("XY",0),dlt=new dC("X",1),plt=new dC("Y",2)}function Yen(){Yen=E,Fst=new oC("TOP",0),Kst=new oC(G2n,1),Rst=new oC(Q2n,2)}function Zen(){Zen=E,gpt=new uI(q4n,0),ppt=new uI("TOP",1),dpt=new uI(Q2n,2)}function nin(){nin=E,Gjt=new pI("INPUT_ORDER",0),qjt=new pI("PORT_DEGREE",1)}function tin(){tin=E,Jat=p$(f0n,f0n,524287),Yat=p$(0,0,b0n),Zat=_9(1),_9(2),not=_9(0)}function ein(n){var t;return n.d!=n.r&&(t=bEn(n),n.e=!!t&&t.lk()==srt,n.d=t),n.e}function iin(n,t,e){var i;return i=n.g[t],yD(n,t,n.Zi(t,e)),n.Ri(t,e,i),n.Ni(),i}function rin(n,t){var e;return(e=n.dd(t))>=0&&(n.gd(e),!0)}function cin(n,t){var e;for(WW(n),WW(t),e=!1;t.Ob();)e|=n.Fc(t.Pb());return e}function ain(n,t){var e;return(e=uG(cQ(n.e,t),400))?(nD(n,e),e.e):null}function oin(n){var t,e;return t=n/60|0,0==(e=n%60)?""+t:t+":"+e}function uin(n,t){var e=n.a[t],i=(Cfn(),Wat)[typeof e];return i?i(e):Vbn(typeof e)}function sin(n,t){return vgn(n),new fX(n,new D_(new f7(t,n.a)))}function hin(n){var t;return null!=(t=0==n.b.c.length?null:zq(n.b,0))&&Con(n,0),t}function fin(n,t){var e,i,r;r=t.c.i,i=(e=uG(cQ(n.f,r),60)).d.c-e.e.c,fun(t.a,i,0)}function lin(n,t){var e;for(++n.d,++n.c[t],e=t+1;e<n.a.length;)++n.a[e],e+=e&-e}function bin(n,t,e,i){QYn(),Qm.call(this,26),this.c=n,this.a=t,this.d=e,this.b=i}function win(n,t){for(;t[0]<n.length&&xL(" \t\r\n",$Cn(VJ(n,t[0])))>=0;)++t[0]}function din(n,t){ycn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function gin(n,t){Mcn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function pin(n,t){kcn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function min(n,t){vcn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function vin(n,t,e){return bD(new MO(e.e.a+e.f.a/2,e.e.b+e.f.b/2),n)==(tJ(t),t)}function kin(n,t){return F$(t,102)&&uG(t,19).Bb&P0n?new yL(t,n):new Zsn(t,n)}function yin(n,t){return F$(t,102)&&uG(t,19).Bb&P0n?new yL(t,n):new Zsn(t,n)}function Min(n){return null==n.__elementTypeCategory$?10:n.__elementTypeCategory$}function Tin(n,t){return t==(cB(),cB(),uut)?n.toLocaleLowerCase():n.toLowerCase()}function jin(n){if(!n.e)throw hv(new Bv);return n.c=n.a=n.e,n.e=n.e.e,--n.d,n.a.f}function Ein(n){if(!n.c)throw hv(new Bv);return n.e=n.a=n.c,n.c=n.c.c,++n.d,n.a.f}function Sin(n){var t;for(++n.a,t=n.c.a.length;n.a<t;++n.a)if(n.c.b[n.a])return}function Pin(n){var t,e;if(n.a){e=null;do{t=n.a,n.a=null,e=JOn(t,e)}while(n.a);n.a=e}}function Cin(n){var t,e;if(n.b){e=null;do{t=n.b,n.b=null,e=JOn(t,e)}while(n.b);n.b=e}}function Iin(n,t){var e;for(e=0;n.e!=n.i.gc();)Tq(t,Zkn(n),xwn(e)),e!=vZn&&++e}function Oin(n,t){var e;return 0==(e=Fgn(n.e.c,t.e.c))?ugn(n.e.d,t.e.d):e}function Ain(n,t){var e,i;for(e=(i=t.c)+1;e<=t.f;e++)n.a[e]>n.a[i]&&(i=e);return i}function Lin(n){var t;return!!(t=uG(oIn(n,(GYn(),Spt)),313))&&t.a==n}function Nin(n){var t;return!!(t=uG(oIn(n,(GYn(),Spt)),313))&&t.i==n}function $in(){$in=E,Ilt=Abn((uIn(),Uhn(cT(Llt,1),p1n,367,0,[Tlt,jlt,Elt,Slt,Plt])))}function Din(){Din=E,vdt=Abn((gPn(),Uhn(cT(Pdt,1),p1n,375,0,[wdt,gdt,pdt,ddt,bdt])))}function xin(){xin=E,wgt=Abn((kvn(),Uhn(cT(pgt,1),p1n,348,0,[sgt,ugt,fgt,lgt,hgt])))}function Rin(){Rin=E,Ejt=Abn((pyn(),Uhn(cT(xjt,1),p1n,323,0,[Tjt,kjt,yjt,vjt,Mjt])))}function Kin(){Kin=E,$mt=Abn((Gpn(),Uhn(cT(ajt,1),p1n,171,0,[Lmt,Cmt,Imt,Omt,Amt])))}function Fin(){Fin=E,rIt=Abn((zPn(),Uhn(cT(oIt,1),p1n,368,0,[tIt,YCt,eIt,ZCt,nIt])))}function _in(){_in=E,BAt=Abn((_Rn(),Uhn(cT(qAt,1),p1n,373,0,[xAt,DAt,KAt,RAt,FAt])))}function Bin(){Bin=E,sLt=Abn((pOn(),Uhn(cT(qLt,1),p1n,324,0,[iLt,rLt,oLt,cLt,aLt])))}function Hin(){Hin=E,ext=Abn((xdn(),Uhn(cT(axt,1),p1n,88,0,[ZDt,YDt,JDt,QDt,nxt])))}function Uin(){Uin=E,bNt=Abn((Rkn(),Uhn(cT(MNt,1),p1n,170,0,[hNt,sNt,oNt,fNt,uNt])))}function Gin(){Gin=E,iRt=Abn((Vkn(),Uhn(cT(hRt,1),p1n,256,0,[Zxt,tRt,Jxt,Yxt,nRt])))}function qin(){qin=E,HRt=Abn((KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])))}function Xin(){Xin=E,Yut=new iC("BY_SIZE",0),Zut=new iC("BY_SIZE_AND_SHAPE",1)}function zin(){zin=E,gft=new wC("EADES",0),pft=new wC("FRUCHTERMAN_REINGOLD",1)}function Vin(){Vin=E,dgt=new nI("READING_DIRECTION",0),ggt=new nI("ROTATION",1)}function Win(){Win=E,zlt=new Pt,Vlt=new At,qlt=new Lt,Xlt=new Ot,Wlt=new Nt}function Qin(n){this.b=new Zm,this.a=new Zm,this.c=new Zm,this.d=new Zm,this.e=n}function Jin(n){this.g=n,this.f=new Zm,this.a=e.Math.min(this.g.c.c,this.g.d.c)}function Yin(n,t,e){HF.call(this),Qrn(this),this.a=n,this.c=e,this.b=t.d,this.f=t.e}function Zin(n,t,e){var i;for(i=new Ww(e);i.a<i.c.c.length;)PPn(n,t,N3(i))}function nrn(n,t,e){var i;if(null==t)throw hv(new Rv);return i=v0(n,t),K5(n,t,e),i}function trn(n,t){var e;return(e=uG(cQ(n.a,t),137))||(e=new Yn,vJ(n.a,t,e)),e}function ern(n,t){var e;return null==n.i&&eqn(n),e=n.i,t>=0&&t<e.length?e[t]:null}function irn(n,t){var e;return e=t>0?t-1:t,lj(bj(xcn(xG(new fy,e),n.n),n.j),n.k)}function rrn(n){var t;t=new Yk,ttn((!n.q&&(n.q=new fV(p_t,n,11,10)),n.q),t)}function crn(n){return(2&n.i?"interface ":1&n.i?"":"class ")+(vK(n),n.o)}function arn(n){return dwn(n,vZn)>0?vZn:dwn(n,j1n)<0?j1n:pz(n)}function orn(n){return n<3?(man(n,b1n),n+1):n<d1n?t0(n/.75+1):vZn}function urn(n,t){return tJ(t),zz(n),!!n.d.Ob()&&(t.Cd(n.d.Pb()),!0)}function srn(n,t){var e,i;return(e=uG(Xwn(n.d,t),16))?(i=t,n.e.pc(i,e)):null}function hrn(n,t,e,i){n.j=-1,P$n(n,sAn(n,t,e),(PP(),uG(t,69).vk().xl(i)))}function frn(n,t){return ncn(),-d$(uG(oIn(n,(QGn(),kCt)),17).a,uG(oIn(t,kCt),17).a)}function lrn(n,t){return!!bun(n,t,pz(Ngn(h1n,PJ(pz(Ngn(null==t?0:Hon(t),f1n)),15))))}function brn(){return rDn(),Uhn(cT(PFt,1),p1n,245,0,[jFt,yFt,MFt,kFt,TFt,mFt,pFt,vFt])}function wrn(){return lAn(),Uhn(cT(SNt,1),p1n,285,0,[yNt,wNt,mNt,kNt,dNt,gNt,pNt,vNt])}function drn(){return h_n(),Uhn(cT(Xdt,1),p1n,276,0,[Odt,Ndt,Idt,xdt,Ldt,Adt,Ddt,$dt])}function grn(n){var t;return(t=uM(pK(oIn(n,(jYn(),tMt)))))<0&&kfn(n,tMt,t=0),t}function prn(n,t){var e;for(e=n.Kc();e.Ob();)kfn(uG(e.Pb(),72),(GYn(),Qpt),t)}function mrn(n,t,i){var r;TEn(i,r=e.Math.max(0,n.b/2-.5),1),kD(t,new AC(i,r))}function vrn(n,t,e){return t0(gq(n.a.e[uG(t.a,10).p]-n.a.e[uG(e.a,10).p]))}function krn(n,t){var e;return vgn(n),e=new QY(n,n.a.zd(),4|n.a.yd(),t),new fX(n,e)}function yrn(n){var t;TK(!!n.c),t=n.c.a,Lrn(n.d,n.c),n.b==n.c?n.b=t:--n.a,n.c=null}function Mrn(n){return n.a>=-.01&&n.a<=Z2n&&(n.a=0),n.b>=-.01&&n.b<=Z2n&&(n.b=0),n}function Trn(n){var t,e;for(l_n(),e=G9n,t=0;t<n.length;t++)n[t]>e&&(e=n[t]);return e}function jrn(n,t){var e;if(!(e=EKn(n.Dh(),t)))throw hv(new vM(Gtt+t+ztt));return e}function Ern(n,t){var e;for(e=n;R0(e);)if((e=R0(e))==t)return!0;return!1}function Srn(n,t){var e,i,r;for(i=t.a.ld(),e=uG(t.a.md(),16).gc(),r=0;r<e;r++)n.Cd(i)}function Prn(n,t){var e,i,r,c;for(tJ(t),r=0,c=(i=n.c).length;r<c;++r)e=i[r],t.Cd(e)}function Crn(n,t,e,i,r,c){var a;c2(a=K9(i),r),u2(a,c),UNn(n.a,i,new $B(a,t,e.f))}function Irn(n,t){Myn(n,(lBn(),jOt),t.f),Myn(n,yOt,t.e),Myn(n,TOt,t.d),Myn(n,kOt,t.c)}function Orn(n,t){this.a=new Ym,this.e=new Ym,this.b=(Cwn(),hjt),this.c=n,this.b=t}function Arn(n){this.d=n,this.c=n.c.vc().Kc(),this.b=null,this.a=null,this.e=(Hy(),Iat)}function Lrn(n,t){var e;return e=t.c,t.a.b=t.b,t.b.a=t.a,t.a=t.b=null,t.c=null,--n.b,e}function Nrn(n,t){return!(!t||n.b[t.g]!=t||(uQ(n.b,t.g,null),--n.c,0))}function $rn(n,t){if(0>n||n>t)throw hv(new YM("fromIndex: 0, toIndex: "+n+Q0n+t))}function Drn(n){if(n<0)throw hv(new vM("Illegal Capacity: "+n));this.g=this.aj(n)}function xrn(n,t){return YN(),oan(T1n),e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)}function Rrn(n,t){var e,i,r,c;for(r=0,c=(i=n.d).length;r<c;++r)e=i[r],oD(n.g,e).a=t}function Krn(n,t,e){var i,r,c;for(r=t[e],i=0;i<r.length;i++)c=r[i],n.e[c.c.p][c.p]=i}function Frn(n){var t;for(t=0;t<n.c.length;t++)(u3(t,n.c.length),uG(n.c[t],12)).p=t}function _rn(n){var t,e;for(t=n.a.d.j,e=n.c.d.j;t!=e;)Mon(n.b,t),t=qdn(t);Mon(n.b,t)}function Brn(n){var t;return(t=e.Math.sqrt(n.a*n.a+n.b*n.b))>0&&(n.a/=t,n.b/=t),n}function Hrn(n){var t;return n.w?n.w:((t=O3(n))&&!t.Vh()&&(n.w=t),t)}function Urn(n,t){var e,i;i=n.a,e=kdn(n,t,null),i!=t&&!n.e&&(e=PWn(n,t,e)),e&&e.oj()}function Grn(n,t,e){var i,r;i=t;do{r=uM(n.p[i.p])+e,n.p[i.p]=r,i=n.a[i.p]}while(i!=t)}function qrn(n,t,e){var i=function(){return n.apply(i,arguments)};return t.apply(i,e),i}function Xrn(n){var t;return null==n?null:NCn(t=uG(n,195),t.length)}function zrn(n,t){if(null==n.g||t>=n.i)throw hv(new pL(t,n.i));return n.Wi(t,n.g[t])}function Vrn(n,t){var e,i;for(hZ(),i=new Zm,e=0;e<n;++e)mv(i.c,t);return new eT(i)}function Wrn(n){return vgn(n),kG(!0,"n may not be negative"),new fX(n,new Fan(n.a))}function Qrn(n){n.b=(Ktn(),Ost),n.f=(Yen(),Kst),n.d=(man(2,g1n),new R7(2)),n.e=new sj}function Jrn(n){this.b=(WW(n),new Z_(n)),this.a=new Zm,this.d=new Zm,this.e=new sj}function Yrn(){Yrn=E,jst=new cC("BEGIN",0),Est=new cC(G2n,1),Sst=new cC("END",2)}function Zrn(){Zrn=E,ixt=new CO(G2n,0),rxt=new CO("HEAD",1),cxt=new CO("TAIL",2)}function ncn(){ncn=E,GCt=Lvn(Lvn(Lvn(gP(new wJ,(Cjn(),VSt)),(OHn(),fPt)),rPt),uPt)}function tcn(){tcn=E,XCt=Lvn(Lvn(Lvn(gP(new wJ,(Cjn(),QSt)),(OHn(),aPt)),tPt),cPt)}function ecn(){ecn=E,zdt=Abn((vAn(),Uhn(cT(Qdt,1),p1n,232,0,[Hdt,Gdt,Bdt,Udt,qdt,_dt])))}function icn(){icn=E,Agt=Abn((tOn(),Uhn(cT($gt,1),p1n,283,0,[Egt,jgt,Pgt,Sgt,Igt,Cgt])))}function rcn(){rcn=E,Ugt=Abn((ESn(),Uhn(cT(Qgt,1),p1n,281,0,[Fgt,Kgt,Bgt,Rgt,_gt,xgt])))}function ccn(){ccn=E,Jgt=Abn((RIn(),Uhn(cT(upt,1),p1n,282,0,[Vgt,qgt,Wgt,zgt,Xgt,Ggt])))}function acn(){acn=E,mbt=Abn((zIn(),Uhn(cT(vbt,1),p1n,273,0,[dbt,wbt,lbt,gbt,bbt,fbt])))}function ocn(){ocn=E,DNt=Abn((nMn(),Uhn(cT(n$t,1),p1n,255,0,[CNt,ANt,LNt,NNt,INt,ONt])))}function ucn(){ucn=E,t$t=Abn((ZSn(),Uhn(cT(txt,1),p1n,298,0,[ZNt,YNt,JNt,WNt,VNt,QNt])))}function scn(){scn=E,yxt=Abn((RCn(),Uhn(cT(Lxt,1),p1n,321,0,[mxt,gxt,vxt,wxt,pxt,dxt])))}function hcn(){hcn=E,fRt=Abn(($Pn(),Uhn(cT(mRt,1),p1n,101,0,[sRt,uRt,oRt,rRt,aRt,cRt])))}function fcn(){fcn=E,vRt=Abn((eNn(),Uhn(cT(BRt,1),p1n,279,0,[gRt,wRt,dRt,bRt,lRt,pRt])))}function lcn(){lcn=E,$st=(Yrn(),Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length,Nst=$st}function bcn(){return VDn(),Uhn(cT(eRt,1),p1n,95,0,[Bxt,_xt,Uxt,Vxt,zxt,Xxt,Gxt,qxt,Hxt])}function wcn(n,t){return jIn(),d$(n.b.c.length-n.e.c.length,t.b.c.length-t.e.c.length)}function dcn(n,t){return Cj(lun(n,t,pz(Ngn(h1n,PJ(pz(Ngn(null==t?0:Hon(t),f1n)),15)))))}function gcn(n,t){return YN(),oan(T1n),e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)}function pcn(n,t){var e;e=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new t8(n,1,e,n.b))}function mcn(n,t){var e;e=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new t8(n,3,e,n.b))}function vcn(n,t){var e;e=n.f,n.f=t,4&n.Db&&!(1&n.Db)&&Msn(n,new t8(n,3,e,n.f))}function kcn(n,t){var e;e=n.g,n.g=t,4&n.Db&&!(1&n.Db)&&Msn(n,new t8(n,4,e,n.g))}function ycn(n,t){var e;e=n.i,n.i=t,4&n.Db&&!(1&n.Db)&&Msn(n,new t8(n,5,e,n.i))}function Mcn(n,t){var e;e=n.j,n.j=t,4&n.Db&&!(1&n.Db)&&Msn(n,new t8(n,6,e,n.j))}function Tcn(n,t){var e;e=n.j,n.j=t,4&n.Db&&!(1&n.Db)&&Msn(n,new t8(n,1,e,n.j))}function jcn(n,t){var e;e=n.c,n.c=t,4&n.Db&&!(1&n.Db)&&Msn(n,new t8(n,4,e,n.c))}function Ecn(n,t){var e;e=n.k,n.k=t,4&n.Db&&!(1&n.Db)&&Msn(n,new t8(n,2,e,n.k))}function Scn(n,t){var e;e=n.a,n.a=t,4&n.Db&&!(1&n.Db)&&Msn(n,new t8(n,0,e,n.a))}function Pcn(n,t){var e;e=n.s,n.s=t,4&n.Db&&!(1&n.Db)&&Msn(n,new e8(n,4,e,n.s))}function Ccn(n,t){var e;e=n.t,n.t=t,4&n.Db&&!(1&n.Db)&&Msn(n,new e8(n,5,e,n.t))}function Icn(n,t){var e;e=n.d,n.d=t,4&n.Db&&!(1&n.Db)&&Msn(n,new e8(n,2,e,n.d))}function Ocn(n,t){var e;e=n.F,n.F=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,5,e,t))}function Acn(n,t){var e;return(e=uG(cQ((TP(),_Ft),n),57))?e.gk(t):Inn(dat,EZn,1,t,5,1)}function Lcn(n,t){return YF(D$(uG(cQ(n.g,t),8)),x$(uG(cQ(n.f,t),470).b))}function Ncn(n,t){var e,i;return gj(),i=new cs,!!t&&vKn(i,t),Van(e=i,n),e}function $cn(n,t){var e;return t in n.a&&(e=v0(n,t).re())?e.a:null}function Dcn(n,t,e){if(gln(n,e),!n.kl()&&null!=e&&!n.fk(e))throw hv(new Nv);return e}function xcn(n,t){return n.n=t,n.n?(n.f=new Zm,n.e=new Zm):(n.f=null,n.e=null),n}function Rcn(n,t){if(n){t.n=n;var e=u0(t);e?e.Rm=t:sZn[n]=[t]}}function Kcn(n){var t;return Fq(null==n||Array.isArray(n)&&!((t=Min(n))>=14&&t<=16)),n}function Fcn(n,t){var e;return tJ(t),vG(!!(e=n[":"+t]),"Enum constant undefined: "+t),e}function _cn(n,t,e,i,r,c){var a;return Rcn(e,a=VW(n,t)),a.i=r?8:0,a.f=i,a.e=r,a.g=c,a}function Bcn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=n,this.a=e}function Hcn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=n,this.a=e}function Ucn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=n,this.a=e}function Gcn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=n,this.a=e}function qcn(n,t,e,i,r){this.d=t,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=n,this.a=e}function Xcn(n,t){var e,i,r,c;for(r=0,c=(i=t).length;r<c;++r)e=i[r],een(n.a,e);return n}function zcn(n){var t,e,i;for(e=0,i=(t=n).length;e<i;++e)WW(t[e]);return new rN(n)}function Vcn(n){var t;return OEn(t=YF(D$(n.d.d),n.c.d),n.c.e.a,n.c.e.b),JF(t,n.c.d)}function Wcn(n){var t;return OEn(t=YF(D$(n.c.d),n.d.d),n.d.e.a,n.d.e.b),JF(t,n.d.d)}function Qcn(n){var t=/function(?:\s+([\w$]+))?\s*\(/.exec(n);return t&&t[1]||O1n}function Jcn(n,t,i){var r;return r=n.length,b$n(n,0,t,0,e.Math.min(i,r),!0),t}function Ycn(n,t,e){var i,r;for(r=t.Kc();r.Ob();)i=uG(r.Pb(),74),FV(n,uG(e.Kb(i),27))}function Zcn(n,t){L_(uG(oIn(uG(n.e,10),(jYn(),JMt)),101))&&(hZ(),f$(uG(n.e,10).j,t))}function nan(){return W_n(),Uhn(cT(yst,1),p1n,257,0,[pst,lst,bst,fst,dst,gst,wst,hst,sst])}function tan(){return MKn(),Uhn(cT(fjt,1),p1n,265,0,[rjt,tjt,ejt,YTt,njt,cjt,ijt,JTt,ZTt])}function ean(){ean=E,_Et=new jI("BARYCENTER",0),BEt=new jI(p6n,1),HEt=new jI(m6n,2)}function ian(){ian=E,gEt=new MI("NO",0),wEt=new MI(x6n,1),dEt=new MI("LOOK_BACK",2)}function ran(){ran=E,igt=new YC("ARD",0),cgt=new YC("MSD",1),rgt=new YC("MANUAL",2)}function can(){can=E,Qjt=new mI(Y2n,0),Vjt=new mI("INPUT",1),Wjt=new mI("OUTPUT",2)}function aan(){return cNt||Oln(cNt=new ABn,Uhn(cT(vst,1),EZn,134,0,[new Dl])),cNt}function oan(n){if(!(n>=0))throw hv(new vM("tolerance ("+n+") must be >= 0"));return n}function uan(n,t){var e;return F$(t,44)?n.c.Mc(t):(e=ymn(n,t),Svn(n,t),e)}function san(n,t,e){return Kbn(n,t),qon(n,e),Pcn(n,0),Ccn(n,1),mdn(n,!0),ddn(n,!0),n}function han(n,t){var e;if(e=n.gc(),t<0||t>e)throw hv(new w_(t,e));return new N_(n,t)}function fan(n,t){n.b=e.Math.max(n.b,t.d),n.e+=t.r+(0==n.a.c.length?0:n.c),kD(n.a,t)}function lan(n){TK(n.c>=0),Rvn(n.d,n.c)<0&&(n.a=n.a-1&n.d.a.length-1,n.b=n.d.c),n.c=-1}function ban(n){var t;for(t=n.c.Cc().Kc();t.Ob();)uG(t.Pb(),16).$b();n.c.$b(),n.d=0}function wan(n){var t,e,i,r;for(i=0,r=(e=n.a).length;i<r;++i)dW(t=e[i],t.length,null)}function dan(n,t){var e,i,r;for(i=0,r=(e=t).length;i<r;++i)s8(n,e[i],n.c.b,n.c)}function gan(n,t){var e,i;for(e=0,i=n.gc();e<i;++e)if(OJ(t,n.Xb(e)))return e;return-1}function pan(n){var t,e;if(0==n)return 32;for(e=0,t=1;!(t&n);t<<=1)++e;return e}function man(n,t){if(n<0)throw hv(new vM(t+" cannot be negative but was: "+n));return n}function van(n,t){typeof window===wZn&&typeof window.$gwt===wZn&&(window.$gwt[n]=t)}function kan(n,t){return Pj(bun(n.a,t,pz(Ngn(h1n,PJ(pz(Ngn(null==t?0:Hon(t),f1n)),15)))))}function yan(n,t,e){return gen(n,new dd(t),new an,new gd(e),Uhn(cT(Rut,1),p1n,108,0,[]))}function Man(){return oUn(),Uhn(cT(wKt,1),p1n,264,0,[eKt,rKt,tKt,cKt,aKt,uKt,oKt,iKt,nKt])}function Tan(){Tan=E,wot=Uhn(cT(YHt,1),W1n,28,15,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function jan(){jan=E,Zdt=new JC("LAYER_SWEEP",0),Ydt=new JC(D6n,1),ngt=new JC(q4n,2)}function Ean(){Ean=E,CEt=Aq(Aq(Aq(new wJ,(uIn(),Tlt),(zYn(),Xbt)),jlt,pwt),Elt,gwt)}function San(){San=E,IEt=Aq(Aq(Aq(new wJ,(uIn(),Tlt),(zYn(),Xbt)),jlt,pwt),Elt,gwt)}function Pan(){Pan=E,OEt=Aq(Aq(Aq(new wJ,(uIn(),Tlt),(zYn(),Xbt)),jlt,pwt),Elt,gwt)}function Can(){Can=E,AEt=Aq(Aq(Aq(new wJ,(uIn(),Tlt),(zYn(),Xbt)),jlt,pwt),Elt,gwt)}function Ian(){Ian=E,LEt=Aq(Aq(Aq(new wJ,(uIn(),Tlt),(zYn(),Xbt)),jlt,pwt),Elt,gwt)}function Oan(){Oan=E,DEt=Aq(Aq(Aq(new wJ,(uIn(),Tlt),(zYn(),Xbt)),jlt,pwt),Elt,gwt)}function Aan(){Aan=E,KEt=wz(Aq(Aq(new wJ,(uIn(),Elt),(zYn(),kwt)),Slt,hwt),Plt,vwt)}function Lan(n){var t;for(t=new Ww(FTn(n));t.a<t.c.c.length;)uG(N3(t),695)._f()}function Nan(){kE();for(var n=hZn,t=0;t<arguments.length;t++)n.push(arguments[t])}function $an(n){HS(),this.g=new Ym,this.f=new Ym,this.b=new Ym,this.c=new K1,this.i=n}function Dan(){this.f=new sj,this.d=new xk,this.c=new sj,this.a=new Zm,this.b=new Zm}function xan(n,t,e,i){this.ak(),this.a=t,this.b=n,this.c=null,this.c=new b_(this,t,e,i)}function Ran(n,t,e,i,r){this.d=n,this.n=t,this.g=e,this.o=i,this.p=-1,r||(this.o=-2-i-1)}function Kan(){$D.call(this),this.n=-1,this.g=null,this.i=null,this.j=null,this.Bb|=w1n}function Fan(n){rL.call(this,n.Ad(64)?g$(0,$gn(n.zd(),1)):YZn,n.yd()),this.b=1,this.a=n}function _an(n,t){return ncn(),uG(oIn(t,(QGn(),kCt)),17).a<n.gc()&&uG(oIn(t,kCt),17).a>=0}function Ban(n,t){n.r>0&&n.c<n.r&&(n.c+=t,n.i&&n.i.d>0&&0!=n.g&&Ban(n.i,t/n.r*n.i.d))}function Han(n,t){var e;e=n.c,n.c=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,1,e,n.c))}function Uan(n,t){var e;e=n.c,n.c=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,4,e,n.c))}function Gan(n,t){var e;e=n.k,n.k=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,2,e,n.k))}function qan(n,t){var e;e=n.D,n.D=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,2,e,n.D))}function Xan(n,t){var e;e=n.f,n.f=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,8,e,n.f))}function zan(n,t){var e;e=n.i,n.i=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,7,e,n.i))}function Van(n,t){var e;e=n.a,n.a=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,8,e,n.a))}function Wan(n,t){var e;e=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,0,e,n.b))}function Qan(n,t){var e;e=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,0,e,n.b))}function Jan(n,t){var e;e=n.c,n.c=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,1,e,n.c))}function Yan(n,t){var e;e=n.d,n.d=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,1,e,n.d))}function Zan(n,t,e){var i;n.b=t,n.a=e,i=512&~n.a?new $f:new ay,n.c=qFn(i,n.b,n.a)}function non(n,t){return EFn(n.e,t)?(PP(),ein(t)?new Cq(t,n):new OA(t,n)):new PA(t,n)}function ton(n){return 0>n?new mS:new OK(null,new i9(n+1,n))}function eon(n,t){var e;return hZ(),e=new sS(1),RA(n)?r2(e,n,t):VAn(e.f,n,t),new Vw(e)}function ion(n,t){var e,i;return e=n.c,(i=t.e[n.p])>0?uG(zq(e.a,i-1),10):null}function ron(n,t){var e,i;return(e=n.o+n.p)<(i=t.o+t.p)?-1:e==i?0:1}function con(n){var t;return F$(t=oIn(n,(GYn(),rmt)),167)?Qpn(uG(t,167)):null}function aon(n){var t;return(n=e.Math.max(n,2))>(t=pfn(n))?(t<<=1)>0?t:d1n:t}function oon(n){switch(_D(3!=n.e),n.e){case 2:return!1;case 0:return!0}return a7(n)}function uon(n,t){var e;return!!F$(t,8)&&(e=uG(t,8),n.a==e.a&&n.b==e.b)}function son(n,t){var e;e=new et,uG(t.b,68),uG(t.b,68),uG(t.b,68),Prn(t.a,new $U(n,e,t))}function hon(n,t){var e,i;for(i=t.vc().Kc();i.Ob();)rSn(n,(e=uG(i.Pb(),44)).ld(),e.md())}function fon(n,t){var e;e=n.d,n.d=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,11,e,n.d))}function lon(n,t){var e;e=n.j,n.j=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,13,e,n.j))}function bon(n,t){var e;e=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,21,e,n.b))}function won(n,t){0==(t9(),Nut?null:t.c).length&&RK(t,new G),r2(n.a,Nut?null:t.c,t)}function don(n,t){t.Ug("Hierarchical port constraint processing",1),ayn(n),yYn(n),t.Vg()}function gon(){gon=E,Sdt=new VC("START",0),Edt=new VC("MIDDLE",1),jdt=new VC("END",2)}function pon(){pon=E,VCt=new YI("P1_NODE_PLACEMENT",0),WCt=new YI("P2_EDGE_ROUTING",1)}function mon(){mon=E,Wft=new Cm(E4n),Qft=new Cm(S4n),Vft=new Cm(P4n),zft=new Cm(C4n)}function von(n){var t;return OB(n.f.g,n.d),MK(n.b),n.c=n.a,t=uG(n.a.Pb(),44),n.b=Phn(n),t}function kon(n){return null==n.b?(EP(),EP(),eBt):n.ul()?n.tl():n.sl()}function yon(n,t){var e;return!((e=null==t?-1:Ten(n.b,t,0))<0||(Con(n,e),0))}function Mon(n,t){var e;return tJ(t),e=t.g,!n.b[e]&&(uQ(n.b,e,t),++n.c,!0)}function Ton(n,t){var e,i;return e=1-t,i=n.a[e],n.a[e]=i.a[t],i.a[t]=n,n.b=!0,i.b=!1,i}function jon(n,t){var e,i;for(i=t.Kc();i.Ob();)e=uG(i.Pb(),272),n.b=!0,FV(n.e,e),e.b=n}function Eon(n,t){var e,i;return e=uG(oIn(n,(jYn(),rTt)),8),i=uG(oIn(t,rTt),8),ugn(e.b,i.b)}function Son(n,t,e){var i,r;return r=t>>5,i=31&t,E3(Dz(n.n[e][r],pz(Nz(i,1))),3)}function Pon(n,t,e){var i,r,c;for(c=n.a.length-1,r=n.b,i=0;i<e;r=r+1&c,++i)uQ(t,i,n.a[r])}function Con(n,t){var e;e=i7(n.b,n.b.c.length-1),t<n.b.c.length&&(Y8(n.b,t,e),CLn(n,t))}function Ion(n,t){var e;return(e=uG(cQ(n.c,t),467))||((e=new Ek).c=t,vJ(n.c,e.c,e)),e}function Oon(n,t){var e,i;i=new Zm,e=t;do{mv(i.c,e),e=uG(cQ(n.k,e),18)}while(e);return i}function Aon(n,t,e){var i;return gFn(n,t,i=new Zm,e,!0,!0),n.b=new Don(i.c.length),i}function Lon(n,t){var e,i;for(Ntn(e=n.Pc(),0,e.length,t),i=0;i<e.length;i++)n.hd(i,e[i])}function Non(n){var t,e;for(e=new DD(n);e.e!=e.i.gc();)ycn(t=uG(Zkn(e),27),0),Mcn(t,0)}function $on(n){this.e=n,this.d=new Dj(orn(kz(this.e).gc())),this.c=this.e.a,this.b=this.e.c}function Don(n){this.b=n,this.a=Inn(YHt,W1n,28,n+1,15,1),this.c=Inn(YHt,W1n,28,n,15,1),this.d=0}function xon(n,t,e){Orn.call(this,t,e),this.d=Inn(pbt,e6n,10,n.a.c.length,0,1),Ekn(n.a,this.d)}function Ron(n,t,e){M6.call(this,n,t,e),this.a=new Ym,this.b=new Ym,this.d=new Zg(this)}function Kon(n){tz.call(this),this.b=uM(pK(oIn(n,(jYn(),dTt)))),this.a=uG(oIn(n,Vyt),223)}function Fon(n,t){var e;return F$(t,16)?(e=uG(t,16),n.Gc(e)):cin(n,uG(WW(t),20).Kc())}function _on(n,t){kS(JJ(new fX(null,new h3(new Lw(n.b),1)),new UO(n,t)),new qO(n,t))}function Bon(n,t){t.Ug(g6n,1),kS(sin(new fX(null,new h3(n.b,16)),new Zt),new ne),t.Vg()}function Hon(n){return RA(n)?pln(n):FA(n)?OL(n):KA(n)?XK(n):Cz(n)?n.Hb():xX(n)?xx(n):OZ(n)}function Uon(n){var t,e;for(e=n.c.a.ec().Kc();e.Ob();)Xb(t=uG(e.Pb(),219),new MV(t.f))}function Gon(n){var t,e;for(e=n.c.a.ec().Kc();e.Ob();)zb(t=uG(e.Pb(),219),new PIn(t.e))}function qon(n,t){var e;e=n.zb,n.zb=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,1,e,n.zb))}function Xon(n,t){var e;e=n.xb,n.xb=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,3,e,n.xb))}function zon(n,t){var e;e=n.yb,n.yb=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,2,e,n.yb))}function Von(n,t){var e;(e=new Wk).n=t,ttn((!n.s&&(n.s=new fV(o_t,n,21,17)),n.s),e)}function Won(n,t){var e;(e=new PK).n=t,ttn((!n.s&&(n.s=new fV(o_t,n,21,17)),n.s),e)}function Qon(n,t){var e,i,r;for(tJ(t),e=!1,r=t.Kc();r.Ob();)i=r.Pb(),e|=n.Fc(i);return e}function Jon(n){var t,e,i;for(t=0,i=n.Kc();i.Ob();)t=~~(t+=null!=(e=i.Pb())?Hon(e):0);return t}function Yon(n,t){var e=n.a,i=0;for(var r in e)e.hasOwnProperty(r)&&(t[i++]=r);return t}function Zon(n){var t;return 0==n?"UTC":(n<0?(n=-n,t="UTC+"):t="UTC-",t+oin(n))}function nun(n){return n.a<54?n.f<0?-1:n.f>0?1:0:(!n.c&&(n.c=j2(Bsn(n.f))),n.c).e}function tun(n,t){t?null==n.B&&(n.B=n.D,n.D=null):null!=n.B&&(n.D=n.B,n.B=null)}function eun(n,t){return Xhn(),n==Flt&&t==Hlt||n==Hlt&&t==Flt||n==Blt&&t==_lt||n==_lt&&t==Blt}function iun(n,t){return Xhn(),n==Flt&&t==_lt||n==Flt&&t==Blt||n==Hlt&&t==Blt||n==Hlt&&t==_lt}function run(n,t){return YN(),oan(Z2n),e.Math.abs(0-t)<=Z2n||0==t||isNaN(0)&&isNaN(t)?0:n/t}function cun(n,t){return uM(pK(yx(cdn(YJ(new fX(null,new h3(n.c.b,16)),new _g(n)),t))))}function aun(n,t){return uM(pK(yx(cdn(YJ(new fX(null,new h3(n.c.b,16)),new Fg(n)),t))))}function oun(){return r_n(),Uhn(cT(bpt,1),p1n,259,0,[Zgt,tpt,ept,ipt,rpt,cpt,opt,Ygt,npt,apt])}function uun(){return THn(),Uhn(cT(Hjt,1),p1n,243,0,[$jt,Ijt,Ljt,Ojt,Ajt,Sjt,Njt,Djt,Pjt,Cjt])}function sun(n,t){t.Ug("General Compactor",1),Bpn(uG(zDn(n,(jOn(),LIt)),393)).Cg(n)}function hun(n,t){var e,i;return e=uG(zDn(n,(jOn(),FIt)),17),i=uG(zDn(t,FIt),17),d$(e.a,i.a)}function fun(n,t,e){var i,r;for(r=Fkn(n,0);r.b!=r.d.c;)(i=uG(I6(r),8)).a+=t,i.b+=e;return n}function lun(n,t,e){var i;for(i=n.b[e&n.f];i;i=i.b)if(e==i.a&&xQ(t,i.g))return i;return null}function bun(n,t,e){var i;for(i=n.c[e&n.f];i;i=i.d)if(e==i.f&&xQ(t,i.i))return i;return null}function wun(n,t,e){var i,r,c;for(i=0,r=0;r<e;r++)c=t[r],n[r]=c<<1|i,i=c>>>31;0!=i&&(n[e]=i)}function dun(n,t,e,i,r,c){var a;this.c=n,tTn(n,a=new Zm,t,n.b,e,i,r,c),this.a=new N4(a,0)}function gun(){this.c=new Vj(0),this.b=new Vj(F9n),this.d=new Vj(K9n),this.a=new Vj(_3n)}function pun(n,t,e,i,r,c,a){_E.call(this,n,t),this.d=e,this.e=i,this.c=r,this.b=c,this.a=n7(a)}function mun(n,t,e,i,r,c,a,o,u,s,h,f,l){return eLn(n,t,e,i,r,c,a,o,u,s,h,f,l),Sgn(n,!1),n}function vun(n){return n.b.c.i.k==(zIn(),lbt)?uG(oIn(n.b.c.i,(GYn(),rmt)),12):n.b.c}function kun(n){return n.b.d.i.k==(zIn(),lbt)?uG(oIn(n.b.d.i,(GYn(),rmt)),12):n.b.d}function yun(n){var t;return _A((t=t6(n)).a,0)?(gS(),gS(),fut):(gS(),new dR(t.b))}function Mun(n){var t;return _A((t=Z4(n)).a,0)?(dS(),dS(),hut):(dS(),new wR(t.b))}function Tun(n){var t;return _A((t=Z4(n)).a,0)?(dS(),dS(),hut):(dS(),new wR(t.c))}function jun(n){switch(n.g){case 2:return KQn(),_Rt;case 4:return KQn(),kRt;default:return n}}function Eun(n){switch(n.g){case 1:return KQn(),KRt;case 3:return KQn(),yRt;default:return n}}function Sun(n){switch(n.g){case 0:return new Wo;case 1:return new Qo;default:return null}}function Pun(){Pun=E,Hwt=new uF("edgelabelcenterednessanalysis.includelabel",(qx(),tot))}function Cun(){Cun=E,FEt=Lvn(gL(Aq(Aq(new wJ,(uIn(),Elt),(zYn(),kwt)),Slt,hwt),Plt),vwt)}function Iun(){Iun=E,XEt=Lvn(gL(Aq(Aq(new wJ,(uIn(),Elt),(zYn(),kwt)),Slt,hwt),Plt),vwt)}function Oun(){Oun=E,V_t=new Qk,Q_t=Uhn(cT(o_t,1),krt,179,0,[]),W_t=Uhn(cT(p_t,1),yrt,62,0,[])}function Aun(){Aun=E,Obt=new PC("TO_INTERNAL_LTR",0),Ibt=new PC("TO_INPUT_DIRECTION",1)}function Lun(){Lun=E,Tbt=new Bt,ybt=new Ht,Mbt=new Ut,kbt=new Gt,jbt=new qt,Ebt=new Xt}function Nun(n,t){t.Ug(g6n,1),Apn(FS(new Ad((zS(),new mY(n,!1,!1,new Ft))))),t.Vg()}function $un(n,t,e){e.Ug("DFS Treeifying phase",1),qmn(n,t),qKn(n,t),n.a=null,n.b=null,e.Vg()}function Dun(n,t){return qx(),RA(n)?r7(n,mK(t)):FA(n)?Rz(n,pK(t)):KA(n)?xz(n,gK(t)):n.Fd(t)}function xun(n,t){var e,i;for(tJ(t),i=t.vc().Kc();i.Ob();)e=uG(i.Pb(),44),n.zc(e.ld(),e.md())}function Run(n,t,e){var i;for(i=e.Kc();i.Ob();)if(!H5(n,t,i.Pb()))return!1;return!0}function Kun(n,t,e,i,r){var c;return e&&(c=emn(t.Dh(),n.c),r=e.Rh(t,-1-(-1==c?i:c),null,r)),r}function Fun(n,t,e,i,r){var c;return e&&(c=emn(t.Dh(),n.c),r=e.Th(t,-1-(-1==c?i:c),null,r)),r}function _un(n){var t;if(-2==n.b){if(0==n.e)t=-1;else for(t=0;0==n.a[t];t++);n.b=t}return n.b}function Bun(n){if(tJ(n),0==n.length)throw hv(new ZM("Zero length BigInteger"));XHn(this,n)}function Hun(n){this.i=n.gc(),this.i>0&&(this.g=this.aj(this.i+(this.i/8|0)+1),n.Qc(this.g))}function Uun(n,t,e){this.g=n,this.d=t,this.e=e,this.a=new Zm,RLn(this),hZ(),f$(this.a,null)}function Gun(n,t){t.q=n,n.d=e.Math.max(n.d,t.r),n.b+=t.d+(0==n.a.c.length?0:n.c),kD(n.a,t)}function qun(n,t){var e,i,r,c;return r=n.c,e=n.c+n.b,c=n.d,i=n.d+n.a,t.a>r&&t.a<e&&t.b>c&&t.b<i}function Xun(n,t){var e,i;for(i=Fkn(n,0);i.b!=i.d.c;)(e=uG(I6(i),8)).a+=t.a,e.b+=t.b;return n}function zun(n){var t,e;for(e=0,t=new Ww(n.b);t.a<t.c.c.length;)uG(N3(t),30).p=e,++e}function Vun(n){var t,e,i;return n.j==(KQn(),yRt)&&(e=$x(t=_$n(n),kRt),(i=$x(t,_Rt))||i&&e)}function Wun(n,t){var e;return jNn(new MO((e=ECn(n)).c,e.d),new MO(e.b,e.a),n.Mf(),t,n.ag())}function Qun(n,t){var e;vZ(e=uG(t,190),"x",n.i),vZ(e,"y",n.j),vZ(e,wet,n.g),vZ(e,bet,n.f)}function Jun(n,t){F$(t,85)?(uG(n.c,79).Gk(),hon(n,uG(t,85))):uG(n.c,79).Wb(t)}function Yun(n,t){var e,i;for(tJ(t),i=n.vc().Kc();i.Ob();)e=uG(i.Pb(),44),t.Yd(e.ld(),e.md())}function Zun(n,t){for(WW(t);n.Ob();)if(!shn(uG(n.Pb(),10)))return!1;return!0}function nsn(){var n;return Sut||(Sut=new ik,LN(n=new e9(""),(pS(),Eut)),won(Sut,n)),Sut}function tsn(n,t){return gen(new ld(n),new bd(t),new wd(t),new nn,Uhn(cT(Rut,1),p1n,108,0,[]))}function esn(){esn=E,iOt=new iO(q4n,0),rOt=new iO("POLAR_COORDINATE",1),eOt=new iO("ID",2)}function isn(){isn=E,Zjt=new vI("EQUALLY",0),nEt=new vI(o3n,1),tEt=new vI("NORTH_SOUTH",2)}function rsn(){rsn=E,Oht=new uF("debugSVG",(qx(),!1)),Aht=new uF("overlapsExisted",!0)}function csn(){csn=E,TNt=Abn((lAn(),Uhn(cT(SNt,1),p1n,285,0,[yNt,wNt,mNt,kNt,dNt,gNt,pNt,vNt])))}function asn(){asn=E,SFt=Abn((rDn(),Uhn(cT(PFt,1),p1n,245,0,[jFt,yFt,MFt,kFt,TFt,mFt,pFt,vFt])))}function osn(){osn=E,Kdt=Abn((h_n(),Uhn(cT(Xdt,1),p1n,276,0,[Odt,Ndt,Idt,xdt,Ldt,Adt,Ddt,$dt])))}function usn(){return OHn(),Uhn(cT(pPt,1),p1n,262,0,[fPt,rPt,uPt,sPt,oPt,iPt,hPt,tPt,aPt,cPt,ePt])}function ssn(n,t,e){var i,r;return r=uG(W_(n.d,t),17),i=uG(W_(n.b,e),17),r&&i?I7(n,r.a,i.a):null}function hsn(n,t){var e;return!!(e=QBn(aan(),n))&&(Myn(t,(XYn(),yDt),e),!0)}function fsn(n){return VK(),n.A.Hc((Qmn(),VRt))&&!n.B.Hc((oUn(),rKt))?xmn(n):null}function lsn(){this.a=uG(Jkn((cGn(),Tft)),17).a,this.c=uM(pK(Jkn(_ft))),this.b=uM(pK(Jkn(xft)))}function bsn(n){this.f=n,this.e=new a8(this.f.i),this.a=this.e,this.b=Phn(this),this.d=this.f.g}function wsn(n,t){_G.call(this,dBt,n,t),this.b=this,this.a=VKn(n.Dh(),ern(this.e.Dh(),this.c))}function dsn(n,t){var e,i;for(i=new Ww(t.b);i.a<i.c.c.length;)e=uG(N3(i),30),n.a[e.p]=OIn(e)}function gsn(n,t){var e;for(e=0;e<t.j.c.length;e++)uG(xen(n,e),21).Gc(uG(xen(t,e),16));return n}function psn(n,t,e,i){var r;e>(r=n.a.length)?e=r:s3(t,e+1),n.a=r1(n.a,0,t)+""+i+sQ(n.a,e)}function msn(n,t){n.a=Lgn(n.a,1),n.c=e.Math.min(n.c,t),n.b=e.Math.max(n.b,t),n.d=Lgn(n.d,t)}function vsn(n,t){return t<n.b.gc()?uG(n.b.Xb(t),10):t==n.b.gc()?n.a:uG(zq(n.e,t-n.b.gc()-1),10)}function ksn(n,t,e){return ugn(bD($kn(n),new MO(t.e.a,t.e.b)),bD($kn(n),new MO(e.e.a,e.e.b)))}function ysn(n,t,e){return n==(ean(),HEt)?new Cc:0!=uRn(t,1)?new rj(e.length):new ij(e.length)}function Msn(n,t){var e,i,r;if(null!=(e=n.th())&&n.wh())for(i=0,r=e.length;i<r;++i)e[i].dj(t)}function Tsn(n,t){var e,i,r;for(e=n.c.Xe(),r=t.Kc();r.Ob();)i=r.Pb(),n.a.Yd(e,i);return n.b.Kb(e)}function jsn(n,t){var e,i;for(i=HQ(e=n).e;i;){if((e=i)==t)return!0;i=HQ(e).e}return!1}function Esn(n){var t;return 0==(t=n.h)?n.l+n.m*w0n:t==l0n?n.l+n.m*w0n-d0n:n}function Ssn(n,t,e){var i,r;return(i=n.a.f[t.p])<(r=n.a.f[e.p])?-1:i==r?0:1}function Psn(n,t){var e,i;for(i=new Ww(t);i.a<i.c.c.length;)e=uG(N3(i),72),kD(n.d,e),TIn(n,e)}function Csn(n,t){t.Ug("Edge and layer constraint edge reversal",1),cQn(pBn(n)),t.Vg()}function Isn(n,t){var e,i;for(i=new DD(n);i.e!=i.i.gc();)kN(e=uG(Zkn(i),27),e.i+t.b,e.j+t.d)}function Osn(n){var t;null==n.d?(++n.e,n.f=0,Mwn(null)):(++n.e,t=n.d,n.d=null,n.f=0,Mwn(t))}function Asn(n){var t;if(n.a==n.b.a)throw hv(new Bv);return t=n.a,n.c=t,n.a=uG(nJ(n.a.e),227),t}function Lsn(n,t){var e;return n.Db&t?-1==(e=jTn(n,t))?n.Eb:Kcn(n.Eb)[e]:null}function Nsn(n,t){var e;return(e=new Kl).G=t,!n.rb&&(n.rb=new vV(n,s_t,n)),ttn(n.rb,e),e}function $sn(n,t){var e;return(e=new Gv).G=t,!n.rb&&(n.rb=new vV(n,s_t,n)),ttn(n.rb,e),e}function Dsn(n,t,e,i){F$(n.Cb,184)&&(uG(n.Cb,184).tb=null),qon(n,e),t&&INn(n,t),i&&n.gl(!0)}function xsn(n,t){n.c&&(vHn(n,t,!0),kS(new fX(null,new h3(t,16)),new Xg(n))),vHn(n,t,!1)}function Rsn(n){var t;return n$(),DP(vSt,n)||((t=new ca).a=n,yF(vSt,n,t)),uG(AJ(vSt,n),645)}function Ksn(n){var t;if(n.g>1||n.Ob())return++n.a,n.g=0,t=n.i,n.Ob(),t;throw hv(new Bv)}function Fsn(n){switch(n.a.g){case 1:return new KI;case 3:return new zTn;default:return new ml}}function _sn(n,t){switch(t){case 1:return!!n.n&&0!=n.n.i;case 2:return null!=n.k}return j4(n,t)}function Bsn(n){return p0n<n&&n<d0n?n<0?e.Math.ceil(n):e.Math.floor(n):Esn(oKn(n))}function Hsn(n){var t;return n<128?(rX(),!(t=sot[n])&&(t=sot[n]=new xw(n)),t):new xw(n)}function Usn(n,t){var e;try{t.de()}catch(i){if(!F$(i=Ehn(i),82))throw hv(i);e=i,mv(n.c,e)}}function Gsn(n){var t,e,i;return e=0,(i=n)<0&&(i+=d0n,e=l0n),t=t0(i/w0n),p$(t0(i-t*w0n),t,e)}function qsn(n){var t,e,i;for(i=0,e=new fS(n.a);e.a<e.c.a.length;)t=X5(e),n.b.Hc(t)&&++i;return i}function Xsn(n){var t,e,i;for(t=1,i=n.Kc();i.Ob();)t=~~(t=31*t+(null==(e=i.Pb())?0:Hon(e)));return t}function zsn(n,t){var e;return t?((e=t.nf()).dc()||(n.q?xun(n.q,e):n.q=new nL(e)),n):n}function Vsn(n,t){var e;return void 0===(e=n.a.get(t))?++n.d:(CF(n.a,t),--n.c,++n.b.g),e}function Wsn(n,t){var e;return 0==(e=t.p-n.p)?ugn(n.f.a*n.f.b,t.f.a*t.f.b):e}function Qsn(n,t){var e,i;return(e=n.j)!=(i=t.j)?e.g-i.g:n.p==t.p?0:e==(KQn(),yRt)?n.p-t.p:t.p-n.p}function Jsn(n,t,e,i,r){uQ(n.c[t.g],e.g,i),uQ(n.c[e.g],t.g,i),uQ(n.b[t.g],e.g,r),uQ(n.b[e.g],t.g,r)}function Ysn(n,t,e){this.b=(tJ(n),n),this.d=(tJ(t),t),this.e=(tJ(e),e),this.c=this.d+""+this.e}function Zsn(n,t){this.b=n,this.e=t,this.d=t.j,this.f=(PP(),uG(n,69).xk()),this.k=VKn(t.e.Dh(),n)}function nhn(n){this.n=new Zm,this.e=new lS,this.j=new lS,this.k=new Zm,this.f=new Zm,this.p=n}function thn(n){n.r=new ek,n.w=new ek,n.t=new Zm,n.i=new Zm,n.d=new ek,n.a=new cN,n.c=new Ym}function ehn(){ehn=E,pht=new uC("UP",0),wht=new uC(c3n,1),dht=new uC(z2n,2),ght=new uC(V2n,3)}function ihn(){ihn=E,fpt=new oI("ONE_SIDED",0),lpt=new oI("TWO_SIDED",1),hpt=new oI("OFF",2)}function rhn(){rhn=E,OAt=new sO("EQUAL_BETWEEN_STRUCTURES",0),AAt=new sO("TO_ASPECT_RATIO",1)}function chn(){chn=E,ojt=Abn((MKn(),Uhn(cT(fjt,1),p1n,265,0,[rjt,tjt,ejt,YTt,njt,cjt,ijt,JTt,ZTt])))}function ahn(){ahn=E,hKt=Abn((oUn(),Uhn(cT(wKt,1),p1n,264,0,[eKt,rKt,tKt,cKt,aKt,uKt,oKt,iKt,nKt])))}function ohn(){ohn=E,Qxt=Abn((VDn(),Uhn(cT(eRt,1),p1n,95,0,[Bxt,_xt,Uxt,Vxt,zxt,Xxt,Gxt,qxt,Hxt])))}function uhn(){uhn=E,kst=Abn((W_n(),Uhn(cT(yst,1),p1n,257,0,[pst,lst,bst,fst,dst,gst,wst,hst,sst])))}function shn(n){var t;return t=uG(oIn(n,(GYn(),Fpt)),64),n.k==(zIn(),lbt)&&(t==(KQn(),_Rt)||t==kRt)}function hhn(n,t,e){var i,r;(r=uG(oIn(n,(jYn(),bMt)),75))&&(rbn(i=new Uk,0,r),Xun(i,e),Qon(t,i))}function fhn(n,t,e){var i,r,c,a;i=(a=HQ(n)).d,r=a.c,c=n.n,t&&(c.a=c.a-i.b-r.a),e&&(c.b=c.b-i.d-r.b)}function lhn(n,t){var e,i;return(e=n.f.c.length)<(i=t.f.c.length)?-1:e==i?0:1}function bhn(n){return 0!=n.b.c.length&&uG(zq(n.b,0),72).a?uG(zq(n.b,0),72).a:sY(n)}function whn(n){var t;if(n){if((t=n).dc())throw hv(new Bv);return t.Xb(t.gc()-1)}return y2(n.Kc())}function dhn(n){var t;return dwn(n,0)<0&&(n=CG(n)),64-(0!=(t=pz(Dz(n,32)))?GNn(t):GNn(pz(n))+32)}function ghn(){return t9(),Nut?new e9(null):$$n(nsn(),"com.google.common.base.Strings")}function phn(n,t,e,i){return 1==e?(!n.n&&(n.n=new fV(lFt,n,1,7)),Nyn(n.n,t,i)):BIn(n,t,e,i)}function mhn(n,t){var e;return qon(e=new Fs,t),ttn((!n.A&&(n.A=new PD(J_t,n,7)),n.A),e),e}function vhn(n,t,e){var i,r;return r=p6(t,pet),iSn((i=new QO(n,e)).a,i.b,r),r}function khn(n){var t;return n.a&&(1&n.Bb||!n.a.Vh())||F$(t=bEn(n),156)&&(n.a=uG(t,156)),n.a}function yhn(n,t){var e,i;for(tJ(t),i=t.Kc();i.Ob();)if(e=i.Pb(),!n.Hc(e))return!1;return!0}function Mhn(n,t){var e,i,r;return e=n.l+t.l,i=n.m+t.m+(e>>22),r=n.h+t.h+(i>>22),p$(e&f0n,i&f0n,r&l0n)}function Thn(n,t){var e,i,r;return e=n.l-t.l,i=n.m-t.m+(e>>22),r=n.h-t.h+(i>>22),p$(e&f0n,i&f0n,r&l0n)}function jhn(n){var t,e;for(BQn(n),e=new Ww(n.d);e.a<e.c.c.length;)(t=uG(N3(e),105)).i&&NOn(t)}function Ehn(n){var t;return F$(n,82)?n:((t=n&&n.__java$exception)||Cv(t=new qbn(n)),t)}function Shn(n){if(F$(n,193))return uG(n,123);if(n)return null;throw hv(new MM(Het))}function Phn(n){return!!n.a.Ob()||n.a==n.e&&(n.a=new Hnn(n.f.f),n.a.Ob())}function Chn(n,t){if(null==t)return!1;for(;n.a!=n.b;)if(udn(t,rwn(n)))return!0;return!1}function Ihn(n,t){return!(!n||!t||n==t)&&hvn(n.d.c,t.d.c+t.d.b)&&hvn(t.d.c,n.d.c+n.d.b)}function Ohn(n,t){var e;return 0!=(e=t.Pc()).length&&(dG(n.c,n.c.length,e),!0)}function Ahn(n,t,e){var i,r;for(r=t.vc().Kc();r.Ob();)i=uG(r.Pb(),44),n.yc(i.ld(),i.md(),e);return n}function Lhn(n){var t,e;for(t=new lS,e=Fkn(n.d,0);e.b!=e.d.c;)aq(t,uG(I6(e),65).c);return t}function Nhn(n,t){var e;for(e=new Ww(n.b);e.a<e.c.c.length;)kfn(uG(N3(e),72),(GYn(),Qpt),t)}function $hn(n,t,e){var i,r;for(r=new Ww(n.b);r.a<r.c.c.length;)kN(i=uG(N3(r),27),i.i+t,i.j+e)}function Dhn(n,t){if(!n)throw hv(new vM(LBn("value already present: %s",Uhn(cT(dat,1),EZn,1,5,[t]))))}function xhn(n,t,i,r,c){return l_n(),e.Math.min(uWn(n,t,i,r,c),uWn(i,r,n,t,BR(new MO(c.a,c.b))))}function Rhn(n,t,e,i){uG(e.b,68),uG(e.b,68),uG(i.b,68),uG(i.b,68),uG(i.b,68),Prn(i.a,new NU(n,t,i))}function Khn(n,t){n.d==(xdn(),JDt)||n.d==nxt?uG(t.a,60).c.Fc(uG(t.b,60)):uG(t.b,60).c.Fc(uG(t.a,60))}function Fhn(n,t){var e;return e=iR(t.a.gc()),kS(krn(new fX(null,new h3(t,1)),n.i),new yO(n,e)),e}function _hn(n){var t;return qon(t=new Fs,"T"),ttn((!n.d&&(n.d=new PD(J_t,n,11)),n.d),t),t}function Bhn(n){var t,e,i,r;for(t=1,e=0,r=n.gc();e<r;++e)t=31*t+(null==(i=n.Vi(e))?0:Hon(i));return t}function Hhn(n,t,e,i){var r;return q4(t,n.e.Rd().gc()),q4(e,n.c.Rd().gc()),r=n.a[t][e],uQ(n.a[t],e,i),r}function Uhn(n,t,e,i,r){return r.Rm=n,r.Sm=t,r.Tm=j,r.__elementTypeId$=e,r.__elementTypeCategory$=i,r}function Ghn(){Ghn=E,zwt=new IC(q4n,0),qwt=new IC(M6n,1),Xwt=new IC(T6n,2),Gwt=new IC("BOTH",3)}function qhn(){qhn=E,odt=new XC(G2n,0),udt=new XC(z2n,1),sdt=new XC(V2n,2),hdt=new XC("TOP",3)}function Xhn(){Xhn=E,Flt=new jC("Q1",0),Hlt=new jC("Q4",1),_lt=new jC("Q2",2),Blt=new jC("Q3",3)}function zhn(){zhn=E,kEt=new TI("OFF",0),yEt=new TI("SINGLE_EDGE",1),vEt=new TI("MULTI_EDGE",2)}function Vhn(){Vhn=E,VLt=new wO("MINIMUM_SPANNING_TREE",0),zLt=new wO("MAXIMUM_SPANNING_TREE",1)}function Whn(){Whn=E,new Cm("org.eclipse.elk.addLayoutConfig"),ZLt=new ru,YLt=new iu,new cu}function Qhn(n){var t;return gj(),t=new is,n&&ttn((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a),t),t}function Jhn(n){var t,e;for(e=new Zm,t=n.Kc();t.Ob();)Ohn(e,GFn(uG(t.Pb(),27)));return e}function Yhn(n,t){var e,i;for(bZ(t,"predicate"),i=0;n.Ob();i++)if(e=n.Pb(),t.Lb(e))return i;return-1}function Zhn(n,t){var e,i;if(i=0,n<64&&n<=t)for(t=t<64?t:63,e=n;e<=t;e++)i=S3(i,Nz(1,e));return i}function nfn(n,t){var e,i;return e=n.c,(i=t.e[n.p])<e.a.c.length-1?uG(zq(e.a,i+1),10):null}function tfn(n){var t,e,i;for(hZ(),i=0,e=n.Kc();e.Ob();)i+=null!=(t=e.Pb())?Hon(t):0,i|=0;return i}function efn(n){var t,e;return e=(t=uG(n.e&&n.e(),9)).slice(),new nB(t,uG(Ltn(e,t),9),t.length)}function ifn(n,t,e){var i;$V(n.a),Prn(e.i,new Bp(n)),Wvn(n,i=new C$(uG(cQ(n.a,t.b),68)),t),e.f=i}function rfn(n){var t;pqn(n,!0),t=$1n,vR(n,(jYn(),aTt))&&(t+=uG(oIn(n,aTt),17).a),kfn(n,aTt,xwn(t))}function cfn(n){var t;return(t=new y).a=n,t.b=Qfn(n),t.c=Inn($ot,zZn,2,2,6,1),t.c[0]=Zon(n),t.c[1]=Zon(n),t}function afn(n){var t,e,i;return e=n.n,i=n.o,t=n.d,new gY(e.a-t.b,e.b-t.d,i.a+(t.b+t.c),i.b+(t.d+t.a))}function ofn(n,t){return!(!n||!t||n==t)&&Fgn(n.b.c,t.b.c+t.b.b)<0&&Fgn(t.b.c,n.b.c+n.b.b)<0}function ufn(n){switch(n.g){case 1:return Dxt;case 2:return $xt;case 3:return xxt;default:return Rxt}}function sfn(n){switch(uG(oIn(n,(jYn(),gMt)),171).g){case 2:case 4:return!0;default:return!1}}function hfn(n,t,e){switch(e.g){case 2:n.b=t;break;case 1:n.c=t;break;case 4:n.d=t;break;case 3:n.a=t}}function ffn(n,t){if(0===t)return!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),void n.o.c.$b();oAn(n,t)}function lfn(n,t){return OGn(uG(uG(cQ(n.g,t.a),42).a,68),uG(uG(cQ(n.g,t.b),42).a,68))}function bfn(n,t,e){var i;if(t>(i=n.gc()))throw hv(new w_(t,i));return n.Si()&&(e=A0(n,e)),n.Ei(t,e)}function wfn(n,t,e,i,r){var c,a;for(a=e;a<=r;a++)for(c=t;c<=i;c++)eTn(n,c,a)||HBn(n,c,a,!0,!1)}function dfn(n){var t,e,i;for(l_n(),e=Inn(PNt,zZn,8,2,0,1),i=0,t=0;t<2;t++)i+=.5,e[t]=WMn(i,n);return e}function gfn(n){var t,e;return p$(t=1+~n.l&f0n,e=~n.m+(0==t?1:0)&f0n,~n.h+(0==t&&0==e?1:0)&l0n)}function pfn(n){var t;if(n<0)return j1n;if(0==n)return 0;for(t=d1n;!(t&n);t>>=1);return t}function mfn(n,t,e){return!(n>=128)&&HA(n<64?E3(Nz(1,n),e):E3(Nz(1,n-64),t),0)}function vfn(n,t,e){return null==e?(!n.q&&(n.q=new Ym),u7(n.q,t)):(!n.q&&(n.q=new Ym),vJ(n.q,t,e)),n}function kfn(n,t,e){return null==e?(!n.q&&(n.q=new Ym),u7(n.q,t)):(!n.q&&(n.q=new Ym),vJ(n.q,t,e)),n}function yfn(n){var t,e;return zsn(e=new d7,n),kfn(e,(mon(),Wft),n),kqn(n,e,t=new Ym),zWn(n,e,t),e}function Mfn(n){var t,e;return t=n.t-n.k[n.o.p]*n.d+n.j[n.o.p]>n.f,e=n.u+n.e[n.o.p]*n.d>n.f*n.s*n.d,t||e}function Tfn(n,t){var e,i,r;for(e=!1,i=n.a[t].length,r=0;r<i-1;r++)e|=tvn(n,t,r,r+1);return e}function jfn(n){var t,e,i,r;for(i=0,r=(e=n.a).length;i<r;++i)Hfn(n,t=e[i],(KQn(),KRt)),Hfn(n,t,yRt)}function Efn(){Efn=E,spt=Abn((r_n(),Uhn(cT(bpt,1),p1n,259,0,[Zgt,tpt,ept,ipt,rpt,cpt,opt,Ygt,npt,apt])))}function Sfn(){Sfn=E,Rjt=Abn((THn(),Uhn(cT(Hjt,1),p1n,243,0,[$jt,Ijt,Ljt,Ojt,Ajt,Sjt,Njt,Djt,Pjt,Cjt])))}function Pfn(){Pfn=E,kgt=new tI(q4n,0),vgt=new tI("INCOMING_ONLY",1),ygt=new tI("OUTGOING_ONLY",2)}function Cfn(){Cfn=E,Wat={boolean:uS,number:hM,string:fM,object:wLn,function:wLn,undefined:lv}}function Ifn(){this.o=null,this.k=null,this.j=null,this.d=null,this.b=null,this.n=null,this.a=null}function Ofn(n,t){this.c=n,this.d=t,this.b=this.d/this.c.c.Rd().gc()|0,this.a=this.d%this.c.c.Rd().gc()}function Afn(n,t){this.b=n,vL.call(this,(uG(zrn(gZ((tQ(),M_t).o),10),19),t.i),t.g),this.a=(Oun(),Q_t)}function Lfn(n,t,i){this.q=new e.Date,this.q.setFullYear(n+V1n,t,i),this.q.setHours(0,0,0,0),Iqn(this,0)}function Nfn(n,t){vG(n>=0,"Negative initial capacity"),vG(t>=0,"Non-positive load factor"),$V(this)}function $fn(n,t,e,i,r){var c,a;if(a=n.length,c=e.length,t<0||i<0||r<0||t+r>a||i+r>c)throw hv(new Lv)}function Dfn(n,t){var e,i,r,c,a;for(hZ(),a=!1,r=0,c=(i=t).length;r<c;++r)e=i[r],a|=n.Fc(e);return a}function xfn(n,t,e){var i,r;return i=new _nn(t,e),r=new B,n.b=FFn(n,n.b,i,r),r.b||++n.c,n.b.b=!1,r.d}function Rfn(n){var t;return null==(t=n.a[n.b])?null:(uQ(n.a,n.b,null),n.b=n.b+1&n.a.length-1,t)}function Kfn(n){var t,e;return 32==(e=GNn(n.h))?32==(t=GNn(n.m))?GNn(n.l)+32:t+20-10:e-12}function Ffn(n){var t;return(!n.c||!(1&n.Bb)&&64&n.c.Db)&&F$(t=bEn(n),90)&&(n.c=uG(t,29)),n.c}function _fn(n){var t,e;for(e=new Ww(n.a.b);e.a<e.c.c.length;)(t=uG(N3(e),60)).d.c=-t.d.c-t.d.b;hKn(n)}function Bfn(n){var t,e;for(e=new Ww(n.a.b);e.a<e.c.c.length;)(t=uG(N3(e),86)).g.c=-t.g.c-t.g.b;fKn(n)}function Hfn(n,t,e){var i,r,c;for(c=0,r=Vwn(t,e).Kc();r.Ob();)i=uG(r.Pb(),12),vJ(n.c,i,xwn(c++))}function Ufn(n,t,e){var i;return gFn(n,t,i=new Zm,(KQn(),kRt),!0,!1),gFn(n,e,i,_Rt,!1,!1),i}function Gfn(n){var t,e,i,r,c;for(t=new sj,r=0,c=(i=n).length;r<c;++r)e=i[r],t.a+=e.a,t.b+=e.b;return t}function qfn(n,t,e){var i,r;return r=p6(t,"labels"),_Dn((i=new aA(n,e)).a,i.b,r),r}function Xfn(n,t,e,i){var r;return(r=hxn(n,t,e,i))||!(r=Odn(n,e,i))||iVn(n,t,r)?r:null}function zfn(n,t,e,i){var r;return(r=fxn(n,t,e,i))||!(r=Adn(n,e,i))||iVn(n,t,r)?r:null}function Vfn(n,t,e){if(WW(t),e.Ob())for(YA(t,KQ(e.Pb()));e.Ob();)YA(t,n.a),YA(t,KQ(e.Pb()));return t}function Wfn(n,t){var e;for(e=0;e<n.a.a.length;e++)if(!uG(Vq(n.a,e),178).Lb(t))return!1;return!0}function Qfn(n){var t;return 0==n?"Etc/GMT":(n<0?(n=-n,t="Etc/GMT-"):t="Etc/GMT+",t+oin(n))}function Jfn(n){var t;return!(n.b<=0)&&((t=xL("MLydhHmsSDkK",$Cn(VJ(n.c,0))))>1||t>=0&&n.b<3)}function Yfn(n){var t,e,i;t=1+~n.l&f0n,e=~n.m+(0==t?1:0)&f0n,i=~n.h+(0==t&&0==e?1:0)&l0n,n.l=t,n.m=e,n.h=i}function Zfn(n){var t,e,i;for(hZ(),i=1,e=n.Kc();e.Ob();)i=31*i+(null!=(t=e.Pb())?Hon(t):0),i|=0;return i}function nln(n,t,e,i,r){var c;return c=gDn(n,t),e&&Yfn(c),r&&(n=hTn(n,t),Qat=i?gfn(n):p$(n.l,n.m,n.h)),c}function tln(n,t,e){n.g=mAn(n,t,(KQn(),kRt),n.b),n.d=mAn(n,e,kRt,n.b),0!=n.g.c&&0!=n.d.c&&AIn(n)}function eln(n,t,e){n.g=mAn(n,t,(KQn(),_Rt),n.j),n.d=mAn(n,e,_Rt,n.j),0!=n.g.c&&0!=n.d.c&&AIn(n)}function iln(n,t){switch(t){case 7:return!!n.e&&0!=n.e.i;case 8:return!!n.d&&0!=n.d.i}return Kpn(n,t)}function rln(n,t){switch(t.g){case 0:F$(n.b,641)||(n.b=new lsn);break;case 1:F$(n.b,642)||(n.b=new zG)}}function cln(n){if(0===n.g)return new eu;throw hv(new vM(lnt+(null!=n.f?n.f:""+n.g)))}function aln(n){if(0===n.g)return new nu;throw hv(new vM(lnt+(null!=n.f?n.f:""+n.g)))}function oln(n,t,e){return!Qj(JJ(new fX(null,new h3(n.c,16)),new hd(new GO(t,e)))).Bd((vS(),Kut))}function uln(n,t){return bD($kn(uG(oIn(t,(QGn(),cCt)),88)),new MO(n.c.e.a-n.b.e.a,n.c.e.b-n.b.e.b))<=0}function sln(n,t){for(;null!=n.g||n.c?null==n.g||0!=n.i&&uG(n.g[n.i-1],51).Ob():O0(n);)yA(t,Wxn(n))}function hln(n){var t;for(t=new Ww(n.a.b);t.a<t.c.c.length;)uG(N3(t),86).f.$b();Zy(n.b,n),LKn(n)}function fln(n){var t,e;for(t=new Uk,e=Fkn(n,0);e.b!=e.d.c;)sR(t,0,new eN(uG(I6(e),8)));return t}function lln(n){var t;return GQ(n),t=new un,n.a.Bd(t)?(UD(),new Xy(tJ(t.a))):(UD(),UD(),sut)}function bln(n,t,e){if(0===t)return!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),void Jun(n.o,e);sLn(n,t,e)}function wln(n,t,e){this.g=n,this.e=new sj,this.f=new sj,this.d=new lS,this.b=new lS,this.a=t,this.c=e}function dln(n,t,e,i){this.b=new Zm,this.n=new Zm,this.i=i,this.j=e,this.s=n,this.t=t,this.r=0,this.d=0}function gln(n,t){if(!n.Li()&&null==t)throw hv(new vM("The 'no null' constraint is violated"));return t}function pln(n){var t,e;for(t=0,e=0;e<n.length;e++)t=(t<<5)-t+(s3(e,n.length),n.charCodeAt(e))|0;return t}function mln(n,t){var e,i,r;for(r=n.b;r;){if(0==(e=n.a.Ne(t,r.d)))return r;i=e<0?0:1,r=r.a[i]}return null}function vln(n,t,e){var i,r;qx(),i=!!IL(e),(r=uG(t.xc(i),15))||(r=new Zm,t.zc(i,r)),r.Fc(e)}function kln(n,t){var e,i;return(e=uG(zDn(n,(S_n(),JOt)),17).a)==(i=uG(zDn(t,JOt),17).a)||e<i?-1:e>i?1:0}function yln(n){return kD(n.c,(Whn(),ZLt)),xrn(n.a,uM(pK(Jkn((lmn(),WTt)))))?new zu:new zp(n)}function Mln(n){for(;!n.d||!n.d.Ob();){if(!n.b||LM(n.b))return null;n.d=uG(xV(n.b),51)}return n.d}function Tln(n){switch(n.g){case 1:return K9n;default:case 2:return 0;case 3:return _3n;case 4:return F9n}}function jln(){var n;return QYn(),VHt||(n=eR(kJn("M",!0)),n=CX(kJn("M",!1),n),VHt=n)}function Eln(){Eln=E,CKt=new uA("ELK",0),IKt=new uA("JSON",1),PKt=new uA("DOT",2),OKt=new uA("SVG",3)}function Sln(){Sln=E,aEt=new kI("STACKED",0),rEt=new kI("REVERSE_STACKED",1),cEt=new kI("SEQUENCED",2)}function Pln(){Pln=E,gPt=new WI(q4n,0),dPt=new WI("MIDDLE_TO_MIDDLE",1),wPt=new WI("AVOID_OVERLAP",2)}function Cln(){Cln=E,tdt=new ji,edt=new Ei,ndt=new Mi,Zwt=new Si,tJ(new Ti),Ywt=new L}function Iln(){Iln=E,Pxt=new CN(15),Sxt=new _N((XYn(),W$t),Pxt),Cxt=mDt,Mxt=a$t,Txt=_$t,Ext=U$t,jxt=H$t}function Oln(n,t){var e,i,r,c,a;for(r=0,c=(i=t).length;r<c;++r)e=i[r],a=new lQ(n),e.hf(a),zqn(a);$V(n.f)}function Aln(n,t){var e;return t===n||!!F$(t,229)&&(e=uG(t,229),udn(n.Zb(),e.Zb()))}function Lln(n,t){return!!rKn(n,t)&&(UNn(n.b,uG(oIn(t,(GYn(),xpt)),21),t),aq(n.a,t),!0)}function Nln(n){var t,e;(t=uG(oIn(n,(GYn(),lmt)),10))&&(men((e=t.c).a,t),0==e.a.c.length&&men(HQ(t).b,e))}function $ln(n,t){return vR(n,(GYn(),imt))&&vR(t,imt)?uG(oIn(t,imt),17).a-uG(oIn(n,imt),17).a:0}function Dln(n,t){return vR(n,(GYn(),imt))&&vR(t,imt)?uG(oIn(n,imt),17).a-uG(oIn(t,imt),17).a:0}function xln(n){return Nut?Inn(Put,i2n,581,0,0,1):uG(Ekn(n.a,Inn(Put,i2n,581,n.a.c.length,0,1)),856)}function Rln(n,t,e,i){return TJ(),new Ry(Uhn(cT(Sat,1),c1n,44,0,[(IMn(n,t),new FE(n,t)),(IMn(e,i),new FE(e,i))]))}function Kln(n,t,e){var i;return san(i=new Yk,t,e),ttn((!n.q&&(n.q=new fV(p_t,n,11,10)),n.q),i),i}function Fln(n){var t,e,i,r;for(e=(r=LP(YKt,n)).length,i=Inn($ot,zZn,2,e,6,1),t=0;t<e;++t)i[t]=r[t];return i}function _ln(n,t){var e;2*t+1>=n.b.c.length||(_ln(n,2*t+1),(e=2*t+2)<n.b.c.length&&_ln(n,e),CLn(n,t))}function Bln(n,t){var e,i;for(i=Fkn(n,0);i.b!=i.d.c;)(e=uG(I6(i),219)).e.length>0&&(t.Cd(e),e.i&&Zdn(e))}function Hln(n,t,e){var i;for(i=e-1;i>=0&&n[i]===t[i];i--);return i<0?0:$P(E3(n[i],L0n),E3(t[i],L0n))?-1:1}function Uln(n,t,e){var i,r;this.g=n,this.c=t,this.a=this,this.d=this,r=aon(e),i=Inn($at,l1n,227,r,0,1),this.b=i}function Gln(n,t,e,i,r){var c,a;for(a=e;a<=r;a++)for(c=t;c<=i;c++)if(eTn(n,c,a))return!0;return!1}function qln(n,t){var e;for(e=n.Zb().Cc().Kc();e.Ob();)if(uG(e.Pb(),16).Hc(t))return!0;return!1}function Xln(n,t,e){var i,r,c,a;for(tJ(e),a=!1,c=n.fd(t),r=e.Kc();r.Ob();)i=r.Pb(),c.Rb(i),a=!0;return a}function zln(n,t){var e,i;return i=uG(Lsn(n.a,4),129),e=Inn(xFt,Uit,424,t,0,1),null!=i&&qGn(i,0,e,0,i.length),e}function Vln(n,t){var e;return e=new Z_n(!!(256&n.f),n.i,n.a,n.d,!!(16&n.f),n.j,n.g,t),null!=n.e||(e.c=n),e}function Wln(n,t){var e;return n===t||!!F$(t,85)&&(e=uG(t,85),OOn(Mz(n),e.vc()))}function Qln(n,t,e){var i,r;for(r=e.Kc();r.Ob();)if(i=uG(r.Pb(),44),n.Be(t,i.md()))return!0;return!1}function Jln(n,t,e){return n.d[t.p][e.p]||(Kyn(n,t,e),n.d[t.p][e.p]=!0,n.d[e.p][t.p]=!0),n.a[t.p][e.p]}function Yln(n,t){return!(!n||n==t||!vR(t,(GYn(),zpt)))&&uG(oIn(t,(GYn(),zpt)),10)!=n}function Zln(n){switch(n.i){case 2:return!0;case 1:return!1;case-1:++n.c;default:return n.$l()}}function nbn(n){switch(n.i){case-2:return!0;case-1:return!1;case 1:--n.c;default:return n._l()}}function tbn(n){U0.call(this,"The given string does not match the expected format for individual spacings.",n)}function ebn(n,t){var e;t.Ug("Min Size Preprocessing",1),e=xAn(n),Myn(n,(lBn(),EOt),e.a),Myn(n,MOt,e.b),t.Vg()}function ibn(n){var t,e,i;for(t=0,i=Inn(PNt,zZn,8,n.b,0,1),e=Fkn(n,0);e.b!=e.d.c;)i[t++]=uG(I6(e),8);return i}function rbn(n,t,e){var i,r;for(i=new lS,r=Fkn(e,0);r.b!=r.d.c;)aq(i,new eN(uG(I6(r),8)));Xln(n,t,i)}function cbn(n,t){var e;return e=Lgn(n,t),$P(P3(n,t),0)|BA(P3(n,e),0)?e:Lgn(YZn,P3(Dz(e,63),1))}function abn(n,t){var e,i;return(e=uG(n.d.Bc(t),16))?((i=n.e.hc()).Gc(e),n.e.d-=e.gc(),e.$b(),i):null}function obn(n){var t;if((t=n.a.c.length)>0)return Vz(t-1,n.a.c.length),i7(n.a,t-1);throw hv(new _v)}function ubn(n,t,e){if(n>t)throw hv(new vM(o2n+n+u2n+t));if(n<0||t>e)throw hv(new YM(o2n+n+s2n+t+Q0n+e))}function sbn(n,t){null==n.D&&null!=n.B&&(n.D=n.B,n.B=null),qan(n,null==t?null:(tJ(t),t)),n.C&&n.hl(null)}function hbn(n,t){var e;e=null!=Jkn((lmn(),WTt))&&null!=t.Sg()?uM(pK(t.Sg()))/uM(pK(Jkn(WTt))):1,vJ(n.b,t,e)}function fbn(n,t){var e,i;if(0!=(i=n.c[t]))for(n.c[t]=0,n.d-=i,e=t+1;e<n.a.length;)n.a[e]-=i,e+=e&-e}function lbn(n){var t;++n.j,0==n.i?n.g=null:n.i<n.g.length&&(t=n.g,n.g=n.aj(n.i),qGn(t,0,n.g,0,n.i))}function bbn(n,t,e){if(t<0)throw hv(new dM(Nnt+t));t<n.j.c.length?Y8(n.j,t,e):(p5(n,t),kD(n.j,e))}function wbn(n){if(!(n.a&&8&n.a.i))throw hv(new kM("Enumeration class expected for layout option "+n.f))}function dbn(n){var t;return!n.a&&(n.a=new fV(d_t,n,9,5)),0!=(t=n.a).i?bP(uG(zrn(t,0),694)):null}function gbn(n){var t;for(WW(n),CB(!0,"numberToAdvance must be nonnegative"),t=0;t<0&&hDn(n);t++)N9(n);return t}function pbn(){pbn=E,BS(),Hht=new mL(I3n,Uht=Kht),Bht=new Cm(O3n),Ght=new Cm(A3n),qht=new Cm(L3n)}function mbn(){mbn=E,xCt=new QI(X4n,0),$Ct=new QI(Q9n,1),DCt=new QI("FAN",2),NCt=new QI("CONSTRAINT",3)}function vbn(){vbn=E,sIt=new tO(q4n,0),hIt=new tO("RADIAL_COMPACTION",1),fIt=new tO("WEDGE_COMPACTION",2)}function kbn(){kbn=E,sEt=new yI("CONSERVATIVE",0),hEt=new yI("CONSERVATIVE_SOFT",1),fEt=new yI("SLOPPY",2)}function ybn(){ybn=E,Cut=new XP("CONCURRENT",0),Iut=new XP("IDENTITY_FINISH",1),Out=new XP("UNORDERED",2)}function Mbn(){Mbn=E,Nlt=g0(Uhn(cT(axt,1),p1n,88,0,[(xdn(),JDt),YDt])),$lt=g0(Uhn(cT(axt,1),p1n,88,0,[nxt,QDt]))}function Tbn(n){return RA(n)?$ot:FA(n)?fot:KA(n)?cot:Cz(n)||xX(n)?n.Rm:n.Rm||Array.isArray(n)&&cT(Kat,1)||Kat}function jbn(n){return n?1&n.i?n==ZHt?cot:n==YHt?dot:n==iUt?lot:n==eUt?fot:n==nUt?yot:n==rUt?Tot:n==tUt?uot:hot:n:null}function Ebn(n){return n.c==n.b.b&&n.i==n.g.b||(Xv(n.a.c,0),Ohn(n.a,n.b),Ohn(n.a,n.g),n.c=n.b.b,n.i=n.g.b),n.a}function Sbn(n,t){var e,i;for(e=n.a.length-1;t!=n.b;)i=t-1&e,uQ(n.a,t,n.a[i]),t=i;uQ(n.a,n.b,null),n.b=n.b+1&e}function Pbn(n,t){var e,i;for(e=n.a.length-1,n.c=n.c-1&e;t!=n.c;)i=t+1&e,uQ(n.a,t,n.a[i]),t=i;uQ(n.a,n.c,null)}function Cbn(n,t,e){var i;return o3(t,n.c.length),0!=(i=e.Pc()).length&&(dG(n.c,t,i),!0)}function Ibn(n,t,e){var i,r,c,a;for(c=0,a=(r=e).length;c<a;++c)if(i=r[c],n.b.Be(t,i.ld()))return i;return null}function Obn(n){var t,e,i,r,c;for(c=1,i=0,r=(e=n).length;i<r;++i)c=31*c+(null!=(t=e[i])?Hon(t):0),c|=0;return c}function Abn(n){var t,e,i,r,c;for(t={},r=0,c=(i=n).length;r<c;++r)t[":"+(null!=(e=i[r]).f?e.f:""+e.g)]=e;return t}function Lbn(n){var t,e;if(null==n)return null;for(t=0,e=n.length;t<e;t++)if(!OG(n[t]))return n[t];return null}function Nbn(n,t){return n?t&&!n.j||F$(n,127)&&0==uG(n,127).a.b?0:n.jf():0}function $bn(n,t){return n?t&&!n.k||F$(n,127)&&0==uG(n,127).a.a?0:n.kf():0}function Dbn(n,t){return vR(n,(GYn(),imt))&&vR(t,imt)?d$(uG(oIn(n,imt),17).a,uG(oIn(t,imt),17).a):0}function xbn(n){var t,e,i;for(i=0,e=new Fz(ix(n.a.Kc(),new h));hDn(e);)(t=uG(N9(e),18)).c.i==t.d.i||++i;return i}function Rbn(n,t){var e,i,r;for(r=t-n.f,i=new Ww(n.d);i.a<i.c.c.length;)Xmn(e=uG(N3(i),315),e.e,e.f+r);n.f=t}function Kbn(n,t){var e,i;e=n.Yk(t,null),i=null,t&&(vj(),Urn(i=new ev,n.r)),(e=CCn(n,i,e))&&e.oj()}function Fbn(n,t){var e,i,r;for(e=n,r=0;;){if(e==t)return r;if(!(i=e.e))throw hv(new Dv);e=HQ(i),++r}}function _bn(n){var t,e;for(t=n.b.a.a.ec().Kc();t.Ob();)e=new Uxn(uG(t.Pb(),567),n.e,n.f),kD(n.g,e)}function Bbn(n){var t;return t=new Jin(n),O4(n.a,Wlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[t]))),t.d&&kD(t.f,t.d),t.f}function Hbn(n,t){var e;for(e=0;e<t.length;e++)if(n==(s3(e,t.length),t.charCodeAt(e)))return!0;return!1}function Ubn(n,t){return t<n.length&&(s3(t,n.length),63!=n.charCodeAt(t))&&(s3(t,n.length),35!=n.charCodeAt(t))}function Gbn(n,t,e,i){A$(this),this.c=Inn(pbt,e6n,10,n.a.c.length,0,1),this.e=t,Ekn(n.a,this.c),this.f=e,this.b=i}function qbn(n){Uy(),LD(this),KY(this),this.e=n,yFn(this,n),this.g=null==n?IZn:cpn(n),this.a="",this.b=n,this.a=""}function Xbn(){this.a=new Jo,this.f=new $p(this),this.b=new Dp(this),this.i=new xp(this),this.e=new Rp(this)}function zbn(){Cy.call(this,new Bnn(orn(16))),man(2,XZn),this.b=2,this.a=new lJ(null,null,0,null),Tv(this.a,this.a)}function Vbn(n){throw Cfn(),hv(new Fy("Unexpected typeof result '"+n+"'; please report this bug to the GWT team"))}function Wbn(n,t,i){return e.Math.abs(t-n)<R9n||e.Math.abs(i-n)<R9n||(t-n>R9n?n-i>R9n:i-n>R9n)}function Qbn(n,t){var e;for(e=0;e<t.length;e++)if(n==(s3(e,t.length),t.charCodeAt(e)))return!0;return!1}function Jbn(n){var t,e;if(null==n)return!1;for(t=0,e=n.length;t<e;t++)if(!OG(n[t]))return!1;return!0}function Ybn(n,t){var e,i,r;return i=!1,e=t.q.d,t.d<n.b&&(r=cKn(t.q,n.b),t.q.d>r&&(USn(t.q,r),i=e!=t.q.d)),i}function Zbn(n,t){var i,r,c,a,o;return a=t.i,o=t.j,r=a-(i=n.f).i,c=o-i.j,e.Math.sqrt(r*r+c*c)}function nwn(n,t){var e;return(e=Kvn(n))||(!ZKt&&(ZKt=new Ps),ZXn(),ttn((e=new Xm(sxn(t))).El(),n)),e}function twn(n,t){var e,i;return(e=uG(n.c.Bc(t),16))?((i=n.hc()).Gc(e),n.d-=e.gc(),e.$b(),n.mc(i)):n.jc()}function ewn(n,t){var e,i;for(i=0!=uRn(n.d,1),e=!0;e;)e=!1,e=t.c.mg(t.e,i),e|=PKn(n,t,i,!1),i=!i;Gon(n)}function iwn(n,t,e,i){var r,c;n.a=t,c=i?0:1,n.f=(r=new _On(n.c,n.a,e,c),new eBn(e,n.a,r,n.e,n.b,n.c==(ean(),BEt)))}function rwn(n){var t;return MK(n.a!=n.b),t=n.d.a[n.a],jK(n.b==n.d.c&&null!=t),n.c=n.a,n.a=n.a+1&n.d.a.length-1,t}function cwn(n){var t;if(0!=n.c)return n.c;for(t=0;t<n.a.length;t++)n.c=33*n.c+(-1&n.a[t]);return n.c=n.c*n.e,n.c}function awn(n){var t;if(!(n.c.c<0?n.a>=n.c.b:n.a<=n.c.b))throw hv(new Bv);return t=n.a,n.a+=n.c.c,++n.b,xwn(t)}function own(n){var t;return zsn(t=new S$(n.a),n),kfn(t,(GYn(),rmt),n),t.o.a=n.g,t.o.b=n.f,t.n.a=n.i,t.n.b=n.j,t}function uwn(n){return(KQn(),LRt).Hc(n.j)?uM(pK(oIn(n,(GYn(),Mmt)))):Gfn(Uhn(cT(PNt,1),zZn,8,0,[n.i.n,n.n,n.a])).b}function swn(n){var t;return t=aN(KEt),uG(oIn(n,(GYn(),Hpt)),21).Hc((r_n(),rpt))&&Aq(t,(uIn(),Elt),(zYn(),Cwt)),t}function hwn(n){var t,e;for(e=new ek,t=new Ww(n);t.a<t.c.c.length;)Qon(e,f_n(uG(N3(t),27)));return e}function fwn(n){var t,e;for(e=new Ww(n.r);e.a<e.c.c.length;)if(t=uG(N3(e),10),n.n[t.p]<=0)return t;return null}function lwn(n,t,e){var i;for(i=t.a.a.ec().Kc();i.Ob();)if(NZ(n,uG(i.Pb(),60),e))return!0;return!1}function bwn(n,t,e,i){var r,c;for(c=n.Kc();c.Ob();)(r=uG(c.Pb(),72)).n.a=t.a+(i.a-r.o.a)/2,r.n.b=t.b,t.b+=r.o.b+e}function wwn(n,t,e){var i;i=new v$n(n,t),UNn(n.r,t.ag(),i),e&&!cV(n.u)&&(i.c=new a0(n.d),Prn(t.Rf(),new Ld(i)))}function dwn(n,t){var e;return _L(n)&&_L(t)&&(e=n-t,!isNaN(e))?e:yEn(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t)}function gwn(n,t){var e,i,r;for(r=1,e=n,i=t>=0?t:-t;i>0;)i%2==0?(e*=e,i=i/2|0):(r*=e,i-=1);return t<0?1/r:r}function pwn(n,t){var e,i,r;for(r=1,e=n,i=t>=0?t:-t;i>0;)i%2==0?(e*=e,i=i/2|0):(r*=e,i-=1);return t<0?1/r:r}function mwn(n,t){var e,i,r,c;return(c=fLn((i=t,(r=n?Kvn(n):null)&&r.Gl(),i)))==t&&(e=Kvn(n))&&e.Gl(),c}function vwn(n,t,e){var i,r;return r=n.f,n.f=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,0,r,t),e?e.nj(i):e=i),e}function kwn(n,t,e){var i,r;return r=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,3,r,t),e?e.nj(i):e=i),e}function ywn(n,t,e){var i,r;return r=n.a,n.a=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,1,r,t),e?e.nj(i):e=i),e}function Mwn(n){var t,e,i,r;if(null!=n)for(e=0;e<n.length;++e)if(t=n[e])for(uG(t.g,379),r=t.i,i=0;i<r;++i);}function Twn(n,t,e,i,r,c,a,o){var u;for(u=e;c<a;)u>=i||t<e&&o.Ne(n[t],n[u])<=0?uQ(r,c++,n[t++]):uQ(r,c++,n[u++])}function jwn(n,t,e,i,r){0!=t&&0!=i&&(1==t?r[i]=tMn(r,e,i,n[0]):1==i?r[t]=tMn(r,n,t,e[0]):G$n(n,e,r,t,i))}function Ewn(n,t,e){var i,r,c,a;for(i=e/n.gc(),r=0,a=n.Kc();a.Ob();)Rbn(c=uG(a.Pb(),186),c.f+i*r),qEn(c,t,i),++r}function Swn(n){var t,i,r;for(r=0,i=new Ww(n.a);i.a<i.c.c.length;)t=uG(N3(i),172),r=e.Math.max(r,t.g);return r}function Pwn(n){var t,e,i;for(i=new Ww(n.b);i.a<i.c.c.length;)(t=(e=uG(N3(i),219)).c.kg()?e.f:e.a)&&wzn(t,e.j)}function Cwn(){Cwn=E,ujt=new lI("DUMMY_NODE_OVER",0),sjt=new lI("DUMMY_NODE_UNDER",1),hjt=new lI("EQUAL",2)}function Iwn(){Iwn=E,lKt=new _O("PARALLEL_NODE",0),fKt=new _O("HIERARCHICAL_NODE",1),bKt=new _O("ROOT_NODE",2)}function Own(){Own=E,Oxt=new AO("INHERIT",0),Ixt=new AO("INCLUDE_CHILDREN",1),Axt=new AO("SEPARATE_CHILDREN",2)}function Awn(n,t){switch(t){case 1:return!n.n&&(n.n=new fV(lFt,n,1,7)),void Czn(n.n);case 2:return void Gan(n,null)}ffn(n,t)}function Lwn(n){switch(n.g){case 0:return new Xo;case 1:return new Vo;case 2:return new zo;default:return null}}function Nwn(n){switch(sB(),n.c){case 0:return nQ(),Nat;case 1:return new KM(ULn(new fS(n)));default:return new Ay(n)}}function $wn(n){switch(sB(),n.gc()){case 0:return nQ(),Nat;case 1:return new KM(n.Kc().Pb());default:return new RP(n)}}function Dwn(n){switch(n.gc()){case 0:return jat;case 1:return new Uq(WW(n.Xb(0)));default:return new t1(n)}}function xwn(n){var t,e;return n>-129&&n<128?(XG(),!(e=bot[t=n+128])&&(e=bot[t]=new Iw(n)),e):new Iw(n)}function Rwn(n){var t,e;return n>-129&&n<128?(eX(),!(e=Mot[t=n+128])&&(e=Mot[t]=new Aw(n)),e):new Aw(n)}function Kwn(n,t){n.a.c.length>0&&Lln(uG(zq(n.a,n.a.c.length-1),579),t)||kD(n.a,new r9(t))}function Fwn(n){var t,e;GB(),t=n.d.c-n.e.c,Prn((e=uG(n.g,154)).b,new Pg(t)),Prn(e.c,new Cg(t)),z8(e.i,new Ig(t))}function _wn(n){var t;return(t=new WM).a+="VerticalSegment ",QA(t,n.e),t.a+=" ",JA(t,KD(new FM,new Ww(n.k))),t.a}function Bwn(n,t){var e,i;for(e=0,i=Dgn(n,t).Kc();i.Ob();)e+=null!=oIn(uG(i.Pb(),12),(GYn(),lmt))?1:0;return e}function Hwn(n,t,e){var i,r,c;for(i=0,c=Fkn(n,0);c.b!=c.d.c&&!((r=uM(pK(I6(c))))>e);)r>=t&&++i;return i}function Uwn(n,t){WW(n);try{return n._b(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return!1;throw hv(e)}}function Gwn(n,t){WW(n);try{return n.Hc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return!1;throw hv(e)}}function qwn(n,t){WW(n);try{return n.Mc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return!1;throw hv(e)}}function Xwn(n,t){WW(n);try{return n.xc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return null;throw hv(e)}}function zwn(n,t){WW(n);try{return n.Bc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return null;throw hv(e)}}function Vwn(n,t){switch(t.g){case 2:case 1:return Dgn(n,t);case 3:case 4:return Spn(Dgn(n,t))}return hZ(),hZ(),zot}function Wwn(n){var t;return 64&n.Db?vxn(n):((t=new fx(vxn(n))).a+=" (name: ",VA(t,n.zb),t.a+=")",t.a)}function Qwn(n){var t;return(t=uG(ain(n.c.c,""),233))||(t=new I2(UT(HT(new du,""),"Other")),Akn(n.c.c,"",t)),t}function Jwn(n,t,e){var i,r;return r=n.sb,n.sb=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,4,r,t),e?e.nj(i):e=i),e}function Ywn(n,t,e){var i,r;return r=n.r,n.r=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,8,r,n.r),e?e.nj(i):e=i),e}function Zwn(n,t,e){var i;return i=new Ken(n.e,4,13,t.c||(YYn(),N_t),null,Hyn(n,t),!1),e?e.nj(i):e=i,e}function ndn(n,t,e){var i;return i=new Ken(n.e,3,13,null,t.c||(YYn(),N_t),Hyn(n,t),!1),e?e.nj(i):e=i,e}function tdn(n,t){var e,i;return!(i=(e=uG(t,691)).el())&&e.fl(i=F$(t,90)?new CA(n,uG(t,29)):new g4(n,uG(t,156))),i}function edn(n,t,e){var i;n._i(n.i+1),i=n.Zi(t,e),t!=n.i&&qGn(n.g,t,n.g,t+1,n.i-t),uQ(n.g,t,i),++n.i,n.Mi(t,e),n.Ni()}function idn(n,t){var e;return t.a&&(e=t.a.a.length,n.a?JA(n.a,n.b):n.a=new lx(n.d),L4(n.a,t.a,t.d.length,e)),n}function rdn(n,t){var e;n.c=t,n.a=Jpn(t),n.a<54&&(n.f=(e=t.d>1?C4(t.a[0],t.a[1]):C4(t.a[0],0),W4(t.e>0?e:Men(e))))}function cdn(n,t){var e;return e=new un,n.a.Bd(e)?(UD(),new Xy(tJ(ven(n,e.a,t)))):(GQ(n),UD(),UD(),sut)}function adn(n,t){var e;0!=n.c.length&&(zL(e=uG(Ekn(n,Inn(pbt,e6n,10,n.c.length,0,1)),199),new Oe),WNn(e,t))}function odn(n,t){var e;0!=n.c.length&&(zL(e=uG(Ekn(n,Inn(pbt,e6n,10,n.c.length,0,1)),199),new Ae),WNn(e,t))}function udn(n,t){return RA(n)?m_(n,t):FA(n)?p_(n,t):KA(n)?(tJ(n),xA(n)===xA(t)):Cz(n)?n.Fb(t):xX(n)?SL(n,t):j3(n,t)}function sdn(n,t,e){if(t<0)zLn(n,e);else{if(!e.rk())throw hv(new vM(Gtt+e.xe()+qtt));uG(e,69).wk().Ek(n,n.hi(),t)}}function hdn(n,t,e){if(n<0||t>e)throw hv(new dM(o2n+n+s2n+t+", size: "+e));if(n>t)throw hv(new vM(o2n+n+u2n+t))}function fdn(n){var t;return 64&n.Db?vxn(n):((t=new fx(vxn(n))).a+=" (source: ",VA(t,n.d),t.a+=")",t.a)}function ldn(n){return n>=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:n>=48&&n<=57?n-48:0}function bdn(n){var t,e,i,r;for(JYn(),i=0,r=(e=Nkn()).length;i<r;++i)if(-1!=Ten((t=e[i]).a,n,0))return t;return sht}function wdn(n,t){var e,i,r;if(t.ej(n.a),null!=(r=uG(Lsn(n.a,8),2035)))for(e=0,i=r.length;e<i;++e)null.Um()}function ddn(n,t){var e;e=!!(256&n.Bb),t?n.Bb|=256:n.Bb&=-257,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,2,e,t))}function gdn(n,t){var e;e=!!(256&n.Bb),t?n.Bb|=256:n.Bb&=-257,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,8,e,t))}function pdn(n,t){var e;e=!!(256&n.Bb),t?n.Bb|=256:n.Bb&=-257,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,8,e,t))}function mdn(n,t){var e;e=!!(512&n.Bb),t?n.Bb|=512:n.Bb&=-513,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,3,e,t))}function vdn(n,t){var e;e=!!(512&n.Bb),t?n.Bb|=512:n.Bb&=-513,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,9,e,t))}function kdn(n,t,e){var i,r;return r=n.a,n.a=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,5,r,n.a),e?kPn(e,i):e=i),e}function ydn(n,t){var e;return-1==n.b&&n.a&&(e=n.a.pk(),n.b=e?n.c.Hh(n.a.Lj(),e):emn(n.c.Dh(),n.a)),n.c.yh(n.b,t)}function Mdn(n,t){var e,i;for(i=new DD(n);i.e!=i.i.gc();)if(e=uG(Zkn(i),29),xA(t)===xA(e))return!0;return!1}function Tdn(n){var t;return n.k==(zIn(),lbt)&&((t=uG(oIn(n,(GYn(),Fpt)),64))==(KQn(),yRt)||t==KRt)}function jdn(n){var t;return _A((t=Z4(n)).a,0)?(dS(),dS(),hut):(dS(),new wR(NP(t.a,0)?c7(t)/W4(t.a):0))}function Edn(n,t){this.e=t,this.a=dhn(n),this.a<54?this.f=W4(n):this.c=(cHn(),dwn(n,0)>=0?Rmn(n):hW(Rmn(Men(n))))}function Sdn(n,t,e,i,r,c){this.e=new Zm,this.f=(can(),Qjt),kD(this.e,n),this.d=t,this.a=e,this.b=i,this.f=r,this.c=c}function Pdn(n,t,i){n.n=Jq(nUt,[zZn,E0n],[376,28],14,[i,t0(e.Math.ceil(t/32))],2),n.o=t,n.p=i,n.j=t-1>>1,n.k=i-1>>1}function Cdn(n){return n=((n=((n-=n>>1&1431655765)>>2&858993459)+(858993459&n))>>4)+n&252645135,n+=n>>8,63&(n+=n>>16)}function Idn(n,t){var e,i;for(i=new DD(n);i.e!=i.i.gc();)if(e=uG(Zkn(i),142),xA(t)===xA(e))return!0;return!1}function Odn(n,t,e){var i,r;return(r=jxn(n.b,t))&&(i=uG(JXn(Len(n,r),""),29))?hxn(n,i,t,e):null}function Adn(n,t,e){var i,r;return(r=jxn(n.b,t))&&(i=uG(JXn(Len(n,r),""),29))?fxn(n,i,t,e):null}function Ldn(n,t){var e;if(null==(e=dcn(n.i,t)))throw hv(new SM("Node did not exist in input."));return Qun(t,e),null}function Ndn(n,t){var e;if(F$(e=EKn(n,t),331))return uG(e,35);throw hv(new vM(Gtt+t+"' is not a valid attribute"))}function $dn(n,t,e){var i;if(t>(i=n.gc()))throw hv(new w_(t,i));if(n.Si()&&n.Hc(e))throw hv(new vM(Xet));n.Gi(t,e)}function Ddn(n,t){t.Ug("Sort end labels",1),kS(JJ(sin(new fX(null,new h3(n.b,16)),new we),new de),new ge),t.Vg()}function xdn(){xdn=E,ZDt=new PO(Y2n,0),YDt=new PO(V2n,1),JDt=new PO(z2n,2),QDt=new PO(c3n,3),nxt=new PO("UP",4)}function Rdn(){Rdn=E,HAt=new fO("P1_STRUCTURE",0),UAt=new fO("P2_PROCESSING_ORDER",1),GAt=new fO("P3_EXECUTION",2)}function Kdn(){Kdn=E,qCt=Lvn(Lvn(gP(Lvn(Lvn(gP(Aq(new wJ,(Cjn(),VSt),(OHn(),fPt)),WSt),oPt),sPt),QSt),iPt),hPt)}function Fdn(n){switch(uG(oIn(n,(GYn(),Xpt)),311).g){case 1:kfn(n,Xpt,(Zen(),dpt));break;case 2:kfn(n,Xpt,(Zen(),ppt))}}function _dn(n){switch(n){case 0:return new Fk;case 1:return new Rk;case 2:return new Kk;default:throw hv(new Dv)}}function Bdn(n){switch(n.g){case 2:return YDt;case 1:return JDt;case 4:return QDt;case 3:return nxt;default:return ZDt}}function Hdn(n,t){switch(n.b.g){case 0:case 1:return t;case 2:case 3:return new gY(t.d,0,t.a,t.b);default:return null}}function Udn(n){switch(n.g){case 1:return _Rt;case 2:return yRt;case 3:return kRt;case 4:return KRt;default:return FRt}}function Gdn(n){switch(n.g){case 1:return KRt;case 2:return _Rt;case 3:return yRt;case 4:return kRt;default:return FRt}}function qdn(n){switch(n.g){case 1:return kRt;case 2:return KRt;case 3:return _Rt;case 4:return yRt;default:return FRt}}function Xdn(n,t,e,i){switch(t){case 1:return!n.n&&(n.n=new fV(lFt,n,1,7)),n.n;case 2:return n.k}return ajn(n,t,e,i)}function zdn(n,t,e){var i,r;return n.Pj()?(r=n.Qj(),i=HNn(n,t,e),n.Jj(n.Ij(7,xwn(e),i,t,r)),i):HNn(n,t,e)}function Vdn(n,t){var e,i,r;null==n.d?(++n.e,--n.f):(r=t.ld(),S7(n,i=((e=t.Bi())&vZn)%n.d.length,Txn(n,i,e,r)))}function Wdn(n,t){var e;e=!!(n.Bb&w1n),t?n.Bb|=w1n:n.Bb&=-1025,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,10,e,t))}function Qdn(n,t){var e;e=!!(n.Bb&j0n),t?n.Bb|=j0n:n.Bb&=-4097,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,12,e,t))}function Jdn(n,t){var e;e=!!(n.Bb&hrt),t?n.Bb|=hrt:n.Bb&=-8193,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,15,e,t))}function Ydn(n,t){var e;e=!!(n.Bb&frt),t?n.Bb|=frt:n.Bb&=-2049,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,11,e,t))}function Zdn(n){var t;n.g&&(CFn((t=n.c.kg()?n.f:n.a).a,n.o,!0),CFn(t.a,n.o,!1),kfn(n.o,(jYn(),JMt),($Pn(),rRt)))}function ngn(n){var t;if(!n.a)throw hv(new kM("Cannot offset an unassigned cut."));t=n.c-n.b,n.b+=t,iZ(n,t),eZ(n,t)}function tgn(n,t){var e;if(null==(e=cQ(n.k,t)))throw hv(new SM("Port did not exist in input."));return Qun(t,e),null}function egn(n){var t,e;for(e=bxn(Hrn(n)).Kc();e.Ob();)if(qUn(n,t=mK(e.Pb())))return h8((yP(),r_t),t);return null}function ign(n){var t,e;for(e=n.p.a.ec().Kc();e.Ob();)if((t=uG(e.Pb(),218)).f&&n.b[t.c]<-1e-10)return t;return null}function rgn(n){var t,e;for(e=jQ(new WM,91),t=!0;n.Ob();)t||(e.a+=TZn),t=!1,QA(e,n.Pb());return(e.a+="]",e).a}function cgn(n){var t,e,i;for(t=new Zm,i=new Ww(n.b);i.a<i.c.c.length;)e=uG(N3(i),602),Ohn(t,uG(e.Cf(),16));return t}function agn(n,t){var e,i;for(i=new Ww(t);i.a<i.c.c.length;)e=uG(N3(i),42),men(n.b.b,e.b),LZ(uG(e.a,194),uG(e.b,86))}function ogn(n,t){var e;return 0!=(e=ugn(n.b.c,t.b.c))||0!=(e=ugn(n.a.a,t.a.a))?e:ugn(n.a.b,t.a.b)}function ugn(n,t){return n<t?-1:n>t?1:n==t?0==n?ugn(1/n,1/t):0:isNaN(n)?isNaN(t)?0:1:-1}function sgn(n){var t;return null==(t=n.a[n.c-1&n.a.length-1])?null:(n.c=n.c-1&n.a.length-1,uQ(n.a,n.c,null),t)}function hgn(n){var t,e,i;for(i=0,e=n.length,t=0;t<e;t++)32==n[t]||13==n[t]||10==n[t]||9==n[t]||(n[i++]=n[t]);return i}function fgn(n,t){var e,i,r,c,a;for(a=VKn(n.e.Dh(),t),c=0,e=uG(n.g,124),r=0;r<n.i;++r)i=e[r],a.am(i.Lk())&&++c;return c}function lgn(n,t,e){var i,r;for(r=F$(t,102)&&uG(t,19).Bb&P0n?new yL(t,n):new Zsn(t,n),i=0;i<e;++i)_yn(r);return r}function bgn(n,t,e){var i;if(n.c)JCn(n.c,t,e);else for(i=new Ww(n.b);i.a<i.c.c.length;)bgn(uG(N3(i),163),t,e)}function wgn(n,t,e){var i,r;return i=uG(t.of(n.a),34),r=uG(e.of(n.a),34),null!=i&&null!=r?Dun(i,r):null!=i?-1:null!=r?1:0}function dgn(n,t){var e,i,r;for(tJ(t),e=!1,i=new Ww(n);i.a<i.c.c.length;)r=N3(i),t.Hc(r)&&(tW(i),e=!0);return e}function ggn(n){var t,e,i,r;return Mon(e=new nB(t=uG(Mj((r=(i=n.Rm).f)==Oat?i:r),9),uG(MF(t,t.length),9),0),n),e}function pgn(n){var t;return(t=uG(oIn(n,(jYn(),Byt)),88))==(xdn(),ZDt)?uM(pK(oIn(n,dyt)))>=1?YDt:QDt:t}function mgn(n){switch(uG(oIn(n,(jYn(),Vyt)),223).g){case 1:return new ic;case 3:return new uc;default:return new ec}}function vgn(n){if(n.c)vgn(n.c);else if(n.d)throw hv(new kM("Stream already terminated, can't be modified or used"))}function kgn(n,t,e){var i;return i=n.a.get(t),n.a.set(t,void 0===e?null:e),void 0===i?(++n.c,++n.b.g):++n.d,i}function ygn(n,t,e){var i,r;for(r=n.a.ec().Kc();r.Ob();)if(i=uG(r.Pb(),10),yhn(e,uG(zq(t,i.p),16)))return i;return null}function Mgn(n,t,e){var i;return i=0,t&&(fN(n.a)?i+=t.f.a/2:i+=t.f.b/2),e&&(fN(n.a)?i+=e.f.a/2:i+=e.f.b/2),i}function Tgn(n,t,e){var i;!(i=e)&&(i=xG(new fy,0)),i.Ug(K4n,2),zyn(n.b,t,i.eh(1)),Xzn(n,t,i.eh(1)),hJn(t,i.eh(1)),i.Vg()}function jgn(n,t,e){var i;return gj(),Scn(i=new ns,t),pcn(i,e),n&&ttn((!n.a&&(n.a=new MD(eFt,n,5)),n.a),i),i}function Egn(n){var t;return 64&n.Db?vxn(n):((t=new fx(vxn(n))).a+=" (identifier: ",VA(t,n.k),t.a+=")",t.a)}function Sgn(n,t){var e;e=!!(n.Bb&Qtt),t?n.Bb|=Qtt:n.Bb&=-32769,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,18,e,t))}function Pgn(n,t){var e;e=!!(n.Bb&Qtt),t?n.Bb|=Qtt:n.Bb&=-32769,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,18,e,t))}function Cgn(n,t){var e;e=!!(n.Bb&VZn),t?n.Bb|=VZn:n.Bb&=-16385,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,16,e,t))}function Ign(n,t){var e;e=!!(n.Bb&P0n),t?n.Bb|=P0n:n.Bb&=-65537,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,20,e,t))}function Ogn(n){var t;return t=Inn(JHt,N1n,28,2,15,1),n-=P0n,t[0]=(n>>10)+C0n&D1n,t[1]=56320+(1023&n)&D1n,mvn(t,0,t.length)}function Agn(n){var t;return(t=YIn(n))>34028234663852886e22?M0n:t<-34028234663852886e22?T0n:t}function Lgn(n,t){var e;return _L(n)&&_L(t)&&p0n<(e=n+t)&&e<d0n?e:Esn(Mhn(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function Ngn(n,t){var e;return _L(n)&&_L(t)&&p0n<(e=n*t)&&e<d0n?e:Esn(Ozn(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function $gn(n,t){var e;return _L(n)&&_L(t)&&p0n<(e=n-t)&&e<d0n?e:Esn(Thn(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function Dgn(n,t){var e;return n.i||qLn(n),(e=uG(AJ(n.g,t),42))?new C2(n.j,uG(e.a,17).a,uG(e.b,17).a):(hZ(),hZ(),zot)}function xgn(n){return Mbn(),qx(),!!(upn(uG(n.a,86).j,uG(n.b,88))||0!=uG(n.a,86).d.e&&upn(uG(n.a,86).j,uG(n.b,88)))}function Rgn(n,t){return m_(t.b&&t.c?V3(t.b)+"->"+V3(t.c):"e_"+Hon(t),n.b&&n.c?V3(n.b)+"->"+V3(n.c):"e_"+Hon(n))}function Kgn(n,t){return m_(t.b&&t.c?V3(t.b)+"->"+V3(t.c):"e_"+Hon(t),n.b&&n.c?V3(n.b)+"->"+V3(n.c):"e_"+Hon(n))}function Fgn(n,t){return YN(),oan(T1n),e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:n<t?-1:n>t?1:KL(isNaN(n),isNaN(t))}function _gn(){_gn=E,fxt=new IO(Y2n,0),sxt=new IO("POLYLINE",1),uxt=new IO("ORTHOGONAL",2),hxt=new IO("SPLINES",3)}function Bgn(){Bgn=E,IOt=new aO("ASPECT_RATIO_DRIVEN",0),OOt=new aO("MAX_SCALE_DRIVEN",1),COt=new aO("AREA_DRIVEN",2)}function Hgn(n,t,e){try{Vfn(n,t,e)}catch(i){throw F$(i=Ehn(i),606)?hv(new x9(i)):hv(i)}return t}function Ugn(n){var t,e;for(t=0,e=n.length;t<e;t++)if(null==n[t])throw hv(new MM("at index "+t));return new IM(n)}function Ggn(n){var t,e;for(t=new Zm,e=new Ww(n.j);e.a<e.c.c.length;)kD(t,uG(N3(e),12).b);return WW(t),new iN(t)}function qgn(n){var t,e;for(t=new Zm,e=new Ww(n.j);e.a<e.c.c.length;)kD(t,uG(N3(e),12).e);return WW(t),new iN(t)}function Xgn(n){var t,e;for(t=new Zm,e=new Ww(n.j);e.a<e.c.c.length;)kD(t,uG(N3(e),12).g);return WW(t),new iN(t)}function zgn(n,t){var e,i,r;for(r=new Ym,i=t.vc().Kc();i.Ob();)vJ(r,(e=uG(i.Pb(),44)).ld(),Tsn(n,uG(e.md(),15)));return r}function Vgn(n){var t,e;for(e=TDn(Hrn(K0(n))).Kc();e.Ob();)if(qUn(n,t=mK(e.Pb())))return f8((mP(),b_t),t);return null}function Wgn(n,t){var e,i;for(i=0,e=uG(t.Kb(n),20).Kc();e.Ob();)oM(gK(oIn(uG(e.Pb(),18),(GYn(),pmt))))||++i;return i}function Qgn(n){var t,e,i;for(t=new GF(n.Rd().gc()),i=0,e=jtn(n.Rd().Kc());e.Ob();)M2(t,e.Pb(),xwn(i++));return vOn(t.a)}function Jgn(n,t,e,i){var r,c;return tJ(i),tJ(e),null==(c=null==(r=n.xc(t))?e:IS(uG(r,15),uG(e,16)))?n.Bc(t):n.zc(t,c),c}function Ygn(n,t,e,i){var r,c,a;for(r=t+1;r<e;++r)for(c=r;c>t&&i.Ne(n[c-1],n[c])>0;--c)a=n[c],uQ(n,c,n[c-1]),uQ(n,c-1,a)}function Zgn(n,t){var e,i,r,c,a;if(e=t.f,Akn(n.c.d,e,t),null!=t.g)for(c=0,a=(r=t.g).length;c<a;++c)i=r[c],Akn(n.c.e,i,t)}function npn(n,t){var e,i;for(e=Fkn(n,0);e.b!=e.d.c;){if((i=sM(pK(I6(e))))==t)return;if(i>t){F4(e);break}}lW(e,t)}function tpn(n,t){var i,r;r=uM(pK(Omn(z4(t),(jYn(),dTt)))),TEn(t,i=e.Math.max(0,r/2-.5),1),kD(n,new xC(t,i))}function epn(n,t,e){e.Ug("Straight Line Edge Routing",1),e.dh(t,l7n),DXn(n,uG(zDn(t,(SK(),zCt)),27)),e.dh(t,w7n)}function ipn(n,t){0==n.n.c.length&&kD(n.n,new c0(n.s,n.t,n.i)),kD(n.b,t),zMn(uG(zq(n.n,n.n.c.length-1),209),t),nqn(n,t)}function rpn(n){var t;this.a=new nB(t=uG(n.e&&n.e(),9),uG(MF(t,t.length),9),0),this.b=Inn(dat,EZn,1,this.a.a.length,5,1)}function cpn(n){return Array.isArray(n)&&n.Tm===j?Ij(Tbn(n))+"@"+(Hon(n)>>>0).toString(16):n.toString()}function apn(n,t){return n.h==b0n&&0==n.m&&0==n.l?(t&&(Qat=p$(0,0,0)),LL((tin(),Zat))):(t&&(Qat=p$(n.l,n.m,n.h)),p$(0,0,0))}function opn(n,t){switch(t.g){case 2:return n.b;case 1:return n.c;case 4:return n.d;case 3:return n.a;default:return!1}}function upn(n,t){switch(t.g){case 2:return n.b;case 1:return n.c;case 4:return n.d;case 3:return n.a;default:return!1}}function spn(n,t,e,i){switch(t){case 3:return n.f;case 4:return n.g;case 5:return n.i;case 6:return n.j}return Xdn(n,t,e,i)}function hpn(n,t){if(t==n.d)return n.e;if(t==n.e)return n.d;throw hv(new vM("Node "+t+" not part of edge "+n))}function fpn(n,t){var e;if(F$(e=EKn(n.Dh(),t),102))return uG(e,19);throw hv(new vM(Gtt+t+"' is not a valid reference"))}function lpn(n,t,e,i){if(t<0)lRn(n,e,i);else{if(!e.rk())throw hv(new vM(Gtt+e.xe()+qtt));uG(e,69).wk().Ck(n,n.hi(),t,i)}}function bpn(n){var t;if(n.b){if(bpn(n.b),n.b.d!=n.c)throw hv(new Fv)}else n.d.dc()&&(t=uG(n.f.c.xc(n.e),16))&&(n.d=t)}function wpn(n){var t,e;for(VK(),t=n.o.b,e=uG(uG(Y9(n.r,(KQn(),KRt)),21),87).Kc();e.Ob();)uG(e.Pb(),117).e.b+=t}function dpn(n){var t,e,i;for(this.a=new XL,i=new Ww(n);i.a<i.c.c.length;)e=uG(N3(i),16),jon(t=new hX,e),FV(this.a,t)}function gpn(n,t){var e,i,r;for(r=(i=qBn(n,t))[i.length-1]/2,e=0;e<i.length;e++)if(i[e]>=r)return t.c+e;return t.c+t.b.gc()}function ppn(n,t){var e,i,r,c;for(EK(),r=t,Ntn(i=Jtn(n),0,i.length,r),e=0;e<i.length;e++)e!=(c=nEn(n,i[e],e))&&zdn(n,e,c)}function mpn(n,t,e){var i,r;for(i=0,r=n.length;i<r;i++)if(mfn((s3(i,n.length),n.charCodeAt(i)),t,e))return!0;return!1}function vpn(n,t){var e,i;for(i=n.e.a.ec().Kc();i.Ob();)if(_In(t,(e=uG(i.Pb(),272)).d)||vLn(t,e.d))return!0;return!1}function kpn(n,t,e,i,r){var c,a,o;for(a=r;t.b!=t.c;)c=uG(xV(t),10),o=uG(Dgn(c,i).Xb(0),12),n.d[o.p]=a++,mv(e.c,o);return a}function ypn(n,t){var e,i,r,c,a,o;for(i=0,e=0,a=0,o=(c=t).length;a<o;++a)(r=c[a])>0&&(i+=r,++e);return e>1&&(i+=n.d*(e-1)),i}function Mpn(n){var t,e,i;return i=gCn(n),!pE(n.c)&&(nrn(i,"knownLayouters",e=new Ib),t=new jm(e),z8(n.c,t)),i}function Tpn(n){var t,e,i;for((i=new zM).a+="[",t=0,e=n.gc();t<e;)VA(i,ox(n.Vi(t))),++t<e&&(i.a+=TZn);return i.a+="]",i.a}function jpn(n){return null==n.e?n:(!n.c&&(n.c=new Z_n(!!(256&n.f),n.i,n.a,n.d,!!(16&n.f),n.j,n.g,null)),n.c)}function Epn(n){return n.k==(zIn(),dbt)&&o9(new fX(null,new LW(new Fz(ix(Xgn(n).a.Kc(),new h)))),new qr)}function Spn(n){return F$(n,307)?Z9(uG(n,307)):F$(n,441)?uG(n,441).a:F$(n,59)?new Ly(n):new XE(n)}function Ppn(n){var t;return null==n||(t=n.length)>0&&(s3(t-1,n.length),58==n.charCodeAt(t-1))&&!mpn(n,n_t,t_t)}function Cpn(n,t){var e;return xA(n)===xA(t)||!!F$(t,92)&&(e=uG(t,92),n.e==e.e&&n.d==e.d&&d8(n,e.a))}function Ipn(n){switch(KQn(),n.g){case 4:return yRt;case 1:return kRt;case 3:return KRt;case 2:return _Rt;default:return FRt}}function Opn(n){var t,e;if(n.b)return n.b;for(e=Nut?null:n.d;e;){if(t=Nut?null:e.b)return t;e=Nut?null:e.d}return pS(),Eut}function Apn(n){var t,e;for(e=uM(pK(n.a.of((XYn(),LDt)))),t=new Ww(n.a.Sf());t.a<t.c.c.length;)pJn(n,uG(N3(t),695),e)}function Lpn(n){var t,e;for(null==n.j&&(n.j=(EZ(),lSn(_at.me(n)))),t=0,e=n.j.length;t<e;++t)String.fromCharCode(10)}function Npn(n,t){var e,i;for(i=new Ww(t);i.a<i.c.c.length;)e=uG(N3(i),42),kD(n.b.b,uG(e.b,86)),t4(uG(e.a,194),uG(e.b,86))}function $pn(n,t,e){var i,r;for(i=(r=n.a.b).c.length;i<e;i++)GX(r,0,new bQ(n.a));a2(t,uG(zq(r,r.c.length-e),30)),n.b[t.p]=e}function Dpn(n,t,e,i,r){n2(),RKn(xS(DS($S(RS(new uk,0),r.d.e-n),t),r.d)),RKn(xS(DS($S(RS(new uk,0),e-r.a.e),r.a),i))}function xpn(n,t){var e;return n.d?PV(n.b,t)?uG(cQ(n.b,t),47):(e=t.dg(),vJ(n.b,t,e),e):t.dg()}function Rpn(n){var t=n.e;function e(n){return n&&0!=n.length?"\t"+n.join("\n\t"):""}return t&&(t.stack||e(n[A1n]))}function Kpn(n,t){switch(t){case 3:return 0!=n.f;case 4:return 0!=n.g;case 5:return 0!=n.i;case 6:return 0!=n.j}return _sn(n,t)}function Fpn(n){switch(n.g){case 0:return new Ao;case 1:return new $o;default:throw hv(new vM(v6n+(null!=n.f?n.f:""+n.g)))}}function _pn(n){switch(n.g){case 0:return new Lo;case 1:return new No;default:throw hv(new vM(k7n+(null!=n.f?n.f:""+n.g)))}}function Bpn(n){switch(n.g){case 1:return new jo;case 2:return new NR;default:throw hv(new vM(k7n+(null!=n.f?n.f:""+n.g)))}}function Hpn(n){switch(n.g){case 0:return new hy;case 1:return new _k;default:throw hv(new vM(lnt+(null!=n.f?n.f:""+n.g)))}}function Upn(){var n,t,i;aCn(),i=gut+++Date.now(),n=t0(e.Math.floor(i*z0n))&W0n,t=t0(i-n*V0n),this.a=1502^n,this.b=t^X0n}function Gpn(){Gpn=E,Lmt=new hI(q4n,0),Cmt=new hI("FIRST",1),Imt=new hI(M6n,2),Omt=new hI("LAST",3),Amt=new hI(T6n,4)}function qpn(){qpn=E,TKt=new HO(k9n,0),kKt=new HO("GROUP_DEC",1),MKt=new HO("GROUP_MIXED",2),yKt=new HO("GROUP_INC",3)}function Xpn(n,t){var e,i;t&&(e=$cn(t,"x"),Tcn(new dm(n).a,(tJ(e),e)),i=$cn(t,"y"),Ecn(new pm(n).a,(tJ(i),i)))}function zpn(n,t){var e,i;t&&(e=$cn(t,"x"),mcn(new vm(n).a,(tJ(e),e)),i=$cn(t,"y"),jcn(new km(n).a,(tJ(i),i)))}function Vpn(n,t){var e,i,r;for(i=new R7(t.gc()),e=t.Kc();e.Ob();)(r=uUn(n,uG(e.Pb(),58)))&&mv(i.c,r);return i}function Wpn(n,t,e){var i,r;for(r=n.Kc();r.Ob();)if(i=r.Pb(),xA(t)===xA(i)||null!=t&&udn(t,i))return e&&r.Qb(),!0;return!1}function Qpn(n){var t,e,i;return(e=n.jh())?F$(t=n.Eh(),167)&&null!=(i=Qpn(uG(t,167)))?i+"."+e:e:null}function Jpn(n){var t,e;return 0==n.e?0:(t=n.d<<5,e=n.a[n.d-1],n.e<0&&_un(n)==n.d-1&&(--e,e|=0),t-=GNn(e))}function Ypn(n){var t,e,i;return n<Fot.length?Fot[n]:(t=31&n,(i=Inn(YHt,W1n,28,1+(e=n>>5),15,1))[e]=1<<t,new VV(1,e+1,i))}function Zpn(n,t){var e;if(t){for(e=0;e<n.i;++e)if(uG(n.g[e],378).mj(t))return!1;return ttn(n,t)}return!1}function nmn(n,t,e){var i,r;if(++n.j,e.dc())return!1;for(r=e.Kc();r.Ob();)i=r.Pb(),n.qj(t,n.Zi(t,i)),++t;return!0}function tmn(n,t,e,i){var r,c;if((c=e-t)<3)for(;c<3;)n*=10,++c;else{for(r=1;c>3;)r*=10,--c;n=(n+(r>>1))/r|0}return i.i=n,!0}function emn(n,t){var e,i,r;if(null==n.i&&eqn(n),e=n.i,-1!=(i=t.Lj()))for(r=e.length;i<r;++i)if(e[i]==t)return i;return-1}function imn(n){var t,e,i,r;for(e=uG(n.g,689),i=n.i-1;i>=0;--i)for(t=e[i],r=0;r<i;++r)if(jGn(n,t,e[r])){gjn(n,i);break}}function rmn(n){var t,e,i;for(t=new Ib,i=new Gw(n.b.Kc());i.b.Ob();)e=xOn(uG(i.b.Pb(),701)),wW(t,t.a.length,e);return t.a}function cmn(n){var t;return!n.c&&(n.c=new Ln),f$(n.d,new $n),v_n(n),t=i_n(n),kS(new fX(null,new h3(n.d,16)),new Nd(n)),t}function amn(n,t){t.Ug("End label post-processing",1),kS(JJ(sin(new fX(null,new h3(n.b,16)),new ae),new oe),new ue),t.Vg()}function omn(n){lmn(),this.c=n7(Uhn(cT(rNt,1),EZn,845,0,[VTt])),this.b=new Ym,this.a=n,vJ(this.b,WTt,1),Prn(QTt,new Xp(this))}function umn(n,t,e){lcn(),Ak.call(this),this.a=Jq(Pst,[zZn,X2n],[603,217],0,[$st,Nst],2),this.c=new cN,this.g=n,this.f=t,this.d=e}function smn(n,t){this.n=Jq(nUt,[zZn,E0n],[376,28],14,[t,t0(e.Math.ceil(n/32))],2),this.o=n,this.p=t,this.j=n-1>>1,this.k=t-1>>1}function hmn(n){Stn(),uG(n.of((XYn(),q$t)),181).Hc((oUn(),oKt))&&(uG(n.of(bDt),181).Fc((eNn(),pRt)),uG(n.of(q$t),181).Mc(oKt))}function fmn(n){var t,e;t=n.d==(vAn(),Bdt),e=dPn(n),kfn(n.a,(jYn(),byt),t&&!e||!t&&e?(nMn(),LNt):(nMn(),ANt))}function lmn(){lmn=E,ZS(),jYn(),WTt=ETt,QTt=n7(Uhn(cT(lNt,1),m9n,149,0,[wTt,dTt,pTt,mTt,yTt,MTt,TTt,jTt,PTt,ITt,gTt,vTt,STt]))}function bmn(n,t){var e;return(e=uG(l8(n,ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15)).Qc(Nq(e.gc()))}function wmn(n,t){var e,i;if((i=new od(n.a.ad(t,!0))).a.gc()<=1)throw hv(new Rv);return(e=i.a.ec().Kc()).Pb(),uG(e.Pb(),40)}function dmn(n,t,e){var i;return i=uM(n.p[t.i.p])+uM(n.d[t.i.p])+t.n.b+t.a.b,uM(n.p[e.i.p])+uM(n.d[e.i.p])+e.n.b+e.a.b-i}function gmn(n,t){return n.i>0&&(t.length<n.i&&(t=Acn(Tbn(t).c,n.i)),qGn(n.g,0,t,0,n.i)),t.length>n.i&&uQ(t,n.i,null),t}function pmn(n){var t;return 64&n.Db?Wwn(n):((t=new fx(Wwn(n))).a+=" (instanceClassName: ",VA(t,n.D),t.a+=")",t.a)}function mmn(n){var t,e,i,r;for(r=0,e=0,i=n.length;e<i;e++)s3(e,n.length),(t=n.charCodeAt(e))<64&&(r=S3(r,Nz(1,t)));return r}function vmn(n,t,e){var i,r;for(i=E3(e,L0n),r=0;0!=dwn(i,0)&&r<t;r++)i=Lgn(i,E3(n[r],L0n)),n[r]=pz(i),i=$z(i,32);return pz(i)}function kmn(n,t){var e,i,r,c;for(c=VKn(n.e.Dh(),t),e=uG(n.g,124),r=0;r<n.i;++r)if(i=e[r],c.am(i.Lk()))return!1;return!0}function ymn(n,t){var e;return n.f>0&&(n._j(),-1!=Txn(n,((e=null==t?0:Hon(t))&vZn)%n.d.length,e,t))}function Mmn(n,t){var i,r;n.a=Lgn(n.a,1),n.c=e.Math.min(n.c,t),n.b=e.Math.max(n.b,t),n.d+=t,i=t-n.f,r=n.e+i,n.f=r-n.e-i,n.e=r}function Tmn(n,t){switch(t){case 3:return void vcn(n,0);case 4:return void kcn(n,0);case 5:return void ycn(n,0);case 6:return void Mcn(n,0)}Awn(n,t)}function jmn(n,t){switch(t.g){case 1:return YU(n.j,(Lun(),ybt));case 2:return YU(n.j,(Lun(),Tbt));default:return hZ(),hZ(),zot}}function Emn(n){var t;switch(ZW(),(t=n.Pc()).length){case 0:return jat;case 1:return new Uq(WW(t[0]));default:return new t1(Ugn(t))}}function Smn(n,t){n.Xj();try{n.d.bd(n.e++,t),n.f=n.d.j,n.g=-1}catch(e){throw F$(e=Ehn(e),77)?hv(new Fv):hv(e)}}function Pmn(){Pmn=E,lBt=new Is,cBt=new Os,aBt=new As,oBt=new Ls,uBt=new Ns,sBt=new $s,hBt=new Ds,fBt=new xs,bBt=new Rs}function Cmn(n,t){var e,i;return wL(),i=null,t==(e=bF((qy(),qy(),Hat)))&&(i=uG(U1(Bat,n),624)),i||(i=new JW(n),t==e&&r2(Bat,n,i)),i}function Imn(n){return Yyn(),(n.q?n.q:(hZ(),hZ(),Vot))._b((jYn(),LMt))?uG(oIn(n,LMt),203):uG(oIn(HQ(n),NMt),203)}function Omn(n,t){var e,i;return i=null,vR(n,(jYn(),kTt))&&(e=uG(oIn(n,kTt),96)).pf(t)&&(i=e.of(t)),null==i&&(i=oIn(HQ(n),t)),i}function Amn(n,t){var e,i,r;return!!F$(t,44)&&(i=(e=uG(t,44)).ld(),xQ(r=Xwn(n.Rc(),i),e.md())&&(null!=r||n.Rc()._b(i)))}function Lmn(n,t){var e,i;return n.f>0&&(n._j(),e=ZNn(n,((i=null==t?0:Hon(t))&vZn)%n.d.length,i,t))?e.md():null}function Nmn(n,t,e){var i,r,c;return n.Pj()?(i=n.i,c=n.Qj(),edn(n,i,t),r=n.Ij(3,null,t,i,c),e?e.nj(r):e=r):edn(n,n.i,t),e}function $mn(n,t,e){var i,r;return i=new Ken(n.e,4,10,F$(r=t.c,90)?uG(r,29):(YYn(),x_t),null,Hyn(n,t),!1),e?e.nj(i):e=i,e}function Dmn(n,t,e){var i,r;return i=new Ken(n.e,3,10,null,F$(r=t.c,90)?uG(r,29):(YYn(),x_t),Hyn(n,t),!1),e?e.nj(i):e=i,e}function xmn(n){var t;return VK(),t=new eN(uG(n.e.of((XYn(),U$t)),8)),n.B.Hc((oUn(),eKt))&&(t.a<=0&&(t.a=20),t.b<=0&&(t.b=20)),t}function Rmn(n){var t,e;return cHn(),e=pz(n),0!=(t=pz(Dz(n,32)))?new x3(e,t):e>10||e<0?new Z5(1,e):Rot[e]}function Kmn(n,t){var e;return _L(n)&&_L(t)&&p0n<(e=n%t)&&e<d0n?e:Esn((Yzn(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t,!0),Qat))}function Fmn(n,t){var e;tQn(t),(e=uG(oIn(n,(jYn(),zyt)),283))&&kfn(n,zyt,wjn(e)),Xx(n.c),Xx(n.f),ynn(n.d),ynn(uG(oIn(n,SMt),214))}function _mn(n){var t,e,i;for(f$(e=JAn(n),Cbt),(i=n.d).c.length=0,t=new Ww(e);t.a<t.c.c.length;)Ohn(i,uG(N3(t),466).b)}function Bmn(n){var t;0!=n.c&&(1==(t=uG(zq(n.a,n.b),294)).b?(++n.b,n.b<n.a.c.length&&Pw(uG(zq(n.a,n.b),294))):--t.b,--n.c)}function Hmn(n){var t;t=n.a;do{(t=uG(N9(new Fz(ix(Xgn(t).a.Kc(),new h))),18).d.i).k==(zIn(),wbt)&&kD(n.e,t)}while(t.k==(zIn(),wbt))}function Umn(n){this.e=Inn(YHt,W1n,28,n.length,15,1),this.c=Inn(ZHt,B2n,28,n.length,16,1),this.b=Inn(ZHt,B2n,28,n.length,16,1),this.f=0}function Gmn(n){var t,e;for(n.j=Inn(eUt,I0n,28,n.p.c.length,15,1),e=new Ww(n.p);e.a<e.c.c.length;)t=uG(N3(e),10),n.j[t.p]=t.o.b/n.i}function qmn(n,t){var e,i,r;for(r=t.b.b,n.a=new lS,n.b=Inn(YHt,W1n,28,r,15,1),e=0,i=Fkn(t.b,0);i.b!=i.d.c;)uG(I6(i),40).g=e++}function Xmn(n,t,e){var i,r,c,a;for(c=t-n.e,a=e-n.f,r=new Ww(n.a);r.a<r.c.c.length;)oMn(i=uG(N3(r),172),i.s+c,i.t+a);n.e=t,n.f=e}function zmn(n,t){var e,i;for(i=t.length,e=0;e<i;e+=2)HFn(n,(s3(e,t.length),t.charCodeAt(e)),(s3(e+1,t.length),t.charCodeAt(e+1)))}function Vmn(n,t){t.Ug("Min Size Postprocessing",1),Myn(n,(lBn(),POt),e.Math.max(uM(pK(zDn(n,POt))),uM(pK(zDn(n,EOt))))),t.Vg()}function Wmn(){Wmn=E,qRt=new CN(15),GRt=new _N((XYn(),W$t),qRt),zRt=new _N(DDt,15),XRt=new _N(kDt,xwn(0)),URt=new _N(c$t,r4n)}function Qmn(){Qmn=E,QRt=new KO("PORTS",0),JRt=new KO("PORT_LABELS",1),WRt=new KO("NODE_LABELS",2),VRt=new KO("MINIMUM_SIZE",3)}function Jmn(){Jmn=E,oOt=new rO("P1_WIDTH_APPROXIMATION",0),uOt=new rO("P2_PACKING",1),sOt=new rO("P3_WHITESPACE_ELIMINATION",2)}function Ymn(n){if(null==n.b){for(;n.a.Ob();)if(n.b=n.a.Pb(),!uG(n.b,54).Jh())return!0;return n.b=null,!1}return!0}function Zmn(n,t,e){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.Ne(t,c.d),e&&0==i)return c;i>=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function nvn(n,t,e){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.Ne(t,c.d),e&&0==i)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function tvn(n,t,e,i){var r,c,a;return r=!1,nWn(n.f,e,i)&&(hkn(n.f,n.a[t][e],n.a[t][i]),a=(c=n.a[t])[i],c[i]=c[e],c[e]=a,r=!0),r}function evn(n,t,e){var i,r,c;for(r=uG(cQ(n.b,e),183),i=0,c=new Ww(t.j);c.a<c.c.c.length;)r[uG(N3(c),113).d.p]&&++i;return i}function ivn(n,t,e){var i,r;i=uG(U1(jHt,t),122),r=uG(U1(EHt,t),122),e?(r2(jHt,n,i),r2(EHt,n,r)):(r2(EHt,n,i),r2(jHt,n,r))}function rvn(n,t){var e,i,r,c;return e=t>>5,t&=31,r=n.d+e+(0==t?0:1),kCn(i=Inn(YHt,W1n,28,r,15,1),n.a,e,t),K4(c=new VV(n.e,r,i)),c}function cvn(n,t){var e;for(e=new Fz(ix(Xgn(n).a.Kc(),new h));hDn(e);)if(uG(N9(e),18).d.i.c==t)return!1;return!0}function avn(n,t,i){var r,c,a,o,u;return o=n.k,u=t.k,c=pK(Omn(n,r=i[o.g][u.g])),a=pK(Omn(t,r)),e.Math.max((tJ(c),c),(tJ(a),a))}function ovn(){return Error.stackTraceLimit>0?(e.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function uvn(n,t){return YN(),YN(),oan(T1n),(e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:n<t?-1:n>t?1:KL(isNaN(n),isNaN(t)))>0}function svn(n,t){return YN(),YN(),oan(T1n),(e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:n<t?-1:n>t?1:KL(isNaN(n),isNaN(t)))<0}function hvn(n,t){return YN(),YN(),oan(T1n),(e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:n<t?-1:n>t?1:KL(isNaN(n),isNaN(t)))<=0}function fvn(n,t){for(var e=0;!t[e]||""==t[e];)e++;for(var i=t[e++];e<t.length;e++)t[e]&&""!=t[e]&&(i+=n+t[e]);return i}function lvn(n){var t,e;return null!=(t=uG(Lsn(n.a,4),129))?(qGn(t,0,e=Inn(xFt,Uit,424,t.length,0,1),0,t.length),e):DFt}function bvn(n){var t,e,i,r;if(null==n)return null;for(r=new Zm,e=0,i=(t=Fln(n)).length;e<i;++e)kD(r,yXn(t[e],!0));return r}function wvn(n){var t,e,i,r;if(null==n)return null;for(r=new Zm,e=0,i=(t=Fln(n)).length;e<i;++e)kD(r,yXn(t[e],!0));return r}function dvn(n){var t,e,i,r;if(null==n)return null;for(r=new Zm,e=0,i=(t=Fln(n)).length;e<i;++e)kD(r,yXn(t[e],!0));return r}function gvn(n,t){var e,i,r;if(n.c)vcn(n.c,t);else for(e=t-jX(n),r=new Ww(n.a);r.a<r.c.c.length;)gvn(i=uG(N3(r),163),jX(i)+e)}function pvn(n,t){var e,i,r;if(n.c)kcn(n.c,t);else for(e=t-EX(n),r=new Ww(n.d);r.a<r.c.c.length;)pvn(i=uG(N3(r),163),EX(i)+e)}function mvn(n,t,i){var r,c,a,o;for(Knn(t,a=t+i,n.length),o="",c=t;c<a;)r=e.Math.min(c+1e4,a),o+=mJ(n.slice(c,r)),c=r;return o}function vvn(n){switch(n.g){case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:return!0;default:return!1}}function kvn(){kvn=E,sgt=new ZC(x6n,0),ugt=new ZC(R6n,1),fgt=new ZC(D6n,2),lgt=new ZC(X4n,3),hgt=new ZC("GREEDY_MODEL_ORDER",4)}function yvn(){yvn=E,Fjt=new gI(q4n,0),Kjt=new gI("NODES_AND_EDGES",1),_jt=new gI("PREFER_EDGES",2),Bjt=new gI("PREFER_NODES",3)}function Mvn(n,t,e,i,r,c){this.a=n,this.c=t,this.b=e,this.f=i,this.d=r,this.e=c,this.c>0&&this.b>0&&(this.g=mX(this.c,this.b,this.a))}function Tvn(n,t){var e,i=n.a;t=String(t),i.hasOwnProperty(t)&&(e=i[t]);var r=(Cfn(),Wat)[typeof e];return r?r(e):Vbn(typeof e)}function jvn(n){if(!(Iet in n.a))throw hv(new SM("Every element must have an id."));return fNn(v0(n,Iet))}function Evn(n){var t,e;for(e=WOn(n),t=null;2==n.c;)EYn(n),t||(QYn(),QYn(),kzn(t=new QN(2),e),e=t),e.Jm(WOn(n));return e}function Svn(n,t){var e,i;return n._j(),(e=ZNn(n,((i=null==t?0:Hon(t))&vZn)%n.d.length,i,t))?(uan(n,e),e.md()):null}function Pvn(n,t){return n.e>t.e?1:n.e<t.e?-1:n.d>t.d?n.e:n.d<t.d?-t.e:n.e*Hln(n.a,t.a,n.d)}function Cvn(n){return n>=48&&n<48+e.Math.min(10,10)?n-48:n>=97&&n<97?n-97+10:n>=65&&n<65?n-65+10:-1}function Ivn(n,t){if(t.c==n)return t.d;if(t.d==n)return t.c;throw hv(new vM("Input edge is not connected to the input port."))}function Ovn(n){if(Bvn(Fnt,n))return qx(),eot;if(Bvn(_nt,n))return qx(),tot;throw hv(new vM("Expecting true or false"))}function Avn(n){switch(typeof n){case pZn:return pln(n);case gZn:return OL(n);case dZn:return XK(n);default:return null==n?0:xx(n)}}function Lvn(n,t){if(n.a<0)throw hv(new kM("Did not call before(...) or after(...) before calling add(...)."));return hR(n,n.a,t),n}function Nvn(n){return W0(),F$(n,162)?uG(cQ(AFt,iut),295).Rg(n):PV(AFt,Tbn(n))?uG(cQ(AFt,Tbn(n)),295).Rg(n):null}function $vn(n){var t;return 32&n.Db||0!=(t=iQ(uG(Lsn(n,16),29)||n.ii())-iQ(n.ii()))&&Dvn(n,32,Inn(dat,EZn,1,t,5,1)),n}function Dvn(n,t,e){var i;n.Db&t?null==e?H$n(n,t):-1==(i=jTn(n,t))?n.Eb=e:uQ(Kcn(n.Eb),i,e):null!=e&&lFn(n,t,e)}function xvn(n,t,e,i){var r;0!=t.c.length&&(r=gRn(e,i),kS(krn(new fX(null,new h3(WLn(t),1)),new ba),new pY(n,e,r,i)))}function Rvn(n,t){var e,i,r;return i=n.a.length-1,e=t-n.b&i,r=n.c-t&i,jK(e<(n.c-n.b&i)),e>=r?(Pbn(n,t),-1):(Sbn(n,t),1)}function Kvn(n){var t,e,i;if(!(i=n.Jh()))for(t=0,e=n.Ph();e;e=e.Ph()){if(++t>O0n)return e.Qh();if((i=e.Jh())||e==n)break}return i}function Fvn(n,t){var e;return xA(t)===xA(n)||!!F$(t,21)&&(e=uG(t,21)).gc()==n.gc()&&n.Ic(e)}function _vn(n,t){return n.e<t.e?-1:n.e>t.e?1:n.f<t.f?-1:n.f>t.f?1:Hon(n)-Hon(t)}function Bvn(n,t){return tJ(n),null!=t&&(!!m_(n,t)||n.length==t.length&&m_(n.toLowerCase(),t.toLowerCase()))}function Hvn(n){var t,e;return dwn(n,-129)>0&&dwn(n,128)<0?(tX(),t=pz(n)+128,!(e=got[t])&&(e=got[t]=new Ow(n)),e):new Ow(n)}function Uvn(){Uvn=E,tbt=new EC(q4n,0),Zlt=new EC("INSIDE_PORT_SIDE_GROUPS",1),Ylt=new EC("GROUP_MODEL_ORDER",2),nbt=new EC(X4n,3)}function Gvn(n){var t;return n.b||wj(n,!(t=QF(n.e,n.a))||!m_(_nt,Lmn((!t.b&&(t.b=new XR((YYn(),H_t),wBt,t)),t.b),"qualified"))),n.c}function qvn(n,t){var e,i;for(s3(t,n.length),e=n.charCodeAt(t),i=t+1;i<n.length&&(s3(i,n.length),n.charCodeAt(i)==e);)++i;return i-t}function Xvn(n,t){(t||null==console.groupCollapsed?null!=console.group?console.group:console.log:console.groupCollapsed).call(console,n)}function zvn(n,t,e,i){uG(e.b,68),uG(e.b,68),uG(i.b,68),uG(i.b,68).c.b,Rnn(i,t,n)}function Vvn(n){var t,e;for(t=new Ww(n.g);t.a<t.c.c.length;)uG(N3(t),568);hQn(e=new bFn(n.g,uM(n.a),n.c)),n.g=e.b,n.d=e.a}function Wvn(n,t,e){var i,r,c;for(c=new Ww(e.a);c.a<c.c.c.length;)r=uG(N3(c),225),i=new C$(uG(cQ(n.a,r.b),68)),kD(t.a,i),Wvn(n,i,r)}function Qvn(n,t,e){var i,r;return((r=(i=uG(zrn(Aen(n.a),t),89)).c||(YYn(),N_t)).Vh()?mwn(n.b,uG(r,54)):r)==e?MGn(i):Urn(i,e),r}function Jvn(n,t,i){t.b=e.Math.max(t.b,-i.a),t.c=e.Math.max(t.c,i.a-n.a),t.d=e.Math.max(t.d,-i.b),t.a=e.Math.max(t.a,i.b-n.b)}function Yvn(n,t,e){this.c=n,this.f=new Zm,this.e=new sj,this.j=new cX,this.n=new cX,this.b=t,this.g=new gY(t.c,t.d,t.b,t.a),this.a=e}function Zvn(n){var t,e,i,r;for(this.a=new XL,this.d=new ek,this.e=0,i=0,r=(e=n).length;i<r;++i)t=e[i],!this.f&&(this.f=t),t4(this,t)}function nkn(n){cHn(),0==n.length?(this.e=0,this.d=1,this.a=Uhn(cT(YHt,1),W1n,28,15,[0])):(this.e=1,this.d=n.length,this.a=n,K4(this))}function tkn(n,t,e){Ak.call(this),this.a=Inn(Pst,X2n,217,(Yrn(),Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length,0,1),this.b=n,this.d=t,this.c=e}function ekn(n){var t,e,i,r;for(kfn(r=uG(oIn(n,(GYn(),rmt)),12),Mmt,n.i.n.b),e=0,i=(t=x4(n.e)).length;e<i;++e)u2(t[e],r)}function ikn(n){var t,e,i,r;for(kfn(t=uG(oIn(n,(GYn(),rmt)),12),Mmt,n.i.n.b),i=0,r=(e=x4(n.g)).length;i<r;++i)c2(e[i],t)}function rkn(n,t){var e,i;for(e2(),i=new Fz(ix(Ggn(n).a.Kc(),new h));hDn(i);)if((e=uG(N9(i),18)).d.i==t||e.c.i==t)return e;return null}function ckn(n,t){var e,i;return(e=t.qi(n.a))&&null!=(i=mK(Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),Bet)))?i:t.xe()}function akn(n,t){var e,i;return(e=t.qi(n.a))&&null!=(i=mK(Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),Bet)))?i:t.xe()}function okn(n,t){var e,i;return 0!=(e=d$(n.a.c.p,t.a.c.p))?e:0!=(i=d$(n.a.d.i.p,t.a.d.i.p))?i:d$(t.a.d.p,n.a.d.p)}function ukn(n,t){var e,i,r,c;for(i=0,r=t.gc();i<r;++i)F$(e=t.Tl(i),102)&&uG(e,19).Bb&Qtt&&null!=(c=t.Ul(i))&&uUn(n,uG(c,58))}function skn(n,t){var e,i,r;if(kD(aft,n),t.Fc(n),e=uG(cQ(cft,n),21))for(r=e.Kc();r.Ob();)i=uG(r.Pb(),27),-1!=Ten(aft,i,0)||skn(i,t)}function hkn(n,t,e){var i,r;QCn(n.e,t,e,(KQn(),_Rt)),QCn(n.i,t,e,kRt),n.a&&(r=uG(oIn(t,(GYn(),rmt)),12),i=uG(oIn(e,rmt),12),Z3(n.g,r,i))}function fkn(n,t,e){var i,r,c;i=t.c.p,c=t.p,n.b[i][c]=new RZ(n,t),e&&(n.a[i][c]=new zg(t),(r=uG(oIn(t,(GYn(),zpt)),10))&&UNn(n.d,r,t))}function lkn(n,t,e){var i,r,c,a;return(c=t.j)!=(a=e.j)?c.g-a.g:(i=n.f[t.p],r=n.f[e.p],0==i&&0==r?0:0==i?-1:0==r?1:ugn(i,r))}function bkn(){var n;return 0!=Uat&&(n=Date.now())-Gat>2e3&&(Gat=n,qat=e.setTimeout(vE,10)),0==Uat++&&(Pin((Gy(),Fat)),!0)}function wkn(n,t,e){var i;(Aut?(Opn(n),1):Lut||Dut?(pS(),1):$ut&&(pS(),0))&&((i=new iB(t)).b=e,qIn(n,i))}function dkn(n,t){var e;e=!n.A.Hc((Qmn(),JRt))||n.q==($Pn(),cRt),n.u.Hc((eNn(),wRt))?e?QQn(n,t):TQn(n,t):n.u.Hc(gRt)&&(e?YWn(n,t):MJn(n,t))}function gkn(n){var t;xA(zDn(n,(XYn(),E$t)))===xA((Own(),Oxt))&&(R0(n)?(t=uG(zDn(R0(n),E$t),346),Myn(n,E$t,t)):Myn(n,E$t,Axt))}function pkn(n){var t,e;return!!vR(n.d.i,(jYn(),UMt))&&(t=uG(oIn(n.c.i,UMt),17),e=uG(oIn(n.d.i,UMt),17),d$(t.a,e.a)>0)}function mkn(n,t,i){return new gY(e.Math.min(n.a,t.a)-i/2,e.Math.min(n.b,t.b)-i/2,e.Math.abs(n.a-t.a)+i,e.Math.abs(n.b-t.b)+i)}function vkn(n){var t;this.d=new Zm,this.j=new sj,this.g=new sj,t=n.g.b,this.f=uG(oIn(HQ(t),(jYn(),Byt)),88),this.e=uM(pK(eyn(t,yTt)))}function kkn(n){this.d=new Zm,this.e=new u8,this.c=Inn(YHt,W1n,28,(KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length,15,1),this.b=n}function ykn(n,t,e){var i;switch(i=e[n.g][t],n.g){case 1:case 3:return new MO(0,i);case 2:case 4:return new MO(i,0);default:return null}}function Mkn(n,t,e){var i;i=uG(A1(t.f),205);try{i.rf(n,e),WQ(t.f,i)}catch(r){throw F$(r=Ehn(r),103),hv(r)}}function Tkn(n,t,e){var i,r,c,a;return i=null,(c=DVn(aan(),t))&&(r=null,null!=(a=vVn(c,e))&&(r=n.qf(c,a)),i=r),i}function jkn(n,t,e,i){var r;if(t>=(r=n.length))return r;for(t=t>0?t:0;t<r&&!mfn((s3(t,n.length),n.charCodeAt(t)),e,i);t++);return t}function Ekn(n,t){var e,i;for(i=n.c.length,t.length<i&&(t=aT(new Array(i),t)),e=0;e<i;++e)uQ(t,e,n.c[e]);return t.length>i&&uQ(t,i,null),t}function Skn(n,t){var e,i;for(i=n.a.length,t.length<i&&(t=aT(new Array(i),t)),e=0;e<i;++e)uQ(t,e,n.a[e]);return t.length>i&&uQ(t,i,null),t}function Pkn(n,t){var e,i;++n.j,null!=t&&e$n(t,e=F$(i=n.a.Cb,99)?uG(i,99).th():null)?Dvn(n.a,4,e):Dvn(n.a,4,uG(t,129))}function Ckn(n){var t;if(null==n)return null;if(null==(t=Exn(yXn(n,!0))))throw hv(new PM("Invalid hexBinary value: '"+n+"'"));return t}function Ikn(n,t,e){var i;t.a.length>0&&(kD(n.b,new hG(t.a,e)),0<(i=t.a.length)?t.a=r1(t.a,0,0):0>i&&(t.a+=V$(Inn(JHt,N1n,28,-i,15,1))))}function Okn(n,t,e){var i;if(!e[t.d])for(e[t.d]=!0,i=new Ww(Ebn(t));i.a<i.c.c.length;)Okn(n,hpn(uG(N3(i),218),t),e)}function Akn(n,t,e){var i,r,c;return(r=uG(cQ(n.e,t),400))?(c=wF(r,e),nD(n,r),c):(i=new bG(n,t,e),vJ(n.e,t,i),B1(i),null)}function Lkn(n,t,e,i){var r;return r=new Ken(n.e,1,13,t.c||(YYn(),N_t),e.c||(YYn(),N_t),Hyn(n,t),!1),i?i.nj(r):i=r,i}function Nkn(){return JYn(),Uhn(cT(mht,1),p1n,164,0,[oht,aht,uht,Yst,Jst,Zst,eht,tht,nht,cht,rht,iht,Wst,Vst,Qst,Xst,qst,zst,Ust,Hst,Gst,sht])}function $kn(n){switch(n.g){case 4:return new MO(0,-1);case 1:return new MO(1,0);case 2:return new MO(-1,0);default:return new MO(0,1)}}function Dkn(n){switch(n.g){case 1:return xdn(),nxt;case 4:return xdn(),JDt;case 2:return xdn(),YDt;case 3:return xdn(),QDt}return xdn(),ZDt}function xkn(n){switch(n.hj(null)){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4}return-1}function Rkn(){Rkn=E,hNt=new jO("PARENTS",0),sNt=new jO("NODES",1),oNt=new jO("EDGES",2),fNt=new jO("PORTS",3),uNt=new jO("LABELS",4)}function Kkn(n,t,e){var i;switch((i=e.q.getFullYear()-V1n+V1n)<0&&(i=-i),t){case 1:n.a+=i;break;case 2:Fen(n,i%100,2);break;default:Fen(n,i,t)}}function Fkn(n,t){var e,i;if(o3(t,n.b),t>=n.b>>1)for(i=n.c,e=n.b;e>t;--e)i=i.b;else for(i=n.a.a,e=0;e<t;++e)i=i.a;return new eB(n,t,i)}function _kn(){_kn=E,Wut=new eC("NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST",0),Vut=new eC("CORNER_CASES_THAN_SINGLE_SIDE_LAST",1)}function Bkn(n){this.b=new Zm,this.e=new Zm,this.d=n,this.a=!Qj(JJ(new fX(null,new LW(new w7(n.b))),new hd(new Xr))).Bd((vS(),Kut))}function Hkn(n,t){var i,r,c,a;for(i=0,c=new Ww(t.a);c.a<c.c.c.length;)a=(r=uG(N3(c),10)).o.a+r.d.c+r.d.b+n.j,i=e.Math.max(i,a);return i}function Ukn(n,t){var e,i,r;(i=(r=t.d.i).k)!=(zIn(),dbt)&&i!=fbt&&hDn(e=new Fz(ix(Xgn(r).a.Kc(),new h)))&&vJ(n.k,t,uG(N9(e),18))}function Gkn(n,t){return tcn(),ugn((0==n.a.b?new MO(n.c.e.a,n.c.e.b):uG(gR(n.a),8)).b,(0==t.a.b?new MO(t.c.e.a,t.c.e.b):uG(gR(t.a),8)).b)}function qkn(n,t){return tcn(),ugn((0==n.a.b?new MO(n.c.e.a,n.c.e.b):uG(gR(n.a),8)).a,(0==t.a.b?new MO(t.c.e.a,t.c.e.b):uG(gR(t.a),8)).a)}function Xkn(n,t){return tcn(),ugn((0==n.a.b?new MO(n.b.e.a,n.b.e.b):uG(pR(n.a),8)).a,(0==t.a.b?new MO(t.b.e.a,t.b.e.b):uG(pR(t.a),8)).a)}function zkn(n,t){return tcn(),ugn((0==n.a.b?new MO(n.b.e.a,n.b.e.b):uG(pR(n.a),8)).b,(0==t.a.b?new MO(t.b.e.a,t.b.e.b):uG(pR(t.a),8)).b)}function Vkn(){Vkn=E,Zxt=new $O("DISTRIBUTED",0),tRt=new $O("JUSTIFIED",1),Jxt=new $O("BEGIN",2),Yxt=new $O(G2n,3),nRt=new $O("END",4)}function Wkn(n,t){var e,i,r;return i=ern(n.Dh(),t),(e=t-n.ji())<0?(r=n.Ih(i))>=0?n.Wh(r):$Nn(n,i):e<0?$Nn(n,i):uG(i,69).wk().Bk(n,n.hi(),e)}function Qkn(n){var t,e;for(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),t=(e=n.o).c.Kc();t.e!=t.i.gc();)uG(t.Yj(),44).md();return Tnn(e)}function Jkn(n){var t;if(F$(n.a,4)){if(null==(t=Nvn(n.a)))throw hv(new kM(Bnt+n.b+"'. "+Rnt+(vK($Ft),$Ft.k)+Knt));return t}return n.a}function Ykn(n,t){var e,i;if(n.j.length!=t.j.length)return!1;for(e=0,i=n.j.length;e<i;e++)if(!m_(n.j[e],t.j[e]))return!1;return!0}function Zkn(n){var t;try{return t=n.i.Xb(n.e),n.Xj(),n.g=n.e++,t}catch(e){throw F$(e=Ehn(e),77)?(n.Xj(),hv(new Bv)):hv(e)}}function nyn(n){var t;try{return t=n.c.Vi(n.e),n.Xj(),n.g=n.e++,t}catch(e){throw F$(e=Ehn(e),77)?(n.Xj(),hv(new Bv)):hv(e)}}function tyn(n){var t,e,i,r;for(r=0,e=0,i=n.length;e<i;e++)s3(e,n.length),(t=n.charCodeAt(e))>=64&&t<128&&(r=S3(r,Nz(1,t-64)));return r}function eyn(n,t){var e,i;return i=null,vR(n,(XYn(),ODt))&&(e=uG(oIn(n,ODt),96)).pf(t)&&(i=e.of(t)),null==i&&HQ(n)&&(i=oIn(HQ(n),t)),i}function iyn(n,t){var e;return e=uG(oIn(n,(jYn(),bMt)),75),_$(t,cbt)?e?BY(e):(e=new Uk,kfn(n,bMt,e)):e&&kfn(n,bMt,null),e}function ryn(){ryn=E,XYn(),ift=SDt,Jht=M$t,Xht=c$t,Yht=W$t,MEn(),tft=cst,nft=ist,eft=ost,Zht=est,pbn(),Vht=Hht,zht=Bht,Wht=Ght,Qht=qht}function cyn(n){switch(qS(),this.c=new Zm,this.d=n,n.g){case 0:case 2:this.a=kJ(Qlt),this.b=M0n;break;case 3:case 1:this.a=Qlt,this.b=T0n}}function ayn(n){var t;L_(uG(oIn(n,(jYn(),JMt)),101))&&(c$n((u3(0,(t=n.b).c.length),uG(t.c[0],30))),c$n(uG(zq(t,t.c.length-1),30)))}function oyn(n,t){t.Ug("Self-Loop post-processing",1),kS(JJ(JJ(sin(new fX(null,new h3(n.b,16)),new Di),new xi),new Ri),new Ki),t.Vg()}function uyn(n,t,e){var i;if(n.c)ycn(n.c,n.c.i+t),Mcn(n.c,n.c.j+e);else for(i=new Ww(n.b);i.a<i.c.c.length;)uyn(uG(N3(i),163),t,e)}function syn(n){var t;if(null==n)return null;if(null==(t=bJn(yXn(n,!0))))throw hv(new PM("Invalid base64Binary value: '"+n+"'"));return t}function hyn(n,t){var e;e=n.fd(t);try{return e.Pb()}catch(i){throw F$(i=Ehn(i),112)?hv(new dM("Can't get element "+t)):hv(i)}}function fyn(n,t){var e,i,r;for(e=n.o,r=uG(uG(Y9(n.r,t),21),87).Kc();r.Ob();)(i=uG(r.Pb(),117)).e.a=YTn(i,e.a),i.e.b=e.b*uM(pK(i.b.of(bht)))}function lyn(n,t){var e,i,r;for(r=new R7(t.gc()),i=t.Kc();i.Ob();)(e=uG(i.Pb(),293)).c==e.f?YOn(n,e,e.c):qOn(n,e)||mv(r.c,e);return r}function byn(n){var t;return(t=new WM).a+="n",n.k!=(zIn(),dbt)&&JA(JA((t.a+="(",t),MR(n.k).toLowerCase()),")"),JA((t.a+="_",t),ZTn(n)),t.a}function wyn(n,t){var e,i,r,c;return r=n.k,e=uM(pK(oIn(n,(GYn(),bmt)))),c=t.k,i=uM(pK(oIn(t,bmt))),c!=(zIn(),lbt)?-1:r!=lbt?1:e==i?0:e<i?-1:1}function dyn(n,t){var e,i;return e=uG(uG(cQ(n.g,t.a),42).a,68),i=uG(uG(cQ(n.g,t.b),42).a,68),atn(t.a,t.b)-atn(t.a,x$(e.b))-atn(t.b,x$(i.b))}function gyn(n,t){var e;switch(e=uG(AJ(n.b,t),127).n,t.g){case 1:n.t>=0&&(e.d=n.t);break;case 3:n.t>=0&&(e.a=n.t)}n.C&&(e.b=n.C.b,e.c=n.C.c)}function pyn(){pyn=E,Tjt=new wI(k9n,0),kjt=new wI(D6n,1),yjt=new wI("LINEAR_SEGMENTS",2),vjt=new wI("BRANDES_KOEPF",3),Mjt=new wI(v9n,4)}function myn(){myn=E,Nht=new lC(o3n,0),Lht=new lC(u3n,1),$ht=new lC(s3n,2),Dht=new lC(h3n,3),Nht.a=!1,Lht.a=!0,$ht.a=!1,Dht.a=!0}function vyn(){vyn=E,yht=new hC(o3n,0),kht=new hC(u3n,1),Mht=new hC(s3n,2),Tht=new hC(h3n,3),yht.a=!1,kht.a=!0,Mht.a=!1,Tht.a=!0}function kyn(n,t,e,i){var r;return e>=0?n.Sh(t,e,i):(n.Ph()&&(i=(r=n.Fh())>=0?n.Ah(i):n.Ph().Th(n,-1-r,null,i)),n.Ch(t,e,i))}function yyn(n,t){switch(t){case 7:return!n.e&&(n.e=new f_(aFt,n,7,4)),void Czn(n.e);case 8:return!n.d&&(n.d=new f_(aFt,n,8,5)),void Czn(n.d)}Tmn(n,t)}function Myn(n,t,e){return null==e?(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),Svn(n.o,t)):(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),rSn(n.o,t,e)),n}function Tyn(n,t){var e,i,r,c;for(hZ(),e=n,c=t,F$(n,21)&&!F$(t,21)&&(e=t,c=n),r=e.Kc();r.Ob();)if(i=r.Pb(),c.Hc(i))return!1;return!0}function jyn(n,t,e,i){if(t.a<i.a)return!0;if(t.a==i.a){if(t.b<i.b)return!0;if(t.b==i.b&&n.b>e.b)return!0}return!1}function Eyn(n,t){return RA(n)?!!bZn[t]:n.Sm?!!n.Sm[t]:FA(n)?!!lZn[t]:!!KA(n)&&!!fZn[t]}function Syn(n){var t;t=n.a;do{(t=uG(N9(new Fz(ix(qgn(t).a.Kc(),new h))),18).c.i).k==(zIn(),wbt)&&n.b.Fc(t)}while(t.k==(zIn(),wbt));n.b=Spn(n.b)}function Pyn(n,t){var i,r,c;for(c=n,r=new Fz(ix(qgn(t).a.Kc(),new h));hDn(r);)(i=uG(N9(r),18)).c.i.c&&(c=e.Math.max(c,i.c.i.c.p));return c}function Cyn(n,t){var e,i,r;for(r=0,i=uG(uG(Y9(n.r,t),21),87).Kc();i.Ob();)r+=(e=uG(i.Pb(),117)).d.d+e.b.Mf().b+e.d.a,i.Ob()&&(r+=n.w);return r}function Iyn(n,t){var e,i,r;for(r=0,i=uG(uG(Y9(n.r,t),21),87).Kc();i.Ob();)r+=(e=uG(i.Pb(),117)).d.b+e.b.Mf().a+e.d.c,i.Ob()&&(r+=n.w);return r}function Oyn(n){var t,e,i;if(e=0,0==(i=GFn(n)).c.length)return 1;for(t=new Ww(i);t.a<t.c.c.length;)e+=Oyn(uG(N3(t),27));return e}function Ayn(n){var t,e,i;for(i=n.c.a,n.p=(WW(i),new Z_(i)),e=new Ww(i);e.a<e.c.c.length;)(t=uG(N3(e),10)).p=nLn(t).a;hZ(),f$(n.p,new Pc)}function Lyn(n,t,e){var i,r,c,a;return-1!=(i=n.dd(t))&&(n.Pj()?(c=n.Qj(),a=Oq(n,i),r=n.Ij(4,a,null,i,c),e?e.nj(r):e=r):Oq(n,i)),e}function Nyn(n,t,e){var i,r,c,a;return-1!=(i=n.dd(t))&&(n.Pj()?(c=n.Qj(),a=gjn(n,i),r=n.Ij(4,a,null,i,c),e?e.nj(r):e=r):gjn(n,i)),e}function $yn(n,t,e,i){var r,c;e.Xh(t)&&(PP(),ein(t)?ukn(n,uG(e.Mh(t),160)):(r=(c=t)?uG(i,54).gi(c):null)&&rv(e.Mh(t),r))}function Dyn(n,t,e,i){var r,c,a;return c=ern(n.Dh(),t),(r=t-n.ji())<0?(a=n.Ih(c))>=0?n.Lh(a,e,!0):YNn(n,c,e):uG(c,69).wk().yk(n,n.hi(),r,e,i)}function xyn(n,t,e,i){var r;(r=bdn(t.pf((XYn(),K$t))?uG(t.of(K$t),21):n.j))!=(JYn(),sht)&&(e&&!vvn(r)||LOn(Sxn(n,r,i),t))}function Ryn(n){switch(n.g){case 1:return ehn(),pht;case 3:return ehn(),wht;case 2:return ehn(),ght;case 4:return ehn(),dht;default:return null}}function Kyn(n,t,e){if(n.e)switch(n.b){case 1:JY(n.c,t,e);break;case 0:YY(n.c,t,e)}else C5(n.c,t,e);n.a[t.p][e.p]=n.c.i,n.a[e.p][t.p]=n.c.e}function Fyn(n){var t,e;if(null==n)return null;for(e=Inn(pbt,zZn,199,n.length,0,2),t=0;t<e.length;t++)e[t]=uG(b8(n[t],n[t].length),199);return e}function _yn(n){var t;if(Zln(n))return yz(n),n.ul()&&(t=ONn(n.e,n.b,n.c,n.a,n.j),n.j=t),n.g=n.a,++n.a,++n.c,n.i=0,n.j;throw hv(new Bv)}function Byn(n,t){var e,i,r,c;return(c=n.o)<(e=n.p)?c*=c:e*=e,i=c+e,(c=t.o)<(e=t.p)?c*=c:e*=e,i<(r=c+e)?-1:i==r?0:1}function Hyn(n,t){var e,i;if((i=Ljn(n,t))>=0)return i;if(n.ol())for(e=0;e<n.i;++e)if(xA(n.pl(uG(n.g[e],58)))===xA(t))return e;return-1}function Uyn(n,t,e){var i,r;if(t>=(r=n.gc()))throw hv(new w_(t,r));if(n.Si()&&(i=n.dd(e))>=0&&i!=t)throw hv(new vM(Xet));return n.Xi(t,e)}function Gyn(n,t){if(this.a=uG(WW(n),253),this.b=uG(WW(t),253),n.Ed(t)>0||n==(py(),Mat)||t==(my(),Tat))throw hv(new vM("Invalid range: "+N5(n,t)))}function qyn(n){var t,e;for(this.b=new Zm,this.c=n,this.a=!1,e=new Ww(n.a);e.a<e.c.c.length;)t=uG(N3(e),10),this.a=this.a|t.k==(zIn(),dbt)}function Xyn(n,t){var e,i,r;for(e=jx(new sk,n),r=new Ww(t);r.a<r.c.c.length;)i=uG(N3(r),125),RKn(xS(DS(RS($S(new uk,0),0),e),i));return e}function zyn(n,t,e){e.Ug("Compound graph preprocessor",1),n.a=new K1,ZWn(n,t,null),hzn(n,t),qRn(n),kfn(t,(GYn(),Apt),n.a),n.a=null,$V(n.b),e.Vg()}function Vyn(n,t,e){var i,r,c;for(r=new Fz(ix((t?qgn(n):Xgn(n)).a.Kc(),new h));hDn(r);)i=uG(N9(r),18),(c=t?i.c.i:i.d.i).k==(zIn(),bbt)&&a2(c,e)}function Wyn(n,t){var e,i;for(t.Ug("Untreeify",1),i=uG(oIn(n,(OQn(),_Pt)),15).Kc();i.Ob();)aq((e=uG(i.Pb(),65)).b.d,e),aq(e.c.b,e);t.Vg()}function Qyn(n){var t,e,i;for(i=uG(Y9(n.a,(gPn(),gdt)),15).Kc();i.Ob();)pW(n,e=uG(i.Pb(),105),(t=Ejn(e))[0],(gon(),jdt),0),pW(n,e,t[1],Sdt,1)}function Jyn(n){var t,e,i;for(i=uG(Y9(n.a,(gPn(),pdt)),15).Kc();i.Ob();)pW(n,e=uG(i.Pb(),105),(t=Ejn(e))[0],(gon(),jdt),0),pW(n,e,t[1],Sdt,1)}function Yyn(){Yyn=E,djt=new bI(q4n,0),gjt=new bI("PORT_POSITION",1),wjt=new bI("NODE_SIZE_WHERE_SPACE_PERMITS",2),bjt=new bI("NODE_SIZE",3)}function Zyn(){Zyn=E,lOt=new cO("INTERACTIVE_NODE_REORDERER",0),wOt=new cO("MIN_SIZE_PRE_PROCESSOR",1),bOt=new cO("MIN_SIZE_POST_PROCESSOR",2)}function nMn(){nMn=E,CNt=new TO("AUTOMATIC",0),ANt=new TO(z2n,1),LNt=new TO(V2n,2),NNt=new TO("TOP",3),INt=new TO(Q2n,4),ONt=new TO(G2n,5)}function tMn(n,t,e,i){var r,c;for(b_n(),r=0,c=0;c<e;c++)r=Lgn(Ngn(E3(t[c],L0n),E3(i,L0n)),E3(pz(r),L0n)),n[c]=pz(r),r=Dz(r,32);return pz(r)}function eMn(n,t,i){var r,c;for(c=0,r=0;r<Nst;r++)c=e.Math.max(c,Nbn(n.a[t.g][r],i));return t==(Yrn(),Est)&&n.b&&(c=e.Math.max(c,n.b.b)),c}function iMn(n,t){var e,i;if(kK(t>0),(t&-t)==t)return t0(t*uRn(n,31)*4.656612873077393e-10);do{i=(e=uRn(n,31))%t}while(e-i+(t-1)<0);return t0(i)}function rMn(n,t,e){switch(e.g){case 1:n.a=t.a/2,n.b=0;break;case 2:n.a=t.a,n.b=t.b/2;break;case 3:n.a=t.a/2,n.b=t.b;break;case 4:n.a=0,n.b=t.b/2}}function cMn(n,t,e,i){var r,c;for(r=t;r<n.c.length;r++){if(u3(r,n.c.length),c=uG(n.c[r],12),!e.Mb(c))return r;mv(i.c,c)}return n.c.length}function aMn(n){switch(n.g){case 0:return null;case 1:return new gun;case 2:return new dy;default:throw hv(new vM(k7n+(null!=n.f?n.f:""+n.g)))}}function oMn(n,t,e){var i,r;for($hn(n,t-n.s,e-n.t),r=new Ww(n.n);r.a<r.c.c.length;)cw(i=uG(N3(r),209),i.e+t-n.s),aw(i,i.f+e-n.t);n.s=t,n.t=e}function uMn(n){var t,e,i,r;for(e=0,i=new Ww(n.a);i.a<i.c.c.length;)uG(N3(i),125).d=e++;return r=null,(t=ZCn(n)).c.length>1&&(r=Xyn(n,t)),r}function sMn(n){var t;return new MO(t=uM(pK(zDn(n,(XYn(),BDt))))*e.Math.sqrt((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a).i),t/uM(pK(zDn(n,_Dt))))}function hMn(n){var t;return n.f&&n.f.Vh()&&(t=uG(n.f,54),n.f=uG(mwn(n,t),84),n.f!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,9,8,t,n.f))),n.f}function fMn(n){var t;return n.i&&n.i.Vh()&&(t=uG(n.i,54),n.i=uG(mwn(n,t),84),n.i!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,9,7,t,n.i))),n.i}function lMn(n){var t;return n.b&&64&n.b.Db&&(t=n.b,n.b=uG(mwn(n,t),19),n.b!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,9,21,t,n.b))),n.b}function bMn(n,t){var e,i,r;null==n.d?(++n.e,++n.f):(i=t.Bi(),eKn(n,n.f+1),r=(i&vZn)%n.d.length,!(e=n.d[r])&&(e=n.d[r]=n.dk()),e.Fc(t),++n.f)}function wMn(n,t,e){var i;return!t.tk()&&(-2!=t.Ik()?null==(i=t.ik())?null==e:udn(i,e):t.qk()==n.e.Dh()&&null==e)}function dMn(){var n;man(16,b1n),n=aon(16),this.b=Inn(Cat,l1n,303,n,0,1),this.c=Inn(Cat,l1n,303,n,0,1),this.a=null,this.e=null,this.i=0,this.f=n-1,this.g=0}function gMn(n){LF.call(this),this.k=(zIn(),dbt),this.j=(man(6,g1n),new R7(6)),this.b=(man(2,g1n),new R7(2)),this.d=new $k,this.f=new xk,this.a=n}function pMn(n){var t,e;n.c.length<=1||(iAn(n,uG((t=w_n(n,(KQn(),KRt))).a,17).a,uG(t.b,17).a),iAn(n,uG((e=w_n(n,_Rt)).a,17).a,uG(e.b,17).a))}function mMn(n,t,e){var i,r;for(i=(r=n.a.b).c.length;i<e;i++)GX(r,r.c.length,new bQ(n.a));a2(t,(u3(e-1,r.c.length),uG(r.c[e-1],30))),n.b[t.p]=e}function vMn(n,t){var e,i,r;for(n.b[t.g]=1,i=Fkn(t.d,0);i.b!=i.d.c;)r=(e=uG(I6(i),65)).c,1==n.b[r.g]?aq(n.a,e):2==n.b[r.g]?n.b[r.g]=1:vMn(n,r)}function kMn(n,t,e,i){var r;for(r=uG(Y9(i?n.a:n.b,t),21).Kc();r.Ob();)if(p_n(n,e,uG(r.Pb(),27)))return!0;return!1}function yMn(n){var t,e;for(e=new DD(n);e.e!=e.i.gc();)if((t=uG(Zkn(e),89)).e||0!=(!t.d&&(t.d=new MD(g_t,t,1)),t.d).i)return!0;return!1}function MMn(n){var t,e;for(e=new DD(n);e.e!=e.i.gc();)if((t=uG(Zkn(e),89)).e||0!=(!t.d&&(t.d=new MD(g_t,t,1)),t.d).i)return!0;return!1}function TMn(n){var t,e;for(t=0,e=new Ww(n.c.a);e.a<e.c.c.length;)t+=x5(new Fz(ix(Xgn(uG(N3(e),10)).a.Kc(),new h)));return t/n.c.a.c.length}function jMn(){jMn=E,uBn(),ULt=RLt,BLt=new CN(8),new _N((XYn(),W$t),BLt),new _N(DDt,8),HLt=DLt,FLt=ELt,_Lt=SLt,KLt=new _N(w$t,(qx(),!1))}function EMn(n,t,e){e.Ug("Shrinking tree compaction",1),oM(gK(oIn(t,(rsn(),Oht))))?(son(n,t.f),Qen(t.f,t.c)):Qen(t.f,t.c),e.Vg()}function SMn(n,t,e,i){switch(t){case 7:return!n.e&&(n.e=new f_(aFt,n,7,4)),n.e;case 8:return!n.d&&(n.d=new f_(aFt,n,8,5)),n.d}return spn(n,t,e,i)}function PMn(n){var t;return n.a&&n.a.Vh()&&(t=uG(n.a,54),n.a=uG(mwn(n,t),142),n.a!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,9,5,t,n.a))),n.a}function CMn(n){return n<48||n>102?-1:n<=57?n-48:n<65?-1:n<=70?n-65+10:n<97?-1:n-97+10}function IMn(n,t){if(null==n)throw hv(new MM("null key in entry: null="+t));if(null==t)throw hv(new MM("null value in entry: "+n+"=null"))}function OMn(n,t){for(var e,i;n.Ob();){if(!t.Ob())return!1;if(e=n.Pb(),i=t.Pb(),!(xA(e)===xA(i)||null!=e&&udn(e,i)))return!1}return!t.Ob()}function AMn(n,t){var i;return i=Uhn(cT(eUt,1),I0n,28,15,[Nbn(n.a[0],t),Nbn(n.a[1],t),Nbn(n.a[2],t)]),n.d&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function LMn(n,t){var i;return i=Uhn(cT(eUt,1),I0n,28,15,[$bn(n.a[0],t),$bn(n.a[1],t),$bn(n.a[2],t)]),n.d&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function NMn(n,t,e){L_(uG(oIn(t,(jYn(),JMt)),101))||(Z8(n,t,yOn(t,e)),Z8(n,t,yOn(t,(KQn(),KRt))),Z8(n,t,yOn(t,yRt)),hZ(),f$(t.j,new Gg(n)))}function $Mn(n){var t,e;for(n.c||oVn(n),e=new Uk,N3(t=new Ww(n.a));t.a<t.c.c.length;)aq(e,uG(N3(t),418).a);return MK(0!=e.b),Lrn(e,e.c.b),e}function DMn(n,t,e){var i,r,c,a;for(a=n.r+t,n.r+=t,n.d+=e,i=e/n.n.c.length,r=0,c=new Ww(n.n);c.a<c.c.c.length;)rxn(uG(N3(c),209),a,i,r),++r}function xMn(n){var t,e;for(n.b.a.$b(),n.a=Inn(zut,EZn,60,n.c.c.a.b.c.length,0,1),t=0,e=new Ww(n.c.c.a.b);e.a<e.c.c.length;)uG(N3(e),60).f=t++}function RMn(n){var t,e;for(n.b.a.$b(),n.a=Inn(xlt,EZn,86,n.c.a.a.b.c.length,0,1),t=0,e=new Ww(n.c.a.a.b);e.a<e.c.c.length;)uG(N3(e),86).i=t++}function KMn(n){var t;if(t=gbn(n),!hDn(n))throw hv(new dM("position (0) must be less than the number of elements that remained ("+t+")"));return N9(n)}function FMn(n,t){var e;return n.a||(e=Inn(eUt,I0n,28,0,15,1),tE(n.b.a,new pd(e)),vv(e,qrn(P.prototype.Me,P,[])),n.a=new __(e,n.d)),x7(n.a,t)}function _Mn(n,t,e){try{return eTn(n,t+n.j,e+n.k)}catch(i){throw F$(i=Ehn(i),77)?hv(new dM(i.g+g3n+t+TZn+e+").")):hv(i)}}function BMn(n,t,e){try{return iTn(n,t+n.j,e+n.k)}catch(i){throw F$(i=Ehn(i),77)?hv(new dM(i.g+g3n+t+TZn+e+").")):hv(i)}}function HMn(n,t,e){try{return rTn(n,t+n.j,e+n.k)}catch(i){throw F$(i=Ehn(i),77)?hv(new dM(i.g+g3n+t+TZn+e+").")):hv(i)}}function UMn(n){switch(n.g){case 1:return KQn(),_Rt;case 4:return KQn(),yRt;case 3:return KQn(),kRt;case 2:return KQn(),KRt;default:return KQn(),FRt}}function GMn(n,t,e){t.k==(zIn(),dbt)&&e.k==wbt&&(n.d=Bwn(t,(KQn(),KRt)),n.b=Bwn(t,yRt)),e.k==dbt&&t.k==wbt&&(n.d=Bwn(e,(KQn(),yRt)),n.b=Bwn(e,KRt))}function qMn(n,t){var e,i;for(i=Dgn(n,t).Kc();i.Ob();)if(null!=oIn(e=uG(i.Pb(),12),(GYn(),lmt))||Dx(new w7(e.b)))return!0;return!1}function XMn(n,t,e){e.Ug("Linear segments node placement",1),n.b=uG(oIn(t,(GYn(),kmt)),312),MYn(n,t),$Xn(n,t),gzn(n,t),LJn(n),n.a=null,n.b=null,e.Vg()}function zMn(n,t){return ycn(t,n.e+n.d+(0==n.c.c.length?0:n.b)),Mcn(t,n.f),n.a=e.Math.max(n.a,t.f),n.d+=t.g+(0==n.c.c.length?0:n.b),kD(n.c,t),!0}function VMn(n,t,e){var i,r,c,a;for(a=0,i=e/n.a.c.length,c=new Ww(n.a);c.a<c.c.c.length;)oMn(r=uG(N3(c),172),r.s,r.t+a*i),DMn(r,n.d-r.r+t,i),++a}function WMn(n,t){var e,i,r,c,a,o;for(r=t.length-1,a=0,o=0,i=0;i<=r;i++)c=t[i],e=eOn(r,i)*gwn(1-n,r-i)*gwn(n,i),a+=c.a*e,o+=c.b*e;return new MO(a,o)}function QMn(n,t){var e,i,r,c,a;for(e=t.gc(),n._i(n.i+e),c=t.Kc(),a=n.i,n.i+=e,i=a;i<n.i;++i)r=c.Pb(),yD(n,i,n.Zi(i,r)),n.Mi(i,r),n.Ni();return 0!=e}function JMn(n,t,e){var i,r,c;return n.Pj()?(i=n.Ej(),c=n.Qj(),++n.j,n.qj(i,n.Zi(i,t)),r=n.Ij(3,null,t,i,c),e?e.nj(r):e=r):JK(n,n.Ej(),t),e}function YMn(n,t,e){var i,r,c;return(64&(c=F$(r=(i=uG(zrn(z5(n.a),t),89)).c,90)?uG(r,29):(YYn(),x_t)).Db?mwn(n.b,c):c)==e?MGn(i):Urn(i,e),c}function ZMn(n){var t;return null==n?null:new PN((t=yXn(n,!0)).length>0&&(s3(0,t.length),43==t.charCodeAt(0))?(s3(1,t.length+1),t.substr(1)):t)}function nTn(n){var t;return null==n?null:new PN((t=yXn(n,!0)).length>0&&(s3(0,t.length),43==t.charCodeAt(0))?(s3(1,t.length+1),t.substr(1)):t)}function tTn(n,t,e,i,r,c,a,o){var u,s;i&&((u=i.a[0])&&tTn(n,t,e,u,r,c,a,o),ljn(n,e,i.d,r,c,a,o)&&t.Fc(i),(s=i.a[1])&&tTn(n,t,e,s,r,c,a,o))}function eTn(n,t,e){try{return _A(Son(n,t,e),1)}catch(i){throw F$(i=Ehn(i),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(i)}}function iTn(n,t,e){try{return _A(Son(n,t,e),0)}catch(i){throw F$(i=Ehn(i),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(i)}}function rTn(n,t,e){try{return _A(Son(n,t,e),2)}catch(i){throw F$(i=Ehn(i),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(i)}}function cTn(n,t){if(-1==n.g)throw hv(new xv);n.Xj();try{n.d.hd(n.g,t),n.f=n.d.j}catch(e){throw F$(e=Ehn(e),77)?hv(new Fv):hv(e)}}function aTn(n){var t,e,i;for(e=new Ww(n.b);e.a<e.c.c.length;)for(t=0,i=new Ww(uG(N3(e),30).a);i.a<i.c.c.length;)uG(N3(i),10).p=t++}function oTn(n,t){var e,i,r,c;for(c=n.gc(),t.length<c&&(t=aT(new Array(c),t)),r=t,i=n.Kc(),e=0;e<c;++e)uQ(r,e,i.Pb());return t.length>c&&uQ(t,c,null),t}function uTn(n,t){var e,i;if(i=n.gc(),null==t){for(e=0;e<i;e++)if(null==n.Xb(e))return e}else for(e=0;e<i;e++)if(udn(t,n.Xb(e)))return e;return-1}function sTn(n,t){var e,i,r;return e=t.ld(),r=t.md(),i=n.xc(e),!(!(xA(r)===xA(i)||null!=r&&udn(r,i))||null==i&&!n._b(e))}function hTn(n,t){var e,i,r;return t<=22?(e=n.l&(1<<t)-1,i=r=0):t<=44?(e=n.l,i=n.m&(1<<t-22)-1,r=0):(e=n.l,i=n.m,r=n.h&(1<<t-44)-1),p$(e,i,r)}function fTn(n,t){switch(t.g){case 1:return n.f.n.d+n.t;case 3:return n.f.n.a+n.t;case 2:return n.f.n.c+n.s;case 4:return n.f.n.b+n.s;default:return 0}}function lTn(n,t){var e,i;switch(i=t.c,e=t.a,n.b.g){case 0:e.d=n.e-i.a-i.d;break;case 1:e.d+=n.e;break;case 2:e.c=n.e-i.a-i.d;break;case 3:e.c=n.e+i.d}}function bTn(n,t,e,i){var r,c;this.a=t,this.c=i,Nb(this,new MO(-(r=n.a).c,-r.d)),JF(this.b,e),c=i/2,t.a?HR(this.b,0,c):HR(this.b,c,0),kD(n.c,this)}function wTn(n,t,e,i){var r;this.c=n,this.d=t,s8(r=new lS,e,r.c.b,r.c),this.a=r,this.b=uG(oIn(i,(QGn(),cCt)),88),this.e=uM(pK(oIn(i,jCt))),RYn(this)}function dTn(){dTn=E,ZIt=new eO(q4n,0),JIt=new eO(K6n,1),YIt=new eO("EDGE_LENGTH_BY_POSITION",2),QIt=new eO("CROSSING_MINIMIZATION_BY_POSITION",3)}function gTn(n,t){var e,i;if(e=uG(dcn(n.g,t),27))return e;if(i=uG(dcn(n.j,t),123))return i;throw hv(new SM("Referenced shape does not exist: "+t))}function pTn(n,t){var e;if(F$(t,253)){e=uG(t,253);try{return 0==n.Ed(e)}catch(i){if(F$(i=Ehn(i),212))return!1;throw hv(i)}}return!1}function mTn(n,t){if(n.c==t)return n.d;if(n.d==t)return n.c;throw hv(new vM("Node 'one' must be either source or target of edge 'edge'."))}function vTn(n,t){if(n.c.i==t)return n.d.i;if(n.d.i==t)return n.c.i;throw hv(new vM("Node "+t+" is neither source nor target of edge "+n))}function kTn(n,t,e){e.Ug("Self-Loop ordering",1),kS(YJ(JJ(JJ(sin(new fX(null,new h3(t.b,16)),new Ii),new Oi),new Ai),new Li),new gg(n)),e.Vg()}function yTn(n,t){var e;switch(t.g){case 2:case 4:e=n.a,n.c.d.n.b<e.d.n.b&&(e=n.c),hV(n,t,(qhn(),hdt),e);break;case 1:case 3:hV(n,t,(qhn(),odt),null)}}function MTn(n,t,e,i,r,c){var a,o,u,s,h;for(a=BEn(t,e,c),o=e==(KQn(),yRt)||e==_Rt?-1:1,s=n[e.g],h=0;h<s.length;h++)(u=s[h])>0&&(u+=r),s[h]=a,a+=o*(u+i)}function TTn(n){var t,e,i;for(i=n.f,n.n=Inn(eUt,I0n,28,i,15,1),n.d=Inn(eUt,I0n,28,i,15,1),t=0;t<i;t++)e=uG(zq(n.c.b,t),30),n.n[t]=Hkn(n,e),n.d[t]=FRn(n,e)}function jTn(n,t){var e,i,r;for(r=0,i=2;i<t;i<<=1)n.Db&i&&++r;if(0==r){for(e=t<<=1;e<=128;e<<=1)if(n.Db&e)return 0;return-1}return r}function ETn(n,t){var e,i,r,c,a;for(a=VKn(n.e.Dh(),t),c=null,e=uG(n.g,124),r=0;r<n.i;++r)i=e[r],a.am(i.Lk())&&(!c&&(c=new ls),ttn(c,i));c&&PJn(n,c)}function STn(n){var t,e;if(!n)return null;if(n.dc())return"";for(e=new zM,t=n.Kc();t.Ob();)VA(e,mK(t.Pb())),e.a+=" ";return CL(e,e.a.length-1)}function PTn(n,t){var e,i=new Array(t);switch(n){case 14:case 15:e=0;break;case 16:e=!1;break;default:return i}for(var r=0;r<t;++r)i[r]=e;return i}function CTn(n){var t;for(t=new Ww(n.a.b);t.a<t.c.c.length;)uG(N3(t),60).c.$b();Prn(hN(n.d)?n.a.c:n.a.d,new Id(n)),n.c.df(n),NFn(n)}function ITn(n){var t,e,i;for(e=new Ww(n.e.c);e.a<e.c.c.length;){for(i=new Ww((t=uG(N3(e),290)).b);i.a<i.c.c.length;)Yqn(uG(N3(i),454));CNn(t)}}function OTn(n){var t,i,r,c,a;for(r=0,a=0,c=0,i=new Ww(n.a);i.a<i.c.c.length;)t=uG(N3(i),172),a=e.Math.max(a,t.r),r+=t.d+(c>0?n.c:0),++c;n.b=r,n.d=a}function ATn(n,t){var i;return i=Uhn(cT(eUt,1),I0n,28,15,[eMn(n,(Yrn(),jst),t),eMn(n,Est,t),eMn(n,Sst,t)]),n.f&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function LTn(n,t,e){try{HBn(n,t+n.j,e+n.k,!1,!0)}catch(i){throw F$(i=Ehn(i),77)?hv(new dM(i.g+g3n+t+TZn+e+").")):hv(i)}}function NTn(n,t,e){try{HBn(n,t+n.j,e+n.k,!0,!1)}catch(i){throw F$(i=Ehn(i),77)?hv(new dM(i.g+g3n+t+TZn+e+").")):hv(i)}}function $Tn(n){var t;vR(n,(jYn(),PMt))&&((t=uG(oIn(n,PMt),21)).Hc((VDn(),Bxt))?(t.Mc(Bxt),t.Fc(Uxt)):t.Hc(Uxt)&&(t.Mc(Uxt),t.Fc(Bxt)))}function DTn(n){var t;vR(n,(jYn(),PMt))&&((t=uG(oIn(n,PMt),21)).Hc((VDn(),Vxt))?(t.Mc(Vxt),t.Fc(Xxt)):t.Hc(Xxt)&&(t.Mc(Xxt),t.Fc(Vxt)))}function xTn(n,t,e,i){var r,c,a;return null==n.a&&nOn(n,t),a=t.b.j.c.length,c=e.d.p,(r=i.d.p-1)<0&&(r=a-1),c<=r?n.a[r]-n.a[c]:n.a[a-1]-n.a[c]+n.a[r]}function RTn(n){var t,e;if(!n.b)for(n.b=o6(uG(n.f,27).kh().i),e=new DD(uG(n.f,27).kh());e.e!=e.i.gc();)t=uG(Zkn(e),135),kD(n.b,new Wy(t));return n.b}function KTn(n){var t,e;if(!n.e)for(n.e=o6(RJ(uG(n.f,27)).i),e=new DD(RJ(uG(n.f,27)));e.e!=e.i.gc();)t=uG(Zkn(e),123),kD(n.e,new Jp(t));return n.e}function FTn(n){var t,e;if(!n.a)for(n.a=o6(wZ(uG(n.f,27)).i),e=new DD(wZ(uG(n.f,27)));e.e!=e.i.gc();)t=uG(Zkn(e),27),kD(n.a,new Wx(n,t));return n.a}function _Tn(n){var t;if(!n.C&&(null!=n.D||null!=n.B))if(t=KWn(n))n.hl(t);else try{n.hl(null)}catch(e){if(!F$(e=Ehn(e),63))throw hv(e)}return n.C}function BTn(n){switch(n.q.g){case 5:QEn(n,(KQn(),yRt)),QEn(n,KRt);break;case 4:TVn(n,(KQn(),yRt)),TVn(n,KRt);break;default:PAn(n,(KQn(),yRt)),PAn(n,KRt)}}function HTn(n){switch(n.q.g){case 5:JEn(n,(KQn(),kRt)),JEn(n,_Rt);break;case 4:jVn(n,(KQn(),kRt)),jVn(n,_Rt);break;default:CAn(n,(KQn(),kRt)),CAn(n,_Rt)}}function UTn(n,t){var i,r,c;for(c=new sj,r=n.Kc();r.Ob();)tHn(i=uG(r.Pb(),36),c.a,0),c.a+=i.f.a+t,c.b=e.Math.max(c.b,i.f.b);return c.b>0&&(c.b+=t),c}function GTn(n,t){var i,r,c;for(c=new sj,r=n.Kc();r.Ob();)tHn(i=uG(r.Pb(),36),0,c.b),c.b+=i.f.b+t,c.a=e.Math.max(c.a,i.f.a);return c.a>0&&(c.a+=t),c}function qTn(n){var t,i,r;for(r=vZn,i=new Ww(n.a);i.a<i.c.c.length;)vR(t=uG(N3(i),10),(GYn(),imt))&&(r=e.Math.min(r,uG(oIn(t,imt),17).a));return r}function XTn(n,t){var e,i;if(0==t.length)return 0;for(e=kQ(n.a,t[0],(KQn(),_Rt)),e+=kQ(n.a,t[t.length-1],kRt),i=0;i<t.length;i++)e+=CIn(n,i,t);return e}function zTn(){uFn(),this.c=new Zm,this.i=new Zm,this.e=new XL,this.f=new XL,this.g=new XL,this.j=new Zm,this.a=new Zm,this.b=new Ym,this.k=new Ym}function VTn(n,t){var e;return n.Db>>16==6?n.Cb.Th(n,5,fFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||n.ii(),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function WTn(n){EZ();var t=n.e;if(t&&t.stack){var e=t.stack,i=t+"\n";return e.substring(0,i.length)==i&&(e=e.substring(i.length)),e.split("\n")}return[]}function QTn(n){var t;return Tan(),(t=wot)[n>>>28]|t[n>>24&15]<<4|t[n>>20&15]<<8|t[n>>16&15]<<12|t[n>>12&15]<<16|t[n>>8&15]<<20|t[n>>4&15]<<24|t[15&n]<<28}function JTn(n){var t,i,r;n.b==n.c&&(r=n.a.length,i=pfn(e.Math.max(8,r))<<1,0!=n.b?(Pon(n,t=MF(n.a,i),r),n.a=t,n.b=0):Xv(n.a,i),n.c=r)}function YTn(n,t){var e;return(e=n.b).pf((XYn(),uDt))?e.ag()==(KQn(),_Rt)?-e.Mf().a-uM(pK(e.of(uDt))):t+uM(pK(e.of(uDt))):e.ag()==(KQn(),_Rt)?-e.Mf().a:t}function ZTn(n){var t;return 0!=n.b.c.length&&uG(zq(n.b,0),72).a?uG(zq(n.b,0),72).a:null!=(t=sY(n))?t:""+(n.c?Ten(n.c.a,n,0):-1)}function njn(n){var t;return 0!=n.f.c.length&&uG(zq(n.f,0),72).a?uG(zq(n.f,0),72).a:null!=(t=sY(n))?t:""+(n.i?Ten(n.i.j,n,0):-1)}function tjn(n,t){var e,i;if(t<0||t>=n.gc())return null;for(e=t;e<n.gc();++e)if(i=uG(n.Xb(e),131),e==n.gc()-1||!i.o)return new WO(xwn(e),i);return null}function ejn(n,t,e){var i,r,c,a;for(c=n.c,i=e?n:t,r=(e?t:n).p+1;r<i.p;++r)if((a=uG(zq(c.a,r),10)).k!=(zIn(),fbt)&&!pEn(a))return!1;return!0}function ijn(n){var t,i,r,c,a;for(a=0,c=T0n,r=0,i=new Ww(n.a);i.a<i.c.c.length;)a+=(t=uG(N3(i),172)).r+(r>0?n.c:0),c=e.Math.max(c,t.d),++r;n.e=a,n.b=c}function rjn(n){var t,e;if(!n.b)for(n.b=o6(uG(n.f,123).kh().i),e=new DD(uG(n.f,123).kh());e.e!=e.i.gc();)t=uG(Zkn(e),135),kD(n.b,new Wy(t));return n.b}function cjn(n,t){var e,i,r;if(t.dc())return EK(),EK(),KFt;for(e=new cF(n,t.gc()),r=new DD(n);r.e!=r.i.gc();)i=Zkn(r),t.Hc(i)&&ttn(e,i);return e}function ajn(n,t,e,i){return 0==t?i?(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),n.o):(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),Tnn(n.o)):Dyn(n,t,e,i)}function ojn(n){var t,e;if(n.rb)for(t=0,e=n.rb.i;t<e;++t)lR(zrn(n.rb,t));if(n.vb)for(t=0,e=n.vb.i;t<e;++t)lR(zrn(n.vb,t));jz((gAn(),kBt),n),n.Bb|=1}function ujn(n,t,e,i,r,c,a,o,u,s,h,f,l,b){return eLn(n,t,i,null,r,c,a,o,u,s,l,!0,b),Pgn(n,h),F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),2),e&&bon(n,e),Ign(n,f),n}function sjn(n){var t;if(null==n)return null;t=0;try{t=vUn(n,j1n,vZn)&D1n}catch(e){if(!F$(e=Ehn(e),130))throw hv(e);t=_en(n)[0]}return Hsn(t)}function hjn(n){var t;if(null==n)return null;t=0;try{t=vUn(n,j1n,vZn)&D1n}catch(e){if(!F$(e=Ehn(e),130))throw hv(e);t=_en(n)[0]}return Hsn(t)}function fjn(n,t){var e,i,r;return!((r=n.h-t.h)<0||(e=n.l-t.l,(r+=(i=n.m-t.m+(e>>22))>>22)<0||(n.l=e&f0n,n.m=i&f0n,n.h=r&l0n,0)))}function ljn(n,t,e,i,r,c,a){var o,u;return!(t.Te()&&(u=n.a.Ne(e,i),u<0||!r&&0==u)||t.Ue()&&(o=n.a.Ne(e,c),o>0||!a&&0==o))}function bjn(n,t){if(Cln(),0!=n.j.g-t.j.g)return 0;switch(n.j.g){case 2:return Wgn(t,edt)-Wgn(n,edt);case 4:return Wgn(n,tdt)-Wgn(t,tdt)}return 0}function wjn(n){switch(n.g){case 0:return jgt;case 1:return Egt;case 2:return Sgt;case 3:return Pgt;case 4:return Cgt;case 5:return Igt;default:return null}}function djn(n,t,e){var i,r;return Kbn(r=new ny,t),qon(r,e),ttn((!n.c&&(n.c=new fV(m_t,n,12,10)),n.c),r),Pcn(i=r,0),Ccn(i,1),mdn(i,!0),ddn(i,!0),i}function gjn(n,t){var e,i;if(t>=n.i)throw hv(new pL(t,n.i));return++n.j,e=n.g[t],(i=n.i-t-1)>0&&qGn(n.g,t+1,n.g,t,i),uQ(n.g,--n.i,null),n.Qi(t,e),n.Ni(),e}function pjn(n,t){var e;return n.Db>>16==17?n.Cb.Th(n,21,h_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||n.ii(),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function mjn(n){var t,e,i;for(hZ(),f$(n.c,n.a),i=new Ww(n.c);i.a<i.c.c.length;)for(e=N3(i),t=new Ww(n.b);t.a<t.c.c.length;)uG(N3(t),693).bf(e)}function vjn(n){var t,e,i;for(hZ(),f$(n.c,n.a),i=new Ww(n.c);i.a<i.c.c.length;)for(e=N3(i),t=new Ww(n.b);t.a<t.c.c.length;)uG(N3(t),382).bf(e)}function kjn(n){var t,e,i,r,c;for(r=vZn,c=null,i=new Ww(n.d);i.a<i.c.c.length;)(e=uG(N3(i),218)).d.j^e.e.j&&(t=e.e.e-e.d.e-e.a)<r&&(r=t,c=e);return c}function yjn(){yjn=E,tlt=new mL(I4n,(qx(),!1)),Jft=new mL(O4n,100),Jen(),Yft=new mL(A4n,Zft=glt),nlt=new mL(L4n,t4n),elt=new mL(N4n,xwn(vZn))}function Mjn(n,t,e){var i,r,c,a,o,u;for(u=0,r=0,c=(i=n.a[t]).length;r<c;++r)for(o=Vwn(i[r],e).Kc();o.Ob();)a=uG(o.Pb(),12),vJ(n.f,a,xwn(u++))}function Tjn(n,t,e){var i,r;if(e)for(r=((i=new Gz(e.a.length)).b-i.a)*i.c<0?(CP(),XHt):new xD(i);r.Ob();)UNn(n,t,fNn(uin(e,uG(r.Pb(),17).a)))}function jjn(n,t,e){var i,r;if(e)for(r=((i=new Gz(e.a.length)).b-i.a)*i.c<0?(CP(),XHt):new xD(i);r.Ob();)UNn(n,t,fNn(uin(e,uG(r.Pb(),17).a)))}function Ejn(n){var t;return jIn(),Ntn(t=uG(oTn(kz(n.k),Inn(YRt,z4n,64,2,0,1)),126),0,t.length,null),t[0]==(KQn(),yRt)&&t[1]==_Rt&&(uQ(t,0,_Rt),uQ(t,1,yRt)),t}function Sjn(n,t,e){var i,r,c;return c=ZFn(n,r=xKn(n,t,e)),Ctn(n.b),Z3(n,t,e),hZ(),f$(r,new np(n)),i=ZFn(n,r),Ctn(n.b),Z3(n,e,t),new WO(xwn(c),xwn(i))}function Pjn(){Pjn=E,eSt=Aq(new wJ,(uIn(),Plt),(zYn(),ewt)),iSt=new uF("linearSegments.inputPrio",xwn(0)),rSt=new uF("linearSegments.outputPrio",xwn(0))}function Cjn(){Cjn=E,zSt=new zI("P1_TREEIFICATION",0),VSt=new zI("P2_NODE_ORDERING",1),WSt=new zI("P3_NODE_PLACEMENT",2),QSt=new zI("P4_EDGE_ROUTING",3)}function Ijn(n){var t,i,r,c;for(i=0,t=0,c=new DD(n);c.e!=c.i.gc();)r=uG(Zkn(c),27),i=e.Math.max(r.g+r.i,i),t=e.Math.max(r.f+r.j,t);return new MO(i,t)}function Ojn(n,t){var i,r,c;for(c=0,r=new Ww(n);r.a<r.c.c.length;)i=uG(N3(r),27),c+=e.Math.pow(i.g*i.f-t,2);return e.Math.sqrt(c/(n.c.length-1))}function Ajn(){Ajn=E,Rxt=new LO("UNKNOWN",0),$xt=new LO("ABOVE",1),Dxt=new LO("BELOW",2),xxt=new LO("INLINE",3),new uF("org.eclipse.elk.labelSide",Rxt)}function Ljn(n,t){var e;if(n.Yi()&&null!=t){for(e=0;e<n.i;++e)if(udn(t,n.g[e]))return e}else for(e=0;e<n.i;++e)if(xA(n.g[e])===xA(t))return e;return-1}function Njn(n,t,e){var i,r;return t.c==(can(),Wjt)&&e.c==Vjt?-1:t.c==Vjt&&e.c==Wjt?1:(i=Fbn(t.a,n.a),r=Fbn(e.a,n.a),t.c==Wjt?r-i:i-r)}function $jn(n,t,e){if(e&&(t<0||t>e.a.c.length))throw hv(new vM("index must be >= 0 and <= layer node count"));n.c&&men(n.c.a,n),n.c=e,e&&GX(e.a,t,n)}function Djn(n,t){var e,i,r;for(i=new Fz(ix(Ggn(n).a.Kc(),new h));hDn(i);)return e=uG(N9(i),18),new Ul(WW((r=uG(t.Kb(e),10)).n.b+r.o.b/2));return gy(),gy(),wat}function xjn(n,t){this.c=new Ym,this.a=n,this.b=t,this.d=uG(oIn(n,(GYn(),kmt)),312),xA(oIn(n,(jYn(),CMt)))===xA((Wtn(),Lgt))?this.e=new Pk:this.e=new Sk}function Rjn(n,t){var e,i;return i=null,n.pf((XYn(),ODt))&&(e=uG(n.of(ODt),96)).pf(t)&&(i=e.of(t)),null==i&&n.Tf()&&(i=n.Tf().of(t)),null==i&&(i=Jkn(t)),i}function Kjn(n,t){var e,i;e=n.fd(t);try{return i=e.Pb(),e.Qb(),i}catch(r){throw F$(r=Ehn(r),112)?hv(new dM("Can't remove element "+t)):hv(r)}}function Fjn(n,t){var e,i,r;if(0==(e=Wqn(n,t,r=new Lfn((i=new QE).q.getFullYear()-V1n,i.q.getMonth(),i.q.getDate())))||e<t.length)throw hv(new vM(t));return r}function _jn(n,t){var e,i,r;for(tJ(t),kK(t!=n),r=n.b.c.length,i=t.Kc();i.Ob();)e=i.Pb(),kD(n.b,tJ(e));return r!=n.b.c.length&&(_ln(n,0),!0)}function Bjn(){Bjn=E,XYn(),olt=O$t,new _N(p$t,(qx(),!0)),hlt=_$t,flt=U$t,llt=q$t,slt=K$t,blt=V$t,wlt=bDt,yjn(),alt=tlt,rlt=Yft,clt=nlt,ult=elt,ilt=Jft}function Hjn(n,t){if(t==n.c)return n.d;if(t==n.d)return n.c;throw hv(new vM("'port' must be either the source port or target port of the edge."))}function Ujn(n,t,e){var i,r;switch(r=n.o,i=n.d,t.g){case 1:return-i.d-e;case 3:return r.b+i.a+e;case 2:return r.a+i.c+e;case 4:return-i.b-e;default:return 0}}function Gjn(n,t,e,i){var r,c,a;for(a2(t,uG(i.Xb(0),30)),a=i.kd(1,i.gc()),c=uG(e.Kb(t),20).Kc();c.Ob();)Gjn(n,(r=uG(c.Pb(),18)).c.i==t?r.d.i:r.c.i,e,a)}function qjn(n){var t;return t=new Ym,vR(n,(GYn(),Emt))?uG(oIn(n,Emt),85):(kS(JJ(new fX(null,new h3(n.j,16)),new tr),new yg(t)),kfn(n,Emt,t),t)}function Xjn(n,t){var i,r,c,a,o;for(r=0,c=0,i=0,o=new Ww(n);o.a<o.c.c.length;)a=uG(N3(o),186),r=e.Math.max(r,a.e),c+=a.b+(i>0?t:0),++i;return new MO(r,c)}function zjn(n,t){var e;return n.Db>>16==6?n.Cb.Th(n,6,aFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),BKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Vjn(n,t){var e;return n.Db>>16==7?n.Cb.Th(n,1,iFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),UKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Wjn(n,t){var e;return n.Db>>16==9?n.Cb.Th(n,9,bFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),qKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Qjn(n,t){var e;return n.Db>>16==5?n.Cb.Th(n,9,w_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),O_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Jjn(n,t){var e;return n.Db>>16==7?n.Cb.Th(n,6,fFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),F_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Yjn(n,t){var e;return n.Db>>16==3?n.Cb.Th(n,0,uFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),T_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Zjn(){this.a=new ss,this.g=new dMn,this.j=new dMn,this.b=new Ym,this.d=new dMn,this.i=new dMn,this.k=new Ym,this.c=new Ym,this.e=new Ym,this.f=new Ym}function nEn(n,t,e){var i,r,c;for(e<0&&(e=0),c=n.i,r=e;r<c;r++)if(i=zrn(n,r),null==t){if(null==i)return r}else if(xA(t)===xA(i)||udn(t,i))return r;return-1}function tEn(n,t){var e,i;return(e=t.qi(n.a))?(i=mK(Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),uct)),m_(sct,i)?jz(n,Hrn(t.qk())):i):null}function eEn(n,t){var e,i;if(t){if(t==n)return!0;for(e=0,i=uG(t,54).Ph();i&&i!=t;i=i.Ph()){if(++e>O0n)return eEn(n,i);if(i==n)return!0}}return!1}function iEn(n){switch(Gx(),n.q.g){case 5:uNn(n,(KQn(),yRt)),uNn(n,KRt);break;case 4:Kxn(n,(KQn(),yRt)),Kxn(n,KRt);break;default:$Qn(n,(KQn(),yRt)),$Qn(n,KRt)}}function rEn(n){switch(Gx(),n.q.g){case 5:k$n(n,(KQn(),kRt)),k$n(n,_Rt);break;case 4:fyn(n,(KQn(),kRt)),fyn(n,_Rt);break;default:DQn(n,(KQn(),kRt)),DQn(n,_Rt)}}function cEn(n){var t,e;(t=uG(oIn(n,(cGn(),Dft)),17))?(e=t.a,kfn(n,(mon(),Qft),0==e?new Upn:new v8(e))):kfn(n,(mon(),Qft),new v8(1))}function aEn(n,t){var e;switch(e=n.i,t.g){case 1:return-(n.n.b+n.o.b);case 2:return n.n.a-e.o.a;case 3:return n.n.b-e.o.b;case 4:return-(n.n.a+n.o.a)}return 0}function oEn(n,t){switch(n.g){case 0:return t==(Gpn(),Imt)?qwt:Xwt;case 1:return t==(Gpn(),Imt)?qwt:Gwt;case 2:return t==(Gpn(),Imt)?Gwt:Xwt;default:return Gwt}}function uEn(n,t){var i,r,c;for(men(n.a,t),n.e-=t.r+(0==n.a.c.length?0:n.c),c=b7n,r=new Ww(n.a);r.a<r.c.c.length;)i=uG(N3(r),172),c=e.Math.max(c,i.d);n.b=c}function sEn(n,t){var e;return n.Db>>16==3?n.Cb.Th(n,12,bFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),_Kt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function hEn(n,t){var e;return n.Db>>16==11?n.Cb.Th(n,10,bFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),GKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function fEn(n,t){var e;return n.Db>>16==10?n.Cb.Th(n,11,h_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),R_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function lEn(n,t){var e;return n.Db>>16==10?n.Cb.Th(n,12,p_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),__t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function bEn(n){var t;return 1&n.Bb||!n.r||!n.r.Vh()||(t=uG(n.r,54),n.r=uG(mwn(n,t),142),n.r!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,9,8,t,n.r))),n.r}function wEn(n,t,i){var r;return r=Uhn(cT(eUt,1),I0n,28,15,[BCn(n,(Yrn(),jst),t,i),BCn(n,Est,t,i),BCn(n,Sst,t,i)]),n.f&&(r[0]=e.Math.max(r[0],r[2]),r[2]=r[0]),r}function dEn(n,t){var e,i,r;if(0!=(r=lyn(n,t)).c.length)for(f$(r,new ti),e=r.c.length,i=0;i<e;i++)YOn(n,(u3(i,r.c.length),uG(r.c[i],293)),m_n(n,r,i))}function gEn(n){var t,e,i;for(i=uG(Y9(n.a,(gPn(),bdt)),15).Kc();i.Ob();)for(t=kz((e=uG(i.Pb(),105)).k).Kc();t.Ob();)pW(n,e,uG(t.Pb(),64),(gon(),Edt),1)}function pEn(n){var t,e;if(n.k==(zIn(),wbt))for(e=new Fz(ix(Ggn(n).a.Kc(),new h));hDn(e);)if(!v9(t=uG(N9(e),18))&&n.c==wSn(t,n).c)return!0;return!1}function mEn(n){var t,e;if(n.k==(zIn(),wbt))for(e=new Fz(ix(Ggn(n).a.Kc(),new h));hDn(e);)if(!v9(t=uG(N9(e),18))&&t.c.i.c==t.d.i.c)return!0;return!1}function vEn(n,t){var e,i,r;if(t)for(r=((e=new Gz(t.a.length)).b-e.a)*e.c<0?(CP(),XHt):new xD(e);r.Ob();)(i=v6(t,uG(r.Pb(),17).a))&&Mxn(n,i)}function kEn(){var n;for(IP(),OYn((tQ(),M_t)),sYn(M_t),ojn(M_t),YYn(),nBt=N_t,n=new Ww(gBt);n.a<n.c.c.length;)PWn(uG(N3(n),248),N_t,null);return!0}function yEn(n,t){var e,i,r,c,a,o;return(a=n.h>>19)!=(o=t.h>>19)?o-a:(i=n.h)!=(c=t.h)?i-c:(e=n.m)!=(r=t.m)?e-r:n.l-t.l}function MEn(){MEn=E,W_n(),ost=new mL($2n,ust=dst),Xin(),cst=new mL(D2n,ast=Zut),_kn(),ist=new mL(x2n,rst=Wut),est=new mL(R2n,(qx(),!0))}function TEn(n,t,e){var i,r;i=t*e,F$(n.g,154)?(r=Q6(n)).f.d?r.f.a||(n.d.a+=i+Z2n):(n.d.d-=i+Z2n,n.d.a+=i+Z2n):F$(n.g,10)&&(n.d.d-=i,n.d.a+=2*i)}function jEn(n,t,i){var r,c,a,o,u;for(c=n[i.g],u=new Ww(t.d);u.a<u.c.c.length;)(a=(o=uG(N3(u),105)).i)&&a.i==i&&(c[r=o.d[i.g]]=e.Math.max(c[r],a.j.b))}function EEn(n,t){var i,r,c,a,o;for(r=0,c=0,i=0,o=new Ww(t.d);o.a<o.c.c.length;)OTn(a=uG(N3(o),315)),r=e.Math.max(r,a.b),c+=a.d+(i>0?n.b:0),++i;t.b=r,t.e=c}function SEn(n){var t,e,i;if(i=n.b,aS(n.i,i.length)){for(e=2*i.length,n.b=Inn(Cat,l1n,303,e,0,1),n.c=Inn(Cat,l1n,303,e,0,1),n.f=e-1,n.i=0,t=n.a;t;t=t.c)HLn(n,t,t);++n.g}}function PEn(n,t,e,i){var r,c,a,o;for(r=0;r<t.o;r++)for(c=r-t.j+e,a=0;a<t.p;a++)o=a-t.k+i,eTn(t,r,a)?HMn(n,c,o)||LTn(n,c,o):rTn(t,r,a)&&(_Mn(n,c,o)||NTn(n,c,o))}function CEn(n,t){return n.b.a=e.Math.min(n.b.a,t.c),n.b.b=e.Math.min(n.b.b,t.d),n.a.a=e.Math.max(n.a.a,t.c),n.a.b=e.Math.max(n.a.b,t.d),mv(n.c,t),!0}function IEn(n,t,e){var i;(i=t.c.i).k==(zIn(),wbt)?(kfn(n,(GYn(),Zpt),uG(oIn(i,Zpt),12)),kfn(n,nmt,uG(oIn(i,nmt),12))):(kfn(n,(GYn(),Zpt),t.c),kfn(n,nmt,e.d))}function OEn(n,t,i){var r,c,a,o,u,s;return l_n(),o=t/2,a=i/2,u=1,s=1,(r=e.Math.abs(n.a))>o&&(u=o/r),(c=e.Math.abs(n.b))>a&&(s=a/c),vD(n,e.Math.min(u,s)),n}function AEn(){var n,t;tXn();try{if(t=uG(ASn((MP(),l_t),aet),2113))return t}catch(e){if(!F$(e=Ehn(e),103))throw hv(e);n=e,AW((t$(),n))}return new rs}function LEn(){var n,t;tXn();try{if(t=uG(ASn((MP(),l_t),Drt),2040))return t}catch(e){if(!F$(e=Ehn(e),103))throw hv(e);n=e,AW((t$(),n))}return new _s}function NEn(){var n,t;Ftn();try{if(t=uG(ASn((MP(),l_t),lct),2122))return t}catch(e){if(!F$(e=Ehn(e),103))throw hv(e);n=e,AW((t$(),n))}return new Nh}function $En(n,t,e){var i,r;return r=n.e,n.e=t,4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,4,r,t),e?e.nj(i):e=i),r!=t&&(e=PWn(n,t?bRn(n,t):n.a,e)),e}function DEn(){QE.call(this),this.e=-1,this.a=!1,this.p=j1n,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=j1n}function xEn(n,t){var e,i,r;if(i=n.b.d.d,n.a||(i+=n.b.d.a),r=t.b.d.d,t.a||(r+=t.b.d.a),0==(e=ugn(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function REn(n,t){var e,i,r;if(i=n.b.b.d,n.a||(i+=n.b.b.a),r=t.b.b.d,t.a||(r+=t.b.b.a),0==(e=ugn(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function KEn(n,t){var e,i,r;if(i=n.b.g.d,n.a||(i+=n.b.g.a),r=t.b.g.d,t.a||(r+=t.b.g.a),0==(e=ugn(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function FEn(){FEn=E,klt=wz(Aq(Aq(Aq(new wJ,(uIn(),Slt),(zYn(),owt)),Slt,fwt),Plt,mwt),Plt,Wbt),Mlt=Aq(Aq(new wJ,Slt,Fbt),Slt,Qbt),ylt=wz(new wJ,Plt,Ybt)}function _En(n){var t,e,i,r,c;for(t=uG(oIn(n,(GYn(),$pt)),85),c=n.n,i=t.Cc().Kc();i.Ob();)(r=(e=uG(i.Pb(),314)).i).c+=c.a,r.d+=c.b,e.c?P_n(e):C_n(e);kfn(n,$pt,null)}function BEn(n,t,e){var i,r;switch(i=(r=n.b).d,t.g){case 1:return-i.d-e;case 2:return r.o.a+i.c+e;case 3:return r.o.b+i.a+e;case 4:return-i.b-e;default:return-1}}function HEn(n,t,e){var i;for(e.Ug("Interactive node placement",1),n.a=uG(oIn(t,(GYn(),kmt)),312),i=new Ww(t.b);i.a<i.c.c.length;)XFn(n,uG(N3(i),30));e.Vg()}function UEn(n){var t,e,i,r,c;if(i=0,r=B3n,n.b)for(t=0;t<360;t++)e=.017453292519943295*t,nUn(n,n.d,0,0,f7n,e),(c=n.b.Dg(n.d))<r&&(i=e,r=c);nUn(n,n.d,0,0,f7n,i)}function GEn(n,t){var e,i,r,c;for(c=new Ym,t.e=null,t.f=null,i=new Ww(t.i);i.a<i.c.c.length;)e=uG(N3(i),68),r=uG(cQ(n.g,e.a),42),e.a=AV(e.b),vJ(c,e.a,r);n.g=c}function qEn(n,t,e){var i,r,c,a,o;for(r=(t-n.e)/n.d.c.length,c=0,o=new Ww(n.d);o.a<o.c.c.length;)a=uG(N3(o),315),i=n.b-a.b+e,Xmn(a,a.e+c*r,a.f),VMn(a,r,i),++c}function XEn(n){var t;if(n.f._j(),-1!=n.b){if(++n.b,t=n.f.d[n.a],n.b<t.i)return;++n.a}for(;n.a<n.f.d.length;++n.a)if((t=n.f.d[n.a])&&0!=t.i)return void(n.b=0);n.b=-1}function zEn(n,t){var e,i,r;for(e=MLn(n,0==(r=t.c.length)?"":(u3(0,t.c.length),mK(t.c[0]))),i=1;i<r&&e;++i)e=uG(e,54).Zh((u3(i,t.c.length),mK(t.c[i])));return e}function VEn(n,t){var e,i;for(i=new Ww(t);i.a<i.c.c.length;)e=uG(N3(i),10),n.c[e.c.p][e.p].a=BX(n.i),n.c[e.c.p][e.p].d=uM(n.c[e.c.p][e.p].a),n.c[e.c.p][e.p].b=1}function WEn(n,t){var i,r,c;for(c=0,r=new Ww(n);r.a<r.c.c.length;)i=uG(N3(r),163),c+=e.Math.pow(EX(i)*jX(i)-t,2);return e.Math.sqrt(c/(n.c.length-1))}function QEn(n,t){var i,r,c,a;for(a=0,c=uG(uG(Y9(n.r,t),21),87).Kc();c.Ob();)r=uG(c.Pb(),117),a=e.Math.max(a,r.e.a+r.b.Mf().a);(i=uG(AJ(n.b,t),127)).n.b=0,i.a.a=a}function JEn(n,t){var i,r,c,a;for(i=0,a=uG(uG(Y9(n.r,t),21),87).Kc();a.Ob();)c=uG(a.Pb(),117),i=e.Math.max(i,c.e.b+c.b.Mf().b);(r=uG(AJ(n.b,t),127)).n.d=0,r.a.b=i}function YEn(n,t,e,i){var r,c,a;return a=NBn(n,c=UBn(n,t,e,i)),QCn(n,t,e,i),Ctn(n.b),hZ(),f$(c,new tp(n)),r=NBn(n,c),QCn(n,e,t,i),Ctn(n.b),new WO(xwn(a),xwn(r))}function ZEn(n,t){var e;t.Ug("Delaunay triangulation",1),e=new Zm,Prn(n.i,new Fp(e)),oM(gK(oIn(n,(rsn(),Oht)))),n.e?Qon(n.e,nYn(e)):n.e=nYn(e),t.Vg()}function nSn(n,t,e){var i,r;for(MN(n,n.j+t,n.k+e),r=new DD((!n.a&&(n.a=new MD(eFt,n,5)),n.a));r.e!=r.i.gc();)mN(i=uG(Zkn(r),377),i.a+t,i.b+e);yN(n,n.b+t,n.c+e)}function tSn(n,t,e,i){switch(e){case 7:return!n.e&&(n.e=new f_(aFt,n,7,4)),Nmn(n.e,t,i);case 8:return!n.d&&(n.d=new f_(aFt,n,8,5)),Nmn(n.d,t,i)}return SCn(n,t,e,i)}function eSn(n,t,e,i){switch(e){case 7:return!n.e&&(n.e=new f_(aFt,n,7,4)),Nyn(n.e,t,i);case 8:return!n.d&&(n.d=new f_(aFt,n,8,5)),Nyn(n.d,t,i)}return phn(n,t,e,i)}function iSn(n,t,e){var i,r,c;if(e)for(c=((i=new Gz(e.a.length)).b-i.a)*i.c<0?(CP(),XHt):new xD(i);c.Ob();)(r=v6(e,uG(c.Pb(),17).a))&&iNn(n,r,t)}function rSn(n,t,e){var i,r,c;return n._j(),c=null==t?0:Hon(t),n.f>0&&(r=ZNn(n,(c&vZn)%n.d.length,c,t))?r.nd(e):(i=n.ck(c,t,e),n.c.Fc(i),null)}function cSn(n,t){var e,i,r,c;switch(tdn(n,t).Kl()){case 3:case 2:for(r=0,c=(e=hXn(t)).i;r<c;++r)if(5==sJ(Nen(n,i=uG(zrn(e,r),35))))return i}return null}function aSn(n){var t,e,i,r,c;if(aS(n.f,n.b.length))for(i=Inn($at,l1n,227,2*n.b.length,0,1),n.b=i,r=i.length-1,e=n.a;e!=n;e=e._d())t=(c=uG(e,227)).d&r,c.a=i[t],i[t]=c}function oSn(n){var t,e;return e=uG(oIn(n,(GYn(),Hpt)),21),t=aN(CSt),e.Hc((r_n(),cpt))&&gsn(t,ASt),e.Hc(opt)&&gsn(t,NSt),e.Hc(Ygt)&&gsn(t,ISt),e.Hc(npt)&&gsn(t,OSt),t}function uSn(n){if(n<0)throw hv(new vM("The input must be positive"));return n<ENt.length?W4(ENt[n]):e.Math.sqrt(f7n*n)*(pwn(n,n)/gwn(2.718281828459045,n))}function sSn(n,t){var e;if(n.Yi()&&null!=t){for(e=0;e<n.i;++e)if(udn(t,n.g[e]))return!0}else for(e=0;e<n.i;++e)if(xA(n.g[e])===xA(t))return!0;return!1}function hSn(n,t){if(null==t){for(;n.a.Ob();)if(null==uG(n.a.Pb(),44).md())return!0}else for(;n.a.Ob();)if(udn(t,uG(n.a.Pb(),44).md()))return!0;return!1}function fSn(n,t){var e;return t===n||!!F$(t,678)&&(e=uG(t,2046),Fvn(n.g||(n.g=new nb(n)),e.g||(e.g=new nb(e))))}function lSn(n){var t,i,r;for(t="gA",i="vz",r=e.Math.min(n.length,5)-1;r>=0;r--)if(m_(n[r].d,t)||m_(n[r].d,i)){n.length>=r+1&&n.splice(0,r+1);break}return n}function bSn(n,t){var i;return _L(n)&&_L(t)&&p0n<(i=n/t)&&i<d0n?i<0?e.Math.ceil(i):e.Math.floor(i):Esn(Yzn(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t,!1))}function wSn(n,t){if(t==n.c.i)return n.d.i;if(t==n.d.i)return n.c.i;throw hv(new vM("'node' must either be the source node or target node of the edge."))}function dSn(n){var t,e,i,r;if(r=uG(oIn(n,(GYn(),Ipt)),36)){for(i=new sj,t=HQ(n.c.i);t!=r;)t=HQ(e=t.e),KR(JF(JF(i,e.n),t.c),t.d.b,t.d.d);return i}return Pbt}function gSn(n){var t;kS(sin(new fX(null,new h3((t=uG(oIn(n,(GYn(),vmt)),337)).d,16)),new Fi),new dg(n)),kS(JJ(new fX(null,new h3(t.d,16)),new _i),new pg(n))}function pSn(n,t){var e,i;for(e=new Fz(ix((t?Xgn(n):qgn(n)).a.Kc(),new h));hDn(e);)if((i=wSn(uG(N9(e),18),n)).k==(zIn(),wbt)&&i.c!=n.c)return i;return null}function mSn(n){var t,i,r;for(i=new Ww(n.p);i.a<i.c.c.length;)(t=uG(N3(i),10)).k==(zIn(),dbt)&&(r=t.o.b,n.i=e.Math.min(n.i,r),n.g=e.Math.max(n.g,r))}function vSn(n,t,e){var i,r,c;for(c=new Ww(t);c.a<c.c.c.length;)i=uG(N3(c),10),n.c[i.c.p][i.p].e=!1;for(r=new Ww(t);r.a<r.c.c.length;)nQn(n,i=uG(N3(r),10),e)}function kSn(n,t,i){var r,c;(r=Hwn(t.j,i.s,i.c)+Hwn(i.e,t.s,t.c))==(c=Hwn(i.j,t.s,t.c)+Hwn(t.e,i.s,i.c))?r>0&&(n.b+=2,n.a+=r):(n.b+=1,n.a+=e.Math.min(r,c))}function ySn(n){var t;t=uG(oIn(uG(hyn(n.b,0),40),(QGn(),pCt)),107),kfn(n,(OQn(),kPt),new MO(0,0)),rUn(new L7,n,t.b+t.c-uM(pK(oIn(n,PPt))),t.d+t.a-uM(pK(oIn(n,IPt))))}function MSn(n,t){var e;if(e=!1,RA(t)&&(e=!0,pQ(n,new QW(mK(t)))),e||F$(t,242)&&(e=!0,pQ(n,new Pb(Q_(uG(t,242))))),!e)throw hv(new pM(Cet))}function TSn(n,t,e,i){var r,c,a;return r=new Ken(n.e,1,10,F$(a=t.c,90)?uG(a,29):(YYn(),x_t),F$(c=e.c,90)?uG(c,29):(YYn(),x_t),Hyn(n,t),!1),i?i.nj(r):i=r,i}function jSn(n){var t,e;switch(uG(oIn(HQ(n),(jYn(),lMt)),429).g){case 0:return t=n.n,e=n.o,new MO(t.a+e.a/2,t.b+e.b/2);case 1:return new eN(n.n);default:return null}}function ESn(){ESn=E,Fgt=new rI(q4n,0),Kgt=new rI("LEFTUP",1),Bgt=new rI("RIGHTUP",2),Rgt=new rI("LEFTDOWN",3),_gt=new rI("RIGHTDOWN",4),xgt=new rI("BALANCED",5)}function SSn(n,t,e){var i,r,c;if(0==(i=ugn(n.a[t.p],n.a[e.p]))){if(r=uG(oIn(t,(GYn(),Vpt)),15),c=uG(oIn(e,Vpt),15),r.Hc(e))return-1;if(c.Hc(t))return 1}return i}function PSn(n){switch(n.g){case 1:return new So;case 2:return new Po;case 3:return new Eo;case 0:return null;default:throw hv(new vM(k7n+(null!=n.f?n.f:""+n.g)))}}function CSn(n,t,e){switch(t){case 1:return!n.n&&(n.n=new fV(lFt,n,1,7)),Czn(n.n),!n.n&&(n.n=new fV(lFt,n,1,7)),void CW(n.n,uG(e,16));case 2:return void Gan(n,mK(e))}bln(n,t,e)}function ISn(n,t,e){switch(t){case 3:return void vcn(n,uM(pK(e)));case 4:return void kcn(n,uM(pK(e)));case 5:return void ycn(n,uM(pK(e)));case 6:return void Mcn(n,uM(pK(e)))}CSn(n,t,e)}function OSn(n,t,e){var i,r;(i=CCn(r=new ny,t,null))&&i.oj(),qon(r,e),ttn((!n.c&&(n.c=new fV(m_t,n,12,10)),n.c),r),Pcn(r,0),Ccn(r,1),mdn(r,!0),ddn(r,!0)}function ASn(n,t){var e,i;return F$(e=_P(n.i,t),241)?((i=uG(e,241)).zi(),i.wi()):F$(e,507)?i=uG(e,2037).b:null}function LSn(n,t,e,i){var r,c;return WW(t),WW(e),Ren(!!(c=uG(W_(n.d,t),17)),"Row %s not in %s",t,n.e),Ren(!!(r=uG(W_(n.b,e),17)),"Column %s not in %s",e,n.c),Hhn(n,c.a,r.a,i)}function NSn(n,t,e,i,r,c,a){var o,u,s,h,f;if(f=PTn(o=(s=c==a-1)?i:0,h=r[c]),10!=i&&Uhn(cT(n,a-c),t[c],e[c],o,f),!s)for(++c,u=0;u<h;++u)f[u]=NSn(n,t,e,i,r,c,a);return f}function $Sn(n){if(-1==n.g)throw hv(new xv);n.Xj();try{n.i.gd(n.g),n.f=n.i.j,n.g<n.e&&--n.e,n.g=-1}catch(t){throw F$(t=Ehn(t),77)?hv(new Fv):hv(t)}}function DSn(n){var t,e,i;for(i=-1,e=0,t=new Ww(n);t.a<t.c.c.length;){if(uG(N3(t),249).c==(can(),Vjt)){i=0==e?0:e-1;break}e==n.c.length-1&&(i=e),e+=1}return i}function xSn(n){var t,i,r,c;for(c=0,t=0,r=new Ww(n.c);r.a<r.c.c.length;)ycn(i=uG(N3(r),27),n.e+c),Mcn(i,n.f),c+=i.g+n.b,t=e.Math.max(t,i.f+n.b);n.d=c-n.b,n.a=t-n.b}function RSn(n){var t,e,i;for(e=new Ww(n.a.b);e.a<e.c.c.length;)i=(t=uG(N3(e),60)).d.c,t.d.c=t.d.d,t.d.d=i,i=t.d.b,t.d.b=t.d.a,t.d.a=i,i=t.b.a,t.b.a=t.b.b,t.b.b=i;hKn(n)}function KSn(n){var t,e,i;for(e=new Ww(n.a.b);e.a<e.c.c.length;)i=(t=uG(N3(e),86)).g.c,t.g.c=t.g.d,t.g.d=i,i=t.g.b,t.g.b=t.g.a,t.g.a=i,i=t.e.a,t.e.a=t.e.b,t.e.b=i;fKn(n)}function FSn(n){var t,e,i,r,c;for(c=kz(n.k),KQn(),i=0,r=(e=Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length;i<r;++i)if((t=e[i])!=FRt&&!c.Hc(t))return t;return null}function _Sn(n,t){var e,i;return(i=uG(Rx(lln(JJ(new fX(null,new h3(t.j,16)),new sc))),12))&&(e=uG(zq(i.e,0),18))?uG(oIn(e,(GYn(),imt)),17).a:Uen(n.b)}function BSn(n,t){var e,i,r;for(r=new Ww(t.a);r.a<r.c.c.length;)for(i=uG(N3(r),10),AM(n.d),e=new Fz(ix(Xgn(i).a.Kc(),new h));hDn(e);)B$n(n,i,uG(N9(e),18).d.i)}function HSn(n,t){var e,i;for(men(n.b,t),i=new Ww(n.n);i.a<i.c.c.length;)if(-1!=Ten((e=uG(N3(i),209)).c,t,0)){men(e.c,t),xSn(e),0==e.c.c.length&&men(n.n,e);break}EXn(n)}function USn(n,t){var i,r,c,a,o;for(o=n.f,c=0,a=0,r=new Ww(n.a);r.a<r.c.c.length;)oMn(i=uG(N3(r),172),n.e,o),dtn(i,t),a=e.Math.max(a,i.r),c=o+=i.d+n.c;n.d=a,n.b=c}function GSn(n){var t,e;return P6(e=tRn(n))?null:(WW(e),t=uG(KMn(new Fz(ix(e.a.Kc(),new h))),74),lCn(uG(zrn((!t.b&&(t.b=new f_(cFt,t,4,7)),t.b),0),84)))}function qSn(n){return n.o||(n.uk()?n.o=new EQ(n,n,null):n.al()?n.o=new sF(n,null):1==sJ(Nen((gAn(),kBt),n))?n.o=new o8(n):n.o=new hF(n,null)),n.o}function XSn(n,t,e,i){var r,c,a,o,u;e.Xh(t)&&(r=(a=t)?uG(i,54).gi(a):null)&&(u=e.Mh(t),(o=t.t)>1||-1==o?(c=uG(u,15),r.Wb(Vpn(n,c))):r.Wb(uUn(n,uG(u,58))))}function zSn(n,t,e,i){kE();var r=hZn;function c(){for(var n=0;n<r.length;n++)r[n]()}if(n)try{sUt(c)()}catch(a){n(t,a)}else sUt(c)()}function VSn(n,t){var e,i,r;for(r=new Kw(new Lw(n.b).a.vc().Kc());r.a.Ob();)if(e=uG(r.a.Pb(),44),i=uG(e.ld(),34),NL(t,uG(i,17))<0)return!1;return!0}function WSn(n,t){var e,i,r;for(r=new Kw(new Lw(n.b).a.vc().Kc());r.a.Ob();)if(e=uG(r.a.Pb(),44),i=uG(e.ld(),34),NL(t,uG(i,17))>0)return!1;return!0}function QSn(n){var t,e,i,r,c;for(i=new bsn(new Nw(n.b).a);i.b;)t=uG((e=von(i)).ld(),10),c=uG(uG(e.md(),42).a,10),r=uG(uG(e.md(),42).b,8),JF(dL(t.n),JF(D$(c.n),r))}function JSn(n){switch(uG(oIn(n.b,(jYn(),Jyt)),387).g){case 1:kS(YJ(sin(new fX(null,new h3(n.d,16)),new Vr),new Wr),new Qr);break;case 2:gBn(n);break;case 0:mLn(n)}}function YSn(n,t,e){var i,r,c;for(!(i=e)&&(i=new fy),i.Ug("Layout",n.a.c.length),c=new Ww(n.a);c.a<c.c.c.length;){if(r=uG(N3(c),47),i.$g())return;r.Kf(t,i.eh(1))}i.Vg()}function ZSn(){ZSn=E,ZNt=new SO("V_TOP",0),YNt=new SO("V_CENTER",1),JNt=new SO("V_BOTTOM",2),WNt=new SO("H_LEFT",3),VNt=new SO("H_CENTER",4),QNt=new SO("H_RIGHT",5)}function nPn(n){var t;return 64&n.Db?pmn(n):((t=new fx(pmn(n))).a+=" (abstract: ",Lj(t,!!(256&n.Bb)),t.a+=", interface: ",Lj(t,!!(512&n.Bb)),t.a+=")",t.a)}function tPn(n){var t;null==n.c&&(t=xA(n.b)===xA(Dat)?null:n.b,n.d=null==t?IZn:Pz(t)?ux(RY(t)):RA(t)?C1n:Ij(Tbn(t)),n.a=n.a+": "+(Pz(t)?EF(RY(t)):t+""),n.c="("+n.d+") "+n.a)}function ePn(){function n(){try{return(new Map).entries().next().done}catch(n){return!1}}return typeof Map===mZn&&Map.prototype.entries&&n()?Map:IQn()}function iPn(n,t){var e,i,r;for(r=new N4(n.e,0),e=0;r.b<r.d.gc();){if((i=uM((MK(r.b<r.d.gc()),pK(r.d.Xb(r.c=r.b++))))-t)>$9n)return e;i>-1e-6&&++e}return e}function rPn(n,t){var e;t!=n.b?(e=null,n.b&&(e=O1(n.b,n,-4,e)),t&&(e=kyn(t,n,-4,e)),(e=kwn(n,t,e))&&e.oj()):4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,3,t,t))}function cPn(n,t){var e;t!=n.f?(e=null,n.f&&(e=O1(n.f,n,-1,e)),t&&(e=kyn(t,n,-1,e)),(e=vwn(n,t,e))&&e.oj()):4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,0,t,t))}function aPn(n,t,e,i){var r,c,a;return uN(n.e)&&(a=VZ(n,1,r=t.Lk(),t.md(),c=e.md(),r.Jk()?Dqn(n,r,c,F$(r,102)&&!!(uG(r,19).Bb&P0n)):-1,!0),i?i.nj(a):i=a),i}function oPn(n){var t,e,i;if(null==n)return null;if((e=uG(n,15)).dc())return"";for(i=new zM,t=e.Kc();t.Ob();)VA(i,(uVn(),mK(t.Pb()))),i.a+=" ";return CL(i,i.a.length-1)}function uPn(n){var t,e,i;if(null==n)return null;if((e=uG(n,15)).dc())return"";for(i=new zM,t=e.Kc();t.Ob();)VA(i,(uVn(),mK(t.Pb()))),i.a+=" ";return CL(i,i.a.length-1)}function sPn(n,t,e){var i,r;return i=n.c[t.c.p][t.p],r=n.c[e.c.p][e.p],null!=i.a&&null!=r.a?Rz(i.a,r.a):null!=i.a?-1:null!=r.a?1:0}function hPn(n,t,e){return e.Ug("Tree layout",1),_J(n.b),JV(n.b,(Cjn(),zSt),zSt),JV(n.b,VSt,VSt),JV(n.b,WSt,WSt),JV(n.b,QSt,QSt),n.a=Qzn(n.b,t),YSn(n,t,e.eh(1)),e.Vg(),t}function fPn(n,t){var e,i,r;if(t)for(r=((e=new Gz(t.a.length)).b-e.a)*e.c<0?(CP(),XHt):new xD(e);r.Ob();)i=v6(t,uG(r.Pb(),17).a),QJ(new om(n).a,i)}function lPn(n,t){var e,i,r;if(t)for(r=((e=new Gz(t.a.length)).b-e.a)*e.c<0?(CP(),XHt):new xD(e);r.Ob();)i=v6(t,uG(r.Pb(),17).a),WJ(new Yp(n).a,i)}function bPn(n){if(null!=n&&n.length>0&&33==VJ(n,n.length-1))try{return null==sxn(r1(n,0,n.length-1)).e}catch(t){if(!F$(t=Ehn(t),33))throw hv(t)}return!1}function wPn(n,t,e){var i,r;switch(i=pgn(HQ(t)),o2(r=new lOn,t),e.g){case 1:NLn(r,Gdn(Ipn(i)));break;case 2:NLn(r,Ipn(i))}return kfn(r,(jYn(),QMt),pK(oIn(n,QMt))),r}function dPn(n){var t,e;return t=uG(N9(new Fz(ix(qgn(n.a).a.Kc(),new h))),18),e=uG(N9(new Fz(ix(Xgn(n.a).a.Kc(),new h))),18),oM(gK(oIn(t,(GYn(),pmt))))||oM(gK(oIn(e,pmt)))}function gPn(){gPn=E,wdt=new zC("ONE_SIDE",0),gdt=new zC("TWO_SIDES_CORNER",1),pdt=new zC("TWO_SIDES_OPPOSING",2),ddt=new zC("THREE_SIDES",3),bdt=new zC("FOUR_SIDES",4)}function pPn(n,t){var e,i,r,c;for(c=new Zm,r=0,i=t.Kc();i.Ob();){for(e=xwn(uG(i.Pb(),17).a+r);e.a<n.f&&!SX(n,e.a);)e=xwn(e.a+1),++r;if(e.a>=n.f)break;mv(c.c,e)}return c}function mPn(n,t){var e,i,r;for(i=new Ww(t.a);i.a<i.c.c.length;)for(e=new Fz(ix(qgn(uG(N3(i),10)).a.Kc(),new h));hDn(e);)r=uG(N9(e),18).c.i.p,n.n[r]=n.n[r]-1}function vPn(n){var t;for(t=new Ww(n.e.b);t.a<t.c.c.length;)AWn(n,uG(N3(t),30));kS(JJ(sin(sin(new fX(null,new h3(n.e.b,16)),new qc),new Jc),new Yc),new dp(n))}function kPn(n,t){return!!t&&!n.mj(t)&&(n.i?n.i.nj(t):F$(t,152)?(n.i=uG(t,152),!0):(n.i=new bs,n.i.nj(t)))}function yPn(n,t,e){var i,r,c;return i=t.Lk(),c=t.md(),r=i.Jk()?VZ(n,3,i,null,c,Dqn(n,i,c,F$(i,102)&&!!(uG(i,19).Bb&P0n)),!0):VZ(n,1,i,i.ik(),c,-1,!0),e?e.nj(r):e=r,e}function MPn(n){if(n=yXn(n,!0),m_(Fnt,n)||m_("1",n))return qx(),eot;if(m_(_nt,n)||m_("0",n))return qx(),tot;throw hv(new PM("Invalid boolean value: '"+n+"'"))}function TPn(n,t,e){var i,r,c;for(r=n.vc().Kc();r.Ob();)if(c=(i=uG(r.Pb(),44)).ld(),xA(t)===xA(c)||null!=t&&udn(t,c))return e&&(i=new VP(i.ld(),i.md()),r.Qb()),i;return null}function jPn(n){var t,e,i;VK(),n.B.Hc((oUn(),tKt))&&(i=n.f.i,t=new qZ(n.a.c),(e=new Dk).b=t.c-i.c,e.d=t.d-i.d,e.c=i.c+i.b-(t.c+t.b),e.a=i.d+i.a-(t.d+t.a),n.e.$f(e))}function EPn(n,t,i,r){var c,a,o;for(o=e.Math.min(i,uqn(uG(n.b,68),t,i,r)),a=new Ww(n.a);a.a<a.c.c.length;)(c=uG(N3(a),225))!=t&&(o=e.Math.min(o,EPn(c,t,o,r)));return o}function SPn(n){var t,e,i;for(i=Inn(pbt,zZn,199,n.b.c.length,0,2),e=new N4(n.b,0);e.b<e.d.gc();)MK(e.b<e.d.gc()),t=uG(e.d.Xb(e.c=e.b++),30),i[e.b-1]=D4(t.a);return i}function PPn(n,t,e){var i,r;null!=(i=uG(ain(n.a,e),34))&&Wpn(uG(ain(n.b,i),67),e,!0),(r=uG(ain(n.b,t),67))||(r=new lS,Akn(n.b,t,r)),s8(r,e,r.c.b,r.c),Akn(n.a,e,t)}function CPn(n,t,e,i,r){var c,a,o,u;for(a=jT(TT(BB(Ryn(e)),i),Ujn(n,e,r)),u=yOn(n,e).Kc();u.Ob();)t[(o=uG(u.Pb(),12)).p]&&(c=t[o.p].i,kD(a.d,new ZX(c,Hdn(a,c))));cmn(a)}function IPn(n,t){this.f=new Ym,this.b=new Ym,this.j=new Ym,this.a=n,this.c=t,this.c>0&&Mjn(this,this.c-1,(KQn(),kRt)),this.c<this.a.length-1&&Mjn(this,this.c+1,(KQn(),_Rt))}function OPn(n,t){var e,i,r,c;for(r=new Ww(t.d);r.a<r.c.c.length;)for(i=uG(N3(r),105),c=uG(cQ(n.c,i),118).o,e=new fS(i.b);e.a<e.c.a.length;)ctn(i,uG(X5(e),64),c)}function APn(n){n.length>0&&n[0].length>0&&(this.c=oM(gK(oIn(HQ(n[0][0]),(GYn(),Wpt))))),this.a=Inn(REt,zZn,2117,n.length,0,2),this.b=Inn(UEt,zZn,2118,n.length,0,2),this.d=new zbn}function LPn(n){return 0!=n.c.length&&((u3(0,n.c.length),uG(n.c[0],18)).c.i.k==(zIn(),wbt)||o9(YJ(new fX(null,new h3(n,16)),new xc),new Rc))}function NPn(n,t){var i,r,c,a,o,u;for(o=GFn(t),c=t.f,u=t.g,a=e.Math.sqrt(c*c+u*u),r=0,i=new Ww(o);i.a<i.c.c.length;)r+=NPn(n,uG(N3(i),27));return e.Math.max(r,a)}function $Pn(){$Pn=E,sRt=new DO(Y2n,0),uRt=new DO("FREE",1),oRt=new DO("FIXED_SIDE",2),rRt=new DO("FIXED_ORDER",3),aRt=new DO("FIXED_RATIO",4),cRt=new DO("FIXED_POS",5)}function DPn(n,t){var e,i,r;if(e=t.qi(n.a))for(r=mK(Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),hct)),i=1;i<(gAn(),yBt).length;++i)if(m_(yBt[i],r))return i;return 0}function xPn(n){var t,e,i,r;if(null==n)return IZn;for(r=new Ysn(TZn,"[","]"),e=0,i=(t=n).length;e<i;++e)o7(r,""+t[e]);return r.a?0==r.e.length?r.a.a:r.a.a+""+r.e:r.c}function RPn(n){var t,e,i,r;if(null==n)return IZn;for(r=new Ysn(TZn,"[","]"),e=0,i=(t=n).length;e<i;++e)o7(r,""+t[e]);return r.a?0==r.e.length?r.a.a:r.a.a+""+r.e:r.c}function KPn(n){var t,e,i;for(i=new Ysn(TZn,"{","}"),e=n.vc().Kc();e.Ob();)o7(i,E5(n,(t=uG(e.Pb(),44)).ld())+"="+E5(n,t.md()));return i.a?0==i.e.length?i.a.a:i.a.a+""+i.e:i.c}function FPn(n){for(var t,e,i,r;!LM(n.o);)e=uG(xV(n.o),42),i=uG(e.a,125),r=hpn(t=uG(e.b,218),i),t.e==i?(Sx(r.g,t),i.e=r.e+t.a):(Sx(r.b,t),i.e=r.e-t.a),kD(n.e.a,i)}function _Pn(n,t){var e,i,r;for(e=null,r=uG(t.Kb(n),20).Kc();r.Ob();)if(i=uG(r.Pb(),18),e){if((i.c.i==n?i.d.i:i.c.i)!=e)return!1}else e=i.c.i==n?i.d.i:i.c.i;return!0}function BPn(n,t){var e,i,r;for(i=new Ww(sRn(n,!1,t));i.a<i.c.c.length;)0==(e=uG(N3(i),132)).d?(s2(e,null),h2(e,null)):(r=e.a,s2(e,e.b),h2(e,r))}function HPn(n){var t,e;return gsn(t=new wJ,KSt),(e=uG(oIn(n,(GYn(),Hpt)),21)).Hc((r_n(),opt))&&gsn(t,HSt),e.Hc(Ygt)&&gsn(t,FSt),e.Hc(cpt)&&gsn(t,BSt),e.Hc(npt)&&gsn(t,_St),t}function UPn(n,t,e){var i,r,c,a;for(String.fromCharCode(10),Lpn(n),null==n.k&&(n.k=Inn(xat,zZn,82,0,0,1)),r=0,c=(i=n.k).length;r<c;++r)UPn(i[r],t,"\t"+e);(a=n.f)&&UPn(a,t,e)}function GPn(n){var t,e,i,r;for(Wzn(n),e=new Fz(ix(Ggn(n).a.Kc(),new h));hDn(e);)r=(i=(t=uG(N9(e),18)).c.i==n)?t.d:t.c,i?u2(t,null):c2(t,null),kfn(t,(GYn(),umt),r),nDn(n,r.i)}function qPn(n,t,e,i){var r,c;switch(r=e[(c=t.i).g][n.d[c.g]],c.g){case 1:r-=i+t.j.b,t.g.b=r;break;case 3:r+=i,t.g.b=r;break;case 4:r-=i+t.j.a,t.g.a=r;break;case 2:r+=i,t.g.a=r}}function XPn(n){var t,e;for(e=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));e.e!=e.i.gc();)if(!hDn(new Fz(ix(tRn(t=uG(Zkn(e),27)).a.Kc(),new h))))return t;return null}function zPn(){zPn=E,tIt=new ZI("OVERLAP_REMOVAL",0),YCt=new ZI(g7n,1),eIt=new ZI("ROTATION",2),ZCt=new ZI("GRAPH_SIZE_CALCULATION",3),nIt=new ZI("OUTGOING_EDGE_ANGLES",4)}function VPn(){var n;return dFt?uG(jxn((MP(),l_t),aet),2115):(n=uG(F$(U1((MP(),l_t),aet),569)?U1(l_t,aet):new iDn,569),dFt=!0,iWn(n),cZn(n),ojn(n),r2(l_t,aet,n),n)}function WPn(n,t,e){var i,r;if(0==n.j)return e;if(r=uG(Dcn(n,t,e),76),!(i=e.Lk()).rk()||!n.a.am(i))throw hv(new Ky("Invalid entry feature '"+i.qk().zb+"."+i.xe()+"'"));return r}function QPn(n,t){var e,i,r,c,a,o,u;for(o=0,u=(a=n.a).length;o<u;++o)for(r=0,c=(i=a[o]).length;r<c;++r)if(e=i[r],xA(t)===xA(e)||null!=t&&udn(t,e))return!0;return!1}function JPn(n){var t,e,i;return dwn(n,0)>=0?(e=bSn(n,g0n),i=Kmn(n,g0n)):(e=bSn(t=Dz(n,1),5e8),i=Lgn(Nz(i=Kmn(t,5e8),1),E3(n,1))),S3(Nz(i,32),E3(e,L0n))}function YPn(n,t,e){var i;switch(MK(0!=t.b),i=uG(Lrn(t,t.a.a),8),e.g){case 0:i.b=0;break;case 2:i.b=n.f;break;case 3:i.a=0;break;default:i.a=n.g}return lW(Fkn(t,0),i),t}function ZPn(n,t,e,i){var r,c,a,o,u;switch(u=n.b,o=ykn(a=(c=t.d).j,u.d[a.g],e),r=JF(D$(c.n),c.a),c.j.g){case 1:case 3:o.a+=r.a;break;case 2:case 4:o.b+=r.b}s8(i,o,i.c.b,i.c)}function nCn(n,t,e){var i,r,c,a;for(a=Ten(n.e,t,0),(c=new Tk).b=e,i=new N4(n.e,a);i.b<i.d.gc();)MK(i.b<i.d.gc()),(r=uG(i.d.Xb(i.c=i.b++),10)).p=e,kD(c.e,r),LQ(i);return c}function tCn(n,t,e,i){var r,c,a,o,u;for(r=null,c=0,o=new Ww(t);o.a<o.c.c.length;)u=(a=uG(N3(o),27)).i+a.g,n<a.j+a.f+i&&(r?e.i-u<e.i-c&&(r=a):r=a,c=r.i+r.g);return r?c+i:0}function eCn(n,t,e,i){var r,c,a,o,u;for(c=null,r=0,o=new Ww(t);o.a<o.c.c.length;)u=(a=uG(N3(o),27)).j+a.f,n<a.i+a.g+i&&(c?e.j-u<e.j-r&&(c=a):c=a,r=c.j+c.f);return c?r+i:0}function iCn(n){var t,e,i;for(t=!1,i=n.b.c.length,e=0;e<i;e++)Jfn(uG(zq(n.b,e),443))?!t&&e+1<i&&Jfn(uG(zq(n.b,e+1),443))&&(t=!0,uG(zq(n.b,e),443).a=!0):t=!1}function rCn(n,t,e,i,r){var c,a;for(c=0,a=0;a<r;a++)c=Lgn(c,$gn(E3(t[a],L0n),E3(i[a],L0n))),n[a]=pz(c),c=$z(c,32);for(;a<e;a++)c=Lgn(c,E3(t[a],L0n)),n[a]=pz(c),c=$z(c,32)}function cCn(n,t){var e,i;for(b_n(),cHn(),i=xot,e=n;t>1;t>>=1)1&t&&(i=j5(i,e)),e=1==e.d?j5(e,e):new nkn(_Un(e.a,e.d,Inn(YHt,W1n,28,e.d<<1,15,1)));return i=j5(i,e)}function aCn(){var n,t,e,i;for(aCn=E,but=Inn(eUt,I0n,28,25,15,1),wut=Inn(eUt,I0n,28,33,15,1),i=152587890625e-16,t=32;t>=0;t--)wut[t]=i,i*=.5;for(e=1,n=24;n>=0;n--)but[n]=e,e*=.5}function oCn(n){var t,e;if(oM(gK(zDn(n,(jYn(),sMt)))))for(e=new Fz(ix(eRn(n).a.Kc(),new h));hDn(e);)if(BNn(t=uG(N9(e),74))&&oM(gK(zDn(t,hMt))))return!0;return!1}function uCn(n,t){var e,i,r;FV(n.f,t)&&(t.b=n,i=t.c,-1!=Ten(n.j,i,0)||kD(n.j,i),r=t.d,-1!=Ten(n.j,r,0)||kD(n.j,r),0!=(e=t.a.b).c.length&&(!n.i&&(n.i=new vkn(n)),Psn(n.i,e)))}function sCn(n){var t,e,i,r;return(e=(t=n.c.d).j)==(r=(i=n.d.d).j)?t.p<i.p?0:1:qdn(e)==r?0:Udn(e)==r?1:$x(n.b.b,qdn(e))?0:1}function hCn(n){var t;this.d=new Ym,this.c=n.c,this.e=n.d,this.b=n.b,this.f=new LX(n.e),this.a=n.a,n.f?this.g=n.f:this.g=new nB(t=uG(Mj(PFt),9),uG(MF(t,t.length),9),0)}function fCn(n,t){var e,i,r,c;!(r=m6(i=n,"layoutOptions"))&&(r=m6(i,het)),r&&(e=null,(c=r)&&(e=new JE(c,Yon(c,Inn($ot,zZn,2,0,6,1)))),e&&z8(e,new rA(c,t)))}function lCn(n){if(F$(n,207))return uG(n,27);if(F$(n,193))return h0(uG(n,123));throw hv(n?new TM("Only support nodes and ports."):new MM(Het))}function bCn(n,t,e,i){return t>=0&&m_(n.substr(t,3),"GMT")||t>=0&&m_(n.substr(t,3),"UTC")?(e[0]=t+3,PUn(n,e,i)):PUn(n,e,i)}function wCn(n,t){var e,i,r,c,a;for(c=n.g.a,a=n.g.b,i=new Ww(n.d);i.a<i.c.c.length;)(r=(e=uG(N3(i),72)).n).a=c,n.i==(KQn(),yRt)?r.b=a+n.j.b-e.o.b:r.b=a,JF(r,t),c+=e.o.a+n.e}function dCn(n,t,e){if(n.b)throw hv(new kM("The task is already done."));return null==n.p&&(n.p=t,n.r=e,n.k&&(n.o=(bS(),Ngn(Bsn(Date.now()),$1n))),!0)}function gCn(n){var t;return t=new _y,null!=n.Pg()&&ZG(t,Iet,n.Pg()),null!=n.xe()&&ZG(t,Bet,n.xe()),null!=n.Og()&&ZG(t,"description",n.Og()),t}function pCn(n,t,e){var i,r,c;return c=n.q,n.q=t,4&n.Db&&!(1&n.Db)&&(r=new lV(n,1,9,c,t),e?e.nj(r):e=r),t?(i=t.c)!=n.r&&(e=n.Yk(i,e)):n.r&&(e=n.Yk(null,e)),e}function mCn(n,t,e){var i,r;for(e=kyn(t,n.e,-1-n.c,e),r=new Gm(new bsn(new Nw(uJ(n.a).a).a));r.a.b;)e=PWn(i=uG(von(r.a).ld(),89),bRn(i,n.a),e);return e}function vCn(n,t,e){var i,r;for(e=O1(t,n.e,-1-n.c,e),r=new Gm(new bsn(new Nw(uJ(n.a).a).a));r.a.b;)e=PWn(i=uG(von(r.a).ld(),89),bRn(i,n.a),e);return e}function kCn(n,t,e,i){var r,c,a;if(0==i)qGn(t,0,n,e,n.length-e);else for(a=32-i,n[n.length-1]=0,c=n.length-1;c>e;c--)n[c]|=t[c-e-1]>>>a,n[c-1]=t[c-e-1]<<i;for(r=0;r<e;r++)n[r]=0}function yCn(n){var t,i,r,c,a;for(t=0,i=0,a=n.Kc();a.Ob();)r=uG(a.Pb(),117),t=e.Math.max(t,r.d.b),i=e.Math.max(i,r.d.c);for(c=n.Kc();c.Ob();)(r=uG(c.Pb(),117)).d.b=t,r.d.c=i}function MCn(n){var t,i,r,c,a;for(i=0,t=0,a=n.Kc();a.Ob();)r=uG(a.Pb(),117),i=e.Math.max(i,r.d.d),t=e.Math.max(t,r.d.a);for(c=n.Kc();c.Ob();)(r=uG(c.Pb(),117)).d.d=i,r.d.a=t}function TCn(n,t,e,i,r){var c,a;_An(c=uG(l8(JJ(t.Oc(),new _r),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15)),a=uG(ssn(n.b,e,i),15),0==r?a.cd(0,c):a.Gc(c)}function jCn(n,t,e){e.Ug("Grow Tree",1),n.b=t.f,oM(gK(oIn(t,(rsn(),Oht))))?(n.c=new et,f2(n,null)):n.c=new et,n.a=!1,AKn(n,t.f),kfn(t,Aht,(qx(),!!n.a)),e.Vg()}function ECn(n){var t,e,i,r;for(t=null,r=new Ww(n.Rf());r.a<r.c.c.length;)e=new gY((i=uG(N3(r),187)).Lf().a,i.Lf().b,i.Mf().a,i.Mf().b),t?bAn(t,e):t=e;return!t&&(t=new cN),t}function SCn(n,t,e,i){return 1==e?(!n.n&&(n.n=new fV(lFt,n,1,7)),Nmn(n.n,t,i)):uG(ern(uG(Lsn(n,16),29)||n.ii(),e),69).wk().zk(n,$vn(n),e-iQ(n.ii()),t,i)}function PCn(n,t,e){var i,r,c,a,o;for(i=e.gc(),n._i(n.i+i),(o=n.i-t)>0&&qGn(n.g,t,n.g,t+i,o),a=e.Kc(),n.i+=i,r=0;r<i;++r)c=a.Pb(),yD(n,t,n.Zi(t,c)),n.Mi(t,c),n.Ni(),++t;return 0!=i}function CCn(n,t,e){var i;return t!=n.q?(n.q&&(e=O1(n.q,n,-10,e)),t&&(e=kyn(t,n,-10,e)),e=pCn(n,t,e)):4&n.Db&&!(1&n.Db)&&(i=new lV(n,1,9,t,t),e?e.nj(i):e=i),e}function ICn(n,t,e,i){return CB(!(e&VZn),"flatMap does not support SUBSIZED characteristic"),CB(!(4&e),"flatMap does not support SORTED characteristic"),WW(n),WW(t),new T6(n,t,e,i)}function OCn(n,t){aW(t,"Cannot suppress a null exception."),vG(t!=n,"Exception can not suppress itself."),n.i||(null==n.k?n.k=Uhn(cT(xat,1),zZn,82,0,[t]):n.k[n.k.length]=t)}function ACn(n,t){var e;if(0!=(e=UL(n.b.ag(),t.b.ag())))return e;switch(n.b.ag().g){case 1:case 2:return d$(n.b.Nf(),t.b.Nf());case 3:case 4:return d$(t.b.Nf(),n.b.Nf())}return 0}function LCn(n){var t,e,i;for(i=n.e.c.length,n.a=Jq(YHt,[zZn,W1n],[53,28],15,[i,i],2),e=new Ww(n.c);e.a<e.c.c.length;)t=uG(N3(e),290),n.a[t.c.a][t.d.a]+=uG(oIn(t,(cGn(),$ft)),17).a}function NCn(n,t){var e,i,r,c,a;if(null==n)return null;for(a=Inn(JHt,N1n,28,2*t,15,1),i=0,r=0;i<t;++i)e=n[i]>>4&15,c=15&n[i],a[r++]=JKt[e],a[r++]=JKt[c];return mvn(a,0,a.length)}function $Cn(n){var t,e;return n>=P0n?(t=C0n+(n-P0n>>10&1023)&D1n,e=56320+(n-P0n&1023)&D1n,String.fromCharCode(t)+""+String.fromCharCode(e)):String.fromCharCode(n&D1n)}function DCn(n,t){var e,i,r,c;return VK(),(r=uG(uG(Y9(n.r,t),21),87)).gc()>=2&&(i=uG(r.Kc().Pb(),117),e=n.u.Hc((eNn(),bRt)),c=n.u.Hc(pRt),!i.a&&!e&&(2==r.gc()||c))}function xCn(n,t,e,i,r){var c,a,o;for(c=zFn(n,t,e,i,r),o=!1;!c;)gxn(n,r,!0),o=!0,c=zFn(n,t,e,i,r);o&&gxn(n,r,!1),0!=(a=Jhn(r)).c.length&&(n.d&&n.d.Gg(a),xCn(n,r,e,i,a))}function RCn(){RCn=E,mxt=new OO(q4n,0),gxt=new OO("DIRECTED",1),vxt=new OO("UNDIRECTED",2),wxt=new OO("ASSOCIATION",3),pxt=new OO("GENERALIZATION",4),dxt=new OO("DEPENDENCY",5)}function KCn(n,t){var e;if(!h0(n))throw hv(new kM(Stt));switch(e=h0(n),t.g){case 1:return-(n.j+n.f);case 2:return n.i-e.g;case 3:return n.j-e.f;case 4:return-(n.i+n.g)}return 0}function FCn(n,t,e){var i,r,c;return i=t.Lk(),c=t.md(),r=i.Jk()?VZ(n,4,i,c,null,Dqn(n,i,c,F$(i,102)&&!!(uG(i,19).Bb&P0n)),!0):VZ(n,i.tk()?2:1,i,c,i.ik(),-1,!0),e?e.nj(r):e=r,e}function _Cn(n,t){var e,i;for(tJ(t),i=n.b.c.length,kD(n.b,t);i>0;){if(e=i,i=(i-1)/2|0,n.a.Ne(zq(n.b,i),t)<=0)return Y8(n.b,e,t),!0;Y8(n.b,e,zq(n.b,i))}return Y8(n.b,i,t),!0}function BCn(n,t,i,r){var c,a;if(c=0,i)c=$bn(n.a[i.g][t.g],r);else for(a=0;a<$st;a++)c=e.Math.max(c,$bn(n.a[a][t.g],r));return t==(Yrn(),Est)&&n.b&&(c=e.Math.max(c,n.b.a)),c}function HCn(n,t){var e,i,r,c,a;return i=n.i,r=t.i,!(!i||!r)&&i.i==r.i&&i.i!=(KQn(),kRt)&&i.i!=(KQn(),_Rt)&&(e=(c=i.g.a)+i.j.a,c<=(a=r.g.a)+r.j.a&&e>=a)}function UCn(n){switch(n.g){case 0:return new Uo;case 1:return new qo;default:throw hv(new vM("No implementation is available for the width approximator "+(null!=n.f?n.f:""+n.g)))}}function GCn(n,t,e,i){var r;if(r=!1,RA(i)&&(r=!0,ZG(t,e,mK(i))),r||KA(i)&&(r=!0,GCn(n,t,e,i)),r||F$(i,242)&&(r=!0,vZ(t,e,uG(i,242))),!r)throw hv(new pM(Cet))}function qCn(n,t){var e,i,r;if((e=t.qi(n.a))&&null!=(r=Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),Srt)))for(i=1;i<(gAn(),mBt).length;++i)if(m_(mBt[i],r))return i;return 0}function XCn(n,t){var e,i,r;if((e=t.qi(n.a))&&null!=(r=Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),Srt)))for(i=1;i<(gAn(),vBt).length;++i)if(m_(vBt[i],r))return i;return 0}function zCn(n,t){var e,i,r,c;if(tJ(t),(c=n.a.gc())<t.gc())for(e=n.a.ec().Kc();e.Ob();)i=e.Pb(),t.Hc(i)&&e.Qb();else for(r=t.Kc();r.Ob();)i=r.Pb(),n.a.Bc(i);return c!=n.a.gc()}function VCn(n){var t,e;switch(e=D$(Gfn(Uhn(cT(PNt,1),zZn,8,0,[n.i.n,n.n,n.a]))),t=n.i.d,n.j.g){case 1:e.b-=t.d;break;case 2:e.a+=t.c;break;case 3:e.b+=t.a;break;case 4:e.a-=t.b}return e}function WCn(n){var t;for(Pun(),t=uG(N9(new Fz(ix(qgn(n).a.Kc(),new h))),18).c.i;t.k==(zIn(),wbt);)kfn(t,(GYn(),Jpt),(qx(),!0)),t=uG(N9(new Fz(ix(qgn(t).a.Kc(),new h))),18).c.i}function QCn(n,t,e,i){var r,c,a;for(a=Vwn(t,i).Kc();a.Ob();)r=uG(a.Pb(),12),n.d[r.p]=n.d[r.p]+n.c[e.p];for(c=Vwn(e,i).Kc();c.Ob();)r=uG(c.Pb(),12),n.d[r.p]=n.d[r.p]-n.c[t.p]}function JCn(n,t,e){var i,r;for(r=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));r.e!=r.i.gc();)kN(i=uG(Zkn(r),27),i.i+t,i.j+e);z8((!n.b&&(n.b=new fV(aFt,n,12,3)),n.b),new XO(t,e))}function YCn(n,t,e,i){var r,c;for(r=null==(c=t).d||n.a.Ne(e.d,c.d)>0?1:0;c.a[r]!=e;)c=c.a[r],r=n.a.Ne(e.d,c.d)>0?1:0;c.a[r]=i,i.b=e.b,i.a[0]=e.a[0],i.a[1]=e.a[1],e.a[0]=null,e.a[1]=null}function ZCn(n){var t,e,i,r;for(t=new Zm,zV(e=Inn(ZHt,B2n,28,n.a.c.length,16,1),e.length),r=new Ww(n.a);r.a<r.c.c.length;)e[(i=uG(N3(r),125)).d]||(mv(t.c,i),Okn(n,i,e));return t}function nIn(n,t){var e,i,r,c;for(i=(1==t?$lt:Nlt).a.ec().Kc();i.Ob();)for(e=uG(i.Pb(),88),c=uG(Y9(n.f.c,e),21).Kc();c.Ob();)r=uG(c.Pb(),42),men(n.b.b,r.b),men(n.b.a,uG(r.b,86).d)}function tIn(n,t){var e;t.Ug("Hierarchical port position processing",1),(e=n.b).c.length>0&&lUn((u3(0,e.c.length),uG(e.c[0],30)),n),e.c.length>1&&lUn(uG(zq(e,e.c.length-1),30),n),t.Vg()}function eIn(n){return eNn(),!(qsn(X1(WX(wRt,Uhn(cT(BRt,1),p1n,279,0,[gRt])),n))>1||qsn(X1(WX(bRt,Uhn(cT(BRt,1),p1n,279,0,[lRt,pRt])),n))>1)}function iIn(n,t){F$(U1((MP(),l_t),n),507)?r2(l_t,n,new EA(this,t)):r2(l_t,n,this),HIn(this,t),t==(vj(),y_t)?(this.wb=uG(this,2038),uG(t,2040)):this.wb=(tQ(),M_t)}function rIn(n){var t,e;if(null==n)return null;for(t=null,e=0;e<QKt.length;++e)try{return dP(QKt[e],n)}catch(i){if(!F$(i=Ehn(i),33))throw hv(i);t=i}throw hv(new Pen(t))}function cIn(){cIn=E,nut=Uhn(cT($ot,1),zZn,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),tut=Uhn(cT($ot,1),zZn,2,6,["Jan","Feb","Mar","Apr",_1n,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])}function aIn(n){var t,e,i;(t=m_(typeof t,r2n)?null:new fn)&&(pS(),mQ(e=(i=900)>=$1n?"error":i>=900?"warn":i>=800?"info":"log",n.a),n.b&&SKn(t,e,n.b,"Exception: ",!0))}function oIn(n,t){var e,i;return!n.q&&(n.q=new Ym),null!=(i=cQ(n.q,t))?i:(F$(e=t.Sg(),4)&&(null==e?(!n.q&&(n.q=new Ym),u7(n.q,t)):(!n.q&&(n.q=new Ym),vJ(n.q,t,e))),e)}function uIn(){uIn=E,Tlt=new gC("P1_CYCLE_BREAKING",0),jlt=new gC("P2_LAYERING",1),Elt=new gC("P3_NODE_ORDERING",2),Slt=new gC("P4_NODE_PLACEMENT",3),Plt=new gC("P5_EDGE_ROUTING",4)}function sIn(n,t){var e;if(Win(),n.c==t.c){if(n.b==t.b||eun(n.b,t.b)){if(e=BL(n.b)?1:-1,n.a&&!t.a)return e;if(!n.a&&t.a)return-e}return d$(n.b.g,t.b.g)}return ugn(n.c,t.c)}function hIn(n,t){var e,i;if(kIn(n,t))return!0;for(i=new Ww(t);i.a<i.c.c.length;){if(p_n(n,e=uG(N3(i),27),GSn(e)))return!0;if(Zbn(n,e)-n.g<=n.a)return!0}return!1}function fIn(){fIn=E,uBn(),yLt=RLt,mLt=NLt,pLt=ALt,dLt=PLt,gLt=ILt,wLt=new CN(8),bLt=new _N((XYn(),W$t),wLt),vLt=new _N(DDt,8),kLt=DLt,hLt=MLt,fLt=jLt,lLt=new _N(w$t,(qx(),!1))}function lIn(){lIn=E,qNt=new CN(15),GNt=new _N((XYn(),W$t),qNt),zNt=new _N(DDt,15),XNt=new _N(vDt,xwn(0)),FNt=j$t,BNt=_$t,UNt=q$t,xNt=new _N(c$t,Gnt),_Nt=O$t,HNt=U$t,RNt=o$t,KNt=l$t}function bIn(n){if(1!=(!n.b&&(n.b=new f_(cFt,n,4,7)),n.b).i||1!=(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c).i)throw hv(new vM(Get));return lCn(uG(zrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84))}function wIn(n){if(1!=(!n.b&&(n.b=new f_(cFt,n,4,7)),n.b).i||1!=(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c).i)throw hv(new vM(Get));return Shn(uG(zrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84))}function dIn(n){if(1!=(!n.b&&(n.b=new f_(cFt,n,4,7)),n.b).i||1!=(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c).i)throw hv(new vM(Get));return Shn(uG(zrn((!n.c&&(n.c=new f_(cFt,n,5,8)),n.c),0),84))}function gIn(n){if(1!=(!n.b&&(n.b=new f_(cFt,n,4,7)),n.b).i||1!=(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c).i)throw hv(new vM(Get));return lCn(uG(zrn((!n.c&&(n.c=new f_(cFt,n,5,8)),n.c),0),84))}function pIn(n,t,e){var i,r,c;if(++n.j,t>=(r=n.Ej())||t<0)throw hv(new dM(zet+t+Vet+r));if(e>=r||e<0)throw hv(new dM(Wet+e+Vet+r));return t!=e?(c=n.Cj(e),n.qj(t,c),i=c):i=n.xj(e),i}function mIn(n){var t,e,i;if(i=n,n)for(t=0,e=n.Eh();e;e=e.Eh()){if(++t>O0n)return mIn(e);if(i=e,e==n)throw hv(new kM("There is a cycle in the containment hierarchy of "+n))}return i}function vIn(n){var t,e,i;for(i=new Ysn(TZn,"[","]"),e=n.Kc();e.Ob();)o7(i,xA(t=e.Pb())===xA(n)?"(this Collection)":null==t?IZn:cpn(t));return i.a?0==i.e.length?i.a.a:i.a.a+""+i.e:i.c}function kIn(n,t){var e,i;if(i=!1,t.gc()<2)return!1;for(e=0;e<t.gc();e++)e<t.gc()-1?i|=p_n(n,uG(t.Xb(e),27),uG(t.Xb(e+1),27)):i|=p_n(n,uG(t.Xb(e),27),uG(t.Xb(0),27));return i}function yIn(n,t){var e;t!=n.a?(e=null,n.a&&(e=uG(n.a,54).Th(n,4,fFt,e)),t&&(e=uG(t,54).Rh(n,4,fFt,e)),(e=ywn(n,t,e))&&e.oj()):4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,1,t,t))}function MIn(n,t){var e;t!=n.e?(n.e&&C7(uJ(n.e),n),t&&(!t.b&&(t.b=new Um(new ty)),WF(t.b,n)),(e=$En(n,t,null))&&e.oj()):4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,4,t,t))}function TIn(n,t){var i;i=t.o,hN(n.f)?(n.j.a=e.Math.max(n.j.a,i.a),n.j.b+=i.b,n.d.c.length>1&&(n.j.b+=n.e)):(n.j.a+=i.a,n.j.b=e.Math.max(n.j.b,i.b),n.d.c.length>1&&(n.j.a+=n.e))}function jIn(){jIn=E,ydt=Uhn(cT(YRt,1),z4n,64,0,[(KQn(),yRt),kRt,KRt]),kdt=Uhn(cT(YRt,1),z4n,64,0,[kRt,KRt,_Rt]),Mdt=Uhn(cT(YRt,1),z4n,64,0,[KRt,_Rt,yRt]),Tdt=Uhn(cT(YRt,1),z4n,64,0,[_Rt,yRt,kRt])}function EIn(n,t,e,i){var r,c,a,o,u;if(c=n.c.d,a=n.d.d,c.j!=a.j)for(u=n.b,r=c.j,o=null;r!=a.j;)o=0==t?qdn(r):Udn(r),aq(i,JF(ykn(r,u.d[r.g],e),ykn(o,u.d[o.g],e))),r=o}function SIn(n,t,e,i){var r,c,a,o,u;return o=uG((a=Sjn(n.a,t,e)).a,17).a,c=uG(a.b,17).a,i&&(u=uG(oIn(t,(GYn(),lmt)),10),r=uG(oIn(e,lmt),10),u&&r&&(C5(n.b,u,r),o+=n.b.i,c+=n.b.e)),o>c}function PIn(n){var t,e,i,r,c,a,o,u;for(this.a=Fyn(n),this.b=new Zm,i=0,r=(e=n).length;i<r;++i)for(t=e[i],c=new Zm,kD(this.b,c),o=0,u=(a=t).length;o<u;++o)kD(c,new Z_(a[o].j))}function CIn(n,t,e){var i,r,c;return c=0,i=e[t],t<e.length-1&&(r=e[t+1],n.b[t]?(c=WYn(n.d,i,r),c+=kQ(n.a,i,(KQn(),kRt)),c+=kQ(n.a,r,_Rt)):c=ktn(n.a,i,r)),n.c[t]&&(c+=k7(n.a,i)),c}function IIn(n,t,e,i,r){var c,a,o,u;for(u=null,o=new Ww(i);o.a<o.c.c.length;)if((a=uG(N3(o),453))!=e&&-1!=Ten(a.e,r,0)){u=a;break}c2(c=K9(r),e.b),u2(c,u.b),UNn(n.a,r,new $B(c,t,e.f))}function OIn(n){var t,i,r,c;if(fN(uG(oIn(n.b,(jYn(),Byt)),88)))return 0;for(t=0,r=new Ww(n.a);r.a<r.c.c.length;)(i=uG(N3(r),10)).k==(zIn(),dbt)&&(c=i.o.a,t=e.Math.max(t,c));return t}function AIn(n){for(;0!=n.g.c&&0!=n.d.c;)GK(n.g).c>GK(n.d).c?(n.i+=n.g.c,Bmn(n.d)):GK(n.d).c>GK(n.g).c?(n.e+=n.d.c,Bmn(n.g)):(n.i+=TX(n.g),n.e+=TX(n.d),Bmn(n.g),Bmn(n.d))}function LIn(n,t,e){var i,r,c,a;for(c=t.q,a=t.r,new A2((_7(),$St),t,c,1),new A2($St,c,a,1),r=new Ww(e);r.a<r.c.c.length;)(i=uG(N3(r),118))!=c&&i!=t&&i!=a&&(OXn(n.a,i,t),OXn(n.a,i,a))}function NIn(n,t,i,r){n.a.d=e.Math.min(t,i),n.a.a=e.Math.max(t,r)-n.a.d,t<i?(n.b=.5*(t+i),n.g=x9n*n.b+.9*t,n.f=x9n*n.b+.9*i):(n.b=.5*(t+r),n.g=x9n*n.b+.9*r,n.f=x9n*n.b+.9*t)}function $In(n){var t,e,i,r;if(0!=n.b){for(t=new lS,r=Fkn(n,0);r.b!=r.d.c;)Qon(t,Lhn(i=uG(I6(r),40))),(e=i.e).a=uG(oIn(i,(OQn(),GPt)),17).a,e.b=uG(oIn(i,qPt),17).a;return t}return new lS}function DIn(n){switch(uG(oIn(n,(jYn(),gMt)),171).g){case 1:kfn(n,gMt,(Gpn(),Omt));break;case 2:kfn(n,gMt,(Gpn(),Amt));break;case 3:kfn(n,gMt,(Gpn(),Cmt));break;case 4:kfn(n,gMt,(Gpn(),Imt))}}function xIn(n,t,e){var i;e.Ug("Self-Loop routing",1),i=mgn(t),XA(oIn(t,(K7(),jNt))),kS(YJ(JJ(JJ(sin(new fX(null,new h3(t.b,16)),new qi),new Xi),new zi),new Vi),new OC(n,i)),e.Vg()}function RIn(){RIn=E,Vgt=new cI(q4n,0),qgt=new cI(z2n,1),Wgt=new cI(V2n,2),zgt=new cI("LEFT_RIGHT_CONSTRAINT_LOCKING",3),Xgt=new cI("LEFT_RIGHT_CONNECTION_LOCKING",4),Ggt=new cI(K6n,5)}function KIn(n,t,i){var r,c,a,o,u,s,h;u=i.a/2,a=i.b/2,s=1,h=1,(r=e.Math.abs(t.a-n.a))>u&&(s=u/r),(c=e.Math.abs(t.b-n.b))>a&&(h=a/c),o=e.Math.min(s,h),n.a+=o*(t.a-n.a),n.b+=o*(t.b-n.b)}function FIn(n,t,e,i,r){var c,a;for(a=!1,c=uG(zq(e.b,0),27);Sqn(n,t,c,i,r)&&(a=!0,HSn(e,c),0!=e.b.c.length);)c=uG(zq(e.b,0),27);return 0==e.b.c.length&&uEn(e.j,e),a&&OTn(t.q),a}function _In(n,t){var e,i,r,c;if(l_n(),t.b<2)return!1;for(i=e=uG(I6(c=Fkn(t,0)),8);c.b!=c.d.c;){if(VRn(n,i,r=uG(I6(c),8)))return!0;i=r}return!!VRn(n,i,e)}function BIn(n,t,e,i){return 0==e?(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),G_(n.o,t,i)):uG(ern(uG(Lsn(n,16),29)||n.ii(),e),69).wk().Ak(n,$vn(n),e-iQ(n.ii()),t,i)}function HIn(n,t){var e;t!=n.sb?(e=null,n.sb&&(e=uG(n.sb,54).Th(n,1,sFt,e)),t&&(e=uG(t,54).Rh(n,1,sFt,e)),(e=Jwn(n,t,e))&&e.oj()):4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,4,t,t))}function UIn(n,t){var e,i;if(!t)throw hv(new SM("All edge sections need an end point."));e=$cn(t,"x"),mcn(new rm(n).a,(tJ(e),e)),i=$cn(t,"y"),jcn(new cm(n).a,(tJ(i),i))}function GIn(n,t){var e,i;if(!t)throw hv(new SM("All edge sections need a start point."));e=$cn(t,"x"),Tcn(new tm(n).a,(tJ(e),e)),i=$cn(t,"y"),Ecn(new em(n).a,(tJ(i),i))}function qIn(n,t){var e,i,r,c,a;for(i=0,c=xln(n).length;i<c;++i)aIn(t);for(a=!Nut&&n.e?Nut?null:n.d:null;a;){for(e=0,r=xln(a).length;e<r;++e)aIn(t);a=!Nut&&a.e?Nut?null:a.d:null}}function XIn(n,t){var e,i;i=uG(oIn(t,(jYn(),JMt)),101),kfn(t,(GYn(),smt),i),(e=t.e)&&(kS(new fX(null,new h3(e.a,16)),new Hd(n)),kS(sin(new fX(null,new h3(e.b,16)),new dt),new Ud(n)))}function zIn(){zIn=E,dbt=new SC("NORMAL",0),wbt=new SC("LONG_EDGE",1),lbt=new SC("EXTERNAL_PORT",2),gbt=new SC("NORTH_SOUTH_PORT",3),bbt=new SC("LABEL",4),fbt=new SC("BREAKING_POINT",5)}function VIn(n){var t,e,i,r;if(t=!1,vR(n,(GYn(),$pt)))for(e=uG(oIn(n,$pt),85),r=new Ww(n.j);r.a<r.c.c.length;)qxn(i=uG(N3(r),12))&&(t||(XLn(HQ(n)),t=!0),_mn(uG(e.xc(i),314)))}function WIn(n){var t,e,i;return i=gCn(n),null!=n.e&&ZG(i,_et,n.e),!!n.k&&ZG(i,"type",MR(n.k)),!pE(n.j)&&(e=new Ib,nrn(i,ket,e),t=new Em(e),z8(n.j,t)),i}function QIn(n){var t,e,i,r;for(r=jQ((man(n.gc(),"size"),new QM),123),i=!0,e=Mz(n).Kc();e.Ob();)t=uG(e.Pb(),44),i||(r.a+=TZn),i=!1,QA(jQ(QA(r,t.ld()),61),t.md());return(r.a+="}",r).a}function JIn(n,t){var e,i,r;return(t&=63)<22?(e=n.l<<t,i=n.m<<t|n.l>>22-t,r=n.h<<t|n.m>>22-t):t<44?(e=0,i=n.l<<t-22,r=n.m<<t-22|n.l>>44-t):(e=0,i=0,r=n.l<<t-44),p$(e&f0n,i&f0n,r&l0n)}function YIn(n){if(null==rot&&(rot=new RegExp("^\\s*[+-]?(NaN|Infinity|((\\d+\\.?\\d*)|(\\.\\d+))([eE][+-]?\\d+)?[dDfF]?)\\s*$")),!rot.test(n))throw hv(new ZM(y0n+n+'"'));return parseFloat(n)}function ZIn(n,t){var e,i,r,c;for(i=(1==t?$lt:Nlt).a.ec().Kc();i.Ob();)for(e=uG(i.Pb(),88),c=uG(Y9(n.f.c,e),21).Kc();c.Ob();)r=uG(c.Pb(),42),kD(n.b.b,uG(r.b,86)),kD(n.b.a,uG(r.b,86).d)}function nOn(n,t){var e,i,r,c;for(c=t.b.j,n.a=Inn(YHt,W1n,28,c.c.length,15,1),r=0,i=0;i<c.c.length;i++)u3(i,c.c.length),0==(e=uG(c.c[i],12)).e.c.length&&0==e.g.c.length?r+=1:r+=3,n.a[i]=r}function tOn(){tOn=E,Egt=new eI("ALWAYS_UP",0),jgt=new eI("ALWAYS_DOWN",1),Pgt=new eI("DIRECTION_UP",2),Sgt=new eI("DIRECTION_DOWN",3),Igt=new eI("SMART_UP",4),Cgt=new eI("SMART_DOWN",5)}function eOn(n,t){if(n<0||t<0)throw hv(new vM("k and n must be positive"));if(t>n)throw hv(new vM("k must be smaller than n"));return 0==t||t==n?1:0==n?0:uSn(n)/(uSn(t)*uSn(n-t))}function iOn(n,t){var e,i,r,c;for(e=new jN(n);null!=e.g||e.c?null==e.g||0!=e.i&&uG(e.g[e.i-1],51).Ob():O0(e);)if(F$(c=uG(Wxn(e),58),167))for(i=uG(c,167),r=0;r<t.length;r++)t[r].Kg(i)}function rOn(n){var t;return 64&n.Db?Egn(n):((t=new fx(Egn(n))).a+=" (height: ",Oj(t,n.f),t.a+=", width: ",Oj(t,n.g),t.a+=", x: ",Oj(t,n.i),t.a+=", y: ",Oj(t,n.j),t.a+=")",t.a)}function cOn(n){var t,e,i,r,c,a;for(t=new u8,r=0,c=(i=n).length;r<c;++r)if(null!=Akn(t,a=WW((e=i[r]).ld()),WW(e.md())))throw hv(new vM("duplicate key: "+a));this.b=(hZ(),new Vw(t))}function aOn(n){var t,e,i,r,c;if(null==n)return IZn;for(c=new Ysn(TZn,"[","]"),i=0,r=(e=n).length;i<r;++i)t=e[i],o7(c,String.fromCharCode(t));return c.a?0==c.e.length?c.a.a:c.a.a+""+c.e:c.c}function oOn(){oOn=E,zin(),sft=new mL(J3n,hft=pft),xwn(1),uft=new mL(Y3n,xwn(300)),xwn(0),bft=new mL(Z3n,xwn(0)),new Jm,wft=new mL(n4n,t4n),new Jm,fft=new mL(e4n,5),dft=pft,lft=gft}function uOn(n,t){var e;if(null!=t&&!n.c.Hk().fk(t))throw e=F$(t,58)?uG(t,58).Dh().zb:Ij(Tbn(t)),hv(new mM(Gtt+n.c.xe()+"'s type '"+n.c.Hk().xe()+"' does not permit a value of type '"+e+"'"))}function sOn(n,t,e){var i,r;for(r=new N4(n.b,0);r.b<r.d.gc();)MK(r.b<r.d.gc()),xA(oIn(i=uG(r.d.Xb(r.c=r.b++),72),(GYn(),omt)))===xA(t)&&(pAn(i.n,HQ(n.c.i),e),LQ(r),kD(t.b,i))}function hOn(n){var t,i;return i=e.Math.sqrt((null==n.k&&(n.k=aun(n,new vc)),uM(n.k)/(n.b*(null==n.g&&(n.g=cun(n,new mc)),uM(n.g))))),t=pz(Bsn(e.Math.round(i))),t=e.Math.min(t,n.f)}function fOn(){var n,t,e;for(t=0,n=0;n<1;n++){if(0==(e=U$n((s3(n,1),"X".charCodeAt(n)))))throw hv(new CM((s3(n,2),"Unknown Option: "+"X".substr(n))));t|=e}return t}function lOn(){Lun(),LF.call(this),this.j=(KQn(),FRt),this.a=new sj,new $k,this.f=(man(2,g1n),new R7(2)),this.e=(man(4,g1n),new R7(4)),this.g=(man(4,g1n),new R7(4)),this.b=new LC(this.e,this.g)}function bOn(n,t){var e;return!oM(gK(oIn(t,(GYn(),pmt))))&&(e=t.c.i,(n!=(Gpn(),Cmt)||e.k!=(zIn(),bbt))&&uG(oIn(e,(jYn(),gMt)),171)!=Imt)}function wOn(n,t){var e;return!oM(gK(oIn(t,(GYn(),pmt))))&&(e=t.d.i,(n!=(Gpn(),Omt)||e.k!=(zIn(),bbt))&&uG(oIn(e,(jYn(),gMt)),171)!=Amt)}function dOn(n,t){var e,i,r,c,a,o,u;for(a=n.d,u=n.o,o=new gY(-a.b,-a.d,a.b+u.a+a.c,a.d+u.b+a.a),r=0,c=(i=t).length;r<c;++r)(e=i[r])&&bAn(o,e.i);a.b=-o.c,a.d=-o.d,a.c=o.b-a.b-u.a,a.a=o.a-a.d-u.b}function gOn(n,t){if(t.a)switch(uG(oIn(t.b,(GYn(),smt)),101).g){case 0:case 1:JSn(t);case 2:kS(new fX(null,new h3(t.d,16)),new Ni),tDn(n.a,t)}else kS(new fX(null,new h3(t.d,16)),new Ni)}function pOn(){pOn=E,iLt=new bO("CENTER_DISTANCE",0),rLt=new bO("CIRCLE_UNDERLAP",1),oLt=new bO("RECTANGLE_UNDERLAP",2),cLt=new bO("INVERTED_OVERLAP",3),aLt=new bO("MINIMUM_ROOT_DISTANCE",4)}function mOn(n){var t,e,i,r;if(L_n(),null==n)return null;for(i=n.length,t=Inn(JHt,N1n,28,2*i,15,1),e=0;e<i;e++)(r=n[e])<0&&(r+=256),t[2*e]=mHt[r>>4],t[2*e+1]=mHt[15&r];return mvn(t,0,t.length)}function vOn(n){var t;switch(TJ(),n.c.length){case 0:return Eat;case 1:return fq((t=uG(ULn(new Ww(n)),44)).ld(),t.md());default:return new xy(uG(Ekn(n,Inn(Sat,c1n,44,n.c.length,0,1)),173))}}function kOn(n){var t,e,i,r,c;for(t=new ND,e=new ND,A6(t,n),A6(e,n);e.b!=e.c;)for(c=new Ww(uG(xV(e),36).a);c.a<c.c.c.length;)(r=uG(N3(c),10)).e&&(A6(t,i=r.e),A6(e,i));return t}function yOn(n,t){switch(t.g){case 1:return YU(n.j,(Lun(),Mbt));case 2:return YU(n.j,(Lun(),kbt));case 3:return YU(n.j,(Lun(),jbt));case 4:return YU(n.j,(Lun(),Ebt));default:return hZ(),hZ(),zot}}function MOn(n,t){var e,i,r;e=PG(t,n.e),i=uG(cQ(n.g.f,e),17).a,r=n.a.c.length-1,0!=n.a.c.length&&uG(zq(n.a,r),294).c==i?(++uG(zq(n.a,r),294).a,++uG(zq(n.a,r),294).b):kD(n.a,new $R(i))}function TOn(n,t,e){var i,r;return 0!=(i=CBn(n,t,e))?i:vR(t,(GYn(),imt))&&vR(e,imt)?((r=d$(uG(oIn(t,imt),17).a,uG(oIn(e,imt),17).a))<0?sHn(n,t,e):r>0&&sHn(n,e,t),r):j$n(n,t,e)}function jOn(){jOn=E,XYn(),BIt=mDt,VIt=DDt,$It=_$t,DIt=U$t,xIt=q$t,NIt=K$t,RIt=V$t,_It=bDt,EHn(),AIt=dIt,LIt=gIt,UIt=MIt,XIt=EIt,GIt=TIt,qIt=jIt,KIt=mIt,FIt=kIt,HIt=yIt,zIt=SIt,WIt=CIt,OIt=wIt}function EOn(n,t){var e,i,r,c,a;if(n.e<=t)return n.g;if(l3(n,n.g,t))return n.g;for(c=n.r,i=n.g,a=n.r,r=(c-i)/2+i;i+1<c;)(e=uXn(n,r,!1)).b<=r&&e.a<=t?(a=r,c=r):i=r,r=(c-i)/2+i;return a}function SOn(n,t,e){dCn(e,"Recursive Graph Layout",t_n(n,t,!0)),iOn(t,Uhn(cT(nNt,1),EZn,536,0,[new Nl])),vnn(t,(XYn(),yDt))||iOn(t,Uhn(cT(nNt,1),EZn,536,0,[new wu])),nZn(n,t,null,e),POn(e)}function POn(n){var t;if(null==n.p)throw hv(new kM("The task has not begun yet."));n.b||(n.k&&(bS(),t=Ngn(Bsn(Date.now()),$1n),n.q=1e-9*W4($gn(t,n.o))),n.c<n.r&&Ban(n,n.r-n.c),n.b=!0)}function COn(n){var t,e,i;for(aq(i=new Uk,new MO(n.j,n.k)),e=new DD((!n.a&&(n.a=new MD(eFt,n,5)),n.a));e.e!=e.i.gc();)aq(i,new MO((t=uG(Zkn(e),377)).a,t.b));return aq(i,new MO(n.b,n.c)),i}function IOn(n,t,e,i,r){var c,a,o,u;if(r)for(u=((c=new Gz(r.a.length)).b-c.a)*c.c<0?(CP(),XHt):new xD(c);u.Ob();)o=v6(r,uG(u.Pb(),17).a),XUn((a=new PY(n,t,e,i)).a,a.b,a.c,a.d,o)}function OOn(n,t){var e;if(xA(n)===xA(t))return!0;if(F$(t,21)){e=uG(t,21);try{return n.gc()==e.gc()&&n.Ic(e)}catch(i){if(F$(i=Ehn(i),169)||F$(i,212))return!1;throw hv(i)}}return!1}function AOn(n,t,e,i,r,c){switch(this.c=n,t.g){case 2:if(n.a.Ne(r,e)<0)throw hv(new vM(Y0n+r+Z0n+e));break;case 1:n.a.Ne(r,r);break;case 3:n.a.Ne(e,e)}this.f=t,this.b=e,this.a=i,this.e=r,this.d=c}function LOn(n,t){var i;kD(n.d,t),i=t.Mf(),n.c?(n.e.a=e.Math.max(n.e.a,i.a),n.e.b+=i.b,n.d.c.length>1&&(n.e.b+=n.a)):(n.e.a+=i.a,n.e.b=e.Math.max(n.e.b,i.b),n.d.c.length>1&&(n.e.a+=n.a))}function NOn(n){var t,e,i,r;switch(t=(r=n.i).b,i=r.j,e=r.g,r.a.g){case 0:e.a=(n.g.b.o.a-i.a)/2;break;case 1:e.a=t.d.n.a+t.d.a.a;break;case 2:e.a=t.d.n.a+t.d.a.a-i.a;break;case 3:e.b=t.d.n.b+t.d.a.b}}function $On(n,t,e){var i,r,c;for(r=new Fz(ix(Ggn(e).a.Kc(),new h));hDn(r);)v9(i=uG(N9(r),18))||!v9(i)&&i.c.i.c==i.d.i.c||(c=aRn(n,i,e,new Ck)).c.length>1&&mv(t.c,c)}function DOn(n,t,e,i,r){if(i<t||r<e)throw hv(new vM("The highx must be bigger then lowx and the highy must be bigger then lowy"));return n.a<t?n.a=t:n.a>i&&(n.a=i),n.b<e?n.b=e:n.b>r&&(n.b=r),n}function xOn(n){if(F$(n,143))return dKn(uG(n,143));if(F$(n,233))return Mpn(uG(n,233));if(F$(n,23))return WIn(uG(n,23));throw hv(new vM(Aet+vIn(new IM(Uhn(cT(dat,1),EZn,1,5,[n])))))}function ROn(n,t,e,i,r){var c,a,o;for(c=!0,a=0;a<i;a++)c&=0==e[a];if(0==r)qGn(e,i,n,0,t),a=t;else{for(o=32-r,c&=!(e[a]<<o),a=0;a<t-1;a++)n[a]=e[a+i]>>>r|e[a+i+1]<<o;n[a]=e[a+i]>>>r,++a}return c}function KOn(n,t,e,i){var r,c;if(t.k==(zIn(),wbt))for(c=new Fz(ix(qgn(t).a.Kc(),new h));hDn(c);)if((r=uG(N9(c),18)).c.i.k==wbt&&n.c.a[r.c.i.c.p]==i&&n.c.a[t.c.p]==e)return!0;return!1}function FOn(n,t){var e,i,r,c;return t&=63,e=n.h&l0n,t<22?(c=e>>>t,r=n.m>>t|e<<22-t,i=n.l>>t|n.m<<22-t):t<44?(c=0,r=e>>>t-22,i=n.m>>t-22|n.h<<44-t):(c=0,r=0,i=e>>>t-44),p$(i&f0n,r&f0n,c&l0n)}function _On(n,t,e,i){var r;this.b=i,this.e=n==(ean(),BEt),r=t[e],this.d=Jq(ZHt,[zZn,B2n],[183,28],16,[r.length,r.length],2),this.a=Jq(YHt,[zZn,W1n],[53,28],15,[r.length,r.length],2),this.c=new IPn(t,e)}function BOn(n){var t,e,i;for(n.k=new L2((KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length,n.j.c.length),i=new Ww(n.j);i.a<i.c.c.length;)t=(e=uG(N3(i),113)).d.j,UNn(n.k,t,e);n.e=zRn(kz(n.k))}function HOn(n,t){var e,i,r;FV(n.d,t),e=new ya,vJ(n.c,t,e),e.f=uwn(t.c),e.a=uwn(t.d),e.d=(uFn(),(r=t.c.i.k)==(zIn(),dbt)||r==fbt),e.e=(i=t.d.i.k)==dbt||i==fbt,e.b=t.c.j==(KQn(),_Rt),e.c=t.d.j==kRt}function UOn(n){var t,e,i,r,c;for(c=vZn,r=vZn,i=new Ww(Ebn(n));i.a<i.c.c.length;)t=(e=uG(N3(i),218)).e.e-e.d.e,e.e==n&&t<r?r=t:t<c&&(c=t);return r==vZn&&(r=-1),c==vZn&&(c=-1),new WO(xwn(r),xwn(c))}function GOn(n,t){var i,r,c;return c=B3n,myn(),r=Nht,c=e.Math.abs(n.b),(i=e.Math.abs(t.f-n.b))<c&&(c=i,r=$ht),(i=e.Math.abs(n.a))<c&&(c=i,r=Dht),(i=e.Math.abs(t.g-n.a))<c&&(c=i,r=Lht),r}function qOn(n,t){var e,i,r;for(e=t.a.o.a,r=new Jw(new C2(HQ(t.a).b,t.c,t.f+1));r.b<r.d.gc();)if(MK(r.b<r.d.gc()),(i=uG(r.d.Xb(r.c=r.b++),30)).c.a>=e)return YOn(n,t,i.p),!0;return!1}function XOn(n,t,e,i){var r,c,a,o,u,s;for(a=e.length,c=0,r=-1,s=Tin((s3(t,n.length+1),n.substr(t)),(cB(),out)),o=0;o<a;++o)(u=e[o].length)>c&&IV(s,Tin(e[o],out))&&(r=o,c=u);return r>=0&&(i[0]=t+c),r}function zOn(n){var t;return 64&n.Db?rOn(n):(t=new lx(Ftt),!n.a||JA(JA((t.a+=' "',t),n.a),'"'),JA(Nj(JA(Nj(JA(Nj(JA(Nj((t.a+=" (",t),n.i),","),n.j)," | "),n.g),","),n.f),")"),t.a)}function VOn(n,t,e){var i,r,c,a,o;for(o=VKn(n.e.Dh(),t),r=uG(n.g,124),i=0,a=0;a<n.i;++a)if(c=r[a],o.am(c.Lk())){if(i==e)return e_n(n,a),PP(),uG(t,69).xk()?c:c.md();++i}throw hv(new dM(Hit+e+Vet+i))}function WOn(n){var t,e,i;if(2==(t=n.c)||7==t||1==t)return QYn(),QYn(),OHt;for(i=eYn(n),e=null;2!=(t=n.c)&&7!=t&&1!=t;)e||(QYn(),QYn(),kzn(e=new QN(1),i),i=e),kzn(e,eYn(n));return i}function QOn(n,t,e){return n<0||n>e?iLn(n,e,"start index"):t<0||t>e?iLn(t,e,"end index"):LBn("end index (%s) must not be less than start index (%s)",Uhn(cT(dat,1),EZn,1,5,[xwn(t),xwn(n)]))}function JOn(n,t){var e,i,r,c;for(i=0,r=n.length;i<r;i++){c=n[i];try{c[1]?c[0].Um()&&(t=QX(t,c)):c[0].Um()}catch(a){if(!F$(a=Ehn(a),82))throw hv(a);e=a,XM(),o1(F$(e,486)?uG(e,486).ke():e)}}return t}function YOn(n,t,i){var r,c;for(i!=t.c+t.b.gc()&&PXn(t.a,vsn(t,i-t.c)),c=t.a.c.p,n.a[c]=e.Math.max(n.a[c],t.a.o.a),r=uG(oIn(t.a,(GYn(),gmt)),15).Kc();r.Ob();)kfn(uG(r.Pb(),72),Hwt,(qx(),!0))}function ZOn(n,t){var i,r,c;c=$Kn(t),kfn(t,(GYn(),tmt),c),c&&(r=vZn,FX(n.f,c)&&(r=uG(DA(FX(n.f,c)),17).a),oM(gK(oIn(i=uG(zq(t.g,0),18),pmt)))||vJ(n,c,xwn(e.Math.min(uG(oIn(i,imt),17).a,r))))}function nAn(n,t,e){var i,r,c,a;for(t.p=-1,a=jmn(t,(can(),Wjt)).Kc();a.Ob();)for(r=new Ww(uG(a.Pb(),12).g);r.a<r.c.c.length;)t!=(c=(i=uG(N3(r),18)).d.i)&&(c.p<0?e.Fc(i):c.p>0&&nAn(n,c,e));t.p=0}function tAn(n){var t;this.c=new lS,this.f=n.e,this.e=n.d,this.i=n.g,this.d=n.c,this.b=n.b,this.k=n.j,this.a=n.a,n.i?this.j=n.i:this.j=new nB(t=uG(Mj(MNt),9),uG(MF(t,t.length),9),0),this.g=n.f}function eAn(n){var t,e,i,r;for(t=jQ(JA(new lx("Predicates."),"and"),40),e=!0,r=new Jw(n);r.b<r.d.gc();)MK(r.b<r.d.gc()),i=r.d.Xb(r.c=r.b++),e||(t.a+=","),t.a+=""+i,e=!1;return(t.a+=")",t).a}function iAn(n,t,e){var i,r,c;if(!(e<=t+2))for(r=(e-t)/2|0,i=0;i<r;++i)u3(t+i,n.c.length),c=uG(n.c[t+i],12),Y8(n,t+i,(u3(e-i-1,n.c.length),uG(n.c[e-i-1],12))),u3(e-i-1,n.c.length),n.c[e-i-1]=c}function rAn(n,t,e){var i,r,c,a,o,u,s;o=(c=n.d.p).e,u=c.r,n.g=new R_(u),i=(a=n.d.o.c.p)>0?o[a-1]:Inn(pbt,e6n,10,0,0,1),r=o[a],s=a<o.length-1?o[a+1]:Inn(pbt,e6n,10,0,0,1),t==e-1?j0(n.g,r,s):j0(n.g,i,r)}function cAn(n){var t;this.j=new Zm,this.f=new ek,this.b=new nB(t=uG(Mj(YRt),9),uG(MF(t,t.length),9),0),this.d=Inn(YHt,W1n,28,(KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length,15,1),this.g=n}function aAn(n,t){var e,i,r;if(0!=t.c.length){for(e=hIn(n,t),r=!1;!e;)gxn(n,t,!0),r=!0,e=hIn(n,t);r&&gxn(n,t,!1),i=Jhn(t),n.b&&n.b.Gg(i),n.a=Zbn(n,(u3(0,t.c.length),uG(t.c[0],27))),aAn(n,i)}}function oAn(n,t){var e,i,r;if(i=ern(n.Dh(),t),(e=t-n.ji())<0){if(!i)throw hv(new vM(Vtt+t+Wtt));if(!i.rk())throw hv(new vM(Gtt+i.xe()+qtt));(r=n.Ih(i))>=0?n.ki(r):zLn(n,i)}else sdn(n,e,i)}function uAn(n){var t,e;if(e=null,t=!1,F$(n,211)&&(t=!0,e=uG(n,211).a),t||F$(n,263)&&(t=!0,e=""+uG(n,263).a),t||F$(n,493)&&(t=!0,e=""+uG(n,493).a),!t)throw hv(new pM(Cet));return e}function sAn(n,t,e){var i,r,c,a,o,u;for(u=VKn(n.e.Dh(),t),i=0,o=n.i,r=uG(n.g,124),a=0;a<n.i;++a)if(c=r[a],u.am(c.Lk())){if(e==i)return a;++i,o=a+1}if(e==i)return o;throw hv(new dM(Hit+e+Vet+i))}function hAn(n,t){var i,r,c;if(0==n.f.c.length)return null;for(c=new cN,i=new Ww(n.f);i.a<i.c.c.length;)r=uG(N3(i),72).o,c.b=e.Math.max(c.b,r.a),c.a+=r.b;return c.a+=(n.f.c.length-1)*t,c}function fAn(n){var t,e,i;for(Qon(e=new lS,n.o),i=new Ok;0!=e.b;)gJn(n,t=uG(0==e.b?null:(MK(0!=e.b),Lrn(e,e.a.a)),515),!0)&&kD(i.a,t);for(;0!=i.a.c.length;)gJn(n,t=uG(obn(i),515),!1)}function lAn(){lAn=E,yNt=new EO(Y2n,0),wNt=new EO("BOOLEAN",1),mNt=new EO("INT",2),kNt=new EO("STRING",3),dNt=new EO("DOUBLE",4),gNt=new EO("ENUM",5),pNt=new EO("ENUMSET",6),vNt=new EO("OBJECT",7)}function bAn(n,t){var i,r,c,a,o;r=e.Math.min(n.c,t.c),a=e.Math.min(n.d,t.d),(c=e.Math.max(n.c+n.b,t.c+t.b))<r&&(i=r,r=c,c=i),(o=e.Math.max(n.d+n.a,t.d+t.a))<a&&(i=a,a=o,o=i),LG(n,r,a,c-r,o-a)}function wAn(n,t){var e,i;if(n.f){for(;t.Ob();)if(F$(i=(e=uG(t.Pb(),76)).Lk(),102)&&uG(i,19).Bb&Qtt&&(!n.e||i.pk()!=tFt||0!=i.Lj())&&null!=e.md())return t.Ub(),!0;return!1}return t.Ob()}function dAn(n,t){var e,i;if(n.f){for(;t.Sb();)if(F$(i=(e=uG(t.Ub(),76)).Lk(),102)&&uG(i,19).Bb&Qtt&&(!n.e||i.pk()!=tFt||0!=i.Lj())&&null!=e.md())return t.Pb(),!0;return!1}return t.Sb()}function gAn(){gAn=E,vBt=Uhn(cT($ot,1),zZn,2,6,[nct,tct,ect,ict,rct,cct,_et]),mBt=Uhn(cT($ot,1),zZn,2,6,[nct,"empty",tct,jrt,"elementOnly"]),yBt=Uhn(cT($ot,1),zZn,2,6,[nct,"preserve","replace",act]),kBt=new HG}function pAn(n,t,e){var i,r,c;if(t!=e){i=t;do{JF(n,i.c),(r=i.e)&&(KR(n,(c=i.d).b,c.d),JF(n,r.n),i=HQ(r))}while(r);i=e;do{YF(n,i.c),(r=i.e)&&(HR(n,(c=i.d).b,c.d),YF(n,r.n),i=HQ(r))}while(r)}}function mAn(n,t,e,i){var r,c,a,o,u;if(i.f.c+i.i.c==0)for(o=0,u=(a=n.a[n.c]).length;o<u;++o)vJ(i,c=a[o],new Uun(n,c,e));return(r=uG(DA(FX(i.f,t)),677)).b=0,r.c=r.f,0==r.c||Pw(uG(zq(r.a,r.b),294)),r}function vAn(){vAn=E,Hdt=new QC("MEDIAN_LAYER",0),Gdt=new QC("TAIL_LAYER",1),Bdt=new QC("HEAD_LAYER",2),Udt=new QC("SPACE_EFFICIENT_LAYER",3),qdt=new QC("WIDEST_LAYER",4),_dt=new QC("CENTER_LAYER",5)}function kAn(n){var t,e,i,r;for(n.e=0,r=Fkn(n.f,0);r.b!=r.d.c;)(i=uG(I6(r),10)).p>=n.d.b.c.length&&((t=new bQ(n.d)).p=i.p-1,kD(n.d.b,t),(e=new bQ(n.d)).p=i.p,kD(n.d.b,e)),a2(i,uG(zq(n.d.b,i.p),30))}function yAn(n,t,e){var i,r,c;if(!n.b[t.g]){for(n.b[t.g]=!0,!(i=e)&&(i=new L7),aq(i.b,t),c=n.a[t.g].Kc();c.Ob();)(r=uG(c.Pb(),65)).b!=t&&yAn(n,r.b,i),r.c!=t&&yAn(n,r.c,i),aq(i.a,r);return i}return null}function MAn(n){switch(n.g){case 0:case 1:case 2:return KQn(),yRt;case 3:case 4:case 5:return KQn(),KRt;case 6:case 7:case 8:return KQn(),_Rt;case 9:case 10:case 11:return KQn(),kRt;default:return KQn(),FRt}}function TAn(n,t){var e;return 0!=n.c.length&&(e=Imn((u3(0,n.c.length),uG(n.c[0],18)).c.i),n2(),e==(Yyn(),wjt)||e==bjt||o9(YJ(new fX(null,new h3(n,16)),new Kc),new up(t)))}function jAn(n,t){if(F$(t,207))return KN(n,uG(t,27));if(F$(t,193))return FN(n,uG(t,123));if(F$(t,452))return RN(n,uG(t,166));throw hv(new vM(Aet+vIn(new IM(Uhn(cT(dat,1),EZn,1,5,[t])))))}function EAn(n,t,e){var i,r;if(this.f=n,e7(e,r=(i=uG(cQ(n.b,t),260))?i.a:0),e>=(r/2|0))for(this.e=i?i.c:null,this.d=r;e++<r;)jin(this);else for(this.c=i?i.b:null;e-- >0;)Ein(this);this.b=t,this.a=null}function SAn(n,t){var e,i;t.a?WKn(n,t):(!!(e=uG(jS(n.b,t.b),60))&&e==n.a[t.b.f]&&!!e.a&&e.a!=t.b.a&&e.c.Fc(t.b),!!(i=uG(TS(n.b,t.b),60))&&n.a[i.f]==t.b&&!!i.a&&i.a!=t.b.a&&t.b.c.Fc(i),sD(n.b,t.b))}function PAn(n,t){var e,i;if(e=uG(AJ(n.b,t),127),uG(uG(Y9(n.r,t),21),87).dc())return e.n.b=0,void(e.n.c=0);e.n.b=n.C.b,e.n.c=n.C.c,n.A.Hc((Qmn(),JRt))&&vBn(n,t),i=Iyn(n,t),M_n(n,t)==(Vkn(),Zxt)&&(i+=2*n.w),e.a.a=i}function CAn(n,t){var e,i;if(e=uG(AJ(n.b,t),127),uG(uG(Y9(n.r,t),21),87).dc())return e.n.d=0,void(e.n.a=0);e.n.d=n.C.d,e.n.a=n.C.a,n.A.Hc((Qmn(),JRt))&&kBn(n,t),i=Cyn(n,t),M_n(n,t)==(Vkn(),Zxt)&&(i+=2*n.w),e.a.b=i}function IAn(n,t){var e,i,r,c;for(c=new Zm,i=new Ww(t);i.a<i.c.c.length;)kD(c,new fC(e=uG(N3(i),68),!0)),kD(c,new fC(e,!1));(r=new _Z(n)).a.a.$b(),I4(c,n.b,new IM(Uhn(cT(Hut,1),EZn,693,0,[r])))}function OAn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w;return o=n.a,f=n.b,u=t.a,l=t.b,s=e.a,b=e.b,new MO(((c=o*l-f*u)*(s-(h=i.a))-(a=s*(w=i.b)-b*h)*(o-u))/(r=(o-u)*(b-w)-(f-l)*(s-h)),(c*(b-w)-a*(f-l))/r)}function AAn(n,t){var e,i,r;t.Ug("End label pre-processing",1),e=uM(pK(oIn(n,(jYn(),pTt)))),i=uM(pK(oIn(n,yTt))),r=fN(uG(oIn(n,Byt),88)),kS(sin(new fX(null,new h3(n.b,16)),new he),new NB(e,i,r)),t.Vg()}function LAn(n,t){var e,i,r;if(!n.d[t.p]){for(n.d[t.p]=!0,n.a[t.p]=!0,i=new Fz(ix(Xgn(t).a.Kc(),new h));hDn(i);)v9(e=uG(N9(i),18))||(r=e.d.i,n.a[r.p]?kD(n.b,e):LAn(n,r));n.a[t.p]=!1}}function NAn(n,t,e){var i;switch(i=0,uG(oIn(t,(jYn(),gMt)),171).g){case 2:i=2*-e+n.a,++n.a;break;case 1:i=-e;break;case 3:i=e;break;case 4:i=2*e+n.b,++n.b}return vR(t,(GYn(),imt))&&(i+=uG(oIn(t,imt),17).a),i}function $An(n,t,e){var i,r,c;for(e.zc(t,n),kD(n.n,t),c=n.p.zg(t),t.j==n.p.Ag()?npn(n.e,c):npn(n.j,c),eQ(n),r=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[new zd(t),new Wd(t)])));hDn(r);)i=uG(N9(r),12),e._b(i)||$An(n,i,e)}function DAn(n,t,e){var i,r,c;for(e.Ug("Processor set neighbors",1),n.a=0==t.b.b?1:t.b.b,r=null,i=Fkn(t.b,0);!r&&i.b!=i.d.c;)oM(gK(oIn(c=uG(I6(i),40),(OQn(),UPt))))&&(r=c);r&&k_n(n,new Mp(r),e),e.Vg()}function xAn(n){var t,e;return uG(zDn(n,(XYn(),_$t)),21).Hc((Qmn(),VRt))?(e=uG(zDn(n,q$t),21),t=new eN(uG(zDn(n,U$t),8)),e.Hc((oUn(),eKt))&&(t.a<=0&&(t.a=20),t.b<=0&&(t.b=20)),t):new sj}function RAn(n){var t,e,i;if(!n.b){for(i=new Es,e=new nR(Zqn(n));e.e!=e.i.gc();)(t=uG(nyn(e),19)).Bb&Qtt&&ttn(i,t);lbn(i),n.b=new vL((uG(zrn(gZ((tQ(),M_t).o),8),19),i.i),i.g),y9(n).b&=-9}return n.b}function KAn(n){var t,e,i;for(e=n.length,i=0;i<e&&(s3(i,n.length),n.charCodeAt(i)<=32);)++i;for(t=e;t>i&&(s3(t-1,n.length),n.charCodeAt(t-1)<=32);)--t;return i>0||t<e?(Knn(i,t,n.length),n.substr(i,t-i)):n}function FAn(n,t){var e,i,r,c,a,o;a=uG(oTn(kz(t.k),Inn(YRt,z4n,64,2,0,1)),126),xTn(n,o=t.g,e=e5(t,a[0]),i=t5(t,a[1]))<=xTn(n,o,r=e5(t,a[1]),c=t5(t,a[0]))?(t.a=e,t.c=i):(t.a=r,t.c=c)}function _An(n){var t,e,i,r,c,a,o;if(hZ(),F$(n,59))for(c=0,r=n.gc()-1;c<r;++c,--r)t=n.Xb(c),n.hd(c,n.Xb(r)),n.hd(r,t);else for(e=n.ed(),a=n.fd(n.gc());e.Tb()<a.Vb();)i=e.Pb(),o=a.Ub(),e.Wb(o),a.Wb(i)}function BAn(n,t){var e,i,r,c,a,o;for(o=0,A6(c=new ND,t);c.b!=c.c;)for(o+=XTn((a=uG(xV(c),219)).d,a.e),r=new Ww(a.b);r.a<r.c.c.length;)i=uG(N3(r),36),(e=uG(zq(n.b,i.p),219)).s||(o+=BAn(n,e));return o}function HAn(n,t,e,i,r){var c,a,o,u;if(t)for(a=t.Kc();a.Ob();)for(u=nBn(uG(a.Pb(),10),(can(),Wjt),e).Kc();u.Ob();)o=uG(u.Pb(),12),(c=uG(DA(FX(r.f,o)),118))||(c=new nhn(n.d),mv(i.c,c),$An(c,o,r))}function UAn(n,t,i){var r,c;thn(this),t==(l0(),USt)?FV(this.r,n.c):FV(this.w,n.c),FV(i==USt?this.r:this.w,n.d),HOn(this,n),NIn(this,r=uwn(n.c),c=uwn(n.d),c),this.o=(uFn(),e.Math.abs(r-c)<.2)}function GAn(n,t,e){var i,r,c,a,o;if(null!=(a=uG(Lsn(n.a,8),2035)))for(r=0,c=a.length;r<c;++r)null.Um();i=e,1&n.a.Db||(o=new SQ(n,e,t),i.dj(o)),F$(i,686)?uG(i,686).fj(n.a):i.cj()==n.a&&i.ej(null)}function qAn(){var n;return kHt?uG(jxn((MP(),l_t),lct),2044):(SQn(),n=uG(F$(U1((MP(),l_t),lct),594)?U1(l_t,lct):new gJ,594),kHt=!0,FJn(n),ZYn(n),vJ((pP(),k_t),n,new $h),ojn(n),r2(l_t,lct,n),n)}function XAn(n,t,e,i){var r;return(r=XOn(n,e,Uhn(cT($ot,1),zZn,2,6,[Y1n,Z1n,n0n,t0n,e0n,i0n,r0n]),t))<0&&(r=XOn(n,e,Uhn(cT($ot,1),zZn,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),t)),!(r<0||(i.d=r,0))}function zAn(n,t,e,i){var r;return(r=XOn(n,e,Uhn(cT($ot,1),zZn,2,6,[Y1n,Z1n,n0n,t0n,e0n,i0n,r0n]),t))<0&&(r=XOn(n,e,Uhn(cT($ot,1),zZn,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),t)),!(r<0||(i.d=r,0))}function VAn(n,t,e){var i,r,c,a;if(a=n.b.Ce(t),0==(r=null==(i=n.a.get(a))?Inn(dat,EZn,1,0,5,1):i).length)n.a.set(a,r);else if(c=Ibn(n,t,r))return c.nd(e);return uQ(r,r.length,new VP(t,e)),++n.c,++n.b.g,null}function WAn(n){var t,e,i;for($xn(n),i=new Zm,e=new Ww(n.a.a.b);e.a<e.c.c.length;)kD(i,new KC(t=uG(N3(e),86),!0)),kD(i,new KC(t,!1));RMn(n.c),O4(i,n.b,new IM(Uhn(cT(Klt,1),EZn,382,0,[n.c]))),lDn(n)}function QAn(n,t){var e,i,r;for(r=new Zm,i=new Ww(n.c.a.b);i.a<i.c.c.length;)e=uG(N3(i),60),t.Lb(e)&&(kD(r,new tC(e,!0)),kD(r,new tC(e,!1)));xMn(n.e),I4(r,n.d,new IM(Uhn(cT(Hut,1),EZn,693,0,[n.e])))}function JAn(n){var t,e,i,r;for(e=new Ym,r=new Ww(n.d);r.a<r.c.c.length;)i=uG(N3(r),187),t=uG(i.of((GYn(),Dpt)),18),FX(e.f,t)||vJ(e,t,new oZ(t)),kD(uG(DA(FX(e.f,t)),466).b,i);return new Z_(new Fw(e))}function YAn(n,t){var e,i,r,c,a;for(i=new $4(n.j.c.length),e=null,c=new Ww(n.j);c.a<c.c.c.length;)(r=uG(N3(c),12)).j!=e&&(i.b==i.c||Dxn(i,e,t),q5(i),e=r.j),(a=bDn(r))&&O6(i,a);i.b==i.c||Dxn(i,e,t)}function ZAn(n,t){var e,i;for(i=new N4(n.b,0);i.b<i.d.gc();)MK(i.b<i.d.gc()),e=uG(i.d.Xb(i.c=i.b++),72),uG(oIn(e,(jYn(),Xyt)),278)==(Zrn(),rxt)&&(LQ(i),kD(t.b,e),vR(e,(GYn(),Dpt))||kfn(e,Dpt,n))}function nLn(n){var t,i,r;for(t=x5(new Fz(ix(Xgn(n).a.Kc(),new h))),i=new Fz(ix(qgn(n).a.Kc(),new h));hDn(i);)r=x5(new Fz(ix(Xgn(uG(N9(i),18).c.i).a.Kc(),new h))),t=e.Math.max(t,r);return xwn(t)}function tLn(n,t,e){var i,r,c;i=uG(zDn(n,(XYn(),l$t)),21),r=0,c=0,t.a>e.a&&(i.Hc((ZSn(),VNt))?r=(t.a-e.a)/2:i.Hc(QNt)&&(r=t.a-e.a)),t.b>e.b&&(i.Hc((ZSn(),YNt))?c=(t.b-e.b)/2:i.Hc(JNt)&&(c=t.b-e.b)),JCn(n,r,c)}function eLn(n,t,e,i,r,c,a,o,u,s,h,f,l){F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),4),qon(n,e),n.f=a,Qdn(n,o),Ydn(n,u),Wdn(n,s),Jdn(n,h),mdn(n,f),Cgn(n,l),ddn(n,!0),Pcn(n,r),n.Zk(c),Kbn(n,t),null!=i&&(n.i=null,lon(n,i))}function iLn(n,t,e){if(n<0)return LBn(jZn,Uhn(cT(dat,1),EZn,1,5,[e,xwn(n)]));if(t<0)throw hv(new vM(SZn+t));return LBn("%s (%s) must not be greater than size (%s)",Uhn(cT(dat,1),EZn,1,5,[e,xwn(n),xwn(t)]))}function rLn(n,t,e,i,r,c){var a,o,u;if(i-e<7)Ygn(t,e,i,c);else if(rLn(t,n,o=e+r,u=o+((a=i+r)-o>>1),-r,c),rLn(t,n,u,a,-r,c),c.Ne(n[u-1],n[u])<=0)for(;e<i;)uQ(t,e++,n[o++]);else Twn(n,o,u,a,t,e,i,c)}function cLn(n,t){var e,i,r,c,a,o,u;for(u=t.d,r=t.b.j,o=new Ww(u);o.a<o.c.c.length;)for(a=uG(N3(o),105),c=Inn(ZHt,B2n,28,r.c.length,16,1),vJ(n.b,a,c),e=a.a.d.p-1,i=a.c.d.p;e!=i;)c[e=(e+1)%r.c.length]=!0}function aLn(n,t){if(Ean(),vR(n,(GYn(),imt))&&vR(t,imt))return d$(uG(oIn(n,imt),17).a,uG(oIn(t,imt),17).a);throw hv(new EM("The BF model order layer assigner requires all real nodes to have a model order."))}function oLn(n,t){if(Pan(),vR(n,(GYn(),imt))&&vR(t,imt))return d$(uG(oIn(n,imt),17).a,uG(oIn(t,imt),17).a);throw hv(new EM("The DF model order layer assigner requires all real nodes to have a model order."))}function uLn(n,t){for(n.r=new nhn(n.p),Zb(n.r,n),Qon(n.r.j,n.j),BY(n.j),aq(n.j,t),aq(n.r.e,t),eQ(n),eQ(n.r);0!=n.f.c.length;)L$(uG(zq(n.f,0),132));for(;0!=n.k.c.length;)L$(uG(zq(n.k,0),132));return n.r}function sLn(n,t,e){var i,r,c;if(r=ern(n.Dh(),t),(i=t-n.ji())<0){if(!r)throw hv(new vM(Vtt+t+Wtt));if(!r.rk())throw hv(new vM(Gtt+r.xe()+qtt));(c=n.Ih(r))>=0?n.bi(c,e):lRn(n,r,e)}else lpn(n,i,r,e)}function hLn(n){var t,e;if(n.f){for(;n.n>0;){if(F$(e=(t=uG(n.k.Xb(n.n-1),76)).Lk(),102)&&uG(e,19).Bb&Qtt&&(!n.e||e.pk()!=tFt||0!=e.Lj())&&null!=t.md())return!0;--n.n}return!1}return n.n>0}function fLn(n){var t,e,i,r;if(e=uG(n,54)._h())try{if(i=null,(t=jxn((MP(),l_t),xUn(jpn(e))))&&(r=t.ai())&&(i=r.Fl(bM(e.e))),i&&i!=n)return fLn(i)}catch(c){if(!F$(c=Ehn(c),63))throw hv(c)}return n}function lLn(n,t,e){var i,r;e.Ug("Remove overlaps",1),e.dh(t,l7n),i=uG(zDn(t,(SK(),zCt)),27),n.f=i,n.a=aMn(uG(zDn(t,(jOn(),zIt)),300)),rw(n,(tJ(r=pK(zDn(t,(XYn(),DDt)))),r)),xWn(n,t,GFn(i),e),e.dh(t,w7n)}function bLn(n){var t,e,i;if(oM(gK(zDn(n,(XYn(),C$t))))){for(i=new Zm,e=new Fz(ix(eRn(n).a.Kc(),new h));hDn(e);)BNn(t=uG(N9(e),74))&&oM(gK(zDn(t,I$t)))&&mv(i.c,t);return i}return hZ(),hZ(),zot}function wLn(n){if(!n)return By(),Vat;var t=n.valueOf?n.valueOf():n;if(t!==n){var i=Wat[typeof t];return i?i(t):Vbn(typeof t)}return n instanceof Array||n instanceof e.Array?new Eb(n):new Cb(n)}function dLn(n,t,i){var r,c,a;switch(a=n.o,(c=(r=uG(AJ(n.p,i),252)).i).b=gNn(r),c.a=dNn(r),c.b=e.Math.max(c.b,a.a),c.b>a.a&&!t&&(c.b=a.a),c.c=-(c.b-a.a)/2,i.g){case 1:c.d=-c.a;break;case 3:c.d=a.b}YGn(r),rqn(r)}function gLn(n,t,i){var r,c,a;switch(a=n.o,(c=(r=uG(AJ(n.p,i),252)).i).b=gNn(r),c.a=dNn(r),c.a=e.Math.max(c.a,a.b),c.a>a.b&&!t&&(c.a=a.b),c.d=-(c.a-a.b)/2,i.g){case 4:c.c=-c.b;break;case 2:c.c=a.a}YGn(r),rqn(r)}function pLn(n,t){var e,i,r,c,a;if(!t.dc())if(r=uG(t.Xb(0),131),1!=t.gc())for(e=1;e<t.gc();)!r.j&&r.o||(c=tjn(t,e))&&(i=uG(c.a,17).a,wFn(n,r,a=uG(c.b,131),e,i,t),e=i+1,r=a);else wFn(n,r,r,1,0,t)}function mLn(n){var t,e,i,r;for(f$(r=new Z_(n.d),new zr),h_n(),t=Uhn(cT(Xdt,1),p1n,276,0,[Odt,Ndt,Idt,xdt,Ldt,Adt,Ddt,$dt]),e=0,i=new Ww(r);i.a<i.c.c.length;)T$n(uG(N3(i),105),t[e%t.length]),++e}function vLn(n,t){var e,i,r,c;if(l_n(),t.b<2)return!1;for(i=e=uG(I6(c=Fkn(t,0)),8);c.b!=c.d.c;){if(r=uG(I6(c),8),!qun(n,i)||!qun(n,r))return!1;i=r}return!(!qun(n,i)||!qun(n,e))}function kLn(n,t){var e,i,r,c,a;return e=$cn(a=n,"x"),din(new sm(t).a,e),i=$cn(a,"y"),gin(new hm(t).a,i),r=$cn(a,wet),pin(new fm(t).a,r),c=$cn(a,bet),min(new lm(t).a,c),c}function yLn(n,t){bBn(n,t),1&n.b&&(n.a.a=null),2&n.b&&(n.a.f=null),4&n.b&&(n.a.g=null,n.a.i=null),16&n.b&&(n.a.d=null,n.a.e=null),8&n.b&&(n.a.b=null),32&n.b&&(n.a.j=null,n.a.c=null)}function MLn(n,t){var e,i;if(i=0,t.length>0)try{i=vUn(t,j1n,vZn)}catch(r){throw F$(r=Ehn(r),130)?hv(new Pen(r)):hv(r)}return!n.a&&(n.a=new qm(n)),i<(e=n.a).i&&i>=0?uG(zrn(e,i),58):null}function TLn(n,t){if(n<0)return LBn(jZn,Uhn(cT(dat,1),EZn,1,5,["index",xwn(n)]));if(t<0)throw hv(new vM(SZn+t));return LBn("%s (%s) must be less than size (%s)",Uhn(cT(dat,1),EZn,1,5,["index",xwn(n),xwn(t)]))}function jLn(n){var t,e,i,r,c;if(null==n)return IZn;for(c=new Ysn(TZn,"[","]"),i=0,r=(e=n).length;i<r;++i)t=e[i],c.a?JA(c.a,c.b):c.a=new lx(c.d),WA(c.a,""+t);return c.a?0==c.e.length?c.a.a:c.a.a+""+c.e:c.c}function ELn(n){var t,e,i,r,c;if(null==n)return IZn;for(c=new Ysn(TZn,"[","]"),i=0,r=(e=n).length;i<r;++i)t=e[i],c.a?JA(c.a,c.b):c.a=new lx(c.d),WA(c.a,""+t);return c.a?0==c.e.length?c.a.a:c.a.a+""+c.e:c.c}function SLn(n){var t,e,i,r,c;if(null==n)return IZn;for(c=new Ysn(TZn,"[","]"),i=0,r=(e=n).length;i<r;++i)t=e[i],c.a?JA(c.a,c.b):c.a=new lx(c.d),WA(c.a,""+t);return c.a?0==c.e.length?c.a.a:c.a.a+""+c.e:c.c}function PLn(n){var t,e,i,r,c;if(null==n)return IZn;for(c=new Ysn(TZn,"[","]"),i=0,r=(e=n).length;i<r;++i)t=e[i],c.a?JA(c.a,c.b):c.a=new lx(c.d),WA(c.a,""+t);return c.a?0==c.e.length?c.a.a:c.a.a+""+c.e:c.c}function CLn(n,t){var e,i,r,c,a,o;for(e=n.b.c.length,r=zq(n.b,t);2*t+1<e&&(o=c=2*t+1,(a=c+1)<e&&n.a.Ne(zq(n.b,a),zq(n.b,c))<0&&(o=a),i=o,!(n.a.Ne(r,zq(n.b,i))<0));)Y8(n.b,t,zq(n.b,i)),t=i;Y8(n.b,t,r)}function ILn(n,t,e){var i,r;return i=e.d,r=e.e,n.g[i.d]<=n.i[t.d]&&n.i[t.d]<=n.i[i.d]&&n.g[r.d]<=n.i[t.d]&&n.i[t.d]<=n.i[r.d]?!(n.i[i.d]<n.i[r.d]):n.i[i.d]<n.i[r.d]}function OLn(n,t){var e;if((e=uG(oIn(t,(jYn(),Kyt)),322))!=n)throw hv(new EM("The hierarchy aware processor "+e+" in child node "+t+" is only allowed if the root node specifies the same hierarchical processor."))}function ALn(n,t){var e,i,r,c,a;for(!t.s&&(t.s=new fV(o_t,t,21,17)),c=null,r=0,a=(i=t.s).i;r<a;++r)switch(sJ(Nen(n,e=uG(zrn(i,r),179)))){case 2:case 3:!c&&(c=new Zm),mv(c.c,e)}return c||(hZ(),hZ(),zot)}function LLn(n,t,i){var r,c,a,o,u,s;for(s=M0n,a=new Ww($Rn(n.b));a.a<a.c.c.length;)for(c=uG(N3(a),177),u=new Ww($Rn(t.b));u.a<u.c.c.length;)o=uG(N3(u),177),r=xhn(c.a,c.b,o.a,o.b,i),s=e.Math.min(s,r);return s}function NLn(n,t){if(!t)throw hv(new Rv);if(n.j=t,!n.d)switch(n.j.g){case 1:n.a.a=n.o.a/2,n.a.b=0;break;case 2:n.a.a=n.o.a,n.a.b=n.o.b/2;break;case 3:n.a.a=n.o.a/2,n.a.b=n.o.b;break;case 4:n.a.a=0,n.a.b=n.o.b/2}}function $Ln(n,t){var i,r;return F$(t.g,10)&&uG(t.g,10).k==(zIn(),lbt)?M0n:Q6(t)?e.Math.max(0,n.b/2-.5):(i=z4(t))?(r=uM(pK(Omn(i,(jYn(),ETt)))),e.Math.max(0,r/2-.5)):M0n}function DLn(n,t){var i,r;return F$(t.g,10)&&uG(t.g,10).k==(zIn(),lbt)?M0n:Q6(t)?e.Math.max(0,n.b/2-.5):(i=z4(t))?(r=uM(pK(Omn(i,(jYn(),ETt)))),e.Math.max(0,r/2-.5)):M0n}function xLn(n,t){var e,i,r,c;for(GB(),e=null,r=t.Kc();r.Ob();)(i=uG(r.Pb(),131)).o||(kD((c=new Hqn(R$(i.a),IG(i.a),null,uG(i.d.a.ec().Kc().Pb(),18))).c,i.a),mv(n.c,c),e&&kD(e.d,c),e=c)}function RLn(n){var t,e,i,r;for(r=Vwn(n.d,n.e).Kc();r.Ob();)for(i=uG(r.Pb(),12),e=new Ww(n.e==(KQn(),_Rt)?i.e:i.g);e.a<e.c.c.length;)v9(t=uG(N3(e),18))||t.c.i.c==t.d.i.c||(MOn(n,t),++n.f,++n.c)}function KLn(n,t){var e,i;if(t.dc())return hZ(),hZ(),zot;for(kD(i=new Zm,xwn(j1n)),e=1;e<n.f;++e)null==n.a&&fBn(n),n.a[e]&&kD(i,xwn(e));return 1==i.c.length?(hZ(),hZ(),zot):(kD(i,xwn(vZn)),Aqn(t,i))}function FLn(n,t){var e,i,r,c,a,o;e=Hjn(t,o=t.c.i.k!=(zIn(),dbt)?t.d:t.c).i,r=uG(cQ(n.k,o),125),i=n.i[e.p].a,A_(o.i)<(e.c?Ten(e.c.a,e,0):-1)?(c=r,a=i):(c=i,a=r),RKn(xS(DS(RS($S(new uk,0),4),c),a))}function _Ln(n,t,e){var i,r,c;if(e)for(r=((i=new Gz(e.a.length)).b-i.a)*i.c<0?(CP(),XHt):new xD(i);r.Ob();)(c=gTn(n,fNn(uin(e,uG(r.Pb(),17).a))))&&(!t.b&&(t.b=new f_(cFt,t,4,7)),ttn(t.b,c))}function BLn(n,t,e){var i,r,c;if(e)for(r=((i=new Gz(e.a.length)).b-i.a)*i.c<0?(CP(),XHt):new xD(i);r.Ob();)(c=gTn(n,fNn(uin(e,uG(r.Pb(),17).a))))&&(!t.c&&(t.c=new f_(cFt,t,5,8)),ttn(t.c,c))}function HLn(n,t,e){var i,r;i=t.a&n.f,t.b=n.b[i],n.b[i]=t,r=t.f&n.f,t.d=n.c[r],n.c[r]=t,e?(t.e=e.e,t.e?t.e.c=t:n.a=t,t.c=e.c,t.c?t.c.e=t:n.e=t):(t.e=n.e,t.c=null,n.e?n.e.c=t:n.a=t,n.e=t),++n.i,++n.g}function ULn(n){var t,e,i;if(t=n.Pb(),!n.Ob())return t;for(i=QA(JA(new WM,"expected one element but was: <"),t),e=0;e<4&&n.Ob();e++)QA((i.a+=TZn,i),n.Pb());throw n.Ob()&&(i.a+=", ..."),i.a+=">",hv(new vM(i.a))}function GLn(n){var t,e;return e=-n.a,t=Uhn(cT(JHt,1),N1n,28,15,[43,48,48,48,48]),e<0&&(t[0]=45,e=-e),t[1]=t[1]+((e/60|0)/10|0)&D1n,t[2]=t[2]+(e/60|0)%10&D1n,t[3]=t[3]+(e%60/10|0)&D1n,t[4]=t[4]+e%10&D1n,mvn(t,0,t.length)}function qLn(n){var t,e,i,r;for(n.g=new rpn(uG(WW(YRt),297)),i=0,KQn(),e=yRt,t=0;t<n.j.c.length;t++)(r=uG(zq(n.j,t),12)).j!=e&&(i!=t&&UV(n.g,e,new WO(xwn(i),xwn(t))),e=r.j,i=t);UV(n.g,e,new WO(xwn(i),xwn(t)))}function XLn(n){var t,e,i,r,c;for(e=0,t=new Ww(n.b);t.a<t.c.c.length;)for(r=new Ww(uG(N3(t),30).a);r.a<r.c.c.length;)for((i=uG(N3(r),10)).p=e++,c=new Ww(i.j);c.a<c.c.c.length;)uG(N3(c),12).p=e++}function zLn(n,t){var e,i,r;if(!(r=iVn((gAn(),kBt),n.Dh(),t)))throw hv(new vM(Gtt+t.xe()+qtt));PP(),uG(r,69).xk()||(r=_3(Nen(kBt,r))),i=uG((e=n.Ih(r))>=0?n.Lh(e,!0,!0):YNn(n,r,!0),160),uG(i,220).Zl(t)}function VLn(n){var t,i;return n>-0x800000000000&&n<0x800000000000?0==n?0:((t=n<0)&&(n=-n),i=t0(e.Math.floor(e.Math.log(n)/.6931471805599453)),(!t||n!=e.Math.pow(2,i))&&++i,i):dhn(Bsn(n))}function WLn(n){var t,e,i,r,c,a,o;for(c=new XL,e=new Ww(n);e.a<e.c.c.length;)a=(t=uG(N3(e),132)).a,o=t.b,c.a._b(a)||c.a._b(o)||(r=a,i=o,a.e.b+a.j.b>2&&o.e.b+o.j.b<=2&&(r=o,i=a),c.a.zc(r,c),r.q=i);return c}function QLn(n,t,e){e.Ug("Eades radial",1),e.dh(t,w7n),n.d=uG(zDn(t,(SK(),zCt)),27),n.c=uM(pK(zDn(t,(jOn(),HIt)))),n.e=aMn(uG(zDn(t,zIt),300)),n.a=_pn(uG(zDn(t,WIt),434)),n.b=PSn(uG(zDn(t,KIt),354)),UEn(n),e.dh(t,w7n)}function JLn(n,t){if(t.Ug("Target Width Setter",1),!vnn(n,(S_n(),vAt)))throw hv(new jM("A target width has to be set if the TargetWidthWidthApproximator should be used."));Myn(n,(lBn(),POt),pK(zDn(n,vAt))),t.Vg()}function YLn(n,t){var e,i,r;return zsn(i=new gMn(n),t),kfn(i,(GYn(),Kpt),t),kfn(i,(jYn(),JMt),($Pn(),cRt)),kfn(i,byt,(nMn(),ONt)),Hb(i,(zIn(),lbt)),o2(e=new lOn,i),NLn(e,(KQn(),_Rt)),o2(r=new lOn,i),NLn(r,kRt),i}function ZLn(n){switch(n.g){case 0:return new zy((ean(),_Et));case 1:return new bl;case 2:return new wl;default:throw hv(new vM("No implementation is available for the crossing minimizer "+(null!=n.f?n.f:""+n.g)))}}function nNn(n,t){var e,i,r,c;for(n.c[t.p]=!0,kD(n.a,t),c=new Ww(t.j);c.a<c.c.c.length;)for(e=new w7((r=uG(N3(c),12)).b);l$(e.a)||l$(e.b);)i=Ivn(r,uG(l$(e.a)?N3(e.a):N3(e.b),18)).i,n.c[i.p]||nNn(n,i)}function tNn(n){var t,i,r,c,a,o,u;for(o=0,i=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));i.e!=i.i.gc();)u=(t=uG(Zkn(i),27)).g,c=t.f,r=e.Math.sqrt(u*u+c*c),o=e.Math.max(r,o),a=tNn(t),o=e.Math.max(a,o);return o}function eNn(){eNn=E,gRt=new xO("OUTSIDE",0),wRt=new xO("INSIDE",1),dRt=new xO("NEXT_TO_PORT_IF_POSSIBLE",2),bRt=new xO("ALWAYS_SAME_SIDE",3),lRt=new xO("ALWAYS_OTHER_SAME_SIDE",4),pRt=new xO("SPACE_EFFICIENT",5)}function iNn(n,t,e){var i,r,c,a;return Gan(i=y6(n,(gj(),r=new Bk,!!e&&GRn(r,e),r),t),k6(t,Iet)),fCn(t,i),YDn(t,i),kLn(t,i),c=p6(t,"ports"),pRn((a=new oA(n,i)).a,a.b,c),qfn(n,t,i),vhn(n,t,i),i}function rNn(n){var t,e;return e=-n.a,t=Uhn(cT(JHt,1),N1n,28,15,[43,48,48,58,48,48]),e<0&&(t[0]=45,e=-e),t[1]=t[1]+((e/60|0)/10|0)&D1n,t[2]=t[2]+(e/60|0)%10&D1n,t[4]=t[4]+(e%60/10|0)&D1n,t[5]=t[5]+e%10&D1n,mvn(t,0,t.length)}function cNn(n){var t;return t=Uhn(cT(JHt,1),N1n,28,15,[71,77,84,45,48,48,58,48,48]),n<=0&&(t[3]=43,n=-n),t[4]=t[4]+((n/60|0)/10|0)&D1n,t[5]=t[5]+(n/60|0)%10&D1n,t[7]=t[7]+(n%60/10|0)&D1n,t[8]=t[8]+n%10&D1n,mvn(t,0,t.length)}function aNn(n){var t,e,i,r,c;if(null==n)return IZn;for(c=new Ysn(TZn,"[","]"),i=0,r=(e=n).length;i<r;++i)t=e[i],c.a?JA(c.a,c.b):c.a=new lx(c.d),WA(c.a,""+oV(t));return c.a?0==c.e.length?c.a.a:c.a.a+""+c.e:c.c}function oNn(n,t){var i,r,c;for(c=vZn,r=new Ww(Ebn(t));r.a<r.c.c.length;)(i=uG(N3(r),218)).f&&!n.c[i.c]&&(n.c[i.c]=!0,c=e.Math.min(c,oNn(n,hpn(i,t))));return n.i[t.d]=n.j,n.g[t.d]=e.Math.min(c,n.j++),n.g[t.d]}function uNn(n,t){var e,i,r;for(r=uG(uG(Y9(n.r,t),21),87).Kc();r.Ob();)(i=uG(r.Pb(),117)).e.b=(e=i.b).pf((XYn(),uDt))?e.ag()==(KQn(),yRt)?-e.Mf().b-uM(pK(e.of(uDt))):uM(pK(e.of(uDt))):e.ag()==(KQn(),yRt)?-e.Mf().b:0}function sNn(n){var t,e,i,r,c,a,o;for(e=AN(n.e),c=vD(HR(D$(ON(n.e)),n.d*n.a,n.c*n.b),-.5),t=e.a-c.a,r=e.b-c.b,o=0;o<n.c;o++){for(i=t,a=0;a<n.d;a++)vpn(n.e,new gY(i,r,n.a,n.b))&&HBn(n,a,o,!1,!0),i+=n.a;r+=n.b}}function hNn(n){var t,e,i,r,c;t=n.a,e=n.b,r=n.c,i=new MO(e.e.a+e.f.a/2,e.e.b+e.f.b/2),c=new MO(r.e.a+r.f.a/2,r.e.b+r.f.b/2),s8(t,i,t.a,t.a.a),s8(t,c,t.c.b,t.c),KIn(i,uG(hyn(t,1),8),n.b.f),KIn(c,uG(hyn(t,t.b-2),8),n.c.f)}function fNn(n){var t;if(t=!1,F$(n,211))return t=!0,uG(n,211).a;if(!t&&F$(n,263)&&uG(n,263).a%1==0)return t=!0,xwn(AL(uG(n,263).a));throw hv(new SM("Id must be a string or an integer: '"+n+"'."))}function lNn(n,t){var e,i,r,c,a,o;for(c=null,r=new dV((!n.a&&(n.a=new qm(n)),n.a));u$n(r);)if(hXn(a=(e=uG(Wxn(r),58)).Dh()),null!=(i=(o=a.o)&&e.Xh(o)?d_(khn(o),e.Mh(o)):null)&&m_(i,t)){c=e;break}return c}function bNn(n,t,e){var i,r,c,a,o;if(man(e,"occurrences"),0==e)return(o=uG(Xwn(nZ(n.a),t),16))?o.gc():0;if(!(a=uG(Xwn(nZ(n.a),t),16)))return 0;if(e>=(c=a.gc()))a.$b();else for(r=a.Kc(),i=0;i<e;i++)r.Pb(),r.Qb();return c}function wNn(n,t,e){var i,r,c;return man(e,"oldCount"),man(0,"newCount"),((i=uG(Xwn(nZ(n.a),t),16))?i.gc():0)==e&&(man(0,"count"),(c=-((r=uG(Xwn(nZ(n.a),t),16))?r.gc():0))>0?HM():c<0&&bNn(n,t,-c),!0)}function dNn(n){var t,e,i,r,c,a;if(a=0,0==n.b){for(t=0,r=0,c=(i=AMn(n,!0)).length;r<c;++r)(e=i[r])>0&&(a+=e,++t);t>1&&(a+=n.c*(t-1))}else a=fT(Mun(ZJ(JJ(BV(n.a),new jn),new En)));return a>0?a+n.n.d+n.n.a:0}function gNn(n){var t,e,i,r,c,a;if(a=0,0==n.b)a=fT(Mun(ZJ(JJ(BV(n.a),new Mn),new Tn)));else{for(t=0,r=0,c=(i=LMn(n,!0)).length;r<c;++r)(e=i[r])>0&&(a+=e,++t);t>1&&(a+=n.c*(t-1))}return a>0?a+n.n.b+n.n.c:0}function pNn(n){var t,e;if(2!=n.c.length)throw hv(new kM("Order only allowed for two paths."));u3(0,n.c.length),t=uG(n.c[0],18),u3(1,n.c.length),e=uG(n.c[1],18),t.d.i!=e.c.i&&(n.c.length=0,mv(n.c,e),mv(n.c,t))}function mNn(n,t,e){var i;for(vN(e,t.g,t.f),kN(e,t.i,t.j),i=0;i<(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a).i;i++)mNn(n,uG(zrn((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a),i),27),uG(zrn((!e.a&&(e.a=new fV(bFt,e,10,11)),e.a),i),27))}function vNn(n,t){var i,r,c,a;for(i=(a=uG(AJ(n.b,t),127)).a,c=uG(uG(Y9(n.r,t),21),87).Kc();c.Ob();)(r=uG(c.Pb(),117)).c&&(i.a=e.Math.max(i.a,rq(r.c)));if(i.a>0)switch(t.g){case 2:a.n.c=n.s;break;case 4:a.n.b=n.s}}function kNn(n,t){var e,i,r;return 0==(e=uG(oIn(t,(cGn(),$ft)),17).a-uG(oIn(n,$ft),17).a)?(i=YF(D$(uG(oIn(n,(mon(),zft)),8)),uG(oIn(n,Vft),8)),r=YF(D$(uG(oIn(t,zft),8)),uG(oIn(t,Vft),8)),ugn(i.a*i.b,r.a*r.b)):e}function yNn(n,t){var e,i,r;return 0==(e=uG(oIn(t,(QGn(),yCt)),17).a-uG(oIn(n,yCt),17).a)?(i=YF(D$(uG(oIn(n,(OQn(),vPt)),8)),uG(oIn(n,kPt),8)),r=YF(D$(uG(oIn(t,vPt),8)),uG(oIn(t,kPt),8)),ugn(i.a*i.b,r.a*r.b)):e}function MNn(n){var t,e;return(e=new WM).a+="e_",null!=(t=bhn(n))&&(e.a+=""+t),n.c&&n.d&&(JA((e.a+=" ",e),njn(n.c)),JA(QA((e.a+="[",e),n.c.i),"]"),JA((e.a+=Y4n,e),njn(n.d)),JA(QA((e.a+="[",e),n.d.i),"]")),e.a}function TNn(n){switch(n.g){case 0:return new Tl;case 1:return new jl;case 2:return new yl;case 3:return new kl;default:throw hv(new vM("No implementation is available for the layout phase "+(null!=n.f?n.f:""+n.g)))}}function jNn(n,t,i,r,c){var a;switch(a=0,c.g){case 1:a=e.Math.max(0,t.b+n.b-(i.b+r));break;case 3:a=e.Math.max(0,-n.b-r);break;case 2:a=e.Math.max(0,-n.a-r);break;case 4:a=e.Math.max(0,t.a+n.a-(i.a+r))}return a}function ENn(n,t,e){var i,r,c;if(e)for(c=((i=new Gz(e.a.length)).b-i.a)*i.c<0?(CP(),XHt):new xD(i);c.Ob();)r=v6(e,uG(c.Pb(),17).a),vet in r.a||ket in r.a?bHn(n,r,t):JJn(n,r,t),GD(uG(cQ(n.b,jvn(r)),74))}function SNn(n){var t,e;switch(n.b){case-1:return!0;case 0:return(e=n.t)>1||-1==e||(t=bEn(n))&&(PP(),t.lk()==srt)?(n.b=-1,!0):(n.b=1,!1);default:return!1}}function PNn(n,t){var e,i,r,c;if(EYn(n),0!=n.c||123!=n.a)throw hv(new CM(rZn((t$(),bit))));if(c=112==t,i=n.d,(e=aR(n.i,125,i))<0)throw hv(new CM(rZn((t$(),wit))));return r=r1(n.i,i,e),n.d=e+1,itn(r,c,!(512&~n.e))}function CNn(n){var t,e,i,r,c,a,o;if((i=n.a.c.length)>0)for(a=n.c.d,r=vD(YF(new MO((o=n.d.d).a,o.b),a),1/(i+1)),c=new MO(a.a,a.b),e=new Ww(n.a);e.a<e.c.c.length;)(t=uG(N3(e),250)).d.a=c.a+r.a,t.d.b=c.b+r.b,JF(c,r)}function INn(n,t){var e,i,r;if(t)if(4&t.i)for(i="[]",e=t.c;;e=e.c){if(!(4&e.i)){qan(n,r=lM((vK(e),e.o+i))),Ocn(n,r);break}i+="[]"}else qan(n,r=lM((vK(t),t.o))),Ocn(n,r);else qan(n,null),Ocn(n,null);n.hl(t)}function ONn(n,t,e,i,r){var c,a,o,u;return xA(u=fK(n,uG(r,58)))!==xA(r)?(o=uG(n.g[e],76),yD(n,e,WPn(n,e,c=R5(t,u))),uN(n.e)&&(kPn(a=VZ(n,9,c.Lk(),r,u,i,!1),new Ken(n.e,9,n.c,o,c,i,!1)),Cen(a)),u):r}function ANn(n,t,e){var i,r,c,a,o,u;for(i=uG(Y9(n.c,t),15),r=uG(Y9(n.c,e),15),c=i.fd(i.gc()),a=r.fd(r.gc());c.Sb()&&a.Sb();)if((o=uG(c.Ub(),17))!=(u=uG(a.Ub(),17)))return d$(o.a,u.a);return c.Ob()||a.Ob()?c.Ob()?1:-1:0}function LNn(n){var t,e,i,r,c,a;for(a=iR(n.c.length),r=new Ww(n);r.a<r.c.c.length;){for(i=uG(N3(r),10),c=new ek,e=new Fz(ix(Xgn(i).a.Kc(),new h));hDn(e);)(t=uG(N9(e),18)).c.i==t.d.i||FV(c,t.d.i);mv(a.c,c)}return a}function NNn(n,t){var e,i;try{return C3(n.a,t)}catch(r){if(F$(r=Ehn(r),33)){try{if(i=vUn(t,j1n,vZn),e=Mj(n.a),i>=0&&i<e.length)return e[i]}catch(c){if(!F$(c=Ehn(c),130))throw hv(c)}return null}throw hv(r)}}function $Nn(n,t){var e,i,r;if(r=iVn((gAn(),kBt),n.Dh(),t))return PP(),uG(r,69).xk()||(r=_3(Nen(kBt,r))),i=uG((e=n.Ih(r))>=0?n.Lh(e,!0,!0):YNn(n,r,!0),160),uG(i,220).Wl(t);throw hv(new vM(Gtt+t.xe()+ztt))}function DNn(){var n;return IP(),pBt?uG(jxn((MP(),l_t),Drt),2038):(ML(Sat,new Eh),yWn(),n=uG(F$(U1((MP(),l_t),Drt),560)?U1(l_t,Drt):new dJ,560),pBt=!0,HYn(n),oZn(n),vJ((pP(),k_t),n,new Bs),r2(l_t,Drt,n),n)}function xNn(n,t){var e,i,r,c;n.j=-1,uN(n.e)?(e=n.i,c=0!=n.i,z9(n,t),i=new Ken(n.e,3,n.c,null,t,e,c),r=t.zl(n.e,n.c,null),(r=yPn(n,t,r))?(r.nj(i),r.oj()):Msn(n.e,i)):(z9(n,t),(r=t.zl(n.e,n.c,null))&&r.oj())}function RNn(n,t){var e,i,r;if(r=0,(i=t[0])>=n.length)return-1;for(s3(i,n.length),e=n.charCodeAt(i);e>=48&&e<=57&&(r=10*r+(e-48),!(++i>=n.length));)s3(i,n.length),e=n.charCodeAt(i);return i>t[0]?t[0]=i:r=-1,r}function KNn(n){var t,i,r,c,a;return i=c=uG(n.a,17).a,r=a=uG(n.b,17).a,t=e.Math.max(e.Math.abs(c),e.Math.abs(a)),c<=0&&c==a?(i=0,r=a-1):c==-t&&a!=t?(i=a,r=c,a>=0&&++i):(i=-a,r=c),new WO(xwn(i),xwn(r))}function FNn(n,t,e,i){var r,c,a,o,u,s;for(r=0;r<t.o;r++)for(c=r-t.j+e,a=0;a<t.p;a++)if(u=c,s=o=a-t.k+i,u+=n.j,s+=n.k,u>=0&&s>=0&&u<n.o&&s<n.p&&(!iTn(t,r,a)&&_Mn(n,c,o)||eTn(t,r,a)&&!BMn(n,c,o)))return!0;return!1}function _Nn(n,t,e){var i,r,c,a;c=n.c,a=n.d,r=(Gfn(Uhn(cT(PNt,1),zZn,8,0,[c.i.n,c.n,c.a])).b+Gfn(Uhn(cT(PNt,1),zZn,8,0,[a.i.n,a.n,a.a])).b)/2,i=null,i=c.j==(KQn(),kRt)?new MO(t+c.i.c.c.a+e,r):new MO(t-e,r),sR(n.a,0,i)}function BNn(n){var t,e,i;for(t=null,e=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[(!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c)])));hDn(e);)if(i=lCn(uG(N9(e),84)),t){if(t!=i)return!1}else t=i;return!0}function HNn(n,t,e){var i;if(++n.j,t>=n.i)throw hv(new dM(zet+t+Vet+n.i));if(e>=n.i)throw hv(new dM(Wet+e+Vet+n.i));return i=n.g[e],t!=e&&(t<e?qGn(n.g,t,n.g,t+1,e-t):qGn(n.g,e+1,n.g,e,t-e),uQ(n.g,t,i),n.Pi(t,i,e),n.Ni()),i}function UNn(n,t,e){var i;if(i=uG(n.c.xc(t),16))return!!i.Fc(e)&&(++n.d,!0);if((i=n.ic(t)).Fc(e))return++n.d,n.c.zc(t,i),!0;throw hv(new x9("New Collection violated the Collection spec"))}function GNn(n){var t,e,i;return n<0?0:0==n?32:(e=16-(t=(i=-(n>>16))>>16&16),e+=t=(i=(n>>=t)-256)>>16&8,e+=t=(i=(n<<=t)-j0n)>>16&4,(e+=t=(i=(n<<=t)-VZn)>>16&2)+2-(t=(i=(n<<=t)>>14)&~(i>>1)))}function qNn(n){var t,e,i,r;for(lZ(),aft=new Zm,cft=new Ym,rft=new Zm,!n.a&&(n.a=new fV(bFt,n,10,11)),JQn(t=n.a),r=new DD(t);r.e!=r.i.gc();)i=uG(Zkn(r),27),-1==Ten(aft,i,0)&&(e=new Zm,kD(rft,e),skn(i,e));return rft}function XNn(n,t,e){var i,r,c,a;n.a=e.b.d,F$(t,326)?(z8(c=COn(r=JFn(uG(t,74),!1,!1)),i=new Kd(n)),sqn(c,r),null!=t.of((XYn(),L$t))&&z8(uG(t.of(L$t),75),i)):((a=uG(t,422)).rh(a.nh()+n.a.a),a.sh(a.oh()+n.a.b))}function zNn(n,t){var e,i,r;for(r=new Zm,i=Fkn(t.a,0);i.b!=i.d.c;)(e=uG(I6(i),65)).c.g==n.g&&xA(oIn(e.b,(QGn(),ACt)))!==xA(oIn(e.c,ACt))&&!o9(new fX(null,new h3(r,16)),new kp(e))&&mv(r.c,e);return f$(r,new ja),r}function VNn(n,t,e){var i,r,c,a;return F$(t,153)&&F$(e,153)?(c=uG(t,153),a=uG(e,153),n.a[c.a][a.a]+n.a[a.a][c.a]):F$(t,250)&&F$(e,250)&&(i=uG(t,250),r=uG(e,250),i.a==r.a)?uG(oIn(r.a,(cGn(),$ft)),17).a:0}function WNn(n,t){var i,r,c,a,o,u,s,h;for(h=uM(pK(oIn(t,(jYn(),ITt)))),s=n[0].n.a+n[0].o.a+n[0].d.c+h,u=1;u<n.length;u++)r=n[u].n,c=n[u].o,i=n[u].d,(a=r.a-i.b-s)<0&&(r.a-=a),(o=t.f).a=e.Math.max(o.a,r.a+c.a),s=r.a+c.a+i.c+h}function QNn(n,t){var e,i,r,c,a,o;return i=uG(uG(cQ(n.g,t.a),42).a,68),r=uG(uG(cQ(n.g,t.b),42).a,68),(e=vzn(c=i.b,a=r.b))>=0?e:(o=NQ(YF(new MO(a.c+a.b/2,a.d+a.a/2),new MO(c.c+c.b/2,c.d+c.a/2))),-(oGn(c,a)-1)*o)}function JNn(n,t,e){var i;kS(new fX(null,(!e.a&&(e.a=new fV(oFt,e,6,6)),new h3(e.a,16))),new zO(n,t)),kS(new fX(null,(!e.n&&(e.n=new fV(lFt,e,1,7)),new h3(e.n,16))),new VO(n,t)),(i=uG(zDn(e,(XYn(),L$t)),75))&&fun(i,n,t)}function YNn(n,t,e){var i,r,c;if(c=iVn((gAn(),kBt),n.Dh(),t))return PP(),uG(c,69).xk()||(c=_3(Nen(kBt,c))),r=uG((i=n.Ih(c))>=0?n.Lh(i,!0,!0):YNn(n,c,!0),160),uG(r,220).Sl(t,e);throw hv(new vM(Gtt+t.xe()+ztt))}function ZNn(n,t,e,i){var r,c,a,o,u;if(r=n.d[t])if(c=r.g,u=r.i,null!=i){for(o=0;o<u;++o)if((a=uG(c[o],136)).Bi()==e&&udn(i,a.ld()))return a}else for(o=0;o<u;++o)if(xA((a=uG(c[o],136)).ld())===xA(i))return a;return null}function n$n(n,t){var e,i,r,c,a;for(!t.s&&(t.s=new fV(o_t,t,21,17)),c=null,r=0,a=(i=t.s).i;r<a;++r)switch(sJ(Nen(n,e=uG(zrn(i,r),179)))){case 4:case 5:case 6:!c&&(c=new Zm),mv(c.c,e)}return c||(hZ(),hZ(),zot)}function t$n(n,t){var e;if(t<0)throw hv(new wM("Negative exponent"));if(0==t)return xot;if(1==t||Cpn(n,xot)||Cpn(n,_ot))return n;if(!aDn(n,0)){for(e=1;!aDn(n,e);)++e;return j5(Ypn(e*t),t$n($9(n,e),t))}return cCn(n,t)}function e$n(n,t){var e,i,r;if(xA(n)===xA(t))return!0;if(null==n||null==t)return!1;if(n.length!=t.length)return!1;for(e=0;e<n.length;++e)if(i=n[e],r=t[e],!(xA(i)===xA(r)||null!=i&&udn(i,r)))return!1;return!0}function i$n(n){var t,e,i;for(GS(),this.b=Dlt,this.c=(xdn(),ZDt),this.f=(US(),Alt),this.a=n,ET(this,new Tt),fKn(this),i=new Ww(n.b);i.a<i.c.c.length;)(e=uG(N3(i),86)).d||(t=new Zvn(Uhn(cT(xlt,1),EZn,86,0,[e])),kD(n.a,t))}function r$n(n,t,e){var i,r,c,a,o,u;if(!n||0==n.c.length)return null;for(c=new c1(t,!e),r=new Ww(n);r.a<r.c.c.length;)i=uG(N3(r),72),LOn(c,(zS(),new Xd(i)));return(a=c.i).a=(u=c.n,c.e.b+u.d+u.a),a.b=(o=c.n,c.e.a+o.b+o.c),c}function c$n(n){var t,e,i,r,c,a,o;for(zL(o=D4(n.a),new Pe),e=null,c=0,a=(r=o).length;c<a&&(i=r[c]).k==(zIn(),lbt);++c)(t=uG(oIn(i,(GYn(),Fpt)),64))!=(KQn(),_Rt)&&t!=kRt||(e&&uG(oIn(e,Vpt),15).Fc(i),e=i)}function a$n(n,t,e){var i,r,c,a,o,u;u3(t,n.c.length),o=uG(n.c[t],339),i7(n,t),o.b/2>=e&&(i=t,c=(u=(o.c+o.a)/2)-e,o.c<=u-e&&GX(n,i++,new OU(o.c,c)),(a=u+e)<=o.a&&(r=new OU(a,o.a),o3(i,n.c.length),pC(n.c,i,r)))}function o$n(n,t,e){var i,r,c,a;if(!t.dc()){for(i=new lS,a=t.Kc();a.Ob();)for(c=uG(a.Pb(),40),vJ(n.a,xwn(c.g),xwn(e)),r=new Tp(Fkn(new Mp(c).a.d,0));Jj(r.a);)s8(i,uG(I6(r.a),65).c,i.c.b,i.c);o$n(n,i,e+1)}}function u$n(n){var t;if(n.c||null!=n.g){if(null==n.g)return!0;if(0==n.i)return!1;t=uG(n.g[n.i-1],51)}else n.d=n.bj(n.f),ttn(n,n.d),t=n.d;return t==n.b&&null.Vm>=null.Um()?(Wxn(n),u$n(n)):t.Ob()}function s$n(n){if(this.a=n,n.c.i.k==(zIn(),lbt))this.c=n.c,this.d=uG(oIn(n.c.i,(GYn(),Fpt)),64);else{if(n.d.i.k!=lbt)throw hv(new vM("Edge "+n+" is not an external edge."));this.c=n.d,this.d=uG(oIn(n.d.i,(GYn(),Fpt)),64)}}function h$n(n,t){var e,i,r;r=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,3,r,n.b)),t?t!=n&&(qon(n,t.zb),Icn(n,t.d),Uan(n,null==(e=null==(i=t.c)?t.zb:i)||m_(e,t.zb)?null:e)):(qon(n,null),Icn(n,0),Uan(n,null))}function f$n(n,t){var e;this.e=(ZW(),WW(n),ZW(),Emn(n)),this.c=(WW(t),Emn(t)),FD(this.e.Rd().dc()==this.c.Rd().dc()),this.d=Qgn(this.e),this.b=Qgn(this.c),e=Jq(dat,[zZn,EZn],[5,1],5,[this.e.Rd().gc(),this.c.Rd().gc()],2),this.a=e,wan(this)}function l$n(n){var t=(!Rat&&(Rat=mJn()),Rat);return'"'+n.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,(function(n){return z1(n,t)}))+'"'}function b$n(n,t,i,r,c,a){var o,u,s,h,f;if(0!=c)for(xA(n)===xA(i)&&(n=n.slice(t,t+c),t=0),s=i,u=t,h=t+c;u<h;)c=(o=e.Math.min(u+1e4,h))-u,(f=n.slice(u,o)).splice(0,0,r,a?c:0),Array.prototype.splice.apply(s,f),u=o,r+=c}function w$n(n){var t,e;for(fZ(),this.b=Gut,this.c=Xut,this.g=(_S(),Uut),this.d=(xdn(),ZDt),this.a=n,hKn(this),e=new Ww(n.b);e.a<e.c.c.length;)!(t=uG(N3(e),60)).a&&Mx(Xcn(new fk,Uhn(cT(zut,1),EZn,60,0,[t])),n),t.e=new qZ(t.d)}function d$n(n){var t,e,i,r,c;for(r=n.e.c.length,i=Inn(yat,H3n,15,r,0,1),c=new Ww(n.e);c.a<c.c.c.length;)i[uG(N3(c),153).a]=new lS;for(e=new Ww(n.c);e.a<e.c.c.length;)i[(t=uG(N3(e),290)).c.a].Fc(t),i[t.d.a].Fc(t);return i}function g$n(n,t){var e,i,r,c,a;if(t>=(a=null==(e=uG(Lsn(n.a,4),129))?0:e.length))throw hv(new w_(t,a));return r=e[t],1==a?i=null:(qGn(e,0,i=Inn(xFt,Uit,424,a-1,0,1),0,t),(c=a-t-1)>0&&qGn(e,t+1,i,t,c)),Pkn(n,i),GAn(n,t,r),r}function p$n(n){var t,e;if(n.f){for(;n.n<n.o;){if(F$(e=(t=uG(n.j?n.j.$i(n.n):n.k.Xb(n.n),76)).Lk(),102)&&uG(e,19).Bb&Qtt&&(!n.e||e.pk()!=tFt||0!=e.Lj())&&null!=t.md())return!0;++n.n}return!1}return n.n<n.o}function m$n(){m$n=E,NBt=uG(zrn(gZ((yj(),RBt).qb),6),35),OBt=uG(zrn(gZ(RBt.qb),3),35),ABt=uG(zrn(gZ(RBt.qb),4),35),LBt=uG(zrn(gZ(RBt.qb),5),19),qSn(NBt),qSn(OBt),qSn(ABt),qSn(LBt),$Bt=new IM(Uhn(cT(o_t,1),krt,179,0,[NBt,OBt]))}function v$n(n,t){var e;this.d=new Nk,this.b=t,this.e=new eN(t.Lf()),e=n.u.Hc((eNn(),dRt)),n.u.Hc(wRt)?n.D?this.a=e&&!t.bg():this.a=!0:n.u.Hc(gRt)?this.a=!!e&&!(t.Uf().Kc().Ob()||t.Wf().Kc().Ob()):this.a=!1}function k$n(n,t){var e,i,r,c;for(e=n.o.a,c=uG(uG(Y9(n.r,t),21),87).Kc();c.Ob();)(r=uG(c.Pb(),117)).e.a=(i=r.b).pf((XYn(),uDt))?i.ag()==(KQn(),_Rt)?-i.Mf().a-uM(pK(i.of(uDt))):e+uM(pK(i.of(uDt))):i.ag()==(KQn(),_Rt)?-i.Mf().a:e}function y$n(n,t){var e,i,r;e=uG(oIn(n,(jYn(),Byt)),88),r=uG(zDn(t,eTt),64),(i=uG(oIn(n,JMt),101))!=($Pn(),uRt)&&i!=sRt?r==(KQn(),FRt)&&(r=RGn(t,e))==FRt&&(r=Ipn(e)):r=lzn(t)>0?Ipn(e):Gdn(Ipn(e)),Myn(t,eTt,r)}function M$n(n,t){t.Ug("Partition preprocessing",1),kS(uG(l8(JJ(sin(JJ(new fX(null,new h3(n.a,16)),new mi),new vi),new ki),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15).Oc(),new yi),t.Vg()}function T$n(n,t){var e,i,r,c,a;for(a=n.j,t.a!=t.b&&f$(a,new Yr),r=a.c.length/2|0,i=0;i<r;i++)u3(i,a.c.length),(c=uG(a.c[i],113)).c&&NLn(c.d,t.a);for(e=r;e<a.c.length;e++)u3(e,a.c.length),(c=uG(a.c[e],113)).c&&NLn(c.d,t.b)}function j$n(n,t,e){var i,r,c;return i=n.c[t.c.p][t.p],r=n.c[e.c.p][e.p],null!=i.a&&null!=r.a?((c=Rz(i.a,r.a))<0?sHn(n,t,e):c>0&&sHn(n,e,t),c):null!=i.a?(sHn(n,t,e),-1):null!=r.a?(sHn(n,e,t),1):0}function E$n(n,t){var e,i,r,c,a;for(r=t.b.b,n.a=Inn(yat,H3n,15,r,0,1),n.b=Inn(ZHt,B2n,28,r,16,1),a=Fkn(t.b,0);a.b!=a.d.c;)c=uG(I6(a),40),n.a[c.g]=new lS;for(i=Fkn(t.a,0);i.b!=i.d.c;)e=uG(I6(i),65),n.a[e.b.g].Fc(e),n.a[e.c.g].Fc(e)}function S$n(n,t){var e,i,r,c;n.Pj()?(e=n.Ej(),c=n.Qj(),++n.j,n.qj(e,n.Zi(e,t)),i=n.Ij(3,null,t,e,c),n.Mj()&&(r=n.Nj(t,null))?(r.nj(i),r.oj()):n.Jj(i)):(vQ(n,t),n.Mj()&&(r=n.Nj(t,null))&&r.oj())}function P$n(n,t,e){var i,r,c;n.Pj()?(c=n.Qj(),edn(n,t,e),i=n.Ij(3,null,e,t,c),n.Mj()?(r=n.Nj(e,null),n.Tj()&&(r=n.Uj(e,r)),r?(r.nj(i),r.oj()):n.Jj(i)):n.Jj(i)):(edn(n,t,e),n.Mj()&&(r=n.Nj(e,null))&&r.oj())}function C$n(n,t){var e,i,r,c,a;for(a=VKn(n.e.Dh(),t),r=new ls,e=uG(n.g,124),c=n.i;--c>=0;)i=e[c],a.am(i.Lk())&&ttn(r,i);!PJn(n,r)&&uN(n.e)&&Yv(n,t.Jk()?VZ(n,6,t,(hZ(),zot),null,-1,!1):VZ(n,t.tk()?2:1,t,null,null,-1,!1))}function I$n(n,t){var e,i,r,c;return n.a==(RIn(),Vgt)||(r=t.a.c,e=t.a.c+t.a.b,!(t.j&&(c=(i=t.A).c.c.a-i.o.a/2,r-(i.n.a+i.o.a)>c)||t.q&&(c=(i=t.C).c.c.a-i.o.a/2,i.n.a-e>c)))}function O$n(n){var t,e,i,r,c,a;for(e2(),e=new u8,i=new Ww(n.e.b);i.a<i.c.c.length;)for(c=new Ww(uG(N3(i),30).a);c.a<c.c.c.length;)r=uG(N3(c),10),(t=uG(ain(e,a=n.g[r.p]),15))||Akn(e,a,t=new Zm),t.Fc(r);return e}function A$n(n){var t;return 64&n.Db?vxn(n):((t=new fx(vxn(n))).a+=" (startX: ",Oj(t,n.j),t.a+=", startY: ",Oj(t,n.k),t.a+=", endX: ",Oj(t,n.b),t.a+=", endY: ",Oj(t,n.c),t.a+=", identifier: ",VA(t,n.d),t.a+=")",t.a)}function L$n(n){var t;return 64&n.Db?Wwn(n):((t=new fx(Wwn(n))).a+=" (ordered: ",Lj(t,!!(256&n.Bb)),t.a+=", unique: ",Lj(t,!!(512&n.Bb)),t.a+=", lowerBound: ",Aj(t,n.s),t.a+=", upperBound: ",Aj(t,n.t),t.a+=")",t.a)}function N$n(n,t,e,i,r,c,a,o){var u;return F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),4),qon(n,e),n.f=i,Qdn(n,r),Ydn(n,c),Wdn(n,a),Jdn(n,!1),mdn(n,!0),Cgn(n,o),ddn(n,!0),Pcn(n,0),n.b=0,Ccn(n,1),(u=CCn(n,t,null))&&u.oj(),Sgn(n,!1),n}function $$n(n,t){var i,r;return uG(U1(n.a,t),525)||(i=new e9(t),t9(),B_(i,$$n(n,r1(r=Nut?null:i.c,0,e.Math.max(0,ax(r,$Cn(46)))))),0==(Nut?null:i.c).length&&RK(i,new G),r2(n.a,Nut?null:i.c,i),i)}function D$n(n,t){var e;n.b=t,n.g=new Zm,e=q$n(n.b),n.e=e,n.f=e,n.c=oM(gK(oIn(n.b,(MEn(),est)))),n.a=pK(oIn(n.b,(XYn(),c$t))),null==n.a&&(n.a=1),uM(n.a)>1?n.e*=uM(n.a):n.f/=uM(n.a),_bn(n),Vvn(n),EBn(n),kfn(n.b,(ryn(),Qht),n.g)}function x$n(n,t,e){var i,r,c,a,o;for(i=0,o=e,t||(i=e*(n.c.length-1),o*=-1),c=new Ww(n);c.a<c.c.c.length;){for(kfn(r=uG(N3(c),10),(jYn(),byt),(nMn(),ONt)),r.o.a=i,a=yOn(r,(KQn(),kRt)).Kc();a.Ob();)uG(a.Pb(),12).n.a=i;i+=o}}function R$n(n,t,e){var i,r,c,a,o,u;return(o=n.pl(e))!=e?(a=n.g[t],u=o,yD(n,t,n.Zi(t,u)),c=a,n.Ri(t,u,c),n.al()&&(i=e,r=n.Oj(i,null),!uG(o,54).Ph()&&(r=n.Nj(u,r)),r&&r.oj()),uN(n.e)&&Yv(n,n.Ij(9,e,o,t,!1)),o):e}function K$n(n,t){var e,i,r;for(e=new Ww(n.a.a);e.a<e.c.c.length;)uG(N3(e),194).g=!0;for(r=new Ww(n.a.b);r.a<r.c.c.length;)(i=uG(N3(r),86)).k=oM(gK(n.e.Kb(new WO(i,t)))),i.d.g=i.d.g&oM(gK(n.e.Kb(new WO(i,t))));return n}function F$n(n,t){var e;if(0!=n.c.length){if(2==n.c.length)Gqn((u3(0,n.c.length),uG(n.c[0],10)),(Ajn(),$xt)),Gqn((u3(1,n.c.length),uG(n.c[1],10)),Dxt);else for(e=new Ww(n);e.a<e.c.c.length;)Gqn(uG(N3(e),10),t);n.c.length=0}}function _$n(n){var t,e,i,r,c;if(e=new nB(t=uG(Mj(YRt),9),uG(MF(t,t.length),9),0),c=uG(oIn(n,(GYn(),lmt)),10))for(r=new Ww(c.j);r.a<r.c.c.length;)xA(oIn(i=uG(N3(r),12),rmt))===xA(n)&&Dx(new w7(i.b))&&Mon(e,i.j);return e}function B$n(n,t,e){var i,r,c,a;if(!n.d[e.p]){for(i=new Fz(ix(Xgn(e).a.Kc(),new h));hDn(i);){for(c=new Fz(ix(qgn(a=uG(N9(i),18).d.i).a.Kc(),new h));hDn(c);)(r=uG(N9(c),18)).c.i==t&&(n.a[r.p]=!0);B$n(n,t,a)}n.d[e.p]=!0}}function H$n(n,t){var e,i,r,c,a,o,u;if(1==(i=Cdn(254&n.Db)))n.Eb=null;else if(c=Kcn(n.Eb),2==i)r=jTn(n,t),n.Eb=c[0==r?1:0];else{for(a=Inn(dat,EZn,1,i-1,5,1),e=2,o=0,u=0;e<=128;e<<=1)e==t?++o:n.Db&e&&(a[u++]=c[o++]);n.Eb=a}n.Db&=~t}function U$n(n){var t;switch(t=0,n){case 105:t=2;break;case 109:t=8;break;case 115:t=4;break;case 120:t=16;break;case 117:t=32;break;case 119:t=64;break;case 70:t=256;break;case 72:t=128;break;case 88:t=512;break;case 44:t=w1n}return t}function G$n(n,t,e,i,r){var c,a,o,u;if(xA(n)!==xA(t)||i!=r)for(o=0;o<i;o++){for(a=0,c=n[o],u=0;u<r;u++)a=Lgn(Lgn(Ngn(E3(c,L0n),E3(t[u],L0n)),E3(e[o+u],L0n)),E3(pz(a),L0n)),e[o+u]=pz(a),a=Dz(a,32);e[o+r]=pz(a)}else _Un(n,i,e)}function q$n(n){var t,i,r,c,a,o,u,s,h,f,l;for(f=0,h=0,u=(c=n.a).a.gc(),r=c.a.ec().Kc();r.Ob();)(i=uG(r.Pb(),567)).b&&sXn(i),f+=(l=(t=i.a).a)+(o=t.b),h+=l*o;return s=e.Math.sqrt(400*u*h-4*h+f*f)+f,0==(a=2*(100*u-1))?s:s/a}function X$n(n,t){0!=t.b&&(isNaN(n.s)?n.s=uM((MK(0!=t.b),pK(t.a.a.c))):n.s=e.Math.min(n.s,uM((MK(0!=t.b),pK(t.a.a.c)))),isNaN(n.c)?n.c=uM((MK(0!=t.b),pK(t.c.b.c))):n.c=e.Math.max(n.c,uM((MK(0!=t.b),pK(t.c.b.c)))))}function z$n(n){var t,e,i;for(t=null,e=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[(!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c)])));hDn(e);)if(i=lCn(uG(N9(e),84)),t){if(t!=R0(i))return!0}else t=R0(i);return!1}function V$n(n,t){var e,i,r,c;n.Pj()?(e=n.i,c=n.Qj(),z9(n,t),i=n.Ij(3,null,t,e,c),n.Mj()?(r=n.Nj(t,null),n.Tj()&&(r=n.Uj(t,r)),r?(r.nj(i),r.oj()):n.Jj(i)):n.Jj(i)):(z9(n,t),n.Mj()&&(r=n.Nj(t,null))&&r.oj())}function W$n(n,t){var e,i,r;if(!_V(n.a,t.b))throw hv(new kM("Invalid hitboxes for scanline overlap calculation."));for(r=!1,i=n.a.a.ec().Kc();i.Ob();)if(e=uG(i.Pb(),68),ofn(t.b,e))nj(n.b.a,t.b,e),r=!0;else if(r)break}function Q$n(n){var t;if(!n.a)throw hv(new kM("IDataType class expected for layout option "+n.f));if(null==(t=f5(n.a)))throw hv(new kM("Couldn't create new instance of property '"+n.f+"'. "+Rnt+(vK($Ft),$Ft.k)+Knt));return uG(t,423)}function J$n(n){var t,e,i,r,c;return(c=n.Ph())&&c.Vh()&&(r=mwn(n,c))!=c?(e=n.Fh(),i=(t=n.Fh())>=0?n.Ah(null):n.Ph().Th(n,-1-t,null,null),n.Bh(uG(r,54),e),i&&i.oj(),n.vh()&&n.wh()&&e>-1&&Msn(n,new lV(n,9,e,c,r)),r):c}function Y$n(n,t){var e,i,r,c,a;for(c=n.b.Ce(t),i=null==(e=n.a.get(c))?Inn(dat,EZn,1,0,5,1):e,a=0;a<i.length;a++)if(r=i[a],n.b.Be(t,r.ld()))return 1==i.length?(i.length=0,PF(n.a,c)):i.splice(a,1),--n.c,++n.b.g,r.md();return null}function Z$n(n){var t,e,i,r,c,a,o;for(c=0,r=n.f.e,e=0;e<r.c.length;++e)for(u3(e,r.c.length),a=uG(r.c[e],153),i=e+1;i<r.c.length;++i)u3(i,r.c.length),o=uG(r.c[i],153),t=atn(a.d,o.d)-n.a[a.a][o.a],c+=n.i[a.a][o.a]*t*t;return c}function nDn(n,t){var e;if(!vR(t,(jYn(),gMt))&&(e=oEn(uG(oIn(t,Uwt),371),uG(oIn(n,gMt),171)),kfn(t,Uwt,e),!hDn(new Fz(ix(Ggn(t).a.Kc(),new h)))))switch(e.g){case 1:kfn(t,gMt,(Gpn(),Cmt));break;case 2:kfn(t,gMt,(Gpn(),Omt))}}function tDn(n,t){var e;mBn(n),n.a=(e=new rT,kS(new fX(null,new h3(t.d,16)),new Dg(e)),e),WBn(n,uG(oIn(t.b,(jYn(),Yyt)),349)),Qyn(n),jDn(n),gEn(n),Jyn(n),Hzn(n,t),kS(sin(new fX(null,y4(_W(n.b).a)),new Dr),new xr),t.a=!1,n.a=null}function eDn(){eDn=E,XPt=new mL(J9n,(qx(),!1)),zPt=new mL(Y9n,7),xwn(0),ZPt=new mL(Z9n,xwn(0)),QPt=new mL(n7n,xwn(-1)),mbn(),nCt=new mL(t7n,tCt=xCt),Pln(),VPt=new mL(e7n,WPt=wPt),i3(),JPt=new mL(i7n,YPt=_Ct)}function iDn(){iIn.call(this,aet,(gj(),xKt)),this.p=null,this.a=null,this.f=null,this.n=null,this.g=null,this.c=null,this.i=null,this.j=null,this.d=null,this.b=null,this.e=null,this.k=null,this.o=null,this.s=null,this.q=!1,this.r=!1}function rDn(){rDn=E,jFt=new fA(F6n,0),yFt=new fA("INSIDE_SELF_LOOPS",1),MFt=new fA("MULTI_EDGES",2),kFt=new fA("EDGE_LABELS",3),TFt=new fA("PORTS",4),mFt=new fA("COMPOUND",5),pFt=new fA("CLUSTERS",6),vFt=new fA("DISCONNECTED",7)}function cDn(n,t,e){var i,r,c;n.Pj()?(c=n.Qj(),++n.j,n.qj(t,n.Zi(t,e)),i=n.Ij(3,null,e,t,c),n.Mj()&&(r=n.Nj(e,null))?(r.nj(i),r.oj()):n.Jj(i)):(++n.j,n.qj(t,n.Zi(t,e)),n.Mj()&&(r=n.Nj(e,null))&&r.oj())}function aDn(n,t){var e,i,r;if(0==t)return!!(1&n.a[0]);if(t<0)throw hv(new wM("Negative bit address"));if((r=t>>5)>=n.d)return n.e<0;if(e=n.a[r],t=1<<(31&t),n.e<0){if(r<(i=_un(n)))return!1;e=i==r?-e:~e}return!!(e&t)}function oDn(n,t,e,i){var r;uG(e.b,68),uG(e.b,68),uG(i.b,68),uG(i.b,68),RG(r=YF(D$(uG(e.b,68).c),uG(i.b,68).c),LLn(uG(e.b,68),uG(i.b,68),r)),uG(i.b,68),uG(i.b,68),uG(i.b,68).c.a,r.a,uG(i.b,68).c.b,r.b,uG(i.b,68),Prn(i.a,new $U(n,t,i))}function uDn(n,t){var e,i,r,c,a,o,u;if(c=t.e)for(e=J$n(c),i=uG(n.g,689),a=0;a<n.i;++a)if(PMn(u=i[a])==e&&(!u.d&&(u.d=new MD(g_t,u,1)),r=u.d,(o=uG(e.Mh(PHn(c,c.Cb,c.Db>>16)),15).dd(c))<r.i))return uDn(n,uG(zrn(r,o),89));return t}function sDn(n,t,e){var i,r=sZn,c=r[n],a=c instanceof Array?c[0]:null;c&&!a?uZn=c:(!(i=t&&t.prototype)&&(i=sZn[t]),(uZn=o0(i)).Sm=e,!t&&(uZn.Tm=j),r[n]=uZn);for(var o=3;o<arguments.length;++o)arguments[o].prototype=uZn;a&&(uZn.Rm=a)}function hDn(n){for(var t;!uG(WW(n.a),51).Ob();){if(n.d=Mln(n),!n.d)return!1;if(n.a=uG(n.d.Pb(),51),F$(n.a,38)){if(t=uG(n.a,38),n.a=t.a,!n.b&&(n.b=new ND),A6(n.b,n.d),t.b)for(;!LM(t.b);)A6(n.b,uG(RV(t.b),51));n.d=t.d}}return!0}function fDn(n,t){var e,i,r,c;for(r=1,t.j=!0,c=null,i=new Ww(Ebn(t));i.a<i.c.c.length;)e=uG(N3(i),218),n.c[e.c]||(n.c[e.c]=!0,c=hpn(e,t),e.f?r+=fDn(n,c):c.j||e.a!=e.e.e-e.d.e||(e.f=!0,FV(n.p,e),r+=fDn(n,c)));return r}function lDn(n){var t,i,r;for(i=new Ww(n.a.a.b);i.a<i.c.c.length;)t=uG(N3(i),86),tJ(0),(r=0)>0&&((!hN(n.a.c)||!t.n.d)&&(!fN(n.a.c)||!t.n.b)&&(t.g.d+=e.Math.max(0,r/2-.5)),(!hN(n.a.c)||!t.n.a)&&(!fN(n.a.c)||!t.n.c)&&(t.g.a-=r-1))}function bDn(n){var t,i,r,c,a;if(a=VUn(n,c=new Zm),t=uG(oIn(n,(GYn(),lmt)),10))for(r=new Ww(t.j);r.a<r.c.c.length;)xA(oIn(i=uG(N3(r),12),rmt))===xA(n)&&(a=e.Math.max(a,VUn(i,c)));return 0==c.c.length||kfn(n,emt,a),-1!=a?c:null}function wDn(n,t,e){var i,r,c,a,o,u;r=(i=(c=uG(zq(t.e,0),18).c).i).k,o=(a=(u=uG(zq(e.g,0),18).d).i).k,r==(zIn(),wbt)?kfn(n,(GYn(),Zpt),uG(oIn(i,Zpt),12)):kfn(n,(GYn(),Zpt),c),kfn(n,(GYn(),nmt),o==wbt?uG(oIn(a,nmt),12):u)}function dDn(n){var t,e,i;this.c=n,i=uG(oIn(n,(jYn(),Byt)),88),t=uM(pK(oIn(n,dyt))),e=uM(pK(oIn(n,KTt))),i==(xdn(),JDt)||i==YDt||i==ZDt?this.b=t*e:this.b=1/(t*e),this.j=uM(pK(oIn(n,STt))),this.e=uM(pK(oIn(n,ETt))),this.f=n.b.c.length}function gDn(n,t){var e,i,r,c,a;return t&=63,(i=!!((e=n.h)&b0n))&&(e|=-1048576),t<22?(a=e>>t,c=n.m>>t|e<<22-t,r=n.l>>t|n.m<<22-t):t<44?(a=i?l0n:0,c=e>>t-22,r=n.m>>t-22|e<<44-t):(a=i?l0n:0,c=i?f0n:0,r=e>>t-44),p$(r&f0n,c&f0n,a&l0n)}function pDn(n){var t,i,r,c,a,o;for(this.c=new Zm,this.d=n,r=M0n,c=M0n,t=T0n,i=T0n,o=Fkn(n,0);o.b!=o.d.c;)a=uG(I6(o),8),r=e.Math.min(r,a.a),c=e.Math.min(c,a.b),t=e.Math.max(t,a.a),i=e.Math.max(i,a.b);this.a=new gY(r,c,t-r,i-c)}function mDn(n,t){var e,i,r,c;for(i=new Ww(n.b);i.a<i.c.c.length;)for(c=new Ww(uG(N3(i),30).a);c.a<c.c.c.length;)for((r=uG(N3(c),10)).k==(zIn(),bbt)&&Gqn(r,t),e=new Fz(ix(Xgn(r).a.Kc(),new h));hDn(e);)Nhn(uG(N9(e),18),t)}function vDn(n,t){var e,i,r;for(t.Ug("Layer constraint preprocessing",1),e=new Zm,r=new N4(n.a,0);r.b<r.d.gc();)MK(r.b<r.d.gc()),sfn(i=uG(r.d.Xb(r.c=r.b++),10))&&(GPn(i),mv(e.c,i),LQ(r));0==e.c.length||kfn(n,(GYn(),Upt),e),t.Vg()}function kDn(n){var t,e;for(n.e=Inn(YHt,W1n,28,n.p.c.length,15,1),n.k=Inn(YHt,W1n,28,n.p.c.length,15,1),e=new Ww(n.p);e.a<e.c.c.length;)t=uG(N3(e),10),n.e[t.p]=x5(new Fz(ix(qgn(t).a.Kc(),new h))),n.k[t.p]=x5(new Fz(ix(Xgn(t).a.Kc(),new h)))}function yDn(n){var t,e,i,r,c;for(i=0,n.q=new Zm,t=new ek,c=new Ww(n.p);c.a<c.c.c.length;){for((r=uG(N3(c),10)).p=i,e=new Fz(ix(Xgn(r).a.Kc(),new h));hDn(e);)FV(t,uG(N9(e),18).d.i);t.a.Bc(r),kD(n.q,new oX(t)),t.a.$b(),++i}}function MDn(n,t){var e,i,r,c,a,o,u,s,h;if(n.a.f>0&&F$(t,44)&&(n.a._j(),c=null==(u=(s=uG(t,44)).ld())?0:Hon(u),a=iF(n.a,c),e=n.a.d[a]))for(i=uG(e.g,379),h=e.i,o=0;o<h;++o)if((r=i[o]).Bi()==c&&r.Fb(s))return MDn(n,s),!0;return!1}function TDn(n){var t,e,i,r,c,a,o;if((t=n.qi(Drt))&&null!=(o=mK(Lmn((!t.b&&(t.b=new XR((YYn(),H_t),wBt,t)),t.b),"settingDelegates")))){for(e=new Zm,c=0,a=(r=WGn(o,"\\w+")).length;c<a;++c)i=r[c],mv(e.c,i);return e}return hZ(),hZ(),zot}function jDn(n){var t,e,i,r;for(r=uG(Y9(n.a,(gPn(),ddt)),15).Kc();r.Ob();)pW(n,i=uG(r.Pb(),105),(e=(t=kz(i.k)).Hc((KQn(),yRt))?t.Hc(kRt)?t.Hc(KRt)?t.Hc(_Rt)?null:ydt:Tdt:Mdt:kdt)[0],(gon(),jdt),0),pW(n,i,e[1],Edt,1),pW(n,i,e[2],Sdt,1)}function EDn(n,t){var e,i;UFn(n,t,e=CHn(t)),BPn(n.a,uG(oIn(HQ(t.b),(GYn(),dmt)),234)),kUn(n),OPn(n,t),i=Inn(YHt,W1n,28,t.b.j.c.length,15,1),OWn(n,t,(KQn(),yRt),i,e),OWn(n,t,kRt,i,e),OWn(n,t,KRt,i,e),OWn(n,t,_Rt,i,e),n.a=null,n.c=null,n.b=null}function SDn(n,t,e){switch(t){case 7:return!n.e&&(n.e=new f_(aFt,n,7,4)),Czn(n.e),!n.e&&(n.e=new f_(aFt,n,7,4)),void CW(n.e,uG(e,16));case 8:return!n.d&&(n.d=new f_(aFt,n,8,5)),Czn(n.d),!n.d&&(n.d=new f_(aFt,n,8,5)),void CW(n.d,uG(e,16))}ISn(n,t,e)}function PDn(n,t){var e,i,r,c,a;if(xA(t)===xA(n))return!0;if(!F$(t,15))return!1;if(a=uG(t,15),n.gc()!=a.gc())return!1;for(c=a.Kc(),i=n.Kc();i.Ob();)if(e=i.Pb(),r=c.Pb(),!(xA(e)===xA(r)||null!=e&&udn(e,r)))return!1;return!0}function CDn(n,t){var e,i,r,c;for((c=uG(l8(sin(sin(new fX(null,new h3(t.b,16)),new Re),new Ke),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15)).Jc(new Fe),e=0,r=c.Kc();r.Ob();)-1==(i=uG(r.Pb(),12)).p&&NDn(n,i,e++)}function IDn(n){switch(n.g){case 0:return new pl;case 1:return new dl;case 2:return new gl;case 3:return new FI;case 4:return new iz;default:throw hv(new vM("No implementation is available for the node placer "+(null!=n.f?n.f:""+n.g)))}}function ODn(n){switch(n.g){case 0:return new ez;case 1:return new il;case 2:return new el;case 3:return new nl;case 4:return new tL;default:throw hv(new vM("No implementation is available for the cycle breaker "+(null!=n.f?n.f:""+n.g)))}}function ADn(n,t){var e,i,r,c,a;s8(i=new lS,t,i.c.b,i.c);do{for(MK(0!=i.b),e=uG(Lrn(i,i.a.a),40),n.b[e.g]=1,c=Fkn(e.d,0);c.b!=c.d.c;)a=(r=uG(I6(c),65)).c,1==n.b[a.g]?aq(n.a,r):2==n.b[a.g]?n.b[a.g]=1:s8(i,a,i.c.b,i.c)}while(0!=i.b)}function LDn(n,t,e){var i;i=null,t&&(i=t.d),CEn(n,new FC(t.n.a-i.b+e.a,t.n.b-i.d+e.b)),CEn(n,new FC(t.n.a-i.b+e.a,t.n.b+t.o.b+i.a+e.b)),CEn(n,new FC(t.n.a+t.o.a+i.c+e.a,t.n.b-i.d+e.b)),CEn(n,new FC(t.n.a+t.o.a+i.c+e.a,t.n.b+t.o.b+i.a+e.b))}function NDn(n,t,e){var i,r,c;for(t.p=e,c=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[new zd(t),new Wd(t)])));hDn(c);)-1==(i=uG(N9(c),12)).p&&NDn(n,i,e);if(t.i.k==(zIn(),wbt))for(r=new Ww(t.i.j);r.a<r.c.c.length;)(i=uG(N3(r),12))!=t&&-1==i.p&&NDn(n,i,e)}function $Dn(n,t){var e,i,r,c,a;for(i=new u8,c=g8(new IM(n.g)).a.ec().Kc();c.Ob();){if(!(r=uG(c.Pb(),10))){t.bh("There are no classes in a balanced layout.");break}(e=uG(ain(i,a=n.j[r.p]),15))||Akn(i,a,e=new Zm),e.Fc(r)}return i}function DDn(n){var t,i,r,c,a;if(c=uG(l8(_0(f3(n)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),r=B3n,c.gc()>=2)for(t=pK((i=c.Kc()).Pb());i.Ob();)a=t,t=pK(i.Pb()),r=e.Math.min(r,(tJ(t),t-(tJ(a),a)));return r}function xDn(n,t){var e,i,r;for(r=new Zm,i=Fkn(t.a,0);i.b!=i.d.c;)(e=uG(I6(i),65)).b.g==n.g&&!m_(e.b.c,H9n)&&xA(oIn(e.b,(QGn(),ACt)))!==xA(oIn(e.c,ACt))&&!o9(new fX(null,new h3(r,16)),new yp(e))&&mv(r.c,e);return f$(r,new Ca),r}function RDn(n,t){var e,i,r;if(xA(t)===xA(WW(n)))return!0;if(!F$(t,15))return!1;if(i=uG(t,15),(r=n.gc())!=i.gc())return!1;if(F$(i,59)){for(e=0;e<r;e++)if(!xQ(n.Xb(e),i.Xb(e)))return!1;return!0}return OMn(n.Kc(),i.Kc())}function KDn(n,t,e,i,r,c){var a,o,u,s;for(o=!Qj(JJ(n.Oc(),new hd(new Ye))).Bd((vS(),Kut)),a=n,c==(xdn(),nxt)&&(a=Spn(a)),s=a.Kc();s.Ob();)(u=uG(s.Pb(),72)).n.a=t.a,u.n.b=o?t.b+(i.b-u.o.b)/2:r?t.b:t.b+i.b-u.o.b,t.a+=u.o.a+e}function FDn(n,t){var e,i,r;for(t.Ug("Port side processing",1),r=new Ww(n.a);r.a<r.c.c.length;)Tqn(uG(N3(r),10));for(e=new Ww(n.b);e.a<e.c.c.length;)for(i=new Ww(uG(N3(e),30).a);i.a<i.c.c.length;)Tqn(uG(N3(i),10));t.Vg()}function _Dn(n,t,e){var i,r,c,a;if(e)for(r=((i=new Gz(e.a.length)).b-i.a)*i.c<0?(CP(),XHt):new xD(i);r.Ob();)(c=v6(e,uG(r.Pb(),17).a))&&(a=Ncn(k6(c,get),t),vJ(n.f,a,c),Iet in c.a&&Gan(a,k6(c,Iet)),fCn(c,a),kLn(c,a))}function BDn(n,t,e){var i,r,c,a,o;if(!(o=e)&&(o=xG(new fy,0)),o.Ug(K4n,1),JVn(n.c,t),1==(a=SWn(n.a,t)).gc())azn(uG(a.Xb(0),36),o);else for(c=1/a.gc(),r=a.Kc();r.Ob();){if(i=uG(r.Pb(),36),e.$g())return;azn(i,o.eh(c))}xM(n.a,a,t),$_n(t),o.Vg()}function HDn(n,t,e){var i,r,c,a,o;if(!(r=n.f)&&(r=uG(n.a.a.ec().Kc().Pb(),60)),TEn(r,t,e),1!=n.a.a.gc())for(i=t*e,a=n.a.a.ec().Kc();a.Ob();)(c=uG(a.Pb(),60))!=r&&((o=Q6(c)).f.d?(c.d.d+=i+Z2n,c.d.a-=i+Z2n):o.f.a&&(c.d.a-=i+Z2n))}function UDn(n,t,i,r,c){var a,o,u,s,h,f,l,b,w;return o=i-n,u=r-t,s=(a=e.Math.atan2(o,u))+_3n,h=a-_3n,f=c*e.Math.sin(s)+n,b=c*e.Math.cos(s)+t,l=c*e.Math.sin(h)+n,w=c*e.Math.cos(h)+t,n7(Uhn(cT(PNt,1),zZn,8,0,[new MO(f,b),new MO(l,w)]))}function GDn(n,t,i,r){var c,a,o,u,s,h,f,l;c=i,a=f=t;do{a=n.a[a.p],l=n.g[a.p],u=uM(n.p[l.p])+uM(n.d[a.p])-a.d.d,(s=ion(a,r))&&(h=n.g[s.p],o=uM(n.p[h.p])+uM(n.d[s.p])+s.o.b+s.d.a,c=e.Math.min(c,u-(o+y$(n.k,a,s))))}while(f!=a);return c}function qDn(n,t,i,r){var c,a,o,u,s,h,f,l;c=i,a=f=t;do{a=n.a[a.p],l=n.g[a.p],o=uM(n.p[l.p])+uM(n.d[a.p])+a.o.b+a.d.a,(s=nfn(a,r))&&(h=n.g[s.p],u=uM(n.p[h.p])+uM(n.d[s.p])-s.d.d,c=e.Math.min(c,u-(o+y$(n.k,a,s))))}while(f!=a);return c}function XDn(n,t){var e;if(t.Ug("Equal Whitespace Eliminator",1),!vnn(n,(lBn(),SOt)))throw hv(new jM("The graph does not contain rows."));Ewn(uG(zDn(n,SOt),15),uM(pK(zDn(n,vOt))),(e=uM(pK(zDn(n,pOt))),uM(pK(zDn(n,(S_n(),bAt)))),e)),t.Vg()}function zDn(n,t){var e,i;return!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),null!=(i=Lmn(n.o,t))?i:(F$(e=t.Sg(),4)&&(null==e?(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),Svn(n.o,t)):(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),rSn(n.o,t,e))),e)}function VDn(){VDn=E,Bxt=new NO("H_LEFT",0),_xt=new NO("H_CENTER",1),Uxt=new NO("H_RIGHT",2),Vxt=new NO("V_TOP",3),zxt=new NO("V_CENTER",4),Xxt=new NO("V_BOTTOM",5),Gxt=new NO("INSIDE",6),qxt=new NO("OUTSIDE",7),Hxt=new NO("H_PRIORITY",8)}function WDn(n,t){var e,i,r,c,a,o,u;if(!t.f)throw hv(new vM("The input edge is not a tree edge."));for(c=null,r=vZn,i=new Ww(n.d);i.a<i.c.c.length;)o=(e=uG(N3(i),218)).d,u=e.e,ILn(n,o,t)&&!ILn(n,u,t)&&(a=u.e-o.e-e.a)<r&&(r=a,c=e);return c}function QDn(n){var t,e,i,r,c,a;if(!(n.f.e.c.length<=1)){t=0,r=Z$n(n),e=M0n;do{for(t>0&&(r=e),a=new Ww(n.f.e);a.a<a.c.c.length;)oM(gK(oIn(c=uG(N3(a),153),(Bjn(),alt))))||(i=uGn(n,c),JF(dL(c.d),i));e=Z$n(n)}while(!oQ(n,t++,r,e))}}function JDn(n,t){var e,i,r,c,a;for(c=n.g.a,a=n.g.b,i=new Ww(n.d);i.a<i.c.c.length;)r=(e=uG(N3(i),72)).n,n.a==(qhn(),udt)||n.i==(KQn(),kRt)?r.a=c:n.a==sdt||n.i==(KQn(),_Rt)?r.a=c+n.j.a-e.o.a:r.a=c+(n.j.a-e.o.a)/2,r.b=a,JF(r,t),a+=e.o.b+n.e}function YDn(n,t){var e,i,r,c,a;(c=m6(n,"individualSpacings"))&&(!vnn(t,(XYn(),ODt))&&(e=new Qu,Myn(t,ODt,e)),r=uG(zDn(t,ODt),385),i=null,(a=c)&&(i=new JE(a,Yon(a,Inn($ot,zZn,2,0,6,1)))),i&&z8(i,new cA(a,r)))}function ZDn(n,t){var e,i,r,c,a,o;return c=null,(Ket in(a=n).a||Fet in a.a||Met in a.a)&&(o=Qhn(t),i=m6(a,Ket),Xpn(new um(o).a,i),r=m6(a,Fet),zpn(new mm(o).a,r),e=p6(a,Met),lPn(new ym(o).a,e),c=e),c}function nxn(n,t){var e,i,r;if(t===n)return!0;if(F$(t,552)){if(r=uG(t,849),n.a.d!=r.a.d||uY(n).gc()!=uY(r).gc())return!1;for(i=uY(r).Kc();i.Ob();)if(S2(n,(e=uG(i.Pb(),425)).a.ld())!=uG(e.a.md(),16).gc())return!1;return!0}return!1}function txn(n){var t,e,i,r;return t=i=uG(n.a,17).a,e=r=uG(n.b,17).a,0==i&&0==r?e-=1:-1==i&&r<=0?(t=0,e-=2):i<=0&&r>0?(t-=1,e-=1):i>=0&&r<0?(t+=1,e+=1):i>0&&r>=0?(t-=1,e+=1):(t+=1,e-=1),new WO(xwn(t),xwn(e))}function exn(n,t){return n.c<t.c?-1:n.c>t.c?1:n.b<t.b?-1:n.b>t.b?1:n.a!=t.a?Hon(n.a)-Hon(t.a):n.d==(Z6(),YEt)&&t.d==JEt?-1:n.d==JEt&&t.d==YEt?1:0}function ixn(n,t){var e,i,r,c,a;return a=(c=t.a).c.i==t.b?c.d:c.c,i=c.c.i==t.b?c.c:c.d,(r=dmn(n.a,a,i))>0&&r<B3n?(e=GDn(n.a,i.i,r,n.c),Grn(n.a,i.i,-e),e>0):r<0&&-r<B3n&&(e=qDn(n.a,i.i,-r,n.c),Grn(n.a,i.i,e),e>0)}function rxn(n,t,e,i){var r,c,a,o,u,s;for(r=(t-n.d)/n.c.c.length,c=0,n.a+=e,n.d=t,s=new Ww(n.c);s.a<s.c.c.length;)o=(u=uG(N3(s),27)).g,a=u.f,ycn(u,u.i+c*r),Mcn(u,u.j+i*e),kcn(u,u.g+r),vcn(u,n.a),++c,tLn(u,new MO(u.g,u.f),new MO(o,a))}function cxn(n){var t,e,i,r,c,a,o;if(null==n)return null;for(o=n.length,a=Inn(tUt,ret,28,r=(o+1)/2|0,15,1),o%2!=0&&(a[--r]=V_n((s3(o-1,n.length),n.charCodeAt(o-1)))),e=0,i=0;e<r;++e)t=V_n(VJ(n,i++)),c=V_n(VJ(n,i++)),a[e]=(t<<4|c)<<24>>24;return a}function axn(n){if(n.ze()){var t=n.c;return t.Ae()?n.o="["+t.n:t.ze()?n.o="["+t.xe():n.o="[L"+t.xe()+";",n.b=t.we()+"[]",void(n.k=t.ye()+"[]")}var e=n.j,i=n.d;i=i.split("/"),n.o=fvn(".",[e,fvn("$",i)]),n.b=fvn(".",[e,fvn(".",i)]),n.k=i[i.length-1]}function oxn(n,t){var e,i,r,c,a;for(a=null,c=new Ww(n.e.a);c.a<c.c.c.length;)if((r=uG(N3(c),125)).b.a.c.length==r.g.a.c.length){for(i=r.e,a=UOn(r),e=r.e-uG(a.a,17).a+1;e<r.e+uG(a.b,17).a;e++)t[e]<t[i]&&(i=e);t[i]<t[r.e]&&(--t[r.e],++t[i],r.e=i)}}function uxn(n){var t,i,r,c,a,o,u;for(r=M0n,i=T0n,t=new Ww(n.e.b);t.a<t.c.c.length;)for(a=new Ww(uG(N3(t),30).a);a.a<a.c.c.length;)c=uG(N3(a),10),o=(u=uM(n.p[c.p]))+uM(n.b[n.g[c.p].p]),r=e.Math.min(r,u),i=e.Math.max(i,o);return i-r}function sxn(n){var t,e,i,r;return ZXn(),t=-1==(i=xL(n,$Cn(35)))?n:(Knn(0,i,n.length),n.substr(0,i)),e=-1==i?null:(s3(i+1,n.length+1),n.substr(i+1)),(r=_5(GFt,t))?null!=e&&(r=Vln(r,(tJ(e),e))):(r=LYn(t),G8(GFt,t,r),null!=e&&(r=Vln(r,e))),r}function hxn(n,t,e,i){var r,c,a,o,u,s;for(u=null,o=0,s=(r=AHn(n,t)).gc();o<s;++o)if(m_(i,BJ(Nen(n,c=uG(r.Xb(o),179)))))if(a=HJ(Nen(n,c)),null==e){if(null==a)return c;!u&&(u=c)}else{if(m_(e,a))return c;null==a&&!u&&(u=c)}return null}function fxn(n,t,e,i){var r,c,a,o,u,s;for(u=null,o=0,s=(r=LHn(n,t)).gc();o<s;++o)if(m_(i,BJ(Nen(n,c=uG(r.Xb(o),179)))))if(a=HJ(Nen(n,c)),null==e){if(null==a)return c;!u&&(u=c)}else{if(m_(e,a))return c;null==a&&!u&&(u=c)}return null}function lxn(n,t,e){var i,r,c,a,o,u;if(a=new ls,o=VKn(n.e.Dh(),t),i=uG(n.g,124),PP(),uG(t,69).xk())for(c=0;c<n.i;++c)r=i[c],o.am(r.Lk())&&ttn(a,r);else for(c=0;c<n.i;++c)r=i[c],o.am(r.Lk())&&(u=r.md(),ttn(a,e?ONn(n,t,c,a.i,u):u));return g5(a)}function bxn(n){var t,e,i,r,c,a,o;if(n&&(t=n.qi(Drt))&&null!=(a=mK(Lmn((!t.b&&(t.b=new XR((YYn(),H_t),wBt,t)),t.b),"conversionDelegates")))){for(o=new Zm,r=0,c=(i=WGn(a,"\\w+")).length;r<c;++r)e=i[r],mv(o.c,e);return o}return hZ(),hZ(),zot}function wxn(n,t){var e,i,r,c,a,o;for(c=(1==t?$lt:Nlt).a.ec().Kc();c.Ob();)for(r=uG(c.Pb(),88),o=uG(Y9(n.f.c,r),21).Kc();o.Ob();)switch(a=uG(o.Pb(),42),i=uG(a.b,86),e=uG(a.a,194).c,r.g){case 2:case 1:i.g.d+=e;break;case 4:case 3:i.g.c+=e}}function dxn(n,t){var e,i,r,c;for(e=new rpn(Qdt),vAn(),r=0,c=(i=Uhn(cT(Qdt,1),p1n,232,0,[Hdt,Gdt,Bdt,Udt,qdt,_dt])).length;r<c;++r)yF(e,i[r],new Zm);return kS(YJ(JJ(sin(new fX(null,new h3(n.b,16)),new Ze),new ni),new bg(t)),new wg(e)),e}function gxn(n,t,i){var r,c,a,o,u,s,h,f;for(a=t.Kc();a.Ob();)s=(c=uG(a.Pb(),27)).i+c.g/2,f=c.j+c.f/2,u=s-((o=n.f).i+o.g/2),h=f-(o.j+o.f/2),r=e.Math.sqrt(u*u+h*h),u*=n.e/r,h*=n.e/r,i?(s-=u,f-=h):(s+=u,f+=h),ycn(c,s-c.g/2),Mcn(c,f-c.f/2)}function pxn(n){var t,e,i;if(!n.c&&null!=n.b){for(t=n.b.length-4;t>=0;t-=2)for(e=0;e<=t;e+=2)(n.b[e]>n.b[e+2]||n.b[e]===n.b[e+2]&&n.b[e+1]>n.b[e+3])&&(i=n.b[e+2],n.b[e+2]=n.b[e],n.b[e]=i,i=n.b[e+3],n.b[e+3]=n.b[e+1],n.b[e+1]=i);n.c=!0}}function mxn(n,t){var e,i,r,c,a,o,u,s,h;for(s=-1,h=0,o=0,u=(a=n).length;o<u;++o){for(c=a[o],e=new KG(-1==s?n[0]:n[s],t,(Cwn(),hjt)),i=0;i<c.length;i++)for(r=i+1;r<c.length;r++)vR(c[i],(GYn(),imt))&&vR(c[r],imt)&&rYn(e,c[i],c[r])>0&&++h;++s}return h}function vxn(n){var t;return(t=new lx(Ij(n.Rm))).a+="@",JA(t,(Hon(n)>>>0).toString(16)),n.Vh()?(t.a+=" (eProxyURI: ",QA(t,n._h()),n.Kh()&&(t.a+=" eClass: ",QA(t,n.Kh())),t.a+=")"):n.Kh()&&(t.a+=" (eClass: ",QA(t,n.Kh()),t.a+=")"),t.a}function kxn(n){var t,e,i;if(n.e)throw hv(new kM((vK(Qut),v2n+Qut.k+k2n)));for(n.d==(xdn(),ZDt)&&GWn(n,JDt),e=new Ww(n.a.a);e.a<e.c.c.length;)(t=uG(N3(e),316)).g=t.i;for(i=new Ww(n.a.b);i.a<i.c.c.length;)uG(N3(i),60).i=T0n;return n.b.cf(n),n}function yxn(n,t){var e,i,r,c,a;if(t<2*n.b)throw hv(new vM("The knot vector must have at least two time the dimension elements."));for(n.f=1,r=0;r<n.b;r++)kD(n.e,0);for(e=a=t+1-2*n.b,c=1;c<a;c++)kD(n.e,c/e);if(n.d)for(i=0;i<n.b;i++)kD(n.e,1)}function Mxn(n,t){var e,i,r,c,a;if(c=t,!(a=uG(kan(UW(n.i),c),27)))throw hv(new SM("Unable to find elk node for json object '"+k6(c,Iet)+"' Panic!"));i=p6(c,"edges"),ENn((e=new JO(n,a)).a,e.b,i),r=p6(c,pet),vEn(new nm(n).a,r)}function Txn(n,t,e,i){var r,c,a,o,u;if(null!=i){if(r=n.d[t])for(c=r.g,u=r.i,o=0;o<u;++o)if((a=uG(c[o],136)).Bi()==e&&udn(i,a.ld()))return o}else if(r=n.d[t])for(c=r.g,u=r.i,o=0;o<u;++o)if(xA((a=uG(c[o],136)).ld())===xA(i))return o;return-1}function jxn(n,t){var e,i;return F$(e=null==t?DA(FX(n.f,null)):_P(n.i,t),241)?((i=uG(e,241)).zi(),i):F$(e,507)?((i=uG(e,2037).a)&&(null==i.yb||(null==t?VAn(n.f,null,i):kgn(n.i,t,i))),i):null}function Exn(n){var t,e,i,r,c,a,o;if(L_n(),null==n)return null;if((r=n.length)%2!=0)return null;for(t=_en(n),e=Inn(tUt,ret,28,c=r/2|0,15,1),i=0;i<c;i++){if(-1==(a=pHt[t[2*i]]))return null;if(-1==(o=pHt[t[2*i+1]]))return null;e[i]=(a<<4|o)<<24>>24}return e}function Sxn(n,t,e){var i,r,c;if(!(r=uG(AJ(n.i,t),314)))if(r=new Yin(n.d,t,e),UV(n.i,t,r),vvn(t))iD(n.a,t.c,t.b,r);else switch(c=MAn(t),i=uG(AJ(n.p,c),252),c.g){case 1:case 3:r.j=!0,nM(i,t.b,r);break;case 4:case 2:r.k=!0,nM(i,t.c,r)}return r}function Pxn(n,t){var e,i,r,c,a,o,u,s,h;for(u=iR(n.c-n.b&n.a.length-1),s=null,h=null,c=new XJ(n);c.a!=c.b;)r=uG(rwn(c),10),e=(o=uG(oIn(r,(GYn(),Zpt)),12))?o.i:null,i=(a=uG(oIn(r,nmt),12))?a.i:null,s==e&&h==i||(F$n(u,t),s=e,h=i),mv(u.c,r);F$n(u,t)}function Cxn(n,t,e,i){var r,c,a,o,u,s;if(o=new ls,u=VKn(n.e.Dh(),t),r=uG(n.g,124),PP(),uG(t,69).xk())for(a=0;a<n.i;++a)c=r[a],u.am(c.Lk())&&ttn(o,c);else for(a=0;a<n.i;++a)c=r[a],u.am(c.Lk())&&(s=c.md(),ttn(o,i?ONn(n,t,a,o.i,s):s));return gmn(o,e)}function Ixn(n,t){var i,r,c,a,o,u;if((r=n.b[t.p])>=0)return r;for(c=1,a=new Ww(t.j);a.a<a.c.c.length;)for(i=new Ww(uG(N3(a),12).g);i.a<i.c.c.length;)t!=(u=uG(N3(i),18).d.i)&&(o=Ixn(n,u),c=e.Math.max(c,o+1));return $pn(n,t,c),c}function Oxn(n,t){var i,r,c,a,o,u;if((r=n.b[t.p])>=0)return r;for(c=1,a=new Ww(t.j);a.a<a.c.c.length;)for(i=new Ww(uG(N3(a),12).e);i.a<i.c.c.length;)t!=(u=uG(N3(i),18).c.i)&&(o=Oxn(n,u),c=e.Math.max(c,o+1));return mMn(n,t,c),c}function Axn(n,t,e){var i,r,c;for(i=1;i<n.c.length;i++){for(u3(i,n.c.length),c=uG(n.c[i],10),r=i;r>0&&t.Ne((u3(r-1,n.c.length),uG(n.c[r-1],10)),c)>0;)Y8(n,r,(u3(r-1,n.c.length),uG(n.c[r-1],10))),--r;u3(r,n.c.length),n.c[r]=c}e.a=new Ym,e.b=new Ym}function Lxn(n,t,e){var i,r,c,a,o,u,s;for(s=new nB(i=uG(t.e&&t.e(),9),uG(MF(i,i.length),9),0),a=0,o=(c=WGn(e,"[\\[\\]\\s,]+")).length;a<o;++a)if(0!=KAn(r=c[a]).length){if(null==(u=NNn(n,r)))return null;Mon(s,uG(u,22))}return s}function Nxn(n){var t,e,i,r;for(r=n.length,t=null,i=0;i<r;i++)s3(i,n.length),xL(".*+?{[()|\\^$",$Cn(e=n.charCodeAt(i)))>=0?(t||(t=new VM,i>0&&VA(t,(Knn(0,i,n.length),n.substr(0,i)))),t.a+="\\",TQ(t,e&D1n)):t&&TQ(t,e&D1n);return t?t.a:n}function $xn(n){var t,i,r;for(i=new Ww(n.a.a.b);i.a<i.c.c.length;)t=uG(N3(i),86),tJ(0),(r=0)>0&&((!hN(n.a.c)||!t.n.d)&&(!fN(n.a.c)||!t.n.b)&&(t.g.d-=e.Math.max(0,r/2-.5)),(!hN(n.a.c)||!t.n.a)&&(!fN(n.a.c)||!t.n.c)&&(t.g.a+=e.Math.max(0,r-1)))}function Dxn(n,t,e){var i;if(2==(n.c-n.b&n.a.length-1))t==(KQn(),yRt)||t==kRt?(prn(uG(Rfn(n),15),(Ajn(),$xt)),prn(uG(Rfn(n),15),Dxt)):(prn(uG(Rfn(n),15),(Ajn(),Dxt)),prn(uG(Rfn(n),15),$xt));else for(i=new XJ(n);i.a!=i.b;)prn(uG(rwn(i),15),e)}function xxn(n,t){var e,i,r,c,a,o;for(a=new N4(i=rG(new Pm(n)),i.c.length),o=new N4(r=rG(new Pm(t)),r.c.length),c=null;a.b>0&&o.b>0&&(MK(a.b>0),e=uG(a.a.Xb(a.c=--a.b),27),MK(o.b>0),e==uG(o.a.Xb(o.c=--o.b),27));)c=e;return c}function Rxn(n,t,e){var i,r,c,a;Y3(n,t)>Y3(n,e)?(i=Dgn(e,(KQn(),kRt)),n.d=i.dc()?0:dq(uG(i.Xb(0),12)),a=Dgn(t,_Rt),n.b=a.dc()?0:dq(uG(a.Xb(0),12))):(r=Dgn(e,(KQn(),_Rt)),n.d=r.dc()?0:dq(uG(r.Xb(0),12)),c=Dgn(t,kRt),n.b=c.dc()?0:dq(uG(c.Xb(0),12)))}function Kxn(n,t){var e,i,r,c;for(e=n.o.a,c=uG(uG(Y9(n.r,t),21),87).Kc();c.Ob();)(r=uG(c.Pb(),117)).e.a=e*uM(pK(r.b.of(bht))),r.e.b=(i=r.b).pf((XYn(),uDt))?i.ag()==(KQn(),yRt)?-i.Mf().b-uM(pK(i.of(uDt))):uM(pK(i.of(uDt))):i.ag()==(KQn(),yRt)?-i.Mf().b:0}function Fxn(n,t){var e,i,r,c;for(t.Ug("Self-Loop pre-processing",1),i=new Ww(n.a);i.a<i.c.c.length;)Epn(e=uG(N3(i),10))&&(c=new kkn(e),kfn(e,(GYn(),vmt),c),CUn(c),kS(YJ(sin(new fX(null,new h3((r=c).d,16)),new Hi),new Ui),new Gi),nFn(r));t.Vg()}function _xn(n){var t,e,i,r,c,a,o,u;t=!0,r=null,c=null;n:for(u=new Ww(n.a);u.a<u.c.c.length;)for(i=new Fz(ix(qgn(o=uG(N3(u),10)).a.Kc(),new h));hDn(i);){if(e=uG(N9(i),18),r&&r!=o){t=!1;break n}if(r=o,a=e.c.i,c&&c!=a){t=!1;break n}c=a}return t}function Bxn(n,t,e){var i,r,c,a,o,u;for(c=-1,o=-1,a=0;a<t.c.length&&(u3(a,t.c.length),!((r=uG(t.c[a],339)).c>n.c));a++)r.a>=n.s&&(c<0&&(c=a),o=a);return u=(n.s+n.c)/2,c>=0&&(u=wP((u3(i=fHn(n,t,c,o),t.c.length),uG(t.c[i],339))),a$n(t,i,e)),u}function Hxn(n,t,e){var i,r,c,a,o;for(Yan(r=new vs,(tJ(t),t)),!r.b&&(r.b=new XR((YYn(),H_t),wBt,r)),o=r.b,a=1;a<e.length;a+=2)rSn(o,e[a-1],e[a]);for(!n.Ab&&(n.Ab=new fV(c_t,n,0,3)),i=n.Ab,c=0;c<0;++c)i=MQ(uG(zrn(i,i.i-1),598));ttn(i,r)}function Uxn(n,t,e){var i,r,c;for(fF.call(this,new Zm),this.a=t,this.b=e,this.e=n,n.b&&sXn(n),i=n.a,this.d=hY(i.a,this.a),this.c=hY(i.b,this.b),Pdn(this,this.d,this.c),sNn(this),c=this.e.e.a.ec().Kc();c.Ob();)(r=uG(c.Pb(),272)).c.c.length>0&&tVn(this,r)}function Gxn(n,t,e,i,r,c){var a,o,u;if(!r[t.a]){for(r[t.a]=!0,!(a=i)&&(a=new d7),kD(a.e,t),u=c[t.a].Kc();u.Ob();)(o=uG(u.Pb(),290)).d!=e&&o.c!=e&&(o.c!=t&&Gxn(n,o.c,t,a,r,c),o.d!=t&&Gxn(n,o.d,t,a,r,c),kD(a.c,o),Ohn(a.d,o.b));return a}return null}function qxn(n){var t,e,i;for(t=0,e=new Ww(n.e);e.a<e.c.c.length;)o9(new fX(null,new h3(uG(N3(e),18).b,16)),new pe)&&++t;for(i=new Ww(n.g);i.a<i.c.c.length;)o9(new fX(null,new h3(uG(N3(i),18).b,16)),new me)&&++t;return t>=2}function Xxn(n,t,e,i,r){var c,a,o,u,s;for(c=n.c.d.j,a=uG(hyn(e,0),8),s=1;s<e.b;s++)u=uG(hyn(e,s),8),s8(i,a,i.c.b,i.c),o=vD(JF(new eN(a),u),.5),JF(o,vD(new O2(Tln(c)),r)),s8(i,o,i.c.b,i.c),a=u,c=0==t?qdn(c):Udn(c);aq(i,(MK(0!=e.b),uG(e.c.b.c,8)))}function zxn(n){return VDn(),!(qsn(X1(WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[qxt])),n))>1||qsn(X1(WX(Bxt,Uhn(cT(eRt,1),p1n,95,0,[_xt,Uxt])),n))>1||qsn(X1(WX(Vxt,Uhn(cT(eRt,1),p1n,95,0,[zxt,Xxt])),n))>1)}function Vxn(n,t,e){var i,r,c;for(c=new Ww(n.t);c.a<c.c.c.length;)(i=uG(N3(c),274)).b.s<0&&i.c>0&&(i.b.n-=i.c,i.b.n<=0&&i.b.u>0&&aq(t,i.b));for(r=new Ww(n.i);r.a<r.c.c.length;)(i=uG(N3(r),274)).a.s<0&&i.c>0&&(i.a.u-=i.c,i.a.u<=0&&i.a.n>0&&aq(e,i.a))}function Wxn(n){var t,e,i;if(null==n.g&&(n.d=n.bj(n.f),ttn(n,n.d),n.c))return n.f;if(i=(t=uG(n.g[n.i-1],51)).Pb(),n.e=t,(e=n.bj(i)).Ob())n.d=e,ttn(n,e);else for(n.d=null;!t.Ob()&&(uQ(n.g,--n.i,null),0!=n.i);)t=uG(n.g[n.i-1],51);return i}function Qxn(n,t){var e,i,r,c,a,o;if(r=(i=t).Lk(),EFn(n.e,r)){if(r.Si()&&H5(n,r,i.md()))return!1}else for(o=VKn(n.e.Dh(),r),e=uG(n.g,124),c=0;c<n.i;++c)if(a=e[c],o.am(a.Lk()))return!udn(a,i)&&(uG(Uyn(n,c,t),76),!0);return ttn(n,t)}function Jxn(n,t,i,r){var c,a,o;for(Hb(c=new gMn(n),(zIn(),bbt)),kfn(c,(GYn(),rmt),t),kfn(c,gmt,r),kfn(c,(jYn(),JMt),($Pn(),cRt)),kfn(c,Zpt,t.c),kfn(c,nmt,t.d),xFn(t,c),o=e.Math.floor(i/2),a=new Ww(c.j);a.a<a.c.c.length;)uG(N3(a),12).n.b=o;return c}function Yxn(n){var t,i,r,c,a,o;for(t=0,i=new Ww(n.a);i.a<i.c.c.length;)for(c=new Fz(ix(Xgn(uG(N3(i),10)).a.Kc(),new h));hDn(c);)n==(r=uG(N9(c),18)).d.i.c&&r.c.j==(KQn(),_Rt)&&(a=n3(r.c).b,o=n3(r.d).b,t=e.Math.max(t,e.Math.abs(o-a)));return t}function Zxn(n,t,e){var i,r,c,a;for(e.Ug("ELK Force",1),oM(gK(zDn(t,(cGn(),Ift))))||J1(new Sd((vP(),new Vy(t)))),cEn(a=yfn(t)),rln(n,uG(oIn(a,jft),432)),r=(c=tqn(n.a,a)).Kc();r.Ob();)i=uG(r.Pb(),235),DGn(n.b,i,e.eh(1/c.gc()));YJn(a=lJn(c)),e.Vg()}function nRn(n,t,i){switch(i.g){case 1:return new MO(t.a,e.Math.min(n.d.b,t.b));case 2:return new MO(e.Math.max(n.c.a,t.a),t.b);case 3:return new MO(t.a,e.Math.max(n.c.b,t.b));case 4:return new MO(e.Math.min(t.a,n.d.a),t.b)}return new MO(t.a,t.b)}function tRn(n){var t,e,i;for(kD(t=iR(1+(!n.c&&(n.c=new fV(wFt,n,9,9)),n.c).i),(!n.d&&(n.d=new f_(aFt,n,8,5)),n.d)),i=new DD((!n.c&&(n.c=new fV(wFt,n,9,9)),n.c));i.e!=i.i.gc();)kD(t,(!(e=uG(Zkn(i),123)).d&&(e.d=new f_(aFt,e,8,5)),e.d));return WW(t),new iN(t)}function eRn(n){var t,e,i;for(kD(t=iR(1+(!n.c&&(n.c=new fV(wFt,n,9,9)),n.c).i),(!n.e&&(n.e=new f_(aFt,n,7,4)),n.e)),i=new DD((!n.c&&(n.c=new fV(wFt,n,9,9)),n.c));i.e!=i.i.gc();)kD(t,(!(e=uG(Zkn(i),123)).e&&(e.e=new f_(aFt,e,7,4)),e.e));return WW(t),new iN(t)}function iRn(n){var t,e,i,r;if(null==n)return null;if(i=yXn(n,!0),r=yct.length,m_(i.substr(i.length-r,r),yct))if(4==(e=i.length)){if(s3(0,i.length),43==(t=i.charCodeAt(0)))return sHt;if(45==t)return uHt}else if(3==e)return sHt;return YIn(i)}function rRn(n,t){var e,i,r;if(t.Ug("Breaking Point Processor",1),WWn(n),oM(gK(oIn(n,(jYn(),GTt))))){for(i=new Ww(n.b);i.a<i.c.c.length;)for(e=0,r=new Ww(uG(N3(i),30).a);r.a<r.c.c.length;)uG(N3(r),10).p=e++;kXn(n),dFn(n,!0),dFn(n,!1)}t.Vg()}function cRn(n,t,e,i){var r,c,a,o,u,s,h,f,l;for(f=i?(KQn(),_Rt):(KQn(),kRt),r=!1,s=0,h=(u=t[e]).length;s<h;++s)L_(uG(oIn(o=u[s],(jYn(),JMt)),101))||(a=o.e,(l=!Dgn(o,f).dc()&&!!a)&&(c=SPn(a),n.b=new IPn(c,i?0:c.length-1)),r|=d_n(n,o,f,l));return r}function aRn(n,t,e,i){var r,c,a;if(a=wSn(t,e),mv(i.c,t),-1==n.j[a.p]||2==n.j[a.p]||n.a[t.p])return i;for(n.j[a.p]=-1,c=new Fz(ix(Ggn(a).a.Kc(),new h));hDn(c);)if(!v9(r=uG(N9(c),18))&&(v9(r)||r.c.i.c!=r.d.i.c)&&r!=t)return aRn(n,r,a,i);return i}function oRn(n){var t,e,i,r;for(t=0,e=0,r=new Ww(n.j);r.a<r.c.c.length;)if(t=pz(Lgn(t,D7(JJ(new fX(null,new h3((i=uG(N3(r),12)).e,16)),new Wc)))),e=pz(Lgn(e,D7(JJ(new fX(null,new h3(i.g,16)),new Qc)))),t>1||e>1)return 2;return t+e==1?2:0}function uRn(n,t){var i,r,c,a;return c=n.a*X0n+1502*n.b,a=n.b*X0n+11,c+=i=e.Math.floor(a*z0n),a-=i*V0n,c%=V0n,n.a=c,n.b=a,t<=24?e.Math.floor(n.a*but[t]):((r=n.a*(1<<t-24)+e.Math.floor(n.b*wut[t]))>=2147483648&&(r-=4294967296),r)}function sRn(n,t,e){var i,r,c,a,o,u,s;for(c=new Zm,Uqn(n,s=new lS,a=new lS,t),RVn(n,s,a,t,e),u=new Ww(n);u.a<u.c.c.length;)for(r=new Ww((o=uG(N3(u),118)).k);r.a<r.c.c.length;)i=uG(N3(r),132),(!t||i.c==(_7(),$St))&&o.g>i.b.g&&mv(c.c,i);return c}function hRn(n,t,e){var i,r,c,a,o;for(a=n.c,c=(e.q?e.q:(hZ(),hZ(),Vot)).vc().Kc();c.Ob();)r=uG(c.Pb(),44),!Qj(JJ(new fX(null,new h3(a,16)),new hd(new kO(t,r)))).Bd((vS(),Kut))&&(F$(o=r.md(),4)&&null!=(i=Nvn(o))&&(o=i),t.qf(uG(r.ld(),149),o))}function fRn(n,t,e){var i;if(_J(n.b),JV(n.b,(Rdn(),HAt),(eP(),GLt)),JV(n.b,UAt,t.g),JV(n.b,GAt,t.a),n.a=Qzn(n.b,t),e.Ug("Compaction by shrinking a tree",n.a.c.length),t.i.c.length>1)for(i=new Ww(n.a);i.a<i.c.c.length;)uG(N3(i),47).Kf(t,e.eh(1));e.Vg()}function lRn(n,t,e){var i,r,c;if(!(c=iVn((gAn(),kBt),n.Dh(),t)))throw hv(new vM(Gtt+t.xe()+qtt));if(PP(),!uG(c,69).xk()&&!(c=_3(Nen(kBt,c))))throw hv(new vM(Gtt+t.xe()+qtt));r=uG((i=n.Ih(c))>=0?n.Lh(i,!0,!0):YNn(n,c,!0),160),uG(r,220).Xl(t,e)}function bRn(n,t){var e,i,r,c;if(t){for(c=!(r=F$(n.Cb,90)||F$(n.Cb,102))&&F$(n.Cb,331),e=new DD((!t.a&&(t.a=new AX(t,g_t,t)),t.a));e.e!=e.i.gc();)if(i=MGn(uG(Zkn(e),89)),r?F$(i,90):c?F$(i,156):i)return i;return r?(YYn(),x_t):(YYn(),N_t)}return null}function wRn(n,t){var e,i,r;for(t.Ug("Resize child graph to fit parent.",1),i=new Ww(n.b);i.a<i.c.c.length;)e=uG(N3(i),30),Ohn(n.a,e.a),e.a.c.length=0;for(r=new Ww(n.a);r.a<r.c.c.length;)a2(uG(N3(r),10),null);n.b.c.length=0,$Fn(n),n.e&&RUn(n.e,n),t.Vg()}function dRn(n,t){var e,i,r,c;for(t.Ug("Edge joining",1),e=oM(gK(oIn(n,(jYn(),xTt)))),i=new Ww(n.b);i.a<i.c.c.length;)for(c=new N4(uG(N3(i),30).a,0);c.b<c.d.gc();)MK(c.b<c.d.gc()),(r=uG(c.d.Xb(c.c=c.b++),10)).k==(zIn(),wbt)&&(pVn(r,e),LQ(c));t.Vg()}function gRn(n,t){var e,i,r,c,a;for(e=new Zm,r=sin(new fX(null,new h3(n,16)),new wa),c=sin(new fX(null,new h3(n,16)),new da),a=ken($7(ZJ(gKn(Uhn(cT(Fut,1),EZn,848,0,[r,c])),new ga))),i=1;i<a.length;i++)a[i]-a[i-1]>=2*t&&kD(e,new OU(a[i-1]+t,a[i]-t));return e}function pRn(n,t,e){var i,r,c,a,o;if(e)for(c=((i=new Gz(e.a.length)).b-i.a)*i.c<0?(CP(),XHt):new xD(i);c.Ob();)(r=v6(e,uG(c.Pb(),17).a))&&(Gan(a=b5(n,(gj(),o=new Hk,!!t&&LRn(o,t),o),r),k6(r,Iet)),fCn(r,a),kLn(r,a),qfn(n,r,a))}function mRn(n){var t,e,i,r;if(!n.j){if(r=new Ss,null==(t=V_t).a.zc(n,t)){for(i=new DD(n1(n));i.e!=i.i.gc();)CW(r,mRn(e=uG(Zkn(i),29))),ttn(r,e);t.a.Bc(n)}lbn(r),n.j=new vL((uG(zrn(gZ((tQ(),M_t).o),11),19),r.i),r.g),y9(n).b&=-33}return n.j}function vRn(n){var t,e,i,r;if(null==n)return null;if(i=yXn(n,!0),r=yct.length,m_(i.substr(i.length-r,r),yct))if(4==(e=i.length)){if(s3(0,i.length),43==(t=i.charCodeAt(0)))return fHt;if(45==t)return hHt}else if(3==e)return fHt;return new tk(i)}function kRn(n){var t,e,i;return(e=n.l)&e-1||(i=n.m)&i-1||(t=n.h)&t-1||0==t&&0==i&&0==e?-1:0==t&&0==i&&0!=e?pan(e):0==t&&0!=i&&0==e?pan(i)+22:0!=t&&0==i&&0==e?pan(t)+44:-1}function yRn(n,t){var e,i,r,c,a;for(r=t.a&n.f,c=null,i=n.b[r];;i=i.b){if(i==t){c?c.b=t.b:n.b[r]=t.b;break}c=i}for(a=t.f&n.f,c=null,e=n.c[a];;e=e.d){if(e==t){c?c.d=t.d:n.c[a]=t.d;break}c=e}t.e?t.e.c=t.c:n.a=t.c,t.c?t.c.e=t.e:n.e=t.e,--n.i,++n.g}function MRn(n,t){var e;t.d?t.d.b=t.b:n.a=t.b,t.b?t.b.d=t.d:n.e=t.d,t.e||t.c?(--(e=uG(nJ(uG(cQ(n.b,t.a),260)),260)).a,t.e?t.e.c=t.c:e.b=uG(nJ(t.c),511),t.c?t.c.e=t.e:e.c=uG(nJ(t.e),511)):((e=uG(nJ(uG(u7(n.b,t.a),260)),260)).a=0,++n.c),--n.d}function TRn(n){var t,i,r,c,a,o,u,s,h,f;for(i=n.o,t=n.p,o=vZn,c=j1n,u=vZn,a=j1n,h=0;h<i;++h)for(f=0;f<t;++f)eTn(n,h,f)&&(o=e.Math.min(o,h),c=e.Math.max(c,h),u=e.Math.min(u,f),a=e.Math.max(a,f));return s=c-o+1,r=a-u+1,new vY(xwn(o),xwn(u),xwn(s),xwn(r))}function jRn(n,t){var e,i,r,c;for(MK((c=new N4(n,0)).b<c.d.gc()),e=uG(c.d.Xb(c.c=c.b++),148);c.b<c.d.gc();)MK(c.b<c.d.gc()),r=new wG((i=uG(c.d.Xb(c.c=c.b++),148)).c,e.d,t),MK(c.b>0),c.a.Xb(c.c=--c.b),pF(c,r),MK(c.b<c.d.gc()),c.d.Xb(c.c=c.b++),r.a=!1,e=i}function ERn(n){var t,e,i,r,c;for(i=uG(oIn(n,(GYn(),Ppt)),12),c=new Ww(n.j);c.a<c.c.c.length;){for(e=new Ww((r=uG(N3(c),12)).g);e.a<e.c.c.length;)return u2(uG(N3(e),18),i),r;for(t=new Ww(r.e);t.a<t.c.c.length;)return c2(uG(N3(t),18),i),r}return null}function SRn(n,t,e){var i,r,c,a,o;for(o=uG(ER(n.a,t),17).a,PPn(n.a,xwn(e?o+1:o-1),t),a=new XL,r=new Fz(ix((e?Xgn(t):qgn(t)).a.Kc(),new h));hDn(r);)i=uG(N9(r),18),c=e?i.d.i:i.c.i,xA(ER(n.a,c))===xA(ER(n.a,t))&&a.a.zc(c,a);return a}function PRn(n,t,i){var r,c;dwn(r=Bsn(i.q.getTime()),0)<0?(c=$1n-pz(Kmn(Men(r),$1n)))==$1n&&(c=0):c=pz(Kmn(r,$1n)),1==t?jQ(n,48+(c=e.Math.min((c+50)/100|0,9))&D1n):2==t?Fen(n,c=e.Math.min((c+5)/10|0,99),2):(Fen(n,c,3),t>3&&Fen(n,0,t-3))}function CRn(n){var t,e,i,r;return xA(oIn(n,(jYn(),rMt)))===xA((Own(),Ixt))?!n.e&&xA(oIn(n,Oyt))!==xA((ihn(),hpt)):(i=uG(oIn(n,Ayt),299),r=oM(gK(oIn(n,Ryt)))||xA(oIn(n,Kyt))===xA((jan(),Ydt)),t=uG(oIn(n,Iyt),17).a,e=n.a.c.length,!r&&i!=(ihn(),hpt)&&(0==t||t>e))}function IRn(n){var t,e;for(e=0;e<n.c.length&&!(bq((u3(e,n.c.length),uG(n.c[e],113)))>0);e++);if(e>0&&e<n.c.length-1)return e;for(t=0;t<n.c.length&&!(bq((u3(t,n.c.length),uG(n.c[t],113)))>0);t++);return t>0&&e<n.c.length-1?t:n.c.length/2|0}function ORn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=6&&t){if(eEn(n,t))throw hv(new vM(net+A$n(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?zjn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=kyn(t,n,6,i)),(i=ZK(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,6,t,t))}function ARn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=3&&t){if(eEn(n,t))throw hv(new vM(net+SXn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?sEn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=kyn(t,n,12,i)),(i=nF(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,3,t,t))}function LRn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=9&&t){if(eEn(n,t))throw hv(new vM(net+VBn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?Wjn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=kyn(t,n,9,i)),(i=tF(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,9,t,t))}function NRn(n){var t,e,i,r,c;if(i=bEn(n),null==(c=n.j)&&i)return n.Jk()?null:i.ik();if(F$(i,156)){if((e=i.jk())&&(r=e.wi())!=n.i){if((t=uG(i,156)).nk())try{n.g=r.ti(t,c)}catch(a){if(!F$(a=Ehn(a),82))throw hv(a);n.g=null}n.i=r}return n.g}return null}function $Rn(n){var t;return kD(t=new Zm,new ZP(new MO(n.c,n.d),new MO(n.c+n.b,n.d))),kD(t,new ZP(new MO(n.c,n.d),new MO(n.c,n.d+n.a))),kD(t,new ZP(new MO(n.c+n.b,n.d+n.a),new MO(n.c+n.b,n.d))),kD(t,new ZP(new MO(n.c+n.b,n.d+n.a),new MO(n.c,n.d+n.a))),t}function DRn(n){var t,e;if(null==n)return IZn;try{return cpn(n)}catch(i){if(F$(i=Ehn(i),103))return t=i,e=Ij(Tbn(n))+"@"+(bS(),(Avn(n)>>>0).toString(16)),wkn(ghn(),(pS(),"Exception during lenientFormat for "+e),t),"<"+e+" threw "+Ij(t.Rm)+">";throw hv(i)}}function xRn(n,t,e){var i,r;for(r=t.a.ec().Kc();r.Ob();)i=uG(r.Pb(),74),!uG(cQ(n.b,i),272)&&(R0(bIn(i))==R0(gIn(i))?QKn(n,i,e):bIn(i)==R0(gIn(i))?null==cQ(n.c,i)&&null!=cQ(n.b,gIn(i))&&bWn(n,i,e,!1):null==cQ(n.d,i)&&null!=cQ(n.b,bIn(i))&&bWn(n,i,e,!0))}function RRn(n,t){var e,i,r,c,a,o,u;for(r=n.Kc();r.Ob();)for(i=uG(r.Pb(),10),o2(o=new lOn,i),NLn(o,(KQn(),kRt)),kfn(o,(GYn(),fmt),(qx(),!0)),a=t.Kc();a.Ob();)c=uG(a.Pb(),10),o2(u=new lOn,c),NLn(u,_Rt),kfn(u,fmt,!0),kfn(e=new UZ,fmt,!0),c2(e,o),u2(e,u)}function KRn(n,t,e,i){var r,c,a,o;r=evn(n,t,e),c=evn(n,e,t),a=uG(cQ(n.c,t),118),o=uG(cQ(n.c,e),118),r<c?new A2((_7(),DSt),a,o,c-r):c<r?new A2((_7(),DSt),o,a,r-c):(0!=r||t.i&&e.i&&i[t.i.c][e.i.c])&&(new A2((_7(),DSt),a,o,0),new A2(DSt,o,a,0))}function FRn(n,t){var e,i,r,c,a,o;for(r=0,a=new Ww(t.a);a.a<a.c.c.length;)for(r+=(c=uG(N3(a),10)).o.b+c.d.a+c.d.d+n.e,i=new Fz(ix(qgn(c).a.Kc(),new h));hDn(i);)(e=uG(N9(i),18)).c.i.k==(zIn(),gbt)&&(r+=(o=uG(oIn(e.c.i,(GYn(),rmt)),10)).o.b+o.d.a+o.d.d);return r}function _Rn(){_Rn=E,xAt=new hO("CANDIDATE_POSITION_LAST_PLACED_RIGHT",0),DAt=new hO("CANDIDATE_POSITION_LAST_PLACED_BELOW",1),KAt=new hO("CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT",2),RAt=new hO("CANDIDATE_POSITION_WHOLE_DRAWING_BELOW",3),FAt=new hO("WHOLE_DRAWING",4)}function BRn(n,t){if(F$(t,207))return Ldn(n,uG(t,27));if(F$(t,193))return tgn(n,uG(t,123));if(F$(t,366))return DY(n,uG(t,135));if(F$(t,326))return wqn(n,uG(t,74));if(t)return null;throw hv(new vM(Aet+vIn(new IM(Uhn(cT(dat,1),EZn,1,5,[t])))))}function HRn(n){var t,e,i,r,c,a,o;for(c=new lS,r=new Ww(n.d.a);r.a<r.c.c.length;)0==(i=uG(N3(r),125)).b.a.c.length&&s8(c,i,c.c.b,c.c);if(c.b>1)for(t=jx((e=new sk,++n.b,e),n.d),o=Fkn(c,0);o.b!=o.d.c;)a=uG(I6(o),125),RKn(xS(DS(RS($S(new uk,1),0),t),a))}function URn(n,t,e){var i,r,c,a;for(e.Ug("Breaking Point Removing",1),n.a=uG(oIn(t,(jYn(),Vyt)),223),r=new Ww(t.b);r.a<r.c.c.length;)for(a=new Ww(T3(uG(N3(r),30).a));a.a<a.c.c.length;)Lin(c=uG(N3(a),10))&&!(i=uG(oIn(c,(GYn(),Spt)),313)).d&&PQn(n,i);e.Vg()}function GRn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=11&&t){if(eEn(n,t))throw hv(new vM(net+zBn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?hEn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=kyn(t,n,10,i)),(i=n_(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,11,t,t))}function qRn(n){var t,e,i,r;for(i=new bsn(new Nw(n.b).a);i.b;)r=uG((e=von(i)).ld(),12),kfn(t=uG(e.md(),10),(GYn(),rmt),r),kfn(r,lmt,t),kfn(r,qpt,(qx(),!0)),NLn(r,uG(oIn(t,Fpt),64)),oIn(t,Fpt),kfn(r.i,(jYn(),JMt),($Pn(),oRt)),uG(oIn(HQ(r.i),Hpt),21).Fc((r_n(),rpt))}function XRn(n,t,e){var i,r,c;if(i=0,r=0,n.c)for(c=new Ww(n.d.i.j);c.a<c.c.c.length;)i+=uG(N3(c),12).e.c.length;else i=1;if(n.d)for(c=new Ww(n.c.i.j);c.a<c.c.c.length;)r+=uG(N3(c),12).g.c.length;else r=1;return(e+t)/2+.4*t0(gq(r-i))*(e-t)}function zRn(n){var t,e;if(gPn(),n.Hc((KQn(),FRt)))throw hv(new vM("Port sides must not contain UNDEFINED"));switch(n.gc()){case 1:return wdt;case 2:return t=n.Hc(kRt)&&n.Hc(_Rt),e=n.Hc(yRt)&&n.Hc(KRt),t||e?pdt:gdt;case 3:return ddt;case 4:return bdt;default:return null}}function VRn(n,t,e){return l_n(),(!qun(n,t)||!qun(n,e))&&(RWn(new MO(n.c,n.d),new MO(n.c+n.b,n.d),t,e)||RWn(new MO(n.c+n.b,n.d),new MO(n.c+n.b,n.d+n.a),t,e)||RWn(new MO(n.c+n.b,n.d+n.a),new MO(n.c,n.d+n.a),t,e)||RWn(new MO(n.c,n.d+n.a),new MO(n.c,n.d),t,e))}function WRn(n,t){var e,i,r,c;if(!n.dc())for(e=0,i=n.gc();e<i;++e)if(null==(c=mK(n.Xb(e)))?null==t:m_(c.substr(0,3),"!##")?null!=t&&(r=t.length,!m_(c.substr(c.length-r,r),t)||c.length!=t.length+3)&&!m_(lct,t):m_(c,bct)&&!m_(lct,t)||m_(c,t))return!0;return!1}function QRn(n,t,e,i){var r,c,a,o,u,s;for(a=n.j.c.length,u=Inn(_st,X2n,314,a,0,1),o=0;o<a;o++)(c=uG(zq(n.j,o),12)).p=o,u[o]=r$n(bDn(c),e,i);for(BKn(n,u,e,t,i),s=new Ym,r=0;r<u.length;r++)u[r]&&vJ(s,uG(zq(n.j,r),12),u[r]);s.f.c+s.i.c!=0&&(kfn(n,(GYn(),$pt),s),dOn(n,u))}function JRn(n,t){var e,i,r;for(t.Ug("Partition postprocessing",1),e=new Ww(n.b);e.a<e.c.c.length;)for(i=new Ww(uG(N3(e),30).a);i.a<i.c.c.length;)for(r=new Ww(uG(N3(i),10).j);r.a<r.c.c.length;)oM(gK(oIn(uG(N3(r),12),(GYn(),fmt))))&&tW(r);t.Vg()}function YRn(n,t,e){var i,r;for(i=new Ww(n.a.b);i.a<i.c.c.length;)if((r=z4(uG(N3(i),60)))&&r.k==(zIn(),lbt))switch(uG(oIn(r,(GYn(),Fpt)),64).g){case 4:r.n.a=t.a;break;case 2:r.n.a=e.a-(r.o.a+r.d.c);break;case 1:r.n.b=t.b;break;case 3:r.n.b=e.b-(r.o.b+r.d.a)}}function ZRn(n,t,e){var i,r,c;for(e.Ug("Processor determine the height for each level",1),n.a=0==t.b.b?1:t.b.b,r=null,i=Fkn(t.b,0);!r&&i.b!=i.d.c;)oM(gK(oIn(c=uG(I6(i),40),(OQn(),UPt))))&&(r=c);r&&dqn(n,n7(Uhn(cT(lPt,1),z9n,40,0,[r])),e,uG(oIn(t,(QGn(),cCt)),88)),e.Vg()}function nKn(n){var t,e,i,r;for(gj(),aKn(i=new Bk,n),e=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));e.e!=e.i.gc();)t=uG(Zkn(e),27),GRn(r=new Bk,i),vN(r,t.g,t.f),Gan(r,t.k),kN(r,t.i,t.j),ttn((!i.a&&(i.a=new fV(bFt,i,10,11)),i.a),r),aKn(r,t);return i}function tKn(n,t,e){var i,r,c;if(!(r=uG(zDn(t,(lIn(),XNt)),17))&&(r=xwn(0)),!(c=uG(zDn(e,XNt),17))&&(c=xwn(0)),r.a>c.a)return-1;if(r.a<c.a)return 1;if(n.a){if(0!=(i=ugn(t.j,e.j)))return i;if(0!=(i=ugn(t.i,e.i)))return i}return ugn(t.g*t.f,e.g*e.f)}function eKn(n,t){var e,i,r,c,a,o,u,s,h,f;if(++n.e,t>(u=null==n.d?0:n.d.length)){for(h=n.d,n.d=Inn(IFt,qit,66,2*u+4,0,1),c=0;c<u;++c)if(s=h[c])for(i=s.g,f=s.i,o=0;o<f;++o)a=iF(n,(r=uG(i[o],136)).Bi()),!(e=n.d[a])&&(e=n.d[a]=n.dk()),e.Fc(r);return!0}return!1}function iKn(n,t,e){var i,r,c,a,o,u;if(c=(r=e).Lk(),EFn(n.e,c)){if(c.Si())for(i=uG(n.g,124),a=0;a<n.i;++a)if(udn(o=i[a],r)&&a!=t)throw hv(new vM(Xet))}else for(u=VKn(n.e.Dh(),c),i=uG(n.g,124),a=0;a<n.i;++a)if(o=i[a],u.am(o.Lk()))throw hv(new vM(dct));$dn(n,t,e)}function rKn(n,t){var e,i,r,c,a,o;for(e=uG(oIn(t,(GYn(),xpt)),21),a=uG(Y9((aYn(),Jlt),e),21),o=uG(Y9(rbt,e),21),c=a.Kc();c.Ob();)if(i=uG(c.Pb(),21),!uG(Y9(n.b,i),15).dc())return!1;for(r=o.Kc();r.Ob();)if(i=uG(r.Pb(),21),!uG(Y9(n.b,i),15).dc())return!1;return!0}function cKn(n,t){var e,i,r,c,a,o,u;if(1==n.a.c.length)return EOn(uG(zq(n.a,0),172),t);for(r=Swn(n),a=0,o=n.d,i=r,u=n.d,c=(o-i)/2+i;i+1<o;){for(a=0,e=new Ww(n.a);e.a<e.c.c.length;)a+=uXn(uG(N3(e),172),c,!1).a;a<t?(u=c,o=c):i=c,c=(o-i)/2+i}return u}function aKn(n,t){var e,i,r,c,a;if(!t)return n;if(F$(t,342))for(r=uG(t,342),!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),c=n.o,i=r.gh().c.Kc();i.e!=i.i.gc();)a=(e=uG(i.Yj(),44)).md(),rSn(c,uG(e.ld(),149),a);else!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),hon(n.o,t.nf());return n}function oKn(n){var t,e,i,r;return isNaN(n)?(tin(),not):n<-0x8000000000000000?(tin(),Yat):n>=0x8000000000000000?(tin(),Jat):(i=!1,n<0&&(i=!0,n=-n),e=0,n>=d0n&&(n-=(e=t0(n/d0n))*d0n),t=0,n>=w0n&&(n-=(t=t0(n/w0n))*w0n),r=p$(t0(n),t,e),i&&Yfn(r),r)}function uKn(n){var t,e,i,r,c;if(c=new Zm,Prn(n.b,new Ed(c)),n.b.c.length=0,0!=c.c.length){for(u3(0,c.c.length),t=uG(c.c[0],82),e=1,i=c.c.length;e<i;++e)u3(e,c.c.length),(r=uG(c.c[e],82))!=t&&OCn(t,r);if(F$(t,63))throw hv(uG(t,63));if(F$(t,296))throw hv(uG(t,296))}}function sKn(n,t){var e,i,r,c;for(e=!t||!n.u.Hc((eNn(),wRt)),c=0,r=new Ww(n.e.Xf());r.a<r.c.c.length;){if((i=uG(N3(r),852)).ag()==(KQn(),FRt))throw hv(new vM("Label and node size calculator can only be used with ports that have port sides assigned."));i.Qf(c++),wwn(n,i,e)}}function hKn(n){var t,e,i,r,c;for(e=new Ww(n.a.a);e.a<e.c.c.length;){for((t=uG(N3(e),316)).j=null,c=t.a.a.ec().Kc();c.Ob();)dL((i=uG(c.Pb(),60)).b),(!t.j||i.d.c<t.j.d.c)&&(t.j=i);for(r=t.a.a.ec().Kc();r.Ob();)(i=uG(r.Pb(),60)).b.a=i.d.c-t.j.d.c,i.b.b=i.d.d-t.j.d.d}return n}function fKn(n){var t,e,i,r,c;for(e=new Ww(n.a.a);e.a<e.c.c.length;){for((t=uG(N3(e),194)).f=null,c=t.a.a.ec().Kc();c.Ob();)dL((i=uG(c.Pb(),86)).e),(!t.f||i.g.c<t.f.g.c)&&(t.f=i);for(r=t.a.a.ec().Kc();r.Ob();)(i=uG(r.Pb(),86)).e.a=i.g.c-t.f.g.c,i.e.b=i.g.d-t.f.g.d}return n}function lKn(n){var t,i,r;return i=uG(n.a,17).a,r=uG(n.b,17).a,i<(t=e.Math.max(e.Math.abs(i),e.Math.abs(r)))&&r==-t?new WO(xwn(i+1),xwn(r)):i==t&&r<t?new WO(xwn(i),xwn(r+1)):i>=-t&&r==t?new WO(xwn(i-1),xwn(r)):new WO(xwn(i),xwn(r-1))}function bKn(){return zYn(),Uhn(cT(Vwt,1),p1n,81,0,[qbt,Hbt,Xbt,uwt,Pwt,lwt,Nwt,pwt,Ewt,iwt,ywt,gwt,Swt,Zbt,Dwt,xbt,kwt,Iwt,swt,Cwt,Rwt,Twt,Rbt,jwt,Kwt,Awt,xwt,hwt,Qbt,fwt,owt,$wt,_bt,Vbt,wwt,Fbt,dwt,cwt,nwt,mwt,ewt,Ubt,Bbt,awt,twt,vwt,Lwt,Kbt,Mwt,rwt,bwt,Jbt,Wbt,Owt,zbt,Ybt,Gbt])}function wKn(n,t,e){n.d=0,n.b=0,t.k==(zIn(),gbt)&&e.k==gbt&&uG(oIn(t,(GYn(),rmt)),10)==uG(oIn(e,rmt),10)&&(jen(t).j==(KQn(),yRt)?Rxn(n,t,e):Rxn(n,e,t)),t.k==gbt&&e.k==wbt?jen(t).j==(KQn(),yRt)?n.d=1:n.b=1:e.k==gbt&&t.k==wbt&&(jen(e).j==(KQn(),yRt)?n.b=1:n.d=1),GMn(n,t,e)}function dKn(n){var t,e,i,r,c;return c=gCn(n),null!=n.a&&ZG(c,"category",n.a),!pE(new Lw(n.d))&&(nrn(c,"knownOptions",i=new Ib),t=new Mm(i),z8(new Lw(n.d),t)),!pE(n.g)&&(nrn(c,"supportedFeatures",r=new Ib),e=new Tm(r),z8(n.g,e)),c}function gKn(n){var t,e,i,r,c,a,o,u;for(t=336,e=0,r=new UF(n.length),o=0,u=(a=n).length;o<u;++o)vgn(c=a[o]),GQ(c),i=c.a,kD(r.a,WW(i)),t&=i.yd(),e=cbn(e,i.zd());return uG(uG(bW(new fX(null,ICn(new h3((ZW(),Emn(r.a)),16),new g,t,e)),new jb(n)),687),848)}function pKn(n,t){var e;n.d&&(t.c!=n.e.c||iun(n.e.b,t.b))&&(kD(n.f,n.d),n.a=n.d.c+n.d.b,n.d=null,n.e=null),HL(t.b)?n.c=t:n.b=t,(t.b==(Xhn(),Flt)&&!t.a||t.b==_lt&&t.a||t.b==Blt&&t.a||t.b==Hlt&&!t.a)&&n.c&&n.b&&(e=new gY(n.a,n.c.d,t.c-n.a,n.b.d-n.c.d),n.d=e,n.e=t)}function mKn(n){var t;if(ly.call(this),this.i=new su,this.g=n,this.f=uG(n.e&&n.e(),9).length,0==this.f)throw hv(new vM("There must be at least one phase in the phase enumeration."));this.c=new nB(t=uG(Mj(this.g),9),uG(MF(t,t.length),9),0),this.a=new wJ,this.b=new Ym}function vKn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=7&&t){if(eEn(n,t))throw hv(new vM(net+zOn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?Vjn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=uG(t,54).Rh(n,1,iFt,i)),(i=dz(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,7,t,t))}function kKn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=3&&t){if(eEn(n,t))throw hv(new vM(net+fdn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?Yjn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=uG(t,54).Rh(n,0,uFt,i)),(i=gz(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,3,t,t))}function yKn(n,t){var e,i,r,c,a,o,u,s,h;return b_n(),t.d>n.d&&(o=n,n=t,t=o),t.d<63?KFn(n,t):(s=$9(n,a=(-2&n.d)<<4),h=$9(t,a),i=mXn(n,D9(s,a)),r=mXn(t,D9(h,a)),u=yKn(s,h),e=yKn(i,r),c=D9(c=Zzn(Zzn(c=yKn(mXn(s,i),mXn(r,h)),u),e),a),Zzn(Zzn(u=D9(u,a<<1),c),e))}function MKn(){MKn=E,rjt=new fI(v9n,0),tjt=new fI("LONGEST_PATH",1),ejt=new fI("LONGEST_PATH_SOURCE",2),YTt=new fI("COFFMAN_GRAHAM",3),njt=new fI(D6n,4),cjt=new fI("STRETCH_WIDTH",5),ijt=new fI("MIN_WIDTH",6),JTt=new fI("BF_MODEL_ORDER",7),ZTt=new fI("DF_MODEL_ORDER",8)}function TKn(n,t,e){var i,r,c,a,o;for(a=Vwn(n,e),o=Inn(pbt,e6n,10,t.length,0,1),i=0,c=a.Kc();c.Ob();)oM(gK(oIn(r=uG(c.Pb(),12),(GYn(),qpt))))&&(o[i++]=uG(oIn(r,lmt),10));if(i<t.length)throw hv(new kM("Expected "+t.length+" hierarchical ports, but found only "+i+"."));return o}function jKn(n,t){var e,i,r,c,a,o;if(!n.tb){for(!n.rb&&(n.rb=new vV(n,s_t,n)),o=new sS((c=n.rb).i),r=new DD(c);r.e!=r.i.gc();)i=uG(Zkn(r),142),(e=uG(null==(a=i.xe())?VAn(o.f,null,i):kgn(o.i,a,i),142))&&(null==a?VAn(o.f,null,e):kgn(o.i,a,e));n.tb=o}return uG(U1(n.tb,t),142)}function EKn(n,t){var e,i,r,c,a;if((null==n.i&&eqn(n),n.i).length,!n.p){for(a=new sS(1+(3*n.g.i/2|0)),r=new nR(n.g);r.e!=r.i.gc();)i=uG(nyn(r),179),(e=uG(null==(c=i.xe())?VAn(a.f,null,i):kgn(a.i,c,i),179))&&(null==c?VAn(a.f,null,e):kgn(a.i,c,e));n.p=a}return uG(U1(n.p,t),179)}function SKn(n,t,e,i,r){var c,a,o,u;for(Xvn(i+i1(e,e.ie()),r),mQ(t,Rpn(e)),(c=e.f)&&SKn(n,t,c,"Caused by: ",!1),null==e.k&&(e.k=Inn(xat,zZn,82,0,0,1)),o=0,u=(a=e.k).length;o<u;++o)SKn(n,t,a[o],"Suppressed: ",!1);null!=console.groupEnd&&console.groupEnd.call(console)}function PKn(n,t,e,i){var r,c,a,o;for(a=(o=t.e).length,c=t.q.ug(o,e?0:a-1,e),c|=wBn(n,o[e?0:a-1],e,i),r=e?1:a-2;e?r<a:r>=0;r+=e?1:-1)c|=t.c.lg(o,r,e,i&&!oM(gK(oIn(t.j,(GYn(),Bpt))))&&!oM(gK(oIn(t.j,(GYn(),mmt))))),c|=t.q.ug(o,r,e),c|=wBn(n,o[r],e,i);return FV(n.c,t),c}function CKn(n,t,e){var i,r,c,a,o,u,s,h;for(s=0,h=(u=s6(n.j)).length;s<h;++s){if(o=u[s],e==(can(),Vjt)||e==Qjt)for(c=0,a=(r=x4(o.g)).length;c<a;++c)wOn(t,i=r[c])&&pqn(i,!0);if(e==Wjt||e==Qjt)for(c=0,a=(r=x4(o.e)).length;c<a;++c)bOn(t,i=r[c])&&pqn(i,!0)}}function IKn(n){var t,e;switch(t=null,e=null,FSn(n).g){case 1:KQn(),t=kRt,e=_Rt;break;case 2:KQn(),t=KRt,e=yRt;break;case 3:KQn(),t=_Rt,e=kRt;break;case 4:KQn(),t=yRt,e=KRt}qb(n,uG(yx(Qz(uG(Y9(n.k,t),15).Oc(),Fdt)),113)),Gb(n,uG(yx(Wz(uG(Y9(n.k,e),15).Oc(),Fdt)),113))}function OKn(n){var t,e,i,r,c,a;if((r=uG(zq(n.j,0),12)).e.c.length+r.g.c.length==0)n.n.a=0;else{for(a=0,i=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[new zd(r),new Wd(r)])));hDn(i);)a+=(e=uG(N9(i),12)).i.n.a+e.n.a+e.a.a;c=(t=uG(oIn(n,(jYn(),WMt)),8))?t.a:0,n.n.a=a/(r.e.c.length+r.g.c.length)-c}}function AKn(n,t){var e,i,r;for(i=new Ww(t.a);i.a<i.c.c.length;)e=uG(N3(i),225),JX(uG(e.b,68),YF(D$(uG(t.b,68).c),uG(t.b,68).a)),(r=oGn(uG(t.b,68).b,uG(e.b,68).b))>1&&(n.a=!0),YX(uG(e.b,68),JF(D$(uG(t.b,68).c),vD(YF(D$(uG(e.b,68).a),uG(t.b,68).a),r))),f2(n,t),AKn(n,e)}function LKn(n){var t,e,i,r,c,a;for(r=new Ww(n.a.a);r.a<r.c.c.length;)(e=uG(N3(r),194)).e=0,e.d.a.$b();for(i=new Ww(n.a.a);i.a<i.c.c.length;)for(t=(e=uG(N3(i),194)).a.a.ec().Kc();t.Ob();)for(a=uG(t.Pb(),86).f.Kc();a.Ob();)(c=uG(a.Pb(),86)).d!=e&&(FV(e.d,c),++c.d.e)}function NKn(n){var t,e,i,r,c,a,o,u;for(e=0,t=u=n.j.c.length,r=2*u,o=new Ww(n.j);o.a<o.c.c.length;)switch((a=uG(N3(o),12)).j.g){case 2:case 4:a.p=-1;break;case 1:case 3:i=a.e.c.length,c=a.g.c.length,a.p=i>0&&c>0?t++:i>0?e++:c>0?r++:e++}hZ(),f$(n.j,new bi)}function $Kn(n){var t,e;e=null,t=uG(zq(n.g,0),18);do{if(vR(e=t.d.i,(GYn(),nmt)))return uG(oIn(e,nmt),12).i;if(e.k!=(zIn(),dbt)&&hDn(new Fz(ix(Xgn(e).a.Kc(),new h))))t=uG(N9(new Fz(ix(Xgn(e).a.Kc(),new h))),18);else if(e.k!=dbt)return null}while(e&&e.k!=(zIn(),dbt));return e}function DKn(n,t){var e,i,r,c,a,o,u,s,h;for(o=t.j,a=t.g,u=uG(zq(o,o.c.length-1),113),u3(0,o.c.length),s=xTn(n,a,u,h=uG(o.c[0],113)),c=1;c<o.c.length;c++)u3(c-1,o.c.length),e=uG(o.c[c-1],113),u3(c,o.c.length),(i=xTn(n,a,e,r=uG(o.c[c],113)))>s&&(u=e,h=r,s=i);t.a=h,t.c=u}function xKn(n,t,e){var i,r,c,a,o,u,s;for(s=new Hj(new ip(n)),o=0,u=(a=Uhn(cT(Abt,1),i6n,12,0,[t,e])).length;o<u;++o)for(c=a[o],s.a.zc(c,(qx(),tot)),r=new w7(c.b);l$(r.a)||l$(r.b);)(i=uG(l$(r.a)?N3(r.a):N3(r.b),18)).c==i.d||_V(s,c==i.c?i.d:i.c);return WW(s),new Z_(s)}function RKn(n){if(!n.a.d||!n.a.e)throw hv(new kM((vK(Mst),Mst.k+" must have a source and target "+(vK(Tst),Tst.k+" specified."))));if(n.a.d==n.a.e)throw hv(new kM("Network simplex does not support self-loops: "+n.a+" "+n.a.d+" "+n.a.e));return Sx(n.a.d.g,n.a),Sx(n.a.e.b,n.a),n.a}function KKn(n,t){var e,i,r,c,a,o;for(t.Ug("Constraints Postprocessor",1),c=0,r=new Ww(n.b);r.a<r.c.c.length;){for(o=0,a=!1,i=new Ww(uG(N3(r),30).a);i.a<i.c.c.length;)(e=uG(N3(i),10)).k==(zIn(),dbt)&&(a=!0,kfn(e,(jYn(),pMt),xwn(c)),kfn(e,xyt,xwn(o)),++o);a&&++c}t.Vg()}function FKn(n,t,e){var i,r,c,a,o,u;if(i=0,0!=t.b&&0!=e.b){c=Fkn(t,0),a=Fkn(e,0),o=uM(pK(I6(c))),u=uM(pK(I6(a))),r=!0;do{if(o>u-n.b&&o<u+n.b)return-1;o>u-n.a&&o<u+n.a&&++i,o<=u&&c.b!=c.d.c?o=uM(pK(I6(c))):u<=o&&a.b!=a.d.c?u=uM(pK(I6(a))):r=!1}while(r)}return i}function _Kn(n,t){var e;return _J(n.a),JV(n.a,(pon(),VCt),VCt),JV(n.a,WCt,WCt),Aq(e=new wJ,WCt,(zPn(),tIt)),xA(zDn(t,(jOn(),LIt)))!==xA((vbn(),sIt))&&Aq(e,WCt,YCt),oM(gK(zDn(t,UIt)))&&Aq(e,WCt,eIt),Aq(e,WCt,ZCt),oM(gK(zDn(t,qIt)))&&wz(e,WCt,nIt),ZL(n.a,e),Qzn(n.a,t)}function BKn(n,t,e,i,r){var c,a,o,u;for(u=new nB(c=uG(Mj(YRt),9),uG(MF(c,c.length),9),0),o=new Ww(n.j);o.a<o.c.c.length;)t[(a=uG(N3(o),12)).p]&&(aJn(a,t[a.p],i),Mon(u,a.j));r?(CPn(n,t,(KQn(),kRt),2*e,i),CPn(n,t,_Rt,2*e,i)):(CPn(n,t,(KQn(),yRt),2*e,i),CPn(n,t,KRt,2*e,i))}function HKn(n){var t;for(t=new Fz(ix(Xgn(n).a.Kc(),new h));hDn(t);)if(uG(N9(t),18).d.i.k!=(zIn(),bbt))throw hv(new jM(y6n+ZTn(n)+"' has its layer constraint set to LAST, but has at least one outgoing edge that does not go to a LAST_SEPARATE node. That must not happen."))}function UKn(n,t,e){var i,r,c,a;for(e.Ug("Longest path layering",1),n.a=t,a=n.a.a,n.b=Inn(YHt,W1n,28,a.c.length,15,1),i=0,c=new Ww(a);c.a<c.c.c.length;)uG(N3(c),10).p=i,n.b[i]=-1,++i;for(r=new Ww(a);r.a<r.c.c.length;)Ixn(n,uG(N3(r),10));a.c.length=0,n.a=null,n.b=null,e.Vg()}function GKn(n,t,i,r){var c,a,o,u,s,f,l;for(u=0,s=new Ww(n.a);s.a<s.c.c.length;){for(o=0,a=new Fz(ix(qgn(uG(N3(s),10)).a.Kc(),new h));hDn(a);)f=n3((c=uG(N9(a),18)).c).b,l=n3(c.d).b,o=e.Math.max(o,e.Math.abs(l-f));u=e.Math.max(u,o)}return r*e.Math.min(1,t/i)*u}function qKn(n,t){var e,i,r,c,a;for(a=uG(oIn(t,(QGn(),MCt)),433),c=Fkn(t.b,0);c.b!=c.d.c;)if(r=uG(I6(c),40),0==n.b[r.g]){switch(a.g){case 0:vMn(n,r);break;case 1:ADn(n,r)}n.b[r.g]=2}for(i=Fkn(n.a,0);i.b!=i.d.c;)Wpn((e=uG(I6(i),65)).b.d,e,!0),Wpn(e.c.b,e,!0);kfn(t,(OQn(),_Pt),n.a)}function XKn(n){var t;return t=new VM,256&n&&(t.a+="F"),128&n&&(t.a+="H"),512&n&&(t.a+="X"),2&n&&(t.a+="i"),8&n&&(t.a+="m"),4&n&&(t.a+="s"),32&n&&(t.a+="u"),64&n&&(t.a+="w"),16&n&&(t.a+="x"),n&w1n&&(t.a+=","),lM(t.a)}function zKn(n,t){var i,r,c,a,o;t.Ug(snt,1),c=uG(zDn(n,(S_n(),hAt)),107),!n.a&&(n.a=new fV(bFt,n,10,11)),a=Ijn(n.a),o=e.Math.max(a.a,uM(pK(zDn(n,(lBn(),EOt))))-(c.b+c.c)),i=(r=e.Math.max(a.b,uM(pK(zDn(n,MOt)))-(c.d+c.a)))-a.b,Myn(n,pOt,i),Myn(n,vOt,o),Myn(n,mOt,r+i),t.Vg()}function VKn(n,t){var e,i,r,c;return PP(),t?t==(uVn(),cHt)||(t==BBt||t==FBt||t==_Bt)&&n!=KBt?new MQn(n,t):((e=(i=uG(t,692)).$k())||(BJ(Nen((gAn(),kBt),t)),e=i.$k()),!e.i&&(e.i=new Ym),!(r=uG(DA(FX((c=e.i).f,n)),2041))&&vJ(c,n,r=new MQn(n,t)),r):PBt}function WKn(n,t){var e;if(!_V(n.b,t.b))throw hv(new kM("Invalid hitboxes for scanline constraint calculation."));(Ihn(t.b,uG(MS(n.b,t.b),60))||Ihn(t.b,uG(yS(n.b,t.b),60)))&&(bS(),String.fromCharCode(10)),n.a[t.b.f]=uG(jS(n.b,t.b),60),(e=uG(TS(n.b,t.b),60))&&(n.a[e.f]=t.b)}function QKn(n,t,e){var i,r,c;for(zsn(c=new pDn(vYn(COn(JFn(t,!1,!1)),uM(pK(zDn(t,(ryn(),Jht))))+n.a)),t),vJ(n.b,t,c),mv(e.c,c),!t.n&&(t.n=new fV(lFt,t,1,7)),r=new DD(t.n);r.e!=r.i.gc();)i=nHn(n,uG(Zkn(r),135),!0,0,0),mv(e.c,i);return c}function JKn(n,t){var e,i,r,c,a,o;for(r=new Zm,e=0;e<=n.j;e++)(i=new bQ(t)).p=n.j-e,mv(r.c,i);for(o=new Ww(n.p);o.a<o.c.c.length;)a2(a=uG(N3(o),10),uG(zq(r,n.j-n.g[a.p]),30));for(c=new Ww(r);c.a<c.c.c.length;)0==uG(N3(c),30).a.c.length&&tW(c);t.b.c.length=0,Ohn(t.b,r)}function YKn(n,t){var e,i,r,c,a,o,u,s;for(o=uG(oIn(n,(GYn(),rmt)),12),u=Gfn(Uhn(cT(PNt,1),zZn,8,0,[o.i.n,o.n,o.a])).a,s=n.i.n.b,r=0,c=(i=x4(n.e)).length;r<c;++r)u2(e=i[r],o),cL(e.a,new MO(u,s)),t&&((a=uG(oIn(e,(jYn(),bMt)),75))||(a=new Uk,kfn(e,bMt,a)),aq(a,new MO(u,s)))}function ZKn(n,t){var e,i,r,c,a,o,u,s;for(i=uG(oIn(n,(GYn(),rmt)),12),u=Gfn(Uhn(cT(PNt,1),zZn,8,0,[i.i.n,i.n,i.a])).a,s=n.i.n.b,a=0,o=(c=x4(n.g)).length;a<o;++a)c2(r=c[a],i),aL(r.a,new MO(u,s)),t&&((e=uG(oIn(r,(jYn(),bMt)),75))||(e=new Uk,kfn(r,bMt,e)),aq(e,new MO(u,s)))}function nFn(n){var t,e,i,r,c,a,o;if(r=(i=n.b).e,c=L_(uG(oIn(i,(jYn(),JMt)),101)),e=!!r&&uG(oIn(r,(GYn(),Hpt)),21).Hc((r_n(),tpt)),!c&&!e)for(o=new _w(new Fw(n.e).a.vc().Kc());o.a.Ob();)t=uG(o.a.Pb(),44),(a=uG(t.md(),113)).a&&(o2(a.d,null),a.c=!0,n.a=!0)}function tFn(n,t){var e,i;for(t.Ug("Semi-Interactive Crossing Minimization Processor",1),e=!1,i=new Ww(n.b);i.a<i.c.c.length;)e|=null!=cdn(krn(JJ(JJ(new fX(null,new h3(uG(N3(i),30).a,16)),new Qi),new Ji),new Yi),new Zi).a;e&&kfn(n,(GYn(),Wpt),(qx(),!0)),t.Vg()}function eFn(n,t){var e,i,r,c,a;for(n.b=new Zm,n.d=uG(oIn(t,(GYn(),dmt)),234),n.e=X3(n.d),c=new lS,r=n7(Uhn(cT(sbt,1),V4n,36,0,[t])),a=0;a<r.c.length;)u3(a,r.c.length),(i=uG(r.c[a],36)).p=a++,Ohn(r,(e=new KVn(i,n.a,n.b)).b),kD(n.b,e),e.s&&lW(Fkn(c,0),e);return n.c=new ek,c}function iFn(n,t){var e,i,r,c,a,o;for(a=uG(uG(Y9(n.r,t),21),87).Kc();a.Ob();)(e=(c=uG(a.Pb(),117)).c?rq(c.c):0)>0?c.a?e>(o=c.b.Mf().a)&&(r=(e-o)/2,c.d.b=r,c.d.c=r):c.d.c=n.s+e:cV(n.u)&&((i=ECn(c.b)).c<0&&(c.d.b=-i.c),i.c+i.b>c.b.Mf().a&&(c.d.c=i.c+i.b-c.b.Mf().a))}function rFn(n,t){var e,i,r,c,a;a=new Zm,e=t;do{(c=uG(cQ(n.b,e),131)).B=e.c,c.D=e.d,mv(a.c,c),e=uG(cQ(n.k,e),18)}while(e);return u3(0,a.c.length),(i=uG(a.c[0],131)).j=!0,i.A=uG(i.d.a.ec().Kc().Pb(),18).c.i,(r=uG(zq(a,a.c.length-1),131)).q=!0,r.C=uG(r.d.a.ec().Kc().Pb(),18).d.i,a}function cFn(n){var t,i;if(t=uG(n.a,17).a,i=uG(n.b,17).a,t>=0){if(t==i)return new WO(xwn(-t-1),xwn(-t-1));if(t==-i)return new WO(xwn(-t),xwn(i+1))}return e.Math.abs(t)>e.Math.abs(i)?new WO(xwn(-t),xwn(t<0?i:i+1)):new WO(xwn(t+1),xwn(i))}function aFn(n){var t,e;e=uG(oIn(n,(jYn(),gMt)),171),t=uG(oIn(n,(GYn(),Xpt)),311),e==(Gpn(),Imt)?(kfn(n,gMt,Lmt),kfn(n,Xpt,(Zen(),ppt))):e==Amt?(kfn(n,gMt,Lmt),kfn(n,Xpt,(Zen(),dpt))):t==(Zen(),ppt)?(kfn(n,gMt,Imt),kfn(n,Xpt,gpt)):t==dpt&&(kfn(n,gMt,Amt),kfn(n,Xpt,gpt))}function oFn(){oFn=E,LSt=new oa,CSt=Aq(new wJ,(uIn(),Elt),(zYn(),swt)),ASt=wz(Aq(new wJ,Elt,Twt),Plt,Mwt),NSt=Lvn(Lvn(gP(wz(Aq(new wJ,Tlt,Nwt),Plt,Lwt),Slt),Awt),$wt),ISt=wz(Aq(Aq(Aq(new wJ,jlt,lwt),Slt,wwt),Slt,dwt),Plt,bwt),OSt=wz(Aq(Aq(new wJ,Slt,dwt),Slt,Vbt),Plt,zbt)}function uFn(){uFn=E,KSt=Aq(wz(new wJ,(uIn(),Plt),(zYn(),Jbt)),Elt,swt),HSt=Lvn(Lvn(gP(wz(Aq(new wJ,Tlt,Nwt),Plt,Lwt),Slt),Awt),$wt),FSt=wz(Aq(Aq(Aq(new wJ,jlt,lwt),Slt,wwt),Slt,dwt),Plt,bwt),BSt=Aq(Aq(new wJ,Elt,Twt),Plt,Mwt),_St=wz(Aq(Aq(new wJ,Slt,dwt),Slt,Vbt),Plt,zbt)}function sFn(n,t,e,i,r){var c,a;(v9(t)||t.c.i.c!=t.d.i.c)&&uon(Gfn(Uhn(cT(PNt,1),zZn,8,0,[r.i.n,r.n,r.a])),e)||v9(t)||(t.c==r?sR(t.a,0,new eN(e)):aq(t.a,new eN(e)),i&&!cS(n.a,e)&&((a=uG(oIn(t,(jYn(),bMt)),75))||(a=new Uk,kfn(t,bMt,a)),s8(a,c=new eN(e),a.c.b,a.c),FV(n.a,c)))}function hFn(n,t){var e,i,r,c;for(e=(c=pz(Ngn(h1n,PJ(pz(Ngn(null==t?0:Hon(t),f1n)),15))))&n.b.length-1,r=null,i=n.b[e];i;r=i,i=i.a)if(i.d==c&&xQ(i.i,t))return r?r.a=i.a:n.b[e]=i.a,RM(uG(nJ(i.c),604),uG(nJ(i.f),604)),Tv(uG(nJ(i.b),227),uG(nJ(i.e),227)),--n.f,++n.e,!0;return!1}function fFn(n){var t;for(t=new Fz(ix(qgn(n).a.Kc(),new h));hDn(t);)if(uG(N9(t),18).c.i.k!=(zIn(),bbt))throw hv(new jM(y6n+ZTn(n)+"' has its layer constraint set to FIRST, but has at least one incoming edge that does not come from a FIRST_SEPARATE node. That must not happen."))}function lFn(n,t,e){var i,r,c,a,o,u;if(0==(r=Cdn(254&n.Db)))n.Eb=e;else{if(1==r)a=Inn(dat,EZn,1,2,5,1),0==jTn(n,t)?(a[0]=e,a[1]=n.Eb):(a[0]=n.Eb,a[1]=e);else for(a=Inn(dat,EZn,1,r+1,5,1),c=Kcn(n.Eb),i=2,o=0,u=0;i<=128;i<<=1)i==t?a[u++]=e:n.Db&i&&(a[u++]=c[o++]);n.Eb=a}n.Db|=t}function bFn(n,t,i){var r,c,a,o;for(this.b=new Zm,c=0,r=0,o=new Ww(n);o.a<o.c.c.length;)a=uG(N3(o),176),i&&Jqn(a),kD(this.b,a),c+=a.o,r+=a.p;this.b.c.length>0&&(c+=(a=uG(zq(this.b,0),176)).o,r+=a.p),c*=2,r*=2,t>1?c=t0(e.Math.ceil(c*t)):r=t0(e.Math.ceil(r/t)),this.a=new smn(c,r)}function wFn(n,t,i,r,c,a){var o,u,s,h,f,l,b,w,d,g;for(h=r,t.j&&t.o?(d=(b=uG(cQ(n.f,t.A),60)).d.c+b.d.b,--h):d=t.a.c+t.a.b,f=c,i.q&&i.o?(s=(b=uG(cQ(n.f,i.C),60)).d.c,++f):s=i.a.c,w=d+(u=(s-d)/e.Math.max(2,f-h)),l=h;l<f;++l)g=(o=uG(a.Xb(l),131)).a.b,o.a.c=w-g/2,w+=u}function dFn(n,t){var e,i,r,c,a,o,u,s;r=t?new bc:new wc,c=!1;do{for(c=!1,a=(t?Spn(n.b):n.b).Kc();a.Ob();)for(s=T3(uG(a.Pb(),30).a),t||Spn(s),u=new Ww(s);u.a<u.c.c.length;)o=uG(N3(u),10),r.Mb(o)&&(i=o,e=uG(oIn(o,(GYn(),Spt)),313),c=Q_n(i,t?e.b:e.k,t,!1))}while(c)}function gFn(n,t,e,i,r,c){var a,o,u,s,h,f;for(s=e.c.length,c&&(n.c=Inn(YHt,W1n,28,t.length,15,1)),a=r?0:t.length-1;r?a<t.length:a>=0;a+=r?1:-1){for(o=t[a],u=i==(KQn(),kRt)?r?Dgn(o,i):Spn(Dgn(o,i)):r?Spn(Dgn(o,i)):Dgn(o,i),c&&(n.c[o.p]=u.gc()),f=u.Kc();f.Ob();)h=uG(f.Pb(),12),n.d[h.p]=s++;Ohn(e,u)}}function pFn(n,t,e){var i,r,c,a,o,u,s,h;for(c=uM(pK(n.b.Kc().Pb())),s=uM(pK(whn(t.b))),i=vD(D$(n.a),s-e),r=vD(D$(t.a),e-c),vD(h=JF(i,r),1/(s-c)),this.a=h,this.b=new Zm,o=!0,(a=n.b.Kc()).Pb();a.Ob();)u=uM(pK(a.Pb())),o&&u-e>$9n&&(this.b.Fc(e),o=!1),this.b.Fc(u);o&&this.b.Fc(e)}function mFn(n){var t,e,i,r;if(wHn(n,n.n),n.d.c.length>0){for(AM(n.c);fDn(n,uG(N3(new Ww(n.e.a)),125))<n.e.a.c.length;){for(r=(t=kjn(n)).e.e-t.d.e-t.a,t.e.j&&(r=-r),i=new Ww(n.e.a);i.a<i.c.c.length;)(e=uG(N3(i),125)).j&&(e.e+=r);AM(n.c)}AM(n.c),oNn(n,uG(N3(new Ww(n.e.a)),125)),MVn(n)}}function vFn(n,t){var e,i;if(Whn(),e=C9(aan(),t.Pg())){if(i=e.j,F$(n,207))return I0(uG(n,27))?$x(i,(Rkn(),sNt))||$x(i,hNt):$x(i,(Rkn(),sNt));if(F$(n,326))return $x(i,(Rkn(),oNt));if(F$(n,193))return $x(i,(Rkn(),fNt));if(F$(n,366))return $x(i,(Rkn(),uNt))}return!0}function kFn(n,t,e){var i,r,c,a,o,u;if(c=(r=e).Lk(),EFn(n.e,c)){if(c.Si())for(i=uG(n.g,124),a=0;a<n.i;++a)if(udn(o=i[a],r)&&a!=t)throw hv(new vM(Xet))}else for(u=VKn(n.e.Dh(),c),i=uG(n.g,124),a=0;a<n.i;++a)if(o=i[a],u.am(o.Lk())&&a!=t)throw hv(new vM(dct));return uG(Uyn(n,t,e),76)}function yFn(n,t){if(t instanceof Object)try{if(t.__java$exception=n,-1!=navigator.userAgent.toLowerCase().indexOf("msie")&&$doc.documentMode<9)return;var e=n;Object.defineProperties(t,{cause:{get:function(){var n=e.he();return n&&n.fe()}},suppressed:{get:function(){return e.ge()}}})}catch(i){}}function MFn(n,t){var e,i,r,c,a;if(i=t>>5,t&=31,i>=n.d)return n.e<0?(cHn(),Dot):(cHn(),_ot);if(c=n.d-i,ROn(r=Inn(YHt,W1n,28,c+1,15,1),c,n.a,i,t),n.e<0){for(e=0;e<i&&0==n.a[e];e++);if(e<i||t>0&&n.a[e]<<32-t){for(e=0;e<c&&-1==r[e];e++)r[e]=0;e==c&&++c,++r[e]}}return K4(a=new VV(n.e,c,r)),a}function TFn(n){var t,e,i,r;return e=new xd(r=h0(n)),i=new Rd(r),Ohn(t=new Zm,(!n.d&&(n.d=new f_(aFt,n,8,5)),n.d)),Ohn(t,(!n.e&&(n.e=new f_(aFt,n,7,4)),n.e)),uG(l8(YJ(JJ(new fX(null,new h3(t,16)),e),i),gen(new W,new Q,new rn,new cn,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Out),Iut]))),21)}function jFn(n,t){var e;switch(e=uG(oIn(n,(jYn(),zyt)),283),t.Ug("Label side selection ("+e+")",1),e.g){case 0:mDn(n,(Ajn(),$xt));break;case 1:mDn(n,(Ajn(),Dxt));break;case 2:Eqn(n,(Ajn(),$xt));break;case 3:Eqn(n,(Ajn(),Dxt));break;case 4:YFn(n,(Ajn(),$xt));break;case 5:YFn(n,(Ajn(),Dxt))}t.Vg()}function EFn(n,t){var e,i,r;return PP(),!!t.Jk()||-2==t.Ik()&&(t==(m$n(),NBt)||t==OBt||t==ABt||t==LBt||!(emn(r=n.Dh(),t)>=0)&&(!(e=iVn((gAn(),kBt),r,t))||((i=e.Ik())>1||-1==i)&&3!=sJ(Nen(kBt,e))))}function SFn(n,t,e,i){var r,c,a,o,u;return o=lCn(uG(zrn((!t.b&&(t.b=new f_(cFt,t,4,7)),t.b),0),84)),u=lCn(uG(zrn((!t.c&&(t.c=new f_(cFt,t,5,8)),t.c),0),84)),R0(o)==R0(u)||Ern(u,o)?null:(a=s0(t))==e?i:(c=uG(cQ(n.a,a),10))&&(r=c.e)?r:null}function PFn(n,t,e){var i,r,c,a;for(e.Ug("Longest path to source layering",1),n.a=t,a=n.a.a,n.b=Inn(YHt,W1n,28,a.c.length,15,1),i=0,c=new Ww(a);c.a<c.c.c.length;)uG(N3(c),10).p=i,n.b[i]=-1,++i;for(r=new Ww(a);r.a<r.c.c.length;)Oxn(n,uG(N3(r),10));a.c.length=0,n.a=null,n.b=null,e.Vg()}function CFn(n,t,e){var i,r,c,a,o;if((c=n[LT(e,n.length)])[r=AT(e,c.length)].k==(zIn(),lbt))for(o=t.j,i=0;i<o.c.length;i++)u3(i,o.c.length),a=uG(o.c[i],12),(e?a.j==(KQn(),kRt):a.j==(KQn(),_Rt))&&oM(gK(oIn(a,(GYn(),qpt))))&&(Y8(o,i,uG(oIn(c[r],(GYn(),rmt)),12)),r+=e?1:-1)}function IFn(n,t){var e,i,r,c,a,o,u;t.Ug("Greedy Width Approximator",1),e=uM(pK(zDn(n,(S_n(),VOt)))),o=uG(zDn(n,hAt),107),r=uG(zDn(n,pAt),394),c=oM(gK(zDn(n,gAt))),a=uM(pK(zDn(n,bAt))),!n.a&&(n.a=new fV(bFt,n,10,11)),Non(u=n.a),i=lHn(new AU(e,r,c),u,a,o),Myn(n,(lBn(),POt),i.c),t.Vg()}function OFn(n){if(null==n.g)switch(n.p){case 0:n.g=L0(n)?(qx(),eot):(qx(),tot);break;case 1:n.g=Ben(k5(n));break;case 2:n.g=Hsn(A3(n));break;case 3:n.g=iJ(n);break;case 4:n.g=new Rw(eJ(n));break;case 6:n.g=Hvn(aJ(n));break;case 5:n.g=xwn(L1(n));break;case 7:n.g=Rwn(T5(n))}return n.g}function AFn(n){if(null==n.n)switch(n.p){case 0:n.n=N0(n)?(qx(),eot):(qx(),tot);break;case 1:n.n=Ben(y5(n));break;case 2:n.n=Hsn(L3(n));break;case 3:n.n=rJ(n);break;case 4:n.n=new Rw(cJ(n));break;case 6:n.n=Hvn(oJ(n));break;case 5:n.n=xwn(N1(n));break;case 7:n.n=Rwn(M5(n))}return n.n}function LFn(n,t,e,i){var r,c,a,o,u;if(PP(),o=uG(t,69).xk(),EFn(n.e,t)){if(t.Si()&&aqn(n,t,i,F$(t,102)&&!!(uG(t,19).Bb&P0n)))throw hv(new vM(Xet))}else for(u=VKn(n.e.Dh(),t),r=uG(n.g,124),a=0;a<n.i;++a)if(c=r[a],u.am(c.Lk()))throw hv(new vM(dct));$dn(n,sAn(n,t,e),o?uG(i,76):R5(t,i))}function NFn(n){var t,e,i,r,c,a;for(r=new Ww(n.a.a);r.a<r.c.c.length;)(e=uG(N3(r),316)).g=0,e.i=0,e.e.a.$b();for(i=new Ww(n.a.a);i.a<i.c.c.length;)for(t=(e=uG(N3(i),316)).a.a.ec().Kc();t.Ob();)for(a=uG(t.Pb(),60).c.Kc();a.Ob();)(c=uG(a.Pb(),60)).a!=e&&(FV(e.e,c),++c.a.g,++c.a.i)}function $Fn(n){var t,i,r,c,a;c=uG(oIn(n,(jYn(),DMt)),21),a=uG(oIn(n,KMt),21),t=new eN(i=new MO(n.f.a+n.d.b+n.d.c,n.f.b+n.d.d+n.d.a)),c.Hc((Qmn(),VRt))&&(r=uG(oIn(n,RMt),8),a.Hc((oUn(),eKt))&&(r.a<=0&&(r.a=20),r.b<=0&&(r.b=20)),t.a=e.Math.max(i.a,r.a),t.b=e.Math.max(i.b,r.b)),aXn(n,i,t)}function DFn(n,t){var e,i,r;t.a?(_V(n.b,t.b),n.a[t.b.i]=uG(jS(n.b,t.b),86),(e=uG(TS(n.b,t.b),86))&&(n.a[e.i]=t.b)):(!!(i=uG(jS(n.b,t.b),86))&&i==n.a[t.b.i]&&!!i.d&&i.d!=t.b.d&&i.f.Fc(t.b),!!(r=uG(TS(n.b,t.b),86))&&n.a[r.i]==t.b&&!!r.d&&r.d!=t.b.d&&t.b.f.Fc(r),sD(n.b,t.b))}function xFn(n,t){var i,r,c,a,o,u;return a=n.d,(u=uM(pK(oIn(n,(jYn(),tMt)))))<0&&kfn(n,tMt,u=0),t.o.b=u,o=e.Math.floor(u/2),NLn(r=new lOn,(KQn(),_Rt)),o2(r,t),r.n.b=o,NLn(c=new lOn,kRt),o2(c,t),c.n.b=o,u2(n,r),zsn(i=new UZ,n),kfn(i,bMt,null),c2(i,c),u2(i,a),CGn(t,n,i),ZAn(n,i),i}function RFn(n){var t,e;return e=uG(oIn(n,(GYn(),Hpt)),21),t=new wJ,e.Hc((r_n(),ept))&&(gsn(t,TSt),gsn(t,ESt)),(e.Hc(rpt)||oM(gK(oIn(n,(jYn(),eMt)))))&&(gsn(t,ESt),e.Hc(cpt)&&gsn(t,SSt)),e.Hc(tpt)&&gsn(t,MSt),e.Hc(opt)&&gsn(t,PSt),e.Hc(ipt)&&gsn(t,jSt),e.Hc(Ygt)&&gsn(t,kSt),e.Hc(npt)&&gsn(t,ySt),t}function KFn(n,t){var e,i,r,c,a,o,u,s,h;return c=(e=n.d)+(i=t.d),a=n.e!=t.e?-1:1,2==c?(h=pz(u=Ngn(E3(n.a[0],L0n),E3(t.a[0],L0n))),0==(s=pz(Dz(u,32)))?new Z5(a,h):new VV(a,2,Uhn(cT(YHt,1),W1n,28,15,[h,s]))):(jwn(n.a,e,t.a,i,r=Inn(YHt,W1n,28,c,15,1)),K4(o=new VV(a,c,r)),o)}function FFn(n,t,e,i){var r,c;return t?0==(r=n.a.Ne(e.d,t.d))?(i.d=wF(t,e.e),i.b=!0,t):(c=r<0?0:1,t.a[c]=FFn(n,t.a[c],e,i),NM(t.a[c])&&(NM(t.a[1-c])?(t.b=!0,t.a[0].b=!1,t.a[1].b=!1):NM(t.a[c].a[c])?t=Ton(t,1-c):NM(t.a[c].a[1-c])&&(t=P4(t,1-c))),t):e}function _Fn(n,t,i){var r,c,a,o;c=n.i,r=n.n,Q9(n,(Yrn(),jst),c.c+r.b,i),Q9(n,Sst,c.c+c.b-r.c-i[2],i),o=c.b-r.b-r.c,i[0]>0&&(i[0]+=n.d,o-=i[0]),i[2]>0&&(i[2]+=n.d,o-=i[2]),a=e.Math.max(0,o),i[1]=e.Math.max(i[1],o),Q9(n,Est,c.c+r.b+i[0]-(i[1]-o)/2,i),t==Est&&(n.c.b=a,n.c.c=c.c+r.b+(a-o)/2)}function BFn(){this.c=Inn(eUt,I0n,28,(KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length,15,1),this.b=Inn(eUt,I0n,28,Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt]).length,15,1),this.a=Inn(eUt,I0n,28,Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt]).length,15,1),KP(this.c,M0n),KP(this.b,T0n),KP(this.a,T0n)}function HFn(n,t,e){var i,r,c,a;if(t<=e?(r=t,c=e):(r=e,c=t),i=0,null==n.b)n.b=Inn(YHt,W1n,28,2,15,1),n.b[0]=r,n.b[1]=c,n.c=!0;else{if(i=n.b.length,n.b[i-1]+1==r)return void(n.b[i-1]=c);a=Inn(YHt,W1n,28,i+2,15,1),qGn(n.b,0,a,0,i),n.b=a,n.b[i-1]>=r&&(n.c=!1,n.a=!1),n.b[i++]=r,n.b[i]=c,n.c||pxn(n)}}function UFn(n,t,e){var i,r,c,a,o,u,s;for(s=t.d,n.a=new R7(s.c.length),n.c=new Ym,o=new Ww(s);o.a<o.c.c.length;)a=uG(N3(o),105),c=new nhn(null),kD(n.a,c),vJ(n.c,a,c);for(n.b=new Ym,cLn(n,t),i=0;i<s.c.length-1;i++)for(u=uG(zq(t.d,i),105),r=i+1;r<s.c.length;r++)KRn(n,u,uG(zq(t.d,r),105),e)}function GFn(n){var t,e,i,r,c;for(r=new Zm,t=new oX((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a)),i=new Fz(ix(eRn(n).a.Kc(),new h));hDn(i);)F$(zrn((!(e=uG(N9(i),74)).b&&(e.b=new f_(cFt,e,4,7)),e.b),0),193)||(c=lCn(uG(zrn((!e.c&&(e.c=new f_(cFt,e,5,8)),e.c),0),84)),t.a._b(c)||mv(r.c,c));return r}function qFn(n,t,e){var i,r,c;if(n.e=e,n.d=0,n.b=0,n.f=1,n.i=t,!(16&~n.e)&&(n.i=jHn(n.i)),n.j=n.i.length,EYn(n),c=Evn(n),n.d!=n.j)throw hv(new CM(rZn((t$(),nit))));if(n.g){for(i=0;i<n.g.a.c.length;i++)if(r=uG(DQ(n.g,i),592),n.f<=r.a)throw hv(new CM(rZn((t$(),tit))));n.g.a.c.length=0}return c}function XFn(n,t){var i,r,c,a,o,u,s;for(i=T0n,zIn(),u=dbt,c=new Ww(t.a);c.a<c.c.c.length;)(a=(r=uG(N3(c),10)).k)!=dbt&&(null==(o=pK(oIn(r,(GYn(),amt))))?(i=e.Math.max(i,0),r.n.b=i+Bx(n.a,a,u)):r.n.b=(tJ(o),o)),s=Bx(n.a,a,u),r.n.b<i+s+r.d.d&&(r.n.b=i+s+r.d.d),i=r.n.b+r.o.b+r.d.a,u=a}function zFn(n,t,e,i,r){var c,a,o;if(n.d&&n.d.Gg(r),kMn(n,e,uG(r.Xb(0),27),!1))return!0;if(kMn(n,i,uG(r.Xb(r.gc()-1),27),!0))return!0;if(kIn(n,r))return!0;for(o=r.Kc();o.Ob();)for(a=uG(o.Pb(),27),c=t.Kc();c.Ob();)if(p_n(n,a,uG(c.Pb(),27)))return!0;return!1}function VFn(n,t,e){var i,r,c,a,o,u,s,h,f;f=t.c.length;n:for(c=uG((s=n.Ih(e))>=0?n.Lh(s,!1,!0):YNn(n,e,!1),61).Kc();c.Ob();){for(r=uG(c.Pb(),58),h=0;h<f;++h)if(u3(h,t.c.length),u=(a=uG(t.c[h],76)).md(),o=a.Lk(),i=r.Nh(o,!1),null==u?null!=i:!udn(u,i))continue n;return r}return null}function WFn(n,t){var e,i,r,c,a,o,u;for(t.Ug("Comment post-processing",1),c=new Ww(n.b);c.a<c.c.c.length;){for(r=uG(N3(c),30),i=new Zm,o=new Ww(r.a);o.a<o.c.c.length;)a=uG(N3(o),10),u=uG(oIn(a,(GYn(),Pmt)),15),e=uG(oIn(a,Ept),15),(u||e)&&(dQn(a,u,e),u&&Ohn(i,u),e&&Ohn(i,e));Ohn(r.a,i)}t.Vg()}function QFn(n,t,e,i){var r,c,a,o;for(r=uG(yOn(t,(KQn(),_Rt)).Kc().Pb(),12),c=uG(yOn(t,kRt).Kc().Pb(),12),o=new Ww(n.j);o.a<o.c.c.length;){for(a=uG(N3(o),12);0!=a.e.c.length;)u2(uG(zq(a.e,0),18),r);for(;0!=a.g.c.length;)c2(uG(zq(a.g,0),18),c)}e||kfn(t,(GYn(),Zpt),null),i||kfn(t,(GYn(),nmt),null)}function JFn(n,t,e){var i,r;if(0==(!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i)return Qhn(n);if(i=uG(zrn((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a),0),166),t&&(Czn((!i.a&&(i.a=new MD(eFt,i,5)),i.a)),Tcn(i,0),Ecn(i,0),mcn(i,0),jcn(i,0)),e)for(!n.a&&(n.a=new fV(oFt,n,6,6)),r=n.a;r.i>1;)e_n(r,r.i-1);return i}function YFn(n,t){var e,i,r,c,a,o;for(e=new ND,r=new Ww(n.b);r.a<r.c.c.length;){for(o=!0,i=0,a=new Ww(uG(N3(r),30).a);a.a<a.c.c.length;)switch((c=uG(N3(a),10)).k.g){case 4:++i;case 1:O6(e,c);break;case 0:YAn(c,t);default:e.b==e.c||jUn(e,i,o,!1,t),o=!1,i=0}e.b==e.c||jUn(e,i,o,!0,t)}}function ZFn(n,t){var e,i,r,c,a,o;for(e=0,o=new Ww(t);o.a<o.c.c.length;){for(a=uG(N3(o),12),fbn(n.b,n.d[a.p]),r=new w7(a.b);l$(r.a)||l$(r.b);)(c=Yj(n,a==(i=uG(l$(r.a)?N3(r.a):N3(r.b),18)).c?i.d:i.c))>n.d[a.p]&&(e+=J8(n.b,c),A6(n.a,xwn(c)));for(;!LM(n.a);)lin(n.b,uG(xV(n.a),17).a)}return e}function n_n(n){var t,e,i,r,c,a,o;for(n.a=new xF,o=0,r=0,i=new Ww(n.i.b);i.a<i.c.c.length;){for((t=uG(N3(i),30)).p=r,a=new Ww(t.a);a.a<a.c.c.length;)uG(N3(a),10).p=o,++o;++r}for(c=n.r==(THn(),Pjt)?Jwt:Qwt,e=new Ww(n.i.b);e.a<e.c.c.length;)f$((t=uG(N3(e),30)).a,c),Zin(n.a,xwn(t.p),t.a)}function t_n(n,t,e){var i,r,c,a;for(c=(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a).i,r=new DD((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a));r.e!=r.i.gc();)0==(!(i=uG(Zkn(r),27)).a&&(i.a=new fV(bFt,i,10,11)),i.a).i||(c+=t_n(n,i,!1));if(e)for(a=R0(t);a;)c+=(!a.a&&(a.a=new fV(bFt,a,10,11)),a.a).i,a=R0(a);return c}function e_n(n,t){var e,i,r,c;return n.Pj()?(i=null,r=n.Qj(),n.Tj()&&(i=n.Vj(n.$i(t),null)),e=n.Ij(4,c=gjn(n,t),null,t,r),n.Mj()&&null!=c?(i=n.Oj(c,i))?(i.nj(e),i.oj()):n.Jj(e):i?(i.nj(e),i.oj()):n.Jj(e),c):(c=gjn(n,t),n.Mj()&&null!=c&&(i=n.Oj(c,null))&&i.oj(),c)}function i_n(n){var t,i,r,c,a,o,u,s,h,f;for(h=n.a,t=new ek,s=0,r=new Ww(n.d);r.a<r.c.c.length;){for(f=0,Lon((i=uG(N3(r),226)).b,new Nn),o=Fkn(i.b,0);o.b!=o.d.c;)a=uG(I6(o),226),t.a._b(a)&&(c=i.c,f<(u=a.c).d+u.a+h&&f+c.a+h>u.d&&(f=u.d+u.a+h));i.c.d=f,t.a.zc(i,t),s=e.Math.max(s,i.c.d+i.c.a)}return s}function r_n(){r_n=E,Zgt=new aI("COMMENTS",0),tpt=new aI("EXTERNAL_PORTS",1),ept=new aI("HYPEREDGES",2),ipt=new aI("HYPERNODES",3),rpt=new aI("NON_FREE_PORTS",4),cpt=new aI("NORTH_SOUTH_PORTS",5),opt=new aI(F6n,6),Ygt=new aI("CENTER_LABELS",7),npt=new aI("END_LABELS",8),apt=new aI("PARTITIONS",9)}function c_n(n,t,e,i,r){return i<0?((i=XOn(n,r,Uhn(cT($ot,1),zZn,2,6,[x1n,R1n,K1n,F1n,_1n,B1n,H1n,U1n,G1n,q1n,X1n,z1n]),t))<0&&(i=XOn(n,r,Uhn(cT($ot,1),zZn,2,6,["Jan","Feb","Mar","Apr",_1n,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),t)),!(i<0||(e.k=i,0))):i>0&&(e.k=i-1,!0)}function a_n(n,t,e,i,r){return i<0?((i=XOn(n,r,Uhn(cT($ot,1),zZn,2,6,[x1n,R1n,K1n,F1n,_1n,B1n,H1n,U1n,G1n,q1n,X1n,z1n]),t))<0&&(i=XOn(n,r,Uhn(cT($ot,1),zZn,2,6,["Jan","Feb","Mar","Apr",_1n,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),t)),!(i<0||(e.k=i,0))):i>0&&(e.k=i-1,!0)}function o_n(n,t,e,i,r,c){var a,o,u;if(o=32,i<0){if(t[0]>=n.length)return!1;if(43!=(o=VJ(n,t[0]))&&45!=o)return!1;if(++t[0],(i=RNn(n,t))<0)return!1;45==o&&(i=-i)}return 32==o&&t[0]-e==2&&2==r.b&&(a=(u=(new QE).q.getFullYear()-V1n+V1n-80)%100,c.a=i==a,i+=100*(u/100|0)+(i<a?100:0)),c.p=i,!0}function u_n(n,t){var i,r,c;R0(n)&&(c=uG(oIn(t,(jYn(),DMt)),181),xA(zDn(n,JMt))===xA(($Pn(),sRt))&&Myn(n,JMt,uRt),vP(),r=uQn(new Vy(R0(n)),new Wx(R0(n)?new Vy(R0(n)):null,n),!1,!0),Mon(c,(Qmn(),VRt)),(i=uG(oIn(t,RMt),8)).a=e.Math.max(r.a,i.a),i.b=e.Math.max(r.b,i.b))}function s_n(n,t,e){var i,r,c,a,o,u;for(a=uG(oIn(n,(GYn(),Upt)),15).Kc();a.Ob();){switch(c=uG(a.Pb(),10),uG(oIn(c,(jYn(),gMt)),171).g){case 2:a2(c,t);break;case 4:a2(c,e)}for(r=new Fz(ix(Ggn(c).a.Kc(),new h));hDn(r);)(i=uG(N9(r),18)).c&&i.d||(o=!i.d,u=uG(oIn(i,umt),12),o?u2(i,u):c2(i,u))}}function h_n(){h_n=E,Odt=new yY(o3n,0,(KQn(),yRt),yRt),Ndt=new yY(s3n,1,KRt,KRt),Idt=new yY(u3n,2,kRt,kRt),xdt=new yY(h3n,3,_Rt,_Rt),Ldt=new yY("NORTH_WEST_CORNER",4,_Rt,yRt),Adt=new yY("NORTH_EAST_CORNER",5,yRt,kRt),Ddt=new yY("SOUTH_WEST_CORNER",6,KRt,_Rt),$dt=new yY("SOUTH_EAST_CORNER",7,kRt,KRt)}function f_n(n){var t,e,i,r,c;for(r=new ek,t=new oX((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a)),i=new Fz(ix(eRn(n).a.Kc(),new h));hDn(i);)F$(zrn((!(e=uG(N9(i),74)).b&&(e.b=new f_(cFt,e,4,7)),e.b),0),193)||(c=lCn(uG(zrn((!e.c&&(e.c=new f_(cFt,e,5,8)),e.c),0),84)),t.a._b(c)||r.a.zc(c,r));return r}function l_n(){l_n=E,ENt=Uhn(cT(nUt,1),E0n,28,14,[1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368e3,{l:3506176,m:794077,h:1},{l:884736,m:916411,h:20},{l:3342336,m:3912489,h:363},{l:589824,m:3034138,h:6914},{l:3407872,m:1962506,h:138294}]),e.Math.pow(2,-65)}function b_n(){var n,t;for(b_n=E,Got=Inn(Xot,zZn,92,32,0,1),qot=Inn(Xot,zZn,92,32,0,1),n=1,t=0;t<=18;t++)Got[t]=(cHn(),dwn(n,0)>=0?Rmn(n):hW(Rmn(Men(n)))),qot[t]=BA(Nz(n,t),0)?Rmn(Nz(n,t)):hW(Rmn(Men(Nz(n,t)))),n=Ngn(n,5);for(;t<qot.length;t++)Got[t]=j5(Got[t-1],Got[1]),qot[t]=j5(qot[t-1],(cHn(),Kot))}function w_n(n,t){var e,i,r,c,a;if(0==n.c.length)return new WO(xwn(0),xwn(0));for(e=(u3(0,n.c.length),uG(n.c[0],12)).j,a=0,c=t.g,i=t.g+1;a<n.c.length-1&&e.g<c;)e=(u3(++a,n.c.length),uG(n.c[a],12)).j;for(r=a;r<n.c.length-1&&e.g<i;)++r,e=(u3(a,n.c.length),uG(n.c[a],12)).j;return new WO(xwn(a),xwn(r))}function d_n(n,t,e,i){var r,c,a,o,u;o=Dgn(t,e),(e==(KQn(),KRt)||e==_Rt)&&(o=Spn(o)),a=!1;do{for(r=!1,c=0;c<o.gc()-1;c++)SIn(n,uG(o.Xb(c),12),uG(o.Xb(c+1),12),i)&&(a=!0,Z3(n.a,uG(o.Xb(c),12),uG(o.Xb(c+1),12)),u=uG(o.Xb(c+1),12),o.hd(c+1,uG(o.Xb(c),12)),o.hd(c,u),r=!0)}while(r);return a}function g_n(n,t,e){var i,r,c;for(e.Ug(X9n,1),o$n(n,uG(l8(JJ(new fX(null,new h3(t.b,16)),new qa),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),0),c=Fkn(t.b,0);c.b!=c.d.c;)r=uG(I6(c),40),i=null!=cQ(n.a,xwn(r.g))?uG(cQ(n.a,xwn(r.g)),17).a:0,kfn(r,(QGn(),ACt),xwn(i));e.Vg()}function p_n(n,t,e){var i,r,c,a,o,u,s,h;return o=t.i-n.g/2,u=e.i-n.g/2,s=t.j-n.g/2,h=e.j-n.g/2,c=t.g+n.g,a=e.g+n.g,i=t.f+n.g,r=e.f+n.g,o<u+a&&u<o&&s<h+r&&h<s||u<o+c&&o<u&&h<s+i&&s<h||o<u+a&&u<o&&s<h&&h<s+i||u<o+c&&o<u&&s<h+r&&h<s}function m_n(n,t,i){var r,c,a,o,u,s,h,f,l,b;for(a=t.c.length,u3(i,t.c.length),u=(o=uG(t.c[i],293)).a.o.a,l=o.c,b=0,h=o.c;h<=o.f;h++){if(u<=n.a[h])return h;for(f=n.a[h],s=null,c=i+1;c<a;c++)u3(c,t.c.length),(r=uG(t.c[c],293)).c<=h&&r.f>=h&&(s=r);s&&(f=e.Math.max(f,s.a.o.a)),f>b&&(l=h,b=f)}return l}function v_n(n){var t,e,i,r,c,a,o;for(c=new Hj(uG(WW(new Dn),50)),o=T0n,e=new Ww(n.d);e.a<e.c.c.length;){for(o=(t=uG(N3(e),226)).c.c;0!=c.a.gc()&&(a=uG(c.a.Tc(),226)).c.c+a.c.b<o;)c.a.Bc(a);for(r=c.a.ec().Kc();r.Ob();)aq((i=uG(r.Pb(),226)).b,t),aq(t.b,i);c.a.zc(t,(qx(),tot))}}function k_n(n,t,e){var i,r,c,a,o;if(!P6(t)){for((o=e.eh((F$(t,16)?uG(t,16).gc():x5(t.Kc()))/n.a|0)).Ug(V9n,1),a=new za,c=null,r=t.Kc();r.Ob();)i=uG(r.Pb(),40),a=zcn(Uhn(cT(vat,1),EZn,20,0,[a,new Mp(i)])),c&&(kfn(c,(OQn(),BPt),i),kfn(i,APt,c),M7(i)==M7(c)&&(kfn(c,HPt,i),kfn(i,LPt,c))),c=i;o.Vg(),k_n(n,a,e)}}function y_n(n,t){var e,i,r;if(null==t){for(!n.a&&(n.a=new fV(d_t,n,9,5)),i=new DD(n.a);i.e!=i.i.gc();)if(null==(null==(r=(e=uG(Zkn(i),694)).c)?e.zb:r))return e}else for(!n.a&&(n.a=new fV(d_t,n,9,5)),i=new DD(n.a);i.e!=i.i.gc();)if(m_(t,null==(r=(e=uG(Zkn(i),694)).c)?e.zb:r))return e;return null}function M_n(n,t){var e;switch(e=null,t.g){case 1:n.e.pf((XYn(),rDt))&&(e=uG(n.e.of(rDt),256));break;case 3:n.e.pf((XYn(),cDt))&&(e=uG(n.e.of(cDt),256));break;case 2:n.e.pf((XYn(),iDt))&&(e=uG(n.e.of(iDt),256));break;case 4:n.e.pf((XYn(),aDt))&&(e=uG(n.e.of(aDt),256))}return!e&&(e=uG(n.e.of((XYn(),tDt)),256)),e}function T_n(n,t,i){var r,c,a,o,u,s;for(c=i,a=0,u=new Ww(t);u.a<u.c.c.length;)Myn(o=uG(N3(u),27),(jOn(),FIt),xwn(c++)),s=GFn(o),r=e.Math.atan2(o.j+o.f/2,o.i+o.g/2),(r+=r<0?f7n:0)<.7853981633974483||r>F7n?f$(s,n.b):r<=F7n&&r>_7n?f$(s,n.d):r<=_7n&&r>B7n?f$(s,n.c):r<=B7n&&f$(s,n.a),a=T_n(n,s,a);return c}function j_n(n,t,e,i){var r,c,a,o,u;for(r=(i.c+i.a)/2,BY(t.j),aq(t.j,r),BY(e.e),aq(e.e,r),u=new hj,a=new Ww(n.f);a.a<a.c.c.length;)kSn(u,t,o=uG(N3(a),132).a),kSn(u,e,o);for(c=new Ww(n.k);c.a<c.c.c.length;)kSn(u,t,o=uG(N3(c),132).b),kSn(u,e,o);return u.b+=2,u.a+=tZ(t,n.q),u.a+=tZ(n.q,e),u}function E_n(n,t,e){var i;e.Ug("Processor arrange node",1),oM(gK(oIn(t,(QGn(),rCt)))),i=uG(yx(lln(JJ(new fX(null,new h3(t.b,16)),new bo))),40),n.a=uG(oIn(t,LCt),353),n.a==(mbn(),DCt)||n.a==$Ct?fQn(n,new IM(Uhn(cT(lPt,1),z9n,40,0,[i])),e.eh(1)):n.a==NCt&&mYn(n,new IM(Uhn(cT(lPt,1),z9n,40,0,[i])),e.eh(1)),e.Vg()}function S_n(){S_n=E,VOt=new _N((XYn(),c$t),1.3),iAt=new _N(H$t,(qx(),!1)),fAt=new CN(15),hAt=new _N(W$t,fAt),bAt=new _N(DDt,15),WOt=l$t,eAt=_$t,rAt=U$t,cAt=q$t,tAt=K$t,aAt=V$t,lAt=bDt,IHn(),pAt=UOt,gAt=HOt,vAt=zOt,mAt=qOt,sAt=KOt,uAt=ROt,oAt=xOt,dAt=BOt,YOt=O$t,ZOt=A$t,JOt=$Ot,QOt=NOt,nAt=DOt,wAt=_Ot}function P_n(n){var t,e,i,r,c,a,o;for(e=n.i,t=n.n,o=e.d,n.f==(Yen(),Kst)?o+=(e.a-n.e.b)/2:n.f==Rst&&(o+=e.a-n.e.b),r=new Ww(n.d);r.a<r.c.c.length;){switch(a=(i=uG(N3(r),187)).Mf(),(c=new sj).b=o,o+=a.b+n.a,n.b.g){case 0:c.a=e.c+t.b;break;case 1:c.a=e.c+t.b+(e.b-a.a)/2;break;case 2:c.a=e.c+e.b-t.c-a.a}i.Of(c)}}function C_n(n){var t,e,i,r,c,a,o;for(e=n.i,t=n.n,o=e.c,n.b==(Ktn(),Ost)?o+=(e.b-n.e.a)/2:n.b==Lst&&(o+=e.b-n.e.a),r=new Ww(n.d);r.a<r.c.c.length;){switch(a=(i=uG(N3(r),187)).Mf(),(c=new sj).a=o,o+=a.a+n.a,n.f.g){case 0:c.b=e.d+t.d;break;case 1:c.b=e.d+t.d+(e.a-a.b)/2;break;case 2:c.b=e.d+e.a-t.a-a.b}i.Of(c)}}function I_n(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;s=e.a.c,a=e.a.c+e.a.b,l=(c=uG(cQ(e.c,t),468)).f,b=c.a,o=new MO(s,l),h=new MO(a,b),r=s,e.p||(r+=n.c),u=new MO(r+=e.F+e.v*n.b,l),f=new MO(r,b),dan(t.a,Uhn(cT(PNt,1),zZn,8,0,[o,u])),e.d.a.gc()>1&&(i=new MO(r,e.b),aq(t.a,i)),dan(t.a,Uhn(cT(PNt,1),zZn,8,0,[f,h]))}function O_n(n,t,e){var i,r;for(t<n.d.b.c.length?(n.b=uG(zq(n.d.b,t),30),n.a=uG(zq(n.d.b,t-1),30),n.c=t):(n.a=new bQ(n.d),n.a.p=t-1,kD(n.d.b,n.a),n.b=new bQ(n.d),n.b.p=t,kD(n.d.b,n.b),n.c=t),a2(e,n.b),r=new Fz(ix(qgn(e).a.Kc(),new h));hDn(r);)!(i=uG(N9(r),18)).c.i.c&&i.c.i.k==(zIn(),bbt)&&a2(i.c.i,n.a)}function A_n(n){hP(n,new hCn(FT(DT(KT(RT(new bu,jtt),"ELK Randomizer"),'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'),new Fu))),U4(n,jtt,K3n,qRt),U4(n,jtt,o4n,15),U4(n,jtt,s4n,xwn(0)),U4(n,jtt,R3n,r4n)}function L_n(){var n,t,e,i,r,c;for(L_n=E,pHt=Inn(tUt,ret,28,255,15,1),mHt=Inn(JHt,N1n,28,16,15,1),t=0;t<255;t++)pHt[t]=-1;for(e=57;e>=48;e--)pHt[e]=e-48<<24>>24;for(i=70;i>=65;i--)pHt[i]=i-65+10<<24>>24;for(r=102;r>=97;r--)pHt[r]=r-97+10<<24>>24;for(c=0;c<10;c++)mHt[c]=48+c&D1n;for(n=10;n<=15;n++)mHt[n]=65+n-10&D1n}function N_n(n,t){t.Ug("Process graph bounds",1),kfn(n,(OQn(),PPt),$I(Tun(ZJ(new fX(null,new h3(n.b,16)),new Ka)))),kfn(n,IPt,$I(Tun(ZJ(new fX(null,new h3(n.b,16)),new Fa)))),kfn(n,SPt,$I(Mun(ZJ(new fX(null,new h3(n.b,16)),new _a)))),kfn(n,CPt,$I(Mun(ZJ(new fX(null,new h3(n.b,16)),new Ba)))),t.Vg()}function $_n(n){var t,i,r,c,a;c=uG(oIn(n,(jYn(),DMt)),21),a=uG(oIn(n,KMt),21),t=new eN(i=new MO(n.f.a+n.d.b+n.d.c,n.f.b+n.d.d+n.d.a)),c.Hc((Qmn(),VRt))&&(r=uG(oIn(n,RMt),8),a.Hc((oUn(),eKt))&&(r.a<=0&&(r.a=20),r.b<=0&&(r.b=20)),t.a=e.Math.max(i.a,r.a),t.b=e.Math.max(i.b,r.b)),oM(gK(oIn(n,xMt)))||cXn(n,i,t)}function D_n(n,t){var e,i,r,c;for(c=Dgn(t,(KQn(),KRt)).Kc();c.Ob();)i=uG(c.Pb(),12),(e=uG(oIn(i,(GYn(),lmt)),10))&&RKn(xS(DS(RS($S(new uk,0),.1),n.i[t.p].d),n.i[e.p].a));for(r=Dgn(t,yRt).Kc();r.Ob();)i=uG(r.Pb(),12),(e=uG(oIn(i,(GYn(),lmt)),10))&&RKn(xS(DS(RS($S(new uk,0),.1),n.i[e.p].d),n.i[t.p].a))}function x_n(n){var t,e,i,r,c;if(!n.c){if(c=new ks,null==(t=V_t).a.zc(n,t)){for(i=new DD(z5(n));i.e!=i.i.gc();)F$(r=MGn(e=uG(Zkn(i),89)),90)&&CW(c,x_n(uG(r,29))),ttn(c,e);t.a.Bc(n),t.a.gc()}imn(c),lbn(c),n.c=new vL((uG(zrn(gZ((tQ(),M_t).o),15),19),c.i),c.g),y9(n).b&=-33}return n.c}function R_n(n){var t;if(10!=n.c)throw hv(new CM(rZn((t$(),eit))));switch(t=n.a){case 110:t=10;break;case 114:t=13;break;case 116:t=9;break;case 92:case 124:case 46:case 94:case 45:case 63:case 42:case 43:case 123:case 125:case 40:case 41:case 91:case 93:break;default:throw hv(new CM(rZn((t$(),Lit))))}return t}function K_n(n){var t,e,i,r;if(0==n.l&&0==n.m&&0==n.h)return"0";if(n.h==b0n&&0==n.m&&0==n.l)return"-9223372036854775808";if(n.h>>19)return"-"+K_n(gfn(n));for(e=n,i="";0!=e.l||0!=e.m||0!=e.h;){if(e=Yzn(e,_9(g0n),!0),t=""+Tj(Qat),0!=e.l||0!=e.m||0!=e.h)for(r=9-t.length;r>0;r--)t="0"+t;i=t+i}return i}function F_n(n){var t,e,i,r,c,a,o;for(t=!1,e=0,r=new Ww(n.d.b);r.a<r.c.c.length;)for((i=uG(N3(r),30)).p=e++,a=new Ww(i.a);a.a<a.c.c.length;)c=uG(N3(a),10),!t&&!P6(Ggn(c))&&(t=!0);o=WX((xdn(),ZDt),Uhn(cT(axt,1),p1n,88,0,[JDt,YDt])),t||(Mon(o,nxt),Mon(o,QDt)),n.a=new Qin(o),$V(n.f),$V(n.b),$V(n.e),$V(n.g)}function __n(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var n="__proto__",t=Object.create(null);return void 0===t[n]&&0==Object.getOwnPropertyNames(t).length&&(t[n]=42,42===t[n]&&0!=Object.getOwnPropertyNames(t).length)}function B_n(n,t,e){var i,r,c,a,o,u,s,h,f;for(i=e.c,r=e.d,o=n3(t.c),u=n3(t.d),i==t.c?(o=nRn(n,o,r),u=VCn(t.d)):(o=VCn(t.c),u=nRn(n,u,r)),s8(s=new tj(t.a),o,s.a,s.a.a),s8(s,u,s.c.b,s.c),a=t.c==i,f=new wk,c=0;c<s.b-1;++c)h=new WO(uG(hyn(s,c),8),uG(hyn(s,c+1),8)),a&&0==c||!a&&c==s.b-2?f.b=h:kD(f.a,h);return f}function H_n(n,t){var e,i,r,c;if(0!=(c=n.j.g-t.j.g))return c;if(e=uG(oIn(n,(jYn(),YMt)),17),i=uG(oIn(t,YMt),17),e&&i&&0!=(r=e.a-i.a))return r;switch(n.j.g){case 1:return ugn(n.n.a,t.n.a);case 2:return ugn(n.n.b,t.n.b);case 3:return ugn(t.n.a,n.n.a);case 4:return ugn(t.n.b,n.n.b);default:throw hv(new kM(n6n))}}function U_n(n,t,i,r){var c,a,o,u;if(x5((HB(),new Fz(ix(Ggn(t).a.Kc(),new h))))>=n.a)return-1;if(!_Pn(t,i))return-1;if(P6(uG(r.Kb(t),20)))return 1;for(c=0,o=uG(r.Kb(t),20).Kc();o.Ob();){if(-1==(u=U_n(n,(a=uG(o.Pb(),18)).c.i==t?a.d.i:a.c.i,i,r)))return-1;if((c=e.Math.max(c,u))>n.c-1)return-1}return c+1}function G_n(n,t){var e,i,r,c,a,o;if(xA(t)===xA(n))return!0;if(!F$(t,15))return!1;if(i=uG(t,15),o=n.gc(),i.gc()!=o)return!1;if(a=i.Kc(),n.Yi()){for(e=0;e<o;++e)if(r=n.Vi(e),c=a.Pb(),null==r?null!=c:!udn(r,c))return!1}else for(e=0;e<o;++e)if(r=n.Vi(e),c=a.Pb(),xA(r)!==xA(c))return!1;return!0}function q_n(n,t){var e,i,r,c,a,o;if(n.f>0)if(n._j(),null!=t){for(c=0;c<n.d.length;++c)if(e=n.d[c])for(i=uG(e.g,379),o=e.i,a=0;a<o;++a)if(udn(t,(r=i[a]).md()))return!0}else for(c=0;c<n.d.length;++c)if(e=n.d[c])for(i=uG(e.g,379),o=e.i,a=0;a<o;++a)if(r=i[a],xA(t)===xA(r.md()))return!0;return!1}function X_n(n,t){var e,i,r;return(e=t.qi(n.a))&&null!=(r=mK(Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),"affiliation")))?-1==(i=ax(r,$Cn(35)))?Adn(n,jz(n,Hrn(t.qk())),r):0==i?Adn(n,null,(s3(1,r.length+1),r.substr(1))):Adn(n,(Knn(0,i,r.length),r.substr(0,i)),(s3(i+1,r.length+1),r.substr(i+1))):null}function z_n(n,t,e){var i,r,c,a;e.Ug("Orthogonally routing hierarchical port edges",1),n.a=0,XVn(t,i=ozn(t)),dVn(n,t,i),EQn(t),r=uG(oIn(t,(jYn(),JMt)),101),JWn((u3(0,(c=t.b).c.length),uG(c.c[0],30)),r,t),JWn(uG(zq(c,c.c.length-1),30),r,t),Bqn((u3(0,(a=t.b).c.length),uG(a.c[0],30))),Bqn(uG(zq(a,a.c.length-1),30)),e.Vg()}function V_n(n){switch(n){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n-48<<24>>24;case 97:case 98:case 99:case 100:case 101:case 102:return n-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return n-65+10<<24>>24;default:throw hv(new ZM("Invalid hexadecimal"))}}function W_n(){W_n=E,pst=new rC("SPIRAL",0),lst=new rC("LINE_BY_LINE",1),bst=new rC("MANHATTAN",2),fst=new rC("JITTER",3),dst=new rC("QUADRANTS_LINE_BY_LINE",4),gst=new rC("QUADRANTS_MANHATTAN",5),wst=new rC("QUADRANTS_JITTER",6),hst=new rC("COMBINE_LINE_BY_LINE_MANHATTAN",7),sst=new rC("COMBINE_JITTER_MANHATTAN",8)}function Q_n(n,t,e,i){var r,c,a,o,u,s;for(u=pSn(n,e),s=pSn(t,e),r=!1;u&&s&&(i||ejn(u,s,e));)a=pSn(u,e),o=pSn(s,e),Ien(t),Ien(n),c=u.c,pVn(u,!1),pVn(s,!1),e?($jn(t,s.p,c),t.p=s.p,$jn(n,u.p+1,c),n.p=u.p):($jn(n,u.p,c),n.p=u.p,$jn(t,s.p+1,c),t.p=s.p),a2(u,null),a2(s,null),u=a,s=o,r=!0;return r}function J_n(n){switch(n.g){case 0:return new ul;case 1:return new al;case 3:return new iP;case 4:return new Sc;case 5:return new RF;case 6:return new ol;case 2:return new cl;case 7:return new Zf;case 8:return new tl;default:throw hv(new vM("No implementation is available for the layerer "+(null!=n.f?n.f:""+n.g)))}}function Y_n(n,t,e,i){var r,c,a,o,u;for(r=!1,c=!1,o=new Ww(i.j);o.a<o.c.c.length;)xA(oIn(a=uG(N3(o),12),(GYn(),rmt)))===xA(e)&&(0==a.g.c.length?0==a.e.c.length||(r=!0):c=!0);return u=0,r&&r^c?u=e.j==(KQn(),yRt)?-n.e[i.c.p][i.p]:t-n.e[i.c.p][i.p]:c&&r^c?u=n.e[i.c.p][i.p]+1:r&&c&&(u=e.j==(KQn(),yRt)?0:t/2),u}function Z_n(n,t,e,i,r,c,a,o){var u,s,h;for(u=0,null!=t&&(u^=pln(t.toLowerCase())),null!=e&&(u^=pln(e)),null!=i&&(u^=pln(i)),null!=a&&(u^=pln(a)),null!=o&&(u^=pln(o)),s=0,h=c.length;s<h;s++)u^=pln(c[s]);n?u|=256:u&=-257,r?u|=16:u&=-17,this.f=u,this.i=null==t?null:(tJ(t),t),this.a=e,this.d=i,this.j=c,this.g=a,this.e=o}function nBn(n,t,e){var i,r;switch(r=null,t.g){case 1:Lun(),r=ybt;break;case 2:Lun(),r=Tbt}switch(i=null,e.g){case 1:Lun(),i=Mbt;break;case 2:Lun(),i=kbt;break;case 3:Lun(),i=jbt;break;case 4:Lun(),i=Ebt}return r&&i?YU(n.j,new Hl(new IM(Uhn(cT(pat,1),EZn,178,0,[uG(WW(r),178),uG(WW(i),178)])))):(hZ(),hZ(),zot)}function tBn(n){var t,e,i;switch(t=uG(oIn(n,(jYn(),RMt)),8),kfn(n,RMt,new MO(t.b,t.a)),uG(oIn(n,byt),255).g){case 1:kfn(n,byt,(nMn(),NNt));break;case 2:kfn(n,byt,(nMn(),INt));break;case 3:kfn(n,byt,(nMn(),ANt));break;case 4:kfn(n,byt,(nMn(),LNt))}(n.q?n.q:(hZ(),hZ(),Vot))._b(rTt)&&(i=(e=uG(oIn(n,rTt),8)).a,e.a=e.b,e.b=i)}function eBn(n,t,e,i,r,c){if(this.b=e,this.d=r,n>=t.length)throw hv(new dM("Greedy SwitchDecider: Free layer not in graph."));this.c=t[n],this.e=new R_(i),Aon(this.e,this.c,(KQn(),_Rt)),this.i=new R_(i),Aon(this.i,this.c,kRt),this.f=new sX(this.c),this.a=!c&&r.i&&!r.s&&this.c[0].k==(zIn(),lbt),this.a&&rAn(this,n,t.length)}function iBn(n,t){var e,i,r,c,a,o;c=!n.B.Hc((oUn(),nKt)),a=n.B.Hc(iKt),n.a=new umn(a,c,n.c),n.n&&WY(n.a.n,n.n),nM(n.g,(Yrn(),Est),n.a),t||((i=new tkn(1,c,n.c)).n.a=n.k,UV(n.p,(KQn(),yRt),i),(r=new tkn(1,c,n.c)).n.d=n.k,UV(n.p,KRt,r),(o=new tkn(0,c,n.c)).n.c=n.k,UV(n.p,_Rt,o),(e=new tkn(0,c,n.c)).n.b=n.k,UV(n.p,kRt,e))}function rBn(n){var t,e,i;switch((t=uG(oIn(n.d,(jYn(),Vyt)),223)).g){case 2:e=UJn(n);break;case 3:i=new Zm,kS(JJ(YJ(sin(sin(new fX(null,new h3(n.d.b,16)),new Or),new Ar),new Lr),new pr),new Ng(i)),e=i;break;default:throw hv(new kM("Compaction not supported for "+t+" edges."))}xzn(n,e),z8(new Lw(n.g),new Ag(n))}function cBn(n,t){var e,i,r,c,a,o,u;if(t.Ug("Process directions",1),(e=uG(oIn(n,(QGn(),cCt)),88))!=(xdn(),QDt))for(r=Fkn(n.b,0);r.b!=r.d.c;){switch(i=uG(I6(r),40),o=uG(oIn(i,(OQn(),GPt)),17).a,u=uG(oIn(i,qPt),17).a,e.g){case 4:u*=-1;break;case 1:c=o,o=u,u=c;break;case 2:a=o,o=-u,u=a}kfn(i,GPt,xwn(o)),kfn(i,qPt,xwn(u))}t.Vg()}function aBn(n,t){var e;return e=new Yn,t&&zsn(e,uG(cQ(n.a,iFt),96)),F$(t,422)&&zsn(e,uG(cQ(n.a,rFt),96)),F$(t,366)?(zsn(e,uG(cQ(n.a,lFt),96)),e):(F$(t,84)&&zsn(e,uG(cQ(n.a,cFt),96)),F$(t,207)?(zsn(e,uG(cQ(n.a,bFt),96)),e):F$(t,193)?(zsn(e,uG(cQ(n.a,wFt),96)),e):(F$(t,326)&&zsn(e,uG(cQ(n.a,aFt),96)),e))}function oBn(n){var t,e,i,r,c,a,o;for(o=new c9,a=new Ww(n.a);a.a<a.c.c.length;)if((c=uG(N3(a),10)).k!=(zIn(),lbt))for(LDn(o,c,new sj),r=new Fz(ix(Xgn(c).a.Kc(),new h));hDn(r);)if((i=uG(N9(r),18)).c.i.k!=lbt&&i.d.i.k!=lbt)for(e=Fkn(i.a,0);e.b!=e.d.c;)CEn(o,new FC((t=uG(I6(e),8)).a,t.b));return o}function uBn(){uBn=E,RLt=new Cm(gnt),eP(),DLt=new mL(ynt,xLt=GLt),Vhn(),NLt=new mL(pnt,$Lt=VLt),pOn(),ALt=new mL(mnt,LLt=rLt),PLt=new mL(vnt,null),B7(),ILt=new mL(knt,OLt=ZAt),nP(),MLt=new mL(Mnt,TLt=zAt),jLt=new mL(Tnt,(qx(),!1)),ELt=new mL(jnt,xwn(64)),SLt=new mL(Ent,!0),CLt=nLt}function sBn(n,t){var e,i,r,c,a,o,u;for(n.p=1,i=n.c,u=new XL,o=jmn(n,(can(),Wjt)).Kc();o.Ob();)for(e=new Ww(uG(o.Pb(),12).g);e.a<e.c.c.length;)n!=(a=uG(N3(e),18).d.i)&&a.c.p<=i.p&&((r=i.p+1)==t.b.c.length?((c=new bQ(t)).p=r,kD(t.b,c),a2(a,c)):a2(a,c=uG(zq(t.b,r),30)),u.a.zc(a,u));return u}function hBn(n,t){var e,i;if(!(e=uG(oIn(n,(OQn(),yPt)),15))||e.gc()<1)return null;if(1==e.gc())return uG(e.Xb(0),40);switch(i=null,t.g){case 2:i=uG(yx(Qz(e.Oc(),new Da)),40);break;case 1:i=uG(yx(Wz(e.Oc(),new Aa)),40);break;case 4:i=uG(yx(Qz(e.Oc(),new La)),40);break;case 3:i=uG(yx(Wz(e.Oc(),new Na)),40)}return i}function fBn(n){var t,e,i,r,c;if(null==n.a)if(n.a=Inn(ZHt,B2n,28,n.c.b.c.length,16,1),n.a[0]=!1,vR(n.c,(jYn(),XTt)))for(e=uG(oIn(n.c,XTt),15).Kc();e.Ob();)(t=uG(e.Pb(),17).a)>0&&t<n.a.length&&(n.a[t]=!1);else for((c=new Ww(n.c.b)).a<c.c.c.length&&N3(c),i=1;c.a<c.c.c.length;)r=uG(N3(c),30),n.a[i++]=_xn(r)}function lBn(){lBn=E,pOt=new Cm("additionalHeight"),mOt=new Cm("drawingHeight"),vOt=new Cm("drawingWidth"),MOt=new Cm("minHeight"),EOt=new Cm("minWidth"),SOt=new Cm("rows"),POt=new Cm("targetWidth"),jOt=new uF("minRowIncrease",0),yOt=new uF("maxRowIncrease",0),TOt=new uF("minRowDecrease",0),kOt=new uF("maxRowDecrease",0)}function bBn(n,t){var e,i;switch(i=n.b,t){case 1:n.b|=1,n.b|=4,n.b|=8;break;case 2:n.b|=2,n.b|=4,n.b|=8;break;case 4:n.b|=1,n.b|=2,n.b|=4,n.b|=8;break;case 3:n.b|=16,n.b|=8;break;case 0:n.b|=32,n.b|=16,n.b|=8,n.b|=1,n.b|=2,n.b|=4}if(n.b!=i&&n.c)for(e=new DD(n.c);e.e!=e.i.gc();)yLn(y9(uG(Zkn(e),482)),t)}function wBn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b;for(r=!1,o=0,u=(a=t).length;o<u;++o)c=a[o],oM((qx(),!!c.e))&&!uG(zq(n.b,c.e.p),219).s&&(r|=(s=c.e,(f=(h=uG(zq(n.b,s.p),219)).e)[l=AT(e,f.length)][0].k==(zIn(),lbt)?f[l]=TKn(c,f[l],e?(KQn(),_Rt):(KQn(),kRt)):h.c.mg(f,e),b=PKn(n,h,e,i),CFn(h.e,h.o,e),b));return r}function dBn(n,t){var e,i,r,c,a;for(c=(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a).i,r=new DD((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a));r.e!=r.i.gc();)xA(zDn(i=uG(Zkn(r),27),(XYn(),E$t)))!==xA((Own(),Axt))&&((a=uG(zDn(t,yDt),143))==(e=uG(zDn(i,yDt),143))||a&&k9(a,e))&&0!=(!i.a&&(i.a=new fV(bFt,i,10,11)),i.a).i&&(c+=dBn(n,i));return c}function gBn(n){var t,e,i,r,c,a,o;for(i=0,o=0,a=new Ww(n.d);a.a<a.c.c.length;)c=uG(N3(a),105),r=uG(l8(JJ(new fX(null,new h3(c.j,16)),new Zr),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),e=null,i<=o?(KQn(),e=yRt,i+=r.gc()):o<i&&(KQn(),e=KRt,o+=r.gc()),t=e,kS(YJ(r.Oc(),new Jr),new xg(t))}function pBn(n){var t,e,i,r,c;for(c=new R7(n.a.c.length),r=new Ww(n.a);r.a<r.c.c.length;){switch(i=uG(N3(r),10),t=null,(e=uG(oIn(i,(jYn(),gMt)),171)).g){case 1:case 2:Pfn(),t=ygt;break;case 3:case 4:Pfn(),t=vgt}t?(kfn(i,(GYn(),Npt),(Pfn(),ygt)),t==vgt?CKn(i,e,(can(),Vjt)):t==ygt&&CKn(i,e,(can(),Wjt))):mv(c.c,i)}return c}function mBn(n){var t,e,i,r,c,a,o,u;for(n.b=new f$n(new IM((KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt]))),new IM((gon(),Uhn(cT(Rdt,1),p1n,372,0,[Sdt,Edt,jdt])))),o=0,u=(a=Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length;o<u;++o)for(c=a[o],i=0,r=(e=Uhn(cT(Rdt,1),p1n,372,0,[Sdt,Edt,jdt])).length;i<r;++i)t=e[i],LSn(n.b,c,t,new Zm)}function vBn(n,t){var e,i,r,c,a,o,u,s,h,f;if(a=uG(uG(Y9(n.r,t),21),87),o=n.u.Hc((eNn(),gRt)),e=n.u.Hc(bRt),i=n.u.Hc(lRt),s=n.u.Hc(pRt),f=n.B.Hc((oUn(),uKt)),h=!e&&!i&&(s||2==a.gc()),iFn(n,t),r=null,u=null,o){for(u=r=uG((c=a.Kc()).Pb(),117);c.Ob();)u=uG(c.Pb(),117);r.d.b=0,u.d.c=0,h&&!r.a&&(r.d.c=0)}f&&(yCn(a),o&&(r.d.b=0,u.d.c=0))}function kBn(n,t){var e,i,r,c,a,o,u,s,h,f;if(a=uG(uG(Y9(n.r,t),21),87),o=n.u.Hc((eNn(),gRt)),e=n.u.Hc(bRt),i=n.u.Hc(lRt),u=n.u.Hc(pRt),f=n.B.Hc((oUn(),uKt)),s=!e&&!i&&(u||2==a.gc()),rGn(n,t),h=null,r=null,o){for(r=h=uG((c=a.Kc()).Pb(),117);c.Ob();)r=uG(c.Pb(),117);h.d.d=0,r.d.a=0,s&&!h.a&&(h.d.a=0)}f&&(MCn(a),o&&(h.d.d=0,r.d.a=0))}function yBn(n,t,e){var i,r,c,a,o;if(i=t.k,t.p>=0)return!1;if(t.p=e.b,kD(e.e,t),i==(zIn(),wbt)||i==gbt)for(r=new Ww(t.j);r.a<r.c.c.length;)for(o=new Qd(new Ww(new Wd(uG(N3(r),12)).a.g));l$(o.a);)if(a=(c=uG(N3(o.a),18).d.i).k,t.c!=c.c&&(a==wbt||a==gbt)&&yBn(n,c,e))return!0;return!0}function MBn(n){var t;return 64&n.Db?L$n(n):((t=new fx(L$n(n))).a+=" (changeable: ",Lj(t,!!(n.Bb&w1n)),t.a+=", volatile: ",Lj(t,!!(n.Bb&frt)),t.a+=", transient: ",Lj(t,!!(n.Bb&j0n)),t.a+=", defaultValueLiteral: ",VA(t,n.j),t.a+=", unsettable: ",Lj(t,!!(n.Bb&hrt)),t.a+=", derived: ",Lj(t,!!(n.Bb&VZn)),t.a+=")",t.a)}function TBn(n,t){var e,i,r,c;return(i=t.qi(n.a))&&(!i.b&&(i.b=new XR((YYn(),H_t),wBt,i)),null!=(e=mK(Lmn(i.b,Krt)))&&F$(c=-1==(r=e.lastIndexOf("#"))?hK(n,t.jk(),e):0==r?gtn(n,null,(s3(1,e.length+1),e.substr(1))):gtn(n,(Knn(0,r,e.length),e.substr(0,r)),(s3(r+1,e.length+1),e.substr(r+1))),156))?uG(c,156):null}function jBn(n,t){var e,i,r,c;return(e=t.qi(n.a))&&(!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),null!=(r=mK(Lmn(e.b,oct)))&&F$(c=-1==(i=r.lastIndexOf("#"))?hK(n,t.jk(),r):0==i?gtn(n,null,(s3(1,r.length+1),r.substr(1))):gtn(n,(Knn(0,i,r.length),r.substr(0,i)),(s3(i+1,r.length+1),r.substr(i+1))),156))?uG(c,156):null}function EBn(n){var t,e,i,r,c,a,o,u,s,h;for(e=TRn(n.d),c=(r=uG(oIn(n.b,(ryn(),Yht)),107)).b+r.c,a=r.d+r.a,u=e.d.a*n.e+c,o=e.b.a*n.f+a,$b(n.b,new MO(u,o)),h=new Ww(n.g);h.a<h.c.c.length;)t=JF(FR(new MO((s=uG(N3(h),568)).g-e.a.a,s.i-e.c.a),s.a,s.b),vD(HR(D$(ON(s.e)),s.d*s.a,s.c*s.b),-.5)),i=AN(s.e),PT(s.e,YF(t,i))}function SBn(n,t){var e,i,r,c,a,o,u;for(t.Ug("Restoring reversed edges",1),a=new Ww(n.b);a.a<a.c.c.length;)for(o=new Ww(uG(N3(a),30).a);o.a<o.c.c.length;)for(u=new Ww(uG(N3(o),10).j);u.a<u.c.c.length;)for(r=0,c=(i=x4(uG(N3(u),12).g)).length;r<c;++r)oM(gK(oIn(e=i[r],(GYn(),pmt))))&&pqn(e,!1);t.Vg()}function PBn(n,t,e,i){var r,c,a,o,u;for(u=Inn(eUt,zZn,109,(KQn(),Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length,0,2),a=0,o=(c=Uhn(cT(YRt,1),z4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length;a<o;++a)u[(r=c[a]).g]=Inn(eUt,I0n,28,n.c[r.g],15,1);return jEn(u,n,yRt),jEn(u,n,KRt),MTn(u,n,yRt,t,e,i),MTn(u,n,kRt,t,e,i),MTn(u,n,KRt,t,e,i),MTn(u,n,_Rt,t,e,i),u}function CBn(n,t,e){if(PV(n.a,t)){if(cS(uG(cQ(n.a,t),49),e))return 1}else vJ(n.a,t,new ek);if(PV(n.a,e)){if(cS(uG(cQ(n.a,e),49),t))return-1}else vJ(n.a,e,new ek);if(PV(n.b,t)){if(cS(uG(cQ(n.b,t),49),e))return-1}else vJ(n.b,t,new ek);if(PV(n.b,e)){if(cS(uG(cQ(n.b,e),49),t))return 1}else vJ(n.b,e,new ek);return 0}function IBn(n){var t,i,r,c,a,o;n.q!=($Pn(),aRt)&&n.q!=cRt&&(c=n.f.n.d+eq(uG(AJ(n.b,(KQn(),yRt)),127))+n.c,t=n.f.n.a+eq(uG(AJ(n.b,KRt),127))+n.c,r=uG(AJ(n.b,kRt),127),o=uG(AJ(n.b,_Rt),127),a=e.Math.max(0,r.n.d-c),a=e.Math.max(a,o.n.d-c),i=e.Math.max(0,r.n.a-t),i=e.Math.max(i,o.n.a-t),r.n.d=a,o.n.d=a,r.n.a=i,o.n.a=i)}function OBn(n,t,e,i){var r,c,a,o,u,s;if(null==e)for(r=uG(n.g,124),o=0;o<n.i;++o)if((a=r[o]).Lk()==t)return Nyn(n,a,i);return PP(),c=uG(t,69).xk()?uG(e,76):R5(t,e),uN(n.e)?(s=!kmn(n,t),i=Nmn(n,c,i),u=t.Jk()?VZ(n,3,t,null,e,Dqn(n,t,e,F$(t,102)&&!!(uG(t,19).Bb&P0n)),s):VZ(n,1,t,t.ik(),e,-1,s),i?i.nj(u):i=u):i=Nmn(n,c,i),i}function ABn(){this.b=new u8,this.d=new u8,this.e=new u8,this.c=new u8,this.a=new Ym,this.f=new Ym,E0(PNt,new lu,new pu),E0($Nt,new Cu,new Iu),E0(hbt,new Ou,new Au),E0(Sbt,new Lu,new Nu),E0(AKt,new $u,new Du),E0(eut,new mu,new vu),E0(lut,new ku,new yu),E0(cut,new Mu,new Tu),E0(aut,new ju,new Eu),E0(jut,new Su,new Pu)}function LBn(n,t){var e,i,r,c,a;for(n=null==n?IZn:(tJ(n),n),r=0;r<t.length;r++)t[r]=DRn(t[r]);for(e=new QM,a=0,i=0;i<t.length&&-1!=(c=n.indexOf("%s",a));)e.a+=""+r1(null==n?IZn:(tJ(n),n),a,c),QA(e,t[i++]),a=c+2;if(L4(e,n,a,n.length),i<t.length){for(e.a+=" [",QA(e,t[i++]);i<t.length;)e.a+=TZn,QA(e,t[i++]);e.a+="]"}return e.a}function NBn(n,t){var e,i,r,c,a,o,u;for(e=0,u=new Ww(t);u.a<u.c.c.length;){for(o=uG(N3(u),12),fbn(n.b,n.d[o.p]),a=0,r=new w7(o.b);l$(r.a)||l$(r.b);)zQ(i=uG(l$(r.a)?N3(r.a):N3(r.b),18))?(c=Yj(n,o==i.c?i.d:i.c))>n.d[o.p]&&(e+=J8(n.b,c),A6(n.a,xwn(c))):++a;for(e+=n.b.d*a;!LM(n.a);)lin(n.b,uG(xV(n.a),17).a)}return e}function $Bn(n){var t,e,i,r,c,a;return c=0,(t=bEn(n)).kk()&&(c|=4),n.Bb&hrt&&(c|=2),F$(n,102)?(r=lMn(e=uG(n,19)),e.Bb&Qtt&&(c|=32),r&&(iQ(K0(r)),c|=8,((a=r.t)>1||-1==a)&&(c|=16),r.Bb&Qtt&&(c|=64)),e.Bb&P0n&&(c|=frt),c|=w1n):F$(t,469)?c|=512:(i=t.kk())&&1&i.i&&(c|=256),512&n.Bb&&(c|=128),c}function DBn(n,t){var e;return n.f==CBt?(e=sJ(Nen((gAn(),kBt),t)),n.e?4==e&&t!=(m$n(),NBt)&&t!=(m$n(),OBt)&&t!=(m$n(),ABt)&&t!=(m$n(),LBt):2==e):!(!n.d||!(n.d.Hc(t)||n.d.Hc(_3(Nen((gAn(),kBt),t)))||n.d.Hc(iVn((gAn(),kBt),n.b,t))))||!(!n.f||!WRn((gAn(),n.f),HJ(Nen(kBt,t))))&&(e=sJ(Nen(kBt,t)),n.e?4==e:2==e)}function xBn(n){var t,e,i,r,c,a,o,u,s,h,f,l;for(f=-1,l=0,s=0,h=(u=n).length;s<h;++s){for(a=0,o=(c=u[s]).length;a<o;++a)for(r=c[a],t=new j6(-1==f?n[0]:n[f],uG(oIn(HQ(r),(jYn(),Syt)),284),qjn(r),oM(gK(oIn(HQ(r),Eyt)))),e=0;e<r.j.c.length;e++)for(i=e+1;i<r.j.c.length;i++)Jz(t,uG(zq(r.j,e),12),uG(zq(r.j,i),12))>0&&++l;++f}return l}function RBn(n,t,i,r){var c,a,o,u,s,h,f,l;return s=(o=uG(zDn(i,(XYn(),mDt)),8)).a,f=o.b+n,(c=e.Math.atan2(f,s))<0&&(c+=f7n),(c+=t)>f7n&&(c-=f7n),h=(u=uG(zDn(r,mDt),8)).a,l=u.b+n,(a=e.Math.atan2(l,h))<0&&(a+=f7n),(a+=t)>f7n&&(a-=f7n),YN(),oan(1e-10),e.Math.abs(c-a)<=1e-10||c==a||isNaN(c)&&isNaN(a)?0:c<a?-1:c>a?1:KL(isNaN(c),isNaN(a))}function KBn(n){var t,e,i,r,c,a,o;for(o=new Ym,i=new Ww(n.a.b);i.a<i.c.c.length;)vJ(o,t=uG(N3(i),60),new Zm);for(r=new Ww(n.a.b);r.a<r.c.c.length;)for((t=uG(N3(r),60)).i=T0n,a=t.c.Kc();a.Ob();)c=uG(a.Pb(),60),uG(DA(FX(o.f,c)),15).Fc(t);for(e=new Ww(n.a.b);e.a<e.c.c.length;)(t=uG(N3(e),60)).c.$b(),t.c=uG(DA(FX(o.f,t)),15);NFn(n)}function FBn(n){var t,e,i,r,c,a,o;for(o=new Ym,i=new Ww(n.a.b);i.a<i.c.c.length;)vJ(o,t=uG(N3(i),86),new Zm);for(r=new Ww(n.a.b);r.a<r.c.c.length;)for((t=uG(N3(r),86)).o=T0n,a=t.f.Kc();a.Ob();)c=uG(a.Pb(),86),uG(DA(FX(o.f,c)),15).Fc(t);for(e=new Ww(n.a.b);e.a<e.c.c.length;)(t=uG(N3(e),86)).f.$b(),t.f=uG(DA(FX(o.f,t)),15);LKn(n)}function _Bn(n,t,e,i){var r,c;for(PEn(n,t,e,i),xb(t,n.j-t.j+e),Rb(t,n.k-t.k+i),c=new Ww(t.f);c.a<c.c.c.length;)switch((r=uG(N3(c),334)).a.g){case 0:wfn(n,t.g+r.b.a,0,t.g+r.c.a,t.i-1);break;case 1:wfn(n,t.g+t.o,t.i+r.b.a,n.o-1,t.i+r.c.a);break;case 2:wfn(n,t.g+r.b.a,t.i+t.p,t.g+r.c.a,n.p-1);break;default:wfn(n,0,t.i+r.b.a,t.g-1,t.i+r.c.a)}}function BBn(n,t){var e,i,r,c,a,o;for(r=new Zm,t.b.c.length=0,i=uG(l8(f3(new fX(null,new h3(new Lw(n.a.b),1))),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15).Kc();i.Ob();)if(e=uG(i.Pb(),17),0!=(c=W6(n.a,e)).b)for(a=new bQ(t),mv(r.c,a),a.p=e.a,o=Fkn(c,0);o.b!=o.d.c;)a2(uG(I6(o),10),a);Ohn(t.b,r)}function HBn(n,t,e,i,r){var c,a;try{if(t>=n.o)throw hv(new Ik);a=t>>5,c=Nz(1,pz(Nz(31&t,1))),n.n[e][a]=r?S3(n.n[e][a],c):E3(n.n[e][a],CG(c)),c=Nz(c,1),n.n[e][a]=i?S3(n.n[e][a],c):E3(n.n[e][a],CG(c))}catch(o){throw F$(o=Ehn(o),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(o)}}function UBn(n,t,e,i){var r,c,a,o,u,s,h,f;for(f=new Hj(new ep(n)),o=0,u=(a=Uhn(cT(pbt,1),e6n,10,0,[t,e])).length;o<u;++o)for(h=Vwn(a[o],i).Kc();h.Ob();)for(c=new w7((s=uG(h.Pb(),12)).b);l$(c.a)||l$(c.b);)v9(r=uG(l$(c.a)?N3(c.a):N3(c.b),18))||(f.a.zc(s,(qx(),tot)),zQ(r)&&_V(f,s==r.c?r.d:r.c));return WW(f),new Z_(f)}function GBn(n,t,i,r){var c,a;t&&(c=uM(pK(oIn(t,(OQn(),FPt))))+r,a=i+uM(pK(oIn(t,NPt)))/2,kfn(t,GPt,xwn(pz(Bsn(e.Math.round(c))))),kfn(t,qPt,xwn(pz(Bsn(e.Math.round(a))))),0==t.d.b||GBn(n,uG(B$(new Tp(Fkn(new Mp(t).a.d,0))),40),i+uM(pK(oIn(t,NPt)))+n.b,r+uM(pK(oIn(t,xPt)))),null!=oIn(t,HPt)&&GBn(n,uG(oIn(t,HPt),40),i,r))}function qBn(n,t){var i,r,c,a,o,u,s,h,f,l,b;for(c=2*uM(pK(oIn(s=HQ(t.a),(jYn(),vTt)))),f=uM(pK(oIn(s,STt))),h=e.Math.max(c,f),a=Inn(eUt,I0n,28,t.f-t.c+1,15,1),r=-h,i=0,u=t.b.Kc();u.Ob();)o=uG(u.Pb(),10),r+=n.a[o.c.p]+h,a[i++]=r;for(r+=n.a[t.a.c.p]+h,a[i++]=r,b=new Ww(t.e);b.a<b.c.c.length;)l=uG(N3(b),10),r+=n.a[l.c.p]+h,a[i++]=r;return a}function XBn(n,t){var e,i,r,c;if(0!=(c=uG(zDn(n,(XYn(),gDt)),64).g-uG(zDn(t,gDt),64).g))return c;if(e=uG(zDn(n,fDt),17),i=uG(zDn(t,fDt),17),e&&i&&0!=(r=e.a-i.a))return r;switch(uG(zDn(n,gDt),64).g){case 1:return ugn(n.i,t.i);case 2:return ugn(n.j,t.j);case 3:return ugn(t.i,n.i);case 4:return ugn(t.j,n.j);default:throw hv(new kM(n6n))}}function zBn(n){var t,e,i;return 64&n.Db?rOn(n):(t=new lx(_tt),(e=n.k)?JA(JA((t.a+=' "',t),e),'"'):(!n.n&&(n.n=new fV(lFt,n,1,7)),n.n.i>0&&(!(i=(!n.n&&(n.n=new fV(lFt,n,1,7)),uG(zrn(n.n,0),135)).a)||JA(JA((t.a+=' "',t),i),'"'))),JA(Nj(JA(Nj(JA(Nj(JA(Nj((t.a+=" (",t),n.i),","),n.j)," | "),n.g),","),n.f),")"),t.a)}function VBn(n){var t,e,i;return 64&n.Db?rOn(n):(t=new lx(Btt),(e=n.k)?JA(JA((t.a+=' "',t),e),'"'):(!n.n&&(n.n=new fV(lFt,n,1,7)),n.n.i>0&&(!(i=(!n.n&&(n.n=new fV(lFt,n,1,7)),uG(zrn(n.n,0),135)).a)||JA(JA((t.a+=' "',t),i),'"'))),JA(Nj(JA(Nj(JA(Nj(JA(Nj((t.a+=" (",t),n.i),","),n.j)," | "),n.g),","),n.f),")"),t.a)}function WBn(n,t){var e,i,r,c,a;for(t==(Sln(),rEt)&&_An(uG(Y9(n.a,(gPn(),wdt)),15)),r=uG(Y9(n.a,(gPn(),wdt)),15).Kc();r.Ob();)switch(i=uG(r.Pb(),105),e=uG(zq(i.j,0),113).d.j,f$(c=new Z_(i.j),new Fr),t.g){case 2:TCn(n,c,e,(gon(),Edt),1);break;case 1:case 0:TCn(n,new C2(c,0,a=IRn(c)),e,(gon(),Edt),0),TCn(n,new C2(c,a,c.c.length),e,Edt,1)}}function QBn(n,t){var e,i,r,c,a,o;if(null==t||0==t.length)return null;if(!(r=uG(U1(n.a,t),143))){for(i=new _w(new Fw(n.b).a.vc().Kc());i.a.Ob();)if(c=uG(i.a.Pb(),44),a=(e=uG(c.md(),143)).c,o=t.length,m_(a.substr(a.length-o,o),t)&&(t.length==a.length||46==VJ(a,a.length-t.length-1))){if(r)return null;r=e}r&&r2(n.a,t,r)}return r}function JBn(n,t){var e,i,r;return e=new Bn,(i=uG(l8(YJ(new fX(null,new h3(n.f,16)),e),gen(new W,new Q,new rn,new cn,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Out),Iut]))),21).gc())<(r=uG(l8(YJ(new fX(null,new h3(t.f,16)),e),gen(new W,new Q,new rn,new cn,Uhn(cT(Rut,1),p1n,108,0,[Out,Iut]))),21).gc())?-1:i==r?0:1}function YBn(n){var t,e,i;vR(n,(jYn(),PMt))&&((i=uG(oIn(n,PMt),21)).dc()||(e=new nB(t=uG(Mj(eRt),9),uG(MF(t,t.length),9),0),i.Hc((VDn(),Gxt))?Mon(e,Gxt):Mon(e,qxt),i.Hc(Hxt)||Mon(e,Hxt),i.Hc(Bxt)?Mon(e,Vxt):i.Hc(_xt)?Mon(e,zxt):i.Hc(Uxt)&&Mon(e,Xxt),i.Hc(Vxt)?Mon(e,Bxt):i.Hc(zxt)?Mon(e,_xt):i.Hc(Xxt)&&Mon(e,Uxt),kfn(n,PMt,e)))}function ZBn(n){var t,e,i,r,c,a,o;for(r=uG(oIn(n,(GYn(),zpt)),10),u3(0,(i=n.j).c.length),e=uG(i.c[0],12),a=new Ww(r.j);a.a<a.c.c.length;)if(xA(c=uG(N3(a),12))===xA(oIn(e,rmt))){c.j==(KQn(),yRt)&&n.p>r.p?(NLn(c,KRt),c.d&&(o=c.o.b,t=c.a.b,c.a.b=o-t)):c.j==KRt&&r.p>n.p&&(NLn(c,yRt),c.d&&(o=c.o.b,t=c.a.b,c.a.b=-(o-t)));break}return r}function nHn(n,t,e,i,r){var c,a,o,u,s,h,f;if(!(F$(t,207)||F$(t,366)||F$(t,193)))throw hv(new vM("Method only works for ElkNode-, ElkLabel and ElkPort-objects."));return a=n.a/2,u=t.i+i-a,h=t.j+r-a,s=u+t.g+n.a,f=h+t.f+n.a,aq(c=new Uk,new MO(u,h)),aq(c,new MO(u,f)),aq(c,new MO(s,f)),aq(c,new MO(s,h)),zsn(o=new pDn(c),t),e&&vJ(n.b,t,o),o}function tHn(n,t,e){var i,r,c,a,o,u,s,h;for(c=new MO(t,e),s=new Ww(n.a);s.a<s.c.c.length;)for(JF((u=uG(N3(s),10)).n,c),h=new Ww(u.j);h.a<h.c.c.length;)for(r=new Ww(uG(N3(h),12).g);r.a<r.c.c.length;)for(Xun((i=uG(N3(r),18)).a,c),(a=uG(oIn(i,(jYn(),bMt)),75))&&Xun(a,c),o=new Ww(i.b);o.a<o.c.c.length;)JF(uG(N3(o),72).n,c)}function eHn(n,t,e){var i,r,c,a,o,u,s,h;for(c=new MO(t,e),s=new Ww(n.a);s.a<s.c.c.length;)for(JF((u=uG(N3(s),10)).n,c),h=new Ww(u.j);h.a<h.c.c.length;)for(r=new Ww(uG(N3(h),12).g);r.a<r.c.c.length;)for(Xun((i=uG(N3(r),18)).a,c),(a=uG(oIn(i,(jYn(),bMt)),75))&&Xun(a,c),o=new Ww(i.b);o.a<o.c.c.length;)JF(uG(N3(o),72).n,c)}function iHn(n){if(0==(!n.b&&(n.b=new f_(cFt,n,4,7)),n.b).i)throw hv(new EM("Edges must have a source."));if(0==(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c).i)throw hv(new EM("Edges must have a target."));if(!n.b&&(n.b=new f_(cFt,n,4,7)),!(n.b.i<=1&&(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c.i<=1)))throw hv(new EM("Hyperedges are not supported."))}function rHn(n,t){var e,i,r,c,a,o,u,s,h,f;for(f=0,A6(c=new ND,t);c.b!=c.c;)for(u=uG(xV(c),219),s=0,h=uG(oIn(t.j,(jYn(),Syt)),284),a=uM(pK(oIn(t.j,yyt))),o=uM(pK(oIn(t.j,Myt))),h!=(yvn(),Fjt)&&(s+=a*mxn(u.e,h),s+=o*xBn(u.e)),f+=XTn(u.d,u.e)+s,r=new Ww(u.b);r.a<r.c.c.length;)i=uG(N3(r),36),(e=uG(zq(n.b,i.p),219)).s||(f+=BAn(n,e));return f}function cHn(){var n;for(cHn=E,xot=new Z5(1,1),Kot=new Z5(1,10),_ot=new Z5(0,0),Dot=new Z5(-1,1),Rot=Uhn(cT(Xot,1),zZn,92,0,[_ot,xot,new Z5(1,2),new Z5(1,3),new Z5(1,4),new Z5(1,5),new Z5(1,6),new Z5(1,7),new Z5(1,8),new Z5(1,9),Kot]),Fot=Inn(Xot,zZn,92,32,0,1),n=0;n<Fot.length;n++)Fot[n]=BA(Nz(1,n),0)?Rmn(Nz(1,n)):hW(Rmn(Men(Nz(1,n))))}function aHn(n,t,e,i,r,c,a){if(n.c=i.Lf().a,n.d=i.Lf().b,r&&(n.c+=r.Lf().a,n.d+=r.Lf().b),n.b=t.Mf().a,n.a=t.Mf().b,r)switch(r.ag().g){case 0:case 2:n.c+=r.Mf().a+a+c.a+a;break;case 4:n.c-=a+c.a+a+t.Mf().a;break;case 1:n.c+=r.Mf().a+a,n.d-=a+c.b+a+t.Mf().b;break;case 3:n.c+=r.Mf().a+a,n.d+=r.Mf().b+a+c.b+a}else e?n.c-=a+t.Mf().a:n.c+=i.Mf().a+a}function oHn(n,t){var e,i;for(this.b=new Zm,this.e=new Zm,this.a=n,this.d=t,Syn(this),Hmn(this),this.b.dc()?this.c=n.c.p:this.c=uG(this.b.Xb(0),10).c.p,0==this.e.c.length?this.f=n.c.p:this.f=uG(zq(this.e,this.e.c.length-1),10).c.p,i=uG(oIn(n,(GYn(),gmt)),15).Kc();i.Ob();)if(vR(e=uG(i.Pb(),72),(jYn(),Gyt))){this.d=uG(oIn(e,Gyt),232);break}}function uHn(n,t,e){var i,r,c,a,o,u,s,h;for(i=uG(cQ(n.a,t),49),c=uG(cQ(n.a,e),49),r=uG(cQ(n.e,t),49),a=uG(cQ(n.e,e),49),i.a.zc(e,i),a.a.zc(t,a),h=c.a.ec().Kc();h.Ob();)s=uG(h.Pb(),10),i.a.zc(s,i),FV(uG(cQ(n.e,s),49),t),Qon(uG(cQ(n.e,s),49),r);for(u=r.a.ec().Kc();u.Ob();)o=uG(u.Pb(),10),a.a.zc(o,a),FV(uG(cQ(n.a,o),49),e),Qon(uG(cQ(n.a,o),49),c)}function sHn(n,t,e){var i,r,c,a,o,u,s,h;for(i=uG(cQ(n.a,t),49),c=uG(cQ(n.a,e),49),r=uG(cQ(n.b,t),49),a=uG(cQ(n.b,e),49),i.a.zc(e,i),a.a.zc(t,a),h=c.a.ec().Kc();h.Ob();)s=uG(h.Pb(),10),i.a.zc(s,i),FV(uG(cQ(n.b,s),49),t),Qon(uG(cQ(n.b,s),49),r);for(u=r.a.ec().Kc();u.Ob();)o=uG(u.Pb(),10),a.a.zc(o,a),FV(uG(cQ(n.a,o),49),e),Qon(uG(cQ(n.a,o),49),c)}function hHn(n,t,e){var i,r,c,a,o,u,s,h;for(i=uG(cQ(n.a,t),49),c=uG(cQ(n.a,e),49),r=uG(cQ(n.d,t),49),a=uG(cQ(n.d,e),49),i.a.zc(e,i),a.a.zc(t,a),h=c.a.ec().Kc();h.Ob();)s=uG(h.Pb(),12),i.a.zc(s,i),FV(uG(cQ(n.d,s),49),t),Qon(uG(cQ(n.d,s),49),r);for(u=r.a.ec().Kc();u.Ob();)o=uG(u.Pb(),12),a.a.zc(o,a),FV(uG(cQ(n.a,o),49),e),Qon(uG(cQ(n.a,o),49),c)}function fHn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w;if(c=e,e<i)for(b=new nhn(n.p),w=new nhn(n.p),Qon(b.e,n.e),b.q=n.q,b.r=w,eQ(b),Qon(w.j,n.j),w.r=b,eQ(w),f=uG((l=new WO(b,w)).a,118),h=uG(l.b,118),u3(c,t.c.length),a=j_n(n,f,h,r=uG(t.c[c],339)),s=e+1;s<=i;s++)u3(s,t.c.length),jyn(o=uG(t.c[s],339),u=j_n(n,f,h,o),r,a)&&(r=o,a=u,c=s);return c}function lHn(n,t,e,i){var r,c,a,o,u,s,h;for(ycn(a=uG(zrn(t,0),27),0),Mcn(a,0),mv((u=new Zm).c,a),o=a,c=new jq(n.a,a.g,a.f,(_Rn(),FAt)),s=1;s<t.i;s++)ycn(h=uG(zrn(t,s),27),(r=jzn(n,lXn(n,xAt,h,o,c,u,e),lXn(n,DAt,h,o,c,u,e),lXn(n,KAt,h,o,c,u,e),lXn(n,RAt,h,o,c,u,e),h,o,i)).d),Mcn(h,r.e),ow(r,FAt),c=r,o=h,mv(u.c,h);return c}function bHn(n,t,e){var i,r,c,a,o,u,s;if(s=t,Gan(u=D5(n,d5(e),s),k6(s,Iet)),a=p6(s,vet),_Ln((i=new YO(n,u)).a,i.b,a),o=p6(s,ket),BLn((r=new ZO(n,u)).a,r.b,o),0==(!u.b&&(u.b=new f_(cFt,u,4,7)),u.b).i||0==(!u.c&&(u.c=new f_(cFt,u,5,8)),u.c).i)throw c=k6(s,Iet),hv(new SM(Net+c+$et));return fCn(s,u),AJn(n,s,u),qfn(n,s,u)}function wHn(n,t){var i,r,c,a,o,u,s;for(c=Inn(YHt,W1n,28,n.e.a.c.length,15,1),o=new Ww(n.e.a);o.a<o.c.c.length;)c[(a=uG(N3(o),125)).d]+=a.b.a.c.length;for(u=oG(t);0!=u.b;)for(r=jtn(new Ww((a=uG(0==u.b?null:(MK(0!=u.b),Lrn(u,u.a.a)),125)).g.a));r.Ob();)(s=(i=uG(r.Pb(),218)).e).e=e.Math.max(s.e,a.e+i.a),--c[s.d],0==c[s.d]&&s8(u,s,u.c.b,u.c)}function dHn(n){var t,i,r,c,a,o,u,s,h,f,l;for(i=j1n,c=vZn,u=new Ww(n.e.a);u.a<u.c.c.length;)a=uG(N3(u),125),c=e.Math.min(c,a.e),i=e.Math.max(i,a.e);for(t=Inn(YHt,W1n,28,i-c+1,15,1),o=new Ww(n.e.a);o.a<o.c.c.length;)(a=uG(N3(o),125)).e-=c,++t[a.e];if(r=0,null!=n.k)for(f=0,l=(h=n.k).length;f<l&&(s=h[f],t[r++]+=s,t.length!=r);++f);return t}function gHn(n,t){var e,i,r,c,a,o;if(t.Ug("Edge routing",1),(r=uG(oIn(n,(QGn(),uCt)),392))==(Pln(),dPt))stn(n);else if(r==wPt)for(uG(yx(lln(JJ(new fX(null,new h3(n.b,16)),new Pa))),40),c=uM(pK(oIn(n,jCt))),a=uM(pK(oIn(n,oCt))),$Jn(n,o=uG(oIn(n,cCt),88),c),_Yn(n,o,c,a),qYn(n,o,c,a),i=Fkn(n.a,0);i.b!=i.d.c;)(e=uG(I6(i),65)).a.b<2&&hNn(e);t.Vg()}function pHn(n){switch(n.d){case 9:case 8:return!0;case 3:case 5:case 4:case 6:return!1;case 7:return uG(AFn(n),17).a==n.o;case 1:case 2:if(-2==n.o)return!1;switch(n.p){case 0:case 1:case 2:case 6:case 5:case 7:return _A(n.k,n.f);case 3:case 4:return n.j==n.e;default:return null==n.n?null==n.g:udn(n.n,n.g)}default:return!1}}function mHn(n,t){var e,i,r;switch(t.Ug("Breaking Point Insertion",1),i=new dDn(n),uG(oIn(n,(jYn(),BTt)),351).g){case 2:r=new kc;break;case 0:r=new hc;break;default:r=new yc}if(e=r.og(n,i),oM(gK(oIn(n,UTt)))&&(e=Jzn(n,e)),!r.pg()&&vR(n,zTt))switch(uG(oIn(n,zTt),352).g){case 2:e=KLn(i,e);break;case 1:e=pPn(i,e)}e.dc()||HJn(n,e),t.Vg()}function vHn(n,t,e){var i,r,c,a,o,u,s,h,f;for(c=new R7(t.c.length),s=new Ww(t);s.a<s.c.c.length;)a=uG(N3(s),10),kD(c,n.b[a.c.p][a.p]);for(Uzn(n,c,e),f=null;f=hWn(c);)lqn(n,uG(f.a,239),uG(f.b,239),c);for(t.c.length=0,r=new Ww(c);r.a<r.c.c.length;)for(u=0,h=(o=(i=uG(N3(r),239)).d).length;u<h;++u)a=o[u],mv(t.c,a),n.a[a.c.p][a.p].a=oD(i.g,i.d[0]).a}function kHn(n){hP(n,new hCn(FT(DT(KT(RT(new bu,Ttt),"ELK Fixed"),"Keeps the current layout as it is, without any automatic modification. Optional coordinates can be given for nodes and edge bend points."),new Ku))),U4(n,Ttt,K3n,Pxt),U4(n,Ttt,b9n,Jkn(Cxt)),U4(n,Ttt,Qnt,Jkn(Mxt)),U4(n,Ttt,p4n,Jkn(Txt)),U4(n,Ttt,x4n,Jkn(Ext)),U4(n,Ttt,d4n,Jkn(jxt))}function yHn(n,t,e){var i,r,c,a;if(i=pz(Ngn(h1n,PJ(pz(Ngn(null==t?0:Hon(t),f1n)),15))),a=pz(Ngn(h1n,PJ(pz(Ngn(null==e?0:Hon(e),f1n)),15))),(c=lun(n,t,i))&&a==c.f&&xQ(e,c.i))return e;if(bun(n,e,a))throw hv(new vM("value already present: "+e));return r=new fJ(t,i,e,a),c?(yRn(n,c),HLn(n,r,c),c.e=null,c.c=null,c.i):(HLn(n,r,null),SEn(n),null)}function MHn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;s=e.a.c,a=e.a.c+e.a.b,l=(c=uG(cQ(e.c,t),468)).f,b=c.a,o=c.b?new MO(a,l):new MO(s,l),h=c.c?new MO(s,b):new MO(a,b),r=s,e.p||(r+=n.c),u=new MO(r+=e.F+e.v*n.b,l),f=new MO(r,b),dan(t.a,Uhn(cT(PNt,1),zZn,8,0,[o,u])),e.d.a.gc()>1&&(i=new MO(r,e.b),aq(t.a,i)),dan(t.a,Uhn(cT(PNt,1),zZn,8,0,[f,h]))}function THn(){THn=E,$jt=new dI(q4n,0),Ijt=new dI("NIKOLOV",1),Ljt=new dI("NIKOLOV_PIXEL",2),Ojt=new dI("NIKOLOV_IMPROVED",3),Ajt=new dI("NIKOLOV_IMPROVED_PIXEL",4),Sjt=new dI("DUMMYNODE_PERCENTAGE",5),Njt=new dI("NODECOUNT_PERCENTAGE",6),Djt=new dI("NO_BOUNDARY",7),Pjt=new dI("MODEL_ORDER_LEFT_TO_RIGHT",8),Cjt=new dI("MODEL_ORDER_RIGHT_TO_LEFT",9)}function jHn(n){var t,e,i,r,c;for(i=n.length,t=new VM,c=0;c<i;)if(9!=(e=VJ(n,c++))&&10!=e&&12!=e&&13!=e&&32!=e)if(35!=e)92==e&&c<i?35==(s3(c,n.length),r=n.charCodeAt(c))||9==r||10==r||12==r||13==r||32==r?(TQ(t,r&D1n),++c):(t.a+="\\",TQ(t,r&D1n),++c):TQ(t,e&D1n);else for(;c<i&&13!=(e=VJ(n,c++))&&10!=e;);return t.a}function EHn(){EHn=E,wIt=new mL(M7n,(qx(),!1)),kIt=new mL(T7n,xwn(0)),yIt=new mL(j7n,0),MIt=new mL(E7n,!1),vbn(),gIt=new mL(S7n,pIt=sIt),xwn(0),dIt=new mL(P7n,xwn(1)),esn(),SIt=new mL(C7n,PIt=iOt),Ptn(),CIt=new mL(I7n,IIt=aIt),dTn(),mIt=new mL(O7n,vIt=ZIt),EIt=new mL(A7n,0),TIt=new mL(L7n,!1),jIt=new mL(N7n,!1)}function SHn(n,t){var e,i,r;for(i=new Ww(t);i.a<i.c.c.length;)if(e=uG(N3(i),27),UNn(n.a,e,e),UNn(n.b,e,e),0!=(r=GFn(e)).c.length)for(n.d&&n.d.Gg(r),UNn(n.a,e,(u3(0,r.c.length),uG(r.c[0],27))),UNn(n.b,e,uG(zq(r,r.c.length-1),27));0!=Jhn(r).c.length;)r=Jhn(r),n.d&&n.d.Gg(r),UNn(n.a,e,(u3(0,r.c.length),uG(r.c[0],27))),UNn(n.b,e,uG(zq(r,r.c.length-1),27))}function PHn(n,t,e){var i,r,c,a,o,u;if(t){if(e<=-1){if(F$(i=ern(t.Dh(),-1-e),102))return uG(i,19);for(o=0,u=(a=uG(t.Mh(i),160)).gc();o<u;++o)if(xA(a.Ul(o))===xA(n)&&F$(r=a.Tl(o),102)&&(c=uG(r,19)).Bb&Qtt)return c;throw hv(new kM("The containment feature could not be located"))}return lMn(uG(ern(n.Dh(),e),19))}return null}function CHn(n){var t,e,i,r,c,a,o,u,s,h;for(e=0,o=new Ww(n.d);o.a<o.c.c.length;)(a=uG(N3(o),105)).i&&(a.i.c=e++);for(t=Jq(ZHt,[zZn,B2n],[183,28],16,[e,e],2),h=n.d,r=0;r<h.c.length;r++)if(u3(r,h.c.length),(u=uG(h.c[r],105)).i)for(c=r+1;c<h.c.length;c++)u3(c,h.c.length),(s=uG(h.c[c],105)).i&&(i=HCn(u,s),t[u.i.c][s.i.c]=i,t[s.i.c][u.i.c]=i);return t}function IHn(){IHn=E,_Ot=new mL(q7n,(qx(),!1)),xwn(-1),NOt=new mL(X7n,xwn(-1)),xwn(-1),$Ot=new mL(z7n,xwn(-1)),DOt=new mL(V7n,!1),a9(),qOt=new mL(W7n,XOt=yAt),zOt=new mL(Q7n,-1),Bgn(),UOt=new mL(J7n,GOt=OOt),HOt=new mL(Y7n,!0),den(),KOt=new mL(Z7n,FOt=EAt),ROt=new mL(nnt,!1),xwn(1),xOt=new mL(tnt,xwn(1)),BOt=new Cm(ent)}function OHn(){OHn=E,fPt=new VI("ROOT_PROC",0),rPt=new VI("FAN_PROC",1),uPt=new VI("LEVEL_PROC",2),sPt=new VI("NEIGHBORS_PROC",3),oPt=new VI("LEVEL_HEIGHT",4),iPt=new VI("DIRECTION_PROC",5),hPt=new VI("NODE_POSITION_PROC",6),tPt=new VI("COMPACTION_PROC",7),aPt=new VI("LEVEL_COORDS",8),cPt=new VI("GRAPH_BOUNDS_PROC",9),ePt=new VI("DETREEIFYING_PROC",10)}function AHn(n,t){var e,i,r,c,a,o,u,s;for(o=null,r=!1,c=0,u=z5((s=n1(t)).a).i;c<u;++c)(e=AHn(n,uG(yVn(s,c,F$(a=uG(zrn(z5(s.a),c),89).c,90)?uG(a,29):(YYn(),x_t)),29))).dc()||(o?(r||(r=!0,o=new $X(o)),o.Gc(e)):o=e);return(i=ALn(n,t)).dc()?o||(hZ(),hZ(),zot):o?(r||(o=new $X(o)),o.Gc(i),o):i}function LHn(n,t){var e,i,r,c,a,o,u,s;for(o=null,i=!1,c=0,u=z5((s=n1(t)).a).i;c<u;++c)(e=LHn(n,uG(yVn(s,c,F$(a=uG(zrn(z5(s.a),c),89).c,90)?uG(a,29):(YYn(),x_t)),29))).dc()||(o?(i||(i=!0,o=new $X(o)),o.Gc(e)):o=e);return(r=n$n(n,t)).dc()?o||(hZ(),hZ(),zot):o?(i||(o=new $X(o)),o.Gc(r),o):r}function NHn(n){var t,i,r,c;r=n.o,VK(),n.A.dc()||udn(n.A,lht)?c=r.a:(c=gNn(n.f),n.A.Hc((Qmn(),WRt))&&!n.B.Hc((oUn(),cKt))&&(c=e.Math.max(c,gNn(uG(AJ(n.p,(KQn(),yRt)),252))),c=e.Math.max(c,gNn(uG(AJ(n.p,KRt),252)))),(t=fsn(n))&&(c=e.Math.max(c,t.a))),oM(gK(n.e.Tf().of((XYn(),H$t))))?r.a=e.Math.max(r.a,c):r.a=c,(i=n.f.i).c=0,i.b=c,YGn(n.f)}function $Hn(n,t,e){var i,r,c,a,o,u;if(F$(t,76))return Nyn(n,t,e);for(o=null,c=null,i=uG(n.g,124),a=0;a<n.i;++a)if(udn(t,(r=i[a]).md())&&F$(c=r.Lk(),102)&&uG(c,19).Bb&Qtt){o=r;break}return o&&(uN(n.e)&&(u=c.Jk()?VZ(n,4,c,t,null,Dqn(n,c,t,F$(c,102)&&!!(uG(c,19).Bb&P0n)),!0):VZ(n,c.tk()?2:1,c,t,c.ik(),-1,!0),e?e.nj(u):e=u),e=$Hn(n,o,e)),e}function DHn(n,t,e){var i,r,c,a;if(a=VKn(n.e.Dh(),t),i=uG(n.g,124),PP(),uG(t,69).xk()){for(c=0;c<n.i;++c)if(r=i[c],a.am(r.Lk())&&udn(r,e))return e_n(n,c),!0}else if(null!=e){for(c=0;c<n.i;++c)if(r=i[c],a.am(r.Lk())&&udn(e,r.md()))return e_n(n,c),!0}else for(c=0;c<n.i;++c)if(r=i[c],a.am(r.Lk())&&null==r.md())return e_n(n,c),!0;return!1}function xHn(n,t){var e,i,r,c;if(t.Ug("Node and Port Label Placement and Node Sizing",1),zN((zS(),new mY(n,!0,!0,new We))),uG(oIn(n,(GYn(),Hpt)),21).Hc((r_n(),tpt)))for(i=(r=uG(oIn(n,(jYn(),nTt)),21)).Hc((eNn(),dRt)),c=oM(gK(oIn(n,tTt))),e=new Ww(n.b);e.a<e.c.c.length;)kS(JJ(new fX(null,new h3(uG(N3(e),30).a,16)),new Qe),new KB(r,i,c));t.Vg()}function RHn(n,t){var e,i,r,c,a;for(null==n.c||n.c.length<t.c.length?n.c=Inn(ZHt,B2n,28,t.c.length,16,1):AM(n.c),n.a=new Zm,i=0,a=new Ww(t);a.a<a.c.c.length;)(r=uG(N3(a),10)).p=i++;for(e=new lS,c=new Ww(t);c.a<c.c.c.length;)r=uG(N3(c),10),n.c[r.p]||(nNn(n,r),0==e.b||(MK(0!=e.b),uG(e.a.a.c,15)).gc()<n.a.c.length?aL(e,n.a):cL(e,n.a),n.a=new Zm);return e}function KHn(n){hP(n,new hCn(FT(DT(KT(RT(new bu,Cnt),"ELK SPOrE Overlap Removal"),'A node overlap removal algorithm proposed by Nachmanson et al. in "Node overlap removal by growing a tree".'),new Zo))),U4(n,Cnt,gnt,Jkn(ULt)),U4(n,Cnt,K3n,BLt),U4(n,Cnt,o4n,8),U4(n,Cnt,ynt,Jkn(HLt)),U4(n,Cnt,jnt,Jkn(FLt)),U4(n,Cnt,Ent,Jkn(_Lt)),U4(n,Cnt,q8n,(qx(),!1))}function FHn(n,t){var e,i,r,c,a,o,u;if((e=t.qi(n.a))&&null!=(u=mK(Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),fct)))){for(i=new Zm,a=0,o=(c=WGn(u,"\\w")).length;a<o;++a)m_(r=c[a],"##other")?kD(i,"!##"+jz(n,Hrn(t.qk()))):m_(r,"##local")?i.c.push(null):m_(r,sct)?kD(i,jz(n,Hrn(t.qk()))):mv(i.c,r);return i}return hZ(),hZ(),zot}function _Hn(n,t,e,i){var r,c,a,o,u,s,h,f;for(a=KR(t.c,e,i),h=new Ww(t.a);h.a<h.c.c.length;){for(JF((s=uG(N3(h),10)).n,a),f=new Ww(s.j);f.a<f.c.c.length;)for(c=new Ww(uG(N3(f),12).g);c.a<c.c.c.length;)for(Xun((r=uG(N3(c),18)).a,a),(o=uG(oIn(r,(jYn(),bMt)),75))&&Xun(o,a),u=new Ww(r.b);u.a<u.c.c.length;)JF(uG(N3(u),72).n,a);kD(n.a,s),s.a=n}}function BHn(n){var t,e,i,r,c;if(n.d)throw hv(new kM((vK(Rlt),v2n+Rlt.k+k2n)));for(n.c==(xdn(),ZDt)&&qWn(n,JDt),t=new Ww(n.a.a);t.a<t.c.c.length;)uG(N3(t),194).e=0;for(r=new Ww(n.a.b);r.a<r.c.c.length;)for((i=uG(N3(r),86)).o=T0n,e=i.f.Kc();e.Ob();)++uG(e.Pb(),86).d.e;for(sQn(n),c=new Ww(n.a.b);c.a<c.c.c.length;)uG(N3(c),86).k=!0;return n}function HHn(n,t){var e,i,r,c,a,o,u,s;for(o=new cAn(n),s8(e=new lS,t,e.c.b,e.c);0!=e.b;){for((i=uG(0==e.b?null:(MK(0!=e.b),Lrn(e,e.a.a)),113)).d.p=1,a=new Ww(i.e);a.a<a.c.c.length;)uCn(o,r=uG(N3(a),340)),0==(s=r.d).d.p&&s8(e,s,e.c.b,e.c);for(c=new Ww(i.b);c.a<c.c.c.length;)uCn(o,r=uG(N3(c),340)),0==(u=r.c).d.p&&s8(e,u,e.c.b,e.c)}return o}function UHn(n){var t,e,i,r,c;if(1!=(i=uM(pK(zDn(n,(XYn(),MDt))))))for(vN(n,i*n.g,i*n.f),e=EL(ZU((!n.c&&(n.c=new fV(wFt,n,9,9)),n.c),new Vu)),c=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[(!n.n&&(n.n=new fV(lFt,n,1,7)),n.n),(!n.c&&(n.c=new fV(wFt,n,9,9)),n.c),e])));hDn(c);)(r=uG(N9(c),422)).qh(i*r.nh(),i*r.oh()),r.ph(i*r.mh(),i*r.lh()),(t=uG(r.of(oDt),8))&&(t.a*=i,t.b*=i)}function GHn(n,t,e){var i,r,c,a,o;if(PP(),a=uG(t,69).xk(),EFn(n.e,t)){if(t.Si()&&aqn(n,t,e,F$(t,102)&&!!(uG(t,19).Bb&P0n)))return!1}else for(o=VKn(n.e.Dh(),t),i=uG(n.g,124),c=0;c<n.i;++c)if(r=i[c],o.am(r.Lk()))return!(a?udn(r,e):null==e?null==r.md():udn(e,r.md()))&&(uG(Uyn(n,c,a?uG(e,76):R5(t,e)),76),!0);return ttn(n,a?uG(e,76):R5(t,e))}function qHn(n,t,e,i,r){var c,a,o,u,s,h;for(c=new Ww(n.b);c.a<c.c.c.length;)for(s=0,h=(u=D4(uG(N3(c),30).a)).length;s<h;++s)switch(uG(oIn(o=u[s],(jYn(),gMt)),171).g){case 1:fFn(o),a2(o,t),Vyn(o,!0,i);break;case 3:HKn(o),a2(o,e),Vyn(o,!1,r)}for(a=new N4(n.b,0);a.b<a.d.gc();)0==(MK(a.b<a.d.gc()),uG(a.d.Xb(a.c=a.b++),30)).a.c.length&&LQ(a)}function XHn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(u=b=t.length,s3(0,t.length),45==t.charCodeAt(0)?(f=-1,l=1,--b):(f=1,l=0),r=b/(c=(pXn(),Uot)[10])|0,0!=(g=b%c)&&++r,o=Inn(YHt,W1n,28,r,15,1),e=Hot[8],a=0,w=l+(0==g?c:g),d=l;d<u;w=(d=w)+c)i=vUn((Knn(d,w,t.length),t.substr(d,w-d)),j1n,vZn),b_n(),s=tMn(o,o,a,e),s+=vmn(o,a,i),o[a++]=s;h=a,n.e=f,n.d=h,n.a=o,K4(n)}function zHn(n,t){var e,i,r;return e=new Xn,(i=1==(i=uG(l8(YJ(new fX(null,new h3(n.f,16)),e),gen(new W,new Q,new rn,new cn,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Out),Iut]))),21).gc())?1:0)<(r=1==(r=uG(l8(YJ(new fX(null,new h3(t.f,16)),e),gen(new W,new Q,new rn,new cn,Uhn(cT(Rut,1),p1n,108,0,[Out,Iut]))),21).gc())?1:0)?-1:i==r?0:1}function VHn(n){var t,e,i,r,c,a,o,u,s,h,f,l;for(r=oM(gK(oIn(o=n.i,(jYn(),sMt)))),h=0,i=0,s=new Ww(n.g);s.a<s.c.c.length;)c=(a=v9(u=uG(N3(s),18)))&&r&&oM(gK(oIn(u,hMt))),l=u.d.i,a&&c?++i:a&&!c?++h:HQ(l).e==o?++i:++h;for(e=new Ww(n.e);e.a<e.c.c.length;)c=(a=v9(t=uG(N3(e),18)))&&r&&oM(gK(oIn(t,hMt))),f=t.c.i,a&&c?++h:a&&!c?++i:HQ(f).e==o?++h:++i;return h-i}function WHn(n,t,e,i){this.e=n,this.k=uG(oIn(n,(GYn(),kmt)),312),this.g=Inn(pbt,e6n,10,t,0,1),this.b=Inn(fot,zZn,345,t,7,1),this.a=Inn(pbt,e6n,10,t,0,1),this.d=Inn(fot,zZn,345,t,7,1),this.j=Inn(pbt,e6n,10,t,0,1),this.i=Inn(fot,zZn,345,t,7,1),this.p=Inn(fot,zZn,345,t,7,1),this.n=Inn(cot,zZn,485,t,8,1),FP(this.n,(qx(),!1)),this.f=Inn(cot,zZn,485,t,8,1),FP(this.f,!0),this.o=e,this.c=i}function QHn(n,t){var e,i,r;if(!t.dc())if(uG(t.Xb(0),293).d==(vAn(),Udt))dEn(n,t);else for(i=t.Kc();i.Ob();){switch((e=uG(i.Pb(),293)).d.g){case 5:YOn(n,e,gpn(n,e));break;case 0:YOn(n,e,(r=(e.f-e.c+1-1)/2|0,e.c+r));break;case 4:YOn(n,e,Ain(n,e));break;case 2:fmn(e),YOn(n,e,dPn(e)?e.c:e.f);break;case 1:fmn(e),YOn(n,e,dPn(e)?e.f:e.c)}WCn(e.a)}}function JHn(n,t,e,i){var r,c,a;return a=new KE(t,e),n.a?i?(++(r=uG(nJ(uG(cQ(n.b,t),260)),260)).a,a.d=i.d,a.e=i.e,a.b=i,a.c=i,i.e?i.e.c=a:r.b=a,i.d?i.d.b=a:n.a=a,i.d=a,i.e=a):(uG(nJ(n.e),511).b=a,a.d=n.e,n.e=a,(r=uG(cQ(n.b,t),260))?(++r.a,(c=r.c).c=a,a.e=c,r.c=a):(vJ(n.b,t,r=new TZ(a)),++n.c)):(n.a=n.e=a,vJ(n.b,t,new TZ(a)),++n.c),++n.d,a}function YHn(n,t){var e,i,r,c;if(t.Ug("Network simplex",1),n.e.a.c.length<1)t.Vg();else{for(r=new Ww(n.e.a);r.a<r.c.c.length;)uG(N3(r),125).e=0;for((c=n.e.a.c.length>=40)&&IGn(n),rzn(n),mFn(n),e=ign(n),i=0;e&&i<n.f;)sUn(n,e,WDn(n,e)),e=ign(n),++i;c&&FPn(n),n.a?oxn(n,dHn(n)):dHn(n),n.b=null,n.d=null,n.p=null,n.c=null,n.g=null,n.i=null,n.n=null,n.o=null,t.Vg()}}function ZHn(n,t){var e,i,r,c,a;if(!t.e){for(t.e=!0,i=t.d.a.ec().Kc();i.Ob();)e=uG(i.Pb(),18),t.o&&t.d.a.gc()<=1?(a=new MO((c=t.a.c)+(t.a.c+t.a.b-c)/2,t.b),aq(uG(t.d.a.ec().Kc().Pb(),18).a,a)):(r=uG(cQ(t.c,e),468)).b||r.c?MHn(n,e,t):n.d==(kbn(),fEt)&&(r.d||r.e)&&I$n(n,t)&&t.d.a.gc()<=1?NWn(e,t):I_n(n,e,t);t.k&&z8(t.d,new je)}}function nUn(n,t,i,r,c,a){var o,u,s,h,f,l,b,w,d,g,p,m,v;for(u=(r+c)/2+a,g=i*e.Math.cos(u),p=i*e.Math.sin(u),m=g-t.g/2,v=p-t.f/2,ycn(t,m),Mcn(t,v),l=n.a.Eg(t),(d=2*e.Math.acos(i/i+n.c))<c-r?(b=d/l,o=(r+c-d)/2):(b=(c-r)/l,o=r),w=GFn(t),n.e&&(n.e.Fg(n.d),n.e.Gg(w)),h=new Ww(w);h.a<h.c.c.length;)s=uG(N3(h),27),f=n.a.Eg(s),nUn(n,s,i+n.c,o,o+b*f,a),o+=b*f}function tUn(n,t,e){var i;switch(i=e.q.getMonth(),t){case 5:JA(n,Uhn(cT($ot,1),zZn,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[i]);break;case 4:JA(n,Uhn(cT($ot,1),zZn,2,6,[x1n,R1n,K1n,F1n,_1n,B1n,H1n,U1n,G1n,q1n,X1n,z1n])[i]);break;case 3:JA(n,Uhn(cT($ot,1),zZn,2,6,["Jan","Feb","Mar","Apr",_1n,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[i]);break;default:Fen(n,i+1,t)}}function eUn(n,t,e,i){var r,c,a,o,u,s,h,f;for(YF(o=new MO(e,i),uG(oIn(t,(mon(),Vft)),8)),f=new Ww(t.e);f.a<f.c.c.length;)JF((h=uG(N3(f),153)).d,o),kD(n.e,h);for(a=new Ww(t.c);a.a<a.c.c.length;){for(r=new Ww((c=uG(N3(a),290)).a);r.a<r.c.c.length;)JF(uG(N3(r),250).d,o);kD(n.c,c)}for(s=new Ww(t.d);s.a<s.c.c.length;)JF((u=uG(N3(s),454)).d,o),kD(n.d,u)}function iUn(n,t){var e,i,r,c,a,o,u,s;for(u=new Ww(t.j);u.a<u.c.c.length;)for(r=new w7((o=uG(N3(u),12)).b);l$(r.a)||l$(r.b);)t!=(c=(e=(i=uG(l$(r.a)?N3(r.a):N3(r.b),18)).c==o?i.d:i.c).i)&&((s=uG(oIn(i,(jYn(),aTt)),17).a)<0&&(s=0),a=c.p,0==n.b[a]&&(i.d==e?(n.a[a]-=s+1,n.a[a]<=0&&n.c[a]>0&&aq(n.f,c)):(n.c[a]-=s+1,n.c[a]<=0&&n.a[a]>0&&aq(n.e,c))))}function rUn(n,t,e,i){var r,c,a,o,u,s,h;for(YF(u=new MO(e,i),uG(oIn(t,(OQn(),kPt)),8)),h=Fkn(t.b,0);h.b!=h.d.c;)JF((s=uG(I6(h),40)).e,u),aq(n.b,s);for(o=uG(l8(_0(new fX(null,new h3(t.a,16))),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15).Kc();o.Ob();){for(c=Fkn((a=uG(o.Pb(),65)).a,0);c.b!=c.d.c;)(r=uG(I6(c),8)).a+=u.a,r.b+=u.b;aq(n.a,a)}}function cUn(n,t){var e,i,r,c;if(0<(F$(n,16)?uG(n,16).gc():x5(n.Kc()))){if(1<(r=t)){for(--r,c=new Ea,i=n.Kc();i.Ob();)e=uG(i.Pb(),40),c=zcn(Uhn(cT(vat,1),EZn,20,0,[c,new Mp(e)]));return cUn(c,r)}if(r<0){for(c=new Sa,i=n.Kc();i.Ob();)e=uG(i.Pb(),40),c=zcn(Uhn(cT(vat,1),EZn,20,0,[c,new Mp(e)]));if(0<(F$(c,16)?uG(c,16).gc():x5(c.Kc())))return cUn(c,r)}}return uG(B$(n.Kc()),40)}function aUn(n,t,e){var i,r,c,a;for(e.Ug("Processor order nodes",2),n.b=uM(pK(oIn(t,(QGn(),ECt)))),n.a=uG(oIn(t,cCt),88),n.a==(xdn(),ZDt)&&(n.a=QDt,kfn(t,cCt,n.a)),r=new lS,a=Fkn(t.b,0);a.b!=a.d.c;)oM(gK(oIn(c=uG(I6(a),40),(OQn(),UPt))))&&s8(r,c,r.c.b,r.c);MK(0!=r.b),izn(n,i=uG(r.a.a.c,40)),e.fh(1),GBn(n,i,0-uM(pK(oIn(i,(OQn(),NPt))))/2,0),e.fh(1),e.Vg()}function oUn(){oUn=E,eKt=new FO("DEFAULT_MINIMUM_SIZE",0),rKt=new FO("MINIMUM_SIZE_ACCOUNTS_FOR_PADDING",1),tKt=new FO("COMPUTE_PADDING",2),cKt=new FO("OUTSIDE_NODE_LABELS_OVERHANG",3),aKt=new FO("PORTS_OVERHANG",4),uKt=new FO("UNIFORM_PORT_SPACING",5),oKt=new FO("SPACE_EFFICIENT_PORT_LABELS",6),iKt=new FO("FORCE_TABULAR_NODE_LABELS",7),nKt=new FO("ASYMMETRICAL",8)}function uUn(n,t){var e,i,r,c,a,o,u,s;if(t){if(e=(c=t.Dh())?Hrn(c).wi().si(c):null){for(Akn(n,t,e),u=0,s=(null==(r=t.Dh()).i&&eqn(r),r.i).length;u<s;++u)null==r.i&&eqn(r),i=r.i,(o=u>=0&&u<i.length?i[u]:null).rk()&&!o.sk()&&(F$(o,331)?$yn(n,uG(o,35),t,e):(a=uG(o,19)).Bb&Qtt&&XSn(n,a,t,e));t.Vh()&&uG(e,54).ei(uG(t,54)._h())}return e}return null}function sUn(n,t,e){var i,r,c;if(!t.f)throw hv(new vM("Given leave edge is no tree edge."));if(e.f)throw hv(new vM("Given enter edge is a tree edge already."));for(t.f=!1,Q$(n.p,t),e.f=!0,FV(n.p,e),i=e.e.e-e.d.e-e.a,ILn(n,e.e,t)||(i=-i),c=new Ww(n.e.a);c.a<c.c.c.length;)ILn(n,r=uG(N3(c),125),t)||(r.e+=i);n.j=1,AM(n.c),oNn(n,uG(N3(new Ww(n.e.a)),125)),MVn(n)}function hUn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b;if(Krn(n,t,e),c=t[e],b=i?(KQn(),_Rt):(KQn(),kRt),gD(t.length,e,i)){for(v7(n,r=t[i?e-1:e+1],i?(can(),Wjt):(can(),Vjt)),h=0,l=(u=c).length;h<l;++h)NMn(n,a=u[h],b);for(v7(n,c,i?(can(),Vjt):(can(),Wjt)),s=0,f=(o=r).length;s<f;++s)(a=o[s]).e||NMn(n,a,Gdn(b))}else for(s=0,f=(o=c).length;s<f;++s)NMn(n,a=o[s],b);return!1}function fUn(n,t,e,i,r){var c,a,o,u,s,h,f;for(hZ(),f$(n,new Uu),o=new N4(n,0),f=new Zm,c=0;o.b<o.d.gc();)MK(o.b<o.d.gc()),a=uG(o.d.Xb(o.c=o.b++),163),0!=f.c.length&&EX(a)*jX(a)>2*c?(h=new Jrn(f),s=EX(a)/jX(a),u=KJn(h,t,new Dk,e,i,r,s),JF(dL(h.e),u),f.c.length=0,c=0,mv(f.c,h),mv(f.c,a),c=EX(h)*jX(h)+EX(a)*jX(a)):(mv(f.c,a),c+=EX(a)*jX(a));return f}function lUn(n,t){var e,i,r,c,a,o;if((o=uG(oIn(t,(jYn(),JMt)),101))==($Pn(),aRt)||o==cRt)for(r=new MO(t.f.a+t.d.b+t.d.c,t.f.b+t.d.d+t.d.a).b,a=new Ww(n.a);a.a<a.c.c.length;)(c=uG(N3(a),10)).k==(zIn(),lbt)&&((e=uG(oIn(c,(GYn(),Fpt)),64))!=(KQn(),kRt)&&e!=_Rt||(i=uM(pK(oIn(c,bmt))),o==aRt&&(i*=r),c.n.b=i-uG(oIn(c,WMt),8).b,fhn(c,!1,!0)))}function bUn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w;if(!uN(n.e))return uG(HNn(n,t,e),76);if(t!=e&&(a=(b=(r=uG(n.g,124))[e]).Lk(),EFn(n.e,a))){for(w=VKn(n.e.Dh(),a),u=-1,o=-1,i=0,s=0,f=t>e?t:e;s<=f;++s)s==e?o=i++:(c=r[s],h=w.am(c.Lk()),s==t&&(u=s!=f||h?i:i-1),h&&++i);return l=uG(zdn(n,t,e),76),o!=u&&Yv(n,new wtn(n.e,7,a,xwn(o),b.md(),u)),l}return uG(zdn(n,t,e),76)}function wUn(n,t){var e,i,r,c,a,o;for(t.Ug("Port order processing",1),o=uG(oIn(n,(jYn(),iTt)),430),e=new Ww(n.b);e.a<e.c.c.length;)for(r=new Ww(uG(N3(e),30).a);r.a<r.c.c.length;)i=uG(N3(r),10),c=uG(oIn(i,JMt),101),a=i.j,c==($Pn(),rRt)||c==aRt||c==cRt?(hZ(),f$(a,Ywt)):c!=uRt&&c!=sRt&&(hZ(),f$(a,ndt),pMn(a),o==(nin(),qjt)&&f$(a,Zwt)),i.i=!0,qLn(i);t.Vg()}function dUn(n){var t,i,r,c,a,o,u,s;for(s=new Ym,t=new ak,o=n.Kc();o.Ob();)c=uG(o.Pb(),10),u=jx(KS(new sk,c),t),VAn(s.f,c,u);for(a=n.Kc();a.Ob();)for(r=new Fz(ix(Xgn(c=uG(a.Pb(),10)).a.Kc(),new h));hDn(r);)v9(i=uG(N9(r),18))||RKn(xS(DS($S(RS(new uk,e.Math.max(1,uG(oIn(i,(jYn(),oTt)),17).a)),1),uG(cQ(s,i.c.i),125)),uG(cQ(s,i.d.i),125)));return t}function gUn(){gUn=E,TSt=Aq(new wJ,(uIn(),Slt),(zYn(),cwt)),ESt=Aq(new wJ,Elt,swt),SSt=wz(Aq(new wJ,Elt,Twt),Plt,Mwt),MSt=wz(Aq(Aq(new wJ,Elt,Zbt),Slt,nwt),Plt,twt),PSt=Lvn(Lvn(gP(wz(Aq(new wJ,Tlt,Nwt),Plt,Lwt),Slt),Awt),$wt),jSt=wz(new wJ,Plt,awt),kSt=wz(Aq(Aq(Aq(new wJ,jlt,lwt),Slt,wwt),Slt,dwt),Plt,bwt),ySt=wz(Aq(Aq(new wJ,Slt,dwt),Slt,Vbt),Plt,zbt)}function pUn(n,t,e,i,r,c){var a,o,u,s,h,f;for(a=JIn(t,u=Kfn(t)-Kfn(n)),o=p$(0,0,0);u>=0&&(!fjn(n,a)||(u<22?o.l|=1<<u:u<44?o.m|=1<<u-22:o.h|=1<<u-44,0!=n.l||0!=n.m||0!=n.h));)s=a.m,h=a.h,f=a.l,a.h=h>>>1,a.m=s>>>1|(1&h)<<21,a.l=f>>>1|(1&s)<<21,--u;return e&&Yfn(o),c&&(i?(Qat=gfn(n),r&&(Qat=Thn(Qat,(tin(),Zat)))):Qat=p$(n.l,n.m,n.h)),o}function mUn(n,t){var e,i,r,c,a,o,u,s,h,f;for(s=n.e[t.c.p][t.p]+1,u=t.c.a.c.length+1,o=new Ww(n.a);o.a<o.c.c.length;){for(a=uG(N3(o),12),f=0,c=0,r=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[new zd(a),new Wd(a)])));hDn(r);)(i=uG(N9(r),12)).i.c==t.c&&(f+=cD(n,i.i)+1,++c);e=f/c,(h=a.j)==(KQn(),kRt)?n.f[a.p]=e<s?n.c-e:n.b+(u-e):h==_Rt&&(n.f[a.p]=e<s?n.b+e:n.c-(u-e))}}function vUn(n,t,e){var i,r,c,a;if(null==n)throw hv(new ZM(IZn));for(i=(c=n.length)>0&&(s3(0,n.length),45==n.charCodeAt(0)||(s3(0,n.length),43==n.charCodeAt(0)))?1:0;i<c;i++)if(-1==Cvn((s3(i,n.length),n.charCodeAt(i))))throw hv(new ZM(y0n+n+'"'));if(r=(a=parseInt(n,10))<t,isNaN(a))throw hv(new ZM(y0n+n+'"'));if(r||a>e)throw hv(new ZM(y0n+n+'"'));return a}function kUn(n){var t,i,r,c,a,o;for(a=new lS,c=new Ww(n.a);c.a<c.c.c.length;)Qb(r=uG(N3(c),118),r.f.c.length),Jb(r,r.k.c.length),0==r.i&&(r.o=0,s8(a,r,a.c.b,a.c));for(;0!=a.b;)for(i=(r=uG(0==a.b?null:(MK(0!=a.b),Lrn(a,a.a.a)),118)).o+1,t=new Ww(r.f);t.a<t.c.c.length;)Yb(o=uG(N3(t),132).a,e.Math.max(o.o,i)),Jb(o,o.i-1),0==o.i&&s8(a,o,a.c.b,a.c)}function yUn(n){var t,e,i,r,c,a,o,u;for(a=new Ww(n);a.a<a.c.c.length;){for(c=uG(N3(a),74),o=(i=lCn(uG(zrn((!c.b&&(c.b=new f_(cFt,c,4,7)),c.b),0),84))).i,u=i.j,MN(r=uG(zrn((!c.a&&(c.a=new fV(oFt,c,6,6)),c.a),0),166),r.j+o,r.k+u),yN(r,r.b+o,r.c+u),e=new DD((!r.a&&(r.a=new MD(eFt,r,5)),r.a));e.e!=e.i.gc();)mN(t=uG(Zkn(e),377),t.a+o,t.b+u);fun(uG(zDn(c,(XYn(),L$t)),75),o,u)}}function MUn(n){switch(n){case 100:return tZn(Wct,!0);case 68:return tZn(Wct,!1);case 119:return tZn(Qct,!0);case 87:return tZn(Qct,!1);case 115:return tZn(Jct,!0);case 83:return tZn(Jct,!1);case 99:return tZn(Yct,!0);case 67:return tZn(Yct,!1);case 105:return tZn(Zct,!0);case 73:return tZn(Zct,!1);default:throw hv(new Ky(Vct+n.toString(16)))}}function TUn(n){var t,i,r,c,a;switch(c=uG(zq(n.a,0),10),t=new gMn(n),kD(n.a,t),t.o.a=e.Math.max(1,c.o.a),t.o.b=e.Math.max(1,c.o.b),t.n.a=c.n.a,t.n.b=c.n.b,uG(oIn(c,(GYn(),Fpt)),64).g){case 4:t.n.a+=2;break;case 1:t.n.b+=2;break;case 2:t.n.a-=2;break;case 3:t.n.b-=2}return o2(r=new lOn,t),c2(i=new UZ,a=uG(zq(c.j,0),12)),u2(i,r),JF(dL(r.n),a.n),JF(dL(r.a),a.a),t}function jUn(n,t,e,i,r){e&&(!i||(n.c-n.b&n.a.length-1)>1)&&1==t&&uG(n.a[n.b],10).k==(zIn(),bbt)?Gqn(uG(n.a[n.b],10),(Ajn(),$xt)):i&&(!e||(n.c-n.b&n.a.length-1)>1)&&1==t&&uG(n.a[n.c-1&n.a.length-1],10).k==(zIn(),bbt)?Gqn(uG(n.a[n.c-1&n.a.length-1],10),(Ajn(),Dxt)):2==(n.c-n.b&n.a.length-1)?(Gqn(uG(Rfn(n),10),(Ajn(),$xt)),Gqn(uG(Rfn(n),10),Dxt)):Pxn(n,r),q5(n)}function EUn(n,t,i){var r,c,a,o,u;for(a=0,c=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));c.e!=c.i.gc();)o="",0==(!(r=uG(Zkn(c),27)).n&&(r.n=new fV(lFt,r,1,7)),r.n).i||(o=uG(zrn((!r.n&&(r.n=new fV(lFt,r,1,7)),r.n),0),135).a),zsn(u=new wln(a++,t,o),r),kfn(u,(OQn(),RPt),r),u.e.b=r.j+r.f/2,u.f.a=e.Math.max(r.g,1),u.e.a=r.i+r.g/2,u.f.b=e.Math.max(r.f,1),aq(t.b,u),VAn(i.f,r,u)}function SUn(n){var t,e,i,r,c;i=uG(oIn(n,(GYn(),rmt)),27),c=uG(zDn(i,(jYn(),DMt)),181).Hc((Qmn(),JRt)),n.e||(r=uG(oIn(n,Hpt),21),t=new MO(n.f.a+n.d.b+n.d.c,n.f.b+n.d.d+n.d.a),r.Hc((r_n(),tpt))?(Myn(i,JMt,($Pn(),cRt)),ZQn(i,t.a,t.b,!1,!0)):oM(gK(zDn(i,xMt)))||ZQn(i,t.a,t.b,!0,!0)),Myn(i,DMt,c?ggn(JRt):new nB(e=uG(Mj(sKt),9),uG(MF(e,e.length),9),0))}function PUn(n,t,e){var i,r,c,a;if(t[0]>=n.length)return e.o=0,!0;switch(VJ(n,t[0])){case 43:r=1;break;case 45:r=-1;break;default:return e.o=0,!0}if(++t[0],c=t[0],0==(a=RNn(n,t))&&t[0]==c)return!1;if(t[0]<n.length&&58==VJ(n,t[0])){if(i=60*a,++t[0],c=t[0],0==(a=RNn(n,t))&&t[0]==c)return!1;i+=a}else(i=a)<24&&t[0]-c<=2?i*=60:i=i%100+60*(i/100|0);return i*=r,e.o=-i,!0}function CUn(n){var t,e,i,r,c,a,o;for(r=new Zm,i=new Fz(ix(Xgn(n.b).a.Kc(),new h));hDn(i);)v9(e=uG(N9(i),18))&&kD(r,new m7(e,htn(n,e.c),htn(n,e.d)));for(o=new _w(new Fw(n.e).a.vc().Kc());o.a.Ob();)t=uG(o.a.Pb(),44),(c=uG(t.md(),113)).d.p=0;for(a=new _w(new Fw(n.e).a.vc().Kc());a.a.Ob();)t=uG(a.a.Pb(),44),0==(c=uG(t.md(),113)).d.p&&kD(n.d,HHn(n,c))}function IUn(n){var t,e,i,r,c;for(c=h0(n),r=new DD((!n.e&&(n.e=new f_(aFt,n,7,4)),n.e));r.e!=r.i.gc();)if(i=uG(Zkn(r),74),!Ern(lCn(uG(zrn((!i.c&&(i.c=new f_(cFt,i,5,8)),i.c),0),84)),c))return!0;for(e=new DD((!n.d&&(n.d=new f_(aFt,n,8,5)),n.d));e.e!=e.i.gc();)if(t=uG(Zkn(e),74),!Ern(lCn(uG(zrn((!t.b&&(t.b=new f_(cFt,t,4,7)),t.b),0),84)),c))return!0;return!1}function OUn(n,t){var e,i,r,c,a,o,u,s;for(c=new Ww(t.b);c.a<c.c.c.length;)for(u=new Ww(uG(N3(c),30).a);u.a<u.c.c.length;){for(o=uG(N3(u),10),s=new Zm,a=0,i=new Fz(ix(qgn(o).a.Kc(),new h));hDn(i);)v9(e=uG(N9(i),18))||!v9(e)&&e.c.i.c==e.d.i.c||((r=uG(oIn(e,(jYn(),uTt)),17).a)>a&&(a=r,s.c.length=0),r==a&&kD(s,new WO(e.c.i,e)));hZ(),f$(s,n.c),GX(n.b,o.p,s)}}function AUn(n,t){var e,i,r,c,a,o,u,s;for(c=new Ww(t.b);c.a<c.c.c.length;)for(u=new Ww(uG(N3(c),30).a);u.a<u.c.c.length;){for(o=uG(N3(u),10),s=new Zm,a=0,i=new Fz(ix(Xgn(o).a.Kc(),new h));hDn(i);)v9(e=uG(N9(i),18))||!v9(e)&&e.c.i.c==e.d.i.c||((r=uG(oIn(e,(jYn(),uTt)),17).a)>a&&(a=r,s.c.length=0),r==a&&kD(s,new WO(e.d.i,e)));hZ(),f$(s,n.c),GX(n.f,o.p,s)}}function LUn(n,t){var e,i,r,c,a,o,u;if(null==(u=gK(oIn(t,(QGn(),TCt))))||(tJ(u),u)){for(E$n(n,t),r=new Zm,o=Fkn(t.b,0);o.b!=o.d.c;)(e=yAn(n,uG(I6(o),40),null))&&(zsn(e,t),mv(r.c,e));if(n.a=null,n.b=null,r.c.length>1)for(i=new Ww(r);i.a<i.c.c.length;)for(c=0,a=Fkn((e=uG(N3(i),121)).b,0);a.b!=a.d.c;)uG(I6(a),40).g=c++;return r}return n7(Uhn(cT(nPt,1),U3n,121,0,[t]))}function NUn(n){var t,i,r,c,a,o,u,s;for(s=new Uk,u=null,i=uG(I6(t=Fkn(n,0)),8),c=uG(I6(t),8);t.b!=t.d.c;)u=i,i=c,c=uG(I6(t),8),a=Mrn(YF(new MO(u.a,u.b),i)),o=Mrn(YF(new MO(c.a,c.b),i)),r=10,r=e.Math.min(r,e.Math.abs(a.a+a.b)/2),r=e.Math.min(r,e.Math.abs(o.a+o.b)/2),a.a=gq(a.a)*r,a.b=gq(a.b)*r,o.a=gq(o.a)*r,o.b=gq(o.b)*r,aq(s,JF(a,i)),aq(s,JF(o,i));return s}function $Un(n,t,e){var i,r,c,a,o;e.Ug("Minimize Crossings "+n.a,1),i=0==t.b.c.length||!Qj(JJ(new fX(null,new h3(t.b,16)),new hd(new Ic))).Bd((vS(),Kut)),o=1==t.b.c.length&&1==uG(zq(t.b,0),30).a.c.length,c=xA(oIn(t,(jYn(),rMt)))===xA((Own(),Ixt)),i||o&&!c||(Bln(r=eFn(n,t),(a=uG(hyn(r,0),219)).c.kg()?a.c.eg()?new Jg(n):new Yg(n):new Qg(n)),Pwn(n)),e.Vg()}function DUn(n,t,e,i){var r,c,a,o,u;return a=n.Ph(),r=null,(u=n.Jh())?!t||PHn(n,t,e).Bb&P0n?u=null:(i=Nyn(u.El(),n,i),n.di(null),r=t.Qh()):(a&&(u=a.Qh()),t&&(r=t.Qh())),u!=r&&u&&u.Il(n),o=n.Fh(),n.Bh(t,e),u!=r&&r&&r.Hl(n),n.vh()&&n.wh()&&(a&&o>=0&&o!=e&&(c=new lV(n,1,o,a,null),i?i.nj(c):i=c),e>=0&&(c=new lV(n,1,e,o==e?a:null,t),i?i.nj(c):i=c)),i}function xUn(n){var t,e,i;if(null==n.b){if(i=new zM,null!=n.i&&(VA(i,n.i),i.a+=":"),256&n.f){for(256&n.f&&null!=n.a&&(aY(n.i)||(i.a+="//"),VA(i,n.a)),null!=n.d&&(i.a+="/",VA(i,n.d)),16&n.f&&(i.a+="/"),t=0,e=n.j.length;t<e;t++)0!=t&&(i.a+="/"),VA(i,n.j[t]);null!=n.g&&(i.a+="?",VA(i,n.g))}else VA(i,n.a);null!=n.e&&(i.a+="#",VA(i,n.e)),n.b=i.a}return n.b}function RUn(n,t){var e,i,r,c,a,o;for(r=new Ww(t.a);r.a<r.c.c.length;)F$(c=oIn(i=uG(N3(r),10),(GYn(),rmt)),12)&&(o=SGn(t,i,(a=uG(c,12)).o.a,a.o.b),a.n.a=o.a,a.n.b=o.b,NLn(a,uG(oIn(i,Fpt),64)));e=new MO(t.f.a+t.d.b+t.d.c,t.f.b+t.d.d+t.d.a),uG(oIn(t,(GYn(),Hpt)),21).Hc((r_n(),tpt))?(kfn(n,(jYn(),JMt),($Pn(),cRt)),uG(oIn(HQ(n),Hpt),21).Fc(rpt),AVn(n,e,!1)):AVn(n,e,!0)}function KUn(n,t,e,i,r){var c,a,o,u;Hb(c=new gMn(n),(zIn(),gbt)),kfn(c,(jYn(),JMt),($Pn(),cRt)),kfn(c,(GYn(),rmt),t.c.i),kfn(a=new lOn,rmt,t.c),NLn(a,r),o2(a,c),kfn(t.c,lmt,c),Hb(o=new gMn(n),gbt),kfn(o,JMt,cRt),kfn(o,rmt,t.d.i),kfn(u=new lOn,rmt,t.d),NLn(u,r),o2(u,o),kfn(t.d,lmt,o),c2(t,a),u2(t,u),o3(0,e.c.length),pC(e.c,0,c),mv(i.c,o),kfn(c,Opt,xwn(1)),kfn(o,Opt,xwn(1))}function FUn(n,t,e,i){var r,c,a,o;if(o=pz(Ngn(h1n,PJ(pz(Ngn(null==t?0:Hon(t),f1n)),15))),r=pz(Ngn(h1n,PJ(pz(Ngn(null==e?0:Hon(e),f1n)),15))),a=bun(n,t,o),c=lun(n,e,r),a&&r==a.a&&xQ(e,a.g))return e;if(c&&!i)throw hv(new vM("key already present: "+e));return a&&yRn(n,a),c&&yRn(n,c),HLn(n,new fJ(e,r,t,o),c),c&&(c.e=null,c.c=null),a&&(a.e=null,a.c=null),SEn(n),a?a.g:null}function _Un(n,t,e){var i,r,c,a,o;for(c=0;c<t;c++){for(i=0,o=c+1;o<t;o++)i=Lgn(Lgn(Ngn(E3(n[c],L0n),E3(n[o],L0n)),E3(e[c+o],L0n)),E3(pz(i),L0n)),e[c+o]=pz(i),i=Dz(i,32);e[c+t]=pz(i)}for(wun(e,e,t<<1),i=0,r=0,a=0;r<t;++r,a++)i=Lgn(Lgn(Ngn(E3(n[r],L0n),E3(n[r],L0n)),E3(e[a],L0n)),E3(pz(i),L0n)),e[a]=pz(i),i=Lgn(i=Dz(i,32),E3(e[++a],L0n)),e[a]=pz(i),i=Dz(i,32);return e}function BUn(n,t,i){var r,c,a,o,u,s,h,f;if(!P6(t)){for(s=uM(pK(Omn(i.c,(jYn(),ITt)))),!(h=uG(Omn(i.c,CTt),140))&&(h=new Nk),r=i.a,c=null,u=t.Kc();u.Ob();)o=uG(u.Pb(),12),f=0,c?(f=s,f+=c.o.b):f=h.d,a=jx(KS(new sk,o),n.f),vJ(n.k,o,a),RKn(xS(DS($S(RS(new uk,0),t0(e.Math.ceil(f))),r),a)),c=o,r=a;RKn(xS(DS($S(RS(new uk,0),t0(e.Math.ceil(h.a+c.o.b))),r),i.d))}}function HUn(n,t,e,i,r,c,a,o){var u,s,h;return h=!1,s=c-e.s,u=e.t-t.f+uXn(e,s,!1).a,!(i.g+o>s)&&(u+o+uXn(i,s,!1).a<=t.b&&(dtn(e,c-e.s),e.c=!0,dtn(i,c-e.s),oMn(i,e.s,e.t+e.d+o),i.k=!0,Gun(e.q,i),h=!0,r&&(fan(t,i),i.j=t,n.c.length>a&&(uEn((u3(a,n.c.length),uG(n.c[a],186)),i),0==(u3(a,n.c.length),uG(n.c[a],186)).a.c.length&&i7(n,a)))),h)}function UUn(n,t){var e,i,r,c,a;if(t.Ug("Partition midprocessing",1),r=new K1,kS(JJ(new fX(null,new h3(n.a,16)),new di),new kg(r)),0!=r.d){for(a=uG(l8(f3(new fX(null,(r.i||(r.i=new RD(r,r.c))).Nc())),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),e=uG((i=a.Kc()).Pb(),17);i.Ob();)c=uG(i.Pb(),17),RRn(uG(Y9(r,e),21),uG(Y9(r,c),21)),e=c;t.Vg()}}function GUn(n,t,e){var i,r,c,a,o;if(0==t.p){for(t.p=1,(r=e)||(r=new WO(new Zm,new nB(i=uG(Mj(YRt),9),uG(MF(i,i.length),9),0))),uG(r.a,15).Fc(t),t.k==(zIn(),lbt)&&uG(r.b,21).Fc(uG(oIn(t,(GYn(),Fpt)),64)),a=new Ww(t.j);a.a<a.c.c.length;)for(c=uG(N3(a),12),o=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[new zd(c),new Wd(c)])));hDn(o);)GUn(n,uG(N9(o),12).i,r);return r}return null}function qUn(n,t){var e,i,r,c,a;if(n.Ab)if(n.Ab){if((a=n.Ab.i)>0)if(r=uG(n.Ab.g,2033),null==t){for(c=0;c<a;++c)if(null==(e=r[c]).d)return e}else for(c=0;c<a;++c)if(m_(t,(e=r[c]).d))return e}else if(null==t){for(i=new DD(n.Ab);i.e!=i.i.gc();)if(null==(e=uG(Zkn(i),598)).d)return e}else for(i=new DD(n.Ab);i.e!=i.i.gc();)if(m_(t,(e=uG(Zkn(i),598)).d))return e;return null}function XUn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b,w,d,g,p;fon(b=w5(n,Qhn(t),r),k6(r,Iet)),d=m6(w=r,Let),GIn(new Zp(b).a,d),g=m6(w,"endPoint"),UIn(new im(b).a,g),p=p6(w,Met),fPn(new am(b).a,p),f=k6(r,jet),t_((c=new nA(n,b)).a,c.b,f),l=k6(r,Tet),e_((a=new tA(n,b)).a,a.b,l),s=p6(r,Set),Tjn((o=new eA(e,b)).b,o.a,s),h=p6(r,Eet),jjn((u=new iA(i,b)).b,u.a,h)}function zUn(n,t,e){var i,r,c,a,o;switch(o=null,t.g){case 1:for(r=new Ww(n.j);r.a<r.c.c.length;)if(oM(gK(oIn(i=uG(N3(r),12),(GYn(),Gpt)))))return i;kfn(o=new lOn,(GYn(),Gpt),(qx(),!0));break;case 2:for(a=new Ww(n.j);a.a<a.c.c.length;)if(oM(gK(oIn(c=uG(N3(a),12),(GYn(),hmt)))))return c;kfn(o=new lOn,(GYn(),hmt),(qx(),!0))}return o&&(o2(o,n),NLn(o,e),rMn(o.n,n.o,e)),o}function VUn(n,t){var i,r,c,a,o,u;for(u=-1,o=new lS,r=new w7(n.b);l$(r.a)||l$(r.b);){for(i=uG(l$(r.a)?N3(r.a):N3(r.b),18),u=e.Math.max(u,uM(pK(oIn(i,(jYn(),tMt))))),i.c==n?kS(JJ(new fX(null,new h3(i.b,16)),new fe),new cg(o)):kS(JJ(new fX(null,new h3(i.b,16)),new le),new ag(o)),a=Fkn(o,0);a.b!=a.d.c;)vR(c=uG(I6(a),72),(GYn(),Dpt))||kfn(c,Dpt,i);Ohn(t,o),BY(o)}return u}function WUn(n,t,i,r,c){var a,o,u,s,h;u=c?r.b:r.a,cS(n.a,r)||(h=u>i.s&&u<i.c,s=!1,0!=i.e.b&&0!=i.j.b&&(s|=e.Math.abs(u-uM(pK(gR(i.e))))<t4n&&e.Math.abs(u-uM(pK(gR(i.j))))<t4n,s|=e.Math.abs(u-uM(pK(pR(i.e))))<t4n&&e.Math.abs(u-uM(pK(pR(i.j))))<t4n),(h||s)&&((o=uG(oIn(t,(jYn(),bMt)),75))||(o=new Uk,kfn(t,bMt,o)),s8(o,a=new eN(r),o.c.b,o.c),FV(n.a,a)))}function QUn(n,t,e,i){var r,c,a,o,u,s,h;if(FNn(n,t,e,i))return!0;for(a=new Ww(t.f);a.a<a.c.c.length;){switch(c=uG(N3(a),334),o=!1,s=(u=n.j-t.j+e)+t.o,r=(h=n.k-t.k+i)+t.p,c.a.g){case 0:o=Gln(n,u+c.b.a,0,u+c.c.a,h-1);break;case 1:o=Gln(n,s,h+c.b.a,n.o-1,h+c.c.a);break;case 2:o=Gln(n,u+c.b.a,r,u+c.c.a,n.p-1);break;default:o=Gln(n,0,h+c.b.a,u-1,h+c.c.a)}if(o)return!0}return!1}function JUn(n,t,e){var i,r,c,a,o,u,s,h,f;for(e.Ug("Processor set coordinates",1),n.a=0==t.b.b?1:t.b.b,s=null,i=Fkn(t.b,0);!s&&i.b!=i.d.c;)oM(gK(oIn(f=uG(I6(i),40),(OQn(),UPt))))&&(s=f,(u=f.e).a=uG(oIn(f,GPt),17).a,u.b=uG(oIn(f,qPt),17).a);o=Lhn(s),h=1;do{h=(o=$In((r=o,e.eh(h),r))).b/n.a|0}while(0!=o.b);for(a=Fkn(t.b,0);a.b!=a.d.c;)YF((c=uG(I6(a),40)).e,new MO(c.f.a/2,c.f.b/2));e.Vg()}function YUn(n,t,e){var i,r,c,a,o,u,s,h;for(e.Ug(X9n,1),$V(n.b),$V(n.a),o=null,c=Fkn(t.b,0);!o&&c.b!=c.d.c;)oM(gK(oIn(s=uG(I6(c),40),(OQn(),UPt))))&&(o=s);for(s8(u=new lS,o,u.c.b,u.c),_Qn(n,u),h=Fkn(t.b,0);h.b!=h.d.c;)a=mK(oIn(s=uG(I6(h),40),(OQn(),OPt))),r=null!=U1(n.b,a)?uG(U1(n.b,a),17).a:0,kfn(s,EPt,xwn(r)),i=1+(null!=U1(n.a,a)?uG(U1(n.a,a),17).a:0),kfn(s,TPt,xwn(i));e.Vg()}function ZUn(n){hP(n,new hCn(FT(DT(KT(RT(new bu,qnt),"ELK Box"),"Algorithm for packing of unconnected boxes, i.e. graphs without edges."),new Ru))),U4(n,qnt,K3n,qNt),U4(n,qnt,o4n,15),U4(n,qnt,a4n,xwn(0)),U4(n,qnt,Xnt,Jkn(FNt)),U4(n,qnt,p4n,Jkn(BNt)),U4(n,qnt,g4n,Jkn(UNt)),U4(n,qnt,R3n,Gnt),U4(n,qnt,f4n,Jkn(_Nt)),U4(n,qnt,x4n,Jkn(HNt)),U4(n,qnt,znt,Jkn(RNt)),U4(n,qnt,r9n,Jkn(KNt))}function nGn(n,t){var e,i,r,c,a,o,u,s,h;if(a=(r=n.i).o.a,c=r.o.b,a<=0&&c<=0)return KQn(),FRt;switch(s=n.n.a,h=n.n.b,o=n.o.a,e=n.o.b,t.g){case 2:case 1:if(s<0)return KQn(),_Rt;if(s+o>a)return KQn(),kRt;break;case 4:case 3:if(h<0)return KQn(),yRt;if(h+e>c)return KQn(),KRt}return(u=(s+o/2)/a)+(i=(h+e/2)/c)<=1&&u-i<=0?(KQn(),_Rt):u+i>=1&&u-i>=0?(KQn(),kRt):i<.5?(KQn(),yRt):(KQn(),KRt)}function tGn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b;for(e=!1,u=uM(pK(oIn(t,(jYn(),ETt)))),l=T1n*u,r=new Ww(t.b);r.a<r.c.c.length;)for(i=uG(N3(r),30),c=uG(N3(o=new Ww(i.a)),10),s=uV(n.a[c.p]);o.a<o.c.c.length;)a=uG(N3(o),10),s!=(h=uV(n.a[a.p]))&&(f=y$(n.b,c,a),c.n.b+c.o.b+c.d.a+s.a+f>a.n.b-a.d.d+h.a+l&&(b=s.g+h.g,h.a=(h.g*h.a+s.g*s.a)/b,h.g=b,s.f=h,e=!0)),c=a,s=h;return e}function eGn(n,t,e,i,r,c,a){var o,u,s,h,f;for(f=new cN,u=t.Kc();u.Ob();)for(h=new Ww(uG(u.Pb(),853).Rf());h.a<h.c.c.length;)xA((s=uG(N3(h),187)).of((XYn(),m$t)))===xA((Zrn(),cxt))&&(aHn(f,s,!1,i,r,c,a),bAn(n,f));for(o=e.Kc();o.Ob();)for(h=new Ww(uG(o.Pb(),853).Rf());h.a<h.c.c.length;)xA((s=uG(N3(h),187)).of((XYn(),m$t)))===xA((Zrn(),rxt))&&(aHn(f,s,!0,i,r,c,a),bAn(n,f))}function iGn(n,t,e){var i,r,c,a,o,u,s;for(a=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));a.e!=a.i.gc();)for(r=new Fz(ix(eRn(c=uG(Zkn(a),27)).a.Kc(),new h));hDn(r);)z$n(i=uG(N9(r),74))||z$n(i)||BNn(i)||(u=uG(DA(FX(e.f,c)),40),s=uG(cQ(e,lCn(uG(zrn((!i.c&&(i.c=new f_(cFt,i,5,8)),i.c),0),84))),40),u&&s&&(kfn(o=new uZ(u,s),(OQn(),RPt),i),zsn(o,i),aq(u.d,o),aq(s.b,o),aq(t.a,o)))}function rGn(n,t){var i,r,c,a,o,u,s;for(u=uG(uG(Y9(n.r,t),21),87).Kc();u.Ob();)(r=(o=uG(u.Pb(),117)).c?iq(o.c):0)>0?o.a?r>(s=o.b.Mf().b)&&(n.v||1==o.c.d.c.length?(a=(r-s)/2,o.d.d=a,o.d.a=a):(i=(uG(zq(o.c.d,0),187).Mf().b-s)/2,o.d.d=e.Math.max(0,i),o.d.a=r-i-s)):o.d.a=n.t+r:cV(n.u)&&((c=ECn(o.b)).d<0&&(o.d.d=-c.d),c.d+c.a>o.b.Mf().b&&(o.d.a=c.d+c.a-o.b.Mf().b))}function cGn(){cGn=E,$ft=new _N((XYn(),vDt),xwn(1)),_ft=new _N(DDt,80),Fft=new _N(CDt,5),kft=new _N(c$t,r4n),Dft=new _N(kDt,xwn(1)),Kft=new _N(TDt,(qx(),!0)),Aft=new CN(50),Oft=new _N(W$t,Aft),Mft=O$t,Lft=sDt,yft=new _N(p$t,!1),Ift=V$t,Pft=H$t,Cft=q$t,Sft=_$t,Eft=K$t,Nft=bDt,oOn(),jft=sft,Bft=wft,Tft=uft,xft=fft,Rft=bft,Gft=HDt,Xft=XDt,Uft=BDt,Hft=_Dt,Iwn(),new _N(UDt,qft=fKt)}function aGn(n,t){var e;switch(Min(n)){case 6:return RA(t);case 7:return FA(t);case 8:return KA(t);case 3:return Array.isArray(t)&&!((e=Min(t))>=14&&e<=16);case 11:return null!=t&&typeof t===mZn;case 12:return null!=t&&(typeof t===wZn||typeof t==mZn);case 0:return Eyn(t,n.__elementTypeId$);case 2:return NV(t)&&!(t.Tm===j);case 1:return NV(t)&&!(t.Tm===j)||Eyn(t,n.__elementTypeId$);default:return!0}}function oGn(n,t){var i,r,c,a;return r=e.Math.min(e.Math.abs(n.c-(t.c+t.b)),e.Math.abs(n.c+n.b-t.c)),a=e.Math.min(e.Math.abs(n.d-(t.d+t.a)),e.Math.abs(n.d+n.a-t.d)),(i=e.Math.abs(n.c+n.b/2-(t.c+t.b/2)))>n.b/2+t.b/2||(c=e.Math.abs(n.d+n.a/2-(t.d+t.a/2)))>n.a/2+t.a/2?1:0==i&&0==c?0:0==i?a/c+1:0==c?r/i+1:e.Math.min(r/i,a/c)+1}function uGn(n,t){var e,i,r,c,a,o,u;for(c=0,o=0,u=0,r=new Ww(n.f.e);r.a<r.c.c.length;)t!=(i=uG(N3(r),153))&&(c+=a=n.i[t.a][i.a],(e=atn(t.d,i.d))>0&&n.d!=(Jen(),plt)&&(o+=a*(i.d.a+n.a[t.a][i.a]*(t.d.a-i.d.a)/e)),e>0&&n.d!=(Jen(),dlt)&&(u+=a*(i.d.b+n.a[t.a][i.a]*(t.d.b-i.d.b)/e)));switch(n.d.g){case 1:return new MO(o/c,t.d.b);case 2:return new MO(t.d.a,u/c);default:return new MO(o/c,u/c)}}function sGn(n){var t,e,i,r,c;for(kD(c=new R7((!n.a&&(n.a=new MD(eFt,n,5)),n.a).i+2),new MO(n.j,n.k)),kS(new fX(null,(!n.a&&(n.a=new MD(eFt,n,5)),new h3(n.a,16))),new Vp(c)),kD(c,new MO(n.b,n.c)),t=1;t<c.c.length-1;)u3(t-1,c.c.length),e=uG(c.c[t-1],8),u3(t,c.c.length),i=uG(c.c[t],8),u3(t+1,c.c.length),r=uG(c.c[t+1],8),e.a==i.a&&i.a==r.a||e.b==i.b&&i.b==r.b?i7(c,t):++t;return c}function hGn(n,t){var e,i,r,c;if(Cln(),c=uG(oIn(n.i,(jYn(),JMt)),101),0!=n.j.g-t.j.g||c!=($Pn(),rRt)&&c!=aRt&&c!=cRt)return 0;if(c==($Pn(),rRt)&&(e=uG(oIn(n,YMt),17),i=uG(oIn(t,YMt),17),e&&i&&0!=(r=e.a-i.a)))return r;switch(n.j.g){case 1:return ugn(n.n.a,t.n.a);case 2:return ugn(n.n.b,t.n.b);case 3:return ugn(t.n.a,n.n.a);case 4:return ugn(t.n.b,n.n.b);default:throw hv(new kM(n6n))}}function fGn(n,t){var e,i,r,c,a,o,u;for(e=Tx(NS(AS(LS(new lk,t),new qZ(t.e)),cdt),n.a),0==t.j.c.length||een(uG(zq(t.j,0),60).a,e),u=new nv,vJ(n.e,e,u),a=new ek,o=new ek,c=new Ww(t.k);c.a<c.c.c.length;)FV(a,(r=uG(N3(c),18)).c),FV(o,r.d);(i=a.a.gc()-o.a.gc())<0?(hfn(u,!0,(xdn(),JDt)),hfn(u,!1,YDt)):i>0&&(hfn(u,!1,(xdn(),JDt)),hfn(u,!0,YDt)),Prn(t.g,new UC(n,e)),vJ(n.g,t,e)}function lGn(){var n;for(lGn=E,pot=Uhn(cT(YHt,1),W1n,28,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]),mot=Inn(YHt,W1n,28,37,15,1),vot=Uhn(cT(YHt,1),W1n,28,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]),kot=Inn(nUt,E0n,28,37,14,1),n=2;n<=36;n++)mot[n]=t0(e.Math.pow(n,pot[n])),kot[n]=bSn(YZn,mot[n])}function bGn(n){var t;if(1!=(!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i)throw hv(new vM(Ptt+(!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i));return t=new Uk,Shn(uG(zrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84))&&Qon(t,pYn(n,Shn(uG(zrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84)),!1)),Shn(uG(zrn((!n.c&&(n.c=new f_(cFt,n,5,8)),n.c),0),84))&&Qon(t,pYn(n,Shn(uG(zrn((!n.c&&(n.c=new f_(cFt,n,5,8)),n.c),0),84)),!0)),t}function wGn(n,t){var e,i,r;for(r=!1,i=new Fz(ix((t.d?n.a.c==(b0(),fSt)?qgn(t.b):Xgn(t.b):n.a.c==(b0(),hSt)?qgn(t.b):Xgn(t.b)).a.Kc(),new h));hDn(i);)if(e=uG(N9(i),18),(oM(n.a.f[n.a.g[t.b.p].p])||v9(e)||e.c.i.c!=e.d.i.c)&&!oM(n.a.n[n.a.g[t.b.p].p])&&!oM(n.a.n[n.a.g[t.b.p].p])&&(r=!0,cS(n.b,n.a.g[vTn(e,t.b).p])))return t.c=!0,t.a=e,t;return t.c=r,t.a=null,t}function dGn(n,t,e){var i,r,c,a,o,u,s;if(0==(i=e.gc()))return!1;if(n.Pj())if(u=n.Qj(),nmn(n,t,e),a=1==i?n.Ij(3,null,e.Kc().Pb(),t,u):n.Ij(5,null,e,t,u),n.Mj()){for(o=i<100?null:new cj(i),c=t+i,r=t;r<c;++r)s=n.xj(r),o=n.Nj(s,o);o?(o.nj(a),o.oj()):n.Jj(a)}else n.Jj(a);else if(nmn(n,t,e),n.Mj()){for(o=i<100?null:new cj(i),c=t+i,r=t;r<c;++r)o=n.Nj(n.xj(r),o);o&&o.oj()}return!0}function gGn(n,t,e){var i,r,c,a;return n.Pj()?(r=null,c=n.Qj(),i=n.Ij(1,a=n.Dj(t,n.Zi(t,e)),e,t,c),n.Mj()&&!(n.Yi()&&a?udn(a,e):xA(a)===xA(e))?(a&&(r=n.Oj(a,r)),(r=n.Nj(e,r))?(r.nj(i),r.oj()):n.Jj(i)):r?(r.nj(i),r.oj()):n.Jj(i),a):(a=n.Dj(t,n.Zi(t,e)),n.Mj()&&!(n.Yi()&&a?udn(a,e):xA(a)===xA(e))&&(r=null,a&&(r=n.Oj(a,null)),(r=n.Nj(e,r))&&r.oj()),a)}function pGn(n,t){var i,r,c,a,o,u,s,h;if(n.e=t,n.f=uG(oIn(t,(mon(),Qft)),234),LCn(t),n.d=e.Math.max(16*t.e.c.length+t.c.c.length,256),!oM(gK(oIn(t,(cGn(),Mft)))))for(h=n.e.e.c.length,u=new Ww(t.e);u.a<u.c.c.length;)(s=uG(N3(u),153).d).a=BX(n.f)*h,s.b=BX(n.f)*h;for(i=t.b,a=new Ww(t.c);a.a<a.c.c.length;)if(c=uG(N3(a),290),(r=uG(oIn(c,Rft),17).a)>0){for(o=0;o<r;o++)kD(i,new $W(c));CNn(c)}}function mGn(n,t,e,i){var r,c,a,o,u,s,h,f,l;if(f=new QW(n.Zg()),nrn(t,Bet,f),e&&!n.Xg().a.dc())for(nrn(t,"logs",s=new Ib),o=0,l=new Gw(n.Xg().b.Kc());l.b.Ob();)h=new QW(mK(l.b.Pb())),uin(s,o),W5(s,o,h),++o;if(i&&nrn(t,"executionTime",new Pb(n.Wg())),!n.Yg().a.dc())for(a=new Ib,nrn(t,pet,a),o=0,c=new Gw(n.Yg().b.Kc());c.b.Ob();)r=uG(c.b.Pb(),871),u=new _y,uin(a,o),W5(a,o,u),mGn(r,u,e,i),++o}function vGn(){vGn=E,SP(),qHt=new Df,Uhn(cT(Y_t,2),zZn,381,0,[Uhn(cT(Y_t,1),uat,600,0,[new dE(Act)])]),Uhn(cT(Y_t,2),zZn,381,0,[Uhn(cT(Y_t,1),uat,600,0,[new dE(Lct)])]),Uhn(cT(Y_t,2),zZn,381,0,[Uhn(cT(Y_t,1),uat,600,0,[new dE(Nct)]),Uhn(cT(Y_t,1),uat,600,0,[new dE(Lct)])]),new PN("-1"),Uhn(cT(Y_t,2),zZn,381,0,[Uhn(cT(Y_t,1),uat,600,0,[new dE("\\c+")])]),new PN("0"),new PN("0"),new PN("1"),new PN("0"),new PN(Uct)}function kGn(n,t){var e,i,r,c,a,o,u,s;for(t.Ug("Hypernodes processing",1),i=new Ww(n.b);i.a<i.c.c.length;)for(a=new Ww(uG(N3(i),30).a);a.a<a.c.c.length;)if(oM(gK(oIn(c=uG(N3(a),10),(jYn(),uMt))))&&c.j.c.length<=2){for(s=0,u=0,e=0,r=0,o=new Ww(c.j);o.a<o.c.c.length;)switch(uG(N3(o),12).j.g){case 1:++s;break;case 2:++u;break;case 3:++e;break;case 4:++r}0==s&&0==e&&NJn(n,c,r<=u)}t.Vg()}function yGn(n,t,e,i,r){var c,a,o,u,s,h,f;for(a=new Ww(t);a.a<a.c.c.length;){if(u=(c=uG(N3(a),18)).c,e.a._b(u))l0(),s=USt;else{if(!i.a._b(u))throw hv(new vM("Source port must be in one of the port sets."));l0(),s=GSt}if(h=c.d,e.a._b(h))l0(),f=USt;else{if(!i.a._b(h))throw hv(new vM("Target port must be in one of the port sets."));l0(),f=GSt}o=new UAn(c,s,f),vJ(n.b,c,o),mv(r.c,o)}}function MGn(n){var t,e;return n.c&&n.c.Vh()&&(e=uG(n.c,54),n.c=uG(mwn(n,e),142),n.c!=e&&(4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,9,2,e,n.c)),F$(n.Cb,411)?n.Db>>16==-15&&n.Cb.Yh()&&Cen(new btn(n.Cb,9,13,e,n.c,Hyn(Aen(uG(n.Cb,62)),n))):F$(n.Cb,90)&&n.Db>>16==-23&&n.Cb.Yh()&&(F$(t=n.c,90)||(YYn(),t=x_t),F$(e,90)||(YYn(),e=x_t),Cen(new btn(n.Cb,9,10,e,t,Hyn(z5(uG(n.Cb,29)),n)))))),n.c}function TGn(n,t,e){var i,r,c,a,o,u,s,h;for(e.Ug("Hyperedge merging",1),CDn(n,t),o=new N4(t.b,0);o.b<o.d.gc();)if(MK(o.b<o.d.gc()),0!=(s=uG(o.d.Xb(o.c=o.b++),30).a).c.length)for(i=null,r=null,c=null,a=null,u=0;u<s.c.length;u++)u3(u,s.c.length),(r=(i=uG(s.c[u],10)).k)==(zIn(),wbt)&&a==wbt&&(h=jXn(i,c)).a&&(QFn(i,c,h.b,h.c),u3(u,s.c.length),nE(s.c,u,1),--u,i=c,r=a),c=i,a=r;e.Vg()}function jGn(n,t,e){var i,r,c,a,o,u,s;if(t==e)return!0;if(t=uDn(n,t),e=uDn(n,e),i=PMn(t)){if((u=PMn(e))!=i)return!!u&&(a=i.mk())==u.mk()&&null!=a;if(!t.d&&(t.d=new MD(g_t,t,1)),r=(c=t.d).i,!e.d&&(e.d=new MD(g_t,e,1)),r==(s=e.d).i)for(o=0;o<r;++o)if(!jGn(n,uG(zrn(c,o),89),uG(zrn(s,o),89)))return!1;return!0}return t.e==e.e}function EGn(n,t,e,i){var r,c,a,o,u,s,h,f;if(EFn(n.e,t)){for(f=VKn(n.e.Dh(),t),c=uG(n.g,124),h=null,u=-1,o=-1,r=0,s=0;s<n.i;++s)a=c[s],f.am(a.Lk())&&(r==e&&(u=s),r==i&&(o=s,h=a.md()),++r);if(-1==u)throw hv(new dM(zet+e+Vet+r));if(-1==o)throw hv(new dM(Wet+i+Vet+r));return zdn(n,u,o),uN(n.e)&&Yv(n,VZ(n,7,t,xwn(i),h,e,!0)),h}throw hv(new vM("The feature must be many-valued to support move"))}function SGn(n,t,e,i){var r,c,a,o,u;switch((u=new eN(t.n)).a+=t.o.a/2,u.b+=t.o.b/2,o=uM(pK(oIn(t,(jYn(),QMt)))),c=n.f,a=n.d,r=n.c,uG(oIn(t,(GYn(),Fpt)),64).g){case 1:u.a+=a.b+r.a-e/2,u.b=-i-o,t.n.b=-(a.d+o+r.b);break;case 2:u.a=c.a+a.b+a.c+o,u.b+=a.d+r.b-i/2,t.n.a=c.a+a.c+o-r.a;break;case 3:u.a+=a.b+r.a-e/2,u.b=c.b+a.d+a.a+o,t.n.b=c.b+a.a+o-r.b;break;case 4:u.a=-e-o,u.b+=a.d+r.b-i/2,t.n.a=-(a.b+o+r.a)}return u}function PGn(n){var t,e,i,r,c,a;return zsn(i=new Dan,n),xA(oIn(i,(jYn(),Byt)))===xA((xdn(),ZDt))&&kfn(i,Byt,pgn(i)),null==oIn(i,(K7(),jNt))&&(a=uG(mIn(n),167),kfn(i,jNt,XA(a.of(jNt)))),kfn(i,(GYn(),rmt),n),kfn(i,Hpt,new nB(t=uG(Mj(bpt),9),uG(MF(t,t.length),9),0)),r=QWn((R0(n)&&(vP(),new Vy(R0(n))),vP(),new Wx(R0(n)?new Vy(R0(n)):null,n)),YDt),c=uG(oIn(i,_Mt),107),p0(e=i.d,c),p0(e,r),i}function CGn(n,t,e){var i,r;i=t.c.i,r=e.d.i,i.k==(zIn(),wbt)?(kfn(n,(GYn(),Zpt),uG(oIn(i,Zpt),12)),kfn(n,nmt,uG(oIn(i,nmt),12)),kfn(n,Ypt,gK(oIn(i,Ypt)))):i.k==bbt?(kfn(n,(GYn(),Zpt),uG(oIn(i,Zpt),12)),kfn(n,nmt,uG(oIn(i,nmt),12)),kfn(n,Ypt,(qx(),!0))):r.k==bbt?(kfn(n,(GYn(),Zpt),uG(oIn(r,Zpt),12)),kfn(n,nmt,uG(oIn(r,nmt),12)),kfn(n,Ypt,(qx(),!0))):(kfn(n,(GYn(),Zpt),t.c),kfn(n,nmt,e.d))}function IGn(n){var t,e,i,r,c,a,o;for(n.o=new ND,i=new lS,a=new Ww(n.e.a);a.a<a.c.c.length;)1==Ebn(c=uG(N3(a),125)).c.length&&s8(i,c,i.c.b,i.c);for(;0!=i.b;)0!=Ebn(c=uG(0==i.b?null:(MK(0!=i.b),Lrn(i,i.a.a)),125)).c.length&&(t=uG(zq(Ebn(c),0),218),e=c.g.a.c.length>0,o=hpn(t,c),Px(e?o.b:o.g,t),1==Ebn(o).c.length&&s8(i,o,i.c.b,i.c),r=new WO(c,t),A6(n.o,r),men(n.e.a,c))}function OGn(n,t){var i,r,c,a;return r=e.Math.abs(AV(n.b).a-AV(t.b).a),a=e.Math.abs(AV(n.b).b-AV(t.b).b),i=1,c=1,r>n.b.b/2+t.b.b/2&&(i=1-e.Math.min(e.Math.abs(n.b.c-(t.b.c+t.b.b)),e.Math.abs(n.b.c+n.b.b-t.b.c))/r),a>n.b.a/2+t.b.a/2&&(c=1-e.Math.min(e.Math.abs(n.b.d-(t.b.d+t.b.a)),e.Math.abs(n.b.d+n.b.a-t.b.d))/a),(1-e.Math.min(i,c))*e.Math.sqrt(r*r+a*a)}function AGn(n){var t,e,i;for(wQn(n,n.e,n.f,(l0(),USt),!0,n.c,n.i),wQn(n,n.e,n.f,USt,!1,n.c,n.i),wQn(n,n.e,n.f,GSt,!0,n.c,n.i),wQn(n,n.e,n.f,GSt,!1,n.c,n.i),yGn(n,n.c,n.e,n.f,n.i),e=new N4(n.i,0);e.b<e.d.gc();)for(MK(e.b<e.d.gc()),t=uG(e.d.Xb(e.c=e.b++),131),i=new N4(n.i,e.b);i.b<i.d.gc();)MK(i.b<i.d.gc()),nVn(t,uG(i.d.Xb(i.c=i.b++),131));XJn(n.i,uG(oIn(n.d,(GYn(),dmt)),234)),aWn(n.i)}function LGn(n,t){var e,i;if(null!=t)if(i=_Tn(n)){if(!(1&i.i))return TP(),!(e=uG(cQ(_Ft,i),57))||e.fk(t);if(i==ZHt)return KA(t);if(i==YHt)return F$(t,17);if(i==iUt)return F$(t,161);if(i==tUt)return F$(t,222);if(i==JHt)return F$(t,180);if(i==eUt)return FA(t);if(i==rUt)return F$(t,191);if(i==nUt)return F$(t,168)}else if(F$(t,58))return n.dl(uG(t,58));return!1}function NGn(){var n,t,e,i,r,c,a,o,u;for(NGn=E,dHt=Inn(tUt,ret,28,255,15,1),gHt=Inn(JHt,N1n,28,64,15,1),t=0;t<255;t++)dHt[t]=-1;for(e=90;e>=65;e--)dHt[e]=e-65<<24>>24;for(i=122;i>=97;i--)dHt[i]=i-97+26<<24>>24;for(r=57;r>=48;r--)dHt[r]=r-48+52<<24>>24;for(dHt[43]=62,dHt[47]=63,c=0;c<=25;c++)gHt[c]=65+c&D1n;for(a=26,u=0;a<=51;++a,u++)gHt[a]=97+u&D1n;for(n=52,o=0;n<=61;++n,o++)gHt[n]=48+o&D1n;gHt[62]=43,gHt[63]=47}function $Gn(n,t){var i,r,c,a,o,u;return(c=nun(n))==(u=nun(t))?n.e==t.e&&n.a<54&&t.a<54?n.f<t.f?-1:n.f>t.f?1:0:(r=n.e-t.e,(i=(n.d>0?n.d:e.Math.floor((n.a-1)*A0n)+1)-(t.d>0?t.d:e.Math.floor((t.a-1)*A0n)+1))>r+1?c:i<r-1?-c:(!n.c&&(n.c=j2(Bsn(n.f))),a=n.c,!t.c&&(t.c=j2(Bsn(t.f))),o=t.c,r<0?a=j5(a,_qn(-r)):r>0&&(o=j5(o,_qn(r))),Pvn(a,o))):c<u?-1:1}function DGn(n,t,e){var i,r,c,a,o,u,s,h;for(e.Ug(W3n,1),n.vf(t),c=0;n.xf(c)&&!e.$g();){for(n.wf(),h=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[t.e,t.d,t.b])));hDn(h);)for(u=uG(N9(h),309),o=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[t.e,t.d,t.b])));hDn(o);)(a=uG(N9(o),309))!=u&&(r=n.uf(a,u))&&JF(u.c,r);for(s=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[t.e,t.d,t.b])));hDn(s);)DOn(i=(u=uG(N9(s),309)).c,-n.d,-n.d,n.d,n.d),JF(u.d,i),i.a=0,i.b=0;++c}e.Vg()}function xGn(n,t){var i,r,c,a,o,u,s,h,f,l,b;if(n.dc())return new sj;for(s=0,f=0,r=n.Kc();r.Ob();)c=uG(r.Pb(),36).f,s=e.Math.max(s,c.a),f+=c.a*c.b;for(s=e.Math.max(s,e.Math.sqrt(f)*uM(pK(oIn(uG(n.Kc().Pb(),36),(jYn(),dyt))))),l=0,b=0,u=0,i=t,o=n.Kc();o.Ob();)l+(h=(a=uG(o.Pb(),36)).f).a>s&&(l=0,b+=u+t,u=0),tHn(a,l,b),i=e.Math.max(i,l+h.a),u=e.Math.max(u,h.b),l+=h.a+t;return new MO(i+t,b+u+t)}function RGn(n,t){var e,i,r,c,a,o,u;if(!h0(n))throw hv(new kM(Stt));if(c=(i=h0(n)).g,r=i.f,c<=0&&r<=0)return KQn(),FRt;switch(o=n.i,u=n.j,t.g){case 2:case 1:if(o<0)return KQn(),_Rt;if(o+n.g>c)return KQn(),kRt;break;case 4:case 3:if(u<0)return KQn(),yRt;if(u+n.f>r)return KQn(),KRt}return(a=(o+n.g/2)/c)+(e=(u+n.f/2)/r)<=1&&a-e<=0?(KQn(),_Rt):a+e>=1&&a-e>=0?(KQn(),kRt):e<.5?(KQn(),yRt):(KQn(),KRt)}function KGn(n,t,e,i,r){var c,a;if(c=Lgn(E3(t[0],L0n),E3(i[0],L0n)),n[0]=pz(c),c=$z(c,32),e>=r){for(a=1;a<r;a++)c=Lgn(c,Lgn(E3(t[a],L0n),E3(i[a],L0n))),n[a]=pz(c),c=$z(c,32);for(;a<e;a++)c=Lgn(c,E3(t[a],L0n)),n[a]=pz(c),c=$z(c,32)}else{for(a=1;a<e;a++)c=Lgn(c,Lgn(E3(t[a],L0n),E3(i[a],L0n))),n[a]=pz(c),c=$z(c,32);for(;a<r;a++)c=Lgn(c,E3(i[a],L0n)),n[a]=pz(c),c=$z(c,32)}0!=dwn(c,0)&&(n[a]=pz(c))}function FGn(n){var t,e,i,r,c,a;if(QYn(),4!=n.e&&5!=n.e)throw hv(new vM("Token#complementRanges(): must be RANGE: "+n.e));for(pxn(c=n),szn(c),i=c.b.length+2,0==c.b[0]&&(i-=2),(e=c.b[c.b.length-1])==zct&&(i-=2),(r=new K3(4)).b=Inn(YHt,W1n,28,i,15,1),a=0,c.b[0]>0&&(r.b[a++]=0,r.b[a++]=c.b[0]-1),t=1;t<c.b.length-2;t+=2)r.b[a++]=c.b[t]+1,r.b[a++]=c.b[t+1]-1;return e!=zct&&(r.b[a++]=e+1,r.b[a]=zct),r.a=!0,r}function _Gn(n,t){var e,i,r,c,a,o,u,s,h;for(t.Ug("Layer constraint edge reversal",1),a=new Ww(n.b);a.a<a.c.c.length;){for(c=uG(N3(a),30),h=-1,e=new Zm,s=D4(c.a),r=0;r<s.length;r++)i=uG(oIn(s[r],(GYn(),Xpt)),311),-1==h?i!=(Zen(),ppt)&&(h=r):i==(Zen(),ppt)&&(a2(s[r],null),$jn(s[r],h++,c)),i==(Zen(),dpt)&&mv(e.c,s[r]);for(u=new Ww(e);u.a<u.c.c.length;)a2(o=uG(N3(u),10),null),a2(o,c)}t.Vg()}function BGn(n,t,e){var i,r,c,a,o,u,s,h;if(0==(i=e.gc()))return!1;if(n.Pj())if(s=n.Qj(),PCn(n,t,e),a=1==i?n.Ij(3,null,e.Kc().Pb(),t,s):n.Ij(5,null,e,t,s),n.Mj()){for(o=i<100?null:new cj(i),c=t+i,r=t;r<c;++r)h=n.g[r],o=n.Nj(h,o),o=n.Uj(h,o);o?(o.nj(a),o.oj()):n.Jj(a)}else n.Jj(a);else if(PCn(n,t,e),n.Mj()){for(o=i<100?null:new cj(i),c=t+i,r=t;r<c;++r)u=n.g[r],o=n.Nj(u,o);o&&o.oj()}return!0}function HGn(n,t){var e,i,r,c,a,o,u,s;for(t.Ug("Hierarchical port dummy size processing",1),o=new Zm,s=new Zm,e=2*uM(pK(oIn(n,(jYn(),gTt)))),r=new Ww(n.b);r.a<r.c.c.length;){for(i=uG(N3(r),30),o.c.length=0,s.c.length=0,a=new Ww(i.a);a.a<a.c.c.length;)(c=uG(N3(a),10)).k==(zIn(),lbt)&&((u=uG(oIn(c,(GYn(),Fpt)),64))==(KQn(),yRt)?mv(o.c,c):u==KRt&&mv(s.c,c));x$n(o,!0,e),x$n(s,!1,e)}t.Vg()}function UGn(n,t,e,i){var r,c,a,o,u;for(a=new Ww(n.k);a.a<a.c.c.length;)r=uG(N3(a),132),i&&r.c!=(_7(),$St)||(u=r.b).g<0&&r.d>0&&(Qb(u,u.d-r.d),r.c==(_7(),$St)&&Vb(u,u.a-r.d),u.d<=0&&u.i>0&&s8(t,u,t.c.b,t.c));for(c=new Ww(n.f);c.a<c.c.c.length;)r=uG(N3(c),132),i&&r.c!=(_7(),$St)||(o=r.a).g<0&&r.d>0&&(Jb(o,o.i-r.d),r.c==(_7(),$St)&&Wb(o,o.b-r.d),o.i<=0&&o.d>0&&s8(e,o,e.c.b,e.c))}function GGn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b;for(hZ(),f$(n,new Bu),a=oG(n),b=new Zm,l=new Zm,o=null,u=0;0!=a.b;)c=uG(0==a.b?null:(MK(0!=a.b),Lrn(a,a.a.a)),163),!o||EX(o)*jX(o)/2<EX(c)*jX(c)?(o=c,mv(b.c,c)):(u+=EX(c)*jX(c),mv(l.c,c),l.c.length>1&&(u>EX(o)*jX(o)/2||0==a.b)&&(f=new Jrn(l),h=EX(o)/jX(o),s=KJn(f,t,new Dk,e,i,r,h),JF(dL(f.e),s),o=f,mv(b.c,f),u=0,l.c.length=0));return Ohn(b,l),b}function qGn(n,t,e,i,r){var c,a,o,u,s,h,f;if(bS(),aW(n,"src"),aW(e,"dest"),f=Tbn(n),u=Tbn(e),yG(!!(4&f.i),"srcType is not an array"),yG(!!(4&u.i),"destType is not an array"),h=f.c,a=u.c,yG(1&h.i?h==a:!(1&a.i),"Array types don't match"),$fn(n,t,e,i,r),1&h.i||f==u)b$n(n,t,e,i,r,!0);else if(s=Kcn(n),c=Kcn(e),xA(n)===xA(e)&&t<i)for(t+=r,o=i+r;o-- >i;)uQ(c,o,s[--t]);else for(o=i+r;i<o;)uQ(c,i++,s[t++])}function XGn(n,t){var e,i,r,c,a,o,u,s,h;t.Ug("Box layout",2),r=sM(pK(zDn(n,(lIn(),zNt)))),c=uG(zDn(n,GNt),107),e=oM(gK(zDn(n,FNt))),i=oM(gK(zDn(n,_Nt))),0===uG(zDn(n,RNt),320).g?(h=new Z_((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a)),hZ(),f$(h,new qp(i)),a=h,o=xAn(n),(null==(u=pK(zDn(n,xNt)))||(tJ(u),u<=0))&&(u=1.3),ZQn(n,(s=sJn(a,r,c,o.a,o.b,e,(tJ(u),u))).a,s.b,!1,!0)):Kzn(n,r,c,e),t.Vg()}function zGn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b;for(f=iPn(n,e),o=0;o<t;o++){for(pF(r,e),l=new Zm,MK(i.b<i.d.gc()),b=uG(i.d.Xb(i.c=i.b++),418),s=f+o;s<n.b;s++)a=b,MK(i.b<i.d.gc()),kD(l,new pFn(a,b=uG(i.d.Xb(i.c=i.b++),418),e));for(h=f+o;h<n.b;h++)MK(i.b>0),i.a.Xb(i.c=--i.b),h>f+o&&LQ(i);for(c=new Ww(l);c.a<c.c.c.length;)pF(i,uG(N3(c),418));if(o<t-1)for(u=f+o;u<n.b;u++)MK(i.b>0),i.a.Xb(i.c=--i.b)}}function VGn(){var n,t,e,i,r,c;if(QYn(),WHt)return WHt;for(TXn(n=new K3(4),kJn(iat,!0)),lWn(n,kJn("M",!0)),lWn(n,kJn("C",!0)),c=new K3(4),i=0;i<11;i++)HFn(c,i,i);return TXn(t=new K3(4),kJn("M",!0)),HFn(t,4448,4607),HFn(t,65438,65439),kzn(r=new QN(2),n),kzn(r,OHt),(e=new QN(2)).Jm(CX(c,kJn("L",!0))),e.Jm(t),e=new n8(3,e),e=new eW(r,e),WHt=e}function WGn(n,t){var e,i,r,c,a,o,u,s;for(e=new RegExp(t,"g"),u=Inn($ot,zZn,2,0,6,1),i=0,s=n,c=null;;){if(null==(o=e.exec(s))||""==s){u[i]=s;break}a=o.index,u[i]=(Knn(0,a,s.length),s.substr(0,a)),s=r1(s,a+o[0].length,s.length),e.lastIndex=0,c==s&&(u[i]=(Knn(0,1,s.length),s.substr(0,1)),s3(1,s.length+1),s=s.substr(1)),c=s,++i}if(n.length>0){for(r=u.length;r>0&&""==u[r-1];)--r;r<u.length&&(u.length=r)}return u}function QGn(){QGn=E,mCt=new CN(20),pCt=new _N((XYn(),W$t),mCt),ECt=new _N(DDt,20),jCt=new _N(IDt,3),eCt=new _N(c$t,r4n),yCt=new _N(vDt,xwn(1)),TCt=new _N(TDt,(qx(),!0)),rCt=w$t,xdn(),cCt=new _N(d$t,aCt=ZDt),sCt=O$t,hCt=A$t,lCt=_$t,bCt=H$t,wCt=U$t,dCt=q$t,fCt=K$t,gCt=V$t,vCt=bDt,eDn(),LCt=nCt,MCt=JPt,CCt=HDt,OCt=XDt,PCt=BDt,SCt=_Dt,Iwn(),new _N(UDt,ICt=fKt),kCt=QPt,uCt=VPt,ACt=ZPt,iCt=XPt,oCt=zPt}function JGn(n){var t,e;if(!hsn(t=mK(zDn(n,(XYn(),e$t))),n)&&!vnn(n,yDt)&&(0!=(!n.a&&(n.a=new fV(bFt,n,10,11)),n.a).i||oM(gK(zDn(n,C$t))))){if(null!=t&&0!=KAn(t).length)throw XWn(n,e=JA(JA(new lx("Layout algorithm '"),t),"' not found for ")),hv(new jM(e.a));if(!hsn(S0n,n))throw XWn(n,e=JA(JA(new lx("Unable to load default layout algorithm "),S0n)," for unconfigured node ")),hv(new jM(e.a))}}function YGn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w;if(i=n.i,t=n.n,0==n.b)for(w=i.c+t.b,b=i.b-t.b-t.c,s=0,f=(o=n.a).length;s<f;++s)qX(c=o[s],w,b);else r=LMn(n,!1),qX(n.a[0],i.c+t.b,r[0]),qX(n.a[2],i.c+i.b-t.c-r[2],r[2]),l=i.b-t.b-t.c,r[0]>0&&(l-=r[0]+n.c,r[0]+=n.c),r[2]>0&&(l-=r[2]+n.c),r[1]=e.Math.max(r[1],l),qX(n.a[1],i.c+t.b+r[0]-(r[1]-l)/2,r[1]);for(u=0,h=(a=n.a).length;u<h;++u)F$(c=a[u],336)&&uG(c,336).lf()}function ZGn(n){var t,e,i,r,c,a,o,u,s,h,f;for((f=new ra).d=0,a=new Ww(n.b);a.a<a.c.c.length;)c=uG(N3(a),30),f.d+=c.a.c.length;for(i=0,r=0,f.a=Inn(YHt,W1n,28,n.b.c.length,15,1),s=0,h=0,f.e=Inn(YHt,W1n,28,f.d,15,1),e=new Ww(n.b);e.a<e.c.c.length;)for((t=uG(N3(e),30)).p=i++,f.a[t.p]=r++,h=0,u=new Ww(t.a);u.a<u.c.c.length;)(o=uG(N3(u),10)).p=s++,f.e[o.p]=h++;return f.c=new gp(f),f.b=iR(f.d),OUn(f,n),f.f=iR(f.d),AUn(f,n),f}function nqn(n,t){var i,r,c;for(c=uG(zq(n.n,n.n.c.length-1),209).d,n.p=e.Math.min(n.p,t.g),n.r=e.Math.max(n.r,c),n.g=e.Math.max(n.g,t.g+(1==n.b.c.length?0:n.i)),n.o=e.Math.min(n.o,t.f),n.e+=t.f+(1==n.b.c.length?0:n.i),n.f=e.Math.max(n.f,t.f),r=n.n.c.length>0?(n.n.c.length-1)*n.i:0,i=new Ww(n.n);i.a<i.c.c.length;)r+=uG(N3(i),209).a;n.d=r,n.a=n.e/n.b.c.length-n.i*((n.b.c.length-1)/n.b.c.length),ijn(n.j)}function tqn(n,t){var e,i,r,c,a,o,u,s,h;if(null==(s=gK(oIn(t,(cGn(),Kft))))||(tJ(s),s)){for(h=Inn(ZHt,B2n,28,t.e.c.length,16,1),a=d$n(t),r=new lS,u=new Ww(t.e);u.a<u.c.c.length;)(e=Gxn(n,uG(N3(u),153),null,null,h,a))&&(zsn(e,t),s8(r,e,r.c.b,r.c));if(r.b>1)for(i=Fkn(r,0);i.b!=i.d.c;)for(c=0,o=new Ww((e=uG(I6(i),235)).e);o.a<o.c.c.length;)uG(N3(o),153).a=c++;return r}return n7(Uhn(cT(mft,1),U3n,235,0,[t]))}function eqn(n){var t,e,i,r,c;if(!n.g){if(c=new ys,null==(t=V_t).a.zc(n,t)){for(e=new DD(n1(n));e.e!=e.i.gc();)CW(c,eqn(uG(Zkn(e),29)));t.a.Bc(n),t.a.gc()}for(i=c.i,!n.s&&(n.s=new fV(o_t,n,21,17)),r=new DD(n.s);r.e!=r.i.gc();++i)hw(uG(Zkn(r),462),i);CW(c,(!n.s&&(n.s=new fV(o_t,n,21,17)),n.s)),lbn(c),n.g=new Afn(n,c),n.i=uG(c.g,254),null==n.i&&(n.i=Q_t),n.p=null,y9(n).b&=-5}return n.g}function iqn(n,t){var e,i,r,c,a,o,u,s,h;if((e=t.qi(n.a))&&null!=(u=mK(Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),"memberTypes")))){for(s=new Zm,a=0,o=(c=WGn(u,"\\w")).length;a<o;++a)F$(h=-1==(i=(r=c[a]).lastIndexOf("#"))?hK(n,t.jk(),r):0==i?gtn(n,null,(s3(1,r.length+1),r.substr(1))):gtn(n,(Knn(0,i,r.length),r.substr(0,i)),(s3(i+1,r.length+1),r.substr(i+1))),156)&&kD(s,uG(h,156));return s}return hZ(),hZ(),zot}function rqn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w;if(r=n.i,i=n.n,0==n.b)t=AMn(n,!1),XX(n.a[0],r.d+i.d,t[0]),XX(n.a[2],r.d+r.a-i.a-t[2],t[2]),l=r.a-i.d-i.a,t[0]>0&&(t[0]+=n.c,l-=t[0]),t[2]>0&&(l-=t[2]+n.c),t[1]=e.Math.max(t[1],l),XX(n.a[1],r.d+i.d+t[0]-(t[1]-l)/2,t[1]);else for(w=r.d+i.d,b=r.a-i.d-i.a,s=0,f=(o=n.a).length;s<f;++s)XX(c=o[s],w,b);for(u=0,h=(a=n.a).length;u<h;++u)F$(c=a[u],336)&&uG(c,336).mf()}function cqn(n){var t,e,i,r,c,a,o,u,s;for(s=Inn(YHt,W1n,28,n.b.c.length+1,15,1),u=new ek,i=0,c=new Ww(n.b);c.a<c.c.c.length;){for(r=uG(N3(c),30),s[i++]=u.a.gc(),o=new Ww(r.a);o.a<o.c.c.length;)for(e=new Fz(ix(Xgn(uG(N3(o),10)).a.Kc(),new h));hDn(e);)t=uG(N9(e),18),u.a.zc(t,u);for(a=new Ww(r.a);a.a<a.c.c.length;)for(e=new Fz(ix(qgn(uG(N3(a),10)).a.Kc(),new h));hDn(e);)t=uG(N9(e),18),u.a.Bc(t)}return s}function aqn(n,t,e,i){var r,c,a,o,u;if(u=VKn(n.e.Dh(),t),r=uG(n.g,124),PP(),uG(t,69).xk()){for(a=0;a<n.i;++a)if(c=r[a],u.am(c.Lk())&&udn(c,e))return!0}else if(null!=e){for(o=0;o<n.i;++o)if(c=r[o],u.am(c.Lk())&&udn(e,c.md()))return!0;if(i)for(a=0;a<n.i;++a)if(c=r[a],u.am(c.Lk())&&xA(e)===xA(fK(n,uG(c.md(),58))))return!0}else for(a=0;a<n.i;++a)if(c=r[a],u.am(c.Lk())&&null==c.md())return!1;return!1}function oqn(n,t){var e,i,r,c,a,o;if((e=t.qi(n.a))&&null!=(o=mK(Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),_et))))switch(r=ax(o,$Cn(35)),i=t.qk(),-1==r?(a=jz(n,Hrn(i)),c=o):0==r?(a=null,s3(1,o.length+1),c=o.substr(1)):(Knn(0,r,o.length),a=o.substr(0,r),s3(r+1,o.length+1),c=o.substr(r+1)),sJ(Nen(n,t))){case 2:case 3:return Xfn(n,i,a,c);case 0:case 4:case 5:case 6:return zfn(n,i,a,c)}return null}function uqn(n,t,i,r){var c,a,o,u;for(u=i,o=new Ww(t.a);o.a<o.c.c.length;){if(a=uG(N3(o),225),c=uG(a.b,68),Fgn(n.b.c,c.b.c+c.b.b)<=0&&Fgn(c.b.c,n.b.c+n.b.b)<=0&&Fgn(n.b.d,c.b.d+c.b.a)<=0&&Fgn(c.b.d,n.b.d+n.b.a)<=0){if(0==Fgn(c.b.c,n.b.c+n.b.b)&&r.a<0||0==Fgn(c.b.c+c.b.b,n.b.c)&&r.a>0||0==Fgn(c.b.d,n.b.d+n.b.a)&&r.b<0||0==Fgn(c.b.d+c.b.a,n.b.d)&&r.b>0){u=0;break}}else u=e.Math.min(u,LLn(n,c,r));u=e.Math.min(u,uqn(n,a,u,r))}return u}function sqn(n,t){var e,i,r,c,a,o;if(n.b<2)throw hv(new vM("The vector chain must contain at least a source and a target point."));for(MK(0!=n.b),MN(t,(i=uG(n.a.a.c,8)).a,i.b),o=new Zx((!t.a&&(t.a=new MD(eFt,t,5)),t.a)),c=Fkn(n,1);c.a<n.b-1;)a=uG(I6(c),8),o.e!=o.i.gc()?e=uG(Zkn(o),377):(gj(),Smn(o,e=new ns)),mN(e,a.a,a.b);for(;o.e!=o.i.gc();)Zkn(o),$Sn(o);MK(0!=n.b),yN(t,(r=uG(n.c.b.c,8)).a,r.b)}function hqn(n,t,e,i){var r,c,a,o,u,s;if(s=VKn(n.e.Dh(),t),a=uG(n.g,124),EFn(n.e,t)){if(t.Si()&&(c=Dqn(n,t,i,F$(t,102)&&!!(uG(t,19).Bb&P0n)))>=0&&c!=e)throw hv(new vM(Xet));for(r=0,u=0;u<n.i;++u)if(o=a[u],s.am(o.Lk())){if(r==e)return uG(Uyn(n,u,(PP(),uG(t,69).xk()?uG(i,76):R5(t,i))),76);++r}throw hv(new dM(Hit+e+Vet+r))}for(u=0;u<n.i;++u)if(o=a[u],s.am(o.Lk()))return PP(),uG(t,69).xk()?o:o.md();return null}function fqn(n,t){var e,i,r,c,a,o,u,s;for(e=0,i=new Ww((u3(0,n.c.length),uG(n.c[0],105)).g.b.j);i.a<i.c.c.length;)uG(N3(i),12).p=e++;for(t==(KQn(),yRt)?f$(n,new nc):f$(n,new tc),a=0,s=n.c.length-1;a<s;)u3(a,n.c.length),c=uG(n.c[a],105),u3(s,n.c.length),u=uG(n.c[s],105),r=t==yRt?c.c:c.a,o=t==yRt?u.a:u.c,hV(c,t,(qhn(),sdt),r),hV(u,t,udt,o),++a,--s;a==s&&hV((u3(a,n.c.length),uG(n.c[a],105)),t,(qhn(),odt),null)}function lqn(n,t,e,i){var r,c,a,o,u,s;for(a=new SVn(n,t,e),u=new N4(i,0),r=!1;u.b<u.d.gc();)MK(u.b<u.d.gc()),(o=uG(u.d.Xb(u.c=u.b++),239))==t||o==e?LQ(u):!r&&uM(oD(o.g,o.d[0]).a)>uM(oD(a.g,a.d[0]).a)?(MK(u.b>0),u.a.Xb(u.c=--u.b),pF(u,a),r=!0):o.e&&o.e.gc()>0&&(c=(!o.e&&(o.e=new Zm),o.e).Mc(t),s=(!o.e&&(o.e=new Zm),o.e).Mc(e),(c||s)&&((!o.e&&(o.e=new Zm),o.e).Fc(a),++a.c));r||mv(i.c,a)}function bqn(n,t,e){var i,r,c,a,o,u,s,h,f,l;return h=n.a.i+n.a.g/2,f=n.a.i+n.a.g/2,a=new MO(t.i+t.g/2,t.j+t.f/2),(u=uG(zDn(t,(XYn(),mDt)),8)).a=u.a+h,u.b=u.b+f,r=(a.b-u.b)/(a.a-u.a),i=a.b-r*a.a,o=new MO(e.i+e.g/2,e.j+e.f/2),(s=uG(zDn(e,mDt),8)).a=s.a+h,s.b=s.b+f,c=(o.b-s.b)/(o.a-s.a),l=(i-(o.b-c*o.a))/(c-r),!(u.a<l&&a.a<l||l<u.a&&l<a.a||s.a<l&&o.a<l||l<s.a&&l<o.a)}function wqn(n,t){var e,i,r,c,a,o;if(!(a=uG(cQ(n.c,t),190)))throw hv(new SM("Edge did not exist in input."));return i=jvn(a),!pE((!t.a&&(t.a=new fV(oFt,t,6,6)),t.a))&&(e=new DU(n,i,o=new Ib),NA((!t.a&&(t.a=new fV(oFt,t,6,6)),t.a),e),nrn(a,yet,o)),vnn(t,(XYn(),L$t))&&!(!(r=uG(zDn(t,L$t),75))||FQ(r))&&(z8(r,new gm(c=new Ib)),nrn(a,"junctionPoints",c)),ZG(a,"container",s0(t).k),null}function dqn(n,t,e,i){var r,c,a,o,u,s;if(!P6(t)){if((s=e.eh((F$(t,16)?uG(t,16).gc():x5(t.Kc()))/n.a|0)).Ug(V9n,1),u=new Ga,o=0,i==(xdn(),JDt)||i==YDt)for(a=t.Kc();a.Ob();)r=uG(a.Pb(),40),u=zcn(Uhn(cT(vat,1),EZn,20,0,[u,new Mp(r)])),o<r.f.a&&(o=r.f.a);else for(a=t.Kc();a.Ob();)r=uG(a.Pb(),40),u=zcn(Uhn(cT(vat,1),EZn,20,0,[u,new Mp(r)])),o<r.f.b&&(o=r.f.b);for(c=t.Kc();c.Ob();)kfn(r=uG(c.Pb(),40),(OQn(),NPt),o);s.Vg(),dqn(n,u,e,i)}}function gqn(n,t,e){var i,r,c,a,o,u;this.a=n,this.b=t,this.c=e,this.e=n7(Uhn(cT(But,1),EZn,177,0,[new ZP(n,t),new ZP(t,e),new ZP(e,n)])),this.f=n7(Uhn(cT(PNt,1),zZn,8,0,[n,t,e])),this.d=(i=YF(D$(this.b),this.a),r=YF(D$(this.c),this.a),c=YF(D$(this.c),this.b),a=i.a*(this.a.a+this.b.a)+i.b*(this.a.b+this.b.b),o=r.a*(this.a.a+this.c.a)+r.b*(this.a.b+this.c.b),u=2*(i.a*c.b-i.b*c.a),new MO((r.b*a-i.b*o)/u,(i.a*o-r.a*a)/u))}function pqn(n,t){var e,i,r,c,a,o;for(c=n.c,a=n.d,c2(n,null),u2(n,null),t&&oM(gK(oIn(a,(GYn(),Gpt))))?c2(n,zUn(a.i,(can(),Wjt),(KQn(),kRt))):c2(n,a),t&&oM(gK(oIn(c,(GYn(),hmt))))?u2(n,zUn(c.i,(can(),Vjt),(KQn(),_Rt))):u2(n,c),i=new Ww(n.b);i.a<i.c.c.length;)e=uG(N3(i),72),(r=uG(oIn(e,(jYn(),Xyt)),278))==(Zrn(),cxt)?kfn(e,Xyt,rxt):r==rxt&&kfn(e,Xyt,cxt);o=oM(gK(oIn(n,(GYn(),pmt)))),kfn(n,pmt,(qx(),!o)),n.a=fln(n.a)}function mqn(n,t){var e,i,r,c;return e=$kn(uG(oIn(t,(QGn(),cCt)),88)),0==n.b.b?null:(c=uG(l8(YJ(new fX(null,new h3(n.b,16)),new Ia),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),i=pK(yx(Wz(YJ((r=uG(l8(JJ(new fX(null,new h3(t.b,16)),new mp(c)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15)).Oc(),new vp(e)),(sZ(),sZ(),Yot)))),uG(yx(lln(JJ(r.Oc(),new UI(e,i)))),40))}function vqn(n,t){var i,r,c,a,o,u,s,h,f,l,b;i=jx(new sk,n.f),u=n.i[t.c.i.p],l=n.i[t.d.i.p],o=t.c,f=t.d,a=o.a.b,h=f.a.b,u.b||(a+=o.n.b),l.b||(h+=f.n.b),s=t0(e.Math.max(0,a-h)),c=t0(e.Math.max(0,h-a)),b=e.Math.max(1,uG(oIn(t,(jYn(),uTt)),17).a)*B5(t.c.i.k,t.d.i.k),r=new PI(RKn(xS(DS($S(RS(new uk,b),c),i),uG(cQ(n.k,t.c),125))),RKn(xS(DS($S(RS(new uk,b),s),i),uG(cQ(n.k,t.d),125)))),n.c[t.p]=r}function kqn(n,t,i){var r,c,a,o,u;for(r=0,a=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));a.e!=a.i.gc();)o="",0==(!(c=uG(Zkn(a),27)).n&&(c.n=new fV(lFt,c,1,7)),c.n).i||(o=uG(zrn((!c.n&&(c.n=new fV(lFt,c,1,7)),c.n),0),135).a),zsn(u=new E$(o),c),kfn(u,(mon(),Wft),c),u.a=r++,u.d.a=c.i+c.g/2,u.d.b=c.j+c.f/2,u.e.a=e.Math.max(c.g,1),u.e.b=e.Math.max(c.f,1),kD(t.e,u),VAn(i.f,c,u),uG(zDn(c,(cGn(),Lft)),101),$Pn()}function yqn(n,t){var e,i,r,c,a;t.Ug("Layer constraint postprocessing",1),0!=(a=n.b).c.length&&(u3(0,a.c.length),qHn(n,uG(a.c[0],30),uG(zq(a,a.c.length-1),30),e=new bQ(n),r=new bQ(n)),0==e.a.c.length||(o3(0,a.c.length),pC(a.c,0,e)),0==r.a.c.length||mv(a.c,r)),vR(n,(GYn(),Upt))&&(s_n(n,i=new bQ(n),c=new bQ(n)),0==i.a.c.length||(o3(0,a.c.length),pC(a.c,0,i)),0==c.a.c.length||mv(a.c,c)),t.Vg()}function Mqn(n){var t,e;switch(n){case 91:case 93:case 45:case 94:case 44:case 92:e="\\"+String.fromCharCode(n&D1n);break;case 12:e="\\f";break;case 10:e="\\n";break;case 13:e="\\r";break;case 9:e="\\t";break;case 27:e="\\e";break;default:e=n<32?"\\x"+r1(t="0"+(n>>>0).toString(16),t.length-2,t.length):n>=P0n?"\\v"+r1(t="0"+(n>>>0).toString(16),t.length-6,t.length):""+String.fromCharCode(n&D1n)}return e}function Tqn(n){var t,e,i;if(sN(uG(oIn(n,(jYn(),JMt)),101)))for(e=new Ww(n.j);e.a<e.c.c.length;)(t=uG(N3(e),12)).j==(KQn(),FRt)&&((i=uG(oIn(t,(GYn(),lmt)),10))?NLn(t,uG(oIn(i,Fpt),64)):t.e.c.length-t.g.c.length<0?NLn(t,kRt):NLn(t,_Rt));else{for(e=new Ww(n.j);e.a<e.c.c.length;)t=uG(N3(e),12),(i=uG(oIn(t,(GYn(),lmt)),10))?NLn(t,uG(oIn(i,Fpt),64)):t.e.c.length-t.g.c.length<0?NLn(t,(KQn(),kRt)):NLn(t,(KQn(),_Rt));kfn(n,JMt,($Pn(),oRt))}}function jqn(n){var t,e,i,r,c,a;for(this.e=new Zm,this.a=new Zm,e=n.b-1;e<3;e++)sR(n,0,uG(hyn(n,0),8));if(n.b<4)throw hv(new vM("At (least dimension + 1) control points are necessary!"));for(this.b=3,this.d=!0,this.c=!1,yxn(this,n.b+this.b-1),a=new Zm,c=new Ww(this.e),t=0;t<this.b-1;t++)kD(a,pK(N3(c)));for(r=Fkn(n,0);r.b!=r.d.c;)i=uG(I6(r),8),kD(a,pK(N3(c))),kD(this.a,new R1(i,a)),u3(0,a.c.length),a.c.splice(0,1)}function Eqn(n,t){var e,i,r,c,a,o,u;for(r=new Ww(n.b);r.a<r.c.c.length;)for(a=new Ww(uG(N3(r),30).a);a.a<a.c.c.length;)for((c=uG(N3(a),10)).k==(zIn(),bbt)&&(o=uG(N9(new Fz(ix(qgn(c).a.Kc(),new h))),18),u=uG(N9(new Fz(ix(Xgn(c).a.Kc(),new h))),18),Gqn(c,oM(gK(oIn(o,(GYn(),pmt))))&&oM(gK(oIn(u,pmt)))?ufn(t):t)),i=new Fz(ix(Xgn(c).a.Kc(),new h));hDn(i);)Nhn(e=uG(N9(i),18),oM(gK(oIn(e,(GYn(),pmt))))?ufn(t):t)}function Sqn(n,t,e,i,r){var c,a;if(e.f>=t.o&&e.f<=t.f||.5*t.a<=e.f&&1.5*t.a>=e.f){if((c=uG(zq(t.n,t.n.c.length-1),209)).e+c.d+e.g+r<=i&&(uG(zq(t.n,t.n.c.length-1),209).f-n.f+e.f<=n.b||1==n.a.c.length))return ipn(t,e),!0;if(t.s+e.g<=i&&(t.t+t.d+e.f+r<=n.b||1==n.a.c.length))return kD(t.b,e),a=uG(zq(t.n,t.n.c.length-1),209),kD(t.n,new c0(t.s,a.f+a.a+t.i,t.i)),zMn(uG(zq(t.n,t.n.c.length-1),209),e),nqn(t,e),!0}return!1}function Pqn(n,t,e){var i,r,c,a;return n.Pj()?(r=null,c=n.Qj(),i=n.Ij(1,a=iin(n,t,e),e,t,c),n.Mj()&&!(n.Yi()&&null!=a?udn(a,e):xA(a)===xA(e))?(null!=a&&(r=n.Oj(a,r)),r=n.Nj(e,r),n.Tj()&&(r=n.Wj(a,e,r)),r?(r.nj(i),r.oj()):n.Jj(i)):(n.Tj()&&(r=n.Wj(a,e,r)),r?(r.nj(i),r.oj()):n.Jj(i)),a):(a=iin(n,t,e),n.Mj()&&!(n.Yi()&&null!=a?udn(a,e):xA(a)===xA(e))&&(r=null,null!=a&&(r=n.Oj(a,null)),(r=n.Nj(e,r))&&r.oj()),a)}function Cqn(n,t){var e,i,r,c;if(t.Ug("Path-Like Graph Wrapping",1),0!=n.b.c.length)if(null==(r=new dDn(n)).i&&(r.i=aun(r,new pc)),e=uM(r.i)*r.f/(null==r.i&&(r.i=aun(r,new pc)),uM(r.i)),r.b>e)t.Vg();else{switch(uG(oIn(n,(jYn(),BTt)),351).g){case 2:c=new kc;break;case 0:c=new hc;break;default:c=new yc}if(i=c.og(n,r),!c.pg())switch(uG(oIn(n,zTt),352).g){case 2:i=KLn(r,i);break;case 1:i=pPn(r,i)}yzn(n,r,i),t.Vg()}else t.Vg()}function Iqn(n,t){var i,r,c,a,o,u,s;t%=24,n.q.getHours()!=t&&((i=new e.Date(n.q.getTime())).setDate(i.getDate()+1),(o=n.q.getTimezoneOffset()-i.getTimezoneOffset())>0&&(u=o/60|0,s=o%60,r=n.q.getDate(),n.q.getHours()+u>=24&&++r,c=new e.Date(n.q.getFullYear(),n.q.getMonth(),r,t+u,n.q.getMinutes()+s,n.q.getSeconds(),n.q.getMilliseconds()),n.q.setTime(c.getTime()))),a=n.q.getTime(),n.q.setTime(a+36e5),n.q.getHours()!=t&&n.q.setTime(a)}function Oqn(n,t){var e,i,r,c;if(a3(n.d,n.e),n.c.a.$b(),0!=uM(pK(oIn(t.j,(jYn(),yyt))))||0!=uM(pK(oIn(t.j,yyt))))for(e=B3n,xA(oIn(t.j,Syt))!==xA((yvn(),Fjt))&&kfn(t.j,(GYn(),Bpt),(qx(),!0)),c=uG(oIn(t.j,OTt),17).a,r=0;r<c&&!((i=eXn(n,t))<e&&(e=i,Uon(n),0==e));r++);else for(e=vZn,xA(oIn(t.j,Syt))!==xA((yvn(),Fjt))&&kfn(t.j,(GYn(),Bpt),(qx(),!0)),c=uG(oIn(t.j,OTt),17).a,r=0;r<c&&!((i=iXn(n,t))<e&&(e=i,Uon(n),0==e));r++);}function Aqn(n,t){var e,i,r,c,a,o;for(r=new Zm,c=0,e=0,a=0;c<t.c.length-1&&e<n.gc();){for(i=uG(n.Xb(e),17).a+a;(u3(c+1,t.c.length),uG(t.c[c+1],17)).a<i;)++c;for(o=0,i-(u3(c,t.c.length),uG(t.c[c],17)).a>(u3(c+1,t.c.length),uG(t.c[c+1],17)).a-i&&++o,kD(r,(u3(c+o,t.c.length),uG(t.c[c+o],17))),a+=(u3(c+o,t.c.length),uG(t.c[c+o],17)).a-i,++e;e<n.gc()&&uG(n.Xb(e),17).a+a<=(u3(c+o,t.c.length),uG(t.c[c+o],17)).a;)++e;c+=1+o}return r}function Lqn(n,t){var e,i,r,c,a;for(a=new Fz(ix(qgn(t).a.Kc(),new h));hDn(a);)if(c=uG(N9(a),18),0==n.f.b?(r=c.c.i.k==(zIn(),dbt)&&!!c.c.i.c&&c.c.i.c.p==n.c,hDn(new Fz(ix(qgn(c.c.i).a.Kc(),new h)))?(e=uG(N9(new Fz(ix(qgn(c.c.i).a.Kc(),new h))),18).c.i.c,i=c.c.i.k==bbt&&!!e&&e.p==n.c):i=!1):(r=c.c.i.k==(zIn(),dbt)&&c.c.i.p==n.c,i=c.c.i.k==bbt&&uG(N9(new Fz(ix(qgn(c.c.i).a.Kc(),new h))),18).c.i.p==n.c),r||i)return!0;return!1}function Nqn(n,t,i,r,c){var a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(l=new Zm,p=g8(r),g=t*n.a,w=0,a=new ek,o=new ek,u=new Zm,m=0,v=0,b=0,d=0,h=0,f=0;0!=p.a.gc();)(s=ygn(p,c,o))&&(p.a.Bc(s),mv(u.c,s),a.a.zc(s,a),w=n.f[s.p],m+=n.e[s.p]-w*n.b,v+=n.c[s.p]*n.b,f+=w*n.b,d+=n.e[s.p]),(!s||0==p.a.gc()||m>=g&&n.e[s.p]>w*n.b||v>=i*g)&&(mv(l.c,u),u=new Zm,Qon(o,a),a.a.$b(),h-=f,b=e.Math.max(b,h*n.b+d),h+=v,m=v,v=0,f=0,d=0);return new WO(b,l)}function $qn(n){var t,e,i,r,c;if(!n.d){if(c=new js,null==(t=V_t).a.zc(n,t)){for(e=new DD(n1(n));e.e!=e.i.gc();)CW(c,$qn(uG(Zkn(e),29)));t.a.Bc(n),t.a.gc()}for(r=c.i,!n.q&&(n.q=new fV(p_t,n,11,10)),i=new DD(n.q);i.e!=i.i.gc();++r)uG(Zkn(i),411);CW(c,(!n.q&&(n.q=new fV(p_t,n,11,10)),n.q)),lbn(c),n.d=new vL((uG(zrn(gZ((tQ(),M_t).o),9),19),c.i),c.g),n.e=uG(c.g,688),null==n.e&&(n.e=W_t),y9(n).b&=-17}return n.d}function Dqn(n,t,e,i){var r,c,a,o,u,s;if(s=VKn(n.e.Dh(),t),u=0,r=uG(n.g,124),PP(),uG(t,69).xk()){for(a=0;a<n.i;++a)if(c=r[a],s.am(c.Lk())){if(udn(c,e))return u;++u}}else if(null!=e){for(o=0;o<n.i;++o)if(c=r[o],s.am(c.Lk())){if(udn(e,c.md()))return u;++u}if(i)for(u=0,a=0;a<n.i;++a)if(c=r[a],s.am(c.Lk())){if(xA(e)===xA(fK(n,uG(c.md(),58))))return u;++u}}else for(a=0;a<n.i;++a)if(c=r[a],s.am(c.Lk())){if(null==c.md())return u;++u}return-1}function xqn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d;if(e.Xh(t)&&(h=(b=t)?uG(i,54).gi(b):null))if(d=e.Nh(t,n.a),(w=t.t)>1||-1==w)if(f=uG(d,71),l=uG(h,71),f.dc())l.$b();else for(a=!!lMn(t),c=0,o=n.a?f.Kc():f.Ii();o.Ob();)s=uG(o.Pb(),58),(r=uG(ain(n,s),58))?(a?-1==(u=l.dd(r))?l.Gi(c,r):c!=u&&l.Ui(c,r):l.Gi(c,r),++c):n.b&&!a&&(l.Gi(c,s),++c);else null==d?h.Wb(null):null==(r=ain(n,d))?n.b&&!lMn(t)&&h.Wb(d):h.Wb(r)}function Rqn(n,t){var i,r,c,a,o,u,s,f;for(i=new Ne,c=new Fz(ix(qgn(t).a.Kc(),new h));hDn(c);)if(!v9(r=uG(N9(c),18))&&_Pn(u=r.c.i,$bt)){if(-1==(f=U_n(n,u,$bt,Nbt)))continue;i.b=e.Math.max(i.b,f),!i.a&&(i.a=new Zm),kD(i.a,u)}for(o=new Fz(ix(Xgn(t).a.Kc(),new h));hDn(o);)if(!v9(a=uG(N9(o),18))&&_Pn(s=a.d.i,Nbt)){if(-1==(f=U_n(n,s,Nbt,$bt)))continue;i.d=e.Math.max(i.d,f),!i.c&&(i.c=new Zm),kD(i.c,s)}return i}function Kqn(n,t,e,i){var r,c,a,o,u,s,h;if(e.d.i!=t.i){for(Hb(r=new gMn(n),(zIn(),wbt)),kfn(r,(GYn(),rmt),e),kfn(r,(jYn(),JMt),($Pn(),cRt)),mv(i.c,r),o2(a=new lOn,r),NLn(a,(KQn(),_Rt)),o2(o=new lOn,r),NLn(o,kRt),h=e.d,u2(e,a),zsn(c=new UZ,e),kfn(c,bMt,null),c2(c,o),u2(c,h),s=new N4(e.b,0);s.b<s.d.gc();)MK(s.b<s.d.gc()),xA(oIn(u=uG(s.d.Xb(s.c=s.b++),72),Xyt))===xA((Zrn(),rxt))&&(kfn(u,Dpt,e),LQ(s),kD(c.b,u));wDn(r,a,o)}}function Fqn(n,t,e,i){var r,c,a,o,u,s;if(e.c.i!=t.i)for(Hb(r=new gMn(n),(zIn(),wbt)),kfn(r,(GYn(),rmt),e),kfn(r,(jYn(),JMt),($Pn(),cRt)),mv(i.c,r),o2(a=new lOn,r),NLn(a,(KQn(),_Rt)),o2(o=new lOn,r),NLn(o,kRt),u2(e,a),zsn(c=new UZ,e),kfn(c,bMt,null),c2(c,o),u2(c,t),wDn(r,a,o),s=new N4(e.b,0);s.b<s.d.gc();)MK(s.b<s.d.gc()),u=uG(s.d.Xb(s.c=s.b++),72),uG(oIn(u,Xyt),278)==(Zrn(),rxt)&&(vR(u,Dpt)||kfn(u,Dpt,e),LQ(s),kD(c.b,u))}function _qn(n){var t,e,i,r;if(b_n(),t=t0(n),n<qot.length)return qot[t];if(n<=50)return t$n((cHn(),Kot),t);if(n<=$1n)return D9(t$n(Got[1],t),t);if(n>1e6)throw hv(new wM("power of ten too big"));if(n<=vZn)return D9(t$n(Got[1],t),t);for(r=i=t$n(Got[1],vZn),e=Bsn(n-vZn),t=t0(n%vZn);dwn(e,vZn)>0;)r=j5(r,i),e=$gn(e,vZn);for(r=D9(r=j5(r,t$n(Got[1],t)),vZn),e=Bsn(n-vZn);dwn(e,vZn)>0;)r=D9(r,vZn),e=$gn(e,vZn);return r=D9(r,t)}function Bqn(n){var t,e,i,r,c,a,o,u;for(a=new Ww(n.a);a.a<a.c.c.length;)if((c=uG(N3(a),10)).k==(zIn(),lbt)&&((r=uG(oIn(c,(GYn(),Fpt)),64))==(KQn(),kRt)||r==_Rt))for(i=new Fz(ix(Ggn(c).a.Kc(),new h));hDn(i);)0!=(t=(e=uG(N9(i),18)).a).b&&((o=e.c).i==c&&(MK(0!=t.b),uG(t.a.a.c,8).b=Gfn(Uhn(cT(PNt,1),zZn,8,0,[o.i.n,o.n,o.a])).b),(u=e.d).i==c&&(MK(0!=t.b),uG(t.c.b.c,8).b=Gfn(Uhn(cT(PNt,1),zZn,8,0,[u.i.n,u.n,u.a])).b))}function Hqn(n,t,i,r){var c,a,o;if(this.j=new Zm,this.k=new Zm,this.b=new Zm,this.c=new Zm,this.e=new cN,this.i=new Uk,this.f=new nv,this.d=new Zm,this.g=new Zm,kD(this.b,n),kD(this.b,t),this.e.c=e.Math.min(n.a,t.a),this.e.d=e.Math.min(n.b,t.b),this.e.b=e.Math.abs(n.a-t.a),this.e.a=e.Math.abs(n.b-t.b),c=uG(oIn(r,(jYn(),bMt)),75))for(o=Fkn(c,0);o.b!=o.d.c;)gcn((a=uG(I6(o),8)).a,n.a)&&aq(this.i,a);i&&kD(this.j,i),kD(this.k,r)}function Uqn(n,t,e,i){var r,c,a,o,u,s,h;for(o=-1,h=new Ww(n);h.a<h.c.c.length;)(s=uG(N3(h),118)).g=o--,a=r=pz(t6(nY(JJ(new fX(null,new h3(s.f,16)),new ua),new sa)).d),u=c=pz(t6(nY(JJ(new fX(null,new h3(s.k,16)),new ha),new fa)).d),i||(a=pz(t6(nY(new fX(null,new h3(s.f,16)),new la)).d),u=pz(t6(nY(new fX(null,new h3(s.k,16)),new aa)).d)),s.d=a,s.a=r,s.i=u,s.b=c,0==u?s8(e,s,e.c.b,e.c):0==a&&s8(t,s,t.c.b,t.c)}function Gqn(n,t){var i,r,c,a,o;if(n.k==(zIn(),bbt)&&(i=n.k!=bbt||Qj(JJ(uG(oIn(n,(GYn(),gmt)),15).Oc(),new hd(new _t))).Bd((vS(),Kut))?t:(Ajn(),xxt),kfn(n,(GYn(),Qpt),i),i!=(Ajn(),Dxt)))for(r=uG(oIn(n,rmt),18),o=uM(pK(oIn(r,(jYn(),tMt)))),a=0,i==$xt?a=n.o.b-e.Math.ceil(o/2):i==xxt&&(a=e.Math.ceil(n.o.b-uM(pK(oIn(HQ(n),pTt)))-o)/2,n.o.b-=uM(pK(oIn(HQ(n),pTt))),n.o.b-=o),c=new Ww(n.j);c.a<c.c.c.length;)uG(N3(c),12).n.b=a}function qqn(n,t,e){var i,r,c,a,o,u,s,h,f;for(r=!0,a=new Ww(n.b);a.a<a.c.c.length;){for(c=uG(N3(a),30),s=T0n,h=null,u=new Ww(c.a);u.a<u.c.c.length;){if(o=uG(N3(u),10),f=uM(t.p[o.p])+uM(t.d[o.p])-o.d.d,i=uM(t.p[o.p])+uM(t.d[o.p])+o.o.b+o.d.a,!(f>s&&i>s)){r=!1,e._g()&&e.bh("bk node placement breaks on "+o+" which should have been after "+h);break}h=o,s=uM(t.p[o.p])+uM(t.d[o.p])+o.o.b+o.d.a}if(!r)break}return e._g()&&e.bh(t+" is feasible: "+r),r}function Xqn(n,t,e,i){var r,c,a,o,u,s,h;if(Hb(c=new gMn(n),(zIn(),gbt)),kfn(c,(jYn(),JMt),($Pn(),cRt)),r=0,t){for(kfn(a=new lOn,(GYn(),rmt),t),kfn(c,rmt,t.i),NLn(a,(KQn(),_Rt)),o2(a,c),s=0,h=(u=x4(t.e)).length;s<h;++s)u2(u[s],a);kfn(t,lmt,c),++r}if(e){for(o=new lOn,kfn(c,(GYn(),rmt),e.i),kfn(o,rmt,e),NLn(o,(KQn(),kRt)),o2(o,c),s=0,h=(u=x4(e.g)).length;s<h;++s)c2(u[s],o);kfn(e,lmt,c),++r}return kfn(c,(GYn(),Opt),xwn(r)),mv(i.c,c),c}function zqn(n){var t,e,i,r,c,a,o,u,s,h,f,l;for(e=new _w(new Fw(n.c.b).a.vc().Kc());e.a.Ob();)o=uG(e.a.Pb(),44),null==(r=(t=uG(o.md(),143)).a)&&(r=""),!(i=UK(n.c,r))&&0==r.length&&(i=Qwn(n)),i&&!Wpn(i.c,t,!1)&&aq(i.c,t);for(a=Fkn(n.a,0);a.b!=a.d.c;)c=uG(I6(a),487),s=C9(n.c,c.a),l=C9(n.c,c.b),s&&l&&aq(s.c,new WO(l,c.c));for(BY(n.a),f=Fkn(n.b,0);f.b!=f.d.c;)h=uG(I6(f),487),t=HK(n.c,h.a),u=C9(n.c,h.b),t&&u&&cP(t,u,h.c);BY(n.b)}function Vqn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;c=new Cb(n),n9((a=new Zjn).g),n9(a.j),$V(a.b),n9(a.d),n9(a.i),$V(a.k),$V(a.c),$V(a.e),b=iNn(a,c,null),Mxn(a,c),r=b,t&&(o=wXn(s=new Cb(t)),iOn(r,Uhn(cT(nNt,1),EZn,536,0,[o]))),l=!1,f=!1,e&&(s=new Cb(e),Yet in s.a&&(l=v0(s,Yet).qe().a),Zet in s.a&&(f=v0(s,Zet).qe().a)),h=lj(xcn(new fy,l),f),SOn(new au,r,h),Yet in c.a&&nrn(c,Yet,null),(l||f)&&(mGn(h,u=new _y,l,f),nrn(c,Yet,u)),i=new bm(a),sln(new jN(r),i)}function Wqn(n,t,e){var i,r,c,a,o,u,s,h,f;for(a=new DEn,s=Uhn(cT(YHt,1),W1n,28,15,[0]),r=-1,c=0,i=0,u=0;u<n.b.c.length;++u){if(!((h=uG(zq(n.b,u),443)).b>0)){if(r=-1,32==VJ(h.c,0)){if(f=s[0],win(t,s),s[0]>f)continue}else if(WZ(t,h.c,s[0])){s[0]+=h.c.length;continue}return 0}if(r<0&&h.a&&(r=u,c=s[0],i=0),r>=0){if(o=h.b,u==r&&0==(o-=i++))return 0;if(!rJn(t,s,h,o,a)){u=r-1,s[0]=c;continue}}else if(r=-1,!rJn(t,s,h,0,a))return 0}return LQn(a,e)?s[0]:0}function Qqn(n,t,e){var i,r,c,a,o,u,s,h,f,l;for(h=new Kz(new Fd(e)),zV(o=Inn(ZHt,B2n,28,n.f.e.c.length,16,1),o.length),e[t.a]=0,s=new Ww(n.f.e);s.a<s.c.c.length;)(u=uG(N3(s),153)).a!=t.a&&(e[u.a]=vZn),kG(_Cn(h,u),D0n);for(;0!=h.b.c.length;)for(o[(f=uG(hin(h),153)).a]=!0,c=rx(new RE(n.b,f),0);c.c;)o[(l=mTn(r=uG(Ein(c),290),f)).a]||(a=vR(r,(Bjn(),ilt))?uM(pK(oIn(r,ilt))):n.c,(i=e[f.a]+a)<e[l.a]&&(e[l.a]=i,yon(h,l),kG(_Cn(h,l),D0n)))}function Jqn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w;for(a=n.o,i=Inn(YHt,W1n,28,a,15,1),r=Inn(YHt,W1n,28,a,15,1),e=n.p,t=Inn(YHt,W1n,28,e,15,1),c=Inn(YHt,W1n,28,e,15,1),s=0;s<a;s++){for(f=0;f<e&&!eTn(n,s,f);)++f;i[s]=f}for(h=0;h<a;h++){for(f=e-1;f>=0&&!eTn(n,h,f);)--f;r[h]=f}for(b=0;b<e;b++){for(o=0;o<a&&!eTn(n,o,b);)++o;t[b]=o}for(w=0;w<e;w++){for(o=a-1;o>=0&&!eTn(n,o,w);)--o;c[w]=o}for(u=0;u<a;u++)for(l=0;l<e;l++)u<c[l]&&u>t[l]&&l<r[u]&&l>i[u]&&HBn(n,u,l,!1,!0)}function Yqn(n){var t,e,i,r,c,a,o,u;e=oM(gK(oIn(n,(cGn(),yft)))),c=n.a.c.d,o=n.a.d.d,e?(a=vD(YF(new MO(o.a,o.b),c),.5),u=vD(D$(n.e),.5),t=YF(JF(new MO(c.a,c.b),a),u),_R(n.d,t)):(r=uM(pK(oIn(n.a,Fft))),i=n.d,c.a>=o.a?c.b>=o.b?(i.a=o.a+(c.a-o.a)/2+r,i.b=o.b+(c.b-o.b)/2-r-n.e.b):(i.a=o.a+(c.a-o.a)/2+r,i.b=c.b+(o.b-c.b)/2+r):c.b>=o.b?(i.a=c.a+(o.a-c.a)/2+r,i.b=o.b+(c.b-o.b)/2+r):(i.a=c.a+(o.a-c.a)/2+r,i.b=c.b+(o.b-c.b)/2-r-n.e.b))}function Zqn(n){var t,e,i,r,c,a;if(!n.f){if(a=new Ms,c=new Ms,null==(t=V_t).a.zc(n,t)){for(r=new DD(n1(n));r.e!=r.i.gc();)CW(a,Zqn(uG(Zkn(r),29)));t.a.Bc(n),t.a.gc()}for(!n.s&&(n.s=new fV(o_t,n,21,17)),i=new DD(n.s);i.e!=i.i.gc();)F$(e=uG(Zkn(i),179),102)&&ttn(c,uG(e,19));lbn(c),n.r=new JG(n,(uG(zrn(gZ((tQ(),M_t).o),6),19),c.i),c.g),CW(a,n.r),lbn(a),n.f=new vL((uG(zrn(gZ(M_t.o),5),19),a.i),a.g),y9(n).b&=-3}return n.f}function nXn(n){hP(n,new hCn(FT(DT(KT(RT(new bu,$3n),"ELK DisCo"),"Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."),new ct))),U4(n,$3n,D3n,Jkn(ift)),U4(n,$3n,x3n,Jkn(Jht)),U4(n,$3n,R3n,Jkn(Xht)),U4(n,$3n,K3n,Jkn(Yht)),U4(n,$3n,D2n,Jkn(tft)),U4(n,$3n,x2n,Jkn(nft)),U4(n,$3n,$2n,Jkn(eft)),U4(n,$3n,R2n,Jkn(Zht)),U4(n,$3n,I3n,Jkn(Vht)),U4(n,$3n,O3n,Jkn(zht)),U4(n,$3n,A3n,Jkn(Wht)),U4(n,$3n,L3n,Jkn(Qht))}function tXn(){tXn=E,JKt=Uhn(cT(JHt,1),N1n,28,15,[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]),YKt=new RegExp("[ \t\n\r\f]+");try{QKt=Uhn(cT(iBt,1),EZn,2114,0,[new Km((wL(),Cmn("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",bF((qy(),qy(),Hat))))),new Km(Cmn("yyyy-MM-dd'T'HH:mm:ss'.'SSS",bF(Hat))),new Km(Cmn("yyyy-MM-dd'T'HH:mm:ss",bF(Hat))),new Km(Cmn("yyyy-MM-dd'T'HH:mm",bF(Hat))),new Km(Cmn("yyyy-MM-dd",bF(Hat)))])}catch(n){if(!F$(n=Ehn(n),82))throw hv(n)}}function eXn(n,t){var e,i,r;if(i=0!=uRn(n.d,1),0==rHn(n,t)&&oM(gK(oIn(t.j,(GYn(),Bpt)))))return 0;!oM(gK(oIn(t.j,(GYn(),Bpt))))&&!oM(gK(oIn(t.j,mmt)))||xA(oIn(t.j,(jYn(),Syt)))===xA((yvn(),Fjt))?t.c.mg(t.e,i):i=oM(gK(oIn(t.j,Bpt))),PKn(n,t,i,!0),oM(gK(oIn(t.j,mmt)))&&kfn(t.j,mmt,(qx(),!1)),oM(gK(oIn(t.j,Bpt)))&&(kfn(t.j,Bpt,(qx(),!1)),kfn(t.j,mmt,!0)),e=rHn(n,t);do{if(Gon(n),0==e)return 0;r=e,PKn(n,t,i=!i,!1),e=rHn(n,t)}while(r>e);return r}function iXn(n,t){var e,i,r;if(i=0!=uRn(n.d,1),0==BAn(n,t)&&oM(gK(oIn(t.j,(GYn(),Bpt)))))return 0;!oM(gK(oIn(t.j,(GYn(),Bpt))))&&!oM(gK(oIn(t.j,mmt)))||xA(oIn(t.j,(jYn(),Syt)))===xA((yvn(),Fjt))?t.c.mg(t.e,i):i=oM(gK(oIn(t.j,Bpt))),PKn(n,t,i,!0),oM(gK(oIn(t.j,mmt)))&&kfn(t.j,mmt,(qx(),!1)),oM(gK(oIn(t.j,Bpt)))&&(kfn(t.j,Bpt,(qx(),!1)),kfn(t.j,mmt,!0)),e=BAn(n,t);do{if(Gon(n),0==e)return 0;r=e,PKn(n,t,i=!i,!1),e=BAn(n,t)}while(r>e);return r}function rXn(n,t,i,r){var c,a,o,u,s,h,f,l,b;return h=(s=YF(new MO(i.a,i.b),n)).a*t.b-s.b*t.a,f=t.a*r.b-t.b*r.a,l=(s.a*r.b-s.b*r.a)/f,b=h/f,0==f?0==h?(a=atn(n,c=JF(new MO(i.a,i.b),vD(new MO(r.a,r.b),.5))),o=atn(JF(new MO(n.a,n.b),t),c),u=.5*e.Math.sqrt(r.a*r.a+r.b*r.b),a<o&&a<=u?new MO(n.a,n.b):o<=u?JF(new MO(n.a,n.b),t):null):null:l>=0&&l<=1&&b>=0&&b<=1?JF(new MO(n.a,n.b),vD(new MO(t.a,t.b),l)):null}function cXn(n,t,e){var i,r,c,a,o;if(i=uG(oIn(n,(jYn(),Pyt)),21),e.a>t.a&&(i.Hc((ZSn(),VNt))?n.c.a+=(e.a-t.a)/2:i.Hc(QNt)&&(n.c.a+=e.a-t.a)),e.b>t.b&&(i.Hc((ZSn(),YNt))?n.c.b+=(e.b-t.b)/2:i.Hc(JNt)&&(n.c.b+=e.b-t.b)),uG(oIn(n,(GYn(),Hpt)),21).Hc((r_n(),tpt))&&(e.a>t.a||e.b>t.b))for(o=new Ww(n.a);o.a<o.c.c.length;)(a=uG(N3(o),10)).k==(zIn(),lbt)&&((r=uG(oIn(a,Fpt),64))==(KQn(),kRt)?a.n.a+=e.a-t.a:r==KRt&&(a.n.b+=e.b-t.b));c=n.d,n.f.a=e.a-c.b-c.c,n.f.b=e.b-c.d-c.a}function aXn(n,t,e){var i,r,c,a,o;if(i=uG(oIn(n,(jYn(),Pyt)),21),e.a>t.a&&(i.Hc((ZSn(),VNt))?n.c.a+=(e.a-t.a)/2:i.Hc(QNt)&&(n.c.a+=e.a-t.a)),e.b>t.b&&(i.Hc((ZSn(),YNt))?n.c.b+=(e.b-t.b)/2:i.Hc(JNt)&&(n.c.b+=e.b-t.b)),uG(oIn(n,(GYn(),Hpt)),21).Hc((r_n(),tpt))&&(e.a>t.a||e.b>t.b))for(a=new Ww(n.a);a.a<a.c.c.length;)(c=uG(N3(a),10)).k==(zIn(),lbt)&&((r=uG(oIn(c,Fpt),64))==(KQn(),kRt)?c.n.a+=e.a-t.a:r==KRt&&(c.n.b+=e.b-t.b));o=n.d,n.f.a=e.a-o.b-o.c,n.f.b=e.b-o.d-o.a}function oXn(n){var t,i,r,c,a,o,u,s,h,f;for(s=new Kw(new Lw(O$n(n)).a.vc().Kc());s.a.Ob();){for(r=uG(s.a.Pb(),44),h=0,f=0,h=(u=uG(r.ld(),10)).d.d,f=u.o.b+u.d.a,n.d[u.p]=0,t=u;(c=n.a[t.p])!=u;)i=rkn(t,c),o=0,o=n.c==(b0(),hSt)?i.d.n.b+i.d.a.b-i.c.n.b-i.c.a.b:i.c.n.b+i.c.a.b-i.d.n.b-i.d.a.b,a=uM(n.d[t.p])+o,n.d[c.p]=a,h=e.Math.max(h,c.d.d-a),f=e.Math.max(f,a+c.o.b+c.d.a),t=c;t=u;do{n.d[t.p]=uM(n.d[t.p])+h,t=n.a[t.p]}while(t!=u);n.b[u.p]=h+f}}function uXn(n,t,i){var r,c,a,o,u,s,h,f,l,b;for(a=0,o=n.t,c=0,r=0,s=0,b=0,l=0,i&&(n.n.c.length=0,kD(n.n,new c0(n.s,n.t,n.i))),u=0,f=new Ww(n.b);f.a<f.c.c.length;)a+(h=uG(N3(f),27)).g+(u>0?n.i:0)>t&&s>0&&(a=0,o+=s+n.i,c=e.Math.max(c,b),r+=s+n.i,s=0,b=0,i&&(++l,kD(n.n,new c0(n.s,o,n.i))),u=0),b+=h.g+(u>0?n.i:0),s=e.Math.max(s,h.f),i&&zMn(uG(zq(n.n,l),209),h),a+=h.g+(u>0?n.i:0),++u;return c=e.Math.max(c,b),r+=s,i&&(n.r=c,n.d=r,ijn(n.j)),new gY(n.s,n.t,c,r)}function sXn(n){var t,i,r,c,a,o,u,s,h,f,l;for(n.b=!1,f=M0n,u=T0n,l=M0n,s=T0n,i=n.e.a.ec().Kc();i.Ob();)for(r=(t=uG(i.Pb(),272)).a,f=e.Math.min(f,r.c),u=e.Math.max(u,r.c+r.b),l=e.Math.min(l,r.d),s=e.Math.max(s,r.d+r.a),a=new Ww(t.c);a.a<a.c.c.length;)(c=uG(N3(a),407)).a.a?(o=(h=r.d+c.b.b)+c.c,l=e.Math.min(l,h),s=e.Math.max(s,o)):(o=(h=r.c+c.b.a)+c.c,f=e.Math.min(f,h),u=e.Math.max(u,o));n.a=new MO(u-f,s-l),n.c=new MO(f+n.d.a,l+n.d.b)}function hXn(n){var t,e,i,r,c,a;if(!n.a){if(n.o=null,a=new Dm(n),t=new Ts,null==(e=V_t).a.zc(n,e)){for(c=new DD(n1(n));c.e!=c.i.gc();)CW(a,hXn(uG(Zkn(c),29)));e.a.Bc(n),e.a.gc()}for(!n.s&&(n.s=new fV(o_t,n,21,17)),r=new DD(n.s);r.e!=r.i.gc();)F$(i=uG(Zkn(r),179),331)&&ttn(t,uG(i,35));lbn(t),n.k=new YG(n,(uG(zrn(gZ((tQ(),M_t).o),7),19),t.i),t.g),CW(a,n.k),lbn(a),n.a=new vL((uG(zrn(gZ(M_t.o),4),19),a.i),a.g),y9(n).b&=-2}return n.a}function fXn(n,t,e,i){var r,c,a,o,u,s,h;if(h=VKn(n.e.Dh(),t),r=0,c=uG(n.g,124),u=null,PP(),uG(t,69).xk()){for(o=0;o<n.i;++o)if(a=c[o],h.am(a.Lk())){if(udn(a,e)){u=a;break}++r}}else if(null!=e){for(o=0;o<n.i;++o)if(a=c[o],h.am(a.Lk())){if(udn(e,a.md())){u=a;break}++r}}else for(o=0;o<n.i;++o)if(a=c[o],h.am(a.Lk())){if(null==a.md()){u=a;break}++r}return u&&(uN(n.e)&&(s=t.Jk()?new i8(n.e,4,t,e,null,r,!0):VZ(n,t.tk()?2:1,t,e,t.ik(),-1,!0),i?i.nj(s):i=s),i=$Hn(n,u,i)),i}function lXn(n,t,i,r,c,a,o){var u,s,h,f,l,b,w,d;switch(w=0,d=0,s=c.c,u=c.b,f=i.f,b=i.g,t.g){case 0:w=r.i+r.g+o,d=n.c?eCn(w,a,r,o):r.j,l=e.Math.max(s,w+b),h=e.Math.max(u,d+f);break;case 1:d=r.j+r.f+o,w=n.c?tCn(d,a,r,o):r.i,l=e.Math.max(s,w+b),h=e.Math.max(u,d+f);break;case 2:w=s+o,d=0,l=s+o+b,h=e.Math.max(u,f);break;case 3:w=0,d=u+o,l=e.Math.max(s,b),h=u+o+f;break;default:throw hv(new vM("IllegalPlacementOption."))}return new Mvn(n.a,l,h,t,w,d)}function bXn(n){var t,i,r,c,a,o,u,s,h,f,l,b;if(u=n.d,l=uG(oIn(n,(GYn(),Pmt)),15),t=uG(oIn(n,Ept),15),l||t){if(a=uM(pK(Omn(n,(jYn(),lTt)))),o=uM(pK(Omn(n,bTt))),b=0,l){for(h=0,c=l.Kc();c.Ob();)r=uG(c.Pb(),10),h=e.Math.max(h,r.o.b),b+=r.o.a;b+=a*(l.gc()-1),u.d+=h+o}if(i=0,t){for(h=0,c=t.Kc();c.Ob();)r=uG(c.Pb(),10),h=e.Math.max(h,r.o.b),i+=r.o.a;i+=a*(t.gc()-1),u.a+=h+o}(s=e.Math.max(b,i))>n.o.a&&(f=(s-n.o.a)/2,u.b=e.Math.max(u.b,f),u.c=e.Math.max(u.c,f))}}function wXn(n){var t,e,i,r,c,a;for(YL(r=new r4,(Whn(),YLt)),i=new Jw(new IM(new JE(n,Yon(n,Inn($ot,zZn,2,0,6,1))).b));i.b<i.d.gc();)MK(i.b<i.d.gc()),e=mK(i.d.Xb(i.c=i.b++)),(c=DVn(NFt,e))&&null!=(a=vVn(c,(t=v0(n,e)).te()?t.te().a:t.qe()?""+t.qe().a:t.re()?""+t.re().a:t.Ib()))&&(($x(c.j,(Rkn(),sNt))||$x(c.j,hNt))&&vfn(trn(r,bFt),c,a),$x(c.j,oNt)&&vfn(trn(r,aFt),c,a),$x(c.j,fNt)&&vfn(trn(r,wFt),c,a),$x(c.j,uNt)&&vfn(trn(r,lFt),c,a));return r}function dXn(n,t,e){var i,r,c,a,o,u,s,h;if(r=uG(n.g,124),EFn(n.e,t))return PP(),uG(t,69).xk()?new Cq(t,n):new OA(t,n);for(s=VKn(n.e.Dh(),t),i=0,o=0;o<n.i;++o){if(a=(c=r[o]).Lk(),s.am(a)){if(PP(),uG(t,69).xk())return c;if(a==(m$n(),NBt)||a==OBt){for(u=new lx(cpn(c.md()));++o<n.i;)((a=(c=r[o]).Lk())==NBt||a==OBt)&&JA(u,cpn(c.md()));return g_(uG(t.Hk(),156),u.a)}return null!=(h=c.md())&&e&&F$(t,102)&&uG(t,19).Bb&P0n&&(h=ONn(n,t,o,i,h)),h}++i}return t.ik()}function gXn(n,t,e,i){var r,c,a,o,u,s;if(u=VKn(n.e.Dh(),t),c=uG(n.g,124),EFn(n.e,t)){for(r=0,o=0;o<n.i;++o)if(a=c[o],u.am(a.Lk())){if(r==e)return PP(),uG(t,69).xk()?a:(null!=(s=a.md())&&i&&F$(t,102)&&uG(t,19).Bb&P0n&&(s=ONn(n,t,o,r,s)),s);++r}throw hv(new dM(Hit+e+Vet+r))}for(r=0,o=0;o<n.i;++o){if(a=c[o],u.am(a.Lk()))return PP(),uG(t,69).xk()?a:(null!=(s=a.md())&&i&&F$(t,102)&&uG(t,19).Bb&P0n&&(s=ONn(n,t,o,r,s)),s);++r}return t.ik()}function pXn(){pXn=E,Hot=Uhn(cT(YHt,1),W1n,28,15,[j1n,1162261467,d1n,1220703125,362797056,1977326743,d1n,387420489,g0n,214358881,429981696,815730721,1475789056,170859375,268435456,410338673,612220032,893871739,128e7,1801088541,113379904,148035889,191102976,244140625,308915776,387420489,481890304,594823321,729e6,887503681,d1n,1291467969,1544804416,1838265625,60466176]),Uot=Uhn(cT(YHt,1),W1n,28,15,[-1,-1,31,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5])}function mXn(n,t){var e,i,r,c,a,o,u,s,h,f;if(a=n.e,0==(u=t.e))return n;if(0==a)return 0==t.e?t:new VV(-t.e,t.d,t.a);if((c=n.d)+(o=t.d)==2)return e=E3(n.a[0],L0n),i=E3(t.a[0],L0n),a<0&&(e=Men(e)),u<0&&(i=Men(i)),cHn(),BA($gn(e,i),0)?Rmn($gn(e,i)):hW(Rmn(Men($gn(e,i))));if(-1==(r=c!=o?c>o?1:-1:Hln(n.a,t.a,c)))f=-u,h=a==u?t7(t.a,o,n.a,c):Cnn(t.a,o,n.a,c);else if(f=a,a==u){if(0==r)return cHn(),_ot;h=t7(n.a,c,t.a,o)}else h=Cnn(n.a,c,t.a,o);return K4(s=new VV(f,h.length,h)),s}function vXn(n,t){var e,i,r;if(r=PGn(t),!t.c&&(t.c=new fV(wFt,t,9,9)),kS(new fX(null,(!t.c&&(t.c=new fV(wFt,t,9,9)),new h3(t.c,16))),new Jd(r)),CWn(t,i=uG(oIn(r,(GYn(),Hpt)),21)),i.Hc((r_n(),tpt)))for(e=new DD((!t.c&&(t.c=new fV(wFt,t,9,9)),t.c));e.e!=e.i.gc();)pQn(n,t,r,uG(Zkn(e),123));return 0!=uG(zDn(t,(jYn(),DMt)),181).gc()&&u_n(t,r),oM(gK(oIn(r,HMt)))&&i.Fc(apt),vR(r,fTt)&&iM(new omn(uM(pK(oIn(r,fTt)))),r),xA(zDn(t,rMt))===xA((Own(),Ixt))?UYn(n,t,r):dYn(n,t,r),r}function kXn(n){var t,e,i,r,c,a,o;for(i=new Ww(n.b);i.a<i.c.c.length;)for(c=new Ww(T3(uG(N3(i),30).a));c.a<c.c.c.length;)if(Nin(r=uG(N3(c),10))&&!(e=uG(oIn(r,(GYn(),Spt)),313)).g&&e.d)for(t=e,o=e.d;o;)Q_n(o.i,o.k,!1,!0),Ien(t.a),Ien(o.i),Ien(o.k),Ien(o.b),u2(o.c,t.c.d),u2(t.c,null),a2(t.a,null),a2(o.i,null),a2(o.k,null),a2(o.b,null),(a=new O5(t.i,o.a,t.e,o.j,o.f)).k=t.k,a.n=t.n,a.b=t.b,a.c=o.c,a.g=t.g,a.d=o.d,kfn(t.i,Spt,a),kfn(o.a,Spt,a),o=o.d,t=a}function yXn(n,t){var e,i,r,c,a,o,u;if(null==n)return null;if(0==(c=n.length))return"";for(u=Inn(JHt,N1n,28,c,15,1),Knn(0,c,n.length),Knn(0,c,u.length),gW(n,0,c,u,0),e=null,o=t,r=0,a=0;r<c;r++)i=u[r],aZn(),i<=32&&2&vHt[i]?o?(!e&&(e=new fx(n)),mR(e,r-a++)):(o=t,32!=i&&(!e&&(e=new fx(n)),psn(e,r-a,r-a+1,String.fromCharCode(32)))):o=!1;return o?e?(c=e.a.length)>0?r1(e.a,0,c-1):"":(Knn(0,c-1,n.length),n.substr(0,c-1)):e?e.a:n}function MXn(n,t){var e,i,r,c,a,o,u;for(t.Ug("Sort By Input Model "+oIn(n,(jYn(),Syt)),1),r=0,i=new Ww(n.b);i.a<i.c.c.length;){for(e=uG(N3(i),30),u=0==r?0:r-1,o=uG(zq(n.b,u),30),a=new Ww(e.a);a.a<a.c.c.length;)xA(oIn(c=uG(N3(a),10),JMt))!==xA(($Pn(),rRt))&&xA(oIn(c,JMt))!==xA(cRt)&&(hZ(),f$(c.j,new Gbn(o,uG(oIn(n,Syt),284),qjn(c),oM(gK(oIn(n,Eyt))))),t.bh("Node "+c+" ports: "+c.j));hZ(),f$(e.a,new xon(o,uG(oIn(n,Syt),284),uG(oIn(n,Tyt),390))),t.bh("Layer "+r+": "+e),++r}t.Vg()}function TXn(n,t){var e,i,r,c,a;if(a=uG(t,138),pxn(n),pxn(a),null!=a.b){if(n.c=!0,null==n.b)return n.b=Inn(YHt,W1n,28,a.b.length,15,1),void qGn(a.b,0,n.b,0,a.b.length);for(c=Inn(YHt,W1n,28,n.b.length+a.b.length,15,1),e=0,i=0,r=0;e<n.b.length||i<a.b.length;)e>=n.b.length?(c[r++]=a.b[i++],c[r++]=a.b[i++]):i>=a.b.length?(c[r++]=n.b[e++],c[r++]=n.b[e++]):a.b[i]<n.b[e]||a.b[i]===n.b[e]&&a.b[i+1]<n.b[e+1]?(c[r++]=a.b[i++],c[r++]=a.b[i++]):(c[r++]=n.b[e++],c[r++]=n.b[e++]);n.b=c}}function jXn(n,t){var e,i,r,c,a,o,u,s,h,f;return e=oM(gK(oIn(n,(GYn(),Ypt)))),o=oM(gK(oIn(t,Ypt))),i=uG(oIn(n,Zpt),12),u=uG(oIn(t,Zpt),12),r=uG(oIn(n,nmt),12),s=uG(oIn(t,nmt),12),h=!!i&&i==u,f=!!r&&r==s,e||o?(c=(!oM(gK(oIn(n,Ypt)))||oM(gK(oIn(n,Jpt))))&&(!oM(gK(oIn(t,Ypt)))||oM(gK(oIn(t,Jpt)))),a=!(oM(gK(oIn(n,Ypt)))&&oM(gK(oIn(n,Jpt)))||oM(gK(oIn(t,Ypt)))&&oM(gK(oIn(t,Jpt)))),new xB(h&&c||f&&a,h,f)):new xB(uG(N3(new Ww(n.j)),12).p==uG(N3(new Ww(t.j)),12).p,h,f)}function EXn(n){var t,i,r,c,a,o,u,s;for(r=0,i=0,s=new lS,t=0,u=new Ww(n.n);u.a<u.c.c.length;)0==(o=uG(N3(u),209)).c.c.length?s8(s,o,s.c.b,s.c):(r=e.Math.max(r,o.d),i+=o.a+(t>0?n.i:0)),++t;for(dgn(n.n,s),n.d=i,n.r=r,n.g=0,n.f=0,n.e=0,n.o=M0n,n.p=M0n,a=new Ww(n.b);a.a<a.c.c.length;)c=uG(N3(a),27),n.p=e.Math.min(n.p,c.g),n.g=e.Math.max(n.g,c.g),n.f=e.Math.max(n.f,c.f),n.o=e.Math.min(n.o,c.f),n.e+=c.f+n.i;n.a=n.e/n.b.c.length-n.i*((n.b.c.length-1)/n.b.c.length),ijn(n.j)}function SXn(n){var t,e,i,r;return 64&n.Db?Egn(n):(t=new lx(Dtt),(i=n.k)?JA(JA((t.a+=' "',t),i),'"'):(!n.n&&(n.n=new fV(lFt,n,1,7)),n.n.i>0&&(!(r=(!n.n&&(n.n=new fV(lFt,n,1,7)),uG(zrn(n.n,0),135)).a)||JA(JA((t.a+=' "',t),r),'"'))),!n.b&&(n.b=new f_(cFt,n,4,7)),e=!(n.b.i<=1&&(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c.i<=1)),t.a+=e?" [":" ",JA(t,KD(new FM,new DD(n.b))),e&&(t.a+="]"),t.a+=Y4n,e&&(t.a+="["),JA(t,KD(new FM,new DD(n.c))),e&&(t.a+="]"),t.a)}function PXn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E;for(k=n.c,y=t.c,e=Ten(k.a,n,0),i=Ten(y.a,t,0),m=uG(jmn(n,(can(),Vjt)).Kc().Pb(),12),j=uG(jmn(n,Wjt).Kc().Pb(),12),v=uG(jmn(t,Vjt).Kc().Pb(),12),E=uG(jmn(t,Wjt).Kc().Pb(),12),g=x4(m.e),M=x4(j.g),p=x4(v.e),T=x4(E.g),$jn(n,i,y),s=0,b=(c=p).length;s<b;++s)u2(c[s],m);for(h=0,w=(a=T).length;h<w;++h)c2(a[h],j);for($jn(t,e,k),f=0,d=(o=g).length;f<d;++f)u2(o[f],v);for(u=0,l=(r=M).length;u<l;++u)c2(r[u],E)}function CXn(n){var t,i,r,c,a,o,u;for(r=new DD((!(o=uG(zDn(n,(SK(),zCt)),27)).e&&(o.e=new f_(aFt,o,7,4)),o.e));r.e!=r.i.gc();)i=uG(Zkn(r),74),u=new MO(uG(zrn((!i.a&&(i.a=new fV(oFt,i,6,6)),i.a),0),166).j,uG(zrn((!i.a&&(i.a=new fV(oFt,i,6,6)),i.a),0),166).k),a=new MO(uG(zrn((!i.a&&(i.a=new fV(oFt,i,6,6)),i.a),0),166).b,uG(zrn((!i.a&&(i.a=new fV(oFt,i,6,6)),i.a),0),166).c),c=new MO(a.a-u.a,a.b-u.b),t=e.Math.atan2(c.b,c.a),uG(zrn((!i.c&&(i.c=new f_(cFt,i,5,8)),i.c),0),84).qf((jOn(),XIt),t)}function IXn(n,t){var i,r,c,a,o,u,s,h,f;for(t.Ug("Interactive Node Reorderer",1),!n.a&&(n.a=new fV(bFt,n,10,11)),f=n.a,u=new Zm,c=new DD(f);c.e!=c.i.gc();)vnn(i=uG(Zkn(c),27),(S_n(),JOt))&&mv(u.c,i);for(a=new Ww(u);a.a<a.c.c.length;)rin(f,i=uG(N3(a),27));for(hZ(),f$(u,new Ro),o=new Ww(u);o.a<o.c.c.length;)i=uG(N3(o),27),h=uG(zDn(i,(S_n(),JOt)),17).a,$dn(f,h=e.Math.min(h,f.i),i);for(s=0,r=new DD(f);r.e!=r.i.gc();)Myn(i=uG(Zkn(r),27),(S_n(),QOt),xwn(s)),++s;t.Vg()}function OXn(n,t,i){var r,c,a,o,u,s,h;return e.Math.abs(t.s-t.c)<t4n||e.Math.abs(i.s-i.c)<t4n?0:(r=FKn(n,t.j,i.e),c=FKn(n,i.j,t.e),a=0,-1==r||-1==c?(-1==r&&(new A2((_7(),$St),i,t,1),++a),-1==c&&(new A2((_7(),$St),t,i,1),++a)):(o=Hwn(t.j,i.s,i.c),o+=Hwn(i.e,t.s,t.c),u=Hwn(i.j,t.s,t.c),(s=r+16*o)<(h=c+16*(u+=Hwn(t.e,i.s,i.c)))?new A2((_7(),DSt),t,i,h-s):s>h?new A2((_7(),DSt),i,t,s-h):s>0&&h>0&&(new A2((_7(),DSt),t,i,0),new A2(DSt,i,t,0))),a)}function AXn(n,t,e){var i,r,c;for(n.a=new Zm,c=Fkn(t.b,0);c.b!=c.d.c;){for(r=uG(I6(c),40);uG(oIn(r,(QGn(),ACt)),17).a>n.a.c.length-1;)kD(n.a,new WO(B3n,G9n));i=uG(oIn(r,ACt),17).a,e==(xdn(),JDt)||e==YDt?(r.e.a<uM(pK(uG(zq(n.a,i),42).a))&&uw(uG(zq(n.a,i),42),r.e.a),r.e.a+r.f.a>uM(pK(uG(zq(n.a,i),42).b))&&sw(uG(zq(n.a,i),42),r.e.a+r.f.a)):(r.e.b<uM(pK(uG(zq(n.a,i),42).a))&&uw(uG(zq(n.a,i),42),r.e.b),r.e.b+r.f.b>uM(pK(uG(zq(n.a,i),42).b))&&sw(uG(zq(n.a,i),42),r.e.b+r.f.b))}}function LXn(n,t,e,i){var r,c,a,o,u,s;if(c=pgn(i),!oM(gK(oIn(i,(jYn(),jMt))))&&!oM(gK(oIn(n,uMt)))||sN(uG(oIn(n,JMt),101)))switch(o2(o=new lOn,n),t?((s=o.n).a=t.a-n.n.a,s.b=t.b-n.n.b,DOn(s,0,0,n.o.a,n.o.b),NLn(o,nGn(o,c))):(r=Ipn(c),NLn(o,e==(can(),Wjt)?r:Gdn(r))),a=uG(oIn(i,(GYn(),Hpt)),21),u=o.j,c.g){case 2:case 1:(u==(KQn(),yRt)||u==KRt)&&a.Fc((r_n(),cpt));break;case 4:case 3:(u==(KQn(),kRt)||u==_Rt)&&a.Fc((r_n(),cpt))}else r=Ipn(c),o=zUn(n,e,e==(can(),Wjt)?r:Gdn(r));return o}function NXn(n,t){var i,r,c,a,o;for(o=new bsn(new Nw(n.f.b).a);o.b;){if(c=uG((a=von(o)).ld(),602),1==t){if(c.Af()!=(xdn(),nxt)&&c.Af()!=QDt)continue}else if(c.Af()!=(xdn(),JDt)&&c.Af()!=YDt)continue;switch(r=uG(uG(a.md(),42).b,86),i=uG(uG(a.md(),42).a,194).c,c.Af().g){case 2:r.g.c=n.e.a,r.g.b=e.Math.max(1,r.g.b+i);break;case 1:r.g.c=r.g.c+i,r.g.b=e.Math.max(1,r.g.b-i);break;case 4:r.g.d=n.e.b,r.g.a=e.Math.max(1,r.g.a+i);break;case 3:r.g.d=r.g.d+i,r.g.a=e.Math.max(1,r.g.a-i)}}}function $Xn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(u=Inn(YHt,W1n,28,t.b.c.length,15,1),h=Inn(vbt,p1n,273,t.b.c.length,0,1),s=Inn(pbt,e6n,10,t.b.c.length,0,1),b=0,w=(l=n.a).length;b<w;++b){for(g=0,o=new Ww((f=l[b]).e);o.a<o.c.c.length;)++u[r=GL((c=uG(N3(o),10)).c)],d=uM(pK(oIn(t,(jYn(),dTt)))),u[r]>0&&s[r]&&(d=y$(n.b,s[r],c)),g=e.Math.max(g,c.c.c.b+d);for(a=new Ww(f.e);a.a<a.c.c.length;)(c=uG(N3(a),10)).n.b=g+c.d.d,(i=c.c).c.b=g+c.d.d+c.o.b+c.d.a,h[Ten(i.b.b,i,0)]=c.k,s[Ten(i.b.b,i,0)]=c}}function DXn(n,t){var e,i,r,c,a,o,u,s,f,l,b;for(i=new Fz(ix(eRn(t).a.Kc(),new h));hDn(i);)F$(zrn((!(e=uG(N9(i),74)).b&&(e.b=new f_(cFt,e,4,7)),e.b),0),193)||(u=lCn(uG(zrn((!e.c&&(e.c=new f_(cFt,e,5,8)),e.c),0),84)),z$n(e)||(a=t.i+t.g/2,o=t.j+t.f/2,f=u.i+u.g/2,l=u.j+u.f/2,(b=new sj).a=f-a,b.b=l-o,OEn(c=new MO(b.a,b.b),t.g,t.f),b.a-=c.a,b.b-=c.b,a=f-b.a,o=l-b.b,OEn(s=new MO(b.a,b.b),u.g,u.f),b.a-=s.a,b.b-=s.b,f=a+b.a,l=o+b.b,Tcn(r=JFn(e,!0,!0),a),Ecn(r,o),mcn(r,f),jcn(r,l),DXn(n,u)))}function xXn(n){hP(n,new hCn(FT(DT(KT(RT(new bu,dnt),"ELK SPOrE Compaction"),"ShrinkTree is a compaction algorithm that maintains the topology of a layout. The relocation of diagram elements is based on contracting a spanning tree."),new Yo))),U4(n,dnt,gnt,Jkn(yLt)),U4(n,dnt,pnt,Jkn(mLt)),U4(n,dnt,mnt,Jkn(pLt)),U4(n,dnt,vnt,Jkn(dLt)),U4(n,dnt,knt,Jkn(gLt)),U4(n,dnt,K3n,wLt),U4(n,dnt,o4n,8),U4(n,dnt,ynt,Jkn(kLt)),U4(n,dnt,Mnt,Jkn(hLt)),U4(n,dnt,Tnt,Jkn(fLt)),U4(n,dnt,q8n,(qx(),!1))}function RXn(n,t){var i,r,c,a,o,u,s,h,f,l;for(t.Ug("Simple node placement",1),l=uG(oIn(n,(GYn(),kmt)),312),u=0,a=new Ww(n.b);a.a<a.c.c.length;){for((o=(r=uG(N3(a),30)).c).b=0,i=null,h=new Ww(r.a);h.a<h.c.c.length;)s=uG(N3(h),10),i&&(o.b+=avn(s,i,l.c)),o.b+=s.d.d+s.o.b+s.d.a,i=s;u=e.Math.max(u,o.b)}for(c=new Ww(n.b);c.a<c.c.c.length;)for(f=(u-(o=(r=uG(N3(c),30)).c).b)/2,i=null,h=new Ww(r.a);h.a<h.c.c.length;)s=uG(N3(h),10),i&&(f+=avn(s,i,l.c)),f+=s.d.d,s.n.b=f,f+=s.o.b+s.d.a,i=s;t.Vg()}function KXn(n,t){var e,i,r,c;for(Frn(t.b.j),kS(YJ(new fX(null,new h3(t.d,16)),new cc),new ac),c=new Ww(t.d);c.a<c.c.c.length;){switch((r=uG(N3(c),105)).e.g){case 0:e=uG(zq(r.j,0),113).d.j,qb(r,uG(yx(Qz(uG(Y9(r.k,e),15).Oc(),Fdt)),113)),Gb(r,uG(yx(Wz(uG(Y9(r.k,e),15).Oc(),Fdt)),113));break;case 1:i=Ejn(r),qb(r,uG(yx(Qz(uG(Y9(r.k,i[0]),15).Oc(),Fdt)),113)),Gb(r,uG(yx(Wz(uG(Y9(r.k,i[1]),15).Oc(),Fdt)),113));break;case 2:FAn(n,r);break;case 3:IKn(r);break;case 4:DKn(n,r)}_rn(r)}n.a=null}function FXn(n,t,e){var i,r,c,a,o,u,s,h;return i=n.a.o==(w0(),dSt)?M0n:T0n,!(o=wGn(n,new _I(t,e))).a&&o.c?(aq(n.d,o),i):o.a?(r=o.a.c,u=o.a.d,e?(s=n.a.c==(b0(),fSt)?u:r,c=n.a.c==fSt?r:u,a=n.a.g[c.i.p],h=uM(n.a.p[a.p])+uM(n.a.d[c.i.p])+c.n.b+c.a.b-uM(n.a.d[s.i.p])-s.n.b-s.a.b):(s=n.a.c==(b0(),hSt)?u:r,c=n.a.c==hSt?r:u,h=uM(n.a.p[n.a.g[c.i.p].p])+uM(n.a.d[c.i.p])+c.n.b+c.a.b-uM(n.a.d[s.i.p])-s.n.b-s.a.b),n.a.n[n.a.g[r.i.p].p]=(qx(),!0),n.a.n[n.a.g[u.i.p].p]=!0,h):i}function _Xn(n,t,e,i){var r,c,a,o,u,s,h,f;if(0==i.gc())return!1;if(PP(),a=(u=uG(t,69).xk())?i:new Drn(i.gc()),EFn(n.e,t)){if(t.Si())for(h=i.Kc();h.Ob();)aqn(n,t,s=h.Pb(),F$(t,102)&&!!(uG(t,19).Bb&P0n))||(c=R5(t,s),a.Fc(c));else if(!u)for(h=i.Kc();h.Ob();)c=R5(t,s=h.Pb()),a.Fc(c)}else{for(f=VKn(n.e.Dh(),t),r=uG(n.g,124),o=0;o<n.i;++o)if(c=r[o],f.am(c.Lk()))throw hv(new vM(dct));if(i.gc()>1)throw hv(new vM(dct));u||(c=R5(t,i.Kc().Pb()),a.Fc(c))}return bfn(n,sAn(n,t,e),a)}function BXn(n,t,e){var i,r,c,a,o,u,s;if(EFn(n.e,t))PP(),C$n((o=uG(t,69).xk()?new Cq(t,n):new OA(t,n)).c,o.b),K$(o,uG(e,16));else{for(s=VKn(n.e.Dh(),t),i=uG(n.g,124),c=0;c<n.i;++c)if(r=i[c].Lk(),s.am(r)){if(r==(m$n(),NBt)||r==OBt){for(a=c,(u=wMn(n,t,e))?e_n(n,c):++c;c<n.i;)(r=i[c].Lk())==NBt||r==OBt?e_n(n,c):++c;u||uG(Uyn(n,a,R5(t,e)),76)}else wMn(n,t,e)?e_n(n,c):uG(Uyn(n,c,(PP(),uG(t,69).xk()?uG(e,76):R5(t,e))),76);return}wMn(n,t,e)||ttn(n,(PP(),uG(t,69).xk()?uG(e,76):R5(t,e)))}}function HXn(n,t,e){var i,r,c,a,o,u,s,h;return udn(e,n.b)||(n.b=e,c=new Jn,a=uG(l8(YJ(new fX(null,new h3(e.f,16)),c),gen(new W,new Q,new rn,new cn,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Out),Iut]))),21),n.e=!0,n.f=!0,n.c=!0,n.d=!0,r=a.Hc((vyn(),yht)),i=a.Hc(Mht),r&&!i&&(n.f=!1),!r&&i&&(n.d=!1),r=a.Hc(kht),i=a.Hc(Tht),r&&!i&&(n.c=!1),!r&&i&&(n.e=!1)),h=uG(n.a.Ve(t,e),42),u=uG(h.a,17).a,s=uG(h.b,17).a,o=!1,u<0?n.c||(o=!0):n.e||(o=!0),s<0?n.d||(o=!0):n.f||(o=!0),o?HXn(n,h,e):h}function UXn(n){var t,i,r,c;c=n.o,VK(),n.A.dc()||udn(n.A,lht)?t=c.b:(t=dNn(n.f),n.A.Hc((Qmn(),WRt))&&!n.B.Hc((oUn(),cKt))&&(t=e.Math.max(t,dNn(uG(AJ(n.p,(KQn(),kRt)),252))),t=e.Math.max(t,dNn(uG(AJ(n.p,_Rt),252)))),(i=fsn(n))&&(t=e.Math.max(t,i.b)),n.A.Hc(QRt)&&(n.q!=($Pn(),aRt)&&n.q!=cRt||(t=e.Math.max(t,eq(uG(AJ(n.b,(KQn(),kRt)),127))),t=e.Math.max(t,eq(uG(AJ(n.b,_Rt),127)))))),oM(gK(n.e.Tf().of((XYn(),H$t))))?c.b=e.Math.max(c.b,t):c.b=t,(r=n.f.i).d=0,r.a=t,rqn(n.f)}function GXn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b;for(h=0;h<t.length;h++){for(a=n.Kc();a.Ob();)uG(a.Pb(),230).hg(h,t);for(f=0;f<t[h].length;f++){for(o=n.Kc();o.Ob();)uG(o.Pb(),230).ig(h,f,t);for(b=t[h][f].j,l=0;l<b.c.length;l++){for(u=n.Kc();u.Ob();)uG(u.Pb(),230).jg(h,f,l,t);for(u3(l,b.c.length),e=0,r=new w7(uG(b.c[l],12).b);l$(r.a)||l$(r.b);)for(i=uG(l$(r.a)?N3(r.a):N3(r.b),18),s=n.Kc();s.Ob();)uG(s.Pb(),230).gg(h,f,l,e++,i,t)}}}for(c=n.Kc();c.Ob();)uG(c.Pb(),230).fg()}function qXn(n,t){var e,i,r,c,a;for(n.b=uM(pK(oIn(t,(jYn(),gTt)))),n.c=uM(pK(oIn(t,vTt))),n.d=uG(oIn(t,Zyt),350),n.a=uG(oIn(t,vyt),282),aTn(t),r=(c=uG(l8(JJ(JJ(sin(sin(new fX(null,new h3(t.b,16)),new ke),new ye),new Me),new Te),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15)).Kc();r.Ob();)e=uG(r.Pb(),18),uG(oIn(e,(GYn(),Tmt)),15).Jc(new og(n)),kfn(e,Tmt,null);for(i=c.Kc();i.Ob();)e=uG(i.Pb(),18),a=uG(oIn(e,(GYn(),jmt)),18),hYn(n,uG(oIn(e,ymt),15),a),kfn(e,ymt,null)}function XXn(n,t){var e,i,r,c,a,o,u;if(n.a){if(u=null,null!=(o=n.a.xe())?t.a+=""+o:null!=(a=n.a.mk())&&(-1!=(c=xL(a,$Cn(91)))?(s3(c,a.length+1),u=a.substr(c),t.a+=""+r1(null==a?IZn:(tJ(a),a),0,c)):t.a+=""+a),n.d&&0!=n.d.i){for(r=!0,t.a+="<",i=new DD(n.d);i.e!=i.i.gc();)e=uG(Zkn(i),89),r?r=!1:t.a+=TZn,XXn(e,t);t.a+=">"}null!=u&&(t.a+=""+u)}else n.e?null!=(o=n.e.zb)&&(t.a+=""+o):(t.a+="?",n.b?(t.a+=" super ",XXn(n.b,t)):n.f&&(t.a+=" extends ",XXn(n.f,t)))}function zXn(n){n.b=null,n.a=null,n.o=null,n.q=null,n.v=null,n.w=null,n.B=null,n.p=null,n.Q=null,n.R=null,n.S=null,n.T=null,n.U=null,n.V=null,n.W=null,n.bb=null,n.eb=null,n.ab=null,n.H=null,n.db=null,n.c=null,n.d=null,n.f=null,n.n=null,n.r=null,n.s=null,n.u=null,n.G=null,n.J=null,n.e=null,n.j=null,n.i=null,n.g=null,n.k=null,n.t=null,n.F=null,n.I=null,n.L=null,n.M=null,n.O=null,n.P=null,n.$=null,n.N=null,n.Z=null,n.cb=null,n.K=null,n.D=null,n.A=null,n.C=null,n._=null,n.fb=null,n.X=null,n.Y=null,n.gb=!1,n.hb=!1}function VXn(n){var t,i,r,c;if(r=bYn((!n.c&&(n.c=j2(Bsn(n.f))),n.c),0),0==n.e||0==n.a&&-1!=n.f&&n.e<0)return r;if(t=nun(n)<0?1:0,i=n.e,r.length,e.Math.abs(t0(n.e)),c=new QM,1==t&&(c.a+="-"),n.e>0)if((i-=r.length-t)>=0){for(c.a+="0.";i>Pot.length;i-=Pot.length)Xq(c,Pot);lF(c,Pot,t0(i)),JA(c,(s3(t,r.length+1),r.substr(t)))}else JA(c,r1(r,t,t0(i=t-i))),c.a+=".",JA(c,sQ(r,t0(i)));else{for(JA(c,(s3(t,r.length+1),r.substr(t)));i<-Pot.length;i+=Pot.length)Xq(c,Pot);lF(c,Pot,t0(-i))}return c.a}function WXn(n){var t,e,i,r,c;if(n.k!=(zIn(),dbt))return!1;if(n.j.c.length<=1)return!1;if(uG(oIn(n,(jYn(),JMt)),101)==($Pn(),cRt))return!1;if(Yyn(),(i=(n.q?n.q:(hZ(),hZ(),Vot))._b(LMt)?uG(oIn(n,LMt),203):uG(oIn(HQ(n),NMt),203))==djt)return!1;if(i!=wjt&&i!=bjt){if(r=uM(pK(Omn(n,ITt))),!(t=uG(oIn(n,CTt),140))&&(t=new OF(r,r,r,r)),c=Dgn(n,(KQn(),_Rt)),t.d+t.a+(c.gc()-1)*r>n.o.b)return!1;if(e=Dgn(n,kRt),t.d+t.a+(e.gc()-1)*r>n.o.b)return!1}return!0}function QXn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d;t.Ug("Orthogonal edge routing",1),s=uM(pK(oIn(n,(jYn(),STt)))),e=uM(pK(oIn(n,gTt))),i=uM(pK(oIn(n,vTt))),l=new NW(0,e),d=0,a=new N4(n.b,0),o=null,h=null,u=null,f=null;do{f=(h=a.b<a.d.gc()?(MK(a.b<a.d.gc()),uG(a.d.Xb(a.c=a.b++),30)):null)?h.a:null,o&&(Vzn(o,d),d+=o.c.a),w=YVn(l,n,u,f,o?d+i:d),r=!o||UA(u,(oFn(),LSt)),c=!h||UA(f,(oFn(),LSt)),w>0?(b=(w-1)*e,o&&(b+=i),h&&(b+=i),b<s&&!r&&!c&&(b=s),d+=b):!r&&!c&&(d+=s),o=h,u=f}while(h);n.f.a=d,t.Vg()}function JXn(n,t){var e,i,r,c,a,o,u,s,h,f;if(h=null,n.d&&(h=uG(U1(n.d,t),142)),!h){if(f=(c=n.a.vi()).i,!n.d||oS(n.d)!=f){for(u=new Ym,n.d&&xun(u,n.d),o=s=u.f.c+u.i.c;o<f;++o)i=uG(zrn(c,o),142),(e=uG(null==(r=tdn(n.e,i).xe())?VAn(u.f,null,i):kgn(u.i,r,i),142))&&e!=i&&(null==r?VAn(u.f,null,e):kgn(u.i,r,e));if(u.f.c+u.i.c!=f)for(a=0;a<s;++a)i=uG(zrn(c,a),142),(e=uG(null==(r=tdn(n.e,i).xe())?VAn(u.f,null,i):kgn(u.i,r,i),142))&&e!=i&&(null==r?VAn(u.f,null,e):kgn(u.i,r,e));n.d=u}h=uG(U1(n.d,t),142)}return h}function YXn(n,t,i,r,c,a,o){var u,s,h,f,l,b,w;return l=oM(gK(oIn(t,(jYn(),EMt)))),b=null,a==(can(),Vjt)&&r.c.i==i?b=r.c:a==Wjt&&r.d.i==i&&(b=r.d),(h=o)&&l&&!b?(kD(h.e,r),w=e.Math.max(uM(pK(oIn(h.d,tMt))),uM(pK(oIn(r,tMt)))),kfn(h.d,tMt,w)):(KQn(),f=FRt,b?f=b.j:sN(uG(oIn(i,JMt),101))&&(f=a==Vjt?_Rt:kRt),s=nzn(n,t,i,a,f,r),u=K9((HQ(i),r)),a==Vjt?(c2(u,uG(zq(s.j,0),12)),u2(u,c)):(c2(u,c),u2(u,uG(zq(s.j,0),12))),h=new Sdn(r,u,s,uG(oIn(s,(GYn(),rmt)),12),a,!b)),UNn(n.a,r,new $B(h.d,t,a)),h}function ZXn(){var n;ZXn=E,GFt=new Xk,HFt=Inn($ot,zZn,2,0,6,1),zFt=S3(Zhn(33,58),Zhn(1,26)),VFt=S3(Zhn(97,122),Zhn(65,90)),WFt=Zhn(48,57),qFt=S3(zFt,0),XFt=S3(VFt,WFt),QFt=S3(S3(0,Zhn(1,6)),Zhn(33,38)),JFt=S3(S3(WFt,Zhn(65,70)),Zhn(97,102)),e_t=S3(qFt,tyn("-_.!~*'()")),i_t=S3(XFt,mmn("-_.!~*'()")),tyn(zit),mmn(zit),S3(e_t,tyn(";:@&=+$,")),S3(i_t,mmn(";:@&=+$,")),YFt=tyn(":/?#"),ZFt=mmn(":/?#"),n_t=tyn("/?#"),t_t=mmn("/?#"),(n=new ek).a.zc("jar",n),n.a.zc("zip",n),n.a.zc("archive",n),hZ(),UFt=new nT(n)}function nzn(n,t,e,i,r,c){var a,o,u,s,h,f;return a=null,s=i==(can(),Vjt)?c.c:c.d,u=pgn(t),s.i==e?(a=uG(cQ(n.b,s),10))||(kfn(a=DJn(s,uG(oIn(e,(jYn(),JMt)),101),r,VHn(s),null,s.n,s.o,u,t),(GYn(),rmt),s),vJ(n.b,s,a)):(o=wPn(a=DJn((h=new Yn,f=uM(pK(oIn(t,(jYn(),dTt))))/2,vfn(h,QMt,f),h),uG(oIn(e,JMt),101),r,i==Vjt?-1:1,null,new sj,new MO(0,0),u,t),e,i),kfn(a,(GYn(),rmt),o),vJ(n.b,o,a)),uG(oIn(t,(GYn(),Hpt)),21).Fc((r_n(),tpt)),sN(uG(oIn(t,(jYn(),JMt)),101))?kfn(t,JMt,($Pn(),oRt)):kfn(t,JMt,($Pn(),uRt)),a}function tzn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b;o=0,b=0,u=q1(n.g,n.g.length),c=n.e,a=n.j,i=n.b,r=n.c;do{for(l=0,s=new Ww(n.q);s.a<s.c.c.length;)f=QVn(n,uG(N3(s),10)),e=!0,(n.r==(THn(),Ijt)||n.r==Ljt)&&(e=oM(gK(f.b))),uG(f.a,17).a<0&&e?(++l,u=q1(n.g,n.g.length),n.e=n.e+uG(f.a,17).a,b+=c-n.e,c=n.e+uG(f.a,17).a,a=n.j,i=T3(n.b),r=T3(n.c)):(n.g=q1(u,u.length),n.e=c,n.b=(WW(i),i?new Z_(i):rG(new Ww(i))),n.c=(WW(r),r?new Z_(r):rG(new Ww(r))),n.j=a);++o,h=0!=l&&oM(gK(t.Kb(new WO(xwn(b),xwn(o)))))}while(h)}function ezn(n,t,i,r){var c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;return a=n.f,l=t.f,o=a==(_Rn(),DAt)||a==RAt,u=a==xAt||a==KAt,b=l==xAt||l==KAt,s=a==xAt||a==DAt,w=l==xAt||l==DAt,!o||l!=DAt&&l!=RAt?u&&b?n.f==KAt?n:t:s&&w?(a==xAt?(f=n,h=t):(f=t,h=n),d=i.j+i.f,g=f.e+r.f,p=e.Math.max(d,g)-e.Math.min(i.j,f.e),c=(f.d+r.g-i.i)*p,m=i.i+i.g,v=h.d+r.g,c<=(e.Math.max(m,v)-e.Math.min(i.i,h.d))*(h.e+r.f-i.j)?n.f==xAt?n:t:n.f==DAt?n:t):n:n.f==RAt?n:t}function izn(n,t){var e,i,r,c,a;if(kfn(t,(OQn(),xPt),0),r=uG(oIn(t,LPt),40),0==t.d.b)r?(a=uM(pK(oIn(r,FPt)))+n.b+Mgn(n,r,t),kfn(t,FPt,a)):kfn(t,FPt,0);else{for(e=new Tp(Fkn(new Mp(t).a.d,0));Jj(e.a);)izn(n,uG(I6(e.a),65).c);i=uG(B$(new Tp(Fkn(new Mp(t).a.d,0))),40),c=(uM(pK(oIn(uG(hx(new Tp(Fkn(new Mp(t).a.d,0))),40),FPt)))+uM(pK(oIn(i,FPt))))/2,r?(a=uM(pK(oIn(r,FPt)))+n.b+Mgn(n,r,t),kfn(t,FPt,a),kfn(t,xPt,uM(pK(oIn(t,FPt)))-c),ZVn(n,t)):kfn(t,FPt,c)}}function rzn(n){var t,e,i,r,c,a,o,u,s,h;for(s=n.e.a.c.length,c=new Ww(n.e.a);c.a<c.c.c.length;)uG(N3(c),125).j=!1;for(n.i=Inn(YHt,W1n,28,s,15,1),n.g=Inn(YHt,W1n,28,s,15,1),n.n=new Zm,r=0,h=new Zm,o=new Ww(n.e.a);o.a<o.c.c.length;)(a=uG(N3(o),125)).d=r++,0==a.b.a.c.length&&kD(n.n,a),Ohn(h,a.g);for(t=0,i=new Ww(h);i.a<i.c.c.length;)(e=uG(N3(i),218)).c=t++,e.f=!1;u=h.c.length,null==n.b||n.b.length<u?(n.b=Inn(eUt,I0n,28,u,15,1),n.c=Inn(ZHt,B2n,28,u,16,1)):AM(n.c),n.d=h,n.p=new dx(orn(n.d.c.length)),n.j=1}function czn(n,t){var e,i,r,c,a,o,u,s,h;if(!(t.e.c.length<=1)){for(n.f=t,n.d=uG(oIn(n.f,(Bjn(),rlt)),391),n.g=uG(oIn(n.f,ult),17).a,n.e=uM(pK(oIn(n.f,clt))),n.c=uM(pK(oIn(n.f,ilt))),nW(n.b),r=new Ww(n.f.c);r.a<r.c.c.length;)i=uG(N3(r),290),JHn(n.b,i.c,i,null),JHn(n.b,i.d,i,null);for(o=n.f.e.c.length,n.a=Jq(eUt,[zZn,I0n],[109,28],15,[o,o],2),s=new Ww(n.f.e);s.a<s.c.c.length;)Qqn(n,u=uG(N3(s),153),n.a[u.a]);for(n.i=Jq(eUt,[zZn,I0n],[109,28],15,[o,o],2),c=0;c<o;++c)for(a=0;a<o;++a)h=1/((e=n.a[c][a])*e),n.i[c][a]=h}}function azn(n,t){var e,i,r,c,a,o,u,s,h,f,l;if((o=t.ah())||t.Ug(W3n,1),a=1/(e=uG(oIn(n,(GYn(),wmt)),15)).gc(),t._g())for(t.bh("ELK Layered uses the following "+e.gc()+" modules:"),l=0,f=e.Kc();f.Ob();)s=uG(f.Pb(),47),i=(l<10?"0":"")+l++,t.bh(" Slot "+i+": "+Ij(Tbn(s)));for(h=e.Kc();h.Ob();){if(s=uG(h.Pb(),47),t.$g())return;s.Kf(n,t.eh(a))}for(c=new Ww(n.b);c.a<c.c.c.length;)r=uG(N3(c),30),Ohn(n.a,r.a),r.a.c.length=0;for(u=new Ww(n.a);u.a<u.c.c.length;)a2(uG(N3(u),10),null);n.b.c.length=0,o||t.Vg()}function ozn(n){var t,e,i,r,c,a,o,u,s,h,f;if(u=new Zm,!vR(n,(GYn(),Rpt)))return u;for(i=uG(oIn(n,Rpt),15).Kc();i.Ob();)Dzn(t=uG(i.Pb(),10),n),mv(u.c,t);for(r=new Ww(n.b);r.a<r.c.c.length;)for(a=new Ww(uG(N3(r),30).a);a.a<a.c.c.length;)(c=uG(N3(a),10)).k==(zIn(),lbt)&&(o=uG(oIn(c,Kpt),10))&&(o2(s=new lOn,c),NLn(s,uG(oIn(c,Fpt),64)),h=uG(zq(o.j,0),12),c2(f=new UZ,s),u2(f,h));for(e=new Ww(u);e.a<e.c.c.length;)a2(t=uG(N3(e),10),uG(zq(n.b,n.b.c.length-1),30));return u}function uzn(n,t,e){var i,r,c,a,o,u,s,h;for(h=new Zm,c=0,fan(s=new e4(0,e),new dln(0,0,s,e)),r=0,u=new DD(n);u.e!=u.i.gc();)o=uG(Zkn(u),27),i=uG(zq(s.a,s.a.c.length-1),172),(r+o.g+(0==uG(zq(s.a,0),172).b.c.length?0:e)>t||oM(gK(zDn(o,(S_n(),nAt)))))&&(r=0,c+=s.b+e,mv(h.c,s),fan(s=new e4(c,e),i=new dln(0,s.f,s,e)),r=0),0==i.b.c.length||!oM(gK(zDn(R0(o),(S_n(),uAt))))&&(o.f>=i.o&&o.f<=i.f||.5*i.a<=o.f&&1.5*i.a>=o.f)?ipn(i,o):(fan(s,a=new dln(i.s+i.r+e,s.f,s,e)),ipn(a,o)),r=o.i+o.g;return mv(h.c,s),h}function szn(n){var t,e,i,r;if(!(null==n.b||n.b.length<=2||n.a)){for(t=0,r=0;r<n.b.length;){for(t!=r?(n.b[t]=n.b[r++],n.b[t+1]=n.b[r++]):r+=2,e=n.b[t+1];r<n.b.length&&!(e+1<n.b[r]);)if(e+1==n.b[r])n.b[t+1]=n.b[r+1],e=n.b[t+1],r+=2;else if(e>=n.b[r+1])r+=2;else{if(!(e<n.b[r+1]))throw hv(new Ky("Token#compactRanges(): Internel Error: ["+n.b[t]+","+n.b[t+1]+"] ["+n.b[r]+","+n.b[r+1]+"]"));n.b[t+1]=n.b[r+1],e=n.b[t+1],r+=2}t+=2}t!=n.b.length&&(i=Inn(YHt,W1n,28,t,15,1),qGn(n.b,0,i,0,t),n.b=i),n.a=!0}}function hzn(n,t){var e,i,r,c,a,o,u;for(a=kz(n.a).Kc();a.Ob();){if((c=uG(a.Pb(),18)).b.c.length>0)for(i=new Z_(uG(Y9(n.a,c),21)),hZ(),f$(i,new Gd(t)),r=new N4(c.b,0);r.b<r.d.gc();){switch(MK(r.b<r.d.gc()),e=uG(r.d.Xb(r.c=r.b++),72),o=-1,uG(oIn(e,(jYn(),Xyt)),278).g){case 1:o=i.c.length-1;break;case 0:o=DSn(i);break;case 2:o=0}-1!=o&&(u3(o,i.c.length),kD((u=uG(i.c[o],249)).b.b,e),uG(oIn(HQ(u.b.c.i),(GYn(),Hpt)),21).Fc((r_n(),npt)),uG(oIn(HQ(u.b.c.i),Hpt),21).Fc(Ygt),LQ(r),kfn(e,omt,c))}c2(c,null),u2(c,null)}}function fzn(n,t){var e,i,r,c;return e=new Rn,1==(r=2==(r=(i=uG(l8(YJ(new fX(null,new h3(n.f,16)),e),gen(new W,new Q,new rn,new cn,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Out),Iut]))),21)).gc())?1:0)&&_A(Kmn(uG(l8(JJ(i.Lc(),new Kn),tsn(Hvn(0),new tn)),168).a,2),0)&&(r=0),1==(c=2==(c=(i=uG(l8(YJ(new fX(null,new h3(t.f,16)),e),gen(new W,new Q,new rn,new cn,Uhn(cT(Rut,1),p1n,108,0,[Out,Iut]))),21)).gc())?1:0)&&_A(Kmn(uG(l8(JJ(i.Lc(),new Fn),tsn(Hvn(0),new tn)),168).a,2),0)&&(c=0),r<c?-1:r==c?0:1}function lzn(n){var t,e,i,r,c,a,o,u,s,h,f,l;for(c=oM(gK(zDn(t=h0(n),(jYn(),sMt)))),h=0,r=0,s=new DD((!n.e&&(n.e=new f_(aFt,n,7,4)),n.e));s.e!=s.i.gc();)a=(o=BNn(u=uG(Zkn(s),74)))&&c&&oM(gK(zDn(u,hMt))),l=lCn(uG(zrn((!u.c&&(u.c=new f_(cFt,u,5,8)),u.c),0),84)),o&&a?++r:o&&!a?++h:R0(l)==t||l==t?++r:++h;for(i=new DD((!n.d&&(n.d=new f_(aFt,n,8,5)),n.d));i.e!=i.i.gc();)a=(o=BNn(e=uG(Zkn(i),74)))&&c&&oM(gK(zDn(e,hMt))),f=lCn(uG(zrn((!e.b&&(e.b=new f_(cFt,e,4,7)),e.b),0),84)),o&&a?++h:o&&!a?++r:R0(f)==t||f==t?++h:++r;return h-r}function bzn(n,t){var e,i,r,c,a,o,u,s,h;if(t.Ug("Edge splitting",1),n.b.c.length<=2)t.Vg();else{for(MK((c=new N4(n.b,0)).b<c.d.gc()),a=uG(c.d.Xb(c.c=c.b++),30);c.b<c.d.gc();)for(r=a,MK(c.b<c.d.gc()),a=uG(c.d.Xb(c.c=c.b++),30),o=new Ww(r.a);o.a<o.c.c.length;)for(u=new Ww(uG(N3(o),10).j);u.a<u.c.c.length;)for(i=new Ww(uG(N3(u),12).g);i.a<i.c.c.length;)(s=(e=uG(N3(i),18)).d.i.c)!=r&&s!=a&&xFn(e,(Hb(h=new gMn(n),(zIn(),wbt)),kfn(h,(GYn(),rmt),e),kfn(h,(jYn(),JMt),($Pn(),cRt)),a2(h,a),h));t.Vg()}}function wzn(n,t){var e,i,r,c,a,o,u,s,h,f,l;for(h=new Zm,l=new ek,a=t.b,r=0;r<a.c.length;r++){for(s=(u3(r,a.c.length),uG(a.c[r],30)).a,h.c.length=0,c=0;c<s.c.length;c++)(o=n.a[r][c]).p=c,o.k==(zIn(),gbt)&&mv(h.c,o),Y8(uG(zq(t.b,r),30).a,c,o),o.j.c.length=0,Ohn(o.j,uG(uG(zq(n.b,r),15).Xb(c),16)),L_(uG(oIn(o,(jYn(),JMt)),101))||kfn(o,JMt,($Pn(),rRt));for(i=new Ww(h);i.a<i.c.c.length;)f=ZBn(e=uG(N3(i),10)),l.a.zc(f,l),l.a.zc(e,l)}for(u=l.a.ec().Kc();u.Ob();)o=uG(u.Pb(),10),hZ(),f$(o.j,(Cln(),Ywt)),o.i=!0,qLn(o)}function dzn(n){var t,e,i,r,c;return null!=n.g?n.g:n.a<32?(n.g=YQn(Bsn(n.f),t0(n.e)),n.g):(r=bYn((!n.c&&(n.c=j2(Bsn(n.f))),n.c),0),0==n.e?r:(t=(!n.c&&(n.c=j2(Bsn(n.f))),n.c).e<0?2:1,e=r.length,i=-n.e+e-t,(c=new WM).a+=""+r,n.e>0&&i>=-6?i>=0?Ex(c,e-t0(n.e),String.fromCharCode(46)):(psn(c,t-1,t-1,"0."),Ex(c,t+1,mvn(Pot,0,-t0(i)-1))):(e-t>=1&&(Ex(c,t,String.fromCharCode(46)),++e),Ex(c,e,String.fromCharCode(69)),i>0&&Ex(c,++e,String.fromCharCode(43)),Ex(c,++e,""+oV(Bsn(i)))),n.g=c.a,n.g))}function gzn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;r=uM(pK(oIn(t,(jYn(),AMt)))),l=4,c=3,M=20/(y=uG(oIn(t,OTt),17).a),b=!1,s=0,o=vZn;do{for(a=1!=s,f=0!=s,T=0,m=0,k=(g=n.a).length;m<k;++m)(w=g[m]).f=null,aQn(n,w,a,f,r),T+=e.Math.abs(w.a);do{u=tGn(n,t)}while(u);for(p=0,v=(d=n.a).length;p<v;++p)if(0!=(i=uV(w=d[p]).a))for(h=new Ww(w.e);h.a<h.c.c.length;)uG(N3(h),10).n.b+=i;0==s||1==s?--l<=0&&(T<o||-l>y)?(s=2,o=vZn):0==s?(s=1,o=T):(s=0,o=T):(b=T>=o||o-T<M,o=T,b&&--c)}while(!(b&&c<=0))}function pzn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w;for(w=new Ym,c=n.a.ec().Kc();c.Ob();)vJ(w,i=uG(c.Pb(),177),e.af(i));for(WW(n),f$(a=n?new Z_(n):rG(n.a.ec().Kc()),new Cd(w)),o=g8(a),u=new C$(t),VAn((b=new Ym).f,t,u);0!=o.a.gc();){for(s=null,h=null,f=null,r=o.a.ec().Kc();r.Ob();)if(i=uG(r.Pb(),177),uM(pK(DA(FX(w.f,i))))<=M0n){if(PV(b,i.a)&&!PV(b,i.b)){h=i.b,f=i.a,s=i;break}if(PV(b,i.b)&&!PV(b,i.a)){h=i.a,f=i.b,s=i;break}}if(!s)break;l=new C$(h),kD(uG(DA(FX(b.f,f)),225).a,l),VAn(b.f,h,l),o.a.Bc(s)}return u}function mzn(n,t,e){var i,r,c,a,o,u,s,h;for(e.Ug("Depth-first cycle removal",1),u=(s=t.a).c.length,n.c=new Zm,n.d=Inn(ZHt,B2n,28,u,16,1),n.a=Inn(ZHt,B2n,28,u,16,1),n.b=new Zm,c=0,o=new Ww(s);o.a<o.c.c.length;)(a=uG(N3(o),10)).p=c,P6(qgn(a))&&kD(n.c,a),++c;for(h=new Ww(n.c);h.a<h.c.c.length;)LAn(n,uG(N3(h),10));for(r=0;r<u;r++)n.d[r]||(u3(r,s.c.length),LAn(n,uG(s.c[r],10)));for(i=new Ww(n.b);i.a<i.c.c.length;)pqn(uG(N3(i),18),!0),kfn(t,(GYn(),Lpt),(qx(),!0));n.c=null,n.d=null,n.a=null,n.b=null,e.Vg()}function vzn(n,t){var i,r,c,a,o,u;return l_n(),a=t.c-(n.c+n.b),c=n.c-(t.c+t.b),o=n.d-(t.d+t.a),i=t.d-(n.d+n.a),r=e.Math.max(c,a),u=e.Math.max(o,i),YN(),oan(I9n),(e.Math.abs(r)<=I9n||0==r||isNaN(r)&&isNaN(0)?0:r<0?-1:r>0?1:KL(isNaN(r),isNaN(0)))>=0^(oan(I9n),(e.Math.abs(u)<=I9n||0==u||isNaN(u)&&isNaN(0)?0:u<0?-1:u>0?1:KL(isNaN(u),isNaN(0)))>=0)?e.Math.max(u,r):(oan(I9n),(e.Math.abs(r)<=I9n||0==r||isNaN(r)&&isNaN(0)?0:r<0?-1:r>0?1:KL(isNaN(r),isNaN(0)))>0?e.Math.sqrt(u*u+r*r):-e.Math.sqrt(u*u+r*r))}function kzn(n,t){var e,i,r,c,a;if(t)if(!n.a&&(n.a=new ck),2!=n.e)if(1!=t.e)0!=(a=n.a.a.c.length)?0!=(c=uG(DQ(n.a,a-1),122)).e&&10!=c.e||0!=t.e&&10!=t.e?zv(n.a,t):(0==t.e||t.Mm().length,0==c.e?(e=new VM,(i=c.Km())>=P0n?VA(e,Ogn(i)):TQ(e,i&D1n),c=new F1(10,null,0),GV(n.a,c,a-1)):(c.Mm().length,VA(e=new VM,c.Mm())),0==t.e?(i=t.Km())>=P0n?VA(e,Ogn(i)):TQ(e,i&D1n):VA(e,t.Mm()),uG(c,530).b=e.a):zv(n.a,t);else for(r=0;r<t.Pm();r++)kzn(n,t.Lm(r));else zv(n.a,t)}function yzn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;if(!e.dc()){for(a=0,h=0,l=uG((i=e.Kc()).Pb(),17).a;a<t.f;){if(a==l&&(h=0,l=i.Ob()?uG(i.Pb(),17).a:t.f+1),a!=h)for(b=uG(zq(n.b,a),30),f=uG(zq(n.b,h),30),s=new Ww(T3(b.a));s.a<s.c.c.length;)if($jn(u=uG(N3(s),10),f.a.c.length,f),0==h)for(c=new Ww(T3(qgn(u)));c.a<c.c.c.length;)pqn(r=uG(N3(c),18),!0),kfn(n,(GYn(),Lpt),(qx(),!0)),gVn(n,r,1);++h,++a}for(o=new N4(n.b,0);o.b<o.d.gc();)MK(o.b<o.d.gc()),0==uG(o.d.Xb(o.c=o.b++),30).a.c.length&&LQ(o)}}function Mzn(n,t,e){var i,r,c;if((r=uG(oIn(t,(jYn(),vyt)),282))!=(RIn(),Vgt)){switch(e.Ug("Horizontal Compaction",1),n.a=t,vT(i=new w$n(((c=new Sen).d=t,c.c=uG(oIn(c.d,Vyt),223),F_n(c),VVn(c),rBn(c),c.a)),n.b),1===uG(oIn(t,myt),431).g?pT(i,new Kon(n.a)):pT(i,(fZ(),qut)),r.g){case 1:kxn(i);break;case 2:kxn(GWn(i,(xdn(),YDt)));break;case 3:kxn(mT(GWn(kxn(i),(xdn(),YDt)),new gr));break;case 4:kxn(mT(GWn(kxn(i),(xdn(),YDt)),new Sg(c)));break;case 5:kxn(gT(i,idt))}GWn(i,(xdn(),JDt)),i.e=!0,UWn(c),e.Vg()}}function Tzn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(h=(a=t.b).o,u=a.d,i=uM(pK(eyn(a,(jYn(),dTt)))),r=uM(pK(eyn(a,pTt))),s=uM(pK(eyn(a,PTt))),pG(o=new $k,u.d,u.c,u.a,u.b),l=PBn(t,i,r,s),p=new Ww(t.d);p.a<p.c.c.length;){for(w=(g=uG(N3(p),105)).f.a.ec().Kc();w.Ob();)c=(b=uG(w.Pb(),340)).a,f=sCn(b),m=new Uk,ZPn(b,b.c,l,m),EIn(b,f,l,m),ZPn(b,b.d,l,m),e=m,e=n.ng(b,f,e),BY(c.a),Qon(c.a,e),kS(new fX(null,new h3(e,16)),new GC(h,o));(d=g.i)&&(qPn(g,d,l,r),Jvn(h,o,v=new eN(d.g)),JF(v,d.j),Jvn(h,o,v))}pG(u,o.d,o.c,o.a,o.b)}function jzn(n,t,e,i,r,c,a,o){var u,s,h,f;switch(u=n7(Uhn(cT(_At,1),EZn,238,0,[t,e,i,r])),f=null,n.b.g){case 1:f=n7(Uhn(cT(TAt,1),EZn,535,0,[new Go,new Bo,new Ho]));break;case 0:f=n7(Uhn(cT(TAt,1),EZn,535,0,[new Ho,new Bo,new Go]));break;case 2:f=n7(Uhn(cT(TAt,1),EZn,535,0,[new Bo,new Go,new Ho]))}for(h=new Ww(f);h.a<h.c.c.length;)s=uG(N3(h),535),u.c.length>1&&(u=s.Hg(u,n.a,o));return 1==u.c.length?uG(zq(u,u.c.length-1),238):2==u.c.length?ezn((u3(0,u.c.length),uG(u.c[0],238)),(u3(1,u.c.length),uG(u.c[1],238)),a,c):null}function Ezn(n,t,e){var i,r,c,a,o,u,s;for(e.Ug("Find roots",1),n.a.c.length=0,r=Fkn(t.b,0);r.b!=r.d.c;)0==(i=uG(I6(r),40)).b.b&&(kfn(i,(OQn(),UPt),(qx(),!0)),kD(n.a,i));switch(n.a.c.length){case 0:kfn(c=new wln(0,t,"DUMMY_ROOT"),(OQn(),UPt),(qx(),!0)),kfn(c,jPt,!0),aq(t.b,c);break;case 1:break;default:for(a=new wln(0,t,H9n),u=new Ww(n.a);u.a<u.c.c.length;)kfn(s=new uZ(a,o=uG(N3(u),40)),(OQn(),jPt),(qx(),!0)),aq(a.a.a,s),aq(a.d,s),aq(o.b,s),kfn(o,UPt,!1);kfn(a,(OQn(),UPt),(qx(),!0)),kfn(a,jPt,!0),aq(t.b,a)}e.Vg()}function Szn(n){var t,i,r,c,a,o;for(Prn(n.a,new Zn),i=new Ww(n.a);i.a<i.c.c.length;)t=uG(N3(i),225),r=YF(D$(uG(n.b,68).c),uG(t.b,68).c),xht?(o=uG(n.b,68).b,a=uG(t.b,68).b,e.Math.abs(r.a)>=e.Math.abs(r.b)?(r.b=0,a.d+a.a>o.d&&a.d<o.d+o.a&&RG(r,e.Math.max(o.c-(a.c+a.b),a.c-(o.c+o.b)))):(r.a=0,a.c+a.b>o.c&&a.c<o.c+o.b&&RG(r,e.Math.max(o.d-(a.d+a.a),a.d-(o.d+o.a))))):RG(r,OGn(uG(n.b,68),uG(t.b,68))),c=e.Math.sqrt(r.a*r.a+r.b*r.b),RG(r,c=EPn(Cht,t,c,r)),JX(uG(t.b,68),r),Prn(t.a,new Dd(r)),uG(Cht.b,68),Rnn(Cht,Iht,t)}function Pzn(n){var t,i,r,c,a,o,u,s,f,l,b,w;for(n.f=new ak,u=0,r=0,c=new Ww(n.e.b);c.a<c.c.c.length;)for(o=new Ww(uG(N3(c),30).a);o.a<o.c.c.length;){for((a=uG(N3(o),10)).p=u++,i=new Fz(ix(Xgn(a).a.Kc(),new h));hDn(i);)uG(N9(i),18).p=r++;for(t=WXn(a),l=new Ww(a.j);l.a<l.c.c.length;)f=uG(N3(l),12),t&&(w=f.a.b)!=e.Math.floor(w)&&(s=w-W4(Bsn(e.Math.round(w))),f.a.b-=s),(b=f.n.b+f.a.b)!=e.Math.floor(b)&&(s=b-W4(Bsn(e.Math.round(b))),f.n.b-=s)}n.g=u,n.b=r,n.i=Inn(lSt,EZn,412,u,0,1),n.c=Inn(uSt,EZn,655,r,0,1),n.d.a.$b()}function Czn(n){var t,e,i,r,c,a,o,u,s;if(n.Pj())if(u=n.Qj(),n.i>0){if(t=new AA(n.i,n.g),c=(e=n.i)<100?null:new cj(e),n.Tj())for(i=0;i<n.i;++i)a=n.g[i],c=n.Vj(a,c);if(V9(n),r=1==e?n.Ij(4,zrn(t,0),null,0,u):n.Ij(6,t,null,-1,u),n.Mj()){for(i=new nR(t);i.e!=i.i.gc();)c=n.Oj(nyn(i),c);c?(c.nj(r),c.oj()):n.Jj(r)}else c?(c.nj(r),c.oj()):n.Jj(r)}else V9(n),n.Jj(n.Ij(6,(hZ(),zot),null,-1,u));else if(n.Mj())if(n.i>0){for(o=n.g,s=n.i,V9(n),c=s<100?null:new cj(s),i=0;i<s;++i)a=o[i],c=n.Oj(a,c);c&&c.oj()}else V9(n);else V9(n)}function Izn(n,t,i){var r,c,a,o,u,s,h,f,l;for(thn(this),i==(l0(),USt)?FV(this.r,n):FV(this.w,n),f=M0n,h=T0n,o=t.a.ec().Kc();o.Ob();)c=uG(o.Pb(),42),u=uG(c.a,465),(s=(r=uG(c.b,18)).c)==n&&(s=r.d),FV(u==USt?this.r:this.w,s),l=(KQn(),LRt).Hc(s.j)?uM(pK(oIn(s,(GYn(),Mmt)))):Gfn(Uhn(cT(PNt,1),zZn,8,0,[s.i.n,s.n,s.a])).b,f=e.Math.min(f,l),h=e.Math.max(h,l);for(NIn(this,(KQn(),LRt).Hc(n.j)?uM(pK(oIn(n,(GYn(),Mmt)))):Gfn(Uhn(cT(PNt,1),zZn,8,0,[n.i.n,n.n,n.a])).b,f,h),a=t.a.ec().Kc();a.Ob();)c=uG(a.Pb(),42),HOn(this,uG(c.b,18));this.o=!1}function Ozn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;return e=8191&n.l,i=n.l>>13|(15&n.m)<<9,r=n.m>>4&8191,c=n.m>>17|(255&n.h)<<5,a=(1048320&n.h)>>8,g=i*(o=8191&t.l),p=r*o,m=c*o,v=a*o,0!=(u=t.l>>13|(15&t.m)<<9)&&(g+=e*u,p+=i*u,m+=r*u,v+=c*u),0!=(s=t.m>>4&8191)&&(p+=e*s,m+=i*s,v+=r*s),0!=(h=t.m>>17|(255&t.h)<<5)&&(m+=e*h,v+=i*h),0!=(f=(1048320&t.h)>>8)&&(v+=e*f),b=((d=e*o)>>22)+(g>>9)+((262143&p)<<4)+((31&m)<<17),w=(p>>18)+(m>>5)+((4095&v)<<8),w+=(b+=(l=(d&f0n)+((511&g)<<13))>>22)>>22,p$(l&=f0n,b&=f0n,w&=l0n)}function Azn(n){var t,i,r,c,a,o,u;if(0!=(u=uG(zq(n.j,0),12)).g.c.length&&0!=u.e.c.length)throw hv(new kM("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges."));if(0!=u.g.c.length){for(a=M0n,i=new Ww(u.g);i.a<i.c.c.length;)t=uG(N3(i),18),r=uG(oIn(o=t.d.i,(jYn(),TMt)),140),a=e.Math.min(a,o.n.a-r.b);return new Ul(WW(a))}if(0!=u.e.c.length){for(c=T0n,i=new Ww(u.e);i.a<i.c.c.length;)t=uG(N3(i),18),r=uG(oIn(o=t.c.i,(jYn(),TMt)),140),c=e.Math.max(c,o.n.a+o.o.a+r.c);return new Ul(WW(c))}return gy(),gy(),wat}function Lzn(n,t){var e,i,r,c,a,o;if(n.ol()){if(n.i>4){if(!n.fk(t))return!1;if(n.al()){if(o=(e=(i=uG(t,54)).Eh())==n.e&&(n.ml()?i.yh(i.Fh(),n.il())==n.jl():-1-i.Fh()==n.Lj()),n.nl()&&!o&&!e&&i.Jh())for(r=0;r<n.i;++r)if(xA(n.pl(uG(n.g[r],58)))===xA(t))return!0;return o}if(n.ml()&&!n.ll()){if(xA(c=uG(t,58).Mh(lMn(uG(n.Lk(),19))))===xA(n.e))return!0;if(null==c||!uG(c,58).Vh())return!1}}if(a=sSn(n,t),n.nl()&&!a)for(r=0;r<n.i;++r)if(xA(i=n.pl(uG(n.g[r],58)))===xA(t))return!0;return a}return sSn(n,t)}function Nzn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w;for(e.Ug("Interactive cycle breaking",1),h=new Zm,l=new Ww(t.a);l.a<l.c.c.length;)for((f=uG(N3(l),10)).p=1,b=jSn(f).a,s=jmn(f,(can(),Wjt)).Kc();s.Ob();)for(c=new Ww(uG(s.Pb(),12).g);c.a<c.c.c.length;)(w=(i=uG(N3(c),18)).d.i)!=f&&jSn(w).a<b&&mv(h.c,i);for(a=new Ww(h);a.a<a.c.c.length;)pqn(i=uG(N3(a),18),!0);for(h.c.length=0,u=new Ww(t.a);u.a<u.c.c.length;)(o=uG(N3(u),10)).p>0&&nAn(n,o,h);for(r=new Ww(h);r.a<r.c.c.length;)pqn(i=uG(N3(r),18),!0);h.c.length=0,e.Vg()}function $zn(n,t){var e,i,r,c,a,o,u;for(e=0,u=new Zm,c=new Ww(t);c.a<c.c.c.length;){switch(r=uG(N3(c),12),fbn(n.b,n.d[r.p]),u.c.length=0,r.i.k.g){case 0:Prn(uG(oIn(r,(GYn(),lmt)),10).j,new rp(u));break;case 1:m$(lln(JJ(new fX(null,new h3(r.i.j,16)),new cp(r))),new ap(u));break;case 3:kD(u,new WO(uG(oIn(r,(GYn(),rmt)),12),xwn(r.e.c.length+r.g.c.length)))}for(o=new Ww(u);o.a<o.c.c.length;)a=uG(N3(o),42),(i=Yj(n,uG(a.a,12)))>n.d[r.p]&&(e+=J8(n.b,i)*uG(a.b,17).a,A6(n.a,xwn(i)));for(;!LM(n.a);)lin(n.b,uG(xV(n.a),17).a)}return e}function Dzn(n,t){var e,i,r,c,a,o,u,s,h,f;if(h=uG(oIn(n,(GYn(),Fpt)),64),i=uG(zq(n.j,0),12),h==(KQn(),yRt)?NLn(i,KRt):h==KRt&&NLn(i,yRt),uG(oIn(t,(jYn(),DMt)),181).Hc((Qmn(),JRt))){if(u=uM(pK(oIn(n,TTt))),s=uM(pK(oIn(n,jTt))),a=uM(pK(oIn(n,yTt))),(o=uG(oIn(t,nTt),21)).Hc((eNn(),wRt)))for(e=s,f=n.o.a/2-i.n.a,c=new Ww(i.f);c.a<c.c.c.length;)(r=uG(N3(c),72)).n.b=e,r.n.a=f-r.o.a/2,e+=r.o.b+a;else if(o.Hc(gRt))for(c=new Ww(i.f);c.a<c.c.c.length;)(r=uG(N3(c),72)).n.a=u+n.o.a-i.n.a;D3(new Ad((zS(),new mY(t,!1,!1,new Ft))),new RB(null,n,!1))}}function xzn(n,t){var i,r,c,a,o,u,s;if(0!=t.c.length){for(hZ(),UX(t.c,t.c.length,null),r=uG(N3(c=new Ww(t)),154);c.a<c.c.c.length;)i=uG(N3(c),154),!gcn(r.e.c,i.e.c)||svn(qK(r.e).b,i.e.d)||svn(qK(i.e).b,r.e.d)?(fGn(n,r),r=i):(Ohn(r.k,i.k),Ohn(r.b,i.b),Ohn(r.c,i.c),Qon(r.i,i.i),Ohn(r.d,i.d),Ohn(r.j,i.j),a=e.Math.min(r.e.c,i.e.c),o=e.Math.min(r.e.d,i.e.d),u=e.Math.max(r.e.c+r.e.b,i.e.c+i.e.b)-a,s=e.Math.max(r.e.d+r.e.a,i.e.d+i.e.a)-o,LG(r.e,a,o,u,s),$3(r.f,i.f),!r.a&&(r.a=i.a),Ohn(r.g,i.g),kD(r.g,i));fGn(n,r)}}function Rzn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(o=new Zm,r=new Ww(t.a);r.a<r.c.c.length;)for(a=new Ww(uG(N3(r),10).j);a.a<a.c.c.length;){for(s=null,v=0,k=(m=x4((c=uG(N3(a),12)).g)).length;v<k;++v)jsn((p=m[v]).d.i,e)||((g=YXn(n,t,e,p,p.c,(can(),Wjt),s))!=s&&mv(o.c,g),g.c&&(s=g));for(u=null,w=0,d=(b=x4(c.e)).length;w<d;++w)jsn((l=b[w]).c.i,e)||((g=YXn(n,t,e,l,l.d,(can(),Vjt),u))!=u&&mv(o.c,g),g.c&&(u=g))}for(f=new Ww(o);f.a<f.c.c.length;)h=uG(N3(f),453),-1!=Ten(t.a,h.a,0)||kD(t.a,h.a),h.c&&mv(i.c,h)}function Kzn(n,t,i,r){var c,a,o,u,s,h,f,l,b,w;for((f=new eN(uG(zDn(n,(lIn(),HNt)),8))).a=e.Math.max(f.a-i.b-i.c,0),f.b=e.Math.max(f.b-i.d-i.a,0),(null==(c=pK(zDn(n,xNt)))||(tJ(c),c<=0))&&(c=1.3),o=new Zm,l=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));l.e!=l.i.gc();)a=new nK(uG(Zkn(l),27)),mv(o.c,a);switch(uG(zDn(n,RNt),320).g){case 3:w=fUn(o,t,f.a,f.b,(s=r,tJ(c),s));break;case 1:w=GGn(o,t,f.a,f.b,(h=r,tJ(c),h));break;default:w=Bzn(o,t,f.a,f.b,(u=r,tJ(c),u))}ZQn(n,(b=KJn(new Jrn(w),t,i,f.a,f.b,r,(tJ(c),c))).a,b.b,!1,!0)}function Fzn(n,t,e,i){var r,c,a,o,u,s;if((o=n.j)==(KQn(),FRt)&&t!=($Pn(),uRt)&&t!=($Pn(),sRt)&&(NLn(n,o=nGn(n,e)),!(n.q?n.q:(hZ(),hZ(),Vot))._b((jYn(),QMt))&&o!=FRt&&(0!=n.n.a||0!=n.n.b)&&kfn(n,QMt,aEn(n,o))),t==($Pn(),aRt)){switch(s=0,o.g){case 1:case 3:(c=n.i.o.a)>0&&(s=n.n.a/c);break;case 2:case 4:(r=n.i.o.b)>0&&(s=n.n.b/r)}kfn(n,(GYn(),bmt),s)}if(u=n.o,a=n.a,i)a.a=i.a,a.b=i.b,n.d=!0;else if(t!=uRt&&t!=sRt&&o!=FRt)switch(o.g){case 1:a.a=u.a/2;break;case 2:a.a=u.a,a.b=u.b/2;break;case 3:a.a=u.a/2,a.b=u.b;break;case 4:a.b=u.b/2}else a.a=u.a/2,a.b=u.b/2}function _zn(n){var t,e,i,r,c,a,o,u,s,h;if(n.Pj())if(h=n.Ej(),u=n.Qj(),h>0)if(t=new Hun(n.pj()),c=(e=h)<100?null:new cj(e),QK(n,e,t.g),r=1==e?n.Ij(4,zrn(t,0),null,0,u):n.Ij(6,t,null,-1,u),n.Mj()){for(i=new DD(t);i.e!=i.i.gc();)c=n.Oj(Zkn(i),c);c?(c.nj(r),c.oj()):n.Jj(r)}else c?(c.nj(r),c.oj()):n.Jj(r);else QK(n,n.Ej(),n.Fj()),n.Jj(n.Ij(6,(hZ(),zot),null,-1,u));else if(n.Mj())if((h=n.Ej())>0){for(o=n.Fj(),s=h,QK(n,h,o),c=s<100?null:new cj(s),i=0;i<s;++i)a=o[i],c=n.Oj(a,c);c&&c.oj()}else QK(n,n.Ej(),n.Fj());else QK(n,n.Ej(),n.Fj())}function Bzn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b;for(o=Inn(eUt,I0n,28,n.c.length,15,1),_jn(l=new Kz(new Hu),n),s=0,b=new Zm;0!=l.b.c.length;)if(a=uG(0==l.b.c.length?null:zq(l.b,0),163),s>1&&EX(a)*jX(a)/2>o[0]){for(c=0;c<b.c.length-1&&EX(a)*jX(a)/2>o[c];)++c;f=new Jrn(new C2(b,0,c+1)),h=EX(a)/jX(a),u=KJn(f,t,new Dk,e,i,r,h),JF(dL(f.e),u),kG(_Cn(l,f),D0n),_jn(l,new C2(b,c+1,b.c.length)),b.c.length=0,s=0,zX(o,o.length,0)}else null!=(0==l.b.c.length?null:zq(l.b,0))&&Con(l,0),s>0&&(o[s]=o[s-1]),o[s]+=EX(a)*jX(a),++s,mv(b.c,a);return b}function Hzn(n,t){var e,i,r,c;c=new Z_((e=t.b).j),r=0,(i=e.j).c.length=0,mW(uG(ssn(n.b,(KQn(),yRt),(gon(),Sdt)),15),e),r=cMn(c,r,new Br,i),mW(uG(ssn(n.b,yRt,Edt),15),e),r=cMn(c,r,new $r,i),mW(uG(ssn(n.b,yRt,jdt),15),e),mW(uG(ssn(n.b,kRt,Sdt),15),e),mW(uG(ssn(n.b,kRt,Edt),15),e),r=cMn(c,r,new Hr,i),mW(uG(ssn(n.b,kRt,jdt),15),e),mW(uG(ssn(n.b,KRt,Sdt),15),e),r=cMn(c,r,new Ur,i),mW(uG(ssn(n.b,KRt,Edt),15),e),r=cMn(c,r,new Gr,i),mW(uG(ssn(n.b,KRt,jdt),15),e),mW(uG(ssn(n.b,_Rt,Sdt),15),e),r=cMn(c,r,new Rr,i),mW(uG(ssn(n.b,_Rt,Edt),15),e),mW(uG(ssn(n.b,_Rt,jdt),15),e)}function Uzn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;for(o=new Ww(t);o.a<o.c.c.length;)(c=uG(N3(o),239)).e=null,c.c=0;for(u=null,a=new Ww(t);a.a<a.c.c.length;)if(f=(c=uG(N3(a),239)).d[0],!e||f.k==(zIn(),dbt)){for(b=uG(oIn(f,(GYn(),Vpt)),15).Kc();b.Ob();)l=uG(b.Pb(),10),e&&l.k!=(zIn(),dbt)||((!c.e&&(c.e=new Zm),c.e).Fc(n.b[l.c.p][l.p]),++n.b[l.c.p][l.p].c);if(!e&&f.k==(zIn(),dbt)){if(u)for(h=uG(Y9(n.d,u),21).Kc();h.Ob();)for(s=uG(h.Pb(),10),r=uG(Y9(n.d,f),21).Kc();r.Ob();)i=uG(r.Pb(),10),IU(n.b[s.c.p][s.p]).Fc(n.b[i.c.p][i.p]),++n.b[i.c.p][i.p].c;u=f}}}function Gzn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w;for(i.Ug("Model order cycle breaking",1),n.a=0,n.b=0,l=new Zm,h=t.a.c.length,s=new Ww(t.a);s.a<s.c.c.length;)vR(u=uG(N3(s),10),(GYn(),imt))&&(h=e.Math.max(h,uG(oIn(u,imt),17).a+1));for(w=new Ww(t.a);w.a<w.c.c.length;)for(o=NAn(n,b=uG(N3(w),10),h),f=jmn(b,(can(),Wjt)).Kc();f.Ob();)for(a=new Ww(uG(f.Pb(),12).g);a.a<a.c.c.length;)NAn(n,(r=uG(N3(a),18)).d.i,h)<o&&mv(l.c,r);for(c=new Ww(l);c.a<c.c.c.length;)pqn(r=uG(N3(c),18),!0),kfn(t,(GYn(),Lpt),(qx(),!0));l.c.length=0,i.Vg()}function qzn(n,t,i){var r,c,a,o,u,s,h,f;for(c=t.d,a=i.d;c.a-a.a==0&&c.b-a.b==0;)o=!1,F$(t,250)&&F$(i,250)&&!o?(r=2,JF(c,new MO((s=YF(new eN(Wcn(u=uG(t,250).a)),Vcn(u))).a/e.Math.sqrt(s.a*s.a+s.b*s.b)*r,-s.b/e.Math.sqrt(s.a*s.a+s.b*s.b)*r)),r=s==(f=YF(new eN(Wcn(h=uG(i,250).a)),Vcn(h)))?-2:2,JF(c,new MO(f.a/e.Math.sqrt(f.a*f.a+f.b*f.b)*r,-f.b/e.Math.sqrt(f.a*f.a+f.b*f.b)*r)),o=!0):(c.a+=uRn(n,26)*G0n+uRn(n,27)*q0n-.5,c.b+=uRn(n,26)*G0n+uRn(n,27)*q0n-.5,a.a+=uRn(n,26)*G0n+uRn(n,27)*q0n-.5,a.b+=uRn(n,26)*G0n+uRn(n,27)*q0n-.5)}function Xzn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;for(z8(u=kOn(t),new _d(uG(oIn(t,(jYn(),Kyt)),322))),z8(u,new Bd(uG(oIn(t,Oyt),299))),b=0,s=new Zm,r=new XJ(u);r.a!=r.b;)i=uG(rwn(r),36),JVn(n.c,i),b+=(f=uG(oIn(i,(GYn(),wmt)),15)).gc(),kD(s,new WO(i,f.Kc()));for(e.Ug("Recursive hierarchical layout",b),l=uG(uG(zq(s,s.c.length-1),42).b,51);l.Ob();)for(o=new Ww(s);o.a<o.c.c.length;)for(a=uG(N3(o),42),f=uG(a.b,51),c=uG(a.a,36);f.Ob();){if(F$(h=uG(f.Pb(),47),514)){if(c.e)break;h.Kf(c,e.eh(1));break}h.Kf(c,e.eh(1))}e.Vg()}function zzn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(t.Ug("Layer size calculation",1),f=M0n,h=T0n,c=!1,u=new Ww(n.b);u.a<u.c.c.length;)if((s=(o=uG(N3(u),30)).c).a=0,s.b=0,0!=o.a.c.length){for(c=!0,b=new Ww(o.a);b.a<b.c.c.length;)d=(l=uG(N3(b),10)).o,w=l.d,s.a=e.Math.max(s.a,d.a+w.b+w.c);g=(r=uG(zq(o.a,0),10)).n.b-r.d.d,r.k==(zIn(),lbt)&&(g-=uG(oIn(n,(jYn(),CTt)),140).d),i=(a=uG(zq(o.a,o.a.c.length-1),10)).n.b+a.o.b+a.d.a,a.k==lbt&&(i+=uG(oIn(n,(jYn(),CTt)),140).a),s.b=i-g,f=e.Math.min(f,g),h=e.Math.max(h,i)}c||(f=0,h=0),n.f.b=h-f,n.c.b-=f,t.Vg()}function Vzn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p;for(c=0,a=0,s=new Ww(n.a);s.a<s.c.c.length;)o=uG(N3(s),10),c=e.Math.max(c,o.d.b),a=e.Math.max(a,o.d.c);for(u=new Ww(n.a);u.a<u.c.c.length;){switch(o=uG(N3(u),10),uG(oIn(o,(jYn(),byt)),255).g){case 1:w=0;break;case 2:w=1;break;case 5:w=.5;break;default:for(i=0,f=0,b=new Ww(o.j);b.a<b.c.c.length;)0==(l=uG(N3(b),12)).e.c.length||++i,0==l.g.c.length||++f;w=i+f==0?.5:f/(i+f)}g=n.c,h=o.o.a,p=(g.a-h)*w,w>.5?p-=2*a*(w-.5):w<.5&&(p+=2*c*(.5-w)),p<(r=o.d.b)&&(p=r),d=o.d.c,p>g.a-d-h&&(p=g.a-d-h),o.n.a=t+p}}function Wzn(n){var t,e,i;if((e=uG(oIn(n,(jYn(),gMt)),171))==(Gpn(),Imt)){for(t=new Fz(ix(qgn(n).a.Kc(),new h));hDn(t);)if(!F9(uG(N9(t),18)))throw hv(new jM(y6n+ZTn(n)+"' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. FIRST_SEPARATE nodes must not have incoming edges."))}else if(e==Amt)for(i=new Fz(ix(Xgn(n).a.Kc(),new h));hDn(i);)if(!F9(uG(N9(i),18)))throw hv(new jM(y6n+ZTn(n)+"' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. LAST_SEPARATE nodes must not have outgoing edges."))}function Qzn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w;if(n.e&&n.c.c<n.f)throw hv(new kM("Expected "+n.f+" phases to be configured; only found "+n.c.c));for(h=uG(Mj(n.g),9),b=iR(n.f),o=0,s=(c=h).length;o<s;++o)(f=uG(xen(n,(i=c[o]).g),188))?kD(b,uG(xpn(n,f),106)):b.c.push(null);for(w=new wJ,kS(JJ(YJ(JJ(new fX(null,new h3(b,16)),new ou),new Hp(t)),new uu),new Up(w)),gsn(w,n.a),e=new Zm,a=0,u=(r=h).length;a<u;++a)Ohn(e,Fhn(n,PZ(uG(xen(w,(i=r[a]).g),20)))),(l=uG(zq(b,i.g),106))&&mv(e.c,l);return Ohn(e,Fhn(n,PZ(uG(xen(w,h[h.length-1].g+1),20)))),e}function Jzn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(l=new Zm,c=new Zm,d=null,o=t.Kc();o.Ob();)a=new Vg(uG(o.Pb(),17).a),mv(c.c,a),d&&(a.d=d,d.e=a),d=a;for(v=cqn(n),h=0;h<c.c.length;++h){for(b=null,g=T7((u3(0,c.c.length),uG(c.c[0],661))),i=null,r=M0n,f=1;f<n.b.c.length;++f)p=g?e.Math.abs(g.b-f):e.Math.abs(f-b.b)+1,(w=b?e.Math.abs(f-b.b):p+1)<p?(s=b,u=w):(s=g,u=p),k=uM(pK(oIn(n,(jYn(),HTt)))),(m=v[f]+e.Math.pow(u,k))<r&&(r=m,(i=s).c=f),g&&f==g.b&&(b=g,g=aV(g));i&&(kD(l,xwn(i.c)),i.a=!0,ngn(i))}return hZ(),UX(l.c,l.c.length,null),l}function Yzn(n,t,e){var i,r,c,a,o,u;if(0==t.l&&0==t.m&&0==t.h)throw hv(new wM("divide by zero"));if(0==n.l&&0==n.m&&0==n.h)return e&&(Qat=p$(0,0,0)),p$(0,0,0);if(t.h==b0n&&0==t.m&&0==t.l)return apn(n,e);if(u=!1,t.h>>19&&(t=gfn(t),u=!u),a=kRn(t),c=!1,r=!1,i=!1,n.h==b0n&&0==n.m&&0==n.l){if(r=!0,c=!0,-1!=a)return o=gDn(n,a),u&&Yfn(o),e&&(Qat=p$(0,0,0)),o;n=LL((tin(),Jat)),i=!0,u=!u}else n.h>>19&&(c=!0,n=gfn(n),i=!0,u=!u);return-1!=a?nln(n,a,u,c,e):yEn(n,t)<0?(e&&(Qat=c?gfn(n):p$(n.l,n.m,n.h)),p$(0,0,0)):pUn(i?n:p$(n.l,n.m,n.h),t,u,c,r,e)}function Zzn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w;if(a=n.e,u=t.e,0==a)return t;if(0==u)return n;if((c=n.d)+(o=t.d)==2)return e=E3(n.a[0],L0n),i=E3(t.a[0],L0n),a==u?(w=pz(h=Lgn(e,i)),0==(b=pz(Dz(h,32)))?new Z5(a,w):new VV(a,2,Uhn(cT(YHt,1),W1n,28,15,[w,b]))):(cHn(),BA(a<0?$gn(i,e):$gn(e,i),0)?Rmn(a<0?$gn(i,e):$gn(e,i)):hW(Rmn(Men(a<0?$gn(i,e):$gn(e,i)))));if(a==u)l=a,f=c>=o?Cnn(n.a,c,t.a,o):Cnn(t.a,o,n.a,c);else{if(0==(r=c!=o?c>o?1:-1:Hln(n.a,t.a,c)))return cHn(),_ot;1==r?(l=a,f=t7(n.a,c,t.a,o)):(l=u,f=t7(t.a,o,n.a,c))}return K4(s=new VV(l,f.length,f)),s}function nVn(n,t){var e,i,r,c,a,o,u;if(!(n.g>t.f||t.g>n.f)){for(e=0,i=0,a=n.w.a.ec().Kc();a.Ob();)r=uG(a.Pb(),12),Wbn(Gfn(Uhn(cT(PNt,1),zZn,8,0,[r.i.n,r.n,r.a])).b,t.g,t.f)&&++e;for(o=n.r.a.ec().Kc();o.Ob();)r=uG(o.Pb(),12),Wbn(Gfn(Uhn(cT(PNt,1),zZn,8,0,[r.i.n,r.n,r.a])).b,t.g,t.f)&&--e;for(u=t.w.a.ec().Kc();u.Ob();)r=uG(u.Pb(),12),Wbn(Gfn(Uhn(cT(PNt,1),zZn,8,0,[r.i.n,r.n,r.a])).b,n.g,n.f)&&++i;for(c=t.r.a.ec().Kc();c.Ob();)r=uG(c.Pb(),12),Wbn(Gfn(Uhn(cT(PNt,1),zZn,8,0,[r.i.n,r.n,r.a])).b,n.g,n.f)&&--i;e<i?new O7(n,t,i-e):i<e?new O7(t,n,e-i):(new O7(t,n,0),new O7(n,t,0))}}function tVn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;for(s=t.c,r=AN(n.e),f=vD(HR(D$(ON(n.e)),n.d*n.a,n.c*n.b),-.5),e=r.a-f.a,i=r.b-f.b,e=(a=t.a).c-e,i=a.d-i,u=new Ww(s);u.a<u.c.c.length;){switch(b=e+(l=(o=uG(N3(u),407)).b).a,g=i+l.b,w=t0(b/n.a),p=t0(g/n.b),(c=o.a).g){case 0:vyn(),h=yht;break;case 1:vyn(),h=kht;break;case 2:vyn(),h=Mht;break;default:vyn(),h=Tht}c.a?(m=t0((g+o.c)/n.b),kD(n.f,new LB(h,xwn(p),xwn(m))),c==(myn(),Dht)?wfn(n,0,p,w,m):wfn(n,w,p,n.d-1,m)):(d=t0((b+o.c)/n.a),kD(n.f,new LB(h,xwn(w),xwn(d))),c==(myn(),Nht)?wfn(n,w,0,d,p):wfn(n,w,p,d,n.c-1))}}function eVn(n){var t,e,i,r,c,a,o,u,s,h;for(t=new ys,e=new ys,s=m_(jrt,(r=qUn(n.b,Ert))?mK(Lmn((!r.b&&(r.b=new XR((YYn(),H_t),wBt,r)),r.b),Srt)):null),u=0;u<n.i;++u)F$(o=uG(n.g[u],179),102)?(a=uG(o,19)).Bb&Qtt?(!(a.Bb&VZn)||!s&&null==((c=qUn(a,Ert))?mK(Lmn((!c.b&&(c.b=new XR((YYn(),H_t),wBt,c)),c.b),_et)):null))&&ttn(t,a):(h=lMn(a))&&h.Bb&Qtt||(!(a.Bb&VZn)||!s&&null==((i=qUn(a,Ert))?mK(Lmn((!i.b&&(i.b=new XR((YYn(),H_t),wBt,i)),i.b),_et)):null))&&ttn(e,a):(PP(),uG(o,69).xk()&&(o.sk()||(ttn(t,o),ttn(e,o))));lbn(t),lbn(e),n.a=uG(t.g,254),uG(e.g,254)}function iVn(n,t,e){var i,r,c,a,o,u,s;if(emn(t,e)>=0)return e;switch(sJ(Nen(n,e))){case 2:if(m_("",tdn(n,e.qk()).xe())){if(u=hxn(n,t,o=HJ(Nen(n,e)),BJ(Nen(n,e))))return u;for(a=0,s=(r=AHn(n,t)).gc();a<s;++a)if(WRn(ZV(Nen(n,u=uG(r.Xb(a),179))),o))return u}return null;case 4:if(m_("",tdn(n,e.qk()).xe())){for(i=e;i;i=F3(Nen(n,i)))if(u=fxn(n,t,HJ(Nen(n,i)),BJ(Nen(n,i))))return u;if(o=HJ(Nen(n,e)),m_(lct,o))return cSn(n,t);for(a=0,s=(c=LHn(n,t)).gc();a<s;++a)if(WRn(ZV(Nen(n,u=uG(c.Xb(a),179))),o))return u}return null;default:return null}}function rVn(n,t,e){var i,r,c,a,o,u,s,h;if(0==e.gc())return!1;if(PP(),c=(o=uG(t,69).xk())?e:new Drn(e.gc()),EFn(n.e,t)){if(t.Si())for(s=e.Kc();s.Ob();)aqn(n,t,u=s.Pb(),F$(t,102)&&!!(uG(t,19).Bb&P0n))||(r=R5(t,u),c.Hc(r)||c.Fc(r));else if(!o)for(s=e.Kc();s.Ob();)r=R5(t,u=s.Pb()),c.Fc(r)}else{if(e.gc()>1)throw hv(new vM(dct));for(h=VKn(n.e.Dh(),t),i=uG(n.g,124),a=0;a<n.i;++a)if(r=i[a],h.am(r.Lk())){if(e.Hc(o?r:r.md()))return!1;for(s=e.Kc();s.Ob();)u=s.Pb(),uG(Uyn(n,a,o?uG(u,76):R5(t,u)),76);return!0}o||(r=R5(t,e.Kc().Pb()),c.Fc(r))}return CW(n,c)}function cVn(n,t){var i,r,c,a,o,u,s;for(s=new lS,u=new _w(new Fw(n.c).a.vc().Kc());u.a.Ob();)c=uG(u.a.Pb(),44),0==(a=uG(c.md(),467)).b&&s8(s,a,s.c.b,s.c);for(;0!=s.b;)for(null==(a=uG(0==s.b?null:(MK(0!=s.b),Lrn(s,s.a.a)),467)).a&&(a.a=0),r=new Ww(a.d);r.a<r.c.c.length;)null==(i=uG(N3(r),663)).b.a?i.b.a=uM(a.a)+i.a:t.o==(w0(),wSt)?i.b.a=e.Math.min(uM(i.b.a),uM(a.a)+i.a):i.b.a=e.Math.max(uM(i.b.a),uM(a.a)+i.a),--i.b.b,0==i.b.b&&aq(s,i.b);for(o=new _w(new Fw(n.c).a.vc().Kc());o.a.Ob();)c=uG(o.a.Pb(),44),a=uG(c.md(),467),t.i[a.c.p]=a.a}function aVn(n,t,i,r){var c,a,o,u,s,h,f,l,b,w;for(f=i+t.c.c.a,w=new Ww(t.j);w.a<w.c.c.length;){if(b=uG(N3(w),12),c=Gfn(Uhn(cT(PNt,1),zZn,8,0,[b.i.n,b.n,b.a])),t.k==(zIn(),gbt)&&(u=uG(oIn(b,(GYn(),rmt)),12),c.a=Gfn(Uhn(cT(PNt,1),zZn,8,0,[u.i.n,u.n,u.a])).a,t.n.a=c.a),o=new MO(0,c.b),b.j==(KQn(),kRt))o.a=f;else{if(b.j!=_Rt)continue;o.a=i}if(!(e.Math.abs(c.a-o.a)<=r)||mEn(t))for(a=b.g.c.length+b.e.c.length>1,h=new w7(b.b);l$(h.a)||l$(h.b);)l=(s=uG(l$(h.a)?N3(h.a):N3(h.b),18)).c==b?s.d:s.c,e.Math.abs(Gfn(Uhn(cT(PNt,1),zZn,8,0,[l.i.n,l.n,l.a])).b-o.b)>1&&sFn(n,s,o,a,b)}}function oVn(n){var t,i,r,c,a,o;if(c=new N4(n.e,0),r=new N4(n.a,0),n.d)for(i=0;i<n.b;i++)MK(c.b<c.d.gc()),c.d.Xb(c.c=c.b++);else for(i=0;i<n.b-1;i++)MK(c.b<c.d.gc()),c.d.Xb(c.c=c.b++),LQ(c);for(t=uM((MK(c.b<c.d.gc()),pK(c.d.Xb(c.c=c.b++))));n.f-t>$9n;){for(a=t,o=0;e.Math.abs(t-a)<$9n;)++o,t=uM((MK(c.b<c.d.gc()),pK(c.d.Xb(c.c=c.b++)))),MK(r.b<r.d.gc()),r.d.Xb(r.c=r.b++);o<n.b&&(MK(c.b>0),c.a.Xb(c.c=--c.b),zGn(n,n.b-o,a,r,c),MK(c.b<c.d.gc()),c.d.Xb(c.c=c.b++)),MK(r.b>0),r.a.Xb(r.c=--r.b)}if(!n.d)for(i=0;i<n.b-1;i++)MK(c.b<c.d.gc()),c.d.Xb(c.c=c.b++),LQ(c);n.d=!0,n.c=!0}function uVn(){uVn=E,KBt=(yj(),RBt).b,BBt=uG(zrn(gZ(RBt.b),0),35),FBt=uG(zrn(gZ(RBt.b),1),35),_Bt=uG(zrn(gZ(RBt.b),2),35),JBt=RBt.bb,uG(zrn(gZ(RBt.bb),0),35),uG(zrn(gZ(RBt.bb),1),35),ZBt=RBt.fb,nHt=uG(zrn(gZ(RBt.fb),0),35),uG(zrn(gZ(RBt.fb),1),35),uG(zrn(gZ(RBt.fb),2),19),eHt=RBt.qb,cHt=uG(zrn(gZ(RBt.qb),0),35),uG(zrn(gZ(RBt.qb),1),19),uG(zrn(gZ(RBt.qb),2),19),iHt=uG(zrn(gZ(RBt.qb),3),35),rHt=uG(zrn(gZ(RBt.qb),4),35),oHt=uG(zrn(gZ(RBt.qb),6),35),aHt=uG(zrn(gZ(RBt.qb),5),19),HBt=RBt.j,UBt=RBt.k,GBt=RBt.q,qBt=RBt.w,XBt=RBt.B,zBt=RBt.A,VBt=RBt.C,WBt=RBt.D,QBt=RBt._,YBt=RBt.cb,tHt=RBt.hb}function sVn(n,t,i){var r,c,a,o,u,s,h,f,l;n.c=0,n.b=0,r=2*t.c.a.c.length+1;n:for(h=i.Kc();h.Ob();){if(l=0,o=(s=uG(h.Pb(),12)).j==(KQn(),yRt)||s.j==KRt){if(!(f=uG(oIn(s,(GYn(),lmt)),10)))continue;l+=Y_n(n,r,s,f)}else{for(u=new Ww(s.g);u.a<u.c.c.length;){if((c=uG(N3(u),18).d).i.c==t.c){kD(n.a,s);continue n}l+=n.g[c.p]}for(a=new Ww(s.e);a.a<a.c.c.length;){if((c=uG(N3(a),18).c).i.c==t.c){kD(n.a,s);continue n}l-=n.g[c.p]}}s.e.c.length+s.g.c.length>0?(n.f[s.p]=l/(s.e.c.length+s.g.c.length),n.c=e.Math.min(n.c,n.f[s.p]),n.b=e.Math.max(n.b,n.f[s.p])):o&&(n.f[s.p]=l)}}function hVn(n){n.b=null,n.bb=null,n.fb=null,n.qb=null,n.a=null,n.c=null,n.d=null,n.e=null,n.f=null,n.n=null,n.M=null,n.L=null,n.Q=null,n.R=null,n.K=null,n.db=null,n.eb=null,n.g=null,n.i=null,n.j=null,n.k=null,n.gb=null,n.o=null,n.p=null,n.q=null,n.r=null,n.$=null,n.ib=null,n.S=null,n.T=null,n.t=null,n.s=null,n.u=null,n.v=null,n.w=null,n.B=null,n.A=null,n.C=null,n.D=null,n.F=null,n.G=null,n.H=null,n.I=null,n.J=null,n.P=null,n.Z=null,n.U=null,n.V=null,n.W=null,n.X=null,n.Y=null,n._=null,n.ab=null,n.cb=null,n.hb=null,n.nb=null,n.lb=null,n.mb=null,n.ob=null,n.pb=null,n.jb=null,n.kb=null,n.N=!1,n.O=!1}function fVn(n,t,e){var i,r;for(e.Ug("Graph transformation ("+n.a+")",1),r=T3(t.a),i=new Ww(t.b);i.a<i.c.c.length;)Ohn(r,uG(N3(i),30).a);if(uG(oIn(t,(jYn(),Hyt)),428)==(Vin(),dgt))switch(uG(oIn(t,Byt),88).g){case 2:l6(t,r);break;case 3:Fmn(t,r);break;case 4:n.a==(Aun(),Obt)?(Fmn(t,r),b6(t,r)):(b6(t,r),Fmn(t,r))}else if(n.a==(Aun(),Obt))switch(uG(oIn(t,Byt),88).g){case 2:l6(t,r),b6(t,r);break;case 3:Fmn(t,r),l6(t,r);break;case 4:l6(t,r),Fmn(t,r)}else switch(uG(oIn(t,Byt),88).g){case 2:l6(t,r),b6(t,r);break;case 3:l6(t,r),Fmn(t,r);break;case 4:Fmn(t,r),l6(t,r)}e.Vg()}function lVn(n){var t,i,r,c,a,o,u,s;for(a=new Ww(n.a.b);a.a<a.c.c.length;)(c=uG(N3(a),86)).b.c=c.g.c,c.b.d=c.g.d;for(s=new MO(M0n,M0n),t=new MO(T0n,T0n),r=new Ww(n.a.b);r.a<r.c.c.length;)i=uG(N3(r),86),s.a=e.Math.min(s.a,i.g.c),s.b=e.Math.min(s.b,i.g.d),t.a=e.Math.max(t.a,i.g.c+i.g.b),t.b=e.Math.max(t.b,i.g.d+i.g.a);for(u=KW(n.c).a.nc();u.Ob();)o=uG(u.Pb(),42),i=uG(o.b,86),s.a=e.Math.min(s.a,i.g.c),s.b=e.Math.min(s.b,i.g.d),t.a=e.Math.max(t.a,i.g.c+i.g.b),t.b=e.Math.max(t.b,i.g.d+i.g.a);n.d=BR(new MO(s.a,s.b)),n.e=YF(new MO(t.a,t.b),s),n.a.a.c.length=0,n.a.b.c.length=0}function bVn(n){var t,e,i,r,c,a,o;for(Win(),o=new dk,e=new Ww(n);e.a<e.c.c.length;)t=uG(N3(e),148),(!o.b||t.c>=o.b.c)&&(o.b=t),(!o.c||t.c<=o.c.c)&&(o.d=o.c,o.c=t),(!o.e||t.d>=o.e.d)&&(o.e=t),(!o.f||t.d<=o.f.d)&&(o.f=t);return i=new cyn((Xhn(),Flt)),O4(n,Vlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[i]))),a=new cyn(Hlt),O4(n,zlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[a]))),r=new cyn(_lt),O4(n,Xlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[r]))),c=new cyn(Blt),O4(n,qlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[c]))),jRn(i.c,Flt),jRn(r.c,_lt),jRn(c.c,Blt),jRn(a.c,Hlt),o.a.c.length=0,Ohn(o.a,i.c),Ohn(o.a,Spn(r.c)),Ohn(o.a,c.c),Ohn(o.a,Spn(a.c)),o}function wVn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d;for(t.Ug(snt,1),w=uM(pK(zDn(n,(lBn(),POt)))),o=uM(pK(zDn(n,(S_n(),bAt)))),u=uG(zDn(n,hAt),107),Non((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a)),f=uzn((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a),w,o),!n.a&&(n.a=new fV(bFt,n,10,11)),h=new Ww(f);h.a<h.c.c.length;)for(c=new Ww((s=uG(N3(h),186)).a);c.a<c.c.c.length;)Gun(b=new r0((r=uG(N3(c),172)).s,r.t,uM(pK(zDn(n,bAt)))),r),kD(s.d,b);l=Xjn(f,o),d=e.Math.max(l.a,uM(pK(zDn(n,EOt)))-(u.b+u.c)),i=(a=e.Math.max(l.b,uM(pK(zDn(n,MOt)))-(u.d+u.a)))-l.b,Myn(n,pOt,i),Myn(n,vOt,d),Myn(n,mOt,a+i),Myn(n,SOt,f),t.Vg()}function dVn(n,t,e){var i,r,c,a,o,u,s,f,l,b,w;for(u=new XL,s=new XL,b=new XL,w=new XL,o=uM(pK(oIn(t,(jYn(),ETt)))),r=uM(pK(oIn(t,dTt))),a=new Ww(e);a.a<a.c.c.length;)if(c=uG(N3(a),10),(f=uG(oIn(c,(GYn(),Fpt)),64))==(KQn(),yRt))for(s.a.zc(c,s),i=new Fz(ix(qgn(c).a.Kc(),new h));hDn(i);)FV(u,uG(N9(i),18).c.i);else if(f==KRt)for(w.a.zc(c,w),i=new Fz(ix(qgn(c).a.Kc(),new h));hDn(i);)FV(b,uG(N9(i),18).c.i);0!=u.a.gc()&&(l=YVn(new NW(2,r),t,u,s,-o-t.c.b))>0&&(n.a=o+(l-1)*r,t.c.b+=n.a,t.f.b+=n.a),0!=b.a.gc()&&(l=YVn(new NW(1,r),t,b,w,t.f.b+o-t.c.b))>0&&(t.f.b+=o+(l-1)*r)}function gVn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;for(f=uM(pK(oIn(n,(jYn(),mTt)))),r=uM(pK(oIn(n,RTt))),kfn(b=new Qu,mTt,f+r),m=(h=t).d,g=h.c.i,v=h.d.i,p=GL(g.c),k=GL(v.c),c=new Zm,l=p;l<=k;l++)Hb(u=new gMn(n),(zIn(),wbt)),kfn(u,(GYn(),rmt),h),kfn(u,JMt,($Pn(),cRt)),kfn(u,kTt,b),w=uG(zq(n.b,l),30),l==p?$jn(u,w.a.c.length-i,w):a2(u,w),(y=uM(pK(oIn(h,tMt))))<0&&kfn(h,tMt,y=0),u.o.b=y,d=e.Math.floor(y/2),NLn(o=new lOn,(KQn(),_Rt)),o2(o,u),o.n.b=d,NLn(s=new lOn,kRt),o2(s,u),s.n.b=d,u2(h,o),zsn(a=new UZ,h),kfn(a,bMt,null),c2(a,s),u2(a,m),IEn(u,h,a),mv(c.c,a),h=a;return c}function pVn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(o=uG(yOn(n,(KQn(),_Rt)).Kc().Pb(),12).e,f=uG(yOn(n,kRt).Kc().Pb(),12).g,a=o.c.length,g=n3(uG(zq(n.j,0),12));a-- >0;){for(u3(0,o.c.length),b=uG(o.c[0],18),u3(0,f.c.length),r=Ten((i=uG(f.c[0],18)).d.e,i,0),w6(b,i.d,r),c2(i,null),u2(i,null),l=b.a,t&&aq(l,new eN(g)),e=Fkn(i.a,0);e.b!=e.d.c;)aq(l,new eN(uG(I6(e),8)));for(d=b.b,h=new Ww(i.b);h.a<h.c.c.length;)s=uG(N3(h),72),mv(d.c,s);if(w=uG(oIn(b,(jYn(),bMt)),75),c=uG(oIn(i,bMt),75))for(w||(w=new Uk,kfn(b,bMt,w)),u=Fkn(c,0);u.b!=u.d.c;)aq(w,new eN(uG(I6(u),8)))}}function mVn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;if(!((d=t.b.c.length)<3)){for(b=Inn(YHt,W1n,28,d,15,1),f=0,h=new Ww(t.b);h.a<h.c.c.length;)s=uG(N3(h),30),b[f++]=s.a.c.length;for(l=new N4(t.b,2),i=1;i<d-1;i++)for(MK(l.b<l.d.gc()),w=new Ww((e=uG(l.d.Xb(l.c=l.b++),30)).a),c=0,o=0,u=0;u<b[i+1];u++)if(v=uG(N3(w),10),u==b[i+1]-1||KOn(n,v,i+1,i)){for(a=b[i]-1,KOn(n,v,i+1,i)&&(a=n.c.e[uG(uG(uG(zq(n.c.b,v.p),15).Xb(0),42).a,10).p]);o<=u;){if(!KOn(n,m=uG(zq(e.a,o),10),i+1,i))for(p=uG(zq(n.c.b,m.p),15).Kc();p.Ob();)g=uG(p.Pb(),42),((r=n.c.e[uG(g.a,10).p])<c||r>a)&&FV(n.b,uG(g.b,18));++o}c=a}}}function vVn(n,t){var e;if(null==t||m_(t,IZn))return null;if(0==t.length&&n.k!=(lAn(),pNt))return null;switch(n.k.g){case 1:return Bvn(t,Fnt)?(qx(),eot):Bvn(t,_nt)?(qx(),tot):null;case 2:try{return xwn(vUn(t,j1n,vZn))}catch(i){if(F$(i=Ehn(i),130))return null;throw hv(i)}case 4:try{return YIn(t)}catch(i){if(F$(i=Ehn(i),130))return null;throw hv(i)}case 3:return t;case 5:return wbn(n),NNn(n,t);case 6:return wbn(n),Lxn(n,n.a,t);case 7:try{return(e=Q$n(n)).cg(t),e}catch(i){if(F$(i=Ehn(i),33))return null;throw hv(i)}default:throw hv(new kM("Invalid type set for this layout option."))}}function kVn(n){var t;switch(n.d){case 1:if(n.Sj())return-2!=n.o;break;case 2:if(n.Sj())return-2==n.o;break;case 3:case 5:case 4:case 6:case 7:return n.o>-2;default:return!1}switch(t=n.Rj(),n.p){case 0:return null!=t&&oM(gK(t))!=HA(n.k,0);case 1:return null!=t&&uG(t,222).a!=pz(n.k)<<24>>24;case 2:return null!=t&&uG(t,180).a!=(pz(n.k)&D1n);case 6:return null!=t&&HA(uG(t,168).a,n.k);case 5:return null!=t&&uG(t,17).a!=pz(n.k);case 7:return null!=t&&uG(t,191).a!=pz(n.k)<<16>>16;case 3:return null!=t&&uM(pK(t))!=n.j;case 4:return null!=t&&uG(t,161).a!=n.j;default:return null==t?null!=n.n:!udn(t,n.n)}}function yVn(n,t,e){var i,r,c,a;return n.ol()&&n.nl()&&xA(a=CV(n,uG(e,58)))!==xA(e)?(n.xj(t),n.Dj(t,Atn(n,t,a)),n.al()&&(r=uG(e,54),c=n.ml()?n.kl()?r.Th(n.b,lMn(uG(ern(e1(n.b),n.Lj()),19)).n,uG(ern(e1(n.b),n.Lj()).Hk(),29).kk(),null):r.Th(n.b,emn(r.Dh(),lMn(uG(ern(e1(n.b),n.Lj()),19))),null,null):r.Th(n.b,-1-n.Lj(),null,null),!uG(a,54).Ph()&&(i=uG(a,54),c=n.ml()?n.kl()?i.Rh(n.b,lMn(uG(ern(e1(n.b),n.Lj()),19)).n,uG(ern(e1(n.b),n.Lj()).Hk(),29).kk(),c):i.Rh(n.b,emn(i.Dh(),lMn(uG(ern(e1(n.b),n.Lj()),19))),null,c):i.Rh(n.b,-1-n.Lj(),null,c)),c&&c.oj()),uN(n.b)&&n.Jj(n.Ij(9,e,a,t,!1)),a):e}function MVn(n){var t,e,i,r,c,a,o,u,s,h;for(i=new Zm,a=new Ww(n.e.a);a.a<a.c.c.length;){for(h=0,(r=uG(N3(a),125)).k.c.length=0,e=new Ww(Ebn(r));e.a<e.c.c.length;)(t=uG(N3(e),218)).f&&(kD(r.k,t),++h);1==h&&mv(i.c,r)}for(c=new Ww(i);c.a<c.c.c.length;)for(r=uG(N3(c),125);1==r.k.c.length;){for(s=uG(N3(new Ww(r.k)),218),n.b[s.c]=s.g,o=s.d,u=s.e,e=new Ww(Ebn(r));e.a<e.c.c.length;)udn(t=uG(N3(e),218),s)||(t.f?o==t.d||u==t.e?n.b[s.c]-=n.b[t.c]-t.g:n.b[s.c]+=n.b[t.c]-t.g:r==o?t.d==r?n.b[s.c]+=t.g:n.b[s.c]-=t.g:t.d==r?n.b[s.c]-=t.g:n.b[s.c]+=t.g);men(o.k,s),men(u.k,s),r=o==r?s.e:s.d}}function TVn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w;if(i=uG(AJ(n.b,t),127),(s=uG(uG(Y9(n.r,t),21),87)).dc())return i.n.b=0,void(i.n.c=0);for(h=n.u.Hc((eNn(),wRt)),o=0,u=s.Kc(),f=null,l=0,b=0;u.Ob();)c=uM(pK((r=uG(u.Pb(),117)).b.of((Gx(),bht)))),a=r.b.Mf().a,n.A.Hc((Qmn(),JRt))&&vBn(n,t),f?(w=b+f.d.c+n.w+r.d.b,o=e.Math.max(o,(YN(),oan(Z2n),e.Math.abs(l-c)<=Z2n||l==c||isNaN(l)&&isNaN(c)?0:w/(c-l)))):n.C&&n.C.b>0&&(o=e.Math.max(o,run(n.C.b+r.d.b,c))),f=r,l=c,b=a;n.C&&n.C.c>0&&(w=b+n.C.c,h&&(w+=f.d.c),o=e.Math.max(o,(YN(),oan(Z2n),e.Math.abs(l-1)<=Z2n||1==l||isNaN(l)&&isNaN(1)?0:w/(1-l)))),i.n.b=0,i.a.a=o}function jVn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w;if(i=uG(AJ(n.b,t),127),(s=uG(uG(Y9(n.r,t),21),87)).dc())return i.n.d=0,void(i.n.a=0);for(h=n.u.Hc((eNn(),wRt)),o=0,n.A.Hc((Qmn(),JRt))&&kBn(n,t),u=s.Kc(),f=null,b=0,l=0;u.Ob();)a=uM(pK((r=uG(u.Pb(),117)).b.of((Gx(),bht)))),c=r.b.Mf().b,f?(w=l+f.d.a+n.w+r.d.d,o=e.Math.max(o,(YN(),oan(Z2n),e.Math.abs(b-a)<=Z2n||b==a||isNaN(b)&&isNaN(a)?0:w/(a-b)))):n.C&&n.C.d>0&&(o=e.Math.max(o,run(n.C.d+r.d.d,a))),f=r,b=a,l=c;n.C&&n.C.a>0&&(w=l+n.C.a,h&&(w+=f.d.a),o=e.Math.max(o,(YN(),oan(Z2n),e.Math.abs(b-1)<=Z2n||1==b||isNaN(b)&&isNaN(1)?0:w/(1-b)))),i.n.d=0,i.a.b=o}function EVn(n,t,e,i,r,c,a,o){var u,s,h,f,l,b,w,d;if(b=!1,u=cKn(e.q,t.f+t.b-e.q.f),l=i.f>t.b&&o,h=uXn(i,d=r-(e.q.e+u-a),!1).a,l&&h>i.f)return!1;if(l){for(f=0,w=new Ww(t.d);w.a<w.c.c.length;)f+=cKn(uG(N3(w),315),i.f)+a;d=r-f}return!(d<i.g)&&(s=c==n.c.length-1&&d>=(u3(c,n.c.length),uG(n.c[c],186)).e,!(!l&&h>t.b&&!s)&&((s||l||h<=t.b)&&(s&&h>t.b?(e.d=h,dtn(e,EOn(e,h))):(USn(e.q,u),e.c=!0),dtn(i,r-(e.s+e.r)),oMn(i,e.q.e+e.q.d,t.f),fan(t,i),n.c.length>c&&(uEn((u3(c,n.c.length),uG(n.c[c],186)),i),0==(u3(c,n.c.length),uG(n.c[c],186)).a.c.length&&i7(n,c)),b=!0),b))}function SVn(n,t,e){var i,r,c,a,o,u;for(this.g=n,o=t.d.length,u=e.d.length,this.d=Inn(pbt,e6n,10,o+u,0,1),a=0;a<o;a++)this.d[a]=t.d[a];for(c=0;c<u;c++)this.d[o+c]=e.d[c];if(t.e){if(this.e=oG(t.e),this.e.Mc(e),e.e)for(r=e.e.Kc();r.Ob();)(i=uG(r.Pb(),239))!=t&&(this.e.Hc(i)?--i.c:this.e.Fc(i))}else e.e&&(this.e=oG(e.e),this.e.Mc(t));this.f=t.f+e.f,this.a=t.a+e.a,this.a>0?Rrn(this,this.f/this.a):null!=oD(t.g,t.d[0]).a&&null!=oD(e.g,e.d[0]).a?Rrn(this,(uM(oD(t.g,t.d[0]).a)+uM(oD(e.g,e.d[0]).a))/2):null!=oD(t.g,t.d[0]).a?Rrn(this,oD(t.g,t.d[0]).a):null!=oD(e.g,e.d[0]).a&&Rrn(this,oD(e.g,e.d[0]).a)}function PVn(n,t){var e,i,r,c,a,o,u,s,h;for(n.a=new wQ(efn(axt)),i=new Ww(t.a);i.a<i.c.c.length;){for(e=uG(N3(i),855),a=new Zvn(Uhn(cT(xlt,1),EZn,86,0,[])),kD(n.a.a,a),u=new Ww(e.d);u.a<u.c.c.length;)rWn(s=new Jx(n,o=uG(N3(u),116)),uG(oIn(e.c,(GYn(),xpt)),21)),PV(n.g,e)||(vJ(n.g,e,new MO(o.c,o.d)),vJ(n.f,e,s)),kD(n.a.b,s),t4(a,s);for(c=new Ww(e.b);c.a<c.c.c.length;)s=new Jx(n,(r=uG(N3(c),602)).Df()),vJ(n.b,r,new WO(a,s)),rWn(s,uG(oIn(e.c,(GYn(),xpt)),21)),r.Bf()&&(rWn(h=new Yvn(n,r.Bf(),1),uG(oIn(e.c,xpt),21)),t4(new Zvn(Uhn(cT(xlt,1),EZn,86,0,[])),h),UNn(n.c,r.Af(),new WO(a,h)))}return n.a}function CVn(n){var t;this.a=n,t=(zIn(),Uhn(cT(vbt,1),p1n,273,0,[dbt,wbt,lbt,gbt,bbt,fbt])).length,this.b=Jq(lNt,[zZn,m9n],[601,149],0,[t,t],2),this.c=Jq(lNt,[zZn,m9n],[601,149],0,[t,t],2),DZ(this,dbt,(jYn(),ETt),STt),Jsn(this,dbt,wbt,mTt,vTt),$Z(this,dbt,gbt,mTt),$Z(this,dbt,lbt,mTt),Jsn(this,dbt,bbt,ETt,STt),DZ(this,wbt,dTt,gTt),$Z(this,wbt,gbt,dTt),$Z(this,wbt,lbt,dTt),Jsn(this,wbt,bbt,mTt,vTt),GN(this,gbt,dTt),$Z(this,gbt,lbt,dTt),$Z(this,gbt,bbt,MTt),GN(this,lbt,ITt),Jsn(this,lbt,bbt,jTt,TTt),DZ(this,bbt,dTt,dTt),DZ(this,fbt,dTt,gTt),Jsn(this,fbt,dbt,mTt,vTt),Jsn(this,fbt,bbt,mTt,vTt),Jsn(this,fbt,wbt,mTt,vTt)}function IVn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g;if(F$(a=e.Lk(),102)&&uG(a,19).Bb&P0n&&(l=uG(e.md(),54),(d=mwn(n.e,l))!=l)){if(yD(n,t,WPn(n,t,h=R5(a,d))),f=null,uN(n.e)&&(i=iVn((gAn(),kBt),n.e.Dh(),a))!=ern(n.e.Dh(),n.c)){for(g=VKn(n.e.Dh(),a),o=0,c=uG(n.g,124),u=0;u<t;++u)r=c[u],g.am(r.Lk())&&++o;(f=new i8(n.e,9,i,l,d,o,!1)).nj(new Ken(n.e,9,n.c,e,h,t,!1))}return(b=lMn(w=uG(a,19)))?(f=l.Th(n.e,emn(l.Dh(),b),null,f),f=uG(d,54).Rh(n.e,emn(d.Dh(),b),null,f)):w.Bb&Qtt&&(s=-1-emn(n.e.Dh(),w),f=l.Th(n.e,s,null,null),!uG(d,54).Ph()&&(f=uG(d,54).Rh(n.e,s,null,f))),f&&f.oj(),h}return e}function OVn(n){var t,e,i;for(Oln(NFt,Uhn(cT(vst,1),EZn,134,0,[new Dl])),e=new Eb(n),i=0;i<e.a.length;++i)m_(t=uin(e,i).te().a,"layered")?Oln(NFt,Uhn(cT(vst,1),EZn,134,0,[new fl])):m_(t,"force")?Oln(NFt,Uhn(cT(vst,1),EZn,134,0,[new Gf])):m_(t,"stress")?Oln(NFt,Uhn(cT(vst,1),EZn,134,0,[new Xf])):m_(t,"mrtree")?Oln(NFt,Uhn(cT(vst,1),EZn,134,0,[new vl])):m_(t,"radial")?Oln(NFt,Uhn(cT(vst,1),EZn,134,0,[new El])):m_(t,"disco")?Oln(NFt,Uhn(cT(vst,1),EZn,134,0,[new Bf,new Hf])):m_(t,"sporeOverlap")||m_(t,"sporeCompaction")?Oln(NFt,Uhn(cT(vst,1),EZn,134,0,[new Ol])):m_(t,"rectpacking")&&Oln(NFt,Uhn(cT(vst,1),EZn,134,0,[new Pl]))}function AVn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p;if(l=new eN(n.o),p=t.a/l.a,o=t.b/l.b,d=t.a-l.a,c=t.b-l.b,e)for(r=xA(oIn(n,(jYn(),JMt)))===xA(($Pn(),cRt)),w=new Ww(n.j);w.a<w.c.c.length;)switch((b=uG(N3(w),12)).j.g){case 1:r||(b.n.a*=p);break;case 2:b.n.a+=d,r||(b.n.b*=o);break;case 3:r||(b.n.a*=p),b.n.b+=c;break;case 4:r||(b.n.b*=o)}for(s=new Ww(n.b);s.a<s.c.c.length;)h=(u=uG(N3(s),72)).n.a+u.o.a/2,f=u.n.b+u.o.b/2,(g=h/l.a)+(a=f/l.b)>=1&&(g-a>0&&f>=0?(u.n.a+=d,u.n.b+=c*a):g-a<0&&h>=0&&(u.n.a+=d*g,u.n.b+=c));n.o.a=t.a,n.o.b=t.b,kfn(n,(jYn(),DMt),(Qmn(),new nB(i=uG(Mj(sKt),9),uG(MF(i,i.length),9),0)))}function LVn(n,t,e,i,r,c){if(null!=t&&mpn(t,YFt,ZFt))throw hv(new vM("invalid scheme: "+t));if(!(n||null!=e&&-1==xL(e,$Cn(35))&&e.length>0&&(s3(0,e.length),47!=e.charCodeAt(0))))throw hv(new vM("invalid opaquePart: "+e));if(n&&(null==t||!ZE(UFt,t.toLowerCase()))&&null!=e&&mpn(e,n_t,t_t))throw hv(new vM(Vit+e));if(n&&null!=t&&ZE(UFt,t.toLowerCase())&&!bPn(e))throw hv(new vM(Vit+e));if(!Ppn(i))throw hv(new vM("invalid device: "+i));if(!Jbn(r))throw hv(new vM(null==r?"invalid segments: null":"invalid segment: "+Lbn(r)));if(null!=c&&-1!=xL(c,$Cn(35)))throw hv(new vM("invalid query: "+c))}function NVn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p;if(i.Ug("Network simplex layering",1),n.b=t,p=4*uG(oIn(t,(jYn(),OTt)),17).a,(g=n.b.a).c.length<1)i.Vg();else{for(d=null,c=Fkn(a=RHn(n,g),0);c.b!=c.d.c;){for(r=uG(I6(c),15),u=p*t0(e.Math.sqrt(r.gc())),YHn(kT(MT(yT(_B(o=dUn(r)),u),d),!0),i.eh(1)),l=n.b.b,w=new Ww(o.a);w.a<w.c.c.length;){for(b=uG(N3(w),125);l.c.length<=b.e;)GX(l,l.c.length,new bQ(n.b));a2(uG(b.f,10),uG(zq(l,b.e),30))}if(a.b>1)for(d=Inn(YHt,W1n,28,n.b.b.c.length,15,1),f=0,h=new Ww(n.b.b);h.a<h.c.c.length;)s=uG(N3(h),30),d[f++]=s.a.c.length}g.c.length=0,n.a=null,n.b=null,n.c=null,i.Vg()}}function $Vn(n,t){var e,i,r,c,a,o,u,s,h,f;for(h=new Zm,f=new ND,c=null,r=0,i=0;i<t.length;++i)switch(Yln(c,e=t[i])&&(r=kpn(n,f,h,VEt,r)),vR(e,(GYn(),zpt))&&(c=uG(oIn(e,zpt),10)),e.k.g){case 0:for(u=gN(YU(Dgn(e,(KQn(),yRt)),new Nc));oon(u);)a=uG(yen(u),12),n.d[a.p]=r++,mv(h.c,a);for(r=kpn(n,f,h,VEt,r),s=gN(YU(Dgn(e,KRt),new Nc));oon(s);)a=uG(yen(s),12),n.d[a.p]=r++,mv(h.c,a);break;case 3:Dgn(e,zEt).dc()||(a=uG(Dgn(e,zEt).Xb(0),12),n.d[a.p]=r++,mv(h.c,a)),Dgn(e,VEt).dc()||A6(f,e);break;case 1:for(o=Dgn(e,(KQn(),_Rt)).Kc();o.Ob();)a=uG(o.Pb(),12),n.d[a.p]=r++,mv(h.c,a);Dgn(e,kRt).Jc(new EI(f,e))}return kpn(n,f,h,VEt,r),h}function DVn(n,t){var e,i,r,c,a,o,u,s,h,f,l;if(null==t||0==t.length)return null;if(!(c=uG(U1(n.f,t),23))){for(r=new _w(new Fw(n.d).a.vc().Kc());r.a.Ob();)if(a=uG(r.a.Pb(),44),o=(e=uG(a.md(),23)).f,l=t.length,m_(o.substr(o.length-l,l),t)&&(t.length==o.length||46==VJ(o,o.length-t.length-1))){if(c)return null;c=e}if(!c)for(i=new _w(new Fw(n.d).a.vc().Kc());i.a.Ob();)if(a=uG(i.a.Pb(),44),null!=(f=(e=uG(a.md(),23)).g))for(s=0,h=(u=f).length;s<h;++s)if(o=u[s],l=t.length,m_(o.substr(o.length-l,l),t)&&(t.length==o.length||46==VJ(o,o.length-t.length-1))){if(c)return null;c=e}c&&r2(n.f,t,c)}return c}function xVn(n,t){var e,i,r,c,a;for(e=new QM,a=!1,c=0;c<t.length;c++)if(s3(c,t.length),32!=(i=t.charCodeAt(c)))a?39==i?c+1<t.length&&(s3(c+1,t.length),39==t.charCodeAt(c+1))?(e.a+=String.fromCharCode(i),++c):a=!1:e.a+=String.fromCharCode(i):xL("GyMLdkHmsSEcDahKzZv",$Cn(i))>0?(Ikn(n,e,0),e.a+=String.fromCharCode(i),Ikn(n,e,r=qvn(t,c)),c+=r-1):39==i?c+1<t.length&&(s3(c+1,t.length),39==t.charCodeAt(c+1))?(e.a+="'",++c):a=!0:e.a+=String.fromCharCode(i);else for(Ikn(n,e,0),e.a+=" ",Ikn(n,e,0);c+1<t.length&&(s3(c+1,t.length),32==t.charCodeAt(c+1));)++c;Ikn(n,e,0),iCn(n)}function RVn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(v=aG(n),u=new Zm,s=(c=n.c.length)-1,h=c+1;0!=v.a.gc();){for(;0!=e.b;)MK(0!=e.b),p=uG(Lrn(e,e.a.a),118),v.a.Bc(p),p.g=s--,UGn(p,t,e,i);for(;0!=t.b;)MK(0!=t.b),m=uG(Lrn(t,t.a.a),118),v.a.Bc(m),m.g=h++,UGn(m,t,e,i);for(o=j1n,d=v.a.ec().Kc();d.Ob();){if(w=uG(d.Pb(),118),!i&&w.b>0&&w.a<=0){u.c.length=0,mv(u.c,w);break}(b=w.i-w.d)>=o&&(b>o&&(u.c.length=0,o=b),mv(u.c,w))}0!=u.c.length&&(a=uG(zq(u,iMn(r,u.c.length)),118),v.a.Bc(a),a.g=h++,UGn(a,t,e,i),u.c.length=0)}for(g=n.c.length+1,l=new Ww(n);l.a<l.c.c.length;)(f=uG(N3(l),118)).g<c&&(f.g=f.g+g)}function KVn(n,t,e){var i,r,c,a;this.j=n,this.e=SPn(n),this.o=this.j.e,this.i=!!this.o,this.p=this.i?uG(zq(e,HQ(this.o).p),219):null,r=uG(oIn(n,(GYn(),Hpt)),21),this.g=r.Hc((r_n(),tpt)),this.b=new Zm,this.d=new Umn(this.e),a=uG(oIn(this.j,dmt),234),this.q=ysn(t,a,this.e),this.k=new z0(this),c=n7(Uhn(cT(fdt,1),EZn,230,0,[this,this.d,this.k,this.q])),t!=(ean(),_Et)||oM(gK(oIn(n,(jYn(),Cyt))))?t==_Et&&oM(gK(oIn(n,(jYn(),Cyt))))?(i=new APn(this.e),mv(c.c,i),this.c=new Ron(i,a,uG(this.q,413))):this.c=new qC(t,this):(i=new APn(this.e),mv(c.c,i),this.c=new M6(i,a,uG(this.q,413))),kD(c,this.c),GXn(c,this.e),this.s=OJn(this.k)}function FVn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b,w,d,g;for(c=new Zm,s=new Ww(i);s.a<s.c.c.length;)if(a=null,(o=uG(N3(s),453)).f==(can(),Wjt))for(w=new Ww(o.e);w.a<w.c.c.length;)HQ(g=(b=uG(N3(w),18)).d.i)==t?Crn(n,t,o,b,o.b,b.d):!e||jsn(g,e)?IIn(n,t,o,i,b):((l=YXn(n,t,e,b,o.b,Wjt,a))!=a&&mv(c.c,l),l.c&&(a=l));else for(f=new Ww(o.e);f.a<f.c.c.length;)if(HQ(d=(h=uG(N3(f),18)).c.i)==t)Crn(n,t,o,h,h.c,o.b);else{if(!e||jsn(d,e))continue;(l=YXn(n,t,e,h,o.b,Vjt,a))!=a&&mv(c.c,l),l.c&&(a=l)}for(u=new Ww(c);u.a<u.c.c.length;)o=uG(N3(u),453),-1!=Ten(t.a,o.a,0)||kD(t.a,o.a),o.c&&mv(r.c,o)}function _Vn(n){var t,i,r,c,a,o,u;for(t=0,a=new Ww(n.b.a);a.a<a.c.c.length;)(r=uG(N3(a),194)).b=0,r.c=0;for(ZIn(n,0),Npn(n,n.g),fKn(n.c),OM(n.c),xdn(),i=JDt,BHn(DI(qWn(BHn(DI(qWn(BHn(qWn(n.c,i)),Bdn(i)))),i))),qWn(n.c,JDt),agn(n,n.g),nIn(n,0),NXn(n,0),wxn(n,1),ZIn(n,1),Npn(n,n.d),fKn(n.c),o=new Ww(n.b.a);o.a<o.c.c.length;)r=uG(N3(o),194),t+=e.Math.abs(r.c);for(u=new Ww(n.b.a);u.a<u.c.c.length;)(r=uG(N3(u),194)).b=0,r.c=0;for(i=nxt,BHn(DI(qWn(BHn(DI(qWn(BHn(OM(qWn(n.c,i))),Bdn(i)))),i))),qWn(n.c,JDt),agn(n,n.d),nIn(n,1),NXn(n,1),wxn(n,0),OM(n.c),c=new Ww(n.b.a);c.a<c.c.c.length;)r=uG(N3(c),194),t+=e.Math.abs(r.c);return t}function BVn(n,t,e){var i,r,c,a,o,u,s,h,f,l;if(oM(gK(oIn(e,(jYn(),sMt)))))for(r=new Ww(e.j);r.a<r.c.c.length;)for(o=0,u=(a=x4(uG(N3(r),12).g)).length;o<u;++o)(c=a[o]).d.i==e&&oM(gK(oIn(c,hMt)))&&(h=c.c,(s=uG(cQ(n.b,h),10))||(kfn(s=DJn(h,($Pn(),uRt),h.j,-1,null,null,h.o,uG(oIn(t,Byt),88),t),(GYn(),rmt),h),vJ(n.b,h,s),kD(t.a,s)),l=c.d,(f=uG(cQ(n.b,l),10))||(kfn(f=DJn(l,($Pn(),uRt),l.j,1,null,null,l.o,uG(oIn(t,Byt),88),t),(GYn(),rmt),l),vJ(n.b,l,f),kD(t.a,f)),c2(i=K9(c),uG(zq(s.j,0),12)),u2(i,uG(zq(f.j,0),12)),UNn(n.a,c,new $B(i,t,(can(),Wjt))),uG(oIn(t,(GYn(),Hpt)),21).Fc((r_n(),tpt)))}function HVn(n,t){var e,i,r,c,a,o,u,s,h,f;for(i=new Ww(n.a.b);i.a<i.c.c.length;)for(o=new Ww(uG(N3(i),30).a);o.a<o.c.c.length;)a=uG(N3(o),10),t.j[a.p]=a,t.i[a.p]=t.o==(w0(),dSt)?T0n:M0n;for($V(n.c),c=n.a.b,t.c==(b0(),hSt)&&(c=Spn(c)),_4(n.e,t,n.b),FP(t.p,null),r=c.Kc();r.Ob();)for(u=uG(r.Pb(),30).a,t.o==(w0(),dSt)&&(u=Spn(u)),f=u.Kc();f.Ob();)h=uG(f.Pb(),10),t.g[h.p]==h&&IJn(n,h,t);for(cVn(n,t),e=c.Kc();e.Ob();)for(f=new Ww(uG(e.Pb(),30).a);f.a<f.c.c.length;)h=uG(N3(f),10),t.p[h.p]=t.p[t.g[h.p].p],h==t.g[h.p]&&(s=uM(t.i[t.j[h.p].p]),(t.o==(w0(),dSt)&&s>T0n||t.o==wSt&&s<M0n)&&(t.p[h.p]=uM(t.p[h.p])+s));n.e.xg()}function UVn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w;for(e.Ug("Label dummy switching",1),i=uG(oIn(t,(jYn(),Gyt)),232),zun(t),r=dxn(t,i),n.a=Inn(eUt,I0n,28,t.b.c.length,15,1),vAn(),h=0,b=(o=Uhn(cT(Qdt,1),p1n,232,0,[Hdt,Gdt,Bdt,Udt,qdt,_dt])).length;h<b;++h)if(((c=o[h])==qdt||c==_dt||c==Udt)&&!uG($x(r.a,c)?r.b[c.g]:null,15).dc()){dsn(n,t);break}for(f=0,w=(u=Uhn(cT(Qdt,1),p1n,232,0,[Hdt,Gdt,Bdt,Udt,qdt,_dt])).length;f<w;++f)(c=u[f])==qdt||c==_dt||c==Udt||QHn(n,uG($x(r.a,c)?r.b[c.g]:null,15));for(s=0,l=(a=Uhn(cT(Qdt,1),p1n,232,0,[Hdt,Gdt,Bdt,Udt,qdt,_dt])).length;s<l;++s)((c=a[s])==qdt||c==_dt||c==Udt)&&QHn(n,uG($x(r.a,c)?r.b[c.g]:null,15));n.a=null,e.Vg()}function GVn(n,t){var e,i,r,c,a,o,u,s,h;if(null!=(s=t).b&&null!=n.b){for(pxn(n),szn(n),pxn(s),szn(s),e=Inn(YHt,W1n,28,n.b.length+s.b.length,15,1),h=0,i=0,a=0;i<n.b.length&&a<s.b.length;)if(r=n.b[i],c=n.b[i+1],o=s.b[a],u=s.b[a+1],c<o)i+=2;else if(c>=o&&r<=u)o<=r&&c<=u?(e[h++]=r,e[h++]=c,i+=2):o<=r?(e[h++]=r,e[h++]=u,n.b[i]=u+1,a+=2):c<=u?(e[h++]=o,e[h++]=c,i+=2):(e[h++]=o,e[h++]=u,n.b[i]=u+1);else{if(!(u<r))throw hv(new Ky("Token#intersectRanges(): Internal Error: ["+n.b[i]+","+n.b[i+1]+"] & ["+s.b[a]+","+s.b[a+1]+"]"));a+=2}for(;i<n.b.length;)e[h++]=n.b[i++],e[h++]=n.b[i++];n.b=Inn(YHt,W1n,28,h,15,1),qGn(e,0,n.b,0,h)}}function qVn(n){var t,i,r,c,a,o,u;for(t=new Zm,n.g=new Zm,n.d=new Zm,o=new bsn(new Nw(n.f.b).a);o.b;)kD(t,uG(uG((a=von(o)).md(),42).b,86)),hN(uG(a.ld(),602).Af())?kD(n.d,uG(a.md(),42)):kD(n.g,uG(a.md(),42));for(Npn(n,n.d),Npn(n,n.g),n.c=new i$n(n.b),ST(n.c,(HS(),Olt)),agn(n,n.d),agn(n,n.g),Ohn(t,n.c.a.b),n.e=new MO(M0n,M0n),n.a=new MO(T0n,T0n),r=new Ww(t);r.a<r.c.c.length;)i=uG(N3(r),86),n.e.a=e.Math.min(n.e.a,i.g.c),n.e.b=e.Math.min(n.e.b,i.g.d),n.a.a=e.Math.max(n.a.a,i.g.c+i.g.b),n.a.b=e.Math.max(n.a.b,i.g.d+i.g.a);ET(n.c,new kt),u=0;do{c=_Vn(n),++u}while((u<2||c>T1n)&&u<10);ET(n.c,new yt),_Vn(n),YV(n.c),lVn(n.f)}function XVn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(i=uG(oIn(n,(jYn(),JMt)),101),o=n.f,a=n.d,u=o.a+a.b+a.c,s=0-a.d-n.c.b,f=o.b+a.d+a.a-n.c.b,h=new Zm,l=new Zm,c=new Ww(t);c.a<c.c.c.length;){switch(r=uG(N3(c),10),i.g){case 1:case 2:case 3:OKn(r);break;case 4:w=(b=uG(oIn(r,WMt),8))?b.a:0,r.n.a=u*uM(pK(oIn(r,(GYn(),bmt))))-w,fhn(r,!0,!1);break;case 5:g=(d=uG(oIn(r,WMt),8))?d.a:0,r.n.a=uM(pK(oIn(r,(GYn(),bmt))))-g,fhn(r,!0,!1),o.a=e.Math.max(o.a,r.n.a+r.o.a/2)}switch(uG(oIn(r,(GYn(),Fpt)),64).g){case 1:r.n.b=s,mv(h.c,r);break;case 3:r.n.b=f,mv(l.c,r)}}switch(i.g){case 1:case 2:adn(h,n),adn(l,n);break;case 3:odn(h,n),odn(l,n)}}function zVn(n,t){var e,i,r,c,a,o,u,s,h,f,l;switch(n.k.g){case 1:if(i=uG(oIn(n,(GYn(),rmt)),18),(e=uG(oIn(i,cmt),75))?oM(gK(oIn(i,pmt)))&&(e=fln(e)):e=new Uk,s=uG(oIn(n,Zpt),12)){if(t<=(h=Gfn(Uhn(cT(PNt,1),zZn,8,0,[s.i.n,s.n,s.a]))).a)return h.b;s8(e,h,e.a,e.a.a)}if(f=uG(oIn(n,nmt),12)){if((l=Gfn(Uhn(cT(PNt,1),zZn,8,0,[f.i.n,f.n,f.a]))).a<=t)return l.b;s8(e,l,e.c.b,e.c)}if(e.b>=2){for(a=uG(I6(u=Fkn(e,0)),8),o=uG(I6(u),8);o.a<t&&u.b!=u.d.c;)a=o,o=uG(I6(u),8);return a.b+(t-a.a)/(o.a-a.a)*(o.b-a.b)}break;case 3:switch(r=(c=uG(oIn(uG(zq(n.j,0),12),(GYn(),rmt)),12)).i,c.j.g){case 1:return r.n.b;case 3:return r.n.b+r.o.b}}return jSn(n).b}function VVn(n){var t,e,i,r,c,a,o,u,s,f;for(c=new Ww(n.d.b);c.a<c.c.c.length;)for(o=new Ww(uG(N3(c),30).a);o.a<o.c.c.length;)!oM(gK(oIn(a=uG(N3(o),10),(jYn(),gyt))))||P6(Ggn(a))?(r=new gY(a.n.a-a.d.b,a.n.b-a.d.d,a.o.a+a.d.b+a.d.c,a.o.b+a.d.d+a.d.a),t=Tx(NS(AS(LS(new lk,a),r),rdt),n.a),Mx(OS(Xcn(new fk,Uhn(cT(zut,1),EZn,60,0,[t])),t),n.a),u=new nv,vJ(n.e,t,u),(e=x5(new Fz(ix(qgn(a).a.Kc(),new h)))-x5(new Fz(ix(Xgn(a).a.Kc(),new h))))<0?hfn(u,!0,(xdn(),JDt)):e>0&&hfn(u,!0,(xdn(),YDt)),a.k==(zIn(),lbt)&&XQ(u),vJ(n.f,a,t)):((s=(i=uG(pZ(Ggn(a)),18)).c.i)==a&&(s=i.d.i),f=new WO(s,YF(D$(a.n),s.n)),vJ(n.b,a,f))}function WVn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(i=uG(oIn(n,(OQn(),RPt)),27),u=vZn,s=vZn,a=j1n,o=j1n,m=Fkn(n.b,0);m.b!=m.d.c;)l=(g=uG(I6(m),40)).e,b=g.f,u=e.Math.min(u,l.a-b.a/2),s=e.Math.min(s,l.b-b.b/2),a=e.Math.max(a,l.a+b.a/2),o=e.Math.max(o,l.b+b.b/2);for(f=uG(zDn(i,(QGn(),pCt)),107),p=Fkn(n.b,0);p.b!=p.d.c;)F$(h=oIn(g=uG(I6(p),40),RPt),207)&&(kN(r=uG(h,27),g.e.a,g.e.b),aKn(r,g));for(d=Fkn(n.a,0);d.b!=d.d.c;)w=uG(I6(d),65),(t=uG(oIn(w,RPt),74))&&sqn(w.a,JFn(t,!0,!0));v=a-u+(f.b+f.c),c=o-s+(f.d+f.a),oM(gK(zDn(i,(XYn(),H$t))))||ZQn(i,v,c,!1,!1),Myn(i,h$t,v-(f.b+f.c)),Myn(i,s$t,c-(f.d+f.a))}function QVn(n,t){var e,i,r,c,a,o,u,s,f;for(o=!0,r=0,u=n.g[t.p],s=t.o.b+n.o,e=n.d[t.p][2],Y8(n.b,u,xwn(uG(zq(n.b,u),17).a-1+e)),Y8(n.c,u,uM(pK(zq(n.c,u)))-s+e*n.f),++u>=n.j?(++n.j,kD(n.b,xwn(1)),kD(n.c,s)):(i=n.d[t.p][1],Y8(n.b,u,xwn(uG(zq(n.b,u),17).a+1-i)),Y8(n.c,u,uM(pK(zq(n.c,u)))+s-i*n.f)),(n.r==(THn(),Ijt)&&(uG(zq(n.b,u),17).a>n.k||uG(zq(n.b,u-1),17).a>n.k)||n.r==Ljt&&(uM(pK(zq(n.c,u)))>n.n||uM(pK(zq(n.c,u-1)))>n.n))&&(o=!1),c=new Fz(ix(qgn(t).a.Kc(),new h));hDn(c);)a=uG(N9(c),18).c.i,n.g[a.p]==u&&(r+=uG((f=QVn(n,a)).a,17).a,o=o&&oM(gK(f.b)));return n.g[t.p]=u,new WO(xwn(r+=n.d[t.p][0]),(qx(),!!o))}function JVn(n,t){var e,i;uM(pK(oIn(t,(jYn(),dTt))))<2&&kfn(t,dTt,2),uG(oIn(t,Byt),88)==(xdn(),ZDt)&&kfn(t,Byt,pgn(t)),0==(e=uG(oIn(t,sTt),17)).a?kfn(t,(GYn(),dmt),new Upn):kfn(t,(GYn(),dmt),new v8(e.a)),null==gK(oIn(t,OMt))&&kfn(t,OMt,(qx(),xA(oIn(t,Vyt))===xA((_gn(),uxt)))),kS(new fX(null,new h3(t.a,16)),new Hd(n)),kS(sin(new fX(null,new h3(t.b,16)),new dt),new Ud(n)),i=new CVn(t),kfn(t,(GYn(),kmt),i),_J(n.a),JV(n.a,(uIn(),Tlt),uG(oIn(t,Fyt),188)),JV(n.a,jlt,uG(oIn(t,MMt),188)),JV(n.a,Elt,uG(oIn(t,Kyt),188)),JV(n.a,Slt,uG(oIn(t,$Mt),188)),JV(n.a,Plt,Rsn(uG(oIn(t,Vyt),223))),ZL(n.a,iYn(t)),kfn(t,wmt,Qzn(n.a,t))}function YVn(n,t,i,r,c){var a,o,u,s,h,f,l,b,w,d,g,p,m;for(l=new Ym,o=new Zm,HAn(n,i,n.d.Ag(),o,l),HAn(n,r,n.d.Bg(),o,l),n.b=.2*(g=DDn(sin(new fX(null,new h3(o,16)),new pa)),p=DDn(sin(new fX(null,new h3(o,16)),new ma)),e.Math.min(g,p)),a=0,u=0;u<o.c.length-1;u++)for(u3(u,o.c.length),s=uG(o.c[u],118),d=u+1;d<o.c.length;d++)a+=OXn(n,s,(u3(d,o.c.length),uG(o.c[d],118)));for(b=uG(oIn(t,(GYn(),dmt)),234),a>=2&&(m=sRn(o,!0,b),!n.e&&(n.e=new pp(n)),xvn(n.e,m,o,n.b)),BPn(o,b),oWn(o),w=-1,f=new Ww(o);f.a<f.c.c.length;)h=uG(N3(f),118),e.Math.abs(h.s-h.c)<t4n||(w=e.Math.max(w,h.o),n.d.yg(h,c,n.c));return n.d.a.a.$b(),w+1}function ZVn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;for(l=(s=uG(B$(new Tp(Fkn(new Mp(t).a.d,0))),40))?uG(oIn(s,(OQn(),APt)),40):null,r=1;s&&l;){for(a=0,m=0,e=s,i=l,c=0;c<r;c++)e=M7(e),i=M7(i),m+=uM(pK(oIn(e,(OQn(),xPt)))),a+=uM(pK(oIn(i,xPt)));if(p=uM(pK(oIn(l,(OQn(),FPt)))),g=uM(pK(oIn(s,FPt))),h=Mgn(n,s,l),0<(f=p+a+n.b+h-g-m)){for(o=t,u=0;o&&o!=i;)++u,o=uG(oIn(o,LPt),40);if(!o)return;for(d=f/u,o=t;o!=i;)w=uM(pK(oIn(o,FPt)))+f,kfn(o,FPt,w),b=uM(pK(oIn(o,xPt)))+f,kfn(o,xPt,b),f-=d,o=uG(oIn(o,LPt),40)}++r,l=(s=0==s.d.b?cUn(new Mp(t),r):uG(B$(new Tp(Fkn(new Mp(s).a.d,0))),40))?uG(oIn(s,APt),40):null}}function nWn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;return l=n.c[t],b=n.c[e],!((w=uG(oIn(l,(GYn(),Vpt)),15))&&0!=w.gc()&&w.Hc(b)||(d=l.k!=(zIn(),wbt)&&b.k!=wbt,m=(g=uG(oIn(l,zpt),10))!=(p=uG(oIn(b,zpt),10)),v=!!g&&g!=l||!!p&&p!=b,k=qMn(l,(KQn(),yRt)),y=qMn(b,KRt),v|=qMn(l,KRt)||qMn(b,yRt),d&&(v&&m||k||y))||l.k==(zIn(),gbt)&&b.k==dbt||b.k==(zIn(),gbt)&&l.k==dbt)&&(h=n.c[t],c=n.c[e],r=YEn(n.e,h,c,(KQn(),_Rt)),u=YEn(n.i,h,c,kRt),wKn(n.f,h,c),s=Jln(n.b,h,c)+uG(r.a,17).a+uG(u.a,17).a+n.f.d,o=Jln(n.b,c,h)+uG(r.b,17).a+uG(u.b,17).a+n.f.b,n.a&&(f=uG(oIn(h,rmt),12),a=uG(oIn(c,rmt),12),s+=uG((i=Sjn(n.g,f,a)).a,17).a,o+=uG(i.b,17).a),s>o)}function tWn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(h=M0n,f=M0n,u=T0n,s=T0n,b=new Ww(t.i);b.a<b.c.c.length;)l=uG(N3(b),68),kN(c=uG(uG(cQ(n.g,l.a),42).b,27),l.b.c,l.b.d),h=e.Math.min(h,c.i),f=e.Math.min(f,c.j),u=e.Math.max(u,c.i+c.g),s=e.Math.max(s,c.j+c.f);for(w=uG(zDn(n.c,(fIn(),bLt)),107),ZQn(n.c,u-h+(w.b+w.c),s-f+(w.d+w.a),!0,!0),JCn(n.c,-h+w.b,-f+w.d),r=new DD(xY(n.c));r.e!=r.i.gc();)o=JFn(i=uG(Zkn(r),74),!0,!0),d=bIn(i),p=gIn(i),g=new MO(d.i+d.g/2,d.j+d.f/2),a=new MO(p.i+p.g/2,p.j+p.f/2),OEn(m=YF(new MO(a.a,a.b),g),d.g,d.f),JF(g,m),OEn(v=YF(new MO(g.a,g.b),a),p.g,p.f),JF(a,v),MN(o,g.a,g.b),yN(o,a.a,a.b)}function eWn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b;for(t.Ug("Label dummy removal",1),i=uM(pK(oIn(n,(jYn(),pTt)))),r=uM(pK(oIn(n,yTt))),u=uG(oIn(n,Byt),88),o=new Ww(n.b);o.a<o.c.c.length;)for(h=new N4(uG(N3(o),30).a,0);h.b<h.d.gc();)MK(h.b<h.d.gc()),(s=uG(h.d.Xb(h.c=h.b++),10)).k==(zIn(),bbt)&&(f=uG(oIn(s,(GYn(),rmt)),18),b=uM(pK(oIn(f,tMt))),a=xA(oIn(s,Qpt))===xA((Ajn(),Dxt)),e=new eN(s.n),a&&(e.b+=b+i),c=new MO(s.o.a,s.o.b+(s.k!=bbt||Qj(JJ(uG(oIn(s,gmt),15).Oc(),new hd(new _t))).Bd((vS(),Kut))?-b-i:0)),l=uG(oIn(s,gmt),15),u==(xdn(),nxt)||u==QDt?KDn(l,e,r,c,a,u):bwn(l,e,r,c),Ohn(f.b,l),pVn(s,xA(oIn(n,Vyt))===xA((_gn(),sxt))),LQ(h));t.Vg()}function iWn(n){n.q||(n.q=!0,n.p=Nsn(n,0),n.a=Nsn(n,1),Won(n.a,0),n.f=Nsn(n,2),Won(n.f,1),Von(n.f,2),n.n=Nsn(n,3),Von(n.n,3),Von(n.n,4),Von(n.n,5),Von(n.n,6),n.g=Nsn(n,4),Won(n.g,7),Von(n.g,8),n.c=Nsn(n,5),Won(n.c,7),Won(n.c,8),n.i=Nsn(n,6),Won(n.i,9),Won(n.i,10),Won(n.i,11),Won(n.i,12),Von(n.i,13),n.j=Nsn(n,7),Won(n.j,9),n.d=Nsn(n,8),Won(n.d,3),Won(n.d,4),Won(n.d,5),Won(n.d,6),Von(n.d,7),Von(n.d,8),Von(n.d,9),Von(n.d,10),n.b=Nsn(n,9),Von(n.b,0),Von(n.b,1),n.e=Nsn(n,10),Von(n.e,1),Von(n.e,2),Von(n.e,3),Von(n.e,4),Won(n.e,5),Won(n.e,6),Won(n.e,7),Won(n.e,8),Won(n.e,9),Won(n.e,10),Von(n.e,11),n.k=Nsn(n,11),Von(n.k,0),Von(n.k,1),n.o=$sn(n,12),n.s=$sn(n,13))}function rWn(n,t){t.dc()&&gG(n.j,!0,!0,!0,!0),udn(t,(KQn(),PRt))&&gG(n.j,!0,!0,!0,!1),udn(t,MRt)&&gG(n.j,!1,!0,!0,!0),udn(t,DRt)&&gG(n.j,!0,!0,!1,!0),udn(t,RRt)&&gG(n.j,!0,!1,!0,!0),udn(t,CRt)&&gG(n.j,!1,!0,!0,!1),udn(t,TRt)&&gG(n.j,!1,!0,!1,!0),udn(t,xRt)&&gG(n.j,!0,!1,!1,!0),udn(t,$Rt)&&gG(n.j,!0,!1,!0,!1),udn(t,LRt)&&gG(n.j,!0,!0,!0,!0),udn(t,ERt)&&gG(n.j,!0,!0,!0,!0),udn(t,LRt)&&gG(n.j,!0,!0,!0,!0),udn(t,jRt)&&gG(n.j,!0,!0,!0,!0),udn(t,NRt)&&gG(n.j,!0,!0,!0,!0),udn(t,ARt)&&gG(n.j,!0,!0,!0,!0),udn(t,ORt)&&gG(n.j,!0,!0,!0,!0)}function cWn(n,t,e){var i,r,c,a,o,u,s,h,f;if(n.a!=t.jk())throw hv(new vM(tet+t.xe()+eet));if(i=tdn((gAn(),kBt),t).Jl())return i.jk().wi().ri(i,e);if(a=tdn(kBt,t).Ll()){if(null==e)return null;if((o=uG(e,15)).dc())return"";for(f=new zM,c=o.Kc();c.Ob();)r=c.Pb(),VA(f,a.jk().wi().ri(a,r)),f.a+=" ";return CL(f,f.a.length-1)}if(!(h=tdn(kBt,t).Ml()).dc()){for(s=h.Kc();s.Ob();)if((u=uG(s.Pb(),156)).fk(e))try{if(null!=(f=u.jk().wi().ri(u,e)))return f}catch(l){if(!F$(l=Ehn(l),103))throw hv(l)}throw hv(new vM("Invalid value: '"+e+"' for datatype :"+t.xe()))}return uG(t,847).ok(),null==e?null:F$(e,180)?""+uG(e,180).a:Tbn(e)==iot?N$(QKt[0],uG(e,206)):cpn(e)}function aWn(n){var t,i,r,c,a,o,u,s,h;for(s=new lS,o=new lS,c=new Ww(n);c.a<c.c.c.length;)(i=uG(N3(c),131)).v=0,i.n=i.i.c.length,i.u=i.t.c.length,0==i.n&&s8(s,i,s.c.b,s.c),0==i.u&&0==i.r.a.gc()&&s8(o,i,o.c.b,o.c);for(a=-1;0!=s.b;)for(t=new Ww((i=uG(Kjn(s,0),131)).t);t.a<t.c.c.length;)(h=uG(N3(t),274).b).v=e.Math.max(h.v,i.v+1),a=e.Math.max(a,h.v),--h.n,0==h.n&&s8(s,h,s.c.b,s.c);if(a>-1){for(r=Fkn(o,0);r.b!=r.d.c;)(i=uG(I6(r),131)).v=a;for(;0!=o.b;)for(t=new Ww((i=uG(Kjn(o,0),131)).i);t.a<t.c.c.length;)0==(u=uG(N3(t),274).a).r.a.gc()&&(u.v=e.Math.min(u.v,i.v-1),--u.u,0==u.u&&s8(o,u,o.c.b,o.c))}}function oWn(n){var t,i,r,c,a,o,u,s,h;for(s=new Zm,o=new Zm,a=new Ww(n);a.a<a.c.c.length;)Qb(r=uG(N3(a),118),r.f.c.length),Jb(r,r.k.c.length),0==r.d&&mv(s.c,r),0==r.i&&0==r.e.b&&mv(o.c,r);for(i=-1;0!=s.c.length;)for(t=new Ww((r=uG(i7(s,0),118)).k);t.a<t.c.c.length;)Yb(h=uG(N3(t),132).b,e.Math.max(h.o,r.o+1)),i=e.Math.max(i,h.o),Qb(h,h.d-1),0==h.d&&mv(s.c,h);if(i>-1){for(c=new Ww(o);c.a<c.c.c.length;)(r=uG(N3(c),118)).o=i;for(;0!=o.c.length;)for(t=new Ww((r=uG(i7(o,0),118)).f);t.a<t.c.c.length;)(u=uG(N3(t),132).a).e.b>0||(Yb(u,e.Math.min(u.o,r.o-1)),Jb(u,u.i-1),0==u.i&&mv(o.c,u))}}function uWn(n,t,i,r,c){var a,o,u,s;return s=M0n,o=!1,a=!!(u=rXn(n,YF(new MO(t.a,t.b),n),JF(new MO(i.a,i.b),c),YF(new MO(r.a,r.b),i)))&&!(e.Math.abs(u.a-n.a)<=Hnt&&e.Math.abs(u.b-n.b)<=Hnt||e.Math.abs(u.a-t.a)<=Hnt&&e.Math.abs(u.b-t.b)<=Hnt),(u=rXn(n,YF(new MO(t.a,t.b),n),i,c))&&((e.Math.abs(u.a-n.a)<=Hnt&&e.Math.abs(u.b-n.b)<=Hnt)==(e.Math.abs(u.a-t.a)<=Hnt&&e.Math.abs(u.b-t.b)<=Hnt)||a?s=e.Math.min(s,NQ(YF(u,i))):o=!0),(u=rXn(n,YF(new MO(t.a,t.b),n),r,c))&&(o||(e.Math.abs(u.a-n.a)<=Hnt&&e.Math.abs(u.b-n.b)<=Hnt)==(e.Math.abs(u.a-t.a)<=Hnt&&e.Math.abs(u.b-t.b)<=Hnt)||a)&&(s=e.Math.min(s,NQ(YF(u,r)))),s}function sWn(n){hP(n,new hCn(xT(FT(DT(KT(RT(new bu,$4n),D4n),"Minimizes the stress within a layout using stress majorization. Stress exists if the euclidean distance between a pair of nodes doesn't match their graph theoretic distance, that is, the shortest path between the two nodes. The method allows to specify individual edge lengths."),new gt),c4n))),U4(n,$4n,f4n,Jkn(olt)),U4(n,$4n,b4n,(qx(),!0)),U4(n,$4n,p4n,Jkn(hlt)),U4(n,$4n,x4n,Jkn(flt)),U4(n,$4n,g4n,Jkn(llt)),U4(n,$4n,m4n,Jkn(slt)),U4(n,$4n,w4n,Jkn(blt)),U4(n,$4n,v4n,Jkn(wlt)),U4(n,$4n,I4n,Jkn(alt)),U4(n,$4n,A4n,Jkn(rlt)),U4(n,$4n,L4n,Jkn(clt)),U4(n,$4n,N4n,Jkn(ult)),U4(n,$4n,O4n,Jkn(ilt))}function hWn(n){var t,e,i,r,c,a,o,u;for(t=null,i=new Ww(n);i.a<i.c.c.length;)uM(oD((e=uG(N3(i),239)).g,e.d[0]).a),e.b=null,e.e&&e.e.gc()>0&&0==e.c&&(!t&&(t=new Zm),mv(t.c,e));if(t)for(;0!=t.c.length;){if((e=uG(i7(t,0),239)).b&&e.b.c.length>0)for(!e.b&&(e.b=new Zm),c=new Ww(e.b);c.a<c.c.c.length;)if(sM(oD((r=uG(N3(c),239)).g,r.d[0]).a)==sM(oD(e.g,e.d[0]).a)){if(Ten(n,r,0)>Ten(n,e,0))return new WO(r,e)}else if(uM(oD(r.g,r.d[0]).a)>uM(oD(e.g,e.d[0]).a))return new WO(r,e);for(o=(!e.e&&(e.e=new Zm),e.e).Kc();o.Ob();)!(a=uG(o.Pb(),239)).b&&(a.b=new Zm),o3(0,(u=a.b).c.length),pC(u.c,0,e),a.c==u.c.length&&mv(t.c,a)}return null}function fWn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(t.Ug("Interactive crossing minimization",1),a=0,c=new Ww(n.b);c.a<c.c.c.length;)(i=uG(N3(c),30)).p=a++;for(d=new rj((l=SPn(n)).length),GXn(new IM(Uhn(cT(fdt,1),EZn,230,0,[d])),l),w=0,a=0,r=new Ww(n.b);r.a<r.c.c.length;){for(e=0,f=0,h=new Ww((i=uG(N3(r),30)).a);h.a<h.c.c.length;)for((u=uG(N3(h),10)).n.a>0&&(e+=u.n.a+u.o.a/2,++f),b=new Ww(u.j);b.a<b.c.c.length;)uG(N3(b),12).p=w++;for(f>0&&(e/=f),g=Inn(eUt,I0n,28,i.a.c.length,15,1),o=0,s=new Ww(i.a);s.a<s.c.c.length;)(u=uG(N3(s),10)).p=o++,g[u.p]=zVn(u,e),u.k==(zIn(),wbt)&&kfn(u,(GYn(),amt),g[u.p]);hZ(),f$(i.a,new Wg(g)),hUn(d,l,a,!0),++a}t.Vg()}function lWn(n,t){var e,i,r,c,a,o,u,s,h;if(5!=t.e){if(null!=(s=t).b&&null!=n.b){for(pxn(n),szn(n),pxn(s),szn(s),e=Inn(YHt,W1n,28,n.b.length+s.b.length,15,1),h=0,i=0,a=0;i<n.b.length&&a<s.b.length;)if(r=n.b[i],c=n.b[i+1],o=s.b[a],u=s.b[a+1],c<o)e[h++]=n.b[i++],e[h++]=n.b[i++];else if(c>=o&&r<=u)o<=r&&c<=u?i+=2:o<=r?(n.b[i]=u+1,a+=2):c<=u?(e[h++]=r,e[h++]=o-1,i+=2):(e[h++]=r,e[h++]=o-1,n.b[i]=u+1,a+=2);else{if(!(u<r))throw hv(new Ky("Token#subtractRanges(): Internal Error: ["+n.b[i]+","+n.b[i+1]+"] - ["+s.b[a]+","+s.b[a+1]+"]"));a+=2}for(;i<n.b.length;)e[h++]=n.b[i++],e[h++]=n.b[i++];n.b=Inn(YHt,W1n,28,h,15,1),qGn(e,0,n.b,0,h)}}else GVn(n,t)}function bWn(n,t,i,r){var c,a,o,u,s,h,f,l,b,w,d,g;for(w=COn(JFn(t,!1,!1)),r&&(w=fln(w)),g=uM(pK(zDn(t,(ryn(),Jht)))),MK(0!=w.b),b=uG(w.a.a.c,8),h=uG(hyn(w,1),8),w.b>2?(Ohn(s=new Zm,new C2(w,1,w.b)),zsn(d=new pDn(vYn(s,g+n.a)),t),mv(i.c,d)):d=uG(cQ(n.b,r?bIn(t):gIn(t)),272),o=bIn(t),r&&(o=gIn(t)),a=GOn(b,o),u=g+n.a,a.a?(u+=e.Math.abs(b.b-h.b),l=new MO(h.a,(h.b+b.b)/2)):(u+=e.Math.abs(b.a-h.a),l=new MO((h.a+b.a)/2,h.b)),vJ(r?n.d:n.c,t,new bTn(d,a,l,u)),vJ(n.b,t,d),!t.n&&(t.n=new fV(lFt,t,1,7)),f=new DD(t.n);f.e!=f.i.gc();)c=nHn(n,uG(Zkn(f),135),!0,0,0),mv(i.c,c)}function wWn(n){var t,e,i,r,c,a,o;if(!n.A.dc()){if(n.A.Hc((Qmn(),QRt))&&(uG(AJ(n.b,(KQn(),yRt)),127).k=!0,uG(AJ(n.b,KRt),127).k=!0,t=n.q!=($Pn(),aRt)&&n.q!=cRt,Db(uG(AJ(n.b,kRt),127),t),Db(uG(AJ(n.b,_Rt),127),t),Db(n.g,t),n.A.Hc(JRt)&&(uG(AJ(n.b,yRt),127).j=!0,uG(AJ(n.b,KRt),127).j=!0,uG(AJ(n.b,kRt),127).k=!0,uG(AJ(n.b,_Rt),127).k=!0,n.g.k=!0)),n.A.Hc(WRt))for(n.a.j=!0,n.a.k=!0,n.g.j=!0,n.g.k=!0,o=n.B.Hc((oUn(),cKt)),c=0,a=(r=Nkn()).length;c<a;++c)i=r[c],(e=uG(AJ(n.i,i),314))&&(vvn(i)?(e.j=!0,e.k=!0):(e.j=!o,e.k=!o));n.A.Hc(VRt)&&n.B.Hc((oUn(),rKt))&&(n.g.j=!0,n.g.j=!0,n.a.j||(n.a.j=!0,n.a.k=!0,n.a.e=!0))}}function dWn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d;for(e=new Ww(n.e.b);e.a<e.c.c.length;)for(r=new Ww(uG(N3(e),30).a);r.a<r.c.c.length;)if(i=uG(N3(r),10),u=(f=n.i[i.p]).a.e,o=f.d.e,i.n.b=u,d=o-u-i.o.b,t=WXn(i),Yyn(),h=(i.q?i.q:(hZ(),hZ(),Vot))._b((jYn(),LMt))?uG(oIn(i,LMt),203):uG(oIn(HQ(i),NMt),203),t&&(h==wjt||h==bjt)&&(i.o.b+=d),t&&(h==gjt||h==wjt||h==bjt)){for(b=new Ww(i.j);b.a<b.c.c.length;)l=uG(N3(b),12),(KQn(),ERt).Hc(l.j)&&(s=uG(cQ(n.k,l),125),l.n.b=s.e-u);for(a=new Ww(i.b);a.a<a.c.c.length;)c=uG(N3(a),72),(w=uG(oIn(i,PMt),21)).Hc((VDn(),Xxt))?c.n.b+=d:w.Hc(zxt)&&(c.n.b+=d/2);(h==wjt||h==bjt)&&Dgn(i,(KQn(),KRt)).Jc(new fp(d))}}function gWn(n,t,e){var i,r,c,a,o,u,s,h;for(u=new Zm,o=new Ww(t.a);o.a<o.c.c.length;)for(h=Dgn(uG(N3(o),10),(KQn(),kRt)).Kc();h.Ob();)for(r=new Ww(uG(h.Pb(),12).g);r.a<r.c.c.length;)!v9(i=uG(N3(r),18))&&i.c.i.c==i.d.i.c||v9(i)||i.d.i.c!=e||mv(u.c,i);for(a=Spn(e.a).Kc();a.Ob();)for(h=Dgn(uG(a.Pb(),10),(KQn(),_Rt)).Kc();h.Ob();)for(r=new Ww(uG(h.Pb(),12).e);r.a<r.c.c.length;)if((v9(i=uG(N3(r),18))||i.c.i.c!=i.d.i.c)&&!v9(i)&&i.c.i.c==t&&0!=u.c.length){for(MK((s=new N4(u,u.c.length)).b>0),c=uG(s.a.Xb(s.c=--s.b),18);c!=i&&s.b>0;)n.a[c.p]=!0,n.a[i.p]=!0,MK(s.b>0),c=uG(s.a.Xb(s.c=--s.b),18);s.b>0&&LQ(s)}}function pWn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;if(!n.b)return!1;for(a=null,l=null,r=1,(u=new _nn(null,null)).a[1]=n.b,f=u;f.a[r];)s=r,o=l,l=f,f=f.a[r],r=(i=n.a.Ne(t,f.d))<0?0:1,0==i&&(!e.c||OJ(f.e,e.d))&&(a=f),f&&f.b||NM(f.a[r])||(NM(f.a[1-r])?l=l.a[s]=Ton(f,r):NM(f.a[1-r])||(b=l.a[1-s])&&(NM(b.a[1-s])||NM(b.a[s])?(c=o.a[1]==l?1:0,NM(b.a[s])?o.a[c]=P4(l,s):NM(b.a[1-s])&&(o.a[c]=Ton(l,s)),f.b=o.a[c].b=!0,o.a[c].a[0].b=!1,o.a[c].a[1].b=!1):(l.b=!1,b.b=!0,f.b=!0)));return a&&(e.b=!0,e.d=a.e,f!=a&&(YCn(n,u,a,h=new _nn(f.d,f.e)),l==a&&(l=h)),l.a[l.a[1]==f?1:0]=f.a[f.a[0]?0:1],--n.c),n.b=u.a[1],n.b&&(n.b.b=!1),e.b}function mWn(n){var t,i,r,c,a,o,u,s,h,f,l,b;for(c=new Ww(n.a.a.b);c.a<c.c.c.length;)for(s=(r=uG(N3(c),60)).c.Kc();s.Ob();)u=uG(s.Pb(),60),r.a!=u.a&&(l=hN(n.a.d)?n.a.g.ff(r,u):n.a.g.gf(r,u),a=r.b.a+r.d.b+l-u.b.a,a=e.Math.ceil(a),a=e.Math.max(0,a),$en(r,u)?(o=jx(new sk,n.d),t=(h=t0(e.Math.ceil(u.b.a-r.b.a)))-(u.b.a-r.b.a),i=r,(f=Q6(r).a)||(f=Q6(u).a,t=-t,i=u),f&&(i.b.a-=t,f.n.a-=t),RKn(xS(DS(RS($S(new uk,e.Math.max(0,h)),1),o),n.c[r.a.d])),RKn(xS(DS(RS($S(new uk,e.Math.max(0,-h)),1),o),n.c[u.a.d]))):(b=1,(F$(r.g,154)&&F$(u.g,10)||F$(u.g,154)&&F$(r.g,10))&&(b=2),RKn(xS(DS(RS($S(new uk,t0(a)),b),n.c[r.a.d]),n.c[u.a.d]))))}function vWn(n,t,i){var r,c,a,o,u,s,h,f,l,b;if(i)for(r=-1,f=new N4(t,0);f.b<f.d.gc();){if(MK(f.b<f.d.gc()),u=uG(f.d.Xb(f.c=f.b++),10),null==(l=n.c[u.c.p][u.p].a)){for(o=r+1,a=new N4(t,f.b);a.b<a.d.gc();)if(null!=(b=aD(n,(MK(a.b<a.d.gc()),uG(a.d.Xb(a.c=a.b++),10))).a)){tJ(b),o=b;break}l=(r+o)/2,n.c[u.c.p][u.p].a=l,n.c[u.c.p][u.p].d=(tJ(l),l),n.c[u.c.p][u.p].b=1}tJ(l),r=l}else{for(c=0,h=new Ww(t);h.a<h.c.c.length;)u=uG(N3(h),10),null!=n.c[u.c.p][u.p].a&&(c=e.Math.max(c,uM(n.c[u.c.p][u.p].a)));for(c+=2,s=new Ww(t);s.a<s.c.c.length;)u=uG(N3(s),10),null==n.c[u.c.p][u.p].a&&(l=uRn(n.i,24)*z0n*c-1,n.c[u.c.p][u.p].a=l,n.c[u.c.p][u.p].d=l,n.c[u.c.p][u.p].b=1)}}function kWn(n,t,e){var i,r,c,a,o,u,s,h,f;for(!e&&(e=cfn(t.q.getTimezoneOffset())),r=6e4*(t.q.getTimezoneOffset()-e.a),u=o=new DK(Lgn(Bsn(t.q.getTime()),r)),o.q.getTimezoneOffset()!=t.q.getTimezoneOffset()&&(r>0?r-=864e5:r+=864e5,u=new DK(Lgn(Bsn(t.q.getTime()),r))),h=new QM,s=n.a.length,c=0;c<s;)if((i=VJ(n.a,c))>=97&&i<=122||i>=65&&i<=90){for(a=c+1;a<s&&VJ(n.a,a)==i;++a);KYn(h,i,a-c,o,u,e),c=a}else if(39==i){if(++c<s&&39==VJ(n.a,c)){h.a+="'",++c;continue}for(f=!1;!f;){for(a=c;a<s&&39!=VJ(n.a,a);)++a;if(a>=s)throw hv(new vM("Missing trailing '"));a+1<s&&39==VJ(n.a,a+1)?++a:f=!0,JA(h,r1(n.a,c,a)),c=a+1}}else h.a+=String.fromCharCode(i),++c;return h.a}function yWn(){ML(u_t,new Ys),ML(c_t,new sh),ML(h_t,new kh),ML(s_t,new Sh),ML(f_t,new Ph),ML(w_t,new Ch),ML(d_t,new Ih),ML(sFt,new Oh),ML(uFt,new Hs),ML(hFt,new Us),ML(nFt,new Gs),ML(p_t,new qs),ML(fFt,new Xs),ML(m_t,new zs),ML(v_t,new Vs),ML(o_t,new Ws),ML(a_t,new Qs),ML(wBt,new Js),ML(g_t,new Zs),ML(J_t,new nh),ML(cot,new th),ML(cT(tUt,1),new eh),ML(uot,new ih),ML(hot,new rh),ML(iot,new ch),ML(aUt,new ah),ML(fot,new oh),ML(CFt,new uh),ML(BFt,new hh),ML(IBt,new fh),ML(Z_t,new lh),ML(lot,new bh),ML(dot,new wh),ML(gat,new dh),ML(yot,new gh),ML(mat,new ph),ML(jBt,new mh),ML(oUt,new vh),ML(Tot,new yh),ML($ot,new Mh),ML(OFt,new Th),ML(uUt,new jh)}function MWn(n,t){var e,i,r,c,a,o;if(null==n)return IZn;if(null!=t.a.zc(n,t))return"[...]";for(e=new Ysn(TZn,"[","]"),c=0,a=(r=n).length;c<a;++c)null!=(i=r[c])&&4&Tbn(i).i?!Array.isArray(i)||(o=Min(i))>=14&&o<=16?F$(i,183)?o7(e,PLn(uG(i,183))):F$(i,195)?o7(e,xPn(uG(i,195))):F$(i,201)?o7(e,aOn(uG(i,201))):F$(i,2111)?o7(e,RPn(uG(i,2111))):F$(i,53)?o7(e,SLn(uG(i,53))):F$(i,376)?o7(e,aNn(uG(i,376))):F$(i,846)?o7(e,ELn(uG(i,846))):F$(i,109)&&o7(e,jLn(uG(i,109))):t.a._b(i)?(e.a?JA(e.a,e.b):e.a=new lx(e.d),WA(e.a,"[...]")):o7(e,MWn(Kcn(i),new oX(t))):o7(e,null==i?IZn:cpn(i));return e.a?0==e.e.length?e.a.a:e.a.a+""+e.e:e.c}function TWn(n,t){var e,i,r,c;c=n.F,null==t?(n.F=null,sbn(n,null)):(n.F=(tJ(t),t),-1!=(i=xL(t,$Cn(60)))?(Knn(0,i,t.length),r=t.substr(0,i),-1==xL(t,$Cn(46))&&!m_(r,dZn)&&!m_(r,lrt)&&!m_(r,brt)&&!m_(r,wrt)&&!m_(r,drt)&&!m_(r,grt)&&!m_(r,prt)&&!m_(r,mrt)&&(r=vrt),-1!=(e=ax(t,$Cn(62)))&&(r+=""+(s3(e+1,t.length+1),t.substr(e+1))),sbn(n,r)):(r=t,-1==xL(t,$Cn(46))&&(-1!=(i=xL(t,$Cn(91)))&&(Knn(0,i,t.length),r=t.substr(0,i)),m_(r,dZn)||m_(r,lrt)||m_(r,brt)||m_(r,wrt)||m_(r,drt)||m_(r,grt)||m_(r,prt)||m_(r,mrt)?r=t:(r=vrt,-1!=i&&(r+=""+(s3(i,t.length+1),t.substr(i))))),sbn(n,r),r==t&&(n.F=n.D))),4&n.Db&&!(1&n.Db)&&Msn(n,new lV(n,1,5,c,t))}function jWn(n,t){var e,i,r,c,a,o,u,s;if(s3(o=t.length-1,t.length),93==(a=t.charCodeAt(o))){if((c=xL(t,$Cn(91)))>=0)return r=fpn(n,(Knn(1,c,t.length),t.substr(1,c-1))),Knn(c+1,o,t.length),GJn(n,t.substr(c+1,o-(c+1)),r)}else{if(e=-1,null==oot&&(oot=new RegExp("\\d")),oot.test(String.fromCharCode(a))&&(e=T_(t,$Cn(46),o-1))>=0){i=uG(U9(n,jrn(n,(Knn(1,e,t.length),t.substr(1,e-1))),!1),61),u=0;try{u=vUn((s3(e+1,t.length+1),t.substr(e+1)),j1n,vZn)}catch(h){throw F$(h=Ehn(h),130)?hv(new Pen(h)):hv(h)}if(u<i.gc())return F$(s=i.Xb(u),76)&&(s=uG(s,76).md()),uG(s,58)}if(e<0)return uG(U9(n,jrn(n,(s3(1,t.length+1),t.substr(1))),!1),58)}return null}function EWn(n,t){var i,r,c,a,o,u,s,f,l,b,w,d,g;for(t.Ug("Label dummy insertions",1),b=new Zm,o=uM(pK(oIn(n,(jYn(),pTt)))),f=uM(pK(oIn(n,yTt))),l=uG(oIn(n,Byt),88),w=new Ww(n.a);w.a<w.c.c.length;)for(a=new Fz(ix(Xgn(uG(N3(w),10)).a.Kc(),new h));hDn(a);)if((c=uG(N9(a),18)).c.i!=c.d.i&&_$(c.b,Bwt)){for(i=Jxn(n,c,g=grn(c),d=iR(c.b.c.length)),mv(b.c,i),r=i.o,u=new N4(c.b,0);u.b<u.d.gc();)MK(u.b<u.d.gc()),xA(oIn(s=uG(u.d.Xb(u.c=u.b++),72),Xyt))===xA((Zrn(),ixt))&&(l==(xdn(),nxt)||l==QDt?(r.a+=s.o.a+f,r.b=e.Math.max(r.b,s.o.b)):(r.a=e.Math.max(r.a,s.o.a),r.b+=s.o.b+f),mv(d.c,s),LQ(u));l==(xdn(),nxt)||l==QDt?(r.a-=f,r.b+=o+g):r.b+=o-f+g}Ohn(n.a,b),t.Vg()}function SWn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b;if(n.c=n.e,l=null==(b=gK(oIn(t,(jYn(),hTt))))||(tJ(b),b),c=uG(oIn(t,(GYn(),Hpt)),21).Hc((r_n(),tpt)),e=!((r=uG(oIn(t,JMt),101))==($Pn(),rRt)||r==aRt||r==cRt),!l||!e&&c)f=new IM(Uhn(cT(sbt,1),V4n,36,0,[t]));else{for(h=new Ww(t.a);h.a<h.c.c.length;)uG(N3(h),10).p=0;for(f=new Zm,s=new Ww(t.a);s.a<s.c.c.length;)if(i=GUn(n,uG(N3(s),10),null)){for(zsn(u=new Dan,t),kfn(u,xpt,uG(i.b,21)),WY(u.d,t.d),kfn(u,RMt,null),o=uG(i.a,15).Kc();o.Ob();)a=uG(o.Pb(),10),kD(u.a,a),a.a=u;f.Fc(u)}c&&(xA(oIn(t,kyt))===xA((Uvn(),Ylt))?n.c=n.b:xA(oIn(t,kyt))===xA(nbt)?n.c=n.d:n.c=n.a)}return xA(oIn(t,kyt))!==xA((Uvn(),tbt))&&(hZ(),f.jd(new $t)),f}function PWn(n,t,e){var i,r,c,a,o;if(o=n.c,!t&&(t=nBt),n.c=t,4&n.Db&&!(1&n.Db)&&(a=new lV(n,1,2,o,n.c),e?e.nj(a):e=a),o!=t)if(F$(n.Cb,292))n.Db>>16==-10?e=uG(n.Cb,292).Yk(t,e):n.Db>>16==-15&&(!t&&(YYn(),t=N_t),!o&&(YYn(),o=N_t),n.Cb.Yh()&&(a=new Ken(n.Cb,1,13,o,t,Hyn(Aen(uG(n.Cb,62)),n),!1),e?e.nj(a):e=a));else if(F$(n.Cb,90))n.Db>>16==-23&&(F$(t,90)||(YYn(),t=x_t),F$(o,90)||(YYn(),o=x_t),n.Cb.Yh()&&(a=new Ken(n.Cb,1,10,o,t,Hyn(z5(uG(n.Cb,29)),n),!1),e?e.nj(a):e=a));else if(F$(n.Cb,457))for(!(c=uG(n.Cb,850)).b&&(c.b=new Um(new ty)),r=new Gm(new bsn(new Nw(c.b.a).a));r.a.b;)e=PWn(i=uG(von(r.a).ld(),89),bRn(i,c),e);return e}function CWn(n,t){var e,i,r,c,a,o,u,s,h,f,l;for(a=oM(gK(zDn(n,(jYn(),sMt)))),l=uG(zDn(n,nTt),21),u=!1,s=!1,f=new DD((!n.c&&(n.c=new fV(wFt,n,9,9)),n.c));!(f.e==f.i.gc()||u&&s);){for(c=uG(Zkn(f),123),o=0,r=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[(!c.d&&(c.d=new f_(aFt,c,8,5)),c.d),(!c.e&&(c.e=new f_(aFt,c,7,4)),c.e)])));hDn(r)&&(i=uG(N9(r),74),h=a&&BNn(i)&&oM(gK(zDn(i,hMt))),e=Lzn((!i.b&&(i.b=new f_(cFt,i,4,7)),i.b),c)?n==R0(lCn(uG(zrn((!i.c&&(i.c=new f_(cFt,i,5,8)),i.c),0),84))):n==R0(lCn(uG(zrn((!i.b&&(i.b=new f_(cFt,i,4,7)),i.b),0),84))),!((h||e)&&++o>1)););(o>0||l.Hc((eNn(),wRt))&&(!c.n&&(c.n=new fV(lFt,c,1,7)),c.n).i>0)&&(u=!0),o>1&&(s=!0)}u&&t.Fc((r_n(),tpt)),s&&t.Fc((r_n(),ept))}function IWn(n){var t,i,r,c,a,o,u,s,h,f,l,b;if((b=uG(zDn(n,(XYn(),_$t)),21)).dc())return null;if(u=0,o=0,b.Hc((Qmn(),QRt))){for(f=uG(zDn(n,sDt),101),r=2,i=2,c=2,a=2,t=R0(n)?uG(zDn(R0(n),d$t),88):uG(zDn(n,d$t),88),h=new DD((!n.c&&(n.c=new fV(wFt,n,9,9)),n.c));h.e!=h.i.gc();)if(s=uG(Zkn(h),123),(l=uG(zDn(s,gDt),64))==(KQn(),FRt)&&(l=RGn(s,t),Myn(s,gDt,l)),f==($Pn(),cRt))switch(l.g){case 1:r=e.Math.max(r,s.i+s.g);break;case 2:i=e.Math.max(i,s.j+s.f);break;case 3:c=e.Math.max(c,s.i+s.g);break;case 4:a=e.Math.max(a,s.j+s.f)}else switch(l.g){case 1:r+=s.g+2;break;case 2:i+=s.f+2;break;case 3:c+=s.g+2;break;case 4:a+=s.f+2}u=e.Math.max(r,c),o=e.Math.max(i,a)}return ZQn(n,u,o,!0,!0)}function OWn(n,t,i,r,c){var a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;for(v=uG(l8(krn(JJ(new fX(null,new h3(t.d,16)),new Rg(i)),new Kg(i)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),l=vZn,f=j1n,s=new Ww(t.b.j);s.a<s.c.c.length;)(u=uG(N3(s),12)).j==i&&(l=e.Math.min(l,u.p),f=e.Math.max(f,u.p));if(l==vZn)for(o=0;o<v.gc();o++)ctn(uG(v.Xb(o),105),i,o);else for(VX(k=Inn(YHt,W1n,28,c.length,15,1),k.length),m=v.Kc();m.Ob();){for(p=uG(m.Pb(),105),a=uG(cQ(n.b,p),183),h=0,g=l;g<=f;g++)a[g]&&(h=e.Math.max(h,r[g]));if(p.i){for(w=p.i.c,y=new ek,b=0;b<c.length;b++)c[w][b]&&FV(y,xwn(k[b]));for(;cS(y,xwn(h));)++h}for(ctn(p,i,h),d=l;d<=f;d++)a[d]&&(r[d]=h+1);p.i&&(k[p.i.c]=h)}}function AWn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d;for(c=null,r=new Ww(t.a);r.a<r.c.c.length;)WXn(i=uG(N3(r),10))?(h=new wY(i,!0,u=jx(KS(new sk,i),n.f),s=jx(KS(new sk,i),n.f)),f=i.o.b,Yyn(),b=1e4,(l=(i.q?i.q:(hZ(),hZ(),Vot))._b((jYn(),LMt))?uG(oIn(i,LMt),203):uG(oIn(HQ(i),NMt),203))==bjt&&(b=1),w=RKn(xS(DS($S(RS(new uk,b),t0(e.Math.ceil(f))),u),s)),l==wjt&&FV(n.d,w),BUn(n,Spn(Dgn(i,(KQn(),_Rt))),h),BUn(n,Dgn(i,kRt),h),a=h):(d=jx(KS(new sk,i),n.f),kS(JJ(new fX(null,new h3(i.j,16)),new Fc),new CI(n,d)),a=new wY(i,!1,d,d)),n.i[i.p]=a,c&&(o=c.c.d.a+y$(n.n,c.c,i)+i.d.d,c.b||(o+=c.c.o.b),RKn(xS(DS(RS($S(new uk,t0(e.Math.ceil(o))),0),c.d),a.a))),c=a}function LWn(n,t,i,r){var c,a,o,u,s,h,f,l,b,w;for(l=B_n(n,t,a=new s$n(t)),w=e.Math.max(uM(pK(oIn(t,(jYn(),tMt)))),1),f=new Ww(l.a);f.a<f.c.c.length;)h=uG(N3(f),42),s=mkn(uG(h.a,8),uG(h.b,8),w),hq(i,new MO(s.c,s.d)),hq(i,KR(new MO(s.c,s.d),s.b,0)),hq(i,KR(new MO(s.c,s.d),0,s.a)),hq(i,KR(new MO(s.c,s.d),s.b,s.a));switch(b=a.d,u=mkn(uG(l.b.a,8),uG(l.b.b,8),w),b==(KQn(),_Rt)||b==kRt?(r.c[b.g]=e.Math.min(r.c[b.g],u.d),r.b[b.g]=e.Math.max(r.b[b.g],u.d+u.a)):(r.c[b.g]=e.Math.min(r.c[b.g],u.c),r.b[b.g]=e.Math.max(r.b[b.g],u.c+u.b)),c=T0n,o=a.c.i.d,b.g){case 4:c=o.c;break;case 2:c=o.b;break;case 1:c=o.a;break;case 3:c=o.d}return r.a[b.g]=e.Math.max(r.a[b.g],c),a}function NWn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j;o=uG(cQ(t.c,n),468),g=t.a.c,u=t.a.c+t.a.b,a=(T=o.f)<(j=o.a),b=new MO(g,T),p=new MO(u,j),w=new MO(r=(g+u)/2,T),m=new MO(r,j),c=XRn(n,T,j),k=n3(t.B),y=new MO(r,c),M=n3(t.D),e=dfn(Uhn(cT(PNt,1),zZn,8,0,[k,y,M])),f=!1,(d=t.B.i)&&d.c&&o.d&&((s=a&&d.p<d.c.a.c.length-1||!a&&d.p>0)?s&&(h=d.p,a?++h:--h,f=!(VRn(i=afn(uG(zq(d.c.a,h),10)),k,e[0])||rV(i,k,e[0]))):f=!0),l=!1,(v=t.D.i)&&v.c&&o.e&&(a&&v.p>0||!a&&v.p<v.c.a.c.length-1?(h=v.p,a?--h:++h,l=!(VRn(i=afn(uG(zq(v.c.a,h),10)),e[0],M)||rV(i,e[0],M))):l=!0),f&&l&&aq(n.a,y),f||dan(n.a,Uhn(cT(PNt,1),zZn,8,0,[b,w])),l||dan(n.a,Uhn(cT(PNt,1),zZn,8,0,[m,p]))}function $Wn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;for(b=t.c.length,l=0,f=new Ww(n.b);f.a<f.c.c.length;)if(0!=(p=(h=uG(N3(f),30)).a).c.length){for(s=0,m=null,r=uG(N3(g=new Ww(p)),10),c=null;r;){if((c=uG(zq(t,r.p),261)).c>=0){for(u=null,o=new N4(h.a,s+1);o.b<o.d.gc()&&(MK(o.b<o.d.gc()),a=uG(o.d.Xb(o.c=o.b++),10),!((u=uG(zq(t,a.p),261)).d==c.d&&u.c<c.c));)u=null;u&&(m&&(Y8(i,r.p,xwn(uG(zq(i,r.p),17).a-1)),uG(zq(e,m.p),15).Mc(c)),c=nCn(c,r,b++),mv(t.c,c),kD(e,new Zm),m?(uG(zq(e,m.p),15).Fc(c),kD(i,xwn(1))):kD(i,xwn(0)))}w=null,g.a<g.c.c.length&&(w=uG(N3(g),10),d=uG(zq(t,w.p),261),uG(zq(e,r.p),15).Fc(d),Y8(i,w.p,xwn(uG(zq(i,w.p),17).a+1))),c.d=l,c.c=s++,m=r,r=w}++l}}function DWn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;if(c=uG(oIn(n,(GYn(),rmt)),74)){for(i=n.a,JF(r=new eN(e),dSn(n)),jsn(n.d.i,n.c.i)?(l=n.c,YF(f=Gfn(Uhn(cT(PNt,1),zZn,8,0,[l.n,l.a])),e)):f=n3(n.c),s8(i,f,i.a,i.a.a),b=n3(n.d),null!=oIn(n,Smt)&&JF(b,uG(oIn(n,Smt),8)),s8(i,b,i.c.b,i.c),Xun(i,r),Xan(a=JFn(c,!0,!0),uG(zrn((!c.b&&(c.b=new f_(cFt,c,4,7)),c.b),0),84)),zan(a,uG(zrn((!c.c&&(c.c=new f_(cFt,c,5,8)),c.c),0),84)),sqn(i,a),h=new Ww(n.b);h.a<h.c.c.length;)s=uG(N3(h),72),kcn(o=uG(oIn(s,rmt),135),s.o.a),vcn(o,s.o.b),kN(o,s.n.a+r.a,s.n.b+r.b),Myn(o,(Pun(),Hwt),gK(oIn(s,Hwt)));(u=uG(oIn(n,(jYn(),bMt)),75))?(Xun(u,r),Myn(c,bMt,u)):Myn(c,bMt,null),t==(_gn(),hxt)?Myn(c,Vyt,hxt):Myn(c,Vyt,null)}}function xWn(n,t,i,r){var c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j;if(0!=i.c.length){for(d=new Zm,w=new Ww(i);w.a<w.c.c.length;)kD(d,new MO((b=uG(N3(w),27)).i,b.j));for(r.dh(t,"Before removing overlaps");kIn(n,i);)gxn(n,i,!1);if(r.dh(t,"After removing overlaps"),u=0,s=0,c=null,0!=i.c.length&&(u3(0,i.c.length),u=(c=uG(i.c[0],27)).i-(u3(0,d.c.length),uG(d.c[0],8)).a,s=c.j-(u3(0,d.c.length),uG(d.c[0],8)).b),o=e.Math.sqrt(u*u+s*s),a=1,0!=(l=hwn(i)).a.gc()){for(f=l.a.ec().Kc();f.Ob();)h=uG(f.Pb(),27),p=(g=n.f).i+g.g/2,m=g.j+g.f/2,v=h.i+h.g/2,y=h.j+h.f/2-m,T=(k=v-p)/(M=e.Math.sqrt(k*k+y*y)),j=y/M,ycn(h,h.i+T*o),Mcn(h,h.j+j*o);r.dh(t,"Child movement "+a),++a}n.a&&n.a.Gg(new Z_(l)),xWn(n,t,new Z_(l),r)}}function RWn(n,t,i,r){var c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;return u=n,h=YF(new MO(t.a,t.b),n),s=i,f=YF(new MO(r.a,r.b),i),l=u.a,g=u.b,w=s.a,m=s.b,b=h.a,p=h.b,c=(d=f.a)*p-b*(v=f.b),YN(),oan(I9n),!(e.Math.abs(0-c)<=I9n||0==c||isNaN(0)&&isNaN(c))&&(a=1/c*((l-w)*p-(g-m)*b),o=1/c*-(-(l-w)*v+(g-m)*d),oan(I9n),(e.Math.abs(0-a)<=I9n||0==a||isNaN(0)&&isNaN(a)?0:0<a?-1:0>a?1:KL(isNaN(0),isNaN(a)))<0&&(oan(I9n),(e.Math.abs(a-1)<=I9n||1==a||isNaN(a)&&isNaN(1)?0:a<1?-1:a>1?1:KL(isNaN(a),isNaN(1)))<0)&&(oan(I9n),(e.Math.abs(0-o)<=I9n||0==o||isNaN(0)&&isNaN(o)?0:0<o?-1:0>o?1:KL(isNaN(0),isNaN(o)))<0)&&(oan(I9n),(e.Math.abs(o-1)<=I9n||1==o||isNaN(o)&&isNaN(1)?0:o<1?-1:o>1?1:KL(isNaN(o),isNaN(1)))<0))}function KWn(n){var t,e,i,r;if(-1!=(t=xL(e=null!=n.D?n.D:n.B,$Cn(91)))){Knn(0,t,e.length),i=e.substr(0,t),r=new zM;do{r.a+="["}while(-1!=(t=aR(e,91,++t)));m_(i,dZn)?r.a+="Z":m_(i,lrt)?r.a+="B":m_(i,brt)?r.a+="C":m_(i,wrt)?r.a+="D":m_(i,drt)?r.a+="F":m_(i,grt)?r.a+="I":m_(i,prt)?r.a+="J":m_(i,mrt)?r.a+="S":(r.a+="L",r.a+=""+i,r.a+=";");try{return null}catch(c){if(!F$(c=Ehn(c),63))throw hv(c)}}else if(-1==xL(e,$Cn(46))){if(m_(e,dZn))return ZHt;if(m_(e,lrt))return tUt;if(m_(e,brt))return JHt;if(m_(e,wrt))return eUt;if(m_(e,drt))return iUt;if(m_(e,grt))return YHt;if(m_(e,prt))return nUt;if(m_(e,mrt))return rUt}return null}function FWn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(n.e=t,o=qNn(t),v=new Zm,i=new Ww(o);i.a<i.c.c.length;){for(e=uG(N3(i),15),k=new Zm,mv(v.c,k),u=new ek,l=e.Kc();l.Ob();){for(c=nHn(n,f=uG(l.Pb(),27),!0,0,0),mv(k.c,c),new MO(b=f.i,w=f.j),!f.n&&(f.n=new fV(lFt,f,1,7)),h=new DD(f.n);h.e!=h.i.gc();)r=nHn(n,uG(Zkn(h),135),!1,b,w),mv(k.c,r);for(!f.c&&(f.c=new fV(wFt,f,9,9)),g=new DD(f.c);g.e!=g.i.gc();)for(a=nHn(n,d=uG(Zkn(g),123),!1,b,w),mv(k.c,a),p=d.i+b,m=d.j+w,!d.n&&(d.n=new fV(lFt,d,1,7)),s=new DD(d.n);s.e!=s.i.gc();)r=nHn(n,uG(Zkn(s),135),!1,p,m),mv(k.c,r);Qon(u,PZ(zcn(Uhn(cT(vat,1),EZn,20,0,[eRn(f),tRn(f)]))))}xRn(n,u,k)}return n.f=new ej(v),zsn(n.f,t),n.f}function _Wn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M;for(f=new fQ(new ad(n));f.c!=f.d.a.d;)for(o=uG((h=Hen(f)).d,58),t=uG(h.e,58),d=0,k=(null==(a=o.Dh()).i&&eqn(a),a.i).length;d<k;++d)if(null==a.i&&eqn(a),c=a.i,(s=d>=0&&d<c.length?c[d]:null).rk()&&!s.sk())if(F$(s,102))!((u=uG(s,19)).Bb&Qtt)&&!((M=lMn(u))&&M.Bb&Qtt)&&xqn(n,u,o,t);else if(PP(),uG(s,69).xk()&&(e=uG((y=s)?uG(t,54).gi(y):null,160)))for(b=uG(o.Mh(s),160),i=e.gc(),g=0,w=b.gc();g<w;++g)if(F$(l=b.Tl(g),102)){if(null==(r=ain(n,v=b.Ul(g)))&&null!=v){if(m=uG(l,19),!n.b||m.Bb&Qtt||lMn(m))continue;r=v}if(!e.Ol(l,r))for(p=0;p<i;++p)if(e.Tl(p)==l&&xA(e.Ul(p))===xA(r)){e.Ti(e.gc()-1,p),--i;break}}else e.Ol(b.Tl(g),b.Ul(g))}function BWn(n,t,i){var r;if(i.Ug("StretchWidth layering",1),0!=t.a.c.length){for(n.c=t,n.t=0,n.u=0,n.i=M0n,n.g=T0n,n.d=uM(pK(oIn(t,(jYn(),dTt)))),Ayn(n),yDn(n),kDn(n),mSn(n),Gmn(n),n.i=e.Math.max(1,n.i),n.g=e.Math.max(1,n.g),n.d=n.d/n.i,n.f=n.g/n.i,n.s=TMn(n),r=new bQ(n.c),kD(n.c.b,r),n.r=T3(n.p),n.n=q1(n.k,n.k.length);0!=n.r.c.length;)n.o=fwn(n),!n.o||Mfn(n)&&0!=n.b.a.gc()?(mPn(n,r),r=new bQ(n.c),kD(n.c.b,r),Qon(n.a,n.b),n.b.a.$b(),n.t=n.u,n.u=0):Mfn(n)?(n.c.b.c.length=0,r=new bQ(n.c),kD(n.c.b,r),n.t=0,n.u=0,n.b.a.$b(),n.a.a.$b(),++n.f,n.r=T3(n.p),n.n=q1(n.k,n.k.length)):(a2(n.o,r),men(n.r,n.o),FV(n.b,n.o),n.t=n.t-n.k[n.o.p]*n.d+n.j[n.o.p],n.u+=n.e[n.o.p]*n.d);t.a.c.length=0,_An(t.b),i.Vg()}else i.Vg()}function HWn(n){var t,i,r,c,a,o,u,s,h,f;for(n.j=Inn(YHt,W1n,28,n.g,15,1),n.o=new Zm,kS(sin(new fX(null,new h3(n.e.b,16)),new Xc),new lp(n)),n.a=Inn(ZHt,B2n,28,n.b,16,1),cdn(new fX(null,new h3(n.e.b,16)),new wp(n)),f=new Zm,kS(JJ(sin(new fX(null,new h3(n.e.b,16)),new Vc),new bp(n)),new II(n,f)),u=new Ww(f);u.a<u.c.c.length;)if(!((o=uG(N3(u),515)).c.length<=1))if(2!=o.c.length){if(!LPn(o)&&!TAn(o,new zc))for(s=new Ww(o),r=null;s.a<s.c.c.length;)t=uG(N3(s),18),i=n.c[t.p],h=!r||s.a>=s.c.c.length?B5((zIn(),dbt),wbt):B5((zIn(),wbt),wbt),h*=2,c=i.a.g,i.a.g=e.Math.max(c,c+(h-c)),a=i.b.g,i.b.g=e.Math.max(a,a+(h-a)),r=t}else pNn(o),WXn((u3(0,o.c.length),uG(o.c[0],18)).d.i)||kD(n.o,o)}function UWn(n){var t,i,r,c;for(kS(JJ(new fX(null,new h3(n.a.b,16)),new kr),new yr),QSn(n),kS(JJ(new fX(null,new h3(n.a.b,16)),new Mr),new Tr),n.c==(_gn(),hxt)&&(kS(JJ(sin(new fX(null,new h3(new Lw(n.f),1)),new jr),new Er),new Og(n)),kS(JJ(YJ(sin(sin(new fX(null,new h3(n.d.b,16)),new Sr),new Pr),new Cr),new Ir),new Lg(n))),c=new MO(M0n,M0n),t=new MO(T0n,T0n),r=new Ww(n.a.b);r.a<r.c.c.length;)i=uG(N3(r),60),c.a=e.Math.min(c.a,i.d.c),c.b=e.Math.min(c.b,i.d.d),t.a=e.Math.max(t.a,i.d.c+i.d.b),t.b=e.Math.max(t.b,i.d.d+i.d.a);JF(dL(n.d.c),BR(new MO(c.a,c.b))),JF(dL(n.d.f),YF(new MO(t.a,t.b),c)),YRn(n,c,t),$V(n.f),$V(n.b),$V(n.g),$V(n.e),n.a.a.c.length=0,n.a.b.c.length=0,n.a=null,n.d=null}function GWn(n,t){var e;if(n.e)throw hv(new kM((vK(Qut),v2n+Qut.k+k2n)));if(!TC(n.a,t))throw hv(new Ky(y2n+t+M2n));if(t==n.d)return n;switch(e=n.d,n.d=t,e.g){case 0:switch(t.g){case 2:CTn(n);break;case 1:_fn(n),CTn(n);break;case 4:RSn(n),CTn(n);break;case 3:RSn(n),_fn(n),CTn(n)}break;case 2:switch(t.g){case 1:_fn(n),KBn(n);break;case 4:RSn(n),CTn(n);break;case 3:RSn(n),_fn(n),CTn(n)}break;case 1:switch(t.g){case 2:_fn(n),KBn(n);break;case 4:_fn(n),RSn(n),CTn(n);break;case 3:_fn(n),RSn(n),_fn(n),CTn(n)}break;case 4:switch(t.g){case 2:RSn(n),CTn(n);break;case 1:RSn(n),_fn(n),CTn(n);break;case 3:_fn(n),KBn(n)}break;case 3:switch(t.g){case 2:_fn(n),RSn(n),CTn(n);break;case 1:_fn(n),RSn(n),_fn(n),CTn(n);break;case 4:_fn(n),KBn(n)}}return n}function qWn(n,t){var e;if(n.d)throw hv(new kM((vK(Rlt),v2n+Rlt.k+k2n)));if(!MC(n.a,t))throw hv(new Ky(y2n+t+M2n));if(t==n.c)return n;switch(e=n.c,n.c=t,e.g){case 0:switch(t.g){case 2:hln(n);break;case 1:Bfn(n),hln(n);break;case 4:KSn(n),hln(n);break;case 3:KSn(n),Bfn(n),hln(n)}break;case 2:switch(t.g){case 1:Bfn(n),FBn(n);break;case 4:KSn(n),hln(n);break;case 3:KSn(n),Bfn(n),hln(n)}break;case 1:switch(t.g){case 2:Bfn(n),FBn(n);break;case 4:Bfn(n),KSn(n),hln(n);break;case 3:Bfn(n),KSn(n),Bfn(n),hln(n)}break;case 4:switch(t.g){case 2:KSn(n),hln(n);break;case 1:KSn(n),Bfn(n),hln(n);break;case 3:Bfn(n),FBn(n)}break;case 3:switch(t.g){case 2:Bfn(n),KSn(n),hln(n);break;case 1:Bfn(n),KSn(n),Bfn(n),hln(n);break;case 4:Bfn(n),FBn(n)}}return n}function XWn(n,t){var e,i,r,c,a,o,u;if(F$(n.Eh(),167)?(XWn(uG(n.Eh(),167),t),t.a+=" > "):t.a+="Root ",m_((e=n.Dh().zb).substr(0,3),"Elk")?JA(t,(s3(3,e.length+1),e.substr(3))):t.a+=""+e,r=n.jh())JA((t.a+=" ",t),r);else if(F$(n,366)&&(u=uG(n,135).a))JA((t.a+=" ",t),u);else{for(c=new DD(n.kh());c.e!=c.i.gc();)if(u=uG(Zkn(c),135).a)return void JA((t.a+=" ",t),u);if(F$(n,326)&&(!(i=uG(n,74)).b&&(i.b=new f_(cFt,i,4,7)),0!=i.b.i&&(!i.c&&(i.c=new f_(cFt,i,5,8)),0!=i.c.i))){for(t.a+=" (",a=new Zx((!i.b&&(i.b=new f_(cFt,i,4,7)),i.b));a.e!=a.i.gc();)a.e>0&&(t.a+=TZn),XWn(uG(Zkn(a),167),t);for(t.a+=Y4n,o=new Zx((!i.c&&(i.c=new f_(cFt,i,5,8)),i.c));o.e!=o.i.gc();)o.e>0&&(t.a+=TZn),XWn(uG(Zkn(o),167),t);t.a+=")"}}}function zWn(n,t,i){var r,c,a,o,u,s,f,l;for(s=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));s.e!=s.i.gc();)for(c=new Fz(ix(eRn(u=uG(Zkn(s),27)).a.Kc(),new h));hDn(c);){if(!(r=uG(N9(c),74)).b&&(r.b=new f_(cFt,r,4,7)),!(r.b.i<=1&&(!r.c&&(r.c=new f_(cFt,r,5,8)),r.c.i<=1)))throw hv(new EM("Graph must not contain hyperedges."));if(!z$n(r)&&u!=lCn(uG(zrn((!r.c&&(r.c=new f_(cFt,r,5,8)),r.c),0),84)))for(zsn(f=new $F,r),kfn(f,(mon(),Wft),r),Kb(f,uG(DA(FX(i.f,u)),153)),Bb(f,uG(cQ(i,lCn(uG(zrn((!r.c&&(r.c=new f_(cFt,r,5,8)),r.c),0),84))),153)),kD(t.c,f),o=new DD((!r.n&&(r.n=new fV(lFt,r,1,7)),r.n));o.e!=o.i.gc();)zsn(l=new A5(f,(a=uG(Zkn(o),135)).a),a),kfn(l,Wft,a),l.e.a=e.Math.max(a.g,1),l.e.b=e.Math.max(a.f,1),Yqn(l),kD(t.d,l)}}function VWn(n,t,i){var r,c,a,o,u,s,h,f;switch(i.Ug("Node promotion heuristic",1),n.i=t,n.r=uG(oIn(t,(jYn(),yMt)),243),n.r!=(THn(),Pjt)&&n.r!=Cjt?RQn(n):n_n(n),f=uG(oIn(n.i,kMt),17).a,a=new hi,n.r.g){case 2:case 1:default:tzn(n,a);break;case 3:for(n.r=Djt,tzn(n,a),s=0,u=new Ww(n.b);u.a<u.c.c.length;)o=uG(N3(u),17),s=e.Math.max(s,o.a);s>n.k&&(n.r=Ijt,tzn(n,a));break;case 4:for(n.r=Djt,tzn(n,a),h=0,c=new Ww(n.c);c.a<c.c.c.length;)r=pK(N3(c)),h=e.Math.max(h,(tJ(r),r));h>n.n&&(n.r=Ljt,tzn(n,a));break;case 6:tzn(n,new mg(t0(e.Math.ceil(n.g.length*f/100))));break;case 5:tzn(n,new vg(t0(e.Math.ceil(n.e*f/100))));break;case 8:IYn(n,!0);break;case 9:IYn(n,!1)}n.r!=Pjt&&n.r!=Cjt?JKn(n,t):BBn(n,t),i.Vg()}function WWn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p;for(pF(u=new N4(s=n.b,0),new bQ(n)),g=!1,c=1;u.b<u.d.gc();){for(MK(u.b<u.d.gc()),o=uG(u.d.Xb(u.c=u.b++),30),u3(c,s.c.length),b=uG(s.c[c],30),d=(w=T3(o.a)).c.length,l=new Ww(w);l.a<l.c.c.length;)a2(h=uG(N3(l),10),b);if(g){for(f=Spn(w).Kc();f.Ob();)for(r=new Ww(T3(qgn(h=uG(f.Pb(),10))));r.a<r.c.c.length;)pqn(i=uG(N3(r),18),!0),kfn(n,(GYn(),Lpt),(qx(),!0)),e=gVn(n,i,d),t=uG(oIn(h,Spt),313),p=uG(zq(e,e.c.length-1),18),t.k=p.c.i,t.n=p,t.b=i.d.i,t.c=i;g=!1}else 0!=w.c.length&&(u3(0,w.c.length),uG(w.c[0],10).k==(zIn(),fbt)&&(g=!0,c=-1));++c}for(a=new N4(n.b,0);a.b<a.d.gc();)MK(a.b<a.d.gc()),0==uG(a.d.Xb(a.c=a.b++),30).a.c.length&&LQ(a)}function QWn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(Y1(l=new kQn(n),!(t==(xdn(),nxt)||t==QDt)),f=l.a,b=new Dk,Yrn(),o=0,s=(c=Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length;o<s;++o)i=c[o],(h=rD(f,jst,i))&&(b.d=e.Math.max(b.d,h.jf()));for(a=0,u=(r=Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length;a<u;++a)i=r[a],(h=rD(f,Sst,i))&&(b.a=e.Math.max(b.a,h.jf()));for(p=0,v=(d=Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length;p<v;++p)(h=rD(f,d[p],jst))&&(b.b=e.Math.max(b.b,h.kf()));for(g=0,m=(w=Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length;g<m;++g)(h=rD(f,w[g],Sst))&&(b.c=e.Math.max(b.c,h.kf()));return b.d>0&&(b.d+=f.n.d,b.d+=f.d),b.a>0&&(b.a+=f.n.a,b.a+=f.d),b.b>0&&(b.b+=f.n.b,b.b+=f.d),b.c>0&&(b.c+=f.n.c,b.c+=f.d),b}function JWn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d;for(b=i.d,l=i.c,o=(a=new MO(i.f.a+i.d.b+i.d.c,i.f.b+i.d.d+i.d.a)).b,h=new Ww(n.a);h.a<h.c.c.length;)if((u=uG(N3(h),10)).k==(zIn(),lbt)){switch(r=uG(oIn(u,(GYn(),Fpt)),64),c=uG(oIn(u,_pt),8),f=u.n,r.g){case 2:f.a=i.f.a+b.c-l.a;break;case 4:f.a=-l.a-b.b}switch(d=0,r.g){case 2:case 4:t==($Pn(),aRt)?(w=uM(pK(oIn(u,bmt))),f.b=a.b*w-uG(oIn(u,(jYn(),WMt)),8).b,d=f.b+c.b,fhn(u,!1,!0)):t==cRt&&(f.b=uM(pK(oIn(u,bmt)))-uG(oIn(u,(jYn(),WMt)),8).b,d=f.b+c.b,fhn(u,!1,!0))}o=e.Math.max(o,d)}for(i.f.b+=o-a.b,s=new Ww(n.a);s.a<s.c.c.length;)if((u=uG(N3(s),10)).k==(zIn(),lbt))switch(r=uG(oIn(u,(GYn(),Fpt)),64),f=u.n,r.g){case 1:f.b=-l.b-b.d;break;case 3:f.b=i.f.b+b.a-l.b}}function YWn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;if((f=uG(uG(Y9(n.r,t),21),87)).gc()<=2||t==(KQn(),kRt)||t==(KQn(),_Rt))MJn(n,t);else{for(g=n.u.Hc((eNn(),pRt)),i=t==(KQn(),yRt)?(ehn(),pht):(ehn(),wht),m=t==yRt?(Yen(),Rst):(Yen(),Fst),r=TT(BB(i),n.s),p=t==yRt?M0n:T0n,h=f.Kc();h.Ob();)!(u=uG(h.Pb(),117)).c||u.c.d.c.length<=0||(d=u.b.Mf(),w=u.e,(b=(l=u.c).i).b=(a=l.n,l.e.a+a.b+a.c),b.a=(o=l.n,l.e.b+o.d+o.a),g?(b.c=w.a-(c=l.n,l.e.a+c.b+c.c)-n.s,g=!1):b.c=w.a+d.a+n.s,ZZ(m,W2n),l.f=m,etn(l,(Ktn(),Lst)),kD(r.d,new ZX(b,Hdn(r,b))),p=t==yRt?e.Math.min(p,w.b):e.Math.max(p,w.b+u.b.Mf().b));for(p+=t==yRt?-n.t:n.t,cmn((r.e=p,r)),s=f.Kc();s.Ob();)!(u=uG(s.Pb(),117)).c||u.c.d.c.length<=0||((b=u.c.i).c-=u.e.a,b.d-=u.e.b)}}function ZWn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;for(i=new Zm,w=new Ww(t.a);w.a<w.c.c.length;)if((l=(b=uG(N3(w),10)).e)&&(Ohn(i,ZWn(n,l,b)),BVn(n,l,b),uG(oIn(l,(GYn(),Hpt)),21).Hc((r_n(),tpt))))for(p=uG(oIn(b,(jYn(),JMt)),101),f=uG(oIn(b,nTt),181).Hc((eNn(),wRt)),g=new Ww(b.j);g.a<g.c.c.length;)for(d=uG(N3(g),12),(r=uG(cQ(n.b,d),10))||(kfn(r=DJn(d,p,d.j,-(d.e.c.length-d.g.c.length),null,new sj,d.o,uG(oIn(l,Byt),88),l),rmt,d),vJ(n.b,d,r),kD(l.a,r)),c=uG(zq(r.j,0),12),s=new Ww(d.f);s.a<s.c.c.length;)u=uG(N3(s),72),(a=new uj).o.a=u.o.a,a.o.b=u.o.b,kD(c.f,a),f||(m=d.j,h=0,cV(uG(oIn(b,nTt),21))&&(h=jNn(u.n,u.o,d.o,0,m)),p==($Pn(),uRt)||(KQn(),ERt).Hc(m)?a.o.a=h:a.o.b=h);return FVn(n,t,e,i,o=new Zm),e&&Rzn(n,t,e,o),o}function nQn(n,t,e){var i,r,c,a,o,u,s,h;if(!n.c[t.c.p][t.p].e){for(n.c[t.c.p][t.p].e=!0,n.c[t.c.p][t.p].b=0,n.c[t.c.p][t.p].d=0,n.c[t.c.p][t.p].a=null,h=new Ww(t.j);h.a<h.c.c.length;)for(s=uG(N3(h),12),u=(e?new zd(s):new Wd(s)).Kc();u.Ob();)(a=(o=uG(u.Pb(),12)).i).c==t.c?a!=t&&(nQn(n,a,e),n.c[t.c.p][t.p].b+=n.c[a.c.p][a.p].b,n.c[t.c.p][t.p].d+=n.c[a.c.p][a.p].d):(n.c[t.c.p][t.p].d+=n.g[o.p],++n.c[t.c.p][t.p].b);if(c=uG(oIn(t,(GYn(),jpt)),15))for(r=c.Kc();r.Ob();)i=uG(r.Pb(),10),t.c==i.c&&(nQn(n,i,e),n.c[t.c.p][t.p].b+=n.c[i.c.p][i.p].b,n.c[t.c.p][t.p].d+=n.c[i.c.p][i.p].d);n.c[t.c.p][t.p].b>0&&(n.c[t.c.p][t.p].d+=uRn(n.i,24)*z0n*.07000000029802322-.03500000014901161,n.c[t.c.p][t.p].a=n.c[t.c.p][t.p].d/n.c[t.c.p][t.p].b)}}function tQn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w;for(l=new Ww(n);l.a<l.c.c.length;){for(Xx((f=uG(N3(l),10)).n),Xx(f.o),ynn(f.f),YBn(f),tBn(f),w=new Ww(f.j);w.a<w.c.c.length;){for(Xx((b=uG(N3(w),12)).n),Xx(b.a),Xx(b.o),NLn(b,UMn(b.j)),(r=uG(oIn(b,(jYn(),YMt)),17))&&kfn(b,YMt,xwn(-r.a)),i=new Ww(b.g);i.a<i.c.c.length;){for(t=Fkn((e=uG(N3(i),18)).a,0);t.b!=t.d.c;)Xx(uG(I6(t),8));if(a=uG(oIn(e,bMt),75))for(c=Fkn(a,0);c.b!=c.d.c;)Xx(uG(I6(c),8));for(s=new Ww(e.b);s.a<s.c.c.length;)Xx((o=uG(N3(s),72)).n),Xx(o.o)}for(h=new Ww(b.f);h.a<h.c.c.length;)Xx((o=uG(N3(h),72)).n),Xx(o.o)}for(f.k==(zIn(),lbt)&&(kfn(f,(GYn(),Fpt),UMn(uG(oIn(f,Fpt),64))),aFn(f)),u=new Ww(f.b);u.a<u.c.c.length;)YBn(o=uG(N3(u),72)),Xx(o.o),Xx(o.n)}}function eQn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b,w,d,g;null==(w=cQ(n.e,i))&&(s=uG(w=new _y,190),u=new QW(t+"_s"+r),nrn(s,Iet,u)),pQ(e,b=uG(w,190)),vZ(g=new _y,"x",i.j),vZ(g,"y",i.k),nrn(b,Let,g),vZ(f=new _y,"x",i.b),vZ(f,"y",i.c),nrn(b,"endPoint",f),!pE((!i.a&&(i.a=new MD(eFt,i,5)),i.a))&&(c=new wm(h=new Ib),z8((!i.a&&(i.a=new MD(eFt,i,5)),i.a),c),nrn(b,Met,h)),!!hMn(i)&&GCn(n.a,b,jet,jAn(n,hMn(i))),!!fMn(i)&&GCn(n.a,b,Tet,jAn(n,fMn(i))),!(0==(!i.e&&(i.e=new f_(oFt,i,10,9)),i.e).i)&&(a=new sA(n,l=new Ib),z8((!i.e&&(i.e=new f_(oFt,i,10,9)),i.e),a),nrn(b,Set,l)),0!=(!i.g&&(i.g=new f_(oFt,i,9,10)),i.g).i&&(o=new hA(n,d=new Ib),z8((!i.g&&(i.g=new f_(oFt,i,9,10)),i.g),o),nrn(b,Eet,d))}function iQn(n){var t,i,r,c,a,o,u;for(VK(),r=n.f.n,o=FW(n.r).a.nc();o.Ob();){if(c=0,(a=uG(o.Pb(),117)).b.pf((XYn(),uDt))&&(c=uM(pK(a.b.of(uDt))))<0)switch(a.b.ag().g){case 1:r.d=e.Math.max(r.d,-c);break;case 3:r.a=e.Math.max(r.a,-c);break;case 2:r.c=e.Math.max(r.c,-c);break;case 4:r.b=e.Math.max(r.b,-c)}if(cV(n.u))switch(t=Wun(a.b,c),u=!uG(n.e.of(q$t),181).Hc((oUn(),nKt)),i=!1,a.b.ag().g){case 1:i=t>r.d,r.d=e.Math.max(r.d,t),u&&i&&(r.d=e.Math.max(r.d,r.a),r.a=r.d+c);break;case 3:i=t>r.a,r.a=e.Math.max(r.a,t),u&&i&&(r.a=e.Math.max(r.a,r.d),r.d=r.a+c);break;case 2:i=t>r.c,r.c=e.Math.max(r.c,t),u&&i&&(r.c=e.Math.max(r.b,r.c),r.b=r.c+c);break;case 4:i=t>r.b,r.b=e.Math.max(r.b,t),u&&i&&(r.b=e.Math.max(r.b,r.c),r.c=r.b+c)}}}function rQn(n,t){var e,i,r,c,a,o,u,s,h;return s="",0==t.length?n.ne(L1n,O1n,-1,-1):(m_((h=KAn(t)).substr(0,3),"at ")&&(s3(3,h.length+1),h=h.substr(3)),-1==(a=(h=h.replace(/\[.*?\]/g,"")).indexOf("("))?-1==(a=h.indexOf("@"))?(s=h,h=""):(s=KAn((s3(a+1,h.length+1),h.substr(a+1))),h=KAn((Knn(0,a,h.length),h.substr(0,a)))):(Knn(a+1,e=h.indexOf(")",a),h.length),s=h.substr(a+1,e-(a+1)),h=KAn((Knn(0,a,h.length),h.substr(0,a)))),-1!=(a=xL(h,$Cn(46)))&&(s3(a+1,h.length+1),h=h.substr(a+1)),(0==h.length||m_(h,"Anonymous function"))&&(h=O1n),o=ax(s,$Cn(58)),r=T_(s,$Cn(58),o-1),u=-1,i=-1,c=L1n,-1!=o&&-1!=r&&(Knn(0,r,s.length),c=s.substr(0,r),u=rR((Knn(r+1,o,s.length),s.substr(r+1,o-(r+1)))),i=rR((s3(o+1,s.length+1),s.substr(o+1)))),n.ne(c,h,u,i))}function cQn(n){var t,e,i,r,c,a,o,u,s,h,f;for(s=new Ww(n);s.a<s.c.c.length;){switch(u=uG(N3(s),10),c=null,(a=uG(oIn(u,(jYn(),gMt)),171)).g){case 1:case 2:Pfn(),c=ygt;break;case 3:case 4:Pfn(),c=vgt}if(c)kfn(u,(GYn(),Npt),(Pfn(),ygt)),c==vgt?CKn(u,a,(can(),Vjt)):c==ygt&&CKn(u,a,(can(),Wjt));else if(sN(uG(oIn(u,JMt),101))&&0!=u.j.c.length){for(t=!0,f=new Ww(u.j);f.a<f.c.c.length;){if(!((h=uG(N3(f),12)).j==(KQn(),kRt)&&h.e.c.length-h.g.c.length>0||h.j==_Rt&&h.e.c.length-h.g.c.length<0)){t=!1;break}for(r=new Ww(h.g);r.a<r.c.c.length;)if(e=uG(N3(r),18),(o=uG(oIn(e.d.i,gMt),171))==(Gpn(),Omt)||o==Amt){t=!1;break}for(i=new Ww(h.e);i.a<i.c.c.length;)if(e=uG(N3(i),18),(o=uG(oIn(e.c.i,gMt),171))==(Gpn(),Cmt)||o==Imt){t=!1;break}}t&&CKn(u,a,(can(),Qjt))}}}function aQn(n,t,i,r,c){var a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;for(T=0,w=0,l=new Ww(t.e);l.a<l.c.c.length;){for(f=uG(N3(l),10),b=0,u=0,s=i?uG(oIn(f,iSt),17).a:j1n,m=r?uG(oIn(f,rSt),17).a:j1n,h=e.Math.max(s,m),k=new Ww(f.j);k.a<k.c.c.length;){if(v=uG(N3(k),12),y=f.n.b+v.n.b+v.a.b,r)for(o=new Ww(v.g);o.a<o.c.c.length;)d=(g=(a=uG(N3(o),18)).d).i,t!=n.a[d.p]&&(p=e.Math.max(uG(oIn(d,iSt),17).a,uG(oIn(d,rSt),17).a),(M=uG(oIn(a,(jYn(),uTt)),17).a)>=h&&M>=p&&(b+=d.n.b+g.n.b+g.a.b-y,++u));if(i)for(o=new Ww(v.e);o.a<o.c.c.length;)d=(g=(a=uG(N3(o),18)).c).i,t!=n.a[d.p]&&(p=e.Math.max(uG(oIn(d,iSt),17).a,uG(oIn(d,rSt),17).a),(M=uG(oIn(a,(jYn(),uTt)),17).a)>=h&&M>=p&&(b+=d.n.b+g.n.b+g.a.b-y,++u))}u>0&&(T+=b/u,++w)}w>0?(t.a=c*T/w,t.g=w):(t.a=0,t.g=0)}function oQn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;for(l=(c=n.f.b).a,h=c.b,w=n.e.g,b=n.e.f,vN(n.e,c.a,c.b),M=l/w,T=h/b,s=new DD(xJ(n.e));s.e!=s.i.gc();)ycn(u=uG(Zkn(s),135),u.i*M),Mcn(u,u.j*T);for(m=new DD(RJ(n.e));m.e!=m.i.gc();)k=(p=uG(Zkn(m),123)).i,y=p.j,k>0&&ycn(p,k*M),y>0&&Mcn(p,y*T);for(Yun(n.b,new ft),t=new Zm,o=new bsn(new Nw(n.c).a);o.b;)i=uG((a=von(o)).ld(),74),e=uG(a.md(),407).a,r=JFn(i,!1,!1),sqn(f=YPn(bIn(i),COn(r),e),r),(v=wIn(i))&&-1==Ten(t,v,0)&&(mv(t.c,v),iY(v,(MK(0!=f.b),uG(f.a.a.c,8)),e));for(g=new bsn(new Nw(n.d).a);g.b;)i=uG((d=von(g)).ld(),74),e=uG(d.md(),407).a,r=JFn(i,!1,!1),f=YPn(gIn(i),fln(COn(r)),e),sqn(f=fln(f),r),(v=dIn(i))&&-1==Ten(t,v,0)&&(mv(t.c,v),iY(v,(MK(0!=f.b),uG(f.c.b.c,8)),e))}function uQn(n,t,e,i){var r,c,a,o,u;return sKn(o=new kQn(t),i),r=!0,n&&n.pf((XYn(),d$t))&&(r=(c=uG(n.of((XYn(),d$t)),88))==(xdn(),ZDt)||c==JDt||c==YDt),iBn(o,!1),Prn(o.e.Rf(),new DB(o,!1,r)),W1(o,o.f,(Yrn(),jst),(KQn(),yRt)),W1(o,o.f,Sst,KRt),W1(o,o.g,jst,_Rt),W1(o,o.g,Sst,kRt),gyn(o,yRt),gyn(o,KRt),IJ(o,kRt),IJ(o,_Rt),VK(),(a=o.A.Hc((Qmn(),VRt))&&o.B.Hc((oUn(),rKt))?xmn(o):null)&&dT(o.a,a),iQn(o),BTn(o),HTn(o),wWn(o),NHn(o),iEn(o),dkn(o,yRt),dkn(o,KRt),IBn(o),UXn(o),e?(wpn(o),rEn(o),dkn(o,kRt),dkn(o,_Rt),u=o.B.Hc((oUn(),cKt)),dLn(o,u,yRt),dLn(o,u,KRt),gLn(o,u,kRt),gLn(o,u,_Rt),kS(new fX(null,new h3(new Fw(o.i),0)),new Cn),kS(JJ(new fX(null,FW(o.r).a.oc()),new In),new On),jPn(o),o.e.Pf(o.o),kS(new fX(null,FW(o.r).a.oc()),new An),o.o):o.o}function sQn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(h=M0n,r=new Ww(n.a.b);r.a<r.c.c.length;)t=uG(N3(r),86),h=e.Math.min(h,t.d.f.g.c+t.e.a);for(w=new lS,o=new Ww(n.a.a);o.a<o.c.c.length;)(a=uG(N3(o),194)).i=h,0==a.e&&s8(w,a,w.c.b,w.c);for(;0!=w.b;){for(c=(a=uG(0==w.b?null:(MK(0!=w.b),Lrn(w,w.a.a)),194)).f.g.c,b=a.a.a.ec().Kc();b.Ob();)f=uG(b.Pb(),86),g=a.i+f.e.a,f.d.g||f.g.c<g?f.o=g:f.o=f.g.c;for(c-=a.f.o,a.b+=c,n.c==(xdn(),YDt)||n.c==QDt?a.c+=c:a.c-=c,l=a.a.a.ec().Kc();l.Ob();)for(s=(f=uG(l.Pb(),86)).f.Kc();s.Ob();)u=uG(s.Pb(),86),d=hN(n.c)?n.f.yf(f,u):n.f.zf(f,u),u.d.i=e.Math.max(u.d.i,f.o+f.g.b+d-u.e.a),u.k||(u.d.i=e.Math.max(u.d.i,u.g.c-u.e.a)),--u.d.e,0==u.d.e&&aq(w,u.d)}for(i=new Ww(n.a.b);i.a<i.c.c.length;)(t=uG(N3(i),86)).g.c=t.o}function hQn(n){var t,e,i,r,c,a,o,u;switch(o=n.b,t=n.a,0===uG(oIn(n,(MEn(),cst)),435).g?f$(o,new Zw(new Un)):f$(o,new Zw(new Gn)),1===uG(oIn(n,ist),436).g?(f$(o,new Hn),f$(o,new qn),f$(o,new xn)):(f$(o,new Hn),f$(o,new _n)),uG(oIn(n,ost),257).g){case 0:u=new Qn;break;case 1:u=new Vn;break;case 2:u=new Wn;break;case 3:u=new zn;break;case 5:u=new $d(new Wn);break;case 4:u=new $d(new Vn);break;case 7:u=new sC(new $d(new Vn),new $d(new Wn));break;case 8:u=new sC(new $d(new zn),new $d(new Wn));break;default:u=new $d(new zn)}for(a=new Ww(o);a.a<a.c.c.length;){for(c=uG(N3(a),176),r=0,e=new WO(xwn(i=0),xwn(r));QUn(t,c,i,r);)e=uG(u.Ve(e,c),42),i=uG(e.a,17).a,r=uG(e.b,17).a;_Bn(t,c,i,r)}}function fQn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(e.Ug(o7n,1),OQn(),l=EPt,n.a==(mbn(),$Ct)&&(l=TPt),h=0,hZ(),t.jd(new Sm(l)),c=t.gc(),o=t.fd(t.gc()),s=!0;s&&o.Sb();)p=uG(o.Ub(),40),0==uG(oIn(p,l),17).a?--c:s=!1;if(a=new Y_(t.kd(0,c)),u=new Y_(t.kd(c,t.gc())),0==a.b)for(w=Fkn(u,0);w.b!=w.d.c;)kfn(uG(I6(w),40),KPt,xwn(h++));else for(f=a.b,k=Fkn(a,0);k.b!=k.d.c;){for(kfn(v=uG(I6(k),40),KPt,xwn(h++)),fQn(n,i=Lhn(v),e.eh(1/f|0)),Lon(i,kJ(new Sm(KPt))),b=new lS,m=Fkn(i,0);m.b!=m.d.c;)for(p=uG(I6(m),40),g=Fkn(v.d,0);g.b!=g.d.c;)(d=uG(I6(g),65)).c==p&&s8(b,d,b.c.b,b.c);for(BY(v.d),Qon(v.d,b),o=Fkn(u,u.b),r=v.d.b,s=!0;0<r&&s&&o.Sb();)p=uG(o.Ub(),40),0==uG(oIn(p,l),17).a?(kfn(p,KPt,xwn(h++)),--r,o.Qb()):s=!1}e.Vg()}function lQn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w;for(l=uM(pK(zDn(n,(jOn(),XIt)))),oM(gK(zDn(n,GIt)))&&(f=uG(zDn(n,(SK(),zCt)),27),a=uG(zrn(KJ(uG(zrn((!f.e&&(f.e=new f_(aFt,f,7,4)),f.e),(!f.e&&(f.e=new f_(aFt,f,7,4)),f.e).i-1),74)),0),27),r=uG(zrn(KJ(uG(zrn((!f.e&&(f.e=new f_(aFt,f,7,4)),f.e),0),74)),0),27),o=new MO(a.i+a.g/2,a.j+a.f/2),c=new MO(r.i+r.g/2,r.j+r.f/2),(i=l)<=0&&(i+=f7n),(b=e.Math.acos((o.a*c.a+o.b*c.b)/(e.Math.sqrt(o.a*o.a+o.b*o.b)*e.Math.sqrt(c.a*c.a+c.b*c.b))))<=0&&(b+=f7n),(t=e.Math.atan2(o.b,o.a))<=0&&(t+=f7n),l=F9n-(t-i+b/2)),s=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));s.e!=s.i.gc();)w=(h=new MO((u=uG(Zkn(s),27)).i+u.g/2,u.j+u.f/2)).a*e.Math.cos(l)-h.b*e.Math.sin(l),h.b=h.a*e.Math.sin(l)+h.b*e.Math.cos(l),h.a=w,kN(u,h.a-u.g/2,h.b-u.f/2)}function bQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(t.Ug("Inverted port preprocessing",1),o=new N4(n.b,0),e=null,g=new Zm;o.b<o.d.gc();){for(d=e,MK(o.b<o.d.gc()),e=uG(o.d.Xb(o.c=o.b++),30),h=new Ww(g);h.a<h.c.c.length;)a2(u=uG(N3(h),10),d);for(g.c.length=0,f=new Ww(e.a);f.a<f.c.c.length;)if((u=uG(N3(f),10)).k==(zIn(),dbt)&&sN(uG(oIn(u,(jYn(),JMt)),101))){for(w=nBn(u,(can(),Vjt),(KQn(),kRt)).Kc();w.Ob();)for(l=uG(w.Pb(),12),r=0,c=(i=uG(Ekn(a=l.e,Inn(obt,t6n,18,a.c.length,0,1)),483)).length;r<c;++r)Fqn(n,l,i[r],g);for(b=nBn(u,Wjt,_Rt).Kc();b.Ob();)for(l=uG(b.Pb(),12),r=0,c=(i=uG(Ekn(a=l.g,Inn(obt,t6n,18,a.c.length,0,1)),483)).length;r<c;++r)Kqn(n,l,i[r],g)}}for(s=new Ww(g);s.a<s.c.c.length;)a2(u=uG(N3(s),10),e);t.Vg()}function wQn(n,t,i,r,c,a,o){var u,s,h,f,l,b,w,d,g,p,m,v;for(l=null,r==(l0(),USt)?l=t:r==GSt&&(l=i),d=l.a.ec().Kc();d.Ob();){for(w=uG(d.Pb(),12),g=Gfn(Uhn(cT(PNt,1),zZn,8,0,[w.i.n,w.n,w.a])).b,v=new ek,u=new ek,h=new w7(w.b);l$(h.a)||l$(h.b);)if(oM(gK(oIn(s=uG(l$(h.a)?N3(h.a):N3(h.b),18),(GYn(),pmt))))==c&&-1!=Ten(a,s,0)){if(p=s.d==w?s.c:s.d,m=Gfn(Uhn(cT(PNt,1),zZn,8,0,[p.i.n,p.n,p.a])).b,e.Math.abs(m-g)<.2)continue;m<g?t.a._b(p)?FV(v,new WO(USt,s)):FV(v,new WO(GSt,s)):t.a._b(p)?FV(u,new WO(USt,s)):FV(u,new WO(GSt,s))}if(v.a.gc()>1)for(z8(v,new BI(n,b=new Izn(w,v,r))),mv(o.c,b),f=v.a.ec().Kc();f.Ob();)men(a,uG(f.Pb(),42).b);if(u.a.gc()>1)for(z8(u,new HI(n,b=new Izn(w,u,r))),mv(o.c,b),f=u.a.ec().Kc();f.Ob();)men(a,uG(f.Pb(),42).b)}}function dQn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;if(g=n.n,p=n.o,b=n.d,l=uM(pK(Omn(n,(jYn(),lTt)))),t){for(f=l*(t.gc()-1),w=0,s=t.Kc();s.Ob();)f+=(o=uG(s.Pb(),10)).o.a,w=e.Math.max(w,o.o.b);for(m=g.a-(f-p.a)/2,a=g.b-b.d+w,c=r=p.a/(t.gc()+1),u=t.Kc();u.Ob();)(o=uG(u.Pb(),10)).n.a=m,o.n.b=a-o.o.b,m+=o.o.a+l,(h=ERn(o)).n.a=o.o.a/2-h.a.a,h.n.b=o.o.b,(d=uG(oIn(o,(GYn(),Ppt)),12)).e.c.length+d.g.c.length==1&&(d.n.a=c-d.a.a,d.n.b=0,o2(d,n)),c+=r}if(i){for(f=l*(i.gc()-1),w=0,s=i.Kc();s.Ob();)f+=(o=uG(s.Pb(),10)).o.a,w=e.Math.max(w,o.o.b);for(m=g.a-(f-p.a)/2,a=g.b+p.b+b.a-w,c=r=p.a/(i.gc()+1),u=i.Kc();u.Ob();)(o=uG(u.Pb(),10)).n.a=m,o.n.b=a,m+=o.o.a+l,(h=ERn(o)).n.a=o.o.a/2-h.a.a,h.n.b=0,(d=uG(oIn(o,(GYn(),Ppt)),12)).e.c.length+d.g.c.length==1&&(d.n.a=c-d.a.a,d.n.b=p.b,o2(d,n)),c+=r}}function gQn(n,t){var i,r,c,a,o,u;if(uG(oIn(t,(GYn(),Hpt)),21).Hc((r_n(),tpt))){for(u=new Ww(t.a);u.a<u.c.c.length;)(a=uG(N3(u),10)).k==(zIn(),dbt)&&(c=uG(oIn(a,(jYn(),TMt)),140),n.c=e.Math.min(n.c,a.n.a-c.b),n.a=e.Math.max(n.a,a.n.a+a.o.a+c.c),n.d=e.Math.min(n.d,a.n.b-c.d),n.b=e.Math.max(n.b,a.n.b+a.o.b+c.a));for(o=new Ww(t.a);o.a<o.c.c.length;)if((a=uG(N3(o),10)).k!=(zIn(),dbt))switch(a.k.g){case 2:if((r=uG(oIn(a,(jYn(),gMt)),171))==(Gpn(),Imt)){a.n.a=n.c-10,Djn(a,new Ge).Jb(new sg(a));break}if(r==Amt){a.n.a=n.a+10,Djn(a,new qe).Jb(new hg(a));break}if((i=uG(oIn(a,Xpt),311))==(Zen(),ppt)){Azn(a).Jb(new fg(a)),a.n.b=n.d-10;break}if(i==dpt){Azn(a).Jb(new lg(a)),a.n.b=n.b+10;break}break;default:throw hv(new vM("The node type "+a.k+" is not supported by the "+Fwt))}}}function pQn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d;for(u=new MO(i.i+i.g/2,i.j+i.f/2),l=lzn(i),b=uG(zDn(t,(jYn(),JMt)),101),d=uG(zDn(i,eTt),64),dA(Qkn(i),QMt)||(w=0==i.i&&0==i.j?0:KCn(i,d),Myn(i,QMt,w)),kfn(r=DJn(i,b,d,l,new MO(t.g,t.f),u,new MO(i.g,i.f),uG(oIn(e,Byt),88),e),(GYn(),rmt),i),Ub(c=uG(zq(r.j,0),12),IUn(i)),kfn(r,nTt,(eNn(),ggn(gRt))),h=uG(zDn(t,nTt),181).Hc(wRt),o=new DD((!i.n&&(i.n=new fV(lFt,i,1,7)),i.n));o.e!=o.i.gc();)if(!oM(gK(zDn(a=uG(Zkn(o),135),FMt)))&&a.a&&(f=own(a),kD(c.f,f),!h))switch(s=0,cV(uG(zDn(t,nTt),21))&&(s=jNn(new MO(a.i,a.j),new MO(a.g,a.f),new MO(i.g,i.f),0,d)),d.g){case 2:case 4:f.o.a=s;break;case 1:case 3:f.o.b=s}kfn(r,TTt,pK(zDn(R0(t),TTt))),kfn(r,jTt,pK(zDn(R0(t),jTt))),kfn(r,yTt,pK(zDn(R0(t),yTt))),kD(e.a,r),vJ(n.a,i,r)}function mQn(n,t,e,i,r,c){var a,o,u,s,h,f;for(zsn(s=new lOn,t),NLn(s,uG(zDn(t,(jYn(),eTt)),64)),kfn(s,(GYn(),rmt),t),o2(s,e),(f=s.o).a=t.g,f.b=t.f,(h=s.n).a=t.i,h.b=t.j,vJ(n.a,t,s),(a=o9(YJ(sin(new fX(null,(!t.e&&(t.e=new f_(aFt,t,7,4)),new h3(t.e,16))),new Wt),new zt),new Zd(t)))||(a=o9(YJ(sin(new fX(null,(!t.d&&(t.d=new f_(aFt,t,8,5)),new h3(t.d,16))),new Qt),new Vt),new ng(t))),a||(a=o9(new fX(null,(!t.e&&(t.e=new f_(aFt,t,7,4)),new h3(t.e,16))),new Jt)),kfn(s,qpt,(qx(),!!a)),Fzn(s,c,r,uG(zDn(t,WMt),8)),u=new DD((!t.n&&(t.n=new fV(lFt,t,1,7)),t.n));u.e!=u.i.gc();)!oM(gK(zDn(o=uG(Zkn(u),135),FMt)))&&o.a&&kD(s.f,own(o));switch(r.g){case 2:case 1:(s.j==(KQn(),yRt)||s.j==KRt)&&i.Fc((r_n(),cpt));break;case 4:case 3:(s.j==(KQn(),kRt)||s.j==_Rt)&&i.Fc((r_n(),cpt))}return s}function vQn(n,t,i,r,c){var a,o,u,s,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S;for(k=0,g=0,d=0,w=1,v=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));v.e!=v.i.gc();)w+=x5(new Fz(ix(eRn(p=uG(Zkn(v),27)).a.Kc(),new h))),j=p.g,g=e.Math.max(g,j),b=p.f,d=e.Math.max(d,b),k+=j*b;for(o=k+2*r*r*w*(!n.a&&(n.a=new fV(bFt,n,10,11)),n.a).i,a=e.Math.sqrt(o),s=e.Math.max(a*i,g),u=e.Math.max(a/i,d),m=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));m.e!=m.i.gc();)p=uG(Zkn(m),27),E=c.b+(uRn(t,26)*G0n+uRn(t,27)*q0n)*(s-p.g),S=c.b+(uRn(t,26)*G0n+uRn(t,27)*q0n)*(u-p.f),ycn(p,E),Mcn(p,S);for(T=s+(c.b+c.c),M=u+(c.d+c.a),y=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));y.e!=y.i.gc();)for(l=new Fz(ix(eRn(uG(Zkn(y),27)).a.Kc(),new h));hDn(l);)z$n(f=uG(N9(l),74))||fYn(f,t,T,M);ZQn(n,T+=c.b+c.c,M+=c.d+c.a,!1,!0)}function kQn(n){var t;if(this.r=tY(new Sn,new Pn),this.b=new rpn(uG(WW(YRt),297)),this.p=new rpn(uG(WW(YRt),297)),this.i=new rpn(uG(WW(mht),297)),this.e=n,this.o=new eN(n.Mf()),this.D=n.Yf()||oM(gK(n.of((XYn(),C$t)))),this.A=uG(n.of((XYn(),_$t)),21),this.B=uG(n.of(q$t),21),this.q=uG(n.of(sDt),101),this.u=uG(n.of(bDt),21),!eIn(this.u))throw hv(new jM("Invalid port label placement: "+this.u));if(this.v=oM(gK(n.of(dDt))),this.j=uG(n.of(K$t),21),!zxn(this.j))throw hv(new jM("Invalid node label placement: "+this.j));this.n=uG(Rjn(n,x$t),107),this.k=uM(pK(Rjn(n,LDt))),this.d=uM(pK(Rjn(n,ADt))),this.w=uM(pK(Rjn(n,FDt))),this.s=uM(pK(Rjn(n,NDt))),this.t=uM(pK(Rjn(n,$Dt))),this.C=uG(Rjn(n,RDt),140),this.c=2*this.d,t=!this.B.Hc((oUn(),nKt)),this.f=new tkn(0,t,0),this.g=new tkn(1,t,0),nM(this.f,(Yrn(),Est),this.g)}function yQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(t.Ug("Comment pre-processing",1),e=0,u=new Ww(n.a);u.a<u.c.c.length;)if(oM(gK(oIn(o=uG(N3(u),10),(jYn(),gyt))))){for(++e,r=0,i=null,s=null,w=new Ww(o.j);w.a<w.c.c.length;)r+=(l=uG(N3(w),12)).e.c.length+l.g.c.length,1==l.e.c.length&&(s=(i=uG(zq(l.e,0),18)).c),1==l.g.c.length&&(s=(i=uG(zq(l.g,0),18)).d);if(1!=r||s.e.c.length+s.g.c.length!=1||oM(gK(oIn(s.i,gyt)))){for(g=new Zm,b=new Ww(o.j);b.a<b.c.c.length;){for(f=new Ww((l=uG(N3(b),12)).g);f.a<f.c.c.length;)0==(h=uG(N3(f),18)).d.g.c.length||mv(g.c,h);for(a=new Ww(l.e);a.a<a.c.c.length;)0==(c=uG(N3(a),18)).c.e.c.length||mv(g.c,c)}for(d=new Ww(g);d.a<d.c.c.length;)pqn(uG(N3(d),18),!0)}else TJn(o,i,s,s.i),tW(u)}t._g()&&t.bh("Found "+e+" comment boxes"),t.Vg()}function MQn(n,t){var e,i,r,c,a,o,u;if(GG(),this.a=new U$(this),this.b=n,this.c=t,this.f=ZV(Nen((gAn(),kBt),t)),this.f.dc())if((o=cSn(kBt,n))==t)for(this.e=!0,this.d=new Zm,this.f=new us,this.f.Fc(lct),uG(JXn(Len(kBt,Hrn(n)),""),29)==n&&this.f.Fc(jz(kBt,Hrn(n))),r=LHn(kBt,n).Kc();r.Ob();)switch(i=uG(r.Pb(),179),sJ(Nen(kBt,i))){case 4:this.d.Fc(i);break;case 5:this.f.Gc(ZV(Nen(kBt,i)))}else if(PP(),uG(t,69).xk())for(this.e=!0,this.f=null,this.d=new Zm,a=0,u=(null==n.i&&eqn(n),n.i).length;a<u;++a)for(null==n.i&&eqn(n),e=n.i,i=a>=0&&a<e.length?e[a]:null,c=_3(Nen(kBt,i));c;c=_3(Nen(kBt,c)))c==t&&this.d.Fc(i);else 1==sJ(Nen(kBt,t))&&o?(this.f=null,this.d=(m$n(),$Bt)):(this.f=null,this.e=!0,this.d=(hZ(),new Xw(t)));else this.e=5==sJ(Nen(kBt,t)),this.f.Fb(CBt)&&(this.f=CBt)}function TQn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d;for(i=0,r=fTn(n,t),b=n.s,w=n.t,h=uG(uG(Y9(n.r,t),21),87).Kc();h.Ob();)if((s=uG(h.Pb(),117)).c&&!(s.c.d.c.length<=0)){switch(d=s.b.Mf(),u=s.b.pf((XYn(),uDt))?uM(pK(s.b.of(uDt))):0,(l=(f=s.c).i).b=(o=f.n,f.e.a+o.b+o.c),l.a=(a=f.n,f.e.b+a.d+a.a),t.g){case 1:l.c=s.a?(d.a-l.b)/2:d.a+b,l.d=d.b+u+r,etn(f,(Ktn(),Ost)),eF(f,(Yen(),Fst));break;case 3:l.c=s.a?(d.a-l.b)/2:d.a+b,l.d=-u-r-l.a,etn(f,(Ktn(),Ost)),eF(f,(Yen(),Rst));break;case 2:l.c=-u-r-l.b,s.a?(c=n.v?l.a:uG(zq(f.d,0),187).Mf().b,l.d=(d.b-c)/2):l.d=d.b+w,etn(f,(Ktn(),Lst)),eF(f,(Yen(),Kst));break;case 4:l.c=d.a+u+r,s.a?(c=n.v?l.a:uG(zq(f.d,0),187).Mf().b,l.d=(d.b-c)/2):l.d=d.b+w,etn(f,(Ktn(),Ast)),eF(f,(Yen(),Kst))}(t==(KQn(),yRt)||t==KRt)&&(i=e.Math.max(i,l.a))}i>0&&(uG(AJ(n.b,t),127).a.b=i)}function jQn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d;if(l=uM(pK(oIn(n,(jYn(),TTt)))),b=uM(pK(oIn(n,jTt))),f=uM(pK(oIn(n,yTt))),o=n.o,a=(c=uG(zq(n.j,0),12)).n,d=hAn(c,f)){if(t.Hc((eNn(),wRt)))switch(uG(oIn(n,(GYn(),Fpt)),64).g){case 1:d.c=(o.a-d.b)/2-a.a,d.d=b;break;case 3:d.c=(o.a-d.b)/2-a.a,d.d=-b-d.a;break;case 2:e&&0==c.e.c.length&&0==c.g.c.length?(h=i?d.a:uG(zq(c.f,0),72).o.b,d.d=(o.b-h)/2-a.b):d.d=o.b+b-a.b,d.c=-l-d.b;break;case 4:e&&0==c.e.c.length&&0==c.g.c.length?(h=i?d.a:uG(zq(c.f,0),72).o.b,d.d=(o.b-h)/2-a.b):d.d=o.b+b-a.b,d.c=l}else if(t.Hc(gRt))switch(uG(oIn(n,(GYn(),Fpt)),64).g){case 1:case 3:d.c=a.a+l;break;case 2:case 4:e&&!c.c?(h=i?d.a:uG(zq(c.f,0),72).o.b,d.d=(o.b-h)/2-a.b):d.d=a.b+b}for(r=d.d,s=new Ww(c.f);s.a<s.c.c.length;)(w=(u=uG(N3(s),72)).n).a=d.c,w.b=r,r+=u.o.b+f}}function EQn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j;for(v=new Zm,f=new Ww(n.b);f.a<f.c.c.length;)for(w=new Ww(uG(N3(f),30).a);w.a<w.c.c.length;)if((l=uG(N3(w),10)).k==(zIn(),lbt)&&vR(l,(GYn(),Kpt))){for(d=null,p=null,g=null,M=new Ww(l.j);M.a<M.c.c.length;)switch((y=uG(N3(M),12)).j.g){case 4:d=y;break;case 2:p=y;break;default:g=y}for(s=new tj((m=uG(zq(g.g,0),18)).a),JF(u=new eN(g.n),l.n),lW(Fkn(s,0),u),k=fln(m.a),JF(h=new eN(g.n),l.n),s8(k,h,k.c.b,k.c),T=uG(oIn(l,Kpt),10),j=uG(zq(T.j,0),12),c=0,o=(i=uG(Ekn(d.e,Inn(obt,t6n,18,0,0,1)),483)).length;c<o;++c)u2(t=i[c],j),rbn(t.a,t.a.b,s);for(r=0,a=(e=x4(p.g)).length;r<a;++r)c2(t=e[r],j),rbn(t.a,0,k);c2(m,null),u2(m,null),mv(v.c,l)}for(b=new Ww(v);b.a<b.c.c.length;)a2(l=uG(N3(b),10),null)}function SQn(){ML(DBt,new Xh),ML(lHt,new rf),ML(bHt,new df),ML(wHt,new Sf),ML($ot,new Of),ML(cT(tUt,1),new Af),ML(cot,new Lf),ML(uot,new Nf),ML($ot,new Dh),ML($ot,new xh),ML($ot,new Rh),ML(fot,new Kh),ML($ot,new Fh),ML(yat,new _h),ML(yat,new Bh),ML($ot,new Hh),ML(lot,new Gh),ML($ot,new qh),ML($ot,new zh),ML($ot,new Vh),ML($ot,new Wh),ML($ot,new Qh),ML(cT(tUt,1),new Jh),ML($ot,new Yh),ML($ot,new Zh),ML(yat,new nf),ML(yat,new tf),ML($ot,new ef),ML(dot,new cf),ML($ot,new af),ML(yot,new of),ML($ot,new uf),ML($ot,new sf),ML($ot,new hf),ML($ot,new ff),ML(yat,new lf),ML(yat,new bf),ML($ot,new wf),ML($ot,new gf),ML($ot,new pf),ML($ot,new mf),ML($ot,new vf),ML($ot,new kf),ML(Tot,new yf),ML($ot,new Mf),ML($ot,new Tf),ML($ot,new jf),ML(Tot,new Ef),ML(yot,new Pf),ML($ot,new Cf),ML(dot,new If)}function PQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w;switch(h=new Uk,n.a.g){case 3:l=uG(oIn(t.e,(GYn(),Tmt)),15),b=uG(oIn(t.j,Tmt),15),w=uG(oIn(t.f,Tmt),15),e=uG(oIn(t.e,ymt),15),i=uG(oIn(t.j,ymt),15),r=uG(oIn(t.f,ymt),15),Ohn(a=new Zm,l),b.Jc(new gc),Ohn(a,Spn(b)),Ohn(a,w),Ohn(c=new Zm,e),Ohn(c,Spn(i)),Ohn(c,r),kfn(t.f,Tmt,a),kfn(t.f,ymt,c),kfn(t.f,jmt,t.f),kfn(t.e,Tmt,null),kfn(t.e,ymt,null),kfn(t.j,Tmt,null),kfn(t.j,ymt,null);break;case 1:Qon(h,t.e.a),aq(h,t.i.n),Qon(h,Spn(t.j.a)),aq(h,t.a.n),Qon(h,t.f.a);break;default:Qon(h,t.e.a),Qon(h,Spn(t.j.a)),Qon(h,t.f.a)}BY(t.f.a),Qon(t.f.a,h),c2(t.f,t.e.c),o=uG(oIn(t.e,(jYn(),bMt)),75),s=uG(oIn(t.j,bMt),75),u=uG(oIn(t.f,bMt),75),(o||s||u)&&(uW(f=new Uk,u),uW(f,s),uW(f,o),kfn(t.f,bMt,f)),c2(t.j,null),u2(t.j,null),c2(t.e,null),u2(t.e,null),a2(t.a,null),a2(t.i,null),t.g&&PQn(n,t.g)}function CQn(){var n,t,e;for(CQn=E,new Edn(1,0),new Edn(10,0),new Edn(0,0),Sot=Inn(Bot,zZn,247,11,0,1),Pot=Inn(JHt,N1n,28,100,15,1),Cot=Uhn(cT(eUt,1),I0n,28,15,[1,5,25,125,625,3125,15625,78125,390625,1953125,9765625,48828125,244140625,1220703125,6103515625,30517578125,152587890625,762939453125,3814697265625,19073486328125,95367431640625,476837158203125,0x878678326eac9]),Iot=Inn(YHt,W1n,28,Cot.length,15,1),Oot=Uhn(cT(eUt,1),I0n,28,15,[1,10,100,$1n,1e4,O0n,1e6,1e7,1e8,g0n,1e10,1e11,1e12,1e13,1e14,1e15,1e16]),Aot=Inn(YHt,W1n,28,Oot.length,15,1),Lot=Inn(Bot,zZn,247,11,0,1),n=0;n<Lot.length;n++)Sot[n]=new Edn(n,0),Lot[n]=new Edn(0,n),Pot[n]=48;for(;n<Pot.length;n++)Pot[n]=48;for(e=0;e<Iot.length;e++)Iot[e]=VLn(Cot[e]);for(t=0;t<Aot.length;t++)Aot[t]=VLn(Oot[t]);b_n()}function IQn(){function n(){this.obj=this.createObject()}return n.prototype.createObject=function(n){return Object.create(null)},n.prototype.get=function(n){return this.obj[n]},n.prototype.set=function(n,t){this.obj[n]=t},n.prototype[U0n]=function(n){delete this.obj[n]},n.prototype.keys=function(){return Object.getOwnPropertyNames(this.obj)},n.prototype.entries=function(){var n=this.keys(),t=this,e=0;return{next:function(){if(e>=n.length)return{done:!0};var i=n[e++];return{value:[i,t.get(i)],done:!1}}}},__n()||(n.prototype.createObject=function(){return{}},n.prototype.get=function(n){return this.obj[":"+n]},n.prototype.set=function(n,t){this.obj[":"+n]=t},n.prototype[U0n]=function(n){delete this.obj[":"+n]},n.prototype.keys=function(){var n=[];for(var t in this.obj)58==t.charCodeAt(0)&&n.push(t.substring(1));return n}),n}function OQn(){OQn=E,RPt=new Cm(E4n),new Cm(S4n),new uF("DEPTH",xwn(0)),EPt=new uF("FAN",xwn(0)),TPt=new uF(Q9n,xwn(0)),UPt=new uF("ROOT",(qx(),!1)),APt=new uF("LEFTNEIGHBOR",null),BPt=new uF("RIGHTNEIGHBOR",null),LPt=new uF("LEFTSIBLING",null),HPt=new uF("RIGHTSIBLING",null),jPt=new uF("DUMMY",!1),new uF("LEVEL",xwn(0)),_Pt=new uF("REMOVABLE_EDGES",new lS),GPt=new uF("XCOOR",xwn(0)),qPt=new uF("YCOOR",xwn(0)),NPt=new uF("LEVELHEIGHT",0),DPt=new uF("LEVELMIN",0),$Pt=new uF("LEVELMAX",0),PPt=new uF("GRAPH_XMIN",0),IPt=new uF("GRAPH_YMIN",0),SPt=new uF("GRAPH_XMAX",0),CPt=new uF("GRAPH_YMAX",0),MPt=new uF("COMPACT_LEVEL_ASCENSION",!1),yPt=new uF("COMPACT_CONSTRAINTS",new Zm),OPt=new uF("ID",""),KPt=new uF("POSITION",xwn(0)),FPt=new uF("PRELIM",0),xPt=new uF("MODIFIER",0),kPt=new Cm(P4n),vPt=new Cm(C4n)}function AQn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d;if(NGn(),null==n)return null;if(0==(f=8*n.length))return"";for(l=f/24|0,c=null,c=Inn(JHt,N1n,28,4*(0!=(o=f%24)?l+1:l),15,1),s=0,h=0,t=0,e=0,i=0,a=0,r=0,u=0;u<l;u++)t=n[r++],h=(15&(e=n[r++]))<<24>>24,s=(3&t)<<24>>24,b=-128&t?(t>>2^192)<<24>>24:t>>2<<24>>24,w=-128&e?(e>>4^240)<<24>>24:e>>4<<24>>24,d=-128&(i=n[r++])?(i>>6^252)<<24>>24:i>>6<<24>>24,c[a++]=gHt[b],c[a++]=gHt[w|s<<4],c[a++]=gHt[h<<2|d],c[a++]=gHt[63&i];return 8==o?(s=(3&(t=n[r]))<<24>>24,b=-128&t?(t>>2^192)<<24>>24:t>>2<<24>>24,c[a++]=gHt[b],c[a++]=gHt[s<<4],c[a++]=61,c[a++]=61):16==o&&(t=n[r],h=(15&(e=n[r+1]))<<24>>24,s=(3&t)<<24>>24,b=-128&t?(t>>2^192)<<24>>24:t>>2<<24>>24,w=-128&e?(e>>4^240)<<24>>24:e>>4<<24>>24,c[a++]=gHt[b],c[a++]=gHt[w|s<<4],c[a++]=gHt[h<<2],c[a++]=61),mvn(c,0,c.length)}function LQn(n,t){var i,r,c,a,o,u;if(0==n.e&&n.p>0&&(n.p=-(n.p-1)),n.p>j1n&&F5(t,n.p-V1n),o=t.q.getDate(),k0(t,1),n.k>=0&&H0(t,n.k),n.c>=0?k0(t,n.c):n.k>=0?(r=35-new Lfn(t.q.getFullYear()-V1n,t.q.getMonth(),35).q.getDate(),k0(t,e.Math.min(r,o))):k0(t,o),n.f<0&&(n.f=t.q.getHours()),n.b>0&&n.f<12&&(n.f+=12),tD(t,24==n.f&&n.g?0:n.f),n.j>=0&&y7(t,n.j),n.n>=0&&Nnn(t,n.n),n.i>=0&&TL(t,Lgn(Ngn(bSn(Bsn(t.q.getTime()),$1n),$1n),n.i)),n.a&&(F5(c=new QE,c.q.getFullYear()-V1n-80),$P(Bsn(t.q.getTime()),Bsn(c.q.getTime()))&&F5(t,c.q.getFullYear()-V1n+100)),n.d>=0)if(-1==n.c)(i=(7+n.d-t.q.getDay())%7)>3&&(i-=7),u=t.q.getMonth(),k0(t,t.q.getDate()+i),t.q.getMonth()!=u&&k0(t,t.q.getDate()+(i>0?-7:7));else if(t.q.getDay()!=n.d)return!1;return n.o>j1n&&(a=t.q.getTimezoneOffset(),TL(t,Lgn(Bsn(t.q.getTime()),60*(n.o-a)*$1n))),!0}function NQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p;if(F$(r=oIn(t,(GYn(),rmt)),207)){for(b=uG(r,27),w=t.e,f=new eN(t.c),c=t.d,f.a+=c.b,f.b+=c.d,$x(uG(zDn(b,(jYn(),KMt)),181),(oUn(),tKt))&&(Ab(l=uG(zDn(b,_Mt),107),c.a),_b(l,c.d),Lb(l,c.b),Fb(l,c.c)),e=new Zm,s=new Ww(t.a);s.a<s.c.c.length;)for(F$(oIn(o=uG(N3(s),10),rmt),207)?UQn(o,f):F$(oIn(o,rmt),193)&&!w&&kN(i=uG(oIn(o,rmt),123),(g=SGn(t,o,i.g,i.f)).a,g.b),d=new Ww(o.j);d.a<d.c.c.length;)kS(JJ(new fX(null,new h3(uG(N3(d),12).g,16)),new tg(o)),new eg(e));if(w)for(d=new Ww(w.j);d.a<d.c.c.length;)kS(JJ(new fX(null,new h3(uG(N3(d),12).g,16)),new ig(w)),new rg(e));for(p=uG(zDn(b,Vyt),223),a=new Ww(e);a.a<a.c.c.length;)DWn(uG(N3(a),18),p,f);for(SUn(t),u=new Ww(t.a);u.a<u.c.c.length;)(h=(o=uG(N3(u),10)).e)&&NQn(n,h)}}function $Qn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w;if(!uG(uG(Y9(n.r,t),21),87).dc()){if(s=(o=uG(AJ(n.b,t),127)).i,u=o.n,f=M_n(n,t),r=s.b-u.b-u.c,c=o.a.a,a=s.c+u.b,w=n.w,f!=(Vkn(),Zxt)&&f!=tRt||1!=uG(uG(Y9(n.r,t),21),87).gc()||(c=f==Zxt?c-2*n.w:c,f=Yxt),r<c&&!n.B.Hc((oUn(),aKt)))f==Zxt?a+=w+=(r-c)/(uG(uG(Y9(n.r,t),21),87).gc()+1):w+=(r-c)/(uG(uG(Y9(n.r,t),21),87).gc()-1);else switch(r<c&&(c=f==Zxt?c-2*n.w:c,f=Yxt),f.g){case 3:a+=(r-c)/2;break;case 4:a+=r-c;break;case 0:i=(r-c)/(uG(uG(Y9(n.r,t),21),87).gc()+1),a+=w+=e.Math.max(0,i);break;case 1:i=(r-c)/(uG(uG(Y9(n.r,t),21),87).gc()-1),w+=e.Math.max(0,i)}for(b=uG(uG(Y9(n.r,t),21),87).Kc();b.Ob();)(l=uG(b.Pb(),117)).e.a=a+l.d.b,l.e.b=(h=l.b).pf((XYn(),uDt))?h.ag()==(KQn(),yRt)?-h.Mf().b-uM(pK(h.of(uDt))):uM(pK(h.of(uDt))):h.ag()==(KQn(),yRt)?-h.Mf().b:0,a+=l.d.b+l.b.Mf().a+l.d.c+w}}function DQn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d;if(!uG(uG(Y9(n.r,t),21),87).dc()){if(s=(o=uG(AJ(n.b,t),127)).i,u=o.n,l=M_n(n,t),r=s.a-u.d-u.a,c=o.a.b,a=s.d+u.d,d=n.w,h=n.o.a,l!=(Vkn(),Zxt)&&l!=tRt||1!=uG(uG(Y9(n.r,t),21),87).gc()||(c=l==Zxt?c-2*n.w:c,l=Yxt),r<c&&!n.B.Hc((oUn(),aKt)))l==Zxt?a+=d+=(r-c)/(uG(uG(Y9(n.r,t),21),87).gc()+1):d+=(r-c)/(uG(uG(Y9(n.r,t),21),87).gc()-1);else switch(r<c&&(c=l==Zxt?c-2*n.w:c,l=Yxt),l.g){case 3:a+=(r-c)/2;break;case 4:a+=r-c;break;case 0:i=(r-c)/(uG(uG(Y9(n.r,t),21),87).gc()+1),a+=d+=e.Math.max(0,i);break;case 1:i=(r-c)/(uG(uG(Y9(n.r,t),21),87).gc()-1),d+=e.Math.max(0,i)}for(w=uG(uG(Y9(n.r,t),21),87).Kc();w.Ob();)(b=uG(w.Pb(),117)).e.a=(f=b.b).pf((XYn(),uDt))?f.ag()==(KQn(),_Rt)?-f.Mf().a-uM(pK(f.of(uDt))):h+uM(pK(f.of(uDt))):f.ag()==(KQn(),_Rt)?-f.Mf().a:h,b.e.b=a+b.d.d,a+=b.d.d+b.b.Mf().b+b.d.a+d}}function xQn(n,t){var e,i,r,c,a;for(t.Ug("Processor determine the coords for each level",1),i=new Zm,a=Fkn(n.b,0);a.b!=a.d.c;){for(r=uG(I6(a),40);uG(oIn(r,(QGn(),ACt)),17).a>i.c.length-1;)kD(i,new WO(B3n,G9n));e=uG(oIn(r,ACt),17).a,hN(uG(oIn(n,cCt),88))?(r.e.a<uM(pK((u3(e,i.c.length),uG(i.c[e],42)).a))&&uw((u3(e,i.c.length),uG(i.c[e],42)),r.e.a),r.e.a+r.f.a>uM(pK((u3(e,i.c.length),uG(i.c[e],42)).b))&&sw((u3(e,i.c.length),uG(i.c[e],42)),r.e.a+r.f.a)):(r.e.b<uM(pK((u3(e,i.c.length),uG(i.c[e],42)).a))&&uw((u3(e,i.c.length),uG(i.c[e],42)),r.e.b),r.e.b+r.f.b>uM(pK((u3(e,i.c.length),uG(i.c[e],42)).b))&&sw((u3(e,i.c.length),uG(i.c[e],42)),r.e.b+r.f.b))}for(c=Fkn(n.b,0);c.b!=c.d.c;)r=uG(I6(c),40),e=uG(oIn(r,(QGn(),ACt)),17).a,kfn(r,(OQn(),DPt),pK((u3(e,i.c.length),uG(i.c[e],42)).a)),kfn(r,$Pt,pK((u3(e,i.c.length),uG(i.c[e],42)).b));t.Vg()}function RQn(n){var t,i,r,c,a,o,u,s,f,l,b,w,d,g,p;for(n.o=uM(pK(oIn(n.i,(jYn(),ETt)))),n.f=uM(pK(oIn(n.i,vTt))),n.j=n.i.b.c.length,u=n.j-1,w=0,n.k=0,n.n=0,n.b=n7(Inn(dot,zZn,17,n.j,0,1)),n.c=n7(Inn(fot,zZn,345,n.j,7,1)),o=new Ww(n.i.b);o.a<o.c.c.length;){for((c=uG(N3(o),30)).p=u,b=new Ww(c.a);b.a<b.c.c.length;)(l=uG(N3(b),10)).p=w,++w;--u}for(n.g=Inn(YHt,W1n,28,w,15,1),n.d=Jq(YHt,[zZn,W1n],[53,28],15,[w,3],2),n.p=new Zm,n.q=new Zm,t=0,n.e=0,a=new Ww(n.i.b);a.a<a.c.c.length;){for(u=(c=uG(N3(a),30)).p,r=0,p=0,s=c.a.c.length,f=0,b=new Ww(c.a);b.a<b.c.c.length;)w=(l=uG(N3(b),10)).p,n.g[w]=l.c.p,f+=l.o.b+n.o,i=x5(new Fz(ix(qgn(l).a.Kc(),new h))),g=x5(new Fz(ix(Xgn(l).a.Kc(),new h))),n.d[w][0]=g-i,n.d[w][1]=i,n.d[w][2]=g,r+=i,p+=g,i>0&&kD(n.q,l),kD(n.p,l);d=s+(t-=r),f+=t*n.f,Y8(n.b,u,xwn(d)),Y8(n.c,u,f),n.k=e.Math.max(n.k,d),n.n=e.Math.max(n.n,f),n.e+=t,t+=p}}function KQn(){var n;KQn=E,FRt=new RO(Y2n,0),yRt=new RO(o3n,1),kRt=new RO(u3n,2),KRt=new RO(s3n,3),_Rt=new RO(h3n,4),hZ(),SRt=new nT(new nB(n=uG(Mj(YRt),9),uG(MF(n,n.length),9),0)),PRt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[]))),MRt=Nwn(WX(kRt,Uhn(cT(YRt,1),z4n,64,0,[]))),DRt=Nwn(WX(KRt,Uhn(cT(YRt,1),z4n,64,0,[]))),RRt=Nwn(WX(_Rt,Uhn(cT(YRt,1),z4n,64,0,[]))),LRt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[KRt]))),ERt=Nwn(WX(kRt,Uhn(cT(YRt,1),z4n,64,0,[_Rt]))),$Rt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[_Rt]))),CRt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[kRt]))),xRt=Nwn(WX(KRt,Uhn(cT(YRt,1),z4n,64,0,[_Rt]))),TRt=Nwn(WX(kRt,Uhn(cT(YRt,1),z4n,64,0,[KRt]))),ARt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[kRt,_Rt]))),jRt=Nwn(WX(kRt,Uhn(cT(YRt,1),z4n,64,0,[KRt,_Rt]))),NRt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[KRt,_Rt]))),IRt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[kRt,KRt]))),ORt=Nwn(WX(yRt,Uhn(cT(YRt,1),z4n,64,0,[kRt,KRt,_Rt])))}function FQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;for(t.Ug(j6n,1),w=new Zm,k=new Zm,s=new Ww(n.b);s.a<s.c.c.length;)for(g=-1,l=0,b=(f=D4((u=uG(N3(s),30)).a)).length;l<b;++l)if(++g,(h=f[l]).k==(zIn(),dbt)&&sN(uG(oIn(h,(jYn(),JMt)),101))){for(L_(uG(oIn(h,(jYn(),JMt)),101))||NKn(h),kfn(h,(GYn(),zpt),h),w.c.length=0,k.c.length=0,e=new Zm,Fon(m=new lS,yOn(h,(KQn(),yRt))),zJn(n,m,w,k,e),o=g,y=h,c=new Ww(w);c.a<c.c.c.length;)$jn(i=uG(N3(c),10),o,u),++g,kfn(i,zpt,h),a=uG(zq(i.j,0),12),d=uG(oIn(a,rmt),12),oM(gK(oIn(d,wyt)))||uG(oIn(i,Vpt),15).Fc(y);for(BY(m),p=yOn(h,KRt).Kc();p.Ob();)s8(m,uG(p.Pb(),12),m.a,m.a.a);for(zJn(n,m,k,null,e),v=h,r=new Ww(k);r.a<r.c.c.length;)$jn(i=uG(N3(r),10),++g,u),kfn(i,zpt,h),a=uG(zq(i.j,0),12),d=uG(oIn(a,rmt),12),oM(gK(oIn(d,wyt)))||uG(oIn(v,Vpt),15).Fc(i);0==e.c.length||kfn(h,jpt,e)}t.Vg()}function _Qn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;if(0!=t.b){for(l=new lS,a=null,b=null,i=t0(e.Math.floor(e.Math.log(t.b)*e.Math.LOG10E)+1),o=0,m=Fkn(t,0);m.b!=m.d.c;)for(g=uG(I6(m),40),xA(b)!==xA(oIn(g,(OQn(),OPt)))&&(b=mK(oIn(g,OPt)),o=0),a=null!=b?b+W3(o++,i):W3(o++,i),kfn(g,OPt,a),d=new Tp(Fkn(new Mp(g).a.d,0));Jj(d.a);)s8(l,w=uG(I6(d.a),65).c,l.c.b,l.c),kfn(w,OPt,a);for(f=new Ym,c=0;c<a.length-i;c++)for(p=Fkn(t,0);p.b!=p.d.c;)r2(f,u=r1(mK(oIn(g=uG(I6(p),40),(OQn(),OPt))),0,c+1),xwn(null!=(null==u?DA(FX(f.f,null)):_P(f.i,u))?uG(null==u?DA(FX(f.f,null)):_P(f.i,u),17).a+1:1));for(h=new bsn(new Nw(f).a);h.b;)s=von(h),r=xwn(null!=cQ(n.a,s.ld())?uG(cQ(n.a,s.ld()),17).a:0),r2(n.a,mK(s.ld()),xwn(uG(s.md(),17).a+r.a)),(!(r=uG(cQ(n.b,s.ld()),17))||r.a<uG(s.md(),17).a)&&r2(n.b,mK(s.ld()),uG(s.md(),17));_Qn(n,l)}}function BQn(n){var t,e,i,r,c,a,o,u,s,h,f;for(e=null,o=null,(r=uG(oIn(n.b,(jYn(),Yyt)),349))==(Sln(),cEt)&&(e=new Zm,o=new Zm),a=new Ww(n.d);a.a<a.c.c.length;)if((c=uG(N3(a),105)).i)switch(c.e.g){case 0:t=uG(X5(new fS(c.b)),64),r==cEt&&t==(KQn(),yRt)?mv(e.c,c):r==cEt&&t==(KQn(),KRt)?mv(o.c,c):yTn(c,t);break;case 1:u=c.a.d.j,s=c.c.d.j,u==(KQn(),yRt)?hV(c,yRt,(qhn(),udt),c.a):s==yRt?hV(c,yRt,(qhn(),sdt),c.c):u==KRt?hV(c,KRt,(qhn(),sdt),c.a):s==KRt&&hV(c,KRt,(qhn(),udt),c.c);break;case 2:case 3:$x(i=c.b,(KQn(),yRt))?$x(i,KRt)?$x(i,_Rt)?$x(i,kRt)||hV(c,yRt,(qhn(),sdt),c.c):hV(c,yRt,(qhn(),udt),c.a):hV(c,yRt,(qhn(),odt),null):hV(c,KRt,(qhn(),odt),null);break;case 4:h=c.a.d.j,f=c.a.d.j,h==(KQn(),yRt)||f==yRt?hV(c,KRt,(qhn(),odt),null):hV(c,yRt,(qhn(),odt),null)}e&&(0==e.c.length||fqn(e,(KQn(),yRt)),0==o.c.length||fqn(o,(KQn(),KRt)))}function HQn(n,t,e){var i,r,c,a,o,u,s,f,l,b,w,d,g,p,m;for(e.Ug("Breadth first model order layering",1),n.a=t,p=new Zm,g=new Ww(n.a.a);g.a<g.c.c.length;)(w=uG(N3(g),10)).k==(zIn(),dbt)&&mv(p.c,w);for(hZ(),f$(p,new jc),u=!0,r=new bQ(n.a),i=null,kD(n.a.b,r),d=new Ww(p);d.a<d.c.c.length;)if(w=uG(N3(d),10),u)a2(w,r),u=!1;else{for(o=new Fz(ix(qgn(w).a.Kc(),new h));hDn(o);)((c=uG(N9(o),18)).c.i.k==(zIn(),dbt)&&c.c.i.c==r||c.c.i.k==bbt&&uG(N9(new Fz(ix(qgn(c.c.i).a.Kc(),new h))),18).c.i.c==r)&&(i=new bQ(n.a),kD(n.a.b,i),r=new bQ(n.a),kD(n.a.b,r));for(a=new Fz(ix(qgn(w).a.Kc(),new h));hDn(a);)(c=uG(N9(a),18)).c.i.k==(zIn(),bbt)&&!c.c.i.c&&a2(c.c.i,i);a2(w,r)}for(n.a.a.c.length=0,m=new Zm,l=new Ww(n.a.b);l.a<l.c.c.length;)0==(s=uG(N3(l),30)).a.c.length&&mv(m.c,s);for(dgn(n.a.b,m),b=0,f=new Ww(n.a.b);f.a<f.c.c.length;)(s=uG(N3(f),30)).p=b,++b;e.Vg()}function UQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w;for(i=uG(oIn(n,(GYn(),rmt)),27),b=uG(oIn(n,(jYn(),xyt)),17).a,c=uG(oIn(n,pMt),17).a,Myn(i,xyt,xwn(b)),Myn(i,pMt,xwn(c)),ycn(i,n.n.a+t.a),Mcn(i,n.n.b+t.b),(0!=uG(zDn(i,DMt),181).gc()||n.e||xA(oIn(HQ(n),$Mt))===xA((pyn(),Mjt))&&lN((Yyn(),(n.q?n.q:(hZ(),hZ(),Vot))._b(LMt)?uG(oIn(n,LMt),203):uG(oIn(HQ(n),NMt),203))))&&(kcn(i,n.o.a),vcn(i,n.o.b)),f=new Ww(n.j);f.a<f.c.c.length;)F$(w=oIn(s=uG(N3(f),12),rmt),193)&&(kN(r=uG(w,123),s.n.a,s.n.b),Myn(r,eTt,s.j));for(l=0!=uG(oIn(n,PMt),181).gc(),u=new Ww(n.b);u.a<u.c.c.length;)a=uG(N3(u),72),(l||0!=uG(oIn(a,PMt),181).gc())&&(vN(e=uG(oIn(a,rmt),135),a.o.a,a.o.b),kN(e,a.n.a,a.n.b));if(!cV(uG(oIn(n,nTt),21)))for(h=new Ww(n.j);h.a<h.c.c.length;)for(o=new Ww((s=uG(N3(h),12)).f);o.a<o.c.c.length;)a=uG(N3(o),72),kcn(e=uG(oIn(a,rmt),135),a.o.a),vcn(e,a.o.b),kN(e,a.n.a,a.n.b)}function GQn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S;for(t.Ug("Calculate Graph Size",1),t.dh(n,l7n),l=B3n,b=B3n,h=b7n,f=b7n,g=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));g.e!=g.i.gc();)v=(w=uG(Zkn(g),27)).i,k=w.j,S=w.g,u=w.f,s=uG(zDn(w,(XYn(),$$t)),140),l=e.Math.min(l,v-s.b),b=e.Math.min(b,k-s.d),h=e.Math.max(h,v+S+s.c),f=e.Math.max(f,k+u+s.a);for(p=new MO(l-(m=uG(zDn(n,(XYn(),W$t)),107)).b,b-m.d),E=h-l+(m.b+m.c),o=f-b+(m.d+m.a),oM(gK(zDn(n,(jOn(),OIt))))&&(y=uG(zDn(n,(SK(),zCt)),27),M=uG(zDn(y,$$t),140),T=y.i+y.g/2+(M.b+M.c)/2-p.a,a=o-(j=y.j+y.f/2+(M.d+M.a)/2-p.b),(c=E-T)<E/2?(E+=i=c-T,p.a-=i):E+=i=T-c,a<o/2?(o+=r=a-j,p.b-=r):o+=r=j-a),d=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));d.e!=d.i.gc();)ycn(w=uG(Zkn(d),27),w.i-p.a),Mcn(w,w.j-p.b);oM(gK(zDn(n,H$t)))||(kcn(n,E),vcn(n,o)),Myn(n,h$t,E-(m.b+m.c)),Myn(n,s$t,o-(m.d+m.a)),t.dh(n,w7n)}function qQn(n,t,e){var i,r,c,a,o,u,s,h,f,l;if(n.e.a.$b(),n.f.a.$b(),n.c.c.length=0,n.i.c.length=0,n.g.a.$b(),t)for(a=new Ww(t.a);a.a<a.c.c.length;)for(h=yOn(c=uG(N3(a),10),(KQn(),kRt)).Kc();h.Ob();)for(s=uG(h.Pb(),12),FV(n.e,s),r=new Ww(s.g);r.a<r.c.c.length;)v9(i=uG(N3(r),18))||(kD(n.c,i),Ukn(n,i),((o=i.c.i.k)==(zIn(),dbt)||o==gbt||o==lbt||o==fbt)&&kD(n.j,i),(f=(l=i.d).i.c)==e?FV(n.f,l):f==t?FV(n.e,l):men(n.c,i));if(e)for(a=new Ww(e.a);a.a<a.c.c.length;){for(u=new Ww((c=uG(N3(a),10)).j);u.a<u.c.c.length;)for(r=new Ww(uG(N3(u),12).g);r.a<r.c.c.length;)v9(i=uG(N3(r),18))&&FV(n.g,i);for(h=yOn(c,(KQn(),_Rt)).Kc();h.Ob();)for(s=uG(h.Pb(),12),FV(n.f,s),r=new Ww(s.g);r.a<r.c.c.length;)v9(i=uG(N3(r),18))||(kD(n.c,i),Ukn(n,i),((o=i.c.i.k)==(zIn(),dbt)||o==gbt||o==lbt||o==fbt)&&kD(n.j,i),(f=(l=i.d).i.c)==e?FV(n.f,l):f==t?FV(n.e,l):men(n.c,i))}}function XQn(n,t,i){var r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k,y,M;for(i.Ug("Polyline edge routing",1),m=uM(pK(oIn(t,(jYn(),Qyt)))),d=uM(pK(oIn(t,STt))),c=uM(pK(oIn(t,gTt))),r=e.Math.min(1,c/d),y=0,s=0,0!=t.b.c.length&&(y=.4*r*(M=Yxn(uG(zq(t.b,0),30)))),u=new N4(t.b,0);u.b<u.d.gc();){for(MK(u.b<u.d.gc()),(a=UA(o=uG(u.d.Xb(u.c=u.b++),30),LSt))&&y>0&&(y-=d),Vzn(o,y),l=0,w=new Ww(o.a);w.a<w.c.c.length;){for(f=0,p=new Fz(ix(Xgn(b=uG(N3(w),10)).a.Kc(),new h));hDn(p);)v=n3((g=uG(N9(p),18)).c).b,k=n3(g.d).b,o!=g.d.i.c||v9(g)||(_Nn(g,y,.4*r*e.Math.abs(v-k)),g.c.j==(KQn(),_Rt)&&(v=0,k=0)),f=e.Math.max(f,e.Math.abs(k-v));switch(b.k.g){case 0:case 4:case 1:case 3:case 5:aVn(n,b,y,m)}l=e.Math.max(l,f)}u.b<u.d.gc()&&(M=Yxn((MK(u.b<u.d.gc()),uG(u.d.Xb(u.c=u.b++),30))),l=e.Math.max(l,M),MK(u.b>0),u.a.Xb(u.c=--u.b)),s=.4*r*l,!a&&u.b<u.d.gc()&&(s+=d),y+=o.c.a+s}n.a.a.$b(),t.f.a=y,i.Vg()}function zQn(n){var t,e,i,r,c;switch(ZZ(n,Uet),(!n.b&&(n.b=new f_(cFt,n,4,7)),n.b).i+(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c).i){case 0:throw hv(new vM("The edge must have at least one source or target."));case 1:return 0==(!n.b&&(n.b=new f_(cFt,n,4,7)),n.b).i?R0(lCn(uG(zrn((!n.c&&(n.c=new f_(cFt,n,5,8)),n.c),0),84))):R0(lCn(uG(zrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84)))}if(1==(!n.b&&(n.b=new f_(cFt,n,4,7)),n.b).i&&1==(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c).i){if(r=lCn(uG(zrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84)),c=lCn(uG(zrn((!n.c&&(n.c=new f_(cFt,n,5,8)),n.c),0),84)),R0(r)==R0(c))return R0(r);if(r==R0(c))return r;if(c==R0(r))return c}for(t=lCn(uG(N9(i=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[(!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c)])))),84));hDn(i);)if((e=lCn(uG(N9(i),84)))!=t&&!Ern(e,t))if(R0(e)==R0(t))t=R0(e);else if(!(t=xxn(t,e)))return null;return t}function VQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;if((f=t.length)>0&&(s3(0,t.length),64!=(o=t.charCodeAt(0)))){if(37==o&&(u=!1,0!=(h=t.lastIndexOf("%"))&&(h==f-1||(s3(h+1,t.length),u=46==t.charCodeAt(h+1))))){if(Knn(1,h,t.length),m=m_("%",a=t.substr(1,h-1))?null:eJn(a),i=0,u)try{i=vUn((s3(h+2,t.length+1),t.substr(h+2)),j1n,vZn)}catch(v){throw F$(v=Ehn(v),130)?hv(new Pen(v)):hv(v)}for(d=kon(n.Gh());d.Ob();)if(F$(b=Ksn(d),519)&&(p=(r=uG(b,598)).d,(null==m?null==p:m_(m,p))&&0==i--))return r;return null}if(l=-1==(s=t.lastIndexOf("."))?t:(Knn(0,s,t.length),t.substr(0,s)),e=0,-1!=s)try{e=vUn((s3(s+1,t.length+1),t.substr(s+1)),j1n,vZn)}catch(v){if(!F$(v=Ehn(v),130))throw hv(v);l=t}for(l=m_("%",l)?null:eJn(l),w=kon(n.Gh());w.Ob();)if(F$(b=Ksn(w),197)&&(g=(c=uG(b,197)).xe(),(null==l?null==g:m_(l,g))&&0==e--))return c;return null}return jWn(n,t)}function WQn(n){var t,e,i,r,c,a,o,u,s,f,l,b,w,d,g,p,m;for(s=new Ym,o=new K1,i=new Ww(n.a.a.b);i.a<i.c.c.length;)if(u=z4(t=uG(N3(i),60)))VAn(s.f,u,t);else if(m=Q6(t))for(r=new Ww(m.k);r.a<r.c.c.length;)UNn(o,uG(N3(r),18),t);for(e=new Ww(n.a.a.b);e.a<e.c.c.length;)if(u=z4(t=uG(N3(e),60)))for(a=new Fz(ix(Xgn(u).a.Kc(),new h));hDn(a);)if(!v9(c=uG(N9(a),18))&&(w=c.c,p=c.d,!(KQn(),LRt).Hc(c.c.j)||!LRt.Hc(c.d.j))){if(d=uG(cQ(s,c.d.i),60),RKn(xS(DS(RS($S(new uk,0),100),n.c[t.a.d]),n.c[d.a.d])),w.j==_Rt&&Yz((Lun(),w)))for(l=uG(Y9(o,c),21).Kc();l.Ob();)if((f=uG(l.Pb(),60)).d.c<t.d.c){if((b=n.c[f.a.d])==(g=n.c[t.a.d]))continue;RKn(xS(DS(RS($S(new uk,1),100),b),g))}if(p.j==kRt&&Zz((Lun(),p)))for(l=uG(Y9(o,c),21).Kc();l.Ob();)if((f=uG(l.Pb(),60)).d.c>t.d.c){if((b=n.c[t.a.d])==(g=n.c[f.a.d]))continue;RKn(xS(DS(RS($S(new uk,1),100),b),g))}}}function QQn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;if(b=uG(uG(Y9(n.r,t),21),87),t!=(KQn(),kRt)&&t!=_Rt){for(a=t==yRt?(ehn(),wht):(ehn(),pht),y=t==yRt?(Yen(),Fst):(Yen(),Rst),c=(r=(i=uG(AJ(n.b,t),127)).i).c+Trn(Uhn(cT(eUt,1),I0n,28,15,[i.n.b,n.C.b,n.k])),m=r.c+r.b-Trn(Uhn(cT(eUt,1),I0n,28,15,[i.n.c,n.C.c,n.k])),o=TT(BB(a),n.t),v=t==yRt?T0n:M0n,l=b.Kc();l.Ob();)!(h=uG(l.Pb(),117)).c||h.c.d.c.length<=0||(p=h.b.Mf(),g=h.e,(d=(w=h.c).i).b=(s=w.n,w.e.a+s.b+s.c),d.a=(u=w.n,w.e.b+u.d+u.a),ZZ(y,W2n),w.f=y,etn(w,(Ktn(),Lst)),d.c=g.a-(d.b-p.a)/2,M=e.Math.min(c,g.a),T=e.Math.max(m,g.a+p.a),d.c<M?d.c=M:d.c+d.b>T&&(d.c=T-d.b),kD(o.d,new ZX(d,Hdn(o,d))),v=t==yRt?e.Math.max(v,g.b+h.b.Mf().b):e.Math.min(v,g.b));for(v+=t==yRt?n.t:-n.t,(k=cmn((o.e=v,o)))>0&&(uG(AJ(n.b,t),127).a.b=k),f=b.Kc();f.Ob();)!(h=uG(f.Pb(),117)).c||h.c.d.c.length<=0||((d=h.c.i).c-=h.e.a,d.d-=h.e.b)}else TQn(n,t)}function JQn(n){var t,e,i,r,c,a,o,u,s,f;for(t=new Ym,a=new DD(n);a.e!=a.i.gc();){for(c=uG(Zkn(a),27),e=new ek,vJ(cft,c,e),f=new at,i=uG(l8(new fX(null,new LW(new Fz(ix(tRn(c).a.Kc(),new h)))),HX(f,ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)])))),85),Ycn(e,uG(i.xc((qx(),!0)),16),new ot),r=uG(l8(JJ(uG(i.xc(!1),15).Lc(),new ut),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15).Kc();r.Ob();)(s=wIn(uG(r.Pb(),74)))&&((o=uG(DA(FX(t.f,s)),21))||(o=TFn(s),VAn(t.f,s,o)),Qon(e,o));for(i=uG(l8(new fX(null,new LW(new Fz(ix(eRn(c).a.Kc(),new h)))),HX(f,ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut])))),85),Ycn(e,uG(i.xc(!0),16),new st),u=uG(l8(JJ(uG(i.xc(!1),15).Lc(),new ht),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15).Kc();u.Ob();)(s=dIn(uG(u.Pb(),74)))&&((o=uG(DA(FX(t.f,s)),21))||(o=TFn(s),VAn(t.f,s,o)),Qon(e,o))}}function YQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d;if(pXn(),(u=dwn(n,0)<0)&&(n=Men(n)),0==dwn(n,0))switch(t){case 0:return"0";case 1:return N0n;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return(b=new WM).a+=t<0?"0E+":"0E",b.a+=t==j1n?"2147483648":""+-t,b.a}f=Inn(JHt,N1n,28,1+(h=18),15,1),e=h,d=n;do{s=d,d=bSn(d,10),f[--e]=pz(Lgn(48,$gn(s,Ngn(d,10))))&D1n}while(0!=dwn(d,0));if(r=$gn($gn($gn(h,e),t),1),0==t)return u&&(f[--e]=45),mvn(f,e,h-e);if(t>0&&dwn(r,-6)>=0){if(dwn(r,0)>=0){for(c=e+pz(r),o=h-1;o>=c;o--)f[o+1]=f[o];return f[++c]=46,u&&(f[--e]=45),mvn(f,e,h-e+1)}for(a=2;$P(a,Lgn(Men(r),1));a++)f[--e]=48;return f[--e]=46,f[--e]=48,u&&(f[--e]=45),mvn(f,e,h-e)}return w=e+1,i=h,l=new QM,u&&(l.a+="-"),i-w>=1?(jQ(l,f[e]),l.a+=".",l.a+=mvn(f,e+1,h-e-1)):l.a+=mvn(f,e,h-e),l.a+="E",dwn(r,0)>0&&(l.a+="+"),l.a+=""+oV(r),l.a}function ZQn(n,t,i,r,c){var a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;if(p=new MO(n.g,n.f),(g=xAn(n)).a=e.Math.max(g.a,t),g.b=e.Math.max(g.b,i),T=g.a/p.a,f=g.b/p.b,y=g.a-p.a,s=g.b-p.b,r)for(o=R0(n)?uG(zDn(R0(n),(XYn(),d$t)),88):uG(zDn(n,(XYn(),d$t)),88),u=xA(zDn(n,(XYn(),sDt)))===xA(($Pn(),cRt)),v=new DD((!n.c&&(n.c=new fV(wFt,n,9,9)),n.c));v.e!=v.i.gc();)switch(m=uG(Zkn(v),123),(k=uG(zDn(m,gDt),64))==(KQn(),FRt)&&(k=RGn(m,o),Myn(m,gDt,k)),k.g){case 1:u||ycn(m,m.i*T);break;case 2:ycn(m,m.i+y),u||Mcn(m,m.j*f);break;case 3:u||ycn(m,m.i*T),Mcn(m,m.j+s);break;case 4:u||Mcn(m,m.j*f)}if(vN(n,g.a,g.b),c)for(b=new DD((!n.n&&(n.n=new fV(lFt,n,1,7)),n.n));b.e!=b.i.gc();)w=(l=uG(Zkn(b),135)).i+l.g/2,d=l.j+l.f/2,(M=w/p.a)+(h=d/p.b)>=1&&(M-h>0&&d>=0?(ycn(l,l.i+y),Mcn(l,l.j+s*h)):M-h<0&&w>=0&&(ycn(l,l.i+y*M),Mcn(l,l.j+s)));return Myn(n,(XYn(),_$t),(Qmn(),new nB(a=uG(Mj(sKt),9),uG(MF(a,a.length),9),0))),new MO(T,f)}function nJn(n){hP(n,new hCn(xT(FT(DT(KT(RT(new bu,x7n),"ELK Radial"),'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'),new Oo),x7n))),U4(n,x7n,b9n,Jkn(BIt)),U4(n,x7n,o4n,Jkn(VIt)),U4(n,x7n,p4n,Jkn($It)),U4(n,x7n,x4n,Jkn(DIt)),U4(n,x7n,g4n,Jkn(xIt)),U4(n,x7n,m4n,Jkn(NIt)),U4(n,x7n,w4n,Jkn(RIt)),U4(n,x7n,v4n,Jkn(_It)),U4(n,x7n,P7n,Jkn(AIt)),U4(n,x7n,S7n,Jkn(LIt)),U4(n,x7n,E7n,Jkn(UIt)),U4(n,x7n,A7n,Jkn(XIt)),U4(n,x7n,L7n,Jkn(GIt)),U4(n,x7n,N7n,Jkn(qIt)),U4(n,x7n,O7n,Jkn(KIt)),U4(n,x7n,T7n,Jkn(FIt)),U4(n,x7n,j7n,Jkn(HIt)),U4(n,x7n,C7n,Jkn(zIt)),U4(n,x7n,I7n,Jkn(WIt)),U4(n,x7n,M7n,Jkn(OIt))}function tJn(n){var t,e,i,r,c,a,o,u,s,h,f;if(null==n)throw hv(new ZM(IZn));if(s=n,u=!1,(c=n.length)>0&&(s3(0,n.length),45!=(t=n.charCodeAt(0))&&43!=t||(s3(1,n.length+1),n=n.substr(1),--c,u=45==t)),0==c)throw hv(new ZM(y0n+s+'"'));for(;n.length>0&&(s3(0,n.length),48==n.charCodeAt(0));)s3(1,n.length+1),n=n.substr(1),--c;if(c>(lGn(),vot)[10])throw hv(new ZM(y0n+s+'"'));for(r=0;r<c;r++)if(-1==Cvn((s3(r,n.length),n.charCodeAt(r))))throw hv(new ZM(y0n+s+'"'));for(f=0,a=pot[10],h=mot[10],o=Men(kot[10]),e=!0,(i=c%a)>0&&(f=-parseInt((Knn(0,i,n.length),n.substr(0,i)),10),s3(i,n.length+1),n=n.substr(i),c-=i,e=!1);c>=a;){if(i=parseInt((Knn(0,a,n.length),n.substr(0,a)),10),s3(a,n.length+1),n=n.substr(a),c-=a,e)e=!1;else{if(dwn(f,o)<0)throw hv(new ZM(y0n+s+'"'));f=Ngn(f,h)}f=$gn(f,i)}if(dwn(f,0)>0)throw hv(new ZM(y0n+s+'"'));if(!u&&dwn(f=Men(f),0)<0)throw hv(new ZM(y0n+s+'"'));return f}function eJn(n){var t,e,i,r,c,a,o,u;if(ZXn(),null==n)return null;if((r=xL(n,$Cn(37)))<0)return n;for(u=new lx((Knn(0,r,n.length),n.substr(0,r))),t=Inn(tUt,ret,28,4,15,1),o=0,i=0,a=n.length;r<a;r++)if(s3(r,n.length),37==n.charCodeAt(r)&&n.length>r+2&&mfn((s3(r+1,n.length),n.charCodeAt(r+1)),QFt,JFt)&&mfn((s3(r+2,n.length),n.charCodeAt(r+2)),QFt,JFt))if(e=AG((s3(r+1,n.length),n.charCodeAt(r+1)),(s3(r+2,n.length),n.charCodeAt(r+2))),r+=2,i>0?128==(192&e)?t[o++]=e<<24>>24:i=0:e>=128&&(192==(224&e)?(t[o++]=e<<24>>24,i=2):224==(240&e)?(t[o++]=e<<24>>24,i=3):240==(248&e)&&(t[o++]=e<<24>>24,i=4)),i>0){if(o==i){switch(o){case 2:jQ(u,((31&t[0])<<6|63&t[1])&D1n);break;case 3:jQ(u,((15&t[0])<<12|(63&t[1])<<6|63&t[2])&D1n)}o=0,i=0}}else{for(c=0;c<o;++c)jQ(u,t[c]&D1n);o=0,u.a+=String.fromCharCode(e)}else{for(c=0;c<o;++c)jQ(u,t[c]&D1n);o=0,jQ(u,(s3(r,n.length),n.charCodeAt(r)))}return u.a}function iJn(n){var t,i,r,c,a,o,u,s,h,f,l;if(f=R0(lCn(uG(zrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84)))==R0(lCn(uG(zrn((!n.c&&(n.c=new f_(cFt,n,5,8)),n.c),0),84))),o=new sj,(t=uG(zDn(n,(Iln(),Mxt)),75))&&t.b>=2){if(0==(!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i)gj(),i=new is,ttn((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a),i);else if((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i>1)for(l=new Zx((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a));l.e!=l.i.gc();)$Sn(l);sqn(t,uG(zrn((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a),0),166))}if(f)for(r=new DD((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a));r.e!=r.i.gc();)for(s=new DD((!(i=uG(Zkn(r),166)).a&&(i.a=new MD(eFt,i,5)),i.a));s.e!=s.i.gc();)u=uG(Zkn(s),377),o.a=e.Math.max(o.a,u.a),o.b=e.Math.max(o.b,u.b);for(a=new DD((!n.n&&(n.n=new fV(lFt,n,1,7)),n.n));a.e!=a.i.gc();)c=uG(Zkn(a),135),(h=uG(zDn(c,Cxt),8))&&kN(c,h.a,h.b),f&&(o.a=e.Math.max(o.a,c.i+c.g),o.b=e.Math.max(o.b,c.j+c.f));return o}function rJn(n,t,e,i,r){var c,a,o;if(win(n,t),a=t[0],c=VJ(e.c,0),o=-1,Jfn(e))if(i>0){if(a+i>n.length)return!1;o=RNn((Knn(0,a+i,n.length),n.substr(0,a+i)),t)}else o=RNn(n,t);switch(c){case 71:return o=XOn(n,a,Uhn(cT($ot,1),zZn,2,6,[Q1n,J1n]),t),r.e=o,!0;case 77:return c_n(n,t,r,o,a);case 76:return a_n(n,t,r,o,a);case 69:return XAn(n,t,a,r);case 99:return zAn(n,t,a,r);case 97:return o=XOn(n,a,Uhn(cT($ot,1),zZn,2,6,["AM","PM"]),t),r.b=o,!0;case 121:return o_n(n,t,a,o,e,r);case 100:return!(o<=0||(r.c=o,0));case 83:return!(o<0)&&tmn(o,a,t[0],r);case 104:12==o&&(o=0);case 75:case 72:return!(o<0||(r.f=o,r.g=!1,0));case 107:return!(o<0||(r.f=o,r.g=!0,0));case 109:return!(o<0||(r.j=o,0));case 115:return!(o<0||(r.n=o,0));case 90:if(a<n.length&&(s3(a,n.length),90==n.charCodeAt(a)))return++t[0],r.o=0,!0;case 122:case 118:return bCn(n,a,t,r);default:return!1}}function cJn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;for(m=t.c.length,c=new WHn(n.a,i,null,null),T=Inn(eUt,I0n,28,m,15,1),w=Inn(eUt,I0n,28,m,15,1),b=Inn(eUt,I0n,28,m,15,1),d=0,u=0;u<m;u++)w[u]=vZn,b[u]=j1n;for(s=0;s<m;s++)for(u3(s,t.c.length),r=uG(t.c[s],185),T[s]=uxn(r),T[d]>T[s]&&(d=s),f=new Ww(n.a.b);f.a<f.c.c.length;)for(p=new Ww(uG(N3(f),30).a);p.a<p.c.c.length;)g=uG(N3(p),10),y=uM(r.p[g.p])+uM(r.d[g.p]),w[s]=e.Math.min(w[s],y),b[s]=e.Math.max(b[s],y+g.o.b);for(M=Inn(eUt,I0n,28,m,15,1),h=0;h<m;h++)(u3(h,t.c.length),uG(t.c[h],185)).o==(w0(),wSt)?M[h]=w[d]-w[h]:M[h]=b[d]-b[h];for(a=Inn(eUt,I0n,28,m,15,1),l=new Ww(n.a.b);l.a<l.c.c.length;)for(k=new Ww(uG(N3(l),30).a);k.a<k.c.c.length;){for(v=uG(N3(k),10),o=0;o<m;o++)a[o]=uM((u3(o,t.c.length),uG(t.c[o],185)).p[v.p])+uM((u3(o,t.c.length),uG(t.c[o],185)).d[v.p])+M[o];vv(a,qrn(P.prototype.Me,P,[])),c.p[v.p]=(a[1]+a[2])/2,c.d[v.p]=0}return c}function aJn(n,t,e){var i,r,c,a,o;switch(i=t.i,c=n.i.o,r=n.i.d,o=n.n,a=Gfn(Uhn(cT(PNt,1),zZn,8,0,[o,n.a])),n.j.g){case 1:eF(t,(Yen(),Rst)),i.d=-r.d-e-i.a,uG(uG(zq(t.d,0),187).of((GYn(),Qpt)),291)==(Ajn(),$xt)?(etn(t,(Ktn(),Lst)),i.c=a.a-uM(pK(oIn(n,emt)))-e-i.b):(etn(t,(Ktn(),Ast)),i.c=a.a+uM(pK(oIn(n,emt)))+e);break;case 2:etn(t,(Ktn(),Ast)),i.c=c.a+r.c+e,uG(uG(zq(t.d,0),187).of((GYn(),Qpt)),291)==(Ajn(),$xt)?(eF(t,(Yen(),Rst)),i.d=a.b-uM(pK(oIn(n,emt)))-e-i.a):(eF(t,(Yen(),Fst)),i.d=a.b+uM(pK(oIn(n,emt)))+e);break;case 3:eF(t,(Yen(),Fst)),i.d=c.b+r.a+e,uG(uG(zq(t.d,0),187).of((GYn(),Qpt)),291)==(Ajn(),$xt)?(etn(t,(Ktn(),Lst)),i.c=a.a-uM(pK(oIn(n,emt)))-e-i.b):(etn(t,(Ktn(),Ast)),i.c=a.a+uM(pK(oIn(n,emt)))+e);break;case 4:etn(t,(Ktn(),Lst)),i.c=-r.b-e-i.b,uG(uG(zq(t.d,0),187).of((GYn(),Qpt)),291)==(Ajn(),$xt)?(eF(t,(Yen(),Rst)),i.d=a.b-uM(pK(oIn(n,emt)))-e-i.a):(eF(t,(Yen(),Fst)),i.d=a.b+uM(pK(oIn(n,emt)))+e)}}function oJn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g;for(i.Ug($7n,1),!t.a&&(t.a=new fV(bFt,t,10,11)),r=uM(pK(zDn(t,(S_n(),VOt)))),f=uM(pK(zDn(t,bAt))),b=uG(zDn(t,hAt),107),a=kYn(w=new vO(r,f),t,b),Irn(t,w),u=uG(zDn(t,oAt),17).a;u>1;){if(c=nKn(t),l=a.g,d=uG(zDn(t,hAt),107),g=uM(pK(zDn(t,VOt))),(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a).i>1&&uM(pK(zDn(t,(lBn(),jOt))))!=M0n&&(a.c+(d.b+d.c))/(a.b+(d.d+d.a))<g?Myn(c,(lBn(),POt),uM(pK(zDn(t,POt)))+uM(pK(zDn(t,jOt)))):(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a).i>1&&uM(pK(zDn(t,(lBn(),TOt))))!=M0n&&(a.c+(d.b+d.c))/(a.b+(d.d+d.a))>g&&Myn(c,(lBn(),POt),e.Math.max(uM(pK(zDn(t,EOt))),uM(pK(zDn(c,POt)))-uM(pK(zDn(t,TOt))))),(h=(s=kYn(w=new vO(r,f),c,b)).g)>=l&&h==h){for(o=0;o<(!c.a&&(c.a=new fV(bFt,c,10,11)),c.a).i;o++)mNn(n,uG(zrn((!c.a&&(c.a=new fV(bFt,c,10,11)),c.a),o),27),uG(zrn((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a),o),27));Irn(t,w),x1(a,s.c),D1(a,s.b)}--u}Myn(t,(lBn(),mOt),a.b),Myn(t,vOt,a.c),i.Vg()}function uJn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(t.Ug("Interactive node layering",1),i=new Zm,b=new Ww(n.a);b.a<b.c.c.length;){for(u=(s=(f=uG(N3(b),10)).n.a)+f.o.a,u=e.Math.max(s+1,u),v=new N4(i,0),r=null;v.b<v.d.gc();){if(MK(v.b<v.d.gc()),(p=uG(v.d.Xb(v.c=v.b++),578)).c>=u){MK(v.b>0),v.a.Xb(v.c=--v.b);break}p.a>s&&(r?(Ohn(r.b,p.b),r.a=e.Math.max(r.a,p.a),LQ(v)):(kD(p.b,f),p.c=e.Math.min(p.c,s),p.a=e.Math.max(p.a,u),r=p))}r||((r=new Mk).c=s,r.a=u,pF(v,r),kD(r.b,f))}for(o=n.b,h=0,m=new Ww(i);m.a<m.c.c.length;)for(p=uG(N3(m),578),(c=new bQ(n)).p=h++,mv(o.c,c),w=new Ww(p.b);w.a<w.c.c.length;)a2(f=uG(N3(w),10),c),f.p=0;for(l=new Ww(n.a);l.a<l.c.c.length;)if(0==(f=uG(N3(l),10)).p)for(g=sBn(f,n);0!=g.a.gc();)d=uG(g.a.ec().Kc().Pb(),10),g.a.Bc(d),Qon(g,sBn(d,n));for(a=new N4(o,0);a.b<a.d.gc();)0==(MK(a.b<a.d.gc()),uG(a.d.Xb(a.c=a.b++),30)).a.c.length&&LQ(a);n.a.c.length=0,t.Vg()}function sJn(n,t,i,r,c,a,o){var u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O;for(w=0,S=0,s=new Ww(n);s.a<s.c.c.length;)IWn(u=uG(N3(s),27)),w=e.Math.max(w,u.g),S+=u.g*u.f;for(E=Ojn(n,S/n.c.length),S+=n.c.length*E,w=e.Math.max(w,e.Math.sqrt(S*o))+i.b,I=i.b,O=i.d,b=0,f=i.b+i.c,aq(j=new lS,xwn(0)),M=new lS,h=new N4(n,0);h.b<h.d.gc();)MK(h.b<h.d.gc()),C=(u=uG(h.d.Xb(h.c=h.b++),27)).g,l=u.f,I+C>w&&(a&&(cL(M,b),cL(j,xwn(h.b-1))),I=i.b,O+=b+t,b=0,f=e.Math.max(f,i.b+i.c+C)),ycn(u,I),Mcn(u,O),f=e.Math.max(f,I+C+i.c),b=e.Math.max(b,l),I+=C+t;if(f=e.Math.max(f,r),(P=O+b+i.a)<c&&(b+=c-P,P=c),a)for(I=i.b,h=new N4(n,0),cL(j,xwn(n.c.length)),p=uG(I6(T=Fkn(j,0)),17).a,cL(M,b),y=Fkn(M,0),k=0;h.b<h.d.gc();)h.b==p&&(I=i.b,k=uM(pK(I6(y))),p=uG(I6(T),17).a),MK(h.b<h.d.gc()),m=(u=uG(h.d.Xb(h.c=h.b++),27)).f,vcn(u,k),d=k,h.b==p&&(g=f-I-i.c,v=u.g,kcn(u,g),tLn(u,new MO(g,d),new MO(v,m))),I+=u.g+t;return new MO(f,P)}function hJn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S;for(t.Ug("Compound graph postprocessor",1),i=oM(gK(oIn(n,(jYn(),xTt)))),u=uG(oIn(n,(GYn(),Apt)),229),f=new ek,m=u.ec().Kc();m.Ob();){for(p=uG(m.Pb(),18),o=new Z_(u.cc(p)),hZ(),f$(o,new Gd(n)),M=vun((u3(0,o.c.length),uG(o.c[0],249))),j=kun(uG(zq(o,o.c.length-1),249)),k=M.i,v=jsn(j.i,k)?k.e:HQ(k),l=iyn(p,o),BY(p.a),b=null,a=new Ww(o);a.a<a.c.c.length;)c=uG(N3(a),249),pAn(g=new sj,c.a,v),w=c.b,rbn(r=new Uk,0,w.a),Xun(r,g),y=new eN(n3(w.c)),T=new eN(n3(w.d)),JF(y,g),JF(T,g),b&&(0==r.b?d=T:(MK(0!=r.b),d=uG(r.a.a.c,8)),E=e.Math.abs(b.a-d.a)>t4n,S=e.Math.abs(b.b-d.b)>t4n,(!i&&E&&S||i&&(E||S))&&aq(p.a,y)),Qon(p.a,r),0==r.b?b=y:(MK(0!=r.b),b=uG(r.c.b.c,8)),hhn(w,l,g),kun(c)==j&&(HQ(j.i)!=c.a&&pAn(g=new sj,HQ(j.i),v),kfn(p,Smt,g)),sOn(w,p,v),f.a.zc(w,f);c2(p,M),u2(p,j)}for(h=f.a.ec().Kc();h.Ob();)c2(s=uG(h.Pb(),18),null),u2(s,null);t.Vg()}function fJn(n,t){var e,i,r,c,a,o,u,s,h,f,l;for(h=(r=uG(oIn(n,(QGn(),cCt)),88))==(xdn(),JDt)||r==YDt?QDt:YDt,e=uG(l8(JJ(new fX(null,new h3(n.b,16)),new $a),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),(u=uG(l8(YJ(e.Oc(),new Pp(t)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15)).Gc(uG(l8(YJ(e.Oc(),new Cp(t)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),16)),u.jd(new Ip(h)),l=new Hj(new Op(r)),i=new Ym,o=u.Kc();o.Ob();)a=uG(o.Pb(),240),s=uG(a.a,40),oM(gK(a.c))?(l.a.zc(s,(qx(),tot)),new od(l.a.Zc(s,!1)).a.gc()>0&&vJ(i,s,uG(new od(l.a.Zc(s,!1)).a.Vc(),40)),new od(l.a.ad(s,!0)).a.gc()>1&&vJ(i,wmn(l,s),s)):(new od(l.a.Zc(s,!1)).a.gc()>0&&xA(c=uG(new od(l.a.Zc(s,!1)).a.Vc(),40))===xA(DA(FX(i.f,s)))&&uG(oIn(s,(OQn(),yPt)),15).Fc(c),new od(l.a.ad(s,!0)).a.gc()>1&&(f=wmn(l,s),xA(DA(FX(i.f,f)))===xA(s)&&uG(oIn(f,(OQn(),yPt)),15).Fc(s)),l.a.Bc(s))}function lJn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;if(1==n.gc())return uG(n.Xb(0),235);if(n.gc()<=0)return new d7;for(c=n.Kc();c.Ob();){for(i=uG(c.Pb(),235),d=0,f=vZn,l=vZn,s=j1n,h=j1n,w=new Ww(i.e);w.a<w.c.c.length;)b=uG(N3(w),153),d+=uG(oIn(b,(cGn(),$ft)),17).a,f=e.Math.min(f,b.d.a-b.e.a/2),l=e.Math.min(l,b.d.b-b.e.b/2),s=e.Math.max(s,b.d.a+b.e.a/2),h=e.Math.max(h,b.d.b+b.e.b/2);kfn(i,(cGn(),$ft),xwn(d)),kfn(i,(mon(),Vft),new MO(f,l)),kfn(i,zft,new MO(s,h))}for(hZ(),n.jd(new bt),zsn(g=new d7,uG(n.Xb(0),96)),u=0,v=0,a=n.Kc();a.Ob();)i=uG(a.Pb(),235),p=YF(D$(uG(oIn(i,(mon(),zft)),8)),uG(oIn(i,Vft),8)),u=e.Math.max(u,p.a),v+=p.a*p.b;for(u=e.Math.max(u,e.Math.sqrt(v)*uM(pK(oIn(g,(cGn(),kft))))),k=0,y=0,o=0,t=m=uM(pK(oIn(g,_ft))),r=n.Kc();r.Ob();)i=uG(r.Pb(),235),k+(p=YF(D$(uG(oIn(i,(mon(),zft)),8)),uG(oIn(i,Vft),8))).a>u&&(k=0,y+=o+m,o=0),eUn(g,i,k,y),t=e.Math.max(t,k+p.a),o=e.Math.max(o,p.b),k+=p.a+m;return g}function bJn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d,g;if(NGn(),null==n)return null;if((w=hgn(c=_en(n)))%4!=0)return null;if(0==(d=w/4|0))return Inn(tUt,ret,28,0,15,1);for(f=null,t=0,e=0,i=0,r=0,a=0,o=0,u=0,s=0,b=0,l=0,h=0,f=Inn(tUt,ret,28,3*d,15,1);b<d-1;b++){if(!(mE(a=c[h++])&&mE(o=c[h++])&&mE(u=c[h++])&&mE(s=c[h++])))return null;t=dHt[a],e=dHt[o],i=dHt[u],r=dHt[s],f[l++]=(t<<2|e>>4)<<24>>24,f[l++]=((15&e)<<4|i>>2&15)<<24>>24,f[l++]=(i<<6|r)<<24>>24}return mE(a=c[h++])&&mE(o=c[h++])?(t=dHt[a],e=dHt[o],u=c[h++],s=c[h++],-1==dHt[u]||-1==dHt[s]?61==u&&61==s?15&e?null:(qGn(f,0,g=Inn(tUt,ret,28,3*b+1,15,1),0,3*b),g[l]=(t<<2|e>>4)<<24>>24,g):61!=u&&61==s?3&(i=dHt[u])?null:(qGn(f,0,g=Inn(tUt,ret,28,3*b+2,15,1),0,3*b),g[l++]=(t<<2|e>>4)<<24>>24,g[l]=((15&e)<<4|i>>2&15)<<24>>24,g):null:(i=dHt[u],r=dHt[s],f[l++]=(t<<2|e>>4)<<24>>24,f[l++]=((15&e)<<4|i>>2&15)<<24>>24,f[l++]=(i<<6|r)<<24>>24,f)):null}function wJn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(t.Ug(j6n,1),l=uG(oIn(n,(jYn(),Vyt)),223),i=new Ww(n.b);i.a<i.c.c.length;)for(a=0,o=(c=D4(uG(N3(i),30).a)).length;a<o;++a)if((r=c[a]).k==(zIn(),gbt)){if(l==(_gn(),hxt))for(s=new Ww(r.j);s.a<s.c.c.length;)0==(u=uG(N3(s),12)).e.c.length||ekn(u),0==u.g.c.length||ikn(u);else if(F$(oIn(r,(GYn(),rmt)),18))w=uG(oIn(r,rmt),18),d=uG(yOn(r,(KQn(),_Rt)).Kc().Pb(),12),g=uG(yOn(r,kRt).Kc().Pb(),12),p=uG(oIn(d,rmt),12),c2(w,m=uG(oIn(g,rmt),12)),u2(w,p),(v=new eN(g.i.n)).a=Gfn(Uhn(cT(PNt,1),zZn,8,0,[m.i.n,m.n,m.a])).a,aq(w.a,v),(v=new eN(d.i.n)).a=Gfn(Uhn(cT(PNt,1),zZn,8,0,[p.i.n,p.n,p.a])).a,aq(w.a,v);else{if(r.j.c.length>=2){for(b=!0,e=uG(N3(h=new Ww(r.j)),12),f=null;h.a<h.c.c.length;)if(f=e,e=uG(N3(h),12),!udn(oIn(f,rmt),oIn(e,rmt))){b=!1;break}}else b=!1;for(s=new Ww(r.j);s.a<s.c.c.length;)0==(u=uG(N3(s),12)).e.c.length||YKn(u,b),0==u.g.c.length||ZKn(u,b)}a2(r,null)}t.Vg()}function dJn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;for(o=new Ww(n.a.b);o.a<o.c.c.length;)for(v=new Ww(uG(N3(o),30).a);v.a<v.c.c.length;)m=uG(N3(v),10),t.g[m.p]=m,t.a[m.p]=m,t.d[m.p]=0;for(u=n.a.b,t.c==(b0(),hSt)&&(u=Spn(u)),a=u.Kc();a.Ob();)for(b=-1,l=uG(a.Pb(),30).a,t.o==(w0(),dSt)&&(b=vZn,l=Spn(l)),y=l.Kc();y.Ob();)if(k=uG(y.Pb(),10),f=null,(f=t.c==hSt?uG(zq(n.b.f,k.p),15):uG(zq(n.b.b,k.p),15)).gc()>0)if(r=f.gc(),s=t0(e.Math.floor((r+1)/2))-1,c=t0(e.Math.ceil((r+1)/2))-1,t.o==dSt)for(h=c;h>=s;h--)t.a[k.p]==k&&(d=uG(f.Xb(h),42),w=uG(d.a,10),!cS(i,d.b)&&b>n.b.e[w.p]&&(t.a[w.p]=k,t.g[k.p]=t.g[w.p],t.a[k.p]=t.g[k.p],t.f[t.g[k.p].p]=(qx(),!!(oM(t.f[t.g[k.p].p])&k.k==(zIn(),wbt))),b=n.b.e[w.p]));else for(h=s;h<=c;h++)t.a[k.p]==k&&(p=uG(f.Xb(h),42),g=uG(p.a,10),!cS(i,p.b)&&b<n.b.e[g.p]&&(t.a[g.p]=k,t.g[k.p]=t.g[g.p],t.a[k.p]=t.g[k.p],t.f[t.g[k.p].p]=(qx(),!!(oM(t.f[t.g[k.p].p])&k.k==(zIn(),wbt))),b=n.b.e[g.p]))}function gJn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E;return k=n.c[(u3(0,t.c.length),uG(t.c[0],18)).p],j=n.c[(u3(1,t.c.length),uG(t.c[1],18)).p],!(k.a.e.e-k.a.a-(k.b.e.e-k.b.a)==0&&j.a.e.e-j.a.a-(j.b.e.e-j.b.a)==0||!F$(m=k.b.e.f,10)||(p=uG(m,10),M=n.i[p.p],T=p.c?Ten(p.c.a,p,0):-1,a=M0n,T>0&&(c=uG(zq(p.c.a,T-1),10),o=n.i[c.p],E=e.Math.ceil(y$(n.n,c,p)),a=M.a.e-p.d.d-(o.a.e+c.o.b+c.d.a)-E),h=M0n,T<p.c.a.c.length-1&&(s=uG(zq(p.c.a,T+1),10),f=n.i[s.p],E=e.Math.ceil(y$(n.n,s,p)),h=f.a.e-s.d.d-(M.a.e+p.o.b+p.d.a)-E),!(i&&(YN(),oan(I9n),e.Math.abs(a-h)<=I9n||a==h||isNaN(a)&&isNaN(h)))&&(r=yW(k.a),u=-yW(k.b),l=-yW(j.a),v=yW(j.b),g=k.a.e.e-k.a.a-(k.b.e.e-k.b.a)>0&&j.a.e.e-j.a.a-(j.b.e.e-j.b.a)<0,d=k.a.e.e-k.a.a-(k.b.e.e-k.b.a)<0&&j.a.e.e-j.a.a-(j.b.e.e-j.b.a)>0,w=k.a.e.e+k.b.a<j.b.e.e+j.a.a,b=k.a.e.e+k.b.a>j.b.e.e+j.a.a,y=0,!g&&!d&&(b?a+l>0?y=l:h-r>0&&(y=r):w&&(a+u>0?y=u:h-v>0&&(y=v))),M.a.e+=y,M.b&&(M.d.e+=y),1)))}function pJn(n,t,i){var r,c,a,o,u,s,h,f,l,b;if(r=new gY(t.Lf().a,t.Lf().b,t.Mf().a,t.Mf().b),c=new cN,n.c)for(o=new Ww(t.Rf());o.a<o.c.c.length;)a=uG(N3(o),187),c.c=a.Lf().a+t.Lf().a,c.d=a.Lf().b+t.Lf().b,c.b=a.Mf().a,c.a=a.Mf().b,bAn(r,c);for(h=new Ww(t.Xf());h.a<h.c.c.length;){if(f=(s=uG(N3(h),852)).Lf().a+t.Lf().a,l=s.Lf().b+t.Lf().b,n.e&&(c.c=f,c.d=l,c.b=s.Mf().a,c.a=s.Mf().b,bAn(r,c)),n.d)for(o=new Ww(s.Rf());o.a<o.c.c.length;)a=uG(N3(o),187),c.c=a.Lf().a+f,c.d=a.Lf().b+l,c.b=a.Mf().a,c.a=a.Mf().b,bAn(r,c);if(n.b){if(b=new MO(-i,-i),uG(t.of((XYn(),bDt)),181).Hc((eNn(),gRt)))for(o=new Ww(s.Rf());o.a<o.c.c.length;)a=uG(N3(o),187),b.a+=a.Mf().a+i,b.b+=a.Mf().b+i;b.a=e.Math.max(b.a,0),b.b=e.Math.max(b.b,0),eGn(r,s.Wf(),s.Uf(),t,s,b,i)}}n.b&&eGn(r,t.Wf(),t.Uf(),t,null,null,i),(u=new zU(t.Vf())).d=e.Math.max(0,t.Lf().b-r.d),u.a=e.Math.max(0,r.d+r.a-(t.Lf().b+t.Mf().b)),u.b=e.Math.max(0,t.Lf().a-r.c),u.c=e.Math.max(0,r.c+r.b-(t.Lf().a+t.Mf().a)),t.Zf(u)}function mJn(){var n=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F"];return n[34]='\\"',n[92]="\\\\",n[173]="\\u00ad",n[1536]="\\u0600",n[1537]="\\u0601",n[1538]="\\u0602",n[1539]="\\u0603",n[1757]="\\u06dd",n[1807]="\\u070f",n[6068]="\\u17b4",n[6069]="\\u17b5",n[8203]="\\u200b",n[8204]="\\u200c",n[8205]="\\u200d",n[8206]="\\u200e",n[8207]="\\u200f",n[8232]="\\u2028",n[8233]="\\u2029",n[8234]="\\u202a",n[8235]="\\u202b",n[8236]="\\u202c",n[8237]="\\u202d",n[8238]="\\u202e",n[8288]="\\u2060",n[8289]="\\u2061",n[8290]="\\u2062",n[8291]="\\u2063",n[8292]="\\u2064",n[8298]="\\u206a",n[8299]="\\u206b",n[8300]="\\u206c",n[8301]="\\u206d",n[8302]="\\u206e",n[8303]="\\u206f",n[65279]="\\ufeff",n[65529]="\\ufff9",n[65530]="\\ufffa",n[65531]="\\ufffb",n}function vJn(n){hP(n,new hCn(_T(xT(FT(DT(KT(RT(new bu,c4n),"ELK Force"),"Force-based algorithm provided by the Eclipse Layout Kernel. Implements methods that follow physical analogies by simulating forces that move the nodes into a balanced distribution. Currently the original Eades model and the Fruchterman - Reingold model are supported."),new mt),c4n),WX((rDn(),MFt),Uhn(cT(PFt,1),p1n,245,0,[kFt]))))),U4(n,c4n,a4n,xwn(1)),U4(n,c4n,o4n,80),U4(n,c4n,u4n,5),U4(n,c4n,R3n,r4n),U4(n,c4n,s4n,xwn(1)),U4(n,c4n,h4n,(qx(),!0)),U4(n,c4n,K3n,Aft),U4(n,c4n,f4n,Jkn(Mft)),U4(n,c4n,l4n,Jkn(Lft)),U4(n,c4n,b4n,!1),U4(n,c4n,w4n,Jkn(Ift)),U4(n,c4n,d4n,Jkn(Pft)),U4(n,c4n,g4n,Jkn(Cft)),U4(n,c4n,p4n,Jkn(Sft)),U4(n,c4n,m4n,Jkn(Eft)),U4(n,c4n,v4n,Jkn(Nft)),U4(n,c4n,J3n,Jkn(jft)),U4(n,c4n,n4n,Jkn(Bft)),U4(n,c4n,Y3n,Jkn(Tft)),U4(n,c4n,e4n,Jkn(xft)),U4(n,c4n,Z3n,Jkn(Rft)),U4(n,c4n,k4n,Jkn(Gft)),U4(n,c4n,y4n,Jkn(Xft)),U4(n,c4n,M4n,Jkn(Uft)),U4(n,c4n,T4n,Jkn(Hft)),U4(n,c4n,j4n,qft)}function kJn(n,t){var e,i,r,c,a,o,u,s,h,f,l;if(QYn(),0==oS(jHt)){for(f=Inn(QHt,zZn,122,SHt.length,0,1),a=0;a<f.length;a++)f[a]=new K3(4);for(i=new VM,c=0;c<THt.length;c++){if(h=new K3(4),c<84?(s3(o=2*c,rat.length),l=rat.charCodeAt(o),s3(o+1,rat.length),HFn(h,l,rat.charCodeAt(o+1))):HFn(h,PHt[o=2*(c-84)],PHt[o+1]),m_(u=THt[c],"Specials")&&HFn(h,65520,65533),m_(u,eat)&&(HFn(h,983040,1048573),HFn(h,1048576,1114109)),r2(jHt,u,h),r2(EHt,u,FGn(h)),0<(s=i.a.length)?i.a=r1(i.a,0,0):0>s&&(i.a+=V$(Inn(JHt,N1n,28,-s,15,1))),i.a+="Is",xL(u,$Cn(32))>=0)for(r=0;r<u.length;r++)s3(r,u.length),32!=u.charCodeAt(r)&&TQ(i,(s3(r,u.length),u.charCodeAt(r)));else i.a+=""+u;ivn(i.a,u,!0)}ivn(iat,"Cn",!1),ivn(cat,"Cn",!0),HFn(e=new K3(4),0,zct),r2(jHt,"ALL",e),r2(EHt,"ALL",FGn(e)),!zHt&&(zHt=new Ym),r2(zHt,iat,iat),!zHt&&(zHt=new Ym),r2(zHt,cat,cat),!zHt&&(zHt=new Ym),r2(zHt,"ALL","ALL")}return uG(U1(t?jHt:EHt,n),138)}function yJn(n){hP(n,new hCn(_T(xT(FT(DT(KT(RT(new bu,c7n),"ELK Mr. Tree"),"Tree-based algorithm provided by the Eclipse Layout Kernel. Computes a spanning tree of the input graph and arranges all nodes according to the resulting parent-children hierarchy. I pity the fool who doesn't use Mr. Tree Layout."),new Qa),a7n),ggn((rDn(),vFt))))),U4(n,c7n,K3n,mCt),U4(n,c7n,o4n,20),U4(n,c7n,$8n,3),U4(n,c7n,R3n,r4n),U4(n,c7n,a4n,xwn(1)),U4(n,c7n,h4n,(qx(),!0)),U4(n,c7n,q8n,Jkn(rCt)),U4(n,c7n,W8n,aCt),U4(n,c7n,f4n,Jkn(sCt)),U4(n,c7n,g9n,Jkn(hCt)),U4(n,c7n,p4n,Jkn(lCt)),U4(n,c7n,d4n,Jkn(bCt)),U4(n,c7n,x4n,Jkn(wCt)),U4(n,c7n,g4n,Jkn(dCt)),U4(n,c7n,m4n,Jkn(fCt)),U4(n,c7n,w4n,Jkn(gCt)),U4(n,c7n,v4n,Jkn(vCt)),U4(n,c7n,t7n,Jkn(LCt)),U4(n,c7n,i7n,Jkn(MCt)),U4(n,c7n,k4n,Jkn(CCt)),U4(n,c7n,y4n,Jkn(OCt)),U4(n,c7n,M4n,Jkn(PCt)),U4(n,c7n,T4n,Jkn(SCt)),U4(n,c7n,j4n,ICt),U4(n,c7n,n7n,Jkn(kCt)),U4(n,c7n,e7n,Jkn(uCt)),U4(n,c7n,Z9n,Jkn(ACt)),U4(n,c7n,J9n,Jkn(iCt)),U4(n,c7n,Y9n,Jkn(oCt))}function MJn(n,t){var e,i,r,c,a,o,u,s,h,f,l;for(s=uG(uG(Y9(n.r,t),21),87),a=DCn(n,t),e=n.u.Hc((eNn(),lRt)),u=s.Kc();u.Ob();)if((o=uG(u.Pb(),117)).c&&!(o.c.d.c.length<=0)){switch(l=o.b.Mf(),(f=(h=o.c).i).b=(c=h.n,h.e.a+c.b+c.c),f.a=(r=h.n,h.e.b+r.d+r.a),t.g){case 1:o.a?(f.c=(l.a-f.b)/2,etn(h,(Ktn(),Ost))):a||e?(f.c=-f.b-n.s,etn(h,(Ktn(),Lst))):(f.c=l.a+n.s,etn(h,(Ktn(),Ast))),f.d=-f.a-n.t,eF(h,(Yen(),Rst));break;case 3:o.a?(f.c=(l.a-f.b)/2,etn(h,(Ktn(),Ost))):a||e?(f.c=-f.b-n.s,etn(h,(Ktn(),Lst))):(f.c=l.a+n.s,etn(h,(Ktn(),Ast))),f.d=l.b+n.t,eF(h,(Yen(),Fst));break;case 2:o.a?(i=n.v?f.a:uG(zq(h.d,0),187).Mf().b,f.d=(l.b-i)/2,eF(h,(Yen(),Kst))):a||e?(f.d=-f.a-n.t,eF(h,(Yen(),Rst))):(f.d=l.b+n.t,eF(h,(Yen(),Fst))),f.c=l.a+n.s,etn(h,(Ktn(),Ast));break;case 4:o.a?(i=n.v?f.a:uG(zq(h.d,0),187).Mf().b,f.d=(l.b-i)/2,eF(h,(Yen(),Kst))):a||e?(f.d=-f.a-n.t,eF(h,(Yen(),Rst))):(f.d=l.b+n.t,eF(h,(Yen(),Fst))),f.c=-f.b-n.s,etn(h,(Ktn(),Lst))}a=!1}}function TJn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p;if(l=!1,f=!1,sN(uG(oIn(i,(jYn(),JMt)),101))){a=!1,o=!1;n:for(w=new Ww(i.j);w.a<w.c.c.length;)for(b=uG(N3(w),12),d=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[new zd(b),new Wd(b)])));hDn(d);)if(!oM(gK(oIn(uG(N9(d),12).i,gyt)))){if(b.j==(KQn(),yRt)){a=!0;break n}if(b.j==KRt){o=!0;break n}}l=o&&!a,f=a&&!o}if(l||f||0==i.b.c.length)p=!f;else{for(h=0,s=new Ww(i.b);s.a<s.c.c.length;)h+=(u=uG(N3(s),72)).n.b+u.o.b/2;p=(h/=i.b.c.length)>=i.o.b/2}p?(g=uG(oIn(i,(GYn(),Pmt)),15))?l?c=g:(r=uG(oIn(i,Ept),15))?c=g.gc()<=r.gc()?g:r:(c=new Zm,kfn(i,Ept,c)):(c=new Zm,kfn(i,Pmt,c)):(r=uG(oIn(i,(GYn(),Ept)),15))?f?c=r:(g=uG(oIn(i,Pmt),15))?c=r.gc()<=g.gc()?r:g:(c=new Zm,kfn(i,Pmt,c)):(c=new Zm,kfn(i,Ept,c)),c.Fc(n),kfn(n,(GYn(),Ppt),e),t.d==e?(u2(t,null),e.e.c.length+e.g.c.length==0&&o2(e,null),Nln(e)):(c2(t,null),e.e.c.length+e.g.c.length==0&&o2(e,null)),BY(t.a)}function jJn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A;for(i.Ug("MinWidth layering",1),w=t.b,j=t.a,A=uG(oIn(t,(jYn(),mMt)),17).a,u=uG(oIn(t,vMt),17).a,n.b=uM(pK(oIn(t,dTt))),n.d=M0n,y=new Ww(j);y.a<y.c.c.length;)(v=uG(N3(y),10)).k==(zIn(),dbt)&&(P=v.o.b,n.d=e.Math.min(n.d,P));for(n.d=e.Math.max(1,n.d),E=j.c.length,n.c=Inn(YHt,W1n,28,E,15,1),n.f=Inn(YHt,W1n,28,E,15,1),n.e=Inn(eUt,I0n,28,E,15,1),h=0,n.a=0,M=new Ww(j);M.a<M.c.c.length;)(v=uG(N3(M),10)).p=h++,n.c[v.p]=xbn(qgn(v)),n.f[v.p]=xbn(Xgn(v)),n.e[v.p]=v.o.b/n.d,n.a+=n.e[v.p];for(n.b/=n.d,n.a/=E,T=LNn(j),f$(j,kJ(new Ug(n))),g=M0n,d=vZn,o=null,O=A,I=A,a=u,c=u,A<0&&(O=uG($Et.a.Id(),17).a,I=uG($Et.b.Id(),17).a),u<0&&(a=uG(NEt.a.Id(),17).a,c=uG(NEt.b.Id(),17).a),C=O;C<=I;C++)for(r=a;r<=c;r++)m=uM(pK((S=Nqn(n,C,r,j,T)).a)),p=(b=uG(S.b,15)).gc(),(m<g||m==g&&p<d)&&(g=m,d=p,o=b);for(l=o.Kc();l.Ob();){for(f=uG(l.Pb(),15),s=new bQ(t),k=f.Kc();k.Ob();)a2(v=uG(k.Pb(),10),s);mv(w.c,s)}_An(w),j.c.length=0,i.Vg()}function EJn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C;if(i.Ug("Spline edge routing",1),0==t.b.c.length)return t.f.a=0,void i.Vg();m=uM(pK(oIn(t,(jYn(),STt)))),u=uM(pK(oIn(t,vTt))),o=uM(pK(oIn(t,gTt))),j=uG(oIn(t,Zyt),350)==(kbn(),fEt),T=uM(pK(oIn(t,nMt))),n.d=t,n.j.c.length=0,n.a.c.length=0,$V(n.k),f=UA((s=uG(zq(t.b,0),30)).a,(oFn(),LSt)),l=UA((d=uG(zq(t.b,t.b.c.length-1),30)).a,LSt),g=new Ww(t.b),p=null,C=0;do{for(qQn(n,p,v=g.a<g.c.c.length?uG(N3(g),30):null),AGn(n),P=0,k=C,b=!p||f&&p==s,w=!v||l&&v==d,(E=lT(yun(nY(JJ(new fX(null,new h3(n.i,16)),new va),new ka))))>0?(h=0,p&&(h+=u),h+=(E-1)*o,v&&(h+=u),j&&v&&(h=e.Math.max(h,GKn(v,o,m,T))),h<m&&!b&&!w&&(P=(m-h)/2,h=m),k+=h):!b&&!w&&(k+=m),v&&Vzn(v,k),M=new Ww(n.i);M.a<M.c.c.length;)(y=uG(N3(M),131)).a.c=C,y.a.b=k-C,y.F=P,y.p=!p;Ohn(n.a,n.i),C=k,v&&(C+=v.c.a),p=v,b=w}while(v);for(c=new Ww(n.j);c.a<c.c.c.length;)a=Oon(n,r=uG(N3(c),18)),kfn(r,(GYn(),ymt),a),S=rFn(n,r),kfn(r,Tmt,S);t.f.a=C,n.d=null,i.Vg()}function SJn(n,t){var i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E;for(n.b=t,n.a=uG(oIn(t,(jYn(),cMt)),17).a,n.c=uG(oIn(t,oMt),17).a,0==n.c&&(n.c=vZn),g=new N4(t.b,0);g.b<g.d.gc();){for(MK(g.b<g.d.gc()),d=uG(g.d.Xb(g.c=g.b++),30),u=new Zm,l=-1,k=-1,v=new Ww(d.a);v.a<v.c.c.length;)m=uG(N3(v),10),x5((HB(),new Fz(ix(Ggn(m).a.Kc(),new h))))>=n.a&&(r=Rqn(n,m),l=e.Math.max(l,r.b),k=e.Math.max(k,r.d),kD(u,new WO(m,r)));for(T=new Zm,f=0;f<l;++f)GX(T,0,(MK(g.b>0),g.a.Xb(g.c=--g.b),pF(g,j=new bQ(n.b)),MK(g.b<g.d.gc()),g.d.Xb(g.c=g.b++),j));for(o=new Ww(u);o.a<o.c.c.length;)if(c=uG(N3(o),42),w=uG(c.b,580).a)for(b=new Ww(w);b.a<b.c.c.length;)Gjn(n,uG(N3(b),10),Nbt,T);for(i=new Zm,s=0;s<k;++s)kD(i,(pF(g,E=new bQ(n.b)),E));for(a=new Ww(u);a.a<a.c.c.length;)if(c=uG(N3(a),42),M=uG(c.b,580).c)for(y=new Ww(M);y.a<y.c.c.length;)Gjn(n,uG(N3(y),10),$bt,i)}for(p=new N4(t.b,0);p.b<p.d.gc();)MK(p.b<p.d.gc()),0==uG(p.d.Xb(p.c=p.b++),30).a.c.length&&LQ(p)}function PJn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;if(d=0!=n.i,m=!1,g=null,uN(n.e)){if((h=t.gc())>0){for(l=h<100?null:new cj(h),w=(s=new Hun(t)).g,g=Inn(YHt,W1n,28,h,15,1),i=0,v=new Drn(h),r=0;r<n.i;++r){b=o=n.g[r];n:for(p=0;p<2;++p){for(u=h;--u>=0;)if(null!=b?udn(b,w[u]):xA(b)===xA(w[u])){g.length<=i&&qGn(g,0,g=Inn(YHt,W1n,28,2*g.length,15,1),0,i),g[i++]=r,ttn(v,w[u]);break n}if(xA(b)===xA(o))break}}if(s=v,w=v.g,h=i,i>g.length&&qGn(g,0,g=Inn(YHt,W1n,28,i,15,1),0,i),i>0){for(m=!0,c=0;c<i;++c)l=V_(n,uG(b=w[c],76),l);for(a=i;--a>=0;)gjn(n,g[a]);if(i!=h){for(r=h;--r>=i;)gjn(s,r);qGn(g,0,g=Inn(YHt,W1n,28,i,15,1),0,i)}t=s}}}else for(t=cjn(n,t),r=n.i;--r>=0;)t.Hc(n.g[r])&&(gjn(n,r),m=!0);if(m){if(null!=g){for(f=1==(e=t.gc())?i2(n,4,t.Kc().Pb(),null,g[0],d):i2(n,6,t,g,g[0],d),l=e<100?null:new cj(e),r=t.Kc();r.Ob();)l=X_(n,uG(b=r.Pb(),76),l);l?(l.nj(f),l.oj()):Msn(n.e,f)}else{for(l=qF(t.gc()),r=t.Kc();r.Ob();)l=X_(n,uG(b=r.Pb(),76),l);l&&l.oj()}return!0}return!1}function CJn(n,t){var e,i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v;for((e=new qyn(t)).a||TUn(t),s=oBn(t),u=new K1,g=new BFn,d=new Ww(t.a);d.a<d.c.c.length;)for(r=new Fz(ix(Xgn(uG(N3(d),10)).a.Kc(),new h));hDn(r);)(i=uG(N9(r),18)).c.i.k!=(zIn(),lbt)&&i.d.i.k!=lbt||UNn(u,Dkn((f=LWn(n,i,s,g)).d),f.a);for(a=new Zm,v=uG(oIn(e.c,(GYn(),xpt)),21).Kc();v.Ob();){switch(m=uG(v.Pb(),64),w=g.c[m.g],b=g.b[m.g],o=g.a[m.g],c=null,p=null,m.g){case 4:c=new gY(n.d.a,w,s.b.a-n.d.a,b-w),p=new gY(n.d.a,w,o,b-w),hq(s,new MO(c.c+c.b,c.d)),hq(s,new MO(c.c+c.b,c.d+c.a));break;case 2:c=new gY(s.a.a,w,n.c.a-s.a.a,b-w),p=new gY(n.c.a-o,w,o,b-w),hq(s,new MO(c.c,c.d)),hq(s,new MO(c.c,c.d+c.a));break;case 1:c=new gY(w,n.d.b,b-w,s.b.b-n.d.b),p=new gY(w,n.d.b,b-w,o),hq(s,new MO(c.c,c.d+c.a)),hq(s,new MO(c.c+c.b,c.d+c.a));break;case 3:c=new gY(w,s.a.b,b-w,n.c.b-s.a.b),p=new gY(w,n.c.b-o,b-w,o),hq(s,new MO(c.c,c.d)),hq(s,new MO(c.c+c.b,c.d))}c&&((l=new vk).d=m,l.b=c,l.c=p,l.a=PZ(uG(Y9(u,Dkn(m)),21)),mv(a.c,l))}return Ohn(e.b,a),e.d=Bbn(bVn(s)),e}function IJn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d;if(null==i.p[t.p]){u=!0,i.p[t.p]=0,o=t,d=i.o==(w0(),wSt)?T0n:M0n;do{c=n.b.e[o.p],a=o.c.a.c.length,i.o==wSt&&c>0||i.o==dSt&&c<a-1?(s=null,h=null,s=i.o==dSt?uG(zq(o.c.a,c+1),10):uG(zq(o.c.a,c-1),10),IJn(n,h=i.g[s.p],i),d=n.e.wg(d,t,o),i.j[t.p]==t&&(i.j[t.p]=i.j[h.p]),i.j[t.p]==i.j[h.p]?(w=y$(n.d,o,s),i.o==dSt?(r=uM(i.p[t.p]),l=uM(i.p[h.p])+uM(i.d[s.p])-s.d.d-w-o.d.a-o.o.b-uM(i.d[o.p]),u?(u=!1,i.p[t.p]=e.Math.min(l,d)):i.p[t.p]=e.Math.min(r,e.Math.min(l,d))):(r=uM(i.p[t.p]),l=uM(i.p[h.p])+uM(i.d[s.p])+s.o.b+s.d.a+w+o.d.d-uM(i.d[o.p]),u?(u=!1,i.p[t.p]=e.Math.max(l,d)):i.p[t.p]=e.Math.max(r,e.Math.max(l,d)))):(w=uM(pK(oIn(n.a,(jYn(),ETt)))),b=Ion(n,i.j[t.p]),f=Ion(n,i.j[h.p]),i.o==dSt?r3(b,f,uM(i.p[t.p])+uM(i.d[o.p])+o.o.b+o.d.a+w-(uM(i.p[h.p])+uM(i.d[s.p])-s.d.d)):r3(b,f,uM(i.p[t.p])+uM(i.d[o.p])-o.d.d-uM(i.p[h.p])-uM(i.d[s.p])-s.o.b-s.d.a-w))):d=n.e.wg(d,t,o),o=i.a[o.p]}while(o!=t);Wv(n.e,t)}}function OJn(n){var t,e,i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k,y,M,T;if((e=uM(pK(oIn(n.a.j,(jYn(),Lyt)))))<-1||!n.a.i||L_(uG(oIn(n.a.o,JMt),101))||Dgn(n.a.o,(KQn(),kRt)).gc()<2&&Dgn(n.a.o,_Rt).gc()<2)return!0;if(n.a.c.kg())return!1;for(k=0,v=0,m=new Zm,u=0,s=(o=n.a.e).length;u<s;++u){for(b=0,d=(l=o[u]).length;b<d;++b)if((f=l[b]).k!=(zIn(),gbt)){for(i=n.b[f.c.p][f.p],f.k==lbt?(i.b=1,uG(oIn(f,(GYn(),rmt)),12).j==(KQn(),kRt)&&(v+=i.a)):(T=Dgn(f,(KQn(),_Rt))).dc()||!_$(T,new Lc)?i.c=1:((r=Dgn(f,kRt)).dc()||!_$(r,new Ac))&&(k+=i.a),a=new Fz(ix(Xgn(f).a.Kc(),new h));hDn(a);)c=uG(N9(a),18),k+=i.c,v+=i.b,rtn(n,i,c.d.i);for(M=new Fz(new YD((g=zcn(Uhn(cT(vat,1),EZn,20,0,[Dgn(f,(KQn(),yRt)),Dgn(f,KRt)]))).a.length,g.a));hDn(M);)y=uG(N9(M),12),(p=uG(oIn(y,(GYn(),lmt)),10))&&(k+=i.c,v+=i.b,rtn(n,i,p))}else mv(m.c,f);for(w=new Ww(m);w.a<w.c.c.length;)for(f=uG(N3(w),10),i=n.b[f.c.p][f.p],a=new Fz(ix(Xgn(f).a.Kc(),new h));hDn(a);)c=uG(N9(a),18),k+=i.c,v+=i.b,rtn(n,i,c.d.i);m.c.length=0}return(0==(t=k+v)?M0n:(k-v)/t)>=e}function AJn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;for(f=t,h=new K1,l=new K1,c=p6(f,yet),IOn((i=new SY(n,e,h,l)).a,i.b,i.c,i.d,c),d=(h.i||(h.i=new RD(h,h.c))).Kc();d.Ob();)for(w=uG(d.Pb(),166),o=uG(Y9(h,w),21).Kc();o.Ob();){if(a=o.Pb(),!(b=uG(dcn(n.d,a),166)))throw r=k6(f,Iet),hv(new SM(Det+a+xet+r+$et));!w.e&&(w.e=new f_(oFt,w,10,9)),ttn(w.e,b)}for(p=(l.i||(l.i=new RD(l,l.c))).Kc();p.Ob();)for(g=uG(p.Pb(),166),s=uG(Y9(l,g),21).Kc();s.Ob();){if(u=s.Pb(),!(b=uG(dcn(n.d,u),166)))throw r=k6(f,Iet),hv(new SM(Det+u+xet+r+$et));!g.g&&(g.g=new f_(oFt,g,9,10)),ttn(g.g,b)}!e.b&&(e.b=new f_(cFt,e,4,7)),0!=e.b.i&&(!e.c&&(e.c=new f_(cFt,e,5,8)),0!=e.c.i)&&(!e.b&&(e.b=new f_(cFt,e,4,7)),e.b.i<=1&&(!e.c&&(e.c=new f_(cFt,e,5,8)),e.c.i<=1))&&1==(!e.a&&(e.a=new fV(oFt,e,6,6)),e.a).i&&(hMn(m=uG(zrn((!e.a&&(e.a=new fV(oFt,e,6,6)),e.a),0),166))||fMn(m)||(Xan(m,uG(zrn((!e.b&&(e.b=new f_(cFt,e,4,7)),e.b),0),84)),zan(m,uG(zrn((!e.c&&(e.c=new f_(cFt,e,5,8)),e.c),0),84))))}function LJn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S;for(k=0,y=(v=n.a).length;k<y;++k){for(m=v[k],s=vZn,h=vZn,w=new Ww(m.e);w.a<w.c.c.length;)(a=(l=uG(N3(w),10)).c?Ten(l.c.a,l,0):-1)>0?(f=uG(zq(l.c.a,a-1),10),j=y$(n.b,l,f),g=l.n.b-l.d.d-(f.n.b+f.o.b+f.d.a+j)):g=l.n.b-l.d.d,s=e.Math.min(g,s),a<l.c.a.c.length-1?(f=uG(zq(l.c.a,a+1),10),j=y$(n.b,l,f),p=f.n.b-f.d.d-(l.n.b+l.o.b+l.d.a+j)):p=2*l.n.b,h=e.Math.min(p,h);for(u=vZn,c=!1,S=new Ww((r=uG(zq(m.e,0),10)).j);S.a<S.c.c.length;)for(E=uG(N3(S),12),d=r.n.b+E.n.b+E.a.b,i=new Ww(E.e);i.a<i.c.c.length;)t=(M=uG(N3(i),18).c).i.n.b+M.n.b+M.a.b-d,e.Math.abs(t)<e.Math.abs(u)&&e.Math.abs(t)<(t<0?s:h)&&(u=t,c=!0);for(T=new Ww((o=uG(zq(m.e,m.e.c.length-1),10)).j);T.a<T.c.c.length;)for(M=uG(N3(T),12),d=o.n.b+M.n.b+M.a.b,i=new Ww(M.g);i.a<i.c.c.length;)t=(E=uG(N3(i),18).d).i.n.b+E.n.b+E.a.b-d,e.Math.abs(t)<e.Math.abs(u)&&e.Math.abs(t)<(t<0?s:h)&&(u=t,c=!0);if(c&&0!=u)for(b=new Ww(m.e);b.a<b.c.c.length;)(l=uG(N3(b),10)).n.b+=u}}function NJn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g;if(r=new Zm,c=vZn,a=vZn,o=vZn,i)for(c=n.f.a,d=new Ww(t.j);d.a<d.c.c.length;)for(s=new Ww(uG(N3(d),12).g);s.a<s.c.c.length;)0!=(u=uG(N3(s),18)).a.b&&((f=uG(gR(u.a),8)).a<c&&(a=c-f.a,o=vZn,r.c.length=0,c=f.a),f.a<=c&&(mv(r.c,u),u.a.b>1&&(o=e.Math.min(o,e.Math.abs(uG(hyn(u.a,1),8).b-f.b)))));else for(d=new Ww(t.j);d.a<d.c.c.length;)for(s=new Ww(uG(N3(d),12).e);s.a<s.c.c.length;)0!=(u=uG(N3(s),18)).a.b&&((b=uG(pR(u.a),8)).a>c&&(a=b.a-c,o=vZn,r.c.length=0,c=b.a),b.a>=c&&(mv(r.c,u),u.a.b>1&&(o=e.Math.min(o,e.Math.abs(uG(hyn(u.a,u.a.b-2),8).b-b.b)))));if(0!=r.c.length&&a>t.o.a/2&&o>t.o.b/2){for(o2(w=new lOn,t),NLn(w,(KQn(),yRt)),w.n.a=t.o.a/2,o2(g=new lOn,t),NLn(g,KRt),g.n.a=t.o.a/2,g.n.b=t.o.b,s=new Ww(r);s.a<s.c.c.length;)u=uG(N3(s),18),i?(h=uG(tG(u.a),8),(0==u.a.b?n3(u.d):uG(gR(u.a),8)).b>=h.b?c2(u,g):c2(u,w)):(h=uG(eG(u.a),8),(0==u.a.b?n3(u.c):uG(pR(u.a),8)).b>=h.b?u2(u,g):u2(u,w)),(l=uG(oIn(u,(jYn(),bMt)),75))&&Wpn(l,h,!0);t.n.a=c-t.o.a/2}}function $Jn(n,t,i){var r,c,a,o,u,s,h,f,l;for(u=Fkn(n.b,0);u.b!=u.d.c;)if(!m_((o=uG(I6(u),40)).c,H9n))for(h=xDn(o,n),t==(xdn(),JDt)||t==YDt?f$(h,new co):f$(h,new ao),s=h.c.length,r=0;r<s;r++)m_((u3(r,h.c.length),uG(h.c[r],65)).c.c,"n11"),oM(gK(oIn(o,(OQn(),MPt))))&&!uln((u3(r,h.c.length),uG(h.c[r],65)),n)||(c=1==s?.5:(r+1)/(s+1),t==JDt?(a=uM(pK(oIn(o,DPt))),l=o.e.b+o.f.b*c,aL((u3(r,h.c.length),uG(h.c[r],65)).a,new MO(e.Math.min(a,o.e.a-i),l)),aL((u3(r,h.c.length),uG(h.c[r],65)).a,new MO(o.e.a,l))):t==YDt?(a=uM(pK(oIn(o,$Pt)))+i,l=o.e.b+o.f.b*c,aL((u3(r,h.c.length),uG(h.c[r],65)).a,new MO(a,l)),aL((u3(r,h.c.length),uG(h.c[r],65)).a,new MO(o.e.a+o.f.a,l))):t==nxt?(a=uM(pK(oIn(o,DPt))),f=o.e.a+o.f.a*c,aL((u3(r,h.c.length),uG(h.c[r],65)).a,new MO(f,e.Math.min(o.e.b-i,a))),aL((u3(r,h.c.length),uG(h.c[r],65)).a,new MO(f,o.e.b))):(a=uM(pK(oIn(o,$Pt)))+i,f=o.e.a+o.f.a*c,aL((u3(r,h.c.length),uG(h.c[r],65)).a,new MO(f,a)),aL((u3(r,h.c.length),uG(h.c[r],65)).a,new MO(f,o.e.b+o.f.b))))}function DJn(n,t,e,i,r,c,a,o,u){var s,h,f,l,b,w,d;switch(b=e,Hb(h=new gMn(u),(zIn(),lbt)),kfn(h,(GYn(),_pt),a),kfn(h,(jYn(),JMt),($Pn(),cRt)),d=uM(pK(n.of(QMt))),kfn(h,QMt,d),o2(f=new lOn,h),t!=uRt&&t!=sRt||(b=i>=0?Ipn(o):Gdn(Ipn(o)),n.qf(eTt,b)),s=new sj,l=!1,n.pf(WMt)?(_R(s,uG(n.of(WMt),8)),l=!0):mD(s,a.a/2,a.b/2),b.g){case 4:kfn(h,gMt,(Gpn(),Imt)),kfn(h,Npt,(Pfn(),ygt)),h.o.b=a.b,d<0&&(h.o.a=-d),NLn(f,(KQn(),kRt)),l||(s.a=a.a),s.a-=a.a;break;case 2:kfn(h,gMt,(Gpn(),Amt)),kfn(h,Npt,(Pfn(),vgt)),h.o.b=a.b,d<0&&(h.o.a=-d),NLn(f,(KQn(),_Rt)),l||(s.a=0);break;case 1:kfn(h,Xpt,(Zen(),ppt)),h.o.a=a.a,d<0&&(h.o.b=-d),NLn(f,(KQn(),KRt)),l||(s.b=a.b),s.b-=a.b;break;case 3:kfn(h,Xpt,(Zen(),dpt)),h.o.a=a.a,d<0&&(h.o.b=-d),NLn(f,(KQn(),yRt)),l||(s.b=0)}if(_R(f.n,s),kfn(h,WMt,s),t==rRt||t==aRt||t==cRt){if(w=0,t==rRt&&n.pf(YMt))switch(b.g){case 1:case 2:w=uG(n.of(YMt),17).a;break;case 3:case 4:w=-uG(n.of(YMt),17).a}else switch(b.g){case 4:case 2:w=c.b,t==aRt&&(w/=r.b);break;case 1:case 3:w=c.a,t==aRt&&(w/=r.a)}kfn(h,bmt,w)}return kfn(h,Fpt,b),h}function xJn(){function n(n){var t=this;this.dispatch=function(t){var e=t.data;switch(e.cmd){case"algorithms":var i=rmn((hZ(),new qw(new Fw(NFt.b))));n.postMessage({id:e.id,data:i});break;case"categories":var r=rmn((hZ(),new qw(new Fw(NFt.c))));n.postMessage({id:e.id,data:r});break;case"options":var c=rmn((hZ(),new qw(new Fw(NFt.d))));n.postMessage({id:e.id,data:c});break;case"register":OVn(e.algorithms),n.postMessage({id:e.id});break;case"layout":Vqn(e.graph,e.layoutOptions||{},e.options||{}),n.postMessage({id:e.id,data:e.graph})}},this.saveDispatch=function(e){try{t.dispatch(e)}catch(i){n.postMessage({id:e.data.id,error:i})}}}function e(t){var e=this;this.dispatcher=new n({postMessage:function(n){e.onmessage({data:n})}}),this.postMessage=function(n){setTimeout((function(){e.dispatcher.saveDispatch({data:n})}),0)}}if(mj(),typeof document===r2n&&typeof self!==r2n){var r=new n(self);self.onmessage=r.saveDispatch}else typeof t!==r2n&&t.exports&&(Object.defineProperty(i,"__esModule",{value:!0}),t.exports={default:e,Worker:e})}function RJn(n,t,e){var i,r,c,a,o,u,s,h,f,l;for(zsn(h=new gMn(e),t),kfn(h,(GYn(),rmt),t),h.o.a=t.g,h.o.b=t.f,h.n.a=t.i,h.n.b=t.j,kD(e.a,h),vJ(n.a,t,h),(0!=(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a).i||oM(gK(zDn(t,(jYn(),sMt)))))&&kfn(h,Cpt,(qx(),!0)),s=uG(oIn(e,Hpt),21),(f=uG(oIn(h,(jYn(),JMt)),101))==($Pn(),sRt)?kfn(h,JMt,uRt):f!=uRt&&s.Fc((r_n(),rpt)),l=0,i=uG(oIn(e,Byt),88),u=new DD((!t.c&&(t.c=new fV(wFt,t,9,9)),t.c));u.e!=u.i.gc();)o=uG(Zkn(u),123),(xA(zDn(r=R0(t),Syt))!==xA((yvn(),Fjt))||xA(zDn(r,Fyt))===xA((kvn(),lgt))||xA(zDn(r,Fyt))===xA((kvn(),hgt))||oM(gK(zDn(r,Cyt)))||xA(zDn(r,kyt))!==xA((Uvn(),tbt))||xA(zDn(r,yMt))===xA((THn(),Pjt))||xA(zDn(r,yMt))===xA((THn(),Cjt))||xA(zDn(r,MMt))===xA((MKn(),JTt))||xA(zDn(r,MMt))===xA((MKn(),ZTt)))&&!oM(gK(zDn(t,jyt)))&&Myn(o,imt,xwn(l++)),oM(gK(zDn(o,FMt)))||mQn(n,o,h,s,i,f);for(a=new DD((!t.n&&(t.n=new fV(lFt,t,1,7)),t.n));a.e!=a.i.gc();)!oM(gK(zDn(c=uG(Zkn(a),135),FMt)))&&c.a&&kD(h.b,own(c));return oM(gK(oIn(h,gyt)))&&s.Fc((r_n(),Zgt)),oM(gK(oIn(h,uMt)))&&(s.Fc((r_n(),ipt)),s.Fc(ept),kfn(h,JMt,uRt)),h}function KJn(n,t,i,r,c,a,o){var u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A;for(g=0,P=0,h=new Ww(n.b);h.a<h.c.c.length;)(s=uG(N3(h),163)).c&&IWn(s.c),g=e.Math.max(g,EX(s)),P+=EX(s)*jX(s);for(p=P/n.b.c.length,S=WEn(n.b,p),P+=n.b.c.length*S,g=e.Math.max(g,e.Math.sqrt(P*o))+i.b,O=i.b,A=i.d,w=0,l=i.b+i.c,aq(E=new lS,xwn(0)),T=new lS,f=new N4(n.b,0),d=null,u=new Zm;f.b<f.d.gc();)MK(f.b<f.d.gc()),I=EX(s=uG(f.d.Xb(f.c=f.b++),163)),b=jX(s),O+I>g&&(a&&(cL(T,w),cL(E,xwn(f.b-1)),kD(n.d,d),u.c.length=0),O=i.b,A+=w+t,w=0,l=e.Math.max(l,i.b+i.c+I)),mv(u.c,s),uyn(s,O,A),l=e.Math.max(l,O+I+i.c),w=e.Math.max(w,b),O+=I+t,d=s;if(Ohn(n.a,u),kD(n.d,uG(zq(u,u.c.length-1),163)),l=e.Math.max(l,r),(C=A+w+i.a)<c&&(w+=c-C,C=c),a)for(O=i.b,f=new N4(n.b,0),cL(E,xwn(n.b.c.length)),v=uG(I6(j=Fkn(E,0)),17).a,cL(T,w),M=Fkn(T,0),y=0;f.b<f.d.gc();)f.b==v&&(O=i.b,y=uM(pK(I6(M))),v=uG(I6(j),17).a),MK(f.b<f.d.gc()),gvn(s=uG(f.d.Xb(f.c=f.b++),163),y),f.b==v&&(m=l-O-i.c,k=EX(s),pvn(s,m),bgn(s,(m-k)/2,0)),O+=EX(s)+t;return new MO(l,C)}function FJn(n){n.N||(n.N=!0,n.b=Nsn(n,0),Von(n.b,0),Von(n.b,1),Von(n.b,2),n.bb=Nsn(n,1),Von(n.bb,0),Von(n.bb,1),n.fb=Nsn(n,2),Von(n.fb,3),Von(n.fb,4),Won(n.fb,5),n.qb=Nsn(n,3),Von(n.qb,0),Won(n.qb,1),Won(n.qb,2),Von(n.qb,3),Von(n.qb,4),Won(n.qb,5),Von(n.qb,6),n.a=$sn(n,4),n.c=$sn(n,5),n.d=$sn(n,6),n.e=$sn(n,7),n.f=$sn(n,8),n.g=$sn(n,9),n.i=$sn(n,10),n.j=$sn(n,11),n.k=$sn(n,12),n.n=$sn(n,13),n.o=$sn(n,14),n.p=$sn(n,15),n.q=$sn(n,16),n.s=$sn(n,17),n.r=$sn(n,18),n.t=$sn(n,19),n.u=$sn(n,20),n.v=$sn(n,21),n.w=$sn(n,22),n.B=$sn(n,23),n.A=$sn(n,24),n.C=$sn(n,25),n.D=$sn(n,26),n.F=$sn(n,27),n.G=$sn(n,28),n.H=$sn(n,29),n.J=$sn(n,30),n.I=$sn(n,31),n.K=$sn(n,32),n.M=$sn(n,33),n.L=$sn(n,34),n.P=$sn(n,35),n.Q=$sn(n,36),n.R=$sn(n,37),n.S=$sn(n,38),n.T=$sn(n,39),n.U=$sn(n,40),n.V=$sn(n,41),n.X=$sn(n,42),n.W=$sn(n,43),n.Y=$sn(n,44),n.Z=$sn(n,45),n.$=$sn(n,46),n._=$sn(n,47),n.ab=$sn(n,48),n.cb=$sn(n,49),n.db=$sn(n,50),n.eb=$sn(n,51),n.gb=$sn(n,52),n.hb=$sn(n,53),n.ib=$sn(n,54),n.jb=$sn(n,55),n.kb=$sn(n,56),n.lb=$sn(n,57),n.mb=$sn(n,58),n.nb=$sn(n,59),n.ob=$sn(n,60),n.pb=$sn(n,61))}function _Jn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;if(v=0,0==t.f.a)for(p=new Ww(n);p.a<p.c.c.length;)d=uG(N3(p),10),v=e.Math.max(v,d.n.a+d.o.a+d.d.c);else v=t.f.a-t.c.a;for(v-=t.c.a,g=new Ww(n);g.a<g.c.c.length;){switch(pv((d=uG(N3(g),10)).n,v-d.o.a),NG(d.f),$Tn(d),(d.q?d.q:(hZ(),hZ(),Vot))._b((jYn(),rTt))&&pv(uG(oIn(d,rTt),8),v-d.o.a),uG(oIn(d,byt),255).g){case 1:kfn(d,byt,(nMn(),LNt));break;case 2:kfn(d,byt,(nMn(),ANt))}for(m=d.o,y=new Ww(d.j);y.a<y.c.c.length;){for(pv((k=uG(N3(y),12)).n,m.a-k.o.a),pv(k.a,k.o.a),NLn(k,jun(k.j)),(o=uG(oIn(k,YMt),17))&&kfn(k,YMt,xwn(-o.a)),a=new Ww(k.g);a.a<a.c.c.length;){for(r=Fkn((c=uG(N3(a),18)).a,0);r.b!=r.d.c;)(i=uG(I6(r),8)).a=v-i.a;if(h=uG(oIn(c,bMt),75))for(s=Fkn(h,0);s.b!=s.d.c;)(u=uG(I6(s),8)).a=v-u.a;for(b=new Ww(c.b);b.a<b.c.c.length;)pv((f=uG(N3(b),72)).n,v-f.o.a)}for(w=new Ww(k.f);w.a<w.c.c.length;)pv((f=uG(N3(w),72)).n,k.o.a-f.o.a)}for(d.k==(zIn(),lbt)&&(kfn(d,(GYn(),Fpt),jun(uG(oIn(d,Fpt),64))),DIn(d)),l=new Ww(d.b);l.a<l.c.c.length;)$Tn(f=uG(N3(l),72)),pv(f.n,m.a-f.o.a)}}function BJn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;if(v=0,0==t.f.b)for(p=new Ww(n);p.a<p.c.c.length;)d=uG(N3(p),10),v=e.Math.max(v,d.n.b+d.o.b+d.d.a);else v=t.f.b-t.c.b;for(v-=t.c.b,g=new Ww(n);g.a<g.c.c.length;){switch(gv((d=uG(N3(g),10)).n,v-d.o.b),$G(d.f),DTn(d),(d.q?d.q:(hZ(),hZ(),Vot))._b((jYn(),rTt))&&gv(uG(oIn(d,rTt),8),v-d.o.b),uG(oIn(d,byt),255).g){case 3:kfn(d,byt,(nMn(),INt));break;case 4:kfn(d,byt,(nMn(),NNt))}for(m=d.o,y=new Ww(d.j);y.a<y.c.c.length;){for(gv((k=uG(N3(y),12)).n,m.b-k.o.b),gv(k.a,k.o.b),NLn(k,Eun(k.j)),(o=uG(oIn(k,YMt),17))&&kfn(k,YMt,xwn(-o.a)),a=new Ww(k.g);a.a<a.c.c.length;){for(r=Fkn((c=uG(N3(a),18)).a,0);r.b!=r.d.c;)(i=uG(I6(r),8)).b=v-i.b;if(h=uG(oIn(c,bMt),75))for(s=Fkn(h,0);s.b!=s.d.c;)(u=uG(I6(s),8)).b=v-u.b;for(b=new Ww(c.b);b.a<b.c.c.length;)gv((f=uG(N3(b),72)).n,v-f.o.b)}for(w=new Ww(k.f);w.a<w.c.c.length;)gv((f=uG(N3(w),72)).n,k.o.b-f.o.b)}for(d.k==(zIn(),lbt)&&(kfn(d,(GYn(),Fpt),Eun(uG(oIn(d,Fpt),64))),Fdn(d)),l=new Ww(d.b);l.a<l.c.c.length;)DTn(f=uG(N3(l),72)),gv(f.n,m.b-f.o.b)}}function HJn(n,t){var e,i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I;for(m=new N4(n.b,0),d=0,s=uG((f=t.Kc()).Pb(),17).a,y=0,e=new ek,T=new XL;m.b<m.d.gc();){for(MK(m.b<m.d.gc()),k=new Ww(uG(m.d.Xb(m.c=m.b++),30).a);k.a<k.c.c.length;){for(w=new Fz(ix(Xgn(v=uG(N3(k),10)).a.Kc(),new h));hDn(w);)l=uG(N9(w),18),T.a.zc(l,T);for(b=new Fz(ix(qgn(v).a.Kc(),new h));hDn(b);)l=uG(N9(b),18),T.a.Bc(l)}if(d+1==s){for(pF(m,r=new bQ(n)),pF(m,c=new bQ(n)),E=T.a.ec().Kc();E.Ob();)j=uG(E.Pb(),18),e.a._b(j)||(++y,e.a.zc(j,e)),kfn(a=new gMn(n),(jYn(),JMt),($Pn(),oRt)),a2(a,r),Hb(a,(zIn(),fbt)),o2(g=new lOn,a),NLn(g,(KQn(),_Rt)),o2(S=new lOn,a),NLn(S,kRt),kfn(i=new gMn(n),JMt,oRt),a2(i,c),Hb(i,fbt),o2(p=new lOn,i),NLn(p,_Rt),o2(P=new lOn,i),NLn(P,kRt),c2(M=new UZ,j.c),u2(M,g),kfn(M,(GYn(),imt),uG(oIn(j,imt),17)),c2(I=new UZ,S),u2(I,p),kfn(I,imt,uG(oIn(j,imt),17)),c2(j,P),o=new O5(a,i,M,I,j),kfn(a,Spt,o),kfn(i,Spt,o),(C=M.c.i).k==fbt&&((u=uG(oIn(C,Spt),313)).d=o,o.g=u);if(!f.Ob())break;s=uG(f.Pb(),17).a}++d}return xwn(y)}function UJn(n){var t,e,i,r,c,a,o,u,s,f,l,b,w,d,g;for(d=new Zm,l=new Ww(n.d.b);l.a<l.c.c.length;)for(w=new Ww(uG(N3(l),30).a);w.a<w.c.c.length;){for(b=uG(N3(w),10),r=uG(cQ(n.f,b),60),u=new Fz(ix(Xgn(b).a.Kc(),new h));hDn(u);)if(s=!0,f=null,(i=Fkn((a=uG(N9(u),18)).a,0)).b!=i.d.c){for(t=uG(I6(i),8),e=null,a.c.j==(KQn(),yRt)&&((g=new Hqn(t,new MO(t.a,r.d.d),r,a)).f.a=!0,g.a=a.c,mv(d.c,g)),a.c.j==KRt&&((g=new Hqn(t,new MO(t.a,r.d.d+r.d.a),r,a)).f.d=!0,g.a=a.c,mv(d.c,g));i.b!=i.d.c;)e=uG(I6(i),8),gcn(t.b,e.b)||(f=new Hqn(t,e,null,a),mv(d.c,f),s&&(s=!1,e.b<r.d.d?f.f.a=!0:e.b>r.d.d+r.d.a?f.f.d=!0:(f.f.d=!0,f.f.a=!0))),i.b!=i.d.c&&(t=e);f&&(c=uG(cQ(n.f,a.d.i),60),t.b<c.d.d?f.f.a=!0:t.b>c.d.d+c.d.a?f.f.d=!0:(f.f.d=!0,f.f.a=!0))}for(o=new Fz(ix(qgn(b).a.Kc(),new h));hDn(o);)0!=(a=uG(N9(o),18)).a.b&&(t=uG(pR(a.a),8),a.d.j==(KQn(),yRt)&&((g=new Hqn(t,new MO(t.a,r.d.d),r,a)).f.a=!0,g.a=a.d,mv(d.c,g)),a.d.j==KRt&&((g=new Hqn(t,new MO(t.a,r.d.d+r.d.a),r,a)).f.d=!0,g.a=a.d,mv(d.c,g)))}return d}function GJn(n,t,e){var i,r,c,a,o,u,s,h,f,l;for(u=new Zm,f=t.length,a=Ffn(e),s=0;s<f;++s){switch(c=(r=khn(i=Ndn(a,(Knn(s,h=cx(t,$Cn(61),s),t.length),t.substr(s,h-s))))).jk().wi(),VJ(t,++h)){case 39:o=aR(t,39,++h),kD(u,new TA(i,LY((Knn(h,o,t.length),t.substr(h,o-h)),c,r))),s=o+1;break;case 34:o=aR(t,34,++h),kD(u,new TA(i,LY((Knn(h,o,t.length),t.substr(h,o-h)),c,r))),s=o+1;break;case 91:kD(u,new TA(i,l=new Zm));n:for(;;){switch(VJ(t,++h)){case 39:o=aR(t,39,++h),kD(l,LY((Knn(h,o,t.length),t.substr(h,o-h)),c,r)),h=o+1;break;case 34:o=aR(t,34,++h),kD(l,LY((Knn(h,o,t.length),t.substr(h,o-h)),c,r)),h=o+1;break;case 110:if(++h,t.indexOf("ull",h)!=h)throw hv(new Ky(Xtt));l.c.push(null),h+=3}if(!(h<f))break;switch(s3(h,t.length),t.charCodeAt(h)){case 44:break;case 93:break n;default:throw hv(new Ky("Expecting , or ]"))}}s=h+1;break;case 110:if(++h,t.indexOf("ull",h)!=h)throw hv(new Ky(Xtt));kD(u,new TA(i,null)),s=h+3}if(!(s<f))break;if(s3(s,t.length),44!=t.charCodeAt(s))throw hv(new Ky("Expecting ,"))}return VFn(n,u,e)}function qJn(n){var t,e,i,r;switch(r=null,n.c){case 6:return n.Em();case 13:return n.Fm();case 23:return n.wm();case 22:return n.Bm();case 18:return n.ym();case 8:EYn(n),QYn(),r=IHt;break;case 9:return n.em(!0);case 19:return n.fm();case 10:switch(n.a){case 100:case 68:case 119:case 87:case 115:case 83:return r=n.dm(n.a),EYn(n),r;case 101:case 102:case 110:case 114:case 116:case 117:case 118:case 120:(t=n.cm())<P0n?(QYn(),QYn(),r=new IX(0,t)):r=mz(Ogn(t));break;case 99:return n.om();case 67:return n.jm();case 105:return n.rm();case 73:return n.km();case 103:return n.pm();case 88:return n.lm();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n.gm();case 80:case 112:if(!(r=PNn(n,n.a)))throw hv(new CM(rZn((t$(),git))));break;default:r=UG(n.a)}EYn(n);break;case 0:if(93==n.a||123==n.a||125==n.a)throw hv(new CM(rZn((t$(),dit))));r=UG(n.a),e=n.a,EYn(n),(64512&e)==C0n&&0==n.c&&56320==(64512&n.a)&&((i=Inn(JHt,N1n,28,2,15,1))[0]=e&D1n,i[1]=n.a&D1n,r=EV(mz(mvn(i,0,i.length)),0),EYn(n));break;default:throw hv(new CM(rZn((t$(),dit))))}return r}function XJn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P;for(E=new lS,M=new lS,g=-1,u=new Ww(n);u.a<u.c.c.length;){for((a=uG(N3(u),131)).s=g--,h=0,v=0,c=new Ww(a.t);c.a<c.c.c.length;)v+=(i=uG(N3(c),274)).c;for(r=new Ww(a.i);r.a<r.c.c.length;)h+=(i=uG(N3(r),274)).c;a.n=h,a.u=v,0==v?s8(M,a,M.c.b,M.c):0==h&&s8(E,a,E.c.b,E.c)}for(P=g8(n),d=(f=n.c.length)+1,p=f-1,b=new Zm;0!=P.a.gc();){for(;0!=M.b;)MK(0!=M.b),y=uG(Lrn(M,M.a.a),131),P.a.Bc(y),y.s=p--,Vxn(y,E,M);for(;0!=E.b;)MK(0!=E.b),T=uG(Lrn(E,E.a.a),131),P.a.Bc(T),T.s=d++,Vxn(T,E,M);for(w=j1n,s=P.a.ec().Kc();s.Ob();)(m=(a=uG(s.Pb(),131)).u-a.n)>=w&&(m>w&&(b.c.length=0,w=m),mv(b.c,a));0!=b.c.length&&(l=uG(zq(b,iMn(t,b.c.length)),131),P.a.Bc(l),l.s=d++,Vxn(l,E,M),b.c.length=0)}for(k=n.c.length+1,o=new Ww(n);o.a<o.c.c.length;)(a=uG(N3(o),131)).s<f&&(a.s+=k);for(j=new Ww(n);j.a<j.c.c.length;)for(e=new N4((T=uG(N3(j),131)).t,0);e.b<e.d.gc();)MK(e.b<e.d.gc()),S=(i=uG(e.d.Xb(e.c=e.b++),274)).b,T.s>S.s&&(LQ(e),men(S.i,i),i.c>0&&(i.a=S,kD(S.t,i),i.b=T,kD(T.i,i)))}function zJn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E;for(w=new R7(t.b),m=new R7(t.b),l=new R7(t.b),M=new R7(t.b),d=new R7(t.b),y=Fkn(t,0);y.b!=y.d.c;)for(o=new Ww((v=uG(I6(y),12)).g);o.a<o.c.c.length;)if((c=uG(N3(o),18)).c.i==c.d.i){if(v.j==c.d.j){mv(M.c,c);continue}if(v.j==(KQn(),yRt)&&c.d.j==KRt){mv(d.c,c);continue}}for(u=new Ww(d);u.a<u.c.c.length;)KUn(n,c=uG(N3(u),18),e,i,(KQn(),kRt));for(a=new Ww(M);a.a<a.c.c.length;)c=uG(N3(a),18),Hb(T=new gMn(n),(zIn(),gbt)),kfn(T,(jYn(),JMt),($Pn(),cRt)),kfn(T,(GYn(),rmt),c),kfn(j=new lOn,rmt,c.d),NLn(j,(KQn(),_Rt)),o2(j,T),kfn(E=new lOn,rmt,c.c),NLn(E,kRt),o2(E,T),kfn(c.c,lmt,T),kfn(c.d,lmt,T),c2(c,null),u2(c,null),mv(e.c,T),kfn(T,Opt,xwn(2));for(k=Fkn(t,0);k.b!=k.d.c;)s=(v=uG(I6(k),12)).e.c.length>0,g=v.g.c.length>0,s&&g?mv(l.c,v):s?mv(w.c,v):g&&mv(m.c,v);for(b=new Ww(w);b.a<b.c.c.length;)kD(r,Xqn(n,uG(N3(b),12),null,e));for(p=new Ww(m);p.a<p.c.c.length;)kD(r,Xqn(n,null,uG(N3(p),12),e));for(f=new Ww(l);f.a<f.c.c.length;)kD(r,Xqn(n,h=uG(N3(f),12),h,e))}function VJn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(b=M0n,w=M0n,f=0,l=0,s=new Zm,u=new DD((!n.b&&(n.b=new fV(aFt,n,12,3)),n.b));u.e!=u.i.gc();)a=uG(Zkn(u),74),s=zcn(Uhn(cT(vat,1),EZn,20,0,[s,(!a.n&&(a.n=new fV(lFt,a,1,7)),a.n)]));for(k=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[(!n.n&&(n.n=new fV(lFt,n,1,7)),n.n),(!n.a&&(n.a=new fV(bFt,n,10,11)),n.a),s])));hDn(k);)v=uG(N9(k),422),h=uG(v.of((XYn(),$$t)),140),b>v.nh()-h.b&&(b=v.nh()-h.b),w>v.oh()-h.d&&(w=v.oh()-h.d),f<v.nh()+v.mh()+h.c&&(f=v.nh()+v.mh()+h.c),l<v.oh()+v.lh()+h.a&&(l=v.oh()+v.lh()+h.a);for(o=new DD((!n.b&&(n.b=new fV(aFt,n,12,3)),n.b));o.e!=o.i.gc();)for(m=new DD((!(a=uG(Zkn(o),74)).a&&(a.a=new fV(oFt,a,6,6)),a.a));m.e!=m.i.gc();)for(d=(p=uG(Zkn(m),166)).j,r=p.b,g=p.k,c=p.c,b=e.Math.min(b,d),b=e.Math.min(b,r),f=e.Math.max(f,d),f=e.Math.max(f,r),w=e.Math.min(w,g),w=e.Math.min(w,c),l=e.Math.max(l,g),l=e.Math.max(l,c),i=new DD((!p.a&&(p.a=new MD(eFt,p,5)),p.a));i.e!=i.i.gc();)t=uG(Zkn(i),377),b=e.Math.min(b,t.a),f=e.Math.max(f,t.a),w=e.Math.min(w,t.b),l=e.Math.max(l,t.b);Myn(n,(XYn(),h$t),f-b),Myn(n,s$t,l-w)}function WJn(n,t,e){var i,r,c,a,o,u,s;if(e.Ug("Network simplex node placement",1),n.e=t,n.n=uG(oIn(t,(GYn(),kmt)),312),Pzn(n),vPn(n),kS(sin(new fX(null,new h3(n.e.b,16)),new _c),new hp(n)),kS(JJ(sin(JJ(sin(new fX(null,new h3(n.e.b,16)),new Zc),new na),new ta),new ea),new sp(n)),oM(gK(oIn(n.e,(jYn(),OMt))))&&((c=e.eh(1)).Ug("Straight Edges Pre-Processing",1),HWn(n),c.Vg()),uMn(n.f),r=uG(oIn(t,OTt),17).a*n.f.a.c.length,YHn(kT(yT(_B(n.f),r),!1),e.eh(1)),0!=n.d.a.gc()){for((c=e.eh(1)).Ug("Flexible Where Space Processing",1),a=uG(yx(Qz(YJ(new fX(null,new h3(n.f.a,16)),new Bc),new $c)),17).a,o=uG(yx(Wz(YJ(new fX(null,new h3(n.f.a,16)),new Hc),new Dc)),17).a-a,u=jx(new sk,n.f),s=jx(new sk,n.f),RKn(xS(DS($S(RS(new uk,2e4),o),u),s)),kS(JJ(JJ(BV(n.i),new Uc),new Gc),new dY(a,u,o,s)),i=n.d.a.ec().Kc();i.Ob();)uG(i.Pb(),218).g=1;YHn(kT(yT(_B(n.f),r),!1),c.eh(1)),c.Vg()}oM(gK(oIn(t,OMt)))&&((c=e.eh(1)).Ug("Straight Edges Post-Processing",1),fAn(n),c.Vg()),dWn(n),n.e=null,n.f=null,n.i=null,n.c=null,$V(n.k),n.j=null,n.a=null,n.o=null,n.d.a.$b(),e.Vg()}function QJn(n,t,i){var r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k;for(i.Ug("Depth first model order layering",1),n.d=t,m=new Zm,p=new Ww(n.d.a);p.a<p.c.c.length;)(d=uG(N3(p),10)).k==(zIn(),dbt)&&mv(m.c,d);for(hZ(),f$(m,new Ec),o=!0,n.b=new bQ(n.d),n.a=null,kD(n.d.b,n.b),n.b.p=0,n.c=0,n.f=new lS,g=new Ww(m);g.a<g.c.c.length;)if(d=uG(N3(g),10),o)a2(d,n.b),o=!1;else if(Lqn(n,d))if(r=(w=Pyn(w=n.c,d))+2,l=w-n.c,0==n.f.b)O_n(n,r,d);else if(l>0){for(k=Fkn(n.f,0);k.b!=k.d.c;)uG(I6(k),10).p+=w-n.e;kAn(n),BY(n.f),O_n(n,r,d)}else{for(aq(n.f,d),d.p=r,n.e=e.Math.max(n.e,r),a=new Fz(ix(qgn(d).a.Kc(),new h));hDn(a);)(c=uG(N9(a),18)).c.i.c||c.c.i.k!=(zIn(),bbt)||(aq(n.f,c.c.i),c.c.i.p=r-1);n.c=r}else kAn(n),BY(n.f),r=0,hDn(new Fz(ix(qgn(d).a.Kc(),new h)))?O_n(n,r=(w=Pyn(w=0,d))+2,d):(aq(n.f,d),d.p=0,n.e=e.Math.max(n.e,0),n.b=uG(zq(n.d.b,0),30),n.c=0);for(0==n.f.b||kAn(n),n.d.a.c.length=0,v=new Zm,f=new Ww(n.d.b);f.a<f.c.c.length;)0==(u=uG(N3(f),30)).a.c.length&&mv(v.c,u);for(dgn(n.d.b,v),b=0,s=new Ww(n.d.b);s.a<s.c.c.length;)(u=uG(N3(s),30)).p=b,++b;i.Vg()}function JJn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;if(s=t,Gan(u=D5(n,d5(e),s),k6(s,Iet)),h=uG(dcn(n.g,fNn(v0(s,set))),27),i=null,(a=v0(s,"sourcePort"))&&(i=fNn(a)),f=uG(dcn(n.j,i),123),!h)throw hv(new SM("An edge must have a source node (edge id: '"+jvn(s)+$et));if(f&&!xQ(h0(f),h))throw hv(new SM("The source port of an edge must be a port of the edge's source node (edge id: '"+k6(s,Iet)+$et));if(!u.b&&(u.b=new f_(cFt,u,4,7)),ttn(u.b,f||h),l=uG(dcn(n.g,fNn(v0(s,Ret))),27),r=null,(o=v0(s,"targetPort"))&&(r=fNn(o)),b=uG(dcn(n.j,r),123),!l)throw hv(new SM("An edge must have a target node (edge id: '"+jvn(s)+$et));if(b&&!xQ(h0(b),l))throw hv(new SM("The target port of an edge must be a port of the edge's target node (edge id: '"+k6(s,Iet)+$et));if(!u.c&&(u.c=new f_(cFt,u,5,8)),ttn(u.c,b||l),0==(!u.b&&(u.b=new f_(cFt,u,4,7)),u.b).i||0==(!u.c&&(u.c=new f_(cFt,u,5,8)),u.c).i)throw c=k6(s,Iet),hv(new SM(Net+c+$et));return fCn(s,u),ZDn(s,u),qfn(n,s,u)}function YJn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I;for(b=uG(oIn(n,(mon(),Wft)),27),m=vZn,v=vZn,g=j1n,p=j1n,y=new Ww(n.e);y.a<y.c.c.length;)S=(k=uG(N3(y),153)).d,P=k.e,m=e.Math.min(m,S.a-P.a/2),v=e.Math.min(v,S.b-P.b/2),g=e.Math.max(g,S.a+P.a/2),p=e.Math.max(p,S.b+P.b/2);for(i=new Ww(n.b);i.a<i.c.c.length;)S=(t=uG(N3(i),250)).d,P=t.e,m=e.Math.min(m,S.a-P.a/2),v=e.Math.min(v,S.b-P.b/2),g=e.Math.max(g,S.a+P.a/2),p=e.Math.max(p,S.b+P.b/2);for(j=new MO((E=uG(zDn(b,(cGn(),Oft)),107)).b-m,E.d-v),h=new Ww(n.e);h.a<h.c.c.length;)F$(T=oIn(s=uG(N3(h),153),Wft),207)&&kN(w=uG(T,27),(M=JF(new eN(s.d),j)).a-w.g/2,M.b-w.f/2);for(a=new Ww(n.c);a.a<a.c.c.length;)c=uG(N3(a),290),l=JFn(uG(oIn(c,Wft),74),!0,!0),JF(C=new eN(Vcn(c)),j),MN(l,C.a,C.b),Prn(c.a,new bC(j,l)),JF(r=new eN(Wcn(c)),j),yN(l,r.a,r.b);for(u=new Ww(n.d);u.a<u.c.c.length;)o=uG(N3(u),454),kN(uG(oIn(o,Wft),135),(d=JF(new eN(o.d),j)).a,d.b);I=g-m+(E.b+E.c),f=p-v+(E.d+E.a),oM(gK(zDn(b,(XYn(),H$t))))||ZQn(b,I,f,!1,!0),Myn(b,h$t,I-(E.b+E.c)),Myn(b,s$t,f-(E.d+E.a))}function ZJn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S;return f=xGn(Ax(n,(KQn(),SRt)),t),w=UTn(Ax(n,PRt),t),k=UTn(Ax(n,DRt),t),j=GTn(Ax(n,RRt),t),l=GTn(Ax(n,MRt),t),m=UTn(Ax(n,$Rt),t),d=UTn(Ax(n,CRt),t),M=UTn(Ax(n,xRt),t),y=UTn(Ax(n,TRt),t),E=GTn(Ax(n,ERt),t),p=UTn(Ax(n,LRt),t),v=UTn(Ax(n,ARt),t),T=UTn(Ax(n,jRt),t),S=GTn(Ax(n,NRt),t),b=GTn(Ax(n,IRt),t),g=UTn(Ax(n,ORt),t),e=Trn(Uhn(cT(eUt,1),I0n,28,15,[m.a,j.a,M.a,S.a])),i=Trn(Uhn(cT(eUt,1),I0n,28,15,[w.a,f.a,k.a,g.a])),r=p.a,c=Trn(Uhn(cT(eUt,1),I0n,28,15,[d.a,l.a,y.a,b.a])),s=Trn(Uhn(cT(eUt,1),I0n,28,15,[m.b,w.b,d.b,v.b])),u=Trn(Uhn(cT(eUt,1),I0n,28,15,[j.b,f.b,l.b,g.b])),h=E.b,o=Trn(Uhn(cT(eUt,1),I0n,28,15,[M.b,k.b,y.b,T.b])),utn(Ax(n,SRt),e+r,s+h),utn(Ax(n,ORt),e+r,s+h),utn(Ax(n,PRt),e+r,0),utn(Ax(n,DRt),e+r,s+h+u),utn(Ax(n,RRt),0,s+h),utn(Ax(n,MRt),e+r+i,s+h),utn(Ax(n,CRt),e+r+i,0),utn(Ax(n,xRt),0,s+h+u),utn(Ax(n,TRt),e+r+i,s+h+u),utn(Ax(n,ERt),0,s),utn(Ax(n,LRt),e,0),utn(Ax(n,jRt),0,s+h+u),utn(Ax(n,IRt),e+r+i,0),(a=new sj).a=Trn(Uhn(cT(eUt,1),I0n,28,15,[e+i+r+c,E.a,v.a,T.a])),a.b=Trn(Uhn(cT(eUt,1),I0n,28,15,[s+u+h+o,p.b,S.b,b.b])),a}function nYn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;for(d=new MO(M0n,M0n),t=new MO(T0n,T0n),y=new Ww(n);y.a<y.c.c.length;)k=uG(N3(y),8),d.a=e.Math.min(d.a,k.a),d.b=e.Math.min(d.b,k.b),t.a=e.Math.max(t.a,k.a),t.b=e.Math.max(t.b,k.b);for(s=new MO(t.a-d.a,t.b-d.b),h=new gqn(new MO(d.a-50,d.b-s.a-50),new MO(d.a-50,t.b+s.a+50),new MO(t.a+s.b/2+50,d.b+s.b/2)),v=new ek,c=new Zm,i=new Zm,v.a.zc(h,v),T=new Ww(n);T.a<T.c.c.length;){for(M=uG(N3(T),8),c.c.length=0,m=v.a.ec().Kc();m.Ob();)atn((g=uG(m.Pb(),317)).d,g.a),Fgn(atn(g.d,M),atn(g.d,g.a))<0&&mv(c.c,g);for(i.c.length=0,p=new Ww(c);p.a<p.c.c.length;)for(b=new Ww((g=uG(N3(p),317)).e);b.a<b.c.c.length;){for(f=uG(N3(b),177),a=!0,u=new Ww(c);u.a<u.c.c.length;)(o=uG(N3(u),317))!=g&&(OJ(f,zq(o.e,0))||OJ(f,zq(o.e,1))||OJ(f,zq(o.e,2)))&&(a=!1);a&&mv(i.c,f)}for(zCn(v,c),z8(v,new ln),l=new Ww(i);l.a<l.c.c.length;)FV(v,new gqn(M,(f=uG(N3(l),177)).a,f.b))}for(z8(v,new Pd(w=new ek)),r=w.a.ec().Kc();r.Ob();)(Den(h,(f=uG(r.Pb(),177)).a)||Den(h,f.b))&&r.Qb();return z8(w,new bn),w}function tYn(){tYn=E,pj(),VKt=RKt.a,uG(zrn(gZ(RKt.a),0),19),HKt=RKt.f,uG(zrn(gZ(RKt.f),0),19),uG(zrn(gZ(RKt.f),1),35),zKt=RKt.n,uG(zrn(gZ(RKt.n),0),35),uG(zrn(gZ(RKt.n),1),35),uG(zrn(gZ(RKt.n),2),35),uG(zrn(gZ(RKt.n),3),35),UKt=RKt.g,uG(zrn(gZ(RKt.g),0),19),uG(zrn(gZ(RKt.g),1),35),FKt=RKt.c,uG(zrn(gZ(RKt.c),0),19),uG(zrn(gZ(RKt.c),1),19),GKt=RKt.i,uG(zrn(gZ(RKt.i),0),19),uG(zrn(gZ(RKt.i),1),19),uG(zrn(gZ(RKt.i),2),19),uG(zrn(gZ(RKt.i),3),19),uG(zrn(gZ(RKt.i),4),35),qKt=RKt.j,uG(zrn(gZ(RKt.j),0),19),_Kt=RKt.d,uG(zrn(gZ(RKt.d),0),19),uG(zrn(gZ(RKt.d),1),19),uG(zrn(gZ(RKt.d),2),19),uG(zrn(gZ(RKt.d),3),19),uG(zrn(gZ(RKt.d),4),35),uG(zrn(gZ(RKt.d),5),35),uG(zrn(gZ(RKt.d),6),35),uG(zrn(gZ(RKt.d),7),35),KKt=RKt.b,uG(zrn(gZ(RKt.b),0),35),uG(zrn(gZ(RKt.b),1),35),BKt=RKt.e,uG(zrn(gZ(RKt.e),0),35),uG(zrn(gZ(RKt.e),1),35),uG(zrn(gZ(RKt.e),2),35),uG(zrn(gZ(RKt.e),3),35),uG(zrn(gZ(RKt.e),4),19),uG(zrn(gZ(RKt.e),5),19),uG(zrn(gZ(RKt.e),6),19),uG(zrn(gZ(RKt.e),7),19),uG(zrn(gZ(RKt.e),8),19),uG(zrn(gZ(RKt.e),9),19),uG(zrn(gZ(RKt.e),10),35),XKt=RKt.k,uG(zrn(gZ(RKt.k),0),35),uG(zrn(gZ(RKt.k),1),35)}function eYn(n){var t,e,i,r,c;switch(t=n.c){case 11:return n.vm();case 12:return n.xm();case 14:return n.zm();case 15:return n.Cm();case 16:return n.Am();case 17:return n.Dm();case 21:return EYn(n),QYn(),QYn(),OHt;case 10:switch(n.a){case 65:return n.hm();case 90:return n.mm();case 122:return n.tm();case 98:return n.nm();case 66:return n.im();case 60:return n.sm();case 62:return n.qm()}}switch(c=qJn(n),t=n.c){case 3:return n.Im(c);case 4:return n.Gm(c);case 5:return n.Hm(c);case 0:if(123==n.a&&n.d<n.j){if(r=n.d,i=0,e=-1,!((t=VJ(n.i,r++))>=48&&t<=57))throw hv(new CM(rZn((t$(),Nit))));for(i=t-48;r<n.j&&(t=VJ(n.i,r++))>=48&&t<=57;)if((i=10*i+t-48)<0)throw hv(new CM(rZn((t$(),Rit))));if(e=i,44==t){if(r>=n.j)throw hv(new CM(rZn((t$(),Dit))));if((t=VJ(n.i,r++))>=48&&t<=57){for(e=t-48;r<n.j&&(t=VJ(n.i,r++))>=48&&t<=57;)if((e=10*e+t-48)<0)throw hv(new CM(rZn((t$(),Rit))));if(i>e)throw hv(new CM(rZn((t$(),xit))))}else e=-1}if(125!=t)throw hv(new CM(rZn((t$(),$it))));n.bm(r)?(QYn(),QYn(),c=new n8(9,c),n.d=r+1):(QYn(),QYn(),c=new n8(3,c),n.d=r),c.Om(i),c.Nm(e),EYn(n)}}return c}function iYn(n){var t,e,i;switch(e=uG(oIn(n,(GYn(),Hpt)),21),t=aN(klt),uG(oIn(n,(jYn(),rMt)),346)==(Own(),Ixt)&&gsn(t,ylt),oM(gK(oIn(n,eMt)))?Aq(t,(uIn(),Tlt),(zYn(),Iwt)):Aq(t,(uIn(),Elt),(zYn(),Iwt)),null!=oIn(n,(K7(),jNt))&&gsn(t,Mlt),(oM(gK(oIn(n,fMt)))||oM(gK(oIn(n,iMt))))&&wz(t,(uIn(),Plt),(zYn(),Ubt)),uG(oIn(n,Byt),88).g){case 2:case 3:case 4:wz(Aq(t,(uIn(),Tlt),(zYn(),qbt)),Plt,Gbt)}switch(e.Hc((r_n(),Zgt))&&wz(Aq(Aq(t,(uIn(),Tlt),(zYn(),Hbt)),Slt,_bt),Plt,Bbt),xA(oIn(n,yMt))!==xA((THn(),$jt))&&Aq(t,(uIn(),Elt),(zYn(),ywt)),e.Hc(apt)&&(Aq(t,(uIn(),Tlt),(zYn(),Pwt)),Aq(t,jlt,Ewt),Aq(t,Elt,Swt)),xA(oIn(n,vyt))!==xA((RIn(),Vgt))&&xA(oIn(n,Vyt))!==xA((_gn(),sxt))&&wz(t,(uIn(),Plt),(zYn(),rwt)),oM(gK(oIn(n,aMt)))&&Aq(t,(uIn(),Elt),(zYn(),iwt)),oM(gK(oIn(n,Ryt)))&&Aq(t,(uIn(),Elt),(zYn(),Dwt)),CRn(n)&&(i=(xA(oIn(n,rMt))===xA(Ixt)?uG(oIn(n,Oyt),299):uG(oIn(n,Ayt),299))==(ihn(),fpt)?(zYn(),jwt):(zYn(),Kwt),Aq(t,(uIn(),Slt),i)),uG(oIn(n,qTt),388).g){case 1:Aq(t,(uIn(),Slt),(zYn(),xwt));break;case 2:wz(Aq(Aq(t,(uIn(),Elt),(zYn(),xbt)),Slt,Rbt),Plt,Kbt)}return xA(oIn(n,Syt))!==xA((yvn(),Fjt))&&Aq(t,(uIn(),Elt),(zYn(),Rwt)),t}function rYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;if(PV(n.a,t)){if(cS(uG(cQ(n.a,t),49),e))return 1}else vJ(n.a,t,new ek);if(PV(n.a,e)){if(cS(uG(cQ(n.a,e),49),t))return-1}else vJ(n.a,e,new ek);if(PV(n.e,t)){if(cS(uG(cQ(n.e,t),49),e))return-1}else vJ(n.e,t,new ek);if(PV(n.e,e)){if(cS(uG(cQ(n.a,e),49),t))return 1}else vJ(n.e,e,new ek);if(n.c==(yvn(),_jt)||!vR(t,(GYn(),imt))||!vR(e,(GYn(),imt))){for(f=null,s=new Ww(t.j);s.a<s.c.c.length;)0==(o=uG(N3(s),12)).e.c.length||uG(zq(o.e,0),18).c.i.c!=t.c&&(f=uG(zq(o.e,0),18).c);for(b=null,u=new Ww(e.j);u.a<u.c.c.length;)0==(o=uG(N3(u),12)).e.c.length||uG(zq(o.e,0),18).c.i.c!=e.c&&(b=uG(zq(o.e,0),18).c);if(f&&b){if(h=f.i,l=b.i,h&&h==l){for(d=new Ww(h.j);d.a<d.c.c.length;){if((w=uG(N3(d),12))==f)return uHn(n,e,t),-1;if(w==b)return uHn(n,t,e),1}return d$(_Sn(n,t),_Sn(n,e))}for(m=0,v=(p=n.d).length;m<v;++m){if((g=p[m])==h)return uHn(n,e,t),-1;if(g==l)return uHn(n,t,e),1}}if(!vR(t,(GYn(),imt))||!vR(e,imt))return(r=_Sn(n,t))>(a=_Sn(n,e))?uHn(n,t,e):uHn(n,e,t),r<a?-1:r>a?1:0}return(i=uG(oIn(t,(GYn(),imt)),17).a)>(c=uG(oIn(e,imt),17).a)?uHn(n,t,e):uHn(n,e,t),i<c?-1:i>c?1:0}function cYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d;if(null==e)return null;if(n.a!=t.jk())throw hv(new vM(tet+t.xe()+eet));if(F$(t,469)){if(!(d=y_n(uG(t,685),e)))throw hv(new vM(iet+e+"' is not a valid enumerator of '"+t.xe()+"'"));return d}switch(tdn((gAn(),kBt),t).Nl()){case 2:e=yXn(e,!1);break;case 3:e=yXn(e,!0)}if(i=tdn(kBt,t).Jl())return i.jk().wi().ti(i,e);if(f=tdn(kBt,t).Ll()){for(d=new Zm,s=0,h=(u=Fln(e)).length;s<h;++s)o=u[s],kD(d,f.jk().wi().ti(f,o));return d}if(!(w=tdn(kBt,t).Ml()).dc()){for(b=w.Kc();b.Ob();){l=uG(b.Pb(),156);try{if(null!=(d=l.jk().wi().ti(l,e)))return d}catch(g){if(!F$(g=Ehn(g),63))throw hv(g)}}throw hv(new vM(iet+e+"' does not match any member types of the union datatype '"+t.xe()+"'"))}if(uG(t,847).ok(),!(r=jbn(t.kk())))return null;if(r==hot){c=0;try{c=vUn(e,j1n,vZn)&D1n}catch(g){if(!F$(g=Ehn(g),130))throw hv(g);c=_en(e)[0]}return Hsn(c)}if(r==iot){for(a=0;a<QKt.length;++a)try{return dP(QKt[a],e)}catch(g){if(!F$(g=Ehn(g),33))throw hv(g)}throw hv(new vM(iet+e+"' is not a date formatted string of the form yyyy-MM-dd'T'HH:mm:ss'.'SSSZ or a valid subset thereof"))}throw hv(new vM(iet+e+"' is invalid. "))}function aYn(){aYn=E,UNn(Jlt=new K1,(KQn(),SRt),ORt),UNn(Jlt,RRt,ORt),UNn(Jlt,RRt,NRt),UNn(Jlt,MRt,IRt),UNn(Jlt,MRt,ORt),UNn(Jlt,PRt,ORt),UNn(Jlt,PRt,ARt),UNn(Jlt,DRt,jRt),UNn(Jlt,DRt,ORt),UNn(Jlt,LRt,ERt),UNn(Jlt,LRt,ORt),UNn(Jlt,LRt,ARt),UNn(Jlt,LRt,jRt),UNn(Jlt,ERt,LRt),UNn(Jlt,ERt,NRt),UNn(Jlt,ERt,IRt),UNn(Jlt,ERt,ORt),UNn(Jlt,$Rt,$Rt),UNn(Jlt,$Rt,ARt),UNn(Jlt,$Rt,NRt),UNn(Jlt,CRt,CRt),UNn(Jlt,CRt,ARt),UNn(Jlt,CRt,IRt),UNn(Jlt,xRt,xRt),UNn(Jlt,xRt,jRt),UNn(Jlt,xRt,NRt),UNn(Jlt,TRt,TRt),UNn(Jlt,TRt,jRt),UNn(Jlt,TRt,IRt),UNn(Jlt,ARt,PRt),UNn(Jlt,ARt,LRt),UNn(Jlt,ARt,$Rt),UNn(Jlt,ARt,CRt),UNn(Jlt,ARt,ORt),UNn(Jlt,ARt,ARt),UNn(Jlt,ARt,NRt),UNn(Jlt,ARt,IRt),UNn(Jlt,jRt,DRt),UNn(Jlt,jRt,LRt),UNn(Jlt,jRt,xRt),UNn(Jlt,jRt,TRt),UNn(Jlt,jRt,jRt),UNn(Jlt,jRt,NRt),UNn(Jlt,jRt,IRt),UNn(Jlt,jRt,ORt),UNn(Jlt,NRt,RRt),UNn(Jlt,NRt,ERt),UNn(Jlt,NRt,$Rt),UNn(Jlt,NRt,xRt),UNn(Jlt,NRt,ARt),UNn(Jlt,NRt,jRt),UNn(Jlt,NRt,NRt),UNn(Jlt,NRt,ORt),UNn(Jlt,IRt,MRt),UNn(Jlt,IRt,ERt),UNn(Jlt,IRt,CRt),UNn(Jlt,IRt,TRt),UNn(Jlt,IRt,ARt),UNn(Jlt,IRt,jRt),UNn(Jlt,IRt,IRt),UNn(Jlt,IRt,ORt),UNn(Jlt,ORt,SRt),UNn(Jlt,ORt,RRt),UNn(Jlt,ORt,MRt),UNn(Jlt,ORt,PRt),UNn(Jlt,ORt,DRt),UNn(Jlt,ORt,LRt),UNn(Jlt,ORt,ERt),UNn(Jlt,ORt,ARt),UNn(Jlt,ORt,jRt),UNn(Jlt,ORt,NRt),UNn(Jlt,ORt,IRt),UNn(Jlt,ORt,ORt)}function oYn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j;for(n.d=new MO(M0n,M0n),n.c=new MO(T0n,T0n),l=t.Kc();l.Ob();)for(v=new Ww(uG(l.Pb(),36).a);v.a<v.c.c.length;)m=uG(N3(v),10),n.d.a=e.Math.min(n.d.a,m.n.a-m.d.b),n.d.b=e.Math.min(n.d.b,m.n.b-m.d.d),n.c.a=e.Math.max(n.c.a,m.n.a+m.o.a+m.d.c),n.c.b=e.Math.max(n.c.b,m.n.b+m.o.b+m.d.a);for(u=new bk,f=t.Kc();f.Ob();)r=CJn(n,uG(f.Pb(),36)),kD(u.a,r),r.a=r.a|!uG(oIn(r.c,(GYn(),xpt)),21).dc();for(n.b=(Mbn(),(j=new vt).f=new $an(i),j.b=PVn(j.f,u),j),qVn((w=n.b,new fy,w)),n.e=new sj,n.a=n.b.f.e,o=new Ww(u.a);o.a<o.c.c.length;)for(c=uG(N3(o),855),k=Q1(n.b,c),eHn(c.c,k.a,k.b),g=new Ww(c.c.a);g.a<g.c.c.length;)(d=uG(N3(g),10)).k==(zIn(),lbt)&&(p=nRn(n,d.n,uG(oIn(d,(GYn(),Fpt)),64)),JF(dL(d.n),p));for(a=new Ww(u.a);a.a<a.c.c.length;)for(h=new Ww(cgn(c=uG(N3(a),855)));h.a<h.c.c.length;)for(sR(T=new tj((s=uG(N3(h),18)).a),0,n3(s.c)),aq(T,n3(s.d)),b=null,M=Fkn(T,0);M.b!=M.d.c;)y=uG(I6(M),8),b?(xrn(b.a,y.a)?(n.e.a=e.Math.min(n.e.a,b.a),n.a.a=e.Math.max(n.a.a,b.a)):xrn(b.b,y.b)&&(n.e.b=e.Math.min(n.e.b,b.b),n.a.b=e.Math.max(n.a.b,b.b)),b=y):b=y;BR(n.e),JF(n.a,n.e)}function uYn(n,t){var e,i,r,c,a,o,u,s;if(e=0,a=0,c=t.length,o=null,s=new QM,a<c&&(s3(a,t.length),43==t.charCodeAt(a))&&(++e,++a<c&&(s3(a,t.length),43==t.charCodeAt(a)||(s3(a,t.length),45==t.charCodeAt(a)))))throw hv(new ZM(y0n+t+'"'));for(;a<c&&(s3(a,t.length),46!=t.charCodeAt(a))&&(s3(a,t.length),101!=t.charCodeAt(a))&&(s3(a,t.length),69!=t.charCodeAt(a));)++a;if(s.a+=""+r1(null==t?IZn:(tJ(t),t),e,a),a<c&&(s3(a,t.length),46==t.charCodeAt(a))){for(e=++a;a<c&&(s3(a,t.length),101!=t.charCodeAt(a))&&(s3(a,t.length),69!=t.charCodeAt(a));)++a;n.e=a-e,s.a+=""+r1(null==t?IZn:(tJ(t),t),e,a)}else n.e=0;if(a<c&&(s3(a,t.length),101==t.charCodeAt(a)||(s3(a,t.length),69==t.charCodeAt(a)))&&(e=++a,a<c&&(s3(a,t.length),43==t.charCodeAt(a))&&++a<c&&(s3(a,t.length),45!=t.charCodeAt(a))&&++e,Knn(e,c,t.length),o=t.substr(e,c-e),n.e=n.e-vUn(o,j1n,vZn),n.e!=t0(n.e)))throw hv(new ZM("Scale out of range."));if((u=s.a).length<16){if(n.f=(null==Not&&(Not=new RegExp("^[+-]?\\d*$","i")),Not.test(u)?parseInt(u,10):NaN),isNaN(n.f))throw hv(new ZM(y0n+t+'"'));n.a=VLn(n.f)}else rdn(n,new PN(u));for(n.d=s.a.length,r=0;r<s.a.length&&(45==(i=VJ(s.a,r))||48==i);++r)--n.d;0==n.d&&(n.d=1)}function sYn(n){Hxn(n.b,Drt,Uhn(cT($ot,1),zZn,2,6,[Rrt,"ConsistentTransient"])),Hxn(n.a,Drt,Uhn(cT($ot,1),zZn,2,6,[Rrt,"WellFormedSourceURI"])),Hxn(n.o,Drt,Uhn(cT($ot,1),zZn,2,6,[Rrt,"InterfaceIsAbstract AtMostOneID UniqueFeatureNames UniqueOperationSignatures NoCircularSuperTypes WellFormedMapEntryClass ConsistentSuperTypes DisjointFeatureAndOperationSignatures"])),Hxn(n.p,Drt,Uhn(cT($ot,1),zZn,2,6,[Rrt,"WellFormedInstanceTypeName UniqueTypeParameterNames"])),Hxn(n.v,Drt,Uhn(cT($ot,1),zZn,2,6,[Rrt,"UniqueEnumeratorNames UniqueEnumeratorLiterals"])),Hxn(n.R,Drt,Uhn(cT($ot,1),zZn,2,6,[Rrt,"WellFormedName"])),Hxn(n.T,Drt,Uhn(cT($ot,1),zZn,2,6,[Rrt,"UniqueParameterNames UniqueTypeParameterNames NoRepeatingVoid"])),Hxn(n.U,Drt,Uhn(cT($ot,1),zZn,2,6,[Rrt,"WellFormedNsURI WellFormedNsPrefix UniqueSubpackageNames UniqueClassifierNames UniqueNsURIs"])),Hxn(n.W,Drt,Uhn(cT($ot,1),zZn,2,6,[Rrt,"ConsistentOpposite SingleContainer ConsistentKeys ConsistentUnique ConsistentContainer"])),Hxn(n.bb,Drt,Uhn(cT($ot,1),zZn,2,6,[Rrt,"ValidDefaultValueLiteral"])),Hxn(n.eb,Drt,Uhn(cT($ot,1),zZn,2,6,[Rrt,"ValidLowerBound ValidUpperBound ConsistentBounds ValidType"])),Hxn(n.H,Drt,Uhn(cT($ot,1),zZn,2,6,[Rrt,"ConsistentType ConsistentBounds ConsistentArguments"]))}function hYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;if(!t.dc()){if(r=new Uk,f=(a=e||uG(t.Xb(0),18)).c,uFn(),(s=f.i.k)!=(zIn(),dbt)&&s!=gbt&&s!=lbt&&s!=fbt)throw hv(new vM("The target node of the edge must be a normal node or a northSouthPort."));for(cL(r,Gfn(Uhn(cT(PNt,1),zZn,8,0,[f.i.n,f.n,f.a]))),(KQn(),LRt).Hc(f.j)&&(b=uM(pK(oIn(f,(GYn(),Mmt)))),s8(r,new MO(Gfn(Uhn(cT(PNt,1),zZn,8,0,[f.i.n,f.n,f.a])).a,b),r.c.b,r.c)),u=null,i=!1,o=t.Kc();o.Ob();)0!=(c=uG(o.Pb(),18).a).b&&(i?(s8(r,vD(JF(u,(MK(0!=c.b),uG(c.a.a.c,8))),.5),r.c.b,r.c),i=!1):i=!0,u=D$((MK(0!=c.b),uG(c.c.b.c,8))),Qon(r,c),BY(c));l=a.d,LRt.Hc(l.j)&&(b=uM(pK(oIn(l,(GYn(),Mmt)))),s8(r,new MO(Gfn(Uhn(cT(PNt,1),zZn,8,0,[l.i.n,l.n,l.a])).a,b),r.c.b,r.c)),cL(r,Gfn(Uhn(cT(PNt,1),zZn,8,0,[l.i.n,l.n,l.a]))),n.d==(kbn(),sEt)&&(MK(0!=r.b),w=uG(r.a.a.c,8),d=uG(hyn(r,1),8),(g=new O2(Tln(f.j))).a*=5,g.b*=5,p=YF(new MO(d.a,d.b),w),JF(m=new MO(C0(g.a,p.a),C0(g.b,p.b)),w),lW(Fkn(r,1),m),MK(0!=r.b),v=uG(r.c.b.c,8),k=uG(hyn(r,r.b-2),8),(g=new O2(Tln(l.j))).a*=5,g.b*=5,p=YF(new MO(k.a,k.b),v),JF(y=new MO(C0(g.a,p.a),C0(g.b,p.b)),v),sR(r,r.b-1,y)),h=new jqn(r),Qon(a.a,$Mn(h))}}function fYn(n,t,i,r){var c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A,L,N,$,D;if(k=(m=uG(zrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84)).nh(),y=m.oh(),v=m.mh()/2,w=m.lh()/2,F$(m,193)&&(k+=h0(p=uG(m,123)).i,k+=h0(p).i),k+=v,y+=w,C=(S=uG(zrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84)).nh(),I=S.oh(),P=S.mh()/2,M=S.lh()/2,F$(S,193)&&(C+=h0(E=uG(S,123)).i,C+=h0(E).i),C+=P,I+=M,0==(!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i)gj(),u=new is,ttn((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a),u);else if((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i>1)for(b=new Zx((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a));b.e!=b.i.gc();)$Sn(b);for(d=C,C>k+v?d=k+v:C<k-v&&(d=k-v),g=I,I>y+w?g=y+w:I<y-w&&(g=y-w),d>k-v&&d<k+v&&g>y-w&&g<y+w&&(d=k+v),Tcn(o=uG(zrn((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a),0),166),d),Ecn(o,g),T=k,k>C+P?T=C+P:k<C-P&&(T=C-P),j=y,y>I+M?j=I+M:y<I-M&&(j=I-M),T>C-P&&T<C+P&&j>I-M&&j<I+M&&(j=I+M),mcn(o,T),jcn(o,j),Czn((!o.a&&(o.a=new MD(eFt,o,5)),o.a)),a=iMn(t,5),m==S&&++a,A=T-d,$=j-g,h=.20000000298023224*e.Math.sqrt(A*A+$*$),L=A/(a+1),D=$/(a+1),O=d,N=g,s=0;s<a;s++)N+=D,(f=(O+=L)+uRn(t,24)*z0n*h-h/2)<0?f=1:f>i&&(f=i-1),(l=N+uRn(t,24)*z0n*h-h/2)<0?l=1:l>r&&(l=r-1),gj(),Scn(c=new ns,f),pcn(c,l),ttn((!o.a&&(o.a=new MD(eFt,o,5)),o.a),c)}function lYn(n){hP(n,new hCn(FT(DT(KT(RT(new bu,ant),"ELK Rectangle Packing"),"Algorithm for packing of unconnected boxes, i.e. graphs without edges. The given order of the boxes is always preserved and the main reading direction of the boxes is left to right. The algorithm is divided into two phases. One phase approximates the width in which the rectangles can be placed. The next phase places the rectangles in rows using the previously calculated width as bounding width and bundles rectangles with a similar height in blocks. A compaction step reduces the size of the drawing. Finally, the rectangles are expanded to fill their bounding box and eliminate empty unused spaces."),new _o))),U4(n,ant,R3n,1.3),U4(n,ant,d4n,(qx(),!1)),U4(n,ant,K3n,fAt),U4(n,ant,o4n,15),U4(n,ant,r9n,Jkn(WOt)),U4(n,ant,p4n,Jkn(eAt)),U4(n,ant,x4n,Jkn(rAt)),U4(n,ant,g4n,Jkn(cAt)),U4(n,ant,m4n,Jkn(tAt)),U4(n,ant,w4n,Jkn(aAt)),U4(n,ant,v4n,Jkn(lAt)),U4(n,ant,J7n,Jkn(pAt)),U4(n,ant,Y7n,Jkn(gAt)),U4(n,ant,Q7n,Jkn(vAt)),U4(n,ant,W7n,Jkn(mAt)),U4(n,ant,Z7n,Jkn(sAt)),U4(n,ant,nnt,Jkn(uAt)),U4(n,ant,tnt,Jkn(oAt)),U4(n,ant,ent,Jkn(dAt)),U4(n,ant,f4n,Jkn(YOt)),U4(n,ant,g9n,Jkn(ZOt)),U4(n,ant,z7n,Jkn(JOt)),U4(n,ant,X7n,Jkn(QOt)),U4(n,ant,V7n,Jkn(nAt)),U4(n,ant,q7n,Jkn(wAt))}function bYn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C;if(pXn(),j=n.e,w=n.d,r=n.a,0==j)switch(t){case 0:return"0";case 1:return N0n;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return(M=new WM).a+=t<0?"0E+":"0E",M.a+=-t,M.a}if(k=Inn(JHt,N1n,28,1+(v=10*w+1+7),15,1),e=v,1==w)if((o=r[0])<0){C=E3(o,L0n);do{d=C,C=bSn(C,10),k[--e]=48+pz($gn(d,Ngn(C,10)))&D1n}while(0!=dwn(C,0))}else{C=o;do{d=C,C=C/10|0,k[--e]=d-10*C+48&D1n}while(0!=C)}else{qGn(r,0,S=Inn(YHt,W1n,28,w,15,1),0,P=w);n:for(;;){for(T=0,s=P-1;s>=0;s--)p=JPn(Lgn(Nz(T,32),E3(S[s],L0n))),S[s]=pz(p),T=pz($z(p,32));m=pz(T),g=e;do{k[--e]=48+m%10&D1n}while(0!=(m=m/10|0)&&0!=e);for(i=9-g+e,u=0;u<i&&e>0;u++)k[--e]=48;for(f=P-1;0==S[f];f--)if(0==f)break n;P=f+1}for(;48==k[e];)++e}if(b=j<0,a=v-e-t-1,0==t)return b&&(k[--e]=45),mvn(k,e,v-e);if(t>0&&a>=-6){if(a>=0){for(h=e+a,l=v-1;l>=h;l--)k[l+1]=k[l];return k[++h]=46,b&&(k[--e]=45),mvn(k,e,v-e+1)}for(f=2;f<1-a;f++)k[--e]=48;return k[--e]=46,k[--e]=48,b&&(k[--e]=45),mvn(k,e,v-e)}return E=e+1,c=v,y=new QM,b&&(y.a+="-"),c-E>=1?(jQ(y,k[e]),y.a+=".",y.a+=mvn(k,e+1,v-e-1)):y.a+=mvn(k,e,v-e),y.a+="E",a>0&&(y.a+="+"),y.a+=""+a,y.a}function wYn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;switch(n.c=t,n.g=new Ym,vP(),Apn(new Ad(new Vy(n.c))),m=mK(zDn(n.c,(fIn(),dLt))),o=uG(zDn(n.c,pLt),324),k=uG(zDn(n.c,mLt),437),c=uG(zDn(n.c,hLt),490),v=uG(zDn(n.c,gLt),438),n.j=uM(pK(zDn(n.c,vLt))),a=n.a,o.g){case 0:a=n.a;break;case 1:a=n.b;break;case 2:a=n.i;break;case 3:a=n.e;break;case 4:a=n.f;break;default:throw hv(new vM(lnt+(null!=o.f?o.f:""+o.g)))}if(n.d=new i0(a,k,c),kfn(n.d,(rsn(),Oht),gK(zDn(n.c,lLt))),n.d.c=oM(gK(zDn(n.c,fLt))),0==wZ(n.c).i)return n.d;for(h=new DD(wZ(n.c));h.e!=h.i.gc();){for(l=(s=uG(Zkn(h),27)).g/2,f=s.f/2,y=new MO(s.i+l,s.j+f);PV(n.g,y);)KR(y,(e.Math.random()-.5)*t4n,(e.Math.random()-.5)*t4n);w=uG(zDn(s,(XYn(),$$t)),140),d=new G0(y,new gY(y.a-l-n.j/2-w.b,y.b-f-n.j/2-w.d,s.g+n.j+(w.b+w.c),s.f+n.j+(w.d+w.a))),kD(n.d.i,d),vJ(n.g,y,new WO(d,s))}switch(v.g){case 0:if(null==m)n.d.d=uG(zq(n.d.i,0),68);else for(p=new Ww(n.d.i);p.a<p.c.c.length;)d=uG(N3(p),68),null!=(b=uG(uG(cQ(n.g,d.a),42).b,27).jh())&&m_(b,m)&&(n.d.d=d);break;case 1:for((i=new MO(n.c.g,n.c.f)).a*=.5,i.b*=.5,KR(i,n.c.i,n.c.j),r=M0n,g=new Ww(n.d.i);g.a<g.c.c.length;)(u=atn((d=uG(N3(g),68)).a,i))<r&&(r=u,n.d.d=d);break;default:throw hv(new vM(lnt+(null!=v.f?v.f:""+v.g)))}return n.d}function dYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(l=0,r=new DD((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a));r.e!=r.i.gc();)oM(gK(zDn(i=uG(Zkn(r),27),(jYn(),FMt))))||(xA(zDn(h=R0(i),Syt))===xA((yvn(),Fjt))&&xA(zDn(h,Fyt))!==xA((kvn(),lgt))&&xA(zDn(h,Fyt))!==xA((kvn(),hgt))&&!oM(gK(zDn(h,Cyt)))&&xA(zDn(h,kyt))===xA((Uvn(),tbt))&&xA(zDn(h,yMt))!==xA((THn(),Pjt))&&xA(zDn(h,yMt))!==xA((THn(),Cjt))&&xA(zDn(h,MMt))!==xA((MKn(),JTt))&&xA(zDn(h,MMt))!==xA((MKn(),ZTt))||oM(gK(zDn(i,jyt)))||(Myn(i,(GYn(),imt),xwn(l)),++l),RJn(n,i,e));for(l=0,s=new DD((!t.b&&(t.b=new fV(aFt,t,12,3)),t.b));s.e!=s.i.gc();)o=uG(Zkn(s),74),(xA(zDn(t,(jYn(),Syt)))!==xA((yvn(),Fjt))||xA(zDn(t,Fyt))===xA((kvn(),lgt))||xA(zDn(t,Fyt))===xA((kvn(),hgt))||oM(gK(zDn(t,Cyt)))||xA(zDn(t,kyt))!==xA((Uvn(),tbt))||xA(zDn(t,yMt))===xA((THn(),Pjt))||xA(zDn(t,yMt))===xA((THn(),Cjt))||xA(zDn(t,MMt))===xA((MKn(),JTt))||xA(zDn(t,MMt))===xA((MKn(),ZTt)))&&(Myn(o,(GYn(),imt),xwn(l)),++l),d=bIn(o),g=gIn(o),f=oM(gK(zDn(d,sMt))),w=!oM(gK(zDn(o,FMt))),b=f&&BNn(o)&&oM(gK(zDn(o,hMt))),c=R0(d)==t&&R0(d)==R0(g),a=(R0(d)==t&&g==t)^(R0(g)==t&&d==t),w&&!b&&(a||c)&&FYn(n,o,t,e);if(R0(t))for(u=new DD(xY(R0(t)));u.e!=u.i.gc();)(d=bIn(o=uG(Zkn(u),74)))==t&&BNn(o)&&(b=oM(gK(zDn(d,(jYn(),sMt))))&&oM(gK(zDn(o,hMt))))&&FYn(n,o,t,e)}function gYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A;for(e.Ug("Greedy cycle removal",1),A=(v=t.a).c.length,n.a=Inn(YHt,W1n,28,A,15,1),n.c=Inn(YHt,W1n,28,A,15,1),n.b=Inn(YHt,W1n,28,A,15,1),s=0,p=new Ww(v);p.a<p.c.c.length;){for((d=uG(N3(p),10)).p=s,j=new Ww(d.j);j.a<j.c.c.length;){for(o=new Ww((y=uG(N3(j),12)).e);o.a<o.c.c.length;)(i=uG(N3(o),18)).c.i!=d&&(S=uG(oIn(i,(jYn(),aTt)),17).a,n.a[s]+=S>0?S+1:1);for(a=new Ww(y.g);a.a<a.c.c.length;)(i=uG(N3(a),18)).d.i!=d&&(S=uG(oIn(i,(jYn(),aTt)),17).a,n.c[s]+=S>0?S+1:1)}0==n.c[s]?aq(n.e,d):0==n.a[s]&&aq(n.f,d),++s}for(w=-1,b=1,f=new Zm,n.d=uG(oIn(t,(GYn(),dmt)),234);A>0;){for(;0!=n.e.b;)C=uG(tG(n.e),10),n.b[C.p]=w--,iUn(n,C),--A;for(;0!=n.f.b;)I=uG(tG(n.f),10),n.b[I.p]=b++,iUn(n,I),--A;if(A>0){for(l=j1n,m=new Ww(v);m.a<m.c.c.length;)d=uG(N3(m),10),0==n.b[d.p]&&(k=n.c[d.p]-n.a[d.p])>=l&&(k>l&&(f.c.length=0,l=k),mv(f.c,d));h=n.sg(f),n.b[h.p]=b++,iUn(n,h),--A}}for(P=v.c.length+1,s=0;s<v.c.length;s++)n.b[s]<0&&(n.b[s]+=P);for(g=new Ww(v);g.a<g.c.c.length;)for(T=0,E=(M=s6((d=uG(N3(g),10)).j)).length;T<E;++T)for(c=0,u=(r=x4((y=M[T]).g)).length;c<u;++c)O=(i=r[c]).d.i.p,n.b[d.p]>n.b[O]&&(pqn(i,!0),kfn(t,Lpt,(qx(),!0)));n.a=null,n.c=null,n.b=null,BY(n.f),BY(n.e),e.Vg()}function pYn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;for(M=uG(zrn((!n.a&&(n.a=new fV(oFt,n,6,6)),n.a),0),166),f=new Uk,y=new Ym,T=sGn(M),VAn(y.f,M,T),b=new Ym,r=new lS,d=OV(zcn(Uhn(cT(vat,1),EZn,20,0,[(!t.d&&(t.d=new f_(aFt,t,8,5)),t.d),(!t.e&&(t.e=new f_(aFt,t,7,4)),t.e)])));hDn(d);){if(w=uG(N9(d),74),1!=(!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i)throw hv(new vM(Ptt+(!n.a&&(n.a=new fV(oFt,n,6,6)),n.a).i));w!=n&&(s8(r,p=uG(zrn((!w.a&&(w.a=new fV(oFt,w,6,6)),w.a),0),166),r.c.b,r.c),(g=uG(DA(FX(y.f,p)),13))||(g=sGn(p),VAn(y.f,p,g)),l=i?YF(new eN(uG(zq(T,T.c.length-1),8)),uG(zq(g,g.c.length-1),8)):YF(new eN((u3(0,T.c.length),uG(T.c[0],8))),(u3(0,g.c.length),uG(g.c[0],8))),VAn(b.f,p,l))}if(0!=r.b)for(m=uG(zq(T,i?T.c.length-1:0),8),h=1;h<T.c.length;h++){for(v=uG(zq(T,i?T.c.length-1-h:h),8),c=Fkn(r,0);c.b!=c.d.c;)p=uG(I6(c),166),(g=uG(DA(FX(y.f,p)),13)).c.length<=h?yrn(c):(k=JF(new eN(uG(zq(g,i?g.c.length-1-h:h),8)),uG(DA(FX(b.f,p)),8)),v.a==k.a&&v.b==k.b||(a=v.a-m.a,u=v.b-m.b,(o=k.a-m.a)*u==(s=k.b-m.b)*a&&(0==a||isNaN(a)?a:a<0?-1:1)==(0==o||isNaN(o)?o:o<0?-1:1)&&(0==u||isNaN(u)?u:u<0?-1:1)==(0==s||isNaN(s)?s:s<0?-1:1)?(e.Math.abs(a)<e.Math.abs(o)||e.Math.abs(u)<e.Math.abs(s))&&s8(f,v,f.c.b,f.c):h>1&&s8(f,m,f.c.b,f.c),yrn(c)));m=v}return f}function mYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S;for(e.Ug(o7n,1),S=uG(l8(JJ(new fX(null,new h3(t,16)),new wo),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),h=uG(l8(JJ(new fX(null,new h3(t,16)),new Lp(t)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15),w=uG(l8(JJ(new fX(null,new h3(t,16)),new Ap(t)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15),d=Inn(lPt,z9n,40,t.gc(),0,1),a=0;a<h.gc();a++)r=uG(h.Xb(a),40),(E=uG(oIn(r,(QGn(),kCt)),17).a)>=0&&E<h.gc()&&!d[E]&&(d[E]=r,h.gd(a),--a);for(o=0;o<h.gc();o++)for(r=uG(h.Xb(o),40),E=uG(oIn(r,(QGn(),kCt)),17).a,l=0;;l++){if((b=E+l)<d.length&&b>=0&&!d[b]){d[b]=r,h.gd(o),--o;break}if((b=E-l)<d.length&&b>=0&&!d[b]){d[b]=r,h.gd(o),--o;break}}for(w.jd(new go),u=d.length-1;u>=0;u--)d[u]||w.dc()||(d[u]=uG(w.Xb(0),40),w.gd(0));for(s=0;s<d.length;s++)d[s]||S.dc()||(d[s]=uG(S.Xb(0),40),S.gd(0));for(c=0;c<d.length;c++)kfn(d[c],(OQn(),KPt),xwn(c));for(T=0,j=(M=f=uG(bmn(JJ(new fX(null,new h3(t,16)),new po),new lo),534)).length;T<j;++T){for(mYn(n,i=Lhn(y=M[T]),e.eh(1/f.length|0)),hZ(),Lon(i,new Sm((OQn(),KPt))),g=new lS,k=Fkn(i,0);k.b!=k.d.c;)for(v=uG(I6(k),40),m=Fkn(y.d,0);m.b!=m.d.c;)(p=uG(I6(m),65)).c==v&&s8(g,p,g.c.b,g.c);BY(y.d),Qon(y.d,g)}e.Vg()}function vYn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p;for(i=new Zm,o=new Zm,g=t/2,b=n.gc(),r=uG(n.Xb(0),8),p=uG(n.Xb(1),8),kD(i,(u3(0,(w=UDn(r.a,r.b,p.a,p.b,g)).c.length),uG(w.c[0],8))),kD(o,(u3(1,w.c.length),uG(w.c[1],8))),s=2;s<b;s++)d=r,r=p,p=uG(n.Xb(s),8),kD(i,(u3(1,(w=UDn(r.a,r.b,d.a,d.b,g)).c.length),uG(w.c[1],8))),kD(o,(u3(0,w.c.length),uG(w.c[0],8))),kD(i,(u3(0,(w=UDn(r.a,r.b,p.a,p.b,g)).c.length),uG(w.c[0],8))),kD(o,(u3(1,w.c.length),uG(w.c[1],8)));for(kD(i,(u3(1,(w=UDn(p.a,p.b,r.a,r.b,g)).c.length),uG(w.c[1],8))),kD(o,(u3(0,w.c.length),uG(w.c[0],8))),e=new Uk,a=new Zm,aq(e,(u3(0,i.c.length),uG(i.c[0],8))),h=1;h<i.c.length-2;h+=2)u3(h,i.c.length),c=uG(i.c[h],8),l=OAn((u3(h-1,i.c.length),uG(i.c[h-1],8)),c,(u3(h+1,i.c.length),uG(i.c[h+1],8)),(u3(h+2,i.c.length),uG(i.c[h+2],8))),isFinite(l.a)&&isFinite(l.b)?s8(e,l,e.c.b,e.c):s8(e,c,e.c.b,e.c);for(aq(e,uG(zq(i,i.c.length-1),8)),kD(a,(u3(0,o.c.length),uG(o.c[0],8))),f=1;f<o.c.length-2;f+=2)u3(f,o.c.length),c=uG(o.c[f],8),l=OAn((u3(f-1,o.c.length),uG(o.c[f-1],8)),c,(u3(f+1,o.c.length),uG(o.c[f+1],8)),(u3(f+2,o.c.length),uG(o.c[f+2],8))),isFinite(l.a)&&isFinite(l.b)?mv(a.c,l):mv(a.c,c);for(kD(a,uG(zq(o,o.c.length-1),8)),u=a.c.length-1;u>=0;u--)aq(e,(u3(u,a.c.length),uG(a.c[u],8)));return e}function kYn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(v=uM(pK(zDn(t,(lBn(),POt)))),b=uM(pK(zDn(t,EOt))),l=uM(pK(zDn(t,MOt))),Non((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a)),p=uzn((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a),v,n.b),g=0;g<p.c.length;g++)if(u3(g,p.c.length),s=uG(p.c[g],186),0!=g&&(u3(g-1,p.c.length),Rbn(s,(w=uG(p.c[g-1],186)).f+w.b+n.b)),d=TYn(g,p,v,n.b,oM(gK(zDn(t,(S_n(),uAt))))),oM(gK(d.b))){for(a=new Ww(s.a);a.a<a.c.c.length;)(c=uG(N3(a),172)).c=!1,c.k=!1,EXn(c);s.d=new Zm,s.e=v,--g}else if(EEn(n,s),g+1<p.c.length&&(n.e=e.Math.max(s.e+n.b+uG(zq((u3(g+1,p.c.length),uG(p.c[g+1],186)).a,0),172).r-v,n.c),n.f=e.Math.min(s.e+n.b+uG(zq((u3(g+1,p.c.length),uG(p.c[g+1],186)).a,0),172).r-v,n.d),0!=s.d.c.length&&(n.c=e.Math.max(n.c,uG(zq(s.d,s.d.c.length-1),315).d+(s.d.c.length<=1?0:n.b)),n.d=e.Math.min(n.c,uG(zq(s.d,s.d.c.length-1),315).d+(s.d.c.length<=1?0:n.b)))),1==p.c.length)for(f=uG(zq(s.d,s.d.c.length-1),315),u=new Ww((h=uG(zq(f.a,f.a.c.length-1),172)).n);u.a<u.c.c.length;)o=uG(N3(u),209),n.c=e.Math.max(n.c,h.r-o.d),n.d=e.Math.min(n.d,h.r-o.d),n.e=e.Math.max(n.e,o.d+n.b),n.f=e.Math.min(n.f,o.d+n.b);return m=Xjn(p,n.b),k=e.Math.max(m.a,b-(i.b+i.c)),r=e.Math.max(m.b,l-(i.d+i.a))-m.b,Myn(t,pOt,r),Myn(t,SOt,p),new jq(n.a,k,m.b+r,(_Rn(),FAt))}function yYn(n){var t,e,i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P;if((M=uG(oIn(n,(jYn(),JMt)),101))!=($Pn(),uRt)&&M!=sRt){for(s=new R7((man((b=(w=n.b).c.length)+2,v1n),arn(Lgn(Lgn(5,b+2),(b+2)/10|0)))),d=new R7((man(b+2,v1n),arn(Lgn(Lgn(5,b+2),(b+2)/10|0)))),kD(s,new Ym),kD(s,new Ym),kD(d,new Zm),kD(d,new Zm),y=new Zm,t=0;t<b;t++)for(u3(t,w.c.length),e=uG(w.c[t],30),u3(t,s.c.length),T=uG(s.c[t],85),g=new Ym,mv(s.c,g),u3(t,d.c.length),E=uG(d.c[t],15),m=new Zm,mv(d.c,m),r=new Ww(e.a);r.a<r.c.c.length;)if(Tdn(i=uG(N3(r),10)))mv(y.c,i);else{for(u=new Fz(ix(qgn(i).a.Kc(),new h));hDn(u);)Tdn(S=(a=uG(N9(u),18)).c.i)&&((j=uG(T.xc(oIn(S,(GYn(),rmt))),10))||(j=YLn(n,S),T.zc(oIn(S,rmt),j),E.Fc(j)),c2(a,uG(zq(j.j,1),12)));for(o=new Fz(ix(Xgn(i).a.Kc(),new h));hDn(o);)Tdn(P=(a=uG(N9(o),18)).d.i)&&((p=uG(cQ(g,oIn(P,(GYn(),rmt))),10))||(p=YLn(n,P),vJ(g,oIn(P,rmt),p),mv(m.c,p)),u2(a,uG(zq(p.j,0),12)))}for(f=0;f<d.c.length;f++)if(u3(f,d.c.length),!(v=uG(d.c[f],15)).dc())for(l=null,0==f?(l=new bQ(n),o3(0,w.c.length),pC(w.c,0,l)):f==s.c.length-1?(l=new bQ(n),mv(w.c,l)):(u3(f-1,w.c.length),l=uG(w.c[f-1],30)),c=v.Kc();c.Ob();)a2(uG(c.Pb(),10),l);for(k=new Ww(y);k.a<k.c.c.length;)a2(uG(N3(k),10),null);kfn(n,(GYn(),Rpt),y)}}function MYn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A,L;for(O=new Zm,w=new Ww(t.b);w.a<w.c.c.length;)for(y=new Ww(uG(N3(w),30).a);y.a<y.c.c.length;){for((k=uG(N3(y),10)).p=-1,l=j1n,j=j1n,S=new Ww(k.j);S.a<S.c.c.length;){for(c=new Ww((E=uG(N3(S),12)).e);c.a<c.c.c.length;)i=uG(N3(c),18),P=uG(oIn(i,(jYn(),uTt)),17).a,l=e.Math.max(l,P);for(r=new Ww(E.g);r.a<r.c.c.length;)i=uG(N3(r),18),P=uG(oIn(i,(jYn(),uTt)),17).a,j=e.Math.max(j,P)}kfn(k,iSt,xwn(l)),kfn(k,rSt,xwn(j))}for(p=0,b=new Ww(t.b);b.a<b.c.c.length;)for(y=new Ww(uG(N3(b),30).a);y.a<y.c.c.length;)(k=uG(N3(y),10)).p<0&&((I=new Tk).b=p++,yBn(n,k,I),mv(O.c,I));for(T=iR(O.c.length),f=iR(O.c.length),o=0;o<O.c.length;o++)kD(T,new Zm),kD(f,xwn(0));for($Wn(t,O,T,f),A=uG(Ekn(O,Inn(oSt,C9n,261,O.c.length,0,1)),854),M=uG(Ekn(T,Inn(yat,H3n,15,T.c.length,0,1)),198),h=Inn(YHt,W1n,28,f.c.length,15,1),u=0;u<h.length;u++)h[u]=(u3(u,f.c.length),uG(f.c[u],17)).a;for(m=0,v=new Zm,s=0;s<A.length;s++)0==h[s]&&mv(v.c,A[s]);for(g=Inn(YHt,W1n,28,A.length,15,1);0!=v.c.length;)for(g[(I=uG(i7(v,0),261)).b]=m++;!M[I.b].dc();)--h[(L=uG(M[I.b].gd(0),261)).b],0==h[L.b]&&mv(v.c,L);for(n.a=Inn(oSt,C9n,261,A.length,0,1),a=0;a<A.length;a++)for(d=A[a],C=g[a],n.a[C]=d,d.b=C,y=new Ww(d.e);y.a<y.c.c.length;)(k=uG(N3(y),10)).p=C;return n.a}function TYn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b,w,d,g,p;for(d=!1,u=!1,l=n+1,u3(n,t.c.length),o=(w=uG(t.c[n],186)).a,s=null,a=0;a<w.a.c.length;a++)if(u3(a,o.c.length),!(c=uG(o.c[a],172)).c)if(0!=c.b.c.length){if(c.k||(s&&OTn(s),oMn(c,(s=new r0(s?s.e+s.d+i:0,w.f,i)).e+s.d,w.f),kD(w.d,s),Gun(s,c),c.k=!0),h=null,p=null,a<w.a.c.length-1?p=uG(zq(w.a,a+1),172):l<t.c.length&&0!=(u3(l,t.c.length),uG(t.c[l],186)).a.c.length&&(p=uG(zq((u3(l,t.c.length),uG(t.c[l],186)).a,0),172)),g=!1,(h=p)&&(g=!udn(h.j,w)),h){if(0==h.b.c.length||oM(gK(uG(zq(h.b,0),27).of((S_n(),nAt))))){uEn(w,h);break}if(dtn(c,e-c.s),OTn(c.q),d|=FIn(w,c,h,e,i),0==h.b.c.length)for(t.c.length>l&&uEn((u3(l,t.c.length),uG(t.c[l],186)),h),h=null;t.c.length>l&&0==(u3(l,t.c.length),uG(t.c[l],186)).a.c.length;)men(t,(u3(l,t.c.length),t.c[l]));if(!h){--a;continue}if(!oM(gK(uG(zq(h.b,0),27).of((S_n(),nAt))))&&HUn(t,w,c,h,g,e,l,i)){d=!0;continue}if(g){if(b=w.b,f=h.f,!oM(gK(uG(zq(h.b,0),27).of(nAt)))&&EVn(t,w,c,h,e,l,i,r)){if(d=!0,b<f){u=!0,h.j=w;break}continue}if(Ybn(w,c)){c.c=!0,d=!0;continue}}else if(Ybn(w,c)){c.c=!0,d=!0;continue}if(d)continue}Ybn(w,c)?(c.c=!0,d=!0,h&&(h.k=!1)):OTn(c.q)}else bS(),String.fromCharCode(10),uEn(w,c),--a,d=!0;return new WO((qx(),!!d),!!u)}function jYn(){jYn=E,XYn(),lTt=jDt,bTt=EDt,wTt=SDt,dTt=PDt,pTt=CDt,mTt=IDt,yTt=ADt,TTt=NDt,jTt=$Dt,MTt=LDt,ETt=DDt,PTt=xDt,ITt=FDt,kTt=ODt,VYn(),fTt=Akt,gTt=Lkt,vTt=Nkt,STt=$kt,cTt=new _N(vDt,xwn(0)),aTt=Ckt,oTt=Ikt,uTt=Okt,qTt=ryt,RTt=Rkt,KTt=_kt,BTt=Vkt,FTt=Ukt,_Tt=qkt,zTt=syt,XTt=ayt,UTt=nyt,HTt=Ykt,GTt=eyt,LMt=vkt,NMt=kkt,Zyt=Ovt,nMt=Nvt,NTt=HDt,DTt=XDt,LTt=BDt,ATt=_Dt,Iwn(),new _N(UDt,$Tt=fKt),BMt=new CN(12),_Mt=new _N(W$t,BMt),_gn(),Vyt=new _N(k$t,Wyt=uxt),QMt=new _N(uDt,0),sTt=new _N(kDt,xwn(1)),dyt=new _N(c$t,r4n),FMt=z$t,JMt=sDt,eTt=gDt,_yt=w$t,byt=i$t,rMt=E$t,hTt=new _N(TDt,(qx(),!0)),sMt=C$t,hMt=I$t,DMt=_$t,KMt=q$t,xMt=H$t,xdn(),Byt=new _N(d$t,Uyt=ZDt),PMt=K$t,SMt=x$t,nTt=bDt,ZMt=lDt,tTt=dDt,Vkn(),new _N(tDt,GMt=tRt),XMt=rDt,zMt=cDt,VMt=aDt,qMt=iDt,xTt=xkt,MMt=rkt,yMt=ekt,OTt=Dkt,gMt=Vvt,Fyt=gvt,Kyt=wvt,Cyt=Jmt,Iyt=Ymt,Ayt=ivt,Oyt=Zmt,Ryt=lvt,jMt=akt,EMt=okt,lMt=Bvt,$Mt=jkt,IMt=fkt,eMt=xvt,AMt=pkt,Jyt=Svt,Yyt=Cvt,Pyt=l$t,CMt=ukt,vyt=Fmt,myt=Rmt,pyt=xmt,aMt=Fvt,cMt=Kvt,oMt=_vt,RMt=U$t,bMt=L$t,tMt=M$t,Xyt=m$t,qyt=p$t,Lyt=avt,YMt=fDt,gyt=f$t,uMt=P$t,WMt=oDt,HMt=J$t,UMt=Z$t,mMt=Jvt,vMt=Zvt,rTt=mDt,wyt=Dmt,kMt=tkt,zyt=Mvt,Gyt=kvt,TMt=$$t,wMt=qvt,OMt=wkt,CTt=RDt,Hyt=mvt,iTt=Skt,Qyt=jvt,Nyt=uvt,$yt=svt,dMt=zvt,Dyt=hvt,fMt=A$t,pMt=Qvt,xyt=fvt,Syt=Wmt,Tyt=qmt,yyt=Umt,Myt=Gmt,jyt=zmt,kyt=Bmt,Eyt=Vmt,iMt=Rvt}function EYn(n){var t,e,i;if(n.d>=n.j)return n.a=-1,void(n.c=1);if(t=VJ(n.i,n.d++),n.a=t,1!=n.b){switch(t){case 124:i=2;break;case 42:i=3;break;case 43:i=4;break;case 63:i=5;break;case 41:i=7;break;case 46:i=8;break;case 91:i=9;break;case 94:i=11;break;case 36:i=12;break;case 40:if(i=6,n.d>=n.j)break;if(63!=VJ(n.i,n.d))break;if(++n.d>=n.j)throw hv(new CM(rZn((t$(),iit))));switch(t=VJ(n.i,n.d++)){case 58:i=13;break;case 61:i=14;break;case 33:i=15;break;case 91:i=19;break;case 62:i=18;break;case 60:if(n.d>=n.j)throw hv(new CM(rZn((t$(),iit))));if(61==(t=VJ(n.i,n.d++)))i=16;else{if(33!=t)throw hv(new CM(rZn((t$(),rit))));i=17}break;case 35:for(;n.d<n.j&&41!=(t=VJ(n.i,n.d++)););if(41!=t)throw hv(new CM(rZn((t$(),cit))));i=21;break;default:if(45==t||97<=t&&t<=122||65<=t&&t<=90){--n.d,i=22;break}if(40==t){i=23;break}throw hv(new CM(rZn((t$(),iit))))}break;case 92:if(i=10,n.d>=n.j)throw hv(new CM(rZn((t$(),eit))));n.a=VJ(n.i,n.d++);break;default:i=0}n.c=i}else{switch(t){case 92:if(i=10,n.d>=n.j)throw hv(new CM(rZn((t$(),eit))));n.a=VJ(n.i,n.d++);break;case 45:!(512&~n.e)&&n.d<n.j&&91==VJ(n.i,n.d)?(++n.d,i=24):i=0;break;case 91:if(512&~n.e&&n.d<n.j&&58==VJ(n.i,n.d)){++n.d,i=20;break}default:(64512&t)==C0n&&n.d<n.j&&56320==(64512&(e=VJ(n.i,n.d)))&&(n.a=P0n+(t-C0n<<10)+e-56320,++n.d),i=0}n.c=i}}function SYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g;if(e.Ug("Process compaction",1),oM(gK(oIn(t,(QGn(),iCt))))){for(r=uG(oIn(t,cCt),88),b=uM(pK(oIn(t,ECt))),AXn(n,t,r),fJn(t,b/2/2),Lon(w=t.b,new jp(r)),s=Fkn(w,0);s.b!=s.d.c;)if(!oM(gK(oIn(u=uG(I6(s),40),(OQn(),UPt))))){if(i=hBn(u,r),d=mqn(u,t),f=0,l=0,i)switch(g=i.e,r.g){case 2:f=g.a-b-u.f.a,d.e.a-b-u.f.a<f&&(f=d.e.a-b-u.f.a),l=f+u.f.a;break;case 1:f=g.a+i.f.a+b,d.e.a+b>f&&(f=d.e.a+d.f.a+b),l=f+u.f.a;break;case 4:f=g.b-b-u.f.b,d.e.b-b-u.f.b<f&&(f=d.e.b-b-u.f.b),l=f+u.f.b;break;case 3:f=g.b+i.f.b+b,d.e.b+b>f&&(f=d.e.b+d.f.b+b),l=f+u.f.b}else if(d)switch(r.g){case 2:l=(f=d.e.a-b-u.f.a)+u.f.a;break;case 1:l=(f=d.e.a+d.f.a+b)+u.f.a;break;case 4:l=(f=d.e.b-b-u.f.b)+u.f.b;break;case 3:l=(f=d.e.b+d.f.b+b)+u.f.b}xA(oIn(t,uCt))===xA((Pln(),wPt))?(c=f,a=l,null!=(o=lln(JJ(new fX(null,new h3(n.a,16)),new GI(c,a)))).a?r==(xdn(),JDt)||r==YDt?u.e.a=f:u.e.b=f:null!=(o=r==(xdn(),JDt)||r==nxt?lln(JJ(Wrn(new fX(null,new h3(n.a,16))),new Ep(c))):lln(JJ(Wrn(new fX(null,new h3(n.a,16))),new Sp(c)))).a&&(r==JDt||r==YDt?u.e.a=uM(pK((MK(null!=o.a),uG(o.a,42)).a)):u.e.b=uM(pK((MK(null!=o.a),uG(o.a,42)).a))),null!=o.a&&(h=Ten(n.a,(MK(null!=o.a),o.a),0))>0&&h!=uG(oIn(u,ACt),17).a&&(kfn(u,MPt,(qx(),!0)),kfn(u,ACt,xwn(h)))):r==(xdn(),JDt)||r==YDt?u.e.a=f:u.e.b=f}e.Vg()}}function PYn(n){var t,e,i,r,c,a,o,u;for(n.b=1,EYn(n),t=null,0==n.c&&94==n.a?(EYn(n),QYn(),QYn(),HFn(t=new K3(4),0,zct),a=new K3(4)):(QYn(),QYn(),a=new K3(4)),r=!0;1!=(u=n.c);){if(0==u&&93==n.a&&!r){t&&(lWn(t,a),a=t);break}if(e=n.a,i=!1,10==u)switch(e){case 100:case 68:case 119:case 87:case 115:case 83:TXn(a,MUn(e)),i=!0;break;case 105:case 73:case 99:case 67:TXn(a,MUn(e)),(e=-1)<0&&(i=!0);break;case 112:case 80:if(!(o=PNn(n,e)))throw hv(new CM(rZn((t$(),git))));TXn(a,o),i=!0;break;default:e=R_n(n)}else if(24==u&&!r){if(t&&(lWn(t,a),a=t),lWn(a,PYn(n)),0!=n.c||93!=n.a)throw hv(new CM(rZn((t$(),kit))));break}if(EYn(n),!i){if(0==u){if(91==e)throw hv(new CM(rZn((t$(),yit))));if(93==e)throw hv(new CM(rZn((t$(),Mit))));if(45==e&&!r&&93!=n.a)throw hv(new CM(rZn((t$(),Tit))))}if(0!=n.c||45!=n.a||45==e&&r)HFn(a,e,e);else{if(EYn(n),1==(u=n.c))throw hv(new CM(rZn((t$(),mit))));if(0==u&&93==n.a)HFn(a,e,e),HFn(a,45,45);else{if(0==u&&93==n.a||24==u)throw hv(new CM(rZn((t$(),Tit))));if(c=n.a,0==u){if(91==c)throw hv(new CM(rZn((t$(),yit))));if(93==c)throw hv(new CM(rZn((t$(),Mit))));if(45==c)throw hv(new CM(rZn((t$(),Tit))))}else 10==u&&(c=R_n(n));if(EYn(n),e>c)throw hv(new CM(rZn((t$(),Sit))));HFn(a,e,c)}}}r=!1}if(1==n.c)throw hv(new CM(rZn((t$(),mit))));return pxn(a),szn(a),n.b=0,EYn(n),a}function CYn(n,t,e){var i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k,y,M;if(e.Ug("Coffman-Graham Layering",1),0!=t.a.c.length){for(M=uG(oIn(t,(jYn(),wMt)),17).a,u=0,a=0,b=new Ww(t.a);b.a<b.c.c.length;)for((l=uG(N3(b),10)).p=u++,c=new Fz(ix(Xgn(l).a.Kc(),new h));hDn(c);)(r=uG(N9(c),18)).p=a++;for(n.d=Inn(ZHt,B2n,28,u,16,1),n.a=Inn(ZHt,B2n,28,a,16,1),n.b=Inn(YHt,W1n,28,u,15,1),n.e=Inn(YHt,W1n,28,u,15,1),n.f=Inn(YHt,W1n,28,u,15,1),ban(n.c),BSn(n,t),d=new Kz(new Bg(n)),y=new Ww(t.a);y.a<y.c.c.length;){for(c=new Fz(ix(qgn(v=uG(N3(y),10)).a.Kc(),new h));hDn(c);)r=uG(N9(c),18),n.a[r.p]||++n.b[v.p];0==n.b[v.p]&&kG(_Cn(d,v),D0n)}for(o=0;0!=d.b.c.length;)for(v=uG(hin(d),10),n.f[v.p]=o++,c=new Fz(ix(Xgn(v).a.Kc(),new h));hDn(c);)r=uG(N9(c),18),n.a[r.p]||(p=r.d.i,--n.b[p.p],UNn(n.c,p,xwn(n.f[v.p])),0==n.b[p.p]&&kG(_Cn(d,p),D0n));for(w=new Kz(new Hg(n)),k=new Ww(t.a);k.a<k.c.c.length;){for(c=new Fz(ix(Xgn(v=uG(N3(k),10)).a.Kc(),new h));hDn(c);)r=uG(N9(c),18),n.a[r.p]||++n.e[v.p];0==n.e[v.p]&&kG(_Cn(w,v),D0n)}for(i=CJ(t,f=new Zm);0!=w.b.c.length;)for(m=uG(hin(w),10),(i.a.c.length>=M||!cvn(m,i))&&(i=CJ(t,f)),a2(m,i),c=new Fz(ix(qgn(m).a.Kc(),new h));hDn(c);)r=uG(N9(c),18),n.a[r.p]||(g=r.c.i,--n.e[g.p],0==n.e[g.p]&&kG(_Cn(w,g),D0n));for(s=f.c.length-1;s>=0;--s)kD(t.b,(u3(s,f.c.length),uG(f.c[s],30)));t.a.c.length=0,e.Vg()}else e.Vg()}function IYn(n,t){var e,i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k;k=!1;do{for(k=!1,c=t?new Lw(n.a.b).a.gc()-2:1;t?c>=0:c<new Lw(n.a.b).a.gc();c+=t?-1:1)for(r=W6(n.a,xwn(c)),b=0;b<r.b;b++)if(vR(f=uG(hyn(r,b),10),(GYn(),imt))&&!(VSn(n.a,xwn(c))&&n.r==(THn(),Pjt)||WSn(n.a,xwn(c))&&n.r==(THn(),Cjt))){for(v=!0,p=0;p<r.b;p++)vR(g=uG(hyn(r,p),10),imt)&&(t&&uG(oIn(f,imt),17).a<uG(oIn(g,imt),17).a||!t&&uG(oIn(f,imt),17).a>uG(oIn(g,imt),17).a)&&(v=!1);if(v){for(o=t?c+1:c-1,a=!1,m=!0,i=!1,s=Fkn(W6(n.a,xwn(o)),0);s.b!=s.d.c;)vR(u=uG(I6(s),10),imt)?u.p!=f.p&&(a|=t?uG(oIn(u,imt),17).a<uG(oIn(f,imt),17).a:uG(oIn(u,imt),17).a>uG(oIn(f,imt),17).a,m=!1):!a&&m&&u.k==(zIn(),bbt)&&(i=!0,(l=t?uG(N9(new Fz(ix(qgn(u).a.Kc(),new h))),18).c.i:uG(N9(new Fz(ix(Xgn(u).a.Kc(),new h))),18).d.i)==f&&(e=t?uG(N9(new Fz(ix(Xgn(u).a.Kc(),new h))),18).d.i:uG(N9(new Fz(ix(qgn(u).a.Kc(),new h))),18).c.i,(t?uG(ER(n.a,e),17).a-uG(ER(n.a,l),17).a:uG(ER(n.a,l),17).a-uG(ER(n.a,e),17).a)<=2&&(m=!1)));if(i&&m&&(e=t?uG(N9(new Fz(ix(Xgn(f).a.Kc(),new h))),18).d.i:uG(N9(new Fz(ix(qgn(f).a.Kc(),new h))),18).c.i,(t?uG(ER(n.a,e),17).a-uG(ER(n.a,f),17).a:uG(ER(n.a,f),17).a-uG(ER(n.a,e),17).a)<=2&&e.k==(zIn(),dbt)&&(m=!1)),a||m){for(d=SRn(n,f,t);0!=d.a.gc();)w=uG(d.a.ec().Kc().Pb(),10),d.a.Bc(w),Qon(d,SRn(n,w,t));--b,k=!0}}}}while(k)}function OYn(n){Hxn(n.c,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#decimal"])),Hxn(n.d,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#integer"])),Hxn(n.e,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#boolean"])),Hxn(n.f,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EBoolean",Bet,"EBoolean:Object"])),Hxn(n.i,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#byte"])),Hxn(n.g,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#hexBinary"])),Hxn(n.j,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EByte",Bet,"EByte:Object"])),Hxn(n.n,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EChar",Bet,"EChar:Object"])),Hxn(n.t,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#double"])),Hxn(n.u,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EDouble",Bet,"EDouble:Object"])),Hxn(n.F,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#float"])),Hxn(n.G,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EFloat",Bet,"EFloat:Object"])),Hxn(n.I,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#int"])),Hxn(n.J,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EInt",Bet,"EInt:Object"])),Hxn(n.N,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#long"])),Hxn(n.O,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"ELong",Bet,"ELong:Object"])),Hxn(n.Z,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#short"])),Hxn(n.$,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"EShort",Bet,"EShort:Object"])),Hxn(n._,Ert,Uhn(cT($ot,1),zZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#string"]))}function AYn(n,t,e,i,r,c,a){var o,u,s,h,f,l,b,w;return l=uG(i.a,17).a,b=uG(i.b,17).a,f=n.b,w=n.c,o=0,h=0,t==(xdn(),JDt)||t==YDt?(h=$I(jdn(ZJ(YJ(new fX(null,new h3(e.b,16)),new mo),new Ya))),f.e.b+f.f.b/2>h?(s=++b,o=uM(pK(yx(Wz(YJ(new fX(null,new h3(e.b,16)),new pO(r,s)),new Za))))):(u=++l,o=uM(pK(yx(Qz(YJ(new fX(null,new h3(e.b,16)),new mO(r,u)),new no)))))):(h=$I(jdn(ZJ(YJ(new fX(null,new h3(e.b,16)),new ro),new Ja))),f.e.a+f.f.a/2>h?(s=++b,o=uM(pK(yx(Wz(YJ(new fX(null,new h3(e.b,16)),new dO(r,s)),new to))))):(u=++l,o=uM(pK(yx(Qz(YJ(new fX(null,new h3(e.b,16)),new gO(r,u)),new eo)))))),t==JDt?(cL(n.a,new MO(uM(pK(oIn(f,(OQn(),DPt))))-r,o)),cL(n.a,new MO(w.e.a+w.f.a+r+c,o)),cL(n.a,new MO(w.e.a+w.f.a+r+c,w.e.b+w.f.b/2)),cL(n.a,new MO(w.e.a+w.f.a,w.e.b+w.f.b/2))):t==YDt?(cL(n.a,new MO(uM(pK(oIn(f,(OQn(),$Pt))))+r,f.e.b+f.f.b/2)),cL(n.a,new MO(f.e.a+f.f.a+r,o)),cL(n.a,new MO(w.e.a-r-c,o)),cL(n.a,new MO(w.e.a-r-c,w.e.b+w.f.b/2)),cL(n.a,new MO(w.e.a,w.e.b+w.f.b/2))):t==nxt?(cL(n.a,new MO(o,uM(pK(oIn(f,(OQn(),DPt))))-r)),cL(n.a,new MO(o,w.e.b+w.f.b+r+c)),cL(n.a,new MO(w.e.a+w.f.a/2,w.e.b+w.f.b+r+c)),cL(n.a,new MO(w.e.a+w.f.a/2,w.e.b+w.f.b+r))):(0==n.a.b||(uG(pR(n.a),8).b=uM(pK(oIn(f,(OQn(),$Pt))))+r*uG(a.b,17).a),cL(n.a,new MO(o,uM(pK(oIn(f,(OQn(),$Pt))))+r*uG(a.b,17).a)),cL(n.a,new MO(o,w.e.b-r*uG(a.a,17).a-c))),new WO(xwn(l),xwn(b))}function LYn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b;if(a=!0,f=null,i=null,r=null,t=!1,b=HFt,s=null,c=null,(u=jkn(n,o=0,YFt,ZFt))<n.length&&(s3(u,n.length),58==n.charCodeAt(u))&&(Knn(o,u,n.length),f=n.substr(o,u-o),o=u+1),e=null!=f&&ZE(UFt,f.toLowerCase())){if(-1==(u=n.lastIndexOf("!/")))throw hv(new vM("no archive separator"));a=!0,i=r1(n,o,++u),o=u}else o>=0&&m_(n.substr(o,2),"//")?(Knn(o+=2,u=jkn(n,o,n_t,t_t),n.length),i=n.substr(o,u-o),o=u):null==f||o!=n.length&&(s3(o,n.length),47==n.charCodeAt(o))||(a=!1,-1==(u=cx(n,$Cn(35),o))&&(u=n.length),Knn(o,u,n.length),i=n.substr(o,u-o),o=u);if(!e&&o<n.length&&(s3(o,n.length),47==n.charCodeAt(o))&&(Knn(o+1,u=jkn(n,o+1,n_t,t_t),n.length),(h=n.substr(o+1,u-(o+1))).length>0&&58==VJ(h,h.length-1)&&(r=h,o=u)),o<n.length&&(s3(o,n.length),47==n.charCodeAt(o))&&(++o,t=!0),o<n.length&&(s3(o,n.length),63!=n.charCodeAt(o))&&(s3(o,n.length),35!=n.charCodeAt(o))){for(l=new Zm;o<n.length&&(s3(o,n.length),63!=n.charCodeAt(o))&&(s3(o,n.length),35!=n.charCodeAt(o));)kD(l,(Knn(o,u=jkn(n,o,n_t,t_t),n.length),n.substr(o,u-o))),(o=u)<n.length&&(s3(o,n.length),47==n.charCodeAt(o))&&(Ubn(n,++o)||l.c.push(""));Ekn(l,b=Inn($ot,zZn,2,l.c.length,6,1))}return o<n.length&&(s3(o,n.length),63==n.charCodeAt(o))&&(-1==(u=aR(n,35,++o))&&(u=n.length),Knn(o,u,n.length),s=n.substr(o,u-o),o=u),o<n.length&&(c=sQ(n,++o)),LVn(a,f,i,r,b,s),new Z_n(a,f,i,r,t,b,s,c)}function NYn(){NYn=E,aYn(),UNn(rbt=new K1,(KQn(),PRt),SRt),UNn(rbt,RRt,SRt),UNn(rbt,CRt,SRt),UNn(rbt,$Rt,SRt),UNn(rbt,NRt,SRt),UNn(rbt,ARt,SRt),UNn(rbt,$Rt,PRt),UNn(rbt,SRt,MRt),UNn(rbt,PRt,MRt),UNn(rbt,RRt,MRt),UNn(rbt,CRt,MRt),UNn(rbt,LRt,MRt),UNn(rbt,$Rt,MRt),UNn(rbt,NRt,MRt),UNn(rbt,ARt,MRt),UNn(rbt,ERt,MRt),UNn(rbt,SRt,DRt),UNn(rbt,PRt,DRt),UNn(rbt,MRt,DRt),UNn(rbt,RRt,DRt),UNn(rbt,CRt,DRt),UNn(rbt,LRt,DRt),UNn(rbt,$Rt,DRt),UNn(rbt,ERt,DRt),UNn(rbt,xRt,DRt),UNn(rbt,NRt,DRt),UNn(rbt,IRt,DRt),UNn(rbt,ARt,DRt),UNn(rbt,PRt,RRt),UNn(rbt,CRt,RRt),UNn(rbt,$Rt,RRt),UNn(rbt,ARt,RRt),UNn(rbt,PRt,CRt),UNn(rbt,RRt,CRt),UNn(rbt,$Rt,CRt),UNn(rbt,CRt,CRt),UNn(rbt,NRt,CRt),UNn(rbt,SRt,TRt),UNn(rbt,PRt,TRt),UNn(rbt,MRt,TRt),UNn(rbt,DRt,TRt),UNn(rbt,RRt,TRt),UNn(rbt,CRt,TRt),UNn(rbt,LRt,TRt),UNn(rbt,$Rt,TRt),UNn(rbt,xRt,TRt),UNn(rbt,ERt,TRt),UNn(rbt,ARt,TRt),UNn(rbt,NRt,TRt),UNn(rbt,ORt,TRt),UNn(rbt,SRt,xRt),UNn(rbt,PRt,xRt),UNn(rbt,MRt,xRt),UNn(rbt,RRt,xRt),UNn(rbt,CRt,xRt),UNn(rbt,LRt,xRt),UNn(rbt,$Rt,xRt),UNn(rbt,ERt,xRt),UNn(rbt,ARt,xRt),UNn(rbt,IRt,xRt),UNn(rbt,ORt,xRt),UNn(rbt,PRt,ERt),UNn(rbt,RRt,ERt),UNn(rbt,CRt,ERt),UNn(rbt,$Rt,ERt),UNn(rbt,xRt,ERt),UNn(rbt,ARt,ERt),UNn(rbt,NRt,ERt),UNn(rbt,SRt,jRt),UNn(rbt,PRt,jRt),UNn(rbt,MRt,jRt),UNn(rbt,RRt,jRt),UNn(rbt,CRt,jRt),UNn(rbt,LRt,jRt),UNn(rbt,$Rt,jRt),UNn(rbt,ERt,jRt),UNn(rbt,ARt,jRt),UNn(rbt,PRt,NRt),UNn(rbt,MRt,NRt),UNn(rbt,DRt,NRt),UNn(rbt,CRt,NRt),UNn(rbt,SRt,IRt),UNn(rbt,PRt,IRt),UNn(rbt,DRt,IRt),UNn(rbt,RRt,IRt),UNn(rbt,CRt,IRt),UNn(rbt,LRt,IRt),UNn(rbt,$Rt,IRt),UNn(rbt,$Rt,ORt),UNn(rbt,CRt,ORt),UNn(rbt,ERt,SRt),UNn(rbt,ERt,RRt),UNn(rbt,ERt,MRt),UNn(rbt,LRt,SRt),UNn(rbt,LRt,PRt),UNn(rbt,LRt,DRt)}function $Yn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;switch(e.Ug("Brandes & Koepf node placement",1),n.a=t,n.c=ZGn(t),i=uG(oIn(t,(jYn(),IMt)),281),b=oM(gK(oIn(t,OMt))),n.d=i==(ESn(),Fgt)&&!b||i==xgt,mVn(n,t),k=null,y=null,g=null,p=null,man(4,g1n),d=new R7(4),uG(oIn(t,IMt),281).g){case 3:g=new WHn(t,n.c.d,(w0(),wSt),(b0(),hSt)),mv(d.c,g);break;case 1:p=new WHn(t,n.c.d,(w0(),dSt),(b0(),hSt)),mv(d.c,p);break;case 4:k=new WHn(t,n.c.d,(w0(),wSt),(b0(),fSt)),mv(d.c,k);break;case 2:y=new WHn(t,n.c.d,(w0(),dSt),(b0(),fSt)),mv(d.c,y);break;default:g=new WHn(t,n.c.d,(w0(),wSt),(b0(),hSt)),p=new WHn(t,n.c.d,dSt,hSt),k=new WHn(t,n.c.d,wSt,fSt),y=new WHn(t,n.c.d,dSt,fSt),mv(d.c,k),mv(d.c,y),mv(d.c,g),mv(d.c,p)}for(r=new LI(t,n.c),o=new Ww(d);o.a<o.c.c.length;)dJn(r,c=uG(N3(o),185),n.b),oXn(c);for(l=new xjn(t,n.c),u=new Ww(d);u.a<u.c.c.length;)HVn(l,c=uG(N3(u),185));if(e._g())for(s=new Ww(d);s.a<s.c.c.length;)c=uG(N3(s),185),e.bh(c+" size is "+uxn(c));if(f=null,n.d&&qqn(t,h=cJn(n,d,n.c.d),e)&&(f=h),!f)for(s=new Ww(d);s.a<s.c.c.length;)qqn(t,c=uG(N3(s),185),e)&&(!f||uxn(f)>uxn(c))&&(f=c);for(!f&&(u3(0,d.c.length),f=uG(d.c[0],185)),w=new Ww(t.b);w.a<w.c.c.length;)for(v=new Ww(uG(N3(w),30).a);v.a<v.c.c.length;)(m=uG(N3(v),10)).n.b=uM(f.p[m.p])+uM(f.d[m.p]);for(e._g()&&(e.bh("Chosen node placement: "+f),e.bh("Blocks: "+O$n(f)),e.bh("Classes: "+$Dn(f,e)),e.bh("Marked edges: "+n.b)),a=new Ww(d);a.a<a.c.c.length;)(c=uG(N3(a),185)).g=null,c.b=null,c.a=null,c.d=null,c.j=null,c.i=null,c.p=null;J6(n.c),n.b.a.$b(),e.Vg()}function DYn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C;if(1==n.c.length)return ySn((u3(0,n.c.length),uG(n.c[0],121))),u3(0,n.c.length),uG(n.c[0],121);if(n.c.length<=0)return new L7;for(s=new Ww(n);s.a<s.c.c.length;){for(o=uG(N3(s),121),v=0,d=vZn,g=vZn,b=j1n,w=j1n,m=Fkn(o.b,0);m.b!=m.d.c;)p=uG(I6(m),40),v+=uG(oIn(p,(QGn(),yCt)),17).a,d=e.Math.min(d,p.e.a),g=e.Math.min(g,p.e.b),b=e.Math.max(b,p.e.a+p.f.a),w=e.Math.max(w,p.e.b+p.f.b);kfn(o,(QGn(),yCt),xwn(v)),kfn(o,(OQn(),kPt),new MO(d,g)),kfn(o,vPt,new MO(b,w))}for(hZ(),f$(n,new Ta),zsn(y=new L7,(u3(0,n.c.length),uG(n.c[0],96))),l=0,S=0,h=new Ww(n);h.a<h.c.c.length;)o=uG(N3(h),121),M=YF(D$(uG(oIn(o,(OQn(),vPt)),8)),uG(oIn(o,kPt),8)),l=e.Math.max(l,M.a),S+=M.a*M.b;for(l=e.Math.max(l,e.Math.sqrt(S)*uM(pK(oIn(y,(QGn(),eCt))))),P=0,C=0,f=0,t=T=uM(pK(oIn(y,ECt))),u=new Ww(n);u.a<u.c.c.length;)o=uG(N3(u),121),P+(M=YF(D$(uG(oIn(o,(OQn(),vPt)),8)),uG(oIn(o,kPt),8))).a>l&&(P=0,C+=f+T,f=0),rUn(y,o,P,C),t=e.Math.max(t,P+M.a),f=e.Math.max(f,M.b),P+=M.a+T;for(k=new Ym,i=new Ym,E=new Ww(n);E.a<E.c.c.length;)for(r=oM(gK(oIn(j=uG(N3(E),121),(XYn(),w$t)))),a=(j.q?j.q:Vot).vc().Kc();a.Ob();)PV(k,(c=uG(a.Pb(),44)).ld())?xA(uG(c.ld(),149).Sg())!==xA(c.md())&&(r&&PV(i,c.ld())?(bS(),uG(c.ld(),149).Pg(),String.fromCharCode(10)):(vJ(k,uG(c.ld(),149),c.md()),kfn(y,uG(c.ld(),149),c.md()),r&&vJ(i,uG(c.ld(),149),c.md()))):(vJ(k,uG(c.ld(),149),c.md()),kfn(y,uG(c.ld(),149),c.md()));return ySn(y),y}function xYn(n,t){switch(n.e){case 0:case 2:case 4:case 6:case 42:case 44:case 46:case 48:case 8:case 10:case 12:case 14:case 16:case 18:case 20:case 22:case 24:case 26:case 28:case 30:case 32:case 34:case 36:case 38:return new yZ(n.b,n.a,t,n.c);case 1:return new TD(n.a,t,emn(t.Dh(),n.c));case 43:return new CD(n.a,t,emn(t.Dh(),n.c));case 3:return new MD(n.a,t,emn(t.Dh(),n.c));case 45:return new PD(n.a,t,emn(t.Dh(),n.c));case 41:return new ltn(uG(bEn(n.c),29),n.a,t,emn(t.Dh(),n.c));case 50:return new xan(uG(bEn(n.c),29),n.a,t,emn(t.Dh(),n.c));case 5:return new r_(n.a,t,emn(t.Dh(),n.c),n.d.n);case 47:return new c_(n.a,t,emn(t.Dh(),n.c),n.d.n);case 7:return new fV(n.a,t,emn(t.Dh(),n.c),n.d.n);case 49:return new i_(n.a,t,emn(t.Dh(),n.c),n.d.n);case 9:return new SD(n.a,t,emn(t.Dh(),n.c));case 11:return new ED(n.a,t,emn(t.Dh(),n.c));case 13:return new jD(n.a,t,emn(t.Dh(),n.c));case 15:return new _G(n.a,t,emn(t.Dh(),n.c));case 17:return new AD(n.a,t,emn(t.Dh(),n.c));case 19:return new OD(n.a,t,emn(t.Dh(),n.c));case 21:return new ID(n.a,t,emn(t.Dh(),n.c));case 23:return new FG(n.a,t,emn(t.Dh(),n.c));case 25:return new l_(n.a,t,emn(t.Dh(),n.c),n.d.n);case 27:return new f_(n.a,t,emn(t.Dh(),n.c),n.d.n);case 29:return new s_(n.a,t,emn(t.Dh(),n.c),n.d.n);case 31:return new a_(n.a,t,emn(t.Dh(),n.c),n.d.n);case 33:return new h_(n.a,t,emn(t.Dh(),n.c),n.d.n);case 35:return new u_(n.a,t,emn(t.Dh(),n.c),n.d.n);case 37:return new o_(n.a,t,emn(t.Dh(),n.c),n.d.n);case 39:return new wV(n.a,t,emn(t.Dh(),n.c),n.d.n);case 40:return new wsn(t,emn(t.Dh(),n.c));default:throw hv(new Ky("Unknown feature style: "+n.e))}}function RYn(n){var t,e,i,r,c,a,o,u;for(c=0,r=n.a.b,u=Fkn(n.a,0);u.b!=u.d.c;){if(o=uG(I6(u),240),a=(c+1)/(r+1),!n.c&&!n.d)return;n.c&&!n.d?(n.g=!0,n.b==(xdn(),JDt)?(i=n.c.e.b+n.c.f.b+n.e*(c+1),t=new MO(uM(pK(oIn(n.c,(OQn(),$Pt))))+n.e,i),e=new MO(uM(pK(oIn(n.c,DPt)))-n.e,i)):n.b==YDt?(i=n.c.e.b+n.c.f.b+n.e*(c+1),t=new MO(uM(pK(oIn(n.c,(OQn(),DPt))))-n.e,i),e=new MO(uM(pK(oIn(n.c,$Pt)))+n.e,i)):n.b==nxt?(t=new MO(i=n.c.e.a+n.c.f.a+n.e*(c+1),uM(pK(oIn(n.c,(OQn(),$Pt))))+n.e),e=new MO(i,uM(pK(oIn(n.c,DPt)))-n.e)):(t=new MO(i=n.c.e.a+n.c.f.a+n.e*(c+1),uM(pK(oIn(n.c,(OQn(),DPt))))-n.e),e=new MO(i,uM(pK(oIn(n.c,$Pt)))+n.e))):n.c&&n.d?n.b==(xdn(),JDt)?(i=n.d.e.b*a+(n.c.e.b+n.c.f.b)*(1-a),t=new MO(uM(pK(oIn(n.c,(OQn(),$Pt))))+n.e,i),e=new MO(uM(pK(oIn(n.c,DPt)))-n.e,i)):n.b==YDt?(i=n.d.e.b*a+(n.c.e.b+n.c.f.b)*(1-a),t=new MO(uM(pK(oIn(n.c,(OQn(),DPt))))-n.e,i),e=new MO(uM(pK(oIn(n.c,$Pt)))+n.e,i)):n.b==nxt?(t=new MO(i=n.d.e.a*a+(n.c.e.a+n.c.f.a)*(1-a),uM(pK(oIn(n.c,(OQn(),$Pt))))+n.e),e=new MO(i,uM(pK(oIn(n.c,DPt)))-n.e)):(t=new MO(i=n.d.e.a*a+(n.c.e.a+n.c.f.a)*(1-a),uM(pK(oIn(n.c,(OQn(),DPt))))-n.e),e=new MO(i,uM(pK(oIn(n.c,$Pt)))+n.e)):(n.f=!0,n.b==(xdn(),JDt)?(i=n.d.e.b-n.e*(c+1),t=new MO(uM(pK(oIn(n.d,(OQn(),$Pt))))+n.e,i),e=new MO(uM(pK(oIn(n.d,DPt)))-n.e,i)):n.b==YDt?(i=n.d.e.b-n.e*(c+1),t=new MO(uM(pK(oIn(n.d,(OQn(),DPt))))-n.e,i),e=new MO(uM(pK(oIn(n.d,$Pt)))+n.e,i)):n.b==nxt?(t=new MO(i=n.d.e.a-n.e*(c+1),uM(pK(oIn(n.d,(OQn(),$Pt))))+n.e),e=new MO(i,uM(pK(oIn(n.d,DPt)))-n.e)):(t=new MO(i=n.d.e.a-n.e*(c+1),uM(pK(oIn(n.d,(OQn(),DPt))))-n.e),e=new MO(i,uM(pK(oIn(n.d,$Pt)))+n.e))),uG(o.a,8).a=t.a,uG(o.a,8).b=t.b,o.b.a=e.a,o.b.b=e.b,++c}}function KYn(n,t,e,i,r,c){var a,o,u,s,h,f,l;switch(t){case 71:a=i.q.getFullYear()-V1n>=-1900?1:0,JA(n,e>=4?Uhn(cT($ot,1),zZn,2,6,[Q1n,J1n])[a]:Uhn(cT($ot,1),zZn,2,6,["BC","AD"])[a]);break;case 121:Kkn(n,e,i);break;case 77:tUn(n,e,i);break;case 107:Fen(n,0==(o=r.q.getHours())?24:o,e);break;case 83:PRn(n,e,r);break;case 69:u=i.q.getDay(),JA(n,5==e?Uhn(cT($ot,1),zZn,2,6,["S","M","T","W","T","F","S"])[u]:4==e?Uhn(cT($ot,1),zZn,2,6,[Y1n,Z1n,n0n,t0n,e0n,i0n,r0n])[u]:Uhn(cT($ot,1),zZn,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[u]);break;case 97:r.q.getHours()>=12&&r.q.getHours()<24?JA(n,Uhn(cT($ot,1),zZn,2,6,["AM","PM"])[1]):JA(n,Uhn(cT($ot,1),zZn,2,6,["AM","PM"])[0]);break;case 104:Fen(n,0==(s=r.q.getHours()%12)?12:s,e);break;case 75:Fen(n,r.q.getHours()%12,e);break;case 72:Fen(n,r.q.getHours(),e);break;case 99:h=i.q.getDay(),5==e?JA(n,Uhn(cT($ot,1),zZn,2,6,["S","M","T","W","T","F","S"])[h]):4==e?JA(n,Uhn(cT($ot,1),zZn,2,6,[Y1n,Z1n,n0n,t0n,e0n,i0n,r0n])[h]):3==e?JA(n,Uhn(cT($ot,1),zZn,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[h]):Fen(n,h,1);break;case 76:f=i.q.getMonth(),5==e?JA(n,Uhn(cT($ot,1),zZn,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[f]):4==e?JA(n,Uhn(cT($ot,1),zZn,2,6,[x1n,R1n,K1n,F1n,_1n,B1n,H1n,U1n,G1n,q1n,X1n,z1n])[f]):3==e?JA(n,Uhn(cT($ot,1),zZn,2,6,["Jan","Feb","Mar","Apr",_1n,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[f]):Fen(n,f+1,e);break;case 81:l=i.q.getMonth()/3|0,JA(n,e<4?Uhn(cT($ot,1),zZn,2,6,["Q1","Q2","Q3","Q4"])[l]:Uhn(cT($ot,1),zZn,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[l]);break;case 100:Fen(n,i.q.getDate(),e);break;case 109:Fen(n,r.q.getMinutes(),e);break;case 115:Fen(n,r.q.getSeconds(),e);break;case 122:JA(n,e<4?c.c[0]:c.c[1]);break;case 118:JA(n,c.b);break;case 90:JA(n,e<3?GLn(c):3==e?rNn(c):cNn(c.a));break;default:return!1}return!0}function FYn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C;if(iHn(t),u=uG(zrn((!t.b&&(t.b=new f_(cFt,t,4,7)),t.b),0),84),h=uG(zrn((!t.c&&(t.c=new f_(cFt,t,5,8)),t.c),0),84),o=lCn(u),s=lCn(h),a=0==(!t.a&&(t.a=new fV(oFt,t,6,6)),t.a).i?null:uG(zrn((!t.a&&(t.a=new fV(oFt,t,6,6)),t.a),0),166),M=uG(cQ(n.a,o),10),S=uG(cQ(n.a,s),10),T=null,P=null,F$(u,193)&&(F$(y=uG(cQ(n.a,u),305),12)?T=uG(y,12):F$(y,10)&&(M=uG(y,10),T=uG(zq(M.j,0),12))),F$(h,193)&&(F$(E=uG(cQ(n.a,h),305),12)?P=uG(E,12):F$(E,10)&&(S=uG(E,10),P=uG(zq(S.j,0),12))),!M||!S)throw hv(new EM("The source or the target of edge "+t+" could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN."));for(zsn(d=new UZ,t),kfn(d,(GYn(),rmt),t),kfn(d,(jYn(),bMt),null),b=uG(oIn(i,Hpt),21),M==S&&b.Fc((r_n(),opt)),T||(can(),k=Wjt,j=null,a&&sN(uG(oIn(M,JMt),101))&&($5(j=new MO(a.j,a.k),s0(t)),Q8(j,e),Ern(s,o)&&(k=Vjt,JF(j,M.n))),T=LXn(M,j,k,i)),P||(can(),k=Vjt,C=null,a&&sN(uG(oIn(S,JMt),101))&&($5(C=new MO(a.b,a.c),s0(t)),Q8(C,e)),P=LXn(S,C,k,HQ(S))),c2(d,T),u2(d,P),(T.e.c.length>1||T.g.c.length>1||P.e.c.length>1||P.g.c.length>1)&&b.Fc((r_n(),ept)),l=new DD((!t.n&&(t.n=new fV(lFt,t,1,7)),t.n));l.e!=l.i.gc();)if(!oM(gK(zDn(f=uG(Zkn(l),135),FMt)))&&f.a)switch(g=own(f),kD(d.b,g),uG(oIn(g,Xyt),278).g){case 1:case 2:b.Fc((r_n(),npt));break;case 0:b.Fc((r_n(),Ygt)),kfn(g,Xyt,(Zrn(),ixt))}if(c=uG(oIn(i,Kyt),322),p=uG(oIn(i,$Mt),323),r=c==(jan(),Ydt)||p==(pyn(),kjt),a&&0!=(!a.a&&(a.a=new MD(eFt,a,5)),a.a).i&&r){for(m=COn(a),w=new Uk,v=Fkn(m,0);v.b!=v.d.c;)aq(w,new eN(uG(I6(v),8)));kfn(d,cmt,w)}return d}function _Yn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I;for(j=0,E=0,M=new Ym,k=uG(yx(Wz(YJ(new fX(null,new h3(n.b,16)),new io),new fo)),17).a+1,T=Inn(YHt,W1n,28,k,15,1),d=Inn(YHt,W1n,28,k,15,1),w=0;w<k;w++)T[w]=0,d[w]=0;for(s=uG(l8(_0(new fX(null,new h3(n.a,16))),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15).Kc();s.Ob();)if(u=uG(s.Pb(),65),P=uG(oIn(u.b,(QGn(),ACt)),17).a,(v=(I=uG(oIn(u.c,ACt),17).a)-P)>1)for(o=P+1;o<I;o++){if(h=o,y=uG(l8(JJ(new fX(null,new h3(n.b,16)),new Np(h)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15),b=0,t==(xdn(),JDt)||t==YDt){for(y.jd(new so),b=0;b<y.gc()&&(g=(o-P)/(I-P),!(uG(y.Xb(b),40).e.b>u.b.e.b*(1-g)+u.c.e.b*g));b++);if(y.gc()>0){if(C=0==u.a.b?D$(u.b.e):uG(pR(u.a),8),m=JF(D$(uG(y.Xb(y.gc()-1),40).e),uG(y.Xb(y.gc()-1),40).f),f=JF(D$(uG(y.Xb(0),40).e),uG(y.Xb(0),40).f),b>=y.gc()-1&&C.b>m.b&&u.c.e.b>m.b)continue;if(b<=0&&C.b<f.a&&u.c.e.b<f.b)continue}}else{for(y.jd(new ho),b=0;b<y.gc()&&(g=(o-P)/(I-P),!(uG(y.Xb(b),40).e.a>u.b.e.a*(1-g)+u.c.e.a*g));b++);if(y.gc()>0){if(C=0==u.a.b?D$(u.b.e):uG(pR(u.a),8),m=JF(D$(uG(y.Xb(y.gc()-1),40).e),uG(y.Xb(y.gc()-1),40).f),f=JF(D$(uG(y.Xb(0),40).e),uG(y.Xb(0),40).f),b>=y.gc()-1&&C.a>m.a&&u.c.e.a>m.a)continue;if(b<=0&&C.a<f.a&&u.c.e.a<f.a)continue}}r=new sj,c=new sj,aq(u.a,r),aq(u.a,c),a=new LU(r,c,u),PV(M,Hvn(p=S3(Nz(o,32),E3(b,L0n))))?(aq((l=uG(cQ(M,Hvn(p)),675)).a,a),hN(l.b)?Lon(l.a,new vo):Lon(l.a,new ko),RYn(l)):(l=new wTn(0==b?null:uG(y.Xb(b-1),40),b==y.gc()?null:uG(y.Xb(b),40),a,n),vJ(M,Hvn(p),l)),t==JDt||t==YDt?(l.f&&l.d.e.b<=uM(pK(oIn(n,(OQn(),IPt))))&&++j,l.g&&l.c.e.b+l.c.f.b>=uM(pK(oIn(n,(OQn(),CPt))))&&++E):(l.f&&l.d.e.a<=uM(pK(oIn(n,(OQn(),PPt))))&&++j,l.g&&l.c.e.a+l.c.f.a>=uM(pK(oIn(n,(OQn(),SPt))))&&++E)}else 0==v?hNn(u):v<0&&(++T[P],++d[I],j=uG((S=AYn(u,t,n,new WO(xwn(j),xwn(E)),e,i,new WO(xwn(d[I]),xwn(T[P])))).a,17).a,E=uG(S.b,17).a)}function BYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;if(i=t,u=e,n.b&&i.j==(KQn(),_Rt)&&u.j==(KQn(),_Rt)&&(m=i,i=u,u=m),PV(n.a,i)){if(cS(uG(cQ(n.a,i),49),u))return 1}else vJ(n.a,i,new ek);if(PV(n.a,u)){if(cS(uG(cQ(n.a,u),49),i))return-1}else vJ(n.a,u,new ek);if(PV(n.d,i)){if(cS(uG(cQ(n.d,i),49),u))return-1}else vJ(n.d,i,new ek);if(PV(n.d,u)){if(cS(uG(cQ(n.a,u),49),i))return 1}else vJ(n.d,u,new ek);if(i.j!=u.j)return-1==(p=bN(i.j,u.j))?hHn(n,u,i):hHn(n,i,u),p;if(0!=i.e.c.length&&0!=u.e.c.length){if(n.b&&0!=(p=Dbn(i,u)))return-1==p?hHn(n,u,i):1==p&&hHn(n,i,u),p;if((c=uG(zq(i.e,0),18).c.i)==(h=uG(zq(u.e,0),18).c.i))return(r=uG(oIn(uG(zq(i.e,0),18),(GYn(),imt)),17).a)>(s=uG(oIn(uG(zq(u.e,0),18),imt),17).a)?hHn(n,i,u):hHn(n,u,i),r<s?-1:r>s?1:0;for(d=0,g=(w=n.c).length;d<g;++d){if((b=w[d])==c)return hHn(n,i,u),1;if(b==h)return hHn(n,u,i),-1}}return 0!=i.g.c.length&&0!=u.g.c.length?(o=uG(oIn(i,(GYn(),tmt)),10),l=uG(oIn(u,tmt),10),n.e==(yvn(),Bjt)&&o&&l&&vR(o,imt)&&vR(l,imt)?((r=uG(oIn(o,imt),17).a)>(s=uG(oIn(l,imt),17).a)?hHn(n,i,u):hHn(n,u,i),r<s?-1:r>s?1:0):n.b&&0!=(p=Dbn(i,u))?(-1==p?hHn(n,u,i):1==p&&hHn(n,i,u),p):(a=0,f=0,vR(uG(zq(i.g,0),18),imt)&&(a=uG(oIn(uG(zq(i.g,0),18),imt),17).a),vR(uG(zq(u.g,0),18),imt)&&(f=uG(oIn(uG(zq(i.g,0),18),imt),17).a),o&&o==l?oM(gK(oIn(uG(zq(i.g,0),18),pmt)))&&!oM(gK(oIn(uG(zq(u.g,0),18),pmt)))?(hHn(n,i,u),1):!oM(gK(oIn(uG(zq(i.g,0),18),pmt)))&&oM(gK(oIn(uG(zq(u.g,0),18),pmt)))?(hHn(n,u,i),-1):(a>f?hHn(n,i,u):hHn(n,u,i),a<f?-1:a>f?1:0):(n.f&&(n.f._b(o)&&(a=uG(n.f.xc(o),17).a),n.f._b(l)&&(f=uG(n.f.xc(l),17).a)),a>f?hHn(n,i,u):hHn(n,u,i),a<f?-1:a>f?1:0))):0!=i.e.c.length&&0!=u.g.c.length?(hHn(n,i,u),1):0!=i.g.c.length&&0!=u.e.c.length?(hHn(n,u,i),-1):vR(i,(GYn(),imt))&&vR(u,imt)?((r=uG(oIn(i,imt),17).a)>(s=uG(oIn(u,imt),17).a)?hHn(n,i,u):hHn(n,u,i),r<s?-1:r>s?1:0):(hHn(n,u,i),-1)}function HYn(n){n.gb||(n.gb=!0,n.b=Nsn(n,0),Von(n.b,18),Won(n.b,19),n.a=Nsn(n,1),Von(n.a,1),Won(n.a,2),Won(n.a,3),Won(n.a,4),Won(n.a,5),n.o=Nsn(n,2),Von(n.o,8),Von(n.o,9),Won(n.o,10),Won(n.o,11),Won(n.o,12),Won(n.o,13),Won(n.o,14),Won(n.o,15),Won(n.o,16),Won(n.o,17),Won(n.o,18),Won(n.o,19),Won(n.o,20),Won(n.o,21),Won(n.o,22),Won(n.o,23),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),n.p=Nsn(n,3),Von(n.p,2),Von(n.p,3),Von(n.p,4),Von(n.p,5),Won(n.p,6),Won(n.p,7),rrn(n.p),rrn(n.p),n.q=Nsn(n,4),Von(n.q,8),n.v=Nsn(n,5),Won(n.v,9),rrn(n.v),rrn(n.v),rrn(n.v),n.w=Nsn(n,6),Von(n.w,2),Von(n.w,3),Von(n.w,4),Won(n.w,5),n.B=Nsn(n,7),Won(n.B,1),rrn(n.B),rrn(n.B),rrn(n.B),n.Q=Nsn(n,8),Won(n.Q,0),rrn(n.Q),n.R=Nsn(n,9),Von(n.R,1),n.S=Nsn(n,10),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),n.T=Nsn(n,11),Won(n.T,10),Won(n.T,11),Won(n.T,12),Won(n.T,13),Won(n.T,14),rrn(n.T),rrn(n.T),n.U=Nsn(n,12),Von(n.U,2),Von(n.U,3),Won(n.U,4),Won(n.U,5),Won(n.U,6),Won(n.U,7),rrn(n.U),n.V=Nsn(n,13),Won(n.V,10),n.W=Nsn(n,14),Von(n.W,18),Von(n.W,19),Von(n.W,20),Won(n.W,21),Won(n.W,22),Won(n.W,23),n.bb=Nsn(n,15),Von(n.bb,10),Von(n.bb,11),Von(n.bb,12),Von(n.bb,13),Von(n.bb,14),Von(n.bb,15),Von(n.bb,16),Won(n.bb,17),rrn(n.bb),rrn(n.bb),n.eb=Nsn(n,16),Von(n.eb,2),Von(n.eb,3),Von(n.eb,4),Von(n.eb,5),Von(n.eb,6),Von(n.eb,7),Won(n.eb,8),Won(n.eb,9),n.ab=Nsn(n,17),Von(n.ab,0),Von(n.ab,1),n.H=Nsn(n,18),Won(n.H,0),Won(n.H,1),Won(n.H,2),Won(n.H,3),Won(n.H,4),Won(n.H,5),rrn(n.H),n.db=Nsn(n,19),Won(n.db,2),n.c=$sn(n,20),n.d=$sn(n,21),n.e=$sn(n,22),n.f=$sn(n,23),n.i=$sn(n,24),n.g=$sn(n,25),n.j=$sn(n,26),n.k=$sn(n,27),n.n=$sn(n,28),n.r=$sn(n,29),n.s=$sn(n,30),n.t=$sn(n,31),n.u=$sn(n,32),n.fb=$sn(n,33),n.A=$sn(n,34),n.C=$sn(n,35),n.D=$sn(n,36),n.F=$sn(n,37),n.G=$sn(n,38),n.I=$sn(n,39),n.J=$sn(n,40),n.L=$sn(n,41),n.M=$sn(n,42),n.N=$sn(n,43),n.O=$sn(n,44),n.P=$sn(n,45),n.X=$sn(n,46),n.Y=$sn(n,47),n.Z=$sn(n,48),n.$=$sn(n,49),n._=$sn(n,50),n.cb=$sn(n,51),n.K=$sn(n,52))}function UYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E;for(a=new lS,v=uG(oIn(e,(jYn(),Byt)),88),d=0,Qon(a,(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a));0!=a.b;)(xA(zDn(s=R0(h=uG(0==a.b?null:(MK(0!=a.b),Lrn(a,a.a.a)),27)),Syt))!==xA((yvn(),Fjt))||xA(zDn(s,Fyt))===xA((kvn(),lgt))||xA(zDn(s,Fyt))===xA((kvn(),hgt))||oM(gK(zDn(s,Cyt)))||xA(zDn(s,kyt))!==xA((Uvn(),tbt))||xA(zDn(s,yMt))===xA((THn(),Pjt))||xA(zDn(s,yMt))===xA((THn(),Cjt))||xA(zDn(s,MMt))===xA((MKn(),JTt))||xA(zDn(s,MMt))===xA((MKn(),ZTt)))&&!oM(gK(zDn(h,jyt)))&&Myn(h,(GYn(),imt),xwn(d++)),!oM(gK(zDn(h,FMt)))&&(l=0!=(!h.a&&(h.a=new fV(bFt,h,10,11)),h.a).i,w=oCn(h),b=xA(zDn(h,rMt))===xA((Own(),Ixt)),p=null,(E=!vnn(h,(XYn(),e$t))||L9(mK(zDn(h,e$t))))&&b&&(l||w)&&(kfn(p=PGn(h),Byt,v),vR(p,fTt)&&iM(new omn(uM(pK(oIn(p,fTt)))),p),0!=uG(zDn(h,DMt),181).gc()&&(f=p,kS(new fX(null,(!h.c&&(h.c=new fV(wFt,h,9,9)),new h3(h.c,16))),new Yd(f)),u_n(h,p))),k=e,(y=uG(cQ(n.a,R0(h)),10))&&(k=y.e),g=RJn(n,h,k),p&&(g.e=p,p.e=g,Qon(a,(!h.a&&(h.a=new fV(bFt,h,10,11)),h.a))));for(d=0,s8(a,t,a.c.b,a.c);0!=a.b;){for(u=new DD((!(c=uG(0==a.b?null:(MK(0!=a.b),Lrn(a,a.a.a)),27)).b&&(c.b=new fV(aFt,c,12,3)),c.b));u.e!=u.i.gc();)iHn(o=uG(Zkn(u),74)),(xA(zDn(t,Syt))!==xA((yvn(),Fjt))||xA(zDn(t,Fyt))===xA((kvn(),lgt))||xA(zDn(t,Fyt))===xA((kvn(),hgt))||oM(gK(zDn(t,Cyt)))||xA(zDn(t,kyt))!==xA((Uvn(),tbt))||xA(zDn(t,yMt))===xA((THn(),Pjt))||xA(zDn(t,yMt))===xA((THn(),Cjt))||xA(zDn(t,MMt))===xA((MKn(),JTt))||xA(zDn(t,MMt))===xA((MKn(),ZTt)))&&Myn(o,(GYn(),imt),xwn(d++)),T=lCn(uG(zrn((!o.b&&(o.b=new f_(cFt,o,4,7)),o.b),0),84)),j=lCn(uG(zrn((!o.c&&(o.c=new f_(cFt,o,5,8)),o.c),0),84)),oM(gK(zDn(o,FMt)))||oM(gK(zDn(T,FMt)))||oM(gK(zDn(j,FMt)))||(m=c,BNn(o)&&oM(gK(zDn(T,sMt)))&&oM(gK(zDn(o,hMt)))||Ern(j,T)?m=T:Ern(T,j)&&(m=j),k=e,(y=uG(cQ(n.a,m),10))&&(k=y.e),kfn(FYn(n,o,m,k),(GYn(),Ipt),SFn(n,o,t,e)));if(b=xA(zDn(c,rMt))===xA((Own(),Ixt)))for(r=new DD((!c.a&&(c.a=new fV(bFt,c,10,11)),c.a));r.e!=r.i.gc();)E=!vnn(i=uG(Zkn(r),27),(XYn(),e$t))||L9(mK(zDn(i,e$t))),M=xA(zDn(i,rMt))===xA(Ixt),E&&M&&s8(a,i,a.c.b,a.c)}}function GYn(){var n,t;GYn=E,rmt=new Cm(E4n),Ipt=new Cm("coordinateOrigin"),wmt=new Cm("processors"),Cpt=new uF("compoundNode",(qx(),!1)),qpt=new uF("insideConnections",!1),cmt=new Cm("originalBendpoints"),amt=new Cm("originalDummyNodePosition"),omt=new Cm("originalLabelEdge"),gmt=new Cm("representedLabels"),$pt=new Cm("endLabels"),Dpt=new Cm("endLabel.origin"),Qpt=new uF("labelSide",(Ajn(),Rxt)),emt=new uF("maxEdgeThickness",0),pmt=new uF("reversed",!1),dmt=new Cm(S4n),Zpt=new uF("longEdgeSource",null),nmt=new uF("longEdgeTarget",null),Ypt=new uF("longEdgeHasLabelDummies",!1),Jpt=new uF("longEdgeBeforeLabelDummy",!1),Npt=new uF("edgeConstraint",(Pfn(),kgt)),zpt=new Cm("inLayerLayoutUnit"),Xpt=new uF("inLayerConstraint",(Zen(),gpt)),Vpt=new uF("inLayerSuccessorConstraint",new Zm),Wpt=new uF("inLayerSuccessorConstraintBetweenNonDummies",!1),lmt=new Cm("portDummy"),Opt=new uF("crossingHint",xwn(0)),Hpt=new uF("graphProperties",new nB(t=uG(Mj(bpt),9),uG(MF(t,t.length),9),0)),Fpt=new uF("externalPortSide",(KQn(),FRt)),_pt=new uF("externalPortSize",new sj),Rpt=new Cm("externalPortReplacedDummies"),Kpt=new Cm("externalPortReplacedDummy"),xpt=new uF("externalPortConnections",new nB(n=uG(Mj(YRt),9),uG(MF(n,n.length),9),0)),bmt=new uF(i3n,0),jpt=new Cm("barycenterAssociates"),Pmt=new Cm("TopSideComments"),Ept=new Cm("BottomSideComments"),Ppt=new Cm("CommentConnectionPort"),Gpt=new uF("inputCollect",!1),hmt=new uF("outputCollect",!1),Lpt=new uF("cyclic",!1),Apt=new Cm("crossHierarchyMap"),Smt=new Cm("targetOffset"),new uF("splineLabelSize",new sj),kmt=new Cm("spacings"),fmt=new uF("partitionConstraint",!1),Spt=new Cm("breakingPoint.info"),jmt=new Cm("splines.survivingEdge"),Tmt=new Cm("splines.route.start"),ymt=new Cm("splines.edgeChain"),smt=new Cm("originalPortConstraints"),vmt=new Cm("selfLoopHolder"),Mmt=new Cm("splines.nsPortY"),imt=new Cm("modelOrder"),tmt=new Cm("longEdgeTargetNode"),Bpt=new uF(_6n,!1),mmt=new uF(_6n,!1),Upt=new Cm("layerConstraints.hiddenNodes"),umt=new Cm("layerConstraints.opposidePort"),Emt=new Cm("targetNode.modelOrder")}function qYn(n,t,i,r){var c,a,o,u,s,h,f,l,b,w,d;for(l=Fkn(n.b,0);l.b!=l.d.c;)if(!m_((f=uG(I6(l),40)).c,H9n))for(a=uG(l8(new fX(null,new h3(zNn(f,n),16)),ftn(new V,new z,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),t==(xdn(),JDt)||t==YDt?a.jd(new oo):a.jd(new uo),d=a.gc(),c=0;c<d;c++)o=1==d?.5:(1+c)/(d+1),t==JDt?(h=uM(pK(oIn(f,(OQn(),$Pt)))),f.e.a+f.f.a+r<h?cL(uG(a.Xb(c),65).a,new MO(h+i,f.e.b+f.f.b*o)):uG(a.Xb(c),65).a.b>0&&(u=uG(pR(uG(a.Xb(c),65).a),8).a,b=f.e.a+f.f.a/2,s=uG(pR(uG(a.Xb(c),65).a),8).b,w=f.e.b+f.f.b/2,r>0&&e.Math.abs(s-w)/(e.Math.abs(u-b)/40)>50&&cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a+r/5.3,w>s?f.e.b+f.f.b*o-r/2:f.e.b+f.f.b*o+r/2))),cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a,f.e.b+f.f.b*o))):t==YDt?(h=uM(pK(oIn(f,(OQn(),DPt)))),f.e.a-r>h?cL(uG(a.Xb(c),65).a,new MO(h-i,f.e.b+f.f.b*o)):uG(a.Xb(c),65).a.b>0&&(u=uG(pR(uG(a.Xb(c),65).a),8).a,b=f.e.a+f.f.a/2,s=uG(pR(uG(a.Xb(c),65).a),8).b,w=f.e.b+f.f.b/2,r>0&&e.Math.abs(s-w)/(e.Math.abs(u-b)/40)>50&&cL(uG(a.Xb(c),65).a,new MO(f.e.a-r/5.3,w>s?f.e.b+f.f.b*o-r/2:f.e.b+f.f.b*o+r/2))),cL(uG(a.Xb(c),65).a,new MO(f.e.a,f.e.b+f.f.b*o))):t==nxt?(h=uM(pK(oIn(f,(OQn(),$Pt)))),f.e.b+f.f.b+r<h?cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,h+i)):uG(a.Xb(c),65).a.b>0&&(u=uG(pR(uG(a.Xb(c),65).a),8).a,b=f.e.a+f.f.a/2,s=uG(pR(uG(a.Xb(c),65).a),8).b,w=f.e.b+f.f.b/2,r>0&&e.Math.abs(u-b)/(e.Math.abs(s-w)/40)>50&&cL(uG(a.Xb(c),65).a,new MO(b>u?f.e.a+f.f.a*o-r/2:f.e.a+f.f.a*o+r/2,f.e.b+r/5.3+f.f.b))),cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,f.e.b+f.f.b))):(h=uM(pK(oIn(f,(OQn(),DPt)))),uln(uG(a.Xb(c),65),n)?cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,uG(pR(uG(a.Xb(c),65).a),8).b)):f.e.b-r>h?cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,h-i)):uG(a.Xb(c),65).a.b>0&&(u=uG(pR(uG(a.Xb(c),65).a),8).a,b=f.e.a+f.f.a/2,s=uG(pR(uG(a.Xb(c),65).a),8).b,w=f.e.b+f.f.b/2,r>0&&e.Math.abs(u-b)/(e.Math.abs(s-w)/40)>50&&cL(uG(a.Xb(c),65).a,new MO(b>u?f.e.a+f.f.a*o-r/2:f.e.a+f.f.a*o+r/2,f.e.b-r/5.3))),cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,f.e.b)))}function XYn(){var n,t;XYn=E,e$t=new Cm(Vnt),yDt=new Cm(Wnt),nMn(),i$t=new mL(X8n,r$t=CNt),new Jm,c$t=new mL(R3n,null),a$t=new Cm(Qnt),ZSn(),b$t=WX(ZNt,Uhn(cT(txt,1),p1n,298,0,[WNt])),l$t=new mL(r9n,b$t),w$t=new mL(q8n,(qx(),!1)),xdn(),d$t=new mL(W8n,g$t=ZDt),_gn(),k$t=new mL(m8n,y$t=fxt),j$t=new mL(Xnt,!1),Own(),E$t=new mL(b8n,S$t=Oxt),Q$t=new CN(12),W$t=new mL(K3n,Q$t),O$t=new mL(f4n,!1),A$t=new mL(g9n,!1),V$t=new mL(w4n,!1),$Pn(),sDt=new mL(l4n,hDt=sRt),mDt=new Cm(b9n),vDt=new Cm(a4n),kDt=new Cm(s4n),TDt=new Cm(h4n),N$t=new Uk,L$t=new mL(c9n,N$t),f$t=new mL(u9n,!1),P$t=new mL(s9n,!1),new Cm(Jnt),D$t=new Nk,$$t=new mL(w9n,D$t),z$t=new mL(U8n,!1),new Jm,MDt=new mL(Ynt,1),h$t=new Cm(Znt),s$t=new Cm(ntt),HDt=new mL(k4n,!1),new mL(ttt,!0),xwn(0),new mL(ett,xwn(100)),new mL(itt,!1),xwn(0),new mL(rtt,xwn(4e3)),xwn(0),new mL(ctt,xwn(400)),new mL(att,!1),new mL(ott,!1),new mL(utt,!0),new mL(stt,!1),qpn(),o$t=new mL(znt,u$t=TKt),jDt=new mL(A8n,10),EDt=new mL(L8n,10),SDt=new mL(D3n,20),PDt=new mL(N8n,10),CDt=new mL(u4n,2),IDt=new mL($8n,10),ADt=new mL(D8n,0),LDt=new mL(K8n,5),NDt=new mL(x8n,1),$Dt=new mL(R8n,1),DDt=new mL(o4n,20),xDt=new mL(F8n,10),FDt=new mL(_8n,10),ODt=new Cm(B8n),KDt=new qL,RDt=new mL(d9n,KDt),Z$t=new Cm(l9n),J$t=new mL(f9n,Y$t=!1),R$t=new CN(5),x$t=new mL(Q8n,R$t),VDn(),t=uG(Mj(eRt),9),F$t=new nB(t,uG(MF(t,t.length),9),0),K$t=new mL(m4n,F$t),Vkn(),tDt=new mL(Z8n,eDt=Zxt),rDt=new Cm(n9n),cDt=new Cm(t9n),aDt=new Cm(e9n),iDt=new Cm(i9n),n=uG(Mj(sKt),9),B$t=new nB(n,uG(MF(n,n.length),9),0),_$t=new mL(p4n,B$t),X$t=ggn((oUn(),eKt)),q$t=new mL(g4n,X$t),G$t=new MO(0,0),U$t=new mL(x4n,G$t),H$t=new mL(d4n,!1),Zrn(),m$t=new mL(a9n,v$t=ixt),p$t=new mL(b4n,!1),new Cm(htt),xwn(1),new mL(ftt,null),oDt=new Cm(h9n),fDt=new Cm(o9n),KQn(),gDt=new mL(G8n,pDt=FRt),uDt=new Cm(H8n),eNn(),wDt=ggn(gRt),bDt=new mL(v4n,wDt),lDt=new mL(J8n,!1),dDt=new mL(Y8n,!0),new Jm,XDt=new mL(y4n,1),VDt=new mL(ltt,null),BDt=new mL(M4n,150),_Dt=new mL(T4n,1.414),UDt=new mL(j4n,null),GDt=new mL(btt,1),C$t=new mL(z8n,!1),I$t=new mL(V8n,!1),M$t=new mL(x3n,1),RCn(),new mL(wtt,T$t=mxt),nDt=!0,Iwn(),zDt=fKt,WDt=fKt,qDt=fKt}function zYn(){zYn=E,qbt=new CC("DIRECTION_PREPROCESSOR",0),Hbt=new CC("COMMENT_PREPROCESSOR",1),Xbt=new CC("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",2),uwt=new CC("INTERACTIVE_EXTERNAL_PORT_POSITIONER",3),Pwt=new CC("PARTITION_PREPROCESSOR",4),lwt=new CC("LABEL_DUMMY_INSERTER",5),Nwt=new CC("SELF_LOOP_PREPROCESSOR",6),pwt=new CC("LAYER_CONSTRAINT_PREPROCESSOR",7),Ewt=new CC("PARTITION_MIDPROCESSOR",8),iwt=new CC("HIGH_DEGREE_NODE_LAYER_PROCESSOR",9),ywt=new CC("NODE_PROMOTION",10),gwt=new CC("LAYER_CONSTRAINT_POSTPROCESSOR",11),Swt=new CC("PARTITION_POSTPROCESSOR",12),Zbt=new CC("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),Dwt=new CC("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",14),xbt=new CC("BREAKING_POINT_INSERTER",15),kwt=new CC("LONG_EDGE_SPLITTER",16),Iwt=new CC("PORT_SIDE_PROCESSOR",17),swt=new CC("INVERTED_PORT_PROCESSOR",18),Cwt=new CC("PORT_LIST_SORTER",19),Rwt=new CC("SORT_BY_INPUT_ORDER_OF_MODEL",20),Twt=new CC("NORTH_SOUTH_PORT_PREPROCESSOR",21),Rbt=new CC("BREAKING_POINT_PROCESSOR",22),jwt=new CC(p6n,23),Kwt=new CC(m6n,24),Awt=new CC("SELF_LOOP_PORT_RESTORER",25),xwt=new CC("SINGLE_EDGE_GRAPH_WRAPPER",26),hwt=new CC("IN_LAYER_CONSTRAINT_PROCESSOR",27),Qbt=new CC("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",28),fwt=new CC("LABEL_AND_NODE_SIZE_PROCESSOR",29),owt=new CC("INNERMOST_NODE_MARGIN_CALCULATOR",30),$wt=new CC("SELF_LOOP_ROUTER",31),_bt=new CC("COMMENT_NODE_MARGIN_CALCULATOR",32),Vbt=new CC("END_LABEL_PREPROCESSOR",33),wwt=new CC("LABEL_DUMMY_SWITCHER",34),Fbt=new CC("CENTER_LABEL_MANAGEMENT_PROCESSOR",35),dwt=new CC("LABEL_SIDE_SELECTOR",36),cwt=new CC("HYPEREDGE_DUMMY_MERGER",37),nwt=new CC("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",38),mwt=new CC("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",39),ewt=new CC("HIERARCHICAL_PORT_POSITION_PROCESSOR",40),Ubt=new CC("CONSTRAINTS_POSTPROCESSOR",41),Bbt=new CC("COMMENT_POSTPROCESSOR",42),awt=new CC("HYPERNODE_PROCESSOR",43),twt=new CC("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",44),vwt=new CC("LONG_EDGE_JOINER",45),Lwt=new CC("SELF_LOOP_POSTPROCESSOR",46),Kbt=new CC("BREAKING_POINT_REMOVER",47),Mwt=new CC("NORTH_SOUTH_PORT_POSTPROCESSOR",48),rwt=new CC("HORIZONTAL_COMPACTOR",49),bwt=new CC("LABEL_DUMMY_REMOVER",50),Jbt=new CC("FINAL_SPLINE_BENDPOINTS_CALCULATOR",51),Wbt=new CC("END_LABEL_SORTER",52),Owt=new CC("REVERSED_EDGE_RESTORER",53),zbt=new CC("END_LABEL_POSTPROCESSOR",54),Ybt=new CC("HIERARCHICAL_NODE_RESIZER",55),Gbt=new CC("DIRECTION_POSTPROCESSOR",56)}function VYn(){VYn=E,Vin(),mvt=new mL(B6n,vvt=dgt),xvt=new mL(H6n,(qx(),!1)),Y6(),Bvt=new mL(U6n,Hvt=kpt),akt=new mL(G6n,!1),okt=new mL(q6n,!0),Dmt=new mL(X6n,!1),nin(),Skt=new mL(z6n,Pkt=Gjt),xwn(1),Dkt=new mL(V6n,xwn(7)),xkt=new mL(W6n,!1),Rvt=new mL(Q6n,!1),kvn(),gvt=new mL(J6n,pvt=sgt),MKn(),rkt=new mL(Y6n,ckt=rjt),Gpn(),Vvt=new mL(Z6n,Wvt=Lmt),xwn(-1),zvt=new mL(n5n,null),xwn(-1),Qvt=new mL(t5n,xwn(-1)),xwn(-1),Jvt=new mL(e5n,xwn(4)),xwn(-1),Zvt=new mL(i5n,xwn(2)),THn(),ekt=new mL(r5n,ikt=$jt),xwn(0),tkt=new mL(c5n,xwn(0)),qvt=new mL(a5n,xwn(vZn)),jan(),wvt=new mL(o5n,dvt=Zdt),Jmt=new mL(u5n,!1),avt=new mL(s5n,.1),lvt=new mL(h5n,!1),uvt=new mL(f5n,null),svt=new mL(l5n,null),xwn(-1),hvt=new mL(b5n,null),xwn(-1),fvt=new mL(w5n,xwn(-1)),xwn(0),Ymt=new mL(d5n,xwn(40)),ihn(),ivt=new mL(g5n,rvt=lpt),Zmt=new mL(p5n,nvt=hpt),pyn(),jkt=new mL(m5n,Ekt=vjt),wkt=new Cm(v5n),Wtn(),ukt=new mL(k5n,skt=Lgt),ESn(),fkt=new mL(y5n,lkt=Fgt),new Jm,pkt=new mL(M5n,.3),vkt=new Cm(T5n),Yyn(),kkt=new mL(j5n,ykt=djt),isn(),Svt=new mL(E5n,Pvt=nEt),Sln(),Cvt=new mL(S5n,Ivt=aEt),kbn(),Ovt=new mL(P5n,Avt=fEt),Nvt=new mL(C5n,.2),jvt=new mL(I5n,2),Akt=new mL(O5n,null),Nkt=new mL(A5n,10),Lkt=new mL(L5n,10),$kt=new mL(N5n,20),xwn(0),Ckt=new mL($5n,xwn(0)),xwn(0),Ikt=new mL(D5n,xwn(0)),xwn(0),Okt=new mL(x5n,xwn(0)),xmt=new mL(R5n,!1),RIn(),Fmt=new mL(K5n,_mt=Vgt),H7(),Rmt=new mL(F5n,Kmt=Wdt),Fvt=new mL(_5n,!1),xwn(0),Kvt=new mL(B5n,xwn(16)),xwn(0),_vt=new mL(H5n,xwn(5)),zhn(),ryt=new mL(U5n,cyt=kEt),Rkt=new mL(G5n,10),_kt=new mL(q5n,1),ran(),Vkt=new mL(X5n,Wkt=cgt),Ukt=new Cm(z5n),Xkt=xwn(1),xwn(0),qkt=new mL(V5n,Xkt),ian(),syt=new mL(W5n,hyt=wEt),ayt=new Cm(Q5n),nyt=new mL(J5n,!0),Ykt=new mL(Y5n,2),eyt=new mL(Z5n,!0),tOn(),Mvt=new mL(n8n,Tvt=Cgt),vAn(),kvt=new mL(t8n,yvt=Hdt),yvn(),Wmt=new mL(e8n,Qmt=Fjt),Vmt=new mL(i8n,!1),zmt=new mL(r8n,!1),Uvn(),Bmt=new mL(c8n,Hmt=tbt),Cwn(),qmt=new mL(a8n,Xmt=ujt),Umt=new mL(o8n,0),Gmt=new mL(u8n,0),Gvt=fgt,Uvt=Ydt,Yvt=ijt,nkt=ijt,Xvt=YTt,Own(),ovt=Ixt,bvt=Zdt,cvt=Zdt,tvt=Zdt,evt=Ixt,dkt=Mjt,gkt=vjt,hkt=vjt,bkt=vjt,mkt=yjt,Tkt=Mjt,Mkt=Mjt,_gn(),Lvt=hxt,$vt=hxt,Dvt=fEt,Evt=sxt,Kkt=yEt,Fkt=vEt,Bkt=yEt,Hkt=vEt,Qkt=yEt,Jkt=vEt,Gkt=rgt,zkt=cgt,fyt=yEt,lyt=vEt,oyt=yEt,uyt=vEt,tyt=vEt,Zkt=vEt,iyt=vEt}function WYn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A,L,N,$,D,x,R,K,F,_,B,H,U,G,q,X,z,V,W,Q,J,Y,Z,nn,tn,en,rn,cn,an,on,un;for(Y=0,N=0,x=(O=t).length;N<x;++N)for(G=new Ww((C=O[N]).j);G.a<G.c.c.length;){for(X=0,u=new Ww((U=uG(N3(G),12)).g);u.a<u.c.c.length;)o=uG(N3(u),18),C.c!=o.d.i.c&&++X;X>0&&(n.a[U.p]=Y++)}for(rn=0,$=0,R=(A=i).length;$<R;++$){for(K=0,G=new Ww((C=A[$]).j);G.a<G.c.c.length&&(U=uG(N3(G),12)).j==(KQn(),yRt);)for(u=new Ww(U.e);u.a<u.c.c.length;)if(o=uG(N3(u),18),C.c!=o.c.i.c){++K;break}for(_=0,z=new N4(C.j,C.j.c.length);z.b>0;){for(MK(z.b>0),X=0,u=new Ww((U=uG(z.a.Xb(z.c=--z.b),12)).e);u.a<u.c.c.length;)o=uG(N3(u),18),C.c!=o.c.i.c&&++X;X>0&&(U.j==(KQn(),yRt)?(n.a[U.p]=rn,++rn):(n.a[U.p]=rn+K+_,++_))}rn+=_}for(q=new Ym,d=new XL,L=0,D=(I=t).length;L<D;++L)for(tn=new Ww((C=I[L]).j);tn.a<tn.c.c.length;)for(u=new Ww((nn=uG(N3(tn),12)).g);u.a<u.c.c.length;)if(an=(o=uG(N3(u),18)).d,C.c!=an.i.c)if(Z=uG(DA(FX(q.f,nn)),478),cn=uG(DA(FX(q.f,an)),478),Z||cn)if(Z)if(cn)if(Z==cn)kD(Z.a,o);else{for(kD(Z.a,o),H=new Ww(cn.d);H.a<H.c.c.length;)B=uG(N3(H),12),VAn(q.f,B,Z);Ohn(Z.a,cn.a),Ohn(Z.d,cn.d),d.a.Bc(cn)}else kD(Z.a,o),kD(Z.d,an),VAn(q.f,an,Z);else kD(cn.a,o),kD(cn.d,nn),VAn(q.f,nn,cn);else w=new BF,d.a.zc(w,d),kD(w.a,o),kD(w.d,nn),VAn(q.f,nn,w),kD(w.d,an),VAn(q.f,an,w);for(g=uG(oTn(d,Inn(QEt,{3:1,4:1,5:1,2045:1},478,d.a.gc(),0,1)),2045),P=t[0].c,J=i[0].c,l=0,b=(f=g).length;l<b;++l)for((h=f[l]).e=Y,h.f=rn,G=new Ww(h.d);G.a<G.c.c.length;)U=uG(N3(G),12),V=n.a[U.p],U.i.c==P?(V<h.e&&(h.e=V),V>h.b&&(h.b=V)):U.i.c==J&&(V<h.f&&(h.f=V),V>h.c&&(h.c=V));for(Ntn(g,0,g.length,null),en=Inn(YHt,W1n,28,g.length,15,1),r=Inn(YHt,W1n,28,rn+1,15,1),m=0;m<g.length;m++)en[m]=g[m].f,r[en[m]]=1;for(a=0,v=0;v<r.length;v++)1==r[v]?r[v]=a:--a;for(W=0,k=0;k<en.length;k++)en[k]+=r[en[k]],W=e.Math.max(W,en[k]+1);for(s=1;s<W;)s*=2;for(un=2*s-1,s-=1,on=Inn(YHt,W1n,28,un,15,1),c=0,E=0;E<en.length;E++)for(++on[j=en[E]+s];j>0;)j%2>0&&(c+=on[j+1]),++on[j=(j-1)/2|0];for(S=Inn(ZEt,EZn,374,2*g.length,0,1),y=0;y<g.length;y++)S[2*y]=new bY(g[y],g[y].e,g[y].b,(Z6(),YEt)),S[2*y+1]=new bY(g[y],g[y].b,g[y].e,JEt);for(Ntn(S,0,S.length,null),F=0,M=0;M<S.length;M++)switch(S[M].d.g){case 0:++F;break;case 1:c+=--F}for(Q=Inn(ZEt,EZn,374,2*g.length,0,1),T=0;T<g.length;T++)Q[2*T]=new bY(g[T],g[T].f,g[T].c,(Z6(),YEt)),Q[2*T+1]=new bY(g[T],g[T].c,g[T].f,JEt);for(Ntn(Q,0,Q.length,null),F=0,p=0;p<Q.length;p++)switch(Q[p].d.g){case 0:++F;break;case 1:c+=--F}return c}function QYn(){QYn=E,OHt=new Qm(7),AHt=new IX(8,94),new IX(8,64),LHt=new IX(8,36),KHt=new IX(8,65),FHt=new IX(8,122),_Ht=new IX(8,90),UHt=new IX(8,98),xHt=new IX(8,66),BHt=new IX(8,60),GHt=new IX(8,62),IHt=new Qm(11),HFn(CHt=new K3(4),48,57),HFn(HHt=new K3(4),48,57),HFn(HHt,65,90),HFn(HHt,95,95),HFn(HHt,97,122),HFn(RHt=new K3(4),9,9),HFn(RHt,10,10),HFn(RHt,12,12),HFn(RHt,13,13),HFn(RHt,32,32),NHt=FGn(CHt),DHt=FGn(HHt),$Ht=FGn(RHt),jHt=new Ym,EHt=new Ym,SHt=Uhn(cT($ot,1),zZn,2,6,["Cn","Lu","Ll","Lt","Lm","Lo","Mn","Me","Mc","Nd","Nl","No","Zs","Zl","Zp","Cc","Cf",null,"Co","Cs","Pd","Ps","Pe","Pc","Po","Sm","Sc","Sk","So","Pi","Pf","L","M","N","Z","C","P","S"]),THt=Uhn(cT($ot,1),zZn,2,6,["Basic Latin","Latin-1 Supplement","Latin Extended-A","Latin Extended-B","IPA Extensions","Spacing Modifier Letters","Combining Diacritical Marks","Greek","Cyrillic","Armenian","Hebrew","Arabic","Syriac","Thaana","Devanagari","Bengali","Gurmukhi","Gujarati","Oriya","Tamil","Telugu","Kannada","Malayalam","Sinhala","Thai","Lao","Tibetan","Myanmar","Georgian","Hangul Jamo","Ethiopic","Cherokee","Unified Canadian Aboriginal Syllabics","Ogham","Runic","Khmer","Mongolian","Latin Extended Additional","Greek Extended","General Punctuation","Superscripts and Subscripts","Currency Symbols","Combining Marks for Symbols","Letterlike Symbols","Number Forms","Arrows","Mathematical Operators","Miscellaneous Technical","Control Pictures","Optical Character Recognition","Enclosed Alphanumerics","Box Drawing","Block Elements","Geometric Shapes","Miscellaneous Symbols","Dingbats","Braille Patterns","CJK Radicals Supplement","Kangxi Radicals","Ideographic Description Characters","CJK Symbols and Punctuation","Hiragana","Katakana","Bopomofo","Hangul Compatibility Jamo","Kanbun","Bopomofo Extended","Enclosed CJK Letters and Months","CJK Compatibility","CJK Unified Ideographs Extension A","CJK Unified Ideographs","Yi Syllables","Yi Radicals","Hangul Syllables",eat,"CJK Compatibility Ideographs","Alphabetic Presentation Forms","Arabic Presentation Forms-A","Combining Half Marks","CJK Compatibility Forms","Small Form Variants","Arabic Presentation Forms-B","Specials","Halfwidth and Fullwidth Forms","Old Italic","Gothic","Deseret","Byzantine Musical Symbols","Musical Symbols","Mathematical Alphanumeric Symbols","CJK Unified Ideographs Extension B","CJK Compatibility Ideographs Supplement","Tags"]),PHt=Uhn(cT(YHt,1),W1n,28,15,[66304,66351,66352,66383,66560,66639,118784,119039,119040,119295,119808,120831,131072,173782,194560,195103,917504,917631])}function JYn(){JYn=E,oht=new pun("OUT_T_L",0,(Ktn(),Ast),(Yen(),Rst),(Yrn(),jst),jst,Uhn(cT(kat,1),EZn,21,0,[WX((VDn(),qxt),Uhn(cT(eRt,1),p1n,95,0,[Vxt,Bxt]))])),aht=new pun("OUT_T_C",1,Ost,Rst,jst,Est,Uhn(cT(kat,1),EZn,21,0,[WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Vxt,_xt])),WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Vxt,_xt,Hxt]))])),uht=new pun("OUT_T_R",2,Lst,Rst,jst,Sst,Uhn(cT(kat,1),EZn,21,0,[WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Vxt,Uxt]))])),Yst=new pun("OUT_B_L",3,Ast,Fst,Sst,jst,Uhn(cT(kat,1),EZn,21,0,[WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Xxt,Bxt]))])),Jst=new pun("OUT_B_C",4,Ost,Fst,Sst,Est,Uhn(cT(kat,1),EZn,21,0,[WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Xxt,_xt])),WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Xxt,_xt,Hxt]))])),Zst=new pun("OUT_B_R",5,Lst,Fst,Sst,Sst,Uhn(cT(kat,1),EZn,21,0,[WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Xxt,Uxt]))])),eht=new pun("OUT_L_T",6,Lst,Fst,jst,jst,Uhn(cT(kat,1),EZn,21,0,[WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Bxt,Vxt,Hxt]))])),tht=new pun("OUT_L_C",7,Lst,Kst,Est,jst,Uhn(cT(kat,1),EZn,21,0,[WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Bxt,zxt])),WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Bxt,zxt,Hxt]))])),nht=new pun("OUT_L_B",8,Lst,Rst,Sst,jst,Uhn(cT(kat,1),EZn,21,0,[WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Bxt,Xxt,Hxt]))])),cht=new pun("OUT_R_T",9,Ast,Fst,jst,Sst,Uhn(cT(kat,1),EZn,21,0,[WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Uxt,Vxt,Hxt]))])),rht=new pun("OUT_R_C",10,Ast,Kst,Est,Sst,Uhn(cT(kat,1),EZn,21,0,[WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Uxt,zxt])),WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Uxt,zxt,Hxt]))])),iht=new pun("OUT_R_B",11,Ast,Rst,Sst,Sst,Uhn(cT(kat,1),EZn,21,0,[WX(qxt,Uhn(cT(eRt,1),p1n,95,0,[Uxt,Xxt,Hxt]))])),Wst=new pun("IN_T_L",12,Ast,Fst,jst,jst,Uhn(cT(kat,1),EZn,21,0,[WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[Vxt,Bxt])),WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[Vxt,Bxt,Hxt]))])),Vst=new pun("IN_T_C",13,Ost,Fst,jst,Est,Uhn(cT(kat,1),EZn,21,0,[WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[Vxt,_xt])),WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[Vxt,_xt,Hxt]))])),Qst=new pun("IN_T_R",14,Lst,Fst,jst,Sst,Uhn(cT(kat,1),EZn,21,0,[WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[Vxt,Uxt])),WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[Vxt,Uxt,Hxt]))])),Xst=new pun("IN_C_L",15,Ast,Kst,Est,jst,Uhn(cT(kat,1),EZn,21,0,[WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[zxt,Bxt])),WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[zxt,Bxt,Hxt]))])),qst=new pun("IN_C_C",16,Ost,Kst,Est,Est,Uhn(cT(kat,1),EZn,21,0,[WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[zxt,_xt])),WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[zxt,_xt,Hxt]))])),zst=new pun("IN_C_R",17,Lst,Kst,Est,Sst,Uhn(cT(kat,1),EZn,21,0,[WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[zxt,Uxt])),WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[zxt,Uxt,Hxt]))])),Ust=new pun("IN_B_L",18,Ast,Rst,Sst,jst,Uhn(cT(kat,1),EZn,21,0,[WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[Xxt,Bxt])),WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[Xxt,Bxt,Hxt]))])),Hst=new pun("IN_B_C",19,Ost,Rst,Sst,Est,Uhn(cT(kat,1),EZn,21,0,[WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[Xxt,_xt])),WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[Xxt,_xt,Hxt]))])),Gst=new pun("IN_B_R",20,Lst,Rst,Sst,Sst,Uhn(cT(kat,1),EZn,21,0,[WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[Xxt,Uxt])),WX(Gxt,Uhn(cT(eRt,1),p1n,95,0,[Xxt,Uxt,Hxt]))])),sht=new pun(Y2n,21,null,null,null,null,Uhn(cT(kat,1),EZn,21,0,[]))}function YYn(){YYn=E,j_t=(tQ(),M_t).b,uG(zrn(gZ(M_t.b),0),35),uG(zrn(gZ(M_t.b),1),19),T_t=M_t.a,uG(zrn(gZ(M_t.a),0),35),uG(zrn(gZ(M_t.a),1),19),uG(zrn(gZ(M_t.a),2),19),uG(zrn(gZ(M_t.a),3),19),uG(zrn(gZ(M_t.a),4),19),E_t=M_t.o,uG(zrn(gZ(M_t.o),0),35),uG(zrn(gZ(M_t.o),1),35),P_t=uG(zrn(gZ(M_t.o),2),19),uG(zrn(gZ(M_t.o),3),19),uG(zrn(gZ(M_t.o),4),19),uG(zrn(gZ(M_t.o),5),19),uG(zrn(gZ(M_t.o),6),19),uG(zrn(gZ(M_t.o),7),19),uG(zrn(gZ(M_t.o),8),19),uG(zrn(gZ(M_t.o),9),19),uG(zrn(gZ(M_t.o),10),19),uG(zrn(gZ(M_t.o),11),19),uG(zrn(gZ(M_t.o),12),19),uG(zrn(gZ(M_t.o),13),19),uG(zrn(gZ(M_t.o),14),19),uG(zrn(gZ(M_t.o),15),19),uG(zrn(dZ(M_t.o),0),62),uG(zrn(dZ(M_t.o),1),62),uG(zrn(dZ(M_t.o),2),62),uG(zrn(dZ(M_t.o),3),62),uG(zrn(dZ(M_t.o),4),62),uG(zrn(dZ(M_t.o),5),62),uG(zrn(dZ(M_t.o),6),62),uG(zrn(dZ(M_t.o),7),62),uG(zrn(dZ(M_t.o),8),62),uG(zrn(dZ(M_t.o),9),62),S_t=M_t.p,uG(zrn(gZ(M_t.p),0),35),uG(zrn(gZ(M_t.p),1),35),uG(zrn(gZ(M_t.p),2),35),uG(zrn(gZ(M_t.p),3),35),uG(zrn(gZ(M_t.p),4),19),uG(zrn(gZ(M_t.p),5),19),uG(zrn(dZ(M_t.p),0),62),uG(zrn(dZ(M_t.p),1),62),C_t=M_t.q,uG(zrn(gZ(M_t.q),0),35),I_t=M_t.v,uG(zrn(gZ(M_t.v),0),19),uG(zrn(dZ(M_t.v),0),62),uG(zrn(dZ(M_t.v),1),62),uG(zrn(dZ(M_t.v),2),62),O_t=M_t.w,uG(zrn(gZ(M_t.w),0),35),uG(zrn(gZ(M_t.w),1),35),uG(zrn(gZ(M_t.w),2),35),uG(zrn(gZ(M_t.w),3),19),A_t=M_t.B,uG(zrn(gZ(M_t.B),0),19),uG(zrn(dZ(M_t.B),0),62),uG(zrn(dZ(M_t.B),1),62),uG(zrn(dZ(M_t.B),2),62),$_t=M_t.Q,uG(zrn(gZ(M_t.Q),0),19),uG(zrn(dZ(M_t.Q),0),62),D_t=M_t.R,uG(zrn(gZ(M_t.R),0),35),x_t=M_t.S,uG(zrn(dZ(M_t.S),0),62),uG(zrn(dZ(M_t.S),1),62),uG(zrn(dZ(M_t.S),2),62),uG(zrn(dZ(M_t.S),3),62),uG(zrn(dZ(M_t.S),4),62),uG(zrn(dZ(M_t.S),5),62),uG(zrn(dZ(M_t.S),6),62),uG(zrn(dZ(M_t.S),7),62),uG(zrn(dZ(M_t.S),8),62),uG(zrn(dZ(M_t.S),9),62),uG(zrn(dZ(M_t.S),10),62),uG(zrn(dZ(M_t.S),11),62),uG(zrn(dZ(M_t.S),12),62),uG(zrn(dZ(M_t.S),13),62),uG(zrn(dZ(M_t.S),14),62),R_t=M_t.T,uG(zrn(gZ(M_t.T),0),19),uG(zrn(gZ(M_t.T),2),19),K_t=uG(zrn(gZ(M_t.T),3),19),uG(zrn(gZ(M_t.T),4),19),uG(zrn(dZ(M_t.T),0),62),uG(zrn(dZ(M_t.T),1),62),uG(zrn(gZ(M_t.T),1),19),F_t=M_t.U,uG(zrn(gZ(M_t.U),0),35),uG(zrn(gZ(M_t.U),1),35),uG(zrn(gZ(M_t.U),2),19),uG(zrn(gZ(M_t.U),3),19),uG(zrn(gZ(M_t.U),4),19),uG(zrn(gZ(M_t.U),5),19),uG(zrn(dZ(M_t.U),0),62),__t=M_t.V,uG(zrn(gZ(M_t.V),0),19),B_t=M_t.W,uG(zrn(gZ(M_t.W),0),35),uG(zrn(gZ(M_t.W),1),35),uG(zrn(gZ(M_t.W),2),35),uG(zrn(gZ(M_t.W),3),19),uG(zrn(gZ(M_t.W),4),19),uG(zrn(gZ(M_t.W),5),19),U_t=M_t.bb,uG(zrn(gZ(M_t.bb),0),35),uG(zrn(gZ(M_t.bb),1),35),uG(zrn(gZ(M_t.bb),2),35),uG(zrn(gZ(M_t.bb),3),35),uG(zrn(gZ(M_t.bb),4),35),uG(zrn(gZ(M_t.bb),5),35),uG(zrn(gZ(M_t.bb),6),35),uG(zrn(gZ(M_t.bb),7),19),uG(zrn(dZ(M_t.bb),0),62),uG(zrn(dZ(M_t.bb),1),62),G_t=M_t.eb,uG(zrn(gZ(M_t.eb),0),35),uG(zrn(gZ(M_t.eb),1),35),uG(zrn(gZ(M_t.eb),2),35),uG(zrn(gZ(M_t.eb),3),35),uG(zrn(gZ(M_t.eb),4),35),uG(zrn(gZ(M_t.eb),5),35),uG(zrn(gZ(M_t.eb),6),19),uG(zrn(gZ(M_t.eb),7),19),H_t=M_t.ab,uG(zrn(gZ(M_t.ab),0),35),uG(zrn(gZ(M_t.ab),1),35),L_t=M_t.H,uG(zrn(gZ(M_t.H),0),19),uG(zrn(gZ(M_t.H),1),19),uG(zrn(gZ(M_t.H),2),19),uG(zrn(gZ(M_t.H),3),19),uG(zrn(gZ(M_t.H),4),19),uG(zrn(gZ(M_t.H),5),19),uG(zrn(dZ(M_t.H),0),62),q_t=M_t.db,uG(zrn(gZ(M_t.db),0),19),N_t=M_t.M}function ZYn(n){var t;n.O||(n.O=!0,qon(n,"type"),Xon(n,"ecore.xml.type"),zon(n,lct),t=uG(jxn((MP(),l_t),lct),2044),ttn(n1(n.fb),n.b),A4(n.b,DBt,"AnyType",!1,!1,!0),mun(uG(zrn(gZ(n.b),0),35),n.wb.D,jrt,null,0,-1,DBt,!1,!1,!0,!1,!1,!1),mun(uG(zrn(gZ(n.b),1),35),n.wb.D,"any",null,0,-1,DBt,!0,!0,!0,!1,!1,!0),mun(uG(zrn(gZ(n.b),2),35),n.wb.D,"anyAttribute",null,0,-1,DBt,!1,!1,!0,!1,!1,!1),A4(n.bb,lHt,pct,!1,!1,!0),mun(uG(zrn(gZ(n.bb),0),35),n.gb,"data",null,0,1,lHt,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.bb),1),35),n.gb,Ret,null,1,1,lHt,!1,!1,!0,!1,!0,!1),A4(n.fb,bHt,mct,!1,!1,!0),mun(uG(zrn(gZ(n.fb),0),35),t.gb,"rawValue",null,0,1,bHt,!0,!0,!0,!1,!0,!0),mun(uG(zrn(gZ(n.fb),1),35),t.a,uet,null,0,1,bHt,!0,!0,!0,!1,!0,!0),ujn(uG(zrn(gZ(n.fb),2),19),n.wb.q,null,"instanceType",1,1,bHt,!1,!1,!0,!1,!1,!1,!1),A4(n.qb,wHt,vct,!1,!1,!0),mun(uG(zrn(gZ(n.qb),0),35),n.wb.D,jrt,null,0,-1,null,!1,!1,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.qb),1),19),n.wb.ab,null,"xMLNSPrefixMap",0,-1,null,!0,!1,!0,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.qb),2),19),n.wb.ab,null,"xSISchemaLocation",0,-1,null,!0,!1,!0,!0,!1,!1,!1),mun(uG(zrn(gZ(n.qb),3),35),n.gb,"cDATA",null,0,-2,null,!0,!0,!0,!1,!1,!0),mun(uG(zrn(gZ(n.qb),4),35),n.gb,"comment",null,0,-2,null,!0,!0,!0,!1,!1,!0),ujn(uG(zrn(gZ(n.qb),5),19),n.bb,null,qct,0,-2,null,!0,!0,!0,!0,!1,!1,!0),mun(uG(zrn(gZ(n.qb),6),35),n.gb,get,null,0,-2,null,!0,!0,!0,!1,!1,!0),UJ(n.a,dat,"AnySimpleType",!0),UJ(n.c,$ot,"AnyURI",!0),UJ(n.d,cT(tUt,1),"Base64Binary",!0),UJ(n.e,ZHt,"Boolean",!0),UJ(n.f,cot,"BooleanObject",!0),UJ(n.g,tUt,"Byte",!0),UJ(n.i,uot,"ByteObject",!0),UJ(n.j,$ot,"Date",!0),UJ(n.k,$ot,"DateTime",!0),UJ(n.n,Bot,"Decimal",!0),UJ(n.o,eUt,"Double",!0),UJ(n.p,fot,"DoubleObject",!0),UJ(n.q,$ot,"Duration",!0),UJ(n.s,yat,"ENTITIES",!0),UJ(n.r,yat,"ENTITIESBase",!0),UJ(n.t,$ot,Ect,!0),UJ(n.u,iUt,"Float",!0),UJ(n.v,lot,"FloatObject",!0),UJ(n.w,$ot,"GDay",!0),UJ(n.B,$ot,"GMonth",!0),UJ(n.A,$ot,"GMonthDay",!0),UJ(n.C,$ot,"GYear",!0),UJ(n.D,$ot,"GYearMonth",!0),UJ(n.F,cT(tUt,1),"HexBinary",!0),UJ(n.G,$ot,"ID",!0),UJ(n.H,$ot,"IDREF",!0),UJ(n.J,yat,"IDREFS",!0),UJ(n.I,yat,"IDREFSBase",!0),UJ(n.K,YHt,"Int",!0),UJ(n.M,Xot,"Integer",!0),UJ(n.L,dot,"IntObject",!0),UJ(n.P,$ot,"Language",!0),UJ(n.Q,nUt,"Long",!0),UJ(n.R,yot,"LongObject",!0),UJ(n.S,$ot,"Name",!0),UJ(n.T,$ot,Sct,!0),UJ(n.U,Xot,"NegativeInteger",!0),UJ(n.V,$ot,xct,!0),UJ(n.X,yat,"NMTOKENS",!0),UJ(n.W,yat,"NMTOKENSBase",!0),UJ(n.Y,Xot,"NonNegativeInteger",!0),UJ(n.Z,Xot,"NonPositiveInteger",!0),UJ(n.$,$ot,"NormalizedString",!0),UJ(n._,$ot,"NOTATION",!0),UJ(n.ab,$ot,"PositiveInteger",!0),UJ(n.cb,$ot,"QName",!0),UJ(n.db,rUt,"Short",!0),UJ(n.eb,Tot,"ShortObject",!0),UJ(n.gb,$ot,C1n,!0),UJ(n.hb,$ot,"Time",!0),UJ(n.ib,$ot,"Token",!0),UJ(n.jb,rUt,"UnsignedByte",!0),UJ(n.kb,Tot,"UnsignedByteObject",!0),UJ(n.lb,nUt,"UnsignedInt",!0),UJ(n.mb,yot,"UnsignedIntObject",!0),UJ(n.nb,Xot,"UnsignedLong",!0),UJ(n.ob,YHt,"UnsignedShort",!0),UJ(n.pb,dot,"UnsignedShortObject",!0),nwn(n,lct),iZn(n))}function nZn(n,t,i,r){var c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A,L,N,$,D,x,R,K,F,_,B,H,U,G,q,X;if(r.$g())return hZ(),hZ(),zot;if(oM(gK(zDn(t,(XYn(),z$t)))))return hZ(),hZ(),zot;if(M=0!=(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a).i,T=!(j=bLn(t)).dc(),M||T){if(!(c=uG(zDn(t,yDt),143)))throw hv(new jM("Resolved algorithm is not set; apply a LayoutAlgorithmResolver before computing layout."));if(U=bA(c,(rDn(),yFt)),gkn(t),!M&&T&&!U)return hZ(),hZ(),zot;if(m=new Zm,xA(zDn(t,E$t))===xA((Own(),Ixt))&&(bA(c,mFt)||bA(c,pFt))){if(oM(gK(zDn(t,HDt))))throw hv(new jM("Topdown layout cannot be used together with hierarchy handling."));for(N=dBn(n,t),Qon($=new lS,(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a));0!=$.b;)gkn(A=uG(0==$.b?null:(MK(0!=$.b),Lrn($,$.a.a)),27)),xA(zDn(A,E$t))===xA(Axt)||vnn(A,e$t)&&!k9(c,zDn(A,yDt))?(Ohn(m,nZn(n,A,i,r)),Myn(A,E$t,Axt),UHn(A)):Qon($,(!A.a&&(A.a=new fV(bFt,A,10,11)),A.a))}else{if(N=(!t.a&&(t.a=new fV(bFt,t,10,11)),t.a).i,oM(gK(zDn(t,HDt)))){if((G=r.eh(1)).Ug(Lnt,1),null==zDn(t,UDt))throw hv(new jM(t.k+" has not been assigned a top-down node type."));if(uG(zDn(t,UDt),280)==(Iwn(),fKt)||uG(zDn(t,UDt),280)==bKt)for(p=new DD((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a));p.e!=p.i.gc();)if(g=uG(Zkn(p),27),O=uG(zDn(g,yDt),143),(!g.a&&(g.a=new fV(bFt,g,10,11)),g.a).i>0&&(A1(O.f),0)){if(uG(zDn(g,UDt),280)==fKt)throw hv(new jM("Topdown Layout Providers should only be used on parallel nodes."));XA(A1(O.f)),null.Um(),vN(g,e.Math.max(g.g,null.Vm),e.Math.max(g.f,null.Vm))}else null!=zDn(g,VDt)&&(H=uG(zDn(g,VDt),347).Tg(g),vN(g,e.Math.max(g.g,H.a),e.Math.max(g.f,H.b)));if(D=uG(zDn(t,W$t),107),b=t.g-(D.b+D.c),l=t.f-(D.d+D.a),G.bh("Available Child Area: ("+b+"|"+l+")"),Myn(t,c$t,b/l),Mkn(t,c,r.eh(N)),uG(zDn(t,UDt),280)==bKt&&(VJn(t),vN(t,D.b+uM(pK(zDn(t,h$t)))+D.c,D.d+uM(pK(zDn(t,s$t)))+D.a)),G.bh("Executed layout algorithm: "+mK(zDn(t,e$t))+" on node "+t.k),uG(zDn(t,UDt),280)==fKt){if(b<0||l<0)throw hv(new jM("The size defined by the parent parallel node is too small for the space provided by the paddings of the child hierarchical node. "+t.k));for(vnn(t,h$t)||vnn(t,s$t)||VJn(t),d=uM(pK(zDn(t,h$t))),w=uM(pK(zDn(t,s$t))),G.bh("Desired Child Area: ("+d+"|"+w+")"),R=b/d,K=l/w,x=e.Math.min(R,e.Math.min(K,uM(pK(zDn(t,GDt))))),Myn(t,XDt,x),G.bh(t.k+" -- Local Scale Factor (X|Y): ("+R+"|"+K+")"),v=uG(zDn(t,l$t),21),a=0,o=0,x<R&&(v.Hc((ZSn(),VNt))?a=(b/2-d*x/2)/x:v.Hc(QNt)&&(a=(b-d*x)/x)),x<K&&(v.Hc((ZSn(),YNt))?o=(l/2-w*x/2)/x:v.Hc(JNt)&&(o=(l-w*x)/x)),q=a+(D.b/x-D.b),X=o+(D.d/x-D.d),G.bh("Shift: ("+q+"|"+X+")"),L=new DD((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a));L.e!=L.i.gc();)ycn(A=uG(Zkn(L),27),A.i+q),Mcn(A,A.j+X);for(y=new DD((!t.b&&(t.b=new fV(aFt,t,12,3)),t.b));y.e!=y.i.gc();){for(_=new DD((!(k=uG(Zkn(y),74)).a&&(k.a=new fV(oFt,k,6,6)),k.a));_.e!=_.i.gc();)for(MN(F=uG(Zkn(_),166),F.j+q,F.k+X),yN(F,F.b+q,F.c+X),s=new DD((!F.a&&(F.a=new MD(eFt,F,5)),F.a));s.e!=s.i.gc();)mN(u=uG(Zkn(s),377),u.a+q,u.b+X);for(I=new DD((!k.n&&(k.n=new fV(lFt,k,1,7)),k.n));I.e!=I.i.gc();)kN(C=uG(Zkn(I),135),C.i+q,C.j+X);for(S=Fkn(P=uG(zDn(k,L$t),75),0);S.b!=S.d.c;)(E=uG(I6(S),8)).a+=q,E.b+=X;Myn(k,L$t,P)}}G.Vg()}for(f=new DD((!t.a&&(t.a=new fV(bFt,t,10,11)),t.a));f.e!=f.i.gc();)Ohn(m,nZn(n,h=uG(Zkn(f),27),i,r)),UHn(h)}if(r.$g())return hZ(),hZ(),zot;for(B=new Ww(m);B.a<B.c.c.length;)Myn(uG(N3(B),74),z$t,(qx(),!0));return oM(gK(zDn(t,HDt)))||Mkn(t,c,r.eh(N)),yUn(m),T&&U?j:(hZ(),hZ(),zot)}return hZ(),hZ(),zot}function tZn(n,t){var e;return yHt||(yHt=new Ym,MHt=new Ym,QYn(),QYn(),zmn(e=new K3(4),"\t\n\r\r "),r2(yHt,Jct,e),r2(MHt,Jct,FGn(e)),zmn(e=new K3(4),nat),r2(yHt,Wct,e),r2(MHt,Wct,FGn(e)),zmn(e=new K3(4),nat),r2(yHt,Wct,e),r2(MHt,Wct,FGn(e)),zmn(e=new K3(4),tat),TXn(e,uG(U1(yHt,Wct),122)),r2(yHt,Qct,e),r2(MHt,Qct,FGn(e)),zmn(e=new K3(4),"-.0:AZ__az\xb7\xb7\xc0\xd6\xd8\xf6\xf8\u0131\u0134\u013e\u0141\u0148\u014a\u017e\u0180\u01c3\u01cd\u01f0\u01f4\u01f5\u01fa\u0217\u0250\u02a8\u02bb\u02c1\u02d0\u02d1\u0300\u0345\u0360\u0361\u0386\u038a\u038c\u038c\u038e\u03a1\u03a3\u03ce\u03d0\u03d6\u03da\u03da\u03dc\u03dc\u03de\u03de\u03e0\u03e0\u03e2\u03f3\u0401\u040c\u040e\u044f\u0451\u045c\u045e\u0481\u0483\u0486\u0490\u04c4\u04c7\u04c8\u04cb\u04cc\u04d0\u04eb\u04ee\u04f5\u04f8\u04f9\u0531\u0556\u0559\u0559\u0561\u0586\u0591\u05a1\u05a3\u05b9\u05bb\u05bd\u05bf\u05bf\u05c1\u05c2\u05c4\u05c4\u05d0\u05ea\u05f0\u05f2\u0621\u063a\u0640\u0652\u0660\u0669\u0670\u06b7\u06ba\u06be\u06c0\u06ce\u06d0\u06d3\u06d5\u06e8\u06ea\u06ed\u06f0\u06f9\u0901\u0903\u0905\u0939\u093c\u094d\u0951\u0954\u0958\u0963\u0966\u096f\u0981\u0983\u0985\u098c\u098f\u0990\u0993\u09a8\u09aa\u09b0\u09b2\u09b2\u09b6\u09b9\u09bc\u09bc\u09be\u09c4\u09c7\u09c8\u09cb\u09cd\u09d7\u09d7\u09dc\u09dd\u09df\u09e3\u09e6\u09f1\u0a02\u0a02\u0a05\u0a0a\u0a0f\u0a10\u0a13\u0a28\u0a2a\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3c\u0a3e\u0a42\u0a47\u0a48\u0a4b\u0a4d\u0a59\u0a5c\u0a5e\u0a5e\u0a66\u0a74\u0a81\u0a83\u0a85\u0a8b\u0a8d\u0a8d\u0a8f\u0a91\u0a93\u0aa8\u0aaa\u0ab0\u0ab2\u0ab3\u0ab5\u0ab9\u0abc\u0ac5\u0ac7\u0ac9\u0acb\u0acd\u0ae0\u0ae0\u0ae6\u0aef\u0b01\u0b03\u0b05\u0b0c\u0b0f\u0b10\u0b13\u0b28\u0b2a\u0b30\u0b32\u0b33\u0b36\u0b39\u0b3c\u0b43\u0b47\u0b48\u0b4b\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f\u0b61\u0b66\u0b6f\u0b82\u0b83\u0b85\u0b8a\u0b8e\u0b90\u0b92\u0b95\u0b99\u0b9a\u0b9c\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8\u0baa\u0bae\u0bb5\u0bb7\u0bb9\u0bbe\u0bc2\u0bc6\u0bc8\u0bca\u0bcd\u0bd7\u0bd7\u0be7\u0bef\u0c01\u0c03\u0c05\u0c0c\u0c0e\u0c10\u0c12\u0c28\u0c2a\u0c33\u0c35\u0c39\u0c3e\u0c44\u0c46\u0c48\u0c4a\u0c4d\u0c55\u0c56\u0c60\u0c61\u0c66\u0c6f\u0c82\u0c83\u0c85\u0c8c\u0c8e\u0c90\u0c92\u0ca8\u0caa\u0cb3\u0cb5\u0cb9\u0cbe\u0cc4\u0cc6\u0cc8\u0cca\u0ccd\u0cd5\u0cd6\u0cde\u0cde\u0ce0\u0ce1\u0ce6\u0cef\u0d02\u0d03\u0d05\u0d0c\u0d0e\u0d10\u0d12\u0d28\u0d2a\u0d39\u0d3e\u0d43\u0d46\u0d48\u0d4a\u0d4d\u0d57\u0d57\u0d60\u0d61\u0d66\u0d6f\u0e01\u0e2e\u0e30\u0e3a\u0e40\u0e4e\u0e50\u0e59\u0e81\u0e82\u0e84\u0e84\u0e87\u0e88\u0e8a\u0e8a\u0e8d\u0e8d\u0e94\u0e97\u0e99\u0e9f\u0ea1\u0ea3\u0ea5\u0ea5\u0ea7\u0ea7\u0eaa\u0eab\u0ead\u0eae\u0eb0\u0eb9\u0ebb\u0ebd\u0ec0\u0ec4\u0ec6\u0ec6\u0ec8\u0ecd\u0ed0\u0ed9\u0f18\u0f19\u0f20\u0f29\u0f35\u0f35\u0f37\u0f37\u0f39\u0f39\u0f3e\u0f47\u0f49\u0f69\u0f71\u0f84\u0f86\u0f8b\u0f90\u0f95\u0f97\u0f97\u0f99\u0fad\u0fb1\u0fb7\u0fb9\u0fb9\u10a0\u10c5\u10d0\u10f6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110b\u110c\u110e\u1112\u113c\u113c\u113e\u113e\u1140\u1140\u114c\u114c\u114e\u114e\u1150\u1150\u1154\u1155\u1159\u1159\u115f\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116d\u116e\u1172\u1173\u1175\u1175\u119e\u119e\u11a8\u11a8\u11ab\u11ab\u11ae\u11af\u11b7\u11b8\u11ba\u11ba\u11bc\u11c2\u11eb\u11eb\u11f0\u11f0\u11f9\u11f9\u1e00\u1e9b\u1ea0\u1ef9\u1f00\u1f15\u1f18\u1f1d\u1f20\u1f45\u1f48\u1f4d\u1f50\u1f57\u1f59\u1f59\u1f5b\u1f5b\u1f5d\u1f5d\u1f5f\u1f7d\u1f80\u1fb4\u1fb6\u1fbc\u1fbe\u1fbe\u1fc2\u1fc4\u1fc6\u1fcc\u1fd0\u1fd3\u1fd6\u1fdb\u1fe0\u1fec\u1ff2\u1ff4\u1ff6\u1ffc\u20d0\u20dc\u20e1\u20e1\u2126\u2126\u212a\u212b\u212e\u212e\u2180\u2182\u3005\u3005\u3007\u3007\u3021\u302f\u3031\u3035\u3041\u3094\u3099\u309a\u309d\u309e\u30a1\u30fa\u30fc\u30fe\u3105\u312c\u4e00\u9fa5\uac00\ud7a3"),r2(yHt,Yct,e),r2(MHt,Yct,FGn(e)),zmn(e=new K3(4),tat),HFn(e,95,95),HFn(e,58,58),r2(yHt,Zct,e),r2(MHt,Zct,FGn(e))),uG(U1(t?yHt:MHt,n),138)}function eZn(n){hP(n,new hCn(_T(xT(FT(DT(KT(RT(new bu,S0n),"ELK Layered"),"Layer-based algorithm provided by the Eclipse Layout Kernel. Arranges as many edges as possible into one direction by placing nodes into subsequent layers. This implementation supports different routing styles (straight, orthogonal, splines); if orthogonal routing is selected, arbitrary port constraints are respected, thus enabling the layout of block diagrams such as actor-oriented models or circuit schematics. Furthermore, full layout of compound graphs with cross-hierarchy edges is supported when the respective option is activated on the top level."),new Tc),S0n),WX((rDn(),jFt),Uhn(cT(PFt,1),p1n,245,0,[yFt,MFt,kFt,TFt,mFt,pFt]))))),U4(n,S0n,A8n,Jkn(lTt)),U4(n,S0n,L8n,Jkn(bTt)),U4(n,S0n,D3n,Jkn(wTt)),U4(n,S0n,N8n,Jkn(dTt)),U4(n,S0n,u4n,Jkn(pTt)),U4(n,S0n,$8n,Jkn(mTt)),U4(n,S0n,D8n,Jkn(yTt)),U4(n,S0n,x8n,Jkn(TTt)),U4(n,S0n,R8n,Jkn(jTt)),U4(n,S0n,K8n,Jkn(MTt)),U4(n,S0n,o4n,Jkn(ETt)),U4(n,S0n,F8n,Jkn(PTt)),U4(n,S0n,_8n,Jkn(ITt)),U4(n,S0n,B8n,Jkn(kTt)),U4(n,S0n,O5n,Jkn(fTt)),U4(n,S0n,L5n,Jkn(gTt)),U4(n,S0n,A5n,Jkn(vTt)),U4(n,S0n,N5n,Jkn(STt)),U4(n,S0n,a4n,xwn(0)),U4(n,S0n,$5n,Jkn(aTt)),U4(n,S0n,D5n,Jkn(oTt)),U4(n,S0n,x5n,Jkn(uTt)),U4(n,S0n,U5n,Jkn(qTt)),U4(n,S0n,G5n,Jkn(RTt)),U4(n,S0n,q5n,Jkn(KTt)),U4(n,S0n,X5n,Jkn(BTt)),U4(n,S0n,z5n,Jkn(FTt)),U4(n,S0n,V5n,Jkn(_Tt)),U4(n,S0n,W5n,Jkn(zTt)),U4(n,S0n,Q5n,Jkn(XTt)),U4(n,S0n,J5n,Jkn(UTt)),U4(n,S0n,Y5n,Jkn(HTt)),U4(n,S0n,Z5n,Jkn(GTt)),U4(n,S0n,T5n,Jkn(LMt)),U4(n,S0n,j5n,Jkn(NMt)),U4(n,S0n,P5n,Jkn(Zyt)),U4(n,S0n,C5n,Jkn(nMt)),U4(n,S0n,k4n,Jkn(NTt)),U4(n,S0n,y4n,Jkn(DTt)),U4(n,S0n,M4n,Jkn(LTt)),U4(n,S0n,T4n,Jkn(ATt)),U4(n,S0n,j4n,$Tt),U4(n,S0n,K3n,BMt),U4(n,S0n,m8n,Wyt),U4(n,S0n,H8n,0),U4(n,S0n,s4n,xwn(1)),U4(n,S0n,R3n,r4n),U4(n,S0n,U8n,Jkn(FMt)),U4(n,S0n,l4n,Jkn(JMt)),U4(n,S0n,G8n,Jkn(eTt)),U4(n,S0n,q8n,Jkn(_yt)),U4(n,S0n,X8n,Jkn(byt)),U4(n,S0n,b8n,Jkn(rMt)),U4(n,S0n,h4n,(qx(),!0)),U4(n,S0n,z8n,Jkn(sMt)),U4(n,S0n,V8n,Jkn(hMt)),U4(n,S0n,p4n,Jkn(DMt)),U4(n,S0n,g4n,Jkn(KMt)),U4(n,S0n,d4n,Jkn(xMt)),U4(n,S0n,W8n,Uyt),U4(n,S0n,m4n,Jkn(PMt)),U4(n,S0n,Q8n,Jkn(SMt)),U4(n,S0n,v4n,Jkn(nTt)),U4(n,S0n,J8n,Jkn(ZMt)),U4(n,S0n,Y8n,Jkn(tTt)),U4(n,S0n,Z8n,GMt),U4(n,S0n,n9n,Jkn(XMt)),U4(n,S0n,t9n,Jkn(zMt)),U4(n,S0n,e9n,Jkn(VMt)),U4(n,S0n,i9n,Jkn(qMt)),U4(n,S0n,W6n,Jkn(xTt)),U4(n,S0n,Y6n,Jkn(MMt)),U4(n,S0n,r5n,Jkn(yMt)),U4(n,S0n,V6n,Jkn(OTt)),U4(n,S0n,Z6n,Jkn(gMt)),U4(n,S0n,J6n,Jkn(Fyt)),U4(n,S0n,o5n,Jkn(Kyt)),U4(n,S0n,u5n,Jkn(Cyt)),U4(n,S0n,d5n,Jkn(Iyt)),U4(n,S0n,g5n,Jkn(Ayt)),U4(n,S0n,p5n,Jkn(Oyt)),U4(n,S0n,h5n,Jkn(Ryt)),U4(n,S0n,G6n,Jkn(jMt)),U4(n,S0n,q6n,Jkn(EMt)),U4(n,S0n,U6n,Jkn(lMt)),U4(n,S0n,m5n,Jkn($Mt)),U4(n,S0n,y5n,Jkn(IMt)),U4(n,S0n,H6n,Jkn(eMt)),U4(n,S0n,M5n,Jkn(AMt)),U4(n,S0n,E5n,Jkn(Jyt)),U4(n,S0n,S5n,Jkn(Yyt)),U4(n,S0n,r9n,Jkn(Pyt)),U4(n,S0n,k5n,Jkn(CMt)),U4(n,S0n,K5n,Jkn(vyt)),U4(n,S0n,F5n,Jkn(myt)),U4(n,S0n,R5n,Jkn(pyt)),U4(n,S0n,_5n,Jkn(aMt)),U4(n,S0n,B5n,Jkn(cMt)),U4(n,S0n,H5n,Jkn(oMt)),U4(n,S0n,x4n,Jkn(RMt)),U4(n,S0n,c9n,Jkn(bMt)),U4(n,S0n,x3n,Jkn(tMt)),U4(n,S0n,a9n,Jkn(Xyt)),U4(n,S0n,b4n,Jkn(qyt)),U4(n,S0n,s5n,Jkn(Lyt)),U4(n,S0n,o9n,Jkn(YMt)),U4(n,S0n,u9n,Jkn(gyt)),U4(n,S0n,s9n,Jkn(uMt)),U4(n,S0n,h9n,Jkn(WMt)),U4(n,S0n,f9n,Jkn(HMt)),U4(n,S0n,l9n,Jkn(UMt)),U4(n,S0n,e5n,Jkn(mMt)),U4(n,S0n,i5n,Jkn(vMt)),U4(n,S0n,b9n,Jkn(rTt)),U4(n,S0n,X6n,Jkn(wyt)),U4(n,S0n,c5n,Jkn(kMt)),U4(n,S0n,n8n,Jkn(zyt)),U4(n,S0n,t8n,Jkn(Gyt)),U4(n,S0n,w9n,Jkn(TMt)),U4(n,S0n,a5n,Jkn(wMt)),U4(n,S0n,v5n,Jkn(OMt)),U4(n,S0n,d9n,Jkn(CTt)),U4(n,S0n,B6n,Jkn(Hyt)),U4(n,S0n,z6n,Jkn(iTt)),U4(n,S0n,I5n,Jkn(Qyt)),U4(n,S0n,f5n,Jkn(Nyt)),U4(n,S0n,l5n,Jkn($yt)),U4(n,S0n,n5n,Jkn(dMt)),U4(n,S0n,b5n,Jkn(Dyt)),U4(n,S0n,g9n,Jkn(fMt)),U4(n,S0n,t5n,Jkn(pMt)),U4(n,S0n,w5n,Jkn(xyt)),U4(n,S0n,e8n,Jkn(Syt)),U4(n,S0n,a8n,Jkn(Tyt)),U4(n,S0n,o8n,Jkn(yyt)),U4(n,S0n,u8n,Jkn(Myt)),U4(n,S0n,r8n,Jkn(jyt)),U4(n,S0n,c8n,Jkn(kyt)),U4(n,S0n,i8n,Jkn(Eyt)),U4(n,S0n,Q6n,Jkn(iMt))}function iZn(n){Hxn(n.a,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"anySimpleType"])),Hxn(n.b,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"anyType",Srt,jrt])),Hxn(uG(zrn(gZ(n.b),0),35),Ert,Uhn(cT($ot,1),zZn,2,6,[Srt,cct,Bet,":mixed"])),Hxn(uG(zrn(gZ(n.b),1),35),Ert,Uhn(cT($ot,1),zZn,2,6,[Srt,cct,fct,bct,Bet,":1",Mct,"lax"])),Hxn(uG(zrn(gZ(n.b),2),35),Ert,Uhn(cT($ot,1),zZn,2,6,[Srt,ict,fct,bct,Bet,":2",Mct,"lax"])),Hxn(n.c,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"anyURI",hct,act])),Hxn(n.d,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"base64Binary",hct,act])),Hxn(n.e,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,dZn,hct,act])),Hxn(n.f,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"boolean:Object",Krt,dZn])),Hxn(n.g,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,lrt])),Hxn(n.i,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"byte:Object",Krt,lrt])),Hxn(n.j,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"date",hct,act])),Hxn(n.k,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"dateTime",hct,act])),Hxn(n.n,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"decimal",hct,act])),Hxn(n.o,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,wrt,hct,act])),Hxn(n.p,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"double:Object",Krt,wrt])),Hxn(n.q,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"duration",hct,act])),Hxn(n.s,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"ENTITIES",Krt,Tct,jct,"1"])),Hxn(n.r,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,Tct,oct,Ect])),Hxn(n.t,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,Ect,Krt,Sct])),Hxn(n.u,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,drt,hct,act])),Hxn(n.v,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"float:Object",Krt,drt])),Hxn(n.w,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"gDay",hct,act])),Hxn(n.B,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"gMonth",hct,act])),Hxn(n.A,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"gMonthDay",hct,act])),Hxn(n.C,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"gYear",hct,act])),Hxn(n.D,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"gYearMonth",hct,act])),Hxn(n.F,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"hexBinary",hct,act])),Hxn(n.G,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"ID",Krt,Sct])),Hxn(n.H,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"IDREF",Krt,Sct])),Hxn(n.J,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"IDREFS",Krt,Pct,jct,"1"])),Hxn(n.I,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,Pct,oct,"IDREF"])),Hxn(n.K,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,grt])),Hxn(n.M,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,Cct])),Hxn(n.L,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"int:Object",Krt,grt])),Hxn(n.P,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"language",Krt,Ict,Oct,Act])),Hxn(n.Q,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,prt])),Hxn(n.R,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"long:Object",Krt,prt])),Hxn(n.S,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"Name",Krt,Ict,Oct,Lct])),Hxn(n.T,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,Sct,Krt,"Name",Oct,Nct])),Hxn(n.U,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"negativeInteger",Krt,$ct,Dct,"-1"])),Hxn(n.V,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,xct,Krt,Ict,Oct,"\\c+"])),Hxn(n.X,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"NMTOKENS",Krt,Rct,jct,"1"])),Hxn(n.W,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,Rct,oct,xct])),Hxn(n.Y,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,Kct,Krt,Cct,Fct,"0"])),Hxn(n.Z,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,$ct,Krt,Cct,Dct,"0"])),Hxn(n.$,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,_ct,Krt,pZn,hct,"replace"])),Hxn(n._,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"NOTATION",hct,act])),Hxn(n.ab,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"positiveInteger",Krt,Kct,Fct,"1"])),Hxn(n.bb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"processingInstruction_._type",Srt,"empty"])),Hxn(uG(zrn(gZ(n.bb),0),35),Ert,Uhn(cT($ot,1),zZn,2,6,[Srt,ect,Bet,"data"])),Hxn(uG(zrn(gZ(n.bb),1),35),Ert,Uhn(cT($ot,1),zZn,2,6,[Srt,ect,Bet,Ret])),Hxn(n.cb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"QName",hct,act])),Hxn(n.db,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,mrt])),Hxn(n.eb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"short:Object",Krt,mrt])),Hxn(n.fb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"simpleAnyType",Srt,tct])),Hxn(uG(zrn(gZ(n.fb),0),35),Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,":3",Srt,tct])),Hxn(uG(zrn(gZ(n.fb),1),35),Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,":4",Srt,tct])),Hxn(uG(zrn(gZ(n.fb),2),19),Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,":5",Srt,tct])),Hxn(n.gb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,pZn,hct,"preserve"])),Hxn(n.hb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"time",hct,act])),Hxn(n.ib,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,Ict,Krt,_ct,hct,act])),Hxn(n.jb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,Bct,Dct,"255",Fct,"0"])),Hxn(n.kb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"unsignedByte:Object",Krt,Bct])),Hxn(n.lb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,Hct,Dct,"4294967295",Fct,"0"])),Hxn(n.mb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"unsignedInt:Object",Krt,Hct])),Hxn(n.nb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"unsignedLong",Krt,Kct,Dct,Uct,Fct,"0"])),Hxn(n.ob,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,Gct,Dct,"65535",Fct,"0"])),Hxn(n.pb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"unsignedShort:Object",Krt,Gct])),Hxn(n.qb,Ert,Uhn(cT($ot,1),zZn,2,6,[Bet,"",Srt,jrt])),Hxn(uG(zrn(gZ(n.qb),0),35),Ert,Uhn(cT($ot,1),zZn,2,6,[Srt,cct,Bet,":mixed"])),Hxn(uG(zrn(gZ(n.qb),1),19),Ert,Uhn(cT($ot,1),zZn,2,6,[Srt,ect,Bet,"xmlns:prefix"])),Hxn(uG(zrn(gZ(n.qb),2),19),Ert,Uhn(cT($ot,1),zZn,2,6,[Srt,ect,Bet,"xsi:schemaLocation"])),Hxn(uG(zrn(gZ(n.qb),3),35),Ert,Uhn(cT($ot,1),zZn,2,6,[Srt,rct,Bet,"cDATA",uct,sct])),Hxn(uG(zrn(gZ(n.qb),4),35),Ert,Uhn(cT($ot,1),zZn,2,6,[Srt,rct,Bet,"comment",uct,sct])),Hxn(uG(zrn(gZ(n.qb),5),19),Ert,Uhn(cT($ot,1),zZn,2,6,[Srt,rct,Bet,qct,uct,sct])),Hxn(uG(zrn(gZ(n.qb),6),35),Ert,Uhn(cT($ot,1),zZn,2,6,[Srt,rct,Bet,get,uct,sct]))}function rZn(n){return m_("_UI_EMFDiagnostic_marker",n)?"EMF Problem":m_("_UI_CircularContainment_diagnostic",n)?"An object may not circularly contain itself":m_(nit,n)?"Wrong character.":m_(tit,n)?"Invalid reference number.":m_(eit,n)?"A character is required after \\.":m_(iit,n)?"'?' is not expected. '(?:' or '(?=' or '(?!' or '(?<' or '(?#' or '(?>'?":m_(rit,n)?"'(?<' or '(?<!' is expected.":m_(cit,n)?"A comment is not terminated.":m_(ait,n)?"')' is expected.":m_(oit,n)?"Unexpected end of the pattern in a modifier group.":m_(uit,n)?"':' is expected.":m_(sit,n)?"Unexpected end of the pattern in a conditional group.":m_(hit,n)?"A back reference or an anchor or a lookahead or a look-behind is expected in a conditional pattern.":m_(fit,n)?"There are more than three choices in a conditional group.":m_(lit,n)?"A character in U+0040-U+005f must follow \\c.":m_(bit,n)?"A '{' is required before a character category.":m_(wit,n)?"A property name is not closed by '}'.":m_(dit,n)?"Unexpected meta character.":m_(git,n)?"Unknown property.":m_(pit,n)?"A POSIX character class must be closed by ':]'.":m_(mit,n)?"Unexpected end of the pattern in a character class.":m_(vit,n)?"Unknown name for a POSIX character class.":m_("parser.cc.4",n)?"'-' is invalid here.":m_(kit,n)?"']' is expected.":m_(yit,n)?"'[' is invalid in a character class. Write '\\['.":m_(Mit,n)?"']' is invalid in a character class. Write '\\]'.":m_(Tit,n)?"'-' is an invalid character range. Write '\\-'.":m_(jit,n)?"'[' is expected.":m_(Eit,n)?"')' or '-[' or '+[' or '&[' is expected.":m_(Sit,n)?"The range end code point is less than the start code point.":m_(Pit,n)?"Invalid Unicode hex notation.":m_(Cit,n)?"Overflow in a hex notation.":m_(Iit,n)?"'\\x{' must be closed by '}'.":m_(Oit,n)?"Invalid Unicode code point.":m_(Ait,n)?"An anchor must not be here.":m_(Lit,n)?"This expression is not supported in the current option setting.":m_(Nit,n)?"Invalid quantifier. A digit is expected.":m_($it,n)?"Invalid quantifier. Invalid quantity or a '}' is missing.":m_(Dit,n)?"Invalid quantifier. A digit or '}' is expected.":m_(xit,n)?"Invalid quantifier. A min quantity must be <= a max quantity.":m_(Rit,n)?"Invalid quantifier. A quantity value overflow.":m_("_UI_PackageRegistry_extensionpoint",n)?"Ecore Package Registry for Generated Packages":m_("_UI_DynamicPackageRegistry_extensionpoint",n)?"Ecore Package Registry for Dynamic Packages":m_("_UI_FactoryRegistry_extensionpoint",n)?"Ecore Factory Override Registry":m_("_UI_URIExtensionParserRegistry_extensionpoint",n)?"URI Extension Parser Registry":m_("_UI_URIProtocolParserRegistry_extensionpoint",n)?"URI Protocol Parser Registry":m_("_UI_URIContentParserRegistry_extensionpoint",n)?"URI Content Parser Registry":m_("_UI_ContentHandlerRegistry_extensionpoint",n)?"Content Handler Registry":m_("_UI_URIMappingRegistry_extensionpoint",n)?"URI Converter Mapping Registry":m_("_UI_PackageRegistryImplementation_extensionpoint",n)?"Ecore Package Registry Implementation":m_("_UI_ValidationDelegateRegistry_extensionpoint",n)?"Validation Delegate Registry":m_("_UI_SettingDelegateRegistry_extensionpoint",n)?"Feature Setting Delegate Factory Registry":m_("_UI_InvocationDelegateRegistry_extensionpoint",n)?"Operation Invocation Delegate Factory Registry":m_("_UI_EClassInterfaceNotAbstract_diagnostic",n)?"A class that is an interface must also be abstract":m_("_UI_EClassNoCircularSuperTypes_diagnostic",n)?"A class may not be a super type of itself":m_("_UI_EClassNotWellFormedMapEntryNoInstanceClassName_diagnostic",n)?"A class that inherits from a map entry class must have instance class name 'java.util.Map$Entry'":m_("_UI_EReferenceOppositeOfOppositeInconsistent_diagnostic",n)?"The opposite of the opposite may not be a reference different from this one":m_("_UI_EReferenceOppositeNotFeatureOfType_diagnostic",n)?"The opposite must be a feature of the reference's type":m_("_UI_EReferenceTransientOppositeNotTransient_diagnostic",n)?"The opposite of a transient reference must be transient if it is proxy resolving":m_("_UI_EReferenceOppositeBothContainment_diagnostic",n)?"The opposite of a containment reference must not be a containment reference":m_("_UI_EReferenceConsistentUnique_diagnostic",n)?"A containment or bidirectional reference must be unique if its upper bound is different from 1":m_("_UI_ETypedElementNoType_diagnostic",n)?"The typed element must have a type":m_("_UI_EAttributeNoDataType_diagnostic",n)?"The generic attribute type must not refer to a class":m_("_UI_EReferenceNoClass_diagnostic",n)?"The generic reference type must not refer to a data type":m_("_UI_EGenericTypeNoTypeParameterAndClassifier_diagnostic",n)?"A generic type can't refer to both a type parameter and a classifier":m_("_UI_EGenericTypeNoClass_diagnostic",n)?"A generic super type must refer to a class":m_("_UI_EGenericTypeNoTypeParameterOrClassifier_diagnostic",n)?"A generic type in this context must refer to a classifier or a type parameter":m_("_UI_EGenericTypeBoundsOnlyForTypeArgument_diagnostic",n)?"A generic type may have bounds only when used as a type argument":m_("_UI_EGenericTypeNoUpperAndLowerBound_diagnostic",n)?"A generic type must not have both a lower and an upper bound":m_("_UI_EGenericTypeNoTypeParameterOrClassifierAndBound_diagnostic",n)?"A generic type with bounds must not also refer to a type parameter or classifier":m_("_UI_EGenericTypeNoArguments_diagnostic",n)?"A generic type may have arguments only if it refers to a classifier":m_("_UI_EGenericTypeOutOfScopeTypeParameter_diagnostic",n)?"A generic type may only refer to a type parameter that is in scope":n}function cZn(n){var t,e,i,r,c,a,o;n.r||(n.r=!0,qon(n,"graph"),Xon(n,"graph"),zon(n,aet),mhn(n.o,"T"),ttn(n1(n.a),n.p),ttn(n1(n.f),n.a),ttn(n1(n.n),n.f),ttn(n1(n.g),n.n),ttn(n1(n.c),n.n),ttn(n1(n.i),n.c),ttn(n1(n.j),n.c),ttn(n1(n.d),n.f),ttn(n1(n.e),n.a),A4(n.p,Pht,m3n,!0,!0,!1),o=_hn(a=Kln(n.p,n.p,"setProperty")),t=NY(n.o),e=new ev,ttn((!t.d&&(t.d=new MD(g_t,t,1)),t.d),e),rPn(e,i=$Y(o)),OSn(a,t,oet),OSn(a,t=$Y(o),uet),o=_hn(a=Kln(n.p,null,"getProperty")),t=NY(n.o),e=$Y(o),ttn((!t.d&&(t.d=new MD(g_t,t,1)),t.d),e),OSn(a,t,oet),(c=CCn(a,t=$Y(o),null))&&c.oj(),a=Kln(n.p,n.wb.e,"hasProperty"),t=NY(n.o),e=new ev,ttn((!t.d&&(t.d=new MD(g_t,t,1)),t.d),e),OSn(a,t,oet),djn(a=Kln(n.p,n.p,"copyProperties"),n.p,set),a=Kln(n.p,null,"getAllProperties"),t=NY(n.wb.P),e=NY(n.o),ttn((!t.d&&(t.d=new MD(g_t,t,1)),t.d),e),i=new ev,ttn((!e.d&&(e.d=new MD(g_t,e,1)),e.d),i),e=NY(n.wb.M),ttn((!t.d&&(t.d=new MD(g_t,t,1)),t.d),e),(r=CCn(a,t,null))&&r.oj(),A4(n.a,tFt,Att,!0,!1,!0),ujn(uG(zrn(gZ(n.a),0),19),n.k,null,het,0,-1,tFt,!1,!1,!0,!0,!1,!1,!1),A4(n.f,iFt,Ntt,!0,!1,!0),ujn(uG(zrn(gZ(n.f),0),19),n.g,uG(zrn(gZ(n.g),0),19),"labels",0,-1,iFt,!1,!1,!0,!0,!1,!1,!1),mun(uG(zrn(gZ(n.f),1),35),n.wb._,fet,null,0,1,iFt,!1,!1,!0,!1,!0,!1),A4(n.n,rFt,"ElkShape",!0,!1,!0),mun(uG(zrn(gZ(n.n),0),35),n.wb.t,bet,N0n,1,1,rFt,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.n),1),35),n.wb.t,wet,N0n,1,1,rFt,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.n),2),35),n.wb.t,"x",N0n,1,1,rFt,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.n),3),35),n.wb.t,"y",N0n,1,1,rFt,!1,!1,!0,!1,!0,!1),djn(a=Kln(n.n,null,"setDimensions"),n.wb.t,wet),djn(a,n.wb.t,bet),djn(a=Kln(n.n,null,"setLocation"),n.wb.t,"x"),djn(a,n.wb.t,"y"),A4(n.g,lFt,Ftt,!1,!1,!0),ujn(uG(zrn(gZ(n.g),0),19),n.f,uG(zrn(gZ(n.f),0),19),det,0,1,lFt,!1,!1,!0,!1,!1,!1,!1),mun(uG(zrn(gZ(n.g),1),35),n.wb._,get,"",0,1,lFt,!1,!1,!0,!1,!0,!1),A4(n.c,cFt,$tt,!0,!1,!0),ujn(uG(zrn(gZ(n.c),0),19),n.d,uG(zrn(gZ(n.d),1),19),"outgoingEdges",0,-1,cFt,!1,!1,!0,!1,!0,!1,!1),ujn(uG(zrn(gZ(n.c),1),19),n.d,uG(zrn(gZ(n.d),2),19),"incomingEdges",0,-1,cFt,!1,!1,!0,!1,!0,!1,!1),A4(n.i,bFt,_tt,!1,!1,!0),ujn(uG(zrn(gZ(n.i),0),19),n.j,uG(zrn(gZ(n.j),0),19),"ports",0,-1,bFt,!1,!1,!0,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.i),1),19),n.i,uG(zrn(gZ(n.i),2),19),pet,0,-1,bFt,!1,!1,!0,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.i),2),19),n.i,uG(zrn(gZ(n.i),1),19),det,0,1,bFt,!1,!1,!0,!1,!1,!1,!1),ujn(uG(zrn(gZ(n.i),3),19),n.d,uG(zrn(gZ(n.d),0),19),"containedEdges",0,-1,bFt,!1,!1,!0,!0,!1,!1,!1),mun(uG(zrn(gZ(n.i),4),35),n.wb.e,met,null,0,1,bFt,!0,!0,!1,!1,!0,!0),A4(n.j,wFt,Btt,!1,!1,!0),ujn(uG(zrn(gZ(n.j),0),19),n.i,uG(zrn(gZ(n.i),0),19),det,0,1,wFt,!1,!1,!0,!1,!1,!1,!1),A4(n.d,aFt,Dtt,!1,!1,!0),ujn(uG(zrn(gZ(n.d),0),19),n.i,uG(zrn(gZ(n.i),3),19),"containingNode",0,1,aFt,!1,!1,!0,!1,!1,!1,!1),ujn(uG(zrn(gZ(n.d),1),19),n.c,uG(zrn(gZ(n.c),0),19),vet,0,-1,aFt,!1,!1,!0,!1,!0,!1,!1),ujn(uG(zrn(gZ(n.d),2),19),n.c,uG(zrn(gZ(n.c),1),19),ket,0,-1,aFt,!1,!1,!0,!1,!0,!1,!1),ujn(uG(zrn(gZ(n.d),3),19),n.e,uG(zrn(gZ(n.e),5),19),yet,0,-1,aFt,!1,!1,!0,!0,!1,!1,!1),mun(uG(zrn(gZ(n.d),4),35),n.wb.e,"hyperedge",null,0,1,aFt,!0,!0,!1,!1,!0,!0),mun(uG(zrn(gZ(n.d),5),35),n.wb.e,met,null,0,1,aFt,!0,!0,!1,!1,!0,!0),mun(uG(zrn(gZ(n.d),6),35),n.wb.e,"selfloop",null,0,1,aFt,!0,!0,!1,!1,!0,!0),mun(uG(zrn(gZ(n.d),7),35),n.wb.e,"connected",null,0,1,aFt,!0,!0,!1,!1,!0,!0),A4(n.b,eFt,Ltt,!1,!1,!0),mun(uG(zrn(gZ(n.b),0),35),n.wb.t,"x",N0n,1,1,eFt,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.b),1),35),n.wb.t,"y",N0n,1,1,eFt,!1,!1,!0,!1,!0,!1),djn(a=Kln(n.b,null,"set"),n.wb.t,"x"),djn(a,n.wb.t,"y"),A4(n.e,oFt,xtt,!1,!1,!0),mun(uG(zrn(gZ(n.e),0),35),n.wb.t,"startX",null,0,1,oFt,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.e),1),35),n.wb.t,"startY",null,0,1,oFt,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.e),2),35),n.wb.t,"endX",null,0,1,oFt,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.e),3),35),n.wb.t,"endY",null,0,1,oFt,!1,!1,!0,!1,!0,!1),ujn(uG(zrn(gZ(n.e),4),19),n.b,null,Met,0,-1,oFt,!1,!1,!0,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.e),5),19),n.d,uG(zrn(gZ(n.d),3),19),det,0,1,oFt,!1,!1,!0,!1,!1,!1,!1),ujn(uG(zrn(gZ(n.e),6),19),n.c,null,Tet,0,1,oFt,!1,!1,!0,!1,!0,!1,!1),ujn(uG(zrn(gZ(n.e),7),19),n.c,null,jet,0,1,oFt,!1,!1,!0,!1,!0,!1,!1),ujn(uG(zrn(gZ(n.e),8),19),n.e,uG(zrn(gZ(n.e),9),19),Eet,0,-1,oFt,!1,!1,!0,!1,!0,!1,!1),ujn(uG(zrn(gZ(n.e),9),19),n.e,uG(zrn(gZ(n.e),8),19),Set,0,-1,oFt,!1,!1,!0,!1,!0,!1,!1),mun(uG(zrn(gZ(n.e),10),35),n.wb._,fet,null,0,1,oFt,!1,!1,!0,!1,!0,!1),djn(a=Kln(n.e,null,"setStartLocation"),n.wb.t,"x"),djn(a,n.wb.t,"y"),djn(a=Kln(n.e,null,"setEndLocation"),n.wb.t,"x"),djn(a,n.wb.t,"y"),A4(n.k,Sat,"ElkPropertyToValueMapEntry",!1,!1,!1),t=NY(n.o),e=new ev,ttn((!t.d&&(t.d=new MD(g_t,t,1)),t.d),e),N$n(uG(zrn(gZ(n.k),0),35),t,"key",Sat,!1,!1,!0,!1),mun(uG(zrn(gZ(n.k),1),35),n.s,uet,null,0,1,Sat,!1,!1,!0,!1,!0,!1),UJ(n.o,lNt,"IProperty",!0),UJ(n.s,dat,"PropertyValue",!0),nwn(n,aet))}function aZn(){aZn=E,(vHt=Inn(tUt,ret,28,P0n,15,1))[9]=35,vHt[10]=19,vHt[13]=19,vHt[32]=51,vHt[33]=49,vHt[34]=33,qV(vHt,35,38,49),vHt[38]=1,qV(vHt,39,45,49),qV(vHt,45,47,-71),vHt[47]=49,qV(vHt,48,58,-71),vHt[58]=61,vHt[59]=49,vHt[60]=1,vHt[61]=49,vHt[62]=33,qV(vHt,63,65,49),qV(vHt,65,91,-3),qV(vHt,91,93,33),vHt[93]=1,vHt[94]=33,vHt[95]=-3,vHt[96]=33,qV(vHt,97,123,-3),qV(vHt,123,183,33),vHt[183]=-87,qV(vHt,184,192,33),qV(vHt,192,215,-19),vHt[215]=33,qV(vHt,216,247,-19),vHt[247]=33,qV(vHt,248,306,-19),qV(vHt,306,308,33),qV(vHt,308,319,-19),qV(vHt,319,321,33),qV(vHt,321,329,-19),vHt[329]=33,qV(vHt,330,383,-19),vHt[383]=33,qV(vHt,384,452,-19),qV(vHt,452,461,33),qV(vHt,461,497,-19),qV(vHt,497,500,33),qV(vHt,500,502,-19),qV(vHt,502,506,33),qV(vHt,506,536,-19),qV(vHt,536,592,33),qV(vHt,592,681,-19),qV(vHt,681,699,33),qV(vHt,699,706,-19),qV(vHt,706,720,33),qV(vHt,720,722,-87),qV(vHt,722,768,33),qV(vHt,768,838,-87),qV(vHt,838,864,33),qV(vHt,864,866,-87),qV(vHt,866,902,33),vHt[902]=-19,vHt[903]=-87,qV(vHt,904,907,-19),vHt[907]=33,vHt[908]=-19,vHt[909]=33,qV(vHt,910,930,-19),vHt[930]=33,qV(vHt,931,975,-19),vHt[975]=33,qV(vHt,976,983,-19),qV(vHt,983,986,33),vHt[986]=-19,vHt[987]=33,vHt[988]=-19,vHt[989]=33,vHt[990]=-19,vHt[991]=33,vHt[992]=-19,vHt[993]=33,qV(vHt,994,1012,-19),qV(vHt,1012,1025,33),qV(vHt,1025,1037,-19),vHt[1037]=33,qV(vHt,1038,1104,-19),vHt[1104]=33,qV(vHt,1105,1117,-19),vHt[1117]=33,qV(vHt,1118,1154,-19),vHt[1154]=33,qV(vHt,1155,1159,-87),qV(vHt,1159,1168,33),qV(vHt,1168,1221,-19),qV(vHt,1221,1223,33),qV(vHt,1223,1225,-19),qV(vHt,1225,1227,33),qV(vHt,1227,1229,-19),qV(vHt,1229,1232,33),qV(vHt,1232,1260,-19),qV(vHt,1260,1262,33),qV(vHt,1262,1270,-19),qV(vHt,1270,1272,33),qV(vHt,1272,1274,-19),qV(vHt,1274,1329,33),qV(vHt,1329,1367,-19),qV(vHt,1367,1369,33),vHt[1369]=-19,qV(vHt,1370,1377,33),qV(vHt,1377,1415,-19),qV(vHt,1415,1425,33),qV(vHt,1425,1442,-87),vHt[1442]=33,qV(vHt,1443,1466,-87),vHt[1466]=33,qV(vHt,1467,1470,-87),vHt[1470]=33,vHt[1471]=-87,vHt[1472]=33,qV(vHt,1473,1475,-87),vHt[1475]=33,vHt[1476]=-87,qV(vHt,1477,1488,33),qV(vHt,1488,1515,-19),qV(vHt,1515,1520,33),qV(vHt,1520,1523,-19),qV(vHt,1523,1569,33),qV(vHt,1569,1595,-19),qV(vHt,1595,1600,33),vHt[1600]=-87,qV(vHt,1601,1611,-19),qV(vHt,1611,1619,-87),qV(vHt,1619,1632,33),qV(vHt,1632,1642,-87),qV(vHt,1642,1648,33),vHt[1648]=-87,qV(vHt,1649,1720,-19),qV(vHt,1720,1722,33),qV(vHt,1722,1727,-19),vHt[1727]=33,qV(vHt,1728,1743,-19),vHt[1743]=33,qV(vHt,1744,1748,-19),vHt[1748]=33,vHt[1749]=-19,qV(vHt,1750,1765,-87),qV(vHt,1765,1767,-19),qV(vHt,1767,1769,-87),vHt[1769]=33,qV(vHt,1770,1774,-87),qV(vHt,1774,1776,33),qV(vHt,1776,1786,-87),qV(vHt,1786,2305,33),qV(vHt,2305,2308,-87),vHt[2308]=33,qV(vHt,2309,2362,-19),qV(vHt,2362,2364,33),vHt[2364]=-87,vHt[2365]=-19,qV(vHt,2366,2382,-87),qV(vHt,2382,2385,33),qV(vHt,2385,2389,-87),qV(vHt,2389,2392,33),qV(vHt,2392,2402,-19),qV(vHt,2402,2404,-87),qV(vHt,2404,2406,33),qV(vHt,2406,2416,-87),qV(vHt,2416,2433,33),qV(vHt,2433,2436,-87),vHt[2436]=33,qV(vHt,2437,2445,-19),qV(vHt,2445,2447,33),qV(vHt,2447,2449,-19),qV(vHt,2449,2451,33),qV(vHt,2451,2473,-19),vHt[2473]=33,qV(vHt,2474,2481,-19),vHt[2481]=33,vHt[2482]=-19,qV(vHt,2483,2486,33),qV(vHt,2486,2490,-19),qV(vHt,2490,2492,33),vHt[2492]=-87,vHt[2493]=33,qV(vHt,2494,2501,-87),qV(vHt,2501,2503,33),qV(vHt,2503,2505,-87),qV(vHt,2505,2507,33),qV(vHt,2507,2510,-87),qV(vHt,2510,2519,33),vHt[2519]=-87,qV(vHt,2520,2524,33),qV(vHt,2524,2526,-19),vHt[2526]=33,qV(vHt,2527,2530,-19),qV(vHt,2530,2532,-87),qV(vHt,2532,2534,33),qV(vHt,2534,2544,-87),qV(vHt,2544,2546,-19),qV(vHt,2546,2562,33),vHt[2562]=-87,qV(vHt,2563,2565,33),qV(vHt,2565,2571,-19),qV(vHt,2571,2575,33),qV(vHt,2575,2577,-19),qV(vHt,2577,2579,33),qV(vHt,2579,2601,-19),vHt[2601]=33,qV(vHt,2602,2609,-19),vHt[2609]=33,qV(vHt,2610,2612,-19),vHt[2612]=33,qV(vHt,2613,2615,-19),vHt[2615]=33,qV(vHt,2616,2618,-19),qV(vHt,2618,2620,33),vHt[2620]=-87,vHt[2621]=33,qV(vHt,2622,2627,-87),qV(vHt,2627,2631,33),qV(vHt,2631,2633,-87),qV(vHt,2633,2635,33),qV(vHt,2635,2638,-87),qV(vHt,2638,2649,33),qV(vHt,2649,2653,-19),vHt[2653]=33,vHt[2654]=-19,qV(vHt,2655,2662,33),qV(vHt,2662,2674,-87),qV(vHt,2674,2677,-19),qV(vHt,2677,2689,33),qV(vHt,2689,2692,-87),vHt[2692]=33,qV(vHt,2693,2700,-19),vHt[2700]=33,vHt[2701]=-19,vHt[2702]=33,qV(vHt,2703,2706,-19),vHt[2706]=33,qV(vHt,2707,2729,-19),vHt[2729]=33,qV(vHt,2730,2737,-19),vHt[2737]=33,qV(vHt,2738,2740,-19),vHt[2740]=33,qV(vHt,2741,2746,-19),qV(vHt,2746,2748,33),vHt[2748]=-87,vHt[2749]=-19,qV(vHt,2750,2758,-87),vHt[2758]=33,qV(vHt,2759,2762,-87),vHt[2762]=33,qV(vHt,2763,2766,-87),qV(vHt,2766,2784,33),vHt[2784]=-19,qV(vHt,2785,2790,33),qV(vHt,2790,2800,-87),qV(vHt,2800,2817,33),qV(vHt,2817,2820,-87),vHt[2820]=33,qV(vHt,2821,2829,-19),qV(vHt,2829,2831,33),qV(vHt,2831,2833,-19),qV(vHt,2833,2835,33),qV(vHt,2835,2857,-19),vHt[2857]=33,qV(vHt,2858,2865,-19),vHt[2865]=33,qV(vHt,2866,2868,-19),qV(vHt,2868,2870,33),qV(vHt,2870,2874,-19),qV(vHt,2874,2876,33),vHt[2876]=-87,vHt[2877]=-19,qV(vHt,2878,2884,-87),qV(vHt,2884,2887,33),qV(vHt,2887,2889,-87),qV(vHt,2889,2891,33),qV(vHt,2891,2894,-87),qV(vHt,2894,2902,33),qV(vHt,2902,2904,-87),qV(vHt,2904,2908,33),qV(vHt,2908,2910,-19),vHt[2910]=33,qV(vHt,2911,2914,-19),qV(vHt,2914,2918,33),qV(vHt,2918,2928,-87),qV(vHt,2928,2946,33),qV(vHt,2946,2948,-87),vHt[2948]=33,qV(vHt,2949,2955,-19),qV(vHt,2955,2958,33),qV(vHt,2958,2961,-19),vHt[2961]=33,qV(vHt,2962,2966,-19),qV(vHt,2966,2969,33),qV(vHt,2969,2971,-19),vHt[2971]=33,vHt[2972]=-19,vHt[2973]=33,qV(vHt,2974,2976,-19),qV(vHt,2976,2979,33),qV(vHt,2979,2981,-19),qV(vHt,2981,2984,33),qV(vHt,2984,2987,-19),qV(vHt,2987,2990,33),qV(vHt,2990,2998,-19),vHt[2998]=33,qV(vHt,2999,3002,-19),qV(vHt,3002,3006,33),qV(vHt,3006,3011,-87),qV(vHt,3011,3014,33),qV(vHt,3014,3017,-87),vHt[3017]=33,qV(vHt,3018,3022,-87),qV(vHt,3022,3031,33),vHt[3031]=-87,qV(vHt,3032,3047,33),qV(vHt,3047,3056,-87),qV(vHt,3056,3073,33),qV(vHt,3073,3076,-87),vHt[3076]=33,qV(vHt,3077,3085,-19),vHt[3085]=33,qV(vHt,3086,3089,-19),vHt[3089]=33,qV(vHt,3090,3113,-19),vHt[3113]=33,qV(vHt,3114,3124,-19),vHt[3124]=33,qV(vHt,3125,3130,-19),qV(vHt,3130,3134,33),qV(vHt,3134,3141,-87),vHt[3141]=33,qV(vHt,3142,3145,-87),vHt[3145]=33,qV(vHt,3146,3150,-87),qV(vHt,3150,3157,33),qV(vHt,3157,3159,-87),qV(vHt,3159,3168,33),qV(vHt,3168,3170,-19),qV(vHt,3170,3174,33),qV(vHt,3174,3184,-87),qV(vHt,3184,3202,33),qV(vHt,3202,3204,-87),vHt[3204]=33,qV(vHt,3205,3213,-19),vHt[3213]=33,qV(vHt,3214,3217,-19),vHt[3217]=33,qV(vHt,3218,3241,-19),vHt[3241]=33,qV(vHt,3242,3252,-19),vHt[3252]=33,qV(vHt,3253,3258,-19),qV(vHt,3258,3262,33),qV(vHt,3262,3269,-87),vHt[3269]=33,qV(vHt,3270,3273,-87),vHt[3273]=33,qV(vHt,3274,3278,-87),qV(vHt,3278,3285,33),qV(vHt,3285,3287,-87),qV(vHt,3287,3294,33),vHt[3294]=-19,vHt[3295]=33,qV(vHt,3296,3298,-19),qV(vHt,3298,3302,33),qV(vHt,3302,3312,-87),qV(vHt,3312,3330,33),qV(vHt,3330,3332,-87),vHt[3332]=33,qV(vHt,3333,3341,-19),vHt[3341]=33,qV(vHt,3342,3345,-19),vHt[3345]=33,qV(vHt,3346,3369,-19),vHt[3369]=33,qV(vHt,3370,3386,-19),qV(vHt,3386,3390,33),qV(vHt,3390,3396,-87),qV(vHt,3396,3398,33),qV(vHt,3398,3401,-87),vHt[3401]=33,qV(vHt,3402,3406,-87),qV(vHt,3406,3415,33),vHt[3415]=-87,qV(vHt,3416,3424,33),qV(vHt,3424,3426,-19),qV(vHt,3426,3430,33),qV(vHt,3430,3440,-87),qV(vHt,3440,3585,33),qV(vHt,3585,3631,-19),vHt[3631]=33,vHt[3632]=-19,vHt[3633]=-87,qV(vHt,3634,3636,-19),qV(vHt,3636,3643,-87),qV(vHt,3643,3648,33),qV(vHt,3648,3654,-19),qV(vHt,3654,3663,-87),vHt[3663]=33,qV(vHt,3664,3674,-87),qV(vHt,3674,3713,33),qV(vHt,3713,3715,-19),vHt[3715]=33,vHt[3716]=-19,qV(vHt,3717,3719,33),qV(vHt,3719,3721,-19),vHt[3721]=33,vHt[3722]=-19,qV(vHt,3723,3725,33),vHt[3725]=-19,qV(vHt,3726,3732,33),qV(vHt,3732,3736,-19),vHt[3736]=33,qV(vHt,3737,3744,-19),vHt[3744]=33,qV(vHt,3745,3748,-19),vHt[3748]=33,vHt[3749]=-19,vHt[3750]=33,vHt[3751]=-19,qV(vHt,3752,3754,33),qV(vHt,3754,3756,-19),vHt[3756]=33,qV(vHt,3757,3759,-19),vHt[3759]=33,vHt[3760]=-19,vHt[3761]=-87,qV(vHt,3762,3764,-19),qV(vHt,3764,3770,-87),vHt[3770]=33,qV(vHt,3771,3773,-87),vHt[3773]=-19,qV(vHt,3774,3776,33),qV(vHt,3776,3781,-19),vHt[3781]=33,vHt[3782]=-87,vHt[3783]=33,qV(vHt,3784,3790,-87),qV(vHt,3790,3792,33),qV(vHt,3792,3802,-87),qV(vHt,3802,3864,33),qV(vHt,3864,3866,-87),qV(vHt,3866,3872,33),qV(vHt,3872,3882,-87),qV(vHt,3882,3893,33),vHt[3893]=-87,vHt[3894]=33,vHt[3895]=-87,vHt[3896]=33,vHt[3897]=-87,qV(vHt,3898,3902,33),qV(vHt,3902,3904,-87),qV(vHt,3904,3912,-19),vHt[3912]=33,qV(vHt,3913,3946,-19),qV(vHt,3946,3953,33),qV(vHt,3953,3973,-87),vHt[3973]=33,qV(vHt,3974,3980,-87),qV(vHt,3980,3984,33),qV(vHt,3984,3990,-87),vHt[3990]=33,vHt[3991]=-87,vHt[3992]=33,qV(vHt,3993,4014,-87),qV(vHt,4014,4017,33),qV(vHt,4017,4024,-87),vHt[4024]=33,vHt[4025]=-87,qV(vHt,4026,4256,33),qV(vHt,4256,4294,-19),qV(vHt,4294,4304,33),qV(vHt,4304,4343,-19),qV(vHt,4343,4352,33),vHt[4352]=-19,vHt[4353]=33,qV(vHt,4354,4356,-19),vHt[4356]=33,qV(vHt,4357,4360,-19),vHt[4360]=33,vHt[4361]=-19,vHt[4362]=33,qV(vHt,4363,4365,-19),vHt[4365]=33,qV(vHt,4366,4371,-19),qV(vHt,4371,4412,33),vHt[4412]=-19,vHt[4413]=33,vHt[4414]=-19,vHt[4415]=33,vHt[4416]=-19,qV(vHt,4417,4428,33),vHt[4428]=-19,vHt[4429]=33,vHt[4430]=-19,vHt[4431]=33,vHt[4432]=-19,qV(vHt,4433,4436,33),qV(vHt,4436,4438,-19),qV(vHt,4438,4441,33),vHt[4441]=-19,qV(vHt,4442,4447,33),qV(vHt,4447,4450,-19),vHt[4450]=33,vHt[4451]=-19,vHt[4452]=33,vHt[4453]=-19,vHt[4454]=33,vHt[4455]=-19,vHt[4456]=33,vHt[4457]=-19,qV(vHt,4458,4461,33),qV(vHt,4461,4463,-19),qV(vHt,4463,4466,33),qV(vHt,4466,4468,-19),vHt[4468]=33,vHt[4469]=-19,qV(vHt,4470,4510,33),vHt[4510]=-19,qV(vHt,4511,4520,33),vHt[4520]=-19,qV(vHt,4521,4523,33),vHt[4523]=-19,qV(vHt,4524,4526,33),qV(vHt,4526,4528,-19),qV(vHt,4528,4535,33),qV(vHt,4535,4537,-19),vHt[4537]=33,vHt[4538]=-19,vHt[4539]=33,qV(vHt,4540,4547,-19),qV(vHt,4547,4587,33),vHt[4587]=-19,qV(vHt,4588,4592,33),vHt[4592]=-19,qV(vHt,4593,4601,33),vHt[4601]=-19,qV(vHt,4602,7680,33),qV(vHt,7680,7836,-19),qV(vHt,7836,7840,33),qV(vHt,7840,7930,-19),qV(vHt,7930,7936,33),qV(vHt,7936,7958,-19),qV(vHt,7958,7960,33),qV(vHt,7960,7966,-19),qV(vHt,7966,7968,33),qV(vHt,7968,8006,-19),qV(vHt,8006,8008,33),qV(vHt,8008,8014,-19),qV(vHt,8014,8016,33),qV(vHt,8016,8024,-19),vHt[8024]=33,vHt[8025]=-19,vHt[8026]=33,vHt[8027]=-19,vHt[8028]=33,vHt[8029]=-19,vHt[8030]=33,qV(vHt,8031,8062,-19),qV(vHt,8062,8064,33),qV(vHt,8064,8117,-19),vHt[8117]=33,qV(vHt,8118,8125,-19),vHt[8125]=33,vHt[8126]=-19,qV(vHt,8127,8130,33),qV(vHt,8130,8133,-19),vHt[8133]=33,qV(vHt,8134,8141,-19),qV(vHt,8141,8144,33),qV(vHt,8144,8148,-19),qV(vHt,8148,8150,33),qV(vHt,8150,8156,-19),qV(vHt,8156,8160,33),qV(vHt,8160,8173,-19),qV(vHt,8173,8178,33),qV(vHt,8178,8181,-19),vHt[8181]=33,qV(vHt,8182,8189,-19),qV(vHt,8189,8400,33),qV(vHt,8400,8413,-87),qV(vHt,8413,8417,33),vHt[8417]=-87,qV(vHt,8418,8486,33),vHt[8486]=-19,qV(vHt,8487,8490,33),qV(vHt,8490,8492,-19),qV(vHt,8492,8494,33),vHt[8494]=-19,qV(vHt,8495,8576,33),qV(vHt,8576,8579,-19),qV(vHt,8579,12293,33),vHt[12293]=-87,vHt[12294]=33,vHt[12295]=-19,qV(vHt,12296,12321,33),qV(vHt,12321,12330,-19),qV(vHt,12330,12336,-87),vHt[12336]=33,qV(vHt,12337,12342,-87),qV(vHt,12342,12353,33),qV(vHt,12353,12437,-19),qV(vHt,12437,12441,33),qV(vHt,12441,12443,-87),qV(vHt,12443,12445,33),qV(vHt,12445,12447,-87),qV(vHt,12447,12449,33),qV(vHt,12449,12539,-19),vHt[12539]=33,qV(vHt,12540,12543,-87),qV(vHt,12543,12549,33),qV(vHt,12549,12589,-19),qV(vHt,12589,19968,33),qV(vHt,19968,40870,-19),qV(vHt,40870,44032,33),qV(vHt,44032,55204,-19),qV(vHt,55204,C0n,33),qV(vHt,57344,65534,33)}function oZn(n){var t,e,i,r,c,a,o;n.hb||(n.hb=!0,qon(n,"ecore"),Xon(n,"ecore"),zon(n,Drt),mhn(n.fb,"E"),mhn(n.L,"T"),mhn(n.P,"K"),mhn(n.P,"V"),mhn(n.cb,"E"),ttn(n1(n.b),n.bb),ttn(n1(n.a),n.Q),ttn(n1(n.o),n.p),ttn(n1(n.p),n.R),ttn(n1(n.q),n.p),ttn(n1(n.v),n.q),ttn(n1(n.w),n.R),ttn(n1(n.B),n.Q),ttn(n1(n.R),n.Q),ttn(n1(n.T),n.eb),ttn(n1(n.U),n.R),ttn(n1(n.V),n.eb),ttn(n1(n.W),n.bb),ttn(n1(n.bb),n.eb),ttn(n1(n.eb),n.R),ttn(n1(n.db),n.R),A4(n.b,u_t,Yit,!1,!1,!0),mun(uG(zrn(gZ(n.b),0),35),n.e,"iD",null,0,1,u_t,!1,!1,!0,!1,!0,!1),ujn(uG(zrn(gZ(n.b),1),19),n.q,null,"eAttributeType",1,1,u_t,!0,!0,!1,!1,!0,!1,!0),A4(n.a,c_t,Wit,!1,!1,!0),mun(uG(zrn(gZ(n.a),0),35),n._,set,null,0,1,c_t,!1,!1,!0,!1,!0,!1),ujn(uG(zrn(gZ(n.a),1),19),n.ab,null,"details",0,-1,c_t,!1,!1,!0,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.a),2),19),n.Q,uG(zrn(gZ(n.Q),0),19),"eModelElement",0,1,c_t,!0,!1,!0,!1,!1,!1,!1),ujn(uG(zrn(gZ(n.a),3),19),n.S,null,"contents",0,-1,c_t,!1,!1,!0,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.a),4),19),n.S,null,"references",0,-1,c_t,!1,!1,!0,!1,!0,!1,!1),A4(n.o,h_t,"EClass",!1,!1,!0),mun(uG(zrn(gZ(n.o),0),35),n.e,"abstract",null,0,1,h_t,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.o),1),35),n.e,"interface",null,0,1,h_t,!1,!1,!0,!1,!0,!1),ujn(uG(zrn(gZ(n.o),2),19),n.o,null,"eSuperTypes",0,-1,h_t,!1,!1,!0,!1,!0,!0,!1),ujn(uG(zrn(gZ(n.o),3),19),n.T,uG(zrn(gZ(n.T),0),19),"eOperations",0,-1,h_t,!1,!1,!0,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.o),4),19),n.b,null,"eAllAttributes",0,-1,h_t,!0,!0,!1,!1,!0,!1,!0),ujn(uG(zrn(gZ(n.o),5),19),n.W,null,"eAllReferences",0,-1,h_t,!0,!0,!1,!1,!0,!1,!0),ujn(uG(zrn(gZ(n.o),6),19),n.W,null,"eReferences",0,-1,h_t,!0,!0,!1,!1,!0,!1,!0),ujn(uG(zrn(gZ(n.o),7),19),n.b,null,"eAttributes",0,-1,h_t,!0,!0,!1,!1,!0,!1,!0),ujn(uG(zrn(gZ(n.o),8),19),n.W,null,"eAllContainments",0,-1,h_t,!0,!0,!1,!1,!0,!1,!0),ujn(uG(zrn(gZ(n.o),9),19),n.T,null,"eAllOperations",0,-1,h_t,!0,!0,!1,!1,!0,!1,!0),ujn(uG(zrn(gZ(n.o),10),19),n.bb,null,"eAllStructuralFeatures",0,-1,h_t,!0,!0,!1,!1,!0,!1,!0),ujn(uG(zrn(gZ(n.o),11),19),n.o,null,"eAllSuperTypes",0,-1,h_t,!0,!0,!1,!1,!0,!1,!0),ujn(uG(zrn(gZ(n.o),12),19),n.b,null,"eIDAttribute",0,1,h_t,!0,!0,!1,!1,!1,!1,!0),ujn(uG(zrn(gZ(n.o),13),19),n.bb,uG(zrn(gZ(n.bb),7),19),"eStructuralFeatures",0,-1,h_t,!1,!1,!0,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.o),14),19),n.H,null,"eGenericSuperTypes",0,-1,h_t,!1,!1,!0,!0,!1,!0,!1),ujn(uG(zrn(gZ(n.o),15),19),n.H,null,"eAllGenericSuperTypes",0,-1,h_t,!0,!0,!1,!1,!0,!1,!0),djn(o=san(uG(zrn(dZ(n.o),0),62),n.e,"isSuperTypeOf"),n.o,"someClass"),san(uG(zrn(dZ(n.o),1),62),n.I,"getFeatureCount"),djn(o=san(uG(zrn(dZ(n.o),2),62),n.bb,Frt),n.I,"featureID"),djn(o=san(uG(zrn(dZ(n.o),3),62),n.I,_rt),n.bb,Brt),djn(o=san(uG(zrn(dZ(n.o),4),62),n.bb,Frt),n._,"featureName"),san(uG(zrn(dZ(n.o),5),62),n.I,"getOperationCount"),djn(o=san(uG(zrn(dZ(n.o),6),62),n.T,"getEOperation"),n.I,"operationID"),djn(o=san(uG(zrn(dZ(n.o),7),62),n.I,Hrt),n.T,Urt),djn(o=san(uG(zrn(dZ(n.o),8),62),n.T,"getOverride"),n.T,Urt),djn(o=san(uG(zrn(dZ(n.o),9),62),n.H,"getFeatureType"),n.bb,Brt),A4(n.p,s_t,Zit,!0,!1,!0),mun(uG(zrn(gZ(n.p),0),35),n._,"instanceClassName",null,0,1,s_t,!1,!0,!0,!0,!0,!1),t=NY(n.L),e=n6(),ttn((!t.d&&(t.d=new MD(g_t,t,1)),t.d),e),N$n(uG(zrn(gZ(n.p),1),35),t,"instanceClass",s_t,!0,!0,!1,!0),mun(uG(zrn(gZ(n.p),2),35),n.M,Grt,null,0,1,s_t,!0,!0,!1,!1,!0,!0),mun(uG(zrn(gZ(n.p),3),35),n._,"instanceTypeName",null,0,1,s_t,!1,!0,!0,!0,!0,!1),ujn(uG(zrn(gZ(n.p),4),19),n.U,uG(zrn(gZ(n.U),3),19),"ePackage",0,1,s_t,!0,!1,!1,!1,!0,!1,!1),ujn(uG(zrn(gZ(n.p),5),19),n.db,null,qrt,0,-1,s_t,!1,!1,!0,!0,!0,!1,!1),djn(o=san(uG(zrn(dZ(n.p),0),62),n.e,Xrt),n.M,wZn),san(uG(zrn(dZ(n.p),1),62),n.I,"getClassifierID"),A4(n.q,f_t,"EDataType",!1,!1,!0),mun(uG(zrn(gZ(n.q),0),35),n.e,"serializable",Fnt,0,1,f_t,!1,!1,!0,!1,!0,!1),A4(n.v,w_t,"EEnum",!1,!1,!0),ujn(uG(zrn(gZ(n.v),0),19),n.w,uG(zrn(gZ(n.w),3),19),"eLiterals",0,-1,w_t,!1,!1,!0,!0,!1,!1,!1),djn(o=san(uG(zrn(dZ(n.v),0),62),n.w,zrt),n._,Bet),djn(o=san(uG(zrn(dZ(n.v),1),62),n.w,zrt),n.I,uet),djn(o=san(uG(zrn(dZ(n.v),2),62),n.w,"getEEnumLiteralByLiteral"),n._,"literal"),A4(n.w,d_t,nrt,!1,!1,!0),mun(uG(zrn(gZ(n.w),0),35),n.I,uet,null,0,1,d_t,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.w),1),35),n.A,"instance",null,0,1,d_t,!0,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.w),2),35),n._,"literal",null,0,1,d_t,!1,!1,!0,!1,!0,!1),ujn(uG(zrn(gZ(n.w),3),19),n.v,uG(zrn(gZ(n.v),0),19),"eEnum",0,1,d_t,!0,!1,!1,!1,!1,!1,!1),A4(n.B,sFt,"EFactory",!1,!1,!0),ujn(uG(zrn(gZ(n.B),0),19),n.U,uG(zrn(gZ(n.U),2),19),"ePackage",1,1,sFt,!0,!1,!0,!1,!1,!1,!1),djn(o=san(uG(zrn(dZ(n.B),0),62),n.S,"create"),n.o,"eClass"),djn(o=san(uG(zrn(dZ(n.B),1),62),n.M,"createFromString"),n.q,"eDataType"),djn(o,n._,"literalValue"),djn(o=san(uG(zrn(dZ(n.B),2),62),n._,"convertToString"),n.q,"eDataType"),djn(o,n.M,"instanceValue"),A4(n.Q,uFt,Rtt,!0,!1,!0),ujn(uG(zrn(gZ(n.Q),0),19),n.a,uG(zrn(gZ(n.a),2),19),"eAnnotations",0,-1,uFt,!1,!1,!0,!0,!1,!1,!1),djn(o=san(uG(zrn(dZ(n.Q),0),62),n.a,"getEAnnotation"),n._,set),A4(n.R,hFt,Ktt,!0,!1,!0),mun(uG(zrn(gZ(n.R),0),35),n._,Bet,null,0,1,hFt,!1,!1,!0,!1,!0,!1),A4(n.S,nFt,"EObject",!1,!1,!0),san(uG(zrn(dZ(n.S),0),62),n.o,"eClass"),san(uG(zrn(dZ(n.S),1),62),n.e,"eIsProxy"),san(uG(zrn(dZ(n.S),2),62),n.X,"eResource"),san(uG(zrn(dZ(n.S),3),62),n.S,"eContainer"),san(uG(zrn(dZ(n.S),4),62),n.bb,"eContainingFeature"),san(uG(zrn(dZ(n.S),5),62),n.W,"eContainmentFeature"),o=san(uG(zrn(dZ(n.S),6),62),null,"eContents"),t=NY(n.fb),e=NY(n.S),ttn((!t.d&&(t.d=new MD(g_t,t,1)),t.d),e),(r=CCn(o,t,null))&&r.oj(),o=san(uG(zrn(dZ(n.S),7),62),null,"eAllContents"),t=NY(n.cb),e=NY(n.S),ttn((!t.d&&(t.d=new MD(g_t,t,1)),t.d),e),(c=CCn(o,t,null))&&c.oj(),o=san(uG(zrn(dZ(n.S),8),62),null,"eCrossReferences"),t=NY(n.fb),e=NY(n.S),ttn((!t.d&&(t.d=new MD(g_t,t,1)),t.d),e),(a=CCn(o,t,null))&&a.oj(),djn(o=san(uG(zrn(dZ(n.S),9),62),n.M,"eGet"),n.bb,Brt),djn(o=san(uG(zrn(dZ(n.S),10),62),n.M,"eGet"),n.bb,Brt),djn(o,n.e,"resolve"),djn(o=san(uG(zrn(dZ(n.S),11),62),null,"eSet"),n.bb,Brt),djn(o,n.M,"newValue"),djn(o=san(uG(zrn(dZ(n.S),12),62),n.e,"eIsSet"),n.bb,Brt),djn(o=san(uG(zrn(dZ(n.S),13),62),null,"eUnset"),n.bb,Brt),djn(o=san(uG(zrn(dZ(n.S),14),62),n.M,"eInvoke"),n.T,Urt),t=NY(n.fb),e=n6(),ttn((!t.d&&(t.d=new MD(g_t,t,1)),t.d),e),OSn(o,t,"arguments"),QQ(o,n.K),A4(n.T,p_t,ert,!1,!1,!0),ujn(uG(zrn(gZ(n.T),0),19),n.o,uG(zrn(gZ(n.o),3),19),Vrt,0,1,p_t,!0,!1,!1,!1,!1,!1,!1),ujn(uG(zrn(gZ(n.T),1),19),n.db,null,qrt,0,-1,p_t,!1,!1,!0,!0,!0,!1,!1),ujn(uG(zrn(gZ(n.T),2),19),n.V,uG(zrn(gZ(n.V),0),19),"eParameters",0,-1,p_t,!1,!1,!0,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.T),3),19),n.p,null,"eExceptions",0,-1,p_t,!1,!1,!0,!1,!0,!0,!1),ujn(uG(zrn(gZ(n.T),4),19),n.H,null,"eGenericExceptions",0,-1,p_t,!1,!1,!0,!0,!1,!0,!1),san(uG(zrn(dZ(n.T),0),62),n.I,Hrt),djn(o=san(uG(zrn(dZ(n.T),1),62),n.e,"isOverrideOf"),n.T,"someOperation"),A4(n.U,fFt,"EPackage",!1,!1,!0),mun(uG(zrn(gZ(n.U),0),35),n._,"nsURI",null,0,1,fFt,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.U),1),35),n._,"nsPrefix",null,0,1,fFt,!1,!1,!0,!1,!0,!1),ujn(uG(zrn(gZ(n.U),2),19),n.B,uG(zrn(gZ(n.B),0),19),"eFactoryInstance",1,1,fFt,!0,!1,!0,!1,!1,!1,!1),ujn(uG(zrn(gZ(n.U),3),19),n.p,uG(zrn(gZ(n.p),4),19),"eClassifiers",0,-1,fFt,!1,!1,!0,!0,!0,!1,!1),ujn(uG(zrn(gZ(n.U),4),19),n.U,uG(zrn(gZ(n.U),5),19),"eSubpackages",0,-1,fFt,!1,!1,!0,!0,!0,!1,!1),ujn(uG(zrn(gZ(n.U),5),19),n.U,uG(zrn(gZ(n.U),4),19),"eSuperPackage",0,1,fFt,!0,!1,!1,!1,!0,!1,!1),djn(o=san(uG(zrn(dZ(n.U),0),62),n.p,"getEClassifier"),n._,Bet),A4(n.V,m_t,irt,!1,!1,!0),ujn(uG(zrn(gZ(n.V),0),19),n.T,uG(zrn(gZ(n.T),2),19),"eOperation",0,1,m_t,!0,!1,!1,!1,!1,!1,!1),A4(n.W,v_t,rrt,!1,!1,!0),mun(uG(zrn(gZ(n.W),0),35),n.e,"containment",null,0,1,v_t,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.W),1),35),n.e,"container",null,0,1,v_t,!0,!0,!1,!1,!0,!0),mun(uG(zrn(gZ(n.W),2),35),n.e,"resolveProxies",Fnt,0,1,v_t,!1,!1,!0,!1,!0,!1),ujn(uG(zrn(gZ(n.W),3),19),n.W,null,"eOpposite",0,1,v_t,!1,!1,!0,!1,!0,!1,!1),ujn(uG(zrn(gZ(n.W),4),19),n.o,null,"eReferenceType",1,1,v_t,!0,!0,!1,!1,!0,!1,!0),ujn(uG(zrn(gZ(n.W),5),19),n.b,null,"eKeys",0,-1,v_t,!1,!1,!0,!1,!0,!1,!1),A4(n.bb,o_t,Jit,!0,!1,!0),mun(uG(zrn(gZ(n.bb),0),35),n.e,"changeable",Fnt,0,1,o_t,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.bb),1),35),n.e,"volatile",null,0,1,o_t,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.bb),2),35),n.e,"transient",null,0,1,o_t,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.bb),3),35),n._,"defaultValueLiteral",null,0,1,o_t,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.bb),4),35),n.M,Grt,null,0,1,o_t,!0,!0,!1,!1,!0,!0),mun(uG(zrn(gZ(n.bb),5),35),n.e,"unsettable",null,0,1,o_t,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.bb),6),35),n.e,"derived",null,0,1,o_t,!1,!1,!0,!1,!0,!1),ujn(uG(zrn(gZ(n.bb),7),19),n.o,uG(zrn(gZ(n.o),13),19),Vrt,0,1,o_t,!0,!1,!1,!1,!1,!1,!1),san(uG(zrn(dZ(n.bb),0),62),n.I,_rt),o=san(uG(zrn(dZ(n.bb),1),62),null,"getContainerClass"),t=NY(n.L),e=n6(),ttn((!t.d&&(t.d=new MD(g_t,t,1)),t.d),e),(i=CCn(o,t,null))&&i.oj(),A4(n.eb,a_t,Qit,!0,!1,!0),mun(uG(zrn(gZ(n.eb),0),35),n.e,"ordered",Fnt,0,1,a_t,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.eb),1),35),n.e,"unique",Fnt,0,1,a_t,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.eb),2),35),n.I,"lowerBound",null,0,1,a_t,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.eb),3),35),n.I,"upperBound","1",0,1,a_t,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.eb),4),35),n.e,"many",null,0,1,a_t,!0,!0,!1,!1,!0,!0),mun(uG(zrn(gZ(n.eb),5),35),n.e,"required",null,0,1,a_t,!0,!0,!1,!1,!0,!0),ujn(uG(zrn(gZ(n.eb),6),19),n.p,null,"eType",0,1,a_t,!1,!0,!0,!1,!0,!0,!1),ujn(uG(zrn(gZ(n.eb),7),19),n.H,null,"eGenericType",0,1,a_t,!1,!0,!0,!0,!1,!0,!1),A4(n.ab,Sat,"EStringToStringMapEntry",!1,!1,!1),mun(uG(zrn(gZ(n.ab),0),35),n._,"key",null,0,1,Sat,!1,!1,!0,!1,!0,!1),mun(uG(zrn(gZ(n.ab),1),35),n._,uet,null,0,1,Sat,!1,!1,!0,!1,!0,!1),A4(n.H,g_t,trt,!1,!1,!0),ujn(uG(zrn(gZ(n.H),0),19),n.H,null,"eUpperBound",0,1,g_t,!1,!1,!0,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.H),1),19),n.H,null,"eTypeArguments",0,-1,g_t,!1,!1,!0,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.H),2),19),n.p,null,"eRawType",1,1,g_t,!0,!1,!1,!1,!0,!1,!0),ujn(uG(zrn(gZ(n.H),3),19),n.H,null,"eLowerBound",0,1,g_t,!1,!1,!0,!0,!1,!1,!1),ujn(uG(zrn(gZ(n.H),4),19),n.db,null,"eTypeParameter",0,1,g_t,!1,!1,!0,!1,!1,!1,!1),ujn(uG(zrn(gZ(n.H),5),19),n.p,null,"eClassifier",0,1,g_t,!1,!1,!0,!1,!0,!1,!1),djn(o=san(uG(zrn(dZ(n.H),0),62),n.e,Xrt),n.M,wZn),A4(n.db,J_t,crt,!1,!1,!0),ujn(uG(zrn(gZ(n.db),0),19),n.H,null,"eBounds",0,-1,J_t,!1,!1,!0,!0,!1,!1,!1),UJ(n.c,Bot,"EBigDecimal",!0),UJ(n.d,Xot,"EBigInteger",!0),UJ(n.e,ZHt,"EBoolean",!0),UJ(n.f,cot,"EBooleanObject",!0),UJ(n.i,tUt,"EByte",!0),UJ(n.g,cT(tUt,1),"EByteArray",!0),UJ(n.j,uot,"EByteObject",!0),UJ(n.k,JHt,"EChar",!0),UJ(n.n,hot,"ECharacterObject",!0),UJ(n.r,iot,"EDate",!0),UJ(n.s,aUt,"EDiagnosticChain",!1),UJ(n.t,eUt,"EDouble",!0),UJ(n.u,fot,"EDoubleObject",!0),UJ(n.fb,CFt,"EEList",!1),UJ(n.A,BFt,"EEnumerator",!1),UJ(n.C,IBt,"EFeatureMap",!1),UJ(n.D,Z_t,"EFeatureMapEntry",!1),UJ(n.F,iUt,"EFloat",!0),UJ(n.G,lot,"EFloatObject",!0),UJ(n.I,YHt,"EInt",!0),UJ(n.J,dot,"EIntegerObject",!0),UJ(n.L,gat,"EJavaClass",!0),UJ(n.M,dat,"EJavaObject",!0),UJ(n.N,nUt,"ELong",!0),UJ(n.O,yot,"ELongObject",!0),UJ(n.P,mat,"EMap",!1),UJ(n.X,jBt,"EResource",!1),UJ(n.Y,oUt,"EResourceSet",!1),UJ(n.Z,rUt,"EShort",!0),UJ(n.$,Tot,"EShortObject",!0),UJ(n._,$ot,"EString",!0),UJ(n.cb,OFt,"ETreeIterator",!1),UJ(n.K,uUt,"EInvocationTargetException",!1),nwn(n,Drt))}"undefined"!=typeof window?e=window:void 0!==n?e=n:"undefined"!=typeof self&&(e=self);var uZn,sZn,hZn,fZn,lZn,bZn,wZn="object",dZn="boolean",gZn="number",pZn="string",mZn="function",vZn=2147483647,kZn="java.lang",yZn={3:1},MZn="com.google.common.base",TZn=", ",jZn="%s (%s) must not be negative",EZn={3:1,4:1,5:1},SZn="negative size: ",PZn="no calls to next() since the last call to remove()",CZn="Optional.of(",IZn="null",OZn={204:1,51:1},AZn="com.google.common.collect",LZn={204:1,51:1,128:1},NZn={229:1,3:1},$Zn={51:1},DZn="java.util",xZn={85:1},RZn={20:1,31:1,16:1},KZn=2063,FZn={20:1,31:1,16:1,21:1},_Zn={85:1,139:1,133:1},BZn={20:1,31:1,16:1,21:1,87:1},HZn={20:1,31:1,16:1,277:1,21:1,87:1},UZn={51:1,128:1},GZn={358:1,44:1},qZn="AbstractMapEntry",XZn="expectedValuesPerKey",zZn={3:1,6:1,4:1,5:1},VZn=16384,WZn={159:1},QZn={41:1},JZn={202:1},YZn={l:4194303,m:4194303,h:524287},ZZn={253:1,3:1,34:1},n1n="range unbounded on this side",t1n={20:1},e1n={20:1,16:1},i1n={3:1,20:1,31:1,16:1},r1n={307:1,3:1,20:1,31:1,16:1,15:1,59:1},c1n={3:1,4:1,5:1,173:1},a1n={3:1,85:1},o1n={20:1,16:1,21:1},u1n={3:1,20:1,31:1,16:1,21:1},s1n={20:1,16:1,21:1,87:1},h1n=461845907,f1n=-862048943,l1n={3:1,6:1,4:1,5:1,173:1},b1n="expectedSize",w1n=1024,d1n=1073741824,g1n="initialArraySize",p1n={3:1,6:1,4:1,9:1,5:1},m1n={20:1,31:1,56:1,16:1,15:1},v1n="arraySize",k1n={20:1,31:1,56:1,16:1,15:1,59:1},y1n={46:1},M1n={380:1},T1n=1e-4,j1n=-2147483648,E1n="__noinit__",S1n={3:1,103:1,63:1,82:1},P1n="com.google.gwt.core.client.impl",C1n="String",I1n="com.google.gwt.core.client",O1n="anonymous",A1n="fnStack",L1n="Unknown",N1n={201:1,3:1,4:1},$1n=1e3,D1n=65535,x1n="January",R1n="February",K1n="March",F1n="April",_1n="May",B1n="June",H1n="July",U1n="August",G1n="September",q1n="October",X1n="November",z1n="December",V1n=1900,W1n={53:1,3:1,4:1},Q1n="Before Christ",J1n="Anno Domini",Y1n="Sunday",Z1n="Monday",n0n="Tuesday",t0n="Wednesday",e0n="Thursday",i0n="Friday",r0n="Saturday",c0n="com.google.gwt.i18n.shared",a0n="DateTimeFormat",o0n="com.google.gwt.i18n.client",u0n="DefaultDateTimeFormatInfo",s0n={3:1,4:1,34:1,206:1},h0n="com.google.gwt.json.client",f0n=4194303,l0n=1048575,b0n=524288,w0n=4194304,d0n=17592186044416,g0n=1e9,p0n=-17592186044416,m0n="java.io",v0n={3:1,103:1,77:1,63:1,82:1},k0n={3:1,296:1,82:1},y0n='For input string: "',M0n=1/0,T0n=-1/0,j0n=4096,E0n={3:1,4:1,376:1},S0n="org.eclipse.elk.layered",P0n=65536,C0n=55296,I0n={109:1,3:1,4:1},O0n=1e5,A0n=.3010299956639812,L0n=4294967295,N0n="0.0",$0n={44:1},D0n="Unable to add element to queue",x0n={3:1,4:1,20:1,31:1,56:1,13:1,16:1,15:1,59:1},R0n={3:1,20:1,31:1,56:1,16:1,15:1,59:1},K0n={20:1,16:1,15:1},F0n={3:1,50:1},_0n={189:1},B0n={3:1,4:1,85:1},H0n={3:1,4:1,20:1,31:1,16:1,49:1,21:1},U0n="delete",G0n=1.4901161193847656e-8,q0n=11102230246251565e-32,X0n=15525485,z0n=5.960464477539063e-8,V0n=16777216,W0n=16777215,Q0n=", length: ",J0n={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1},Y0n="subMap: ",Z0n=" less than ",n2n={3:1,34:1,22:1,304:1},t2n="java.util.function",e2n="java.util.logging",i2n={3:1,4:1,5:1,856:1},r2n="undefined",c2n="java.util.stream",a2n={533:1,687:1},o2n="fromIndex: ",u2n=" > toIndex: ",s2n=", toIndex: ",h2n="Index: ",f2n=", Size: ",l2n="org.eclipse.elk.alg.common",b2n={50:1},w2n="org.eclipse.elk.alg.common.compaction",d2n="Scanline/EventHandler",g2n="org.eclipse.elk.alg.common.compaction.oned",p2n="CNode belongs to another CGroup.",m2n="ISpacingsHandler/1",v2n="The ",k2n=" instance has been finished already.",y2n="The direction ",M2n=" is not supported by the CGraph instance.",T2n="OneDimensionalCompactor",j2n="OneDimensionalCompactor/lambda$0$Type",E2n="Quadruplet",S2n="ScanlineConstraintCalculator",P2n="ScanlineConstraintCalculator/ConstraintsScanlineHandler",C2n="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",I2n="ScanlineConstraintCalculator/Timestamp",O2n="ScanlineConstraintCalculator/lambda$0$Type",A2n={178:1,46:1},L2n="org.eclipse.elk.alg.common.compaction.options",N2n="org.eclipse.elk.core.data",$2n="org.eclipse.elk.polyomino.traversalStrategy",D2n="org.eclipse.elk.polyomino.lowLevelSort",x2n="org.eclipse.elk.polyomino.highLevelSort",R2n="org.eclipse.elk.polyomino.fill",K2n={134:1},F2n="polyomino",_2n="org.eclipse.elk.alg.common.networksimplex",B2n={183:1,3:1,4:1},H2n="org.eclipse.elk.alg.common.nodespacing",U2n="org.eclipse.elk.alg.common.nodespacing.cellsystem",G2n="CENTER",q2n={217:1,336:1},X2n={3:1,4:1,5:1,603:1},z2n="LEFT",V2n="RIGHT",W2n="Vertical alignment cannot be null",Q2n="BOTTOM",J2n="org.eclipse.elk.alg.common.nodespacing.internal",Y2n="UNDEFINED",Z2n=.01,n3n="org.eclipse.elk.alg.common.nodespacing.internal.algorithm",t3n="LabelPlacer/lambda$0$Type",e3n="LabelPlacer/lambda$1$Type",i3n="portRatioOrPosition",r3n="org.eclipse.elk.alg.common.overlaps",c3n="DOWN",a3n="org.eclipse.elk.alg.common.polyomino",o3n="NORTH",u3n="EAST",s3n="SOUTH",h3n="WEST",f3n="org.eclipse.elk.alg.common.polyomino.structures",l3n="Direction",b3n="Grid is only of size ",w3n=". Requested point (",d3n=") is out of bounds.",g3n=" Given center based coordinates were (",p3n="org.eclipse.elk.graph.properties",m3n="IPropertyHolder",v3n={3:1,96:1,137:1},k3n="org.eclipse.elk.alg.common.spore",y3n="org.eclipse.elk.alg.common.utils",M3n={205:1},T3n="org.eclipse.elk.core",j3n="Connected Components Compaction",E3n="org.eclipse.elk.alg.disco",S3n="org.eclipse.elk.alg.disco.graph",P3n="org.eclipse.elk.alg.disco.options",C3n="CompactionStrategy",I3n="org.eclipse.elk.disco.componentCompaction.strategy",O3n="org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm",A3n="org.eclipse.elk.disco.debug.discoGraph",L3n="org.eclipse.elk.disco.debug.discoPolys",N3n="componentCompaction",$3n="org.eclipse.elk.disco",D3n="org.eclipse.elk.spacing.componentComponent",x3n="org.eclipse.elk.edge.thickness",R3n="org.eclipse.elk.aspectRatio",K3n="org.eclipse.elk.padding",F3n="org.eclipse.elk.alg.disco.transform",_3n=1.5707963267948966,B3n=17976931348623157e292,H3n={3:1,4:1,5:1,198:1},U3n={3:1,6:1,4:1,5:1,100:1,115:1},G3n="org.eclipse.elk.alg.force",q3n="ComponentsProcessor",X3n="ComponentsProcessor/1",z3n="ElkGraphImporter/lambda$0$Type",V3n="org.eclipse.elk.alg.force.graph",W3n="Component Layout",Q3n="org.eclipse.elk.alg.force.model",J3n="org.eclipse.elk.force.model",Y3n="org.eclipse.elk.force.iterations",Z3n="org.eclipse.elk.force.repulsivePower",n4n="org.eclipse.elk.force.temperature",t4n=.001,e4n="org.eclipse.elk.force.repulsion",i4n="org.eclipse.elk.alg.force.options",r4n=1.600000023841858,c4n="org.eclipse.elk.force",a4n="org.eclipse.elk.priority",o4n="org.eclipse.elk.spacing.nodeNode",u4n="org.eclipse.elk.spacing.edgeLabel",s4n="org.eclipse.elk.randomSeed",h4n="org.eclipse.elk.separateConnectedComponents",f4n="org.eclipse.elk.interactive",l4n="org.eclipse.elk.portConstraints",b4n="org.eclipse.elk.edgeLabels.inline",w4n="org.eclipse.elk.omitNodeMicroLayout",d4n="org.eclipse.elk.nodeSize.fixedGraphSize",g4n="org.eclipse.elk.nodeSize.options",p4n="org.eclipse.elk.nodeSize.constraints",m4n="org.eclipse.elk.nodeLabels.placement",v4n="org.eclipse.elk.portLabels.placement",k4n="org.eclipse.elk.topdownLayout",y4n="org.eclipse.elk.topdown.scaleFactor",M4n="org.eclipse.elk.topdown.hierarchicalNodeWidth",T4n="org.eclipse.elk.topdown.hierarchicalNodeAspectRatio",j4n="org.eclipse.elk.topdown.nodeType",E4n="origin",S4n="random",P4n="boundingBox.upLeft",C4n="boundingBox.lowRight",I4n="org.eclipse.elk.stress.fixed",O4n="org.eclipse.elk.stress.desiredEdgeLength",A4n="org.eclipse.elk.stress.dimension",L4n="org.eclipse.elk.stress.epsilon",N4n="org.eclipse.elk.stress.iterationLimit",$4n="org.eclipse.elk.stress",D4n="ELK Stress",x4n="org.eclipse.elk.nodeSize.minimum",R4n="org.eclipse.elk.alg.force.stress",K4n="Layered layout",F4n="org.eclipse.elk.alg.layered",_4n="org.eclipse.elk.alg.layered.compaction.components",B4n="org.eclipse.elk.alg.layered.compaction.oned",H4n="org.eclipse.elk.alg.layered.compaction.oned.algs",U4n="org.eclipse.elk.alg.layered.compaction.recthull",G4n="org.eclipse.elk.alg.layered.components",q4n="NONE",X4n="MODEL_ORDER",z4n={3:1,6:1,4:1,9:1,5:1,126:1},V4n={3:1,6:1,4:1,5:1,150:1,100:1,115:1},W4n="org.eclipse.elk.alg.layered.compound",Q4n={47:1},J4n="org.eclipse.elk.alg.layered.graph",Y4n=" -> ",Z4n="Not supported by LGraph",n6n="Port side is undefined",t6n={3:1,6:1,4:1,5:1,483:1,150:1,100:1,115:1},e6n={3:1,6:1,4:1,5:1,150:1,199:1,210:1,100:1,115:1},i6n={3:1,6:1,4:1,5:1,150:1,2042:1,210:1,100:1,115:1},r6n="([{\"' \t\r\n",c6n=")]}\"' \t\r\n",a6n="The given string contains parts that cannot be parsed as numbers.",o6n="org.eclipse.elk.core.math",u6n={3:1,4:1,140:1,214:1,423:1},s6n={3:1,4:1,107:1,214:1,423:1},h6n="org.eclipse.elk.alg.layered.graph.transform",f6n="ElkGraphImporter",l6n="ElkGraphImporter/lambda$1$Type",b6n="ElkGraphImporter/lambda$2$Type",w6n="ElkGraphImporter/lambda$4$Type",d6n="org.eclipse.elk.alg.layered.intermediate",g6n="Node margin calculation",p6n="ONE_SIDED_GREEDY_SWITCH",m6n="TWO_SIDED_GREEDY_SWITCH",v6n="No implementation is available for the layout processor ",k6n="IntermediateProcessorStrategy",y6n="Node '",M6n="FIRST_SEPARATE",T6n="LAST_SEPARATE",j6n="Odd port side processing",E6n="org.eclipse.elk.alg.layered.intermediate.compaction",S6n="org.eclipse.elk.alg.layered.intermediate.greedyswitch",P6n="org.eclipse.elk.alg.layered.p3order.counting",C6n={230:1},I6n="org.eclipse.elk.alg.layered.intermediate.loops",O6n="org.eclipse.elk.alg.layered.intermediate.loops.ordering",A6n="org.eclipse.elk.alg.layered.intermediate.loops.routing",L6n="org.eclipse.elk.alg.layered.intermediate.preserveorder",N6n="org.eclipse.elk.alg.layered.intermediate.wrapping",$6n="org.eclipse.elk.alg.layered.options",D6n="INTERACTIVE",x6n="GREEDY",R6n="DEPTH_FIRST",K6n="EDGE_LENGTH",F6n="SELF_LOOPS",_6n="firstTryWithInitialOrder",B6n="org.eclipse.elk.layered.directionCongruency",H6n="org.eclipse.elk.layered.feedbackEdges",U6n="org.eclipse.elk.layered.interactiveReferencePoint",G6n="org.eclipse.elk.layered.mergeEdges",q6n="org.eclipse.elk.layered.mergeHierarchyEdges",X6n="org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides",z6n="org.eclipse.elk.layered.portSortingStrategy",V6n="org.eclipse.elk.layered.thoroughness",W6n="org.eclipse.elk.layered.unnecessaryBendpoints",Q6n="org.eclipse.elk.layered.generatePositionAndLayerIds",J6n="org.eclipse.elk.layered.cycleBreaking.strategy",Y6n="org.eclipse.elk.layered.layering.strategy",Z6n="org.eclipse.elk.layered.layering.layerConstraint",n5n="org.eclipse.elk.layered.layering.layerChoiceConstraint",t5n="org.eclipse.elk.layered.layering.layerId",e5n="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",i5n="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",r5n="org.eclipse.elk.layered.layering.nodePromotion.strategy",c5n="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",a5n="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",o5n="org.eclipse.elk.layered.crossingMinimization.strategy",u5n="org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder",s5n="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",h5n="org.eclipse.elk.layered.crossingMinimization.semiInteractive",f5n="org.eclipse.elk.layered.crossingMinimization.inLayerPredOf",l5n="org.eclipse.elk.layered.crossingMinimization.inLayerSuccOf",b5n="org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint",w5n="org.eclipse.elk.layered.crossingMinimization.positionId",d5n="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",g5n="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",p5n="org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type",m5n="org.eclipse.elk.layered.nodePlacement.strategy",v5n="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",k5n="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",y5n="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",M5n="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",T5n="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",j5n="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",E5n="org.eclipse.elk.layered.edgeRouting.selfLoopDistribution",S5n="org.eclipse.elk.layered.edgeRouting.selfLoopOrdering",P5n="org.eclipse.elk.layered.edgeRouting.splines.mode",C5n="org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor",I5n="org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth",O5n="org.eclipse.elk.layered.spacing.baseValue",A5n="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",L5n="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",N5n="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",$5n="org.eclipse.elk.layered.priority.direction",D5n="org.eclipse.elk.layered.priority.shortness",x5n="org.eclipse.elk.layered.priority.straightness",R5n="org.eclipse.elk.layered.compaction.connectedComponents",K5n="org.eclipse.elk.layered.compaction.postCompaction.strategy",F5n="org.eclipse.elk.layered.compaction.postCompaction.constraints",_5n="org.eclipse.elk.layered.highDegreeNodes.treatment",B5n="org.eclipse.elk.layered.highDegreeNodes.threshold",H5n="org.eclipse.elk.layered.highDegreeNodes.treeHeight",U5n="org.eclipse.elk.layered.wrapping.strategy",G5n="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",q5n="org.eclipse.elk.layered.wrapping.correctionFactor",X5n="org.eclipse.elk.layered.wrapping.cutting.strategy",z5n="org.eclipse.elk.layered.wrapping.cutting.cuts",V5n="org.eclipse.elk.layered.wrapping.cutting.msd.freedom",W5n="org.eclipse.elk.layered.wrapping.validify.strategy",Q5n="org.eclipse.elk.layered.wrapping.validify.forbiddenIndices",J5n="org.eclipse.elk.layered.wrapping.multiEdge.improveCuts",Y5n="org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty",Z5n="org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges",n8n="org.eclipse.elk.layered.edgeLabels.sideSelection",t8n="org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy",e8n="org.eclipse.elk.layered.considerModelOrder.strategy",i8n="org.eclipse.elk.layered.considerModelOrder.portModelOrder",r8n="org.eclipse.elk.layered.considerModelOrder.noModelOrder",c8n="org.eclipse.elk.layered.considerModelOrder.components",a8n="org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy",o8n="org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence",u8n="org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence",s8n="layering",h8n="layering.minWidth",f8n="layering.nodePromotion",l8n="crossingMinimization",b8n="org.eclipse.elk.hierarchyHandling",w8n="crossingMinimization.greedySwitch",d8n="nodePlacement",g8n="nodePlacement.bk",p8n="edgeRouting",m8n="org.eclipse.elk.edgeRouting",v8n="spacing",k8n="priority",y8n="compaction",M8n="compaction.postCompaction",T8n="Specifies whether and how post-process compaction is applied.",j8n="highDegreeNodes",E8n="wrapping",S8n="wrapping.cutting",P8n="wrapping.validify",C8n="wrapping.multiEdge",I8n="edgeLabels",O8n="considerModelOrder",A8n="org.eclipse.elk.spacing.commentComment",L8n="org.eclipse.elk.spacing.commentNode",N8n="org.eclipse.elk.spacing.edgeEdge",$8n="org.eclipse.elk.spacing.edgeNode",D8n="org.eclipse.elk.spacing.labelLabel",x8n="org.eclipse.elk.spacing.labelPortHorizontal",R8n="org.eclipse.elk.spacing.labelPortVertical",K8n="org.eclipse.elk.spacing.labelNode",F8n="org.eclipse.elk.spacing.nodeSelfLoop",_8n="org.eclipse.elk.spacing.portPort",B8n="org.eclipse.elk.spacing.individual",H8n="org.eclipse.elk.port.borderOffset",U8n="org.eclipse.elk.noLayout",G8n="org.eclipse.elk.port.side",q8n="org.eclipse.elk.debugMode",X8n="org.eclipse.elk.alignment",z8n="org.eclipse.elk.insideSelfLoops.activate",V8n="org.eclipse.elk.insideSelfLoops.yo",W8n="org.eclipse.elk.direction",Q8n="org.eclipse.elk.nodeLabels.padding",J8n="org.eclipse.elk.portLabels.nextToPortIfPossible",Y8n="org.eclipse.elk.portLabels.treatAsGroup",Z8n="org.eclipse.elk.portAlignment.default",n9n="org.eclipse.elk.portAlignment.north",t9n="org.eclipse.elk.portAlignment.south",e9n="org.eclipse.elk.portAlignment.west",i9n="org.eclipse.elk.portAlignment.east",r9n="org.eclipse.elk.contentAlignment",c9n="org.eclipse.elk.junctionPoints",a9n="org.eclipse.elk.edgeLabels.placement",o9n="org.eclipse.elk.port.index",u9n="org.eclipse.elk.commentBox",s9n="org.eclipse.elk.hypernode",h9n="org.eclipse.elk.port.anchor",f9n="org.eclipse.elk.partitioning.activate",l9n="org.eclipse.elk.partitioning.partition",b9n="org.eclipse.elk.position",w9n="org.eclipse.elk.margins",d9n="org.eclipse.elk.spacing.portsSurrounding",g9n="org.eclipse.elk.interactiveLayout",p9n="org.eclipse.elk.core.util",m9n={3:1,4:1,5:1,601:1},v9n="NETWORK_SIMPLEX",k9n="SIMPLE",y9n={106:1,47:1},M9n="org.eclipse.elk.alg.layered.p1cycles",T9n="org.eclipse.elk.alg.layered.p2layers",j9n={413:1,230:1},E9n={846:1,3:1,4:1},S9n="org.eclipse.elk.alg.layered.p3order",P9n="org.eclipse.elk.alg.layered.p4nodes",C9n={3:1,4:1,5:1,854:1},I9n=1e-5,O9n="org.eclipse.elk.alg.layered.p4nodes.bk",A9n="org.eclipse.elk.alg.layered.p5edges",L9n="org.eclipse.elk.alg.layered.p5edges.orthogonal",N9n="org.eclipse.elk.alg.layered.p5edges.orthogonal.direction",$9n=1e-6,D9n="org.eclipse.elk.alg.layered.p5edges.splines",x9n=.09999999999999998,R9n=1e-8,K9n=4.71238898038469,F9n=3.141592653589793,_9n="org.eclipse.elk.alg.mrtree",B9n=.10000000149011612,H9n="SUPER_ROOT",U9n="org.eclipse.elk.alg.mrtree.graph",G9n=-17976931348623157e292,q9n="org.eclipse.elk.alg.mrtree.intermediate",X9n="Processor compute fanout",z9n={3:1,6:1,4:1,5:1,534:1,100:1,115:1},V9n="Set neighbors in level",W9n="org.eclipse.elk.alg.mrtree.options",Q9n="DESCENDANTS",J9n="org.eclipse.elk.mrtree.compaction",Y9n="org.eclipse.elk.mrtree.edgeEndTextureLength",Z9n="org.eclipse.elk.mrtree.treeLevel",n7n="org.eclipse.elk.mrtree.positionConstraint",t7n="org.eclipse.elk.mrtree.weighting",e7n="org.eclipse.elk.mrtree.edgeRoutingMode",i7n="org.eclipse.elk.mrtree.searchOrder",r7n="Position Constraint",c7n="org.eclipse.elk.mrtree",a7n="org.eclipse.elk.tree",o7n="Processor arrange level",u7n="org.eclipse.elk.alg.mrtree.p2order",s7n="org.eclipse.elk.alg.mrtree.p4route",h7n="org.eclipse.elk.alg.radial",f7n=6.283185307179586,l7n="Before",b7n=5e-324,w7n="After",d7n="org.eclipse.elk.alg.radial.intermediate",g7n="COMPACTION",p7n="org.eclipse.elk.alg.radial.intermediate.compaction",m7n={3:1,4:1,5:1,100:1},v7n="org.eclipse.elk.alg.radial.intermediate.optimization",k7n="No implementation is available for the layout option ",y7n="org.eclipse.elk.alg.radial.options",M7n="org.eclipse.elk.radial.centerOnRoot",T7n="org.eclipse.elk.radial.orderId",j7n="org.eclipse.elk.radial.radius",E7n="org.eclipse.elk.radial.rotate",S7n="org.eclipse.elk.radial.compactor",P7n="org.eclipse.elk.radial.compactionStepSize",C7n="org.eclipse.elk.radial.sorter",I7n="org.eclipse.elk.radial.wedgeCriteria",O7n="org.eclipse.elk.radial.optimizationCriteria",A7n="org.eclipse.elk.radial.rotation.targetAngle",L7n="org.eclipse.elk.radial.rotation.computeAdditionalWedgeSpace",N7n="org.eclipse.elk.radial.rotation.outgoingEdgeAngles",$7n="Compaction",D7n="rotation",x7n="org.eclipse.elk.radial",R7n="org.eclipse.elk.alg.radial.p1position.wedge",K7n="org.eclipse.elk.alg.radial.sorting",F7n=5.497787143782138,_7n=3.9269908169872414,B7n=2.356194490192345,H7n="org.eclipse.elk.alg.rectpacking",U7n="org.eclipse.elk.alg.rectpacking.intermediate",G7n="org.eclipse.elk.alg.rectpacking.options",q7n="org.eclipse.elk.rectpacking.trybox",X7n="org.eclipse.elk.rectpacking.currentPosition",z7n="org.eclipse.elk.rectpacking.desiredPosition",V7n="org.eclipse.elk.rectpacking.inNewRow",W7n="org.eclipse.elk.rectpacking.widthApproximation.strategy",Q7n="org.eclipse.elk.rectpacking.widthApproximation.targetWidth",J7n="org.eclipse.elk.rectpacking.widthApproximation.optimizationGoal",Y7n="org.eclipse.elk.rectpacking.widthApproximation.lastPlaceShift",Z7n="org.eclipse.elk.rectpacking.packing.strategy",nnt="org.eclipse.elk.rectpacking.packing.compaction.rowHeightReevaluation",tnt="org.eclipse.elk.rectpacking.packing.compaction.iterations",ent="org.eclipse.elk.rectpacking.whiteSpaceElimination.strategy",int="widthApproximation",rnt="Compaction Strategy",cnt="packing.compaction",ant="org.eclipse.elk.rectpacking",ont="org.eclipse.elk.alg.rectpacking.p1widthapproximation",unt="org.eclipse.elk.alg.rectpacking.p2packing",snt="No Compaction",hnt="org.eclipse.elk.alg.rectpacking.p3whitespaceelimination",fnt="org.eclipse.elk.alg.rectpacking.util",lnt="No implementation available for ",bnt="org.eclipse.elk.alg.spore",wnt="org.eclipse.elk.alg.spore.options",dnt="org.eclipse.elk.sporeCompaction",gnt="org.eclipse.elk.underlyingLayoutAlgorithm",pnt="org.eclipse.elk.processingOrder.treeConstruction",mnt="org.eclipse.elk.processingOrder.spanningTreeCostFunction",vnt="org.eclipse.elk.processingOrder.preferredRoot",knt="org.eclipse.elk.processingOrder.rootSelection",ynt="org.eclipse.elk.structure.structureExtractionStrategy",Mnt="org.eclipse.elk.compaction.compactionStrategy",Tnt="org.eclipse.elk.compaction.orthogonal",jnt="org.eclipse.elk.overlapRemoval.maxIterations",Ent="org.eclipse.elk.overlapRemoval.runScanline",Snt="processingOrder",Pnt="overlapRemoval",Cnt="org.eclipse.elk.sporeOverlap",Int="org.eclipse.elk.alg.spore.p1structure",Ont="org.eclipse.elk.alg.spore.p2processingorder",Ant="org.eclipse.elk.alg.spore.p3execution",Lnt="Topdown Layout",Nnt="Invalid index: ",$nt="org.eclipse.elk.core.alg",Dnt={341:1},xnt={295:1},Rnt="Make sure its type is registered with the ",Knt=" utility class.",Fnt="true",_nt="false",Bnt="Couldn't clone property '",Hnt=.05,Unt="org.eclipse.elk.core.options",Gnt=1.2999999523162842,qnt="org.eclipse.elk.box",Xnt="org.eclipse.elk.expandNodes",znt="org.eclipse.elk.box.packingMode",Vnt="org.eclipse.elk.algorithm",Wnt="org.eclipse.elk.resolvedAlgorithm",Qnt="org.eclipse.elk.bendPoints",Jnt="org.eclipse.elk.labelManager",Ynt="org.eclipse.elk.scaleFactor",Znt="org.eclipse.elk.childAreaWidth",ntt="org.eclipse.elk.childAreaHeight",ttt="org.eclipse.elk.animate",ett="org.eclipse.elk.animTimeFactor",itt="org.eclipse.elk.layoutAncestors",rtt="org.eclipse.elk.maxAnimTime",ctt="org.eclipse.elk.minAnimTime",att="org.eclipse.elk.progressBar",ott="org.eclipse.elk.validateGraph",utt="org.eclipse.elk.validateOptions",stt="org.eclipse.elk.zoomToFit",htt="org.eclipse.elk.font.name",ftt="org.eclipse.elk.font.size",ltt="org.eclipse.elk.topdown.sizeApproximator",btt="org.eclipse.elk.topdown.scaleCap",wtt="org.eclipse.elk.edge.type",dtt="partitioning",gtt="nodeLabels",ptt="portAlignment",mtt="nodeSize",vtt="port",ktt="portLabels",ytt="topdown",Mtt="insideSelfLoops",Ttt="org.eclipse.elk.fixed",jtt="org.eclipse.elk.random",Ett={3:1,34:1,22:1,347:1},Stt="port must have a parent node to calculate the port side",Ptt="The edge needs to have exactly one edge section. Found: ",Ctt="org.eclipse.elk.core.util.adapters",Itt="org.eclipse.emf.ecore",Ott="org.eclipse.elk.graph",Att="EMapPropertyHolder",Ltt="ElkBendPoint",Ntt="ElkGraphElement",$tt="ElkConnectableShape",Dtt="ElkEdge",xtt="ElkEdgeSection",Rtt="EModelElement",Ktt="ENamedElement",Ftt="ElkLabel",_tt="ElkNode",Btt="ElkPort",Htt={94:1,93:1},Utt="org.eclipse.emf.common.notify.impl",Gtt="The feature '",qtt="' is not a valid changeable feature",Xtt="Expecting null",ztt="' is not a valid feature",Vtt="The feature ID",Wtt=" is not a valid feature ID",Qtt=32768,Jtt={110:1,94:1,93:1,58:1,54:1,99:1},Ytt="org.eclipse.emf.ecore.impl",Ztt="org.eclipse.elk.graph.impl",net="Recursive containment not allowed for ",tet="The datatype '",eet="' is not a valid classifier",iet="The value '",ret={195:1,3:1,4:1},cet="The class '",aet="http://www.eclipse.org/elk/ElkGraph",oet="property",uet="value",set="source",het="properties",fet="identifier",bet="height",wet="width",det="parent",get="text",pet="children",met="hierarchical",vet="sources",ket="targets",yet="sections",Met="bendPoints",Tet="outgoingShape",jet="incomingShape",Eet="outgoingSections",Set="incomingSections",Pet="org.eclipse.emf.common.util",Cet="Severe implementation error in the Json to ElkGraph importer.",Iet="id",Oet="org.eclipse.elk.graph.json",Aet="Unhandled parameter types: ",Let="startPoint",Net="An edge must have at least one source and one target (edge id: '",$et="').",Det="Referenced edge section does not exist: ",xet=" (edge id: '",Ret="target",Ket="sourcePoint",Fet="targetPoint",_et="group",Bet="name",Het="connectableShape cannot be null",Uet="edge cannot be null",Get="Passed edge is not 'simple'.",qet="org.eclipse.elk.graph.util",Xet="The 'no duplicates' constraint is violated",zet="targetIndex=",Vet=", size=",Wet="sourceIndex=",Qet={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1},Jet={3:1,4:1,20:1,31:1,56:1,16:1,51:1,15:1,59:1,70:1,66:1,61:1,596:1},Yet="logging",Zet="measureExecutionTime",nit="parser.parse.1",tit="parser.parse.2",eit="parser.next.1",iit="parser.next.2",rit="parser.next.3",cit="parser.next.4",ait="parser.factor.1",oit="parser.factor.2",uit="parser.factor.3",sit="parser.factor.4",hit="parser.factor.5",fit="parser.factor.6",lit="parser.atom.1",bit="parser.atom.2",wit="parser.atom.3",dit="parser.atom.4",git="parser.atom.5",pit="parser.cc.1",mit="parser.cc.2",vit="parser.cc.3",kit="parser.cc.5",yit="parser.cc.6",Mit="parser.cc.7",Tit="parser.cc.8",jit="parser.ope.1",Eit="parser.ope.2",Sit="parser.ope.3",Pit="parser.descape.1",Cit="parser.descape.2",Iit="parser.descape.3",Oit="parser.descape.4",Ait="parser.descape.5",Lit="parser.process.1",Nit="parser.quantifier.1",$it="parser.quantifier.2",Dit="parser.quantifier.3",xit="parser.quantifier.4",Rit="parser.quantifier.5",Kit="org.eclipse.emf.common.notify",Fit={424:1,686:1},_it={3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1},Bit={378:1,152:1},Hit="index=",Uit={3:1,4:1,5:1,129:1},Git={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,61:1},qit={3:1,6:1,4:1,5:1,198:1},Xit={3:1,4:1,5:1,173:1,379:1},zit=";/?:@&=+$,",Vit="invalid authority: ",Wit="EAnnotation",Qit="ETypedElement",Jit="EStructuralFeature",Yit="EAttribute",Zit="EClassifier",nrt="EEnumLiteral",trt="EGenericType",ert="EOperation",irt="EParameter",rrt="EReference",crt="ETypeParameter",art="org.eclipse.emf.ecore.util",ort={79:1},urt={3:1,20:1,16:1,15:1,61:1,597:1,79:1,71:1,97:1},srt="org.eclipse.emf.ecore.util.FeatureMap$Entry",hrt=8192,frt=2048,lrt="byte",brt="char",wrt="double",drt="float",grt="int",prt="long",mrt="short",vrt="java.lang.Object",krt={3:1,4:1,5:1,254:1},yrt={3:1,4:1,5:1,688:1},Mrt={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,71:1},Trt={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,79:1,71:1,97:1},jrt="mixed",Ert="http:///org/eclipse/emf/ecore/util/ExtendedMetaData",Srt="kind",Prt={3:1,4:1,5:1,689:1},Crt={3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1,79:1,71:1,97:1},Irt={20:1,31:1,56:1,16:1,15:1,61:1,71:1},Ort={51:1,128:1,287:1},Art={76:1,343:1},Lrt="The value of type '",Nrt="' must be of type '",$rt=1352,Drt="http://www.eclipse.org/emf/2002/Ecore",xrt=-32768,Rrt="constraints",Krt="baseType",Frt="getEStructuralFeature",_rt="getFeatureID",Brt="feature",Hrt="getOperationID",Urt="operation",Grt="defaultValue",qrt="eTypeParameters",Xrt="isInstance",zrt="getEEnumLiteral",Vrt="eContainingClass",Wrt={57:1},Qrt={3:1,4:1,5:1,124:1},Jrt="org.eclipse.emf.ecore.resource",Yrt={94:1,93:1,599:1,2034:1},Zrt="org.eclipse.emf.ecore.resource.impl",nct="unspecified",tct="simple",ect="attribute",ict="attributeWildcard",rct="element",cct="elementWildcard",act="collapse",oct="itemType",uct="namespace",sct="##targetNamespace",hct="whiteSpace",fct="wildcards",lct="http://www.eclipse.org/emf/2003/XMLType",bct="##any",wct="uninitialized",dct="The multiplicity constraint is violated",gct="org.eclipse.emf.ecore.xml.type",pct="ProcessingInstruction",mct="SimpleAnyType",vct="XMLTypeDocumentRoot",kct="org.eclipse.emf.ecore.xml.type.impl",yct="INF",Mct="processing",Tct="ENTITIES_._base",jct="minLength",Ect="ENTITY",Sct="NCName",Pct="IDREFS_._base",Cct="integer",Ict="token",Oct="pattern",Act="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*",Lct="\\i\\c*",Nct="[\\i-[:]][\\c-[:]]*",$ct="nonPositiveInteger",Dct="maxInclusive",xct="NMTOKEN",Rct="NMTOKENS_._base",Kct="nonNegativeInteger",Fct="minInclusive",_ct="normalizedString",Bct="unsignedByte",Hct="unsignedInt",Uct="18446744073709551615",Gct="unsignedShort",qct="processingInstruction",Xct="org.eclipse.emf.ecore.xml.type.internal",zct=1114111,Vct="Internal Error: shorthands: \\u",Wct="xml:isDigit",Qct="xml:isWord",Jct="xml:isSpace",Yct="xml:isNameChar",Zct="xml:isInitialNameChar",nat="09\u0660\u0669\u06f0\u06f9\u0966\u096f\u09e6\u09ef\u0a66\u0a6f\u0ae6\u0aef\u0b66\u0b6f\u0be7\u0bef\u0c66\u0c6f\u0ce6\u0cef\u0d66\u0d6f\u0e50\u0e59\u0ed0\u0ed9\u0f20\u0f29",tat="AZaz\xc0\xd6\xd8\xf6\xf8\u0131\u0134\u013e\u0141\u0148\u014a\u017e\u0180\u01c3\u01cd\u01f0\u01f4\u01f5\u01fa\u0217\u0250\u02a8\u02bb\u02c1\u0386\u0386\u0388\u038a\u038c\u038c\u038e\u03a1\u03a3\u03ce\u03d0\u03d6\u03da\u03da\u03dc\u03dc\u03de\u03de\u03e0\u03e0\u03e2\u03f3\u0401\u040c\u040e\u044f\u0451\u045c\u045e\u0481\u0490\u04c4\u04c7\u04c8\u04cb\u04cc\u04d0\u04eb\u04ee\u04f5\u04f8\u04f9\u0531\u0556\u0559\u0559\u0561\u0586\u05d0\u05ea\u05f0\u05f2\u0621\u063a\u0641\u064a\u0671\u06b7\u06ba\u06be\u06c0\u06ce\u06d0\u06d3\u06d5\u06d5\u06e5\u06e6\u0905\u0939\u093d\u093d\u0958\u0961\u0985\u098c\u098f\u0990\u0993\u09a8\u09aa\u09b0\u09b2\u09b2\u09b6\u09b9\u09dc\u09dd\u09df\u09e1\u09f0\u09f1\u0a05\u0a0a\u0a0f\u0a10\u0a13\u0a28\u0a2a\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59\u0a5c\u0a5e\u0a5e\u0a72\u0a74\u0a85\u0a8b\u0a8d\u0a8d\u0a8f\u0a91\u0a93\u0aa8\u0aaa\u0ab0\u0ab2\u0ab3\u0ab5\u0ab9\u0abd\u0abd\u0ae0\u0ae0\u0b05\u0b0c\u0b0f\u0b10\u0b13\u0b28\u0b2a\u0b30\u0b32\u0b33\u0b36\u0b39\u0b3d\u0b3d\u0b5c\u0b5d\u0b5f\u0b61\u0b85\u0b8a\u0b8e\u0b90\u0b92\u0b95\u0b99\u0b9a\u0b9c\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8\u0baa\u0bae\u0bb5\u0bb7\u0bb9\u0c05\u0c0c\u0c0e\u0c10\u0c12\u0c28\u0c2a\u0c33\u0c35\u0c39\u0c60\u0c61\u0c85\u0c8c\u0c8e\u0c90\u0c92\u0ca8\u0caa\u0cb3\u0cb5\u0cb9\u0cde\u0cde\u0ce0\u0ce1\u0d05\u0d0c\u0d0e\u0d10\u0d12\u0d28\u0d2a\u0d39\u0d60\u0d61\u0e01\u0e2e\u0e30\u0e30\u0e32\u0e33\u0e40\u0e45\u0e81\u0e82\u0e84\u0e84\u0e87\u0e88\u0e8a\u0e8a\u0e8d\u0e8d\u0e94\u0e97\u0e99\u0e9f\u0ea1\u0ea3\u0ea5\u0ea5\u0ea7\u0ea7\u0eaa\u0eab\u0ead\u0eae\u0eb0\u0eb0\u0eb2\u0eb3\u0ebd\u0ebd\u0ec0\u0ec4\u0f40\u0f47\u0f49\u0f69\u10a0\u10c5\u10d0\u10f6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110b\u110c\u110e\u1112\u113c\u113c\u113e\u113e\u1140\u1140\u114c\u114c\u114e\u114e\u1150\u1150\u1154\u1155\u1159\u1159\u115f\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116d\u116e\u1172\u1173\u1175\u1175\u119e\u119e\u11a8\u11a8\u11ab\u11ab\u11ae\u11af\u11b7\u11b8\u11ba\u11ba\u11bc\u11c2\u11eb\u11eb\u11f0\u11f0\u11f9\u11f9\u1e00\u1e9b\u1ea0\u1ef9\u1f00\u1f15\u1f18\u1f1d\u1f20\u1f45\u1f48\u1f4d\u1f50\u1f57\u1f59\u1f59\u1f5b\u1f5b\u1f5d\u1f5d\u1f5f\u1f7d\u1f80\u1fb4\u1fb6\u1fbc\u1fbe\u1fbe\u1fc2\u1fc4\u1fc6\u1fcc\u1fd0\u1fd3\u1fd6\u1fdb\u1fe0\u1fec\u1ff2\u1ff4\u1ff6\u1ffc\u2126\u2126\u212a\u212b\u212e\u212e\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30a1\u30fa\u3105\u312c\u4e00\u9fa5\uac00\ud7a3",eat="Private Use",iat="ASSIGNED",rat="\0\x7f\x80\xff\u0100\u017f\u0180\u024f\u0250\u02af\u02b0\u02ff\u0300\u036f\u0370\u03ff\u0400\u04ff\u0530\u058f\u0590\u05ff\u0600\u06ff\u0700\u074f\u0780\u07bf\u0900\u097f\u0980\u09ff\u0a00\u0a7f\u0a80\u0aff\u0b00\u0b7f\u0b80\u0bff\u0c00\u0c7f\u0c80\u0cff\u0d00\u0d7f\u0d80\u0dff\u0e00\u0e7f\u0e80\u0eff\u0f00\u0fff\u1000\u109f\u10a0\u10ff\u1100\u11ff\u1200\u137f\u13a0\u13ff\u1400\u167f\u1680\u169f\u16a0\u16ff\u1780\u17ff\u1800\u18af\u1e00\u1eff\u1f00\u1fff\u2000\u206f\u2070\u209f\u20a0\u20cf\u20d0\u20ff\u2100\u214f\u2150\u218f\u2190\u21ff\u2200\u22ff\u2300\u23ff\u2400\u243f\u2440\u245f\u2460\u24ff\u2500\u257f\u2580\u259f\u25a0\u25ff\u2600\u26ff\u2700\u27bf\u2800\u28ff\u2e80\u2eff\u2f00\u2fdf\u2ff0\u2fff\u3000\u303f\u3040\u309f\u30a0\u30ff\u3100\u312f\u3130\u318f\u3190\u319f\u31a0\u31bf\u3200\u32ff\u3300\u33ff\u3400\u4db5\u4e00\u9fff\ua000\ua48f\ua490\ua4cf\uac00\ud7a3\ue000\uf8ff\uf900\ufaff\ufb00\ufb4f\ufb50\ufdff\ufe20\ufe2f\ufe30\ufe4f\ufe50\ufe6f\ufe70\ufefe\ufeff\ufeff\uff00\uffef",cat="UNASSIGNED",aat={3:1,122:1},oat="org.eclipse.emf.ecore.xml.type.util",uat={3:1,4:1,5:1,381:1},sat="org.eclipse.xtext.xbase.lib",hat="Cannot add elements to a Range",fat="Cannot set elements in a Range",lat="Cannot remove elements from a Range",bat="user.agent";e.goog=e.goog||{},e.goog.global=e.goog.global||e,sZn={},sDn(1,null,{},r),uZn.Fb=function(n){return SL(this,n)},uZn.Gb=function(){return this.Rm},uZn.Hb=function(){return xx(this)},uZn.Ib=function(){return Ij(Tbn(this))+"@"+(Hon(this)>>>0).toString(16)},uZn.equals=function(n){return this.Fb(n)},uZn.hashCode=function(){return this.Hb()},uZn.toString=function(){return this.Ib()},sDn(297,1,{297:1,2124:1},Ifn),uZn.ve=function(n){var t;return(t=new Ifn).i=4,t.c=n>1?B0(this,n-1):this,t},uZn.we=function(){return vK(this),this.b},uZn.xe=function(){return Ij(this)},uZn.ye=function(){return vK(this),this.k},uZn.ze=function(){return!!(4&this.i)},uZn.Ae=function(){return!!(1&this.i)},uZn.Ib=function(){return crn(this)},uZn.i=0;var wat,dat=zW(kZn,"Object",1),gat=zW(kZn,"Class",297);sDn(2096,1,yZn),zW(MZn,"Optional",2096),sDn(1191,2096,yZn,c),uZn.Fb=function(n){return n===this},uZn.Hb=function(){return 2040732332},uZn.Ib=function(){return"Optional.absent()"},uZn.Jb=function(n){return WW(n),gy(),wat},zW(MZn,"Absent",1191),sDn(636,1,{},FM),zW(MZn,"Joiner",636);var pat=Iq(MZn,"Predicate");sDn(589,1,{178:1,589:1,3:1,46:1},Hl),uZn.Mb=function(n){return Wfn(this,n)},uZn.Lb=function(n){return Wfn(this,n)},uZn.Fb=function(n){var t;return!!F$(n,589)&&(t=uG(n,589),PDn(this.a,t.a))},uZn.Hb=function(){return Zfn(this.a)+306654252},uZn.Ib=function(){return eAn(this.a)},zW(MZn,"Predicates/AndPredicate",589),sDn(419,2096,{419:1,3:1},Ul),uZn.Fb=function(n){var t;return!!F$(n,419)&&(t=uG(n,419),udn(this.a,t.a))},uZn.Hb=function(){return 1502476572+Hon(this.a)},uZn.Ib=function(){return CZn+this.a+")"},uZn.Jb=function(n){return new Ul(bZ(n.Kb(this.a),"the Function passed to Optional.transform() must not return null."))},zW(MZn,"Present",419),sDn(204,1,OZn),uZn.Nb=function(n){SV(this,n)},uZn.Qb=function(){_M()},zW(AZn,"UnmodifiableIterator",204),sDn(2076,204,LZn),uZn.Qb=function(){_M()},uZn.Rb=function(n){throw hv(new Kv)},uZn.Wb=function(n){throw hv(new Kv)},zW(AZn,"UnmodifiableListIterator",2076),sDn(399,2076,LZn),uZn.Ob=function(){return this.c<this.d},uZn.Sb=function(){return this.c>0},uZn.Pb=function(){if(this.c>=this.d)throw hv(new Bv);return this.Xb(this.c++)},uZn.Tb=function(){return this.c},uZn.Ub=function(){if(this.c<=0)throw hv(new Bv);return this.Xb(--this.c)},uZn.Vb=function(){return this.c-1},uZn.c=0,uZn.d=0,zW(AZn,"AbstractIndexedListIterator",399),sDn(713,204,OZn),uZn.Ob=function(){return oon(this)},uZn.Pb=function(){return yen(this)},uZn.e=1,zW(AZn,"AbstractIterator",713),sDn(2084,1,{229:1}),uZn.Zb=function(){return this.f||(this.f=this.ac())},uZn.Fb=function(n){return Aln(this,n)},uZn.Hb=function(){return Hon(this.Zb())},uZn.dc=function(){return 0==this.gc()},uZn.ec=function(){return kz(this)},uZn.Ib=function(){return cpn(this.Zb())},zW(AZn,"AbstractMultimap",2084),sDn(742,2084,NZn),uZn.$b=function(){ban(this)},uZn._b=function(n){return jj(this,n)},uZn.ac=function(){return new OE(this,this.c)},uZn.ic=function(n){return this.hc()},uZn.bc=function(){return new RD(this,this.c)},uZn.jc=function(){return this.mc(this.hc())},uZn.kc=function(){return new My(this)},uZn.lc=function(){return ICn(this.c.vc().Nc(),new o,64,this.d)},uZn.cc=function(n){return Y9(this,n)},uZn.fc=function(n){return twn(this,n)},uZn.gc=function(){return this.d},uZn.mc=function(n){return hZ(),new qw(n)},uZn.nc=function(){return new yy(this)},uZn.oc=function(){return ICn(this.c.Cc().Nc(),new a,64,this.d)},uZn.pc=function(n,t){return new A7(this,n,t,null)},uZn.d=0,zW(AZn,"AbstractMapBasedMultimap",742),sDn(1696,742,NZn),uZn.hc=function(){return new R7(this.a)},uZn.jc=function(){return hZ(),hZ(),zot},uZn.cc=function(n){return uG(Y9(this,n),15)},uZn.fc=function(n){return uG(twn(this,n),15)},uZn.Zb=function(){return nZ(this)},uZn.Fb=function(n){return Aln(this,n)},uZn.qc=function(n){return uG(Y9(this,n),15)},uZn.rc=function(n){return uG(twn(this,n),15)},uZn.mc=function(n){return SZ(uG(n,15))},uZn.pc=function(n,t){return S6(this,n,uG(t,15),null)},zW(AZn,"AbstractListMultimap",1696),sDn(748,1,$Zn),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.c.Ob()||this.e.Ob()},uZn.Pb=function(){var n;return this.e.Ob()||(n=uG(this.c.Pb(),44),this.b=n.ld(),this.a=uG(n.md(),16),this.e=this.a.Kc()),this.sc(this.b,this.e.Pb())},uZn.Qb=function(){this.e.Qb(),uG(nJ(this.a),16).dc()&&this.c.Qb(),--this.d.d},zW(AZn,"AbstractMapBasedMultimap/Itr",748),sDn(1129,748,$Zn,yy),uZn.sc=function(n,t){return t},zW(AZn,"AbstractMapBasedMultimap/1",1129),sDn(1130,1,{},a),uZn.Kb=function(n){return uG(n,16).Nc()},zW(AZn,"AbstractMapBasedMultimap/1methodref$spliterator$Type",1130),sDn(1131,748,$Zn,My),uZn.sc=function(n,t){return new FE(n,t)},zW(AZn,"AbstractMapBasedMultimap/2",1131);var mat=Iq(DZn,"Map");sDn(2065,1,xZn),uZn.wc=function(n){Yun(this,n)},uZn.yc=function(n,t,e){return Jgn(this,n,t,e)},uZn.$b=function(){this.vc().$b()},uZn.tc=function(n){return sTn(this,n)},uZn._b=function(n){return!!TPn(this,n,!1)},uZn.uc=function(n){var t,e;for(t=this.vc().Kc();t.Ob();)if(e=uG(t.Pb(),44).md(),xA(n)===xA(e)||null!=n&&udn(n,e))return!0;return!1},uZn.Fb=function(n){var t,e,i;if(n===this)return!0;if(!F$(n,85))return!1;if(i=uG(n,85),this.gc()!=i.gc())return!1;for(e=i.vc().Kc();e.Ob();)if(t=uG(e.Pb(),44),!this.tc(t))return!1;return!0},uZn.xc=function(n){return DA(TPn(this,n,!1))},uZn.Hb=function(){return tfn(this.vc())},uZn.dc=function(){return 0==this.gc()},uZn.ec=function(){return new Lw(this)},uZn.zc=function(n,t){throw hv(new TM("Put not supported on this map"))},uZn.Ac=function(n){xun(this,n)},uZn.Bc=function(n){return DA(TPn(this,n,!0))},uZn.gc=function(){return this.vc().gc()},uZn.Ib=function(){return KPn(this)},uZn.Cc=function(){return new Fw(this)},zW(DZn,"AbstractMap",2065),sDn(2085,2065,xZn),uZn.bc=function(){return new VE(this)},uZn.vc=function(){return vz(this)},uZn.ec=function(){return this.g||(this.g=this.bc())},uZn.Cc=function(){return this.i||(this.i=new zE(this))},zW(AZn,"Maps/ViewCachingAbstractMap",2085),sDn(402,2085,xZn,OE),uZn.xc=function(n){return srn(this,n)},uZn.Bc=function(n){return abn(this,n)},uZn.$b=function(){this.d==this.e.c?this.e.$b():Hq(new Gq(this))},uZn._b=function(n){return Uwn(this.d,n)},uZn.Ec=function(){return new Gl(this)},uZn.Dc=function(){return this.Ec()},uZn.Fb=function(n){return this===n||udn(this.d,n)},uZn.Hb=function(){return Hon(this.d)},uZn.ec=function(){return this.e.ec()},uZn.gc=function(){return this.d.gc()},uZn.Ib=function(){return cpn(this.d)},zW(AZn,"AbstractMapBasedMultimap/AsMap",402);var vat=Iq(kZn,"Iterable");sDn(31,1,RZn),uZn.Jc=function(n){z8(this,n)},uZn.Lc=function(){return this.Oc()},uZn.Nc=function(){return new h3(this,0)},uZn.Oc=function(){return new fX(null,this.Nc())},uZn.Fc=function(n){throw hv(new TM("Add not supported on this collection"))},uZn.Gc=function(n){return Qon(this,n)},uZn.$b=function(){oY(this)},uZn.Hc=function(n){return Wpn(this,n,!1)},uZn.Ic=function(n){return yhn(this,n)},uZn.dc=function(){return 0==this.gc()},uZn.Mc=function(n){return Wpn(this,n,!0)},uZn.Pc=function(){return Sz(this)},uZn.Qc=function(n){return oTn(this,n)},uZn.Ib=function(){return vIn(this)},zW(DZn,"AbstractCollection",31);var kat=Iq(DZn,"Set");sDn(KZn,31,FZn),uZn.Nc=function(){return new h3(this,1)},uZn.Fb=function(n){return Fvn(this,n)},uZn.Hb=function(){return tfn(this)},zW(DZn,"AbstractSet",KZn),sDn(2068,KZn,FZn),zW(AZn,"Sets/ImprovedAbstractSet",2068),sDn(2069,2068,FZn),uZn.$b=function(){this.Rc().$b()},uZn.Hc=function(n){return Amn(this,n)},uZn.dc=function(){return this.Rc().dc()},uZn.Mc=function(n){var t;return!(!this.Hc(n)||!F$(n,44))&&(t=uG(n,44),this.Rc().ec().Mc(t.ld()))},uZn.gc=function(){return this.Rc().gc()},zW(AZn,"Maps/EntrySet",2069),sDn(1127,2069,FZn,Gl),uZn.Hc=function(n){return Gwn(this.a.d.vc(),n)},uZn.Kc=function(){return new Gq(this.a)},uZn.Rc=function(){return this.a},uZn.Mc=function(n){var t;return!!Gwn(this.a.d.vc(),n)&&(t=uG(nJ(uG(n,44)),44),H9(this.a.e,t.ld()),!0)},uZn.Nc=function(){return JU(this.a.d.vc().Nc(),new ql(this.a))},zW(AZn,"AbstractMapBasedMultimap/AsMap/AsMapEntries",1127),sDn(1128,1,{},ql),uZn.Kb=function(n){return O9(this.a,uG(n,44))},zW(AZn,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",1128),sDn(746,1,$Zn,Gq),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){var n;return n=uG(this.b.Pb(),44),this.a=uG(n.md(),16),O9(this.c,n)},uZn.Ob=function(){return this.b.Ob()},uZn.Qb=function(){IB(!!this.a),this.b.Qb(),this.c.e.d-=this.a.gc(),this.a.$b(),this.a=null},zW(AZn,"AbstractMapBasedMultimap/AsMap/AsMapIterator",746),sDn(542,2068,FZn,VE),uZn.$b=function(){this.b.$b()},uZn.Hc=function(n){return this.b._b(n)},uZn.Jc=function(n){WW(n),this.b.wc(new db(n))},uZn.dc=function(){return this.b.dc()},uZn.Kc=function(){return new Ny(this.b.vc().Kc())},uZn.Mc=function(n){return!!this.b._b(n)&&(this.b.Bc(n),!0)},uZn.gc=function(){return this.b.gc()},zW(AZn,"Maps/KeySet",542),sDn(327,542,FZn,RD),uZn.$b=function(){Hq(new AE(this,this.b.vc().Kc()))},uZn.Ic=function(n){return this.b.ec().Ic(n)},uZn.Fb=function(n){return this===n||udn(this.b.ec(),n)},uZn.Hb=function(){return Hon(this.b.ec())},uZn.Kc=function(){return new AE(this,this.b.vc().Kc())},uZn.Mc=function(n){var t,e;return e=0,(t=uG(this.b.Bc(n),16))&&(e=t.gc(),t.$b(),this.a.d-=e),e>0},uZn.Nc=function(){return this.b.ec().Nc()},zW(AZn,"AbstractMapBasedMultimap/KeySet",327),sDn(747,1,$Zn,AE),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.c.Ob()},uZn.Pb=function(){return this.a=uG(this.c.Pb(),44),this.a.ld()},uZn.Qb=function(){var n;IB(!!this.a),n=uG(this.a.md(),16),this.c.Qb(),this.b.a.d-=n.gc(),n.$b(),this.a=null},zW(AZn,"AbstractMapBasedMultimap/KeySet/1",747),sDn(503,402,{85:1,133:1},NK),uZn.bc=function(){return this.Sc()},uZn.ec=function(){return this.Uc()},uZn.Sc=function(){return new yE(this.c,this.Wc())},uZn.Tc=function(){return this.Wc().Tc()},uZn.Uc=function(){return this.b||(this.b=this.Sc())},uZn.Vc=function(){return this.Wc().Vc()},uZn.Wc=function(){return uG(this.d,133)},zW(AZn,"AbstractMapBasedMultimap/SortedAsMap",503),sDn(446,503,_Zn,$K),uZn.bc=function(){return new ME(this.a,uG(uG(this.d,133),139))},uZn.Sc=function(){return new ME(this.a,uG(uG(this.d,133),139))},uZn.ec=function(){return uG(this.b||(this.b=new ME(this.a,uG(uG(this.d,133),139))),277)},uZn.Uc=function(){return uG(this.b||(this.b=new ME(this.a,uG(uG(this.d,133),139))),277)},uZn.Wc=function(){return uG(uG(this.d,133),139)},uZn.Xc=function(n){return uG(uG(this.d,133),139).Xc(n)},uZn.Yc=function(n){return uG(uG(this.d,133),139).Yc(n)},uZn.Zc=function(n,t){return new $K(this.a,uG(uG(this.d,133),139).Zc(n,t))},uZn.$c=function(n){return uG(uG(this.d,133),139).$c(n)},uZn._c=function(n){return uG(uG(this.d,133),139)._c(n)},uZn.ad=function(n,t){return new $K(this.a,uG(uG(this.d,133),139).ad(n,t))},zW(AZn,"AbstractMapBasedMultimap/NavigableAsMap",446),sDn(502,327,BZn,yE),uZn.Nc=function(){return this.b.ec().Nc()},zW(AZn,"AbstractMapBasedMultimap/SortedKeySet",502),sDn(401,502,HZn,ME),zW(AZn,"AbstractMapBasedMultimap/NavigableKeySet",401),sDn(551,31,RZn,A7),uZn.Fc=function(n){var t,e;return bpn(this),e=this.d.dc(),(t=this.d.Fc(n))&&(++this.f.d,e&&mF(this)),t},uZn.Gc=function(n){var t,e,i;return!n.dc()&&(bpn(this),i=this.d.gc(),(t=this.d.Gc(n))&&(e=this.d.gc(),this.f.d+=e-i,0==i&&mF(this)),t)},uZn.$b=function(){var n;bpn(this),0!=(n=this.d.gc())&&(this.d.$b(),this.f.d-=n,DX(this))},uZn.Hc=function(n){return bpn(this),this.d.Hc(n)},uZn.Ic=function(n){return bpn(this),this.d.Ic(n)},uZn.Fb=function(n){return n===this||(bpn(this),udn(this.d,n))},uZn.Hb=function(){return bpn(this),Hon(this.d)},uZn.Kc=function(){return bpn(this),new WU(this)},uZn.Mc=function(n){var t;return bpn(this),(t=this.d.Mc(n))&&(--this.f.d,DX(this)),t},uZn.gc=function(){return qA(this)},uZn.Nc=function(){return bpn(this),this.d.Nc()},uZn.Ib=function(){return bpn(this),cpn(this.d)},zW(AZn,"AbstractMapBasedMultimap/WrappedCollection",551);var yat=Iq(DZn,"List");sDn(744,551,{20:1,31:1,16:1,15:1},qz),uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return bpn(this),this.d.Nc()},uZn.bd=function(n,t){var e;bpn(this),e=this.d.dc(),uG(this.d,15).bd(n,t),++this.a.d,e&&mF(this)},uZn.cd=function(n,t){var e,i,r;return!t.dc()&&(bpn(this),r=this.d.gc(),(e=uG(this.d,15).cd(n,t))&&(i=this.d.gc(),this.a.d+=i-r,0==r&&mF(this)),e)},uZn.Xb=function(n){return bpn(this),uG(this.d,15).Xb(n)},uZn.dd=function(n){return bpn(this),uG(this.d,15).dd(n)},uZn.ed=function(){return bpn(this),new JN(this)},uZn.fd=function(n){return bpn(this),new UY(this,n)},uZn.gd=function(n){var t;return bpn(this),t=uG(this.d,15).gd(n),--this.a.d,DX(this),t},uZn.hd=function(n,t){return bpn(this),uG(this.d,15).hd(n,t)},uZn.kd=function(n,t){return bpn(this),S6(this.a,this.e,uG(this.d,15).kd(n,t),this.b?this.b:this)},zW(AZn,"AbstractMapBasedMultimap/WrappedList",744),sDn(1126,744,{20:1,31:1,16:1,15:1,59:1},Yx),zW(AZn,"AbstractMapBasedMultimap/RandomAccessWrappedList",1126),sDn(628,1,$Zn,WU),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return FY(this),this.b.Ob()},uZn.Pb=function(){return FY(this),this.b.Pb()},uZn.Qb=function(){zD(this)},zW(AZn,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",628),sDn(745,628,UZn,JN,UY),uZn.Qb=function(){zD(this)},uZn.Rb=function(n){var t;t=0==qA(this.a),(FY(this),uG(this.b,128)).Rb(n),++this.a.a.d,t&&mF(this.a)},uZn.Sb=function(){return(FY(this),uG(this.b,128)).Sb()},uZn.Tb=function(){return(FY(this),uG(this.b,128)).Tb()},uZn.Ub=function(){return(FY(this),uG(this.b,128)).Ub()},uZn.Vb=function(){return(FY(this),uG(this.b,128)).Vb()},uZn.Wb=function(n){(FY(this),uG(this.b,128)).Wb(n)},zW(AZn,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",745),sDn(743,551,BZn,AK),uZn.Nc=function(){return bpn(this),this.d.Nc()},zW(AZn,"AbstractMapBasedMultimap/WrappedSortedSet",743),sDn(1125,743,HZn,TN),zW(AZn,"AbstractMapBasedMultimap/WrappedNavigableSet",1125),sDn(1124,551,FZn,LK),uZn.Nc=function(){return bpn(this),this.d.Nc()},zW(AZn,"AbstractMapBasedMultimap/WrappedSet",1124),sDn(1133,1,{},o),uZn.Kb=function(n){return P7(uG(n,44))},zW(AZn,"AbstractMapBasedMultimap/lambda$1$Type",1133),sDn(1132,1,{},Wl),uZn.Kb=function(n){return new FE(this.a,n)},zW(AZn,"AbstractMapBasedMultimap/lambda$2$Type",1132);var Mat,Tat,jat,Eat,Sat=Iq(DZn,"Map/Entry");sDn(358,1,GZn),uZn.Fb=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),xQ(this.ld(),t.ld())&&xQ(this.md(),t.md()))},uZn.Hb=function(){var n,t;return n=this.ld(),t=this.md(),(null==n?0:Hon(n))^(null==t?0:Hon(t))},uZn.nd=function(n){throw hv(new Kv)},uZn.Ib=function(){return this.ld()+"="+this.md()},zW(AZn,qZn,358),sDn(2086,31,RZn),uZn.$b=function(){this.od().$b()},uZn.Hc=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),E4(this.od(),t.ld(),t.md()))},uZn.Mc=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),S4(this.od(),t.ld(),t.md()))},uZn.gc=function(){return this.od().d},zW(AZn,"Multimaps/Entries",2086),sDn(749,2086,RZn,Ql),uZn.Kc=function(){return this.a.kc()},uZn.od=function(){return this.a},uZn.Nc=function(){return this.a.lc()},zW(AZn,"AbstractMultimap/Entries",749),sDn(750,749,FZn,Ty),uZn.Nc=function(){return this.a.lc()},uZn.Fb=function(n){return OOn(this,n)},uZn.Hb=function(){return Jon(this)},zW(AZn,"AbstractMultimap/EntrySet",750),sDn(751,31,RZn,Jl),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return qln(this.a,n)},uZn.Kc=function(){return this.a.nc()},uZn.gc=function(){return this.a.d},uZn.Nc=function(){return this.a.oc()},zW(AZn,"AbstractMultimap/Values",751),sDn(2087,31,{849:1,20:1,31:1,16:1}),uZn.Jc=function(n){WW(n),uY(this).Jc(new yb(n))},uZn.Nc=function(){var n;return ICn(n=uY(this).Nc(),new d,64|1296&n.yd(),this.a.d)},uZn.Fc=function(n){return HM(),!0},uZn.Gc=function(n){return WW(this),WW(n),F$(n,552)?V4(uG(n,849)):!n.dc()&&cin(this,n.Kc())},uZn.Hc=function(n){var t;return((t=uG(Xwn(nZ(this.a),n),16))?t.gc():0)>0},uZn.Fb=function(n){return nxn(this,n)},uZn.Hb=function(){return Hon(uY(this))},uZn.dc=function(){return uY(this).dc()},uZn.Mc=function(n){return bNn(this,n,1)>0},uZn.Ib=function(){return cpn(uY(this))},zW(AZn,"AbstractMultiset",2087),sDn(2089,2068,FZn),uZn.$b=function(){ban(this.a.a)},uZn.Hc=function(n){var t;return!(!F$(n,504)||(t=uG(n,425),uG(t.a.md(),16).gc()<=0||S2(this.a,t.a.ld())!=uG(t.a.md(),16).gc()))},uZn.Mc=function(n){var t,e,i;return!(!F$(n,504)||(t=(e=uG(n,425)).a.ld(),0==(i=uG(e.a.md(),16).gc())))&&wNn(this.a,t,i)},zW(AZn,"Multisets/EntrySet",2089),sDn(1139,2089,FZn,Yl),uZn.Kc=function(){return new Dy(vz(nZ(this.a.a)).Kc())},uZn.gc=function(){return nZ(this.a.a).gc()},zW(AZn,"AbstractMultiset/EntrySet",1139),sDn(627,742,NZn),uZn.hc=function(){return this.pd()},uZn.jc=function(){return this.qd()},uZn.cc=function(n){return this.rd(n)},uZn.fc=function(n){return this.sd(n)},uZn.Zb=function(){return this.f||(this.f=this.ac())},uZn.qd=function(){return hZ(),hZ(),Wot},uZn.Fb=function(n){return Aln(this,n)},uZn.rd=function(n){return uG(Y9(this,n),21)},uZn.sd=function(n){return uG(twn(this,n),21)},uZn.mc=function(n){return hZ(),new nT(uG(n,21))},uZn.pc=function(n,t){return new LK(this,n,uG(t,21))},zW(AZn,"AbstractSetMultimap",627),sDn(1723,627,NZn),uZn.hc=function(){return new Hj(this.b)},uZn.pd=function(){return new Hj(this.b)},uZn.jc=function(){return UQ(new Hj(this.b))},uZn.qd=function(){return UQ(new Hj(this.b))},uZn.cc=function(n){return uG(uG(Y9(this,n),21),87)},uZn.rd=function(n){return uG(uG(Y9(this,n),21),87)},uZn.fc=function(n){return uG(uG(twn(this,n),21),87)},uZn.sd=function(n){return uG(uG(twn(this,n),21),87)},uZn.mc=function(n){return F$(n,277)?UQ(uG(n,277)):(hZ(),new mx(uG(n,87)))},uZn.Zb=function(){return this.f||(this.f=F$(this.c,139)?new $K(this,uG(this.c,139)):F$(this.c,133)?new NK(this,uG(this.c,133)):new OE(this,this.c))},uZn.pc=function(n,t){return F$(t,277)?new TN(this,n,uG(t,277)):new AK(this,n,uG(t,87))},zW(AZn,"AbstractSortedSetMultimap",1723),sDn(1724,1723,NZn),uZn.Zb=function(){return uG(uG(this.f||(this.f=F$(this.c,139)?new $K(this,uG(this.c,139)):F$(this.c,133)?new NK(this,uG(this.c,133)):new OE(this,this.c)),133),139)},uZn.ec=function(){return uG(uG(this.i||(this.i=F$(this.c,139)?new ME(this,uG(this.c,139)):F$(this.c,133)?new yE(this,uG(this.c,133)):new RD(this,this.c)),87),277)},uZn.bc=function(){return F$(this.c,139)?new ME(this,uG(this.c,139)):F$(this.c,133)?new yE(this,uG(this.c,133)):new RD(this,this.c)},zW(AZn,"AbstractSortedKeySortedSetMultimap",1724),sDn(2109,1,{2046:1}),uZn.Fb=function(n){return fSn(this,n)},uZn.Hb=function(){return tfn(this.g||(this.g=new nb(this)))},uZn.Ib=function(){return KPn(this.f||(this.f=new VD(this)))},zW(AZn,"AbstractTable",2109),sDn(679,KZn,FZn,nb),uZn.$b=function(){UM()},uZn.Hc=function(n){var t,e;return!!F$(n,479)&&(t=uG(n,697),!!(e=uG(Xwn(BW(this.a),GA(t.c.e,t.b)),85))&&Gwn(e.vc(),new FE(GA(t.c.c,t.a),I7(t.c,t.b,t.a))))},uZn.Kc=function(){return CZ(this.a)},uZn.Mc=function(n){var t,e;return!!F$(n,479)&&(t=uG(n,697),!!(e=uG(Xwn(BW(this.a),GA(t.c.e,t.b)),85))&&qwn(e.vc(),new FE(GA(t.c.c,t.a),I7(t.c,t.b,t.a))))},uZn.gc=function(){return $q(this.a)},uZn.Nc=function(){return u6(this.a)},zW(AZn,"AbstractTable/CellSet",679),sDn(2025,31,RZn,tb),uZn.$b=function(){UM()},uZn.Hc=function(n){return QPn(this.a,n)},uZn.Kc=function(){return IZ(this.a)},uZn.gc=function(){return $q(this.a)},uZn.Nc=function(){return y4(this.a)},zW(AZn,"AbstractTable/Values",2025),sDn(1697,1696,NZn),zW(AZn,"ArrayListMultimapGwtSerializationDependencies",1697),sDn(520,1697,NZn,rT,L2),uZn.hc=function(){return new R7(this.a)},uZn.a=0,zW(AZn,"ArrayListMultimap",520),sDn(678,2109,{678:1,2046:1,3:1},f$n),zW(AZn,"ArrayTable",678),sDn(2021,399,LZn,WD),uZn.Xb=function(n){return new Ofn(this.a,n)},zW(AZn,"ArrayTable/1",2021),sDn(2022,1,{},Xl),uZn.td=function(n){return new Ofn(this.a,n)},zW(AZn,"ArrayTable/1methodref$getCell$Type",2022),sDn(2110,1,{697:1}),uZn.Fb=function(n){var t;return n===this||!!F$(n,479)&&(t=uG(n,697),xQ(GA(this.c.e,this.b),GA(t.c.e,t.b))&&xQ(GA(this.c.c,this.a),GA(t.c.c,t.a))&&xQ(I7(this.c,this.b,this.a),I7(t.c,t.b,t.a)))},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[GA(this.c.e,this.b),GA(this.c.c,this.a),I7(this.c,this.b,this.a)]))},uZn.Ib=function(){return"("+GA(this.c.e,this.b)+","+GA(this.c.c,this.a)+")="+I7(this.c,this.b,this.a)},zW(AZn,"Tables/AbstractCell",2110),sDn(479,2110,{479:1,697:1},Ofn),uZn.a=0,uZn.b=0,uZn.d=0,zW(AZn,"ArrayTable/2",479),sDn(2024,1,{},zl),uZn.td=function(n){return Qtn(this.a,n)},zW(AZn,"ArrayTable/2methodref$getValue$Type",2024),sDn(2023,399,LZn,QD),uZn.Xb=function(n){return Qtn(this.a,n)},zW(AZn,"ArrayTable/3",2023),sDn(2077,2065,xZn),uZn.$b=function(){Hq(this.kc())},uZn.vc=function(){return new wb(this)},uZn.lc=function(){return new MY(this.kc(),this.gc())},zW(AZn,"Maps/IteratorBasedAbstractMap",2077),sDn(842,2077,xZn),uZn.$b=function(){throw hv(new Kv)},uZn._b=function(n){return Ej(this.c,n)},uZn.kc=function(){return new JD(this,this.c.b.c.gc())},uZn.lc=function(){return Dq(this.c.b.c.gc(),16,new Vl(this))},uZn.xc=function(n){var t;return(t=uG(W_(this.c,n),17))?this.vd(t.a):null},uZn.dc=function(){return this.c.b.c.dc()},uZn.ec=function(){return Tz(this.c)},uZn.zc=function(n,t){var e;if(!(e=uG(W_(this.c,n),17)))throw hv(new vM(this.ud()+" "+n+" not in "+Tz(this.c)));return this.wd(e.a,t)},uZn.Bc=function(n){throw hv(new Kv)},uZn.gc=function(){return this.c.b.c.gc()},zW(AZn,"ArrayTable/ArrayMap",842),sDn(2020,1,{},Vl),uZn.td=function(n){return qW(this.a,n)},zW(AZn,"ArrayTable/ArrayMap/0methodref$getEntry$Type",2020),sDn(2018,358,GZn,TE),uZn.ld=function(){return uR(this.a,this.b)},uZn.md=function(){return this.a.vd(this.b)},uZn.nd=function(n){return this.a.wd(this.b,n)},uZn.b=0,zW(AZn,"ArrayTable/ArrayMap/1",2018),sDn(2019,399,LZn,JD),uZn.Xb=function(n){return qW(this.a,n)},zW(AZn,"ArrayTable/ArrayMap/2",2019),sDn(2017,842,xZn,yV),uZn.ud=function(){return"Column"},uZn.vd=function(n){return I7(this.b,this.a,n)},uZn.wd=function(n,t){return Hhn(this.b,this.a,n,t)},uZn.a=0,zW(AZn,"ArrayTable/Row",2017),sDn(843,842,xZn,VD),uZn.vd=function(n){return new yV(this.a,n)},uZn.zc=function(n,t){return uG(t,85),GM()},uZn.wd=function(n,t){return uG(t,85),qM()},uZn.ud=function(){return"Row"},zW(AZn,"ArrayTable/RowMap",843),sDn(1157,1,WZn,jE),uZn.Ad=function(n){return!!(-262&this.a.yd()&n)},uZn.yd=function(){return-262&this.a.yd()},uZn.zd=function(){return this.a.zd()},uZn.Nb=function(n){this.a.Nb(new SE(n,this.b))},uZn.Bd=function(n){return this.a.Bd(new EE(n,this.b))},zW(AZn,"CollectSpliterators/1",1157),sDn(1158,1,QZn,EE),uZn.Cd=function(n){this.a.Cd(this.b.Kb(n))},zW(AZn,"CollectSpliterators/1/lambda$0$Type",1158),sDn(1159,1,QZn,SE),uZn.Cd=function(n){this.a.Cd(this.b.Kb(n))},zW(AZn,"CollectSpliterators/1/lambda$1$Type",1159),sDn(1154,1,WZn,x_),uZn.Ad=function(n){return!!((16464|this.b)&n)},uZn.yd=function(){return 16464|this.b},uZn.zd=function(){return this.a.zd()},uZn.Nb=function(n){this.a.Qe(new CE(n,this.c))},uZn.Bd=function(n){return this.a.Re(new PE(n,this.c))},uZn.b=0,zW(AZn,"CollectSpliterators/1WithCharacteristics",1154),sDn(1155,1,JZn,PE),uZn.Dd=function(n){this.a.Cd(this.b.td(n))},zW(AZn,"CollectSpliterators/1WithCharacteristics/lambda$0$Type",1155),sDn(1156,1,JZn,CE),uZn.Dd=function(n){this.a.Cd(this.b.td(n))},zW(AZn,"CollectSpliterators/1WithCharacteristics/lambda$1$Type",1156),sDn(1150,1,WZn),uZn.Ad=function(n){return!!(this.a&n)},uZn.yd=function(){return this.a},uZn.zd=function(){return this.e&&(this.b=g$(this.b,this.e.zd())),g$(this.b,0)},uZn.Nb=function(n){this.e&&(this.e.Nb(n),this.e=null),this.c.Nb(new IE(this,n)),this.b=0},uZn.Bd=function(n){for(;;){if(this.e&&this.e.Bd(n))return HA(this.b,YZn)&&(this.b=$gn(this.b,1)),!0;if(this.e=null,!this.c.Bd(new eb(this)))return!1}},uZn.a=0,uZn.b=0,zW(AZn,"CollectSpliterators/FlatMapSpliterator",1150),sDn(1152,1,QZn,eb),uZn.Cd=function(n){M_(this.a,n)},zW(AZn,"CollectSpliterators/FlatMapSpliterator/lambda$0$Type",1152),sDn(1153,1,QZn,IE),uZn.Cd=function(n){fY(this.a,this.b,n)},zW(AZn,"CollectSpliterators/FlatMapSpliterator/lambda$1$Type",1153),sDn(1151,1150,WZn,T6),zW(AZn,"CollectSpliterators/FlatMapSpliteratorOfObject",1151),sDn(253,1,ZZn),uZn.Fd=function(n){return this.Ed(uG(n,253))},uZn.Ed=function(n){var t;return n==(my(),Tat)?1:n==(py(),Mat)?-1:(qG(),0!=(t=Dun(this.a,n.a))?t:F$(this,526)==F$(n,526)?0:F$(this,526)?1:-1)},uZn.Id=function(){return this.a},uZn.Fb=function(n){return pTn(this,n)},zW(AZn,"Cut",253),sDn(1823,253,ZZn,ky),uZn.Ed=function(n){return n==this?0:1},uZn.Gd=function(n){throw hv(new Av)},uZn.Hd=function(n){n.a+="+\u221e)"},uZn.Id=function(){throw hv(new kM(n1n))},uZn.Hb=function(){return bS(),Avn(this)},uZn.Jd=function(n){return!1},uZn.Ib=function(){return"+\u221e"},zW(AZn,"Cut/AboveAll",1823),sDn(526,253,{253:1,526:1,3:1,34:1},bx),uZn.Gd=function(n){QA((n.a+="(",n),this.a)},uZn.Hd=function(n){jQ(QA(n,this.a),93)},uZn.Hb=function(){return~Hon(this.a)},uZn.Jd=function(n){return qG(),Dun(this.a,n)<0},uZn.Ib=function(){return"/"+this.a+"\\"},zW(AZn,"Cut/AboveValue",526),sDn(1822,253,ZZn,vy),uZn.Ed=function(n){return n==this?0:-1},uZn.Gd=function(n){n.a+="(-\u221e"},uZn.Hd=function(n){throw hv(new Av)},uZn.Id=function(){throw hv(new kM(n1n))},uZn.Hb=function(){return bS(),Avn(this)},uZn.Jd=function(n){return!0},uZn.Ib=function(){return"-\u221e"},zW(AZn,"Cut/BelowAll",1822),sDn(1824,253,ZZn,wx),uZn.Gd=function(n){QA((n.a+="[",n),this.a)},uZn.Hd=function(n){jQ(QA(n,this.a),41)},uZn.Hb=function(){return Hon(this.a)},uZn.Jd=function(n){return qG(),Dun(this.a,n)<=0},uZn.Ib=function(){return"\\"+this.a+"/"},zW(AZn,"Cut/BelowValue",1824),sDn(547,1,t1n),uZn.Jc=function(n){z8(this,n)},uZn.Ib=function(){return rgn(uG(bZ(this,"use Optional.orNull() instead of Optional.or(null)"),20).Kc())},zW(AZn,"FluentIterable",547),sDn(442,547,t1n,iN),uZn.Kc=function(){return new Fz(ix(this.a.Kc(),new h))},zW(AZn,"FluentIterable/2",442),sDn(1059,547,t1n,rN),uZn.Kc=function(){return OV(this)},zW(AZn,"FluentIterable/3",1059),sDn(724,399,LZn,YD),uZn.Xb=function(n){return this.a[n].Kc()},zW(AZn,"FluentIterable/3/1",724),sDn(2070,1,{}),uZn.Ib=function(){return cpn(this.Kd().b)},zW(AZn,"ForwardingObject",2070),sDn(2071,2070,e1n),uZn.Kd=function(){return this.Ld()},uZn.Jc=function(n){z8(this,n)},uZn.Lc=function(){return this.Oc()},uZn.Nc=function(){return new h3(this,0)},uZn.Oc=function(){return new fX(null,this.Nc())},uZn.Fc=function(n){return this.Ld(),Rj()},uZn.Gc=function(n){return this.Ld(),Kj()},uZn.$b=function(){this.Ld(),Fj()},uZn.Hc=function(n){return this.Ld().Hc(n)},uZn.Ic=function(n){return this.Ld().Ic(n)},uZn.dc=function(){return this.Ld().b.dc()},uZn.Kc=function(){return this.Ld().Kc()},uZn.Mc=function(n){return this.Ld(),_j()},uZn.gc=function(){return this.Ld().b.gc()},uZn.Pc=function(){return this.Ld().Pc()},uZn.Qc=function(n){return this.Ld().Qc(n)},zW(AZn,"ForwardingCollection",2071),sDn(2078,31,i1n),uZn.Kc=function(){return this.Od()},uZn.Fc=function(n){throw hv(new Kv)},uZn.Gc=function(n){throw hv(new Kv)},uZn.Md=function(){return this.c||(this.c=this.Nd())},uZn.$b=function(){throw hv(new Kv)},uZn.Hc=function(n){return null!=n&&Wpn(this,n,!1)},uZn.Nd=function(){switch(this.gc()){case 0:return ZW(),ZW(),jat;case 1:return ZW(),new Uq(WW(this.Od().Pb()));default:return new TV(this,this.Pc())}},uZn.Mc=function(n){throw hv(new Kv)},zW(AZn,"ImmutableCollection",2078),sDn(727,2078,i1n,jv),uZn.Kc=function(){return jtn(this.a.Kc())},uZn.Hc=function(n){return null!=n&&this.a.Hc(n)},uZn.Ic=function(n){return this.a.Ic(n)},uZn.dc=function(){return this.a.dc()},uZn.Od=function(){return jtn(this.a.Kc())},uZn.gc=function(){return this.a.gc()},uZn.Pc=function(){return this.a.Pc()},uZn.Qc=function(n){return this.a.Qc(n)},uZn.Ib=function(){return cpn(this.a)},zW(AZn,"ForwardingImmutableCollection",727),sDn(307,2078,r1n),uZn.Kc=function(){return this.Od()},uZn.ed=function(){return this.Pd(0)},uZn.fd=function(n){return this.Pd(n)},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.kd=function(n,t){return this.Qd(n,t)},uZn.bd=function(n,t){throw hv(new Kv)},uZn.cd=function(n,t){throw hv(new Kv)},uZn.Md=function(){return this},uZn.Fb=function(n){return RDn(this,n)},uZn.Hb=function(){return Xsn(this)},uZn.dd=function(n){return null==n?-1:uTn(this,n)},uZn.Od=function(){return this.Pd(0)},uZn.Pd=function(n){return oR(this,n)},uZn.gd=function(n){throw hv(new Kv)},uZn.hd=function(n,t){throw hv(new Kv)},uZn.Qd=function(n,t){return Dwn(new C2(new qE(this),n,t))},zW(AZn,"ImmutableList",307),sDn(2105,307,r1n),uZn.Kc=function(){return jtn(this.Rd().Kc())},uZn.kd=function(n,t){return Dwn(this.Rd().kd(n,t))},uZn.Hc=function(n){return null!=n&&this.Rd().Hc(n)},uZn.Ic=function(n){return this.Rd().Ic(n)},uZn.Fb=function(n){return udn(this.Rd(),n)},uZn.Xb=function(n){return GA(this,n)},uZn.Hb=function(){return Hon(this.Rd())},uZn.dd=function(n){return this.Rd().dd(n)},uZn.dc=function(){return this.Rd().dc()},uZn.Od=function(){return jtn(this.Rd().Kc())},uZn.gc=function(){return this.Rd().gc()},uZn.Qd=function(n,t){return Dwn(this.Rd().kd(n,t))},uZn.Pc=function(){return this.Rd().Qc(Inn(dat,EZn,1,this.Rd().gc(),5,1))},uZn.Qc=function(n){return this.Rd().Qc(n)},uZn.Ib=function(){return cpn(this.Rd())},zW(AZn,"ForwardingImmutableList",2105),sDn(729,1,a1n),uZn.vc=function(){return Mz(this)},uZn.wc=function(n){Yun(this,n)},uZn.ec=function(){return Tz(this)},uZn.yc=function(n,t,e){return Jgn(this,n,t,e)},uZn.Cc=function(){return this.Vd()},uZn.$b=function(){throw hv(new Kv)},uZn._b=function(n){return null!=this.xc(n)},uZn.uc=function(n){return this.Vd().Hc(n)},uZn.Td=function(){return new Ev(this)},uZn.Ud=function(){return new Sv(this)},uZn.Fb=function(n){return Wln(this,n)},uZn.Hb=function(){return Mz(this).Hb()},uZn.dc=function(){return 0==this.gc()},uZn.zc=function(n,t){return BM()},uZn.Bc=function(n){throw hv(new Kv)},uZn.Ib=function(){return QIn(this)},uZn.Vd=function(){return this.e?this.e:this.e=this.Ud()},uZn.c=null,uZn.d=null,uZn.e=null,zW(AZn,"ImmutableMap",729),sDn(730,729,a1n),uZn._b=function(n){return Ej(this,n)},uZn.uc=function(n){return iS(this.b,n)},uZn.Sd=function(){return $wn(new Zl(this))},uZn.Td=function(){return $wn(SJ(this.b))},uZn.Ud=function(){return sB(),new jv(jJ(this.b))},uZn.Fb=function(n){return rS(this.b,n)},uZn.xc=function(n){return W_(this,n)},uZn.Hb=function(){return Hon(this.b.c)},uZn.dc=function(){return this.b.c.dc()},uZn.gc=function(){return this.b.c.gc()},uZn.Ib=function(){return cpn(this.b.c)},zW(AZn,"ForwardingImmutableMap",730),sDn(2072,2071,o1n),uZn.Kd=function(){return this.Wd()},uZn.Ld=function(){return this.Wd()},uZn.Nc=function(){return new h3(this,1)},uZn.Fb=function(n){return n===this||this.Wd().Fb(n)},uZn.Hb=function(){return this.Wd().Hb()},zW(AZn,"ForwardingSet",2072),sDn(1085,2072,o1n,Zl),uZn.Kd=function(){return EJ(this.a.b)},uZn.Ld=function(){return EJ(this.a.b)},uZn.Hc=function(n){if(F$(n,44)&&null==uG(n,44).ld())return!1;try{return eS(EJ(this.a.b),n)}catch(t){if(F$(t=Ehn(t),212))return!1;throw hv(t)}},uZn.Wd=function(){return EJ(this.a.b)},uZn.Qc=function(n){var t;return t=YZ(EJ(this.a.b),n),EJ(this.a.b).b.gc()<t.length&&uQ(t,EJ(this.a.b).b.gc(),null),t},zW(AZn,"ForwardingImmutableMap/1",1085),sDn(2079,2078,u1n),uZn.Kc=function(){return this.Od()},uZn.Nc=function(){return new h3(this,1)},uZn.Fb=function(n){return OOn(this,n)},uZn.Hb=function(){return Jon(this)},zW(AZn,"ImmutableSet",2079),sDn(719,2079,u1n),uZn.Kc=function(){return jtn(new Gw(this.a.b.Kc()))},uZn.Hc=function(n){return null!=n&&ZE(this.a,n)},uZn.Ic=function(n){return nS(this.a,n)},uZn.Hb=function(){return Hon(this.a.b)},uZn.dc=function(){return this.a.b.dc()},uZn.Od=function(){return jtn(new Gw(this.a.b.Kc()))},uZn.gc=function(){return this.a.b.gc()},uZn.Pc=function(){return this.a.b.Pc()},uZn.Qc=function(n){return tS(this.a,n)},uZn.Ib=function(){return cpn(this.a.b)},zW(AZn,"ForwardingImmutableSet",719),sDn(2073,2072,s1n),uZn.Kd=function(){return this.b},uZn.Ld=function(){return this.b},uZn.Wd=function(){return this.b},uZn.Nc=function(){return new GP(this)},zW(AZn,"ForwardingSortedSet",2073),sDn(543,2077,a1n,dMn),uZn.Ac=function(n){xun(this,n)},uZn.Cc=function(){return new o$(this.d||(this.d=new rb(this)))},uZn.$b=function(){n9(this)},uZn._b=function(n){return!!lun(this,n,pz(Ngn(h1n,PJ(pz(Ngn(null==n?0:Hon(n),f1n)),15))))},uZn.uc=function(n){return lrn(this,n)},uZn.kc=function(){return new ZD(this,this)},uZn.wc=function(n){T0(this,n)},uZn.xc=function(n){return dcn(this,n)},uZn.ec=function(){return new u$(this)},uZn.zc=function(n,t){return yHn(this,n,t)},uZn.Bc=function(n){var t;return(t=lun(this,n,pz(Ngn(h1n,PJ(pz(Ngn(null==n?0:Hon(n),f1n)),15)))))?(yRn(this,t),t.e=null,t.c=null,t.i):null},uZn.gc=function(){return this.i},uZn.xd=function(){return new o$(this.d||(this.d=new rb(this)))},uZn.f=0,uZn.g=0,uZn.i=0,zW(AZn,"HashBiMap",543),sDn(544,1,$Zn),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return C6(this)},uZn.Pb=function(){var n;if(!C6(this))throw hv(new Bv);return n=uG(nJ(this.c),303),this.c=n.c,this.f=n,--this.d,this.Xd(n)},uZn.Qb=function(){if(this.e.g!=this.b)throw hv(new Fv);if(!this.f)throw hv(new kM(PZn));yRn(this.e,this.f),this.b=this.e.g,this.f=null},uZn.b=0,uZn.d=0,uZn.f=null,zW(AZn,"HashBiMap/Itr",544),sDn(1023,544,$Zn,ZD),uZn.Xd=function(n){return new LE(this,n)},zW(AZn,"HashBiMap/1",1023),sDn(w1n,358,GZn,LE),uZn.ld=function(){return this.a.g},uZn.md=function(){return this.a.i},uZn.nd=function(n){var t,e,i;return e=this.a.i,(i=pz(Ngn(h1n,PJ(pz(Ngn(null==n?0:Hon(n),f1n)),15))))==this.a.f&&(xA(n)===xA(e)||null!=n&&udn(n,e))?n:(Dhn(!bun(this.b.a,n,i),n),yRn(this.b.a,this.a),t=new fJ(this.a.g,this.a.a,n,i),HLn(this.b.a,t,this.a),this.a.e=null,this.a.c=null,this.b.b=this.b.a.g,this.b.f==this.a&&(this.b.f=t),this.a=t,e)},zW(AZn,"HashBiMap/1/MapEntry",w1n),sDn(246,358,{358:1,246:1,3:1,44:1},FE),uZn.ld=function(){return this.g},uZn.md=function(){return this.i},uZn.nd=function(n){throw hv(new Kv)},zW(AZn,"ImmutableEntry",246),sDn(303,246,{358:1,303:1,246:1,3:1,44:1},fJ),uZn.a=0,uZn.f=0;var Pat,Cat=zW(AZn,"HashBiMap/BiEntry",303);sDn(619,2077,a1n,rb),uZn.Ac=function(n){xun(this,n)},uZn.Cc=function(){return new u$(this.a)},uZn.$b=function(){n9(this.a)},uZn._b=function(n){return lrn(this.a,n)},uZn.kc=function(){return new nx(this,this.a)},uZn.wc=function(n){WW(n),T0(this.a,new cb(n))},uZn.xc=function(n){return kan(this,n)},uZn.ec=function(){return new o$(this)},uZn.zc=function(n,t){return FUn(this.a,n,t,!1)},uZn.Bc=function(n){var t;return(t=bun(this.a,n,pz(Ngn(h1n,PJ(pz(Ngn(null==n?0:Hon(n),f1n)),15)))))?(yRn(this.a,t),t.e=null,t.c=null,t.g):null},uZn.gc=function(){return this.a.i},uZn.xd=function(){return new u$(this.a)},zW(AZn,"HashBiMap/Inverse",619),sDn(1020,544,$Zn,nx),uZn.Xd=function(n){return new NE(this,n)},zW(AZn,"HashBiMap/Inverse/1",1020),sDn(1021,358,GZn,NE),uZn.ld=function(){return this.a.i},uZn.md=function(){return this.a.g},uZn.nd=function(n){var t,e,i;return i=this.a.g,(t=pz(Ngn(h1n,PJ(pz(Ngn(null==n?0:Hon(n),f1n)),15))))==this.a.a&&(xA(n)===xA(i)||null!=n&&udn(n,i))?n:(Dhn(!lun(this.b.a.a,n,t),n),yRn(this.b.a.a,this.a),e=new fJ(n,t,this.a.i,this.a.f),this.a=e,HLn(this.b.a.a,e,null),this.b.b=this.b.a.a.g,i)},zW(AZn,"HashBiMap/Inverse/1/InverseEntry",1021),sDn(620,542,FZn,o$),uZn.Kc=function(){return new Iy(this.a.a)},uZn.Mc=function(n){var t;return!!(t=bun(this.a.a,n,pz(Ngn(h1n,PJ(pz(Ngn(null==n?0:Hon(n),f1n)),15)))))&&(yRn(this.a.a,t),!0)},zW(AZn,"HashBiMap/Inverse/InverseKeySet",620),sDn(1019,544,$Zn,Iy),uZn.Xd=function(n){return n.i},zW(AZn,"HashBiMap/Inverse/InverseKeySet/1",1019),sDn(1022,1,{},cb),uZn.Yd=function(n,t){Mv(this.a,n,t)},zW(AZn,"HashBiMap/Inverse/lambda$0$Type",1022),sDn(618,542,FZn,u$),uZn.Kc=function(){return new Oy(this.a)},uZn.Mc=function(n){var t;return!!(t=lun(this.a,n,pz(Ngn(h1n,PJ(pz(Ngn(null==n?0:Hon(n),f1n)),15)))))&&(yRn(this.a,t),t.e=null,t.c=null,!0)},zW(AZn,"HashBiMap/KeySet",618),sDn(1018,544,$Zn,Oy),uZn.Xd=function(n){return n.g},zW(AZn,"HashBiMap/KeySet/1",1018),sDn(1123,627,NZn),zW(AZn,"HashMultimapGwtSerializationDependencies",1123),sDn(271,1123,NZn,K1),uZn.hc=function(){return new Dj(orn(this.a))},uZn.pd=function(){return new Dj(orn(this.a))},uZn.a=2,zW(AZn,"HashMultimap",271),sDn(2097,307,r1n),uZn.Hc=function(n){return this.Zd().Hc(n)},uZn.dc=function(){return this.Zd().dc()},uZn.gc=function(){return this.Zd().gc()},zW(AZn,"ImmutableAsList",2097),sDn(2030,730,a1n),uZn.Vd=function(){return sB(),new KM(this.a)},uZn.Cc=function(){return sB(),new KM(this.a)},uZn.xd=function(){return sB(),new KM(this.a)},zW(AZn,"ImmutableBiMap",2030),sDn(2075,1,{}),zW(AZn,"ImmutableCollection/Builder",2075),sDn(1035,719,u1n,Ay),zW(AZn,"ImmutableEnumSet",1035),sDn(980,399,LZn,$_),uZn.Xb=function(n){return this.a.Xb(n)},zW(AZn,"ImmutableList/1",980),sDn(979,2075,{},UF),zW(AZn,"ImmutableList/Builder",979),sDn(623,204,OZn,ab),uZn.Ob=function(){return this.a.Ob()},uZn.Pb=function(){return uG(this.a.Pb(),44).ld()},zW(AZn,"ImmutableMap/1",623),sDn(1054,1,{},u),uZn.Kb=function(n){return uG(n,44).ld()},zW(AZn,"ImmutableMap/2methodref$getKey$Type",1054),sDn(1053,1,{},GF),zW(AZn,"ImmutableMap/Builder",1053),sDn(2098,2079,u1n),uZn.Md=function(){return this.b||(this.b=new Pv(this))},uZn.Nd=function(){return new TV(this,oTn(this,Inn(dat,EZn,1,this.gc(),5,1)))},zW(AZn,"ImmutableSet/CachingAsList",2098),sDn(2099,2098,u1n),uZn.Kc=function(){return new ab(Mz(this.a).Od())},uZn.Nd=function(){return new Pv(this)},uZn.Jc=function(n){var t,e;for(WW(n),e=this.gc(),t=0;t<e;t++)n.Cd(uG(Mz(this.a).Md().Xb(t),44).ld())},uZn.Od=function(){return oR(this.b||(this.b=new Pv(this)),0)},uZn.Nc=function(){return Dq(this.gc(),1296,new ub(this))},zW(AZn,"IndexedImmutableSet",2099),sDn(1230,2099,u1n,Ev),uZn.Kc=function(){return new ab(Mz(this.a).Od())},uZn.Hc=function(n){return this.a._b(n)},uZn.Jc=function(n){WW(n),Yun(this.a,new ob(n))},uZn.Od=function(){return new ab(Mz(this.a).Od())},uZn.gc=function(){return this.a.gc()},uZn.Nc=function(){return JU(Mz(this.a).Nc(),new u)},zW(AZn,"ImmutableMapKeySet",1230),sDn(1231,1,{},ob),uZn.Yd=function(n,t){sB(),this.a.Cd(n)},zW(AZn,"ImmutableMapKeySet/lambda$0$Type",1231),sDn(1227,2078,i1n,Sv),uZn.Kc=function(){return new VG(this)},uZn.Md=function(){return new s$(this,Mz(this.a).Md())},uZn.Hc=function(n){return null!=n&&hSn(new VG(this),n)},uZn.Od=function(){return new VG(this)},uZn.gc=function(){return this.a.gc()},uZn.Nc=function(){return JU(Mz(this.a).Nc(),new s)},zW(AZn,"ImmutableMapValues",1227),sDn(1228,1,{},s),uZn.Kb=function(n){return uG(n,44).md()},zW(AZn,"ImmutableMapValues/0methodref$getValue$Type",1228),sDn(637,204,OZn,VG),uZn.Ob=function(){return this.a.Ob()},uZn.Pb=function(){return uG(this.a.Pb(),44).md()},zW(AZn,"ImmutableMapValues/1",637),sDn(1229,2097,r1n,s$),uZn.Zd=function(){return this.a},uZn.Xb=function(n){return uG(this.b.Xb(n),44).md()},zW(AZn,"ImmutableMapValues/2",1229),sDn(1232,1,{},ub),uZn.td=function(n){return rQ(this.a,n)},zW(AZn,"IndexedImmutableSet/0methodref$get$Type",1232),sDn(638,2097,r1n,Pv),uZn.Zd=function(){return this.a},uZn.Xb=function(n){return rQ(this.a,n)},uZn.gc=function(){return this.a.a.gc()},zW(AZn,"IndexedImmutableSet/1",638),sDn(43,1,{},h),uZn.Kb=function(n){return uG(n,20).Kc()},uZn.Fb=function(n){return this===n},zW(AZn,"Iterables/10",43),sDn(1055,547,t1n,WG),uZn.Jc=function(n){WW(n),this.b.Jc(new $E(this.a,n))},uZn.Kc=function(){return gN(this)},zW(AZn,"Iterables/4",1055),sDn(1056,1,QZn,$E),uZn.Cd=function(n){mC(this.b,this.a,n)},zW(AZn,"Iterables/4/lambda$0$Type",1056),sDn(1057,547,t1n,QG),uZn.Jc=function(n){WW(n),z8(this.a,new xE(n,this.b))},uZn.Kc=function(){return ix(new DD(this.a),this.b)},zW(AZn,"Iterables/5",1057),sDn(1058,1,QZn,xE),uZn.Cd=function(n){this.a.Cd(oN(n))},zW(AZn,"Iterables/5/lambda$0$Type",1058),sDn(1087,204,OZn,sb),uZn.Ob=function(){return this.a.Ob()},uZn.Pb=function(){return this.a.Pb()},zW(AZn,"Iterators/1",1087),sDn(1088,713,OZn,DE),uZn.Yb=function(){for(var n;this.b.Ob();)if(n=this.b.Pb(),this.a.Lb(n))return n;return this.e=2,null},zW(AZn,"Iterators/5",1088),sDn(497,1,$Zn),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.b.Ob()},uZn.Pb=function(){return this.$d(this.b.Pb())},uZn.Qb=function(){this.b.Qb()},zW(AZn,"TransformedIterator",497),sDn(1089,497,$Zn,tx),uZn.$d=function(n){return this.a.Kb(n)},zW(AZn,"Iterators/6",1089),sDn(732,204,OZn,hb),uZn.Ob=function(){return!this.a},uZn.Pb=function(){if(this.a)throw hv(new Bv);return this.a=!0,this.b},uZn.a=!1,zW(AZn,"Iterators/9",732),sDn(1086,399,LZn,NX),uZn.Xb=function(n){return this.a[this.b+n]},uZn.b=0,zW(AZn,"Iterators/ArrayItr",1086),sDn(38,1,{38:1,51:1},Fz),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return hDn(this)},uZn.Pb=function(){return N9(this)},uZn.Qb=function(){if(!this.c)throw hv(new kM(PZn));this.c.Qb(),this.c=null},zW(AZn,"Iterators/ConcatenatedIterator",38),sDn(22,1,{3:1,34:1,22:1}),uZn.Fd=function(n){return cM(this,uG(n,22))},uZn.Fb=function(n){return this===n},uZn.Hb=function(){return xx(this)},uZn.Ib=function(){return MR(this)},uZn.g=0;var Iat,Oat=zW(kZn,"Enum",22);sDn(549,22,{549:1,3:1,34:1,22:1,51:1},X$),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return!1},uZn.Pb=function(){throw hv(new Bv)},uZn.Qb=function(){IB(!1)};var Aat,Lat=_cn(AZn,"Iterators/EmptyModifiableIterator",549,Oat,sW,cR);sDn(1907,627,NZn),zW(AZn,"LinkedHashMultimapGwtSerializationDependencies",1907),sDn(1908,1907,NZn,zbn),uZn.hc=function(){return new dx(orn(this.b))},uZn.$b=function(){ban(this),Tv(this.a,this.a)},uZn.pd=function(){return new dx(orn(this.b))},uZn.ic=function(n){return new Uln(this,n,this.b)},uZn.kc=function(){return new YW(this)},uZn.lc=function(){return new h3(uG(this.g||(this.g=new Ty(this)),21),17)},uZn.ec=function(){return this.i||(this.i=new RD(this,this.c))},uZn.nc=function(){return new $y(new YW(this))},uZn.oc=function(){return JU(new h3(uG(this.g||(this.g=new Ty(this)),21),17),new f)},uZn.b=2,zW(AZn,"LinkedHashMultimap",1908),sDn(1911,1,{},f),uZn.Kb=function(n){return uG(n,44).md()},zW(AZn,"LinkedHashMultimap/0methodref$getValue$Type",1911),sDn(834,1,$Zn,YW),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return Asn(this)},uZn.Ob=function(){return this.a!=this.b.a},uZn.Qb=function(){IB(!!this.c),S4(this.b,this.c.g,this.c.i),this.c=null},zW(AZn,"LinkedHashMultimap/1",834),sDn(227,246,{358:1,246:1,227:1,604:1,3:1,44:1},lJ),uZn._d=function(){return uG(nJ(this.f),604)},uZn.ae=function(n){this.c=n},uZn.be=function(n){this.f=n},uZn.d=0;var Nat,$at=zW(AZn,"LinkedHashMultimap/ValueEntry",227);sDn(1909,2068,{604:1,20:1,31:1,16:1,21:1},Uln),uZn.Fc=function(n){var t,e,i,r,c;for(t=(c=pz(Ngn(h1n,PJ(pz(Ngn(null==n?0:Hon(n),f1n)),15))))&this.b.length-1,e=r=this.b[t];e;e=e.a)if(e.d==c&&xQ(e.i,n))return!1;return i=new lJ(this.c,n,c,r),RM(this.d,i),i.f=this,this.d=i,Tv(uG(nJ(this.g.a.b),227),i),Tv(i,this.g.a),this.b[t]=i,++this.f,++this.e,aSn(this),!0},uZn.$b=function(){var n,t;for(FP(this.b,null),this.f=0,n=this.a;n!=this;n=n._d())t=uG(n,227),Tv(uG(nJ(t.b),227),uG(nJ(t.e),227));this.a=this,this.d=this,++this.e},uZn.Hc=function(n){var t,e;for(e=pz(Ngn(h1n,PJ(pz(Ngn(null==n?0:Hon(n),f1n)),15))),t=this.b[e&this.b.length-1];t;t=t.a)if(t.d==e&&xQ(t.i,n))return!0;return!1},uZn.Jc=function(n){var t;for(WW(n),t=this.a;t!=this;t=t._d())n.Cd(uG(t,227).i)},uZn._d=function(){return this.a},uZn.Kc=function(){return new IQ(this)},uZn.Mc=function(n){return hFn(this,n)},uZn.ae=function(n){this.d=n},uZn.be=function(n){this.a=n},uZn.gc=function(){return this.f},uZn.e=0,uZn.f=0,zW(AZn,"LinkedHashMultimap/ValueSet",1909),sDn(1910,1,$Zn,IQ),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return _q(this),this.b!=this.c},uZn.Pb=function(){var n,t;if(_q(this),this.b==this.c)throw hv(new Bv);return t=(n=uG(this.b,227)).i,this.d=n,this.b=uG(nJ(n.f),604),t},uZn.Qb=function(){_q(this),IB(!!this.d),hFn(this.c,this.d.i),this.a=this.c.e,this.d=null},uZn.a=0,zW(AZn,"LinkedHashMultimap/ValueSet/1",1910),sDn(780,2084,NZn,hL),uZn.Zb=function(){return this.f||(this.f=new UP(this))},uZn.Fb=function(n){return Aln(this,n)},uZn.cc=function(n){return new RE(this,n)},uZn.fc=function(n){return $nn(this,n)},uZn.$b=function(){nW(this)},uZn._b=function(n){return YE(this,n)},uZn.ac=function(){return new UP(this)},uZn.bc=function(){return new lb(this)},uZn.qc=function(n){return new RE(this,n)},uZn.dc=function(){return!this.a},uZn.rc=function(n){return $nn(this,n)},uZn.gc=function(){return this.d},uZn.c=0,uZn.d=0,zW(AZn,"LinkedListMultimap",780),sDn(56,31,m1n),uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.bd=function(n,t){throw hv(new TM("Add not supported on this list"))},uZn.Fc=function(n){return this.bd(this.gc(),n),!0},uZn.cd=function(n,t){var e,i,r;for(tJ(t),e=!1,r=t.Kc();r.Ob();)i=r.Pb(),this.bd(n++,i),e=!0;return e},uZn.$b=function(){this.ce(0,this.gc())},uZn.Fb=function(n){return PDn(this,n)},uZn.Hb=function(){return Zfn(this)},uZn.dd=function(n){return gan(this,n)},uZn.Kc=function(){return new Jw(this)},uZn.ed=function(){return this.fd(0)},uZn.fd=function(n){return new N4(this,n)},uZn.gd=function(n){throw hv(new TM("Remove not supported on this list"))},uZn.ce=function(n,t){var e,i;for(i=this.fd(n),e=n;e<t;++e)i.Pb(),i.Qb()},uZn.hd=function(n,t){throw hv(new TM("Set not supported on this list"))},uZn.kd=function(n,t){return new C2(this,n,t)},uZn.j=0,zW(DZn,"AbstractList",56),sDn(2062,56,m1n),uZn.bd=function(n,t){sR(this,n,t)},uZn.cd=function(n,t){return Xln(this,n,t)},uZn.Xb=function(n){return hyn(this,n)},uZn.Kc=function(){return this.fd(0)},uZn.gd=function(n){return Kjn(this,n)},uZn.hd=function(n,t){var e,i;e=this.fd(n);try{return i=e.Pb(),e.Wb(t),i}catch(r){throw F$(r=Ehn(r),112)?hv(new dM("Can't set element "+n)):hv(r)}},zW(DZn,"AbstractSequentialList",2062),sDn(646,2062,m1n,RE),uZn.fd=function(n){return rx(this,n)},uZn.gc=function(){var n;return(n=uG(cQ(this.a.b,this.b),260))?n.a:0},zW(AZn,"LinkedListMultimap/1",646),sDn(1316,2068,FZn,lb),uZn.Hc=function(n){return YE(this.a,n)},uZn.Kc=function(){return new $on(this.a)},uZn.Mc=function(n){return!$nn(this.a,n).a.dc()},uZn.gc=function(){return oS(this.a.b)},zW(AZn,"LinkedListMultimap/1KeySetImpl",1316),sDn(1315,1,$Zn,$on),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return Bq(this),!!this.c},uZn.Pb=function(){if(Bq(this),!this.c)throw hv(new Bv);this.a=this.c,FV(this.d,this.a.a);do{this.c=this.c.b}while(this.c&&!FV(this.d,this.c.a));return this.a.a},uZn.Qb=function(){Bq(this),IB(!!this.a),Hq(new Een(this.e,this.a.a)),this.a=null,this.b=this.e.c},uZn.b=0,zW(AZn,"LinkedListMultimap/DistinctKeyIterator",1315),sDn(260,1,{260:1},TZ),uZn.a=0,zW(AZn,"LinkedListMultimap/KeyList",260),sDn(511,358,{358:1,511:1,44:1},KE),uZn.ld=function(){return this.a},uZn.md=function(){return this.f},uZn.nd=function(n){var t;return t=this.f,this.f=n,t},zW(AZn,"LinkedListMultimap/Node",511),sDn(566,1,UZn,Een,EAn),uZn.Nb=function(n){SV(this,n)},uZn.Rb=function(n){this.e=JHn(this.f,this.b,n,this.c),++this.d,this.a=null},uZn.Ob=function(){return!!this.c},uZn.Sb=function(){return!!this.e},uZn.Pb=function(){return Ein(this)},uZn.Tb=function(){return this.d},uZn.Ub=function(){return jin(this)},uZn.Vb=function(){return this.d-1},uZn.Qb=function(){IB(!!this.a),this.a!=this.c?(this.e=this.a.e,--this.d):this.c=this.a.c,MRn(this.f,this.a),this.a=null},uZn.Wb=function(n){_D(!!this.a),this.a.f=n},uZn.d=0,zW(AZn,"LinkedListMultimap/ValueForKeyIterator",566),sDn(1031,56,m1n),uZn.bd=function(n,t){this.a.bd(n,t)},uZn.cd=function(n,t){return this.a.cd(n,t)},uZn.Hc=function(n){return this.a.Hc(n)},uZn.Xb=function(n){return this.a.Xb(n)},uZn.gd=function(n){return this.a.gd(n)},uZn.hd=function(n,t){return this.a.hd(n,t)},uZn.gc=function(){return this.a.gc()},zW(AZn,"Lists/AbstractListWrapper",1031),sDn(1032,1031,k1n),zW(AZn,"Lists/RandomAccessListWrapper",1032),sDn(1034,1032,k1n,qE),uZn.fd=function(n){return this.a.fd(n)},zW(AZn,"Lists/1",1034),sDn(441,56,{441:1,20:1,31:1,56:1,16:1,15:1},XE),uZn.bd=function(n,t){this.a.bd(KV(this,n),t)},uZn.$b=function(){this.a.$b()},uZn.Xb=function(n){return this.a.Xb(XW(this,n))},uZn.Kc=function(){return I3(this,0)},uZn.fd=function(n){return I3(this,n)},uZn.gd=function(n){return this.a.gd(XW(this,n))},uZn.ce=function(n,t){(G4(n,t,this.a.gc()),Spn(this.a.kd(KV(this,t),KV(this,n)))).$b()},uZn.hd=function(n,t){return this.a.hd(XW(this,n),t)},uZn.gc=function(){return this.a.gc()},uZn.kd=function(n,t){return G4(n,t,this.a.gc()),Spn(this.a.kd(KV(this,t),KV(this,n)))},zW(AZn,"Lists/ReverseList",441),sDn(1030,441,{441:1,20:1,31:1,56:1,16:1,15:1,59:1},Ly),zW(AZn,"Lists/RandomAccessReverseList",1030),sDn(1033,1,UZn,BE),uZn.Nb=function(n){SV(this,n)},uZn.Rb=function(n){this.c.Rb(n),this.c.Ub(),this.a=!1},uZn.Ob=function(){return this.c.Sb()},uZn.Sb=function(){return this.c.Ob()},uZn.Pb=function(){if(!this.c.Sb())throw hv(new Bv);return this.a=!0,this.c.Ub()},uZn.Tb=function(){return KV(this.b,this.c.Tb())},uZn.Ub=function(){if(!this.c.Ob())throw hv(new Bv);return this.a=!0,this.c.Pb()},uZn.Vb=function(){return KV(this.b,this.c.Tb())-1},uZn.Qb=function(){IB(this.a),this.c.Qb(),this.a=!1},uZn.Wb=function(n){_D(this.a),this.c.Wb(n)},uZn.a=!1,zW(AZn,"Lists/ReverseList/1",1033),sDn(440,497,$Zn,Ny),uZn.$d=function(n){return OP(n)},zW(AZn,"Maps/1",440),sDn(712,497,$Zn,$y),uZn.$d=function(n){return uG(n,44).md()},zW(AZn,"Maps/2",712),sDn(975,497,$Zn,ex),uZn.$d=function(n){return new FE(n,PL(this.a,n))},zW(AZn,"Maps/3",975),sDn(972,2069,FZn,wb),uZn.Jc=function(n){nk(this.a,n)},uZn.Kc=function(){return this.a.kc()},uZn.Rc=function(){return this.a},uZn.Nc=function(){return this.a.lc()},zW(AZn,"Maps/IteratorBasedAbstractMap/1",972),sDn(973,1,{},db),uZn.Yd=function(n,t){this.a.Cd(n)},zW(AZn,"Maps/KeySet/lambda$0$Type",973),sDn(971,31,RZn,zE),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return this.a.uc(n)},uZn.Jc=function(n){WW(n),this.a.wc(new bb(n))},uZn.dc=function(){return this.a.dc()},uZn.Kc=function(){return new $y(this.a.vc().Kc())},uZn.Mc=function(n){var t,e;try{return Wpn(this,n,!0)}catch(i){if(F$(i=Ehn(i),48)){for(e=this.a.vc().Kc();e.Ob();)if(xQ(n,(t=uG(e.Pb(),44)).md()))return this.a.Bc(t.ld()),!0;return!1}throw hv(i)}},uZn.gc=function(){return this.a.gc()},zW(AZn,"Maps/Values",971),sDn(974,1,{},bb),uZn.Yd=function(n,t){this.a.Cd(t)},zW(AZn,"Maps/Values/lambda$0$Type",974),sDn(752,2085,xZn,UP),uZn.xc=function(n){return this.a._b(n)?this.a.cc(n):null},uZn.Bc=function(n){return this.a._b(n)?this.a.fc(n):null},uZn.$b=function(){this.a.$b()},uZn._b=function(n){return this.a._b(n)},uZn.Ec=function(){return new gb(this)},uZn.Dc=function(){return this.Ec()},uZn.dc=function(){return this.a.dc()},uZn.ec=function(){return this.a.ec()},uZn.gc=function(){return this.a.ec().gc()},zW(AZn,"Multimaps/AsMap",752),sDn(1134,2069,FZn,gb),uZn.Kc=function(){return W$(this.a.a.ec(),new pb(this))},uZn.Rc=function(){return this.a},uZn.Mc=function(n){var t;return!!Amn(this,n)&&(t=uG(nJ(uG(n,44)),44),rM(this.a,t.ld()),!0)},zW(AZn,"Multimaps/AsMap/EntrySet",1134),sDn(1138,1,{},pb),uZn.Kb=function(n){return PL(this,n)},uZn.Fb=function(n){return this===n},zW(AZn,"Multimaps/AsMap/EntrySet/1",1138),sDn(552,2087,{552:1,849:1,20:1,31:1,16:1},mb),uZn.$b=function(){ban(this.a)},uZn.Hc=function(n){return jj(this.a,n)},uZn.Jc=function(n){WW(n),z8(RW(this.a),new kb(n))},uZn.Kc=function(){return new Ny(RW(this.a).a.kc())},uZn.gc=function(){return this.a.d},uZn.Nc=function(){return JU(RW(this.a).Nc(),new l)},zW(AZn,"Multimaps/Keys",552),sDn(1136,1,{},l),uZn.Kb=function(n){return uG(n,44).ld()},zW(AZn,"Multimaps/Keys/0methodref$getKey$Type",1136),sDn(1135,497,$Zn,Dy),uZn.$d=function(n){return new vb(uG(n,44))},zW(AZn,"Multimaps/Keys/1",1135),sDn(2088,1,{425:1}),uZn.Fb=function(n){var t;return!!F$(n,504)&&(t=uG(n,425),uG(this.a.md(),16).gc()==uG(t.a.md(),16).gc()&&xQ(this.a.ld(),t.a.ld()))},uZn.Hb=function(){var n;return(null==(n=this.a.ld())?0:Hon(n))^uG(this.a.md(),16).gc()},uZn.Ib=function(){var n,t;return t=ox(this.a.ld()),1==(n=uG(this.a.md(),16).gc())?t:t+" x "+n},zW(AZn,"Multisets/AbstractEntry",2088),sDn(504,2088,{504:1,425:1},vb),zW(AZn,"Multimaps/Keys/1/1",504),sDn(1137,1,QZn,kb),uZn.Cd=function(n){this.a.Cd(uG(n,44).ld())},zW(AZn,"Multimaps/Keys/lambda$1$Type",1137),sDn(1140,1,QZn,b),uZn.Cd=function(n){qq(uG(n,425))},zW(AZn,"Multiset/lambda$0$Type",1140),sDn(753,1,QZn,yb),uZn.Cd=function(n){Srn(this.a,uG(n,425))},zW(AZn,"Multiset/lambda$1$Type",753),sDn(1141,1,{},w),zW(AZn,"Multisets/0methodref$add$Type",1141),sDn(754,1,{},d),uZn.Kb=function(n){return N6(uG(n,425))},zW(AZn,"Multisets/lambda$1$Type",754),sDn(2106,1,yZn),zW(AZn,"RangeGwtSerializationDependencies",2106),sDn(521,2106,{178:1,521:1,3:1,46:1},Gyn),uZn.Lb=function(n){return Iz(this,uG(n,34))},uZn.Mb=function(n){return Iz(this,uG(n,34))},uZn.Fb=function(n){var t;return!!F$(n,521)&&(t=uG(n,521),pTn(this.a,t.a)&&pTn(this.b,t.b))},uZn.Hb=function(){return 31*this.a.Hb()+this.b.Hb()},uZn.Ib=function(){return N5(this.a,this.b)},zW(AZn,"Range",521),sDn(654,2097,r1n,TV),uZn.fd=function(n){return oR(this.b,n)},uZn.Zd=function(){return this.a},uZn.Xb=function(n){return GA(this.b,n)},uZn.Pd=function(n){return oR(this.b,n)},zW(AZn,"RegularImmutableAsList",654),sDn(656,2105,r1n,t1),uZn.Rd=function(){return this.a},zW(AZn,"RegularImmutableList",656),sDn(548,730,a1n,xy,Ry),zW(AZn,"RegularImmutableMap",548),sDn(731,719,u1n,RP),zW(AZn,"RegularImmutableSet",731),sDn(2074,KZn,FZn),uZn.Kc=function(){return new zJ(this.a,this.b)},uZn.Fc=function(n){throw hv(new Kv)},uZn.Gc=function(n){throw hv(new Kv)},uZn.$b=function(){throw hv(new Kv)},uZn.Mc=function(n){throw hv(new Kv)},zW(AZn,"Sets/SetView",2074),sDn(976,2074,FZn,GE),uZn.Kc=function(){return new zJ(this.a,this.b)},uZn.Hc=function(n){return RX(this.a,n)&&this.b.Hc(n)},uZn.Ic=function(n){return yhn(this.a,n)&&this.b.Ic(n)},uZn.dc=function(){return Tyn(this.b,this.a)},uZn.Lc=function(){return JJ(new fX(null,new h3(this.a,1)),new Tb(this.b))},uZn.gc=function(){return qsn(this)},uZn.Oc=function(){return JJ(new fX(null,new h3(this.a,1)),new Mb(this.b))},zW(AZn,"Sets/2",976),sDn(977,1,y1n,Mb),uZn.Mb=function(n){return this.a.Hc(n)},zW(AZn,"Sets/2/0methodref$contains$Type",977),sDn(714,713,OZn,zJ),uZn.Yb=function(){for(var n;b$(this.a);)if(n=X5(this.a),this.c.Hc(n))return n;return this.e=2,null},zW(AZn,"Sets/2/1",714),sDn(978,1,y1n,Tb),uZn.Mb=function(n){return this.a.Hc(n)},zW(AZn,"Sets/2/1methodref$contains$Type",978),sDn(616,2073,{616:1,3:1,20:1,16:1,277:1,21:1,87:1},e0),uZn.Kd=function(){return this.b},uZn.Ld=function(){return this.b},uZn.Wd=function(){return this.b},uZn.Jc=function(n){this.a.Jc(n)},uZn.Lc=function(){return this.a.Lc()},uZn.Oc=function(){return this.a.Oc()},zW(AZn,"Sets/UnmodifiableNavigableSet",616),sDn(2031,2030,a1n,bJ),uZn.Vd=function(){return sB(),new KM(this.a)},uZn.Cc=function(){return sB(),new KM(this.a)},uZn.xd=function(){return sB(),new KM(this.a)},zW(AZn,"SingletonImmutableBiMap",2031),sDn(657,2105,r1n,Uq),uZn.Rd=function(){return this.a},zW(AZn,"SingletonImmutableList",657),sDn(363,2079,u1n,KM),uZn.Kc=function(){return new hb(this.a)},uZn.Hc=function(n){return udn(this.a,n)},uZn.Od=function(){return new hb(this.a)},uZn.gc=function(){return 1},zW(AZn,"SingletonImmutableSet",363),sDn(1148,1,{},g),uZn.Kb=function(n){return uG(n,159)},zW(AZn,"Streams/lambda$0$Type",1148),sDn(1149,1,M1n,jb),uZn.de=function(){B9(this.a)},zW(AZn,"Streams/lambda$1$Type",1149),sDn(1725,1724,NZn,MZ),uZn.Zb=function(){return uG(uG(this.f||(this.f=F$(this.c,139)?new $K(this,uG(this.c,139)):F$(this.c,133)?new NK(this,uG(this.c,133)):new OE(this,this.c)),133),139)},uZn.hc=function(){return new Hj(this.b)},uZn.pd=function(){return new Hj(this.b)},uZn.ec=function(){return uG(uG(this.i||(this.i=F$(this.c,139)?new ME(this,uG(this.c,139)):F$(this.c,133)?new yE(this,uG(this.c,133)):new RD(this,this.c)),87),277)},uZn.ac=function(){return F$(this.c,139)?new $K(this,uG(this.c,139)):F$(this.c,133)?new NK(this,uG(this.c,133)):new OE(this,this.c)},uZn.ic=function(n){return null==n&&this.a.Ne(n,n),new Hj(this.b)},zW(AZn,"TreeMultimap",1725),sDn(82,1,{3:1,82:1}),uZn.ee=function(n){return new Error(n)},uZn.fe=function(){return this.e},uZn.ge=function(){var n,t,e;for(null==this.k&&(this.k=Inn(xat,zZn,82,0,0,1)),e=this.k,t=Inn(dat,EZn,1,e.length,5,1),n=0;n<e.length;n++)t[n]=e[n].e;return t},uZn.he=function(){return this.f},uZn.ie=function(){return this.g},uZn.je=function(){Yy(this,X4(this.ee(i1(this,this.g)))),Cv(this)},uZn.Ib=function(){return i1(this,this.ie())},uZn.e=E1n,uZn.i=!1,uZn.n=!0;var Dat,xat=zW(kZn,"Throwable",82);sDn(103,82,{3:1,103:1,82:1}),zW(kZn,"Exception",103),sDn(63,103,S1n,Ov,Ky),zW(kZn,"RuntimeException",63),sDn(607,63,S1n),zW(kZn,"JsException",607),sDn(875,607,S1n),zW(P1n,"JavaScriptExceptionBase",875),sDn(486,875,{486:1,3:1,103:1,63:1,82:1},qbn),uZn.ie=function(){return tPn(this),this.c},uZn.ke=function(){return xA(this.b)===xA(Dat)?null:this.b},zW(I1n,"JavaScriptException",486);var Rat,Kat=zW(I1n,"JavaScriptObject$",0);sDn(2047,1,{}),zW(I1n,"Scheduler",2047);var Fat,_at,Bat,Hat,Uat=0,Gat=0,qat=-1;sDn(902,2047,{},p),zW(P1n,"SchedulerImpl",902),sDn(2058,1,{}),zW(P1n,"StackTraceCreator/Collector",2058),sDn(876,2058,{},m),uZn.le=function(n){var t={},e=[];n[A1n]=e;for(var i=arguments.callee.caller;i;){var r=(EZ(),i.name||(i.name=Qcn(i.toString())));e.push(r);var c,a,o=":"+r,u=t[o];if(u)for(c=0,a=u.length;c<a;c++)if(u[c]===i)return;(u||(t[o]=[])).push(i),i=i.caller}},uZn.me=function(n){var t,e,i,r;for(EZ(),e=(i=n&&n[A1n]?n[A1n]:[]).length,r=Inn(jot,zZn,319,e,0,1),t=0;t<e;t++)r[t]=new kY(i[t],null,-1);return r},zW(P1n,"StackTraceCreator/CollectorLegacy",876),sDn(2059,2058,{}),uZn.le=function(n){},uZn.ne=function(n,t,e,i){return new kY(t,n+"@"+i,e<0?-1:e)},uZn.me=function(n){var t,e,i,r,c,a;if(r=WTn(n),c=Inn(jot,zZn,319,0,0,1),t=0,0==(i=r.length))return c;for(m_((a=rQn(this,r[0])).d,O1n)||(c[t++]=a),e=1;e<i;e++)c[t++]=rQn(this,r[e]);return c},zW(P1n,"StackTraceCreator/CollectorModern",2059),sDn(877,2059,{},v),uZn.ne=function(n,t,e,i){return new kY(t,n,-1)},zW(P1n,"StackTraceCreator/CollectorModernNoSourceMap",877),sDn(1064,1,{}),zW(c0n,a0n,1064),sDn(624,1064,{624:1},JW),zW(o0n,a0n,624),sDn(2101,1,{}),zW(c0n,u0n,2101),sDn(2102,2101,{}),zW(o0n,u0n,2102),sDn(1120,1,{},k),zW(o0n,"LocaleInfo",1120),sDn(2027,1,{},y),uZn.a=0,zW(o0n,"TimeZone",2027),sDn(1293,2102,{},M),zW("com.google.gwt.i18n.client.impl.cldr","DateTimeFormatInfoImpl",1293),sDn(443,1,{443:1},hG),uZn.a=!1,uZn.b=0,zW(c0n,"DateTimeFormat/PatternPart",443),sDn(206,1,s0n,QE,Lfn,DK),uZn.Fd=function(n){return k4(this,uG(n,206))},uZn.Fb=function(n){return F$(n,206)&&_A(Bsn(this.q.getTime()),Bsn(uG(n,206).q.getTime()))},uZn.Hb=function(){var n;return pz(P3(n=Bsn(this.q.getTime()),Dz(n,32)))},uZn.Ib=function(){var n,t,i;return n=((i=-this.q.getTimezoneOffset())>=0?"+":"")+(i/60|0),t=FL(e.Math.abs(i)%60),(cIn(),nut)[this.q.getDay()]+" "+tut[this.q.getMonth()]+" "+FL(this.q.getDate())+" "+FL(this.q.getHours())+":"+FL(this.q.getMinutes())+":"+FL(this.q.getSeconds())+" GMT"+n+t+" "+this.q.getFullYear()};var Xat,zat,Vat,Wat,Qat,Jat,Yat,Zat,not,tot,eot,iot=zW(DZn,"Date",206);sDn(2015,206,s0n,DEn),uZn.a=!1,uZn.b=0,uZn.c=0,uZn.d=0,uZn.e=0,uZn.f=0,uZn.g=!1,uZn.i=0,uZn.j=0,uZn.k=0,uZn.n=0,uZn.o=0,uZn.p=0,zW("com.google.gwt.i18n.shared.impl","DateRecord",2015),sDn(2064,1,{}),uZn.pe=function(){return null},uZn.qe=function(){return null},uZn.re=function(){return null},uZn.se=function(){return null},uZn.te=function(){return null},zW(h0n,"JSONValue",2064),sDn(221,2064,{221:1},Ib,Eb),uZn.Fb=function(n){return!!F$(n,221)&&j3(this.a,uG(n,221).a)},uZn.oe=function(){return uv},uZn.Hb=function(){return OZ(this.a)},uZn.pe=function(){return this},uZn.Ib=function(){var n,t,e;for(e=new lx("["),t=0,n=this.a.length;t<n;t++)t>0&&(e.a+=","),QA(e,uin(this,t));return e.a+="]",e.a},zW(h0n,"JSONArray",221),sDn(493,2064,{493:1},Sb),uZn.oe=function(){return sv},uZn.qe=function(){return this},uZn.Ib=function(){return qx(),""+this.a},uZn.a=!1,zW(h0n,"JSONBoolean",493),sDn(997,63,S1n,Fy),zW(h0n,"JSONException",997),sDn(1036,2064,{},T),uZn.oe=function(){return fv},uZn.Ib=function(){return IZn},zW(h0n,"JSONNull",1036),sDn(263,2064,{263:1},Pb),uZn.Fb=function(n){return!!F$(n,263)&&this.a==uG(n,263).a},uZn.oe=function(){return av},uZn.Hb=function(){return OL(this.a)},uZn.re=function(){return this},uZn.Ib=function(){return this.a+""},uZn.a=0,zW(h0n,"JSONNumber",263),sDn(190,2064,{190:1},_y,Cb),uZn.Fb=function(n){return!!F$(n,190)&&j3(this.a,uG(n,190).a)},uZn.oe=function(){return ov},uZn.Hb=function(){return OZ(this.a)},uZn.se=function(){return this},uZn.Ib=function(){var n,t,e,i,r,c;for(c=new lx("{"),n=!0,i=0,r=(e=Yon(this,Inn($ot,zZn,2,0,6,1))).length;i<r;++i)t=e[i],n?n=!1:c.a+=TZn,JA(c,l$n(t)),c.a+=":",QA(c,v0(this,t));return c.a+="}",c.a},zW(h0n,"JSONObject",190),sDn(605,KZn,FZn,JE),uZn.Hc=function(n){return RA(n)&&hT(this.a,mK(n))},uZn.Kc=function(){return new Jw(new IM(this.b))},uZn.gc=function(){return this.b.length},zW(h0n,"JSONObject/1",605),sDn(211,2064,{211:1},QW),uZn.Fb=function(n){return!!F$(n,211)&&m_(this.a,uG(n,211).a)},uZn.oe=function(){return cv},uZn.Hb=function(){return pln(this.a)},uZn.te=function(){return this},uZn.Ib=function(){return l$n(this.a)},zW(h0n,"JSONString",211),sDn(2060,1,{533:1}),zW(m0n,"OutputStream",2060),sDn(2061,2060,{533:1}),zW(m0n,"FilterOutputStream",2061),sDn(878,2061,{533:1},S),zW(m0n,"PrintStream",878),sDn(427,1,{484:1}),uZn.Ib=function(){return this.a},zW(kZn,"AbstractStringBuilder",427),sDn(538,63,S1n,wM),zW(kZn,"ArithmeticException",538),sDn(77,63,v0n,Lv,dM),zW(kZn,"IndexOutOfBoundsException",77),sDn(333,77,{3:1,333:1,103:1,77:1,63:1,82:1},Ik,YM),zW(kZn,"ArrayIndexOutOfBoundsException",333),sDn(537,63,S1n,Nv,gM),zW(kZn,"ArrayStoreException",537),sDn(296,82,k0n,pM),zW(kZn,"Error",296),sDn(200,296,k0n,Av,x9),zW(kZn,"AssertionError",200),fZn={3:1,485:1,34:1};var rot,cot=zW(kZn,"Boolean",485);sDn(242,1,{3:1,242:1}),zW(kZn,"Number",242),sDn(222,242,{3:1,222:1,34:1,242:1},Dw),uZn.Fd=function(n){return oT(this,uG(n,222))},uZn.ue=function(){return this.a},uZn.Fb=function(n){return F$(n,222)&&uG(n,222).a==this.a},uZn.Hb=function(){return this.a},uZn.Ib=function(){return""+this.a},uZn.a=0;var aot,oot,uot=zW(kZn,"Byte",222);sDn(180,1,{3:1,180:1,34:1},xw),uZn.Fd=function(n){return uT(this,uG(n,180))},uZn.Fb=function(n){return F$(n,180)&&uG(n,180).a==this.a},uZn.Hb=function(){return this.a},uZn.Ib=function(){return String.fromCharCode(this.a)},uZn.a=0;var sot,hot=zW(kZn,"Character",180);sDn(212,63,{3:1,212:1,103:1,63:1,82:1},$v,mM),zW(kZn,"ClassCastException",212),lZn={3:1,34:1,345:1,242:1};var fot=zW(kZn,"Double",345);sDn(161,242,{3:1,34:1,161:1,242:1},Rw,tk),uZn.Fd=function(n){return DL(this,uG(n,161))},uZn.ue=function(){return this.a},uZn.Fb=function(n){return F$(n,161)&&p_(this.a,uG(n,161).a)},uZn.Hb=function(){return t0(this.a)},uZn.Ib=function(){return""+this.a},uZn.a=0;var lot=zW(kZn,"Float",161);sDn(33,63,{3:1,103:1,33:1,63:1,82:1},Dv,vM,tbn),zW(kZn,"IllegalArgumentException",33),sDn(73,63,S1n,xv,kM),zW(kZn,"IllegalStateException",73),sDn(17,242,{3:1,34:1,17:1,242:1},Iw),uZn.Fd=function(n){return NL(this,uG(n,17))},uZn.ue=function(){return this.a},uZn.Fb=function(n){return F$(n,17)&&uG(n,17).a==this.a},uZn.Hb=function(){return this.a},uZn.Ib=function(){return""+this.a},uZn.a=0;var bot,wot,dot=zW(kZn,"Integer",17);sDn(168,242,{3:1,34:1,168:1,242:1},Ow),uZn.Fd=function(n){return $L(this,uG(n,168))},uZn.ue=function(){return W4(this.a)},uZn.Fb=function(n){return F$(n,168)&&_A(uG(n,168).a,this.a)},uZn.Hb=function(){return TF(this.a)},uZn.Ib=function(){return""+oV(this.a)},uZn.a=0;var got,pot,mot,vot,kot,yot=zW(kZn,"Long",168);sDn(2140,1,{}),sDn(1904,63,S1n,yM),zW(kZn,"NegativeArraySizeException",1904),sDn(169,607,{3:1,103:1,169:1,63:1,82:1},Rv,MM),uZn.ee=function(n){return new TypeError(n)},zW(kZn,"NullPointerException",169),sDn(130,33,{3:1,103:1,33:1,130:1,63:1,82:1},ZM),zW(kZn,"NumberFormatException",130),sDn(191,242,{3:1,34:1,242:1,191:1},Aw),uZn.Fd=function(n){return sT(this,uG(n,191))},uZn.ue=function(){return this.a},uZn.Fb=function(n){return F$(n,191)&&uG(n,191).a==this.a},uZn.Hb=function(){return this.a},uZn.Ib=function(){return""+this.a},uZn.a=0;var Mot,Tot=zW(kZn,"Short",191);sDn(319,1,{3:1,319:1},kY),uZn.Fb=function(n){var t;return!!F$(n,319)&&(t=uG(n,319),this.c==t.c&&this.d==t.d&&this.a==t.a&&this.b==t.b)},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[xwn(this.c),this.a,this.d,this.b]))},uZn.Ib=function(){return this.a+"."+this.d+"("+(null!=this.b?this.b:"Unknown Source")+(this.c>=0?":"+this.c:"")+")"},uZn.c=0;var jot=zW(kZn,"StackTraceElement",319);bZn={3:1,484:1,34:1,2:1};var Eot,Sot,Pot,Cot,Iot,Oot,Aot,Lot,Not,$ot=zW(kZn,C1n,2);sDn(111,427,{484:1},zM,VM,fx),zW(kZn,"StringBuffer",111),sDn(104,427,{484:1},WM,QM,lx),zW(kZn,"StringBuilder",104),sDn(702,77,v0n,JM),zW(kZn,"StringIndexOutOfBoundsException",702),sDn(2145,1,{}),sDn(48,63,{3:1,103:1,63:1,82:1,48:1},Kv,TM),zW(kZn,"UnsupportedOperationException",48),sDn(247,242,{3:1,34:1,242:1,247:1},Edn,Wj),uZn.Fd=function(n){return $Gn(this,uG(n,247))},uZn.ue=function(){return YIn(dzn(this))},uZn.Fb=function(n){var t;return this===n||!!F$(n,247)&&(t=uG(n,247),this.e==t.e&&0==$Gn(this,t))},uZn.Hb=function(){var n;return 0!=this.b?this.b:this.a<54?(n=Bsn(this.f),this.b=pz(E3(n,-1)),this.b=33*this.b+pz(E3($z(n,32),-1)),this.b=17*this.b+t0(this.e),this.b):(this.b=17*cwn(this.c)+t0(this.e),this.b)},uZn.Ib=function(){return dzn(this)},uZn.a=0,uZn.b=0,uZn.d=0,uZn.e=0,uZn.f=0;var Dot,xot,Rot,Kot,Fot,_ot,Bot=zW("java.math","BigDecimal",247);sDn(92,242,{3:1,34:1,242:1,92:1},Z5,x3,VV,nkn,PN),uZn.Fd=function(n){return Pvn(this,uG(n,92))},uZn.ue=function(){return YIn(bYn(this,0))},uZn.Fb=function(n){return Cpn(this,n)},uZn.Hb=function(){return cwn(this)},uZn.Ib=function(){return bYn(this,0)},uZn.b=-2,uZn.c=0,uZn.d=0,uZn.e=0;var Hot,Uot,Got,qot,Xot=zW("java.math","BigInteger",92);sDn(498,2065,xZn),uZn.$b=function(){$V(this)},uZn._b=function(n){return PV(this,n)},uZn.uc=function(n){return Qln(this,n,this.i)||Qln(this,n,this.f)},uZn.vc=function(){return new Nw(this)},uZn.xc=function(n){return cQ(this,n)},uZn.zc=function(n,t){return vJ(this,n,t)},uZn.Bc=function(n){return u7(this,n)},uZn.gc=function(){return oS(this)},uZn.g=0,zW(DZn,"AbstractHashMap",498),sDn(267,KZn,FZn,Nw),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return Q4(this,n)},uZn.Kc=function(){return new bsn(this.a)},uZn.Mc=function(n){var t;return!!Q4(this,n)&&(t=uG(n,44).ld(),this.a.Bc(t),!0)},uZn.gc=function(){return this.a.gc()},zW(DZn,"AbstractHashMap/EntrySet",267),sDn(268,1,$Zn,bsn),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return von(this)},uZn.Ob=function(){return this.b},uZn.Qb=function(){Oen(this)},uZn.b=!1,uZn.d=0,zW(DZn,"AbstractHashMap/EntrySetIterator",268),sDn(426,1,$Zn,Jw),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return AP(this)},uZn.Pb=function(){return _Y(this)},uZn.Qb=function(){LQ(this)},uZn.b=0,uZn.c=-1,zW(DZn,"AbstractList/IteratorImpl",426),sDn(98,426,UZn,N4),uZn.Qb=function(){LQ(this)},uZn.Rb=function(n){pF(this,n)},uZn.Sb=function(){return this.b>0},uZn.Tb=function(){return this.b},uZn.Ub=function(){return MK(this.b>0),this.a.Xb(this.c=--this.b)},uZn.Vb=function(){return this.b-1},uZn.Wb=function(n){TK(-1!=this.c),this.a.hd(this.c,n)},zW(DZn,"AbstractList/ListIteratorImpl",98),sDn(244,56,m1n,C2),uZn.bd=function(n,t){o3(n,this.b),this.c.bd(this.a+n,t),++this.b},uZn.Xb=function(n){return u3(n,this.b),this.c.Xb(this.a+n)},uZn.gd=function(n){var t;return u3(n,this.b),t=this.c.gd(this.a+n),--this.b,t},uZn.hd=function(n,t){return u3(n,this.b),this.c.hd(this.a+n,t)},uZn.gc=function(){return this.b},uZn.a=0,uZn.b=0,zW(DZn,"AbstractList/SubList",244),sDn(266,KZn,FZn,Lw),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return this.a._b(n)},uZn.Kc=function(){return new Kw(this.a.vc().Kc())},uZn.Mc=function(n){return!!this.a._b(n)&&(this.a.Bc(n),!0)},uZn.gc=function(){return this.a.gc()},zW(DZn,"AbstractMap/1",266),sDn(541,1,$Zn,Kw),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.a.Ob()},uZn.Pb=function(){return uG(this.a.Pb(),44).ld()},uZn.Qb=function(){this.a.Qb()},zW(DZn,"AbstractMap/1/1",541),sDn(231,31,RZn,Fw),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return this.a.uc(n)},uZn.Kc=function(){return new _w(this.a.vc().Kc())},uZn.gc=function(){return this.a.gc()},zW(DZn,"AbstractMap/2",231),sDn(301,1,$Zn,_w),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.a.Ob()},uZn.Pb=function(){return uG(this.a.Pb(),44).md()},uZn.Qb=function(){this.a.Qb()},zW(DZn,"AbstractMap/2/1",301),sDn(494,1,{494:1,44:1}),uZn.Fb=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),OJ(this.d,t.ld())&&OJ(this.e,t.md()))},uZn.ld=function(){return this.d},uZn.md=function(){return this.e},uZn.Hb=function(){return VN(this.d)^VN(this.e)},uZn.nd=function(n){return wF(this,n)},uZn.Ib=function(){return this.d+"="+this.e},zW(DZn,"AbstractMap/AbstractEntry",494),sDn(397,494,{494:1,397:1,44:1},VP),zW(DZn,"AbstractMap/SimpleEntry",397),sDn(2082,1,$0n),uZn.Fb=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),OJ(this.ld(),t.ld())&&OJ(this.md(),t.md()))},uZn.Hb=function(){return VN(this.ld())^VN(this.md())},uZn.Ib=function(){return this.ld()+"="+this.md()},zW(DZn,qZn,2082),sDn(2090,2065,_Zn),uZn.Xc=function(n){return Sj(this.Ee(n))},uZn.tc=function(n){return I9(this,n)},uZn._b=function(n){return dF(this,n)},uZn.vc=function(){return new Uw(this)},uZn.Tc=function(){return DV(this.Ge())},uZn.Yc=function(n){return Sj(this.He(n))},uZn.xc=function(n){var t;return t=n,DA(this.Fe(t))},uZn.$c=function(n){return Sj(this.Ie(n))},uZn.ec=function(){return new Bw(this)},uZn.Vc=function(){return DV(this.Je())},uZn._c=function(n){return Sj(this.Ke(n))},zW(DZn,"AbstractNavigableMap",2090),sDn(629,KZn,FZn,Uw),uZn.Hc=function(n){return F$(n,44)&&I9(this.b,uG(n,44))},uZn.Kc=function(){return this.b.De()},uZn.Mc=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),this.b.Le(t))},uZn.gc=function(){return this.b.gc()},zW(DZn,"AbstractNavigableMap/EntrySet",629),sDn(1146,KZn,HZn,Bw),uZn.Nc=function(){return new GP(this)},uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return dF(this.a,n)},uZn.Kc=function(){return new Hw(this.a.vc().b.De())},uZn.Mc=function(n){return!!dF(this.a,n)&&(this.a.Bc(n),!0)},uZn.gc=function(){return this.a.gc()},zW(DZn,"AbstractNavigableMap/NavigableKeySet",1146),sDn(1147,1,$Zn,Hw),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return AP(this.a.a)},uZn.Pb=function(){return kR(this.a).ld()},uZn.Qb=function(){rB(this.a)},zW(DZn,"AbstractNavigableMap/NavigableKeySet/1",1147),sDn(2103,31,RZn),uZn.Fc=function(n){return kG(_Cn(this,n),D0n),!0},uZn.Gc=function(n){return tJ(n),vG(n!=this,"Can't add a queue to itself"),Qon(this,n)},uZn.$b=function(){for(;null!=hin(this););},zW(DZn,"AbstractQueue",2103),sDn(310,31,{4:1,20:1,31:1,16:1},ND,$4),uZn.Fc=function(n){return O6(this,n),!0},uZn.$b=function(){q5(this)},uZn.Hc=function(n){return Chn(new XJ(this),n)},uZn.dc=function(){return LM(this)},uZn.Kc=function(){return new XJ(this)},uZn.Mc=function(n){return m0(new XJ(this),n)},uZn.gc=function(){return this.c-this.b&this.a.length-1},uZn.Nc=function(){return new h3(this,272)},uZn.Qc=function(n){var t;return t=this.c-this.b&this.a.length-1,n.length<t&&(n=aT(new Array(t),n)),Pon(this,n,t),n.length>t&&uQ(n,t,null),n},uZn.b=0,uZn.c=0,zW(DZn,"ArrayDeque",310),sDn(459,1,$Zn,XJ),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.a!=this.b},uZn.Pb=function(){return rwn(this)},uZn.Qb=function(){lan(this)},uZn.a=0,uZn.b=0,uZn.c=-1,zW(DZn,"ArrayDeque/IteratorImpl",459),sDn(13,56,x0n,Zm,R7,Z_),uZn.bd=function(n,t){GX(this,n,t)},uZn.Fc=function(n){return kD(this,n)},uZn.cd=function(n,t){return Cbn(this,n,t)},uZn.Gc=function(n){return Ohn(this,n)},uZn.$b=function(){Xv(this.c,0)},uZn.Hc=function(n){return-1!=Ten(this,n,0)},uZn.Jc=function(n){Prn(this,n)},uZn.Xb=function(n){return zq(this,n)},uZn.dd=function(n){return Ten(this,n,0)},uZn.dc=function(){return 0==this.c.length},uZn.Kc=function(){return new Ww(this)},uZn.gd=function(n){return i7(this,n)},uZn.Mc=function(n){return men(this,n)},uZn.ce=function(n,t){P2(this,n,t)},uZn.hd=function(n,t){return Y8(this,n,t)},uZn.gc=function(){return this.c.length},uZn.jd=function(n){f$(this,n)},uZn.Pc=function(){return tq(this.c)},uZn.Qc=function(n){return Ekn(this,n)};var zot,Vot,Wot,Qot,Jot,Yot,Zot,nut,tut,eut=zW(DZn,"ArrayList",13);sDn(7,1,$Zn,Ww),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return l$(this)},uZn.Pb=function(){return N3(this)},uZn.Qb=function(){tW(this)},uZn.a=0,uZn.b=-1,zW(DZn,"ArrayList/1",7),sDn(2112,e.Function,{},P),uZn.Me=function(n,t){return ugn(n,t)},sDn(151,56,R0n,IM),uZn.Hc=function(n){return-1!=gan(this,n)},uZn.Jc=function(n){var t,e,i,r;for(tJ(n),i=0,r=(e=this.a).length;i<r;++i)t=e[i],n.Cd(t)},uZn.Xb=function(n){return Vq(this,n)},uZn.hd=function(n,t){var e;return u3(n,this.a.length),e=this.a[n],uQ(this.a,n,t),e},uZn.gc=function(){return this.a.length},uZn.jd=function(n){UX(this.a,this.a.length,n)},uZn.Pc=function(){return Skn(this,Inn(dat,EZn,1,this.a.length,5,1))},uZn.Qc=function(n){return Skn(this,n)},zW(DZn,"Arrays/ArrayList",151),sDn(953,56,R0n,C),uZn.Hc=function(n){return!1},uZn.Xb=function(n){return oL(n)},uZn.Kc=function(){return hZ(),wS(),Qot},uZn.ed=function(){return hZ(),wS(),Qot},uZn.gc=function(){return 0},zW(DZn,"Collections/EmptyList",953),sDn(954,1,UZn,I),uZn.Nb=function(n){SV(this,n)},uZn.Rb=function(n){throw hv(new Kv)},uZn.Ob=function(){return!1},uZn.Sb=function(){return!1},uZn.Pb=function(){throw hv(new Bv)},uZn.Tb=function(){return 0},uZn.Ub=function(){throw hv(new Bv)},uZn.Vb=function(){return-1},uZn.Qb=function(){throw hv(new xv)},uZn.Wb=function(n){throw hv(new xv)},zW(DZn,"Collections/EmptyListIterator",954),sDn(956,2065,a1n,O),uZn._b=function(n){return!1},uZn.uc=function(n){return!1},uZn.vc=function(){return hZ(),Wot},uZn.xc=function(n){return null},uZn.ec=function(){return hZ(),Wot},uZn.gc=function(){return 0},uZn.Cc=function(){return hZ(),zot},zW(DZn,"Collections/EmptyMap",956),sDn(955,KZn,u1n,A),uZn.Hc=function(n){return!1},uZn.Kc=function(){return hZ(),wS(),Qot},uZn.gc=function(){return 0},zW(DZn,"Collections/EmptySet",955),sDn(608,56,{3:1,20:1,31:1,56:1,16:1,15:1},Xw),uZn.Hc=function(n){return OJ(this.a,n)},uZn.Xb=function(n){return u3(n,1),this.a},uZn.gc=function(){return 1},zW(DZn,"Collections/SingletonList",608),sDn(384,1,e1n,qw),uZn.Jc=function(n){z8(this,n)},uZn.Lc=function(){return new fX(null,this.Nc())},uZn.Nc=function(){return new h3(this,0)},uZn.Oc=function(){return new fX(null,this.Nc())},uZn.Fc=function(n){return Rj()},uZn.Gc=function(n){return Kj()},uZn.$b=function(){Fj()},uZn.Hc=function(n){return ZE(this,n)},uZn.Ic=function(n){return nS(this,n)},uZn.dc=function(){return this.b.dc()},uZn.Kc=function(){return new Gw(this.b.Kc())},uZn.Mc=function(n){return _j()},uZn.gc=function(){return this.b.gc()},uZn.Pc=function(){return this.b.Pc()},uZn.Qc=function(n){return tS(this,n)},uZn.Ib=function(){return cpn(this.b)},zW(DZn,"Collections/UnmodifiableCollection",384),sDn(383,1,$Zn,Gw),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.b.Ob()},uZn.Pb=function(){return this.b.Pb()},uZn.Qb=function(){Bj()},zW(DZn,"Collections/UnmodifiableCollectionIterator",383),sDn(540,384,K0n,gx),uZn.Nc=function(){return new h3(this,16)},uZn.bd=function(n,t){throw hv(new Kv)},uZn.cd=function(n,t){throw hv(new Kv)},uZn.Fb=function(n){return udn(this.a,n)},uZn.Xb=function(n){return this.a.Xb(n)},uZn.Hb=function(){return Hon(this.a)},uZn.dd=function(n){return this.a.dd(n)},uZn.dc=function(){return this.a.dc()},uZn.ed=function(){return new px(this.a.fd(0))},uZn.fd=function(n){return new px(this.a.fd(n))},uZn.gd=function(n){throw hv(new Kv)},uZn.hd=function(n,t){throw hv(new Kv)},uZn.jd=function(n){throw hv(new Kv)},uZn.kd=function(n,t){return new gx(this.a.kd(n,t))},zW(DZn,"Collections/UnmodifiableList",540),sDn(705,383,UZn,px),uZn.Qb=function(){Bj()},uZn.Rb=function(n){throw hv(new Kv)},uZn.Sb=function(){return this.a.Sb()},uZn.Tb=function(){return this.a.Tb()},uZn.Ub=function(){return this.a.Ub()},uZn.Vb=function(){return this.a.Vb()},uZn.Wb=function(n){throw hv(new Kv)},zW(DZn,"Collections/UnmodifiableListIterator",705),sDn(609,1,xZn,Vw),uZn.wc=function(n){Yun(this,n)},uZn.yc=function(n,t,e){return Jgn(this,n,t,e)},uZn.$b=function(){throw hv(new Kv)},uZn._b=function(n){return this.c._b(n)},uZn.uc=function(n){return iS(this,n)},uZn.vc=function(){return EJ(this)},uZn.Fb=function(n){return rS(this,n)},uZn.xc=function(n){return this.c.xc(n)},uZn.Hb=function(){return Hon(this.c)},uZn.dc=function(){return this.c.dc()},uZn.ec=function(){return SJ(this)},uZn.zc=function(n,t){throw hv(new Kv)},uZn.Bc=function(n){throw hv(new Kv)},uZn.gc=function(){return this.c.gc()},uZn.Ib=function(){return cpn(this.c)},uZn.Cc=function(){return jJ(this)},zW(DZn,"Collections/UnmodifiableMap",609),sDn(396,384,o1n,nT),uZn.Nc=function(){return new h3(this,1)},uZn.Fb=function(n){return udn(this.b,n)},uZn.Hb=function(){return Hon(this.b)},zW(DZn,"Collections/UnmodifiableSet",396),sDn(957,396,o1n,tT),uZn.Hc=function(n){return eS(this,n)},uZn.Ic=function(n){return this.b.Ic(n)},uZn.Kc=function(){return new zw(this.b.Kc())},uZn.Pc=function(){var n;return w8(n=this.b.Pc(),n.length),n},uZn.Qc=function(n){return YZ(this,n)},zW(DZn,"Collections/UnmodifiableMap/UnmodifiableEntrySet",957),sDn(958,1,$Zn,zw),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return new Yw(uG(this.a.Pb(),44))},uZn.Ob=function(){return this.a.Ob()},uZn.Qb=function(){throw hv(new Kv)},zW(DZn,"Collections/UnmodifiableMap/UnmodifiableEntrySet/1",958),sDn(703,1,$0n,Yw),uZn.Fb=function(n){return this.a.Fb(n)},uZn.ld=function(){return this.a.ld()},uZn.md=function(){return this.a.md()},uZn.Hb=function(){return this.a.Hb()},uZn.nd=function(n){throw hv(new Kv)},uZn.Ib=function(){return cpn(this.a)},zW(DZn,"Collections/UnmodifiableMap/UnmodifiableEntrySet/UnmodifiableEntry",703),sDn(610,540,{20:1,16:1,15:1,59:1},eT),zW(DZn,"Collections/UnmodifiableRandomAccessList",610),sDn(704,396,s1n,mx),uZn.Nc=function(){return new GP(this)},uZn.Fb=function(n){return udn(this.a,n)},uZn.Hb=function(){return Hon(this.a)},zW(DZn,"Collections/UnmodifiableSortedSet",704),sDn(858,1,F0n,L),uZn.Ne=function(n,t){var e;return 0!=(e=Q5(uG(n,12),uG(t,12)))?e:hGn(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(DZn,"Comparator/lambda$0$Type",858),sDn(769,1,F0n,N),uZn.Ne=function(n,t){return Qq(uG(n,34),uG(t,34))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return sZ(),Zot},zW(DZn,"Comparators/NaturalOrderComparator",769),sDn(1226,1,F0n,$),uZn.Ne=function(n,t){return Wq(uG(n,34),uG(t,34))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return sZ(),Yot},zW(DZn,"Comparators/ReverseNaturalOrderComparator",1226),sDn(52,1,F0n,Zw),uZn.Fb=function(n){return this===n},uZn.Ne=function(n,t){return this.a.Ne(t,n)},uZn.Oe=function(){return this.a},zW(DZn,"Comparators/ReversedComparator",52),sDn(175,63,S1n,Fv),zW(DZn,"ConcurrentModificationException",175),sDn(1948,1,_0n,D),uZn.Pe=function(n){Mmn(this,n)},uZn.Ib=function(){return"DoubleSummaryStatistics[count = "+oV(this.a)+", avg = "+(NP(this.a,0)?c7(this)/W4(this.a):0)+", min = "+this.c+", max = "+this.b+", sum = "+c7(this)+"]"},uZn.a=0,uZn.b=T0n,uZn.c=M0n,uZn.d=0,uZn.e=0,uZn.f=0,zW(DZn,"DoubleSummaryStatistics",1948),sDn(1868,63,S1n,_v),zW(DZn,"EmptyStackException",1868),sDn(461,2065,xZn,rpn),uZn.zc=function(n,t){return yF(this,n,t)},uZn.$b=function(){AQ(this)},uZn._b=function(n){return DP(this,n)},uZn.uc=function(n){var t,e;for(e=new fS(this.a);e.a<e.c.a.length;)if(t=X5(e),OJ(n,this.b[t.g]))return!0;return!1},uZn.vc=function(){return new nd(this)},uZn.xc=function(n){return AJ(this,n)},uZn.Bc=function(n){return q3(this,n)},uZn.gc=function(){return this.a.c},zW(DZn,"EnumMap",461),sDn(1340,KZn,FZn,nd),uZn.$b=function(){AQ(this.a)},uZn.Hc=function(n){return J4(this,n)},uZn.Kc=function(){return new uX(this.a)},uZn.Mc=function(n){var t;return!!J4(this,n)&&(t=uG(n,44).ld(),q3(this.a,t),!0)},uZn.gc=function(){return this.a.a.c},zW(DZn,"EnumMap/EntrySet",1340),sDn(1341,1,$Zn,uX),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return this.b=X5(this.a),new zP(this.c,this.b)},uZn.Ob=function(){return b$(this.a)},uZn.Qb=function(){TK(!!this.b),q3(this.c,this.b),this.b=null},zW(DZn,"EnumMap/EntrySetIterator",1341),sDn(1342,2082,$0n,zP),uZn.ld=function(){return this.a},uZn.md=function(){return this.b.b[this.a.g]},uZn.nd=function(n){return nq(this.b.b,this.a.g,n)},zW(DZn,"EnumMap/MapEntry",1342),sDn(181,KZn,{20:1,31:1,16:1,181:1,21:1});var iut=zW(DZn,"EnumSet",181);sDn(162,181,{20:1,31:1,16:1,181:1,162:1,21:1},nB),uZn.Fc=function(n){return Mon(this,uG(n,22))},uZn.Hc=function(n){return RX(this,n)},uZn.Kc=function(){return new fS(this)},uZn.Mc=function(n){return KX(this,n)},uZn.gc=function(){return this.c},uZn.c=0,zW(DZn,"EnumSet/EnumSetImpl",162),sDn(356,1,$Zn,fS),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return X5(this)},uZn.Ob=function(){return b$(this)},uZn.Qb=function(){TK(-1!=this.b),uQ(this.c.b,this.b,null),--this.c.c,this.b=-1},uZn.a=-1,uZn.b=-1,zW(DZn,"EnumSet/EnumSetImpl/IteratorImpl",356),sDn(45,498,B0n,Ym,sS,nL),uZn.Be=function(n,t){return xA(n)===xA(t)||null!=n&&udn(n,t)},uZn.Ce=function(n){return null==n?0:0|Hon(n)},zW(DZn,"HashMap",45),sDn(49,KZn,H0n,ek,Dj,oX),uZn.Fc=function(n){return FV(this,n)},uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return cS(this,n)},uZn.dc=function(){return 0==this.a.gc()},uZn.Kc=function(){return this.a.ec().Kc()},uZn.Mc=function(n){return Q$(this,n)},uZn.gc=function(){return this.a.gc()};var rut,cut=zW(DZn,"HashSet",49);sDn(1897,1,JZn,x),uZn.Dd=function(n){msn(this,n)},uZn.Ib=function(){return"IntSummaryStatistics[count = "+oV(this.a)+", avg = "+(NP(this.a,0)?W4(this.d)/W4(this.a):0)+", min = "+this.c+", max = "+this.b+", sum = "+oV(this.d)+"]"},uZn.a=0,uZn.b=j1n,uZn.c=vZn,uZn.d=0,zW(DZn,"IntSummaryStatistics",1897),sDn(1062,1,t1n,nN),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new Hnn(this)},uZn.c=0,zW(DZn,"InternalHashCodeMap",1062),sDn(726,1,$Zn,Hnn),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return this.d=this.a[this.c++],this.d},uZn.Ob=function(){var n;return this.c<this.a.length||!(n=this.b.next()).done&&(this.a=n.value[1],this.c=0,!0)},uZn.Qb=function(){Y$n(this.e,this.d.ld()),0!=this.c&&--this.c},uZn.c=0,uZn.d=null,zW(DZn,"InternalHashCodeMap/1",726),sDn(1060,1,t1n,tN),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new a8(this)},uZn.c=0,uZn.d=0,zW(DZn,"InternalStringMap",1060),sDn(725,1,$Zn,a8),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return this.c=this.a,this.a=this.b.next(),new tB(this.d,this.c,this.d.d)},uZn.Ob=function(){return!this.a.done},uZn.Qb=function(){Vsn(this.d,this.c.value[0])},zW(DZn,"InternalStringMap/1",725),sDn(1061,2082,$0n,tB),uZn.ld=function(){return this.b.value[0]},uZn.md=function(){return this.a.d!=this.c?_P(this.a,this.b.value[0]):this.b.value[1]},uZn.nd=function(n){return kgn(this.a,this.b.value[0],n)},uZn.c=0,zW(DZn,"InternalStringMap/2",1061),sDn(215,45,B0n,u8,Bnn),uZn.$b=function(){vF(this)},uZn._b=function(n){return BP(this,n)},uZn.uc=function(n){var t;for(t=this.d.a;t!=this.d;){if(OJ(t.e,n))return!0;t=t.a}return!1},uZn.vc=function(){return new ad(this)},uZn.xc=function(n){return ain(this,n)},uZn.zc=function(n,t){return Akn(this,n,t)},uZn.Bc=function(n){return pen(this,n)},uZn.gc=function(){return oS(this.e)},uZn.c=!1,zW(DZn,"LinkedHashMap",215),sDn(400,397,{494:1,397:1,400:1,44:1},bR,bG),zW(DZn,"LinkedHashMap/ChainEntry",400),sDn(715,KZn,FZn,ad),uZn.$b=function(){vF(this.a)},uZn.Hc=function(n){return Y4(this,n)},uZn.Kc=function(){return new fQ(this)},uZn.Mc=function(n){var t;return!!Y4(this,n)&&(t=uG(n,44).ld(),pen(this.a,t),!0)},uZn.gc=function(){return oS(this.a.e)},zW(DZn,"LinkedHashMap/EntrySet",715),sDn(716,1,$Zn,fQ),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return Hen(this)},uZn.Ob=function(){return this.c!=this.d.a.d},uZn.Qb=function(){TK(!!this.a),OB(this.d.a.e.g,this.b),cq(this.a),u7(this.d.a.e,this.a.d),this.b=this.d.a.e.g,this.a=null},uZn.b=0,zW(DZn,"LinkedHashMap/EntrySet/EntryIterator",716),sDn(174,49,H0n,XL,dx,aX);var aut=zW(DZn,"LinkedHashSet",174);sDn(67,2062,{3:1,4:1,20:1,31:1,56:1,16:1,67:1,15:1},lS,Y_),uZn.Fc=function(n){return aq(this,n)},uZn.$b=function(){BY(this)},uZn.fd=function(n){return Fkn(this,n)},uZn.gc=function(){return this.b},uZn.b=0;var out,uut,sut,hut,fut,lut=zW(DZn,"LinkedList",67);sDn(981,1,UZn,eB),uZn.Nb=function(n){SV(this,n)},uZn.Rb=function(n){lW(this,n)},uZn.Ob=function(){return Jj(this)},uZn.Sb=function(){return this.b.b!=this.d.a},uZn.Pb=function(){return I6(this)},uZn.Tb=function(){return this.a},uZn.Ub=function(){return F4(this)},uZn.Vb=function(){return this.a-1},uZn.Qb=function(){yrn(this)},uZn.Wb=function(n){TK(!!this.c),this.c.c=n},uZn.a=0,uZn.c=null,zW(DZn,"LinkedList/ListIteratorImpl",981),sDn(617,1,{},R),zW(DZn,"LinkedList/Node",617),sDn(2057,1,{}),zW(DZn,"Locale",2057),sDn(873,2057,{},K),uZn.Ib=function(){return""},zW(DZn,"Locale/1",873),sDn(874,2057,{},F),uZn.Ib=function(){return"unknown"},zW(DZn,"Locale/4",874),sDn(112,63,{3:1,103:1,63:1,82:1,112:1},Bv,EY),zW(DZn,"NoSuchElementException",112),sDn(475,1,{475:1},Xy),uZn.Fb=function(n){var t;return n===this||!!F$(n,475)&&(t=uG(n,475),OJ(this.a,t.a))},uZn.Hb=function(){return VN(this.a)},uZn.Ib=function(){return null!=this.a?CZn+ox(this.a)+")":"Optional.empty()"},zW(DZn,"Optional",475),sDn(414,1,{414:1},uL,wR),uZn.Fb=function(n){var t;return n===this||!!F$(n,414)&&(t=uG(n,414),this.a==t.a&&0==ugn(this.b,t.b))},uZn.Hb=function(){return this.a?t0(this.b):0},uZn.Ib=function(){return this.a?"OptionalDouble.of("+this.b+")":"OptionalDouble.empty()"},uZn.a=!1,uZn.b=0,zW(DZn,"OptionalDouble",414),sDn(524,1,{524:1},sL,dR),uZn.Fb=function(n){var t;return n===this||!!F$(n,524)&&(t=uG(n,524),this.a==t.a&&0==d$(this.b,t.b))},uZn.Hb=function(){return this.a?this.b:0},uZn.Ib=function(){return this.a?"OptionalInt.of("+this.b+")":"OptionalInt.empty()"},uZn.a=!1,uZn.b=0,zW(DZn,"OptionalInt",524),sDn(510,2103,RZn,Kz),uZn.Gc=function(n){return _jn(this,n)},uZn.$b=function(){Xv(this.b.c,0)},uZn.Hc=function(n){return-1!=(null==n?-1:Ten(this.b,n,0))},uZn.Kc=function(){return new Qw(this)},uZn.Mc=function(n){return yon(this,n)},uZn.gc=function(){return this.b.c.length},uZn.Nc=function(){return new h3(this,256)},uZn.Pc=function(){return tq(this.b.c)},uZn.Qc=function(n){return Ekn(this.b,n)},zW(DZn,"PriorityQueue",510),sDn(1296,1,$Zn,Qw),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return this.a<this.c.b.c.length},uZn.Pb=function(){return MK(this.a<this.c.b.c.length),this.b=this.a++,zq(this.c.b,this.b)},uZn.Qb=function(){TK(-1!=this.b),Con(this.c,this.a=this.b),this.b=-1},uZn.a=0,uZn.b=-1,zW(DZn,"PriorityQueue/1",1296),sDn(234,1,{234:1},Upn,v8),uZn.a=0,uZn.b=0;var but,wut,dut,gut=0;zW(DZn,"Random",234),sDn(25,1,WZn,h3,LW,MY),uZn.Ad=function(n){return!!(this.a&n)},uZn.yd=function(){return this.a},uZn.zd=function(){return zz(this),this.c},uZn.Nb=function(n){zz(this),this.d.Nb(n)},uZn.Bd=function(n){return urn(this,n)},uZn.a=0,uZn.c=0,zW(DZn,"Spliterators/IteratorSpliterator",25),sDn(495,25,WZn,GP),zW(DZn,"SortedSet/1",495),sDn(611,1,_0n,id),uZn.Pe=function(n){this.a.Cd(n)},zW(DZn,"Spliterator/OfDouble/0methodref$accept$Type",611),sDn(612,1,_0n,ed),uZn.Pe=function(n){this.a.Cd(n)},zW(DZn,"Spliterator/OfDouble/1methodref$accept$Type",612),sDn(613,1,JZn,rd),uZn.Dd=function(n){this.a.Cd(xwn(n))},zW(DZn,"Spliterator/OfInt/2methodref$accept$Type",613),sDn(614,1,JZn,cd),uZn.Dd=function(n){this.a.Cd(xwn(n))},zW(DZn,"Spliterator/OfInt/3methodref$accept$Type",614),sDn(625,1,WZn),uZn.Nb=function(n){$j(this,n)},uZn.Ad=function(n){return!!(this.d&n)},uZn.yd=function(){return this.d},uZn.zd=function(){return this.e},uZn.d=0,uZn.e=0,zW(DZn,"Spliterators/BaseSpliterator",625),sDn(736,625,WZn),uZn.Qe=function(n){tE(this,n)},uZn.Nb=function(n){F$(n,189)?tE(this,uG(n,189)):tE(this,new ed(n))},uZn.Bd=function(n){return F$(n,189)?this.Re(uG(n,189)):this.Re(new id(n))},zW(DZn,"Spliterators/AbstractDoubleSpliterator",736),sDn(735,625,WZn),uZn.Qe=function(n){tE(this,n)},uZn.Nb=function(n){F$(n,202)?tE(this,uG(n,202)):tE(this,new cd(n))},uZn.Bd=function(n){return F$(n,202)?this.Re(uG(n,202)):this.Re(new rd(n))},zW(DZn,"Spliterators/AbstractIntSpliterator",735),sDn(500,625,WZn),zW(DZn,"Spliterators/AbstractSpliterator",500),sDn(706,1,WZn),uZn.Nb=function(n){$j(this,n)},uZn.Ad=function(n){return!!(this.b&n)},uZn.yd=function(){return this.b},uZn.zd=function(){return this.d-this.c},uZn.b=0,uZn.c=0,uZn.d=0,zW(DZn,"Spliterators/BaseArraySpliterator",706),sDn(960,706,WZn,Sq),uZn.Se=function(n,t){bT(this,uG(n,41),t)},uZn.Nb=function(n){hQ(this,n)},uZn.Bd=function(n){return x7(this,n)},zW(DZn,"Spliterators/ArraySpliterator",960),sDn(707,706,WZn,__),uZn.Se=function(n,t){wT(this,uG(n,189),t)},uZn.Qe=function(n){hQ(this,n)},uZn.Nb=function(n){F$(n,189)?hQ(this,uG(n,189)):hQ(this,new ed(n))},uZn.Re=function(n){return x7(this,n)},uZn.Bd=function(n){return F$(n,189)?x7(this,uG(n,189)):x7(this,new id(n))},zW(DZn,"Spliterators/DoubleArraySpliterator",707),sDn(2066,1,WZn),uZn.Nb=function(n){$j(this,n)},uZn.Ad=function(n){return!!(16448&n)},uZn.yd=function(){return 16448},uZn.zd=function(){return 0},zW(DZn,"Spliterators/EmptySpliterator",2066),sDn(959,2066,WZn,_),uZn.Qe=function(n){Bl(n)},uZn.Nb=function(n){F$(n,202)?Bl(uG(n,202)):Bl(new cd(n))},uZn.Re=function(n){return HP(n)},uZn.Bd=function(n){return F$(n,202)?HP(uG(n,202)):HP(new rd(n))},zW(DZn,"Spliterators/EmptySpliterator/OfInt",959),sDn(588,56,J0n,ck),uZn.bd=function(n,t){Vz(n,this.a.c.length+1),GX(this.a,n,t)},uZn.Fc=function(n){return kD(this.a,n)},uZn.cd=function(n,t){return Vz(n,this.a.c.length+1),Cbn(this.a,n,t)},uZn.Gc=function(n){return Ohn(this.a,n)},uZn.$b=function(){Xv(this.a.c,0)},uZn.Hc=function(n){return-1!=Ten(this.a,n,0)},uZn.Ic=function(n){return yhn(this.a,n)},uZn.Jc=function(n){Prn(this.a,n)},uZn.Xb=function(n){return Vz(n,this.a.c.length),zq(this.a,n)},uZn.dd=function(n){return Ten(this.a,n,0)},uZn.dc=function(){return 0==this.a.c.length},uZn.Kc=function(){return new Ww(this.a)},uZn.gd=function(n){return Vz(n,this.a.c.length),i7(this.a,n)},uZn.ce=function(n,t){P2(this.a,n,t)},uZn.hd=function(n,t){return Vz(n,this.a.c.length),Y8(this.a,n,t)},uZn.gc=function(){return this.a.c.length},uZn.jd=function(n){f$(this.a,n)},uZn.kd=function(n,t){return new C2(this.a,n,t)},uZn.Pc=function(){return tq(this.a.c)},uZn.Qc=function(n){return Ekn(this.a,n)},uZn.Ib=function(){return vIn(this.a)},zW(DZn,"Vector",588),sDn(824,588,J0n,Ok),zW(DZn,"Stack",824),sDn(213,1,{213:1},Ysn),uZn.Ib=function(){return R4(this)},zW(DZn,"StringJoiner",213),sDn(553,2090,{3:1,85:1,139:1,133:1},hS,Hz),uZn.$b=function(){Jy(this)},uZn.De=function(){return new i6(this)},uZn.vc=function(){return new kx(this)},uZn.Ee=function(n){return Zmn(this,n,!0)},uZn.Fe=function(n){return mln(this,n)},uZn.Ge=function(){return Ytn(this)},uZn.He=function(n){return nvn(this,n,!0)},uZn.Ie=function(n){return Zmn(this,n,!1)},uZn.Je=function(){return Ztn(this)},uZn.Ke=function(n){return nvn(this,n,!1)},uZn.Zc=function(n,t){return N2(this,n,t)},uZn.zc=function(n,t){return xfn(this,n,t)},uZn.Bc=function(n){return V1(this,n)},uZn.Le=function(n){return Lnn(this,n)},uZn.gc=function(){return this.c},uZn.ad=function(n,t){return $2(this,n,t)},uZn.c=0,zW(DZn,"TreeMap",553),sDn(554,1,$Zn,i6,dun),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return kR(this)},uZn.Ob=function(){return AP(this.a)},uZn.Qb=function(){rB(this)},zW(DZn,"TreeMap/EntryIterator",554),sDn(1142,629,FZn,kx),uZn.$b=function(){Jy(this.a)},zW(DZn,"TreeMap/EntrySet",1142),sDn(447,397,{494:1,397:1,44:1,447:1},_nn),uZn.b=!1;var put,mut,vut,kut,yut=zW(DZn,"TreeMap/Node",447);sDn(630,1,{},B),uZn.Ib=function(){return"State: mv="+this.c+" value="+this.d+" done="+this.a+" found="+this.b},uZn.a=!1,uZn.b=!1,uZn.c=!1,zW(DZn,"TreeMap/State",630),sDn(631,2090,_Zn,AOn),uZn.De=function(){return new dun(this.c,this.f,this.b,this.a,this.e,this.d)},uZn.vc=function(){return new Uw(this)},uZn.Ee=function(n){return SG(this,Zmn(this.c,n,!0))},uZn.Fe=function(n){return SG(this,mln(this.c,n))},uZn.Ge=function(){var n;return(n=this.f.Te()?this.a?Zmn(this.c,this.b,!0):Zmn(this.c,this.b,!1):Ytn(this.c))&&$Q(this,n.d)?n:null},uZn.He=function(n){return SG(this,nvn(this.c,n,!0))},uZn.Ie=function(n){return SG(this,Zmn(this.c,n,!1))},uZn.Je=function(){var n;return(n=this.f.Ue()?this.d?nvn(this.c,this.e,!0):nvn(this.c,this.e,!1):Ztn(this.c))&&$Q(this,n.d)?n:null},uZn.Ke=function(n){return SG(this,nvn(this.c,n,!1))},uZn.Zc=function(n,t){if(this.f.Ue()&&this.c.a.Ne(n,this.e)>0)throw hv(new vM(Y0n+n+" greater than "+this.e));return this.f.Te()?G1(this.c,this.b,this.a,n,t):N2(this.c,n,t)},uZn.zc=function(n,t){if(!ljn(this.c,this.f,n,this.b,this.a,this.e,this.d))throw hv(new vM(n+" outside the range "+this.b+" to "+this.e));return xfn(this.c,n,t)},uZn.Bc=function(n){var t;return t=n,ljn(this.c,this.f,t,this.b,this.a,this.e,this.d)?V1(this.c,t):null},uZn.Le=function(n){return $Q(this,n.ld())&&Lnn(this.c,n)},uZn.gc=function(){var n,t,e;if(!((t=this.f.Te()?this.a?Zmn(this.c,this.b,!0):Zmn(this.c,this.b,!1):Ytn(this.c))&&$Q(this,t.d)&&t))return 0;for(n=0,e=new dun(this.c,this.f,this.b,this.a,this.e,this.d);AP(e.a);e.b=uG(_Y(e.a),44))++n;return n},uZn.ad=function(n,t){if(this.f.Te()&&this.c.a.Ne(n,this.b)<0)throw hv(new vM(Y0n+n+Z0n+this.b));return this.f.Ue()?G1(this.c,n,t,this.e,this.d):$2(this.c,n,t)},uZn.a=!1,uZn.d=!1,zW(DZn,"TreeMap/SubMap",631),sDn(304,22,n2n,qP),uZn.Te=function(){return!1},uZn.Ue=function(){return!1};var Mut,Tut=_cn(DZn,"TreeMap/SubMapType",304,Oat,K6,hB);sDn(1143,304,n2n,SN),uZn.Ue=function(){return!0},_cn(DZn,"TreeMap/SubMapType/1",1143,Tut,null,null),sDn(1144,304,n2n,P$),uZn.Te=function(){return!0},uZn.Ue=function(){return!0},_cn(DZn,"TreeMap/SubMapType/2",1144,Tut,null,null),sDn(1145,304,n2n,EN),uZn.Te=function(){return!0},_cn(DZn,"TreeMap/SubMapType/3",1145,Tut,null,null),sDn(157,KZn,{3:1,20:1,31:1,16:1,277:1,21:1,87:1,157:1},rk,Hj,od),uZn.Nc=function(){return new GP(this)},uZn.Fc=function(n){return _V(this,n)},uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return this.a._b(n)},uZn.Kc=function(){return this.a.ec().Kc()},uZn.Mc=function(n){return sD(this,n)},uZn.gc=function(){return this.a.gc()};var jut=zW(DZn,"TreeSet",157);sDn(1082,1,{},ud),uZn.Ve=function(n,t){return _K(this.a,n,t)},zW(t2n,"BinaryOperator/lambda$0$Type",1082),sDn(1083,1,{},sd),uZn.Ve=function(n,t){return BK(this.a,n,t)},zW(t2n,"BinaryOperator/lambda$1$Type",1083),sDn(952,1,{},H),uZn.Kb=function(n){return n},zW(t2n,"Function/lambda$0$Type",952),sDn(395,1,y1n,hd),uZn.Mb=function(n){return!this.a.Mb(n)},zW(t2n,"Predicate/lambda$2$Type",395),sDn(581,1,{581:1});var Eut,Sut,Put=zW(e2n,"Handler",581);sDn(2107,1,yZn),uZn.xe=function(){return"DUMMY"},uZn.Ib=function(){return this.xe()},zW(e2n,"Level",2107),sDn(1706,2107,yZn,U),uZn.xe=function(){return"INFO"},zW(e2n,"Level/LevelInfo",1706),sDn(1843,1,{},ik),zW(e2n,"LogManager",1843),sDn(1896,1,yZn,iB),uZn.b=null,zW(e2n,"LogRecord",1896),sDn(525,1,{525:1},e9),uZn.e=!1;var Cut,Iut,Out,Aut=!1,Lut=!1,Nut=!1,$ut=!1,Dut=!1;zW(e2n,"Logger",525),sDn(835,581,{581:1},G),zW(e2n,"SimpleConsoleLogHandler",835),sDn(108,22,{3:1,34:1,22:1,108:1},XP);var xut,Rut=_cn(c2n,"Collector/Characteristics",108,Oat,D2,fB);sDn(758,1,{},WV),zW(c2n,"CollectorImpl",758),sDn(1074,1,{},q),uZn.Ve=function(n,t){return idn(uG(n,213),uG(t,213))},zW(c2n,"Collectors/10methodref$merge$Type",1074),sDn(1075,1,{},X),uZn.Kb=function(n){return R4(uG(n,213))},zW(c2n,"Collectors/11methodref$toString$Type",1075),sDn(1076,1,{},fd),uZn.Kb=function(n){return qx(),!!IL(n)},zW(c2n,"Collectors/12methodref$test$Type",1076),sDn(144,1,{},z),uZn.Yd=function(n,t){uG(n,16).Fc(t)},zW(c2n,"Collectors/20methodref$add$Type",144),sDn(146,1,{},V),uZn.Xe=function(){return new Zm},zW(c2n,"Collectors/21methodref$ctor$Type",146),sDn(359,1,{},W),uZn.Xe=function(){return new ek},zW(c2n,"Collectors/23methodref$ctor$Type",359),sDn(360,1,{},Q),uZn.Yd=function(n,t){FV(uG(n,49),t)},zW(c2n,"Collectors/24methodref$add$Type",360),sDn(1069,1,{},J),uZn.Ve=function(n,t){return IS(uG(n,15),uG(t,16))},zW(c2n,"Collectors/4methodref$addAll$Type",1069),sDn(1073,1,{},Y),uZn.Yd=function(n,t){o7(uG(n,213),uG(t,484))},zW(c2n,"Collectors/9methodref$add$Type",1073),sDn(1072,1,{},fG),uZn.Xe=function(){return new Ysn(this.a,this.b,this.c)},zW(c2n,"Collectors/lambda$15$Type",1072),sDn(1077,1,{},Z),uZn.Xe=function(){var n;return Akn(n=new u8,(qx(),!1),new Zm),Akn(n,!0,new Zm),n},zW(c2n,"Collectors/lambda$22$Type",1077),sDn(1078,1,{},ld),uZn.Xe=function(){return Uhn(cT(dat,1),EZn,1,5,[this.a])},zW(c2n,"Collectors/lambda$25$Type",1078),sDn(1079,1,{},bd),uZn.Yd=function(n,t){Yq(this.a,Kcn(n))},zW(c2n,"Collectors/lambda$26$Type",1079),sDn(1080,1,{},wd),uZn.Ve=function(n,t){return sV(this.a,Kcn(n),Kcn(t))},zW(c2n,"Collectors/lambda$27$Type",1080),sDn(1081,1,{},nn),uZn.Kb=function(n){return Kcn(n)[0]},zW(c2n,"Collectors/lambda$28$Type",1081),sDn(728,1,{},tn),uZn.Ve=function(n,t){return nX(n,t)},zW(c2n,"Collectors/lambda$4$Type",728),sDn(145,1,{},en),uZn.Ve=function(n,t){return ES(uG(n,16),uG(t,16))},zW(c2n,"Collectors/lambda$42$Type",145),sDn(361,1,{},rn),uZn.Ve=function(n,t){return SS(uG(n,49),uG(t,49))},zW(c2n,"Collectors/lambda$50$Type",361),sDn(362,1,{},cn),uZn.Kb=function(n){return uG(n,49)},zW(c2n,"Collectors/lambda$51$Type",362),sDn(1068,1,{},dd),uZn.Yd=function(n,t){vln(this.a,uG(n,85),t)},zW(c2n,"Collectors/lambda$7$Type",1068),sDn(1070,1,{},an),uZn.Ve=function(n,t){return Ahn(uG(n,85),uG(t,85),new J)},zW(c2n,"Collectors/lambda$8$Type",1070),sDn(1071,1,{},gd),uZn.Kb=function(n){return zgn(this.a,uG(n,85))},zW(c2n,"Collectors/lambda$9$Type",1071),sDn(550,1,{}),uZn.$e=function(){qQ(this)},uZn.d=!1,zW(c2n,"TerminatableStream",550),sDn(827,550,a2n,IK),uZn.$e=function(){qQ(this)},zW(c2n,"DoubleStreamImpl",827),sDn(1847,736,WZn,lG),uZn.Re=function(n){return FMn(this,uG(n,189))},uZn.a=null,zW(c2n,"DoubleStreamImpl/2",1847),sDn(1848,1,_0n,pd),uZn.Pe=function(n){$N(this.a,n)},zW(c2n,"DoubleStreamImpl/2/lambda$0$Type",1848),sDn(1845,1,_0n,md),uZn.Pe=function(n){NN(this.a,n)},zW(c2n,"DoubleStreamImpl/lambda$0$Type",1845),sDn(1846,1,_0n,vd),uZn.Pe=function(n){Mmn(this.a,n)},zW(c2n,"DoubleStreamImpl/lambda$2$Type",1846),sDn(1397,735,WZn,i9),uZn.Re=function(n){return e6(this,uG(n,202))},uZn.a=0,uZn.b=0,uZn.c=0,zW(c2n,"IntStream/5",1397),sDn(806,550,a2n,OK),uZn.$e=function(){qQ(this)},uZn._e=function(){return GQ(this),this.a},zW(c2n,"IntStreamImpl",806),sDn(807,550,a2n,mS),uZn.$e=function(){qQ(this)},uZn._e=function(){return GQ(this),BD(),dut},zW(c2n,"IntStreamImpl/Empty",807),sDn(1687,1,JZn,kd),uZn.Dd=function(n){msn(this.a,n)},zW(c2n,"IntStreamImpl/lambda$4$Type",1687);var Kut,Fut=Iq(c2n,"Stream");sDn(26,550,{533:1,687:1,848:1},fX),uZn.$e=function(){qQ(this)},zW(c2n,"StreamImpl",26),sDn(1102,500,WZn,D_),uZn.Bd=function(n){for(;Ttn(this);){if(this.a.Bd(n))return!0;qQ(this.b),this.b=null,this.a=null}return!1},zW(c2n,"StreamImpl/1",1102),sDn(1103,1,QZn,yd),uZn.Cd=function(n){mG(this.a,uG(n,848))},zW(c2n,"StreamImpl/1/lambda$0$Type",1103),sDn(1104,1,y1n,Md),uZn.Mb=function(n){return FV(this.a,n)},zW(c2n,"StreamImpl/1methodref$add$Type",1104),sDn(1105,500,WZn,QY),uZn.Bd=function(n){var t;return this.a||(t=new Zm,this.b.a.Nb(new Td(t)),hZ(),f$(t,this.c),this.a=new h3(t,16)),urn(this.a,n)},uZn.a=null,zW(c2n,"StreamImpl/5",1105),sDn(1106,1,QZn,Td),uZn.Cd=function(n){kD(this.a,n)},zW(c2n,"StreamImpl/5/2methodref$add$Type",1106),sDn(737,500,WZn,ien),uZn.Bd=function(n){for(this.b=!1;!this.b&&this.c.Bd(new WP(this,n)););return this.b},uZn.b=!1,zW(c2n,"StreamImpl/FilterSpliterator",737),sDn(1096,1,QZn,WP),uZn.Cd=function(n){Xz(this.a,this.b,n)},zW(c2n,"StreamImpl/FilterSpliterator/lambda$0$Type",1096),sDn(1091,736,WZn,s7),uZn.Re=function(n){return v_(this,uG(n,189))},zW(c2n,"StreamImpl/MapToDoubleSpliterator",1091),sDn(1095,1,QZn,QP),uZn.Cd=function(n){vC(this.a,this.b,n)},zW(c2n,"StreamImpl/MapToDoubleSpliterator/lambda$0$Type",1095),sDn(1090,735,WZn,h7),uZn.Re=function(n){return k_(this,uG(n,202))},zW(c2n,"StreamImpl/MapToIntSpliterator",1090),sDn(1094,1,QZn,JP),uZn.Cd=function(n){kC(this.a,this.b,n)},zW(c2n,"StreamImpl/MapToIntSpliterator/lambda$0$Type",1094),sDn(734,500,WZn,f7),uZn.Bd=function(n){return y_(this,n)},zW(c2n,"StreamImpl/MapToObjSpliterator",734),sDn(1093,1,QZn,YP),uZn.Cd=function(n){yC(this.a,this.b,n)},zW(c2n,"StreamImpl/MapToObjSpliterator/lambda$0$Type",1093),sDn(1092,500,WZn,Fan),uZn.Bd=function(n){for(;NP(this.b,0);){if(!this.a.Bd(new on))return!1;this.b=$gn(this.b,1)}return this.a.Bd(n)},uZn.b=0,zW(c2n,"StreamImpl/SkipSpliterator",1092),sDn(1097,1,QZn,on),uZn.Cd=function(n){},zW(c2n,"StreamImpl/SkipSpliterator/lambda$0$Type",1097),sDn(626,1,QZn,un),uZn.Cd=function(n){Ob(this,n)},zW(c2n,"StreamImpl/ValueConsumer",626),sDn(1098,1,QZn,sn),uZn.Cd=function(n){vS()},zW(c2n,"StreamImpl/lambda$0$Type",1098),sDn(1099,1,QZn,hn),uZn.Cd=function(n){vS()},zW(c2n,"StreamImpl/lambda$1$Type",1099),sDn(1100,1,{},jd),uZn.Ve=function(n,t){return FB(this.a,n,t)},zW(c2n,"StreamImpl/lambda$4$Type",1100),sDn(1101,1,QZn,nC),uZn.Cd=function(n){kF(this.b,this.a,n)},zW(c2n,"StreamImpl/lambda$5$Type",1101),sDn(1107,1,QZn,Ed),uZn.Cd=function(n){Usn(this.a,uG(n,380))},zW(c2n,"TerminatableStream/lambda$0$Type",1107),sDn(2142,1,{}),sDn(2014,1,{},fn),zW("javaemul.internal","ConsoleLogger",2014);var _ut=0;sDn(2134,1,{}),sDn(1830,1,QZn,ln),uZn.Cd=function(n){uG(n,317)},zW(l2n,"BowyerWatsonTriangulation/lambda$0$Type",1830),sDn(1831,1,QZn,Pd),uZn.Cd=function(n){Qon(this.a,uG(n,317).e)},zW(l2n,"BowyerWatsonTriangulation/lambda$1$Type",1831),sDn(1832,1,QZn,bn),uZn.Cd=function(n){uG(n,177)},zW(l2n,"BowyerWatsonTriangulation/lambda$2$Type",1832),sDn(1827,1,b2n,Cd),uZn.Ne=function(n,t){return S5(this.a,uG(n,177),uG(t,177))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(l2n,"NaiveMinST/lambda$0$Type",1827),sDn(449,1,{},Sd),zW(l2n,"NodeMicroLayout",449),sDn(177,1,{177:1},ZP),uZn.Fb=function(n){var t;return!!F$(n,177)&&(t=uG(n,177),OJ(this.a,t.a)&&OJ(this.b,t.b)||OJ(this.a,t.b)&&OJ(this.b,t.a))},uZn.Hb=function(){return VN(this.a)+VN(this.b)};var But=zW(l2n,"TEdge",177);sDn(317,1,{317:1},gqn),uZn.Fb=function(n){var t;return!!F$(n,317)&&Den(this,(t=uG(n,317)).a)&&Den(this,t.b)&&Den(this,t.c)},uZn.Hb=function(){return VN(this.a)+VN(this.b)+VN(this.c)},zW(l2n,"TTriangle",317),sDn(225,1,{225:1},C$),zW(l2n,"Tree",225),sDn(1218,1,{},q0),zW(w2n,"Scanline",1218);var Hut=Iq(w2n,d2n);sDn(1758,1,{},Qin),zW(g2n,"CGraph",1758),sDn(316,1,{316:1},V0),uZn.b=0,uZn.c=0,uZn.d=0,uZn.g=0,uZn.i=0,uZn.k=T0n,zW(g2n,"CGroup",316),sDn(830,1,{},fk),zW(g2n,"CGroup/CGroupBuilder",830),sDn(60,1,{60:1},NF),uZn.Ib=function(){return this.j?mK(this.j.Kb(this)):(vK(zut),zut.o+"@"+(xx(this)>>>0).toString(16))},uZn.f=0,uZn.i=T0n;var Uut,Gut,qut,Xut,zut=zW(g2n,"CNode",60);sDn(829,1,{},lk),zW(g2n,"CNode/CNodeBuilder",829),sDn(1590,1,{},wn),uZn.ff=function(n,t){return 0},uZn.gf=function(n,t){return 0},zW(g2n,m2n,1590),sDn(1853,1,{},dn),uZn.cf=function(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(h=M0n,r=new Ww(n.a.b);r.a<r.c.c.length;)t=uG(N3(r),60),h=e.Math.min(h,t.a.j.d.c+t.b.a);for(w=new lS,o=new Ww(n.a.a);o.a<o.c.c.length;)(a=uG(N3(o),316)).k=h,0==a.g&&s8(w,a,w.c.b,w.c);for(;0!=w.b;){for(c=(a=uG(0==w.b?null:(MK(0!=w.b),Lrn(w,w.a.a)),316)).j.d.c,b=a.a.a.ec().Kc();b.Ob();)f=uG(b.Pb(),60),g=a.k+f.b.a,!lwn(n,a,n.d)||f.d.c<g?f.i=g:f.i=f.d.c;for(c-=a.j.i,a.b+=c,n.d==(xdn(),YDt)||n.d==QDt?a.c+=c:a.c-=c,l=a.a.a.ec().Kc();l.Ob();)for(s=(f=uG(l.Pb(),60)).c.Kc();s.Ob();)u=uG(s.Pb(),60),d=hN(n.d)?n.g.ff(f,u):n.g.gf(f,u),u.a.k=e.Math.max(u.a.k,f.i+f.d.b+d-u.b.a),NZ(n,u,n.d)&&(u.a.k=e.Math.max(u.a.k,u.d.c-u.b.a)),--u.a.g,0==u.a.g&&aq(w,u.a)}for(i=new Ww(n.a.b);i.a<i.c.c.length;)(t=uG(N3(i),60)).d.c=t.i},zW(g2n,"LongestPathCompaction",1853),sDn(1756,1,{},w$n),uZn.e=!1;var Vut,Wut,Qut=zW(g2n,T2n,1756);sDn(1757,1,QZn,Id),uZn.Cd=function(n){Khn(this.a,uG(n,42))},zW(g2n,j2n,1757),sDn(1854,1,{},gn),uZn.df=function(n){var t,e,i,r,c,a;for(t=new Ww(n.a.b);t.a<t.c.c.length;)uG(N3(t),60).c.$b();for(i=new Ww(n.a.b);i.a<i.c.c.length;)for(e=uG(N3(i),60),c=new Ww(n.a.b);c.a<c.c.c.length;)e!=(r=uG(N3(c),60))&&(e.a&&e.a==r.a||(a=hN(n.d)?n.g.gf(e,r):n.g.ff(e,r),(r.d.c>e.d.c||e.d.c==r.d.c&&e.d.b<r.d.b)&&uvn(r.d.d+r.d.a+a,e.d.d)&&svn(r.d.d,e.d.d+e.d.a+a)&&e.c.Fc(r)))},zW(g2n,"QuadraticConstraintCalculation",1854),sDn(529,1,{529:1},nv),uZn.a=!1,uZn.b=!1,uZn.c=!1,uZn.d=!1,zW(g2n,E2n,529),sDn(817,1,{},tz),uZn.df=function(n){this.c=n,QAn(this,new vn)},zW(g2n,S2n,817),sDn(1784,1,{693:1},KZ),uZn.bf=function(n){SAn(this,uG(n,473))},zW(g2n,P2n,1784),sDn(1785,1,b2n,pn),uZn.Ne=function(n,t){return eY(uG(n,60),uG(t,60))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(g2n,C2n,1785),sDn(473,1,{473:1},tC),uZn.a=!1,zW(g2n,I2n,473),sDn(1786,1,b2n,mn),uZn.Ne=function(n,t){return xEn(uG(n,473),uG(t,473))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(g2n,O2n,1786),sDn(1787,1,A2n,vn),uZn.Lb=function(n){return uG(n,60),!0},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return uG(n,60),!0},zW(g2n,"ScanlineConstraintCalculator/lambda$1$Type",1787),sDn(436,22,{3:1,34:1,22:1,436:1},eC);var Jut,Yut,Zut,nst=_cn(L2n,"HighLevelSortingCriterion",436,Oat,u1,lB);sDn(435,22,{3:1,34:1,22:1,435:1},iC);var tst,est,ist,rst,cst,ast,ost,ust,sst,hst,fst,lst,bst,wst,dst,gst,pst,mst=_cn(L2n,"LowLevelSortingCriterion",435,Oat,s1,bB),vst=Iq(N2n,"ILayoutMetaDataProvider");sDn(864,1,K2n,Bf),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,$2n),F2n),"Polyomino Traversal Strategy"),"Traversal strategy for trying different candidate positions for polyominoes."),ust),(lAn(),gNt)),yst),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,D2n),F2n),"Polyomino Secondary Sorting Criterion"),"Possible secondary sorting criteria for the processing order of polyominoes. They are used when polyominoes are equal according to the primary sorting criterion HighLevelSortingCriterion."),ast),gNt),mst),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,x2n),F2n),"Polyomino Primary Sorting Criterion"),"Possible primary sorting criteria for the processing order of polyominoes."),rst),gNt),nst),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,R2n),F2n),"Fill Polyominoes"),"Use the Profile Fill algorithm to fill polyominoes to prevent small polyominoes from being placed inside of big polyominoes with large holes. Might increase packing area."),(qx(),!0)),wNt),cot),ggn(hNt))))},zW(L2n,"PolyominoOptions",864),sDn(257,22,{3:1,34:1,22:1,257:1},rC);var kst,yst=_cn(L2n,"TraversalStrategy",257,Oat,nan,wB);sDn(218,1,{218:1},kn),uZn.Ib=function(){return"NEdge[id="+this.b+" w="+this.g+" d="+this.a+"]"},uZn.a=1,uZn.b=0,uZn.c=0,uZn.f=!1,uZn.g=0;var Mst=zW(_2n,"NEdge",218);sDn(182,1,{},uk),zW(_2n,"NEdge/NEdgeBuilder",182),sDn(662,1,{},ak),zW(_2n,"NGraph",662),sDn(125,1,{125:1},g7),uZn.c=-1,uZn.d=0,uZn.e=0,uZn.i=-1,uZn.j=!1;var Tst=zW(_2n,"NNode",125);sDn(808,1,K0n,ok),uZn.Jc=function(n){z8(this,n)},uZn.Lc=function(){return new fX(null,new h3(this,16))},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.Oc=function(){return new fX(null,new h3(this,16))},uZn.bd=function(n,t){++this.b,GX(this.a,n,t)},uZn.Fc=function(n){return Sx(this,n)},uZn.cd=function(n,t){return++this.b,Cbn(this.a,n,t)},uZn.Gc=function(n){return++this.b,Ohn(this.a,n)},uZn.$b=function(){++this.b,Xv(this.a.c,0)},uZn.Hc=function(n){return-1!=Ten(this.a,n,0)},uZn.Ic=function(n){return yhn(this.a,n)},uZn.Xb=function(n){return zq(this.a,n)},uZn.dd=function(n){return Ten(this.a,n,0)},uZn.dc=function(){return 0==this.a.c.length},uZn.Kc=function(){return jtn(new Ww(this.a))},uZn.ed=function(){throw hv(new Kv)},uZn.fd=function(n){throw hv(new Kv)},uZn.gd=function(n){return++this.b,i7(this.a,n)},uZn.Mc=function(n){return Px(this,n)},uZn.hd=function(n,t){return++this.b,Y8(this.a,n,t)},uZn.gc=function(){return this.a.c.length},uZn.kd=function(n,t){return new C2(this.a,n,t)},uZn.Pc=function(){return tq(this.a.c)},uZn.Qc=function(n){return Ekn(this.a,n)},uZn.b=0,zW(_2n,"NNode/ChangeAwareArrayList",808),sDn(275,1,{},sk),zW(_2n,"NNode/NNodeBuilder",275),sDn(1695,1,{},yn),uZn.a=!1,uZn.f=vZn,uZn.j=0,zW(_2n,"NetworkSimplex",1695),sDn(1314,1,QZn,Od),uZn.Cd=function(n){uQn(this.a,uG(n,695),!0,!1)},zW(H2n,"NodeLabelAndSizeCalculator/lambda$0$Type",1314),sDn(565,1,{},Ad),uZn.b=!0,uZn.c=!0,uZn.d=!0,uZn.e=!0,zW(H2n,"NodeMarginCalculator",565),sDn(217,1,{217:1}),uZn.j=!1,uZn.k=!1;var jst,Est,Sst,Pst=zW(U2n,"Cell",217);sDn(127,217,{127:1,217:1},AF),uZn.jf=function(){return eq(this)},uZn.kf=function(){var n;return n=this.n,this.a.a+n.b+n.c},zW(U2n,"AtomicCell",127),sDn(237,22,{3:1,34:1,22:1,237:1},cC);var Cst,Ist=_cn(U2n,"ContainerArea",237,Oat,K2,dB);sDn(336,217,q2n),zW(U2n,"ContainerCell",336),sDn(1538,336,q2n,umn),uZn.jf=function(){var n;return n=0,this.e?this.b?n=this.b.b:this.a[1][1]&&(n=this.a[1][1].jf()):n=ypn(this,ATn(this,!0)),n>0?n+this.n.d+this.n.a:0},uZn.kf=function(){var n,t,i,r,c;if(c=0,this.e)this.b?c=this.b.a:this.a[1][1]&&(c=this.a[1][1].kf());else if(this.g)c=ypn(this,wEn(this,null,!0));else for(Yrn(),i=0,r=(t=Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length;i<r;++i)n=t[i],c=e.Math.max(c,ypn(this,wEn(this,n,!0)));return c>0?c+this.n.b+this.n.c:0},uZn.lf=function(){var n,t,e,i,r;if(this.g)for(n=wEn(this,null,!1),Yrn(),i=0,r=(e=Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length;i<r;++i)_Fn(this,t=e[i],n);else for(Yrn(),i=0,r=(e=Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length;i<r;++i)_Fn(this,t=e[i],n=wEn(this,t,!1))},uZn.mf=function(){var n,t,i,r;t=this.i,n=this.n,r=ATn(this,!1),J9(this,(Yrn(),jst),t.d+n.d,r),J9(this,Sst,t.d+t.a-n.a-r[2],r),i=t.a-n.d-n.a,r[0]>0&&(r[0]+=this.d,i-=r[0]),r[2]>0&&(r[2]+=this.d,i-=r[2]),this.c.a=e.Math.max(0,i),this.c.d=t.d+n.d+(this.c.a-i)/2,r[1]=e.Math.max(r[1],i),J9(this,Est,t.d+n.d+r[0]-(r[1]-i)/2,r)},uZn.b=null,uZn.d=0,uZn.e=!1,uZn.f=!1,uZn.g=!1;var Ost,Ast,Lst,Nst=0,$st=0;zW(U2n,"GridContainerCell",1538),sDn(471,22,{3:1,34:1,22:1,471:1},aC);var Dst,xst=_cn(U2n,"HorizontalLabelAlignment",471,Oat,R2,gB);sDn(314,217,{217:1,314:1},a0,Yin,c1),uZn.jf=function(){return iq(this)},uZn.kf=function(){return rq(this)},uZn.a=0,uZn.c=!1;var Rst,Kst,Fst,_st=zW(U2n,"LabelCell",314);sDn(252,336,{217:1,336:1,252:1},tkn),uZn.jf=function(){return dNn(this)},uZn.kf=function(){return gNn(this)},uZn.lf=function(){YGn(this)},uZn.mf=function(){rqn(this)},uZn.b=0,uZn.c=0,uZn.d=!1,zW(U2n,"StripContainerCell",252),sDn(1691,1,y1n,Mn),uZn.Mb=function(n){return $M(uG(n,217))},zW(U2n,"StripContainerCell/lambda$0$Type",1691),sDn(1692,1,{},Tn),uZn.Ye=function(n){return uG(n,217).kf()},zW(U2n,"StripContainerCell/lambda$1$Type",1692),sDn(1693,1,y1n,jn),uZn.Mb=function(n){return DM(uG(n,217))},zW(U2n,"StripContainerCell/lambda$2$Type",1693),sDn(1694,1,{},En),uZn.Ye=function(n){return uG(n,217).jf()},zW(U2n,"StripContainerCell/lambda$3$Type",1694),sDn(472,22,{3:1,34:1,22:1,472:1},oC);var Bst,Hst,Ust,Gst,qst,Xst,zst,Vst,Wst,Qst,Jst,Yst,Zst,nht,tht,eht,iht,rht,cht,aht,oht,uht,sht,hht=_cn(U2n,"VerticalLabelAlignment",472,Oat,x2,pB);sDn(800,1,{},kQn),uZn.c=0,uZn.d=0,uZn.k=0,uZn.s=0,uZn.t=0,uZn.v=!1,uZn.w=0,uZn.D=!1,zW(J2n,"NodeContext",800),sDn(1536,1,b2n,Sn),uZn.Ne=function(n,t){return UL(uG(n,64),uG(t,64))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(J2n,"NodeContext/0methodref$comparePortSides$Type",1536),sDn(1537,1,b2n,Pn),uZn.Ne=function(n,t){return ACn(uG(n,117),uG(t,117))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(J2n,"NodeContext/1methodref$comparePortContexts$Type",1537),sDn(164,22,{3:1,34:1,22:1,164:1},pun);var fht,lht,bht,wht,dht,ght,pht,mht=_cn(J2n,"NodeLabelLocation",164,Oat,Nkn,mB);sDn(117,1,{117:1},v$n),uZn.a=!1,zW(J2n,"PortContext",117),sDn(1541,1,QZn,Cn),uZn.Cd=function(n){eE(uG(n,314))},zW(n3n,t3n,1541),sDn(1542,1,y1n,In),uZn.Mb=function(n){return!!uG(n,117).c},zW(n3n,e3n,1542),sDn(1543,1,QZn,On),uZn.Cd=function(n){eE(uG(n,117).c)},zW(n3n,"LabelPlacer/lambda$2$Type",1543),sDn(1540,1,QZn,An),uZn.Cd=function(n){VK(),wv(uG(n,117))},zW(n3n,"NodeLabelAndSizeUtilities/lambda$0$Type",1540),sDn(801,1,QZn,DB),uZn.Cd=function(n){aP(this.b,this.c,this.a,uG(n,187))},uZn.a=!1,uZn.c=!1,zW(n3n,"NodeLabelCellCreator/lambda$0$Type",801),sDn(1539,1,QZn,Ld),uZn.Cd=function(n){Vv(this.a,uG(n,187))},zW(n3n,"PortContextCreator/lambda$0$Type",1539),sDn(1902,1,{},Ln),zW(r3n,"GreedyRectangleStripOverlapRemover",1902),sDn(1903,1,b2n,Nn),uZn.Ne=function(n,t){return Cx(uG(n,226),uG(t,226))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(r3n,"GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type",1903),sDn(1849,1,{},pk),uZn.a=5,uZn.e=0,zW(r3n,"RectangleStripOverlapRemover",1849),sDn(1850,1,b2n,$n),uZn.Ne=function(n,t){return Ix(uG(n,226),uG(t,226))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(r3n,"RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type",1850),sDn(1852,1,b2n,Dn),uZn.Ne=function(n,t){return fW(uG(n,226),uG(t,226))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(r3n,"RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type",1852),sDn(417,22,{3:1,34:1,22:1,417:1},uC);var vht,kht,yht,Mht,Tht,jht=_cn(r3n,"RectangleStripOverlapRemover/OverlapRemovalDirection",417,Oat,B6,vB);sDn(226,1,{226:1},ZX),zW(r3n,"RectangleStripOverlapRemover/RectangleNode",226),sDn(1851,1,QZn,Nd),uZn.Cd=function(n){lTn(this.a,uG(n,226))},zW(r3n,"RectangleStripOverlapRemover/lambda$1$Type",1851),sDn(1323,1,b2n,xn),uZn.Ne=function(n,t){return fzn(uG(n,176),uG(t,176))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(a3n,"PolyominoCompactor/CornerCasesGreaterThanRestComparator",1323),sDn(1326,1,{},Rn),uZn.Kb=function(n){return uG(n,334).a},zW(a3n,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type",1326),sDn(1327,1,y1n,Kn),uZn.Mb=function(n){return uG(n,332).a},zW(a3n,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type",1327),sDn(1328,1,y1n,Fn),uZn.Mb=function(n){return uG(n,332).a},zW(a3n,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type",1328),sDn(1321,1,b2n,_n),uZn.Ne=function(n,t){return JBn(uG(n,176),uG(t,176))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(a3n,"PolyominoCompactor/MinNumOfExtensionDirectionsComparator",1321),sDn(1324,1,{},Bn),uZn.Kb=function(n){return uG(n,334).a},zW(a3n,"PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type",1324),sDn(781,1,b2n,Hn),uZn.Ne=function(n,t){return lhn(uG(n,176),uG(t,176))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(a3n,"PolyominoCompactor/MinNumOfExtensionsComparator",781),sDn(1319,1,b2n,Un),uZn.Ne=function(n,t){return ron(uG(n,330),uG(t,330))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(a3n,"PolyominoCompactor/MinPerimeterComparator",1319),sDn(1320,1,b2n,Gn),uZn.Ne=function(n,t){return Byn(uG(n,330),uG(t,330))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(a3n,"PolyominoCompactor/MinPerimeterComparatorWithShape",1320),sDn(1322,1,b2n,qn),uZn.Ne=function(n,t){return zHn(uG(n,176),uG(t,176))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(a3n,"PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator",1322),sDn(1325,1,{},Xn),uZn.Kb=function(n){return uG(n,334).a},zW(a3n,"PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type",1325),sDn(782,1,{},sC),uZn.Ve=function(n,t){return d6(this,uG(n,42),uG(t,176))},zW(a3n,"SuccessorCombination",782),sDn(649,1,{},zn),uZn.Ve=function(n,t){var e;return KNn((e=uG(n,42),uG(t,176),e))},zW(a3n,"SuccessorJitter",649),sDn(648,1,{},Vn),uZn.Ve=function(n,t){var e;return cFn((e=uG(n,42),uG(t,176),e))},zW(a3n,"SuccessorLineByLine",648),sDn(573,1,{},Wn),uZn.Ve=function(n,t){var e;return txn((e=uG(n,42),uG(t,176),e))},zW(a3n,"SuccessorManhattan",573),sDn(1344,1,{},Qn),uZn.Ve=function(n,t){var e;return lKn((e=uG(n,42),uG(t,176),e))},zW(a3n,"SuccessorMaxNormWindingInMathPosSense",1344),sDn(409,1,{},$d),uZn.Ve=function(n,t){return HV(this,n,t)},uZn.c=!1,uZn.d=!1,uZn.e=!1,uZn.f=!1,zW(a3n,"SuccessorQuadrantsGeneric",409),sDn(1345,1,{},Jn),uZn.Kb=function(n){return uG(n,334).a},zW(a3n,"SuccessorQuadrantsGeneric/lambda$0$Type",1345),sDn(332,22,{3:1,34:1,22:1,332:1},hC),uZn.a=!1;var Eht,Sht=_cn(f3n,l3n,332,Oat,F6,kB);sDn(1317,1,{}),uZn.Ib=function(){var n,t,e,i,r,c;for(e=" ",n=xwn(0),r=0;r<this.o;r++)e+=""+n.a,n=xwn(xK(n.a));for(e+="\n",n=xwn(0),c=0;c<this.p;c++){for(e+=""+n.a,n=xwn(xK(n.a)),i=0;i<this.o;i++)0==dwn(t=Son(this,i,c),0)?e+="_":0==dwn(t,1)?e+="X":e+="0";e+="\n"}return r1(e,0,e.length-1)},uZn.o=0,uZn.p=0,zW(f3n,"TwoBitGrid",1317),sDn(330,1317,{330:1},smn),uZn.j=0,uZn.k=0,zW(f3n,"PlanarGrid",330),sDn(176,330,{330:1,176:1}),uZn.g=0,uZn.i=0,zW(f3n,"Polyomino",176);var Pht=Iq(p3n,m3n);sDn(137,1,v3n,Yn),uZn.qf=function(n,t){return vfn(this,n,t)},uZn.nf=function(){return MX(this)},uZn.of=function(n){return oIn(this,n)},uZn.pf=function(n){return vR(this,n)},zW(p3n,"MapPropertyHolder",137),sDn(1318,137,v3n,bFn),zW(f3n,"Polyominoes",1318);var Cht,Iht,Oht,Aht,Lht,Nht,$ht,Dht,xht=!1;sDn(1828,1,QZn,Zn),uZn.Cd=function(n){Szn(uG(n,225))},zW(k3n,"DepthFirstCompaction/0methodref$compactTree$Type",1828),sDn(825,1,QZn,Dd),uZn.Cd=function(n){JQ(this.a,uG(n,225))},zW(k3n,"DepthFirstCompaction/lambda$1$Type",825),sDn(1829,1,QZn,AB),uZn.Cd=function(n){zvn(this.a,this.b,this.c,uG(n,225))},zW(k3n,"DepthFirstCompaction/lambda$2$Type",1829),sDn(68,1,{68:1},G0),zW(k3n,"Node",68),sDn(1214,1,{},I$),zW(k3n,"ScanlineOverlapCheck",1214),sDn(1215,1,{693:1},_Z),uZn.bf=function(n){WK(this,uG(n,451))},zW(k3n,"ScanlineOverlapCheck/OverlapsScanlineHandler",1215),sDn(1216,1,b2n,nt),uZn.Ne=function(n,t){return ogn(uG(n,68),uG(t,68))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(k3n,"ScanlineOverlapCheck/OverlapsScanlineHandler/lambda$0$Type",1216),sDn(451,1,{451:1},fC),uZn.a=!1,zW(k3n,"ScanlineOverlapCheck/Timestamp",451),sDn(1217,1,b2n,tt),uZn.Ne=function(n,t){return REn(uG(n,451),uG(t,451))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(k3n,"ScanlineOverlapCheck/lambda$0$Type",1217),sDn(557,1,{},et),zW(y3n,"SVGImage",557),sDn(334,1,{334:1},LB),uZn.Ib=function(){return"("+this.a+TZn+this.b+TZn+this.c+")"},zW(y3n,"UniqueTriple",334),sDn(205,1,M3n),zW(T3n,"AbstractLayoutProvider",205),sDn(1114,205,M3n,it),uZn.rf=function(n,t){var e,i,r;t.Ug(j3n,1),this.a=uM(pK(zDn(n,(ryn(),ift)))),vnn(n,zht)&&(i=mK(zDn(n,zht)),(e=QBn(aan(),i))&&uG(A1(e.f),205).rf(n,t.eh(1))),r=new L5(this.a),this.b=FWn(r,n),0===uG(zDn(n,(pbn(),Hht)),489).g?(D$n(new rt,this.b),Myn(n,Qht,oIn(this.b,Qht))):(bS(),String.fromCharCode(10)),oQn(r),Myn(n,Wht,this.b),t.Vg()},uZn.a=0,zW(E3n,"DisCoLayoutProvider",1114),sDn(1208,1,{},rt),uZn.c=!1,uZn.e=0,uZn.f=0,zW(E3n,"DisCoPolyominoCompactor",1208),sDn(567,1,{567:1},hX),uZn.b=!0,zW(S3n,"DCComponent",567),sDn(406,22,{3:1,34:1,22:1,406:1},lC),uZn.a=!1;var Rht,Kht,Fht=_cn(S3n,"DCDirection",406,Oat,_6,yB);sDn(272,137,{3:1,272:1,96:1,137:1},pDn),zW(S3n,"DCElement",272),sDn(407,1,{407:1},bTn),uZn.c=0,zW(S3n,"DCExtension",407),sDn(762,137,v3n,ej),zW(S3n,"DCGraph",762),sDn(489,22,{3:1,34:1,22:1,489:1},qR);var _ht,Bht,Hht,Uht,Ght,qht,Xht,zht,Vht,Wht,Qht,Jht,Yht,Zht,nft,tft,eft,ift,rft,cft,aft,oft=_cn(P3n,C3n,489,Oat,LJ,MB);sDn(865,1,K2n,Hf),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,I3n),N3n),"Connected Components Compaction Strategy"),"Strategy for packing different connected components in order to save space and enhance readability of a graph."),Uht),(lAn(),gNt)),oft),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,O3n),N3n),"Connected Components Layout Algorithm"),"A layout algorithm that is to be applied to each connected component before the components themselves are compacted. If unspecified, the positions of the components' nodes are not altered."),kNt),$ot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,A3n),"debug"),"DCGraph"),"Access to the DCGraph is intended for the debug view,"),vNt),dat),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,L3n),"debug"),"List of Polyominoes"),"Access to the polyominoes is intended for the debug view,"),vNt),dat),ggn(hNt)))),nXn((new Uf,n))},zW(P3n,"DisCoMetaDataProvider",865),sDn(1010,1,K2n,Uf),uZn.hf=function(n){nXn(n)},zW(P3n,"DisCoOptions",1010),sDn(1011,1,{},ct),uZn.sf=function(){return new it},uZn.tf=function(n){},zW(P3n,"DisCoOptions/DiscoFactory",1011),sDn(568,176,{330:1,176:1,568:1},Uxn),uZn.a=0,uZn.b=0,uZn.c=0,uZn.d=0,zW("org.eclipse.elk.alg.disco.structures","DCPolyomino",568),sDn(1286,1,y1n,at),uZn.Mb=function(n){return IL(n)},zW(F3n,"ElkGraphComponentsProcessor/lambda$0$Type",1286),sDn(1287,1,{},ot),uZn.Kb=function(n){return lZ(),bIn(uG(n,74))},zW(F3n,"ElkGraphComponentsProcessor/lambda$1$Type",1287),sDn(1288,1,y1n,ut),uZn.Mb=function(n){return uq(uG(n,74))},zW(F3n,"ElkGraphComponentsProcessor/lambda$2$Type",1288),sDn(1289,1,{},st),uZn.Kb=function(n){return lZ(),gIn(uG(n,74))},zW(F3n,"ElkGraphComponentsProcessor/lambda$3$Type",1289),sDn(1290,1,y1n,ht),uZn.Mb=function(n){return sq(uG(n,74))},zW(F3n,"ElkGraphComponentsProcessor/lambda$4$Type",1290),sDn(1291,1,y1n,xd),uZn.Mb=function(n){return Z1(this.a,uG(n,74))},zW(F3n,"ElkGraphComponentsProcessor/lambda$5$Type",1291),sDn(1292,1,{},Rd),uZn.Kb=function(n){return aQ(this.a,uG(n,74))},zW(F3n,"ElkGraphComponentsProcessor/lambda$6$Type",1292),sDn(1205,1,{},L5),uZn.a=0,zW(F3n,"ElkGraphTransformer",1205),sDn(1206,1,{},ft),uZn.Yd=function(n,t){XNn(this,uG(n,167),uG(t,272))},zW(F3n,"ElkGraphTransformer/OffsetApplier",1206),sDn(1207,1,QZn,Kd),uZn.Cd=function(n){eD(this,uG(n,8))},zW(F3n,"ElkGraphTransformer/OffsetApplier/OffSetToChainApplier",1207),sDn(760,1,{},lt),zW(G3n,q3n,760),sDn(1195,1,b2n,bt),uZn.Ne=function(n,t){return kNn(uG(n,235),uG(t,235))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(G3n,X3n,1195),sDn(1196,1,QZn,bC),uZn.Cd=function(n){c3(this.b,this.a,uG(n,250))},zW(G3n,z3n,1196),sDn(738,205,M3n,hk),uZn.rf=function(n,t){Zxn(this,n,t)},zW(G3n,"ForceLayoutProvider",738),sDn(309,137,{3:1,309:1,96:1,137:1}),zW(V3n,"FParticle",309),sDn(250,309,{3:1,250:1,309:1,96:1,137:1},$W),uZn.Ib=function(){var n;return this.a?(n=Ten(this.a.a,this,0))>=0?"b"+n+"["+X8(this.a)+"]":"b["+X8(this.a)+"]":"b_"+xx(this)},zW(V3n,"FBendpoint",250),sDn(290,137,{3:1,290:1,96:1,137:1},$F),uZn.Ib=function(){return X8(this)},zW(V3n,"FEdge",290),sDn(235,137,{3:1,235:1,96:1,137:1},d7);var uft,sft,hft,fft,lft,bft,wft,dft,gft,pft,mft=zW(V3n,"FGraph",235);sDn(454,309,{3:1,454:1,309:1,96:1,137:1},A5),uZn.Ib=function(){return null==this.b||0==this.b.length?"l["+X8(this.a)+"]":"l_"+this.b},zW(V3n,"FLabel",454),sDn(153,309,{3:1,153:1,309:1,96:1,137:1},E$),uZn.Ib=function(){return z3(this)},uZn.a=0,zW(V3n,"FNode",153),sDn(2100,1,{}),uZn.vf=function(n){pGn(this,n)},uZn.wf=function(){ITn(this)},uZn.d=0,zW(Q3n,"AbstractForceModel",2100),sDn(641,2100,{641:1},lsn),uZn.uf=function(n,t){var i,r,c,a;return qzn(this.f,n,t),c=YF(D$(t.d),n.d),a=e.Math.sqrt(c.a*c.a+c.b*c.b),r=e.Math.max(0,a-NQ(n.e)/2-NQ(t.e)/2),vD(c,((i=VNn(this.e,n,t))>0?-iW(r,this.c)*i:TR(r,this.b)*uG(oIn(n,(cGn(),$ft)),17).a)/a),c},uZn.vf=function(n){pGn(this,n),this.a=uG(oIn(n,(cGn(),Tft)),17).a,this.c=uM(pK(oIn(n,_ft))),this.b=uM(pK(oIn(n,xft)))},uZn.xf=function(n){return n<this.a},uZn.a=0,uZn.b=0,uZn.c=0,zW(Q3n,"EadesModel",641),sDn(642,2100,{642:1},zG),uZn.uf=function(n,t){var i,r,c,a,o;return qzn(this.f,n,t),c=YF(D$(t.d),n.d),o=e.Math.sqrt(c.a*c.a+c.b*c.b),a=jR(r=e.Math.max(0,o-NQ(n.e)/2-NQ(t.e)/2),this.a)*uG(oIn(n,(cGn(),$ft)),17).a,(i=VNn(this.e,n,t))>0&&(a-=aM(r,this.a)*i),vD(c,a*this.b/o),c},uZn.vf=function(n){var t,i,r,c,a,o,u;for(pGn(this,n),this.b=uM(pK(oIn(n,(cGn(),Bft)))),this.c=this.b/uG(oIn(n,Tft),17).a,r=n.e.c.length,a=0,c=0,u=new Ww(n.e);u.a<u.c.c.length;)a+=(o=uG(N3(u),153)).e.a,c+=o.e.b;t=a*c,i=uM(pK(oIn(n,_ft)))*Z2n,this.a=e.Math.sqrt(t/(2*r))*i},uZn.wf=function(){ITn(this),this.b-=this.c},uZn.xf=function(n){return this.b>0},uZn.a=0,uZn.b=0,uZn.c=0,zW(Q3n,"FruchtermanReingoldModel",642),sDn(860,1,K2n,Gf),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,J3n),""),"Force Model"),"Determines the model for force calculation."),hft),(lAn(),gNt)),mlt),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Y3n),""),"Iterations"),"The number of iterations on the force model."),xwn(300)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Z3n),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),xwn(0)),mNt),dot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,n4n),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),t4n),dNt),fot),ggn(hNt)))),H4(n,n4n,J3n,dft),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,e4n),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),dNt),fot),ggn(hNt)))),H4(n,e4n,J3n,lft),vJn((new qf,n))},zW(i4n,"ForceMetaDataProvider",860),sDn(432,22,{3:1,34:1,22:1,432:1},wC);var vft,kft,yft,Mft,Tft,jft,Eft,Sft,Pft,Cft,Ift,Oft,Aft,Lft,Nft,$ft,Dft,xft,Rft,Kft,Fft,_ft,Bft,Hft,Uft,Gft,qft,Xft,zft,Vft,Wft,Qft,Jft,Yft,Zft,nlt,tlt,elt,ilt,rlt,clt,alt,olt,ult,slt,hlt,flt,llt,blt,wlt,dlt,glt,plt,mlt=_cn(i4n,"ForceModelStrategy",432,Oat,h1,TB);sDn($1n,1,K2n,qf),uZn.hf=function(n){vJn(n)},zW(i4n,"ForceOptions",$1n),sDn(1001,1,{},mt),uZn.sf=function(){return new hk},uZn.tf=function(n){},zW(i4n,"ForceOptions/ForceFactory",1001),sDn(861,1,K2n,Xf),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,I4n),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),(qx(),!1)),(lAn(),wNt)),cot),ggn((Rkn(),sNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,O4n),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),dNt),fot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[oNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,A4n),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),Zft),gNt),Clt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,L4n),""),"Stress Epsilon"),"Termination criterion for the iterative process."),t4n),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,N4n),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),xwn(vZn)),mNt),dot),ggn(hNt)))),sWn((new zf,n))},zW(i4n,"StressMetaDataProvider",861),sDn(1004,1,K2n,zf),uZn.hf=function(n){sWn(n)},zW(i4n,"StressOptions",1004),sDn(1005,1,{},gt),uZn.sf=function(){return new DF},uZn.tf=function(n){},zW(i4n,"StressOptions/StressFactory",1005),sDn(1110,205,M3n,DF),uZn.rf=function(n,t){var e,i,r,c;for(t.Ug(D4n,1),oM(gK(zDn(n,(Bjn(),olt))))?oM(gK(zDn(n,blt)))||J1(new Sd((vP(),new Vy(n)))):Zxn(new hk,n,t.eh(1)),i=yfn(n),c=(e=tqn(this.a,i)).Kc();c.Ob();)(r=uG(c.Pb(),235)).e.c.length<=1||(czn(this.b,r),QDn(this.b),Prn(r.d,new pt));YJn(i=lJn(e)),t.Vg()},zW(R4n,"StressLayoutProvider",1110),sDn(1111,1,QZn,pt),uZn.Cd=function(n){Yqn(uG(n,454))},zW(R4n,"StressLayoutProvider/lambda$0$Type",1111),sDn(1002,1,{},qv),uZn.c=0,uZn.e=0,uZn.g=0,zW(R4n,"StressMajorization",1002),sDn(391,22,{3:1,34:1,22:1,391:1},dC);var vlt,klt,ylt,Mlt,Tlt,jlt,Elt,Slt,Plt,Clt=_cn(R4n,"StressMajorization/Dimension",391,Oat,F2,jB);sDn(1003,1,b2n,Fd),uZn.Ne=function(n,t){return j_(this.a,uG(n,153),uG(t,153))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(R4n,"StressMajorization/lambda$0$Type",1003),sDn(1192,1,{},i4),zW(F4n,"ElkLayered",1192),sDn(1193,1,QZn,_d),uZn.Cd=function(n){OLn(this.a,uG(n,36))},zW(F4n,"ElkLayered/lambda$0$Type",1193),sDn(1194,1,QZn,Bd),uZn.Cd=function(n){E_(this.a,uG(n,36))},zW(F4n,"ElkLayered/lambda$1$Type",1194),sDn(1281,1,{},z$),zW(F4n,"GraphConfigurator",1281),sDn(770,1,QZn,Hd),uZn.Cd=function(n){XIn(this.a,uG(n,10))},zW(F4n,"GraphConfigurator/lambda$0$Type",770),sDn(771,1,{},dt),uZn.Kb=function(n){return FEn(),new fX(null,new h3(uG(n,30).a,16))},zW(F4n,"GraphConfigurator/lambda$1$Type",771),sDn(772,1,QZn,Ud),uZn.Cd=function(n){XIn(this.a,uG(n,10))},zW(F4n,"GraphConfigurator/lambda$2$Type",772),sDn(1109,205,M3n,mk),uZn.rf=function(n,t){var e;e=vXn(new kk,n),xA(zDn(n,(jYn(),rMt)))===xA((Own(),Ixt))?Tgn(this.a,e,t):BDn(this.a,e,t),t.$g()||NQn(new Vf,e)},zW(F4n,"LayeredLayoutProvider",1109),sDn(367,22,{3:1,34:1,22:1,367:1},gC);var Ilt,Olt,Alt,Llt=_cn(F4n,"LayeredPhases",367,Oat,u9,EB);sDn(1717,1,{},$an),uZn.i=0,zW(_4n,"ComponentsToCGraphTransformer",1717),sDn(1718,1,{},wt),uZn.yf=function(n,t){return e.Math.min(null!=n.a?uM(n.a):n.c.i,null!=t.a?uM(t.a):t.c.i)},uZn.zf=function(n,t){return e.Math.min(null!=n.a?uM(n.a):n.c.i,null!=t.a?uM(t.a):t.c.i)},zW(_4n,"ComponentsToCGraphTransformer/1",1718),sDn(86,1,{86:1}),uZn.i=0,uZn.k=!0,uZn.o=T0n;var Nlt,$lt,Dlt,xlt=zW(B4n,"CNode",86);sDn(470,86,{470:1,86:1},Jx,Yvn),uZn.Ib=function(){return""},zW(_4n,"ComponentsToCGraphTransformer/CRectNode",470),sDn(1688,1,{},vt),zW(_4n,"OneDimensionalComponentsCompaction",1688),sDn(1689,1,{},kt),uZn.Kb=function(n){return w2(uG(n,42))},uZn.Fb=function(n){return this===n},zW(_4n,"OneDimensionalComponentsCompaction/lambda$0$Type",1689),sDn(1690,1,{},yt),uZn.Kb=function(n){return xgn(uG(n,42))},uZn.Fb=function(n){return this===n},zW(_4n,"OneDimensionalComponentsCompaction/lambda$1$Type",1690),sDn(1720,1,{},wQ),zW(B4n,"CGraph",1720),sDn(194,1,{194:1},Zvn),uZn.b=0,uZn.c=0,uZn.e=0,uZn.g=!0,uZn.i=T0n,zW(B4n,"CGroup",194),sDn(1719,1,{},Mt),uZn.yf=function(n,t){return e.Math.max(null!=n.a?uM(n.a):n.c.i,null!=t.a?uM(t.a):t.c.i)},uZn.zf=function(n,t){return e.Math.max(null!=n.a?uM(n.a):n.c.i,null!=t.a?uM(t.a):t.c.i)},zW(B4n,m2n,1719),sDn(1721,1,{},i$n),uZn.d=!1;var Rlt=zW(B4n,T2n,1721);sDn(1722,1,{},Tt),uZn.Kb=function(n){return GS(),qx(),0!=uG(uG(n,42).a,86).d.e},uZn.Fb=function(n){return this===n},zW(B4n,j2n,1722),sDn(833,1,{},cX),uZn.a=!1,uZn.b=!1,uZn.c=!1,uZn.d=!1,zW(B4n,E2n,833),sDn(1898,1,{},nz),zW(H4n,S2n,1898);var Klt=Iq(U4n,d2n);sDn(1899,1,{382:1},FZ),uZn.bf=function(n){DFn(this,uG(n,476))},zW(H4n,P2n,1899),sDn(V1n,1,b2n,jt),uZn.Ne=function(n,t){return rY(uG(n,86),uG(t,86))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(H4n,C2n,V1n),sDn(476,1,{476:1},KC),uZn.a=!1,zW(H4n,I2n,476),sDn(1901,1,b2n,Et),uZn.Ne=function(n,t){return KEn(uG(n,476),uG(t,476))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(H4n,O2n,1901),sDn(148,1,{148:1},FC,wG),uZn.Fb=function(n){var t;return null!=n&&Ult==Tbn(n)&&(t=uG(n,148),OJ(this.c,t.c)&&OJ(this.d,t.d))},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[this.c,this.d]))},uZn.Ib=function(){return"("+this.c+TZn+this.d+(this.a?"cx":"")+this.b+")"},uZn.a=!0,uZn.c=0,uZn.d=0;var Flt,_lt,Blt,Hlt,Ult=zW(U4n,"Point",148);sDn(416,22,{3:1,34:1,22:1,416:1},jC);var Glt,qlt,Xlt,zlt,Vlt,Wlt,Qlt,Jlt,Ylt,Zlt,nbt,tbt,ebt=_cn(U4n,"Point/Quadrant",416,Oat,H6,SB);sDn(1708,1,{},dk),uZn.b=null,uZn.c=null,uZn.d=null,uZn.e=null,uZn.f=null,zW(U4n,"RectilinearConvexHull",1708),sDn(583,1,{382:1},cyn),uZn.bf=function(n){Itn(this,uG(n,148))},uZn.b=0,zW(U4n,"RectilinearConvexHull/MaximalElementsEventHandler",583),sDn(1710,1,b2n,St),uZn.Ne=function(n,t){return cY(pK(n),pK(t))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U4n,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1710),sDn(1709,1,{382:1},Jin),uZn.bf=function(n){pKn(this,uG(n,148))},uZn.a=0,uZn.b=null,uZn.c=null,uZn.d=null,uZn.e=null,zW(U4n,"RectilinearConvexHull/RectangleEventHandler",1709),sDn(1711,1,b2n,Pt),uZn.Ne=function(n,t){return H3(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U4n,"RectilinearConvexHull/lambda$0$Type",1711),sDn(1712,1,b2n,At),uZn.Ne=function(n,t){return U3(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U4n,"RectilinearConvexHull/lambda$1$Type",1712),sDn(1713,1,b2n,Lt),uZn.Ne=function(n,t){return B3(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U4n,"RectilinearConvexHull/lambda$2$Type",1713),sDn(1714,1,b2n,Ot),uZn.Ne=function(n,t){return G3(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U4n,"RectilinearConvexHull/lambda$3$Type",1714),sDn(1715,1,b2n,Nt),uZn.Ne=function(n,t){return sIn(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U4n,"RectilinearConvexHull/lambda$4$Type",1715),sDn(1716,1,{},X0),zW(U4n,"Scanline",1716),sDn(2104,1,{}),zW(G4n,"AbstractGraphPlacer",2104),sDn(335,1,{335:1},DR),uZn.Ff=function(n){return!!this.Gf(n)&&(UNn(this.b,uG(oIn(n,(GYn(),xpt)),21),n),!0)},uZn.Gf=function(n){var t,e,i;for(t=uG(oIn(n,(GYn(),xpt)),21),i=uG(Y9(Jlt,t),21).Kc();i.Ob();)if(e=uG(i.Pb(),21),!uG(Y9(this.b,e),15).dc())return!1;return!0},zW(G4n,"ComponentGroup",335),sDn(779,2104,{},gk),uZn.Hf=function(n){var t;for(t=new Ww(this.a);t.a<t.c.c.length;)if(uG(N3(t),335).Ff(n))return;kD(this.a,new DR(n))},uZn.Ef=function(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w;if(this.a.c.length=0,t.a.c.length=0,n.dc())return t.f.a=0,void(t.f.b=0);for(zsn(t,a=uG(n.Xb(0),36)),r=n.Kc();r.Ob();)i=uG(r.Pb(),36),this.Hf(i);for(w=new sj,c=uM(pK(oIn(a,(jYn(),wTt)))),s=new Ww(this.a);s.a<s.c.c.length;)h=ZJn(o=uG(N3(s),335),c),utn(KW(o.b),w.a,w.b),w.a+=h.a,w.b+=h.b;if(t.f.a=w.a-c,t.f.b=w.b-c,oM(gK(oIn(a,pyt)))&&xA(oIn(a,Vyt))===xA((_gn(),uxt))){for(b=n.Kc();b.Ob();)tHn(f=uG(b.Pb(),36),f.c.a,f.c.b);for(oYn(e=new It,n,c),l=n.Kc();l.Ob();)JF(dL((f=uG(l.Pb(),36)).c),e.e);JF(dL(t.f),e.a)}for(u=new Ww(this.a);u.a<u.c.c.length;)otn(t,KW((o=uG(N3(u),335)).b))},zW(G4n,"ComponentGroupGraphPlacer",779),sDn(1312,779,{},Lk),uZn.Hf=function(n){Kwn(this,n)},uZn.Ef=function(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;if(this.a.c.length=0,t.a.c.length=0,n.dc())return t.f.a=0,void(t.f.b=0);for(zsn(t,a=uG(n.Xb(0),36)),r=n.Kc();r.Ob();)Kwn(this,uG(r.Pb(),36));for(m=new sj,p=new sj,d=new sj,w=new sj,c=uM(pK(oIn(a,(jYn(),wTt)))),s=new Ww(this.a);s.a<s.c.c.length;){if(o=uG(N3(s),335),hN(uG(oIn(t,(XYn(),d$t)),88))){for(d.a=m.a,g=new Ny(RW(HW(o.b).a).a.kc());g.b.Ob();)if(uG(OP(g.b.Pb()),21).Hc((KQn(),yRt))){d.a=p.a;break}}else if(fN(uG(oIn(t,d$t),88)))for(d.b=m.b,g=new Ny(RW(HW(o.b).a).a.kc());g.b.Ob();)if(uG(OP(g.b.Pb()),21).Hc((KQn(),_Rt))){d.b=p.b;break}if(h=ZJn(uG(o,579),c),utn(KW(o.b),d.a,d.b),hN(uG(oIn(t,d$t),88))){for(p.a=d.a+h.a,w.a=e.Math.max(w.a,p.a),g=new Ny(RW(HW(o.b).a).a.kc());g.b.Ob();)if(uG(OP(g.b.Pb()),21).Hc((KQn(),KRt))){m.a=d.a+h.a;break}p.b=d.b+h.b,d.b=p.b,w.b=e.Math.max(w.b,d.b)}else if(fN(uG(oIn(t,d$t),88))){for(p.b=d.b+h.b,w.b=e.Math.max(w.b,p.b),g=new Ny(RW(HW(o.b).a).a.kc());g.b.Ob();)if(uG(OP(g.b.Pb()),21).Hc((KQn(),kRt))){m.b=d.b+h.b;break}p.a=d.a+h.a,d.a=p.a,w.a=e.Math.max(w.a,d.a)}}if(t.f.a=w.a-c,t.f.b=w.b-c,oM(gK(oIn(a,pyt)))&&xA(oIn(a,Vyt))===xA((_gn(),uxt))){for(b=n.Kc();b.Ob();)tHn(f=uG(b.Pb(),36),f.c.a,f.c.b);for(oYn(i=new It,n,c),l=n.Kc();l.Ob();)JF(dL((f=uG(l.Pb(),36)).c),i.e);JF(dL(t.f),i.a)}for(u=new Ww(this.a);u.a<u.c.c.length;)otn(t,KW((o=uG(N3(u),335)).b))},zW(G4n,"ComponentGroupModelOrderGraphPlacer",1312),sDn(389,22,{3:1,34:1,22:1,389:1},EC);var ibt,rbt,cbt,abt=_cn(G4n,"ComponentOrderingStrategy",389,Oat,R6,PB);sDn(659,1,{},It),zW(G4n,"ComponentsCompactor",659),sDn(1533,13,x0n,c9),uZn.Fc=function(n){return CEn(this,uG(n,148))},zW(G4n,"ComponentsCompactor/Hullpoints",1533),sDn(1530,1,{855:1},qyn),uZn.a=!1,zW(G4n,"ComponentsCompactor/InternalComponent",1530),sDn(1529,1,t1n,bk),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new Ww(this.a)},zW(G4n,"ComponentsCompactor/InternalConnectedComponents",1529),sDn(1532,1,{602:1},s$n),uZn.Bf=function(){return null},uZn.Cf=function(){return this.a},uZn.Af=function(){return Dkn(this.d)},uZn.Df=function(){return this.b},zW(G4n,"ComponentsCompactor/InternalExternalExtension",1532),sDn(1531,1,{602:1},vk),uZn.Cf=function(){return this.a},uZn.Af=function(){return Dkn(this.d)},uZn.Bf=function(){return this.c},uZn.Df=function(){return this.b},zW(G4n,"ComponentsCompactor/InternalUnionExternalExtension",1531),sDn(1535,1,{},BFn),zW(G4n,"ComponentsCompactor/OuterSegments",1535),sDn(1534,1,{},wk),zW(G4n,"ComponentsCompactor/Segments",1534),sDn(1282,1,{},p7),zW(G4n,q3n,1282),sDn(1283,1,b2n,$t),uZn.Ne=function(n,t){return J3(uG(n,36),uG(t,36))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(G4n,"ComponentsProcessor/lambda$0$Type",1283),sDn(579,335,{335:1,579:1},r9),uZn.Ff=function(n){return Lln(this,n)},uZn.Gf=function(n){return rKn(this,n)},zW(G4n,"ModelOrderComponentGroup",579),sDn(1310,2104,{},Dt),uZn.Ef=function(n,t){var i,r,c,a,o,u,s,h,f;if(1!=n.gc()){if(n.dc())return t.a.c.length=0,t.f.a=0,void(t.f.b=0);for(this.Jf(n,t),c=uG(n.Xb(0),36),t.a.c.length=0,zsn(t,c),u=0,f=0,a=n.Kc();a.Ob();)s=uG(a.Pb(),36).f,u=e.Math.max(u,s.a),f+=s.a*s.b;if(u=e.Math.max(u,e.Math.sqrt(f)*uM(pK(oIn(t,(jYn(),dyt))))),r=uM(pK(oIn(t,wTt))),this.If(n,t,u,r),oM(gK(oIn(c,pyt)))){for(oYn(i=new It,n,r),o=n.Kc();o.Ob();)JF(dL(uG(o.Pb(),36).c),i.e);JF(dL(t.f),i.a)}otn(t,n)}else(h=uG(n.Xb(0),36))!=t&&(t.a.c.length=0,_Hn(t,h,0,0),zsn(t,h),WY(t.d,h.d),t.f.a=h.f.a,t.f.b=h.f.b)},uZn.If=function(n,t,i,r){var c,a,o,u,s,h,f,l;for(f=0,l=0,u=0,c=r,o=n.Kc();o.Ob();)f+(h=(a=uG(o.Pb(),36)).f).a>i&&(f=0,l+=u+r,u=0),tHn(a,f+(s=a.c).a,l+s.b),dL(s),c=e.Math.max(c,f+h.a),u=e.Math.max(u,h.b),f+=h.a+r;t.f.a=c,t.f.b=l+u},uZn.Jf=function(n,t){var e,i,r,c,a;if(xA(oIn(t,(jYn(),kyt)))===xA((Uvn(),tbt))){for(i=n.Kc();i.Ob();){for(a=0,c=new Ww((e=uG(i.Pb(),36)).a);c.a<c.c.c.length;)r=uG(N3(c),10),a+=uG(oIn(r,cTt),17).a;e.p=a}hZ(),n.jd(new xt)}},zW(G4n,"SimpleRowGraphPlacer",1310),sDn(1313,1310,{},Ct),uZn.If=function(n,t,i,r){var c,a,o,u,s,h,f,l,b,w;for(b=0,w=0,u=0,c=r,s=null,l=0,o=n.Kc();o.Ob();)(b+(f=(a=uG(o.Pb(),36)).f).a>i&&!uG(oIn(a,(GYn(),xpt)),21).Hc((KQn(),yRt))||s&&uG(oIn(s,(GYn(),xpt)),21).Hc((KQn(),kRt))||uG(oIn(a,(GYn(),xpt)),21).Hc((KQn(),_Rt)))&&(b=l,w+=u+r,u=0),h=a.c,uG(oIn(a,(GYn(),xpt)),21).Hc((KQn(),yRt))&&(b=c+r),tHn(a,b+h.a,w+h.b),c=e.Math.max(c,b+f.a),uG(oIn(a,xpt),21).Hc(KRt)&&(l=e.Math.max(l,b+f.a+r)),dL(h),u=e.Math.max(u,f.b),b+=f.a+r,s=a;t.f.a=c,t.f.b=w+u},uZn.Jf=function(n,t){},zW(G4n,"ModelOrderRowGraphPlacer",1313),sDn(1311,1,b2n,xt),uZn.Ne=function(n,t){return Wsn(uG(n,36),uG(t,36))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(G4n,"SimpleRowGraphPlacer/1",1311),sDn(1280,1,A2n,Rt),uZn.Lb=function(n){var t;return!!(t=uG(oIn(uG(n,249).b,(jYn(),bMt)),75))&&0!=t.b},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){var t;return!!(t=uG(oIn(uG(n,249).b,(jYn(),bMt)),75))&&0!=t.b},zW(W4n,"CompoundGraphPostprocessor/1",1280),sDn(1279,1,Q4n,yk),uZn.Kf=function(n,t){zyn(this,uG(n,36),t)},zW(W4n,"CompoundGraphPreprocessor",1279),sDn(453,1,{453:1},Sdn),uZn.c=!1,zW(W4n,"CompoundGraphPreprocessor/ExternalPort",453),sDn(249,1,{249:1},$B),uZn.Ib=function(){return MR(this.c)+":"+MNn(this.b)},zW(W4n,"CrossHierarchyEdge",249),sDn(777,1,b2n,Gd),uZn.Ne=function(n,t){return Njn(this,uG(n,249),uG(t,249))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(W4n,"CrossHierarchyEdgeComparator",777),sDn(305,137,{3:1,305:1,96:1,137:1}),uZn.p=0,zW(J4n,"LGraphElement",305),sDn(18,305,{3:1,18:1,305:1,96:1,137:1},UZ),uZn.Ib=function(){return MNn(this)};var obt=zW(J4n,"LEdge",18);sDn(36,305,{3:1,20:1,36:1,305:1,96:1,137:1},Dan),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new Ww(this.b)},uZn.Ib=function(){return 0==this.b.c.length?"G-unlayered"+vIn(this.a):0==this.a.c.length?"G-layered"+vIn(this.b):"G[layerless"+vIn(this.a)+", layers"+vIn(this.b)+"]"};var ubt,sbt=zW(J4n,"LGraph",36);sDn(666,1,{}),uZn.Lf=function(){return this.e.n},uZn.of=function(n){return oIn(this.e,n)},uZn.Mf=function(){return this.e.o},uZn.Nf=function(){return this.e.p},uZn.pf=function(n){return vR(this.e,n)},uZn.Of=function(n){this.e.n.a=n.a,this.e.n.b=n.b},uZn.Pf=function(n){this.e.o.a=n.a,this.e.o.b=n.b},uZn.Qf=function(n){this.e.p=n},zW(J4n,"LGraphAdapters/AbstractLShapeAdapter",666),sDn(474,1,{853:1},qd),uZn.Rf=function(){var n,t;if(!this.b)for(this.b=iR(this.a.b.c.length),t=new Ww(this.a.b);t.a<t.c.c.length;)n=uG(N3(t),72),kD(this.b,new Xd(n));return this.b},uZn.b=null,zW(J4n,"LGraphAdapters/LEdgeAdapter",474),sDn(665,1,{},mY),uZn.Sf=function(){var n,t,e,i,r;if(!this.b)for(this.b=new Zm,e=new Ww(this.a.b);e.a<e.c.c.length;)for(r=new Ww(uG(N3(e),30).a);r.a<r.c.c.length;)if(i=uG(N3(r),10),this.c.Mb(i)&&(kD(this.b,new RB(this,i,this.e)),this.d)){if(vR(i,(GYn(),Pmt)))for(t=uG(oIn(i,Pmt),15).Kc();t.Ob();)n=uG(t.Pb(),10),kD(this.b,new RB(this,n,!1));if(vR(i,Ept))for(t=uG(oIn(i,Ept),15).Kc();t.Ob();)n=uG(t.Pb(),10),kD(this.b,new RB(this,n,!1))}return this.b},uZn.Lf=function(){throw hv(new TM(Z4n))},uZn.of=function(n){return oIn(this.a,n)},uZn.Mf=function(){return this.a.f},uZn.Nf=function(){return this.a.p},uZn.pf=function(n){return vR(this.a,n)},uZn.Of=function(n){throw hv(new TM(Z4n))},uZn.Pf=function(n){this.a.f.a=n.a,this.a.f.b=n.b},uZn.Qf=function(n){this.a.p=n},uZn.b=null,uZn.d=!1,uZn.e=!1,zW(J4n,"LGraphAdapters/LGraphAdapter",665),sDn(585,666,{187:1},Xd),zW(J4n,"LGraphAdapters/LLabelAdapter",585),sDn(584,666,{695:1},RB),uZn.Tf=function(){return this.b},uZn.Uf=function(){return hZ(),hZ(),zot},uZn.Rf=function(){var n,t;if(!this.a)for(this.a=iR(uG(this.e,10).b.c.length),t=new Ww(uG(this.e,10).b);t.a<t.c.c.length;)n=uG(N3(t),72),kD(this.a,new Xd(n));return this.a},uZn.Vf=function(){var n;return new OF((n=uG(this.e,10).d).d,n.c,n.a,n.b)},uZn.Wf=function(){return hZ(),hZ(),zot},uZn.Xf=function(){var n,t;if(!this.c)for(this.c=iR(uG(this.e,10).j.c.length),t=new Ww(uG(this.e,10).j);t.a<t.c.c.length;)n=uG(N3(t),12),kD(this.c,new _C(n,this.d));return this.c},uZn.Yf=function(){return oM(gK(oIn(uG(this.e,10),(GYn(),Cpt))))},uZn.Zf=function(n){uG(this.e,10).d.b=n.b,uG(this.e,10).d.d=n.d,uG(this.e,10).d.c=n.c,uG(this.e,10).d.a=n.a},uZn.$f=function(n){uG(this.e,10).f.b=n.b,uG(this.e,10).f.d=n.d,uG(this.e,10).f.c=n.c,uG(this.e,10).f.a=n.a},uZn._f=function(){Zcn(this,(zS(),ubt))},uZn.a=null,uZn.b=null,uZn.c=null,uZn.d=!1,zW(J4n,"LGraphAdapters/LNodeAdapter",584),sDn(1788,666,{852:1},_C),uZn.Uf=function(){var n,t,e,i,r,c,a,o;if(this.d&&uG(this.e,12).i.k==(zIn(),gbt))return hZ(),hZ(),zot;if(!this.a){for(this.a=new Zm,e=new Ww(uG(this.e,12).e);e.a<e.c.c.length;)n=uG(N3(e),18),kD(this.a,new qd(n));if(this.d&&(i=uG(oIn(uG(this.e,12),(GYn(),lmt)),10)))for(t=new Fz(ix(qgn(i).a.Kc(),new h));hDn(t);)n=uG(N9(t),18),kD(this.a,new qd(n));if(vR(uG(this.e,12).i,(GYn(),vmt))&&(a=uG(oIn(uG(this.e,12).i,vmt),337),o=uG(ain(a.e,this.e),113)))for(c=new Ww(o.b);c.a<c.c.c.length;)r=uG(N3(c),340),kD(this.a,new qd(r.a))}return this.a},uZn.Rf=function(){var n,t;if(!this.b)for(this.b=iR(uG(this.e,12).f.c.length),t=new Ww(uG(this.e,12).f);t.a<t.c.c.length;)n=uG(N3(t),72),kD(this.b,new Xd(n));return this.b},uZn.Wf=function(){var n,t,e,i,r,c,a,o;if(this.d&&uG(this.e,12).i.k==(zIn(),gbt))return hZ(),hZ(),zot;if(!this.c){for(this.c=new Zm,e=new Ww(uG(this.e,12).g);e.a<e.c.c.length;)n=uG(N3(e),18),kD(this.c,new qd(n));if(this.d&&(i=uG(oIn(uG(this.e,12),(GYn(),lmt)),10)))for(t=new Fz(ix(Xgn(i).a.Kc(),new h));hDn(t);)n=uG(N9(t),18),kD(this.c,new qd(n));if(vR(uG(this.e,12).i,(GYn(),vmt))&&(a=uG(oIn(uG(this.e,12).i,vmt),337),o=uG(ain(a.e,this.e),113)))for(c=new Ww(o.e);c.a<c.c.c.length;)r=uG(N3(c),340),kD(this.c,new qd(r.a))}return this.c},uZn.ag=function(){return uG(this.e,12).j},uZn.bg=function(){return oM(gK(oIn(uG(this.e,12),(GYn(),qpt))))},uZn.a=null,uZn.b=null,uZn.c=null,uZn.d=!1,zW(J4n,"LGraphAdapters/LPortAdapter",1788),sDn(1789,1,b2n,Kt),uZn.Ne=function(n,t){return H_n(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(J4n,"LGraphAdapters/PortComparator",1789),sDn(818,1,y1n,Ft),uZn.Mb=function(n){return uG(n,10),zS(),!0},zW(J4n,"LGraphAdapters/lambda$0$Type",818),sDn(404,305,{3:1,305:1,404:1,96:1,137:1}),zW(J4n,"LShape",404),sDn(72,404,{3:1,305:1,72:1,404:1,96:1,137:1},uj,S$),uZn.Ib=function(){var n;return null==(n=oq(this))?"label":"l_"+n},zW(J4n,"LLabel",72),sDn(214,1,{3:1,4:1,214:1,423:1}),uZn.Fb=function(n){var t;return!!F$(n,214)&&(t=uG(n,214),this.d==t.d&&this.a==t.a&&this.b==t.b&&this.c==t.c)},uZn.Hb=function(){var n,t;return n=OL(this.b)<<16,n|=OL(this.a)&D1n,t=OL(this.c)<<16,n^(t|=OL(this.d)&D1n)},uZn.cg=function(n){var t,e,i,r,c,a,o,u,s;for(r=0;r<n.length&&Hbn((s3(r,n.length),n.charCodeAt(r)),r6n);)++r;for(t=n.length;t>0&&Hbn((s3(t-1,n.length),n.charCodeAt(t-1)),c6n);)--t;if(r<t){u=WGn((Knn(r,t,n.length),n.substr(r,t-r)),",|;");try{for(a=0,o=(c=u).length;a<o;++a){if(2!=(i=WGn(c[a],"=")).length)throw hv(new vM("Expecting a list of key-value pairs."));e=KAn(i[0]),s=YIn(KAn(i[1])),m_(e,"top")?this.d=s:m_(e,"left")?this.b=s:m_(e,"bottom")?this.a=s:m_(e,"right")&&(this.c=s)}}catch(h){throw F$(h=Ehn(h),130)?hv(new vM(a6n+h)):hv(h)}}},uZn.Ib=function(){return"[top="+this.d+",left="+this.b+",bottom="+this.a+",right="+this.c+"]"},uZn.a=0,uZn.b=0,uZn.c=0,uZn.d=0,zW(o6n,"Spacing",214),sDn(140,214,u6n,Nk,qL,OF,zU);var hbt=zW(o6n,"ElkMargin",140);sDn(660,140,u6n,$k),zW(J4n,"LMargin",660),sDn(10,404,{3:1,305:1,10:1,404:1,96:1,137:1},gMn),uZn.Ib=function(){return byn(this)},uZn.i=!1;var fbt,lbt,bbt,wbt,dbt,gbt,pbt=zW(J4n,"LNode",10);sDn(273,22,{3:1,34:1,22:1,273:1},SC);var mbt,vbt=_cn(J4n,"LNode/NodeType",273,Oat,Vnn,VH);sDn(775,1,y1n,_t),uZn.Mb=function(n){return oM(gK(oIn(uG(n,72),(jYn(),qyt))))},zW(J4n,"LNode/lambda$0$Type",775),sDn(107,214,s6n,Dk,CN,VU);var kbt,ybt,Mbt,Tbt,jbt,Ebt,Sbt=zW(o6n,"ElkPadding",107);sDn(778,107,s6n,xk),zW(J4n,"LPadding",778),sDn(12,404,{3:1,305:1,12:1,404:1,96:1,137:1},lOn),uZn.Ib=function(){var n,t,e;return JA(((n=new WM).a+="p_",n),njn(this)),this.i&&JA(QA((n.a+="[",n),this.i),"]"),1==this.e.c.length&&0==this.g.c.length&&uG(zq(this.e,0),18).c!=this&&(t=uG(zq(this.e,0),18).c,JA((n.a+=" << ",n),njn(t)),JA(QA((n.a+="[",n),t.i),"]")),0==this.e.c.length&&1==this.g.c.length&&uG(zq(this.g,0),18).d!=this&&(e=uG(zq(this.g,0),18).d,JA((n.a+=" >> ",n),njn(e)),JA(QA((n.a+="[",n),e.i),"]")),n.a},uZn.c=!0,uZn.d=!1;var Pbt,Cbt,Ibt,Obt,Abt=zW(J4n,"LPort",12);sDn(408,1,t1n,zd),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new Vd(new Ww(this.a.e))},zW(J4n,"LPort/1",408),sDn(1309,1,$Zn,Vd),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return uG(N3(this.a),18).c},uZn.Ob=function(){return l$(this.a)},uZn.Qb=function(){tW(this.a)},zW(J4n,"LPort/1/1",1309),sDn(369,1,t1n,Wd),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new Qd(new Ww(this.a.g))},zW(J4n,"LPort/2",369),sDn(776,1,$Zn,Qd),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return uG(N3(this.a),18).d},uZn.Ob=function(){return l$(this.a)},uZn.Qb=function(){tW(this.a)},zW(J4n,"LPort/2/1",776),sDn(1302,1,t1n,LC),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new w7(this)},zW(J4n,"LPort/CombineIter",1302),sDn(208,1,$Zn,w7),uZn.Nb=function(n){SV(this,n)},uZn.Qb=function(){xj()},uZn.Ob=function(){return Dx(this)},uZn.Pb=function(){return l$(this.a)?N3(this.a):N3(this.b)},zW(J4n,"LPort/CombineIter/1",208),sDn(1303,1,A2n,Bt),uZn.Lb=function(n){return Yz(n)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),0!=uG(n,12).g.c.length},zW(J4n,"LPort/lambda$0$Type",1303),sDn(1304,1,A2n,Ht),uZn.Lb=function(n){return Zz(n)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),0!=uG(n,12).e.c.length},zW(J4n,"LPort/lambda$1$Type",1304),sDn(1305,1,A2n,Ut),uZn.Lb=function(n){return Lun(),uG(n,12).j==(KQn(),yRt)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),uG(n,12).j==(KQn(),yRt)},zW(J4n,"LPort/lambda$2$Type",1305),sDn(1306,1,A2n,Gt),uZn.Lb=function(n){return Lun(),uG(n,12).j==(KQn(),kRt)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),uG(n,12).j==(KQn(),kRt)},zW(J4n,"LPort/lambda$3$Type",1306),sDn(1307,1,A2n,qt),uZn.Lb=function(n){return Lun(),uG(n,12).j==(KQn(),KRt)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),uG(n,12).j==(KQn(),KRt)},zW(J4n,"LPort/lambda$4$Type",1307),sDn(1308,1,A2n,Xt),uZn.Lb=function(n){return Lun(),uG(n,12).j==(KQn(),_Rt)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),uG(n,12).j==(KQn(),_Rt)},zW(J4n,"LPort/lambda$5$Type",1308),sDn(30,305,{3:1,20:1,305:1,30:1,96:1,137:1},bQ),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new Ww(this.a)},uZn.Ib=function(){return"L_"+Ten(this.b.b,this,0)+vIn(this.a)},zW(J4n,"Layer",30),sDn(1330,1,{},kk),zW(h6n,f6n,1330),sDn(1334,1,{},zt),uZn.Kb=function(n){return lCn(uG(n,84))},zW(h6n,"ElkGraphImporter/0methodref$connectableShapeToNode$Type",1334),sDn(1337,1,{},Vt),uZn.Kb=function(n){return lCn(uG(n,84))},zW(h6n,"ElkGraphImporter/1methodref$connectableShapeToNode$Type",1337),sDn(1331,1,QZn,Jd),uZn.Cd=function(n){y$n(this.a,uG(n,123))},zW(h6n,z3n,1331),sDn(1332,1,QZn,Yd),uZn.Cd=function(n){y$n(this.a,uG(n,123))},zW(h6n,l6n,1332),sDn(1333,1,{},Wt),uZn.Kb=function(n){return new fX(null,new h3(KJ(uG(n,74)),16))},zW(h6n,b6n,1333),sDn(1335,1,y1n,Zd),uZn.Mb=function(n){return DN(this.a,uG(n,27))},zW(h6n,w6n,1335),sDn(1336,1,{},Qt),uZn.Kb=function(n){return new fX(null,new h3(FJ(uG(n,74)),16))},zW(h6n,"ElkGraphImporter/lambda$5$Type",1336),sDn(1338,1,y1n,ng),uZn.Mb=function(n){return xN(this.a,uG(n,27))},zW(h6n,"ElkGraphImporter/lambda$7$Type",1338),sDn(1339,1,y1n,Jt),uZn.Mb=function(n){return XY(uG(n,74))},zW(h6n,"ElkGraphImporter/lambda$8$Type",1339),sDn(1297,1,{},Vf),zW(h6n,"ElkGraphLayoutTransferrer",1297),sDn(1298,1,y1n,tg),uZn.Mb=function(n){return IF(this.a,uG(n,18))},zW(h6n,"ElkGraphLayoutTransferrer/lambda$0$Type",1298),sDn(1299,1,QZn,eg),uZn.Cd=function(n){WS(),kD(this.a,uG(n,18))},zW(h6n,"ElkGraphLayoutTransferrer/lambda$1$Type",1299),sDn(1300,1,y1n,ig),uZn.Mb=function(n){return KK(this.a,uG(n,18))},zW(h6n,"ElkGraphLayoutTransferrer/lambda$2$Type",1300),sDn(1301,1,QZn,rg),uZn.Cd=function(n){WS(),kD(this.a,uG(n,18))},zW(h6n,"ElkGraphLayoutTransferrer/lambda$3$Type",1301),sDn(819,1,{},xF),zW(d6n,"BiLinkedHashMultiMap",819),sDn(1550,1,Q4n,Yt),uZn.Kf=function(n,t){Bon(uG(n,36),t)},zW(d6n,"CommentNodeMarginCalculator",1550),sDn(1551,1,{},Zt),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"CommentNodeMarginCalculator/lambda$0$Type",1551),sDn(1552,1,QZn,ne),uZn.Cd=function(n){bXn(uG(n,10))},zW(d6n,"CommentNodeMarginCalculator/lambda$1$Type",1552),sDn(1553,1,Q4n,te),uZn.Kf=function(n,t){WFn(uG(n,36),t)},zW(d6n,"CommentPostprocessor",1553),sDn(1554,1,Q4n,ee),uZn.Kf=function(n,t){yQn(uG(n,36),t)},zW(d6n,"CommentPreprocessor",1554),sDn(1555,1,Q4n,ie),uZn.Kf=function(n,t){KKn(uG(n,36),t)},zW(d6n,"ConstraintsPostprocessor",1555),sDn(1556,1,Q4n,re),uZn.Kf=function(n,t){Csn(uG(n,36),t)},zW(d6n,"EdgeAndLayerConstraintEdgeReverser",1556),sDn(1557,1,Q4n,ce),uZn.Kf=function(n,t){amn(uG(n,36),t)},zW(d6n,"EndLabelPostprocessor",1557),sDn(1558,1,{},ae),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"EndLabelPostprocessor/lambda$0$Type",1558),sDn(1559,1,y1n,oe),uZn.Mb=function(n){return q8(uG(n,10))},zW(d6n,"EndLabelPostprocessor/lambda$1$Type",1559),sDn(1560,1,QZn,ue),uZn.Cd=function(n){_En(uG(n,10))},zW(d6n,"EndLabelPostprocessor/lambda$2$Type",1560),sDn(1561,1,Q4n,se),uZn.Kf=function(n,t){AAn(uG(n,36),t)},zW(d6n,"EndLabelPreprocessor",1561),sDn(1562,1,{},he),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"EndLabelPreprocessor/lambda$0$Type",1562),sDn(1563,1,QZn,NB),uZn.Cd=function(n){oP(this.a,this.b,this.c,uG(n,10))},uZn.a=0,uZn.b=0,uZn.c=!1,zW(d6n,"EndLabelPreprocessor/lambda$1$Type",1563),sDn(1564,1,y1n,fe),uZn.Mb=function(n){return xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),cxt))},zW(d6n,"EndLabelPreprocessor/lambda$2$Type",1564),sDn(1565,1,QZn,cg),uZn.Cd=function(n){aq(this.a,uG(n,72))},zW(d6n,"EndLabelPreprocessor/lambda$3$Type",1565),sDn(1566,1,y1n,le),uZn.Mb=function(n){return xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),rxt))},zW(d6n,"EndLabelPreprocessor/lambda$4$Type",1566),sDn(1567,1,QZn,ag),uZn.Cd=function(n){aq(this.a,uG(n,72))},zW(d6n,"EndLabelPreprocessor/lambda$5$Type",1567),sDn(1615,1,Q4n,_f),uZn.Kf=function(n,t){Ddn(uG(n,36),t)},zW(d6n,"EndLabelSorter",1615),sDn(1616,1,b2n,be),uZn.Ne=function(n,t){return okn(uG(n,466),uG(t,466))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"EndLabelSorter/1",1616),sDn(466,1,{466:1},oZ),zW(d6n,"EndLabelSorter/LabelGroup",466),sDn(1617,1,{},we),uZn.Kb=function(n){return VS(),new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"EndLabelSorter/lambda$0$Type",1617),sDn(1618,1,y1n,de),uZn.Mb=function(n){return VS(),uG(n,10).k==(zIn(),dbt)},zW(d6n,"EndLabelSorter/lambda$1$Type",1618),sDn(1619,1,QZn,ge),uZn.Cd=function(n){VIn(uG(n,10))},zW(d6n,"EndLabelSorter/lambda$2$Type",1619),sDn(1620,1,y1n,pe),uZn.Mb=function(n){return VS(),xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),rxt))},zW(d6n,"EndLabelSorter/lambda$3$Type",1620),sDn(1621,1,y1n,me),uZn.Mb=function(n){return VS(),xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),cxt))},zW(d6n,"EndLabelSorter/lambda$4$Type",1621),sDn(1568,1,Q4n,ve),uZn.Kf=function(n,t){qXn(this,uG(n,36))},uZn.b=0,uZn.c=0,zW(d6n,"FinalSplineBendpointsCalculator",1568),sDn(1569,1,{},ke),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"FinalSplineBendpointsCalculator/lambda$0$Type",1569),sDn(1570,1,{},ye),uZn.Kb=function(n){return new fX(null,new LW(new Fz(ix(Xgn(uG(n,10)).a.Kc(),new h))))},zW(d6n,"FinalSplineBendpointsCalculator/lambda$1$Type",1570),sDn(1571,1,y1n,Me),uZn.Mb=function(n){return!v9(uG(n,18))},zW(d6n,"FinalSplineBendpointsCalculator/lambda$2$Type",1571),sDn(1572,1,y1n,Te),uZn.Mb=function(n){return vR(uG(n,18),(GYn(),Tmt))},zW(d6n,"FinalSplineBendpointsCalculator/lambda$3$Type",1572),sDn(1573,1,QZn,og),uZn.Cd=function(n){ZHn(this.a,uG(n,131))},zW(d6n,"FinalSplineBendpointsCalculator/lambda$4$Type",1573),sDn(1574,1,QZn,je),uZn.Cd=function(n){_An(uG(n,18).a)},zW(d6n,"FinalSplineBendpointsCalculator/lambda$5$Type",1574),sDn(803,1,Q4n,ug),uZn.Kf=function(n,t){fVn(this,uG(n,36),t)},zW(d6n,"GraphTransformer",803),sDn(517,22,{3:1,34:1,22:1,517:1},PC);var Lbt,Nbt,$bt,Dbt=_cn(d6n,"GraphTransformer/Mode",517,Oat,f1,zH);sDn(1575,1,Q4n,Ee),uZn.Kf=function(n,t){wRn(uG(n,36),t)},zW(d6n,"HierarchicalNodeResizingProcessor",1575),sDn(1576,1,Q4n,Se),uZn.Kf=function(n,t){don(uG(n,36),t)},zW(d6n,"HierarchicalPortConstraintProcessor",1576),sDn(1577,1,b2n,Pe),uZn.Ne=function(n,t){return wyn(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"HierarchicalPortConstraintProcessor/NodeComparator",1577),sDn(1578,1,Q4n,Ce),uZn.Kf=function(n,t){HGn(uG(n,36),t)},zW(d6n,"HierarchicalPortDummySizeProcessor",1578),sDn(1579,1,Q4n,Ie),uZn.Kf=function(n,t){z_n(this,uG(n,36),t)},uZn.a=0,zW(d6n,"HierarchicalPortOrthogonalEdgeRouter",1579),sDn(1580,1,b2n,Oe),uZn.Ne=function(n,t){return Ox(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"HierarchicalPortOrthogonalEdgeRouter/1",1580),sDn(1581,1,b2n,Ae),uZn.Ne=function(n,t){return Dtn(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"HierarchicalPortOrthogonalEdgeRouter/2",1581),sDn(1582,1,Q4n,Le),uZn.Kf=function(n,t){tIn(uG(n,36),t)},zW(d6n,"HierarchicalPortPositionProcessor",1582),sDn(1583,1,Q4n,Wf),uZn.Kf=function(n,t){SJn(this,uG(n,36))},uZn.a=0,uZn.c=0,zW(d6n,"HighDegreeNodeLayeringProcessor",1583),sDn(580,1,{580:1},Ne),uZn.b=-1,uZn.d=-1,zW(d6n,"HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation",580),sDn(1584,1,{},$e),uZn.Kb=function(n){return HB(),qgn(uG(n,10))},uZn.Fb=function(n){return this===n},zW(d6n,"HighDegreeNodeLayeringProcessor/lambda$0$Type",1584),sDn(1585,1,{},De),uZn.Kb=function(n){return HB(),Xgn(uG(n,10))},uZn.Fb=function(n){return this===n},zW(d6n,"HighDegreeNodeLayeringProcessor/lambda$1$Type",1585),sDn(1591,1,Q4n,xe),uZn.Kf=function(n,t){TGn(this,uG(n,36),t)},zW(d6n,"HyperedgeDummyMerger",1591),sDn(804,1,{},xB),uZn.a=!1,uZn.b=!1,uZn.c=!1,zW(d6n,"HyperedgeDummyMerger/MergeState",804),sDn(1592,1,{},Re),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"HyperedgeDummyMerger/lambda$0$Type",1592),sDn(1593,1,{},Ke),uZn.Kb=function(n){return new fX(null,new h3(uG(n,10).j,16))},zW(d6n,"HyperedgeDummyMerger/lambda$1$Type",1593),sDn(1594,1,QZn,Fe),uZn.Cd=function(n){uG(n,12).p=-1},zW(d6n,"HyperedgeDummyMerger/lambda$2$Type",1594),sDn(1595,1,Q4n,_e),uZn.Kf=function(n,t){kGn(uG(n,36),t)},zW(d6n,"HypernodesProcessor",1595),sDn(1596,1,Q4n,Be),uZn.Kf=function(n,t){_Gn(uG(n,36),t)},zW(d6n,"InLayerConstraintProcessor",1596),sDn(1597,1,Q4n,He),uZn.Kf=function(n,t){Nun(uG(n,36),t)},zW(d6n,"InnermostNodeMarginCalculator",1597),sDn(1598,1,Q4n,Ue),uZn.Kf=function(n,t){gQn(this,uG(n,36))},uZn.a=T0n,uZn.b=T0n,uZn.c=M0n,uZn.d=M0n;var xbt,Rbt,Kbt,Fbt,_bt,Bbt,Hbt,Ubt,Gbt,qbt,Xbt,zbt,Vbt,Wbt,Qbt,Jbt,Ybt,Zbt,nwt,twt,ewt,iwt,rwt,cwt,awt,owt,uwt,swt,hwt,fwt,lwt,bwt,wwt,dwt,gwt,pwt,mwt,vwt,kwt,ywt,Mwt,Twt,jwt,Ewt,Swt,Pwt,Cwt,Iwt,Owt,Awt,Lwt,Nwt,$wt,Dwt,xwt,Rwt,Kwt,Fwt=zW(d6n,"InteractiveExternalPortPositioner",1598);sDn(1599,1,{},Ge),uZn.Kb=function(n){return uG(n,18).d.i},uZn.Fb=function(n){return this===n},zW(d6n,"InteractiveExternalPortPositioner/lambda$0$Type",1599),sDn(1600,1,{},sg),uZn.Kb=function(n){return Lx(this.a,pK(n))},uZn.Fb=function(n){return this===n},zW(d6n,"InteractiveExternalPortPositioner/lambda$1$Type",1600),sDn(1601,1,{},qe),uZn.Kb=function(n){return uG(n,18).c.i},uZn.Fb=function(n){return this===n},zW(d6n,"InteractiveExternalPortPositioner/lambda$2$Type",1601),sDn(1602,1,{},hg),uZn.Kb=function(n){return Nx(this.a,pK(n))},uZn.Fb=function(n){return this===n},zW(d6n,"InteractiveExternalPortPositioner/lambda$3$Type",1602),sDn(1603,1,{},fg),uZn.Kb=function(n){return XF(this.a,pK(n))},uZn.Fb=function(n){return this===n},zW(d6n,"InteractiveExternalPortPositioner/lambda$4$Type",1603),sDn(1604,1,{},lg),uZn.Kb=function(n){return zF(this.a,pK(n))},uZn.Fb=function(n){return this===n},zW(d6n,"InteractiveExternalPortPositioner/lambda$5$Type",1604),sDn(81,22,{3:1,34:1,22:1,81:1,196:1},CC),uZn.dg=function(){switch(this.g){case 15:return new fc;case 22:return new lc;case 47:return new dc;case 28:case 35:return new ei;case 32:return new Yt;case 42:return new te;case 1:return new ee;case 41:return new ie;case 56:return new ug((Aun(),Obt));case 0:return new ug((Aun(),Ibt));case 2:return new re;case 54:return new ce;case 33:return new se;case 51:return new ve;case 55:return new Ee;case 13:return new Se;case 38:return new Ce;case 44:return new Ie;case 40:return new Le;case 9:return new Wf;case 49:return new Ux;case 37:return new xe;case 43:return new _e;case 27:return new Be;case 30:return new He;case 3:return new Ue;case 18:return new ze;case 29:return new Ve;case 5:return new Qf;case 50:return new Xe;case 34:return new Jf;case 36:return new ii;case 52:return new _f;case 11:return new ri;case 7:return new Yf;case 39:return new ci;case 45:return new ai;case 16:return new oi;case 10:return new RI;case 48:return new fi;case 21:return new li;case 23:return new zy((ean(),BEt));case 8:return new wi;case 12:return new gi;case 4:return new pi;case 19:return new rl;case 17:return new Pi;case 53:return new Ci;case 6:return new Bi;case 25:return new jk;case 46:return new $i;case 31:return new _F;case 14:return new Wi;case 26:return new Mc;case 20:return new nr;case 24:return new zy((ean(),HEt));default:throw hv(new vM(v6n+(null!=this.f?this.f:""+this.g)))}};var _wt,Bwt,Hwt,Uwt,Gwt,qwt,Xwt,zwt,Vwt=_cn(d6n,k6n,81,Oat,bKn,XB);sDn(1605,1,Q4n,ze),uZn.Kf=function(n,t){bQn(uG(n,36),t)},zW(d6n,"InvertedPortProcessor",1605),sDn(1606,1,Q4n,Ve),uZn.Kf=function(n,t){xHn(uG(n,36),t)},zW(d6n,"LabelAndNodeSizeProcessor",1606),sDn(1607,1,y1n,We),uZn.Mb=function(n){return uG(n,10).k==(zIn(),dbt)},zW(d6n,"LabelAndNodeSizeProcessor/lambda$0$Type",1607),sDn(1608,1,y1n,Qe),uZn.Mb=function(n){return uG(n,10).k==(zIn(),lbt)},zW(d6n,"LabelAndNodeSizeProcessor/lambda$1$Type",1608),sDn(1609,1,QZn,KB),uZn.Cd=function(n){uP(this.b,this.a,this.c,uG(n,10))},uZn.a=!1,uZn.c=!1,zW(d6n,"LabelAndNodeSizeProcessor/lambda$2$Type",1609),sDn(1610,1,Q4n,Qf),uZn.Kf=function(n,t){EWn(uG(n,36),t)},zW(d6n,"LabelDummyInserter",1610),sDn(1611,1,A2n,Je),uZn.Lb=function(n){return xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),ixt))},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),ixt))},zW(d6n,"LabelDummyInserter/1",1611),sDn(1612,1,Q4n,Xe),uZn.Kf=function(n,t){eWn(uG(n,36),t)},zW(d6n,"LabelDummyRemover",1612),sDn(1613,1,y1n,Ye),uZn.Mb=function(n){return oM(gK(oIn(uG(n,72),(jYn(),qyt))))},zW(d6n,"LabelDummyRemover/lambda$0$Type",1613),sDn(1378,1,Q4n,Jf),uZn.Kf=function(n,t){UVn(this,uG(n,36),t)},uZn.a=null,zW(d6n,"LabelDummySwitcher",1378),sDn(293,1,{293:1},oHn),uZn.c=0,uZn.d=null,uZn.f=0,zW(d6n,"LabelDummySwitcher/LabelDummyInfo",293),sDn(1379,1,{},Ze),uZn.Kb=function(n){return Pun(),new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"LabelDummySwitcher/lambda$0$Type",1379),sDn(1380,1,y1n,ni),uZn.Mb=function(n){return Pun(),uG(n,10).k==(zIn(),bbt)},zW(d6n,"LabelDummySwitcher/lambda$1$Type",1380),sDn(1381,1,{},bg),uZn.Kb=function(n){return FK(this.a,uG(n,10))},zW(d6n,"LabelDummySwitcher/lambda$2$Type",1381),sDn(1382,1,QZn,wg),uZn.Cd=function(n){gQ(this.a,uG(n,293))},zW(d6n,"LabelDummySwitcher/lambda$3$Type",1382),sDn(1383,1,b2n,ti),uZn.Ne=function(n,t){return nV(uG(n,293),uG(t,293))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"LabelDummySwitcher/lambda$4$Type",1383),sDn(802,1,Q4n,ei),uZn.Kf=function(n,t){Dnn(uG(n,36),t)},zW(d6n,"LabelManagementProcessor",802),sDn(1614,1,Q4n,ii),uZn.Kf=function(n,t){jFn(uG(n,36),t)},zW(d6n,"LabelSideSelector",1614),sDn(1622,1,Q4n,ri),uZn.Kf=function(n,t){yqn(uG(n,36),t)},zW(d6n,"LayerConstraintPostprocessor",1622),sDn(1623,1,Q4n,Yf),uZn.Kf=function(n,t){vDn(uG(n,36),t)},zW(d6n,"LayerConstraintPreprocessor",1623),sDn(371,22,{3:1,34:1,22:1,371:1},IC);var Wwt,Qwt,Jwt,Ywt,Zwt,ndt,tdt,edt,idt,rdt,cdt,adt=_cn(d6n,"LayerConstraintPreprocessor/HiddenNodeConnections",371,Oat,G6,zB);sDn(1624,1,Q4n,ci),uZn.Kf=function(n,t){zzn(uG(n,36),t)},zW(d6n,"LayerSizeAndGraphHeightCalculator",1624),sDn(1625,1,Q4n,ai),uZn.Kf=function(n,t){dRn(uG(n,36),t)},zW(d6n,"LongEdgeJoiner",1625),sDn(1626,1,Q4n,oi),uZn.Kf=function(n,t){bzn(uG(n,36),t)},zW(d6n,"LongEdgeSplitter",1626),sDn(1627,1,Q4n,RI),uZn.Kf=function(n,t){VWn(this,uG(n,36),t)},uZn.e=0,uZn.f=0,uZn.j=0,uZn.k=0,uZn.n=0,uZn.o=0,zW(d6n,"NodePromotion",1627),sDn(1628,1,b2n,ui),uZn.Ne=function(n,t){return $ln(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"NodePromotion/1",1628),sDn(1629,1,b2n,si),uZn.Ne=function(n,t){return Dln(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"NodePromotion/2",1629),sDn(1630,1,{},hi),uZn.Kb=function(n){return uG(n,42),UB(),qx(),!0},uZn.Fb=function(n){return this===n},zW(d6n,"NodePromotion/lambda$0$Type",1630),sDn(1631,1,{},mg),uZn.Kb=function(n){return P0(this.a,uG(n,42))},uZn.Fb=function(n){return this===n},uZn.a=0,zW(d6n,"NodePromotion/lambda$1$Type",1631),sDn(1632,1,{},vg),uZn.Kb=function(n){return S0(this.a,uG(n,42))},uZn.Fb=function(n){return this===n},uZn.a=0,zW(d6n,"NodePromotion/lambda$2$Type",1632),sDn(1633,1,Q4n,fi),uZn.Kf=function(n,t){wJn(uG(n,36),t)},zW(d6n,"NorthSouthPortPostprocessor",1633),sDn(1634,1,Q4n,li),uZn.Kf=function(n,t){FQn(uG(n,36),t)},zW(d6n,"NorthSouthPortPreprocessor",1634),sDn(1635,1,b2n,bi),uZn.Ne=function(n,t){return Qsn(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"NorthSouthPortPreprocessor/lambda$0$Type",1635),sDn(1636,1,Q4n,wi),uZn.Kf=function(n,t){UUn(uG(n,36),t)},zW(d6n,"PartitionMidprocessor",1636),sDn(1637,1,y1n,di),uZn.Mb=function(n){return vR(uG(n,10),(jYn(),UMt))},zW(d6n,"PartitionMidprocessor/lambda$0$Type",1637),sDn(1638,1,QZn,kg),uZn.Cd=function(n){zY(this.a,uG(n,10))},zW(d6n,"PartitionMidprocessor/lambda$1$Type",1638),sDn(1639,1,Q4n,gi),uZn.Kf=function(n,t){JRn(uG(n,36),t)},zW(d6n,"PartitionPostprocessor",1639),sDn(1640,1,Q4n,pi),uZn.Kf=function(n,t){M$n(uG(n,36),t)},zW(d6n,"PartitionPreprocessor",1640),sDn(1641,1,y1n,mi),uZn.Mb=function(n){return vR(uG(n,10),(jYn(),UMt))},zW(d6n,"PartitionPreprocessor/lambda$0$Type",1641),sDn(1642,1,{},vi),uZn.Kb=function(n){return new fX(null,new LW(new Fz(ix(Xgn(uG(n,10)).a.Kc(),new h))))},zW(d6n,"PartitionPreprocessor/lambda$1$Type",1642),sDn(1643,1,y1n,ki),uZn.Mb=function(n){return pkn(uG(n,18))},zW(d6n,"PartitionPreprocessor/lambda$2$Type",1643),sDn(1644,1,QZn,yi),uZn.Cd=function(n){rfn(uG(n,18))},zW(d6n,"PartitionPreprocessor/lambda$3$Type",1644),sDn(1645,1,Q4n,rl),uZn.Kf=function(n,t){wUn(uG(n,36),t)},zW(d6n,"PortListSorter",1645),sDn(1648,1,b2n,Mi),uZn.Ne=function(n,t){return Q5(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"PortListSorter/lambda$0$Type",1648),sDn(1650,1,b2n,Ti),uZn.Ne=function(n,t){return hGn(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"PortListSorter/lambda$1$Type",1650),sDn(1646,1,{},ji),uZn.Kb=function(n){return Cln(),uG(n,12).e},zW(d6n,"PortListSorter/lambda$2$Type",1646),sDn(1647,1,{},Ei),uZn.Kb=function(n){return Cln(),uG(n,12).g},zW(d6n,"PortListSorter/lambda$3$Type",1647),sDn(1649,1,b2n,Si),uZn.Ne=function(n,t){return bjn(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"PortListSorter/lambda$4$Type",1649),sDn(1651,1,Q4n,Pi),uZn.Kf=function(n,t){FDn(uG(n,36),t)},zW(d6n,"PortSideProcessor",1651),sDn(1652,1,Q4n,Ci),uZn.Kf=function(n,t){SBn(uG(n,36),t)},zW(d6n,"ReversedEdgeRestorer",1652),sDn(1657,1,Q4n,jk),uZn.Kf=function(n,t){kTn(this,uG(n,36),t)},zW(d6n,"SelfLoopPortRestorer",1657),sDn(1658,1,{},Ii),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"SelfLoopPortRestorer/lambda$0$Type",1658),sDn(1659,1,y1n,Oi),uZn.Mb=function(n){return uG(n,10).k==(zIn(),dbt)},zW(d6n,"SelfLoopPortRestorer/lambda$1$Type",1659),sDn(1660,1,y1n,Ai),uZn.Mb=function(n){return vR(uG(n,10),(GYn(),vmt))},zW(d6n,"SelfLoopPortRestorer/lambda$2$Type",1660),sDn(1661,1,{},Li),uZn.Kb=function(n){return uG(oIn(uG(n,10),(GYn(),vmt)),337)},zW(d6n,"SelfLoopPortRestorer/lambda$3$Type",1661),sDn(1662,1,QZn,gg),uZn.Cd=function(n){gOn(this.a,uG(n,337))},zW(d6n,"SelfLoopPortRestorer/lambda$4$Type",1662),sDn(805,1,QZn,Ni),uZn.Cd=function(n){BOn(uG(n,105))},zW(d6n,"SelfLoopPortRestorer/lambda$5$Type",805),sDn(1663,1,Q4n,$i),uZn.Kf=function(n,t){oyn(uG(n,36),t)},zW(d6n,"SelfLoopPostProcessor",1663),sDn(1664,1,{},Di),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"SelfLoopPostProcessor/lambda$0$Type",1664),sDn(1665,1,y1n,xi),uZn.Mb=function(n){return uG(n,10).k==(zIn(),dbt)},zW(d6n,"SelfLoopPostProcessor/lambda$1$Type",1665),sDn(1666,1,y1n,Ri),uZn.Mb=function(n){return vR(uG(n,10),(GYn(),vmt))},zW(d6n,"SelfLoopPostProcessor/lambda$2$Type",1666),sDn(1667,1,QZn,Ki),uZn.Cd=function(n){gSn(uG(n,10))},zW(d6n,"SelfLoopPostProcessor/lambda$3$Type",1667),sDn(1668,1,{},Fi),uZn.Kb=function(n){return new fX(null,new h3(uG(n,105).f,1))},zW(d6n,"SelfLoopPostProcessor/lambda$4$Type",1668),sDn(1669,1,QZn,dg),uZn.Cd=function(n){V6(this.a,uG(n,340))},zW(d6n,"SelfLoopPostProcessor/lambda$5$Type",1669),sDn(1670,1,y1n,_i),uZn.Mb=function(n){return!!uG(n,105).i},zW(d6n,"SelfLoopPostProcessor/lambda$6$Type",1670),sDn(1671,1,QZn,pg),uZn.Cd=function(n){eM(this.a,uG(n,105))},zW(d6n,"SelfLoopPostProcessor/lambda$7$Type",1671),sDn(1653,1,Q4n,Bi),uZn.Kf=function(n,t){Fxn(uG(n,36),t)},zW(d6n,"SelfLoopPreProcessor",1653),sDn(1654,1,{},Hi),uZn.Kb=function(n){return new fX(null,new h3(uG(n,105).f,1))},zW(d6n,"SelfLoopPreProcessor/lambda$0$Type",1654),sDn(1655,1,{},Ui),uZn.Kb=function(n){return uG(n,340).a},zW(d6n,"SelfLoopPreProcessor/lambda$1$Type",1655),sDn(1656,1,QZn,Gi),uZn.Cd=function(n){v$(uG(n,18))},zW(d6n,"SelfLoopPreProcessor/lambda$2$Type",1656),sDn(1672,1,Q4n,_F),uZn.Kf=function(n,t){xIn(this,uG(n,36),t)},zW(d6n,"SelfLoopRouter",1672),sDn(1673,1,{},qi),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},zW(d6n,"SelfLoopRouter/lambda$0$Type",1673),sDn(1674,1,y1n,Xi),uZn.Mb=function(n){return uG(n,10).k==(zIn(),dbt)},zW(d6n,"SelfLoopRouter/lambda$1$Type",1674),sDn(1675,1,y1n,zi),uZn.Mb=function(n){return vR(uG(n,10),(GYn(),vmt))},zW(d6n,"SelfLoopRouter/lambda$2$Type",1675),sDn(1676,1,{},Vi),uZn.Kb=function(n){return uG(oIn(uG(n,10),(GYn(),vmt)),337)},zW(d6n,"SelfLoopRouter/lambda$3$Type",1676),sDn(1677,1,QZn,OC),uZn.Cd=function(n){lY(this.a,this.b,uG(n,337))},zW(d6n,"SelfLoopRouter/lambda$4$Type",1677),sDn(1678,1,Q4n,Wi),uZn.Kf=function(n,t){tFn(uG(n,36),t)},zW(d6n,"SemiInteractiveCrossMinProcessor",1678),sDn(1679,1,y1n,Qi),uZn.Mb=function(n){return uG(n,10).k==(zIn(),dbt)},zW(d6n,"SemiInteractiveCrossMinProcessor/lambda$0$Type",1679),sDn(1680,1,y1n,Ji),uZn.Mb=function(n){return MX(uG(n,10))._b((jYn(),rTt))},zW(d6n,"SemiInteractiveCrossMinProcessor/lambda$1$Type",1680),sDn(1681,1,b2n,Yi),uZn.Ne=function(n,t){return Eon(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(d6n,"SemiInteractiveCrossMinProcessor/lambda$2$Type",1681),sDn(1682,1,{},Zi),uZn.Ve=function(n,t){return VY(uG(n,10),uG(t,10))},zW(d6n,"SemiInteractiveCrossMinProcessor/lambda$3$Type",1682),sDn(1684,1,Q4n,nr),uZn.Kf=function(n,t){MXn(uG(n,36),t)},zW(d6n,"SortByInputModelProcessor",1684),sDn(1685,1,y1n,tr),uZn.Mb=function(n){return 0!=uG(n,12).g.c.length},zW(d6n,"SortByInputModelProcessor/lambda$0$Type",1685),sDn(1686,1,QZn,yg),uZn.Cd=function(n){ZOn(this.a,uG(n,12))},zW(d6n,"SortByInputModelProcessor/lambda$1$Type",1686),sDn(1759,817,{},Kon),uZn.df=function(n){var t,e,i,r;switch(this.c=n,this.a.g){case 2:t=new Zm,kS(JJ(new fX(null,new h3(this.c.a.b,16)),new dr),new BC(this,t)),QAn(this,new ir),Prn(t,new rr),t.c.length=0,kS(JJ(new fX(null,new h3(this.c.a.b,16)),new cr),new Tg(t)),QAn(this,new ar),Prn(t,new or),t.c.length=0,e=w$(Tun(ZJ(new fX(null,new h3(this.c.a.b,16)),new jg(this))),new ur),kS(new fX(null,new h3(this.c.a.a,16)),new NC(e,t)),QAn(this,new hr),Prn(t,new fr),t.c.length=0;break;case 3:i=new Zm,QAn(this,new er),r=w$(Tun(ZJ(new fX(null,new h3(this.c.a.b,16)),new Mg(this))),new sr),kS(JJ(new fX(null,new h3(this.c.a.b,16)),new lr),new DC(r,i)),QAn(this,new br),Prn(i,new wr),i.c.length=0;break;default:throw hv(new Hv)}},uZn.b=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation",1759),sDn(1760,1,A2n,er),uZn.Lb=function(n){return F$(uG(n,60).g,154)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return F$(uG(n,60).g,154)},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$0$Type",1760),sDn(1761,1,{},Mg),uZn.Ye=function(n){return $Ln(this.a,uG(n,60))},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$1$Type",1761),sDn(1769,1,M1n,AC),uZn.de=function(){TEn(this.a,this.b,-1)},uZn.b=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$10$Type",1769),sDn(1771,1,A2n,ir),uZn.Lb=function(n){return F$(uG(n,60).g,154)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return F$(uG(n,60).g,154)},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$11$Type",1771),sDn(1772,1,QZn,rr),uZn.Cd=function(n){uG(n,380).de()},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$12$Type",1772),sDn(1773,1,y1n,cr),uZn.Mb=function(n){return F$(uG(n,60).g,10)},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$13$Type",1773),sDn(1775,1,QZn,Tg),uZn.Cd=function(n){tpn(this.a,uG(n,60))},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$14$Type",1775),sDn(1774,1,M1n,xC),uZn.de=function(){TEn(this.b,this.a,-1)},uZn.a=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$15$Type",1774),sDn(1776,1,A2n,ar),uZn.Lb=function(n){return F$(uG(n,60).g,10)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return F$(uG(n,60).g,10)},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$16$Type",1776),sDn(1777,1,QZn,or),uZn.Cd=function(n){uG(n,380).de()},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$17$Type",1777),sDn(1778,1,{},jg),uZn.Ye=function(n){return DLn(this.a,uG(n,60))},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$18$Type",1778),sDn(1779,1,{},ur),uZn.We=function(){return 0},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$19$Type",1779),sDn(1762,1,{},sr),uZn.We=function(){return 0},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$2$Type",1762),sDn(1781,1,QZn,NC),uZn.Cd=function(n){uz(this.a,this.b,uG(n,316))},uZn.a=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$20$Type",1781),sDn(1780,1,M1n,$C),uZn.de=function(){HDn(this.a,this.b,-1)},uZn.b=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$21$Type",1780),sDn(1782,1,A2n,hr),uZn.Lb=function(n){return uG(n,60),!0},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return uG(n,60),!0},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$22$Type",1782),sDn(1783,1,QZn,fr),uZn.Cd=function(n){uG(n,380).de()},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$23$Type",1783),sDn(1763,1,y1n,lr),uZn.Mb=function(n){return F$(uG(n,60).g,10)},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$3$Type",1763),sDn(1765,1,QZn,DC),uZn.Cd=function(n){sz(this.a,this.b,uG(n,60))},uZn.a=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$4$Type",1765),sDn(1764,1,M1n,RC),uZn.de=function(){TEn(this.b,this.a,-1)},uZn.a=0,zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$5$Type",1764),sDn(1766,1,A2n,br),uZn.Lb=function(n){return uG(n,60),!0},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return uG(n,60),!0},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$6$Type",1766),sDn(1767,1,QZn,wr),uZn.Cd=function(n){uG(n,380).de()},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$7$Type",1767),sDn(1768,1,y1n,dr),uZn.Mb=function(n){return F$(uG(n,60).g,154)},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$8$Type",1768),sDn(1770,1,QZn,BC),uZn.Cd=function(n){mrn(this.a,this.b,uG(n,60))},zW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$9$Type",1770),sDn(1586,1,Q4n,Ux),uZn.Kf=function(n,t){Mzn(this,uG(n,36),t)},zW(E6n,"HorizontalGraphCompactor",1586),sDn(1587,1,{},Eg),uZn.ff=function(n,t){var e,i;return $en(n,t)?0:(e=z4(n),i=z4(t),e&&e.k==(zIn(),lbt)||i&&i.k==(zIn(),lbt)?0:_x(uG(oIn(this.a.a,(GYn(),kmt)),312),e?e.k:(zIn(),wbt),i?i.k:(zIn(),wbt)))},uZn.gf=function(n,t){var e,i;return $en(n,t)?1:(e=z4(n),i=z4(t),Bx(uG(oIn(this.a.a,(GYn(),kmt)),312),e?e.k:(zIn(),wbt),i?i.k:(zIn(),wbt)))},zW(E6n,"HorizontalGraphCompactor/1",1587),sDn(1588,1,{},gr),uZn.ef=function(n,t){return JS(),0==n.a.i},zW(E6n,"HorizontalGraphCompactor/lambda$0$Type",1588),sDn(1589,1,{},Sg),uZn.ef=function(n,t){return ZY(this.a,n,t)},zW(E6n,"HorizontalGraphCompactor/lambda$1$Type",1589),sDn(1730,1,{},Sen),zW(E6n,"LGraphToCGraphTransformer",1730),sDn(1738,1,y1n,pr),uZn.Mb=function(n){return null!=n},zW(E6n,"LGraphToCGraphTransformer/0methodref$nonNull$Type",1738),sDn(1731,1,{},mr),uZn.Kb=function(n){return GB(),cpn(oIn(uG(uG(n,60).g,10),(GYn(),rmt)))},zW(E6n,"LGraphToCGraphTransformer/lambda$0$Type",1731),sDn(1732,1,{},vr),uZn.Kb=function(n){return GB(),_wn(uG(uG(n,60).g,154))},zW(E6n,"LGraphToCGraphTransformer/lambda$1$Type",1732),sDn(1741,1,y1n,kr),uZn.Mb=function(n){return GB(),F$(uG(n,60).g,10)},zW(E6n,"LGraphToCGraphTransformer/lambda$10$Type",1741),sDn(1742,1,QZn,yr),uZn.Cd=function(n){jZ(uG(n,60))},zW(E6n,"LGraphToCGraphTransformer/lambda$11$Type",1742),sDn(1743,1,y1n,Mr),uZn.Mb=function(n){return GB(),F$(uG(n,60).g,154)},zW(E6n,"LGraphToCGraphTransformer/lambda$12$Type",1743),sDn(1747,1,QZn,Tr),uZn.Cd=function(n){Fwn(uG(n,60))},zW(E6n,"LGraphToCGraphTransformer/lambda$13$Type",1747),sDn(1744,1,QZn,Pg),uZn.Cd=function(n){WL(this.a,uG(n,8))},uZn.a=0,zW(E6n,"LGraphToCGraphTransformer/lambda$14$Type",1744),sDn(1745,1,QZn,Cg),uZn.Cd=function(n){JL(this.a,uG(n,116))},uZn.a=0,zW(E6n,"LGraphToCGraphTransformer/lambda$15$Type",1745),sDn(1746,1,QZn,Ig),uZn.Cd=function(n){QL(this.a,uG(n,8))},uZn.a=0,zW(E6n,"LGraphToCGraphTransformer/lambda$16$Type",1746),sDn(1748,1,{},jr),uZn.Kb=function(n){return GB(),new fX(null,new LW(new Fz(ix(Xgn(uG(n,10)).a.Kc(),new h))))},zW(E6n,"LGraphToCGraphTransformer/lambda$17$Type",1748),sDn(1749,1,y1n,Er),uZn.Mb=function(n){return GB(),v9(uG(n,18))},zW(E6n,"LGraphToCGraphTransformer/lambda$18$Type",1749),sDn(1750,1,QZn,Og),uZn.Cd=function(n){fin(this.a,uG(n,18))},zW(E6n,"LGraphToCGraphTransformer/lambda$19$Type",1750),sDn(1734,1,QZn,Ag),uZn.Cd=function(n){Q3(this.a,uG(n,154))},zW(E6n,"LGraphToCGraphTransformer/lambda$2$Type",1734),sDn(1751,1,{},Sr),uZn.Kb=function(n){return GB(),new fX(null,new h3(uG(n,30).a,16))},zW(E6n,"LGraphToCGraphTransformer/lambda$20$Type",1751),sDn(1752,1,{},Pr),uZn.Kb=function(n){return GB(),new fX(null,new LW(new Fz(ix(Xgn(uG(n,10)).a.Kc(),new h))))},zW(E6n,"LGraphToCGraphTransformer/lambda$21$Type",1752),sDn(1753,1,{},Cr),uZn.Kb=function(n){return GB(),uG(oIn(uG(n,18),(GYn(),Tmt)),15)},zW(E6n,"LGraphToCGraphTransformer/lambda$22$Type",1753),sDn(1754,1,y1n,Ir),uZn.Mb=function(n){return Hx(uG(n,15))},zW(E6n,"LGraphToCGraphTransformer/lambda$23$Type",1754),sDn(1755,1,QZn,Lg),uZn.Cd=function(n){pLn(this.a,uG(n,15))},zW(E6n,"LGraphToCGraphTransformer/lambda$24$Type",1755),sDn(1733,1,QZn,HC),uZn.Cd=function(n){P5(this.a,this.b,uG(n,154))},zW(E6n,"LGraphToCGraphTransformer/lambda$3$Type",1733),sDn(1735,1,{},Or),uZn.Kb=function(n){return GB(),new fX(null,new h3(uG(n,30).a,16))},zW(E6n,"LGraphToCGraphTransformer/lambda$4$Type",1735),sDn(1736,1,{},Ar),uZn.Kb=function(n){return GB(),new fX(null,new LW(new Fz(ix(Xgn(uG(n,10)).a.Kc(),new h))))},zW(E6n,"LGraphToCGraphTransformer/lambda$5$Type",1736),sDn(1737,1,{},Lr),uZn.Kb=function(n){return GB(),uG(oIn(uG(n,18),(GYn(),Tmt)),15)},zW(E6n,"LGraphToCGraphTransformer/lambda$6$Type",1737),sDn(1739,1,QZn,Ng),uZn.Cd=function(n){xLn(this.a,uG(n,15))},zW(E6n,"LGraphToCGraphTransformer/lambda$8$Type",1739),sDn(1740,1,QZn,UC),uZn.Cd=function(n){k$(this.a,this.b,uG(n,154))},zW(E6n,"LGraphToCGraphTransformer/lambda$9$Type",1740),sDn(1729,1,{},Nr),uZn.cf=function(n){var t,e,i,r,c;for(this.a=n,this.d=new ak,this.c=Inn(Tst,EZn,125,this.a.a.a.c.length,0,1),this.b=0,e=new Ww(this.a.a.a);e.a<e.c.c.length;)(t=uG(N3(e),316)).d=this.b,c=jx(KS(new sk,t),this.d),this.c[this.b]=c,++this.b;for(mWn(this),WQn(this),HRn(this),YHn(_B(this.d),new fy),r=new Ww(this.a.a.b);r.a<r.c.c.length;)(i=uG(N3(r),60)).d.c=this.c[i.a.d].e+i.b.a},uZn.b=0,zW(E6n,"NetworkSimplexCompaction",1729),sDn(154,1,{34:1,154:1},Hqn),uZn.Fd=function(n){return Oin(this,uG(n,154))},uZn.Ib=function(){return _wn(this)},zW(E6n,"VerticalSegment",154),sDn(841,1,{},IPn),uZn.c=0,uZn.e=0,uZn.i=0,zW(S6n,"BetweenLayerEdgeTwoNodeCrossingsCounter",841),sDn(677,1,{677:1},Uun),uZn.Ib=function(){return"AdjacencyList [node="+this.d+", adjacencies= "+this.a+"]"},uZn.b=0,uZn.c=0,uZn.f=0,zW(S6n,"BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList",677),sDn(294,1,{34:1,294:1},$R),uZn.Fd=function(n){return lq(this,uG(n,294))},uZn.Ib=function(){return"Adjacency [position="+this.c+", cardinality="+this.a+", currentCardinality="+this.b+"]"},uZn.a=0,uZn.b=0,uZn.c=0,zW(S6n,"BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList/Adjacency",294),sDn(2026,1,{},_On),uZn.b=0,uZn.e=!1,zW(S6n,"CrossingMatrixFiller",2026);var odt,udt,sdt,hdt,fdt=Iq(P6n,"IInitializable");sDn(1867,1,C6n,qC),uZn.gg=function(n,t,e,i,r,c){},uZn.ig=function(n,t,e){},uZn.eg=function(){return this.c!=(ean(),BEt)},uZn.fg=function(){this.e=Inn(YHt,W1n,28,this.d,15,1)},uZn.hg=function(n,t){t[n][0].c.p=n},uZn.jg=function(n,t,e,i){++this.d},uZn.kg=function(){return!0},uZn.lg=function(n,t,e,i){return iwn(this,n,t,e),p8(this,t)},uZn.mg=function(n,t){var e;return iwn(this,n,e=OT(t,n.length),t),Tfn(this,e)},uZn.d=0,zW(S6n,"GreedySwitchHeuristic",1867),sDn(2029,1,{},sX),uZn.b=0,uZn.d=0,zW(S6n,"NorthSouthEdgeNeighbouringNodeCrossingsCounter",2029),sDn(2016,1,{},eBn),uZn.a=!1,zW(S6n,"SwitchDecider",2016),sDn(105,1,{105:1},cAn),uZn.a=null,uZn.c=null,uZn.i=null,zW(I6n,"SelfHyperLoop",105),sDn(2013,1,{},vkn),uZn.c=0,uZn.e=0,zW(I6n,"SelfHyperLoopLabels",2013),sDn(421,22,{3:1,34:1,22:1,421:1},XC);var ldt,bdt,wdt,ddt,gdt,pdt,mdt=_cn(I6n,"SelfHyperLoopLabels/Alignment",421,Oat,U6,VB);sDn(340,1,{340:1},m7),zW(I6n,"SelfLoopEdge",340),sDn(337,1,{337:1},kkn),uZn.a=!1,zW(I6n,"SelfLoopHolder",337),sDn(1790,1,y1n,qr),uZn.Mb=function(n){return v9(uG(n,18))},zW(I6n,"SelfLoopHolder/lambda$0$Type",1790),sDn(113,1,{113:1},Bkn),uZn.a=!1,uZn.c=!1,zW(I6n,"SelfLoopPort",113),sDn(1855,1,y1n,Xr),uZn.Mb=function(n){return v9(uG(n,18))},zW(I6n,"SelfLoopPort/lambda$0$Type",1855),sDn(375,22,{3:1,34:1,22:1,375:1},zC);var vdt,kdt,ydt,Mdt,Tdt,jdt,Edt,Sdt,Pdt=_cn(I6n,"SelfLoopType",375,Oat,s9,WB);sDn(1798,1,{},sl),zW(O6n,"PortRestorer",1798),sDn(372,22,{3:1,34:1,22:1,372:1},VC);var Cdt,Idt,Odt,Adt,Ldt,Ndt,$dt,Ddt,xdt,Rdt=_cn(O6n,"PortRestorer/PortSideArea",372,Oat,_2,qB);sDn(1799,1,{},Dr),uZn.Kb=function(n){return jIn(),uG(n,15).Oc()},zW(O6n,"PortRestorer/lambda$0$Type",1799),sDn(1800,1,QZn,xr),uZn.Cd=function(n){jIn(),uG(n,113).c=!1},zW(O6n,"PortRestorer/lambda$1$Type",1800),sDn(1809,1,y1n,Rr),uZn.Mb=function(n){return jIn(),uG(n,12).j==(KQn(),_Rt)},zW(O6n,"PortRestorer/lambda$10$Type",1809),sDn(1810,1,{},Kr),uZn.Kb=function(n){return jIn(),uG(n,113).d},zW(O6n,"PortRestorer/lambda$11$Type",1810),sDn(1811,1,QZn,$g),uZn.Cd=function(n){ZT(this.a,uG(n,12))},zW(O6n,"PortRestorer/lambda$12$Type",1811),sDn(1801,1,QZn,Dg),uZn.Cd=function(n){SR(this.a,uG(n,105))},zW(O6n,"PortRestorer/lambda$2$Type",1801),sDn(1802,1,b2n,Fr),uZn.Ne=function(n,t){return wcn(uG(n,113),uG(t,113))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(O6n,"PortRestorer/lambda$3$Type",1802),sDn(1803,1,y1n,_r),uZn.Mb=function(n){return jIn(),uG(n,113).c},zW(O6n,"PortRestorer/lambda$4$Type",1803),sDn(1804,1,y1n,Br),uZn.Mb=function(n){return Vun(uG(n,12))},zW(O6n,"PortRestorer/lambda$5$Type",1804),sDn(1805,1,y1n,$r),uZn.Mb=function(n){return jIn(),uG(n,12).j==(KQn(),yRt)},zW(O6n,"PortRestorer/lambda$6$Type",1805),sDn(1806,1,y1n,Hr),uZn.Mb=function(n){return jIn(),uG(n,12).j==(KQn(),kRt)},zW(O6n,"PortRestorer/lambda$7$Type",1806),sDn(1807,1,y1n,Ur),uZn.Mb=function(n){return z6(uG(n,12))},zW(O6n,"PortRestorer/lambda$8$Type",1807),sDn(1808,1,y1n,Gr),uZn.Mb=function(n){return jIn(),uG(n,12).j==(KQn(),KRt)},zW(O6n,"PortRestorer/lambda$9$Type",1808),sDn(276,22,{3:1,34:1,22:1,276:1},yY);var Kdt,Fdt,_dt,Bdt,Hdt,Udt,Gdt,qdt,Xdt=_cn(O6n,"PortSideAssigner/Target",276,Oat,drn,QB);sDn(1791,1,{},Vr),uZn.Kb=function(n){return JJ(new fX(null,new h3(uG(n,105).j,16)),new Zr)},zW(O6n,"PortSideAssigner/lambda$1$Type",1791),sDn(1792,1,{},Wr),uZn.Kb=function(n){return uG(n,113).d},zW(O6n,"PortSideAssigner/lambda$2$Type",1792),sDn(1793,1,QZn,Qr),uZn.Cd=function(n){NLn(uG(n,12),(KQn(),yRt))},zW(O6n,"PortSideAssigner/lambda$3$Type",1793),sDn(1794,1,{},Jr),uZn.Kb=function(n){return uG(n,113).d},zW(O6n,"PortSideAssigner/lambda$4$Type",1794),sDn(1795,1,QZn,xg),uZn.Cd=function(n){yv(this.a,uG(n,12))},zW(O6n,"PortSideAssigner/lambda$5$Type",1795),sDn(1796,1,b2n,zr),uZn.Ne=function(n,t){return YQ(uG(n,105),uG(t,105))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(O6n,"PortSideAssigner/lambda$6$Type",1796),sDn(1797,1,b2n,Yr),uZn.Ne=function(n,t){return EG(uG(n,113),uG(t,113))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(O6n,"PortSideAssigner/lambda$7$Type",1797),sDn(820,1,y1n,Zr),uZn.Mb=function(n){return uG(n,113).c},zW(O6n,"PortSideAssigner/lambda$8$Type",820),sDn(2108,1,{}),zW(A6n,"AbstractSelfLoopRouter",2108),sDn(1816,1,b2n,nc),uZn.Ne=function(n,t){return P_(uG(n,105),uG(t,105))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(A6n,t3n,1816),sDn(1817,1,b2n,tc),uZn.Ne=function(n,t){return S_(uG(n,105),uG(t,105))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(A6n,e3n,1817),sDn(1856,2108,{},ec),uZn.ng=function(n,t,e){return e},zW(A6n,"OrthogonalSelfLoopRouter",1856),sDn(1858,1,QZn,GC),uZn.Cd=function(n){Jvn(this.b,this.a,uG(n,8))},zW(A6n,"OrthogonalSelfLoopRouter/lambda$0$Type",1858),sDn(1857,1856,{},ic),uZn.ng=function(n,t,e){var i,r;return sR(e,0,JF(D$((i=n.c.d).n),i.a)),aq(e,JF(D$((r=n.d.d).n),r.a)),NUn(e)},zW(A6n,"PolylineSelfLoopRouter",1857),sDn(1812,1,{},hl),uZn.a=null,zW(A6n,"RoutingDirector",1812),sDn(1813,1,b2n,rc),uZn.Ne=function(n,t){return MG(uG(n,113),uG(t,113))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(A6n,"RoutingDirector/lambda$0$Type",1813),sDn(1814,1,{},cc),uZn.Kb=function(n){return YS(),uG(n,105).j},zW(A6n,"RoutingDirector/lambda$1$Type",1814),sDn(1815,1,QZn,ac),uZn.Cd=function(n){YS(),uG(n,15).jd(Fdt)},zW(A6n,"RoutingDirector/lambda$2$Type",1815),sDn(1818,1,{},oc),zW(A6n,"RoutingSlotAssigner",1818),sDn(1819,1,y1n,Rg),uZn.Mb=function(n){return wA(this.a,uG(n,105))},zW(A6n,"RoutingSlotAssigner/lambda$0$Type",1819),sDn(1820,1,b2n,Kg),uZn.Ne=function(n,t){return bX(this.a,uG(n,105),uG(t,105))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(A6n,"RoutingSlotAssigner/lambda$1$Type",1820),sDn(1859,1856,{},uc),uZn.ng=function(n,t,e){var i,r,c,a;return i=uM(pK(eyn(n.b.g.b,(jYn(),pTt)))),Xxn(n,t,e,a=new UR(Uhn(cT(PNt,1),zZn,8,0,[(c=n.c.d,JF(new eN(c.n),c.a))])),i),aq(a,JF(new eN((r=n.d.d).n),r.a)),$Mn(new jqn(a))},zW(A6n,"SplineSelfLoopRouter",1859),sDn(586,1,b2n,xon,KG),uZn.Ne=function(n,t){return rYn(this,uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(L6n,"ModelOrderNodeComparator",586),sDn(1821,1,y1n,sc),uZn.Mb=function(n){return 0!=uG(n,12).e.c.length},zW(L6n,"ModelOrderNodeComparator/lambda$0$Type",1821),sDn(821,1,b2n,Gbn,j6),uZn.Ne=function(n,t){return Jz(this,n,t)},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},uZn.b=!1,zW(L6n,"ModelOrderPortComparator",821),sDn(815,1,{},hc),uZn.og=function(n,t){var i,r,c,a;for(c=hOn(t),i=new Zm,a=t.f/c,r=1;r<c;++r)kD(i,xwn(pz(Bsn(e.Math.round(r*a)))));return i},uZn.pg=function(){return!1},zW(N6n,"ARDCutIndexHeuristic",815),sDn(1544,1,Q4n,fc),uZn.Kf=function(n,t){mHn(uG(n,36),t)},zW(N6n,"BreakingPointInserter",1544),sDn(313,1,{313:1},O5),uZn.Ib=function(){var n;return(n=new WM).a+="BPInfo[",n.a+="\n\tstart=",QA(n,this.i),n.a+="\n\tend=",QA(n,this.a),n.a+="\n\tnodeStartEdge=",QA(n,this.e),n.a+="\n\tstartEndEdge=",QA(n,this.j),n.a+="\n\toriginalEdge=",QA(n,this.f),n.a+="\n\tstartInLayerDummy=",QA(n,this.k),n.a+="\n\tstartInLayerEdge=",QA(n,this.n),n.a+="\n\tendInLayerDummy=",QA(n,this.b),n.a+="\n\tendInLayerEdge=",QA(n,this.c),n.a},zW(N6n,"BreakingPointInserter/BPInfo",313),sDn(661,1,{661:1},Vg),uZn.a=!1,uZn.b=0,uZn.c=0,zW(N6n,"BreakingPointInserter/Cut",661),sDn(1545,1,Q4n,lc),uZn.Kf=function(n,t){rRn(uG(n,36),t)},zW(N6n,"BreakingPointProcessor",1545),sDn(1546,1,y1n,bc),uZn.Mb=function(n){return Lin(uG(n,10))},zW(N6n,"BreakingPointProcessor/0methodref$isEnd$Type",1546),sDn(1547,1,y1n,wc),uZn.Mb=function(n){return Nin(uG(n,10))},zW(N6n,"BreakingPointProcessor/1methodref$isStart$Type",1547),sDn(1548,1,Q4n,dc),uZn.Kf=function(n,t){URn(this,uG(n,36),t)},zW(N6n,"BreakingPointRemover",1548),sDn(1549,1,QZn,gc),uZn.Cd=function(n){uG(n,131).k=!0},zW(N6n,"BreakingPointRemover/lambda$0$Type",1549),sDn(811,1,{},dDn),uZn.b=0,uZn.e=0,uZn.f=0,uZn.j=0,zW(N6n,"GraphStats",811),sDn(812,1,{},pc),uZn.Ve=function(n,t){return e.Math.max(uM(pK(n)),uM(pK(t)))},zW(N6n,"GraphStats/0methodref$max$Type",812),sDn(813,1,{},mc),uZn.Ve=function(n,t){return e.Math.max(uM(pK(n)),uM(pK(t)))},zW(N6n,"GraphStats/2methodref$max$Type",813),sDn(1726,1,{},vc),uZn.Ve=function(n,t){return TU(pK(n),pK(t))},zW(N6n,"GraphStats/lambda$1$Type",1726),sDn(1727,1,{},Fg),uZn.Kb=function(n){return Hkn(this.a,uG(n,30))},zW(N6n,"GraphStats/lambda$2$Type",1727),sDn(1728,1,{},_g),uZn.Kb=function(n){return FRn(this.a,uG(n,30))},zW(N6n,"GraphStats/lambda$6$Type",1728),sDn(814,1,{},kc),uZn.og=function(n,t){return uG(oIn(n,(jYn(),FTt)),15)||(hZ(),hZ(),zot)},uZn.pg=function(){return!1},zW(N6n,"ICutIndexCalculator/ManualCutIndexCalculator",814),sDn(816,1,{},yc),uZn.og=function(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;for(null==t.n&&TTn(t),y=t.n,null==t.d&&TTn(t),s=t.d,(k=Inn(eUt,I0n,28,y.length,15,1))[0]=y[0],m=y[0],h=1;h<y.length;h++)k[h]=k[h-1]+y[h],m+=y[h];for(c=hOn(t)-1,o=uG(oIn(n,(jYn(),_Tt)),17).a,r=T0n,i=new Zm,b=e.Math.max(0,c-o);b<=e.Math.min(t.f-1,c+o);b++){if(g=m/(b+1),p=0,f=1,a=new Zm,v=T0n,l=0,u=0,d=s[0],0==b)v=m,null==t.g&&(t.g=cun(t,new mc)),u=uM(t.g);else{for(;f<t.f;)k[f-1]-p>=g&&(kD(a,xwn(f)),v=e.Math.max(v,k[f-1]-l),u+=d,p+=k[f-1]-p,l=k[f-1],d=s[f]),d=e.Math.max(d,s[f]),++f;u+=d}(w=e.Math.min(1/v,1/t.b/u))>r&&(r=w,i=a)}return i},uZn.pg=function(){return!1},zW(N6n,"MSDCutIndexHeuristic",816),sDn(1683,1,Q4n,Mc),uZn.Kf=function(n,t){Cqn(uG(n,36),t)},zW(N6n,"SingleEdgeGraphWrapper",1683),sDn(232,22,{3:1,34:1,22:1,232:1},QC);var zdt,Vdt,Wdt,Qdt=_cn($6n,"CenterEdgeLabelPlacementStrategy",232,Oat,znn,JB);sDn(431,22,{3:1,34:1,22:1,431:1},WC);var Jdt,Ydt,Zdt,ngt,tgt=_cn($6n,"ConstraintCalculationStrategy",431,Oat,w1,YB);sDn(322,22,{3:1,34:1,22:1,322:1,188:1,196:1},JC),uZn.dg=function(){return ZLn(this)},uZn.qg=function(){return ZLn(this)};var egt,igt,rgt,cgt,agt=_cn($6n,"CrossingMinimizationStrategy",322,Oat,B2,ZB);sDn(351,22,{3:1,34:1,22:1,351:1},YC);var ogt,ugt,sgt,hgt,fgt,lgt,bgt=_cn($6n,"CuttingStrategy",351,Oat,H2,nH);sDn(348,22,{3:1,34:1,22:1,348:1,188:1,196:1},ZC),uZn.dg=function(){return ODn(this)},uZn.qg=function(){return ODn(this)};var wgt,dgt,ggt,pgt=_cn($6n,"CycleBreakingStrategy",348,Oat,h9,tH);sDn(428,22,{3:1,34:1,22:1,428:1},nI);var mgt,vgt,kgt,ygt,Mgt=_cn($6n,"DirectionCongruency",428,Oat,b1,eH);sDn(460,22,{3:1,34:1,22:1,460:1},tI);var Tgt,jgt,Egt,Sgt,Pgt,Cgt,Igt,Ogt=_cn($6n,"EdgeConstraint",460,Oat,U2,sH);sDn(283,22,{3:1,34:1,22:1,283:1},eI);var Agt,Lgt,Ngt,$gt=_cn($6n,"EdgeLabelSideSelection",283,Oat,Gnn,hH);sDn(488,22,{3:1,34:1,22:1,488:1},iI);var Dgt,xgt,Rgt,Kgt,Fgt,_gt,Bgt,Hgt=_cn($6n,"EdgeStraighteningStrategy",488,Oat,y1,fH);sDn(281,22,{3:1,34:1,22:1,281:1},rI);var Ugt,Ggt,qgt,Xgt,zgt,Vgt,Wgt,Qgt=_cn($6n,"FixedAlignment",281,Oat,qnn,uH);sDn(282,22,{3:1,34:1,22:1,282:1},cI);var Jgt,Ygt,Zgt,npt,tpt,ept,ipt,rpt,cpt,apt,opt,upt=_cn($6n,"GraphCompactionStrategy",282,Oat,Xnn,iH);sDn(259,22,{3:1,34:1,22:1,259:1},aI);var spt,hpt,fpt,lpt,bpt=_cn($6n,"GraphProperties",259,Oat,oun,rH);sDn(299,22,{3:1,34:1,22:1,299:1},oI);var wpt,dpt,gpt,ppt,mpt=_cn($6n,"GreedySwitchType",299,Oat,G2,cH);sDn(311,22,{3:1,34:1,22:1,311:1},uI);var vpt,kpt,ypt,Mpt=_cn($6n,"InLayerConstraint",311,Oat,q2,aH);sDn(429,22,{3:1,34:1,22:1,429:1},sI);var Tpt,jpt,Ept,Spt,Ppt,Cpt,Ipt,Opt,Apt,Lpt,Npt,$pt,Dpt,xpt,Rpt,Kpt,Fpt,_pt,Bpt,Hpt,Upt,Gpt,qpt,Xpt,zpt,Vpt,Wpt,Qpt,Jpt,Ypt,Zpt,nmt,tmt,emt,imt,rmt,cmt,amt,omt,umt,smt,hmt,fmt,lmt,bmt,wmt,dmt,gmt,pmt,mmt,vmt,kmt,ymt,Mmt,Tmt,jmt,Emt,Smt,Pmt,Cmt,Imt,Omt,Amt,Lmt,Nmt=_cn($6n,"InteractiveReferencePoint",429,Oat,l1,oH);sDn(171,22,{3:1,34:1,22:1,171:1},hI);var $mt,Dmt,xmt,Rmt,Kmt,Fmt,_mt,Bmt,Hmt,Umt,Gmt,qmt,Xmt,zmt,Vmt,Wmt,Qmt,Jmt,Ymt,Zmt,nvt,tvt,evt,ivt,rvt,cvt,avt,ovt,uvt,svt,hvt,fvt,lvt,bvt,wvt,dvt,gvt,pvt,mvt,vvt,kvt,yvt,Mvt,Tvt,jvt,Evt,Svt,Pvt,Cvt,Ivt,Ovt,Avt,Lvt,Nvt,$vt,Dvt,xvt,Rvt,Kvt,Fvt,_vt,Bvt,Hvt,Uvt,Gvt,qvt,Xvt,zvt,Vvt,Wvt,Qvt,Jvt,Yvt,Zvt,nkt,tkt,ekt,ikt,rkt,ckt,akt,okt,ukt,skt,hkt,fkt,lkt,bkt,wkt,dkt,gkt,pkt,mkt,vkt,kkt,ykt,Mkt,Tkt,jkt,Ekt,Skt,Pkt,Ckt,Ikt,Okt,Akt,Lkt,Nkt,$kt,Dkt,xkt,Rkt,Kkt,Fkt,_kt,Bkt,Hkt,Ukt,Gkt,qkt,Xkt,zkt,Vkt,Wkt,Qkt,Jkt,Ykt,Zkt,nyt,tyt,eyt,iyt,ryt,cyt,ayt,oyt,uyt,syt,hyt,fyt,lyt,byt,wyt,dyt,gyt,pyt,myt,vyt,kyt,yyt,Myt,Tyt,jyt,Eyt,Syt,Pyt,Cyt,Iyt,Oyt,Ayt,Lyt,Nyt,$yt,Dyt,xyt,Ryt,Kyt,Fyt,_yt,Byt,Hyt,Uyt,Gyt,qyt,Xyt,zyt,Vyt,Wyt,Qyt,Jyt,Yyt,Zyt,nMt,tMt,eMt,iMt,rMt,cMt,aMt,oMt,uMt,sMt,hMt,fMt,lMt,bMt,wMt,dMt,gMt,pMt,mMt,vMt,kMt,yMt,MMt,TMt,jMt,EMt,SMt,PMt,CMt,IMt,OMt,AMt,LMt,NMt,$Mt,DMt,xMt,RMt,KMt,FMt,_Mt,BMt,HMt,UMt,GMt,qMt,XMt,zMt,VMt,WMt,QMt,JMt,YMt,ZMt,nTt,tTt,eTt,iTt,rTt,cTt,aTt,oTt,uTt,sTt,hTt,fTt,lTt,bTt,wTt,dTt,gTt,pTt,mTt,vTt,kTt,yTt,MTt,TTt,jTt,ETt,STt,PTt,CTt,ITt,OTt,ATt,LTt,NTt,$Tt,DTt,xTt,RTt,KTt,FTt,_Tt,BTt,HTt,UTt,GTt,qTt,XTt,zTt,VTt,WTt,QTt,JTt,YTt,ZTt,njt,tjt,ejt,ijt,rjt,cjt,ajt=_cn($6n,"LayerConstraint",171,Oat,l9,lH);sDn(859,1,K2n,fl),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,B6n),""),"Direction Congruency"),"Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other."),vvt),(lAn(),gNt)),Mgt),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,H6n),""),"Feedback Edges"),"Whether feedback edges should be highlighted by routing around the nodes."),(qx(),!1)),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,U6n),""),"Interactive Reference Point"),"Determines which point of a node is considered by interactive layout phases."),Hvt),gNt),Nmt),ggn(hNt)))),H4(n,U6n,J6n,Gvt),H4(n,U6n,o5n,Uvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,G6n),""),"Merge Edges"),"Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,q6n),""),"Merge Hierarchy-Crossing Edges"),"If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."),!0),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(VT(JT(QT(YT(qT(GT(WT(XT(zT(new xu,X6n),""),"Allow Non-Flow Ports To Switch Sides"),"Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."),!1),wNt),cot),ggn(fNt)),Uhn(cT($ot,1),zZn,2,6,["org.eclipse.elk.layered.northOrSouthPort"])))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,z6n),""),"Port Sorting Strategy"),"Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."),Pkt),gNt),Jjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,V6n),""),"Thoroughness"),"How much effort should be spent to produce a nice layout."),xwn(7)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,W6n),""),"Add Unnecessary Bendpoints"),"Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Q6n),""),"Generate Position and Layer IDs"),"If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,J6n),"cycleBreaking"),"Cycle Breaking Strategy"),"Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."),pvt),gNt),pgt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Y6n),s8n),"Node Layering Strategy"),"Strategy for node layering."),ckt),gNt),fjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Z6n),s8n),"Layer Constraint"),"Determines a constraint on the placement of the node regarding the layering."),Wvt),gNt),ajt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,n5n),s8n),"Layer Choice Constraint"),"Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,t5n),s8n),"Layer ID"),"Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),xwn(-1)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,e5n),h8n),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),xwn(4)),mNt),dot),ggn(hNt)))),H4(n,e5n,Y6n,Yvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,i5n),h8n),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),xwn(2)),mNt),dot),ggn(hNt)))),H4(n,i5n,Y6n,nkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,r5n),f8n),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),ikt),gNt),Hjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,c5n),f8n),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),xwn(0)),mNt),dot),ggn(hNt)))),H4(n,c5n,r5n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,a5n),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),xwn(vZn)),mNt),dot),ggn(hNt)))),H4(n,a5n,Y6n,Xvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,o5n),l8n),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),dvt),gNt),agt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,u5n),l8n),"Force Node Model Order"),"The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,s5n),l8n),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),dNt),fot),ggn(hNt)))),H4(n,s5n,b8n,ovt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,h5n),l8n),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),wNt),cot),ggn(hNt)))),H4(n,h5n,o5n,bvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,f5n),l8n),"In Layer Predecessor of"),"Allows to set a constraint which specifies of which node the current node is the predecessor. If set to 's' then the node is the predecessor of 's' and is in the same layer"),null),kNt),$ot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,l5n),l8n),"In Layer Successor of"),"Allows to set a constraint which specifies of which node the current node is the successor. If set to 's' then the node is the successor of 's' and is in the same layer"),null),kNt),$ot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,b5n),l8n),"Position Choice Constraint"),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,w5n),l8n),"Position ID"),"Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),xwn(-1)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,d5n),w8n),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),xwn(40)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,g5n),w8n),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),rvt),gNt),mpt),ggn(hNt)))),H4(n,g5n,o5n,cvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,p5n),"crossingMinimization.greedySwitchHierarchical"),"Greedy Switch Crossing Minimization (hierarchical)"),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),nvt),gNt),mpt),ggn(hNt)))),H4(n,p5n,o5n,tvt),H4(n,p5n,b8n,evt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,m5n),d8n),"Node Placement Strategy"),"Strategy for node placement."),Ekt),gNt),xjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,v5n),d8n),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),wNt),cot),ggn(hNt)))),H4(n,v5n,m5n,dkt),H4(n,v5n,m5n,gkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,k5n),g8n),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),skt),gNt),Hgt),ggn(hNt)))),H4(n,k5n,m5n,hkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,y5n),g8n),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),lkt),gNt),Qgt),ggn(hNt)))),H4(n,y5n,m5n,bkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,M5n),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),dNt),fot),ggn(hNt)))),H4(n,M5n,m5n,mkt),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,T5n),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),gNt),jjt),ggn(sNt)))),H4(n,T5n,m5n,Tkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,j5n),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),ykt),gNt),jjt),ggn(hNt)))),H4(n,j5n,m5n,Mkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,E5n),p8n),"Self-Loop Distribution"),"Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE."),Pvt),gNt),oEt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,S5n),p8n),"Self-Loop Ordering"),"Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE."),Ivt),gNt),lEt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,P5n),"edgeRouting.splines"),"Spline Routing Mode"),"Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes."),Avt),gNt),pEt),ggn(hNt)))),H4(n,P5n,m8n,Lvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,C5n),"edgeRouting.splines.sloppy"),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.2),dNt),fot),ggn(hNt)))),H4(n,C5n,m8n,$vt),H4(n,C5n,P5n,Dvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,I5n),"edgeRouting.polyline"),"Sloped Edge Zone Width"),"Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer."),2),dNt),fot),ggn(hNt)))),H4(n,I5n,m8n,Evt),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,O5n),v8n),"Spacing Base Value"),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,A5n),v8n),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,L5n),v8n),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,N5n),v8n),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,$5n),k8n),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),xwn(0)),mNt),dot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,D5n),k8n),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),xwn(0)),mNt),dot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,x5n),k8n),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),xwn(0)),mNt),dot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,R5n),y8n),j3n),"Tries to further compact components (disconnected sub-graphs)."),!1),wNt),cot),ggn(hNt)))),H4(n,R5n,h4n,!0),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,K5n),M8n),"Post Compaction Strategy"),T8n),_mt),gNt),upt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,F5n),M8n),"Post Compaction Constraint Calculation"),T8n),Kmt),gNt),tgt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,_5n),j8n),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,B5n),j8n),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),xwn(16)),mNt),dot),ggn(hNt)))),H4(n,B5n,_5n,!0),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,H5n),j8n),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),xwn(5)),mNt),dot),ggn(hNt)))),H4(n,H5n,_5n,!0),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,U5n),E8n),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),cyt),gNt),xEt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,G5n),E8n),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),dNt),fot),ggn(hNt)))),H4(n,G5n,U5n,Kkt),H4(n,G5n,U5n,Fkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,q5n),E8n),"Correction Factor for Wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),dNt),fot),ggn(hNt)))),H4(n,q5n,U5n,Bkt),H4(n,q5n,U5n,Hkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,X5n),S8n),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),Wkt),gNt),bgt),ggn(hNt)))),H4(n,X5n,U5n,Qkt),H4(n,X5n,U5n,Jkt),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,z5n),S8n),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),vNt),yat),ggn(hNt)))),H4(n,z5n,X5n,Gkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,V5n),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),Xkt),mNt),dot),ggn(hNt)))),H4(n,V5n,X5n,zkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,W5n),P8n),"Validification Strategy"),"When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed."),hyt),gNt),MEt),ggn(hNt)))),H4(n,W5n,U5n,fyt),H4(n,W5n,U5n,lyt),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,Q5n),P8n),"Valid Indices for Wrapping"),null),vNt),yat),ggn(hNt)))),H4(n,Q5n,U5n,oyt),H4(n,Q5n,U5n,uyt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,J5n),C8n),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),wNt),cot),ggn(hNt)))),H4(n,J5n,U5n,tyt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Y5n),C8n),"Distance Penalty When Improving Cuts"),null),2),dNt),fot),ggn(hNt)))),H4(n,Y5n,U5n,Zkt),H4(n,Y5n,J5n,!0),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Z5n),C8n),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),wNt),cot),ggn(hNt)))),H4(n,Z5n,U5n,iyt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,n8n),I8n),"Edge Label Side Selection"),"Method to decide on edge label sides."),Tvt),gNt),$gt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,t8n),I8n),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),yvt),gNt),Qdt),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,e8n),O8n),"Consider Model Order"),"Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting."),Qmt),gNt),Xjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,i8n),O8n),"Consider Port Order"),"If disabled the port order of output ports is derived from the edge order and input ports are ordered by their incoming connections. If enabled all ports are ordered by the port model order."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,r8n),O8n),"No Model Order"),"Set on a node to not set a model order for this node even though it is a real node."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,c8n),O8n),"Consider Model Order for Components"),"If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected."),Hmt),gNt),abt),ggn(hNt)))),H4(n,c8n,h4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,a8n),O8n),"Long Edge Ordering Strategy"),"Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout."),Xmt),gNt),pjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,o8n),O8n),"Crossing Counter Node Order Influence"),"Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0)."),0),dNt),fot),ggn(hNt)))),H4(n,o8n,e8n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,u8n),O8n),"Crossing Counter Port Order Influence"),"Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0)."),0),dNt),fot),ggn(hNt)))),H4(n,u8n,e8n,null),eZn((new ll,n))},zW($6n,"LayeredMetaDataProvider",859),sDn(998,1,K2n,ll),uZn.hf=function(n){eZn(n)},zW($6n,"LayeredOptions",998),sDn(999,1,{},Tc),uZn.sf=function(){return new mk},uZn.tf=function(n){},zW($6n,"LayeredOptions/LayeredFactory",999),sDn(1391,1,{}),uZn.a=0,zW(p9n,"ElkSpacings/AbstractSpacingsBuilder",1391),sDn(792,1391,{},omn),zW($6n,"LayeredSpacings/LayeredSpacingsBuilder",792),sDn(265,22,{3:1,34:1,22:1,265:1,188:1,196:1},fI),uZn.dg=function(){return J_n(this)},uZn.qg=function(){return J_n(this)};var ojt,ujt,sjt,hjt,fjt=_cn($6n,"LayeringStrategy",265,Oat,tan,bH);sDn(390,22,{3:1,34:1,22:1,390:1},lI);var ljt,bjt,wjt,djt,gjt,pjt=_cn($6n,"LongEdgeOrderingStrategy",390,Oat,X2,wH);sDn(203,22,{3:1,34:1,22:1,203:1},bI);var mjt,vjt,kjt,yjt,Mjt,Tjt,jjt=_cn($6n,"NodeFlexibility",203,Oat,q6,dH);sDn(323,22,{3:1,34:1,22:1,323:1,188:1,196:1},wI),uZn.dg=function(){return IDn(this)},uZn.qg=function(){return IDn(this)};var Ejt,Sjt,Pjt,Cjt,Ijt,Ojt,Ajt,Ljt,Njt,$jt,Djt,xjt=_cn($6n,"NodePlacementStrategy",323,Oat,f9,gH);sDn(243,22,{3:1,34:1,22:1,243:1},dI);var Rjt,Kjt,Fjt,_jt,Bjt,Hjt=_cn($6n,"NodePromotionStrategy",243,Oat,uun,pH);sDn(284,22,{3:1,34:1,22:1,284:1},gI);var Ujt,Gjt,qjt,Xjt=_cn($6n,"OrderingStrategy",284,Oat,X6,mH);sDn(430,22,{3:1,34:1,22:1,430:1},pI);var zjt,Vjt,Wjt,Qjt,Jjt=_cn($6n,"PortSortingStrategy",430,Oat,d1,vH);sDn(463,22,{3:1,34:1,22:1,463:1},mI);var Yjt,Zjt,nEt,tEt,eEt=_cn($6n,"PortType",463,Oat,z2,kH);sDn(387,22,{3:1,34:1,22:1,387:1},vI);var iEt,rEt,cEt,aEt,oEt=_cn($6n,"SelfLoopDistributionStrategy",387,Oat,V2,yH);sDn(349,22,{3:1,34:1,22:1,349:1},kI);var uEt,sEt,hEt,fEt,lEt=_cn($6n,"SelfLoopOrderingStrategy",349,Oat,W2,MH);sDn(312,1,{312:1},CVn),zW($6n,"Spacings",312),sDn(350,22,{3:1,34:1,22:1,350:1},yI);var bEt,wEt,dEt,gEt,pEt=_cn($6n,"SplineRoutingMode",350,Oat,Q2,TH);sDn(352,22,{3:1,34:1,22:1,352:1},MI);var mEt,vEt,kEt,yEt,MEt=_cn($6n,"ValidifyStrategy",352,Oat,J2,jH);sDn(388,22,{3:1,34:1,22:1,388:1},TI);var TEt,jEt,EEt,SEt,PEt,CEt,IEt,OEt,AEt,LEt,NEt,$Et,DEt,xEt=_cn($6n,"WrappingStrategy",388,Oat,Y2,EH);sDn(1398,1,y9n,il),uZn.rg=function(n){return uG(n,36),jEt},uZn.Kf=function(n,t){mzn(this,uG(n,36),t)},zW(M9n,"DepthFirstCycleBreaker",1398),sDn(793,1,y9n,ez),uZn.rg=function(n){return uG(n,36),EEt},uZn.Kf=function(n,t){gYn(this,uG(n,36),t)},uZn.sg=function(n){return uG(zq(n,iMn(this.d,n.c.length)),10)},zW(M9n,"GreedyCycleBreaker",793),sDn(1401,793,y9n,tL),uZn.sg=function(n){var t,e,i,r;for(r=null,t=vZn,i=new Ww(n);i.a<i.c.c.length;)vR(e=uG(N3(i),10),(GYn(),imt))&&uG(oIn(e,imt),17).a<t&&(t=uG(oIn(e,imt),17).a,r=e);return r||uG(zq(n,iMn(this.d,n.c.length)),10)},zW(M9n,"GreedyModelOrderCycleBreaker",1401),sDn(1399,1,y9n,el),uZn.rg=function(n){return uG(n,36),SEt},uZn.Kf=function(n,t){Nzn(this,uG(n,36),t)},zW(M9n,"InteractiveCycleBreaker",1399),sDn(1400,1,y9n,nl),uZn.rg=function(n){return uG(n,36),PEt},uZn.Kf=function(n,t){Gzn(this,uG(n,36),t)},uZn.a=0,uZn.b=0,zW(M9n,"ModelOrderCycleBreaker",1400),sDn(1413,1,y9n,Zf),uZn.rg=function(n){return uG(n,36),CEt},uZn.Kf=function(n,t){HQn(this,uG(n,36),t)},zW(T9n,"BreadthFirstModelOrderLayerer",1413),sDn(1414,1,b2n,jc),uZn.Ne=function(n,t){return aLn(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(T9n,"BreadthFirstModelOrderLayerer/lambda$0$Type",1414),sDn(1404,1,y9n,iP),uZn.rg=function(n){return uG(n,36),IEt},uZn.Kf=function(n,t){CYn(this,uG(n,36),t)},zW(T9n,"CoffmanGrahamLayerer",1404),sDn(1405,1,b2n,Bg),uZn.Ne=function(n,t){return ANn(this.a,uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(T9n,"CoffmanGrahamLayerer/0methodref$compareNodesInTopo$Type",1405),sDn(1406,1,b2n,Hg),uZn.Ne=function(n,t){return oz(this.a,uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(T9n,"CoffmanGrahamLayerer/lambda$1$Type",1406),sDn(1415,1,y9n,tl),uZn.rg=function(n){return uG(n,36),OEt},uZn.Kf=function(n,t){QJn(this,uG(n,36),t)},uZn.c=0,uZn.e=0,zW(T9n,"DepthFirstModelOrderLayerer",1415),sDn(1416,1,b2n,Ec),uZn.Ne=function(n,t){return oLn(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(T9n,"DepthFirstModelOrderLayerer/lambda$0$Type",1416),sDn(1407,1,y9n,Sc),uZn.rg=function(n){return uG(n,36),Aq(Aq(Aq(new wJ,(uIn(),Tlt),(zYn(),uwt)),jlt,pwt),Elt,gwt)},uZn.Kf=function(n,t){uJn(uG(n,36),t)},zW(T9n,"InteractiveLayerer",1407),sDn(578,1,{578:1},Mk),uZn.a=0,uZn.c=0,zW(T9n,"InteractiveLayerer/LayerSpan",578),sDn(1403,1,y9n,al),uZn.rg=function(n){return uG(n,36),AEt},uZn.Kf=function(n,t){UKn(this,uG(n,36),t)},zW(T9n,"LongestPathLayerer",1403),sDn(1412,1,y9n,cl),uZn.rg=function(n){return uG(n,36),LEt},uZn.Kf=function(n,t){PFn(this,uG(n,36),t)},zW(T9n,"LongestPathSourceLayerer",1412),sDn(1410,1,y9n,ol),uZn.rg=function(n){return uG(n,36),Aq(Aq(Aq(new wJ,(uIn(),Tlt),(zYn(),Xbt)),jlt,pwt),Elt,gwt)},uZn.Kf=function(n,t){jJn(this,uG(n,36),t)},uZn.a=0,uZn.b=0,uZn.d=0,zW(T9n,"MinWidthLayerer",1410),sDn(1411,1,b2n,Ug),uZn.Ne=function(n,t){return Ssn(this,uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(T9n,"MinWidthLayerer/MinOutgoingEdgesComparator",1411),sDn(1402,1,y9n,ul),uZn.rg=function(n){return uG(n,36),DEt},uZn.Kf=function(n,t){NVn(this,uG(n,36),t)},zW(T9n,"NetworkSimplexLayerer",1402),sDn(1408,1,y9n,RF),uZn.rg=function(n){return uG(n,36),Aq(Aq(Aq(new wJ,(uIn(),Tlt),(zYn(),Xbt)),jlt,pwt),Elt,gwt)},uZn.Kf=function(n,t){BWn(this,uG(n,36),t)},uZn.d=0,uZn.f=0,uZn.g=0,uZn.i=0,uZn.s=0,uZn.t=0,uZn.u=0,zW(T9n,"StretchWidthLayerer",1408),sDn(1409,1,b2n,Pc),uZn.Ne=function(n,t){return j7(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(T9n,"StretchWidthLayerer/1",1409),sDn(413,1,j9n),uZn.gg=function(n,t,e,i,r,c){},uZn.ug=function(n,t,e){return hUn(this,n,t,e)},uZn.fg=function(){this.g=Inn(iUt,E9n,28,this.d,15,1),this.f=Inn(iUt,E9n,28,this.d,15,1)},uZn.hg=function(n,t){this.e[n]=Inn(YHt,W1n,28,t[n].length,15,1)},uZn.ig=function(n,t,e){e[n][t].p=t,this.e[n][t]=t},uZn.jg=function(n,t,e,i){uG(zq(i[n][t].j,e),12).p=this.d++},uZn.b=0,uZn.c=0,uZn.d=0,zW(S9n,"AbstractBarycenterPortDistributor",413),sDn(1698,1,b2n,Gg),uZn.Ne=function(n,t){return lkn(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(S9n,"AbstractBarycenterPortDistributor/lambda$0$Type",1698),sDn(832,1,C6n,M6),uZn.gg=function(n,t,e,i,r,c){},uZn.ig=function(n,t,e){},uZn.jg=function(n,t,e,i){},uZn.eg=function(){return!1},uZn.fg=function(){this.c=this.e.a,this.g=this.f.g},uZn.hg=function(n,t){t[n][0].c.p=n},uZn.kg=function(){return!1},uZn.vg=function(n,t,e,i){e?VEn(this,n):(vSn(this,n,i),vWn(this,n,t)),n.c.length>1&&(oM(gK(oIn(HQ((u3(0,n.c.length),uG(n.c[0],10))),(jYn(),Cyt))))?Axn(n,this.d,uG(this,669)):(hZ(),f$(n,this.d)),xsn(this.e,n))},uZn.lg=function(n,t,e,i){var r,c,a,o,u,s,h;for(t!=vX(e,n.length)&&(c=n[t-(e?1:-1)],v7(this.f,c,e?(can(),Wjt):(can(),Vjt))),r=n[t][0],h=!i||r.k==(zIn(),lbt),s=n7(n[t]),this.vg(s,h,!1,e),a=0,u=new Ww(s);u.a<u.c.c.length;)o=uG(N3(u),10),n[t][a++]=o;return!1},uZn.mg=function(n,t){var e,i,r,c,a;for(c=n7(n[a=vX(t,n.length)]),this.vg(c,!1,!0,t),e=0,r=new Ww(c);r.a<r.c.c.length;)i=uG(N3(r),10),n[a][e++]=i;return!1},zW(S9n,"BarycenterHeuristic",832),sDn(667,1,{667:1},zg),uZn.Ib=function(){return"BarycenterState [node="+this.c+", summedWeight="+this.d+", degree="+this.b+", barycenter="+this.a+", visited="+this.e+"]"},uZn.b=0,uZn.d=0,uZn.e=!1;var REt=zW(S9n,"BarycenterHeuristic/BarycenterState",667);sDn(1865,1,b2n,qg),uZn.Ne=function(n,t){return sPn(this.a,uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(S9n,"BarycenterHeuristic/lambda$0$Type",1865),sDn(831,1,C6n,APn),uZn.fg=function(){},uZn.gg=function(n,t,e,i,r,c){},uZn.jg=function(n,t,e,i){},uZn.hg=function(n,t){this.a[n]=Inn(REt,{3:1,4:1,5:1,2117:1},667,t[n].length,0,1),this.b[n]=Inn(UEt,{3:1,4:1,5:1,2118:1},239,t[n].length,0,1)},uZn.ig=function(n,t,e){fkn(this,e[n][t],!0)},uZn.c=!1,zW(S9n,"ForsterConstraintResolver",831),sDn(239,1,{239:1},RZ,SVn),uZn.Ib=function(){var n,t;for((t=new WM).a+="[",n=0;n<this.d.length;n++)JA(t,byn(this.d[n])),null!=oD(this.g,this.d[0]).a&&JA(JA((t.a+="<",t),ZA(oD(this.g,this.d[0]).a)),">"),n<this.d.length-1&&(t.a+=TZn);return(t.a+="]",t).a},uZn.a=0,uZn.c=0,uZn.f=0;var KEt,FEt,_Et,BEt,HEt,UEt=zW(S9n,"ForsterConstraintResolver/ConstraintGroup",239);sDn(1860,1,QZn,Xg),uZn.Cd=function(n){fkn(this.a,uG(n,10),!1)},zW(S9n,"ForsterConstraintResolver/lambda$0$Type",1860),sDn(219,1,{219:1,230:1},KVn),uZn.gg=function(n,t,e,i,r,c){},uZn.hg=function(n,t){},uZn.fg=function(){this.r=Inn(YHt,W1n,28,this.n,15,1)},uZn.ig=function(n,t,e){var i;(i=e[n][t].e)&&kD(this.b,i)},uZn.jg=function(n,t,e,i){++this.n},uZn.Ib=function(){return MWn(this.e,new ek)},uZn.g=!1,uZn.i=!1,uZn.n=0,uZn.s=!1,zW(S9n,"GraphInfoHolder",219),sDn(1905,1,C6n,Cc),uZn.gg=function(n,t,e,i,r,c){},uZn.hg=function(n,t){},uZn.jg=function(n,t,e,i){},uZn.ug=function(n,t,e){return e&&t>0?j0(this.a,n[t-1],n[t]):!e&&t<n.length-1?j0(this.a,n[t],n[t+1]):Aon(this.a,n[t],e?(KQn(),_Rt):(KQn(),kRt)),cRn(this,n,t,e)},uZn.fg=function(){this.d=Inn(YHt,W1n,28,this.c,15,1),this.a=new R_(this.d)},uZn.ig=function(n,t,e){var i;i=e[n][t],this.c+=i.j.c.length},uZn.c=0,zW(S9n,"GreedyPortDistributor",1905),sDn(1421,1,y9n,bl),uZn.rg=function(n){return swn(uG(n,36))},uZn.Kf=function(n,t){fWn(uG(n,36),t)},zW(S9n,"InteractiveCrossingMinimizer",1421),sDn(1422,1,b2n,Wg),uZn.Ne=function(n,t){return SSn(this,uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(S9n,"InteractiveCrossingMinimizer/1",1422),sDn(514,1,{514:1,106:1,47:1},zy),uZn.rg=function(n){var t;return uG(n,36),Aq(t=aN(FEt),(uIn(),Elt),(zYn(),Cwt)),t},uZn.Kf=function(n,t){$Un(this,uG(n,36),t)},uZn.e=0,zW(S9n,"LayerSweepCrossingMinimizer",514),sDn(1418,1,QZn,Qg),uZn.Cd=function(n){Oqn(this.a,uG(n,219))},zW(S9n,"LayerSweepCrossingMinimizer/0methodref$compareDifferentRandomizedLayouts$Type",1418),sDn(1419,1,QZn,Jg),uZn.Cd=function(n){ewn(this.a,uG(n,219))},zW(S9n,"LayerSweepCrossingMinimizer/1methodref$minimizeCrossingsNoCounter$Type",1419),sDn(1420,1,QZn,Yg),uZn.Cd=function(n){iXn(this.a,uG(n,219))},zW(S9n,"LayerSweepCrossingMinimizer/2methodref$minimizeCrossingsWithCounter$Type",1420),sDn(464,22,{3:1,34:1,22:1,464:1},jI);var GEt,qEt=_cn(S9n,"LayerSweepCrossingMinimizer/CrossMinType",464,Oat,Z2,SH);sDn(1417,1,y1n,Ic),uZn.Mb=function(n){return Cun(),0==uG(n,30).a.c.length},zW(S9n,"LayerSweepCrossingMinimizer/lambda$0$Type",1417),sDn(1862,1,C6n,z0),uZn.fg=function(){},uZn.gg=function(n,t,e,i,r,c){},uZn.jg=function(n,t,e,i){},uZn.hg=function(n,t){t[n][0].c.p=n,this.b[n]=Inn(WEt,{3:1,4:1,5:1,2043:1},668,t[n].length,0,1)},uZn.ig=function(n,t,e){e[n][t].p=t,uQ(this.b[n],t,new Oc)},zW(S9n,"LayerSweepTypeDecider",1862),sDn(668,1,{668:1},Oc),uZn.Ib=function(){return"NodeInfo [connectedEdges="+this.a+", hierarchicalInfluence="+this.b+", randomInfluence="+this.c+"]"},uZn.a=0,uZn.b=0,uZn.c=0;var XEt,zEt,VEt,WEt=zW(S9n,"LayerSweepTypeDecider/NodeInfo",668);sDn(1863,1,A2n,Ac),uZn.Lb=function(n){return Dx(new w7(uG(n,12).b))},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Dx(new w7(uG(n,12).b))},zW(S9n,"LayerSweepTypeDecider/lambda$0$Type",1863),sDn(1864,1,A2n,Lc),uZn.Lb=function(n){return Dx(new w7(uG(n,12).b))},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Dx(new w7(uG(n,12).b))},zW(S9n,"LayerSweepTypeDecider/lambda$1$Type",1864),sDn(1906,413,j9n,ij),uZn.tg=function(n,t,e){var i,r,c,a,o,u,s,h,f;switch(s=this.g,e.g){case 1:for(i=0,r=0,u=new Ww(n.j);u.a<u.c.c.length;)0!=(a=uG(N3(u),12)).e.c.length&&(++i,a.j==(KQn(),yRt)&&++r);for(c=t+r,f=t+i,o=jmn(n,(can(),Vjt)).Kc();o.Ob();)(a=uG(o.Pb(),12)).j==(KQn(),yRt)?(s[a.p]=c,--c):(s[a.p]=f,--f);return i;case 2:for(h=0,o=jmn(n,(can(),Wjt)).Kc();o.Ob();)++h,s[(a=uG(o.Pb(),12)).p]=t+h;return h;default:throw hv(new Dv)}},zW(S9n,"LayerTotalPortDistributor",1906),sDn(669,832,{669:1,230:1},Ron),uZn.vg=function(n,t,e,i){e?VEn(this,n):(vSn(this,n,i),vWn(this,n,t)),n.c.length>1&&(oM(gK(oIn(HQ((u3(0,n.c.length),uG(n.c[0],10))),(jYn(),Cyt))))?Axn(n,this.d,this):(hZ(),f$(n,this.d)),oM(gK(oIn(HQ((u3(0,n.c.length),uG(n.c[0],10))),Cyt)))||xsn(this.e,n))},zW(S9n,"ModelOrderBarycenterHeuristic",669),sDn(1866,1,b2n,Zg),uZn.Ne=function(n,t){return TOn(this.a,uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(S9n,"ModelOrderBarycenterHeuristic/lambda$0$Type",1866),sDn(1423,1,y9n,wl),uZn.rg=function(n){var t;return uG(n,36),Aq(t=aN(XEt),(uIn(),Elt),(zYn(),Cwt)),t},uZn.Kf=function(n,t){jY((uG(n,36),t))},zW(S9n,"NoCrossingMinimizer",1423),sDn(809,413,j9n,rj),uZn.tg=function(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;switch(f=this.g,e.g){case 1:for(r=0,c=0,h=new Ww(n.j);h.a<h.c.c.length;)0!=(u=uG(N3(h),12)).e.c.length&&(++r,u.j==(KQn(),yRt)&&++c);for(a=t+c*(i=1/(r+1)),b=t+1-i,s=jmn(n,(can(),Vjt)).Kc();s.Ob();)(u=uG(s.Pb(),12)).j==(KQn(),yRt)?(f[u.p]=a,a-=i):(f[u.p]=b,b-=i);break;case 2:for(o=0,h=new Ww(n.j);h.a<h.c.c.length;)0==(u=uG(N3(h),12)).g.c.length||++o;for(l=t+(i=1/(o+1)),s=jmn(n,(can(),Wjt)).Kc();s.Ob();)f[(u=uG(s.Pb(),12)).p]=l,l+=i;break;default:throw hv(new vM("Port type is undefined"))}return 1},zW(S9n,"NodeRelativePortDistributor",809),sDn(822,1,{},MV,PIn),zW(S9n,"SweepCopy",822),sDn(1861,1,C6n,Umn),uZn.hg=function(n,t){},uZn.fg=function(){var n;n=Inn(YHt,W1n,28,this.f,15,1),this.d=new op(n),this.a=new R_(n)},uZn.gg=function(n,t,e,i,r,c){var a;a=uG(zq(c[n][t].j,e),12),r.c==a&&r.c.i.c==r.d.i.c&&++this.e[n]},uZn.ig=function(n,t,e){var i;i=e[n][t],this.c[n]=this.c[n]|i.k==(zIn(),gbt)},uZn.jg=function(n,t,e,i){var r;(r=uG(zq(i[n][t].j,e),12)).p=this.f++,r.g.c.length+r.e.c.length>1&&(r.j==(KQn(),kRt)?this.b[n]=!0:r.j==_Rt&&n>0&&(this.b[n-1]=!0))},uZn.f=0,zW(P6n,"AllCrossingsCounter",1861),sDn(595,1,{},Don),uZn.b=0,uZn.d=0,zW(P6n,"BinaryIndexedTree",595),sDn(532,1,{},R_),zW(P6n,"CrossingsCounter",532),sDn(1950,1,b2n,np),uZn.Ne=function(n,t){return wX(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(P6n,"CrossingsCounter/lambda$0$Type",1950),sDn(1951,1,b2n,tp),uZn.Ne=function(n,t){return dX(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(P6n,"CrossingsCounter/lambda$1$Type",1951),sDn(1952,1,b2n,ep),uZn.Ne=function(n,t){return gX(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(P6n,"CrossingsCounter/lambda$2$Type",1952),sDn(1953,1,b2n,ip),uZn.Ne=function(n,t){return pX(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(P6n,"CrossingsCounter/lambda$3$Type",1953),sDn(1954,1,QZn,rp),uZn.Cd=function(n){cen(this.a,uG(n,12))},zW(P6n,"CrossingsCounter/lambda$4$Type",1954),sDn(1955,1,y1n,cp),uZn.Mb=function(n){return NI(this.a,uG(n,12))},zW(P6n,"CrossingsCounter/lambda$5$Type",1955),sDn(1956,1,QZn,ap),uZn.Cd=function(n){MA(this,n)},zW(P6n,"CrossingsCounter/lambda$6$Type",1956),sDn(1957,1,QZn,EI),uZn.Cd=function(n){var t;PU(),A6(this.b,(t=this.a,uG(n,12),t))},zW(P6n,"CrossingsCounter/lambda$7$Type",1957),sDn(839,1,A2n,Nc),uZn.Lb=function(n){return PU(),vR(uG(n,12),(GYn(),lmt))},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return PU(),vR(uG(n,12),(GYn(),lmt))},zW(P6n,"CrossingsCounter/lambda$8$Type",839),sDn(1949,1,{},op),zW(P6n,"HyperedgeCrossingsCounter",1949),sDn(478,1,{34:1,478:1},BF),uZn.Fd=function(n){return _vn(this,uG(n,478))},uZn.b=0,uZn.c=0,uZn.e=0,uZn.f=0;var QEt=zW(P6n,"HyperedgeCrossingsCounter/Hyperedge",478);sDn(374,1,{34:1,374:1},bY),uZn.Fd=function(n){return exn(this,uG(n,374))},uZn.b=0,uZn.c=0;var JEt,YEt,ZEt=zW(P6n,"HyperedgeCrossingsCounter/HyperedgeCorner",374);sDn(531,22,{3:1,34:1,22:1,531:1},SI);var nSt,tSt,eSt,iSt,rSt,cSt=_cn(P6n,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",531,Oat,g1,PH);sDn(1425,1,y9n,dl),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?tSt:null},uZn.Kf=function(n,t){HEn(this,uG(n,36),t)},zW(P9n,"InteractiveNodePlacer",1425),sDn(1426,1,y9n,gl),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?eSt:null},uZn.Kf=function(n,t){XMn(this,uG(n,36),t)},zW(P9n,"LinearSegmentsNodePlacer",1426),sDn(261,1,{34:1,261:1},Tk),uZn.Fd=function(n){return CT(this,uG(n,261))},uZn.Fb=function(n){var t;return!!F$(n,261)&&(t=uG(n,261),this.b==t.b)},uZn.Hb=function(){return this.b},uZn.Ib=function(){return"ls"+vIn(this.e)},uZn.a=0,uZn.b=0,uZn.c=-1,uZn.d=-1,uZn.g=0;var aSt,oSt=zW(P9n,"LinearSegmentsNodePlacer/LinearSegment",261);sDn(1428,1,y9n,iz),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?aSt:null},uZn.Kf=function(n,t){WJn(this,uG(n,36),t)},uZn.b=0,uZn.g=0,zW(P9n,"NetworkSimplexPlacer",1428),sDn(1447,1,b2n,$c),uZn.Ne=function(n,t){return d$(uG(n,17).a,uG(t,17).a)},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(P9n,"NetworkSimplexPlacer/0methodref$compare$Type",1447),sDn(1449,1,b2n,Dc),uZn.Ne=function(n,t){return d$(uG(n,17).a,uG(t,17).a)},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(P9n,"NetworkSimplexPlacer/1methodref$compare$Type",1449),sDn(655,1,{655:1},PI);var uSt=zW(P9n,"NetworkSimplexPlacer/EdgeRep",655);sDn(412,1,{412:1},wY),uZn.b=!1;var sSt,hSt,fSt,lSt=zW(P9n,"NetworkSimplexPlacer/NodeRep",412);sDn(515,13,{3:1,4:1,20:1,31:1,56:1,13:1,16:1,15:1,59:1,515:1},Ck),zW(P9n,"NetworkSimplexPlacer/Path",515),sDn(1429,1,{},xc),uZn.Kb=function(n){return uG(n,18).d.i.k},zW(P9n,"NetworkSimplexPlacer/Path/lambda$0$Type",1429),sDn(1430,1,y1n,Rc),uZn.Mb=function(n){return uG(n,273)==(zIn(),wbt)},zW(P9n,"NetworkSimplexPlacer/Path/lambda$1$Type",1430),sDn(1431,1,{},Kc),uZn.Kb=function(n){return uG(n,18).d.i},zW(P9n,"NetworkSimplexPlacer/Path/lambda$2$Type",1431),sDn(1432,1,y1n,up),uZn.Mb=function(n){return zK(Imn(uG(n,10)))},zW(P9n,"NetworkSimplexPlacer/Path/lambda$3$Type",1432),sDn(1433,1,y1n,Fc),uZn.Mb=function(n){return mq(uG(n,12))},zW(P9n,"NetworkSimplexPlacer/lambda$0$Type",1433),sDn(1434,1,QZn,CI),uZn.Cd=function(n){M$(this.a,this.b,uG(n,12))},zW(P9n,"NetworkSimplexPlacer/lambda$1$Type",1434),sDn(1443,1,QZn,sp),uZn.Cd=function(n){FLn(this.a,uG(n,18))},zW(P9n,"NetworkSimplexPlacer/lambda$10$Type",1443),sDn(1444,1,{},_c),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},zW(P9n,"NetworkSimplexPlacer/lambda$11$Type",1444),sDn(1445,1,QZn,hp),uZn.Cd=function(n){D_n(this.a,uG(n,10))},zW(P9n,"NetworkSimplexPlacer/lambda$12$Type",1445),sDn(1446,1,{},Bc),uZn.Kb=function(n){return n2(),xwn(uG(n,125).e)},zW(P9n,"NetworkSimplexPlacer/lambda$13$Type",1446),sDn(1448,1,{},Hc),uZn.Kb=function(n){return n2(),xwn(uG(n,125).e)},zW(P9n,"NetworkSimplexPlacer/lambda$15$Type",1448),sDn(1450,1,y1n,Uc),uZn.Mb=function(n){return n2(),uG(n,412).c.k==(zIn(),dbt)},zW(P9n,"NetworkSimplexPlacer/lambda$17$Type",1450),sDn(1451,1,y1n,Gc),uZn.Mb=function(n){return n2(),uG(n,412).c.j.c.length>1},zW(P9n,"NetworkSimplexPlacer/lambda$18$Type",1451),sDn(1452,1,QZn,dY),uZn.Cd=function(n){Dpn(this.c,this.b,this.d,this.a,uG(n,412))},uZn.c=0,uZn.d=0,zW(P9n,"NetworkSimplexPlacer/lambda$19$Type",1452),sDn(1435,1,{},qc),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},zW(P9n,"NetworkSimplexPlacer/lambda$2$Type",1435),sDn(1453,1,QZn,fp),uZn.Cd=function(n){j$(this.a,uG(n,12))},uZn.a=0,zW(P9n,"NetworkSimplexPlacer/lambda$20$Type",1453),sDn(1454,1,{},Xc),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},zW(P9n,"NetworkSimplexPlacer/lambda$21$Type",1454),sDn(1455,1,QZn,lp),uZn.Cd=function(n){uD(this.a,uG(n,10))},zW(P9n,"NetworkSimplexPlacer/lambda$22$Type",1455),sDn(1456,1,y1n,zc),uZn.Mb=function(n){return zK(n)},zW(P9n,"NetworkSimplexPlacer/lambda$23$Type",1456),sDn(1457,1,{},Vc),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},zW(P9n,"NetworkSimplexPlacer/lambda$24$Type",1457),sDn(1458,1,y1n,bp),uZn.Mb=function(n){return RL(this.a,uG(n,10))},zW(P9n,"NetworkSimplexPlacer/lambda$25$Type",1458),sDn(1459,1,QZn,II),uZn.Cd=function(n){$On(this.a,this.b,uG(n,10))},zW(P9n,"NetworkSimplexPlacer/lambda$26$Type",1459),sDn(1460,1,y1n,Wc),uZn.Mb=function(n){return n2(),!v9(uG(n,18))},zW(P9n,"NetworkSimplexPlacer/lambda$27$Type",1460),sDn(1461,1,y1n,Qc),uZn.Mb=function(n){return n2(),!v9(uG(n,18))},zW(P9n,"NetworkSimplexPlacer/lambda$28$Type",1461),sDn(1462,1,{},wp),uZn.Ve=function(n,t){return T$(this.a,uG(n,30),uG(t,30))},zW(P9n,"NetworkSimplexPlacer/lambda$29$Type",1462),sDn(1436,1,{},Jc),uZn.Kb=function(n){return n2(),new fX(null,new LW(new Fz(ix(Xgn(uG(n,10)).a.Kc(),new h))))},zW(P9n,"NetworkSimplexPlacer/lambda$3$Type",1436),sDn(1437,1,y1n,Yc),uZn.Mb=function(n){return n2(),h6(uG(n,18))},zW(P9n,"NetworkSimplexPlacer/lambda$4$Type",1437),sDn(1438,1,QZn,dp),uZn.Cd=function(n){vqn(this.a,uG(n,18))},zW(P9n,"NetworkSimplexPlacer/lambda$5$Type",1438),sDn(1439,1,{},Zc),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},zW(P9n,"NetworkSimplexPlacer/lambda$6$Type",1439),sDn(1440,1,y1n,na),uZn.Mb=function(n){return n2(),uG(n,10).k==(zIn(),dbt)},zW(P9n,"NetworkSimplexPlacer/lambda$7$Type",1440),sDn(1441,1,{},ta),uZn.Kb=function(n){return n2(),new fX(null,new LW(new Fz(ix(Ggn(uG(n,10)).a.Kc(),new h))))},zW(P9n,"NetworkSimplexPlacer/lambda$8$Type",1441),sDn(1442,1,y1n,ea),uZn.Mb=function(n){return n2(),pq(uG(n,18))},zW(P9n,"NetworkSimplexPlacer/lambda$9$Type",1442),sDn(1424,1,y9n,pl),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?sSt:null},uZn.Kf=function(n,t){RXn(uG(n,36),t)},zW(P9n,"SimpleNodePlacer",1424),sDn(185,1,{185:1},WHn),uZn.Ib=function(){var n;return n="",this.c==(b0(),fSt)?n+=V2n:this.c==hSt&&(n+=z2n),this.o==(w0(),wSt)?n+=c3n:this.o==dSt?n+="UP":n+="BALANCED",n},zW(O9n,"BKAlignedLayout",185),sDn(523,22,{3:1,34:1,22:1,523:1},OI);var bSt,wSt,dSt,gSt=_cn(O9n,"BKAlignedLayout/HDirection",523,Oat,m1,CH);sDn(522,22,{3:1,34:1,22:1,522:1},AI);var pSt,mSt,vSt,kSt,ySt,MSt,TSt,jSt,ESt,SSt,PSt,CSt,ISt,OSt,ASt,LSt,NSt,$St,DSt,xSt=_cn(O9n,"BKAlignedLayout/VDirection",522,Oat,v1,IH);sDn(1699,1,{},LI),zW(O9n,"BKAligner",1699),sDn(1702,1,{},xjn),zW(O9n,"BKCompactor",1702),sDn(663,1,{663:1},ia),uZn.a=0,zW(O9n,"BKCompactor/ClassEdge",663),sDn(467,1,{467:1},Ek),uZn.a=null,uZn.b=0,zW(O9n,"BKCompactor/ClassNode",467),sDn(1427,1,y9n,FI),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?mSt:null},uZn.Kf=function(n,t){$Yn(this,uG(n,36),t)},uZn.d=!1,zW(O9n,"BKNodePlacer",1427),sDn(1700,1,{},ra),uZn.d=0,zW(O9n,"NeighborhoodInformation",1700),sDn(1701,1,b2n,gp),uZn.Ne=function(n,t){return vrn(this,uG(n,42),uG(t,42))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(O9n,"NeighborhoodInformation/NeighborComparator",1701),sDn(823,1,{}),zW(O9n,"ThresholdStrategy",823),sDn(1825,823,{},Sk),uZn.wg=function(n,t,e){return this.a.o==(w0(),dSt)?M0n:T0n},uZn.xg=function(){},zW(O9n,"ThresholdStrategy/NullThresholdStrategy",1825),sDn(587,1,{587:1},_I),uZn.c=!1,uZn.d=!1,zW(O9n,"ThresholdStrategy/Postprocessable",587),sDn(1826,823,{},Pk),uZn.wg=function(n,t,e){var i,r,c;return r=t==e,i=this.a.a[e.p]==t,r||i?(c=n,this.a.c,b0(),r&&(c=FXn(this,t,!0)),!isNaN(c)&&!isFinite(c)&&i&&(c=FXn(this,e,!1)),c):n},uZn.xg=function(){for(var n,t,e;0!=this.d.b;)(t=wGn(this,e=uG(H1(this.d),587))).a&&(n=t.a,(oM(this.a.f[this.a.g[e.b.p].p])||v9(n)||n.c.i.c!=n.d.i.c)&&(ixn(this,e)||VL(this.e,e)));for(;0!=this.e.a.c.length;)ixn(this,uG(obn(this.e),587))},zW(O9n,"ThresholdStrategy/SimpleThresholdStrategy",1826),sDn(645,1,{645:1,188:1,196:1},ca),uZn.dg=function(){return Fsn(this)},uZn.qg=function(){return Fsn(this)},zW(A9n,"EdgeRouterFactory",645),sDn(1485,1,y9n,ml),uZn.rg=function(n){return RFn(uG(n,36))},uZn.Kf=function(n,t){QXn(uG(n,36),t)},zW(A9n,"OrthogonalEdgeRouter",1485),sDn(1478,1,y9n,KI),uZn.rg=function(n){return oSn(uG(n,36))},uZn.Kf=function(n,t){XQn(this,uG(n,36),t)},zW(A9n,"PolylineEdgeRouter",1478),sDn(1479,1,A2n,oa),uZn.Lb=function(n){return shn(uG(n,10))},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return shn(uG(n,10))},zW(A9n,"PolylineEdgeRouter/1",1479),sDn(1872,1,y1n,ua),uZn.Mb=function(n){return uG(n,132).c==(_7(),$St)},zW(L9n,"HyperEdgeCycleDetector/lambda$0$Type",1872),sDn(1873,1,{},sa),uZn.Ze=function(n){return uG(n,132).d},zW(L9n,"HyperEdgeCycleDetector/lambda$1$Type",1873),sDn(1874,1,y1n,ha),uZn.Mb=function(n){return uG(n,132).c==(_7(),$St)},zW(L9n,"HyperEdgeCycleDetector/lambda$2$Type",1874),sDn(1875,1,{},fa),uZn.Ze=function(n){return uG(n,132).d},zW(L9n,"HyperEdgeCycleDetector/lambda$3$Type",1875),sDn(1876,1,{},la),uZn.Ze=function(n){return uG(n,132).d},zW(L9n,"HyperEdgeCycleDetector/lambda$4$Type",1876),sDn(1877,1,{},aa),uZn.Ze=function(n){return uG(n,132).d},zW(L9n,"HyperEdgeCycleDetector/lambda$5$Type",1877),sDn(118,1,{34:1,118:1},nhn),uZn.Fd=function(n){return IT(this,uG(n,118))},uZn.Fb=function(n){var t;return!!F$(n,118)&&(t=uG(n,118),this.g==t.g)},uZn.Hb=function(){return this.g},uZn.Ib=function(){var n,t,e,i;for(n=new lx("{"),i=new Ww(this.n);i.a<i.c.c.length;)null==(t=ZTn((e=uG(N3(i),12)).i))&&(t="n"+A_(e.i)),n.a+=""+t,i.a<i.c.c.length&&(n.a+=",");return n.a+="}",n.a},uZn.a=0,uZn.b=0,uZn.c=NaN,uZn.d=0,uZn.g=0,uZn.i=0,uZn.o=0,uZn.s=NaN,zW(L9n,"HyperEdgeSegment",118),sDn(132,1,{132:1},A2),uZn.Ib=function(){return this.a+"->"+this.b+" ("+yR(this.c)+")"},uZn.d=0,zW(L9n,"HyperEdgeSegmentDependency",132),sDn(528,22,{3:1,34:1,22:1,528:1},qI);var RSt,KSt,FSt,_St,BSt,HSt,USt,GSt,qSt=_cn(L9n,"HyperEdgeSegmentDependency/DependencyType",528,Oat,k1,OH);sDn(1878,1,{},pp),zW(L9n,"HyperEdgeSegmentSplitter",1878),sDn(1879,1,{},hj),uZn.a=0,uZn.b=0,zW(L9n,"HyperEdgeSegmentSplitter/AreaRating",1879),sDn(339,1,{339:1},OU),uZn.a=0,uZn.b=0,uZn.c=0,zW(L9n,"HyperEdgeSegmentSplitter/FreeArea",339),sDn(1880,1,b2n,ba),uZn.Ne=function(n,t){return C_(uG(n,118),uG(t,118))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(L9n,"HyperEdgeSegmentSplitter/lambda$0$Type",1880),sDn(1881,1,QZn,pY),uZn.Cd=function(n){I5(this.a,this.d,this.c,this.b,uG(n,118))},uZn.b=0,zW(L9n,"HyperEdgeSegmentSplitter/lambda$1$Type",1881),sDn(1882,1,{},wa),uZn.Kb=function(n){return new fX(null,new h3(uG(n,118).e,16))},zW(L9n,"HyperEdgeSegmentSplitter/lambda$2$Type",1882),sDn(1883,1,{},da),uZn.Kb=function(n){return new fX(null,new h3(uG(n,118).j,16))},zW(L9n,"HyperEdgeSegmentSplitter/lambda$3$Type",1883),sDn(1884,1,{},ga),uZn.Ye=function(n){return uM(pK(n))},zW(L9n,"HyperEdgeSegmentSplitter/lambda$4$Type",1884),sDn(664,1,{},NW),uZn.a=0,uZn.b=0,uZn.c=0,zW(L9n,"OrthogonalRoutingGenerator",664),sDn(1703,1,{},pa),uZn.Kb=function(n){return new fX(null,new h3(uG(n,118).e,16))},zW(L9n,"OrthogonalRoutingGenerator/lambda$0$Type",1703),sDn(1704,1,{},ma),uZn.Kb=function(n){return new fX(null,new h3(uG(n,118).j,16))},zW(L9n,"OrthogonalRoutingGenerator/lambda$1$Type",1704),sDn(670,1,{}),zW(N9n,"BaseRoutingDirectionStrategy",670),sDn(1870,670,{},Rk),uZn.yg=function(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g;if(!n.r||n.q)for(f=t+n.o*i,h=new Ww(n.n);h.a<h.c.c.length;)for(s=uG(N3(h),12),l=Gfn(Uhn(cT(PNt,1),zZn,8,0,[s.i.n,s.n,s.a])).a,u=new Ww(s.g);u.a<u.c.c.length;)v9(o=uG(N3(u),18))||(d=o.d,g=Gfn(Uhn(cT(PNt,1),zZn,8,0,[d.i.n,d.n,d.a])).a,e.Math.abs(l-g)>t4n&&(c=n,r=new MO(l,a=f),aq(o.a,r),WUn(this,o,c,r,!1),(b=n.r)&&(r=new MO(w=uM(pK(hyn(b.e,0))),a),aq(o.a,r),WUn(this,o,c,r,!1),c=b,r=new MO(w,a=t+b.o*i),aq(o.a,r),WUn(this,o,c,r,!1)),r=new MO(g,a),aq(o.a,r),WUn(this,o,c,r,!1)))},uZn.zg=function(n){return n.i.n.a+n.n.a+n.a.a},uZn.Ag=function(){return KQn(),KRt},uZn.Bg=function(){return KQn(),yRt},zW(N9n,"NorthToSouthRoutingStrategy",1870),sDn(1871,670,{},Kk),uZn.yg=function(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g;if(!n.r||n.q)for(f=t-n.o*i,h=new Ww(n.n);h.a<h.c.c.length;)for(s=uG(N3(h),12),l=Gfn(Uhn(cT(PNt,1),zZn,8,0,[s.i.n,s.n,s.a])).a,u=new Ww(s.g);u.a<u.c.c.length;)v9(o=uG(N3(u),18))||(d=o.d,g=Gfn(Uhn(cT(PNt,1),zZn,8,0,[d.i.n,d.n,d.a])).a,e.Math.abs(l-g)>t4n&&(c=n,r=new MO(l,a=f),aq(o.a,r),WUn(this,o,c,r,!1),(b=n.r)&&(r=new MO(w=uM(pK(hyn(b.e,0))),a),aq(o.a,r),WUn(this,o,c,r,!1),c=b,r=new MO(w,a=t-b.o*i),aq(o.a,r),WUn(this,o,c,r,!1)),r=new MO(g,a),aq(o.a,r),WUn(this,o,c,r,!1)))},uZn.zg=function(n){return n.i.n.a+n.n.a+n.a.a},uZn.Ag=function(){return KQn(),yRt},uZn.Bg=function(){return KQn(),KRt},zW(N9n,"SouthToNorthRoutingStrategy",1871),sDn(1869,670,{},Fk),uZn.yg=function(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g;if(!n.r||n.q)for(f=t+n.o*i,h=new Ww(n.n);h.a<h.c.c.length;)for(s=uG(N3(h),12),l=Gfn(Uhn(cT(PNt,1),zZn,8,0,[s.i.n,s.n,s.a])).b,u=new Ww(s.g);u.a<u.c.c.length;)v9(o=uG(N3(u),18))||(d=o.d,g=Gfn(Uhn(cT(PNt,1),zZn,8,0,[d.i.n,d.n,d.a])).b,e.Math.abs(l-g)>t4n&&(c=n,r=new MO(a=f,l),aq(o.a,r),WUn(this,o,c,r,!0),(b=n.r)&&(r=new MO(a,w=uM(pK(hyn(b.e,0)))),aq(o.a,r),WUn(this,o,c,r,!0),c=b,r=new MO(a=t+b.o*i,w),aq(o.a,r),WUn(this,o,c,r,!0)),r=new MO(a,g),aq(o.a,r),WUn(this,o,c,r,!0)))},uZn.zg=function(n){return n.i.n.b+n.n.b+n.a.b},uZn.Ag=function(){return KQn(),kRt},uZn.Bg=function(){return KQn(),_Rt},zW(N9n,"WestToEastRoutingStrategy",1869),sDn(828,1,{},jqn),uZn.Ib=function(){return vIn(this.a)},uZn.b=0,uZn.c=!1,uZn.d=!1,uZn.f=0,zW(D9n,"NubSpline",828),sDn(418,1,{418:1},pFn,R1),zW(D9n,"NubSpline/PolarCP",418),sDn(1480,1,y9n,zTn),uZn.rg=function(n){return HPn(uG(n,36))},uZn.Kf=function(n,t){EJn(this,uG(n,36),t)},zW(D9n,"SplineEdgeRouter",1480),sDn(274,1,{274:1},O7),uZn.Ib=function(){return this.a+" ->("+this.c+") "+this.b},uZn.c=0,zW(D9n,"SplineEdgeRouter/Dependency",274),sDn(465,22,{3:1,34:1,22:1,465:1},XI);var XSt,zSt,VSt,WSt,QSt,JSt=_cn(D9n,"SplineEdgeRouter/SideToProcess",465,Oat,S1,AH);sDn(1481,1,y1n,va),uZn.Mb=function(n){return uFn(),!uG(n,131).o},zW(D9n,"SplineEdgeRouter/lambda$0$Type",1481),sDn(1482,1,{},ka),uZn.Ze=function(n){return uFn(),uG(n,131).v+1},zW(D9n,"SplineEdgeRouter/lambda$1$Type",1482),sDn(1483,1,QZn,BI),uZn.Cd=function(n){yq(this.a,this.b,uG(n,42))},zW(D9n,"SplineEdgeRouter/lambda$2$Type",1483),sDn(1484,1,QZn,HI),uZn.Cd=function(n){Mq(this.a,this.b,uG(n,42))},zW(D9n,"SplineEdgeRouter/lambda$3$Type",1484),sDn(131,1,{34:1,131:1},UAn,Izn),uZn.Fd=function(n){return NT(this,uG(n,131))},uZn.b=0,uZn.e=!1,uZn.f=0,uZn.g=0,uZn.j=!1,uZn.k=!1,uZn.n=0,uZn.o=!1,uZn.p=!1,uZn.q=!1,uZn.s=0,uZn.u=0,uZn.v=0,uZn.F=0,zW(D9n,"SplineSegment",131),sDn(468,1,{468:1},ya),uZn.a=0,uZn.b=!1,uZn.c=!1,uZn.d=!1,uZn.e=!1,uZn.f=0,zW(D9n,"SplineSegment/EdgeInformation",468),sDn(1198,1,{},Ma),zW(_9n,q3n,1198),sDn(1199,1,b2n,Ta),uZn.Ne=function(n,t){return yNn(uG(n,121),uG(t,121))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(_9n,X3n,1199),sDn(1197,1,{},Gj),zW(_9n,"MrTree",1197),sDn(405,22,{3:1,34:1,22:1,405:1,188:1,196:1},zI),uZn.dg=function(){return TNn(this)},uZn.qg=function(){return TNn(this)};var YSt,ZSt=_cn(_9n,"TreeLayoutPhases",405,Oat,i5,LH);sDn(1112,205,M3n,FF),uZn.rf=function(n,t){var e,i,r,c,a,o,u;for(oM(gK(zDn(n,(QGn(),gCt))))||J1(new Sd((vP(),new Vy(n)))),(c=t.eh(B9n)).Ug("build tGraph",1),zsn(o=new L7,n),kfn(o,(OQn(),RPt),n),EUn(n,o,u=new Ym),iGn(n,o,u),a=o,c.Vg(),(c=t.eh(B9n)).Ug("Split graph",1),r=LUn(this.a,a),c.Vg(),i=new Ww(r);i.a<i.c.c.length;)e=uG(N3(i),121),hPn(this.b,e,t.eh(.5999999940395355/r.c.length));(c=t.eh(B9n)).Ug("Pack components",1),a=DYn(r),c.Vg(),(c=t.eh(B9n)).Ug("Apply layout results",1),WVn(a),c.Vg()},zW(_9n,"TreeLayoutProvider",1112),sDn(1894,1,t1n,Ea),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return hZ(),wS(),Qot},zW(_9n,"TreeUtil/1",1894),sDn(1895,1,t1n,Sa),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return hZ(),wS(),Qot},zW(_9n,"TreeUtil/2",1895),sDn(1885,1,y1n,Pa),uZn.Mb=function(n){return oM(gK(oIn(uG(n,40),(OQn(),UPt))))},zW(_9n,"TreeUtil/lambda$0$Type",1885),sDn(1891,1,y1n,mp),uZn.Mb=function(n){return this.a.Hc(uG(n,40))},zW(_9n,"TreeUtil/lambda$10$Type",1891),sDn(1892,1,{},vp),uZn.Kb=function(n){return n5(this.a,uG(n,40))},zW(_9n,"TreeUtil/lambda$11$Type",1892),sDn(1893,1,y1n,UI),uZn.Mb=function(n){return vin(this.a,this.b,uG(n,40))},zW(_9n,"TreeUtil/lambda$12$Type",1893),sDn(1886,1,y1n,kp),uZn.Mb=function(n){return Rgn(this.a,uG(n,65))},zW(_9n,"TreeUtil/lambda$3$Type",1886),sDn(1887,1,b2n,ja),uZn.Ne=function(n,t){return I_(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(_9n,"TreeUtil/lambda$4$Type",1887),sDn(1888,1,y1n,yp),uZn.Mb=function(n){return Kgn(this.a,uG(n,65))},zW(_9n,"TreeUtil/lambda$7$Type",1888),sDn(1889,1,b2n,Ca),uZn.Ne=function(n,t){return O_(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(_9n,"TreeUtil/lambda$8$Type",1889),sDn(1890,1,{},Ia),uZn.Kb=function(n){return uG(n,65).b},zW(_9n,"TreeUtil/lambda$9$Type",1890),sDn(508,137,{3:1,508:1,96:1,137:1}),uZn.g=0,zW(U9n,"TGraphElement",508),sDn(65,508,{3:1,65:1,508:1,96:1,137:1},uZ),uZn.Ib=function(){return this.b&&this.c?V3(this.b)+"->"+V3(this.c):"e_"+Hon(this)},zW(U9n,"TEdge",65),sDn(121,137,{3:1,121:1,96:1,137:1},L7),uZn.Ib=function(){var n,t,e,i,r;for(r=null,i=Fkn(this.b,0);i.b!=i.d.c;)r+=(null==(e=uG(I6(i),40)).c||0==e.c.length?"n_"+e.g:"n_"+e.c)+"\n";for(t=Fkn(this.a,0);t.b!=t.d.c;)r+=((n=uG(I6(t),65)).b&&n.c?V3(n.b)+"->"+V3(n.c):"e_"+Hon(n))+"\n";return r};var nPt=zW(U9n,"TGraph",121);sDn(643,508,{3:1,508:1,643:1,96:1,137:1}),zW(U9n,"TShape",643),sDn(40,643,{3:1,508:1,40:1,643:1,96:1,137:1},wln),uZn.Ib=function(){return V3(this)};var tPt,ePt,iPt,rPt,cPt,aPt,oPt,uPt,sPt,hPt,fPt,lPt=zW(U9n,"TNode",40);sDn(236,1,t1n,Mp),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return new Tp(Fkn(this.a.d,0))},zW(U9n,"TNode/2",236),sDn(329,1,$Zn,Tp),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return uG(I6(this.a),65).c},uZn.Ob=function(){return Jj(this.a)},uZn.Qb=function(){yrn(this.a)},zW(U9n,"TNode/2/1",329),sDn(1923,1,Q4n,Oa),uZn.Kf=function(n,t){SYn(this,uG(n,121),t)},zW(q9n,"CompactionProcessor",1923),sDn(1924,1,b2n,jp),uZn.Ne=function(n,t){return ksn(this.a,uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$0$Type",1924),sDn(1925,1,y1n,GI),uZn.Mb=function(n){return xZ(this.b,this.a,uG(n,42))},uZn.a=0,uZn.b=0,zW(q9n,"CompactionProcessor/lambda$1$Type",1925),sDn(1934,1,b2n,Aa),uZn.Ne=function(n,t){return vW(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$10$Type",1934),sDn(1935,1,b2n,La),uZn.Ne=function(n,t){return Kx(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$11$Type",1935),sDn(1936,1,b2n,Na),uZn.Ne=function(n,t){return kW(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$12$Type",1936),sDn(1926,1,y1n,Ep),uZn.Mb=function(n){return hD(this.a,uG(n,42))},uZn.a=0,zW(q9n,"CompactionProcessor/lambda$2$Type",1926),sDn(1927,1,y1n,Sp),uZn.Mb=function(n){return fD(this.a,uG(n,42))},uZn.a=0,zW(q9n,"CompactionProcessor/lambda$3$Type",1927),sDn(1928,1,y1n,$a),uZn.Mb=function(n){return-1==uG(n,40).c.indexOf(H9n)},zW(q9n,"CompactionProcessor/lambda$4$Type",1928),sDn(1929,1,{},Pp),uZn.Kb=function(n){return a6(this.a,uG(n,40))},uZn.a=0,zW(q9n,"CompactionProcessor/lambda$5$Type",1929),sDn(1930,1,{},Cp),uZn.Kb=function(n){return ren(this.a,uG(n,40))},uZn.a=0,zW(q9n,"CompactionProcessor/lambda$6$Type",1930),sDn(1931,1,b2n,Ip),uZn.Ne=function(n,t){return G9(this.a,uG(n,240),uG(t,240))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$7$Type",1931),sDn(1932,1,b2n,Op),uZn.Ne=function(n,t){return q9(this.a,uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$8$Type",1932),sDn(1933,1,b2n,Da),uZn.Ne=function(n,t){return Fx(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(q9n,"CompactionProcessor/lambda$9$Type",1933),sDn(1921,1,Q4n,xa),uZn.Kf=function(n,t){cBn(uG(n,121),t)},zW(q9n,"DirectionProcessor",1921),sDn(1913,1,Q4n,KF),uZn.Kf=function(n,t){YUn(this,uG(n,121),t)},zW(q9n,"FanProcessor",1913),sDn(1937,1,Q4n,Ra),uZn.Kf=function(n,t){N_n(uG(n,121),t)},zW(q9n,"GraphBoundsProcessor",1937),sDn(1938,1,{},Ka),uZn.Ye=function(n){return uG(n,40).e.a},zW(q9n,"GraphBoundsProcessor/lambda$0$Type",1938),sDn(1939,1,{},Fa),uZn.Ye=function(n){return uG(n,40).e.b},zW(q9n,"GraphBoundsProcessor/lambda$1$Type",1939),sDn(1940,1,{},_a),uZn.Ye=function(n){return lP(uG(n,40))},zW(q9n,"GraphBoundsProcessor/lambda$2$Type",1940),sDn(1941,1,{},Ba),uZn.Ye=function(n){return fP(uG(n,40))},zW(q9n,"GraphBoundsProcessor/lambda$3$Type",1941),sDn(262,22,{3:1,34:1,22:1,262:1,196:1},VI),uZn.dg=function(){switch(this.g){case 0:return new sy;case 1:return new KF;case 2:return new uy;case 3:return new Xa;case 4:return new Ua;case 8:return new Ha;case 5:return new xa;case 6:return new Va;case 7:return new Oa;case 9:return new Ra;case 10:return new Wa;default:throw hv(new vM(v6n+(null!=this.f?this.f:""+this.g)))}};var bPt,wPt,dPt,gPt,pPt=_cn(q9n,k6n,262,Oat,usn,NH);sDn(1920,1,Q4n,Ha),uZn.Kf=function(n,t){xQn(uG(n,121),t)},zW(q9n,"LevelCoordinatesProcessor",1920),sDn(1918,1,Q4n,Ua),uZn.Kf=function(n,t){ZRn(this,uG(n,121),t)},uZn.a=0,zW(q9n,"LevelHeightProcessor",1918),sDn(1919,1,t1n,Ga),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return hZ(),wS(),Qot},zW(q9n,"LevelHeightProcessor/1",1919),sDn(1914,1,Q4n,uy),uZn.Kf=function(n,t){g_n(this,uG(n,121),t)},zW(q9n,"LevelProcessor",1914),sDn(1915,1,y1n,qa),uZn.Mb=function(n){return oM(gK(oIn(uG(n,40),(OQn(),UPt))))},zW(q9n,"LevelProcessor/lambda$0$Type",1915),sDn(1916,1,Q4n,Xa),uZn.Kf=function(n,t){DAn(this,uG(n,121),t)},uZn.a=0,zW(q9n,"NeighborsProcessor",1916),sDn(1917,1,t1n,za),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return hZ(),wS(),Qot},zW(q9n,"NeighborsProcessor/1",1917),sDn(1922,1,Q4n,Va),uZn.Kf=function(n,t){JUn(this,uG(n,121),t)},uZn.a=0,zW(q9n,"NodePositionProcessor",1922),sDn(1912,1,Q4n,sy),uZn.Kf=function(n,t){Ezn(this,uG(n,121),t)},zW(q9n,"RootProcessor",1912),sDn(1942,1,Q4n,Wa),uZn.Kf=function(n,t){Wyn(uG(n,121),t)},zW(q9n,"Untreeifyer",1942),sDn(392,22,{3:1,34:1,22:1,392:1},WI);var mPt,vPt,kPt,yPt,MPt,TPt,jPt,EPt,SPt,PPt,CPt,IPt,OPt,APt,LPt,NPt,$Pt,DPt,xPt,RPt,KPt,FPt,_Pt,BPt,HPt,UPt,GPt,qPt,XPt,zPt,VPt,WPt,QPt,JPt,YPt,ZPt,nCt,tCt,eCt,iCt,rCt,cCt,aCt,oCt,uCt,sCt,hCt,fCt,lCt,bCt,wCt,dCt,gCt,pCt,mCt,vCt,kCt,yCt,MCt,TCt,jCt,ECt,SCt,PCt,CCt,ICt,OCt,ACt,LCt,NCt,$Ct,DCt,xCt,RCt=_cn(W9n,"EdgeRoutingMode",392,Oat,t3,$H);sDn(862,1,K2n,vl),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,J9n),""),r7n),"Turns on Tree compaction which decreases the size of the whole tree by placing nodes of multiple levels in one large level"),(qx(),!1)),(lAn(),wNt)),cot),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Y9n),""),"Edge End Texture Length"),"Should be set to the length of the texture at the end of an edge. This value can be used to improve the Edge Routing."),7),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Z9n),""),"Tree Level"),"The index for the tree level the node is in"),xwn(0)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,n7n),""),r7n),"When set to a positive number this option will force the algorithm to place the node to the specified position within the trees layer if weighting is set to constraint"),xwn(-1)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,t7n),""),"Weighting of Nodes"),"Which weighting to use when computing a node order."),tCt),gNt),BCt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,e7n),""),"Edge Routing Mode"),"Chooses an Edge Routing algorithm."),WPt),gNt),RCt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,i7n),""),"Search Order"),"Which search order to use when computing a spanning tree."),YPt),gNt),QCt),ggn(hNt)))),yJn((new Ml,n))},zW(W9n,"MrTreeMetaDataProvider",862),sDn(1006,1,K2n,Ml),uZn.hf=function(n){yJn(n)},zW(W9n,"MrTreeOptions",1006),sDn(1007,1,{},Qa),uZn.sf=function(){return new FF},uZn.tf=function(n){},zW(W9n,"MrTreeOptions/MrtreeFactory",1007),sDn(353,22,{3:1,34:1,22:1,353:1},QI);var KCt,FCt,_Ct,BCt=_cn(W9n,"OrderWeighting",353,Oat,r5,DH);sDn(433,22,{3:1,34:1,22:1,433:1},JI);var HCt,UCt,GCt,qCt,XCt,zCt,VCt,WCt,QCt=_cn(W9n,"TreeifyingOrder",433,Oat,j1,xH);sDn(1486,1,y9n,Tl),uZn.rg=function(n){return uG(n,121),UCt},uZn.Kf=function(n,t){$un(this,uG(n,121),t)},zW("org.eclipse.elk.alg.mrtree.p1treeify","DFSTreeifyer",1486),sDn(1487,1,y9n,jl),uZn.rg=function(n){return uG(n,121),GCt},uZn.Kf=function(n,t){E_n(this,uG(n,121),t)},zW(u7n,"NodeOrderer",1487),sDn(1494,1,{},lo),uZn.td=function(n){return Nq(n)},zW(u7n,"NodeOrderer/0methodref$lambda$6$Type",1494),sDn(1488,1,y1n,bo),uZn.Mb=function(n){return ncn(),oM(gK(oIn(uG(n,40),(OQn(),UPt))))},zW(u7n,"NodeOrderer/lambda$0$Type",1488),sDn(1489,1,y1n,wo),uZn.Mb=function(n){return ncn(),uG(oIn(uG(n,40),(QGn(),kCt)),17).a<0},zW(u7n,"NodeOrderer/lambda$1$Type",1489),sDn(1490,1,y1n,Lp),uZn.Mb=function(n){return _an(this.a,uG(n,40))},zW(u7n,"NodeOrderer/lambda$2$Type",1490),sDn(1491,1,y1n,Ap),uZn.Mb=function(n){return f6(this.a,uG(n,40))},zW(u7n,"NodeOrderer/lambda$3$Type",1491),sDn(1492,1,b2n,go),uZn.Ne=function(n,t){return frn(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(u7n,"NodeOrderer/lambda$4$Type",1492),sDn(1493,1,y1n,po),uZn.Mb=function(n){return ncn(),0!=uG(oIn(uG(n,40),(OQn(),EPt)),17).a},zW(u7n,"NodeOrderer/lambda$5$Type",1493),sDn(1495,1,y9n,yl),uZn.rg=function(n){return uG(n,121),qCt},uZn.Kf=function(n,t){aUn(this,uG(n,121),t)},uZn.b=0,zW("org.eclipse.elk.alg.mrtree.p3place","NodePlacer",1495),sDn(1496,1,y9n,kl),uZn.rg=function(n){return uG(n,121),XCt},uZn.Kf=function(n,t){gHn(uG(n,121),t)},zW(s7n,"EdgeRouter",1496),sDn(1498,1,b2n,fo),uZn.Ne=function(n,t){return d$(uG(n,17).a,uG(t,17).a)},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/0methodref$compare$Type",1498),sDn(1503,1,{},Ya),uZn.Ye=function(n){return uM(pK(n))},zW(s7n,"EdgeRouter/1methodref$doubleValue$Type",1503),sDn(1505,1,b2n,Za),uZn.Ne=function(n,t){return ugn(uM(pK(n)),uM(pK(t)))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/2methodref$compare$Type",1505),sDn(1507,1,b2n,no),uZn.Ne=function(n,t){return ugn(uM(pK(n)),uM(pK(t)))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/3methodref$compare$Type",1507),sDn(1509,1,{},Ja),uZn.Ye=function(n){return uM(pK(n))},zW(s7n,"EdgeRouter/4methodref$doubleValue$Type",1509),sDn(1511,1,b2n,to),uZn.Ne=function(n,t){return ugn(uM(pK(n)),uM(pK(t)))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/5methodref$compare$Type",1511),sDn(1513,1,b2n,eo),uZn.Ne=function(n,t){return ugn(uM(pK(n)),uM(pK(t)))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/6methodref$compare$Type",1513),sDn(1497,1,{},io),uZn.Kb=function(n){return tcn(),uG(oIn(uG(n,40),(QGn(),ACt)),17)},zW(s7n,"EdgeRouter/lambda$0$Type",1497),sDn(1508,1,{},ro),uZn.Kb=function(n){return CR(uG(n,40))},zW(s7n,"EdgeRouter/lambda$11$Type",1508),sDn(1510,1,{},dO),uZn.Kb=function(n){return vq(this.b,this.a,uG(n,40))},uZn.a=0,uZn.b=0,zW(s7n,"EdgeRouter/lambda$13$Type",1510),sDn(1512,1,{},gO),uZn.Kb=function(n){return IR(this.b,this.a,uG(n,40))},uZn.a=0,uZn.b=0,zW(s7n,"EdgeRouter/lambda$15$Type",1512),sDn(1514,1,b2n,co),uZn.Ne=function(n,t){return Gkn(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/lambda$17$Type",1514),sDn(1515,1,b2n,ao),uZn.Ne=function(n,t){return qkn(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/lambda$18$Type",1515),sDn(1516,1,b2n,oo),uZn.Ne=function(n,t){return zkn(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/lambda$19$Type",1516),sDn(1499,1,y1n,Np),uZn.Mb=function(n){return n0(this.a,uG(n,40))},uZn.a=0,zW(s7n,"EdgeRouter/lambda$2$Type",1499),sDn(1517,1,b2n,uo),uZn.Ne=function(n,t){return Xkn(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/lambda$20$Type",1517),sDn(1500,1,b2n,so),uZn.Ne=function(n,t){return TG(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/lambda$3$Type",1500),sDn(1501,1,b2n,ho),uZn.Ne=function(n,t){return jG(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"EdgeRouter/lambda$4$Type",1501),sDn(1502,1,{},mo),uZn.Kb=function(n){return OR(uG(n,40))},zW(s7n,"EdgeRouter/lambda$5$Type",1502),sDn(1504,1,{},pO),uZn.Kb=function(n){return kq(this.b,this.a,uG(n,40))},uZn.a=0,uZn.b=0,zW(s7n,"EdgeRouter/lambda$7$Type",1504),sDn(1506,1,{},mO),uZn.Kb=function(n){return AR(this.b,this.a,uG(n,40))},uZn.a=0,uZn.b=0,zW(s7n,"EdgeRouter/lambda$9$Type",1506),sDn(675,1,{675:1},wTn),uZn.e=0,uZn.f=!1,uZn.g=!1,zW(s7n,"MultiLevelEdgeNodeNodeGap",675),sDn(1943,1,b2n,vo),uZn.Ne=function(n,t){return l2(uG(n,240),uG(t,240))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"MultiLevelEdgeNodeNodeGap/lambda$0$Type",1943),sDn(1944,1,b2n,ko),uZn.Ne=function(n,t){return b2(uG(n,240),uG(t,240))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(s7n,"MultiLevelEdgeNodeNodeGap/lambda$1$Type",1944),sDn(501,22,{3:1,34:1,22:1,501:1,188:1,196:1},YI),uZn.dg=function(){return Fpn(this)},uZn.qg=function(){return Fpn(this)};var JCt,YCt,ZCt,nIt,tIt,eIt,iIt=_cn(h7n,"RadialLayoutPhases",501,Oat,p1,RH);sDn(1113,205,M3n,Uj),uZn.rf=function(n,t){var e,i,r,c;if(e=_Kn(this,n),t.Ug("Radial layout",e.c.length),oM(gK(zDn(n,(jOn(),RIt))))||J1(new Sd((vP(),new Vy(n)))),c=XPn(n),Myn(n,(SK(),zCt),c),!c)throw hv(new vM("The given graph is not a tree!"));for(0==(i=uM(pK(zDn(n,HIt))))&&(i=tNn(n)),Myn(n,HIt,i),r=new Ww(_Kn(this,n));r.a<r.c.c.length;)uG(N3(r),47).Kf(n,t.eh(1));t.Vg()},zW(h7n,"RadialLayoutProvider",1113),sDn(556,1,b2n,Vj),uZn.Ne=function(n,t){return RBn(this.a,this.b,uG(n,27),uG(t,27))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},uZn.a=0,uZn.b=0,zW(h7n,"RadialUtil/lambda$0$Type",556),sDn(1395,1,Q4n,yo),uZn.Kf=function(n,t){GQn(uG(n,27),t)},zW(d7n,"CalculateGraphSize",1395),sDn(1396,1,Q4n,Mo),uZn.Kf=function(n,t){CXn(uG(n,27))},zW(d7n,"EdgeAngleCalculator",1396),sDn(368,22,{3:1,34:1,22:1,368:1,196:1},ZI),uZn.dg=function(){switch(this.g){case 0:return new Co;case 1:return new To;case 2:return new Io;case 3:return new yo;case 4:return new Mo;default:throw hv(new vM(v6n+(null!=this.f?this.f:""+this.g)))}};var rIt,cIt,aIt,oIt=_cn(d7n,k6n,368,Oat,b9,KH);sDn(653,1,{}),uZn.e=1,uZn.g=0,zW(p7n,"AbstractRadiusExtensionCompaction",653),sDn(1834,653,{},NR),uZn.Cg=function(n){var t,e,i,r,c,a,o,u,s;for(this.c=uG(zDn(n,(SK(),zCt)),27),iw(this,this.c),this.d=aMn(uG(zDn(n,(jOn(),zIt)),300)),(u=uG(zDn(n,AIt),17))&&ew(this,u.a),rw(this,(tJ(o=pK(zDn(n,(XYn(),DDt)))),o)),s=GFn(this.c),this.d&&this.d.Gg(s),SHn(this,s),a=new IM(Uhn(cT(bFt,1),m7n,27,0,[this.c])),e=0;e<2;e++)for(t=0;t<s.c.length;t++)r=new IM(Uhn(cT(bFt,1),m7n,27,0,[(u3(t,s.c.length),uG(s.c[t],27))])),c=t<s.c.length-1?(u3(t+1,s.c.length),uG(s.c[t+1],27)):(u3(0,s.c.length),uG(s.c[0],27)),i=0==t?uG(zq(s,s.c.length-1),27):(u3(t-1,s.c.length),uG(s.c[t-1],27)),xCn(this,(u3(t,s.c.length),uG(s.c[t],27),a),i,c,r)},zW(p7n,"AnnulusWedgeCompaction",1834),sDn(1393,1,Q4n,To),uZn.Kf=function(n,t){sun(uG(n,27),t)},zW(p7n,"GeneralCompactor",1393),sDn(1833,653,{},jo),uZn.Cg=function(n){var t,e,i,r;e=uG(zDn(n,(SK(),zCt)),27),this.f=e,this.b=aMn(uG(zDn(n,(jOn(),zIt)),300)),(r=uG(zDn(n,AIt),17))&&ew(this,r.a),rw(this,(tJ(i=pK(zDn(n,(XYn(),DDt)))),i)),t=GFn(e),this.b&&this.b.Gg(t),aAn(this,t)},uZn.a=0,zW(p7n,"RadialCompaction",1833),sDn(1842,1,{},Eo),uZn.Dg=function(n){var t,e,i,r,c,a;for(this.a=n,t=0,i=0,c=new Ww(a=GFn(n));c.a<c.c.c.length;)for(r=uG(N3(c),27),e=++i;e<a.c.length;e++)bqn(this,r,(u3(e,a.c.length),uG(a.c[e],27)))&&(t+=1);return t},zW(v7n,"CrossingMinimizationPosition",1842),sDn(1840,1,{},So),uZn.Dg=function(n){var t,i,r,c,a,o,u,s,f,l,b,w,d;for(r=0,i=new Fz(ix(eRn(n).a.Kc(),new h));hDn(i);)t=uG(N9(i),74),f=(u=lCn(uG(zrn((!t.c&&(t.c=new f_(cFt,t,5,8)),t.c),0),84))).i+u.g/2,l=u.j+u.f/2,c=n.i+n.g/2,a=n.j+n.f/2,(b=new sj).a=f-c,b.b=l-a,OEn(o=new MO(b.a,b.b),n.g,n.f),b.a-=o.a,b.b-=o.b,c=f-b.a,a=l-b.b,OEn(s=new MO(b.a,b.b),u.g,u.f),b.a-=s.a,b.b-=s.b,w=(f=c+b.a)-c,d=(l=a+b.b)-a,r+=e.Math.sqrt(w*w+d*d);return r},zW(v7n,"EdgeLengthOptimization",1840),sDn(1841,1,{},Po),uZn.Dg=function(n){var t,i,r,c,a,o,u,s,f;for(r=0,i=new Fz(ix(eRn(n).a.Kc(),new h));hDn(i);)t=uG(N9(i),74),o=(a=lCn(uG(zrn((!t.c&&(t.c=new f_(cFt,t,5,8)),t.c),0),84))).i+a.g/2,u=a.j+a.f/2,c=uG(zDn(a,(XYn(),mDt)),8),s=o-(n.i+c.a+n.g/2),f=u-(n.j+c.b+n.f),r+=e.Math.sqrt(s*s+f*f);return r},zW(v7n,"EdgeLengthPositionOptimization",1841),sDn(1392,653,Q4n,Co),uZn.Kf=function(n,t){lLn(this,uG(n,27),t)},zW("org.eclipse.elk.alg.radial.intermediate.overlaps","RadiusExtensionOverlapRemoval",1392),sDn(1394,1,Q4n,Io),uZn.Kf=function(n,t){eV(uG(n,27),t)},zW("org.eclipse.elk.alg.radial.intermediate.rotation","GeneralRotator",1394),sDn(434,22,{3:1,34:1,22:1,434:1},nO);var uIt,sIt,hIt,fIt,lIt=_cn(y7n,"AnnulusWedgeCriteria",434,Oat,E1,_H);sDn(393,22,{3:1,34:1,22:1,393:1},tO);var bIt,wIt,dIt,gIt,pIt,mIt,vIt,kIt,yIt,MIt,TIt,jIt,EIt,SIt,PIt,CIt,IIt,OIt,AIt,LIt,NIt,$It,DIt,xIt,RIt,KIt,FIt,_It,BIt,HIt,UIt,GIt,qIt,XIt,zIt,VIt,WIt,QIt,JIt,YIt,ZIt,nOt=_cn(y7n,C3n,393,Oat,p3,FH);sDn(863,1,K2n,El),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,M7n),""),"Center On Root"),"Centers the layout on the root of the tree i.e. so that the central node is also the center node of the final layout. This introduces additional whitespace."),(qx(),!1)),(lAn(),wNt)),cot),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,T7n),""),"Order ID"),"The id can be used to define an order for nodes of one radius. This can be used to sort them in the layer accordingly."),xwn(0)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,j7n),""),"Radius"),"The radius option can be used to set the initial radius for the radial layouter."),0),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,E7n),""),"Rotate"),"The rotate option determines whether a rotation of the layout should be performed."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,S7n),""),$7n),"With the compacter option it can be determined how compaction on the graph is done. It can be chosen between none, the radial compaction or the compaction of wedges separately."),pIt),gNt),nOt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,P7n),""),"Compaction Step Size"),"Determine the size of steps with which the compaction is done. Step size 1 correlates to a compaction of 1 pixel per Iteration."),xwn(1)),mNt),dot),ggn(hNt)))),H4(n,P7n,S7n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,C7n),""),"Sorter"),"Sort the nodes per radius according to the sorting algorithm. The strategies are none, by the given order id, or sorting them by polar coordinates."),PIt),gNt),hOt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,I7n),""),"Annulus Wedge Criteria"),"Determine how the wedge for the node placement is calculated. It can be chosen between wedge determination by the number of leaves or by the maximum sum of diagonals."),IIt),gNt),lIt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,O7n),""),"Translation Optimization"),"Find the optimal translation of the nodes of the first radii according to this criteria. For example edge crossings can be minimized."),vIt),gNt),cOt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,A7n),D7n),"Target Angle"),"The angle in radians that the layout should be rotated to after layout."),0),dNt),fot),ggn(hNt)))),H4(n,A7n,E7n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,L7n),D7n),"Additional Wedge Space"),"If set to true, modifies the target angle by rotating further such that space is left for an edge to pass in between the nodes. This option should only be used in conjunction with top-down layout."),!1),wNt),cot),ggn(hNt)))),H4(n,L7n,E7n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,N7n),D7n),"Outgoing Edge Angles"),"Calculate the required angle of connected nodes to leave space for an incoming edge. This option should only be used in conjunction with top-down layout."),!1),wNt),cot),ggn(hNt)))),nJn((new Sl,n))},zW(y7n,"RadialMetaDataProvider",863),sDn(1008,1,K2n,Sl),uZn.hf=function(n){nJn(n)},zW(y7n,"RadialOptions",1008),sDn(1009,1,{},Oo),uZn.sf=function(){return new Uj},uZn.tf=function(n){},zW(y7n,"RadialOptions/RadialFactory",1009),sDn(354,22,{3:1,34:1,22:1,354:1},eO);var tOt,eOt,iOt,rOt,cOt=_cn(y7n,"RadialTranslationStrategy",354,Oat,c5,BH);sDn(300,22,{3:1,34:1,22:1,300:1},iO);var aOt,oOt,uOt,sOt,hOt=_cn(y7n,"SortingStrategy",300,Oat,m3,HH);sDn(1476,1,y9n,Ao),uZn.rg=function(n){return uG(n,27),null},uZn.Kf=function(n,t){QLn(this,uG(n,27),t)},uZn.c=0,zW("org.eclipse.elk.alg.radial.p1position","EadesRadial",1476),sDn(1838,1,{},Lo),uZn.Eg=function(n){return Oyn(n)},zW(R7n,"AnnulusWedgeByLeafs",1838),sDn(1839,1,{},No),uZn.Eg=function(n){return NPn(this,n)},zW(R7n,"AnnulusWedgeByNodeSpace",1839),sDn(1477,1,y9n,$o),uZn.rg=function(n){return uG(n,27),null},uZn.Kf=function(n,t){epn(this,uG(n,27),t)},zW("org.eclipse.elk.alg.radial.p2routing","StraightLineEdgeRouter",1477),sDn(826,1,{},dy),uZn.Fg=function(n){},uZn.Gg=function(n){kv(this,n)},zW(K7n,"IDSorter",826),sDn(1837,1,b2n,Do),uZn.Ne=function(n,t){return hun(uG(n,27),uG(t,27))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(K7n,"IDSorter/lambda$0$Type",1837),sDn(1836,1,{},gun),uZn.Fg=function(n){B4(this,n)},uZn.Gg=function(n){n.dc()||(this.e||B4(this,PX(uG(n.Xb(0),27))),kv(this.e,n))},zW(K7n,"PolarCoordinateSorter",1836),sDn(445,22,{3:1,34:1,22:1,445:1},rO);var fOt,lOt,bOt,wOt,dOt=_cn(H7n,"RectPackingLayoutPhases",445,Oat,d3,UH);sDn(1118,205,M3n,qj),uZn.rf=function(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;if(t.Ug("Rectangle Packing",1),s=uG(zDn(n,(S_n(),hAt)),107),a=oM(gK(zDn(n,iAt))),u=uM(pK(zDn(n,bAt))),M=oM(gK(zDn(n,wAt))),!n.a&&(n.a=new fV(bFt,n,10,11)),p=n.a,oM(gK(zDn(n,aAt)))||J1(new Sd((vP(),new Vy(n)))),y=!1,M&&p.i>=3)for(v=uG(zrn(p,0),27),k=uG(zrn(p,1),27),r=0;r+2<p.i;){if(m=v,v=k,k=uG(zrn(p,r+2),27),m.f>=v.f+k.f+u||k.f>=m.f+v.f+u){y=!0;break}++r}else y=!0;if(!y){for(h=p.i,c=new DD(p);c.e!=c.i.gc();)Myn(uG(Zkn(c),27),(XYn(),vDt),xwn(h)),--h;return XGn(n,new fy),void t.Vg()}for(_J(this.a),JV(this.a,(Jmn(),oOt),uG(zDn(n,mAt),188)),JV(this.a,uOt,uG(zDn(n,sAt),188)),JV(this.a,sOt,uG(zDn(n,dAt),188)),ZL(this.a,(Aq(T=new wJ,oOt,(Zyn(),wOt)),Aq(T,uOt,bOt),oM(gK(zDn(n,YOt)))&&Aq(T,oOt,lOt),T)),o=1/(i=Qzn(this.a,n)).c.length,l=new Ww(i);l.a<l.c.c.length;){if(f=uG(N3(l),47),t.$g())return;f.Kf(n,t.eh(o))}for(w=0,b=0,g=new DD(p);g.e!=g.i.gc();)d=uG(Zkn(g),27),w=e.Math.max(w,d.i+d.g),b=e.Math.max(b,d.j+d.f);tLn(n,new MO(uM(pK(zDn(n,(lBn(),vOt)))),uM(pK(zDn(n,mOt)))),new MO(w,b)),Isn(p,s),a||ZQn(n,uM(pK(zDn(n,vOt)))+(s.b+s.c),uM(pK(zDn(n,mOt)))+(s.d+s.a),!1,!0),oM(gK(zDn(n,aAt)))||J1(new Sd((vP(),new Vy(n)))),t.Vg()},zW(H7n,"RectPackingLayoutProvider",1118),sDn(1518,1,Q4n,xo),uZn.Kf=function(n,t){IXn(uG(n,27),t)},zW(U7n,"InteractiveNodeReorderer",1518),sDn(1519,1,b2n,Ro),uZn.Ne=function(n,t){return kln(uG(n,27),uG(t,27))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(U7n,"InteractiveNodeReorderer/lambda$0$Type",1519),sDn(456,22,{3:1,34:1,22:1,456:1,196:1},cO),uZn.dg=function(){switch(this.g){case 0:return new xo;case 1:return new Fo;case 2:return new Ko}return null};var gOt,pOt,mOt,vOt,kOt,yOt,MOt,TOt,jOt,EOt,SOt,POt,COt,IOt,OOt,AOt=_cn(U7n,k6n,456,Oat,g3,GH);sDn(1521,1,Q4n,Ko),uZn.Kf=function(n,t){Vmn(uG(n,27),t)},zW(U7n,"MinSizePostProcessor",1521),sDn(1520,1,Q4n,Fo),uZn.Kf=function(n,t){ebn(uG(n,27),t)},zW(U7n,"MinSizePreProcessor",1520),sDn(394,22,{3:1,34:1,22:1,394:1},aO);var LOt,NOt,$Ot,DOt,xOt,ROt,KOt,FOt,_Ot,BOt,HOt,UOt,GOt,qOt,XOt,zOt,VOt,WOt,QOt,JOt,YOt,ZOt,nAt,tAt,eAt,iAt,rAt,cAt,aAt,oAt,uAt,sAt,hAt,fAt,lAt,bAt,wAt,dAt,gAt,pAt,mAt,vAt,kAt=_cn(G7n,"OptimizationGoal",394,Oat,w3,qH);sDn(867,1,K2n,Pl),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,q7n),""),"Try box layout first"),"Whether one should check whether the regions are stackable to see whether box layout would do the job. For example, nodes with the same height are not stackable inside a row. Therefore, box layout will perform better and faster."),(qx(),!1)),(lAn(),wNt)),cot),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,X7n),""),"Current position of a node in the order of nodes"),"The rectangles are ordered. Normally according to their definition the the model. This option specifies the current position of a node."),xwn(-1)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,z7n),""),"Desired index of node"),"The rectangles are ordered. Normally according to their definition the the model. This option allows to specify a desired position that has preference over the original position."),xwn(-1)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,V7n),""),"In new Row"),"If set to true this node begins in a new row. Consequently this node cannot be moved in a previous layer during compaction. Width approximation does does not take this into account."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,W7n),int),"Width Approximation Strategy"),"Strategy for finding an initial width of the drawing."),XOt),gNt),CAt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Q7n),int),"Target Width"),"Option to place the rectangles in the given target width instead of approximating the width using the desired aspect ratio. The padding is not included in this. Meaning a drawing will have width of targetwidth + horizontal padding."),-1),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,J7n),int),"Optimization Goal"),"Optimization goal for approximation of the bounding box given by the first iteration. Determines whether layout is sorted by the maximum scaling, aspect ratio, or area. Depending on the strategy the aspect ratio might be nearly ignored."),GOt),gNt),kAt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Y7n),int),"Shift Last Placed."),"When placing a rectangle behind or below the last placed rectangle in the first iteration, it is sometimes possible to shift the rectangle further to the left or right, resulting in less whitespace. True (default) enables the shift and false disables it. Disabling the shift produces a greater approximated area by the first iteration and a layout, when using ONLY the first iteration (default not the case), where it is sometimes impossible to implement a size transformation of rectangles that will fill the bounding box and eliminate empty spaces."),!0),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Z7n),"packing"),rnt),"Strategy for finding an initial placement on nodes."),FOt),gNt),LAt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,nnt),cnt),"Row Height Reevaluation"),"During the compaction step the height of a row is normally not changed. If this options is set, the blocks of other rows might be added if they exceed the row height. If this is the case the whole row has to be packed again to be optimal regarding the new row height. This option should, therefore, be used with care since it might be computation heavy."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,tnt),cnt),"Compaction iterations"),"Defines the number of compaction iterations. E.g. if set to 2 the width is initially approximated, then the drawing is compacted and based on the resulting drawing the target width is decreased or increased and a second compaction step is executed and the result compared to the first one. The best run is used based on the scale measure."),xwn(1)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,ent),"whiteSpaceElimination"),"White Space Approximation Strategy"),"Strategy for expanding nodes such that whitespace in the parent is eliminated."),gNt),$At),ggn(hNt)))),lYn((new Cl,n))},zW(G7n,"RectPackingMetaDataProvider",867),sDn(1016,1,K2n,Cl),uZn.hf=function(n){lYn(n)},zW(G7n,"RectPackingOptions",1016),sDn(1017,1,{},_o),uZn.sf=function(){return new qj},uZn.tf=function(n){},zW(G7n,"RectPackingOptions/RectpackingFactory",1017),sDn(1705,1,{},AU),uZn.a=0,uZn.c=!1,zW(ont,"AreaApproximation",1705);var yAt,MAt,TAt=Iq(ont,"BestCandidateFilter");sDn(673,1,{535:1},Bo),uZn.Hg=function(n,t,i){var r,c,a,o,u,s;for(s=new Zm,a=M0n,u=new Ww(n);u.a<u.c.c.length;)o=uG(N3(u),238),a=e.Math.min(a,(o.c+(i.b+i.c))*(o.b+(i.d+i.a)));for(c=new Ww(n);c.a<c.c.c.length;)((r=uG(N3(c),238)).c+(i.b+i.c))*(r.b+(i.d+i.a))==a&&mv(s.c,r);return s},zW(ont,"AreaFilter",673),sDn(674,1,{535:1},Ho),uZn.Hg=function(n,t,i){var r,c,a,o,u,s;for(u=new Zm,s=M0n,o=new Ww(n);o.a<o.c.c.length;)a=uG(N3(o),238),s=e.Math.min(s,e.Math.abs((a.c+(i.b+i.c))/(a.b+(i.d+i.a))-t));for(c=new Ww(n);c.a<c.c.c.length;)r=uG(N3(c),238),e.Math.abs((r.c+(i.b+i.c))/(r.b+(i.d+i.a))-t)==s&&mv(u.c,r);return u},zW(ont,"AspectRatioFilter",674),sDn(1469,1,y9n,Uo),uZn.rg=function(n){return uG(n,27),null},uZn.Kf=function(n,t){IFn(uG(n,27),t)},zW(ont,"GreedyWidthApproximator",1469),sDn(672,1,{535:1},Go),uZn.Hg=function(n,t,i){var r,c,a,o,u,s;for(s=new Zm,a=T0n,u=new Ww(n);u.a<u.c.c.length;)o=uG(N3(u),238),a=e.Math.max(a,mX(o.c+(i.b+i.c),o.b+(i.d+i.a),o.a));for(c=new Ww(n);c.a<c.c.c.length;)mX((r=uG(N3(c),238)).c+(i.b+i.c),r.b+(i.d+i.a),r.a)==a&&mv(s.c,r);return s},zW(ont,"ScaleMeasureFilter",672),sDn(1470,1,y9n,qo),uZn.rg=function(n){return uG(n,27),null},uZn.Kf=function(n,t){JLn(uG(n,27),t)},zW(ont,"TargetWidthWidthApproximator",1470),sDn(491,22,{3:1,34:1,22:1,491:1,188:1,196:1},oO),uZn.dg=function(){return UCn(this)},uZn.qg=function(){return UCn(this)};var jAt,EAt,SAt,PAt,CAt=_cn(ont,"WidthApproximationStrategy",491,Oat,M1,XH);sDn(1471,1,y9n,Xo),uZn.rg=function(n){return uG(n,27),null},uZn.Kf=function(n,t){oJn(this,uG(n,27),t)},zW(unt,"Compactor",1471),sDn(1473,1,y9n,zo),uZn.rg=function(n){return uG(n,27),null},uZn.Kf=function(n,t){zKn(uG(n,27),t)},zW(unt,"NoPlacement",1473),sDn(439,22,{3:1,34:1,22:1,439:1,188:1,196:1},uO),uZn.dg=function(){return Lwn(this)},uZn.qg=function(){return Lwn(this)};var IAt,OAt,AAt,LAt=_cn(unt,"PackingStrategy",439,Oat,b3,WH);sDn(810,1,{},vO),uZn.a=0,uZn.b=0,uZn.c=0,uZn.d=M0n,uZn.e=0,uZn.f=M0n,zW(unt,"RowFillingAndCompaction",810),sDn(1472,1,y9n,Vo),uZn.rg=function(n){return uG(n,27),null},uZn.Kf=function(n,t){wVn(uG(n,27),t)},zW(unt,"SimplePlacement",1472),sDn(1474,1,y9n,Wo),uZn.rg=function(n){return uG(n,27),null},uZn.Kf=function(n,t){this.Ig(uG(n,27),t)},uZn.Ig=function(n,t){XDn(n,t)},zW(hnt,"EqualWhitespaceEliminator",1474),sDn(1475,1474,y9n,Qo),uZn.Ig=function(n,t){var e,i,r,c;t.Ug("To Aspect Ratio Whitesapce Eliminator",1),c=uM(pK(zDn(n,(lBn(),vOt)))),r=uM(pK(zDn(n,mOt))),i=uM(pK(zDn(n,(S_n(),VOt)))),e=uM(pK(zDn(n,pOt))),c/r<i?Myn(n,vOt,c=r*i):(Myn(n,pOt,e+=c/i-r),Myn(n,mOt,r+e)),XDn(n,t),t.Vg()},zW(hnt,"ToAspectratioNodeExpander",1475),sDn(492,22,{3:1,34:1,22:1,492:1,188:1,196:1},sO),uZn.dg=function(){return Sun(this)},uZn.qg=function(){return Sun(this)};var NAt,$At=_cn(hnt,"WhiteSpaceEliminationStrategy",492,Oat,T1,QH);sDn(172,1,{172:1},dln),uZn.a=0,uZn.c=!1,uZn.d=0,uZn.e=0,uZn.f=0,uZn.g=0,uZn.i=0,uZn.k=!1,uZn.o=M0n,uZn.p=M0n,uZn.r=0,uZn.s=0,uZn.t=0,zW(fnt,"Block",172),sDn(209,1,{209:1},c0),uZn.a=0,uZn.b=0,uZn.d=0,uZn.e=0,uZn.f=0,zW(fnt,"BlockRow",209),sDn(315,1,{315:1},r0),uZn.b=0,uZn.c=0,uZn.d=0,uZn.e=0,uZn.f=0,zW(fnt,"BlockStack",315),sDn(238,1,{238:1},jq,Mvn),uZn.a=0,uZn.b=0,uZn.c=0,uZn.d=0,uZn.e=0,uZn.g=0;var DAt,xAt,RAt,KAt,FAt,_At=zW(fnt,"DrawingData",238);sDn(373,22,{3:1,34:1,22:1,373:1},hO);var BAt,HAt,UAt,GAt,qAt=_cn(fnt,"DrawingDataDescriptor",373,Oat,w9,JH);sDn(186,1,{186:1},e4),uZn.b=0,uZn.c=0,uZn.e=0,uZn.f=0,zW(fnt,"RectRow",186),sDn(763,1,{},Xbn),uZn.j=0,zW(bnt,f6n,763),sDn(1209,1,{},Jo),uZn.af=function(n){return atn(n.a,n.b)},zW(bnt,z3n,1209),sDn(1210,1,{},$p),uZn.af=function(n){return X9(this.a,n)},zW(bnt,l6n,1210),sDn(1211,1,{},Dp),uZn.af=function(n){return dyn(this.a,n)},zW(bnt,b6n,1211),sDn(1212,1,{},xp),uZn.af=function(n){return lfn(this.a,n)},zW(bnt,"ElkGraphImporter/lambda$3$Type",1212),sDn(1213,1,{},Rp),uZn.af=function(n){return QNn(this.a,n)},zW(bnt,w6n,1213),sDn(1115,205,M3n,Xj),uZn.rf=function(n,t){var e,i,r,c,a,o,u,s,h,f;for(vnn(n,(fIn(),yLt))&&(f=mK(zDn(n,(jMn(),ULt))),(c=QBn(aan(),f))&&uG(A1(c.f),205).rf(n,t.eh(1))),Myn(n,gLt,(B7(),ZAt)),Myn(n,pLt,(pOn(),cLt)),Myn(n,mLt,(Vhn(),VLt)),a=uG(zDn(n,(jMn(),FLt)),17).a,t.Ug("Overlap removal",1),oM(gK(zDn(n,KLt))),u=new Kp(o=new ek),e=wYn(i=new Xbn,n),s=!0,r=0;r<a&&s;){if(oM(gK(zDn(n,_Lt)))){if(o.a.$b(),IAn(new I$(u),e.i),0==o.a.gc())break;e.e=o}for(_J(this.b),JV(this.b,(Rdn(),HAt),(eP(),GLt)),JV(this.b,UAt,e.g),JV(this.b,GAt,(tP(),QAt)),this.a=Qzn(this.b,e),h=new Ww(this.a);h.a<h.c.c.length;)uG(N3(h),47).Kf(e,t.eh(1));GEn(i,e),s=oM(gK(oIn(e,(rsn(),Aht)))),++r}tWn(i,e),t.Vg()},zW(bnt,"OverlapRemovalLayoutProvider",1115),sDn(1116,1,{},Kp),zW(bnt,"OverlapRemovalLayoutProvider/lambda$0$Type",1116),sDn(444,22,{3:1,34:1,22:1,444:1},fO);var XAt,zAt,VAt=_cn(bnt,"SPOrEPhases",444,Oat,k3,ZH);sDn(1219,1,{},zj),zW(bnt,"ShrinkTree",1219),sDn(1117,205,M3n,by),uZn.rf=function(n,t){var e,i,r,c;vnn(n,(fIn(),yLt))&&(c=mK(zDn(n,yLt)),(r=QBn(aan(),c))&&uG(A1(r.f),205).rf(n,t.eh(1))),e=wYn(i=new Xbn,n),fRn(this.a,e,t.eh(1)),tWn(i,e)},zW(bnt,"ShrinkTreeLayoutProvider",1117),sDn(306,137,{3:1,306:1,96:1,137:1},i0),uZn.c=!1,zW("org.eclipse.elk.alg.spore.graph","Graph",306),sDn(490,22,{3:1,34:1,22:1,490:1,188:1,196:1},rP),uZn.dg=function(){return cln(this)},uZn.qg=function(){return cln(this)};var WAt,QAt,JAt=_cn(wnt,C3n,490,Oat,NJ,YH);sDn(558,22,{3:1,34:1,22:1,558:1,188:1,196:1},GR),uZn.dg=function(){return new tu},uZn.qg=function(){return new tu};var YAt,ZAt,nLt,tLt=_cn(wnt,"OverlapRemovalStrategy",558,Oat,$J,nU);sDn(438,22,{3:1,34:1,22:1,438:1},lO);var eLt,iLt,rLt,cLt,aLt,oLt,uLt=_cn(wnt,"RootSelection",438,Oat,P1,tU);sDn(324,22,{3:1,34:1,22:1,324:1},bO);var sLt,hLt,fLt,lLt,bLt,wLt,dLt,gLt,pLt,mLt,vLt,kLt,yLt,MLt,TLt,jLt,ELt,SLt,PLt,CLt,ILt,OLt,ALt,LLt,NLt,$Lt,DLt,xLt,RLt,KLt,FLt,_Lt,BLt,HLt,ULt,GLt,qLt=_cn(wnt,"SpanningTreeCostFunction",324,Oat,d9,eU);sDn(1014,1,K2n,Il),uZn.hf=function(n){xXn(n)},zW(wnt,"SporeCompactionOptions",1014),sDn(1015,1,{},Yo),uZn.sf=function(){return new by},uZn.tf=function(n){},zW(wnt,"SporeCompactionOptions/SporeCompactionFactory",1015),sDn(866,1,K2n,Ol),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,gnt),""),"Underlying Layout Algorithm"),"A layout algorithm that is applied to the graph before it is compacted. If this is null, nothing is applied before compaction."),(lAn(),kNt)),$ot),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,ynt),"structure"),"Structure Extraction Strategy"),"This option defines what kind of triangulation or other partitioning of the plane is applied to the vertices."),xLt),gNt),WLt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,pnt),Snt),"Tree Construction Strategy"),"Whether a minimum spanning tree or a maximum spanning tree should be constructed."),$Lt),gNt),JLt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,mnt),Snt),"Cost Function for Spanning Tree"),"The cost function is used in the creation of the spanning tree."),LLt),gNt),qLt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,vnt),Snt),"Root node for spanning tree construction"),"The identifier of the node that is preferred as the root of the spanning tree. If this is null, the first node is chosen."),null),kNt),$ot),ggn(hNt)))),H4(n,vnt,knt,CLt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,knt),Snt),"Root selection for spanning tree"),"This sets the method used to select a root node for the construction of a spanning tree"),OLt),gNt),uLt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Mnt),y8n),rnt),"This option defines how the compaction is applied."),TLt),gNt),JAt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Tnt),y8n),"Orthogonal Compaction"),"Restricts the translation of nodes to orthogonal directions in the compaction phase."),(qx(),!1)),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,jnt),Pnt),"Upper limit for iterations of overlap removal"),null),xwn(64)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Ent),Pnt),"Whether to run a supplementary scanline overlap check."),null),!0),wNt),cot),ggn(hNt)))),KHn((new Al,n)),xXn((new Il,n))},zW(wnt,"SporeMetaDataProvider",866),sDn(1012,1,K2n,Al),uZn.hf=function(n){KHn(n)},zW(wnt,"SporeOverlapRemovalOptions",1012),sDn(1013,1,{},Zo),uZn.sf=function(){return new Xj},uZn.tf=function(n){},zW(wnt,"SporeOverlapRemovalOptions/SporeOverlapFactory",1013),sDn(539,22,{3:1,34:1,22:1,539:1,188:1,196:1},pJ),uZn.dg=function(){return aln(this)},uZn.qg=function(){return aln(this)};var XLt,zLt,VLt,WLt=_cn(wnt,"StructureExtractionStrategy",539,Oat,DJ,iU);sDn(437,22,{3:1,34:1,22:1,437:1,188:1,196:1},wO),uZn.dg=function(){return Hpn(this)},uZn.qg=function(){return Hpn(this)};var QLt,JLt=_cn(wnt,"TreeConstructionStrategy",437,Oat,C1,rU);sDn(1463,1,y9n,nu),uZn.rg=function(n){return uG(n,306),new wJ},uZn.Kf=function(n,t){ZEn(uG(n,306),t)},zW(Int,"DelaunayTriangulationPhase",1463),sDn(1464,1,QZn,Fp),uZn.Cd=function(n){kD(this.a,uG(n,68).a)},zW(Int,"DelaunayTriangulationPhase/lambda$0$Type",1464),sDn(794,1,y9n,hy),uZn.rg=function(n){return uG(n,306),new wJ},uZn.Kf=function(n,t){this.Jg(uG(n,306),t)},uZn.Jg=function(n,t){var e;t.Ug("Minimum spanning tree construction",1),e=n.d?n.d.a:uG(zq(n.i,0),68).a,ifn(this,(oM(gK(oIn(n,(rsn(),Oht)))),pzn(n.e,e,n.b)),n),t.Vg()},zW(Ont,"MinSTPhase",794),sDn(1466,794,y9n,_k),uZn.Jg=function(n,t){var e,i;t.Ug("Maximum spanning tree construction",1),e=new _p(n),i=n.d?n.d.c:uG(zq(n.i,0),68).c,ifn(this,(oM(gK(oIn(n,(rsn(),Oht)))),pzn(n.e,i,e)),n),t.Vg()},zW(Ont,"MaxSTPhase",1466),sDn(1467,1,{},_p),uZn.af=function(n){return gA(this.a,n)},zW(Ont,"MaxSTPhase/lambda$0$Type",1467),sDn(1465,1,QZn,Bp),uZn.Cd=function(n){$$(this.a,uG(n,68))},zW(Ont,"MinSTPhase/lambda$0$Type",1465),sDn(796,1,y9n,tu),uZn.rg=function(n){return uG(n,306),new wJ},uZn.Kf=function(n,t){jCn(this,uG(n,306),t)},uZn.a=!1,zW(Ant,"GrowTreePhase",796),sDn(797,1,QZn,NU),uZn.Cd=function(n){Rhn(this.a,this.b,this.c,uG(n,225))},zW(Ant,"GrowTreePhase/lambda$0$Type",797),sDn(1468,1,y9n,eu),uZn.rg=function(n){return uG(n,306),new wJ},uZn.Kf=function(n,t){EMn(this,uG(n,306),t)},zW(Ant,"ShrinkTreeCompactionPhase",1468),sDn(795,1,QZn,$U),uZn.Cd=function(n){oDn(this.a,this.b,this.c,uG(n,225))},zW(Ant,"ShrinkTreeCompactionPhase/lambda$0$Type",795);var YLt,ZLt,nNt=Iq(p9n,"IGraphElementVisitor");sDn(872,1,{536:1},r4),uZn.Kg=function(n){var t;zsn(t=aBn(this,n),uG(cQ(this.b,n),96)),hRn(this,n,t)},zW(T3n,"LayoutConfigurator",872);var tNt,eNt,iNt,rNt=Iq(T3n,"LayoutConfigurator/IPropertyHolderOptionFilter");sDn(944,1,{2032:1},iu),uZn.Lg=function(n,t){return Whn(),!n.pf(t)},zW(T3n,"LayoutConfigurator/lambda$0$Type",944),sDn(943,1,{845:1},ru),uZn.Mg=function(n,t){return Whn(),!n.pf(t)},zW(T3n,"LayoutConfigurator/lambda$1$Type",943),sDn(945,1,{2032:1},cu),uZn.Lg=function(n,t){return Zj(n,t)},zW(T3n,"LayoutConfigurator/lambda$2$Type",945),sDn(946,1,y1n,kO),uZn.Mb=function(n){return ZQ(this.a,this.b,uG(n,2032))},zW(T3n,"LayoutConfigurator/lambda$3$Type",946),sDn(869,1,{},au),zW(T3n,"RecursiveGraphLayoutEngine",869),sDn(224,63,S1n,Hv,jM),zW(T3n,"UnsupportedConfigurationException",224),sDn(370,63,S1n,EM),zW(T3n,"UnsupportedGraphException",370),sDn(761,1,{}),zW(p9n,"AbstractRandomListAccessor",761),sDn(450,761,{},mKn),uZn.Ng=function(){return null},uZn.d=!0,uZn.e=!0,uZn.f=0,zW($nt,"AlgorithmAssembler",450),sDn(1200,1,y1n,ou),uZn.Mb=function(n){return!!uG(n,106)},zW($nt,"AlgorithmAssembler/lambda$0$Type",1200),sDn(1201,1,{},Hp),uZn.Kb=function(n){return $T(this.a,uG(n,106))},zW($nt,"AlgorithmAssembler/lambda$1$Type",1201),sDn(1202,1,y1n,uu),uZn.Mb=function(n){return!!uG(n,80)},zW($nt,"AlgorithmAssembler/lambda$2$Type",1202),sDn(1203,1,QZn,Up),uZn.Cd=function(n){gsn(this.a,uG(n,80))},zW($nt,"AlgorithmAssembler/lambda$3$Type",1203),sDn(1204,1,QZn,yO),uZn.Cd=function(n){RR(this.a,this.b,uG(n,196))},zW($nt,"AlgorithmAssembler/lambda$4$Type",1204),sDn(1343,1,b2n,su),uZn.Ne=function(n,t){return mZ(uG(n,196),uG(t,196))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW($nt,"EnumBasedFactoryComparator",1343),sDn(80,761,{80:1},wJ),uZn.Ng=function(){return new ek},uZn.a=0,zW($nt,"LayoutProcessorConfiguration",80),sDn(1025,1,{536:1},Nl),uZn.Kg=function(n){Yun(eNt,new Gp(n))},zW(N2n,"DeprecatedLayoutOptionReplacer",1025),sDn(1026,1,QZn,hu),uZn.Cd=function(n){Etn(uG(n,167))},zW(N2n,"DeprecatedLayoutOptionReplacer/lambda$0$Type",1026),sDn(1027,1,QZn,fu),uZn.Cd=function(n){hmn(uG(n,167))},zW(N2n,"DeprecatedLayoutOptionReplacer/lambda$1$Type",1027),sDn(1028,1,{},Gp),uZn.Yd=function(n,t){xR(this.a,uG(n,149),uG(t,41))},zW(N2n,"DeprecatedLayoutOptionReplacer/lambda$2$Type",1028),sDn(143,1,{701:1,143:1},hCn),uZn.Fb=function(n){return k9(this,n)},uZn.Og=function(){return this.b},uZn.Pg=function(){return this.c},uZn.xe=function(){return this.e},uZn.Hb=function(){return pln(this.c)},uZn.Ib=function(){return"Layout Algorithm: "+this.c};var cNt,aNt=zW(N2n,"LayoutAlgorithmData",143);sDn(269,1,{},bu),zW(N2n,"LayoutAlgorithmData/Builder",269),sDn(1029,1,{536:1},wu),uZn.Kg=function(n){F$(n,207)&&!oM(gK(n.of((XYn(),z$t))))&&JGn(uG(n,27))},zW(N2n,"LayoutAlgorithmResolver",1029),sDn(233,1,{701:1,233:1},I2),uZn.Fb=function(n){return!!F$(n,233)&&m_(this.b,uG(n,233).b)},uZn.Og=function(){return this.a},uZn.Pg=function(){return this.b},uZn.xe=function(){return this.d},uZn.Hb=function(){return pln(this.b)},uZn.Ib=function(){return"Layout Type: "+this.b},zW(N2n,"LayoutCategoryData",233),sDn(357,1,{},du),zW(N2n,"LayoutCategoryData/Builder",357),sDn(879,1,{},ABn),zW(N2n,"LayoutMetaDataService",879),sDn(880,1,{},lQ),zW(N2n,"LayoutMetaDataService/Registry",880),sDn(487,1,{487:1},gu),zW(N2n,"LayoutMetaDataService/Registry/Triple",487),sDn(881,1,Dnt,lu),uZn.Qg=function(){return new sj},zW(N2n,"LayoutMetaDataService/lambda$0$Type",881),sDn(882,1,xnt,pu),uZn.Rg=function(n){return D$(uG(n,8))},zW(N2n,"LayoutMetaDataService/lambda$1$Type",882),sDn(891,1,Dnt,mu),uZn.Qg=function(){return new Zm},zW(N2n,"LayoutMetaDataService/lambda$10$Type",891),sDn(892,1,xnt,vu),uZn.Rg=function(n){return new Z_(uG(n,13))},zW(N2n,"LayoutMetaDataService/lambda$11$Type",892),sDn(893,1,Dnt,ku),uZn.Qg=function(){return new lS},zW(N2n,"LayoutMetaDataService/lambda$12$Type",893),sDn(894,1,xnt,yu),uZn.Rg=function(n){return oG(uG(n,67))},zW(N2n,"LayoutMetaDataService/lambda$13$Type",894),sDn(895,1,Dnt,Mu),uZn.Qg=function(){return new ek},zW(N2n,"LayoutMetaDataService/lambda$14$Type",895),sDn(896,1,xnt,Tu),uZn.Rg=function(n){return PZ(uG(n,49))},zW(N2n,"LayoutMetaDataService/lambda$15$Type",896),sDn(897,1,Dnt,ju),uZn.Qg=function(){return new XL},zW(N2n,"LayoutMetaDataService/lambda$16$Type",897),sDn(898,1,xnt,Eu),uZn.Rg=function(n){return g8(uG(n,49))},zW(N2n,"LayoutMetaDataService/lambda$17$Type",898),sDn(899,1,Dnt,Su),uZn.Qg=function(){return new rk},zW(N2n,"LayoutMetaDataService/lambda$18$Type",899),sDn(900,1,xnt,Pu),uZn.Rg=function(n){return aG(uG(n,157))},zW(N2n,"LayoutMetaDataService/lambda$19$Type",900),sDn(883,1,Dnt,Cu),uZn.Qg=function(){return new Uk},zW(N2n,"LayoutMetaDataService/lambda$2$Type",883),sDn(884,1,xnt,Iu),uZn.Rg=function(n){return new tj(uG(n,75))},zW(N2n,"LayoutMetaDataService/lambda$3$Type",884),sDn(885,1,Dnt,Ou),uZn.Qg=function(){return new Nk},zW(N2n,"LayoutMetaDataService/lambda$4$Type",885),sDn(886,1,xnt,Au),uZn.Rg=function(n){return new zU(uG(n,140))},zW(N2n,"LayoutMetaDataService/lambda$5$Type",886),sDn(887,1,Dnt,Lu),uZn.Qg=function(){return new Dk},zW(N2n,"LayoutMetaDataService/lambda$6$Type",887),sDn(888,1,xnt,Nu),uZn.Rg=function(n){return new VU(uG(n,107))},zW(N2n,"LayoutMetaDataService/lambda$7$Type",888),sDn(889,1,Dnt,$u),uZn.Qg=function(){return new Qu},zW(N2n,"LayoutMetaDataService/lambda$8$Type",889),sDn(890,1,xnt,Du),uZn.Rg=function(n){return new qen(uG(n,385))},zW(N2n,"LayoutMetaDataService/lambda$9$Type",890);var oNt,uNt,sNt,hNt,fNt,lNt=Iq(p3n,"IProperty");sDn(23,1,{34:1,701:1,23:1,149:1},tAn),uZn.Fd=function(n){return lD(this,uG(n,149))},uZn.Fb=function(n){return F$(n,23)?m_(this.f,uG(n,23).f):F$(n,149)&&m_(this.f,uG(n,149).Pg())},uZn.Sg=function(){var n;if(F$(this.b,4)){if(null==(n=Nvn(this.b)))throw hv(new kM(Bnt+this.f+"'. Make sure it's type is registered with the "+(vK($Ft),$Ft.k)+Knt));return n}return this.b},uZn.Og=function(){return this.d},uZn.Pg=function(){return this.f},uZn.xe=function(){return this.i},uZn.Hb=function(){return pln(this.f)},uZn.Ib=function(){return"Layout Option: "+this.f},zW(N2n,"LayoutOptionData",23),sDn(24,1,{},xu),zW(N2n,"LayoutOptionData/Builder",24),sDn(170,22,{3:1,34:1,22:1,170:1},jO);var bNt,wNt,dNt,gNt,pNt,mNt,vNt,kNt,yNt,MNt=_cn(N2n,"LayoutOptionData/Target",170,Oat,g9,cU);sDn(285,22,{3:1,34:1,22:1,285:1},EO);var TNt,jNt,ENt,SNt=_cn(N2n,"LayoutOptionData/Type",285,Oat,wrn,aU);sDn(116,1,{116:1},cN,gY,qZ),uZn.Fb=function(n){var t;return!(null==n||!F$(n,116))&&(t=uG(n,116),OJ(this.c,t.c)&&OJ(this.d,t.d)&&OJ(this.b,t.b)&&OJ(this.a,t.a))},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[this.c,this.d,this.b,this.a]))},uZn.Ib=function(){return"Rect[x="+this.c+",y="+this.d+",w="+this.b+",h="+this.a+"]"},uZn.a=0,uZn.b=0,uZn.c=0,uZn.d=0,zW(o6n,"ElkRectangle",116),sDn(8,1,{3:1,4:1,8:1,423:1},sj,O2,MO,eN),uZn.Fb=function(n){return uon(this,n)},uZn.Hb=function(){return OL(this.a)+QTn(OL(this.b))},uZn.cg=function(n){var t,e,i;for(e=0;e<n.length&&Qbn((s3(e,n.length),n.charCodeAt(e)),r6n);)++e;for(t=n.length;t>0&&Qbn((s3(t-1,n.length),n.charCodeAt(t-1)),c6n);)--t;if(e>=t)throw hv(new vM("The given string does not contain any numbers."));if(2!=(i=WGn((Knn(e,t,n.length),n.substr(e,t-e)),",|;|\r|\n")).length)throw hv(new vM("Exactly two numbers are expected, "+i.length+" were found."));try{this.a=YIn(KAn(i[0])),this.b=YIn(KAn(i[1]))}catch(r){throw F$(r=Ehn(r),130)?hv(new vM(a6n+r)):hv(r)}},uZn.Ib=function(){return"("+this.a+","+this.b+")"},uZn.a=0,uZn.b=0;var PNt=zW(o6n,"KVector",8);sDn(75,67,{3:1,4:1,20:1,31:1,56:1,16:1,67:1,15:1,75:1,423:1},Uk,tj,UR),uZn.Pc=function(){return ibn(this)},uZn.cg=function(n){var t,e,i,r,c;e=WGn(n,",|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n"),BY(this);try{for(t=0,r=0,i=0,c=0;t<e.length;)null!=e[t]&&KAn(e[t]).length>0&&(r%2==0?i=YIn(e[t]):c=YIn(e[t]),r>0&&r%2!=0&&aq(this,new MO(i,c)),++r),++t}catch(a){throw F$(a=Ehn(a),130)?hv(new vM("The given string does not match the expected format for vectors."+a)):hv(a)}},uZn.Ib=function(){var n,t,e;for(n=new lx("("),t=Fkn(this,0);t.b!=t.d.c;)JA(n,(e=uG(I6(t),8)).a+","+e.b),t.b!=t.d.c&&(n.a+="; ");return(n.a+=")",n).a};var CNt,INt,ONt,ANt,LNt,NNt,$Nt=zW(o6n,"KVectorChain",75);sDn(255,22,{3:1,34:1,22:1,255:1},TO);var DNt,xNt,RNt,KNt,FNt,_Nt,BNt,HNt,UNt,GNt,qNt,XNt,zNt,VNt,WNt,QNt,JNt,YNt,ZNt,n$t=_cn(Unt,"Alignment",255,Oat,Ynn,oU);sDn(991,1,K2n,$l),uZn.hf=function(n){ZUn(n)},zW(Unt,"BoxLayouterOptions",991),sDn(992,1,{},Ru),uZn.sf=function(){return new _u},uZn.tf=function(n){},zW(Unt,"BoxLayouterOptions/BoxFactory",992),sDn(298,22,{3:1,34:1,22:1,298:1},SO);var t$t,e$t,i$t,r$t,c$t,a$t,o$t,u$t,s$t,h$t,f$t,l$t,b$t,w$t,d$t,g$t,p$t,m$t,v$t,k$t,y$t,M$t,T$t,j$t,E$t,S$t,P$t,C$t,I$t,O$t,A$t,L$t,N$t,$$t,D$t,x$t,R$t,K$t,F$t,_$t,B$t,H$t,U$t,G$t,q$t,X$t,z$t,V$t,W$t,Q$t,J$t,Y$t,Z$t,nDt,tDt,eDt,iDt,rDt,cDt,aDt,oDt,uDt,sDt,hDt,fDt,lDt,bDt,wDt,dDt,gDt,pDt,mDt,vDt,kDt,yDt,MDt,TDt,jDt,EDt,SDt,PDt,CDt,IDt,ODt,ADt,LDt,NDt,$Dt,DDt,xDt,RDt,KDt,FDt,_Dt,BDt,HDt,UDt,GDt,qDt,XDt,zDt,VDt,WDt,QDt,JDt,YDt,ZDt,nxt,txt=_cn(Unt,"ContentAlignment",298,Oat,Znn,uU);sDn(699,1,K2n,Dl),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,Vnt),""),"Layout Algorithm"),"Select a specific layout algorithm."),(lAn(),kNt)),$ot),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,Wnt),""),"Resolved Layout Algorithm"),"Meta data associated with the selected algorithm."),vNt),aNt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,X8n),""),"Alignment"),"Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."),r$t),gNt),n$t),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,R3n),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,Qnt),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),vNt),$Nt),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,r9n),""),"Content Alignment"),"Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."),b$t),pNt),txt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,q8n),""),"Debug Mode"),"Whether additional debug information shall be generated."),(qx(),!1)),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,W8n),""),l3n),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),g$t),gNt),axt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,m8n),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),y$t),gNt),kxt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Xnt),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,b8n),""),"Hierarchy Handling"),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),S$t),gNt),Kxt),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,K3n),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),Q$t),vNt),Sbt),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,f4n),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,g9n),""),"interactive Layout"),"Whether the graph should be changeable interactively and by setting constraints"),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,w4n),""),"Omit Node Micro Layout"),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,l4n),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),hDt),gNt),mRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,b9n),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),vNt),PNt),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[fNt,uNt]))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,a4n),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),mNt),dot),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[oNt]))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,s4n),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,h4n),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,c9n),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),N$t),vNt),$Nt),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,u9n),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,s9n),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,Jnt),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),vNt),cUt),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,w9n),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),D$t),vNt),hbt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,U8n),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),wNt),cot),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[oNt,fNt,uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Ynt),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),dNt),fot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,Znt),""),"Child Area Width"),"The width of the area occupied by the laid out children of a node."),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,ntt),""),"Child Area Height"),"The height of the area occupied by the laid out children of a node."),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,k4n),""),Lnt),"Turns topdown layout on and off. If this option is enabled, hierarchical layout will be computed first for the root node and then for its children recursively. Layouts are then scaled down to fit the area provided by their parents. Graphs must follow a certain structure for topdown layout to work properly. {@link TopdownNodeTypes.PARALLEL_NODE} nodes must have children of type {@link TopdownNodeTypes.HIERARCHICAL_NODE} and must define {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} for their children. Furthermore they need to be laid out using an algorithm that is a {@link TopdownLayoutProvider}. Hierarchical nodes can also be parents of other hierarchical nodes and can optionally use a {@link TopdownSizeApproximator} to dynamically set sizes during topdown layout. In this case {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} should be set on the node itself rather than the parent. The values are then used by the size approximator as base values. Hierarchical nodes require the layout option {@link nodeSize.fixedGraphSize} to be true to prevent the algorithm used there from resizing the hierarchical node. This option is not supported if 'Hierarchy Handling' is set to 'INCLUDE_CHILDREN'"),!1),wNt),cot),ggn(hNt)))),H4(n,k4n,j4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,ttt),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,ett),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),xwn(100)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,itt),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,rtt),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),xwn(4e3)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,ctt),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),xwn(400)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,att),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,ott),""),"Validate Graph"),"Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,utt),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,stt),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,znt),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),u$t),gNt),SKt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,A8n),v8n),"Comment Comment Spacing"),"Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,L8n),v8n),"Comment Node Spacing"),"Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,D3n),v8n),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,N8n),v8n),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,u4n),v8n),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,$8n),v8n),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,D8n),v8n),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,K8n),v8n),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,x8n),v8n),"Horizontal spacing between Label and Port"),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,R8n),v8n),"Vertical spacing between Label and Port"),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,o4n),v8n),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,F8n),v8n),"Node Self Loop Spacing"),"Spacing to be preserved between a node and its self loops."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,_8n),v8n),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),dNt),fot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,B8n),v8n),"Individual Spacing"),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),vNt),AKt),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[oNt,fNt,uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,d9n),v8n),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),KDt),vNt),hbt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,l9n),dtt),"Layout Partition"),"Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."),mNt),dot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),H4(n,l9n,f9n,nDt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,f9n),dtt),"Layout Partitioning"),"Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."),Y$t),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Q8n),gtt),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),R$t),vNt),Sbt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,m4n),gtt),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),F$t),pNt),eRt),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Z8n),ptt),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),eDt),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,n9n),ptt),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,t9n),ptt),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,e9n),ptt),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,i9n),ptt),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,p4n),mtt),"Node Size Constraints"),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),B$t),pNt),sKt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,g4n),mtt),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),X$t),pNt),wKt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,x4n),mtt),"Node Size Minimum"),"The minimal size to which a node can be reduced."),G$t),vNt),PNt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,d4n),mtt),"Fixed Graph Size"),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,a9n),I8n),"Edge Label Placement"),"Gives a hint on where to put edge labels."),v$t),gNt),lxt),ggn(uNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,b4n),I8n),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),wNt),cot),ggn(uNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,htt),"font"),"Font Name"),"Font name used for a label."),kNt),$ot),ggn(uNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,ftt),"font"),"Font Size"),"Font size used for a label."),mNt),dot),ggn(uNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,h9n),vtt),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),vNt),PNt),ggn(fNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,o9n),vtt),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),mNt),dot),ggn(fNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,G8n),vtt),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),pDt),gNt),YRt),ggn(fNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(zT(new xu,H8n),vtt),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),dNt),fot),ggn(fNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,v4n),ktt),"Port Label Placement"),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),wDt),pNt),BRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,J8n),ktt),"Port Labels Next to Port"),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,Y8n),ktt),"Treat Port Labels as Group"),"If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."),!0),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,y4n),ytt),"Topdown Scale Factor"),"The scaling factor to be applied to the nodes laid out within the node in recursive topdown layout. The difference to 'Scale Factor' is that the node itself is not scaled. This value has to be set on hierarchical nodes."),1),dNt),fot),ggn(hNt)))),H4(n,y4n,j4n,zDt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,ltt),ytt),"Topdown Size Approximator"),"The size approximator to be used to set sizes of hierarchical nodes during topdown layout. The default value is null, which results in nodes keeping whatever size is defined for them e.g. through parent parallel node or by manually setting the size."),null),gNt),jKt),ggn(sNt)))),H4(n,ltt,j4n,WDt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,M4n),ytt),"Topdown Hierarchical Node Width"),"The fixed size of a hierarchical node when using topdown layout. If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself."),150),dNt),fot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),H4(n,M4n,j4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,T4n),ytt),"Topdown Hierarchical Node Aspect Ratio"),"The fixed aspect ratio of a hierarchical node when using topdown layout. Default is 1/sqrt(2). If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself."),1.414),dNt),fot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),H4(n,T4n,j4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,j4n),ytt),"Topdown Node Type"),"The different node types used for topdown layout. If the node type is set to {@link TopdownNodeTypes.PARALLEL_NODE} the algorithm must be set to a {@link TopdownLayoutProvider} such as {@link TopdownPacking}. The {@link nodeSize.fixedGraphSize} option is technically only required for hierarchical nodes."),null),gNt),mKt),ggn(sNt)))),H4(n,j4n,d4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,btt),ytt),"Topdown Scale Cap"),"Determines the upper limit for the topdown scale factor. The default value is 1.0 which ensures that nested children never end up appearing larger than their parents in terms of unit sizes such as the font size. If the limit is larger, nodes will fully utilize the available space, but it is counteriniuitive for inner nodes to have a larger scale than outer nodes."),1),dNt),fot),ggn(hNt)))),H4(n,btt,j4n,qDt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,z8n),Mtt),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,V8n),Mtt),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),wNt),cot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,x3n),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),dNt),fot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(zT(new xu,wtt),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),T$t),gNt),Lxt),ggn(oNt)))),sP(n,new I2(BT(UT(HT(new du,S0n),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),sP(n,new I2(BT(UT(HT(new du,"org.eclipse.elk.orthogonal"),"Orthogonal"),'Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia \'86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.'))),sP(n,new I2(BT(UT(HT(new du,c4n),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),sP(n,new I2(BT(UT(HT(new du,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),sP(n,new I2(BT(UT(HT(new du,a7n),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),sP(n,new I2(BT(UT(HT(new du,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),sP(n,new I2(BT(UT(HT(new du,x7n),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),kHn((new xl,n)),ZUn((new $l,n)),A_n((new Rl,n))},zW(Unt,"CoreOptions",699),sDn(88,22,{3:1,34:1,22:1,88:1},PO);var ext,ixt,rxt,cxt,axt=_cn(Unt,l3n,88,Oat,H8,sU);sDn(278,22,{3:1,34:1,22:1,278:1},CO);var oxt,uxt,sxt,hxt,fxt,lxt=_cn(Unt,"EdgeLabelPlacement",278,Oat,y3,hU);sDn(223,22,{3:1,34:1,22:1,223:1},IO);var bxt,wxt,dxt,gxt,pxt,mxt,vxt,kxt=_cn(Unt,"EdgeRouting",223,Oat,u5,fU);sDn(321,22,{3:1,34:1,22:1,321:1},OO);var yxt,Mxt,Txt,jxt,Ext,Sxt,Pxt,Cxt,Ixt,Oxt,Axt,Lxt=_cn(Unt,"EdgeType",321,Oat,Jnn,lU);sDn(989,1,K2n,xl),uZn.hf=function(n){kHn(n)},zW(Unt,"FixedLayouterOptions",989),sDn(990,1,{},Ku),uZn.sf=function(){return new Wu},uZn.tf=function(n){},zW(Unt,"FixedLayouterOptions/FixedFactory",990),sDn(346,22,{3:1,34:1,22:1,346:1},AO);var Nxt,$xt,Dxt,xxt,Rxt,Kxt=_cn(Unt,"HierarchyHandling",346,Oat,v3,bU);sDn(291,22,{3:1,34:1,22:1,291:1},LO);var Fxt,_xt,Bxt,Hxt,Uxt,Gxt,qxt,Xxt,zxt,Vxt,Wxt=_cn(Unt,"LabelSide",291,Oat,o5,wU);sDn(95,22,{3:1,34:1,22:1,95:1},NO);var Qxt,Jxt,Yxt,Zxt,nRt,tRt,eRt=_cn(Unt,"NodeLabelPlacement",95,Oat,bcn,dU);sDn(256,22,{3:1,34:1,22:1,256:1},$O);var iRt,rRt,cRt,aRt,oRt,uRt,sRt,hRt=_cn(Unt,"PortAlignment",256,Oat,p9,gU);sDn(101,22,{3:1,34:1,22:1,101:1},DO);var fRt,lRt,bRt,wRt,dRt,gRt,pRt,mRt=_cn(Unt,"PortConstraints",101,Oat,Qnn,pU);sDn(279,22,{3:1,34:1,22:1,279:1},xO);var vRt,kRt,yRt,MRt,TRt,jRt,ERt,SRt,PRt,CRt,IRt,ORt,ARt,LRt,NRt,$Rt,DRt,xRt,RRt,KRt,FRt,_Rt,BRt=_cn(Unt,"PortLabelPlacement",279,Oat,Wnn,mU);sDn(64,22,{3:1,34:1,22:1,64:1},RO);var HRt,URt,GRt,qRt,XRt,zRt,VRt,WRt,QRt,JRt,YRt=_cn(Unt,"PortSide",64,Oat,U8,vU);sDn(993,1,K2n,Rl),uZn.hf=function(n){A_n(n)},zW(Unt,"RandomLayouterOptions",993),sDn(994,1,{},Fu),uZn.sf=function(){return new Xu},uZn.tf=function(n){},zW(Unt,"RandomLayouterOptions/RandomFactory",994),sDn(386,22,{3:1,34:1,22:1,386:1},KO);var ZRt,nKt,tKt,eKt,iKt,rKt,cKt,aKt,oKt,uKt,sKt=_cn(Unt,"SizeConstraint",386,Oat,a5,kU);sDn(264,22,{3:1,34:1,22:1,264:1},FO);var hKt,fKt,lKt,bKt,wKt=_cn(Unt,"SizeOptions",264,Oat,Man,yU);sDn(280,22,{3:1,34:1,22:1,280:1},_O);var dKt,gKt,pKt,mKt=_cn(Unt,"TopdownNodeTypes",280,Oat,M3,MU);sDn(347,22,Ett);var vKt,kKt,yKt,MKt,TKt,jKt=_cn(Unt,"TopdownSizeApproximator",347,Oat,I1,jU);sDn(987,347,Ett,Pq),uZn.Tg=function(n){return sMn(n)},_cn(Unt,"TopdownSizeApproximator/1",987,jKt,null,null),sDn(988,347,Ett,gV),uZn.Tg=function(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(t=uG(zDn(n,(XYn(),yDt)),143),gj(),aKn(p=new Bk,n),m=new Ym,a=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));a.e!=a.i.gc();)r=uG(Zkn(a),27),GRn(b=new Bk,p),aKn(b,r),k=sMn(r),vN(b,e.Math.max(r.g,k.a),e.Math.max(r.f,k.b)),VAn(m.f,r,b);for(c=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));c.e!=c.i.gc();)for(s=new DD((!(r=uG(Zkn(c),27)).e&&(r.e=new f_(aFt,r,7,4)),r.e));s.e!=s.i.gc();)u=uG(Zkn(s),74),d=uG(DA(FX(m.f,r)),27),g=uG(cQ(m,zrn((!u.c&&(u.c=new f_(cFt,u,5,8)),u.c),0)),27),ttn((!(w=new es).b&&(w.b=new f_(cFt,w,4,7)),w.b),d),ttn((!w.c&&(w.c=new f_(cFt,w,5,8)),w.c),g),ARn(w,R0(d)),aKn(w,u);h=uG(A1(t.f),205);try{h.rf(p,new Zu),WQ(t.f,h)}catch(y){throw F$(y=Ehn(y),103),hv(y)}return vnn(p,h$t)||vnn(p,s$t)||VJn(p),o=uM(pK(zDn(p,h$t)))/uM(pK(zDn(p,s$t))),i=uM(pK(zDn(p,BDt)))*e.Math.sqrt((!p.a&&(p.a=new fV(bFt,p,10,11)),p.a).i),l=(v=uG(zDn(p,W$t),107)).b+v.c+1,f=v.d+v.a+1,new MO(e.Math.max(l,i),e.Math.max(f,i/o))},_cn(Unt,"TopdownSizeApproximator/2",988,jKt,null,null),sDn(344,1,{871:1},fy),uZn.Ug=function(n,t){return dCn(this,n,t)},uZn.Vg=function(){POn(this)},uZn.Wg=function(){return this.q},uZn.Xg=function(){return this.f?SZ(this.f):null},uZn.Yg=function(){return SZ(this.a)},uZn.Zg=function(){return this.p},uZn.$g=function(){return!1},uZn._g=function(){return this.n},uZn.ah=function(){return null!=this.p&&!this.b},uZn.bh=function(n){var t;this.n&&(t=n,kD(this.f,t))},uZn.dh=function(n,t){var e,i;this.n&&n&&n4(this,(i=uUn(e=new DW,n),_Wn(e),i),(Eln(),CKt))},uZn.eh=function(n){var t;return this.b?null:(t=irn(this,this.g),aq(this.a,t),t.i=this,this.d=n,t)},uZn.fh=function(n){n>0&&!this.b&&Ban(this,n)},uZn.b=!1,uZn.c=0,uZn.d=-1,uZn.e=null,uZn.f=null,uZn.g=-1,uZn.j=!1,uZn.k=!1,uZn.n=!1,uZn.o=0,uZn.q=0,uZn.r=0,zW(p9n,"BasicProgressMonitor",344),sDn(717,205,M3n,_u),uZn.rf=function(n,t){XGn(n,t)},zW(p9n,"BoxLayoutProvider",717),sDn(983,1,b2n,qp),uZn.Ne=function(n,t){return tKn(this,uG(n,27),uG(t,27))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},uZn.a=!1,zW(p9n,"BoxLayoutProvider/1",983),sDn(163,1,{163:1},Jrn,nK),uZn.Ib=function(){return this.c?zBn(this.c):vIn(this.b)},zW(p9n,"BoxLayoutProvider/Group",163),sDn(320,22,{3:1,34:1,22:1,320:1},HO);var EKt,SKt=_cn(p9n,"BoxLayoutProvider/PackingMode",320,Oat,s5,EU);sDn(984,1,b2n,Bu),uZn.Ne=function(n,t){return rZ(uG(n,163),uG(t,163))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(p9n,"BoxLayoutProvider/lambda$0$Type",984),sDn(985,1,b2n,Hu),uZn.Ne=function(n,t){return GY(uG(n,163),uG(t,163))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(p9n,"BoxLayoutProvider/lambda$1$Type",985),sDn(986,1,b2n,Uu),uZn.Ne=function(n,t){return qY(uG(n,163),uG(t,163))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(p9n,"BoxLayoutProvider/lambda$2$Type",986),sDn(1384,1,{845:1},Gu),uZn.Mg=function(n,t){return ZS(),!F$(t,167)||Zj((Whn(),uG(n,167)),t)},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type",1384),sDn(1385,1,QZn,Xp),uZn.Cd=function(n){hbn(this.a,uG(n,149))},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type",1385),sDn(1386,1,QZn,zu),uZn.Cd=function(n){uG(n,96),ZS()},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type",1386),sDn(1390,1,QZn,zp),uZn.Cd=function(n){_on(this.a,uG(n,96))},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type",1390),sDn(1388,1,y1n,UO),uZn.Mb=function(n){return oln(this.a,this.b,uG(n,149))},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type",1388),sDn(1387,1,y1n,GO),uZn.Mb=function(n){return PR(this.a,this.b,uG(n,845))},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type",1387),sDn(1389,1,QZn,qO),uZn.Cd=function(n){iV(this.a,this.b,uG(n,149))},zW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type",1389),sDn(947,1,{},Vu),uZn.Kb=function(n){return oN(n)},uZn.Fb=function(n){return this===n},zW(p9n,"ElkUtil/lambda$0$Type",947),sDn(948,1,QZn,XO),uZn.Cd=function(n){JNn(this.a,this.b,uG(n,74))},uZn.a=0,uZn.b=0,zW(p9n,"ElkUtil/lambda$1$Type",948),sDn(949,1,QZn,zO),uZn.Cd=function(n){tM(this.a,this.b,uG(n,166))},uZn.a=0,uZn.b=0,zW(p9n,"ElkUtil/lambda$2$Type",949),sDn(950,1,QZn,VO),uZn.Cd=function(n){UN(this.a,this.b,uG(n,135))},uZn.a=0,uZn.b=0,zW(p9n,"ElkUtil/lambda$3$Type",950),sDn(951,1,QZn,Vp),uZn.Cd=function(n){Lq(this.a,uG(n,377))},zW(p9n,"ElkUtil/lambda$4$Type",951),sDn(325,1,{34:1,325:1},Jm),uZn.Fd=function(n){return wD(this,uG(n,242))},uZn.Fb=function(n){var t;return!!F$(n,325)&&(t=uG(n,325),this.a==t.a)},uZn.Hb=function(){return t0(this.a)},uZn.Ib=function(){return this.a+" (exclusive)"},uZn.a=0,zW(p9n,"ExclusiveBounds/ExclusiveLowerBound",325),sDn(1119,205,M3n,Wu),uZn.rf=function(n,t){var i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k,y,M,T,j;for(t.Ug("Fixed Layout",1),a=uG(zDn(n,(XYn(),k$t)),223),b=0,w=0,m=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));m.e!=m.i.gc();){for(g=uG(Zkn(m),27),(j=uG(zDn(g,(Iln(),Cxt)),8))&&(kN(g,j.a,j.b),uG(zDn(g,Txt),181).Hc((Qmn(),VRt))&&(d=uG(zDn(g,Ext),8)).a>0&&d.b>0&&ZQn(g,d.a,d.b,!0,!0)),b=e.Math.max(b,g.i+g.g),w=e.Math.max(w,g.j+g.f),f=new DD((!g.n&&(g.n=new fV(lFt,g,1,7)),g.n));f.e!=f.i.gc();)u=uG(Zkn(f),135),(j=uG(zDn(u,Cxt),8))&&kN(u,j.a,j.b),b=e.Math.max(b,g.i+u.i+u.g),w=e.Math.max(w,g.j+u.j+u.f);for(y=new DD((!g.c&&(g.c=new fV(wFt,g,9,9)),g.c));y.e!=y.i.gc();)for(k=uG(Zkn(y),123),(j=uG(zDn(k,Cxt),8))&&kN(k,j.a,j.b),M=g.i+k.i,T=g.j+k.j,b=e.Math.max(b,M+k.g),w=e.Math.max(w,T+k.f),s=new DD((!k.n&&(k.n=new fV(lFt,k,1,7)),k.n));s.e!=s.i.gc();)u=uG(Zkn(s),135),(j=uG(zDn(u,Cxt),8))&&kN(u,j.a,j.b),b=e.Math.max(b,M+u.i+u.g),w=e.Math.max(w,T+u.j+u.f);for(c=new Fz(ix(eRn(g).a.Kc(),new h));hDn(c);)l=iJn(i=uG(N9(c),74)),b=e.Math.max(b,l.a),w=e.Math.max(w,l.b);for(r=new Fz(ix(tRn(g).a.Kc(),new h));hDn(r);)R0(bIn(i=uG(N9(r),74)))!=n&&(l=iJn(i),b=e.Math.max(b,l.a),w=e.Math.max(w,l.b))}if(a==(_gn(),uxt))for(p=new DD((!n.a&&(n.a=new fV(bFt,n,10,11)),n.a));p.e!=p.i.gc();)for(r=new Fz(ix(eRn(g=uG(Zkn(p),27)).a.Kc(),new h));hDn(r);)0==(o=bGn(i=uG(N9(r),74))).b?Myn(i,L$t,null):Myn(i,L$t,o);oM(gK(zDn(n,(Iln(),jxt))))||ZQn(n,b+(v=uG(zDn(n,Sxt),107)).b+v.c,w+v.d+v.a,!0,!0),t.Vg()},zW(p9n,"FixedLayoutProvider",1119),sDn(385,137,{3:1,423:1,385:1,96:1,137:1},Qu,qen),uZn.cg=function(n){var t,e,i,r,c,a,o;if(n)try{for(a=WGn(n,";,;"),r=0,c=(i=a).length;r<c;++r){if(t=WGn(i[r],"\\:"),!(e=DVn(aan(),t[0])))throw hv(new vM("Invalid option id: "+t[0]));if(null==(o=vVn(e,t[1])))throw hv(new vM("Invalid option value: "+t[1]));null==o?(!this.q&&(this.q=new Ym),u7(this.q,e)):(!this.q&&(this.q=new Ym),vJ(this.q,e,o))}}catch(u){throw F$(u=Ehn(u),103)?hv(new tbn(u)):hv(u)}},uZn.Ib=function(){return mK(l8(YJ((this.q?this.q:(hZ(),hZ(),Vot)).vc().Oc(),new Ju),gen(new fG,new Y,new q,new X,Uhn(cT(Rut,1),p1n,108,0,[]))))};var PKt,CKt,IKt,OKt,AKt=zW(p9n,"IndividualSpacings",385);sDn(982,1,{},Ju),uZn.Kb=function(n){return cZ(uG(n,44))},zW(p9n,"IndividualSpacings/lambda$0$Type",982),sDn(718,1,{},LX),uZn.c=0,zW(p9n,"InstancePool",718),sDn(1835,1,{},Yu),zW(p9n,"LoggedGraph",1835),sDn(415,22,{3:1,34:1,22:1,415:1},uA);var LKt,NKt,$Kt,DKt=_cn(p9n,"LoggedGraph/Type",415,Oat,h5,SU);sDn(1063,1,{871:1},Zu),uZn.Ug=function(n,t){return!1},uZn.Vg=function(){},uZn.Wg=function(){return 0},uZn.Xg=function(){return null},uZn.Yg=function(){return null},uZn.Zg=function(){return null},uZn.$g=function(){return!1},uZn._g=function(){return!1},uZn.ah=function(){return!1},uZn.bh=function(n){},uZn.dh=function(n,t){},uZn.eh=function(n){return this},uZn.fh=function(n){},zW(p9n,"NullElkProgressMonitor",1063),sDn(42,1,{20:1,42:1},WO),uZn.Jc=function(n){z8(this,n)},uZn.Fb=function(n){var t,e,i;return!!F$(n,42)&&(e=uG(n,42),t=null==this.a?null==e.a:udn(this.a,e.a),i=null==this.b?null==e.b:udn(this.b,e.b),t&&i)},uZn.Hb=function(){var n,t,e;return n=-65536&(t=null==this.a?0:Hon(this.a)),t&D1n^(-65536&(e=null==this.b?0:Hon(this.b)))>>16&D1n|n^(e&D1n)<<16},uZn.Kc=function(){return new Wp(this)},uZn.Ib=function(){return null==this.a&&null==this.b?"pair(null,null)":null==this.a?"pair(null,"+cpn(this.b)+")":null==this.b?"pair("+cpn(this.a)+",null)":"pair("+cpn(this.a)+","+cpn(this.b)+")"},zW(p9n,"Pair",42),sDn(995,1,$Zn,Wp),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return!this.c&&(!this.b&&null!=this.a.a||null!=this.a.b)},uZn.Pb=function(){if(!this.c&&!this.b&&null!=this.a.a)return this.b=!0,this.a.a;if(!this.c&&null!=this.a.b)return this.c=!0,this.a.b;throw hv(new Bv)},uZn.Qb=function(){throw this.c&&null!=this.a.b?this.a.b=null:this.b&&null!=this.a.a&&(this.a.a=null),hv(new xv)},uZn.b=!1,uZn.c=!1,zW(p9n,"Pair/1",995),sDn(455,1,{455:1},vY),uZn.Fb=function(n){return OJ(this.a,uG(n,455).a)&&OJ(this.c,uG(n,455).c)&&OJ(this.d,uG(n,455).d)&&OJ(this.b,uG(n,455).b)},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[this.a,this.c,this.d,this.b]))},uZn.Ib=function(){return"("+this.a+TZn+this.c+TZn+this.d+TZn+this.b+")"},zW(p9n,"Quadruple",455),sDn(1108,205,M3n,Xu),uZn.rf=function(n,t){var e;t.Ug("Random Layout",1),0!=(!n.a&&(n.a=new fV(bFt,n,10,11)),n.a).i?(vQn(n,(e=uG(zDn(n,(Wmn(),XRt)),17))&&0!=e.a?new v8(e.a):new Upn,sM(pK(zDn(n,URt))),sM(pK(zDn(n,zRt))),uG(zDn(n,GRt),107)),t.Vg()):t.Vg()},zW(p9n,"RandomLayoutProvider",1108),sDn(240,1,{240:1},LU),uZn.Fb=function(n){return OJ(this.a,uG(n,240).a)&&OJ(this.b,uG(n,240).b)&&OJ(this.c,uG(n,240).c)},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[this.a,this.b,this.c]))},uZn.Ib=function(){return"("+this.a+TZn+this.b+TZn+this.c+")"},zW(p9n,"Triple",240),sDn(562,1,{}),uZn.Lf=function(){return new MO(this.f.i,this.f.j)},uZn.of=function(n){return QZ(n,(XYn(),uDt))?zDn(this.f,$Kt):zDn(this.f,n)},uZn.Mf=function(){return new MO(this.f.g,this.f.f)},uZn.Nf=function(){return this.g},uZn.pf=function(n){return vnn(this.f,n)},uZn.Of=function(n){ycn(this.f,n.a),Mcn(this.f,n.b)},uZn.Pf=function(n){kcn(this.f,n.a),vcn(this.f,n.b)},uZn.Qf=function(n){this.g=n},uZn.g=0,zW(Ctt,"ElkGraphAdapters/AbstractElkGraphElementAdapter",562),sDn(563,1,{853:1},Qp),uZn.Rf=function(){var n,t;if(!this.b)for(this.b=o6(xJ(this.a).i),t=new DD(xJ(this.a));t.e!=t.i.gc();)n=uG(Zkn(t),135),kD(this.b,new Wy(n));return this.b},uZn.b=null,zW(Ctt,"ElkGraphAdapters/ElkEdgeAdapter",563),sDn(289,562,{},Vy),uZn.Sf=function(){return FTn(this)},uZn.a=null,zW(Ctt,"ElkGraphAdapters/ElkGraphAdapter",289),sDn(640,562,{187:1},Wy),zW(Ctt,"ElkGraphAdapters/ElkLabelAdapter",640),sDn(639,562,{695:1},Wx),uZn.Rf=function(){return RTn(this)},uZn.Vf=function(){var n;return!(n=uG(zDn(this.f,(XYn(),$$t)),140))&&(n=new Nk),n},uZn.Xf=function(){return KTn(this)},uZn.Zf=function(n){var t;t=new zU(n),Myn(this.f,(XYn(),$$t),t)},uZn.$f=function(n){Myn(this.f,(XYn(),W$t),new VU(n))},uZn.Tf=function(){return this.d},uZn.Uf=function(){var n,t;if(!this.a)for(this.a=new Zm,t=new Fz(ix(tRn(uG(this.f,27)).a.Kc(),new h));hDn(t);)n=uG(N9(t),74),kD(this.a,new Qp(n));return this.a},uZn.Wf=function(){var n,t;if(!this.c)for(this.c=new Zm,t=new Fz(ix(eRn(uG(this.f,27)).a.Kc(),new h));hDn(t);)n=uG(N9(t),74),kD(this.c,new Qp(n));return this.c},uZn.Yf=function(){return 0!=wZ(uG(this.f,27)).i||oM(gK(uG(this.f,27).of((XYn(),C$t))))},uZn._f=function(){Xen(this,(vP(),NKt))},uZn.a=null,uZn.b=null,uZn.c=null,uZn.d=null,uZn.e=null,zW(Ctt,"ElkGraphAdapters/ElkNodeAdapter",639),sDn(1284,562,{852:1},Jp),uZn.Rf=function(){return rjn(this)},uZn.Uf=function(){var n,t;if(!this.a)for(this.a=iR(uG(this.f,123).hh().i),t=new DD(uG(this.f,123).hh());t.e!=t.i.gc();)n=uG(Zkn(t),74),kD(this.a,new Qp(n));return this.a},uZn.Wf=function(){var n,t;if(!this.c)for(this.c=iR(uG(this.f,123).ih().i),t=new DD(uG(this.f,123).ih());t.e!=t.i.gc();)n=uG(Zkn(t),74),kD(this.c,new Qp(n));return this.c},uZn.ag=function(){return uG(uG(this.f,123).of((XYn(),gDt)),64)},uZn.bg=function(){var n,t,e,i,r,c,a;for(i=h0(uG(this.f,123)),e=new DD(uG(this.f,123).ih());e.e!=e.i.gc();)for(a=new DD((!(n=uG(Zkn(e),74)).c&&(n.c=new f_(cFt,n,5,8)),n.c));a.e!=a.i.gc();){if(Ern(lCn(c=uG(Zkn(a),84)),i))return!0;if(lCn(c)==i&&oM(gK(zDn(n,(XYn(),I$t)))))return!0}for(t=new DD(uG(this.f,123).hh());t.e!=t.i.gc();)for(r=new DD((!(n=uG(Zkn(t),74)).b&&(n.b=new f_(cFt,n,4,7)),n.b));r.e!=r.i.gc();)if(Ern(lCn(uG(Zkn(r),84)),i))return!0;return!1},uZn.a=null,uZn.b=null,uZn.c=null,zW(Ctt,"ElkGraphAdapters/ElkPortAdapter",1284),sDn(1285,1,b2n,qu),uZn.Ne=function(n,t){return XBn(uG(n,123),uG(t,123))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(Ctt,"ElkGraphAdapters/PortComparator",1285);var xKt,RKt,KKt,FKt,_Kt,BKt,HKt,UKt,GKt,qKt,XKt,zKt,VKt,WKt,QKt,JKt,YKt,ZKt,nFt=Iq(Itt,"EObject"),tFt=Iq(Ott,Att),eFt=Iq(Ott,Ltt),iFt=Iq(Ott,Ntt),rFt=Iq(Ott,"ElkShape"),cFt=Iq(Ott,$tt),aFt=Iq(Ott,Dtt),oFt=Iq(Ott,xtt),uFt=Iq(Itt,Rtt),sFt=Iq(Itt,"EFactory"),hFt=Iq(Itt,Ktt),fFt=Iq(Itt,"EPackage"),lFt=Iq(Ott,Ftt),bFt=Iq(Ott,_tt),wFt=Iq(Ott,Btt);sDn(93,1,Htt),uZn.th=function(){return this.uh(),null},uZn.uh=function(){return null},uZn.vh=function(){return this.uh(),!1},uZn.wh=function(){return!1},uZn.xh=function(n){Msn(this,n)},zW(Utt,"BasicNotifierImpl",93),sDn(99,93,Jtt),uZn.Yh=function(){return uN(this)},uZn.yh=function(n,t){return n},uZn.zh=function(){throw hv(new Kv)},uZn.Ah=function(n){var t;return t=lMn(uG(ern(this.Dh(),this.Fh()),19)),this.Ph().Th(this,t.n,t.f,n)},uZn.Bh=function(n,t){throw hv(new Kv)},uZn.Ch=function(n,t,e){return DUn(this,n,t,e)},uZn.Dh=function(){var n;return this.zh()&&(n=this.zh().Nk())?n:this.ii()},uZn.Eh=function(){return J$n(this)},uZn.Fh=function(){throw hv(new Kv)},uZn.Gh=function(){var n,t;return!(t=this.$h().Ok())&&this.zh().Tk((jP(),t=null==(n=$1(eqn(this.Dh())))?tBt:new zx(this,n))),t},uZn.Hh=function(n,t){return n},uZn.Ih=function(n){return n.pk()?n.Lj():emn(this.Dh(),n)},uZn.Jh=function(){var n;return(n=this.zh())?n.Qk():null},uZn.Kh=function(){return this.zh()?this.zh().Nk():null},uZn.Lh=function(n,t,e){return Dyn(this,n,t,e)},uZn.Mh=function(n){return vtn(this,n)},uZn.Nh=function(n,t){return U9(this,n,t)},uZn.Oh=function(){var n;return!!(n=this.zh())&&n.Rk()},uZn.Ph=function(){throw hv(new Kv)},uZn.Qh=function(){return Kvn(this)},uZn.Rh=function(n,t,e,i){return kyn(this,n,t,i)},uZn.Sh=function(n,t,e){return uG(ern(this.Dh(),t),69).wk().zk(this,this.hi(),t-this.ji(),n,e)},uZn.Th=function(n,t,e,i){return O1(this,n,t,i)},uZn.Uh=function(n,t,e){return uG(ern(this.Dh(),t),69).wk().Ak(this,this.hi(),t-this.ji(),n,e)},uZn.Vh=function(){return!!this.zh()&&!!this.zh().Pk()},uZn.Wh=function(n){return Wkn(this,n)},uZn.Xh=function(n){return M0(this,n)},uZn.Zh=function(n){return jWn(this,n)},uZn.$h=function(){throw hv(new Kv)},uZn._h=function(){return this.zh()?this.zh().Pk():null},uZn.ai=function(){return Kvn(this)},uZn.bi=function(n,t){sLn(this,n,t)},uZn.ci=function(n){this.$h().Sk(n)},uZn.di=function(n){this.$h().Vk(n)},uZn.ei=function(n){this.$h().Uk(n)},uZn.fi=function(n,t){var e,i,r,c;return(c=this.Jh())&&n&&(t=Nyn(c.El(),this,t),c.Il(this)),(i=this.Ph())&&(PHn(this,this.Ph(),this.Fh()).Bb&P0n?(r=i.Qh())&&(n?!c&&r.Il(this):r.Hl(this)):(t=(e=this.Fh())>=0?this.Ah(t):this.Ph().Th(this,-1-e,null,t),t=this.Ch(null,-1,t))),this.di(n),t},uZn.gi=function(n){var t,e,i,r,c,a,o;if((c=emn(e=this.Dh(),n))>=(t=this.ji()))return uG(n,69).wk().Dk(this,this.hi(),c-t);if(c<=-1){if(!(a=iVn((gAn(),kBt),e,n)))throw hv(new vM(Gtt+n.xe()+ztt));if(PP(),uG(a,69).xk()||(a=_3(Nen(kBt,a))),r=uG((i=this.Ih(a))>=0?this.Lh(i,!0,!0):YNn(this,a,!0),160),(o=a.Ik())>1||-1==o)return uG(uG(r,220).Sl(n,!1),79)}else if(n.Jk())return uG((i=this.Ih(n))>=0?this.Lh(i,!1,!0):YNn(this,n,!1),79);return new jA(this,n)},uZn.hi=function(){return Wen(this)},uZn.ii=function(){return(tQ(),M_t).S},uZn.ji=function(){return iQ(this.ii())},uZn.ki=function(n){oAn(this,n)},uZn.Ib=function(){return vxn(this)},zW(Ytt,"BasicEObjectImpl",99),sDn(119,99,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1}),uZn.li=function(n){return Ven(this)[n]},uZn.mi=function(n,t){uQ(Ven(this),n,t)},uZn.ni=function(n){uQ(Ven(this),n,null)},uZn.th=function(){return uG(Lsn(this,4),129)},uZn.uh=function(){throw hv(new Kv)},uZn.vh=function(){return!!(4&this.Db)},uZn.zh=function(){throw hv(new Kv)},uZn.oi=function(n){Dvn(this,2,n)},uZn.Bh=function(n,t){this.Db=t<<16|255&this.Db,this.oi(n)},uZn.Dh=function(){return e1(this)},uZn.Fh=function(){return this.Db>>16},uZn.Gh=function(){var n;return jP(),null==(n=$1(eqn(uG(Lsn(this,16),29)||this.ii())))?tBt:new zx(this,n)},uZn.wh=function(){return!(1&this.Db)},uZn.Jh=function(){return uG(Lsn(this,128),2034)},uZn.Kh=function(){return uG(Lsn(this,16),29)},uZn.Oh=function(){return!!(32&this.Db)},uZn.Ph=function(){return uG(Lsn(this,2),54)},uZn.Vh=function(){return!!(64&this.Db)},uZn.$h=function(){throw hv(new Kv)},uZn._h=function(){return uG(Lsn(this,64),288)},uZn.ci=function(n){Dvn(this,16,n)},uZn.di=function(n){Dvn(this,128,n)},uZn.ei=function(n){Dvn(this,64,n)},uZn.hi=function(){return $vn(this)},uZn.Db=0,zW(Ytt,"MinimalEObjectImpl",119),sDn(120,119,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.oi=function(n){this.Cb=n},uZn.Ph=function(){return this.Cb},zW(Ytt,"MinimalEObjectImpl/Container",120),sDn(2083,120,{110:1,342:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.Lh=function(n,t,e){return ajn(this,n,t,e)},uZn.Uh=function(n,t,e){return BIn(this,n,t,e)},uZn.Wh=function(n){return j4(this,n)},uZn.bi=function(n,t){bln(this,n,t)},uZn.ii=function(){return tYn(),VKt},uZn.ki=function(n){ffn(this,n)},uZn.nf=function(){return Qkn(this)},uZn.gh=function(){return!this.o&&(this.o=new ltn((tYn(),XKt),EFt,this,0)),this.o},uZn.of=function(n){return zDn(this,n)},uZn.pf=function(n){return vnn(this,n)},uZn.qf=function(n,t){return Myn(this,n,t)},zW(Ztt,"EMapPropertyHolderImpl",2083),sDn(572,120,{110:1,377:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},ns),uZn.Lh=function(n,t,e){switch(n){case 0:return this.a;case 1:return this.b}return Dyn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 0:return 0!=this.a;case 1:return 0!=this.b}return Wkn(this,n)},uZn.bi=function(n,t){switch(n){case 0:return void Scn(this,uM(pK(t)));case 1:return void pcn(this,uM(pK(t)))}sLn(this,n,t)},uZn.ii=function(){return tYn(),KKt},uZn.ki=function(n){switch(n){case 0:return void Scn(this,0);case 1:return void pcn(this,0)}oAn(this,n)},uZn.Ib=function(){var n;return 64&this.Db?vxn(this):((n=new fx(vxn(this))).a+=" (x: ",Oj(n,this.a),n.a+=", y: ",Oj(n,this.b),n.a+=")",n.a)},uZn.a=0,uZn.b=0,zW(Ztt,"ElkBendPointImpl",572),sDn(739,2083,{110:1,342:1,167:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.Lh=function(n,t,e){return Xdn(this,n,t,e)},uZn.Sh=function(n,t,e){return SCn(this,n,t,e)},uZn.Uh=function(n,t,e){return phn(this,n,t,e)},uZn.Wh=function(n){return _sn(this,n)},uZn.bi=function(n,t){CSn(this,n,t)},uZn.ii=function(){return tYn(),HKt},uZn.ki=function(n){Awn(this,n)},uZn.jh=function(){return this.k},uZn.kh=function(){return xJ(this)},uZn.Ib=function(){return Egn(this)},uZn.k=null,zW(Ztt,"ElkGraphElementImpl",739),sDn(740,739,{110:1,342:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.Lh=function(n,t,e){return spn(this,n,t,e)},uZn.Wh=function(n){return Kpn(this,n)},uZn.bi=function(n,t){ISn(this,n,t)},uZn.ii=function(){return tYn(),zKt},uZn.ki=function(n){Tmn(this,n)},uZn.lh=function(){return this.f},uZn.mh=function(){return this.g},uZn.nh=function(){return this.i},uZn.oh=function(){return this.j},uZn.ph=function(n,t){vN(this,n,t)},uZn.qh=function(n,t){kN(this,n,t)},uZn.rh=function(n){ycn(this,n)},uZn.sh=function(n){Mcn(this,n)},uZn.Ib=function(){return rOn(this)},uZn.f=0,uZn.g=0,uZn.i=0,uZn.j=0,zW(Ztt,"ElkShapeImpl",740),sDn(741,740,{110:1,342:1,84:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.Lh=function(n,t,e){return SMn(this,n,t,e)},uZn.Sh=function(n,t,e){return tSn(this,n,t,e)},uZn.Uh=function(n,t,e){return eSn(this,n,t,e)},uZn.Wh=function(n){return iln(this,n)},uZn.bi=function(n,t){SDn(this,n,t)},uZn.ii=function(){return tYn(),FKt},uZn.ki=function(n){yyn(this,n)},uZn.hh=function(){return!this.d&&(this.d=new f_(aFt,this,8,5)),this.d},uZn.ih=function(){return!this.e&&(this.e=new f_(aFt,this,7,4)),this.e},zW(Ztt,"ElkConnectableShapeImpl",741),sDn(326,739,{110:1,342:1,74:1,167:1,326:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},es),uZn.Ah=function(n){return sEn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 3:return s0(this);case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),this.b;case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),this.c;case 6:return!this.a&&(this.a=new fV(oFt,this,6,6)),this.a;case 7:return qx(),!this.b&&(this.b=new f_(cFt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new f_(cFt,this,5,8)),this.c.i<=1));case 8:return qx(),!!z$n(this);case 9:return qx(),!!BNn(this);case 10:return qx(),!this.b&&(this.b=new f_(cFt,this,4,7)),0!=this.b.i&&(!this.c&&(this.c=new f_(cFt,this,5,8)),0!=this.c.i)}return Xdn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 3:return this.Cb&&(e=(i=this.Db>>16)>=0?sEn(this,e):this.Cb.Th(this,-1-i,null,e)),nF(this,uG(n,27),e);case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),Nmn(this.b,n,e);case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),Nmn(this.c,n,e);case 6:return!this.a&&(this.a=new fV(oFt,this,6,6)),Nmn(this.a,n,e)}return SCn(this,n,t,e)},uZn.Uh=function(n,t,e){switch(t){case 3:return nF(this,null,e);case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),Nyn(this.b,n,e);case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),Nyn(this.c,n,e);case 6:return!this.a&&(this.a=new fV(oFt,this,6,6)),Nyn(this.a,n,e)}return phn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 3:return!!s0(this);case 4:return!!this.b&&0!=this.b.i;case 5:return!!this.c&&0!=this.c.i;case 6:return!!this.a&&0!=this.a.i;case 7:return!this.b&&(this.b=new f_(cFt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new f_(cFt,this,5,8)),this.c.i<=1));case 8:return z$n(this);case 9:return BNn(this);case 10:return!this.b&&(this.b=new f_(cFt,this,4,7)),0!=this.b.i&&(!this.c&&(this.c=new f_(cFt,this,5,8)),0!=this.c.i)}return _sn(this,n)},uZn.bi=function(n,t){switch(n){case 3:return void ARn(this,uG(t,27));case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),Czn(this.b),!this.b&&(this.b=new f_(cFt,this,4,7)),void CW(this.b,uG(t,16));case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),Czn(this.c),!this.c&&(this.c=new f_(cFt,this,5,8)),void CW(this.c,uG(t,16));case 6:return!this.a&&(this.a=new fV(oFt,this,6,6)),Czn(this.a),!this.a&&(this.a=new fV(oFt,this,6,6)),void CW(this.a,uG(t,16))}CSn(this,n,t)},uZn.ii=function(){return tYn(),_Kt},uZn.ki=function(n){switch(n){case 3:return void ARn(this,null);case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),void Czn(this.b);case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),void Czn(this.c);case 6:return!this.a&&(this.a=new fV(oFt,this,6,6)),void Czn(this.a)}Awn(this,n)},uZn.Ib=function(){return SXn(this)},zW(Ztt,"ElkEdgeImpl",326),sDn(452,2083,{110:1,342:1,166:1,452:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},is),uZn.Ah=function(n){return zjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new MD(eFt,this,5)),this.a;case 6:return f0(this);case 7:return t?fMn(this):this.i;case 8:return t?hMn(this):this.f;case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),this.g;case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),this.e;case 11:return this.d}return ajn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?zjn(this,e):this.Cb.Th(this,-1-i,null,e)),ZK(this,uG(n,74),e);case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),Nmn(this.g,n,e);case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),Nmn(this.e,n,e)}return uG(ern(uG(Lsn(this,16),29)||(tYn(),BKt),t),69).wk().zk(this,$vn(this),t-iQ((tYn(),BKt)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 5:return!this.a&&(this.a=new MD(eFt,this,5)),Nyn(this.a,n,e);case 6:return ZK(this,null,e);case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),Nyn(this.g,n,e);case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),Nyn(this.e,n,e)}return BIn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 1:return 0!=this.j;case 2:return 0!=this.k;case 3:return 0!=this.b;case 4:return 0!=this.c;case 5:return!!this.a&&0!=this.a.i;case 6:return!!f0(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&0!=this.g.i;case 10:return!!this.e&&0!=this.e.i;case 11:return null!=this.d}return j4(this,n)},uZn.bi=function(n,t){switch(n){case 1:return void Tcn(this,uM(pK(t)));case 2:return void Ecn(this,uM(pK(t)));case 3:return void mcn(this,uM(pK(t)));case 4:return void jcn(this,uM(pK(t)));case 5:return!this.a&&(this.a=new MD(eFt,this,5)),Czn(this.a),!this.a&&(this.a=new MD(eFt,this,5)),void CW(this.a,uG(t,16));case 6:return void ORn(this,uG(t,74));case 7:return void zan(this,uG(t,84));case 8:return void Xan(this,uG(t,84));case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),Czn(this.g),!this.g&&(this.g=new f_(oFt,this,9,10)),void CW(this.g,uG(t,16));case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),Czn(this.e),!this.e&&(this.e=new f_(oFt,this,10,9)),void CW(this.e,uG(t,16));case 11:return void fon(this,mK(t))}bln(this,n,t)},uZn.ii=function(){return tYn(),BKt},uZn.ki=function(n){switch(n){case 1:return void Tcn(this,0);case 2:return void Ecn(this,0);case 3:return void mcn(this,0);case 4:return void jcn(this,0);case 5:return!this.a&&(this.a=new MD(eFt,this,5)),void Czn(this.a);case 6:return void ORn(this,null);case 7:return void zan(this,null);case 8:return void Xan(this,null);case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),void Czn(this.g);case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),void Czn(this.e);case 11:return void fon(this,null)}ffn(this,n)},uZn.Ib=function(){return A$n(this)},uZn.b=0,uZn.c=0,uZn.d=null,uZn.j=0,uZn.k=0,zW(Ztt,"ElkEdgeSectionImpl",452),sDn(158,120,{110:1,94:1,93:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1}),uZn.Lh=function(n,t,e){return 0==n?(!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab):$tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Sh=function(n,t,e){return 0==t?(!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e)):uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().zk(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Uh=function(n,t,e){return 0==t?(!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e)):uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().Ak(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){return 0==n?!!this.Ab&&0!=this.Ab.i:l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.Zh=function(n){return VQn(this,n)},uZn.bi=function(n,t){if(0===n)return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.di=function(n){Dvn(this,128,n)},uZn.ii=function(){return YYn(),$_t},uZn.ki=function(n){if(0===n)return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.pi=function(){this.Bb|=1},uZn.qi=function(n){return qUn(this,n)},uZn.Bb=0,zW(Ytt,"EModelElementImpl",158),sDn(720,158,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},Fl),uZn.ri=function(n,t){return cWn(this,n,t)},uZn.si=function(n){var t,e,i,r;if(this.a!=Hrn(n)||256&n.Bb)throw hv(new vM(cet+n.zb+eet));for(e=n1(n);0!=z5(e.a).i;){if(_Tn(t=uG(yVn(e,0,F$(r=uG(zrn(z5(e.a),0),89).c,90)?uG(r,29):(YYn(),x_t)),29)))return uG(i=Hrn(t).wi().si(t),54).ci(n),i;e=n1(t)}return"java.util.Map$Entry"==(null!=n.D?n.D:n.B)?new Eq(n):new BG(n)},uZn.ti=function(n,t){return cYn(this,n,t)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.a}return $tn(this,n-iQ((YYn(),A_t)),ern(uG(Lsn(this,16),29)||A_t,n),t,e)},uZn.Sh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 1:return this.a&&(e=uG(this.a,54).Th(this,4,fFt,e)),ywn(this,uG(n,241),e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),A_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),A_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 1:return ywn(this,null,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),A_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),A_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return!!this.a}return l5(this,n-iQ((YYn(),A_t)),ern(uG(Lsn(this,16),29)||A_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void yIn(this,uG(t,241))}lpn(this,n-iQ((YYn(),A_t)),ern(uG(Lsn(this,16),29)||A_t,n),t)},uZn.ii=function(){return YYn(),A_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void yIn(this,null)}sdn(this,n-iQ((YYn(),A_t)),ern(uG(Lsn(this,16),29)||A_t,n))},zW(Ytt,"EFactoryImpl",720),sDn(1037,720,{110:1,2113:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},rs),uZn.ri=function(n,t){switch(n.hk()){case 12:return uG(t,149).Pg();case 13:return cpn(t);default:throw hv(new vM(tet+n.xe()+eet))}},uZn.si=function(n){var t;switch(-1==n.G&&(n.G=(t=Hrn(n))?Hyn(t.vi(),n):-1),n.G){case 4:return new cs;case 6:return new Bk;case 7:return new Hk;case 8:return new es;case 9:return new ns;case 10:return new is;case 11:return new as;default:throw hv(new vM(cet+n.zb+eet))}},uZn.ti=function(n,t){switch(n.hk()){case 13:case 12:return null;default:throw hv(new vM(tet+n.xe()+eet))}},zW(Ztt,"ElkGraphFactoryImpl",1037),sDn(448,158,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1}),uZn.Gh=function(){var n;return null==(n=$1(eqn(uG(Lsn(this,16),29)||this.ii())))?(jP(),jP(),tBt):new VR(this,n)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.xe()}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void this.ui(mK(t))}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),D_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void this.ui(null)}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.xe=function(){return this.zb},uZn.ui=function(n){qon(this,n)},uZn.Ib=function(){return Wwn(this)},uZn.zb=null,zW(Ytt,"ENamedElementImpl",448),sDn(184,448,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},aZ),uZn.Ah=function(n){return Jjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new vV(this,s_t,this)),this.rb;case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),this.vb;case 7:return t?this.Db>>16==7?uG(this.Cb,241):null:$0(this)}return $tn(this,n-iQ((YYn(),F_t)),ern(uG(Lsn(this,16),29)||F_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 4:return this.sb&&(e=uG(this.sb,54).Th(this,1,sFt,e)),Jwn(this,uG(n,480),e);case 5:return!this.rb&&(this.rb=new vV(this,s_t,this)),Nmn(this.rb,n,e);case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),Nmn(this.vb,n,e);case 7:return this.Cb&&(e=(i=this.Db>>16)>=0?Jjn(this,e):this.Cb.Th(this,-1-i,null,e)),DUn(this,n,7,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),F_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),F_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 4:return Jwn(this,null,e);case 5:return!this.rb&&(this.rb=new vV(this,s_t,this)),Nyn(this.rb,n,e);case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),Nyn(this.vb,n,e);case 7:return DUn(this,null,7,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),F_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),F_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.yb;case 3:return null!=this.xb;case 4:return!!this.sb;case 5:return!!this.rb&&0!=this.rb.i;case 6:return!!this.vb&&0!=this.vb.i;case 7:return!!$0(this)}return l5(this,n-iQ((YYn(),F_t)),ern(uG(Lsn(this,16),29)||F_t,n))},uZn.Zh=function(n){return jKn(this,n)||VQn(this,n)},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void qon(this,mK(t));case 2:return void zon(this,mK(t));case 3:return void Xon(this,mK(t));case 4:return void HIn(this,uG(t,480));case 5:return!this.rb&&(this.rb=new vV(this,s_t,this)),Czn(this.rb),!this.rb&&(this.rb=new vV(this,s_t,this)),void CW(this.rb,uG(t,16));case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),Czn(this.vb),!this.vb&&(this.vb=new i_(fFt,this,6,7)),void CW(this.vb,uG(t,16))}lpn(this,n-iQ((YYn(),F_t)),ern(uG(Lsn(this,16),29)||F_t,n),t)},uZn.ei=function(n){var t,e;if(n&&this.rb)for(e=new DD(this.rb);e.e!=e.i.gc();)F$(t=Zkn(e),364)&&(uG(t,364).w=null);Dvn(this,64,n)},uZn.ii=function(){return YYn(),F_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void qon(this,null);case 2:return void zon(this,null);case 3:return void Xon(this,null);case 4:return void HIn(this,null);case 5:return!this.rb&&(this.rb=new vV(this,s_t,this)),void Czn(this.rb);case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),void Czn(this.vb)}sdn(this,n-iQ((YYn(),F_t)),ern(uG(Lsn(this,16),29)||F_t,n))},uZn.pi=function(){ojn(this)},uZn.vi=function(){return!this.rb&&(this.rb=new vV(this,s_t,this)),this.rb},uZn.wi=function(){return this.sb},uZn.xi=function(){return this.ub},uZn.yi=function(){return this.xb},uZn.zi=function(){return this.yb},uZn.Ai=function(n){this.ub=n},uZn.Ib=function(){var n;return 64&this.Db?Wwn(this):((n=new fx(Wwn(this))).a+=" (nsURI: ",VA(n,this.yb),n.a+=", nsPrefix: ",VA(n,this.xb),n.a+=")",n.a)},uZn.xb=null,uZn.yb=null,zW(Ytt,"EPackageImpl",184),sDn(569,184,{110:1,2115:1,569:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},iDn),uZn.q=!1,uZn.r=!1;var dFt=!1;zW(Ztt,"ElkGraphPackageImpl",569),sDn(366,740,{110:1,342:1,167:1,135:1,422:1,366:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},cs),uZn.Ah=function(n){return Vjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 7:return x0(this);case 8:return this.a}return spn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;return 7===t?(this.Cb&&(e=(i=this.Db>>16)>=0?Vjn(this,e):this.Cb.Th(this,-1-i,null,e)),dz(this,uG(n,167),e)):SCn(this,n,t,e)},uZn.Uh=function(n,t,e){return 7==t?dz(this,null,e):phn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 7:return!!x0(this);case 8:return!m_("",this.a)}return Kpn(this,n)},uZn.bi=function(n,t){switch(n){case 7:return void vKn(this,uG(t,167));case 8:return void Van(this,mK(t))}ISn(this,n,t)},uZn.ii=function(){return tYn(),UKt},uZn.ki=function(n){switch(n){case 7:return void vKn(this,null);case 8:return void Van(this,"")}Tmn(this,n)},uZn.Ib=function(){return zOn(this)},uZn.a="",zW(Ztt,"ElkLabelImpl",366),sDn(207,741,{110:1,342:1,84:1,167:1,27:1,422:1,207:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},Bk),uZn.Ah=function(n){return hEn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 9:return!this.c&&(this.c=new fV(wFt,this,9,9)),this.c;case 10:return!this.a&&(this.a=new fV(bFt,this,10,11)),this.a;case 11:return R0(this);case 12:return!this.b&&(this.b=new fV(aFt,this,12,3)),this.b;case 13:return qx(),!this.a&&(this.a=new fV(bFt,this,10,11)),this.a.i>0}return SMn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 9:return!this.c&&(this.c=new fV(wFt,this,9,9)),Nmn(this.c,n,e);case 10:return!this.a&&(this.a=new fV(bFt,this,10,11)),Nmn(this.a,n,e);case 11:return this.Cb&&(e=(i=this.Db>>16)>=0?hEn(this,e):this.Cb.Th(this,-1-i,null,e)),n_(this,uG(n,27),e);case 12:return!this.b&&(this.b=new fV(aFt,this,12,3)),Nmn(this.b,n,e)}return tSn(this,n,t,e)},uZn.Uh=function(n,t,e){switch(t){case 9:return!this.c&&(this.c=new fV(wFt,this,9,9)),Nyn(this.c,n,e);case 10:return!this.a&&(this.a=new fV(bFt,this,10,11)),Nyn(this.a,n,e);case 11:return n_(this,null,e);case 12:return!this.b&&(this.b=new fV(aFt,this,12,3)),Nyn(this.b,n,e)}return eSn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 9:return!!this.c&&0!=this.c.i;case 10:return!!this.a&&0!=this.a.i;case 11:return!!R0(this);case 12:return!!this.b&&0!=this.b.i;case 13:return!this.a&&(this.a=new fV(bFt,this,10,11)),this.a.i>0}return iln(this,n)},uZn.bi=function(n,t){switch(n){case 9:return!this.c&&(this.c=new fV(wFt,this,9,9)),Czn(this.c),!this.c&&(this.c=new fV(wFt,this,9,9)),void CW(this.c,uG(t,16));case 10:return!this.a&&(this.a=new fV(bFt,this,10,11)),Czn(this.a),!this.a&&(this.a=new fV(bFt,this,10,11)),void CW(this.a,uG(t,16));case 11:return void GRn(this,uG(t,27));case 12:return!this.b&&(this.b=new fV(aFt,this,12,3)),Czn(this.b),!this.b&&(this.b=new fV(aFt,this,12,3)),void CW(this.b,uG(t,16))}SDn(this,n,t)},uZn.ii=function(){return tYn(),GKt},uZn.ki=function(n){switch(n){case 9:return!this.c&&(this.c=new fV(wFt,this,9,9)),void Czn(this.c);case 10:return!this.a&&(this.a=new fV(bFt,this,10,11)),void Czn(this.a);case 11:return void GRn(this,null);case 12:return!this.b&&(this.b=new fV(aFt,this,12,3)),void Czn(this.b)}yyn(this,n)},uZn.Ib=function(){return zBn(this)},zW(Ztt,"ElkNodeImpl",207),sDn(193,741,{110:1,342:1,84:1,167:1,123:1,422:1,193:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},Hk),uZn.Ah=function(n){return Wjn(this,n)},uZn.Lh=function(n,t,e){return 9==n?h0(this):SMn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;return 9===t?(this.Cb&&(e=(i=this.Db>>16)>=0?Wjn(this,e):this.Cb.Th(this,-1-i,null,e)),tF(this,uG(n,27),e)):tSn(this,n,t,e)},uZn.Uh=function(n,t,e){return 9==t?tF(this,null,e):eSn(this,n,t,e)},uZn.Wh=function(n){return 9==n?!!h0(this):iln(this,n)},uZn.bi=function(n,t){9!==n?SDn(this,n,t):LRn(this,uG(t,27))},uZn.ii=function(){return tYn(),qKt},uZn.ki=function(n){9!==n?yyn(this,n):LRn(this,null)},uZn.Ib=function(){return VBn(this)},zW(Ztt,"ElkPortImpl",193);var gFt=Iq(Pet,"BasicEMap/Entry");sDn(1122,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,119:1,120:1},as),uZn.Fb=function(n){return this===n},uZn.ld=function(){return this.b},uZn.Hb=function(){return xx(this)},uZn.Di=function(n){Wan(this,uG(n,149))},uZn.Lh=function(n,t,e){switch(n){case 0:return this.b;case 1:return this.c}return Dyn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.b;case 1:return null!=this.c}return Wkn(this,n)},uZn.bi=function(n,t){switch(n){case 0:return void Wan(this,uG(t,149));case 1:return void Han(this,t)}sLn(this,n,t)},uZn.ii=function(){return tYn(),XKt},uZn.ki=function(n){switch(n){case 0:return void Wan(this,null);case 1:return void Han(this,null)}oAn(this,n)},uZn.Bi=function(){var n;return-1==this.a&&(n=this.b,this.a=n?Hon(n):0),this.a},uZn.md=function(){return this.c},uZn.Ci=function(n){this.a=n},uZn.nd=function(n){var t;return t=this.c,Han(this,n),t},uZn.Ib=function(){var n;return 64&this.Db?vxn(this):(JA(JA(JA(n=new WM,this.b?this.b.Pg():IZn),Y4n),ox(this.c)),n.a)},uZn.a=-1,uZn.c=null;var pFt,mFt,vFt,kFt,yFt,MFt,TFt,jFt,EFt=zW(Ztt,"ElkPropertyToValueMapEntryImpl",1122);sDn(996,1,{},ss),zW(Oet,"JsonAdapter",996),sDn(216,63,S1n,SM),zW(Oet,"JsonImportException",216),sDn(868,1,{},Zjn),zW(Oet,"JsonImporter",868),sDn(903,1,{},QO),zW(Oet,"JsonImporter/lambda$0$Type",903),sDn(904,1,{},JO),zW(Oet,"JsonImporter/lambda$1$Type",904),sDn(912,1,{},Yp),zW(Oet,"JsonImporter/lambda$10$Type",912),sDn(914,1,{},YO),zW(Oet,"JsonImporter/lambda$11$Type",914),sDn(915,1,{},ZO),zW(Oet,"JsonImporter/lambda$12$Type",915),sDn(921,1,{},SY),zW(Oet,"JsonImporter/lambda$13$Type",921),sDn(920,1,{},PY),zW(Oet,"JsonImporter/lambda$14$Type",920),sDn(916,1,{},nA),zW(Oet,"JsonImporter/lambda$15$Type",916),sDn(917,1,{},tA),zW(Oet,"JsonImporter/lambda$16$Type",917),sDn(918,1,{},eA),zW(Oet,"JsonImporter/lambda$17$Type",918),sDn(919,1,{},iA),zW(Oet,"JsonImporter/lambda$18$Type",919),sDn(924,1,{},Zp),zW(Oet,"JsonImporter/lambda$19$Type",924),sDn(905,1,{},nm),zW(Oet,"JsonImporter/lambda$2$Type",905),sDn(922,1,{},tm),zW(Oet,"JsonImporter/lambda$20$Type",922),sDn(923,1,{},em),zW(Oet,"JsonImporter/lambda$21$Type",923),sDn(927,1,{},im),zW(Oet,"JsonImporter/lambda$22$Type",927),sDn(925,1,{},rm),zW(Oet,"JsonImporter/lambda$23$Type",925),sDn(926,1,{},cm),zW(Oet,"JsonImporter/lambda$24$Type",926),sDn(929,1,{},am),zW(Oet,"JsonImporter/lambda$25$Type",929),sDn(928,1,{},om),zW(Oet,"JsonImporter/lambda$26$Type",928),sDn(930,1,QZn,rA),uZn.Cd=function(n){ptn(this.b,this.a,mK(n))},zW(Oet,"JsonImporter/lambda$27$Type",930),sDn(931,1,QZn,cA),uZn.Cd=function(n){mtn(this.b,this.a,mK(n))},zW(Oet,"JsonImporter/lambda$28$Type",931),sDn(932,1,{},aA),zW(Oet,"JsonImporter/lambda$29$Type",932),sDn(908,1,{},um),zW(Oet,"JsonImporter/lambda$3$Type",908),sDn(933,1,{},oA),zW(Oet,"JsonImporter/lambda$30$Type",933),sDn(934,1,{},sm),zW(Oet,"JsonImporter/lambda$31$Type",934),sDn(935,1,{},hm),zW(Oet,"JsonImporter/lambda$32$Type",935),sDn(936,1,{},fm),zW(Oet,"JsonImporter/lambda$33$Type",936),sDn(937,1,{},lm),zW(Oet,"JsonImporter/lambda$34$Type",937),sDn(870,1,{},bm),zW(Oet,"JsonImporter/lambda$35$Type",870),sDn(941,1,{},DU),zW(Oet,"JsonImporter/lambda$36$Type",941),sDn(938,1,QZn,wm),uZn.Cd=function(n){V8(this.a,uG(n,377))},zW(Oet,"JsonImporter/lambda$37$Type",938),sDn(939,1,QZn,sA),uZn.Cd=function(n){vA(this.a,this.b,uG(n,166))},zW(Oet,"JsonImporter/lambda$38$Type",939),sDn(940,1,QZn,hA),uZn.Cd=function(n){kA(this.a,this.b,uG(n,166))},zW(Oet,"JsonImporter/lambda$39$Type",940),sDn(906,1,{},dm),zW(Oet,"JsonImporter/lambda$4$Type",906),sDn(942,1,QZn,gm),uZn.Cd=function(n){W8(this.a,uG(n,8))},zW(Oet,"JsonImporter/lambda$40$Type",942),sDn(907,1,{},pm),zW(Oet,"JsonImporter/lambda$5$Type",907),sDn(911,1,{},mm),zW(Oet,"JsonImporter/lambda$6$Type",911),sDn(909,1,{},vm),zW(Oet,"JsonImporter/lambda$7$Type",909),sDn(910,1,{},km),zW(Oet,"JsonImporter/lambda$8$Type",910),sDn(913,1,{},ym),zW(Oet,"JsonImporter/lambda$9$Type",913),sDn(961,1,QZn,Mm),uZn.Cd=function(n){pQ(this.a,new QW(mK(n)))},zW(Oet,"JsonMetaDataConverter/lambda$0$Type",961),sDn(962,1,QZn,Tm),uZn.Cd=function(n){SW(this.a,uG(n,245))},zW(Oet,"JsonMetaDataConverter/lambda$1$Type",962),sDn(963,1,QZn,jm),uZn.Cd=function(n){m2(this.a,uG(n,143))},zW(Oet,"JsonMetaDataConverter/lambda$2$Type",963),sDn(964,1,QZn,Em),uZn.Cd=function(n){PW(this.a,uG(n,170))},zW(Oet,"JsonMetaDataConverter/lambda$3$Type",964),sDn(245,22,{3:1,34:1,22:1,245:1},fA);var SFt,PFt=_cn(p3n,"GraphFeature",245,Oat,brn,QU);sDn(11,1,{34:1,149:1},Cm,uF,mL,_N),uZn.Fd=function(n){return dD(this,uG(n,149))},uZn.Fb=function(n){return QZ(this,n)},uZn.Sg=function(){return Jkn(this)},uZn.Pg=function(){return this.b},uZn.Hb=function(){return pln(this.b)},uZn.Ib=function(){return this.b},zW(p3n,"Property",11),sDn(671,1,b2n,Sm),uZn.Ne=function(n,t){return wgn(this,uG(n,96),uG(t,96))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},zW(p3n,"PropertyHolderComparator",671),sDn(709,1,$Zn,Pm),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return Mtn(this)},uZn.Qb=function(){xj()},uZn.Ob=function(){return!!this.a},zW(qet,"ElkGraphUtil/AncestorIterator",709);var CFt=Iq(Pet,"EList");sDn(70,56,{20:1,31:1,56:1,16:1,15:1,70:1,61:1}),uZn.bd=function(n,t){$dn(this,n,t)},uZn.Fc=function(n){return ttn(this,n)},uZn.cd=function(n,t){return bfn(this,n,t)},uZn.Gc=function(n){return CW(this,n)},uZn.Ii=function(){return new nR(this)},uZn.Ji=function(){return new tR(this)},uZn.Ki=function(n){return han(this,n)},uZn.Li=function(){return!0},uZn.Mi=function(n,t){},uZn.Ni=function(){},uZn.Oi=function(n,t){Ann(this,n,t)},uZn.Pi=function(n,t,e){},uZn.Qi=function(n,t){},uZn.Ri=function(n,t,e){},uZn.Fb=function(n){return G_n(this,n)},uZn.Hb=function(){return Bhn(this)},uZn.Si=function(){return!1},uZn.Kc=function(){return new DD(this)},uZn.ed=function(){return new Zx(this)},uZn.fd=function(n){var t;if(t=this.gc(),n<0||n>t)throw hv(new w_(n,t));return new QV(this,n)},uZn.Ui=function(n,t){this.Ti(n,this.dd(t))},uZn.Mc=function(n){return rin(this,n)},uZn.Wi=function(n,t){return t},uZn.hd=function(n,t){return Uyn(this,n,t)},uZn.Ib=function(){return Tpn(this)},uZn.Yi=function(){return!0},uZn.Zi=function(n,t){return gln(this,t)},zW(Pet,"AbstractEList",70),sDn(66,70,Qet,ls,Drn,Hun),uZn.Ei=function(n,t){return PCn(this,n,t)},uZn.Fi=function(n){return QMn(this,n)},uZn.Gi=function(n,t){edn(this,n,t)},uZn.Hi=function(n){z9(this,n)},uZn.$i=function(n){return Otn(this,n)},uZn.$b=function(){V9(this)},uZn.Hc=function(n){return sSn(this,n)},uZn.Xb=function(n){return zrn(this,n)},uZn._i=function(n){var t,e,i;++this.j,n>(e=null==this.g?0:this.g.length)&&(i=this.g,(t=e+(e/2|0)+4)<n&&(t=n),this.g=this.aj(t),null!=i&&qGn(i,0,this.g,0,this.i))},uZn.dd=function(n){return Ljn(this,n)},uZn.dc=function(){return 0==this.i},uZn.Ti=function(n,t){return HNn(this,n,t)},uZn.aj=function(n){return Inn(dat,EZn,1,n,5,1)},uZn.Vi=function(n){return this.g[n]},uZn.gd=function(n){return gjn(this,n)},uZn.Xi=function(n,t){return iin(this,n,t)},uZn.gc=function(){return this.i},uZn.Pc=function(){return g5(this)},uZn.Qc=function(n){return gmn(this,n)},uZn.i=0;var IFt=zW(Pet,"BasicEList",66),OFt=Iq(Pet,"TreeIterator");sDn(708,66,Jet),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return null!=this.g||this.c?null==this.g||0!=this.i&&uG(this.g[this.i-1],51).Ob():O0(this)},uZn.Pb=function(){return Wxn(this)},uZn.Qb=function(){if(!this.e)throw hv(new kM("There is no valid object to remove."));this.e.Qb()},uZn.c=!1,zW(Pet,"AbstractTreeIterator",708),sDn(700,708,Jet,jN),uZn.bj=function(n){var t;return F$(t=uG(n,58).Gh().Kc(),287)&&uG(t,287).wl(new hs),t},zW(qet,"ElkGraphUtil/PropertiesSkippingTreeIterator",700),sDn(965,1,{},hs),zW(qet,"ElkGraphUtil/PropertiesSkippingTreeIterator/1",965);var AFt,LFt,NFt,$Ft=zW(qet,"ElkReflect",null);sDn(901,1,xnt,fs),uZn.Rg=function(n){return W0(),E2(uG(n,181))},zW(qet,"ElkReflect/lambda$0$Type",901),Iq(Pet,"ResourceLocator"),sDn(1065,1,{}),zW(Pet,"DelegatingResourceLocator",1065),sDn(1066,1065,{}),zW("org.eclipse.emf.common","EMFPlugin",1066);var DFt,xFt=Iq(Kit,"Adapter"),RFt=Iq(Kit,"Notification");sDn(1174,1,Fit),uZn.cj=function(){return this.d},uZn.dj=function(n){},uZn.ej=function(n){this.d=n},uZn.fj=function(n){this.d==n&&(this.d=null)},uZn.d=null,zW(Utt,"AdapterImpl",1174),sDn(2093,70,_it),uZn.Ei=function(n,t){return nmn(this,n,t)},uZn.Fi=function(n){var t,e,i;if(++this.j,n.dc())return!1;for(t=this.Ej(),i=n.Kc();i.Ob();)e=i.Pb(),this.rj(this.Zi(t,e)),++t;return!0},uZn.Gi=function(n,t){JK(this,n,t)},uZn.Hi=function(n){vQ(this,n)},uZn.pj=function(){return this.sj()},uZn.$b=function(){QK(this,this.Ej(),this.Fj())},uZn.Hc=function(n){return this.uj(n)},uZn.Ic=function(n){return this.vj(n)},uZn.qj=function(n,t){this.Bj().Um()},uZn.rj=function(n){this.Bj().Um()},uZn.sj=function(){return this.Bj()},uZn.tj=function(){this.Bj().Um()},uZn.uj=function(n){return this.Bj().Um()},uZn.vj=function(n){return this.Bj().Um()},uZn.wj=function(n){return this.Bj().Um()},uZn.xj=function(n){return this.Bj().Um()},uZn.yj=function(){return this.Bj().Um()},uZn.zj=function(n){return this.Bj().Um()},uZn.Aj=function(){return this.Bj().Um()},uZn.Cj=function(n){return this.Bj().Um()},uZn.Dj=function(n,t){return this.Bj().Um()},uZn.Ej=function(){return this.Bj().Um()},uZn.Fj=function(){return this.Bj().Um()},uZn.Gj=function(n){return this.Bj().Um()},uZn.Hj=function(){return this.Bj().Um()},uZn.Fb=function(n){return this.wj(n)},uZn.Xb=function(n){return this.Wi(n,this.xj(n))},uZn.Hb=function(){return this.yj()},uZn.dd=function(n){return this.zj(n)},uZn.dc=function(){return this.Aj()},uZn.Ti=function(n,t){return pIn(this,n,t)},uZn.Vi=function(n){return this.xj(n)},uZn.gd=function(n){return Oq(this,n)},uZn.Mc=function(n){var t;return(t=this.dd(n))>=0&&(this.gd(t),!0)},uZn.Xi=function(n,t){return this.Dj(n,this.Zi(n,t))},uZn.gc=function(){return this.Ej()},uZn.Pc=function(){return this.Fj()},uZn.Qc=function(n){return this.Gj(n)},uZn.Ib=function(){return this.Hj()},zW(Pet,"DelegatingEList",2093),sDn(2094,2093,_it),uZn.Ei=function(n,t){return dGn(this,n,t)},uZn.Fi=function(n){return this.Ei(this.Ej(),n)},uZn.Gi=function(n,t){cDn(this,n,t)},uZn.Hi=function(n){S$n(this,n)},uZn.Li=function(){return!this.Mj()},uZn.$b=function(){_zn(this)},uZn.Ij=function(n,t,e,i,r){return new zZ(this,n,t,e,i,r)},uZn.Jj=function(n){Msn(this.jj(),n)},uZn.Kj=function(){return null},uZn.Lj=function(){return-1},uZn.jj=function(){return null},uZn.Mj=function(){return!1},uZn.Nj=function(n,t){return t},uZn.Oj=function(n,t){return t},uZn.Pj=function(){return!1},uZn.Qj=function(){return!this.Aj()},uZn.Ti=function(n,t){var e,i;return this.Pj()?(i=this.Qj(),e=pIn(this,n,t),this.Jj(this.Ij(7,xwn(t),e,n,i)),e):pIn(this,n,t)},uZn.gd=function(n){var t,e,i,r;return this.Pj()?(e=null,i=this.Qj(),t=this.Ij(4,r=Oq(this,n),null,n,i),this.Mj()&&r?(e=this.Oj(r,e))?(e.nj(t),e.oj()):this.Jj(t):e?(e.nj(t),e.oj()):this.Jj(t),r):(r=Oq(this,n),this.Mj()&&r&&(e=this.Oj(r,null))&&e.oj(),r)},uZn.Xi=function(n,t){return gGn(this,n,t)},zW(Utt,"DelegatingNotifyingListImpl",2094),sDn(152,1,Bit),uZn.nj=function(n){return kPn(this,n)},uZn.oj=function(){Cen(this)},uZn.gj=function(){return this.d},uZn.Kj=function(){return null},uZn.Rj=function(){return null},uZn.hj=function(n){return-1},uZn.ij=function(){return OFn(this)},uZn.jj=function(){return null},uZn.kj=function(){return AFn(this)},uZn.lj=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},uZn.Sj=function(){return!1},uZn.mj=function(n){var t,e,i,r,c,a,o,u;switch(this.d){case 1:case 2:switch(n.gj()){case 1:case 2:if(xA(n.jj())===xA(this.jj())&&this.hj(null)==n.hj(null))return this.g=n.ij(),1==n.gj()&&(this.d=1),!0}case 4:if(4===n.gj()&&xA(n.jj())===xA(this.jj())&&this.hj(null)==n.hj(null))return a=kVn(this),c=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,i=n.lj(),this.d=6,u=new Drn(2),c<=i?(ttn(u,this.n),ttn(u,n.kj()),this.g=Uhn(cT(YHt,1),W1n,28,15,[this.o=c,i+1])):(ttn(u,n.kj()),ttn(u,this.n),this.g=Uhn(cT(YHt,1),W1n,28,15,[this.o=i,c])),this.n=u,a||(this.o=-2-this.o-1),!0;break;case 6:if(4===n.gj()&&xA(n.jj())===xA(this.jj())&&this.hj(null)==n.hj(null)){for(a=kVn(this),i=n.lj(),o=uG(this.g,53),e=Inn(YHt,W1n,28,o.length+1,15,1),t=0;t<o.length&&(r=o[t])<=i;)e[t++]=r,++i;for(uG(this.n,15).bd(t,n.kj()),e[t]=i;++t<e.length;)e[t]=o[t-1];return this.g=e,a||(this.o=-2-e[0]),!0}}return!1},uZn.Ib=function(){var n,t,e;switch((e=new fx(Ij(this.Rm)+"@"+(Hon(this)>>>0).toString(16))).a+=" (eventType: ",this.d){case 1:e.a+="SET";break;case 2:e.a+="UNSET";break;case 3:e.a+="ADD";break;case 5:e.a+="ADD_MANY";break;case 4:e.a+="REMOVE";break;case 6:e.a+="REMOVE_MANY";break;case 7:e.a+="MOVE";break;case 8:e.a+="REMOVING_ADAPTER";break;case 9:e.a+="RESOLVE";break;default:Aj(e,this.d)}if(pHn(this)&&(e.a+=", touch: true"),e.a+=", position: ",Aj(e,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),e.a+=", notifier: ",zA(e,this.jj()),e.a+=", feature: ",zA(e,this.Kj()),e.a+=", oldValue: ",zA(e,AFn(this)),e.a+=", newValue: ",6==this.d&&F$(this.g,53)){for(t=uG(this.g,53),e.a+="[",n=0;n<t.length;)e.a+=t[n],++n<t.length&&(e.a+=TZn);e.a+="]"}else zA(e,OFn(this));return e.a+=", isTouch: ",Lj(e,pHn(this)),e.a+=", wasSet: ",Lj(e,kVn(this)),e.a+=")",e.a},uZn.d=0,uZn.e=0,uZn.f=0,uZn.j=0,uZn.k=0,uZn.o=0,uZn.p=0,zW(Utt,"NotificationImpl",152),sDn(1188,152,Bit,zZ),uZn.Kj=function(){return this.a.Kj()},uZn.hj=function(n){return this.a.Lj()},uZn.jj=function(){return this.a.jj()},zW(Utt,"DelegatingNotifyingListImpl/1",1188),sDn(251,66,Qet,bs,cj),uZn.Fc=function(n){return Zpn(this,uG(n,378))},uZn.nj=function(n){return Zpn(this,n)},uZn.oj=function(){var n,t,e;for(n=0;n<this.i;++n)null!=(e=(t=uG(this.g[n],378)).jj())&&-1!=t.gj()&&uG(e,94).xh(t)},uZn.aj=function(n){return Inn(RFt,EZn,378,n,0,1)},zW(Utt,"NotificationChainImpl",251),sDn(1524,93,Htt),uZn.uh=function(){return this.e},uZn.wh=function(){return!!(1&this.f)},uZn.f=1,zW(Utt,"NotifierImpl",1524),sDn(2091,66,Qet),uZn.Ei=function(n,t){return BGn(this,n,t)},uZn.Fi=function(n){return this.Ei(this.i,n)},uZn.Gi=function(n,t){P$n(this,n,t)},uZn.Hi=function(n){V$n(this,n)},uZn.Li=function(){return!this.Mj()},uZn.$b=function(){Czn(this)},uZn.Ij=function(n,t,e,i,r){return new XZ(this,n,t,e,i,r)},uZn.Jj=function(n){Msn(this.jj(),n)},uZn.Kj=function(){return null},uZn.Lj=function(){return-1},uZn.jj=function(){return null},uZn.Mj=function(){return!1},uZn.Tj=function(){return!1},uZn.Nj=function(n,t){return t},uZn.Oj=function(n,t){return t},uZn.Pj=function(){return!1},uZn.Qj=function(){return 0!=this.i},uZn.Ti=function(n,t){return zdn(this,n,t)},uZn.gd=function(n){return e_n(this,n)},uZn.Xi=function(n,t){return Pqn(this,n,t)},uZn.Uj=function(n,t){return t},uZn.Vj=function(n,t){return t},uZn.Wj=function(n,t,e){return e},zW(Utt,"NotifyingListImpl",2091),sDn(1187,152,Bit,XZ),uZn.Kj=function(){return this.a.Kj()},uZn.hj=function(n){return this.a.Lj()},uZn.jj=function(){return this.a.jj()},zW(Utt,"NotifyingListImpl/1",1187),sDn(966,66,Qet,cF),uZn.Hc=function(n){return this.i>10?(this.b&&this.c.j==this.a||(this.b=new oX(this),this.a=this.j),cS(this.b,n)):sSn(this,n)},uZn.Yi=function(){return!0},uZn.a=0,zW(Pet,"AbstractEList/1",966),sDn(302,77,v0n,w_),zW(Pet,"AbstractEList/BasicIndexOutOfBoundsException",302),sDn(37,1,$Zn,DD),uZn.Nb=function(n){SV(this,n)},uZn.Xj=function(){if(this.i.j!=this.f)throw hv(new Fv)},uZn.Yj=function(){return Zkn(this)},uZn.Ob=function(){return this.e!=this.i.gc()},uZn.Pb=function(){return this.Yj()},uZn.Qb=function(){$Sn(this)},uZn.e=0,uZn.f=0,uZn.g=-1,zW(Pet,"AbstractEList/EIterator",37),sDn(286,37,UZn,Zx,QV),uZn.Qb=function(){$Sn(this)},uZn.Rb=function(n){Smn(this,n)},uZn.Zj=function(){var n;try{return n=this.d.Xb(--this.e),this.Xj(),this.g=this.e,n}catch(t){throw F$(t=Ehn(t),77)?(this.Xj(),hv(new Bv)):hv(t)}},uZn.$j=function(n){cTn(this,n)},uZn.Sb=function(){return 0!=this.e},uZn.Tb=function(){return this.e},uZn.Ub=function(){return this.Zj()},uZn.Vb=function(){return this.e-1},uZn.Wb=function(n){this.$j(n)},zW(Pet,"AbstractEList/EListIterator",286),sDn(355,37,$Zn,nR),uZn.Yj=function(){return nyn(this)},uZn.Qb=function(){throw hv(new Kv)},zW(Pet,"AbstractEList/NonResolvingEIterator",355),sDn(398,286,UZn,tR,N_),uZn.Rb=function(n){throw hv(new Kv)},uZn.Yj=function(){var n;try{return n=this.c.Vi(this.e),this.Xj(),this.g=this.e++,n}catch(t){throw F$(t=Ehn(t),77)?(this.Xj(),hv(new Bv)):hv(t)}},uZn.Zj=function(){var n;try{return n=this.c.Vi(--this.e),this.Xj(),this.g=this.e,n}catch(t){throw F$(t=Ehn(t),77)?(this.Xj(),hv(new Bv)):hv(t)}},uZn.Qb=function(){throw hv(new Kv)},uZn.Wb=function(n){throw hv(new Kv)},zW(Pet,"AbstractEList/NonResolvingEListIterator",398),sDn(2080,70,Git),uZn.Ei=function(n,t){var e,i,r,c,a,o,u,s,h;if(0!=(i=t.gc())){for(e=zln(this,(s=null==(u=uG(Lsn(this.a,4),129))?0:u.length)+i),(h=s-n)>0&&qGn(u,n,e,n+i,h),o=t.Kc(),c=0;c<i;++c)XN(e,n+c,gln(this,a=o.Pb()));for(Pkn(this,e),r=0;r<i;++r)a=e[n],this.Mi(n,a),++n;return!0}return++this.j,!1},uZn.Fi=function(n){var t,e,i,r,c,a,o,u,s;if(0!=(i=n.gc())){for(t=zln(this,s=(u=null==(e=uG(Lsn(this.a,4),129))?0:e.length)+i),o=n.Kc(),c=u;c<s;++c)XN(t,c,gln(this,a=o.Pb()));for(Pkn(this,t),r=u;r<s;++r)a=t[r],this.Mi(r,a);return!0}return++this.j,!1},uZn.Gi=function(n,t){var e,i,r,c;e=zln(this,(r=null==(i=uG(Lsn(this.a,4),129))?0:i.length)+1),c=gln(this,t),n!=r&&qGn(i,n,e,n+1,r-n),uQ(e,n,c),Pkn(this,e),this.Mi(n,t)},uZn.Hi=function(n){var t,e,i;XN(t=zln(this,(i=null==(e=uG(Lsn(this.a,4),129))?0:e.length)+1),i,gln(this,n)),Pkn(this,t),this.Mi(i,n)},uZn.Ii=function(){return new T9(this)},uZn.Ji=function(){return new mV(this)},uZn.Ki=function(n){var t,e;if(e=null==(t=uG(Lsn(this.a,4),129))?0:t.length,n<0||n>e)throw hv(new w_(n,e));return new qJ(this,n)},uZn.$b=function(){var n,t;++this.j,t=null==(n=uG(Lsn(this.a,4),129))?0:n.length,Pkn(this,null),Ann(this,t,n)},uZn.Hc=function(n){var t,e,i,r;if(null!=(t=uG(Lsn(this.a,4),129)))if(null!=n){for(i=0,r=(e=t).length;i<r;++i)if(udn(n,e[i]))return!0}else for(i=0,r=(e=t).length;i<r;++i)if(xA(e[i])===xA(n))return!0;return!1},uZn.Xb=function(n){var t,e;if(n>=(e=null==(t=uG(Lsn(this.a,4),129))?0:t.length))throw hv(new w_(n,e));return t[n]},uZn.dd=function(n){var t,e,i;if(null!=(t=uG(Lsn(this.a,4),129)))if(null!=n){for(e=0,i=t.length;e<i;++e)if(udn(n,t[e]))return e}else for(e=0,i=t.length;e<i;++e)if(xA(t[e])===xA(n))return e;return-1},uZn.dc=function(){return null==uG(Lsn(this.a,4),129)},uZn.Kc=function(){return new M9(this)},uZn.ed=function(){return new pV(this)},uZn.fd=function(n){var t,e;if(e=null==(t=uG(Lsn(this.a,4),129))?0:t.length,n<0||n>e)throw hv(new w_(n,e));return new GJ(this,n)},uZn.Ti=function(n,t){var e,i,r;if(n>=(r=null==(e=lvn(this))?0:e.length))throw hv(new dM(zet+n+Vet+r));if(t>=r)throw hv(new dM(Wet+t+Vet+r));return i=e[t],n!=t&&(n<t?qGn(e,n,e,n+1,t-n):qGn(e,t+1,e,t,n-t),uQ(e,n,i),Pkn(this,e)),i},uZn.Vi=function(n){return uG(Lsn(this.a,4),129)[n]},uZn.gd=function(n){return g$n(this,n)},uZn.Xi=function(n,t){var e,i;return i=(e=lvn(this))[n],XN(e,n,gln(this,t)),Pkn(this,e),i},uZn.gc=function(){var n;return null==(n=uG(Lsn(this.a,4),129))?0:n.length},uZn.Pc=function(){var n,t,e;return e=null==(n=uG(Lsn(this.a,4),129))?0:n.length,t=Inn(xFt,Uit,424,e,0,1),e>0&&qGn(n,0,t,0,e),t},uZn.Qc=function(n){var t,e;return(e=null==(t=uG(Lsn(this.a,4),129))?0:t.length)>0&&(n.length<e&&(n=Acn(Tbn(n).c,e)),qGn(t,0,n,0,e)),n.length>e&&uQ(n,e,null),n},zW(Pet,"ArrayDelegatingEList",2080),sDn(1051,37,$Zn,M9),uZn.Xj=function(){if(this.b.j!=this.f||xA(uG(Lsn(this.b.a,4),129))!==xA(this.a))throw hv(new Fv)},uZn.Qb=function(){$Sn(this),this.a=uG(Lsn(this.b.a,4),129)},zW(Pet,"ArrayDelegatingEList/EIterator",1051),sDn(722,286,UZn,pV,GJ),uZn.Xj=function(){if(this.b.j!=this.f||xA(uG(Lsn(this.b.a,4),129))!==xA(this.a))throw hv(new Fv)},uZn.$j=function(n){cTn(this,n),this.a=uG(Lsn(this.b.a,4),129)},uZn.Qb=function(){$Sn(this),this.a=uG(Lsn(this.b.a,4),129)},zW(Pet,"ArrayDelegatingEList/EListIterator",722),sDn(1052,355,$Zn,T9),uZn.Xj=function(){if(this.b.j!=this.f||xA(uG(Lsn(this.b.a,4),129))!==xA(this.a))throw hv(new Fv)},zW(Pet,"ArrayDelegatingEList/NonResolvingEIterator",1052),sDn(723,398,UZn,mV,qJ),uZn.Xj=function(){if(this.b.j!=this.f||xA(uG(Lsn(this.b.a,4),129))!==xA(this.a))throw hv(new Fv)},zW(Pet,"ArrayDelegatingEList/NonResolvingEListIterator",723),sDn(615,302,v0n,pL),zW(Pet,"BasicEList/BasicIndexOutOfBoundsException",615),sDn(710,66,Qet,AA),uZn.bd=function(n,t){throw hv(new Kv)},uZn.Fc=function(n){throw hv(new Kv)},uZn.cd=function(n,t){throw hv(new Kv)},uZn.Gc=function(n){throw hv(new Kv)},uZn.$b=function(){throw hv(new Kv)},uZn._i=function(n){throw hv(new Kv)},uZn.Kc=function(){return this.Ii()},uZn.ed=function(){return this.Ji()},uZn.fd=function(n){return this.Ki(n)},uZn.Ti=function(n,t){throw hv(new Kv)},uZn.Ui=function(n,t){throw hv(new Kv)},uZn.gd=function(n){throw hv(new Kv)},uZn.Mc=function(n){throw hv(new Kv)},uZn.hd=function(n,t){throw hv(new Kv)},zW(Pet,"BasicEList/UnmodifiableEList",710),sDn(721,1,{3:1,20:1,16:1,15:1,61:1,597:1}),uZn.bd=function(n,t){Y$(this,n,uG(t,44))},uZn.Fc=function(n){return YR(this,uG(n,44))},uZn.Jc=function(n){z8(this,n)},uZn.Xb=function(n){return uG(zrn(this.c,n),136)},uZn.Ti=function(n,t){return uG(this.c.Ti(n,t),44)},uZn.Ui=function(n,t){Z$(this,n,uG(t,44))},uZn.Lc=function(){return new fX(null,new h3(this,16))},uZn.gd=function(n){return uG(this.c.gd(n),44)},uZn.hd=function(n,t){return EW(this,n,uG(t,44))},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.Oc=function(){return new fX(null,new h3(this,16))},uZn.cd=function(n,t){return this.c.cd(n,t)},uZn.Gc=function(n){return this.c.Gc(n)},uZn.$b=function(){this.c.$b()},uZn.Hc=function(n){return this.c.Hc(n)},uZn.Ic=function(n){return yhn(this.c,n)},uZn._j=function(){var n,t;if(null==this.d){for(this.d=Inn(IFt,qit,66,2*this.f+1,0,1),t=this.e,this.f=0,n=this.c.Kc();n.e!=n.i.gc();)bMn(this,uG(n.Yj(),136));this.e=t}},uZn.Fb=function(n){return H_(this,n)},uZn.Hb=function(){return Bhn(this.c)},uZn.dd=function(n){return this.c.dd(n)},uZn.ak=function(){this.c=new Im(this)},uZn.dc=function(){return 0==this.f},uZn.Kc=function(){return this.c.Kc()},uZn.ed=function(){return this.c.ed()},uZn.fd=function(n){return this.c.fd(n)},uZn.bk=function(){return Tnn(this)},uZn.ck=function(n,t,e){return new xU(n,t,e)},uZn.dk=function(){return new ws},uZn.Mc=function(n){return uan(this,n)},uZn.gc=function(){return this.f},uZn.kd=function(n,t){return new C2(this.c,n,t)},uZn.Pc=function(){return this.c.Pc()},uZn.Qc=function(n){return this.c.Qc(n)},uZn.Ib=function(){return Tpn(this.c)},uZn.e=0,uZn.f=0,zW(Pet,"BasicEMap",721),sDn(1046,66,Qet,Im),uZn.Mi=function(n,t){Qv(this,uG(t,136))},uZn.Pi=function(n,t,e){var i;++(i=this,uG(t,136),i).a.e},uZn.Qi=function(n,t){Jv(this,uG(t,136))},uZn.Ri=function(n,t,e){fR(this,uG(t,136),uG(e,136))},uZn.Oi=function(n,t){Osn(this.a)},zW(Pet,"BasicEMap/1",1046),sDn(1047,66,Qet,ws),uZn.aj=function(n){return Inn(FFt,Xit,621,n,0,1)},zW(Pet,"BasicEMap/2",1047),sDn(1048,KZn,FZn,Om),uZn.$b=function(){this.a.c.$b()},uZn.Hc=function(n){return ymn(this.a,n)},uZn.Kc=function(){return 0==this.a.f?(EK(),KFt.a):new aj(this.a)},uZn.Mc=function(n){var t;return t=this.a.f,Svn(this.a,n),this.a.f!=t},uZn.gc=function(){return this.a.f},zW(Pet,"BasicEMap/3",1048),sDn(1049,31,RZn,Am),uZn.$b=function(){this.a.c.$b()},uZn.Hc=function(n){return q_n(this.a,n)},uZn.Kc=function(){return 0==this.a.f?(EK(),KFt.a):new oj(this.a)},uZn.gc=function(){return this.a.f},zW(Pet,"BasicEMap/4",1049),sDn(1050,KZn,FZn,Lm),uZn.$b=function(){this.a.c.$b()},uZn.Hc=function(n){var t,e,i,r,c,a,o,u,s;if(this.a.f>0&&F$(n,44)&&(this.a._j(),r=null==(o=(u=uG(n,44)).ld())?0:Hon(o),c=iF(this.a,r),t=this.a.d[c]))for(e=uG(t.g,379),s=t.i,a=0;a<s;++a)if((i=e[a]).Bi()==r&&i.Fb(u))return!0;return!1},uZn.Kc=function(){return 0==this.a.f?(EK(),KFt.a):new HY(this.a)},uZn.Mc=function(n){return MDn(this,n)},uZn.gc=function(){return this.a.f},zW(Pet,"BasicEMap/5",1050),sDn(622,1,$Zn,HY),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return-1!=this.b},uZn.Pb=function(){var n;if(this.f.e!=this.c)throw hv(new Fv);if(-1==this.b)throw hv(new Bv);return this.d=this.a,this.e=this.b,XEn(this),n=uG(this.f.d[this.d].g[this.e],136),this.ek(n)},uZn.Qb=function(){if(this.f.e!=this.c)throw hv(new Fv);if(-1==this.e)throw hv(new xv);this.f.c.Mc(zrn(this.f.d[this.d],this.e)),this.c=this.f.e,this.e=-1,this.a==this.d&&-1!=this.b&&--this.b},uZn.ek=function(n){return n},uZn.a=0,uZn.b=-1,uZn.c=0,uZn.d=0,uZn.e=0,zW(Pet,"BasicEMap/BasicEMapIterator",622),sDn(1044,622,$Zn,aj),uZn.ek=function(n){return n.ld()},zW(Pet,"BasicEMap/BasicEMapKeyIterator",1044),sDn(1045,622,$Zn,oj),uZn.ek=function(n){return n.md()},zW(Pet,"BasicEMap/BasicEMapValueIterator",1045),sDn(1043,1,xZn,Nm),uZn.wc=function(n){Yun(this,n)},uZn.yc=function(n,t,e){return Jgn(this,n,t,e)},uZn.$b=function(){this.a.c.$b()},uZn._b=function(n){return dA(this,n)},uZn.uc=function(n){return q_n(this.a,n)},uZn.vc=function(){return Enn(this.a)},uZn.Fb=function(n){return H_(this.a,n)},uZn.xc=function(n){return Lmn(this.a,n)},uZn.Hb=function(){return Bhn(this.a.c)},uZn.dc=function(){return 0==this.a.f},uZn.ec=function(){return Mnn(this.a)},uZn.zc=function(n,t){return rSn(this.a,n,t)},uZn.Bc=function(n){return Svn(this.a,n)},uZn.gc=function(){return this.a.f},uZn.Ib=function(){return Tpn(this.a.c)},uZn.Cc=function(){return jnn(this.a)},zW(Pet,"BasicEMap/DelegatingMap",1043),sDn(621,1,{44:1,136:1,621:1},xU),uZn.Fb=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),(null!=this.b?udn(this.b,t.ld()):xA(this.b)===xA(t.ld()))&&(null!=this.c?udn(this.c,t.md()):xA(this.c)===xA(t.md())))},uZn.Bi=function(){return this.a},uZn.ld=function(){return this.b},uZn.md=function(){return this.c},uZn.Hb=function(){return this.a^(null==this.c?0:Hon(this.c))},uZn.Ci=function(n){this.a=n},uZn.Di=function(n){throw hv(new Ov)},uZn.nd=function(n){var t;return t=this.c,this.c=n,t},uZn.Ib=function(){return this.b+"->"+this.c},uZn.a=0;var KFt,FFt=zW(Pet,"BasicEMap/EntryImpl",621);sDn(546,1,{},ds),zW(Pet,"BasicEMap/View",546),sDn(783,1,{}),uZn.Fb=function(n){return PDn((hZ(),zot),n)},uZn.Hb=function(){return Zfn((hZ(),zot))},uZn.Ib=function(){return vIn((hZ(),zot))},zW(Pet,"ECollections/BasicEmptyUnmodifiableEList",783),sDn(1348,1,UZn,gs),uZn.Nb=function(n){SV(this,n)},uZn.Rb=function(n){throw hv(new Kv)},uZn.Ob=function(){return!1},uZn.Sb=function(){return!1},uZn.Pb=function(){throw hv(new Bv)},uZn.Tb=function(){return 0},uZn.Ub=function(){throw hv(new Bv)},uZn.Vb=function(){return-1},uZn.Qb=function(){throw hv(new Kv)},uZn.Wb=function(n){throw hv(new Kv)},zW(Pet,"ECollections/BasicEmptyUnmodifiableEList/1",1348),sDn(1346,783,{20:1,16:1,15:1,61:1},Gk),uZn.bd=function(n,t){iE()},uZn.Fc=function(n){return rE()},uZn.cd=function(n,t){return cE()},uZn.Gc=function(n){return aE()},uZn.$b=function(){oE()},uZn.Hc=function(n){return!1},uZn.Ic=function(n){return!1},uZn.Jc=function(n){z8(this,n)},uZn.Xb=function(n){return oL((hZ(),n)),null},uZn.dd=function(n){return-1},uZn.dc=function(){return!0},uZn.Kc=function(){return this.a},uZn.ed=function(){return this.a},uZn.fd=function(n){return this.a},uZn.Ti=function(n,t){return uE()},uZn.Ui=function(n,t){sE()},uZn.Lc=function(){return new fX(null,new h3(this,16))},uZn.gd=function(n){return hE()},uZn.Mc=function(n){return fE()},uZn.hd=function(n,t){return lE()},uZn.gc=function(){return 0},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.Oc=function(){return new fX(null,new h3(this,16))},uZn.kd=function(n,t){return hZ(),new C2(zot,n,t)},uZn.Pc=function(){return Sz((hZ(),zot))},uZn.Qc=function(n){return hZ(),oTn(zot,n)},zW(Pet,"ECollections/EmptyUnmodifiableEList",1346),sDn(1347,783,{20:1,16:1,15:1,61:1,597:1},qk),uZn.bd=function(n,t){iE()},uZn.Fc=function(n){return rE()},uZn.cd=function(n,t){return cE()},uZn.Gc=function(n){return aE()},uZn.$b=function(){oE()},uZn.Hc=function(n){return!1},uZn.Ic=function(n){return!1},uZn.Jc=function(n){z8(this,n)},uZn.Xb=function(n){return oL((hZ(),n)),null},uZn.dd=function(n){return-1},uZn.dc=function(){return!0},uZn.Kc=function(){return this.a},uZn.ed=function(){return this.a},uZn.fd=function(n){return this.a},uZn.Ti=function(n,t){return uE()},uZn.Ui=function(n,t){sE()},uZn.Lc=function(){return new fX(null,new h3(this,16))},uZn.gd=function(n){return hE()},uZn.Mc=function(n){return fE()},uZn.hd=function(n,t){return lE()},uZn.gc=function(){return 0},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.Oc=function(){return new fX(null,new h3(this,16))},uZn.kd=function(n,t){return hZ(),new C2(zot,n,t)},uZn.Pc=function(){return Sz((hZ(),zot))},uZn.Qc=function(n){return hZ(),oTn(zot,n)},uZn.bk=function(){return hZ(),hZ(),Vot},zW(Pet,"ECollections/EmptyUnmodifiableEMap",1347);var _Ft,BFt=Iq(Pet,"Enumerator");sDn(288,1,{288:1},Z_n),uZn.Fb=function(n){var t;return this===n||!!F$(n,288)&&(t=uG(n,288),this.f==t.f&&yX(this.i,t.i)&&kX(this.a,256&this.f?256&t.f?t.a:null:256&t.f?null:t.a)&&kX(this.d,t.d)&&kX(this.g,t.g)&&kX(this.e,t.e)&&Ykn(this,t))},uZn.Hb=function(){return this.f},uZn.Ib=function(){return xUn(this)},uZn.f=0;var HFt,UFt,GFt,qFt=0,XFt=0,zFt=0,VFt=0,WFt=0,QFt=0,JFt=0,YFt=0,ZFt=0,n_t=0,t_t=0,e_t=0,i_t=0;zW(Pet,"URI",288),sDn(1121,45,B0n,Xk),uZn.zc=function(n,t){return uG(r2(this,mK(n),uG(t,288)),288)},zW(Pet,"URI/URICache",1121),sDn(506,66,Qet,us,$X),uZn.Si=function(){return!0},zW(Pet,"UniqueEList",506),sDn(590,63,S1n,Pen),zW(Pet,"WrappedException",590);var r_t,c_t=Iq(Itt,Wit),a_t=Iq(Itt,Qit),o_t=Iq(Itt,Jit),u_t=Iq(Itt,Yit),s_t=Iq(Itt,Zit),h_t=Iq(Itt,"EClass"),f_t=Iq(Itt,"EDataType");sDn(1233,45,B0n,zk),uZn.xc=function(n){return RA(n)?U1(this,n):DA(FX(this.f,n))},zW(Itt,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1233);var l_t,b_t,w_t=Iq(Itt,"EEnum"),d_t=Iq(Itt,nrt),g_t=Iq(Itt,trt),p_t=Iq(Itt,ert),m_t=Iq(Itt,irt),v_t=Iq(Itt,rrt);sDn(1042,1,{},os),uZn.Ib=function(){return"NIL"},zW(Itt,"EStructuralFeature/Internal/DynamicValueHolder/1",1042),sDn(1041,45,B0n,Vk),uZn.xc=function(n){return RA(n)?U1(this,n):DA(FX(this.f,n))},zW(Itt,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",1041);var k_t,y_t,M_t,T_t,j_t,E_t,S_t,P_t,C_t,I_t,O_t,A_t,L_t,N_t,$_t,D_t,x_t,R_t,K_t,F_t,__t,B_t,H_t,U_t,G_t,q_t,X_t,z_t,V_t,W_t,Q_t,J_t=Iq(Itt,crt),Y_t=Iq(Itt,"EValidator/PatternMatcher"),Z_t=Iq(art,"FeatureMap/Entry");sDn(545,1,{76:1},TA),uZn.Lk=function(){return this.a},uZn.md=function(){return this.b},zW(Ytt,"BasicEObjectImpl/1",545),sDn(1040,1,ort,jA),uZn.Fk=function(n){return U9(this.a,this.b,n)},uZn.Qj=function(){return M0(this.a,this.b)},uZn.Wb=function(n){y0(this.a,this.b,n)},uZn.Gk=function(){VQ(this.a,this.b)},zW(Ytt,"BasicEObjectImpl/4",1040),sDn(2081,1,{114:1}),uZn.Mk=function(n){this.e=0==n?X_t:Inn(dat,EZn,1,n,5,1)},uZn.li=function(n){return this.e[n]},uZn.mi=function(n,t){this.e[n]=t},uZn.ni=function(n){this.e[n]=null},uZn.Nk=function(){return this.c},uZn.Ok=function(){throw hv(new Kv)},uZn.Pk=function(){throw hv(new Kv)},uZn.Qk=function(){return this.d},uZn.Rk=function(){return null!=this.e},uZn.Sk=function(n){this.c=n},uZn.Tk=function(n){throw hv(new Kv)},uZn.Uk=function(n){throw hv(new Kv)},uZn.Vk=function(n){this.d=n},zW(Ytt,"BasicEObjectImpl/EPropertiesHolderBaseImpl",2081),sDn(192,2081,{114:1},Ll),uZn.Ok=function(){return this.a},uZn.Pk=function(){return this.b},uZn.Tk=function(n){this.a=n},uZn.Uk=function(n){this.b=n},zW(Ytt,"BasicEObjectImpl/EPropertiesHolderImpl",192),sDn(516,99,Jtt,ps),uZn.uh=function(){return this.f},uZn.zh=function(){return this.k},uZn.Bh=function(n,t){this.g=n,this.i=t},uZn.Dh=function(){return 2&this.j?this.$h().Nk():this.ii()},uZn.Fh=function(){return this.i},uZn.wh=function(){return!!(1&this.j)},uZn.Ph=function(){return this.g},uZn.Vh=function(){return!!(4&this.j)},uZn.$h=function(){return!this.k&&(this.k=new Ll),this.k},uZn.ci=function(n){this.$h().Sk(n),n?this.j|=2:this.j&=-3},uZn.ei=function(n){this.$h().Uk(n),n?this.j|=4:this.j&=-5},uZn.ii=function(){return(tQ(),M_t).S},uZn.i=0,uZn.j=1,zW(Ytt,"EObjectImpl",516),sDn(798,516,{110:1,94:1,93:1,58:1,114:1,54:1,99:1},BG),uZn.li=function(n){return this.e[n]},uZn.mi=function(n,t){this.e[n]=t},uZn.ni=function(n){this.e[n]=null},uZn.Dh=function(){return this.d},uZn.Ih=function(n){return emn(this.d,n)},uZn.Kh=function(){return this.d},uZn.Oh=function(){return null!=this.e},uZn.$h=function(){return!this.k&&(this.k=new ms),this.k},uZn.ci=function(n){this.d=n},uZn.hi=function(){var n;return null==this.e&&(n=iQ(this.d),this.e=0==n?z_t:Inn(dat,EZn,1,n,5,1)),this},uZn.ji=function(){return 0},zW(Ytt,"DynamicEObjectImpl",798),sDn(1522,798,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1},Eq),uZn.Fb=function(n){return this===n},uZn.Hb=function(){return xx(this)},uZn.ci=function(n){this.d=n,this.b=EKn(n,"key"),this.c=EKn(n,uet)},uZn.Bi=function(){var n;return-1==this.a&&(n=zen(this,this.b),this.a=null==n?0:Hon(n)),this.a},uZn.ld=function(){return zen(this,this.b)},uZn.md=function(){return zen(this,this.c)},uZn.Ci=function(n){this.a=n},uZn.Di=function(n){y0(this,this.b,n)},uZn.nd=function(n){var t;return t=zen(this,this.c),y0(this,this.c,n),t},uZn.a=0,zW(Ytt,"DynamicEObjectImpl/BasicEMapEntry",1522),sDn(1523,1,{114:1},ms),uZn.Mk=function(n){throw hv(new Kv)},uZn.li=function(n){throw hv(new Kv)},uZn.mi=function(n,t){throw hv(new Kv)},uZn.ni=function(n){throw hv(new Kv)},uZn.Nk=function(){throw hv(new Kv)},uZn.Ok=function(){return this.a},uZn.Pk=function(){return this.b},uZn.Qk=function(){return this.c},uZn.Rk=function(){throw hv(new Kv)},uZn.Sk=function(n){throw hv(new Kv)},uZn.Tk=function(n){this.a=n},uZn.Uk=function(n){this.b=n},uZn.Vk=function(n){this.c=n},zW(Ytt,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1523),sDn(519,158,{110:1,94:1,93:1,598:1,155:1,58:1,114:1,54:1,99:1,519:1,158:1,119:1,120:1},vs),uZn.Ah=function(n){return Yjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.d;case 2:return e?(!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),this.b):(!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),Tnn(this.b));case 3:return F0(this);case 4:return!this.a&&(this.a=new MD(nFt,this,4)),this.a;case 5:return!this.c&&(this.c=new OD(nFt,this,5)),this.c}return $tn(this,n-iQ((YYn(),T_t)),ern(uG(Lsn(this,16),29)||T_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 3:return this.Cb&&(e=(i=this.Db>>16)>=0?Yjn(this,e):this.Cb.Th(this,-1-i,null,e)),gz(this,uG(n,155),e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),T_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),T_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 2:return!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),G_(this.b,n,e);case 3:return gz(this,null,e);case 4:return!this.a&&(this.a=new MD(nFt,this,4)),Nyn(this.a,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),T_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),T_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.d;case 2:return!!this.b&&0!=this.b.f;case 3:return!!F0(this);case 4:return!!this.a&&0!=this.a.i;case 5:return!!this.c&&0!=this.c.i}return l5(this,n-iQ((YYn(),T_t)),ern(uG(Lsn(this,16),29)||T_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void xq(this,mK(t));case 2:return!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),void Jun(this.b,t);case 3:return void kKn(this,uG(t,155));case 4:return!this.a&&(this.a=new MD(nFt,this,4)),Czn(this.a),!this.a&&(this.a=new MD(nFt,this,4)),void CW(this.a,uG(t,16));case 5:return!this.c&&(this.c=new OD(nFt,this,5)),Czn(this.c),!this.c&&(this.c=new OD(nFt,this,5)),void CW(this.c,uG(t,16))}lpn(this,n-iQ((YYn(),T_t)),ern(uG(Lsn(this,16),29)||T_t,n),t)},uZn.ii=function(){return YYn(),T_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void Yan(this,null);case 2:return!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),void this.b.c.$b();case 3:return void kKn(this,null);case 4:return!this.a&&(this.a=new MD(nFt,this,4)),void Czn(this.a);case 5:return!this.c&&(this.c=new OD(nFt,this,5)),void Czn(this.c)}sdn(this,n-iQ((YYn(),T_t)),ern(uG(Lsn(this,16),29)||T_t,n))},uZn.Ib=function(){return fdn(this)},uZn.d=null,zW(Ytt,"EAnnotationImpl",519),sDn(141,721,urt,ltn),uZn.Gi=function(n,t){qN(this,n,uG(t,44))},uZn.Wk=function(n,t){return U_(this,uG(n,44),t)},uZn.$i=function(n){return uG(uG(this.c,71).$i(n),136)},uZn.Ii=function(){return uG(this.c,71).Ii()},uZn.Ji=function(){return uG(this.c,71).Ji()},uZn.Ki=function(n){return uG(this.c,71).Ki(n)},uZn.Xk=function(n,t){return G_(this,n,t)},uZn.Fk=function(n){return uG(this.c,79).Fk(n)},uZn.ak=function(){},uZn.Qj=function(){return uG(this.c,79).Qj()},uZn.ck=function(n,t,e){var i;return(i=uG(Hrn(this.b).wi().si(this.b),136)).Ci(n),i.Di(t),i.nd(e),i},uZn.dk=function(){return new Vm(this)},uZn.Wb=function(n){Jun(this,n)},uZn.Gk=function(){uG(this.c,79).Gk()},zW(art,"EcoreEMap",141),sDn(165,141,urt,XR),uZn._j=function(){var n,t,e,i,r;if(null==this.d){for(r=Inn(IFt,qit,66,2*this.f+1,0,1),e=this.c.Kc();e.e!=e.i.gc();)!(n=r[i=((t=uG(e.Yj(),136)).Bi()&vZn)%r.length])&&(n=r[i]=new Vm(this)),n.Fc(t);this.d=r}},zW(Ytt,"EAnnotationImpl/1",165),sDn(292,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,481:1,54:1,99:1,158:1,292:1,119:1,120:1}),uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),!!this.Jk();case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 9:return IW(this,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().Ak(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return this.Jk();case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i)}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void this.ui(mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void this.Zk(uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj())}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),G_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void this.ui(null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return void this.Zk(1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj())}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.pi=function(){bEn(this),this.Bb|=1},uZn.Hk=function(){return bEn(this)},uZn.Ik=function(){return this.t},uZn.Jk=function(){var n;return(n=this.t)>1||-1==n},uZn.Si=function(){return!!(512&this.Bb)},uZn.Yk=function(n,t){return Ywn(this,n,t)},uZn.Zk=function(n){Ccn(this,n)},uZn.Ib=function(){return L$n(this)},uZn.s=0,uZn.t=1,zW(Ytt,"ETypedElementImpl",292),sDn(462,292,{110:1,94:1,93:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,462:1,292:1,119:1,120:1,692:1}),uZn.Ah=function(n){return pjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),!!this.Jk();case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return qx(),!!(this.Bb&w1n);case 11:return qx(),!!(this.Bb&frt);case 12:return qx(),!!(this.Bb&j0n);case 13:return this.j;case 14:return NRn(this);case 15:return qx(),!!(this.Bb&hrt);case 16:return qx(),!!(this.Bb&VZn);case 17:return K0(this)}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 17:return this.Cb&&(e=(i=this.Db>>16)>=0?pjn(this,e):this.Cb.Th(this,-1-i,null,e)),DUn(this,n,17,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().zk(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 9:return IW(this,e);case 17:return DUn(this,null,17,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().Ak(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return this.Jk();case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return!(this.Bb&w1n);case 11:return!!(this.Bb&frt);case 12:return!!(this.Bb&j0n);case 13:return null!=this.j;case 14:return null!=NRn(this);case 15:return!!(this.Bb&hrt);case 16:return!!(this.Bb&VZn);case 17:return!!K0(this)}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void g2(this,mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void this.Zk(uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj());case 10:return void Wdn(this,oM(gK(t)));case 11:return void Ydn(this,oM(gK(t)));case 12:return void Qdn(this,oM(gK(t)));case 13:return void mA(this,mK(t));case 15:return void Jdn(this,oM(gK(t)));case 16:return void Cgn(this,oM(gK(t)))}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),U_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,90)&&yLn(y9(uG(this.Cb,90)),4),void qon(this,null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return void this.Zk(1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj());case 10:return void Wdn(this,!0);case 11:return void Ydn(this,!1);case 12:return void Qdn(this,!1);case 13:return this.i=null,void lon(this,null);case 15:return void Jdn(this,!1);case 16:return void Cgn(this,!1)}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.pi=function(){BJ(Nen((gAn(),kBt),this)),bEn(this),this.Bb|=1},uZn.pk=function(){return this.f},uZn.ik=function(){return NRn(this)},uZn.qk=function(){return K0(this)},uZn.uk=function(){return null},uZn.$k=function(){return this.k},uZn.Lj=function(){return this.n},uZn.vk=function(){return qSn(this)},uZn.wk=function(){var n,t,e,i,r,c,a,o,u;return this.p||((null==(e=K0(this)).i&&eqn(e),e.i).length,(i=this.uk())&&iQ(K0(i)),n=(a=(r=bEn(this)).kk())?1&a.i?a==ZHt?cot:a==YHt?dot:a==iUt?lot:a==eUt?fot:a==nUt?yot:a==rUt?Tot:a==tUt?uot:hot:a:null,t=NRn(this),o=r.ik(),Vgn(this),this.Bb&VZn&&((c=cSn((gAn(),kBt),e))&&c!=this||(c=_3(Nen(kBt,this))))?this.p=new SA(this,c):this.Jk()?this.al()?i?this.Bb&hrt?n?this.bl()?this.p=new CY(47,n,this,i):this.p=new CY(5,n,this,i):this.bl()?this.p=new r8(46,this,i):this.p=new r8(4,this,i):n?this.bl()?this.p=new CY(49,n,this,i):this.p=new CY(7,n,this,i):this.bl()?this.p=new r8(48,this,i):this.p=new r8(6,this,i):this.Bb&hrt?n?n==Sat?this.p=new RU(50,gFt,this):this.bl()?this.p=new RU(43,n,this):this.p=new RU(1,n,this):this.bl()?this.p=new GZ(42,this):this.p=new GZ(0,this):n?n==Sat?this.p=new RU(41,gFt,this):this.bl()?this.p=new RU(45,n,this):this.p=new RU(3,n,this):this.bl()?this.p=new GZ(44,this):this.p=new GZ(2,this):F$(r,156)?n==Z_t?this.p=new GZ(40,this):512&this.Bb?this.Bb&hrt?this.p=n?new RU(9,n,this):new GZ(8,this):this.p=n?new RU(11,n,this):new GZ(10,this):this.Bb&hrt?this.p=n?new RU(13,n,this):new GZ(12,this):this.p=n?new RU(15,n,this):new GZ(14,this):i?(u=i.t)>1||-1==u?this.bl()?this.Bb&hrt?this.p=n?new CY(25,n,this,i):new r8(24,this,i):this.p=n?new CY(27,n,this,i):new r8(26,this,i):this.Bb&hrt?this.p=n?new CY(29,n,this,i):new r8(28,this,i):this.p=n?new CY(31,n,this,i):new r8(30,this,i):this.bl()?this.Bb&hrt?this.p=n?new CY(33,n,this,i):new r8(32,this,i):this.p=n?new CY(35,n,this,i):new r8(34,this,i):this.Bb&hrt?this.p=n?new CY(37,n,this,i):new r8(36,this,i):this.p=n?new CY(39,n,this,i):new r8(38,this,i):this.bl()?this.Bb&hrt?this.p=n?new RU(17,n,this):new GZ(16,this):this.p=n?new RU(19,n,this):new GZ(18,this):this.Bb&hrt?this.p=n?new RU(21,n,this):new GZ(20,this):this.p=n?new RU(23,n,this):new GZ(22,this):this._k()?this.bl()?this.p=new KU(uG(r,29),this,i):this.p=new _1(uG(r,29),this,i):F$(r,156)?n==Z_t?this.p=new GZ(40,this):this.Bb&hrt?this.p=n?new bz(t,o,this,(Pmn(),a==YHt?hBt:a==ZHt?cBt:a==nUt?fBt:a==iUt?sBt:a==eUt?uBt:a==rUt?bBt:a==tUt?aBt:a==JHt?oBt:lBt)):new AY(uG(r,156),t,o,this):this.p=n?new lz(t,o,this,(Pmn(),a==YHt?hBt:a==ZHt?cBt:a==nUt?fBt:a==iUt?sBt:a==eUt?uBt:a==rUt?bBt:a==tUt?aBt:a==JHt?oBt:lBt)):new OY(uG(r,156),t,o,this):this.al()?i?this.Bb&hrt?this.bl()?this.p=new GU(uG(r,29),this,i):this.p=new UU(uG(r,29),this,i):this.bl()?this.p=new HU(uG(r,29),this,i):this.p=new FU(uG(r,29),this,i):this.Bb&hrt?this.bl()?this.p=new cK(uG(r,29),this):this.p=new iK(uG(r,29),this):this.bl()?this.p=new eK(uG(r,29),this):this.p=new tK(uG(r,29),this):this.bl()?i?this.Bb&hrt?this.p=new qU(uG(r,29),this,i):this.p=new _U(uG(r,29),this,i):this.Bb&hrt?this.p=new aK(uG(r,29),this):this.p=new rK(uG(r,29),this):i?this.Bb&hrt?this.p=new XU(uG(r,29),this,i):this.p=new BU(uG(r,29),this,i):this.Bb&hrt?this.p=new oK(uG(r,29),this):this.p=new OX(uG(r,29),this)),this.p},uZn.rk=function(){return!!(this.Bb&w1n)},uZn._k=function(){return!1},uZn.al=function(){return!1},uZn.sk=function(){return!!(this.Bb&VZn)},uZn.xk=function(){return ein(this)},uZn.bl=function(){return!1},uZn.tk=function(){return!!(this.Bb&hrt)},uZn.cl=function(n){this.k=n},uZn.ui=function(n){g2(this,n)},uZn.Ib=function(){return MBn(this)},uZn.e=!1,uZn.n=0,zW(Ytt,"EStructuralFeatureImpl",462),sDn(331,462,{110:1,94:1,93:1,35:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,331:1,158:1,462:1,292:1,119:1,120:1,692:1},Wk),uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),!!SNn(this);case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return qx(),!!(this.Bb&w1n);case 11:return qx(),!!(this.Bb&frt);case 12:return qx(),!!(this.Bb&j0n);case 13:return this.j;case 14:return NRn(this);case 15:return qx(),!!(this.Bb&hrt);case 16:return qx(),!!(this.Bb&VZn);case 17:return K0(this);case 18:return qx(),!!(this.Bb&Qtt);case 19:return t?khn(this):E7(this)}return $tn(this,n-iQ((YYn(),j_t)),ern(uG(Lsn(this,16),29)||j_t,n),t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return SNn(this);case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return!(this.Bb&w1n);case 11:return!!(this.Bb&frt);case 12:return!!(this.Bb&j0n);case 13:return null!=this.j;case 14:return null!=NRn(this);case 15:return!!(this.Bb&hrt);case 16:return!!(this.Bb&VZn);case 17:return!!K0(this);case 18:return!!(this.Bb&Qtt);case 19:return!!E7(this)}return l5(this,n-iQ((YYn(),j_t)),ern(uG(Lsn(this,16),29)||j_t,n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void g2(this,mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void fj(this,uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj());case 10:return void Wdn(this,oM(gK(t)));case 11:return void Ydn(this,oM(gK(t)));case 12:return void Qdn(this,oM(gK(t)));case 13:return void mA(this,mK(t));case 15:return void Jdn(this,oM(gK(t)));case 16:return void Cgn(this,oM(gK(t)));case 18:return void Sgn(this,oM(gK(t)))}lpn(this,n-iQ((YYn(),j_t)),ern(uG(Lsn(this,16),29)||j_t,n),t)},uZn.ii=function(){return YYn(),j_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,90)&&yLn(y9(uG(this.Cb,90)),4),void qon(this,null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return this.b=0,void Ccn(this,1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj());case 10:return void Wdn(this,!0);case 11:return void Ydn(this,!1);case 12:return void Qdn(this,!1);case 13:return this.i=null,void lon(this,null);case 15:return void Jdn(this,!1);case 16:return void Cgn(this,!1);case 18:return void Sgn(this,!1)}sdn(this,n-iQ((YYn(),j_t)),ern(uG(Lsn(this,16),29)||j_t,n))},uZn.pi=function(){khn(this),BJ(Nen((gAn(),kBt),this)),bEn(this),this.Bb|=1},uZn.Jk=function(){return SNn(this)},uZn.Yk=function(n,t){return this.b=0,this.a=null,Ywn(this,n,t)},uZn.Zk=function(n){fj(this,n)},uZn.Ib=function(){var n;return 64&this.Db?MBn(this):((n=new fx(MBn(this))).a+=" (iD: ",Lj(n,!!(this.Bb&Qtt)),n.a+=")",n.a)},uZn.b=0,zW(Ytt,"EAttributeImpl",331),sDn(364,448,{110:1,94:1,93:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,158:1,119:1,120:1,691:1}),uZn.dl=function(n){return n.Dh()==this},uZn.Ah=function(n){return VTn(this,n)},uZn.Bh=function(n,t){this.w=null,this.Db=t<<16|255&this.Db,this.Cb=n},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return null!=this.D?this.D:this.B;case 3:return _Tn(this);case 4:return this.ik();case 5:return this.F;case 6:return t?Hrn(this):D0(this);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),this.A}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?VTn(this,e):this.Cb.Th(this,-1-i,null,e)),DUn(this,n,6,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().zk(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 6:return DUn(this,null,6,e);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Nyn(this.A,n,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().Ak(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!_Tn(this);case 4:return null!=this.ik();case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!D0(this);case 7:return!!this.A&&0!=this.A.i}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void d2(this,mK(t));case 2:return void pN(this,mK(t));case 5:return void TWn(this,mK(t));case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Czn(this.A),!this.A&&(this.A=new PD(J_t,this,7)),void CW(this.A,uG(t,16))}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),S_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,184)&&(uG(this.Cb,184).tb=null),void qon(this,null);case 2:return sbn(this,null),void Ocn(this,this.D);case 5:return void TWn(this,null);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),void Czn(this.A)}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.hk=function(){var n;return-1==this.G&&(this.G=(n=Hrn(this))?Hyn(n.vi(),this):-1),this.G},uZn.ik=function(){return null},uZn.jk=function(){return Hrn(this)},uZn.el=function(){return this.v},uZn.kk=function(){return _Tn(this)},uZn.lk=function(){return null!=this.D?this.D:this.B},uZn.mk=function(){return this.F},uZn.fk=function(n){return LGn(this,n)},uZn.fl=function(n){this.v=n},uZn.gl=function(n){tun(this,n)},uZn.hl=function(n){this.C=n},uZn.ui=function(n){d2(this,n)},uZn.Ib=function(){return pmn(this)},uZn.C=null,uZn.D=null,uZn.G=-1,zW(Ytt,"EClassifierImpl",364),sDn(90,364,{110:1,94:1,93:1,29:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,90:1,364:1,158:1,482:1,119:1,120:1,691:1},Kl),uZn.dl=function(n){return VF(this,n.Dh())},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return null!=this.D?this.D:this.B;case 3:return _Tn(this);case 4:return null;case 5:return this.F;case 6:return t?Hrn(this):D0(this);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),this.A;case 8:return qx(),!!(256&this.Bb);case 9:return qx(),!!(512&this.Bb);case 10:return n1(this);case 11:return!this.q&&(this.q=new fV(p_t,this,11,10)),this.q;case 12:return hXn(this);case 13:return Zqn(this);case 14:return Zqn(this),this.r;case 15:return hXn(this),this.k;case 16:return RAn(this);case 17:return $qn(this);case 18:return eqn(this);case 19:return mRn(this);case 20:return hXn(this),this.o;case 21:return!this.s&&(this.s=new fV(o_t,this,21,17)),this.s;case 22:return z5(this);case 23:return x_n(this)}return $tn(this,n-iQ((YYn(),E_t)),ern(uG(Lsn(this,16),29)||E_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?VTn(this,e):this.Cb.Th(this,-1-i,null,e)),DUn(this,n,6,e);case 11:return!this.q&&(this.q=new fV(p_t,this,11,10)),Nmn(this.q,n,e);case 21:return!this.s&&(this.s=new fV(o_t,this,21,17)),Nmn(this.s,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),E_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),E_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 6:return DUn(this,null,6,e);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Nyn(this.A,n,e);case 11:return!this.q&&(this.q=new fV(p_t,this,11,10)),Nyn(this.q,n,e);case 21:return!this.s&&(this.s=new fV(o_t,this,21,17)),Nyn(this.s,n,e);case 22:return Nyn(z5(this),n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),E_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),E_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!_Tn(this);case 4:return!1;case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!D0(this);case 7:return!!this.A&&0!=this.A.i;case 8:return!!(256&this.Bb);case 9:return!!(512&this.Bb);case 10:return!(!this.u||0==z5(this.u.a).i||this.n&&yMn(this.n));case 11:return!!this.q&&0!=this.q.i;case 12:return 0!=hXn(this).i;case 13:return 0!=Zqn(this).i;case 14:return Zqn(this),0!=this.r.i;case 15:return hXn(this),0!=this.k.i;case 16:return 0!=RAn(this).i;case 17:return 0!=$qn(this).i;case 18:return 0!=eqn(this).i;case 19:return 0!=mRn(this).i;case 20:return hXn(this),!!this.o;case 21:return!!this.s&&0!=this.s.i;case 22:return!!this.n&&yMn(this.n);case 23:return 0!=x_n(this).i}return l5(this,n-iQ((YYn(),E_t)),ern(uG(Lsn(this,16),29)||E_t,n))},uZn.Zh=function(n){return(null==this.i||this.q&&0!=this.q.i?null:EKn(this,n))||VQn(this,n)},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void d2(this,mK(t));case 2:return void pN(this,mK(t));case 5:return void TWn(this,mK(t));case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Czn(this.A),!this.A&&(this.A=new PD(J_t,this,7)),void CW(this.A,uG(t,16));case 8:return void gdn(this,oM(gK(t)));case 9:return void vdn(this,oM(gK(t)));case 10:return _zn(n1(this)),void CW(n1(this),uG(t,16));case 11:return!this.q&&(this.q=new fV(p_t,this,11,10)),Czn(this.q),!this.q&&(this.q=new fV(p_t,this,11,10)),void CW(this.q,uG(t,16));case 21:return!this.s&&(this.s=new fV(o_t,this,21,17)),Czn(this.s),!this.s&&(this.s=new fV(o_t,this,21,17)),void CW(this.s,uG(t,16));case 22:return Czn(z5(this)),void CW(z5(this),uG(t,16))}lpn(this,n-iQ((YYn(),E_t)),ern(uG(Lsn(this,16),29)||E_t,n),t)},uZn.ii=function(){return YYn(),E_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,184)&&(uG(this.Cb,184).tb=null),void qon(this,null);case 2:return sbn(this,null),void Ocn(this,this.D);case 5:return void TWn(this,null);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),void Czn(this.A);case 8:return void gdn(this,!1);case 9:return void vdn(this,!1);case 10:return void(this.u&&_zn(this.u));case 11:return!this.q&&(this.q=new fV(p_t,this,11,10)),void Czn(this.q);case 21:return!this.s&&(this.s=new fV(o_t,this,21,17)),void Czn(this.s);case 22:return void(this.n&&Czn(this.n))}sdn(this,n-iQ((YYn(),E_t)),ern(uG(Lsn(this,16),29)||E_t,n))},uZn.pi=function(){var n,t;if(hXn(this),Zqn(this),RAn(this),$qn(this),eqn(this),mRn(this),x_n(this),V9(iG(y9(this))),this.s)for(n=0,t=this.s.i;n<t;++n)lR(zrn(this.s,n));if(this.q)for(n=0,t=this.q.i;n<t;++n)lR(zrn(this.q,n));tdn((gAn(),kBt),this).xe(),this.Bb|=1},uZn.Ib=function(){return nPn(this)},uZn.k=null,uZn.r=null,zW(Ytt,"EClassImpl",90),sDn(2092,2091,Mrt),uZn.Ei=function(n,t){return BGn(this,n,t)},uZn.Fi=function(n){return BGn(this,this.i,n)},uZn.Gi=function(n,t){P$n(this,n,t)},uZn.Hi=function(n){V$n(this,n)},uZn.Wk=function(n,t){return Nmn(this,n,t)},uZn.$i=function(n){return Otn(this,n)},uZn.Xk=function(n,t){return Nyn(this,n,t)},uZn.Xi=function(n,t){return Pqn(this,n,t)},uZn.Ii=function(){return new nR(this)},uZn.Ji=function(){return new tR(this)},uZn.Ki=function(n){return han(this,n)},zW(art,"NotifyingInternalEListImpl",2092),sDn(632,2092,Trt),uZn.Hc=function(n){return Lzn(this,n)},uZn.Ij=function(n,t,e,i,r){return i2(this,n,t,e,i,r)},uZn.Jj=function(n){Yv(this,n)},uZn.Fk=function(n){return this},uZn.Lk=function(){return ern(this.e.Dh(),this.Lj())},uZn.Kj=function(){return this.Lk()},uZn.Lj=function(){return emn(this.e.Dh(),this.Lk())},uZn.il=function(){return uG(this.Lk().Hk(),29).kk()},uZn.jl=function(){return lMn(uG(this.Lk(),19)).n},uZn.jj=function(){return this.e},uZn.kl=function(){return!0},uZn.ll=function(){return!1},uZn.ml=function(){return!1},uZn.nl=function(){return!1},uZn.dd=function(n){return Hyn(this,n)},uZn.Nj=function(n,t){var e;return e=uG(n,54),this.ml()?this.kl()?e.Rh(this.e,this.jl(),this.il(),t):e.Rh(this.e,emn(e.Dh(),lMn(uG(this.Lk(),19))),null,t):e.Rh(this.e,-1-this.Lj(),null,t)},uZn.Oj=function(n,t){var e;return e=uG(n,54),this.ml()?this.kl()?e.Th(this.e,this.jl(),this.il(),t):e.Th(this.e,emn(e.Dh(),lMn(uG(this.Lk(),19))),null,t):e.Th(this.e,-1-this.Lj(),null,t)},uZn.al=function(){return!1},uZn.ol=function(){return!0},uZn.fk=function(n){return v5(this.d,n)},uZn.Pj=function(){return uN(this.e)},uZn.Qj=function(){return 0!=this.i},uZn.aj=function(n){return Acn(this.d,n)},uZn.Wi=function(n,t){return this.ol()&&this.nl()?R$n(this,n,uG(t,58)):t},uZn.pl=function(n){return n.Vh()?mwn(this.e,uG(n,54)):n},uZn.Wb=function(n){J$(this,n)},uZn.Pc=function(){return Jtn(this)},uZn.Qc=function(n){var t;if(this.nl())for(t=this.i-1;t>=0;--t)zrn(this,t);return gmn(this,n)},uZn.Gk=function(){Czn(this)},uZn.Zi=function(n,t){return Dcn(this,n,t)},zW(art,"EcoreEList",632),sDn(505,632,Trt,FG),uZn.Li=function(){return!1},uZn.Lj=function(){return this.c},uZn.Mj=function(){return!1},uZn.ol=function(){return!0},uZn.Si=function(){return!0},uZn.Wi=function(n,t){return t},uZn.Yi=function(){return!1},uZn.c=0,zW(art,"EObjectEList",505),sDn(83,505,Trt,MD),uZn.Mj=function(){return!0},uZn.ml=function(){return!1},uZn.al=function(){return!0},zW(art,"EObjectContainmentEList",83),sDn(555,83,Trt,TD),uZn.Ni=function(){this.b=!0},uZn.Qj=function(){return this.b},uZn.Gk=function(){var n;Czn(this),uN(this.e)?(n=this.b,this.b=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.b=!1},uZn.b=!1,zW(art,"EObjectContainmentEList/Unsettable",555),sDn(1161,555,Trt,hz),uZn.Ti=function(n,t){var e,i;return e=uG(zdn(this,n,t),89),uN(this.e)&&Yv(this,new wtn(this.a,7,(YYn(),P_t),xwn(t),F$(i=e.c,90)?uG(i,29):x_t,n)),e},uZn.Uj=function(n,t){return Dmn(this,uG(n,89),t)},uZn.Vj=function(n,t){return $mn(this,uG(n,89),t)},uZn.Wj=function(n,t,e){return TSn(this,uG(n,89),uG(t,89),e)},uZn.Ij=function(n,t,e,i,r){switch(n){case 3:return i2(this,n,t,e,i,this.i>1);case 5:return i2(this,n,t,e,i,this.i-uG(e,15).gc()>0);default:return new Ken(this.e,n,this.c,t,e,i,!0)}},uZn.Tj=function(){return!0},uZn.Qj=function(){return yMn(this)},uZn.Gk=function(){Czn(this)},zW(Ytt,"EClassImpl/1",1161),sDn(1175,1174,Fit),uZn.dj=function(n){var t,e,i,r,c,a,o;if(8!=(e=n.gj())){if(0==(i=xkn(n)))switch(e){case 1:case 9:null!=(o=n.kj())&&(!(t=y9(uG(o,482))).c&&(t.c=new Ks),rin(t.c,n.jj())),null!=(a=n.ij())&&(1&(r=uG(a,482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),ttn(t.c,uG(n.jj(),29))));break;case 3:null!=(a=n.ij())&&(1&(r=uG(a,482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),ttn(t.c,uG(n.jj(),29))));break;case 5:if(null!=(a=n.ij()))for(c=uG(a,16).Kc();c.Ob();)1&(r=uG(c.Pb(),482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),ttn(t.c,uG(n.jj(),29)));break;case 4:null!=(o=n.kj())&&(1&(r=uG(o,482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),rin(t.c,n.jj())));break;case 6:if(null!=(o=n.kj()))for(c=uG(o,16).Kc();c.Ob();)1&(r=uG(c.Pb(),482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),rin(t.c,n.jj()))}this.ql(i)}},uZn.ql=function(n){bBn(this,n)},uZn.b=63,zW(Ytt,"ESuperAdapter",1175),sDn(1176,1175,Fit,$m),uZn.ql=function(n){yLn(this,n)},zW(Ytt,"EClassImpl/10",1176),sDn(1165,710,Trt),uZn.Ei=function(n,t){return PCn(this,n,t)},uZn.Fi=function(n){return QMn(this,n)},uZn.Gi=function(n,t){edn(this,n,t)},uZn.Hi=function(n){z9(this,n)},uZn.$i=function(n){return Otn(this,n)},uZn.Xi=function(n,t){return iin(this,n,t)},uZn.Wk=function(n,t){throw hv(new Kv)},uZn.Ii=function(){return new nR(this)},uZn.Ji=function(){return new tR(this)},uZn.Ki=function(n){return han(this,n)},uZn.Xk=function(n,t){throw hv(new Kv)},uZn.Fk=function(n){return this},uZn.Qj=function(){return 0!=this.i},uZn.Wb=function(n){throw hv(new Kv)},uZn.Gk=function(){throw hv(new Kv)},zW(art,"EcoreEList/UnmodifiableEList",1165),sDn(328,1165,Trt,vL),uZn.Yi=function(){return!1},zW(art,"EcoreEList/UnmodifiableEList/FastCompare",328),sDn(1168,328,Trt,Afn),uZn.dd=function(n){var t,e;if(F$(n,179)&&-1!=(t=uG(n,179).Lj()))for(e=this.i;t<e;++t)if(xA(this.g[t])===xA(n))return t;return-1},zW(Ytt,"EClassImpl/1EAllStructuralFeaturesList",1168),sDn(1162,506,Qet,ks),uZn.aj=function(n){return Inn(g_t,Prt,89,n,0,1)},uZn.Yi=function(){return!1},zW(Ytt,"EClassImpl/1EGenericSuperTypeEList",1162),sDn(633,506,Qet,ys),uZn.aj=function(n){return Inn(o_t,krt,179,n,0,1)},uZn.Yi=function(){return!1},zW(Ytt,"EClassImpl/1EStructuralFeatureUniqueEList",633),sDn(755,506,Qet,Ms),uZn.aj=function(n){return Inn(v_t,krt,19,n,0,1)},uZn.Yi=function(){return!1},zW(Ytt,"EClassImpl/1ReferenceList",755),sDn(1163,506,Qet,Dm),uZn.Mi=function(n,t){tV(this,uG(t,35))},uZn.aj=function(n){return Inn(u_t,krt,35,n,0,1)},uZn.Yi=function(){return!1},zW(Ytt,"EClassImpl/2",1163),sDn(1164,506,Qet,Ts),uZn.aj=function(n){return Inn(u_t,krt,35,n,0,1)},uZn.Yi=function(){return!1},zW(Ytt,"EClassImpl/3",1164),sDn(1166,328,Trt,YG),uZn.Fc=function(n){return J5(this,uG(n,35))},uZn.Hi=function(n){PS(this,uG(n,35))},zW(Ytt,"EClassImpl/4",1166),sDn(1167,328,Trt,JG),uZn.Fc=function(n){return Y5(this,uG(n,19))},uZn.Hi=function(n){CS(this,uG(n,19))},zW(Ytt,"EClassImpl/5",1167),sDn(1169,506,Qet,js),uZn.aj=function(n){return Inn(p_t,yrt,62,n,0,1)},uZn.Yi=function(){return!1},zW(Ytt,"EClassImpl/6",1169),sDn(1170,506,Qet,Es),uZn.aj=function(n){return Inn(v_t,krt,19,n,0,1)},uZn.Yi=function(){return!1},zW(Ytt,"EClassImpl/7",1170),sDn(2095,2094,{3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1,71:1}),uZn.Ei=function(n,t){return dGn(this,n,t)},uZn.Fi=function(n){return dGn(this,this.Ej(),n)},uZn.Gi=function(n,t){cDn(this,n,t)},uZn.Hi=function(n){S$n(this,n)},uZn.Wk=function(n,t){return JMn(this,n,t)},uZn.Xk=function(n,t){return Lyn(this,n,t)},uZn.Xi=function(n,t){return gGn(this,n,t)},uZn.$i=function(n){return this.xj(n)},uZn.Ii=function(){return new nR(this)},uZn.pj=function(){return this.sj()},uZn.Ji=function(){return new tR(this)},uZn.Ki=function(n){return han(this,n)},zW(art,"DelegatingNotifyingInternalEListImpl",2095),sDn(756,2095,Crt),uZn.Li=function(){var n;return F$(n=ern(e1(this.b),this.Lj()).Hk(),156)&&!F$(n,469)&&!(1&n.kk().i)},uZn.Hc=function(n){var t,e,i,r,c,a,o;if(this.ol()){if((o=this.Ej())>4){if(!this.fk(n))return!1;if(this.al()){if(a=(t=(e=uG(n,54)).Eh())==this.b&&(this.ml()?e.yh(e.Fh(),uG(ern(e1(this.b),this.Lj()).Hk(),29).kk())==lMn(uG(ern(e1(this.b),this.Lj()),19)).n:-1-e.Fh()==this.Lj()),this.nl()&&!a&&!t&&e.Jh())for(i=0;i<o;++i)if(xA(CV(this,this.xj(i)))===xA(n))return!0;return a}if(this.ml()&&!this.ll()){if(xA(r=uG(n,58).Mh(lMn(uG(ern(e1(this.b),this.Lj()),19))))===xA(this.b))return!0;if(null==r||!uG(r,58).Vh())return!1}}if(c=this.uj(n),this.nl()&&!c)for(i=0;i<o;++i)if(xA(e=CV(this,this.xj(i)))===xA(n))return!0;return c}return this.uj(n)},uZn.Ij=function(n,t,e,i,r){return new Ken(this.b,n,this.Lj(),t,e,i,r)},uZn.Jj=function(n){Msn(this.b,n)},uZn.Fk=function(n){return this},uZn.Kj=function(){return ern(e1(this.b),this.Lj())},uZn.Lj=function(){return emn(e1(this.b),ern(e1(this.b),this.Lj()))},uZn.jj=function(){return this.b},uZn.kl=function(){return!!ern(e1(this.b),this.Lj()).Hk().kk()},uZn.Mj=function(){var n;return!(!F$(n=ern(e1(this.b),this.Lj()),102)||!(uG(n,19).Bb&Qtt)&&!lMn(uG(n,19)))},uZn.ll=function(){var n,t,e;return!!F$(n=ern(e1(this.b),this.Lj()),102)&&!!(t=lMn(uG(n,19)))&&((e=t.t)>1||-1==e)},uZn.ml=function(){var n;return!!F$(n=ern(e1(this.b),this.Lj()),102)&&!!lMn(uG(n,19))},uZn.nl=function(){var n;return!!F$(n=ern(e1(this.b),this.Lj()),102)&&!!(uG(n,19).Bb&P0n)},uZn.dd=function(n){var t,e,i;if((e=this.zj(n))>=0)return e;if(this.ol())for(t=0,i=this.Ej();t<i;++t)if(xA(CV(this,this.xj(t)))===xA(n))return t;return-1},uZn.Nj=function(n,t){var e;return e=uG(n,54),this.ml()?this.kl()?e.Rh(this.b,lMn(uG(ern(e1(this.b),this.Lj()),19)).n,uG(ern(e1(this.b),this.Lj()).Hk(),29).kk(),t):e.Rh(this.b,emn(e.Dh(),lMn(uG(ern(e1(this.b),this.Lj()),19))),null,t):e.Rh(this.b,-1-this.Lj(),null,t)},uZn.Oj=function(n,t){var e;return e=uG(n,54),this.ml()?this.kl()?e.Th(this.b,lMn(uG(ern(e1(this.b),this.Lj()),19)).n,uG(ern(e1(this.b),this.Lj()).Hk(),29).kk(),t):e.Th(this.b,emn(e.Dh(),lMn(uG(ern(e1(this.b),this.Lj()),19))),null,t):e.Th(this.b,-1-this.Lj(),null,t)},uZn.al=function(){var n;return!!F$(n=ern(e1(this.b),this.Lj()),102)&&!!(uG(n,19).Bb&Qtt)},uZn.ol=function(){return F$(ern(e1(this.b),this.Lj()).Hk(),90)},uZn.fk=function(n){return ern(e1(this.b),this.Lj()).Hk().fk(n)},uZn.Pj=function(){return uN(this.b)},uZn.Qj=function(){return!this.Aj()},uZn.Si=function(){return ern(e1(this.b),this.Lj()).Si()},uZn.Wi=function(n,t){return yVn(this,n,t)},uZn.Wb=function(n){_zn(this),CW(this,uG(n,15))},uZn.Pc=function(){var n;if(this.nl())for(n=this.Ej()-1;n>=0;--n)yVn(this,n,this.xj(n));return this.Fj()},uZn.Qc=function(n){var t;if(this.nl())for(t=this.Ej()-1;t>=0;--t)yVn(this,t,this.xj(t));return this.Gj(n)},uZn.Gk=function(){_zn(this)},uZn.Zi=function(n,t){return Atn(this,n,t)},zW(art,"DelegatingEcoreEList",756),sDn(1171,756,Crt,aF),uZn.qj=function(n,t){zR(this,n,uG(t,29))},uZn.rj=function(n){BN(this,uG(n,29))},uZn.xj=function(n){var t;return F$(t=uG(zrn(z5(this.a),n),89).c,90)?uG(t,29):(YYn(),x_t)},uZn.Cj=function(n){var t;return F$(t=uG(e_n(z5(this.a),n),89).c,90)?uG(t,29):(YYn(),x_t)},uZn.Dj=function(n,t){return YMn(this,n,uG(t,29))},uZn.Li=function(){return!1},uZn.Ij=function(n,t,e,i,r){return null},uZn.sj=function(){return new Rm(this)},uZn.tj=function(){Czn(z5(this.a))},uZn.uj=function(n){return Mdn(this,n)},uZn.vj=function(n){var t;for(t=n.Kc();t.Ob();)if(!Mdn(this,t.Pb()))return!1;return!0},uZn.wj=function(n){var t,e,i;if(F$(n,15)&&(i=uG(n,15)).gc()==z5(this.a).i){for(t=i.Kc(),e=new DD(this);t.Ob();)if(xA(t.Pb())!==xA(Zkn(e)))return!1;return!0}return!1},uZn.yj=function(){var n,t,e,i;for(t=1,n=new DD(z5(this.a));n.e!=n.i.gc();)t=31*t+((e=F$(i=uG(Zkn(n),89).c,90)?uG(i,29):(YYn(),x_t))?xx(e):0);return t},uZn.zj=function(n){var t,e,i,r;for(i=0,e=new DD(z5(this.a));e.e!=e.i.gc();){if(t=uG(Zkn(e),89),xA(n)===xA(F$(r=t.c,90)?uG(r,29):(YYn(),x_t)))return i;++i}return-1},uZn.Aj=function(){return 0==z5(this.a).i},uZn.Bj=function(){return null},uZn.Ej=function(){return z5(this.a).i},uZn.Fj=function(){var n,t,e,i,r,c;for(c=z5(this.a).i,r=Inn(dat,EZn,1,c,5,1),e=0,t=new DD(z5(this.a));t.e!=t.i.gc();)n=uG(Zkn(t),89),r[e++]=F$(i=n.c,90)?uG(i,29):(YYn(),x_t);return r},uZn.Gj=function(n){var t,e,i,r;for(r=z5(this.a).i,n.length<r&&(n=Acn(Tbn(n).c,r)),n.length>r&&uQ(n,r,null),e=0,t=new DD(z5(this.a));t.e!=t.i.gc();)uQ(n,e++,F$(i=uG(Zkn(t),89).c,90)?uG(i,29):(YYn(),x_t));return n},uZn.Hj=function(){var n,t,e,i,r;for((r=new zM).a+="[",n=z5(this.a),t=0,i=z5(this.a).i;t<i;)VA(r,ox(F$(e=uG(zrn(n,t),89).c,90)?uG(e,29):(YYn(),x_t))),++t<i&&(r.a+=TZn);return r.a+="]",r.a},uZn.Jj=function(n){},uZn.Lj=function(){return 10},uZn.kl=function(){return!0},uZn.Mj=function(){return!1},uZn.ll=function(){return!1},uZn.ml=function(){return!1},uZn.nl=function(){return!0},uZn.al=function(){return!1},uZn.ol=function(){return!0},uZn.fk=function(n){return F$(n,90)},uZn.Qj=function(){return M4(this.a)},uZn.Si=function(){return!0},uZn.Yi=function(){return!0},zW(Ytt,"EClassImpl/8",1171),sDn(1172,2062,m1n,Rm),uZn.fd=function(n){return han(this.a,n)},uZn.gc=function(){return z5(this.a.a).i},zW(Ytt,"EClassImpl/8/1",1172),sDn(1173,506,Qet,Ss),uZn.aj=function(n){return Inn(s_t,EZn,142,n,0,1)},uZn.Yi=function(){return!1},zW(Ytt,"EClassImpl/9",1173),sDn(1160,49,H0n,Qk),zW(Ytt,"EClassImpl/MyHashSet",1160),sDn(577,364,{110:1,94:1,93:1,142:1,156:1,847:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,158:1,119:1,120:1,691:1},Gv),uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return null!=this.D?this.D:this.B;case 3:return _Tn(this);case 4:return this.ik();case 5:return this.F;case 6:return t?Hrn(this):D0(this);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),this.A;case 8:return qx(),!!(256&this.Bb)}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!_Tn(this);case 4:return null!=this.ik();case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!D0(this);case 7:return!!this.A&&0!=this.A.i;case 8:return!(256&this.Bb)}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void d2(this,mK(t));case 2:return void pN(this,mK(t));case 5:return void TWn(this,mK(t));case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Czn(this.A),!this.A&&(this.A=new PD(J_t,this,7)),void CW(this.A,uG(t,16));case 8:return void pdn(this,oM(gK(t)))}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),C_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,184)&&(uG(this.Cb,184).tb=null),void qon(this,null);case 2:return sbn(this,null),void Ocn(this,this.D);case 5:return void TWn(this,null);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),void Czn(this.A);case 8:return void pdn(this,!0)}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.pi=function(){tdn((gAn(),kBt),this).xe(),this.Bb|=1},uZn.ok=function(){var n,t;if(!this.c&&!(n=bxn(Hrn(this))).dc())for(t=n.Kc();t.Ob();)qUn(this,mK(t.Pb()))&&egn(this);return this.b},uZn.ik=function(){var n;if(!this.e){n=null;try{n=_Tn(this)}catch(t){if(!F$(t=Ehn(t),103))throw hv(t)}this.d=null,n&&1&n.i&&(this.d=n==ZHt?(qx(),tot):n==YHt?xwn(0):n==iUt?new Rw(0):n==eUt?0:n==nUt?Hvn(0):n==rUt?Rwn(0):n==tUt?Ben(0):Hsn(0)),this.e=!0}return this.d},uZn.nk=function(){return!!(256&this.Bb)},uZn.rl=function(n){n&&(this.D="org.eclipse.emf.common.util.AbstractEnumerator")},uZn.gl=function(n){tun(this,n),this.rl(n)},uZn.hl=function(n){this.C=n,this.e=!1},uZn.Ib=function(){var n;return 64&this.Db?pmn(this):((n=new fx(pmn(this))).a+=" (serializable: ",Lj(n,!!(256&this.Bb)),n.a+=")",n.a)},uZn.c=!1,uZn.d=null,uZn.e=!1,zW(Ytt,"EDataTypeImpl",577),sDn(469,577,{110:1,94:1,93:1,142:1,156:1,847:1,685:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,469:1,158:1,119:1,120:1,691:1},Jk),uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return null!=this.D?this.D:this.B;case 3:return _Tn(this);case 4:return dbn(this);case 5:return this.F;case 6:return t?Hrn(this):D0(this);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),this.A;case 8:return qx(),!!(256&this.Bb);case 9:return!this.a&&(this.a=new fV(d_t,this,9,5)),this.a}return $tn(this,n-iQ((YYn(),I_t)),ern(uG(Lsn(this,16),29)||I_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?VTn(this,e):this.Cb.Th(this,-1-i,null,e)),DUn(this,n,6,e);case 9:return!this.a&&(this.a=new fV(d_t,this,9,5)),Nmn(this.a,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),I_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),I_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 6:return DUn(this,null,6,e);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Nyn(this.A,n,e);case 9:return!this.a&&(this.a=new fV(d_t,this,9,5)),Nyn(this.a,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),I_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),I_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!_Tn(this);case 4:return!!dbn(this);case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!D0(this);case 7:return!!this.A&&0!=this.A.i;case 8:return!(256&this.Bb);case 9:return!!this.a&&0!=this.a.i}return l5(this,n-iQ((YYn(),I_t)),ern(uG(Lsn(this,16),29)||I_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void d2(this,mK(t));case 2:return void pN(this,mK(t));case 5:return void TWn(this,mK(t));case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Czn(this.A),!this.A&&(this.A=new PD(J_t,this,7)),void CW(this.A,uG(t,16));case 8:return void pdn(this,oM(gK(t)));case 9:return!this.a&&(this.a=new fV(d_t,this,9,5)),Czn(this.a),!this.a&&(this.a=new fV(d_t,this,9,5)),void CW(this.a,uG(t,16))}lpn(this,n-iQ((YYn(),I_t)),ern(uG(Lsn(this,16),29)||I_t,n),t)},uZn.ii=function(){return YYn(),I_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,184)&&(uG(this.Cb,184).tb=null),void qon(this,null);case 2:return sbn(this,null),void Ocn(this,this.D);case 5:return void TWn(this,null);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),void Czn(this.A);case 8:return void pdn(this,!0);case 9:return!this.a&&(this.a=new fV(d_t,this,9,5)),void Czn(this.a)}sdn(this,n-iQ((YYn(),I_t)),ern(uG(Lsn(this,16),29)||I_t,n))},uZn.pi=function(){var n,t;if(this.a)for(n=0,t=this.a.i;n<t;++n)lR(zrn(this.a,n));tdn((gAn(),kBt),this).xe(),this.Bb|=1},uZn.ik=function(){return dbn(this)},uZn.fk=function(n){return null!=n},uZn.rl=function(n){},zW(Ytt,"EEnumImpl",469),sDn(582,448,{110:1,94:1,93:1,2039:1,694:1,155:1,197:1,58:1,114:1,54:1,99:1,582:1,158:1,119:1,120:1},Uv),uZn.xe=function(){return this.zb},uZn.Ah=function(n){return Qjn(this,n)},uZn.Lh=function(n,t,e){var i;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return xwn(this.d);case 3:return this.b?this.b:this.a;case 4:return null==(i=this.c)?this.zb:i;case 5:return this.Db>>16==5?uG(this.Cb,685):null}return $tn(this,n-iQ((YYn(),O_t)),ern(uG(Lsn(this,16),29)||O_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 5:return this.Cb&&(e=(i=this.Db>>16)>=0?Qjn(this,e):this.Cb.Th(this,-1-i,null,e)),DUn(this,n,5,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),O_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),O_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 5:return DUn(this,null,5,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),O_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),O_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0!=this.d;case 3:return!!this.b;case 4:return null!=this.c;case 5:return!(this.Db>>16!=5||!uG(this.Cb,685))}return l5(this,n-iQ((YYn(),O_t)),ern(uG(Lsn(this,16),29)||O_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void qon(this,mK(t));case 2:return void Icn(this,uG(t,17).a);case 3:return void h$n(this,uG(t,2039));case 4:return void Uan(this,mK(t))}lpn(this,n-iQ((YYn(),O_t)),ern(uG(Lsn(this,16),29)||O_t,n),t)},uZn.ii=function(){return YYn(),O_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void qon(this,null);case 2:return void Icn(this,0);case 3:return void h$n(this,null);case 4:return void Uan(this,null)}sdn(this,n-iQ((YYn(),O_t)),ern(uG(Lsn(this,16),29)||O_t,n))},uZn.Ib=function(){var n;return null==(n=this.c)?this.zb:n},uZn.b=null,uZn.c=null,uZn.d=0,zW(Ytt,"EEnumLiteralImpl",582);var nBt,tBt,eBt,iBt=Iq(Ytt,"EFactoryImpl/InternalEDateTimeFormat");sDn(499,1,{2114:1},Km),zW(Ytt,"EFactoryImpl/1ClientInternalEDateTimeFormat",499),sDn(248,120,{110:1,94:1,93:1,89:1,58:1,114:1,54:1,99:1,248:1,119:1,120:1},ev),uZn.Ch=function(n,t,e){var i;return e=DUn(this,n,t,e),this.e&&F$(n,179)&&(i=bRn(this,this.e))!=this.c&&(e=PWn(this,i,e)),e},uZn.Lh=function(n,t,e){switch(n){case 0:return this.f;case 1:return!this.d&&(this.d=new MD(g_t,this,1)),this.d;case 2:return t?MGn(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return t?PMn(this):this.a}return $tn(this,n-iQ((YYn(),L_t)),ern(uG(Lsn(this,16),29)||L_t,n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return vwn(this,null,e);case 1:return!this.d&&(this.d=new MD(g_t,this,1)),Nyn(this.d,n,e);case 3:return kwn(this,null,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),L_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),L_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.f;case 1:return!!this.d&&0!=this.d.i;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return l5(this,n-iQ((YYn(),L_t)),ern(uG(Lsn(this,16),29)||L_t,n))},uZn.bi=function(n,t){switch(n){case 0:return void cPn(this,uG(t,89));case 1:return!this.d&&(this.d=new MD(g_t,this,1)),Czn(this.d),!this.d&&(this.d=new MD(g_t,this,1)),void CW(this.d,uG(t,16));case 3:return void rPn(this,uG(t,89));case 4:return void MIn(this,uG(t,850));case 5:return void Urn(this,uG(t,142))}lpn(this,n-iQ((YYn(),L_t)),ern(uG(Lsn(this,16),29)||L_t,n),t)},uZn.ii=function(){return YYn(),L_t},uZn.ki=function(n){switch(n){case 0:return void cPn(this,null);case 1:return!this.d&&(this.d=new MD(g_t,this,1)),void Czn(this.d);case 3:return void rPn(this,null);case 4:return void MIn(this,null);case 5:return void Urn(this,null)}sdn(this,n-iQ((YYn(),L_t)),ern(uG(Lsn(this,16),29)||L_t,n))},uZn.Ib=function(){var n;return(n=new lx(vxn(this))).a+=" (expression: ",XXn(this,n),n.a+=")",n.a},zW(Ytt,"EGenericTypeImpl",248),sDn(2067,2062,Irt),uZn.Gi=function(n,t){YK(this,n,t)},uZn.Wk=function(n,t){return YK(this,this.gc(),n),t},uZn.$i=function(n){return hyn(this.pj(),n)},uZn.Ii=function(){return this.Ji()},uZn.pj=function(){return new zm(this)},uZn.Ji=function(){return this.Ki(0)},uZn.Ki=function(n){return this.pj().fd(n)},uZn.Xk=function(n,t){return Wpn(this,n,!0),t},uZn.Ti=function(n,t){var e;return e=Kjn(this,t),this.fd(n).Rb(e),e},uZn.Ui=function(n,t){Wpn(this,t,!0),this.fd(n).Rb(t)},zW(art,"AbstractSequentialInternalEList",2067),sDn(496,2067,Irt,zx),uZn.$i=function(n){return hyn(this.pj(),n)},uZn.Ii=function(){return null==this.b?(EP(),EP(),eBt):this.sl()},uZn.pj=function(){return new kL(this.a,this.b)},uZn.Ji=function(){return null==this.b?(EP(),EP(),eBt):this.sl()},uZn.Ki=function(n){var t,e;if(null==this.b){if(n<0||n>1)throw hv(new dM(Hit+n+", size=0"));return EP(),EP(),eBt}for(e=this.sl(),t=0;t<n;++t)Ksn(e);return e},uZn.dc=function(){var n,t,e,i,r,c;if(null!=this.b)for(e=0;e<this.b.length;++e)if(n=this.b[e],!this.vl()||this.a.Xh(n))if(c=this.a.Nh(n,!1),PP(),uG(n,69).xk()){for(i=0,r=(t=uG(c,160)).gc();i<r;++i)if(RQ(t.Tl(i))&&null!=t.Ul(i))return!1}else if(n.Jk()){if(!uG(c,16).dc())return!1}else if(null!=c)return!1;return!0},uZn.Kc=function(){return kon(this)},uZn.fd=function(n){var t,e;if(null==this.b){if(0!=n)throw hv(new dM(Hit+n+", size=0"));return EP(),EP(),eBt}for(e=this.ul()?this.tl():this.sl(),t=0;t<n;++t)Ksn(e);return e},uZn.Ti=function(n,t){throw hv(new Kv)},uZn.Ui=function(n,t){throw hv(new Kv)},uZn.sl=function(){return new Vx(this.a,this.b)},uZn.tl=function(){return new WR(this.a,this.b)},uZn.ul=function(){return!0},uZn.gc=function(){var n,t,e,i,r,c,a;if(r=0,null!=this.b)for(e=0;e<this.b.length;++e)if(n=this.b[e],!this.vl()||this.a.Xh(n))if(a=this.a.Nh(n,!1),PP(),uG(n,69).xk())for(i=0,c=(t=uG(a,160)).gc();i<c;++i)RQ(t.Tl(i))&&null!=t.Ul(i)&&++r;else n.Jk()?r+=uG(a,16).gc():null!=a&&++r;return r},uZn.vl=function(){return!0},zW(art,"EContentsEList",496),sDn(1177,496,Irt,VR),uZn.sl=function(){return new JR(this.a,this.b)},uZn.tl=function(){return new QR(this.a,this.b)},uZn.vl=function(){return!1},zW(Ytt,"ENamedElementImpl/1",1177),sDn(287,1,Ort,Vx),uZn.Nb=function(n){SV(this,n)},uZn.Rb=function(n){throw hv(new Kv)},uZn.wl=function(n){if(0!=this.g||this.e)throw hv(new kM("Iterator already in use or already filtered"));this.e=n},uZn.Ob=function(){var n,t,e,i,r,c;switch(this.g){case 3:case 2:return!0;case 1:return!1;case-3:this.p?this.p.Pb():++this.n;default:if(this.k&&(this.p?wAn(this,this.p):p$n(this)))return r=this.p?this.p.Pb():this.j?this.j.$i(this.n++):this.k.Xb(this.n++),this.f?((n=uG(r,76)).Lk(),e=n.md(),this.i=e):(e=r,this.i=e),this.g=3,!0;for(;this.d<this.c.length;)if(t=this.c[this.d++],(!this.e||t.pk()!=tFt||0!=t.Lj())&&(!this.vl()||this.b.Xh(t)))if(c=this.b.Nh(t,this.ul()),this.f=(PP(),uG(t,69).xk()),this.f||t.Jk()){if(this.ul()?(i=uG(c,15),this.k=i):(i=uG(c,71),this.k=this.j=i),F$(this.k,59)?(this.p=null,this.o=this.k.gc(),this.n=0):this.p=this.j?this.j.Ji():this.k.ed(),this.p?wAn(this,this.p):p$n(this))return r=this.p?this.p.Pb():this.j?this.j.$i(this.n++):this.k.Xb(this.n++),this.f?((n=uG(r,76)).Lk(),e=n.md(),this.i=e):(e=r,this.i=e),this.g=3,!0}else if(null!=c)return this.k=null,this.p=null,e=c,this.i=e,this.g=2,!0;return this.k=null,this.p=null,this.f=!1,this.g=1,!1}},uZn.Sb=function(){var n,t,e,i,r,c;switch(this.g){case-3:case-2:return!0;case-1:return!1;case 3:this.p?this.p.Ub():--this.n;default:if(this.k&&(this.p?dAn(this,this.p):hLn(this)))return r=this.p?this.p.Ub():this.j?this.j.$i(--this.n):this.k.Xb(--this.n),this.f?((n=uG(r,76)).Lk(),e=n.md(),this.i=e):(e=r,this.i=e),this.g=-3,!0;for(;this.d>0;)if(t=this.c[--this.d],(!this.e||t.pk()!=tFt||0!=t.Lj())&&(!this.vl()||this.b.Xh(t)))if(c=this.b.Nh(t,this.ul()),this.f=(PP(),uG(t,69).xk()),this.f||t.Jk()){if(this.ul()?(i=uG(c,15),this.k=i):(i=uG(c,71),this.k=this.j=i),F$(this.k,59)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j.Ki(this.k.gc()):this.k.fd(this.k.gc()),this.p?dAn(this,this.p):hLn(this))return r=this.p?this.p.Ub():this.j?this.j.$i(--this.n):this.k.Xb(--this.n),this.f?((n=uG(r,76)).Lk(),e=n.md(),this.i=e):(e=r,this.i=e),this.g=-3,!0}else if(null!=c)return this.k=null,this.p=null,e=c,this.i=e,this.g=-2,!0;return this.k=null,this.p=null,this.g=-1,!1}},uZn.Pb=function(){return Ksn(this)},uZn.Tb=function(){return this.a},uZn.Ub=function(){var n;if(this.g<-1||this.Sb())return--this.a,this.g=0,n=this.i,this.Sb(),n;throw hv(new Bv)},uZn.Vb=function(){return this.a-1},uZn.Qb=function(){throw hv(new Kv)},uZn.ul=function(){return!1},uZn.Wb=function(n){throw hv(new Kv)},uZn.vl=function(){return!0},uZn.a=0,uZn.d=0,uZn.f=!1,uZn.g=0,uZn.n=0,uZn.o=0,zW(art,"EContentsEList/FeatureIteratorImpl",287),sDn(711,287,Ort,WR),uZn.ul=function(){return!0},zW(art,"EContentsEList/ResolvingFeatureIteratorImpl",711),sDn(1178,711,Ort,QR),uZn.vl=function(){return!1},zW(Ytt,"ENamedElementImpl/1/1",1178),sDn(1179,287,Ort,JR),uZn.vl=function(){return!1},zW(Ytt,"ENamedElementImpl/1/2",1179),sDn(39,152,Bit,t8,e8,lV,btn,Ken,j9,Bcn,o4,Hcn,u4,E9,s4,qcn,h4,S9,f4,Ucn,l4,bV,wtn,kZ,Gcn,b4,P9,w4),uZn.Kj=function(){return ntn(this)},uZn.Rj=function(){var n;return(n=ntn(this))?n.ik():null},uZn.hj=function(n){return-1==this.b&&this.a&&(this.b=this.c.Hh(this.a.Lj(),this.a.pk())),this.c.yh(this.b,n)},uZn.jj=function(){return this.c},uZn.Sj=function(){var n;return!!(n=ntn(this))&&n.tk()},uZn.b=-1,zW(Ytt,"ENotificationImpl",39),sDn(411,292,{110:1,94:1,93:1,155:1,197:1,58:1,62:1,114:1,481:1,54:1,99:1,158:1,411:1,292:1,119:1,120:1},Yk),uZn.Ah=function(n){return fEn(this,n)},uZn.Lh=function(n,t,e){var i;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),(i=this.t)>1||-1==i;case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?uG(this.Cb,29):null;case 11:return!this.d&&(this.d=new PD(J_t,this,11)),this.d;case 12:return!this.c&&(this.c=new fV(m_t,this,12,10)),this.c;case 13:return!this.a&&(this.a=new oF(this,this)),this.a;case 14:return Aen(this)}return $tn(this,n-iQ((YYn(),R_t)),ern(uG(Lsn(this,16),29)||R_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 10:return this.Cb&&(e=(i=this.Db>>16)>=0?fEn(this,e):this.Cb.Th(this,-1-i,null,e)),DUn(this,n,10,e);case 12:return!this.c&&(this.c=new fV(m_t,this,12,10)),Nmn(this.c,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),R_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),R_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 9:return IW(this,e);case 10:return DUn(this,null,10,e);case 11:return!this.d&&(this.d=new PD(J_t,this,11)),Nyn(this.d,n,e);case 12:return!this.c&&(this.c=new fV(m_t,this,12,10)),Nyn(this.c,n,e);case 14:return Nyn(Aen(this),n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),R_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),R_t)),n,e)},uZn.Wh=function(n){var t;switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(t=this.t)>1||-1==t;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return!(this.Db>>16!=10||!uG(this.Cb,29));case 11:return!!this.d&&0!=this.d.i;case 12:return!!this.c&&0!=this.c.i;case 13:return!(!this.a||0==Aen(this.a.a).i||this.b&&MMn(this.b));case 14:return!!this.b&&MMn(this.b)}return l5(this,n-iQ((YYn(),R_t)),ern(uG(Lsn(this,16),29)||R_t,n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void qon(this,mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void Ccn(this,uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj());case 11:return!this.d&&(this.d=new PD(J_t,this,11)),Czn(this.d),!this.d&&(this.d=new PD(J_t,this,11)),void CW(this.d,uG(t,16));case 12:return!this.c&&(this.c=new fV(m_t,this,12,10)),Czn(this.c),!this.c&&(this.c=new fV(m_t,this,12,10)),void CW(this.c,uG(t,16));case 13:return!this.a&&(this.a=new oF(this,this)),_zn(this.a),!this.a&&(this.a=new oF(this,this)),void CW(this.a,uG(t,16));case 14:return Czn(Aen(this)),void CW(Aen(this),uG(t,16))}lpn(this,n-iQ((YYn(),R_t)),ern(uG(Lsn(this,16),29)||R_t,n),t)},uZn.ii=function(){return YYn(),R_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void qon(this,null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return void Ccn(this,1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj());case 11:return!this.d&&(this.d=new PD(J_t,this,11)),void Czn(this.d);case 12:return!this.c&&(this.c=new fV(m_t,this,12,10)),void Czn(this.c);case 13:return void(this.a&&_zn(this.a));case 14:return void(this.b&&Czn(this.b))}sdn(this,n-iQ((YYn(),R_t)),ern(uG(Lsn(this,16),29)||R_t,n))},uZn.pi=function(){var n,t;if(this.c)for(n=0,t=this.c.i;n<t;++n)lR(zrn(this.c,n));bEn(this),this.Bb|=1},zW(Ytt,"EOperationImpl",411),sDn(513,756,Crt,oF),uZn.qj=function(n,t){ZR(this,n,uG(t,142))},uZn.rj=function(n){HN(this,uG(n,142))},uZn.xj=function(n){return uG(zrn(Aen(this.a),n),89).c||(YYn(),N_t)},uZn.Cj=function(n){return uG(e_n(Aen(this.a),n),89).c||(YYn(),N_t)},uZn.Dj=function(n,t){return Qvn(this,n,uG(t,142))},uZn.Li=function(){return!1},uZn.Ij=function(n,t,e,i,r){return null},uZn.sj=function(){return new Fm(this)},uZn.tj=function(){Czn(Aen(this.a))},uZn.uj=function(n){return Idn(this,n)},uZn.vj=function(n){var t;for(t=n.Kc();t.Ob();)if(!Idn(this,t.Pb()))return!1;return!0},uZn.wj=function(n){var t,e,i;if(F$(n,15)&&(i=uG(n,15)).gc()==Aen(this.a).i){for(t=i.Kc(),e=new DD(this);t.Ob();)if(xA(t.Pb())!==xA(Zkn(e)))return!1;return!0}return!1},uZn.yj=function(){var n,t,e;for(t=1,n=new DD(Aen(this.a));n.e!=n.i.gc();)t=31*t+((e=uG(Zkn(n),89).c||(YYn(),N_t))?Hon(e):0);return t},uZn.zj=function(n){var t,e,i;for(i=0,e=new DD(Aen(this.a));e.e!=e.i.gc();){if(t=uG(Zkn(e),89),xA(n)===xA(t.c||(YYn(),N_t)))return i;++i}return-1},uZn.Aj=function(){return 0==Aen(this.a).i},uZn.Bj=function(){return null},uZn.Ej=function(){return Aen(this.a).i},uZn.Fj=function(){var n,t,e,i,r;for(r=Aen(this.a).i,i=Inn(dat,EZn,1,r,5,1),e=0,t=new DD(Aen(this.a));t.e!=t.i.gc();)n=uG(Zkn(t),89),i[e++]=n.c||(YYn(),N_t);return i},uZn.Gj=function(n){var t,e,i;for(i=Aen(this.a).i,n.length<i&&(n=Acn(Tbn(n).c,i)),n.length>i&&uQ(n,i,null),e=0,t=new DD(Aen(this.a));t.e!=t.i.gc();)uQ(n,e++,uG(Zkn(t),89).c||(YYn(),N_t));return n},uZn.Hj=function(){var n,t,e,i;for((i=new zM).a+="[",n=Aen(this.a),t=0,e=Aen(this.a).i;t<e;)VA(i,ox(uG(zrn(n,t),89).c||(YYn(),N_t))),++t<e&&(i.a+=TZn);return i.a+="]",i.a},uZn.Jj=function(n){},uZn.Lj=function(){return 13},uZn.kl=function(){return!0},uZn.Mj=function(){return!1},uZn.ll=function(){return!1},uZn.ml=function(){return!1},uZn.nl=function(){return!0},uZn.al=function(){return!1},uZn.ol=function(){return!0},uZn.fk=function(n){return F$(n,142)},uZn.Qj=function(){return T4(this.a)},uZn.Si=function(){return!0},uZn.Yi=function(){return!0},zW(Ytt,"EOperationImpl/1",513),sDn(1376,2062,m1n,Fm),uZn.fd=function(n){return han(this.a,n)},uZn.gc=function(){return Aen(this.a.a).i},zW(Ytt,"EOperationImpl/1/1",1376),sDn(1377,555,Trt,fz),uZn.Ti=function(n,t){var e;return e=uG(zdn(this,n,t),89),uN(this.e)&&Yv(this,new wtn(this.a,7,(YYn(),K_t),xwn(t),e.c||N_t,n)),e},uZn.Uj=function(n,t){return ndn(this,uG(n,89),t)},uZn.Vj=function(n,t){return Zwn(this,uG(n,89),t)},uZn.Wj=function(n,t,e){return Lkn(this,uG(n,89),uG(t,89),e)},uZn.Ij=function(n,t,e,i,r){switch(n){case 3:return i2(this,n,t,e,i,this.i>1);case 5:return i2(this,n,t,e,i,this.i-uG(e,15).gc()>0);default:return new Ken(this.e,n,this.c,t,e,i,!0)}},uZn.Tj=function(){return!0},uZn.Qj=function(){return MMn(this)},uZn.Gk=function(){Czn(this)},zW(Ytt,"EOperationImpl/2",1377),sDn(507,1,{2037:1,507:1},EA),zW(Ytt,"EPackageImpl/1",507),sDn(14,83,Trt,fV),uZn.il=function(){return this.d},uZn.jl=function(){return this.b},uZn.ml=function(){return!0},uZn.b=0,zW(art,"EObjectContainmentWithInverseEList",14),sDn(365,14,Trt,i_),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectContainmentWithInverseEList/Resolving",365),sDn(308,365,Trt,vV),uZn.Ni=function(){this.a.tb=null},zW(Ytt,"EPackageImpl/2",308),sDn(1278,1,{},Ps),zW(Ytt,"EPackageImpl/3",1278),sDn(733,45,B0n,Zk),uZn._b=function(n){return RA(n)?AZ(this,n):!!FX(this.f,n)},zW(Ytt,"EPackageRegistryImpl",733),sDn(518,292,{110:1,94:1,93:1,155:1,197:1,58:1,2116:1,114:1,481:1,54:1,99:1,158:1,518:1,292:1,119:1,120:1},ny),uZn.Ah=function(n){return lEn(this,n)},uZn.Lh=function(n,t,e){var i;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),(i=this.t)>1||-1==i;case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?uG(this.Cb,62):null}return $tn(this,n-iQ((YYn(),__t)),ern(uG(Lsn(this,16),29)||__t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nmn(this.Ab,n,e);case 10:return this.Cb&&(e=(i=this.Db>>16)>=0?lEn(this,e):this.Cb.Th(this,-1-i,null,e)),DUn(this,n,10,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),__t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),__t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 9:return IW(this,e);case 10:return DUn(this,null,10,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),__t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),__t)),n,e)},uZn.Wh=function(n){var t;switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(t=this.t)>1||-1==t;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return!(this.Db>>16!=10||!uG(this.Cb,62))}return l5(this,n-iQ((YYn(),__t)),ern(uG(Lsn(this,16),29)||__t,n))},uZn.ii=function(){return YYn(),__t},zW(Ytt,"EParameterImpl",518),sDn(102,462,{110:1,94:1,93:1,155:1,197:1,58:1,19:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,102:1,462:1,292:1,119:1,120:1,692:1},PK),uZn.Lh=function(n,t,e){var i,r;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),(r=this.t)>1||-1==r;case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return qx(),!!(this.Bb&w1n);case 11:return qx(),!!(this.Bb&frt);case 12:return qx(),!!(this.Bb&j0n);case 13:return this.j;case 14:return NRn(this);case 15:return qx(),!!(this.Bb&hrt);case 16:return qx(),!!(this.Bb&VZn);case 17:return K0(this);case 18:return qx(),!!(this.Bb&Qtt);case 19:return qx(),!!((i=lMn(this))&&i.Bb&Qtt);case 20:return qx(),!!(this.Bb&P0n);case 21:return t?lMn(this):this.b;case 22:return t?Ffn(this):R9(this);case 23:return!this.a&&(this.a=new OD(u_t,this,23)),this.a}return $tn(this,n-iQ((YYn(),B_t)),ern(uG(Lsn(this,16),29)||B_t,n),t,e)},uZn.Wh=function(n){var t,e;switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(e=this.t)>1||-1==e;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return!(this.Bb&w1n);case 11:return!!(this.Bb&frt);case 12:return!!(this.Bb&j0n);case 13:return null!=this.j;case 14:return null!=NRn(this);case 15:return!!(this.Bb&hrt);case 16:return!!(this.Bb&VZn);case 17:return!!K0(this);case 18:return!!(this.Bb&Qtt);case 19:return!!(t=lMn(this))&&!!(t.Bb&Qtt);case 20:return!(this.Bb&P0n);case 21:return!!this.b;case 22:return!!R9(this);case 23:return!!this.a&&0!=this.a.i}return l5(this,n-iQ((YYn(),B_t)),ern(uG(Lsn(this,16),29)||B_t,n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void g2(this,mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void Ccn(this,uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj());case 10:return void Wdn(this,oM(gK(t)));case 11:return void Ydn(this,oM(gK(t)));case 12:return void Qdn(this,oM(gK(t)));case 13:return void mA(this,mK(t));case 15:return void Jdn(this,oM(gK(t)));case 16:return void Cgn(this,oM(gK(t)));case 18:return void p2(this,oM(gK(t)));case 20:return void Ign(this,oM(gK(t)));case 21:return void bon(this,uG(t,19));case 23:return!this.a&&(this.a=new OD(u_t,this,23)),Czn(this.a),!this.a&&(this.a=new OD(u_t,this,23)),void CW(this.a,uG(t,16))}lpn(this,n-iQ((YYn(),B_t)),ern(uG(Lsn(this,16),29)||B_t,n),t)},uZn.ii=function(){return YYn(),B_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return F$(this.Cb,90)&&yLn(y9(uG(this.Cb,90)),4),void qon(this,null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return void Ccn(this,1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj());case 10:return void Wdn(this,!0);case 11:return void Ydn(this,!1);case 12:return void Qdn(this,!1);case 13:return this.i=null,void lon(this,null);case 15:return void Jdn(this,!1);case 16:return void Cgn(this,!1);case 18:return Pgn(this,!1),void(F$(this.Cb,90)&&yLn(y9(uG(this.Cb,90)),2));case 20:return void Ign(this,!0);case 21:return void bon(this,null);case 23:return!this.a&&(this.a=new OD(u_t,this,23)),void Czn(this.a)}sdn(this,n-iQ((YYn(),B_t)),ern(uG(Lsn(this,16),29)||B_t,n))},uZn.pi=function(){Ffn(this),BJ(Nen((gAn(),kBt),this)),bEn(this),this.Bb|=1},uZn.uk=function(){return lMn(this)},uZn._k=function(){var n;return!!(n=lMn(this))&&!!(n.Bb&Qtt)},uZn.al=function(){return!!(this.Bb&Qtt)},uZn.bl=function(){return!!(this.Bb&P0n)},uZn.Yk=function(n,t){return this.c=null,Ywn(this,n,t)},uZn.Ib=function(){var n;return 64&this.Db?MBn(this):((n=new fx(MBn(this))).a+=" (containment: ",Lj(n,!!(this.Bb&Qtt)),n.a+=", resolveProxies: ",Lj(n,!!(this.Bb&P0n)),n.a+=")",n.a)},zW(Ytt,"EReferenceImpl",102),sDn(561,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,561:1,119:1,120:1},Cs),uZn.Fb=function(n){return this===n},uZn.ld=function(){return this.b},uZn.md=function(){return this.c},uZn.Hb=function(){return xx(this)},uZn.Di=function(n){Rq(this,mK(n))},uZn.nd=function(n){return DG(this,mK(n))},uZn.Lh=function(n,t,e){switch(n){case 0:return this.b;case 1:return this.c}return $tn(this,n-iQ((YYn(),H_t)),ern(uG(Lsn(this,16),29)||H_t,n),t,e)},uZn.Wh=function(n){switch(n){case 0:return null!=this.b;case 1:return null!=this.c}return l5(this,n-iQ((YYn(),H_t)),ern(uG(Lsn(this,16),29)||H_t,n))},uZn.bi=function(n,t){switch(n){case 0:return void Kq(this,mK(t));case 1:return void Jan(this,mK(t))}lpn(this,n-iQ((YYn(),H_t)),ern(uG(Lsn(this,16),29)||H_t,n),t)},uZn.ii=function(){return YYn(),H_t},uZn.ki=function(n){switch(n){case 0:return void Qan(this,null);case 1:return void Jan(this,null)}sdn(this,n-iQ((YYn(),H_t)),ern(uG(Lsn(this,16),29)||H_t,n))},uZn.Bi=function(){var n;return-1==this.a&&(n=this.b,this.a=null==n?0:pln(n)),this.a},uZn.Ci=function(n){this.a=n},uZn.Ib=function(){var n;return 64&this.Db?vxn(this):((n=new fx(vxn(this))).a+=" (key: ",VA(n,this.b),n.a+=", value: ",VA(n,this.c),n.a+=")",n.a)},uZn.a=-1,uZn.b=null,uZn.c=null;var rBt,cBt,aBt,oBt,uBt,sBt,hBt,fBt,lBt,bBt,wBt=zW(Ytt,"EStringToStringMapEntryImpl",561),dBt=Iq(art,"FeatureMap/Entry/Internal");sDn(576,1,Art),uZn.xl=function(n){return this.yl(uG(n,54))},uZn.yl=function(n){return this.xl(n)},uZn.Fb=function(n){var t,e;return this===n||!!F$(n,76)&&(t=uG(n,76)).Lk()==this.c&&(null==(e=this.md())?null==t.md():udn(e,t.md()))},uZn.Lk=function(){return this.c},uZn.Hb=function(){var n;return n=this.md(),Hon(this.c)^(null==n?0:Hon(n))},uZn.Ib=function(){var n,t;return t=Hrn((n=this.c).qk()).yi(),n.xe(),(null!=t&&0!=t.length?t+":"+n.xe():n.xe())+"="+this.md()},zW(Ytt,"EStructuralFeatureImpl/BasicFeatureMapEntry",576),sDn(791,576,Art,sF),uZn.yl=function(n){return new sF(this.c,n)},uZn.md=function(){return this.a},uZn.zl=function(n,t,e){return Kun(this,n,this.a,t,e)},uZn.Al=function(n,t,e){return Fun(this,n,this.a,t,e)},zW(Ytt,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",791),sDn(1350,1,{},SA),uZn.yk=function(n,t,e,i,r){return uG(vtn(n,this.b),220).Yl(this.a).Fk(i)},uZn.zk=function(n,t,e,i,r){return uG(vtn(n,this.b),220).Pl(this.a,i,r)},uZn.Ak=function(n,t,e,i,r){return uG(vtn(n,this.b),220).Ql(this.a,i,r)},uZn.Bk=function(n,t,e){return uG(vtn(n,this.b),220).Yl(this.a).Qj()},uZn.Ck=function(n,t,e,i){uG(vtn(n,this.b),220).Yl(this.a).Wb(i)},uZn.Dk=function(n,t,e){return uG(vtn(n,this.b),220).Yl(this.a)},uZn.Ek=function(n,t,e){uG(vtn(n,this.b),220).Yl(this.a).Gk()},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1350),sDn(91,1,{},RU,CY,GZ,r8),uZn.yk=function(n,t,e,i,r){var c;if(null==(c=t.li(e))&&t.mi(e,c=xYn(this,n)),!r)switch(this.e){case 50:case 41:return uG(c,597).bk();case 40:return uG(c,220).Vl()}return c},uZn.zk=function(n,t,e,i,r){var c;return null==(c=t.li(e))&&t.mi(e,c=xYn(this,n)),uG(c,71).Wk(i,r)},uZn.Ak=function(n,t,e,i,r){var c;return null!=(c=t.li(e))&&(r=uG(c,71).Xk(i,r)),r},uZn.Bk=function(n,t,e){var i;return null!=(i=t.li(e))&&uG(i,79).Qj()},uZn.Ck=function(n,t,e,i){var r;!(r=uG(t.li(e),79))&&t.mi(e,r=xYn(this,n)),r.Wb(i)},uZn.Dk=function(n,t,e){var i;return null==(i=t.li(e))&&t.mi(e,i=xYn(this,n)),F$(i,79)?uG(i,79):new _m(uG(t.li(e),15))},uZn.Ek=function(n,t,e){var i;!(i=uG(t.li(e),79))&&t.mi(e,i=xYn(this,n)),i.Gk()},uZn.b=0,uZn.e=0,zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateMany",91),sDn(512,1,{}),uZn.zk=function(n,t,e,i,r){throw hv(new Kv)},uZn.Ak=function(n,t,e,i,r){throw hv(new Kv)},uZn.Dk=function(n,t,e){return new IY(this,n,t,e)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingle",512),sDn(1367,1,ort,IY),uZn.Fk=function(n){return this.a.yk(this.c,this.d,this.b,n,!0)},uZn.Qj=function(){return this.a.Bk(this.c,this.d,this.b)},uZn.Wb=function(n){this.a.Ck(this.c,this.d,this.b,n)},uZn.Gk=function(){this.a.Ek(this.c,this.d,this.b)},uZn.b=0,zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingle/1",1367),sDn(784,512,{},_1),uZn.yk=function(n,t,e,i,r){return PHn(n,n.Ph(),n.Fh())==this.b?this.bl()&&i?J$n(n):n.Ph():null},uZn.zk=function(n,t,e,i,r){var c,a;return n.Ph()&&(r=(c=n.Fh())>=0?n.Ah(r):n.Ph().Th(n,-1-c,null,r)),a=emn(n.Dh(),this.e),n.Ch(i,a,r)},uZn.Ak=function(n,t,e,i,r){var c;return c=emn(n.Dh(),this.e),n.Ch(null,c,r)},uZn.Bk=function(n,t,e){var i;return i=emn(n.Dh(),this.e),!!n.Ph()&&n.Fh()==i},uZn.Ck=function(n,t,e,i){var r,c,a,o,u;if(null!=i&&!LGn(this.a,i))throw hv(new mM(Lrt+(F$(i,58)?nPn(uG(i,58).Dh()):crn(Tbn(i)))+Nrt+this.a+"'"));if(r=n.Ph(),a=emn(n.Dh(),this.e),xA(i)!==xA(r)||n.Fh()!=a&&null!=i){if(eEn(n,uG(i,58)))throw hv(new vM(net+n.Ib()));u=null,r&&(u=(c=n.Fh())>=0?n.Ah(u):n.Ph().Th(n,-1-c,null,u)),(o=uG(i,54))&&(u=o.Rh(n,emn(o.Dh(),this.b),null,u)),(u=n.Ch(o,a,u))&&u.oj()}else n.vh()&&n.wh()&&Msn(n,new lV(n,1,a,i,i))},uZn.Ek=function(n,t,e){var i,r,c;n.Ph()?(c=(i=n.Fh())>=0?n.Ah(null):n.Ph().Th(n,-1-i,null,null),r=emn(n.Dh(),this.e),(c=n.Ch(null,r,c))&&c.oj()):n.vh()&&n.wh()&&Msn(n,new bV(n,1,this.e,null,null))},uZn.bl=function(){return!1},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",784),sDn(1351,784,{},KU),uZn.bl=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1351),sDn(574,512,{}),uZn.yk=function(n,t,e,i,r){var c;return null==(c=t.li(e))?this.b:xA(c)===xA(rBt)?null:c},uZn.Bk=function(n,t,e){var i;return null!=(i=t.li(e))&&(xA(i)===xA(rBt)||!udn(i,this.b))},uZn.Ck=function(n,t,e,i){var r,c;n.vh()&&n.wh()?(r=null==(c=t.li(e))?this.b:xA(c)===xA(rBt)?null:c,null==i?null!=this.c?(t.mi(e,null),i=this.b):null!=this.b?t.mi(e,rBt):t.mi(e,null):(this.Bl(i),t.mi(e,i)),Msn(n,this.d.Cl(n,1,this.e,r,i))):null==i?null!=this.c?t.mi(e,null):null!=this.b?t.mi(e,rBt):t.mi(e,null):(this.Bl(i),t.mi(e,i))},uZn.Ek=function(n,t,e){var i,r;n.vh()&&n.wh()?(i=null==(r=t.li(e))?this.b:xA(r)===xA(rBt)?null:r,t.ni(e),Msn(n,this.d.Cl(n,1,this.e,i,this.b))):t.ni(e)},uZn.Bl=function(n){throw hv(new $v)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",574),sDn($rt,1,{},Is),uZn.Cl=function(n,t,e,i,r){return new bV(n,t,e,i,r)},uZn.Dl=function(n,t,e,i,r,c){return new kZ(n,t,e,i,r,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",$rt),sDn(1368,$rt,{},Os),uZn.Cl=function(n,t,e,i,r){return new P9(n,t,e,oM(gK(i)),oM(gK(r)))},uZn.Dl=function(n,t,e,i,r,c){return new w4(n,t,e,oM(gK(i)),oM(gK(r)),c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1368),sDn(1369,$rt,{},As),uZn.Cl=function(n,t,e,i,r){return new Bcn(n,t,e,uG(i,222).a,uG(r,222).a)},uZn.Dl=function(n,t,e,i,r,c){return new o4(n,t,e,uG(i,222).a,uG(r,222).a,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1369),sDn(1370,$rt,{},Ls),uZn.Cl=function(n,t,e,i,r){return new Hcn(n,t,e,uG(i,180).a,uG(r,180).a)},uZn.Dl=function(n,t,e,i,r,c){return new u4(n,t,e,uG(i,180).a,uG(r,180).a,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1370),sDn(1371,$rt,{},Ns),uZn.Cl=function(n,t,e,i,r){return new E9(n,t,e,uM(pK(i)),uM(pK(r)))},uZn.Dl=function(n,t,e,i,r,c){return new s4(n,t,e,uM(pK(i)),uM(pK(r)),c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1371),sDn(1372,$rt,{},$s),uZn.Cl=function(n,t,e,i,r){return new qcn(n,t,e,uG(i,161).a,uG(r,161).a)},uZn.Dl=function(n,t,e,i,r,c){return new h4(n,t,e,uG(i,161).a,uG(r,161).a,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1372),sDn(1373,$rt,{},Ds),uZn.Cl=function(n,t,e,i,r){return new S9(n,t,e,uG(i,17).a,uG(r,17).a)},uZn.Dl=function(n,t,e,i,r,c){return new f4(n,t,e,uG(i,17).a,uG(r,17).a,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1373),sDn(1374,$rt,{},xs),uZn.Cl=function(n,t,e,i,r){return new Ucn(n,t,e,uG(i,168).a,uG(r,168).a)},uZn.Dl=function(n,t,e,i,r,c){return new l4(n,t,e,uG(i,168).a,uG(r,168).a,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1374),sDn(1375,$rt,{},Rs),uZn.Cl=function(n,t,e,i,r){return new Gcn(n,t,e,uG(i,191).a,uG(r,191).a)},uZn.Dl=function(n,t,e,i,r,c){return new b4(n,t,e,uG(i,191).a,uG(r,191).a,c)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1375),sDn(1353,574,{},OY),uZn.Bl=function(n){if(!this.a.fk(n))throw hv(new mM(Lrt+Tbn(n)+Nrt+this.a+"'"))},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1353),sDn(1354,574,{},lz),uZn.Bl=function(n){},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1354),sDn(785,574,{}),uZn.Bk=function(n,t,e){return null!=t.li(e)},uZn.Ck=function(n,t,e,i){var r,c;n.vh()&&n.wh()?(r=!0,null==(c=t.li(e))?(r=!1,c=this.b):xA(c)===xA(rBt)&&(c=null),null==i?null!=this.c?(t.mi(e,null),i=this.b):t.mi(e,rBt):(this.Bl(i),t.mi(e,i)),Msn(n,this.d.Dl(n,1,this.e,c,i,!r))):null==i?null!=this.c?t.mi(e,null):t.mi(e,rBt):(this.Bl(i),t.mi(e,i))},uZn.Ek=function(n,t,e){var i,r;n.vh()&&n.wh()?(i=!0,null==(r=t.li(e))?(i=!1,r=this.b):xA(r)===xA(rBt)&&(r=null),t.ni(e),Msn(n,this.d.Dl(n,2,this.e,r,this.b,i))):t.ni(e)},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",785),sDn(1355,785,{},AY),uZn.Bl=function(n){if(!this.a.fk(n))throw hv(new mM(Lrt+Tbn(n)+Nrt+this.a+"'"))},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1355),sDn(1356,785,{},bz),uZn.Bl=function(n){},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1356),sDn(410,512,{},OX),uZn.yk=function(n,t,e,i,r){var c,a,o,u,s;if(s=t.li(e),this.tk()&&xA(s)===xA(rBt))return null;if(this.bl()&&i&&null!=s){if((o=uG(s,54)).Vh()&&o!=(u=mwn(n,o))){if(!LGn(this.a,u))throw hv(new mM(Lrt+Tbn(u)+Nrt+this.a+"'"));t.mi(e,s=u),this.al()&&(c=uG(u,54),a=o.Th(n,this.b?emn(o.Dh(),this.b):-1-emn(n.Dh(),this.e),null,null),!c.Ph()&&(a=c.Rh(n,this.b?emn(c.Dh(),this.b):-1-emn(n.Dh(),this.e),null,a)),a&&a.oj()),n.vh()&&n.wh()&&Msn(n,new bV(n,9,this.e,o,u))}return s}return s},uZn.zk=function(n,t,e,i,r){var c,a;return xA(a=t.li(e))===xA(rBt)&&(a=null),t.mi(e,i),this.Mj()?xA(a)!==xA(i)&&null!=a&&(r=(c=uG(a,54)).Th(n,emn(c.Dh(),this.b),null,r)):this.al()&&null!=a&&(r=uG(a,54).Th(n,-1-emn(n.Dh(),this.e),null,r)),n.vh()&&n.wh()&&(!r&&(r=new cj(4)),r.nj(new bV(n,1,this.e,a,i))),r},uZn.Ak=function(n,t,e,i,r){var c;return xA(c=t.li(e))===xA(rBt)&&(c=null),t.ni(e),n.vh()&&n.wh()&&(!r&&(r=new cj(4)),this.tk()?r.nj(new bV(n,2,this.e,c,null)):r.nj(new bV(n,1,this.e,c,null))),r},uZn.Bk=function(n,t,e){return null!=t.li(e)},uZn.Ck=function(n,t,e,i){var r,c,a,o,u;if(null!=i&&!LGn(this.a,i))throw hv(new mM(Lrt+(F$(i,58)?nPn(uG(i,58).Dh()):crn(Tbn(i)))+Nrt+this.a+"'"));o=null!=(u=t.li(e)),this.tk()&&xA(u)===xA(rBt)&&(u=null),a=null,this.Mj()?xA(u)!==xA(i)&&(null!=u&&(a=(r=uG(u,54)).Th(n,emn(r.Dh(),this.b),null,a)),null!=i&&(a=(r=uG(i,54)).Rh(n,emn(r.Dh(),this.b),null,a))):this.al()&&xA(u)!==xA(i)&&(null!=u&&(a=uG(u,54).Th(n,-1-emn(n.Dh(),this.e),null,a)),null!=i&&(a=uG(i,54).Rh(n,-1-emn(n.Dh(),this.e),null,a))),null==i&&this.tk()?t.mi(e,rBt):t.mi(e,i),n.vh()&&n.wh()?(c=new kZ(n,1,this.e,u,i,this.tk()&&!o),a?(a.nj(c),a.oj()):Msn(n,c)):a&&a.oj()},uZn.Ek=function(n,t,e){var i,r,c,a,o;a=null!=(o=t.li(e)),this.tk()&&xA(o)===xA(rBt)&&(o=null),c=null,null!=o&&(this.Mj()?c=(i=uG(o,54)).Th(n,emn(i.Dh(),this.b),null,c):this.al()&&(c=uG(o,54).Th(n,-1-emn(n.Dh(),this.e),null,c))),t.ni(e),n.vh()&&n.wh()?(r=new kZ(n,this.tk()?2:1,this.e,o,null,a),c?(c.nj(r),c.oj()):Msn(n,r)):c&&c.oj()},uZn.Mj=function(){return!1},uZn.al=function(){return!1},uZn.bl=function(){return!1},uZn.tk=function(){return!1},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",410),sDn(575,410,{},tK),uZn.al=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",575),sDn(1359,575,{},eK),uZn.bl=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1359),sDn(787,575,{},iK),uZn.tk=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",787),sDn(1361,787,{},cK),uZn.bl=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1361),sDn(650,575,{},FU),uZn.Mj=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",650),sDn(1360,650,{},HU),uZn.bl=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1360),sDn(788,650,{},UU),uZn.tk=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",788),sDn(1362,788,{},GU),uZn.bl=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1362),sDn(651,410,{},rK),uZn.bl=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",651),sDn(1363,651,{},aK),uZn.tk=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1363),sDn(789,651,{},_U),uZn.Mj=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",789),sDn(1364,789,{},qU),uZn.tk=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1364),sDn(1357,410,{},oK),uZn.tk=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1357),sDn(786,410,{},BU),uZn.Mj=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",786),sDn(1358,786,{},XU),uZn.tk=function(){return!0},zW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1358),sDn(790,576,Art,EQ),uZn.yl=function(n){return new EQ(this.a,this.c,n)},uZn.md=function(){return this.b},uZn.zl=function(n,t,e){return Snn(this,n,this.b,e)},uZn.Al=function(n,t,e){return Pnn(this,n,this.b,e)},zW(Ytt,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",790),sDn(1365,1,ort,_m),uZn.Fk=function(n){return this.a},uZn.Qj=function(){return F$(this.a,97)?uG(this.a,97).Qj():!this.a.dc()},uZn.Wb=function(n){this.a.$b(),this.a.Gc(uG(n,15))},uZn.Gk=function(){F$(this.a,97)?uG(this.a,97).Gk():this.a.$b()},zW(Ytt,"EStructuralFeatureImpl/SettingMany",1365),sDn(1366,576,Art,o8),uZn.xl=function(n){return new hF((uVn(),oHt),this.b.ri(this.a,n))},uZn.md=function(){return null},uZn.zl=function(n,t,e){return e},uZn.Al=function(n,t,e){return e},zW(Ytt,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1366),sDn(652,576,Art,hF),uZn.xl=function(n){return new hF(this.c,n)},uZn.md=function(){return this.a},uZn.zl=function(n,t,e){return e},uZn.Al=function(n,t,e){return e},zW(Ytt,"EStructuralFeatureImpl/SimpleFeatureMapEntry",652),sDn(403,506,Qet,Ks),uZn.aj=function(n){return Inn(h_t,EZn,29,n,0,1)},uZn.Yi=function(){return!1},zW(Ytt,"ESuperAdapter/1",403),sDn(457,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,850:1,54:1,99:1,158:1,457:1,119:1,120:1},Fs),uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new AX(this,g_t,this)),this.a}return $tn(this,n-iQ((YYn(),q_t)),ern(uG(Lsn(this,16),29)||q_t,n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Nyn(this.Ab,n,e);case 2:return!this.a&&(this.a=new AX(this,g_t,this)),Nyn(this.a,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),q_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),q_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!!this.a&&0!=this.a.i}return l5(this,n-iQ((YYn(),q_t)),ern(uG(Lsn(this,16),29)||q_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),Czn(this.Ab),!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void qon(this,mK(t));case 2:return!this.a&&(this.a=new AX(this,g_t,this)),Czn(this.a),!this.a&&(this.a=new AX(this,g_t,this)),void CW(this.a,uG(t,16))}lpn(this,n-iQ((YYn(),q_t)),ern(uG(Lsn(this,16),29)||q_t,n),t)},uZn.ii=function(){return YYn(),q_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fV(c_t,this,0,3)),void Czn(this.Ab);case 1:return void qon(this,null);case 2:return!this.a&&(this.a=new AX(this,g_t,this)),void Czn(this.a)}sdn(this,n-iQ((YYn(),q_t)),ern(uG(Lsn(this,16),29)||q_t,n))},zW(Ytt,"ETypeParameterImpl",457),sDn(458,83,Trt,AX),uZn.Nj=function(n,t){return mCn(this,uG(n,89),t)},uZn.Oj=function(n,t){return vCn(this,uG(n,89),t)},zW(Ytt,"ETypeParameterImpl/1",458),sDn(647,45,B0n,ty),uZn.ec=function(){return new Um(this)},zW(Ytt,"ETypeParameterImpl/2",647),sDn(570,KZn,FZn,Um),uZn.Fc=function(n){return WF(this,uG(n,89))},uZn.Gc=function(n){var t,e,i;for(i=!1,e=n.Kc();e.Ob();)t=uG(e.Pb(),89),null==vJ(this.a,t,"")&&(i=!0);return i},uZn.$b=function(){$V(this.a)},uZn.Hc=function(n){return PV(this.a,n)},uZn.Kc=function(){return new Gm(new bsn(new Nw(this.a).a))},uZn.Mc=function(n){return C7(this,n)},uZn.gc=function(){return oS(this.a)},zW(Ytt,"ETypeParameterImpl/2/1",570),sDn(571,1,$Zn,Gm),uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return uG(von(this.a).ld(),89)},uZn.Ob=function(){return this.a.b},uZn.Qb=function(){Oen(this.a)},zW(Ytt,"ETypeParameterImpl/2/1/1",571),sDn(1329,45,B0n,ey),uZn._b=function(n){return RA(n)?AZ(this,n):!!FX(this.f,n)},uZn.xc=function(n){var t;return F$(t=RA(n)?U1(this,n):DA(FX(this.f,n)),851)?(t=uG(t,851).Kk(),vJ(this,uG(n,241),t),t):null!=t?t:null==n?(SP(),EBt):null},zW(Ytt,"EValidatorRegistryImpl",1329),sDn(1349,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,2040:1,54:1,99:1,158:1,119:1,120:1},_s),uZn.ri=function(n,t){switch(n.hk()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return null==t?null:cpn(t);case 25:return Xrn(t);case 27:return nen(t);case 28:return ten(t);case 29:return null==t?null:N$(QKt[0],uG(t,206));case 41:return null==t?"":Ij(uG(t,297));case 42:return cpn(t);case 50:return mK(t);default:throw hv(new vM(tet+n.xe()+eet))}},uZn.si=function(n){var t;switch(-1==n.G&&(n.G=(t=Hrn(n))?Hyn(t.vi(),n):-1),n.G){case 0:return new Wk;case 1:return new vs;case 2:return new Kl;case 4:return new Gv;case 5:return new Jk;case 6:return new Uv;case 7:return new Fl;case 10:return new ps;case 11:return new Yk;case 12:return new aZ;case 13:return new ny;case 14:return new PK;case 17:return new Cs;case 18:return new ev;case 19:return new Fs;default:throw hv(new vM(cet+n.zb+eet))}},uZn.ti=function(n,t){switch(n.hk()){case 20:return null==t?null:new Wj(t);case 21:return null==t?null:new PN(t);case 23:case 22:return null==t?null:Ovn(t);case 26:case 24:return null==t?null:Ben(vUn(t,-128,127)<<24>>24);case 25:return cxn(t);case 27:return sjn(t);case 28:return hjn(t);case 29:return rIn(t);case 32:case 31:return null==t?null:YIn(t);case 38:case 37:return null==t?null:new tk(t);case 40:case 39:return null==t?null:xwn(vUn(t,j1n,vZn));case 41:case 42:return null;case 44:case 43:return null==t?null:Hvn(tJn(t));case 49:case 48:return null==t?null:Rwn(vUn(t,xrt,32767)<<16>>16);case 50:return t;default:throw hv(new vM(tet+n.xe()+eet))}},zW(Ytt,"EcoreFactoryImpl",1349),sDn(560,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,2038:1,54:1,99:1,158:1,184:1,560:1,119:1,120:1,690:1},dJ),uZn.gb=!1,uZn.hb=!1;var gBt,pBt=!1;zW(Ytt,"EcorePackageImpl",560),sDn(1234,1,{851:1},Bs),uZn.Kk=function(){return HD(),SBt},zW(Ytt,"EcorePackageImpl/1",1234),sDn(1243,1,Wrt,Hs),uZn.fk=function(n){return F$(n,155)},uZn.gk=function(n){return Inn(uFt,EZn,155,n,0,1)},zW(Ytt,"EcorePackageImpl/10",1243),sDn(1244,1,Wrt,Us),uZn.fk=function(n){return F$(n,197)},uZn.gk=function(n){return Inn(hFt,EZn,197,n,0,1)},zW(Ytt,"EcorePackageImpl/11",1244),sDn(1245,1,Wrt,Gs),uZn.fk=function(n){return F$(n,58)},uZn.gk=function(n){return Inn(nFt,EZn,58,n,0,1)},zW(Ytt,"EcorePackageImpl/12",1245),sDn(1246,1,Wrt,qs),uZn.fk=function(n){return F$(n,411)},uZn.gk=function(n){return Inn(p_t,yrt,62,n,0,1)},zW(Ytt,"EcorePackageImpl/13",1246),sDn(1247,1,Wrt,Xs),uZn.fk=function(n){return F$(n,241)},uZn.gk=function(n){return Inn(fFt,EZn,241,n,0,1)},zW(Ytt,"EcorePackageImpl/14",1247),sDn(1248,1,Wrt,zs),uZn.fk=function(n){return F$(n,518)},uZn.gk=function(n){return Inn(m_t,EZn,2116,n,0,1)},zW(Ytt,"EcorePackageImpl/15",1248),sDn(1249,1,Wrt,Vs),uZn.fk=function(n){return F$(n,102)},uZn.gk=function(n){return Inn(v_t,krt,19,n,0,1)},zW(Ytt,"EcorePackageImpl/16",1249),sDn(1250,1,Wrt,Ws),uZn.fk=function(n){return F$(n,179)},uZn.gk=function(n){return Inn(o_t,krt,179,n,0,1)},zW(Ytt,"EcorePackageImpl/17",1250),sDn(1251,1,Wrt,Qs),uZn.fk=function(n){return F$(n,481)},uZn.gk=function(n){return Inn(a_t,EZn,481,n,0,1)},zW(Ytt,"EcorePackageImpl/18",1251),sDn(1252,1,Wrt,Js),uZn.fk=function(n){return F$(n,561)},uZn.gk=function(n){return Inn(wBt,Xit,561,n,0,1)},zW(Ytt,"EcorePackageImpl/19",1252),sDn(1235,1,Wrt,Ys),uZn.fk=function(n){return F$(n,331)},uZn.gk=function(n){return Inn(u_t,krt,35,n,0,1)},zW(Ytt,"EcorePackageImpl/2",1235),sDn(1253,1,Wrt,Zs),uZn.fk=function(n){return F$(n,248)},uZn.gk=function(n){return Inn(g_t,Prt,89,n,0,1)},zW(Ytt,"EcorePackageImpl/20",1253),sDn(1254,1,Wrt,nh),uZn.fk=function(n){return F$(n,457)},uZn.gk=function(n){return Inn(J_t,EZn,850,n,0,1)},zW(Ytt,"EcorePackageImpl/21",1254),sDn(1255,1,Wrt,th),uZn.fk=function(n){return KA(n)},uZn.gk=function(n){return Inn(cot,zZn,485,n,8,1)},zW(Ytt,"EcorePackageImpl/22",1255),sDn(1256,1,Wrt,eh),uZn.fk=function(n){return F$(n,195)},uZn.gk=function(n){return Inn(tUt,zZn,195,n,0,2)},zW(Ytt,"EcorePackageImpl/23",1256),sDn(1257,1,Wrt,ih),uZn.fk=function(n){return F$(n,222)},uZn.gk=function(n){return Inn(uot,zZn,222,n,0,1)},zW(Ytt,"EcorePackageImpl/24",1257),sDn(1258,1,Wrt,rh),uZn.fk=function(n){return F$(n,180)},uZn.gk=function(n){return Inn(hot,zZn,180,n,0,1)},zW(Ytt,"EcorePackageImpl/25",1258),sDn(1259,1,Wrt,ch),uZn.fk=function(n){return F$(n,206)},uZn.gk=function(n){return Inn(iot,zZn,206,n,0,1)},zW(Ytt,"EcorePackageImpl/26",1259),sDn(1260,1,Wrt,ah),uZn.fk=function(n){return!1},uZn.gk=function(n){return Inn(aUt,EZn,2215,n,0,1)},zW(Ytt,"EcorePackageImpl/27",1260),sDn(1261,1,Wrt,oh),uZn.fk=function(n){return FA(n)},uZn.gk=function(n){return Inn(fot,zZn,345,n,7,1)},zW(Ytt,"EcorePackageImpl/28",1261),sDn(1262,1,Wrt,uh),uZn.fk=function(n){return F$(n,61)},uZn.gk=function(n){return Inn(CFt,H3n,61,n,0,1)},zW(Ytt,"EcorePackageImpl/29",1262),sDn(1236,1,Wrt,sh),uZn.fk=function(n){return F$(n,519)},uZn.gk=function(n){return Inn(c_t,{3:1,4:1,5:1,2033:1},598,n,0,1)},zW(Ytt,"EcorePackageImpl/3",1236),sDn(1263,1,Wrt,hh),uZn.fk=function(n){return F$(n,582)},uZn.gk=function(n){return Inn(BFt,EZn,2039,n,0,1)},zW(Ytt,"EcorePackageImpl/30",1263),sDn(1264,1,Wrt,fh),uZn.fk=function(n){return F$(n,160)},uZn.gk=function(n){return Inn(IBt,H3n,160,n,0,1)},zW(Ytt,"EcorePackageImpl/31",1264),sDn(1265,1,Wrt,lh),uZn.fk=function(n){return F$(n,76)},uZn.gk=function(n){return Inn(Z_t,Qrt,76,n,0,1)},zW(Ytt,"EcorePackageImpl/32",1265),sDn(1266,1,Wrt,bh),uZn.fk=function(n){return F$(n,161)},uZn.gk=function(n){return Inn(lot,zZn,161,n,0,1)},zW(Ytt,"EcorePackageImpl/33",1266),sDn(1267,1,Wrt,wh),uZn.fk=function(n){return F$(n,17)},uZn.gk=function(n){return Inn(dot,zZn,17,n,0,1)},zW(Ytt,"EcorePackageImpl/34",1267),sDn(1268,1,Wrt,dh),uZn.fk=function(n){return F$(n,297)},uZn.gk=function(n){return Inn(gat,EZn,297,n,0,1)},zW(Ytt,"EcorePackageImpl/35",1268),sDn(1269,1,Wrt,gh),uZn.fk=function(n){return F$(n,168)},uZn.gk=function(n){return Inn(yot,zZn,168,n,0,1)},zW(Ytt,"EcorePackageImpl/36",1269),sDn(1270,1,Wrt,ph),uZn.fk=function(n){return F$(n,85)},uZn.gk=function(n){return Inn(mat,EZn,85,n,0,1)},zW(Ytt,"EcorePackageImpl/37",1270),sDn(1271,1,Wrt,mh),uZn.fk=function(n){return F$(n,599)},uZn.gk=function(n){return Inn(jBt,EZn,599,n,0,1)},zW(Ytt,"EcorePackageImpl/38",1271),sDn(1272,1,Wrt,vh),uZn.fk=function(n){return!1},uZn.gk=function(n){return Inn(oUt,EZn,2216,n,0,1)},zW(Ytt,"EcorePackageImpl/39",1272),sDn(1237,1,Wrt,kh),uZn.fk=function(n){return F$(n,90)},uZn.gk=function(n){return Inn(h_t,EZn,29,n,0,1)},zW(Ytt,"EcorePackageImpl/4",1237),sDn(1273,1,Wrt,yh),uZn.fk=function(n){return F$(n,191)},uZn.gk=function(n){return Inn(Tot,zZn,191,n,0,1)},zW(Ytt,"EcorePackageImpl/40",1273),sDn(1274,1,Wrt,Mh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(Ytt,"EcorePackageImpl/41",1274),sDn(1275,1,Wrt,Th),uZn.fk=function(n){return F$(n,596)},uZn.gk=function(n){return Inn(OFt,EZn,596,n,0,1)},zW(Ytt,"EcorePackageImpl/42",1275),sDn(1276,1,Wrt,jh),uZn.fk=function(n){return!1},uZn.gk=function(n){return Inn(uUt,zZn,2217,n,0,1)},zW(Ytt,"EcorePackageImpl/43",1276),sDn(1277,1,Wrt,Eh),uZn.fk=function(n){return F$(n,44)},uZn.gk=function(n){return Inn(Sat,c1n,44,n,0,1)},zW(Ytt,"EcorePackageImpl/44",1277),sDn(1238,1,Wrt,Sh),uZn.fk=function(n){return F$(n,142)},uZn.gk=function(n){return Inn(s_t,EZn,142,n,0,1)},zW(Ytt,"EcorePackageImpl/5",1238),sDn(1239,1,Wrt,Ph),uZn.fk=function(n){return F$(n,156)},uZn.gk=function(n){return Inn(f_t,EZn,156,n,0,1)},zW(Ytt,"EcorePackageImpl/6",1239),sDn(1240,1,Wrt,Ch),uZn.fk=function(n){return F$(n,469)},uZn.gk=function(n){return Inn(w_t,EZn,685,n,0,1)},zW(Ytt,"EcorePackageImpl/7",1240),sDn(1241,1,Wrt,Ih),uZn.fk=function(n){return F$(n,582)},uZn.gk=function(n){return Inn(d_t,EZn,694,n,0,1)},zW(Ytt,"EcorePackageImpl/8",1241),sDn(1242,1,Wrt,Oh),uZn.fk=function(n){return F$(n,480)},uZn.gk=function(n){return Inn(sFt,EZn,480,n,0,1)},zW(Ytt,"EcorePackageImpl/9",1242),sDn(1038,2080,Git,Qy),uZn.Mi=function(n,t){wdn(this,uG(t,424))},uZn.Qi=function(n,t){GAn(this,n,uG(t,424))},zW(Ytt,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",1038),sDn(1039,152,Bit,SQ),uZn.jj=function(){return this.a.a},zW(Ytt,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",1039),sDn(1067,1066,{},e$),zW("org.eclipse.emf.ecore.plugin","EcorePlugin",1067);var mBt,vBt,kBt,yBt,MBt,TBt,jBt=Iq(Jrt,"Resource");sDn(799,1524,Yrt),uZn.Hl=function(n){},uZn.Il=function(n){},uZn.El=function(){return!this.a&&(this.a=new qm(this)),this.a},uZn.Fl=function(n){var t,e,i,r,c;if((i=n.length)>0){if(s3(0,n.length),47==n.charCodeAt(0)){for(c=new R7(4),r=1,t=1;t<i;++t)s3(t,n.length),47==n.charCodeAt(t)&&(kD(c,r==t?"":(Knn(r,t,n.length),n.substr(r,t-r))),r=t+1);return kD(c,(s3(r,n.length+1),n.substr(r))),zEn(this,c)}s3(i-1,n.length),63==n.charCodeAt(i-1)&&(e=T_(n,$Cn(63),i-2))>0&&(Knn(0,e,n.length),n=n.substr(0,e))}return lNn(this,n)},uZn.Gl=function(){return this.c},uZn.Ib=function(){return Ij(this.Rm)+"@"+(Hon(this)>>>0).toString(16)+" uri='"+this.d+"'"},uZn.b=!1,zW(Zrt,"ResourceImpl",799),sDn(1525,799,Yrt,Xm),zW(Zrt,"BinaryResourceImpl",1525),sDn(1190,708,Jet),uZn.bj=function(n){return F$(n,58)?JZ(this,uG(n,58)):F$(n,599)?new DD(uG(n,599).El()):xA(n)===xA(this.f)?uG(n,16).Kc():(EK(),KFt.a)},uZn.Ob=function(){return u$n(this)},uZn.a=!1,zW(art,"EcoreUtil/ContentTreeIterator",1190),sDn(1526,1190,Jet,dV),uZn.bj=function(n){return xA(n)===xA(this.f)?uG(n,15).Kc():new L6(uG(n,58))},zW(Zrt,"ResourceImpl/5",1526),sDn(658,2092,Mrt,qm),uZn.Hc=function(n){return this.i<=4?sSn(this,n):F$(n,54)&&uG(n,54).Jh()==this.a},uZn.Mi=function(n,t){n==this.i-1&&(this.a.b||(this.a.b=!0))},uZn.Oi=function(n,t){0==n?this.a.b||(this.a.b=!0):Ann(this,n,t)},uZn.Qi=function(n,t){},uZn.Ri=function(n,t,e){},uZn.Lj=function(){return 2},uZn.jj=function(){return this.a},uZn.Mj=function(){return!0},uZn.Nj=function(n,t){return t=uG(n,54).fi(this.a,t)},uZn.Oj=function(n,t){return uG(n,54).fi(null,t)},uZn.Pj=function(){return!1},uZn.Si=function(){return!0},uZn.aj=function(n){return Inn(nFt,EZn,58,n,0,1)},uZn.Yi=function(){return!1},zW(Zrt,"ResourceImpl/ContentsEList",658),sDn(970,2062,m1n,zm),uZn.fd=function(n){return this.a.Ki(n)},uZn.gc=function(){return this.a.gc()},zW(art,"AbstractSequentialInternalEList/1",970),sDn(634,1,{},HG),zW(art,"BasicExtendedMetaData",634),sDn(1181,1,{},CA),uZn.Jl=function(){return null},uZn.Kl=function(){return-2==this.a&&fw(this,qCn(this.d,this.b)),this.a},uZn.Ll=function(){return null},uZn.Ml=function(){return hZ(),hZ(),zot},uZn.xe=function(){return this.c==wct&&lw(this,ckn(this.d,this.b)),this.c},uZn.Nl=function(){return 0},uZn.a=-2,uZn.c=wct,zW(art,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1181),sDn(1182,1,{},g4),uZn.Jl=function(){return this.a==(N7(),MBt)&&dw(this,TBn(this.f,this.b)),this.a},uZn.Kl=function(){return 0},uZn.Ll=function(){return this.c==(N7(),MBt)&&bw(this,jBn(this.f,this.b)),this.c},uZn.Ml=function(){return!this.d&&pw(this,iqn(this.f,this.b)),this.d},uZn.xe=function(){return this.e==wct&&vw(this,ckn(this.f,this.b)),this.e},uZn.Nl=function(){return-2==this.g&&yw(this,DPn(this.f,this.b)),this.g},uZn.e=wct,uZn.g=-2,zW(art,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",1182),sDn(1180,1,{},IA),uZn.b=!1,uZn.c=!1,zW(art,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1180),sDn(1183,1,{},p4),uZn.c=-2,uZn.e=wct,uZn.f=wct,zW(art,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1183),sDn(593,632,Trt,_G),uZn.Lj=function(){return this.c},uZn.ol=function(){return!1},uZn.Wi=function(n,t){return t},uZn.c=0,zW(art,"EDataTypeEList",593);var EBt,SBt,PBt,CBt,IBt=Iq(art,"FeatureMap");sDn(78,593,{3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},wsn),uZn.bd=function(n,t){iKn(this,n,uG(t,76))},uZn.Fc=function(n){return Qxn(this,uG(n,76))},uZn.Hi=function(n){OW(this,uG(n,76))},uZn.Nj=function(n,t){return q_(this,uG(n,76),t)},uZn.Oj=function(n,t){return X_(this,uG(n,76),t)},uZn.Ti=function(n,t){return bUn(this,n,t)},uZn.Wi=function(n,t){return IVn(this,n,uG(t,76))},uZn.hd=function(n,t){return kFn(this,n,uG(t,76))},uZn.Uj=function(n,t){return z_(this,uG(n,76),t)},uZn.Vj=function(n,t){return V_(this,uG(n,76),t)},uZn.Wj=function(n,t,e){return aPn(this,uG(n,76),uG(t,76),e)},uZn.Zi=function(n,t){return WPn(this,n,uG(t,76))},uZn.Ol=function(n,t){return GHn(this,n,t)},uZn.cd=function(n,t){var e,i,r,c,a,o,u,s,h;for(s=new Drn(t.gc()),r=t.Kc();r.Ob();)if(c=(i=uG(r.Pb(),76)).Lk(),EFn(this.e,c))(!c.Si()||!H5(this,c,i.md())&&!sSn(s,i))&&ttn(s,i);else{for(h=VKn(this.e.Dh(),c),e=uG(this.g,124),a=!0,o=0;o<this.i;++o)if(u=e[o],h.am(u.Lk())){uG(Uyn(this,o,i),76),a=!1;break}a&&ttn(s,i)}return bfn(this,n,s)},uZn.Gc=function(n){var t,e,i,r,c,a,o,u,s;for(u=new Drn(n.gc()),i=n.Kc();i.Ob();)if(r=(e=uG(i.Pb(),76)).Lk(),EFn(this.e,r))(!r.Si()||!H5(this,r,e.md())&&!sSn(u,e))&&ttn(u,e);else{for(s=VKn(this.e.Dh(),r),t=uG(this.g,124),c=!0,a=0;a<this.i;++a)if(o=t[a],s.am(o.Lk())){uG(Uyn(this,a,e),76),c=!1;break}c&&ttn(u,e)}return CW(this,u)},uZn.Fi=function(n){return this.j=-1,BGn(this,this.i,n)},uZn.Pl=function(n,t,e){return OBn(this,n,t,e)},uZn.Xk=function(n,t){return $Hn(this,n,t)},uZn.Ql=function(n,t,e){return fXn(this,n,t,e)},uZn.Rl=function(){return this},uZn.Sl=function(n,t){return dXn(this,n,t)},uZn.Tl=function(n){return uG(zrn(this,n),76).Lk()},uZn.Ul=function(n){return uG(zrn(this,n),76).md()},uZn.Vl=function(){return this.b},uZn.Mj=function(){return!0},uZn.Tj=function(){return!0},uZn.Wl=function(n){return!kmn(this,n)},uZn.aj=function(n){return Inn(dBt,Qrt,343,n,0,1)},uZn.pl=function(n){return fK(this,n)},uZn.Wb=function(n){cW(this,n)},uZn.Xl=function(n,t){BXn(this,n,t)},uZn.Yl=function(n){return non(this,n)},uZn.Zl=function(n){ETn(this,n)},zW(art,"BasicFeatureMap",78),sDn(1960,1,UZn),uZn.Nb=function(n){SV(this,n)},uZn.Rb=function(n){if(-1==this.g)throw hv(new xv);yz(this);try{LFn(this.e,this.b,this.a,n),this.d=this.e.j,_yn(this)}catch(t){throw F$(t=Ehn(t),77)?hv(new Fv):hv(t)}},uZn.Ob=function(){return Zln(this)},uZn.Sb=function(){return nbn(this)},uZn.Pb=function(){return _yn(this)},uZn.Tb=function(){return this.a},uZn.Ub=function(){var n;if(nbn(this))return yz(this),this.g=--this.a,this.ul()&&(n=ONn(this.e,this.b,this.c,this.a,this.j),this.j=n),this.i=0,this.j;throw hv(new Bv)},uZn.Vb=function(){return this.a-1},uZn.Qb=function(){if(-1==this.g)throw hv(new xv);yz(this);try{VOn(this.e,this.b,this.g),this.d=this.e.j,this.g<this.a&&(--this.a,--this.c),--this.g}catch(n){throw F$(n=Ehn(n),77)?hv(new Fv):hv(n)}},uZn.ul=function(){return!1},uZn.Wb=function(n){if(-1==this.g)throw hv(new xv);yz(this);try{hqn(this.e,this.b,this.g,n),this.d=this.e.j}catch(t){throw F$(t=Ehn(t),77)?hv(new Fv):hv(t)}},uZn.a=0,uZn.c=0,uZn.d=0,uZn.f=!1,uZn.g=0,uZn.i=0,zW(art,"FeatureMapUtil/BasicFeatureEIterator",1960),sDn(420,1960,UZn,Zsn),uZn.$l=function(){var n,t,e;for(e=this.e.i,n=uG(this.e.g,124);this.c<e;){if(t=n[this.c],this.k.am(t.Lk()))return this.j=this.f?t:t.md(),this.i=2,!0;++this.c}return this.i=1,this.g=-1,!1},uZn._l=function(){var n,t;for(n=uG(this.e.g,124);--this.c>=0;)if(t=n[this.c],this.k.am(t.Lk()))return this.j=this.f?t:t.md(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},zW(art,"BasicFeatureMap/FeatureEIterator",420),sDn(676,420,UZn,yL),uZn.ul=function(){return!0},zW(art,"BasicFeatureMap/ResolvingFeatureEIterator",676),sDn(968,496,Irt,G$),uZn.pj=function(){return this},zW(art,"EContentsEList/1",968),sDn(969,496,Irt,kL),uZn.ul=function(){return!1},zW(art,"EContentsEList/2",969),sDn(967,287,Ort,q$),uZn.wl=function(n){},uZn.Ob=function(){return!1},uZn.Sb=function(){return!1},zW(art,"EContentsEList/FeatureIteratorImpl/1",967),sDn(840,593,Trt,jD),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;Czn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,zW(art,"EDataTypeEList/Unsettable",840),sDn(1958,593,Trt,ED),uZn.Si=function(){return!0},zW(art,"EDataTypeUniqueEList",1958),sDn(1959,840,Trt,SD),uZn.Si=function(){return!0},zW(art,"EDataTypeUniqueEList/Unsettable",1959),sDn(147,83,Trt,PD),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectContainmentEList/Resolving",147),sDn(1184,555,Trt,CD),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectContainmentEList/Unsettable/Resolving",1184),sDn(766,14,Trt,r_),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;Czn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,zW(art,"EObjectContainmentWithInverseEList/Unsettable",766),sDn(1222,766,Trt,c_),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1222),sDn(757,505,Trt,ID),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;Czn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,zW(art,"EObjectEList/Unsettable",757),sDn(338,505,Trt,OD),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectResolvingEList",338),sDn(1844,757,Trt,AD),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectResolvingEList/Unsettable",1844),sDn(1527,1,{},Ah),zW(art,"EObjectValidator",1527),sDn(559,505,Trt,wV),uZn.il=function(){return this.d},uZn.jl=function(){return this.b},uZn.Mj=function(){return!0},uZn.ml=function(){return!0},uZn.b=0,zW(art,"EObjectWithInverseEList",559),sDn(1225,559,Trt,a_),uZn.ll=function(){return!0},zW(art,"EObjectWithInverseEList/ManyInverse",1225),sDn(635,559,Trt,o_),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;Czn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,zW(art,"EObjectWithInverseEList/Unsettable",635),sDn(1224,635,Trt,s_),uZn.ll=function(){return!0},zW(art,"EObjectWithInverseEList/Unsettable/ManyInverse",1224),sDn(767,559,Trt,u_),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectWithInverseResolvingEList",767),sDn(32,767,Trt,f_),uZn.ll=function(){return!0},zW(art,"EObjectWithInverseResolvingEList/ManyInverse",32),sDn(768,635,Trt,h_),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},zW(art,"EObjectWithInverseResolvingEList/Unsettable",768),sDn(1223,768,Trt,l_),uZn.ll=function(){return!0},zW(art,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1223),sDn(1185,632,Trt),uZn.Li=function(){return!(1792&this.b)},uZn.Ni=function(){this.b|=1},uZn.kl=function(){return!!(4&this.b)},uZn.Mj=function(){return!!(40&this.b)},uZn.ll=function(){return!!(16&this.b)},uZn.ml=function(){return!!(8&this.b)},uZn.nl=function(){return!!(this.b&frt)},uZn.al=function(){return!!(32&this.b)},uZn.ol=function(){return!!(this.b&w1n)},uZn.fk=function(n){return this.d?v5(this.d,n):this.Lk().Hk().fk(n)},uZn.Qj=function(){return 2&this.b?!!(1&this.b):0!=this.i},uZn.Si=function(){return!!(128&this.b)},uZn.Gk=function(){var n;Czn(this),2&this.b&&(uN(this.e)?(n=!!(1&this.b),this.b&=-2,Yv(this,new j9(this.e,2,emn(this.e.Dh(),this.Lk()),n,!1))):this.b&=-2)},uZn.Yi=function(){return!(1536&this.b)},uZn.b=0,zW(art,"EcoreEList/Generic",1185),sDn(1186,1185,Trt,yZ),uZn.Lk=function(){return this.a},zW(art,"EcoreEList/Dynamic",1186),sDn(765,66,Qet,Vm),uZn.aj=function(n){return Acn(this.a.a,n)},zW(art,"EcoreEMap/1",765),sDn(764,83,Trt,kV),uZn.Mi=function(n,t){bMn(this.b,uG(t,136))},uZn.Oi=function(n,t){Osn(this.b)},uZn.Pi=function(n,t,e){var i;++(i=this.b,uG(t,136),i).e},uZn.Qi=function(n,t){Vdn(this.b,uG(t,136))},uZn.Ri=function(n,t,e){Vdn(this.b,uG(e,136)),xA(e)===xA(t)&&uG(e,136).Ci(WN(uG(t,136).ld())),bMn(this.b,uG(t,136))},zW(art,"EcoreEMap/DelegateEObjectContainmentEList",764),sDn(1220,141,urt,xan),zW(art,"EcoreEMap/Unsettable",1220),sDn(1221,764,Trt,b_),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;Czn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,zW(art,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1221),sDn(1189,215,B0n,DW),uZn.a=!1,uZn.b=!1,zW(art,"EcoreUtil/Copier",1189),sDn(759,1,$Zn,L6),uZn.Nb=function(n){SV(this,n)},uZn.Ob=function(){return Ymn(this)},uZn.Pb=function(){var n;return Ymn(this),n=this.b,this.b=null,n},uZn.Qb=function(){this.a.Qb()},zW(art,"EcoreUtil/ProperContentIterator",759),sDn(1528,1527,{},_l),zW(art,"EcoreValidator",1528),Iq(art,"FeatureMapUtil/Validator"),sDn(1295,1,{2041:1},Lh),uZn.am=function(n){return!0},zW(art,"FeatureMapUtil/1",1295),sDn(773,1,{2041:1},MQn),uZn.am=function(n){var t;return this.c==n||(null==(t=gK(cQ(this.a,n)))?DBn(this,n)?(W9(this.a,n,(qx(),eot)),!0):(W9(this.a,n,(qx(),tot)),!1):t==(qx(),eot))},uZn.e=!1,zW(art,"FeatureMapUtil/BasicValidator",773),sDn(774,45,B0n,U$),zW(art,"FeatureMapUtil/BasicValidator/Cache",774),sDn(509,56,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,71:1,97:1},OA),uZn.bd=function(n,t){LFn(this.c,this.b,n,t)},uZn.Fc=function(n){return GHn(this.c,this.b,n)},uZn.cd=function(n,t){return _Xn(this.c,this.b,n,t)},uZn.Gc=function(n){return K$(this,n)},uZn.Gi=function(n,t){hrn(this.c,this.b,n,t)},uZn.Wk=function(n,t){return OBn(this.c,this.b,n,t)},uZn.$i=function(n){return gXn(this.c,this.b,n,!1)},uZn.Ii=function(){return wN(this.c,this.b)},uZn.Ji=function(){return dN(this.c,this.b)},uZn.Ki=function(n){return Onn(this.c,this.b,n)},uZn.Xk=function(n,t){return rF(this,n,t)},uZn.$b=function(){Zv(this)},uZn.Hc=function(n){return H5(this.c,this.b,n)},uZn.Ic=function(n){return Run(this.c,this.b,n)},uZn.Xb=function(n){return gXn(this.c,this.b,n,!0)},uZn.Fk=function(n){return this},uZn.dd=function(n){return U5(this.c,this.b,n)},uZn.dc=function(){return $A(this)},uZn.Qj=function(){return!kmn(this.c,this.b)},uZn.Kc=function(){return kin(this.c,this.b)},uZn.ed=function(){return yin(this.c,this.b)},uZn.fd=function(n){return lgn(this.c,this.b,n)},uZn.Ti=function(n,t){return EGn(this.c,this.b,n,t)},uZn.Ui=function(n,t){xnn(this.c,this.b,n,t)},uZn.gd=function(n){return VOn(this.c,this.b,n)},uZn.Mc=function(n){return DHn(this.c,this.b,n)},uZn.hd=function(n,t){return hqn(this.c,this.b,n,t)},uZn.Wb=function(n){C$n(this.c,this.b),K$(this,uG(n,15))},uZn.gc=function(){return fgn(this.c,this.b)},uZn.Pc=function(){return v4(this.c,this.b)},uZn.Qc=function(n){return G5(this.c,this.b,n)},uZn.Ib=function(){var n,t;for((t=new zM).a+="[",n=wN(this.c,this.b);Zln(n);)VA(t,ox(_yn(n))),Zln(n)&&(t.a+=TZn);return t.a+="]",t.a},uZn.Gk=function(){C$n(this.c,this.b)},zW(art,"FeatureMapUtil/FeatureEList",509),sDn(644,39,Bit,i8),uZn.hj=function(n){return ydn(this,n)},uZn.mj=function(n){var t,e,i,r;switch(this.d){case 1:case 2:if(xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return this.g=n.ij(),1==n.gj()&&(this.d=1),!0;break;case 3:if(3===n.gj()&&xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return this.d=5,ttn(t=new Drn(2),this.g),ttn(t,n.ij()),this.g=t,!0;break;case 5:if(3===n.gj()&&xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return uG(this.g,16).Fc(n.ij()),!0;break;case 4:switch(n.gj()){case 3:if(xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return this.d=1,this.g=n.ij(),!0;break;case 4:if(xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return this.d=6,ttn(r=new Drn(2),this.n),ttn(r,n.kj()),this.n=r,i=Uhn(cT(YHt,1),W1n,28,15,[this.o,n.lj()]),this.g=i,!0}break;case 6:if(4===n.gj()&&xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return uG(this.n,16).Fc(n.kj()),qGn(i=uG(this.g,53),0,e=Inn(YHt,W1n,28,i.length+1,15,1),0,i.length),e[i.length]=n.lj(),this.g=e,!0}return!1},zW(art,"FeatureMapUtil/FeatureENotificationImpl",644),sDn(564,509,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},Cq),uZn.Ol=function(n,t){return GHn(this.c,n,t)},uZn.Pl=function(n,t,e){return OBn(this.c,n,t,e)},uZn.Ql=function(n,t,e){return fXn(this.c,n,t,e)},uZn.Rl=function(){return this},uZn.Sl=function(n,t){return dXn(this.c,n,t)},uZn.Tl=function(n){return uG(gXn(this.c,this.b,n,!1),76).Lk()},uZn.Ul=function(n){return uG(gXn(this.c,this.b,n,!1),76).md()},uZn.Vl=function(){return this.a},uZn.Wl=function(n){return!kmn(this.c,n)},uZn.Xl=function(n,t){BXn(this.c,n,t)},uZn.Yl=function(n){return non(this.c,n)},uZn.Zl=function(n){ETn(this.c,n)},zW(art,"FeatureMapUtil/FeatureFeatureMap",564),sDn(1294,1,ort,PA),uZn.Fk=function(n){return gXn(this.b,this.a,-1,n)},uZn.Qj=function(){return!kmn(this.b,this.a)},uZn.Wb=function(n){BXn(this.b,this.a,n)},uZn.Gk=function(){C$n(this.b,this.a)},zW(art,"FeatureMapUtil/FeatureValue",1294);var OBt,ABt,LBt,NBt,$Bt,DBt=Iq(gct,"AnyType");sDn(680,63,S1n,PM),zW(gct,"InvalidDatatypeValueException",680);var xBt,RBt,KBt,FBt,_Bt,BBt,HBt,UBt,GBt,qBt,XBt,zBt,VBt,WBt,QBt,JBt,YBt,ZBt,nHt,tHt,eHt,iHt,rHt,cHt,aHt,oHt,uHt,sHt,hHt,fHt,lHt=Iq(gct,pct),bHt=Iq(gct,mct),wHt=Iq(gct,vct);sDn(844,516,{110:1,94:1,93:1,58:1,54:1,99:1,857:1},iy),uZn.Lh=function(n,t,e){switch(n){case 0:return e?(!this.c&&(this.c=new wsn(this,0)),this.c):(!this.c&&(this.c=new wsn(this,0)),this.c.b);case 1:return e?(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uVn(),FBt)),160)):(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uVn(),FBt)),160),220)).Vl();case 2:return e?(!this.b&&(this.b=new wsn(this,2)),this.b):(!this.b&&(this.b=new wsn(this,2)),this.b.b)}return $tn(this,n-iQ(this.ii()),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.c&&(this.c=new wsn(this,0)),$Hn(this.c,n,e);case 1:return(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uVn(),FBt)),160),71)).Xk(n,e);case 2:return!this.b&&(this.b=new wsn(this,2)),$Hn(this.b,n,e)}return uG(ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),t),69).wk().Ak(this,Wen(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.c&&0!=this.c.i;case 1:return!(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uVn(),FBt)),160)).dc();case 2:return!!this.b&&0!=this.b.i}return l5(this,n-iQ(this.ii()),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),n))},uZn.bi=function(n,t){switch(n){case 0:return!this.c&&(this.c=new wsn(this,0)),void cW(this.c,t);case 1:return void(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uVn(),FBt)),160),220)).Wb(t);case 2:return!this.b&&(this.b=new wsn(this,2)),void cW(this.b,t)}lpn(this,n-iQ(this.ii()),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),n),t)},uZn.ii=function(){return uVn(),KBt},uZn.ki=function(n){switch(n){case 0:return!this.c&&(this.c=new wsn(this,0)),void Czn(this.c);case 1:return void(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uVn(),FBt)),160)).$b();case 2:return!this.b&&(this.b=new wsn(this,2)),void Czn(this.b)}sdn(this,n-iQ(this.ii()),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),n))},uZn.Ib=function(){var n;return 4&this.j?vxn(this):((n=new fx(vxn(this))).a+=" (mixed: ",zA(n,this.c),n.a+=", anyAttribute: ",zA(n,this.b),n.a+=")",n.a)},zW(kct,"AnyTypeImpl",844),sDn(681,516,{110:1,94:1,93:1,58:1,54:1,99:1,2119:1,681:1},Uh),uZn.Lh=function(n,t,e){switch(n){case 0:return this.a;case 1:return this.b}return $tn(this,n-iQ((uVn(),JBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():JBt,n),t,e)},uZn.Wh=function(n){switch(n){case 0:return null!=this.a;case 1:return null!=this.b}return l5(this,n-iQ((uVn(),JBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():JBt,n))},uZn.bi=function(n,t){switch(n){case 0:return void jw(this,mK(t));case 1:return void Sw(this,mK(t))}lpn(this,n-iQ((uVn(),JBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():JBt,n),t)},uZn.ii=function(){return uVn(),JBt},uZn.ki=function(n){switch(n){case 0:return void(this.a=null);case 1:return void(this.b=null)}sdn(this,n-iQ((uVn(),JBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():JBt,n))},uZn.Ib=function(){var n;return 4&this.j?vxn(this):((n=new fx(vxn(this))).a+=" (data: ",VA(n,this.a),n.a+=", target: ",VA(n,this.b),n.a+=")",n.a)},uZn.a=null,uZn.b=null,zW(kct,"ProcessingInstructionImpl",681),sDn(682,844,{110:1,94:1,93:1,58:1,54:1,99:1,857:1,2120:1,682:1},ry),uZn.Lh=function(n,t,e){switch(n){case 0:return e?(!this.c&&(this.c=new wsn(this,0)),this.c):(!this.c&&(this.c=new wsn(this,0)),this.c.b);case 1:return e?(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uVn(),FBt)),160)):(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uVn(),FBt)),160),220)).Vl();case 2:return e?(!this.b&&(this.b=new wsn(this,2)),this.b):(!this.b&&(this.b=new wsn(this,2)),this.b.b);case 3:return!this.c&&(this.c=new wsn(this,0)),mK(dXn(this.c,(uVn(),nHt),!0));case 4:return g_(this.a,(!this.c&&(this.c=new wsn(this,0)),mK(dXn(this.c,(uVn(),nHt),!0))));case 5:return this.a}return $tn(this,n-iQ((uVn(),ZBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():ZBt,n),t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.c&&0!=this.c.i;case 1:return!(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uVn(),FBt)),160)).dc();case 2:return!!this.b&&0!=this.b.i;case 3:return!this.c&&(this.c=new wsn(this,0)),null!=mK(dXn(this.c,(uVn(),nHt),!0));case 4:return null!=g_(this.a,(!this.c&&(this.c=new wsn(this,0)),mK(dXn(this.c,(uVn(),nHt),!0))));case 5:return!!this.a}return l5(this,n-iQ((uVn(),ZBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():ZBt,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.c&&(this.c=new wsn(this,0)),void cW(this.c,t);case 1:return void(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uVn(),FBt)),160),220)).Wb(t);case 2:return!this.b&&(this.b=new wsn(this,2)),void cW(this.b,t);case 3:return void m4(this,mK(t));case 4:return void m4(this,d_(this.a,t));case 5:return void Ew(this,uG(t,156))}lpn(this,n-iQ((uVn(),ZBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():ZBt,n),t)},uZn.ii=function(){return uVn(),ZBt},uZn.ki=function(n){switch(n){case 0:return!this.c&&(this.c=new wsn(this,0)),void Czn(this.c);case 1:return void(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uVn(),FBt)),160)).$b();case 2:return!this.b&&(this.b=new wsn(this,2)),void Czn(this.b);case 3:return!this.c&&(this.c=new wsn(this,0)),void BXn(this.c,(uVn(),nHt),null);case 4:return void m4(this,d_(this.a,null));case 5:return void(this.a=null)}sdn(this,n-iQ((uVn(),ZBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():ZBt,n))},zW(kct,"SimpleAnyTypeImpl",682),sDn(683,516,{110:1,94:1,93:1,58:1,54:1,99:1,2121:1,683:1},cy),uZn.Lh=function(n,t,e){switch(n){case 0:return e?(!this.a&&(this.a=new wsn(this,0)),this.a):(!this.a&&(this.a=new wsn(this,0)),this.a.b);case 1:return e?(!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),this.b):(!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),Tnn(this.b));case 2:return e?(!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),this.c):(!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),Tnn(this.c));case 3:return!this.a&&(this.a=new wsn(this,0)),T2(this.a,(uVn(),iHt));case 4:return!this.a&&(this.a=new wsn(this,0)),T2(this.a,(uVn(),rHt));case 5:return!this.a&&(this.a=new wsn(this,0)),T2(this.a,(uVn(),aHt));case 6:return!this.a&&(this.a=new wsn(this,0)),T2(this.a,(uVn(),oHt))}return $tn(this,n-iQ((uVn(),eHt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():eHt,n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.a&&(this.a=new wsn(this,0)),$Hn(this.a,n,e);case 1:return!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),G_(this.b,n,e);case 2:return!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),G_(this.c,n,e);case 5:return!this.a&&(this.a=new wsn(this,0)),rF(T2(this.a,(uVn(),aHt)),n,e)}return uG(ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():(uVn(),eHt),t),69).wk().Ak(this,Wen(this),t-iQ((uVn(),eHt)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.a&&0!=this.a.i;case 1:return!!this.b&&0!=this.b.f;case 2:return!!this.c&&0!=this.c.f;case 3:return!this.a&&(this.a=new wsn(this,0)),!$A(T2(this.a,(uVn(),iHt)));case 4:return!this.a&&(this.a=new wsn(this,0)),!$A(T2(this.a,(uVn(),rHt)));case 5:return!this.a&&(this.a=new wsn(this,0)),!$A(T2(this.a,(uVn(),aHt)));case 6:return!this.a&&(this.a=new wsn(this,0)),!$A(T2(this.a,(uVn(),oHt)))}return l5(this,n-iQ((uVn(),eHt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():eHt,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.a&&(this.a=new wsn(this,0)),void cW(this.a,t);case 1:return!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),void Jun(this.b,t);case 2:return!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),void Jun(this.c,t);case 3:return!this.a&&(this.a=new wsn(this,0)),Zv(T2(this.a,(uVn(),iHt))),!this.a&&(this.a=new wsn(this,0)),void K$(T2(this.a,iHt),uG(t,16));case 4:return!this.a&&(this.a=new wsn(this,0)),Zv(T2(this.a,(uVn(),rHt))),!this.a&&(this.a=new wsn(this,0)),void K$(T2(this.a,rHt),uG(t,16));case 5:return!this.a&&(this.a=new wsn(this,0)),Zv(T2(this.a,(uVn(),aHt))),!this.a&&(this.a=new wsn(this,0)),void K$(T2(this.a,aHt),uG(t,16));case 6:return!this.a&&(this.a=new wsn(this,0)),Zv(T2(this.a,(uVn(),oHt))),!this.a&&(this.a=new wsn(this,0)),void K$(T2(this.a,oHt),uG(t,16))}lpn(this,n-iQ((uVn(),eHt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():eHt,n),t)},uZn.ii=function(){return uVn(),eHt},uZn.ki=function(n){switch(n){case 0:return!this.a&&(this.a=new wsn(this,0)),void Czn(this.a);case 1:return!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),void this.b.c.$b();case 2:return!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),void this.c.c.$b();case 3:return!this.a&&(this.a=new wsn(this,0)),void Zv(T2(this.a,(uVn(),iHt)));case 4:return!this.a&&(this.a=new wsn(this,0)),void Zv(T2(this.a,(uVn(),rHt)));case 5:return!this.a&&(this.a=new wsn(this,0)),void Zv(T2(this.a,(uVn(),aHt)));case 6:return!this.a&&(this.a=new wsn(this,0)),void Zv(T2(this.a,(uVn(),oHt)))}sdn(this,n-iQ((uVn(),eHt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():eHt,n))},uZn.Ib=function(){var n;return 4&this.j?vxn(this):((n=new fx(vxn(this))).a+=" (mixed: ",zA(n,this.a),n.a+=")",n.a)},zW(kct,"XMLTypeDocumentRootImpl",683),sDn(2028,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1,2122:1},Nh),uZn.ri=function(n,t){switch(n.hk()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return null==t?null:cpn(t);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return mK(t);case 6:return lK(uG(t,195));case 12:case 47:case 49:case 11:return cWn(this,n,t);case 13:return null==t?null:VXn(uG(t,247));case 15:case 14:return null==t?null:MW(uM(pK(t)));case 17:return oPn((uVn(),t));case 18:return oPn(t);case 21:case 20:return null==t?null:TW(uG(t,161).a);case 27:return bK(uG(t,195));case 30:return STn((uVn(),uG(t,15)));case 31:return STn(uG(t,15));case 40:return dK((uVn(),t));case 42:return uPn((uVn(),t));case 43:return uPn(t);case 59:case 48:return wK((uVn(),t));default:throw hv(new vM(tet+n.xe()+eet))}},uZn.si=function(n){var t;switch(-1==n.G&&(n.G=(t=Hrn(n))?Hyn(t.vi(),n):-1),n.G){case 0:return new iy;case 1:return new Uh;case 2:return new ry;case 3:return new cy;default:throw hv(new vM(cet+n.zb+eet))}},uZn.ti=function(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p;switch(n.hk()){case 5:case 52:case 4:return t;case 6:return syn(t);case 8:case 7:return null==t?null:MPn(t);case 9:return null==t?null:Ben(vUn((i=yXn(t,!0)).length>0&&(s3(0,i.length),43==i.charCodeAt(0))?(s3(1,i.length+1),i.substr(1)):i,-128,127)<<24>>24);case 10:return null==t?null:Ben(vUn((r=yXn(t,!0)).length>0&&(s3(0,r.length),43==r.charCodeAt(0))?(s3(1,r.length+1),r.substr(1)):r,-128,127)<<24>>24);case 11:return mK(cYn(this,(uVn(),HBt),t));case 12:return mK(cYn(this,(uVn(),UBt),t));case 13:return null==t?null:new Wj(yXn(t,!0));case 15:case 14:return iRn(t);case 16:return mK(cYn(this,(uVn(),GBt),t));case 17:return bvn((uVn(),t));case 18:return bvn(t);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return yXn(t,!0);case 21:case 20:return vRn(t);case 22:return mK(cYn(this,(uVn(),qBt),t));case 23:return mK(cYn(this,(uVn(),XBt),t));case 24:return mK(cYn(this,(uVn(),zBt),t));case 25:return mK(cYn(this,(uVn(),VBt),t));case 26:return mK(cYn(this,(uVn(),WBt),t));case 27:return Ckn(t);case 30:return wvn((uVn(),t));case 31:return wvn(t);case 32:return null==t?null:xwn(vUn((h=yXn(t,!0)).length>0&&(s3(0,h.length),43==h.charCodeAt(0))?(s3(1,h.length+1),h.substr(1)):h,j1n,vZn));case 33:return null==t?null:new PN((f=yXn(t,!0)).length>0&&(s3(0,f.length),43==f.charCodeAt(0))?(s3(1,f.length+1),f.substr(1)):f);case 34:return null==t?null:xwn(vUn((l=yXn(t,!0)).length>0&&(s3(0,l.length),43==l.charCodeAt(0))?(s3(1,l.length+1),l.substr(1)):l,j1n,vZn));case 36:return null==t?null:Hvn(tJn((b=yXn(t,!0)).length>0&&(s3(0,b.length),43==b.charCodeAt(0))?(s3(1,b.length+1),b.substr(1)):b));case 37:return null==t?null:Hvn(tJn((w=yXn(t,!0)).length>0&&(s3(0,w.length),43==w.charCodeAt(0))?(s3(1,w.length+1),w.substr(1)):w));case 40:return nTn((uVn(),t));case 42:return dvn((uVn(),t));case 43:return dvn(t);case 44:return null==t?null:new PN((d=yXn(t,!0)).length>0&&(s3(0,d.length),43==d.charCodeAt(0))?(s3(1,d.length+1),d.substr(1)):d);case 45:return null==t?null:new PN((g=yXn(t,!0)).length>0&&(s3(0,g.length),43==g.charCodeAt(0))?(s3(1,g.length+1),g.substr(1)):g);case 46:return yXn(t,!1);case 47:return mK(cYn(this,(uVn(),QBt),t));case 59:case 48:return ZMn((uVn(),t));case 49:return mK(cYn(this,(uVn(),YBt),t));case 50:return null==t?null:Rwn(vUn((p=yXn(t,!0)).length>0&&(s3(0,p.length),43==p.charCodeAt(0))?(s3(1,p.length+1),p.substr(1)):p,xrt,32767)<<16>>16);case 51:return null==t?null:Rwn(vUn((c=yXn(t,!0)).length>0&&(s3(0,c.length),43==c.charCodeAt(0))?(s3(1,c.length+1),c.substr(1)):c,xrt,32767)<<16>>16);case 53:return mK(cYn(this,(uVn(),tHt),t));case 55:return null==t?null:Rwn(vUn((a=yXn(t,!0)).length>0&&(s3(0,a.length),43==a.charCodeAt(0))?(s3(1,a.length+1),a.substr(1)):a,xrt,32767)<<16>>16);case 56:return null==t?null:Rwn(vUn((o=yXn(t,!0)).length>0&&(s3(0,o.length),43==o.charCodeAt(0))?(s3(1,o.length+1),o.substr(1)):o,xrt,32767)<<16>>16);case 57:return null==t?null:Hvn(tJn((u=yXn(t,!0)).length>0&&(s3(0,u.length),43==u.charCodeAt(0))?(s3(1,u.length+1),u.substr(1)):u));case 58:return null==t?null:Hvn(tJn((s=yXn(t,!0)).length>0&&(s3(0,s.length),43==s.charCodeAt(0))?(s3(1,s.length+1),s.substr(1)):s));case 60:return null==t?null:xwn(vUn((e=yXn(t,!0)).length>0&&(s3(0,e.length),43==e.charCodeAt(0))?(s3(1,e.length+1),e.substr(1)):e,j1n,vZn));case 61:return null==t?null:xwn(vUn(yXn(t,!0),j1n,vZn));default:throw hv(new vM(tet+n.xe()+eet))}},zW(kct,"XMLTypeFactoryImpl",2028),sDn(594,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1,2044:1,594:1},gJ),uZn.N=!1,uZn.O=!1;var dHt,gHt,pHt,mHt,vHt,kHt=!1;zW(kct,"XMLTypePackageImpl",594),sDn(1961,1,{851:1},$h),uZn.Kk=function(){return vGn(),qHt},zW(kct,"XMLTypePackageImpl/1",1961),sDn(1970,1,Wrt,Dh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/10",1970),sDn(1971,1,Wrt,xh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/11",1971),sDn(1972,1,Wrt,Rh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/12",1972),sDn(1973,1,Wrt,Kh),uZn.fk=function(n){return FA(n)},uZn.gk=function(n){return Inn(fot,zZn,345,n,7,1)},zW(kct,"XMLTypePackageImpl/13",1973),sDn(1974,1,Wrt,Fh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/14",1974),sDn(1975,1,Wrt,_h),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},zW(kct,"XMLTypePackageImpl/15",1975),sDn(1976,1,Wrt,Bh),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},zW(kct,"XMLTypePackageImpl/16",1976),sDn(1977,1,Wrt,Hh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/17",1977),sDn(1978,1,Wrt,Gh),uZn.fk=function(n){return F$(n,161)},uZn.gk=function(n){return Inn(lot,zZn,161,n,0,1)},zW(kct,"XMLTypePackageImpl/18",1978),sDn(1979,1,Wrt,qh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/19",1979),sDn(1962,1,Wrt,Xh),uZn.fk=function(n){return F$(n,857)},uZn.gk=function(n){return Inn(DBt,EZn,857,n,0,1)},zW(kct,"XMLTypePackageImpl/2",1962),sDn(1980,1,Wrt,zh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/20",1980),sDn(1981,1,Wrt,Vh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/21",1981),sDn(1982,1,Wrt,Wh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/22",1982),sDn(1983,1,Wrt,Qh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/23",1983),sDn(1984,1,Wrt,Jh),uZn.fk=function(n){return F$(n,195)},uZn.gk=function(n){return Inn(tUt,zZn,195,n,0,2)},zW(kct,"XMLTypePackageImpl/24",1984),sDn(1985,1,Wrt,Yh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/25",1985),sDn(1986,1,Wrt,Zh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/26",1986),sDn(1987,1,Wrt,nf),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},zW(kct,"XMLTypePackageImpl/27",1987),sDn(1988,1,Wrt,tf),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},zW(kct,"XMLTypePackageImpl/28",1988),sDn(1989,1,Wrt,ef),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/29",1989),sDn(1963,1,Wrt,rf),uZn.fk=function(n){return F$(n,681)},uZn.gk=function(n){return Inn(lHt,EZn,2119,n,0,1)},zW(kct,"XMLTypePackageImpl/3",1963),sDn(1990,1,Wrt,cf),uZn.fk=function(n){return F$(n,17)},uZn.gk=function(n){return Inn(dot,zZn,17,n,0,1)},zW(kct,"XMLTypePackageImpl/30",1990),sDn(1991,1,Wrt,af),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/31",1991),sDn(1992,1,Wrt,of),uZn.fk=function(n){return F$(n,168)},uZn.gk=function(n){return Inn(yot,zZn,168,n,0,1)},zW(kct,"XMLTypePackageImpl/32",1992),sDn(1993,1,Wrt,uf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/33",1993),sDn(1994,1,Wrt,sf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/34",1994),sDn(1995,1,Wrt,hf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/35",1995),sDn(1996,1,Wrt,ff),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/36",1996),sDn(1997,1,Wrt,lf),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},zW(kct,"XMLTypePackageImpl/37",1997),sDn(1998,1,Wrt,bf),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},zW(kct,"XMLTypePackageImpl/38",1998),sDn(1999,1,Wrt,wf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/39",1999),sDn(1964,1,Wrt,df),uZn.fk=function(n){return F$(n,682)},uZn.gk=function(n){return Inn(bHt,EZn,2120,n,0,1)},zW(kct,"XMLTypePackageImpl/4",1964),sDn(2e3,1,Wrt,gf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/40",2e3),sDn(2001,1,Wrt,pf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/41",2001),sDn(2002,1,Wrt,mf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/42",2002),sDn(2003,1,Wrt,vf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/43",2003),sDn(2004,1,Wrt,kf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/44",2004),sDn(2005,1,Wrt,yf),uZn.fk=function(n){return F$(n,191)},uZn.gk=function(n){return Inn(Tot,zZn,191,n,0,1)},zW(kct,"XMLTypePackageImpl/45",2005),sDn(2006,1,Wrt,Mf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/46",2006),sDn(2007,1,Wrt,Tf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/47",2007),sDn(2008,1,Wrt,jf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/48",2008),sDn(2009,1,Wrt,Ef),uZn.fk=function(n){return F$(n,191)},uZn.gk=function(n){return Inn(Tot,zZn,191,n,0,1)},zW(kct,"XMLTypePackageImpl/49",2009),sDn(1965,1,Wrt,Sf),uZn.fk=function(n){return F$(n,683)},uZn.gk=function(n){return Inn(wHt,EZn,2121,n,0,1)},zW(kct,"XMLTypePackageImpl/5",1965),sDn(2010,1,Wrt,Pf),uZn.fk=function(n){return F$(n,168)},uZn.gk=function(n){return Inn(yot,zZn,168,n,0,1)},zW(kct,"XMLTypePackageImpl/50",2010),sDn(2011,1,Wrt,Cf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/51",2011),sDn(2012,1,Wrt,If),uZn.fk=function(n){return F$(n,17)},uZn.gk=function(n){return Inn(dot,zZn,17,n,0,1)},zW(kct,"XMLTypePackageImpl/52",2012),sDn(1966,1,Wrt,Of),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,zZn,2,n,6,1)},zW(kct,"XMLTypePackageImpl/6",1966),sDn(1967,1,Wrt,Af),uZn.fk=function(n){return F$(n,195)},uZn.gk=function(n){return Inn(tUt,zZn,195,n,0,2)},zW(kct,"XMLTypePackageImpl/7",1967),sDn(1968,1,Wrt,Lf),uZn.fk=function(n){return KA(n)},uZn.gk=function(n){return Inn(cot,zZn,485,n,8,1)},zW(kct,"XMLTypePackageImpl/8",1968),sDn(1969,1,Wrt,Nf),uZn.fk=function(n){return F$(n,222)},uZn.gk=function(n){return Inn(uot,zZn,222,n,0,1)},zW(kct,"XMLTypePackageImpl/9",1969),sDn(55,63,S1n,CM),zW(Xct,"RegEx/ParseException",55),sDn(836,1,{},$f),uZn.bm=function(n){return n<this.j&&63==VJ(this.i,n)},uZn.cm=function(){var n,t,e,i,r;if(10!=this.c)throw hv(new CM(rZn((t$(),eit))));switch(n=this.a){case 101:n=27;break;case 102:n=12;break;case 110:n=10;break;case 114:n=13;break;case 116:n=9;break;case 120:if(EYn(this),0!=this.c)throw hv(new CM(rZn((t$(),Pit))));if(123==this.a){for(r=0,e=0;;){if(EYn(this),0!=this.c)throw hv(new CM(rZn((t$(),Pit))));if((r=CMn(this.a))<0)break;if(e>16*e)throw hv(new CM(rZn((t$(),Cit))));e=16*e+r}if(125!=this.a)throw hv(new CM(rZn((t$(),Iit))));if(e>zct)throw hv(new CM(rZn((t$(),Oit))));n=e}else{if(r=0,0!=this.c||(r=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(e=r,EYn(this),0!=this.c||(r=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));n=e=16*e+r}break;case 117:if(i=0,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));n=t=16*t+i;break;case 118:if(EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if((t=16*t+i)>zct)throw hv(new CM(rZn((t$(),"parser.descappe.4"))));n=t;break;case 65:case 90:case 122:throw hv(new CM(rZn((t$(),Ait))))}return n},uZn.dm=function(n){var t;switch(n){case 100:t=32&~this.e?(QYn(),CHt):kJn("Nd",!0);break;case 68:t=32&~this.e?(QYn(),NHt):kJn("Nd",!1);break;case 119:t=32&~this.e?(QYn(),HHt):kJn("IsWord",!0);break;case 87:t=32&~this.e?(QYn(),DHt):kJn("IsWord",!1);break;case 115:t=32&~this.e?(QYn(),RHt):kJn("IsSpace",!0);break;case 83:t=32&~this.e?(QYn(),$Ht):kJn("IsSpace",!1);break;default:throw hv(new Ky(Vct+n.toString(16)))}return t},uZn.em=function(n){var t,e,i,r,c,a,o,u,s,h,f;for(this.b=1,EYn(this),t=null,0==this.c&&94==this.a?(EYn(this),n?(QYn(),QYn(),s=new K3(5)):(QYn(),QYn(),HFn(t=new K3(4),0,zct),s=new K3(4))):(QYn(),QYn(),s=new K3(4)),r=!0;1!=(f=this.c)&&(0!=f||93!=this.a||r);){if(r=!1,e=this.a,i=!1,10==f)switch(e){case 100:case 68:case 119:case 87:case 115:case 83:TXn(s,this.dm(e)),i=!0;break;case 105:case 73:case 99:case 67:(e=this.um(s,e))<0&&(i=!0);break;case 112:case 80:if(!(h=PNn(this,e)))throw hv(new CM(rZn((t$(),git))));TXn(s,h),i=!0;break;default:e=this.cm()}else if(20==f){if((c=aR(this.i,58,this.d))<0)throw hv(new CM(rZn((t$(),pit))));if(a=!0,94==VJ(this.i,this.d)&&(++this.d,a=!1),!(o=itn(r1(this.i,this.d,c),a,!(512&~this.e))))throw hv(new CM(rZn((t$(),vit))));if(TXn(s,o),i=!0,c+1>=this.j||93!=VJ(this.i,c+1))throw hv(new CM(rZn((t$(),pit))));this.d=c+2}if(EYn(this),!i)if(0!=this.c||45!=this.a)HFn(s,e,e);else{if(EYn(this),1==(f=this.c))throw hv(new CM(rZn((t$(),mit))));0==f&&93==this.a?(HFn(s,e,e),HFn(s,45,45)):(u=this.a,10==f&&(u=this.cm()),EYn(this),HFn(s,e,u))}(this.e&w1n)==w1n&&0==this.c&&44==this.a&&EYn(this)}if(1==this.c)throw hv(new CM(rZn((t$(),mit))));return t&&(lWn(t,s),s=t),pxn(s),szn(s),this.b=0,EYn(this),s},uZn.fm=function(){var n,t,e,i;for(e=this.em(!1);7!=(i=this.c);){if(n=this.a,(0!=i||45!=n&&38!=n)&&4!=i)throw hv(new CM(rZn((t$(),Eit))));if(EYn(this),9!=this.c)throw hv(new CM(rZn((t$(),jit))));if(t=this.em(!1),4==i)TXn(e,t);else if(45==n)lWn(e,t);else{if(38!=n)throw hv(new Ky("ASSERT"));GVn(e,t)}}return EYn(this),e},uZn.gm=function(){var n,t;return n=this.a-48,QYn(),QYn(),t=new F1(12,null,n),!this.g&&(this.g=new ck),zv(this.g,new Wm(n)),EYn(this),t},uZn.hm=function(){return EYn(this),QYn(),KHt},uZn.im=function(){return EYn(this),QYn(),xHt},uZn.jm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.km=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.lm=function(){return EYn(this),jln()},uZn.mm=function(){return EYn(this),QYn(),_Ht},uZn.nm=function(){return EYn(this),QYn(),UHt},uZn.om=function(){var n;if(this.d>=this.j||64!=(65504&(n=VJ(this.i,this.d++))))throw hv(new CM(rZn((t$(),lit))));return EYn(this),QYn(),QYn(),new IX(0,n-64)},uZn.pm=function(){return EYn(this),VGn()},uZn.qm=function(){return EYn(this),QYn(),GHt},uZn.rm=function(){var n;return QYn(),QYn(),n=new IX(0,105),EYn(this),n},uZn.sm=function(){return EYn(this),QYn(),BHt},uZn.tm=function(){return EYn(this),QYn(),FHt},uZn.um=function(n,t){return this.cm()},uZn.vm=function(){return EYn(this),QYn(),AHt},uZn.wm=function(){var n,t,e,i,r;if(this.d+1>=this.j)throw hv(new CM(rZn((t$(),sit))));if(i=-1,t=null,49<=(n=VJ(this.i,this.d))&&n<=57){if(i=n-48,!this.g&&(this.g=new ck),zv(this.g,new Wm(i)),++this.d,41!=VJ(this.i,this.d))throw hv(new CM(rZn((t$(),ait))));++this.d}else switch(63==n&&--this.d,EYn(this),(t=eYn(this)).e){case 20:case 21:case 22:case 23:break;case 8:if(7!=this.c)throw hv(new CM(rZn((t$(),ait))));break;default:throw hv(new CM(rZn((t$(),hit))))}if(EYn(this),e=null,2==(r=Evn(this)).e){if(2!=r.Pm())throw hv(new CM(rZn((t$(),fit))));e=r.Lm(1),r=r.Lm(0)}if(7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),QYn(),QYn(),new bin(i,t,r,e)},uZn.xm=function(){return EYn(this),QYn(),LHt},uZn.ym=function(){var n;if(EYn(this),n=jV(24,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.zm=function(){var n;if(EYn(this),n=jV(20,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Am=function(){var n;if(EYn(this),n=jV(22,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Bm=function(){var n,t,e,i,r;for(n=0,e=0,t=-1;this.d<this.j&&0!=(r=U$n(t=VJ(this.i,this.d)));)n|=r,++this.d;if(this.d>=this.j)throw hv(new CM(rZn((t$(),oit))));if(45==t){for(++this.d;this.d<this.j&&0!=(r=U$n(t=VJ(this.i,this.d)));)e|=r,++this.d;if(this.d>=this.j)throw hv(new CM(rZn((t$(),oit))))}if(58==t){if(++this.d,EYn(this),i=GW(Evn(this),n,e),7!=this.c)throw hv(new CM(rZn((t$(),ait))));EYn(this)}else{if(41!=t)throw hv(new CM(rZn((t$(),uit))));++this.d,EYn(this),i=GW(Evn(this),n,e)}return i},uZn.Cm=function(){var n;if(EYn(this),n=jV(21,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Dm=function(){var n;if(EYn(this),n=jV(23,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Em=function(){var n,t;if(EYn(this),n=this.f++,t=EV(Evn(this),n),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),t},uZn.Fm=function(){var n;if(EYn(this),n=EV(Evn(this),0),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Gm=function(n){return EYn(this),5==this.c?(EYn(this),CX(n,(QYn(),QYn(),new n8(9,n)))):CX(n,(QYn(),QYn(),new n8(3,n)))},uZn.Hm=function(n){var t;return EYn(this),QYn(),QYn(),t=new QN(2),5==this.c?(EYn(this),kzn(t,OHt),kzn(t,n)):(kzn(t,n),kzn(t,OHt)),t},uZn.Im=function(n){return EYn(this),5==this.c?(EYn(this),QYn(),QYn(),new n8(9,n)):(QYn(),QYn(),new n8(3,n))},uZn.a=0,uZn.b=0,uZn.c=0,uZn.d=0,uZn.e=0,uZn.f=1,uZn.g=null,uZn.j=0,zW(Xct,"RegEx/RegexParser",836),sDn(1947,836,{},ay),uZn.bm=function(n){return!1},uZn.cm=function(){return R_n(this)},uZn.dm=function(n){return MUn(n)},uZn.em=function(n){return PYn(this)},uZn.fm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.gm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.hm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.im=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.jm=function(){return EYn(this),MUn(67)},uZn.km=function(){return EYn(this),MUn(73)},uZn.lm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.mm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.nm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.om=function(){return EYn(this),MUn(99)},uZn.pm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.qm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.rm=function(){return EYn(this),MUn(105)},uZn.sm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.tm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.um=function(n,t){return TXn(n,MUn(t)),-1},uZn.vm=function(){return EYn(this),QYn(),QYn(),new IX(0,94)},uZn.wm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.xm=function(){return EYn(this),QYn(),QYn(),new IX(0,36)},uZn.ym=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.zm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Am=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Bm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Cm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Dm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Em=function(){var n;if(EYn(this),n=EV(Evn(this),0),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Fm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Gm=function(n){return EYn(this),CX(n,(QYn(),QYn(),new n8(3,n)))},uZn.Hm=function(n){var t;return EYn(this),QYn(),QYn(),kzn(t=new QN(2),n),kzn(t,OHt),t},uZn.Im=function(n){return EYn(this),QYn(),QYn(),new n8(3,n)};var yHt=null,MHt=null;zW(Xct,"RegEx/ParserForXMLSchema",1947),sDn(122,1,aat,Qm),uZn.Jm=function(n){throw hv(new Ky("Not supported."))},uZn.Km=function(){return-1},uZn.Lm=function(n){return null},uZn.Mm=function(){return null},uZn.Nm=function(n){},uZn.Om=function(n){},uZn.Pm=function(){return 0},uZn.Ib=function(){return this.Qm(0)},uZn.Qm=function(n){return 11==this.e?".":""},uZn.e=0;var THt,jHt,EHt,SHt,PHt,CHt,IHt,OHt,AHt,LHt,NHt,$Ht,DHt,xHt,RHt,KHt,FHt,_Ht,BHt,HHt,UHt,GHt,qHt,XHt,zHt=null,VHt=null,WHt=null,QHt=zW(Xct,"RegEx/Token",122);sDn(138,122,{3:1,138:1,122:1},K3),uZn.Qm=function(n){var t,e,i;if(4==this.e)if(this==IHt)e=".";else if(this==CHt)e="\\d";else if(this==HHt)e="\\w";else if(this==RHt)e="\\s";else{for((i=new zM).a+="[",t=0;t<this.b.length;t+=2)n&w1n&&t>0&&(i.a+=","),this.b[t]===this.b[t+1]?VA(i,Mqn(this.b[t])):(VA(i,Mqn(this.b[t])),i.a+="-",VA(i,Mqn(this.b[t+1])));i.a+="]",e=i.a}else if(this==NHt)e="\\D";else if(this==DHt)e="\\W";else if(this==$Ht)e="\\S";else{for((i=new zM).a+="[^",t=0;t<this.b.length;t+=2)n&w1n&&t>0&&(i.a+=","),this.b[t]===this.b[t+1]?VA(i,Mqn(this.b[t])):(VA(i,Mqn(this.b[t])),i.a+="-",VA(i,Mqn(this.b[t+1])));i.a+="]",e=i.a}return e},uZn.a=!1,uZn.c=!1,zW(Xct,"RegEx/RangeToken",138),sDn(592,1,{592:1},Wm),uZn.a=0,zW(Xct,"RegEx/RegexParser/ReferencePosition",592),sDn(591,1,{3:1,591:1},gE),uZn.Fb=function(n){var t;return null!=n&&!!F$(n,591)&&(t=uG(n,591),m_(this.b,t.b)&&this.a==t.a)},uZn.Hb=function(){return pln(this.b+"/"+XKn(this.a))},uZn.Ib=function(){return this.c.Qm(this.a)},uZn.a=0,zW(Xct,"RegEx/RegularExpression",591),sDn(228,122,aat,IX),uZn.Km=function(){return this.a},uZn.Qm=function(n){var t,e;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:e="\\"+jF(this.a&D1n);break;case 12:e="\\f";break;case 10:e="\\n";break;case 13:e="\\r";break;case 9:e="\\t";break;case 27:e="\\e";break;default:e=this.a>=P0n?"\\v"+r1(t="0"+(this.a>>>0).toString(16),t.length-6,t.length):""+jF(this.a&D1n)}break;case 8:e=this==AHt||this==LHt?""+jF(this.a&D1n):"\\"+jF(this.a&D1n);break;default:e=null}return e},uZn.a=0,zW(Xct,"RegEx/Token/CharToken",228),sDn(318,122,aat,n8),uZn.Lm=function(n){return this.a},uZn.Nm=function(n){this.b=n},uZn.Om=function(n){this.c=n},uZn.Pm=function(){return 1},uZn.Qm=function(n){var t;if(3==this.e)if(this.c<0&&this.b<0)t=this.a.Qm(n)+"*";else if(this.c==this.b)t=this.a.Qm(n)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)t=this.a.Qm(n)+"{"+this.c+","+this.b+"}";else{if(!(this.c>=0&&this.b<0))throw hv(new Ky("Token#toString(): CLOSURE "+this.c+TZn+this.b));t=this.a.Qm(n)+"{"+this.c+",}"}else if(this.c<0&&this.b<0)t=this.a.Qm(n)+"*?";else if(this.c==this.b)t=this.a.Qm(n)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)t=this.a.Qm(n)+"{"+this.c+","+this.b+"}?";else{if(!(this.c>=0&&this.b<0))throw hv(new Ky("Token#toString(): NONGREEDYCLOSURE "+this.c+TZn+this.b));t=this.a.Qm(n)+"{"+this.c+",}?"}return t},uZn.b=0,uZn.c=0,zW(Xct,"RegEx/Token/ClosureToken",318),sDn(837,122,aat,eW),uZn.Lm=function(n){return 0==n?this.a:this.b},uZn.Pm=function(){return 2},uZn.Qm=function(n){return 3==this.b.e&&this.b.Lm(0)==this.a?this.a.Qm(n)+"+":9==this.b.e&&this.b.Lm(0)==this.a?this.a.Qm(n)+"+?":this.a.Qm(n)+""+this.b.Qm(n)},zW(Xct,"RegEx/Token/ConcatToken",837),sDn(1945,122,aat,bin),uZn.Lm=function(n){if(0==n)return this.d;if(1==n)return this.b;throw hv(new Ky("Internal Error: "+n))},uZn.Pm=function(){return this.b?2:1},uZn.Qm=function(n){var t;return t=this.c>0?"(?("+this.c+")":8==this.a.e?"(?("+this.a+")":"(?"+this.a,this.b?t+=this.d+"|"+this.b+")":t+=this.d+")",t},uZn.c=0,zW(Xct,"RegEx/Token/ConditionToken",1945),sDn(1946,122,aat,R3),uZn.Lm=function(n){return this.b},uZn.Pm=function(){return 1},uZn.Qm=function(n){return"(?"+(0==this.a?"":XKn(this.a))+(0==this.c?"":XKn(this.c))+":"+this.b.Qm(n)+")"},uZn.a=0,uZn.c=0,zW(Xct,"RegEx/Token/ModifierToken",1946),sDn(838,122,aat,PQ),uZn.Lm=function(n){return this.a},uZn.Pm=function(){return 1},uZn.Qm=function(n){var t;switch(t=null,this.e){case 6:t=0==this.b?"(?:"+this.a.Qm(n)+")":"("+this.a.Qm(n)+")";break;case 20:t="(?="+this.a.Qm(n)+")";break;case 21:t="(?!"+this.a.Qm(n)+")";break;case 22:t="(?<="+this.a.Qm(n)+")";break;case 23:t="(?<!"+this.a.Qm(n)+")";break;case 24:t="(?>"+this.a.Qm(n)+")"}return t},uZn.b=0,zW(Xct,"RegEx/Token/ParenToken",838),sDn(530,122,{3:1,122:1,530:1},F1),uZn.Mm=function(){return this.b},uZn.Qm=function(n){return 12==this.e?"\\"+this.a:Nxn(this.b)},uZn.a=0,zW(Xct,"RegEx/Token/StringToken",530),sDn(477,122,aat,QN),uZn.Jm=function(n){kzn(this,n)},uZn.Lm=function(n){return uG(DQ(this.a,n),122)},uZn.Pm=function(){return this.a?this.a.a.c.length:0},uZn.Qm=function(n){var t,e,i,r,c;if(1==this.e){if(2==this.a.a.c.length)t=uG(DQ(this.a,0),122),r=3==(e=uG(DQ(this.a,1),122)).e&&e.Lm(0)==t?t.Qm(n)+"+":9==e.e&&e.Lm(0)==t?t.Qm(n)+"+?":t.Qm(n)+""+e.Qm(n);else{for(c=new zM,i=0;i<this.a.a.c.length;i++)VA(c,uG(DQ(this.a,i),122).Qm(n));r=c.a}return r}if(2==this.a.a.c.length&&7==uG(DQ(this.a,1),122).e)r=uG(DQ(this.a,0),122).Qm(n)+"?";else if(2==this.a.a.c.length&&7==uG(DQ(this.a,0),122).e)r=uG(DQ(this.a,1),122).Qm(n)+"??";else{for(VA(c=new zM,uG(DQ(this.a,0),122).Qm(n)),i=1;i<this.a.a.c.length;i++)c.a+="|",VA(c,uG(DQ(this.a,i),122).Qm(n));r=c.a}return r},zW(Xct,"RegEx/Token/UnionToken",477),sDn(527,1,{600:1},dE),uZn.Ib=function(){return this.a.b},zW(oat,"XMLTypeUtil/PatternMatcherImpl",527),sDn(1707,1527,{},Df),zW(oat,"XMLTypeValidator",1707),sDn(270,1,t1n,Gz),uZn.Jc=function(n){z8(this,n)},uZn.Kc=function(){return(this.b-this.a)*this.c<0?XHt:new xD(this)},uZn.a=0,uZn.b=0,uZn.c=0,zW(sat,"ExclusiveRange",270),sDn(1084,1,UZn,xf),uZn.Rb=function(n){uG(n,17),i$()},uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return bE()},uZn.Ub=function(){return wE()},uZn.Wb=function(n){uG(n,17),c$()},uZn.Ob=function(){return!1},uZn.Sb=function(){return!1},uZn.Tb=function(){return-1},uZn.Vb=function(){return-1},uZn.Qb=function(){throw hv(new TM(lat))},zW(sat,"ExclusiveRange/1",1084),sDn(258,1,UZn,xD),uZn.Rb=function(n){uG(n,17),r$()},uZn.Nb=function(n){SV(this,n)},uZn.Pb=function(){return awn(this)},uZn.Ub=function(){return ytn(this)},uZn.Wb=function(n){uG(n,17),a$()},uZn.Ob=function(){return this.c.c<0?this.a>=this.c.b:this.a<=this.c.b},uZn.Sb=function(){return this.b>0},uZn.Tb=function(){return this.b},uZn.Vb=function(){return this.b-1},uZn.Qb=function(){throw hv(new TM(lat))},uZn.a=0,uZn.b=0,zW(sat,"ExclusiveRange/RangeIterator",258);var JHt=hJ(brt,"C"),YHt=hJ(grt,"I"),ZHt=hJ(dZn,"Z"),nUt=hJ(prt,"J"),tUt=hJ(lrt,"B"),eUt=hJ(wrt,"D"),iUt=hJ(drt,"F"),rUt=hJ(mrt,"S"),cUt=Iq("org.eclipse.elk.core.labels","ILabelManager"),aUt=Iq(Pet,"DiagnosticChain"),oUt=Iq(Jrt,"ResourceSet"),uUt=zW(Pet,"InvocationTargetException",null),sUt=(XM(),m9),hUt=hUt=zSn;Nan(bv),van("permProps",[[["locale","default"],[bat,"gecko1_8"]],[["locale","default"],[bat,"safari"]]]),hUt(null,"elk",null)}).call(this)}).call(this,void 0!==e.g?e.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(n,t,e){"use strict";function i(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function r(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var a=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var c=Object.assign({},t),a=!1;try{n.resolve("web-worker"),a=!0}catch(s){}if(t.workerUrl)if(a){var o=n("web-worker");c.workerFactory=function(n){return new o(n)}}else console.warn("Web worker requested but 'web-worker' package not installed. \nConsider installing the package or pass your own 'workerFactory' to ELK's constructor.\n... Falling back to non-web worker version.");if(!c.workerFactory){var u=n("./elk-worker.min.js").Worker;c.workerFactory=function(n){return new u(n)}}return r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c))}return c(e,t),e}(n("./elk-api.js").default);Object.defineProperty(t.exports,"__esModule",{value:!0}),t.exports=a,a.default=a},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(n,t,e){t.exports=Worker},{}]},{},[3])(3)},2235:(n,t,e)=>{"use strict";e.d(t,{diagram:()=>y});var i=e(6216),r=e(6312),c=e(8747),a=e(6257),o=e(2954);e(4353),e(6750),e(2838);const u=new o;let s={};const h={};let f={};const l=(n,t,e)=>{const i={TB:{in:{north:"north"},out:{south:"west",west:"east",east:"south"}},LR:{in:{west:"west"},out:{east:"south",south:"north",north:"east"}},RL:{in:{east:"east"},out:{west:"north",north:"south",south:"west"}},BT:{in:{south:"south"},out:{north:"east",east:"west",west:"north"}}};return i.TD=i.TB,i[e][t][n]},b=(n,t,e)=>{if(a.l.info("getNextPort",{node:n,edgeDirection:t,graphDirection:e}),!s[n])switch(e){case"TB":case"TD":s[n]={inPosition:"north",outPosition:"south"};break;case"BT":s[n]={inPosition:"south",outPosition:"north"};break;case"RL":s[n]={inPosition:"east",outPosition:"west"};break;case"LR":s[n]={inPosition:"west",outPosition:"east"}}const i="in"===t?s[n].inPosition:s[n].outPosition;return"in"===t?s[n].inPosition=l(s[n].inPosition,t,e):s[n].outPosition=l(s[n].outPosition,t,e),i},w=function(n,t,e,i){a.l.info("abc78 edges = ",n);const o=i.insert("g").attr("class","edgeLabels");let u,s,l={},w=t.db.getDirection();if(void 0!==n.defaultStyle){const t=(0,a.k)(n.defaultStyle);u=t.style,s=t.labelStyle}return n.forEach((function(t){const i="L-"+t.start+"-"+t.end;void 0===l[i]?(l[i]=0,a.l.info("abc78 new entry",i,l[i])):(l[i]++,a.l.info("abc78 new entry",i,l[i]));let d=i+"-"+l[i];a.l.info("abc78 new link id to be used is",i,d,l[i]);const g="LS-"+t.start,p="LE-"+t.end,m={style:"",labelStyle:""};switch(m.minlen=t.length||1,"arrow_open"===t.type?m.arrowhead="none":m.arrowhead="normal",m.arrowTypeStart="arrow_open",m.arrowTypeEnd="arrow_open",t.type){case"double_arrow_cross":m.arrowTypeStart="arrow_cross";case"arrow_cross":m.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":m.arrowTypeStart="arrow_point";case"arrow_point":m.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":m.arrowTypeStart="arrow_circle";case"arrow_circle":m.arrowTypeEnd="arrow_circle"}let v="",k="";switch(t.stroke){case"normal":v="fill:none;",void 0!==u&&(v=u),void 0!==s&&(k=s),m.thickness="normal",m.pattern="solid";break;case"dotted":m.thickness="normal",m.pattern="dotted",m.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":m.thickness="thick",m.pattern="solid",m.style="stroke-width: 3.5px;fill:none;"}if(void 0!==t.style){const n=(0,a.k)(t.style);v=n.style,k=n.labelStyle}m.style=m.style+=v,m.labelStyle=m.labelStyle+=k,void 0!==t.interpolate?m.curve=(0,a.n)(t.interpolate,r.lUB):void 0!==n.defaultInterpolate?m.curve=(0,a.n)(n.defaultInterpolate,r.lUB):m.curve=(0,a.n)(h.curve,r.lUB),void 0===t.text?void 0!==t.style&&(m.arrowheadStyle="fill: #333"):(m.arrowheadStyle="fill: #333",m.labelpos="c"),m.labelType=t.labelType,m.label=t.text.replace(a.e.lineBreakRegex,"\n"),void 0===t.style&&(m.style=m.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),m.labelStyle=m.labelStyle.replace("color:","fill:"),m.id=d,m.classes="flowchart-link "+g+" "+p;const y=(0,c.f)(o,m),{source:M,target:T,sourceId:j,targetId:E}=((n,t)=>{let e=n.start,i=n.end;const r=e,c=i,a=f[e],o=f[i];return a&&o?("diamond"===a.type&&(e=`${e}-${b(e,"out",t)}`),"diamond"===o.type&&(i=`${i}-${b(i,"in",t)}`),{source:e,target:i,sourceId:r,targetId:c}):{source:e,target:i}})(t,w);a.l.debug("abc78 source and target",M,T),e.edges.push({id:"e"+t.start+t.end,sources:[M],targets:[T],sourceId:j,targetId:E,labelEl:y,labels:[{width:m.width,height:m.height,orgWidth:m.width,orgHeight:m.height,text:m.label,layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}}],edgeData:m})})),e},d=function(n,t,e){const i=((n,t,e)=>{const{parentById:i}=e,r=new Set;let c=n;for(;c;){if(r.add(c),c===t)return c;c=i[c]}for(c=t;c;){if(r.has(c))return c;c=i[c]}return"root"})(n,t,e);if(void 0===i||"root"===i)return{x:0,y:0};const r=f[i].offset;return{x:r.posX,y:r.posY}},g=function(n,t,e,i,a,o){const u=d(t.sourceId,t.targetId,a),s=t.sections[0].startPoint,h=t.sections[0].endPoint,f=(t.sections[0].bendPoints?t.sections[0].bendPoints:[]).map((n=>[n.x+u.x,n.y+u.y])),l=[[s.x+u.x,s.y+u.y],...f,[h.x+u.x,h.y+u.y]],{x:b,y:w}=(0,c.k)(t.edgeData),g=(0,r.n8j)().x(b).y(w).curve(r.lUB),p=n.insert("path").attr("d",g(l)).attr("class","path "+e.classes).attr("fill","none"),m=n.insert("g").attr("class","edgeLabel"),v=(0,r.Ltv)(m.node().appendChild(t.labelEl)),k=v.node().firstChild.getBoundingClientRect();v.attr("width",k.width),v.attr("height",k.height),m.attr("transform",`translate(${t.labels[0].x+u.x}, ${t.labels[0].y+u.y})`),function(n,t,e,i,r){let a="";i&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),(0,c.m)(n,t,a,r,e)}(p,e,i.type,i.arrowMarkerAbsolute,o)},p=(n,t)=>{n.forEach((n=>{n.children||(n.children=[]);const e=t.childrenById[n.id];e&&e.forEach((t=>{n.children.push(f[t])})),p(n.children,t)}))},m=(n,t,e,i,r,c,o)=>{e.forEach((function(e){if(e)if(f[e.id].offset={posX:e.x+n,posY:e.y+t,x:n,y:t,depth:o,width:e.width,height:e.height},"group"===e.type){const i=r.insert("g").attr("class","subgraph");i.insert("rect").attr("class","subgraph subgraph-lvl-"+o%5+" node").attr("x",e.x+n).attr("y",e.y+t).attr("width",e.width).attr("height",e.height);const c=i.insert("g").attr("class","label"),u=(0,a.F)().flowchart.htmlLabels?e.labelData.width/2:0;c.attr("transform",`translate(${e.labels[0].x+n+e.x+u}, ${e.labels[0].y+t+e.y+3})`),c.node().appendChild(e.labelData.labelNode),a.l.info("Id (UGH)= ",e.type,e.labels)}else a.l.info("Id (UGH)= ",e.id),e.el.attr("transform",`translate(${e.x+n+e.width/2}, ${e.y+t+e.height/2})`)})),e.forEach((function(e){e&&"group"===e.type&&m(n+e.x,t+e.y,e.children,i,r,c,o+1)}))},v={getClasses:function(n,t){return a.l.info("Extracting classes"),t.db.getClasses()},draw:async function(n,t,e,i){var o;i.db.clear(),f={},s={},i.db.setGen("gen-2"),i.parser.parse(n);const h=(0,r.Ltv)("body").append("div").attr("style","height:400px").attr("id","cy");let l={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","org.eclipse.elk.padding":"[top=100, left=100, bottom=110, right=110]","elk.layered.spacing.edgeNodeBetweenLayers":"30","elk.direction":"DOWN"},children:[],edges:[]};switch(a.l.info("Drawing flowchart using v3 renderer",u),i.db.getDirection()){case"BT":l.layoutOptions["elk.direction"]="UP";break;case"TB":l.layoutOptions["elk.direction"]="DOWN";break;case"LR":l.layoutOptions["elk.direction"]="RIGHT";break;case"RL":l.layoutOptions["elk.direction"]="LEFT"}const{securityLevel:b,flowchart:d}=(0,a.F)();let v;"sandbox"===b&&(v=(0,r.Ltv)("#i"+t));const k="sandbox"===b?(0,r.Ltv)(v.nodes()[0].contentDocument.body):(0,r.Ltv)("body"),y="sandbox"===b?v.nodes()[0].contentDocument:document,M=k.select(`[id="${t}"]`);(0,c.a)(M,["point","circle","cross"],i.type,t);const T=i.db.getVertices();let j;const E=i.db.getSubGraphs();a.l.info("Subgraphs - ",E);for(let r=E.length-1;r>=0;r--)j=E[r],i.db.addVertex(j.id,{text:j.title,type:j.labelType},"group",void 0,j.classes,j.dir);const S=M.insert("g").attr("class","subgraphs"),P=function(n){const t={parentById:{},childrenById:{}},e=n.getSubGraphs();return a.l.info("Subgraphs - ",e),e.forEach((function(n){n.nodes.forEach((function(e){t.parentById[e]=n.id,void 0===t.childrenById[n.id]&&(t.childrenById[n.id]=[]),t.childrenById[n.id].push(e)}))})),e.forEach((function(n){n.id,void 0!==t.parentById[n.id]&&t.parentById[n.id]})),t}(i.db);l=await async function(n,t,e,i,r,o,u){const s=e.select(`[id="${t}"]`).insert("g").attr("class","nodes"),h=Object.keys(n);return await Promise.all(h.map((async function(t){const e=n[t];let u="default";e.classes.length>0&&(u=e.classes.join(" ")),u+=" flowchart-label";const h=(0,a.k)(e.styles);let l=void 0!==e.text?e.text:e.id;const b={width:0,height:0},w=[{id:e.id+"-west",layoutOptions:{"port.side":"WEST"}},{id:e.id+"-east",layoutOptions:{"port.side":"EAST"}},{id:e.id+"-south",layoutOptions:{"port.side":"SOUTH"}},{id:e.id+"-north",layoutOptions:{"port.side":"NORTH"}}];let d=0,g="",p={};switch(e.type){case"round":d=5,g="rect";break;case"square":case"group":default:g="rect";break;case"diamond":g="question",p={portConstraints:"FIXED_SIDE"};break;case"hexagon":g="hexagon";break;case"odd":case"odd_right":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"doublecircle":g="doublecircle"}const m={labelStyle:h.labelStyle,shape:g,labelText:l,labelType:e.labelType,rx:d,ry:d,class:u,style:h.style,id:e.id,link:e.link,linkTarget:e.linkTarget,tooltip:r.db.getTooltip(e.id)||"",domId:r.db.lookUpDomId(e.id),haveCallback:e.haveCallback,width:"group"===e.type?500:void 0,dir:e.dir,type:e.type,props:e.props,padding:(0,a.F)().flowchart.padding};let v,k;if("group"!==m.type)k=await(0,c.e)(s,m,e.dir),v=k.node().getBBox();else{i.createElementNS("http://www.w3.org/2000/svg","text");const{shapeSvg:n,bbox:t}=await(0,c.l)(s,m,void 0,!0);b.width=t.width,b.wrappingWidth=(0,a.F)().flowchart.wrappingWidth,b.height=t.height,b.labelNode=n.node(),m.labelData=b}const y={id:e.id,ports:"diamond"===e.type?w:[],layoutOptions:p,labelText:l,labelData:b,domId:r.db.lookUpDomId(e.id),width:null==v?void 0:v.width,height:null==v?void 0:v.height,type:e.type,el:k,parent:o.parentById[e.id]};f[m.id]=y}))),u}(T,t,k,y,i,P,l);const C=M.insert("g").attr("class","edges edgePath"),I=i.db.getEdges();l=w(I,i,l,M);Object.keys(f).forEach((n=>{const t=f[n];t.parent||l.children.push(t),void 0!==P.childrenById[n]&&(t.labels=[{text:t.labelText,layoutOptions:{"nodeLabels.placement":"[H_CENTER, V_TOP, INSIDE]"},width:t.labelData.width,height:t.labelData.height}],delete t.x,delete t.y,delete t.width,delete t.height)})),p(l.children,P),a.l.info("after layout",JSON.stringify(l,null,2));const O=await u.layout(l);m(0,0,O.children,M,S,i,0),a.l.info("after layout",O),null==(o=O.edges)||o.map((n=>{g(C,n,n.edgeData,i,P,t)})),(0,a.o)({},M,d.diagramPadding,d.useMaxWidth),h.remove()}},k=n=>`.label {\n font-family: ${n.fontFamily};\n color: ${n.nodeTextColor||n.textColor};\n }\n .cluster-label text {\n fill: ${n.titleColor};\n }\n .cluster-label span {\n color: ${n.titleColor};\n }\n\n .label text,span {\n fill: ${n.nodeTextColor||n.textColor};\n color: ${n.nodeTextColor||n.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${n.mainBkg};\n stroke: ${n.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${n.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${n.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${n.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${n.edgeLabelBackground};\n rect {\n opacity: 0.85;\n background-color: ${n.edgeLabelBackground};\n fill: ${n.edgeLabelBackground};\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ${n.clusterBkg};\n stroke: ${n.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${n.titleColor};\n }\n\n .cluster span {\n color: ${n.titleColor};\n }\n /* .cluster div {\n color: ${n.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${n.fontFamily};\n font-size: 12px;\n background: ${n.tertiaryColor};\n border: 1px solid ${n.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${n.textColor};\n }\n .subgraph {\n stroke-width:2;\n rx:3;\n }\n // .subgraph-lvl-1 {\n // fill:#ccc;\n // // stroke:black;\n // }\n\n .flowchart-label text {\n text-anchor: middle;\n }\n\n ${(n=>{let t="";for(let e=0;e<5;e++)t+=`\n .subgraph-lvl-${e} {\n fill: ${n[`surface${e}`]};\n stroke: ${n[`surfacePeer${e}`]};\n }\n `;return t})(n)}\n`,y={db:i.d,renderer:v,parser:i.p,styles:k}}}]); \ No newline at end of file diff --git a/assets/js/2237.3ee39997.js b/assets/js/2237.3ee39997.js new file mode 100644 index 00000000..729073c3 --- /dev/null +++ b/assets/js/2237.3ee39997.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[2237],{3363:(e,t,n)=>{n.d(t,{A:()=>r});n(6540);var i=n(4164),o=n(1312),s=n(1107),a=n(4848);function r(e){let{className:t}=e;return(0,a.jsx)("main",{className:(0,i.A)("container margin-vert--xl",t),children:(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,a.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,a.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},2237:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});n(6540);var i=n(1312),o=n(1003),s=n(8244),a=n(3363),r=n(4848);function d(){const e=(0,i.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.be,{title:e}),(0,r.jsx)(s.A,{children:(0,r.jsx)(a.A,{})})]})}}}]); \ No newline at end of file diff --git a/assets/js/2317.e4f1577d.js b/assets/js/2317.e4f1577d.js new file mode 100644 index 00000000..f6218e2a --- /dev/null +++ b/assets/js/2317.e4f1577d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[2317],{646:(e,t,n)=>{n.d(t,{H:()=>l});var r=n(2933);function l(e,t){var n=e.append("foreignObject").attr("width","100000"),l=n.append("xhtml:div");l.attr("xmlns","http://www.w3.org/1999/xhtml");var o=t.label;switch(typeof o){case"function":l.insert(o);break;case"object":l.insert((function(){return o}));break;default:l.html(o)}r.AV(l,t.labelStyle),l.style("display","inline-block"),l.style("white-space","nowrap");var a=l.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},2933:(e,t,n)=>{n.d(t,{AV:()=>c,De:()=>o,c$:()=>p,gh:()=>a,nh:()=>d});var r=n(4963),l=n(9610);function o(e,t){return!!e.children(t).length}function a(e){return i(e.v)+":"+i(e.w)+":"+i(e.name)}var s=/:/g;function i(e){return e?String(e).replace(s,"\\:"):""}function c(e,t){t&&e.attr("style",t)}function d(e,t,n){t&&e.attr("class",t).attr("class",n+" "+e.attr("class"))}function p(e,t){var n=t.graph();if(r.A(n)){var o=n.transition;if(l.A(o))return o(e)}return e}},5937:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(2453),l=n(4886);const o=(e,t)=>r.A.lang.round(l.A.parse(e)[t])},2317:(e,t,n)=>{n.d(t,{diagram:()=>a});var r=n(6216),l=n(8696),o=n(6257);n(6312),n(697),n(1176),n(4075),n(4353),n(6750),n(2838);const a={parser:r.p,db:r.f,renderer:l.f,styles:l.a,init:e=>{e.flowchart||(e.flowchart={}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,(0,o.p)({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}}),l.f.setConf(e.flowchart),r.f.clear(),r.f.setGen("gen-2")}}},8696:(e,t,n)=>{n.d(t,{a:()=>f,f:()=>w});var r=n(697),l=n(6312),o=n(6257),a=n(2746),s=n(646),i=n(5937),c=n(5582);const d={},p=async function(e,t,n,r,l,a){const i=r.select(`[id="${n}"]`),c=Object.keys(e);for(const d of c){const n=e[d];let r="default";n.classes.length>0&&(r=n.classes.join(" ")),r+=" flowchart-label";const c=(0,o.k)(n.styles);let p,b=void 0!==n.text?n.text:n.id;if(o.l.info("vertex",n,n.labelType),"markdown"===n.labelType)o.l.info("vertex",n,n.labelType);else if((0,o.m)((0,o.c)().flowchart.htmlLabels)){const e={label:b};p=(0,s.H)(i,e).node(),p.parentNode.removeChild(p)}else{const e=l.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("style",c.labelStyle.replace("color:","fill:"));const t=b.split(o.e.lineBreakRegex);for(const n of t){const t=l.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","1"),t.textContent=n,e.appendChild(t)}p=e}let w=0,f="";switch(n.type){case"round":w=5,f="rect";break;case"square":case"group":default:f="rect";break;case"diamond":f="question";break;case"hexagon":f="hexagon";break;case"odd":case"odd_right":f="rect_left_inv_arrow";break;case"lean_right":f="lean_right";break;case"lean_left":f="lean_left";break;case"trapezoid":f="trapezoid";break;case"inv_trapezoid":f="inv_trapezoid";break;case"circle":f="circle";break;case"ellipse":f="ellipse";break;case"stadium":f="stadium";break;case"subroutine":f="subroutine";break;case"cylinder":f="cylinder";break;case"doublecircle":f="doublecircle"}const u=await(0,o.r)(b,(0,o.c)());t.setNode(n.id,{labelStyle:c.labelStyle,shape:f,labelText:u,labelType:n.labelType,rx:w,ry:w,class:r,style:c.style,id:n.id,link:n.link,linkTarget:n.linkTarget,tooltip:a.db.getTooltip(n.id)||"",domId:a.db.lookUpDomId(n.id),haveCallback:n.haveCallback,width:"group"===n.type?500:void 0,dir:n.dir,type:n.type,props:n.props,padding:(0,o.c)().flowchart.padding}),o.l.info("setNode",{labelStyle:c.labelStyle,labelType:n.labelType,shape:f,labelText:u,rx:w,ry:w,class:r,style:c.style,id:n.id,domId:a.db.lookUpDomId(n.id),width:"group"===n.type?500:void 0,type:n.type,dir:n.dir,props:n.props,padding:(0,o.c)().flowchart.padding})}},b=async function(e,t,n){o.l.info("abc78 edges = ",e);let r,a,s=0,i={};if(void 0!==e.defaultStyle){const t=(0,o.k)(e.defaultStyle);r=t.style,a=t.labelStyle}for(const c of e){s++;const n="L-"+c.start+"-"+c.end;void 0===i[n]?(i[n]=0,o.l.info("abc78 new entry",n,i[n])):(i[n]++,o.l.info("abc78 new entry",n,i[n]));let p=n+"-"+i[n];o.l.info("abc78 new link id to be used is",n,p,i[n]);const b="LS-"+c.start,w="LE-"+c.end,f={style:"",labelStyle:""};switch(f.minlen=c.length||1,"arrow_open"===c.type?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",c.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle"}let u="",h="";switch(c.stroke){case"normal":u="fill:none;",void 0!==r&&(u=r),void 0!==a&&(h=a),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;";break;case"invisible":f.thickness="invisible",f.pattern="solid",f.style="stroke-width: 0;fill:none;"}if(void 0!==c.style){const e=(0,o.k)(c.style);u=e.style,h=e.labelStyle}f.style=f.style+=u,f.labelStyle=f.labelStyle+=h,void 0!==c.interpolate?f.curve=(0,o.n)(c.interpolate,l.lUB):void 0!==e.defaultInterpolate?f.curve=(0,o.n)(e.defaultInterpolate,l.lUB):f.curve=(0,o.n)(d.curve,l.lUB),void 0===c.text?void 0!==c.style&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType=c.labelType,f.label=await(0,o.r)(c.text.replace(o.e.lineBreakRegex,"\n"),(0,o.c)()),void 0===c.style&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=p,f.classes="flowchart-link "+b+" "+w,t.setEdge(c.start,c.end,f,s)}},w={setConf:function(e){const t=Object.keys(e);for(const n of t)d[n]=e[n]},addVertices:p,addEdges:b,getClasses:function(e,t){return t.db.getClasses()},draw:async function(e,t,n,s){o.l.info("Drawing flowchart");let i=s.db.getDirection();void 0===i&&(i="TD");const{securityLevel:c,flowchart:d}=(0,o.c)(),w=d.nodeSpacing||50,f=d.rankSpacing||50;let u;"sandbox"===c&&(u=(0,l.Ltv)("#i"+t));const h="sandbox"===c?(0,l.Ltv)(u.nodes()[0].contentDocument.body):(0,l.Ltv)("body"),g="sandbox"===c?u.nodes()[0].contentDocument:document,y=new r.T({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:w,ranksep:f,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let k;const x=s.db.getSubGraphs();o.l.info("Subgraphs - ",x);for(let r=x.length-1;r>=0;r--)k=x[r],o.l.info("Subgraph - ",k),s.db.addVertex(k.id,{text:k.title,type:k.labelType},"group",void 0,k.classes,k.dir);const v=s.db.getVertices(),m=s.db.getEdges();o.l.info("Edges",m);let S=0;for(S=x.length-1;S>=0;S--){k=x[S],(0,l.Ubm)("cluster").append("text");for(let e=0;e<k.nodes.length;e++)o.l.info("Setting up subgraphs",k.nodes[e],k.id),y.setParent(k.nodes[e],k.id)}await p(v,y,t,h,g,s),await b(m,y);const T=h.select(`[id="${t}"]`),C=h.select("#"+t+" g");if(await(0,a.r)(C,y,["point","circle","cross"],"flowchart",t),o.u.insertTitle(T,"flowchartTitleText",d.titleTopMargin,s.db.getDiagramTitle()),(0,o.o)(y,T,d.diagramPadding,d.useMaxWidth),s.db.indexNodes("subGraph"+S),!d.htmlLabels){const e=g.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const t of e){const e=t.getBBox(),n=g.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("rx",0),n.setAttribute("ry",0),n.setAttribute("width",e.width),n.setAttribute("height",e.height),t.insertBefore(n,t.firstChild)}}Object.keys(v).forEach((function(e){const n=v[e];if(n.link){const r=(0,l.Ltv)("#"+t+' [id="'+e+'"]');if(r){const e=g.createElementNS("http://www.w3.org/2000/svg","a");e.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),e.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),e.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===c?e.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&e.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);const t=r.insert((function(){return e}),":first-child"),l=r.select(".label-container");l&&t.append((function(){return l.node()}));const o=r.select(".label");o&&t.append((function(){return o.node()}))}}}))}},f=e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${((e,t)=>{const n=i.A,r=n(e,"r"),l=n(e,"g"),o=n(e,"b");return c.A(r,l,o,t)})(e.edgeLabelBackground,.5)};\n // background-color: \n }\n\n .cluster rect {\n fill: ${e.clusterBkg};\n stroke: ${e.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n`}}]); \ No newline at end of file diff --git a/assets/js/235.d2e2ae6a.js b/assets/js/235.d2e2ae6a.js new file mode 100644 index 00000000..fdce8d16 --- /dev/null +++ b/assets/js/235.d2e2ae6a.js @@ -0,0 +1,24006 @@ +exports.id = 235; +exports.ids = [235]; +exports.modules = { + +/***/ 2954: +/***/ ((module) => { + +(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=undefined;if(!f&&c)return require(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=undefined,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/******************************************************************************* + * Copyright (c) 2017 Kiel University and others. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +var ELK = function () { + function ELK() { + var _this = this; + + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref$defaultLayoutOpt = _ref.defaultLayoutOptions, + defaultLayoutOptions = _ref$defaultLayoutOpt === undefined ? {} : _ref$defaultLayoutOpt, + _ref$algorithms = _ref.algorithms, + algorithms = _ref$algorithms === undefined ? ['layered', 'stress', 'mrtree', 'radial', 'force', 'disco', 'sporeOverlap', 'sporeCompaction', 'rectpacking'] : _ref$algorithms, + workerFactory = _ref.workerFactory, + workerUrl = _ref.workerUrl; + + _classCallCheck(this, ELK); + + this.defaultLayoutOptions = defaultLayoutOptions; + this.initialized = false; + + // check valid worker construction possible + if (typeof workerUrl === 'undefined' && typeof workerFactory === 'undefined') { + throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'."); + } + var factory = workerFactory; + if (typeof workerUrl !== 'undefined' && typeof workerFactory === 'undefined') { + // use default Web Worker + factory = function factory(url) { + return new Worker(url); + }; + } + + // create the worker + var worker = factory(workerUrl); + if (typeof worker.postMessage !== 'function') { + throw new TypeError("Created worker does not provide" + " the required 'postMessage' function."); + } + + // wrap the worker to return promises + this.worker = new PromisedWorker(worker); + + // initially register algorithms + this.worker.postMessage({ + cmd: 'register', + algorithms: algorithms + }).then(function (r) { + return _this.initialized = true; + }).catch(console.err); + } + + _createClass(ELK, [{ + key: 'layout', + value: function layout(graph) { + var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref2$layoutOptions = _ref2.layoutOptions, + layoutOptions = _ref2$layoutOptions === undefined ? this.defaultLayoutOptions : _ref2$layoutOptions, + _ref2$logging = _ref2.logging, + logging = _ref2$logging === undefined ? false : _ref2$logging, + _ref2$measureExecutio = _ref2.measureExecutionTime, + measureExecutionTime = _ref2$measureExecutio === undefined ? false : _ref2$measureExecutio; + + if (!graph) { + return Promise.reject(new Error("Missing mandatory parameter 'graph'.")); + } + return this.worker.postMessage({ + cmd: 'layout', + graph: graph, + layoutOptions: layoutOptions, + options: { + logging: logging, + measureExecutionTime: measureExecutionTime + } + }); + } + }, { + key: 'knownLayoutAlgorithms', + value: function knownLayoutAlgorithms() { + return this.worker.postMessage({ cmd: 'algorithms' }); + } + }, { + key: 'knownLayoutOptions', + value: function knownLayoutOptions() { + return this.worker.postMessage({ cmd: 'options' }); + } + }, { + key: 'knownLayoutCategories', + value: function knownLayoutCategories() { + return this.worker.postMessage({ cmd: 'categories' }); + } + }, { + key: 'terminateWorker', + value: function terminateWorker() { + this.worker.terminate(); + } + }]); + + return ELK; +}(); + +exports.default = ELK; + +var PromisedWorker = function () { + function PromisedWorker(worker) { + var _this2 = this; + + _classCallCheck(this, PromisedWorker); + + if (worker === undefined) { + throw new Error("Missing mandatory parameter 'worker'."); + } + this.resolvers = {}; + this.worker = worker; + this.worker.onmessage = function (answer) { + // why is this necessary? + setTimeout(function () { + _this2.receive(_this2, answer); + }, 0); + }; + } + + _createClass(PromisedWorker, [{ + key: 'postMessage', + value: function postMessage(msg) { + var id = this.id || 0; + this.id = id + 1; + msg.id = id; + var self = this; + return new Promise(function (resolve, reject) { + // prepare the resolver + self.resolvers[id] = function (err, res) { + if (err) { + self.convertGwtStyleError(err); + reject(err); + } else { + resolve(res); + } + }; + // post the message + self.worker.postMessage(msg); + }); + } + }, { + key: 'receive', + value: function receive(self, answer) { + var json = answer.data; + var resolver = self.resolvers[json.id]; + if (resolver) { + delete self.resolvers[json.id]; + if (json.error) { + resolver(json.error); + } else { + resolver(null, json.data); + } + } + } + }, { + key: 'terminate', + value: function terminate() { + if (this.worker.terminate) { + this.worker.terminate(); + } + } + }, { + key: 'convertGwtStyleError', + value: function convertGwtStyleError(err) { + if (!err) { + return; + } + // Somewhat flatten the way GWT stores nested exception(s) + var javaException = err['__java$exception']; + if (javaException) { + // Note that the property name of the nested exception is different + // in the non-minified ('cause') and the minified (not deterministic) version. + // Hence, the version below only works for the non-minified version. + // However, as the minified stack trace is not of much use anyway, one + // should switch the used version for debugging in such a case. + if (javaException.cause && javaException.cause.backingJsObject) { + err.cause = javaException.cause.backingJsObject; + this.convertGwtStyleError(err.cause); + } + delete err['__java$exception']; + } + } + }]); + + return PromisedWorker; +}(); +},{}],2:[function(require,module,exports){ +(function (global){(function (){ +'use strict'; + +// -------------- FAKE ELEMENTS GWT ASSUMES EXIST -------------- +var $wnd; +if (typeof window !== 'undefined') + $wnd = window +else if (typeof global !== 'undefined') + $wnd = global // nodejs +else if (typeof self !== 'undefined') + $wnd = self // web worker + +var $moduleName, + $moduleBase; + +// -------------- WORKAROUND STRICT MODE, SEE #127 -------------- +var g, i, o; + +// -------------- GENERATED CODE -------------- +function nb(){} +function xb(){} +function Fd(){} +function hh(){} +function lq(){} +function Nq(){} +function ir(){} +function Ws(){} +function Zw(){} +function jx(){} +function rx(){} +function sx(){} +function My(){} +function bA(){} +function mA(){} +function tA(){} +function aB(){} +function dB(){} +function jB(){} +function dC(){} +function keb(){} +function geb(){} +function oeb(){} +function iob(){} +function Job(){} +function Rob(){} +function apb(){} +function ipb(){} +function nrb(){} +function wrb(){} +function Brb(){} +function Prb(){} +function ltb(){} +function svb(){} +function xvb(){} +function zvb(){} +function $xb(){} +function Gzb(){} +function NAb(){} +function VAb(){} +function rBb(){} +function RBb(){} +function TBb(){} +function XBb(){} +function ZBb(){} +function _Bb(){} +function bCb(){} +function dCb(){} +function fCb(){} +function jCb(){} +function rCb(){} +function uCb(){} +function wCb(){} +function yCb(){} +function ACb(){} +function ECb(){} +function FEb(){} +function IEb(){} +function KEb(){} +function MEb(){} +function gFb(){} +function FFb(){} +function JFb(){} +function xGb(){} +function AGb(){} +function YGb(){} +function oHb(){} +function tHb(){} +function xHb(){} +function pIb(){} +function BJb(){} +function kLb(){} +function mLb(){} +function oLb(){} +function qLb(){} +function FLb(){} +function JLb(){} +function KMb(){} +function MMb(){} +function OMb(){} +function YMb(){} +function MNb(){} +function ONb(){} +function aOb(){} +function eOb(){} +function xOb(){} +function BOb(){} +function DOb(){} +function FOb(){} +function IOb(){} +function MOb(){} +function POb(){} +function UOb(){} +function ZOb(){} +function cPb(){} +function gPb(){} +function nPb(){} +function qPb(){} +function tPb(){} +function wPb(){} +function CPb(){} +function qQb(){} +function GQb(){} +function bRb(){} +function gRb(){} +function kRb(){} +function pRb(){} +function wRb(){} +function xSb(){} +function TSb(){} +function VSb(){} +function XSb(){} +function ZSb(){} +function _Sb(){} +function tTb(){} +function DTb(){} +function FTb(){} +function FXb(){} +function hXb(){} +function hWb(){} +function mWb(){} +function CVb(){} +function XXb(){} +function $Xb(){} +function bYb(){} +function lYb(){} +function FYb(){} +function XYb(){} +function aZb(){} +function SZb(){} +function ZZb(){} +function Z_b(){} +function j_b(){} +function j$b(){} +function b$b(){} +function f$b(){} +function n$b(){} +function K_b(){} +function V_b(){} +function b0b(){} +function l0b(){} +function X1b(){} +function _1b(){} +function x3b(){} +function r4b(){} +function w4b(){} +function A4b(){} +function E4b(){} +function I4b(){} +function M4b(){} +function o5b(){} +function q5b(){} +function w5b(){} +function A5b(){} +function E5b(){} +function h6b(){} +function j6b(){} +function l6b(){} +function q6b(){} +function v6b(){} +function y6b(){} +function G6b(){} +function K6b(){} +function N6b(){} +function P6b(){} +function R6b(){} +function b7b(){} +function f7b(){} +function j7b(){} +function n7b(){} +function C7b(){} +function H7b(){} +function J7b(){} +function L7b(){} +function N7b(){} +function P7b(){} +function a8b(){} +function c8b(){} +function e8b(){} +function g8b(){} +function i8b(){} +function m8b(){} +function Z8b(){} +function f9b(){} +function i9b(){} +function o9b(){} +function C9b(){} +function F9b(){} +function K9b(){} +function Q9b(){} +function aac(){} +function bac(){} +function eac(){} +function mac(){} +function pac(){} +function rac(){} +function tac(){} +function xac(){} +function Aac(){} +function Dac(){} +function Iac(){} +function Oac(){} +function Uac(){} +function Ucc(){} +function scc(){} +function ycc(){} +function Acc(){} +function Ccc(){} +function Ncc(){} +function Wcc(){} +function ydc(){} +function Adc(){} +function Gdc(){} +function Ldc(){} +function Zdc(){} +function fec(){} +function Dec(){} +function Gec(){} +function Kec(){} +function efc(){} +function jfc(){} +function nfc(){} +function Bfc(){} +function Ifc(){} +function Lfc(){} +function Rfc(){} +function Ufc(){} +function Zfc(){} +function cgc(){} +function egc(){} +function ggc(){} +function igc(){} +function kgc(){} +function Dgc(){} +function Hgc(){} +function Lgc(){} +function Ngc(){} +function Pgc(){} +function Vgc(){} +function Ygc(){} +function chc(){} +function ehc(){} +function ghc(){} +function ihc(){} +function mhc(){} +function rhc(){} +function uhc(){} +function whc(){} +function yhc(){} +function Ahc(){} +function Chc(){} +function Ghc(){} +function Nhc(){} +function Phc(){} +function Rhc(){} +function Thc(){} +function $hc(){} +function aic(){} +function cic(){} +function eic(){} +function jic(){} +function nic(){} +function pic(){} +function ric(){} +function vic(){} +function yic(){} +function Dic(){} +function Ric(){} +function Zic(){} +function bjc(){} +function djc(){} +function jjc(){} +function njc(){} +function rjc(){} +function tjc(){} +function zjc(){} +function Djc(){} +function Fjc(){} +function Ljc(){} +function Pjc(){} +function Rjc(){} +function fkc(){} +function Kkc(){} +function Mkc(){} +function Okc(){} +function Qkc(){} +function Skc(){} +function Ukc(){} +function Wkc(){} +function clc(){} +function elc(){} +function klc(){} +function mlc(){} +function olc(){} +function qlc(){} +function wlc(){} +function ylc(){} +function Alc(){} +function Jlc(){} +function Joc(){} +function poc(){} +function roc(){} +function toc(){} +function voc(){} +function Boc(){} +function Foc(){} +function Hoc(){} +function Loc(){} +function Noc(){} +function Poc(){} +function qnc(){} +function unc(){} +function upc(){} +function kpc(){} +function mpc(){} +function opc(){} +function qpc(){} +function ypc(){} +function Cpc(){} +function Mpc(){} +function Qpc(){} +function dqc(){} +function jqc(){} +function Aqc(){} +function Eqc(){} +function Gqc(){} +function Sqc(){} +function arc(){} +function lrc(){} +function zrc(){} +function Hrc(){} +function bsc(){} +function dsc(){} +function fsc(){} +function ksc(){} +function msc(){} +function Asc(){} +function Csc(){} +function Esc(){} +function Ksc(){} +function Nsc(){} +function Ssc(){} +function CCc(){} +function tGc(){} +function aHc(){} +function gHc(){} +function nIc(){} +function PJc(){} +function XKc(){} +function fLc(){} +function hLc(){} +function lLc(){} +function eNc(){} +function IOc(){} +function MOc(){} +function WOc(){} +function YOc(){} +function $Oc(){} +function cPc(){} +function iPc(){} +function mPc(){} +function oPc(){} +function qPc(){} +function sPc(){} +function wPc(){} +function APc(){} +function FPc(){} +function HPc(){} +function NPc(){} +function PPc(){} +function TPc(){} +function VPc(){} +function ZPc(){} +function _Pc(){} +function bQc(){} +function dQc(){} +function SQc(){} +function hRc(){} +function HRc(){} +function HSc(){} +function pSc(){} +function xSc(){} +function zSc(){} +function BSc(){} +function DSc(){} +function FSc(){} +function CTc(){} +function ITc(){} +function KTc(){} +function MTc(){} +function XTc(){} +function ZTc(){} +function jVc(){} +function lVc(){} +function zVc(){} +function IVc(){} +function KVc(){} +function KWc(){} +function uWc(){} +function xWc(){} +function AWc(){} +function QWc(){} +function UWc(){} +function qXc(){} +function KXc(){} +function OXc(){} +function SXc(){} +function $Xc(){} +function mYc(){} +function rYc(){} +function zYc(){} +function DYc(){} +function FYc(){} +function HYc(){} +function JYc(){} +function cZc(){} +function gZc(){} +function iZc(){} +function pZc(){} +function tZc(){} +function vZc(){} +function AZc(){} +function GZc(){} +function l_c(){} +function l1c(){} +function b1c(){} +function d1c(){} +function h1c(){} +function n1c(){} +function r1c(){} +function v1c(){} +function x1c(){} +function D1c(){} +function H1c(){} +function L1c(){} +function R1c(){} +function V1c(){} +function Z1c(){} +function Z0c(){} +function a0c(){} +function c0c(){} +function e0c(){} +function k0c(){} +function o0c(){} +function b2c(){} +function l2c(){} +function p2c(){} +function Y2c(){} +function _2c(){} +function A3c(){} +function F3c(){} +function I3c(){} +function K3c(){} +function M3c(){} +function Q3c(){} +function U3c(){} +function c5c(){} +function D5c(){} +function G5c(){} +function J5c(){} +function N5c(){} +function V5c(){} +function p6c(){} +function s6c(){} +function H6c(){} +function K6c(){} +function _7c(){} +function h8c(){} +function j8c(){} +function o8c(){} +function r8c(){} +function u8c(){} +function R8c(){} +function X8c(){} +function o9c(){} +function s9c(){} +function x9c(){} +function Qad(){} +function rcd(){} +function Xcd(){} +function vdd(){} +function Tdd(){} +function _dd(){} +function qed(){} +function sed(){} +function ved(){} +function Hed(){} +function Zed(){} +function bfd(){} +function ifd(){} +function Gfd(){} +function Ifd(){} +function Igd(){} +function agd(){} +function dgd(){} +function pgd(){} +function Hgd(){} +function Kgd(){} +function Mgd(){} +function Ogd(){} +function Qgd(){} +function Sgd(){} +function Ugd(){} +function Wgd(){} +function Ygd(){} +function $gd(){} +function ahd(){} +function chd(){} +function ehd(){} +function ghd(){} +function ihd(){} +function khd(){} +function mhd(){} +function ohd(){} +function qhd(){} +function shd(){} +function Shd(){} +function lkd(){} +function znd(){} +function Jpd(){} +function jrd(){} +function Mrd(){} +function Qrd(){} +function Urd(){} +function Yrd(){} +function Yud(){} +function eud(){} +function asd(){} +function Lsd(){} +function btd(){} +function dtd(){} +function jtd(){} +function otd(){} +function ztd(){} +function Xxd(){} +function $yd(){} +function rzd(){} +function Rzd(){} +function KAd(){} +function hCd(){} +function _Cd(){} +function _Sd(){} +function OSd(){} +function BDd(){} +function BId(){} +function JId(){} +function YHd(){} +function fLd(){} +function cPd(){} +function hQd(){} +function AQd(){} +function kUd(){} +function VUd(){} +function pVd(){} +function W$d(){} +function Z$d(){} +function a_d(){} +function i_d(){} +function v_d(){} +function y_d(){} +function f1d(){} +function L5d(){} +function v6d(){} +function b8d(){} +function e8d(){} +function h8d(){} +function k8d(){} +function n8d(){} +function q8d(){} +function t8d(){} +function w8d(){} +function z8d(){} +function X9d(){} +function _9d(){} +function Mae(){} +function cbe(){} +function ebe(){} +function hbe(){} +function kbe(){} +function nbe(){} +function qbe(){} +function tbe(){} +function wbe(){} +function zbe(){} +function Cbe(){} +function Fbe(){} +function Ibe(){} +function Lbe(){} +function Obe(){} +function Rbe(){} +function Ube(){} +function Xbe(){} +function $be(){} +function bce(){} +function ece(){} +function hce(){} +function kce(){} +function nce(){} +function qce(){} +function tce(){} +function wce(){} +function zce(){} +function Cce(){} +function Fce(){} +function Ice(){} +function Lce(){} +function Oce(){} +function Rce(){} +function Uce(){} +function Xce(){} +function $ce(){} +function bde(){} +function ede(){} +function hde(){} +function kde(){} +function nde(){} +function qde(){} +function tde(){} +function wde(){} +function Hie(){} +function rke(){} +function rne(){} +function Ene(){} +function Gne(){} +function Jne(){} +function Mne(){} +function Pne(){} +function Sne(){} +function Vne(){} +function Yne(){} +function _ne(){} +function yme(){} +function coe(){} +function foe(){} +function ioe(){} +function loe(){} +function ooe(){} +function roe(){} +function uoe(){} +function xoe(){} +function Aoe(){} +function Doe(){} +function Goe(){} +function Joe(){} +function Moe(){} +function Poe(){} +function Soe(){} +function Voe(){} +function Yoe(){} +function _oe(){} +function cpe(){} +function fpe(){} +function ipe(){} +function lpe(){} +function ope(){} +function rpe(){} +function upe(){} +function xpe(){} +function Ape(){} +function Dpe(){} +function Gpe(){} +function Jpe(){} +function Mpe(){} +function Ppe(){} +function Spe(){} +function Vpe(){} +function Ype(){} +function _pe(){} +function cqe(){} +function fqe(){} +function iqe(){} +function lqe(){} +function oqe(){} +function rqe(){} +function uqe(){} +function Tqe(){} +function sue(){} +function Cue(){} +function A2b(a){} +function J3d(a){} +function zl(){wb()} +function z7b(){s7b()} +function ZHb(){YHb()} +function fSb(){eSb()} +function vSb(){tSb()} +function PUb(){OUb()} +function AVb(){yVb()} +function RVb(){QVb()} +function fWb(){dWb()} +function N5b(){H5b()} +function $9b(){U9b()} +function Lcc(){Hcc()} +function pdc(){Zcc()} +function pec(){iec()} +function pGc(){nGc()} +function jGc(){gGc()} +function YGc(){SGc()} +function cGc(){_Fc()} +function NFc(){KFc()} +function xgc(){sgc()} +function xHc(){tHc()} +function pHc(){lHc()} +function IHc(){CHc()} +function XHc(){RHc()} +function boc(){Mnc()} +function yqc(){mqc()} +function Pzc(){Ozc()} +function ACc(){yCc()} +function aKc(){YJc()} +function FLc(){DLc()} +function DNc(){ANc()} +function TNc(){JNc()} +function iQc(){gQc()} +function WRc(){TRc()} +function C$c(){B$c()} +function J0c(){B0c()} +function x0c(){r0c()} +function j_c(){h_c()} +function N_c(){H_c()} +function V_c(){R_c()} +function E4c(){D4c()} +function a5c(){$4c()} +function v7c(){u7c()} +function Z7c(){X7c()} +function pcd(){ncd()} +function Lcd(){Kcd()} +function Vcd(){Tcd()} +function fUd(){TTd()} +function Bfd(){Afd()} +function jkd(){hkd()} +function vmd(){umd()} +function xnd(){vnd()} +function Hpd(){Fpd()} +function HYd(){lYd()} +function yAd(){qAd()} +function gke(){rue()} +function Yxb(a){uFb(a)} +function Yb(a){this.a=a} +function cc(a){this.a=a} +function df(a){this.a=a} +function kf(a){this.a=a} +function kj(a){this.a=a} +function qj(a){this.a=a} +function Lj(a){this.a=a} +function jh(a){this.a=a} +function th(a){this.a=a} +function Bh(a){this.a=a} +function Xh(a){this.a=a} +function Xn(a){this.a=a} +function Di(a){this.a=a} +function Ki(a){this.a=a} +function Ik(a){this.a=a} +function Qk(a){this.a=a} +function mp(a){this.a=a} +function Lp(a){this.a=a} +function iq(a){this.a=a} +function Eq(a){this.a=a} +function Vq(a){this.a=a} +function Or(a){this.a=a} +function $r(a){this.b=a} +function Aj(a){this.c=a} +function vu(a){this.a=a} +function vw(a){this.a=a} +function gw(a){this.a=a} +function lw(a){this.a=a} +function Iw(a){this.a=a} +function Nw(a){this.a=a} +function Sw(a){this.a=a} +function ex(a){this.a=a} +function fx(a){this.a=a} +function lx(a){this.a=a} +function my(a){this.a=a} +function qy(a){this.a=a} +function Oy(a){this.a=a} +function NB(a){this.a=a} +function XB(a){this.a=a} +function hC(a){this.a=a} +function vC(a){this.a=a} +function MB(){this.a=[]} +function HEb(a,b){a.a=b} +function E2b(a,b){a.a=b} +function F2b(a,b){a.b=b} +function PRb(a,b){a.b=b} +function RRb(a,b){a.b=b} +function QJb(a,b){a.j=b} +function hQb(a,b){a.g=b} +function iQb(a,b){a.i=b} +function _Tb(a,b){a.c=b} +function G2b(a,b){a.c=b} +function H2b(a,b){a.d=b} +function aUb(a,b){a.d=b} +function h3b(a,b){a.k=b} +function O3b(a,b){a.c=b} +function Tmc(a,b){a.c=b} +function Smc(a,b){a.a=b} +function DJc(a,b){a.a=b} +function EJc(a,b){a.f=b} +function NSc(a,b){a.a=b} +function OSc(a,b){a.b=b} +function PSc(a,b){a.d=b} +function QSc(a,b){a.i=b} +function RSc(a,b){a.o=b} +function SSc(a,b){a.r=b} +function yUc(a,b){a.a=b} +function zUc(a,b){a.b=b} +function q3c(a,b){a.e=b} +function r3c(a,b){a.f=b} +function s3c(a,b){a.g=b} +function Y9c(a,b){a.e=b} +function Z9c(a,b){a.f=b} +function kad(a,b){a.f=b} +function Ntd(a,b){a.a=b} +function Otd(a,b){a.b=b} +function BWd(a,b){a.n=b} +function $ee(a,b){a.a=b} +function _ee(a,b){a.c=b} +function ife(a,b){a.c=b} +function Efe(a,b){a.c=b} +function hfe(a,b){a.a=b} +function Dfe(a,b){a.a=b} +function jfe(a,b){a.d=b} +function Ffe(a,b){a.d=b} +function kfe(a,b){a.e=b} +function Gfe(a,b){a.e=b} +function lfe(a,b){a.g=b} +function Hfe(a,b){a.f=b} +function Ife(a,b){a.j=b} +function wme(a,b){a.a=b} +function Fme(a,b){a.a=b} +function xme(a,b){a.b=b} +function gmc(a){a.b=a.a} +function Lg(a){a.c=a.d.d} +function fgb(a){this.a=a} +function zgb(a){this.a=a} +function Xgb(a){this.a=a} +function Xkb(a){this.a=a} +function mkb(a){this.a=a} +function reb(a){this.a=a} +function Seb(a){this.a=a} +function bfb(a){this.a=a} +function Tfb(a){this.a=a} +function blb(a){this.a=a} +function glb(a){this.a=a} +function llb(a){this.a=a} +function Ulb(a){this.a=a} +function _lb(a){this.a=a} +function Plb(a){this.b=a} +function Ppb(a){this.b=a} +function xpb(a){this.b=a} +function mpb(a){this.a=a} +function Yqb(a){this.a=a} +function uqb(a){this.c=a} +function Anb(a){this.c=a} +function zwb(a){this.c=a} +function Dkb(a){this.d=a} +function brb(a){this.a=a} +function Frb(a){this.a=a} +function hsb(a){this.a=a} +function ctb(a){this.a=a} +function cxb(a){this.a=a} +function axb(a){this.a=a} +function exb(a){this.a=a} +function gxb(a){this.a=a} +function wub(a){this.a=a} +function zAb(a){this.a=a} +function JAb(a){this.a=a} +function LAb(a){this.a=a} +function PAb(a){this.a=a} +function VBb(a){this.a=a} +function lCb(a){this.a=a} +function nCb(a){this.a=a} +function pCb(a){this.a=a} +function CCb(a){this.a=a} +function GCb(a){this.a=a} +function bDb(a){this.a=a} +function dDb(a){this.a=a} +function fDb(a){this.a=a} +function uDb(a){this.a=a} +function $Db(a){this.a=a} +function aEb(a){this.a=a} +function eEb(a){this.a=a} +function OEb(a){this.a=a} +function SEb(a){this.a=a} +function SFb(a){this.a=a} +function HFb(a){this.a=a} +function NFb(a){this.a=a} +function WGb(a){this.a=a} +function HJb(a){this.a=a} +function PJb(a){this.a=a} +function kNb(a){this.a=a} +function tOb(a){this.a=a} +function APb(a){this.a=a} +function IQb(a){this.a=a} +function bTb(a){this.a=a} +function dTb(a){this.a=a} +function wTb(a){this.a=a} +function GWb(a){this.a=a} +function UWb(a){this.a=a} +function WWb(a){this.a=a} +function fXb(a){this.a=a} +function jXb(a){this.a=a} +function M0b(a){this.a=a} +function r1b(a){this.a=a} +function D1b(a){this.e=a} +function T3b(a){this.a=a} +function W3b(a){this.a=a} +function _3b(a){this.a=a} +function c4b(a){this.a=a} +function s5b(a){this.a=a} +function u5b(a){this.a=a} +function y5b(a){this.a=a} +function C5b(a){this.a=a} +function Q5b(a){this.a=a} +function S5b(a){this.a=a} +function U5b(a){this.a=a} +function W5b(a){this.a=a} +function l7b(a){this.a=a} +function p7b(a){this.a=a} +function k8b(a){this.a=a} +function L8b(a){this.a=a} +function Rac(a){this.a=a} +function Xac(a){this.a=a} +function $ac(a){this.a=a} +function bbc(a){this.a=a} +function Cdc(a){this.a=a} +function Edc(a){this.a=a} +function Ehc(a){this.a=a} +function khc(a){this.a=a} +function Ihc(a){this.a=a} +function qfc(a){this.a=a} +function tfc(a){this.a=a} +function Wfc(a){this.a=a} +function Fic(a){this.a=a} +function Vic(a){this.a=a} +function fjc(a){this.a=a} +function pjc(a){this.a=a} +function ckc(a){this.a=a} +function hkc(a){this.a=a} +function Ykc(a){this.a=a} +function $kc(a){this.a=a} +function alc(a){this.a=a} +function glc(a){this.a=a} +function ilc(a){this.a=a} +function slc(a){this.a=a} +function Clc(a){this.a=a} +function xoc(a){this.a=a} +function zoc(a){this.a=a} +function spc(a){this.a=a} +function Vqc(a){this.a=a} +function Xqc(a){this.a=a} +function Gsc(a){this.a=a} +function Isc(a){this.a=a} +function JGc(a){this.a=a} +function NGc(a){this.a=a} +function MHc(a){this.a=a} +function JIc(a){this.a=a} +function fJc(a){this.a=a} +function BJc(a){this.a=a} +function dJc(a){this.c=a} +function Trc(a){this.b=a} +function eKc(a){this.a=a} +function IKc(a){this.a=a} +function KKc(a){this.a=a} +function MKc(a){this.a=a} +function yLc(a){this.a=a} +function HMc(a){this.a=a} +function LMc(a){this.a=a} +function PMc(a){this.a=a} +function TMc(a){this.a=a} +function XMc(a){this.a=a} +function ZMc(a){this.a=a} +function aNc(a){this.a=a} +function jNc(a){this.a=a} +function aPc(a){this.a=a} +function gPc(a){this.a=a} +function kPc(a){this.a=a} +function yPc(a){this.a=a} +function CPc(a){this.a=a} +function JPc(a){this.a=a} +function RPc(a){this.a=a} +function XPc(a){this.a=a} +function mRc(a){this.a=a} +function xTc(a){this.a=a} +function CWc(a){this.a=a} +function EWc(a){this.a=a} +function IWc(a){this.a=a} +function OWc(a){this.a=a} +function dXc(a){this.a=a} +function gXc(a){this.a=a} +function EXc(a){this.a=a} +function WXc(a){this.a=a} +function YXc(a){this.a=a} +function aYc(a){this.a=a} +function cYc(a){this.a=a} +function eYc(a){this.a=a} +function iYc(a){this.a=a} +function i0c(a){this.a=a} +function g0c(a){this.a=a} +function P1c(a){this.a=a} +function Sad(a){this.a=a} +function Uad(a){this.a=a} +function Wad(a){this.a=a} +function Yad(a){this.a=a} +function cbd(a){this.a=a} +function ydd(a){this.a=a} +function Kdd(a){this.a=a} +function Mdd(a){this.a=a} +function _ed(a){this.a=a} +function dfd(a){this.a=a} +function Kfd(a){this.a=a} +function prd(a){this.a=a} +function $rd(a){this.a=a} +function csd(a){this.a=a} +function Usd(a){this.a=a} +function Vtd(a){this.a=a} +function wud(a){this.a=a} +function Rud(a){this.f=a} +function LEd(a){this.a=a} +function UEd(a){this.a=a} +function VEd(a){this.a=a} +function WEd(a){this.a=a} +function XEd(a){this.a=a} +function YEd(a){this.a=a} +function ZEd(a){this.a=a} +function $Ed(a){this.a=a} +function _Ed(a){this.a=a} +function aFd(a){this.a=a} +function gFd(a){this.a=a} +function iFd(a){this.a=a} +function jFd(a){this.a=a} +function kFd(a){this.a=a} +function lFd(a){this.a=a} +function nFd(a){this.a=a} +function qFd(a){this.a=a} +function wFd(a){this.a=a} +function xFd(a){this.a=a} +function zFd(a){this.a=a} +function AFd(a){this.a=a} +function BFd(a){this.a=a} +function CFd(a){this.a=a} +function DFd(a){this.a=a} +function MFd(a){this.a=a} +function OFd(a){this.a=a} +function QFd(a){this.a=a} +function SFd(a){this.a=a} +function uGd(a){this.a=a} +function QGd(a){this.a=a} +function jGd(a){this.b=a} +function YOd(a){this.a=a} +function ePd(a){this.a=a} +function kPd(a){this.a=a} +function qPd(a){this.a=a} +function IPd(a){this.a=a} +function w$d(a){this.a=a} +function e_d(a){this.a=a} +function Q_d(a){this.b=a} +function c1d(a){this.a=a} +function c2d(a){this.a=a} +function l5d(a){this.a=a} +function I9d(a){this.a=a} +function L6d(a){this.c=a} +function t7d(a){this.e=a} +function pae(a){this.a=a} +function xae(a){this.a=a} +function Zde(a){this.a=a} +function Sde(a){this.d=a} +function mee(a){this.a=a} +function uje(a){this.a=a} +function Bte(a){this.a=a} +function Wse(a){this.e=a} +function Xsd(){this.a=0} +function Tsb(){akb(this)} +function bnb(){Pmb(this)} +function cHb(){bHb(this)} +function I2b(){A2b(this)} +function s2d(){this.c=d2d} +function Prc(a,b){a.b+=b} +function Uje(a,b){b.Wb(a)} +function UC(a){return a.a} +function nC(a){return a.a} +function BC(a){return a.a} +function TB(a){return a.a} +function _B(a){return a.a} +function Adb(a){return a.e} +function gC(){return null} +function MC(){return null} +function leb(){MId();OId()} +function qMb(a){a.b.Of(a.e)} +function A$b(a){a.b=new Ri} +function A8b(a,b){a.b=b-a.b} +function x8b(a,b){a.a=b-a.a} +function ZEb(a,b){a.push(b)} +function bFb(a,b){a.sort(b)} +function Q5c(a,b){b.jd(a.a)} +function Voc(a,b){Q3b(b,a)} +function tp(a,b,c){a.Yd(c,b)} +function Ss(a,b){a.e=b;b.b=a} +function im(a){_l();this.a=a} +function xq(a){_l();this.a=a} +function Gq(a){_l();this.a=a} +function Xq(a){tm();this.a=a} +function gA(a){fA();eA.le(a)} +function vA(){vA=geb;new Tsb} +function xz(){mz.call(this)} +function Ceb(){mz.call(this)} +function ueb(){xz.call(this)} +function yeb(){xz.call(this)} +function Hfb(){xz.call(this)} +function _fb(){xz.call(this)} +function cgb(){xz.call(this)} +function Ngb(){xz.call(this)} +function jib(){xz.call(this)} +function Jrb(){xz.call(this)} +function Srb(){xz.call(this)} +function Dvb(){xz.call(this)} +function Ied(){xz.call(this)} +function R1d(){this.a=this} +function k1d(){this.Bb|=256} +function vWb(){this.b=new Et} +function aFb(a,b){a.length=b} +function dyb(a,b){Rmb(a.a,b)} +function jNb(a,b){LKb(a.c,b)} +function qRc(a,b){Ysb(a.b,b)} +function VOd(a,b){UNd(a.a,b)} +function WOd(a,b){VNd(a.a,b)} +function eZd(a,b){qvd(a.e,b)} +function Cke(a){bge(a.c,a.b)} +function uj(a,b){a.kc().Nb(b)} +function Ufb(a){this.a=Zfb(a)} +function _sb(){this.a=new Tsb} +function $Ab(){this.a=new Tsb} +function xAb(){this.a=new dzb} +function gyb(){this.a=new bnb} +function BIb(){this.a=new bnb} +function GIb(){this.a=new bnb} +function wIb(){this.a=new pIb} +function gJb(){this.a=new DIb} +function TTb(){this.a=new DTb} +function jGb(){this.a=new fGb} +function qGb(){this.a=new kGb} +function q_b(){this.a=new bnb} +function E_b(){this.a=new bnb} +function EZb(){this.a=new bnb} +function J$b(){this.a=new bnb} +function YNb(){this.d=new bnb} +function lXb(){this.a=new RWb} +function y_b(){this.a=new _sb} +function k5b(){this.a=new Tsb} +function E0b(){this.b=new Tsb} +function jHc(){this.b=new bnb} +function ZNc(){this.e=new bnb} +function ahc(){this.a=new boc} +function UQc(){this.d=new bnb} +function uRc(){tRc.call(this)} +function BRc(){tRc.call(this)} +function VOc(){bnb.call(this)} +function web(){ueb.call(this)} +function Fyb(){gyb.call(this)} +function fKb(){RJb.call(this)} +function N$b(){J$b.call(this)} +function P2b(){I2b.call(this)} +function T2b(){P2b.call(this)} +function z3b(){I2b.call(this)} +function C3b(){z3b.call(this)} +function cUc(){aUc.call(this)} +function hUc(){aUc.call(this)} +function mUc(){aUc.call(this)} +function Hdd(){Ddd.call(this)} +function ACd(){$yd.call(this)} +function PCd(){$yd.call(this)} +function Ejd(){Yub.call(this)} +function LQd(){wQd.call(this)} +function lRd(){wQd.call(this)} +function MSd(){Tsb.call(this)} +function VSd(){Tsb.call(this)} +function eTd(){Tsb.call(this)} +function mXd(){HWd.call(this)} +function i1d(){_sb.call(this)} +function A1d(){k1d.call(this)} +function q4d(){dWd.call(this)} +function O5d(){Tsb.call(this)} +function R5d(){dWd.call(this)} +function lae(){Tsb.call(this)} +function Cae(){Tsb.call(this)} +function ome(){kUd.call(this)} +function Hme(){ome.call(this)} +function Nme(){kUd.call(this)} +function Gre(){Tqe.call(this)} +function aUc(){this.a=new _sb} +function nZc(){this.a=new Tsb} +function DZc(){this.a=new bnb} +function Ddd(){this.a=new Tsb} +function Oqd(){this.a=new Yub} +function Oed(){this.j=new bnb} +function obd(){this.a=new nbd} +function wQd(){this.a=new AQd} +function R5c(){this.a=new V5c} +function wb(){wb=geb;vb=new xb} +function Wk(){Wk=geb;Vk=new Xk} +function kl(){kl=geb;jl=new ll} +function ll(){Qk.call(this,'')} +function Xk(){Qk.call(this,'')} +function Dd(a){yd.call(this,a)} +function Hd(a){yd.call(this,a)} +function xh(a){th.call(this,a)} +function $h(a){Wc.call(this,a)} +function Qi(a){Wc.call(this,a)} +function wi(a){$h.call(this,a)} +function Sp(a){$h.call(this,a)} +function Js(a){$h.call(this,a)} +function Jp(a){Xo.call(this,a)} +function Qp(a){Xo.call(this,a)} +function dq(a){ho.call(this,a)} +function Fv(a){uv.call(this,a)} +function aw(a){Tr.call(this,a)} +function cw(a){Tr.call(this,a)} +function _w(a){Tr.call(this,a)} +function Mx(a){Gn.call(this,a)} +function Nx(a){Mx.call(this,a)} +function yz(a){nz.call(this,a)} +function aC(a){yz.call(this,a)} +function uC(){vC.call(this,{})} +function cC(){cC=geb;bC=new dC} +function zs(){zs=geb;ys=new As} +function Az(){Az=geb;zz=new nb} +function $z(){$z=geb;Zz=new bA} +function $A(){$A=geb;ZA=new aB} +function Ovb(a){Kvb();this.a=a} +function FKc(a){jKc();this.a=a} +function zud(a){nud();this.f=a} +function Bud(a){nud();this.f=a} +function Cde(a){KMd();this.a=a} +function Lyb(a){a.b=null;a.c=0} +function kz(a,b){a.e=b;hz(a,b)} +function NYb(a,b){a.a=b;PYb(a)} +function cLb(a,b,c){a.a[b.g]=c} +function zsd(a,b,c){Hsd(c,a,b)} +function shc(a,b){Xmc(b.i,a.n)} +function HCc(a,b){ICc(a).Cd(b)} +function yw(a,b){a.a.ec().Mc(b)} +function ns(a,b){return a.g-b.g} +function AUb(a,b){return a*a/b} +function Heb(a){return uFb(a),a} +function Kfb(a){return uFb(a),a} +function Mfb(a){return uFb(a),a} +function JC(a){return new hC(a)} +function LC(a){return new OC(a)} +function shb(a){return uFb(a),a} +function Chb(a){return uFb(a),a} +function teb(a){yz.call(this,a)} +function veb(a){yz.call(this,a)} +function zeb(a){yz.call(this,a)} +function Aeb(a){nz.call(this,a)} +function Ifb(a){yz.call(this,a)} +function agb(a){yz.call(this,a)} +function dgb(a){yz.call(this,a)} +function Mgb(a){yz.call(this,a)} +function Ogb(a){yz.call(this,a)} +function kib(a){yz.call(this,a)} +function Jed(a){yz.call(this,a)} +function Ked(a){yz.call(this,a)} +function CDd(a){yz.call(this,a)} +function Mle(a){yz.call(this,a)} +function Lqe(a){yz.call(this,a)} +function mob(a){uFb(a);this.a=a} +function yYb(a){sYb(a);return a} +function Nnb(a){Snb(a,a.length)} +function nmb(a){return a.b==a.c} +function Vyb(a){return !!a&&a.b} +function gLb(a){return !!a&&a.k} +function hLb(a){return !!a&&a.j} +function F_b(a,b,c){a.c.Ef(b,c)} +function Ts(a,b){a.be(b);b.ae(a)} +function Fy(a){_l();this.a=Qb(a)} +function Gb(){this.a=WD(Qb(pve))} +function jc(){throw Adb(new jib)} +function jn(){throw Adb(new jib)} +function Hh(){throw Adb(new jib)} +function Xi(){throw Adb(new jib)} +function Xj(){throw Adb(new jib)} +function Yj(){throw Adb(new jib)} +function Qz(){Qz=geb;!!(fA(),eA)} +function Qhb(){reb.call(this,'')} +function Rhb(){reb.call(this,'')} +function bib(){reb.call(this,'')} +function cib(){reb.call(this,'')} +function eib(a){veb.call(this,a)} +function xeb(a){veb.call(this,a)} +function Vgb(a){agb.call(this,a)} +function Lqb(a){xpb.call(this,a)} +function Sqb(a){Lqb.call(this,a)} +function irb(a){Upb.call(this,a)} +function pc(a){qc.call(this,a,0)} +function Ri(){Si.call(this,12,3)} +function WC(a,b){return xfb(a,b)} +function cFb(a,b){return dD(a,b)} +function Reb(a,b){return a.a-b.a} +function afb(a,b){return a.a-b.a} +function Wgb(a,b){return a.a-b.a} +function pC(b,a){return a in b.a} +function Vvb(a){return a.a?a.b:0} +function cwb(a){return a.a?a.b:0} +function Fxb(a,b,c){b.Cd(a.a[c])} +function Kxb(a,b,c){b.Pe(a.a[c])} +function uKb(a,b){a.b=new sjd(b)} +function QGb(a,b){a.b=b;return a} +function RGb(a,b){a.c=b;return a} +function SGb(a,b){a.f=b;return a} +function TGb(a,b){a.g=b;return a} +function yJb(a,b){a.a=b;return a} +function zJb(a,b){a.f=b;return a} +function AJb(a,b){a.k=b;return a} +function WNb(a,b){a.a=b;return a} +function XNb(a,b){a.e=b;return a} +function BYb(a,b){a.e=b;return a} +function CYb(a,b){a.f=b;return a} +function BRb(a,b){a.b=true;a.d=b} +function WNc(a,b){return a.b-b.b} +function KSc(a,b){return a.g-b.g} +function pmc(a,b){return a?0:b-1} +function qKc(a,b){return a?0:b-1} +function pKc(a,b){return a?b-1:0} +function uVc(a,b){return a.s-b.s} +function Xed(a,b){return b.rg(a)} +function Xfd(a,b){a.b=b;return a} +function Wfd(a,b){a.a=b;return a} +function Yfd(a,b){a.c=b;return a} +function Zfd(a,b){a.d=b;return a} +function $fd(a,b){a.e=b;return a} +function _fd(a,b){a.f=b;return a} +function mgd(a,b){a.a=b;return a} +function ngd(a,b){a.b=b;return a} +function ogd(a,b){a.c=b;return a} +function Khd(a,b){a.c=b;return a} +function Jhd(a,b){a.b=b;return a} +function Lhd(a,b){a.d=b;return a} +function Mhd(a,b){a.e=b;return a} +function Nhd(a,b){a.f=b;return a} +function Ohd(a,b){a.g=b;return a} +function Phd(a,b){a.a=b;return a} +function Qhd(a,b){a.i=b;return a} +function Rhd(a,b){a.j=b;return a} +function coc(a,b){Mnc();P3b(b,a)} +function bbd(a,b,c){_ad(a.a,b,c)} +function Fjd(a){Zub.call(this,a)} +function TRb(a){SRb.call(this,a)} +function pLc(a){CIc.call(this,a)} +function ILc(a){CIc.call(this,a)} +function gLd(a){ZHd.call(this,a)} +function DPd(a){xPd.call(this,a)} +function FPd(a){xPd.call(this,a)} +function x2b(){y2b.call(this,'')} +function pjd(){this.a=0;this.b=0} +function ATc(){this.b=0;this.a=0} +function lXd(a,b){a.b=0;bWd(a,b)} +function Kqd(a,b){a.k=b;return a} +function Lqd(a,b){a.j=b;return a} +function vfe(a,b){a.c=b;a.b=true} +function Etb(){Etb=geb;Dtb=Gtb()} +function bvd(){bvd=geb;avd=OAd()} +function dvd(){dvd=geb;cvd=aCd()} +function MId(){MId=geb;LId=ygd()} +function jTd(){jTd=geb;iTd=Qae()} +function Ole(){Ole=geb;Nle=vne()} +function Qle(){Qle=geb;Ple=Cne()} +function mfb(a){return a.e&&a.e()} +function FD(a){return a.l|a.m<<22} +function Oc(a,b){return a.c._b(b)} +function En(a,b){return Wv(a.b,b)} +function Vd(a){return !a?null:a.d} +function Vv(a){return !a?null:a.g} +function $v(a){return !a?null:a.i} +function nfb(a){lfb(a);return a.o} +function Khb(a,b){a.a+=b;return a} +function Lhb(a,b){a.a+=b;return a} +function Ohb(a,b){a.a+=b;return a} +function Uhb(a,b){a.a+=b;return a} +function _wb(a,b){while(a.Bd(b));} +function atb(a){this.a=new Usb(a)} +function $tb(){throw Adb(new jib)} +function qpb(){throw Adb(new jib)} +function rpb(){throw Adb(new jib)} +function spb(){throw Adb(new jib)} +function vpb(){throw Adb(new jib)} +function Opb(){throw Adb(new jib)} +function yAb(a){this.a=new ezb(a)} +function H2c(){this.a=new Wed(s0)} +function TVc(){this.b=new Wed(H$)} +function l6c(){this.a=new Wed(V0)} +function $ad(){this.b=new Wed(I1)} +function nbd(){this.b=new Wed(I1)} +function T2c(a){this.a=0;this.b=a} +function Bib(a){tib();vib(this,a)} +function QDb(a){LCb(a);return a.a} +function dvb(a){return a.b!=a.d.c} +function AMc(a,b){return a.d[b.p]} +function ued(a,b){return ned(a,b)} +function $Eb(a,b,c){a.splice(b,c)} +function ixb(a,b){while(a.Re(b));} +function NKb(a){a.c?MKb(a):OKb(a)} +function mQd(){throw Adb(new jib)} +function nQd(){throw Adb(new jib)} +function oQd(){throw Adb(new jib)} +function pQd(){throw Adb(new jib)} +function qQd(){throw Adb(new jib)} +function rQd(){throw Adb(new jib)} +function sQd(){throw Adb(new jib)} +function tQd(){throw Adb(new jib)} +function uQd(){throw Adb(new jib)} +function vQd(){throw Adb(new jib)} +function zue(){throw Adb(new Dvb)} +function Aue(){throw Adb(new Dvb)} +function oue(a){this.a=new Dte(a)} +function Dte(a){Cte(this,a,sse())} +function cve(a){return !a||bve(a)} +function Cqe(a){return xqe[a]!=-1} +function Yz(){Nz!=0&&(Nz=0);Pz=-1} +function beb(){_db==null&&(_db=[])} +function eg(a,b){zf.call(this,a,b)} +function gg(a,b){eg.call(this,a,b)} +function Nj(a,b){this.a=a;this.b=b} +function hk(a,b){this.a=a;this.b=b} +function nk(a,b){this.a=a;this.b=b} +function pk(a,b){this.a=a;this.b=b} +function xk(a,b){this.a=a;this.b=b} +function zk(a,b){this.a=a;this.b=b} +function Kk(a,b){this.a=a;this.b=b} +function ne(a,b){this.e=a;this.d=b} +function Hf(a,b){this.b=a;this.c=b} +function cp(a,b){this.b=a;this.a=b} +function Cp(a,b){this.b=a;this.a=b} +function qr(a,b){this.b=a;this.a=b} +function Rr(a,b){this.b=a;this.a=b} +function vr(a,b){this.a=a;this.b=b} +function su(a,b){this.a=a;this.b=b} +function Hu(a,b){this.a=a;this.f=b} +function gp(a,b){this.g=a;this.i=b} +function qs(a,b){this.f=a;this.g=b} +function Gv(a,b){this.b=a;this.c=b} +function Wc(a){Lb(a.dc());this.c=a} +function Ex(a,b){this.a=a;this.b=b} +function ey(a,b){this.a=a;this.b=b} +function pv(a){this.a=RD(Qb(a),15)} +function uv(a){this.a=RD(Qb(a),15)} +function nw(a){this.a=RD(Qb(a),85)} +function rf(a){this.b=RD(Qb(a),85)} +function Tr(a){this.b=RD(Qb(a),51)} +function uB(){this.q=new $wnd.Date} +function CC(a,b){this.a=a;this.b=b} +function Bt(a,b){return Ujb(a.b,b)} +function tpb(a,b){return a.b.Hc(b)} +function upb(a,b){return a.b.Ic(b)} +function wpb(a,b){return a.b.Qc(b)} +function Pqb(a,b){return a.b.Hc(b)} +function pqb(a,b){return a.c.uc(b)} +function rqb(a,b){return pb(a.c,b)} +function Zsb(a,b){return a.a._b(b)} +function Xp(a,b){return a>b&&b<hwe} +function bkb(a){return a.f.c+a.i.c} +function IC(a){return WB(),a?VB:UB} +function Usb(a){ckb.call(this,a,0)} +function dzb(){ezb.call(this,null)} +function Osb(a){this.c=a;Lsb(this)} +function Yub(){Lub(this);Xub(this)} +function gib(){gib=geb;fib=new oeb} +function Qob(){Qob=geb;Pob=new Rob} +function Tvb(){Tvb=geb;Svb=new Xvb} +function bwb(){bwb=geb;awb=new dwb} +function SAb(){SAb=geb;RAb=new VAb} +function rDb(){NCb.call(this,null)} +function xDb(){xDb=geb;wDb=new KEb} +function FDb(a,b){LCb(a);a.a.Nb(b)} +function sAb(a,b){return a.a.Xc(b)} +function tAb(a,b){return a.a.Yc(b)} +function uAb(a,b){return a.a.$c(b)} +function vAb(a,b){return a.a._c(b)} +function JBb(a,b){return a.Gc(b),a} +function KBb(a,b){return ye(a,b),a} +function m_d(a,b){pLd(xYd(a.a),b)} +function r_d(a,b){pLd(xYd(a.a),b)} +function EBb(a,b){a.Gc(b);return a} +function hGb(a,b){a.a.f=b;return a} +function nGb(a,b){a.a.d=b;return a} +function oGb(a,b){a.a.g=b;return a} +function pGb(a,b){a.a.j=b;return a} +function sIb(a,b){a.a.a=b;return a} +function tIb(a,b){a.a.d=b;return a} +function uIb(a,b){a.a.e=b;return a} +function vIb(a,b){a.a.g=b;return a} +function fJb(a,b){a.a.f=b;return a} +function KJb(a){a.b=false;return a} +function wGb(){wGb=geb;vGb=new xGb} +function VRb(){VRb=geb;URb=new WRb} +function zXb(){zXb=geb;yXb=new FXb} +function kYb(){kYb=geb;jYb=new lYb} +function pYb(){pYb=geb;oYb=new QYb} +function NZb(){NZb=geb;MZb=new SZb} +function g0b(){g0b=geb;f0b=new l0b} +function i1b(){i1b=geb;h1b=new X1b} +function s7b(){s7b=geb;r7b=new C7b} +function H5b(){H5b=geb;G5b=new pjd} +function Hcc(){Hcc=geb;Gcc=new Ncc} +function Wjc(){Wjc=geb;Vjc=new Jlc} +function mqc(){mqc=geb;lqc=new Aqc} +function GCc(){GCc=geb;FCc=new Yrd} +function sbd(){sbd=geb;rbd=new ubd} +function Cbd(){Cbd=geb;Bbd=new Dbd} +function _cd(){_cd=geb;$cd=new cdd} +function GGc(){yGc();this.c=new Ri} +function ubd(){qs.call(this,DBe,0)} +function Mfd(a,b,c){$jb(a.d,b.f,c)} +function bNb(a,b,c,d){aNb(a,d,b,c)} +function V6b(a,b,c,d){$6b(d,a,b,c)} +function vcc(a,b,c,d){wcc(d,a,b,c)} +function Dgd(a,b){dub(a.c.c,b.b,b)} +function Cgd(a,b){dub(a.c.b,b.c,b)} +function BYc(a){return a.e.b+a.f.b} +function AYc(a){return a.e.a+a.f.a} +function N1d(a){return a.b?a.b:a.a} +function yTc(a){return (a.c+a.a)/2} +function b2d(a,b){return GA(a.a,b)} +function rfd(a,b){a.a=b.g;return a} +function hTd(){hTd=geb;gTd=new Cae} +function cTd(){cTd=geb;bTd=new eTd} +function lud(){lud=geb;kud=new Yud} +function $Sd(){$Sd=geb;ZSd=new _Sd} +function TSd(){TSd=geb;SSd=new VSd} +function YSd(){YSd=geb;XSd=new O5d} +function PRd(){PRd=geb;ORd=new Tsb} +function N2d(){N2d=geb;M2d=new Uhe} +function j3d(){j3d=geb;i3d=new Yhe} +function Gie(){Gie=geb;Fie=new Hie} +function nke(){nke=geb;mke=new rke} +function uue(){uue=geb;tue=new Cue} +function Tae(){Tae=geb;Rae=new bnb} +function _v(a){return RD(a,44).ld()} +function Akb(a){return a.b<a.d.gc()} +function meb(b,a){return a.split(b)} +function Idb(a,b){return Ddb(a,b)>0} +function Ldb(a,b){return Ddb(a,b)<0} +function Urb(a,b){return Bsb(a.a,b)} +function Beb(a,b){oz.call(this,a,b)} +function Qx(a){Px();ho.call(this,a)} +function Lnb(a,b){Pnb(a,a.length,b)} +function Mnb(a,b){Rnb(a,a.length,b)} +function Ktb(a,b){return a.a.get(b)} +function bub(a,b){return Ujb(a.e,b)} +function Zxb(a){return uFb(a),false} +function zw(a){this.a=RD(Qb(a),229)} +function $wb(a){Swb.call(this,a,21)} +function dAb(a,b){qs.call(this,a,b)} +function yBb(a,b){qs.call(this,a,b)} +function ssb(a,b){this.b=a;this.a=b} +function xlb(a,b){this.d=a;this.e=b} +function jEb(a,b){this.a=a;this.b=b} +function pEb(a,b){this.a=a;this.b=b} +function vEb(a,b){this.a=a;this.b=b} +function BEb(a,b){this.a=a;this.b=b} +function TFb(a,b){this.a=a;this.b=b} +function QEb(a,b){this.b=a;this.a=b} +function sHb(a,b){this.b=a;this.a=b} +function EHb(a,b){qs.call(this,a,b)} +function MHb(a,b){qs.call(this,a,b)} +function jIb(a,b){qs.call(this,a,b)} +function $Jb(a,b){qs.call(this,a,b)} +function FKb(a,b){qs.call(this,a,b)} +function wLb(a,b){qs.call(this,a,b)} +function nOb(a,b){qs.call(this,a,b)} +function kPb(a,b){this.b=a;this.a=b} +function JPb(a,b){qs.call(this,a,b)} +function fRb(a,b){this.b=a;this.a=b} +function JRb(a,b){qs.call(this,a,b)} +function OTb(a,b){this.b=a;this.a=b} +function UUb(a,b){qs.call(this,a,b)} +function BWb(a,b){qs.call(this,a,b)} +function tXb(a,b){qs.call(this,a,b)} +function XEb(a,b,c){a.splice(b,0,c)} +function pr(a,b,c){a.Mb(c)&&b.Cd(c)} +function lEb(a,b,c){b.Pe(a.a.Ye(c))} +function rEb(a,b,c){b.Dd(a.a.Ze(c))} +function xEb(a,b,c){b.Cd(a.a.Kb(c))} +function eYb(a,b){return Csb(a.c,b)} +function cGb(a,b){return Csb(a.e,b)} +function qZb(a,b){qs.call(this,a,b)} +function V$b(a,b){qs.call(this,a,b)} +function s3b(a,b){qs.call(this,a,b)} +function Q8b(a,b){qs.call(this,a,b)} +function icc(a,b){qs.call(this,a,b)} +function xec(a,b){qs.call(this,a,b)} +function gic(a,b){this.a=a;this.b=b} +function Xic(a,b){this.a=a;this.b=b} +function h4b(a,b){this.a=a;this.b=b} +function vjc(a,b){this.a=a;this.b=b} +function xjc(a,b){this.a=a;this.b=b} +function Hjc(a,b){this.a=a;this.b=b} +function hjc(a,b){this.b=a;this.a=b} +function Jjc(a,b){this.b=a;this.a=b} +function _Yb(a,b){this.b=a;this.a=b} +function eZb(a,b){this.c=a;this.d=b} +function Q1b(a,b){this.e=a;this.d=b} +function Tjc(a,b){this.a=a;this.b=b} +function ulc(a,b){this.a=a;this.b=b} +function Elc(a,b){this.a=a;this.b=b} +function fqc(a,b){this.b=a;this.a=b} +function smc(a,b){this.b=b;this.c=a} +function fnc(a,b){qs.call(this,a,b)} +function Cnc(a,b){qs.call(this,a,b)} +function koc(a,b){qs.call(this,a,b)} +function ktc(a,b){qs.call(this,a,b)} +function ctc(a,b){qs.call(this,a,b)} +function utc(a,b){qs.call(this,a,b)} +function Ftc(a,b){qs.call(this,a,b)} +function Rtc(a,b){qs.call(this,a,b)} +function _tc(a,b){qs.call(this,a,b)} +function iuc(a,b){qs.call(this,a,b)} +function vuc(a,b){qs.call(this,a,b)} +function Duc(a,b){qs.call(this,a,b)} +function Puc(a,b){qs.call(this,a,b)} +function _uc(a,b){qs.call(this,a,b)} +function pvc(a,b){qs.call(this,a,b)} +function yvc(a,b){qs.call(this,a,b)} +function Hvc(a,b){qs.call(this,a,b)} +function Pvc(a,b){qs.call(this,a,b)} +function dxc(a,b){qs.call(this,a,b)} +function bDc(a,b){qs.call(this,a,b)} +function nDc(a,b){qs.call(this,a,b)} +function yDc(a,b){qs.call(this,a,b)} +function LDc(a,b){qs.call(this,a,b)} +function bEc(a,b){qs.call(this,a,b)} +function lEc(a,b){qs.call(this,a,b)} +function tEc(a,b){qs.call(this,a,b)} +function CEc(a,b){qs.call(this,a,b)} +function LEc(a,b){qs.call(this,a,b)} +function UEc(a,b){qs.call(this,a,b)} +function mFc(a,b){qs.call(this,a,b)} +function vFc(a,b){qs.call(this,a,b)} +function EFc(a,b){qs.call(this,a,b)} +function SKc(a,b){qs.call(this,a,b)} +function cNc(a,b){this.b=a;this.a=b} +function tNc(a,b){qs.call(this,a,b)} +function QOc(a,b){this.a=a;this.b=b} +function ePc(a,b){this.a=a;this.b=b} +function LPc(a,b){this.a=a;this.b=b} +function xQc(a,b){qs.call(this,a,b)} +function FQc(a,b){qs.call(this,a,b)} +function MQc(a,b){this.a=a;this.b=b} +function FMc(a,b){dMc();return b!=a} +function Uvb(a){sFb(a.a);return a.b} +function qYb(a){rYb(a,a.c);return a} +function Itb(){Etb();return new Dtb} +function _ec(){Rec();this.a=new e6b} +function lSc(){dSc();this.a=new _sb} +function aRc(){WQc();this.b=new _sb} +function xRc(a,b){this.b=a;this.d=b} +function nVc(a,b){this.a=a;this.b=b} +function pVc(a,b){this.a=a;this.b=b} +function GWc(a,b){this.a=a;this.b=b} +function IXc(a,b){this.b=a;this.a=b} +function gTc(a,b){qs.call(this,a,b)} +function eVc(a,b){qs.call(this,a,b)} +function $Vc(a,b){qs.call(this,a,b)} +function XYc(a,b){qs.call(this,a,b)} +function MZc(a,b){qs.call(this,a,b)} +function t_c(a,b){qs.call(this,a,b)} +function B_c(a,b){qs.call(this,a,b)} +function z2c(a,b){qs.call(this,a,b)} +function h3c(a,b){qs.call(this,a,b)} +function $3c(a,b){qs.call(this,a,b)} +function i4c(a,b){qs.call(this,a,b)} +function l5c(a,b){qs.call(this,a,b)} +function v5c(a,b){qs.call(this,a,b)} +function g6c(a,b){qs.call(this,a,b)} +function A6c(a,b){qs.call(this,a,b)} +function a7c(a,b){qs.call(this,a,b)} +function B8c(a,b){qs.call(this,a,b)} +function d9c(a,b){qs.call(this,a,b)} +function D9c(a,b){qs.call(this,a,b)} +function tad(a,b){qs.call(this,a,b)} +function hbd(a,b){qs.call(this,a,b)} +function Nbd(a,b){qs.call(this,a,b)} +function Ybd(a,b){qs.call(this,a,b)} +function ndd(a,b){qs.call(this,a,b)} +function z1c(a,b){this.b=a;this.a=b} +function B1c(a,b){this.b=a;this.a=b} +function d2c(a,b){this.b=a;this.a=b} +function f2c(a,b){this.b=a;this.a=b} +function m9c(a,b){this.a=a;this.b=b} +function xed(a,b){this.a=a;this.b=b} +function ffd(a,b){this.a=a;this.b=b} +function rjd(a,b){this.a=a;this.b=b} +function Sjd(a,b){qs.call(this,a,b)} +function Zhd(a,b){qs.call(this,a,b)} +function lid(a,b){qs.call(this,a,b)} +function vkd(a,b){qs.call(this,a,b)} +function Gmd(a,b){qs.call(this,a,b)} +function Pmd(a,b){qs.call(this,a,b)} +function Zmd(a,b){qs.call(this,a,b)} +function jnd(a,b){qs.call(this,a,b)} +function Gnd(a,b){qs.call(this,a,b)} +function Rnd(a,b){qs.call(this,a,b)} +function eod(a,b){qs.call(this,a,b)} +function qod(a,b){qs.call(this,a,b)} +function Eod(a,b){qs.call(this,a,b)} +function Qod(a,b){qs.call(this,a,b)} +function upd(a,b){qs.call(this,a,b)} +function Rpd(a,b){qs.call(this,a,b)} +function eqd(a,b){qs.call(this,a,b)} +function nqd(a,b){qs.call(this,a,b)} +function vqd(a,b){qs.call(this,a,b)} +function Hrd(a,b){qs.call(this,a,b)} +function esd(a,b){this.a=a;this.b=b} +function gsd(a,b){this.a=a;this.b=b} +function isd(a,b){this.a=a;this.b=b} +function Osd(a,b){this.a=a;this.b=b} +function Qsd(a,b){this.a=a;this.b=b} +function Ssd(a,b){this.a=a;this.b=b} +function Ptd(a,b){this.a=a;this.b=b} +function JEd(a,b){this.a=a;this.b=b} +function KEd(a,b){this.a=a;this.b=b} +function MEd(a,b){this.a=a;this.b=b} +function NEd(a,b){this.a=a;this.b=b} +function QEd(a,b){this.a=a;this.b=b} +function REd(a,b){this.a=a;this.b=b} +function SEd(a,b){this.b=a;this.a=b} +function TEd(a,b){this.b=a;this.a=b} +function bFd(a,b){this.b=a;this.a=b} +function dFd(a,b){this.b=a;this.a=b} +function fFd(a,b){this.a=a;this.b=b} +function hFd(a,b){this.a=a;this.b=b} +function utd(a,b){qs.call(this,a,b)} +function sFd(a,b){this.a=a;this.b=b} +function uFd(a,b){this.a=a;this.b=b} +function bGd(a,b){qs.call(this,a,b)} +function uId(a,b){this.f=a;this.c=b} +function Ofd(a,b){return Csb(a.g,b)} +function Tqc(a,b){return Csb(b.b,a)} +function HPd(a,b){return QNd(a.a,b)} +function Idd(a,b){return -a.b.af(b)} +function IId(a,b){!!a&&Zjb(CId,a,b)} +function yWd(a,b){a.i=null;zWd(a,b)} +function kEd(a,b,c){pDd(b,KDd(a,c))} +function lEd(a,b,c){pDd(b,KDd(a,c))} +function mFd(a,b){vEd(a.a,RD(b,58))} +function _Mc(a,b){GMc(a.a,RD(b,12))} +function KTd(a,b){this.a=a;this.b=b} +function NTd(a,b){this.a=a;this.b=b} +function B5d(a,b){this.a=a;this.b=b} +function Z6d(a,b){this.a=a;this.b=b} +function Ble(a,b){this.a=a;this.b=b} +function afe(a,b){this.d=a;this.b=b} +function wfe(a,b){this.e=a;this.a=b} +function Eke(a,b){this.b=a;this.c=b} +function zNd(a,b){this.i=a;this.g=b} +function kZd(a,b){this.d=a;this.e=b} +function ave(a,b){eve(new dMd(a),b)} +function Dke(a){return pge(a.c,a.b)} +function Wd(a){return !a?null:a.md()} +function dE(a){return a==null?null:a} +function bE(a){return typeof a===jve} +function $D(a){return typeof a===hve} +function _D(a){return typeof a===ive} +function Gdb(a,b){return Ddb(a,b)==0} +function Jdb(a,b){return Ddb(a,b)>=0} +function Pdb(a,b){return Ddb(a,b)!=0} +function ar(a,b){return zr(a.Kc(),b)} +function Qm(a,b){return a.Rd().Xb(b)} +function kg(a){ig(a);return a.d.gc()} +function fE(a){CFb(a==null);return a} +function Mhb(a,b){a.a+=''+b;return a} +function Nhb(a,b){a.a+=''+b;return a} +function Whb(a,b){a.a+=''+b;return a} +function Yhb(a,b){a.a+=''+b;return a} +function Zhb(a,b){a.a+=''+b;return a} +function Vhb(a,b){return a.a+=''+b,a} +function Pfb(a){return ''+(uFb(a),a)} +function Vsb(a){akb(this);Ld(this,a)} +function YFc(){RFc();UFc.call(this)} +function pxb(a,b){kxb.call(this,a,b)} +function txb(a,b){kxb.call(this,a,b)} +function xxb(a,b){kxb.call(this,a,b)} +function Oub(a,b){Pub(a,b,a.c.b,a.c)} +function Nub(a,b){Pub(a,b,a.a,a.a.a)} +function Iob(a){tFb(a,0);return null} +function Xvb(){this.b=0;this.a=false} +function dwb(){this.b=0;this.a=false} +function Et(){this.b=new Usb(Sv(12))} +function pMb(){pMb=geb;oMb=ss(nMb())} +function ncc(){ncc=geb;mcc=ss(lcc())} +function aZc(){aZc=geb;_Yc=ss($Yc())} +function WA(){WA=geb;vA();VA=new Tsb} +function hjd(a){a.a=0;a.b=0;return a} +function qfd(a,b){a.a=b.g+1;return a} +function yNd(a,b){aMd.call(this,a,b)} +function lGd(a,b){kGd.call(this,a,b)} +function N$d(a,b){zNd.call(this,a,b)} +function Whe(a,b){Q2d.call(this,a,b)} +function She(a,b){Phe.call(this,a,b)} +function RRd(a,b){PRd();Zjb(ORd,a,b)} +function sB(a,b){a.q.setTime(Xdb(b))} +function Xz(a){$wnd.clearTimeout(a)} +function cr(a){return Qb(a),new Dl(a)} +function mb(a,b){return dE(a)===dE(b)} +function Mw(a,b){return a.a.a.a.cc(b)} +function qeb(a,b){return zhb(a.a,0,b)} +function SSb(a){return MSb(RD(a,74))} +function Nfb(a){return eE((uFb(a),a))} +function Ofb(a){return eE((uFb(a),a))} +function gD(a){return hD(a.l,a.m,a.h)} +function egb(a,b){return hgb(a.a,b.a)} +function ygb(a,b){return Agb(a.a,b.a)} +function Sfb(a,b){return Qfb(a.a,b.a)} +function qhb(a,b){return a.indexOf(b)} +function nOc(a,b){return a.j[b.p]==2} +function cz(a,b){return a==b?0:a?1:-1} +function AB(a){return a<10?'0'+a:''+a} +function Kdb(a){return typeof a===ive} +function oZb(a){return a==jZb||a==mZb} +function pZb(a){return a==jZb||a==kZb} +function ELb(a,b){return hgb(a.g,b.g)} +function Q4b(a){return Wmb(a.b.b,a,0)} +function Q2b(){J2b.call(this,0,0,0,0)} +function Iub(){ctb.call(this,new gub)} +function Znb(a,b){Wnb(a,0,a.length,b)} +function Eyb(a,b){Rmb(a.a,b);return b} +function Fkc(a,b){lkc();return b.a+=a} +function Hkc(a,b){lkc();return b.a+=a} +function Gkc(a,b){lkc();return b.c+=a} +function ied(a,b){Rmb(a.c,b);return a} +function Ped(a,b){ofd(a.a,b);return a} +function ttb(a){this.a=Itb();this.b=a} +function Ntb(a){this.a=Itb();this.b=a} +function sjd(a){this.a=a.a;this.b=a.b} +function Dl(a){this.a=a;zl.call(this)} +function Gl(a){this.a=a;zl.call(this)} +function Tid(){Uid.call(this,0,0,0,0)} +function vfd(a){return ofd(new ufd,a)} +function Ksd(a){return iyd(RD(a,123))} +function Mvd(a){return a.vh()&&a.wh()} +function Dod(a){return a!=zod&&a!=Aod} +function Dmd(a){return a==ymd||a==zmd} +function Emd(a){return a==Bmd||a==xmd} +function xDc(a){return a==tDc||a==sDc} +function yrc(a,b){return hgb(a.g,b.g)} +function Yfe(a,b){return new Phe(b,a)} +function Zfe(a,b){return new Phe(b,a)} +function lr(a){return Dr(a.b.Kc(),a.a)} +function IXd(a,b){yXd(a,b);zXd(a,a.D)} +function Uxd(a,b,c){Vxd(a,b);Wxd(a,c)} +function zyd(a,b,c){Cyd(a,b);Ayd(a,c)} +function Byd(a,b,c){Dyd(a,b);Eyd(a,c)} +function Gzd(a,b,c){Hzd(a,b);Izd(a,c)} +function Nzd(a,b,c){Ozd(a,b);Pzd(a,c)} +function eh(a,b,c){bh.call(this,a,b,c)} +function zId(a){uId.call(this,a,true)} +function nAb(){dAb.call(this,'Tail',3)} +function iAb(){dAb.call(this,'Head',1)} +function ejb(a){Pib();fjb.call(this,a)} +function A3b(a){J2b.call(this,a,a,a,a)} +function Pmb(a){a.c=$C(jJ,rve,1,0,5,1)} +function yRb(a){a.b&&CRb(a);return a.a} +function zRb(a){a.b&&CRb(a);return a.c} +function mBb(a,b){if(dBb){return}a.b=b} +function YCb(a,b){return a[a.length]=b} +function _Cb(a,b){return a[a.length]=b} +function l5b(a,b){return NGd(b,MCd(a))} +function m5b(a,b){return NGd(b,MCd(a))} +function DDd(a,b){return lp(Co(a.d),b)} +function EDd(a,b){return lp(Co(a.g),b)} +function FDd(a,b){return lp(Co(a.j),b)} +function mGd(a,b){kGd.call(this,a.b,b)} +function s0d(a,b){WGd(tYd(a.a),v0d(b))} +function B4d(a,b){WGd(o4d(a.a),E4d(b))} +function Asd(a,b,c){Byd(c,c.i+a,c.j+b)} +function eFc(a,b,c){bD(a.c[b.g],b.g,c)} +function zVd(a,b,c){RD(a.c,71).Gi(b,c)} +function LMd(a,b,c){bD(a,b,c);return c} +function DJb(a){Umb(a.Sf(),new HJb(a))} +function Gvb(a){return a!=null?tb(a):0} +function aOd(a){return a==null?0:tb(a)} +function iue(a){Vse();Wse.call(this,a)} +function Ug(a){this.a=a;Og.call(this,a)} +function Zy(){Zy=geb;$wnd.Math.log(2)} +function s7d(){s7d=geb;r7d=($Sd(),ZSd)} +function FRc(){FRc=geb;ERc=new Zrb(u3)} +function Hde(){Hde=geb;new Ide;new bnb} +function Ide(){new Tsb;new Tsb;new Tsb} +function yue(){throw Adb(new kib(bMe))} +function Nue(){throw Adb(new kib(bMe))} +function Bue(){throw Adb(new kib(cMe))} +function Que(){throw Adb(new kib(cMe))} +function Gp(a){this.a=a;rf.call(this,a)} +function Np(a){this.a=a;rf.call(this,a)} +function Sq(a,b){tm();this.a=a;this.b=b} +function Jh(a,b){Qb(b);Ih(a).Jc(new jx)} +function _mb(a,b){Ynb(a.c,a.c.length,b)} +function xnb(a){return a.a<a.c.c.length} +function Msb(a){return a.a<a.c.a.length} +function Wvb(a,b){return a.a?a.b:b.We()} +function hgb(a,b){return a<b?-1:a>b?1:0} +function Kgb(a,b){return Ddb(a,b)>0?a:b} +function hD(a,b,c){return {l:a,m:b,h:c}} +function Mvb(a,b){a.a!=null&&_Mc(b,a.a)} +function Lhc(a){Y0b(a,null);Z0b(a,null)} +function xkc(a,b,c){return Zjb(a.g,c,b)} +function bFc(a,b,c){return _Ec(b,c,a.c)} +function jOc(a,b,c){return Zjb(a.k,c,b)} +function pOc(a,b,c){qOc(a,b,c);return c} +function FOc(a,b){dOc();return b.n.b+=a} +function lUb(a){VTb.call(this);this.b=a} +function y2b(a){v2b.call(this);this.a=a} +function kAb(){dAb.call(this,'Range',2)} +function $Fb(a){this.b=a;this.a=new bnb} +function WQb(a){this.b=new gRb;this.a=a} +function Lub(a){a.a=new svb;a.c=new svb} +function nrc(a){a.a=new Tsb;a.d=new Tsb} +function $Sc(a){_Sc(a,null);aTc(a,null)} +function a2d(a,b){return xA(a.a,b,null)} +function Cdd(a,b){return Zjb(a.a,b.a,b)} +function ajd(a){return new rjd(a.a,a.b)} +function Pid(a){return new rjd(a.c,a.d)} +function Qid(a){return new rjd(a.c,a.d)} +function Ake(a,b){return Tfe(a.c,a.b,b)} +function ZD(a,b){return a!=null&&QD(a,b)} +function br(a,b){return Jr(a.Kc(),b)!=-1} +function Hr(a){return a.Ob()?a.Pb():null} +function _p(a){this.b=(yob(),new uqb(a))} +function zke(a){this.a=a;Tsb.call(this)} +function Uhe(){Q2d.call(this,null,null)} +function Yhe(){p3d.call(this,null,null)} +function As(){qs.call(this,'INSTANCE',0)} +function dXb(){_Wb();this.a=new Wed(UP)} +function Hhb(a){return Ihb(a,0,a.length)} +function Rv(a,b){return new ew(a.Kc(),b)} +function $sb(a,b){return a.a.Bc(b)!=null} +function hZd(a,b){sLd(a);a.Gc(RD(b,15))} +function ONd(a,b,c){a.c.bd(b,RD(c,136))} +function eOd(a,b,c){a.c.Ui(b,RD(c,136))} +function eub(a,b){if(a.c){rub(b);qub(b)}} +function oB(a,b){a.q.setHours(b);mB(a,b)} +function vTb(a,b){Zid(b,a.a.a.a,a.a.a.b)} +function tKb(a,b,c,d){bD(a.a[b.g],c.g,d)} +function oKb(a,b,c){return a.a[b.g][c.g]} +function AIc(a,b){return a.e[b.c.p][b.p]} +function TIc(a,b){return a.c[b.c.p][b.p]} +function pJc(a,b){return a.a[b.c.p][b.p]} +function mOc(a,b){return a.j[b.p]=AOc(b)} +function wAb(a,b){return a.a.Bc(b)!=null} +function wXc(a,b){return Kfb(UD(b.a))<=a} +function xXc(a,b){return Kfb(UD(b.a))>=a} +function vhd(a,b){return jhb(a.f,b.Pg())} +function cjd(a,b){return a.a*b.a+a.b*b.b} +function Wsd(a,b){return a.a<Qeb(b)?-1:1} +function gGd(a,b){return jhb(a.b,b.Pg())} +function xIc(a,b,c){return c?b!=0:b!=a-1} +function Mwb(a,b,c){a.a=b^1502;a.b=c^Mxe} +function ljd(a,b,c){a.a=b;a.b=c;return a} +function ijd(a,b){a.a*=b;a.b*=b;return a} +function Rmb(a,b){ZEb(a.c,b);return true} +function MHd(a,b,c){bD(a.g,b,c);return c} +function XZd(a,b,c){PZd.call(this,a,b,c)} +function _Zd(a,b,c){XZd.call(this,a,b,c)} +function aie(a,b,c){Kfe.call(this,a,b,c)} +function eie(a,b,c){Kfe.call(this,a,b,c)} +function gie(a,b,c){aie.call(this,a,b,c)} +function iie(a,b,c){XZd.call(this,a,b,c)} +function lie(a,b,c){_Zd.call(this,a,b,c)} +function vie(a,b,c){PZd.call(this,a,b,c)} +function zie(a,b,c){PZd.call(this,a,b,c)} +function Cie(a,b,c){vie.call(this,a,b,c)} +function ez(a){a.j=$C(mJ,Nve,319,0,0,1)} +function wmb(){this.a=$C(jJ,rve,1,8,5,1)} +function dWd(){this.Bb|=256;this.Bb|=512} +function dMd(a){this.i=a;this.f=this.i.j} +function Rue(a){this.c=a;this.a=this.c.a} +function zf(a,b){this.a=a;rf.call(this,b)} +function Eb(a,b){return Db(a,new bib,b).a} +function Lb(a){if(!a){throw Adb(new _fb)}} +function Ub(a){if(!a){throw Adb(new cgb)}} +function Txb(){Txb=geb;Txb();Sxb=new $xb} +function fke(){fke=geb;Gie();eke=new gke} +function Kvb(){Kvb=geb;Jvb=new Ovb(null)} +function OGd(a){Ivb(a,IIe);pzd(a,GGd(a))} +function mNd(a){a.a=RD(Ywd(a.b.a,4),129)} +function uNd(a){a.a=RD(Ywd(a.b.a,4),129)} +function Mg(a){a.b.Qb();--a.d.f.d;jg(a.d)} +function Zj(a){this.a=a;Aj.call(this,a.d)} +function ij(a,b){this.a=a;pc.call(this,b)} +function sj(a,b){this.a=a;pc.call(this,b)} +function Rj(a,b){this.a=a;pc.call(this,b)} +function Il(a,b){this.a=b;pc.call(this,a)} +function ap(a,b){this.a=b;Xo.call(this,a)} +function Ap(a,b){this.a=a;Xo.call(this,b)} +function Yr(a,b){this.a=b;Tr.call(this,a)} +function ew(a,b){this.a=b;Tr.call(this,a)} +function Mr(a,b){Qb(b);return new Yr(a,b)} +function ru(a,b){return new Ou(a.a,a.b,b)} +function rhb(a,b,c){return a.indexOf(b,c)} +function thb(a,b){return a.lastIndexOf(b)} +function Ghb(a){return a==null?vve:jeb(a)} +function Ez(a){return a==null?null:a.name} +function qD(a){return a.l+a.m*gxe+a.h*hxe} +function Gr(a){return dvb(a.a)?Fr(a):null} +function Shb(a){reb.call(this,(uFb(a),a))} +function dib(a){reb.call(this,(uFb(a),a))} +function dl(a){Qk.call(this,RD(Qb(a),34))} +function tl(a){Qk.call(this,RD(Qb(a),34))} +function Jub(a){ctb.call(this,new hub(a))} +function Upb(a){xpb.call(this,a);this.a=a} +function hqb(a){Ppb.call(this,a);this.a=a} +function jrb(a){Lqb.call(this,a);this.a=a} +function mz(){ez(this);gz(this);this.je()} +function Dzb(a){this.a=a;Plb.call(this,a)} +function Lvb(a){sFb(a.a!=null);return a.a} +function gGb(a,b){Rmb(b.a,a.a);return a.a} +function mGb(a,b){Rmb(b.b,a.a);return a.a} +function eJb(a,b){Rmb(b.a,a.a);return a.a} +function aib(a,b,c){peb(a,b,b,c);return a} +function EIb(a,b){++a.b;return Rmb(a.a,b)} +function FIb(a,b){++a.b;return Ymb(a.a,b)} +function NNb(a,b){return Qfb(a.c.d,b.c.d)} +function ZNb(a,b){return Qfb(a.c.c,b.c.c)} +function E9b(a,b){return Qfb(a.n.a,b.n.a)} +function B$b(a,b){return RD(Qc(a.b,b),15)} +function Jac(a,b){return a.n.b=(uFb(b),b)} +function Kac(a,b){return a.n.b=(uFb(b),b)} +function Csb(a,b){return !!b&&a.b[b.g]==b} +function k4b(a){return xnb(a.a)||xnb(a.b)} +function kFb(a){return a.$H||(a.$H=++iFb)} +function Nvb(a){return a.a!=null?a.a:null} +function uXc(a,b){return Qfb(a.e.b,b.e.b)} +function CXc(a,b){return Qfb(a.e.a,b.e.a)} +function ZEc(a,b,c){return $Ec(a,b,c,a.b)} +function aFc(a,b,c){return $Ec(a,b,c,a.c)} +function Ikc(a){lkc();return !!a&&!a.dc()} +function Yjc(){Wjc();this.b=new ckc(this)} +function tNb(){tNb=geb;sNb=new kGd(Xye,0)} +function Geb(){Geb=geb;Eeb=false;Feb=true} +function E8b(a){var b;b=a.a;a.a=a.b;a.b=b} +function Q2d(a,b){N2d();this.a=a;this.b=b} +function p3d(a,b){j3d();this.b=a;this.c=b} +function Fud(a,b){nud();this.f=b;this.d=a} +function qc(a,b){Sb(b,a);this.d=a;this.c=b} +function IXb(a,b){JXb.call(this,a,b,null)} +function Kg(a,b,c,d){yg.call(this,a,b,c,d)} +function mMd(a){this.d=a;dMd.call(this,a)} +function yMd(a){this.c=a;dMd.call(this,a)} +function BMd(a){this.c=a;mMd.call(this,a)} +function Zse(a){++Use;return new Kte(3,a)} +function ev(a){dk(a,iwe);return new cnb(a)} +function jA(a){fA();return parseInt(a)||-1} +function Fs(a){zs();return ws((Is(),Hs),a)} +function phb(a,b,c){return rhb(a,Fhb(b),c)} +function um(a,b){return new fq(a,a.gc(),b)} +function zj(a,b){return hn(a.c).Md().Xb(b)} +function hu(a,b,c){var d;d=a.fd(b);d.Rb(c)} +function tfd(a,b,c){RD(Med(a,b),21).Fc(c)} +function XOd(a,b,c){VNd(a.a,c);UNd(a.a,b)} +function aAd(a){ZD(a,158)&&RD(a,158).pi()} +function tub(a){uub.call(this,a,null,null)} +function Yvb(a){Tvb();this.b=a;this.a=true} +function ewb(a){bwb();this.b=a;this.a=true} +function Qub(a){sFb(a.b!=0);return a.a.a.c} +function Rub(a){sFb(a.b!=0);return a.c.b.c} +function Phb(a,b){peb(a,b,b+1,'');return a} +function nQb(a,b){return !!a.q&&Ujb(a.q,b)} +function vzb(a){return a.b=RD(Bkb(a.a),44)} +function os(a){return a.f!=null?a.f:''+a.g} +function ps(a){return a.f!=null?a.f:''+a.g} +function yUb(a,b){return a>0?b/(a*a):b*100} +function FUb(a,b){return a>0?b*b/a:b*b*100} +function $5b(a,b){return RD(cub(a.a,b),34)} +function doc(a,b){Mnc();return Rc(a,b.e,b)} +function NCc(a,b,c){GCc();return c.Mg(a,b)} +function L0c(a){B0c();return a.e.a+a.f.a/2} +function N0c(a,b,c){B0c();return c.e.a-a*b} +function V0c(a){B0c();return a.e.b+a.f.b/2} +function X0c(a,b,c){B0c();return c.e.b-a*b} +function _tb(a){a.d=new tub(a);a.e=new Tsb} +function x3c(){this.a=new Tp;this.b=new Tp} +function hmc(a){this.c=a;this.a=1;this.b=1} +function C$b(a){z$b();A$b(this);this.Ff(a)} +function Efd(a,b,c){Afd();a.pf(b)&&c.Cd(a)} +function Red(a,b,c){return Rmb(b,Ted(a,c))} +function Zid(a,b,c){a.a+=b;a.b+=c;return a} +function jjd(a,b,c){a.a*=b;a.b*=c;return a} +function mjd(a,b){a.a=b.a;a.b=b.b;return a} +function fjd(a){a.a=-a.a;a.b=-a.b;return a} +function njd(a,b,c){a.a-=b;a.b-=c;return a} +function Gjd(a){Yub.call(this);zjd(this,a)} +function Dbd(){qs.call(this,'GROW_TREE',0)} +function WRb(){qs.call(this,'POLYOMINO',0)} +function SVd(a,b,c){DVd.call(this,a,b,c,2)} +function r0d(a,b,c){VGd(tYd(a.a),b,v0d(c))} +function e3d(a,b){N2d();Q2d.call(this,a,b)} +function D3d(a,b){j3d();p3d.call(this,a,b)} +function F3d(a,b){j3d();D3d.call(this,a,b)} +function H3d(a,b){j3d();p3d.call(this,a,b)} +function PNd(a,b){return a.c.Fc(RD(b,136))} +function A4d(a,b,c){VGd(o4d(a.a),b,E4d(c))} +function Ard(a){this.c=a;Dyd(a,0);Eyd(a,0)} +function Z8d(a,b){s7d();N8d.call(this,a,b)} +function _8d(a,b){s7d();Z8d.call(this,a,b)} +function b9d(a,b){s7d();Z8d.call(this,a,b)} +function n9d(a,b){s7d();N8d.call(this,a,b)} +function d9d(a,b){s7d();b9d.call(this,a,b)} +function p9d(a,b){s7d();n9d.call(this,a,b)} +function v9d(a,b){s7d();N8d.call(this,a,b)} +function lge(a,b,c){return b.zl(a.e,a.c,c)} +function nge(a,b,c){return b.Al(a.e,a.c,c)} +function Wee(a,b,c){return tfe(Pee(a,b),c)} +function Age(a,b){return Vvd(a.e,RD(b,54))} +function _me(a){return a==null?null:Bqe(a)} +function dne(a){return a==null?null:Iqe(a)} +function gne(a){return a==null?null:jeb(a)} +function hne(a){return a==null?null:jeb(a)} +function TD(a){CFb(a==null||$D(a));return a} +function UD(a){CFb(a==null||_D(a));return a} +function WD(a){CFb(a==null||bE(a));return a} +function lfb(a){if(a.o!=null){return}Bfb(a)} +function lFb(a){if(!a){throw Adb(new _fb)}} +function pFb(a){if(!a){throw Adb(new yeb)}} +function sFb(a){if(!a){throw Adb(new Dvb)}} +function yFb(a){if(!a){throw Adb(new cgb)}} +function zmb(a){if(!a){throw Adb(new Jrb)}} +function jQd(){jQd=geb;iQd=new LQd;new lRd} +function u2c(){u2c=geb;t2c=new jGd('root')} +function d6d(){HWd.call(this);this.Bb|=txe} +function Pg(a,b){this.d=a;Lg(this);this.b=b} +function WCb(a,b){NCb.call(this,a);this.a=b} +function oDb(a,b){NCb.call(this,a);this.a=b} +function bh(a,b,c){lg.call(this,a,b,c,null)} +function fh(a,b,c){lg.call(this,a,b,c,null)} +function Mf(a,b){this.c=a;ne.call(this,a,b)} +function Uf(a,b){this.a=a;Mf.call(this,a,b)} +function wB(a){this.q=new $wnd.Date(Xdb(a))} +function OPb(a){if(a>8){return 0}return a+1} +function iBb(a,b){if(dBb){return}Rmb(a.a,b)} +function P5b(a,b){H5b();return n2b(b.d.i,a)} +function qdc(a,b){Zcc();return new xdc(b,a)} +function HAb(a,b,c){return a.Ne(b,c)<=0?c:b} +function IAb(a,b,c){return a.Ne(b,c)<=0?b:c} +function rgd(a,b){return RD(cub(a.b,b),143)} +function tgd(a,b){return RD(cub(a.c,b),233)} +function amc(a){return RD(Vmb(a.a,a.b),294)} +function Mid(a){return new rjd(a.c,a.d+a.a)} +function Jeb(a){return (uFb(a),a)?1231:1237} +function EPc(a){return dOc(),xDc(RD(a,203))} +function RMb(){RMb=geb;QMb=xsb((Qpd(),Ppd))} +function YQb(a,b){b.a?ZQb(a,b):wAb(a.a,b.b)} +function aJd(a,b,c){++a.j;a.tj();$Gd(a,b,c)} +function $Id(a,b,c){++a.j;a.qj(b,a.Zi(b,c))} +function B2d(a,b,c){var d;d=a.fd(b);d.Rb(c)} +function Bzd(a,b,c){c=xvd(a,b,6,c);return c} +function izd(a,b,c){c=xvd(a,b,3,c);return c} +function KCd(a,b,c){c=xvd(a,b,9,c);return c} +function SKb(a,b){Ivb(b,Pye);a.f=b;return a} +function bOd(a,b){return (b&lve)%a.d.length} +function Bke(a,b,c){return age(a.c,a.b,b,c)} +function ZLd(a,b){this.c=a;ZHd.call(this,b)} +function w0d(a,b){this.a=a;Q_d.call(this,b)} +function F4d(a,b){this.a=a;Q_d.call(this,b)} +function kGd(a,b){jGd.call(this,a);this.a=b} +function U6d(a,b){L6d.call(this,a);this.a=b} +function S9d(a,b){L6d.call(this,a);this.a=b} +function jQb(a){gQb.call(this,0,0);this.f=a} +function _hb(a,b,c){a.a+=Ihb(b,0,c);return a} +function _A(a){!a.a&&(a.a=new jB);return a.a} +function qlb(a,b){var c;c=a.e;a.e=b;return c} +function Clb(a,b){var c;c=b;return !!a.Fe(c)} +function Keb(a,b){Geb();return a==b?0:a?1:-1} +function Ikb(a,b){a.a.bd(a.b,b);++a.b;a.c=-1} +function hg(a){a.b?hg(a.b):a.f.c.zc(a.e,a.d)} +function aub(a){akb(a.e);a.d.b=a.d;a.d.a=a.d} +function VDb(a,b,c){xDb();HEb(a,b.Ve(a.a,c))} +function Xrb(a,b,c){return Wrb(a,RD(b,22),c)} +function WEb(a,b){return cFb(new Array(b),a)} +function Fgb(a){return Ydb(Udb(a,32))^Ydb(a)} +function XD(a){return String.fromCharCode(a)} +function Dz(a){return a==null?null:a.message} +function Rz(a,b,c){return a.apply(b,c);var d} +function Btb(a,b){var c;c=a[Jxe];c.call(a,b)} +function Ctb(a,b){var c;c=a[Jxe];c.call(a,b)} +function O5b(a,b){H5b();return !n2b(b.d.i,a)} +function R2b(a,b,c,d){J2b.call(this,a,b,c,d)} +function TJb(){RJb.call(this);this.a=new pjd} +function v2b(){this.n=new pjd;this.o=new pjd} +function kGb(){this.b=new pjd;this.c=new bnb} +function cUb(){this.a=new bnb;this.b=new bnb} +function kWb(){this.a=new DTb;this.b=new vWb} +function e6b(){this.b=new gub;this.a=new gub} +function jIc(){this.b=new _sb;this.a=new _sb} +function vYc(){this.b=new Tsb;this.a=new Tsb} +function fWc(){this.b=new TVc;this.a=new IVc} +function Yhc(){this.a=new yqc;this.b=new Sqc} +function lNc(){this.a=new bnb;this.d=new bnb} +function RJb(){this.n=new z3b;this.i=new Tid} +function hq(a){this.a=(dk(a,iwe),new cnb(a))} +function oq(a){this.a=(dk(a,iwe),new cnb(a))} +function tLd(a){return a<100?null:new gLd(a)} +function Lac(a,b){return a.n.a=(uFb(b),b)+10} +function Mac(a,b){return a.n.a=(uFb(b),b)+10} +function DYd(a,b){return b==a||PHd(sYd(b),a)} +function nae(a,b){return Zjb(a.a,b,'')==null} +function Hee(a,b){var c;c=b.qi(a.a);return c} +function $id(a,b){a.a+=b.a;a.b+=b.b;return a} +function ojd(a,b){a.a-=b.a;a.b-=b.b;return a} +function sfd(a){aFb(a.j.c,0);a.a=-1;return a} +function rCd(a,b,c){c=xvd(a,b,11,c);return c} +function SDd(a,b,c){c!=null&&Kzd(b,uEd(a,c))} +function TDd(a,b,c){c!=null&&Lzd(b,uEd(a,c))} +function G5d(a,b,c,d){C5d.call(this,a,b,c,d)} +function oie(a,b,c,d){C5d.call(this,a,b,c,d)} +function sie(a,b,c,d){oie.call(this,a,b,c,d)} +function Nie(a,b,c,d){Iie.call(this,a,b,c,d)} +function Pie(a,b,c,d){Iie.call(this,a,b,c,d)} +function Vie(a,b,c,d){Iie.call(this,a,b,c,d)} +function Tie(a,b,c,d){Pie.call(this,a,b,c,d)} +function $ie(a,b,c,d){Pie.call(this,a,b,c,d)} +function Yie(a,b,c,d){Vie.call(this,a,b,c,d)} +function bje(a,b,c,d){$ie.call(this,a,b,c,d)} +function Dje(a,b,c,d){wje.call(this,a,b,c,d)} +function aMd(a,b){veb.call(this,HJe+a+NIe+b)} +function Hje(a,b){return a.jk().wi().ri(a,b)} +function Ije(a,b){return a.jk().wi().ti(a,b)} +function Lfb(a,b){return uFb(a),dE(a)===dE(b)} +function lhb(a,b){return uFb(a),dE(a)===dE(b)} +function mEb(a,b){return a.b.Bd(new pEb(a,b))} +function sEb(a,b){return a.b.Bd(new vEb(a,b))} +function yEb(a,b){return a.b.Bd(new BEb(a,b))} +function Bk(a,b){return a.e=RD(a.d.Kb(b),159)} +function uhb(a,b,c){return a.lastIndexOf(b,c)} +function wWb(a,b,c){return Qfb(a[b.a],a[c.a])} +function TWb(a,b){return pQb(b,(yCc(),gAc),a)} +function Lpc(a,b){return hgb(b.a.d.p,a.a.d.p)} +function Kpc(a,b){return hgb(a.a.d.p,b.a.d.p)} +function zTc(a,b){return Qfb(a.c-a.s,b.c-b.s)} +function qWc(a,b){return Qfb(a.b.e.a,b.b.e.a)} +function sWc(a,b){return Qfb(a.c.e.a,b.c.e.a)} +function $2b(a){return !a.c?-1:Wmb(a.c.a,a,0)} +function Cod(a){return a==vod||a==xod||a==wod} +function CMd(a,b){this.c=a;nMd.call(this,a,b)} +function fq(a,b,c){this.a=a;qc.call(this,b,c)} +function YDb(a){this.c=a;xxb.call(this,Sve,0)} +function rk(a,b,c){this.c=b;this.b=c;this.a=a} +function DMc(a){dMc();this.d=a;this.a=new wmb} +function ho(a){_l();this.a=(yob(),new Lqb(a))} +function Xmc(a,b){Dmd(a.f)?Ymc(a,b):Zmc(a,b)} +function Lxb(a,b){Mxb.call(this,a,a.length,b)} +function nBb(a,b){if(dBb){return}!!b&&(a.d=b)} +function ZNd(a,b){return ZD(b,15)&&_Gd(a.c,b)} +function AVd(a,b,c){return RD(a.c,71).Wk(b,c)} +function BVd(a,b,c){return RD(a.c,71).Xk(b,c)} +function mge(a,b,c){return lge(a,RD(b,343),c)} +function oge(a,b,c){return nge(a,RD(b,343),c)} +function Ige(a,b,c){return Hge(a,RD(b,343),c)} +function Kge(a,b,c){return Jge(a,RD(b,343),c)} +function Fn(a,b){return b==null?null:Xv(a.b,b)} +function Qeb(a){return _D(a)?(uFb(a),a):a.ue()} +function Rfb(a){return !isNaN(a)&&!isFinite(a)} +function Zub(a){Lub(this);Xub(this);ye(this,a)} +function dnb(a){Pmb(this);YEb(this.c,0,a.Pc())} +function Fsb(a,b,c){this.a=a;this.b=b;this.c=c} +function Vtb(a,b,c){this.a=a;this.b=b;this.c=c} +function hvb(a,b,c){this.d=a;this.b=c;this.a=b} +function aBb(a){this.a=a;gib();Hdb(Date.now())} +function wzb(a){Ckb(a.a);Yyb(a.c,a.b);a.b=null} +function wvb(){wvb=geb;uvb=new xvb;vvb=new zvb} +function KMd(){KMd=geb;JMd=$C(jJ,rve,1,0,5,1)} +function TTd(){TTd=geb;STd=$C(jJ,rve,1,0,5,1)} +function yUd(){yUd=geb;xUd=$C(jJ,rve,1,0,5,1)} +function _l(){_l=geb;new im((yob(),yob(),vob))} +function gAb(a){cAb();return ws((qAb(),pAb),a)} +function zBb(a){xBb();return ws((CBb(),BBb),a)} +function FHb(a){DHb();return ws((IHb(),HHb),a)} +function NHb(a){LHb();return ws((QHb(),PHb),a)} +function kIb(a){iIb();return ws((nIb(),mIb),a)} +function _Jb(a){ZJb();return ws((cKb(),bKb),a)} +function GKb(a){EKb();return ws((JKb(),IKb),a)} +function xLb(a){vLb();return ws((ALb(),zLb),a)} +function mMb(a){hMb();return ws((pMb(),oMb),a)} +function oOb(a){mOb();return ws((rOb(),qOb),a)} +function KPb(a){IPb();return ws((NPb(),MPb),a)} +function KRb(a){IRb();return ws((NRb(),MRb),a)} +function XRb(a){VRb();return ws(($Rb(),ZRb),a)} +function VUb(a){TUb();return ws((YUb(),XUb),a)} +function CWb(a){AWb();return ws((FWb(),EWb),a)} +function uXb(a){sXb();return ws((xXb(),wXb),a)} +function tZb(a){nZb();return ws((wZb(),vZb),a)} +function W$b(a){U$b();return ws((Z$b(),Y$b),a)} +function Mb(a,b){if(!a){throw Adb(new agb(b))}} +function Vb(a){if(!a){throw Adb(new dgb(tve))}} +function rFb(a,b){if(a!=b){throw Adb(new Jrb)}} +function KQb(a,b,c){this.a=a;this.b=b;this.c=c} +function lRb(a,b,c){this.a=a;this.b=b;this.c=c} +function h7b(a,b,c){this.a=a;this.b=b;this.c=c} +function J0b(a,b,c){this.b=a;this.a=b;this.c=c} +function dNb(a,b,c){this.b=a;this.c=b;this.a=c} +function oac(a,b,c){this.a=a;this.b=b;this.c=c} +function F1b(a,b,c){this.e=b;this.b=a;this.d=c} +function Ecc(a,b,c){this.b=a;this.a=b;this.c=c} +function UDb(a,b,c){xDb();a.a.Yd(b,c);return b} +function CJb(a){var b;b=new BJb;b.e=a;return b} +function _Nb(a){var b;b=new YNb;b.b=a;return b} +function U9b(){U9b=geb;S9b=new bac;T9b=new eac} +function Rec(){Rec=geb;Qec=new efc;Pec=new jfc} +function lkc(){lkc=geb;jkc=new Mkc;kkc=new Okc} +function loc(a){joc();return ws((ooc(),noc),a)} +function kcc(a){hcc();return ws((ncc(),mcc),a)} +function yec(a){vec();return ws((Bec(),Aec),a)} +function gnc(a){enc();return ws((jnc(),inc),a)} +function Enc(a){Bnc();return ws((Hnc(),Gnc),a)} +function gpc(a){epc();return ws((jpc(),ipc),a)} +function dtc(a){btc();return ws((gtc(),ftc),a)} +function ltc(a){jtc();return ws((otc(),ntc),a)} +function xtc(a){stc();return ws((Atc(),ztc),a)} +function Gtc(a){Etc();return ws((Jtc(),Itc),a)} +function Utc(a){Ptc();return ws((Xtc(),Wtc),a)} +function auc(a){$tc();return ws((duc(),cuc),a)} +function avc(a){$uc();return ws((dvc(),cvc),a)} +function qvc(a){ovc();return ws((tvc(),svc),a)} +function zvc(a){xvc();return ws((Cvc(),Bvc),a)} +function Ivc(a){Gvc();return ws((Lvc(),Kvc),a)} +function Qvc(a){Ovc();return ws((Tvc(),Svc),a)} +function Quc(a){Ouc();return ws((Tuc(),Suc),a)} +function juc(a){huc();return ws((muc(),luc),a)} +function wuc(a){tuc();return ws((zuc(),yuc),a)} +function Euc(a){Cuc();return ws((Huc(),Guc),a)} +function exc(a){cxc();return ws((hxc(),gxc),a)} +function eDc(a){_Cc();return ws((hDc(),gDc),a)} +function oDc(a){lDc();return ws((rDc(),qDc),a)} +function ADc(a){wDc();return ws((DDc(),CDc),a)} +function ODc(a){JDc();return ws((RDc(),QDc),a)} +function cEc(a){aEc();return ws((fEc(),eEc),a)} +function mEc(a){kEc();return ws((pEc(),oEc),a)} +function uEc(a){sEc();return ws((xEc(),wEc),a)} +function DEc(a){BEc();return ws((GEc(),FEc),a)} +function MEc(a){KEc();return ws((PEc(),OEc),a)} +function VEc(a){TEc();return ws((YEc(),XEc),a)} +function nFc(a){lFc();return ws((qFc(),pFc),a)} +function wFc(a){uFc();return ws((zFc(),yFc),a)} +function FFc(a){DFc();return ws((IFc(),HFc),a)} +function TKc(a){RKc();return ws((WKc(),VKc),a)} +function uNc(a){sNc();return ws((xNc(),wNc),a)} +function yQc(a){wQc();return ws((BQc(),AQc),a)} +function GQc(a){EQc();return ws((JQc(),IQc),a)} +function hTc(a){fTc();return ws((kTc(),jTc),a)} +function fVc(a){dVc();return ws((iVc(),hVc),a)} +function bWc(a){YVc();return ws((eWc(),dWc),a)} +function ZYc(a){WYc();return ws((aZc(),_Yc),a)} +function NZc(a){LZc();return ws((QZc(),PZc),a)} +function u_c(a){s_c();return ws((x_c(),w_c),a)} +function C_c(a){A_c();return ws((F_c(),E_c),a)} +function C2c(a){x2c();return ws((F2c(),E2c),a)} +function j3c(a){g3c();return ws((m3c(),l3c),a)} +function j4c(a){g4c();return ws((m4c(),l4c),a)} +function _3c(a){Y3c();return ws((c4c(),b4c),a)} +function m5c(a){j5c();return ws((p5c(),o5c),a)} +function w5c(a){t5c();return ws((z5c(),y5c),a)} +function h6c(a){f6c();return ws((k6c(),j6c),a)} +function C6c(a){z6c();return ws((F6c(),E6c),a)} +function b7c(a){_6c();return ws((e7c(),d7c),a)} +function E8c(a){z8c();return ws((H8c(),G8c),a)} +function R8b(a){P8b();return ws((U8b(),T8b),a)} +function t3b(a){r3b();return ws((w3b(),v3b),a)} +function g9c(a){b9c();return ws((j9c(),i9c),a)} +function G9c(a){B9c();return ws((J9c(),I9c),a)} +function uad(a){sad();return ws((xad(),wad),a)} +function xbd(a){sbd();return ws((Abd(),zbd),a)} +function ibd(a){gbd();return ws((lbd(),kbd),a)} +function Gbd(a){Cbd();return ws((Jbd(),Ibd),a)} +function Obd(a){Mbd();return ws((Rbd(),Qbd),a)} +function Zbd(a){Xbd();return ws((acd(),_bd),a)} +function fdd(a){_cd();return ws((idd(),hdd),a)} +function qdd(a){ldd();return ws((tdd(),sdd),a)} +function $hd(a){Yhd();return ws((bid(),aid),a)} +function mid(a){kid();return ws((pid(),oid),a)} +function Tjd(a){Rjd();return ws((Wjd(),Vjd),a)} +function wkd(a){ukd();return ws((zkd(),ykd),a)} +function Hmd(a){Cmd();return ws((Kmd(),Jmd),a)} +function Qmd(a){Omd();return ws((Tmd(),Smd),a)} +function $md(a){Ymd();return ws((bnd(),and),a)} +function knd(a){ind();return ws((nnd(),mnd),a)} +function Hnd(a){Fnd();return ws((Knd(),Jnd),a)} +function Snd(a){Pnd();return ws((Vnd(),Und),a)} +function god(a){dod();return ws((jod(),iod),a)} +function rod(a){pod();return ws((uod(),tod),a)} +function Fod(a){Bod();return ws((Iod(),Hod),a)} +function Tod(a){Pod();return ws((Wod(),Vod),a)} +function wpd(a){qpd();return ws((zpd(),ypd),a)} +function Spd(a){Qpd();return ws((Vpd(),Upd),a)} +function fqd(a){dqd();return ws((iqd(),hqd),a)} +function oqd(a){mqd();return ws((rqd(),qqd),a)} +function zsc(a,b){return (uFb(a),a)+(uFb(b),b)} +function wqd(a){uqd();return ws((Eqd(),Dqd),a)} +function Ird(a){Grd();return ws((Lrd(),Krd),a)} +function vtd(a){ttd();return ws((ytd(),xtd),a)} +function dMc(){dMc=geb;bMc=(qpd(),ppd);cMc=Xod} +function uqd(){uqd=geb;sqd=new zqd;tqd=new Bqd} +function wJc(a){!a.e&&(a.e=new bnb);return a.e} +function BTc(a,b){this.c=a;this.a=b;this.b=b-a} +function g8c(a,b,c){this.a=a;this.b=b;this.c=c} +function gud(a,b,c){this.a=a;this.b=b;this.c=c} +function Wdd(a,b,c){this.a=a;this.b=b;this.c=c} +function ced(a,b,c){this.a=a;this.b=b;this.c=c} +function pFd(a,b,c){this.a=a;this.b=b;this.c=c} +function ZPd(a,b,c){this.a=a;this.b=b;this.c=c} +function g7d(a,b,c){this.e=a;this.a=b;this.c=c} +function K7d(a,b,c){s7d();C7d.call(this,a,b,c)} +function f9d(a,b,c){s7d();O8d.call(this,a,b,c)} +function r9d(a,b,c){s7d();O8d.call(this,a,b,c)} +function x9d(a,b,c){s7d();O8d.call(this,a,b,c)} +function h9d(a,b,c){s7d();f9d.call(this,a,b,c)} +function j9d(a,b,c){s7d();f9d.call(this,a,b,c)} +function l9d(a,b,c){s7d();j9d.call(this,a,b,c)} +function t9d(a,b,c){s7d();r9d.call(this,a,b,c)} +function z9d(a,b,c){s7d();x9d.call(this,a,b,c)} +function S2b(a){J2b.call(this,a.d,a.c,a.a,a.b)} +function B3b(a){J2b.call(this,a.d,a.c,a.a,a.b)} +function Og(a){this.d=a;Lg(this);this.b=ed(a.d)} +function cGd(a){aGd();return ws((fGd(),eGd),a)} +function gk(a,b){Qb(a);Qb(b);return new hk(a,b)} +function dr(a,b){Qb(a);Qb(b);return new mr(a,b)} +function hr(a,b){Qb(a);Qb(b);return new sr(a,b)} +function Dr(a,b){Qb(a);Qb(b);return new Rr(a,b)} +function Uub(a){sFb(a.b!=0);return Wub(a,a.a.a)} +function Vub(a){sFb(a.b!=0);return Wub(a,a.c.b)} +function q$d(a){!a.c&&(a.c=new X9d);return a.c} +function cv(a){var b;b=new bnb;xr(b,a);return b} +function Vx(a){var b;b=new _sb;xr(b,a);return b} +function Yx(a){var b;b=new xAb;_q(b,a);return b} +function gv(a){var b;b=new Yub;_q(b,a);return b} +function RD(a,b){CFb(a==null||QD(a,b));return a} +function Mxb(a,b,c){Axb.call(this,b,c);this.a=a} +function kB(a,b){this.c=a;this.b=b;this.a=false} +function hCb(){this.a=';,;';this.b='';this.c=''} +function $Cb(a,b,c){this.b=a;pxb.call(this,b,c)} +function uub(a,b,c){this.c=a;xlb.call(this,b,c)} +function fZb(a,b,c){eZb.call(this,a,b);this.b=c} +function YEb(a,b,c){VEb(c,0,a,b,c.length,false)} +function JYb(a,b,c,d,e){a.b=b;a.c=c;a.d=d;a.a=e} +function D2b(a,b,c,d,e){a.d=b;a.c=c;a.a=d;a.b=e} +function XDb(a,b){if(b){a.b=b;a.a=(LCb(b),b.a)}} +function mFb(a,b){if(!a){throw Adb(new agb(b))}} +function zFb(a,b){if(!a){throw Adb(new dgb(b))}} +function qFb(a,b){if(!a){throw Adb(new zeb(b))}} +function zqc(a,b){mqc();return hgb(a.d.p,b.d.p)} +function T0c(a,b){B0c();return Qfb(a.e.b,b.e.b)} +function U0c(a,b){B0c();return Qfb(a.e.a,b.e.a)} +function Xoc(a,b){return hgb(N3b(a.d),N3b(b.d))} +function Izb(a,b){return !!b&&Jzb(a,b.d)?b:null} +function $lc(a,b){return b==(qpd(),ppd)?a.c:a.d} +function Qdb(a){return Edb(yD(Kdb(a)?Wdb(a):a))} +function Nid(a){return new rjd(a.c+a.b,a.d+a.a)} +function GSd(a){return a!=null&&!mSd(a,aSd,bSd)} +function DSd(a,b){return (JSd(a)<<4|JSd(b))&Bwe} +function Rid(a,b,c,d,e){a.c=b;a.d=c;a.b=d;a.a=e} +function y8b(a){var b,c;b=a.b;c=a.c;a.b=c;a.c=b} +function B8b(a){var b,c;c=a.d;b=a.a;a.d=b;a.a=c} +function u6d(a,b){var c;c=a.c;t6d(a,b);return c} +function Nqd(a,b){b<0?(a.g=-1):(a.g=b);return a} +function kjd(a,b){gjd(a);a.a*=b;a.b*=b;return a} +function hrc(a,b,c){grc.call(this,b,c);this.d=a} +function PZd(a,b,c){kZd.call(this,a,b);this.c=c} +function Kfe(a,b,c){kZd.call(this,a,b);this.c=c} +function zUd(a){yUd();kUd.call(this);this.ci(a)} +function Yee(){ree();Zee.call(this,(YSd(),XSd))} +function Yse(a){Vse();++Use;return new Hte(0,a)} +function uke(){uke=geb;tke=(yob(),new mpb(eLe))} +function ux(){ux=geb;new wx((kl(),jl),(Wk(),Vk))} +function ugb(){ugb=geb;tgb=$C(bJ,Nve,17,256,0,1)} +function zUb(){this.b=Kfb(UD(iGd((yVb(),sVb))))} +function Pq(a){this.b=a;this.a=gn(this.b.a).Od()} +function mr(a,b){this.b=a;this.a=b;zl.call(this)} +function sr(a,b){this.a=a;this.b=b;zl.call(this)} +function s_d(a,b,c){this.a=a;N$d.call(this,b,c)} +function n_d(a,b,c){this.a=a;N$d.call(this,b,c)} +function sDd(a,b,c){var d;d=new OC(c);sC(a,b,d)} +function _Eb(a,b,c){var d;d=a[b];a[b]=c;return d} +function UEb(a){var b;b=a.slice();return dD(b,a)} +function SJb(a){var b;b=a.n;return a.a.b+b.d+b.a} +function PKb(a){var b;b=a.n;return a.e.b+b.d+b.a} +function QKb(a){var b;b=a.n;return a.e.a+b.b+b.c} +function rub(a){a.a.b=a.b;a.b.a=a.a;a.a=a.b=null} +function Mub(a,b){Pub(a,b,a.c.b,a.c);return true} +function w2b(a){if(a.a){return a.a}return R0b(a)} +function NSb(a){HSb();return JGd(a)==vCd(LGd(a))} +function OSb(a){HSb();return LGd(a)==vCd(JGd(a))} +function l_b(a,b){return k_b(a,new eZb(b.a,b.b))} +function xn(a,b){return fn(),ck(a,b),new zy(a,b)} +function fmc(a,b){return a.c<b.c?-1:a.c==b.c?0:1} +function snc(a){return a.b.c.length-a.e.c.length} +function N3b(a){return a.e.c.length-a.g.c.length} +function L3b(a){return a.e.c.length+a.g.c.length} +function Lgb(a){return a==0||isNaN(a)?a:a<0?-1:1} +function V0b(a){return !W0b(a)&&a.c.i.c==a.d.i.c} +function DOc(a){dOc();return (qpd(),apd).Hc(a.j)} +function M0c(a,b,c){B0c();return c.e.a+c.f.a+a*b} +function W0c(a,b,c){B0c();return c.e.b+c.f.b+a*b} +function SUc(a,b,c){return Zjb(a.b,RD(c.b,18),b)} +function TUc(a,b,c){return Zjb(a.b,RD(c.b,18),b)} +function oFd(a,b,c){iEd(a.a,a.b,a.c,RD(b,166),c)} +function lad(a,b,c,d){mad.call(this,a,b,c,d,0,0)} +function LUd(a){yUd();zUd.call(this,a);this.a=-1} +function Gxb(a,b){Axb.call(this,b,1040);this.a=a} +function zqd(){vqd.call(this,'COUNT_CHILDREN',0)} +function ole(a,b){Eke.call(this,a,b);this.a=this} +function ufb(a,b){var c;c=rfb(a,b);c.i=2;return c} +function cJd(a,b){var c;++a.j;c=a.Cj(b);return c} +function pfd(a,b,c){a.a=-1;tfd(a,b.g,c);return a} +function Bsd(a,b){return Rmb(a,new rjd(b.a,b.b))} +function __c(a){return R_c(),$C(Z$,NEe,40,a,0,1)} +function dj(a){return a.e.Rd().gc()*a.c.Rd().gc()} +function fk(a,b,c){return new rk(hDb(a)._e(),c,b)} +function mVd(a,b){nVd(a,b==null?null:(uFb(b),b))} +function q6d(a,b){s6d(a,b==null?null:(uFb(b),b))} +function r6d(a,b){s6d(a,b==null?null:(uFb(b),b))} +function CFb(a){if(!a){throw Adb(new Ifb(null))}} +function tt(a){if(a.c.e!=a.a){throw Adb(new Jrb)}} +function Au(a){if(a.e.c!=a.b){throw Adb(new Jrb)}} +function Ar(a){Qb(a);while(a.Ob()){a.Pb();a.Qb()}} +function Dy(a){tm();this.a=(yob(),new mpb(Qb(a)))} +function mf(a){this.c=a;this.b=this.c.d.vc().Kc()} +function hx(a){a.a.ld();RD(a.a.md(),16).gc();Hh()} +function $hb(a,b){a.a+=Ihb(b,0,b.length);return a} +function Vmb(a,b){tFb(b,a.c.length);return a.c[b]} +function kob(a,b){tFb(b,a.a.length);return a.a[b]} +function Arb(a,b){return uFb(b),Leb(b,(uFb(a),a))} +function vrb(a,b){return uFb(a),Leb(a,(uFb(b),b))} +function YC(a,b,c,d,e,f){return ZC(a,b,c,d,e,0,f)} +function GBb(a,b){return bD(b,0,tCb(b[0],Hgb(1)))} +function IBb(a,b){return Hgb(Bdb(Hgb(a.a).a,b.a))} +function tCb(a,b){return IBb(RD(a,168),RD(b,168))} +function Jgb(){Jgb=geb;Igb=$C(eJ,Nve,168,256,0,1)} +function dhb(){dhb=geb;chb=$C(lJ,Nve,191,256,0,1)} +function Zeb(){Zeb=geb;Yeb=$C(RI,Nve,222,256,0,1)} +function jfb(){jfb=geb;ifb=$C(SI,Nve,180,128,0,1)} +function KYb(){JYb(this,false,false,false,false)} +function Kub(a){ctb.call(this,new gub);ye(this,a)} +function btb(a){this.a=new Usb(a.gc());ye(this,a)} +function nsb(a){this.c=a;this.a=new Osb(this.c.a)} +function Kmc(a){this.a=a;this.c=new Tsb;Emc(this)} +function DRb(){this.d=new rjd(0,0);this.e=new _sb} +function SDb(a,b){xDb();NCb.call(this,a);this.a=b} +function J2b(a,b,c,d){A2b(this);D2b(this,a,b,c,d)} +function Uqc(a,b,c){return hgb(b.d[a.g],c.d[a.g])} +function wMc(a,b,c){return hgb(a.d[b.p],a.d[c.p])} +function xMc(a,b,c){return hgb(a.d[b.p],a.d[c.p])} +function yMc(a,b,c){return hgb(a.d[b.p],a.d[c.p])} +function zMc(a,b,c){return hgb(a.d[b.p],a.d[c.p])} +function Aad(a,b,c){return $wnd.Math.min(c/a,1/b)} +function SIc(a,b){return a?0:$wnd.Math.max(0,b-1)} +function qSd(a,b){return a==null?b==null:lhb(a,b)} +function rSd(a,b){return a==null?b==null:mhb(a,b)} +function lQb(a){return !a.q?(yob(),yob(),wob):a.q} +function _lc(a){return a.c-RD(Vmb(a.a,a.b),294).b} +function trd(a){if(a.c){return a.c.f}return a.e.b} +function urd(a){if(a.c){return a.c.g}return a.e.a} +function wsc(a,b){a.a==null&&usc(a);return a.a[b]} +function L2c(a){var b;b=R2c(a);return !b?a:L2c(b)} +function $se(a,b){Vse();++Use;return new Qte(a,b)} +function Hte(a,b){Vse();Wse.call(this,a);this.a=b} +function N8d(a,b){s7d();t7d.call(this,b);this.a=a} +function iae(a,b,c){this.a=a;XZd.call(this,b,c,2)} +function ntd(a){this.b=new Yub;this.a=a;this.c=-1} +function ds(a){qc.call(this,0,0);this.a=a;this.b=0} +function PSd(a){ZHd.call(this,a.gc());YGd(this,a)} +function jg(a){a.b?jg(a.b):a.d.dc()&&a.f.c.Bc(a.e)} +function aD(a){return Array.isArray(a)&&a.Tm===keb} +function Bsb(a,b){return ZD(b,22)&&Csb(a,RD(b,22))} +function Dsb(a,b){return ZD(b,22)&&Esb(a,RD(b,22))} +function qtb(a,b){return otb(a,b,ptb(a,a.b.Ce(b)))} +function Jtb(a,b){return !(a.a.get(b)===undefined)} +function Iwb(a){return Kwb(a,26)*Kxe+Kwb(a,27)*Lxe} +function OBb(a,b){return FBb(new jCb,new VBb(a),b)} +function Ynb(a,b,c){nFb(0,b,a.length);Wnb(a,0,b,c)} +function Qmb(a,b,c){wFb(b,a.c.length);XEb(a.c,b,c)} +function dKb(a,b,c){var d;if(a){d=a.i;d.c=b;d.b=c}} +function eKb(a,b,c){var d;if(a){d=a.i;d.d=b;d.a=c}} +function Pnb(a,b,c){var d;for(d=0;d<b;++d){a[d]=c}} +function Qnb(a,b){var c;for(c=0;c<b;++c){a[c]=-1}} +function ysb(a,b){var c;c=xsb(a);zob(c,b);return c} +function cA(a,b){!a&&(a=[]);a[a.length]=b;return a} +function RQb(a,b){$id(a.c,b);a.b.c+=b.a;a.b.d+=b.b} +function QQb(a,b){RQb(a,ojd(new rjd(b.a,b.b),a.c))} +function sOb(a,b){this.b=new Yub;this.a=a;this.c=b} +function QYb(){this.b=new aZb;this.c=new UYb(this)} +function fHb(){this.d=new tHb;this.e=new lHb(this)} +function UFc(){RFc();this.f=new Yub;this.e=new Yub} +function yOc(){dOc();this.k=new Tsb;this.d=new _sb} +function nud(){nud=geb;mud=new mGd((umd(),Gld),0)} +function cs(){cs=geb;bs=new ds($C(jJ,rve,1,0,5,1))} +function _ad(a,b,c){return Ysb(a,new TFb(b.a,c.a))} +function DGc(a,b,c){return -hgb(a.f[b.p],a.f[c.p])} +function Mic(a,b,c){Hic(c,a,1);Rmb(b,new xjc(c,a))} +function Nic(a,b,c){Iic(c,a,1);Rmb(b,new Jjc(c,a))} +function h$d(a,b,c){this.a=a;_Zd.call(this,b,c,22)} +function s5d(a,b,c){this.a=a;_Zd.call(this,b,c,14)} +function E8d(a,b,c,d){s7d();N7d.call(this,a,b,c,d)} +function L8d(a,b,c,d){s7d();N7d.call(this,a,b,c,d)} +function nfd(a,b,c){a.a=-1;tfd(a,b.g+1,c);return a} +function bCd(a,b,c){c=xvd(a,RD(b,54),7,c);return c} +function hVd(a,b,c){c=xvd(a,RD(b,54),3,c);return c} +function Ydb(a){if(Kdb(a)){return a|0}return FD(a)} +function cte(a){Vse();++Use;return new eue(10,a,0)} +function fe(a){var b;b=a.f;return !b?(a.f=a.Dc()):b} +function Ec(a){var b;b=a.i;return !b?(a.i=a.bc()):b} +function Ahe(a){if(a.e.j!=a.d){throw Adb(new Jrb)}} +function gn(a){if(a.c){return a.c}return a.c=a.Sd()} +function hn(a){if(a.d){return a.d}return a.d=a.Td()} +function Uee(a,b){return ufe(Pee(a,b))?b.zi():null} +function ed(a){return ZD(a,15)?RD(a,15).ed():a.Kc()} +function De(a){return a.Qc($C(jJ,rve,1,a.gc(),5,1))} +function aE(a){return a!=null&&cE(a)&&!(a.Tm===keb)} +function YD(a){return !Array.isArray(a)&&a.Tm===keb} +function vx(a,b){return Qb(b),a.a.Jd(b)&&!a.b.Jd(b)} +function tD(a,b){return hD(a.l&b.l,a.m&b.m,a.h&b.h)} +function zD(a,b){return hD(a.l|b.l,a.m|b.m,a.h|b.h)} +function HD(a,b){return hD(a.l^b.l,a.m^b.m,a.h^b.h)} +function Sdb(a,b){return Edb(AD(Kdb(a)?Wdb(a):a,b))} +function Tdb(a,b){return Edb(BD(Kdb(a)?Wdb(a):a,b))} +function Udb(a,b){return Edb(CD(Kdb(a)?Wdb(a):a,b))} +function Ieb(a,b){return Keb((uFb(a),a),(uFb(b),b))} +function Jfb(a,b){return Qfb((uFb(a),a),(uFb(b),b))} +function pwb(a){this.b=new cnb(11);this.a=(urb(),a)} +function is(a){this.a=(cs(),bs);this.d=RD(Qb(a),51)} +function Axb(a,b){this.c=0;this.d=a;this.b=b|64|Ove} +function kxb(a,b){this.e=a;this.d=(b&64)!=0?b|Ove:b} +function ezb(a){this.b=null;this.a=(urb(),!a?rrb:a)} +function nz(a){ez(this);this.g=a;gz(this);this.je()} +function vue(a){uue();this.a=0;this.b=a-1;this.c=1} +function yg(a,b,c,d){this.a=a;lg.call(this,a,b,c,d)} +function gEb(a,b,c){if(a.a.Mb(c)){a.b=true;b.Cd(c)}} +function Qwb(a){if(!a.d){a.d=a.b.Kc();a.c=a.b.gc()}} +function lyb(a,b){if(a<0||a>=b){throw Adb(new web)}} +function JDb(a,b){return MDb(a,(uFb(b),new JAb(b)))} +function KDb(a,b){return MDb(a,(uFb(b),new LAb(b)))} +function prc(a,b,c){return qrc(a,RD(b,12),RD(c,12))} +function q4b(a){return J3b(),RD(a,12).g.c.length!=0} +function v4b(a){return J3b(),RD(a,12).e.c.length!=0} +function sdc(a,b){Zcc();return Qfb(b.a.o.a,a.a.o.a)} +function d_d(a,b){(b.Bb&QHe)!=0&&!a.a.o&&(a.a.o=b)} +function T3c(a,b){b.Ug("General 'Rotator",1);S3c(a)} +function MCc(a,b,c){b.qf(c,Kfb(UD(Wjb(a.b,c)))*a.a)} +function yid(a,b,c){tid();return xid(a,b)&&xid(a,c)} +function Rod(a){Pod();return !a.Hc(Lod)&&!a.Hc(Nod)} +function Nrc(a){if(a.e){return Src(a.e)}return null} +function Zdb(a){if(Kdb(a)){return ''+a}return GD(a)} +function XNc(a){var b;b=a;while(b.f){b=b.f}return b} +function HBb(a,b,c){bD(b,0,tCb(b[0],c[0]));return b} +function Gpc(a,b,c,d){var e;e=a.i;e.i=b;e.a=c;e.b=d} +function C5d(a,b,c,d){XZd.call(this,a,b,c);this.b=d} +function N3d(a,b,c,d,e){O3d.call(this,a,b,c,d,e,-1)} +function b4d(a,b,c,d,e){c4d.call(this,a,b,c,d,e,-1)} +function Iie(a,b,c,d){PZd.call(this,a,b,c);this.b=d} +function Xde(a){uId.call(this,a,false);this.a=false} +function Bqd(){vqd.call(this,'LOOKAHEAD_LAYOUT',1)} +function nNd(a){this.b=a;mMd.call(this,a);mNd(this)} +function vNd(a){this.b=a;BMd.call(this,a);uNd(this)} +function J5d(a,b,c){this.a=a;G5d.call(this,b,c,5,6)} +function wje(a,b,c,d){this.b=a;XZd.call(this,b,c,d)} +function Tj(a,b){this.b=a;Aj.call(this,a.b);this.a=b} +function NLc(a){this.a=LLc(a.a);this.b=new dnb(a.b)} +function Fx(a,b){tm();Ex.call(this,a,Pm(new mob(b)))} +function _se(a,b){Vse();++Use;return new aue(a,b,0)} +function bte(a,b){Vse();++Use;return new aue(6,a,b)} +function Ztb(a,b){uFb(b);while(a.Ob()){b.Cd(a.Pb())}} +function Ujb(a,b){return bE(b)?Yjb(a,b):!!qtb(a.f,b)} +function O_d(a,b){return b.Vh()?Vvd(a.b,RD(b,54)):b} +function whb(a,b){return lhb(a.substr(0,b.length),b)} +function Fl(a){return new is(new Il(a.a.length,a.a))} +function Oid(a){return new rjd(a.c+a.b/2,a.d+a.a/2)} +function yD(a){return hD(~a.l&dxe,~a.m&dxe,~a.h&exe)} +function cE(a){return typeof a===gve||typeof a===kve} +function akb(a){a.f=new ttb(a);a.i=new Ntb(a);++a.g} +function Klb(a){if(!a){throw Adb(new Dvb)}return a.d} +function smb(a){var b;b=omb(a);sFb(b!=null);return b} +function tmb(a){var b;b=pmb(a);sFb(b!=null);return b} +function tv(a,b){var c;c=a.a.gc();Sb(b,c);return c-b} +function Ysb(a,b){var c;c=a.a.zc(b,a);return c==null} +function rAb(a,b){return a.a.zc(b,(Geb(),Eeb))==null} +function _nb(a){return new SDb(null,$nb(a,a.length))} +function yPb(a,b,c){return zPb(a,RD(b,42),RD(c,176))} +function Wrb(a,b,c){zsb(a.a,b);return _Eb(a.b,b.g,c)} +function fyb(a,b,c){lyb(c,a.a.c.length);$mb(a.a,c,b)} +function Knb(a,b,c,d){nFb(b,c,a.length);Onb(a,b,c,d)} +function Onb(a,b,c,d){var e;for(e=b;e<c;++e){a[e]=d}} +function Snb(a,b){var c;for(c=0;c<b;++c){a[c]=false}} +function cjb(a,b,c){Pib();this.e=a;this.d=b;this.a=c} +function DBb(a,b,c){this.c=a;this.a=b;yob();this.b=c} +function nMd(a,b){this.d=a;dMd.call(this,a);this.e=b} +function Ved(a,b,c){Ned(a,b.g,c);zsb(a.c,b);return a} +function xYb(a){vYb(a,(Cmd(),ymd));a.d=true;return a} +function Cfe(a){!a.j&&Ife(a,Dee(a.g,a.b));return a.j} +function At(a){a.a=null;a.e=null;akb(a.b);a.d=0;++a.c} +function znb(a){yFb(a.b!=-1);Xmb(a.c,a.a=a.b);a.b=-1} +function Qte(a,b){Wse.call(this,1);this.a=a;this.b=b} +function uUb(a,b){return a>0?$wnd.Math.log(a/b):-100} +function Agb(a,b){return Ddb(a,b)<0?-1:Ddb(a,b)>0?1:0} +function Dge(a,b){hZd(a,ZD(b,160)?b:RD(b,2036).Rl())} +function vFb(a,b){if(a==null){throw Adb(new Ogb(b))}} +function $nb(a,b){return jxb(b,a.length),new Gxb(a,b)} +function hsc(a,b){if(!b){return false}return ye(a,b)} +function Gs(){zs();return cD(WC(RG,1),jwe,549,0,[ys])} +function Xib(a){return a.e==0?a:new cjb(-a.e,a.d,a.a)} +function $Nb(a,b){return Qfb(a.c.c+a.c.b,b.c.c+b.c.b)} +function cvb(a,b){Pub(a.d,b,a.b.b,a.b);++a.a;a.c=null} +function JCb(a,b){!a.c?Rmb(a.b,b):JCb(a.c,b);return a} +function KB(a,b,c){var d;d=JB(a,b);LB(a,b,c);return d} +function Rnb(a,b,c){var d;for(d=0;d<b;++d){bD(a,d,c)}} +function nhb(a,b,c,d,e){while(b<c){d[e++]=ihb(a,b++)}} +function Qnc(a,b,c,d,e){Pnc(a,RD(Qc(b.k,c),15),c,d,e)} +function Nnc(a,b){FDb(GDb(a.Oc(),new voc),new xoc(b))} +function tXc(a,b){return Qfb(a.e.a+a.f.a,b.e.a+b.f.a)} +function vXc(a,b){return Qfb(a.e.b+a.f.b,b.e.b+b.f.b)} +function GOc(a){return $wnd.Math.abs(a.d.e-a.e.e)-a.a} +function ane(a){return a==oxe?mLe:a==pxe?'-INF':''+a} +function cne(a){return a==oxe?mLe:a==pxe?'-INF':''+a} +function MSb(a){HSb();return vCd(JGd(a))==vCd(LGd(a))} +function kOd(a,b,c){return RD(a.c.hd(b,RD(c,136)),44)} +function IFd(a,b){oDd(a,new OC(b.f!=null?b.f:''+b.g))} +function KFd(a,b){oDd(a,new OC(b.f!=null?b.f:''+b.g))} +function YGd(a,b){a.Si()&&(b=bHd(a,b));return a.Fi(b)} +function VVd(a,b){b=a.Yk(null,b);return UVd(a,null,b)} +function Wfe(a,b){++a.j;Tge(a,a.i,b);Vfe(a,RD(b,343))} +function UId(a){a?iz(a,(gib(),fib),''):neb((gib(),a))} +function Twb(a){this.d=(uFb(a),a);this.a=0;this.c=Sve} +function TTc(a,b){this.d=bUc(a);this.c=b;this.a=0.5*b} +function WTb(a){VTb.call(this);this.a=a;Rmb(a.a,this)} +function Zje(){gub.call(this);this.a=true;this.b=true} +function WB(){WB=geb;UB=new XB(false);VB=new XB(true)} +function Pc(a){var b;return b=a.g,!b?(a.g=new th(a)):b} +function Uc(a){var b;return b=a.k,!b?(a.k=new Bh(a)):b} +function ki(a){var b;return b=a.k,!b?(a.k=new Bh(a)):b} +function ej(a){var b;return b=a.i,!b?(a.i=new Ki(a)):b} +function bj(a){var b;b=a.f;return !b?(a.f=new Zj(a)):b} +function Fc(a){var b;b=a.j;return !b?(a.j=new Sw(a)):b} +function Co(a){var b;b=a.d;return !b?(a.d=new mp(a)):b} +function ate(a,b,c){Vse();++Use;return new Yte(a,b,c)} +function yj(a,b){Pb(b,a.c.b.c.gc());return new Nj(a,b)} +function sv(a,b){var c;c=a.a.gc();Pb(b,c);return c-1-b} +function sfb(a,b,c){var d;d=rfb(a,b);Ffb(c,d);return d} +function rfb(a,b){var c;c=new pfb;c.j=a;c.d=b;return c} +function Qb(a){if(a==null){throw Adb(new Ngb)}return a} +function OC(a){if(a==null){throw Adb(new Ngb)}this.a=a} +function XA(a){vA();this.b=new bnb;this.a=a;IA(this,a)} +function Zs(a){this.b=a;this.a=RD(Hvb(this.b.a.e),227)} +function tm(){tm=geb;_l();sm=new Kx((yob(),yob(),vob))} +function Px(){Px=geb;_l();Ox=new Qx((yob(),yob(),xob))} +function lTd(){lTd=geb;kTd=_ae();!!(JTd(),nTd)&&bbe()} +function LSc(a){a.s=NaN;a.c=NaN;MSc(a,a.e);MSc(a,a.j)} +function AYd(a){return (a.i==null&&rYd(a),a.i).length} +function wq(a,b){return RD(gn(a.a).Md().Xb(b),44).ld()} +function Wjb(a,b){return bE(b)?Xjb(a,b):Wd(qtb(a.f,b))} +function QSb(a,b){HSb();return a==JGd(b)?LGd(b):JGd(b)} +function rWb(a,b,c,d){return c==0||(c-d)/c<a.e||b>=a.g} +function bD(a,b,c){pFb(c==null||VC(a,c));return a[b]=c} +function yhb(a,b){BFb(b,a.length+1);return a.substr(b)} +function yxb(a,b){uFb(b);while(a.c<a.d){a.Se(b,a.c++)}} +function Dub(a){this.d=a;this.c=a.a.d.a;this.b=a.a.e.g} +function Ggd(a){this.c=a;this.a=new Yub;this.b=new Yub} +function R4b(a){this.c=new pjd;this.a=new bnb;this.b=a} +function fYb(a){this.b=new bnb;this.a=new bnb;this.c=a} +function Pdd(a,b,c){RD(b.b,68);Umb(b.a,new Wdd(a,c,b))} +function rdc(a,b){Zcc();return RD(Vrb(a,b.d),15).Fc(b)} +function oDd(a,b){var c;c=a.a.length;JB(a,c);LB(a,c,b)} +function eFb(a,b){var c;c=console[a];c.call(console,b)} +function _Id(a,b){var c;++a.j;c=a.Ej();a.rj(a.Zi(c,b))} +function lMc(a,b,c){var d;d=rMc(a,b,c);return kMc(a,d)} +function j2d(a){!a.d&&(a.d=new XZd(o7,a,1));return a.d} +function jVd(a){!a.a&&(a.a=new XZd(r7,a,4));return a.a} +function Jhb(a,b){a.a+=String.fromCharCode(b);return a} +function Thb(a,b){a.a+=String.fromCharCode(b);return a} +function D9d(a,b,c){this.a=a;L6d.call(this,b);this.b=c} +function Fde(a,b,c){this.a=a;MKd.call(this,8,b,null,c)} +function aue(a,b,c){Wse.call(this,a);this.a=b;this.b=c} +function O8d(a,b,c){t7d.call(this,b);this.a=a;this.b=c} +function ut(a){this.c=a;this.b=this.c.a;this.a=this.c.e} +function Zee(a){this.a=(uFb(qKe),qKe);this.b=a;new O5d} +function Trb(a){Ae(a.a);a.b=$C(jJ,rve,1,a.b.length,5,1)} +function Ckb(a){yFb(a.c!=-1);a.d.gd(a.c);a.b=a.c;a.c=-1} +function ejd(a){return $wnd.Math.sqrt(a.a*a.a+a.b*a.b)} +function Jzb(a,b){return Tyb(a.c,a.f,b,a.b,a.a,a.e,a.d)} +function eyb(a,b){return lyb(b,a.a.c.length),Vmb(a.a,b)} +function Hb(a,b){return dE(a)===dE(b)||a!=null&&pb(a,b)} +function O2d(a){return ZD(a,102)&&(RD(a,19).Bb&QHe)!=0} +function Fb(a){Hvb(a);return ZD(a,484)?RD(a,484):jeb(a)} +function bve(a){if(a)return a.dc();return !a.Kc().Ob()} +function kte(a){if(!Ase)return false;return Yjb(Ase,a)} +function hDb(a){if(0>=a){return new rDb}return iDb(a-1)} +function Y2b(a){if(!a.a&&!!a.c){return a.c.b}return a.a} +function Zx(a){if(ZD(a,616)){return a}return new sy(a)} +function LCb(a){if(!a.c){MCb(a);a.d=true}else{LCb(a.c)}} +function ICb(a){if(!a.c){a.d=true;KCb(a)}else{a.c.$e()}} +function bHb(a){a.b=false;a.c=false;a.d=false;a.a=false} +function uMc(a){var b,c;b=a.c.i.c;c=a.d.i.c;return b==c} +function _vd(a,b){var c;c=a.Ih(b);c>=0?a.ki(c):Tvd(a,b)} +function mtd(a,b){a.c<0||a.b.b<a.c?Oub(a.b,b):a.a.tf(b)} +function aBd(a,b){WGd((!a.a&&(a.a=new F4d(a,a)),a.a),b)} +function DQb(a,b){RQb(RD(b.b,68),a);Umb(b.a,new IQb(a))} +function Woc(a,b){return hgb(b.j.c.length,a.j.c.length)} +function oed(a,b,c){hed();return c.Lg(a,RD(b.ld(),149))} +function Hvb(a){if(a==null){throw Adb(new Ngb)}return a} +function uFb(a){if(a==null){throw Adb(new Ngb)}return a} +function uKd(a){if(a.p!=4)throw Adb(new cgb);return a.e} +function tKd(a){if(a.p!=3)throw Adb(new cgb);return a.e} +function CKd(a){if(a.p!=3)throw Adb(new cgb);return a.j} +function DKd(a){if(a.p!=4)throw Adb(new cgb);return a.j} +function wKd(a){if(a.p!=6)throw Adb(new cgb);return a.f} +function FKd(a){if(a.p!=6)throw Adb(new cgb);return a.k} +function $9d(a){!a.b&&(a.b=new pae(new lae));return a.b} +function yfe(a){a.c==-2&&Efe(a,vee(a.g,a.b));return a.c} +function vfb(a,b){var c;c=rfb('',a);c.n=b;c.i=1;return c} +function kp(a,b,c,d){gp.call(this,a,c);this.a=b;this.f=d} +function ct(a,b,c,d){gp.call(this,a,b);this.d=c;this.a=d} +function zy(a,b){_p.call(this,Gob(Qb(a),Qb(b)));this.a=b} +function ufd(){Oed.call(this);aFb(this.j.c,0);this.a=-1} +function $ae(){FBd.call(this,AKe,(jTd(),iTd));Uae(this)} +function Bne(){FBd.call(this,dLe,(Ole(),Nle));xne(this)} +function cdd(){qs.call(this,'DELAUNAY_TRIANGULATION',0)} +function Ehb(a){return String.fromCharCode.apply(null,a)} +function Zjb(a,b,c){return bE(b)?$jb(a,b,c):rtb(a.f,b,c)} +function Fob(a){yob();return !a?(urb(),urb(),trb):a.Oe()} +function Zu(a){dk(a,lwe);return dz(Bdb(Bdb(5,a),a/10|0))} +function yx(a,b){ux();return new wx(new tl(a),new dl(b))} +function fn(){fn=geb;en=new Nx(cD(WC(UK,1),Zve,44,0,[]))} +function tqb(a){!a.d&&(a.d=new xpb(a.c.Cc()));return a.d} +function qqb(a){!a.a&&(a.a=new Sqb(a.c.vc()));return a.a} +function sqb(a){!a.b&&(a.b=new Lqb(a.c.ec()));return a.b} +function qgb(a,b){while(b-->0){a=a<<1|(a<0?1:0)}return a} +function BGc(a,b){var c;c=new R4b(a);ZEb(b.c,c);return c} +function FMb(a,b){a.u.Hc((Pod(),Lod))&&DMb(a,b);HMb(a,b)} +function Fvb(a,b){return dE(a)===dE(b)||a!=null&&pb(a,b)} +function Vrb(a,b){return Bsb(a.a,b)?a.b[RD(b,22).g]:null} +function YRb(){VRb();return cD(WC($O,1),jwe,489,0,[URb])} +function ybd(){sbd();return cD(WC(M1,1),jwe,490,0,[rbd])} +function Hbd(){Cbd();return cD(WC(N1,1),jwe,558,0,[Bbd])} +function gdd(){_cd();return cD(WC(V1,1),jwe,539,0,[$cd])} +function iyd(a){!a.n&&(a.n=new C5d(I4,a,1,7));return a.n} +function wCd(a){!a.c&&(a.c=new C5d(K4,a,9,9));return a.c} +function mzd(a){!a.c&&(a.c=new Yie(E4,a,5,8));return a.c} +function lzd(a){!a.b&&(a.b=new Yie(E4,a,4,7));return a.b} +function Sed(a){a.j.c.length=0;Ae(a.c);sfd(a.a);return a} +function Afe(a){a.e==fLe&&Gfe(a,Aee(a.g,a.b));return a.e} +function Bfe(a){a.f==fLe&&Hfe(a,Bee(a.g,a.b));return a.f} +function xBd(a,b,c,d){wBd(a,b,c,false);j1d(a,d);return a} +function oNd(a,b){this.b=a;nMd.call(this,a,b);mNd(this)} +function wNd(a,b){this.b=a;CMd.call(this,a,b);uNd(this)} +function Kmb(a){this.d=a;this.a=this.d.b;this.b=this.d.c} +function oy(a,b){this.b=a;this.c=b;this.a=new Osb(this.b)} +function ihb(a,b){BFb(b,a.length);return a.charCodeAt(b)} +function NDd(a,b){CGd(a,Kfb(vDd(b,'x')),Kfb(vDd(b,'y')))} +function $Dd(a,b){CGd(a,Kfb(vDd(b,'x')),Kfb(vDd(b,'y')))} +function CDb(a,b){MCb(a);return new SDb(a,new hEb(b,a.a))} +function GDb(a,b){MCb(a);return new SDb(a,new zEb(b,a.a))} +function HDb(a,b){MCb(a);return new WCb(a,new nEb(b,a.a))} +function IDb(a,b){MCb(a);return new oDb(a,new tEb(b,a.a))} +function Ty(a,b){return new Ry(RD(Qb(a),50),RD(Qb(b),50))} +function nHb(a,b){return Qfb(a.d.c+a.d.b/2,b.d.c+b.d.b/2)} +function gTb(a,b,c){c.a?Eyd(a,b.b-a.f/2):Dyd(a,b.a-a.g/2)} +function WYb(a,b){return Qfb(a.g.c+a.g.b/2,b.g.c+b.g.b/2)} +function RZb(a,b){NZb();return Qfb((uFb(a),a),(uFb(b),b))} +function wSd(a){return a!=null&&tpb(eSd,a.toLowerCase())} +function Ae(a){var b;for(b=a.Kc();b.Ob();){b.Pb();b.Qb()}} +function Ih(a){var b;b=a.b;!b&&(a.b=b=new Xh(a));return b} +function R0b(a){var b;b=Z5b(a);if(b){return b}return null} +function BSb(a,b){var c,d;c=a/b;d=eE(c);c>d&&++d;return d} +function Ck(a,b,c){var d;d=RD(a.d.Kb(c),159);!!d&&d.Nb(b)} +function Vhc(a,b,c){tqc(a.a,c);Jpc(c);Kqc(a.b,c);bqc(b,c)} +function oNc(a,b,c,d){this.a=a;this.c=b;this.b=c;this.d=d} +function ROc(a,b,c,d){this.c=a;this.b=b;this.a=c;this.d=d} +function uPc(a,b,c,d){this.c=a;this.b=b;this.d=c;this.a=d} +function Uid(a,b,c,d){this.c=a;this.d=b;this.b=c;this.a=d} +function GTc(a,b,c,d){this.a=a;this.d=b;this.c=c;this.b=d} +function t1b(a,b,c,d){this.a=a;this.e=b;this.d=c;this.c=d} +function $td(a,b,c,d){this.a=a;this.c=b;this.d=c;this.b=d} +function ehb(a,b,c){this.a=ywe;this.d=a;this.b=b;this.c=c} +function fpc(a,b,c,d){qs.call(this,a,b);this.a=c;this.b=d} +function Uwb(a,b){this.d=(uFb(a),a);this.a=16449;this.c=b} +function CIc(a){this.a=new bnb;this.e=$C(kE,Nve,53,a,0,2)} +function ELc(a){a.Ug('No crossing minimization',1);a.Vg()} +function Evb(){yz.call(this,'There is no more element.')} +function OEd(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d} +function PEd(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d} +function h7d(a,b,c,d){this.e=a;this.a=b;this.c=c;this.d=d} +function x7d(a,b,c,d){this.a=a;this.c=b;this.d=c;this.b=d} +function C8d(a,b,c,d){s7d();M7d.call(this,b,c,d);this.a=a} +function J8d(a,b,c,d){s7d();M7d.call(this,b,c,d);this.a=a} +function lwd(a,b,c){var d,e;d=oSd(a);e=b.ti(c,d);return e} +function lBd(a){var b,c;c=(b=new s2d,b);l2d(c,a);return c} +function mBd(a){var b,c;c=(b=new s2d,b);p2d(c,a);return c} +function HDd(a,b){var c;c=Wjb(a.f,b);wEd(b,c);return null} +function uCd(a){!a.b&&(a.b=new C5d(G4,a,12,3));return a.b} +function VD(a){CFb(a==null||cE(a)&&!(a.Tm===keb));return a} +function gz(a){if(a.n){a.e!==rwe&&a.je();a.j=null}return a} +function Ng(a){ig(a.d);if(a.d.d!=a.c){throw Adb(new Jrb)}} +function Bkb(a){sFb(a.b<a.d.gc());return a.d.Xb(a.c=a.b++)} +function Xub(a){a.a.a=a.c;a.c.b=a.a;a.a.b=a.c.a=null;a.b=0} +function xPd(a){this.f=a;this.c=this.f.e;a.f>0&&wPd(this)} +function Vg(a,b){this.a=a;Pg.call(this,a,RD(a.d,15).fd(b))} +function lrd(a,b){return Qfb(urd(a)*trd(a),urd(b)*trd(b))} +function mrd(a,b){return Qfb(urd(a)*trd(a),urd(b)*trd(b))} +function n5b(a){return ozd(a)&&Heb(TD(Gxd(a,(yCc(),OAc))))} +function Sfc(a,b){return Rc(a,RD(mQb(b,(yCc(),tBc)),17),b)} +function lic(a,b){RD(mQb(a,(Ywc(),qwc)),15).Fc(b);return b} +function C2b(a,b){a.b=b.b;a.c=b.c;a.d=b.d;a.a=b.a;return a} +function cEb(a,b,c,d){this.b=a;this.c=d;xxb.call(this,b,c)} +function Ulc(a,b,c){a.i=0;a.e=0;if(b==c){return}Qlc(a,b,c)} +function Vlc(a,b,c){a.i=0;a.e=0;if(b==c){return}Rlc(a,b,c)} +function akc(a,b,c){Wjc();return _Gb(RD(Wjb(a.e,b),529),c)} +function nd(a){var b;return b=a.f,!b?(a.f=new ne(a,a.c)):b} +function nTc(a,b){return VTc(a.j,b.s,b.c)+VTc(b.e,a.s,a.c)} +function Rrc(a,b){if(!!a.e&&!a.e.a){Prc(a.e,b);Rrc(a.e,b)}} +function Qrc(a,b){if(!!a.d&&!a.d.a){Prc(a.d,b);Qrc(a.d,b)}} +function krd(a,b){return -Qfb(urd(a)*trd(a),urd(b)*trd(b))} +function gtd(a){return RD(a.ld(),149).Pg()+':'+jeb(a.md())} +function EBd(){BBd(this,new yAd);this.wb=(lTd(),kTd);jTd()} +function G7b(a){this.b=new bnb;Tmb(this.b,this.b);this.a=a} +function WWc(a,b){new Yub;this.a=new Ejd;this.b=a;this.c=b} +function urb(){urb=geb;rrb=new wrb;srb=new wrb;trb=new Brb} +function yob(){yob=geb;vob=new Job;wob=new apb;xob=new ipb} +function FGb(){FGb=geb;CGb=new AGb;EGb=new fHb;DGb=new YGb} +function HSb(){HSb=geb;GSb=new bnb;FSb=new Tsb;ESb=new bnb} +function Rb(a,b){if(a==null){throw Adb(new Ogb(b))}return a} +function tCd(a){!a.a&&(a.a=new C5d(J4,a,10,11));return a.a} +function uYd(a){!a.q&&(a.q=new C5d(s7,a,11,10));return a.q} +function xYd(a){!a.s&&(a.s=new C5d(y7,a,21,17));return a.s} +function er(a){Qb(a);return Er(new is(Mr(a.a.Kc(),new ir)))} +function hfd(a,b){rb(a);rb(b);return ns(RD(a,22),RD(b,22))} +function qDd(a,b,c){var d,e;d=Qeb(c);e=new hC(d);sC(a,b,e)} +function d4d(a,b,c,d,e,f){c4d.call(this,a,b,c,d,e,f?-2:-1)} +function sje(a,b,c,d){kZd.call(this,b,c);this.b=a;this.a=d} +function Ry(a,b){wi.call(this,new ezb(a));this.a=a;this.b=b} +function Gu(a){this.b=a;this.c=a;a.e=null;a.c=null;this.a=1} +function Dkc(a){lkc();var b;b=RD(a.g,10);b.n.a=a.d.c+b.d.b} +function fA(){fA=geb;var a,b;b=!lA();a=new tA;eA=b?new mA:a} +function Hob(a){yob();return ZD(a,59)?new irb(a):new Upb(a)} +function Ux(a){return ZD(a,16)?new btb(RD(a,16)):Vx(a.Kc())} +function Vi(a){return new ij(a,a.e.Rd().gc()*a.c.Rd().gc())} +function fj(a){return new sj(a,a.e.Rd().gc()*a.c.Rd().gc())} +function Iz(a){return !!a&&!!a.hashCode?a.hashCode():kFb(a)} +function Yjb(a,b){return b==null?!!qtb(a.f,null):Jtb(a.i,b)} +function hYb(a,b){var c;c=$sb(a.a,b);c&&(b.d=null);return c} +function MGb(a,b,c){if(a.f){return a.f.ef(b,c)}return false} +function cFc(a,b,c,d){bD(a.c[b.g],c.g,d);bD(a.c[c.g],b.g,d)} +function fFc(a,b,c,d){bD(a.c[b.g],b.g,c);bD(a.b[b.g],b.g,d)} +function sXc(a,b,c){return Kfb(UD(c.a))<=a&&Kfb(UD(c.b))>=b} +function yJc(a,b){this.g=a;this.d=cD(WC(jR,1),WAe,10,0,[b])} +function lHb(a){this.c=a;this.b=new yAb(RD(Qb(new oHb),50))} +function UYb(a){this.c=a;this.b=new yAb(RD(Qb(new XYb),50))} +function $Qb(a){this.b=a;this.a=new yAb(RD(Qb(new bRb),50))} +function tRc(){this.b=new _sb;this.d=new Yub;this.e=new Fyb} +function VTb(){this.c=new pjd;this.d=new pjd;this.e=new pjd} +function a1b(){this.a=new Ejd;this.b=(dk(3,iwe),new cnb(3))} +function i7d(a,b){this.e=a;this.a=jJ;this.b=pje(b);this.c=b} +function Vid(a){this.c=a.c;this.d=a.d;this.b=a.b;this.a=a.a} +function VLd(a,b,c,d,e,f){this.a=a;NKd.call(this,b,c,d,e,f)} +function aLd(a,b,c,d,e,f){this.a=a;NKd.call(this,b,c,d,e,f)} +function fge(a,b,c,d,e,f,g){return new lle(a.e,b,c,d,e,f,g)} +function xhb(a,b,c){return c>=0&&lhb(a.substr(c,b.length),b)} +function hGd(a,b){return ZD(b,149)&&lhb(a.b,RD(b,149).Pg())} +function Tde(a,b){return a.a?b.Gh().Kc():RD(b.Gh(),71).Ii()} +function Qqb(a,b){var c;c=a.b.Qc(b);Rqb(c,a.b.gc());return c} +function Ivb(a,b){if(a==null){throw Adb(new Ogb(b))}return a} +function zYd(a){if(!a.u){yYd(a);a.u=new w0d(a,a)}return a.u} +function Kx(a){this.a=(yob(),ZD(a,59)?new irb(a):new Upb(a))} +function Uwd(a){var b;b=RD(Ywd(a,16),29);return !b?a.ii():b} +function lz(a,b){var c;c=nfb(a.Rm);return b==null?c:c+': '+b} +function zhb(a,b,c){AFb(b,c,a.length);return a.substr(b,c-b)} +function VKb(a,b){RJb.call(this);KKb(this);this.a=a;this.c=b} +function neb(a){!a?vve:lz(a,a.ie());String.fromCharCode(10)} +function Wz(a){Qz();$wnd.setTimeout(function(){throw a},0)} +function GHb(){DHb();return cD(WC(uN,1),jwe,436,0,[CHb,BHb])} +function OHb(){LHb();return cD(WC(vN,1),jwe,435,0,[JHb,KHb])} +function WUb(){TUb();return cD(WC(BP,1),jwe,432,0,[RUb,SUb])} +function S8b(){P8b();return cD(WC(vS,1),jwe,517,0,[O8b,N8b])} +function Rvc(){Ovc();return cD(WC(lX,1),jwe,429,0,[Mvc,Nvc])} +function buc(){$tc();return cD(WC(cX,1),jwe,428,0,[Ytc,Ztc])} +function mtc(){jtc();return cD(WC($W,1),jwe,431,0,[htc,itc])} +function vEc(){sEc();return cD(WC(xX,1),jwe,430,0,[qEc,rEc])} +function vNc(){sNc();return cD(WC(MY,1),jwe,531,0,[rNc,qNc])} +function D2c(){x2c();return cD(WC(s0,1),jwe,501,0,[v2c,w2c])} +function zQc(){wQc();return cD(WC(FZ,1),jwe,523,0,[vQc,uQc])} +function HQc(){EQc();return cD(WC(GZ,1),jwe,522,0,[CQc,DQc])} +function iTc(){fTc();return cD(WC(b$,1),jwe,528,0,[eTc,dTc])} +function Fuc(){Cuc();return cD(WC(fX,1),jwe,488,0,[Buc,Auc])} +function F8c(){z8c();return cD(WC(l1,1),jwe,491,0,[x8c,y8c])} +function H9c(){B9c();return cD(WC(t1,1),jwe,492,0,[z9c,A9c])} +function D_c(){A_c();return cD(WC(K_,1),jwe,433,0,[z_c,y_c])} +function a4c(){Y3c();return cD(WC(H0,1),jwe,434,0,[W3c,X3c])} +function gVc(){dVc();return cD(WC(w$,1),jwe,465,0,[bVc,cVc])} +function Pbd(){Mbd();return cD(WC(O1,1),jwe,438,0,[Lbd,Kbd])} +function rdd(){ldd();return cD(WC(W1,1),jwe,437,0,[kdd,jdd])} +function xqd(){uqd();return cD(WC(M3,1),jwe,347,0,[sqd,tqd])} +function Jvd(a,b,c,d){return c>=0?a.Uh(b,c,d):a.Ch(null,c,d)} +function ltd(a){if(a.b.b==0){return a.a.sf()}return Uub(a.b)} +function vKd(a){if(a.p!=5)throw Adb(new cgb);return Ydb(a.f)} +function EKd(a){if(a.p!=5)throw Adb(new cgb);return Ydb(a.k)} +function P$d(a){dE(a.a)===dE((lYd(),kYd))&&Q$d(a);return a.a} +function iad(a,b){a.b=b;a.c>0&&a.b>0&&(a.g=Aad(a.c,a.b,a.a))} +function jad(a,b){a.c=b;a.c>0&&a.b>0&&(a.g=Aad(a.c,a.b,a.a))} +function BUc(a,b){yUc(this,new rjd(a.a,a.b));zUc(this,gv(b))} +function Tp(){Sp.call(this,new Usb(Sv(12)));Lb(true);this.a=2} +function eue(a,b,c){Vse();Wse.call(this,a);this.b=b;this.a=c} +function C7d(a,b,c){s7d();t7d.call(this,b);this.a=a;this.b=c} +function qub(a){var b;b=a.c.d.b;a.b=b;a.a=a.c.d;b.a=a.c.d.b=a} +function Tub(a){return a.b==0?null:(sFb(a.b!=0),Wub(a,a.a.a))} +function Xjb(a,b){return b==null?Wd(qtb(a.f,null)):Ktb(a.i,b)} +function bzb(a,b,c,d,e){return new Kzb(a,(cAb(),aAb),b,c,d,e)} +function Fnb(a,b){oFb(b);return Hnb(a,$C(kE,Pwe,28,b,15,1),b)} +function Tx(a,b){Rb(a,'set1');Rb(b,'set2');return new ey(a,b)} +function Kz(a,b){var c=Jz[a.charCodeAt(0)];return c==null?a:c} +function Xyb(a,b){var c,d;c=b;d=new Gzb;Zyb(a,c,d);return d.d} +function EMb(a,b,c,d){var e;e=new TJb;b.a[c.g]=e;Wrb(a.b,d,e)} +function SXb(a,b){var c;c=BXb(a.f,b);return $id(fjd(c),a.f.d)} +function RFb(a){var b;EJb(a.a);DJb(a.a);b=new PJb(a.a);LJb(b)} +function _Mb(a,b){$Mb(a,true);Umb(a.e.Rf(),new dNb(a,true,b))} +function PSb(a,b){HSb();return a==vCd(JGd(b))||a==vCd(LGd(b))} +function R0c(a,b){B0c();return RD(mQb(b,(h_c(),f_c)),17).a==a} +function eE(a){return Math.max(Math.min(a,lve),-2147483648)|0} +function sy(a){this.a=RD(Qb(a),277);this.b=(yob(),new jrb(a))} +function qbd(a,b,c){this.i=new bnb;this.b=a;this.g=b;this.a=c} +function had(a,b,c){this.a=new bnb;this.e=a;this.f=b;this.c=c} +function _9c(a,b,c){this.c=new bnb;this.e=a;this.f=b;this.b=c} +function TKb(a){RJb.call(this);KKb(this);this.a=a;this.c=true} +function ieb(a){function b(){} +;b.prototype=a||{};return new b} +function zfb(a){if(a.Ae()){return null}var b=a.n;return eeb[b]} +function kzd(a){if(a.Db>>16!=3)return null;return RD(a.Cb,27)} +function MCd(a){if(a.Db>>16!=9)return null;return RD(a.Cb,27)} +function Fzd(a){if(a.Db>>16!=6)return null;return RD(a.Cb,74)} +function dVc(){dVc=geb;bVc=new eVc(Nye,0);cVc=new eVc(Oye,1)} +function wQc(){wQc=geb;vQc=new xQc(Oye,0);uQc=new xQc(Nye,1)} +function EQc(){EQc=geb;CQc=new FQc(Zye,0);DQc=new FQc('UP',1)} +function Is(){Is=geb;Hs=ss((zs(),cD(WC(RG,1),jwe,549,0,[ys])))} +function Wx(a){var b;b=new atb(Sv(a.length));zob(b,a);return b} +function B2b(a,b){a.b+=b.b;a.c+=b.c;a.d+=b.d;a.a+=b.a;return a} +function qmb(a,b){if(kmb(a,b)){Jmb(a);return true}return false} +function qC(a,b){if(b==null){throw Adb(new Ngb)}return rC(a,b)} +function nB(a,b){var c;c=a.q.getHours();a.q.setDate(b);mB(a,c)} +function Xvd(a,b,c){var d;d=a.Ih(b);d>=0?a.bi(d,c):Svd(a,b,c)} +function Lvd(a,b){var c;c=a.Ih(b);return c>=0?a.Wh(c):Rvd(a,b)} +function zo(a,b){var c;Qb(b);for(c=a.a;c;c=c.c){b.Yd(c.g,c.i)}} +function pMc(a,b,c){var d;d=qMc(a,b,c);a.b=new _Lc(d.c.length)} +function HId(a,b,c){EId();!!a&&Zjb(DId,a,b);!!a&&Zjb(CId,a,c)} +function bfc(a,b){Rec();return Geb(),RD(b.a,17).a<a?true:false} +function afc(a,b){Rec();return Geb(),RD(b.b,17).a<a?true:false} +function R7b(a,b){return $wnd.Math.abs(a)<$wnd.Math.abs(b)?a:b} +function xCd(a){return !a.a&&(a.a=new C5d(J4,a,10,11)),a.a.i>0} +function sId(a){var b;b=a.d;b=a.bj(a.f);WGd(a,b);return b.Ob()} +function bHd(a,b){var c;c=new Kub(b);Ve(c,a);return new dnb(c)} +function qKd(a){if(a.p!=0)throw Adb(new cgb);return Pdb(a.f,0)} +function zKd(a){if(a.p!=0)throw Adb(new cgb);return Pdb(a.k,0)} +function gBd(a){if(a.Db>>16!=7)return null;return RD(a.Cb,241)} +function xXd(a){if(a.Db>>16!=6)return null;return RD(a.Cb,241)} +function dCd(a){if(a.Db>>16!=7)return null;return RD(a.Cb,167)} +function vCd(a){if(a.Db>>16!=11)return null;return RD(a.Cb,27)} +function uWd(a){if(a.Db>>16!=17)return null;return RD(a.Cb,29)} +function kVd(a){if(a.Db>>16!=3)return null;return RD(a.Cb,155)} +function BDb(a){var b;MCb(a);b=new _sb;return CDb(a,new aEb(b))} +function xfb(a,b){var c=a.a=a.a||[];return c[b]||(c[b]=a.ve(b))} +function qB(a,b){var c;c=a.q.getHours();a.q.setMonth(b);mB(a,c)} +function oz(a,b){ez(this);this.f=b;this.g=a;gz(this);this.je()} +function TQb(a,b){this.a=a;this.c=ajd(this.a);this.b=new Vid(b)} +function aGb(a,b,c){this.a=b;this.c=a;this.b=(Qb(c),new dnb(c))} +function s$b(a,b,c){this.a=b;this.c=a;this.b=(Qb(c),new dnb(c))} +function _Kc(a){this.a=a;this.b=$C(qY,Nve,2043,a.e.length,0,2)} +function fGb(){this.a=new Iub;this.e=new _sb;this.g=0;this.i=0} +function EId(){EId=geb;DId=new Tsb;CId=new Tsb;IId(zK,new JId)} +function KFc(){KFc=geb;JFc=nfd(new ufd,(sXb(),rXb),(hcc(),$bc))} +function RFc(){RFc=geb;QFc=nfd(new ufd,(sXb(),rXb),(hcc(),$bc))} +function gGc(){gGc=geb;fGc=nfd(new ufd,(sXb(),rXb),(hcc(),$bc))} +function ANc(){ANc=geb;zNc=pfd(new ufd,(sXb(),rXb),(hcc(),ybc))} +function dOc(){dOc=geb;cOc=pfd(new ufd,(sXb(),rXb),(hcc(),ybc))} +function gQc(){gQc=geb;fQc=pfd(new ufd,(sXb(),rXb),(hcc(),ybc))} +function WQc(){WQc=geb;VQc=pfd(new ufd,(sXb(),rXb),(hcc(),ybc))} +function dZd(a,b,c,d,e,f){return new P3d(a.e,b,a.Lj(),c,d,e,f)} +function $jb(a,b,c){return b==null?rtb(a.f,null,c):Ltb(a.i,b,c)} +function Y0b(a,b){!!a.c&&Ymb(a.c.g,a);a.c=b;!!a.c&&Rmb(a.c.g,a)} +function g3b(a,b){!!a.c&&Ymb(a.c.a,a);a.c=b;!!a.c&&Rmb(a.c.a,a)} +function P3b(a,b){!!a.i&&Ymb(a.i.j,a);a.i=b;!!a.i&&Rmb(a.i.j,a)} +function Z0b(a,b){!!a.d&&Ymb(a.d.e,a);a.d=b;!!a.d&&Rmb(a.d.e,a)} +function _Sc(a,b){!!a.a&&Ymb(a.a.k,a);a.a=b;!!a.a&&Rmb(a.a.k,a)} +function aTc(a,b){!!a.b&&Ymb(a.b.f,a);a.b=b;!!a.b&&Rmb(a.b.f,a)} +function Odd(a,b){Pdd(a,a.b,a.c);RD(a.b.b,68);!!b&&RD(b.b,68).b} +function j2c(a,b){return Qfb(RD(a.c,65).c.e.b,RD(b.c,65).c.e.b)} +function k2c(a,b){return Qfb(RD(a.c,65).c.e.a,RD(b.c,65).c.e.a)} +function YXb(a){NXb();return Geb(),RD(a.a,86).d.e!=0?true:false} +function LXd(a,b){ZD(a.Cb,184)&&(RD(a.Cb,184).tb=null);PAd(a,b)} +function CWd(a,b){ZD(a.Cb,90)&&v$d(yYd(RD(a.Cb,90)),4);PAd(a,b)} +function _5d(a,b){a6d(a,b);ZD(a.Cb,90)&&v$d(yYd(RD(a.Cb,90)),2)} +function JFd(a,b){var c,d;c=b.c;d=c!=null;d&&oDd(a,new OC(b.c))} +function v0d(a){var b,c;c=(jTd(),b=new s2d,b);l2d(c,a);return c} +function E4d(a){var b,c;c=(jTd(),b=new s2d,b);l2d(c,a);return c} +function Fr(a){var b;while(true){b=a.Pb();if(!a.Ob()){return b}}} +function nq(a,b,c){Rmb(a.a,(fn(),ck(b,c),new gp(b,c)));return a} +function rge(a,b){return nke(),wWd(b)?new ole(b,a):new Eke(b,a)} +function ojb(a){Pib();return Ddb(a,0)>=0?jjb(a):Xib(jjb(Odb(a)))} +function Asb(a){var b;b=RD(UEb(a.b),9);return new Fsb(a.a,b,a.c)} +function Qw(a,b){var c;c=RD(Xv(nd(a.a),b),16);return !c?0:c.gc()} +function Zmb(a,b,c){var d;xFb(b,c,a.c.length);d=c-b;$Eb(a.c,b,d)} +function Rkb(a,b,c){xFb(b,c,a.gc());this.c=a;this.a=b;this.b=c-b} +function fgd(a){this.c=new Yub;this.b=a.b;this.d=a.c;this.a=a.a} +function qjd(a){this.a=$wnd.Math.cos(a);this.b=$wnd.Math.sin(a)} +function bTc(a,b,c,d){this.c=a;this.d=d;_Sc(this,b);aTc(this,c)} +function Si(a,b){Qi.call(this,new Usb(Sv(a)));dk(b,Mve);this.a=b} +function Ryb(a,b,c){return new Kzb(a,(cAb(),_zb),null,false,b,c)} +function czb(a,b,c){return new Kzb(a,(cAb(),bAb),b,c,null,false)} +function ABb(){xBb();return cD(WC(QL,1),jwe,108,0,[uBb,vBb,wBb])} +function yLb(){vLb();return cD(WC(TN,1),jwe,472,0,[uLb,tLb,sLb])} +function HKb(){EKb();return cD(WC(MN,1),jwe,471,0,[CKb,BKb,DKb])} +function aKb(){ZJb();return cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb])} +function DWb(){AWb();return cD(WC(JP,1),jwe,391,0,[yWb,xWb,zWb])} +function moc(){joc();return cD(WC(UV,1),jwe,372,0,[ioc,hoc,goc])} +function ytc(){stc();return cD(WC(_W,1),jwe,322,0,[qtc,ptc,rtc])} +function Htc(){Etc();return cD(WC(aX,1),jwe,351,0,[Btc,Dtc,Ctc])} +function kuc(){huc();return cD(WC(dX,1),jwe,460,0,[fuc,euc,guc])} +function Avc(){xvc();return cD(WC(jX,1),jwe,299,0,[vvc,wvc,uvc])} +function Jvc(){Gvc();return cD(WC(kX,1),jwe,311,0,[Evc,Fvc,Dvc])} +function pDc(){lDc();return cD(WC(sX,1),jwe,390,0,[iDc,jDc,kDc])} +function EEc(){BEc();return cD(WC(yX,1),jwe,463,0,[AEc,yEc,zEc])} +function NEc(){KEc();return cD(WC(zX,1),jwe,387,0,[HEc,IEc,JEc])} +function WEc(){TEc();return cD(WC(AX,1),jwe,349,0,[SEc,QEc,REc])} +function oFc(){lFc();return cD(WC(CX,1),jwe,350,0,[iFc,jFc,kFc])} +function xFc(){uFc();return cD(WC(DX,1),jwe,352,0,[tFc,rFc,sFc])} +function GFc(){DFc();return cD(WC(EX,1),jwe,388,0,[BFc,CFc,AFc])} +function UKc(){RKc();return cD(WC(nY,1),jwe,464,0,[OKc,PKc,QKc])} +function K3b(a){return xjd(cD(WC(l3,1),Nve,8,0,[a.i.n,a.n,a.a]))} +function OZc(){LZc();return cD(WC(F_,1),jwe,392,0,[KZc,JZc,IZc])} +function H_c(){H_c=geb;G_c=nfd(new ufd,(YVc(),WVc),(WYc(),MYc))} +function A_c(){A_c=geb;z_c=new B_c('DFS',0);y_c=new B_c('BFS',1)} +function TQc(a,b,c){var d;d=new SQc;d.b=b;d.a=c;++b.b;Rmb(a.d,d)} +function NTb(a,b,c){var d;d=new sjd(c.d);$id(d,a);CGd(b,d.a,d.b)} +function Nwb(a,b){Mwb(a,Ydb(Cdb(Tdb(b,24),Pxe)),Ydb(Cdb(b,Pxe)))} +function wFb(a,b){if(a<0||a>b){throw Adb(new veb(cye+a+dye+b))}} +function tFb(a,b){if(a<0||a>=b){throw Adb(new veb(cye+a+dye+b))}} +function BFb(a,b){if(a<0||a>=b){throw Adb(new eib(cye+a+dye+b))}} +function Swb(a,b){this.b=(uFb(a),a);this.a=(b&qxe)==0?b|64|Ove:b} +function ODb(a){var b;MCb(a);b=(urb(),urb(),srb);return PDb(a,b)} +function R9c(a,b,c){var d;d=S9c(a,b,false);return d.b<=b&&d.a<=c} +function h9c(){b9c();return cD(WC(o1,1),jwe,439,0,[$8c,a9c,_8c])} +function c7c(){_6c();return cD(WC(a1,1),jwe,394,0,[Z6c,$6c,Y6c])} +function i6c(){f6c();return cD(WC(V0,1),jwe,445,0,[c6c,d6c,e6c])} +function D6c(){z6c();return cD(WC(Z0,1),jwe,456,0,[w6c,y6c,x6c])} +function k4c(){g4c();return cD(WC(I0,1),jwe,393,0,[d4c,e4c,f4c])} +function x5c(){t5c();return cD(WC(N0,1),jwe,300,0,[r5c,s5c,q5c])} +function Ind(){Fnd();return cD(WC(y3,1),jwe,346,0,[Dnd,Cnd,End])} +function jbd(){gbd();return cD(WC(I1,1),jwe,444,0,[dbd,ebd,fbd])} +function Rmd(){Omd();return cD(WC(t3,1),jwe,278,0,[Lmd,Mmd,Nmd])} +function pqd(){mqd();return cD(WC(J3,1),jwe,280,0,[kqd,jqd,lqd])} +function bv(a){Qb(a);return ZD(a,16)?new dnb(RD(a,16)):cv(a.Kc())} +function Hz(a,b){return !!a&&!!a.equals?a.equals(b):dE(a)===dE(b)} +function Cdb(a,b){return Edb(tD(Kdb(a)?Wdb(a):a,Kdb(b)?Wdb(b):b))} +function Rdb(a,b){return Edb(zD(Kdb(a)?Wdb(a):a,Kdb(b)?Wdb(b):b))} +function $db(a,b){return Edb(HD(Kdb(a)?Wdb(a):a,Kdb(b)?Wdb(b):b))} +function xs(a,b){var c;c=(uFb(a),a).g;lFb(!!c);uFb(b);return c(b)} +function rv(a,b){var c,d;d=tv(a,b);c=a.a.fd(d);return new Gv(a,c)} +function CXd(a){if(a.Db>>16!=6)return null;return RD(yvd(a),241)} +function sKd(a){if(a.p!=2)throw Adb(new cgb);return Ydb(a.f)&Bwe} +function BKd(a){if(a.p!=2)throw Adb(new cgb);return Ydb(a.k)&Bwe} +function ynb(a){sFb(a.a<a.c.c.length);a.b=a.a++;return a.c.c[a.b]} +function $Gb(a,b){a.b=a.b|b.b;a.c=a.c|b.c;a.d=a.d|b.d;a.a=a.a|b.a} +function NJb(a,b){var c;c=Kfb(UD(a.a.of((umd(),cmd))));OJb(a,b,c)} +function bjb(a,b){cjb.call(this,1,2,cD(WC(kE,1),Pwe,28,15,[a,b]))} +function Yte(a,b,c){Wse.call(this,25);this.b=a;this.a=b;this.c=c} +function xte(a){Vse();Wse.call(this,a);this.c=false;this.a=false} +function xfe(a){a.a==(ree(),qee)&&Dfe(a,see(a.g,a.b));return a.a} +function zfe(a){a.d==(ree(),qee)&&Ffe(a,wee(a.g,a.b));return a.d} +function IZb(a,b){CZb();return a.c==b.c?Qfb(b.d,a.d):Qfb(b.c,a.c)} +function GZb(a,b){CZb();return a.c==b.c?Qfb(b.d,a.d):Qfb(a.c,b.c)} +function HZb(a,b){CZb();return a.c==b.c?Qfb(a.d,b.d):Qfb(a.c,b.c)} +function JZb(a,b){CZb();return a.c==b.c?Qfb(a.d,b.d):Qfb(b.c,a.c)} +function Yrb(a,b){return Dsb(a.a,b)?_Eb(a.b,RD(b,22).g,null):null} +function Lwb(a){return Bdb(Sdb(Hdb(Kwb(a,32)),32),Hdb(Kwb(a,32)))} +function kUb(a){return a.b==null||a.b.length==0?'n_'+a.a:'n_'+a.b} +function aXc(a){return a.c==null||a.c.length==0?'n_'+a.g:'n_'+a.c} +function wYc(a,b){var c;c=a+'';while(c.length<b){c='0'+c}return c} +function vkc(a,b){var c;c=RD(Wjb(a.g,b),60);Umb(b.d,new ulc(a,c))} +function J_b(a,b){var c,d;c=l2b(a);d=l2b(b);return c<d?-1:c>d?1:0} +function Hmc(a,b){var c,d;c=Gmc(b);d=c;return RD(Wjb(a.c,d),17).a} +function CMc(a,b,c){var d;d=a.d[b.p];a.d[b.p]=a.d[c.p];a.d[c.p]=d} +function Jqd(a,b,c){var d;if(a.n&&!!b&&!!c){d=new otd;Rmb(a.e,d)}} +function gYb(a,b){Ysb(a.a,b);if(b.d){throw Adb(new yz(jye))}b.d=a} +function Had(a,b){this.a=new bnb;this.d=new bnb;this.f=a;this.c=b} +function RWb(){this.c=new dXb;this.a=new I_b;this.b=new E0b;g0b()} +function med(){hed();this.b=new Tsb;this.a=new Tsb;this.c=new bnb} +function KKd(a,b,c){this.d=a;this.j=b;this.e=c;this.o=-1;this.p=3} +function LKd(a,b,c){this.d=a;this.k=b;this.f=c;this.o=-1;this.p=5} +function S3d(a,b,c,d,e,f){R3d.call(this,a,b,c,d,e);f&&(this.o=-2)} +function U3d(a,b,c,d,e,f){T3d.call(this,a,b,c,d,e);f&&(this.o=-2)} +function W3d(a,b,c,d,e,f){V3d.call(this,a,b,c,d,e);f&&(this.o=-2)} +function Y3d(a,b,c,d,e,f){X3d.call(this,a,b,c,d,e);f&&(this.o=-2)} +function $3d(a,b,c,d,e,f){Z3d.call(this,a,b,c,d,e);f&&(this.o=-2)} +function a4d(a,b,c,d,e,f){_3d.call(this,a,b,c,d,e);f&&(this.o=-2)} +function f4d(a,b,c,d,e,f){e4d.call(this,a,b,c,d,e);f&&(this.o=-2)} +function h4d(a,b,c,d,e,f){g4d.call(this,a,b,c,d,e);f&&(this.o=-2)} +function N7d(a,b,c,d){t7d.call(this,c);this.b=a;this.c=b;this.d=d} +function mfe(a,b){this.f=a;this.a=(ree(),pee);this.c=pee;this.b=b} +function Jfe(a,b){this.g=a;this.d=(ree(),qee);this.a=qee;this.b=b} +function Gme(a,b){!a.c&&(a.c=new Uge(a,0));Fge(a.c,(nme(),fme),b)} +function Oge(a,b){return Pge(a,b,ZD(b,102)&&(RD(b,19).Bb&txe)!=0)} +function lB(a,b){return Agb(Hdb(a.q.getTime()),Hdb(b.q.getTime()))} +function gj(a){return fk(a.e.Rd().gc()*a.c.Rd().gc(),16,new qj(a))} +function CYd(a){return !!a.u&&tYd(a.u.a).i!=0&&!(!!a.n&&d$d(a.n))} +function p4d(a){return !!a.a&&o4d(a.a.a).i!=0&&!(!!a.b&&o5d(a.b))} +function Cxd(a,b){if(b==0){return !!a.o&&a.o.f!=0}return Kvd(a,b)} +function Cc(a,b,c){var d;d=RD(a.Zb().xc(b),16);return !!d&&d.Hc(c)} +function Gc(a,b,c){var d;d=RD(a.Zb().xc(b),16);return !!d&&d.Mc(c)} +function _yb(a,b){var c;c=1-b;a.a[c]=azb(a.a[c],c);return azb(a,b)} +function DFb(a,b){var c,d;d=Cdb(a,yxe);c=Sdb(b,32);return Rdb(c,d)} +function bGb(a,b,c){var d;d=(Qb(a),new dnb(a));_Fb(new aGb(d,b,c))} +function t$b(a,b,c){var d;d=(Qb(a),new dnb(a));r$b(new s$b(d,b,c))} +function vBd(a,b,c,d,e,f){wBd(a,b,c,f);EYd(a,d);FYd(a,e);return a} +function Xhb(a,b,c,d){a.a+=''+zhb(b==null?vve:jeb(b),c,d);return a} +function Jkb(a,b){this.a=a;Dkb.call(this,a);wFb(b,a.gc());this.b=b} +function xmb(a){this.a=$C(jJ,rve,1,mgb($wnd.Math.max(8,a))<<1,5,1)} +function t2b(a){return RD(anb(a,$C(jR,WAe,10,a.c.length,0,1)),199)} +function s2b(a){return RD(anb(a,$C(WQ,VAe,18,a.c.length,0,1)),483)} +function Iyb(a){return !a.a?a.c:a.e.length==0?a.a.a:a.a.a+(''+a.e)} +function Rib(a){while(a.d>0&&a.a[--a.d]==0);a.a[a.d++]==0&&(a.e=0)} +function fvb(a){sFb(a.b.b!=a.d.a);a.c=a.b=a.b.b;--a.a;return a.c.c} +function sRc(a,b,c){a.a=b;a.c=c;a.b.a.$b();Xub(a.d);aFb(a.e.a.c,0)} +function Z5c(a,b){var c;a.e=new R5c;c=Q2c(b);_mb(c,a.c);$5c(a,c,0)} +function zgd(a,b,c,d){var e;e=new Hgd;e.a=b;e.b=c;e.c=d;Mub(a.a,e)} +function Agd(a,b,c,d){var e;e=new Hgd;e.a=b;e.b=c;e.c=d;Mub(a.b,e)} +function Tb(a,b,c){if(a<0||b<a||b>c){throw Adb(new veb(Kb(a,b,c)))}} +function Pb(a,b){if(a<0||a>=b){throw Adb(new veb(Ib(a,b)))}return a} +function qz(b){if(!('stack' in b)){try{throw b}catch(a){}}return b} +function Zjc(a){Wjc();if(ZD(a.g,10)){return RD(a.g,10)}return null} +function nx(a){if(Ih(a).dc()){return false}Jh(a,new rx);return true} +function Xdb(a){var b;if(Kdb(a)){b=a;return b==-0.?0:b}return ED(a)} +function lkb(a,b){if(ZD(b,44)){return Jd(a.a,RD(b,44))}return false} +function gsb(a,b){if(ZD(b,44)){return Jd(a.a,RD(b,44))}return false} +function vub(a,b){if(ZD(b,44)){return Jd(a.a,RD(b,44))}return false} +function RCb(a){var b;LCb(a);b=new Prb;ixb(a.a,new fDb(b));return b} +function Vae(){var a,b,c;b=(c=(a=new s2d,a),c);Rmb(Rae,b);return b} +function mDb(a){var b;LCb(a);b=new ltb;ixb(a.a,new uDb(b));return b} +function jDb(a,b){if(a.a<=a.b){b.Dd(a.a++);return true}return false} +function xzb(a){yzb.call(this,a,(cAb(),$zb),null,false,null,false)} +function $Rb(){$Rb=geb;ZRb=ss((VRb(),cD(WC($O,1),jwe,489,0,[URb])))} +function CHc(){CHc=geb;BHc=yx(sgb(1),sgb(4));AHc=yx(sgb(1),sgb(2))} +function yXc(a,b){return new gud(b,njd(ajd(b.e),a,a),(Geb(),true))} +function fv(a){return new cnb((dk(a,lwe),dz(Bdb(Bdb(5,a),a/10|0))))} +function Wi(a){return fk(a.e.Rd().gc()*a.c.Rd().gc(),273,new kj(a))} +function u2b(a){return RD(anb(a,$C(xR,XAe,12,a.c.length,0,1)),2042)} +function COc(a){dOc();return !W0b(a)&&!(!W0b(a)&&a.c.i.c==a.d.i.c)} +function Y_c(a,b){R_c();return RD(mQb(b,(h_c(),W$c)),17).a>=a.gc()} +function q8b(a,b){w8b(b,a);y8b(a.d);y8b(RD(mQb(a,(yCc(),cBc)),214))} +function r8b(a,b){z8b(b,a);B8b(a.d);B8b(RD(mQb(a,(yCc(),cBc)),214))} +function $0b(a,b,c){!!a.d&&Ymb(a.d.e,a);a.d=b;!!a.d&&Qmb(a.d.e,c,a)} +function jPb(a,b,c){return c.f.c.length>0?yPb(a.a,b,c):yPb(a.b,b,c)} +function Uz(a,b,c){var d;d=Sz();try{return Rz(a,b,c)}finally{Vz(d)}} +function wDd(a,b){var c,d;c=qC(a,b);d=null;!!c&&(d=c.pe());return d} +function yDd(a,b){var c,d;c=qC(a,b);d=null;!!c&&(d=c.se());return d} +function xDd(a,b){var c,d;c=JB(a,b);d=null;!!c&&(d=c.se());return d} +function zDd(a,b){var c,d;c=qC(a,b);d=null;!!c&&(d=ADd(c));return d} +function rEd(a,b,c){var d;d=uDd(c);Do(a.g,d,b);Do(a.i,b,c);return b} +function UIc(a,b,c){this.d=new fJc(this);this.e=a;this.i=b;this.f=c} +function Mk(a,b,c,d){this.e=null;this.c=a;this.d=b;this.a=c;this.b=d} +function urc(a,b,c,d){nrc(this);this.c=a;this.e=b;this.f=c;this.b=d} +function MKd(a,b,c,d){this.d=a;this.n=b;this.g=c;this.o=d;this.p=-1} +function Vc(a,b,c,d){return ZD(c,59)?new Kg(a,b,c,d):new yg(a,b,c,d)} +function gr(a){if(ZD(a,16)){return RD(a,16).dc()}return !a.Kc().Ob()} +function Wo(a){if(a.e.g!=a.b){throw Adb(new Jrb)}return !!a.c&&a.d>0} +function evb(a){sFb(a.b!=a.d.c);a.c=a.b;a.b=a.b.a;++a.a;return a.c.c} +function imb(a,b){uFb(b);bD(a.a,a.c,b);a.c=a.c+1&a.a.length-1;mmb(a)} +function hmb(a,b){uFb(b);a.b=a.b-1&a.a.length-1;bD(a.a,a.b,b);mmb(a)} +function _je(a){var b;b=a.Gh();this.a=ZD(b,71)?RD(b,71).Ii():b.Kc()} +function px(a){return new Swb(Dob(RD(a.a.md(),16).gc(),a.a.ld()),16)} +function Abd(){Abd=geb;zbd=ss((sbd(),cD(WC(M1,1),jwe,490,0,[rbd])))} +function Jbd(){Jbd=geb;Ibd=ss((Cbd(),cD(WC(N1,1),jwe,558,0,[Bbd])))} +function idd(){idd=geb;hdd=ss((_cd(),cD(WC(V1,1),jwe,539,0,[$cd])))} +function X$b(){U$b();return cD(WC(CQ,1),jwe,389,0,[T$b,R$b,Q$b,S$b])} +function hAb(){cAb();return cD(WC(AL,1),jwe,304,0,[$zb,_zb,aAb,bAb])} +function LPb(){IPb();return cD(WC(DO,1),jwe,332,0,[FPb,EPb,GPb,HPb])} +function LRb(){IRb();return cD(WC(WO,1),jwe,406,0,[FRb,ERb,GRb,HRb])} +function pOb(){mOb();return cD(WC(hO,1),jwe,417,0,[lOb,iOb,jOb,kOb])} +function uZb(){nZb();return cD(WC(lQ,1),jwe,416,0,[jZb,mZb,kZb,lZb])} +function hnc(){enc();return cD(WC(LV,1),jwe,421,0,[anc,bnc,cnc,dnc])} +function zec(){vec();return cD(WC(qT,1),jwe,371,0,[uec,sec,tec,rec])} +function BDc(){wDc();return cD(WC(tX,1),jwe,203,0,[uDc,vDc,tDc,sDc])} +function nEc(){kEc();return cD(WC(wX,1),jwe,284,0,[hEc,gEc,iEc,jEc])} +function Unc(a){var b;return a.j==(qpd(),npd)&&(b=Vnc(a),Csb(b,Xod))} +function qhc(a,b){var c;c=b.a;Y0b(c,b.c.d);Z0b(c,b.d.d);Cjd(c.a,a.n)} +function _5b(a,b){var c;c=RD(cub(a.b,b),67);!c&&(c=new Yub);return c} +function $jc(a){Wjc();if(ZD(a.g,154)){return RD(a.g,154)}return null} +function gRc(a){a.a=null;a.e=null;aFb(a.b.c,0);aFb(a.f.c,0);a.c=null} +function Ovc(){Ovc=geb;Mvc=new Pvc(Kye,0);Nvc=new Pvc('TOP_LEFT',1)} +function sNc(){sNc=geb;rNc=new tNc('UPPER',0);qNc=new tNc('LOWER',1)} +function nWc(a,b){return cjd(new rjd(b.e.a+b.f.a/2,b.e.b+b.f.b/2),a)} +function wqc(a,b){return RD(Lvb(JDb(RD(Qc(a.k,b),15).Oc(),lqc)),113)} +function xqc(a,b){return RD(Lvb(KDb(RD(Qc(a.k,b),15).Oc(),lqc)),113)} +function cWc(){YVc();return cD(WC(H$,1),jwe,405,0,[UVc,VVc,WVc,XVc])} +function v_c(){s_c();return cD(WC(J_,1),jwe,353,0,[r_c,p_c,q_c,o_c])} +function n5c(){j5c();return cD(WC(M0,1),jwe,354,0,[i5c,g5c,h5c,f5c])} +function Tpd(){Qpd();return cD(WC(H3,1),jwe,386,0,[Opd,Ppd,Npd,Mpd])} +function Tnd(){Pnd();return cD(WC(z3,1),jwe,291,0,[Ond,Lnd,Mnd,Nnd])} +function _md(){Ymd();return cD(WC(u3,1),jwe,223,0,[Xmd,Vmd,Umd,Wmd])} +function Jrd(){Grd();return cD(WC(R3,1),jwe,320,0,[Frd,Crd,Erd,Drd])} +function wtd(){ttd();return cD(WC(n4,1),jwe,415,0,[qtd,rtd,ptd,std])} +function GId(a){EId();return Ujb(DId,a)?RD(Wjb(DId,a),341).Qg():null} +function Avd(a,b,c){return b<0?Rvd(a,c):RD(c,69).wk().Bk(a,a.hi(),b)} +function sEd(a,b,c){var d;d=uDd(c);Do(a.j,d,b);Zjb(a.k,b,c);return b} +function qEd(a,b,c){var d;d=uDd(c);Do(a.d,d,b);Zjb(a.e,b,c);return b} +function DGd(a){var b,c;b=(bvd(),c=new rzd,c);!!a&&pzd(b,a);return b} +function WHd(a){var b;b=a.aj(a.i);a.i>0&&hib(a.g,0,b,0,a.i);return b} +function Led(a,b){var c;for(c=a.j.c.length;c<b;c++){Rmb(a.j,a.Ng())}} +function $Ec(a,b,c,d){var e;e=d[b.g][c.g];return Kfb(UD(mQb(a.a,e)))} +function QRd(a,b){PRd();var c;c=RD(Wjb(ORd,a),57);return !c||c.fk(b)} +function rKd(a){if(a.p!=1)throw Adb(new cgb);return Ydb(a.f)<<24>>24} +function AKd(a){if(a.p!=1)throw Adb(new cgb);return Ydb(a.k)<<24>>24} +function GKd(a){if(a.p!=7)throw Adb(new cgb);return Ydb(a.k)<<16>>16} +function xKd(a){if(a.p!=7)throw Adb(new cgb);return Ydb(a.f)<<16>>16} +function Wib(a,b){if(b.e==0||a.e==0){return Oib}return Ljb(),Mjb(a,b)} +function Nd(a,b){return dE(b)===dE(a)?'(this Map)':b==null?vve:jeb(b)} +function MFb(a,b,c){return Jfb(UD(Wd(qtb(a.f,b))),UD(Wd(qtb(a.f,c))))} +function wkc(a,b,c){var d;d=RD(Wjb(a.g,c),60);Rmb(a.a.c,new Ptd(b,d))} +function Slc(a,b,c){a.i=0;a.e=0;if(b==c){return}Rlc(a,b,c);Qlc(a,b,c)} +function rTc(a,b,c,d,e){var f;f=mTc(e,c,d);Rmb(b,TSc(e,f));vTc(a,e,b)} +function Jrc(a,b,c,d,e){this.i=a;this.a=b;this.e=c;this.j=d;this.f=e} +function iUb(a,b){VTb.call(this);this.a=a;this.b=b;Rmb(this.a.b,this)} +function rTb(a){this.b=new Tsb;this.c=new Tsb;this.d=new Tsb;this.a=a} +function Dx(a,b){var c;c=new cib;a.Gd(c);c.a+='..';b.Hd(c);return c.a} +function Fsd(a,b){var c;c=b;while(c){Zid(a,c.i,c.j);c=vCd(c)}return a} +function pEd(a,b,c){var d;d=uDd(c);Zjb(a.b,d,b);Zjb(a.c,b,c);return b} +function Kr(a){var b;b=0;while(a.Ob()){a.Pb();b=Bdb(b,1)}return dz(b)} +function oke(a,b){nke();var c;c=RD(a,69).vk();K6d(c,b);return c.xl(b)} +function tC(d,a,b){if(b){var c=b.oe();d.a[a]=c(b)}else{delete d.a[a]}} +function tB(a,b){var c;c=a.q.getHours();a.q.setFullYear(b+Owe);mB(a,c)} +function KSd(a,b){return RD(b==null?Wd(qtb(a.f,null)):Ktb(a.i,b),288)} +function hOc(a,b){return a==(r3b(),p3b)&&b==p3b?4:a==p3b||b==p3b?8:32} +function cge(a,b,c){return dge(a,b,c,ZD(b,102)&&(RD(b,19).Bb&txe)!=0)} +function jge(a,b,c){return kge(a,b,c,ZD(b,102)&&(RD(b,19).Bb&txe)!=0)} +function Qge(a,b,c){return Rge(a,b,c,ZD(b,102)&&(RD(b,19).Bb&txe)!=0)} +function jmb(a){if(a.b==a.c){return}a.a=$C(jJ,rve,1,8,5,1);a.b=0;a.c=0} +function Nsb(a){sFb(a.a<a.c.a.length);a.b=a.a;Lsb(a);return a.c.b[a.b]} +function tYd(a){if(!a.n){yYd(a);a.n=new h$d(a,o7,a);zYd(a)}return a.n} +function oFb(a){if(a<0){throw Adb(new Mgb('Negative array size: '+a))}} +function LB(d,a,b){if(b){var c=b.oe();b=c(b)}else{b=undefined}d.a[a]=b} +function ygc(a,b){sgc();var c;c=a.j.g-b.j.g;if(c!=0){return c}return 0} +function l_d(a,b){gib();String.fromCharCode(10);return WGd(xYd(a.a),b)} +function q_d(a,b){gib();String.fromCharCode(10);return WGd(xYd(a.a),b)} +function ajb(a,b){Pib();cjb.call(this,a,1,cD(WC(kE,1),Pwe,28,15,[b]))} +function Kte(a,b){Vse();Wse.call(this,a);this.a=b;this.c=-1;this.b=-1} +function L3d(a,b,c,d){KKd.call(this,1,c,d);J3d(this);this.c=a;this.b=b} +function M3d(a,b,c,d){LKd.call(this,1,c,d);J3d(this);this.c=a;this.b=b} +function lle(a,b,c,d,e,f,g){NKd.call(this,b,d,e,f,g);this.c=a;this.a=c} +function j7d(a,b,c){this.e=a;this.a=jJ;this.b=pje(b);this.c=b;this.d=c} +function Xo(a){this.e=a;this.c=this.e.a;this.b=this.e.g;this.d=this.e.i} +function Qtb(a){this.d=a;this.b=this.d.a.entries();this.a=this.b.next()} +function N9d(a){this.c=a;this.a=RD(WVd(a),156);this.b=this.a.jk().wi()} +function gub(){Tsb.call(this);_tb(this);this.d.b=this.d;this.d.a=this.d} +function Pub(a,b,c,d){var e;e=new svb;e.c=b;e.b=c;e.a=d;d.b=c.a=e;++a.b} +function USd(a,b){var c;return c=b!=null?Xjb(a,b):Wd(qtb(a.f,b)),fE(c)} +function dTd(a,b){var c;return c=b!=null?Xjb(a,b):Wd(qtb(a.f,b)),fE(c)} +function zDb(a,b){var c;return b.b.Kb(LDb(a,b.c.Xe(),(c=new OEb(b),c)))} +function Gnb(a,b){var c;oFb(b);return c=a.slice(0,b),c.length=b,dD(c,a)} +function Rqb(a,b){var c;for(c=0;c<b;++c){bD(a,c,new brb(RD(a[c],44)))}} +function Tib(a,b){var c;for(c=a.d-1;c>=0&&a.a[c]===b[c];c--);return c<0} +function Xx(a){var b;if(a){return new Kub(a)}b=new Iub;_q(b,a);return b} +function nmc(a,b){var c,d;d=false;do{c=qmc(a,b);d=d|c}while(c);return d} +function Vz(a){a&&aA(($z(),Zz));--Nz;if(a){if(Pz!=-1){Xz(Pz);Pz=-1}}} +function Pwb(a){Hwb();Mwb(this,Ydb(Cdb(Tdb(a,24),Pxe)),Ydb(Cdb(a,Pxe)))} +function IHb(){IHb=geb;HHb=ss((DHb(),cD(WC(uN,1),jwe,436,0,[CHb,BHb])))} +function QHb(){QHb=geb;PHb=ss((LHb(),cD(WC(vN,1),jwe,435,0,[JHb,KHb])))} +function YUb(){YUb=geb;XUb=ss((TUb(),cD(WC(BP,1),jwe,432,0,[RUb,SUb])))} +function U8b(){U8b=geb;T8b=ss((P8b(),cD(WC(vS,1),jwe,517,0,[O8b,N8b])))} +function Tvc(){Tvc=geb;Svc=ss((Ovc(),cD(WC(lX,1),jwe,429,0,[Mvc,Nvc])))} +function duc(){duc=geb;cuc=ss(($tc(),cD(WC(cX,1),jwe,428,0,[Ytc,Ztc])))} +function Huc(){Huc=geb;Guc=ss((Cuc(),cD(WC(fX,1),jwe,488,0,[Buc,Auc])))} +function xEc(){xEc=geb;wEc=ss((sEc(),cD(WC(xX,1),jwe,430,0,[qEc,rEc])))} +function xNc(){xNc=geb;wNc=ss((sNc(),cD(WC(MY,1),jwe,531,0,[rNc,qNc])))} +function otc(){otc=geb;ntc=ss((jtc(),cD(WC($W,1),jwe,431,0,[htc,itc])))} +function F_c(){F_c=geb;E_c=ss((A_c(),cD(WC(K_,1),jwe,433,0,[z_c,y_c])))} +function F2c(){F2c=geb;E2c=ss((x2c(),cD(WC(s0,1),jwe,501,0,[v2c,w2c])))} +function BQc(){BQc=geb;AQc=ss((wQc(),cD(WC(FZ,1),jwe,523,0,[vQc,uQc])))} +function JQc(){JQc=geb;IQc=ss((EQc(),cD(WC(GZ,1),jwe,522,0,[CQc,DQc])))} +function kTc(){kTc=geb;jTc=ss((fTc(),cD(WC(b$,1),jwe,528,0,[eTc,dTc])))} +function iVc(){iVc=geb;hVc=ss((dVc(),cD(WC(w$,1),jwe,465,0,[bVc,cVc])))} +function c4c(){c4c=geb;b4c=ss((Y3c(),cD(WC(H0,1),jwe,434,0,[W3c,X3c])))} +function H8c(){H8c=geb;G8c=ss((z8c(),cD(WC(l1,1),jwe,491,0,[x8c,y8c])))} +function J9c(){J9c=geb;I9c=ss((B9c(),cD(WC(t1,1),jwe,492,0,[z9c,A9c])))} +function Rbd(){Rbd=geb;Qbd=ss((Mbd(),cD(WC(O1,1),jwe,438,0,[Lbd,Kbd])))} +function tdd(){tdd=geb;sdd=ss((ldd(),cD(WC(W1,1),jwe,437,0,[kdd,jdd])))} +function Eqd(){Eqd=geb;Dqd=ss((uqd(),cD(WC(M3,1),jwe,347,0,[sqd,tqd])))} +function Imd(){Cmd();return cD(WC(s3,1),jwe,88,0,[Amd,zmd,ymd,xmd,Bmd])} +function xpd(){qpd();return cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])} +function LSd(a,b,c){return RD(b==null?rtb(a.f,null,c):Ltb(a.i,b,c),288)} +function L6b(a){return (a.k==(r3b(),p3b)||a.k==m3b)&&nQb(a,(Ywc(),cwc))} +function bUb(a){return !!a.c&&!!a.d?kUb(a.c)+'->'+kUb(a.d):'e_'+kFb(a)} +function xgb(a,b){var c,d;uFb(b);for(d=a.Kc();d.Ob();){c=d.Pb();b.Cd(c)}} +function jEd(a,b){var c;c=new uC;qDd(c,'x',b.a);qDd(c,'y',b.b);oDd(a,c)} +function mEd(a,b){var c;c=new uC;qDd(c,'x',b.a);qDd(c,'y',b.b);oDd(a,c)} +function Gsd(a,b){var c;c=b;while(c){Zid(a,-c.i,-c.j);c=vCd(c)}return a} +function ZLc(a,b){var c,d;c=b;d=0;while(c>0){d+=a.a[c];c-=c&-c}return d} +function $mb(a,b,c){var d;d=(tFb(b,a.c.length),a.c[b]);a.c[b]=c;return d} +function uIc(a,b,c){a.a.c.length=0;yIc(a,b,c);a.a.c.length==0||rIc(a,b)} +function wo(a){a.i=0;Mnb(a.b,null);Mnb(a.c,null);a.a=null;a.e=null;++a.g} +function gBb(){gBb=geb;dBb=true;bBb=false;cBb=false;fBb=false;eBb=false} +function oBb(a){gBb();if(dBb){return}this.c=a;this.e=true;this.a=new bnb} +function kDb(a,b){this.c=0;this.b=b;txb.call(this,a,17493);this.a=this.c} +function S_b(a){P_b();A$b(this);this.a=new Yub;Q_b(this,a);Mub(this.a,a)} +function m_b(){Pmb(this);this.b=new rjd(oxe,oxe);this.a=new rjd(pxe,pxe)} +function z8c(){z8c=geb;x8c=new B8c(CBe,0);y8c=new B8c('TARGET_WIDTH',1)} +function yDb(a,b){return (MCb(a),QDb(new SDb(a,new hEb(b,a.a)))).Bd(wDb)} +function vXb(){sXb();return cD(WC(UP,1),jwe,367,0,[nXb,oXb,pXb,qXb,rXb])} +function Fnc(){Bnc();return cD(WC(TV,1),jwe,375,0,[xnc,znc,Anc,ync,wnc])} +function Vtc(){Ptc();return cD(WC(bX,1),jwe,348,0,[Ltc,Ktc,Ntc,Otc,Mtc])} +function PDc(){JDc();return cD(WC(uX,1),jwe,323,0,[IDc,FDc,GDc,EDc,HDc])} +function fxc(){cxc();return cD(WC(mX,1),jwe,171,0,[bxc,Zwc,$wc,_wc,axc])} +function k3c(){g3c();return cD(WC(x0,1),jwe,368,0,[e3c,b3c,f3c,c3c,d3c])} +function vad(){sad();return cD(WC(x1,1),jwe,373,0,[oad,nad,qad,pad,rad])} +function $bd(){Xbd();return cD(WC(P1,1),jwe,324,0,[Sbd,Tbd,Wbd,Ubd,Vbd])} +function _hd(){Yhd();return cD(WC(d3,1),jwe,170,0,[Whd,Vhd,Thd,Xhd,Uhd])} +function sod(){pod();return cD(WC(B3,1),jwe,256,0,[mod,ood,kod,lod,nod])} +function Tz(b){Qz();return function(){return Uz(b,this,arguments);var a}} +function W0b(a){if(!a.c||!a.d){return false}return !!a.c.i&&a.c.i==a.d.i} +function Nfd(a,b){if(ZD(b,143)){return lhb(a.c,RD(b,143).c)}return false} +function yYd(a){if(!a.t){a.t=new w$d(a);VGd(new Cde(a),0,a.t)}return a.t} +function jNd(a){this.b=a;dMd.call(this,a);this.a=RD(Ywd(this.b.a,4),129)} +function sNd(a){this.b=a;yMd.call(this,a);this.a=RD(Ywd(this.b.a,4),129)} +function Q3d(a,b,c,d,e){OKd.call(this,b,d,e);J3d(this);this.c=a;this.b=c} +function V3d(a,b,c,d,e){KKd.call(this,b,d,e);J3d(this);this.c=a;this.a=c} +function Z3d(a,b,c,d,e){LKd.call(this,b,d,e);J3d(this);this.c=a;this.a=c} +function g4d(a,b,c,d,e){OKd.call(this,b,d,e);J3d(this);this.c=a;this.a=c} +function ugd(a,b){var c;c=RD(cub(a.d,b),23);return c?c:RD(cub(a.e,b),23)} +function Blb(a,b){var c,d;c=b.ld();d=a.Fe(c);return !!d&&Fvb(d.e,b.md())} +function me(a,b){var c;c=b.ld();return new gp(c,a.e.pc(c,RD(b.md(),16)))} +function ptb(a,b){var c;c=a.a.get(b);return c==null?$C(jJ,rve,1,0,5,1):c} +function khb(a){var b;b=a.length;return lhb(sxe.substr(sxe.length-b,b),a)} +function hs(a){if(gs(a)){a.c=a.a;return a.a.Pb()}else{throw Adb(new Dvb)}} +function $ib(a,b){if(b==0||a.e==0){return a}return b>0?tjb(a,b):qjb(a,-b)} +function Zib(a,b){if(b==0||a.e==0){return a}return b>0?qjb(a,b):tjb(a,-b)} +function Deb(a){Beb.call(this,a==null?vve:jeb(a),ZD(a,82)?RD(a,82):null)} +function Y5d(a){var b;if(!a.c){b=a.r;ZD(b,90)&&(a.c=RD(b,29))}return a.c} +function s0b(a){var b;b=new a1b;kQb(b,a);pQb(b,(yCc(),RAc),null);return b} +function lec(a){var b,c;b=a.c.i;c=a.d.i;return b.k==(r3b(),m3b)&&c.k==m3b} +function fD(a){var b,c,d;b=a&dxe;c=a>>22&dxe;d=a<0?exe:0;return hD(b,c,d)} +function Ky(a){var b,c,d,e;for(c=a,d=0,e=c.length;d<e;++d){b=c[d];ICb(b)}} +function Tc(a,b){var c,d;c=RD(Yv(a.c,b),16);if(c){d=c.gc();c.$b();a.d-=d}} +function Fvd(a,b,c){var d;return d=a.Ih(b),d>=0?a.Lh(d,c,true):Qvd(a,b,c)} +function AXc(a,b,c){return Qfb(cjd(jWc(a),ajd(b.b)),cjd(jWc(a),ajd(c.b)))} +function BXc(a,b,c){return Qfb(cjd(jWc(a),ajd(b.e)),cjd(jWc(a),ajd(c.e)))} +function Kad(a,b){return $wnd.Math.min(bjd(b.a,a.d.d.c),bjd(b.b,a.d.d.c))} +function LHd(a,b){a._i(a.i+1);MHd(a,a.i,a.Zi(a.i,b));a.Mi(a.i++,b);a.Ni()} +function OHd(a){var b,c;++a.j;b=a.g;c=a.i;a.g=null;a.i=0;a.Oi(c,b);a.Ni()} +function yke(a,b,c){var d;d=new zke(a.a);Ld(d,a.a.a);rtb(d.f,b,c);a.a.a=d} +function mKb(a,b,c,d){var e;for(e=0;e<jKb;e++){dKb(a.a[e][b.g],c,d[b.g])}} +function lKb(a,b,c,d){var e;for(e=0;e<iKb;e++){eKb(a.a[b.g][e],c,d[b.g])}} +function Qc(a,b){var c;c=RD(a.c.xc(b),16);!c&&(c=a.ic(b));return a.pc(b,c)} +function vm(a){var b;b=(Qb(a),a?new dnb(a):cv(a.Kc()));Eob(b);return Pm(b)} +function dv(a){var b,c;Qb(a);b=Zu(a.length);c=new cnb(b);zob(c,a);return c} +function Hjb(a,b,c,d){var e;e=$C(kE,Pwe,28,b,15,1);Ijb(e,a,b,c,d);return e} +function Sb(a,b){if(a<0||a>b){throw Adb(new veb(Jb(a,b,'index')))}return a} +function Xmb(a,b){var c;c=(tFb(b,a.c.length),a.c[b]);$Eb(a.c,b,1);return c} +function jhb(a,b){var c,d;c=(uFb(a),a);d=(uFb(b),b);return c==d?0:c<d?-1:1} +function Orb(a){var b;b=a.e+a.f;if(isNaN(b)&&Rfb(a.d)){return a.d}return b} +function zc(a){a.e=3;a.d=a.Yb();if(a.e!=2){a.e=0;return true}return false} +function Gyb(a,b){!a.a?(a.a=new dib(a.d)):Zhb(a.a,a.b);Whb(a.a,b);return a} +function _jb(a,b){return bE(b)?b==null?stb(a.f,null):Mtb(a.i,b):stb(a.f,b)} +function nEb(a,b){pxb.call(this,b.zd(),b.yd()&-6);uFb(a);this.a=a;this.b=b} +function tEb(a,b){txb.call(this,b.zd(),b.yd()&-6);uFb(a);this.a=a;this.b=b} +function zEb(a,b){xxb.call(this,b.zd(),b.yd()&-6);uFb(a);this.a=a;this.b=b} +function M7d(a,b,c){t7d.call(this,c);this.b=a;this.c=b;this.d=(a8d(),$7d)} +function OKd(a,b,c){this.d=a;this.k=b?1:0;this.f=c?1:0;this.o=-1;this.p=0} +function l4b(a){this.c=a;this.a=new Anb(this.c.a);this.b=new Anb(this.c.b)} +function gUb(){this.e=new bnb;this.c=new bnb;this.d=new bnb;this.b=new bnb} +function DIb(){this.g=new GIb;this.b=new GIb;this.a=new bnb;this.k=new bnb} +function I_b(){this.a=new J$b;this.b=new N$b;this.d=new Z_b;this.e=new V_b} +function knc(a,b,c){this.a=a;this.c=b;this.d=c;Rmb(b.e,this);Rmb(c.b,this)} +function sIc(a,b,c){var d,e;d=0;for(e=0;e<b.length;e++){d+=a.tg(b[e],d,c)}} +function nMc(a,b){var c;c=tMc(a,b);a.b=new _Lc(c.c.length);return mMc(a,c)} +function pB(a,b){var c;c=a.q.getHours()+(b/60|0);a.q.setMinutes(b);mB(a,c)} +function _Wc(a){var b;b=a.b;if(b.b==0){return null}return RD(ju(b,0),65).b} +function Src(a){if(a.a){if(a.e){return Src(a.e)}}else{return a}return null} +function mIc(a,b){if(a.p<b.p){return 1}else if(a.p>b.p){return -1}return 0} +function hXd(a){var b;if(!a.a){b=a.r;ZD(b,156)&&(a.a=RD(b,156))}return a.a} +function iOd(a,b,c){var d;++a.e;--a.f;d=RD(a.d[b].gd(c),136);return d.md()} +function fd(a){var b,c;b=a.ld();c=RD(a.md(),16);return gk(c.Nc(),new jh(b))} +function oae(a,b){if(Ujb(a.a,b)){_jb(a.a,b);return true}else{return false}} +function Ui(a,b,c){Pb(b,a.e.Rd().gc());Pb(c,a.c.Rd().gc());return a.a[b][c]} +function _Uc(a,b,c){this.a=a;this.b=b;this.c=c;Rmb(a.t,this);Rmb(b.i,this)} +function lg(a,b,c,d){this.f=a;this.e=b;this.d=c;this.b=d;this.c=!d?null:d.d} +function YWc(){this.b=new Yub;this.a=new Yub;this.b=new Yub;this.a=new Yub} +function ree(){ree=geb;var a,b;pee=(jTd(),b=new k1d,b);qee=(a=new mXd,a)} +function UCb(a){var b;MCb(a);b=new $Cb(a,a.a.e,a.a.d|4);return new WCb(a,b)} +function ADb(a){var b;LCb(a);b=0;while(a.a.Bd(new MEb)){b=Bdb(b,1)}return b} +function zxb(a,b){uFb(b);if(a.c<a.d){a.Se(b,a.c++);return true}return false} +function cnb(a){Pmb(this);mFb(a>=0,'Initial capacity must not be negative')} +function rid(){rid=geb;qid=new jGd('org.eclipse.elk.labels.labelManager')} +function iec(){iec=geb;hec=new kGd('separateLayerConnections',(vec(),uec))} +function fTc(){fTc=geb;eTc=new gTc('REGULAR',0);dTc=new gTc('CRITICAL',1)} +function Mbd(){Mbd=geb;Lbd=new Nbd('FIXED',0);Kbd=new Nbd('CENTER_NODE',1)} +function jtc(){jtc=geb;htc=new ktc('QUADRATIC',0);itc=new ktc('SCANLINE',1)} +function Atc(){Atc=geb;ztc=ss((stc(),cD(WC(_W,1),jwe,322,0,[qtc,ptc,rtc])))} +function Jtc(){Jtc=geb;Itc=ss((Etc(),cD(WC(aX,1),jwe,351,0,[Btc,Dtc,Ctc])))} +function ooc(){ooc=geb;noc=ss((joc(),cD(WC(UV,1),jwe,372,0,[ioc,hoc,goc])))} +function muc(){muc=geb;luc=ss((huc(),cD(WC(dX,1),jwe,460,0,[fuc,euc,guc])))} +function Cvc(){Cvc=geb;Bvc=ss((xvc(),cD(WC(jX,1),jwe,299,0,[vvc,wvc,uvc])))} +function Lvc(){Lvc=geb;Kvc=ss((Gvc(),cD(WC(kX,1),jwe,311,0,[Evc,Fvc,Dvc])))} +function rDc(){rDc=geb;qDc=ss((lDc(),cD(WC(sX,1),jwe,390,0,[iDc,jDc,kDc])))} +function PEc(){PEc=geb;OEc=ss((KEc(),cD(WC(zX,1),jwe,387,0,[HEc,IEc,JEc])))} +function YEc(){YEc=geb;XEc=ss((TEc(),cD(WC(AX,1),jwe,349,0,[SEc,QEc,REc])))} +function GEc(){GEc=geb;FEc=ss((BEc(),cD(WC(yX,1),jwe,463,0,[AEc,yEc,zEc])))} +function qFc(){qFc=geb;pFc=ss((lFc(),cD(WC(CX,1),jwe,350,0,[iFc,jFc,kFc])))} +function zFc(){zFc=geb;yFc=ss((uFc(),cD(WC(DX,1),jwe,352,0,[tFc,rFc,sFc])))} +function IFc(){IFc=geb;HFc=ss((DFc(),cD(WC(EX,1),jwe,388,0,[BFc,CFc,AFc])))} +function QZc(){QZc=geb;PZc=ss((LZc(),cD(WC(F_,1),jwe,392,0,[KZc,JZc,IZc])))} +function m4c(){m4c=geb;l4c=ss((g4c(),cD(WC(I0,1),jwe,393,0,[d4c,e4c,f4c])))} +function z5c(){z5c=geb;y5c=ss((t5c(),cD(WC(N0,1),jwe,300,0,[r5c,s5c,q5c])))} +function k6c(){k6c=geb;j6c=ss((f6c(),cD(WC(V0,1),jwe,445,0,[c6c,d6c,e6c])))} +function F6c(){F6c=geb;E6c=ss((z6c(),cD(WC(Z0,1),jwe,456,0,[w6c,y6c,x6c])))} +function e7c(){e7c=geb;d7c=ss((_6c(),cD(WC(a1,1),jwe,394,0,[Z6c,$6c,Y6c])))} +function j9c(){j9c=geb;i9c=ss((b9c(),cD(WC(o1,1),jwe,439,0,[$8c,a9c,_8c])))} +function WKc(){WKc=geb;VKc=ss((RKc(),cD(WC(nY,1),jwe,464,0,[OKc,PKc,QKc])))} +function JKb(){JKb=geb;IKb=ss((EKb(),cD(WC(MN,1),jwe,471,0,[CKb,BKb,DKb])))} +function cKb(){cKb=geb;bKb=ss((ZJb(),cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb])))} +function ALb(){ALb=geb;zLb=ss((vLb(),cD(WC(TN,1),jwe,472,0,[uLb,tLb,sLb])))} +function CBb(){CBb=geb;BBb=ss((xBb(),cD(WC(QL,1),jwe,108,0,[uBb,vBb,wBb])))} +function FWb(){FWb=geb;EWb=ss((AWb(),cD(WC(JP,1),jwe,391,0,[yWb,xWb,zWb])))} +function Knd(){Knd=geb;Jnd=ss((Fnd(),cD(WC(y3,1),jwe,346,0,[Dnd,Cnd,End])))} +function lbd(){lbd=geb;kbd=ss((gbd(),cD(WC(I1,1),jwe,444,0,[dbd,ebd,fbd])))} +function Tmd(){Tmd=geb;Smd=ss((Omd(),cD(WC(t3,1),jwe,278,0,[Lmd,Mmd,Nmd])))} +function rqd(){rqd=geb;qqd=ss((mqd(),cD(WC(J3,1),jwe,280,0,[kqd,jqd,lqd])))} +function Hxd(a,b){return !a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),QNd(a.o,b)} +function HMb(a,b){var c;if(a.C){c=RD(Vrb(a.b,b),127).n;c.d=a.C.d;c.a=a.C.a}} +function F8b(a){var b,c,d,e;e=a.d;b=a.a;c=a.b;d=a.c;a.d=c;a.a=d;a.b=e;a.c=b} +function cOd(a){!a.g&&(a.g=new hQd);!a.g.b&&(a.g.b=new ePd(a));return a.g.b} +function dOd(a){!a.g&&(a.g=new hQd);!a.g.c&&(a.g.c=new IPd(a));return a.g.c} +function lOd(a){!a.g&&(a.g=new hQd);!a.g.d&&(a.g.d=new kPd(a));return a.g.d} +function YNd(a){!a.g&&(a.g=new hQd);!a.g.a&&(a.g.a=new qPd(a));return a.g.a} +function B9d(a,b,c,d){!!c&&(d=c.Rh(b,BYd(c.Dh(),a.c.uk()),null,d));return d} +function C9d(a,b,c,d){!!c&&(d=c.Th(b,BYd(c.Dh(),a.c.uk()),null,d));return d} +function Cjb(a,b,c,d){var e;e=$C(kE,Pwe,28,b+1,15,1);Djb(e,a,b,c,d);return e} +function $C(a,b,c,d,e,f){var g;g=_C(e,d);e!=10&&cD(WC(a,f),b,c,e,g);return g} +function $fe(a,b,c){var d,e;e=new Phe(b,a);for(d=0;d<c;++d){Dhe(e)}return e} +function $Gd(a,b,c){var d,e;if(c!=null){for(d=0;d<b;++d){e=c[d];a.Qi(d,e)}}} +function Yyb(a,b){var c;c=new Gzb;c.c=true;c.d=b.md();return Zyb(a,b.ld(),c)} +function rB(a,b){var c;c=a.q.getHours()+(b/3600|0);a.q.setSeconds(b);mB(a,c)} +function Ct(a,b){var c,d;c=b;d=Hob(cv(new Nu(a,c)));Ar(new Nu(a,c));return d} +function Kdc(a,b){b.Ug('Label management',1);fE(mQb(a,(rid(),qid)));b.Vg()} +function wge(a,b,c,d){vge(a,b,c,kge(a,b,d,ZD(b,102)&&(RD(b,19).Bb&txe)!=0))} +function BQb(a,b,c){RD(a.b,68);RD(a.b,68);RD(a.b,68);Umb(a.a,new KQb(c,b,a))} +function AFb(a,b,c){if(a<0||b>c||b<a){throw Adb(new eib(_xe+a+bye+b+Qxe+c))}} +function NCb(a){if(!a){this.c=null;this.b=new bnb}else{this.c=a;this.b=null}} +function Fzb(a,b){xlb.call(this,a,b);this.a=$C(vL,Zve,447,2,0,1);this.b=true} +function hub(a){ckb.call(this,a,0);_tb(this);this.d.b=this.d;this.d.a=this.d} +function wtb(a){this.e=a;this.b=this.e.a.entries();this.a=$C(jJ,rve,1,0,5,1)} +function _Fc(){_Fc=geb;$Fc=nfd(pfd(new ufd,(sXb(),nXb),(hcc(),Ebc)),rXb,$bc)} +function xuc(){tuc();return cD(WC(eX,1),jwe,283,0,[ouc,nuc,quc,puc,suc,ruc])} +function Ruc(){Ouc();return cD(WC(gX,1),jwe,281,0,[Luc,Kuc,Nuc,Juc,Muc,Iuc])} +function bvc(){$uc();return cD(WC(hX,1),jwe,282,0,[Yuc,Vuc,Zuc,Xuc,Wuc,Uuc])} +function etc(){btc();return cD(WC(ZW,1),jwe,232,0,[Zsc,_sc,Ysc,$sc,atc,Xsc])} +function u3b(){r3b();return cD(WC(hR,1),jwe,273,0,[p3b,o3b,m3b,q3b,n3b,l3b])} +function Uod(){Pod();return cD(WC(D3,1),jwe,279,0,[Nod,Lod,Mod,Kod,Jod,Ood])} +function God(){Bod();return cD(WC(C3,1),jwe,101,0,[Aod,zod,yod,vod,xod,wod])} +function lnd(){ind();return cD(WC(v3,1),jwe,321,0,[gnd,end,hnd,cnd,fnd,dnd])} +function Ujd(){Rjd();return cD(WC(n3,1),jwe,255,0,[Ljd,Ojd,Pjd,Qjd,Mjd,Njd])} +function xkd(){ukd();return cD(WC(q3,1),jwe,298,0,[tkd,skd,rkd,pkd,okd,qkd])} +function K3d(a){var b;if(!a.a&&a.b!=-1){b=a.c.Dh();a.a=vYd(b,a.b)}return a.a} +function WGd(a,b){if(a.Si()&&a.Hc(b)){return false}else{a.Hi(b);return true}} +function RKb(a,b){Ivb(b,'Horizontal alignment cannot be null');a.b=b;return a} +function ite(a,b,c){Vse();var d;d=hte(a,b);c&&!!d&&kte(a)&&(d=null);return d} +function ZKc(a,b,c){var d;d=a.b[c.c.p][c.p];d.b+=b.b;d.c+=b.c;d.a+=b.a;++d.a} +function Umc(a,b,c){var d;a.d[b.g]=c;d=a.g.c;d[b.g]=$wnd.Math.max(d[b.g],c+1)} +function bjd(a,b){var c,d;c=a.a-b.a;d=a.b-b.b;return $wnd.Math.sqrt(c*c+d*d)} +function v$b(a,b){var c,d;for(d=b.Kc();d.Ob();){c=RD(d.Pb(),36);u$b(a,c,0,0)}} +function x$b(a,b,c){var d,e;for(e=a.Kc();e.Ob();){d=RD(e.Pb(),36);w$b(d,b,c)}} +function G0c(a){var b,c;for(c=Sub(a.a,0);c.b!=c.d.c;){b=RD(evb(c),65);H0c(b)}} +function nnc(a,b){bub(a.e,b)||dub(a.e,b,new tnc(b));return RD(cub(a.e,b),113)} +function tBb(a,b,c,d){uFb(a);uFb(b);uFb(c);uFb(d);return new DBb(a,b,new NAb)} +function DVd(a,b,c,d){this.ak();this.a=b;this.b=a;this.c=new wje(this,b,c,d)} +function O3d(a,b,c,d,e,f){MKd.call(this,b,d,e,f);J3d(this);this.c=a;this.b=c} +function c4d(a,b,c,d,e,f){MKd.call(this,b,d,e,f);J3d(this);this.c=a;this.a=c} +function Q9c(a,b){var c,d,e;e=a.r;d=a.d;c=S9c(a,b,true);return c.b!=e||c.a!=d} +function Vee(a,b,c){var d,e;e=(d=N5d(a.b,b),d);return !e?null:tfe(Pee(a,e),c)} +function _Dd(a,b,c){var d,e,f;d=qC(a,c);e=null;!!d&&(e=ADd(d));f=e;tEd(b,c,f)} +function aEd(a,b,c){var d,e,f;d=qC(a,c);e=null;!!d&&(e=ADd(d));f=e;tEd(b,c,f)} +function Evd(a,b){var c;return c=a.Ih(b),c>=0?a.Lh(c,true,true):Qvd(a,b,true)} +function gMc(a,b,c){var d;d=qMc(a,b,c);a.b=new _Lc(d.c.length);return iMc(a,d)} +function Pue(a){if(a.b<=0)throw Adb(new Dvb);--a.b;a.a-=a.c.c;return sgb(a.a)} +function PGd(a){var b;if(!a.a){throw Adb(new Evb)}b=a.a;a.a=vCd(a.a);return b} +function WDb(a){while(!a.a){if(!yEb(a.c,new $Db(a))){return false}}return true} +function Nr(a){var b;Qb(a);if(ZD(a,204)){b=RD(a,204);return b}return new Or(a)} +function Cfd(a){Afd();RD(a.of((umd(),Lld)),181).Fc((Pod(),Mod));a.qf(Kld,null)} +function Afd(){Afd=geb;xfd=new Gfd;zfd=new Ifd;yfd=yn((umd(),Kld),xfd,pld,zfd)} +function Y3c(){Y3c=geb;W3c=new $3c('LEAF_NUMBER',0);X3c=new $3c('NODE_SIZE',1)} +function YLc(a){a.a=$C(kE,Pwe,28,a.b+1,15,1);a.c=$C(kE,Pwe,28,a.b,15,1);a.d=0} +function OZb(a,b){if(a.a.Ne(b.d,a.b)>0){Rmb(a.c,new fZb(b.c,b.d,a.d));a.b=b.d}} +function NHd(a,b){if(a.g==null||b>=a.i)throw Adb(new yNd(b,a.i));return a.g[b]} +function P_d(a,b,c){gHd(a,c);if(c!=null&&!a.fk(c)){throw Adb(new yeb)}return c} +function dD(a,b){XC(b)!=10&&cD(rb(b),b.Sm,b.__elementTypeId$,XC(b),a);return a} +function Wnb(a,b,c,d){var e;d=(urb(),!d?rrb:d);e=a.slice(b,c);Xnb(e,a,b,c,-b,d)} +function zvd(a,b,c,d,e){return b<0?Qvd(a,c,d):RD(c,69).wk().yk(a,a.hi(),b,d,e)} +function J9b(a,b){return Qfb(Kfb(UD(mQb(a,(Ywc(),Jwc)))),Kfb(UD(mQb(b,Jwc))))} +function qAb(){qAb=geb;pAb=ss((cAb(),cD(WC(AL,1),jwe,304,0,[$zb,_zb,aAb,bAb])))} +function cAb(){cAb=geb;$zb=new dAb('All',0);_zb=new iAb;aAb=new kAb;bAb=new nAb} +function EKb(){EKb=geb;CKb=new FKb(Nye,0);BKb=new FKb(Kye,1);DKb=new FKb(Oye,2)} +function Zme(){Zme=geb;qAd();Wme=oxe;Vme=pxe;Yme=new Tfb(oxe);Xme=new Tfb(pxe)} +function rOb(){rOb=geb;qOb=ss((mOb(),cD(WC(hO,1),jwe,417,0,[lOb,iOb,jOb,kOb])))} +function NRb(){NRb=geb;MRb=ss((IRb(),cD(WC(WO,1),jwe,406,0,[FRb,ERb,GRb,HRb])))} +function NPb(){NPb=geb;MPb=ss((IPb(),cD(WC(DO,1),jwe,332,0,[FPb,EPb,GPb,HPb])))} +function Z$b(){Z$b=geb;Y$b=ss((U$b(),cD(WC(CQ,1),jwe,389,0,[T$b,R$b,Q$b,S$b])))} +function wZb(){wZb=geb;vZb=ss((nZb(),cD(WC(lQ,1),jwe,416,0,[jZb,mZb,kZb,lZb])))} +function jnc(){jnc=geb;inc=ss((enc(),cD(WC(LV,1),jwe,421,0,[anc,bnc,cnc,dnc])))} +function Bec(){Bec=geb;Aec=ss((vec(),cD(WC(qT,1),jwe,371,0,[uec,sec,tec,rec])))} +function DDc(){DDc=geb;CDc=ss((wDc(),cD(WC(tX,1),jwe,203,0,[uDc,vDc,tDc,sDc])))} +function pEc(){pEc=geb;oEc=ss((kEc(),cD(WC(wX,1),jwe,284,0,[hEc,gEc,iEc,jEc])))} +function Cuc(){Cuc=geb;Buc=new Duc(LAe,0);Auc=new Duc('IMPROVE_STRAIGHTNESS',1)} +function _i(a,b){var c,d;d=b/a.c.Rd().gc()|0;c=b%a.c.Rd().gc();return Ui(a,d,c)} +function iZd(a){var b;if(a.nl()){for(b=a.i-1;b>=0;--b){QHd(a,b)}}return WHd(a)} +function Nyb(a){var b,c;if(!a.b){return null}c=a.b;while(b=c.a[0]){c=b}return c} +function Oyb(a){var b,c;if(!a.b){return null}c=a.b;while(b=c.a[1]){c=b}return c} +function Hae(a){if(ZD(a,180)){return ''+RD(a,180).a}return a==null?null:jeb(a)} +function Iae(a){if(ZD(a,180)){return ''+RD(a,180).a}return a==null?null:jeb(a)} +function eGb(a,b){if(b.a){throw Adb(new yz(jye))}Ysb(a.a,b);b.a=a;!a.j&&(a.j=b)} +function hEb(a,b){xxb.call(this,b.zd(),b.yd()&-16449);uFb(a);this.a=a;this.c=b} +function zXc(a,b){return new gud(b,Zid(ajd(b.e),b.f.a+a,b.f.b+a),(Geb(),false))} +function EMc(a,b){dMc();return Rmb(a,new Ptd(b,sgb(b.e.c.length+b.g.c.length)))} +function GMc(a,b){dMc();return Rmb(a,new Ptd(b,sgb(b.e.c.length+b.g.c.length)))} +function p5c(){p5c=geb;o5c=ss((j5c(),cD(WC(M0,1),jwe,354,0,[i5c,g5c,h5c,f5c])))} +function x_c(){x_c=geb;w_c=ss((s_c(),cD(WC(J_,1),jwe,353,0,[r_c,p_c,q_c,o_c])))} +function eWc(){eWc=geb;dWc=ss((YVc(),cD(WC(H$,1),jwe,405,0,[UVc,VVc,WVc,XVc])))} +function bnd(){bnd=geb;and=ss((Ymd(),cD(WC(u3,1),jwe,223,0,[Xmd,Vmd,Umd,Wmd])))} +function Vnd(){Vnd=geb;Und=ss((Pnd(),cD(WC(z3,1),jwe,291,0,[Ond,Lnd,Mnd,Nnd])))} +function Vpd(){Vpd=geb;Upd=ss((Qpd(),cD(WC(H3,1),jwe,386,0,[Opd,Ppd,Npd,Mpd])))} +function Lrd(){Lrd=geb;Krd=ss((Grd(),cD(WC(R3,1),jwe,320,0,[Frd,Crd,Erd,Drd])))} +function ytd(){ytd=geb;xtd=ss((ttd(),cD(WC(n4,1),jwe,415,0,[qtd,rtd,ptd,std])))} +function b9c(){b9c=geb;$8c=new d9c(iFe,0);a9c=new d9c(mEe,1);_8c=new d9c(LAe,2)} +function sBb(a,b,c,d,e){uFb(a);uFb(b);uFb(c);uFb(d);uFb(e);return new DBb(a,b,d)} +function fub(a,b){var c;c=RD(_jb(a.e,b),400);if(c){rub(c);return c.e}return null} +function Ymb(a,b){var c;c=Wmb(a,b,0);if(c==-1){return false}Xmb(a,c);return true} +function LDb(a,b,c){var d;LCb(a);d=new IEb;d.a=b;a.a.Nb(new QEb(d,c));return d.a} +function VCb(a){var b;LCb(a);b=$C(iE,vxe,28,0,15,1);ixb(a.a,new dDb(b));return b} +function yc(a){var b;if(!xc(a)){throw Adb(new Dvb)}a.e=1;b=a.d;a.d=null;return b} +function Odb(a){var b;if(Kdb(a)){b=0-a;if(!isNaN(b)){return b}}return Edb(xD(a))} +function Wmb(a,b,c){for(;c<a.c.length;++c){if(Fvb(b,a.c[c])){return c}}return -1} +function Gmc(a){var b,c;c=RD(Vmb(a.j,0),12);b=RD(mQb(c,(Ywc(),Awc)),12);return b} +function Nu(a,b){var c;this.f=a;this.b=b;c=RD(Wjb(a.b,b),260);this.c=!c?null:c.b} +function Ckc(){lkc();this.b=new Tsb;this.f=new Tsb;this.g=new Tsb;this.e=new Tsb} +function RSd(a){ez(this);this.g=!a?null:lz(a,a.ie());this.f=a;gz(this);this.je()} +function pKd(a){var b;b=a.jj();b!=null&&a.d!=-1&&RD(b,94).xh(a);!!a.i&&a.i.oj()} +function asc(a){var b;for(b=a.p+1;b<a.c.a.c.length;++b){--RD(Vmb(a.c.a,b),10).p}} +function ukb(a){yFb(!!a.c);rFb(a.f.g,a.d);a.c.Qb();a.c=null;a.b=skb(a);a.d=a.f.g} +function o4d(a){if(!a.b){a.b=new s5d(a,o7,a);!a.a&&(a.a=new F4d(a,a))}return a.b} +function Pee(a,b){var c,d;c=RD(b,690);d=c.xi();!d&&c.Ai(d=new wfe(a,b));return d} +function Qee(a,b){var c,d;c=RD(b,692);d=c.$k();!d&&c.cl(d=new Jfe(a,b));return d} +function _jc(a,b){Wjc();var c,d;c=$jc(a);d=$jc(b);return !!c&&!!d&&!Aob(c.k,d.k)} +function WFb(a,b){return Fvb(b,Vmb(a.f,0))||Fvb(b,Vmb(a.f,1))||Fvb(b,Vmb(a.f,2))} +function Med(a,b){if(b<0){throw Adb(new veb(zGe+b))}Led(a,b+1);return Vmb(a.j,b)} +function Ob(a,b,c,d){if(!a){throw Adb(new agb(hc(b,cD(WC(jJ,1),rve,1,5,[c,d]))))}} +function P3d(a,b,c,d,e,f,g){NKd.call(this,b,d,e,f,g);J3d(this);this.c=a;this.b=c} +function UA(a,b,c){var d,e;d=10;for(e=0;e<c-1;e++){b<d&&(a.a+='0',a);d*=10}a.a+=b} +function Ahb(a){var b,c;c=a.length;b=$C(hE,zwe,28,c,15,1);nhb(a,0,c,b,0);return b} +function $eb(a){Zeb();var b,c;b=a+128;c=Yeb[b];!c&&(c=Yeb[b]=new Seb(a));return c} +function Cub(a){rFb(a.d.a.e.g,a.b);sFb(a.c!=a.d.a.d);a.a=a.c;a.c=a.c.a;return a.a} +function mDc(a){switch(a.g){case 0:return lve;case 1:return -1;default:return 0;}} +function ED(a){if(uD(a,(MD(),LD))<0){return -qD(xD(a))}return a.l+a.m*gxe+a.h*hxe} +function etd(a){(!this.q?(yob(),yob(),wob):this.q).Ac(!a.q?(yob(),yob(),wob):a.q)} +function Eud(a,b){Cod(RD(RD(a.f,27).of((umd(),Hld)),101))&&lQd(wCd(RD(a.f,27)),b)} +function Gvd(a,b){var c;c=BYd(a.d,b);return c>=0?Dvd(a,c,true,true):Qvd(a,b,true)} +function Vwd(a){var b;b=SD(Ywd(a,32));if(b==null){Wwd(a);b=SD(Ywd(a,32))}return b} +function Yvd(a){var b;if(!a.Oh()){b=AYd(a.Dh())-a.ji();a.$h().Mk(b)}return a.zh()} +function zQb(a,b){yQb=new kRb;wQb=b;xQb=a;RD(xQb.b,68);BQb(xQb,yQb,null);AQb(xQb)} +function AWb(){AWb=geb;yWb=new BWb('XY',0);xWb=new BWb('X',1);zWb=new BWb('Y',2)} +function vLb(){vLb=geb;uLb=new wLb('TOP',0);tLb=new wLb(Kye,1);sLb=new wLb(Qye,2)} +function Gvc(){Gvc=geb;Evc=new Hvc(LAe,0);Fvc=new Hvc('TOP',1);Dvc=new Hvc(Qye,2)} +function sEc(){sEc=geb;qEc=new tEc('INPUT_ORDER',0);rEc=new tEc('PORT_DEGREE',1)} +function MD(){MD=geb;ID=hD(dxe,dxe,524287);JD=hD(0,0,fxe);KD=fD(1);fD(2);LD=fD(0)} +function wWd(a){var b;if(a.d!=a.r){b=WVd(a);a.e=!!b&&b.lk()==aKe;a.d=b}return a.e} +function UHd(a,b,c){var d;d=a.g[b];MHd(a,b,a.Zi(b,c));a.Ri(b,c,d);a.Ni();return d} +function dHd(a,b){var c;c=a.dd(b);if(c>=0){a.gd(c);return true}else{return false}} +function xr(a,b){var c;Qb(a);Qb(b);c=false;while(b.Ob()){c=c|a.Fc(b.Pb())}return c} +function cub(a,b){var c;c=RD(Wjb(a.e,b),400);if(c){eub(a,c);return c.e}return null} +function iB(a){var b,c;b=a/60|0;c=a%60;if(c==0){return ''+b}return ''+b+':'+(''+c)} +function JB(d,a){var b=d.a[a];var c=(HC(),GC)[typeof b];return c?c(b):NC(typeof b)} +function EDb(a,b){var c,d;MCb(a);d=new zEb(b,a.a);c=new YDb(d);return new SDb(a,c)} +function mwb(a){var b;b=a.b.c.length==0?null:Vmb(a.b,0);b!=null&&owb(a,0);return b} +function ukc(a,b){var c,d,e;e=b.c.i;c=RD(Wjb(a.f,e),60);d=c.d.c-c.e.c;Bjd(b.a,d,0)} +function XLc(a,b){var c;++a.d;++a.c[b];c=b+1;while(c<a.a.length){++a.a[c];c+=c&-c}} +function Ute(a,b,c,d){Vse();Wse.call(this,26);this.c=a;this.a=b;this.d=c;this.b=d} +function KA(a,b){while(b[0]<a.length&&qhb(' \t\r\n',Fhb(ihb(a,b[0])))>=0){++b[0]}} +function eEd(a,b){Dyd(a,b==null||Rfb((uFb(b),b))||isNaN((uFb(b),b))?0:(uFb(b),b))} +function fEd(a,b){Eyd(a,b==null||Rfb((uFb(b),b))||isNaN((uFb(b),b))?0:(uFb(b),b))} +function gEd(a,b){Cyd(a,b==null||Rfb((uFb(b),b))||isNaN((uFb(b),b))?0:(uFb(b),b))} +function hEd(a,b){Ayd(a,b==null||Rfb((uFb(b),b))||isNaN((uFb(b),b))?0:(uFb(b),b))} +function oWc(a,b,c){return cjd(new rjd(c.e.a+c.f.a/2,c.e.b+c.f.b/2),a)==(uFb(b),b)} +function qge(a,b){return ZD(b,102)&&(RD(b,19).Bb&txe)!=0?new She(b,a):new Phe(b,a)} +function sge(a,b){return ZD(b,102)&&(RD(b,19).Bb&txe)!=0?new She(b,a):new Phe(b,a)} +function XC(a){return a.__elementTypeCategory$==null?10:a.__elementTypeCategory$} +function Bhb(a,b){return b==(wvb(),wvb(),vvb)?a.toLocaleLowerCase():a.toLowerCase()} +function Mu(a){if(!a.e){throw Adb(new Dvb)}a.c=a.a=a.e;a.e=a.e.e;--a.d;return a.a.f} +function Lu(a){if(!a.c){throw Adb(new Dvb)}a.e=a.a=a.c;a.c=a.c.c;++a.d;return a.a.f} +function Lsb(a){var b;++a.a;for(b=a.c.a.length;a.a<b;++a.a){if(a.c.b[a.a]){return}}} +function _z(a){var b,c;if(a.a){c=null;do{b=a.a;a.a=null;c=dA(b,c)}while(a.a);a.a=c}} +function aA(a){var b,c;if(a.b){c=null;do{b=a.b;a.b=null;c=dA(b,c)}while(a.b);a.b=c}} +function eve(a,b){var c;c=0;while(a.e!=a.i.gc()){oFd(b,bMd(a),sgb(c));c!=lve&&++c}} +function Llc(a,b){var c;c=$y(a.e.c,b.e.c);if(c==0){return Qfb(a.e.d,b.e.d)}return c} +function hdc(a,b){var c,d;d=b.c;for(c=d+1;c<=b.f;c++){a.a[c]>a.a[d]&&(d=c)}return d} +function Krc(a){var b;b=RD(mQb(a,(Ywc(),Wvc)),313);if(b){return b.a==a}return false} +function Lrc(a){var b;b=RD(mQb(a,(Ywc(),Wvc)),313);if(b){return b.i==a}return false} +function xXb(){xXb=geb;wXb=ss((sXb(),cD(WC(UP,1),jwe,367,0,[nXb,oXb,pXb,qXb,rXb])))} +function Hnc(){Hnc=geb;Gnc=ss((Bnc(),cD(WC(TV,1),jwe,375,0,[xnc,znc,Anc,ync,wnc])))} +function Xtc(){Xtc=geb;Wtc=ss((Ptc(),cD(WC(bX,1),jwe,348,0,[Ltc,Ktc,Ntc,Otc,Mtc])))} +function RDc(){RDc=geb;QDc=ss((JDc(),cD(WC(uX,1),jwe,323,0,[IDc,FDc,GDc,EDc,HDc])))} +function hxc(){hxc=geb;gxc=ss((cxc(),cD(WC(mX,1),jwe,171,0,[bxc,Zwc,$wc,_wc,axc])))} +function m3c(){m3c=geb;l3c=ss((g3c(),cD(WC(x0,1),jwe,368,0,[e3c,b3c,f3c,c3c,d3c])))} +function xad(){xad=geb;wad=ss((sad(),cD(WC(x1,1),jwe,373,0,[oad,nad,qad,pad,rad])))} +function acd(){acd=geb;_bd=ss((Xbd(),cD(WC(P1,1),jwe,324,0,[Sbd,Tbd,Wbd,Ubd,Vbd])))} +function Kmd(){Kmd=geb;Jmd=ss((Cmd(),cD(WC(s3,1),jwe,88,0,[Amd,zmd,ymd,xmd,Bmd])))} +function bid(){bid=geb;aid=ss((Yhd(),cD(WC(d3,1),jwe,170,0,[Whd,Vhd,Thd,Xhd,Uhd])))} +function uod(){uod=geb;tod=ss((pod(),cD(WC(B3,1),jwe,256,0,[mod,ood,kod,lod,nod])))} +function zpd(){zpd=geb;ypd=ss((qpd(),cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])))} +function LHb(){LHb=geb;JHb=new MHb('BY_SIZE',0);KHb=new MHb('BY_SIZE_AND_SHAPE',1)} +function TUb(){TUb=geb;RUb=new UUb('EADES',0);SUb=new UUb('FRUCHTERMAN_REINGOLD',1)} +function $tc(){$tc=geb;Ytc=new _tc('READING_DIRECTION',0);Ztc=new _tc('ROTATION',1)} +function CZb(){CZb=geb;zZb=new ZZb;AZb=new b$b;xZb=new f$b;yZb=new j$b;BZb=new n$b} +function dGb(a){this.b=new bnb;this.a=new bnb;this.c=new bnb;this.d=new bnb;this.e=a} +function XZb(a){this.g=a;this.f=new bnb;this.a=$wnd.Math.min(this.g.c.c,this.g.d.c)} +function UKb(a,b,c){RJb.call(this);KKb(this);this.a=a;this.c=c;this.b=b.d;this.f=b.e} +function d6b(a,b,c){var d,e;for(e=new Anb(c);e.a<e.c.c.length;){d=ynb(e);c6b(a,b,d)}} +function sC(a,b,c){var d;if(b==null){throw Adb(new Ngb)}d=qC(a,b);tC(a,b,c);return d} +function ked(a,b){var c;c=RD(Wjb(a.a,b),137);if(!c){c=new qQb;Zjb(a.a,b,c)}return c} +function vYd(a,b){var c;c=(a.i==null&&rYd(a),a.i);return b>=0&&b<c.length?c[b]:null} +function Gqd(a,b){var c;c=b>0?b-1:b;return Kqd(Lqd(Mqd(Nqd(new Oqd,c),a.n),a.j),a.k)} +function nBd(a){var b,c;c=(b=new q4d,b);WGd((!a.q&&(a.q=new C5d(s7,a,11,10)),a.q),c)} +function ofb(a){return ((a.i&2)!=0?'interface ':(a.i&1)!=0?'':'class ')+(lfb(a),a.o)} +function dz(a){if(Ddb(a,lve)>0){return lve}if(Ddb(a,qwe)<0){return qwe}return Ydb(a)} +function Sv(a){if(a<3){dk(a,fwe);return a+1}if(a<hwe){return eE(a/0.75+1)}return lve} +function Rwb(a,b){uFb(b);Qwb(a);if(a.d.Ob()){b.Cd(a.d.Pb());return true}return false} +function ke(a,b){var c,d;c=RD(Xv(a.d,b),16);if(!c){return null}d=b;return a.e.pc(d,c)} +function Ufe(a,b,c,d){var e;a.j=-1;oLd(a,gge(a,b,c),(nke(),e=RD(b,69).vk(),e.xl(d)))} +function Z_c(a,b){R_c();return -hgb(RD(mQb(a,(h_c(),W$c)),17).a,RD(mQb(b,W$c),17).a)} +function xo(a,b){return !!Ho(a,b,Ydb(Ndb(cwe,qgb(Ydb(Ndb(b==null?0:tb(b),dwe)),15))))} +function dGd(){aGd();return cD(WC(T5,1),jwe,245,0,[_Fd,YFd,ZFd,XFd,$Fd,VFd,UFd,WFd])} +function nid(){kid();return cD(WC(e3,1),jwe,285,0,[jid,cid,gid,iid,did,eid,fid,hid])} +function hpc(){epc();return cD(WC(hW,1),jwe,276,0,[Zoc,apc,Yoc,dpc,_oc,$oc,cpc,bpc])} +function Kcc(a){var b;b=Kfb(UD(mQb(a,(yCc(),FAc))));if(b<0){b=0;pQb(a,FAc,b)}return b} +function Odc(a,b){var c,d;for(d=a.Kc();d.Ob();){c=RD(d.Pb(),72);pQb(c,(Ywc(),swc),b)}} +function Oic(a,b,c){var d;d=$wnd.Math.max(0,a.b/2-0.5);Iic(c,d,1);Rmb(b,new Xic(c,d))} +function lRc(a,b,c){var d;d=a.a.e[RD(b.a,10).p]-a.a.e[RD(c.a,10).p];return eE(Lgb(d))} +function PDb(a,b){var c;MCb(a);c=new cEb(a,a.a.zd(),a.a.yd()|4,b);return new SDb(a,c)} +function gvb(a){var b;yFb(!!a.c);b=a.c.a;Wub(a.d,a.c);a.b==a.c?(a.b=b):--a.a;a.c=null} +function iqc(a){a.a>=-0.01&&a.a<=Tye&&(a.a=0);a.b>=-0.01&&a.b<=Tye&&(a.b=0);return a} +function Hid(a){tid();var b,c;c=KEe;for(b=0;b<a.length;b++){a[b]>c&&(c=a[b])}return c} +function Zvd(a,b){var c;c=wYd(a.Dh(),b);if(!c){throw Adb(new agb(KHe+b+NHe))}return c} +function NGd(a,b){var c;c=a;while(vCd(c)){c=vCd(c);if(c==b){return true}}return false} +function ix(a,b){var c,d,e;d=b.a.ld();c=RD(b.a.md(),16).gc();for(e=0;e<c;e++){a.Cd(d)}} +function Umb(a,b){var c,d,e,f;uFb(b);for(d=a.c,e=0,f=d.length;e<f;++e){c=d[e];b.Cd(c)}} +function q0b(a,b,c,d,e,f){var g;g=s0b(d);Y0b(g,e);Z0b(g,f);Rc(a.a,d,new J0b(g,b,c.f))} +function P8c(a,b){Ixd(a,(X6c(),T6c),b.f);Ixd(a,Q6c,b.e);Ixd(a,S6c,b.d);Ixd(a,P6c,b.c)} +function grc(a,b){this.a=new Tsb;this.e=new Tsb;this.b=(lDc(),kDc);this.c=a;this.b=b} +function yd(a){this.d=a;this.c=a.c.vc().Kc();this.b=null;this.a=null;this.e=(zs(),ys)} +function Wub(a,b){var c;c=b.c;b.a.b=b.b;b.b.a=b.a;b.a=b.b=null;b.c=null;--a.b;return c} +function Esb(a,b){if(!!b&&a.b[b.g]==b){bD(a.b,b.g,null);--a.c;return true}return false} +function jxb(a,b){if(0>a||a>b){throw Adb(new xeb('fromIndex: 0, toIndex: '+a+Qxe+b))}} +function ZHd(a){if(a<0){throw Adb(new agb('Illegal Capacity: '+a))}this.g=this.aj(a)} +function _y(a,b){Zy();bz(pwe);return $wnd.Math.abs(a-b)<=pwe||a==b||isNaN(a)&&isNaN(b)} +function xJc(a,b){var c,d,e,f;for(d=a.d,e=0,f=d.length;e<f;++e){c=d[e];pJc(a.g,c).a=b}} +function BIc(a,b,c){var d,e,f;e=b[c];for(d=0;d<e.length;d++){f=e[d];a.e[f.c.p][f.p]=d}} +function nqc(a){var b;for(b=0;b<a.c.length;b++){(tFb(b,a.c.length),RD(a.c[b],12)).p=b}} +function qqc(a){var b,c;b=a.a.d.j;c=a.c.d.j;while(b!=c){zsb(a.b,b);b=tpd(b)}zsb(a.b,b)} +function gjd(a){var b;b=$wnd.Math.sqrt(a.a*a.a+a.b*a.b);if(b>0){a.a/=b;a.b/=b}return a} +function BXd(a){var b;if(a.w){return a.w}else{b=CXd(a);!!b&&!b.Vh()&&(a.w=b);return b}} +function l2d(a,b){var c,d;d=a.a;c=m2d(a,b,null);d!=b&&!a.e&&(c=o2d(a,b,c));!!c&&c.oj()} +function rQc(a,b,c){var d,e;d=b;do{e=Kfb(a.p[d.p])+c;a.p[d.p]=e;d=a.a[d.p]}while(d!=b)} +function heb(a,b,c){var d=function(){return a.apply(d,arguments)};b.apply(d,c);return d} +function Gae(a){var b;if(a==null){return null}else{b=RD(a,195);return sAd(b,b.length)}} +function QHd(a,b){if(a.g==null||b>=a.i)throw Adb(new yNd(b,a.i));return a.Wi(b,a.g[b])} +function Dob(a,b){yob();var c,d;d=new bnb;for(c=0;c<a;++c){ZEb(d.c,b)}return new irb(d)} +function NDb(a){MCb(a);zFb(true,'n may not be negative');return new SDb(a,new DEb(a.a))} +function KKb(a){a.b=(EKb(),BKb);a.f=(vLb(),tLb);a.d=(dk(2,iwe),new cnb(2));a.e=new pjd} +function zrd(a){this.b=(Qb(a),new dnb(a));this.a=new bnb;this.d=new bnb;this.e=new pjd} +function ZJb(){ZJb=geb;WJb=new $Jb('BEGIN',0);XJb=new $Jb(Kye,1);YJb=new $Jb('END',2)} +function Omd(){Omd=geb;Lmd=new Pmd(Kye,0);Mmd=new Pmd('HEAD',1);Nmd=new Pmd('TAIL',2)} +function R_c(){R_c=geb;Q_c=mfd(mfd(mfd(rfd(new ufd,(YVc(),VVc)),(WYc(),VYc)),OYc),SYc)} +function B0c(){B0c=geb;A0c=mfd(mfd(mfd(rfd(new ufd,(YVc(),XVc)),(WYc(),QYc)),LYc),PYc)} +function gtc(){gtc=geb;ftc=ss((btc(),cD(WC(ZW,1),jwe,232,0,[Zsc,_sc,Ysc,$sc,atc,Xsc])))} +function zuc(){zuc=geb;yuc=ss((tuc(),cD(WC(eX,1),jwe,283,0,[ouc,nuc,quc,puc,suc,ruc])))} +function Tuc(){Tuc=geb;Suc=ss((Ouc(),cD(WC(gX,1),jwe,281,0,[Luc,Kuc,Nuc,Juc,Muc,Iuc])))} +function dvc(){dvc=geb;cvc=ss(($uc(),cD(WC(hX,1),jwe,282,0,[Yuc,Vuc,Zuc,Xuc,Wuc,Uuc])))} +function w3b(){w3b=geb;v3b=ss((r3b(),cD(WC(hR,1),jwe,273,0,[p3b,o3b,m3b,q3b,n3b,l3b])))} +function Wjd(){Wjd=geb;Vjd=ss((Rjd(),cD(WC(n3,1),jwe,255,0,[Ljd,Ojd,Pjd,Qjd,Mjd,Njd])))} +function zkd(){zkd=geb;ykd=ss((ukd(),cD(WC(q3,1),jwe,298,0,[tkd,skd,rkd,pkd,okd,qkd])))} +function nnd(){nnd=geb;mnd=ss((ind(),cD(WC(v3,1),jwe,321,0,[gnd,end,hnd,cnd,fnd,dnd])))} +function Iod(){Iod=geb;Hod=ss((Bod(),cD(WC(C3,1),jwe,101,0,[Aod,zod,yod,vod,xod,wod])))} +function Wod(){Wod=geb;Vod=ss((Pod(),cD(WC(D3,1),jwe,279,0,[Nod,Lod,Mod,Kod,Jod,Ood])))} +function kKb(){kKb=geb;jKb=(ZJb(),cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb])).length;iKb=jKb} +function hod(){dod();return cD(WC(A3,1),jwe,95,0,[Xnd,Wnd,Znd,cod,bod,aod,$nd,_nd,Ynd])} +function eoc(a,b){Mnc();return hgb(a.b.c.length-a.e.c.length,b.b.c.length-b.e.c.length)} +function Ao(a,b){return $v(Go(a,b,Ydb(Ndb(cwe,qgb(Ydb(Ndb(b==null?0:tb(b),dwe)),15)))))} +function rGb(a,b){return Zy(),bz(pwe),$wnd.Math.abs(a-b)<=pwe||a==b||isNaN(a)&&isNaN(b)} +function Wxd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new L3d(a,1,c,a.b))} +function Hzd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new L3d(a,3,c,a.b))} +function Ayd(a,b){var c;c=a.f;a.f=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new L3d(a,3,c,a.f))} +function Cyd(a,b){var c;c=a.g;a.g=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new L3d(a,4,c,a.g))} +function Dyd(a,b){var c;c=a.i;a.i=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new L3d(a,5,c,a.i))} +function Eyd(a,b){var c;c=a.j;a.j=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new L3d(a,6,c,a.j))} +function Ozd(a,b){var c;c=a.j;a.j=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new L3d(a,1,c,a.j))} +function Izd(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new L3d(a,4,c,a.c))} +function Pzd(a,b){var c;c=a.k;a.k=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new L3d(a,2,c,a.k))} +function Vxd(a,b){var c;c=a.a;a.a=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new L3d(a,0,c,a.a))} +function $Vd(a,b){var c;c=a.s;a.s=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new M3d(a,4,c,a.s))} +function bWd(a,b){var c;c=a.t;a.t=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new M3d(a,5,c,a.t))} +function Q1d(a,b){var c;c=a.d;a.d=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new M3d(a,2,c,a.d))} +function zXd(a,b){var c;c=a.F;a.F=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,5,c,b))} +function IMd(a,b){var c;c=RD(Wjb((PRd(),ORd),a),57);return c?c.gk(b):$C(jJ,rve,1,b,5,1)} +function BXb(a,b){var c;c=ojd(ajd(RD(Wjb(a.g,b),8)),Pid(RD(Wjb(a.f,b),470).b));return c} +function FGd(a,b){var c,d,e;c=(d=(bvd(),e=new hCd,e),!!b&&eCd(d,b),d);fCd(c,a);return c} +function vDd(a,b){var c,d;c=b in a.a;if(c){d=qC(a,b).re();if(d){return d.a}}return null} +function jZd(a,b,c){gHd(a,c);if(!a.kl()&&c!=null&&!a.fk(c)){throw Adb(new yeb)}return c} +function Mqd(a,b){a.n=b;if(a.n){a.f=new bnb;a.e=new bnb}else{a.f=null;a.e=null}return a} +function Ffb(a,b){var c;if(!a){return}b.n=a;var d=zfb(b);if(!d){eeb[a]=[b];return}d.Rm=b} +function SD(a){var b;CFb(a==null||Array.isArray(a)&&(b=XC(a),!(b>=14&&b<=16)));return a} +function ws(a,b){var c;uFb(b);c=a[':'+b];mFb(!!c,'Enum constant undefined: '+b);return c} +function tfb(a,b,c,d,e,f){var g;g=rfb(a,b);Ffb(c,g);g.i=e?8:0;g.f=d;g.e=e;g.g=f;return g} +function R3d(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=1;this.c=a;this.a=c} +function T3d(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=2;this.c=a;this.a=c} +function _3d(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=6;this.c=a;this.a=c} +function e4d(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=7;this.c=a;this.a=c} +function X3d(a,b,c,d,e){this.d=b;this.j=d;this.e=e;this.o=-1;this.p=4;this.c=a;this.a=c} +function iGb(a,b){var c,d,e,f;for(d=b,e=0,f=d.length;e<f;++e){c=d[e];eGb(a.a,c)}return a} +function Al(a){var b,c,d,e;for(c=a,d=0,e=c.length;d<e;++d){b=c[d];Qb(b)}return new Gl(a)} +function ZTb(a){var b;b=ojd(ajd(a.d.d),a.c.d);wid(b,a.c.e.a,a.c.e.b);return $id(b,a.c.d)} +function $Tb(a){var b;b=ojd(ajd(a.c.d),a.d.d);wid(b,a.d.e.a,a.d.e.b);return $id(b,a.d.d)} +function iA(a){var b=/function(?:\s+([\w$]+))?\s*\(/;var c=b.exec(a);return c&&c[1]||wwe} +function Hnb(a,b,c){var d,e;e=a.length;d=$wnd.Math.min(c,e);VEb(a,0,b,0,d,true);return b} +function ISb(a,b,c){var d,e;for(e=b.Kc();e.Ob();){d=RD(e.Pb(),74);Ysb(a,RD(c.Kb(d),27))}} +function E1b(a,b){Cod(RD(mQb(RD(a.e,10),(yCc(),BBc)),101))&&(yob(),_mb(RD(a.e,10).j,b))} +function lIb(){iIb();return cD(WC(xN,1),jwe,257,0,[hIb,cIb,dIb,bIb,fIb,gIb,eIb,aIb,_Hb])} +function fDc(){_Cc();return cD(WC(rX,1),jwe,265,0,[ZCc,WCc,XCc,TCc,VCc,$Cc,YCc,SCc,UCc])} +function RKc(){RKc=geb;OKc=new SKc('BARYCENTER',0);PKc=new SKc(jBe,1);QKc=new SKc(kBe,2)} +function uFc(){uFc=geb;tFc=new vFc('NO',0);rFc=new vFc(CBe,1);sFc=new vFc('LOOK_BACK',2)} +function Etc(){Etc=geb;Btc=new Ftc('ARD',0);Dtc=new Ftc('MSD',1);Ctc=new Ftc('MANUAL',2)} +function BEc(){BEc=geb;AEc=new CEc(Sye,0);yEc=new CEc('INPUT',1);zEc=new CEc('OUTPUT',2)} +function ygd(){if(!qgd){qgd=new xgd;wgd(qgd,cD(WC(B2,1),rve,134,0,[new vmd]))}return qgd} +function bz(a){if(!(a>=0)){throw Adb(new agb('tolerance ('+a+') must be >= 0'))}return a} +function hOd(a,b){var c;if(ZD(b,44)){return a.c.Mc(b)}else{c=QNd(a,b);jOd(a,b);return c}} +function yBd(a,b,c){YVd(a,b);PAd(a,c);$Vd(a,0);bWd(a,1);aWd(a,true);_Vd(a,true);return a} +function ZGd(a,b){var c;c=a.gc();if(b<0||b>c)throw Adb(new aMd(b,c));return new CMd(a,b)} +function Cad(a,b){a.b=$wnd.Math.max(a.b,b.d);a.e+=b.r+(a.a.c.length==0?0:a.c);Rmb(a.a,b)} +function Jmb(a){yFb(a.c>=0);if(rmb(a.d,a.c)<0){a.a=a.a-1&a.d.a.length-1;a.b=a.d.c}a.c=-1} +function Nc(a){var b,c;for(c=a.c.Cc().Kc();c.Ob();){b=RD(c.Pb(),16);b.$b()}a.c.$b();a.d=0} +function Zi(a){var b,c,d,e;for(c=a.a,d=0,e=c.length;d<e;++d){b=c[d];Rnb(b,b.length,null)}} +function zjd(a,b){var c,d,e,f;for(d=b,e=0,f=d.length;e<f;++e){c=d[e];Pub(a,c,a.c.b,a.c)}} +function St(a,b){var c,d;for(c=0,d=a.gc();c<d;++c){if(Fvb(b,a.Xb(c))){return c}}return -1} +function ogb(a){var b,c;if(a==0){return 32}else{c=0;for(b=1;(b&a)==0;b<<=1){++c}return c}} +function dk(a,b){if(a<0){throw Adb(new agb(b+' cannot be negative but was: '+a))}return a} +function deb(a,b){typeof window===gve&&typeof window['$gwt']===gve&&(window['$gwt'][a]=b)} +function lp(a,b){return Vv(Ho(a.a,b,Ydb(Ndb(cwe,qgb(Ydb(Ndb(b==null?0:tb(b),dwe)),15)))))} +function FBb(a,b,c){return sBb(a,new CCb(b),new ECb,new GCb(c),cD(WC(QL,1),jwe,108,0,[]))} +function gqd(){dqd();return cD(WC(I3,1),jwe,264,0,[Ypd,$pd,Xpd,_pd,aqd,cqd,bqd,Zpd,Wpd])} +function wgb(){wgb=geb;vgb=cD(WC(kE,1),Pwe,28,15,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])} +function stc(){stc=geb;qtc=new utc('LAYER_SWEEP',0);ptc=new utc(BBe,1);rtc=new utc(LAe,2)} +function nGc(){nGc=geb;mGc=pfd(pfd(pfd(new ufd,(sXb(),nXb),(hcc(),obc)),oXb,Nbc),pXb,Mbc)} +function yGc(){yGc=geb;xGc=pfd(pfd(pfd(new ufd,(sXb(),nXb),(hcc(),obc)),oXb,Nbc),pXb,Mbc)} +function SGc(){SGc=geb;RGc=pfd(pfd(pfd(new ufd,(sXb(),nXb),(hcc(),obc)),oXb,Nbc),pXb,Mbc)} +function lHc(){lHc=geb;kHc=pfd(pfd(pfd(new ufd,(sXb(),nXb),(hcc(),obc)),oXb,Nbc),pXb,Mbc)} +function tHc(){tHc=geb;sHc=pfd(pfd(pfd(new ufd,(sXb(),nXb),(hcc(),obc)),oXb,Nbc),pXb,Mbc)} +function RHc(){RHc=geb;QHc=pfd(pfd(pfd(new ufd,(sXb(),nXb),(hcc(),obc)),oXb,Nbc),pXb,Mbc)} +function YJc(){YJc=geb;XJc=nfd(pfd(pfd(new ufd,(sXb(),pXb),(hcc(),Qbc)),qXb,Gbc),rXb,Pbc)} +function EJb(a){var b,c;for(c=new Anb(yud(a));c.a<c.c.c.length;){b=RD(ynb(c),695);b._f()}} +function aeb(){beb();var a=_db;for(var b=0;b<arguments.length;b++){a.push(arguments[b])}} +function EXb(a){zXb();this.g=new Tsb;this.f=new Tsb;this.b=new Tsb;this.c=new Tp;this.i=a} +function d1b(){this.f=new pjd;this.d=new C3b;this.c=new pjd;this.a=new bnb;this.b=new bnb} +function Cje(a,b,c,d){this.ak();this.a=b;this.b=a;this.c=null;this.c=new Dje(this,b,c,d)} +function NKd(a,b,c,d,e){this.d=a;this.n=b;this.g=c;this.o=d;this.p=-1;e||(this.o=-2-d-1)} +function HWd(){dWd.call(this);this.n=-1;this.g=null;this.i=null;this.j=null;this.Bb|=gwe} +function DEb(a){xxb.call(this,a.Ad(64)?Kgb(0,Vdb(a.zd(),1)):Sve,a.yd());this.b=1;this.a=a} +function X_c(a,b){R_c();return RD(mQb(b,(h_c(),W$c)),17).a<a.gc()&&RD(mQb(b,W$c),17).a>=0} +function Iqd(a,b){if(a.r>0&&a.c<a.r){a.c+=b;!!a.i&&a.i.d>0&&a.g!=0&&Iqd(a.i,b/a.r*a.i.d)}} +function $Cd(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,1,c,a.c))} +function P1d(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,4,c,a.c))} +function jyd(a,b){var c;c=a.k;a.k=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,2,c,a.k))} +function JXd(a,b){var c;c=a.D;a.D=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,2,c,a.D))} +function Kzd(a,b){var c;c=a.f;a.f=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,8,c,a.f))} +function Lzd(a,b){var c;c=a.i;a.i=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,7,c,a.i))} +function fCd(a,b){var c;c=a.a;a.a=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,8,c,a.a))} +function ZCd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,0,c,a.b))} +function s6d(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,0,c,a.b))} +function t6d(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,1,c,a.c))} +function nVd(a,b){var c;c=a.d;a.d=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,1,c,a.d))} +function Cte(a,b,c){var d;a.b=b;a.a=c;d=(a.a&512)==512?new Gre:new Tqe;a.c=Nqe(d,a.b,a.a)} +function Gge(a,b){return qke(a.e,b)?(nke(),wWd(b)?new ole(b,a):new Eke(b,a)):new Ble(b,a)} +function iDb(a){var b,c;if(0>a){return new rDb}b=a+1;c=new kDb(b,a);return new oDb(null,c)} +function Gob(a,b){yob();var c;c=new Usb(1);bE(a)?$jb(c,a,b):rtb(c.f,a,b);return new uqb(c)} +function pQc(a,b){var c,d;c=a.c;d=b.e[a.p];if(d>0){return RD(Vmb(c.a,d-1),10)}return null} +function TOb(a,b){var c,d;c=a.o+a.p;d=b.o+b.p;if(c<d){return -1}if(c==d){return 0}return 1} +function Z5b(a){var b;b=mQb(a,(Ywc(),Awc));if(ZD(b,167)){return Y5b(RD(b,167))}return null} +function Wp(a){var b;a=$wnd.Math.max(a,2);b=mgb(a);if(a>b){b<<=1;return b>0?b:hwe}return b} +function xc(a){Ub(a.e!=3);switch(a.e){case 2:return false;case 0:return true;}return zc(a)} +function djd(a,b){var c;if(ZD(b,8)){c=RD(b,8);return a.a==c.a&&a.b==c.b}else{return false}} +function Ydd(a,b){var c;c=new kRb;RD(b.b,68);RD(b.b,68);RD(b.b,68);Umb(b.a,new ced(a,c,b))} +function gOd(a,b){var c,d;for(d=b.vc().Kc();d.Ob();){c=RD(d.Pb(),44);fOd(a,c.ld(),c.md())}} +function Jzd(a,b){var c;c=a.d;a.d=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,11,c,a.d))} +function zWd(a,b){var c;c=a.j;a.j=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,13,c,a.j))} +function b6d(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,21,c,a.b))} +function YAb(a,b){((gBb(),dBb)?null:b.c).length==0&&iBb(b,new rBb);$jb(a.a,dBb?null:b.c,b)} +function b9b(a,b){b.Ug('Hierarchical port constraint processing',1);c9b(a);e9b(a);b.Vg()} +function joc(){joc=geb;ioc=new koc('START',0);hoc=new koc('MIDDLE',1);goc=new koc('END',2)} +function x2c(){x2c=geb;v2c=new z2c('P1_NODE_PLACEMENT',0);w2c=new z2c('P2_EDGE_ROUTING',1)} +function JVb(){JVb=geb;HVb=new jGd(rAe);IVb=new jGd(sAe);GVb=new jGd(tAe);FVb=new jGd(uAe)} +function tkb(a){var b;rFb(a.f.g,a.d);sFb(a.b);a.c=a.a;b=RD(a.a.Pb(),44);a.b=skb(a);return b} +function P2d(a){var b;if(a.b==null){return j3d(),j3d(),i3d}b=a.ul()?a.tl():a.sl();return b} +function nwb(a,b){var c;c=b==null?-1:Wmb(a.b,b,0);if(c<0){return false}owb(a,c);return true} +function zsb(a,b){var c;uFb(b);c=b.g;if(!a.b[c]){bD(a.b,c,b);++a.c;return true}return false} +function azb(a,b){var c,d;c=1-b;d=a.a[c];a.a[c]=d.a[b];d.a[b]=a;a.b=true;d.b=false;return d} +function xRb(a,b){var c,d;for(d=b.Kc();d.Ob();){c=RD(d.Pb(),272);a.b=true;Ysb(a.e,c);c.b=a}} +function kic(a,b){var c,d;c=RD(mQb(a,(yCc(),IBc)),8);d=RD(mQb(b,IBc),8);return Qfb(c.b,d.b)} +function SPb(a,b,c){var d,e,f;f=b>>5;e=b&31;d=Cdb(Udb(a.n[c][f],Ydb(Sdb(e,1))),3);return d} +function lmb(a,b,c){var d,e,f;f=a.a.length-1;for(e=a.b,d=0;d<c;e=e+1&f,++d){bD(b,d,a.a[e])}} +function owb(a,b){var c;c=Xmb(a.b,a.b.c.length-1);if(b<a.b.c.length){$mb(a.b,b,c);kwb(a,b)}} +function NQc(a,b){var c;c=RD(Wjb(a.c,b),467);if(!c){c=new UQc;c.c=b;Zjb(a.c,c.c,c)}return c} +function PUc(a,b){var c,d;d=new bnb;c=b;do{ZEb(d.c,c);c=RD(Wjb(a.k,c),18)}while(c);return d} +function rMc(a,b,c){var d;d=new bnb;sMc(a,b,d,c,true,true);a.b=new _Lc(d.c.length);return d} +function tvb(a,b){var c,d;c=a.Pc();Wnb(c,0,c.length,b);for(d=0;d<c.length;d++){a.hd(d,c[d])}} +function Bad(a){var b,c;for(c=new dMd(a);c.e!=c.i.gc();){b=RD(bMd(c),27);Dyd(b,0);Eyd(b,0)}} +function Bu(a){this.e=a;this.d=new atb(Sv(Ec(this.e).gc()));this.c=this.e.a;this.b=this.e.c} +function _Lc(a){this.b=a;this.a=$C(kE,Pwe,28,a+1,15,1);this.c=$C(kE,Pwe,28,a,15,1);this.d=0} +function frc(a,b,c){grc.call(this,b,c);this.d=$C(jR,WAe,10,a.a.c.length,0,1);anb(a.a,this.d)} +function vLc(a,b,c){UIc.call(this,a,b,c);this.a=new Tsb;this.b=new Tsb;this.d=new yLc(this)} +function Pic(a){fHb.call(this);this.b=Kfb(UD(mQb(a,(yCc(),TBc))));this.a=RD(mQb(a,yAc),223)} +function _q(a,b){var c;if(ZD(b,16)){c=RD(b,16);return a.Gc(c)}return xr(a,RD(Qb(b),20).Kc())} +function KCc(a,b){FDb(CDb(new SDb(null,new Swb(new Xkb(a.b),1)),new esd(a,b)),new isd(a,b))} +function f6b(a,b){b.Ug(iBe,1);FDb(EDb(new SDb(null,new Swb(a.b,16)),new j6b),new l6b);b.Vg()} +function tb(a){return bE(a)?ohb(a):_D(a)?Nfb(a):$D(a)?Jeb(a):YD(a)?a.Hb():aD(a)?kFb(a):Iz(a)} +function xKc(a){var b,c;for(c=a.c.a.ec().Kc();c.Ob();){b=RD(c.Pb(),219);DJc(b,new NLc(b.f))}} +function yKc(a){var b,c;for(c=a.c.a.ec().Kc();c.Ob();){b=RD(c.Pb(),219);EJc(b,new OLc(b.e))}} +function PAd(a,b){var c;c=a.zb;a.zb=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,1,c,a.zb))} +function CBd(a,b){var c;c=a.xb;a.xb=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,3,c,a.xb))} +function DBd(a,b){var c;c=a.yb;a.yb=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,2,c,a.yb))} +function iBd(a,b){var c,d;c=(d=new mXd,d);c.n=b;WGd((!a.s&&(a.s=new C5d(y7,a,21,17)),a.s),c)} +function oBd(a,b){var c,d;d=(c=new d6d,c);d.n=b;WGd((!a.s&&(a.s=new C5d(y7,a,21,17)),a.s),d)} +function ye(a,b){var c,d,e;uFb(b);c=false;for(e=b.Kc();e.Ob();){d=e.Pb();c=c|a.Fc(d)}return c} +function Sx(a){var b,c,d;b=0;for(d=a.Kc();d.Ob();){c=d.Pb();b+=c!=null?tb(c):0;b=~~b}return b} +function oC(e,a){var b=e.a;var c=0;for(var d in b){b.hasOwnProperty(d)&&(a[c++]=d)}return a} +function gB(a){var b;if(a==0){return 'UTC'}if(a<0){a=-a;b='UTC+'}else{b='UTC-'}return b+iB(a)} +function xib(a){if(a.a<54){return a.f<0?-1:a.f>0?1:0}return (!a.c&&(a.c=ojb(Hdb(a.f))),a.c).e} +function GXd(a,b){if(b){if(a.B==null){a.B=a.D;a.D=null}}else if(a.B!=null){a.D=a.B;a.B=null}} +function rZb(a,b){nZb();return a==jZb&&b==mZb||a==mZb&&b==jZb||a==lZb&&b==kZb||a==kZb&&b==lZb} +function sZb(a,b){nZb();return a==jZb&&b==kZb||a==jZb&&b==lZb||a==mZb&&b==lZb||a==mZb&&b==kZb} +function zMb(a,b){return Zy(),bz(Tye),$wnd.Math.abs(0-b)<=Tye||0==b||isNaN(0)&&isNaN(b)?0:a/b} +function qsc(a,b){return Kfb(UD(Lvb(MDb(GDb(new SDb(null,new Swb(a.c.b,16)),new Isc(a)),b))))} +function tsc(a,b){return Kfb(UD(Lvb(MDb(GDb(new SDb(null,new Swb(a.c.b,16)),new Gsc(a)),b))))} +function rvc(){ovc();return cD(WC(iX,1),jwe,259,0,[fvc,hvc,ivc,jvc,kvc,lvc,nvc,evc,gvc,mvc])} +function dEc(){aEc();return cD(WC(vX,1),jwe,243,0,[$Dc,VDc,YDc,WDc,XDc,SDc,ZDc,_Dc,TDc,UDc])} +function z3c(a,b){var c;b.Ug('General Compactor',1);c=h4c(RD(Gxd(a,($4c(),I4c)),393));c.Cg(a)} +function T5c(a,b){var c,d;c=RD(Gxd(a,($4c(),P4c)),17);d=RD(Gxd(b,P4c),17);return hgb(c.a,d.a)} +function Bjd(a,b,c){var d,e;for(e=Sub(a,0);e.b!=e.d.c;){d=RD(evb(e),8);d.a+=b;d.b+=c}return a} +function Go(a,b,c){var d;for(d=a.b[c&a.f];d;d=d.b){if(c==d.a&&Hb(b,d.g)){return d}}return null} +function Ho(a,b,c){var d;for(d=a.c[c&a.f];d;d=d.d){if(c==d.f&&Hb(b,d.i)){return d}}return null} +function sjb(a,b,c){var d,e,f;d=0;for(e=0;e<c;e++){f=b[e];a[e]=f<<1|d;d=f>>>31}d!=0&&(a[c]=d)} +function yzb(a,b,c,d,e,f){var g;this.c=a;g=new bnb;Syb(a,g,b,a.b,c,d,e,f);this.a=new Jkb(g,0)} +function _5c(){this.c=new T2c(0);this.b=new T2c(FEe);this.d=new T2c(EEe);this.a=new T2c(Gze)} +function kMb(a,b,c,d,e,f,g){qs.call(this,a,b);this.d=c;this.e=d;this.c=e;this.b=f;this.a=dv(g)} +function tBd(a,b,c,d,e,f,g,h,i,j,k,l,m){ABd(a,b,c,d,e,f,g,h,i,j,k,l,m);kXd(a,false);return a} +function H0b(a){if(a.b.c.i.k==(r3b(),m3b)){return RD(mQb(a.b.c.i,(Ywc(),Awc)),12)}return a.b.c} +function I0b(a){if(a.b.d.i.k==(r3b(),m3b)){return RD(mQb(a.b.d.i,(Ywc(),Awc)),12)}return a.b.d} +function nDb(a){var b;b=mDb(a);if(Gdb(b.a,0)){return bwb(),bwb(),awb}return bwb(),new ewb(b.b)} +function SCb(a){var b;b=RCb(a);if(Gdb(b.a,0)){return Tvb(),Tvb(),Svb}return Tvb(),new Yvb(b.b)} +function TCb(a){var b;b=RCb(a);if(Gdb(b.a,0)){return Tvb(),Tvb(),Svb}return Tvb(),new Yvb(b.c)} +function o8b(a){switch(a.g){case 2:return qpd(),ppd;case 4:return qpd(),Xod;default:return a;}} +function p8b(a){switch(a.g){case 1:return qpd(),npd;case 3:return qpd(),Yod;default:return a;}} +function C9c(a){switch(a.g){case 0:return new s9c;case 1:return new x9c;default:return null;}} +function Zcc(){Zcc=geb;Ycc=new kGd('edgelabelcenterednessanalysis.includelabel',(Geb(),Eeb))} +function jKc(){jKc=geb;iKc=mfd(qfd(pfd(pfd(new ufd,(sXb(),pXb),(hcc(),Qbc)),qXb,Gbc),rXb),Pbc)} +function DLc(){DLc=geb;CLc=mfd(qfd(pfd(pfd(new ufd,(sXb(),pXb),(hcc(),Qbc)),qXb,Gbc),rXb),Pbc)} +function lYd(){lYd=geb;iYd=new i1d;kYd=cD(WC(y7,1),lKe,179,0,[]);jYd=cD(WC(s7,1),mKe,62,0,[])} +function P8b(){P8b=geb;O8b=new Q8b('TO_INTERNAL_LTR',0);N8b=new Q8b('TO_INPUT_DIRECTION',1)} +function J3b(){J3b=geb;G3b=new r4b;E3b=new w4b;F3b=new A4b;D3b=new E4b;H3b=new I4b;I3b=new M4b} +function Cac(a,b){b.Ug(iBe,1);LJb(KJb(new PJb((i1b(),new t1b(a,false,false,new _1b)))));b.Vg()} +function M_c(a,b,c){c.Ug('DFS Treeifying phase',1);L_c(a,b);J_c(a,b);a.a=null;a.b=null;c.Vg()} +function Leb(a,b){Geb();return bE(a)?jhb(a,WD(b)):_D(a)?Jfb(a,UD(b)):$D(a)?Ieb(a,TD(b)):a.Fd(b)} +function Ld(a,b){var c,d;uFb(b);for(d=b.vc().Kc();d.Ob();){c=RD(d.Pb(),44);a.zc(c.ld(),c.md())}} +function ege(a,b,c){var d;for(d=c.Kc();d.Ob();){if(!cge(a,b,d.Pb())){return false}}return true} +function S6d(a,b,c,d,e){var f;if(c){f=BYd(b.Dh(),a.c);e=c.Rh(b,-1-(f==-1?d:f),null,e)}return e} +function T6d(a,b,c,d,e){var f;if(c){f=BYd(b.Dh(),a.c);e=c.Th(b,-1-(f==-1?d:f),null,e)}return e} +function Uib(a){var b;if(a.b==-2){if(a.e==0){b=-1}else{for(b=0;a.a[b]==0;b++);}a.b=b}return a.b} +function fjb(a){uFb(a);if(a.length==0){throw Adb(new Vgb('Zero length BigInteger'))}mjb(this,a)} +function $Hd(a){this.i=a.gc();if(this.i>0){this.g=this.aj(this.i+(this.i/8|0)+1);a.Qc(this.g)}} +function dmc(a,b,c){this.g=a;this.d=b;this.e=c;this.a=new bnb;bmc(this);yob();_mb(this.a,null)} +function aad(a,b){b.q=a;a.d=$wnd.Math.max(a.d,b.r);a.b+=b.d+(a.a.c.length==0?0:a.c);Rmb(a.a,b)} +function xid(a,b){var c,d,e,f;e=a.c;c=a.c+a.b;f=a.d;d=a.d+a.a;return b.a>e&&b.a<c&&b.b>f&&b.b<d} +function Cjd(a,b){var c,d;for(d=Sub(a,0);d.b!=d.d.c;){c=RD(evb(d),8);c.a+=b.a;c.b+=b.b}return a} +function $cc(a){var b,c,d;d=0;for(c=new Anb(a.b);c.a<c.c.c.length;){b=RD(ynb(c),30);b.p=d;++d}} +function Tnc(a){var b,c,d;return a.j==(qpd(),Yod)&&(b=Vnc(a),c=Csb(b,Xod),d=Csb(b,ppd),d||d&&c)} +function rsd(a,b){var c;c=wsd(a);return qsd(new rjd(c.c,c.d),new rjd(c.b,c.a),a.Mf(),b,a.ag())} +function wEd(a,b){var c;c=RD(b,190);qDd(c,'x',a.i);qDd(c,'y',a.j);qDd(c,fIe,a.g);qDd(c,eIe,a.f)} +function CVd(a,b){var c;if(ZD(b,85)){RD(a.c,79).Gk();c=RD(b,85);gOd(a,c)}else{RD(a.c,79).Wb(b)}} +function Bvb(a,b){var c,d;uFb(b);for(d=a.vc().Kc();d.Ob();){c=RD(d.Pb(),44);b.Yd(c.ld(),c.md())}} +function zr(a,b){var c;Qb(b);while(a.Ob()){c=a.Pb();if(!oSc(RD(c,10))){return false}}return true} +function _Ab(){var a;if(!XAb){XAb=new $Ab;a=new oBb('');mBb(a,(SAb(),RAb));YAb(XAb,a)}return XAb} +function PBb(a,b){return sBb(new lCb(a),new nCb(b),new pCb(b),new rCb,cD(WC(QL,1),jwe,108,0,[]))} +function t5c(){t5c=geb;r5c=new v5c(LAe,0);s5c=new v5c('POLAR_COORDINATE',1);q5c=new v5c('ID',2)} +function KEc(){KEc=geb;HEc=new LEc('EQUALLY',0);IEc=new LEc(_ye,1);JEc=new LEc('NORTH_SOUTH',2)} +function OQb(){OQb=geb;MQb=new kGd('debugSVG',(Geb(),false));NQb=new kGd('overlapsExisted',true)} +function pid(){pid=geb;oid=ss((kid(),cD(WC(e3,1),jwe,285,0,[jid,cid,gid,iid,did,eid,fid,hid])))} +function fGd(){fGd=geb;eGd=ss((aGd(),cD(WC(T5,1),jwe,245,0,[_Fd,YFd,ZFd,XFd,$Fd,VFd,UFd,WFd])))} +function jpc(){jpc=geb;ipc=ss((epc(),cD(WC(hW,1),jwe,276,0,[Zoc,apc,Yoc,dpc,_oc,$oc,cpc,bpc])))} +function $Yc(){WYc();return cD(WC(u_,1),jwe,262,0,[VYc,OYc,SYc,TYc,RYc,NYc,UYc,LYc,QYc,PYc,MYc])} +function $i(a,b,c){var d,e;e=RD(Fn(a.d,b),17);d=RD(Fn(a.b,c),17);return !e||!d?null:Ui(a,e.a,d.a)} +function cgd(a,b){var c;c=sgd(ygd(),a);if(c){Ixd(b,(umd(),Tld),c);return true}else{return false}} +function TMb(a){RMb();if(a.A.Hc((Qpd(),Mpd))){if(!a.B.Hc((dqd(),$pd))){return SMb(a)}}return null} +function tUb(){this.a=RD(iGd((yVb(),aVb)),17).a;this.c=Kfb(UD(iGd(rVb)));this.b=Kfb(UD(iGd(nVb)))} +function vkb(a){this.f=a;this.e=new Qtb(this.f.i);this.a=this.e;this.b=skb(this);this.d=this.f.g} +function Uge(a,b){Kfe.call(this,Ibb,a,b);this.b=this;this.a=pke(a.Dh(),vYd(this.e.Dh(),this.c))} +function bdc(a,b){var c,d;for(d=new Anb(b.b);d.a<d.c.c.length;){c=RD(ynb(d),30);a.a[c.p]=h2b(c)}} +function ofd(a,b){var c;for(c=0;c<b.j.c.length;c++){RD(Med(a,c),21).Gc(RD(Med(b,c),16))}return a} +function peb(a,b,c,d){var e;e=a.a.length;c>e?(c=e):BFb(b,c+1);a.a=zhb(a.a,0,b)+(''+d)+yhb(a.a,c)} +function ktb(a,b){a.a=Bdb(a.a,1);a.c=$wnd.Math.min(a.c,b);a.b=$wnd.Math.max(a.b,b);a.d=Bdb(a.d,b)} +function wdc(a,b){return b<a.b.gc()?RD(a.b.Xb(b),10):b==a.b.gc()?a.a:RD(Vmb(a.e,b-a.b.gc()-1),10)} +function rXc(a,b,c){return Qfb(cjd(jWc(a),new rjd(b.e.a,b.e.b)),cjd(jWc(a),new rjd(c.e.a,c.e.b)))} +function WJc(a,b,c){return a==(RKc(),QKc)?new PJc:Kwb(b,1)!=0?new ILc(c.length):new pLc(c.length)} +function qvd(a,b){var c,d,e;c=a.th();if(c!=null&&a.wh()){for(d=0,e=c.length;d<e;++d){c[d].dj(b)}}} +function QBb(a,b){var c,d,e;c=a.c.Xe();for(e=b.Kc();e.Ob();){d=e.Pb();a.a.Yd(c,d)}return a.b.Kb(c)} +function n2b(a,b){var c,d;c=a;d=Y2b(c).e;while(d){c=d;if(c==b){return true}d=Y2b(c).e}return false} +function Edb(a){var b;b=a.h;if(b==0){return a.l+a.m*gxe}if(b==exe){return a.l+a.m*gxe-hxe}return a} +function LHc(a,b,c){var d,e;d=a.a.f[b.p];e=a.a.f[c.p];if(d<e){return -1}if(d==e){return 0}return 1} +function Wmc(a,b){var c,d;for(d=new Anb(b);d.a<d.c.c.length;){c=RD(ynb(d),72);Rmb(a.d,c);$mc(a,c)}} +function E6b(a,b){var c;b.Ug('Edge and layer constraint edge reversal',1);c=D6b(a);C6b(c);b.Vg()} +function m6c(a,b){var c,d;for(d=new dMd(a);d.e!=d.i.gc();){c=RD(bMd(d),27);Byd(c,c.i+b.b,c.j+b.d)}} +function TNd(a){var b;if(a.d==null){++a.e;a.f=0;SNd(null)}else{++a.e;b=a.d;a.d=null;a.f=0;SNd(b)}} +function Ys(a){var b;if(a.a==a.b.a){throw Adb(new Dvb)}b=a.a;a.c=b;a.a=RD(Hvb(a.a.e),227);return b} +function Ywd(a,b){var c;if((a.Db&b)!=0){c=Xwd(a,b);return c==-1?a.Eb:SD(a.Eb)[c]}else{return null}} +function jBd(a,b){var c,d;c=(d=new HYd,d);c.G=b;!a.rb&&(a.rb=new J5d(a,i7,a));WGd(a.rb,c);return c} +function kBd(a,b){var c,d;c=(d=new k1d,d);c.G=b;!a.rb&&(a.rb=new J5d(a,i7,a));WGd(a.rb,c);return c} +function wBd(a,b,c,d){ZD(a.Cb,184)&&(RD(a.Cb,184).tb=null);PAd(a,c);!!b&&HXd(a,b);d&&a.gl(true)} +function nJc(a,b){if(a.c){oJc(a,b,true);FDb(new SDb(null,new Swb(b,16)),new BJc(a))}oJc(a,b,false)} +function KRc(a){FRc();var b;if(!Urb(ERc,a)){b=new HRc;b.a=a;Xrb(ERc,a,b)}return RD(Vrb(ERc,a),645)} +function k3d(a){var b;if(a.g>1||a.Ob()){++a.a;a.g=0;b=a.i;a.Ob();return b}else{throw Adb(new Dvb)}} +function GRc(a){switch(a.a.g){case 1:return new lSc;case 3:return new VUc;default:return new WRc;}} +function fyd(a,b){switch(b){case 1:return !!a.n&&a.n.i!=0;case 2:return a.k!=null;}return Cxd(a,b)} +function Hdb(a){if(jxe<a&&a<hxe){return a<0?$wnd.Math.ceil(a):$wnd.Math.floor(a)}return Edb(vD(a))} +function hfb(a){var b;if(a<128){return jfb(),b=ifb[a],!b&&(b=ifb[a]=new bfb(a)),b}return new bfb(a)} +function PCb(b,c){var d;try{c.de()}catch(a){a=zdb(a);if(ZD(a,82)){d=a;ZEb(b.c,d)}else throw Adb(a)}} +function Wdb(a){var b,c,d,e;e=a;d=0;if(e<0){e+=hxe;d=exe}c=eE(e/gxe);b=eE(e-c*gxe);return hD(b,c,d)} +function dy(a){var b,c,d;d=0;for(c=new Osb(a.a);c.a<c.c.a.length;){b=Nsb(c);a.b.Hc(b)&&++d}return d} +function _u(a){var b,c,d;b=1;for(d=a.Kc();d.Ob();){c=d.Pb();b=31*b+(c==null?0:tb(c));b=~~b}return b} +function kQb(a,b){var c;if(!b){return a}c=b.nf();c.dc()||(!a.q?(a.q=new Vsb(c)):Ld(a.q,c));return a} +function Mtb(a,b){var c;c=a.a.get(b);if(c===undefined){++a.d}else{Ctb(a.a,b);--a.c;++a.b.g}return c} +function a0b(a,b){var c,d,e;c=b.p-a.p;if(c==0){d=a.f.a*a.f.b;e=b.f.a*b.f.b;return Qfb(d,e)}return c} +function Jfc(a,b){var c,d;c=a.j;d=b.j;return c!=d?c.g-d.g:a.p==b.p?0:c==(qpd(),Yod)?a.p-b.p:b.p-a.p} +function dFc(a,b,c,d,e){bD(a.c[b.g],c.g,d);bD(a.c[c.g],b.g,d);bD(a.b[b.g],c.g,e);bD(a.b[c.g],b.g,e)} +function Jyb(a,b,c){this.b=(uFb(a),a);this.d=(uFb(b),b);this.e=(uFb(c),c);this.c=this.d+(''+this.e)} +function Phe(a,b){this.b=a;this.e=b;this.d=b.j;this.f=(nke(),RD(a,69).xk());this.k=pke(b.e.Dh(),a)} +function USc(a){this.n=new bnb;this.e=new Yub;this.j=new Yub;this.k=new bnb;this.f=new bnb;this.p=a} +function rVc(a){a.r=new _sb;a.w=new _sb;a.t=new bnb;a.i=new bnb;a.d=new _sb;a.a=new Tid;a.c=new Tsb} +function mOb(){mOb=geb;lOb=new nOb('UP',0);iOb=new nOb(Zye,1);jOb=new nOb(Nye,2);kOb=new nOb(Oye,3)} +function xvc(){xvc=geb;vvc=new yvc('ONE_SIDED',0);wvc=new yvc('TWO_SIDED',1);uvc=new yvc('OFF',2)} +function B9c(){B9c=geb;z9c=new D9c('EQUAL_BETWEEN_STRUCTURES',0);A9c=new D9c('TO_ASPECT_RATIO',1)} +function hDc(){hDc=geb;gDc=ss((_Cc(),cD(WC(rX,1),jwe,265,0,[ZCc,WCc,XCc,TCc,VCc,$Cc,YCc,SCc,UCc])))} +function iqd(){iqd=geb;hqd=ss((dqd(),cD(WC(I3,1),jwe,264,0,[Ypd,$pd,Xpd,_pd,aqd,cqd,bqd,Zpd,Wpd])))} +function jod(){jod=geb;iod=ss((dod(),cD(WC(A3,1),jwe,95,0,[Xnd,Wnd,Znd,cod,bod,aod,$nd,_nd,Ynd])))} +function nIb(){nIb=geb;mIb=ss((iIb(),cD(WC(xN,1),jwe,257,0,[hIb,cIb,dIb,bIb,fIb,gIb,eIb,aIb,_Hb])))} +function oSc(a){var b;b=RD(mQb(a,(Ywc(),hwc)),64);return a.k==(r3b(),m3b)&&(b==(qpd(),ppd)||b==Xod)} +function j0b(a,b,c){var d,e;e=RD(mQb(a,(yCc(),RAc)),75);if(e){d=new Ejd;Ajd(d,0,e);Cjd(d,c);ye(b,d)}} +function U2b(a,b,c){var d,e,f,g;g=Y2b(a);d=g.d;e=g.c;f=a.n;b&&(f.a=f.a-d.b-e.a);c&&(f.b=f.b-d.d-e.b)} +function OOb(a,b){var c,d;c=a.f.c.length;d=b.f.c.length;if(c<d){return -1}if(c==d){return 0}return 1} +function S0b(a){if(a.b.c.length!=0&&!!RD(Vmb(a.b,0),72).a){return RD(Vmb(a.b,0),72).a}return R0b(a)} +function fr(a){var b;if(a){b=a;if(b.dc()){throw Adb(new Dvb)}return b.Xb(b.gc()-1)}return Fr(a.Kc())} +function Dib(a){var b;Ddb(a,0)<0&&(a=Qdb(a));return b=Ydb(Udb(a,32)),64-(b!=0?ngb(b):ngb(Ydb(a))+32)} +function pBb(){gBb();if(dBb){return new oBb(null)}return ZAb(_Ab(),'com.google.common.base.Strings')} +function eyd(a,b,c,d){if(c==1){return !a.n&&(a.n=new C5d(I4,a,1,7)),rLd(a.n,b,d)}return Bxd(a,b,c,d)} +function eBd(a,b){var c,d;d=(c=new _9d,c);PAd(d,b);WGd((!a.A&&(a.A=new iie(z7,a,7)),a.A),d);return d} +function xEd(a,b,c){var d,e,f,g;f=null;g=b;e=wDd(g,iIe);d=new JEd(a,c);f=(LDd(d.a,d.b,e),e);return f} +function iXd(a){var b;if(!a.a||(a.Bb&1)==0&&a.a.Vh()){b=WVd(a);ZD(b,156)&&(a.a=RD(b,156))}return a.a} +function Be(a,b){var c,d;uFb(b);for(d=b.Kc();d.Ob();){c=d.Pb();if(!a.Hc(c)){return false}}return true} +function sD(a,b){var c,d,e;c=a.l+b.l;d=a.m+b.m+(c>>22);e=a.h+b.h+(d>>22);return hD(c&dxe,d&dxe,e&exe)} +function DD(a,b){var c,d,e;c=a.l-b.l;d=a.m-b.m+(c>>22);e=a.h-b.h+(d>>22);return hD(c&dxe,d&dxe,e&exe)} +function Jpc(a){var b,c;Hpc(a);for(c=new Anb(a.d);c.a<c.c.c.length;){b=RD(ynb(c),105);!!b.i&&Ipc(b)}} +function zdb(a){var b;if(ZD(a,82)){return a}b=a&&a.__java$exception;if(!b){b=new Cz(a);gA(b)}return b} +function BGd(a){if(ZD(a,193)){return RD(a,123)}else if(!a){throw Adb(new Ogb(HIe))}else{return null}} +function skb(a){if(a.a.Ob()){return true}if(a.a!=a.e){return false}a.a=new wtb(a.f.f);return a.a.Ob()} +function kmb(a,b){if(b==null){return false}while(a.a!=a.b){if(pb(b,Imb(a))){return true}}return false} +function dHb(a,b){if(!a||!b||a==b){return false}return tGb(a.d.c,b.d.c+b.d.b)&&tGb(b.d.c,a.d.c+a.d.b)} +function Tmb(a,b){var c,d;c=b.Pc();d=c.length;if(d==0){return false}YEb(a.c,a.c.length,c);return true} +function NBb(a,b,c){var d,e;for(e=b.vc().Kc();e.Ob();){d=RD(e.Pb(),44);a.yc(d.ld(),d.md(),c)}return a} +function $Wc(a){var b,c,d;b=new Yub;for(d=Sub(a.d,0);d.b!=d.d.c;){c=RD(evb(d),65);Mub(b,c.c)}return b} +function Pdc(a,b){var c,d;for(d=new Anb(a.b);d.a<d.c.c.length;){c=RD(ynb(d),72);pQb(c,(Ywc(),swc),b)}} +function L9c(a,b,c){var d,e;for(e=new Anb(a.b);e.a<e.c.c.length;){d=RD(ynb(e),27);Byd(d,d.i+b,d.j+c)}} +function Nb(a,b){if(!a){throw Adb(new agb(hc('value already present: %s',cD(WC(jJ,1),rve,1,5,[b]))))}} +function Aid(a,b,c,d,e){tid();return $wnd.Math.min(Lid(a,b,c,d,e),Lid(c,d,a,b,fjd(new rjd(e.a,e.b))))} +function Rdd(a,b,c,d){RD(c.b,68);RD(c.b,68);RD(d.b,68);RD(d.b,68);RD(d.b,68);Umb(d.a,new Wdd(a,b,d))} +function NGb(a,b){a.d==(Cmd(),ymd)||a.d==Bmd?RD(b.a,60).c.Fc(RD(b.b,60)):RD(b.b,60).c.Fc(RD(b.a,60))} +function Ued(a,b){var c;c=ev(b.a.gc());FDb(PDb(new SDb(null,new Swb(b,1)),a.i),new ffd(a,c));return c} +function fBd(a){var b,c;c=(b=new _9d,b);PAd(c,'T');WGd((!a.d&&(a.d=new iie(z7,a,11)),a.d),c);return c} +function cHd(a){var b,c,d,e;b=1;for(c=0,e=a.gc();c<e;++c){d=a.Vi(c);b=31*b+(d==null?0:tb(d))}return b} +function cj(a,b,c,d){var e;Pb(b,a.e.Rd().gc());Pb(c,a.c.Rd().gc());e=a.a[b][c];bD(a.a[b],c,d);return e} +function cD(a,b,c,d,e){e.Rm=a;e.Sm=b;e.Tm=keb;e.__elementTypeId$=c;e.__elementTypeCategory$=d;return e} +function vec(){vec=geb;uec=new xec(LAe,0);sec=new xec(oBe,1);tec=new xec(pBe,2);rec=new xec('BOTH',3)} +function enc(){enc=geb;anc=new fnc(Kye,0);bnc=new fnc(Nye,1);cnc=new fnc(Oye,2);dnc=new fnc('TOP',3)} +function nZb(){nZb=geb;jZb=new qZb('Q1',0);mZb=new qZb('Q4',1);kZb=new qZb('Q2',2);lZb=new qZb('Q3',3)} +function DFc(){DFc=geb;BFc=new EFc('OFF',0);CFc=new EFc('SINGLE_EDGE',1);AFc=new EFc('MULTI_EDGE',2)} +function ldd(){ldd=geb;kdd=new ndd('MINIMUM_SPANNING_TREE',0);jdd=new ndd('MAXIMUM_SPANNING_TREE',1)} +function hed(){hed=geb;new jGd('org.eclipse.elk.addLayoutConfig');fed=new sed;eed=new qed;ged=new ved} +function EGd(a){var b,c;c=(bvd(),b=new Rzd,b);!!a&&WGd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a),c);return c} +function N2c(a){var b,c,d,e;e=new bnb;for(d=a.Kc();d.Ob();){c=RD(d.Pb(),27);b=Q2c(c);Tmb(e,b)}return e} +function Jr(a,b){var c,d;Rb(b,'predicate');for(d=0;a.Ob();d++){c=a.Pb();if(b.Lb(c)){return d}}return -1} +function xSd(a,b){var c,d;d=0;if(a<64&&a<=b){b=b<64?b:63;for(c=a;c<=b;c++){d=Rdb(d,Sdb(1,c))}}return d} +function oQc(a,b){var c,d;c=a.c;d=b.e[a.p];if(d<c.a.c.length-1){return RD(Vmb(c.a,d+1),10)}return null} +function Bob(a){yob();var b,c,d;d=0;for(c=a.Kc();c.Ob();){b=c.Pb();d=d+(b!=null?tb(b):0);d=d|0}return d} +function wsb(a){var b,c,d;b=RD(a.e&&a.e(),9);d=(c=b.slice(),RD(dD(c,b),9));return new Fsb(b,d,b.length)} +function Bdd(a,b,c){var d;akb(a.a);Umb(c.i,new Mdd(a));d=new $Fb(RD(Wjb(a.a,b.b),68));Add(a,d,b);c.f=d} +function bgc(a){var b;X0b(a,true);b=Awe;nQb(a,(yCc(),KBc))&&(b+=RD(mQb(a,KBc),17).a);pQb(a,KBc,sgb(b))} +function hB(a){var b;b=new dB;b.a=a;b.b=fB(a);b.c=$C(qJ,Nve,2,2,6,1);b.c[0]=gB(a);b.c[1]=gB(a);return b} +function Z7b(a){var b,c,d;c=a.n;d=a.o;b=a.d;return new Uid(c.a-b.b,c.b-b.d,d.a+(b.b+b.c),d.b+(b.d+b.a))} +function UQb(a,b){if(!a||!b||a==b){return false}return $y(a.b.c,b.b.c+b.b.b)<0&&$y(b.b.c,a.b.c+a.b.b)<0} +function Qnd(a){switch(a.g){case 1:return Mnd;case 2:return Lnd;case 3:return Nnd;default:return Ond;}} +function mec(a){switch(RD(mQb(a,(yCc(),UAc)),171).g){case 2:case 4:return true;default:return false;}} +function aHb(a,b,c){switch(c.g){case 2:a.b=b;break;case 1:a.c=b;break;case 4:a.d=b;break;case 3:a.a=b;}} +function Exd(a,b){switch(b){case 0:!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0));a.o.c.$b();return;}$vd(a,b)} +function Mad(a,b){var c,d;c=RD(RD(Wjb(a.g,b.a),42).a,68);d=RD(RD(Wjb(a.g,b.b),42).a,68);return SQb(c,d)} +function XGd(a,b,c){var d;d=a.gc();if(b>d)throw Adb(new aMd(b,d));a.Si()&&(c=bHd(a,c));return a.Ei(b,c)} +function eQb(a,b,c,d,e){var f,g;for(g=c;g<=e;g++){for(f=b;f<=d;f++){PPb(a,f,g)||TPb(a,f,g,true,false)}}} +function uid(a){tid();var b,c,d;c=$C(l3,Nve,8,2,0,1);d=0;for(b=0;b<2;b++){d+=0.5;c[b]=Cid(d,a)}return c} +function xD(a){var b,c,d;b=~a.l+1&dxe;c=~a.m+(b==0?1:0)&dxe;d=~a.h+(b==0&&c==0?1:0)&exe;return hD(b,c,d)} +function mgb(a){var b;if(a<0){return qwe}else if(a==0){return 0}else{for(b=hwe;(b&a)==0;b>>=1);return b}} +function zSd(a,b,c){if(a>=128)return false;return a<64?Pdb(Cdb(Sdb(1,a),c),0):Pdb(Cdb(Sdb(1,a-64),b),0)} +function oQb(a,b,c){return c==null?(!a.q&&(a.q=new Tsb),_jb(a.q,b)):(!a.q&&(a.q=new Tsb),Zjb(a.q,b,c)),a} +function pQb(a,b,c){c==null?(!a.q&&(a.q=new Tsb),_jb(a.q,b)):(!a.q&&(a.q=new Tsb),Zjb(a.q,b,c));return a} +function KTb(a){var b,c;c=new gUb;kQb(c,a);pQb(c,(JVb(),HVb),a);b=new Tsb;MTb(a,c,b);LTb(a,c,b);return c} +function cIc(a){var b,c;b=a.t-a.k[a.o.p]*a.d+a.j[a.o.p]>a.f;c=a.u+a.e[a.o.p]*a.d>a.f*a.s*a.d;return b||c} +function qmc(a,b){var c,d,e,f;c=false;d=a.a[b].length;for(f=0;f<d-1;f++){e=f+1;c=c|rmc(a,b,f,e)}return c} +function Emc(a){var b,c,d,e;for(c=a.a,d=0,e=c.length;d<e;++d){b=c[d];Jmc(a,b,(qpd(),npd));Jmc(a,b,Yod)}} +function tvc(){tvc=geb;svc=ss((ovc(),cD(WC(iX,1),jwe,259,0,[fvc,hvc,ivc,jvc,kvc,lvc,nvc,evc,gvc,mvc])))} +function fEc(){fEc=geb;eEc=ss((aEc(),cD(WC(vX,1),jwe,243,0,[$Dc,VDc,YDc,WDc,XDc,SDc,ZDc,_Dc,TDc,UDc])))} +function huc(){huc=geb;fuc=new iuc(LAe,0);euc=new iuc('INCOMING_ONLY',1);guc=new iuc('OUTGOING_ONLY',2)} +function HC(){HC=geb;GC={'boolean':IC,'number':JC,'string':LC,'object':KC,'function':KC,'undefined':MC}} +function pfb(){++kfb;this.o=null;this.k=null;this.j=null;this.d=null;this.b=null;this.n=null;this.a=null} +function pj(a,b){this.c=a;this.d=b;this.b=this.d/this.c.c.Rd().gc()|0;this.a=this.d%this.c.c.Rd().gc()} +function R$d(a,b){this.b=a;N$d.call(this,(RD(QHd(xYd((lTd(),kTd).o),10),19),b.i),b.g);this.a=(lYd(),kYd)} +function vB(a,b,c){this.q=new $wnd.Date;this.q.setFullYear(a+Owe,b,c);this.q.setHours(0,0,0,0);mB(this,0)} +function ckb(a,b){mFb(a>=0,'Negative initial capacity');mFb(b>=0,'Non-positive load factor');akb(this)} +function iib(a,b,c,d,e){var f,g;g=a.length;f=c.length;if(b<0||d<0||e<0||b+e>g||d+e>f){throw Adb(new ueb)}} +function zob(a,b){yob();var c,d,e,f,g;g=false;for(d=b,e=0,f=d.length;e<f;++e){c=d[e];g=g|a.Fc(c)}return g} +function Wyb(a,b,c){var d,e;d=new Fzb(b,c);e=new Gzb;a.b=Uyb(a,a.b,d,e);e.b||++a.c;a.b.b=false;return e.d} +function omb(a){var b;b=a.a[a.b];if(b==null){return null}bD(a.a,a.b,null);a.b=a.b+1&a.a.length-1;return b} +function oD(a){var b,c;c=ngb(a.h);if(c==32){b=ngb(a.m);return b==32?ngb(a.l)+32:b+20-10}else{return c-12}} +function $5d(a){var b;if(!a.c||(a.Bb&1)==0&&(a.c.Db&64)!=0){b=WVd(a);ZD(b,90)&&(a.c=RD(b,29))}return a.c} +function OGb(a){var b,c;for(c=new Anb(a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),60);b.d.c=-b.d.c-b.d.b}IGb(a)} +function zYb(a){var b,c;for(c=new Anb(a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),86);b.g.c=-b.g.c-b.g.b}uYb(a)} +function Jmc(a,b,c){var d,e,f,g;g=aMc(b,c);f=0;for(e=g.Kc();e.Ob();){d=RD(e.Pb(),12);Zjb(a.c,d,sgb(f++))}} +function qMc(a,b,c){var d;d=new bnb;sMc(a,b,d,(qpd(),Xod),true,false);sMc(a,c,d,ppd,false,false);return d} +function xjd(a){var b,c,d,e,f;b=new pjd;for(d=a,e=0,f=d.length;e<f;++e){c=d[e];b.a+=c.a;b.b+=c.b}return b} +function CEd(a,b,c){var d,e,f,g;f=null;g=b;e=wDd(g,'labels');d=new fFd(a,c);f=(bEd(d.a,d.b,e),e);return f} +function Jee(a,b,c,d){var e;e=Ree(a,b,c,d);if(!e){e=Iee(a,c,d);if(!!e&&!Eee(a,b,e)){return null}}return e} +function Mee(a,b,c,d){var e;e=See(a,b,c,d);if(!e){e=Lee(a,c,d);if(!!e&&!Eee(a,b,e)){return null}}return e} +function Cb(a,b,c){Qb(b);if(c.Ob()){Vhb(b,Fb(c.Pb()));while(c.Ob()){Vhb(b,a.a);Vhb(b,Fb(c.Pb()))}}return b} +function Xb(a,b){var c;for(c=0;c<a.a.a.length;c++){if(!RD(kob(a.a,c),178).Lb(b)){return false}}return true} +function fB(a){var b;if(a==0){return 'Etc/GMT'}if(a<0){a=-a;b='Etc/GMT-'}else{b='Etc/GMT+'}return b+iB(a)} +function DA(a){var b;if(a.b<=0){return false}b=qhb('MLydhHmsSDkK',Fhb(ihb(a.c,0)));return b>1||b>=0&&a.b<3} +function nD(a){var b,c,d;b=~a.l+1&dxe;c=~a.m+(b==0?1:0)&dxe;d=~a.h+(b==0&&c==0?1:0)&exe;a.l=b;a.m=c;a.h=d} +function Cob(a){yob();var b,c,d;d=1;for(c=a.Kc();c.Ob();){b=c.Pb();d=31*d+(b!=null?tb(b):0);d=d|0}return d} +function kD(a,b,c,d,e){var f;f=BD(a,b);c&&nD(f);if(e){a=mD(a,b);d?(eD=xD(a)):(eD=hD(a.l,a.m,a.h))}return f} +function Qlc(a,b,c){a.g=Wlc(a,b,(qpd(),Xod),a.b);a.d=Wlc(a,c,Xod,a.b);if(a.g.c==0||a.d.c==0){return}Tlc(a)} +function Rlc(a,b,c){a.g=Wlc(a,b,(qpd(),ppd),a.j);a.d=Wlc(a,c,ppd,a.j);if(a.g.c==0||a.d.c==0){return}Tlc(a)} +function Xyd(a,b){switch(b){case 7:return !!a.e&&a.e.i!=0;case 8:return !!a.d&&a.d.i!=0;}return wyd(a,b)} +function STb(a,b){switch(b.g){case 0:ZD(a.b,641)||(a.b=new tUb);break;case 1:ZD(a.b,642)||(a.b=new zUb);}} +function tbd(a){switch(a.g){case 0:return new _dd;default:throw Adb(new agb(eGe+(a.f!=null?a.f:''+a.g)));}} +function bdd(a){switch(a.g){case 0:return new vdd;default:throw Adb(new agb(eGe+(a.f!=null?a.f:''+a.g)));}} +function LCc(a,b,c){return !QDb(CDb(new SDb(null,new Swb(a.c,16)),new PAb(new gsd(b,c)))).Bd((xDb(),wDb))} +function mWc(a,b){return cjd(jWc(RD(mQb(b,(h_c(),H$c)),88)),new rjd(a.c.e.a-a.b.e.a,a.c.e.b-a.b.e.b))<=0} +function dve(a,b){while(a.g==null&&!a.c?sId(a):a.g==null||a.i!=0&&RD(a.g[a.i-1],51).Ob()){mFd(b,tId(a))}} +function sYb(a){var b,c;for(c=new Anb(a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),86);b.f.$b()}NYb(a.b,a);tYb(a)} +function Ijd(a){var b,c,d;b=new Ejd;for(d=Sub(a,0);d.b!=d.d.c;){c=RD(evb(d),8);hu(b,0,new sjd(c))}return b} +function DDb(a){var b;LCb(a);b=new IEb;if(a.a.Bd(b)){return Kvb(),new Ovb(uFb(b.a))}return Kvb(),Kvb(),Jvb} +function Dxd(a,b,c){switch(b){case 0:!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0));CVd(a.o,c);return;}Wvd(a,b,c)} +function bXc(a,b,c){this.g=a;this.e=new pjd;this.f=new pjd;this.d=new Yub;this.b=new Yub;this.a=b;this.c=c} +function V9c(a,b,c,d){this.b=new bnb;this.n=new bnb;this.i=d;this.j=c;this.s=a;this.t=b;this.r=0;this.d=0} +function gHd(a,b){if(!a.Li()&&b==null){throw Adb(new agb("The 'no null' constraint is violated"))}return b} +function ohb(a){var b,c;b=0;for(c=0;c<a.length;c++){b=(b<<5)-b+(BFb(c,a.length),a.charCodeAt(c))|0}return b} +function Myb(a,b){var c,d,e;e=a.b;while(e){c=a.a.Ne(b,e.d);if(c==0){return e}d=c<0?0:1;e=e.a[d]}return null} +function LBb(a,b,c){var d,e;d=(Geb(),SSb(c)?true:false);e=RD(b.xc(d),15);if(!e){e=new bnb;b.zc(d,e)}e.Fc(c)} +function q6c(a,b){var c,d;c=RD(Gxd(a,(X7c(),A7c)),17).a;d=RD(Gxd(b,A7c),17).a;return c==d?-1:c<d?-1:c>d?1:0} +function ICc(a){Rmb(a.c,(hed(),fed));if(_y(a.a,Kfb(UD(iGd((QCc(),OCc)))))){return new asd}return new csd(a)} +function fs(a){while(!a.d||!a.d.Ob()){if(!!a.b&&!nmb(a.b)){a.d=RD(smb(a.b),51)}else{return null}}return a.d} +function BVc(a){switch(a.g){case 1:return EEe;default:case 2:return 0;case 3:return Gze;case 4:return FEe;}} +function fte(){Vse();var a;if(Cse)return Cse;a=Zse(hte('M',true));a=$se(hte('M',false),a);Cse=a;return Cse} +function ttd(){ttd=geb;qtd=new utd('ELK',0);rtd=new utd('JSON',1);ptd=new utd('DOT',2);std=new utd('SVG',3)} +function TEc(){TEc=geb;SEc=new UEc('STACKED',0);QEc=new UEc('REVERSE_STACKED',1);REc=new UEc('SEQUENCED',2)} +function LZc(){LZc=geb;KZc=new MZc(LAe,0);JZc=new MZc('MIDDLE_TO_MIDDLE',1);IZc=new MZc('AVOID_OVERLAP',2)} +function sgc(){sgc=geb;qgc=new Lgc;rgc=new Ngc;pgc=new Dgc;ogc=new Pgc;ngc=new Hgc;mgc=(uFb(ngc),new nrb)} +function vnd(){vnd=geb;tnd=new A3b(15);snd=new mGd((umd(),tld),tnd);und=Qld;ond=Ekd;pnd=kld;rnd=nld;qnd=mld} +function wgd(a,b){var c,d,e,f,g;for(d=b,e=0,f=d.length;e<f;++e){c=d[e];g=new Ggd(a);c.hf(g);Bgd(g)}akb(a.f)} +function xw(a,b){var c;if(b===a){return true}if(ZD(b,229)){c=RD(b,229);return pb(a.Zb(),c.Zb())}return false} +function Q_b(a,b){if(R_b(a,b)){Rc(a.b,RD(mQb(b,(Ywc(),ewc)),21),b);Mub(a.a,b);return true}else{return false}} +function u6b(a){var b,c;b=RD(mQb(a,(Ywc(),Iwc)),10);if(b){c=b.c;Ymb(c.a,b);c.a.c.length==0&&Ymb(Y2b(b).b,c)}} +function dfc(a,b){if(nQb(a,(Ywc(),zwc))&&nQb(b,zwc)){return RD(mQb(b,zwc),17).a-RD(mQb(a,zwc),17).a}return 0} +function ifc(a,b){if(nQb(a,(Ywc(),zwc))&&nQb(b,zwc)){return RD(mQb(a,zwc),17).a-RD(mQb(b,zwc),17).a}return 0} +function kBb(a){if(dBb){return $C(JL,Xxe,581,0,0,1)}return RD(anb(a.a,$C(JL,Xxe,581,a.a.c.length,0,1)),856)} +function yn(a,b,c,d){fn();return new Nx(cD(WC(UK,1),Zve,44,0,[(ck(a,b),new gp(a,b)),(ck(c,d),new gp(c,d))]))} +function bBd(a,b,c){var d,e;e=(d=new q4d,d);yBd(e,b,c);WGd((!a.q&&(a.q=new C5d(s7,a,11,10)),a.q),e);return e} +function xAd(a){var b,c,d,e;e=meb(pAd,a);c=e.length;d=$C(qJ,Nve,2,c,6,1);for(b=0;b<c;++b){d[b]=e[b]}return d} +function jwb(a,b){var c;if(b*2+1>=a.b.c.length){return}jwb(a,2*b+1);c=2*b+2;c<a.b.c.length&&jwb(a,c);kwb(a,b)} +function sKc(a,b){var c,d;for(d=Sub(a,0);d.b!=d.d.c;){c=RD(evb(d),219);if(c.e.length>0){b.Cd(c);c.i&&zKc(c)}}} +function Ejb(a,b,c){var d;for(d=c-1;d>=0&&a[d]===b[d];d--);return d<0?0:Ldb(Cdb(a[d],yxe),Cdb(b[d],yxe))?-1:1} +function it(a,b,c){var d,e;this.g=a;this.c=b;this.a=this;this.d=this;e=Wp(c);d=$C(UG,ewe,227,e,0,1);this.b=d} +function fQb(a,b,c,d,e){var f,g;for(g=c;g<=e;g++){for(f=b;f<=d;f++){if(PPb(a,f,g)){return true}}}return false} +function Dc(a,b){var c,d;for(d=a.Zb().Cc().Kc();d.Ob();){c=RD(d.Pb(),16);if(c.Hc(b)){return true}}return false} +function iu(a,b,c){var d,e,f,g;uFb(c);g=false;f=a.fd(b);for(e=c.Kc();e.Ob();){d=e.Pb();f.Rb(d);g=true}return g} +function NMd(a,b){var c,d;d=RD(Ywd(a.a,4),129);c=$C(d6,IJe,424,b,0,1);d!=null&&hib(d,0,c,0,d.length);return c} +function hSd(a,b){var c;c=new lSd((a.f&256)!=0,a.i,a.a,a.d,(a.f&16)!=0,a.j,a.g,b);a.e!=null||(c.c=a);return c} +function Tv(a,b){var c;if(a===b){return true}else if(ZD(b,85)){c=RD(b,85);return Rx(gn(a),c.vc())}return false} +function Vjb(a,b,c){var d,e;for(e=c.Kc();e.Ob();){d=RD(e.Pb(),44);if(a.Be(b,d.md())){return true}}return false} +function lmc(a,b,c){if(!a.d[b.p][c.p]){kmc(a,b,c);a.d[b.p][c.p]=true;a.d[c.p][b.p]=true}return a.a[b.p][c.p]} +function vMc(a,b){var c;if(!a||a==b||!nQb(b,(Ywc(),pwc))){return false}c=RD(mQb(b,(Ywc(),pwc)),10);return c!=a} +function Bhe(a){switch(a.i){case 2:{return true}case 1:{return false}case -1:{++a.c}default:{return a.$l()}}} +function Che(a){switch(a.i){case -2:{return true}case -1:{return false}case 1:{--a.c}default:{return a._l()}}} +function bgb(a){oz.call(this,'The given string does not match the expected format for individual spacings.',a)} +function J6c(a,b){var c;b.Ug('Min Size Preprocessing',1);c=vsd(a);Ixd(a,(X6c(),U6c),c.a);Ixd(a,R6c,c.b);b.Vg()} +function Djd(a){var b,c,d;b=0;d=$C(l3,Nve,8,a.b,0,1);c=Sub(a,0);while(c.b!=c.d.c){d[b++]=RD(evb(c),8)}return d} +function Ajd(a,b,c){var d,e,f;d=new Yub;for(f=Sub(c,0);f.b!=f.d.c;){e=RD(evb(f),8);Mub(d,new sjd(e))}iu(a,b,d)} +function az(a,b){var c;c=Bdb(a,b);if(Ldb($db(a,b),0)|Jdb($db(a,c),0)){return c}return Bdb(Sve,$db(Udb(c,63),1))} +function le(a,b){var c,d;c=RD(a.d.Bc(b),16);if(!c){return null}d=a.e.hc();d.Gc(c);a.e.d-=c.gc();c.$b();return d} +function Dyb(a){var b;b=a.a.c.length;if(b>0){return lyb(b-1,a.a.c.length),Xmb(a.a,b-1)}else{throw Adb(new Srb)}} +function nFb(a,b,c){if(a>b){throw Adb(new agb(_xe+a+aye+b))}if(a<0||b>c){throw Adb(new xeb(_xe+a+bye+b+Qxe+c))}} +function yXd(a,b){if(a.D==null&&a.B!=null){a.D=a.B;a.B=null}JXd(a,b==null?null:(uFb(b),b));!!a.C&&a.hl(null)} +function JCc(a,b){var c;c=iGd((QCc(),OCc))!=null&&b.Sg()!=null?Kfb(UD(b.Sg()))/Kfb(UD(iGd(OCc))):1;Zjb(a.b,b,c)} +function $Lc(a,b){var c,d;d=a.c[b];if(d==0){return}a.c[b]=0;a.d-=d;c=b+1;while(c<a.a.length){a.a[c]-=d;c+=c&-c}} +function VHd(a){var b;++a.j;if(a.i==0){a.g=null}else if(a.i<a.g.length){b=a.g;a.g=a.aj(a.i);hib(b,0,a.g,0,a.i)}} +function Ned(a,b,c){if(b<0){throw Adb(new veb(zGe+b))}if(b<a.j.c.length){$mb(a.j,b,c)}else{Led(a,b);Rmb(a.j,c)}} +function uhd(a){if(!a.a||(a.a.i&8)==0){throw Adb(new dgb('Enumeration class expected for layout option '+a.f))}} +function y1d(a){var b;b=(!a.a&&(a.a=new C5d(l7,a,9,5)),a.a);if(b.i!=0){return N1d(RD(QHd(b,0),694))}return null} +function yr(a){var b;Qb(a);Mb(true,'numberToAdvance must be nonnegative');for(b=0;b<0&&gs(a);b++){hs(a)}return b} +function eSb(){eSb=geb;bSb=(VRb(),URb);aSb=new lGd(vze,bSb);_Rb=new jGd(wze);cSb=new jGd(xze);dSb=new jGd(yze)} +function s_c(){s_c=geb;r_c=new t_c(MAe,0);p_c=new t_c(QEe,1);q_c=new t_c('FAN',2);o_c=new t_c('CONSTRAINT',3)} +function g4c(){g4c=geb;d4c=new i4c(LAe,0);e4c=new i4c('RADIAL_COMPACTION',1);f4c=new i4c('WEDGE_COMPACTION',2)} +function lFc(){lFc=geb;iFc=new mFc('CONSERVATIVE',0);jFc=new mFc('CONSERVATIVE_SOFT',1);kFc=new mFc('SLOPPY',2)} +function xBb(){xBb=geb;uBb=new yBb('CONCURRENT',0);vBb=new yBb('IDENTITY_FINISH',1);wBb=new yBb('UNORDERED',2)} +function NXb(){NXb=geb;LXb=Wx(cD(WC(s3,1),jwe,88,0,[(Cmd(),ymd),zmd]));MXb=Wx(cD(WC(s3,1),jwe,88,0,[Bmd,xmd]))} +function rb(a){return bE(a)?qJ:_D(a)?VI:$D(a)?QI:YD(a)?a.Rm:aD(a)?a.Rm:a.Rm||Array.isArray(a)&&WC(hI,1)||hI} +function Qje(a){return !a?null:(a.i&1)!=0?a==xdb?QI:a==kE?bJ:a==jE?ZI:a==iE?VI:a==lE?eJ:a==wdb?lJ:a==gE?RI:SI:a} +function CIb(a){if(a.c!=a.b.b||a.i!=a.g.b){aFb(a.a.c,0);Tmb(a.a,a.b);Tmb(a.a,a.g);a.c=a.b.b;a.i=a.g.b}return a.a} +function vmb(a,b){var c,d;c=a.a.length-1;while(b!=a.b){d=b-1&c;bD(a.a,b,a.a[d]);b=d}bD(a.a,a.b,null);a.b=a.b+1&c} +function umb(a,b){var c,d;c=a.a.length-1;a.c=a.c-1&c;while(b!=a.c){d=b+1&c;bD(a.a,b,a.a[d]);b=d}bD(a.a,a.c,null)} +function Smb(a,b,c){var d,e;wFb(b,a.c.length);d=c.Pc();e=d.length;if(e==0){return false}YEb(a.c,b,d);return true} +function otb(a,b,c){var d,e,f,g;for(e=c,f=0,g=e.length;f<g;++f){d=e[f];if(a.b.Be(b,d.ld())){return d}}return null} +function Tnb(a){var b,c,d,e,f;f=1;for(c=a,d=0,e=c.length;d<e;++d){b=c[d];f=31*f+(b!=null?tb(b):0);f=f|0}return f} +function ss(a){var b,c,d,e,f;b={};for(d=a,e=0,f=d.length;e<f;++e){c=d[e];b[':'+(c.f!=null?c.f:''+c.g)]=c}return b} +function tSd(a){var b,c;if(a==null)return null;for(b=0,c=a.length;b<c;b++){if(!GSd(a[b]))return a[b]}return null} +function gKb(a,b){if(!a){return 0}if(b&&!a.j){return 0}if(ZD(a,127)){if(RD(a,127).a.b==0){return 0}}return a.jf()} +function hKb(a,b){if(!a){return 0}if(b&&!a.k){return 0}if(ZD(a,127)){if(RD(a,127).a.a==0){return 0}}return a.kf()} +function orc(a,b){if(nQb(a,(Ywc(),zwc))&&nQb(b,zwc)){return hgb(RD(mQb(a,zwc),17).a,RD(mQb(b,zwc),17).a)}return 0} +function EHc(a){var b,c,d;d=0;for(c=new is(Mr(a.a.Kc(),new ir));gs(c);){b=RD(hs(c),18);b.c.i==b.d.i||++d}return d} +function Gad(a,b){var c,d,e;e=b-a.f;for(d=new Anb(a.d);d.a<d.c.c.length;){c=RD(ynb(d),315);fad(c,c.e,c.f+e)}a.f=b} +function YVd(a,b){var c,d,e;d=a.Yk(b,null);e=null;if(b){e=(jTd(),c=new s2d,c);l2d(e,a.r)}d=XVd(a,e,d);!!d&&d.oj()} +function P0b(a,b){var c,d,e;c=a;e=0;do{if(c==b){return e}d=c.e;if(!d){throw Adb(new _fb)}c=Y2b(d);++e}while(true)} +function uRb(a){var b,c,d,e;d=a.b.a;for(c=d.a.ec().Kc();c.Ob();){b=RD(c.Pb(),567);e=new DSb(b,a.e,a.f);Rmb(a.g,e)}} +function DZb(a){var b;b=new XZb(a);t$b(a.a,BZb,new mob(cD(WC(wQ,1),rve,382,0,[b])));!!b.d&&Rmb(b.f,b.d);return b.f} +function M2b(a,b){var c;for(c=0;c<b.length;c++){if(a==(BFb(c,b.length),b.charCodeAt(c))){return true}}return false} +function BSd(a,b){return b<a.length&&(BFb(b,a.length),a.charCodeAt(b)!=63)&&(BFb(b,a.length),a.charCodeAt(b)!=35)} +function trc(a,b,c,d){nrc(this);this.c=$C(jR,WAe,10,a.a.c.length,0,1);this.e=b;anb(a.a,this.c);this.f=c;this.b=d} +function Cz(a){Az();ez(this);gz(this);this.e=a;hz(this,a);this.g=a==null?vve:jeb(a);this.a='';this.b=a;this.a=''} +function Pad(){this.a=new Qad;this.f=new Sad(this);this.b=new Uad(this);this.i=new Wad(this);this.e=new Yad(this)} +function Ks(){Js.call(this,new hub(Sv(16)));dk(2,Mve);this.b=2;this.a=new ct(null,null,0,null);Ss(this.a,this.a)} +function NC(a){HC();throw Adb(new aC("Unexpected typeof result '"+a+"'; please report this bug to the GWT team"))} +function AVc(a,b,c){if($wnd.Math.abs(b-a)<DEe||$wnd.Math.abs(c-a)<DEe){return true}return b-a>DEe?a-c>DEe:c-a>DEe} +function vjd(a,b){var c;for(c=0;c<b.length;c++){if(a==(BFb(c,b.length),b.charCodeAt(c))){return true}}return false} +function HSd(a){var b,c;if(a==null)return false;for(b=0,c=a.length;b<c;b++){if(!GSd(a[b]))return false}return true} +function M8c(a,b){var c,d,e;d=false;c=b.q.d;if(b.d<a.b){e=dad(b.q,a.b);if(b.q.d>e){ead(b.q,e);d=c!=b.q.d}}return d} +function C3c(a,b){var c,d,e,f,g,h,i,j;i=b.i;j=b.j;d=a.f;e=d.i;f=d.j;g=i-e;h=j-f;c=$wnd.Math.sqrt(g*g+h*h);return c} +function pBd(a,b){var c,d;d=Hvd(a);if(!d){!$Ad&&($Ad=new L5d);c=(gSd(),nSd(b));d=new Sde(c);WGd(d.El(),a)}return d} +function Sc(a,b){var c,d;c=RD(a.c.Bc(b),16);if(!c){return a.jc()}d=a.hc();d.Gc(c);a.d-=c.gc();c.$b();return a.mc(d)} +function tKc(a,b){var c,d;d=Kwb(a.d,1)!=0;c=true;while(c){c=false;c=b.c.mg(b.e,d);c=c|DKc(a,b,d,false);d=!d}yKc(a)} +function omc(a,b,c,d){var e,f;a.a=b;f=d?0:1;a.f=(e=new mmc(a.c,a.a,c,f),new Pmc(c,a.a,e,a.e,a.b,a.c==(RKc(),PKc)))} +function Imb(a){var b;sFb(a.a!=a.b);b=a.d.a[a.a];zmb(a.b==a.d.c&&b!=null);a.c=a.a;a.a=a.a+1&a.d.a.length-1;return b} +function Vib(a){var b;if(a.c!=0){return a.c}for(b=0;b<a.a.length;b++){a.c=a.c*33+(a.a[b]&-1)}a.c=a.c*a.e;return a.c} +function Oue(a){var b;if(!(a.c.c<0?a.a>=a.c.b:a.a<=a.c.b)){throw Adb(new Dvb)}b=a.a;a.a+=a.c.c;++a.b;return sgb(b)} +function h5b(a){var b;b=new y2b(a.a);kQb(b,a);pQb(b,(Ywc(),Awc),a);b.o.a=a.g;b.o.b=a.f;b.n.a=a.i;b.n.b=a.j;return b} +function tVc(a){return (qpd(),hpd).Hc(a.j)?Kfb(UD(mQb(a,(Ywc(),Swc)))):xjd(cD(WC(l3,1),Nve,8,0,[a.i.n,a.n,a.a])).b} +function ZJc(a){var b;b=vfd(XJc);RD(mQb(a,(Ywc(),kwc)),21).Hc((ovc(),kvc))&&pfd(b,(sXb(),pXb),(hcc(),Ybc));return b} +function M2c(a){var b,c,d,e;e=new _sb;for(d=new Anb(a);d.a<d.c.c.length;){c=RD(ynb(d),27);b=P2c(c);ye(e,b)}return e} +function hIc(a){var b,c;for(c=new Anb(a.r);c.a<c.c.c.length;){b=RD(ynb(c),10);if(a.n[b.p]<=0){return b}}return null} +function LGb(a,b,c){var d,e;for(e=b.a.a.ec().Kc();e.Ob();){d=RD(e.Pb(),60);if(MGb(a,d,c)){return true}}return false} +function Rcc(a,b,c,d){var e,f;for(f=a.Kc();f.Ob();){e=RD(f.Pb(),72);e.n.a=b.a+(d.a-e.o.a)/2;e.n.b=b.b;b.b+=e.o.b+c}} +function hNb(a,b,c){var d;d=new rMb(a,b);Rc(a.r,b.ag(),d);if(c&&!Rod(a.u)){d.c=new TKb(a.d);Umb(b.Rf(),new kNb(d))}} +function Ddb(a,b){var c;if(Kdb(a)&&Kdb(b)){c=a-b;if(!isNaN(c)){return c}}return uD(Kdb(a)?Wdb(a):a,Kdb(b)?Wdb(b):b)} +function Iid(a,b){var c,d,e;e=1;c=a;d=b>=0?b:-b;while(d>0){if(d%2==0){c*=c;d=d/2|0}else{e*=c;d-=1}}return b<0?1/e:e} +function Jid(a,b){var c,d,e;e=1;c=a;d=b>=0?b:-b;while(d>0){if(d%2==0){c*=c;d=d/2|0}else{e*=c;d-=1}}return b<0?1/e:e} +function Vvd(a,b){var c,d,e,f;f=(e=a?Hvd(a):null,Pje((d=b,e?e.Gl():null,d)));if(f==b){c=Hvd(a);!!c&&c.Gl()}return f} +function g2d(a,b,c){var d,e;e=a.f;a.f=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,0,e,b);!c?(c=d):c.nj(d)}return c} +function e2d(a,b,c){var d,e;e=a.b;a.b=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,3,e,b);!c?(c=d):c.nj(d)}return c} +function rAd(a,b,c){var d,e;e=a.a;a.a=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,1,e,b);!c?(c=d):c.nj(d)}return c} +function SNd(a){var b,c,d,e;if(a!=null){for(c=0;c<a.length;++c){b=a[c];if(b){RD(b.g,379);e=b.i;for(d=0;d<e;++d);}}}} +function Vnb(a,b,c,d,e,f,g,h){var i;i=c;while(f<g){i>=d||b<c&&h.Ne(a[b],a[i])<=0?bD(e,f++,a[b++]):bD(e,f++,a[i++])}} +function Njb(a,b,c,d,e){if(b==0||d==0){return}b==1?(e[d]=Pjb(e,c,d,a[0])):d==1?(e[b]=Pjb(e,a,b,c[0])):Ojb(a,c,e,b,d)} +function w9c(a,b,c){var d,e,f,g;d=c/a.gc();e=0;for(g=a.Kc();g.Ob();){f=RD(g.Pb(),186);Gad(f,f.f+d*e);Dad(f,b,d);++e}} +function cad(a){var b,c,d;d=0;for(c=new Anb(a.a);c.a<c.c.c.length;){b=RD(ynb(c),172);d=$wnd.Math.max(d,b.g)}return d} +function EKc(a){var b,c,d;for(d=new Anb(a.b);d.a<d.c.c.length;){c=RD(ynb(d),219);b=c.c.kg()?c.f:c.a;!!b&&MLc(b,c.j)}} +function lDc(){lDc=geb;iDc=new nDc('DUMMY_NODE_OVER',0);jDc=new nDc('DUMMY_NODE_UNDER',1);kDc=new nDc('EQUAL',2)} +function mqd(){mqd=geb;kqd=new nqd('PARALLEL_NODE',0);jqd=new nqd('HIERARCHICAL_NODE',1);lqd=new nqd('ROOT_NODE',2)} +function Fnd(){Fnd=geb;Dnd=new Gnd('INHERIT',0);Cnd=new Gnd('INCLUDE_CHILDREN',1);End=new Gnd('SEPARATE_CHILDREN',2)} +function hyd(a,b){switch(b){case 1:!a.n&&(a.n=new C5d(I4,a,1,7));sLd(a.n);return;case 2:jyd(a,null);return;}Exd(a,b)} +function c9c(a){switch(a.g){case 0:return new R8c;case 1:return new o9c;case 2:return new X8c;default:return null;}} +function eq(a){_l();switch(a.c){case 0:return Px(),Ox;case 1:return new Fy(Ir(new Osb(a)));default:return new dq(a);}} +function go(a){_l();switch(a.gc()){case 0:return Px(),Ox;case 1:return new Fy(a.Kc().Pb());default:return new Qx(a);}} +function Pm(a){var b;switch(a.gc()){case 0:return sm;case 1:return new Dy(Qb(a.Xb(0)));default:b=a;return new Kx(b);}} +function sgb(a){var b,c;if(a>-129&&a<128){return ugb(),b=a+128,c=tgb[b],!c&&(c=tgb[b]=new fgb(a)),c}return new fgb(a)} +function bhb(a){var b,c;if(a>-129&&a<128){return dhb(),b=a+128,c=chb[b],!c&&(c=chb[b]=new Xgb(a)),c}return new Xgb(a)} +function M$b(a,b){var c;if(a.a.c.length>0){c=RD(Vmb(a.a,a.a.c.length-1),579);if(Q_b(c,b)){return}}Rmb(a.a,new S_b(b))} +function Ekc(a){lkc();var b,c;b=a.d.c-a.e.c;c=RD(a.g,154);Umb(c.b,new Ykc(b));Umb(c.c,new $kc(b));xgb(c.i,new alc(b))} +function Mlc(a){var b;b=new bib;b.a+='VerticalSegment ';Yhb(b,a.e);b.a+=' ';Zhb(b,Eb(new Gb,new Anb(a.k)));return b.a} +function Fmc(a,b){var c,d,e;c=0;for(e=b3b(a,b).Kc();e.Ob();){d=RD(e.Pb(),12);c+=mQb(d,(Ywc(),Iwc))!=null?1:0}return c} +function VTc(a,b,c){var d,e,f;d=0;for(f=Sub(a,0);f.b!=f.d.c;){e=Kfb(UD(evb(f)));if(e>c){break}else e>=b&&++d}return d} +function Wv(b,c){Qb(b);try{return b._b(c)}catch(a){a=zdb(a);if(ZD(a,212)||ZD(a,169)){return false}else throw Adb(a)}} +function Nk(b,c){Qb(b);try{return b.Hc(c)}catch(a){a=zdb(a);if(ZD(a,212)||ZD(a,169)){return false}else throw Adb(a)}} +function Ok(b,c){Qb(b);try{return b.Mc(c)}catch(a){a=zdb(a);if(ZD(a,212)||ZD(a,169)){return false}else throw Adb(a)}} +function Xv(b,c){Qb(b);try{return b.xc(c)}catch(a){a=zdb(a);if(ZD(a,212)||ZD(a,169)){return null}else throw Adb(a)}} +function Yv(b,c){Qb(b);try{return b.Bc(c)}catch(a){a=zdb(a);if(ZD(a,212)||ZD(a,169)){return null}else throw Adb(a)}} +function aMc(a,b){switch(b.g){case 2:case 1:return b3b(a,b);case 3:case 4:return hv(b3b(a,b));}return yob(),yob(),vob} +function QAd(a){var b;if((a.Db&64)!=0)return awd(a);b=new Shb(awd(a));b.a+=' (name: ';Nhb(b,a.zb);b.a+=')';return b.a} +function Fgd(a){var b;b=RD(cub(a.c.c,''),233);if(!b){b=new fgd(ogd(ngd(new pgd,''),'Other'));dub(a.c.c,'',b)}return b} +function hBd(a,b,c){var d,e;e=a.sb;a.sb=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,4,e,b);!c?(c=d):c.nj(d)}return c} +function ZVd(a,b,c){var d,e;e=a.r;a.r=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,8,e,a.r);!c?(c=d):c.nj(d)}return c} +function q5d(a,b,c){var d,e;d=new P3d(a.e,4,13,(e=b.c,e?e:(JTd(),wTd)),null,fZd(a,b),false);!c?(c=d):c.nj(d);return c} +function p5d(a,b,c){var d,e;d=new P3d(a.e,3,13,null,(e=b.c,e?e:(JTd(),wTd)),fZd(a,b),false);!c?(c=d):c.nj(d);return c} +function Oee(a,b){var c,d;c=RD(b,691);d=c.el();!d&&c.fl(d=ZD(b,90)?new afe(a,RD(b,29)):new mfe(a,RD(b,156)));return d} +function KHd(a,b,c){var d;a._i(a.i+1);d=a.Zi(b,c);b!=a.i&&hib(a.g,b,a.g,b+1,a.i-b);bD(a.g,b,d);++a.i;a.Mi(b,c);a.Ni()} +function Hyb(a,b){var c;if(b.a){c=b.a.a.length;!a.a?(a.a=new dib(a.d)):Zhb(a.a,a.b);Xhb(a.a,b.a,b.d.length,c)}return a} +function wib(a,b){var c;a.c=b;a.a=pjb(b);a.a<54&&(a.f=(c=b.d>1?DFb(b.a[0],b.a[1]):DFb(b.a[0],0),Xdb(b.e>0?c:Odb(c))))} +function MDb(a,b){var c;c=new IEb;if(!a.a.Bd(c)){LCb(a);return Kvb(),Kvb(),Jvb}return Kvb(),new Ovb(uFb(LDb(a,c.a,b)))} +function t9b(a,b){var c;if(a.c.length==0){return}c=RD(anb(a,$C(jR,WAe,10,a.c.length,0,1)),199);Znb(c,new F9b);q9b(c,b)} +function z9b(a,b){var c;if(a.c.length==0){return}c=RD(anb(a,$C(jR,WAe,10,a.c.length,0,1)),199);Znb(c,new K9b);q9b(c,b)} +function pb(a,b){return bE(a)?lhb(a,b):_D(a)?Lfb(a,b):$D(a)?(uFb(a),dE(a)===dE(b)):YD(a)?a.Fb(b):aD(a)?mb(a,b):Hz(a,b)} +function Cvd(a,b,c){if(b<0){Tvd(a,c)}else{if(!c.rk()){throw Adb(new agb(KHe+c.xe()+LHe))}RD(c,69).wk().Ek(a,a.hi(),b)}} +function xFb(a,b,c){if(a<0||b>c){throw Adb(new veb(_xe+a+bye+b+', size: '+c))}if(a>b){throw Adb(new agb(_xe+a+aye+b))}} +function oVd(a){var b;if((a.Db&64)!=0)return awd(a);b=new Shb(awd(a));b.a+=' (source: ';Nhb(b,a.d);b.a+=')';return b.a} +function JSd(a){if(a>=65&&a<=70){return a-65+10}if(a>=97&&a<=102){return a-97+10}if(a>=48&&a<=57){return a-48}return 0} +function lMb(a){hMb();var b,c,d,e;for(c=nMb(),d=0,e=c.length;d<e;++d){b=c[d];if(Wmb(b.a,a,0)!=-1){return b}}return gMb} +function zde(a,b){var c,d,e,f;b.ej(a.a);f=RD(Ywd(a.a,8),2035);if(f!=null){for(c=f,d=0,e=c.length;d<e;++d){null.Um()}}} +function _Vd(a,b){var c;c=(a.Bb&256)!=0;b?(a.Bb|=256):(a.Bb&=-257);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,2,c,b))} +function EYd(a,b){var c;c=(a.Bb&256)!=0;b?(a.Bb|=256):(a.Bb&=-257);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,8,c,b))} +function j1d(a,b){var c;c=(a.Bb&256)!=0;b?(a.Bb|=256):(a.Bb&=-257);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,8,c,b))} +function aWd(a,b){var c;c=(a.Bb&512)!=0;b?(a.Bb|=512):(a.Bb&=-513);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,3,c,b))} +function FYd(a,b){var c;c=(a.Bb&512)!=0;b?(a.Bb|=512):(a.Bb&=-513);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,9,c,b))} +function m2d(a,b,c){var d,e;e=a.a;a.a=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,5,e,a.a);!c?(c=d):oKd(c,d)}return c} +function kle(a,b){var c;if(a.b==-1&&!!a.a){c=a.a.pk();a.b=!c?BYd(a.c.Dh(),a.a):a.c.Hh(a.a.Lj(),c)}return a.c.yh(a.b,b)} +function t0d(a,b){var c,d;for(d=new dMd(a);d.e!=d.i.gc();){c=RD(bMd(d),29);if(dE(b)===dE(c)){return true}}return false} +function a9b(a){var b,c;b=a.k;if(b==(r3b(),m3b)){c=RD(mQb(a,(Ywc(),hwc)),64);return c==(qpd(),Yod)||c==npd}return false} +function QCb(a){var b;b=RCb(a);if(Gdb(b.a,0)){return Tvb(),Tvb(),Svb}return Tvb(),new Yvb(Idb(b.a,0)?Orb(b)/Xdb(b.a):0)} +function Aib(a,b){this.e=b;this.a=Dib(a);this.a<54?(this.f=Xdb(a)):(this.c=(Pib(),Ddb(a,0)>=0?jjb(a):Xib(jjb(Odb(a)))))} +function G0b(a,b,c,d,e,f){this.e=new bnb;this.f=(BEc(),AEc);Rmb(this.e,a);this.d=b;this.a=c;this.b=d;this.f=e;this.c=f} +function bQb(a,b,c){a.n=YC(lE,[Nve,rxe],[376,28],14,[c,eE($wnd.Math.ceil(b/32))],2);a.o=b;a.p=c;a.j=b-1>>1;a.k=c-1>>1} +function ggb(a){a-=a>>1&1431655765;a=(a>>2&858993459)+(a&858993459);a=(a>>4)+a&252645135;a+=a>>8;a+=a>>16;return a&63} +function C4d(a,b){var c,d;for(d=new dMd(a);d.e!=d.i.gc();){c=RD(bMd(d),142);if(dE(b)===dE(c)){return true}}return false} +function Iee(a,b,c){var d,e,f;f=(e=N5d(a.b,b),e);if(f){d=RD(tfe(Pee(a,f),''),29);if(d){return Ree(a,d,b,c)}}return null} +function Lee(a,b,c){var d,e,f;f=(e=N5d(a.b,b),e);if(f){d=RD(tfe(Pee(a,f),''),29);if(d){return See(a,d,b,c)}}return null} +function IDd(a,b){var c;c=Ao(a.i,b);if(c==null){throw Adb(new CDd('Node did not exist in input.'))}wEd(b,c);return null} +function wvd(a,b){var c;c=wYd(a,b);if(ZD(c,331)){return RD(c,35)}throw Adb(new agb(KHe+b+"' is not a valid attribute"))} +function VGd(a,b,c){var d;d=a.gc();if(b>d)throw Adb(new aMd(b,d));if(a.Si()&&a.Hc(c)){throw Adb(new agb(LIe))}a.Gi(b,c)} +function w7b(a,b){b.Ug('Sort end labels',1);FDb(CDb(EDb(new SDb(null,new Swb(a.b,16)),new H7b),new J7b),new L7b);b.Vg()} +function Cmd(){Cmd=geb;Amd=new Gmd(Sye,0);zmd=new Gmd(Oye,1);ymd=new Gmd(Nye,2);xmd=new Gmd(Zye,3);Bmd=new Gmd('UP',4)} +function gbd(){gbd=geb;dbd=new hbd('P1_STRUCTURE',0);ebd=new hbd('P2_PROCESSING_ORDER',1);fbd=new hbd('P3_EXECUTION',2)} +function r0c(){r0c=geb;q0c=mfd(mfd(rfd(mfd(mfd(rfd(pfd(new ufd,(YVc(),VVc),(WYc(),VYc)),WVc),RYc),TYc),XVc),NYc),UYc)} +function s8b(a){switch(RD(mQb(a,(Ywc(),owc)),311).g){case 1:pQb(a,owc,(Gvc(),Dvc));break;case 2:pQb(a,owc,(Gvc(),Fvc));}} +function bUc(a){switch(a){case 0:return new mUc;case 1:return new cUc;case 2:return new hUc;default:throw Adb(new _fb);}} +function Fmd(a){switch(a.g){case 2:return zmd;case 1:return ymd;case 4:return xmd;case 3:return Bmd;default:return Amd;}} +function UNb(a,b){switch(a.b.g){case 0:case 1:return b;case 2:case 3:return new Uid(b.d,0,b.a,b.b);default:return null;}} +function rpd(a){switch(a.g){case 1:return ppd;case 2:return Yod;case 3:return Xod;case 4:return npd;default:return opd;}} +function spd(a){switch(a.g){case 1:return npd;case 2:return ppd;case 3:return Yod;case 4:return Xod;default:return opd;}} +function tpd(a){switch(a.g){case 1:return Xod;case 2:return npd;case 3:return ppd;case 4:return Yod;default:return opd;}} +function cyd(a,b,c,d){switch(b){case 1:return !a.n&&(a.n=new C5d(I4,a,1,7)),a.n;case 2:return a.k;}return Axd(a,b,c,d)} +function uLd(a,b,c){var d,e;if(a.Pj()){e=a.Qj();d=SHd(a,b,c);a.Jj(a.Ij(7,sgb(c),d,b,e));return d}else{return SHd(a,b,c)}} +function VNd(a,b){var c,d,e;if(a.d==null){++a.e;--a.f}else{e=b.ld();c=b.Bi();d=(c&lve)%a.d.length;iOd(a,d,XNd(a,d,c,e))}} +function xWd(a,b){var c;c=(a.Bb&gwe)!=0;b?(a.Bb|=gwe):(a.Bb&=-1025);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,10,c,b))} +function DWd(a,b){var c;c=(a.Bb&qxe)!=0;b?(a.Bb|=qxe):(a.Bb&=-4097);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,12,c,b))} +function EWd(a,b){var c;c=(a.Bb&bKe)!=0;b?(a.Bb|=bKe):(a.Bb&=-8193);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,15,c,b))} +function FWd(a,b){var c;c=(a.Bb&cKe)!=0;b?(a.Bb|=cKe):(a.Bb&=-2049);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,11,c,b))} +function zKc(a){var b;if(a.g){b=a.c.kg()?a.f:a.a;BKc(b.a,a.o,true);BKc(b.a,a.o,false);pQb(a.o,(yCc(),BBc),(Bod(),vod))}} +function Orc(a){var b;if(!a.a){throw Adb(new dgb('Cannot offset an unassigned cut.'))}b=a.c-a.b;a.b+=b;Qrc(a,b);Rrc(a,b)} +function JDd(a,b){var c;c=Wjb(a.k,b);if(c==null){throw Adb(new CDd('Port did not exist in input.'))}wEd(b,c);return null} +function Jje(a){var b,c;for(c=Kje(BXd(a)).Kc();c.Ob();){b=WD(c.Pb());if(bAd(a,b)){return USd((TSd(),SSd),b)}}return null} +function qJb(a){var b,c;for(c=a.p.a.ec().Kc();c.Ob();){b=RD(c.Pb(),218);if(b.f&&a.b[b.c]<-1.0E-10){return b}}return null} +function Lr(a){var b,c;c=Thb(new bib,91);b=true;while(a.Ob()){b||(c.a+=pve,c);b=false;Yhb(c,a.Pb())}return (c.a+=']',c).a} +function o_b(a){var b,c,d;b=new bnb;for(d=new Anb(a.b);d.a<d.c.c.length;){c=RD(ynb(d),602);Tmb(b,RD(c.Cf(),16))}return b} +function TXb(a,b){var c,d;for(d=new Anb(b);d.a<d.c.c.length;){c=RD(ynb(d),42);Ymb(a.b.b,c.b);hYb(RD(c.a,194),RD(c.b,86))}} +function aRb(a,b){var c;c=Qfb(a.b.c,b.b.c);if(c!=0){return c}c=Qfb(a.a.a,b.a.a);if(c!=0){return c}return Qfb(a.a.b,b.a.b)} +function Qfb(a,b){if(a<b){return -1}if(a>b){return 1}if(a==b){return a==0?Qfb(1/a,1/b):0}return isNaN(a)?isNaN(b)?0:1:-1} +function pmb(a){var b;b=a.a[a.c-1&a.a.length-1];if(b==null){return null}a.c=a.c-1&a.a.length-1;bD(a.a,a.c,null);return b} +function Dqe(a){var b,c,d;d=0;c=a.length;for(b=0;b<c;b++){a[b]==32||a[b]==13||a[b]==10||a[b]==9||(a[d++]=a[b])}return d} +function Nge(a,b){var c,d,e,f,g;g=pke(a.e.Dh(),b);f=0;c=RD(a.g,124);for(e=0;e<a.i;++e){d=c[e];g.am(d.Lk())&&++f}return f} +function tge(a,b,c){var d,e;e=ZD(b,102)&&(RD(b,19).Bb&txe)!=0?new She(b,a):new Phe(b,a);for(d=0;d<c;++d){Dhe(e)}return e} +function yrd(a,b,c){var d,e;if(a.c){Isd(a.c,b,c)}else{for(e=new Anb(a.b);e.a<e.c.c.length;){d=RD(ynb(e),163);yrd(d,b,c)}}} +function tGd(a,b,c){var d,e;d=RD(b.of(a.a),34);e=RD(c.of(a.a),34);return d!=null&&e!=null?Leb(d,e):d!=null?-1:e!=null?1:0} +function Ce(a,b){var c,d,e;uFb(b);c=false;for(d=new Anb(a);d.a<d.c.c.length;){e=ynb(d);if(b.Hc(e)){znb(d);c=true}}return c} +function xsb(a){var b,c,d,e;c=(b=RD(mfb((d=a.Rm,e=d.f,e==WI?d:e)),9),new Fsb(b,RD(WEb(b,b.length),9),0));zsb(c,a);return c} +function i2b(a){var b,c;c=RD(mQb(a,(yCc(),rAc)),88);if(c==(Cmd(),Amd)){b=Kfb(UD(mQb(a,Tzc)));return b>=1?zmd:xmd}return c} +function Xhc(a){switch(RD(mQb(a,(yCc(),yAc)),223).g){case 1:return new jqc;case 3:return new arc;default:return new dqc;}} +function MCb(a){if(a.c){MCb(a.c)}else if(a.d){throw Adb(new dgb("Stream already terminated, can't be modified or used"))}} +function Ltb(a,b,c){var d;d=a.a.get(b);a.a.set(b,c===undefined?null:c);if(d===undefined){++a.c;++a.b.g}else{++a.d}return d} +function HHc(a,b,c){var d,e;for(e=a.a.ec().Kc();e.Ob();){d=RD(e.Pb(),10);if(Be(c,RD(Vmb(b,d.p),16))){return d}}return null} +function u0c(a,b,c){var d;d=0;!!b&&(Emd(a.a)?(d+=b.f.a/2):(d+=b.f.b/2));!!c&&(Emd(a.a)?(d+=c.f.a/2):(d+=c.f.b/2));return d} +function LWb(a,b,c){var d;d=c;!d&&(d=Nqd(new Oqd,0));d.Ug(EAe,2);y0b(a.b,b,d.eh(1));NWb(a,b,d.eh(1));h0b(b,d.eh(1));d.Vg()} +function CGd(a,b,c){var d,e;d=(bvd(),e=new Xxd,e);Vxd(d,b);Wxd(d,c);!!a&&WGd((!a.a&&(a.a=new XZd(D4,a,5)),a.a),d);return d} +function kyd(a){var b;if((a.Db&64)!=0)return awd(a);b=new Shb(awd(a));b.a+=' (identifier: ';Nhb(b,a.k);b.a+=')';return b.a} +function kXd(a,b){var c;c=(a.Bb&QHe)!=0;b?(a.Bb|=QHe):(a.Bb&=-32769);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,18,c,b))} +function a6d(a,b){var c;c=(a.Bb&QHe)!=0;b?(a.Bb|=QHe):(a.Bb&=-32769);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,18,c,b))} +function AWd(a,b){var c;c=(a.Bb&Ove)!=0;b?(a.Bb|=Ove):(a.Bb&=-16385);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,16,c,b))} +function c6d(a,b){var c;c=(a.Bb&txe)!=0;b?(a.Bb|=txe):(a.Bb&=-65537);(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new Q3d(a,1,20,c,b))} +function qse(a){var b;b=$C(hE,zwe,28,2,15,1);a-=txe;b[0]=(a>>10)+uxe&Bwe;b[1]=(a&1023)+56320&Bwe;return Ihb(b,0,b.length)} +function Zfb(a){var b;b=Neb(a);if(b>3.4028234663852886E38){return oxe}else if(b<-3.4028234663852886E38){return pxe}return b} +function Bdb(a,b){var c;if(Kdb(a)&&Kdb(b)){c=a+b;if(jxe<c&&c<hxe){return c}}return Edb(sD(Kdb(a)?Wdb(a):a,Kdb(b)?Wdb(b):b))} +function Ndb(a,b){var c;if(Kdb(a)&&Kdb(b)){c=a*b;if(jxe<c&&c<hxe){return c}}return Edb(wD(Kdb(a)?Wdb(a):a,Kdb(b)?Wdb(b):b))} +function Vdb(a,b){var c;if(Kdb(a)&&Kdb(b)){c=a-b;if(jxe<c&&c<hxe){return c}}return Edb(DD(Kdb(a)?Wdb(a):a,Kdb(b)?Wdb(b):b))} +function b3b(a,b){var c;a.i||V2b(a);c=RD(Vrb(a.g,b),42);return !c?(yob(),yob(),vob):new Rkb(a.j,RD(c.a,17).a,RD(c.b,17).a)} +function ZXb(a){NXb();return Geb(),IYb(RD(a.a,86).j,RD(a.b,88))||RD(a.a,86).d.e!=0&&IYb(RD(a.a,86).j,RD(a.b,88))?true:false} +function pWc(a,b){return lhb(!!b.b&&!!b.c?aXc(b.b)+'->'+aXc(b.c):'e_'+tb(b),!!a.b&&!!a.c?aXc(a.b)+'->'+aXc(a.c):'e_'+tb(a))} +function rWc(a,b){return lhb(!!b.b&&!!b.c?aXc(b.b)+'->'+aXc(b.c):'e_'+tb(b),!!a.b&&!!a.c?aXc(a.b)+'->'+aXc(a.c):'e_'+tb(a))} +function $y(a,b){Zy();return bz(pwe),$wnd.Math.abs(a-b)<=pwe||a==b||isNaN(a)&&isNaN(b)?0:a<b?-1:a>b?1:cz(isNaN(a),isNaN(b))} +function Ymd(){Ymd=geb;Xmd=new Zmd(Sye,0);Vmd=new Zmd('POLYLINE',1);Umd=new Zmd('ORTHOGONAL',2);Wmd=new Zmd('SPLINES',3)} +function _6c(){_6c=geb;Z6c=new a7c('ASPECT_RATIO_DRIVEN',0);$6c=new a7c('MAX_SCALE_DRIVEN',1);Y6c=new a7c('AREA_DRIVEN',2)} +function Db(b,c,d){var e;try{Cb(b,c,d)}catch(a){a=zdb(a);if(ZD(a,606)){e=a;throw Adb(new Deb(e))}else throw Adb(a)}return c} +function Im(a){var b,c,d;for(c=0,d=a.length;c<d;c++){if(a[c]==null){throw Adb(new Ogb('at index '+c))}}b=a;return new mob(b)} +function W2b(a){var b,c,d;b=new bnb;for(d=new Anb(a.j);d.a<d.c.c.length;){c=RD(ynb(d),12);Rmb(b,c.b)}return Qb(b),new Dl(b)} +function Z2b(a){var b,c,d;b=new bnb;for(d=new Anb(a.j);d.a<d.c.c.length;){c=RD(ynb(d),12);Rmb(b,c.e)}return Qb(b),new Dl(b)} +function a3b(a){var b,c,d;b=new bnb;for(d=new Anb(a.j);d.a<d.c.c.length;){c=RD(ynb(d),12);Rmb(b,c.g)}return Qb(b),new Dl(b)} +function MBb(a,b){var c,d,e;e=new Tsb;for(d=b.vc().Kc();d.Ob();){c=RD(d.Pb(),44);Zjb(e,c.ld(),QBb(a,RD(c.md(),15)))}return e} +function Mje(a){var b,c;for(c=Nje(BXd(uWd(a))).Kc();c.Ob();){b=WD(c.Pb());if(bAd(a,b))return dTd((cTd(),bTd),b)}return null} +function Cgc(a,b){var c,d,e;e=0;for(d=RD(b.Kb(a),20).Kc();d.Ob();){c=RD(d.Pb(),18);Heb(TD(mQb(c,(Ywc(),Nwc))))||++e}return e} +function Uv(a){var b,c,d,e;b=new oq(a.Rd().gc());e=0;for(d=Nr(a.Rd().Kc());d.Ob();){c=d.Pb();nq(b,c,sgb(e++))}return sn(b.a)} +function Cvb(a,b,c,d){var e,f;uFb(d);uFb(c);e=a.xc(b);f=e==null?c:EBb(RD(e,15),RD(c,16));f==null?a.Bc(b):a.zc(b,f);return f} +function Unb(a,b,c,d){var e,f,g;for(e=b+1;e<c;++e){for(f=e;f>b&&d.Ne(a[f-1],a[f])>0;--f){g=a[f];bD(a,f,a[f-1]);bD(a,f-1,g)}}} +function Egd(a,b){var c,d,e,f,g;c=b.f;dub(a.c.d,c,b);if(b.g!=null){for(e=b.g,f=0,g=e.length;f<g;++f){d=e[f];dub(a.c.e,d,b)}}} +function YSc(a,b){var c,d;c=Sub(a,0);while(c.b!=c.d.c){d=Mfb(UD(evb(c)));if(d==b){return}else if(d>b){fvb(c);break}}cvb(c,b)} +function Kic(a,b){var c,d,e;d=Zjc(b);e=Kfb(UD(hFc(d,(yCc(),TBc))));c=$wnd.Math.max(0,e/2-0.5);Iic(b,c,1);Rmb(a,new hjc(b,c))} +function L5c(a,b,c){var d;c.Ug('Straight Line Edge Routing',1);c.dh(b,eFe);d=RD(Gxd(b,(u2c(),t2c)),27);M5c(a,d);c.dh(b,gFe)} +function K9c(a,b){a.n.c.length==0&&Rmb(a.n,new _9c(a.s,a.t,a.i));Rmb(a.b,b);W9c(RD(Vmb(a.n,a.n.c.length-1),209),b);M9c(a,b)} +function Zrb(a){var b;this.a=(b=RD(a.e&&a.e(),9),new Fsb(b,RD(WEb(b,b.length),9),0));this.b=$C(jJ,rve,1,this.a.a.length,5,1)} +function jeb(a){var b;if(Array.isArray(a)&&a.Tm===keb){return nfb(rb(a))+'@'+(b=tb(a)>>>0,b.toString(16))}return a.toString()} +function jD(a,b){if(a.h==fxe&&a.m==0&&a.l==0){b&&(eD=hD(0,0,0));return gD((MD(),KD))}b&&(eD=hD(a.l,a.m,a.h));return hD(0,0,0)} +function _Gb(a,b){switch(b.g){case 2:return a.b;case 1:return a.c;case 4:return a.d;case 3:return a.a;default:return false;}} +function IYb(a,b){switch(b.g){case 2:return a.b;case 1:return a.c;case 4:return a.d;case 3:return a.a;default:return false;}} +function vyd(a,b,c,d){switch(b){case 3:return a.f;case 4:return a.g;case 5:return a.i;case 6:return a.j;}return cyd(a,b,c,d)} +function oIb(a,b){if(b==a.d){return a.e}else if(b==a.e){return a.d}else{throw Adb(new agb('Node '+b+' not part of edge '+a))}} +function Uvd(a,b){var c;c=wYd(a.Dh(),b);if(ZD(c,102)){return RD(c,19)}throw Adb(new agb(KHe+b+"' is not a valid reference"))} +function Bvd(a,b,c,d){if(b<0){Svd(a,c,d)}else{if(!c.rk()){throw Adb(new agb(KHe+c.xe()+LHe))}RD(c,69).wk().Ck(a,a.hi(),b,d)}} +function ig(a){var b;if(a.b){ig(a.b);if(a.b.d!=a.c){throw Adb(new Jrb)}}else if(a.d.dc()){b=RD(a.f.c.xc(a.e),16);!!b&&(a.d=b)}} +function VMb(a){RMb();var b,c,d,e;b=a.o.b;for(d=RD(RD(Qc(a.r,(qpd(),npd)),21),87).Kc();d.Ob();){c=RD(d.Pb(),117);e=c.e;e.b+=b}} +function SRb(a){var b,c,d;this.a=new Iub;for(d=new Anb(a);d.a<d.c.c.length;){c=RD(ynb(d),16);b=new DRb;xRb(b,c);Ysb(this.a,b)}} +function fdc(a,b){var c,d,e;d=cdc(a,b);e=d[d.length-1]/2;for(c=0;c<d.length;c++){if(d[c]>=e){return b.c+c}}return b.c+b.b.gc()} +function lQd(a,b){jQd();var c,d,e,f;d=iZd(a);e=b;Wnb(d,0,d.length,e);for(c=0;c<d.length;c++){f=kQd(a,d[c],c);c!=f&&uLd(a,c,f)}} +function mSd(a,b,c){var d,e;for(d=0,e=a.length;d<e;d++){if(zSd((BFb(d,a.length),a.charCodeAt(d)),b,c))return true}return false} +function ARb(a,b){var c,d;for(d=a.e.a.ec().Kc();d.Ob();){c=RD(d.Pb(),272);if(Eid(b,c.d)||zid(b,c.d)){return true}}return false} +function oMc(a,b,c,d,e){var f,g,h;g=e;while(b.b!=b.c){f=RD(smb(b),10);h=RD(b3b(f,d).Xb(0),12);a.d[h.p]=g++;ZEb(c.c,h)}return g} +function vKb(a,b){var c,d,e,f,g,h;d=0;c=0;for(f=b,g=0,h=f.length;g<h;++g){e=f[g];if(e>0){d+=e;++c}}c>1&&(d+=a.d*(c-1));return d} +function FFd(a){var b,c,d,e,f;f=HFd(a);c=cve(a.c);d=!c;if(d){e=new MB;sC(f,'knownLayouters',e);b=new QFd(e);xgb(a.c,b)}return f} +function fHd(a){var b,c,d;d=new Qhb;d.a+='[';for(b=0,c=a.gc();b<c;){Nhb(d,Ghb(a.Vi(b)));++b<c&&(d.a+=pve,d)}d.a+=']';return d.a} +function kSd(a){if(a.e==null){return a}else !a.c&&(a.c=new lSd((a.f&256)!=0,a.i,a.a,a.d,(a.f&16)!=0,a.j,a.g,null));return a.c} +function pnc(a){if(a.k!=(r3b(),p3b)){return false}return yDb(new SDb(null,new Twb(new is(Mr(a3b(a).a.Kc(),new ir)))),new qnc)} +function hv(a){var b,c;if(ZD(a,307)){c=vm(RD(a,307));b=c;return b}else return ZD(a,441)?RD(a,441).a:ZD(a,59)?new Fv(a):new uv(a)} +function FSd(a){var b;if(a==null)return true;b=a.length;return b>0&&(BFb(b-1,a.length),a.charCodeAt(b-1)==58)&&!mSd(a,aSd,bSd)} +function Sib(a,b){var c;if(dE(a)===dE(b)){return true}if(ZD(b,92)){c=RD(b,92);return a.e==c.e&&a.d==c.d&&Tib(a,c.a)}return false} +function vpd(a){qpd();switch(a.g){case 4:return Yod;case 1:return Xod;case 3:return npd;case 2:return ppd;default:return opd;}} +function jBb(a){var b,c;if(a.b){return a.b}c=dBb?null:a.d;while(c){b=dBb?null:c.b;if(b){return b}c=dBb?null:c.d}return SAb(),RAb} +function LJb(a){var b,c,d;d=Kfb(UD(a.a.of((umd(),cmd))));for(c=new Anb(a.a.Sf());c.a<c.c.c.length;){b=RD(ynb(c),695);OJb(a,b,d)}} +function jz(a){var b,c,d,e;for(b=(a.j==null&&(a.j=(fA(),e=eA.me(a),hA(e))),a.j),c=0,d=b.length;c<d;++c){String.fromCharCode(10)}} +function OXb(a,b){var c,d;for(d=new Anb(b);d.a<d.c.c.length;){c=RD(ynb(d),42);Rmb(a.b.b,RD(c.b,86));gYb(RD(c.a,194),RD(c.b,86))}} +function nHc(a,b,c){var d,e;e=a.a.b;for(d=e.c.length;d<c;d++){Qmb(e,0,new R4b(a.a))}g3b(b,RD(Vmb(e,e.c.length-c),30));a.b[b.p]=c} +function EOc(a,b,c,d,e){dOc();rIb(uIb(tIb(sIb(vIb(new wIb,0),e.d.e-a),b),e.d));rIb(uIb(tIb(sIb(vIb(new wIb,0),c-e.a.e),e.a),d))} +function Ted(a,b){var c;if(a.d){if(Ujb(a.b,b)){return RD(Wjb(a.b,b),47)}else{c=b.dg();Zjb(a.b,b,c);return c}}else{return b.dg()}} +function hFb(b){var c=b.e;function d(a){if(!a||a.length==0){return ''}return '\t'+a.join('\n\t')} +return c&&(c.stack||d(b[xwe]))} +function wyd(a,b){switch(b){case 3:return a.f!=0;case 4:return a.g!=0;case 5:return a.i!=0;case 6:return a.j!=0;}return fyd(a,b)} +function y2c(a){switch(a.g){case 0:return new D5c;case 1:return new N5c;default:throw Adb(new agb(lBe+(a.f!=null?a.f:''+a.g)));}} +function Z3c(a){switch(a.g){case 0:return new G5c;case 1:return new J5c;default:throw Adb(new agb(mFe+(a.f!=null?a.f:''+a.g)));}} +function h4c(a){switch(a.g){case 1:return new F3c;case 2:return new x3c;default:throw Adb(new agb(mFe+(a.f!=null?a.f:''+a.g)));}} +function mdd(a){switch(a.g){case 0:return new Ddd;case 1:return new Hdd;default:throw Adb(new agb(eGe+(a.f!=null?a.f:''+a.g)));}} +function Owb(){Hwb();var a,b,c;c=Gwb+++Date.now();a=eE($wnd.Math.floor(c*Nxe))&Pxe;b=eE(c-a*Oxe);this.a=a^1502;this.b=b^Mxe} +function cxc(){cxc=geb;bxc=new dxc(LAe,0);Zwc=new dxc('FIRST',1);$wc=new dxc(oBe,2);_wc=new dxc('LAST',3);axc=new dxc(pBe,4)} +function Grd(){Grd=geb;Frd=new Hrd(mEe,0);Crd=new Hrd('GROUP_DEC',1);Erd=new Hrd('GROUP_MIXED',2);Drd=new Hrd('GROUP_INC',3)} +function cEd(a,b){var c,d,e,f;if(b){e=vDd(b,'x');c=new wFd(a);Ozd(c.a,(uFb(e),e));f=vDd(b,'y');d=new zFd(a);Pzd(d.a,(uFb(f),f))}} +function nEd(a,b){var c,d,e,f;if(b){e=vDd(b,'x');c=new BFd(a);Hzd(c.a,(uFb(e),e));f=vDd(b,'y');d=new CFd(a);Izd(d.a,(uFb(f),f))}} +function Sje(a,b){var c,d,e,f;e=new cnb(b.gc());for(d=b.Kc();d.Ob();){c=d.Pb();f=Rje(a,RD(c,58));!!f&&(ZEb(e.c,f),true)}return e} +function ze(a,b,c){var d,e;for(e=a.Kc();e.Ob();){d=e.Pb();if(dE(b)===dE(d)||b!=null&&pb(b,d)){c&&e.Qb();return true}}return false} +function Y5b(a){var b,c,d;c=a.jh();if(c){b=a.Eh();if(ZD(b,167)){d=Y5b(RD(b,167));if(d!=null){return d+'.'+c}}return c}return null} +function pjb(a){var b,c,d;if(a.e==0){return 0}b=a.d<<5;c=a.a[a.d-1];if(a.e<0){d=Uib(a);if(d==a.d-1){--c;c=c|0}}b-=ngb(c);return b} +function kjb(a){var b,c,d;if(a<Nib.length){return Nib[a]}c=a>>5;b=a&31;d=$C(kE,Pwe,28,c+1,15,1);d[c]=1<<b;return new cjb(1,c+1,d)} +function eLd(a,b){var c,d;if(!b){return false}else{for(c=0;c<a.i;++c){d=RD(a.g[c],378);if(d.mj(b)){return false}}return WGd(a,b)}} +function ZId(a,b,c){var d,e;++a.j;if(c.dc()){return false}else{for(e=c.Kc();e.Ob();){d=e.Pb();a.qj(b,a.Zi(b,d));++b}return true}} +function OA(a,b,c,d){var e,f;f=c-b;if(f<3){while(f<3){a*=10;++f}}else{e=1;while(f>3){e*=10;--f}a=(a+(e>>1))/e|0}d.i=a;return true} +function BYd(a,b){var c,d,e;c=(a.i==null&&rYd(a),a.i);d=b.Lj();if(d!=-1){for(e=c.length;d<e;++d){if(c[d]==b){return d}}}return -1} +function T$d(a){var b,c,d,e,f;c=RD(a.g,689);for(d=a.i-1;d>=0;--d){b=c[d];for(e=0;e<d;++e){f=c[e];if(U$d(a,b,f)){THd(a,d);break}}}} +function PId(a){var b,c,d,e;b=new MB;for(e=new Ppb(a.b.Kc());e.b.Ob();){d=RD(e.b.Pb(),701);c=LFd(d);KB(b,b.a.length,c)}return b.a} +function VNb(a){var b;!a.c&&(a.c=new MNb);_mb(a.d,new aOb);SNb(a);b=LNb(a);FDb(new SDb(null,new Swb(a.d,16)),new tOb(a));return b} +function I6b(a,b){b.Ug('End label post-processing',1);FDb(CDb(EDb(new SDb(null,new Swb(a.b,16)),new N6b),new P6b),new R6b);b.Vg()} +function RCc(a){QCc();this.c=dv(cD(WC(g2,1),rve,845,0,[FCc]));this.b=new Tsb;this.a=a;Zjb(this.b,OCc,1);Umb(PCc,new $rd(this))} +function wKb(a,b,c){kKb();fKb.call(this);this.a=YC(IN,[Nve,Mye],[603,217],0,[jKb,iKb],2);this.c=new Tid;this.g=a;this.f=b;this.d=c} +function gQb(a,b){this.n=YC(lE,[Nve,rxe],[376,28],14,[b,eE($wnd.Math.ceil(a/32))],2);this.o=a;this.p=b;this.j=a-1>>1;this.k=b-1>>1} +function Dfd(a){Afd();if(RD(a.of((umd(),pld)),181).Hc((dqd(),bqd))){RD(a.of(Lld),181).Fc((Pod(),Ood));RD(a.of(pld),181).Mc(bqd)}} +function ndc(a){var b,c;b=a.d==(btc(),Ysc);c=jdc(a);b&&!c||!b&&c?pQb(a.a,(yCc(),Rzc),(Rjd(),Pjd)):pQb(a.a,(yCc(),Rzc),(Rjd(),Ojd))} +function QCc(){QCc=geb;GCc();OCc=(yCc(),bCc);PCc=dv(cD(WC(V5,1),kEe,149,0,[SBc,TBc,VBc,WBc,ZBc,$Bc,_Bc,aCc,dCc,fCc,UBc,XBc,cCc]))} +function RDb(a,b){var c;c=RD(zDb(a,tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);return c.Qc(__c(c.gc()))} +function nXc(a,b){var c,d;d=new zAb(a.a.ad(b,true));if(d.a.gc()<=1){throw Adb(new Ngb)}c=d.a.ec().Kc();c.Pb();return RD(c.Pb(),40)} +function lQc(a,b,c){var d,e;d=Kfb(a.p[b.i.p])+Kfb(a.d[b.i.p])+b.n.b+b.a.b;e=Kfb(a.p[c.i.p])+Kfb(a.d[c.i.p])+c.n.b+c.a.b;return e-d} +function XHd(a,b){var c;if(a.i>0){if(b.length<a.i){c=IMd(rb(b).c,a.i);b=c}hib(a.g,0,b,0,a.i)}b.length>a.i&&bD(b,a.i,null);return b} +function MXd(a){var b;if((a.Db&64)!=0)return QAd(a);b=new Shb(QAd(a));b.a+=' (instanceClassName: ';Nhb(b,a.D);b.a+=')';return b.a} +function ySd(a){var b,c,d,e;e=0;for(c=0,d=a.length;c<d;c++){b=(BFb(c,a.length),a.charCodeAt(c));b<64&&(e=Rdb(e,Sdb(1,b)))}return e} +function Fjb(a,b,c){var d,e;d=Cdb(c,yxe);for(e=0;Ddb(d,0)!=0&&e<b;e++){d=Bdb(d,Cdb(a[e],yxe));a[e]=Ydb(d);d=Tdb(d,32)}return Ydb(d)} +function pge(a,b){var c,d,e,f;f=pke(a.e.Dh(),b);c=RD(a.g,124);for(e=0;e<a.i;++e){d=c[e];if(f.am(d.Lk())){return false}}return true} +function QNd(a,b){var c,d,e;if(a.f>0){a._j();d=b==null?0:tb(b);e=(d&lve)%a.d.length;c=XNd(a,e,d,b);return c!=-1}else{return false}} +function Nrb(a,b){var c,d;a.a=Bdb(a.a,1);a.c=$wnd.Math.min(a.c,b);a.b=$wnd.Math.max(a.b,b);a.d+=b;c=b-a.f;d=a.e+c;a.f=d-a.e-c;a.e=d} +function yyd(a,b){switch(b){case 3:Ayd(a,0);return;case 4:Cyd(a,0);return;case 5:Dyd(a,0);return;case 6:Eyd(a,0);return;}hyd(a,b)} +function c3b(a,b){switch(b.g){case 1:return dr(a.j,(J3b(),E3b));case 2:return dr(a.j,(J3b(),G3b));default:return yob(),yob(),vob;}} +function zm(a){tm();var b;b=a.Pc();switch(b.length){case 0:return sm;case 1:return new Dy(Qb(b[0]));default:return new Kx(Im(b));}} +function kMd(b,c){b.Xj();try{b.d.bd(b.e++,c);b.f=b.d.j;b.g=-1}catch(a){a=zdb(a);if(ZD(a,77)){throw Adb(new Jrb)}else throw Adb(a)}} +function a8d(){a8d=geb;$7d=new b8d;T7d=new e8d;U7d=new h8d;V7d=new k8d;W7d=new n8d;X7d=new q8d;Y7d=new t8d;Z7d=new w8d;_7d=new z8d} +function YA(a,b){WA();var c,d;c=_A(($A(),$A(),ZA));d=null;b==c&&(d=RD(Xjb(VA,a),624));if(!d){d=new XA(a);b==c&&$jb(VA,a,d)}return d} +function zDc(a){wDc();var b;(!a.q?(yob(),yob(),wob):a.q)._b((yCc(),iBc))?(b=RD(mQb(a,iBc),203)):(b=RD(mQb(Y2b(a),jBc),203));return b} +function hFc(a,b){var c,d;d=null;if(nQb(a,(yCc(),YBc))){c=RD(mQb(a,YBc),96);c.pf(b)&&(d=c.of(b))}d==null&&(d=mQb(Y2b(a),b));return d} +function Ze(a,b){var c,d,e;if(ZD(b,44)){c=RD(b,44);d=c.ld();e=Xv(a.Rc(),d);return Hb(e,c.md())&&(e!=null||a.Rc()._b(d))}return false} +function $Nd(a,b){var c,d,e;if(a.f>0){a._j();d=b==null?0:tb(b);e=(d&lve)%a.d.length;c=WNd(a,e,d,b);if(c){return c.md()}}return null} +function qLd(a,b,c){var d,e,f;if(a.Pj()){d=a.i;f=a.Qj();KHd(a,d,b);e=a.Ij(3,null,b,d,f);!c?(c=e):c.nj(e)}else{KHd(a,a.i,b)}return c} +function f$d(a,b,c){var d,e;d=new P3d(a.e,4,10,(e=b.c,ZD(e,90)?RD(e,29):(JTd(),zTd)),null,fZd(a,b),false);!c?(c=d):c.nj(d);return c} +function e$d(a,b,c){var d,e;d=new P3d(a.e,3,10,null,(e=b.c,ZD(e,90)?RD(e,29):(JTd(),zTd)),fZd(a,b),false);!c?(c=d):c.nj(d);return c} +function SMb(a){RMb();var b;b=new sjd(RD(a.e.of((umd(),nld)),8));if(a.B.Hc((dqd(),Ypd))){b.a<=0&&(b.a=20);b.b<=0&&(b.b=20)}return b} +function jjb(a){Pib();var b,c;c=Ydb(a);b=Ydb(Udb(a,32));if(b!=0){return new bjb(c,b)}if(c>10||c<0){return new ajb(1,c)}return Lib[c]} +function Mdb(a,b){var c;if(Kdb(a)&&Kdb(b)){c=a%b;if(jxe<c&&c<hxe){return c}}return Edb((iD(Kdb(a)?Wdb(a):a,Kdb(b)?Wdb(b):b,true),eD))} +function G8b(a,b){var c;D8b(b);c=RD(mQb(a,(yCc(),xAc)),283);!!c&&pQb(a,xAc,uuc(c));E8b(a.c);E8b(a.f);F8b(a.d);F8b(RD(mQb(a,cBc),214))} +function y7b(a){var b,c,d,e;d=t7b(a);_mb(d,r7b);e=a.d;e.c.length=0;for(c=new Anb(d);c.a<c.c.c.length;){b=RD(ynb(c),466);Tmb(e,b.b)}} +function cmc(a){var b;if(a.c==0){return}b=RD(Vmb(a.a,a.b),294);b.b==1?(++a.b,a.b<a.a.c.length&&gmc(RD(Vmb(a.a,a.b),294))):--b.b;--a.c} +function vdc(a){var b;b=a.a;do{b=RD(hs(new is(Mr(a3b(b).a.Kc(),new ir))),18).d.i;b.k==(r3b(),o3b)&&Rmb(a.e,b)}while(b.k==(r3b(),o3b))} +function RLc(a){this.e=$C(kE,Pwe,28,a.length,15,1);this.c=$C(xdb,Hye,28,a.length,16,1);this.b=$C(xdb,Hye,28,a.length,16,1);this.f=0} +function _Hc(a){var b,c;a.j=$C(iE,vxe,28,a.p.c.length,15,1);for(c=new Anb(a.p);c.a<c.c.c.length;){b=RD(ynb(c),10);a.j[b.p]=b.o.b/a.i}} +function L_c(a,b){var c,d,e,f;f=b.b.b;a.a=new Yub;a.b=$C(kE,Pwe,28,f,15,1);c=0;for(e=Sub(b.b,0);e.b!=e.d.c;){d=RD(evb(e),40);d.g=c++}} +function fad(a,b,c){var d,e,f,g;f=b-a.e;g=c-a.f;for(e=new Anb(a.a);e.a<e.c.c.length;){d=RD(ynb(e),172);U9c(d,d.s+f,d.t+g)}a.e=b;a.f=c} +function ose(a,b){var c,d;d=b.length;for(c=0;c<d;c+=2)rte(a,(BFb(c,b.length),b.charCodeAt(c)),(BFb(c+1,b.length),b.charCodeAt(c+1)))} +function G6c(a,b){b.Ug('Min Size Postprocessing',1);Ixd(a,(X6c(),W6c),$wnd.Math.max(Kfb(UD(Gxd(a,W6c))),Kfb(UD(Gxd(a,U6c)))));b.Vg()} +function Fpd(){Fpd=geb;Cpd=new A3b(15);Bpd=new mGd((umd(),tld),Cpd);Epd=new mGd(fmd,15);Dpd=new mGd(Sld,sgb(0));Apd=new mGd(Dkd,Yze)} +function Qpd(){Qpd=geb;Opd=new Rpd('PORTS',0);Ppd=new Rpd('PORT_LABELS',1);Npd=new Rpd('NODE_LABELS',2);Mpd=new Rpd('MINIMUM_SIZE',3)} +function f6c(){f6c=geb;c6c=new g6c('P1_WIDTH_APPROXIMATION',0);d6c=new g6c('P2_PACKING',1);e6c=new g6c('P3_WHITESPACE_ELIMINATION',2)} +function $je(a){if(a.b==null){while(a.a.Ob()){a.b=a.a.Pb();if(!RD(a.b,54).Jh()){return true}}a.b=null;return false}else{return true}} +function Pyb(a,b,c){var d,e,f;e=null;f=a.b;while(f){d=a.a.Ne(b,f.d);if(c&&d==0){return f}if(d>=0){f=f.a[1]}else{e=f;f=f.a[0]}}return e} +function Qyb(a,b,c){var d,e,f;e=null;f=a.b;while(f){d=a.a.Ne(b,f.d);if(c&&d==0){return f}if(d<=0){f=f.a[0]}else{e=f;f=f.a[1]}}return e} +function rmc(a,b,c,d){var e,f,g;e=false;if(Lmc(a.f,c,d)){Omc(a.f,a.a[b][c],a.a[b][d]);f=a.a[b];g=f[d];f[d]=f[c];f[c]=g;e=true}return e} +function Nqc(a,b,c){var d,e,f,g;e=RD(Wjb(a.b,c),183);d=0;for(g=new Anb(b.j);g.a<g.c.c.length;){f=RD(ynb(g),113);e[f.d.p]&&++d}return d} +function lte(a,b,c){var d,e;d=RD(Xjb(wse,b),122);e=RD(Xjb(xse,b),122);if(c){$jb(wse,a,d);$jb(xse,a,e)}else{$jb(xse,a,d);$jb(wse,a,e)}} +function qjb(a,b){var c,d,e,f;c=b>>5;b&=31;e=a.d+c+(b==0?0:1);d=$C(kE,Pwe,28,e,15,1);rjb(d,a.a,c,b);f=new cjb(a.e,e,d);Rib(f);return f} +function zGc(a,b){var c,d,e;for(d=new is(Mr(a3b(a).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);e=c.d.i;if(e.c==b){return false}}return true} +function _Ec(a,b,c){var d,e,f,g,h;g=a.k;h=b.k;d=c[g.g][h.g];e=UD(hFc(a,d));f=UD(hFc(b,d));return $wnd.Math.max((uFb(e),e),(uFb(f),f))} +function lA(){if(Error.stackTraceLimit>0){$wnd.Error.stackTraceLimit=Error.stackTraceLimit=64;return true}return 'stack' in new Error} +function sGb(a,b){return Zy(),Zy(),bz(pwe),($wnd.Math.abs(a-b)<=pwe||a==b||isNaN(a)&&isNaN(b)?0:a<b?-1:a>b?1:cz(isNaN(a),isNaN(b)))>0} +function uGb(a,b){return Zy(),Zy(),bz(pwe),($wnd.Math.abs(a-b)<=pwe||a==b||isNaN(a)&&isNaN(b)?0:a<b?-1:a>b?1:cz(isNaN(a),isNaN(b)))<0} +function tGb(a,b){return Zy(),Zy(),bz(pwe),($wnd.Math.abs(a-b)<=pwe||a==b||isNaN(a)&&isNaN(b)?0:a<b?-1:a>b?1:cz(isNaN(a),isNaN(b)))<=0} +function Efb(a,b){var c=0;while(!b[c]||b[c]==''){c++}var d=b[c++];for(;c<b.length;c++){if(!b[c]||b[c]==''){continue}d+=a+b[c]}return d} +function MMd(a){var b,c;b=RD(Ywd(a.a,4),129);if(b!=null){c=$C(d6,IJe,424,b.length,0,1);hib(b,0,c,0,b.length);return c}else{return JMd}} +function kne(a){var b,c,d,e,f;if(a==null)return null;f=new bnb;for(c=xAd(a),d=0,e=c.length;d<e;++d){b=c[d];Rmb(f,nue(b,true))}return f} +function nne(a){var b,c,d,e,f;if(a==null)return null;f=new bnb;for(c=xAd(a),d=0,e=c.length;d<e;++d){b=c[d];Rmb(f,nue(b,true))}return f} +function one(a){var b,c,d,e,f;if(a==null)return null;f=new bnb;for(c=xAd(a),d=0,e=c.length;d<e;++d){b=c[d];Rmb(f,nue(b,true))}return f} +function vrd(a,b){var c,d,e;if(a.c){Ayd(a.c,b)}else{c=b-trd(a);for(e=new Anb(a.a);e.a<e.c.c.length;){d=RD(ynb(e),163);vrd(d,trd(d)+c)}}} +function wrd(a,b){var c,d,e;if(a.c){Cyd(a.c,b)}else{c=b-urd(a);for(e=new Anb(a.d);e.a<e.c.c.length;){d=RD(ynb(e),163);wrd(d,urd(d)+c)}}} +function Ihb(a,b,c){var d,e,f,g;f=b+c;AFb(b,f,a.length);g='';for(e=b;e<f;){d=$wnd.Math.min(e+10000,f);g+=Ehb(a.slice(e,d));e=d}return g} +function jMb(a){switch(a.g){case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:return true;default:return false;}} +function Ptc(){Ptc=geb;Ltc=new Rtc(CBe,0);Ktc=new Rtc(DBe,1);Ntc=new Rtc(BBe,2);Otc=new Rtc(MAe,3);Mtc=new Rtc('GREEDY_MODEL_ORDER',4)} +function kEc(){kEc=geb;hEc=new lEc(LAe,0);gEc=new lEc('NODES_AND_EDGES',1);iEc=new lEc('PREFER_EDGES',2);jEc=new lEc('PREFER_NODES',3)} +function mad(a,b,c,d,e,f){this.a=a;this.c=b;this.b=c;this.f=d;this.d=e;this.e=f;this.c>0&&this.b>0&&(this.g=Aad(this.c,this.b,this.a))} +function rC(f,a){var b=f.a;var c;a=String(a);b.hasOwnProperty(a)&&(c=b[a]);var d=(HC(),GC)[typeof c];var e=d?d(c):NC(typeof c);return e} +function uDd(a){var b,c,d;d=null;b=uIe in a.a;c=!b;if(c){throw Adb(new CDd('Every element must have an id.'))}d=tDd(qC(a,uIe));return d} +function Qqe(a){var b,c;c=Rqe(a);b=null;while(a.c==2){Mqe(a);if(!b){b=(Vse(),Vse(),++Use,new iue(2));hue(b,c);c=b}c.Jm(Rqe(a))}return c} +function jOd(a,b){var c,d,e;a._j();d=b==null?0:tb(b);e=(d&lve)%a.d.length;c=WNd(a,e,d,b);if(c){hOd(a,c);return c.md()}else{return null}} +function Qib(a,b){if(a.e>b.e){return 1}if(a.e<b.e){return -1}if(a.d>b.d){return a.e}if(a.d<b.d){return -b.e}return a.e*Ejb(a.a,b.a,a.d)} +function dfb(a){if(a>=48&&a<48+$wnd.Math.min(10,10)){return a-48}if(a>=97&&a<97){return a-97+10}if(a>=65&&a<65){return a-65+10}return -1} +function UHc(a,b){if(b.c==a){return b.d}else if(b.d==a){return b.c}throw Adb(new agb('Input edge is not connected to the input port.'))} +function Fae(a){if(mhb(FGe,a)){return Geb(),Feb}else if(mhb(GGe,a)){return Geb(),Eeb}else{throw Adb(new agb('Expecting true or false'))}} +function jFb(a){switch(typeof(a)){case jve:return ohb(a);case ive:return Nfb(a);case hve:return Jeb(a);default:return a==null?0:kFb(a);}} +function mfd(a,b){if(a.a<0){throw Adb(new dgb('Did not call before(...) or after(...) before calling add(...).'))}tfd(a,a.a,b);return a} +function FId(a){EId();if(ZD(a,162)){return RD(Wjb(CId,zK),295).Rg(a)}if(Ujb(CId,rb(a))){return RD(Wjb(CId,rb(a)),295).Rg(a)}return null} +function Wwd(a){var b,c;if((a.Db&32)==0){c=(b=RD(Ywd(a,16),29),AYd(!b?a.ii():b)-AYd(a.ii()));c!=0&&$wd(a,32,$C(jJ,rve,1,c,5,1))}return a} +function $wd(a,b,c){var d;if((a.Db&b)!=0){if(c==null){Zwd(a,b)}else{d=Xwd(a,b);d==-1?(a.Eb=c):bD(SD(a.Eb),d,c)}}else c!=null&&Twd(a,b,c)} +function tTc(a,b,c,d){var e,f;if(b.c.length==0){return}e=pTc(c,d);f=oTc(b);FDb(PDb(new SDb(null,new Swb(f,1)),new CTc),new GTc(a,c,e,d))} +function rmb(a,b){var c,d,e,f;d=a.a.length-1;c=b-a.b&d;f=a.c-b&d;e=a.c-a.b&d;zmb(c<e);if(c>=f){umb(a,b);return -1}else{vmb(a,b);return 1}} +function Hvd(a){var b,c,d;d=a.Jh();if(!d){b=0;for(c=a.Ph();c;c=c.Ph()){if(++b>wxe){return c.Qh()}d=c.Jh();if(!!d||c==a){break}}}return d} +function Ue(a,b){var c;if(dE(b)===dE(a)){return true}if(!ZD(b,21)){return false}c=RD(b,21);if(c.gc()!=a.gc()){return false}return a.Ic(c)} +function kNc(a,b){if(a.e<b.e){return -1}else if(a.e>b.e){return 1}else if(a.f<b.f){return -1}else if(a.f>b.f){return 1}return tb(a)-tb(b)} +function mhb(a,b){uFb(a);if(b==null){return false}if(lhb(a,b)){return true}return a.length==b.length&&lhb(a.toLowerCase(),b.toLowerCase())} +function Hgb(a){var b,c;if(Ddb(a,-129)>0&&Ddb(a,128)<0){return Jgb(),b=Ydb(a)+128,c=Igb[b],!c&&(c=Igb[b]=new zgb(a)),c}return new zgb(a)} +function U$b(){U$b=geb;T$b=new V$b(LAe,0);R$b=new V$b('INSIDE_PORT_SIDE_GROUPS',1);Q$b=new V$b('GROUP_MODEL_ORDER',2);S$b=new V$b(MAe,3)} +function ufe(a){var b;a.b||vfe(a,(b=Hee(a.e,a.a),!b||!lhb(GGe,$Nd((!b.b&&(b.b=new SVd((JTd(),FTd),C8,b)),b.b),'qualified'))));return a.c} +function BA(a,b){var c,d;c=(BFb(b,a.length),a.charCodeAt(b));d=b+1;while(d<a.length&&(BFb(d,a.length),a.charCodeAt(d)==c)){++d}return d-b} +function dFb(a,b){(!b&&console.groupCollapsed!=null?console.groupCollapsed:console.group!=null?console.group:console.log).call(console,a)} +function EQb(a,b,c,d){d==a?(RD(c.b,68),RD(c.b,68),RD(d.b,68),RD(d.b,68).c.b):(RD(c.b,68),RD(c.b,68),RD(d.b,68),RD(d.b,68).c.b);BQb(d,b,a)} +function vRb(a){var b,c,d;b=0;for(c=new Anb(a.g);c.a<c.c.c.length;){RD(ynb(c),568);++b}d=new vQb(a.g,Kfb(a.a),a.c);vOb(d);a.g=d.b;a.d=d.a} +function Add(a,b,c){var d,e,f;for(f=new Anb(c.a);f.a<f.c.c.length;){e=RD(ynb(f),225);d=new $Fb(RD(Wjb(a.a,e.b),68));Rmb(b.a,d);Add(a,d,e)}} +function D4d(a,b,c){var d,e,f;d=RD(QHd(o4d(a.a),b),89);f=(e=d.c,e?e:(JTd(),wTd));(f.Vh()?Vvd(a.b,RD(f,54)):f)==c?i2d(d):l2d(d,c);return f} +function cqc(a,b,c){b.b=$wnd.Math.max(b.b,-c.a);b.c=$wnd.Math.max(b.c,c.a-a.a);b.d=$wnd.Math.max(b.d,-c.b);b.a=$wnd.Math.max(b.a,c.b-a.b)} +function JXb(a,b,c){this.c=a;this.f=new bnb;this.e=new pjd;this.j=new KYb;this.n=new KYb;this.b=b;this.g=new Uid(b.c,b.d,b.b,b.a);this.a=c} +function iYb(a){var b,c,d,e;this.a=new Iub;this.d=new _sb;this.e=0;for(c=a,d=0,e=c.length;d<e;++d){b=c[d];!this.f&&(this.f=b);gYb(this,b)}} +function djb(a){Pib();if(a.length==0){this.e=0;this.d=1;this.a=cD(WC(kE,1),Pwe,28,15,[0])}else{this.e=1;this.d=a.length;this.a=a;Rib(this)}} +function dLb(a,b,c){fKb.call(this);this.a=$C(IN,Mye,217,(ZJb(),cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb])).length,0,1);this.b=a;this.d=b;this.c=c} +function zfc(a){var b,c,d,e,f,g;g=RD(mQb(a,(Ywc(),Awc)),12);pQb(g,Swc,a.i.n.b);b=s2b(a.e);for(d=b,e=0,f=d.length;e<f;++e){c=d[e];Z0b(c,g)}} +function Afc(a){var b,c,d,e,f,g;c=RD(mQb(a,(Ywc(),Awc)),12);pQb(c,Swc,a.i.n.b);b=s2b(a.g);for(e=b,f=0,g=e.length;f<g;++f){d=e[f];Y0b(d,c)}} +function dRc(a,b){WQc();var c,d;for(d=new is(Mr(W2b(a).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);if(c.d.i==b||c.c.i==b){return c}}return null} +function zee(a,b){var c,d;c=b.qi(a.a);if(c){d=WD($Nd((!c.b&&(c.b=new SVd((JTd(),FTd),C8,c)),c.b),GIe));if(d!=null){return d}}return b.xe()} +function Aee(a,b){var c,d;c=b.qi(a.a);if(c){d=WD($Nd((!c.b&&(c.b=new SVd((JTd(),FTd),C8,c)),c.b),GIe));if(d!=null){return d}}return b.xe()} +function B7b(a,b){var c,d;c=hgb(a.a.c.p,b.a.c.p);if(c!=0){return c}d=hgb(a.a.d.i.p,b.a.d.i.p);if(d!=0){return d}return hgb(b.a.d.p,a.a.d.p)} +function Wje(a,b){var c,d,e,f;for(d=0,e=b.gc();d<e;++d){c=b.Tl(d);if(ZD(c,102)&&(RD(c,19).Bb&QHe)!=0){f=b.Ul(d);f!=null&&Rje(a,RD(f,58))}}} +function KSb(a,b){var c,d,e;Rmb(GSb,a);b.Fc(a);c=RD(Wjb(FSb,a),21);if(c){for(e=c.Kc();e.Ob();){d=RD(e.Pb(),27);Wmb(GSb,d,0)!=-1||KSb(d,b)}}} +function Omc(a,b,c){var d,e;BMc(a.e,b,c,(qpd(),ppd));BMc(a.i,b,c,Xod);if(a.a){e=RD(mQb(b,(Ywc(),Awc)),12);d=RD(mQb(c,Awc),12);CMc(a.g,e,d)}} +function mJc(a,b,c){var d,e,f;d=b.c.p;f=b.p;a.b[d][f]=new yJc(a,b);if(c){a.a[d][f]=new dJc(b);e=RD(mQb(b,(Ywc(),pwc)),10);!!e&&Rc(a.d,e,b)}} +function zIc(a,b,c){var d,e,f,g;f=b.j;g=c.j;if(f!=g){return f.g-g.g}else{d=a.f[b.p];e=a.f[c.p];return d==0&&e==0?0:d==0?-1:e==0?1:Qfb(d,e)}} +function Sz(){var a;if(Nz!=0){a=Date.now();if(a-Oz>2000){Oz=a;Pz=$wnd.setTimeout(Yz,10)}}if(Nz++==0){_z(($z(),Zz));return true}return false} +function lBb(a,b,c){var d;(bBb?(jBb(a),true):cBb?(SAb(),true):fBb?(SAb(),true):eBb&&(SAb(),false))&&(d=new aBb(b),d.b=c,hBb(a,d),undefined)} +function oNb(a,b){var c;c=!a.A.Hc((Qpd(),Ppd))||a.q==(Bod(),wod);a.u.Hc((Pod(),Lod))?c?mNb(a,b):qNb(a,b):a.u.Hc(Nod)&&(c?nNb(a,b):rNb(a,b))} +function Bed(a){var b;if(dE(Gxd(a,(umd(),Xkd)))===dE((Fnd(),Dnd))){if(!vCd(a)){Ixd(a,Xkd,End)}else{b=RD(Gxd(vCd(a),Xkd),346);Ixd(a,Xkd,b)}}} +function _fc(a){var b,c;if(nQb(a.d.i,(yCc(),tBc))){b=RD(mQb(a.c.i,tBc),17);c=RD(mQb(a.d.i,tBc),17);return hgb(b.a,c.a)>0}else{return false}} +function g_b(a,b,c){return new Uid($wnd.Math.min(a.a,b.a)-c/2,$wnd.Math.min(a.b,b.b)-c/2,$wnd.Math.abs(a.a-b.a)+c,$wnd.Math.abs(a.b-b.b)+c)} +function _mc(a){var b;this.d=new bnb;this.j=new pjd;this.g=new pjd;b=a.g.b;this.f=RD(mQb(Y2b(b),(yCc(),rAc)),88);this.e=Kfb(UD(k2b(b,ZBc)))} +function onc(a){this.d=new bnb;this.e=new gub;this.c=$C(kE,Pwe,28,(qpd(),cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])).length,15,1);this.b=a} +function $pc(a,b,c){var d;d=c[a.g][b];switch(a.g){case 1:case 3:return new rjd(0,d);case 2:case 4:return new rjd(d,0);default:return null;}} +function Ced(b,c,d){var e,f;f=RD(ltd(c.f),205);try{f.rf(b,d);mtd(c.f,f)}catch(a){a=zdb(a);if(ZD(a,103)){e=a;throw Adb(e)}else throw Adb(a)}} +function tEd(a,b,c){var d,e,f,g,h,i;d=null;h=vgd(ygd(),b);f=null;if(h){e=null;i=zhd(h,c);g=null;i!=null&&(g=a.qf(h,i));e=g;f=e}d=f;return d} +function sSd(a,b,c,d){var e;e=a.length;if(b>=e)return e;for(b=b>0?b:0;b<e;b++){if(zSd((BFb(b,a.length),a.charCodeAt(b)),c,d))break}return b} +function anb(a,b){var c,d;d=a.c.length;b.length<d&&(b=cFb(new Array(d),b));for(c=0;c<d;++c){bD(b,c,a.c[c])}b.length>d&&bD(b,d,null);return b} +function lob(a,b){var c,d;d=a.a.length;b.length<d&&(b=cFb(new Array(d),b));for(c=0;c<d;++c){bD(b,c,a.a[c])}b.length>d&&bD(b,d,null);return b} +function Bde(a,b){var c,d;++a.j;if(b!=null){c=(d=a.a.Cb,ZD(d,99)?RD(d,99).th():null);if(Jnb(b,c)){$wd(a.a,4,c);return}}$wd(a.a,4,RD(b,129))} +function mne(a){var b;if(a==null)return null;b=Hqe(nue(a,true));if(b==null){throw Adb(new Mle("Invalid hexBinary value: '"+a+"'"))}return b} +function wA(a,b,c){var d;if(b.a.length>0){Rmb(a.b,new kB(b.a,c));d=b.a.length;0<d?(b.a=zhb(b.a,0,0)):0>d&&(b.a+=Hhb($C(hE,zwe,28,-d,15,1)))}} +function yIb(a,b,c){var d,e,f;if(c[b.d]){return}c[b.d]=true;for(e=new Anb(CIb(b));e.a<e.c.c.length;){d=RD(ynb(e),218);f=oIb(d,b);yIb(a,f,c)}} +function dub(a,b,c){var d,e,f;e=RD(Wjb(a.e,b),400);if(!e){d=new uub(a,b,c);Zjb(a.e,b,d);qub(d);return null}else{f=qlb(e,c);eub(a,e);return f}} +function r5d(a,b,c,d){var e,f,g;e=new P3d(a.e,1,13,(g=b.c,g?g:(JTd(),wTd)),(f=c.c,f?f:(JTd(),wTd)),fZd(a,b),false);!d?(d=e):d.nj(e);return d} +function nMb(){hMb();return cD(WC(XN,1),jwe,164,0,[eMb,dMb,fMb,XLb,WLb,YLb,_Lb,$Lb,ZLb,cMb,bMb,aMb,ULb,TLb,VLb,RLb,QLb,SLb,OLb,NLb,PLb,gMb])} +function jWc(a){switch(a.g){case 4:return new rjd(0,-1);case 1:return new rjd(1,0);case 2:return new rjd(-1,0);default:return new rjd(0,1);}} +function f_b(a){switch(a.g){case 1:return Cmd(),Bmd;case 4:return Cmd(),ymd;case 2:return Cmd(),zmd;case 3:return Cmd(),xmd;}return Cmd(),Amd} +function s$d(a){var b;b=a.hj(null);switch(b){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4;}return -1} +function Yhd(){Yhd=geb;Whd=new Zhd('PARENTS',0);Vhd=new Zhd('NODES',1);Thd=new Zhd('EDGES',2);Xhd=new Zhd('PORTS',3);Uhd=new Zhd('LABELS',4)} +function AA(a,b,c){var d;d=c.q.getFullYear()-Owe+Owe;d<0&&(d=-d);switch(b){case 1:a.a+=d;break;case 2:UA(a,d%100,2);break;default:UA(a,d,b);}} +function Sub(a,b){var c,d;wFb(b,a.b);if(b>=a.b>>1){d=a.c;for(c=a.b;c>b;--c){d=d.b}}else{d=a.a.a;for(c=0;c<b;++c){d=d.a}}return new hvb(a,b,d)} +function DHb(){DHb=geb;CHb=new EHb('NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST',0);BHb=new EHb('CORNER_CASES_THAN_SINGLE_SIDE_LAST',1)} +function tnc(a){this.b=new bnb;this.e=new bnb;this.d=a;this.a=!QDb(CDb(new SDb(null,new Twb(new l4b(a.b))),new PAb(new unc))).Bd((xDb(),wDb))} +function ssc(a,b){var c,d,e,f;c=0;for(e=new Anb(b.a);e.a<e.c.c.length;){d=RD(ynb(e),10);f=d.o.a+d.d.c+d.d.b+a.j;c=$wnd.Math.max(c,f)}return c} +function OUc(a,b){var c,d,e;e=b.d.i;d=e.k;if(d==(r3b(),p3b)||d==l3b){return}c=new is(Mr(a3b(e).a.Kc(),new ir));gs(c)&&Zjb(a.k,b,RD(hs(c),18))} +function O0c(a,b){B0c();return Qfb((a.a.b==0?new rjd(a.c.e.a,a.c.e.b):RD(Qub(a.a),8)).b,(b.a.b==0?new rjd(b.c.e.a,b.c.e.b):RD(Qub(b.a),8)).b)} +function P0c(a,b){B0c();return Qfb((a.a.b==0?new rjd(a.c.e.a,a.c.e.b):RD(Qub(a.a),8)).a,(b.a.b==0?new rjd(b.c.e.a,b.c.e.b):RD(Qub(b.a),8)).a)} +function S0c(a,b){B0c();return Qfb((a.a.b==0?new rjd(a.b.e.a,a.b.e.b):RD(Rub(a.a),8)).a,(b.a.b==0?new rjd(b.b.e.a,b.b.e.b):RD(Rub(b.a),8)).a)} +function Q0c(a,b){B0c();return Qfb((a.a.b==0?new rjd(a.b.e.a,a.b.e.b):RD(Rub(a.a),8)).b,(b.a.b==0?new rjd(b.b.e.a,b.b.e.b):RD(Rub(b.a),8)).b)} +function pod(){pod=geb;mod=new qod('DISTRIBUTED',0);ood=new qod('JUSTIFIED',1);kod=new qod('BEGIN',2);lod=new qod(Kye,3);nod=new qod('END',4)} +function Kvd(a,b){var c,d,e;d=vYd(a.Dh(),b);c=b-a.ji();return c<0?(e=a.Ih(d),e>=0?a.Wh(e):Rvd(a,d)):c<0?Rvd(a,d):RD(d,69).wk().Bk(a,a.hi(),c)} +function Fxd(a){var b,c,d;d=(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),a.o);for(c=d.c.Kc();c.e!=c.i.gc();){b=RD(c.Yj(),44);b.md()}return dOd(d)} +function iGd(a){var b;if(ZD(a.a,4)){b=FId(a.a);if(b==null){throw Adb(new dgb(HGe+a.b+"'. "+DGe+(lfb(b6),b6.k)+EGe))}return b}else{return a.a}} +function iSd(a,b){var c,d;if(a.j.length!=b.j.length)return false;for(c=0,d=a.j.length;c<d;c++){if(!lhb(a.j[c],b.j[c]))return false}return true} +function bMd(b){var c;try{c=b.i.Xb(b.e);b.Xj();b.g=b.e++;return c}catch(a){a=zdb(a);if(ZD(a,77)){b.Xj();throw Adb(new Dvb)}else throw Adb(a)}} +function xMd(b){var c;try{c=b.c.Vi(b.e);b.Xj();b.g=b.e++;return c}catch(a){a=zdb(a);if(ZD(a,77)){b.Xj();throw Adb(new Dvb)}else throw Adb(a)}} +function vSd(a){var b,c,d,e;e=0;for(c=0,d=a.length;c<d;c++){b=(BFb(c,a.length),a.charCodeAt(c));b>=64&&b<128&&(e=Rdb(e,Sdb(1,b-64)))}return e} +function k2b(a,b){var c,d;d=null;if(nQb(a,(umd(),amd))){c=RD(mQb(a,amd),96);c.pf(b)&&(d=c.of(b))}d==null&&!!Y2b(a)&&(d=mQb(Y2b(a),b));return d} +function i0b(a,b){var c;c=RD(mQb(a,(yCc(),RAc)),75);if(br(b,f0b)){if(!c){c=new Ejd;pQb(a,RAc,c)}else{Xub(c)}}else !!c&&pQb(a,RAc,null);return c} +function tSb(){tSb=geb;sSb=(umd(),Yld);mSb=Ukd;hSb=Dkd;nSb=tld;qSb=(YHb(),UHb);pSb=SHb;rSb=WHb;oSb=RHb;jSb=(eSb(),aSb);iSb=_Rb;kSb=cSb;lSb=dSb} +function PZb(a){NZb();this.c=new bnb;this.d=a;switch(a.g){case 0:case 2:this.a=Fob(MZb);this.b=oxe;break;case 3:case 1:this.a=MZb;this.b=pxe;}} +function c9b(a){var b;if(!Cod(RD(mQb(a,(yCc(),BBc)),101))){return}b=a.b;d9b((tFb(0,b.c.length),RD(b.c[0],30)));d9b(RD(Vmb(b,b.c.length-1),30))} +function ohc(a,b){b.Ug('Self-Loop post-processing',1);FDb(CDb(CDb(EDb(new SDb(null,new Swb(a.b,16)),new uhc),new whc),new yhc),new Ahc);b.Vg()} +function xrd(a,b,c){var d,e;if(a.c){Dyd(a.c,a.c.i+b);Eyd(a.c,a.c.j+c)}else{for(e=new Anb(a.b);e.a<e.c.c.length;){d=RD(ynb(e),163);xrd(d,b,c)}}} +function ine(a){var b;if(a==null)return null;b=Aqe(nue(a,true));if(b==null){throw Adb(new Mle("Invalid base64Binary value: '"+a+"'"))}return b} +function ju(b,c){var d;d=b.fd(c);try{return d.Pb()}catch(a){a=zdb(a);if(ZD(a,112)){throw Adb(new veb("Can't get element "+c))}else throw Adb(a)}} +function ANb(a,b){var c,d,e;c=a.o;for(e=RD(RD(Qc(a.r,b),21),87).Kc();e.Ob();){d=RD(e.Pb(),117);d.e.a=uNb(d,c.a);d.e.b=c.b*Kfb(UD(d.b.of(sNb)))}} +function kdc(a,b){var c,d,e;e=new cnb(b.gc());for(d=b.Kc();d.Ob();){c=RD(d.Pb(),293);c.c==c.f?_cc(a,c,c.c):adc(a,c)||(ZEb(e.c,c),true)}return e} +function i3b(a){var b;b=new bib;b.a+='n';a.k!=(r3b(),p3b)&&Zhb(Zhb((b.a+='(',b),ps(a.k).toLowerCase()),')');Zhb((b.a+='_',b),X2b(a));return b.a} +function h9b(a,b){var c,d,e,f;e=a.k;c=Kfb(UD(mQb(a,(Ywc(),Jwc))));f=b.k;d=Kfb(UD(mQb(b,Jwc)));return f!=(r3b(),m3b)?-1:e!=m3b?1:c==d?0:c<d?-1:1} +function Lad(a,b){var c,d;c=RD(RD(Wjb(a.g,b.a),42).a,68);d=RD(RD(Wjb(a.g,b.b),42).a,68);return bjd(b.a,b.b)-bjd(b.a,Pid(c.b))-bjd(b.b,Pid(d.b))} +function GMb(a,b){var c;c=RD(Vrb(a.b,b),127).n;switch(b.g){case 1:a.t>=0&&(c.d=a.t);break;case 3:a.t>=0&&(c.a=a.t);}if(a.C){c.b=a.C.b;c.c=a.C.c}} +function JDc(){JDc=geb;IDc=new LDc(mEe,0);FDc=new LDc(BBe,1);GDc=new LDc('LINEAR_SEGMENTS',2);EDc=new LDc('BRANDES_KOEPF',3);HDc=new LDc(lEe,4)} +function IRb(){IRb=geb;FRb=new JRb(_ye,0);ERb=new JRb(aze,1);GRb=new JRb(bze,2);HRb=new JRb(cze,3);FRb.a=false;ERb.a=true;GRb.a=false;HRb.a=true} +function IPb(){IPb=geb;FPb=new JPb(_ye,0);EPb=new JPb(aze,1);GPb=new JPb(bze,2);HPb=new JPb(cze,3);FPb.a=false;EPb.a=true;GPb.a=false;HPb.a=true} +function Ivd(a,b,c,d){var e;if(c>=0){return a.Sh(b,c,d)}else{!!a.Ph()&&(d=(e=a.Fh(),e>=0?a.Ah(d):a.Ph().Th(a,-1-e,null,d)));return a.Ch(b,c,d)}} +function Zyd(a,b){switch(b){case 7:!a.e&&(a.e=new Yie(G4,a,7,4));sLd(a.e);return;case 8:!a.d&&(a.d=new Yie(G4,a,8,5));sLd(a.d);return;}yyd(a,b)} +function Ixd(a,b,c){c==null?(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),jOd(a.o,b)):(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),fOd(a.o,b,c));return a} +function Aob(a,b){yob();var c,d,e,f;c=a;f=b;if(ZD(a,21)&&!ZD(b,21)){c=b;f=a}for(e=c.Kc();e.Ob();){d=e.Pb();if(f.Hc(d)){return false}}return true} +function qTc(a,b,c,d){if(b.a<d.a){return true}else if(b.a==d.a){if(b.b<d.b){return true}else if(b.b==d.b){if(a.b>c.b){return true}}}return false} +function QD(a,b){if(bE(a)){return !!PD[b]}else if(a.Sm){return !!a.Sm[b]}else if(_D(a)){return !!OD[b]}else if($D(a)){return !!ND[b]}return false} +function udc(a){var b;b=a.a;do{b=RD(hs(new is(Mr(Z2b(b).a.Kc(),new ir))),18).c.i;b.k==(r3b(),o3b)&&a.b.Fc(b)}while(b.k==(r3b(),o3b));a.b=hv(a.b)} +function UGc(a,b){var c,d,e;e=a;for(d=new is(Mr(Z2b(b).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);!!c.c.i.c&&(e=$wnd.Math.max(e,c.c.i.c.p))}return e} +function INb(a,b){var c,d,e;e=0;d=RD(RD(Qc(a.r,b),21),87).Kc();while(d.Ob()){c=RD(d.Pb(),117);e+=c.d.d+c.b.Mf().b+c.d.a;d.Ob()&&(e+=a.w)}return e} +function AMb(a,b){var c,d,e;e=0;d=RD(RD(Qc(a.r,b),21),87).Kc();while(d.Ob()){c=RD(d.Pb(),117);e+=c.d.b+c.b.Mf().a+c.d.c;d.Ob()&&(e+=a.w)}return e} +function O2c(a){var b,c,d,e;d=0;e=Q2c(a);if(e.c.length==0){return 1}else{for(c=new Anb(e);c.a<c.c.c.length;){b=RD(ynb(c),27);d+=O2c(b)}}return d} +function aIc(a){var b,c,d;d=a.c.a;a.p=(Qb(d),new dnb(d));for(c=new Anb(d);c.a<c.c.c.length;){b=RD(ynb(c),10);b.p=eIc(b).a}yob();_mb(a.p,new nIc)} +function UJd(a,b,c){var d,e,f,g;d=a.dd(b);if(d!=-1){if(a.Pj()){f=a.Qj();g=cJd(a,d);e=a.Ij(4,g,null,d,f);!c?(c=e):c.nj(e)}else{cJd(a,d)}}return c} +function rLd(a,b,c){var d,e,f,g;d=a.dd(b);if(d!=-1){if(a.Pj()){f=a.Qj();g=THd(a,d);e=a.Ij(4,g,null,d,f);!c?(c=e):c.nj(e)}else{THd(a,d)}}return c} +function Tje(a,b,c,d){var e,f,g;if(c.Xh(b)){nke();if(wWd(b)){e=RD(c.Mh(b),160);Wje(a,e)}else{f=(g=b,!g?null:RD(d,54).gi(g));!!f&&Uje(c.Mh(b),f)}}} +function Dvd(a,b,c,d){var e,f,g;f=vYd(a.Dh(),b);e=b-a.ji();return e<0?(g=a.Ih(f),g>=0?a.Lh(g,c,true):Qvd(a,f,c)):RD(f,69).wk().yk(a,a.hi(),e,c,d)} +function aNb(a,b,c,d){var e,f;f=b.pf((umd(),ild))?RD(b.of(ild),21):a.j;e=lMb(f);if(e==(hMb(),gMb)){return}if(c&&!jMb(e)){return}LKb(cNb(a,e,d),b)} +function Y6b(a){switch(a.g){case 1:return mOb(),lOb;case 3:return mOb(),iOb;case 2:return mOb(),kOb;case 4:return mOb(),jOb;default:return null;}} +function kmc(a,b,c){if(a.e){switch(a.b){case 1:Ulc(a.c,b,c);break;case 0:Vlc(a.c,b,c);}}else{Slc(a.c,b,c)}a.a[b.p][c.p]=a.c.i;a.a[c.p][b.p]=a.c.e} +function LLc(a){var b,c;if(a==null){return null}c=$C(jR,Nve,199,a.length,0,2);for(b=0;b<c.length;b++){c[b]=RD(Gnb(a[b],a[b].length),199)}return c} +function Dhe(a){var b;if(Bhe(a)){Ahe(a);if(a.ul()){b=Bge(a.e,a.b,a.c,a.a,a.j);a.j=b}a.g=a.a;++a.a;++a.c;a.i=0;return a.j}else{throw Adb(new Dvb)}} +function YOb(a,b){var c,d,e,f;f=a.o;c=a.p;f<c?(f*=f):(c*=c);d=f+c;f=b.o;c=b.p;f<c?(f*=f):(c*=c);e=f+c;if(d<e){return -1}if(d==e){return 0}return 1} +function fZd(a,b){var c,d,e;e=RHd(a,b);if(e>=0)return e;if(a.ol()){for(d=0;d<a.i;++d){c=a.pl(RD(a.g[d],58));if(dE(c)===dE(b)){return d}}}return -1} +function eHd(a,b,c){var d,e;e=a.gc();if(b>=e)throw Adb(new aMd(b,e));if(a.Si()){d=a.dd(c);if(d>=0&&d!=b){throw Adb(new agb(LIe))}}return a.Xi(b,c)} +function wx(a,b){this.a=RD(Qb(a),253);this.b=RD(Qb(b),253);if(a.Ed(b)>0||a==(Wk(),Vk)||b==(kl(),jl)){throw Adb(new agb('Invalid range: '+Dx(a,b)))}} +function p_b(a){var b,c;this.b=new bnb;this.c=a;this.a=false;for(c=new Anb(a.a);c.a<c.c.c.length;){b=RD(ynb(c),10);this.a=this.a|b.k==(r3b(),p3b)}} +function xIb(a,b){var c,d,e;c=eJb(new gJb,a);for(e=new Anb(b);e.a<e.c.c.length;){d=RD(ynb(e),125);rIb(uIb(tIb(vIb(sIb(new wIb,0),0),c),d))}return c} +function y0b(a,b,c){c.Ug('Compound graph preprocessor',1);a.a=new Tp;D0b(a,b,null);x0b(a,b);C0b(a);pQb(b,(Ywc(),_vc),a.a);a.a=null;akb(a.b);c.Vg()} +function aec(a,b,c){var d,e,f;for(e=new is(Mr((b?Z2b(a):a3b(a)).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);f=b?d.c.i:d.d.i;f.k==(r3b(),n3b)&&g3b(f,c)}} +function FZc(a,b){var c,d,e;b.Ug('Untreeify',1);c=RD(mQb(a,(q$c(),k$c)),15);for(e=c.Kc();e.Ob();){d=RD(e.Pb(),65);Mub(d.b.d,d);Mub(d.c.b,d)}b.Vg()} +function Znc(a){var b,c,d;for(d=RD(Qc(a.a,(Bnc(),znc)),15).Kc();d.Ob();){c=RD(d.Pb(),105);b=foc(c);Qnc(a,c,b[0],(joc(),goc),0);Qnc(a,c,b[1],ioc,1)}} +function $nc(a){var b,c,d;for(d=RD(Qc(a.a,(Bnc(),Anc)),15).Kc();d.Ob();){c=RD(d.Pb(),105);b=foc(c);Qnc(a,c,b[0],(joc(),goc),0);Qnc(a,c,b[1],ioc,1)}} +function wDc(){wDc=geb;uDc=new yDc(LAe,0);vDc=new yDc('PORT_POSITION',1);tDc=new yDc('NODE_SIZE_WHERE_SPACE_PERMITS',2);sDc=new yDc('NODE_SIZE',3)} +function z6c(){z6c=geb;w6c=new A6c('INTERACTIVE_NODE_REORDERER',0);y6c=new A6c('MIN_SIZE_PRE_PROCESSOR',1);x6c=new A6c('MIN_SIZE_POST_PROCESSOR',2)} +function Rjd(){Rjd=geb;Ljd=new Sjd('AUTOMATIC',0);Ojd=new Sjd(Nye,1);Pjd=new Sjd(Oye,2);Qjd=new Sjd('TOP',3);Mjd=new Sjd(Qye,4);Njd=new Sjd(Kye,5)} +function Pjb(a,b,c,d){Ljb();var e,f;e=0;for(f=0;f<c;f++){e=Bdb(Ndb(Cdb(b[f],yxe),Cdb(d,yxe)),Cdb(Ydb(e),yxe));a[f]=Ydb(e);e=Udb(e,32)}return Ydb(e)} +function qKb(a,b,c){var d,e;e=0;for(d=0;d<iKb;d++){e=$wnd.Math.max(e,gKb(a.a[b.g][d],c))}b==(ZJb(),XJb)&&!!a.b&&(e=$wnd.Math.max(e,a.b.b));return e} +function Jwb(a,b){var c,d;lFb(b>0);if((b&-b)==b){return eE(b*Kwb(a,31)*4.6566128730773926E-10)}do{c=Kwb(a,31);d=c%b}while(c-d+(b-1)<0);return eE(d)} +function d2b(a,b,c){switch(c.g){case 1:a.a=b.a/2;a.b=0;break;case 2:a.a=b.a;a.b=b.b/2;break;case 3:a.a=b.a/2;a.b=b.b;break;case 4:a.a=0;a.b=b.b/2;}} +function Onc(a,b,c,d){var e,f;for(e=b;e<a.c.length;e++){f=(tFb(e,a.c.length),RD(a.c[e],12));if(c.Mb(f)){ZEb(d.c,f)}else{return e}}return a.c.length} +function u5c(a){switch(a.g){case 0:return null;case 1:return new _5c;case 2:return new R5c;default:throw Adb(new agb(mFe+(a.f!=null?a.f:''+a.g)));}} +function U9c(a,b,c){var d,e;L9c(a,b-a.s,c-a.t);for(e=new Anb(a.n);e.a<e.c.c.length;){d=RD(ynb(e),209);Y9c(d,d.e+b-a.s);Z9c(d,d.f+c-a.t)}a.s=b;a.t=c} +function AIb(a){var b,c,d,e,f;c=0;for(e=new Anb(a.a);e.a<e.c.c.length;){d=RD(ynb(e),125);d.d=c++}b=zIb(a);f=null;b.c.length>1&&(f=xIb(a,b));return f} +function yqd(a){var b;b=Kfb(UD(Gxd(a,(umd(),lmd))))*$wnd.Math.sqrt((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a).i);return new rjd(b,b/Kfb(UD(Gxd(a,kmd))))} +function Dzd(a){var b;if(!!a.f&&a.f.Vh()){b=RD(a.f,54);a.f=RD(Vvd(a,b),84);a.f!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,9,8,b,a.f))}return a.f} +function Ezd(a){var b;if(!!a.i&&a.i.Vh()){b=RD(a.i,54);a.i=RD(Vvd(a,b),84);a.i!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,9,7,b,a.i))}return a.i} +function Z5d(a){var b;if(!!a.b&&(a.b.Db&64)!=0){b=a.b;a.b=RD(Vvd(a,b),19);a.b!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,9,21,b,a.b))}return a.b} +function UNd(a,b){var c,d,e;if(a.d==null){++a.e;++a.f}else{d=b.Bi();_Nd(a,a.f+1);e=(d&lve)%a.d.length;c=a.d[e];!c&&(c=a.d[e]=a.dk());c.Fc(b);++a.f}} +function Mge(a,b,c){var d;if(b.tk()){return false}else if(b.Ik()!=-2){d=b.ik();return d==null?c==null:pb(d,c)}else return b.qk()==a.e.Dh()&&c==null} +function Io(){var a;dk(16,fwe);a=Wp(16);this.b=$C(XF,ewe,303,a,0,1);this.c=$C(XF,ewe,303,a,0,1);this.a=null;this.e=null;this.i=0;this.f=a-1;this.g=0} +function j3b(a){v2b.call(this);this.k=(r3b(),p3b);this.j=(dk(6,iwe),new cnb(6));this.b=(dk(2,iwe),new cnb(2));this.d=new T2b;this.f=new C3b;this.a=a} +function wgc(a){var b,c;if(a.c.length<=1){return}b=tgc(a,(qpd(),npd));vgc(a,RD(b.a,17).a,RD(b.b,17).a);c=tgc(a,ppd);vgc(a,RD(c.a,17).a,RD(c.b,17).a)} +function vHc(a,b,c){var d,e;e=a.a.b;for(d=e.c.length;d<c;d++){Qmb(e,e.c.length,new R4b(a.a))}g3b(b,(tFb(c-1,e.c.length),RD(e.c[c-1],30)));a.b[b.p]=c} +function K_c(a,b){var c,d,e;a.b[b.g]=1;for(d=Sub(b.d,0);d.b!=d.d.c;){c=RD(evb(d),65);e=c.c;a.b[e.g]==1?Mub(a.a,c):a.b[e.g]==2?(a.b[e.g]=1):K_c(a,e)}} +function u3c(a,b,c,d){var e,f,g;e=d?RD(Qc(a.a,b),21):RD(Qc(a.b,b),21);for(g=e.Kc();g.Ob();){f=RD(g.Pb(),27);if(o3c(a,c,f)){return true}}return false} +function d$d(a){var b,c;for(c=new dMd(a);c.e!=c.i.gc();){b=RD(bMd(c),89);if(!!b.e||(!b.d&&(b.d=new XZd(o7,b,1)),b.d).i!=0){return true}}return false} +function o5d(a){var b,c;for(c=new dMd(a);c.e!=c.i.gc();){b=RD(bMd(c),89);if(!!b.e||(!b.d&&(b.d=new XZd(o7,b,1)),b.d).i!=0){return true}}return false} +function dIc(a){var b,c,d;b=0;for(d=new Anb(a.c.a);d.a<d.c.c.length;){c=RD(ynb(d),10);b+=Kr(new is(Mr(a3b(c).a.Kc(),new ir)))}return b/a.c.a.c.length} +function Tcd(){Tcd=geb;Scd=(Kcd(),Jcd);Qcd=new A3b(8);new mGd((umd(),tld),Qcd);new mGd(fmd,8);Rcd=Hcd;Ocd=xcd;Pcd=ycd;Ncd=new mGd(Mkd,(Geb(),false))} +function $dd(a,b,c){var d;c.Ug('Shrinking tree compaction',1);if(Heb(TD(mQb(b,(OQb(),MQb))))){Ydd(a,b.f);zQb(b.f,(d=b.c,d))}else{zQb(b.f,b.c)}c.Vg()} +function Uyd(a,b,c,d){switch(b){case 7:return !a.e&&(a.e=new Yie(G4,a,7,4)),a.e;case 8:return !a.d&&(a.d=new Yie(G4,a,8,5)),a.d;}return vyd(a,b,c,d)} +function h2d(a){var b;if(!!a.a&&a.a.Vh()){b=RD(a.a,54);a.a=RD(Vvd(a,b),142);a.a!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,9,5,b,a.a))}return a.a} +function Xqe(a){if(a<48)return -1;if(a>102)return -1;if(a<=57)return a-48;if(a<65)return -1;if(a<=70)return a-65+10;if(a<97)return -1;return a-97+10} +function ck(a,b){if(a==null){throw Adb(new Ogb('null key in entry: null='+b))}else if(b==null){throw Adb(new Ogb('null value in entry: '+a+'=null'))}} +function Cr(a,b){var c,d;while(a.Ob()){if(!b.Ob()){return false}c=a.Pb();d=b.Pb();if(!(dE(c)===dE(d)||c!=null&&pb(c,d))){return false}}return !b.Ob()} +function aLb(a,b){var c;c=cD(WC(iE,1),vxe,28,15,[gKb(a.a[0],b),gKb(a.a[1],b),gKb(a.a[2],b)]);if(a.d){c[0]=$wnd.Math.max(c[0],c[2]);c[2]=c[0]}return c} +function bLb(a,b){var c;c=cD(WC(iE,1),vxe,28,15,[hKb(a.a[0],b),hKb(a.a[1],b),hKb(a.a[2],b)]);if(a.d){c[0]=$wnd.Math.max(c[0],c[2]);c[2]=c[0]}return c} +function vIc(a,b,c){if(!Cod(RD(mQb(b,(yCc(),BBc)),101))){uIc(a,b,e3b(b,c));uIc(a,b,e3b(b,(qpd(),npd)));uIc(a,b,e3b(b,Yod));yob();_mb(b.j,new JIc(a))}} +function sUc(a){var b,c;a.c||vUc(a);c=new Ejd;b=new Anb(a.a);ynb(b);while(b.a<b.c.c.length){Mub(c,RD(ynb(b),418).a)}sFb(c.b!=0);Wub(c,c.c.b);return c} +function O9c(a,b,c){var d,e,f,g,h;h=a.r+b;a.r+=b;a.d+=c;d=c/a.n.c.length;e=0;for(g=new Anb(a.n);g.a<g.c.c.length;){f=RD(ynb(g),209);X9c(f,h,d,e);++e}} +function kHb(a){var b,c,d;a.b.a.$b();a.a=$C(hN,rve,60,a.c.c.a.b.c.length,0,1);b=0;for(d=new Anb(a.c.c.a.b);d.a<d.c.c.length;){c=RD(ynb(d),60);c.f=b++}} +function TYb(a){var b,c,d;a.b.a.$b();a.a=$C(bQ,rve,86,a.c.a.a.b.c.length,0,1);b=0;for(d=new Anb(a.c.a.a.b);d.a<d.c.c.length;){c=RD(ynb(d),86);c.i=b++}} +function Er(a){var b;b=yr(a);if(!gs(a)){throw Adb(new veb('position (0) must be less than the number of elements that remained ('+b+')'))}return hs(a)} +function ZCb(a,b){var c;if(!a.a){c=$C(iE,vxe,28,0,15,1);ixb(a.b.a,new bDb(c));bFb(c,heb(iob.prototype.Me,iob,[]));a.a=new Lxb(c,a.d)}return zxb(a.a,b)} +function $Pb(b,c,d){var e;try{return PPb(b,c+b.j,d+b.k)}catch(a){a=zdb(a);if(ZD(a,77)){e=a;throw Adb(new veb(e.g+ize+c+pve+d+').'))}else throw Adb(a)}} +function _Pb(b,c,d){var e;try{return QPb(b,c+b.j,d+b.k)}catch(a){a=zdb(a);if(ZD(a,77)){e=a;throw Adb(new veb(e.g+ize+c+pve+d+').'))}else throw Adb(a)}} +function aQb(b,c,d){var e;try{return RPb(b,c+b.j,d+b.k)}catch(a){a=zdb(a);if(ZD(a,77)){e=a;throw Adb(new veb(e.g+ize+c+pve+d+').'))}else throw Adb(a)}} +function J8b(a){switch(a.g){case 1:return qpd(),ppd;case 4:return qpd(),Yod;case 3:return qpd(),Xod;case 2:return qpd(),npd;default:return qpd(),opd;}} +function Imc(a,b,c){if(b.k==(r3b(),p3b)&&c.k==o3b){a.d=Fmc(b,(qpd(),npd));a.b=Fmc(b,Yod)}if(c.k==p3b&&b.k==o3b){a.d=Fmc(c,(qpd(),Yod));a.b=Fmc(c,npd)}} +function Mmc(a,b){var c,d,e;e=b3b(a,b);for(d=e.Kc();d.Ob();){c=RD(d.Pb(),12);if(mQb(c,(Ywc(),Iwc))!=null||k4b(new l4b(c.b))){return true}}return false} +function RNc(a,b,c){c.Ug('Linear segments node placement',1);a.b=RD(mQb(b,(Ywc(),Qwc)),312);SNc(a,b);NNc(a,b);KNc(a,b);QNc(a);a.a=null;a.b=null;c.Vg()} +function W9c(a,b){Dyd(b,a.e+a.d+(a.c.c.length==0?0:a.b));Eyd(b,a.f);a.a=$wnd.Math.max(a.a,b.f);a.d+=b.g+(a.c.c.length==0?0:a.b);Rmb(a.c,b);return true} +function bad(a,b,c){var d,e,f,g;g=0;d=c/a.a.c.length;for(f=new Anb(a.a);f.a<f.c.c.length;){e=RD(ynb(f),172);U9c(e,e.s,e.t+g*d);O9c(e,a.d-e.r+b,d);++g}} +function Cid(a,b){var c,d,e,f,g,h;e=b.length-1;g=0;h=0;for(d=0;d<=e;d++){f=b[d];c=vid(e,d)*Iid(1-a,e-d)*Iid(a,d);g+=f.a*c;h+=f.b*c}return new rjd(g,h)} +function JHd(a,b){var c,d,e,f,g;c=b.gc();a._i(a.i+c);f=b.Kc();g=a.i;a.i+=c;for(d=g;d<a.i;++d){e=f.Pb();MHd(a,d,a.Zi(d,e));a.Mi(d,e);a.Ni()}return c!=0} +function TJd(a,b,c){var d,e,f;if(a.Pj()){d=a.Ej();f=a.Qj();++a.j;a.qj(d,a.Zi(d,b));e=a.Ij(3,null,b,d,f);!c?(c=e):c.nj(e)}else{$Id(a,a.Ej(),b)}return c} +function u0d(a,b,c){var d,e,f;d=RD(QHd(tYd(a.a),b),89);f=(e=d.c,ZD(e,90)?RD(e,29):(JTd(),zTd));((f.Db&64)!=0?Vvd(a.b,f):f)==c?i2d(d):l2d(d,c);return f} +function pne(a){var b;return a==null?null:new ejb((b=nue(a,true),b.length>0&&(BFb(0,b.length),b.charCodeAt(0)==43)?(BFb(1,b.length+1),b.substr(1)):b))} +function qne(a){var b;return a==null?null:new ejb((b=nue(a,true),b.length>0&&(BFb(0,b.length),b.charCodeAt(0)==43)?(BFb(1,b.length+1),b.substr(1)):b))} +function Syb(a,b,c,d,e,f,g,h){var i,j;if(!d){return}i=d.a[0];!!i&&Syb(a,b,c,i,e,f,g,h);Tyb(a,c,d.d,e,f,g,h)&&b.Fc(d);j=d.a[1];!!j&&Syb(a,b,c,j,e,f,g,h)} +function PPb(b,c,d){try{return Gdb(SPb(b,c,d),1)}catch(a){a=zdb(a);if(ZD(a,333)){throw Adb(new veb(fze+b.o+'*'+b.p+gze+c+pve+d+hze))}else throw Adb(a)}} +function QPb(b,c,d){try{return Gdb(SPb(b,c,d),0)}catch(a){a=zdb(a);if(ZD(a,333)){throw Adb(new veb(fze+b.o+'*'+b.p+gze+c+pve+d+hze))}else throw Adb(a)}} +function RPb(b,c,d){try{return Gdb(SPb(b,c,d),2)}catch(a){a=zdb(a);if(ZD(a,333)){throw Adb(new veb(fze+b.o+'*'+b.p+gze+c+pve+d+hze))}else throw Adb(a)}} +function lMd(b,c){if(b.g==-1){throw Adb(new cgb)}b.Xj();try{b.d.hd(b.g,c);b.f=b.d.j}catch(a){a=zdb(a);if(ZD(a,77)){throw Adb(new Jrb)}else throw Adb(a)}} +function Y7b(a){var b,c,d,e,f;for(d=new Anb(a.b);d.a<d.c.c.length;){c=RD(ynb(d),30);b=0;for(f=new Anb(c.a);f.a<f.c.c.length;){e=RD(ynb(f),10);e.p=b++}}} +function Ee(a,b){var c,d,e,f;f=a.gc();b.length<f&&(b=cFb(new Array(f),b));e=b;d=a.Kc();for(c=0;c<f;++c){bD(e,c,d.Pb())}b.length>f&&bD(b,f,null);return b} +function av(a,b){var c,d;d=a.gc();if(b==null){for(c=0;c<d;c++){if(a.Xb(c)==null){return c}}}else{for(c=0;c<d;c++){if(pb(b,a.Xb(c))){return c}}}return -1} +function Jd(a,b){var c,d,e;c=b.ld();e=b.md();d=a.xc(c);if(!(dE(e)===dE(d)||e!=null&&pb(e,d))){return false}if(d==null&&!a._b(c)){return false}return true} +function mD(a,b){var c,d,e;if(b<=22){c=a.l&(1<<b)-1;d=e=0}else if(b<=44){c=a.l;d=a.m&(1<<b-22)-1;e=0}else{c=a.l;d=a.m;e=a.h&(1<<b-44)-1}return hD(c,d,e)} +function pNb(a,b){switch(b.g){case 1:return a.f.n.d+a.t;case 3:return a.f.n.a+a.t;case 2:return a.f.n.c+a.s;case 4:return a.f.n.b+a.s;default:return 0;}} +function TNb(a,b){var c,d;d=b.c;c=b.a;switch(a.b.g){case 0:c.d=a.e-d.a-d.d;break;case 1:c.d+=a.e;break;case 2:c.c=a.e-d.a-d.d;break;case 3:c.c=a.e+d.d;}} +function QRb(a,b,c,d){var e,f;this.a=b;this.c=d;e=a.a;PRb(this,new rjd(-e.c,-e.d));$id(this.b,c);f=d/2;b.a?njd(this.b,0,f):njd(this.b,f,0);Rmb(a.c,this)} +function i2c(a,b,c,d){var e;this.c=a;this.d=b;e=new Yub;Pub(e,c,e.c.b,e.c);this.a=e;this.b=RD(mQb(d,(h_c(),H$c)),88);this.e=Kfb(UD(mQb(d,$$c)));h2c(this)} +function j5c(){j5c=geb;i5c=new l5c(LAe,0);g5c=new l5c(EBe,1);h5c=new l5c('EDGE_LENGTH_BY_POSITION',2);f5c=new l5c('CROSSING_MINIMIZATION_BY_POSITION',3)} +function uEd(a,b){var c,d;c=RD(Ao(a.g,b),27);if(c){return c}d=RD(Ao(a.j,b),123);if(d){return d}throw Adb(new CDd('Referenced shape does not exist: '+b))} +function Pk(b,c){var d,e;if(ZD(c,253)){e=RD(c,253);try{d=b.Ed(e);return d==0}catch(a){a=zdb(a);if(ZD(a,212)){return false}else throw Adb(a)}}return false} +function tWb(a,b){if(a.c==b){return a.d}else if(a.d==b){return a.c}else{throw Adb(new agb("Node 'one' must be either source or target of edge 'edge'."))}} +function rRc(a,b){if(a.c.i==b){return a.d.i}else if(a.d.i==b){return a.c.i}else{throw Adb(new agb('Node '+b+' is neither source nor target of edge '+a))}} +function $gc(a,b,c){c.Ug('Self-Loop ordering',1);FDb(GDb(CDb(CDb(EDb(new SDb(null,new Swb(b.b,16)),new chc),new ehc),new ghc),new ihc),new khc(a));c.Vg()} +function Fpc(a,b){var c;switch(b.g){case 2:case 4:c=a.a;a.c.d.n.b<c.d.n.b&&(c=a.c);Gpc(a,b,(enc(),dnc),c);break;case 1:case 3:Gpc(a,b,(enc(),anc),null);}} +function Ypc(a,b,c,d,e,f){var g,h,i,j,k;g=Wpc(b,c,f);h=c==(qpd(),Yod)||c==ppd?-1:1;j=a[c.g];for(k=0;k<j.length;k++){i=j[k];i>0&&(i+=e);j[k]=g;g+=h*(i+d)}} +function vsc(a){var b,c,d;d=a.f;a.n=$C(iE,vxe,28,d,15,1);a.d=$C(iE,vxe,28,d,15,1);for(b=0;b<d;b++){c=RD(Vmb(a.c.b,b),30);a.n[b]=ssc(a,c);a.d[b]=rsc(a,c)}} +function Xwd(a,b){var c,d,e;e=0;for(d=2;d<b;d<<=1){(a.Db&d)!=0&&++e}if(e==0){for(c=b<<=1;c<=128;c<<=1){if((a.Db&c)!=0){return 0}}return -1}else{return e}} +function Sge(a,b){var c,d,e,f,g;g=pke(a.e.Dh(),b);f=null;c=RD(a.g,124);for(e=0;e<a.i;++e){d=c[e];if(g.am(d.Lk())){!f&&(f=new YHd);WGd(f,d)}}!!f&&wLd(a,f)} +function ene(a){var b,c,d;if(!a)return null;if(a.dc())return '';d=new Qhb;for(c=a.Kc();c.Ob();){b=c.Pb();Nhb(d,WD(b));d.a+=' '}return qeb(d,d.a.length-1)} +function _C(a,b){var c=new Array(b);var d;switch(a){case 14:case 15:d=0;break;case 16:d=false;break;default:return c;}for(var e=0;e<b;++e){c[e]=d}return c} +function GGb(a){var b,c,d;for(c=new Anb(a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),60);b.c.$b()}Dmd(a.d)?(d=a.a.c):(d=a.a.d);Umb(d,new WGb(a));a.c.df(a);HGb(a)} +function oUb(a){var b,c,d,e;for(c=new Anb(a.e.c);c.a<c.c.c.length;){b=RD(ynb(c),290);for(e=new Anb(b.b);e.a<e.c.c.length;){d=RD(ynb(e),454);hUb(d)}YTb(b)}} +function gad(a){var b,c,d,e,f;d=0;f=0;e=0;for(c=new Anb(a.a);c.a<c.c.c.length;){b=RD(ynb(c),172);f=$wnd.Math.max(f,b.r);d+=b.d+(e>0?a.c:0);++e}a.b=d;a.d=f} +function rKb(a,b){var c;c=cD(WC(iE,1),vxe,28,15,[qKb(a,(ZJb(),WJb),b),qKb(a,XJb,b),qKb(a,YJb,b)]);if(a.f){c[0]=$wnd.Math.max(c[0],c[2]);c[2]=c[0]}return c} +function cQb(b,c,d){var e;try{TPb(b,c+b.j,d+b.k,false,true)}catch(a){a=zdb(a);if(ZD(a,77)){e=a;throw Adb(new veb(e.g+ize+c+pve+d+').'))}else throw Adb(a)}} +function dQb(b,c,d){var e;try{TPb(b,c+b.j,d+b.k,true,false)}catch(a){a=zdb(a);if(ZD(a,77)){e=a;throw Adb(new veb(e.g+ize+c+pve+d+').'))}else throw Adb(a)}} +function u8b(a){var b;if(!nQb(a,(yCc(),dBc))){return}b=RD(mQb(a,dBc),21);if(b.Hc((dod(),Xnd))){b.Mc(Xnd);b.Fc(Znd)}else if(b.Hc(Znd)){b.Mc(Znd);b.Fc(Xnd)}} +function v8b(a){var b;if(!nQb(a,(yCc(),dBc))){return}b=RD(mQb(a,dBc),21);if(b.Hc((dod(),cod))){b.Mc(cod);b.Fc(aod)}else if(b.Hc(aod)){b.Mc(aod);b.Fc(cod)}} +function oqc(a,b,c,d){var e,f,g,h;a.a==null&&rqc(a,b);g=b.b.j.c.length;f=c.d.p;h=d.d.p;e=h-1;e<0&&(e=g-1);return f<=e?a.a[e]-a.a[f]:a.a[g-1]-a.a[f]+a.a[e]} +function Cud(a){var b,c;if(!a.b){a.b=fv(RD(a.f,27).kh().i);for(c=new dMd(RD(a.f,27).kh());c.e!=c.i.gc();){b=RD(bMd(c),135);Rmb(a.b,new Bud(b))}}return a.b} +function Dud(a){var b,c;if(!a.e){a.e=fv(wCd(RD(a.f,27)).i);for(c=new dMd(wCd(RD(a.f,27)));c.e!=c.i.gc();){b=RD(bMd(c),123);Rmb(a.e,new Rud(b))}}return a.e} +function yud(a){var b,c;if(!a.a){a.a=fv(tCd(RD(a.f,27)).i);for(c=new dMd(tCd(RD(a.f,27)));c.e!=c.i.gc();){b=RD(bMd(c),27);Rmb(a.a,new Fud(a,b))}}return a.a} +function DXd(b){var c;if(!b.C&&(b.D!=null||b.B!=null)){c=EXd(b);if(c){b.hl(c)}else{try{b.hl(null)}catch(a){a=zdb(a);if(!ZD(a,63))throw Adb(a)}}}return b.C} +function xMb(a){switch(a.q.g){case 5:uMb(a,(qpd(),Yod));uMb(a,npd);break;case 4:vMb(a,(qpd(),Yod));vMb(a,npd);break;default:wMb(a,(qpd(),Yod));wMb(a,npd);}} +function GNb(a){switch(a.q.g){case 5:DNb(a,(qpd(),Xod));DNb(a,ppd);break;case 4:ENb(a,(qpd(),Xod));ENb(a,ppd);break;default:FNb(a,(qpd(),Xod));FNb(a,ppd);}} +function G$b(a,b){var c,d,e;e=new pjd;for(d=a.Kc();d.Ob();){c=RD(d.Pb(),36);w$b(c,e.a,0);e.a+=c.f.a+b;e.b=$wnd.Math.max(e.b,c.f.b)}e.b>0&&(e.b+=b);return e} +function I$b(a,b){var c,d,e;e=new pjd;for(d=a.Kc();d.Ob();){c=RD(d.Pb(),36);w$b(c,0,e.b);e.b+=c.f.b+b;e.a=$wnd.Math.max(e.a,c.f.a)}e.a>0&&(e.a+=b);return e} +function l2b(a){var b,c,d;d=lve;for(c=new Anb(a.a);c.a<c.c.c.length;){b=RD(ynb(c),10);nQb(b,(Ywc(),zwc))&&(d=$wnd.Math.min(d,RD(mQb(b,zwc),17).a))}return d} +function PLc(a,b){var c,d;if(b.length==0){return 0}c=lMc(a.a,b[0],(qpd(),ppd));c+=lMc(a.a,b[b.length-1],Xod);for(d=0;d<b.length;d++){c+=QLc(a,d,b)}return c} +function VUc(){HUc();this.c=new bnb;this.i=new bnb;this.e=new Iub;this.f=new Iub;this.g=new Iub;this.j=new bnb;this.a=new bnb;this.b=new Tsb;this.k=new Tsb} +function AXd(a,b){var c,d;if(a.Db>>16==6){return a.Cb.Th(a,5,t7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?a.ii():c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} +function kA(a){fA();var b=a.e;if(b&&b.stack){var c=b.stack;var d=b+'\n';c.substring(0,d.length)==d&&(c=c.substring(d.length));return c.split('\n')}return []} +function pgb(a){var b;b=(wgb(),vgb);return b[a>>>28]|b[a>>24&15]<<4|b[a>>20&15]<<8|b[a>>16&15]<<12|b[a>>12&15]<<16|b[a>>8&15]<<20|b[a>>4&15]<<24|b[a&15]<<28} +function mmb(a){var b,c,d;if(a.b!=a.c){return}d=a.a.length;c=mgb($wnd.Math.max(8,d))<<1;if(a.b!=0){b=WEb(a.a,c);lmb(a,b,d);a.a=b;a.b=0}else{aFb(a.a,c)}a.c=d} +function uNb(a,b){var c;c=a.b;return c.pf((umd(),Gld))?c.ag()==(qpd(),ppd)?-c.Mf().a-Kfb(UD(c.of(Gld))):b+Kfb(UD(c.of(Gld))):c.ag()==(qpd(),ppd)?-c.Mf().a:b} +function X2b(a){var b;if(a.b.c.length!=0&&!!RD(Vmb(a.b,0),72).a){return RD(Vmb(a.b,0),72).a}b=R0b(a);if(b!=null){return b}return ''+(!a.c?-1:Wmb(a.c.a,a,0))} +function M3b(a){var b;if(a.f.c.length!=0&&!!RD(Vmb(a.f,0),72).a){return RD(Vmb(a.f,0),72).a}b=R0b(a);if(b!=null){return b}return ''+(!a.i?-1:Wmb(a.i.j,a,0))} +function skc(a,b){var c,d;if(b<0||b>=a.gc()){return null}for(c=b;c<a.gc();++c){d=RD(a.Xb(c),131);if(c==a.gc()-1||!d.o){return new Ptd(sgb(c),d)}}return null} +function Xrc(a,b,c){var d,e,f,g,h;f=a.c;h=c?b:a;d=c?a:b;for(e=h.p+1;e<d.p;++e){g=RD(Vmb(f.a,e),10);if(!(g.k==(r3b(),l3b)||Yrc(g))){return false}}return true} +function Ead(a){var b,c,d,e,f;f=0;e=pxe;d=0;for(c=new Anb(a.a);c.a<c.c.c.length;){b=RD(ynb(c),172);f+=b.r+(d>0?a.c:0);e=$wnd.Math.max(e,b.d);++d}a.e=f;a.b=e} +function Qud(a){var b,c;if(!a.b){a.b=fv(RD(a.f,123).kh().i);for(c=new dMd(RD(a.f,123).kh());c.e!=c.i.gc();){b=RD(bMd(c),135);Rmb(a.b,new Bud(b))}}return a.b} +function aHd(a,b){var c,d,e;if(b.dc()){return jQd(),jQd(),iQd}else{c=new ZLd(a,b.gc());for(e=new dMd(a);e.e!=e.i.gc();){d=bMd(e);b.Hc(d)&&WGd(c,d)}return c}} +function Axd(a,b,c,d){if(b==0){return d?(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),a.o):(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),dOd(a.o))}return Dvd(a,b,c,d)} +function rBd(a){var b,c;if(a.rb){for(b=0,c=a.rb.i;b<c;++b){aAd(QHd(a.rb,b))}}if(a.vb){for(b=0,c=a.vb.i;b<c;++b){aAd(QHd(a.vb,b))}}Uee((lke(),jke),a);a.Bb|=1} +function zBd(a,b,c,d,e,f,g,h,i,j,k,l,m,n){ABd(a,b,d,null,e,f,g,h,i,j,m,true,n);a6d(a,k);ZD(a.Cb,90)&&v$d(yYd(RD(a.Cb,90)),2);!!c&&b6d(a,c);c6d(a,l);return a} +function Jae(b){var c,d;if(b==null){return null}d=0;try{d=Oeb(b,qwe,lve)&Bwe}catch(a){a=zdb(a);if(ZD(a,130)){c=Ahb(b);d=c[0]}else throw Adb(a)}return hfb(d)} +function Kae(b){var c,d;if(b==null){return null}d=0;try{d=Oeb(b,qwe,lve)&Bwe}catch(a){a=zdb(a);if(ZD(a,130)){c=Ahb(b);d=c[0]}else throw Adb(a)}return hfb(d)} +function rD(a,b){var c,d,e;e=a.h-b.h;if(e<0){return false}c=a.l-b.l;d=a.m-b.m+(c>>22);e+=d>>22;if(e<0){return false}a.l=c&dxe;a.m=d&dxe;a.h=e&exe;return true} +function Tyb(a,b,c,d,e,f,g){var h,i;if(b.Te()&&(i=a.a.Ne(c,d),i<0||!e&&i==0)){return false}if(b.Ue()&&(h=a.a.Ne(c,f),h>0||!g&&h==0)){return false}return true} +function Agc(a,b){sgc();var c;c=a.j.g-b.j.g;if(c!=0){return 0}switch(a.j.g){case 2:return Cgc(b,rgc)-Cgc(a,rgc);case 4:return Cgc(a,qgc)-Cgc(b,qgc);}return 0} +function uuc(a){switch(a.g){case 0:return nuc;case 1:return ouc;case 2:return puc;case 3:return quc;case 4:return ruc;case 5:return suc;default:return null;}} +function cBd(a,b,c){var d,e;d=(e=new R5d,YVd(e,b),PAd(e,c),WGd((!a.c&&(a.c=new C5d(u7,a,12,10)),a.c),e),e);$Vd(d,0);bWd(d,1);aWd(d,true);_Vd(d,true);return d} +function THd(a,b){var c,d;if(b>=a.i)throw Adb(new yNd(b,a.i));++a.j;c=a.g[b];d=a.i-b-1;d>0&&hib(a.g,b+1,a.g,b,d);bD(a.g,--a.i,null);a.Qi(b,c);a.Ni();return c} +function sWd(a,b){var c,d;if(a.Db>>16==17){return a.Cb.Th(a,21,h7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?a.ii():c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} +function _Fb(a){var b,c,d,e;yob();_mb(a.c,a.a);for(e=new Anb(a.c);e.a<e.c.c.length;){d=ynb(e);for(c=new Anb(a.b);c.a<c.c.c.length;){b=RD(ynb(c),693);b.bf(d)}}} +function r$b(a){var b,c,d,e;yob();_mb(a.c,a.a);for(e=new Anb(a.c);e.a<e.c.c.length;){d=ynb(e);for(c=new Anb(a.b);c.a<c.c.c.length;){b=RD(ynb(c),382);b.bf(d)}}} +function rJb(a){var b,c,d,e,f;e=lve;f=null;for(d=new Anb(a.d);d.a<d.c.c.length;){c=RD(ynb(d),218);if(c.d.j^c.e.j){b=c.e.e-c.d.e-c.a;if(b<e){e=b;f=c}}}return f} +function QVb(){QVb=geb;OVb=new lGd(vAe,(Geb(),false));KVb=new lGd(wAe,100);MVb=(AWb(),yWb);LVb=new lGd(xAe,MVb);NVb=new lGd(yAe,Vze);PVb=new lGd(zAe,sgb(lve))} +function Xlc(a,b,c){var d,e,f,g,h,i,j,k;j=0;for(e=a.a[b],f=0,g=e.length;f<g;++f){d=e[f];k=aMc(d,c);for(i=k.Kc();i.Ob();){h=RD(i.Pb(),12);Zjb(a.f,h,sgb(j++))}}} +function UDd(a,b,c){var d,e,f,g;if(c){e=c.a.length;d=new vue(e);for(g=(d.b-d.a)*d.c<0?(uue(),tue):new Rue(d);g.Ob();){f=RD(g.Pb(),17);Rc(a,b,tDd(JB(c,f.a)))}}} +function VDd(a,b,c){var d,e,f,g;if(c){e=c.a.length;d=new vue(e);for(g=(d.b-d.a)*d.c<0?(uue(),tue):new Rue(d);g.Ob();){f=RD(g.Pb(),17);Rc(a,b,tDd(JB(c,f.a)))}}} +function foc(a){Mnc();var b;b=RD(Ee(Ec(a.k),$C(E3,NAe,64,2,0,1)),126);Wnb(b,0,b.length,null);if(b[0]==(qpd(),Yod)&&b[1]==ppd){bD(b,0,ppd);bD(b,1,Yod)}return b} +function hMc(a,b,c){var d,e,f;e=fMc(a,b,c);f=iMc(a,e);YLc(a.b);CMc(a,b,c);yob();_mb(e,new HMc(a));d=iMc(a,e);YLc(a.b);CMc(a,c,b);return new Ptd(sgb(f),sgb(d))} +function JNc(){JNc=geb;GNc=pfd(new ufd,(sXb(),rXb),(hcc(),ybc));HNc=new kGd('linearSegments.inputPrio',sgb(0));INc=new kGd('linearSegments.outputPrio',sgb(0))} +function YVc(){YVc=geb;UVc=new $Vc('P1_TREEIFICATION',0);VVc=new $Vc('P2_NODE_ORDERING',1);WVc=new $Vc('P3_NODE_PLACEMENT',2);XVc=new $Vc('P4_EDGE_ROUTING',3)} +function yad(a){var b,c,d,e;c=0;b=0;for(e=new dMd(a);e.e!=e.i.gc();){d=RD(bMd(e),27);c=$wnd.Math.max(d.g+d.i,c);b=$wnd.Math.max(d.f+d.j,b)}return new rjd(c,b)} +function ard(a,b){var c,d,e,f;f=0;for(d=new Anb(a);d.a<d.c.c.length;){c=RD(ynb(d),27);f+=$wnd.Math.pow(c.g*c.f-b,2)}e=$wnd.Math.sqrt(f/(a.c.length-1));return e} +function Pnd(){Pnd=geb;Ond=new Rnd('UNKNOWN',0);Lnd=new Rnd('ABOVE',1);Mnd=new Rnd('BELOW',2);Nnd=new Rnd('INLINE',3);new kGd('org.eclipse.elk.labelSide',Ond)} +function RHd(a,b){var c;if(a.Yi()&&b!=null){for(c=0;c<a.i;++c){if(pb(b,a.g[c])){return c}}}else{for(c=0;c<a.i;++c){if(dE(a.g[c])===dE(b)){return c}}}return -1} +function L0b(a,b,c){var d,e;if(b.c==(BEc(),zEc)&&c.c==yEc){return -1}else if(b.c==yEc&&c.c==zEc){return 1}d=P0b(b.a,a.a);e=P0b(c.a,a.a);return b.c==zEc?e-d:d-e} +function f3b(a,b,c){if(!!c&&(b<0||b>c.a.c.length)){throw Adb(new agb('index must be >= 0 and <= layer node count'))}!!a.c&&Ymb(a.c.a,a);a.c=c;!!c&&Qmb(c.a,b,a)} +function Gac(a,b){var c,d,e;for(d=new is(Mr(W2b(a).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);e=RD(b.Kb(c),10);return new cc(Qb(e.n.b+e.o.b/2))}return wb(),wb(),vb} +function RQc(a,b){this.c=new Tsb;this.a=a;this.b=b;this.d=RD(mQb(a,(Ywc(),Qwc)),312);dE(mQb(a,(yCc(),eBc)))===dE((Cuc(),Auc))?(this.e=new BRc):(this.e=new uRc)} +function ftd(a,b){var c,d;d=null;if(a.pf((umd(),amd))){c=RD(a.of(amd),96);c.pf(b)&&(d=c.of(b))}d==null&&!!a.Tf()&&(d=a.Tf().of(b));d==null&&(d=iGd(b));return d} +function ku(b,c){var d,e;d=b.fd(c);try{e=d.Pb();d.Qb();return e}catch(a){a=zdb(a);if(ZD(a,112)){throw Adb(new veb("Can't remove element "+c))}else throw Adb(a)}} +function GA(a,b){var c,d,e;d=new uB;e=new vB(d.q.getFullYear()-Owe,d.q.getMonth(),d.q.getDate());c=FA(a,b,e);if(c==0||c<b.length){throw Adb(new agb(b))}return e} +function iwb(a,b){var c,d,e;uFb(b);lFb(b!=a);e=a.b.c.length;for(d=b.Kc();d.Ob();){c=d.Pb();Rmb(a.b,uFb(c))}if(e!=a.b.c.length){jwb(a,0);return true}return false} +function dWb(){dWb=geb;XVb=(umd(),ald);new mGd(Pkd,(Geb(),true));$Vb=kld;_Vb=nld;aWb=pld;ZVb=ild;bWb=sld;cWb=Lld;WVb=(QVb(),OVb);UVb=LVb;VVb=NVb;YVb=PVb;TVb=KVb} +function U0b(a,b){if(b==a.c){return a.d}else if(b==a.d){return a.c}else{throw Adb(new agb("'port' must be either the source port or target port of the edge."))}} +function T6b(a,b,c){var d,e;e=a.o;d=a.d;switch(b.g){case 1:return -d.d-c;case 3:return e.b+d.a+c;case 2:return e.a+d.c+c;case 4:return -d.b-c;default:return 0;}} +function Y9b(a,b,c,d){var e,f,g,h;g3b(b,RD(d.Xb(0),30));h=d.kd(1,d.gc());for(f=RD(c.Kb(b),20).Kc();f.Ob();){e=RD(f.Pb(),18);g=e.c.i==b?e.d.i:e.c.i;Y9b(a,g,c,h)}} +function Bic(a){var b;b=new Tsb;if(nQb(a,(Ywc(),Vwc))){return RD(mQb(a,Vwc),85)}FDb(CDb(new SDb(null,new Swb(a.j,16)),new Dic),new Fic(b));pQb(a,Vwc,b);return b} +function zad(a,b){var c,d,e,f,g;d=0;e=0;c=0;for(g=new Anb(a);g.a<g.c.c.length;){f=RD(ynb(g),186);d=$wnd.Math.max(d,f.e);e+=f.b+(c>0?b:0);++c}return new rjd(d,e)} +function Czd(a,b){var c,d;if(a.Db>>16==6){return a.Cb.Th(a,6,G4,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(pvd(),hvd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} +function cCd(a,b){var c,d;if(a.Db>>16==7){return a.Cb.Th(a,1,H4,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(pvd(),jvd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} +function LCd(a,b){var c,d;if(a.Db>>16==9){return a.Cb.Th(a,9,J4,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(pvd(),lvd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} +function M1d(a,b){var c,d;if(a.Db>>16==5){return a.Cb.Th(a,9,m7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(JTd(),tTd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} +function qBd(a,b){var c,d;if(a.Db>>16==7){return a.Cb.Th(a,6,t7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(JTd(),CTd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} +function iVd(a,b){var c,d;if(a.Db>>16==3){return a.Cb.Th(a,0,p7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(JTd(),mTd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} +function IEd(){this.a=new BDd;this.g=new Io;this.j=new Io;this.b=new Tsb;this.d=new Io;this.i=new Io;this.k=new Tsb;this.c=new Tsb;this.e=new Tsb;this.f=new Tsb} +function kQd(a,b,c){var d,e,f;c<0&&(c=0);f=a.i;for(e=c;e<f;e++){d=QHd(a,e);if(b==null){if(d==null){return e}}else if(dE(b)===dE(d)||pb(b,d)){return e}}return -1} +function Bee(a,b){var c,d;c=b.qi(a.a);if(!c){return null}else{d=WD($Nd((!c.b&&(c.b=new SVd((JTd(),FTd),C8,c)),c.b),_Ke));return lhb(aLe,d)?Uee(a,BXd(b.qk())):d}} +function Oje(a,b){var c,d;if(b){if(b==a){return true}c=0;for(d=RD(b,54).Ph();!!d&&d!=b;d=d.Ph()){if(++c>wxe){return Oje(a,d)}if(d==a){return true}}}return false} +function yNb(a){tNb();switch(a.q.g){case 5:vNb(a,(qpd(),Yod));vNb(a,npd);break;case 4:wNb(a,(qpd(),Yod));wNb(a,npd);break;default:xNb(a,(qpd(),Yod));xNb(a,npd);}} +function CNb(a){tNb();switch(a.q.g){case 5:zNb(a,(qpd(),Xod));zNb(a,ppd);break;case 4:ANb(a,(qpd(),Xod));ANb(a,ppd);break;default:BNb(a,(qpd(),Xod));BNb(a,ppd);}} +function RTb(a){var b,c;b=RD(mQb(a,(yVb(),mVb)),17);if(b){c=b.a;c==0?pQb(a,(JVb(),IVb),new Owb):pQb(a,(JVb(),IVb),new Pwb(c))}else{pQb(a,(JVb(),IVb),new Pwb(1))}} +function b2b(a,b){var c;c=a.i;switch(b.g){case 1:return -(a.n.b+a.o.b);case 2:return a.n.a-c.o.a;case 3:return a.n.b-c.o.b;case 4:return -(a.n.a+a.o.a);}return 0} +function wec(a,b){switch(a.g){case 0:return b==(cxc(),$wc)?sec:tec;case 1:return b==(cxc(),$wc)?sec:rec;case 2:return b==(cxc(),$wc)?rec:tec;default:return rec;}} +function Fad(a,b){var c,d,e;Ymb(a.a,b);a.e-=b.r+(a.a.c.length==0?0:a.c);e=fFe;for(d=new Anb(a.a);d.a<d.c.c.length;){c=RD(ynb(d),172);e=$wnd.Math.max(e,c.d)}a.b=e} +function jzd(a,b){var c,d;if(a.Db>>16==3){return a.Cb.Th(a,12,J4,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(pvd(),gvd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} +function sCd(a,b){var c,d;if(a.Db>>16==11){return a.Cb.Th(a,10,J4,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(pvd(),kvd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} +function n4d(a,b){var c,d;if(a.Db>>16==10){return a.Cb.Th(a,11,h7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(JTd(),ATd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} +function Q5d(a,b){var c,d;if(a.Db>>16==10){return a.Cb.Th(a,12,s7,b)}return d=Z5d(RD(vYd((c=RD(Ywd(a,16),29),!c?(JTd(),DTd):c),a.Db>>16),19)),a.Cb.Th(a,d.n,d.f,b)} +function WVd(a){var b;if((a.Bb&1)==0&&!!a.r&&a.r.Vh()){b=RD(a.r,54);a.r=RD(Vvd(a,b),142);a.r!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,9,8,b,a.r))}return a.r} +function pKb(a,b,c){var d;d=cD(WC(iE,1),vxe,28,15,[sKb(a,(ZJb(),WJb),b,c),sKb(a,XJb,b,c),sKb(a,YJb,b,c)]);if(a.f){d[0]=$wnd.Math.max(d[0],d[2]);d[2]=d[0]}return d} +function ddc(a,b){var c,d,e;e=kdc(a,b);if(e.c.length==0){return}_mb(e,new Gdc);c=e.c.length;for(d=0;d<c;d++){_cc(a,(tFb(d,e.c.length),RD(e.c[d],293)),gdc(a,e,d))}} +function Wnc(a){var b,c,d,e;for(e=RD(Qc(a.a,(Bnc(),wnc)),15).Kc();e.Ob();){d=RD(e.Pb(),105);for(c=Ec(d.k).Kc();c.Ob();){b=RD(c.Pb(),64);Qnc(a,d,b,(joc(),hoc),1)}}} +function Yrc(a){var b,c;if(a.k==(r3b(),o3b)){for(c=new is(Mr(W2b(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),18);if(!W0b(b)&&a.c==T0b(b,a).c){return true}}}return false} +function hSc(a){var b,c;if(a.k==(r3b(),o3b)){for(c=new is(Mr(W2b(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),18);if(!W0b(b)&&b.c.i.c==b.d.i.c){return true}}}return false} +function XDd(a,b){var c,d,e,f,g;if(b){e=b.a.length;c=new vue(e);for(g=(c.b-c.a)*c.c<0?(uue(),tue):new Rue(c);g.Ob();){f=RD(g.Pb(),17);d=xDd(b,f.a);!!d&&AEd(a,d)}}} +function bbe(){Tae();var a,b;Xae((lTd(),kTd));Wae(kTd);rBd(kTd);d2d=(JTd(),wTd);for(b=new Anb(Rae);b.a<b.c.c.length;){a=RD(ynb(b),248);o2d(a,wTd,null)}return true} +function uD(a,b){var c,d,e,f,g,h,i,j;i=a.h>>19;j=b.h>>19;if(i!=j){return j-i}e=a.h;h=b.h;if(e!=h){return e-h}d=a.m;g=b.m;if(d!=g){return d-g}c=a.l;f=b.l;return c-f} +function YHb(){YHb=geb;XHb=(iIb(),fIb);WHb=new lGd(Aye,XHb);VHb=(LHb(),KHb);UHb=new lGd(Bye,VHb);THb=(DHb(),CHb);SHb=new lGd(Cye,THb);RHb=new lGd(Dye,(Geb(),true))} +function Iic(a,b,c){var d,e;d=b*c;if(ZD(a.g,154)){e=$jc(a);if(e.f.d){e.f.a||(a.d.a+=d+Tye)}else{a.d.d-=d+Tye;a.d.a+=d+Tye}}else if(ZD(a.g,10)){a.d.d-=d;a.d.a+=2*d}} +function _pc(a,b,c){var d,e,f,g,h;e=a[c.g];for(h=new Anb(b.d);h.a<h.c.c.length;){g=RD(ynb(h),105);f=g.i;if(!!f&&f.i==c){d=g.d[c.g];e[d]=$wnd.Math.max(e[d],f.j.b)}}} +function k9c(a,b){var c,d,e,f,g;d=0;e=0;c=0;for(g=new Anb(b.d);g.a<g.c.c.length;){f=RD(ynb(g),315);gad(f);d=$wnd.Math.max(d,f.b);e+=f.d+(c>0?a.b:0);++c}b.b=d;b.e=e} +function Fo(a){var b,c,d;d=a.b;if(Xp(a.i,d.length)){c=d.length*2;a.b=$C(XF,ewe,303,c,0,1);a.c=$C(XF,ewe,303,c,0,1);a.f=c-1;a.i=0;for(b=a.a;b;b=b.c){Bo(a,b,b)}++a.g}} +function VPb(a,b,c,d){var e,f,g,h;for(e=0;e<b.o;e++){f=e-b.j+c;for(g=0;g<b.p;g++){h=g-b.k+d;PPb(b,e,g)?aQb(a,f,h)||cQb(a,f,h):RPb(b,e,g)&&($Pb(a,f,h)||dQb(a,f,h))}}} +function k_b(a,b){a.b.a=$wnd.Math.min(a.b.a,b.c);a.b.b=$wnd.Math.min(a.b.b,b.d);a.a.a=$wnd.Math.max(a.a.a,b.c);a.a.b=$wnd.Math.max(a.a.b,b.d);return ZEb(a.c,b),true} +function psc(a,b,c){var d;d=b.c.i;if(d.k==(r3b(),o3b)){pQb(a,(Ywc(),vwc),RD(mQb(d,vwc),12));pQb(a,wwc,RD(mQb(d,wwc),12))}else{pQb(a,(Ywc(),vwc),b.c);pQb(a,wwc,c.d)}} +function wid(a,b,c){tid();var d,e,f,g,h,i;g=b/2;f=c/2;d=$wnd.Math.abs(a.a);e=$wnd.Math.abs(a.b);h=1;i=1;d>g&&(h=g/d);e>f&&(i=f/e);ijd(a,$wnd.Math.min(h,i));return a} +function OAd(){qAd();var b,c;try{c=RD(M5d((YSd(),XSd),$He),2113);if(c){return c}}catch(a){a=zdb(a);if(ZD(a,103)){b=a;UId((Hde(),b))}else throw Adb(a)}return new KAd} +function Qae(){qAd();var b,c;try{c=RD(M5d((YSd(),XSd),AKe),2040);if(c){return c}}catch(a){a=zdb(a);if(ZD(a,103)){b=a;UId((Hde(),b))}else throw Adb(a)}return new Mae} +function vne(){Zme();var b,c;try{c=RD(M5d((YSd(),XSd),dLe),2122);if(c){return c}}catch(a){a=zdb(a);if(ZD(a,103)){b=a;UId((Hde(),b))}else throw Adb(a)}return new rne} +function f2d(a,b,c){var d,e;e=a.e;a.e=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,4,e,b);!c?(c=d):c.nj(d)}e!=b&&(b?(c=o2d(a,k2d(a,b),c)):(c=o2d(a,a.a,c)));return c} +function DB(){uB.call(this);this.e=-1;this.a=false;this.p=qwe;this.k=-1;this.c=-1;this.b=-1;this.g=false;this.f=-1;this.j=-1;this.n=-1;this.i=-1;this.d=-1;this.o=qwe} +function hHb(a,b){var c,d,e;d=a.b.d.d;a.a||(d+=a.b.d.a);e=b.b.d.d;b.a||(e+=b.b.d.a);c=Qfb(d,e);if(c==0){if(!a.a&&b.a){return -1}else if(!b.a&&a.a){return 1}}return c} +function XQb(a,b){var c,d,e;d=a.b.b.d;a.a||(d+=a.b.b.a);e=b.b.b.d;b.a||(e+=b.b.b.a);c=Qfb(d,e);if(c==0){if(!a.a&&b.a){return -1}else if(!b.a&&a.a){return 1}}return c} +function RYb(a,b){var c,d,e;d=a.b.g.d;a.a||(d+=a.b.g.a);e=b.b.g.d;b.a||(e+=b.b.g.a);c=Qfb(d,e);if(c==0){if(!a.a&&b.a){return -1}else if(!b.a&&a.a){return 1}}return c} +function _Wb(){_Wb=geb;YWb=nfd(pfd(pfd(pfd(new ufd,(sXb(),qXb),(hcc(),Dbc)),qXb,Hbc),rXb,Obc),rXb,rbc);$Wb=pfd(pfd(new ufd,qXb,hbc),qXb,sbc);ZWb=nfd(new ufd,rXb,ubc)} +function J6b(a){var b,c,d,e,f;b=RD(mQb(a,(Ywc(),cwc)),85);f=a.n;for(d=b.Cc().Kc();d.Ob();){c=RD(d.Pb(),314);e=c.i;e.c+=f.a;e.d+=f.b;c.c?MKb(c):OKb(c)}pQb(a,cwc,null)} +function Wpc(a,b,c){var d,e;e=a.b;d=e.d;switch(b.g){case 1:return -d.d-c;case 2:return e.o.a+d.c+c;case 3:return e.o.b+d.a+c;case 4:return -d.b-c;default:return -1;}} +function CNc(a,b,c){var d,e;c.Ug('Interactive node placement',1);a.a=RD(mQb(b,(Ywc(),Qwc)),312);for(e=new Anb(b.b);e.a<e.c.c.length;){d=RD(ynb(e),30);BNc(a,d)}c.Vg()} +function C5c(a){var b,c,d,e,f;d=0;e=Hze;if(a.b){for(b=0;b<360;b++){c=b*0.017453292519943295;A5c(a,a.d,0,0,dFe,c);f=a.b.Dg(a.d);if(f<e){d=c;e=f}}}A5c(a,a.d,0,0,dFe,d)} +function Oad(a,b){var c,d,e,f;f=new Tsb;b.e=null;b.f=null;for(d=new Anb(b.i);d.a<d.c.c.length;){c=RD(ynb(d),68);e=RD(Wjb(a.g,c.a),42);c.a=Oid(c.b);Zjb(f,c.a,e)}a.g=f} +function Dad(a,b,c){var d,e,f,g,h,i;e=b-a.e;f=e/a.d.c.length;g=0;for(i=new Anb(a.d);i.a<i.c.c.length;){h=RD(ynb(i),315);d=a.b-h.b+c;fad(h,h.e+g*f,h.f);bad(h,f,d);++g}} +function wPd(a){var b;a.f._j();if(a.b!=-1){++a.b;b=a.f.d[a.a];if(a.b<b.i){return}++a.a}for(;a.a<a.f.d.length;++a.a){b=a.f.d[a.a];if(!!b&&b.i!=0){a.b=0;return}}a.b=-1} +function Jde(a,b){var c,d,e;e=b.c.length;c=Lde(a,e==0?'':(tFb(0,b.c.length),WD(b.c[0])));for(d=1;d<e&&!!c;++d){c=RD(c,54).Zh((tFb(d,b.c.length),WD(b.c[d])))}return c} +function RIc(a,b){var c,d;for(d=new Anb(b);d.a<d.c.c.length;){c=RD(ynb(d),10);a.c[c.c.p][c.p].a=Iwb(a.i);a.c[c.c.p][c.p].d=Kfb(a.c[c.c.p][c.p].a);a.c[c.c.p][c.p].b=1}} +function brd(a,b){var c,d,e,f;f=0;for(d=new Anb(a);d.a<d.c.c.length;){c=RD(ynb(d),163);f+=$wnd.Math.pow(urd(c)*trd(c)-b,2)}e=$wnd.Math.sqrt(f/(a.c.length-1));return e} +function uMb(a,b){var c,d,e,f;f=0;for(e=RD(RD(Qc(a.r,b),21),87).Kc();e.Ob();){d=RD(e.Pb(),117);f=$wnd.Math.max(f,d.e.a+d.b.Mf().a)}c=RD(Vrb(a.b,b),127);c.n.b=0;c.a.a=f} +function DNb(a,b){var c,d,e,f;c=0;for(f=RD(RD(Qc(a.r,b),21),87).Kc();f.Ob();){e=RD(f.Pb(),117);c=$wnd.Math.max(c,e.e.b+e.b.Mf().b)}d=RD(Vrb(a.b,b),127);d.n.d=0;d.a.b=c} +function jMc(a,b,c,d){var e,f,g;f=eMc(a,b,c,d);g=kMc(a,f);BMc(a,b,c,d);YLc(a.b);yob();_mb(f,new LMc(a));e=kMc(a,f);BMc(a,c,b,d);YLc(a.b);return new Ptd(sgb(g),sgb(e))} +function udd(a,b){var c;b.Ug('Delaunay triangulation',1);c=new bnb;Umb(a.i,new ydd(c));Heb(TD(mQb(a,(OQb(),MQb))))&&'null10bw';!a.e?(a.e=EFb(c)):ye(a.e,EFb(c));b.Vg()} +function Hsd(a,b,c){var d,e;Nzd(a,a.j+b,a.k+c);for(e=new dMd((!a.a&&(a.a=new XZd(D4,a,5)),a.a));e.e!=e.i.gc();){d=RD(bMd(e),377);Uxd(d,d.a+b,d.b+c)}Gzd(a,a.b+b,a.c+c)} +function Vyd(a,b,c,d){switch(c){case 7:return !a.e&&(a.e=new Yie(G4,a,7,4)),qLd(a.e,b,d);case 8:return !a.d&&(a.d=new Yie(G4,a,8,5)),qLd(a.d,b,d);}return dyd(a,b,c,d)} +function Wyd(a,b,c,d){switch(c){case 7:return !a.e&&(a.e=new Yie(G4,a,7,4)),rLd(a.e,b,d);case 8:return !a.d&&(a.d=new Yie(G4,a,8,5)),rLd(a.d,b,d);}return eyd(a,b,c,d)} +function LDd(a,b,c){var d,e,f,g,h;if(c){f=c.a.length;d=new vue(f);for(h=(d.b-d.a)*d.c<0?(uue(),tue):new Rue(d);h.Ob();){g=RD(h.Pb(),17);e=xDd(c,g.a);!!e&&DEd(a,e,b)}}} +function fOd(a,b,c){var d,e,f,g,h;a._j();f=b==null?0:tb(b);if(a.f>0){g=(f&lve)%a.d.length;e=WNd(a,g,f,b);if(e){h=e.nd(c);return h}}d=a.ck(f,b,c);a.c.Fc(d);return null} +function Tee(a,b){var c,d,e,f;switch(Oee(a,b).Kl()){case 3:case 2:{c=mYd(b);for(e=0,f=c.i;e<f;++e){d=RD(QHd(c,e),35);if(yfe(Qee(a,d))==5){return d}}break}}return null} +function gt(a){var b,c,d,e,f;if(Xp(a.f,a.b.length)){d=$C(UG,ewe,227,a.b.length*2,0,1);a.b=d;e=d.length-1;for(c=a.a;c!=a;c=c._d()){f=RD(c,227);b=f.d&e;f.a=d[b];d[b]=f}}} +function gSc(a){var b,c;c=RD(mQb(a,(Ywc(),kwc)),21);b=vfd(ZRc);c.Hc((ovc(),lvc))&&ofd(b,aSc);c.Hc(nvc)&&ofd(b,cSc);c.Hc(evc)&&ofd(b,$Rc);c.Hc(gvc)&&ofd(b,_Rc);return b} +function Bid(a){if(a<0){throw Adb(new agb('The input must be positive'))}else return a<sid.length?Xdb(sid[a]):$wnd.Math.sqrt(dFe*a)*(Jid(a,a)/Iid(2.718281828459045,a))} +function PHd(a,b){var c;if(a.Yi()&&b!=null){for(c=0;c<a.i;++c){if(pb(b,a.g[c])){return true}}}else{for(c=0;c<a.i;++c){if(dE(a.g[c])===dE(b)){return true}}}return false} +function Br(a,b){if(b==null){while(a.a.Ob()){if(RD(a.a.Pb(),44).md()==null){return true}}}else{while(a.a.Ob()){if(pb(b,RD(a.a.Pb(),44).md())){return true}}}return false} +function Qy(a,b){var c,d,e;if(b===a){return true}else if(ZD(b,678)){e=RD(b,2046);return Ue((d=a.g,!d?(a.g=new Di(a)):d),(c=e.g,!c?(e.g=new Di(e)):c))}else{return false}} +function hA(a){var b,c,d,e;b='gA';c='vz';e=$wnd.Math.min(a.length,5);for(d=e-1;d>=0;d--){if(lhb(a[d].d,b)||lhb(a[d].d,c)){a.length>=d+1&&a.splice(0,d+1);break}}return a} +function Fdb(a,b){var c;if(Kdb(a)&&Kdb(b)){c=a/b;if(jxe<c&&c<hxe){return c<0?$wnd.Math.ceil(c):$wnd.Math.floor(c)}}return Edb(iD(Kdb(a)?Wdb(a):a,Kdb(b)?Wdb(b):b,false))} +function T0b(a,b){if(b==a.c.i){return a.d.i}else if(b==a.d.i){return a.c.i}else{throw Adb(new agb("'node' must either be the source node or target node of the edge."))}} +function M5b(a){var b,c,d,e;e=RD(mQb(a,(Ywc(),Zvc)),36);if(e){d=new pjd;b=Y2b(a.c.i);while(b!=e){c=b.e;b=Y2b(c);Zid($id($id(d,c.n),b.c),b.d.b,b.d.d)}return d}return G5b} +function phc(a){var b;b=RD(mQb(a,(Ywc(),Pwc)),337);FDb(EDb(new SDb(null,new Swb(b.d,16)),new Chc),new Ehc(a));FDb(CDb(new SDb(null,new Swb(b.d,16)),new Ghc),new Ihc(a))} +function Zrc(a,b){var c,d,e,f;e=b?a3b(a):Z2b(a);for(d=new is(Mr(e.a.Kc(),new ir));gs(d);){c=RD(hs(d),18);f=T0b(c,a);if(f.k==(r3b(),o3b)&&f.c!=a.c){return f}}return null} +function fIc(a){var b,c,d;for(c=new Anb(a.p);c.a<c.c.c.length;){b=RD(ynb(c),10);if(b.k!=(r3b(),p3b)){continue}d=b.o.b;a.i=$wnd.Math.min(a.i,d);a.g=$wnd.Math.max(a.g,d)}} +function OIc(a,b,c){var d,e,f;for(f=new Anb(b);f.a<f.c.c.length;){d=RD(ynb(f),10);a.c[d.c.p][d.p].e=false}for(e=new Anb(b);e.a<e.c.c.length;){d=RD(ynb(e),10);NIc(a,d,c)}} +function uTc(a,b,c){var d,e;d=VTc(b.j,c.s,c.c)+VTc(c.e,b.s,b.c);e=VTc(c.j,b.s,b.c)+VTc(b.e,c.s,c.c);if(d==e){if(d>0){a.b+=2;a.a+=d}}else{a.b+=1;a.a+=$wnd.Math.min(d,e)}} +function CVc(a){var b;b=RD(mQb(RD(ju(a.b,0),40),(h_c(),T$c)),107);pQb(a,(q$c(),SZc),new rjd(0,0));FVc(new YWc,a,b.b+b.c-Kfb(UD(mQb(a,ZZc))),b.d+b.a-Kfb(UD(mQb(a,_Zc))))} +function pDd(a,b){var c,d;d=false;if(bE(b)){d=true;oDd(a,new OC(WD(b)))}if(!d){if(ZD(b,242)){d=true;oDd(a,(c=Qeb(RD(b,242)),new hC(c)))}}if(!d){throw Adb(new Aeb(tIe))}} +function g$d(a,b,c,d){var e,f,g;e=new P3d(a.e,1,10,(g=b.c,ZD(g,90)?RD(g,29):(JTd(),zTd)),(f=c.c,ZD(f,90)?RD(f,29):(JTd(),zTd)),fZd(a,b),false);!d?(d=e):d.nj(e);return d} +function _2b(a){var b,c;switch(RD(mQb(Y2b(a),(yCc(),QAc)),429).g){case 0:b=a.n;c=a.o;return new rjd(b.a+c.a/2,b.b+c.b/2);case 1:return new sjd(a.n);default:return null;}} +function Ouc(){Ouc=geb;Luc=new Puc(LAe,0);Kuc=new Puc('LEFTUP',1);Nuc=new Puc('RIGHTUP',2);Juc=new Puc('LEFTDOWN',3);Muc=new Puc('RIGHTDOWN',4);Iuc=new Puc('BALANCED',5)} +function dKc(a,b,c){var d,e,f;d=Qfb(a.a[b.p],a.a[c.p]);if(d==0){e=RD(mQb(b,(Ywc(),qwc)),15);f=RD(mQb(c,qwc),15);if(e.Hc(c)){return -1}else if(f.Hc(b)){return 1}}return d} +function k5c(a){switch(a.g){case 1:return new K3c;case 2:return new M3c;case 3:return new I3c;case 0:return null;default:throw Adb(new agb(mFe+(a.f!=null?a.f:''+a.g)));}} +function gyd(a,b,c){switch(b){case 1:!a.n&&(a.n=new C5d(I4,a,1,7));sLd(a.n);!a.n&&(a.n=new C5d(I4,a,1,7));YGd(a.n,RD(c,16));return;case 2:jyd(a,WD(c));return;}Dxd(a,b,c)} +function xyd(a,b,c){switch(b){case 3:Ayd(a,Kfb(UD(c)));return;case 4:Cyd(a,Kfb(UD(c)));return;case 5:Dyd(a,Kfb(UD(c)));return;case 6:Eyd(a,Kfb(UD(c)));return;}gyd(a,b,c)} +function dBd(a,b,c){var d,e,f;f=(d=new R5d,d);e=XVd(f,b,null);!!e&&e.oj();PAd(f,c);WGd((!a.c&&(a.c=new C5d(u7,a,12,10)),a.c),f);$Vd(f,0);bWd(f,1);aWd(f,true);_Vd(f,true)} +function M5d(a,b){var c,d,e;c=Ktb(a.i,b);if(ZD(c,241)){e=RD(c,241);e.zi()==null&&undefined;return e.wi()}else if(ZD(c,507)){d=RD(c,2037);e=d.b;return e}else{return null}} +function aj(a,b,c,d){var e,f;Qb(b);Qb(c);f=RD(Fn(a.d,b),17);Ob(!!f,'Row %s not in %s',b,a.e);e=RD(Fn(a.b,c),17);Ob(!!e,'Column %s not in %s',c,a.c);return cj(a,f.a,e.a,d)} +function ZC(a,b,c,d,e,f,g){var h,i,j,k,l;k=e[f];j=f==g-1;h=j?d:0;l=_C(h,k);d!=10&&cD(WC(a,g-f),b[f],c[f],h,l);if(!j){++f;for(i=0;i<k;++i){l[i]=ZC(a,b,c,d,e,f,g)}}return l} +function cMd(b){if(b.g==-1){throw Adb(new cgb)}b.Xj();try{b.i.gd(b.g);b.f=b.i.j;b.g<b.e&&--b.e;b.g=-1}catch(a){a=zdb(a);if(ZD(a,77)){throw Adb(new Jrb)}else throw Adb(a)}} +function v0b(a){var b,c,d,e;e=-1;d=0;for(c=new Anb(a);c.a<c.c.c.length;){b=RD(ynb(c),249);if(b.c==(BEc(),yEc)){e=d==0?0:d-1;break}else d==a.c.length-1&&(e=d);d+=1}return e} +function $9c(a){var b,c,d,e;e=0;b=0;for(d=new Anb(a.c);d.a<d.c.c.length;){c=RD(ynb(d),27);Dyd(c,a.e+e);Eyd(c,a.f);e+=c.g+a.b;b=$wnd.Math.max(b,c.f+a.b)}a.d=e-a.b;a.a=b-a.b} +function UGb(a){var b,c,d;for(c=new Anb(a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),60);d=b.d.c;b.d.c=b.d.d;b.d.d=d;d=b.d.b;b.d.b=b.d.a;b.d.a=d;d=b.b.a;b.b.a=b.b.b;b.b.b=d}IGb(a)} +function DYb(a){var b,c,d;for(c=new Anb(a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),86);d=b.g.c;b.g.c=b.g.d;b.g.d=d;d=b.g.b;b.g.b=b.g.a;b.g.a=d;d=b.e.a;b.e.a=b.e.b;b.e.b=d}uYb(a)} +function pqc(a){var b,c,d,e,f;f=Ec(a.k);for(c=(qpd(),cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])),d=0,e=c.length;d<e;++d){b=c[d];if(b!=opd&&!f.Hc(b)){return b}}return null} +function drc(a,b){var c,d;d=RD(Nvb(DDb(CDb(new SDb(null,new Swb(b.j,16)),new lrc))),12);if(d){c=RD(Vmb(d.e,0),18);if(c){return RD(mQb(c,(Ywc(),zwc)),17).a}}return mDc(a.b)} +function FGc(a,b){var c,d,e,f;for(f=new Anb(b.a);f.a<f.c.c.length;){e=RD(ynb(f),10);Nnb(a.d);for(d=new is(Mr(a3b(e).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);CGc(a,e,c.d.i)}}} +function T9c(a,b){var c,d;Ymb(a.b,b);for(d=new Anb(a.n);d.a<d.c.c.length;){c=RD(ynb(d),209);if(Wmb(c.c,b,0)!=-1){Ymb(c.c,b);$9c(c);c.c.c.length==0&&Ymb(a.n,c);break}}N9c(a)} +function ead(a,b){var c,d,e,f,g;g=a.f;e=0;f=0;for(d=new Anb(a.a);d.a<d.c.c.length;){c=RD(ynb(d),172);U9c(c,a.e,g);Q9c(c,b);f=$wnd.Math.max(f,c.r);g+=c.d+a.c;e=g}a.d=f;a.b=e} +function R2c(a){var b,c;c=yGd(a);if(gr(c)){return null}else{b=(Qb(c),RD(Er(new is(Mr(c.a.Kc(),new ir))),74));return AGd(RD(QHd((!b.b&&(b.b=new Yie(E4,b,4,7)),b.b),0),84))}} +function vWd(a){var b;if(!a.o){b=a.uk();b?(a.o=new D9d(a,a,null)):a.al()?(a.o=new U6d(a,null)):yfe(Qee((lke(),jke),a))==1?(a.o=new N9d(a)):(a.o=new S9d(a,null))}return a.o} +function Vje(a,b,c,d){var e,f,g,h,i;if(c.Xh(b)){e=(g=b,!g?null:RD(d,54).gi(g));if(e){i=c.Mh(b);h=b.t;if(h>1||h==-1){f=RD(i,15);e.Wb(Sje(a,f))}else{e.Wb(Rje(a,RD(i,58)))}}}} +function ceb(b,c,d,e){beb();var f=_db;$moduleName=c;$moduleBase=d;ydb=e;function g(){for(var a=0;a<f.length;a++){f[a]()}} +if(b){try{fve(g)()}catch(a){b(c,a)}}else{fve(g)()}} +function a6b(a,b){var c,d,e,f;for(e=(f=(new Xkb(a.b)).a.vc().Kc(),new blb(f));e.a.Ob();){d=(c=RD(e.a.Pb(),44),RD(c.ld(),34));if(egb(b,RD(d,17))<0){return false}}return true} +function b6b(a,b){var c,d,e,f;for(e=(f=(new Xkb(a.b)).a.vc().Kc(),new blb(f));e.a.Ob();){d=(c=RD(e.a.Pb(),44),RD(c.ld(),34));if(egb(b,RD(d,17))>0){return false}}return true} +function okc(a){var b,c,d,e,f;for(d=new vkb((new mkb(a.b)).a);d.b;){c=tkb(d);b=RD(c.ld(),10);f=RD(RD(c.md(),42).a,10);e=RD(RD(c.md(),42).b,8);$id(hjd(b.n),$id(ajd(f.n),e))}} +function Roc(a){switch(RD(mQb(a.b,(yCc(),BAc)),387).g){case 1:FDb(GDb(EDb(new SDb(null,new Swb(a.d,16)),new kpc),new mpc),new opc);break;case 2:Toc(a);break;case 0:Soc(a);}} +function SVc(a,b,c){var d,e,f;d=c;!d&&(d=new Oqd);d.Ug('Layout',a.a.c.length);for(f=new Anb(a.a);f.a<f.c.c.length;){e=RD(ynb(f),47);if(d.$g()){return}e.Kf(b,d.eh(1))}d.Vg()} +function ukd(){ukd=geb;tkd=new vkd('V_TOP',0);skd=new vkd('V_CENTER',1);rkd=new vkd('V_BOTTOM',2);pkd=new vkd('H_LEFT',3);okd=new vkd('H_CENTER',4);qkd=new vkd('H_RIGHT',5)} +function GYd(a){var b;if((a.Db&64)!=0)return MXd(a);b=new Shb(MXd(a));b.a+=' (abstract: ';Ohb(b,(a.Bb&256)!=0);b.a+=', interface: ';Ohb(b,(a.Bb&512)!=0);b.a+=')';return b.a} +function Bz(a){var b;if(a.c==null){b=dE(a.b)===dE(zz)?null:a.b;a.d=b==null?vve:aE(b)?Ez(VD(b)):bE(b)?uwe:nfb(rb(b));a.a=a.a+': '+(aE(b)?Dz(VD(b)):b+'');a.c='('+a.d+') '+a.a}} +function Gtb(){function b(){try{return (new Map).entries().next().done}catch(a){return false}} +if(typeof Map===kve&&Map.prototype.entries&&b()){return Map}else{return Htb()}} +function tUc(a,b){var c,d,e,f;f=new Jkb(a.e,0);c=0;while(f.b<f.d.gc()){d=Kfb((sFb(f.b<f.d.gc()),UD(f.d.Xb(f.c=f.b++))));e=d-b;if(e>AEe){return c}else e>-1.0E-6&&++c}return c} +function n2d(a,b){var c;if(b!=a.b){c=null;!!a.b&&(c=Jvd(a.b,a,-4,c));!!b&&(c=Ivd(b,a,-4,c));c=e2d(a,b,c);!!c&&c.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,3,b,b))} +function q2d(a,b){var c;if(b!=a.f){c=null;!!a.f&&(c=Jvd(a.f,a,-1,c));!!b&&(c=Ivd(b,a,-1,c));c=g2d(a,b,c);!!c&&c.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,0,b,b))} +function Lge(a,b,c,d){var e,f,g,h;if(Mvd(a.e)){e=b.Lk();h=b.md();f=c.md();g=fge(a,1,e,h,f,e.Jk()?kge(a,e,f,ZD(e,102)&&(RD(e,19).Bb&txe)!=0):-1,true);d?d.nj(g):(d=g)}return d} +function bne(a){var b,c,d;if(a==null)return null;c=RD(a,15);if(c.dc())return '';d=new Qhb;for(b=c.Kc();b.Ob();){Nhb(d,(nme(),WD(b.Pb())));d.a+=' '}return qeb(d,d.a.length-1)} +function fne(a){var b,c,d;if(a==null)return null;c=RD(a,15);if(c.dc())return '';d=new Qhb;for(b=c.Kc();b.Ob();){Nhb(d,(nme(),WD(b.Pb())));d.a+=' '}return qeb(d,d.a.length-1)} +function QIc(a,b,c){var d,e;d=a.c[b.c.p][b.p];e=a.c[c.c.p][c.p];if(d.a!=null&&e.a!=null){return Jfb(d.a,e.a)}else if(d.a!=null){return -1}else if(e.a!=null){return 1}return 0} +function RVc(a,b,c){c.Ug('Tree layout',1);Sed(a.b);Ved(a.b,(YVc(),UVc),UVc);Ved(a.b,VVc,VVc);Ved(a.b,WVc,WVc);Ved(a.b,XVc,XVc);a.a=Qed(a.b,b);SVc(a,b,c.eh(1));c.Vg();return b} +function ZDd(a,b){var c,d,e,f,g,h;if(b){f=b.a.length;c=new vue(f);for(h=(c.b-c.a)*c.c<0?(uue(),tue):new Rue(c);h.Ob();){g=RD(h.Pb(),17);e=xDd(b,g.a);d=new aFd(a);$Dd(d.a,e)}}} +function oEd(a,b){var c,d,e,f,g,h;if(b){f=b.a.length;c=new vue(f);for(h=(c.b-c.a)*c.c<0?(uue(),tue):new Rue(c);h.Ob();){g=RD(h.Pb(),17);e=xDd(b,g.a);d=new LEd(a);NDd(d.a,e)}}} +function ESd(b){var c;if(b!=null&&b.length>0&&ihb(b,b.length-1)==33){try{c=nSd(zhb(b,0,b.length-1));return c.e==null}catch(a){a=zdb(a);if(!ZD(a,33))throw Adb(a)}}return false} +function u0b(a,b,c){var d,e,f;d=Y2b(b);e=i2b(d);f=new R3b;P3b(f,b);switch(c.g){case 1:Q3b(f,spd(vpd(e)));break;case 2:Q3b(f,vpd(e));}pQb(f,(yCc(),ABc),UD(mQb(a,ABc)));return f} +function jdc(a){var b,c;b=RD(hs(new is(Mr(Z2b(a.a).a.Kc(),new ir))),18);c=RD(hs(new is(Mr(a3b(a.a).a.Kc(),new ir))),18);return Heb(TD(mQb(b,(Ywc(),Nwc))))||Heb(TD(mQb(c,Nwc)))} +function Bnc(){Bnc=geb;xnc=new Cnc('ONE_SIDE',0);znc=new Cnc('TWO_SIDES_CORNER',1);Anc=new Cnc('TWO_SIDES_OPPOSING',2);ync=new Cnc('THREE_SIDES',3);wnc=new Cnc('FOUR_SIDES',4)} +function Usc(a,b){var c,d,e,f;f=new bnb;e=0;d=b.Kc();while(d.Ob()){c=sgb(RD(d.Pb(),17).a+e);while(c.a<a.f&&!wsc(a,c.a)){c=sgb(c.a+1);++e}if(c.a>=a.f){break}ZEb(f.c,c)}return f} +function iIc(a,b){var c,d,e,f,g;for(f=new Anb(b.a);f.a<f.c.c.length;){e=RD(ynb(f),10);for(d=new is(Mr(Z2b(e).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);g=c.c.i.p;a.n[g]=a.n[g]-1}}} +function fOc(a){var b,c;for(c=new Anb(a.e.b);c.a<c.c.c.length;){b=RD(ynb(c),30);wOc(a,b)}FDb(CDb(EDb(EDb(new SDb(null,new Swb(a.e.b,16)),new wPc),new TPc),new VPc),new XPc(a))} +function oKd(a,b){if(!b){return false}else{if(a.mj(b)){return false}if(!a.i){if(ZD(b,152)){a.i=RD(b,152);return true}else{a.i=new fLd;return a.i.nj(b)}}else{return a.i.nj(b)}}} +function Hge(a,b,c){var d,e,f;d=b.Lk();f=b.md();e=d.Jk()?fge(a,3,d,null,f,kge(a,d,f,ZD(d,102)&&(RD(d,19).Bb&txe)!=0),true):fge(a,1,d,d.ik(),f,-1,true);c?c.nj(e):(c=e);return c} +function $me(a){a=nue(a,true);if(lhb(FGe,a)||lhb('1',a)){return Geb(),Feb}else if(lhb(GGe,a)||lhb('0',a)){return Geb(),Eeb}throw Adb(new Mle("Invalid boolean value: '"+a+"'"))} +function Kd(a,b,c){var d,e,f;for(e=a.vc().Kc();e.Ob();){d=RD(e.Pb(),44);f=d.ld();if(dE(b)===dE(f)||b!=null&&pb(b,f)){if(c){d=new xlb(d.ld(),d.md());e.Qb()}return d}}return null} +function WMb(a){RMb();var b,c,d;if(!a.B.Hc((dqd(),Xpd))){return}d=a.f.i;b=new Vid(a.a.c);c=new z3b;c.b=b.c-d.c;c.d=b.d-d.d;c.c=d.c+d.b-(b.c+b.b);c.a=d.d+d.a-(b.d+b.a);a.e.$f(c)} +function CQb(a,b,c,d){var e,f,g;g=$wnd.Math.min(c,FQb(RD(a.b,68),b,c,d));for(f=new Anb(a.a);f.a<f.c.c.length;){e=RD(ynb(f),225);e!=b&&(g=$wnd.Math.min(g,CQb(e,b,g,d)))}return g} +function c1b(a){var b,c,d,e;e=$C(jR,Nve,199,a.b.c.length,0,2);d=new Jkb(a.b,0);while(d.b<d.d.gc()){b=(sFb(d.b<d.d.gc()),RD(d.d.Xb(d.c=d.b++),30));c=d.b-1;e[c]=t2b(b.a)}return e} +function c6b(a,b,c){var d,e,f;d=RD(cub(a.a,c),34);if(d!=null){f=RD(cub(a.b,d),67);ze(f,c,true)}e=RD(cub(a.b,b),67);if(!e){e=new Yub;dub(a.b,b,e)}Pub(e,c,e.c.b,e.c);dub(a.a,c,b)} +function _6b(a,b,c,d,e){var f,g,h,i;g=XNb(WNb(_Nb(Y6b(c)),d),T6b(a,c,e));for(i=e3b(a,c).Kc();i.Ob();){h=RD(i.Pb(),12);if(b[h.p]){f=b[h.p].i;Rmb(g.d,new sOb(f,UNb(g,f)))}}VNb(g)} +function Ylc(a,b){this.f=new Tsb;this.b=new Tsb;this.j=new Tsb;this.a=a;this.c=b;this.c>0&&Xlc(this,this.c-1,(qpd(),Xod));this.c<this.a.length-1&&Xlc(this,this.c+1,(qpd(),ppd))} +function Iqc(a,b){var c,d,e,f,g;for(f=new Anb(b.d);f.a<f.c.c.length;){e=RD(ynb(f),105);g=RD(Wjb(a.c,e),118).o;for(d=new Osb(e.b);d.a<d.c.a.length;){c=RD(Nsb(d),64);Umc(e,c,g)}}} +function qJc(a){a.length>0&&a[0].length>0&&(this.c=Heb(TD(mQb(Y2b(a[0][0]),(Ywc(),rwc)))));this.a=$C(aY,Nve,2117,a.length,0,2);this.b=$C(dY,Nve,2118,a.length,0,2);this.d=new Ks} +function TOc(a){if(a.c.length==0){return false}if((tFb(0,a.c.length),RD(a.c[0],18)).c.i.k==(r3b(),o3b)){return true}return yDb(GDb(new SDb(null,new Swb(a,16)),new WOc),new YOc)} +function I5c(a,b){var c,d,e,f,g,h,i;h=Q2c(b);f=b.f;i=b.g;g=$wnd.Math.sqrt(f*f+i*i);e=0;for(d=new Anb(h);d.a<d.c.c.length;){c=RD(ynb(d),27);e+=I5c(a,c)}return $wnd.Math.max(e,g)} +function Bod(){Bod=geb;Aod=new Eod(Sye,0);zod=new Eod('FREE',1);yod=new Eod('FIXED_SIDE',2);vod=new Eod('FIXED_ORDER',3);xod=new Eod('FIXED_RATIO',4);wod=new Eod('FIXED_POS',5)} +function Cee(a,b){var c,d,e;c=b.qi(a.a);if(c){e=WD($Nd((!c.b&&(c.b=new SVd((JTd(),FTd),C8,c)),c.b),bLe));for(d=1;d<(lke(),kke).length;++d){if(lhb(kke[d],e)){return d}}}return 0} +function aob(a){var b,c,d,e,f;if(a==null){return vve}f=new Jyb(pve,'[',']');for(c=a,d=0,e=c.length;d<e;++d){b=c[d];Gyb(f,''+b)}return !f.a?f.c:f.e.length==0?f.a.a:f.a.a+(''+f.e)} +function gob(a){var b,c,d,e,f;if(a==null){return vve}f=new Jyb(pve,'[',']');for(c=a,d=0,e=c.length;d<e;++d){b=c[d];Gyb(f,''+b)}return !f.a?f.c:f.e.length==0?f.a.a:f.a.a+(''+f.e)} +function Md(a){var b,c,d;d=new Jyb(pve,'{','}');for(c=a.vc().Kc();c.Ob();){b=RD(c.Pb(),44);Gyb(d,Nd(a,b.ld())+'='+Nd(a,b.md()))}return !d.a?d.c:d.e.length==0?d.a.a:d.a.a+(''+d.e)} +function vJb(a){var b,c,d,e;while(!nmb(a.o)){c=RD(smb(a.o),42);d=RD(c.a,125);b=RD(c.b,218);e=oIb(b,d);if(b.e==d){EIb(e.g,b);d.e=e.e+b.a}else{EIb(e.b,b);d.e=e.e-b.a}Rmb(a.e.a,d)}} +function W9b(a,b){var c,d,e;c=null;for(e=RD(b.Kb(a),20).Kc();e.Ob();){d=RD(e.Pb(),18);if(!c){c=d.c.i==a?d.d.i:d.c.i}else{if((d.c.i==a?d.d.i:d.c.i)!=c){return false}}}return true} +function UTc(a,b){var c,d,e,f,g;c=uSc(a,false,b);for(e=new Anb(c);e.a<e.c.c.length;){d=RD(ynb(e),132);d.d==0?(_Sc(d,null),aTc(d,null)):(f=d.a,g=d.b,_Sc(d,g),aTc(d,f),undefined)}} +function QUc(a){var b,c;b=new ufd;ofd(b,CUc);c=RD(mQb(a,(Ywc(),kwc)),21);c.Hc((ovc(),nvc))&&ofd(b,GUc);c.Hc(evc)&&ofd(b,DUc);c.Hc(lvc)&&ofd(b,FUc);c.Hc(gvc)&&ofd(b,EUc);return b} +function iz(a,b,c){var d,e,f,g,h;String.fromCharCode(10);jz(a);for(e=(a.k==null&&(a.k=$C(rJ,Nve,82,0,0,1)),a.k),f=0,g=e.length;f<g;++f){d=e[f];iz(d,b,'\t'+c)}h=a.f;!!h&&iz(h,b,c)} +function kec(a){var b,c,d,e;jec(a);for(c=new is(Mr(W2b(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),18);d=b.c.i==a;e=d?b.d:b.c;d?Z0b(b,null):Y0b(b,null);pQb(b,(Ywc(),Ewc),e);oec(a,e.i)}} +function aqc(a,b,c,d){var e,f;f=b.i;e=c[f.g][a.d[f.g]];switch(f.g){case 1:e-=d+b.j.b;b.g.b=e;break;case 3:e+=d;b.g.b=e;break;case 4:e-=d+b.j.a;b.g.a=e;break;case 2:e+=d;b.g.a=e;}} +function K2c(a){var b,c,d;for(c=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));c.e!=c.i.gc();){b=RD(bMd(c),27);d=yGd(b);if(!gs(new is(Mr(d.a.Kc(),new ir)))){return b}}return null} +function g3c(){g3c=geb;e3c=new h3c('OVERLAP_REMOVAL',0);b3c=new h3c(iFe,1);f3c=new h3c('ROTATION',2);c3c=new h3c('GRAPH_SIZE_CALCULATION',3);d3c=new h3c('OUTGOING_EDGE_ANGLES',4)} +function aCd(){var a;if(YBd)return RD(N5d((YSd(),XSd),$He),2115);a=RD(ZD(Xjb((YSd(),XSd),$He),569)?Xjb(XSd,$He):new _Bd,569);YBd=true;ZBd(a);$Bd(a);rBd(a);$jb(XSd,$He,a);return a} +function Tge(a,b,c){var d,e;if(a.j==0)return c;e=RD(jZd(a,b,c),76);d=c.Lk();if(!d.rk()||!a.a.am(d)){throw Adb(new yz("Invalid entry feature '"+d.qk().zb+'.'+d.xe()+"'"))}return e} +function Yi(a,b){var c,d,e,f,g,h,i,j;for(h=a.a,i=0,j=h.length;i<j;++i){g=h[i];for(d=g,e=0,f=d.length;e<f;++e){c=d[e];if(dE(b)===dE(c)||b!=null&&pb(b,c)){return true}}}return false} +function yjb(a){var b,c,d;if(Ddb(a,0)>=0){c=Fdb(a,ixe);d=Mdb(a,ixe)}else{b=Udb(a,1);c=Fdb(b,500000000);d=Mdb(b,500000000);d=Bdb(Sdb(d,1),Cdb(a,1))}return Rdb(Sdb(d,32),Cdb(c,yxe))} +function fTb(a,b,c){var d,e;d=(sFb(b.b!=0),RD(Wub(b,b.a.a),8));switch(c.g){case 0:d.b=0;break;case 2:d.b=a.f;break;case 3:d.a=0;break;default:d.a=a.g;}e=Sub(b,0);cvb(e,d);return b} +function Vpc(a,b,c,d){var e,f,g,h,i;i=a.b;f=b.d;g=f.j;h=$pc(g,i.d[g.g],c);e=$id(ajd(f.n),f.a);switch(f.j.g){case 1:case 3:h.a+=e.a;break;case 2:case 4:h.b+=e.b;}Pub(d,h,d.c.b,d.c)} +function YNc(a,b,c){var d,e,f,g;g=Wmb(a.e,b,0);f=new ZNc;f.b=c;d=new Jkb(a.e,g);while(d.b<d.d.gc()){e=(sFb(d.b<d.d.gc()),RD(d.d.Xb(d.c=d.b++),10));e.p=c;Rmb(f.e,e);Ckb(d)}return f} +function l8c(a,b,c,d){var e,f,g,h,i;e=null;f=0;for(h=new Anb(b);h.a<h.c.c.length;){g=RD(ynb(h),27);i=g.i+g.g;if(a<g.j+g.f+d){!e?(e=g):c.i-i<c.i-f&&(e=g);f=e.i+e.g}}return !e?0:f+d} +function m8c(a,b,c,d){var e,f,g,h,i;f=null;e=0;for(h=new Anb(b);h.a<h.c.c.length;){g=RD(ynb(h),27);i=g.j+g.f;if(a<g.i+g.g+d){!f?(f=g):c.j-i<c.j-e&&(f=g);e=f.j+f.f}}return !f?0:e+d} +function CA(a){var b,c,d;b=false;d=a.b.c.length;for(c=0;c<d;c++){if(DA(RD(Vmb(a.b,c),443))){if(!b&&c+1<d&&DA(RD(Vmb(a.b,c+1),443))){b=true;RD(Vmb(a.b,c),443).a=true}}else{b=false}}} +function Ijb(a,b,c,d,e){var f,g;f=0;for(g=0;g<e;g++){f=Bdb(f,Vdb(Cdb(b[g],yxe),Cdb(d[g],yxe)));a[g]=Ydb(f);f=Tdb(f,32)}for(;g<c;g++){f=Bdb(f,Cdb(b[g],yxe));a[g]=Ydb(f);f=Tdb(f,32)}} +function Rjb(a,b){Ljb();var c,d;d=(Pib(),Kib);c=a;for(;b>1;b>>=1){(b&1)!=0&&(d=Wib(d,c));c.d==1?(c=Wib(c,c)):(c=new djb(Tjb(c.a,c.d,$C(kE,Pwe,28,c.d<<1,15,1))))}d=Wib(d,c);return d} +function Hwb(){Hwb=geb;var a,b,c,d;Ewb=$C(iE,vxe,28,25,15,1);Fwb=$C(iE,vxe,28,33,15,1);d=1.52587890625E-5;for(b=32;b>=0;b--){Fwb[b]=d;d*=0.5}c=1;for(a=24;a>=0;a--){Ewb[a]=c;c*=0.5}} +function a5b(a){var b,c;if(Heb(TD(Gxd(a,(yCc(),NAc))))){for(c=new is(Mr(zGd(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),74);if(ozd(b)){if(Heb(TD(Gxd(b,OAc)))){return true}}}}return false} +function Qmc(a,b){var c,d,e;if(Ysb(a.f,b)){b.b=a;d=b.c;Wmb(a.j,d,0)!=-1||Rmb(a.j,d);e=b.d;Wmb(a.j,e,0)!=-1||Rmb(a.j,e);c=b.a.b;if(c.c.length!=0){!a.i&&(a.i=new _mc(a));Wmc(a.i,c)}}} +function Xpc(a){var b,c,d,e,f;c=a.c.d;d=c.j;e=a.d.d;f=e.j;if(d==f){return c.p<e.p?0:1}else if(tpd(d)==f){return 0}else if(rpd(d)==f){return 1}else{b=a.b;return Csb(b.b,tpd(d))?0:1}} +function Pfd(a){var b;this.d=new Tsb;this.c=a.c;this.e=a.d;this.b=a.b;this.f=new ntd(a.e);this.a=a.a;!a.f?(this.g=(b=RD(mfb(T5),9),new Fsb(b,RD(WEb(b,b.length),9),0))):(this.g=a.f)} +function GEd(a,b){var c,d,e,f,g,h;e=a;g=yDd(e,'layoutOptions');!g&&(g=yDd(e,cIe));if(g){h=g;d=null;!!h&&(d=(f=oC(h,$C(qJ,Nve,2,0,6,1)),new CC(h,f)));if(d){c=new bFd(h,b);xgb(d,c)}}} +function AGd(a){if(ZD(a,207)){return RD(a,27)}else if(ZD(a,193)){return MCd(RD(a,123))}else if(!a){throw Adb(new Ogb(HIe))}else{throw Adb(new kib('Only support nodes and ports.'))}} +function SA(a,b,c,d){if(b>=0&&lhb(a.substr(b,'GMT'.length),'GMT')){c[0]=b+3;return JA(a,c,d)}if(b>=0&&lhb(a.substr(b,'UTC'.length),'UTC')){c[0]=b+3;return JA(a,c,d)}return JA(a,c,d)} +function Zmc(a,b){var c,d,e,f,g;f=a.g.a;g=a.g.b;for(d=new Anb(a.d);d.a<d.c.c.length;){c=RD(ynb(d),72);e=c.n;e.a=f;a.i==(qpd(),Yod)?(e.b=g+a.j.b-c.o.b):(e.b=g);$id(e,b);f+=c.o.a+a.e}} +function Fqd(a,b,c){if(a.b){throw Adb(new dgb('The task is already done.'))}else if(a.p!=null){return false}else{a.p=b;a.r=c;a.k&&(a.o=(gib(),Ndb(Hdb(Date.now()),Awe)));return true}} +function HFd(a){var b,c,d,e,f,g,h;h=new uC;c=a.Pg();e=c!=null;e&&sDd(h,uIe,a.Pg());d=a.xe();f=d!=null;f&&sDd(h,GIe,a.xe());b=a.Og();g=b!=null;g&&sDd(h,'description',a.Og());return h} +function UVd(a,b,c){var d,e,f;f=a.q;a.q=b;if((a.Db&4)!=0&&(a.Db&1)==0){e=new N3d(a,1,9,f,b);!c?(c=e):c.nj(e)}if(!b){!!a.r&&(c=a.Yk(null,c))}else{d=b.c;d!=a.r&&(c=a.Yk(d,c))}return c} +function gae(a,b,c){var d,e,f,g,h;c=(h=b,Ivd(h,a.e,-1-a.c,c));g=$9d(a.a);for(f=(d=new vkb((new mkb(g.a)).a),new xae(d));f.a.b;){e=RD(tkb(f.a).ld(),89);c=o2d(e,k2d(e,a.a),c)}return c} +function hae(a,b,c){var d,e,f,g,h;c=(h=b,Jvd(h,a.e,-1-a.c,c));g=$9d(a.a);for(f=(d=new vkb((new mkb(g.a)).a),new xae(d));f.a.b;){e=RD(tkb(f.a).ld(),89);c=o2d(e,k2d(e,a.a),c)}return c} +function rjb(a,b,c,d){var e,f,g;if(d==0){hib(b,0,a,c,a.length-c)}else{g=32-d;a[a.length-1]=0;for(f=a.length-1;f>c;f--){a[f]|=b[f-c-1]>>>g;a[f-1]=b[f-c-1]<<d}}for(e=0;e<c;e++){a[e]=0}} +function CMb(a){var b,c,d,e,f;b=0;c=0;for(f=a.Kc();f.Ob();){d=RD(f.Pb(),117);b=$wnd.Math.max(b,d.d.b);c=$wnd.Math.max(c,d.d.c)}for(e=a.Kc();e.Ob();){d=RD(e.Pb(),117);d.d.b=b;d.d.c=c}} +function KNb(a){var b,c,d,e,f;c=0;b=0;for(f=a.Kc();f.Ob();){d=RD(f.Pb(),117);c=$wnd.Math.max(c,d.d.d);b=$wnd.Math.max(b,d.d.a)}for(e=a.Kc();e.Ob();){d=RD(e.Pb(),117);d.d.d=c;d.d.a=b}} +function Pnc(a,b,c,d,e){var f,g;f=RD(zDb(CDb(b.Oc(),new Foc),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);Eob(f);g=RD($i(a.b,c,d),15);e==0?g.cd(0,f):g.Gc(f)} +function Sdd(a,b,c){c.Ug('Grow Tree',1);a.b=b.f;if(Heb(TD(mQb(b,(OQb(),MQb))))){a.c=new kRb;Odd(a,null)}else{a.c=new kRb}a.a=false;Qdd(a,b.f);pQb(b,NQb,(Geb(),a.a?true:false));c.Vg()} +function wsd(a){var b,c,d,e;b=null;for(e=new Anb(a.Rf());e.a<e.c.c.length;){d=RD(ynb(e),187);c=new Uid(d.Lf().a,d.Lf().b,d.Mf().a,d.Mf().b);!b?(b=c):Sid(b,c)}!b&&(b=new Tid);return b} +function dyd(a,b,c,d){var e,f;if(c==1){return !a.n&&(a.n=new C5d(I4,a,1,7)),qLd(a.n,b,d)}return f=RD(vYd((e=RD(Ywd(a,16),29),!e?a.ii():e),c),69),f.wk().zk(a,Wwd(a),c-AYd(a.ii()),b,d)} +function IHd(a,b,c){var d,e,f,g,h;d=c.gc();a._i(a.i+d);h=a.i-b;h>0&&hib(a.g,b,a.g,b+d,h);g=c.Kc();a.i+=d;for(e=0;e<d;++e){f=g.Pb();MHd(a,b,a.Zi(b,f));a.Mi(b,f);a.Ni();++b}return d!=0} +function XVd(a,b,c){var d;if(b!=a.q){!!a.q&&(c=Jvd(a.q,a,-10,c));!!b&&(c=Ivd(b,a,-10,c));c=UVd(a,b,c)}else if((a.Db&4)!=0&&(a.Db&1)==0){d=new N3d(a,1,9,b,b);!c?(c=d):c.nj(d)}return c} +function ek(a,b,c,d){Mb((c&Ove)==0,'flatMap does not support SUBSIZED characteristic');Mb((c&4)==0,'flatMap does not support SORTED characteristic');Qb(a);Qb(b);return new Mk(a,b,c,d)} +function fz(a,b){vFb(b,'Cannot suppress a null exception.');mFb(b!=a,'Exception can not suppress itself.');if(a.i){return}a.k==null?(a.k=cD(WC(rJ,1),Nve,82,0,[b])):(a.k[a.k.length]=b)} +function DLb(a,b){var c;c=ELb(a.b.ag(),b.b.ag());if(c!=0){return c}switch(a.b.ag().g){case 1:case 2:return hgb(a.b.Nf(),b.b.Nf());case 3:case 4:return hgb(b.b.Nf(),a.b.Nf());}return 0} +function eUb(a){var b,c,d;d=a.e.c.length;a.a=YC(kE,[Nve,Pwe],[53,28],15,[d,d],2);for(c=new Anb(a.c);c.a<c.c.c.length;){b=RD(ynb(c),290);a.a[b.c.a][b.d.a]+=RD(mQb(b,(yVb(),lVb)),17).a}} +function sAd(a,b){var c,d,e,f,g;if(a==null){return null}else{g=$C(hE,zwe,28,2*b,15,1);for(d=0,e=0;d<b;++d){c=a[d]>>4&15;f=a[d]&15;g[e++]=oAd[c];g[e++]=oAd[f]}return Ihb(g,0,g.length)}} +function Fhb(a){var b,c;if(a>=txe){b=uxe+(a-txe>>10&1023)&Bwe;c=56320+(a-txe&1023)&Bwe;return String.fromCharCode(b)+(''+String.fromCharCode(c))}else{return String.fromCharCode(a&Bwe)}} +function UMb(a,b){RMb();var c,d,e,f;e=RD(RD(Qc(a.r,b),21),87);if(e.gc()>=2){d=RD(e.Kc().Pb(),117);c=a.u.Hc((Pod(),Kod));f=a.u.Hc(Ood);return !d.a&&!c&&(e.gc()==2||f)}else{return false}} +function v3c(a,b,c,d,e){var f,g,h;f=w3c(a,b,c,d,e);h=false;while(!f){n3c(a,e,true);h=true;f=w3c(a,b,c,d,e)}h&&n3c(a,e,false);g=N2c(e);if(g.c.length!=0){!!a.d&&a.d.Gg(g);v3c(a,e,c,d,g)}} +function ind(){ind=geb;gnd=new jnd(LAe,0);end=new jnd('DIRECTED',1);hnd=new jnd('UNDIRECTED',2);cnd=new jnd('ASSOCIATION',3);fnd=new jnd('GENERALIZATION',4);dnd=new jnd('DEPENDENCY',5)} +function nsd(a,b){var c;if(!MCd(a)){throw Adb(new dgb(sHe))}c=MCd(a);switch(b.g){case 1:return -(a.j+a.f);case 2:return a.i-c.g;case 3:return a.j-c.f;case 4:return -(a.i+a.g);}return 0} +function Jge(a,b,c){var d,e,f;d=b.Lk();f=b.md();e=d.Jk()?fge(a,4,d,f,null,kge(a,d,f,ZD(d,102)&&(RD(d,19).Bb&txe)!=0),true):fge(a,d.tk()?2:1,d,f,d.ik(),-1,true);c?c.nj(e):(c=e);return c} +function lwb(a,b){var c,d;uFb(b);d=a.b.c.length;Rmb(a.b,b);while(d>0){c=d;d=(d-1)/2|0;if(a.a.Ne(Vmb(a.b,d),b)<=0){$mb(a.b,c,b);return true}$mb(a.b,c,Vmb(a.b,d))}$mb(a.b,d,b);return true} +function sKb(a,b,c,d){var e,f;e=0;if(!c){for(f=0;f<jKb;f++){e=$wnd.Math.max(e,hKb(a.a[f][b.g],d))}}else{e=hKb(a.a[c.g][b.g],d)}b==(ZJb(),XJb)&&!!a.b&&(e=$wnd.Math.max(e,a.b.a));return e} +function Qqc(a,b){var c,d,e,f,g,h;e=a.i;f=b.i;if(!e||!f){return false}if(e.i!=f.i||e.i==(qpd(),Xod)||e.i==(qpd(),ppd)){return false}g=e.g.a;c=g+e.j.a;h=f.g.a;d=h+f.j.a;return g<=d&&c>=h} +function A8c(a){switch(a.g){case 0:return new o8c;case 1:return new u8c;default:throw Adb(new agb('No implementation is available for the width approximator '+(a.f!=null?a.f:''+a.g)));}} +function rDd(a,b,c,d){var e;e=false;if(bE(d)){e=true;sDd(b,c,WD(d))}if(!e){if($D(d)){e=true;rDd(a,b,c,d)}}if(!e){if(ZD(d,242)){e=true;qDd(b,c,RD(d,242))}}if(!e){throw Adb(new Aeb(tIe))}} +function uee(a,b){var c,d,e;c=b.qi(a.a);if(c){e=$Nd((!c.b&&(c.b=new SVd((JTd(),FTd),C8,c)),c.b),rKe);if(e!=null){for(d=1;d<(lke(),hke).length;++d){if(lhb(hke[d],e)){return d}}}}return 0} +function vee(a,b){var c,d,e;c=b.qi(a.a);if(c){e=$Nd((!c.b&&(c.b=new SVd((JTd(),FTd),C8,c)),c.b),rKe);if(e!=null){for(d=1;d<(lke(),ike).length;++d){if(lhb(ike[d],e)){return d}}}}return 0} +function Ve(a,b){var c,d,e,f;uFb(b);f=a.a.gc();if(f<b.gc()){for(c=a.a.ec().Kc();c.Ob();){d=c.Pb();b.Hc(d)&&c.Qb()}}else{for(e=b.Kc();e.Ob();){d=e.Pb();a.a.Bc(d)!=null}}return f!=a.a.gc()} +function e_b(a){var b,c;c=ajd(xjd(cD(WC(l3,1),Nve,8,0,[a.i.n,a.n,a.a])));b=a.i.d;switch(a.j.g){case 1:c.b-=b.d;break;case 2:c.a+=b.c;break;case 3:c.b+=b.a;break;case 4:c.a-=b.b;}return c} +function edc(a){var b;b=(Zcc(),RD(hs(new is(Mr(Z2b(a).a.Kc(),new ir))),18).c.i);while(b.k==(r3b(),o3b)){pQb(b,(Ywc(),twc),(Geb(),true));b=RD(hs(new is(Mr(Z2b(b).a.Kc(),new ir))),18).c.i}} +function BMc(a,b,c,d){var e,f,g,h;h=aMc(b,d);for(g=h.Kc();g.Ob();){e=RD(g.Pb(),12);a.d[e.p]=a.d[e.p]+a.c[c.p]}h=aMc(c,d);for(f=h.Kc();f.Ob();){e=RD(f.Pb(),12);a.d[e.p]=a.d[e.p]-a.c[b.p]}} +function Isd(a,b,c){var d,e;for(e=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));e.e!=e.i.gc();){d=RD(bMd(e),27);Byd(d,d.i+b,d.j+c)}xgb((!a.b&&(a.b=new C5d(G4,a,12,3)),a.b),new Osd(b,c))} +function $yb(a,b,c,d){var e,f;f=b;e=f.d==null||a.a.Ne(c.d,f.d)>0?1:0;while(f.a[e]!=c){f=f.a[e];e=a.a.Ne(c.d,f.d)>0?1:0}f.a[e]=d;d.b=c.b;d.a[0]=c.a[0];d.a[1]=c.a[1];c.a[0]=null;c.a[1]=null} +function zIb(a){var b,c,d,e;b=new bnb;c=$C(xdb,Hye,28,a.a.c.length,16,1);Snb(c,c.length);for(e=new Anb(a.a);e.a<e.c.c.length;){d=RD(ynb(e),125);if(!c[d.d]){ZEb(b.c,d);yIb(a,d,c)}}return b} +function UXb(a,b){var c,d,e,f,g;e=b==1?MXb:LXb;for(d=e.a.ec().Kc();d.Ob();){c=RD(d.Pb(),88);for(g=RD(Qc(a.f.c,c),21).Kc();g.Ob();){f=RD(g.Pb(),42);Ymb(a.b.b,f.b);Ymb(a.b.a,RD(f.b,86).d)}}} +function P9b(a,b){var c;b.Ug('Hierarchical port position processing',1);c=a.b;c.c.length>0&&O9b((tFb(0,c.c.length),RD(c.c[0],30)),a);c.c.length>1&&O9b(RD(Vmb(c,c.c.length-1),30),a);b.Vg()} +function Sod(a){Pod();var b,c;b=ysb(Lod,cD(WC(D3,1),jwe,279,0,[Nod]));if(dy(Tx(b,a))>1){return false}c=ysb(Kod,cD(WC(D3,1),jwe,279,0,[Jod,Ood]));if(dy(Tx(c,a))>1){return false}return true} +function FBd(a,b){var c;c=Xjb((YSd(),XSd),a);ZD(c,507)?$jb(XSd,a,new B5d(this,b)):$jb(XSd,a,this);BBd(this,b);if(b==(jTd(),iTd)){this.wb=RD(this,2038);RD(b,2040)}else{this.wb=(lTd(),kTd)}} +function Lae(b){var c,d,e;if(b==null){return null}c=null;for(d=0;d<nAd.length;++d){try{return b2d(nAd[d],b)}catch(a){a=zdb(a);if(ZD(a,33)){e=a;c=e}else throw Adb(a)}}throw Adb(new RSd(c))} +function Mrb(){Mrb=geb;Krb=cD(WC(qJ,1),Nve,2,6,['Sun','Mon','Tue','Wed','Thu','Fri','Sat']);Lrb=cD(WC(qJ,1),Nve,2,6,['Jan','Feb','Mar','Apr',Gwe,'Jun','Jul','Aug','Sep','Oct','Nov','Dec'])} +function qBb(a){var b,c,d;b=lhb(typeof(b),Yxe)?null:new gFb;if(!b){return}SAb();c=(d=900,d>=Awe?'error':d>=900?'warn':d>=800?'info':'log');eFb(c,a.a);!!a.b&&fFb(b,c,a.b,'Exception: ',true)} +function mQb(a,b){var c,d;d=(!a.q&&(a.q=new Tsb),Wjb(a.q,b));if(d!=null){return d}c=b.Sg();ZD(c,4)&&(c==null?(!a.q&&(a.q=new Tsb),_jb(a.q,b)):(!a.q&&(a.q=new Tsb),Zjb(a.q,b,c)),a);return c} +function sXb(){sXb=geb;nXb=new tXb('P1_CYCLE_BREAKING',0);oXb=new tXb('P2_LAYERING',1);pXb=new tXb('P3_NODE_ORDERING',2);qXb=new tXb('P4_NODE_PLACEMENT',3);rXb=new tXb('P5_EDGE_ROUTING',4)} +function KZb(a,b){CZb();var c;if(a.c==b.c){if(a.b==b.b||rZb(a.b,b.b)){c=oZb(a.b)?1:-1;if(a.a&&!b.a){return c}else if(!a.a&&b.a){return -c}}return hgb(a.b.g,b.b.g)}else{return Qfb(a.c,b.c)}} +function E3c(a,b){var c,d,e;if(p3c(a,b)){return true}for(d=new Anb(b);d.a<d.c.c.length;){c=RD(ynb(d),27);e=R2c(c);if(o3c(a,c,e)){return true}if(C3c(a,c)-a.g<=a.a){return true}}return false} +function ncd(){ncd=geb;mcd=(Kcd(),Jcd);jcd=Fcd;icd=Dcd;gcd=zcd;hcd=Bcd;fcd=new A3b(8);ecd=new mGd((umd(),tld),fcd);kcd=new mGd(fmd,8);lcd=Hcd;bcd=ucd;ccd=wcd;dcd=new mGd(Mkd,(Geb(),false))} +function hkd(){hkd=geb;ekd=new A3b(15);dkd=new mGd((umd(),tld),ekd);gkd=new mGd(fmd,15);fkd=new mGd(Rld,sgb(0));$jd=Wkd;akd=kld;ckd=pld;Xjd=new mGd(Dkd,KGe);_jd=ald;bkd=nld;Yjd=Fkd;Zjd=Kkd} +function JGd(a){if((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b).i!=1||(!a.c&&(a.c=new Yie(E4,a,5,8)),a.c).i!=1){throw Adb(new agb(JIe))}return AGd(RD(QHd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),0),84))} +function KGd(a){if((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b).i!=1||(!a.c&&(a.c=new Yie(E4,a,5,8)),a.c).i!=1){throw Adb(new agb(JIe))}return BGd(RD(QHd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),0),84))} +function MGd(a){if((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b).i!=1||(!a.c&&(a.c=new Yie(E4,a,5,8)),a.c).i!=1){throw Adb(new agb(JIe))}return BGd(RD(QHd((!a.c&&(a.c=new Yie(E4,a,5,8)),a.c),0),84))} +function LGd(a){if((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b).i!=1||(!a.c&&(a.c=new Yie(E4,a,5,8)),a.c).i!=1){throw Adb(new agb(JIe))}return AGd(RD(QHd((!a.c&&(a.c=new Yie(E4,a,5,8)),a.c),0),84))} +function bJd(a,b,c){var d,e,f;++a.j;e=a.Ej();if(b>=e||b<0)throw Adb(new veb(MIe+b+NIe+e));if(c>=e||c<0)throw Adb(new veb(OIe+c+NIe+e));b!=c?(d=(f=a.Cj(c),a.qj(b,f),f)):(d=a.xj(c));return d} +function Lje(a){var b,c,d;d=a;if(a){b=0;for(c=a.Eh();c;c=c.Eh()){if(++b>wxe){return Lje(c)}d=c;if(c==a){throw Adb(new dgb('There is a cycle in the containment hierarchy of '+a))}}}return d} +function Fe(a){var b,c,d;d=new Jyb(pve,'[',']');for(c=a.Kc();c.Ob();){b=c.Pb();Gyb(d,dE(b)===dE(a)?'(this Collection)':b==null?vve:jeb(b))}return !d.a?d.c:d.e.length==0?d.a.a:d.a.a+(''+d.e)} +function p3c(a,b){var c,d;d=false;if(b.gc()<2){return false}for(c=0;c<b.gc();c++){c<b.gc()-1?(d=d|o3c(a,RD(b.Xb(c),27),RD(b.Xb(c+1),27))):(d=d|o3c(a,RD(b.Xb(c),27),RD(b.Xb(0),27)))}return d} +function wAd(a,b){var c;if(b!=a.a){c=null;!!a.a&&(c=RD(a.a,54).Th(a,4,t7,c));!!b&&(c=RD(b,54).Rh(a,4,t7,c));c=rAd(a,b,c);!!c&&c.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,1,b,b))} +function p2d(a,b){var c;if(b!=a.e){!!a.e&&oae($9d(a.e),a);!!b&&(!b.b&&(b.b=new pae(new lae)),nae(b.b,a));c=f2d(a,b,null);!!c&&c.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,4,b,b))} +function $mc(a,b){var c;c=b.o;if(Dmd(a.f)){a.j.a=$wnd.Math.max(a.j.a,c.a);a.j.b+=c.b;a.d.c.length>1&&(a.j.b+=a.e)}else{a.j.a+=c.a;a.j.b=$wnd.Math.max(a.j.b,c.b);a.d.c.length>1&&(a.j.a+=a.e)}} +function Mnc(){Mnc=geb;Jnc=cD(WC(E3,1),NAe,64,0,[(qpd(),Yod),Xod,npd]);Inc=cD(WC(E3,1),NAe,64,0,[Xod,npd,ppd]);Knc=cD(WC(E3,1),NAe,64,0,[npd,ppd,Yod]);Lnc=cD(WC(E3,1),NAe,64,0,[ppd,Yod,Xod])} +function Upc(a,b,c,d){var e,f,g,h,i,j,k;g=a.c.d;h=a.d.d;if(g.j==h.j){return}k=a.b;e=g.j;i=null;while(e!=h.j){i=b==0?tpd(e):rpd(e);f=$pc(e,k.d[e.g],c);j=$pc(i,k.d[i.g],c);Mub(d,$id(f,j));e=i}} +function OJc(a,b,c,d){var e,f,g,h,i;g=hMc(a.a,b,c);h=RD(g.a,17).a;f=RD(g.b,17).a;if(d){i=RD(mQb(b,(Ywc(),Iwc)),10);e=RD(mQb(c,Iwc),10);if(!!i&&!!e){Slc(a.b,i,e);h+=a.b.i;f+=a.b.e}}return h>f} +function OLc(a){var b,c,d,e,f,g,h,i,j;this.a=LLc(a);this.b=new bnb;for(c=a,d=0,e=c.length;d<e;++d){b=c[d];f=new bnb;Rmb(this.b,f);for(h=b,i=0,j=h.length;i<j;++i){g=h[i];Rmb(f,new dnb(g.j))}}} +function QLc(a,b,c){var d,e,f;f=0;d=c[b];if(b<c.length-1){e=c[b+1];if(a.b[b]){f=iNc(a.d,d,e);f+=lMc(a.a,d,(qpd(),Xod));f+=lMc(a.a,e,ppd)}else{f=gMc(a.a,d,e)}}a.c[b]&&(f+=nMc(a.a,d));return f} +function r0b(a,b,c,d,e){var f,g,h,i;i=null;for(h=new Anb(d);h.a<h.c.c.length;){g=RD(ynb(h),453);if(g!=c&&Wmb(g.e,e,0)!=-1){i=g;break}}f=s0b(e);Y0b(f,c.b);Z0b(f,i.b);Rc(a.a,e,new J0b(f,b,c.f))} +function h2b(a){var b,c,d,e;if(Emd(RD(mQb(a.b,(yCc(),rAc)),88))){return 0}b=0;for(d=new Anb(a.a);d.a<d.c.c.length;){c=RD(ynb(d),10);if(c.k==(r3b(),p3b)){e=c.o.a;b=$wnd.Math.max(b,e)}}return b} +function Tlc(a){while(a.g.c!=0&&a.d.c!=0){if(amc(a.g).c>amc(a.d).c){a.i+=a.g.c;cmc(a.d)}else if(amc(a.d).c>amc(a.g).c){a.e+=a.d.c;cmc(a.g)}else{a.i+=_lc(a.g);a.e+=_lc(a.d);cmc(a.g);cmc(a.d)}}} +function vTc(a,b,c){var d,e,f,g;f=b.q;g=b.r;new bTc((fTc(),dTc),b,f,1);new bTc(dTc,f,g,1);for(e=new Anb(c);e.a<e.c.c.length;){d=RD(ynb(e),118);if(d!=f&&d!=b&&d!=g){PTc(a.a,d,b);PTc(a.a,d,g)}}} +function vVc(a,b,c,d){a.a.d=$wnd.Math.min(b,c);a.a.a=$wnd.Math.max(b,d)-a.a.d;if(b<c){a.b=0.5*(b+c);a.g=CEe*a.b+0.9*b;a.f=CEe*a.b+0.9*c}else{a.b=0.5*(b+d);a.g=CEe*a.b+0.9*d;a.f=CEe*a.b+0.9*b}} +function zZc(a){var b,c,d,e;if(a.b!=0){b=new Yub;for(e=Sub(a,0);e.b!=e.d.c;){d=RD(evb(e),40);ye(b,$Wc(d));c=d.e;c.a=RD(mQb(d,(q$c(),o$c)),17).a;c.b=RD(mQb(d,p$c),17).a}return b}return new Yub} +function t8b(a){switch(RD(mQb(a,(yCc(),UAc)),171).g){case 1:pQb(a,UAc,(cxc(),_wc));break;case 2:pQb(a,UAc,(cxc(),axc));break;case 3:pQb(a,UAc,(cxc(),Zwc));break;case 4:pQb(a,UAc,(cxc(),$wc));}} +function Whc(a,b,c){var d;c.Ug('Self-Loop routing',1);d=Xhc(b);fE(mQb(b,(rid(),qid)));FDb(GDb(CDb(CDb(EDb(new SDb(null,new Swb(b.b,16)),new $hc),new aic),new cic),new eic),new gic(a,d));c.Vg()} +function $uc(){$uc=geb;Yuc=new _uc(LAe,0);Vuc=new _uc(Nye,1);Zuc=new _uc(Oye,2);Xuc=new _uc('LEFT_RIGHT_CONSTRAINT_LOCKING',3);Wuc=new _uc('LEFT_RIGHT_CONNECTION_LOCKING',4);Uuc=new _uc(EBe,5)} +function tWc(a,b,c){var d,e,f,g,h,i,j;h=c.a/2;f=c.b/2;d=$wnd.Math.abs(b.a-a.a);e=$wnd.Math.abs(b.b-a.b);i=1;j=1;d>h&&(i=h/d);e>f&&(j=f/e);g=$wnd.Math.min(i,j);a.a+=g*(b.a-a.a);a.b+=g*(b.b-a.b)} +function I8c(a,b,c,d,e){var f,g;g=false;f=RD(Vmb(c.b,0),27);while(V8c(a,b,f,d,e)){g=true;T9c(c,f);if(c.b.c.length==0){break}f=RD(Vmb(c.b,0),27)}c.b.c.length==0&&Fad(c.j,c);g&&gad(b.q);return g} +function Eid(a,b){tid();var c,d,e,f;if(b.b<2){return false}f=Sub(b,0);c=RD(evb(f),8);d=c;while(f.b!=f.d.c){e=RD(evb(f),8);if(Did(a,d,e)){return true}d=e}if(Did(a,d,c)){return true}return false} +function Bxd(a,b,c,d){var e,f;if(c==0){return !a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),BVd(a.o,b,d)}return f=RD(vYd((e=RD(Ywd(a,16),29),!e?a.ii():e),c),69),f.wk().Ak(a,Wwd(a),c-AYd(a.ii()),b,d)} +function BBd(a,b){var c;if(b!=a.sb){c=null;!!a.sb&&(c=RD(a.sb,54).Th(a,1,n7,c));!!b&&(c=RD(b,54).Rh(a,1,n7,c));c=hBd(a,b,c);!!c&&c.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,4,b,b))} +function YDd(a,b){var c,d,e,f;if(b){e=vDd(b,'x');c=new ZEd(a);Hzd(c.a,(uFb(e),e));f=vDd(b,'y');d=new $Ed(a);Izd(d.a,(uFb(f),f))}else{throw Adb(new CDd('All edge sections need an end point.'))}} +function WDd(a,b){var c,d,e,f;if(b){e=vDd(b,'x');c=new WEd(a);Ozd(c.a,(uFb(e),e));f=vDd(b,'y');d=new XEd(a);Pzd(d.a,(uFb(f),f))}else{throw Adb(new CDd('All edge sections need a start point.'))}} +function hBb(a,b){var c,d,e,f,g,h,i;for(d=kBb(a),f=0,h=d.length;f<h;++f){qBb(b)}i=!dBb&&a.e?dBb?null:a.d:null;while(i){for(c=kBb(i),e=0,g=c.length;e<g;++e){qBb(b)}i=!dBb&&i.e?dBb?null:i.d:null}} +function aXb(a,b){var c,d;d=RD(mQb(b,(yCc(),BBc)),101);pQb(b,(Ywc(),Fwc),d);c=b.e;!!c&&(FDb(new SDb(null,new Swb(c.a,16)),new fXb(a)),FDb(EDb(new SDb(null,new Swb(c.b,16)),new hXb),new jXb(a)))} +function r3b(){r3b=geb;p3b=new s3b('NORMAL',0);o3b=new s3b('LONG_EDGE',1);m3b=new s3b('EXTERNAL_PORT',2);q3b=new s3b('NORTH_SOUTH_PORT',3);n3b=new s3b('LABEL',4);l3b=new s3b('BREAKING_POINT',5)} +function x7b(a){var b,c,d,e;b=false;if(nQb(a,(Ywc(),cwc))){c=RD(mQb(a,cwc),85);for(e=new Anb(a.j);e.a<e.c.c.length;){d=RD(ynb(e),12);if(v7b(d)){if(!b){u7b(Y2b(a));b=true}y7b(RD(c.xc(d),314))}}}} +function GFd(a){var b,c,d,e,f,g,h,i,j;j=HFd(a);c=a.e;f=c!=null;f&&sDd(j,FIe,a.e);h=a.k;g=!!h;g&&sDd(j,'type',ps(a.k));d=cve(a.j);e=!d;if(e){i=new MB;sC(j,lIe,i);b=new SFd(i);xgb(a.j,b)}return j} +function Zv(a){var b,c,d,e;e=Thb((dk(a.gc(),'size'),new cib),123);d=true;for(c=gn(a).Kc();c.Ob();){b=RD(c.Pb(),44);d||(e.a+=pve,e);d=false;Yhb(Thb(Yhb(e,b.ld()),61),b.md())}return (e.a+='}',e).a} +function AD(a,b){var c,d,e;b&=63;if(b<22){c=a.l<<b;d=a.m<<b|a.l>>22-b;e=a.h<<b|a.m>>22-b}else if(b<44){c=0;d=a.l<<b-22;e=a.m<<b-22|a.l>>44-b}else{c=0;d=0;e=a.l<<b-44}return hD(c&dxe,d&dxe,e&exe)} +function Neb(a){Meb==null&&(Meb=new RegExp('^\\s*[+-]?(NaN|Infinity|((\\d+\\.?\\d*)|(\\.\\d+))([eE][+-]?\\d+)?[dDfF]?)\\s*$'));if(!Meb.test(a)){throw Adb(new Vgb(nxe+a+'"'))}return parseFloat(a)} +function PXb(a,b){var c,d,e,f,g;e=b==1?MXb:LXb;for(d=e.a.ec().Kc();d.Ob();){c=RD(d.Pb(),88);for(g=RD(Qc(a.f.c,c),21).Kc();g.Ob();){f=RD(g.Pb(),42);Rmb(a.b.b,RD(f.b,86));Rmb(a.b.a,RD(f.b,86).d)}}} +function rqc(a,b){var c,d,e,f;f=b.b.j;a.a=$C(kE,Pwe,28,f.c.length,15,1);e=0;for(d=0;d<f.c.length;d++){c=(tFb(d,f.c.length),RD(f.c[d],12));c.e.c.length==0&&c.g.c.length==0?(e+=1):(e+=3);a.a[d]=e}} +function tuc(){tuc=geb;ouc=new vuc('ALWAYS_UP',0);nuc=new vuc('ALWAYS_DOWN',1);quc=new vuc('DIRECTION_UP',2);puc=new vuc('DIRECTION_DOWN',3);suc=new vuc('SMART_UP',4);ruc=new vuc('SMART_DOWN',5)} +function vid(a,b){if(a<0||b<0){throw Adb(new agb('k and n must be positive'))}else if(b>a){throw Adb(new agb('k must be smaller than n'))}else return b==0||b==a?1:a==0?0:Bid(a)/(Bid(b)*Bid(a-b))} +function msd(a,b){var c,d,e,f;c=new zId(a);while(c.g==null&&!c.c?sId(c):c.g==null||c.i!=0&&RD(c.g[c.i-1],51).Ob()){f=RD(tId(c),58);if(ZD(f,167)){d=RD(f,167);for(e=0;e<b.length;e++){b[e].Kg(d)}}}} +function Fyd(a){var b;if((a.Db&64)!=0)return kyd(a);b=new Shb(kyd(a));b.a+=' (height: ';Khb(b,a.f);b.a+=', width: ';Khb(b,a.g);b.a+=', x: ';Khb(b,a.i);b.a+=', y: ';Khb(b,a.j);b.a+=')';return b.a} +function Gn(a){var b,c,d,e,f,g,h;b=new gub;for(d=a,e=0,f=d.length;e<f;++e){c=d[e];g=Qb(c.ld());h=dub(b,g,Qb(c.md()));if(h!=null){throw Adb(new agb('duplicate key: '+g))}}this.b=(yob(),new uqb(b))} +function bob(a){var b,c,d,e,f;if(a==null){return vve}f=new Jyb(pve,'[',']');for(c=a,d=0,e=c.length;d<e;++d){b=c[d];Gyb(f,String.fromCharCode(b))}return !f.a?f.c:f.e.length==0?f.a.a:f.a.a+(''+f.e)} +function OUb(){OUb=geb;IUb=(TUb(),SUb);HUb=new lGd(Rze,IUb);sgb(1);GUb=new lGd(Sze,sgb(300));sgb(0);LUb=new lGd(Tze,sgb(0));new Xsd;MUb=new lGd(Uze,Vze);new Xsd;JUb=new lGd(Wze,5);NUb=SUb;KUb=RUb} +function K6d(a,b){var c;if(b!=null&&!a.c.Hk().fk(b)){c=ZD(b,58)?RD(b,58).Dh().zb:nfb(rb(b));throw Adb(new Ifb(KHe+a.c.xe()+"'s type '"+a.c.Hk().xe()+"' does not permit a value of type '"+c+"'"))}} +function k0b(a,b,c){var d,e;e=new Jkb(a.b,0);while(e.b<e.d.gc()){d=(sFb(e.b<e.d.gc()),RD(e.d.Xb(e.c=e.b++),72));if(dE(mQb(d,(Ywc(),Dwc)))!==dE(b)){continue}e2b(d.n,Y2b(a.c.i),c);Ckb(e);Rmb(b.b,d)}} +function Arc(a){var b,c;c=$wnd.Math.sqrt((a.k==null&&(a.k=tsc(a,new Esc)),Kfb(a.k)/(a.b*(a.g==null&&(a.g=qsc(a,new Csc)),Kfb(a.g)))));b=Ydb(Hdb($wnd.Math.round(c)));b=$wnd.Math.min(b,a.f);return b} +function sse(){var a,b,c;b=0;for(a=0;a<'X'.length;a++){c=rse((BFb(a,'X'.length),'X'.charCodeAt(a)));if(c==0)throw Adb(new Lqe((BFb(a,'X'.length+1),'Unknown Option: '+'X'.substr(a))));b|=c}return b} +function R3b(){J3b();v2b.call(this);this.j=(qpd(),opd);this.a=new pjd;new T2b;this.f=(dk(2,iwe),new cnb(2));this.e=(dk(4,iwe),new cnb(4));this.g=(dk(4,iwe),new cnb(4));this.b=new h4b(this.e,this.g)} +function A6b(a,b){var c,d;if(Heb(TD(mQb(b,(Ywc(),Nwc))))){return false}d=b.c.i;if(a==(cxc(),Zwc)){if(d.k==(r3b(),n3b)){return false}}c=RD(mQb(d,(yCc(),UAc)),171);if(c==$wc){return false}return true} +function B6b(a,b){var c,d;if(Heb(TD(mQb(b,(Ywc(),Nwc))))){return false}d=b.d.i;if(a==(cxc(),_wc)){if(d.k==(r3b(),n3b)){return false}}c=RD(mQb(d,(yCc(),UAc)),171);if(c==axc){return false}return true} +function a7b(a,b){var c,d,e,f,g,h,i;g=a.d;i=a.o;h=new Uid(-g.b,-g.d,g.b+i.a+g.c,g.d+i.b+g.a);for(d=b,e=0,f=d.length;e<f;++e){c=d[e];!!c&&Sid(h,c.i)}g.b=-h.c;g.d=-h.d;g.c=h.b-g.b-i.a;g.a=h.a-g.d-i.b} +function _gc(a,b){if(b.a){switch(RD(mQb(b.b,(Ywc(),Fwc)),101).g){case 0:case 1:Roc(b);case 2:FDb(new SDb(null,new Swb(b.d,16)),new mhc);aoc(a.a,b);}}else{FDb(new SDb(null,new Swb(b.d,16)),new mhc)}} +function Xbd(){Xbd=geb;Sbd=new Ybd('CENTER_DISTANCE',0);Tbd=new Ybd('CIRCLE_UNDERLAP',1);Wbd=new Ybd('RECTANGLE_UNDERLAP',2);Ubd=new Ybd('INVERTED_OVERLAP',3);Vbd=new Ybd('MINIMUM_ROOT_DISTANCE',4)} +function Iqe(a){Gqe();var b,c,d,e,f;if(a==null)return null;d=a.length;e=d*2;b=$C(hE,zwe,28,e,15,1);for(c=0;c<d;c++){f=a[c];f<0&&(f+=256);b[c*2]=Fqe[f>>4];b[c*2+1]=Fqe[f&15]}return Ihb(b,0,b.length)} +function sn(a){fn();var b,c,d;d=a.c.length;switch(d){case 0:return en;case 1:b=RD(Ir(new Anb(a)),44);return xn(b.ld(),b.md());default:c=RD(anb(a,$C(UK,Zve,44,a.c.length,0,1)),173);return new Mx(c);}} +function KWb(a){var b,c,d,e,f,g;b=new wmb;c=new wmb;hmb(b,a);hmb(c,a);while(c.b!=c.c){e=RD(smb(c),36);for(g=new Anb(e.a);g.a<g.c.c.length;){f=RD(ynb(g),10);if(f.e){d=f.e;hmb(b,d);hmb(c,d)}}}return b} +function e3b(a,b){switch(b.g){case 1:return dr(a.j,(J3b(),F3b));case 2:return dr(a.j,(J3b(),D3b));case 3:return dr(a.j,(J3b(),H3b));case 4:return dr(a.j,(J3b(),I3b));default:return yob(),yob(),vob;}} +function Zlc(a,b){var c,d,e;c=$lc(b,a.e);d=RD(Wjb(a.g.f,c),17).a;e=a.a.c.length-1;if(a.a.c.length!=0&&RD(Vmb(a.a,e),294).c==d){++RD(Vmb(a.a,e),294).a;++RD(Vmb(a.a,e),294).b}else{Rmb(a.a,new hmc(d))}} +function tLc(a,b,c){var d,e;d=sLc(a,b,c);if(d!=0){return d}if(nQb(b,(Ywc(),zwc))&&nQb(c,zwc)){e=hgb(RD(mQb(b,zwc),17).a,RD(mQb(c,zwc),17).a);e<0?uLc(a,b,c):e>0&&uLc(a,c,b);return e}return rLc(a,b,c)} +function $4c(){$4c=geb;R4c=(umd(),Qld);Y4c=fmd;K4c=kld;L4c=nld;M4c=pld;J4c=ild;N4c=sld;Q4c=Lld;H4c=(D4c(),o4c);I4c=p4c;T4c=v4c;W4c=y4c;U4c=w4c;V4c=x4c;O4c=r4c;P4c=t4c;S4c=u4c;X4c=z4c;Z4c=B4c;G4c=n4c} +function P9c(a,b){var c,d,e,f,g;if(a.e<=b){return a.g}if(R9c(a,a.g,b)){return a.g}f=a.r;d=a.g;g=a.r;e=(f-d)/2+d;while(d+1<f){c=S9c(a,e,false);if(c.b<=e&&c.a<=b){g=e;f=e}else{d=e}e=(f-d)/2+d}return g} +function Eed(a,b,c){var d;d=zed(a,b,true);Fqd(c,'Recursive Graph Layout',d);msd(b,cD(WC(j4,1),rve,536,0,[new Bfd]));Hxd(b,(umd(),Tld))||msd(b,cD(WC(j4,1),rve,536,0,[new dgd]));Fed(a,b,null,c);Hqd(c)} +function Hqd(a){var b;if(a.p==null){throw Adb(new dgb('The task has not begun yet.'))}if(!a.b){if(a.k){b=(gib(),Ndb(Hdb(Date.now()),Awe));a.q=Xdb(Vdb(b,a.o))*1.0E-9}a.c<a.r&&Iqd(a,a.r-a.c);a.b=true}} +function ssd(a){var b,c,d;d=new Ejd;Mub(d,new rjd(a.j,a.k));for(c=new dMd((!a.a&&(a.a=new XZd(D4,a,5)),a.a));c.e!=c.i.gc();){b=RD(bMd(c),377);Mub(d,new rjd(b.a,b.b))}Mub(d,new rjd(a.b,a.c));return d} +function QDd(a,b,c,d,e){var f,g,h,i,j,k;if(e){i=e.a.length;f=new vue(i);for(k=(f.b-f.a)*f.c<0?(uue(),tue):new Rue(f);k.Ob();){j=RD(k.Pb(),17);h=xDd(e,j.a);g=new PEd(a,b,c,d);RDd(g.a,g.b,g.c,g.d,h)}}} +function Rx(b,c){var d;if(dE(b)===dE(c)){return true}if(ZD(c,21)){d=RD(c,21);try{return b.gc()==d.gc()&&b.Ic(d)}catch(a){a=zdb(a);if(ZD(a,169)||ZD(a,212)){return false}else throw Adb(a)}}return false} +function Kzb(a,b,c,d,e,f){this.c=a;switch(b.g){case 2:if(a.a.Ne(e,c)<0){throw Adb(new agb(Sxe+e+Txe+c))}break;case 1:a.a.Ne(e,e);break;case 3:a.a.Ne(c,c);}this.f=b;this.b=c;this.a=d;this.e=e;this.d=f} +function LKb(a,b){var c;Rmb(a.d,b);c=b.Mf();if(a.c){a.e.a=$wnd.Math.max(a.e.a,c.a);a.e.b+=c.b;a.d.c.length>1&&(a.e.b+=a.a)}else{a.e.a+=c.a;a.e.b=$wnd.Math.max(a.e.b,c.b);a.d.c.length>1&&(a.e.a+=a.a)}} +function Ipc(a){var b,c,d,e;e=a.i;b=e.b;d=e.j;c=e.g;switch(e.a.g){case 0:c.a=(a.g.b.o.a-d.a)/2;break;case 1:c.a=b.d.n.a+b.d.a.a;break;case 2:c.a=b.d.n.a+b.d.a.a-d.a;break;case 3:c.b=b.d.n.b+b.d.a.b;}} +function oOc(a,b,c){var d,e,f;for(e=new is(Mr(W2b(c).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);if(!(!W0b(d)&&!(!W0b(d)&&d.c.i.c==d.d.i.c))){continue}f=gOc(a,d,c,new VOc);f.c.length>1&&(ZEb(b.c,f),true)}} +function _id(a,b,c,d,e){if(d<b||e<c){throw Adb(new agb('The highx must be bigger then lowx and the highy must be bigger then lowy'))}a.a<b?(a.a=b):a.a>d&&(a.a=d);a.b<c?(a.b=c):a.b>e&&(a.b=e);return a} +function LFd(a){if(ZD(a,143)){return EFd(RD(a,143))}else if(ZD(a,233)){return FFd(RD(a,233))}else if(ZD(a,23)){return GFd(RD(a,23))}else{throw Adb(new agb(wIe+Fe(new mob(cD(WC(jJ,1),rve,1,5,[a])))))}} +function ujb(a,b,c,d,e){var f,g,h;f=true;for(g=0;g<d;g++){f=f&c[g]==0}if(e==0){hib(c,d,a,0,b);g=b}else{h=32-e;f=f&c[g]<<h==0;for(g=0;g<b-1;g++){a[g]=c[g+d]>>>e|c[g+d+1]<<h}a[g]=c[g+d]>>>e;++g}return f} +function ZQc(a,b,c,d){var e,f,g;if(b.k==(r3b(),o3b)){for(f=new is(Mr(Z2b(b).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);g=e.c.i.k;if(g==o3b&&a.c.a[e.c.i.c.p]==d&&a.c.a[b.c.p]==c){return true}}}return false} +function CD(a,b){var c,d,e,f;b&=63;c=a.h&exe;if(b<22){f=c>>>b;e=a.m>>b|c<<22-b;d=a.l>>b|a.m<<22-b}else if(b<44){f=0;e=c>>>b-22;d=a.m>>b-22|a.h<<44-b}else{f=0;e=0;d=c>>>b-44}return hD(d&dxe,e&dxe,f&exe)} +function mmc(a,b,c,d){var e;this.b=d;this.e=a==(RKc(),PKc);e=b[c];this.d=YC(xdb,[Nve,Hye],[183,28],16,[e.length,e.length],2);this.a=YC(kE,[Nve,Pwe],[53,28],15,[e.length,e.length],2);this.c=new Ylc(b,c)} +function Rmc(a){var b,c,d;a.k=new Si((qpd(),cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])).length,a.j.c.length);for(d=new Anb(a.j);d.a<d.c.c.length;){c=RD(ynb(d),113);b=c.d.j;Rc(a.k,b,c)}a.e=Dnc(Ec(a.k))} +function sVc(a,b){var c,d,e;Ysb(a.d,b);c=new zVc;Zjb(a.c,b,c);c.f=tVc(b.c);c.a=tVc(b.d);c.d=(HUc(),e=b.c.i.k,e==(r3b(),p3b)||e==l3b);c.e=(d=b.d.i.k,d==p3b||d==l3b);c.b=b.c.j==(qpd(),ppd);c.c=b.d.j==Xod} +function sJb(a){var b,c,d,e,f;f=lve;e=lve;for(d=new Anb(CIb(a));d.a<d.c.c.length;){c=RD(ynb(d),218);b=c.e.e-c.d.e;c.e==a&&b<e?(e=b):b<f&&(f=b)}e==lve&&(e=-1);f==lve&&(f=-1);return new Ptd(sgb(e),sgb(f))} +function qTb(a,b){var c,d,e;e=Hze;d=(IRb(),FRb);e=$wnd.Math.abs(a.b);c=$wnd.Math.abs(b.f-a.b);if(c<e){e=c;d=GRb}c=$wnd.Math.abs(a.a);if(c<e){e=c;d=HRb}c=$wnd.Math.abs(b.g-a.a);if(c<e){e=c;d=ERb}return d} +function adc(a,b){var c,d,e,f;c=b.a.o.a;f=new Rkb(Y2b(b.a).b,b.c,b.f+1);for(e=new Dkb(f);e.b<e.d.gc();){d=(sFb(e.b<e.d.gc()),RD(e.d.Xb(e.c=e.b++),30));if(d.c.a>=c){_cc(a,b,d.p);return true}}return false} +function EA(a,b,c,d){var e,f,g,h,i,j;g=c.length;f=0;e=-1;j=Bhb((BFb(b,a.length+1),a.substr(b)),(wvb(),uvb));for(h=0;h<g;++h){i=c[h].length;if(i>f&&whb(j,Bhb(c[h],uvb))){e=h;f=i}}e>=0&&(d[0]=b+f);return e} +function gCd(a){var b;if((a.Db&64)!=0)return Fyd(a);b=new dib(FHe);!a.a||Zhb(Zhb((b.a+=' "',b),a.a),'"');Zhb(Uhb(Zhb(Uhb(Zhb(Uhb(Zhb(Uhb((b.a+=' (',b),a.i),','),a.j),' | '),a.g),','),a.f),')');return b.a} +function xge(a,b,c){var d,e,f,g,h;h=pke(a.e.Dh(),b);e=RD(a.g,124);d=0;for(g=0;g<a.i;++g){f=e[g];if(h.am(f.Lk())){if(d==c){vLd(a,g);return nke(),RD(b,69).xk()?f:f.md()}++d}}throw Adb(new veb(HJe+c+NIe+d))} +function Rqe(a){var b,c,d;b=a.c;if(b==2||b==7||b==1){return Vse(),Vse(),Ese}else{d=Pqe(a);c=null;while((b=a.c)!=2&&b!=7&&b!=1){if(!c){c=(Vse(),Vse(),++Use,new iue(1));hue(c,d);d=c}hue(c,Pqe(a))}return d}} +function Kb(a,b,c){if(a<0||a>c){return Jb(a,c,'start index')}if(b<0||b>c){return Jb(b,c,'end index')}return hc('end index (%s) must not be less than start index (%s)',cD(WC(jJ,1),rve,1,5,[sgb(b),sgb(a)]))} +function dA(b,c){var d,e,f,g;for(e=0,f=b.length;e<f;e++){g=b[e];try{g[1]?g[0].Um()&&(c=cA(c,g)):g[0].Um()}catch(a){a=zdb(a);if(ZD(a,82)){d=a;Qz();Wz(ZD(d,486)?RD(d,486).ke():d)}else throw Adb(a)}}return c} +function _cc(a,b,c){var d,e,f;c!=b.c+b.b.gc()&&odc(b.a,wdc(b,c-b.c));f=b.a.c.p;a.a[f]=$wnd.Math.max(a.a[f],b.a.o.a);for(e=RD(mQb(b.a,(Ywc(),Mwc)),15).Kc();e.Ob();){d=RD(e.Pb(),72);pQb(d,Ycc,(Geb(),true))}} +function Aic(a,b){var c,d,e;e=zic(b);pQb(b,(Ywc(),xwc),e);if(e){d=lve;!!qtb(a.f,e)&&(d=RD(Wd(qtb(a.f,e)),17).a);c=RD(Vmb(b.g,0),18);Heb(TD(mQb(c,Nwc)))||Zjb(a,e,sgb($wnd.Math.min(RD(mQb(c,zwc),17).a,d)))}} +function aGc(a,b,c){var d,e,f,g,h;b.p=-1;for(h=c3b(b,(BEc(),zEc)).Kc();h.Ob();){g=RD(h.Pb(),12);for(e=new Anb(g.g);e.a<e.c.c.length;){d=RD(ynb(e),18);f=d.d.i;b!=f&&(f.p<0?c.Fc(d):f.p>0&&aGc(a,f,c))}}b.p=0} +function Ahd(a){var b;this.c=new Yub;this.f=a.e;this.e=a.d;this.i=a.g;this.d=a.c;this.b=a.b;this.k=a.j;this.a=a.a;!a.i?(this.j=(b=RD(mfb(d3),9),new Fsb(b,RD(WEb(b,b.length),9),0))):(this.j=a.i);this.g=a.f} +function Wb(a){var b,c,d,e;b=Thb(Zhb(new dib('Predicates.'),'and'),40);c=true;for(e=new Dkb(a);e.b<e.d.gc();){d=(sFb(e.b<e.d.gc()),e.d.Xb(e.c=e.b++));c||(b.a+=',',b);b.a+=''+d;c=false}return (b.a+=')',b).a} +function vgc(a,b,c){var d,e,f;if(c<=b+2){return}e=(c-b)/2|0;for(d=0;d<e;++d){f=(tFb(b+d,a.c.length),RD(a.c[b+d],12));$mb(a,b+d,(tFb(c-d-1,a.c.length),RD(a.c[c-d-1],12)));tFb(c-d-1,a.c.length);a.c[c-d-1]=f}} +function Nmc(a,b,c){var d,e,f,g,h,i,j,k;f=a.d.p;h=f.e;i=f.r;a.g=new DMc(i);g=a.d.o.c.p;d=g>0?h[g-1]:$C(jR,WAe,10,0,0,1);e=h[g];j=g<h.length-1?h[g+1]:$C(jR,WAe,10,0,0,1);k=b==c-1;k?pMc(a.g,e,j):pMc(a.g,d,e)} +function Vmc(a){var b;this.j=new bnb;this.f=new _sb;this.b=(b=RD(mfb(E3),9),new Fsb(b,RD(WEb(b,b.length),9),0));this.d=$C(kE,Pwe,28,(qpd(),cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])).length,15,1);this.g=a} +function D3c(a,b){var c,d,e;if(b.c.length!=0){c=E3c(a,b);e=false;while(!c){n3c(a,b,true);e=true;c=E3c(a,b)}e&&n3c(a,b,false);d=N2c(b);!!a.b&&a.b.Gg(d);a.a=C3c(a,(tFb(0,b.c.length),RD(b.c[0],27)));D3c(a,d)}} +function $vd(a,b){var c,d,e;d=vYd(a.Dh(),b);c=b-a.ji();if(c<0){if(!d){throw Adb(new agb(OHe+b+PHe))}else if(d.rk()){e=a.Ih(d);e>=0?a.ki(e):Tvd(a,d)}else{throw Adb(new agb(KHe+d.xe()+LHe))}}else{Cvd(a,c,d)}} +function ADd(a){var b,c;c=null;b=false;if(ZD(a,211)){b=true;c=RD(a,211).a}if(!b){if(ZD(a,263)){b=true;c=''+RD(a,263).a}}if(!b){if(ZD(a,493)){b=true;c=''+RD(a,493).a}}if(!b){throw Adb(new Aeb(tIe))}return c} +function gge(a,b,c){var d,e,f,g,h,i;i=pke(a.e.Dh(),b);d=0;h=a.i;e=RD(a.g,124);for(g=0;g<a.i;++g){f=e[g];if(i.am(f.Lk())){if(c==d){return g}++d;h=g+1}}if(c==d){return h}else{throw Adb(new veb(HJe+c+NIe+d))}} +function ucc(a,b){var c,d,e,f;if(a.f.c.length==0){return null}else{f=new Tid;for(d=new Anb(a.f);d.a<d.c.c.length;){c=RD(ynb(d),72);e=c.o;f.b=$wnd.Math.max(f.b,e.a);f.a+=e.b}f.a+=(a.f.c.length-1)*b;return f}} +function rOc(a){var b,c,d,e;c=new Yub;ye(c,a.o);d=new Fyb;while(c.b!=0){b=RD(c.b==0?null:(sFb(c.b!=0),Wub(c,c.a.a)),515);e=iOc(a,b,true);e&&Rmb(d.a,b)}while(d.a.c.length!=0){b=RD(Dyb(d),515);iOc(a,b,false)}} +function kid(){kid=geb;jid=new lid(Sye,0);cid=new lid('BOOLEAN',1);gid=new lid('INT',2);iid=new lid('STRING',3);did=new lid('DOUBLE',4);eid=new lid('ENUM',5);fid=new lid('ENUMSET',6);hid=new lid('OBJECT',7)} +function Sid(a,b){var c,d,e,f,g;d=$wnd.Math.min(a.c,b.c);f=$wnd.Math.min(a.d,b.d);e=$wnd.Math.max(a.c+a.b,b.c+b.b);g=$wnd.Math.max(a.d+a.a,b.d+b.a);if(e<d){c=d;d=e;e=c}if(g<f){c=f;f=g;g=c}Rid(a,d,f,e-d,g-f)} +function m3d(a,b){var c,d;if(a.f){while(b.Ob()){c=RD(b.Pb(),76);d=c.Lk();if(ZD(d,102)&&(RD(d,19).Bb&QHe)!=0&&(!a.e||d.pk()!=C4||d.Lj()!=0)&&c.md()!=null){b.Ub();return true}}return false}else{return b.Ob()}} +function o3d(a,b){var c,d;if(a.f){while(b.Sb()){c=RD(b.Ub(),76);d=c.Lk();if(ZD(d,102)&&(RD(d,19).Bb&QHe)!=0&&(!a.e||d.pk()!=C4||d.Lj()!=0)&&c.md()!=null){b.Pb();return true}}return false}else{return b.Sb()}} +function lke(){lke=geb;ike=cD(WC(qJ,1),Nve,2,6,[TKe,UKe,VKe,WKe,XKe,YKe,FIe]);hke=cD(WC(qJ,1),Nve,2,6,[TKe,'empty',UKe,pKe,'elementOnly']);kke=cD(WC(qJ,1),Nve,2,6,[TKe,'preserve','replace',ZKe]);jke=new Yee} +function e2b(a,b,c){var d,e,f;if(b==c){return}d=b;do{$id(a,d.c);e=d.e;if(e){f=d.d;Zid(a,f.b,f.d);$id(a,e.n);d=Y2b(e)}}while(e);d=c;do{ojd(a,d.c);e=d.e;if(e){f=d.d;njd(a,f.b,f.d);ojd(a,e.n);d=Y2b(e)}}while(e)} +function Wlc(a,b,c,d){var e,f,g,h,i;if(d.f.c+d.i.c==0){for(g=a.a[a.c],h=0,i=g.length;h<i;++h){f=g[h];Zjb(d,f,new dmc(a,f,c))}}e=RD(Wd(qtb(d.f,b)),677);e.b=0;e.c=e.f;e.c==0||gmc(RD(Vmb(e.a,e.b),294));return e} +function btc(){btc=geb;Zsc=new ctc('MEDIAN_LAYER',0);_sc=new ctc('TAIL_LAYER',1);Ysc=new ctc('HEAD_LAYER',2);$sc=new ctc('SPACE_EFFICIENT_LAYER',3);atc=new ctc('WIDEST_LAYER',4);Xsc=new ctc('CENTER_LAYER',5)} +function WGc(a){var b,c,d,e;a.e=0;for(e=Sub(a.f,0);e.b!=e.d.c;){d=RD(evb(e),10);if(d.p>=a.d.b.c.length){b=new R4b(a.d);b.p=d.p-1;Rmb(a.d.b,b);c=new R4b(a.d);c.p=d.p;Rmb(a.d.b,c)}g3b(d,RD(Vmb(a.d.b,d.p),30))}} +function DVc(a,b,c){var d,e,f;if(!a.b[b.g]){a.b[b.g]=true;d=c;!d&&(d=new YWc);Mub(d.b,b);for(f=a.a[b.g].Kc();f.Ob();){e=RD(f.Pb(),65);e.b!=b&&DVc(a,e.b,d);e.c!=b&&DVc(a,e.c,d);Mub(d.a,e)}return d}return null} +function iMb(a){switch(a.g){case 0:case 1:case 2:return qpd(),Yod;case 3:case 4:case 5:return qpd(),npd;case 6:case 7:case 8:return qpd(),ppd;case 9:case 10:case 11:return qpd(),Xod;default:return qpd(),opd;}} +function SOc(a,b){var c;if(a.c.length==0){return false}c=zDc((tFb(0,a.c.length),RD(a.c[0],18)).c.i);dOc();if(c==(wDc(),tDc)||c==sDc){return true}return yDb(GDb(new SDb(null,new Swb(a,16)),new $Oc),new aPc(b))} +function KDd(a,b){if(ZD(b,207)){return EDd(a,RD(b,27))}else if(ZD(b,193)){return FDd(a,RD(b,123))}else if(ZD(b,452)){return DDd(a,RD(b,166))}else{throw Adb(new agb(wIe+Fe(new mob(cD(WC(jJ,1),rve,1,5,[b])))))}} +function Ou(a,b,c){var d,e;this.f=a;d=RD(Wjb(a.b,b),260);e=!d?0:d.a;Sb(c,e);if(c>=(e/2|0)){this.e=!d?null:d.c;this.d=e;while(c++<e){Mu(this)}}else{this.c=!d?null:d.b;while(c-->0){Lu(this)}}this.b=b;this.a=null} +function iHb(a,b){var c,d;b.a?jHb(a,b):(c=RD(vAb(a.b,b.b),60),!!c&&c==a.a[b.b.f]&&!!c.a&&c.a!=b.b.a&&c.c.Fc(b.b),d=RD(uAb(a.b,b.b),60),!!d&&a.a[d.f]==b.b&&!!d.a&&d.a!=b.b.a&&b.b.c.Fc(d),wAb(a.b,b.b),undefined)} +function wMb(a,b){var c,d;c=RD(Vrb(a.b,b),127);if(RD(RD(Qc(a.r,b),21),87).dc()){c.n.b=0;c.n.c=0;return}c.n.b=a.C.b;c.n.c=a.C.c;a.A.Hc((Qpd(),Ppd))&&BMb(a,b);d=AMb(a,b);BLb(a,b)==(pod(),mod)&&(d+=2*a.w);c.a.a=d} +function FNb(a,b){var c,d;c=RD(Vrb(a.b,b),127);if(RD(RD(Qc(a.r,b),21),87).dc()){c.n.d=0;c.n.a=0;return}c.n.d=a.C.d;c.n.a=a.C.a;a.A.Hc((Qpd(),Ppd))&&JNb(a,b);d=INb(a,b);BLb(a,b)==(pod(),mod)&&(d+=2*a.w);c.a.b=d} +function VQb(a,b){var c,d,e,f;f=new bnb;for(d=new Anb(b);d.a<d.c.c.length;){c=RD(ynb(d),68);Rmb(f,new fRb(c,true));Rmb(f,new fRb(c,false))}e=new $Qb(a);e.a.a.$b();bGb(f,a.b,new mob(cD(WC(bN,1),rve,693,0,[e])))} +function iTb(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q;i=a.a;n=a.b;j=b.a;o=b.b;k=c.a;p=c.b;l=d.a;q=d.b;f=i*o-n*j;g=k*q-p*l;e=(i-j)*(p-q)-(n-o)*(k-l);h=(f*(k-l)-g*(i-j))/e;m=(f*(p-q)-g*(n-o))/e;return new rjd(h,m)} +function Z6b(a,b){var c,d,e;b.Ug('End label pre-processing',1);c=Kfb(UD(mQb(a,(yCc(),VBc))));d=Kfb(UD(mQb(a,ZBc)));e=Emd(RD(mQb(a,rAc),88));FDb(EDb(new SDb(null,new Swb(a.b,16)),new f7b),new h7b(c,d,e));b.Vg()} +function LFc(a,b){var c,d,e;if(a.d[b.p]){return}a.d[b.p]=true;a.a[b.p]=true;for(d=new is(Mr(a3b(b).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);if(W0b(c)){continue}e=c.d.i;a.a[e.p]?Rmb(a.b,c):LFc(a,e)}a.a[b.p]=false} +function hGc(a,b,c){var d;d=0;switch(RD(mQb(b,(yCc(),UAc)),171).g){case 2:d=2*-c+a.a;++a.a;break;case 1:d=-c;break;case 3:d=c;break;case 4:d=2*c+a.b;++a.b;}nQb(b,(Ywc(),zwc))&&(d+=RD(mQb(b,zwc),17).a);return d} +function JSc(a,b,c){var d,e,f;c.zc(b,a);Rmb(a.n,b);f=a.p.zg(b);b.j==a.p.Ag()?YSc(a.e,f):YSc(a.j,f);LSc(a);for(e=Fl(Al(cD(WC(cJ,1),rve,20,0,[new T3b(b),new _3b(b)])));gs(e);){d=RD(hs(e),12);c._b(d)||JSc(a,d,c)}} +function rZc(a,b,c){var d,e,f;c.Ug('Processor set neighbors',1);a.a=b.b.b==0?1:b.b.b;e=null;d=Sub(b.b,0);while(!e&&d.b!=d.d.c){f=RD(evb(d),40);Heb(TD(mQb(f,(q$c(),n$c))))&&(e=f)}!!e&&sZc(a,new dXc(e),c);c.Vg()} +function vsd(a){var b,c,d;c=RD(Gxd(a,(umd(),kld)),21);if(c.Hc((Qpd(),Mpd))){d=RD(Gxd(a,pld),21);b=new sjd(RD(Gxd(a,nld),8));if(d.Hc((dqd(),Ypd))){b.a<=0&&(b.a=20);b.b<=0&&(b.b=20)}return b}else{return new pjd}} +function nYd(a){var b,c,d;if(!a.b){d=new y_d;for(c=new yMd(qYd(a));c.e!=c.i.gc();){b=RD(xMd(c),19);(b.Bb&QHe)!=0&&WGd(d,b)}VHd(d);a.b=new N$d((RD(QHd(xYd((lTd(),kTd).o),8),19),d.i),d.g);yYd(a).b&=-9}return a.b} +function Dhb(a){var b,c,d;c=a.length;d=0;while(d<c&&(BFb(d,a.length),a.charCodeAt(d)<=32)){++d}b=c;while(b>d&&(BFb(b-1,a.length),a.charCodeAt(b-1)<=32)){--b}return d>0||b<c?(AFb(d,b,a.length),a.substr(d,b-d)):a} +function vqc(a,b){var c,d,e,f,g,h,i,j;i=RD(Ee(Ec(b.k),$C(E3,NAe,64,2,0,1)),126);j=b.g;c=xqc(b,i[0]);e=wqc(b,i[1]);d=oqc(a,j,c,e);f=xqc(b,i[1]);h=wqc(b,i[0]);g=oqc(a,j,f,h);if(d<=g){b.a=c;b.c=e}else{b.a=f;b.c=h}} +function Eob(a){var h;yob();var b,c,d,e,f,g;if(ZD(a,59)){for(e=0,d=a.gc()-1;e<d;++e,--d){h=a.Xb(e);a.hd(e,a.Xb(d));a.hd(d,h)}}else{b=a.ed();f=a.fd(a.gc());while(b.Tb()<f.Vb()){c=b.Pb();g=f.Ub();b.Wb(g);f.Wb(c)}}} +function lKc(a,b){var c,d,e,f,g,h;h=0;f=new wmb;hmb(f,b);while(f.b!=f.c){g=RD(smb(f),219);h+=PLc(g.d,g.e);for(e=new Anb(g.b);e.a<e.c.c.length;){d=RD(ynb(e),36);c=RD(Vmb(a.b,d.p),219);c.s||(h+=lKc(a,c))}}return h} +function QTc(a,b,c,d,e){var f,g,h,i,j;if(b){for(h=b.Kc();h.Ob();){g=RD(h.Pb(),10);for(j=d3b(g,(BEc(),zEc),c).Kc();j.Ob();){i=RD(j.Pb(),12);f=RD(Wd(qtb(e.f,i)),118);if(!f){f=new USc(a.d);ZEb(d.c,f);JSc(f,i,e)}}}}} +function wVc(a,b,c){var d,e;rVc(this);b==(dVc(),bVc)?Ysb(this.r,a.c):Ysb(this.w,a.c);c==bVc?Ysb(this.r,a.d):Ysb(this.w,a.d);sVc(this,a);d=tVc(a.c);e=tVc(a.d);vVc(this,d,e,e);this.o=(HUc(),$wnd.Math.abs(d-e)<0.2)} +function Ade(a,b,c){var d,e,f,g,h,i;h=RD(Ywd(a.a,8),2035);if(h!=null){for(e=h,f=0,g=e.length;f<g;++f){null.Um()}}d=c;if((a.a.Db&1)==0){i=new Fde(a,c,b);d.dj(i)}ZD(d,686)?RD(d,686).fj(a.a):d.cj()==a.a&&d.ej(null)} +function Cne(){var a;if(wne)return RD(N5d((YSd(),XSd),dLe),2044);Dne();a=RD(ZD(Xjb((YSd(),XSd),dLe),594)?Xjb(XSd,dLe):new Bne,594);wne=true;zne(a);Ane(a);Zjb((hTd(),gTd),a,new Ene);rBd(a);$jb(XSd,dLe,a);return a} +function NA(a,b,c,d){var e;e=EA(a,c,cD(WC(qJ,1),Nve,2,6,[Swe,Twe,Uwe,Vwe,Wwe,Xwe,Ywe]),b);e<0&&(e=EA(a,c,cD(WC(qJ,1),Nve,2,6,['Sun','Mon','Tue','Wed','Thu','Fri','Sat']),b));if(e<0){return false}d.d=e;return true} +function QA(a,b,c,d){var e;e=EA(a,c,cD(WC(qJ,1),Nve,2,6,[Swe,Twe,Uwe,Vwe,Wwe,Xwe,Ywe]),b);e<0&&(e=EA(a,c,cD(WC(qJ,1),Nve,2,6,['Sun','Mon','Tue','Wed','Thu','Fri','Sat']),b));if(e<0){return false}d.d=e;return true} +function rtb(a,b,c){var d,e,f,g;g=a.b.Ce(b);e=(d=a.a.get(g),d==null?$C(jJ,rve,1,0,5,1):d);if(e.length==0){a.a.set(g,e)}else{f=otb(a,b,e);if(f){return f.nd(c)}}bD(e,e.length,new xlb(b,c));++a.c;++a.b.g;return null} +function PYb(a){var b,c,d;MYb(a);d=new bnb;for(c=new Anb(a.a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),86);Rmb(d,new _Yb(b,true));Rmb(d,new _Yb(b,false))}TYb(a.c);t$b(d,a.b,new mob(cD(WC(wQ,1),rve,382,0,[a.c])));OYb(a)} +function eHb(a,b){var c,d,e;e=new bnb;for(d=new Anb(a.c.a.b);d.a<d.c.c.length;){c=RD(ynb(d),60);if(b.Lb(c)){Rmb(e,new sHb(c,true));Rmb(e,new sHb(c,false))}}kHb(a.e);bGb(e,a.d,new mob(cD(WC(bN,1),rve,693,0,[a.e])))} +function t7b(a){var b,c,d,e;c=new Tsb;for(e=new Anb(a.d);e.a<e.c.c.length;){d=RD(ynb(e),187);b=RD(d.of((Ywc(),dwc)),18);!!qtb(c.f,b)||Zjb(c,b,new G7b(b));Rmb(RD(Wd(qtb(c.f,b)),466).b,d)}return new dnb(new glb(c))} +function Xdc(a,b){var c,d,e,f,g;d=new xmb(a.j.c.length);c=null;for(f=new Anb(a.j);f.a<f.c.c.length;){e=RD(ynb(f),12);if(e.j!=c){d.b==d.c||Ydc(d,c,b);jmb(d);c=e.j}g=c7b(e);!!g&&(imb(d,g),true)}d.b==d.c||Ydc(d,c,b)} +function Lec(a,b){var c,d,e;d=new Jkb(a.b,0);while(d.b<d.d.gc()){c=(sFb(d.b<d.d.gc()),RD(d.d.Xb(d.c=d.b++),72));e=RD(mQb(c,(yCc(),wAc)),278);if(e==(Omd(),Mmd)){Ckb(d);Rmb(b.b,c);nQb(c,(Ywc(),dwc))||pQb(c,dwc,a)}}} +function eIc(a){var b,c,d,e,f;b=Kr(new is(Mr(a3b(a).a.Kc(),new ir)));for(e=new is(Mr(Z2b(a).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);c=d.c.i;f=Kr(new is(Mr(a3b(c).a.Kc(),new ir)));b=$wnd.Math.max(b,f)}return sgb(b)} +function Jsd(a,b,c){var d,e,f;d=RD(Gxd(a,(umd(),Kkd)),21);e=0;f=0;b.a>c.a&&(d.Hc((ukd(),okd))?(e=(b.a-c.a)/2):d.Hc(qkd)&&(e=b.a-c.a));b.b>c.b&&(d.Hc((ukd(),skd))?(f=(b.b-c.b)/2):d.Hc(rkd)&&(f=b.b-c.b));Isd(a,e,f)} +function ABd(a,b,c,d,e,f,g,h,i,j,k,l,m){ZD(a.Cb,90)&&v$d(yYd(RD(a.Cb,90)),4);PAd(a,c);a.f=g;DWd(a,h);FWd(a,i);xWd(a,j);EWd(a,k);aWd(a,l);AWd(a,m);_Vd(a,true);$Vd(a,e);a.Zk(f);YVd(a,b);d!=null&&(a.i=null,zWd(a,d))} +function Jb(a,b,c){if(a<0){return hc(qve,cD(WC(jJ,1),rve,1,5,[c,sgb(a)]))}else if(b<0){throw Adb(new agb(sve+b))}else{return hc('%s (%s) must not be greater than size (%s)',cD(WC(jJ,1),rve,1,5,[c,sgb(a),sgb(b)]))}} +function Xnb(a,b,c,d,e,f){var g,h,i,j;g=d-c;if(g<7){Unb(b,c,d,f);return}i=c+e;h=d+e;j=i+(h-i>>1);Xnb(b,a,i,j,-e,f);Xnb(b,a,j,h,-e,f);if(f.Ne(a[j-1],a[j])<=0){while(c<d){bD(b,c++,a[i++])}return}Vnb(a,i,j,h,b,c,d,f)} +function Mqc(a,b){var c,d,e,f,g,h,i;i=b.d;e=b.b.j;for(h=new Anb(i);h.a<h.c.c.length;){g=RD(ynb(h),105);f=$C(xdb,Hye,28,e.c.length,16,1);Zjb(a.b,g,f);c=g.a.d.p-1;d=g.c.d.p;while(c!=d){c=(c+1)%e.c.length;f[c]=true}}} +function rGc(a,b){nGc();if(nQb(a,(Ywc(),zwc))&&nQb(b,zwc)){return hgb(RD(mQb(a,zwc),17).a,RD(mQb(b,zwc),17).a)}throw Adb(new Ked('The BF model order layer assigner requires all real nodes to have a model order.'))} +function $Gc(a,b){SGc();if(nQb(a,(Ywc(),zwc))&&nQb(b,zwc)){return hgb(RD(mQb(a,zwc),17).a,RD(mQb(b,zwc),17).a)}throw Adb(new Ked('The DF model order layer assigner requires all real nodes to have a model order.'))} +function TSc(a,b){a.r=new USc(a.p);SSc(a.r,a);ye(a.r.j,a.j);Xub(a.j);Mub(a.j,b);Mub(a.r.e,b);LSc(a);LSc(a.r);while(a.f.c.length!=0){$Sc(RD(Vmb(a.f,0),132))}while(a.k.c.length!=0){$Sc(RD(Vmb(a.k,0),132))}return a.r} +function Wvd(a,b,c){var d,e,f;e=vYd(a.Dh(),b);d=b-a.ji();if(d<0){if(!e){throw Adb(new agb(OHe+b+PHe))}else if(e.rk()){f=a.Ih(e);f>=0?a.bi(f,c):Svd(a,e,c)}else{throw Adb(new agb(KHe+e.xe()+LHe))}}else{Bvd(a,d,e,c)}} +function n3d(a){var b,c;if(a.f){while(a.n>0){b=RD(a.k.Xb(a.n-1),76);c=b.Lk();if(ZD(c,102)&&(RD(c,19).Bb&QHe)!=0&&(!a.e||c.pk()!=C4||c.Lj()!=0)&&b.md()!=null){return true}else{--a.n}}return false}else{return a.n>0}} +function Pje(b){var c,d,e,f;d=RD(b,54)._h();if(d){try{e=null;c=N5d((YSd(),XSd),jSd(kSd(d)));if(c){f=c.ai();!!f&&(e=f.Fl(Chb(d.e)))}if(!!e&&e!=b){return Pje(e)}}catch(a){a=zdb(a);if(!ZD(a,63))throw Adb(a)}}return b} +function P3c(a,b,c){var d,e,f;c.Ug('Remove overlaps',1);c.dh(b,eFe);d=RD(Gxd(b,(u2c(),t2c)),27);a.f=d;a.a=u5c(RD(Gxd(b,($4c(),X4c)),300));e=UD(Gxd(b,(umd(),fmd)));s3c(a,(uFb(e),e));f=Q2c(d);O3c(a,b,f,c);c.dh(b,gFe)} +function Ded(a){var b,c,d;if(Heb(TD(Gxd(a,(umd(),$kd))))){d=new bnb;for(c=new is(Mr(zGd(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),74);ozd(b)&&Heb(TD(Gxd(b,_kd)))&&(ZEb(d.c,b),true)}return d}else{return yob(),yob(),vob}} +function KC(a){if(!a){return cC(),bC}var b=a.valueOf?a.valueOf():a;if(b!==a){var c=GC[typeof b];return c?c(b):NC(typeof b)}else if(a instanceof Array||a instanceof $wnd.Array){return new NB(a)}else{return new vC(a)}} +function IMb(a,b,c){var d,e,f;f=a.o;d=RD(Vrb(a.p,c),252);e=d.i;e.b=ZKb(d);e.a=YKb(d);e.b=$wnd.Math.max(e.b,f.a);e.b>f.a&&!b&&(e.b=f.a);e.c=-(e.b-f.a)/2;switch(c.g){case 1:e.d=-e.a;break;case 3:e.d=f.b;}$Kb(d);_Kb(d)} +function JMb(a,b,c){var d,e,f;f=a.o;d=RD(Vrb(a.p,c),252);e=d.i;e.b=ZKb(d);e.a=YKb(d);e.a=$wnd.Math.max(e.a,f.b);e.a>f.b&&!b&&(e.a=f.b);e.d=-(e.a-f.b)/2;switch(c.g){case 4:e.c=-e.b;break;case 2:e.c=f.a;}$Kb(d);_Kb(d)} +function nkc(a,b){var c,d,e,f,g;if(b.dc()){return}e=RD(b.Xb(0),131);if(b.gc()==1){mkc(a,e,e,1,0,b);return}c=1;while(c<b.gc()){if(e.j||!e.o){f=skc(b,c);if(f){d=RD(f.a,17).a;g=RD(f.b,131);mkc(a,e,g,c,d,b);c=d+1;e=g}}}} +function Soc(a){var b,c,d,e,f,g;g=new dnb(a.d);_mb(g,new upc);b=(epc(),cD(WC(hW,1),jwe,276,0,[Zoc,apc,Yoc,dpc,_oc,$oc,cpc,bpc]));c=0;for(f=new Anb(g);f.a<f.c.c.length;){e=RD(ynb(f),105);d=b[c%b.length];Uoc(e,d);++c}} +function zid(a,b){tid();var c,d,e,f;if(b.b<2){return false}f=Sub(b,0);c=RD(evb(f),8);d=c;while(f.b!=f.d.c){e=RD(evb(f),8);if(!(xid(a,d)&&xid(a,e))){return false}d=e}if(!(xid(a,d)&&xid(a,c))){return false}return true} +function HEd(a,b){var c,d,e,f,g,h,i,j,k,l;k=null;l=a;g=vDd(l,'x');c=new iFd(b);eEd(c.a,g);h=vDd(l,'y');d=new jFd(b);fEd(d.a,h);i=vDd(l,fIe);e=new kFd(b);gEd(e.a,i);j=vDd(l,eIe);f=new lFd(b);k=(hEd(f.a,j),j);return k} +function v$d(a,b){r$d(a,b);(a.b&1)!=0&&(a.a.a=null);(a.b&2)!=0&&(a.a.f=null);if((a.b&4)!=0){a.a.g=null;a.a.i=null}if((a.b&16)!=0){a.a.d=null;a.a.e=null}(a.b&8)!=0&&(a.a.b=null);if((a.b&32)!=0){a.a.j=null;a.a.c=null}} +function Lde(b,c){var d,e,f;f=0;if(c.length>0){try{f=Oeb(c,qwe,lve)}catch(a){a=zdb(a);if(ZD(a,130)){e=a;throw Adb(new RSd(e))}else throw Adb(a)}}d=(!b.a&&(b.a=new Zde(b)),b.a);return f<d.i&&f>=0?RD(QHd(d,f),58):null} +function Ib(a,b){if(a<0){return hc(qve,cD(WC(jJ,1),rve,1,5,['index',sgb(a)]))}else if(b<0){throw Adb(new agb(sve+b))}else{return hc('%s (%s) must be less than size (%s)',cD(WC(jJ,1),rve,1,5,['index',sgb(a),sgb(b)]))}} +function cob(a){var b,c,d,e,f;if(a==null){return vve}f=new Jyb(pve,'[',']');for(c=a,d=0,e=c.length;d<e;++d){b=c[d];!f.a?(f.a=new dib(f.d)):Zhb(f.a,f.b);Whb(f.a,''+b)}return !f.a?f.c:f.e.length==0?f.a.a:f.a.a+(''+f.e)} +function dob(a){var b,c,d,e,f;if(a==null){return vve}f=new Jyb(pve,'[',']');for(c=a,d=0,e=c.length;d<e;++d){b=c[d];!f.a?(f.a=new dib(f.d)):Zhb(f.a,f.b);Whb(f.a,''+b)}return !f.a?f.c:f.e.length==0?f.a.a:f.a.a+(''+f.e)} +function eob(a){var b,c,d,e,f;if(a==null){return vve}f=new Jyb(pve,'[',']');for(c=a,d=0,e=c.length;d<e;++d){b=c[d];!f.a?(f.a=new dib(f.d)):Zhb(f.a,f.b);Whb(f.a,''+b)}return !f.a?f.c:f.e.length==0?f.a.a:f.a.a+(''+f.e)} +function hob(a){var b,c,d,e,f;if(a==null){return vve}f=new Jyb(pve,'[',']');for(c=a,d=0,e=c.length;d<e;++d){b=c[d];!f.a?(f.a=new dib(f.d)):Zhb(f.a,f.b);Whb(f.a,''+b)}return !f.a?f.c:f.e.length==0?f.a.a:f.a.a+(''+f.e)} +function kwb(a,b){var c,d,e,f,g,h;c=a.b.c.length;e=Vmb(a.b,b);while(b*2+1<c){d=(f=2*b+1,g=f+1,h=f,g<c&&a.a.Ne(Vmb(a.b,g),Vmb(a.b,f))<0&&(h=g),h);if(a.a.Ne(e,Vmb(a.b,d))<0){break}$mb(a.b,b,Vmb(a.b,d));b=d}$mb(a.b,b,e)} +function oJb(a,b,c){var d,e;d=c.d;e=c.e;if(a.g[d.d]<=a.i[b.d]&&a.i[b.d]<=a.i[d.d]&&a.g[e.d]<=a.i[b.d]&&a.i[b.d]<=a.i[e.d]){if(a.i[d.d]<a.i[e.d]){return false}return true}if(a.i[d.d]<a.i[e.d]){return true}return false} +function SWb(a,b){var c;c=RD(mQb(b,(yCc(),oAc)),322);if(c!=a){throw Adb(new Ked('The hierarchy aware processor '+c+' in child node '+b+' is only allowed if the root node specifies the same hierarchical processor.'))}} +function Kee(a,b){var c,d,e,f,g;d=(!b.s&&(b.s=new C5d(y7,b,21,17)),b.s);f=null;for(e=0,g=d.i;e<g;++e){c=RD(QHd(d,e),179);switch(yfe(Qee(a,c))){case 2:case 3:{!f&&(f=new bnb);ZEb(f.c,c)}}}return !f?(yob(),yob(),vob):f} +function PQb(a,b,c){var d,e,f,g,h,i;i=oxe;for(f=new Anb(nRb(a.b));f.a<f.c.c.length;){e=RD(ynb(f),177);for(h=new Anb(nRb(b.b));h.a<h.c.c.length;){g=RD(ynb(h),177);d=Aid(e.a,e.b,g.a,g.b,c);i=$wnd.Math.min(i,d)}}return i} +function Q3b(a,b){if(!b){throw Adb(new Ngb)}a.j=b;if(!a.d){switch(a.j.g){case 1:a.a.a=a.o.a/2;a.a.b=0;break;case 2:a.a.a=a.o.a;a.a.b=a.o.b/2;break;case 3:a.a.a=a.o.a/2;a.a.b=a.o.b;break;case 4:a.a.a=0;a.a.b=a.o.b/2;}}} +function Jic(a,b){var c,d,e;if(ZD(b.g,10)&&RD(b.g,10).k==(r3b(),m3b)){return oxe}e=$jc(b);if(e){return $wnd.Math.max(0,a.b/2-0.5)}c=Zjc(b);if(c){d=Kfb(UD(hFc(c,(yCc(),bCc))));return $wnd.Math.max(0,d/2-0.5)}return oxe} +function Lic(a,b){var c,d,e;if(ZD(b.g,10)&&RD(b.g,10).k==(r3b(),m3b)){return oxe}e=$jc(b);if(e){return $wnd.Math.max(0,a.b/2-0.5)}c=Zjc(b);if(c){d=Kfb(UD(hFc(c,(yCc(),bCc))));return $wnd.Math.max(0,d/2-0.5)}return oxe} +function Jkc(a,b){lkc();var c,d,e,f,g,h;c=null;for(g=b.Kc();g.Ob();){f=RD(g.Pb(),131);if(f.o){continue}d=Qid(f.a);e=Nid(f.a);h=new Nlc(d,e,null,RD(f.d.a.ec().Kc().Pb(),18));Rmb(h.c,f.a);ZEb(a.c,h);!!c&&Rmb(c.d,h);c=h}} +function bmc(a){var b,c,d,e,f,g;g=aMc(a.d,a.e);for(f=g.Kc();f.Ob();){e=RD(f.Pb(),12);d=a.e==(qpd(),ppd)?e.e:e.g;for(c=new Anb(d);c.a<c.c.c.length;){b=RD(ynb(c),18);if(!W0b(b)&&b.c.i.c!=b.d.i.c){Zlc(a,b);++a.f;++a.c}}}} +function Wsc(a,b){var c,d;if(b.dc()){return yob(),yob(),vob}d=new bnb;Rmb(d,sgb(qwe));for(c=1;c<a.f;++c){a.a==null&&usc(a);a.a[c]&&Rmb(d,sgb(c))}if(d.c.length==1){return yob(),yob(),vob}Rmb(d,sgb(lve));return Vsc(b,d)} +function kOc(a,b){var c,d,e,f,g,h,i;g=b.c.i.k!=(r3b(),p3b);i=g?b.d:b.c;c=U0b(b,i).i;e=RD(Wjb(a.k,i),125);d=a.i[c.p].a;if($2b(i.i)<(!c.c?-1:Wmb(c.c.a,c,0))){f=e;h=d}else{f=d;h=e}rIb(uIb(tIb(vIb(sIb(new wIb,0),4),f),h))} +function ODd(a,b,c){var d,e,f,g,h,i;if(c){e=c.a.length;d=new vue(e);for(h=(d.b-d.a)*d.c<0?(uue(),tue):new Rue(d);h.Ob();){g=RD(h.Pb(),17);i=uEd(a,tDd(JB(c,g.a)));if(i){f=(!b.b&&(b.b=new Yie(E4,b,4,7)),b.b);WGd(f,i)}}}} +function PDd(a,b,c){var d,e,f,g,h,i;if(c){e=c.a.length;d=new vue(e);for(h=(d.b-d.a)*d.c<0?(uue(),tue):new Rue(d);h.Ob();){g=RD(h.Pb(),17);i=uEd(a,tDd(JB(c,g.a)));if(i){f=(!b.c&&(b.c=new Yie(E4,b,5,8)),b.c);WGd(f,i)}}}} +function Bo(a,b,c){var d,e;d=b.a&a.f;b.b=a.b[d];a.b[d]=b;e=b.f&a.f;b.d=a.c[e];a.c[e]=b;if(!c){b.e=a.e;b.c=null;!a.e?(a.a=b):(a.e.c=b);a.e=b}else{b.e=c.e;!b.e?(a.a=b):(b.e.c=b);b.c=c.c;!b.c?(a.e=b):(b.c.e=b)}++a.i;++a.g} +function Ir(a){var b,c,d;b=a.Pb();if(!a.Ob()){return b}d=Yhb(Zhb(new bib,'expected one element but was: <'),b);for(c=0;c<4&&a.Ob();c++){Yhb((d.a+=pve,d),a.Pb())}a.Ob()&&(d.a+=', ...',d);d.a+='>';throw Adb(new agb(d.a))} +function cB(a){var b,c;c=-a.a;b=cD(WC(hE,1),zwe,28,15,[43,48,48,48,48]);if(c<0){b[0]=45;c=-c}b[1]=b[1]+((c/60|0)/10|0)&Bwe;b[2]=b[2]+(c/60|0)%10&Bwe;b[3]=b[3]+(c%60/10|0)&Bwe;b[4]=b[4]+c%10&Bwe;return Ihb(b,0,b.length)} +function V2b(a){var b,c,d,e;a.g=new Zrb(RD(Qb(E3),297));d=0;c=(qpd(),Yod);b=0;for(;b<a.j.c.length;b++){e=RD(Vmb(a.j,b),12);if(e.j!=c){d!=b&&Wrb(a.g,c,new Ptd(sgb(d),sgb(b)));c=e.j;d=b}}Wrb(a.g,c,new Ptd(sgb(d),sgb(b)))} +function u7b(a){var b,c,d,e,f,g,h;d=0;for(c=new Anb(a.b);c.a<c.c.c.length;){b=RD(ynb(c),30);for(f=new Anb(b.a);f.a<f.c.c.length;){e=RD(ynb(f),10);e.p=d++;for(h=new Anb(e.j);h.a<h.c.c.length;){g=RD(ynb(h),12);g.p=d++}}}} +function Tvd(a,b){var c,d,e;e=Eee((lke(),jke),a.Dh(),b);if(e){nke();RD(e,69).xk()||(e=zfe(Qee(jke,e)));d=(c=a.Ih(e),RD(c>=0?a.Lh(c,true,true):Qvd(a,e,true),160));RD(d,220).Zl(b)}else{throw Adb(new agb(KHe+b.xe()+LHe))}} +function Cib(a){var b,c;if(a>-140737488355328&&a<140737488355328){if(a==0){return 0}b=a<0;b&&(a=-a);c=eE($wnd.Math.floor($wnd.Math.log(a)/0.6931471805599453));(!b||a!=$wnd.Math.pow(2,c))&&++c;return c}return Dib(Hdb(a))} +function oTc(a){var b,c,d,e,f,g,h;f=new Iub;for(c=new Anb(a);c.a<c.c.c.length;){b=RD(ynb(c),132);g=b.a;h=b.b;if(f.a._b(g)||f.a._b(h)){continue}e=g;d=h;if(g.e.b+g.j.b>2&&h.e.b+h.j.b<=2){e=h;d=g}f.a.zc(e,f);e.q=d}return f} +function B5c(a,b,c){c.Ug('Eades radial',1);c.dh(b,gFe);a.d=RD(Gxd(b,(u2c(),t2c)),27);a.c=Kfb(UD(Gxd(b,($4c(),S4c))));a.e=u5c(RD(Gxd(b,X4c),300));a.a=Z3c(RD(Gxd(b,Z4c),434));a.b=k5c(RD(Gxd(b,O4c),354));C5c(a);c.dh(b,gFe)} +function t8c(a,b){b.Ug('Target Width Setter',1);if(Hxd(a,(X7c(),W7c))){Ixd(a,(X6c(),W6c),UD(Gxd(a,W7c)))}else{throw Adb(new Jed('A target width has to be set if the TargetWidthWidthApproximator should be used.'))}b.Vg()} +function _8b(a,b){var c,d,e;d=new j3b(a);kQb(d,b);pQb(d,(Ywc(),gwc),b);pQb(d,(yCc(),BBc),(Bod(),wod));pQb(d,Rzc,(Rjd(),Njd));h3b(d,(r3b(),m3b));c=new R3b;P3b(c,d);Q3b(c,(qpd(),ppd));e=new R3b;P3b(e,d);Q3b(e,Xod);return d} +function ttc(a){switch(a.g){case 0:return new FKc((RKc(),OKc));case 1:return new aKc;case 2:return new FLc;default:throw Adb(new agb('No implementation is available for the crossing minimizer '+(a.f!=null?a.f:''+a.g)));}} +function THc(a,b){var c,d,e,f,g;a.c[b.p]=true;Rmb(a.a,b);for(g=new Anb(b.j);g.a<g.c.c.length;){f=RD(ynb(g),12);for(d=new l4b(f.b);xnb(d.a)||xnb(d.b);){c=RD(xnb(d.a)?ynb(d.a):ynb(d.b),18);e=UHc(f,c).i;a.c[e.p]||THc(a,e)}}} +function J2c(a){var b,c,d,e,f,g,h;g=0;for(c=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));c.e!=c.i.gc();){b=RD(bMd(c),27);h=b.g;e=b.f;d=$wnd.Math.sqrt(h*h+e*e);g=$wnd.Math.max(d,g);f=J2c(b);g=$wnd.Math.max(f,g)}return g} +function Pod(){Pod=geb;Nod=new Qod('OUTSIDE',0);Lod=new Qod('INSIDE',1);Mod=new Qod('NEXT_TO_PORT_IF_POSSIBLE',2);Kod=new Qod('ALWAYS_SAME_SIDE',3);Jod=new Qod('ALWAYS_OTHER_SAME_SIDE',4);Ood=new Qod('SPACE_EFFICIENT',5)} +function DEd(a,b,c){var d,e,f,h,i,j;d=rEd(a,(e=(bvd(),f=new ACd,f),!!c&&yCd(e,c),e),b);jyd(d,zDd(b,uIe));GEd(b,d);BEd(b,d);HEd(b,d);g=null;h=b;i=wDd(h,'ports');j=new hFd(a,d);dEd(j.a,j.b,i);CEd(a,b,d);xEd(a,b,d);return d} +function bB(a){var b,c;c=-a.a;b=cD(WC(hE,1),zwe,28,15,[43,48,48,58,48,48]);if(c<0){b[0]=45;c=-c}b[1]=b[1]+((c/60|0)/10|0)&Bwe;b[2]=b[2]+(c/60|0)%10&Bwe;b[4]=b[4]+(c%60/10|0)&Bwe;b[5]=b[5]+c%10&Bwe;return Ihb(b,0,b.length)} +function eB(a){var b;b=cD(WC(hE,1),zwe,28,15,[71,77,84,45,48,48,58,48,48]);if(a<=0){b[3]=43;a=-a}b[4]=b[4]+((a/60|0)/10|0)&Bwe;b[5]=b[5]+(a/60|0)%10&Bwe;b[7]=b[7]+(a%60/10|0)&Bwe;b[8]=b[8]+a%10&Bwe;return Ihb(b,0,b.length)} +function fob(a){var b,c,d,e,f;if(a==null){return vve}f=new Jyb(pve,'[',']');for(c=a,d=0,e=c.length;d<e;++d){b=c[d];!f.a?(f.a=new dib(f.d)):Zhb(f.a,f.b);Whb(f.a,''+Zdb(b))}return !f.a?f.c:f.e.length==0?f.a.a:f.a.a+(''+f.e)} +function uJb(a,b){var c,d,e;e=lve;for(d=new Anb(CIb(b));d.a<d.c.c.length;){c=RD(ynb(d),218);if(c.f&&!a.c[c.c]){a.c[c.c]=true;e=$wnd.Math.min(e,uJb(a,oIb(c,b)))}}a.i[b.d]=a.j;a.g[b.d]=$wnd.Math.min(e,a.j++);return a.g[b.d]} +function vNb(a,b){var c,d,e;for(e=RD(RD(Qc(a.r,b),21),87).Kc();e.Ob();){d=RD(e.Pb(),117);d.e.b=(c=d.b,c.pf((umd(),Gld))?c.ag()==(qpd(),Yod)?-c.Mf().b-Kfb(UD(c.of(Gld))):Kfb(UD(c.of(Gld))):c.ag()==(qpd(),Yod)?-c.Mf().b:0)}} +function CSb(a){var b,c,d,e,f,g,h;c=zRb(a.e);f=ijd(njd(ajd(yRb(a.e)),a.d*a.a,a.c*a.b),-0.5);b=c.a-f.a;e=c.b-f.b;for(h=0;h<a.c;h++){d=b;for(g=0;g<a.d;g++){ARb(a.e,new Uid(d,e,a.a,a.b))&&TPb(a,g,h,false,true);d+=a.a}e+=a.b}} +function H0c(a){var b,c,d,e,f;b=a.a;c=a.b;e=a.c;d=new rjd(c.e.a+c.f.a/2,c.e.b+c.f.b/2);f=new rjd(e.e.a+e.f.a/2,e.e.b+e.f.b/2);Pub(b,d,b.a,b.a.a);Pub(b,f,b.c.b,b.c);tWc(d,RD(ju(b,1),8),a.b.f);tWc(f,RD(ju(b,b.b-2),8),a.c.f)} +function tDd(a){var b,c;c=false;if(ZD(a,211)){c=true;return RD(a,211).a}if(!c){if(ZD(a,263)){b=RD(a,263).a%1==0;if(b){c=true;return sgb(Ofb(RD(a,263).a))}}}throw Adb(new CDd("Id must be a string or an integer: '"+a+"'."))} +function Kde(a,b){var c,d,e,f,g,h;f=null;for(e=new Xde((!a.a&&(a.a=new Zde(a)),a.a));Ude(e);){c=RD(tId(e),58);d=(g=c.Dh(),h=(mYd(g),g.o),!h||!c.Xh(h)?null:Hje(iXd(h),c.Mh(h)));if(d!=null){if(lhb(d,b)){f=c;break}}}return f} +function Rw(a,b,c){var d,e,f,g,h;dk(c,'occurrences');if(c==0){return h=RD(Xv(nd(a.a),b),16),!h?0:h.gc()}g=RD(Xv(nd(a.a),b),16);if(!g){return 0}f=g.gc();if(c>=f){g.$b()}else{e=g.Kc();for(d=0;d<c;d++){e.Pb();e.Qb()}}return f} +function qx(a,b,c){var d,e,f,g;dk(c,'oldCount');dk(0,'newCount');d=RD(Xv(nd(a.a),b),16);if((!d?0:d.gc())==c){dk(0,'count');e=(f=RD(Xv(nd(a.a),b),16),!f?0:f.gc());g=-e;g>0?Hh():g<0&&Rw(a,b,-g);return true}else{return false}} +function YKb(a){var b,c,d,e,f,g,h;h=0;if(a.b==0){g=aLb(a,true);b=0;for(d=g,e=0,f=d.length;e<f;++e){c=d[e];if(c>0){h+=c;++b}}b>1&&(h+=a.c*(b-1))}else{h=Vvb(SCb(HDb(CDb(_nb(a.a),new oLb),new qLb)))}return h>0?h+a.n.d+a.n.a:0} +function ZKb(a){var b,c,d,e,f,g,h;h=0;if(a.b==0){h=Vvb(SCb(HDb(CDb(_nb(a.a),new kLb),new mLb)))}else{g=bLb(a,true);b=0;for(d=g,e=0,f=d.length;e<f;++e){c=d[e];if(c>0){h+=c;++b}}b>1&&(h+=a.c*(b-1))}return h>0?h+a.n.b+a.n.c:0} +function UOc(a){var b,c;if(a.c.length!=2){throw Adb(new dgb('Order only allowed for two paths.'))}b=(tFb(0,a.c.length),RD(a.c[0],18));c=(tFb(1,a.c.length),RD(a.c[1],18));if(b.d.i!=c.c.i){a.c.length=0;ZEb(a.c,c);ZEb(a.c,b)}} +function O8c(a,b,c){var d;zyd(c,b.g,b.f);Byd(c,b.i,b.j);for(d=0;d<(!b.a&&(b.a=new C5d(J4,b,10,11)),b.a).i;d++){O8c(a,RD(QHd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a),d),27),RD(QHd((!c.a&&(c.a=new C5d(J4,c,10,11)),c.a),d),27))}} +function DMb(a,b){var c,d,e,f;f=RD(Vrb(a.b,b),127);c=f.a;for(e=RD(RD(Qc(a.r,b),21),87).Kc();e.Ob();){d=RD(e.Pb(),117);!!d.c&&(c.a=$wnd.Math.max(c.a,QKb(d.c)))}if(c.a>0){switch(b.g){case 2:f.n.c=a.s;break;case 4:f.n.b=a.s;}}} +function ETb(a,b){var c,d,e;c=RD(mQb(b,(yVb(),lVb)),17).a-RD(mQb(a,lVb),17).a;if(c==0){d=ojd(ajd(RD(mQb(a,(JVb(),FVb)),8)),RD(mQb(a,GVb),8));e=ojd(ajd(RD(mQb(b,FVb),8)),RD(mQb(b,GVb),8));return Qfb(d.a*d.b,e.a*e.b)}return c} +function JVc(a,b){var c,d,e;c=RD(mQb(b,(h_c(),X$c)),17).a-RD(mQb(a,X$c),17).a;if(c==0){d=ojd(ajd(RD(mQb(a,(q$c(),RZc)),8)),RD(mQb(a,SZc),8));e=ojd(ajd(RD(mQb(b,RZc),8)),RD(mQb(b,SZc),8));return Qfb(d.a*d.b,e.a*e.b)}return c} +function _0b(a){var b,c;c=new bib;c.a+='e_';b=S0b(a);b!=null&&(c.a+=''+b,c);if(!!a.c&&!!a.d){Zhb((c.a+=' ',c),M3b(a.c));Zhb(Yhb((c.a+='[',c),a.c.i),']');Zhb((c.a+=SAe,c),M3b(a.d));Zhb(Yhb((c.a+='[',c),a.d.i),']')}return c.a} +function ZVc(a){switch(a.g){case 0:return new N_c;case 1:return new V_c;case 2:return new x0c;case 3:return new J0c;default:throw Adb(new agb('No implementation is available for the layout phase '+(a.f!=null?a.f:''+a.g)));}} +function qsd(a,b,c,d,e){var f;f=0;switch(e.g){case 1:f=$wnd.Math.max(0,b.b+a.b-(c.b+d));break;case 3:f=$wnd.Math.max(0,-a.b-d);break;case 2:f=$wnd.Math.max(0,-a.a-d);break;case 4:f=$wnd.Math.max(0,b.a+a.a-(c.a+d));}return f} +function MDd(a,b,c){var d,e,f,g,h;if(c){e=c.a.length;d=new vue(e);for(h=(d.b-d.a)*d.c<0?(uue(),tue):new Rue(d);h.Ob();){g=RD(h.Pb(),17);f=xDd(c,g.a);kIe in f.a||lIe in f.a?yEd(a,f,b):EEd(a,f,b);OGd(RD(Wjb(a.b,uDd(f)),74))}}} +function jXd(a){var b,c;switch(a.b){case -1:{return true}case 0:{c=a.t;if(c>1||c==-1){a.b=-1;return true}else{b=WVd(a);if(!!b&&(nke(),b.lk()==aKe)){a.b=-1;return true}else{a.b=1;return false}}}default:case 1:{return false}}} +function Sqe(a,b){var c,d,e,f;Mqe(a);if(a.c!=0||a.a!=123)throw Adb(new Lqe(TId((Hde(),eJe))));f=b==112;d=a.d;c=phb(a.i,125,d);if(c<0)throw Adb(new Lqe(TId((Hde(),fJe))));e=zhb(a.i,d,c);a.d=c+1;return ite(e,f,(a.e&512)==512)} +function YTb(a){var b,c,d,e,f,g,h;d=a.a.c.length;if(d>0){g=a.c.d;h=a.d.d;e=ijd(ojd(new rjd(h.a,h.b),g),1/(d+1));f=new rjd(g.a,g.b);for(c=new Anb(a.a);c.a<c.c.c.length;){b=RD(ynb(c),250);b.d.a=f.a+e.a;b.d.b=f.b+e.b;$id(f,e)}}} +function HXd(a,b){var c,d,e;if(!b){JXd(a,null);zXd(a,null)}else if((b.i&4)!=0){d='[]';for(c=b.c;;c=c.c){if((c.i&4)==0){e=shb((lfb(c),c.o+d));JXd(a,e);zXd(a,e);break}d+='[]'}}else{e=shb((lfb(b),b.o));JXd(a,e);zXd(a,e)}a.hl(b)} +function Bge(a,b,c,d,e){var f,g,h,i;i=Age(a,RD(e,58));if(dE(i)!==dE(e)){h=RD(a.g[c],76);f=oke(b,i);MHd(a,c,Tge(a,c,f));if(Mvd(a.e)){g=fge(a,9,f.Lk(),e,i,d,false);oKd(g,new P3d(a.e,9,a.c,h,f,d,false));pKd(g)}return i}return e} +function AGc(a,b,c){var d,e,f,g,h,i;d=RD(Qc(a.c,b),15);e=RD(Qc(a.c,c),15);f=d.fd(d.gc());g=e.fd(e.gc());while(f.Sb()&&g.Sb()){h=RD(f.Ub(),17);i=RD(g.Ub(),17);if(h!=i){return hgb(h.a,i.a)}}return !f.Ob()&&!g.Ob()?0:f.Ob()?1:-1} +function FHc(a){var b,c,d,e,f,g,h;h=ev(a.c.length);for(e=new Anb(a);e.a<e.c.c.length;){d=RD(ynb(e),10);g=new _sb;f=a3b(d);for(c=new is(Mr(f.a.Kc(),new ir));gs(c);){b=RD(hs(c),18);b.c.i==b.d.i||Ysb(g,b.d.i)}ZEb(h.c,g)}return h} +function xhd(c,d){var e,f,g;try{g=xs(c.a,d);return g}catch(b){b=zdb(b);if(ZD(b,33)){try{f=Oeb(d,qwe,lve);e=mfb(c.a);if(f>=0&&f<e.length){return e[f]}}catch(a){a=zdb(a);if(!ZD(a,130))throw Adb(a)}return null}else throw Adb(b)}} +function Rvd(a,b){var c,d,e;e=Eee((lke(),jke),a.Dh(),b);if(e){nke();RD(e,69).xk()||(e=zfe(Qee(jke,e)));d=(c=a.Ih(e),RD(c>=0?a.Lh(c,true,true):Qvd(a,e,true),160));return RD(d,220).Wl(b)}else{throw Adb(new agb(KHe+b.xe()+NHe))}} +function _ae(){Tae();var a;if(Sae)return RD(N5d((YSd(),XSd),AKe),2038);RRd(UK,new hde);abe();a=RD(ZD(Xjb((YSd(),XSd),AKe),560)?Xjb(XSd,AKe):new $ae,560);Sae=true;Yae(a);Zae(a);Zjb((hTd(),gTd),a,new cbe);$jb(XSd,AKe,a);return a} +function Vfe(a,b){var c,d,e,f;a.j=-1;if(Mvd(a.e)){c=a.i;f=a.i!=0;LHd(a,b);d=new P3d(a.e,3,a.c,null,b,c,f);e=b.zl(a.e,a.c,null);e=Hge(a,b,e);if(!e){qvd(a.e,d)}else{e.nj(d);e.oj()}}else{LHd(a,b);e=b.zl(a.e,a.c,null);!!e&&e.oj()}} +function HA(a,b){var c,d,e;e=0;d=b[0];if(d>=a.length){return -1}c=(BFb(d,a.length),a.charCodeAt(d));while(c>=48&&c<=57){e=e*10+(c-48);++d;if(d>=a.length){break}c=(BFb(d,a.length),a.charCodeAt(d))}d>b[0]?(b[0]=d):(e=-1);return e} +function mPb(a){var b,c,d,e,f;e=RD(a.a,17).a;f=RD(a.b,17).a;c=e;d=f;b=$wnd.Math.max($wnd.Math.abs(e),$wnd.Math.abs(f));if(e<=0&&e==f){c=0;d=f-1}else{if(e==-b&&f!=b){c=f;d=e;f>=0&&++c}else{c=-f;d=e}}return new Ptd(sgb(c),sgb(d))} +function YPb(a,b,c,d){var e,f,g,h,i,j;for(e=0;e<b.o;e++){f=e-b.j+c;for(g=0;g<b.p;g++){h=g-b.k+d;if((i=f,j=h,i+=a.j,j+=a.k,i>=0&&j>=0&&i<a.o&&j<a.p)&&(!QPb(b,e,g)&&$Pb(a,f,h)||PPb(b,e,g)&&!_Pb(a,f,h))){return true}}}return false} +function jSc(a,b,c){var d,e,f,g,h;g=a.c;h=a.d;f=xjd(cD(WC(l3,1),Nve,8,0,[g.i.n,g.n,g.a])).b;e=(f+xjd(cD(WC(l3,1),Nve,8,0,[h.i.n,h.n,h.a])).b)/2;d=null;g.j==(qpd(),Xod)?(d=new rjd(b+g.i.c.c.a+c,e)):(d=new rjd(b-c,e));hu(a.a,0,d)} +function ozd(a){var b,c,d,e;b=null;for(d=Fl(Al(cD(WC(cJ,1),rve,20,0,[(!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),(!a.c&&(a.c=new Yie(E4,a,5,8)),a.c)])));gs(d);){c=RD(hs(d),84);e=AGd(c);if(!b){b=e}else if(b!=e){return false}}return true} +function SHd(a,b,c){var d;++a.j;if(b>=a.i)throw Adb(new veb(MIe+b+NIe+a.i));if(c>=a.i)throw Adb(new veb(OIe+c+NIe+a.i));d=a.g[c];if(b!=c){b<c?hib(a.g,b,a.g,b+1,c-b):hib(a.g,c+1,a.g,c,b-c);bD(a.g,b,d);a.Pi(b,d,c);a.Ni()}return d} +function Rc(a,b,c){var d;d=RD(a.c.xc(b),16);if(!d){d=a.ic(b);if(d.Fc(c)){++a.d;a.c.zc(b,d);return true}else{throw Adb(new Deb('New Collection violated the Collection spec'))}}else if(d.Fc(c)){++a.d;return true}else{return false}} +function ngb(a){var b,c,d;if(a<0){return 0}else if(a==0){return 32}else{d=-(a>>16);b=d>>16&16;c=16-b;a=a>>b;d=a-256;b=d>>16&8;c+=b;a<<=b;d=a-qxe;b=d>>16&4;c+=b;a<<=b;d=a-Ove;b=d>>16&2;c+=b;a<<=b;d=a>>14;b=d&~(d>>1);return c+2-b}} +function RSb(a){HSb();var b,c,d,e;GSb=new bnb;FSb=new Tsb;ESb=new bnb;b=(!a.a&&(a.a=new C5d(J4,a,10,11)),a.a);JSb(b);for(e=new dMd(b);e.e!=e.i.gc();){d=RD(bMd(e),27);if(Wmb(GSb,d,0)==-1){c=new bnb;Rmb(ESb,c);KSb(d,c)}}return ESb} +function sTb(a,b,c){var d,e,f,g;a.a=c.b.d;if(ZD(b,326)){e=IGd(RD(b,74),false,false);f=ssd(e);d=new wTb(a);xgb(f,d);lsd(f,e);b.of((umd(),cld))!=null&&xgb(RD(b.of(cld),75),d)}else{g=RD(b,422);g.rh(g.nh()+a.a.a);g.sh(g.oh()+a.a.b)}} +function hWc(a,b){var c,d,e;e=new bnb;for(d=Sub(b.a,0);d.b!=d.d.c;){c=RD(evb(d),65);c.c.g==a.g&&dE(mQb(c.b,(h_c(),f_c)))!==dE(mQb(c.c,f_c))&&!yDb(new SDb(null,new Swb(e,16)),new IWc(c))&&(ZEb(e.c,c),true)}_mb(e,new KWc);return e} +function fUb(a,b,c){var d,e,f,g;if(ZD(b,153)&&ZD(c,153)){f=RD(b,153);g=RD(c,153);return a.a[f.a][g.a]+a.a[g.a][f.a]}else if(ZD(b,250)&&ZD(c,250)){d=RD(b,250);e=RD(c,250);if(d.a==e.a){return RD(mQb(e.a,(yVb(),lVb)),17).a}}return 0} +function q9b(a,b){var c,d,e,f,g,h,i,j;j=Kfb(UD(mQb(b,(yCc(),fCc))));i=a[0].n.a+a[0].o.a+a[0].d.c+j;for(h=1;h<a.length;h++){d=a[h].n;e=a[h].o;c=a[h].d;f=d.a-c.b-i;f<0&&(d.a-=f);g=b.f;g.a=$wnd.Math.max(g.a,d.a+e.a);i=d.a+e.a+c.c+j}} +function Nad(a,b){var c,d,e,f,g,h;d=RD(RD(Wjb(a.g,b.a),42).a,68);e=RD(RD(Wjb(a.g,b.b),42).a,68);f=d.b;g=e.b;c=Kid(f,g);if(c>=0){return c}h=ejd(ojd(new rjd(g.c+g.b/2,g.d+g.a/2),new rjd(f.c+f.b/2,f.d+f.a/2)));return -(oRb(f,g)-1)*h} +function ysd(a,b,c){var d;FDb(new SDb(null,(!c.a&&(c.a=new C5d(F4,c,6,6)),new Swb(c.a,16))),new Qsd(a,b));FDb(new SDb(null,(!c.n&&(c.n=new C5d(I4,c,1,7)),new Swb(c.n,16))),new Ssd(a,b));d=RD(Gxd(c,(umd(),cld)),75);!!d&&Bjd(d,a,b)} +function Qvd(a,b,c){var d,e,f;f=Eee((lke(),jke),a.Dh(),b);if(f){nke();RD(f,69).xk()||(f=zfe(Qee(jke,f)));e=(d=a.Ih(f),RD(d>=0?a.Lh(d,true,true):Qvd(a,f,true),160));return RD(e,220).Sl(b,c)}else{throw Adb(new agb(KHe+b.xe()+NHe))}} +function WNd(a,b,c,d){var e,f,g,h,i;e=a.d[b];if(e){f=e.g;i=e.i;if(d!=null){for(h=0;h<i;++h){g=RD(f[h],136);if(g.Bi()==c&&pb(d,g.ld())){return g}}}else{for(h=0;h<i;++h){g=RD(f[h],136);if(dE(g.ld())===dE(d)){return g}}}}return null} +function Nee(a,b){var c,d,e,f,g;d=(!b.s&&(b.s=new C5d(y7,b,21,17)),b.s);f=null;for(e=0,g=d.i;e<g;++e){c=RD(QHd(d,e),179);switch(yfe(Qee(a,c))){case 4:case 5:case 6:{!f&&(f=new bnb);ZEb(f.c,c);break}}}return !f?(yob(),yob(),vob):f} +function Yib(a,b){var c;if(b<0){throw Adb(new teb('Negative exponent'))}if(b==0){return Kib}else if(b==1||Sib(a,Kib)||Sib(a,Oib)){return a}if(!_ib(a,0)){c=1;while(!_ib(a,c)){++c}return Wib(kjb(c*b),Yib($ib(a,c),b))}return Rjb(a,b)} +function Jnb(a,b){var c,d,e;if(dE(a)===dE(b)){return true}if(a==null||b==null){return false}if(a.length!=b.length){return false}for(c=0;c<a.length;++c){d=a[c];e=b[c];if(!(dE(d)===dE(e)||d!=null&&pb(d,e))){return false}}return true} +function EYb(a){pYb();var b,c,d;this.b=oYb;this.c=(Cmd(),Amd);this.f=(kYb(),jYb);this.a=a;BYb(this,new FYb);uYb(this);for(d=new Anb(a.b);d.a<d.c.c.length;){c=RD(ynb(d),86);if(!c.d){b=new iYb(cD(WC(bQ,1),rve,86,0,[c]));Rmb(a.a,b)}}} +function U6b(a,b,c){var d,e,f,g,h,i;if(!a||a.c.length==0){return null}f=new VKb(b,!c);for(e=new Anb(a);e.a<e.c.c.length;){d=RD(ynb(e),72);LKb(f,(i1b(),new D1b(d)))}g=f.i;g.a=(i=f.n,f.e.b+i.d+i.a);g.b=(h=f.n,f.e.a+h.b+h.c);return f} +function d9b(a){var b,c,d,e,f,g,h;h=t2b(a.a);Znb(h,new i9b);c=null;for(e=h,f=0,g=e.length;f<g;++f){d=e[f];if(d.k!=(r3b(),m3b)){break}b=RD(mQb(d,(Ywc(),hwc)),64);if(b!=(qpd(),ppd)&&b!=Xod){continue}!!c&&RD(mQb(c,qwc),15).Fc(d);c=d}} +function wTc(a,b,c){var d,e,f,g,h,i,j;i=(tFb(b,a.c.length),RD(a.c[b],339));Xmb(a,b);if(i.b/2>=c){d=b;j=(i.c+i.a)/2;g=j-c;if(i.c<=j-c){e=new BTc(i.c,g);Qmb(a,d++,e)}h=j+c;if(h<=i.a){f=new BTc(h,i.a);wFb(d,a.c.length);XEb(a.c,d,f)}}} +function mZc(a,b,c){var d,e,f,g,h,i;if(!b.dc()){e=new Yub;for(i=b.Kc();i.Ob();){h=RD(i.Pb(),40);Zjb(a.a,sgb(h.g),sgb(c));for(g=(d=Sub((new dXc(h)).a.d,0),new gXc(d));dvb(g.a);){f=RD(evb(g.a),65).c;Pub(e,f,e.c.b,e.c)}}mZc(a,e,c+1)}} +function Ude(a){var b;if(!a.c&&a.g==null){a.d=a.bj(a.f);WGd(a,a.d);b=a.d}else{if(a.g==null){return true}else if(a.i==0){return false}else{b=RD(a.g[a.i-1],51)}}if(b==a.b&&null.Vm>=null.Um()){tId(a);return Ude(a)}else{return b.Ob()}} +function t_b(a){this.a=a;if(a.c.i.k==(r3b(),m3b)){this.c=a.c;this.d=RD(mQb(a.c.i,(Ywc(),hwc)),64)}else if(a.d.i.k==m3b){this.c=a.d;this.d=RD(mQb(a.d.i,(Ywc(),hwc)),64)}else{throw Adb(new agb('Edge '+a+' is not an external edge.'))}} +function O1d(a,b){var c,d,e;e=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,3,e,a.b));if(!b){PAd(a,null);Q1d(a,0);P1d(a,null)}else if(b!=a){PAd(a,b.zb);Q1d(a,b.d);c=(d=b.c,d==null?b.zb:d);P1d(a,c==null||lhb(c,b.zb)?null:c)}} +function hj(a,b){var c;this.e=(tm(),Qb(a),tm(),zm(a));this.c=(Qb(b),zm(b));Lb(this.e.Rd().dc()==this.c.Rd().dc());this.d=Uv(this.e);this.b=Uv(this.c);c=YC(jJ,[Nve,rve],[5,1],5,[this.e.Rd().gc(),this.c.Rd().gc()],2);this.a=c;Zi(this)} +function Lz(b){var c=(!Jz&&(Jz=Mz()),Jz);var d=b.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,function(a){return Kz(a,c)});return '"'+d+'"'} +function VEb(a,b,c,d,e,f){var g,h,i,j,k;if(e==0){return}if(dE(a)===dE(c)){a=a.slice(b,b+e);b=0}i=c;for(h=b,j=b+e;h<j;){g=$wnd.Math.min(h+10000,j);e=g-h;k=a.slice(h,g);k.splice(0,0,d,f?e:0);Array.prototype.splice.apply(i,k);h=g;d+=e}} +function VGb(a){FGb();var b,c;this.b=CGb;this.c=EGb;this.g=(wGb(),vGb);this.d=(Cmd(),Amd);this.a=a;IGb(this);for(c=new Anb(a.b);c.a<c.c.c.length;){b=RD(ynb(c),60);!b.a&&gGb(iGb(new jGb,cD(WC(hN,1),rve,60,0,[b])),a);b.e=new Vid(b.d)}} +function yTb(a){var b,c,d,e,f,g;e=a.e.c.length;d=$C(QK,Ize,15,e,0,1);for(g=new Anb(a.e);g.a<g.c.c.length;){f=RD(ynb(g),153);d[f.a]=new Yub}for(c=new Anb(a.c);c.a<c.c.c.length;){b=RD(ynb(c),290);d[b.c.a].Fc(b);d[b.d.a].Fc(b)}return d} +function OMd(a,b){var c,d,e,f,g;c=RD(Ywd(a.a,4),129);g=c==null?0:c.length;if(b>=g)throw Adb(new aMd(b,g));e=c[b];if(g==1){d=null}else{d=$C(d6,IJe,424,g-1,0,1);hib(c,0,d,0,b);f=g-b-1;f>0&&hib(c,b+1,d,b,f)}Bde(a,d);Ade(a,b,e);return e} +function l3d(a){var b,c;if(a.f){while(a.n<a.o){b=RD(!a.j?a.k.Xb(a.n):a.j.$i(a.n),76);c=b.Lk();if(ZD(c,102)&&(RD(c,19).Bb&QHe)!=0&&(!a.e||c.pk()!=C4||c.Lj()!=0)&&b.md()!=null){return true}else{++a.n}}return false}else{return a.n<a.o}} +function Lle(){Lle=geb;Jle=RD(QHd(xYd((Qle(),Ple).qb),6),35);Gle=RD(QHd(xYd(Ple.qb),3),35);Hle=RD(QHd(xYd(Ple.qb),4),35);Ile=RD(QHd(xYd(Ple.qb),5),19);vWd(Jle);vWd(Gle);vWd(Hle);vWd(Ile);Kle=new mob(cD(WC(y7,1),lKe,179,0,[Jle,Gle]))} +function rMb(a,b){var c;this.d=new P2b;this.b=b;this.e=new sjd(b.Lf());c=a.u.Hc((Pod(),Mod));a.u.Hc(Lod)?a.D?(this.a=c&&!b.bg()):(this.a=true):a.u.Hc(Nod)?c?(this.a=!(b.Uf().Kc().Ob()||b.Wf().Kc().Ob())):(this.a=false):(this.a=false)} +function zNb(a,b){var c,d,e,f;c=a.o.a;for(f=RD(RD(Qc(a.r,b),21),87).Kc();f.Ob();){e=RD(f.Pb(),117);e.e.a=(d=e.b,d.pf((umd(),Gld))?d.ag()==(qpd(),ppd)?-d.Mf().a-Kfb(UD(d.of(Gld))):c+Kfb(UD(d.of(Gld))):d.ag()==(qpd(),ppd)?-d.Mf().a:c)}} +function $4b(a,b){var c,d,e,f;c=RD(mQb(a,(yCc(),rAc)),88);f=RD(Gxd(b,GBc),64);e=RD(mQb(a,BBc),101);if(e!=(Bod(),zod)&&e!=Aod){if(f==(qpd(),opd)){f=osd(b,c);f==opd&&(f=vpd(c))}}else{d=W4b(b);d>0?(f=vpd(c)):(f=spd(vpd(c)))}Ixd(b,GBc,f)} +function agc(a,b){var c;b.Ug('Partition preprocessing',1);c=RD(zDb(CDb(EDb(CDb(new SDb(null,new Swb(a.a,16)),new egc),new ggc),new igc),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);FDb(c.Oc(),new kgc);b.Vg()} +function Uoc(a,b){var c,d,e,f,g;g=a.j;b.a!=b.b&&_mb(g,new ypc);e=g.c.length/2|0;for(d=0;d<e;d++){f=(tFb(d,g.c.length),RD(g.c[d],113));f.c&&Q3b(f.d,b.a)}for(c=e;c<g.c.length;c++){f=(tFb(c,g.c.length),RD(g.c[c],113));f.c&&Q3b(f.d,b.b)}} +function rLc(a,b,c){var d,e,f;d=a.c[b.c.p][b.p];e=a.c[c.c.p][c.p];if(d.a!=null&&e.a!=null){f=Jfb(d.a,e.a);f<0?uLc(a,b,c):f>0&&uLc(a,c,b);return f}else if(d.a!=null){uLc(a,b,c);return -1}else if(e.a!=null){uLc(a,c,b);return 1}return 0} +function EVc(a,b){var c,d,e,f,g;e=b.b.b;a.a=$C(QK,Ize,15,e,0,1);a.b=$C(xdb,Hye,28,e,16,1);for(g=Sub(b.b,0);g.b!=g.d.c;){f=RD(evb(g),40);a.a[f.g]=new Yub}for(d=Sub(b.a,0);d.b!=d.d.c;){c=RD(evb(d),65);a.a[c.b.g].Fc(c);a.a[c.c.g].Fc(c)}} +function SJd(a,b){var c,d,e,f;if(a.Pj()){c=a.Ej();f=a.Qj();++a.j;a.qj(c,a.Zi(c,b));d=a.Ij(3,null,b,c,f);if(a.Mj()){e=a.Nj(b,null);if(!e){a.Jj(d)}else{e.nj(d);e.oj()}}else{a.Jj(d)}}else{_Id(a,b);if(a.Mj()){e=a.Nj(b,null);!!e&&e.oj()}}} +function oLd(a,b,c){var d,e,f;if(a.Pj()){f=a.Qj();KHd(a,b,c);d=a.Ij(3,null,c,b,f);if(a.Mj()){e=a.Nj(c,null);a.Tj()&&(e=a.Uj(c,e));if(!e){a.Jj(d)}else{e.nj(d);e.oj()}}else{a.Jj(d)}}else{KHd(a,b,c);if(a.Mj()){e=a.Nj(c,null);!!e&&e.oj()}}} +function bge(a,b){var c,d,e,f,g;g=pke(a.e.Dh(),b);e=new YHd;c=RD(a.g,124);for(f=a.i;--f>=0;){d=c[f];g.am(d.Lk())&&WGd(e,d)}!wLd(a,e)&&Mvd(a.e)&&eZd(a,b.Jk()?fge(a,6,b,(yob(),vob),null,-1,false):fge(a,b.tk()?2:1,b,null,null,-1,false))} +function _7b(a,b){var c,d,e,f,g;if(a.a==($uc(),Yuc)){return true}f=b.a.c;c=b.a.c+b.a.b;if(b.j){d=b.A;g=d.c.c.a-d.o.a/2;e=f-(d.n.a+d.o.a);if(e>g){return false}}if(b.q){d=b.C;g=d.c.c.a-d.o.a/2;e=d.n.a-c;if(e>g){return false}}return true} +function bRc(a){WQc();var b,c,d,e,f,g,h;c=new gub;for(e=new Anb(a.e.b);e.a<e.c.c.length;){d=RD(ynb(e),30);for(g=new Anb(d.a);g.a<g.c.c.length;){f=RD(ynb(g),10);h=a.g[f.p];b=RD(cub(c,h),15);if(!b){b=new bnb;dub(c,h,b)}b.Fc(f)}}return c} +function Qzd(a){var b;if((a.Db&64)!=0)return awd(a);b=new Shb(awd(a));b.a+=' (startX: ';Khb(b,a.j);b.a+=', startY: ';Khb(b,a.k);b.a+=', endX: ';Khb(b,a.b);b.a+=', endY: ';Khb(b,a.c);b.a+=', identifier: ';Nhb(b,a.d);b.a+=')';return b.a} +function cWd(a){var b;if((a.Db&64)!=0)return QAd(a);b=new Shb(QAd(a));b.a+=' (ordered: ';Ohb(b,(a.Bb&256)!=0);b.a+=', unique: ';Ohb(b,(a.Bb&512)!=0);b.a+=', lowerBound: ';Lhb(b,a.s);b.a+=', upperBound: ';Lhb(b,a.t);b.a+=')';return b.a} +function uBd(a,b,c,d,e,f,g,h){var i;ZD(a.Cb,90)&&v$d(yYd(RD(a.Cb,90)),4);PAd(a,c);a.f=d;DWd(a,e);FWd(a,f);xWd(a,g);EWd(a,false);aWd(a,true);AWd(a,h);_Vd(a,true);$Vd(a,0);a.b=0;bWd(a,1);i=XVd(a,b,null);!!i&&i.oj();kXd(a,false);return a} +function ZAb(a,b){var c,d,e,f;c=RD(Xjb(a.a,b),525);if(!c){d=new oBb(b);e=(gBb(),dBb)?null:d.c;f=zhb(e,0,$wnd.Math.max(0,thb(e,Fhb(46))));nBb(d,ZAb(a,f));(dBb?null:d.c).length==0&&iBb(d,new rBb);$jb(a.a,dBb?null:d.c,d);return d}return c} +function sRb(a,b){var c;a.b=b;a.g=new bnb;c=tRb(a.b);a.e=c;a.f=c;a.c=Heb(TD(mQb(a.b,(YHb(),RHb))));a.a=UD(mQb(a.b,(umd(),Dkd)));a.a==null&&(a.a=1);Kfb(a.a)>1?(a.e*=Kfb(a.a)):(a.f/=Kfb(a.a));uRb(a);vRb(a);rRb(a);pQb(a.b,(tSb(),lSb),a.g)} +function n9b(a,b,c){var d,e,f,g,h,i;d=0;i=c;if(!b){d=c*(a.c.length-1);i*=-1}for(f=new Anb(a);f.a<f.c.c.length;){e=RD(ynb(f),10);pQb(e,(yCc(),Rzc),(Rjd(),Njd));e.o.a=d;for(h=e3b(e,(qpd(),Xod)).Kc();h.Ob();){g=RD(h.Pb(),12);g.n.a=d}d+=i}} +function gZd(a,b,c){var d,e,f,g,h,i;h=a.pl(c);if(h!=c){g=a.g[b];i=h;MHd(a,b,a.Zi(b,i));f=g;a.Ri(b,i,f);if(a.al()){d=c;e=a.Oj(d,null);!RD(h,54).Ph()&&(e=a.Nj(i,e));!!e&&e.oj()}Mvd(a.e)&&eZd(a,a.Ij(9,c,h,b,false));return h}else{return c}} +function rYb(a,b){var c,d,e,f;for(d=new Anb(a.a.a);d.a<d.c.c.length;){c=RD(ynb(d),194);c.g=true}for(f=new Anb(a.a.b);f.a<f.c.c.length;){e=RD(ynb(f),86);e.k=Heb(TD(a.e.Kb(new Ptd(e,b))));e.d.g=e.d.g&Heb(TD(a.e.Kb(new Ptd(e,b))))}return a} +function Rdc(a,b){var c,d;if(a.c.length!=0){if(a.c.length==2){Qdc((tFb(0,a.c.length),RD(a.c[0],10)),(Pnd(),Lnd));Qdc((tFb(1,a.c.length),RD(a.c[1],10)),Mnd)}else{for(d=new Anb(a);d.a<d.c.c.length;){c=RD(ynb(d),10);Qdc(c,b)}}a.c.length=0}} +function Vnc(a){var b,c,d,e,f;c=(b=RD(mfb(E3),9),new Fsb(b,RD(WEb(b,b.length),9),0));f=RD(mQb(a,(Ywc(),Iwc)),10);if(f){for(e=new Anb(f.j);e.a<e.c.c.length;){d=RD(ynb(e),12);dE(mQb(d,Awc))===dE(a)&&k4b(new l4b(d.b))&&zsb(c,d.j)}}return c} +function CGc(a,b,c){var d,e,f,g,h;if(a.d[c.p]){return}for(e=new is(Mr(a3b(c).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);h=d.d.i;for(g=new is(Mr(Z2b(h).a.Kc(),new ir));gs(g);){f=RD(hs(g),18);f.c.i==b&&(a.a[f.p]=true)}CGc(a,b,h)}a.d[c.p]=true} +function Zwd(a,b){var c,d,e,f,g,h,i;d=ggb(a.Db&254);if(d==1){a.Eb=null}else{f=SD(a.Eb);if(d==2){e=Xwd(a,b);a.Eb=f[e==0?1:0]}else{g=$C(jJ,rve,1,d-1,5,1);for(c=2,h=0,i=0;c<=128;c<<=1){c==b?++h:(a.Db&c)!=0&&(g[i++]=f[h++])}a.Eb=g}}a.Db&=~b} +function rse(a){var b;b=0;switch(a){case 105:b=2;break;case 109:b=8;break;case 115:b=4;break;case 120:b=16;break;case 117:b=32;break;case 119:b=64;break;case 70:b=256;break;case 72:b=128;break;case 88:b=512;break;case 44:b=gwe;}return b} +function Ojb(a,b,c,d,e){var f,g,h,i;if(dE(a)===dE(b)&&d==e){Tjb(a,d,c);return}for(h=0;h<d;h++){g=0;f=a[h];for(i=0;i<e;i++){g=Bdb(Bdb(Ndb(Cdb(f,yxe),Cdb(b[i],yxe)),Cdb(c[h+i],yxe)),Cdb(Ydb(g),yxe));c[h+i]=Ydb(g);g=Udb(g,32)}c[h+e]=Ydb(g)}} +function tRb(a){var b,c,d,e,f,g,h,i,j,k,l;k=0;j=0;e=a.a;h=e.a.gc();for(d=e.a.ec().Kc();d.Ob();){c=RD(d.Pb(),567);b=(c.b&&CRb(c),c.a);l=b.a;g=b.b;k+=l+g;j+=l*g}i=$wnd.Math.sqrt(400*h*j-4*j+k*k)+k;f=2*(100*h-1);if(f==0){return i}return i/f} +function MSc(a,b){if(b.b!=0){isNaN(a.s)?(a.s=Kfb((sFb(b.b!=0),UD(b.a.a.c)))):(a.s=$wnd.Math.min(a.s,Kfb((sFb(b.b!=0),UD(b.a.a.c)))));isNaN(a.c)?(a.c=Kfb((sFb(b.b!=0),UD(b.c.b.c)))):(a.c=$wnd.Math.max(a.c,Kfb((sFb(b.b!=0),UD(b.c.b.c)))))}} +function nzd(a){var b,c,d,e;b=null;for(d=Fl(Al(cD(WC(cJ,1),rve,20,0,[(!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),(!a.c&&(a.c=new Yie(E4,a,5,8)),a.c)])));gs(d);){c=RD(hs(d),84);e=AGd(c);if(!b){b=vCd(e)}else if(b!=vCd(e)){return true}}return false} +function pLd(a,b){var c,d,e,f;if(a.Pj()){c=a.i;f=a.Qj();LHd(a,b);d=a.Ij(3,null,b,c,f);if(a.Mj()){e=a.Nj(b,null);a.Tj()&&(e=a.Uj(b,e));if(!e){a.Jj(d)}else{e.nj(d);e.oj()}}else{a.Jj(d)}}else{LHd(a,b);if(a.Mj()){e=a.Nj(b,null);!!e&&e.oj()}}} +function ZQb(a,b){var c,d,e,f;f=rAb(a.a,b.b);if(!f){throw Adb(new dgb('Invalid hitboxes for scanline overlap calculation.'))}e=false;for(d=a.a.a.ec().Kc();d.Ob();){c=RD(d.Pb(),68);if(UQb(b.b,c)){bbd(a.b.a,b.b,c);e=true}else{if(e){break}}}} +function whd(a){var b;if(!a.a){throw Adb(new dgb('IDataType class expected for layout option '+a.f))}b=GId(a.a);if(b==null){throw Adb(new dgb("Couldn't create new instance of property '"+a.f+"'. "+DGe+(lfb(b6),b6.k)+EGe))}return RD(b,423)} +function yvd(a){var b,c,d,e,f;f=a.Ph();if(f){if(f.Vh()){e=Vvd(a,f);if(e!=f){c=a.Fh();d=(b=a.Fh(),b>=0?a.Ah(null):a.Ph().Th(a,-1-b,null,null));a.Bh(RD(e,54),c);!!d&&d.oj();a.vh()&&a.wh()&&c>-1&&qvd(a,new N3d(a,9,c,f,e));return e}}}return f} +function stb(a,b){var c,d,e,f,g;f=a.b.Ce(b);d=(c=a.a.get(f),c==null?$C(jJ,rve,1,0,5,1):c);for(g=0;g<d.length;g++){e=d[g];if(a.b.Be(b,e.ld())){if(d.length==1){d.length=0;Btb(a.a,f)}else{d.splice(g,1)}--a.c;++a.b.g;return e.md()}}return null} +function pWb(a){var b,c,d,e,f,g,h,i;g=0;f=a.f.e;for(d=0;d<f.c.length;++d){h=(tFb(d,f.c.length),RD(f.c[d],153));for(e=d+1;e<f.c.length;++e){i=(tFb(e,f.c.length),RD(f.c[e],153));c=bjd(h.d,i.d);b=c-a.a[h.a][i.a];g+=a.i[h.a][i.a]*b*b}}return g} +function oec(a,b){var c;if(nQb(b,(yCc(),UAc))){return}c=wec(RD(mQb(b,hec),371),RD(mQb(a,UAc),171));pQb(b,hec,c);if(gs(new is(Mr(W2b(b).a.Kc(),new ir)))){return}switch(c.g){case 1:pQb(b,UAc,(cxc(),Zwc));break;case 2:pQb(b,UAc,(cxc(),_wc));}} +function aoc(a,b){var c;Snc(a);a.a=(c=new Ri,FDb(new SDb(null,new Swb(b.d,16)),new zoc(c)),c);Xnc(a,RD(mQb(b.b,(yCc(),CAc)),349));Znc(a);Ync(a);Wnc(a);$nc(a);_nc(a,b);FDb(EDb(new SDb(null,gj(ej(a.b).a)),new poc),new roc);b.a=false;a.a=null} +function B$c(){B$c=geb;r$c=new lGd(REe,(Geb(),false));s$c=new lGd(SEe,7);sgb(0);y$c=new lGd(TEe,sgb(0));v$c=new lGd(UEe,sgb(-1));A$c=(s_c(),r_c);z$c=new lGd(VEe,A$c);u$c=(LZc(),IZc);t$c=new lGd(WEe,u$c);x$c=(A_c(),z_c);w$c=new lGd(XEe,x$c)} +function _Bd(){FBd.call(this,$He,(bvd(),avd));this.p=null;this.a=null;this.f=null;this.n=null;this.g=null;this.c=null;this.i=null;this.j=null;this.d=null;this.b=null;this.e=null;this.k=null;this.o=null;this.s=null;this.q=false;this.r=false} +function aGd(){aGd=geb;_Fd=new bGd(FBe,0);YFd=new bGd('INSIDE_SELF_LOOPS',1);ZFd=new bGd('MULTI_EDGES',2);XFd=new bGd('EDGE_LABELS',3);$Fd=new bGd('PORTS',4);VFd=new bGd('COMPOUND',5);UFd=new bGd('CLUSTERS',6);WFd=new bGd('DISCONNECTED',7)} +function RJd(a,b,c){var d,e,f;if(a.Pj()){f=a.Qj();++a.j;a.qj(b,a.Zi(b,c));d=a.Ij(3,null,c,b,f);if(a.Mj()){e=a.Nj(c,null);if(!e){a.Jj(d)}else{e.nj(d);e.oj()}}else{a.Jj(d)}}else{++a.j;a.qj(b,a.Zi(b,c));if(a.Mj()){e=a.Nj(c,null);!!e&&e.oj()}}} +function _ib(a,b){var c,d,e;if(b==0){return (a.a[0]&1)!=0}if(b<0){throw Adb(new teb('Negative bit address'))}e=b>>5;if(e>=a.d){return a.e<0}c=a.a[e];b=1<<(b&31);if(a.e<0){d=Uib(a);if(e<d){return false}else d==e?(c=-c):(c=~c)}return (c&b)!=0} +function Zdd(a,b,c,d){var e;RD(c.b,68);RD(c.b,68);RD(d.b,68);RD(d.b,68);e=ojd(ajd(RD(c.b,68).c),RD(d.b,68).c);kjd(e,PQb(RD(c.b,68),RD(d.b,68),e));RD(d.b,68);RD(d.b,68);RD(d.b,68).c.a+e.a;RD(d.b,68).c.b+e.b;RD(d.b,68);Umb(d.a,new ced(a,b,d))} +function V$d(a,b){var c,d,e,f,g,h,i;f=b.e;if(f){c=yvd(f);d=RD(a.g,689);for(g=0;g<a.i;++g){i=d[g];if(h2d(i)==c){e=(!i.d&&(i.d=new XZd(o7,i,1)),i.d);h=RD(c.Mh(jwd(f,f.Cb,f.Db>>16)),15).dd(f);if(h<e.i){return V$d(a,RD(QHd(e,h),89))}}}}return b} +function feb(a,b,c){var d=eeb,h;var e=d[a];var f=e instanceof Array?e[0]:null;if(e&&!f){_=e}else{_=(h=b&&b.prototype,!h&&(h=eeb[b]),ieb(h));_.Sm=c;!b&&(_.Tm=keb);d[a]=_}for(var g=3;g<arguments.length;++g){arguments[g].prototype=_}f&&(_.Rm=f)} +function gs(a){var b;while(!RD(Qb(a.a),51).Ob()){a.d=fs(a);if(!a.d){return false}a.a=RD(a.d.Pb(),51);if(ZD(a.a,38)){b=RD(a.a,38);a.a=b.a;!a.b&&(a.b=new wmb);hmb(a.b,a.d);if(b.b){while(!nmb(b.b)){hmb(a.b,RD(tmb(b.b),51))}}a.d=b.d}}return true} +function xJb(a,b){var c,d,e,f;e=1;b.j=true;f=null;for(d=new Anb(CIb(b));d.a<d.c.c.length;){c=RD(ynb(d),218);if(!a.c[c.c]){a.c[c.c]=true;f=oIb(c,b);if(c.f){e+=xJb(a,f)}else if(!f.j&&c.a==c.e.e-c.d.e){c.f=true;Ysb(a.p,c);e+=xJb(a,f)}}}return e} +function OYb(a){var b,c,d;for(c=new Anb(a.a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),86);d=(uFb(0),0);if(d>0){!(Dmd(a.a.c)&&b.n.d)&&!(Emd(a.a.c)&&b.n.b)&&(b.g.d+=$wnd.Math.max(0,d/2-0.5));!(Dmd(a.a.c)&&b.n.a)&&!(Emd(a.a.c)&&b.n.c)&&(b.g.a-=d-1)}}} +function c7b(a){var b,c,d,e,f;e=new bnb;f=d7b(a,e);b=RD(mQb(a,(Ywc(),Iwc)),10);if(b){for(d=new Anb(b.j);d.a<d.c.c.length;){c=RD(ynb(d),12);dE(mQb(c,Awc))===dE(a)&&(f=$wnd.Math.max(f,d7b(c,e)))}}e.c.length==0||pQb(a,ywc,f);return f!=-1?e:null} +function rcc(a,b,c){var d,e,f,g,h,i;f=RD(Vmb(b.e,0),18).c;d=f.i;e=d.k;i=RD(Vmb(c.g,0),18).d;g=i.i;h=g.k;e==(r3b(),o3b)?pQb(a,(Ywc(),vwc),RD(mQb(d,vwc),12)):pQb(a,(Ywc(),vwc),f);h==o3b?pQb(a,(Ywc(),wwc),RD(mQb(g,wwc),12)):pQb(a,(Ywc(),wwc),i)} +function ysc(a){var b,c,d;this.c=a;d=RD(mQb(a,(yCc(),rAc)),88);b=Kfb(UD(mQb(a,Tzc)));c=Kfb(UD(mQb(a,oCc)));d==(Cmd(),ymd)||d==zmd||d==Amd?(this.b=b*c):(this.b=1/(b*c));this.j=Kfb(UD(mQb(a,cCc)));this.e=Kfb(UD(mQb(a,bCc)));this.f=a.b.c.length} +function BD(a,b){var c,d,e,f,g;b&=63;c=a.h;d=(c&fxe)!=0;d&&(c|=-1048576);if(b<22){g=c>>b;f=a.m>>b|c<<22-b;e=a.l>>b|a.m<<22-b}else if(b<44){g=d?exe:0;f=c>>b-22;e=a.m>>b-22|c<<44-b}else{g=d?exe:0;f=d?dxe:0;e=c>>b-44}return hD(e&dxe,f&dxe,g&exe)} +function ORb(a){var b,c,d,e,f,g;this.c=new bnb;this.d=a;d=oxe;e=oxe;b=pxe;c=pxe;for(g=Sub(a,0);g.b!=g.d.c;){f=RD(evb(g),8);d=$wnd.Math.min(d,f.a);e=$wnd.Math.min(e,f.b);b=$wnd.Math.max(b,f.a);c=$wnd.Math.max(c,f.b)}this.a=new Uid(d,e,b-d,c-e)} +function Udc(a,b){var c,d,e,f,g,h;for(f=new Anb(a.b);f.a<f.c.c.length;){e=RD(ynb(f),30);for(h=new Anb(e.a);h.a<h.c.c.length;){g=RD(ynb(h),10);g.k==(r3b(),n3b)&&Qdc(g,b);for(d=new is(Mr(a3b(g).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);Pdc(c,b)}}}} +function nec(a,b){var c,d,e;b.Ug('Layer constraint preprocessing',1);c=new bnb;e=new Jkb(a.a,0);while(e.b<e.d.gc()){d=(sFb(e.b<e.d.gc()),RD(e.d.Xb(e.c=e.b++),10));if(mec(d)){kec(d);ZEb(c.c,d);Ckb(e)}}c.c.length==0||pQb(a,(Ywc(),lwc),c);b.Vg()} +function $Hc(a){var b,c;a.e=$C(kE,Pwe,28,a.p.c.length,15,1);a.k=$C(kE,Pwe,28,a.p.c.length,15,1);for(c=new Anb(a.p);c.a<c.c.c.length;){b=RD(ynb(c),10);a.e[b.p]=Kr(new is(Mr(Z2b(b).a.Kc(),new ir)));a.k[b.p]=Kr(new is(Mr(a3b(b).a.Kc(),new ir)))}} +function bIc(a){var b,c,d,e,f,g;e=0;a.q=new bnb;b=new _sb;for(g=new Anb(a.p);g.a<g.c.c.length;){f=RD(ynb(g),10);f.p=e;for(d=new is(Mr(a3b(f).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);Ysb(b,c.d.i)}b.a.Bc(f)!=null;Rmb(a.q,new btb(b));b.a.$b();++e}} +function pPd(a,b){var c,d,e,f,g,h,i,j,k;if(a.a.f>0&&ZD(b,44)){a.a._j();j=RD(b,44);i=j.ld();f=i==null?0:tb(i);g=bOd(a.a,f);c=a.a.d[g];if(c){d=RD(c.g,379);k=c.i;for(h=0;h<k;++h){e=d[h];if(e.Bi()==f&&e.Fb(j)){pPd(a,j);return true}}}}return false} +function Nje(a){var b,c,d,e,f,g,h;b=a.qi(AKe);if(b){h=WD($Nd((!b.b&&(b.b=new SVd((JTd(),FTd),C8,b)),b.b),'settingDelegates'));if(h!=null){c=new bnb;for(e=vhb(h,'\\w+'),f=0,g=e.length;f<g;++f){d=e[f];ZEb(c.c,d)}return c}}return yob(),yob(),vob} +function Ync(a){var b,c,d,e;for(e=RD(Qc(a.a,(Bnc(),ync)),15).Kc();e.Ob();){d=RD(e.Pb(),105);c=(b=Ec(d.k),b.Hc((qpd(),Yod))?b.Hc(Xod)?b.Hc(npd)?b.Hc(ppd)?null:Jnc:Lnc:Knc:Inc);Qnc(a,d,c[0],(joc(),goc),0);Qnc(a,d,c[1],hoc,1);Qnc(a,d,c[2],ioc,1)}} +function Kqc(a,b){var c,d;c=Lqc(b);Oqc(a,b,c);UTc(a.a,RD(mQb(Y2b(b.b),(Ywc(),Lwc)),234));Jqc(a);Iqc(a,b);d=$C(kE,Pwe,28,b.b.j.c.length,15,1);Rqc(a,b,(qpd(),Yod),d,c);Rqc(a,b,Xod,d,c);Rqc(a,b,npd,d,c);Rqc(a,b,ppd,d,c);a.a=null;a.c=null;a.b=null} +function Yyd(a,b,c){switch(b){case 7:!a.e&&(a.e=new Yie(G4,a,7,4));sLd(a.e);!a.e&&(a.e=new Yie(G4,a,7,4));YGd(a.e,RD(c,16));return;case 8:!a.d&&(a.d=new Yie(G4,a,8,5));sLd(a.d);!a.d&&(a.d=new Yie(G4,a,8,5));YGd(a.d,RD(c,16));return;}xyd(a,b,c)} +function Rt(a,b){var c,d,e,f,g;if(dE(b)===dE(a)){return true}if(!ZD(b,15)){return false}g=RD(b,15);if(a.gc()!=g.gc()){return false}f=g.Kc();for(d=a.Kc();d.Ob();){c=d.Pb();e=f.Pb();if(!(dE(c)===dE(e)||c!=null&&pb(c,e))){return false}}return true} +function jac(a,b){var c,d,e,f;f=RD(zDb(EDb(EDb(new SDb(null,new Swb(b.b,16)),new pac),new rac),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);f.Jc(new tac);c=0;for(e=f.Kc();e.Ob();){d=RD(e.Pb(),12);d.p==-1&&iac(a,d,c++)}} +function KDc(a){switch(a.g){case 0:return new iQc;case 1:return new DNc;case 2:return new TNc;case 3:return new aRc;case 4:return new yOc;default:throw Adb(new agb('No implementation is available for the node placer '+(a.f!=null?a.f:''+a.g)));}} +function Qtc(a){switch(a.g){case 0:return new UFc;case 1:return new NFc;case 2:return new cGc;case 3:return new jGc;case 4:return new YFc;default:throw Adb(new agb('No implementation is available for the cycle breaker '+(a.f!=null?a.f:''+a.g)));}} +function I_c(a,b){var c,d,e,f,g;d=new Yub;Pub(d,b,d.c.b,d.c);do{c=(sFb(d.b!=0),RD(Wub(d,d.a.a),40));a.b[c.g]=1;for(f=Sub(c.d,0);f.b!=f.d.c;){e=RD(evb(f),65);g=e.c;a.b[g.g]==1?Mub(a.a,e):a.b[g.g]==2?(a.b[g.g]=1):Pub(d,g,d.c.b,d.c)}}while(d.b!=0)} +function $$b(a,b,c){var d;d=null;!!b&&(d=b.d);k_b(a,new eZb(b.n.a-d.b+c.a,b.n.b-d.d+c.b));k_b(a,new eZb(b.n.a-d.b+c.a,b.n.b+b.o.b+d.a+c.b));k_b(a,new eZb(b.n.a+b.o.a+d.c+c.a,b.n.b-d.d+c.b));k_b(a,new eZb(b.n.a+b.o.a+d.c+c.a,b.n.b+b.o.b+d.a+c.b))} +function iac(a,b,c){var d,e,f;b.p=c;for(f=Fl(Al(cD(WC(cJ,1),rve,20,0,[new T3b(b),new _3b(b)])));gs(f);){d=RD(hs(f),12);d.p==-1&&iac(a,d,c)}if(b.i.k==(r3b(),o3b)){for(e=new Anb(b.i.j);e.a<e.c.c.length;){d=RD(ynb(e),12);d!=b&&d.p==-1&&iac(a,d,c)}}} +function cRc(a,b){var c,d,e,f,g,h;d=new gub;g=Xx(new mob(a.g));for(f=g.a.ec().Kc();f.Ob();){e=RD(f.Pb(),10);if(!e){b.bh('There are no classes in a balanced layout.');break}h=a.j[e.p];c=RD(cub(d,h),15);if(!c){c=new bnb;dub(d,h,c)}c.Fc(e)}return d} +function RTc(a){var b,c,d,e,f;e=RD(zDb(BDb(ODb(a)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);d=Hze;if(e.gc()>=2){c=e.Kc();b=UD(c.Pb());while(c.Ob()){f=b;b=UD(c.Pb());d=$wnd.Math.min(d,(uFb(b),b)-(uFb(f),f))}}return d} +function iWc(a,b){var c,d,e;e=new bnb;for(d=Sub(b.a,0);d.b!=d.d.c;){c=RD(evb(d),65);c.b.g==a.g&&!lhb(c.b.c,IEe)&&dE(mQb(c.b,(h_c(),f_c)))!==dE(mQb(c.c,f_c))&&!yDb(new SDb(null,new Swb(e,16)),new OWc(c))&&(ZEb(e.c,c),true)}_mb(e,new QWc);return e} +function $u(a,b){var c,d,e;if(dE(b)===dE(Qb(a))){return true}if(!ZD(b,15)){return false}d=RD(b,15);e=a.gc();if(e!=d.gc()){return false}if(ZD(d,59)){for(c=0;c<e;c++){if(!Hb(a.Xb(c),d.Xb(c))){return false}}return true}else{return Cr(a.Kc(),d.Kc())}} +function Scc(a,b,c,d,e,f){var g,h,i,j;h=!QDb(CDb(a.Oc(),new PAb(new Wcc))).Bd((xDb(),wDb));g=a;f==(Cmd(),Bmd)&&(g=hv(g));for(j=g.Kc();j.Ob();){i=RD(j.Pb(),72);i.n.a=b.a;h?(i.n.b=b.b+(d.b-i.o.b)/2):e?(i.n.b=b.b):(i.n.b=b.b+d.b-i.o.b);b.a+=i.o.a+c}} +function Tgc(a,b){var c,d,e,f,g;b.Ug('Port side processing',1);for(g=new Anb(a.a);g.a<g.c.c.length;){e=RD(ynb(g),10);Ugc(e)}for(d=new Anb(a.b);d.a<d.c.c.length;){c=RD(ynb(d),30);for(f=new Anb(c.a);f.a<f.c.c.length;){e=RD(ynb(f),10);Ugc(e)}}b.Vg()} +function bEd(a,b,c){var d,e,f,g,h,i,j;if(c){f=c.a.length;d=new vue(f);for(h=(d.b-d.a)*d.c<0?(uue(),tue):new Rue(d);h.Ob();){g=RD(h.Pb(),17);i=xDd(c,g.a);if(i){j=FGd(zDd(i,hIe),b);Zjb(a.f,j,i);e=uIe in i.a;e&&jyd(j,zDd(i,uIe));GEd(i,j);HEd(i,j)}}}} +function MWb(a,b,c){var d,e,f,g,h;h=c;!h&&(h=Nqd(new Oqd,0));h.Ug(EAe,1);cXb(a.c,b);g=H_b(a.a,b);if(g.gc()==1){OWb(RD(g.Xb(0),36),h)}else{f=1/g.gc();for(e=g.Kc();e.Ob();){d=RD(e.Pb(),36);if(c.$g()){return}OWb(d,h.eh(f))}}F_b(a.a,g,b);PWb(b);h.Vg()} +function Hic(a,b,c){var d,e,f,g,h;e=a.f;!e&&(e=RD(a.a.a.ec().Kc().Pb(),60));Iic(e,b,c);if(a.a.a.gc()==1){return}d=b*c;for(g=a.a.a.ec().Kc();g.Ob();){f=RD(g.Pb(),60);if(f!=e){h=$jc(f);if(h.f.d){f.d.d+=d+Tye;f.d.a-=d+Tye}else h.f.a&&(f.d.a-=d+Tye)}}} +function kTb(a,b,c,d,e){var f,g,h,i,j,k,l,m,n;g=c-a;h=d-b;f=$wnd.Math.atan2(g,h);i=f+Gze;j=f-Gze;k=e*$wnd.Math.sin(i)+a;m=e*$wnd.Math.cos(i)+b;l=e*$wnd.Math.sin(j)+a;n=e*$wnd.Math.cos(j)+b;return dv(cD(WC(l3,1),Nve,8,0,[new rjd(k,m),new rjd(l,n)]))} +function mQc(a,b,c,d){var e,f,g,h,i,j,k,l;e=c;k=b;f=k;do{f=a.a[f.p];h=(l=a.g[f.p],Kfb(a.p[l.p])+Kfb(a.d[f.p])-f.d.d);i=pQc(f,d);if(i){g=(j=a.g[i.p],Kfb(a.p[j.p])+Kfb(a.d[i.p])+i.o.b+i.d.a);e=$wnd.Math.min(e,h-(g+bFc(a.k,f,i)))}}while(k!=f);return e} +function nQc(a,b,c,d){var e,f,g,h,i,j,k,l;e=c;k=b;f=k;do{f=a.a[f.p];g=(l=a.g[f.p],Kfb(a.p[l.p])+Kfb(a.d[f.p])+f.o.b+f.d.a);i=oQc(f,d);if(i){h=(j=a.g[i.p],Kfb(a.p[j.p])+Kfb(a.d[i.p])-i.d.d);e=$wnd.Math.min(e,h-(g+bFc(a.k,f,i)))}}while(k!=f);return e} +function r9c(a,b){var c;b.Ug('Equal Whitespace Eliminator',1);if(Hxd(a,(X6c(),V6c))){w9c(RD(Gxd(a,V6c),15),Kfb(UD(Gxd(a,O6c))),(c=Kfb(UD(Gxd(a,M6c))),Kfb(UD(Gxd(a,(X7c(),Q7c)))),c))}else{throw Adb(new Jed('The graph does not contain rows.'))}b.Vg()} +function Gxd(a,b){var c,d;d=(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),$Nd(a.o,b));if(d!=null){return d}c=b.Sg();ZD(c,4)&&(c==null?(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),jOd(a.o,b)):(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),fOd(a.o,b,c)),a);return c} +function dod(){dod=geb;Xnd=new eod('H_LEFT',0);Wnd=new eod('H_CENTER',1);Znd=new eod('H_RIGHT',2);cod=new eod('V_TOP',3);bod=new eod('V_CENTER',4);aod=new eod('V_BOTTOM',5);$nd=new eod('INSIDE',6);_nd=new eod('OUTSIDE',7);Ynd=new eod('H_PRIORITY',8)} +function jJb(a,b){var c,d,e,f,g,h,i;if(!b.f){throw Adb(new agb('The input edge is not a tree edge.'))}f=null;e=lve;for(d=new Anb(a.d);d.a<d.c.c.length;){c=RD(ynb(d),218);h=c.d;i=c.e;if(oJb(a,h,b)&&!oJb(a,i,b)){g=i.e-h.e-c.a;if(g<e){e=g;f=c}}}return f} +function sWb(a){var b,c,d,e,f,g;if(a.f.e.c.length<=1){return}b=0;e=pWb(a);c=oxe;do{b>0&&(e=c);for(g=new Anb(a.f.e);g.a<g.c.c.length;){f=RD(ynb(g),153);if(Heb(TD(mQb(f,(dWb(),WVb))))){continue}d=oWb(a,f);$id(hjd(f.d),d)}c=pWb(a)}while(!rWb(a,b++,e,c))} +function Ymc(a,b){var c,d,e,f,g;f=a.g.a;g=a.g.b;for(d=new Anb(a.d);d.a<d.c.c.length;){c=RD(ynb(d),72);e=c.n;a.a==(enc(),bnc)||a.i==(qpd(),Xod)?(e.a=f):a.a==cnc||a.i==(qpd(),ppd)?(e.a=f+a.j.a-c.o.a):(e.a=f+(a.j.a-c.o.a)/2);e.b=g;$id(e,b);g+=c.o.b+a.e}} +function BEd(a,b){var c,d,e,f,g,h,i,j,k,l;j=a;i=yDd(j,'individualSpacings');if(i){d=Hxd(b,(umd(),amd));g=!d;if(g){e=new dtd;Ixd(b,amd,e)}h=RD(Gxd(b,amd),385);l=i;f=null;!!l&&(f=(k=oC(l,$C(qJ,Nve,2,0,6,1)),new CC(l,k)));if(f){c=new dFd(l,h);xgb(f,c)}}} +function FEd(a,b){var c,d,e,f,g,h,i,j,k,l,m;i=null;l=a;k=null;if(DIe in l.a||EIe in l.a||nIe in l.a){j=null;m=EGd(b);g=yDd(l,DIe);c=new gFd(m);cEd(c.a,g);h=yDd(l,EIe);d=new AFd(m);nEd(d.a,h);f=wDd(l,nIe);e=new DFd(m);j=(oEd(e.a,f),f);k=j}i=k;return i} +function ox(a,b){var c,d,e;if(b===a){return true}if(ZD(b,552)){e=RD(b,849);if(a.a.d!=e.a.d||Ih(a).gc()!=Ih(e).gc()){return false}for(d=Ih(e).Kc();d.Ob();){c=RD(d.Pb(),425);if(Qw(a,c.a.ld())!=RD(c.a.md(),16).gc()){return false}}return true}return false} +function sPb(a){var b,c,d,e;d=RD(a.a,17).a;e=RD(a.b,17).a;b=d;c=e;if(d==0&&e==0){c-=1}else{if(d==-1&&e<=0){b=0;c-=2}else{if(d<=0&&e>0){b-=1;c-=1}else{if(d>=0&&e<0){b+=1;c+=1}else{if(d>0&&e>=0){b-=1;c+=1}else{b+=1;c-=1}}}}}return new Ptd(sgb(b),sgb(c))} +function nNc(a,b){if(a.c<b.c){return -1}else if(a.c>b.c){return 1}else if(a.b<b.b){return -1}else if(a.b>b.b){return 1}else if(a.a!=b.a){return tb(a.a)-tb(b.a)}else if(a.d==(sNc(),rNc)&&b.d==qNc){return -1}else if(a.d==qNc&&b.d==rNc){return 1}return 0} +function ARc(a,b){var c,d,e,f,g;f=b.a;f.c.i==b.b?(g=f.d):(g=f.c);f.c.i==b.b?(d=f.c):(d=f.d);e=lQc(a.a,g,d);if(e>0&&e<Hze){c=mQc(a.a,d.i,e,a.c);rQc(a.a,d.i,-c);return c>0}else if(e<0&&-e<Hze){c=nQc(a.a,d.i,-e,a.c);rQc(a.a,d.i,c);return c>0}return false} +function X9c(a,b,c,d){var e,f,g,h,i,j,k,l;e=(b-a.d)/a.c.c.length;f=0;a.a+=c;a.d=b;for(l=new Anb(a.c);l.a<l.c.c.length;){k=RD(ynb(l),27);j=k.g;i=k.f;Dyd(k,k.i+f*e);Eyd(k,k.j+d*c);Cyd(k,k.g+e);Ayd(k,a.a);++f;h=k.g;g=k.f;Jsd(k,new rjd(h,g),new rjd(j,i))}} +function vAd(a){var b,c,d,e,f,g,h;if(a==null){return null}h=a.length;e=(h+1)/2|0;g=$C(gE,YHe,28,e,15,1);h%2!=0&&(g[--e]=JAd((BFb(h-1,a.length),a.charCodeAt(h-1))));for(c=0,d=0;c<e;++c){b=JAd(ihb(a,d++));f=JAd(ihb(a,d++));g[c]=(b<<4|f)<<24>>24}return g} +function Bfb(a){if(a.ze()){var b=a.c;b.Ae()?(a.o='['+b.n):!b.ze()?(a.o='[L'+b.xe()+';'):(a.o='['+b.xe());a.b=b.we()+'[]';a.k=b.ye()+'[]';return}var c=a.j;var d=a.d;d=d.split('/');a.o=Efb('.',[c,Efb('$',d)]);a.b=Efb('.',[c,Efb('.',d)]);a.k=d[d.length-1]} +function hJb(a,b){var c,d,e,f,g;g=null;for(f=new Anb(a.e.a);f.a<f.c.c.length;){e=RD(ynb(f),125);if(e.b.a.c.length==e.g.a.c.length){d=e.e;g=sJb(e);for(c=e.e-RD(g.a,17).a+1;c<e.e+RD(g.b,17).a;c++){b[c]<b[d]&&(d=c)}if(b[d]<b[e.e]){--b[e.e];++b[d];e.e=d}}}} +function qQc(a){var b,c,d,e,f,g,h,i;e=oxe;d=pxe;for(c=new Anb(a.e.b);c.a<c.c.c.length;){b=RD(ynb(c),30);for(g=new Anb(b.a);g.a<g.c.c.length;){f=RD(ynb(g),10);i=Kfb(a.p[f.p]);h=i+Kfb(a.b[a.g[f.p].p]);e=$wnd.Math.min(e,i);d=$wnd.Math.max(d,h)}}return d-e} +function nSd(a){gSd();var b,c,d,e;d=qhb(a,Fhb(35));b=d==-1?a:(AFb(0,d,a.length),a.substr(0,d));c=d==-1?null:(BFb(d+1,a.length+1),a.substr(d+1));e=KSd(fSd,b);if(!e){e=ASd(b);LSd(fSd,b,e);c!=null&&(e=hSd(e,c))}else c!=null&&(e=hSd(e,(uFb(c),c)));return e} +function Ree(a,b,c,d){var e,f,g,h,i,j;i=null;e=Fee(a,b);for(h=0,j=e.gc();h<j;++h){f=RD(e.Xb(h),179);if(lhb(d,Afe(Qee(a,f)))){g=Bfe(Qee(a,f));if(c==null){if(g==null){return f}else !i&&(i=f)}else if(lhb(c,g)){return f}else g==null&&!i&&(i=f)}}return null} +function See(a,b,c,d){var e,f,g,h,i,j;i=null;e=Gee(a,b);for(h=0,j=e.gc();h<j;++h){f=RD(e.Xb(h),179);if(lhb(d,Afe(Qee(a,f)))){g=Bfe(Qee(a,f));if(c==null){if(g==null){return f}else !i&&(i=f)}else if(lhb(c,g)){return f}else g==null&&!i&&(i=f)}}return null} +function Pge(a,b,c){var d,e,f,g,h,i;g=new YHd;h=pke(a.e.Dh(),b);d=RD(a.g,124);nke();if(RD(b,69).xk()){for(f=0;f<a.i;++f){e=d[f];h.am(e.Lk())&&WGd(g,e)}}else{for(f=0;f<a.i;++f){e=d[f];if(h.am(e.Lk())){i=e.md();WGd(g,c?Bge(a,b,f,g.i,i):i)}}}return WHd(g)} +function Kje(a){var b,c,d,e,f,g,h;if(a){b=a.qi(AKe);if(b){g=WD($Nd((!b.b&&(b.b=new SVd((JTd(),FTd),C8,b)),b.b),'conversionDelegates'));if(g!=null){h=new bnb;for(d=vhb(g,'\\w+'),e=0,f=d.length;e<f;++e){c=d[e];ZEb(h.c,c)}return h}}}return yob(),yob(),vob} +function WXb(a,b){var c,d,e,f,g,h,i,j;g=b==1?MXb:LXb;for(f=g.a.ec().Kc();f.Ob();){e=RD(f.Pb(),88);for(i=RD(Qc(a.f.c,e),21).Kc();i.Ob();){h=RD(i.Pb(),42);d=RD(h.b,86);j=RD(h.a,194);c=j.c;switch(e.g){case 2:case 1:d.g.d+=c;break;case 4:case 3:d.g.c+=c;}}}} +function idc(a,b){var c,d,e,f,g;c=new Zrb(ZW);for(e=(btc(),cD(WC(ZW,1),jwe,232,0,[Zsc,_sc,Ysc,$sc,atc,Xsc])),f=0,g=e.length;f<g;++f){d=e[f];Xrb(c,d,new bnb)}FDb(GDb(CDb(EDb(new SDb(null,new Swb(a.b,16)),new ydc),new Adc),new Cdc(b)),new Edc(c));return c} +function n3c(a,b,c){var d,e,f,g,h,i,j,k,l,m;for(f=b.Kc();f.Ob();){e=RD(f.Pb(),27);k=e.i+e.g/2;m=e.j+e.f/2;i=a.f;g=i.i+i.g/2;h=i.j+i.f/2;j=k-g;l=m-h;d=$wnd.Math.sqrt(j*j+l*l);j*=a.e/d;l*=a.e/d;if(c){k-=j;m-=l}else{k+=j;m+=l}Dyd(e,k-e.g/2);Eyd(e,m-e.f/2)}} +function vte(a){var b,c,d;if(a.c)return;if(a.b==null)return;for(b=a.b.length-4;b>=0;b-=2){for(c=0;c<=b;c+=2){if(a.b[c]>a.b[c+2]||a.b[c]===a.b[c+2]&&a.b[c+1]>a.b[c+3]){d=a.b[c+2];a.b[c+2]=a.b[c];a.b[c]=d;d=a.b[c+3];a.b[c+3]=a.b[c+1];a.b[c+1]=d}}}a.c=true} +function nKc(a,b){var c,d,e,f,g,h,i,j,k;j=-1;k=0;for(g=a,h=0,i=g.length;h<i;++h){f=g[h];c=new hrc(j==-1?a[0]:a[j],b,(lDc(),kDc));for(d=0;d<f.length;d++){for(e=d+1;e<f.length;e++){nQb(f[d],(Ywc(),zwc))&&nQb(f[e],zwc)&&crc(c,f[d],f[e])>0&&++k}}++j}return k} +function awd(a){var b,c;c=new dib(nfb(a.Rm));c.a+='@';Zhb(c,(b=tb(a)>>>0,b.toString(16)));if(a.Vh()){c.a+=' (eProxyURI: ';Yhb(c,a._h());if(a.Kh()){c.a+=' eClass: ';Yhb(c,a.Kh())}c.a+=')'}else if(a.Kh()){c.a+=' (eClass: ';Yhb(c,a.Kh());c.a+=')'}return c.a} +function KGb(a){var b,c,d,e;if(a.e){throw Adb(new dgb((lfb(lN),lye+lN.k+mye)))}a.d==(Cmd(),Amd)&&JGb(a,ymd);for(c=new Anb(a.a.a);c.a<c.c.c.length;){b=RD(ynb(c),316);b.g=b.i}for(e=new Anb(a.a.b);e.a<e.c.c.length;){d=RD(ynb(e),60);d.i=pxe}a.b.cf(a);return a} +function rUc(a,b){var c,d,e,f,g;if(b<2*a.b){throw Adb(new agb('The knot vector must have at least two time the dimension elements.'))}a.f=1;for(e=0;e<a.b;e++){Rmb(a.e,0)}g=b+1-2*a.b;c=g;for(f=1;f<g;f++){Rmb(a.e,f/c)}if(a.d){for(d=0;d<a.b;d++){Rmb(a.e,1)}}} +function AEd(a,b){var c,d,e,f,g,h,i,j,k;j=b;k=RD(lp(Co(a.i),j),27);if(!k){e=zDd(j,uIe);h="Unable to find elk node for json object '"+e;i=h+"' Panic!";throw Adb(new CDd(i))}f=wDd(j,'edges');c=new KEd(a,k);MDd(c.a,c.b,f);g=wDd(j,iIe);d=new VEd(a);XDd(d.a,g)} +function XNd(a,b,c,d){var e,f,g,h,i;if(d!=null){e=a.d[b];if(e){f=e.g;i=e.i;for(h=0;h<i;++h){g=RD(f[h],136);if(g.Bi()==c&&pb(d,g.ld())){return h}}}}else{e=a.d[b];if(e){f=e.g;i=e.i;for(h=0;h<i;++h){g=RD(f[h],136);if(dE(g.ld())===dE(d)){return h}}}}return -1} +function N5d(a,b){var c,d,e;c=b==null?Wd(qtb(a.f,null)):Ktb(a.i,b);if(ZD(c,241)){e=RD(c,241);e.zi()==null&&undefined;return e}else if(ZD(c,507)){d=RD(c,2037);e=d.a;!!e&&(e.yb==null?undefined:b==null?rtb(a.f,null,e):Ltb(a.i,b,e));return e}else{return null}} +function Hqe(a){Gqe();var b,c,d,e,f,g,h;if(a==null)return null;e=a.length;if(e%2!=0)return null;b=Ahb(a);f=e/2|0;c=$C(gE,YHe,28,f,15,1);for(d=0;d<f;d++){g=Eqe[b[d*2]];if(g==-1)return null;h=Eqe[b[d*2+1]];if(h==-1)return null;c[d]=(g<<4|h)<<24>>24}return c} +function cNb(a,b,c){var d,e,f;e=RD(Vrb(a.i,b),314);if(!e){e=new UKb(a.d,b,c);Wrb(a.i,b,e);if(jMb(b)){tKb(a.a,b.c,b.b,e)}else{f=iMb(b);d=RD(Vrb(a.p,f),252);switch(f.g){case 1:case 3:e.j=true;cLb(d,b.b,e);break;case 4:case 2:e.k=true;cLb(d,b.c,e);}}}return e} +function Ndc(a,b){var c,d,e,f,g,h,i,j,k;i=ev(a.c-a.b&a.a.length-1);j=null;k=null;for(f=new Kmb(a);f.a!=f.b;){e=RD(Imb(f),10);c=(h=RD(mQb(e,(Ywc(),vwc)),12),!h?null:h.i);d=(g=RD(mQb(e,wwc),12),!g?null:g.i);if(j!=c||k!=d){Rdc(i,b);j=c;k=d}ZEb(i.c,e)}Rdc(i,b)} +function Rge(a,b,c,d){var e,f,g,h,i,j;h=new YHd;i=pke(a.e.Dh(),b);e=RD(a.g,124);nke();if(RD(b,69).xk()){for(g=0;g<a.i;++g){f=e[g];i.am(f.Lk())&&WGd(h,f)}}else{for(g=0;g<a.i;++g){f=e[g];if(i.am(f.Lk())){j=f.md();WGd(h,d?Bge(a,b,g,h.i,j):j)}}}return XHd(h,c)} +function oHc(a,b){var c,d,e,f,g,h,i,j;e=a.b[b.p];if(e>=0){return e}else{f=1;for(h=new Anb(b.j);h.a<h.c.c.length;){g=RD(ynb(h),12);for(d=new Anb(g.g);d.a<d.c.c.length;){c=RD(ynb(d),18);j=c.d.i;if(b!=j){i=oHc(a,j);f=$wnd.Math.max(f,i+1)}}}nHc(a,b,f);return f}} +function wHc(a,b){var c,d,e,f,g,h,i,j;e=a.b[b.p];if(e>=0){return e}else{f=1;for(h=new Anb(b.j);h.a<h.c.c.length;){g=RD(ynb(h),12);for(d=new Anb(g.e);d.a<d.c.c.length;){c=RD(ynb(d),18);j=c.c.i;if(b!=j){i=wHc(a,j);f=$wnd.Math.max(f,i+1)}}}vHc(a,b,f);return f}} +function wLc(a,b,c){var d,e,f;for(d=1;d<a.c.length;d++){f=(tFb(d,a.c.length),RD(a.c[d],10));e=d;while(e>0&&b.Ne((tFb(e-1,a.c.length),RD(a.c[e-1],10)),f)>0){$mb(a,e,(tFb(e-1,a.c.length),RD(a.c[e-1],10)));--e}tFb(e,a.c.length);a.c[e]=f}c.a=new Tsb;c.b=new Tsb} +function yhd(a,b,c){var d,e,f,g,h,i,j,k;k=(d=RD(b.e&&b.e(),9),new Fsb(d,RD(WEb(d,d.length),9),0));i=vhb(c,'[\\[\\]\\s,]+');for(f=i,g=0,h=f.length;g<h;++g){e=f[g];if(Dhb(e).length==0){continue}j=xhd(a,e);if(j==null){return null}else{zsb(k,RD(j,22))}}return k} +function tse(a){var b,c,d,e;e=a.length;b=null;for(d=0;d<e;d++){c=(BFb(d,a.length),a.charCodeAt(d));if(qhb('.*+?{[()|\\^$',Fhb(c))>=0){if(!b){b=new Rhb;d>0&&Nhb(b,(AFb(0,d,a.length),a.substr(0,d)))}b.a+='\\';Jhb(b,c&Bwe)}else !!b&&Jhb(b,c&Bwe)}return b?b.a:a} +function MYb(a){var b,c,d;for(c=new Anb(a.a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),86);d=(uFb(0),0);if(d>0){!(Dmd(a.a.c)&&b.n.d)&&!(Emd(a.a.c)&&b.n.b)&&(b.g.d-=$wnd.Math.max(0,d/2-0.5));!(Dmd(a.a.c)&&b.n.a)&&!(Emd(a.a.c)&&b.n.c)&&(b.g.a+=$wnd.Math.max(0,d-1))}}} +function Ydc(a,b,c){var d,e;if((a.c-a.b&a.a.length-1)==2){if(b==(qpd(),Yod)||b==Xod){Odc(RD(omb(a),15),(Pnd(),Lnd));Odc(RD(omb(a),15),Mnd)}else{Odc(RD(omb(a),15),(Pnd(),Mnd));Odc(RD(omb(a),15),Lnd)}}else{for(e=new Kmb(a);e.a!=e.b;){d=RD(Imb(e),15);Odc(d,c)}}} +function HGd(a,b){var c,d,e,f,g,h,i;e=cv(new QGd(a));h=new Jkb(e,e.c.length);f=cv(new QGd(b));i=new Jkb(f,f.c.length);g=null;while(h.b>0&&i.b>0){c=(sFb(h.b>0),RD(h.a.Xb(h.c=--h.b),27));d=(sFb(i.b>0),RD(i.a.Xb(i.c=--i.b),27));if(c==d){g=c}else{break}}return g} +function Dmc(a,b,c){var d,e,f,g;if(Hmc(a,b)>Hmc(a,c)){d=b3b(c,(qpd(),Xod));a.d=d.dc()?0:L3b(RD(d.Xb(0),12));g=b3b(b,ppd);a.b=g.dc()?0:L3b(RD(g.Xb(0),12))}else{e=b3b(c,(qpd(),ppd));a.d=e.dc()?0:L3b(RD(e.Xb(0),12));f=b3b(b,Xod);a.b=f.dc()?0:L3b(RD(f.Xb(0),12))}} +function wNb(a,b){var c,d,e,f;c=a.o.a;for(f=RD(RD(Qc(a.r,b),21),87).Kc();f.Ob();){e=RD(f.Pb(),117);e.e.a=c*Kfb(UD(e.b.of(sNb)));e.e.b=(d=e.b,d.pf((umd(),Gld))?d.ag()==(qpd(),Yod)?-d.Mf().b-Kfb(UD(d.of(Gld))):Kfb(UD(d.of(Gld))):d.ag()==(qpd(),Yod)?-d.Mf().b:0)}} +function Mhc(a,b){var c,d,e,f;b.Ug('Self-Loop pre-processing',1);for(d=new Anb(a.a);d.a<d.c.c.length;){c=RD(ynb(d),10);if(pnc(c)){e=(f=new onc(c),pQb(c,(Ywc(),Pwc),f),lnc(f),f);FDb(GDb(EDb(new SDb(null,new Swb(e.d,16)),new Phc),new Rhc),new Thc);Khc(e)}}b.Vg()} +function xsc(a){var b,c,d,e,f,g,h,i;b=true;e=null;f=null;j:for(i=new Anb(a.a);i.a<i.c.c.length;){h=RD(ynb(i),10);for(d=new is(Mr(Z2b(h).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);if(!!e&&e!=h){b=false;break j}e=h;g=c.c.i;if(!!f&&f!=g){b=false;break j}f=g}}return b} +function mTc(a,b,c){var d,e,f,g,h,i;f=-1;h=-1;for(g=0;g<b.c.length;g++){e=(tFb(g,b.c.length),RD(b.c[g],339));if(e.c>a.c){break}else if(e.a>=a.s){f<0&&(f=g);h=g}}i=(a.s+a.c)/2;if(f>=0){d=lTc(a,b,f,h);i=yTc((tFb(d,b.c.length),RD(b.c[d],339)));wTc(b,d,c)}return i} +function _Ad(a,b,c){var d,e,f,g,h,i,j;g=(f=new pVd,f);nVd(g,(uFb(b),b));j=(!g.b&&(g.b=new SVd((JTd(),FTd),C8,g)),g.b);for(i=1;i<c.length;i+=2){fOd(j,c[i-1],c[i])}d=(!a.Ab&&(a.Ab=new C5d(f7,a,0,3)),a.Ab);for(h=0;h<0;++h){e=jVd(RD(QHd(d,d.i-1),598));d=e}WGd(d,g)} +function DSb(a,b,c){var d,e,f;jQb.call(this,new bnb);this.a=b;this.b=c;this.e=a;d=(a.b&&CRb(a),a.a);this.d=BSb(d.a,this.a);this.c=BSb(d.b,this.b);bQb(this,this.d,this.c);CSb(this);for(f=this.e.e.a.ec().Kc();f.Ob();){e=RD(f.Pb(),272);e.c.c.length>0&&ASb(this,e)}} +function zTb(a,b,c,d,e,f){var g,h,i;if(!e[b.a]){e[b.a]=true;g=d;!g&&(g=new gUb);Rmb(g.e,b);for(i=f[b.a].Kc();i.Ob();){h=RD(i.Pb(),290);if(h.d==c||h.c==c){continue}h.c!=b&&zTb(a,h.c,b,g,e,f);h.d!=b&&zTb(a,h.d,b,g,e,f);Rmb(g.c,h);Tmb(g.d,h.b)}return g}return null} +function v7b(a){var b,c,d,e,f,g,h;b=0;for(e=new Anb(a.e);e.a<e.c.c.length;){d=RD(ynb(e),18);c=yDb(new SDb(null,new Swb(d.b,16)),new N7b);c&&++b}for(g=new Anb(a.g);g.a<g.c.c.length;){f=RD(ynb(g),18);h=yDb(new SDb(null,new Swb(f.b,16)),new P7b);h&&++b}return b>=2} +function _qc(a,b,c,d,e){var f,g,h,i,j,k;f=a.c.d.j;g=RD(ju(c,0),8);for(k=1;k<c.b;k++){j=RD(ju(c,k),8);Pub(d,g,d.c.b,d.c);h=ijd($id(new sjd(g),j),0.5);i=ijd(new qjd(BVc(f)),e);$id(h,i);Pub(d,h,d.c.b,d.c);g=j;f=b==0?tpd(f):rpd(f)}Mub(d,(sFb(c.b!=0),RD(c.c.b.c,8)))} +function fod(a){dod();var b,c,d;c=ysb($nd,cD(WC(A3,1),jwe,95,0,[_nd]));if(dy(Tx(c,a))>1){return false}b=ysb(Xnd,cD(WC(A3,1),jwe,95,0,[Wnd,Znd]));if(dy(Tx(b,a))>1){return false}d=ysb(cod,cD(WC(A3,1),jwe,95,0,[bod,aod]));if(dy(Tx(d,a))>1){return false}return true} +function $Uc(a,b,c){var d,e,f;for(f=new Anb(a.t);f.a<f.c.c.length;){d=RD(ynb(f),274);if(d.b.s<0&&d.c>0){d.b.n-=d.c;d.b.n<=0&&d.b.u>0&&Mub(b,d.b)}}for(e=new Anb(a.i);e.a<e.c.c.length;){d=RD(ynb(e),274);if(d.a.s<0&&d.c>0){d.a.u-=d.c;d.a.u<=0&&d.a.n>0&&Mub(c,d.a)}}} +function tId(a){var b,c,d,e,f;if(a.g==null){a.d=a.bj(a.f);WGd(a,a.d);if(a.c){f=a.f;return f}}b=RD(a.g[a.i-1],51);e=b.Pb();a.e=b;c=a.bj(e);if(c.Ob()){a.d=c;WGd(a,c)}else{a.d=null;while(!b.Ob()){bD(a.g,--a.i,null);if(a.i==0){break}d=RD(a.g[a.i-1],51);b=d}}return e} +function Rfe(a,b){var c,d,e,f,g,h;d=b;e=d.Lk();if(qke(a.e,e)){if(e.Si()&&cge(a,e,d.md())){return false}}else{h=pke(a.e.Dh(),e);c=RD(a.g,124);for(f=0;f<a.i;++f){g=c[f];if(h.am(g.Lk())){if(pb(g,d)){return false}else{RD(eHd(a,f,b),76);return true}}}}return WGd(a,b)} +function Icc(a,b,c,d){var e,f,g,h;e=new j3b(a);h3b(e,(r3b(),n3b));pQb(e,(Ywc(),Awc),b);pQb(e,Mwc,d);pQb(e,(yCc(),BBc),(Bod(),wod));pQb(e,vwc,b.c);pQb(e,wwc,b.d);Oec(b,e);h=$wnd.Math.floor(c/2);for(g=new Anb(e.j);g.a<g.c.c.length;){f=RD(ynb(g),12);f.n.b=h}return e} +function fSc(a){var b,c,d,e,f,g,h;b=0;for(d=new Anb(a.a);d.a<d.c.c.length;){c=RD(ynb(d),10);for(f=new is(Mr(a3b(c).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);if(a==e.d.i.c&&e.c.j==(qpd(),ppd)){g=K3b(e.c).b;h=K3b(e.d).b;b=$wnd.Math.max(b,$wnd.Math.abs(h-g))}}}return b} +function QTb(a,b,c){var d,e,f,g,h;c.Ug('ELK Force',1);Heb(TD(Gxd(b,(yVb(),gVb))))||RFb((d=new SFb((lud(),new zud(b))),d));h=KTb(b);RTb(h);STb(a,RD(mQb(h,bVb),432));g=CTb(a.a,h);for(f=g.Kc();f.Ob();){e=RD(f.Pb(),235);pUb(a.b,e,c.eh(1/g.gc()))}h=BTb(g);JTb(h);c.Vg()} +function d_b(a,b,c){switch(c.g){case 1:return new rjd(b.a,$wnd.Math.min(a.d.b,b.b));case 2:return new rjd($wnd.Math.max(a.c.a,b.a),b.b);case 3:return new rjd(b.a,$wnd.Math.max(a.c.b,b.b));case 4:return new rjd($wnd.Math.min(b.a,a.d.a),b.b);}return new rjd(b.a,b.b)} +function yGd(a){var b,c,d;b=ev(1+(!a.c&&(a.c=new C5d(K4,a,9,9)),a.c).i);Rmb(b,(!a.d&&(a.d=new Yie(G4,a,8,5)),a.d));for(d=new dMd((!a.c&&(a.c=new C5d(K4,a,9,9)),a.c));d.e!=d.i.gc();){c=RD(bMd(d),123);Rmb(b,(!c.d&&(c.d=new Yie(G4,c,8,5)),c.d))}return Qb(b),new Dl(b)} +function zGd(a){var b,c,d;b=ev(1+(!a.c&&(a.c=new C5d(K4,a,9,9)),a.c).i);Rmb(b,(!a.e&&(a.e=new Yie(G4,a,7,4)),a.e));for(d=new dMd((!a.c&&(a.c=new C5d(K4,a,9,9)),a.c));d.e!=d.i.gc();){c=RD(bMd(d),123);Rmb(b,(!c.e&&(c.e=new Yie(G4,c,7,4)),c.e))}return Qb(b),new Dl(b)} +function jne(a){var b,c,d,e;if(a==null){return null}else{d=nue(a,true);e=mLe.length;if(lhb(d.substr(d.length-e,e),mLe)){c=d.length;if(c==4){b=(BFb(0,d.length),d.charCodeAt(0));if(b==43){return Wme}else if(b==45){return Vme}}else if(c==3){return Wme}}return Neb(d)}} +function _rc(a,b){var c,d,e,f,g;b.Ug('Breaking Point Processor',1);$rc(a);if(Heb(TD(mQb(a,(yCc(),uCc))))){for(e=new Anb(a.b);e.a<e.c.c.length;){d=RD(ynb(e),30);c=0;for(g=new Anb(d.a);g.a<g.c.c.length;){f=RD(ynb(g),10);f.p=c++}}Vrc(a);Wrc(a,true);Wrc(a,false)}b.Vg()} +function MJc(a,b,c,d){var e,f,g,h,i,j,k,l,m;l=d?(qpd(),ppd):(qpd(),Xod);e=false;for(i=b[c],j=0,k=i.length;j<k;++j){h=i[j];if(Cod(RD(mQb(h,(yCc(),BBc)),101))){continue}g=h.e;m=!b3b(h,l).dc()&&!!g;if(m){f=c1b(g);a.b=new Ylc(f,d?0:f.length-1)}e=e|NJc(a,h,l,m)}return e} +function gOc(a,b,c,d){var e,f,g;g=T0b(b,c);ZEb(d.c,b);if(a.j[g.p]==-1||a.j[g.p]==2||a.a[b.p]){return d}a.j[g.p]=-1;for(f=new is(Mr(W2b(g).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);if(!(!W0b(e)&&!(!W0b(e)&&e.c.i.c==e.d.i.c))||e==b){continue}return gOc(a,e,g,d)}return d} +function AOc(a){var b,c,d,e;b=0;c=0;for(e=new Anb(a.j);e.a<e.c.c.length;){d=RD(ynb(e),12);b=Ydb(Bdb(b,ADb(CDb(new SDb(null,new Swb(d.e,16)),new NPc))));c=Ydb(Bdb(c,ADb(CDb(new SDb(null,new Swb(d.g,16)),new PPc))));if(b>1||c>1){return 2}}if(b+c==1){return 2}return 0} +function Kwb(a,b){var c,d,e,f,g,h;f=a.a*Mxe+a.b*1502;h=a.b*Mxe+11;c=$wnd.Math.floor(h*Nxe);f+=c;h-=c*Oxe;f%=Oxe;a.a=f;a.b=h;if(b<=24){return $wnd.Math.floor(a.a*Ewb[b])}else{e=a.a*(1<<b-24);g=$wnd.Math.floor(a.b*Fwb[b]);d=e+g;d>=2147483648&&(d-=4294967296);return d}} +function uSc(a,b,c){var d,e,f,g,h,i,j;f=new bnb;j=new Yub;g=new Yub;vSc(a,j,g,b);tSc(a,j,g,b,c);for(i=new Anb(a);i.a<i.c.c.length;){h=RD(ynb(i),118);for(e=new Anb(h.k);e.a<e.c.c.length;){d=RD(ynb(e),132);(!b||d.c==(fTc(),dTc))&&h.g>d.b.g&&(ZEb(f.c,d),true)}}return f} +function jed(a,b,c){var d,e,f,g,h,i;h=a.c;for(g=(!c.q?(yob(),yob(),wob):c.q).vc().Kc();g.Ob();){f=RD(g.Pb(),44);d=!QDb(CDb(new SDb(null,new Swb(h,16)),new PAb(new xed(b,f)))).Bd((xDb(),wDb));if(d){i=f.md();if(ZD(i,4)){e=FId(i);e!=null&&(i=e)}b.qf(RD(f.ld(),149),i)}}} +function mbd(a,b,c){var d,e;Sed(a.b);Ved(a.b,(gbd(),dbd),(_cd(),$cd));Ved(a.b,ebd,b.g);Ved(a.b,fbd,b.a);a.a=Qed(a.b,b);c.Ug('Compaction by shrinking a tree',a.a.c.length);if(b.i.c.length>1){for(e=new Anb(a.a);e.a<e.c.c.length;){d=RD(ynb(e),47);d.Kf(b,c.eh(1))}}c.Vg()} +function Svd(a,b,c){var d,e,f;f=Eee((lke(),jke),a.Dh(),b);if(f){nke();if(!RD(f,69).xk()){f=zfe(Qee(jke,f));if(!f){throw Adb(new agb(KHe+b.xe()+LHe))}}e=(d=a.Ih(f),RD(d>=0?a.Lh(d,true,true):Qvd(a,f,true),160));RD(e,220).Xl(b,c)}else{throw Adb(new agb(KHe+b.xe()+LHe))}} +function k2d(a,b){var c,d,e,f,g;if(!b){return null}else{f=ZD(a.Cb,90)||ZD(a.Cb,102);g=!f&&ZD(a.Cb,331);for(d=new dMd((!b.a&&(b.a=new iae(b,o7,b)),b.a));d.e!=d.i.gc();){c=RD(bMd(d),89);e=i2d(c);if(f?ZD(e,90):g?ZD(e,156):!!e){return e}}return f?(JTd(),zTd):(JTd(),wTd)}} +function W8b(a,b){var c,d,e,f;b.Ug('Resize child graph to fit parent.',1);for(d=new Anb(a.b);d.a<d.c.c.length;){c=RD(ynb(d),30);Tmb(a.a,c.a);c.a.c.length=0}for(f=new Anb(a.a);f.a<f.c.c.length;){e=RD(ynb(f),10);g3b(e,null)}a.b.c.length=0;X8b(a);!!a.e&&V8b(a.e,a);b.Vg()} +function Fec(a,b){var c,d,e,f,g;b.Ug('Edge joining',1);c=Heb(TD(mQb(a,(yCc(),mCc))));for(e=new Anb(a.b);e.a<e.c.c.length;){d=RD(ynb(e),30);g=new Jkb(d.a,0);while(g.b<g.d.gc()){f=(sFb(g.b<g.d.gc()),RD(g.d.Xb(g.c=g.b++),10));if(f.k==(r3b(),o3b)){Hec(f,c);Ckb(g)}}}b.Vg()} +function pTc(a,b){var c,d,e,f,g;c=new bnb;e=EDb(new SDb(null,new Swb(a,16)),new ITc);f=EDb(new SDb(null,new Swb(a,16)),new KTc);g=VCb(UCb(HDb(Ly(cD(WC(RM,1),rve,848,0,[e,f])),new MTc)));for(d=1;d<g.length;d++){g[d]-g[d-1]>=2*b&&Rmb(c,new BTc(g[d-1]+b,g[d]-b))}return c} +function dEd(a,b,c){var d,e,f,g,h,j,k,l;if(c){f=c.a.length;d=new vue(f);for(h=(d.b-d.a)*d.c<0?(uue(),tue):new Rue(d);h.Ob();){g=RD(h.Pb(),17);e=xDd(c,g.a);!!e&&(i=null,j=sEd(a,(k=(bvd(),l=new PCd,l),!!b&&NCd(k,b),k),e),jyd(j,zDd(e,uIe)),GEd(e,j),HEd(e,j),CEd(a,e,j))}}} +function sYd(a){var b,c,d,e,f,g;if(!a.j){g=new f1d;b=iYd;f=b.a.zc(a,b);if(f==null){for(d=new dMd(zYd(a));d.e!=d.i.gc();){c=RD(bMd(d),29);e=sYd(c);YGd(g,e);WGd(g,c)}b.a.Bc(a)!=null}VHd(g);a.j=new N$d((RD(QHd(xYd((lTd(),kTd).o),11),19),g.i),g.g);yYd(a).b&=-33}return a.j} +function lne(a){var b,c,d,e;if(a==null){return null}else{d=nue(a,true);e=mLe.length;if(lhb(d.substr(d.length-e,e),mLe)){c=d.length;if(c==4){b=(BFb(0,d.length),d.charCodeAt(0));if(b==43){return Yme}else if(b==45){return Xme}}else if(c==3){return Yme}}return new Ufb(d)}} +function pD(a){var b,c,d;c=a.l;if((c&c-1)!=0){return -1}d=a.m;if((d&d-1)!=0){return -1}b=a.h;if((b&b-1)!=0){return -1}if(b==0&&d==0&&c==0){return -1}if(b==0&&d==0&&c!=0){return ogb(c)}if(b==0&&d!=0&&c==0){return ogb(d)+22}if(b!=0&&d==0&&c==0){return ogb(b)+44}return -1} +function yo(a,b){var c,d,e,f,g;e=b.a&a.f;f=null;for(d=a.b[e];true;d=d.b){if(d==b){!f?(a.b[e]=b.b):(f.b=b.b);break}f=d}g=b.f&a.f;f=null;for(c=a.c[g];true;c=c.d){if(c==b){!f?(a.c[g]=b.d):(f.d=b.d);break}f=c}!b.e?(a.a=b.c):(b.e.c=b.c);!b.c?(a.e=b.e):(b.c.e=b.e);--a.i;++a.g} +function Dt(a,b){var c;b.d?(b.d.b=b.b):(a.a=b.b);b.b?(b.b.d=b.d):(a.e=b.d);if(!b.e&&!b.c){c=RD(Hvb(RD(_jb(a.b,b.a),260)),260);c.a=0;++a.c}else{c=RD(Hvb(RD(Wjb(a.b,b.a),260)),260);--c.a;!b.e?(c.b=RD(Hvb(b.c),511)):(b.e.c=b.c);!b.c?(c.c=RD(Hvb(b.e),511)):(b.c.e=b.e)}--a.d} +function XPb(a){var b,c,d,e,f,g,h,i,j,k;c=a.o;b=a.p;g=lve;e=qwe;h=lve;f=qwe;for(j=0;j<c;++j){for(k=0;k<b;++k){if(PPb(a,j,k)){g=$wnd.Math.min(g,j);e=$wnd.Math.max(e,j);h=$wnd.Math.min(h,k);f=$wnd.Math.max(f,k)}}}i=e-g+1;d=f-h+1;return new $td(sgb(g),sgb(h),sgb(i),sgb(d))} +function FZb(a,b){var c,d,e,f;f=new Jkb(a,0);c=(sFb(f.b<f.d.gc()),RD(f.d.Xb(f.c=f.b++),148));while(f.b<f.d.gc()){d=(sFb(f.b<f.d.gc()),RD(f.d.Xb(f.c=f.b++),148));e=new fZb(d.c,c.d,b);sFb(f.b>0);f.a.Xb(f.c=--f.b);Ikb(f,e);sFb(f.b<f.d.gc());f.d.Xb(f.c=f.b++);e.a=false;c=d}} +function n6b(a){var b,c,d,e,f,g;e=RD(mQb(a,(Ywc(),Xvc)),12);for(g=new Anb(a.j);g.a<g.c.c.length;){f=RD(ynb(g),12);for(d=new Anb(f.g);d.a<d.c.c.length;){b=RD(ynb(d),18);Z0b(b,e);return f}for(c=new Anb(f.e);c.a<c.c.c.length;){b=RD(ynb(c),18);Y0b(b,e);return f}}return null} +function Xec(a,b,c){var d,e,f,g,h,i;i=RD($5b(a.a,b),17).a;c?c6b(a.a,sgb(i+1),b):c6b(a.a,sgb(i-1),b);g=new Iub;for(e=new is(Mr((c?a3b(b):Z2b(b)).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);c?(f=d.d.i):(f=d.c.i);dE($5b(a.a,f))===dE($5b(a.a,b))&&(h=g.a.zc(f,g),h==null)}return g} +function yA(a,b,c){var d,e;d=Hdb(c.q.getTime());if(Ddb(d,0)<0){e=Awe-Ydb(Mdb(Odb(d),Awe));e==Awe&&(e=0)}else{e=Ydb(Mdb(d,Awe))}if(b==1){e=$wnd.Math.min((e+50)/100|0,9);Thb(a,48+e&Bwe)}else if(b==2){e=$wnd.Math.min((e+5)/10|0,99);UA(a,e,2)}else{UA(a,e,3);b>3&&UA(a,0,b-3)}} +function eXb(a){var b,c,d,e;if(dE(mQb(a,(yCc(),IAc)))===dE((Fnd(),Cnd))){return !a.e&&dE(mQb(a,gAc))!==dE((xvc(),uvc))}d=RD(mQb(a,hAc),299);e=Heb(TD(mQb(a,nAc)))||dE(mQb(a,oAc))===dE((stc(),ptc));b=RD(mQb(a,fAc),17).a;c=a.a.c.length;return !e&&d!=(xvc(),uvc)&&(b==0||b>c)} +function Rnc(a){var b,c;c=0;for(;c<a.c.length;c++){if(snc((tFb(c,a.c.length),RD(a.c[c],113)))>0){break}}if(c>0&&c<a.c.length-1){return c}b=0;for(;b<a.c.length;b++){if(snc((tFb(b,a.c.length),RD(a.c[b],113)))>0){break}}if(b>0&&c<a.c.length-1){return b}return a.c.length/2|0} +function Mzd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=6&&!!b){if(Oje(a,b))throw Adb(new agb(UHe+Qzd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?Czd(a,d):a.Cb.Th(a,-1-c,null,d)));!!b&&(d=Ivd(b,a,6,d));d=Bzd(a,b,d);!!d&&d.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,6,b,b))} +function pzd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=3&&!!b){if(Oje(a,b))throw Adb(new agb(UHe+qzd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?jzd(a,d):a.Cb.Th(a,-1-c,null,d)));!!b&&(d=Ivd(b,a,12,d));d=izd(a,b,d);!!d&&d.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,3,b,b))} +function NCd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=9&&!!b){if(Oje(a,b))throw Adb(new agb(UHe+OCd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?LCd(a,d):a.Cb.Th(a,-1-c,null,d)));!!b&&(d=Ivd(b,a,9,d));d=KCd(a,b,d);!!d&&d.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,9,b,b))} +function tWd(b){var c,d,e,f,g;e=WVd(b);g=b.j;if(g==null&&!!e){return b.Jk()?null:e.ik()}else if(ZD(e,156)){d=e.jk();if(d){f=d.wi();if(f!=b.i){c=RD(e,156);if(c.nk()){try{b.g=f.ti(c,g)}catch(a){a=zdb(a);if(ZD(a,82)){b.g=null}else throw Adb(a)}}b.i=f}}return b.g}return null} +function nRb(a){var b;b=new bnb;Rmb(b,new TFb(new rjd(a.c,a.d),new rjd(a.c+a.b,a.d)));Rmb(b,new TFb(new rjd(a.c,a.d),new rjd(a.c,a.d+a.a)));Rmb(b,new TFb(new rjd(a.c+a.b,a.d+a.a),new rjd(a.c+a.b,a.d)));Rmb(b,new TFb(new rjd(a.c+a.b,a.d+a.a),new rjd(a.c,a.d+a.a)));return b} +function ic(b){var c,d,e;if(b==null){return vve}try{return jeb(b)}catch(a){a=zdb(a);if(ZD(a,103)){c=a;e=nfb(rb(b))+'@'+(d=(gib(),jFb(b))>>>0,d.toString(16));lBb(pBb(),(SAb(),'Exception during lenientFormat for '+e),c);return '<'+e+' threw '+nfb(c.Rm)+'>'}else throw Adb(a)}} +function mTb(a,b,c){var d,e,f;for(f=b.a.ec().Kc();f.Ob();){e=RD(f.Pb(),74);d=RD(Wjb(a.b,e),272);!d&&(vCd(JGd(e))==vCd(LGd(e))?lTb(a,e,c):JGd(e)==vCd(LGd(e))?Wjb(a.c,e)==null&&Wjb(a.b,LGd(e))!=null&&oTb(a,e,c,false):Wjb(a.d,e)==null&&Wjb(a.b,JGd(e))!=null&&oTb(a,e,c,true))}} +function Pfc(a,b){var c,d,e,f,g,h,i;for(e=a.Kc();e.Ob();){d=RD(e.Pb(),10);h=new R3b;P3b(h,d);Q3b(h,(qpd(),Xod));pQb(h,(Ywc(),Hwc),(Geb(),true));for(g=b.Kc();g.Ob();){f=RD(g.Pb(),10);i=new R3b;P3b(i,f);Q3b(i,ppd);pQb(i,Hwc,true);c=new a1b;pQb(c,Hwc,true);Y0b(c,h);Z0b(c,i)}}} +function Pqc(a,b,c,d){var e,f,g,h;e=Nqc(a,b,c);f=Nqc(a,c,b);g=RD(Wjb(a.c,b),118);h=RD(Wjb(a.c,c),118);if(e<f){new bTc((fTc(),eTc),g,h,f-e)}else if(f<e){new bTc((fTc(),eTc),h,g,e-f)}else if(e!=0||!(!b.i||!c.i)&&d[b.i.c][c.i.c]){new bTc((fTc(),eTc),g,h,0);new bTc(eTc,h,g,0)}} +function rsc(a,b){var c,d,e,f,g,h,i;e=0;for(g=new Anb(b.a);g.a<g.c.c.length;){f=RD(ynb(g),10);e+=f.o.b+f.d.a+f.d.d+a.e;for(d=new is(Mr(Z2b(f).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);if(c.c.i.k==(r3b(),q3b)){i=c.c.i;h=RD(mQb(i,(Ywc(),Awc)),10);e+=h.o.b+h.d.a+h.d.d}}}return e} +function sad(){sad=geb;oad=new tad('CANDIDATE_POSITION_LAST_PLACED_RIGHT',0);nad=new tad('CANDIDATE_POSITION_LAST_PLACED_BELOW',1);qad=new tad('CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT',2);pad=new tad('CANDIDATE_POSITION_WHOLE_DRAWING_BELOW',3);rad=new tad('WHOLE_DRAWING',4)} +function vEd(a,b){if(ZD(b,207)){return IDd(a,RD(b,27))}else if(ZD(b,193)){return JDd(a,RD(b,123))}else if(ZD(b,366)){return HDd(a,RD(b,135))}else if(ZD(b,326)){return GDd(a,RD(b,74))}else if(b){return null}else{throw Adb(new agb(wIe+Fe(new mob(cD(WC(jJ,1),rve,1,5,[b])))))}} +function Glc(a){var b,c,d,e,f,g,h;f=new Yub;for(e=new Anb(a.d.a);e.a<e.c.c.length;){d=RD(ynb(e),125);d.b.a.c.length==0&&(Pub(f,d,f.c.b,f.c),true)}if(f.b>1){b=eJb((c=new gJb,++a.b,c),a.d);for(h=Sub(f,0);h.b!=h.d.c;){g=RD(evb(h),125);rIb(uIb(tIb(vIb(sIb(new wIb,1),0),b),g))}}} +function isc(a,b,c){var d,e,f,g,h;c.Ug('Breaking Point Removing',1);a.a=RD(mQb(b,(yCc(),yAc)),223);for(f=new Anb(b.b);f.a<f.c.c.length;){e=RD(ynb(f),30);for(h=new Anb(bv(e.a));h.a<h.c.c.length;){g=RD(ynb(h),10);if(Krc(g)){d=RD(mQb(g,(Ywc(),Wvc)),313);!d.d&&jsc(a,d)}}}c.Vg()} +function yCd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=11&&!!b){if(Oje(a,b))throw Adb(new agb(UHe+zCd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?sCd(a,d):a.Cb.Th(a,-1-c,null,d)));!!b&&(d=Ivd(b,a,10,d));d=rCd(a,b,d);!!d&&d.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,11,b,b))} +function C0b(a){var b,c,d,e;for(d=new vkb((new mkb(a.b)).a);d.b;){c=tkb(d);e=RD(c.ld(),12);b=RD(c.md(),10);pQb(b,(Ywc(),Awc),e);pQb(e,Iwc,b);pQb(e,nwc,(Geb(),true));Q3b(e,RD(mQb(b,hwc),64));mQb(b,hwc);pQb(e.i,(yCc(),BBc),(Bod(),yod));RD(mQb(Y2b(e.i),kwc),21).Fc((ovc(),kvc))}} +function X7b(a,b,c){var d,e,f,g,h,i;f=0;g=0;if(a.c){for(i=new Anb(a.d.i.j);i.a<i.c.c.length;){h=RD(ynb(i),12);f+=h.e.c.length}}else{f=1}if(a.d){for(i=new Anb(a.c.i.j);i.a<i.c.c.length;){h=RD(ynb(i),12);g+=h.g.c.length}}else{g=1}e=eE(Lgb(g-f));d=(c+b)/2+(c-b)*(0.4*e);return d} +function Dnc(a){Bnc();var b,c;if(a.Hc((qpd(),opd))){throw Adb(new agb('Port sides must not contain UNDEFINED'))}switch(a.gc()){case 1:return xnc;case 2:b=a.Hc(Xod)&&a.Hc(ppd);c=a.Hc(Yod)&&a.Hc(npd);return b||c?Anc:znc;case 3:return ync;case 4:return wnc;default:return null;}} +function Did(a,b,c){tid();if(xid(a,b)&&xid(a,c)){return false}return Fid(new rjd(a.c,a.d),new rjd(a.c+a.b,a.d),b,c)||Fid(new rjd(a.c+a.b,a.d),new rjd(a.c+a.b,a.d+a.a),b,c)||Fid(new rjd(a.c+a.b,a.d+a.a),new rjd(a.c,a.d+a.a),b,c)||Fid(new rjd(a.c,a.d+a.a),new rjd(a.c,a.d),b,c)} +function Xee(a,b){var c,d,e,f;if(!a.dc()){for(c=0,d=a.gc();c<d;++c){f=WD(a.Xb(c));if(f==null?b==null:lhb(f.substr(0,3),'!##')?b!=null&&(e=b.length,!lhb(f.substr(f.length-e,e),b)||f.length!=b.length+3)&&!lhb(dLe,b):lhb(f,eLe)&&!lhb(dLe,b)||lhb(f,b)){return true}}}return false} +function $6b(a,b,c,d){var e,f,g,h,i,j;g=a.j.c.length;i=$C(NN,Mye,314,g,0,1);for(h=0;h<g;h++){f=RD(Vmb(a.j,h),12);f.p=h;i[h]=U6b(c7b(f),c,d)}W6b(a,i,c,b,d);j=new Tsb;for(e=0;e<i.length;e++){!!i[e]&&Zjb(j,RD(Vmb(a.j,e),12),i[e])}if(j.f.c+j.i.c!=0){pQb(a,(Ywc(),cwc),j);a7b(a,i)}} +function Yfc(a,b){var c,d,e,f,g,h;b.Ug('Partition postprocessing',1);for(d=new Anb(a.b);d.a<d.c.c.length;){c=RD(ynb(d),30);for(f=new Anb(c.a);f.a<f.c.c.length;){e=RD(ynb(f),10);h=new Anb(e.j);while(h.a<h.c.c.length){g=RD(ynb(h),12);Heb(TD(mQb(g,(Ywc(),Hwc))))&&znb(h)}}}b.Vg()} +function pkc(a,b,c){var d,e,f;for(e=new Anb(a.a.b);e.a<e.c.c.length;){d=RD(ynb(e),60);f=Zjc(d);if(f){if(f.k==(r3b(),m3b)){switch(RD(mQb(f,(Ywc(),hwc)),64).g){case 4:f.n.a=b.a;break;case 2:f.n.a=c.a-(f.o.a+f.d.c);break;case 1:f.n.b=b.b;break;case 3:f.n.b=c.b-(f.o.b+f.d.a);}}}}} +function eZc(a,b,c){var d,e,f;c.Ug('Processor determine the height for each level',1);a.a=b.b.b==0?1:b.b.b;e=null;d=Sub(b.b,0);while(!e&&d.b!=d.d.c){f=RD(evb(d),40);Heb(TD(mQb(f,(q$c(),n$c))))&&(e=f)}!!e&&fZc(a,dv(cD(WC(Z$,1),NEe,40,0,[e])),c,RD(mQb(b,(h_c(),H$c)),88));c.Vg()} +function N8c(a){var b,c,d,e,f,g;d=(bvd(),f=new ACd,f);zxd(d,a);for(c=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));c.e!=c.i.gc();){b=RD(bMd(c),27);g=(e=new ACd,e);yCd(g,d);zyd(g,b.g,b.f);jyd(g,b.k);Byd(g,b.i,b.j);WGd((!d.a&&(d.a=new C5d(J4,d,10,11)),d.a),g);zxd(g,b)}return d} +function ord(a,b,c){var d,e,f,g,h;e=RD(Gxd(b,(hkd(),fkd)),17);!e&&(e=sgb(0));f=RD(Gxd(c,fkd),17);!f&&(f=sgb(0));if(e.a>f.a){return -1}else if(e.a<f.a){return 1}else{if(a.a){d=Qfb(b.j,c.j);if(d!=0){return d}d=Qfb(b.i,c.i);if(d!=0){return d}}g=b.g*b.f;h=c.g*c.f;return Qfb(g,h)}} +function _Nd(a,b){var c,d,e,f,g,h,i,j,k,l;++a.e;i=a.d==null?0:a.d.length;if(b>i){k=a.d;a.d=$C(D6,KJe,66,2*i+4,0,1);for(f=0;f<i;++f){j=k[f];if(j){d=j.g;l=j.i;for(h=0;h<l;++h){e=RD(d[h],136);g=bOd(a,e.Bi());c=a.d[g];!c&&(c=a.d[g]=a.dk());c.Fc(e)}}}return true}else{return false}} +function Ofe(a,b,c){var d,e,f,g,h,i;e=c;f=e.Lk();if(qke(a.e,f)){if(f.Si()){d=RD(a.g,124);for(g=0;g<a.i;++g){h=d[g];if(pb(h,e)&&g!=b){throw Adb(new agb(LIe))}}}}else{i=pke(a.e.Dh(),f);d=RD(a.g,124);for(g=0;g<a.i;++g){h=d[g];if(i.am(h.Lk())){throw Adb(new agb(gLe))}}}VGd(a,b,c)} +function R_b(a,b){var c,d,e,f,g,h;c=RD(mQb(b,(Ywc(),ewc)),21);g=RD(Qc((z$b(),y$b),c),21);h=RD(Qc(O_b,c),21);for(f=g.Kc();f.Ob();){d=RD(f.Pb(),21);if(!RD(Qc(a.b,d),15).dc()){return false}}for(e=h.Kc();e.Ob();){d=RD(e.Pb(),21);if(!RD(Qc(a.b,d),15).dc()){return false}}return true} +function dad(a,b){var c,d,e,f,g,h,i,j,k;if(a.a.c.length==1){return P9c(RD(Vmb(a.a,0),172),b)}g=cad(a);i=0;j=a.d;f=g;k=a.d;h=(j-f)/2+f;while(f+1<j){i=0;for(d=new Anb(a.a);d.a<d.c.c.length;){c=RD(ynb(d),172);i+=(e=S9c(c,h,false),e.a)}if(i<b){k=h;j=h}else{f=h}h=(j-f)/2+f}return k} +function zxd(a,b){var c,d,e,f,g;if(!b){return a}if(ZD(b,342)){e=RD(b,342);f=(!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0)),a.o);for(d=e.gh().c.Kc();d.e!=d.i.gc();){c=RD(d.Yj(),44);g=c.md();fOd(f,RD(c.ld(),149),g)}}else{!a.o&&(a.o=new DVd((pvd(),mvd),X4,a,0));gOd(a.o,b.nf())}return a} +function vD(a){var b,c,d,e,f;if(isNaN(a)){return MD(),LD}if(a<-9223372036854775808){return MD(),JD}if(a>=9223372036854775807){return MD(),ID}e=false;if(a<0){e=true;a=-a}d=0;if(a>=hxe){d=eE(a/hxe);a-=d*hxe}c=0;if(a>=gxe){c=eE(a/gxe);a-=c*gxe}b=eE(a);f=hD(b,c,d);e&&nD(f);return f} +function KCb(a){var b,c,d,e,f;f=new bnb;Umb(a.b,new SEb(f));a.b.c.length=0;if(f.c.length!=0){b=(tFb(0,f.c.length),RD(f.c[0],82));for(c=1,d=f.c.length;c<d;++c){e=(tFb(c,f.c.length),RD(f.c[c],82));e!=b&&fz(b,e)}if(ZD(b,63)){throw Adb(RD(b,63))}if(ZD(b,296)){throw Adb(RD(b,296))}}} +function iNb(a,b){var c,d,e,f;c=!b||!a.u.Hc((Pod(),Lod));f=0;for(e=new Anb(a.e.Xf());e.a<e.c.c.length;){d=RD(ynb(e),852);if(d.ag()==(qpd(),opd)){throw Adb(new agb('Label and node size calculator can only be used with ports that have port sides assigned.'))}d.Qf(f++);hNb(a,d,c)}} +function IGb(a){var b,c,d,e,f;for(c=new Anb(a.a.a);c.a<c.c.c.length;){b=RD(ynb(c),316);b.j=null;for(f=b.a.a.ec().Kc();f.Ob();){d=RD(f.Pb(),60);hjd(d.b);(!b.j||d.d.c<b.j.d.c)&&(b.j=d)}for(e=b.a.a.ec().Kc();e.Ob();){d=RD(e.Pb(),60);d.b.a=d.d.c-b.j.d.c;d.b.b=d.d.d-b.j.d.d}}return a} +function uYb(a){var b,c,d,e,f;for(c=new Anb(a.a.a);c.a<c.c.c.length;){b=RD(ynb(c),194);b.f=null;for(f=b.a.a.ec().Kc();f.Ob();){d=RD(f.Pb(),86);hjd(d.e);(!b.f||d.g.c<b.f.g.c)&&(b.f=d)}for(e=b.a.a.ec().Kc();e.Ob();){d=RD(e.Pb(),86);d.e.a=d.g.c-b.f.g.c;d.e.b=d.g.d-b.f.g.d}}return a} +function vPb(a){var b,c,d;c=RD(a.a,17).a;d=RD(a.b,17).a;b=$wnd.Math.max($wnd.Math.abs(c),$wnd.Math.abs(d));if(c<b&&d==-b){return new Ptd(sgb(c+1),sgb(d))}if(c==b&&d<b){return new Ptd(sgb(c),sgb(d+1))}if(c>=-b&&d==b){return new Ptd(sgb(c-1),sgb(d))}return new Ptd(sgb(c),sgb(d-1))} +function lcc(){hcc();return cD(WC(YS,1),jwe,81,0,[nbc,kbc,obc,Ebc,Xbc,Ibc,bcc,Nbc,Vbc,zbc,Rbc,Mbc,Wbc,vbc,dcc,ebc,Qbc,Zbc,Fbc,Ybc,fcc,Tbc,fbc,Ubc,gcc,_bc,ecc,Gbc,sbc,Hbc,Dbc,ccc,ibc,qbc,Kbc,hbc,Lbc,Bbc,wbc,Obc,ybc,lbc,jbc,Cbc,xbc,Pbc,acc,gbc,Sbc,Abc,Jbc,tbc,rbc,$bc,pbc,ubc,mbc])} +function Cmc(a,b,c){a.d=0;a.b=0;b.k==(r3b(),q3b)&&c.k==q3b&&RD(mQb(b,(Ywc(),Awc)),10)==RD(mQb(c,Awc),10)&&(Gmc(b).j==(qpd(),Yod)?Dmc(a,b,c):Dmc(a,c,b));b.k==q3b&&c.k==o3b?Gmc(b).j==(qpd(),Yod)?(a.d=1):(a.b=1):c.k==q3b&&b.k==o3b&&(Gmc(c).j==(qpd(),Yod)?(a.b=1):(a.d=1));Imc(a,b,c)} +function EFd(a){var b,c,d,e,f,g,h,i,j,k,l;l=HFd(a);b=a.a;i=b!=null;i&&sDd(l,'category',a.a);e=cve(new Xkb(a.d));g=!e;if(g){j=new MB;sC(l,'knownOptions',j);c=new MFd(j);xgb(new Xkb(a.d),c)}f=cve(a.g);h=!f;if(h){k=new MB;sC(l,'supportedFeatures',k);d=new OFd(k);xgb(a.g,d)}return l} +function Ly(a){var b,c,d,e,f,g,h,i,j;d=false;b=336;c=0;f=new hq(a.length);for(h=a,i=0,j=h.length;i<j;++i){g=h[i];d=d|(MCb(g),false);e=(LCb(g),g.a);Rmb(f.a,Qb(e));b&=e.yd();c=az(c,e.zd())}return RD(RD(JCb(new SDb(null,ek(new Swb((tm(),zm(f.a)),16),new My,b,c)),new Oy(a)),687),848)} +function WZb(a,b){var c;if(!!a.d&&(b.c!=a.e.c||sZb(a.e.b,b.b))){Rmb(a.f,a.d);a.a=a.d.c+a.d.b;a.d=null;a.e=null}pZb(b.b)?(a.c=b):(a.b=b);if(b.b==(nZb(),jZb)&&!b.a||b.b==kZb&&b.a||b.b==lZb&&b.a||b.b==mZb&&!b.a){if(!!a.c&&!!a.b){c=new Uid(a.a,a.c.d,b.c-a.a,a.b.d-a.c.d);a.d=c;a.e=b}}} +function Wed(a){var b;Oed.call(this);this.i=new ifd;this.g=a;this.f=RD(a.e&&a.e(),9).length;if(this.f==0){throw Adb(new agb('There must be at least one phase in the phase enumeration.'))}this.c=(b=RD(mfb(this.g),9),new Fsb(b,RD(WEb(b,b.length),9),0));this.a=new ufd;this.b=new Tsb} +function eCd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=7&&!!b){if(Oje(a,b))throw Adb(new agb(UHe+gCd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?cCd(a,d):a.Cb.Th(a,-1-c,null,d)));!!b&&(d=RD(b,54).Rh(a,1,H4,d));d=bCd(a,b,d);!!d&&d.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,7,b,b))} +function lVd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=3&&!!b){if(Oje(a,b))throw Adb(new agb(UHe+oVd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?iVd(a,d):a.Cb.Th(a,-1-c,null,d)));!!b&&(d=RD(b,54).Rh(a,0,p7,d));d=hVd(a,b,d);!!d&&d.oj()}else (a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,3,b,b))} +function Mjb(a,b){Ljb();var c,d,e,f,g,h,i,j,k;if(b.d>a.d){h=a;a=b;b=h}if(b.d<63){return Qjb(a,b)}g=(a.d&-2)<<4;j=$ib(a,g);k=$ib(b,g);d=Gjb(a,Zib(j,g));e=Gjb(b,Zib(k,g));i=Mjb(j,k);c=Mjb(d,e);f=Mjb(Gjb(j,d),Gjb(e,k));f=Bjb(Bjb(f,i),c);f=Zib(f,g);i=Zib(i,g<<1);return Bjb(Bjb(i,f),c)} +function _Cc(){_Cc=geb;ZCc=new bDc(lEe,0);WCc=new bDc('LONGEST_PATH',1);XCc=new bDc('LONGEST_PATH_SOURCE',2);TCc=new bDc('COFFMAN_GRAHAM',3);VCc=new bDc(BBe,4);$Cc=new bDc('STRETCH_WIDTH',5);YCc=new bDc('MIN_WIDTH',6);SCc=new bDc('BF_MODEL_ORDER',7);UCc=new bDc('DF_MODEL_ORDER',8)} +function AKc(a,b,c){var d,e,f,g,h;g=aMc(a,c);h=$C(jR,WAe,10,b.length,0,1);d=0;for(f=g.Kc();f.Ob();){e=RD(f.Pb(),12);Heb(TD(mQb(e,(Ywc(),nwc))))&&(h[d++]=RD(mQb(e,Iwc),10))}if(d<b.length){throw Adb(new dgb('Expected '+b.length+' hierarchical ports, but found only '+d+'.'))}return h} +function sBd(a,b){var c,d,e,f,g,h;if(!a.tb){f=(!a.rb&&(a.rb=new J5d(a,i7,a)),a.rb);h=new Usb(f.i);for(e=new dMd(f);e.e!=e.i.gc();){d=RD(bMd(e),142);g=d.xe();c=RD(g==null?rtb(h.f,null,d):Ltb(h.i,g,d),142);!!c&&(g==null?rtb(h.f,null,c):Ltb(h.i,g,c))}a.tb=h}return RD(Xjb(a.tb,b),142)} +function wYd(a,b){var c,d,e,f,g;(a.i==null&&rYd(a),a.i).length;if(!a.p){g=new Usb((3*a.g.i/2|0)+1);for(e=new yMd(a.g);e.e!=e.i.gc();){d=RD(xMd(e),179);f=d.xe();c=RD(f==null?rtb(g.f,null,d):Ltb(g.i,f,d),179);!!c&&(f==null?rtb(g.f,null,c):Ltb(g.i,f,c))}a.p=g}return RD(Xjb(a.p,b),179)} +function fFb(a,b,c,d,e){var f,g,h,i,j;dFb(d+lz(c,c.ie()),e);eFb(b,hFb(c));f=c.f;!!f&&fFb(a,b,f,'Caused by: ',false);for(h=(c.k==null&&(c.k=$C(rJ,Nve,82,0,0,1)),c.k),i=0,j=h.length;i<j;++i){g=h[i];fFb(a,b,g,'Suppressed: ',false)}console.groupEnd!=null&&console.groupEnd.call(console)} +function DKc(a,b,c,d){var e,f,g,h,i;i=b.e;h=i.length;g=b.q.ug(i,c?0:h-1,c);e=i[c?0:h-1];g=g|CKc(a,e,c,d);for(f=c?1:h-2;c?f<h:f>=0;f+=c?1:-1){g=g|b.c.lg(i,f,c,d&&!Heb(TD(mQb(b.j,(Ywc(),jwc))))&&!Heb(TD(mQb(b.j,(Ywc(),Owc)))));g=g|b.q.ug(i,f,c);g=g|CKc(a,i[f],c,d)}Ysb(a.c,b);return g} +function F6b(a,b,c){var d,e,f,g,h,i,j,k,l,m;for(k=u2b(a.j),l=0,m=k.length;l<m;++l){j=k[l];if(c==(BEc(),yEc)||c==AEc){i=s2b(j.g);for(e=i,f=0,g=e.length;f<g;++f){d=e[f];B6b(b,d)&&X0b(d,true)}}if(c==zEc||c==AEc){h=s2b(j.e);for(e=h,f=0,g=e.length;f<g;++f){d=e[f];A6b(b,d)&&X0b(d,true)}}}} +function uqc(a){var b,c;b=null;c=null;switch(pqc(a).g){case 1:b=(qpd(),Xod);c=ppd;break;case 2:b=(qpd(),npd);c=Yod;break;case 3:b=(qpd(),ppd);c=Xod;break;case 4:b=(qpd(),Yod);c=npd;}Smc(a,RD(Lvb(KDb(RD(Qc(a.k,b),15).Oc(),lqc)),113));Tmc(a,RD(Lvb(JDb(RD(Qc(a.k,c),15).Oc(),lqc)),113))} +function r9b(a){var b,c,d,e,f,g;e=RD(Vmb(a.j,0),12);if(e.e.c.length+e.g.c.length==0){a.n.a=0}else{g=0;for(d=Fl(Al(cD(WC(cJ,1),rve,20,0,[new T3b(e),new _3b(e)])));gs(d);){c=RD(hs(d),12);g+=c.i.n.a+c.n.a+c.a.a}b=RD(mQb(a,(yCc(),zBc)),8);f=!b?0:b.a;a.n.a=g/(e.e.c.length+e.g.c.length)-f}} +function Qdd(a,b){var c,d,e;for(d=new Anb(b.a);d.a<d.c.c.length;){c=RD(ynb(d),225);RQb(RD(c.b,68),ojd(ajd(RD(b.b,68).c),RD(b.b,68).a));e=oRb(RD(b.b,68).b,RD(c.b,68).b);e>1&&(a.a=true);QQb(RD(c.b,68),$id(ajd(RD(b.b,68).c),ijd(ojd(ajd(RD(c.b,68).a),RD(b.b,68).a),e)));Odd(a,b);Qdd(a,c)}} +function tYb(a){var b,c,d,e,f,g,h;for(f=new Anb(a.a.a);f.a<f.c.c.length;){d=RD(ynb(f),194);d.e=0;d.d.a.$b()}for(e=new Anb(a.a.a);e.a<e.c.c.length;){d=RD(ynb(e),194);for(c=d.a.a.ec().Kc();c.Ob();){b=RD(c.Pb(),86);for(h=b.f.Kc();h.Ob();){g=RD(h.Pb(),86);if(g.d!=d){Ysb(d.d,g);++g.d.e}}}}} +function Hfc(a){var b,c,d,e,f,g,h,i;i=a.j.c.length;c=0;b=i;e=2*i;for(h=new Anb(a.j);h.a<h.c.c.length;){g=RD(ynb(h),12);switch(g.j.g){case 2:case 4:g.p=-1;break;case 1:case 3:d=g.e.c.length;f=g.g.c.length;d>0&&f>0?(g.p=b++):d>0?(g.p=c++):f>0?(g.p=e++):(g.p=c++);}}yob();_mb(a.j,new Lfc)} +function zic(a){var b,c;c=null;b=RD(Vmb(a.g,0),18);do{c=b.d.i;if(nQb(c,(Ywc(),wwc))){return RD(mQb(c,wwc),12).i}if(c.k!=(r3b(),p3b)&&gs(new is(Mr(a3b(c).a.Kc(),new ir)))){b=RD(hs(new is(Mr(a3b(c).a.Kc(),new ir))),18)}else if(c.k!=p3b){return null}}while(!!c&&c.k!=(r3b(),p3b));return c} +function sqc(a,b){var c,d,e,f,g,h,i,j,k;h=b.j;g=b.g;i=RD(Vmb(h,h.c.length-1),113);k=(tFb(0,h.c.length),RD(h.c[0],113));j=oqc(a,g,i,k);for(f=1;f<h.c.length;f++){c=(tFb(f-1,h.c.length),RD(h.c[f-1],113));e=(tFb(f,h.c.length),RD(h.c[f],113));d=oqc(a,g,c,e);if(d>j){i=c;k=e;j=d}}b.a=k;b.c=i} +function fMc(a,b,c){var d,e,f,g,h,i,j;j=new yAb(new TMc(a));for(g=cD(WC(xR,1),XAe,12,0,[b,c]),h=0,i=g.length;h<i;++h){f=g[h];j.a.zc(f,(Geb(),Eeb))==null;for(e=new l4b(f.b);xnb(e.a)||xnb(e.b);){d=RD(xnb(e.a)?ynb(e.a):ynb(e.b),18);d.c==d.d||rAb(j,f==d.c?d.d:d.c)}}return Qb(j),new dnb(j)} +function rIb(a){if(!a.a.d||!a.a.e){throw Adb(new dgb((lfb(zN),zN.k+' must have a source and target '+(lfb(DN),DN.k)+' specified.')))}if(a.a.d==a.a.e){throw Adb(new dgb('Network simplex does not support self-loops: '+a.a+' '+a.a.d+' '+a.a.e))}EIb(a.a.d.g,a.a);EIb(a.a.e.b,a.a);return a.a} +function x6b(a,b){var c,d,e,f,g,h,i;b.Ug('Constraints Postprocessor',1);g=0;for(f=new Anb(a.b);f.a<f.c.c.length;){e=RD(ynb(f),30);i=0;h=false;for(d=new Anb(e.a);d.a<d.c.c.length;){c=RD(ynb(d),10);if(c.k==(r3b(),p3b)){h=true;pQb(c,(yCc(),VAc),sgb(g));pQb(c,mAc,sgb(i));++i}}h&&++g}b.Vg()} +function OTc(a,b,c){var d,e,f,g,h,i;d=0;if(b.b!=0&&c.b!=0){f=Sub(b,0);g=Sub(c,0);h=Kfb(UD(evb(f)));i=Kfb(UD(evb(g)));e=true;do{if(h>i-a.b&&h<i+a.b){return -1}else h>i-a.a&&h<i+a.a&&++d;h<=i&&f.b!=f.d.c?(h=Kfb(UD(evb(f)))):i<=h&&g.b!=g.d.c?(i=Kfb(UD(evb(g)))):(e=false)}while(e)}return d} +function G2c(a,b){var c,d;Sed(a.a);Ved(a.a,(x2c(),v2c),v2c);Ved(a.a,w2c,w2c);d=new ufd;pfd(d,w2c,(g3c(),e3c));dE(Gxd(b,($4c(),I4c)))!==dE((g4c(),d4c))&&pfd(d,w2c,b3c);Heb(TD(Gxd(b,T4c)))&&pfd(d,w2c,f3c);pfd(d,w2c,c3c);Heb(TD(Gxd(b,V4c)))&&nfd(d,w2c,d3c);Ped(a.a,d);c=Qed(a.a,b);return c} +function W6b(a,b,c,d,e){var f,g,h,i;i=(f=RD(mfb(E3),9),new Fsb(f,RD(WEb(f,f.length),9),0));for(h=new Anb(a.j);h.a<h.c.c.length;){g=RD(ynb(h),12);if(b[g.p]){X6b(g,b[g.p],d);zsb(i,g.j)}}if(e){_6b(a,b,(qpd(),Xod),2*c,d);_6b(a,b,ppd,2*c,d)}else{_6b(a,b,(qpd(),Yod),2*c,d);_6b(a,b,npd,2*c,d)}} +function eec(a){var b,c;for(c=new is(Mr(a3b(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),18);if(b.d.i.k!=(r3b(),n3b)){throw Adb(new Jed(nBe+X2b(a)+"' has its layer constraint set to LAST, but has at least one outgoing edge that "+' does not go to a LAST_SEPARATE node. That must not happen.'))}}} +function mHc(a,b,c){var d,e,f,g,h;c.Ug('Longest path layering',1);a.a=b;h=a.a.a;a.b=$C(kE,Pwe,28,h.c.length,15,1);d=0;for(g=new Anb(h);g.a<g.c.c.length;){e=RD(ynb(g),10);e.p=d;a.b[d]=-1;++d}for(f=new Anb(h);f.a<f.c.c.length;){e=RD(ynb(f),10);oHc(a,e)}h.c.length=0;a.a=null;a.b=null;c.Vg()} +function JUc(a,b,c,d){var e,f,g,h,i,j,k,l,m;i=0;for(k=new Anb(a.a);k.a<k.c.c.length;){j=RD(ynb(k),10);h=0;for(f=new is(Mr(Z2b(j).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);l=K3b(e.c).b;m=K3b(e.d).b;h=$wnd.Math.max(h,$wnd.Math.abs(m-l))}i=$wnd.Math.max(i,h)}g=d*$wnd.Math.min(1,b/c)*i;return g} +function J_c(a,b){var c,d,e,f,g;g=RD(mQb(b,(h_c(),Y$c)),433);for(f=Sub(b.b,0);f.b!=f.d.c;){e=RD(evb(f),40);if(a.b[e.g]==0){switch(g.g){case 0:K_c(a,e);break;case 1:I_c(a,e);}a.b[e.g]=2}}for(d=Sub(a.a,0);d.b!=d.d.c;){c=RD(evb(d),65);ze(c.b.d,c,true);ze(c.c.b,c,true)}pQb(b,(q$c(),k$c),a.a)} +function pse(a){var b;b=new Rhb;(a&256)!=0&&(b.a+='F',b);(a&128)!=0&&(b.a+='H',b);(a&512)!=0&&(b.a+='X',b);(a&2)!=0&&(b.a+='i',b);(a&8)!=0&&(b.a+='m',b);(a&4)!=0&&(b.a+='s',b);(a&32)!=0&&(b.a+='u',b);(a&64)!=0&&(b.a+='w',b);(a&16)!=0&&(b.a+='x',b);(a&gwe)!=0&&(b.a+=',',b);return shb(b.a)} +function W8c(a,b){var c,d,e,f,g,h;b.Ug(bGe,1);e=RD(Gxd(a,(X7c(),N7c)),107);f=(!a.a&&(a.a=new C5d(J4,a,10,11)),a.a);g=yad(f);h=$wnd.Math.max(g.a,Kfb(UD(Gxd(a,(X6c(),U6c))))-(e.b+e.c));d=$wnd.Math.max(g.b,Kfb(UD(Gxd(a,R6c)))-(e.d+e.a));c=d-g.b;Ixd(a,M6c,c);Ixd(a,O6c,h);Ixd(a,N6c,d+c);b.Vg()} +function pke(a,b){nke();var c,d,e,f;if(!b){return mke}else if(b==(nme(),kme)||(b==Ule||b==Sle||b==Tle)&&a!=Rle){return new wke(a,b)}else{d=RD(b,692);c=d.$k();if(!c){Afe(Qee((lke(),jke),b));c=d.$k()}f=(!c.i&&(c.i=new Tsb),c.i);e=RD(Wd(qtb(f.f,a)),2041);!e&&Zjb(f,a,e=new wke(a,b));return e}} +function jHb(a,b){var c,d;d=rAb(a.b,b.b);if(!d){throw Adb(new dgb('Invalid hitboxes for scanline constraint calculation.'))}(dHb(b.b,RD(tAb(a.b,b.b),60))||dHb(b.b,RD(sAb(a.b,b.b),60)))&&(gib(),String.fromCharCode(10));a.a[b.b.f]=RD(vAb(a.b,b.b),60);c=RD(uAb(a.b,b.b),60);!!c&&(a.a[c.f]=b.b)} +function lTb(a,b,c){var d,e,f,g,h,i,j,k,l;f=IGd(b,false,false);j=ssd(f);l=Kfb(UD(Gxd(b,(tSb(),mSb))));e=jTb(j,l+a.a);k=new ORb(e);kQb(k,b);Zjb(a.b,b,k);ZEb(c.c,k);i=(!b.n&&(b.n=new C5d(I4,b,1,7)),b.n);for(h=new dMd(i);h.e!=h.i.gc();){g=RD(bMd(h),135);d=nTb(a,g,true,0,0);ZEb(c.c,d)}return k} +function Zec(a,b){var c,d,e,f,g,h,i;e=new bnb;for(c=0;c<=a.j;c++){d=new R4b(b);d.p=a.j-c;ZEb(e.c,d)}for(h=new Anb(a.p);h.a<h.c.c.length;){g=RD(ynb(h),10);g3b(g,RD(Vmb(e,a.j-a.g[g.p]),30))}f=new Anb(e);while(f.a<f.c.c.length){i=RD(ynb(f),30);i.a.c.length==0&&znb(f)}b.b.c.length=0;Tmb(b.b,e)} +function xfc(a,b){var c,d,e,f,g,h,i,j,k;i=RD(mQb(a,(Ywc(),Awc)),12);j=xjd(cD(WC(l3,1),Nve,8,0,[i.i.n,i.n,i.a])).a;k=a.i.n.b;c=s2b(a.e);for(e=c,f=0,g=e.length;f<g;++f){d=e[f];Z0b(d,i);Oub(d.a,new rjd(j,k));if(b){h=RD(mQb(d,(yCc(),RAc)),75);if(!h){h=new Ejd;pQb(d,RAc,h)}Mub(h,new rjd(j,k))}}} +function yfc(a,b){var c,d,e,f,g,h,i,j,k;e=RD(mQb(a,(Ywc(),Awc)),12);j=xjd(cD(WC(l3,1),Nve,8,0,[e.i.n,e.n,e.a])).a;k=a.i.n.b;c=s2b(a.g);for(g=c,h=0,i=g.length;h<i;++h){f=g[h];Y0b(f,e);Nub(f.a,new rjd(j,k));if(b){d=RD(mQb(f,(yCc(),RAc)),75);if(!d){d=new Ejd;pQb(f,RAc,d)}Mub(d,new rjd(j,k))}}} +function Khc(a){var b,c,d,e,f,g,h,i,j;d=a.b;f=d.e;g=Cod(RD(mQb(d,(yCc(),BBc)),101));c=!!f&&RD(mQb(f,(Ywc(),kwc)),21).Hc((ovc(),hvc));if(g||c){return}for(j=(h=(new glb(a.e)).a.vc().Kc(),new llb(h));j.a.Ob();){i=(b=RD(j.a.Pb(),44),RD(b.md(),113));if(i.a){e=i.d;P3b(e,null);i.c=true;a.a=true}}} +function iic(a,b){var c,d,e,f;b.Ug('Semi-Interactive Crossing Minimization Processor',1);c=false;for(e=new Anb(a.b);e.a<e.c.c.length;){d=RD(ynb(e),30);f=MDb(PDb(CDb(CDb(new SDb(null,new Swb(d.a,16)),new nic),new pic),new ric),new vic);c=c|f.a!=null}c&&pQb(a,(Ywc(),rwc),(Geb(),true));b.Vg()} +function rKc(a,b){var c,d,e,f,g,h;a.b=new bnb;a.d=RD(mQb(b,(Ywc(),Lwc)),234);a.e=Lwb(a.d);f=new Yub;e=dv(cD(WC(eR,1),OAe,36,0,[b]));g=0;while(g<e.c.length){d=(tFb(g,e.c.length),RD(e.c[g],36));d.p=g++;c=new FJc(d,a.a,a.b);Tmb(e,c.b);Rmb(a.b,c);c.s&&(h=Sub(f,0),cvb(h,c))}a.c=new _sb;return f} +function yMb(a,b){var c,d,e,f,g,h;for(g=RD(RD(Qc(a.r,b),21),87).Kc();g.Ob();){f=RD(g.Pb(),117);c=f.c?QKb(f.c):0;if(c>0){if(f.a){h=f.b.Mf().a;if(c>h){e=(c-h)/2;f.d.b=e;f.d.c=e}}else{f.d.c=a.s+c}}else if(Rod(a.u)){d=wsd(f.b);d.c<0&&(f.d.b=-d.c);d.c+d.b>f.b.Mf().a&&(f.d.c=d.c+d.b-f.b.Mf().a)}}} +function RUc(a,b){var c,d,e,f,g;g=new bnb;c=b;do{f=RD(Wjb(a.b,c),131);f.B=c.c;f.D=c.d;ZEb(g.c,f);c=RD(Wjb(a.k,c),18)}while(c);d=(tFb(0,g.c.length),RD(g.c[0],131));d.j=true;d.A=RD(d.d.a.ec().Kc().Pb(),18).c.i;e=RD(Vmb(g,g.c.length-1),131);e.q=true;e.C=RD(e.d.a.ec().Kc().Pb(),18).d.i;return g} +function pPb(a){var b,c;b=RD(a.a,17).a;c=RD(a.b,17).a;if(b>=0){if(b==c){return new Ptd(sgb(-b-1),sgb(-b-1))}if(b==-c){return new Ptd(sgb(-b),sgb(c+1))}}if($wnd.Math.abs(b)>$wnd.Math.abs(c)){if(b<0){return new Ptd(sgb(-b),sgb(c))}return new Ptd(sgb(-b),sgb(c+1))}return new Ptd(sgb(b+1),sgb(c))} +function H8b(a){var b,c;c=RD(mQb(a,(yCc(),UAc)),171);b=RD(mQb(a,(Ywc(),owc)),311);if(c==(cxc(),$wc)){pQb(a,UAc,bxc);pQb(a,owc,(Gvc(),Fvc))}else if(c==axc){pQb(a,UAc,bxc);pQb(a,owc,(Gvc(),Dvc))}else if(b==(Gvc(),Fvc)){pQb(a,UAc,$wc);pQb(a,owc,Evc)}else if(b==Dvc){pQb(a,UAc,axc);pQb(a,owc,Evc)}} +function dSc(){dSc=geb;bSc=new pSc;ZRc=pfd(new ufd,(sXb(),pXb),(hcc(),Fbc));aSc=nfd(pfd(new ufd,pXb,Tbc),rXb,Sbc);cSc=mfd(mfd(rfd(nfd(pfd(new ufd,nXb,bcc),rXb,acc),qXb),_bc),ccc);$Rc=nfd(pfd(pfd(pfd(new ufd,oXb,Ibc),qXb,Kbc),qXb,Lbc),rXb,Jbc);_Rc=nfd(pfd(pfd(new ufd,qXb,Lbc),qXb,qbc),rXb,pbc)} +function HUc(){HUc=geb;CUc=pfd(nfd(new ufd,(sXb(),rXb),(hcc(),tbc)),pXb,Fbc);GUc=mfd(mfd(rfd(nfd(pfd(new ufd,nXb,bcc),rXb,acc),qXb),_bc),ccc);DUc=nfd(pfd(pfd(pfd(new ufd,oXb,Ibc),qXb,Kbc),qXb,Lbc),rXb,Jbc);FUc=pfd(pfd(new ufd,pXb,Tbc),rXb,Sbc);EUc=nfd(pfd(pfd(new ufd,qXb,Lbc),qXb,qbc),rXb,pbc)} +function eSc(a,b,c,d,e){var f,g;if((!W0b(b)&&b.c.i.c==b.d.i.c||!djd(xjd(cD(WC(l3,1),Nve,8,0,[e.i.n,e.n,e.a])),c))&&!W0b(b)){b.c==e?hu(b.a,0,new sjd(c)):Mub(b.a,new sjd(c));if(d&&!Zsb(a.a,c)){g=RD(mQb(b,(yCc(),RAc)),75);if(!g){g=new Ejd;pQb(b,RAc,g)}f=new sjd(c);Pub(g,f,g.c.b,g.c);Ysb(a.a,f)}}} +function ht(a,b){var c,d,e,f;f=Ydb(Ndb(cwe,qgb(Ydb(Ndb(b==null?0:tb(b),dwe)),15)));c=f&a.b.length-1;e=null;for(d=a.b[c];d;e=d,d=d.a){if(d.d==f&&Hb(d.i,b)){!e?(a.b[c]=d.a):(e.a=d.a);Ts(RD(Hvb(d.c),604),RD(Hvb(d.f),604));Ss(RD(Hvb(d.b),227),RD(Hvb(d.e),227));--a.f;++a.e;return true}}return false} +function dec(a){var b,c;for(c=new is(Mr(Z2b(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),18);if(b.c.i.k!=(r3b(),n3b)){throw Adb(new Jed(nBe+X2b(a)+"' has its layer constraint set to FIRST, but has at least one incoming edge that "+' does not come from a FIRST_SEPARATE node. That must not happen.'))}}} +function Twd(a,b,c){var d,e,f,g,h,i,j;e=ggb(a.Db&254);if(e==0){a.Eb=c}else{if(e==1){h=$C(jJ,rve,1,2,5,1);f=Xwd(a,b);if(f==0){h[0]=c;h[1]=a.Eb}else{h[0]=a.Eb;h[1]=c}}else{h=$C(jJ,rve,1,e+1,5,1);g=SD(a.Eb);for(d=2,i=0,j=0;d<=128;d<<=1){d==b?(h[j++]=c):(a.Db&d)!=0&&(h[j++]=g[i++])}}a.Eb=h}a.Db|=b} +function vQb(a,b,c){var d,e,f,g;this.b=new bnb;e=0;d=0;for(g=new Anb(a);g.a<g.c.c.length;){f=RD(ynb(g),176);c&&iPb(f);Rmb(this.b,f);e+=f.o;d+=f.p}if(this.b.c.length>0){f=RD(Vmb(this.b,0),176);e+=f.o;d+=f.p}e*=2;d*=2;b>1?(e=eE($wnd.Math.ceil(e*b))):(d=eE($wnd.Math.ceil(d/b)));this.a=new gQb(e,d)} +function mkc(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r;k=d;if(b.j&&b.o){n=RD(Wjb(a.f,b.A),60);p=n.d.c+n.d.b;--k}else{p=b.a.c+b.a.b}l=e;if(c.q&&c.o){n=RD(Wjb(a.f,c.C),60);j=n.d.c;++l}else{j=c.a.c}q=j-p;i=$wnd.Math.max(2,l-k);h=q/i;o=p+h;for(m=k;m<l;++m){g=RD(f.Xb(m),131);r=g.a.b;g.a.c=o-r/2;o+=h}} +function Wrc(a,b){var c,d,e,f,g,h,i,j,k,l,m;e=b?new dsc:new fsc;f=false;do{f=false;j=b?hv(a.b):a.b;for(i=j.Kc();i.Ob();){h=RD(i.Pb(),30);m=bv(h.a);b||hv(m);for(l=new Anb(m);l.a<l.c.c.length;){k=RD(ynb(l),10);if(e.Mb(k)){d=k;c=RD(mQb(k,(Ywc(),Wvc)),313);g=b?c.b:c.k;f=Urc(d,g,b,false)}}}}while(f)} +function sMc(a,b,c,d,e,f){var g,h,i,j,k,l;j=c.c.length;f&&(a.c=$C(kE,Pwe,28,b.length,15,1));for(g=e?0:b.length-1;e?g<b.length:g>=0;g+=e?1:-1){h=b[g];i=d==(qpd(),Xod)?e?b3b(h,d):hv(b3b(h,d)):e?hv(b3b(h,d)):b3b(h,d);f&&(a.c[h.p]=i.gc());for(l=i.Kc();l.Ob();){k=RD(l.Pb(),12);a.d[k.p]=j++}Tmb(c,i)}} +function AUc(a,b,c){var d,e,f,g,h,i,j,k;f=Kfb(UD(a.b.Kc().Pb()));j=Kfb(UD(fr(b.b)));d=ijd(ajd(a.a),j-c);e=ijd(ajd(b.a),c-f);k=$id(d,e);ijd(k,1/(j-f));this.a=k;this.b=new bnb;h=true;g=a.b.Kc();g.Pb();while(g.Ob()){i=Kfb(UD(g.Pb()));if(h&&i-c>AEe){this.b.Fc(c);h=false}this.b.Fc(i)}h&&this.b.Fc(c)} +function mJb(a){var b,c,d,e;pJb(a,a.n);if(a.d.c.length>0){Nnb(a.c);while(xJb(a,RD(ynb(new Anb(a.e.a)),125))<a.e.a.c.length){b=rJb(a);e=b.e.e-b.d.e-b.a;b.e.j&&(e=-e);for(d=new Anb(a.e.a);d.a<d.c.c.length;){c=RD(ynb(d),125);c.j&&(c.e+=e)}Nnb(a.c)}Nnb(a.c);uJb(a,RD(ynb(new Anb(a.e.a)),125));iJb(a)}} +function ned(a,b){hed();var c,d;c=ugd(ygd(),b.Pg());if(c){d=c.j;if(ZD(a,207)){return xCd(RD(a,27))?Csb(d,(Yhd(),Vhd))||Csb(d,Whd):Csb(d,(Yhd(),Vhd))}else if(ZD(a,326)){return Csb(d,(Yhd(),Thd))}else if(ZD(a,193)){return Csb(d,(Yhd(),Xhd))}else if(ZD(a,366)){return Csb(d,(Yhd(),Uhd))}}return true} +function Cge(a,b,c){var d,e,f,g,h,i;e=c;f=e.Lk();if(qke(a.e,f)){if(f.Si()){d=RD(a.g,124);for(g=0;g<a.i;++g){h=d[g];if(pb(h,e)&&g!=b){throw Adb(new agb(LIe))}}}}else{i=pke(a.e.Dh(),f);d=RD(a.g,124);for(g=0;g<a.i;++g){h=d[g];if(i.am(h.Lk())&&g!=b){throw Adb(new agb(gLe))}}}return RD(eHd(a,b,c),76)} +function hz(d,b){if(b instanceof Object){try{b.__java$exception=d;if(navigator.userAgent.toLowerCase().indexOf('msie')!=-1&&$doc.documentMode<9){return}var c=d;Object.defineProperties(b,{cause:{get:function(){var a=c.he();return a&&a.fe()}},suppressed:{get:function(){return c.ge()}}})}catch(a){}}} +function tjb(a,b){var c,d,e,f,g;d=b>>5;b&=31;if(d>=a.d){return a.e<0?(Pib(),Jib):(Pib(),Oib)}f=a.d-d;e=$C(kE,Pwe,28,f+1,15,1);ujb(e,f,a.a,d,b);if(a.e<0){for(c=0;c<d&&a.a[c]==0;c++);if(c<d||b>0&&a.a[c]<<32-b!=0){for(c=0;c<f&&e[c]==-1;c++){e[c]=0}c==f&&++f;++e[c]}}g=new cjb(a.e,f,e);Rib(g);return g} +function LSb(a){var b,c,d,e;e=MCd(a);c=new bTb(e);d=new dTb(e);b=new bnb;Tmb(b,(!a.d&&(a.d=new Yie(G4,a,8,5)),a.d));Tmb(b,(!a.e&&(a.e=new Yie(G4,a,7,4)),a.e));return RD(zDb(GDb(CDb(new SDb(null,new Swb(b,16)),c),d),sBb(new _Bb,new bCb,new yCb,new ACb,cD(WC(QL,1),jwe,108,0,[(xBb(),wBb),vBb]))),21)} +function Tdc(a,b){var c;c=RD(mQb(a,(yCc(),xAc)),283);b.Ug('Label side selection ('+c+')',1);switch(c.g){case 0:Udc(a,(Pnd(),Lnd));break;case 1:Udc(a,(Pnd(),Mnd));break;case 2:Sdc(a,(Pnd(),Lnd));break;case 3:Sdc(a,(Pnd(),Mnd));break;case 4:Vdc(a,(Pnd(),Lnd));break;case 5:Vdc(a,(Pnd(),Mnd));}b.Vg()} +function qke(a,b){nke();var c,d,e;if(b.Jk()){return true}else if(b.Ik()==-2){if(b==(Lle(),Jle)||b==Gle||b==Hle||b==Ile){return true}else{e=a.Dh();if(BYd(e,b)>=0){return false}else{c=Eee((lke(),jke),e,b);if(!c){return true}else{d=c.Ik();return (d>1||d==-1)&&yfe(Qee(jke,c))!=3}}}}else{return false}} +function _4b(a,b,c,d){var e,f,g,h,i;h=AGd(RD(QHd((!b.b&&(b.b=new Yie(E4,b,4,7)),b.b),0),84));i=AGd(RD(QHd((!b.c&&(b.c=new Yie(E4,b,5,8)),b.c),0),84));if(vCd(h)==vCd(i)){return null}if(NGd(i,h)){return null}g=kzd(b);if(g==c){return d}else{f=RD(Wjb(a.a,g),10);if(f){e=f.e;if(e){return e}}}return null} +function uHc(a,b,c){var d,e,f,g,h;c.Ug('Longest path to source layering',1);a.a=b;h=a.a.a;a.b=$C(kE,Pwe,28,h.c.length,15,1);d=0;for(g=new Anb(h);g.a<g.c.c.length;){e=RD(ynb(g),10);e.p=d;a.b[d]=-1;++d}for(f=new Anb(h);f.a<f.c.c.length;){e=RD(ynb(f),10);wHc(a,e)}h.c.length=0;a.a=null;a.b=null;c.Vg()} +function BKc(a,b,c){var d,e,f,g,h,i;d=pKc(c,a.length);g=a[d];f=qKc(c,g.length);if(g[f].k!=(r3b(),m3b)){return}i=b.j;for(e=0;e<i.c.length;e++){h=(tFb(e,i.c.length),RD(i.c[e],12));if((c?h.j==(qpd(),Xod):h.j==(qpd(),ppd))&&Heb(TD(mQb(h,(Ywc(),nwc))))){$mb(i,e,RD(mQb(g[f],(Ywc(),Awc)),12));f+=c?1:-1}}} +function n8c(a,b){var c,d,e,f,g,h,i,j;b.Ug('Greedy Width Approximator',1);c=Kfb(UD(Gxd(a,(X7c(),x7c))));i=RD(Gxd(a,N7c),107);f=RD(Gxd(a,U7c),394);g=Heb(TD(Gxd(a,T7c)));h=Kfb(UD(Gxd(a,Q7c)));j=(!a.a&&(a.a=new C5d(J4,a,10,11)),a.a);Bad(j);e=new g8c(c,f,g);d=c8c(e,j,h,i);Ixd(a,(X6c(),W6c),d.c);b.Vg()} +function yKd(a){if(a.g==null){switch(a.p){case 0:a.g=qKd(a)?(Geb(),Feb):(Geb(),Eeb);break;case 1:a.g=$eb(rKd(a));break;case 2:a.g=hfb(sKd(a));break;case 3:a.g=tKd(a);break;case 4:a.g=new Tfb(uKd(a));break;case 6:a.g=Hgb(wKd(a));break;case 5:a.g=sgb(vKd(a));break;case 7:a.g=bhb(xKd(a));}}return a.g} +function HKd(a){if(a.n==null){switch(a.p){case 0:a.n=zKd(a)?(Geb(),Feb):(Geb(),Eeb);break;case 1:a.n=$eb(AKd(a));break;case 2:a.n=hfb(BKd(a));break;case 3:a.n=CKd(a);break;case 4:a.n=new Tfb(DKd(a));break;case 6:a.n=Hgb(FKd(a));break;case 5:a.n=sgb(EKd(a));break;case 7:a.n=bhb(GKd(a));}}return a.n} +function Pfe(a,b,c,d){var e,f,g,h,i;h=(nke(),RD(b,69).xk());if(qke(a.e,b)){if(b.Si()&&dge(a,b,d,ZD(b,102)&&(RD(b,19).Bb&txe)!=0)){throw Adb(new agb(LIe))}}else{i=pke(a.e.Dh(),b);e=RD(a.g,124);for(g=0;g<a.i;++g){f=e[g];if(i.am(f.Lk())){throw Adb(new agb(gLe))}}}VGd(a,gge(a,b,c),h?RD(d,76):oke(b,d))} +function HGb(a){var b,c,d,e,f,g,h;for(f=new Anb(a.a.a);f.a<f.c.c.length;){d=RD(ynb(f),316);d.g=0;d.i=0;d.e.a.$b()}for(e=new Anb(a.a.a);e.a<e.c.c.length;){d=RD(ynb(e),316);for(c=d.a.a.ec().Kc();c.Ob();){b=RD(c.Pb(),60);for(h=b.c.Kc();h.Ob();){g=RD(h.Pb(),60);if(g.a!=d){Ysb(d.e,g);++g.a.g;++g.a.i}}}}} +function X8b(a){var b,c,d,e,f;e=RD(mQb(a,(yCc(),lBc)),21);f=RD(mQb(a,oBc),21);c=new rjd(a.f.a+a.d.b+a.d.c,a.f.b+a.d.d+a.d.a);b=new sjd(c);if(e.Hc((Qpd(),Mpd))){d=RD(mQb(a,nBc),8);if(f.Hc((dqd(),Ypd))){d.a<=0&&(d.a=20);d.b<=0&&(d.b=20)}b.a=$wnd.Math.max(c.a,d.a);b.b=$wnd.Math.max(c.b,d.b)}Y8b(a,c,b)} +function SYb(a,b){var c,d,e;b.a?(rAb(a.b,b.b),a.a[b.b.i]=RD(vAb(a.b,b.b),86),c=RD(uAb(a.b,b.b),86),!!c&&(a.a[c.i]=b.b),undefined):(d=RD(vAb(a.b,b.b),86),!!d&&d==a.a[b.b.i]&&!!d.d&&d.d!=b.b.d&&d.f.Fc(b.b),e=RD(uAb(a.b,b.b),86),!!e&&a.a[e.i]==b.b&&!!e.d&&e.d!=b.b.d&&b.b.f.Fc(e),wAb(a.b,b.b),undefined)} +function Oec(a,b){var c,d,e,f,g,h;f=a.d;h=Kfb(UD(mQb(a,(yCc(),FAc))));if(h<0){h=0;pQb(a,FAc,h)}b.o.b=h;g=$wnd.Math.floor(h/2);d=new R3b;Q3b(d,(qpd(),ppd));P3b(d,b);d.n.b=g;e=new R3b;Q3b(e,Xod);P3b(e,b);e.n.b=g;Z0b(a,d);c=new a1b;kQb(c,a);pQb(c,RAc,null);Y0b(c,e);Z0b(c,f);Nec(b,a,c);Lec(a,c);return c} +function URc(a){var b,c;c=RD(mQb(a,(Ywc(),kwc)),21);b=new ufd;if(c.Hc((ovc(),ivc))){ofd(b,ORc);ofd(b,QRc)}if(c.Hc(kvc)||Heb(TD(mQb(a,(yCc(),GAc))))){ofd(b,QRc);c.Hc(lvc)&&ofd(b,RRc)}c.Hc(hvc)&&ofd(b,NRc);c.Hc(nvc)&&ofd(b,SRc);c.Hc(jvc)&&ofd(b,PRc);c.Hc(evc)&&ofd(b,LRc);c.Hc(gvc)&&ofd(b,MRc);return b} +function Qjb(a,b){var c,d,e,f,g,h,i,j,k,l,m;d=a.d;f=b.d;h=d+f;i=a.e!=b.e?-1:1;if(h==2){k=Ndb(Cdb(a.a[0],yxe),Cdb(b.a[0],yxe));m=Ydb(k);l=Ydb(Udb(k,32));return l==0?new ajb(i,m):new cjb(i,2,cD(WC(kE,1),Pwe,28,15,[m,l]))}c=a.a;e=b.a;g=$C(kE,Pwe,28,h,15,1);Njb(c,d,e,f,g);j=new cjb(i,h,g);Rib(j);return j} +function Uyb(a,b,c,d){var e,f;if(!b){return c}else{e=a.a.Ne(c.d,b.d);if(e==0){d.d=qlb(b,c.e);d.b=true;return b}f=e<0?0:1;b.a[f]=Uyb(a,b.a[f],c,d);if(Vyb(b.a[f])){if(Vyb(b.a[1-f])){b.b=true;b.a[0].b=false;b.a[1].b=false}else{Vyb(b.a[f].a[f])?(b=azb(b,1-f)):Vyb(b.a[f].a[1-f])&&(b=_yb(b,1-f))}}}return b} +function nKb(a,b,c){var d,e,f,g;e=a.i;d=a.n;mKb(a,(ZJb(),WJb),e.c+d.b,c);mKb(a,YJb,e.c+e.b-d.c-c[2],c);g=e.b-d.b-d.c;if(c[0]>0){c[0]+=a.d;g-=c[0]}if(c[2]>0){c[2]+=a.d;g-=c[2]}f=$wnd.Math.max(0,g);c[1]=$wnd.Math.max(c[1],g);mKb(a,XJb,e.c+d.b+c[0]-(c[1]-g)/2,c);if(b==XJb){a.c.b=f;a.c.c=e.c+d.b+(f-g)/2}} +function D_b(){this.c=$C(iE,vxe,28,(qpd(),cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])).length,15,1);this.b=$C(iE,vxe,28,cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd]).length,15,1);this.a=$C(iE,vxe,28,cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd]).length,15,1);Lnb(this.c,oxe);Lnb(this.b,pxe);Lnb(this.a,pxe)} +function rte(a,b,c){var d,e,f,g;if(b<=c){e=b;f=c}else{e=c;f=b}d=0;if(a.b==null){a.b=$C(kE,Pwe,28,2,15,1);a.b[0]=e;a.b[1]=f;a.c=true}else{d=a.b.length;if(a.b[d-1]+1==e){a.b[d-1]=f;return}g=$C(kE,Pwe,28,d+2,15,1);hib(a.b,0,g,0,d);a.b=g;a.b[d-1]>=e&&(a.c=false,a.a=false);a.b[d++]=e;a.b[d]=f;a.c||vte(a)}} +function Oqc(a,b,c){var d,e,f,g,h,i,j;j=b.d;a.a=new cnb(j.c.length);a.c=new Tsb;for(h=new Anb(j);h.a<h.c.c.length;){g=RD(ynb(h),105);f=new USc(null);Rmb(a.a,f);Zjb(a.c,g,f)}a.b=new Tsb;Mqc(a,b);for(d=0;d<j.c.length-1;d++){i=RD(Vmb(b.d,d),105);for(e=d+1;e<j.c.length;e++){Pqc(a,i,RD(Vmb(b.d,e),105),c)}}} +function Q2c(a){var b,c,d,e,f;e=new bnb;b=new btb((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));for(d=new is(Mr(zGd(a).a.Kc(),new ir));gs(d);){c=RD(hs(d),74);if(!ZD(QHd((!c.b&&(c.b=new Yie(E4,c,4,7)),c.b),0),193)){f=AGd(RD(QHd((!c.c&&(c.c=new Yie(E4,c,5,8)),c.c),0),84));b.a._b(f)||(ZEb(e.c,f),true)}}return e} +function Nqe(a,b,c){var d,e,f;a.e=c;a.d=0;a.b=0;a.f=1;a.i=b;(a.e&16)==16&&(a.i=use(a.i));a.j=a.i.length;Mqe(a);f=Qqe(a);if(a.d!=a.j)throw Adb(new Lqe(TId((Hde(),TIe))));if(a.g){for(d=0;d<a.g.a.c.length;d++){e=RD(eyb(a.g,d),592);if(a.f<=e.a)throw Adb(new Lqe(TId((Hde(),UIe))))}a.g.a.c.length=0}return f} +function BNc(a,b){var c,d,e,f,g,h,i;c=pxe;h=(r3b(),p3b);for(e=new Anb(b.a);e.a<e.c.c.length;){d=RD(ynb(e),10);f=d.k;if(f!=p3b){g=UD(mQb(d,(Ywc(),Cwc)));if(g==null){c=$wnd.Math.max(c,0);d.n.b=c+aFc(a.a,f,h)}else{d.n.b=(uFb(g),g)}}i=aFc(a.a,f,h);d.n.b<c+i+d.d.d&&(d.n.b=c+i+d.d.d);c=d.n.b+d.o.b+d.d.a;h=f}} +function w3c(a,b,c,d,e){var f,g,h,i,j,k;!!a.d&&a.d.Gg(e);f=RD(e.Xb(0),27);if(u3c(a,c,f,false)){return true}g=RD(e.Xb(e.gc()-1),27);if(u3c(a,d,g,true)){return true}if(p3c(a,e)){return true}for(k=e.Kc();k.Ob();){j=RD(k.Pb(),27);for(i=b.Kc();i.Ob();){h=RD(i.Pb(),27);if(o3c(a,j,h)){return true}}}return false} +function Ovd(a,b,c){var d,e,f,g,h,i,j,k,l,m;m=b.c.length;l=(j=a.Ih(c),RD(j>=0?a.Lh(j,false,true):Qvd(a,c,false),61));n:for(f=l.Kc();f.Ob();){e=RD(f.Pb(),58);for(k=0;k<m;++k){g=(tFb(k,b.c.length),RD(b.c[k],76));i=g.md();h=g.Lk();d=e.Nh(h,false);if(i==null?d!=null:!pb(i,d)){continue n}}return e}return null} +function o6b(a,b){var c,d,e,f,g,h,i;b.Ug('Comment post-processing',1);for(f=new Anb(a.b);f.a<f.c.c.length;){e=RD(ynb(f),30);d=new bnb;for(h=new Anb(e.a);h.a<h.c.c.length;){g=RD(ynb(h),10);i=RD(mQb(g,(Ywc(),Xwc)),15);c=RD(mQb(g,Vvc),15);if(!!i||!!c){p6b(g,i,c);!!i&&Tmb(d,i);!!c&&Tmb(d,c)}}Tmb(e.a,d)}b.Vg()} +function kac(a,b,c,d){var e,f,g,h;e=RD(e3b(b,(qpd(),ppd)).Kc().Pb(),12);f=RD(e3b(b,Xod).Kc().Pb(),12);for(h=new Anb(a.j);h.a<h.c.c.length;){g=RD(ynb(h),12);while(g.e.c.length!=0){Z0b(RD(Vmb(g.e,0),18),e)}while(g.g.c.length!=0){Y0b(RD(Vmb(g.g,0),18),f)}}c||pQb(b,(Ywc(),vwc),null);d||pQb(b,(Ywc(),wwc),null)} +function IGd(a,b,c){var d,e;if((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i==0){return EGd(a)}else{d=RD(QHd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a),0),166);if(b){sLd((!d.a&&(d.a=new XZd(D4,d,5)),d.a));Ozd(d,0);Pzd(d,0);Hzd(d,0);Izd(d,0)}if(c){e=(!a.a&&(a.a=new C5d(F4,a,6,6)),a.a);while(e.i>1){vLd(e,e.i-1)}}return d}} +function Vdc(a,b){var c,d,e,f,g,h,i;c=new wmb;for(f=new Anb(a.b);f.a<f.c.c.length;){e=RD(ynb(f),30);i=true;d=0;for(h=new Anb(e.a);h.a<h.c.c.length;){g=RD(ynb(h),10);switch(g.k.g){case 4:++d;case 1:imb(c,g);break;case 0:Xdc(g,b);default:c.b==c.c||Wdc(c,d,i,false,b);i=false;d=0;}}c.b==c.c||Wdc(c,d,i,true,b)}} +function iMc(a,b){var c,d,e,f,g,h;c=0;for(h=new Anb(b);h.a<h.c.c.length;){g=RD(ynb(h),12);$Lc(a.b,a.d[g.p]);for(e=new l4b(g.b);xnb(e.a)||xnb(e.b);){d=RD(xnb(e.a)?ynb(e.a):ynb(e.b),18);f=AMc(a,g==d.c?d.d:d.c);if(f>a.d[g.p]){c+=ZLc(a.b,f);hmb(a.a,sgb(f))}}while(!nmb(a.a)){XLc(a.b,RD(smb(a.a),17).a)}}return c} +function Uec(a){var b,c,d,e,f,g,h,i,j;a.a=new e6b;j=0;e=0;for(d=new Anb(a.i.b);d.a<d.c.c.length;){b=RD(ynb(d),30);b.p=e;for(i=new Anb(b.a);i.a<i.c.c.length;){h=RD(ynb(i),10);h.p=j;++j}++e}f=a.r==(aEc(),TDc);g=f?Qec:Pec;for(c=new Anb(a.i.b);c.a<c.c.c.length;){b=RD(ynb(c),30);_mb(b.a,g);d6b(a.a,sgb(b.p),b.a)}} +function zed(a,b,c){var d,e,f,g;f=(!b.a&&(b.a=new C5d(J4,b,10,11)),b.a).i;for(e=new dMd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));e.e!=e.i.gc();){d=RD(bMd(e),27);(!d.a&&(d.a=new C5d(J4,d,10,11)),d.a).i==0||(f+=zed(a,d,false))}if(c){g=vCd(b);while(g){f+=(!g.a&&(g.a=new C5d(J4,g,10,11)),g.a).i;g=vCd(g)}}return f} +function vLd(a,b){var c,d,e,f;if(a.Pj()){d=null;e=a.Qj();a.Tj()&&(d=a.Vj(a.$i(b),null));c=a.Ij(4,f=THd(a,b),null,b,e);if(a.Mj()&&f!=null){d=a.Oj(f,d);if(!d){a.Jj(c)}else{d.nj(c);d.oj()}}else{if(!d){a.Jj(c)}else{d.nj(c);d.oj()}}return f}else{f=THd(a,b);if(a.Mj()&&f!=null){d=a.Oj(f,null);!!d&&d.oj()}return f}} +function LNb(a){var b,c,d,e,f,g,h,i,j,k;j=a.a;b=new _sb;i=0;for(d=new Anb(a.d);d.a<d.c.c.length;){c=RD(ynb(d),226);k=0;tvb(c.b,new ONb);for(g=Sub(c.b,0);g.b!=g.d.c;){f=RD(evb(g),226);if(b.a._b(f)){e=c.c;h=f.c;k<h.d+h.a+j&&k+e.a+j>h.d&&(k=h.d+h.a+j)}}c.c.d=k;b.a.zc(c,b);i=$wnd.Math.max(i,c.c.d+c.c.a)}return i} +function ovc(){ovc=geb;fvc=new pvc('COMMENTS',0);hvc=new pvc('EXTERNAL_PORTS',1);ivc=new pvc('HYPEREDGES',2);jvc=new pvc('HYPERNODES',3);kvc=new pvc('NON_FREE_PORTS',4);lvc=new pvc('NORTH_SOUTH_PORTS',5);nvc=new pvc(FBe,6);evc=new pvc('CENTER_LABELS',7);gvc=new pvc('END_LABELS',8);mvc=new pvc('PARTITIONS',9)} +function PA(a,b,c,d,e){if(d<0){d=EA(a,e,cD(WC(qJ,1),Nve,2,6,[Cwe,Dwe,Ewe,Fwe,Gwe,Hwe,Iwe,Jwe,Kwe,Lwe,Mwe,Nwe]),b);d<0&&(d=EA(a,e,cD(WC(qJ,1),Nve,2,6,['Jan','Feb','Mar','Apr',Gwe,'Jun','Jul','Aug','Sep','Oct','Nov','Dec']),b));if(d<0){return false}c.k=d;return true}else if(d>0){c.k=d-1;return true}return false} +function RA(a,b,c,d,e){if(d<0){d=EA(a,e,cD(WC(qJ,1),Nve,2,6,[Cwe,Dwe,Ewe,Fwe,Gwe,Hwe,Iwe,Jwe,Kwe,Lwe,Mwe,Nwe]),b);d<0&&(d=EA(a,e,cD(WC(qJ,1),Nve,2,6,['Jan','Feb','Mar','Apr',Gwe,'Jun','Jul','Aug','Sep','Oct','Nov','Dec']),b));if(d<0){return false}c.k=d;return true}else if(d>0){c.k=d-1;return true}return false} +function TA(a,b,c,d,e,f){var g,h,i,j;h=32;if(d<0){if(b[0]>=a.length){return false}h=ihb(a,b[0]);if(h!=43&&h!=45){return false}++b[0];d=HA(a,b);if(d<0){return false}h==45&&(d=-d)}if(h==32&&b[0]-c==2&&e.b==2){i=new uB;j=i.q.getFullYear()-Owe+Owe-80;g=j%100;f.a=d==g;d+=(j/100|0)*100+(d<g?100:0)}f.p=d;return true} +function V4b(a,b){var c,d,e,f,g;if(!vCd(a)){return}g=RD(mQb(b,(yCc(),lBc)),181);dE(Gxd(a,BBc))===dE((Bod(),Aod))&&Ixd(a,BBc,zod);d=(lud(),new zud(vCd(a)));f=new Fud(!vCd(a)?null:new zud(vCd(a)),a);e=GJb(d,f,false,true);zsb(g,(Qpd(),Mpd));c=RD(mQb(b,nBc),8);c.a=$wnd.Math.max(e.a,c.a);c.b=$wnd.Math.max(e.b,c.b)} +function cec(a,b,c){var d,e,f,g,h,i;for(g=RD(mQb(a,(Ywc(),lwc)),15).Kc();g.Ob();){f=RD(g.Pb(),10);switch(RD(mQb(f,(yCc(),UAc)),171).g){case 2:g3b(f,b);break;case 4:g3b(f,c);}for(e=new is(Mr(W2b(f).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);if(!!d.c&&!!d.d){continue}h=!d.d;i=RD(mQb(d,Ewc),12);h?Z0b(d,i):Y0b(d,i)}}} +function epc(){epc=geb;Zoc=new fpc(_ye,0,(qpd(),Yod),Yod);apc=new fpc(bze,1,npd,npd);Yoc=new fpc(aze,2,Xod,Xod);dpc=new fpc(cze,3,ppd,ppd);_oc=new fpc('NORTH_WEST_CORNER',4,ppd,Yod);$oc=new fpc('NORTH_EAST_CORNER',5,Yod,Xod);cpc=new fpc('SOUTH_WEST_CORNER',6,npd,ppd);bpc=new fpc('SOUTH_EAST_CORNER',7,Xod,npd)} +function P2c(a){var b,c,d,e,f,g;f=new _sb;b=new btb((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));for(e=new is(Mr(zGd(a).a.Kc(),new ir));gs(e);){d=RD(hs(e),74);if(!ZD(QHd((!d.b&&(d.b=new Yie(E4,d,4,7)),d.b),0),193)){g=AGd(RD(QHd((!d.c&&(d.c=new Yie(E4,d,5,8)),d.c),0),84));b.a._b(g)||(c=f.a.zc(g,f),c==null)}}return f} +function tid(){tid=geb;sid=cD(WC(lE,1),rxe,28,14,[1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368000,{l:3506176,m:794077,h:1},{l:884736,m:916411,h:20},{l:3342336,m:3912489,h:363},{l:589824,m:3034138,h:6914},{l:3407872,m:1962506,h:138294}]);$wnd.Math.pow(2,-65)} +function Ljb(){Ljb=geb;var a,b;Jjb=$C(uJ,Nve,92,32,0,1);Kjb=$C(uJ,Nve,92,32,0,1);a=1;for(b=0;b<=18;b++){Jjb[b]=(Pib(),Ddb(a,0)>=0?jjb(a):Xib(jjb(Odb(a))));Kjb[b]=Jdb(Sdb(a,b),0)?jjb(Sdb(a,b)):Xib(jjb(Odb(Sdb(a,b))));a=Ndb(a,5)}for(;b<Kjb.length;b++){Jjb[b]=Wib(Jjb[b-1],Jjb[1]);Kjb[b]=Wib(Kjb[b-1],(Pib(),Mib))}} +function tgc(a,b){var c,d,e,f,g;if(a.c.length==0){return new Ptd(sgb(0),sgb(0))}c=(tFb(0,a.c.length),RD(a.c[0],12)).j;g=0;f=b.g;d=b.g+1;while(g<a.c.length-1&&c.g<f){++g;c=(tFb(g,a.c.length),RD(a.c[g],12)).j}e=g;while(e<a.c.length-1&&c.g<d){++e;c=(tFb(g,a.c.length),RD(a.c[g],12)).j}return new Ptd(sgb(g),sgb(e))} +function NJc(a,b,c,d){var e,f,g,h,i,j,k;i=b3b(b,c);(c==(qpd(),npd)||c==ppd)&&(i=hv(i));g=false;do{e=false;for(f=0;f<i.gc()-1;f++){j=RD(i.Xb(f),12);h=RD(i.Xb(f+1),12);if(OJc(a,j,h,d)){g=true;CMc(a.a,RD(i.Xb(f),12),RD(i.Xb(f+1),12));k=RD(i.Xb(f+1),12);i.hd(f+1,RD(i.Xb(f),12));i.hd(f,k);e=true}}}while(e);return g} +function lZc(a,b,c){var d,e,f,g;c.Ug(MEe,1);e=RD(zDb(CDb(new SDb(null,new Swb(b.b,16)),new pZc),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);mZc(a,e,0);for(g=Sub(b.b,0);g.b!=g.d.c;){f=RD(evb(g),40);d=Wjb(a.a,sgb(f.g))!=null?RD(Wjb(a.a,sgb(f.g)),17).a:0;pQb(f,(h_c(),f_c),sgb(d))}c.Vg()} +function o3c(a,b,c){var d,e,f,g,h,i,j,k;h=b.i-a.g/2;i=c.i-a.g/2;j=b.j-a.g/2;k=c.j-a.g/2;f=b.g+a.g;g=c.g+a.g;d=b.f+a.g;e=c.f+a.g;if(h<i+g&&i<h&&j<k+e&&k<j){return true}else if(i<h+f&&h<i&&k<j+d&&j<k){return true}else if(h<i+g&&i<h&&j<k&&k<j+d){return true}else if(i<h+f&&h<i&&j<k+e&&k<j){return true}return false} +function gdc(a,b,c){var d,e,f,g,h,i,j,k,l,m;f=b.c.length;g=(tFb(c,b.c.length),RD(b.c[c],293));h=g.a.o.a;l=g.c;m=0;for(j=g.c;j<=g.f;j++){if(h<=a.a[j]){return j}k=a.a[j];i=null;for(e=c+1;e<f;e++){d=(tFb(e,b.c.length),RD(b.c[e],293));d.c<=j&&d.f>=j&&(i=d)}!!i&&(k=$wnd.Math.max(k,i.a.o.a));if(k>m){l=j;m=k}}return l} +function SNb(a){var b,c,d,e,f,g,h;f=new yAb(RD(Qb(new eOb),50));h=pxe;for(c=new Anb(a.d);c.a<c.c.c.length;){b=RD(ynb(c),226);h=b.c.c;while(f.a.gc()!=0){g=RD(f.a.Tc(),226);if(g.c.c+g.c.b<h){f.a.Bc(g)!=null}else{break}}for(e=f.a.ec().Kc();e.Ob();){d=RD(e.Pb(),226);Mub(d.b,b);Mub(b.b,d)}f.a.zc(b,(Geb(),Eeb))==null}} +function sZc(a,b,c){var d,e,f,g,h;if(!gr(b)){h=c.eh((ZD(b,16)?RD(b,16).gc():Kr(b.Kc()))/a.a|0);h.Ug(OEe,1);g=new vZc;f=null;for(e=b.Kc();e.Ob();){d=RD(e.Pb(),40);g=Al(cD(WC(cJ,1),rve,20,0,[g,new dXc(d)]));if(f){pQb(f,(q$c(),l$c),d);pQb(d,b$c,f);if(_Wc(d)==_Wc(f)){pQb(f,m$c,d);pQb(d,c$c,f)}}f=d}h.Vg();sZc(a,g,c)}} +function z1d(a,b){var c,d,e;if(b==null){for(d=(!a.a&&(a.a=new C5d(l7,a,9,5)),new dMd(a.a));d.e!=d.i.gc();){c=RD(bMd(d),694);e=c.c;if((e==null?c.zb:e)==null){return c}}}else{for(d=(!a.a&&(a.a=new C5d(l7,a,9,5)),new dMd(a.a));d.e!=d.i.gc();){c=RD(bMd(d),694);if(lhb(b,(e=c.c,e==null?c.zb:e))){return c}}}return null} +function BLb(a,b){var c;c=null;switch(b.g){case 1:a.e.pf((umd(),Cld))&&(c=RD(a.e.of(Cld),256));break;case 3:a.e.pf((umd(),Dld))&&(c=RD(a.e.of(Dld),256));break;case 2:a.e.pf((umd(),Bld))&&(c=RD(a.e.of(Bld),256));break;case 4:a.e.pf((umd(),Eld))&&(c=RD(a.e.of(Eld),256));}!c&&(c=RD(a.e.of((umd(),zld)),256));return c} +function $5c(a,b,c){var d,e,f,g,h,i;e=c;f=0;for(h=new Anb(b);h.a<h.c.c.length;){g=RD(ynb(h),27);Ixd(g,($4c(),P4c),sgb(e++));i=Q2c(g);d=$wnd.Math.atan2(g.j+g.f/2,g.i+g.g/2);d+=d<0?dFe:0;d<0.7853981633974483||d>FFe?_mb(i,a.b):d<=FFe&&d>GFe?_mb(i,a.d):d<=GFe&&d>HFe?_mb(i,a.c):d<=HFe&&_mb(i,a.a);f=$5c(a,i,f)}return e} +function sTc(a,b,c,d){var e,f,g,h,i,j;e=(d.c+d.a)/2;Xub(b.j);Mub(b.j,e);Xub(c.e);Mub(c.e,e);j=new ATc;for(h=new Anb(a.f);h.a<h.c.c.length;){f=RD(ynb(h),132);i=f.a;uTc(j,b,i);uTc(j,c,i)}for(g=new Anb(a.k);g.a<g.c.c.length;){f=RD(ynb(g),132);i=f.b;uTc(j,b,i);uTc(j,c,i)}j.b+=2;j.a+=nTc(b,a.q);j.a+=nTc(a.q,c);return j} +function U_c(a,b,c){var d;c.Ug('Processor arrange node',1);Heb(TD(mQb(b,(h_c(),G$c))));d=RD(Lvb(DDb(CDb(new SDb(null,new Swb(b.b,16)),new c0c))),40);a.a=RD(mQb(b,g_c),353);a.a==(s_c(),q_c)||a.a==p_c?T_c(a,new mob(cD(WC(Z$,1),NEe,40,0,[d])),c.eh(1)):a.a==o_c&&S_c(a,new mob(cD(WC(Z$,1),NEe,40,0,[d])),c.eh(1));c.Vg()} +function X7c(){X7c=geb;x7c=new mGd((umd(),Dkd),1.3);G7c=new mGd(mld,(Geb(),false));O7c=new A3b(15);N7c=new mGd(tld,O7c);Q7c=new mGd(fmd,15);y7c=Kkd;F7c=kld;H7c=nld;I7c=pld;E7c=ild;J7c=sld;P7c=Lld;U7c=(u7c(),p7c);T7c=o7c;W7c=t7c;V7c=r7c;M7c=k7c;L7c=j7c;K7c=i7c;S7c=n7c;B7c=ald;C7c=bld;A7c=g7c;z7c=f7c;D7c=h7c;R7c=m7c} +function MKb(a){var b,c,d,e,f,g,h;c=a.i;b=a.n;h=c.d;a.f==(vLb(),tLb)?(h+=(c.a-a.e.b)/2):a.f==sLb&&(h+=c.a-a.e.b);for(e=new Anb(a.d);e.a<e.c.c.length;){d=RD(ynb(e),187);g=d.Mf();f=new pjd;f.b=h;h+=g.b+a.a;switch(a.b.g){case 0:f.a=c.c+b.b;break;case 1:f.a=c.c+b.b+(c.b-g.a)/2;break;case 2:f.a=c.c+c.b-b.c-g.a;}d.Of(f)}} +function OKb(a){var b,c,d,e,f,g,h;c=a.i;b=a.n;h=c.c;a.b==(EKb(),BKb)?(h+=(c.b-a.e.a)/2):a.b==DKb&&(h+=c.b-a.e.a);for(e=new Anb(a.d);e.a<e.c.c.length;){d=RD(ynb(e),187);g=d.Mf();f=new pjd;f.a=h;h+=g.a+a.a;switch(a.f.g){case 0:f.b=c.d+b.d;break;case 1:f.b=c.d+b.d+(c.a-g.b)/2;break;case 2:f.b=c.d+c.a-b.a-g.b;}d.Of(f)}} +function U7b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;k=c.a.c;g=c.a.c+c.a.b;f=RD(Wjb(c.c,b),468);n=f.f;o=f.a;i=new rjd(k,n);l=new rjd(g,o);e=k;c.p||(e+=a.c);e+=c.F+c.v*a.b;j=new rjd(e,n);m=new rjd(e,o);zjd(b.a,cD(WC(l3,1),Nve,8,0,[i,j]));h=c.d.a.gc()>1;if(h){d=new rjd(e,c.b);Mub(b.a,d)}zjd(b.a,cD(WC(l3,1),Nve,8,0,[m,l]))} +function TGc(a,b,c){var d,e;if(b<a.d.b.c.length){a.b=RD(Vmb(a.d.b,b),30);a.a=RD(Vmb(a.d.b,b-1),30);a.c=b}else{a.a=new R4b(a.d);a.a.p=b-1;Rmb(a.d.b,a.a);a.b=new R4b(a.d);a.b.p=b;Rmb(a.d.b,a.b);a.c=b}g3b(c,a.b);for(e=new is(Mr(Z2b(c).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);!d.c.i.c&&d.c.i.k==(r3b(),n3b)&&g3b(d.c.i,a.a)}} +function Gpd(a){Cgd(a,new Pfd($fd(Xfd(Zfd(Yfd(new agd,qHe),'ELK Randomizer'),'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'),new Jpd)));Agd(a,qHe,Eze,Cpd);Agd(a,qHe,_ze,15);Agd(a,qHe,bAe,sgb(0));Agd(a,qHe,Dze,Yze)} +function Gqe(){Gqe=geb;var a,b,c,d,e,f;Eqe=$C(gE,YHe,28,255,15,1);Fqe=$C(hE,zwe,28,16,15,1);for(b=0;b<255;b++){Eqe[b]=-1}for(c=57;c>=48;c--){Eqe[c]=c-48<<24>>24}for(d=70;d>=65;d--){Eqe[d]=d-65+10<<24>>24}for(e=102;e>=97;e--){Eqe[e]=e-97+10<<24>>24}for(f=0;f<10;f++)Fqe[f]=48+f&Bwe;for(a=10;a<=15;a++)Fqe[a]=65+a-10&Bwe} +function yYc(a,b){b.Ug('Process graph bounds',1);pQb(a,(q$c(),ZZc),Uvb(TCb(HDb(new SDb(null,new Swb(a.b,16)),new DYc))));pQb(a,_Zc,Uvb(TCb(HDb(new SDb(null,new Swb(a.b,16)),new FYc))));pQb(a,YZc,Uvb(SCb(HDb(new SDb(null,new Swb(a.b,16)),new HYc))));pQb(a,$Zc,Uvb(SCb(HDb(new SDb(null,new Swb(a.b,16)),new JYc))));b.Vg()} +function PWb(a){var b,c,d,e,f;e=RD(mQb(a,(yCc(),lBc)),21);f=RD(mQb(a,oBc),21);c=new rjd(a.f.a+a.d.b+a.d.c,a.f.b+a.d.d+a.d.a);b=new sjd(c);if(e.Hc((Qpd(),Mpd))){d=RD(mQb(a,nBc),8);if(f.Hc((dqd(),Ypd))){d.a<=0&&(d.a=20);d.b<=0&&(d.b=20)}b.a=$wnd.Math.max(c.a,d.a);b.b=$wnd.Math.max(c.b,d.b)}Heb(TD(mQb(a,mBc)))||QWb(a,c,b)} +function lOc(a,b){var c,d,e,f;for(f=b3b(b,(qpd(),npd)).Kc();f.Ob();){d=RD(f.Pb(),12);c=RD(mQb(d,(Ywc(),Iwc)),10);!!c&&rIb(uIb(tIb(vIb(sIb(new wIb,0),0.1),a.i[b.p].d),a.i[c.p].a))}for(e=b3b(b,Yod).Kc();e.Ob();){d=RD(e.Pb(),12);c=RD(mQb(d,(Ywc(),Iwc)),10);!!c&&rIb(uIb(tIb(vIb(sIb(new wIb,0),0.1),a.i[c.p].d),a.i[b.p].a))}} +function oYd(a){var b,c,d,e,f,g;if(!a.c){g=new W$d;b=iYd;f=b.a.zc(a,b);if(f==null){for(d=new dMd(tYd(a));d.e!=d.i.gc();){c=RD(bMd(d),89);e=i2d(c);ZD(e,90)&&YGd(g,oYd(RD(e,29)));WGd(g,c)}b.a.Bc(a)!=null;b.a.gc()==0&&undefined}T$d(g);VHd(g);a.c=new N$d((RD(QHd(xYd((lTd(),kTd).o),15),19),g.i),g.g);yYd(a).b&=-33}return a.c} +function Dre(a){var b;if(a.c!=10)throw Adb(new Lqe(TId((Hde(),VIe))));b=a.a;switch(b){case 110:b=10;break;case 114:b=13;break;case 116:b=9;break;case 92:case 124:case 46:case 94:case 45:case 63:case 42:case 43:case 123:case 125:case 40:case 41:case 91:case 93:break;default:throw Adb(new Lqe(TId((Hde(),xJe))));}return b} +function GD(a){var b,c,d,e,f;if(a.l==0&&a.m==0&&a.h==0){return '0'}if(a.h==fxe&&a.m==0&&a.l==0){return '-9223372036854775808'}if(a.h>>19!=0){return '-'+GD(xD(a))}c=a;d='';while(!(c.l==0&&c.m==0&&c.h==0)){e=fD(ixe);c=iD(c,e,true);b=''+FD(eD);if(!(c.l==0&&c.m==0&&c.h==0)){f=9-b.length;for(;f>0;f--){b='0'+b}}d=b+d}return d} +function tkc(a){var b,c,d,e,f,g,h;b=false;c=0;for(e=new Anb(a.d.b);e.a<e.c.c.length;){d=RD(ynb(e),30);d.p=c++;for(g=new Anb(d.a);g.a<g.c.c.length;){f=RD(ynb(g),10);!b&&!gr(W2b(f))&&(b=true)}}h=ysb((Cmd(),Amd),cD(WC(s3,1),jwe,88,0,[ymd,zmd]));if(!b){zsb(h,Bmd);zsb(h,xmd)}a.a=new dGb(h);akb(a.f);akb(a.b);akb(a.e);akb(a.g)} +function Ftb(){if(!Object.create||!Object.getOwnPropertyNames){return false}var a='__proto__';var b=Object.create(null);if(b[a]!==undefined){return false}var c=Object.getOwnPropertyNames(b);if(c.length!=0){return false}b[a]=42;if(b[a]!==42){return false}if(Object.getOwnPropertyNames(b).length==0){return false}return true} +function c_b(a,b,c){var d,e,f,g,h,i,j,k,l;d=c.c;e=c.d;h=K3b(b.c);i=K3b(b.d);if(d==b.c){h=d_b(a,h,e);i=e_b(b.d)}else{h=e_b(b.c);i=d_b(a,i,e)}j=new Fjd(b.a);Pub(j,h,j.a,j.a.a);Pub(j,i,j.c.b,j.c);g=b.c==d;l=new E_b;for(f=0;f<j.b-1;++f){k=new Ptd(RD(ju(j,f),8),RD(ju(j,f+1),8));g&&f==0||!g&&f==j.b-2?(l.b=k):Rmb(l.a,k)}return l} +function W1b(a,b){var c,d,e,f;f=a.j.g-b.j.g;if(f!=0){return f}c=RD(mQb(a,(yCc(),CBc)),17);d=RD(mQb(b,CBc),17);if(!!c&&!!d){e=c.a-d.a;if(e!=0){return e}}switch(a.j.g){case 1:return Qfb(a.n.a,b.n.a);case 2:return Qfb(a.n.b,b.n.b);case 3:return Qfb(b.n.a,a.n.a);case 4:return Qfb(b.n.b,a.n.b);default:throw Adb(new dgb(UAe));}} +function X9b(a,b,c,d){var e,f,g,h,i;if(Kr((U9b(),new is(Mr(W2b(b).a.Kc(),new ir))))>=a.a){return -1}if(!W9b(b,c)){return -1}if(gr(RD(d.Kb(b),20))){return 1}e=0;for(g=RD(d.Kb(b),20).Kc();g.Ob();){f=RD(g.Pb(),18);i=f.c.i==b?f.d.i:f.c.i;h=X9b(a,i,c,d);if(h==-1){return -1}e=$wnd.Math.max(e,h);if(e>a.c-1){return -1}}return e+1} +function _Gd(a,b){var c,d,e,f,g,h;if(dE(b)===dE(a)){return true}if(!ZD(b,15)){return false}d=RD(b,15);h=a.gc();if(d.gc()!=h){return false}g=d.Kc();if(a.Yi()){for(c=0;c<h;++c){e=a.Vi(c);f=g.Pb();if(e==null?f!=null:!pb(e,f)){return false}}}else{for(c=0;c<h;++c){e=a.Vi(c);f=g.Pb();if(dE(e)!==dE(f)){return false}}}return true} +function RNd(a,b){var c,d,e,f,g,h;if(a.f>0){a._j();if(b!=null){for(f=0;f<a.d.length;++f){c=a.d[f];if(c){d=RD(c.g,379);h=c.i;for(g=0;g<h;++g){e=d[g];if(pb(b,e.md())){return true}}}}}else{for(f=0;f<a.d.length;++f){c=a.d[f];if(c){d=RD(c.g,379);h=c.i;for(g=0;g<h;++g){e=d[g];if(dE(b)===dE(e.md())){return true}}}}}}return false} +function see(a,b){var c,d,e;c=b.qi(a.a);if(c){e=WD($Nd((!c.b&&(c.b=new SVd((JTd(),FTd),C8,c)),c.b),'affiliation'));if(e!=null){d=thb(e,Fhb(35));return d==-1?Lee(a,Uee(a,BXd(b.qk())),e):d==0?Lee(a,null,(BFb(1,e.length+1),e.substr(1))):Lee(a,(AFb(0,d,e.length),e.substr(0,d)),(BFb(d+1,e.length+1),e.substr(d+1)))}}return null} +function v9b(a,b,c){var d,e,f,g;c.Ug('Orthogonally routing hierarchical port edges',1);a.a=0;d=y9b(b);B9b(b,d);A9b(a,b,d);w9b(b);e=RD(mQb(b,(yCc(),BBc)),101);f=b.b;u9b((tFb(0,f.c.length),RD(f.c[0],30)),e,b);u9b(RD(Vmb(f,f.c.length-1),30),e,b);g=b.b;s9b((tFb(0,g.c.length),RD(g.c[0],30)));s9b(RD(Vmb(g,g.c.length-1),30));c.Vg()} +function JAd(a){switch(a){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:{return a-48<<24>>24}case 97:case 98:case 99:case 100:case 101:case 102:{return a-97+10<<24>>24}case 65:case 66:case 67:case 68:case 69:case 70:{return a-65+10<<24>>24}default:{throw Adb(new Vgb('Invalid hexadecimal'))}}} +function iIb(){iIb=geb;hIb=new jIb('SPIRAL',0);cIb=new jIb('LINE_BY_LINE',1);dIb=new jIb('MANHATTAN',2);bIb=new jIb('JITTER',3);fIb=new jIb('QUADRANTS_LINE_BY_LINE',4);gIb=new jIb('QUADRANTS_MANHATTAN',5);eIb=new jIb('QUADRANTS_JITTER',6);aIb=new jIb('COMBINE_LINE_BY_LINE_MANHATTAN',7);_Hb=new jIb('COMBINE_JITTER_MANHATTAN',8)} +function Urc(a,b,c,d){var e,f,g,h,i,j;i=Zrc(a,c);j=Zrc(b,c);e=false;while(!!i&&!!j){if(d||Xrc(i,j,c)){g=Zrc(i,c);h=Zrc(j,c);asc(b);asc(a);f=i.c;Hec(i,false);Hec(j,false);if(c){f3b(b,j.p,f);b.p=j.p;f3b(a,i.p+1,f);a.p=i.p}else{f3b(a,i.p,f);a.p=i.p;f3b(b,j.p+1,f);b.p=j.p}g3b(i,null);g3b(j,null);i=g;j=h;e=true}else{break}}return e} +function aDc(a){switch(a.g){case 0:return new XHc;case 1:return new pHc;case 3:return new GGc;case 4:return new gHc;case 5:return new jIc;case 6:return new IHc;case 2:return new xHc;case 7:return new pGc;case 8:return new YGc;default:throw Adb(new agb('No implementation is available for the layerer '+(a.f!=null?a.f:''+a.g)));}} +function tIc(a,b,c,d){var e,f,g,h,i;e=false;f=false;for(h=new Anb(d.j);h.a<h.c.c.length;){g=RD(ynb(h),12);dE(mQb(g,(Ywc(),Awc)))===dE(c)&&(g.g.c.length==0?g.e.c.length==0||(e=true):(f=true))}i=0;e&&e^f?(i=c.j==(qpd(),Yod)?-a.e[d.c.p][d.p]:b-a.e[d.c.p][d.p]):f&&e^f?(i=a.e[d.c.p][d.p]+1):e&&f&&(i=c.j==(qpd(),Yod)?0:b/2);return i} +function lSd(a,b,c,d,e,f,g,h){var i,j,k;i=0;b!=null&&(i^=ohb(b.toLowerCase()));c!=null&&(i^=ohb(c));d!=null&&(i^=ohb(d));g!=null&&(i^=ohb(g));h!=null&&(i^=ohb(h));for(j=0,k=f.length;j<k;j++){i^=ohb(f[j])}a?(i|=256):(i&=-257);e?(i|=16):(i&=-17);this.f=i;this.i=b==null?null:(uFb(b),b);this.a=c;this.d=d;this.j=f;this.g=g;this.e=h} +function d3b(a,b,c){var d,e;e=null;switch(b.g){case 1:e=(J3b(),E3b);break;case 2:e=(J3b(),G3b);}d=null;switch(c.g){case 1:d=(J3b(),F3b);break;case 2:d=(J3b(),D3b);break;case 3:d=(J3b(),H3b);break;case 4:d=(J3b(),I3b);}return !!e&&!!d?dr(a.j,new Yb(new mob(cD(WC(pE,1),rve,178,0,[RD(Qb(e),178),RD(Qb(d),178)])))):(yob(),yob(),vob)} +function K8b(a){var b,c,d;b=RD(mQb(a,(yCc(),nBc)),8);pQb(a,nBc,new rjd(b.b,b.a));switch(RD(mQb(a,Rzc),255).g){case 1:pQb(a,Rzc,(Rjd(),Qjd));break;case 2:pQb(a,Rzc,(Rjd(),Mjd));break;case 3:pQb(a,Rzc,(Rjd(),Ojd));break;case 4:pQb(a,Rzc,(Rjd(),Pjd));}if((!a.q?(yob(),yob(),wob):a.q)._b(IBc)){c=RD(mQb(a,IBc),8);d=c.a;c.a=c.b;c.b=d}} +function Pmc(a,b,c,d,e,f){this.b=c;this.d=e;if(a>=b.length){throw Adb(new veb('Greedy SwitchDecider: Free layer not in graph.'))}this.c=b[a];this.e=new DMc(d);rMc(this.e,this.c,(qpd(),ppd));this.i=new DMc(d);rMc(this.i,this.c,Xod);this.f=new Kmc(this.c);this.a=!f&&e.i&&!e.s&&this.c[0].k==(r3b(),m3b);this.a&&Nmc(this,a,b.length)} +function $Mb(a,b){var c,d,e,f,g,h;f=!a.B.Hc((dqd(),Wpd));g=a.B.Hc(Zpd);a.a=new wKb(g,f,a.c);!!a.n&&C2b(a.a.n,a.n);cLb(a.g,(ZJb(),XJb),a.a);if(!b){d=new dLb(1,f,a.c);d.n.a=a.k;Wrb(a.p,(qpd(),Yod),d);e=new dLb(1,f,a.c);e.n.d=a.k;Wrb(a.p,npd,e);h=new dLb(0,f,a.c);h.n.c=a.k;Wrb(a.p,ppd,h);c=new dLb(0,f,a.c);c.n.b=a.k;Wrb(a.p,Xod,c)}} +function zkc(a){var b,c,d;b=RD(mQb(a.d,(yCc(),yAc)),223);switch(b.g){case 2:c=rkc(a);break;case 3:c=(d=new bnb,FDb(CDb(GDb(EDb(EDb(new SDb(null,new Swb(a.d.b,16)),new wlc),new ylc),new Alc),new Kkc),new Clc(d)),d);break;default:throw Adb(new dgb('Compaction not supported for '+b+' edges.'));}ykc(a,c);xgb(new Xkb(a.g),new ilc(a))} +function qYc(a,b){var c,d,e,f,g,h,i;b.Ug('Process directions',1);c=RD(mQb(a,(h_c(),H$c)),88);if(c!=(Cmd(),xmd)){for(e=Sub(a.b,0);e.b!=e.d.c;){d=RD(evb(e),40);h=RD(mQb(d,(q$c(),o$c)),17).a;i=RD(mQb(d,p$c),17).a;switch(c.g){case 4:i*=-1;break;case 1:f=h;h=i;i=f;break;case 2:g=h;h=-i;i=g;}pQb(d,o$c,sgb(h));pQb(d,p$c,sgb(i))}}b.Vg()} +function led(a,b){var c;c=new qQb;!!b&&kQb(c,RD(Wjb(a.a,H4),96));ZD(b,422)&&kQb(c,RD(Wjb(a.a,L4),96));if(ZD(b,366)){kQb(c,RD(Wjb(a.a,I4),96));return c}ZD(b,84)&&kQb(c,RD(Wjb(a.a,E4),96));if(ZD(b,207)){kQb(c,RD(Wjb(a.a,J4),96));return c}if(ZD(b,193)){kQb(c,RD(Wjb(a.a,K4),96));return c}ZD(b,326)&&kQb(c,RD(Wjb(a.a,G4),96));return c} +function a_b(a){var b,c,d,e,f,g,h,i;i=new m_b;for(h=new Anb(a.a);h.a<h.c.c.length;){g=RD(ynb(h),10);if(g.k==(r3b(),m3b)){continue}$$b(i,g,new pjd);for(f=new is(Mr(a3b(g).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);if(e.c.i.k==m3b||e.d.i.k==m3b){continue}for(d=Sub(e.a,0);d.b!=d.d.c;){c=RD(evb(d),8);b=c;k_b(i,new eZb(b.a,b.b))}}}return i} +function Kcd(){Kcd=geb;Jcd=new jGd(iGe);Icd=(_cd(),$cd);Hcd=new lGd(nGe,Icd);Gcd=(ldd(),kdd);Fcd=new lGd(jGe,Gcd);Ecd=(Xbd(),Tbd);Dcd=new lGd(kGe,Ecd);zcd=new lGd(lGe,null);Ccd=(Mbd(),Kbd);Bcd=new lGd(mGe,Ccd);vcd=(sbd(),rbd);ucd=new lGd(oGe,vcd);wcd=new lGd(pGe,(Geb(),false));xcd=new lGd(qGe,sgb(64));ycd=new lGd(rGe,true);Acd=Lbd} +function eHc(a,b){var c,d,e,f,g,h,i,j,k,l;a.p=1;e=a.c;l=new Iub;for(k=c3b(a,(BEc(),zEc)).Kc();k.Ob();){j=RD(k.Pb(),12);for(d=new Anb(j.g);d.a<d.c.c.length;){c=RD(ynb(d),18);i=c.d.i;if(a!=i){f=i.c;if(f.p<=e.p){g=e.p+1;if(g==b.b.c.length){h=new R4b(b);h.p=g;Rmb(b.b,h);g3b(i,h)}else{h=RD(Vmb(b.b,g),30);g3b(i,h)}l.a.zc(i,l)}}}}return l} +function mXc(a,b){var c,d;c=RD(mQb(a,(q$c(),TZc)),15);if(!c||c.gc()<1){return null}else if(c.gc()==1){return RD(c.Xb(0),40)}d=null;switch(b.g){case 2:d=RD(Lvb(KDb(c.Oc(),new mYc)),40);break;case 1:d=RD(Lvb(JDb(c.Oc(),new KXc)),40);break;case 4:d=RD(Lvb(KDb(c.Oc(),new OXc)),40);break;case 3:d=RD(Lvb(JDb(c.Oc(),new SXc)),40);}return d} +function usc(a){var b,c,d,e,f,g;if(a.a!=null){return}a.a=$C(xdb,Hye,28,a.c.b.c.length,16,1);a.a[0]=false;if(nQb(a.c,(yCc(),wCc))){d=RD(mQb(a.c,wCc),15);for(c=d.Kc();c.Ob();){b=RD(c.Pb(),17).a;b>0&&b<a.a.length&&(a.a[b]=false)}}else{g=new Anb(a.c.b);g.a<g.c.c.length&&ynb(g);e=1;while(g.a<g.c.c.length){f=RD(ynb(g),30);a.a[e++]=xsc(f)}}} +function X6c(){X6c=geb;M6c=new jGd('additionalHeight');N6c=new jGd('drawingHeight');O6c=new jGd('drawingWidth');R6c=new jGd('minHeight');U6c=new jGd('minWidth');V6c=new jGd('rows');W6c=new jGd('targetWidth');T6c=new kGd('minRowIncrease',0);Q6c=new kGd('maxRowIncrease',0);S6c=new kGd('minRowDecrease',0);P6c=new kGd('maxRowDecrease',0)} +function r$d(a,b){var c,d,e,f;e=a.b;switch(b){case 1:{a.b|=1;a.b|=4;a.b|=8;break}case 2:{a.b|=2;a.b|=4;a.b|=8;break}case 4:{a.b|=1;a.b|=2;a.b|=4;a.b|=8;break}case 3:{a.b|=16;a.b|=8;break}case 0:{a.b|=32;a.b|=16;a.b|=8;a.b|=1;a.b|=2;a.b|=4;break}}if(a.b!=e&&!!a.c){for(d=new dMd(a.c);d.e!=d.i.gc();){f=RD(bMd(d),482);c=yYd(f);v$d(c,b)}}} +function CKc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;e=false;for(g=b,h=0,i=g.length;h<i;++h){f=g[h];Heb((Geb(),f.e?true:false))&&!RD(Vmb(a.b,f.e.p),219).s&&(e=e|(j=f.e,k=RD(Vmb(a.b,j.p),219),l=k.e,m=qKc(c,l.length),n=l[m][0],n.k==(r3b(),m3b)?(l[m]=AKc(f,l[m],c?(qpd(),ppd):(qpd(),Xod))):k.c.mg(l,c),o=DKc(a,k,c,d),BKc(k.e,k.o,c),o))}return e} +function Aed(a,b){var c,d,e,f,g;f=(!b.a&&(b.a=new C5d(J4,b,10,11)),b.a).i;for(e=new dMd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));e.e!=e.i.gc();){d=RD(bMd(e),27);if(dE(Gxd(d,(umd(),Xkd)))!==dE((Fnd(),End))){g=RD(Gxd(b,Tld),143);c=RD(Gxd(d,Tld),143);(g==c||!!g&&Nfd(g,c))&&(!d.a&&(d.a=new C5d(J4,d,10,11)),d.a).i!=0&&(f+=Aed(a,d))}}return f} +function Toc(a){var b,c,d,e,f,g,h;d=0;h=0;for(g=new Anb(a.d);g.a<g.c.c.length;){f=RD(ynb(g),105);e=RD(zDb(CDb(new SDb(null,new Swb(f.j,16)),new Cpc),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);c=null;if(d<=h){c=(qpd(),Yod);d+=e.gc()}else if(h<d){c=(qpd(),npd);h+=e.gc()}b=c;FDb(GDb(e.Oc(),new qpc),new spc(b))}} +function D6b(a){var b,c,d,e,f;f=new cnb(a.a.c.length);for(e=new Anb(a.a);e.a<e.c.c.length;){d=RD(ynb(e),10);c=RD(mQb(d,(yCc(),UAc)),171);b=null;switch(c.g){case 1:case 2:b=(huc(),guc);break;case 3:case 4:b=(huc(),euc);}if(b){pQb(d,(Ywc(),bwc),(huc(),guc));b==euc?F6b(d,c,(BEc(),yEc)):b==guc&&F6b(d,c,(BEc(),zEc))}else{ZEb(f.c,d)}}return f} +function Snc(a){var b,c,d,e,f,g,h,i;a.b=new hj(new mob((qpd(),cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd]))),new mob((joc(),cD(WC(UV,1),jwe,372,0,[ioc,hoc,goc]))));for(g=cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd]),h=0,i=g.length;h<i;++h){f=g[h];for(c=cD(WC(UV,1),jwe,372,0,[ioc,hoc,goc]),d=0,e=c.length;d<e;++d){b=c[d];aj(a.b,f,b,new bnb)}}} +function BMb(a,b){var c,d,e,f,g,h,i,j,k,l;g=RD(RD(Qc(a.r,b),21),87);h=a.u.Hc((Pod(),Nod));c=a.u.Hc(Kod);d=a.u.Hc(Jod);j=a.u.Hc(Ood);l=a.B.Hc((dqd(),cqd));k=!c&&!d&&(j||g.gc()==2);yMb(a,b);e=null;i=null;if(h){f=g.Kc();e=RD(f.Pb(),117);i=e;while(f.Ob()){i=RD(f.Pb(),117)}e.d.b=0;i.d.c=0;k&&!e.a&&(e.d.c=0)}if(l){CMb(g);if(h){e.d.b=0;i.d.c=0}}} +function JNb(a,b){var c,d,e,f,g,h,i,j,k,l;g=RD(RD(Qc(a.r,b),21),87);h=a.u.Hc((Pod(),Nod));c=a.u.Hc(Kod);d=a.u.Hc(Jod);i=a.u.Hc(Ood);l=a.B.Hc((dqd(),cqd));j=!c&&!d&&(i||g.gc()==2);HNb(a,b);k=null;e=null;if(h){f=g.Kc();k=RD(f.Pb(),117);e=k;while(f.Ob()){e=RD(f.Pb(),117)}k.d.d=0;e.d.a=0;j&&!k.a&&(k.d.a=0)}if(l){KNb(g);if(h){k.d.d=0;e.d.a=0}}} +function ONc(a,b,c){var d,e,f,g,h,i,j,k;e=b.k;if(b.p>=0){return false}else{b.p=c.b;Rmb(c.e,b)}if(e==(r3b(),o3b)||e==q3b){for(g=new Anb(b.j);g.a<g.c.c.length;){f=RD(ynb(g),12);for(k=(d=new Anb((new _3b(f)).a.g),new c4b(d));xnb(k.a);){j=RD(ynb(k.a),18).d;h=j.i;i=h.k;if(b.c!=h.c){if(i==o3b||i==q3b){if(ONc(a,h,c)){return true}}}}}}return true} +function GWd(a){var b;if((a.Db&64)!=0)return cWd(a);b=new Shb(cWd(a));b.a+=' (changeable: ';Ohb(b,(a.Bb&gwe)!=0);b.a+=', volatile: ';Ohb(b,(a.Bb&cKe)!=0);b.a+=', transient: ';Ohb(b,(a.Bb&qxe)!=0);b.a+=', defaultValueLiteral: ';Nhb(b,a.j);b.a+=', unsettable: ';Ohb(b,(a.Bb&bKe)!=0);b.a+=', derived: ';Ohb(b,(a.Bb&Ove)!=0);b.a+=')';return b.a} +function tee(a,b){var c,d,e,f,g;e=b.qi(a.a);if(e){d=(!e.b&&(e.b=new SVd((JTd(),FTd),C8,e)),e.b);c=WD($Nd(d,DKe));if(c!=null){f=c.lastIndexOf('#');g=f==-1?Wee(a,b.jk(),c):f==0?Vee(a,null,(BFb(1,c.length+1),c.substr(1))):Vee(a,(AFb(0,f,c.length),c.substr(0,f)),(BFb(f+1,c.length+1),c.substr(f+1)));if(ZD(g,156)){return RD(g,156)}}}return null} +function xee(a,b){var c,d,e,f,g;d=b.qi(a.a);if(d){c=(!d.b&&(d.b=new SVd((JTd(),FTd),C8,d)),d.b);f=WD($Nd(c,$Ke));if(f!=null){e=f.lastIndexOf('#');g=e==-1?Wee(a,b.jk(),f):e==0?Vee(a,null,(BFb(1,f.length+1),f.substr(1))):Vee(a,(AFb(0,e,f.length),f.substr(0,e)),(BFb(e+1,f.length+1),f.substr(e+1)));if(ZD(g,156)){return RD(g,156)}}}return null} +function rRb(a){var b,c,d,e,f,g,h,i,j,k,l,m;e=XPb(a.d);g=RD(mQb(a.b,(tSb(),nSb)),107);h=g.b+g.c;i=g.d+g.a;k=e.d.a*a.e+h;j=e.b.a*a.f+i;RRb(a.b,new rjd(k,j));for(m=new Anb(a.g);m.a<m.c.c.length;){l=RD(ynb(m),568);b=l.g-e.a.a;c=l.i-e.c.a;d=$id(jjd(new rjd(b,c),l.a,l.b),ijd(njd(ajd(yRb(l.e)),l.d*l.a,l.c*l.b),-0.5));f=zRb(l.e);BRb(l.e,ojd(d,f))}} +function Xgc(a,b){var c,d,e,f,g,h,i,j,k,l,m;b.Ug('Restoring reversed edges',1);for(i=new Anb(a.b);i.a<i.c.c.length;){h=RD(ynb(i),30);for(k=new Anb(h.a);k.a<k.c.c.length;){j=RD(ynb(k),10);for(m=new Anb(j.j);m.a<m.c.c.length;){l=RD(ynb(m),12);g=s2b(l.g);for(d=g,e=0,f=d.length;e<f;++e){c=d[e];Heb(TD(mQb(c,(Ywc(),Nwc))))&&X0b(c,false)}}}}b.Vg()} +function Zpc(a,b,c,d){var e,f,g,h,i;i=$C(iE,Nve,109,(qpd(),cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd])).length,0,2);for(f=cD(WC(E3,1),NAe,64,0,[opd,Yod,Xod,npd,ppd]),g=0,h=f.length;g<h;++g){e=f[g];i[e.g]=$C(iE,vxe,28,a.c[e.g],15,1)}_pc(i,a,Yod);_pc(i,a,npd);Ypc(i,a,Yod,b,c,d);Ypc(i,a,Xod,b,c,d);Ypc(i,a,npd,b,c,d);Ypc(i,a,ppd,b,c,d);return i} +function sLc(a,b,c){if(Ujb(a.a,b)){if(Zsb(RD(Wjb(a.a,b),49),c)){return 1}}else{Zjb(a.a,b,new _sb)}if(Ujb(a.a,c)){if(Zsb(RD(Wjb(a.a,c),49),b)){return -1}}else{Zjb(a.a,c,new _sb)}if(Ujb(a.b,b)){if(Zsb(RD(Wjb(a.b,b),49),c)){return -1}}else{Zjb(a.b,b,new _sb)}if(Ujb(a.b,c)){if(Zsb(RD(Wjb(a.b,c),49),b)){return 1}}else{Zjb(a.b,c,new _sb)}return 0} +function tMb(a){var b,c,d,e,f,g;if(a.q==(Bod(),xod)||a.q==wod){return}e=a.f.n.d+SJb(RD(Vrb(a.b,(qpd(),Yod)),127))+a.c;b=a.f.n.a+SJb(RD(Vrb(a.b,npd),127))+a.c;d=RD(Vrb(a.b,Xod),127);g=RD(Vrb(a.b,ppd),127);f=$wnd.Math.max(0,d.n.d-e);f=$wnd.Math.max(f,g.n.d-e);c=$wnd.Math.max(0,d.n.a-b);c=$wnd.Math.max(c,g.n.a-b);d.n.d=f;g.n.d=f;d.n.a=c;g.n.a=c} +function Xfe(a,b,c,d){var e,f,g,h,i,j;if(c==null){e=RD(a.g,124);for(h=0;h<a.i;++h){g=e[h];if(g.Lk()==b){return rLd(a,g,d)}}}f=(nke(),RD(b,69).xk()?RD(c,76):oke(b,c));if(Mvd(a.e)){j=!pge(a,b);d=qLd(a,f,d);i=b.Jk()?fge(a,3,b,null,c,kge(a,b,c,ZD(b,102)&&(RD(b,19).Bb&txe)!=0),j):fge(a,1,b,b.ik(),c,-1,j);d?d.nj(i):(d=i)}else{d=qLd(a,f,d)}return d} +function xgd(){this.b=new gub;this.d=new gub;this.e=new gub;this.c=new gub;this.a=new Tsb;this.f=new Tsb;HId(l3,new Igd,new Kgd);HId(k3,new ehd,new ghd);HId(h3,new ihd,new khd);HId(i3,new mhd,new ohd);HId(l4,new qhd,new shd);HId(VJ,new Mgd,new Ogd);HId(PK,new Qgd,new Sgd);HId(BK,new Ugd,new Wgd);HId(MK,new Ygd,new $gd);HId(DL,new ahd,new chd)} +function hc(a,b){var c,d,e,f,g;a=a==null?vve:(uFb(a),a);for(e=0;e<b.length;e++){b[e]=ic(b[e])}c=new cib;g=0;d=0;while(d<b.length){f=a.indexOf('%s',g);if(f==-1){break}c.a+=''+zhb(a==null?vve:(uFb(a),a),g,f);Yhb(c,b[d++]);g=f+2}Xhb(c,a,g,a.length);if(d<b.length){c.a+=' [';Yhb(c,b[d++]);while(d<b.length){c.a+=pve;Yhb(c,b[d++])}c.a+=']'}return c.a} +function kMc(a,b){var c,d,e,f,g,h,i;c=0;for(i=new Anb(b);i.a<i.c.c.length;){h=RD(ynb(i),12);$Lc(a.b,a.d[h.p]);g=0;for(e=new l4b(h.b);xnb(e.a)||xnb(e.b);){d=RD(xnb(e.a)?ynb(e.a):ynb(e.b),18);if(uMc(d)){f=AMc(a,h==d.c?d.d:d.c);if(f>a.d[h.p]){c+=ZLc(a.b,f);hmb(a.a,sgb(f))}}else{++g}}c+=a.b.d*g;while(!nmb(a.a)){XLc(a.b,RD(smb(a.a),17).a)}}return c} +function pje(a){var b,c,d,e,f,g;f=0;b=WVd(a);!!b.kk()&&(f|=4);(a.Bb&bKe)!=0&&(f|=2);if(ZD(a,102)){c=RD(a,19);e=Z5d(c);(c.Bb&QHe)!=0&&(f|=32);if(e){AYd(uWd(e));f|=8;g=e.t;(g>1||g==-1)&&(f|=16);(e.Bb&QHe)!=0&&(f|=64)}(c.Bb&txe)!=0&&(f|=cKe);f|=gwe}else{if(ZD(b,469)){f|=512}else{d=b.kk();!!d&&(d.i&1)!=0&&(f|=256)}}(a.Bb&512)!=0&&(f|=128);return f} +function vke(a,b){var c;if(a.f==tke){c=yfe(Qee((lke(),jke),b));return a.e?c==4&&b!=(Lle(),Jle)&&b!=(Lle(),Gle)&&b!=(Lle(),Hle)&&b!=(Lle(),Ile):c==2}if(!!a.d&&(a.d.Hc(b)||a.d.Hc(zfe(Qee((lke(),jke),b)))||a.d.Hc(Eee((lke(),jke),a.b,b)))){return true}if(a.f){if(Xee((lke(),a.f),Bfe(Qee(jke,b)))){c=yfe(Qee(jke,b));return a.e?c==4:c==2}}return false} +function oKc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;m=-1;n=0;for(j=a,k=0,l=j.length;k<l;++k){i=j[k];for(f=i,g=0,h=f.length;g<h;++g){e=f[g];b=new urc(m==-1?a[0]:a[m],RD(mQb(Y2b(e),(yCc(),cAc)),284),Bic(e),Heb(TD(mQb(Y2b(e),bAc))));for(c=0;c<e.j.c.length;c++){for(d=c+1;d<e.j.c.length;d++){prc(b,RD(Vmb(e.j,c),12),RD(Vmb(e.j,d),12))>0&&++n}}}++m}return n} +function S2c(a,b,c,d){var e,f,g,h,i,j,k,l;g=RD(Gxd(c,(umd(),Qld)),8);i=g.a;k=g.b+a;e=$wnd.Math.atan2(k,i);e<0&&(e+=dFe);e+=b;e>dFe&&(e-=dFe);h=RD(Gxd(d,Qld),8);j=h.a;l=h.b+a;f=$wnd.Math.atan2(l,j);f<0&&(f+=dFe);f+=b;f>dFe&&(f-=dFe);return Zy(),bz(1.0E-10),$wnd.Math.abs(e-f)<=1.0E-10||e==f||isNaN(e)&&isNaN(f)?0:e<f?-1:e>f?1:cz(isNaN(e),isNaN(f))} +function PGb(a){var b,c,d,e,f,g,h;h=new Tsb;for(d=new Anb(a.a.b);d.a<d.c.c.length;){b=RD(ynb(d),60);Zjb(h,b,new bnb)}for(e=new Anb(a.a.b);e.a<e.c.c.length;){b=RD(ynb(e),60);b.i=pxe;for(g=b.c.Kc();g.Ob();){f=RD(g.Pb(),60);RD(Wd(qtb(h.f,f)),15).Fc(b)}}for(c=new Anb(a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),60);b.c.$b();b.c=RD(Wd(qtb(h.f,b)),15)}HGb(a)} +function AYb(a){var b,c,d,e,f,g,h;h=new Tsb;for(d=new Anb(a.a.b);d.a<d.c.c.length;){b=RD(ynb(d),86);Zjb(h,b,new bnb)}for(e=new Anb(a.a.b);e.a<e.c.c.length;){b=RD(ynb(e),86);b.o=pxe;for(g=b.f.Kc();g.Ob();){f=RD(g.Pb(),86);RD(Wd(qtb(h.f,f)),15).Fc(b)}}for(c=new Anb(a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),86);b.f.$b();b.f=RD(Wd(qtb(h.f,b)),15)}tYb(a)} +function WPb(a,b,c,d){var e,f;VPb(a,b,c,d);hQb(b,a.j-b.j+c);iQb(b,a.k-b.k+d);for(f=new Anb(b.f);f.a<f.c.c.length;){e=RD(ynb(f),334);switch(e.a.g){case 0:eQb(a,b.g+e.b.a,0,b.g+e.c.a,b.i-1);break;case 1:eQb(a,b.g+b.o,b.i+e.b.a,a.o-1,b.i+e.c.a);break;case 2:eQb(a,b.g+e.b.a,b.i+b.p,b.g+e.c.a,a.p-1);break;default:eQb(a,0,b.i+e.b.a,b.g-1,b.i+e.c.a);}}} +function $ec(a,b){var c,d,e,f,g,h,i,j;f=new bnb;b.b.c.length=0;c=RD(zDb(ODb(new SDb(null,new Swb(new Xkb(a.a.b),1))),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);for(e=c.Kc();e.Ob();){d=RD(e.Pb(),17);g=_5b(a.a,d);if(g.b!=0){h=new R4b(b);ZEb(f.c,h);h.p=d.a;for(j=Sub(g,0);j.b!=j.d.c;){i=RD(evb(j),10);g3b(i,h)}}}Tmb(b.b,f)} +function TPb(b,c,d,e,f){var g,h,i;try{if(c>=b.o){throw Adb(new web)}i=c>>5;h=c&31;g=Sdb(1,Ydb(Sdb(h,1)));f?(b.n[d][i]=Rdb(b.n[d][i],g)):(b.n[d][i]=Cdb(b.n[d][i],Qdb(g)));g=Sdb(g,1);e?(b.n[d][i]=Rdb(b.n[d][i],g)):(b.n[d][i]=Cdb(b.n[d][i],Qdb(g)))}catch(a){a=zdb(a);if(ZD(a,333)){throw Adb(new veb(fze+b.o+'*'+b.p+gze+c+pve+d+hze))}else throw Adb(a)}} +function eMc(a,b,c,d){var e,f,g,h,i,j,k,l,m;m=new yAb(new PMc(a));for(h=cD(WC(jR,1),WAe,10,0,[b,c]),i=0,j=h.length;i<j;++i){g=h[i];for(l=aMc(g,d).Kc();l.Ob();){k=RD(l.Pb(),12);for(f=new l4b(k.b);xnb(f.a)||xnb(f.b);){e=RD(xnb(f.a)?ynb(f.a):ynb(f.b),18);if(!W0b(e)){m.a.zc(k,(Geb(),Eeb))==null;uMc(e)&&rAb(m,k==e.c?e.d:e.c)}}}}return Qb(m),new dnb(m)} +function w0c(a,b,c,d){var e,f,g;if(b){f=Kfb(UD(mQb(b,(q$c(),j$c))))+d;g=c+Kfb(UD(mQb(b,d$c)))/2;pQb(b,o$c,sgb(Ydb(Hdb($wnd.Math.round(f)))));pQb(b,p$c,sgb(Ydb(Hdb($wnd.Math.round(g)))));b.d.b==0||w0c(a,RD(Hr((e=Sub((new dXc(b)).a.d,0),new gXc(e))),40),c+Kfb(UD(mQb(b,d$c)))+a.b,d+Kfb(UD(mQb(b,g$c))));mQb(b,m$c)!=null&&w0c(a,RD(mQb(b,m$c),40),c,d)}} +function cdc(a,b){var c,d,e,f,g,h,i,j,k,l,m;i=Y2b(b.a);e=Kfb(UD(mQb(i,(yCc(),XBc))))*2;k=Kfb(UD(mQb(i,cCc)));j=$wnd.Math.max(e,k);f=$C(iE,vxe,28,b.f-b.c+1,15,1);d=-j;c=0;for(h=b.b.Kc();h.Ob();){g=RD(h.Pb(),10);d+=a.a[g.c.p]+j;f[c++]=d}d+=a.a[b.a.c.p]+j;f[c++]=d;for(m=new Anb(b.e);m.a<m.c.c.length;){l=RD(ynb(m),10);d+=a.a[l.c.p]+j;f[c++]=d}return f} +function Xud(a,b){var c,d,e,f;f=RD(Gxd(a,(umd(),Old)),64).g-RD(Gxd(b,Old),64).g;if(f!=0){return f}c=RD(Gxd(a,Jld),17);d=RD(Gxd(b,Jld),17);if(!!c&&!!d){e=c.a-d.a;if(e!=0){return e}}switch(RD(Gxd(a,Old),64).g){case 1:return Qfb(a.i,b.i);case 2:return Qfb(a.j,b.j);case 3:return Qfb(b.i,a.i);case 4:return Qfb(b.j,a.j);default:throw Adb(new dgb(UAe));}} +function zCd(a){var b,c,d;if((a.Db&64)!=0)return Fyd(a);b=new dib(GHe);c=a.k;if(!c){!a.n&&(a.n=new C5d(I4,a,1,7));if(a.n.i>0){d=(!a.n&&(a.n=new C5d(I4,a,1,7)),RD(QHd(a.n,0),135)).a;!d||Zhb(Zhb((b.a+=' "',b),d),'"')}}else{Zhb(Zhb((b.a+=' "',b),c),'"')}Zhb(Uhb(Zhb(Uhb(Zhb(Uhb(Zhb(Uhb((b.a+=' (',b),a.i),','),a.j),' | '),a.g),','),a.f),')');return b.a} +function OCd(a){var b,c,d;if((a.Db&64)!=0)return Fyd(a);b=new dib(HHe);c=a.k;if(!c){!a.n&&(a.n=new C5d(I4,a,1,7));if(a.n.i>0){d=(!a.n&&(a.n=new C5d(I4,a,1,7)),RD(QHd(a.n,0),135)).a;!d||Zhb(Zhb((b.a+=' "',b),d),'"')}}else{Zhb(Zhb((b.a+=' "',b),c),'"')}Zhb(Uhb(Zhb(Uhb(Zhb(Uhb(Zhb(Uhb((b.a+=' (',b),a.i),','),a.j),' | '),a.g),','),a.f),')');return b.a} +function Xnc(a,b){var c,d,e,f,g;b==(TEc(),QEc)&&Eob(RD(Qc(a.a,(Bnc(),xnc)),15));for(e=RD(Qc(a.a,(Bnc(),xnc)),15).Kc();e.Ob();){d=RD(e.Pb(),105);c=RD(Vmb(d.j,0),113).d.j;f=new dnb(d.j);_mb(f,new Boc);switch(b.g){case 2:Pnc(a,f,c,(joc(),hoc),1);break;case 1:case 0:g=Rnc(f);Pnc(a,new Rkb(f,0,g),c,(joc(),hoc),0);Pnc(a,new Rkb(f,g,f.c.length),c,hoc,1);}}} +function sgd(a,b){var c,d,e,f,g,h,i;if(b==null||b.length==0){return null}e=RD(Xjb(a.a,b),143);if(!e){for(d=(h=(new glb(a.b)).a.vc().Kc(),new llb(h));d.a.Ob();){c=(f=RD(d.a.Pb(),44),RD(f.md(),143));g=c.c;i=b.length;if(lhb(g.substr(g.length-i,i),b)&&(b.length==g.length||ihb(g,g.length-b.length-1)==46)){if(e){return null}e=c}}!!e&&$jb(a.a,b,e)}return e} +function HOb(a,b){var c,d,e,f;c=new MOb;d=RD(zDb(GDb(new SDb(null,new Swb(a.f,16)),c),sBb(new _Bb,new bCb,new yCb,new ACb,cD(WC(QL,1),jwe,108,0,[(xBb(),wBb),vBb]))),21);e=d.gc();d=RD(zDb(GDb(new SDb(null,new Swb(b.f,16)),c),sBb(new _Bb,new bCb,new yCb,new ACb,cD(WC(QL,1),jwe,108,0,[wBb,vBb]))),21);f=d.gc();if(e<f){return -1}if(e==f){return 0}return 1} +function I8b(a){var b,c,d;if(!nQb(a,(yCc(),dBc))){return}d=RD(mQb(a,dBc),21);if(d.dc()){return}c=(b=RD(mfb(A3),9),new Fsb(b,RD(WEb(b,b.length),9),0));d.Hc((dod(),$nd))?zsb(c,$nd):zsb(c,_nd);d.Hc(Ynd)||zsb(c,Ynd);d.Hc(Xnd)?zsb(c,cod):d.Hc(Wnd)?zsb(c,bod):d.Hc(Znd)&&zsb(c,aod);d.Hc(cod)?zsb(c,Xnd):d.Hc(bod)?zsb(c,Wnd):d.Hc(aod)&&zsb(c,Znd);pQb(a,dBc,c)} +function KLc(a){var b,c,d,e,f,g,h;e=RD(mQb(a,(Ywc(),pwc)),10);d=a.j;c=(tFb(0,d.c.length),RD(d.c[0],12));for(g=new Anb(e.j);g.a<g.c.c.length;){f=RD(ynb(g),12);if(dE(f)===dE(mQb(c,Awc))){if(f.j==(qpd(),Yod)&&a.p>e.p){Q3b(f,npd);if(f.d){h=f.o.b;b=f.a.b;f.a.b=h-b}}else if(f.j==npd&&e.p>a.p){Q3b(f,Yod);if(f.d){h=f.o.b;b=f.a.b;f.a.b=-(h-b)}}break}}return e} +function nTb(a,b,c,d,e){var f,g,h,i,j,k,l;if(!(ZD(b,207)||ZD(b,366)||ZD(b,193))){throw Adb(new agb('Method only works for ElkNode-, ElkLabel and ElkPort-objects.'))}g=a.a/2;i=b.i+d-g;k=b.j+e-g;j=i+b.g+a.a;l=k+b.f+a.a;f=new Ejd;Mub(f,new rjd(i,k));Mub(f,new rjd(i,l));Mub(f,new rjd(j,l));Mub(f,new rjd(j,k));h=new ORb(f);kQb(h,b);c&&Zjb(a.b,b,h);return h} +function w$b(a,b,c){var d,e,f,g,h,i,j,k,l,m;f=new rjd(b,c);for(k=new Anb(a.a);k.a<k.c.c.length;){j=RD(ynb(k),10);$id(j.n,f);for(m=new Anb(j.j);m.a<m.c.c.length;){l=RD(ynb(m),12);for(e=new Anb(l.g);e.a<e.c.c.length;){d=RD(ynb(e),18);Cjd(d.a,f);g=RD(mQb(d,(yCc(),RAc)),75);!!g&&Cjd(g,f);for(i=new Anb(d.b);i.a<i.c.c.length;){h=RD(ynb(i),72);$id(h.n,f)}}}}} +function o2b(a,b,c){var d,e,f,g,h,i,j,k,l,m;f=new rjd(b,c);for(k=new Anb(a.a);k.a<k.c.c.length;){j=RD(ynb(k),10);$id(j.n,f);for(m=new Anb(j.j);m.a<m.c.c.length;){l=RD(ynb(m),12);for(e=new Anb(l.g);e.a<e.c.c.length;){d=RD(ynb(e),18);Cjd(d.a,f);g=RD(mQb(d,(yCc(),RAc)),75);!!g&&Cjd(g,f);for(i=new Anb(d.b);i.a<i.c.c.length;){h=RD(ynb(i),72);$id(h.n,f)}}}}} +function X4b(a){if((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b).i==0){throw Adb(new Ked('Edges must have a source.'))}else if((!a.c&&(a.c=new Yie(E4,a,5,8)),a.c).i==0){throw Adb(new Ked('Edges must have a target.'))}else{!a.b&&(a.b=new Yie(E4,a,4,7));if(!(a.b.i<=1&&(!a.c&&(a.c=new Yie(E4,a,5,8)),a.c.i<=1))){throw Adb(new Ked('Hyperedges are not supported.'))}}} +function mKc(a,b){var c,d,e,f,g,h,i,j,k,l;l=0;f=new wmb;hmb(f,b);while(f.b!=f.c){i=RD(smb(f),219);j=0;k=RD(mQb(b.j,(yCc(),cAc)),284);g=Kfb(UD(mQb(b.j,Zzc)));h=Kfb(UD(mQb(b.j,$zc)));if(k!=(kEc(),hEc)){j+=g*nKc(i.e,k);j+=h*oKc(i.e)}l+=PLc(i.d,i.e)+j;for(e=new Anb(i.b);e.a<e.c.c.length;){d=RD(ynb(e),36);c=RD(Vmb(a.b,d.p),219);c.s||(l+=lKc(a,c))}}return l} +function Pib(){Pib=geb;var a;Kib=new ajb(1,1);Mib=new ajb(1,10);Oib=new ajb(0,0);Jib=new ajb(-1,1);Lib=cD(WC(uJ,1),Nve,92,0,[Oib,Kib,new ajb(1,2),new ajb(1,3),new ajb(1,4),new ajb(1,5),new ajb(1,6),new ajb(1,7),new ajb(1,8),new ajb(1,9),Mib]);Nib=$C(uJ,Nve,92,32,0,1);for(a=0;a<Nib.length;a++){Nib[a]=Jdb(Sdb(1,a),0)?jjb(Sdb(1,a)):Xib(jjb(Odb(Sdb(1,a))))}} +function JJb(a,b,c,d,e,f,g){a.c=d.Lf().a;a.d=d.Lf().b;if(e){a.c+=e.Lf().a;a.d+=e.Lf().b}a.b=b.Mf().a;a.a=b.Mf().b;if(!e){c?(a.c-=g+b.Mf().a):(a.c+=d.Mf().a+g)}else{switch(e.ag().g){case 0:case 2:a.c+=e.Mf().a+g+f.a+g;break;case 4:a.c-=g+f.a+g+b.Mf().a;break;case 1:a.c+=e.Mf().a+g;a.d-=g+f.b+g+b.Mf().b;break;case 3:a.c+=e.Mf().a+g;a.d+=e.Mf().b+g+f.b+g;}}} +function xdc(a,b){var c,d;this.b=new bnb;this.e=new bnb;this.a=a;this.d=b;udc(this);vdc(this);this.b.dc()?(this.c=a.c.p):(this.c=RD(this.b.Xb(0),10).c.p);this.e.c.length==0?(this.f=a.c.p):(this.f=RD(Vmb(this.e,this.e.c.length-1),10).c.p);for(d=RD(mQb(a,(Ywc(),Mwc)),15).Kc();d.Ob();){c=RD(d.Pb(),72);if(nQb(c,(yCc(),uAc))){this.d=RD(mQb(c,uAc),232);break}}} +function erc(a,b,c){var d,e,f,g,h,i,j,k;d=RD(Wjb(a.a,b),49);f=RD(Wjb(a.a,c),49);e=RD(Wjb(a.e,b),49);g=RD(Wjb(a.e,c),49);d.a.zc(c,d);g.a.zc(b,g);for(k=f.a.ec().Kc();k.Ob();){j=RD(k.Pb(),10);d.a.zc(j,d);Ysb(RD(Wjb(a.e,j),49),b);ye(RD(Wjb(a.e,j),49),e)}for(i=e.a.ec().Kc();i.Ob();){h=RD(i.Pb(),10);g.a.zc(h,g);Ysb(RD(Wjb(a.a,h),49),c);ye(RD(Wjb(a.a,h),49),f)}} +function uLc(a,b,c){var d,e,f,g,h,i,j,k;d=RD(Wjb(a.a,b),49);f=RD(Wjb(a.a,c),49);e=RD(Wjb(a.b,b),49);g=RD(Wjb(a.b,c),49);d.a.zc(c,d);g.a.zc(b,g);for(k=f.a.ec().Kc();k.Ob();){j=RD(k.Pb(),10);d.a.zc(j,d);Ysb(RD(Wjb(a.b,j),49),b);ye(RD(Wjb(a.b,j),49),e)}for(i=e.a.ec().Kc();i.Ob();){h=RD(i.Pb(),10);g.a.zc(h,g);Ysb(RD(Wjb(a.a,h),49),c);ye(RD(Wjb(a.a,h),49),f)}} +function rrc(a,b,c){var d,e,f,g,h,i,j,k;d=RD(Wjb(a.a,b),49);f=RD(Wjb(a.a,c),49);e=RD(Wjb(a.d,b),49);g=RD(Wjb(a.d,c),49);d.a.zc(c,d);g.a.zc(b,g);for(k=f.a.ec().Kc();k.Ob();){j=RD(k.Pb(),12);d.a.zc(j,d);Ysb(RD(Wjb(a.d,j),49),b);ye(RD(Wjb(a.d,j),49),e)}for(i=e.a.ec().Kc();i.Ob();){h=RD(i.Pb(),12);g.a.zc(h,g);Ysb(RD(Wjb(a.a,h),49),c);ye(RD(Wjb(a.a,h),49),f)}} +function lTc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;f=c;if(c<d){m=(n=new USc(a.p),o=new USc(a.p),ye(n.e,a.e),n.q=a.q,n.r=o,LSc(n),ye(o.j,a.j),o.r=n,LSc(o),new Ptd(n,o));l=RD(m.a,118);k=RD(m.b,118);e=(tFb(f,b.c.length),RD(b.c[f],339));g=sTc(a,l,k,e);for(j=c+1;j<=d;j++){h=(tFb(j,b.c.length),RD(b.c[j],339));i=sTc(a,l,k,h);if(qTc(h,i,e,g)){e=h;g=i;f=j}}}return f} +function c8c(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;g=RD(QHd(b,0),27);Dyd(g,0);Eyd(g,0);m=new bnb;ZEb(m.c,g);h=g;f=new lad(a.a,g.g,g.f,(sad(),rad));for(n=1;n<b.i;n++){o=RD(QHd(b,n),27);i=d8c(a,oad,o,h,f,m,c);j=d8c(a,nad,o,h,f,m,c);k=d8c(a,qad,o,h,f,m,c);l=d8c(a,pad,o,h,f,m,c);e=f8c(a,i,j,k,l,o,h,d);Dyd(o,e.d);Eyd(o,e.e);kad(e,rad);f=e;h=o;ZEb(m.c,o)}return f} +function yEd(a,b,c){var d,e,f,g,h,i,j,k,l,m;k=null;m=b;l=pEd(a,DGd(c),m);jyd(l,zDd(m,uIe));g=wDd(m,kIe);d=new MEd(a,l);ODd(d.a,d.b,g);h=wDd(m,lIe);e=new NEd(a,l);PDd(e.a,e.b,h);if((!l.b&&(l.b=new Yie(E4,l,4,7)),l.b).i==0||(!l.c&&(l.c=new Yie(E4,l,5,8)),l.c).i==0){f=zDd(m,uIe);i=yIe+f;j=i+zIe;throw Adb(new CDd(j))}GEd(m,l);zEd(a,m,l);k=CEd(a,m,l);return k} +function pJb(a,b){var c,d,e,f,g,h,i;e=$C(kE,Pwe,28,a.e.a.c.length,15,1);for(g=new Anb(a.e.a);g.a<g.c.c.length;){f=RD(ynb(g),125);e[f.d]+=f.b.a.c.length}h=gv(b);while(h.b!=0){f=RD(h.b==0?null:(sFb(h.b!=0),Wub(h,h.a.a)),125);for(d=Nr(new Anb(f.g.a));d.Ob();){c=RD(d.Pb(),218);i=c.e;i.e=$wnd.Math.max(i.e,f.e+c.a);--e[i.d];e[i.d]==0&&(Pub(h,i,h.c.b,h.c),true)}}} +function tJb(a){var b,c,d,e,f,g,h,i,j,k,l;c=qwe;e=lve;for(h=new Anb(a.e.a);h.a<h.c.c.length;){f=RD(ynb(h),125);e=$wnd.Math.min(e,f.e);c=$wnd.Math.max(c,f.e)}b=$C(kE,Pwe,28,c-e+1,15,1);for(g=new Anb(a.e.a);g.a<g.c.c.length;){f=RD(ynb(g),125);f.e-=e;++b[f.e]}d=0;if(a.k!=null){for(j=a.k,k=0,l=j.length;k<l;++k){i=j[k];b[d++]+=i;if(b.length==d){break}}}return b} +function I0c(a,b){var c,d,e,f,g,h;b.Ug('Edge routing',1);e=RD(mQb(a,(h_c(),K$c)),392);if(e==(LZc(),JZc)){G0c(a)}else if(e==IZc){RD(Lvb(DDb(CDb(new SDb(null,new Swb(a.b,16)),new AWc))),40);f=Kfb(UD(mQb(a,$$c)));g=Kfb(UD(mQb(a,J$c)));h=RD(mQb(a,H$c),88);E0c(a,h,f);F0c(a,h,f,g);D0c(a,h,f,g);for(d=Sub(a.a,0);d.b!=d.d.c;){c=RD(evb(d),65);c.a.b<2&&H0c(c)}}b.Vg()} +function IKd(a){switch(a.d){case 9:case 8:{return true}case 3:case 5:case 4:case 6:{return false}case 7:{return RD(HKd(a),17).a==a.o}case 1:case 2:{if(a.o==-2){return false}else{switch(a.p){case 0:case 1:case 2:case 6:case 5:case 7:{return Gdb(a.k,a.f)}case 3:case 4:{return a.j==a.e}default:{return a.n==null?a.g==null:pb(a.n,a.g)}}}}default:{return false}}} +function Grc(a,b){var c,d,e;b.Ug('Breaking Point Insertion',1);d=new ysc(a);switch(RD(mQb(a,(yCc(),rCc)),351).g){case 2:e=new Ksc;break;case 0:e=new zrc;break;default:e=new Nsc;}c=e.og(a,d);Heb(TD(mQb(a,tCc)))&&(c=Frc(a,c));if(!e.pg()&&nQb(a,xCc)){switch(RD(mQb(a,xCc),352).g){case 2:c=Wsc(d,c);break;case 1:c=Usc(d,c);}}if(c.dc()){b.Vg();return}Drc(a,c);b.Vg()} +function oJc(a,b,c){var d,e,f,g,h,i,j,k,l;f=new cnb(b.c.length);for(j=new Anb(b);j.a<j.c.c.length;){g=RD(ynb(j),10);Rmb(f,a.b[g.c.p][g.p])}jJc(a,f,c);l=null;while(l=kJc(f)){lJc(a,RD(l.a,239),RD(l.b,239),f)}b.c.length=0;for(e=new Anb(f);e.a<e.c.c.length;){d=RD(ynb(e),239);for(h=d.d,i=0,k=h.length;i<k;++i){g=h[i];ZEb(b.c,g);a.a[g.c.p][g.p].a=pJc(d.g,d.d[0]).a}}} +function wnd(a){Cgd(a,new Pfd($fd(Xfd(Zfd(Yfd(new agd,pHe),'ELK Fixed'),'Keeps the current layout as it is, without any automatic modification. Optional coordinates can be given for nodes and edge bend points.'),new znd)));Agd(a,pHe,Eze,tnd);Agd(a,pHe,fEe,iGd(und));Agd(a,pHe,QGe,iGd(ond));Agd(a,pHe,jAe,iGd(pnd));Agd(a,pHe,CAe,iGd(rnd));Agd(a,pHe,hAe,iGd(qnd))} +function Do(a,b,c){var d,e,f,g,h;d=Ydb(Ndb(cwe,qgb(Ydb(Ndb(b==null?0:tb(b),dwe)),15)));h=Ydb(Ndb(cwe,qgb(Ydb(Ndb(c==null?0:tb(c),dwe)),15)));f=Go(a,b,d);if(!!f&&h==f.f&&Hb(c,f.i)){return c}g=Ho(a,c,h);if(g){throw Adb(new agb('value already present: '+c))}e=new kp(b,d,c,h);if(f){yo(a,f);Bo(a,e,f);f.e=null;f.c=null;return f.i}else{Bo(a,e,null);Fo(a);return null}} +function V7b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;k=c.a.c;g=c.a.c+c.a.b;f=RD(Wjb(c.c,b),468);n=f.f;o=f.a;f.b?(i=new rjd(g,n)):(i=new rjd(k,n));f.c?(l=new rjd(k,o)):(l=new rjd(g,o));e=k;c.p||(e+=a.c);e+=c.F+c.v*a.b;j=new rjd(e,n);m=new rjd(e,o);zjd(b.a,cD(WC(l3,1),Nve,8,0,[i,j]));h=c.d.a.gc()>1;if(h){d=new rjd(e,c.b);Mub(b.a,d)}zjd(b.a,cD(WC(l3,1),Nve,8,0,[m,l]))} +function aEc(){aEc=geb;$Dc=new bEc(LAe,0);VDc=new bEc('NIKOLOV',1);YDc=new bEc('NIKOLOV_PIXEL',2);WDc=new bEc('NIKOLOV_IMPROVED',3);XDc=new bEc('NIKOLOV_IMPROVED_PIXEL',4);SDc=new bEc('DUMMYNODE_PERCENTAGE',5);ZDc=new bEc('NODECOUNT_PERCENTAGE',6);_Dc=new bEc('NO_BOUNDARY',7);TDc=new bEc('MODEL_ORDER_LEFT_TO_RIGHT',8);UDc=new bEc('MODEL_ORDER_RIGHT_TO_LEFT',9)} +function use(a){var b,c,d,e,f;d=a.length;b=new Rhb;f=0;while(f<d){c=ihb(a,f++);if(c==9||c==10||c==12||c==13||c==32)continue;if(c==35){while(f<d){c=ihb(a,f++);if(c==13||c==10)break}continue}if(c==92&&f<d){if((e=(BFb(f,a.length),a.charCodeAt(f)))==35||e==9||e==10||e==12||e==13||e==32){Jhb(b,e&Bwe);++f}else{b.a+='\\';Jhb(b,e&Bwe);++f}}else Jhb(b,c&Bwe)}return b.a} +function D4c(){D4c=geb;n4c=new lGd(oFe,(Geb(),false));t4c=new lGd(pFe,sgb(0));u4c=new lGd(qFe,0);v4c=new lGd(rFe,false);q4c=(g4c(),d4c);p4c=new lGd(sFe,q4c);sgb(0);o4c=new lGd(tFe,sgb(1));A4c=(t5c(),r5c);z4c=new lGd(uFe,A4c);C4c=(Y3c(),X3c);B4c=new lGd(vFe,C4c);s4c=(j5c(),i5c);r4c=new lGd(wFe,s4c);y4c=new lGd(xFe,0);w4c=new lGd(yFe,false);x4c=new lGd(zFe,false)} +function t3c(a,b){var c,d,e;for(d=new Anb(b);d.a<d.c.c.length;){c=RD(ynb(d),27);Rc(a.a,c,c);Rc(a.b,c,c);e=Q2c(c);if(e.c.length!=0){!!a.d&&a.d.Gg(e);Rc(a.a,c,(tFb(0,e.c.length),RD(e.c[0],27)));Rc(a.b,c,RD(Vmb(e,e.c.length-1),27));while(N2c(e).c.length!=0){e=N2c(e);!!a.d&&a.d.Gg(e);Rc(a.a,c,(tFb(0,e.c.length),RD(e.c[0],27)));Rc(a.b,c,RD(Vmb(e,e.c.length-1),27))}}}} +function jwd(a,b,c){var d,e,f,g,h,i;if(!b){return null}else{if(c<=-1){d=vYd(b.Dh(),-1-c);if(ZD(d,102)){return RD(d,19)}else{g=RD(b.Mh(d),160);for(h=0,i=g.gc();h<i;++h){if(dE(g.Ul(h))===dE(a)){e=g.Tl(h);if(ZD(e,102)){f=RD(e,19);if((f.Bb&QHe)!=0){return f}}}}throw Adb(new dgb('The containment feature could not be located'))}}else{return Z5d(RD(vYd(a.Dh(),c),19))}}} +function Lqc(a){var b,c,d,e,f,g,h,i,j,k;c=0;for(h=new Anb(a.d);h.a<h.c.c.length;){g=RD(ynb(h),105);!!g.i&&(g.i.c=c++)}b=YC(xdb,[Nve,Hye],[183,28],16,[c,c],2);k=a.d;for(e=0;e<k.c.length;e++){i=(tFb(e,k.c.length),RD(k.c[e],105));if(i.i){for(f=e+1;f<k.c.length;f++){j=(tFb(f,k.c.length),RD(k.c[f],105));if(j.i){d=Qqc(i,j);b[i.i.c][j.i.c]=d;b[j.i.c][i.i.c]=d}}}}return b} +function u7c(){u7c=geb;m7c=new lGd(LFe,(Geb(),false));sgb(-1);f7c=new lGd(MFe,sgb(-1));sgb(-1);g7c=new lGd(NFe,sgb(-1));h7c=new lGd(OFe,false);s7c=(z8c(),x8c);r7c=new lGd(PFe,s7c);t7c=new lGd(QFe,-1);q7c=(_6c(),$6c);p7c=new lGd(RFe,q7c);o7c=new lGd(SFe,true);l7c=(b9c(),$8c);k7c=new lGd(TFe,l7c);j7c=new lGd(UFe,false);sgb(1);i7c=new lGd(VFe,sgb(1));n7c=new jGd(WFe)} +function WYc(){WYc=geb;VYc=new XYc('ROOT_PROC',0);OYc=new XYc('FAN_PROC',1);SYc=new XYc('LEVEL_PROC',2);TYc=new XYc('NEIGHBORS_PROC',3);RYc=new XYc('LEVEL_HEIGHT',4);NYc=new XYc('DIRECTION_PROC',5);UYc=new XYc('NODE_POSITION_PROC',6);LYc=new XYc('COMPACTION_PROC',7);QYc=new XYc('LEVEL_COORDS',8);PYc=new XYc('GRAPH_BOUNDS_PROC',9);MYc=new XYc('DETREEIFYING_PROC',10)} +function Fee(a,b){var c,d,e,f,g,h,i,j,k,l;l=zYd(b);j=null;e=false;for(h=0,k=tYd(l.a).i;h<k;++h){g=RD(N_d(l,h,(f=RD(QHd(tYd(l.a),h),89),i=f.c,ZD(i,90)?RD(i,29):(JTd(),zTd))),29);c=Fee(a,g);if(!c.dc()){if(!j){j=c}else{if(!e){e=true;j=new PSd(j)}j.Gc(c)}}}d=Kee(a,b);if(d.dc()){return !j?(yob(),yob(),vob):j}else{if(!j){return d}else{e||(j=new PSd(j));j.Gc(d);return j}}} +function Gee(a,b){var c,d,e,f,g,h,i,j,k,l;l=zYd(b);j=null;d=false;for(h=0,k=tYd(l.a).i;h<k;++h){f=RD(N_d(l,h,(e=RD(QHd(tYd(l.a),h),89),i=e.c,ZD(i,90)?RD(i,29):(JTd(),zTd))),29);c=Gee(a,f);if(!c.dc()){if(!j){j=c}else{if(!d){d=true;j=new PSd(j)}j.Gc(c)}}}g=Nee(a,b);if(g.dc()){return !j?(yob(),yob(),vob):j}else{if(!j){return g}else{d||(j=new PSd(j));j.Gc(g);return j}}} +function gNb(a){var b,c,d,e;d=a.o;RMb();if(a.A.dc()||pb(a.A,QMb)){e=d.a}else{e=ZKb(a.f);if(a.A.Hc((Qpd(),Npd))&&!a.B.Hc((dqd(),_pd))){e=$wnd.Math.max(e,ZKb(RD(Vrb(a.p,(qpd(),Yod)),252)));e=$wnd.Math.max(e,ZKb(RD(Vrb(a.p,npd),252)))}b=TMb(a);!!b&&(e=$wnd.Math.max(e,b.a))}Heb(TD(a.e.Tf().of((umd(),mld))))?(d.a=$wnd.Math.max(d.a,e)):(d.a=e);c=a.f.i;c.c=0;c.b=e;$Kb(a.f)} +function _fe(a,b,c){var d,e,f,g,h,i;if(ZD(b,76)){return rLd(a,b,c)}else{h=null;f=null;d=RD(a.g,124);for(g=0;g<a.i;++g){e=d[g];if(pb(b,e.md())){f=e.Lk();if(ZD(f,102)&&(RD(f,19).Bb&QHe)!=0){h=e;break}}}if(h){if(Mvd(a.e)){i=f.Jk()?fge(a,4,f,b,null,kge(a,f,b,ZD(f,102)&&(RD(f,19).Bb&txe)!=0),true):fge(a,f.tk()?2:1,f,b,f.ik(),-1,true);c?c.nj(i):(c=i)}c=_fe(a,h,c)}return c}} +function yge(a,b,c){var d,e,f,g;g=pke(a.e.Dh(),b);d=RD(a.g,124);nke();if(RD(b,69).xk()){for(f=0;f<a.i;++f){e=d[f];if(g.am(e.Lk())){if(pb(e,c)){vLd(a,f);return true}}}}else if(c!=null){for(f=0;f<a.i;++f){e=d[f];if(g.am(e.Lk())){if(pb(c,e.md())){vLd(a,f);return true}}}}else{for(f=0;f<a.i;++f){e=d[f];if(g.am(e.Lk())){if(e.md()==null){vLd(a,f);return true}}}}return false} +function xcc(a,b){var c,d,e,f,g;b.Ug('Node and Port Label Placement and Node Sizing',1);DJb((i1b(),new t1b(a,true,true,new Acc)));if(RD(mQb(a,(Ywc(),kwc)),21).Hc((ovc(),hvc))){f=RD(mQb(a,(yCc(),EBc)),21);e=f.Hc((Pod(),Mod));g=Heb(TD(mQb(a,FBc)));for(d=new Anb(a.b);d.a<d.c.c.length;){c=RD(ynb(d),30);FDb(CDb(new SDb(null,new Swb(c.a,16)),new Ccc),new Ecc(f,e,g))}}b.Vg()} +function SHc(a,b){var c,d,e,f,g;a.c==null||a.c.length<b.c.length?(a.c=$C(xdb,Hye,28,b.c.length,16,1)):Nnb(a.c);a.a=new bnb;d=0;for(g=new Anb(b);g.a<g.c.c.length;){e=RD(ynb(g),10);e.p=d++}c=new Yub;for(f=new Anb(b);f.a<f.c.c.length;){e=RD(ynb(f),10);if(!a.c[e.p]){THc(a,e);c.b==0||(sFb(c.b!=0),RD(c.a.a.c,15)).gc()<a.a.c.length?Nub(c,a.a):Oub(c,a.a);a.a=new bnb}}return c} +function Ucd(a){Cgd(a,new Pfd($fd(Xfd(Zfd(Yfd(new agd,uGe),'ELK SPOrE Overlap Removal'),'A node overlap removal algorithm proposed by Nachmanson et al. in "Node overlap removal by growing a tree".'),new Xcd)));Agd(a,uGe,iGe,iGd(Scd));Agd(a,uGe,Eze,Qcd);Agd(a,uGe,_ze,8);Agd(a,uGe,nGe,iGd(Rcd));Agd(a,uGe,qGe,iGd(Ocd));Agd(a,uGe,rGe,iGd(Pcd));Agd(a,uGe,LDe,(Geb(),false))} +function Dee(a,b){var c,d,e,f,g,h,i;c=b.qi(a.a);if(c){i=WD($Nd((!c.b&&(c.b=new SVd((JTd(),FTd),C8,c)),c.b),cLe));if(i!=null){d=new bnb;for(f=vhb(i,'\\w'),g=0,h=f.length;g<h;++g){e=f[g];lhb(e,'##other')?Rmb(d,'!##'+Uee(a,BXd(b.qk()))):lhb(e,'##local')?(d.c.push(null),undefined,true):lhb(e,aLe)?Rmb(d,Uee(a,BXd(b.qk()))):(ZEb(d.c,e),true)}return d}}return yob(),yob(),vob} +function u$b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n;g=Zid(b.c,c,d);for(l=new Anb(b.a);l.a<l.c.c.length;){k=RD(ynb(l),10);$id(k.n,g);for(n=new Anb(k.j);n.a<n.c.c.length;){m=RD(ynb(n),12);for(f=new Anb(m.g);f.a<f.c.c.length;){e=RD(ynb(f),18);Cjd(e.a,g);h=RD(mQb(e,(yCc(),RAc)),75);!!h&&Cjd(h,g);for(j=new Anb(e.b);j.a<j.c.c.length;){i=RD(ynb(j),72);$id(i.n,g)}}}Rmb(a.a,k);k.a=a}} +function wYb(a){var b,c,d,e,f,g,h,i;if(a.d){throw Adb(new dgb((lfb(eQ),lye+eQ.k+mye)))}a.c==(Cmd(),Amd)&&vYb(a,ymd);for(c=new Anb(a.a.a);c.a<c.c.c.length;){b=RD(ynb(c),194);b.e=0}for(g=new Anb(a.a.b);g.a<g.c.c.length;){f=RD(ynb(g),86);f.o=pxe;for(e=f.f.Kc();e.Ob();){d=RD(e.Pb(),86);++d.d.e}}LYb(a);for(i=new Anb(a.a.b);i.a<i.c.c.length;){h=RD(ynb(i),86);h.k=true}return a} +function mnc(a,b){var c,d,e,f,g,h,i,j;h=new Vmc(a);c=new Yub;Pub(c,b,c.c.b,c.c);while(c.b!=0){d=RD(c.b==0?null:(sFb(c.b!=0),Wub(c,c.a.a)),113);d.d.p=1;for(g=new Anb(d.e);g.a<g.c.c.length;){e=RD(ynb(g),340);Qmc(h,e);j=e.d;j.d.p==0&&(Pub(c,j,c.c.b,c.c),true)}for(f=new Anb(d.b);f.a<f.c.c.length;){e=RD(ynb(f),340);Qmc(h,e);i=e.c;i.d.p==0&&(Pub(c,i,c.c.b,c.c),true)}}return h} +function ksd(a){var b,c,d,e,f;d=Kfb(UD(Gxd(a,(umd(),Uld))));if(d==1){return}zyd(a,d*a.g,d*a.f);c=cr(hr((!a.c&&(a.c=new C5d(K4,a,9,9)),a.c),new Lsd));for(f=Fl(Al(cD(WC(cJ,1),rve,20,0,[(!a.n&&(a.n=new C5d(I4,a,1,7)),a.n),(!a.c&&(a.c=new C5d(K4,a,9,9)),a.c),c])));gs(f);){e=RD(hs(f),422);e.qh(d*e.nh(),d*e.oh());e.ph(d*e.mh(),d*e.lh());b=RD(e.of(Fld),8);if(b){b.a*=d;b.b*=d}}} +function Qfe(a,b,c){var d,e,f,g,h;g=(nke(),RD(b,69).xk());if(qke(a.e,b)){if(b.Si()&&dge(a,b,c,ZD(b,102)&&(RD(b,19).Bb&txe)!=0)){return false}}else{h=pke(a.e.Dh(),b);d=RD(a.g,124);for(f=0;f<a.i;++f){e=d[f];if(h.am(e.Lk())){if(g?pb(e,c):c==null?e.md()==null:pb(c,e.md())){return false}else{RD(eHd(a,f,g?RD(c,76):oke(b,c)),76);return true}}}}return WGd(a,g?RD(c,76):oke(b,c))} +function _dc(a,b,c,d,e){var f,g,h,i,j,k,l,m;for(g=new Anb(a.b);g.a<g.c.c.length;){f=RD(ynb(g),30);m=t2b(f.a);for(j=m,k=0,l=j.length;k<l;++k){i=j[k];switch(RD(mQb(i,(yCc(),UAc)),171).g){case 1:dec(i);g3b(i,b);aec(i,true,d);break;case 3:eec(i);g3b(i,c);aec(i,false,e);}}}h=new Jkb(a.b,0);while(h.b<h.d.gc()){(sFb(h.b<h.d.gc()),RD(h.d.Xb(h.c=h.b++),30)).a.c.length==0&&Ckb(h)}} +function mjb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;n=b.length;i=n;BFb(0,b.length);if(b.charCodeAt(0)==45){l=-1;m=1;--n}else{l=1;m=0}f=(xjb(),wjb)[10];e=n/f|0;q=n%f;q!=0&&++e;h=$C(kE,Pwe,28,e,15,1);c=vjb[8];g=0;o=m+(q==0?f:q);for(p=m;p<i;p=o,o=p+f){d=Oeb((AFb(p,o,b.length),b.substr(p,o-p)),qwe,lve);j=(Ljb(),Pjb(h,h,g,c));j+=Fjb(h,g,d);h[g++]=j}k=g;a.e=l;a.d=k;a.a=h;Rib(a)} +function bPb(a,b){var c,d,e,f;c=new gPb;d=RD(zDb(GDb(new SDb(null,new Swb(a.f,16)),c),sBb(new _Bb,new bCb,new yCb,new ACb,cD(WC(QL,1),jwe,108,0,[(xBb(),wBb),vBb]))),21);e=d.gc();d=RD(zDb(GDb(new SDb(null,new Swb(b.f,16)),c),sBb(new _Bb,new bCb,new yCb,new ACb,cD(WC(QL,1),jwe,108,0,[wBb,vBb]))),21);f=d.gc();e=e==1?1:0;f=f==1?1:0;if(e<f){return -1}if(e==f){return 0}return 1} +function p0b(a){var b,c,d,e,f,g,h,i,j,k,l,m;h=a.i;e=Heb(TD(mQb(h,(yCc(),NAc))));k=0;d=0;for(j=new Anb(a.g);j.a<j.c.c.length;){i=RD(ynb(j),18);g=W0b(i);f=g&&e&&Heb(TD(mQb(i,OAc)));m=i.d.i;g&&f?++d:g&&!f?++k:Y2b(m).e==h?++d:++k}for(c=new Anb(a.e);c.a<c.c.c.length;){b=RD(ynb(c),18);g=W0b(b);f=g&&e&&Heb(TD(mQb(b,OAc)));l=b.c.i;g&&f?++k:g&&!f?++d:Y2b(l).e==h?++k:++d}return k-d} +function sQc(a,b,c,d){this.e=a;this.k=RD(mQb(a,(Ywc(),Qwc)),312);this.g=$C(jR,WAe,10,b,0,1);this.b=$C(VI,Nve,345,b,7,1);this.a=$C(jR,WAe,10,b,0,1);this.d=$C(VI,Nve,345,b,7,1);this.j=$C(jR,WAe,10,b,0,1);this.i=$C(VI,Nve,345,b,7,1);this.p=$C(VI,Nve,345,b,7,1);this.n=$C(QI,Nve,485,b,8,1);Mnb(this.n,(Geb(),false));this.f=$C(QI,Nve,485,b,8,1);Mnb(this.f,true);this.o=c;this.c=d} +function mdc(a,b){var c,d,e,f,g,h;if(b.dc()){return}if(RD(b.Xb(0),293).d==(btc(),$sc)){ddc(a,b)}else{for(d=b.Kc();d.Ob();){c=RD(d.Pb(),293);switch(c.d.g){case 5:_cc(a,c,fdc(a,c));break;case 0:_cc(a,c,(g=c.f-c.c+1,h=(g-1)/2|0,c.c+h));break;case 4:_cc(a,c,hdc(a,c));break;case 2:ndc(c);_cc(a,c,(f=jdc(c),f?c.c:c.f));break;case 1:ndc(c);_cc(a,c,(e=jdc(c),e?c.f:c.c));}edc(c.a)}}} +function zt(a,b,c,d){var e,f,g;g=new Hu(b,c);if(!a.a){a.a=a.e=g;Zjb(a.b,b,new Gu(g));++a.c}else if(!d){RD(Hvb(a.e),511).b=g;g.d=a.e;a.e=g;e=RD(Wjb(a.b,b),260);if(!e){Zjb(a.b,b,e=new Gu(g));++a.c}else{++e.a;f=e.c;f.c=g;g.e=f;e.c=g}}else{e=RD(Hvb(RD(Wjb(a.b,b),260)),260);++e.a;g.d=d.d;g.e=d.e;g.b=d;g.c=d;!d.e?(e.b=g):(d.e.c=g);!d.d?(a.a=g):(d.d.b=g);d.d=g;d.e=g}++a.d;return g} +function lJb(a,b){var c,d,e,f,g;b.Ug('Network simplex',1);if(a.e.a.c.length<1){b.Vg();return}for(f=new Anb(a.e.a);f.a<f.c.c.length;){e=RD(ynb(f),125);e.e=0}g=a.e.a.c.length>=40;g&&wJb(a);nJb(a);mJb(a);c=qJb(a);d=0;while(!!c&&d<a.f){kJb(a,c,jJb(a,c));c=qJb(a);++d}g&&vJb(a);a.a?hJb(a,tJb(a)):tJb(a);a.b=null;a.d=null;a.p=null;a.c=null;a.g=null;a.i=null;a.n=null;a.o=null;b.Vg()} +function T7b(a,b){var c,d,e,f,g,h,i;if(b.e){return}b.e=true;for(d=b.d.a.ec().Kc();d.Ob();){c=RD(d.Pb(),18);if(b.o&&b.d.a.gc()<=1){g=b.a.c;h=b.a.c+b.a.b;i=new rjd(g+(h-g)/2,b.b);Mub(RD(b.d.a.ec().Kc().Pb(),18).a,i);continue}e=RD(Wjb(b.c,c),468);if(e.b||e.c){V7b(a,c,b);continue}f=a.d==(lFc(),kFc)&&(e.d||e.e)&&_7b(a,b)&&b.d.a.gc()<=1;f?W7b(c,b):U7b(a,c,b)}b.k&&xgb(b.d,new m8b)} +function A5c(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r,s,t;m=f;h=(d+e)/2+m;q=c*$wnd.Math.cos(h);r=c*$wnd.Math.sin(h);s=q-b.g/2;t=r-b.f/2;Dyd(b,s);Eyd(b,t);l=a.a.Eg(b);p=2*$wnd.Math.acos(c/c+a.c);if(p<e-d){n=p/l;g=(d+e-p)/2}else{n=(e-d)/l;g=d}o=Q2c(b);if(a.e){a.e.Fg(a.d);a.e.Gg(o)}for(j=new Anb(o);j.a<j.c.c.length;){i=RD(ynb(j),27);k=a.a.Eg(i);A5c(a,i,c+a.c,g,g+n*k,f);g+=n*k}} +function zA(a,b,c){var d;d=c.q.getMonth();switch(b){case 5:Zhb(a,cD(WC(qJ,1),Nve,2,6,['J','F','M','A','M','J','J','A','S','O','N','D'])[d]);break;case 4:Zhb(a,cD(WC(qJ,1),Nve,2,6,[Cwe,Dwe,Ewe,Fwe,Gwe,Hwe,Iwe,Jwe,Kwe,Lwe,Mwe,Nwe])[d]);break;case 3:Zhb(a,cD(WC(qJ,1),Nve,2,6,['Jan','Feb','Mar','Apr',Gwe,'Jun','Jul','Aug','Sep','Oct','Nov','Dec'])[d]);break;default:UA(a,d+1,b);}} +function ATb(a,b,c,d){var e,f,g,h,i,j,k,l,m;i=new rjd(c,d);ojd(i,RD(mQb(b,(JVb(),GVb)),8));for(m=new Anb(b.e);m.a<m.c.c.length;){l=RD(ynb(m),153);$id(l.d,i);Rmb(a.e,l)}for(h=new Anb(b.c);h.a<h.c.c.length;){g=RD(ynb(h),290);for(f=new Anb(g.a);f.a<f.c.c.length;){e=RD(ynb(f),250);$id(e.d,i)}Rmb(a.c,g)}for(k=new Anb(b.d);k.a<k.c.c.length;){j=RD(ynb(k),454);$id(j.d,i);Rmb(a.d,j)}} +function TFc(a,b){var c,d,e,f,g,h,i,j;for(i=new Anb(b.j);i.a<i.c.c.length;){h=RD(ynb(i),12);for(e=new l4b(h.b);xnb(e.a)||xnb(e.b);){d=RD(xnb(e.a)?ynb(e.a):ynb(e.b),18);c=d.c==h?d.d:d.c;f=c.i;if(b==f){continue}j=RD(mQb(d,(yCc(),KBc)),17).a;j<0&&(j=0);g=f.p;if(a.b[g]==0){if(d.d==c){a.a[g]-=j+1;a.a[g]<=0&&a.c[g]>0&&Mub(a.f,f)}else{a.c[g]-=j+1;a.c[g]<=0&&a.a[g]>0&&Mub(a.e,f)}}}}} +function FVc(a,b,c,d){var e,f,g,h,i,j,k;i=new rjd(c,d);ojd(i,RD(mQb(b,(q$c(),SZc)),8));for(k=Sub(b.b,0);k.b!=k.d.c;){j=RD(evb(k),40);$id(j.e,i);Mub(a.b,j)}for(h=RD(zDb(BDb(new SDb(null,new Swb(b.a,16))),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15).Kc();h.Ob();){g=RD(h.Pb(),65);for(f=Sub(g.a,0);f.b!=f.d.c;){e=RD(evb(f),8);e.a+=i.a;e.b+=i.b}Mub(a.a,g)}} +function kWc(a,b){var c,d,e,f;if(0<(ZD(a,16)?RD(a,16).gc():Kr(a.Kc()))){e=b;if(1<e){--e;f=new uWc;for(d=a.Kc();d.Ob();){c=RD(d.Pb(),40);f=Al(cD(WC(cJ,1),rve,20,0,[f,new dXc(c)]))}return kWc(f,e)}if(e<0){f=new xWc;for(d=a.Kc();d.Ob();){c=RD(d.Pb(),40);f=Al(cD(WC(cJ,1),rve,20,0,[f,new dXc(c)]))}if(0<(ZD(f,16)?RD(f,16).gc():Kr(f.Kc()))){return kWc(f,e)}}}return RD(Hr(a.Kc()),40)} +function v0c(a,b,c){var d,e,f,g;c.Ug('Processor order nodes',2);a.b=Kfb(UD(mQb(b,(h_c(),_$c))));a.a=RD(mQb(b,H$c),88);if(a.a==(Cmd(),Amd)){a.a=xmd;pQb(b,H$c,a.a)}e=new Yub;for(g=Sub(b.b,0);g.b!=g.d.c;){f=RD(evb(g),40);Heb(TD(mQb(f,(q$c(),n$c))))&&(Pub(e,f,e.c.b,e.c),true)}d=(sFb(e.b!=0),RD(e.a.a.c,40));t0c(a,d);c.fh(1);w0c(a,d,0-Kfb(UD(mQb(d,(q$c(),d$c))))/2,0);c.fh(1);c.Vg()} +function dqd(){dqd=geb;Ypd=new eqd('DEFAULT_MINIMUM_SIZE',0);$pd=new eqd('MINIMUM_SIZE_ACCOUNTS_FOR_PADDING',1);Xpd=new eqd('COMPUTE_PADDING',2);_pd=new eqd('OUTSIDE_NODE_LABELS_OVERHANG',3);aqd=new eqd('PORTS_OVERHANG',4);cqd=new eqd('UNIFORM_PORT_SPACING',5);bqd=new eqd('SPACE_EFFICIENT_PORT_LABELS',6);Zpd=new eqd('FORCE_TABULAR_NODE_LABELS',7);Wpd=new eqd('ASYMMETRICAL',8)} +function Rje(a,b){var c,d,e,f,g,h,i,j;if(!b){return null}else{c=(f=b.Dh(),!f?null:BXd(f).wi().si(f));if(c){dub(a,b,c);e=b.Dh();for(i=0,j=(e.i==null&&rYd(e),e.i).length;i<j;++i){h=(d=(e.i==null&&rYd(e),e.i),i>=0&&i<d.length?d[i]:null);if(h.rk()&&!h.sk()){if(ZD(h,331)){Tje(a,RD(h,35),b,c)}else{g=RD(h,19);(g.Bb&QHe)!=0&&Vje(a,g,b,c)}}}b.Vh()&&RD(c,54).ei(RD(b,54)._h())}return c}} +function kJb(a,b,c){var d,e,f;if(!b.f){throw Adb(new agb('Given leave edge is no tree edge.'))}if(c.f){throw Adb(new agb('Given enter edge is a tree edge already.'))}b.f=false;$sb(a.p,b);c.f=true;Ysb(a.p,c);d=c.e.e-c.d.e-c.a;oJb(a,c.e,b)||(d=-d);for(f=new Anb(a.e.a);f.a<f.c.c.length;){e=RD(ynb(f),125);oJb(a,e,b)||(e.e+=d)}a.j=1;Nnb(a.c);uJb(a,RD(ynb(new Anb(a.e.a)),125));iJb(a)} +function wIc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n;BIc(a,b,c);f=b[c];n=d?(qpd(),ppd):(qpd(),Xod);if(xIc(b.length,c,d)){e=b[d?c-1:c+1];sIc(a,e,d?(BEc(),zEc):(BEc(),yEc));for(i=f,k=0,m=i.length;k<m;++k){g=i[k];vIc(a,g,n)}sIc(a,f,d?(BEc(),yEc):(BEc(),zEc));for(h=e,j=0,l=h.length;j<l;++j){g=h[j];!!g.e||vIc(a,g,spd(n))}}else{for(h=f,j=0,l=h.length;j<l;++j){g=h[j];vIc(a,g,n)}}return false} +function erd(a,b,c,d,e){var f,g,h,i,j,k,l;yob();_mb(a,new Urd);h=new Jkb(a,0);l=new bnb;f=0;while(h.b<h.d.gc()){g=(sFb(h.b<h.d.gc()),RD(h.d.Xb(h.c=h.b++),163));if(l.c.length!=0&&urd(g)*trd(g)>f*2){k=new zrd(l);j=urd(g)/trd(g);i=ird(k,b,new z3b,c,d,e,j);$id(hjd(k.e),i);l.c.length=0;f=0;ZEb(l.c,k);ZEb(l.c,g);f=urd(k)*trd(k)+urd(g)*trd(g)}else{ZEb(l.c,g);f+=urd(g)*trd(g)}}return l} +function O9b(a,b){var c,d,e,f,g,h;h=RD(mQb(b,(yCc(),BBc)),101);if(!(h==(Bod(),xod)||h==wod)){return}e=(new rjd(b.f.a+b.d.b+b.d.c,b.f.b+b.d.d+b.d.a)).b;for(g=new Anb(a.a);g.a<g.c.c.length;){f=RD(ynb(g),10);if(f.k!=(r3b(),m3b)){continue}c=RD(mQb(f,(Ywc(),hwc)),64);if(c!=(qpd(),Xod)&&c!=ppd){continue}d=Kfb(UD(mQb(f,Jwc)));h==xod&&(d*=e);f.n.b=d-RD(mQb(f,zBc),8).b;U2b(f,false,true)}} +function uge(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;if(Mvd(a.e)){if(b!=c){e=RD(a.g,124);n=e[c];g=n.Lk();if(qke(a.e,g)){o=pke(a.e.Dh(),g);i=-1;h=-1;d=0;for(j=0,l=b>c?b:c;j<=l;++j){if(j==c){h=d++}else{f=e[j];k=o.am(f.Lk());j==b&&(i=j==l&&!k?d-1:d);k&&++d}}m=RD(uLd(a,b,c),76);h!=i&&eZd(a,new c4d(a.e,7,g,sgb(h),n.md(),i));return m}}}else{return RD(SHd(a,b,c),76)}return RD(uLd(a,b,c),76)} +function ugc(a,b){var c,d,e,f,g,h,i;b.Ug('Port order processing',1);i=RD(mQb(a,(yCc(),HBc)),430);for(d=new Anb(a.b);d.a<d.c.c.length;){c=RD(ynb(d),30);for(f=new Anb(c.a);f.a<f.c.c.length;){e=RD(ynb(f),10);g=RD(mQb(e,BBc),101);h=e.j;if(g==(Bod(),vod)||g==xod||g==wod){yob();_mb(h,mgc)}else if(g!=zod&&g!=Aod){yob();_mb(h,pgc);wgc(h);i==(sEc(),rEc)&&_mb(h,ogc)}e.i=true;V2b(e)}}b.Vg()} +function VHc(a){var b,c,d,e,f,g,h,i;i=new Tsb;b=new BIb;for(g=a.Kc();g.Ob();){e=RD(g.Pb(),10);h=eJb(fJb(new gJb,e),b);rtb(i.f,e,h)}for(f=a.Kc();f.Ob();){e=RD(f.Pb(),10);for(d=new is(Mr(a3b(e).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);if(W0b(c)){continue}rIb(uIb(tIb(sIb(vIb(new wIb,$wnd.Math.max(1,RD(mQb(c,(yCc(),LBc)),17).a)),1),RD(Wjb(i,c.c.i),125)),RD(Wjb(i,c.d.i),125)))}}return b} +function TRc(){TRc=geb;ORc=pfd(new ufd,(sXb(),qXb),(hcc(),Bbc));QRc=pfd(new ufd,pXb,Fbc);RRc=nfd(pfd(new ufd,pXb,Tbc),rXb,Sbc);NRc=nfd(pfd(pfd(new ufd,pXb,vbc),qXb,wbc),rXb,xbc);SRc=mfd(mfd(rfd(nfd(pfd(new ufd,nXb,bcc),rXb,acc),qXb),_bc),ccc);PRc=nfd(new ufd,rXb,Cbc);LRc=nfd(pfd(pfd(pfd(new ufd,oXb,Ibc),qXb,Kbc),qXb,Lbc),rXb,Jbc);MRc=nfd(pfd(pfd(new ufd,qXb,Lbc),qXb,qbc),rXb,pbc)} +function lD(a,b,c,d,e,f){var g,h,i,j,k,l,m;j=oD(b)-oD(a);g=AD(b,j);i=hD(0,0,0);while(j>=0){h=rD(a,g);if(h){j<22?(i.l|=1<<j,undefined):j<44?(i.m|=1<<j-22,undefined):(i.h|=1<<j-44,undefined);if(a.l==0&&a.m==0&&a.h==0){break}}k=g.m;l=g.h;m=g.l;g.h=l>>>1;g.m=k>>>1|(l&1)<<21;g.l=m>>>1|(k&1)<<21;--j}c&&nD(i);if(f){if(d){eD=xD(a);e&&(eD=DD(eD,(MD(),KD)))}else{eD=hD(a.l,a.m,a.h)}}return i} +function rIc(a,b){var c,d,e,f,g,h,i,j,k,l;j=a.e[b.c.p][b.p]+1;i=b.c.a.c.length+1;for(h=new Anb(a.a);h.a<h.c.c.length;){g=RD(ynb(h),12);l=0;f=0;for(e=Fl(Al(cD(WC(cJ,1),rve,20,0,[new T3b(g),new _3b(g)])));gs(e);){d=RD(hs(e),12);if(d.i.c==b.c){l+=AIc(a,d.i)+1;++f}}c=l/f;k=g.j;k==(qpd(),Xod)?c<j?(a.f[g.p]=a.c-c):(a.f[g.p]=a.b+(i-c)):k==ppd&&(c<j?(a.f[g.p]=a.b+c):(a.f[g.p]=a.c-(i-c)))}} +function Oeb(a,b,c){var d,e,f,g,h;if(a==null){throw Adb(new Vgb(vve))}f=a.length;g=f>0&&(BFb(0,a.length),a.charCodeAt(0)==45||(BFb(0,a.length),a.charCodeAt(0)==43))?1:0;for(d=g;d<f;d++){if(dfb((BFb(d,a.length),a.charCodeAt(d)))==-1){throw Adb(new Vgb(nxe+a+'"'))}}h=parseInt(a,10);e=h<b;if(isNaN(h)){throw Adb(new Vgb(nxe+a+'"'))}else if(e||h>c){throw Adb(new Vgb(nxe+a+'"'))}return h} +function Jqc(a){var b,c,d,e,f,g,h;g=new Yub;for(f=new Anb(a.a);f.a<f.c.c.length;){e=RD(ynb(f),118);PSc(e,e.f.c.length);QSc(e,e.k.c.length);if(e.i==0){e.o=0;Pub(g,e,g.c.b,g.c)}}while(g.b!=0){e=RD(g.b==0?null:(sFb(g.b!=0),Wub(g,g.a.a)),118);d=e.o+1;for(c=new Anb(e.f);c.a<c.c.c.length;){b=RD(ynb(c),132);h=b.a;RSc(h,$wnd.Math.max(h.o,d));QSc(h,h.i-1);h.i==0&&(Pub(g,h,g.c.b,g.c),true)}}} +function Ged(a){var b,c,d,e,f,g,h,i;for(g=new Anb(a);g.a<g.c.c.length;){f=RD(ynb(g),74);d=AGd(RD(QHd((!f.b&&(f.b=new Yie(E4,f,4,7)),f.b),0),84));h=d.i;i=d.j;e=RD(QHd((!f.a&&(f.a=new C5d(F4,f,6,6)),f.a),0),166);Nzd(e,e.j+h,e.k+i);Gzd(e,e.b+h,e.c+i);for(c=new dMd((!e.a&&(e.a=new XZd(D4,e,5)),e.a));c.e!=c.i.gc();){b=RD(bMd(c),377);Uxd(b,b.a+h,b.b+i)}Bjd(RD(Gxd(f,(umd(),cld)),75),h,i)}} +function Ere(a){var b;switch(a){case 100:return Jre(OLe,true);case 68:return Jre(OLe,false);case 119:return Jre(PLe,true);case 87:return Jre(PLe,false);case 115:return Jre(QLe,true);case 83:return Jre(QLe,false);case 99:return Jre(RLe,true);case 67:return Jre(RLe,false);case 105:return Jre(SLe,true);case 73:return Jre(SLe,false);default:throw Adb(new yz((b=a,NLe+b.toString(16))));}} +function b_b(a){var b,c,d,e,f;e=RD(Vmb(a.a,0),10);b=new j3b(a);Rmb(a.a,b);b.o.a=$wnd.Math.max(1,e.o.a);b.o.b=$wnd.Math.max(1,e.o.b);b.n.a=e.n.a;b.n.b=e.n.b;switch(RD(mQb(e,(Ywc(),hwc)),64).g){case 4:b.n.a+=2;break;case 1:b.n.b+=2;break;case 2:b.n.a-=2;break;case 3:b.n.b-=2;}d=new R3b;P3b(d,b);c=new a1b;f=RD(Vmb(e.j,0),12);Y0b(c,f);Z0b(c,d);$id(hjd(d.n),f.n);$id(hjd(d.a),f.a);return b} +function Wdc(a,b,c,d,e){if(c&&(!d||(a.c-a.b&a.a.length-1)>1)&&b==1&&RD(a.a[a.b],10).k==(r3b(),n3b)){Qdc(RD(a.a[a.b],10),(Pnd(),Lnd))}else if(d&&(!c||(a.c-a.b&a.a.length-1)>1)&&b==1&&RD(a.a[a.c-1&a.a.length-1],10).k==(r3b(),n3b)){Qdc(RD(a.a[a.c-1&a.a.length-1],10),(Pnd(),Mnd))}else if((a.c-a.b&a.a.length-1)==2){Qdc(RD(omb(a),10),(Pnd(),Lnd));Qdc(RD(omb(a),10),Mnd)}else{Ndc(a,e)}jmb(a)} +function QVc(a,b,c){var d,e,f,g,h;f=0;for(e=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));e.e!=e.i.gc();){d=RD(bMd(e),27);g='';(!d.n&&(d.n=new C5d(I4,d,1,7)),d.n).i==0||(g=RD(QHd((!d.n&&(d.n=new C5d(I4,d,1,7)),d.n),0),135).a);h=new bXc(f++,b,g);kQb(h,d);pQb(h,(q$c(),h$c),d);h.e.b=d.j+d.f/2;h.f.a=$wnd.Math.max(d.g,1);h.e.a=d.i+d.g/2;h.f.b=$wnd.Math.max(d.f,1);Mub(b.b,h);rtb(c.f,d,h)}} +function L5b(a){var b,c,d,e,f;d=RD(mQb(a,(Ywc(),Awc)),27);f=RD(Gxd(d,(yCc(),lBc)),181).Hc((Qpd(),Ppd));if(!a.e){e=RD(mQb(a,kwc),21);b=new rjd(a.f.a+a.d.b+a.d.c,a.f.b+a.d.d+a.d.a);if(e.Hc((ovc(),hvc))){Ixd(d,BBc,(Bod(),wod));Esd(d,b.a,b.b,false,true)}else{Heb(TD(Gxd(d,mBc)))||Esd(d,b.a,b.b,true,true)}}f?Ixd(d,lBc,xsb(Ppd)):Ixd(d,lBc,(c=RD(mfb(H3),9),new Fsb(c,RD(WEb(c,c.length),9),0)))} +function JA(a,b,c){var d,e,f,g;if(b[0]>=a.length){c.o=0;return true}switch(ihb(a,b[0])){case 43:e=1;break;case 45:e=-1;break;default:c.o=0;return true;}++b[0];f=b[0];g=HA(a,b);if(g==0&&b[0]==f){return false}if(b[0]<a.length&&ihb(a,b[0])==58){d=g*60;++b[0];f=b[0];g=HA(a,b);if(g==0&&b[0]==f){return false}d+=g}else{d=g;d<24&&b[0]-f<=2?(d*=60):(d=d%100+(d/100|0)*60)}d*=e;c.o=-d;return true} +function lnc(a){var b,c,d,e,f,g,h,i,j;g=new bnb;for(d=new is(Mr(a3b(a.b).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);W0b(c)&&Rmb(g,new knc(c,nnc(a,c.c),nnc(a,c.d)))}for(j=(f=(new glb(a.e)).a.vc().Kc(),new llb(f));j.a.Ob();){h=(b=RD(j.a.Pb(),44),RD(b.md(),113));h.d.p=0}for(i=(e=(new glb(a.e)).a.vc().Kc(),new llb(e));i.a.Ob();){h=(b=RD(i.a.Pb(),44),RD(b.md(),113));h.d.p==0&&Rmb(a.d,mnc(a,h))}} +function e5b(a){var b,c,d,e,f,g,h;f=MCd(a);for(e=new dMd((!a.e&&(a.e=new Yie(G4,a,7,4)),a.e));e.e!=e.i.gc();){d=RD(bMd(e),74);h=AGd(RD(QHd((!d.c&&(d.c=new Yie(E4,d,5,8)),d.c),0),84));if(!NGd(h,f)){return true}}for(c=new dMd((!a.d&&(a.d=new Yie(G4,a,8,5)),a.d));c.e!=c.i.gc();){b=RD(bMd(c),74);g=AGd(RD(QHd((!b.b&&(b.b=new Yie(E4,b,4,7)),b.b),0),84));if(!NGd(g,f)){return true}}return false} +function jRc(a,b){var c,d,e,f,g,h,i,j,k;for(g=new Anb(b.b);g.a<g.c.c.length;){f=RD(ynb(g),30);for(j=new Anb(f.a);j.a<j.c.c.length;){i=RD(ynb(j),10);k=new bnb;h=0;for(d=new is(Mr(Z2b(i).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);if(W0b(c)||!W0b(c)&&c.c.i.c==c.d.i.c){continue}e=RD(mQb(c,(yCc(),MBc)),17).a;if(e>h){h=e;k.c.length=0}e==h&&Rmb(k,new Ptd(c.c.i,c))}yob();_mb(k,a.c);Qmb(a.b,i.p,k)}}} +function kRc(a,b){var c,d,e,f,g,h,i,j,k;for(g=new Anb(b.b);g.a<g.c.c.length;){f=RD(ynb(g),30);for(j=new Anb(f.a);j.a<j.c.c.length;){i=RD(ynb(j),10);k=new bnb;h=0;for(d=new is(Mr(a3b(i).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);if(W0b(c)||!W0b(c)&&c.c.i.c==c.d.i.c){continue}e=RD(mQb(c,(yCc(),MBc)),17).a;if(e>h){h=e;k.c.length=0}e==h&&Rmb(k,new Ptd(c.d.i,c))}yob();_mb(k,a.c);Qmb(a.f,i.p,k)}}} +function HVc(a,b){var c,d,e,f,g,h,i,j;j=TD(mQb(b,(h_c(),Z$c)));if(j==null||(uFb(j),j)){EVc(a,b);e=new bnb;for(i=Sub(b.b,0);i.b!=i.d.c;){g=RD(evb(i),40);c=DVc(a,g,null);if(c){kQb(c,b);ZEb(e.c,c)}}a.a=null;a.b=null;if(e.c.length>1){for(d=new Anb(e);d.a<d.c.c.length;){c=RD(ynb(d),121);f=0;for(h=Sub(c.b,0);h.b!=h.d.c;){g=RD(evb(h),40);g.g=f++}}}return e}return dv(cD(WC(W$,1),Jze,121,0,[b]))} +function hqc(a){var b,c,d,e,f,g,h,i;i=new Ejd;b=Sub(a,0);h=null;c=RD(evb(b),8);e=RD(evb(b),8);while(b.b!=b.d.c){h=c;c=e;e=RD(evb(b),8);f=iqc(ojd(new rjd(h.a,h.b),c));g=iqc(ojd(new rjd(e.a,e.b),c));d=10;d=$wnd.Math.min(d,$wnd.Math.abs(f.a+f.b)/2);d=$wnd.Math.min(d,$wnd.Math.abs(g.a+g.b)/2);f.a=Lgb(f.a)*d;f.b=Lgb(f.b)*d;g.a=Lgb(g.a)*d;g.b=Lgb(g.b)*d;Mub(i,$id(f,c));Mub(i,$id(g,c))}return i} +function wKc(a,b,c){var d,e,f,g,h,i;c.Ug('Minimize Crossings '+a.a,1);d=b.b.c.length==0||!QDb(CDb(new SDb(null,new Swb(b.b,16)),new PAb(new XKc))).Bd((xDb(),wDb));i=b.b.c.length==1&&RD(Vmb(b.b,0),30).a.c.length==1;f=dE(mQb(b,(yCc(),IAc)))===dE((Fnd(),Cnd));if(d||i&&!f){c.Vg();return}e=rKc(a,b);g=(h=RD(ju(e,0),219),h.c.kg()?h.c.eg()?new KKc(a):new MKc(a):new IKc(a));sKc(e,g);EKc(a);c.Vg()} +function xvd(a,b,c,d){var e,f,g,h,i;g=a.Ph();i=a.Jh();e=null;if(i){if(!!b&&(jwd(a,b,c).Bb&txe)==0){d=rLd(i.El(),a,d);a.di(null);e=b.Qh()}else{i=null}}else{!!g&&(i=g.Qh());!!b&&(e=b.Qh())}i!=e&&!!i&&i.Il(a);h=a.Fh();a.Bh(b,c);i!=e&&!!e&&e.Hl(a);if(a.vh()&&a.wh()){if(!!g&&h>=0&&h!=c){f=new N3d(a,1,h,g,null);!d?(d=f):d.nj(f)}if(c>=0){f=new N3d(a,1,c,h==c?g:null,b);!d?(d=f):d.nj(f)}}return d} +function jSd(a){var b,c,d;if(a.b==null){d=new Qhb;if(a.i!=null){Nhb(d,a.i);d.a+=':'}if((a.f&256)!=0){if((a.f&256)!=0&&a.a!=null){wSd(a.i)||(d.a+='//',d);Nhb(d,a.a)}if(a.d!=null){d.a+='/';Nhb(d,a.d)}(a.f&16)!=0&&(d.a+='/',d);for(b=0,c=a.j.length;b<c;b++){b!=0&&(d.a+='/',d);Nhb(d,a.j[b])}if(a.g!=null){d.a+='?';Nhb(d,a.g)}}else{Nhb(d,a.a)}if(a.e!=null){d.a+='#';Nhb(d,a.e)}a.b=d.a}return a.b} +function V8b(a,b){var c,d,e,f,g,h;for(e=new Anb(b.a);e.a<e.c.c.length;){d=RD(ynb(e),10);f=mQb(d,(Ywc(),Awc));if(ZD(f,12)){g=RD(f,12);h=j2b(b,d,g.o.a,g.o.b);g.n.a=h.a;g.n.b=h.b;Q3b(g,RD(mQb(d,hwc),64))}}c=new rjd(b.f.a+b.d.b+b.d.c,b.f.b+b.d.d+b.d.a);if(RD(mQb(b,(Ywc(),kwc)),21).Hc((ovc(),hvc))){pQb(a,(yCc(),BBc),(Bod(),wod));RD(mQb(Y2b(a),kwc),21).Fc(kvc);r2b(a,c,false)}else{r2b(a,c,true)}} +function Ffc(a,b,c,d,e){var f,g,h,i;f=new j3b(a);h3b(f,(r3b(),q3b));pQb(f,(yCc(),BBc),(Bod(),wod));pQb(f,(Ywc(),Awc),b.c.i);g=new R3b;pQb(g,Awc,b.c);Q3b(g,e);P3b(g,f);pQb(b.c,Iwc,f);h=new j3b(a);h3b(h,q3b);pQb(h,BBc,wod);pQb(h,Awc,b.d.i);i=new R3b;pQb(i,Awc,b.d);Q3b(i,e);P3b(i,h);pQb(b.d,Iwc,h);Y0b(b,g);Z0b(b,i);wFb(0,c.c.length);XEb(c.c,0,f);ZEb(d.c,h);pQb(f,$vc,sgb(1));pQb(h,$vc,sgb(1))} +function Eo(a,b,c,d){var e,f,g,h,i;i=Ydb(Ndb(cwe,qgb(Ydb(Ndb(b==null?0:tb(b),dwe)),15)));e=Ydb(Ndb(cwe,qgb(Ydb(Ndb(c==null?0:tb(c),dwe)),15)));h=Ho(a,b,i);g=Go(a,c,e);if(!!h&&e==h.a&&Hb(c,h.g)){return c}else if(!!g&&!d){throw Adb(new agb('key already present: '+c))}!!h&&yo(a,h);!!g&&yo(a,g);f=new kp(c,e,b,i);Bo(a,f,g);if(g){g.e=null;g.c=null}if(h){h.e=null;h.c=null}Fo(a);return !h?null:h.g} +function Tjb(a,b,c){var d,e,f,g,h;for(f=0;f<b;f++){d=0;for(h=f+1;h<b;h++){d=Bdb(Bdb(Ndb(Cdb(a[f],yxe),Cdb(a[h],yxe)),Cdb(c[f+h],yxe)),Cdb(Ydb(d),yxe));c[f+h]=Ydb(d);d=Udb(d,32)}c[f+b]=Ydb(d)}sjb(c,c,b<<1);d=0;for(e=0,g=0;e<b;++e,g++){d=Bdb(Bdb(Ndb(Cdb(a[e],yxe),Cdb(a[e],yxe)),Cdb(c[g],yxe)),Cdb(Ydb(d),yxe));c[g]=Ydb(d);d=Udb(d,32);++g;d=Bdb(d,Cdb(c[g],yxe));c[g]=Ydb(d);d=Udb(d,32)}return c} +function xOc(a,b,c){var d,e,f,g,h,i,j,k;if(gr(b)){return}i=Kfb(UD(hFc(c.c,(yCc(),fCc))));j=RD(hFc(c.c,eCc),140);!j&&(j=new P2b);d=c.a;e=null;for(h=b.Kc();h.Ob();){g=RD(h.Pb(),12);k=0;if(!e){k=j.d}else{k=i;k+=e.o.b}f=eJb(fJb(new gJb,g),a.f);Zjb(a.k,g,f);rIb(uIb(tIb(sIb(vIb(new wIb,0),eE($wnd.Math.ceil(k))),d),f));e=g;d=f}rIb(uIb(tIb(sIb(vIb(new wIb,0),eE($wnd.Math.ceil(j.a+e.o.b))),d),c.d))} +function K8c(a,b,c,d,e,f,g,h){var i,j,k,l,m,n;n=false;m=f-c.s;k=c.t-b.f+(j=S9c(c,m,false),j.a);if(d.g+h>m){return false}l=(i=S9c(d,m,false),i.a);if(k+h+l<=b.b){Q9c(c,f-c.s);c.c=true;Q9c(d,f-c.s);U9c(d,c.s,c.t+c.d+h);d.k=true;aad(c.q,d);n=true;if(e){Cad(b,d);d.j=b;if(a.c.length>g){Fad((tFb(g,a.c.length),RD(a.c[g],186)),d);(tFb(g,a.c.length),RD(a.c[g],186)).a.c.length==0&&Xmb(a,g)}}}return n} +function Qfc(a,b){var c,d,e,f,g,h;b.Ug('Partition midprocessing',1);e=new Tp;FDb(CDb(new SDb(null,new Swb(a.a,16)),new Ufc),new Wfc(e));if(e.d==0){return}h=RD(zDb(ODb((f=e.i,new SDb(null,(!f?(e.i=new zf(e,e.c)):f).Nc()))),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);d=h.Kc();c=RD(d.Pb(),17);while(d.Ob()){g=RD(d.Pb(),17);Pfc(RD(Qc(e,c),21),RD(Qc(e,g),21));c=g}b.Vg()} +function G_b(a,b,c){var d,e,f,g,h,i,j,k;if(b.p==0){b.p=1;g=c;if(!g){e=new bnb;f=(d=RD(mfb(E3),9),new Fsb(d,RD(WEb(d,d.length),9),0));g=new Ptd(e,f)}RD(g.a,15).Fc(b);b.k==(r3b(),m3b)&&RD(g.b,21).Fc(RD(mQb(b,(Ywc(),hwc)),64));for(i=new Anb(b.j);i.a<i.c.c.length;){h=RD(ynb(i),12);for(k=Fl(Al(cD(WC(cJ,1),rve,20,0,[new T3b(h),new _3b(h)])));gs(k);){j=RD(hs(k),12);G_b(a,j.i,g)}}return g}return null} +function bAd(a,b){var c,d,e,f,g;if(a.Ab){if(a.Ab){g=a.Ab.i;if(g>0){e=RD(a.Ab.g,2033);if(b==null){for(f=0;f<g;++f){c=e[f];if(c.d==null){return c}}}else{for(f=0;f<g;++f){c=e[f];if(lhb(b,c.d)){return c}}}}}else{if(b==null){for(d=new dMd(a.Ab);d.e!=d.i.gc();){c=RD(bMd(d),598);if(c.d==null){return c}}}else{for(d=new dMd(a.Ab);d.e!=d.i.gc();){c=RD(bMd(d),598);if(lhb(b,c.d)){return c}}}}}return null} +function RDd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r,s,t,u,v;n=qEd(a,EGd(b),e);Jzd(n,zDd(e,uIe));o=null;p=e;q=yDd(p,xIe);r=new UEd(n);WDd(r.a,q);s=yDd(p,'endPoint');t=new YEd(n);YDd(t.a,s);u=wDd(p,nIe);v=new _Ed(n);ZDd(v.a,u);l=zDd(e,pIe);f=new QEd(a,n);SDd(f.a,f.b,l);m=zDd(e,oIe);g=new REd(a,n);TDd(g.a,g.b,m);j=wDd(e,rIe);h=new SEd(c,n);UDd(h.b,h.a,j);k=wDd(e,qIe);i=new TEd(d,n);VDd(i.b,i.a,k)} +function q2b(a,b,c){var d,e,f,g,h;h=null;switch(b.g){case 1:for(e=new Anb(a.j);e.a<e.c.c.length;){d=RD(ynb(e),12);if(Heb(TD(mQb(d,(Ywc(),mwc))))){return d}}h=new R3b;pQb(h,(Ywc(),mwc),(Geb(),true));break;case 2:for(g=new Anb(a.j);g.a<g.c.c.length;){f=RD(ynb(g),12);if(Heb(TD(mQb(f,(Ywc(),Gwc))))){return f}}h=new R3b;pQb(h,(Ywc(),Gwc),(Geb(),true));}if(h){P3b(h,a);Q3b(h,c);d2b(h.n,a.o,c)}return h} +function d7b(a,b){var c,d,e,f,g,h;h=-1;g=new Yub;for(d=new l4b(a.b);xnb(d.a)||xnb(d.b);){c=RD(xnb(d.a)?ynb(d.a):ynb(d.b),18);h=$wnd.Math.max(h,Kfb(UD(mQb(c,(yCc(),FAc)))));c.c==a?FDb(CDb(new SDb(null,new Swb(c.b,16)),new j7b),new l7b(g)):FDb(CDb(new SDb(null,new Swb(c.b,16)),new n7b),new p7b(g));for(f=Sub(g,0);f.b!=f.d.c;){e=RD(evb(f),72);nQb(e,(Ywc(),dwc))||pQb(e,dwc,c)}Tmb(b,g);Xub(g)}return h} +function _Tc(a,b,c,d,e){var f,g,h,i,j;h=e?d.b:d.a;if(Zsb(a.a,d)){return}j=h>c.s&&h<c.c;i=false;if(c.e.b!=0&&c.j.b!=0){i=i|($wnd.Math.abs(h-Kfb(UD(Qub(c.e))))<Vze&&$wnd.Math.abs(h-Kfb(UD(Qub(c.j))))<Vze);i=i|($wnd.Math.abs(h-Kfb(UD(Rub(c.e))))<Vze&&$wnd.Math.abs(h-Kfb(UD(Rub(c.j))))<Vze)}if(j||i){g=RD(mQb(b,(yCc(),RAc)),75);if(!g){g=new Ejd;pQb(b,RAc,g)}f=new sjd(d);Pub(g,f,g.c.b,g.c);Ysb(a.a,f)}} +function ZPb(a,b,c,d){var e,f,g,h,i,j,k;if(YPb(a,b,c,d)){return true}else{for(g=new Anb(b.f);g.a<g.c.c.length;){f=RD(ynb(g),334);h=false;i=a.j-b.j+c;j=i+b.o;k=a.k-b.k+d;e=k+b.p;switch(f.a.g){case 0:h=fQb(a,i+f.b.a,0,i+f.c.a,k-1);break;case 1:h=fQb(a,j,k+f.b.a,a.o-1,k+f.c.a);break;case 2:h=fQb(a,i+f.b.a,e,i+f.c.a,a.p-1);break;default:h=fQb(a,0,k+f.b.a,i-1,k+f.c.a);}if(h){return true}}}return false} +function yZc(a,b,c){var d,e,f,g,h,i,j,k,l;c.Ug('Processor set coordinates',1);a.a=b.b.b==0?1:b.b.b;j=null;d=Sub(b.b,0);while(!j&&d.b!=d.d.c){l=RD(evb(d),40);if(Heb(TD(mQb(l,(q$c(),n$c))))){j=l;i=l.e;i.a=RD(mQb(l,o$c),17).a;i.b=RD(mQb(l,p$c),17).a}}h=$Wc(j);k=1;do{h=zZc((e=h,c.eh(k),e));k=h.b/a.a|0}while(h.b!=0);for(g=Sub(b.b,0);g.b!=g.d.c;){f=RD(evb(g),40);ojd(f.e,new rjd(f.f.a/2,f.f.b/2))}c.Vg()} +function uYc(a,b,c){var d,e,f,g,h,i,j,k;c.Ug(MEe,1);akb(a.b);akb(a.a);h=null;f=Sub(b.b,0);while(!h&&f.b!=f.d.c){j=RD(evb(f),40);Heb(TD(mQb(j,(q$c(),n$c))))&&(h=j)}i=new Yub;Pub(i,h,i.c.b,i.c);tYc(a,i);for(k=Sub(b.b,0);k.b!=k.d.c;){j=RD(evb(k),40);g=WD(mQb(j,(q$c(),a$c)));e=Xjb(a.b,g)!=null?RD(Xjb(a.b,g),17).a:0;pQb(j,XZc,sgb(e));d=1+(Xjb(a.a,g)!=null?RD(Xjb(a.a,g),17).a:0);pQb(j,VZc,sgb(d))}c.Vg()} +function ikd(a){Cgd(a,new Pfd($fd(Xfd(Zfd(Yfd(new agd,LGe),'ELK Box'),'Algorithm for packing of unconnected boxes, i.e. graphs without edges.'),new lkd)));Agd(a,LGe,Eze,ekd);Agd(a,LGe,_ze,15);Agd(a,LGe,$ze,sgb(0));Agd(a,LGe,MGe,iGd($jd));Agd(a,LGe,jAe,iGd(akd));Agd(a,LGe,iAe,iGd(ckd));Agd(a,LGe,Dze,KGe);Agd(a,LGe,dAe,iGd(_jd));Agd(a,LGe,CAe,iGd(bkd));Agd(a,LGe,NGe,iGd(Yjd));Agd(a,LGe,YDe,iGd(Zjd))} +function c2b(a,b){var c,d,e,f,g,h,i,j,k;e=a.i;g=e.o.a;f=e.o.b;if(g<=0&&f<=0){return qpd(),opd}j=a.n.a;k=a.n.b;h=a.o.a;c=a.o.b;switch(b.g){case 2:case 1:if(j<0){return qpd(),ppd}else if(j+h>g){return qpd(),Xod}break;case 4:case 3:if(k<0){return qpd(),Yod}else if(k+c>f){return qpd(),npd}}i=(j+h/2)/g;d=(k+c/2)/f;return i+d<=1&&i-d<=0?(qpd(),ppd):i+d>=1&&i-d>=0?(qpd(),Xod):d<0.5?(qpd(),Yod):(qpd(),npd)} +function PNc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=false;k=Kfb(UD(mQb(b,(yCc(),bCc))));o=pwe*k;for(e=new Anb(b.b);e.a<e.c.c.length;){d=RD(ynb(e),30);j=new Anb(d.a);f=RD(ynb(j),10);l=XNc(a.a[f.p]);while(j.a<j.c.c.length){h=RD(ynb(j),10);m=XNc(a.a[h.p]);if(l!=m){n=bFc(a.b,f,h);g=f.n.b+f.o.b+f.d.a+l.a+n;i=h.n.b-h.d.d+m.a;if(g>i+o){p=l.g+m.g;m.a=(m.g*m.a+l.g*l.a)/p;m.g=p;l.f=m;c=true}}f=h;l=m}}return c} +function MJb(a,b,c,d,e,f,g){var h,i,j,k,l,m;m=new Tid;for(j=b.Kc();j.Ob();){h=RD(j.Pb(),853);for(l=new Anb(h.Rf());l.a<l.c.c.length;){k=RD(ynb(l),187);if(dE(k.of((umd(),Qkd)))===dE((Omd(),Nmd))){JJb(m,k,false,d,e,f,g);Sid(a,m)}}}for(i=c.Kc();i.Ob();){h=RD(i.Pb(),853);for(l=new Anb(h.Rf());l.a<l.c.c.length;){k=RD(ynb(l),187);if(dE(k.of((umd(),Qkd)))===dE((Omd(),Mmd))){JJb(m,k,true,d,e,f,g);Sid(a,m)}}}} +function PVc(a,b,c){var d,e,f,g,h,i,j;for(g=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));g.e!=g.i.gc();){f=RD(bMd(g),27);for(e=new is(Mr(zGd(f).a.Kc(),new ir));gs(e);){d=RD(hs(e),74);if(!nzd(d)&&!nzd(d)&&!ozd(d)){i=RD(Wd(qtb(c.f,f)),40);j=RD(Wjb(c,AGd(RD(QHd((!d.c&&(d.c=new Yie(E4,d,5,8)),d.c),0),84))),40);if(!!i&&!!j){h=new WWc(i,j);pQb(h,(q$c(),h$c),d);kQb(h,d);Mub(i.d,h);Mub(j.b,h);Mub(b.a,h)}}}}} +function HNb(a,b){var c,d,e,f,g,h,i,j;for(i=RD(RD(Qc(a.r,b),21),87).Kc();i.Ob();){h=RD(i.Pb(),117);e=h.c?PKb(h.c):0;if(e>0){if(h.a){j=h.b.Mf().b;if(e>j){if(a.v||h.c.d.c.length==1){g=(e-j)/2;h.d.d=g;h.d.a=g}else{c=RD(Vmb(h.c.d,0),187).Mf().b;d=(c-j)/2;h.d.d=$wnd.Math.max(0,d);h.d.a=e-d-j}}}else{h.d.a=a.t+e}}else if(Rod(a.u)){f=wsd(h.b);f.d<0&&(h.d.d=-f.d);f.d+f.a>h.b.Mf().b&&(h.d.a=f.d+f.a-h.b.Mf().b)}}} +function yVb(){yVb=geb;lVb=new mGd((umd(),Rld),sgb(1));rVb=new mGd(fmd,80);qVb=new mGd($ld,5);ZUb=new mGd(Dkd,Yze);mVb=new mGd(Sld,sgb(1));pVb=new mGd(Vld,(Geb(),true));iVb=new A3b(50);hVb=new mGd(tld,iVb);_Ub=ald;jVb=Hld;$Ub=new mGd(Pkd,false);gVb=sld;eVb=mld;fVb=pld;dVb=kld;cVb=ild;kVb=Lld;bVb=(OUb(),HUb);sVb=MUb;aVb=GUb;nVb=JUb;oVb=LUb;vVb=mmd;xVb=qmd;uVb=lmd;tVb=kmd;wVb=(mqd(),jqd);new mGd(nmd,wVb)} +function VC(a,b){var c;switch(XC(a)){case 6:return bE(b);case 7:return _D(b);case 8:return $D(b);case 3:return Array.isArray(b)&&(c=XC(b),!(c>=14&&c<=16));case 11:return b!=null&&typeof b===kve;case 12:return b!=null&&(typeof b===gve||typeof b==kve);case 0:return QD(b,a.__elementTypeId$);case 2:return cE(b)&&!(b.Tm===keb);case 1:return cE(b)&&!(b.Tm===keb)||QD(b,a.__elementTypeId$);default:return true;}} +function oRb(a,b){var c,d,e,f;d=$wnd.Math.min($wnd.Math.abs(a.c-(b.c+b.b)),$wnd.Math.abs(a.c+a.b-b.c));f=$wnd.Math.min($wnd.Math.abs(a.d-(b.d+b.a)),$wnd.Math.abs(a.d+a.a-b.d));c=$wnd.Math.abs(a.c+a.b/2-(b.c+b.b/2));if(c>a.b/2+b.b/2){return 1}e=$wnd.Math.abs(a.d+a.a/2-(b.d+b.a/2));if(e>a.a/2+b.a/2){return 1}if(c==0&&e==0){return 0}if(c==0){return f/e+1}if(e==0){return d/c+1}return $wnd.Math.min(d/c,f/e)+1} +function oWb(a,b){var c,d,e,f,g,h,i;f=0;h=0;i=0;for(e=new Anb(a.f.e);e.a<e.c.c.length;){d=RD(ynb(e),153);if(b==d){continue}g=a.i[b.a][d.a];f+=g;c=bjd(b.d,d.d);c>0&&a.d!=(AWb(),zWb)&&(h+=g*(d.d.a+a.a[b.a][d.a]*(b.d.a-d.d.a)/c));c>0&&a.d!=(AWb(),xWb)&&(i+=g*(d.d.b+a.a[b.a][d.a]*(b.d.b-d.d.b)/c))}switch(a.d.g){case 1:return new rjd(h/f,b.d.b);case 2:return new rjd(b.d.a,i/f);default:return new rjd(h/f,i/f);}} +function xsd(a){var b,c,d,e,f,g;c=(!a.a&&(a.a=new XZd(D4,a,5)),a.a).i+2;g=new cnb(c);Rmb(g,new rjd(a.j,a.k));FDb(new SDb(null,(!a.a&&(a.a=new XZd(D4,a,5)),new Swb(a.a,16))),new Usd(g));Rmb(g,new rjd(a.b,a.c));b=1;while(b<g.c.length-1){d=(tFb(b-1,g.c.length),RD(g.c[b-1],8));e=(tFb(b,g.c.length),RD(g.c[b],8));f=(tFb(b+1,g.c.length),RD(g.c[b+1],8));d.a==e.a&&e.a==f.a||d.b==e.b&&e.b==f.b?Xmb(g,b):++b}return g} +function zgc(a,b){sgc();var c,d,e,f,g;g=RD(mQb(a.i,(yCc(),BBc)),101);f=a.j.g-b.j.g;if(f!=0||!(g==(Bod(),vod)||g==xod||g==wod)){return 0}if(g==(Bod(),vod)){c=RD(mQb(a,CBc),17);d=RD(mQb(b,CBc),17);if(!!c&&!!d){e=c.a-d.a;if(e!=0){return e}}}switch(a.j.g){case 1:return Qfb(a.n.a,b.n.a);case 2:return Qfb(a.n.b,b.n.b);case 3:return Qfb(b.n.a,a.n.a);case 4:return Qfb(b.n.b,a.n.b);default:throw Adb(new dgb(UAe));}} +function Bkc(a,b){var c,d,e,f,g,h,i;c=mGb(pGb(nGb(oGb(new qGb,b),new Vid(b.e)),kkc),a.a);b.j.c.length==0||eGb(RD(Vmb(b.j,0),60).a,c);i=new cHb;Zjb(a.e,c,i);g=new _sb;h=new _sb;for(f=new Anb(b.k);f.a<f.c.c.length;){e=RD(ynb(f),18);Ysb(g,e.c);Ysb(h,e.d)}d=g.a.gc()-h.a.gc();if(d<0){aHb(i,true,(Cmd(),ymd));aHb(i,false,zmd)}else if(d>0){aHb(i,false,(Cmd(),ymd));aHb(i,true,zmd)}Umb(b.g,new Elc(a,c));Zjb(a.g,b,c)} +function Ugb(){Ugb=geb;var a;Qgb=cD(WC(kE,1),Pwe,28,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]);Rgb=$C(kE,Pwe,28,37,15,1);Sgb=cD(WC(kE,1),Pwe,28,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]);Tgb=$C(lE,rxe,28,37,14,1);for(a=2;a<=36;a++){Rgb[a]=eE($wnd.Math.pow(a,Qgb[a]));Tgb[a]=Fdb(Sve,Rgb[a])}} +function tsd(a){var b;if((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i!=1){throw Adb(new agb(tHe+(!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i))}b=new Ejd;!!BGd(RD(QHd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),0),84))&&ye(b,usd(a,BGd(RD(QHd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),0),84)),false));!!BGd(RD(QHd((!a.c&&(a.c=new Yie(E4,a,5,8)),a.c),0),84))&&ye(b,usd(a,BGd(RD(QHd((!a.c&&(a.c=new Yie(E4,a,5,8)),a.c),0),84)),true));return b} +function zRc(a,b){var c,d,e,f,g;b.d?(e=a.a.c==(wQc(),vQc)?Z2b(b.b):a3b(b.b)):(e=a.a.c==(wQc(),uQc)?Z2b(b.b):a3b(b.b));f=false;for(d=new is(Mr(e.a.Kc(),new ir));gs(d);){c=RD(hs(d),18);g=Heb(a.a.f[a.a.g[b.b.p].p]);if(!g&&!W0b(c)&&c.c.i.c==c.d.i.c){continue}if(Heb(a.a.n[a.a.g[b.b.p].p])||Heb(a.a.n[a.a.g[b.b.p].p])){continue}f=true;if(Zsb(a.b,a.a.g[rRc(c,b.b).p])){b.c=true;b.a=c;return b}}b.c=f;b.a=null;return b} +function QJd(a,b,c){var d,e,f,g,h,i,j;d=c.gc();if(d==0){return false}else{if(a.Pj()){i=a.Qj();ZId(a,b,c);g=d==1?a.Ij(3,null,c.Kc().Pb(),b,i):a.Ij(5,null,c,b,i);if(a.Mj()){h=d<100?null:new gLd(d);f=b+d;for(e=b;e<f;++e){j=a.xj(e);h=a.Nj(j,h);h=h}if(!h){a.Jj(g)}else{h.nj(g);h.oj()}}else{a.Jj(g)}}else{ZId(a,b,c);if(a.Mj()){h=d<100?null:new gLd(d);f=b+d;for(e=b;e<f;++e){h=a.Nj(a.xj(e),h)}!!h&&h.oj()}}return true}} +function WJd(a,b,c){var d,e,f,g,h;if(a.Pj()){e=null;f=a.Qj();d=a.Ij(1,h=(g=a.Dj(b,a.Zi(b,c)),g),c,b,f);if(a.Mj()&&!(a.Yi()&&!!h?pb(h,c):dE(h)===dE(c))){!!h&&(e=a.Oj(h,e));e=a.Nj(c,e);if(!e){a.Jj(d)}else{e.nj(d);e.oj()}}else{if(!e){a.Jj(d)}else{e.nj(d);e.oj()}}return h}else{h=(g=a.Dj(b,a.Zi(b,c)),g);if(a.Mj()&&!(a.Yi()&&!!h?pb(h,c):dE(h)===dE(c))){e=null;!!h&&(e=a.Oj(h,null));e=a.Nj(c,e);!!e&&e.oj()}return h}} +function nUb(a,b){var c,d,e,f,g,h,i,j,k;a.e=b;a.f=RD(mQb(b,(JVb(),IVb)),234);eUb(b);a.d=$wnd.Math.max(b.e.c.length*16+b.c.c.length,256);if(!Heb(TD(mQb(b,(yVb(),_Ub))))){k=a.e.e.c.length;for(i=new Anb(b.e);i.a<i.c.c.length;){h=RD(ynb(i),153);j=h.d;j.a=Iwb(a.f)*k;j.b=Iwb(a.f)*k}}c=b.b;for(f=new Anb(b.c);f.a<f.c.c.length;){e=RD(ynb(f),290);d=RD(mQb(e,oVb),17).a;if(d>0){for(g=0;g<d;g++){Rmb(c,new WTb(e))}YTb(e)}}} +function NId(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;m=new OC(a.Zg());sC(b,GIe,m);if(c&&!a.Xg().a.dc()){k=new MB;sC(b,'logs',k);h=0;for(o=new Ppb(a.Xg().b.Kc());o.b.Ob();){n=WD(o.b.Pb());l=new OC(n);JB(k,h);LB(k,h,l);++h}}if(d){j=new hC(a.Wg());sC(b,'executionTime',j)}if(!a.Yg().a.dc()){g=new MB;sC(b,iIe,g);h=0;for(f=new Ppb(a.Yg().b.Kc());f.b.Ob();){e=RD(f.b.Pb(),871);i=new uC;JB(g,h);LB(g,h,i);NId(e,i,c,d);++h}}} +function rue(){rue=geb;Gie();que=new sue;cD(WC(B7,2),Nve,381,0,[cD(WC(B7,1),_Le,600,0,[new oue(wLe)])]);cD(WC(B7,2),Nve,381,0,[cD(WC(B7,1),_Le,600,0,[new oue(xLe)])]);cD(WC(B7,2),Nve,381,0,[cD(WC(B7,1),_Le,600,0,[new oue(yLe)]),cD(WC(B7,1),_Le,600,0,[new oue(xLe)])]);new ejb('-1');cD(WC(B7,2),Nve,381,0,[cD(WC(B7,1),_Le,600,0,[new oue('\\c+')])]);new ejb('0');new ejb('0');new ejb('1');new ejb('0');new ejb(ILe)} +function wac(a,b){var c,d,e,f,g,h,i,j,k,l;b.Ug('Hypernodes processing',1);for(e=new Anb(a.b);e.a<e.c.c.length;){d=RD(ynb(e),30);for(h=new Anb(d.a);h.a<h.c.c.length;){g=RD(ynb(h),10);if(Heb(TD(mQb(g,(yCc(),MAc))))&&g.j.c.length<=2){l=0;k=0;c=0;f=0;for(j=new Anb(g.j);j.a<j.c.c.length;){i=RD(ynb(j),12);switch(i.j.g){case 1:++l;break;case 2:++k;break;case 3:++c;break;case 4:++f;}}l==0&&c==0&&vac(a,g,f<=k)}}}b.Vg()} +function MUc(a,b,c,d,e){var f,g,h,i,j,k,l;for(g=new Anb(b);g.a<g.c.c.length;){f=RD(ynb(g),18);i=f.c;if(c.a._b(i)){j=(dVc(),bVc)}else if(d.a._b(i)){j=(dVc(),cVc)}else{throw Adb(new agb('Source port must be in one of the port sets.'))}k=f.d;if(c.a._b(k)){l=(dVc(),bVc)}else if(d.a._b(k)){l=(dVc(),cVc)}else{throw Adb(new agb('Target port must be in one of the port sets.'))}h=new wVc(f,j,l);Zjb(a.b,f,h);ZEb(e.c,h)}} +function i2d(a){var b,c;if(!!a.c&&a.c.Vh()){c=RD(a.c,54);a.c=RD(Vvd(a,c),142);if(a.c!=c){(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,9,2,c,a.c));if(ZD(a.Cb,411)){a.Db>>16==-15&&a.Cb.Yh()&&pKd(new O3d(a.Cb,9,13,c,a.c,fZd(o4d(RD(a.Cb,62)),a)))}else if(ZD(a.Cb,90)){if(a.Db>>16==-23&&a.Cb.Yh()){b=a.c;ZD(b,90)||(b=(JTd(),zTd));ZD(c,90)||(c=(JTd(),zTd));pKd(new O3d(a.Cb,9,10,c,b,fZd(tYd(RD(a.Cb,29)),a)))}}}}return a.c} +function lac(a,b,c){var d,e,f,g,h,i,j,k,l;c.Ug('Hyperedge merging',1);jac(a,b);i=new Jkb(b.b,0);while(i.b<i.d.gc()){h=(sFb(i.b<i.d.gc()),RD(i.d.Xb(i.c=i.b++),30));k=h.a;if(k.c.length==0){continue}d=null;e=null;f=null;g=null;for(j=0;j<k.c.length;j++){d=(tFb(j,k.c.length),RD(k.c[j],10));e=d.k;if(e==(r3b(),o3b)&&g==o3b){l=hac(d,f);if(l.a){kac(d,f,l.b,l.c);tFb(j,k.c.length);$Eb(k.c,j,1);--j;d=f;e=g}}f=d;g=e}}c.Vg()} +function U$d(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;if(b==c){return true}else{b=V$d(a,b);c=V$d(a,c);d=h2d(b);if(d){k=h2d(c);if(k!=d){if(!k){return false}else{i=d.mk();o=k.mk();return i==o&&i!=null}}else{g=(!b.d&&(b.d=new XZd(o7,b,1)),b.d);f=g.i;m=(!c.d&&(c.d=new XZd(o7,c,1)),c.d);if(f==m.i){for(j=0;j<f;++j){e=RD(QHd(g,j),89);l=RD(QHd(m,j),89);if(!U$d(a,e,l)){return false}}}return true}}else{h=b.e;n=c.e;return h==n}}} +function vge(a,b,c,d){var e,f,g,h,i,j,k,l;if(qke(a.e,b)){l=pke(a.e.Dh(),b);f=RD(a.g,124);k=null;i=-1;h=-1;e=0;for(j=0;j<a.i;++j){g=f[j];if(l.am(g.Lk())){e==c&&(i=j);if(e==d){h=j;k=g.md()}++e}}if(i==-1){throw Adb(new veb(MIe+c+NIe+e))}if(h==-1){throw Adb(new veb(OIe+d+NIe+e))}uLd(a,i,h);Mvd(a.e)&&eZd(a,fge(a,7,b,sgb(d),k,c,true));return k}else{throw Adb(new agb('The feature must be many-valued to support move'))}} +function j2b(a,b,c,d){var e,f,g,h,i;i=new sjd(b.n);i.a+=b.o.a/2;i.b+=b.o.b/2;h=Kfb(UD(mQb(b,(yCc(),ABc))));f=a.f;g=a.d;e=a.c;switch(RD(mQb(b,(Ywc(),hwc)),64).g){case 1:i.a+=g.b+e.a-c/2;i.b=-d-h;b.n.b=-(g.d+h+e.b);break;case 2:i.a=f.a+g.b+g.c+h;i.b+=g.d+e.b-d/2;b.n.a=f.a+g.c+h-e.a;break;case 3:i.a+=g.b+e.a-c/2;i.b=f.b+g.d+g.a+h;b.n.b=f.b+g.a+h-e.b;break;case 4:i.a=-c-h;i.b+=g.d+e.b-d/2;b.n.a=-(g.b+h+e.a);}return i} +function Z4b(a){var b,c,d,e,f,g;d=new d1b;kQb(d,a);dE(mQb(d,(yCc(),rAc)))===dE((Cmd(),Amd))&&pQb(d,rAc,i2b(d));if(mQb(d,(rid(),qid))==null){g=RD(Lje(a),167);pQb(d,qid,fE(g.of(qid)))}pQb(d,(Ywc(),Awc),a);pQb(d,kwc,(b=RD(mfb(iX),9),new Fsb(b,RD(WEb(b,b.length),9),0)));e=FJb((!vCd(a)?null:(lud(),new zud(vCd(a))),lud(),new Fud(!vCd(a)?null:new zud(vCd(a)),a)),zmd);f=RD(mQb(d,qBc),107);c=d.d;B2b(c,f);B2b(c,e);return d} +function Nec(a,b,c){var d,e;d=b.c.i;e=c.d.i;if(d.k==(r3b(),o3b)){pQb(a,(Ywc(),vwc),RD(mQb(d,vwc),12));pQb(a,wwc,RD(mQb(d,wwc),12));pQb(a,uwc,TD(mQb(d,uwc)))}else if(d.k==n3b){pQb(a,(Ywc(),vwc),RD(mQb(d,vwc),12));pQb(a,wwc,RD(mQb(d,wwc),12));pQb(a,uwc,(Geb(),true))}else if(e.k==n3b){pQb(a,(Ywc(),vwc),RD(mQb(e,vwc),12));pQb(a,wwc,RD(mQb(e,wwc),12));pQb(a,uwc,(Geb(),true))}else{pQb(a,(Ywc(),vwc),b.c);pQb(a,wwc,c.d)}} +function wJb(a){var b,c,d,e,f,g,h;a.o=new wmb;d=new Yub;for(g=new Anb(a.e.a);g.a<g.c.c.length;){f=RD(ynb(g),125);CIb(f).c.length==1&&(Pub(d,f,d.c.b,d.c),true)}while(d.b!=0){f=RD(d.b==0?null:(sFb(d.b!=0),Wub(d,d.a.a)),125);if(CIb(f).c.length==0){continue}b=RD(Vmb(CIb(f),0),218);c=f.g.a.c.length>0;h=oIb(b,f);c?FIb(h.b,b):FIb(h.g,b);CIb(h).c.length==1&&(Pub(d,h,d.c.b,d.c),true);e=new Ptd(f,b);hmb(a.o,e);Ymb(a.e.a,f)}} +function SQb(a,b){var c,d,e,f,g,h,i;d=$wnd.Math.abs(Oid(a.b).a-Oid(b.b).a);h=$wnd.Math.abs(Oid(a.b).b-Oid(b.b).b);e=0;i=0;c=1;g=1;if(d>a.b.b/2+b.b.b/2){e=$wnd.Math.min($wnd.Math.abs(a.b.c-(b.b.c+b.b.b)),$wnd.Math.abs(a.b.c+a.b.b-b.b.c));c=1-e/d}if(h>a.b.a/2+b.b.a/2){i=$wnd.Math.min($wnd.Math.abs(a.b.d-(b.b.d+b.b.a)),$wnd.Math.abs(a.b.d+a.b.a-b.b.d));g=1-i/h}f=$wnd.Math.min(c,g);return (1-f)*$wnd.Math.sqrt(d*d+h*h)} +function LUc(a){var b,c,d,e;NUc(a,a.e,a.f,(dVc(),bVc),true,a.c,a.i);NUc(a,a.e,a.f,bVc,false,a.c,a.i);NUc(a,a.e,a.f,cVc,true,a.c,a.i);NUc(a,a.e,a.f,cVc,false,a.c,a.i);MUc(a,a.c,a.e,a.f,a.i);d=new Jkb(a.i,0);while(d.b<d.d.gc()){b=(sFb(d.b<d.d.gc()),RD(d.d.Xb(d.c=d.b++),131));e=new Jkb(a.i,d.b);while(e.b<e.d.gc()){c=(sFb(e.b<e.d.gc()),RD(e.d.Xb(e.c=e.b++),131));KUc(b,c)}}WUc(a.i,RD(mQb(a.d,(Ywc(),Lwc)),234));ZUc(a.i)} +function FXd(a,b){var c,d;if(b!=null){d=DXd(a);if(d){if((d.i&1)!=0){if(d==xdb){return $D(b)}else if(d==kE){return ZD(b,17)}else if(d==jE){return ZD(b,161)}else if(d==gE){return ZD(b,222)}else if(d==hE){return ZD(b,180)}else if(d==iE){return _D(b)}else if(d==wdb){return ZD(b,191)}else if(d==lE){return ZD(b,168)}}else{return PRd(),c=RD(Wjb(ORd,d),57),!c||c.fk(b)}}else if(ZD(b,58)){return a.dl(RD(b,58))}}return false} +function zqe(){zqe=geb;var a,b,c,d,e,f,g,h,i;xqe=$C(gE,YHe,28,255,15,1);yqe=$C(hE,zwe,28,64,15,1);for(b=0;b<255;b++){xqe[b]=-1}for(c=90;c>=65;c--){xqe[c]=c-65<<24>>24}for(d=122;d>=97;d--){xqe[d]=d-97+26<<24>>24}for(e=57;e>=48;e--){xqe[e]=e-48+52<<24>>24}xqe[43]=62;xqe[47]=63;for(f=0;f<=25;f++)yqe[f]=65+f&Bwe;for(g=26,i=0;g<=51;++g,i++)yqe[g]=97+i&Bwe;for(a=52,h=0;a<=61;++a,h++)yqe[a]=48+h&Bwe;yqe[62]=43;yqe[63]=47} +function uib(a,b){var c,d,e,f,g,h;e=xib(a);h=xib(b);if(e==h){if(a.e==b.e&&a.a<54&&b.a<54){return a.f<b.f?-1:a.f>b.f?1:0}d=a.e-b.e;c=(a.d>0?a.d:$wnd.Math.floor((a.a-1)*xxe)+1)-(b.d>0?b.d:$wnd.Math.floor((b.a-1)*xxe)+1);if(c>d+1){return e}else if(c<d-1){return -e}else{f=(!a.c&&(a.c=ojb(Hdb(a.f))),a.c);g=(!b.c&&(b.c=ojb(Hdb(b.f))),b.c);d<0?(f=Wib(f,Sjb(-d))):d>0&&(g=Wib(g,Sjb(d)));return Qib(f,g)}}else return e<h?-1:1} +function pUb(a,b,c){var d,e,f,g,h,i,j,k;c.Ug(Pze,1);a.vf(b);f=0;while(a.xf(f)&&!c.$g()){a.wf();for(k=Fl(Al(cD(WC(cJ,1),rve,20,0,[b.e,b.d,b.b])));gs(k);){i=RD(hs(k),309);for(h=Fl(Al(cD(WC(cJ,1),rve,20,0,[b.e,b.d,b.b])));gs(h);){g=RD(hs(h),309);if(g!=i){e=a.uf(g,i);!!e&&$id(i.c,e)}}}for(j=Fl(Al(cD(WC(cJ,1),rve,20,0,[b.e,b.d,b.b])));gs(j);){i=RD(hs(j),309);d=i.c;_id(d,-a.d,-a.d,a.d,a.d);$id(i.d,d);d.a=0;d.b=0}++f}c.Vg()} +function H$b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;if(a.dc()){return new pjd}j=0;l=0;for(e=a.Kc();e.Ob();){d=RD(e.Pb(),36);f=d.f;j=$wnd.Math.max(j,f.a);l+=f.a*f.b}j=$wnd.Math.max(j,$wnd.Math.sqrt(l)*Kfb(UD(mQb(RD(a.Kc().Pb(),36),(yCc(),Tzc)))));m=0;n=0;i=0;c=b;for(h=a.Kc();h.Ob();){g=RD(h.Pb(),36);k=g.f;if(m+k.a>j){m=0;n+=i+b;i=0}w$b(g,m,n);c=$wnd.Math.max(c,m+k.a);i=$wnd.Math.max(i,k.b);m+=k.a+b}return new rjd(c+b,n+i+b)} +function osd(a,b){var c,d,e,f,g,h,i;if(!MCd(a)){throw Adb(new dgb(sHe))}d=MCd(a);f=d.g;e=d.f;if(f<=0&&e<=0){return qpd(),opd}h=a.i;i=a.j;switch(b.g){case 2:case 1:if(h<0){return qpd(),ppd}else if(h+a.g>f){return qpd(),Xod}break;case 4:case 3:if(i<0){return qpd(),Yod}else if(i+a.f>e){return qpd(),npd}}g=(h+a.g/2)/f;c=(i+a.f/2)/e;return g+c<=1&&g-c<=0?(qpd(),ppd):g+c>=1&&g-c>=0?(qpd(),Xod):c<0.5?(qpd(),Yod):(qpd(),npd)} +function Djb(a,b,c,d,e){var f,g;f=Bdb(Cdb(b[0],yxe),Cdb(d[0],yxe));a[0]=Ydb(f);f=Tdb(f,32);if(c>=e){for(g=1;g<e;g++){f=Bdb(f,Bdb(Cdb(b[g],yxe),Cdb(d[g],yxe)));a[g]=Ydb(f);f=Tdb(f,32)}for(;g<c;g++){f=Bdb(f,Cdb(b[g],yxe));a[g]=Ydb(f);f=Tdb(f,32)}}else{for(g=1;g<c;g++){f=Bdb(f,Bdb(Cdb(b[g],yxe),Cdb(d[g],yxe)));a[g]=Ydb(f);f=Tdb(f,32)}for(;g<e;g++){f=Bdb(f,Cdb(d[g],yxe));a[g]=Ydb(f);f=Tdb(f,32)}}Ddb(f,0)!=0&&(a[g]=Ydb(f))} +function yte(a){Vse();var b,c,d,e,f,g;if(a.e!=4&&a.e!=5)throw Adb(new agb('Token#complementRanges(): must be RANGE: '+a.e));f=a;vte(f);ste(f);d=f.b.length+2;f.b[0]==0&&(d-=2);c=f.b[f.b.length-1];c==MLe&&(d-=2);e=(++Use,new xte(4));e.b=$C(kE,Pwe,28,d,15,1);g=0;if(f.b[0]>0){e.b[g++]=0;e.b[g++]=f.b[0]-1}for(b=1;b<f.b.length-2;b+=2){e.b[g++]=f.b[b]+1;e.b[g++]=f.b[b+1]-1}if(c!=MLe){e.b[g++]=c+1;e.b[g]=MLe}e.a=true;return e} +function zac(a,b){var c,d,e,f,g,h,i,j,k;b.Ug('Layer constraint edge reversal',1);for(g=new Anb(a.b);g.a<g.c.c.length;){f=RD(ynb(g),30);k=-1;c=new bnb;j=t2b(f.a);for(e=0;e<j.length;e++){d=RD(mQb(j[e],(Ywc(),owc)),311);if(k==-1){d!=(Gvc(),Fvc)&&(k=e)}else{if(d==(Gvc(),Fvc)){g3b(j[e],null);f3b(j[e],k++,f)}}d==(Gvc(),Dvc)&&(ZEb(c.c,j[e]),true)}for(i=new Anb(c);i.a<i.c.c.length;){h=RD(ynb(i),10);g3b(h,null);g3b(h,f)}}b.Vg()} +function nLd(a,b,c){var d,e,f,g,h,i,j,k;d=c.gc();if(d==0){return false}else{if(a.Pj()){j=a.Qj();IHd(a,b,c);g=d==1?a.Ij(3,null,c.Kc().Pb(),b,j):a.Ij(5,null,c,b,j);if(a.Mj()){h=d<100?null:new gLd(d);f=b+d;for(e=b;e<f;++e){k=a.g[e];h=a.Nj(k,h);h=a.Uj(k,h)}if(!h){a.Jj(g)}else{h.nj(g);h.oj()}}else{a.Jj(g)}}else{IHd(a,b,c);if(a.Mj()){h=d<100?null:new gLd(d);f=b+d;for(e=b;e<f;++e){i=a.g[e];h=a.Nj(i,h)}!!h&&h.oj()}}return true}} +function m9b(a,b){var c,d,e,f,g,h,i,j,k;b.Ug('Hierarchical port dummy size processing',1);i=new bnb;k=new bnb;d=Kfb(UD(mQb(a,(yCc(),UBc))));c=d*2;for(f=new Anb(a.b);f.a<f.c.c.length;){e=RD(ynb(f),30);i.c.length=0;k.c.length=0;for(h=new Anb(e.a);h.a<h.c.c.length;){g=RD(ynb(h),10);if(g.k==(r3b(),m3b)){j=RD(mQb(g,(Ywc(),hwc)),64);j==(qpd(),Yod)?(ZEb(i.c,g),true):j==npd&&(ZEb(k.c,g),true)}}n9b(i,true,c);n9b(k,false,c)}b.Vg()} +function wSc(a,b,c,d){var e,f,g,h,i;for(g=new Anb(a.k);g.a<g.c.c.length;){e=RD(ynb(g),132);if(!d||e.c==(fTc(),dTc)){i=e.b;if(i.g<0&&e.d>0){PSc(i,i.d-e.d);e.c==(fTc(),dTc)&&NSc(i,i.a-e.d);i.d<=0&&i.i>0&&(Pub(b,i,b.c.b,b.c),true)}}}for(f=new Anb(a.f);f.a<f.c.c.length;){e=RD(ynb(f),132);if(!d||e.c==(fTc(),dTc)){h=e.a;if(h.g<0&&e.d>0){QSc(h,h.i-e.d);e.c==(fTc(),dTc)&&OSc(h,h.b-e.d);h.i<=0&&h.d>0&&(Pub(c,h,c.c.b,c.c),true)}}}} +function drd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n;yob();_mb(a,new Mrd);g=gv(a);n=new bnb;m=new bnb;h=null;i=0;while(g.b!=0){f=RD(g.b==0?null:(sFb(g.b!=0),Wub(g,g.a.a)),163);if(!h||urd(h)*trd(h)/2<urd(f)*trd(f)){h=f;ZEb(n.c,f)}else{i+=urd(f)*trd(f);ZEb(m.c,f);if(m.c.length>1&&(i>urd(h)*trd(h)/2||g.b==0)){l=new zrd(m);k=urd(h)/trd(h);j=ird(l,b,new z3b,c,d,e,k);$id(hjd(l.e),j);h=l;ZEb(n.c,l);i=0;m.c.length=0}}}Tmb(n,m);return n} +function hib(a,b,c,d,e){gib();var f,g,h,i,j,k,l;vFb(a,'src');vFb(c,'dest');l=rb(a);i=rb(c);qFb((l.i&4)!=0,'srcType is not an array');qFb((i.i&4)!=0,'destType is not an array');k=l.c;g=i.c;qFb((k.i&1)!=0?k==g:(g.i&1)==0,"Array types don't match");iib(a,b,c,d,e);if((k.i&1)==0&&l!=i){j=SD(a);f=SD(c);if(dE(a)===dE(c)&&b<d){b+=e;for(h=d+e;h-->d;){bD(f,h,j[--b])}}else{for(h=d+e;d<h;){bD(f,d++,j[b++])}}}else{VEb(a,b,c,d,e,true)}} +function crd(a,b){var c,d,e,f,g,h,i,j,k;b.Ug('Box layout',2);e=Mfb(UD(Gxd(a,(hkd(),gkd))));f=RD(Gxd(a,dkd),107);c=Heb(TD(Gxd(a,$jd)));d=Heb(TD(Gxd(a,_jd)));switch(RD(Gxd(a,Yjd),320).g){case 0:g=(k=new dnb((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a)),yob(),_mb(k,new prd(d)),k);h=vsd(a);i=UD(Gxd(a,Xjd));(i==null||(uFb(i),i)<=0)&&(i=1.3);j=grd(g,e,f,h.a,h.b,c,(uFb(i),i));Esd(a,j.a,j.b,false,true);break;default:hrd(a,e,f,c);}b.Vg()} +function uUc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o;m=tUc(a,c);for(i=0;i<b;i++){Ikb(e,c);n=new bnb;o=(sFb(d.b<d.d.gc()),RD(d.d.Xb(d.c=d.b++),418));for(k=m+i;k<a.b;k++){h=o;o=(sFb(d.b<d.d.gc()),RD(d.d.Xb(d.c=d.b++),418));Rmb(n,new AUc(h,o,c))}for(l=m+i;l<a.b;l++){sFb(d.b>0);d.a.Xb(d.c=--d.b);l>m+i&&Ckb(d)}for(g=new Anb(n);g.a<g.c.c.length;){f=RD(ynb(g),418);Ikb(d,f)}if(i<b-1){for(j=m+i;j<a.b;j++){sFb(d.b>0);d.a.Xb(d.c=--d.b)}}}} +function gte(){Vse();var a,b,c,d,e,f;if(Fse)return Fse;a=(++Use,new xte(4));ute(a,hte(WLe,true));wte(a,hte('M',true));wte(a,hte('C',true));f=(++Use,new xte(4));for(d=0;d<11;d++){rte(f,d,d)}b=(++Use,new xte(4));ute(b,hte('M',true));rte(b,4448,4607);rte(b,65438,65439);e=(++Use,new iue(2));hue(e,a);hue(e,Ese);c=(++Use,new iue(2));c.Jm($se(f,hte('L',true)));c.Jm(b);c=(++Use,new Kte(3,c));c=(++Use,new Qte(e,c));Fse=c;return Fse} +function vhb(a,b){var c,d,e,f,g,h,i,j;c=new RegExp(b,'g');i=$C(qJ,Nve,2,0,6,1);d=0;j=a;f=null;while(true){h=c.exec(j);if(h==null||j==''){i[d]=j;break}else{g=h.index;i[d]=(AFb(0,g,j.length),j.substr(0,g));j=zhb(j,g+h[0].length,j.length);c.lastIndex=0;if(f==j){i[d]=(AFb(0,1,j.length),j.substr(0,1));j=(BFb(1,j.length+1),j.substr(1))}f=j;++d}}if(a.length>0){e=i.length;while(e>0&&i[e-1]==''){--e}e<i.length&&(i.length=e)}return i} +function h_c(){h_c=geb;U$c=new A3b(20);T$c=new mGd((umd(),tld),U$c);_$c=new mGd(fmd,20);$$c=new mGd(_ld,3);E$c=new mGd(Dkd,Yze);X$c=new mGd(Rld,sgb(1));Z$c=new mGd(Vld,(Geb(),true));G$c=Mkd;I$c=(Cmd(),Amd);H$c=new mGd(Nkd,I$c);L$c=ald;M$c=bld;O$c=kld;P$c=mld;Q$c=nld;R$c=pld;N$c=ild;S$c=sld;V$c=Lld;g_c=(B$c(),z$c);Y$c=w$c;c_c=mmd;e_c=qmd;b_c=lmd;a_c=kmd;d_c=(mqd(),jqd);new mGd(nmd,d_c);W$c=v$c;K$c=t$c;f_c=y$c;F$c=r$c;J$c=s$c} +function bgd(a){var b,c;b=WD(Gxd(a,(umd(),Akd)));if(cgd(b,a)){return}if(!Hxd(a,Tld)&&((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a).i!=0||Heb(TD(Gxd(a,$kd))))){if(b==null||Dhb(b).length==0){if(!cgd(sxe,a)){c=Zhb(Zhb(new dib('Unable to load default layout algorithm '),sxe),' for unconfigured node ');Csd(a,c);throw Adb(new Jed(c.a))}}else{c=Zhb(Zhb(new dib("Layout algorithm '"),b),"' not found for ");Csd(a,c);throw Adb(new Jed(c.a))}}} +function $Kb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;c=a.i;b=a.n;if(a.b==0){n=c.c+b.b;m=c.b-b.b-b.c;for(g=a.a,i=0,k=g.length;i<k;++i){e=g[i];dKb(e,n,m)}}else{d=bLb(a,false);dKb(a.a[0],c.c+b.b,d[0]);dKb(a.a[2],c.c+c.b-b.c-d[2],d[2]);l=c.b-b.b-b.c;if(d[0]>0){l-=d[0]+a.c;d[0]+=a.c}d[2]>0&&(l-=d[2]+a.c);d[1]=$wnd.Math.max(d[1],l);dKb(a.a[1],c.c+b.b+d[0]-(d[1]-l)/2,d[1])}for(f=a.a,h=0,j=f.length;h<j;++h){e=f[h];ZD(e,336)&&RD(e,336).lf()}} +function iRc(a){var b,c,d,e,f,g,h,i,j,k,l;l=new hRc;l.d=0;for(g=new Anb(a.b);g.a<g.c.c.length;){f=RD(ynb(g),30);l.d+=f.a.c.length}d=0;e=0;l.a=$C(kE,Pwe,28,a.b.c.length,15,1);j=0;k=0;l.e=$C(kE,Pwe,28,l.d,15,1);for(c=new Anb(a.b);c.a<c.c.c.length;){b=RD(ynb(c),30);b.p=d++;l.a[b.p]=e++;k=0;for(i=new Anb(b.a);i.a<i.c.c.length;){h=RD(ynb(i),10);h.p=j++;l.e[h.p]=k++}}l.c=new mRc(l);l.b=ev(l.d);jRc(l,a);l.f=ev(l.d);kRc(l,a);return l} +function M9c(a,b){var c,d,e,f;f=RD(Vmb(a.n,a.n.c.length-1),209).d;a.p=$wnd.Math.min(a.p,b.g);a.r=$wnd.Math.max(a.r,f);a.g=$wnd.Math.max(a.g,b.g+(a.b.c.length==1?0:a.i));a.o=$wnd.Math.min(a.o,b.f);a.e+=b.f+(a.b.c.length==1?0:a.i);a.f=$wnd.Math.max(a.f,b.f);e=a.n.c.length>0?(a.n.c.length-1)*a.i:0;for(d=new Anb(a.n);d.a<d.c.c.length;){c=RD(ynb(d),209);e+=c.a}a.d=e;a.a=a.e/a.b.c.length-a.i*((a.b.c.length-1)/a.b.c.length);Ead(a.j)} +function CTb(a,b){var c,d,e,f,g,h,i,j,k,l;k=TD(mQb(b,(yVb(),pVb)));if(k==null||(uFb(k),k)){l=$C(xdb,Hye,28,b.e.c.length,16,1);g=yTb(b);e=new Yub;for(j=new Anb(b.e);j.a<j.c.c.length;){h=RD(ynb(j),153);c=zTb(a,h,null,null,l,g);if(c){kQb(c,b);Pub(e,c,e.c.b,e.c)}}if(e.b>1){for(d=Sub(e,0);d.b!=d.d.c;){c=RD(evb(d),235);f=0;for(i=new Anb(c.e);i.a<i.c.c.length;){h=RD(ynb(i),153);h.a=f++}}}return e}return dv(cD(WC(tP,1),Jze,235,0,[b]))} +function rYd(a){var b,c,d,e,f,g,h;if(!a.g){h=new Z$d;b=iYd;g=b.a.zc(a,b);if(g==null){for(d=new dMd(zYd(a));d.e!=d.i.gc();){c=RD(bMd(d),29);YGd(h,rYd(c))}b.a.Bc(a)!=null;b.a.gc()==0&&undefined}e=h.i;for(f=(!a.s&&(a.s=new C5d(y7,a,21,17)),new dMd(a.s));f.e!=f.i.gc();++e){BWd(RD(bMd(f),462),e)}YGd(h,(!a.s&&(a.s=new C5d(y7,a,21,17)),a.s));VHd(h);a.g=new R$d(a,h);a.i=RD(h.g,254);a.i==null&&(a.i=kYd);a.p=null;yYd(a).b&=-5}return a.g} +function yee(a,b){var c,d,e,f,g,h,i,j,k;c=b.qi(a.a);if(c){i=WD($Nd((!c.b&&(c.b=new SVd((JTd(),FTd),C8,c)),c.b),'memberTypes'));if(i!=null){j=new bnb;for(f=vhb(i,'\\w'),g=0,h=f.length;g<h;++g){e=f[g];d=e.lastIndexOf('#');k=d==-1?Wee(a,b.jk(),e):d==0?Vee(a,null,(BFb(1,e.length+1),e.substr(1))):Vee(a,(AFb(0,d,e.length),e.substr(0,d)),(BFb(d+1,e.length+1),e.substr(d+1)));ZD(k,156)&&Rmb(j,RD(k,156))}return j}}return yob(),yob(),vob} +function _Kb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;d=a.i;c=a.n;if(a.b==0){b=aLb(a,false);eKb(a.a[0],d.d+c.d,b[0]);eKb(a.a[2],d.d+d.a-c.a-b[2],b[2]);m=d.a-c.d-c.a;l=m;if(b[0]>0){b[0]+=a.c;l-=b[0]}b[2]>0&&(l-=b[2]+a.c);b[1]=$wnd.Math.max(b[1],l);eKb(a.a[1],d.d+c.d+b[0]-(b[1]-l)/2,b[1])}else{o=d.d+c.d;n=d.a-c.d-c.a;for(g=a.a,i=0,k=g.length;i<k;++i){e=g[i];eKb(e,o,n)}}for(f=a.a,h=0,j=f.length;h<j;++h){e=f[h];ZD(e,336)&&RD(e,336).mf()}} +function Erc(a){var b,c,d,e,f,g,h,i,j,k;k=$C(kE,Pwe,28,a.b.c.length+1,15,1);j=new _sb;d=0;for(f=new Anb(a.b);f.a<f.c.c.length;){e=RD(ynb(f),30);k[d++]=j.a.gc();for(i=new Anb(e.a);i.a<i.c.c.length;){g=RD(ynb(i),10);for(c=new is(Mr(a3b(g).a.Kc(),new ir));gs(c);){b=RD(hs(c),18);j.a.zc(b,j)}}for(h=new Anb(e.a);h.a<h.c.c.length;){g=RD(ynb(h),10);for(c=new is(Mr(Z2b(g).a.Kc(),new ir));gs(c);){b=RD(hs(c),18);j.a.Bc(b)!=null}}}return k} +function dge(a,b,c,d){var e,f,g,h,i;i=pke(a.e.Dh(),b);e=RD(a.g,124);nke();if(RD(b,69).xk()){for(g=0;g<a.i;++g){f=e[g];if(i.am(f.Lk())&&pb(f,c)){return true}}}else if(c!=null){for(h=0;h<a.i;++h){f=e[h];if(i.am(f.Lk())&&pb(c,f.md())){return true}}if(d){for(g=0;g<a.i;++g){f=e[g];if(i.am(f.Lk())&&dE(c)===dE(Age(a,RD(f.md(),58)))){return true}}}}else{for(g=0;g<a.i;++g){f=e[g];if(i.am(f.Lk())&&f.md()==null){return false}}}return false} +function wee(a,b){var c,d,e,f,g,h;c=b.qi(a.a);if(c){h=WD($Nd((!c.b&&(c.b=new SVd((JTd(),FTd),C8,c)),c.b),FIe));if(h!=null){e=thb(h,Fhb(35));d=b.qk();if(e==-1){g=Uee(a,BXd(d));f=h}else if(e==0){g=null;f=(BFb(1,h.length+1),h.substr(1))}else{g=(AFb(0,e,h.length),h.substr(0,e));f=(BFb(e+1,h.length+1),h.substr(e+1))}switch(yfe(Qee(a,b))){case 2:case 3:{return Jee(a,d,g,f)}case 0:case 4:case 5:case 6:{return Mee(a,d,g,f)}}}}return null} +function FQb(a,b,c,d){var e,f,g,h;h=c;for(g=new Anb(b.a);g.a<g.c.c.length;){f=RD(ynb(g),225);e=RD(f.b,68);if($y(a.b.c,e.b.c+e.b.b)<=0&&$y(e.b.c,a.b.c+a.b.b)<=0&&$y(a.b.d,e.b.d+e.b.a)<=0&&$y(e.b.d,a.b.d+a.b.a)<=0){if($y(e.b.c,a.b.c+a.b.b)==0&&d.a<0||$y(e.b.c+e.b.b,a.b.c)==0&&d.a>0||$y(e.b.d,a.b.d+a.b.a)==0&&d.b<0||$y(e.b.d+e.b.a,a.b.d)==0&&d.b>0){h=0;break}}else{h=$wnd.Math.min(h,PQb(a,e,d))}h=$wnd.Math.min(h,FQb(a,f,h,d))}return h} +function lsd(a,b){var c,d,e,f,g,h,i;if(a.b<2){throw Adb(new agb('The vector chain must contain at least a source and a target point.'))}e=(sFb(a.b!=0),RD(a.a.a.c,8));Nzd(b,e.a,e.b);i=new mMd((!b.a&&(b.a=new XZd(D4,b,5)),b.a));g=Sub(a,1);while(g.a<a.b-1){h=RD(evb(g),8);if(i.e!=i.i.gc()){c=RD(bMd(i),377)}else{c=(bvd(),d=new Xxd,d);kMd(i,c)}Uxd(c,h.a,h.b)}while(i.e!=i.i.gc()){bMd(i);cMd(i)}f=(sFb(a.b!=0),RD(a.c.b.c,8));Gzd(b,f.a,f.b)} +function Ege(a,b,c,d){var e,f,g,h,i,j;j=pke(a.e.Dh(),b);g=RD(a.g,124);if(qke(a.e,b)){if(b.Si()){f=kge(a,b,d,ZD(b,102)&&(RD(b,19).Bb&txe)!=0);if(f>=0&&f!=c){throw Adb(new agb(LIe))}}e=0;for(i=0;i<a.i;++i){h=g[i];if(j.am(h.Lk())){if(e==c){return RD(eHd(a,i,(nke(),RD(b,69).xk()?RD(d,76):oke(b,d))),76)}++e}}throw Adb(new veb(HJe+c+NIe+e))}else{for(i=0;i<a.i;++i){h=g[i];if(j.am(h.Lk())){return nke(),RD(b,69).xk()?h:h.md()}}return null}} +function Epc(a,b){var c,d,e,f,g,h,i,j,k;c=0;for(e=new Anb((tFb(0,a.c.length),RD(a.c[0],105)).g.b.j);e.a<e.c.c.length;){d=RD(ynb(e),12);d.p=c++}b==(qpd(),Yod)?_mb(a,new Mpc):_mb(a,new Qpc);h=0;k=a.c.length-1;while(h<k){g=(tFb(h,a.c.length),RD(a.c[h],105));j=(tFb(k,a.c.length),RD(a.c[k],105));f=b==Yod?g.c:g.a;i=b==Yod?j.a:j.c;Gpc(g,b,(enc(),cnc),f);Gpc(j,b,bnc,i);++h;--k}h==k&&Gpc((tFb(h,a.c.length),RD(a.c[h],105)),b,(enc(),anc),null)} +function lJc(a,b,c,d){var e,f,g,h,i,j;g=new zJc(a,b,c);i=new Jkb(d,0);e=false;while(i.b<i.d.gc()){h=(sFb(i.b<i.d.gc()),RD(i.d.Xb(i.c=i.b++),239));if(h==b||h==c){Ckb(i)}else if(!e&&Kfb(pJc(h.g,h.d[0]).a)>Kfb(pJc(g.g,g.d[0]).a)){sFb(i.b>0);i.a.Xb(i.c=--i.b);Ikb(i,g);e=true}else if(!!h.e&&h.e.gc()>0){f=(!h.e&&(h.e=new bnb),h.e).Mc(b);j=(!h.e&&(h.e=new bnb),h.e).Mc(c);if(f||j){(!h.e&&(h.e=new bnb),h.e).Fc(g);++g.c}}}e||(ZEb(d.c,g),true)} +function H3c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;l=a.a.i+a.a.g/2;m=a.a.i+a.a.g/2;o=b.i+b.g/2;q=b.j+b.f/2;h=new rjd(o,q);j=RD(Gxd(b,(umd(),Qld)),8);j.a=j.a+l;j.b=j.b+m;f=(h.b-j.b)/(h.a-j.a);d=h.b-f*h.a;p=c.i+c.g/2;r=c.j+c.f/2;i=new rjd(p,r);k=RD(Gxd(c,Qld),8);k.a=k.a+l;k.b=k.b+m;g=(i.b-k.b)/(i.a-k.a);e=i.b-g*i.a;n=(d-e)/(g-f);if(j.a<n&&h.a<n||n<j.a&&n<h.a){return false}else if(k.a<n&&i.a<n||n<k.a&&n<i.a){return false}return true} +function GDd(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;m=RD(Wjb(a.c,b),190);if(!m){throw Adb(new CDd('Edge did not exist in input.'))}j=uDd(m);f=cve((!b.a&&(b.a=new C5d(F4,b,6,6)),b.a));h=!f;if(h){n=new MB;c=new pFd(a,j,n);ave((!b.a&&(b.a=new C5d(F4,b,6,6)),b.a),c);sC(m,mIe,n)}e=Hxd(b,(umd(),cld));if(e){k=RD(Gxd(b,cld),75);g=!k||bve(k);i=!g;if(i){l=new MB;d=new xFd(l);xgb(k,d);sC(m,'junctionPoints',l)}}sDd(m,'container',kzd(b).k);return null} +function fZc(a,b,c,d){var e,f,g,h,i,j;if(!gr(b)){j=c.eh((ZD(b,16)?RD(b,16).gc():Kr(b.Kc()))/a.a|0);j.Ug(OEe,1);i=new iZc;h=0;if(d==(Cmd(),ymd)||d==zmd){for(g=b.Kc();g.Ob();){e=RD(g.Pb(),40);i=Al(cD(WC(cJ,1),rve,20,0,[i,new dXc(e)]));h<e.f.a&&(h=e.f.a)}}else{for(g=b.Kc();g.Ob();){e=RD(g.Pb(),40);i=Al(cD(WC(cJ,1),rve,20,0,[i,new dXc(e)]));h<e.f.b&&(h=e.f.b)}}for(f=b.Kc();f.Ob();){e=RD(f.Pb(),40);pQb(e,(q$c(),d$c),h)}j.Vg();fZc(a,i,c,d)}} +function XFb(a,b,c){var d,e,f,g,h,i,j,k;this.a=a;this.b=b;this.c=c;this.e=dv(cD(WC($M,1),rve,177,0,[new TFb(a,b),new TFb(b,c),new TFb(c,a)]));this.f=dv(cD(WC(l3,1),Nve,8,0,[a,b,c]));this.d=(d=ojd(ajd(this.b),this.a),e=ojd(ajd(this.c),this.a),f=ojd(ajd(this.c),this.b),g=d.a*(this.a.a+this.b.a)+d.b*(this.a.b+this.b.b),h=e.a*(this.a.a+this.c.a)+e.b*(this.a.b+this.c.b),i=2*(d.a*f.b-d.b*f.a),j=(e.b*g-d.b*h)/i,k=(d.a*h-e.a*g)/i,new rjd(j,k))} +function X0b(a,b){var c,d,e,f,g,h;f=a.c;g=a.d;Y0b(a,null);Z0b(a,null);b&&Heb(TD(mQb(g,(Ywc(),mwc))))?Y0b(a,q2b(g.i,(BEc(),zEc),(qpd(),Xod))):Y0b(a,g);b&&Heb(TD(mQb(f,(Ywc(),Gwc))))?Z0b(a,q2b(f.i,(BEc(),yEc),(qpd(),ppd))):Z0b(a,f);for(d=new Anb(a.b);d.a<d.c.c.length;){c=RD(ynb(d),72);e=RD(mQb(c,(yCc(),wAc)),278);e==(Omd(),Nmd)?pQb(c,wAc,Mmd):e==Mmd&&pQb(c,wAc,Nmd)}h=Heb(TD(mQb(a,(Ywc(),Nwc))));pQb(a,Nwc,(Geb(),h?false:true));a.a=Ijd(a.a)} +function lWc(a,b){var c,d,e,f,g;c=jWc(RD(mQb(b,(h_c(),H$c)),88));if(a.b.b==0){return null}g=RD(zDb(GDb(new SDb(null,new Swb(a.b,16)),new UWc),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);f=RD(zDb(CDb(new SDb(null,new Swb(b.b,16)),new CWc(g)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),15);e=UD(Lvb(JDb(GDb(f.Oc(),new EWc(c)),(urb(),urb(),srb))));d=RD(Lvb(DDb(CDb(f.Oc(),new GWc(c,e)))),40);return d} +function vOc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;c=eJb(new gJb,a.f);j=a.i[b.c.i.p];n=a.i[b.d.i.p];i=b.c;m=b.d;h=i.a.b;l=m.a.b;j.b||(h+=i.n.b);n.b||(l+=m.n.b);k=eE($wnd.Math.max(0,h-l));g=eE($wnd.Math.max(0,l-h));o=(p=$wnd.Math.max(1,RD(mQb(b,(yCc(),MBc)),17).a),q=hOc(b.c.i.k,b.d.i.k),p*q);e=rIb(uIb(tIb(sIb(vIb(new wIb,o),g),c),RD(Wjb(a.k,b.c),125)));f=rIb(uIb(tIb(sIb(vIb(new wIb,o),k),c),RD(Wjb(a.k,b.d),125)));d=new QOc(e,f);a.c[b.p]=d} +function MTb(a,b,c){var d,e,f,g,h,i;d=0;for(f=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));f.e!=f.i.gc();){e=RD(bMd(f),27);g='';(!e.n&&(e.n=new C5d(I4,e,1,7)),e.n).i==0||(g=RD(QHd((!e.n&&(e.n=new C5d(I4,e,1,7)),e.n),0),135).a);h=new lUb(g);kQb(h,e);pQb(h,(JVb(),HVb),e);h.a=d++;h.d.a=e.i+e.g/2;h.d.b=e.j+e.f/2;h.e.a=$wnd.Math.max(e.g,1);h.e.b=$wnd.Math.max(e.f,1);Rmb(b.e,h);rtb(c.f,e,h);i=RD(Gxd(e,(yVb(),jVb)),101);i==(Bod(),Aod)&&(i=zod)}} +function bec(a,b){var c,d,e,f,g,h,i;b.Ug('Layer constraint postprocessing',1);i=a.b;if(i.c.length!=0){d=(tFb(0,i.c.length),RD(i.c[0],30));g=RD(Vmb(i,i.c.length-1),30);c=new R4b(a);f=new R4b(a);_dc(a,d,g,c,f);c.a.c.length==0||(wFb(0,i.c.length),XEb(i.c,0,c));f.a.c.length==0||(ZEb(i.c,f),true)}if(nQb(a,(Ywc(),lwc))){e=new R4b(a);h=new R4b(a);cec(a,e,h);e.a.c.length==0||(wFb(0,i.c.length),XEb(i.c,0,e));h.a.c.length==0||(ZEb(i.c,h),true)}b.Vg()} +function zte(a){var b,c,d;switch(a){case 91:case 93:case 45:case 94:case 44:case 92:d='\\'+String.fromCharCode(a&Bwe);break;case 12:d='\\f';break;case 10:d='\\n';break;case 13:d='\\r';break;case 9:d='\\t';break;case 27:d='\\e';break;default:if(a<32){c=(b=a>>>0,'0'+b.toString(16));d='\\x'+zhb(c,c.length-2,c.length)}else if(a>=txe){c=(b=a>>>0,'0'+b.toString(16));d='\\v'+zhb(c,c.length-6,c.length)}else d=''+String.fromCharCode(a&Bwe);}return d} +function Ugc(a){var b,c,d;if(Dod(RD(mQb(a,(yCc(),BBc)),101))){for(c=new Anb(a.j);c.a<c.c.c.length;){b=RD(ynb(c),12);b.j==(qpd(),opd)&&(d=RD(mQb(b,(Ywc(),Iwc)),10),d?Q3b(b,RD(mQb(d,hwc),64)):b.e.c.length-b.g.c.length<0?Q3b(b,Xod):Q3b(b,ppd))}}else{for(c=new Anb(a.j);c.a<c.c.c.length;){b=RD(ynb(c),12);d=RD(mQb(b,(Ywc(),Iwc)),10);d?Q3b(b,RD(mQb(d,hwc),64)):b.e.c.length-b.g.c.length<0?Q3b(b,(qpd(),Xod)):Q3b(b,(qpd(),ppd))}pQb(a,BBc,(Bod(),yod))}} +function wUc(a){var b,c,d,e,f,g;this.e=new bnb;this.a=new bnb;for(c=a.b-1;c<3;c++){hu(a,0,RD(ju(a,0),8))}if(a.b<4){throw Adb(new agb('At (least dimension + 1) control points are necessary!'))}else{this.b=3;this.d=true;this.c=false;rUc(this,a.b+this.b-1);g=new bnb;f=new Anb(this.e);for(b=0;b<this.b-1;b++){Rmb(g,UD(ynb(f)))}for(e=Sub(a,0);e.b!=e.d.c;){d=RD(evb(e),8);Rmb(g,UD(ynb(f)));Rmb(this.a,new BUc(d,g));tFb(0,g.c.length);g.c.splice(0,1)}}} +function Sdc(a,b){var c,d,e,f,g,h,i,j,k;for(f=new Anb(a.b);f.a<f.c.c.length;){e=RD(ynb(f),30);for(h=new Anb(e.a);h.a<h.c.c.length;){g=RD(ynb(h),10);if(g.k==(r3b(),n3b)){i=(j=RD(hs(new is(Mr(Z2b(g).a.Kc(),new ir))),18),k=RD(hs(new is(Mr(a3b(g).a.Kc(),new ir))),18),!Heb(TD(mQb(j,(Ywc(),Nwc))))||!Heb(TD(mQb(k,Nwc))))?b:Qnd(b);Qdc(g,i)}for(d=new is(Mr(a3b(g).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);i=Heb(TD(mQb(c,(Ywc(),Nwc))))?Qnd(b):b;Pdc(c,i)}}}} +function V8c(a,b,c,d,e){var f,g,h;if(c.f>=b.o&&c.f<=b.f||b.a*0.5<=c.f&&b.a*1.5>=c.f){g=RD(Vmb(b.n,b.n.c.length-1),209);if(g.e+g.d+c.g+e<=d&&(f=RD(Vmb(b.n,b.n.c.length-1),209),f.f-a.f+c.f<=a.b||a.a.c.length==1)){K9c(b,c);return true}else if(b.s+c.g<=d&&(b.t+b.d+c.f+e<=a.b||a.a.c.length==1)){Rmb(b.b,c);h=RD(Vmb(b.n,b.n.c.length-1),209);Rmb(b.n,new _9c(b.s,h.f+h.a+b.i,b.i));W9c(RD(Vmb(b.n,b.n.c.length-1),209),c);M9c(b,c);return true}}return false} +function xLd(a,b,c){var d,e,f,g;if(a.Pj()){e=null;f=a.Qj();d=a.Ij(1,g=UHd(a,b,c),c,b,f);if(a.Mj()&&!(a.Yi()&&g!=null?pb(g,c):dE(g)===dE(c))){g!=null&&(e=a.Oj(g,e));e=a.Nj(c,e);a.Tj()&&(e=a.Wj(g,c,e));if(!e){a.Jj(d)}else{e.nj(d);e.oj()}}else{a.Tj()&&(e=a.Wj(g,c,e));if(!e){a.Jj(d)}else{e.nj(d);e.oj()}}return g}else{g=UHd(a,b,c);if(a.Mj()&&!(a.Yi()&&g!=null?pb(g,c):dE(g)===dE(c))){e=null;g!=null&&(e=a.Oj(g,null));e=a.Nj(c,e);!!e&&e.oj()}return g}} +function Rsc(a,b){var c,d,e,f,g;b.Ug('Path-Like Graph Wrapping',1);if(a.b.c.length==0){b.Vg();return}e=new ysc(a);g=(e.i==null&&(e.i=tsc(e,new Asc)),Kfb(e.i)*e.f);c=g/(e.i==null&&(e.i=tsc(e,new Asc)),Kfb(e.i));if(e.b>c){b.Vg();return}switch(RD(mQb(a,(yCc(),rCc)),351).g){case 2:f=new Ksc;break;case 0:f=new zrc;break;default:f=new Nsc;}d=f.og(a,e);if(!f.pg()){switch(RD(mQb(a,xCc),352).g){case 2:d=Wsc(e,d);break;case 1:d=Usc(e,d);}}Qsc(a,e,d);b.Vg()} +function mB(a,b){var c,d,e,f,g,h,i,j;b%=24;if(a.q.getHours()!=b){d=new $wnd.Date(a.q.getTime());d.setDate(d.getDate()+1);h=a.q.getTimezoneOffset()-d.getTimezoneOffset();if(h>0){i=h/60|0;j=h%60;e=a.q.getDate();c=a.q.getHours();c+i>=24&&++e;f=new $wnd.Date(a.q.getFullYear(),a.q.getMonth(),e,b+i,a.q.getMinutes()+j,a.q.getSeconds(),a.q.getMilliseconds());a.q.setTime(f.getTime())}}g=a.q.getTime();a.q.setTime(g+3600000);a.q.getHours()!=b&&a.q.setTime(g)} +function kKc(a,b){var c,d,e,f;Nwb(a.d,a.e);a.c.a.$b();if(Kfb(UD(mQb(b.j,(yCc(),Zzc))))!=0||Kfb(UD(mQb(b.j,Zzc)))!=0){c=Hze;dE(mQb(b.j,cAc))!==dE((kEc(),hEc))&&pQb(b.j,(Ywc(),jwc),(Geb(),true));f=RD(mQb(b.j,gCc),17).a;for(e=0;e<f;e++){d=uKc(a,b);if(d<c){c=d;xKc(a);if(c==0){break}}}}else{c=lve;dE(mQb(b.j,cAc))!==dE((kEc(),hEc))&&pQb(b.j,(Ywc(),jwc),(Geb(),true));f=RD(mQb(b.j,gCc),17).a;for(e=0;e<f;e++){d=vKc(a,b);if(d<c){c=d;xKc(a);if(c==0){break}}}}} +function Vsc(a,b){var c,d,e,f,g,h,i,j;g=new bnb;h=0;c=0;i=0;while(h<b.c.length-1&&c<a.gc()){d=RD(a.Xb(c),17).a+i;while((tFb(h+1,b.c.length),RD(b.c[h+1],17)).a<d){++h}j=0;f=d-(tFb(h,b.c.length),RD(b.c[h],17)).a;e=(tFb(h+1,b.c.length),RD(b.c[h+1],17)).a-d;f>e&&++j;Rmb(g,(tFb(h+j,b.c.length),RD(b.c[h+j],17)));i+=(tFb(h+j,b.c.length),RD(b.c[h+j],17)).a-d;++c;while(c<a.gc()&&RD(a.Xb(c),17).a+i<=(tFb(h+j,b.c.length),RD(b.c[h+j],17)).a){++c}h+=1+j}return g} +function VGc(a,b){var c,d,e,f,g;for(g=new is(Mr(Z2b(b).a.Kc(),new ir));gs(g);){f=RD(hs(g),18);if(a.f.b==0){e=f.c.i.k==(r3b(),p3b)&&!!f.c.i.c&&f.c.i.c.p==a.c;if(gs(new is(Mr(Z2b(f.c.i).a.Kc(),new ir)))){c=RD(hs(new is(Mr(Z2b(f.c.i).a.Kc(),new ir))),18).c.i.c;d=f.c.i.k==n3b&&!!c&&c.p==a.c}else{d=false}}else{e=f.c.i.k==(r3b(),p3b)&&f.c.i.p==a.c;d=f.c.i.k==n3b&&RD(hs(new is(Mr(Z2b(f.c.i).a.Kc(),new ir))),18).c.i.p==a.c}if(e||d){return true}}return false} +function DHc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;m=new bnb;r=Xx(d);q=b*a.a;l=0;o=0;f=new _sb;g=new _sb;h=new bnb;s=0;t=0;n=0;p=0;j=0;k=0;while(r.a.gc()!=0){i=HHc(r,e,g);if(i){r.a.Bc(i)!=null;ZEb(h.c,i);f.a.zc(i,f);o=a.f[i.p];s+=a.e[i.p]-o*a.b;l=a.c[i.p];t+=l*a.b;k+=o*a.b;p+=a.e[i.p]}if(!i||r.a.gc()==0||s>=q&&a.e[i.p]>o*a.b||t>=c*q){ZEb(m.c,h);h=new bnb;ye(g,f);f.a.$b();j-=k;n=$wnd.Math.max(n,j*a.b+p);j+=t;s=t;t=0;k=0;p=0}}return new Ptd(n,m)} +function pYd(a){var b,c,d,e,f,g,h;if(!a.d){h=new v_d;b=iYd;f=b.a.zc(a,b);if(f==null){for(d=new dMd(zYd(a));d.e!=d.i.gc();){c=RD(bMd(d),29);YGd(h,pYd(c))}b.a.Bc(a)!=null;b.a.gc()==0&&undefined}g=h.i;for(e=(!a.q&&(a.q=new C5d(s7,a,11,10)),new dMd(a.q));e.e!=e.i.gc();++g){RD(bMd(e),411)}YGd(h,(!a.q&&(a.q=new C5d(s7,a,11,10)),a.q));VHd(h);a.d=new N$d((RD(QHd(xYd((lTd(),kTd).o),9),19),h.i),h.g);a.e=RD(h.g,688);a.e==null&&(a.e=jYd);yYd(a).b&=-17}return a.d} +function kge(a,b,c,d){var e,f,g,h,i,j;j=pke(a.e.Dh(),b);i=0;e=RD(a.g,124);nke();if(RD(b,69).xk()){for(g=0;g<a.i;++g){f=e[g];if(j.am(f.Lk())){if(pb(f,c)){return i}++i}}}else if(c!=null){for(h=0;h<a.i;++h){f=e[h];if(j.am(f.Lk())){if(pb(c,f.md())){return i}++i}}if(d){i=0;for(g=0;g<a.i;++g){f=e[g];if(j.am(f.Lk())){if(dE(c)===dE(Age(a,RD(f.md(),58)))){return i}++i}}}}else{for(g=0;g<a.i;++g){f=e[g];if(j.am(f.Lk())){if(f.md()==null){return i}++i}}}return -1} +function Xje(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p;if(c.Xh(b)){k=(n=b,!n?null:RD(d,54).gi(n));if(k){p=c.Nh(b,a.a);o=b.t;if(o>1||o==-1){l=RD(p,71);m=RD(k,71);if(l.dc()){m.$b()}else{g=!!Z5d(b);f=0;for(h=a.a?l.Kc():l.Ii();h.Ob();){j=RD(h.Pb(),58);e=RD(cub(a,j),58);if(!e){if(a.b&&!g){m.Gi(f,j);++f}}else{if(g){i=m.dd(e);i==-1?m.Gi(f,e):f!=i&&m.Ui(f,e)}else{m.Gi(f,e)}++f}}}}else{if(p==null){k.Wb(null)}else{e=cub(a,p);e==null?a.b&&!Z5d(b)&&k.Wb(p):k.Wb(e)}}}}} +function V9b(a,b){var c,d,e,f,g,h,i,j;c=new aac;for(e=new is(Mr(Z2b(b).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);if(W0b(d)){continue}h=d.c.i;if(W9b(h,T9b)){j=X9b(a,h,T9b,S9b);if(j==-1){continue}c.b=$wnd.Math.max(c.b,j);!c.a&&(c.a=new bnb);Rmb(c.a,h)}}for(g=new is(Mr(a3b(b).a.Kc(),new ir));gs(g);){f=RD(hs(g),18);if(W0b(f)){continue}i=f.d.i;if(W9b(i,S9b)){j=X9b(a,i,S9b,T9b);if(j==-1){continue}c.d=$wnd.Math.max(c.d,j);!c.c&&(c.c=new bnb);Rmb(c.c,i)}}return c} +function pcc(a,b,c,d){var e,f,g,h,i,j,k;if(c.d.i==b.i){return}e=new j3b(a);h3b(e,(r3b(),o3b));pQb(e,(Ywc(),Awc),c);pQb(e,(yCc(),BBc),(Bod(),wod));ZEb(d.c,e);g=new R3b;P3b(g,e);Q3b(g,(qpd(),ppd));h=new R3b;P3b(h,e);Q3b(h,Xod);k=c.d;Z0b(c,g);f=new a1b;kQb(f,c);pQb(f,RAc,null);Y0b(f,h);Z0b(f,k);j=new Jkb(c.b,0);while(j.b<j.d.gc()){i=(sFb(j.b<j.d.gc()),RD(j.d.Xb(j.c=j.b++),72));if(dE(mQb(i,wAc))===dE((Omd(),Mmd))){pQb(i,dwc,c);Ckb(j);Rmb(f.b,i)}}rcc(e,g,h)} +function occ(a,b,c,d){var e,f,g,h,i,j,k;if(c.c.i==b.i){return}e=new j3b(a);h3b(e,(r3b(),o3b));pQb(e,(Ywc(),Awc),c);pQb(e,(yCc(),BBc),(Bod(),wod));ZEb(d.c,e);g=new R3b;P3b(g,e);Q3b(g,(qpd(),ppd));h=new R3b;P3b(h,e);Q3b(h,Xod);Z0b(c,g);f=new a1b;kQb(f,c);pQb(f,RAc,null);Y0b(f,h);Z0b(f,b);rcc(e,g,h);j=new Jkb(c.b,0);while(j.b<j.d.gc()){i=(sFb(j.b<j.d.gc()),RD(j.d.Xb(j.c=j.b++),72));k=RD(mQb(i,wAc),278);if(k==(Omd(),Mmd)){nQb(i,dwc)||pQb(i,dwc,c);Ckb(j);Rmb(f.b,i)}}} +function Sjb(a){Ljb();var b,c,d,e;b=eE(a);if(a<Kjb.length){return Kjb[b]}else if(a<=50){return Yib((Pib(),Mib),b)}else if(a<=Awe){return Zib(Yib(Jjb[1],b),b)}if(a>1000000){throw Adb(new teb('power of ten too big'))}if(a<=lve){return Zib(Yib(Jjb[1],b),b)}d=Yib(Jjb[1],lve);e=d;c=Hdb(a-lve);b=eE(a%lve);while(Ddb(c,lve)>0){e=Wib(e,d);c=Vdb(c,lve)}e=Wib(e,Yib(Jjb[1],b));e=Zib(e,lve);c=Hdb(a-lve);while(Ddb(c,lve)>0){e=Zib(e,lve);c=Vdb(c,lve)}e=Zib(e,b);return e} +function s9b(a){var b,c,d,e,f,g,h,i,j,k;for(i=new Anb(a.a);i.a<i.c.c.length;){h=RD(ynb(i),10);if(h.k!=(r3b(),m3b)){continue}e=RD(mQb(h,(Ywc(),hwc)),64);if(e==(qpd(),Xod)||e==ppd){for(d=new is(Mr(W2b(h).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);b=c.a;if(b.b==0){continue}j=c.c;if(j.i==h){f=(sFb(b.b!=0),RD(b.a.a.c,8));f.b=xjd(cD(WC(l3,1),Nve,8,0,[j.i.n,j.n,j.a])).b}k=c.d;if(k.i==h){g=(sFb(b.b!=0),RD(b.c.b.c,8));g.b=xjd(cD(WC(l3,1),Nve,8,0,[k.i.n,k.n,k.a])).b}}}}} +function Nlc(a,b,c,d){var e,f,g;this.j=new bnb;this.k=new bnb;this.b=new bnb;this.c=new bnb;this.e=new Tid;this.i=new Ejd;this.f=new cHb;this.d=new bnb;this.g=new bnb;Rmb(this.b,a);Rmb(this.b,b);this.e.c=$wnd.Math.min(a.a,b.a);this.e.d=$wnd.Math.min(a.b,b.b);this.e.b=$wnd.Math.abs(a.a-b.a);this.e.a=$wnd.Math.abs(a.b-b.b);e=RD(mQb(d,(yCc(),RAc)),75);if(e){for(g=Sub(e,0);g.b!=g.d.c;){f=RD(evb(g),8);rGb(f.a,a.a)&&Mub(this.i,f)}}!!c&&Rmb(this.j,c);Rmb(this.k,d)} +function vSc(a,b,c,d){var e,f,g,h,i,j,k;h=-1;for(k=new Anb(a);k.a<k.c.c.length;){j=RD(ynb(k),118);j.g=h--;e=Ydb(mDb(IDb(CDb(new SDb(null,new Swb(j.f,16)),new xSc),new zSc)).d);f=Ydb(mDb(IDb(CDb(new SDb(null,new Swb(j.k,16)),new BSc),new DSc)).d);g=e;i=f;if(!d){g=Ydb(mDb(IDb(new SDb(null,new Swb(j.f,16)),new FSc)).d);i=Ydb(mDb(IDb(new SDb(null,new Swb(j.k,16)),new HSc)).d)}j.d=g;j.a=e;j.i=i;j.b=f;i==0?(Pub(c,j,c.c.b,c.c),true):g==0&&(Pub(b,j,b.c.b,b.c),true)}} +function Qdc(a,b){var c,d,e,f,g,h;if(a.k==(r3b(),n3b)){c=a.k==n3b&&!QDb(CDb(RD(mQb(a,(Ywc(),Mwc)),15).Oc(),new PAb(new x3b))).Bd((xDb(),wDb))?(Pnd(),Nnd):b;pQb(a,(Ywc(),swc),c);if(c!=(Pnd(),Mnd)){d=RD(mQb(a,Awc),18);h=Kfb(UD(mQb(d,(yCc(),FAc))));g=0;if(c==Lnd){g=a.o.b-$wnd.Math.ceil(h/2)}else if(c==Nnd){g=$wnd.Math.ceil(a.o.b-Kfb(UD(mQb(Y2b(a),VBc)))-h)/2;a.o.b-=Kfb(UD(mQb(Y2b(a),VBc)));a.o.b-=h}for(f=new Anb(a.j);f.a<f.c.c.length;){e=RD(ynb(f),12);e.n.b=g}}}} +function XQc(a,b,c){var d,e,f,g,h,i,j,k,l;e=true;for(g=new Anb(a.b);g.a<g.c.c.length;){f=RD(ynb(g),30);j=pxe;k=null;for(i=new Anb(f.a);i.a<i.c.c.length;){h=RD(ynb(i),10);l=Kfb(b.p[h.p])+Kfb(b.d[h.p])-h.d.d;d=Kfb(b.p[h.p])+Kfb(b.d[h.p])+h.o.b+h.d.a;if(l>j&&d>j){k=h;j=Kfb(b.p[h.p])+Kfb(b.d[h.p])+h.o.b+h.d.a}else{e=false;c._g()&&c.bh('bk node placement breaks on '+h+' which should have been after '+k);break}}if(!e){break}}c._g()&&c.bh(b+' is feasible: '+e);return e} +function Dfc(a,b,c,d){var e,f,g,h,i,j,k,l,m;f=new j3b(a);h3b(f,(r3b(),q3b));pQb(f,(yCc(),BBc),(Bod(),wod));e=0;if(b){g=new R3b;pQb(g,(Ywc(),Awc),b);pQb(f,Awc,b.i);Q3b(g,(qpd(),ppd));P3b(g,f);m=s2b(b.e);for(j=m,k=0,l=j.length;k<l;++k){i=j[k];Z0b(i,g)}pQb(b,Iwc,f);++e}if(c){h=new R3b;pQb(f,(Ywc(),Awc),c.i);pQb(h,Awc,c);Q3b(h,(qpd(),Xod));P3b(h,f);m=s2b(c.g);for(j=m,k=0,l=j.length;k<l;++k){i=j[k];Y0b(i,h)}pQb(c,Iwc,f);++e}pQb(f,(Ywc(),$vc),sgb(e));ZEb(d.c,f);return f} +function Bgd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;for(c=(j=(new glb(a.c.b)).a.vc().Kc(),new llb(j));c.a.Ob();){b=(h=RD(c.a.Pb(),44),RD(h.md(),143));e=b.a;e==null&&(e='');d=tgd(a.c,e);!d&&e.length==0&&(d=Fgd(a));!!d&&!ze(d.c,b,false)&&Mub(d.c,b)}for(g=Sub(a.a,0);g.b!=g.d.c;){f=RD(evb(g),487);k=ugd(a.c,f.a);n=ugd(a.c,f.b);!!k&&!!n&&Mub(k.c,new Ptd(n,f.c))}Xub(a.a);for(m=Sub(a.b,0);m.b!=m.d.c;){l=RD(evb(m),487);b=rgd(a.c,l.a);i=ugd(a.c,l.b);!!b&&!!i&&Mfd(b,i,l.c)}Xub(a.b)} +function QId(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;f=new vC(a);g=new IEd;e=(wo(g.g),wo(g.j),akb(g.b),wo(g.d),wo(g.i),akb(g.k),akb(g.c),akb(g.e),n=DEd(g,f,null),AEd(g,f),n);if(b){j=new vC(b);h=RId(j);msd(e,cD(WC(j4,1),rve,536,0,[h]))}m=false;l=false;if(c){j=new vC(c);RIe in j.a&&(m=qC(j,RIe).qe().a);SIe in j.a&&(l=qC(j,SIe).qe().a)}k=Kqd(Mqd(new Oqd,m),l);Eed(new Hed,e,k);RIe in f.a&&sC(f,RIe,null);if(m||l){i=new uC;NId(k,i,m,l);sC(f,RIe,i)}d=new nFd(g);dve(new zId(e),d)} +function FA(a,b,c){var d,e,f,g,h,i,j,k,l;g=new DB;j=cD(WC(kE,1),Pwe,28,15,[0]);e=-1;f=0;d=0;for(i=0;i<a.b.c.length;++i){k=RD(Vmb(a.b,i),443);if(k.b>0){if(e<0&&k.a){e=i;f=j[0];d=0}if(e>=0){h=k.b;if(i==e){h-=d++;if(h==0){return 0}}if(!MA(b,j,k,h,g)){i=e-1;j[0]=f;continue}}else{e=-1;if(!MA(b,j,k,0,g)){return 0}}}else{e=-1;if(ihb(k.c,0)==32){l=j[0];KA(b,j);if(j[0]>l){continue}}else if(xhb(b,k.c,j[0])){j[0]+=k.c.length;continue}return 0}}if(!CB(g,c)){return 0}return j[0]} +function qWb(a,b,c){var d,e,f,g,h,i,j,k,l,m;k=new pwb(new GWb(c));h=$C(xdb,Hye,28,a.f.e.c.length,16,1);Snb(h,h.length);c[b.a]=0;for(j=new Anb(a.f.e);j.a<j.c.c.length;){i=RD(ynb(j),153);i.a!=b.a&&(c[i.a]=lve);zFb(lwb(k,i),Bxe)}while(k.b.c.length!=0){l=RD(mwb(k),153);h[l.a]=true;for(f=ru(new su(a.b,l),0);f.c;){e=RD(Lu(f),290);m=tWb(e,l);if(h[m.a]){continue}nQb(e,(dWb(),TVb))?(g=Kfb(UD(mQb(e,TVb)))):(g=a.c);d=c[l.a]+g;if(d<c[m.a]){c[m.a]=d;nwb(k,m);zFb(lwb(k,m),Bxe)}}}} +function iPb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;g=a.o;d=$C(kE,Pwe,28,g,15,1);e=$C(kE,Pwe,28,g,15,1);c=a.p;b=$C(kE,Pwe,28,c,15,1);f=$C(kE,Pwe,28,c,15,1);for(j=0;j<g;j++){l=0;while(l<c&&!PPb(a,j,l)){++l}d[j]=l}for(k=0;k<g;k++){l=c-1;while(l>=0&&!PPb(a,k,l)){--l}e[k]=l}for(n=0;n<c;n++){h=0;while(h<g&&!PPb(a,h,n)){++h}b[n]=h}for(o=0;o<c;o++){h=g-1;while(h>=0&&!PPb(a,h,o)){--h}f[o]=h}for(i=0;i<g;i++){for(m=0;m<c;m++){i<f[m]&&i>b[m]&&m<e[i]&&m>d[i]&&TPb(a,i,m,false,true)}}} +function hUb(a){var b,c,d,e,f,g,h,i;c=Heb(TD(mQb(a,(yVb(),$Ub))));f=a.a.c.d;h=a.a.d.d;if(c){g=ijd(ojd(new rjd(h.a,h.b),f),0.5);i=ijd(ajd(a.e),0.5);b=ojd($id(new rjd(f.a,f.b),g),i);mjd(a.d,b)}else{e=Kfb(UD(mQb(a.a,qVb)));d=a.d;if(f.a>=h.a){if(f.b>=h.b){d.a=h.a+(f.a-h.a)/2+e;d.b=h.b+(f.b-h.b)/2-e-a.e.b}else{d.a=h.a+(f.a-h.a)/2+e;d.b=f.b+(h.b-f.b)/2+e}}else{if(f.b>=h.b){d.a=f.a+(h.a-f.a)/2+e;d.b=h.b+(f.b-h.b)/2+e}else{d.a=f.a+(h.a-f.a)/2+e;d.b=f.b+(h.b-f.b)/2-e-a.e.b}}}} +function qYd(a){var b,c,d,e,f,g,h,i;if(!a.f){i=new a_d;h=new a_d;b=iYd;g=b.a.zc(a,b);if(g==null){for(f=new dMd(zYd(a));f.e!=f.i.gc();){e=RD(bMd(f),29);YGd(i,qYd(e))}b.a.Bc(a)!=null;b.a.gc()==0&&undefined}for(d=(!a.s&&(a.s=new C5d(y7,a,21,17)),new dMd(a.s));d.e!=d.i.gc();){c=RD(bMd(d),179);ZD(c,102)&&WGd(h,RD(c,19))}VHd(h);a.r=new s_d(a,(RD(QHd(xYd((lTd(),kTd).o),6),19),h.i),h.g);YGd(i,a.r);VHd(i);a.f=new N$d((RD(QHd(xYd(kTd.o),5),19),i.i),i.g);yYd(a).b&=-3}return a.f} +function uSb(a){Cgd(a,new Pfd($fd(Xfd(Zfd(Yfd(new agd,Aze),'ELK DisCo'),'Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out.'),new xSb)));Agd(a,Aze,Bze,iGd(sSb));Agd(a,Aze,Cze,iGd(mSb));Agd(a,Aze,Dze,iGd(hSb));Agd(a,Aze,Eze,iGd(nSb));Agd(a,Aze,Bye,iGd(qSb));Agd(a,Aze,Cye,iGd(pSb));Agd(a,Aze,Aye,iGd(rSb));Agd(a,Aze,Dye,iGd(oSb));Agd(a,Aze,vze,iGd(jSb));Agd(a,Aze,wze,iGd(iSb));Agd(a,Aze,xze,iGd(kSb));Agd(a,Aze,yze,iGd(lSb))} +function qAd(){qAd=geb;oAd=cD(WC(hE,1),zwe,28,15,[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]);pAd=new RegExp('[ \t\n\r\f]+');try{nAd=cD(WC(h8,1),rve,2114,0,[new c2d((WA(),YA("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",_A(($A(),$A(),ZA))))),new c2d(YA("yyyy-MM-dd'T'HH:mm:ss'.'SSS",_A((null,ZA)))),new c2d(YA("yyyy-MM-dd'T'HH:mm:ss",_A((null,ZA)))),new c2d(YA("yyyy-MM-dd'T'HH:mm",_A((null,ZA)))),new c2d(YA('yyyy-MM-dd',_A((null,ZA))))])}catch(a){a=zdb(a);if(!ZD(a,82))throw Adb(a)}} +function uKc(a,b){var c,d,e,f;e=Kwb(a.d,1)!=0;d=mKc(a,b);if(d==0&&Heb(TD(mQb(b.j,(Ywc(),jwc))))){return 0}!Heb(TD(mQb(b.j,(Ywc(),jwc))))&&!Heb(TD(mQb(b.j,Owc)))||dE(mQb(b.j,(yCc(),cAc)))===dE((kEc(),hEc))?b.c.mg(b.e,e):(e=Heb(TD(mQb(b.j,jwc))));DKc(a,b,e,true);Heb(TD(mQb(b.j,Owc)))&&pQb(b.j,Owc,(Geb(),false));if(Heb(TD(mQb(b.j,jwc)))){pQb(b.j,jwc,(Geb(),false));pQb(b.j,Owc,true)}c=mKc(a,b);do{yKc(a);if(c==0){return 0}e=!e;f=c;DKc(a,b,e,false);c=mKc(a,b)}while(f>c);return f} +function vKc(a,b){var c,d,e,f;e=Kwb(a.d,1)!=0;d=lKc(a,b);if(d==0&&Heb(TD(mQb(b.j,(Ywc(),jwc))))){return 0}!Heb(TD(mQb(b.j,(Ywc(),jwc))))&&!Heb(TD(mQb(b.j,Owc)))||dE(mQb(b.j,(yCc(),cAc)))===dE((kEc(),hEc))?b.c.mg(b.e,e):(e=Heb(TD(mQb(b.j,jwc))));DKc(a,b,e,true);Heb(TD(mQb(b.j,Owc)))&&pQb(b.j,Owc,(Geb(),false));if(Heb(TD(mQb(b.j,jwc)))){pQb(b.j,jwc,(Geb(),false));pQb(b.j,Owc,true)}c=lKc(a,b);do{yKc(a);if(c==0){return 0}e=!e;f=c;DKc(a,b,e,false);c=lKc(a,b)}while(f>c);return f} +function Gid(a,b,c,d){var e,f,g,h,i,j,k,l,m;i=ojd(new rjd(c.a,c.b),a);j=i.a*b.b-i.b*b.a;k=b.a*d.b-b.b*d.a;l=(i.a*d.b-i.b*d.a)/k;m=j/k;if(k==0){if(j==0){e=$id(new rjd(c.a,c.b),ijd(new rjd(d.a,d.b),0.5));f=bjd(a,e);g=bjd($id(new rjd(a.a,a.b),b),e);h=$wnd.Math.sqrt(d.a*d.a+d.b*d.b)*0.5;if(f<g&&f<=h){return new rjd(a.a,a.b)}if(g<=h){return $id(new rjd(a.a,a.b),b)}return null}else{return null}}else{return l>=0&&l<=1&&m>=0&&m<=1?$id(new rjd(a.a,a.b),ijd(new rjd(b.a,b.b),l)):null}} +function QWb(a,b,c){var d,e,f,g,h;d=RD(mQb(a,(yCc(),dAc)),21);c.a>b.a&&(d.Hc((ukd(),okd))?(a.c.a+=(c.a-b.a)/2):d.Hc(qkd)&&(a.c.a+=c.a-b.a));c.b>b.b&&(d.Hc((ukd(),skd))?(a.c.b+=(c.b-b.b)/2):d.Hc(rkd)&&(a.c.b+=c.b-b.b));if(RD(mQb(a,(Ywc(),kwc)),21).Hc((ovc(),hvc))&&(c.a>b.a||c.b>b.b)){for(h=new Anb(a.a);h.a<h.c.c.length;){g=RD(ynb(h),10);if(g.k==(r3b(),m3b)){e=RD(mQb(g,hwc),64);e==(qpd(),Xod)?(g.n.a+=c.a-b.a):e==npd&&(g.n.b+=c.b-b.b)}}}f=a.d;a.f.a=c.a-f.b-f.c;a.f.b=c.b-f.d-f.a} +function Y8b(a,b,c){var d,e,f,g,h;d=RD(mQb(a,(yCc(),dAc)),21);c.a>b.a&&(d.Hc((ukd(),okd))?(a.c.a+=(c.a-b.a)/2):d.Hc(qkd)&&(a.c.a+=c.a-b.a));c.b>b.b&&(d.Hc((ukd(),skd))?(a.c.b+=(c.b-b.b)/2):d.Hc(rkd)&&(a.c.b+=c.b-b.b));if(RD(mQb(a,(Ywc(),kwc)),21).Hc((ovc(),hvc))&&(c.a>b.a||c.b>b.b)){for(g=new Anb(a.a);g.a<g.c.c.length;){f=RD(ynb(g),10);if(f.k==(r3b(),m3b)){e=RD(mQb(f,hwc),64);e==(qpd(),Xod)?(f.n.a+=c.a-b.a):e==npd&&(f.n.b+=c.b-b.b)}}}h=a.d;a.f.a=c.a-h.b-h.c;a.f.b=c.b-h.d-h.a} +function KQc(a){var b,c,d,e,f,g,h,i,j,k,l,m;b=bRc(a);for(k=(h=(new Xkb(b)).a.vc().Kc(),new blb(h));k.a.Ob();){j=(e=RD(k.a.Pb(),44),RD(e.ld(),10));l=0;m=0;l=j.d.d;m=j.o.b+j.d.a;a.d[j.p]=0;c=j;while((f=a.a[c.p])!=j){d=dRc(c,f);i=0;a.c==(wQc(),uQc)?(i=d.d.n.b+d.d.a.b-d.c.n.b-d.c.a.b):(i=d.c.n.b+d.c.a.b-d.d.n.b-d.d.a.b);g=Kfb(a.d[c.p])+i;a.d[f.p]=g;l=$wnd.Math.max(l,f.d.d-g);m=$wnd.Math.max(m,g+f.o.b+f.d.a);c=f}c=j;do{a.d[c.p]=Kfb(a.d[c.p])+l;c=a.a[c.p]}while(c!=j);a.b[j.p]=l+m}} +function S9c(a,b,c){var d,e,f,g,h,i,j,k,l,m;f=0;g=a.t;e=0;d=0;i=0;m=0;l=0;if(c){a.n.c.length=0;Rmb(a.n,new _9c(a.s,a.t,a.i))}h=0;for(k=new Anb(a.b);k.a<k.c.c.length;){j=RD(ynb(k),27);if(f+j.g+(h>0?a.i:0)>b&&i>0){f=0;g+=i+a.i;e=$wnd.Math.max(e,m);d+=i+a.i;i=0;m=0;if(c){++l;Rmb(a.n,new _9c(a.s,g,a.i))}h=0}m+=j.g+(h>0?a.i:0);i=$wnd.Math.max(i,j.f);c&&W9c(RD(Vmb(a.n,l),209),j);f+=j.g+(h>0?a.i:0);++h}e=$wnd.Math.max(e,m);d+=i;if(c){a.r=e;a.d=d;Ead(a.j)}return new Uid(a.s,a.t,e,d)} +function CRb(a){var b,c,d,e,f,g,h,i,j,k,l,m;a.b=false;l=oxe;i=pxe;m=oxe;j=pxe;for(d=a.e.a.ec().Kc();d.Ob();){c=RD(d.Pb(),272);e=c.a;l=$wnd.Math.min(l,e.c);i=$wnd.Math.max(i,e.c+e.b);m=$wnd.Math.min(m,e.d);j=$wnd.Math.max(j,e.d+e.a);for(g=new Anb(c.c);g.a<g.c.c.length;){f=RD(ynb(g),407);b=f.a;if(b.a){k=e.d+f.b.b;h=k+f.c;m=$wnd.Math.min(m,k);j=$wnd.Math.max(j,h)}else{k=e.c+f.b.a;h=k+f.c;l=$wnd.Math.min(l,k);i=$wnd.Math.max(i,h)}}}a.a=new rjd(i-l,j-m);a.c=new rjd(l+a.d.a,m+a.d.b)} +function mYd(a){var b,c,d,e,f,g,h,i;if(!a.a){a.o=null;i=new e_d(a);b=new i_d;c=iYd;h=c.a.zc(a,c);if(h==null){for(g=new dMd(zYd(a));g.e!=g.i.gc();){f=RD(bMd(g),29);YGd(i,mYd(f))}c.a.Bc(a)!=null;c.a.gc()==0&&undefined}for(e=(!a.s&&(a.s=new C5d(y7,a,21,17)),new dMd(a.s));e.e!=e.i.gc();){d=RD(bMd(e),179);ZD(d,331)&&WGd(b,RD(d,35))}VHd(b);a.k=new n_d(a,(RD(QHd(xYd((lTd(),kTd).o),7),19),b.i),b.g);YGd(i,a.k);VHd(i);a.a=new N$d((RD(QHd(xYd(kTd.o),4),19),i.i),i.g);yYd(a).b&=-2}return a.a} +function age(a,b,c,d){var e,f,g,h,i,j,k;k=pke(a.e.Dh(),b);e=0;f=RD(a.g,124);i=null;nke();if(RD(b,69).xk()){for(h=0;h<a.i;++h){g=f[h];if(k.am(g.Lk())){if(pb(g,c)){i=g;break}++e}}}else if(c!=null){for(h=0;h<a.i;++h){g=f[h];if(k.am(g.Lk())){if(pb(c,g.md())){i=g;break}++e}}}else{for(h=0;h<a.i;++h){g=f[h];if(k.am(g.Lk())){if(g.md()==null){i=g;break}++e}}}if(i){if(Mvd(a.e)){j=b.Jk()?new lle(a.e,4,b,c,null,e,true):fge(a,b.tk()?2:1,b,c,b.ik(),-1,true);d?d.nj(j):(d=j)}d=_fe(a,i,d)}return d} +function d8c(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o,p;o=0;p=0;i=e.c;h=e.b;k=c.f;n=c.g;switch(b.g){case 0:o=d.i+d.g+g;a.c?(p=m8c(o,f,d,g)):(p=d.j);m=$wnd.Math.max(i,o+n);j=$wnd.Math.max(h,p+k);break;case 1:p=d.j+d.f+g;a.c?(o=l8c(p,f,d,g)):(o=d.i);m=$wnd.Math.max(i,o+n);j=$wnd.Math.max(h,p+k);break;case 2:o=i+g;p=0;m=i+g+n;j=$wnd.Math.max(h,k);break;case 3:o=0;p=h+g;m=$wnd.Math.max(i,n);j=h+g+k;break;default:throw Adb(new agb('IllegalPlacementOption.'));}l=new mad(a.a,m,j,b,o,p);return l} +function g6b(a){var b,c,d,e,f,g,h,i,j,k,l,m;h=a.d;l=RD(mQb(a,(Ywc(),Xwc)),15);b=RD(mQb(a,Vvc),15);if(!l&&!b){return}f=Kfb(UD(hFc(a,(yCc(),QBc))));g=Kfb(UD(hFc(a,RBc)));m=0;if(l){j=0;for(e=l.Kc();e.Ob();){d=RD(e.Pb(),10);j=$wnd.Math.max(j,d.o.b);m+=d.o.a}m+=f*(l.gc()-1);h.d+=j+g}c=0;if(b){j=0;for(e=b.Kc();e.Ob();){d=RD(e.Pb(),10);j=$wnd.Math.max(j,d.o.b);c+=d.o.a}c+=f*(b.gc()-1);h.a+=j+g}i=$wnd.Math.max(m,c);if(i>a.o.a){k=(i-a.o.a)/2;h.b=$wnd.Math.max(h.b,k);h.c=$wnd.Math.max(h.c,k)}} +function RId(a){var b,c,d,e,f,g,h,i;f=new med;ied(f,(hed(),eed));for(d=(e=oC(a,$C(qJ,Nve,2,0,6,1)),new Dkb(new mob((new CC(a,e)).b)));d.b<d.d.gc();){c=(sFb(d.b<d.d.gc()),WD(d.d.Xb(d.c=d.b++)));g=vgd(LId,c);if(g){b=qC(a,c);b.te()?(h=b.te().a):b.qe()?(h=''+b.qe().a):b.re()?(h=''+b.re().a):(h=b.Ib());i=zhd(g,h);if(i!=null){(Csb(g.j,(Yhd(),Vhd))||Csb(g.j,Whd))&&oQb(ked(f,J4),g,i);Csb(g.j,Thd)&&oQb(ked(f,G4),g,i);Csb(g.j,Xhd)&&oQb(ked(f,K4),g,i);Csb(g.j,Uhd)&&oQb(ked(f,I4),g,i)}}}return f} +function ige(a,b,c){var d,e,f,g,h,i,j,k;e=RD(a.g,124);if(qke(a.e,b)){return nke(),RD(b,69).xk()?new ole(b,a):new Eke(b,a)}else{j=pke(a.e.Dh(),b);d=0;for(h=0;h<a.i;++h){f=e[h];g=f.Lk();if(j.am(g)){nke();if(RD(b,69).xk()){return f}else if(g==(Lle(),Jle)||g==Gle){i=new dib(jeb(f.md()));while(++h<a.i){f=e[h];g=f.Lk();(g==Jle||g==Gle)&&Zhb(i,jeb(f.md()))}return Ije(RD(b.Hk(),156),i.a)}else{k=f.md();k!=null&&c&&ZD(b,102)&&(RD(b,19).Bb&txe)!=0&&(k=Bge(a,b,h,d,k));return k}}++d}return b.ik()}} +function hge(a,b,c,d){var e,f,g,h,i,j;i=pke(a.e.Dh(),b);f=RD(a.g,124);if(qke(a.e,b)){e=0;for(h=0;h<a.i;++h){g=f[h];if(i.am(g.Lk())){if(e==c){nke();if(RD(b,69).xk()){return g}else{j=g.md();j!=null&&d&&ZD(b,102)&&(RD(b,19).Bb&txe)!=0&&(j=Bge(a,b,h,e,j));return j}}++e}}throw Adb(new veb(HJe+c+NIe+e))}else{e=0;for(h=0;h<a.i;++h){g=f[h];if(i.am(g.Lk())){nke();if(RD(b,69).xk()){return g}else{j=g.md();j!=null&&d&&ZD(b,102)&&(RD(b,19).Bb&txe)!=0&&(j=Bge(a,b,h,e,j));return j}}++e}return b.ik()}} +function xjb(){xjb=geb;vjb=cD(WC(kE,1),Pwe,28,15,[qwe,1162261467,hwe,1220703125,362797056,1977326743,hwe,387420489,ixe,214358881,429981696,815730721,1475789056,170859375,268435456,410338673,612220032,893871739,1280000000,1801088541,113379904,148035889,191102976,244140625,308915776,387420489,481890304,594823321,729000000,887503681,hwe,1291467969,1544804416,1838265625,60466176]);wjb=cD(WC(kE,1),Pwe,28,15,[-1,-1,31,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5])} +function Gjb(a,b){var c,d,e,f,g,h,i,j,k,l;g=a.e;i=b.e;if(i==0){return a}if(g==0){return b.e==0?b:new cjb(-b.e,b.d,b.a)}f=a.d;h=b.d;if(f+h==2){c=Cdb(a.a[0],yxe);d=Cdb(b.a[0],yxe);g<0&&(c=Odb(c));i<0&&(d=Odb(d));return Pib(),Jdb(Vdb(c,d),0)?jjb(Vdb(c,d)):Xib(jjb(Odb(Vdb(c,d))))}e=f!=h?f>h?1:-1:Ejb(a.a,b.a,f);if(e==-1){l=-i;k=g==i?Hjb(b.a,h,a.a,f):Cjb(b.a,h,a.a,f)}else{l=g;if(g==i){if(e==0){return Pib(),Oib}k=Hjb(a.a,f,b.a,h)}else{k=Cjb(a.a,f,b.a,h)}}j=new cjb(l,k.length,k);Rib(j);return j} +function c5b(a,b){var c,d,e,f;f=Z4b(b);!b.c&&(b.c=new C5d(K4,b,9,9));FDb(new SDb(null,(!b.c&&(b.c=new C5d(K4,b,9,9)),new Swb(b.c,16))),new s5b(f));e=RD(mQb(f,(Ywc(),kwc)),21);Y4b(b,e);if(e.Hc((ovc(),hvc))){for(d=new dMd((!b.c&&(b.c=new C5d(K4,b,9,9)),b.c));d.e!=d.i.gc();){c=RD(bMd(d),123);g5b(a,b,f,c)}}RD(Gxd(b,(yCc(),lBc)),181).gc()!=0&&V4b(b,f);Heb(TD(mQb(f,sBc)))&&e.Fc(mvc);nQb(f,PBc)&&HCc(new RCc(Kfb(UD(mQb(f,PBc)))),f);dE(Gxd(b,IAc))===dE((Fnd(),Cnd))?d5b(a,b,f):b5b(a,b,f);return f} +function Vrc(a){var b,c,d,e,f,g,h,i;for(e=new Anb(a.b);e.a<e.c.c.length;){d=RD(ynb(e),30);for(g=new Anb(bv(d.a));g.a<g.c.c.length;){f=RD(ynb(g),10);if(Lrc(f)){c=RD(mQb(f,(Ywc(),Wvc)),313);if(!c.g&&!!c.d){b=c;i=c.d;while(i){Urc(i.i,i.k,false,true);asc(b.a);asc(i.i);asc(i.k);asc(i.b);Z0b(i.c,b.c.d);Z0b(b.c,null);g3b(b.a,null);g3b(i.i,null);g3b(i.k,null);g3b(i.b,null);h=new Jrc(b.i,i.a,b.e,i.j,i.f);h.k=b.k;h.n=b.n;h.b=b.b;h.c=i.c;h.g=b.g;h.d=i.d;pQb(b.i,Wvc,h);pQb(i.a,Wvc,h);i=i.d;b=h}}}}}} +function nue(a,b){var c,d,e,f,g,h,i;if(a==null){return null}f=a.length;if(f==0){return ''}i=$C(hE,zwe,28,f,15,1);AFb(0,f,a.length);AFb(0,f,i.length);nhb(a,0,f,i,0);c=null;h=b;for(e=0,g=0;e<f;e++){d=i[e];Kqe();if(d<=32&&(Jqe[d]&2)!=0){if(h){!c&&(c=new Shb(a));Phb(c,e-g++)}else{h=b;if(d!=32){!c&&(c=new Shb(a));peb(c,e-g,e-g+1,String.fromCharCode(32))}}}else{h=false}}if(h){if(!c){return AFb(0,f-1,a.length),a.substr(0,f-1)}else{f=c.a.length;return f>0?zhb(c.a,0,f-1):''}}else{return !c?a:c.a}} +function xic(a,b){var c,d,e,f,g,h,i;b.Ug('Sort By Input Model '+mQb(a,(yCc(),cAc)),1);e=0;for(d=new Anb(a.b);d.a<d.c.c.length;){c=RD(ynb(d),30);i=e==0?0:e-1;h=RD(Vmb(a.b,i),30);for(g=new Anb(c.a);g.a<g.c.c.length;){f=RD(ynb(g),10);if(dE(mQb(f,BBc))!==dE((Bod(),vod))&&dE(mQb(f,BBc))!==dE(wod)){yob();_mb(f.j,new trc(h,RD(mQb(a,cAc),284),Bic(f),Heb(TD(mQb(a,bAc)))));b.bh('Node '+f+' ports: '+f.j)}}yob();_mb(c.a,new frc(h,RD(mQb(a,cAc),284),RD(mQb(a,_zc),390)));b.bh('Layer '+e+': '+c);++e}b.Vg()} +function ute(a,b){var c,d,e,f,g;g=RD(b,138);vte(a);vte(g);if(g.b==null)return;a.c=true;if(a.b==null){a.b=$C(kE,Pwe,28,g.b.length,15,1);hib(g.b,0,a.b,0,g.b.length);return}f=$C(kE,Pwe,28,a.b.length+g.b.length,15,1);for(c=0,d=0,e=0;c<a.b.length||d<g.b.length;){if(c>=a.b.length){f[e++]=g.b[d++];f[e++]=g.b[d++]}else if(d>=g.b.length){f[e++]=a.b[c++];f[e++]=a.b[c++]}else if(g.b[d]<a.b[c]||g.b[d]===a.b[c]&&g.b[d+1]<a.b[c+1]){f[e++]=g.b[d++];f[e++]=g.b[d++]}else{f[e++]=a.b[c++];f[e++]=a.b[c++]}}a.b=f} +function hac(a,b){var c,d,e,f,g,h,i,j,k,l;c=Heb(TD(mQb(a,(Ywc(),uwc))));h=Heb(TD(mQb(b,uwc)));d=RD(mQb(a,vwc),12);i=RD(mQb(b,vwc),12);e=RD(mQb(a,wwc),12);j=RD(mQb(b,wwc),12);k=!!d&&d==i;l=!!e&&e==j;if(!c&&!h){return new oac(RD(ynb(new Anb(a.j)),12).p==RD(ynb(new Anb(b.j)),12).p,k,l)}f=(!Heb(TD(mQb(a,uwc)))||Heb(TD(mQb(a,twc))))&&(!Heb(TD(mQb(b,uwc)))||Heb(TD(mQb(b,twc))));g=(!Heb(TD(mQb(a,uwc)))||!Heb(TD(mQb(a,twc))))&&(!Heb(TD(mQb(b,uwc)))||!Heb(TD(mQb(b,twc))));return new oac(k&&f||l&&g,k,l)} +function N9c(a){var b,c,d,e,f,g,h,i;d=0;c=0;i=new Yub;b=0;for(h=new Anb(a.n);h.a<h.c.c.length;){g=RD(ynb(h),209);if(g.c.c.length==0){Pub(i,g,i.c.b,i.c)}else{d=$wnd.Math.max(d,g.d);c+=g.a+(b>0?a.i:0)}++b}Ce(a.n,i);a.d=c;a.r=d;a.g=0;a.f=0;a.e=0;a.o=oxe;a.p=oxe;for(f=new Anb(a.b);f.a<f.c.c.length;){e=RD(ynb(f),27);a.p=$wnd.Math.min(a.p,e.g);a.g=$wnd.Math.max(a.g,e.g);a.f=$wnd.Math.max(a.f,e.f);a.o=$wnd.Math.min(a.o,e.f);a.e+=e.f+a.i}a.a=a.e/a.b.c.length-a.i*((a.b.c.length-1)/a.b.c.length);Ead(a.j)} +function qzd(a){var b,c,d,e;if((a.Db&64)!=0)return kyd(a);b=new dib(BHe);d=a.k;if(!d){!a.n&&(a.n=new C5d(I4,a,1,7));if(a.n.i>0){e=(!a.n&&(a.n=new C5d(I4,a,1,7)),RD(QHd(a.n,0),135)).a;!e||Zhb(Zhb((b.a+=' "',b),e),'"')}}else{Zhb(Zhb((b.a+=' "',b),d),'"')}c=(!a.b&&(a.b=new Yie(E4,a,4,7)),!(a.b.i<=1&&(!a.c&&(a.c=new Yie(E4,a,5,8)),a.c.i<=1)));c?(b.a+=' [',b):(b.a+=' ',b);Zhb(b,Eb(new Gb,new dMd(a.b)));c&&(b.a+=']',b);b.a+=SAe;c&&(b.a+='[',b);Zhb(b,Eb(new Gb,new dMd(a.c)));c&&(b.a+=']',b);return b.a} +function odc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;v=a.c;w=b.c;c=Wmb(v.a,a,0);d=Wmb(w.a,b,0);t=RD(c3b(a,(BEc(),yEc)).Kc().Pb(),12);C=RD(c3b(a,zEc).Kc().Pb(),12);u=RD(c3b(b,yEc).Kc().Pb(),12);D=RD(c3b(b,zEc).Kc().Pb(),12);r=s2b(t.e);A=s2b(C.g);s=s2b(u.e);B=s2b(D.g);f3b(a,d,w);for(g=s,k=0,o=g.length;k<o;++k){e=g[k];Z0b(e,t)}for(h=B,l=0,p=h.length;l<p;++l){e=h[l];Y0b(e,C)}f3b(b,c,v);for(i=r,m=0,q=i.length;m<q;++m){e=i[m];Z0b(e,u)}for(f=A,j=0,n=f.length;j<n;++j){e=f[j];Y0b(e,D)}} +function $2c(a){var b,c,d,e,f,g,h;g=RD(Gxd(a,(u2c(),t2c)),27);for(d=new dMd((!g.e&&(g.e=new Yie(G4,g,7,4)),g.e));d.e!=d.i.gc();){c=RD(bMd(d),74);h=new rjd(RD(QHd((!c.a&&(c.a=new C5d(F4,c,6,6)),c.a),0),166).j,RD(QHd((!c.a&&(c.a=new C5d(F4,c,6,6)),c.a),0),166).k);f=new rjd(RD(QHd((!c.a&&(c.a=new C5d(F4,c,6,6)),c.a),0),166).b,RD(QHd((!c.a&&(c.a=new C5d(F4,c,6,6)),c.a),0),166).c);e=new rjd(f.a-h.a,f.b-h.b);b=$wnd.Math.atan2(e.b,e.a);RD(QHd((!c.c&&(c.c=new Yie(E4,c,5,8)),c.c),0),84).qf(($4c(),W4c),b)}} +function o6c(a,b){var c,d,e,f,g,h,i,j,k;b.Ug('Interactive Node Reorderer',1);k=(!a.a&&(a.a=new C5d(J4,a,10,11)),a.a);h=new bnb;for(e=new dMd(k);e.e!=e.i.gc();){c=RD(bMd(e),27);Hxd(c,(X7c(),A7c))&&(ZEb(h.c,c),true)}for(f=new Anb(h);f.a<f.c.c.length;){c=RD(ynb(f),27);dHd(k,c)}yob();_mb(h,new s6c);for(g=new Anb(h);g.a<g.c.c.length;){c=RD(ynb(g),27);j=RD(Gxd(c,(X7c(),A7c)),17).a;j=$wnd.Math.min(j,k.i);VGd(k,j,c)}i=0;for(d=new dMd(k);d.e!=d.i.gc();){c=RD(bMd(d),27);Ixd(c,(X7c(),z7c),sgb(i));++i}b.Vg()} +function PTc(a,b,c){var d,e,f,g,h,i,j,k;if($wnd.Math.abs(b.s-b.c)<Vze||$wnd.Math.abs(c.s-c.c)<Vze){return 0}d=OTc(a,b.j,c.e);e=OTc(a,c.j,b.e);f=d==-1||e==-1;g=0;if(f){if(d==-1){new bTc((fTc(),dTc),c,b,1);++g}if(e==-1){new bTc((fTc(),dTc),b,c,1);++g}}else{h=VTc(b.j,c.s,c.c);h+=VTc(c.e,b.s,b.c);i=VTc(c.j,b.s,b.c);i+=VTc(b.e,c.s,c.c);j=d+16*h;k=e+16*i;if(j<k){new bTc((fTc(),eTc),b,c,k-j)}else if(j>k){new bTc((fTc(),eTc),c,b,j-k)}else if(j>0&&k>0){new bTc((fTc(),eTc),b,c,0);new bTc(eTc,c,b,0)}}return g} +function pXc(a,b,c){var d,e,f;a.a=new bnb;for(f=Sub(b.b,0);f.b!=f.d.c;){e=RD(evb(f),40);while(RD(mQb(e,(h_c(),f_c)),17).a>a.a.c.length-1){Rmb(a.a,new Ptd(Hze,KEe))}d=RD(mQb(e,f_c),17).a;if(c==(Cmd(),ymd)||c==zmd){e.e.a<Kfb(UD(RD(Vmb(a.a,d),42).a))&&Ntd(RD(Vmb(a.a,d),42),e.e.a);e.e.a+e.f.a>Kfb(UD(RD(Vmb(a.a,d),42).b))&&Otd(RD(Vmb(a.a,d),42),e.e.a+e.f.a)}else{e.e.b<Kfb(UD(RD(Vmb(a.a,d),42).a))&&Ntd(RD(Vmb(a.a,d),42),e.e.b);e.e.b+e.f.b>Kfb(UD(RD(Vmb(a.a,d),42).b))&&Otd(RD(Vmb(a.a,d),42),e.e.b+e.f.b)}}} +function g2b(a,b,c,d){var e,f,g,h,i,j,k;f=i2b(d);h=Heb(TD(mQb(d,(yCc(),aBc))));if((h||Heb(TD(mQb(a,MAc))))&&!Dod(RD(mQb(a,BBc),101))){e=vpd(f);i=q2b(a,c,c==(BEc(),zEc)?e:spd(e))}else{i=new R3b;P3b(i,a);if(b){k=i.n;k.a=b.a-a.n.a;k.b=b.b-a.n.b;_id(k,0,0,a.o.a,a.o.b);Q3b(i,c2b(i,f))}else{e=vpd(f);Q3b(i,c==(BEc(),zEc)?e:spd(e))}g=RD(mQb(d,(Ywc(),kwc)),21);j=i.j;switch(f.g){case 2:case 1:(j==(qpd(),Yod)||j==npd)&&g.Fc((ovc(),lvc));break;case 4:case 3:(j==(qpd(),Xod)||j==ppd)&&g.Fc((ovc(),lvc));}}return i} +function VXb(a,b){var c,d,e,f,g,h;for(g=new vkb((new mkb(a.f.b)).a);g.b;){f=tkb(g);e=RD(f.ld(),602);if(b==1){if(e.Af()!=(Cmd(),Bmd)&&e.Af()!=xmd){continue}}else{if(e.Af()!=(Cmd(),ymd)&&e.Af()!=zmd){continue}}d=RD(RD(f.md(),42).b,86);h=RD(RD(f.md(),42).a,194);c=h.c;switch(e.Af().g){case 2:d.g.c=a.e.a;d.g.b=$wnd.Math.max(1,d.g.b+c);break;case 1:d.g.c=d.g.c+c;d.g.b=$wnd.Math.max(1,d.g.b-c);break;case 4:d.g.d=a.e.b;d.g.a=$wnd.Math.max(1,d.g.a+c);break;case 3:d.g.d=d.g.d+c;d.g.a=$wnd.Math.max(1,d.g.a-c);}}} +function NNc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;h=$C(kE,Pwe,28,b.b.c.length,15,1);j=$C(hR,jwe,273,b.b.c.length,0,1);i=$C(jR,WAe,10,b.b.c.length,0,1);for(l=a.a,m=0,n=l.length;m<n;++m){k=l[m];p=0;for(g=new Anb(k.e);g.a<g.c.c.length;){e=RD(ynb(g),10);d=Q4b(e.c);++h[d];o=Kfb(UD(mQb(b,(yCc(),TBc))));h[d]>0&&!!i[d]&&(o=bFc(a.b,i[d],e));p=$wnd.Math.max(p,e.c.c.b+o)}for(f=new Anb(k.e);f.a<f.c.c.length;){e=RD(ynb(f),10);e.n.b=p+e.d.d;c=e.c;c.c.b=p+e.d.d+e.o.b+e.d.a;j[Wmb(c.b.b,c,0)]=e.k;i[Wmb(c.b.b,c,0)]=e}}} +function M5c(a,b){var c,d,e,f,g,h,i,j,k,l,m;for(d=new is(Mr(zGd(b).a.Kc(),new ir));gs(d);){c=RD(hs(d),74);if(!ZD(QHd((!c.b&&(c.b=new Yie(E4,c,4,7)),c.b),0),193)){i=AGd(RD(QHd((!c.c&&(c.c=new Yie(E4,c,5,8)),c.c),0),84));if(!nzd(c)){g=b.i+b.g/2;h=b.j+b.f/2;k=i.i+i.g/2;l=i.j+i.f/2;m=new pjd;m.a=k-g;m.b=l-h;f=new rjd(m.a,m.b);wid(f,b.g,b.f);m.a-=f.a;m.b-=f.b;g=k-m.a;h=l-m.b;j=new rjd(m.a,m.b);wid(j,i.g,i.f);m.a-=j.a;m.b-=j.b;k=g+m.a;l=h+m.b;e=IGd(c,true,true);Ozd(e,g);Pzd(e,h);Hzd(e,k);Izd(e,l);M5c(a,i)}}}} +function ocd(a){Cgd(a,new Pfd($fd(Xfd(Zfd(Yfd(new agd,hGe),'ELK SPOrE Compaction'),'ShrinkTree is a compaction algorithm that maintains the topology of a layout. The relocation of diagram elements is based on contracting a spanning tree.'),new rcd)));Agd(a,hGe,iGe,iGd(mcd));Agd(a,hGe,jGe,iGd(jcd));Agd(a,hGe,kGe,iGd(icd));Agd(a,hGe,lGe,iGd(gcd));Agd(a,hGe,mGe,iGd(hcd));Agd(a,hGe,Eze,fcd);Agd(a,hGe,_ze,8);Agd(a,hGe,nGe,iGd(lcd));Agd(a,hGe,oGe,iGd(bcd));Agd(a,hGe,pGe,iGd(ccd));Agd(a,hGe,LDe,(Geb(),false))} +function hQc(a,b){var c,d,e,f,g,h,i,j,k,l;b.Ug('Simple node placement',1);l=RD(mQb(a,(Ywc(),Qwc)),312);h=0;for(f=new Anb(a.b);f.a<f.c.c.length;){d=RD(ynb(f),30);g=d.c;g.b=0;c=null;for(j=new Anb(d.a);j.a<j.c.c.length;){i=RD(ynb(j),10);!!c&&(g.b+=_Ec(i,c,l.c));g.b+=i.d.d+i.o.b+i.d.a;c=i}h=$wnd.Math.max(h,g.b)}for(e=new Anb(a.b);e.a<e.c.c.length;){d=RD(ynb(e),30);g=d.c;k=(h-g.b)/2;c=null;for(j=new Anb(d.a);j.a<j.c.c.length;){i=RD(ynb(j),10);!!c&&(k+=_Ec(i,c,l.c));k+=i.d.d;i.n.b=k;k+=i.o.b+i.d.a;c=i}}b.Vg()} +function tqc(a,b){var c,d,e,f;nqc(b.b.j);FDb(GDb(new SDb(null,new Swb(b.d,16)),new Eqc),new Gqc);for(f=new Anb(b.d);f.a<f.c.c.length;){e=RD(ynb(f),105);switch(e.e.g){case 0:c=RD(Vmb(e.j,0),113).d.j;Smc(e,RD(Lvb(KDb(RD(Qc(e.k,c),15).Oc(),lqc)),113));Tmc(e,RD(Lvb(JDb(RD(Qc(e.k,c),15).Oc(),lqc)),113));break;case 1:d=foc(e);Smc(e,RD(Lvb(KDb(RD(Qc(e.k,d[0]),15).Oc(),lqc)),113));Tmc(e,RD(Lvb(JDb(RD(Qc(e.k,d[1]),15).Oc(),lqc)),113));break;case 2:vqc(a,e);break;case 3:uqc(e);break;case 4:sqc(a,e);}qqc(e)}a.a=null} +function yRc(a,b,c){var d,e,f,g,h,i,j,k;d=a.a.o==(EQc(),DQc)?oxe:pxe;h=zRc(a,new xRc(b,c));if(!h.a&&h.c){Mub(a.d,h);return d}else if(h.a){e=h.a.c;i=h.a.d;if(c){j=a.a.c==(wQc(),vQc)?i:e;f=a.a.c==vQc?e:i;g=a.a.g[f.i.p];k=Kfb(a.a.p[g.p])+Kfb(a.a.d[f.i.p])+f.n.b+f.a.b-Kfb(a.a.d[j.i.p])-j.n.b-j.a.b}else{j=a.a.c==(wQc(),uQc)?i:e;f=a.a.c==uQc?e:i;k=Kfb(a.a.p[a.a.g[f.i.p].p])+Kfb(a.a.d[f.i.p])+f.n.b+f.a.b-Kfb(a.a.d[j.i.p])-j.n.b-j.a.b}a.a.n[a.a.g[e.i.p].p]=(Geb(),true);a.a.n[a.a.g[i.i.p].p]=true;return k}return d} +function Sfe(a,b,c,d){var e,f,g,h,i,j,k,l;if(d.gc()==0){return false}i=(nke(),RD(b,69).xk());g=i?d:new ZHd(d.gc());if(qke(a.e,b)){if(b.Si()){for(k=d.Kc();k.Ob();){j=k.Pb();if(!dge(a,b,j,ZD(b,102)&&(RD(b,19).Bb&txe)!=0)){f=oke(b,j);g.Fc(f)}}}else if(!i){for(k=d.Kc();k.Ob();){j=k.Pb();f=oke(b,j);g.Fc(f)}}}else{l=pke(a.e.Dh(),b);e=RD(a.g,124);for(h=0;h<a.i;++h){f=e[h];if(l.am(f.Lk())){throw Adb(new agb(gLe))}}if(d.gc()>1){throw Adb(new agb(gLe))}if(!i){f=oke(b,d.Kc().Pb());g.Fc(f)}}return XGd(a,gge(a,b,c),g)} +function Fge(a,b,c){var d,e,f,g,h,i,j,k;if(qke(a.e,b)){i=(nke(),RD(b,69).xk()?new ole(b,a):new Eke(b,a));bge(i.c,i.b);Ake(i,RD(c,16))}else{k=pke(a.e.Dh(),b);d=RD(a.g,124);for(g=0;g<a.i;++g){e=d[g];f=e.Lk();if(k.am(f)){if(f==(Lle(),Jle)||f==Gle){j=Mge(a,b,c);h=g;j?vLd(a,g):++g;while(g<a.i){e=d[g];f=e.Lk();f==Jle||f==Gle?vLd(a,g):++g}j||RD(eHd(a,h,oke(b,c)),76)}else Mge(a,b,c)?vLd(a,g):RD(eHd(a,g,(nke(),RD(b,69).xk()?RD(c,76):oke(b,c))),76);return}}Mge(a,b,c)||WGd(a,(nke(),RD(b,69).xk()?RD(c,76):oke(b,c)))}} +function zPb(a,b,c){var d,e,f,g,h,i,j,k;if(!pb(c,a.b)){a.b=c;f=new CPb;g=RD(zDb(GDb(new SDb(null,new Swb(c.f,16)),f),sBb(new _Bb,new bCb,new yCb,new ACb,cD(WC(QL,1),jwe,108,0,[(xBb(),wBb),vBb]))),21);a.e=true;a.f=true;a.c=true;a.d=true;e=g.Hc((IPb(),FPb));d=g.Hc(GPb);e&&!d&&(a.f=false);!e&&d&&(a.d=false);e=g.Hc(EPb);d=g.Hc(HPb);e&&!d&&(a.c=false);!e&&d&&(a.e=false)}k=RD(a.a.Ve(b,c),42);i=RD(k.a,17).a;j=RD(k.b,17).a;h=false;i<0?a.c||(h=true):a.e||(h=true);j<0?a.d||(h=true):a.f||(h=true);return h?zPb(a,k,c):k} +function fNb(a){var b,c,d,e;e=a.o;RMb();if(a.A.dc()||pb(a.A,QMb)){b=e.b}else{b=YKb(a.f);if(a.A.Hc((Qpd(),Npd))&&!a.B.Hc((dqd(),_pd))){b=$wnd.Math.max(b,YKb(RD(Vrb(a.p,(qpd(),Xod)),252)));b=$wnd.Math.max(b,YKb(RD(Vrb(a.p,ppd),252)))}c=TMb(a);!!c&&(b=$wnd.Math.max(b,c.b));if(a.A.Hc(Opd)){if(a.q==(Bod(),xod)||a.q==wod){b=$wnd.Math.max(b,SJb(RD(Vrb(a.b,(qpd(),Xod)),127)));b=$wnd.Math.max(b,SJb(RD(Vrb(a.b,ppd),127)))}}}Heb(TD(a.e.Tf().of((umd(),mld))))?(e.b=$wnd.Math.max(e.b,b)):(e.b=b);d=a.f.i;d.d=0;d.a=b;_Kb(a.f)} +function yNc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;for(l=0;l<b.length;l++){for(h=a.Kc();h.Ob();){f=RD(h.Pb(),230);f.hg(l,b)}for(m=0;m<b[l].length;m++){for(i=a.Kc();i.Ob();){f=RD(i.Pb(),230);f.ig(l,m,b)}p=b[l][m].j;for(n=0;n<p.c.length;n++){for(j=a.Kc();j.Ob();){f=RD(j.Pb(),230);f.jg(l,m,n,b)}o=(tFb(n,p.c.length),RD(p.c[n],12));c=0;for(e=new l4b(o.b);xnb(e.a)||xnb(e.b);){d=RD(xnb(e.a)?ynb(e.a):ynb(e.b),18);for(k=a.Kc();k.Ob();){f=RD(k.Pb(),230);f.gg(l,m,n,c++,d,b)}}}}}for(g=a.Kc();g.Ob();){f=RD(g.Pb(),230);f.fg()}} +function $7b(a,b){var c,d,e,f,g,h,i;a.b=Kfb(UD(mQb(b,(yCc(),UBc))));a.c=Kfb(UD(mQb(b,XBc)));a.d=RD(mQb(b,DAc),350);a.a=RD(mQb(b,Xzc),282);Y7b(b);h=RD(zDb(CDb(CDb(EDb(EDb(new SDb(null,new Swb(b.b,16)),new c8b),new e8b),new g8b),new i8b),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);for(e=h.Kc();e.Ob();){c=RD(e.Pb(),18);g=RD(mQb(c,(Ywc(),Twc)),15);g.Jc(new k8b(a));pQb(c,Twc,null)}for(d=h.Kc();d.Ob();){c=RD(d.Pb(),18);i=RD(mQb(c,(Ywc(),Uwc)),18);f=RD(mQb(c,Rwc),15);S7b(a,f,i);pQb(c,Rwc,null)}} +function r2d(a,b){var c,d,e,f,g,h,i;if(a.a){h=a.a.xe();i=null;if(h!=null){b.a+=''+h}else{g=a.a.mk();if(g!=null){f=qhb(g,Fhb(91));if(f!=-1){i=(BFb(f,g.length+1),g.substr(f));b.a+=''+zhb(g==null?vve:(uFb(g),g),0,f)}else{b.a+=''+g}}}if(!!a.d&&a.d.i!=0){e=true;b.a+='<';for(d=new dMd(a.d);d.e!=d.i.gc();){c=RD(bMd(d),89);e?(e=false):(b.a+=pve,b);r2d(c,b)}b.a+='>'}i!=null&&(b.a+=''+i,b)}else if(a.e){h=a.e.zb;h!=null&&(b.a+=''+h,b)}else{b.a+='?';if(a.b){b.a+=' super ';r2d(a.b,b)}else{if(a.f){b.a+=' extends ';r2d(a.f,b)}}}} +function Uae(a){a.b=null;a.a=null;a.o=null;a.q=null;a.v=null;a.w=null;a.B=null;a.p=null;a.Q=null;a.R=null;a.S=null;a.T=null;a.U=null;a.V=null;a.W=null;a.bb=null;a.eb=null;a.ab=null;a.H=null;a.db=null;a.c=null;a.d=null;a.f=null;a.n=null;a.r=null;a.s=null;a.u=null;a.G=null;a.J=null;a.e=null;a.j=null;a.i=null;a.g=null;a.k=null;a.t=null;a.F=null;a.I=null;a.L=null;a.M=null;a.O=null;a.P=null;a.$=null;a.N=null;a.Z=null;a.cb=null;a.K=null;a.D=null;a.A=null;a.C=null;a._=null;a.fb=null;a.X=null;a.Y=null;a.gb=false;a.hb=false} +function yib(a){var b,c,d,e;d=Ajb((!a.c&&(a.c=ojb(Hdb(a.f))),a.c),0);if(a.e==0||a.a==0&&a.f!=-1&&a.e<0){return d}b=xib(a)<0?1:0;c=a.e;e=(d.length+1+$wnd.Math.abs(eE(a.e)),new cib);b==1&&(e.a+='-',e);if(a.e>0){c-=d.length-b;if(c>=0){e.a+='0.';for(;c>mib.length;c-=mib.length){$hb(e,mib)}_hb(e,mib,eE(c));Zhb(e,(BFb(b,d.length+1),d.substr(b)))}else{c=b-c;Zhb(e,zhb(d,b,eE(c)));e.a+='.';Zhb(e,yhb(d,eE(c)))}}else{Zhb(e,(BFb(b,d.length+1),d.substr(b)));for(;c<-mib.length;c+=mib.length){$hb(e,mib)}_hb(e,mib,eE(-c))}return e.a} +function BOc(a){var b,c,d,e,f,g,h,i,j;if(a.k!=(r3b(),p3b)){return false}if(a.j.c.length<=1){return false}f=RD(mQb(a,(yCc(),BBc)),101);if(f==(Bod(),wod)){return false}e=(wDc(),(!a.q?(yob(),yob(),wob):a.q)._b(iBc)?(d=RD(mQb(a,iBc),203)):(d=RD(mQb(Y2b(a),jBc),203)),d);if(e==uDc){return false}if(!(e==tDc||e==sDc)){g=Kfb(UD(hFc(a,fCc)));b=RD(mQb(a,eCc),140);!b&&(b=new R2b(g,g,g,g));j=b3b(a,(qpd(),ppd));i=b.d+b.a+(j.gc()-1)*g;if(i>a.o.b){return false}c=b3b(a,Xod);h=b.d+b.a+(c.gc()-1)*g;if(h>a.o.b){return false}}return true} +function VRc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;b.Ug('Orthogonal edge routing',1);j=Kfb(UD(mQb(a,(yCc(),cCc))));c=Kfb(UD(mQb(a,UBc)));d=Kfb(UD(mQb(a,XBc)));m=new TTc(0,c);q=0;g=new Jkb(a.b,0);h=null;k=null;i=null;l=null;do{k=g.b<g.d.gc()?(sFb(g.b<g.d.gc()),RD(g.d.Xb(g.c=g.b++),30)):null;l=!k?null:k.a;if(h){p2b(h,q);q+=h.c.a}p=!h?q:q+d;o=STc(m,a,i,l,p);e=!h||ar(i,(dSc(),bSc));f=!k||ar(l,(dSc(),bSc));if(o>0){n=(o-1)*c;!!h&&(n+=d);!!k&&(n+=d);n<j&&!e&&!f&&(n=j);q+=n}else !e&&!f&&(q+=j);h=k;i=l}while(k);a.f.a=q;b.Vg()} +function tfe(a,b){var c,d,e,f,g,h,i,j,k,l;k=null;!!a.d&&(k=RD(Xjb(a.d,b),142));if(!k){f=a.a.vi();l=f.i;if(!a.d||bkb(a.d)!=l){i=new Tsb;!!a.d&&Ld(i,a.d);j=i.f.c+i.i.c;for(h=j;h<l;++h){d=RD(QHd(f,h),142);e=Oee(a.e,d).xe();c=RD(e==null?rtb(i.f,null,d):Ltb(i.i,e,d),142);!!c&&c!=d&&(e==null?rtb(i.f,null,c):Ltb(i.i,e,c))}if(i.f.c+i.i.c!=l){for(g=0;g<j;++g){d=RD(QHd(f,g),142);e=Oee(a.e,d).xe();c=RD(e==null?rtb(i.f,null,d):Ltb(i.i,e,d),142);!!c&&c!=d&&(e==null?rtb(i.f,null,c):Ltb(i.i,e,c))}}a.d=i}k=RD(Xjb(a.d,b),142)}return k} +function w0b(a,b,c,d,e,f,g){var h,i,j,k,l,m,n;l=Heb(TD(mQb(b,(yCc(),bBc))));m=null;f==(BEc(),yEc)&&d.c.i==c?(m=d.c):f==zEc&&d.d.i==c&&(m=d.d);j=g;if(!j||!l||!!m){k=(qpd(),opd);m?(k=m.j):Dod(RD(mQb(c,BBc),101))&&(k=f==yEc?ppd:Xod);i=t0b(a,b,c,f,k,d);h=s0b((Y2b(c),d));if(f==yEc){Y0b(h,RD(Vmb(i.j,0),12));Z0b(h,e)}else{Y0b(h,e);Z0b(h,RD(Vmb(i.j,0),12))}j=new G0b(d,h,i,RD(mQb(i,(Ywc(),Awc)),12),f,!m)}else{Rmb(j.e,d);n=$wnd.Math.max(Kfb(UD(mQb(j.d,FAc))),Kfb(UD(mQb(d,FAc))));pQb(j.d,FAc,n)}Rc(a.a,d,new J0b(j.d,b,f));return j} +function gSd(){gSd=geb;var a;fSd=new MSd;_Rd=$C(qJ,Nve,2,0,6,1);URd=Rdb(xSd(33,58),xSd(1,26));VRd=Rdb(xSd(97,122),xSd(65,90));WRd=xSd(48,57);SRd=Rdb(URd,0);TRd=Rdb(VRd,WRd);XRd=Rdb(Rdb(0,xSd(1,6)),xSd(33,38));YRd=Rdb(Rdb(WRd,xSd(65,70)),xSd(97,102));cSd=Rdb(SRd,vSd("-_.!~*'()"));dSd=Rdb(TRd,ySd("-_.!~*'()"));vSd(MJe);ySd(MJe);Rdb(cSd,vSd(';:@&=+$,'));Rdb(dSd,ySd(';:@&=+$,'));ZRd=vSd(':/?#');$Rd=ySd(':/?#');aSd=vSd('/?#');bSd=ySd('/?#');a=new _sb;a.a.zc('jar',a);a.a.zc('zip',a);a.a.zc('archive',a);eSd=(yob(),new Lqb(a))} +function t0b(a,b,c,d,e,f){var g,h,i,j,k,l;g=null;j=d==(BEc(),yEc)?f.c:f.d;i=i2b(b);if(j.i==c){g=RD(Wjb(a.b,j),10);if(!g){g=f2b(j,RD(mQb(c,(yCc(),BBc)),101),e,p0b(j),null,j.n,j.o,i,b);pQb(g,(Ywc(),Awc),j);Zjb(a.b,j,g)}}else{g=f2b((k=new qQb,l=Kfb(UD(mQb(b,(yCc(),TBc))))/2,oQb(k,ABc,l),k),RD(mQb(c,BBc),101),e,d==yEc?-1:1,null,new pjd,new rjd(0,0),i,b);h=u0b(g,c,d);pQb(g,(Ywc(),Awc),h);Zjb(a.b,h,g)}RD(mQb(b,(Ywc(),kwc)),21).Fc((ovc(),hvc));Dod(RD(mQb(b,(yCc(),BBc)),101))?pQb(b,BBc,(Bod(),yod)):pQb(b,BBc,(Bod(),zod));return g} +function Yec(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;h=0;o=0;i=Fnb(a.g,a.g.length);f=a.e;g=a.j;d=a.b;e=a.c;do{n=0;for(k=new Anb(a.q);k.a<k.c.c.length;){j=RD(ynb(k),10);m=Wec(a,j);c=true;(a.r==(aEc(),VDc)||a.r==YDc)&&(c=Heb(TD(m.b)));if(RD(m.a,17).a<0&&c){++n;i=Fnb(a.g,a.g.length);a.e=a.e+RD(m.a,17).a;o+=f-a.e;f=a.e+RD(m.a,17).a;g=a.j;d=bv(a.b);e=bv(a.c)}else{a.g=Fnb(i,i.length);a.e=f;a.b=(Qb(d),d?new dnb(d):cv(new Anb(d)));a.c=(Qb(e),e?new dnb(e):cv(new Anb(e)));a.j=g}}++h;l=n!=0&&Heb(TD(b.Kb(new Ptd(sgb(o),sgb(h)))))}while(l)} +function e8c(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C;g=a.f;m=b.f;h=g==(sad(),nad)||g==pad;n=m==nad||m==pad;i=g==oad||g==qad;o=m==oad||m==qad;j=g==oad||g==nad;p=m==oad||m==nad;if(h&&n){return a.f==pad?a:b}else if(i&&o){return a.f==qad?a:b}else if(j&&p){if(g==oad){l=a;k=b}else{l=b;k=a}f=(q=c.j+c.f,r=l.e+d.f,s=$wnd.Math.max(q,r),t=s-$wnd.Math.min(c.j,l.e),u=l.d+d.g-c.i,u*t);e=(v=c.i+c.g,w=k.d+d.g,A=$wnd.Math.max(v,w),B=A-$wnd.Math.min(c.i,k.d),C=k.e+d.f-c.j,B*C);return f<=e?a.f==oad?a:b:a.f==nad?a:b}return a} +function t0c(a,b){var c,d,e,f,g,h,i,j,k,l;pQb(b,(q$c(),g$c),0);i=RD(mQb(b,c$c),40);if(b.d.b==0){if(i){k=Kfb(UD(mQb(i,j$c)))+a.b+u0c(a,i,b);pQb(b,j$c,k)}else{pQb(b,j$c,0)}}else{for(d=(f=Sub((new dXc(b)).a.d,0),new gXc(f));dvb(d.a);){c=RD(evb(d.a),65).c;t0c(a,c)}h=RD(Hr((g=Sub((new dXc(b)).a.d,0),new gXc(g))),40);l=RD(Gr((e=Sub((new dXc(b)).a.d,0),new gXc(e))),40);j=(Kfb(UD(mQb(l,j$c)))+Kfb(UD(mQb(h,j$c))))/2;if(i){k=Kfb(UD(mQb(i,j$c)))+a.b+u0c(a,i,b);pQb(b,j$c,k);pQb(b,g$c,Kfb(UD(mQb(b,j$c)))-j);s0c(a,b)}else{pQb(b,j$c,j)}}} +function nJb(a){var b,c,d,e,f,g,h,i,j,k,l;k=a.e.a.c.length;for(g=new Anb(a.e.a);g.a<g.c.c.length;){f=RD(ynb(g),125);f.j=false}a.i=$C(kE,Pwe,28,k,15,1);a.g=$C(kE,Pwe,28,k,15,1);a.n=new bnb;e=0;l=new bnb;for(i=new Anb(a.e.a);i.a<i.c.c.length;){h=RD(ynb(i),125);h.d=e++;h.b.a.c.length==0&&Rmb(a.n,h);Tmb(l,h.g)}b=0;for(d=new Anb(l);d.a<d.c.c.length;){c=RD(ynb(d),218);c.c=b++;c.f=false}j=l.c.length;if(a.b==null||a.b.length<j){a.b=$C(iE,vxe,28,j,15,1);a.c=$C(xdb,Hye,28,j,16,1)}else{Nnb(a.c)}a.d=l;a.p=new Jub(Sv(a.d.c.length));a.j=1} +function uWb(a,b){var c,d,e,f,g,h,i,j,k;if(b.e.c.length<=1){return}a.f=b;a.d=RD(mQb(a.f,(dWb(),UVb)),391);a.g=RD(mQb(a.f,YVb),17).a;a.e=Kfb(UD(mQb(a.f,VVb)));a.c=Kfb(UD(mQb(a.f,TVb)));At(a.b);for(e=new Anb(a.f.c);e.a<e.c.c.length;){d=RD(ynb(e),290);zt(a.b,d.c,d,null);zt(a.b,d.d,d,null)}h=a.f.e.c.length;a.a=YC(iE,[Nve,vxe],[109,28],15,[h,h],2);for(j=new Anb(a.f.e);j.a<j.c.c.length;){i=RD(ynb(j),153);qWb(a,i,a.a[i.a])}a.i=YC(iE,[Nve,vxe],[109,28],15,[h,h],2);for(f=0;f<h;++f){for(g=0;g<h;++g){c=a.a[f][g];k=1/(c*c);a.i[f][g]=k}}} +function OWb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;h=b.ah();h||b.Ug(Pze,1);c=RD(mQb(a,(Ywc(),Kwc)),15);g=1/c.gc();if(b._g()){b.bh('ELK Layered uses the following '+c.gc()+' modules:');n=0;for(m=c.Kc();m.Ob();){k=RD(m.Pb(),47);d=(n<10?'0':'')+n++;b.bh(' Slot '+d+': '+nfb(rb(k)))}}o=0;for(l=c.Kc();l.Ob();){k=RD(l.Pb(),47);if(b.$g()){return}k.Kf(a,b.eh(g));++o}for(f=new Anb(a.b);f.a<f.c.c.length;){e=RD(ynb(f),30);Tmb(a.a,e.a);e.a.c.length=0}for(j=new Anb(a.a);j.a<j.c.c.length;){i=RD(ynb(j),10);g3b(i,null)}a.b.c.length=0;h||b.Vg()} +function y9b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;j=new bnb;if(!nQb(a,(Ywc(),fwc))){return j}for(d=RD(mQb(a,fwc),15).Kc();d.Ob();){b=RD(d.Pb(),10);x9b(b,a);ZEb(j.c,b)}for(f=new Anb(a.b);f.a<f.c.c.length;){e=RD(ynb(f),30);for(h=new Anb(e.a);h.a<h.c.c.length;){g=RD(ynb(h),10);if(g.k!=(r3b(),m3b)){continue}i=RD(mQb(g,gwc),10);!!i&&(k=new R3b,P3b(k,g),l=RD(mQb(g,hwc),64),Q3b(k,l),m=RD(Vmb(i.j,0),12),n=new a1b,Y0b(n,k),Z0b(n,m),undefined)}}for(c=new Anb(j);c.a<c.c.c.length;){b=RD(ynb(c),10);g3b(b,RD(Vmb(a.b,a.b.c.length-1),30))}return j} +function U8c(a,b,c){var d,e,f,g,h,i,j,k,l;l=new bnb;k=new Had(0,c);f=0;Cad(k,new V9c(0,0,k,c));e=0;for(j=new dMd(a);j.e!=j.i.gc();){i=RD(bMd(j),27);d=RD(Vmb(k.a,k.a.c.length-1),172);h=e+i.g+(RD(Vmb(k.a,0),172).b.c.length==0?0:c);if(h>b||Heb(TD(Gxd(i,(X7c(),D7c))))){e=0;f+=k.b+c;ZEb(l.c,k);k=new Had(f,c);d=new V9c(0,k.f,k,c);Cad(k,d);e=0}if(d.b.c.length==0||!Heb(TD(Gxd(vCd(i),(X7c(),L7c))))&&(i.f>=d.o&&i.f<=d.f||d.a*0.5<=i.f&&d.a*1.5>=i.f)){K9c(d,i)}else{g=new V9c(d.s+d.r+c,k.f,k,c);Cad(k,g);K9c(g,i)}e=i.i+i.g}ZEb(l.c,k);return l} +function ste(a){var b,c,d,e;if(a.b==null||a.b.length<=2)return;if(a.a)return;b=0;e=0;while(e<a.b.length){if(b!=e){a.b[b]=a.b[e++];a.b[b+1]=a.b[e++]}else e+=2;c=a.b[b+1];while(e<a.b.length){if(c+1<a.b[e])break;if(c+1==a.b[e]){a.b[b+1]=a.b[e+1];c=a.b[b+1];e+=2}else if(c>=a.b[e+1]){e+=2}else if(c<a.b[e+1]){a.b[b+1]=a.b[e+1];c=a.b[b+1];e+=2}else{throw Adb(new yz('Token#compactRanges(): Internel Error: ['+a.b[b]+','+a.b[b+1]+'] ['+a.b[e]+','+a.b[e+1]+']'))}}b+=2}if(b!=a.b.length){d=$C(kE,Pwe,28,b,15,1);hib(a.b,0,d,0,b);a.b=d}a.a=true} +function x0b(a,b){var c,d,e,f,g,h,i;for(g=Ec(a.a).Kc();g.Ob();){f=RD(g.Pb(),18);if(f.b.c.length>0){d=new dnb(RD(Qc(a.a,f),21));yob();_mb(d,new M0b(b));e=new Jkb(f.b,0);while(e.b<e.d.gc()){c=(sFb(e.b<e.d.gc()),RD(e.d.Xb(e.c=e.b++),72));h=-1;switch(RD(mQb(c,(yCc(),wAc)),278).g){case 1:h=d.c.length-1;break;case 0:h=v0b(d);break;case 2:h=0;}if(h!=-1){i=(tFb(h,d.c.length),RD(d.c[h],249));Rmb(i.b.b,c);RD(mQb(Y2b(i.b.c.i),(Ywc(),kwc)),21).Fc((ovc(),gvc));RD(mQb(Y2b(i.b.c.i),kwc),21).Fc(evc);Ckb(e);pQb(c,Dwc,f)}}}Y0b(f,null);Z0b(f,null)}} +function wOb(a,b){var c,d,e,f;c=new BOb;d=RD(zDb(GDb(new SDb(null,new Swb(a.f,16)),c),sBb(new _Bb,new bCb,new yCb,new ACb,cD(WC(QL,1),jwe,108,0,[(xBb(),wBb),vBb]))),21);e=d.gc();e=e==2?1:0;e==1&&Gdb(Mdb(RD(zDb(CDb(d.Lc(),new DOb),PBb(Hgb(0),new uCb)),168).a,2),0)&&(e=0);d=RD(zDb(GDb(new SDb(null,new Swb(b.f,16)),c),sBb(new _Bb,new bCb,new yCb,new ACb,cD(WC(QL,1),jwe,108,0,[wBb,vBb]))),21);f=d.gc();f=f==2?1:0;f==1&&Gdb(Mdb(RD(zDb(CDb(d.Lc(),new FOb),PBb(Hgb(0),new uCb)),168).a,2),0)&&(f=0);if(e<f){return -1}if(e==f){return 0}return 1} +function W4b(a){var b,c,d,e,f,g,h,i,j,k,l,m;b=MCd(a);f=Heb(TD(Gxd(b,(yCc(),NAc))));k=0;e=0;for(j=new dMd((!a.e&&(a.e=new Yie(G4,a,7,4)),a.e));j.e!=j.i.gc();){i=RD(bMd(j),74);h=ozd(i);g=h&&f&&Heb(TD(Gxd(i,OAc)));m=AGd(RD(QHd((!i.c&&(i.c=new Yie(E4,i,5,8)),i.c),0),84));h&&g?++e:h&&!g?++k:vCd(m)==b||m==b?++e:++k}for(d=new dMd((!a.d&&(a.d=new Yie(G4,a,8,5)),a.d));d.e!=d.i.gc();){c=RD(bMd(d),74);h=ozd(c);g=h&&f&&Heb(TD(Gxd(c,OAc)));l=AGd(RD(QHd((!c.b&&(c.b=new Yie(E4,c,4,7)),c.b),0),84));h&&g?++k:h&&!g?++e:vCd(l)==b||l==b?++k:++e}return k-e} +function Jec(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;b.Ug('Edge splitting',1);if(a.b.c.length<=2){b.Vg();return}f=new Jkb(a.b,0);g=(sFb(f.b<f.d.gc()),RD(f.d.Xb(f.c=f.b++),30));while(f.b<f.d.gc()){e=g;g=(sFb(f.b<f.d.gc()),RD(f.d.Xb(f.c=f.b++),30));for(i=new Anb(e.a);i.a<i.c.c.length;){h=RD(ynb(i),10);for(k=new Anb(h.j);k.a<k.c.c.length;){j=RD(ynb(k),12);for(d=new Anb(j.g);d.a<d.c.c.length;){c=RD(ynb(d),18);m=c.d;l=m.i.c;l!=e&&l!=g&&Oec(c,(n=new j3b(a),h3b(n,(r3b(),o3b)),pQb(n,(Ywc(),Awc),c),pQb(n,(yCc(),BBc),(Bod(),wod)),g3b(n,g),n))}}}}b.Vg()} +function MLc(a,b){var c,d,e,f,g,h,i,j,k,l,m;k=new bnb;m=new _sb;g=b.b;for(e=0;e<g.c.length;e++){j=(tFb(e,g.c.length),RD(g.c[e],30)).a;k.c.length=0;for(f=0;f<j.c.length;f++){h=a.a[e][f];h.p=f;h.k==(r3b(),q3b)&&(ZEb(k.c,h),true);$mb(RD(Vmb(b.b,e),30).a,f,h);h.j.c.length=0;Tmb(h.j,RD(RD(Vmb(a.b,e),15).Xb(f),16));Cod(RD(mQb(h,(yCc(),BBc)),101))||pQb(h,BBc,(Bod(),vod))}for(d=new Anb(k);d.a<d.c.c.length;){c=RD(ynb(d),10);l=KLc(c);m.a.zc(l,m);m.a.zc(c,m)}}for(i=m.a.ec().Kc();i.Ob();){h=RD(i.Pb(),10);yob();_mb(h.j,(sgc(),mgc));h.i=true;V2b(h)}} +function zib(a){var b,c,d,e,f;if(a.g!=null){return a.g}if(a.a<32){a.g=zjb(Hdb(a.f),eE(a.e));return a.g}e=Ajb((!a.c&&(a.c=ojb(Hdb(a.f))),a.c),0);if(a.e==0){return e}b=(!a.c&&(a.c=ojb(Hdb(a.f))),a.c).e<0?2:1;c=e.length;d=-a.e+c-b;f=new bib;f.a+=''+e;if(a.e>0&&d>=-6){if(d>=0){aib(f,c-eE(a.e),String.fromCharCode(46))}else{peb(f,b-1,b-1,'0.');aib(f,b+1,Ihb(mib,0,-eE(d)-1))}}else{if(c-b>=1){aib(f,b,String.fromCharCode(46));++c}aib(f,c,String.fromCharCode(69));d>0&&aib(f,++c,String.fromCharCode(43));aib(f,++c,''+Zdb(Hdb(d)))}a.g=f.a;return a.g} +function KNc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;d=Kfb(UD(mQb(b,(yCc(),hBc))));v=RD(mQb(b,gCc),17).a;m=4;e=3;w=20/v;n=false;i=0;g=lve;do{f=i!=1;l=i!=0;A=0;for(q=a.a,s=0,u=q.length;s<u;++s){o=q[s];o.f=null;LNc(a,o,f,l,d);A+=$wnd.Math.abs(o.a)}do{h=PNc(a,b)}while(h);for(p=a.a,r=0,t=p.length;r<t;++r){o=p[r];c=XNc(o).a;if(c!=0){for(k=new Anb(o.e);k.a<k.c.c.length;){j=RD(ynb(k),10);j.n.b+=c}}}if(i==0||i==1){--m;if(m<=0&&(A<g||-m>v)){i=2;g=lve}else if(i==0){i=1;g=A}else{i=0;g=A}}else{n=A>=g||g-A<w;g=A;n&&--e}}while(!(n&&e<=0))} +function LFb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;o=new Tsb;for(f=a.a.ec().Kc();f.Ob();){d=RD(f.Pb(),177);Zjb(o,d,c.af(d))}g=(Qb(a),a?new dnb(a):cv(a.a.ec().Kc()));_mb(g,new NFb(o));h=Xx(g);i=new $Fb(b);n=new Tsb;rtb(n.f,b,i);while(h.a.gc()!=0){j=null;k=null;l=null;for(e=h.a.ec().Kc();e.Ob();){d=RD(e.Pb(),177);if(Kfb(UD(Wd(qtb(o.f,d))))<=oxe){if(Ujb(n,d.a)&&!Ujb(n,d.b)){k=d.b;l=d.a;j=d;break}if(Ujb(n,d.b)){if(!Ujb(n,d.a)){k=d.a;l=d.b;j=d;break}}}}if(!j){break}m=new $Fb(k);Rmb(RD(Wd(qtb(n.f,l)),225).a,m);rtb(n.f,k,m);h.a.Bc(j)!=null}return i} +function MFc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;c.Ug('Depth-first cycle removal',1);l=b.a;k=l.c.length;a.c=new bnb;a.d=$C(xdb,Hye,28,k,16,1);a.a=$C(xdb,Hye,28,k,16,1);a.b=new bnb;g=0;for(j=new Anb(l);j.a<j.c.c.length;){i=RD(ynb(j),10);i.p=g;gr(Z2b(i))&&Rmb(a.c,i);++g}for(n=new Anb(a.c);n.a<n.c.c.length;){m=RD(ynb(n),10);LFc(a,m)}for(f=0;f<k;f++){if(!a.d[f]){h=(tFb(f,l.c.length),RD(l.c[f],10));LFc(a,h)}}for(e=new Anb(a.b);e.a<e.c.c.length;){d=RD(ynb(e),18);X0b(d,true);pQb(b,(Ywc(),awc),(Geb(),true))}a.c=null;a.d=null;a.a=null;a.b=null;c.Vg()} +function Kid(a,b){tid();var c,d,e,f,g,h;f=b.c-(a.c+a.b);e=a.c-(b.c+b.b);g=a.d-(b.d+b.a);c=b.d-(a.d+a.a);d=$wnd.Math.max(e,f);h=$wnd.Math.max(g,c);Zy();bz(vEe);if(($wnd.Math.abs(d)<=vEe||d==0||isNaN(d)&&isNaN(0)?0:d<0?-1:d>0?1:cz(isNaN(d),isNaN(0)))>=0^(null,bz(vEe),($wnd.Math.abs(h)<=vEe||h==0||isNaN(h)&&isNaN(0)?0:h<0?-1:h>0?1:cz(isNaN(h),isNaN(0)))>=0)){return $wnd.Math.max(h,d)}bz(vEe);if(($wnd.Math.abs(d)<=vEe||d==0||isNaN(d)&&isNaN(0)?0:d<0?-1:d>0?1:cz(isNaN(d),isNaN(0)))>0){return $wnd.Math.sqrt(h*h+d*d)}return -$wnd.Math.sqrt(h*h+d*d)} +function hue(a,b){var c,d,e,f,g,h;if(!b)return;!a.a&&(a.a=new gyb);if(a.e==2){dyb(a.a,b);return}if(b.e==1){for(e=0;e<b.Pm();e++)hue(a,b.Lm(e));return}h=a.a.a.c.length;if(h==0){dyb(a.a,b);return}g=RD(eyb(a.a,h-1),122);if(!((g.e==0||g.e==10)&&(b.e==0||b.e==10))){dyb(a.a,b);return}f=b.e==0?2:b.Mm().length;if(g.e==0){c=new Rhb;d=g.Km();d>=txe?Nhb(c,qse(d)):Jhb(c,d&Bwe);g=(++Use,new eue(10,null,0));fyb(a.a,g,h-1)}else{c=(g.Mm().length+f,new Rhb);Nhb(c,g.Mm())}if(b.e==0){d=b.Km();d>=txe?Nhb(c,qse(d)):Jhb(c,d&Bwe)}else{Nhb(c,b.Mm())}RD(g,530).b=c.a} +function Qsc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(c.dc()){return}h=0;m=0;d=c.Kc();o=RD(d.Pb(),17).a;while(h<b.f){if(h==o){m=0;d.Ob()?(o=RD(d.Pb(),17).a):(o=b.f+1)}if(h!=m){q=RD(Vmb(a.b,h),30);n=RD(Vmb(a.b,m),30);p=bv(q.a);for(l=new Anb(p);l.a<l.c.c.length;){k=RD(ynb(l),10);f3b(k,n.a.c.length,n);if(m==0){g=bv(Z2b(k));for(f=new Anb(g);f.a<f.c.c.length;){e=RD(ynb(f),18);X0b(e,true);pQb(a,(Ywc(),awc),(Geb(),true));osc(a,e,1)}}}}++m;++h}i=new Jkb(a.b,0);while(i.b<i.d.gc()){j=(sFb(i.b<i.d.gc()),RD(i.d.Xb(i.c=i.b++),30));j.a.c.length==0&&Ckb(i)}} +function Xjc(a,b,c){var d,e,f;e=RD(mQb(b,(yCc(),Xzc)),282);if(e==($uc(),Yuc)){return}c.Ug('Horizontal Compaction',1);a.a=b;f=new Ckc;d=new VGb((f.d=b,f.c=RD(mQb(f.d,yAc),223),tkc(f),Akc(f),zkc(f),f.a));TGb(d,a.b);switch(RD(mQb(b,Wzc),431).g){case 1:RGb(d,new Pic(a.a));break;default:RGb(d,(FGb(),DGb));}switch(e.g){case 1:KGb(d);break;case 2:KGb(JGb(d,(Cmd(),zmd)));break;case 3:KGb(SGb(JGb(KGb(d),(Cmd(),zmd)),new fkc));break;case 4:KGb(SGb(JGb(KGb(d),(Cmd(),zmd)),new hkc(f)));break;case 5:KGb(QGb(d,Vjc));}JGb(d,(Cmd(),ymd));d.e=true;qkc(f);c.Vg()} +function bqc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;g=b.b;k=g.o;i=g.d;d=Kfb(UD(k2b(g,(yCc(),TBc))));e=Kfb(UD(k2b(g,VBc)));j=Kfb(UD(k2b(g,dCc)));h=new T2b;D2b(h,i.d,i.c,i.a,i.b);m=Zpc(b,d,e,j);for(r=new Anb(b.d);r.a<r.c.c.length;){q=RD(ynb(r),105);for(o=q.f.a.ec().Kc();o.Ob();){n=RD(o.Pb(),340);f=n.a;l=Xpc(n);c=(s=new Ejd,Vpc(n,n.c,m,s),Upc(n,l,m,s),Vpc(n,n.d,m,s),s);c=a.ng(n,l,c);Xub(f.a);ye(f.a,c);FDb(new SDb(null,new Swb(c,16)),new fqc(k,h))}p=q.i;if(p){aqc(q,p,m,e);t=new sjd(p.g);cqc(k,h,t);$id(t,p.j);cqc(k,h,t)}}D2b(i,h.d,h.c,h.a,h.b)} +function f8c(a,b,c,d,e,f,g,h){var i,j,k,l;i=dv(cD(WC(y1,1),rve,238,0,[b,c,d,e]));l=null;switch(a.b.g){case 1:l=dv(cD(WC(h1,1),rve,535,0,[new r8c,new h8c,new j8c]));break;case 0:l=dv(cD(WC(h1,1),rve,535,0,[new j8c,new h8c,new r8c]));break;case 2:l=dv(cD(WC(h1,1),rve,535,0,[new h8c,new r8c,new j8c]));}for(k=new Anb(l);k.a<k.c.c.length;){j=RD(ynb(k),535);i.c.length>1&&(i=j.Hg(i,a.a,h))}if(i.c.length==1){return RD(Vmb(i,i.c.length-1),238)}if(i.c.length==2){return e8c((tFb(0,i.c.length),RD(i.c[0],238)),(tFb(1,i.c.length),RD(i.c[1],238)),g,f)}return null} +function CZc(a,b,c){var d,e,f,g,h,i,j;c.Ug('Find roots',1);a.a.c.length=0;for(e=Sub(b.b,0);e.b!=e.d.c;){d=RD(evb(e),40);if(d.b.b==0){pQb(d,(q$c(),n$c),(Geb(),true));Rmb(a.a,d)}}switch(a.a.c.length){case 0:f=new bXc(0,b,'DUMMY_ROOT');pQb(f,(q$c(),n$c),(Geb(),true));pQb(f,WZc,true);Mub(b.b,f);break;case 1:break;default:g=new bXc(0,b,IEe);for(i=new Anb(a.a);i.a<i.c.c.length;){h=RD(ynb(i),40);j=new WWc(g,h);pQb(j,(q$c(),WZc),(Geb(),true));Mub(g.a.a,j);Mub(g.d,j);Mub(h.b,j);pQb(h,n$c,false)}pQb(g,(q$c(),n$c),(Geb(),true));pQb(g,WZc,true);Mub(b.b,g);}c.Vg()} +function AQb(a){var b,c,d,e,f,g;Umb(a.a,new GQb);for(c=new Anb(a.a);c.a<c.c.c.length;){b=RD(ynb(c),225);d=ojd(ajd(RD(a.b,68).c),RD(b.b,68).c);if(wQb){g=RD(a.b,68).b;f=RD(b.b,68).b;if($wnd.Math.abs(d.a)>=$wnd.Math.abs(d.b)){d.b=0;f.d+f.a>g.d&&f.d<g.d+g.a&&kjd(d,$wnd.Math.max(g.c-(f.c+f.b),f.c-(g.c+g.b)))}else{d.a=0;f.c+f.b>g.c&&f.c<g.c+g.b&&kjd(d,$wnd.Math.max(g.d-(f.d+f.a),f.d-(g.d+g.a)))}}else{kjd(d,SQb(RD(a.b,68),RD(b.b,68)))}e=$wnd.Math.sqrt(d.a*d.a+d.b*d.b);e=CQb(xQb,b,e,d);kjd(d,e);RQb(RD(b.b,68),d);Umb(b.a,new IQb(d));RD(xQb.b,68);BQb(xQb,yQb,b)}} +function tOc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;a.f=new BIb;j=0;e=0;for(g=new Anb(a.e.b);g.a<g.c.c.length;){f=RD(ynb(g),30);for(i=new Anb(f.a);i.a<i.c.c.length;){h=RD(ynb(i),10);h.p=j++;for(d=new is(Mr(a3b(h).a.Kc(),new ir));gs(d);){c=RD(hs(d),18);c.p=e++}b=BOc(h);for(m=new Anb(h.j);m.a<m.c.c.length;){l=RD(ynb(m),12);if(b){o=l.a.b;if(o!=$wnd.Math.floor(o)){k=o-Xdb(Hdb($wnd.Math.round(o)));l.a.b-=k}}n=l.n.b+l.a.b;if(n!=$wnd.Math.floor(n)){k=n-Xdb(Hdb($wnd.Math.round(n)));l.n.b-=k}}}}a.g=j;a.b=e;a.i=$C(XY,rve,412,j,0,1);a.c=$C(WY,rve,655,e,0,1);a.d.a.$b()} +function sLd(a){var b,c,d,e,f,g,h,i,j;if(a.Pj()){i=a.Qj();if(a.i>0){b=new zNd(a.i,a.g);c=a.i;f=c<100?null:new gLd(c);if(a.Tj()){for(d=0;d<a.i;++d){g=a.g[d];f=a.Vj(g,f)}}OHd(a);e=c==1?a.Ij(4,QHd(b,0),null,0,i):a.Ij(6,b,null,-1,i);if(a.Mj()){for(d=new yMd(b);d.e!=d.i.gc();){f=a.Oj(xMd(d),f)}if(!f){a.Jj(e)}else{f.nj(e);f.oj()}}else{if(!f){a.Jj(e)}else{f.nj(e);f.oj()}}}else{OHd(a);a.Jj(a.Ij(6,(yob(),vob),null,-1,i))}}else if(a.Mj()){if(a.i>0){h=a.g;j=a.i;OHd(a);f=j<100?null:new gLd(j);for(d=0;d<j;++d){g=h[d];f=a.Oj(g,f)}!!f&&f.oj()}else{OHd(a)}}else{OHd(a)}} +function xVc(a,b,c){var d,e,f,g,h,i,j,k,l,m;rVc(this);c==(dVc(),bVc)?Ysb(this.r,a):Ysb(this.w,a);k=oxe;j=pxe;for(g=b.a.ec().Kc();g.Ob();){e=RD(g.Pb(),42);h=RD(e.a,465);d=RD(e.b,18);i=d.c;i==a&&(i=d.d);h==bVc?Ysb(this.r,i):Ysb(this.w,i);m=(qpd(),hpd).Hc(i.j)?Kfb(UD(mQb(i,(Ywc(),Swc)))):xjd(cD(WC(l3,1),Nve,8,0,[i.i.n,i.n,i.a])).b;k=$wnd.Math.min(k,m);j=$wnd.Math.max(j,m)}l=(qpd(),hpd).Hc(a.j)?Kfb(UD(mQb(a,(Ywc(),Swc)))):xjd(cD(WC(l3,1),Nve,8,0,[a.i.n,a.n,a.a])).b;vVc(this,l,k,j);for(f=b.a.ec().Kc();f.Ob();){e=RD(f.Pb(),42);sVc(this,RD(e.b,18))}this.o=false} +function wD(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;c=a.l&8191;d=a.l>>13|(a.m&15)<<9;e=a.m>>4&8191;f=a.m>>17|(a.h&255)<<5;g=(a.h&1048320)>>8;h=b.l&8191;i=b.l>>13|(b.m&15)<<9;j=b.m>>4&8191;k=b.m>>17|(b.h&255)<<5;l=(b.h&1048320)>>8;B=c*h;C=d*h;D=e*h;F=f*h;G=g*h;if(i!=0){C+=c*i;D+=d*i;F+=e*i;G+=f*i}if(j!=0){D+=c*j;F+=d*j;G+=e*j}if(k!=0){F+=c*k;G+=d*k}l!=0&&(G+=c*l);n=B&dxe;o=(C&511)<<13;m=n+o;q=B>>22;r=C>>9;s=(D&262143)<<4;t=(F&31)<<17;p=q+r+s+t;v=D>>18;w=F>>5;A=(G&4095)<<8;u=v+w+A;p+=m>>22;m&=dxe;u+=p>>22;p&=dxe;u&=exe;return hD(m,p,u)} +function Fac(a){var b,c,d,e,f,g,h;h=RD(Vmb(a.j,0),12);if(h.g.c.length!=0&&h.e.c.length!=0){throw Adb(new dgb('Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges.'))}if(h.g.c.length!=0){f=oxe;for(c=new Anb(h.g);c.a<c.c.c.length;){b=RD(ynb(c),18);g=b.d.i;d=RD(mQb(g,(yCc(),_Ac)),140);f=$wnd.Math.min(f,g.n.a-d.b)}return new cc(Qb(f))}if(h.e.c.length!=0){e=pxe;for(c=new Anb(h.e);c.a<c.c.c.length;){b=RD(ynb(c),18);g=b.c.i;d=RD(mQb(g,(yCc(),_Ac)),140);e=$wnd.Math.max(e,g.n.a+g.o.a+d.c)}return new cc(Qb(e))}return wb(),wb(),vb} +function cZd(a,b){var c,d,e,f,g,h,i;if(a.ol()){if(a.i>4){if(a.fk(b)){if(a.al()){e=RD(b,54);d=e.Eh();i=d==a.e&&(a.ml()?e.yh(e.Fh(),a.il())==a.jl():-1-e.Fh()==a.Lj());if(a.nl()&&!i&&!d&&!!e.Jh()){for(f=0;f<a.i;++f){c=a.pl(RD(a.g[f],58));if(dE(c)===dE(b)){return true}}}return i}else if(a.ml()&&!a.ll()){g=RD(b,58).Mh(Z5d(RD(a.Lk(),19)));if(dE(g)===dE(a.e)){return true}else if(g==null||!RD(g,58).Vh()){return false}}}else{return false}}h=PHd(a,b);if(a.nl()&&!h){for(f=0;f<a.i;++f){e=a.pl(RD(a.g[f],58));if(dE(e)===dE(b)){return true}}}return h}else{return PHd(a,b)}} +function bGc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;c.Ug('Interactive cycle breaking',1);l=new bnb;for(n=new Anb(b.a);n.a<n.c.c.length;){m=RD(ynb(n),10);m.p=1;o=_2b(m).a;for(k=c3b(m,(BEc(),zEc)).Kc();k.Ob();){j=RD(k.Pb(),12);for(f=new Anb(j.g);f.a<f.c.c.length;){d=RD(ynb(f),18);p=d.d.i;if(p!=m){q=_2b(p).a;q<o&&(ZEb(l.c,d),true)}}}}for(g=new Anb(l);g.a<g.c.c.length;){d=RD(ynb(g),18);X0b(d,true)}l.c.length=0;for(i=new Anb(b.a);i.a<i.c.c.length;){h=RD(ynb(i),10);h.p>0&&aGc(a,h,l)}for(e=new Anb(l);e.a<e.c.c.length;){d=RD(ynb(e),18);X0b(d,true)}l.c.length=0;c.Vg()} +function mMc(a,b){var c,d,e,f,g,h,i,j,k;c=0;k=new bnb;for(h=new Anb(b);h.a<h.c.c.length;){g=RD(ynb(h),12);$Lc(a.b,a.d[g.p]);k.c.length=0;switch(g.i.k.g){case 0:d=RD(mQb(g,(Ywc(),Iwc)),10);Umb(d.j,new XMc(k));break;case 1:Mvb(DDb(CDb(new SDb(null,new Swb(g.i.j,16)),new ZMc(g))),new aNc(k));break;case 3:e=RD(mQb(g,(Ywc(),Awc)),12);Rmb(k,new Ptd(e,sgb(g.e.c.length+g.g.c.length)));}for(j=new Anb(k);j.a<j.c.c.length;){i=RD(ynb(j),42);f=AMc(a,RD(i.a,12));if(f>a.d[g.p]){c+=ZLc(a.b,f)*RD(i.b,17).a;hmb(a.a,sgb(f))}}while(!nmb(a.a)){XLc(a.b,RD(smb(a.a),17).a)}}return c} +function x9b(a,b){var c,d,e,f,g,h,i,j,k,l;k=RD(mQb(a,(Ywc(),hwc)),64);d=RD(Vmb(a.j,0),12);k==(qpd(),Yod)?Q3b(d,npd):k==npd&&Q3b(d,Yod);if(RD(mQb(b,(yCc(),lBc)),181).Hc((Qpd(),Ppd))){i=Kfb(UD(mQb(a,_Bc)));j=Kfb(UD(mQb(a,aCc)));g=Kfb(UD(mQb(a,ZBc)));h=RD(mQb(b,EBc),21);if(h.Hc((Pod(),Lod))){c=j;l=a.o.a/2-d.n.a;for(f=new Anb(d.f);f.a<f.c.c.length;){e=RD(ynb(f),72);e.n.b=c;e.n.a=l-e.o.a/2;c+=e.o.b+g}}else if(h.Hc(Nod)){for(f=new Anb(d.f);f.a<f.c.c.length;){e=RD(ynb(f),72);e.n.a=i+a.o.a-d.n.a}}NJb(new PJb((i1b(),new t1b(b,false,false,new _1b))),new F1b(null,a,false))}} +function ykc(a,b){var c,d,e,f,g,h,i,j,k;if(b.c.length==0){return}yob();Ynb(b.c,b.c.length,null);e=new Anb(b);d=RD(ynb(e),154);while(e.a<e.c.c.length){c=RD(ynb(e),154);if(rGb(d.e.c,c.e.c)&&!(uGb(Mid(d.e).b,c.e.d)||uGb(Mid(c.e).b,d.e.d))){d=(Tmb(d.k,c.k),Tmb(d.b,c.b),Tmb(d.c,c.c),ye(d.i,c.i),Tmb(d.d,c.d),Tmb(d.j,c.j),f=$wnd.Math.min(d.e.c,c.e.c),g=$wnd.Math.min(d.e.d,c.e.d),h=$wnd.Math.max(d.e.c+d.e.b,c.e.c+c.e.b),i=h-f,j=$wnd.Math.max(d.e.d+d.e.a,c.e.d+c.e.a),k=j-g,Rid(d.e,f,g,i,k),$Gb(d.f,c.f),!d.a&&(d.a=c.a),Tmb(d.g,c.g),Rmb(d.g,c),d)}else{Bkc(a,d);d=c}}Bkc(a,d)} +function B0b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;i=new bnb;for(f=new Anb(b.a);f.a<f.c.c.length;){e=RD(ynb(f),10);for(h=new Anb(e.j);h.a<h.c.c.length;){g=RD(ynb(h),12);k=null;for(t=s2b(g.g),u=0,v=t.length;u<v;++u){s=t[u];if(!n2b(s.d.i,c)){r=w0b(a,b,c,s,s.c,(BEc(),zEc),k);r!=k&&(ZEb(i.c,r),true);r.c&&(k=r)}}j=null;for(o=s2b(g.e),p=0,q=o.length;p<q;++p){n=o[p];if(!n2b(n.c.i,c)){r=w0b(a,b,c,n,n.d,(BEc(),yEc),j);r!=j&&(ZEb(i.c,r),true);r.c&&(j=r)}}}}for(m=new Anb(i);m.a<m.c.c.length;){l=RD(ynb(m),453);Wmb(b.a,l.a,0)!=-1||Rmb(b.a,l.a);l.c&&(ZEb(d.c,l),true)}} +function hrd(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q;l=new sjd(RD(Gxd(a,(hkd(),bkd)),8));l.a=$wnd.Math.max(l.a-c.b-c.c,0);l.b=$wnd.Math.max(l.b-c.d-c.a,0);e=UD(Gxd(a,Xjd));(e==null||(uFb(e),e)<=0)&&(e=1.3);h=new bnb;for(o=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));o.e!=o.i.gc();){n=RD(bMd(o),27);g=new Ard(n);ZEb(h.c,g)}m=RD(Gxd(a,Yjd),320);switch(m.g){case 3:q=erd(h,b,l.a,l.b,(j=d,uFb(e),e,j));break;case 1:q=drd(h,b,l.a,l.b,(k=d,uFb(e),e,k));break;default:q=frd(h,b,l.a,l.b,(i=d,uFb(e),e,i));}f=new zrd(q);p=ird(f,b,c,l.a,l.b,d,(uFb(e),e));Esd(a,p.a,p.b,false,true)} +function m2b(a,b,c,d){var e,f,g,h,i,j;h=a.j;if(h==(qpd(),opd)&&b!=(Bod(),zod)&&b!=(Bod(),Aod)){h=c2b(a,c);Q3b(a,h);!(!a.q?(yob(),yob(),wob):a.q)._b((yCc(),ABc))&&h!=opd&&(a.n.a!=0||a.n.b!=0)&&pQb(a,ABc,b2b(a,h))}if(b==(Bod(),xod)){j=0;switch(h.g){case 1:case 3:f=a.i.o.a;f>0&&(j=a.n.a/f);break;case 2:case 4:e=a.i.o.b;e>0&&(j=a.n.b/e);}pQb(a,(Ywc(),Jwc),j)}i=a.o;g=a.a;if(d){g.a=d.a;g.b=d.b;a.d=true}else if(b!=zod&&b!=Aod&&h!=opd){switch(h.g){case 1:g.a=i.a/2;break;case 2:g.a=i.a;g.b=i.b/2;break;case 3:g.a=i.a/2;g.b=i.b;break;case 4:g.b=i.b/2;}}else{g.a=i.a/2;g.b=i.b/2}} +function VJd(a){var b,c,d,e,f,g,h,i,j,k;if(a.Pj()){k=a.Ej();i=a.Qj();if(k>0){b=new $Hd(a.pj());c=k;f=c<100?null:new gLd(c);aJd(a,c,b.g);e=c==1?a.Ij(4,QHd(b,0),null,0,i):a.Ij(6,b,null,-1,i);if(a.Mj()){for(d=new dMd(b);d.e!=d.i.gc();){f=a.Oj(bMd(d),f)}if(!f){a.Jj(e)}else{f.nj(e);f.oj()}}else{if(!f){a.Jj(e)}else{f.nj(e);f.oj()}}}else{aJd(a,a.Ej(),a.Fj());a.Jj(a.Ij(6,(yob(),vob),null,-1,i))}}else if(a.Mj()){k=a.Ej();if(k>0){h=a.Fj();j=k;aJd(a,k,h);f=j<100?null:new gLd(j);for(d=0;d<j;++d){g=h[d];f=a.Oj(g,f)}!!f&&f.oj()}else{aJd(a,a.Ej(),a.Fj())}}else{aJd(a,a.Ej(),a.Fj())}} +function frd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q;h=$C(iE,vxe,28,a.c.length,15,1);m=new pwb(new Qrd);iwb(m,a);j=0;p=new bnb;while(m.b.c.length!=0){g=RD(m.b.c.length==0?null:Vmb(m.b,0),163);if(j>1&&urd(g)*trd(g)/2>h[0]){f=0;while(f<p.c.length-1&&urd(g)*trd(g)/2>h[f]){++f}o=new Rkb(p,0,f+1);l=new zrd(o);k=urd(g)/trd(g);i=ird(l,b,new z3b,c,d,e,k);$id(hjd(l.e),i);zFb(lwb(m,l),Bxe);n=new Rkb(p,f+1,p.c.length);iwb(m,n);p.c.length=0;j=0;Pnb(h,h.length,0)}else{q=m.b.c.length==0?null:Vmb(m.b,0);q!=null&&owb(m,0);j>0&&(h[j]=h[j-1]);h[j]+=urd(g)*trd(g);++j;ZEb(p.c,g)}}return p} +function _nc(a,b){var c,d,e,f;c=b.b;f=new dnb(c.j);e=0;d=c.j;d.c.length=0;Nnc(RD($i(a.b,(qpd(),Yod),(joc(),ioc)),15),c);e=Onc(f,e,new Hoc,d);Nnc(RD($i(a.b,Yod,hoc),15),c);e=Onc(f,e,new Joc,d);Nnc(RD($i(a.b,Yod,goc),15),c);Nnc(RD($i(a.b,Xod,ioc),15),c);Nnc(RD($i(a.b,Xod,hoc),15),c);e=Onc(f,e,new Loc,d);Nnc(RD($i(a.b,Xod,goc),15),c);Nnc(RD($i(a.b,npd,ioc),15),c);e=Onc(f,e,new Noc,d);Nnc(RD($i(a.b,npd,hoc),15),c);e=Onc(f,e,new Poc,d);Nnc(RD($i(a.b,npd,goc),15),c);Nnc(RD($i(a.b,ppd,ioc),15),c);e=Onc(f,e,new toc,d);Nnc(RD($i(a.b,ppd,hoc),15),c);Nnc(RD($i(a.b,ppd,goc),15),c)} +function jJc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;for(h=new Anb(b);h.a<h.c.c.length;){f=RD(ynb(h),239);f.e=null;f.c=0}i=null;for(g=new Anb(b);g.a<g.c.c.length;){f=RD(ynb(g),239);l=f.d[0];if(c&&l.k!=(r3b(),p3b)){continue}for(n=RD(mQb(l,(Ywc(),qwc)),15).Kc();n.Ob();){m=RD(n.Pb(),10);if(!c||m.k==(r3b(),p3b)){(!f.e&&(f.e=new bnb),f.e).Fc(a.b[m.c.p][m.p]);++a.b[m.c.p][m.p].c}}if(!c&&l.k==(r3b(),p3b)){if(i){for(k=RD(Qc(a.d,i),21).Kc();k.Ob();){j=RD(k.Pb(),10);for(e=RD(Qc(a.d,l),21).Kc();e.Ob();){d=RD(e.Pb(),10);wJc(a.b[j.c.p][j.p]).Fc(a.b[d.c.p][d.p]);++a.b[d.c.p][d.p].c}}}i=l}}} +function iGc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;c.Ug('Model order cycle breaking',1);a.a=0;a.b=0;n=new bnb;k=b.a.c.length;for(j=new Anb(b.a);j.a<j.c.c.length;){i=RD(ynb(j),10);nQb(i,(Ywc(),zwc))&&(k=$wnd.Math.max(k,RD(mQb(i,zwc),17).a+1))}for(p=new Anb(b.a);p.a<p.c.c.length;){o=RD(ynb(p),10);g=hGc(a,o,k);for(m=c3b(o,(BEc(),zEc)).Kc();m.Ob();){l=RD(m.Pb(),12);for(f=new Anb(l.g);f.a<f.c.c.length;){d=RD(ynb(f),18);q=d.d.i;h=hGc(a,q,k);h<g&&(ZEb(n.c,d),true)}}}for(e=new Anb(n);e.a<e.c.c.length;){d=RD(ynb(e),18);X0b(d,true);pQb(b,(Ywc(),awc),(Geb(),true))}n.c.length=0;c.Vg()} +function qUb(a,b,c){var d,e,f,g,h,i,j,k,l,m;g=b.d;h=c.d;while(g.a-h.a==0&&g.b-h.b==0){i=false;if(ZD(b,250)&&ZD(c,250)&&!i){j=RD(b,250).a;k=ojd(new sjd($Tb(j)),ZTb(j));d=2;e=new rjd(k.a/$wnd.Math.sqrt(k.a*k.a+k.b*k.b)*d,-k.b/$wnd.Math.sqrt(k.a*k.a+k.b*k.b)*d);$id(g,e);l=RD(c,250).a;m=ojd(new sjd($Tb(l)),ZTb(l));d=k==m?-2:2;f=new rjd(m.a/$wnd.Math.sqrt(m.a*m.a+m.b*m.b)*d,-(m.b/$wnd.Math.sqrt(m.a*m.a+m.b*m.b))*d);$id(g,f);i=true}else{g.a+=Kwb(a,26)*Kxe+Kwb(a,27)*Lxe-0.5;g.b+=Kwb(a,26)*Kxe+Kwb(a,27)*Lxe-0.5;h.a+=Kwb(a,26)*Kxe+Kwb(a,27)*Lxe-0.5;h.b+=Kwb(a,26)*Kxe+Kwb(a,27)*Lxe-0.5}}} +function NWb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;j=KWb(b);q=RD(mQb(b,(yCc(),oAc)),322);xgb(j,new UWb(q));r=RD(mQb(b,gAc),299);xgb(j,new WWb(r));p=0;k=new bnb;for(f=new Kmb(j);f.a!=f.b;){e=RD(Imb(f),36);cXb(a.c,e);m=RD(mQb(e,(Ywc(),Kwc)),15);p+=m.gc();d=m.Kc();Rmb(k,new Ptd(e,d))}c.Ug('Recursive hierarchical layout',p);o=0;n=RD(RD(Vmb(k,k.c.length-1),42).b,51);while(n.Ob()){for(i=new Anb(k);i.a<i.c.c.length;){h=RD(ynb(i),42);m=RD(h.b,51);g=RD(h.a,36);while(m.Ob()){l=RD(m.Pb(),47);if(ZD(l,514)){if(!g.e){l.Kf(g,c.eh(1));++o;break}else{break}}else{l.Kf(g,c.eh(1));++o}}}}c.Vg()} +function Cec(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;b.Ug('Layer size calculation',1);k=oxe;j=pxe;e=false;for(h=new Anb(a.b);h.a<h.c.c.length;){g=RD(ynb(h),30);i=g.c;i.a=0;i.b=0;if(g.a.c.length==0){continue}e=true;for(m=new Anb(g.a);m.a<m.c.c.length;){l=RD(ynb(m),10);o=l.o;n=l.d;i.a=$wnd.Math.max(i.a,o.a+n.b+n.c)}d=RD(Vmb(g.a,0),10);p=d.n.b-d.d.d;d.k==(r3b(),m3b)&&(p-=RD(mQb(a,(yCc(),eCc)),140).d);f=RD(Vmb(g.a,g.a.c.length-1),10);c=f.n.b+f.o.b+f.d.a;f.k==m3b&&(c+=RD(mQb(a,(yCc(),eCc)),140).a);i.b=c-p;k=$wnd.Math.min(k,p);j=$wnd.Math.max(j,c)}if(!e){k=0;j=0}a.f.b=j-k;a.c.b-=k;b.Vg()} +function p2b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;f=0;g=0;for(j=new Anb(a.a);j.a<j.c.c.length;){h=RD(ynb(j),10);f=$wnd.Math.max(f,h.d.b);g=$wnd.Math.max(g,h.d.c)}for(i=new Anb(a.a);i.a<i.c.c.length;){h=RD(ynb(i),10);c=RD(mQb(h,(yCc(),Rzc)),255);switch(c.g){case 1:o=0;break;case 2:o=1;break;case 5:o=0.5;break;default:d=0;l=0;for(n=new Anb(h.j);n.a<n.c.c.length;){m=RD(ynb(n),12);m.e.c.length==0||++d;m.g.c.length==0||++l}d+l==0?(o=0.5):(o=l/(d+l));}q=a.c;k=h.o.a;r=(q.a-k)*o;o>0.5?(r-=g*2*(o-0.5)):o<0.5&&(r+=f*2*(0.5-o));e=h.d.b;r<e&&(r=e);p=h.d.c;r>q.a-p-k&&(r=q.a-p-k);h.n.a=b+r}} +function jec(a){var b,c,d,e,f;d=RD(mQb(a,(yCc(),UAc)),171);if(d==(cxc(),$wc)){for(c=new is(Mr(Z2b(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),18);if(!lec(b)){throw Adb(new Jed(nBe+X2b(a)+"' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. "+'FIRST_SEPARATE nodes must not have incoming edges.'))}}}else if(d==axc){for(f=new is(Mr(a3b(a).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);if(!lec(e)){throw Adb(new Jed(nBe+X2b(a)+"' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. "+'LAST_SEPARATE nodes must not have outgoing edges.'))}}}} +function Qed(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(a.e&&a.c.c<a.f){throw Adb(new dgb('Expected '+a.f+' phases to be configured; '+'only found '+a.c.c))}k=RD(mfb(a.g),9);n=ev(a.f);for(f=k,h=0,j=f.length;h<j;++h){d=f[h];l=RD(Med(a,d.g),188);l?Rmb(n,RD(Ted(a,l),106)):(n.c.push(null),undefined,true)}o=new ufd;FDb(CDb(GDb(CDb(new SDb(null,new Swb(n,16)),new Zed),new _ed(b)),new bfd),new dfd(o));ofd(o,a.a);c=new bnb;for(e=k,g=0,i=e.length;g<i;++g){d=e[g];Tmb(c,Ued(a,Ux(RD(Med(o,d.g),20))));m=RD(Vmb(n,d.g),106);!!m&&(ZEb(c.c,m),true)}Tmb(c,Ued(a,Ux(RD(Med(o,k[k.length-1].g+1),20))));return c} +function Frc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;m=new bnb;e=new bnb;p=null;for(h=b.Kc();h.Ob();){g=RD(h.Pb(),17);f=new Trc(g.a);ZEb(e.c,f);if(p){f.d=p;p.e=f}p=f}t=Erc(a);for(k=0;k<e.c.length;++k){n=null;q=Src((tFb(0,e.c.length),RD(e.c[0],661)));c=null;d=oxe;for(l=1;l<a.b.c.length;++l){r=q?$wnd.Math.abs(q.b-l):$wnd.Math.abs(l-n.b)+1;o=n?$wnd.Math.abs(l-n.b):r+1;if(o<r){j=n;i=o}else{j=q;i=r}s=(u=Kfb(UD(mQb(a,(yCc(),sCc)))),t[l]+$wnd.Math.pow(i,u));if(s<d){d=s;c=j;c.c=l}if(!!q&&l==q.b){n=q;q=Nrc(q)}}if(c){Rmb(m,sgb(c.c));c.a=true;Orc(c)}}yob();Ynb(m.c,m.c.length,null);return m} +function iD(a,b,c){var d,e,f,g,h,i;if(b.l==0&&b.m==0&&b.h==0){throw Adb(new teb('divide by zero'))}if(a.l==0&&a.m==0&&a.h==0){c&&(eD=hD(0,0,0));return hD(0,0,0)}if(b.h==fxe&&b.m==0&&b.l==0){return jD(a,c)}i=false;if(b.h>>19!=0){b=xD(b);i=!i}g=pD(b);f=false;e=false;d=false;if(a.h==fxe&&a.m==0&&a.l==0){e=true;f=true;if(g==-1){a=gD((MD(),ID));d=true;i=!i}else{h=BD(a,g);i&&nD(h);c&&(eD=hD(0,0,0));return h}}else if(a.h>>19!=0){f=true;a=xD(a);d=true;i=!i}if(g!=-1){return kD(a,g,i,f,c)}if(uD(a,b)<0){c&&(f?(eD=xD(a)):(eD=hD(a.l,a.m,a.h)));return hD(0,0,0)}return lD(d?a:hD(a.l,a.m,a.h),b,i,f,e,c)} +function Bjb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;g=a.e;i=b.e;if(g==0){return b}if(i==0){return a}f=a.d;h=b.d;if(f+h==2){c=Cdb(a.a[0],yxe);d=Cdb(b.a[0],yxe);if(g==i){k=Bdb(c,d);o=Ydb(k);n=Ydb(Udb(k,32));return n==0?new ajb(g,o):new cjb(g,2,cD(WC(kE,1),Pwe,28,15,[o,n]))}return Pib(),Jdb(g<0?Vdb(d,c):Vdb(c,d),0)?jjb(g<0?Vdb(d,c):Vdb(c,d)):Xib(jjb(Odb(g<0?Vdb(d,c):Vdb(c,d))))}else if(g==i){m=g;l=f>=h?Cjb(a.a,f,b.a,h):Cjb(b.a,h,a.a,f)}else{e=f!=h?f>h?1:-1:Ejb(a.a,b.a,f);if(e==0){return Pib(),Oib}if(e==1){m=g;l=Hjb(a.a,f,b.a,h)}else{m=i;l=Hjb(b.a,h,a.a,f)}}j=new cjb(m,l.length,l);Rib(j);return j} +function KUc(a,b){var c,d,e,f,g,h,i;if(a.g>b.f||b.g>a.f){return}c=0;d=0;for(g=a.w.a.ec().Kc();g.Ob();){e=RD(g.Pb(),12);AVc(xjd(cD(WC(l3,1),Nve,8,0,[e.i.n,e.n,e.a])).b,b.g,b.f)&&++c}for(h=a.r.a.ec().Kc();h.Ob();){e=RD(h.Pb(),12);AVc(xjd(cD(WC(l3,1),Nve,8,0,[e.i.n,e.n,e.a])).b,b.g,b.f)&&--c}for(i=b.w.a.ec().Kc();i.Ob();){e=RD(i.Pb(),12);AVc(xjd(cD(WC(l3,1),Nve,8,0,[e.i.n,e.n,e.a])).b,a.g,a.f)&&++d}for(f=b.r.a.ec().Kc();f.Ob();){e=RD(f.Pb(),12);AVc(xjd(cD(WC(l3,1),Nve,8,0,[e.i.n,e.n,e.a])).b,a.g,a.f)&&--d}if(c<d){new _Uc(a,b,d-c)}else if(d<c){new _Uc(b,a,c-d)}else{new _Uc(b,a,0);new _Uc(a,b,0)}} +function ASb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;j=b.c;e=zRb(a.e);l=ijd(njd(ajd(yRb(a.e)),a.d*a.a,a.c*a.b),-0.5);c=e.a-l.a;d=e.b-l.b;g=b.a;c=g.c-c;d=g.d-d;for(i=new Anb(j);i.a<i.c.c.length;){h=RD(ynb(i),407);m=h.b;n=c+m.a;q=d+m.b;o=eE(n/a.a);r=eE(q/a.b);f=h.a;switch(f.g){case 0:k=(IPb(),FPb);break;case 1:k=(IPb(),EPb);break;case 2:k=(IPb(),GPb);break;default:k=(IPb(),HPb);}if(f.a){s=eE((q+h.c)/a.b);Rmb(a.f,new lRb(k,sgb(r),sgb(s)));f==(IRb(),HRb)?eQb(a,0,r,o,s):eQb(a,o,r,a.d-1,s)}else{p=eE((n+h.c)/a.a);Rmb(a.f,new lRb(k,sgb(o),sgb(p)));f==(IRb(),FRb)?eQb(a,o,0,p,r):eQb(a,o,r,p,a.c-1)}}} +function Q$d(a){var b,c,d,e,f,g,h,i,j,k;b=new Z$d;c=new Z$d;j=lhb(pKe,(e=bAd(a.b,qKe),!e?null:WD($Nd((!e.b&&(e.b=new SVd((JTd(),FTd),C8,e)),e.b),rKe))));for(i=0;i<a.i;++i){h=RD(a.g[i],179);if(ZD(h,102)){g=RD(h,19);(g.Bb&QHe)!=0?((g.Bb&Ove)==0||!j&&(f=bAd(g,qKe),(!f?null:WD($Nd((!f.b&&(f.b=new SVd((JTd(),FTd),C8,f)),f.b),FIe)))==null))&&WGd(b,g):(k=Z5d(g),!!k&&(k.Bb&QHe)!=0||((g.Bb&Ove)==0||!j&&(d=bAd(g,qKe),(!d?null:WD($Nd((!d.b&&(d.b=new SVd((JTd(),FTd),C8,d)),d.b),FIe)))==null))&&WGd(c,g))}else{nke();if(RD(h,69).xk()){if(!h.sk()){WGd(b,h);WGd(c,h)}}}}VHd(b);VHd(c);a.a=RD(b.g,254);RD(c.g,254)} +function Eee(a,b,c){var d,e,f,g,h,i,j,k,l;if(BYd(b,c)>=0){return c}switch(yfe(Qee(a,c))){case 2:{if(lhb('',Oee(a,c.qk()).xe())){i=Bfe(Qee(a,c));h=Afe(Qee(a,c));k=Ree(a,b,i,h);if(k){return k}e=Fee(a,b);for(g=0,l=e.gc();g<l;++g){k=RD(e.Xb(g),179);if(Xee(Cfe(Qee(a,k)),i)){return k}}}return null}case 4:{if(lhb('',Oee(a,c.qk()).xe())){for(d=c;d;d=xfe(Qee(a,d))){j=Bfe(Qee(a,d));h=Afe(Qee(a,d));k=See(a,b,j,h);if(k){return k}}i=Bfe(Qee(a,c));if(lhb(dLe,i)){return Tee(a,b)}else{f=Gee(a,b);for(g=0,l=f.gc();g<l;++g){k=RD(f.Xb(g),179);if(Xee(Cfe(Qee(a,k)),i)){return k}}}}return null}default:{return null}}} +function Tfe(a,b,c){var d,e,f,g,h,i,j,k;if(c.gc()==0){return false}h=(nke(),RD(b,69).xk());f=h?c:new ZHd(c.gc());if(qke(a.e,b)){if(b.Si()){for(j=c.Kc();j.Ob();){i=j.Pb();if(!dge(a,b,i,ZD(b,102)&&(RD(b,19).Bb&txe)!=0)){e=oke(b,i);f.Hc(e)||f.Fc(e)}}}else if(!h){for(j=c.Kc();j.Ob();){i=j.Pb();e=oke(b,i);f.Fc(e)}}}else{if(c.gc()>1){throw Adb(new agb(gLe))}k=pke(a.e.Dh(),b);d=RD(a.g,124);for(g=0;g<a.i;++g){e=d[g];if(k.am(e.Lk())){if(c.Hc(h?e:e.md())){return false}else{for(j=c.Kc();j.Ob();){i=j.Pb();RD(eHd(a,g,h?RD(i,76):oke(b,i)),76)}return true}}}if(!h){e=oke(b,c.Kc().Pb());f.Fc(e)}}return YGd(a,f)} +function QQc(a,b){var c,d,e,f,g,h,i,j,k;k=new Yub;for(h=(j=(new glb(a.c)).a.vc().Kc(),new llb(j));h.a.Ob();){f=(e=RD(h.a.Pb(),44),RD(e.md(),467));f.b==0&&(Pub(k,f,k.c.b,k.c),true)}while(k.b!=0){f=RD(k.b==0?null:(sFb(k.b!=0),Wub(k,k.a.a)),467);f.a==null&&(f.a=0);for(d=new Anb(f.d);d.a<d.c.c.length;){c=RD(ynb(d),663);c.b.a==null?(c.b.a=Kfb(f.a)+c.a):b.o==(EQc(),CQc)?(c.b.a=$wnd.Math.min(Kfb(c.b.a),Kfb(f.a)+c.a)):(c.b.a=$wnd.Math.max(Kfb(c.b.a),Kfb(f.a)+c.a));--c.b.b;c.b.b==0&&Mub(k,c.b)}}for(g=(i=(new glb(a.c)).a.vc().Kc(),new llb(i));g.a.Ob();){f=(e=RD(g.a.Pb(),44),RD(e.md(),467));b.i[f.c.p]=f.a}} +function kSc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;k=c+b.c.c.a;for(n=new Anb(b.j);n.a<n.c.c.length;){m=RD(ynb(n),12);e=xjd(cD(WC(l3,1),Nve,8,0,[m.i.n,m.n,m.a]));if(b.k==(r3b(),q3b)){h=RD(mQb(m,(Ywc(),Awc)),12);e.a=xjd(cD(WC(l3,1),Nve,8,0,[h.i.n,h.n,h.a])).a;b.n.a=e.a}g=new rjd(0,e.b);if(m.j==(qpd(),Xod)){g.a=k}else if(m.j==ppd){g.a=c}else{continue}o=$wnd.Math.abs(e.a-g.a);if(o<=d&&!hSc(b)){continue}f=m.g.c.length+m.e.c.length>1;for(j=new l4b(m.b);xnb(j.a)||xnb(j.b);){i=RD(xnb(j.a)?ynb(j.a):ynb(j.b),18);l=i.c==m?i.d:i.c;$wnd.Math.abs(xjd(cD(WC(l3,1),Nve,8,0,[l.i.n,l.n,l.a])).b-g.b)>1&&eSc(a,i,g,f,m)}}} +function vUc(a){var b,c,d,e,f,g;e=new Jkb(a.e,0);d=new Jkb(a.a,0);if(a.d){for(c=0;c<a.b;c++){sFb(e.b<e.d.gc());e.d.Xb(e.c=e.b++)}}else{for(c=0;c<a.b-1;c++){sFb(e.b<e.d.gc());e.d.Xb(e.c=e.b++);Ckb(e)}}b=Kfb((sFb(e.b<e.d.gc()),UD(e.d.Xb(e.c=e.b++))));while(a.f-b>AEe){f=b;g=0;while($wnd.Math.abs(b-f)<AEe){++g;b=Kfb((sFb(e.b<e.d.gc()),UD(e.d.Xb(e.c=e.b++))));sFb(d.b<d.d.gc());d.d.Xb(d.c=d.b++)}if(g<a.b){sFb(e.b>0);e.a.Xb(e.c=--e.b);uUc(a,a.b-g,f,d,e);sFb(e.b<e.d.gc());e.d.Xb(e.c=e.b++)}sFb(d.b>0);d.a.Xb(d.c=--d.b)}if(!a.d){for(c=0;c<a.b-1;c++){sFb(e.b<e.d.gc());e.d.Xb(e.c=e.b++);Ckb(e)}}a.d=true;a.c=true} +function nme(){nme=geb;Rle=(Qle(),Ple).b;Ule=RD(QHd(xYd(Ple.b),0),35);Sle=RD(QHd(xYd(Ple.b),1),35);Tle=RD(QHd(xYd(Ple.b),2),35);cme=Ple.bb;RD(QHd(xYd(Ple.bb),0),35);RD(QHd(xYd(Ple.bb),1),35);eme=Ple.fb;fme=RD(QHd(xYd(Ple.fb),0),35);RD(QHd(xYd(Ple.fb),1),35);RD(QHd(xYd(Ple.fb),2),19);hme=Ple.qb;kme=RD(QHd(xYd(Ple.qb),0),35);RD(QHd(xYd(Ple.qb),1),19);RD(QHd(xYd(Ple.qb),2),19);ime=RD(QHd(xYd(Ple.qb),3),35);jme=RD(QHd(xYd(Ple.qb),4),35);mme=RD(QHd(xYd(Ple.qb),6),35);lme=RD(QHd(xYd(Ple.qb),5),19);Vle=Ple.j;Wle=Ple.k;Xle=Ple.q;Yle=Ple.w;Zle=Ple.B;$le=Ple.A;_le=Ple.C;ame=Ple.D;bme=Ple._;dme=Ple.cb;gme=Ple.hb} +function yIc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;a.c=0;a.b=0;d=2*b.c.a.c.length+1;o:for(l=c.Kc();l.Ob();){k=RD(l.Pb(),12);h=k.j==(qpd(),Yod)||k.j==npd;n=0;if(h){m=RD(mQb(k,(Ywc(),Iwc)),10);if(!m){continue}n+=tIc(a,d,k,m)}else{for(j=new Anb(k.g);j.a<j.c.c.length;){i=RD(ynb(j),18);e=i.d;if(e.i.c==b.c){Rmb(a.a,k);continue o}else{n+=a.g[e.p]}}for(g=new Anb(k.e);g.a<g.c.c.length;){f=RD(ynb(g),18);e=f.c;if(e.i.c==b.c){Rmb(a.a,k);continue o}else{n-=a.g[e.p]}}}if(k.e.c.length+k.g.c.length>0){a.f[k.p]=n/(k.e.c.length+k.g.c.length);a.c=$wnd.Math.min(a.c,a.f[k.p]);a.b=$wnd.Math.max(a.b,a.f[k.p])}else h&&(a.f[k.p]=n)}} +function xne(a){a.b=null;a.bb=null;a.fb=null;a.qb=null;a.a=null;a.c=null;a.d=null;a.e=null;a.f=null;a.n=null;a.M=null;a.L=null;a.Q=null;a.R=null;a.K=null;a.db=null;a.eb=null;a.g=null;a.i=null;a.j=null;a.k=null;a.gb=null;a.o=null;a.p=null;a.q=null;a.r=null;a.$=null;a.ib=null;a.S=null;a.T=null;a.t=null;a.s=null;a.u=null;a.v=null;a.w=null;a.B=null;a.A=null;a.C=null;a.D=null;a.F=null;a.G=null;a.H=null;a.I=null;a.J=null;a.P=null;a.Z=null;a.U=null;a.V=null;a.W=null;a.X=null;a.Y=null;a._=null;a.ab=null;a.cb=null;a.hb=null;a.nb=null;a.lb=null;a.mb=null;a.ob=null;a.pb=null;a.jb=null;a.kb=null;a.N=false;a.O=false} +function C8b(a,b,c){var d,e,f,g;c.Ug('Graph transformation ('+a.a+')',1);g=bv(b.a);for(f=new Anb(b.b);f.a<f.c.c.length;){e=RD(ynb(f),30);Tmb(g,e.a)}d=RD(mQb(b,(yCc(),sAc)),428);if(d==($tc(),Ytc)){switch(RD(mQb(b,rAc),88).g){case 2:q8b(b,g);break;case 3:G8b(b,g);break;case 4:if(a.a==(P8b(),O8b)){G8b(b,g);r8b(b,g)}else{r8b(b,g);G8b(b,g)}}}else{if(a.a==(P8b(),O8b)){switch(RD(mQb(b,rAc),88).g){case 2:q8b(b,g);r8b(b,g);break;case 3:G8b(b,g);q8b(b,g);break;case 4:q8b(b,g);G8b(b,g);}}else{switch(RD(mQb(b,rAc),88).g){case 2:q8b(b,g);r8b(b,g);break;case 3:q8b(b,g);G8b(b,g);break;case 4:G8b(b,g);q8b(b,g);}}}c.Vg()} +function AXb(a){var b,c,d,e,f,g,h,i;for(f=new Anb(a.a.b);f.a<f.c.c.length;){e=RD(ynb(f),86);e.b.c=e.g.c;e.b.d=e.g.d}i=new rjd(oxe,oxe);b=new rjd(pxe,pxe);for(d=new Anb(a.a.b);d.a<d.c.c.length;){c=RD(ynb(d),86);i.a=$wnd.Math.min(i.a,c.g.c);i.b=$wnd.Math.min(i.b,c.g.d);b.a=$wnd.Math.max(b.a,c.g.c+c.g.b);b.b=$wnd.Math.max(b.b,c.g.d+c.g.a)}for(h=Uc(a.c).a.nc();h.Ob();){g=RD(h.Pb(),42);c=RD(g.b,86);i.a=$wnd.Math.min(i.a,c.g.c);i.b=$wnd.Math.min(i.b,c.g.d);b.a=$wnd.Math.max(b.a,c.g.c+c.g.b);b.b=$wnd.Math.max(b.b,c.g.d+c.g.a)}a.d=fjd(new rjd(i.a,i.b));a.e=ojd(new rjd(b.a,b.b),i);a.a.a.c.length=0;a.a.b.c.length=0} +function LZb(a){CZb();var b,c,d,e,f,g,h;h=new EZb;for(c=new Anb(a);c.a<c.c.c.length;){b=RD(ynb(c),148);(!h.b||b.c>=h.b.c)&&(h.b=b);if(!h.c||b.c<=h.c.c){h.d=h.c;h.c=b}(!h.e||b.d>=h.e.d)&&(h.e=b);(!h.f||b.d<=h.f.d)&&(h.f=b)}d=new PZb((nZb(),jZb));t$b(a,AZb,new mob(cD(WC(wQ,1),rve,382,0,[d])));g=new PZb(mZb);t$b(a,zZb,new mob(cD(WC(wQ,1),rve,382,0,[g])));e=new PZb(kZb);t$b(a,yZb,new mob(cD(WC(wQ,1),rve,382,0,[e])));f=new PZb(lZb);t$b(a,xZb,new mob(cD(WC(wQ,1),rve,382,0,[f])));FZb(d.c,jZb);FZb(e.c,kZb);FZb(f.c,lZb);FZb(g.c,mZb);h.a.c.length=0;Tmb(h.a,d.c);Tmb(h.a,hv(e.c));Tmb(h.a,f.c);Tmb(h.a,hv(g.c));return h} +function n9c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;b.Ug(bGe,1);n=Kfb(UD(Gxd(a,(X6c(),W6c))));g=Kfb(UD(Gxd(a,(X7c(),Q7c))));h=RD(Gxd(a,N7c),107);Bad((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));k=U8c((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a),n,g);!a.a&&(a.a=new C5d(J4,a,10,11));for(j=new Anb(k);j.a<j.c.c.length;){i=RD(ynb(j),186);for(e=new Anb(i.a);e.a<e.c.c.length;){d=RD(ynb(e),172);m=new had(d.s,d.t,Kfb(UD(Gxd(a,Q7c))));aad(m,d);Rmb(i.d,m)}}l=zad(k,g);o=$wnd.Math.max(l.a,Kfb(UD(Gxd(a,U6c)))-(h.b+h.c));f=$wnd.Math.max(l.b,Kfb(UD(Gxd(a,R6c)))-(h.d+h.a));c=f-l.b;Ixd(a,M6c,c);Ixd(a,O6c,o);Ixd(a,N6c,f+c);Ixd(a,V6c,k);b.Vg()} +function A9b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;j=new Iub;k=new Iub;o=new Iub;p=new Iub;i=Kfb(UD(mQb(b,(yCc(),bCc))));f=Kfb(UD(mQb(b,TBc)));for(h=new Anb(c);h.a<h.c.c.length;){g=RD(ynb(h),10);l=RD(mQb(g,(Ywc(),hwc)),64);if(l==(qpd(),Yod)){k.a.zc(g,k);for(e=new is(Mr(Z2b(g).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);Ysb(j,d.c.i)}}else if(l==npd){p.a.zc(g,p);for(e=new is(Mr(Z2b(g).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);Ysb(o,d.c.i)}}}if(j.a.gc()!=0){m=new TTc(2,f);n=STc(m,b,j,k,-i-b.c.b);if(n>0){a.a=i+(n-1)*f;b.c.b+=a.a;b.f.b+=a.a}}if(o.a.gc()!=0){m=new TTc(1,f);n=STc(m,b,o,p,b.f.b+i-b.c.b);n>0&&(b.f.b+=i+(n-1)*f)}} +function osc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;k=Kfb(UD(mQb(a,(yCc(),WBc))));d=Kfb(UD(mQb(a,nCc)));m=new dtd;pQb(m,WBc,k+d);j=b;r=j.d;p=j.c.i;s=j.d.i;q=Q4b(p.c);t=Q4b(s.c);e=new bnb;for(l=q;l<=t;l++){h=new j3b(a);h3b(h,(r3b(),o3b));pQb(h,(Ywc(),Awc),j);pQb(h,BBc,(Bod(),wod));pQb(h,YBc,m);n=RD(Vmb(a.b,l),30);l==q?f3b(h,n.a.c.length-c,n):g3b(h,n);u=Kfb(UD(mQb(j,FAc)));if(u<0){u=0;pQb(j,FAc,u)}h.o.b=u;o=$wnd.Math.floor(u/2);g=new R3b;Q3b(g,(qpd(),ppd));P3b(g,h);g.n.b=o;i=new R3b;Q3b(i,Xod);P3b(i,h);i.n.b=o;Z0b(j,g);f=new a1b;kQb(f,j);pQb(f,RAc,null);Y0b(f,i);Z0b(f,r);psc(h,j,f);ZEb(e.c,f);j=f}return e} +function Hec(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;i=RD(e3b(a,(qpd(),ppd)).Kc().Pb(),12).e;n=RD(e3b(a,Xod).Kc().Pb(),12).g;h=i.c.length;t=K3b(RD(Vmb(a.j,0),12));while(h-->0){p=(tFb(0,i.c.length),RD(i.c[0],18));e=(tFb(0,n.c.length),RD(n.c[0],18));s=e.d.e;f=Wmb(s,e,0);$0b(p,e.d,f);Y0b(e,null);Z0b(e,null);o=p.a;b&&Mub(o,new sjd(t));for(d=Sub(e.a,0);d.b!=d.d.c;){c=RD(evb(d),8);Mub(o,new sjd(c))}r=p.b;for(m=new Anb(e.b);m.a<m.c.c.length;){l=RD(ynb(m),72);ZEb(r.c,l)}q=RD(mQb(p,(yCc(),RAc)),75);g=RD(mQb(e,RAc),75);if(g){if(!q){q=new Ejd;pQb(p,RAc,q)}for(k=Sub(g,0);k.b!=k.d.c;){j=RD(evb(k),8);Mub(q,new sjd(j))}}}} +function $Qc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;p=b.b.c.length;if(p<3){return}n=$C(kE,Pwe,28,p,15,1);l=0;for(k=new Anb(b.b);k.a<k.c.c.length;){j=RD(ynb(k),30);n[l++]=j.a.c.length}m=new Jkb(b.b,2);for(d=1;d<p-1;d++){c=(sFb(m.b<m.d.gc()),RD(m.d.Xb(m.c=m.b++),30));o=new Anb(c.a);f=0;h=0;for(i=0;i<n[d+1];i++){t=RD(ynb(o),10);if(i==n[d+1]-1||ZQc(a,t,d+1,d)){g=n[d]-1;ZQc(a,t,d+1,d)&&(g=a.c.e[RD(RD(RD(Vmb(a.c.b,t.p),15).Xb(0),42).a,10).p]);while(h<=i){s=RD(Vmb(c.a,h),10);if(!ZQc(a,s,d+1,d)){for(r=RD(Vmb(a.c.b,s.p),15).Kc();r.Ob();){q=RD(r.Pb(),42);e=a.c.e[RD(q.a,10).p];(e<f||e>g)&&Ysb(a.b,RD(q.b,18))}}++h}f=g}}}} +function zhd(b,c){var d;if(c==null||lhb(c,vve)){return null}if(c.length==0&&b.k!=(kid(),fid)){return null}switch(b.k.g){case 1:return mhb(c,FGe)?(Geb(),Feb):mhb(c,GGe)?(Geb(),Eeb):null;case 2:try{return sgb(Oeb(c,qwe,lve))}catch(a){a=zdb(a);if(ZD(a,130)){return null}else throw Adb(a)}case 4:try{return Neb(c)}catch(a){a=zdb(a);if(ZD(a,130)){return null}else throw Adb(a)}case 3:return c;case 5:uhd(b);return xhd(b,c);case 6:uhd(b);return yhd(b,b.a,c);case 7:try{d=whd(b);d.cg(c);return d}catch(a){a=zdb(a);if(ZD(a,33)){return null}else throw Adb(a)}default:throw Adb(new dgb('Invalid type set for this layout option.'));}} +function JKd(a){var b;switch(a.d){case 1:{if(a.Sj()){return a.o!=-2}break}case 2:{if(a.Sj()){return a.o==-2}break}case 3:case 5:case 4:case 6:case 7:{return a.o>-2}default:{return false}}b=a.Rj();switch(a.p){case 0:return b!=null&&Heb(TD(b))!=Pdb(a.k,0);case 1:return b!=null&&RD(b,222).a!=Ydb(a.k)<<24>>24;case 2:return b!=null&&RD(b,180).a!=(Ydb(a.k)&Bwe);case 6:return b!=null&&Pdb(RD(b,168).a,a.k);case 5:return b!=null&&RD(b,17).a!=Ydb(a.k);case 7:return b!=null&&RD(b,191).a!=Ydb(a.k)<<16>>16;case 3:return b!=null&&Kfb(UD(b))!=a.j;case 4:return b!=null&&RD(b,161).a!=a.j;default:return b==null?a.n!=null:!pb(b,a.n);}} +function N_d(a,b,c){var d,e,f,g;if(a.ol()&&a.nl()){g=O_d(a,RD(c,58));if(dE(g)!==dE(c)){a.xj(b);a.Dj(b,P_d(a,b,g));if(a.al()){f=(e=RD(c,54),a.ml()?a.kl()?e.Th(a.b,Z5d(RD(vYd(Uwd(a.b),a.Lj()),19)).n,RD(vYd(Uwd(a.b),a.Lj()).Hk(),29).kk(),null):e.Th(a.b,BYd(e.Dh(),Z5d(RD(vYd(Uwd(a.b),a.Lj()),19))),null,null):e.Th(a.b,-1-a.Lj(),null,null));!RD(g,54).Ph()&&(f=(d=RD(g,54),a.ml()?a.kl()?d.Rh(a.b,Z5d(RD(vYd(Uwd(a.b),a.Lj()),19)).n,RD(vYd(Uwd(a.b),a.Lj()).Hk(),29).kk(),f):d.Rh(a.b,BYd(d.Dh(),Z5d(RD(vYd(Uwd(a.b),a.Lj()),19))),null,f):d.Rh(a.b,-1-a.Lj(),null,f)));!!f&&f.oj()}Mvd(a.b)&&a.Jj(a.Ij(9,c,g,b,false));return g}}return c} +function iJb(a){var b,c,d,e,f,g,h,i,j,k;d=new bnb;for(g=new Anb(a.e.a);g.a<g.c.c.length;){e=RD(ynb(g),125);k=0;e.k.c.length=0;for(c=new Anb(CIb(e));c.a<c.c.c.length;){b=RD(ynb(c),218);if(b.f){Rmb(e.k,b);++k}}k==1&&(ZEb(d.c,e),true)}for(f=new Anb(d);f.a<f.c.c.length;){e=RD(ynb(f),125);while(e.k.c.length==1){j=RD(ynb(new Anb(e.k)),218);a.b[j.c]=j.g;h=j.d;i=j.e;for(c=new Anb(CIb(e));c.a<c.c.c.length;){b=RD(ynb(c),218);pb(b,j)||(b.f?h==b.d||i==b.e?(a.b[j.c]-=a.b[b.c]-b.g):(a.b[j.c]+=a.b[b.c]-b.g):e==h?b.d==e?(a.b[j.c]+=b.g):(a.b[j.c]-=b.g):b.d==e?(a.b[j.c]-=b.g):(a.b[j.c]+=b.g))}Ymb(h.k,j);Ymb(i.k,j);h==e?(e=j.e):(e=j.d)}}} +function vMb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;c=RD(Vrb(a.b,b),127);i=RD(RD(Qc(a.r,b),21),87);if(i.dc()){c.n.b=0;c.n.c=0;return}j=a.u.Hc((Pod(),Lod));g=0;h=i.Kc();k=null;l=0;m=0;while(h.Ob()){d=RD(h.Pb(),117);e=Kfb(UD(d.b.of((tNb(),sNb))));f=d.b.Mf().a;a.A.Hc((Qpd(),Ppd))&&BMb(a,b);if(!k){!!a.C&&a.C.b>0&&(g=$wnd.Math.max(g,zMb(a.C.b+d.d.b,e)))}else{n=m+k.d.c+a.w+d.d.b;g=$wnd.Math.max(g,(Zy(),bz(Tye),$wnd.Math.abs(l-e)<=Tye||l==e||isNaN(l)&&isNaN(e)?0:n/(e-l)))}k=d;l=e;m=f}if(!!a.C&&a.C.c>0){n=m+a.C.c;j&&(n+=k.d.c);g=$wnd.Math.max(g,(Zy(),bz(Tye),$wnd.Math.abs(l-1)<=Tye||l==1||isNaN(l)&&isNaN(1)?0:n/(1-l)))}c.n.b=0;c.a.a=g} +function ENb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;c=RD(Vrb(a.b,b),127);i=RD(RD(Qc(a.r,b),21),87);if(i.dc()){c.n.d=0;c.n.a=0;return}j=a.u.Hc((Pod(),Lod));g=0;a.A.Hc((Qpd(),Ppd))&&JNb(a,b);h=i.Kc();k=null;m=0;l=0;while(h.Ob()){d=RD(h.Pb(),117);f=Kfb(UD(d.b.of((tNb(),sNb))));e=d.b.Mf().b;if(!k){!!a.C&&a.C.d>0&&(g=$wnd.Math.max(g,zMb(a.C.d+d.d.d,f)))}else{n=l+k.d.a+a.w+d.d.d;g=$wnd.Math.max(g,(Zy(),bz(Tye),$wnd.Math.abs(m-f)<=Tye||m==f||isNaN(m)&&isNaN(f)?0:n/(f-m)))}k=d;m=f;l=e}if(!!a.C&&a.C.a>0){n=l+a.C.a;j&&(n+=k.d.a);g=$wnd.Math.max(g,(Zy(),bz(Tye),$wnd.Math.abs(m-1)<=Tye||m==1||isNaN(m)&&isNaN(1)?0:n/(1-m)))}c.n.d=0;c.a.b=g} +function L8c(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q,r;o=false;j=dad(c.q,b.f+b.b-c.q.f);n=d.f>b.b&&h;r=e-(c.q.e+j-g);l=(i=S9c(d,r,false),i.a);if(n&&l>d.f){return false}if(n){m=0;for(q=new Anb(b.d);q.a<q.c.c.length;){p=RD(ynb(q),315);m+=dad(p,d.f)+g}r=e-m}if(r<d.g){return false}k=f==a.c.length-1&&r>=(tFb(f,a.c.length),RD(a.c[f],186)).e;if(!n&&l>b.b&&!k){return false}if(k||n||l<=b.b){if(k&&l>b.b){c.d=l;Q9c(c,P9c(c,l))}else{ead(c.q,j);c.c=true}Q9c(d,e-(c.s+c.r));U9c(d,c.q.e+c.q.d,b.f);Cad(b,d);if(a.c.length>f){Fad((tFb(f,a.c.length),RD(a.c[f],186)),d);(tFb(f,a.c.length),RD(a.c[f],186)).a.c.length==0&&Xmb(a,f)}o=true}return o} +function zJc(a,b,c){var d,e,f,g,h,i;this.g=a;h=b.d.length;i=c.d.length;this.d=$C(jR,WAe,10,h+i,0,1);for(g=0;g<h;g++){this.d[g]=b.d[g]}for(f=0;f<i;f++){this.d[h+f]=c.d[f]}if(b.e){this.e=gv(b.e);this.e.Mc(c);if(c.e){for(e=c.e.Kc();e.Ob();){d=RD(e.Pb(),239);if(d==b){continue}else this.e.Hc(d)?--d.c:this.e.Fc(d)}}}else if(c.e){this.e=gv(c.e);this.e.Mc(b)}this.f=b.f+c.f;this.a=b.a+c.a;this.a>0?xJc(this,this.f/this.a):pJc(b.g,b.d[0]).a!=null&&pJc(c.g,c.d[0]).a!=null?xJc(this,(Kfb(pJc(b.g,b.d[0]).a)+Kfb(pJc(c.g,c.d[0]).a))/2):pJc(b.g,b.d[0]).a!=null?xJc(this,pJc(b.g,b.d[0]).a):pJc(c.g,c.d[0]).a!=null&&xJc(this,pJc(c.g,c.d[0]).a)} +function DXb(a,b){var c,d,e,f,g,h,i,j,k,l;a.a=new fYb(wsb(s3));for(d=new Anb(b.a);d.a<d.c.c.length;){c=RD(ynb(d),855);h=new iYb(cD(WC(bQ,1),rve,86,0,[]));Rmb(a.a.a,h);for(j=new Anb(c.d);j.a<j.c.c.length;){i=RD(ynb(j),116);k=new IXb(a,i);CXb(k,RD(mQb(c.c,(Ywc(),ewc)),21));if(!Ujb(a.g,c)){Zjb(a.g,c,new rjd(i.c,i.d));Zjb(a.f,c,k)}Rmb(a.a.b,k);gYb(h,k)}for(g=new Anb(c.b);g.a<g.c.c.length;){f=RD(ynb(g),602);k=new IXb(a,f.Df());Zjb(a.b,f,new Ptd(h,k));CXb(k,RD(mQb(c.c,(Ywc(),ewc)),21));if(f.Bf()){l=new JXb(a,f.Bf(),1);CXb(l,RD(mQb(c.c,ewc),21));e=new iYb(cD(WC(bQ,1),rve,86,0,[]));gYb(e,l);Rc(a.c,f.Af(),new Ptd(h,l))}}}return a.a} +function gFc(a){var b;this.a=a;b=(r3b(),cD(WC(hR,1),jwe,273,0,[p3b,o3b,m3b,q3b,n3b,l3b])).length;this.b=YC(V5,[Nve,kEe],[601,149],0,[b,b],2);this.c=YC(V5,[Nve,kEe],[601,149],0,[b,b],2);fFc(this,p3b,(yCc(),bCc),cCc);dFc(this,p3b,o3b,WBc,XBc);cFc(this,p3b,q3b,WBc);cFc(this,p3b,m3b,WBc);dFc(this,p3b,n3b,bCc,cCc);fFc(this,o3b,TBc,UBc);cFc(this,o3b,q3b,TBc);cFc(this,o3b,m3b,TBc);dFc(this,o3b,n3b,WBc,XBc);eFc(this,q3b,TBc);cFc(this,q3b,m3b,TBc);cFc(this,q3b,n3b,$Bc);eFc(this,m3b,fCc);dFc(this,m3b,n3b,aCc,_Bc);fFc(this,n3b,TBc,TBc);fFc(this,l3b,TBc,UBc);dFc(this,l3b,p3b,WBc,XBc);dFc(this,l3b,n3b,WBc,XBc);dFc(this,l3b,o3b,WBc,XBc)} +function zge(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;g=c.Lk();if(ZD(g,102)&&(RD(g,19).Bb&txe)!=0){m=RD(c.md(),54);p=Vvd(a.e,m);if(p!=m){k=oke(g,p);MHd(a,b,Tge(a,b,k));l=null;if(Mvd(a.e)){d=Eee((lke(),jke),a.e.Dh(),g);if(d!=vYd(a.e.Dh(),a.c)){q=pke(a.e.Dh(),g);h=0;f=RD(a.g,124);for(i=0;i<b;++i){e=f[i];q.am(e.Lk())&&++h}l=new lle(a.e,9,d,m,p,h,false);l.nj(new P3d(a.e,9,a.c,c,k,b,false))}}o=RD(g,19);n=Z5d(o);if(n){l=m.Th(a.e,BYd(m.Dh(),n),null,l);l=RD(p,54).Rh(a.e,BYd(p.Dh(),n),null,l)}else if((o.Bb&QHe)!=0){j=-1-BYd(a.e.Dh(),o);l=m.Th(a.e,j,null,null);!RD(p,54).Ph()&&(l=RD(p,54).Rh(a.e,j,null,l))}!!l&&l.oj();return k}}return c} +function SId(a){var b,c,d;wgd(LId,cD(WC(B2,1),rve,134,0,[new vmd]));c=new NB(a);for(d=0;d<c.a.length;++d){b=JB(c,d).te().a;lhb(b,'layered')?wgd(LId,cD(WC(B2,1),rve,134,0,[new Pzc])):lhb(b,'force')?wgd(LId,cD(WC(B2,1),rve,134,0,[new PUb])):lhb(b,'stress')?wgd(LId,cD(WC(B2,1),rve,134,0,[new RVb])):lhb(b,'mrtree')?wgd(LId,cD(WC(B2,1),rve,134,0,[new C$c])):lhb(b,'radial')?wgd(LId,cD(WC(B2,1),rve,134,0,[new E4c])):lhb(b,'disco')?wgd(LId,cD(WC(B2,1),rve,134,0,[new ZHb,new fSb])):lhb(b,'sporeOverlap')||lhb(b,'sporeCompaction')?wgd(LId,cD(WC(B2,1),rve,134,0,[new Lcd])):lhb(b,'rectpacking')&&wgd(LId,cD(WC(B2,1),rve,134,0,[new v7c]))}} +function r2b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;m=new sjd(a.o);r=b.a/m.a;h=b.b/m.b;p=b.a-m.a;f=b.b-m.b;if(c){e=dE(mQb(a,(yCc(),BBc)))===dE((Bod(),wod));for(o=new Anb(a.j);o.a<o.c.c.length;){n=RD(ynb(o),12);switch(n.j.g){case 1:e||(n.n.a*=r);break;case 2:n.n.a+=p;e||(n.n.b*=h);break;case 3:e||(n.n.a*=r);n.n.b+=f;break;case 4:e||(n.n.b*=h);}}}for(j=new Anb(a.b);j.a<j.c.c.length;){i=RD(ynb(j),72);k=i.n.a+i.o.a/2;l=i.n.b+i.o.b/2;q=k/m.a;g=l/m.b;if(q+g>=1){if(q-g>0&&l>=0){i.n.a+=p;i.n.b+=f*g}else if(q-g<0&&k>=0){i.n.a+=p*q;i.n.b+=f}}}a.o.a=b.a;a.o.b=b.b;pQb(a,(yCc(),lBc),(Qpd(),d=RD(mfb(H3),9),new Fsb(d,RD(WEb(d,d.length),9),0)))} +function ISd(a,b,c,d,e,f){var g;if(!(b==null||!mSd(b,ZRd,$Rd))){throw Adb(new agb('invalid scheme: '+b))}if(!a&&!(c!=null&&qhb(c,Fhb(35))==-1&&c.length>0&&(BFb(0,c.length),c.charCodeAt(0)!=47))){throw Adb(new agb('invalid opaquePart: '+c))}if(a&&!(b!=null&&tpb(eSd,b.toLowerCase()))&&!(c==null||!mSd(c,aSd,bSd))){throw Adb(new agb(NJe+c))}if(a&&b!=null&&tpb(eSd,b.toLowerCase())&&!ESd(c)){throw Adb(new agb(NJe+c))}if(!FSd(d)){throw Adb(new agb('invalid device: '+d))}if(!HSd(e)){g=e==null?'invalid segments: null':'invalid segment: '+tSd(e);throw Adb(new agb(g))}if(!(f==null||qhb(f,Fhb(35))==-1)){throw Adb(new agb('invalid query: '+f))}} +function WHc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;c.Ug('Network simplex layering',1);a.b=b;r=RD(mQb(b,(yCc(),gCc)),17).a*4;q=a.b.a;if(q.c.length<1){c.Vg();return}f=SHc(a,q);p=null;for(e=Sub(f,0);e.b!=e.d.c;){d=RD(evb(e),15);h=r*eE($wnd.Math.sqrt(d.gc()));g=VHc(d);lJb(yJb(AJb(zJb(CJb(g),h),p),true),c.eh(1));m=a.b.b;for(o=new Anb(g.a);o.a<o.c.c.length;){n=RD(ynb(o),125);while(m.c.length<=n.e){Qmb(m,m.c.length,new R4b(a.b))}k=RD(n.f,10);g3b(k,RD(Vmb(m,n.e),30))}if(f.b>1){p=$C(kE,Pwe,28,a.b.b.c.length,15,1);l=0;for(j=new Anb(a.b.b);j.a<j.c.c.length;){i=RD(ynb(j),30);p[l++]=i.a.c.length}}}q.c.length=0;a.a=null;a.b=null;a.c=null;c.Vg()} +function tMc(a,b){var c,d,e,f,g,h,i,j,k,l;k=new bnb;l=new wmb;f=null;e=0;for(d=0;d<b.length;++d){c=b[d];vMc(f,c)&&(e=oMc(a,l,k,cMc,e));nQb(c,(Ywc(),pwc))&&(f=RD(mQb(c,pwc),10));switch(c.k.g){case 0:for(i=lr(dr(b3b(c,(qpd(),Yod)),new eNc));xc(i);){g=RD(yc(i),12);a.d[g.p]=e++;ZEb(k.c,g)}e=oMc(a,l,k,cMc,e);for(j=lr(dr(b3b(c,npd),new eNc));xc(j);){g=RD(yc(j),12);a.d[g.p]=e++;ZEb(k.c,g)}break;case 3:if(!b3b(c,bMc).dc()){g=RD(b3b(c,bMc).Xb(0),12);a.d[g.p]=e++;ZEb(k.c,g)}b3b(c,cMc).dc()||hmb(l,c);break;case 1:for(h=b3b(c,(qpd(),ppd)).Kc();h.Ob();){g=RD(h.Pb(),12);a.d[g.p]=e++;ZEb(k.c,g)}b3b(c,Xod).Jc(new cNc(l,c));}}oMc(a,l,k,cMc,e);return k} +function vgd(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(b==null||b.length==0){return null}f=RD(Xjb(a.f,b),23);if(!f){for(e=(n=(new glb(a.d)).a.vc().Kc(),new llb(n));e.a.Ob();){c=(g=RD(e.a.Pb(),44),RD(g.md(),23));h=c.f;o=b.length;if(lhb(h.substr(h.length-o,o),b)&&(b.length==h.length||ihb(h,h.length-b.length-1)==46)){if(f){return null}f=c}}if(!f){for(d=(m=(new glb(a.d)).a.vc().Kc(),new llb(m));d.a.Ob();){c=(g=RD(d.a.Pb(),44),RD(g.md(),23));l=c.g;if(l!=null){for(i=l,j=0,k=i.length;j<k;++j){h=i[j];o=b.length;if(lhb(h.substr(h.length-o,o),b)&&(b.length==h.length||ihb(h,h.length-b.length-1)==46)){if(f){return null}f=c}}}}}!!f&&$jb(a.f,b,f)}return f} +function IA(a,b){var c,d,e,f,g;c=new cib;g=false;for(f=0;f<b.length;f++){d=(BFb(f,b.length),b.charCodeAt(f));if(d==32){wA(a,c,0);c.a+=' ';wA(a,c,0);while(f+1<b.length&&(BFb(f+1,b.length),b.charCodeAt(f+1)==32)){++f}continue}if(g){if(d==39){if(f+1<b.length&&(BFb(f+1,b.length),b.charCodeAt(f+1)==39)){c.a+=String.fromCharCode(d);++f}else{g=false}}else{c.a+=String.fromCharCode(d)}continue}if(qhb('GyMLdkHmsSEcDahKzZv',Fhb(d))>0){wA(a,c,0);c.a+=String.fromCharCode(d);e=BA(b,f);wA(a,c,e);f+=e-1;continue}if(d==39){if(f+1<b.length&&(BFb(f+1,b.length),b.charCodeAt(f+1)==39)){c.a+="'";++f}else{g=true}}else{c.a+=String.fromCharCode(d)}}wA(a,c,0);CA(a)} +function tSc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;t=Yx(a);i=new bnb;f=a.c.length;j=f-1;k=f+1;while(t.a.gc()!=0){while(c.b!=0){r=(sFb(c.b!=0),RD(Wub(c,c.a.a),118));t.a.Bc(r)!=null;r.g=j--;wSc(r,b,c,d)}while(b.b!=0){s=(sFb(b.b!=0),RD(Wub(b,b.a.a),118));t.a.Bc(s)!=null;s.g=k++;wSc(s,b,c,d)}h=qwe;for(p=t.a.ec().Kc();p.Ob();){o=RD(p.Pb(),118);if(!d&&o.b>0&&o.a<=0){i.c.length=0;ZEb(i.c,o);break}n=o.i-o.d;if(n>=h){if(n>h){i.c.length=0;h=n}ZEb(i.c,o)}}if(i.c.length!=0){g=RD(Vmb(i,Jwb(e,i.c.length)),118);t.a.Bc(g)!=null;g.g=k++;wSc(g,b,c,d);i.c.length=0}}q=a.c.length+1;for(m=new Anb(a);m.a<m.c.c.length;){l=RD(ynb(m),118);l.g<f&&(l.g=l.g+q)}} +function FJc(a,b,c){var d,e,f,g;this.j=a;this.e=c1b(a);this.o=this.j.e;this.i=!!this.o;this.p=this.i?RD(Vmb(c,Y2b(this.o).p),219):null;e=RD(mQb(a,(Ywc(),kwc)),21);this.g=e.Hc((ovc(),hvc));this.b=new bnb;this.d=new RLc(this.e);g=RD(mQb(this.j,Lwc),234);this.q=WJc(b,g,this.e);this.k=new _Kc(this);f=dv(cD(WC(QY,1),rve,230,0,[this,this.d,this.k,this.q]));if(b==(RKc(),OKc)&&!Heb(TD(mQb(a,(yCc(),eAc))))){d=new qJc(this.e);ZEb(f.c,d);this.c=new UIc(d,g,RD(this.q,413))}else if(b==OKc&&Heb(TD(mQb(a,(yCc(),eAc))))){d=new qJc(this.e);ZEb(f.c,d);this.c=new vLc(d,g,RD(this.q,413))}else{this.c=new smc(b,this)}Rmb(f,this.c);yNc(f,this.e);this.s=$Kc(this.k)} +function z0b(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q;f=new bnb;for(j=new Anb(d);j.a<j.c.c.length;){h=RD(ynb(j),453);g=null;if(h.f==(BEc(),zEc)){for(o=new Anb(h.e);o.a<o.c.c.length;){n=RD(ynb(o),18);q=n.d.i;if(Y2b(q)==b){q0b(a,b,h,n,h.b,n.d)}else if(!c||n2b(q,c)){r0b(a,b,h,d,n)}else{m=w0b(a,b,c,n,h.b,zEc,g);m!=g&&(ZEb(f.c,m),true);m.c&&(g=m)}}}else{for(l=new Anb(h.e);l.a<l.c.c.length;){k=RD(ynb(l),18);p=k.c.i;if(Y2b(p)==b){q0b(a,b,h,k,k.c,h.b)}else if(!c||n2b(p,c)){continue}else{m=w0b(a,b,c,k,h.b,yEc,g);m!=g&&(ZEb(f.c,m),true);m.c&&(g=m)}}}}for(i=new Anb(f);i.a<i.c.c.length;){h=RD(ynb(i),453);Wmb(b.a,h.a,0)!=-1||Rmb(b.a,h.a);h.c&&(ZEb(e.c,h),true)}} +function QXb(a){var b,c,d,e,f,g,h;b=0;for(f=new Anb(a.b.a);f.a<f.c.c.length;){d=RD(ynb(f),194);d.b=0;d.c=0}PXb(a,0);OXb(a,a.g);uYb(a.c);yYb(a.c);c=(Cmd(),ymd);wYb(qYb(vYb(wYb(qYb(vYb(wYb(vYb(a.c,c)),Fmd(c)))),c)));vYb(a.c,ymd);TXb(a,a.g);UXb(a,0);VXb(a,0);WXb(a,1);PXb(a,1);OXb(a,a.d);uYb(a.c);for(g=new Anb(a.b.a);g.a<g.c.c.length;){d=RD(ynb(g),194);b+=$wnd.Math.abs(d.c)}for(h=new Anb(a.b.a);h.a<h.c.c.length;){d=RD(ynb(h),194);d.b=0;d.c=0}c=Bmd;wYb(qYb(vYb(wYb(qYb(vYb(wYb(yYb(vYb(a.c,c))),Fmd(c)))),c)));vYb(a.c,ymd);TXb(a,a.d);UXb(a,1);VXb(a,1);WXb(a,0);yYb(a.c);for(e=new Anb(a.b.a);e.a<e.c.c.length;){d=RD(ynb(e),194);b+=$wnd.Math.abs(d.c)}return b} +function A0b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(!Heb(TD(mQb(c,(yCc(),NAc))))){return}for(h=new Anb(c.j);h.a<h.c.c.length;){g=RD(ynb(h),12);m=s2b(g.g);for(j=m,k=0,l=j.length;k<l;++k){i=j[k];f=i.d.i==c;e=f&&Heb(TD(mQb(i,OAc)));if(e){o=i.c;n=RD(Wjb(a.b,o),10);if(!n){n=f2b(o,(Bod(),zod),o.j,-1,null,null,o.o,RD(mQb(b,rAc),88),b);pQb(n,(Ywc(),Awc),o);Zjb(a.b,o,n);Rmb(b.a,n)}q=i.d;p=RD(Wjb(a.b,q),10);if(!p){p=f2b(q,(Bod(),zod),q.j,1,null,null,q.o,RD(mQb(b,rAc),88),b);pQb(p,(Ywc(),Awc),q);Zjb(a.b,q,p);Rmb(b.a,p)}d=s0b(i);Y0b(d,RD(Vmb(n.j,0),12));Z0b(d,RD(Vmb(p.j,0),12));Rc(a.a,i,new J0b(d,b,(BEc(),zEc)));RD(mQb(b,(Ywc(),kwc)),21).Fc((ovc(),hvc))}}}} +function OQc(a,b){var c,d,e,f,g,h,i,j,k,l,m;for(e=new Anb(a.a.b);e.a<e.c.c.length;){c=RD(ynb(e),30);for(i=new Anb(c.a);i.a<i.c.c.length;){h=RD(ynb(i),10);b.j[h.p]=h;b.i[h.p]=b.o==(EQc(),DQc)?pxe:oxe}}akb(a.c);g=a.a.b;b.c==(wQc(),uQc)&&(g=hv(g));sRc(a.e,b,a.b);Mnb(b.p,null);for(f=g.Kc();f.Ob();){c=RD(f.Pb(),30);j=c.a;b.o==(EQc(),DQc)&&(j=hv(j));for(m=j.Kc();m.Ob();){l=RD(m.Pb(),10);b.g[l.p]==l&&PQc(a,l,b)}}QQc(a,b);for(d=g.Kc();d.Ob();){c=RD(d.Pb(),30);for(m=new Anb(c.a);m.a<m.c.c.length;){l=RD(ynb(m),10);b.p[l.p]=b.p[b.g[l.p].p];if(l==b.g[l.p]){k=Kfb(b.i[b.j[l.p].p]);(b.o==(EQc(),DQc)&&k>pxe||b.o==CQc&&k<oxe)&&(b.p[l.p]=Kfb(b.p[l.p])+k)}}}a.e.xg()} +function ldc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;c.Ug('Label dummy switching',1);d=RD(mQb(b,(yCc(),uAc)),232);$cc(b);e=idc(b,d);a.a=$C(iE,vxe,28,b.b.c.length,15,1);for(h=(btc(),cD(WC(ZW,1),jwe,232,0,[Zsc,_sc,Ysc,$sc,atc,Xsc])),k=0,n=h.length;k<n;++k){f=h[k];if((f==atc||f==Xsc||f==$sc)&&!RD(Csb(e.a,f)?e.b[f.g]:null,15).dc()){bdc(a,b);break}}for(i=cD(WC(ZW,1),jwe,232,0,[Zsc,_sc,Ysc,$sc,atc,Xsc]),l=0,o=i.length;l<o;++l){f=i[l];f==atc||f==Xsc||f==$sc||mdc(a,RD(Csb(e.a,f)?e.b[f.g]:null,15))}for(g=cD(WC(ZW,1),jwe,232,0,[Zsc,_sc,Ysc,$sc,atc,Xsc]),j=0,m=g.length;j<m;++j){f=g[j];(f==atc||f==Xsc||f==$sc)&&mdc(a,RD(Csb(e.a,f)?e.b[f.g]:null,15))}a.a=null;c.Vg()} +function tte(a,b){var c,d,e,f,g,h,i,j,k;j=b;if(j.b==null||a.b==null)return;vte(a);ste(a);vte(j);ste(j);c=$C(kE,Pwe,28,a.b.length+j.b.length,15,1);k=0;d=0;g=0;while(d<a.b.length&&g<j.b.length){e=a.b[d];f=a.b[d+1];h=j.b[g];i=j.b[g+1];if(f<h){d+=2}else if(f>=h&&e<=i){if(h<=e&&f<=i){c[k++]=e;c[k++]=f;d+=2}else if(h<=e){c[k++]=e;c[k++]=i;a.b[d]=i+1;g+=2}else if(f<=i){c[k++]=h;c[k++]=f;d+=2}else{c[k++]=h;c[k++]=i;a.b[d]=i+1}}else if(i<e){g+=2}else{throw Adb(new yz('Token#intersectRanges(): Internal Error: ['+a.b[d]+','+a.b[d+1]+'] & ['+j.b[g]+','+j.b[g+1]+']'))}}while(d<a.b.length){c[k++]=a.b[d++];c[k++]=a.b[d++]}a.b=$C(kE,Pwe,28,k,15,1);hib(c,0,a.b,0,k)} +function RXb(a){var b,c,d,e,f,g,h;b=new bnb;a.g=new bnb;a.d=new bnb;for(g=new vkb((new mkb(a.f.b)).a);g.b;){f=tkb(g);Rmb(b,RD(RD(f.md(),42).b,86));Dmd(RD(f.ld(),602).Af())?Rmb(a.d,RD(f.md(),42)):Rmb(a.g,RD(f.md(),42))}OXb(a,a.d);OXb(a,a.g);a.c=new EYb(a.b);CYb(a.c,(zXb(),yXb));TXb(a,a.d);TXb(a,a.g);Tmb(b,a.c.a.b);a.e=new rjd(oxe,oxe);a.a=new rjd(pxe,pxe);for(d=new Anb(b);d.a<d.c.c.length;){c=RD(ynb(d),86);a.e.a=$wnd.Math.min(a.e.a,c.g.c);a.e.b=$wnd.Math.min(a.e.b,c.g.d);a.a.a=$wnd.Math.max(a.a.a,c.g.c+c.g.b);a.a.b=$wnd.Math.max(a.a.b,c.g.d+c.g.a)}BYb(a.c,new $Xb);h=0;do{e=QXb(a);++h}while((h<2||e>pwe)&&h<10);BYb(a.c,new bYb);QXb(a);xYb(a.c);AXb(a.f)} +function B9b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=RD(mQb(a,(yCc(),BBc)),101);g=a.f;f=a.d;h=g.a+f.b+f.c;i=0-f.d-a.c.b;k=g.b+f.d+f.a-a.c.b;j=new bnb;l=new bnb;for(e=new Anb(b);e.a<e.c.c.length;){d=RD(ynb(e),10);switch(c.g){case 1:case 2:case 3:r9b(d);break;case 4:m=RD(mQb(d,zBc),8);n=!m?0:m.a;d.n.a=h*Kfb(UD(mQb(d,(Ywc(),Jwc))))-n;U2b(d,true,false);break;case 5:o=RD(mQb(d,zBc),8);p=!o?0:o.a;d.n.a=Kfb(UD(mQb(d,(Ywc(),Jwc))))-p;U2b(d,true,false);g.a=$wnd.Math.max(g.a,d.n.a+d.o.a/2);}switch(RD(mQb(d,(Ywc(),hwc)),64).g){case 1:d.n.b=i;ZEb(j.c,d);break;case 3:d.n.b=k;ZEb(l.c,d);}}switch(c.g){case 1:case 2:t9b(j,a);t9b(l,a);break;case 3:z9b(j,a);z9b(l,a);}} +function $Jc(a,b){var c,d,e,f,g,h,i,j,k,l,m;switch(a.k.g){case 1:d=RD(mQb(a,(Ywc(),Awc)),18);c=RD(mQb(d,Bwc),75);!c?(c=new Ejd):Heb(TD(mQb(d,Nwc)))&&(c=Ijd(c));j=RD(mQb(a,vwc),12);if(j){k=xjd(cD(WC(l3,1),Nve,8,0,[j.i.n,j.n,j.a]));if(b<=k.a){return k.b}Pub(c,k,c.a,c.a.a)}l=RD(mQb(a,wwc),12);if(l){m=xjd(cD(WC(l3,1),Nve,8,0,[l.i.n,l.n,l.a]));if(m.a<=b){return m.b}Pub(c,m,c.c.b,c.c)}if(c.b>=2){i=Sub(c,0);g=RD(evb(i),8);h=RD(evb(i),8);while(h.a<b&&i.b!=i.d.c){g=h;h=RD(evb(i),8)}return g.b+(b-g.a)/(h.a-g.a)*(h.b-g.b)}break;case 3:f=RD(mQb(RD(Vmb(a.j,0),12),(Ywc(),Awc)),12);e=f.i;switch(f.j.g){case 1:return e.n.b;case 3:return e.n.b+e.o.b;}}return _2b(a).b} +function Akc(a){var b,c,d,e,f,g,h,i,j,k,l;for(g=new Anb(a.d.b);g.a<g.c.c.length;){f=RD(ynb(g),30);for(i=new Anb(f.a);i.a<i.c.c.length;){h=RD(ynb(i),10);if(Heb(TD(mQb(h,(yCc(),Uzc))))){if(!gr(W2b(h))){d=RD(er(W2b(h)),18);k=d.c.i;k==h&&(k=d.d.i);l=new Ptd(k,ojd(ajd(h.n),k.n));Zjb(a.b,h,l);continue}}e=new Uid(h.n.a-h.d.b,h.n.b-h.d.d,h.o.a+h.d.b+h.d.c,h.o.b+h.d.d+h.d.a);b=mGb(pGb(nGb(oGb(new qGb,h),e),jkc),a.a);gGb(hGb(iGb(new jGb,cD(WC(hN,1),rve,60,0,[b])),b),a.a);j=new cHb;Zjb(a.e,b,j);c=Kr(new is(Mr(Z2b(h).a.Kc(),new ir)))-Kr(new is(Mr(a3b(h).a.Kc(),new ir)));c<0?aHb(j,true,(Cmd(),ymd)):c>0&&aHb(j,true,(Cmd(),zmd));h.k==(r3b(),m3b)&&bHb(j);Zjb(a.f,h,b)}}} +function OVc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=RD(mQb(a,(q$c(),h$c)),27);j=lve;k=lve;h=qwe;i=qwe;for(t=Sub(a.b,0);t.b!=t.d.c;){r=RD(evb(t),40);n=r.e;o=r.f;j=$wnd.Math.min(j,n.a-o.a/2);k=$wnd.Math.min(k,n.b-o.b/2);h=$wnd.Math.max(h,n.a+o.a/2);i=$wnd.Math.max(i,n.b+o.b/2)}m=RD(Gxd(e,(h_c(),T$c)),107);for(s=Sub(a.b,0);s.b!=s.d.c;){r=RD(evb(s),40);l=mQb(r,h$c);if(ZD(l,207)){f=RD(l,27);Byd(f,r.e.a,r.e.b);zxd(f,r)}}for(q=Sub(a.a,0);q.b!=q.d.c;){p=RD(evb(q),65);d=RD(mQb(p,h$c),74);if(d){b=p.a;c=IGd(d,true,true);lsd(b,c)}}u=h-j+(m.b+m.c);g=i-k+(m.d+m.a);Heb(TD(Gxd(e,(umd(),mld))))||Esd(e,u,g,false,false);Ixd(e,Ikd,u-(m.b+m.c));Ixd(e,Hkd,g-(m.d+m.a))} +function Wec(a,b){var c,d,e,f,g,h,i,j,k,l;i=true;e=0;j=a.g[b.p];k=b.o.b+a.o;c=a.d[b.p][2];$mb(a.b,j,sgb(RD(Vmb(a.b,j),17).a-1+c));$mb(a.c,j,Kfb(UD(Vmb(a.c,j)))-k+c*a.f);++j;if(j>=a.j){++a.j;Rmb(a.b,sgb(1));Rmb(a.c,k)}else{d=a.d[b.p][1];$mb(a.b,j,sgb(RD(Vmb(a.b,j),17).a+1-d));$mb(a.c,j,Kfb(UD(Vmb(a.c,j)))+k-d*a.f)}(a.r==(aEc(),VDc)&&(RD(Vmb(a.b,j),17).a>a.k||RD(Vmb(a.b,j-1),17).a>a.k)||a.r==YDc&&(Kfb(UD(Vmb(a.c,j)))>a.n||Kfb(UD(Vmb(a.c,j-1)))>a.n))&&(i=false);for(g=new is(Mr(Z2b(b).a.Kc(),new ir));gs(g);){f=RD(hs(g),18);h=f.c.i;if(a.g[h.p]==j){l=Wec(a,h);e=e+RD(l.a,17).a;i=i&&Heb(TD(l.b))}}a.g[b.p]=j;e=e+a.d[b.p][0];return new Ptd(sgb(e),(Geb(),i?true:false))} +function cXb(a,b){var c,d,e,f,g;c=Kfb(UD(mQb(b,(yCc(),TBc))));c<2&&pQb(b,TBc,2);d=RD(mQb(b,rAc),88);d==(Cmd(),Amd)&&pQb(b,rAc,i2b(b));e=RD(mQb(b,NBc),17);e.a==0?pQb(b,(Ywc(),Lwc),new Owb):pQb(b,(Ywc(),Lwc),new Pwb(e.a));f=TD(mQb(b,gBc));f==null&&pQb(b,gBc,(Geb(),dE(mQb(b,yAc))===dE((Ymd(),Umd))?true:false));FDb(new SDb(null,new Swb(b.a,16)),new fXb(a));FDb(EDb(new SDb(null,new Swb(b.b,16)),new hXb),new jXb(a));g=new gFc(b);pQb(b,(Ywc(),Qwc),g);Sed(a.a);Ved(a.a,(sXb(),nXb),RD(mQb(b,pAc),188));Ved(a.a,oXb,RD(mQb(b,$Ac),188));Ved(a.a,pXb,RD(mQb(b,oAc),188));Ved(a.a,qXb,RD(mQb(b,kBc),188));Ved(a.a,rXb,KRc(RD(mQb(b,yAc),223)));Ped(a.a,bXb(b));pQb(b,Kwc,Qed(a.a,b))} +function STc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r;l=new Tsb;g=new bnb;QTc(a,c,a.d.Ag(),g,l);QTc(a,d,a.d.Bg(),g,l);a.b=0.2*(p=RTc(EDb(new SDb(null,new Swb(g,16)),new XTc)),q=RTc(EDb(new SDb(null,new Swb(g,16)),new ZTc)),$wnd.Math.min(p,q));f=0;for(h=0;h<g.c.length-1;h++){i=(tFb(h,g.c.length),RD(g.c[h],118));for(o=h+1;o<g.c.length;o++){f+=PTc(a,i,(tFb(o,g.c.length),RD(g.c[o],118)))}}m=RD(mQb(b,(Ywc(),Lwc)),234);f>=2&&(r=uSc(g,true,m),!a.e&&(a.e=new xTc(a)),tTc(a.e,r,g,a.b),undefined);UTc(g,m);WTc(g);n=-1;for(k=new Anb(g);k.a<k.c.c.length;){j=RD(ynb(k),118);if($wnd.Math.abs(j.s-j.c)<Vze){continue}n=$wnd.Math.max(n,j.o);a.d.yg(j,e,a.c)}a.d.a.a.$b();return n+1} +function s0c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;l=RD(Hr((g=Sub((new dXc(b)).a.d,0),new gXc(g))),40);o=l?RD(mQb(l,(q$c(),b$c)),40):null;e=1;while(!!l&&!!o){i=0;u=0;c=l;d=o;for(h=0;h<e;h++){c=_Wc(c);d=_Wc(d);u+=Kfb(UD(mQb(c,(q$c(),g$c))));i+=Kfb(UD(mQb(d,g$c)))}t=Kfb(UD(mQb(o,(q$c(),j$c))));s=Kfb(UD(mQb(l,j$c)));m=u0c(a,l,o);n=t+i+a.b+m-s-u;if(0<n){j=b;k=0;while(!!j&&j!=d){++k;j=RD(mQb(j,c$c),40)}if(j){r=n/k;j=b;while(j!=d){q=Kfb(UD(mQb(j,j$c)))+n;pQb(j,j$c,q);p=Kfb(UD(mQb(j,g$c)))+n;pQb(j,g$c,p);n-=r;j=RD(mQb(j,c$c),40)}}else{return}}++e;l.d.b==0?(l=kWc(new dXc(b),e)):(l=RD(Hr((f=Sub((new dXc(l)).a.d,0),new gXc(f))),40));o=l?RD(mQb(l,b$c),40):null}} +function Lmc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(m=a.c[b],n=a.c[c],(o=RD(mQb(m,(Ywc(),qwc)),15),!!o&&o.gc()!=0&&o.Hc(n))||(p=m.k!=(r3b(),o3b)&&n.k!=o3b,q=RD(mQb(m,pwc),10),r=RD(mQb(n,pwc),10),s=q!=r,t=!!q&&q!=m||!!r&&r!=n,u=Mmc(m,(qpd(),Yod)),v=Mmc(n,npd),t=t|(Mmc(m,npd)||Mmc(n,Yod)),w=t&&s||u||v,p&&w)||m.k==(r3b(),q3b)&&n.k==p3b||n.k==(r3b(),q3b)&&m.k==p3b){return false}k=a.c[b];f=a.c[c];e=jMc(a.e,k,f,(qpd(),ppd));i=jMc(a.i,k,f,Xod);Cmc(a.f,k,f);j=lmc(a.b,k,f)+RD(e.a,17).a+RD(i.a,17).a+a.f.d;h=lmc(a.b,f,k)+RD(e.b,17).a+RD(i.b,17).a+a.f.b;if(a.a){l=RD(mQb(k,Awc),12);g=RD(mQb(f,Awc),12);d=hMc(a.g,l,g);j+=RD(d.a,17).a;h+=RD(d.b,17).a}return j>h} +function Iad(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;j=oxe;k=oxe;h=pxe;i=pxe;for(m=new Anb(b.i);m.a<m.c.c.length;){l=RD(ynb(m),68);e=RD(RD(Wjb(a.g,l.a),42).b,27);Byd(e,l.b.c,l.b.d);j=$wnd.Math.min(j,e.i);k=$wnd.Math.min(k,e.j);h=$wnd.Math.max(h,e.i+e.g);i=$wnd.Math.max(i,e.j+e.f)}n=RD(Gxd(a.c,(ncd(),ecd)),107);Esd(a.c,h-j+(n.b+n.c),i-k+(n.d+n.a),true,true);Isd(a.c,-j+n.b,-k+n.d);for(d=new dMd(uCd(a.c));d.e!=d.i.gc();){c=RD(bMd(d),74);g=IGd(c,true,true);o=JGd(c);q=LGd(c);p=new rjd(o.i+o.g/2,o.j+o.f/2);f=new rjd(q.i+q.g/2,q.j+q.f/2);r=ojd(new rjd(f.a,f.b),p);wid(r,o.g,o.f);$id(p,r);s=ojd(new rjd(p.a,p.b),f);wid(s,q.g,q.f);$id(f,s);Nzd(g,p.a,p.b);Gzd(g,f.a,f.b)}} +function Tcc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;b.Ug('Label dummy removal',1);d=Kfb(UD(mQb(a,(yCc(),VBc))));e=Kfb(UD(mQb(a,ZBc)));j=RD(mQb(a,rAc),88);for(i=new Anb(a.b);i.a<i.c.c.length;){h=RD(ynb(i),30);l=new Jkb(h.a,0);while(l.b<l.d.gc()){k=(sFb(l.b<l.d.gc()),RD(l.d.Xb(l.c=l.b++),10));if(k.k==(r3b(),n3b)){m=RD(mQb(k,(Ywc(),Awc)),18);o=Kfb(UD(mQb(m,FAc)));g=dE(mQb(k,swc))===dE((Pnd(),Mnd));c=new sjd(k.n);g&&(c.b+=o+d);f=new rjd(k.o.a,k.o.b+(k.k==n3b&&!QDb(CDb(RD(mQb(k,Mwc),15).Oc(),new PAb(new x3b))).Bd((xDb(),wDb))?0:-o-d));n=RD(mQb(k,Mwc),15);j==(Cmd(),Bmd)||j==xmd?Scc(n,c,e,f,g,j):Rcc(n,c,e,f);Tmb(m.b,n);Hec(k,dE(mQb(a,yAc))===dE((Ymd(),Vmd)));Ckb(l)}}}b.Vg()} +function ZBd(a){if(a.q)return;a.q=true;a.p=jBd(a,0);a.a=jBd(a,1);oBd(a.a,0);a.f=jBd(a,2);oBd(a.f,1);iBd(a.f,2);a.n=jBd(a,3);iBd(a.n,3);iBd(a.n,4);iBd(a.n,5);iBd(a.n,6);a.g=jBd(a,4);oBd(a.g,7);iBd(a.g,8);a.c=jBd(a,5);oBd(a.c,7);oBd(a.c,8);a.i=jBd(a,6);oBd(a.i,9);oBd(a.i,10);oBd(a.i,11);oBd(a.i,12);iBd(a.i,13);a.j=jBd(a,7);oBd(a.j,9);a.d=jBd(a,8);oBd(a.d,3);oBd(a.d,4);oBd(a.d,5);oBd(a.d,6);iBd(a.d,7);iBd(a.d,8);iBd(a.d,9);iBd(a.d,10);a.b=jBd(a,9);iBd(a.b,0);iBd(a.b,1);a.e=jBd(a,10);iBd(a.e,1);iBd(a.e,2);iBd(a.e,3);iBd(a.e,4);oBd(a.e,5);oBd(a.e,6);oBd(a.e,7);oBd(a.e,8);oBd(a.e,9);oBd(a.e,10);iBd(a.e,11);a.k=jBd(a,11);iBd(a.k,0);iBd(a.k,1);a.o=kBd(a,12);a.s=kBd(a,13)} +function CXb(a,b){b.dc()&&JYb(a.j,true,true,true,true);pb(b,(qpd(),cpd))&&JYb(a.j,true,true,true,false);pb(b,Zod)&&JYb(a.j,false,true,true,true);pb(b,kpd)&&JYb(a.j,true,true,false,true);pb(b,mpd)&&JYb(a.j,true,false,true,true);pb(b,dpd)&&JYb(a.j,false,true,true,false);pb(b,$od)&&JYb(a.j,false,true,false,true);pb(b,lpd)&&JYb(a.j,true,false,false,true);pb(b,jpd)&&JYb(a.j,true,false,true,false);pb(b,hpd)&&JYb(a.j,true,true,true,true);pb(b,apd)&&JYb(a.j,true,true,true,true);pb(b,hpd)&&JYb(a.j,true,true,true,true);pb(b,_od)&&JYb(a.j,true,true,true,true);pb(b,ipd)&&JYb(a.j,true,true,true,true);pb(b,gpd)&&JYb(a.j,true,true,true,true);pb(b,fpd)&&JYb(a.j,true,true,true,true)} +function tAd(b,c,d){var e,f,g,h,i,j,k,l,m;if(b.a!=c.jk()){throw Adb(new agb(VHe+c.xe()+WHe))}e=Oee((lke(),jke),c).Jl();if(e){return e.jk().wi().ri(e,d)}h=Oee(jke,c).Ll();if(h){if(d==null){return null}i=RD(d,15);if(i.dc()){return ''}m=new Qhb;for(g=i.Kc();g.Ob();){f=g.Pb();Nhb(m,h.jk().wi().ri(h,f));m.a+=' '}return qeb(m,m.a.length-1)}l=Oee(jke,c).Ml();if(!l.dc()){for(k=l.Kc();k.Ob();){j=RD(k.Pb(),156);if(j.fk(d)){try{m=j.jk().wi().ri(j,d);if(m!=null){return m}}catch(a){a=zdb(a);if(!ZD(a,103))throw Adb(a)}}}throw Adb(new agb("Invalid value: '"+d+"' for datatype :"+c.xe()))}RD(c,847).ok();return d==null?null:ZD(d,180)?''+RD(d,180).a:rb(d)==qK?a2d(nAd[0],RD(d,206)):jeb(d)} +function ZUc(a){var b,c,d,e,f,g,h,i,j,k;j=new Yub;h=new Yub;for(f=new Anb(a);f.a<f.c.c.length;){d=RD(ynb(f),131);d.v=0;d.n=d.i.c.length;d.u=d.t.c.length;d.n==0&&(Pub(j,d,j.c.b,j.c),true);d.u==0&&d.r.a.gc()==0&&(Pub(h,d,h.c.b,h.c),true)}g=-1;while(j.b!=0){d=RD(ku(j,0),131);for(c=new Anb(d.t);c.a<c.c.c.length;){b=RD(ynb(c),274);k=b.b;k.v=$wnd.Math.max(k.v,d.v+1);g=$wnd.Math.max(g,k.v);--k.n;k.n==0&&(Pub(j,k,j.c.b,j.c),true)}}if(g>-1){for(e=Sub(h,0);e.b!=e.d.c;){d=RD(evb(e),131);d.v=g}while(h.b!=0){d=RD(ku(h,0),131);for(c=new Anb(d.i);c.a<c.c.c.length;){b=RD(ynb(c),274);i=b.a;if(i.r.a.gc()!=0){continue}i.v=$wnd.Math.min(i.v,d.v-1);--i.u;i.u==0&&(Pub(h,i,h.c.b,h.c),true)}}}} +function WTc(a){var b,c,d,e,f,g,h,i,j,k;j=new bnb;h=new bnb;for(g=new Anb(a);g.a<g.c.c.length;){e=RD(ynb(g),118);PSc(e,e.f.c.length);QSc(e,e.k.c.length);e.d==0&&(ZEb(j.c,e),true);e.i==0&&e.e.b==0&&(ZEb(h.c,e),true)}d=-1;while(j.c.length!=0){e=RD(Xmb(j,0),118);for(c=new Anb(e.k);c.a<c.c.c.length;){b=RD(ynb(c),132);k=b.b;RSc(k,$wnd.Math.max(k.o,e.o+1));d=$wnd.Math.max(d,k.o);PSc(k,k.d-1);k.d==0&&(ZEb(j.c,k),true)}}if(d>-1){for(f=new Anb(h);f.a<f.c.c.length;){e=RD(ynb(f),118);e.o=d}while(h.c.length!=0){e=RD(Xmb(h,0),118);for(c=new Anb(e.f);c.a<c.c.c.length;){b=RD(ynb(c),132);i=b.a;if(i.e.b>0){continue}RSc(i,$wnd.Math.min(i.o,e.o-1));QSc(i,i.i-1);i.i==0&&(ZEb(h.c,i),true)}}}} +function Lid(a,b,c,d,e){var f,g,h,i;i=oxe;g=false;h=Gid(a,ojd(new rjd(b.a,b.b),a),$id(new rjd(c.a,c.b),e),ojd(new rjd(d.a,d.b),c));f=!!h&&!($wnd.Math.abs(h.a-a.a)<=IGe&&$wnd.Math.abs(h.b-a.b)<=IGe||$wnd.Math.abs(h.a-b.a)<=IGe&&$wnd.Math.abs(h.b-b.b)<=IGe);h=Gid(a,ojd(new rjd(b.a,b.b),a),c,e);!!h&&(($wnd.Math.abs(h.a-a.a)<=IGe&&$wnd.Math.abs(h.b-a.b)<=IGe)==($wnd.Math.abs(h.a-b.a)<=IGe&&$wnd.Math.abs(h.b-b.b)<=IGe)||f?(i=$wnd.Math.min(i,ejd(ojd(h,c)))):(g=true));h=Gid(a,ojd(new rjd(b.a,b.b),a),d,e);!!h&&(g||($wnd.Math.abs(h.a-a.a)<=IGe&&$wnd.Math.abs(h.b-a.b)<=IGe)==($wnd.Math.abs(h.a-b.a)<=IGe&&$wnd.Math.abs(h.b-b.b)<=IGe)||f)&&(i=$wnd.Math.min(i,ejd(ojd(h,d))));return i} +function eWb(a){Cgd(a,new Pfd(Wfd($fd(Xfd(Zfd(Yfd(new agd,AAe),BAe),"Minimizes the stress within a layout using stress majorization. Stress exists if the euclidean distance between a pair of nodes doesn't match their graph theoretic distance, that is, the shortest path between the two nodes. The method allows to specify individual edge lengths."),new hWb),Zze)));Agd(a,AAe,dAe,iGd(XVb));Agd(a,AAe,fAe,(Geb(),true));Agd(a,AAe,jAe,iGd($Vb));Agd(a,AAe,CAe,iGd(_Vb));Agd(a,AAe,iAe,iGd(aWb));Agd(a,AAe,kAe,iGd(ZVb));Agd(a,AAe,gAe,iGd(bWb));Agd(a,AAe,lAe,iGd(cWb));Agd(a,AAe,vAe,iGd(WVb));Agd(a,AAe,xAe,iGd(UVb));Agd(a,AAe,yAe,iGd(VVb));Agd(a,AAe,zAe,iGd(YVb));Agd(a,AAe,wAe,iGd(TVb))} +function kJc(a){var b,c,d,e,f,g,h,i;b=null;for(d=new Anb(a);d.a<d.c.c.length;){c=RD(ynb(d),239);Kfb(pJc(c.g,c.d[0]).a);c.b=null;if(!!c.e&&c.e.gc()>0&&c.c==0){!b&&(b=new bnb);ZEb(b.c,c)}}if(b){while(b.c.length!=0){c=RD(Xmb(b,0),239);if(!!c.b&&c.b.c.length>0){for(f=(!c.b&&(c.b=new bnb),new Anb(c.b));f.a<f.c.c.length;){e=RD(ynb(f),239);if(Mfb(pJc(e.g,e.d[0]).a)==Mfb(pJc(c.g,c.d[0]).a)){if(Wmb(a,e,0)>Wmb(a,c,0)){return new Ptd(e,c)}}else if(Kfb(pJc(e.g,e.d[0]).a)>Kfb(pJc(c.g,c.d[0]).a)){return new Ptd(e,c)}}}for(h=(!c.e&&(c.e=new bnb),c.e).Kc();h.Ob();){g=RD(h.Pb(),239);i=(!g.b&&(g.b=new bnb),g.b);wFb(0,i.c.length);XEb(i.c,0,c);g.c==i.c.length&&(ZEb(b.c,g),true)}}}return null} +function _Jc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;b.Ug('Interactive crossing minimization',1);g=0;for(f=new Anb(a.b);f.a<f.c.c.length;){d=RD(ynb(f),30);d.p=g++}m=c1b(a);q=new ILc(m.length);yNc(new mob(cD(WC(QY,1),rve,230,0,[q])),m);p=0;g=0;for(e=new Anb(a.b);e.a<e.c.c.length;){d=RD(ynb(e),30);c=0;l=0;for(k=new Anb(d.a);k.a<k.c.c.length;){i=RD(ynb(k),10);if(i.n.a>0){c+=i.n.a+i.o.a/2;++l}for(o=new Anb(i.j);o.a<o.c.c.length;){n=RD(ynb(o),12);n.p=p++}}l>0&&(c/=l);r=$C(iE,vxe,28,d.a.c.length,15,1);h=0;for(j=new Anb(d.a);j.a<j.c.c.length;){i=RD(ynb(j),10);i.p=h++;r[i.p]=$Jc(i,c);i.k==(r3b(),o3b)&&pQb(i,(Ywc(),Cwc),r[i.p])}yob();_mb(d.a,new eKc(r));wIc(q,m,g,true);++g}b.Vg()} +function wte(a,b){var c,d,e,f,g,h,i,j,k;if(b.e==5){tte(a,b);return}j=b;if(j.b==null||a.b==null)return;vte(a);ste(a);vte(j);ste(j);c=$C(kE,Pwe,28,a.b.length+j.b.length,15,1);k=0;d=0;g=0;while(d<a.b.length&&g<j.b.length){e=a.b[d];f=a.b[d+1];h=j.b[g];i=j.b[g+1];if(f<h){c[k++]=a.b[d++];c[k++]=a.b[d++]}else if(f>=h&&e<=i){if(h<=e&&f<=i){d+=2}else if(h<=e){a.b[d]=i+1;g+=2}else if(f<=i){c[k++]=e;c[k++]=h-1;d+=2}else{c[k++]=e;c[k++]=h-1;a.b[d]=i+1;g+=2}}else if(i<e){g+=2}else{throw Adb(new yz('Token#subtractRanges(): Internal Error: ['+a.b[d]+','+a.b[d+1]+'] - ['+j.b[g]+','+j.b[g+1]+']'))}}while(d<a.b.length){c[k++]=a.b[d++];c[k++]=a.b[d++]}a.b=$C(kE,Pwe,28,k,15,1);hib(c,0,a.b,0,k)} +function oTb(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;h=IGd(b,false,false);r=ssd(h);d&&(r=Ijd(r));t=Kfb(UD(Gxd(b,(tSb(),mSb))));q=(sFb(r.b!=0),RD(r.a.a.c,8));l=RD(ju(r,1),8);if(r.b>2){k=new bnb;Tmb(k,new Rkb(r,1,r.b));f=jTb(k,t+a.a);s=new ORb(f);kQb(s,b);ZEb(c.c,s)}else{d?(s=RD(Wjb(a.b,JGd(b)),272)):(s=RD(Wjb(a.b,LGd(b)),272))}i=JGd(b);d&&(i=LGd(b));g=qTb(q,i);j=t+a.a;if(g.a){j+=$wnd.Math.abs(q.b-l.b);p=new rjd(l.a,(l.b+q.b)/2)}else{j+=$wnd.Math.abs(q.a-l.a);p=new rjd((l.a+q.a)/2,l.b)}d?Zjb(a.d,b,new QRb(s,g,p,j)):Zjb(a.c,b,new QRb(s,g,p,j));Zjb(a.b,b,s);o=(!b.n&&(b.n=new C5d(I4,b,1,7)),b.n);for(n=new dMd(o);n.e!=n.i.gc();){m=RD(bMd(n),135);e=nTb(a,m,true,0,0);ZEb(c.c,e)}} +function sMb(a){var b,c,d,e,f,g,h;if(a.A.dc()){return}if(a.A.Hc((Qpd(),Opd))){RD(Vrb(a.b,(qpd(),Yod)),127).k=true;RD(Vrb(a.b,npd),127).k=true;b=a.q!=(Bod(),xod)&&a.q!=wod;QJb(RD(Vrb(a.b,Xod),127),b);QJb(RD(Vrb(a.b,ppd),127),b);QJb(a.g,b);if(a.A.Hc(Ppd)){RD(Vrb(a.b,Yod),127).j=true;RD(Vrb(a.b,npd),127).j=true;RD(Vrb(a.b,Xod),127).k=true;RD(Vrb(a.b,ppd),127).k=true;a.g.k=true}}if(a.A.Hc(Npd)){a.a.j=true;a.a.k=true;a.g.j=true;a.g.k=true;h=a.B.Hc((dqd(),_pd));for(e=nMb(),f=0,g=e.length;f<g;++f){d=e[f];c=RD(Vrb(a.i,d),314);if(c){if(jMb(d)){c.j=true;c.k=true}else{c.j=!h;c.k=!h}}}}if(a.A.Hc(Mpd)&&a.B.Hc((dqd(),$pd))){a.g.j=true;a.g.j=true;if(!a.a.j){a.a.j=true;a.a.k=true;a.a.e=true}}} +function eOc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;for(d=new Anb(a.e.b);d.a<d.c.c.length;){c=RD(ynb(d),30);for(f=new Anb(c.a);f.a<f.c.c.length;){e=RD(ynb(f),10);n=a.i[e.p];j=n.a.e;i=n.d.e;e.n.b=j;r=i-j-e.o.b;b=BOc(e);m=(wDc(),(!e.q?(yob(),yob(),wob):e.q)._b((yCc(),iBc))?(l=RD(mQb(e,iBc),203)):(l=RD(mQb(Y2b(e),jBc),203)),l);b&&(m==tDc||m==sDc)&&(e.o.b+=r);if(b&&(m==vDc||m==tDc||m==sDc)){for(p=new Anb(e.j);p.a<p.c.c.length;){o=RD(ynb(p),12);if((qpd(),apd).Hc(o.j)){k=RD(Wjb(a.k,o),125);o.n.b=k.e-j}}for(h=new Anb(e.b);h.a<h.c.c.length;){g=RD(ynb(h),72);q=RD(mQb(e,dBc),21);q.Hc((dod(),aod))?(g.n.b+=r):q.Hc(bod)&&(g.n.b+=r/2)}(m==tDc||m==sDc)&&b3b(e,(qpd(),npd)).Jc(new yPc(r))}}}} +function qOc(a,b,c){var d,e,f,g,h,i,j,k,l,m;j=new bnb;for(i=new Anb(b.a);i.a<i.c.c.length;){g=RD(ynb(i),10);for(m=b3b(g,(qpd(),Xod)).Kc();m.Ob();){l=RD(m.Pb(),12);for(e=new Anb(l.g);e.a<e.c.c.length;){d=RD(ynb(e),18);if(!W0b(d)&&d.c.i.c==d.d.i.c||W0b(d)||d.d.i.c!=c){continue}ZEb(j.c,d)}}}for(h=hv(c.a).Kc();h.Ob();){g=RD(h.Pb(),10);for(m=b3b(g,(qpd(),ppd)).Kc();m.Ob();){l=RD(m.Pb(),12);for(e=new Anb(l.e);e.a<e.c.c.length;){d=RD(ynb(e),18);if(!W0b(d)&&d.c.i.c==d.d.i.c||W0b(d)||d.c.i.c!=b){continue}if(j.c.length!=0){k=new Jkb(j,j.c.length);f=(sFb(k.b>0),RD(k.a.Xb(k.c=--k.b),18));while(f!=d&&k.b>0){a.a[f.p]=true;a.a[d.p]=true;f=(sFb(k.b>0),RD(k.a.Xb(k.c=--k.b),18))}k.b>0&&Ckb(k)}}}}} +function Zyb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;if(!a.b){return false}g=null;m=null;i=new Fzb(null,null);e=1;i.a[1]=a.b;l=i;while(l.a[e]){j=e;h=m;m=l;l=l.a[e];d=a.a.Ne(b,l.d);e=d<0?0:1;d==0&&(!c.c||Fvb(l.e,c.d))&&(g=l);if(!(!!l&&l.b)&&!Vyb(l.a[e])){if(Vyb(l.a[1-e])){m=m.a[j]=azb(l,e)}else if(!Vyb(l.a[1-e])){n=m.a[1-j];if(n){if(!Vyb(n.a[1-j])&&!Vyb(n.a[j])){m.b=false;n.b=true;l.b=true}else{f=h.a[1]==m?1:0;Vyb(n.a[j])?(h.a[f]=_yb(m,j)):Vyb(n.a[1-j])&&(h.a[f]=azb(m,j));l.b=h.a[f].b=true;h.a[f].a[0].b=false;h.a[f].a[1].b=false}}}}}if(g){c.b=true;c.d=g.e;if(l!=g){k=new Fzb(l.d,l.e);$yb(a,i,g,k);m==g&&(m=k)}m.a[m.a[1]==l?1:0]=l.a[!l.a[0]?1:0];--a.c}a.b=i.a[1];!!a.b&&(a.b.b=false);return c.b} +function Ilc(a){var b,c,d,e,f,g,h,i,j,k,l,m;for(e=new Anb(a.a.a.b);e.a<e.c.c.length;){d=RD(ynb(e),60);for(i=d.c.Kc();i.Ob();){h=RD(i.Pb(),60);if(d.a==h.a){continue}Dmd(a.a.d)?(l=a.a.g.ff(d,h)):(l=a.a.g.gf(d,h));f=d.b.a+d.d.b+l-h.b.a;f=$wnd.Math.ceil(f);f=$wnd.Math.max(0,f);if(_jc(d,h)){g=eJb(new gJb,a.d);j=eE($wnd.Math.ceil(h.b.a-d.b.a));b=j-(h.b.a-d.b.a);k=$jc(d).a;c=d;if(!k){k=$jc(h).a;b=-b;c=h}if(k){c.b.a-=b;k.n.a-=b}rIb(uIb(tIb(vIb(sIb(new wIb,$wnd.Math.max(0,j)),1),g),a.c[d.a.d]));rIb(uIb(tIb(vIb(sIb(new wIb,$wnd.Math.max(0,-j)),1),g),a.c[h.a.d]))}else{m=1;(ZD(d.g,154)&&ZD(h.g,10)||ZD(h.g,154)&&ZD(d.g,10))&&(m=2);rIb(uIb(tIb(vIb(sIb(new wIb,eE(f)),m),a.c[d.a.d]),a.c[h.a.d]))}}}} +function PIc(a,b,c){var d,e,f,g,h,i,j,k,l,m;if(c){d=-1;k=new Jkb(b,0);while(k.b<k.d.gc()){h=(sFb(k.b<k.d.gc()),RD(k.d.Xb(k.c=k.b++),10));l=a.c[h.c.p][h.p].a;if(l==null){g=d+1;f=new Jkb(b,k.b);while(f.b<f.d.gc()){m=TIc(a,(sFb(f.b<f.d.gc()),RD(f.d.Xb(f.c=f.b++),10))).a;if(m!=null){g=(uFb(m),m);break}}l=(d+g)/2;a.c[h.c.p][h.p].a=l;a.c[h.c.p][h.p].d=(uFb(l),l);a.c[h.c.p][h.p].b=1}d=(uFb(l),l)}}else{e=0;for(j=new Anb(b);j.a<j.c.c.length;){h=RD(ynb(j),10);a.c[h.c.p][h.p].a!=null&&(e=$wnd.Math.max(e,Kfb(a.c[h.c.p][h.p].a)))}e+=2;for(i=new Anb(b);i.a<i.c.c.length;){h=RD(ynb(i),10);if(a.c[h.c.p][h.p].a==null){l=Kwb(a.i,24)*Nxe*e-1;a.c[h.c.p][h.p].a=l;a.c[h.c.p][h.p].d=l;a.c[h.c.p][h.p].b=1}}}} +function xA(a,b,c){var d,e,f,g,h,i,j,k,l;!c&&(c=hB(b.q.getTimezoneOffset()));e=(b.q.getTimezoneOffset()-c.a)*60000;h=new wB(Bdb(Hdb(b.q.getTime()),e));i=h;if(h.q.getTimezoneOffset()!=b.q.getTimezoneOffset()){e>0?(e-=86400000):(e+=86400000);i=new wB(Bdb(Hdb(b.q.getTime()),e))}k=new cib;j=a.a.length;for(f=0;f<j;){d=ihb(a.a,f);if(d>=97&&d<=122||d>=65&&d<=90){for(g=f+1;g<j&&ihb(a.a,g)==d;++g);LA(k,d,g-f,h,i,c);f=g}else if(d==39){++f;if(f<j&&ihb(a.a,f)==39){k.a+="'";++f;continue}l=false;while(!l){g=f;while(g<j&&ihb(a.a,g)!=39){++g}if(g>=j){throw Adb(new agb("Missing trailing '"))}g+1<j&&ihb(a.a,g+1)==39?++g:(l=true);Zhb(k,zhb(a.a,f,g));f=g+1}}else{k.a+=String.fromCharCode(d);++f}}return k.a} +function abe(){RRd(g7,new Ibe);RRd(f7,new nce);RRd(h7,new Uce);RRd(i7,new kde);RRd(k7,new nde);RRd(m7,new qde);RRd(l7,new tde);RRd(n7,new wde);RRd(p7,new ebe);RRd(q7,new hbe);RRd(r7,new kbe);RRd(s7,new nbe);RRd(t7,new qbe);RRd(u7,new tbe);RRd(v7,new wbe);RRd(y7,new zbe);RRd(A7,new Cbe);RRd(C8,new Fbe);RRd(o7,new Lbe);RRd(z7,new Obe);RRd(QI,new Rbe);RRd(WC(gE,1),new Ube);RRd(RI,new Xbe);RRd(SI,new $be);RRd(qK,new bce);RRd(T6,new ece);RRd(VI,new hce);RRd(Y6,new kce);RRd(Z6,new qce);RRd(Tbb,new tce);RRd(Jbb,new wce);RRd(ZI,new zce);RRd(bJ,new Cce);RRd(UI,new Fce);RRd(eJ,new Ice);RRd(VK,new Lce);RRd(Aab,new Oce);RRd(zab,new Rce);RRd(lJ,new Xce);RRd(qJ,new $ce);RRd(a7,new bde);RRd($6,new ede)} +function Inb(a,b){var c,d,e,f,g,h,i,j,k;if(a==null){return vve}i=b.a.zc(a,b);if(i!=null){return '[...]'}c=new Jyb(pve,'[',']');for(e=a,f=0,g=e.length;f<g;++f){d=e[f];if(d!=null&&(rb(d).i&4)!=0){if(Array.isArray(d)&&(k=XC(d),!(k>=14&&k<=16))){if(b.a._b(d)){!c.a?(c.a=new dib(c.d)):Zhb(c.a,c.b);Whb(c.a,'[...]')}else{h=SD(d);j=new btb(b);Gyb(c,Inb(h,j))}}else ZD(d,183)?Gyb(c,hob(RD(d,183))):ZD(d,195)?Gyb(c,aob(RD(d,195))):ZD(d,201)?Gyb(c,bob(RD(d,201))):ZD(d,2111)?Gyb(c,gob(RD(d,2111))):ZD(d,53)?Gyb(c,eob(RD(d,53))):ZD(d,376)?Gyb(c,fob(RD(d,376))):ZD(d,846)?Gyb(c,dob(RD(d,846))):ZD(d,109)&&Gyb(c,cob(RD(d,109)))}else{Gyb(c,d==null?vve:jeb(d))}}return !c.a?c.c:c.e.length==0?c.a.a:c.a.a+(''+c.e)} +function KXd(a,b){var c,d,e,f;f=a.F;if(b==null){a.F=null;yXd(a,null)}else{a.F=(uFb(b),b);d=qhb(b,Fhb(60));if(d!=-1){e=(AFb(0,d,b.length),b.substr(0,d));qhb(b,Fhb(46))==-1&&!lhb(e,hve)&&!lhb(e,dKe)&&!lhb(e,eKe)&&!lhb(e,fKe)&&!lhb(e,gKe)&&!lhb(e,hKe)&&!lhb(e,iKe)&&!lhb(e,jKe)&&(e=kKe);c=thb(b,Fhb(62));c!=-1&&(e+=''+(BFb(c+1,b.length+1),b.substr(c+1)));yXd(a,e)}else{e=b;if(qhb(b,Fhb(46))==-1){d=qhb(b,Fhb(91));d!=-1&&(e=(AFb(0,d,b.length),b.substr(0,d)));if(!lhb(e,hve)&&!lhb(e,dKe)&&!lhb(e,eKe)&&!lhb(e,fKe)&&!lhb(e,gKe)&&!lhb(e,hKe)&&!lhb(e,iKe)&&!lhb(e,jKe)){e=kKe;d!=-1&&(e+=''+(BFb(d,b.length+1),b.substr(d)))}else{e=b}}yXd(a,e);e==b&&(a.F=a.D)}}(a.Db&4)!=0&&(a.Db&1)==0&&qvd(a,new N3d(a,1,5,f,b))} +function Pvd(b,c){var d,e,f,g,h,i,j,k,l,m;j=c.length-1;i=(BFb(j,c.length),c.charCodeAt(j));if(i==93){h=qhb(c,Fhb(91));if(h>=0){f=Uvd(b,(AFb(1,h,c.length),c.substr(1,h-1)));l=(AFb(h+1,j,c.length),c.substr(h+1,j-(h+1)));return Nvd(b,l,f)}}else{d=-1;_eb==null&&(_eb=new RegExp('\\d'));if(_eb.test(String.fromCharCode(i))){d=uhb(c,Fhb(46),j-1);if(d>=0){e=RD(Fvd(b,Zvd(b,(AFb(1,d,c.length),c.substr(1,d-1))),false),61);k=0;try{k=Oeb((BFb(d+1,c.length+1),c.substr(d+1)),qwe,lve)}catch(a){a=zdb(a);if(ZD(a,130)){g=a;throw Adb(new RSd(g))}else throw Adb(a)}if(k<e.gc()){m=e.Xb(k);ZD(m,76)&&(m=RD(m,76).md());return RD(m,58)}}}if(d<0){return RD(Fvd(b,Zvd(b,(BFb(1,c.length+1),c.substr(1))),false),58)}}return null} +function Jcc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;b.Ug('Label dummy insertions',1);l=new bnb;g=Kfb(UD(mQb(a,(yCc(),VBc))));j=Kfb(UD(mQb(a,ZBc)));k=RD(mQb(a,rAc),88);for(n=new Anb(a.a);n.a<n.c.c.length;){m=RD(ynb(n),10);for(f=new is(Mr(a3b(m).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);if(e.c.i!=e.d.i&&br(e.b,Gcc)){p=Kcc(e);o=ev(e.b.c.length);c=Icc(a,e,p,o);ZEb(l.c,c);d=c.o;h=new Jkb(e.b,0);while(h.b<h.d.gc()){i=(sFb(h.b<h.d.gc()),RD(h.d.Xb(h.c=h.b++),72));if(dE(mQb(i,wAc))===dE((Omd(),Lmd))){if(k==(Cmd(),Bmd)||k==xmd){d.a+=i.o.a+j;d.b=$wnd.Math.max(d.b,i.o.b)}else{d.a=$wnd.Math.max(d.a,i.o.a);d.b+=i.o.b+j}ZEb(o.c,i);Ckb(h)}}if(k==(Cmd(),Bmd)||k==xmd){d.a-=j;d.b+=g+p}else{d.b+=g-j+p}}}}Tmb(a.a,l);b.Vg()} +function H_b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;a.c=a.e;o=TD(mQb(b,(yCc(),OBc)));n=o==null||(uFb(o),o);f=RD(mQb(b,(Ywc(),kwc)),21).Hc((ovc(),hvc));e=RD(mQb(b,BBc),101);c=!(e==(Bod(),vod)||e==xod||e==wod);if(n&&(c||!f)){for(l=new Anb(b.a);l.a<l.c.c.length;){j=RD(ynb(l),10);j.p=0}m=new bnb;for(k=new Anb(b.a);k.a<k.c.c.length;){j=RD(ynb(k),10);d=G_b(a,j,null);if(d){i=new d1b;kQb(i,b);pQb(i,ewc,RD(d.b,21));C2b(i.d,b.d);pQb(i,nBc,null);for(h=RD(d.a,15).Kc();h.Ob();){g=RD(h.Pb(),10);Rmb(i.a,g);g.a=i}m.Fc(i)}}f&&(dE(mQb(b,Yzc))===dE((U$b(),Q$b))?(a.c=a.b):dE(mQb(b,Yzc))===dE(S$b)?(a.c=a.d):(a.c=a.a))}else{m=new mob(cD(WC(eR,1),OAe,36,0,[b]))}dE(mQb(b,Yzc))!==dE((U$b(),T$b))&&(yob(),m.jd(new K_b));return m} +function o2d(a,b,c){var d,e,f,g,h,i,j;j=a.c;!b&&(b=d2d);a.c=b;if((a.Db&4)!=0&&(a.Db&1)==0){i=new N3d(a,1,2,j,a.c);!c?(c=i):c.nj(i)}if(j!=b){if(ZD(a.Cb,292)){if(a.Db>>16==-10){c=RD(a.Cb,292).Yk(b,c)}else if(a.Db>>16==-15){!b&&(b=(JTd(),wTd));!j&&(j=(JTd(),wTd));if(a.Cb.Yh()){i=new P3d(a.Cb,1,13,j,b,fZd(o4d(RD(a.Cb,62)),a),false);!c?(c=i):c.nj(i)}}}else if(ZD(a.Cb,90)){if(a.Db>>16==-23){ZD(b,90)||(b=(JTd(),zTd));ZD(j,90)||(j=(JTd(),zTd));if(a.Cb.Yh()){i=new P3d(a.Cb,1,10,j,b,fZd(tYd(RD(a.Cb,29)),a),false);!c?(c=i):c.nj(i)}}}else if(ZD(a.Cb,457)){h=RD(a.Cb,850);g=(!h.b&&(h.b=new pae(new lae)),h.b);for(f=(d=new vkb((new mkb(g.a)).a),new xae(d));f.a.b;){e=RD(tkb(f.a).ld(),89);c=o2d(e,k2d(e,h),c)}}}return c} +function Y4b(a,b){var c,d,e,f,g,h,i,j,k,l,m;g=Heb(TD(Gxd(a,(yCc(),NAc))));m=RD(Gxd(a,EBc),21);i=false;j=false;l=new dMd((!a.c&&(a.c=new C5d(K4,a,9,9)),a.c));while(l.e!=l.i.gc()&&(!i||!j)){f=RD(bMd(l),123);h=0;for(e=Fl(Al(cD(WC(cJ,1),rve,20,0,[(!f.d&&(f.d=new Yie(G4,f,8,5)),f.d),(!f.e&&(f.e=new Yie(G4,f,7,4)),f.e)])));gs(e);){d=RD(hs(e),74);k=g&&ozd(d)&&Heb(TD(Gxd(d,OAc)));c=cZd((!d.b&&(d.b=new Yie(E4,d,4,7)),d.b),f)?a==vCd(AGd(RD(QHd((!d.c&&(d.c=new Yie(E4,d,5,8)),d.c),0),84))):a==vCd(AGd(RD(QHd((!d.b&&(d.b=new Yie(E4,d,4,7)),d.b),0),84)));if(k||c){++h;if(h>1){break}}}h>0?(i=true):m.Hc((Pod(),Lod))&&(!f.n&&(f.n=new C5d(I4,f,1,7)),f.n).i>0&&(i=true);h>1&&(j=true)}i&&b.Fc((ovc(),hvc));j&&b.Fc((ovc(),ivc))} +function Dsd(a){var b,c,d,e,f,g,h,i,j,k,l,m;m=RD(Gxd(a,(umd(),kld)),21);if(m.dc()){return null}h=0;g=0;if(m.Hc((Qpd(),Opd))){k=RD(Gxd(a,Hld),101);d=2;c=2;e=2;f=2;b=!vCd(a)?RD(Gxd(a,Nkd),88):RD(Gxd(vCd(a),Nkd),88);for(j=new dMd((!a.c&&(a.c=new C5d(K4,a,9,9)),a.c));j.e!=j.i.gc();){i=RD(bMd(j),123);l=RD(Gxd(i,Old),64);if(l==(qpd(),opd)){l=osd(i,b);Ixd(i,Old,l)}if(k==(Bod(),wod)){switch(l.g){case 1:d=$wnd.Math.max(d,i.i+i.g);break;case 2:c=$wnd.Math.max(c,i.j+i.f);break;case 3:e=$wnd.Math.max(e,i.i+i.g);break;case 4:f=$wnd.Math.max(f,i.j+i.f);}}else{switch(l.g){case 1:d+=i.g+2;break;case 2:c+=i.f+2;break;case 3:e+=i.g+2;break;case 4:f+=i.f+2;}}}h=$wnd.Math.max(d,e);g=$wnd.Math.max(c,f)}return Esd(a,h,g,true,true)} +function Rqc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;s=RD(zDb(PDb(CDb(new SDb(null,new Swb(b.d,16)),new Vqc(c)),new Xqc(c)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);l=lve;k=qwe;for(i=new Anb(b.b.j);i.a<i.c.c.length;){h=RD(ynb(i),12);if(h.j==c){l=$wnd.Math.min(l,h.p);k=$wnd.Math.max(k,h.p)}}if(l==lve){for(g=0;g<s.gc();g++){Umc(RD(s.Xb(g),105),c,g)}}else{t=$C(kE,Pwe,28,e.length,15,1);Qnb(t,t.length);for(r=s.Kc();r.Ob();){q=RD(r.Pb(),105);f=RD(Wjb(a.b,q),183);j=0;for(p=l;p<=k;p++){f[p]&&(j=$wnd.Math.max(j,d[p]))}if(q.i){n=q.i.c;u=new _sb;for(m=0;m<e.length;m++){e[n][m]&&Ysb(u,sgb(t[m]))}while(Zsb(u,sgb(j))){++j}}Umc(q,c,j);for(o=l;o<=k;o++){f[o]&&(d[o]=j+1)}!!q.i&&(t[q.i.c]=j)}}} +function wOc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;e=null;for(d=new Anb(b.a);d.a<d.c.c.length;){c=RD(ynb(d),10);BOc(c)?(f=(h=eJb(fJb(new gJb,c),a.f),i=eJb(fJb(new gJb,c),a.f),j=new ROc(c,true,h,i),k=c.o.b,l=(wDc(),(!c.q?(yob(),yob(),wob):c.q)._b((yCc(),iBc))?(m=RD(mQb(c,iBc),203)):(m=RD(mQb(Y2b(c),jBc),203)),m),n=10000,l==sDc&&(n=1),o=rIb(uIb(tIb(sIb(vIb(new wIb,n),eE($wnd.Math.ceil(k))),h),i)),l==tDc&&Ysb(a.d,o),xOc(a,hv(b3b(c,(qpd(),ppd))),j),xOc(a,b3b(c,Xod),j),j)):(f=(p=eJb(fJb(new gJb,c),a.f),FDb(CDb(new SDb(null,new Swb(c.j,16)),new cPc),new ePc(a,p)),new ROc(c,false,p,p)));a.i[c.p]=f;if(e){g=e.c.d.a+bFc(a.n,e.c,c)+c.d.d;e.b||(g+=e.c.o.b);rIb(uIb(tIb(vIb(sIb(new wIb,eE($wnd.Math.ceil(g))),0),e.d),f.a))}e=f}} +function h_b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n;f=new t_b(b);l=c_b(a,b,f);n=$wnd.Math.max(Kfb(UD(mQb(b,(yCc(),FAc)))),1);for(k=new Anb(l.a);k.a<k.c.c.length;){j=RD(ynb(k),42);i=g_b(RD(j.a,8),RD(j.b,8),n);o=true;o=o&l_b(c,new rjd(i.c,i.d));o=o&l_b(c,Zid(new rjd(i.c,i.d),i.b,0));o=o&l_b(c,Zid(new rjd(i.c,i.d),0,i.a));o&l_b(c,Zid(new rjd(i.c,i.d),i.b,i.a))}m=f.d;h=g_b(RD(l.b.a,8),RD(l.b.b,8),n);if(m==(qpd(),ppd)||m==Xod){d.c[m.g]=$wnd.Math.min(d.c[m.g],h.d);d.b[m.g]=$wnd.Math.max(d.b[m.g],h.d+h.a)}else{d.c[m.g]=$wnd.Math.min(d.c[m.g],h.c);d.b[m.g]=$wnd.Math.max(d.b[m.g],h.c+h.b)}e=pxe;g=f.c.i.d;switch(m.g){case 4:e=g.c;break;case 2:e=g.b;break;case 1:e=g.a;break;case 3:e=g.d;}d.a[m.g]=$wnd.Math.max(d.a[m.g],e);return f} +function W7b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;h=RD(Wjb(b.c,a),468);s=b.a.c;i=b.a.c+b.a.b;C=h.f;D=h.a;g=C<D;p=new rjd(s,C);t=new rjd(i,D);e=(s+i)/2;q=new rjd(e,C);u=new rjd(e,D);f=X7b(a,C,D);w=K3b(b.B);A=new rjd(e,f);B=K3b(b.D);c=uid(cD(WC(l3,1),Nve,8,0,[w,A,B]));n=false;r=b.B.i;if(!!r&&!!r.c&&h.d){j=g&&r.p<r.c.a.c.length-1||!g&&r.p>0;if(j){if(j){m=r.p;g?++m:--m;l=RD(Vmb(r.c.a,m),10);d=Z7b(l);n=!(Did(d,w,c[0])||yid(d,w,c[0]))}}else{n=true}}o=false;v=b.D.i;if(!!v&&!!v.c&&h.e){k=g&&v.p>0||!g&&v.p<v.c.a.c.length-1;if(k){m=v.p;g?--m:++m;l=RD(Vmb(v.c.a,m),10);d=Z7b(l);o=!(Did(d,c[0],B)||yid(d,c[0],B))}else{o=true}}n&&o&&Mub(a.a,A);n||zjd(a.a,cD(WC(l3,1),Nve,8,0,[p,q]));o||zjd(a.a,cD(WC(l3,1),Nve,8,0,[u,t]))} +function MNc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;n=b.c.length;m=0;for(l=new Anb(a.b);l.a<l.c.c.length;){k=RD(ynb(l),30);r=k.a;if(r.c.length==0){continue}q=new Anb(r);j=0;s=null;e=RD(ynb(q),10);f=null;while(e){f=RD(Vmb(b,e.p),261);if(f.c>=0){i=null;h=new Jkb(k.a,j+1);while(h.b<h.d.gc()){g=(sFb(h.b<h.d.gc()),RD(h.d.Xb(h.c=h.b++),10));i=RD(Vmb(b,g.p),261);if(i.d==f.d&&i.c<f.c){break}else{i=null}}if(i){if(s){$mb(d,e.p,sgb(RD(Vmb(d,e.p),17).a-1));RD(Vmb(c,s.p),15).Mc(f)}f=YNc(f,e,n++);ZEb(b.c,f);Rmb(c,new bnb);if(s){RD(Vmb(c,s.p),15).Fc(f);Rmb(d,sgb(1))}else{Rmb(d,sgb(0))}}}o=null;if(q.a<q.c.c.length){o=RD(ynb(q),10);p=RD(Vmb(b,o.p),261);RD(Vmb(c,e.p),15).Fc(p);$mb(d,o.p,sgb(RD(Vmb(d,o.p),17).a+1))}f.d=m;f.c=j++;s=e;e=o}++m}} +function I5b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;f=RD(mQb(a,(Ywc(),Awc)),74);if(!f){return}d=a.a;e=new sjd(c);$id(e,M5b(a));if(n2b(a.d.i,a.c.i)){m=a.c;l=xjd(cD(WC(l3,1),Nve,8,0,[m.n,m.a]));ojd(l,c)}else{l=K3b(a.c)}Pub(d,l,d.a,d.a.a);n=K3b(a.d);mQb(a,Wwc)!=null&&$id(n,RD(mQb(a,Wwc),8));Pub(d,n,d.c.b,d.c);Cjd(d,e);g=IGd(f,true,true);Kzd(g,RD(QHd((!f.b&&(f.b=new Yie(E4,f,4,7)),f.b),0),84));Lzd(g,RD(QHd((!f.c&&(f.c=new Yie(E4,f,5,8)),f.c),0),84));lsd(d,g);for(k=new Anb(a.b);k.a<k.c.c.length;){j=RD(ynb(k),72);h=RD(mQb(j,Awc),135);Cyd(h,j.o.a);Ayd(h,j.o.b);Byd(h,j.n.a+e.a,j.n.b+e.b);Ixd(h,(Zcc(),Ycc),TD(mQb(j,Ycc)))}i=RD(mQb(a,(yCc(),RAc)),75);if(i){Cjd(i,e);Ixd(f,RAc,i)}else{Ixd(f,RAc,null)}b==(Ymd(),Wmd)?Ixd(f,yAc,Wmd):Ixd(f,yAc,null)} +function O3c(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;if(c.c.length!=0){o=new bnb;for(n=new Anb(c);n.a<n.c.c.length;){m=RD(ynb(n),27);Rmb(o,new rjd(m.i,m.j))}d.dh(b,'Before removing overlaps');while(p3c(a,c)){n3c(a,c,false)}d.dh(b,'After removing overlaps');h=0;i=0;e=null;if(c.c.length!=0){e=(tFb(0,c.c.length),RD(c.c[0],27));h=e.i-(tFb(0,o.c.length),RD(o.c[0],8)).a;i=e.j-(tFb(0,o.c.length),RD(o.c[0],8)).b}g=$wnd.Math.sqrt(h*h+i*i);l=M2c(c);f=1;if(l.a.gc()!=0){for(k=l.a.ec().Kc();k.Ob();){j=RD(k.Pb(),27);p=a.f;q=p.i+p.g/2;r=p.j+p.f/2;s=j.i+j.g/2;t=j.j+j.f/2;u=s-q;v=t-r;w=$wnd.Math.sqrt(u*u+v*v);A=u/w;B=v/w;Dyd(j,j.i+A*g);Eyd(j,j.j+B*g)}d.dh(b,'Child movement '+f);++f}!!a.a&&a.a.Gg(new dnb(l));O3c(a,b,new dnb(l),d)}} +function Fid(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;i=a;k=ojd(new rjd(b.a,b.b),a);j=c;l=ojd(new rjd(d.a,d.b),c);m=i.a;q=i.b;o=j.a;s=j.b;n=k.a;r=k.b;p=l.a;t=l.b;e=p*r-n*t;Zy();bz(vEe);if($wnd.Math.abs(0-e)<=vEe||0==e||isNaN(0)&&isNaN(e)){return false}g=1/e*((m-o)*r-(q-s)*n);h=1/e*-(-(m-o)*t+(q-s)*p);f=(null,bz(vEe),($wnd.Math.abs(0-g)<=vEe||0==g||isNaN(0)&&isNaN(g)?0:0<g?-1:0>g?1:cz(isNaN(0),isNaN(g)))<0&&(null,bz(vEe),($wnd.Math.abs(g-1)<=vEe||g==1||isNaN(g)&&isNaN(1)?0:g<1?-1:g>1?1:cz(isNaN(g),isNaN(1)))<0)&&(null,bz(vEe),($wnd.Math.abs(0-h)<=vEe||0==h||isNaN(0)&&isNaN(h)?0:0<h?-1:0>h?1:cz(isNaN(0),isNaN(h)))<0)&&(null,bz(vEe),($wnd.Math.abs(h-1)<=vEe||h==1||isNaN(h)&&isNaN(1)?0:h<1?-1:h>1?1:cz(isNaN(h),isNaN(1)))<0));return f} +function EXd(b){var c,d,e,f;d=b.D!=null?b.D:b.B;c=qhb(d,Fhb(91));if(c!=-1){e=(AFb(0,c,d.length),d.substr(0,c));f=new Qhb;do f.a+='[';while((c=phb(d,91,++c))!=-1);if(lhb(e,hve))f.a+='Z';else if(lhb(e,dKe))f.a+='B';else if(lhb(e,eKe))f.a+='C';else if(lhb(e,fKe))f.a+='D';else if(lhb(e,gKe))f.a+='F';else if(lhb(e,hKe))f.a+='I';else if(lhb(e,iKe))f.a+='J';else if(lhb(e,jKe))f.a+='S';else{f.a+='L';f.a+=''+e;f.a+=';'}try{return null}catch(a){a=zdb(a);if(!ZD(a,63))throw Adb(a)}}else if(qhb(d,Fhb(46))==-1){if(lhb(d,hve))return xdb;else if(lhb(d,dKe))return gE;else if(lhb(d,eKe))return hE;else if(lhb(d,fKe))return iE;else if(lhb(d,gKe))return jE;else if(lhb(d,hKe))return kE;else if(lhb(d,iKe))return lE;else if(lhb(d,jKe))return wdb}return null} +function pTb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;a.e=b;h=RSb(b);w=new bnb;for(d=new Anb(h);d.a<d.c.c.length;){c=RD(ynb(d),15);A=new bnb;ZEb(w.c,A);i=new _sb;for(o=c.Kc();o.Ob();){n=RD(o.Pb(),27);f=nTb(a,n,true,0,0);ZEb(A.c,f);p=n.i;q=n.j;new rjd(p,q);m=(!n.n&&(n.n=new C5d(I4,n,1,7)),n.n);for(l=new dMd(m);l.e!=l.i.gc();){j=RD(bMd(l),135);e=nTb(a,j,false,p,q);ZEb(A.c,e)}v=(!n.c&&(n.c=new C5d(K4,n,9,9)),n.c);for(s=new dMd(v);s.e!=s.i.gc();){r=RD(bMd(s),123);g=nTb(a,r,false,p,q);ZEb(A.c,g);t=r.i+p;u=r.j+q;m=(!r.n&&(r.n=new C5d(I4,r,1,7)),r.n);for(k=new dMd(m);k.e!=k.i.gc();){j=RD(bMd(k),135);e=nTb(a,j,false,t,u);ZEb(A.c,e)}}ye(i,Ux(Al(cD(WC(cJ,1),rve,20,0,[zGd(n),yGd(n)]))))}mTb(a,i,A)}a.f=new TRb(w);kQb(a.f,b);return a.f} +function Yje(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;for(l=new Dub(new wub(a));l.c!=l.d.a.d;){k=Cub(l);h=RD(k.d,58);b=RD(k.e,58);g=h.Dh();for(p=0,u=(g.i==null&&rYd(g),g.i).length;p<u;++p){j=(f=(g.i==null&&rYd(g),g.i),p>=0&&p<f.length?f[p]:null);if(j.rk()&&!j.sk()){if(ZD(j,102)){i=RD(j,19);(i.Bb&QHe)==0&&(w=Z5d(i),!(!!w&&(w.Bb&QHe)!=0))&&Xje(a,i,h,b)}else{nke();if(RD(j,69).xk()){c=(v=j,RD(!v?null:RD(b,54).gi(v),160));if(c){n=RD(h.Mh(j),160);d=c.gc();for(q=0,o=n.gc();q<o;++q){m=n.Tl(q);if(ZD(m,102)){t=n.Ul(q);e=cub(a,t);if(e==null&&t!=null){s=RD(m,19);if(!a.b||(s.Bb&QHe)!=0||!!Z5d(s)){continue}e=t}if(!c.Ol(m,e)){for(r=0;r<d;++r){if(c.Tl(r)==m&&dE(c.Ul(r))===dE(e)){c.Ti(c.gc()-1,r);--d;break}}}}else{c.Ol(n.Tl(q),n.Ul(q))}}}}}}}}} +function gIc(a,b,c){var d;c.Ug('StretchWidth layering',1);if(b.a.c.length==0){c.Vg();return}a.c=b;a.t=0;a.u=0;a.i=oxe;a.g=pxe;a.d=Kfb(UD(mQb(b,(yCc(),TBc))));aIc(a);bIc(a);$Hc(a);fIc(a);_Hc(a);a.i=$wnd.Math.max(1,a.i);a.g=$wnd.Math.max(1,a.g);a.d=a.d/a.i;a.f=a.g/a.i;a.s=dIc(a);d=new R4b(a.c);Rmb(a.c.b,d);a.r=bv(a.p);a.n=Fnb(a.k,a.k.length);while(a.r.c.length!=0){a.o=hIc(a);if(!a.o||cIc(a)&&a.b.a.gc()!=0){iIc(a,d);d=new R4b(a.c);Rmb(a.c.b,d);ye(a.a,a.b);a.b.a.$b();a.t=a.u;a.u=0}else{if(cIc(a)){a.c.b.c.length=0;d=new R4b(a.c);Rmb(a.c.b,d);a.t=0;a.u=0;a.b.a.$b();a.a.a.$b();++a.f;a.r=bv(a.p);a.n=Fnb(a.k,a.k.length)}else{g3b(a.o,d);Ymb(a.r,a.o);Ysb(a.b,a.o);a.t=a.t-a.k[a.o.p]*a.d+a.j[a.o.p];a.u+=a.e[a.o.p]*a.d}}}b.a.c.length=0;Eob(b.b);c.Vg()} +function sOc(a){var b,c,d,e,f,g,h,i,j,k,l;a.j=$C(kE,Pwe,28,a.g,15,1);a.o=new bnb;FDb(EDb(new SDb(null,new Swb(a.e.b,16)),new APc),new CPc(a));a.a=$C(xdb,Hye,28,a.b,16,1);MDb(new SDb(null,new Swb(a.e.b,16)),new RPc(a));d=(l=new bnb,FDb(CDb(EDb(new SDb(null,new Swb(a.e.b,16)),new HPc),new JPc(a)),new LPc(a,l)),l);for(i=new Anb(d);i.a<i.c.c.length;){h=RD(ynb(i),515);if(h.c.length<=1){continue}if(h.c.length==2){UOc(h);BOc((tFb(0,h.c.length),RD(h.c[0],18)).d.i)||Rmb(a.o,h);continue}if(TOc(h)||SOc(h,new FPc)){continue}j=new Anb(h);e=null;while(j.a<j.c.c.length){b=RD(ynb(j),18);c=a.c[b.p];!e||j.a>=j.c.c.length?(k=hOc((r3b(),p3b),o3b)):(k=hOc((r3b(),o3b),o3b));k*=2;f=c.a.g;c.a.g=$wnd.Math.max(f,f+(k-f));g=c.b.g;c.b.g=$wnd.Math.max(g,g+(k-g));e=b}}} +function qkc(a){var b,c,d,e;FDb(CDb(new SDb(null,new Swb(a.a.b,16)),new Qkc),new Skc);okc(a);FDb(CDb(new SDb(null,new Swb(a.a.b,16)),new Ukc),new Wkc);if(a.c==(Ymd(),Wmd)){FDb(CDb(EDb(new SDb(null,new Swb(new Xkb(a.f),1)),new clc),new elc),new glc(a));FDb(CDb(GDb(EDb(EDb(new SDb(null,new Swb(a.d.b,16)),new klc),new mlc),new olc),new qlc),new slc(a))}e=new rjd(oxe,oxe);b=new rjd(pxe,pxe);for(d=new Anb(a.a.b);d.a<d.c.c.length;){c=RD(ynb(d),60);e.a=$wnd.Math.min(e.a,c.d.c);e.b=$wnd.Math.min(e.b,c.d.d);b.a=$wnd.Math.max(b.a,c.d.c+c.d.b);b.b=$wnd.Math.max(b.b,c.d.d+c.d.a)}$id(hjd(a.d.c),fjd(new rjd(e.a,e.b)));$id(hjd(a.d.f),ojd(new rjd(b.a,b.b),e));pkc(a,e,b);akb(a.f);akb(a.b);akb(a.g);akb(a.e);a.a.a.c.length=0;a.a.b.c.length=0;a.a=null;a.d=null} +function JGb(a,b){var c;if(a.e){throw Adb(new dgb((lfb(lN),lye+lN.k+mye)))}if(!cGb(a.a,b)){throw Adb(new yz(nye+b+oye))}if(b==a.d){return a}c=a.d;a.d=b;switch(c.g){case 0:switch(b.g){case 2:GGb(a);break;case 1:OGb(a);GGb(a);break;case 4:UGb(a);GGb(a);break;case 3:UGb(a);OGb(a);GGb(a);}break;case 2:switch(b.g){case 1:OGb(a);PGb(a);break;case 4:UGb(a);GGb(a);break;case 3:UGb(a);OGb(a);GGb(a);}break;case 1:switch(b.g){case 2:OGb(a);PGb(a);break;case 4:OGb(a);UGb(a);GGb(a);break;case 3:OGb(a);UGb(a);OGb(a);GGb(a);}break;case 4:switch(b.g){case 2:UGb(a);GGb(a);break;case 1:UGb(a);OGb(a);GGb(a);break;case 3:OGb(a);PGb(a);}break;case 3:switch(b.g){case 2:OGb(a);UGb(a);GGb(a);break;case 1:OGb(a);UGb(a);OGb(a);GGb(a);break;case 4:OGb(a);PGb(a);}}return a} +function vYb(a,b){var c;if(a.d){throw Adb(new dgb((lfb(eQ),lye+eQ.k+mye)))}if(!eYb(a.a,b)){throw Adb(new yz(nye+b+oye))}if(b==a.c){return a}c=a.c;a.c=b;switch(c.g){case 0:switch(b.g){case 2:sYb(a);break;case 1:zYb(a);sYb(a);break;case 4:DYb(a);sYb(a);break;case 3:DYb(a);zYb(a);sYb(a);}break;case 2:switch(b.g){case 1:zYb(a);AYb(a);break;case 4:DYb(a);sYb(a);break;case 3:DYb(a);zYb(a);sYb(a);}break;case 1:switch(b.g){case 2:zYb(a);AYb(a);break;case 4:zYb(a);DYb(a);sYb(a);break;case 3:zYb(a);DYb(a);zYb(a);sYb(a);}break;case 4:switch(b.g){case 2:DYb(a);sYb(a);break;case 1:DYb(a);zYb(a);sYb(a);break;case 3:zYb(a);AYb(a);}break;case 3:switch(b.g){case 2:zYb(a);DYb(a);sYb(a);break;case 1:zYb(a);DYb(a);zYb(a);sYb(a);break;case 4:zYb(a);AYb(a);}}return a} +function Csd(a,b){var c,d,e,f,g,h,i,j;if(ZD(a.Eh(),167)){Csd(RD(a.Eh(),167),b);b.a+=' > '}else{b.a+='Root '}c=a.Dh().zb;lhb(c.substr(0,3),'Elk')?Zhb(b,(BFb(3,c.length+1),c.substr(3))):(b.a+=''+c,b);e=a.jh();if(e){Zhb((b.a+=' ',b),e);return}if(ZD(a,366)){j=RD(a,135).a;if(j){Zhb((b.a+=' ',b),j);return}}for(g=new dMd(a.kh());g.e!=g.i.gc();){f=RD(bMd(g),135);j=f.a;if(j){Zhb((b.a+=' ',b),j);return}}if(ZD(a,326)){d=RD(a,74);!d.b&&(d.b=new Yie(E4,d,4,7));if(d.b.i!=0&&(!d.c&&(d.c=new Yie(E4,d,5,8)),d.c.i!=0)){b.a+=' (';h=new mMd((!d.b&&(d.b=new Yie(E4,d,4,7)),d.b));while(h.e!=h.i.gc()){h.e>0&&(b.a+=pve,b);Csd(RD(bMd(h),167),b)}b.a+=SAe;i=new mMd((!d.c&&(d.c=new Yie(E4,d,5,8)),d.c));while(i.e!=i.i.gc()){i.e>0&&(b.a+=pve,b);Csd(RD(bMd(i),167),b)}b.a+=')'}}} +function LTb(a,b,c){var d,e,f,g,h,i,j,k;for(i=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));i.e!=i.i.gc();){h=RD(bMd(i),27);for(e=new is(Mr(zGd(h).a.Kc(),new ir));gs(e);){d=RD(hs(e),74);!d.b&&(d.b=new Yie(E4,d,4,7));if(!(d.b.i<=1&&(!d.c&&(d.c=new Yie(E4,d,5,8)),d.c.i<=1))){throw Adb(new Ked('Graph must not contain hyperedges.'))}if(!nzd(d)&&h!=AGd(RD(QHd((!d.c&&(d.c=new Yie(E4,d,5,8)),d.c),0),84))){j=new cUb;kQb(j,d);pQb(j,(JVb(),HVb),d);_Tb(j,RD(Wd(qtb(c.f,h)),153));aUb(j,RD(Wjb(c,AGd(RD(QHd((!d.c&&(d.c=new Yie(E4,d,5,8)),d.c),0),84))),153));Rmb(b.c,j);for(g=new dMd((!d.n&&(d.n=new C5d(I4,d,1,7)),d.n));g.e!=g.i.gc();){f=RD(bMd(g),135);k=new iUb(j,f.a);kQb(k,f);pQb(k,HVb,f);k.e.a=$wnd.Math.max(f.g,1);k.e.b=$wnd.Math.max(f.f,1);hUb(k);Rmb(b.d,k)}}}}} +function Vec(a,b,c){var d,e,f,g,h,i,j,k,l,m;c.Ug('Node promotion heuristic',1);a.i=b;a.r=RD(mQb(b,(yCc(),ZAc)),243);a.r!=(aEc(),TDc)&&a.r!=UDc?Tec(a):Uec(a);k=RD(mQb(a.i,YAc),17).a;f=new nfc;switch(a.r.g){case 2:case 1:Yec(a,f);break;case 3:a.r=_Dc;Yec(a,f);i=0;for(h=new Anb(a.b);h.a<h.c.c.length;){g=RD(ynb(h),17);i=$wnd.Math.max(i,g.a)}if(i>a.k){a.r=VDc;Yec(a,f)}break;case 4:a.r=_Dc;Yec(a,f);j=0;for(e=new Anb(a.c);e.a<e.c.c.length;){d=UD(ynb(e));j=$wnd.Math.max(j,(uFb(d),d))}if(j>a.n){a.r=YDc;Yec(a,f)}break;case 6:m=eE($wnd.Math.ceil(a.g.length*k/100));Yec(a,new qfc(m));break;case 5:l=eE($wnd.Math.ceil(a.e*k/100));Yec(a,new tfc(l));break;case 8:Sec(a,true);break;case 9:Sec(a,false);break;default:Yec(a,f);}a.r!=TDc&&a.r!=UDc?Zec(a,b):$ec(a,b);c.Vg()} +function $rc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;l=a.b;k=new Jkb(l,0);Ikb(k,new R4b(a));s=false;g=1;while(k.b<k.d.gc()){j=(sFb(k.b<k.d.gc()),RD(k.d.Xb(k.c=k.b++),30));p=(tFb(g,l.c.length),RD(l.c[g],30));q=bv(j.a);r=q.c.length;for(o=new Anb(q);o.a<o.c.c.length;){m=RD(ynb(o),10);g3b(m,p)}if(s){for(n=hv(q).Kc();n.Ob();){m=RD(n.Pb(),10);for(f=new Anb(bv(Z2b(m)));f.a<f.c.c.length;){e=RD(ynb(f),18);X0b(e,true);pQb(a,(Ywc(),awc),(Geb(),true));d=osc(a,e,r);c=RD(mQb(m,Wvc),313);t=RD(Vmb(d,d.c.length-1),18);c.k=t.c.i;c.n=t;c.b=e.d.i;c.c=e}}s=false}else{if(q.c.length!=0){b=(tFb(0,q.c.length),RD(q.c[0],10));if(b.k==(r3b(),l3b)){s=true;g=-1}}}++g}h=new Jkb(a.b,0);while(h.b<h.d.gc()){i=(sFb(h.b<h.d.gc()),RD(h.d.Xb(h.c=h.b++),30));i.a.c.length==0&&Ckb(h)}} +function FJb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;l=new CLb(a);_Mb(l,!(b==(Cmd(),Bmd)||b==xmd));k=l.a;m=new z3b;for(e=(ZJb(),cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb])),g=0,i=e.length;g<i;++g){c=e[g];j=oKb(k,WJb,c);!!j&&(m.d=$wnd.Math.max(m.d,j.jf()))}for(d=cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb]),f=0,h=d.length;f<h;++f){c=d[f];j=oKb(k,YJb,c);!!j&&(m.a=$wnd.Math.max(m.a,j.jf()))}for(p=cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb]),r=0,t=p.length;r<t;++r){n=p[r];j=oKb(k,n,WJb);!!j&&(m.b=$wnd.Math.max(m.b,j.kf()))}for(o=cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb]),q=0,s=o.length;q<s;++q){n=o[q];j=oKb(k,n,YJb);!!j&&(m.c=$wnd.Math.max(m.c,j.kf()))}if(m.d>0){m.d+=k.n.d;m.d+=k.d}if(m.a>0){m.a+=k.n.a;m.a+=k.d}if(m.b>0){m.b+=k.n.b;m.b+=k.d}if(m.c>0){m.c+=k.n.c;m.c+=k.d}return m} +function u9b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;m=c.d;l=c.c;f=new rjd(c.f.a+c.d.b+c.d.c,c.f.b+c.d.d+c.d.a);g=f.b;for(j=new Anb(a.a);j.a<j.c.c.length;){h=RD(ynb(j),10);if(h.k!=(r3b(),m3b)){continue}d=RD(mQb(h,(Ywc(),hwc)),64);e=RD(mQb(h,iwc),8);k=h.n;switch(d.g){case 2:k.a=c.f.a+m.c-l.a;break;case 4:k.a=-l.a-m.b;}o=0;switch(d.g){case 2:case 4:if(b==(Bod(),xod)){n=Kfb(UD(mQb(h,Jwc)));k.b=f.b*n-RD(mQb(h,(yCc(),zBc)),8).b;o=k.b+e.b;U2b(h,false,true)}else if(b==wod){k.b=Kfb(UD(mQb(h,Jwc)))-RD(mQb(h,(yCc(),zBc)),8).b;o=k.b+e.b;U2b(h,false,true)}}g=$wnd.Math.max(g,o)}c.f.b+=g-f.b;for(i=new Anb(a.a);i.a<i.c.c.length;){h=RD(ynb(i),10);if(h.k!=(r3b(),m3b)){continue}d=RD(mQb(h,(Ywc(),hwc)),64);k=h.n;switch(d.g){case 1:k.b=-l.b-m.d;break;case 3:k.b=c.f.b+m.a-l.b;}}} +function nNb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;k=RD(RD(Qc(a.r,b),21),87);if(k.gc()<=2||b==(qpd(),Xod)||b==(qpd(),ppd)){rNb(a,b);return}p=a.u.Hc((Pod(),Ood));c=b==(qpd(),Yod)?(mOb(),lOb):(mOb(),iOb);r=b==Yod?(vLb(),sLb):(vLb(),uLb);d=WNb(_Nb(c),a.s);q=b==Yod?oxe:pxe;for(j=k.Kc();j.Ob();){h=RD(j.Pb(),117);if(!h.c||h.c.d.c.length<=0){continue}o=h.b.Mf();n=h.e;l=h.c;m=l.i;m.b=(f=l.n,l.e.a+f.b+f.c);m.a=(g=l.n,l.e.b+g.d+g.a);if(p){m.c=n.a-(e=l.n,l.e.a+e.b+e.c)-a.s;p=false}else{m.c=n.a+o.a+a.s}Ivb(r,Pye);l.f=r;RKb(l,(EKb(),DKb));Rmb(d.d,new sOb(m,UNb(d,m)));q=b==Yod?$wnd.Math.min(q,n.b):$wnd.Math.max(q,n.b+h.b.Mf().b)}q+=b==Yod?-a.t:a.t;VNb((d.e=q,d));for(i=k.Kc();i.Ob();){h=RD(i.Pb(),117);if(!h.c||h.c.d.c.length<=0){continue}m=h.c.i;m.c-=h.e.a;m.d-=h.e.b}} +function D0b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;e=new bnb;for(p=new Anb(b.a);p.a<p.c.c.length;){o=RD(ynb(p),10);n=o.e;if(n){d=D0b(a,n,o);Tmb(e,d);A0b(a,n,o);if(RD(mQb(n,(Ywc(),kwc)),21).Hc((ovc(),hvc))){s=RD(mQb(o,(yCc(),BBc)),101);m=RD(mQb(o,EBc),181).Hc((Pod(),Lod));for(r=new Anb(o.j);r.a<r.c.c.length;){q=RD(ynb(r),12);f=RD(Wjb(a.b,q),10);if(!f){f=f2b(q,s,q.j,-(q.e.c.length-q.g.c.length),null,new pjd,q.o,RD(mQb(n,rAc),88),n);pQb(f,Awc,q);Zjb(a.b,q,f);Rmb(n.a,f)}g=RD(Vmb(f.j,0),12);for(k=new Anb(q.f);k.a<k.c.c.length;){j=RD(ynb(k),72);h=new x2b;h.o.a=j.o.a;h.o.b=j.o.b;Rmb(g.f,h);if(!m){t=q.j;l=0;Rod(RD(mQb(o,EBc),21))&&(l=qsd(j.n,j.o,q.o,0,t));s==(Bod(),zod)||(qpd(),apd).Hc(t)?(h.o.a=l):(h.o.b=l)}}}}}}i=new bnb;z0b(a,b,c,e,i);!!c&&B0b(a,b,c,i);return i} +function NIc(a,b,c){var d,e,f,g,h,i,j,k,l;if(a.c[b.c.p][b.p].e){return}else{a.c[b.c.p][b.p].e=true}a.c[b.c.p][b.p].b=0;a.c[b.c.p][b.p].d=0;a.c[b.c.p][b.p].a=null;for(k=new Anb(b.j);k.a<k.c.c.length;){j=RD(ynb(k),12);l=c?new T3b(j):new _3b(j);for(i=l.Kc();i.Ob();){h=RD(i.Pb(),12);g=h.i;if(g.c==b.c){if(g!=b){NIc(a,g,c);a.c[b.c.p][b.p].b+=a.c[g.c.p][g.p].b;a.c[b.c.p][b.p].d+=a.c[g.c.p][g.p].d}}else{a.c[b.c.p][b.p].d+=a.g[h.p];++a.c[b.c.p][b.p].b}}}f=RD(mQb(b,(Ywc(),Uvc)),15);if(f){for(e=f.Kc();e.Ob();){d=RD(e.Pb(),10);if(b.c==d.c){NIc(a,d,c);a.c[b.c.p][b.p].b+=a.c[d.c.p][d.p].b;a.c[b.c.p][b.p].d+=a.c[d.c.p][d.p].d}}}if(a.c[b.c.p][b.p].b>0){a.c[b.c.p][b.p].d+=Kwb(a.i,24)*Nxe*0.07000000029802322-0.03500000014901161;a.c[b.c.p][b.p].a=a.c[b.c.p][b.p].d/a.c[b.c.p][b.p].b}} +function D8b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;for(o=new Anb(a);o.a<o.c.c.length;){n=RD(ynb(o),10);E8b(n.n);E8b(n.o);F8b(n.f);I8b(n);K8b(n);for(q=new Anb(n.j);q.a<q.c.c.length;){p=RD(ynb(q),12);E8b(p.n);E8b(p.a);E8b(p.o);Q3b(p,J8b(p.j));f=RD(mQb(p,(yCc(),CBc)),17);!!f&&pQb(p,CBc,sgb(-f.a));for(e=new Anb(p.g);e.a<e.c.c.length;){d=RD(ynb(e),18);for(c=Sub(d.a,0);c.b!=c.d.c;){b=RD(evb(c),8);E8b(b)}i=RD(mQb(d,RAc),75);if(i){for(h=Sub(i,0);h.b!=h.d.c;){g=RD(evb(h),8);E8b(g)}}for(l=new Anb(d.b);l.a<l.c.c.length;){j=RD(ynb(l),72);E8b(j.n);E8b(j.o)}}for(m=new Anb(p.f);m.a<m.c.c.length;){j=RD(ynb(m),72);E8b(j.n);E8b(j.o)}}if(n.k==(r3b(),m3b)){pQb(n,(Ywc(),hwc),J8b(RD(mQb(n,hwc),64)));H8b(n)}for(k=new Anb(n.b);k.a<k.c.c.length;){j=RD(ynb(k),72);I8b(j);E8b(j.o);E8b(j.n)}}} +function iEd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;D=Wjb(a.e,d);if(D==null){D=new uC;n=RD(D,190);s=b+'_s';t=s+e;m=new OC(t);sC(n,uIe,m)}C=RD(D,190);oDd(c,C);G=new uC;qDd(G,'x',d.j);qDd(G,'y',d.k);sC(C,xIe,G);A=new uC;qDd(A,'x',d.b);qDd(A,'y',d.c);sC(C,'endPoint',A);l=cve((!d.a&&(d.a=new XZd(D4,d,5)),d.a));o=!l;if(o){w=new MB;f=new qFd(w);xgb((!d.a&&(d.a=new XZd(D4,d,5)),d.a),f);sC(C,nIe,w)}i=Dzd(d);u=!!i;u&&rDd(a.a,C,pIe,KDd(a,Dzd(d)));r=Ezd(d);v=!!r;v&&rDd(a.a,C,oIe,KDd(a,Ezd(d)));j=(!d.e&&(d.e=new Yie(F4,d,10,9)),d.e).i==0;p=!j;if(p){B=new MB;g=new sFd(a,B);xgb((!d.e&&(d.e=new Yie(F4,d,10,9)),d.e),g);sC(C,rIe,B)}k=(!d.g&&(d.g=new Yie(F4,d,9,10)),d.g).i==0;q=!k;if(q){F=new MB;h=new uFd(a,F);xgb((!d.g&&(d.g=new Yie(F4,d,9,10)),d.g),h);sC(C,qIe,F)}} +function XMb(a){RMb();var b,c,d,e,f,g,h;d=a.f.n;for(g=ki(a.r).a.nc();g.Ob();){f=RD(g.Pb(),117);e=0;if(f.b.pf((umd(),Gld))){e=Kfb(UD(f.b.of(Gld)));if(e<0){switch(f.b.ag().g){case 1:d.d=$wnd.Math.max(d.d,-e);break;case 3:d.a=$wnd.Math.max(d.a,-e);break;case 2:d.c=$wnd.Math.max(d.c,-e);break;case 4:d.b=$wnd.Math.max(d.b,-e);}}}if(Rod(a.u)){b=rsd(f.b,e);h=!RD(a.e.of(pld),181).Hc((dqd(),Wpd));c=false;switch(f.b.ag().g){case 1:c=b>d.d;d.d=$wnd.Math.max(d.d,b);if(h&&c){d.d=$wnd.Math.max(d.d,d.a);d.a=d.d+e}break;case 3:c=b>d.a;d.a=$wnd.Math.max(d.a,b);if(h&&c){d.a=$wnd.Math.max(d.a,d.d);d.d=d.a+e}break;case 2:c=b>d.c;d.c=$wnd.Math.max(d.c,b);if(h&&c){d.c=$wnd.Math.max(d.b,d.c);d.b=d.c+e}break;case 4:c=b>d.b;d.b=$wnd.Math.max(d.b,b);if(h&&c){d.b=$wnd.Math.max(d.b,d.c);d.c=d.b+e}}}}} +function pA(a,b){var c,d,e,f,g,h,i,j,k;j='';if(b.length==0){return a.ne(ywe,wwe,-1,-1)}k=Dhb(b);lhb(k.substr(0,3),'at ')&&(k=(BFb(3,k.length+1),k.substr(3)));k=k.replace(/\[.*?\]/g,'');g=k.indexOf('(');if(g==-1){g=k.indexOf('@');if(g==-1){j=k;k=''}else{j=Dhb((BFb(g+1,k.length+1),k.substr(g+1)));k=Dhb((AFb(0,g,k.length),k.substr(0,g)))}}else{c=k.indexOf(')',g);j=(AFb(g+1,c,k.length),k.substr(g+1,c-(g+1)));k=Dhb((AFb(0,g,k.length),k.substr(0,g)))}g=qhb(k,Fhb(46));g!=-1&&(k=(BFb(g+1,k.length+1),k.substr(g+1)));(k.length==0||lhb(k,'Anonymous function'))&&(k=wwe);h=thb(j,Fhb(58));e=uhb(j,Fhb(58),h-1);i=-1;d=-1;f=ywe;if(h!=-1&&e!=-1){f=(AFb(0,e,j.length),j.substr(0,e));i=jA((AFb(e+1,h,j.length),j.substr(e+1,h-(e+1))));d=jA((BFb(h+1,j.length+1),j.substr(h+1)))}return a.ne(f,k,i,d)} +function C6b(a){var b,c,d,e,f,g,h,i,j,k,l;for(j=new Anb(a);j.a<j.c.c.length;){i=RD(ynb(j),10);g=RD(mQb(i,(yCc(),UAc)),171);f=null;switch(g.g){case 1:case 2:f=(huc(),guc);break;case 3:case 4:f=(huc(),euc);}if(f){pQb(i,(Ywc(),bwc),(huc(),guc));f==euc?F6b(i,g,(BEc(),yEc)):f==guc&&F6b(i,g,(BEc(),zEc))}else{if(Dod(RD(mQb(i,BBc),101))&&i.j.c.length!=0){b=true;for(l=new Anb(i.j);l.a<l.c.c.length;){k=RD(ynb(l),12);if(!(k.j==(qpd(),Xod)&&k.e.c.length-k.g.c.length>0||k.j==ppd&&k.e.c.length-k.g.c.length<0)){b=false;break}for(e=new Anb(k.g);e.a<e.c.c.length;){c=RD(ynb(e),18);h=RD(mQb(c.d.i,UAc),171);if(h==(cxc(),_wc)||h==axc){b=false;break}}for(d=new Anb(k.e);d.a<d.c.c.length;){c=RD(ynb(d),18);h=RD(mQb(c.c.i,UAc),171);if(h==(cxc(),Zwc)||h==$wc){b=false;break}}}b&&F6b(i,g,(BEc(),AEc))}}}} +function LNc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;w=0;n=0;for(l=new Anb(b.e);l.a<l.c.c.length;){k=RD(ynb(l),10);m=0;h=0;i=c?RD(mQb(k,HNc),17).a:qwe;r=d?RD(mQb(k,INc),17).a:qwe;j=$wnd.Math.max(i,r);for(t=new Anb(k.j);t.a<t.c.c.length;){s=RD(ynb(t),12);u=k.n.b+s.n.b+s.a.b;if(d){for(g=new Anb(s.g);g.a<g.c.c.length;){f=RD(ynb(g),18);p=f.d;o=p.i;if(b!=a.a[o.p]){q=$wnd.Math.max(RD(mQb(o,HNc),17).a,RD(mQb(o,INc),17).a);v=RD(mQb(f,(yCc(),MBc)),17).a;if(v>=j&&v>=q){m+=o.n.b+p.n.b+p.a.b-u;++h}}}}if(c){for(g=new Anb(s.e);g.a<g.c.c.length;){f=RD(ynb(g),18);p=f.c;o=p.i;if(b!=a.a[o.p]){q=$wnd.Math.max(RD(mQb(o,HNc),17).a,RD(mQb(o,INc),17).a);v=RD(mQb(f,(yCc(),MBc)),17).a;if(v>=j&&v>=q){m+=o.n.b+p.n.b+p.a.b-u;++h}}}}}if(h>0){w+=m/h;++n}}if(n>0){b.a=e*w/n;b.g=n}else{b.a=0;b.g=0}} +function hTb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;f=a.f.b;m=f.a;k=f.b;o=a.e.g;n=a.e.f;zyd(a.e,f.a,f.b);w=m/o;A=k/n;for(j=new dMd(iyd(a.e));j.e!=j.i.gc();){i=RD(bMd(j),135);Dyd(i,i.i*w);Eyd(i,i.j*A)}for(s=new dMd(wCd(a.e));s.e!=s.i.gc();){r=RD(bMd(s),123);u=r.i;v=r.j;u>0&&Dyd(r,u*w);v>0&&Eyd(r,v*A)}Bvb(a.b,new tTb);b=new bnb;for(h=new vkb((new mkb(a.c)).a);h.b;){g=tkb(h);d=RD(g.ld(),74);c=RD(g.md(),407).a;e=IGd(d,false,false);l=fTb(JGd(d),ssd(e),c);lsd(l,e);t=KGd(d);if(!!t&&Wmb(b,t,0)==-1){ZEb(b.c,t);gTb(t,(sFb(l.b!=0),RD(l.a.a.c,8)),c)}}for(q=new vkb((new mkb(a.d)).a);q.b;){p=tkb(q);d=RD(p.ld(),74);c=RD(p.md(),407).a;e=IGd(d,false,false);l=fTb(LGd(d),Ijd(ssd(e)),c);l=Ijd(l);lsd(l,e);t=MGd(d);if(!!t&&Wmb(b,t,0)==-1){ZEb(b.c,t);gTb(t,(sFb(l.b!=0),RD(l.c.b.c,8)),c)}}} +function GJb(a,b,c,d){var e,f,g,h,i;h=new CLb(b);iNb(h,d);e=true;if(!!a&&a.pf((umd(),Nkd))){f=RD(a.of((umd(),Nkd)),88);e=f==(Cmd(),Amd)||f==ymd||f==zmd}$Mb(h,false);Umb(h.e.Rf(),new dNb(h,false,e));EMb(h,h.f,(ZJb(),WJb),(qpd(),Yod));EMb(h,h.f,YJb,npd);EMb(h,h.g,WJb,ppd);EMb(h,h.g,YJb,Xod);GMb(h,Yod);GMb(h,npd);FMb(h,Xod);FMb(h,ppd);RMb();g=h.A.Hc((Qpd(),Mpd))&&h.B.Hc((dqd(),$pd))?SMb(h):null;!!g&&uKb(h.a,g);XMb(h);xMb(h);GNb(h);sMb(h);gNb(h);yNb(h);oNb(h,Yod);oNb(h,npd);tMb(h);fNb(h);if(!c){return h.o}VMb(h);CNb(h);oNb(h,Xod);oNb(h,ppd);i=h.B.Hc((dqd(),_pd));IMb(h,i,Yod);IMb(h,i,npd);JMb(h,i,Xod);JMb(h,i,ppd);FDb(new SDb(null,new Swb(new glb(h.i),0)),new KMb);FDb(CDb(new SDb(null,ki(h.r).a.oc()),new MMb),new OMb);WMb(h);h.e.Pf(h.o);FDb(new SDb(null,ki(h.r).a.oc()),new YMb);return h.o} +function LYb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;j=oxe;for(d=new Anb(a.a.b);d.a<d.c.c.length;){b=RD(ynb(d),86);j=$wnd.Math.min(j,b.d.f.g.c+b.e.a)}n=new Yub;for(g=new Anb(a.a.a);g.a<g.c.c.length;){f=RD(ynb(g),194);f.i=j;f.e==0&&(Pub(n,f,n.c.b,n.c),true)}while(n.b!=0){f=RD(n.b==0?null:(sFb(n.b!=0),Wub(n,n.a.a)),194);e=f.f.g.c;for(m=f.a.a.ec().Kc();m.Ob();){k=RD(m.Pb(),86);p=f.i+k.e.a;k.d.g||k.g.c<p?(k.o=p):(k.o=k.g.c)}e-=f.f.o;f.b+=e;a.c==(Cmd(),zmd)||a.c==xmd?(f.c+=e):(f.c-=e);for(l=f.a.a.ec().Kc();l.Ob();){k=RD(l.Pb(),86);for(i=k.f.Kc();i.Ob();){h=RD(i.Pb(),86);Dmd(a.c)?(o=a.f.yf(k,h)):(o=a.f.zf(k,h));h.d.i=$wnd.Math.max(h.d.i,k.o+k.g.b+o-h.e.a);h.k||(h.d.i=$wnd.Math.max(h.d.i,h.g.c-h.e.a));--h.d.e;h.d.e==0&&Mub(n,h.d)}}}for(c=new Anb(a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),86);b.g.c=b.o}} +function vOb(a){var b,c,d,e,f,g,h,i;h=a.b;b=a.a;switch(RD(mQb(a,(YHb(),UHb)),435).g){case 0:_mb(h,new Frb(new UOb));break;case 1:default:_mb(h,new Frb(new ZOb));}switch(RD(mQb(a,SHb),436).g){case 1:_mb(h,new POb);_mb(h,new cPb);_mb(h,new xOb);break;case 0:default:_mb(h,new POb);_mb(h,new IOb);}switch(RD(mQb(a,WHb),257).g){case 0:i=new wPb;break;case 1:i=new qPb;break;case 2:i=new tPb;break;case 3:i=new nPb;break;case 5:i=new APb(new tPb);break;case 4:i=new APb(new qPb);break;case 7:i=new kPb(new APb(new qPb),new APb(new tPb));break;case 8:i=new kPb(new APb(new nPb),new APb(new tPb));break;case 6:default:i=new APb(new nPb);}for(g=new Anb(h);g.a<g.c.c.length;){f=RD(ynb(g),176);d=0;e=0;c=new Ptd(sgb(d),sgb(e));while(ZPb(b,f,d,e)){c=RD(i.Ve(c,f),42);d=RD(c.a,17).a;e=RD(c.b,17).a}WPb(b,f,d,e)}} +function T_c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;c.Ug(_Ee,1);m=(q$c(),XZc);a.a==(s_c(),p_c)&&(m=VZc);k=0;yob();b.jd(new uGd(m));f=b.gc();h=b.fd(b.gc());j=true;while(j&&h.Sb()){s=RD(h.Ub(),40);RD(mQb(s,m),17).a==0?--f:(j=false)}w=b.kd(0,f);g=new Zub(w);w=b.kd(f,b.gc());i=new Zub(w);if(g.b==0){for(p=Sub(i,0);p.b!=p.d.c;){o=RD(evb(p),40);pQb(o,i$c,sgb(k++))}}else{l=g.b;for(v=Sub(g,0);v.b!=v.d.c;){u=RD(evb(v),40);pQb(u,i$c,sgb(k++));d=$Wc(u);T_c(a,d,c.eh(1/l|0));tvb(d,Fob(new uGd(i$c)));n=new Yub;for(t=Sub(d,0);t.b!=t.d.c;){s=RD(evb(t),40);for(r=Sub(u.d,0);r.b!=r.d.c;){q=RD(evb(r),65);q.c==s&&(Pub(n,q,n.c.b,n.c),true)}}Xub(u.d);ye(u.d,n);h=Sub(i,i.b);e=u.d.b;j=true;while(0<e&&j&&h.Sb()){s=RD(h.Ub(),40);if(RD(mQb(s,m),17).a==0){pQb(s,i$c,sgb(k++));--e;h.Qb()}else{j=false}}}}c.Vg()} +function S3c(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;l=Kfb(UD(Gxd(a,($4c(),W4c))));if(Heb(TD(Gxd(a,U4c)))){k=RD(Gxd(a,(u2c(),t2c)),27);f=RD(QHd(mzd(RD(QHd((!k.e&&(k.e=new Yie(G4,k,7,4)),k.e),(!k.e&&(k.e=new Yie(G4,k,7,4)),k.e).i-1),74)),0),27);d=RD(QHd(mzd(RD(QHd((!k.e&&(k.e=new Yie(G4,k,7,4)),k.e),0),74)),0),27);g=new rjd(f.i+f.g/2,f.j+f.f/2);e=new rjd(d.i+d.g/2,d.j+d.f/2);c=l;c<=0&&(c+=dFe);m=$wnd.Math.acos((g.a*e.a+g.b*e.b)/($wnd.Math.sqrt(g.a*g.a+g.b*g.b)*$wnd.Math.sqrt(e.a*e.a+e.b*e.b)));m<=0&&(m+=dFe);b=$wnd.Math.atan2(g.b,g.a);b<=0&&(b+=dFe);l=FEe-(b-c+m/2)}for(i=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));i.e!=i.i.gc();){h=RD(bMd(i),27);j=new rjd(h.i+h.g/2,h.j+h.f/2);n=j.a*$wnd.Math.cos(l)-j.b*$wnd.Math.sin(l);j.b=j.a*$wnd.Math.sin(l)+j.b*$wnd.Math.cos(l);j.a=n;Byd(h,j.a-h.g/2,j.b-h.f/2)}} +function qcc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;b.Ug('Inverted port preprocessing',1);k=a.b;j=new Jkb(k,0);c=null;t=new bnb;while(j.b<j.d.gc()){s=c;c=(sFb(j.b<j.d.gc()),RD(j.d.Xb(j.c=j.b++),30));for(n=new Anb(t);n.a<n.c.c.length;){l=RD(ynb(n),10);g3b(l,s)}t.c.length=0;for(o=new Anb(c.a);o.a<o.c.c.length;){l=RD(ynb(o),10);if(l.k!=(r3b(),p3b)){continue}if(!Dod(RD(mQb(l,(yCc(),BBc)),101))){continue}for(r=d3b(l,(BEc(),yEc),(qpd(),Xod)).Kc();r.Ob();){p=RD(r.Pb(),12);i=p.e;h=RD(anb(i,$C(WQ,VAe,18,i.c.length,0,1)),483);for(e=h,f=0,g=e.length;f<g;++f){d=e[f];occ(a,p,d,t)}}for(q=d3b(l,zEc,ppd).Kc();q.Ob();){p=RD(q.Pb(),12);i=p.g;h=RD(anb(i,$C(WQ,VAe,18,i.c.length,0,1)),483);for(e=h,f=0,g=e.length;f<g;++f){d=e[f];pcc(a,p,d,t)}}}}for(m=new Anb(t);m.a<m.c.c.length;){l=RD(ynb(m),10);g3b(l,c)}b.Vg()} +function NUc(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t;m=null;d==(dVc(),bVc)?(m=b):d==cVc&&(m=c);for(p=m.a.ec().Kc();p.Ob();){o=RD(p.Pb(),12);q=xjd(cD(WC(l3,1),Nve,8,0,[o.i.n,o.n,o.a])).b;t=new _sb;h=new _sb;for(j=new l4b(o.b);xnb(j.a)||xnb(j.b);){i=RD(xnb(j.a)?ynb(j.a):ynb(j.b),18);if(Heb(TD(mQb(i,(Ywc(),Nwc))))!=e){continue}if(Wmb(f,i,0)!=-1){i.d==o?(r=i.c):(r=i.d);s=xjd(cD(WC(l3,1),Nve,8,0,[r.i.n,r.n,r.a])).b;if($wnd.Math.abs(s-q)<0.2){continue}s<q?b.a._b(r)?Ysb(t,new Ptd(bVc,i)):Ysb(t,new Ptd(cVc,i)):b.a._b(r)?Ysb(h,new Ptd(bVc,i)):Ysb(h,new Ptd(cVc,i))}}if(t.a.gc()>1){n=new xVc(o,t,d);xgb(t,new nVc(a,n));ZEb(g.c,n);for(l=t.a.ec().Kc();l.Ob();){k=RD(l.Pb(),42);Ymb(f,k.b)}}if(h.a.gc()>1){n=new xVc(o,h,d);xgb(h,new pVc(a,n));ZEb(g.c,n);for(l=h.a.ec().Kc();l.Ob();){k=RD(l.Pb(),42);Ymb(f,k.b)}}}} +function p6b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;p=a.n;q=a.o;m=a.d;l=Kfb(UD(hFc(a,(yCc(),QBc))));if(b){k=l*(b.gc()-1);n=0;for(i=b.Kc();i.Ob();){g=RD(i.Pb(),10);k+=g.o.a;n=$wnd.Math.max(n,g.o.b)}r=p.a-(k-q.a)/2;f=p.b-m.d+n;d=q.a/(b.gc()+1);e=d;for(h=b.Kc();h.Ob();){g=RD(h.Pb(),10);g.n.a=r;g.n.b=f-g.o.b;r+=g.o.a+l;j=n6b(g);j.n.a=g.o.a/2-j.a.a;j.n.b=g.o.b;o=RD(mQb(g,(Ywc(),Xvc)),12);if(o.e.c.length+o.g.c.length==1){o.n.a=e-o.a.a;o.n.b=0;P3b(o,a)}e+=d}}if(c){k=l*(c.gc()-1);n=0;for(i=c.Kc();i.Ob();){g=RD(i.Pb(),10);k+=g.o.a;n=$wnd.Math.max(n,g.o.b)}r=p.a-(k-q.a)/2;f=p.b+q.b+m.a-n;d=q.a/(c.gc()+1);e=d;for(h=c.Kc();h.Ob();){g=RD(h.Pb(),10);g.n.a=r;g.n.b=f;r+=g.o.a+l;j=n6b(g);j.n.a=g.o.a/2-j.a.a;j.n.b=0;o=RD(mQb(g,(Ywc(),Xvc)),12);if(o.e.c.length+o.g.c.length==1){o.n.a=e-o.a.a;o.n.b=q.b;P3b(o,a)}e+=d}}} +function Hac(a,b){var c,d,e,f,g,h;if(!RD(mQb(b,(Ywc(),kwc)),21).Hc((ovc(),hvc))){return}for(h=new Anb(b.a);h.a<h.c.c.length;){f=RD(ynb(h),10);if(f.k==(r3b(),p3b)){e=RD(mQb(f,(yCc(),_Ac)),140);a.c=$wnd.Math.min(a.c,f.n.a-e.b);a.a=$wnd.Math.max(a.a,f.n.a+f.o.a+e.c);a.d=$wnd.Math.min(a.d,f.n.b-e.d);a.b=$wnd.Math.max(a.b,f.n.b+f.o.b+e.a)}}for(g=new Anb(b.a);g.a<g.c.c.length;){f=RD(ynb(g),10);if(f.k!=(r3b(),p3b)){switch(f.k.g){case 2:d=RD(mQb(f,(yCc(),UAc)),171);if(d==(cxc(),$wc)){f.n.a=a.c-10;Gac(f,new Oac).Jb(new Rac(f));break}if(d==axc){f.n.a=a.a+10;Gac(f,new Uac).Jb(new Xac(f));break}c=RD(mQb(f,owc),311);if(c==(Gvc(),Fvc)){Fac(f).Jb(new $ac(f));f.n.b=a.d-10;break}if(c==Dvc){Fac(f).Jb(new bbc(f));f.n.b=a.b+10;break}break;default:throw Adb(new agb('The node type '+f.k+' is not supported by the '+XS));}}}} +function g5b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q;i=new rjd(d.i+d.g/2,d.j+d.f/2);n=W4b(d);o=RD(Gxd(b,(yCc(),BBc)),101);q=RD(Gxd(d,GBc),64);if(!HPd(Fxd(d),ABc)){d.i==0&&d.j==0?(p=0):(p=nsd(d,q));Ixd(d,ABc,p)}j=new rjd(b.g,b.f);e=f2b(d,o,q,n,j,i,new rjd(d.g,d.f),RD(mQb(c,rAc),88),c);pQb(e,(Ywc(),Awc),d);f=RD(Vmb(e.j,0),12);O3b(f,e5b(d));pQb(e,EBc,(Pod(),xsb(Nod)));l=RD(Gxd(b,EBc),181).Hc(Lod);for(h=new dMd((!d.n&&(d.n=new C5d(I4,d,1,7)),d.n));h.e!=h.i.gc();){g=RD(bMd(h),135);if(!Heb(TD(Gxd(g,pBc)))&&!!g.a){m=h5b(g);Rmb(f.f,m);if(!l){k=0;Rod(RD(Gxd(b,EBc),21))&&(k=qsd(new rjd(g.i,g.j),new rjd(g.g,g.f),new rjd(d.g,d.f),0,q));switch(q.g){case 2:case 4:m.o.a=k;break;case 1:case 3:m.o.b=k;}}}}pQb(e,_Bc,UD(Gxd(vCd(b),_Bc)));pQb(e,aCc,UD(Gxd(vCd(b),aCc)));pQb(e,ZBc,UD(Gxd(vCd(b),ZBc)));Rmb(c.a,e);Zjb(a.a,d,e)} +function j5b(a,b,c,d,e,f){var g,h,i,j,k,l;j=new R3b;kQb(j,b);Q3b(j,RD(Gxd(b,(yCc(),GBc)),64));pQb(j,(Ywc(),Awc),b);P3b(j,c);l=j.o;l.a=b.g;l.b=b.f;k=j.n;k.a=b.i;k.b=b.j;Zjb(a.a,b,j);g=yDb(GDb(EDb(new SDb(null,(!b.e&&(b.e=new Yie(G4,b,7,4)),new Swb(b.e,16))),new w5b),new o5b),new y5b(b));g||(g=yDb(GDb(EDb(new SDb(null,(!b.d&&(b.d=new Yie(G4,b,8,5)),new Swb(b.d,16))),new A5b),new q5b),new C5b(b)));g||(g=yDb(new SDb(null,(!b.e&&(b.e=new Yie(G4,b,7,4)),new Swb(b.e,16))),new E5b));pQb(j,nwc,(Geb(),g?true:false));m2b(j,f,e,RD(Gxd(b,zBc),8));for(i=new dMd((!b.n&&(b.n=new C5d(I4,b,1,7)),b.n));i.e!=i.i.gc();){h=RD(bMd(i),135);!Heb(TD(Gxd(h,pBc)))&&!!h.a&&Rmb(j.f,h5b(h))}switch(e.g){case 2:case 1:(j.j==(qpd(),Yod)||j.j==npd)&&d.Fc((ovc(),lvc));break;case 4:case 3:(j.j==(qpd(),Xod)||j.j==ppd)&&d.Fc((ovc(),lvc));}return j} +function dud(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;t=0;o=0;n=0;m=1;for(s=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));s.e!=s.i.gc();){q=RD(bMd(s),27);m+=Kr(new is(Mr(zGd(q).a.Kc(),new ir)));B=q.g;o=$wnd.Math.max(o,B);l=q.f;n=$wnd.Math.max(n,l);t+=B*l}p=(!a.a&&(a.a=new C5d(J4,a,10,11)),a.a).i;g=t+2*d*d*m*p;f=$wnd.Math.sqrt(g);i=$wnd.Math.max(f*c,o);h=$wnd.Math.max(f/c,n);for(r=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));r.e!=r.i.gc();){q=RD(bMd(r),27);C=e.b+(Kwb(b,26)*Kxe+Kwb(b,27)*Lxe)*(i-q.g);D=e.b+(Kwb(b,26)*Kxe+Kwb(b,27)*Lxe)*(h-q.f);Dyd(q,C);Eyd(q,D)}A=i+(e.b+e.c);w=h+(e.d+e.a);for(v=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));v.e!=v.i.gc();){u=RD(bMd(v),27);for(k=new is(Mr(zGd(u).a.Kc(),new ir));gs(k);){j=RD(hs(k),74);nzd(j)||cud(j,b,A,w)}}A+=e.b+e.c;w+=e.d+e.a;Esd(a,A,w,false,true)} +function CLb(a){var b;this.r=Ty(new FLb,new JLb);this.b=new Zrb(RD(Qb(E3),297));this.p=new Zrb(RD(Qb(E3),297));this.i=new Zrb(RD(Qb(XN),297));this.e=a;this.o=new sjd(a.Mf());this.D=a.Yf()||Heb(TD(a.of((umd(),$kd))));this.A=RD(a.of((umd(),kld)),21);this.B=RD(a.of(pld),21);this.q=RD(a.of(Hld),101);this.u=RD(a.of(Lld),21);if(!Sod(this.u)){throw Adb(new Jed('Invalid port label placement: '+this.u))}this.v=Heb(TD(a.of(Nld)));this.j=RD(a.of(ild),21);if(!fod(this.j)){throw Adb(new Jed('Invalid node label placement: '+this.j))}this.n=RD(ftd(a,gld),107);this.k=Kfb(UD(ftd(a,cmd)));this.d=Kfb(UD(ftd(a,bmd)));this.w=Kfb(UD(ftd(a,jmd)));this.s=Kfb(UD(ftd(a,dmd)));this.t=Kfb(UD(ftd(a,emd)));this.C=RD(ftd(a,hmd),140);this.c=2*this.d;b=!this.B.Hc((dqd(),Wpd));this.f=new dLb(0,b,0);this.g=new dLb(1,b,0);cLb(this.f,(ZJb(),XJb),this.g)} +function s6b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;b.Ug('Comment pre-processing',1);c=0;i=new Anb(a.a);while(i.a<i.c.c.length){h=RD(ynb(i),10);if(Heb(TD(mQb(h,(yCc(),Uzc))))){++c;e=0;d=null;j=null;for(o=new Anb(h.j);o.a<o.c.c.length;){m=RD(ynb(o),12);e+=m.e.c.length+m.g.c.length;if(m.e.c.length==1){d=RD(Vmb(m.e,0),18);j=d.c}if(m.g.c.length==1){d=RD(Vmb(m.g,0),18);j=d.d}}if(e==1&&j.e.c.length+j.g.c.length==1&&!Heb(TD(mQb(j.i,Uzc)))){t6b(h,d,j,j.i);znb(i)}else{r=new bnb;for(n=new Anb(h.j);n.a<n.c.c.length;){m=RD(ynb(n),12);for(l=new Anb(m.g);l.a<l.c.c.length;){k=RD(ynb(l),18);k.d.g.c.length==0||(ZEb(r.c,k),true)}for(g=new Anb(m.e);g.a<g.c.c.length;){f=RD(ynb(g),18);f.c.e.c.length==0||(ZEb(r.c,f),true)}}for(q=new Anb(r);q.a<q.c.c.length;){p=RD(ynb(q),18);X0b(p,true)}}}}b._g()&&b.bh('Found '+c+' comment boxes');b.Vg()} +function wke(a,b){uke();var c,d,e,f,g,h,i;this.a=new zke(this);this.b=a;this.c=b;this.f=Cfe(Qee((lke(),jke),b));if(this.f.dc()){if((h=Tee(jke,a))==b){this.e=true;this.d=new bnb;this.f=new OSd;this.f.Fc(dLe);RD(tfe(Pee(jke,BXd(a)),''),29)==a&&this.f.Fc(Uee(jke,BXd(a)));for(e=Gee(jke,a).Kc();e.Ob();){d=RD(e.Pb(),179);switch(yfe(Qee(jke,d))){case 4:{this.d.Fc(d);break}case 5:{this.f.Gc(Cfe(Qee(jke,d)));break}}}}else{nke();if(RD(b,69).xk()){this.e=true;this.f=null;this.d=new bnb;for(g=0,i=(a.i==null&&rYd(a),a.i).length;g<i;++g){d=(c=(a.i==null&&rYd(a),a.i),g>=0&&g<c.length?c[g]:null);for(f=zfe(Qee(jke,d));f;f=zfe(Qee(jke,f))){f==b&&this.d.Fc(d)}}}else if(yfe(Qee(jke,b))==1&&!!h){this.f=null;this.d=(Lle(),Kle)}else{this.f=null;this.e=true;this.d=(yob(),new mpb(b))}}}else{this.e=yfe(Qee(jke,b))==5;this.f.Fb(tke)&&(this.f=tke)}} +function qNb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;c=0;d=pNb(a,b);m=a.s;n=a.t;for(j=RD(RD(Qc(a.r,b),21),87).Kc();j.Ob();){i=RD(j.Pb(),117);if(!i.c||i.c.d.c.length<=0){continue}o=i.b.Mf();h=i.b.pf((umd(),Gld))?Kfb(UD(i.b.of(Gld))):0;k=i.c;l=k.i;l.b=(g=k.n,k.e.a+g.b+g.c);l.a=(f=k.n,k.e.b+f.d+f.a);switch(b.g){case 1:l.c=i.a?(o.a-l.b)/2:o.a+m;l.d=o.b+h+d;RKb(k,(EKb(),BKb));SKb(k,(vLb(),uLb));break;case 3:l.c=i.a?(o.a-l.b)/2:o.a+m;l.d=-h-d-l.a;RKb(k,(EKb(),BKb));SKb(k,(vLb(),sLb));break;case 2:l.c=-h-d-l.b;if(i.a){e=a.v?l.a:RD(Vmb(k.d,0),187).Mf().b;l.d=(o.b-e)/2}else{l.d=o.b+n}RKb(k,(EKb(),DKb));SKb(k,(vLb(),tLb));break;case 4:l.c=o.a+h+d;if(i.a){e=a.v?l.a:RD(Vmb(k.d,0),187).Mf().b;l.d=(o.b-e)/2}else{l.d=o.b+n}RKb(k,(EKb(),CKb));SKb(k,(vLb(),tLb));}(b==(qpd(),Yod)||b==npd)&&(c=$wnd.Math.max(c,l.a))}c>0&&(RD(Vrb(a.b,b),127).a.b=c)} +function wcc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p;m=Kfb(UD(mQb(a,(yCc(),_Bc))));n=Kfb(UD(mQb(a,aCc)));l=Kfb(UD(mQb(a,ZBc)));h=a.o;f=RD(Vmb(a.j,0),12);g=f.n;p=ucc(f,l);if(!p){return}if(b.Hc((Pod(),Lod))){switch(RD(mQb(a,(Ywc(),hwc)),64).g){case 1:p.c=(h.a-p.b)/2-g.a;p.d=n;break;case 3:p.c=(h.a-p.b)/2-g.a;p.d=-n-p.a;break;case 2:if(c&&f.e.c.length==0&&f.g.c.length==0){k=d?p.a:RD(Vmb(f.f,0),72).o.b;p.d=(h.b-k)/2-g.b}else{p.d=h.b+n-g.b}p.c=-m-p.b;break;case 4:if(c&&f.e.c.length==0&&f.g.c.length==0){k=d?p.a:RD(Vmb(f.f,0),72).o.b;p.d=(h.b-k)/2-g.b}else{p.d=h.b+n-g.b}p.c=m;}}else if(b.Hc(Nod)){switch(RD(mQb(a,(Ywc(),hwc)),64).g){case 1:case 3:p.c=g.a+m;break;case 2:case 4:if(c&&!f.c){k=d?p.a:RD(Vmb(f.f,0),72).o.b;p.d=(h.b-k)/2-g.b}else{p.d=g.b+n}}}e=p.d;for(j=new Anb(f.f);j.a<j.c.c.length;){i=RD(ynb(j),72);o=i.n;o.a=p.c;o.b=e;e+=i.o.b+l}} +function w9b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F;w=new bnb;for(o=new Anb(a.b);o.a<o.c.c.length;){n=RD(ynb(o),30);for(r=new Anb(n.a);r.a<r.c.c.length;){p=RD(ynb(r),10);if(p.k!=(r3b(),m3b)){continue}if(!nQb(p,(Ywc(),gwc))){continue}s=null;u=null;t=null;for(C=new Anb(p.j);C.a<C.c.c.length;){B=RD(ynb(C),12);switch(B.j.g){case 4:s=B;break;case 2:u=B;break;default:t=B;}}v=RD(Vmb(t.g,0),18);k=new Fjd(v.a);j=new sjd(t.n);$id(j,p.n);l=Sub(k,0);cvb(l,j);A=Ijd(v.a);m=new sjd(t.n);$id(m,p.n);Pub(A,m,A.c.b,A.c);D=RD(mQb(p,gwc),10);F=RD(Vmb(D.j,0),12);i=RD(anb(s.e,$C(WQ,VAe,18,0,0,1)),483);for(d=i,f=0,h=d.length;f<h;++f){b=d[f];Z0b(b,F);Ajd(b.a,b.a.b,k)}i=s2b(u.g);for(c=i,e=0,g=c.length;e<g;++e){b=c[e];Y0b(b,F);Ajd(b.a,0,A)}Y0b(v,null);Z0b(v,null);ZEb(w.c,p)}}for(q=new Anb(w);q.a<q.c.c.length;){p=RD(ynb(q),10);g3b(p,null)}} +function Dne(){RRd(Vbb,new ioe);RRd(Xbb,new Poe);RRd(Ybb,new upe);RRd(Zbb,new _pe);RRd(qJ,new lqe);RRd(WC(gE,1),new oqe);RRd(QI,new rqe);RRd(RI,new uqe);RRd(qJ,new Gne);RRd(qJ,new Jne);RRd(qJ,new Mne);RRd(VI,new Pne);RRd(qJ,new Sne);RRd(QK,new Vne);RRd(QK,new Yne);RRd(qJ,new _ne);RRd(ZI,new coe);RRd(qJ,new foe);RRd(qJ,new loe);RRd(qJ,new ooe);RRd(qJ,new roe);RRd(qJ,new uoe);RRd(WC(gE,1),new xoe);RRd(qJ,new Aoe);RRd(qJ,new Doe);RRd(QK,new Goe);RRd(QK,new Joe);RRd(qJ,new Moe);RRd(bJ,new Soe);RRd(qJ,new Voe);RRd(eJ,new Yoe);RRd(qJ,new _oe);RRd(qJ,new cpe);RRd(qJ,new fpe);RRd(qJ,new ipe);RRd(QK,new lpe);RRd(QK,new ope);RRd(qJ,new rpe);RRd(qJ,new xpe);RRd(qJ,new Ape);RRd(qJ,new Dpe);RRd(qJ,new Gpe);RRd(qJ,new Jpe);RRd(lJ,new Mpe);RRd(qJ,new Ppe);RRd(qJ,new Spe);RRd(qJ,new Vpe);RRd(lJ,new Ype);RRd(eJ,new cqe);RRd(qJ,new fqe);RRd(bJ,new iqe)} +function jsc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;k=new Ejd;switch(a.a.g){case 3:m=RD(mQb(b.e,(Ywc(),Twc)),15);n=RD(mQb(b.j,Twc),15);o=RD(mQb(b.f,Twc),15);c=RD(mQb(b.e,Rwc),15);d=RD(mQb(b.j,Rwc),15);e=RD(mQb(b.f,Rwc),15);g=new bnb;Tmb(g,m);n.Jc(new msc);Tmb(g,hv(n));Tmb(g,o);f=new bnb;Tmb(f,c);Tmb(f,hv(d));Tmb(f,e);pQb(b.f,Twc,g);pQb(b.f,Rwc,f);pQb(b.f,Uwc,b.f);pQb(b.e,Twc,null);pQb(b.e,Rwc,null);pQb(b.j,Twc,null);pQb(b.j,Rwc,null);break;case 1:ye(k,b.e.a);Mub(k,b.i.n);ye(k,hv(b.j.a));Mub(k,b.a.n);ye(k,b.f.a);break;default:ye(k,b.e.a);ye(k,hv(b.j.a));ye(k,b.f.a);}Xub(b.f.a);ye(b.f.a,k);Y0b(b.f,b.e.c);h=RD(mQb(b.e,(yCc(),RAc)),75);j=RD(mQb(b.j,RAc),75);i=RD(mQb(b.f,RAc),75);if(!!h||!!j||!!i){l=new Ejd;hsc(l,i);hsc(l,j);hsc(l,h);pQb(b.f,RAc,l)}Y0b(b.j,null);Z0b(b.j,null);Y0b(b.e,null);Z0b(b.e,null);g3b(b.a,null);g3b(b.i,null);!!b.g&&jsc(a,b.g)} +function tib(){tib=geb;var a,b,c;new Aib(1,0);new Aib(10,0);new Aib(0,0);lib=$C(tJ,Nve,247,11,0,1);mib=$C(hE,zwe,28,100,15,1);nib=cD(WC(iE,1),vxe,28,15,[1,5,25,125,625,3125,15625,78125,390625,1953125,9765625,48828125,244140625,1220703125,6103515625,30517578125,152587890625,762939453125,3814697265625,19073486328125,95367431640625,476837158203125,2384185791015625]);oib=$C(kE,Pwe,28,nib.length,15,1);pib=cD(WC(iE,1),vxe,28,15,[1,10,100,Awe,10000,wxe,1000000,10000000,100000000,ixe,10000000000,100000000000,1000000000000,10000000000000,100000000000000,1000000000000000,10000000000000000]);qib=$C(kE,Pwe,28,pib.length,15,1);rib=$C(tJ,Nve,247,11,0,1);a=0;for(;a<rib.length;a++){lib[a]=new Aib(a,0);rib[a]=new Aib(0,a);mib[a]=48}for(;a<mib.length;a++){mib[a]=48}for(c=0;c<oib.length;c++){oib[c]=Cib(nib[c])}for(b=0;b<qib.length;b++){qib[b]=Cib(pib[b])}Ljb()} +function Htb(){function e(){this.obj=this.createObject()} +;e.prototype.createObject=function(a){return Object.create(null)};e.prototype.get=function(a){return this.obj[a]};e.prototype.set=function(a,b){this.obj[a]=b};e.prototype[Jxe]=function(a){delete this.obj[a]};e.prototype.keys=function(){return Object.getOwnPropertyNames(this.obj)};e.prototype.entries=function(){var b=this.keys();var c=this;var d=0;return {next:function(){if(d>=b.length)return {done:true};var a=b[d++];return {value:[a,c.get(a)],done:false}}}};if(!Ftb()){e.prototype.createObject=function(){return {}};e.prototype.get=function(a){return this.obj[':'+a]};e.prototype.set=function(a,b){this.obj[':'+a]=b};e.prototype[Jxe]=function(a){delete this.obj[':'+a]};e.prototype.keys=function(){var a=[];for(var b in this.obj){b.charCodeAt(0)==58&&a.push(b.substring(1))}return a}}return e} +function q$c(){q$c=geb;h$c=new jGd(rAe);new jGd(sAe);new kGd('DEPTH',sgb(0));XZc=new kGd('FAN',sgb(0));VZc=new kGd(QEe,sgb(0));n$c=new kGd('ROOT',(Geb(),false));b$c=new kGd('LEFTNEIGHBOR',null);l$c=new kGd('RIGHTNEIGHBOR',null);c$c=new kGd('LEFTSIBLING',null);m$c=new kGd('RIGHTSIBLING',null);WZc=new kGd('DUMMY',false);new kGd('LEVEL',sgb(0));k$c=new kGd('REMOVABLE_EDGES',new Yub);o$c=new kGd('XCOOR',sgb(0));p$c=new kGd('YCOOR',sgb(0));d$c=new kGd('LEVELHEIGHT',0);f$c=new kGd('LEVELMIN',0);e$c=new kGd('LEVELMAX',0);ZZc=new kGd('GRAPH_XMIN',0);_Zc=new kGd('GRAPH_YMIN',0);YZc=new kGd('GRAPH_XMAX',0);$Zc=new kGd('GRAPH_YMAX',0);UZc=new kGd('COMPACT_LEVEL_ASCENSION',false);TZc=new kGd('COMPACT_CONSTRAINTS',new bnb);a$c=new kGd('ID','');i$c=new kGd('POSITION',sgb(0));j$c=new kGd('PRELIM',0);g$c=new kGd('MODIFIER',0);SZc=new jGd(tAe);RZc=new jGd(uAe)} +function Bqe(a){zqe();var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(a==null)return null;l=a.length*8;if(l==0){return ''}h=l%24;n=l/24|0;m=h!=0?n+1:n;f=null;f=$C(hE,zwe,28,m*4,15,1);j=0;k=0;b=0;c=0;d=0;g=0;e=0;for(i=0;i<n;i++){b=a[e++];c=a[e++];d=a[e++];k=(c&15)<<24>>24;j=(b&3)<<24>>24;o=(b&-128)==0?b>>2<<24>>24:(b>>2^192)<<24>>24;p=(c&-128)==0?c>>4<<24>>24:(c>>4^240)<<24>>24;q=(d&-128)==0?d>>6<<24>>24:(d>>6^252)<<24>>24;f[g++]=yqe[o];f[g++]=yqe[p|j<<4];f[g++]=yqe[k<<2|q];f[g++]=yqe[d&63]}if(h==8){b=a[e];j=(b&3)<<24>>24;o=(b&-128)==0?b>>2<<24>>24:(b>>2^192)<<24>>24;f[g++]=yqe[o];f[g++]=yqe[j<<4];f[g++]=61;f[g++]=61}else if(h==16){b=a[e];c=a[e+1];k=(c&15)<<24>>24;j=(b&3)<<24>>24;o=(b&-128)==0?b>>2<<24>>24:(b>>2^192)<<24>>24;p=(c&-128)==0?c>>4<<24>>24:(c>>4^240)<<24>>24;f[g++]=yqe[o];f[g++]=yqe[p|j<<4];f[g++]=yqe[k<<2];f[g++]=61}return Ihb(f,0,f.length)} +function CB(a,b){var c,d,e,f,g,h,i;a.e==0&&a.p>0&&(a.p=-(a.p-1));a.p>qwe&&tB(b,a.p-Owe);g=b.q.getDate();nB(b,1);a.k>=0&&qB(b,a.k);if(a.c>=0){nB(b,a.c)}else if(a.k>=0){i=new vB(b.q.getFullYear()-Owe,b.q.getMonth(),35);d=35-i.q.getDate();nB(b,$wnd.Math.min(d,g))}else{nB(b,g)}a.f<0&&(a.f=b.q.getHours());a.b>0&&a.f<12&&(a.f+=12);oB(b,a.f==24&&a.g?0:a.f);a.j>=0&&pB(b,a.j);a.n>=0&&rB(b,a.n);a.i>=0&&sB(b,Bdb(Ndb(Fdb(Hdb(b.q.getTime()),Awe),Awe),a.i));if(a.a){e=new uB;tB(e,e.q.getFullYear()-Owe-80);Ldb(Hdb(b.q.getTime()),Hdb(e.q.getTime()))&&tB(b,e.q.getFullYear()-Owe+100)}if(a.d>=0){if(a.c==-1){c=(7+a.d-b.q.getDay())%7;c>3&&(c-=7);h=b.q.getMonth();nB(b,b.q.getDate()+c);b.q.getMonth()!=h&&nB(b,b.q.getDate()+(c>0?-7:7))}else{if(b.q.getDay()!=a.d){return false}}}if(a.o>qwe){f=b.q.getTimezoneOffset();sB(b,Bdb(Hdb(b.q.getTime()),(a.o-f)*60*Awe))}return true} +function J5b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=mQb(b,(Ywc(),Awc));if(!ZD(e,207)){return}o=RD(e,27);p=b.e;m=new sjd(b.c);f=b.d;m.a+=f.b;m.b+=f.d;u=RD(Gxd(o,(yCc(),oBc)),181);if(Csb(u,(dqd(),Xpd))){n=RD(Gxd(o,qBc),107);E2b(n,f.a);H2b(n,f.d);F2b(n,f.b);G2b(n,f.c)}c=new bnb;for(k=new Anb(b.a);k.a<k.c.c.length;){i=RD(ynb(k),10);if(ZD(mQb(i,Awc),207)){K5b(i,m)}else if(ZD(mQb(i,Awc),193)&&!p){d=RD(mQb(i,Awc),123);s=j2b(b,i,d.g,d.f);Byd(d,s.a,s.b)}for(r=new Anb(i.j);r.a<r.c.c.length;){q=RD(ynb(r),12);FDb(CDb(new SDb(null,new Swb(q.g,16)),new Q5b(i)),new S5b(c))}}if(p){for(r=new Anb(p.j);r.a<r.c.c.length;){q=RD(ynb(r),12);FDb(CDb(new SDb(null,new Swb(q.g,16)),new U5b(p)),new W5b(c))}}t=RD(Gxd(o,yAc),223);for(h=new Anb(c);h.a<h.c.c.length;){g=RD(ynb(h),18);I5b(g,t,m)}L5b(b);for(j=new Anb(b.a);j.a<j.c.c.length;){i=RD(ynb(j),10);l=i.e;!!l&&J5b(a,l)}} +function xNb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;if(RD(RD(Qc(a.r,b),21),87).dc()){return}g=RD(Vrb(a.b,b),127);i=g.i;h=g.n;k=BLb(a,b);d=i.b-h.b-h.c;e=g.a.a;f=i.c+h.b;n=a.w;if((k==(pod(),mod)||k==ood)&&RD(RD(Qc(a.r,b),21),87).gc()==1){e=k==mod?e-2*a.w:e;k=lod}if(d<e&&!a.B.Hc((dqd(),aqd))){if(k==mod){n+=(d-e)/(RD(RD(Qc(a.r,b),21),87).gc()+1);f+=n}else{n+=(d-e)/(RD(RD(Qc(a.r,b),21),87).gc()-1)}}else{if(d<e){e=k==mod?e-2*a.w:e;k=lod}switch(k.g){case 3:f+=(d-e)/2;break;case 4:f+=d-e;break;case 0:c=(d-e)/(RD(RD(Qc(a.r,b),21),87).gc()+1);n+=$wnd.Math.max(0,c);f+=n;break;case 1:c=(d-e)/(RD(RD(Qc(a.r,b),21),87).gc()-1);n+=$wnd.Math.max(0,c);}}for(m=RD(RD(Qc(a.r,b),21),87).Kc();m.Ob();){l=RD(m.Pb(),117);l.e.a=f+l.d.b;l.e.b=(j=l.b,j.pf((umd(),Gld))?j.ag()==(qpd(),Yod)?-j.Mf().b-Kfb(UD(j.of(Gld))):Kfb(UD(j.of(Gld))):j.ag()==(qpd(),Yod)?-j.Mf().b:0);f+=l.d.b+l.b.Mf().a+l.d.c+n}} +function BNb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(RD(RD(Qc(a.r,b),21),87).dc()){return}g=RD(Vrb(a.b,b),127);i=g.i;h=g.n;l=BLb(a,b);d=i.a-h.d-h.a;e=g.a.b;f=i.d+h.d;o=a.w;j=a.o.a;if((l==(pod(),mod)||l==ood)&&RD(RD(Qc(a.r,b),21),87).gc()==1){e=l==mod?e-2*a.w:e;l=lod}if(d<e&&!a.B.Hc((dqd(),aqd))){if(l==mod){o+=(d-e)/(RD(RD(Qc(a.r,b),21),87).gc()+1);f+=o}else{o+=(d-e)/(RD(RD(Qc(a.r,b),21),87).gc()-1)}}else{if(d<e){e=l==mod?e-2*a.w:e;l=lod}switch(l.g){case 3:f+=(d-e)/2;break;case 4:f+=d-e;break;case 0:c=(d-e)/(RD(RD(Qc(a.r,b),21),87).gc()+1);o+=$wnd.Math.max(0,c);f+=o;break;case 1:c=(d-e)/(RD(RD(Qc(a.r,b),21),87).gc()-1);o+=$wnd.Math.max(0,c);}}for(n=RD(RD(Qc(a.r,b),21),87).Kc();n.Ob();){m=RD(n.Pb(),117);m.e.a=(k=m.b,k.pf((umd(),Gld))?k.ag()==(qpd(),ppd)?-k.Mf().a-Kfb(UD(k.of(Gld))):j+Kfb(UD(k.of(Gld))):k.ag()==(qpd(),ppd)?-k.Mf().a:j);m.e.b=f+m.d.d;f+=m.d.d+m.b.Mf().b+m.d.a+o}} +function bZc(a,b){var c,d,e,f,g;b.Ug('Processor determine the coords for each level',1);d=new bnb;for(g=Sub(a.b,0);g.b!=g.d.c;){e=RD(evb(g),40);while(RD(mQb(e,(h_c(),f_c)),17).a>d.c.length-1){Rmb(d,new Ptd(Hze,KEe))}c=RD(mQb(e,f_c),17).a;if(Dmd(RD(mQb(a,H$c),88))){e.e.a<Kfb(UD((tFb(c,d.c.length),RD(d.c[c],42)).a))&&Ntd((tFb(c,d.c.length),RD(d.c[c],42)),e.e.a);e.e.a+e.f.a>Kfb(UD((tFb(c,d.c.length),RD(d.c[c],42)).b))&&Otd((tFb(c,d.c.length),RD(d.c[c],42)),e.e.a+e.f.a)}else{e.e.b<Kfb(UD((tFb(c,d.c.length),RD(d.c[c],42)).a))&&Ntd((tFb(c,d.c.length),RD(d.c[c],42)),e.e.b);e.e.b+e.f.b>Kfb(UD((tFb(c,d.c.length),RD(d.c[c],42)).b))&&Otd((tFb(c,d.c.length),RD(d.c[c],42)),e.e.b+e.f.b)}}for(f=Sub(a.b,0);f.b!=f.d.c;){e=RD(evb(f),40);c=RD(mQb(e,(h_c(),f_c)),17).a;pQb(e,(q$c(),f$c),UD((tFb(c,d.c.length),RD(d.c[c],42)).a));pQb(e,e$c,UD((tFb(c,d.c.length),RD(d.c[c],42)).b))}b.Vg()} +function Tec(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;a.o=Kfb(UD(mQb(a.i,(yCc(),bCc))));a.f=Kfb(UD(mQb(a.i,XBc)));a.j=a.i.b.c.length;h=a.j-1;m=0;a.k=0;a.n=0;a.b=dv($C(bJ,Nve,17,a.j,0,1));a.c=dv($C(VI,Nve,345,a.j,7,1));for(g=new Anb(a.i.b);g.a<g.c.c.length;){e=RD(ynb(g),30);e.p=h;for(l=new Anb(e.a);l.a<l.c.c.length;){k=RD(ynb(l),10);k.p=m;++m}--h}a.g=$C(kE,Pwe,28,m,15,1);a.d=YC(kE,[Nve,Pwe],[53,28],15,[m,3],2);a.p=new bnb;a.q=new bnb;b=0;a.e=0;for(f=new Anb(a.i.b);f.a<f.c.c.length;){e=RD(ynb(f),30);h=e.p;d=0;p=0;i=e.a.c.length;j=0;for(l=new Anb(e.a);l.a<l.c.c.length;){k=RD(ynb(l),10);m=k.p;a.g[m]=k.c.p;j+=k.o.b+a.o;c=Kr(new is(Mr(Z2b(k).a.Kc(),new ir)));o=Kr(new is(Mr(a3b(k).a.Kc(),new ir)));a.d[m][0]=o-c;a.d[m][1]=c;a.d[m][2]=o;d+=c;p+=o;c>0&&Rmb(a.q,k);Rmb(a.p,k)}b-=d;n=i+b;j+=b*a.f;$mb(a.b,h,sgb(n));$mb(a.c,h,j);a.k=$wnd.Math.max(a.k,n);a.n=$wnd.Math.max(a.n,j);a.e+=b;b+=p}} +function qpd(){qpd=geb;var a;opd=new upd(Sye,0);Yod=new upd(_ye,1);Xod=new upd(aze,2);npd=new upd(bze,3);ppd=new upd(cze,4);bpd=(yob(),new Lqb((a=RD(mfb(E3),9),new Fsb(a,RD(WEb(a,a.length),9),0))));cpd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[])));Zod=eq(ysb(Xod,cD(WC(E3,1),NAe,64,0,[])));kpd=eq(ysb(npd,cD(WC(E3,1),NAe,64,0,[])));mpd=eq(ysb(ppd,cD(WC(E3,1),NAe,64,0,[])));hpd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[npd])));apd=eq(ysb(Xod,cD(WC(E3,1),NAe,64,0,[ppd])));jpd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[ppd])));dpd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[Xod])));lpd=eq(ysb(npd,cD(WC(E3,1),NAe,64,0,[ppd])));$od=eq(ysb(Xod,cD(WC(E3,1),NAe,64,0,[npd])));gpd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[Xod,ppd])));_od=eq(ysb(Xod,cD(WC(E3,1),NAe,64,0,[npd,ppd])));ipd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[npd,ppd])));epd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[Xod,npd])));fpd=eq(ysb(Yod,cD(WC(E3,1),NAe,64,0,[Xod,npd,ppd])))} +function Gfc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;b.Ug(qBe,1);p=new bnb;w=new bnb;for(j=new Anb(a.b);j.a<j.c.c.length;){i=RD(ynb(j),30);r=-1;o=t2b(i.a);for(l=o,m=0,n=l.length;m<n;++m){k=l[m];++r;if(!(k.k==(r3b(),p3b)&&Dod(RD(mQb(k,(yCc(),BBc)),101)))){continue}Cod(RD(mQb(k,(yCc(),BBc)),101))||Hfc(k);pQb(k,(Ywc(),pwc),k);p.c.length=0;w.c.length=0;c=new bnb;u=new Yub;_q(u,e3b(k,(qpd(),Yod)));Efc(a,u,p,w,c);h=r;A=k;for(f=new Anb(p);f.a<f.c.c.length;){d=RD(ynb(f),10);f3b(d,h,i);++r;pQb(d,pwc,k);g=RD(Vmb(d.j,0),12);q=RD(mQb(g,Awc),12);Heb(TD(mQb(q,Szc)))||RD(mQb(d,qwc),15).Fc(A)}Xub(u);for(t=e3b(k,npd).Kc();t.Ob();){s=RD(t.Pb(),12);Pub(u,s,u.a,u.a.a)}Efc(a,u,w,null,c);v=k;for(e=new Anb(w);e.a<e.c.c.length;){d=RD(ynb(e),10);f3b(d,++r,i);pQb(d,pwc,k);g=RD(Vmb(d.j,0),12);q=RD(mQb(g,Awc),12);Heb(TD(mQb(q,Szc)))||RD(mQb(v,qwc),15).Fc(d)}c.c.length==0||pQb(k,Uvc,c)}}b.Vg()} +function tYc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;if(b.b!=0){n=new Yub;h=null;o=null;d=eE($wnd.Math.floor($wnd.Math.log(b.b)*$wnd.Math.LOG10E)+1);i=0;for(t=Sub(b,0);t.b!=t.d.c;){r=RD(evb(t),40);if(dE(o)!==dE(mQb(r,(q$c(),a$c)))){o=WD(mQb(r,a$c));i=0}o!=null?(h=o+wYc(i++,d)):(h=wYc(i++,d));pQb(r,a$c,h);for(q=(e=Sub((new dXc(r)).a.d,0),new gXc(e));dvb(q.a);){p=RD(evb(q.a),65).c;Pub(n,p,n.c.b,n.c);pQb(p,a$c,h)}}m=new Tsb;for(g=0;g<h.length-d;g++){for(s=Sub(b,0);s.b!=s.d.c;){r=RD(evb(s),40);j=zhb(WD(mQb(r,(q$c(),a$c))),0,g+1);c=(j==null?Wd(qtb(m.f,null)):Ktb(m.i,j))!=null?RD(j==null?Wd(qtb(m.f,null)):Ktb(m.i,j),17).a+1:1;$jb(m,j,sgb(c))}}for(l=new vkb((new mkb(m)).a);l.b;){k=tkb(l);f=sgb(Wjb(a.a,k.ld())!=null?RD(Wjb(a.a,k.ld()),17).a:0);$jb(a.a,WD(k.ld()),sgb(RD(k.md(),17).a+f.a));f=RD(Wjb(a.b,k.ld()),17);(!f||f.a<RD(k.md(),17).a)&&$jb(a.b,WD(k.ld()),RD(k.md(),17))}tYc(a,n)}} +function Hpc(a){var b,c,d,e,f,g,h,i,j,k,l,m;c=null;i=null;e=RD(mQb(a.b,(yCc(),CAc)),349);if(e==(TEc(),REc)){c=new bnb;i=new bnb}for(h=new Anb(a.d);h.a<h.c.c.length;){g=RD(ynb(h),105);f=g.i;if(!f){continue}switch(g.e.g){case 0:b=RD(Nsb(new Osb(g.b)),64);e==REc&&b==(qpd(),Yod)?(ZEb(c.c,g),true):e==REc&&b==(qpd(),npd)?(ZEb(i.c,g),true):Fpc(g,b);break;case 1:j=g.a.d.j;k=g.c.d.j;j==(qpd(),Yod)?Gpc(g,Yod,(enc(),bnc),g.a):k==Yod?Gpc(g,Yod,(enc(),cnc),g.c):j==npd?Gpc(g,npd,(enc(),cnc),g.a):k==npd&&Gpc(g,npd,(enc(),bnc),g.c);break;case 2:case 3:d=g.b;Csb(d,(qpd(),Yod))?Csb(d,npd)?Csb(d,ppd)?Csb(d,Xod)||Gpc(g,Yod,(enc(),cnc),g.c):Gpc(g,Yod,(enc(),bnc),g.a):Gpc(g,Yod,(enc(),anc),null):Gpc(g,npd,(enc(),anc),null);break;case 4:l=g.a.d.j;m=g.a.d.j;l==(qpd(),Yod)||m==Yod?Gpc(g,npd,(enc(),anc),null):Gpc(g,Yod,(enc(),anc),null);}}if(c){c.c.length==0||Epc(c,(qpd(),Yod));i.c.length==0||Epc(i,(qpd(),npd))}} +function oGc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;c.Ug('Breadth first model order layering',1);a.a=b;q=new bnb;for(p=new Anb(a.a.a);p.a<p.c.c.length;){n=RD(ynb(p),10);n.k==(r3b(),p3b)&&(ZEb(q.c,n),true)}yob();_mb(q,new tGc);i=true;e=new R4b(a.a);d=null;Rmb(a.a.b,e);for(o=new Anb(q);o.a<o.c.c.length;){n=RD(ynb(o),10);if(i){g3b(n,e);i=false}else{for(h=new is(Mr(Z2b(n).a.Kc(),new ir));gs(h);){f=RD(hs(h),18);if(f.c.i.k==(r3b(),p3b)&&f.c.i.c==e||f.c.i.k==n3b&&RD(hs(new is(Mr(Z2b(f.c.i).a.Kc(),new ir))),18).c.i.c==e){d=new R4b(a.a);Rmb(a.a.b,d);e=new R4b(a.a);Rmb(a.a.b,e)}}for(g=new is(Mr(Z2b(n).a.Kc(),new ir));gs(g);){f=RD(hs(g),18);f.c.i.k==(r3b(),n3b)&&!f.c.i.c&&g3b(f.c.i,d)}g3b(n,e)}}a.a.a.c.length=0;r=new bnb;for(l=new Anb(a.a.b);l.a<l.c.c.length;){j=RD(ynb(l),30);j.a.c.length==0&&(ZEb(r.c,j),true)}Ce(a.a.b,r);m=0;for(k=new Anb(a.a.b);k.a<k.c.c.length;){j=RD(ynb(k),30);j.p=m;++m}c.Vg()} +function K5b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;d=RD(mQb(a,(Ywc(),Awc)),27);o=RD(mQb(a,(yCc(),mAc)),17).a;f=RD(mQb(a,VAc),17).a;Ixd(d,mAc,sgb(o));Ixd(d,VAc,sgb(f));Dyd(d,a.n.a+b.a);Eyd(d,a.n.b+b.b);if(RD(Gxd(d,lBc),181).gc()!=0||!!a.e||dE(mQb(Y2b(a),kBc))===dE((JDc(),HDc))&&xDc((wDc(),(!a.q?(yob(),yob(),wob):a.q)._b(iBc)?(m=RD(mQb(a,iBc),203)):(m=RD(mQb(Y2b(a),jBc),203)),m))){Cyd(d,a.o.a);Ayd(d,a.o.b)}for(l=new Anb(a.j);l.a<l.c.c.length;){j=RD(ynb(l),12);p=mQb(j,Awc);if(ZD(p,193)){e=RD(p,123);Byd(e,j.n.a,j.n.b);Ixd(e,GBc,j.j)}}n=RD(mQb(a,dBc),181).gc()!=0;for(i=new Anb(a.b);i.a<i.c.c.length;){g=RD(ynb(i),72);if(n||RD(mQb(g,dBc),181).gc()!=0){c=RD(mQb(g,Awc),135);zyd(c,g.o.a,g.o.b);Byd(c,g.n.a,g.n.b)}}if(!Rod(RD(mQb(a,EBc),21))){for(k=new Anb(a.j);k.a<k.c.c.length;){j=RD(ynb(k),12);for(h=new Anb(j.f);h.a<h.c.c.length;){g=RD(ynb(h),72);c=RD(mQb(g,Awc),135);Cyd(c,g.o.a);Ayd(c,g.o.b);Byd(c,g.n.a,g.n.b)}}}} +function X2c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C;b.Ug('Calculate Graph Size',1);b.dh(a,eFe);l=Hze;m=Hze;j=fFe;k=fFe;for(p=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));p.e!=p.i.gc();){n=RD(bMd(p),27);s=n.i;t=n.j;C=n.g;h=n.f;i=RD(Gxd(n,(umd(),eld)),140);l=$wnd.Math.min(l,s-i.b);m=$wnd.Math.min(m,t-i.d);j=$wnd.Math.max(j,s+C+i.c);k=$wnd.Math.max(k,t+h+i.a)}r=RD(Gxd(a,(umd(),tld)),107);q=new rjd(l-r.b,m-r.d);B=j-l+(r.b+r.c);g=k-m+(r.d+r.a);if(Heb(TD(Gxd(a,($4c(),G4c))))){u=RD(Gxd(a,(u2c(),t2c)),27);v=RD(Gxd(u,eld),140);w=u.i+u.g/2+(v.b+v.c)/2-q.a;A=u.j+u.f/2+(v.d+v.a)/2-q.b;e=B-w;f=g-A;if(e<B/2){c=e-w;B+=c;q.a-=c}else{c=w-e;B+=c}if(f<g/2){d=f-A;g+=d;q.b-=d}else{d=A-f;g+=d}}for(o=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));o.e!=o.i.gc();){n=RD(bMd(o),27);Dyd(n,n.i-q.a);Eyd(n,n.j-q.b)}if(!Heb(TD(Gxd(a,mld)))){Cyd(a,B);Ayd(a,g)}Ixd(a,Ikd,B-(r.b+r.c));Ixd(a,Hkd,g-(r.d+r.a));b.dh(a,gFe)} +function IUc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;a.e.a.$b();a.f.a.$b();a.c.c.length=0;a.i.c.length=0;a.g.a.$b();if(b){for(g=new Anb(b.a);g.a<g.c.c.length;){f=RD(ynb(g),10);for(l=e3b(f,(qpd(),Xod)).Kc();l.Ob();){k=RD(l.Pb(),12);Ysb(a.e,k);for(e=new Anb(k.g);e.a<e.c.c.length;){d=RD(ynb(e),18);if(W0b(d)){continue}Rmb(a.c,d);OUc(a,d);h=d.c.i.k;(h==(r3b(),p3b)||h==q3b||h==m3b||h==l3b)&&Rmb(a.j,d);n=d.d;m=n.i.c;m==c?Ysb(a.f,n):m==b?Ysb(a.e,n):Ymb(a.c,d)}}}}if(c){for(g=new Anb(c.a);g.a<g.c.c.length;){f=RD(ynb(g),10);for(j=new Anb(f.j);j.a<j.c.c.length;){i=RD(ynb(j),12);for(e=new Anb(i.g);e.a<e.c.c.length;){d=RD(ynb(e),18);W0b(d)&&Ysb(a.g,d)}}for(l=e3b(f,(qpd(),ppd)).Kc();l.Ob();){k=RD(l.Pb(),12);Ysb(a.f,k);for(e=new Anb(k.g);e.a<e.c.c.length;){d=RD(ynb(e),18);if(W0b(d)){continue}Rmb(a.c,d);OUc(a,d);h=d.c.i.k;(h==(r3b(),p3b)||h==q3b||h==m3b||h==l3b)&&Rmb(a.j,d);n=d.d;m=n.i.c;m==c?Ysb(a.f,n):m==b?Ysb(a.e,n):Ymb(a.c,d)}}}}} +function iSc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;c.Ug('Polyline edge routing',1);q=Kfb(UD(mQb(b,(yCc(),AAc))));n=Kfb(UD(mQb(b,cCc)));e=Kfb(UD(mQb(b,UBc)));d=$wnd.Math.min(1,e/n);t=0;i=0;if(b.b.c.length!=0){u=fSc(RD(Vmb(b.b,0),30));t=0.4*d*u}h=new Jkb(b.b,0);while(h.b<h.d.gc()){g=(sFb(h.b<h.d.gc()),RD(h.d.Xb(h.c=h.b++),30));f=ar(g,bSc);f&&t>0&&(t-=n);p2b(g,t);k=0;for(m=new Anb(g.a);m.a<m.c.c.length;){l=RD(ynb(m),10);j=0;for(p=new is(Mr(a3b(l).a.Kc(),new ir));gs(p);){o=RD(hs(p),18);r=K3b(o.c).b;s=K3b(o.d).b;if(g==o.d.i.c&&!W0b(o)){jSc(o,t,0.4*d*$wnd.Math.abs(r-s));if(o.c.j==(qpd(),ppd)){r=0;s=0}}j=$wnd.Math.max(j,$wnd.Math.abs(s-r))}switch(l.k.g){case 0:case 4:case 1:case 3:case 5:kSc(a,l,t,q);}k=$wnd.Math.max(k,j)}if(h.b<h.d.gc()){u=fSc((sFb(h.b<h.d.gc()),RD(h.d.Xb(h.c=h.b++),30)));k=$wnd.Math.max(k,u);sFb(h.b>0);h.a.Xb(h.c=--h.b)}i=0.4*d*k;!f&&h.b<h.d.gc()&&(i+=n);t+=g.c.a+i}a.a.a.$b();b.f.a=t;c.Vg()} +function GGd(a){var b,c,d,e,f;Ivb(a,IIe);switch((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b).i+(!a.c&&(a.c=new Yie(E4,a,5,8)),a.c).i){case 0:throw Adb(new agb('The edge must have at least one source or target.'));case 1:return (!a.b&&(a.b=new Yie(E4,a,4,7)),a.b).i==0?vCd(AGd(RD(QHd((!a.c&&(a.c=new Yie(E4,a,5,8)),a.c),0),84))):vCd(AGd(RD(QHd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),0),84)));}if((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b).i==1&&(!a.c&&(a.c=new Yie(E4,a,5,8)),a.c).i==1){e=AGd(RD(QHd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),0),84));f=AGd(RD(QHd((!a.c&&(a.c=new Yie(E4,a,5,8)),a.c),0),84));if(vCd(e)==vCd(f)){return vCd(e)}else if(e==vCd(f)){return e}else if(f==vCd(e)){return f}}d=Fl(Al(cD(WC(cJ,1),rve,20,0,[(!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),(!a.c&&(a.c=new Yie(E4,a,5,8)),a.c)])));b=AGd(RD(hs(d),84));while(gs(d)){c=AGd(RD(hs(d),84));if(c!=b&&!NGd(c,b)){if(vCd(c)==vCd(b)){b=vCd(c)}else{b=HGd(b,c);if(!b){return null}}}}return b} +function _zd(b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;n=c.length;if(n>0){j=(BFb(0,c.length),c.charCodeAt(0));if(j!=64){if(j==37){m=c.lastIndexOf('%');k=false;if(m!=0&&(m==n-1||(k=(BFb(m+1,c.length),c.charCodeAt(m+1)==46)))){h=(AFb(1,m,c.length),c.substr(1,m-1));u=lhb('%',h)?null:oSd(h);e=0;if(k){try{e=Oeb((BFb(m+2,c.length+1),c.substr(m+2)),qwe,lve)}catch(a){a=zdb(a);if(ZD(a,130)){i=a;throw Adb(new RSd(i))}else throw Adb(a)}}for(r=P2d(b.Gh());r.Ob();){p=k3d(r);if(ZD(p,519)){f=RD(p,598);t=f.d;if((u==null?t==null:lhb(u,t))&&e--==0){return f}}}return null}}l=c.lastIndexOf('.');o=l==-1?c:(AFb(0,l,c.length),c.substr(0,l));d=0;if(l!=-1){try{d=Oeb((BFb(l+1,c.length+1),c.substr(l+1)),qwe,lve)}catch(a){a=zdb(a);if(ZD(a,130)){o=c}else throw Adb(a)}}o=lhb('%',o)?null:oSd(o);for(q=P2d(b.Gh());q.Ob();){p=k3d(q);if(ZD(p,197)){g=RD(p,197);s=g.xe();if((o==null?s==null:lhb(o,s))&&d--==0){return g}}}return null}}return Pvd(b,c)} +function Hlc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;k=new Tsb;i=new Tp;for(d=new Anb(a.a.a.b);d.a<d.c.c.length;){b=RD(ynb(d),60);j=Zjc(b);if(j){rtb(k.f,j,b)}else{s=$jc(b);if(s){for(f=new Anb(s.k);f.a<f.c.c.length;){e=RD(ynb(f),18);Rc(i,e,b)}}}}for(c=new Anb(a.a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),60);j=Zjc(b);if(j){for(h=new is(Mr(a3b(j).a.Kc(),new ir));gs(h);){g=RD(hs(h),18);if(W0b(g)){continue}o=g.c;r=g.d;if((qpd(),hpd).Hc(g.c.j)&&hpd.Hc(g.d.j)){continue}p=RD(Wjb(k,g.d.i),60);rIb(uIb(tIb(vIb(sIb(new wIb,0),100),a.c[b.a.d]),a.c[p.a.d]));if(o.j==ppd&&q4b((J3b(),G3b,o))){for(m=RD(Qc(i,g),21).Kc();m.Ob();){l=RD(m.Pb(),60);if(l.d.c<b.d.c){n=a.c[l.a.d];q=a.c[b.a.d];if(n==q){continue}rIb(uIb(tIb(vIb(sIb(new wIb,1),100),n),q))}}}if(r.j==Xod&&v4b((J3b(),E3b,r))){for(m=RD(Qc(i,g),21).Kc();m.Ob();){l=RD(m.Pb(),60);if(l.d.c>b.d.c){n=a.c[b.a.d];q=a.c[l.a.d];if(n==q){continue}rIb(uIb(tIb(vIb(sIb(new wIb,1),100),n),q))}}}}}}} +function mNb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;m=RD(RD(Qc(a.r,b),21),87);if(b==(qpd(),Xod)||b==ppd){qNb(a,b);return}f=b==Yod?(mOb(),iOb):(mOb(),lOb);u=b==Yod?(vLb(),uLb):(vLb(),sLb);c=RD(Vrb(a.b,b),127);d=c.i;e=d.c+Hid(cD(WC(iE,1),vxe,28,15,[c.n.b,a.C.b,a.k]));r=d.c+d.b-Hid(cD(WC(iE,1),vxe,28,15,[c.n.c,a.C.c,a.k]));g=WNb(_Nb(f),a.t);s=b==Yod?pxe:oxe;for(l=m.Kc();l.Ob();){j=RD(l.Pb(),117);if(!j.c||j.c.d.c.length<=0){continue}q=j.b.Mf();p=j.e;n=j.c;o=n.i;o.b=(i=n.n,n.e.a+i.b+i.c);o.a=(h=n.n,n.e.b+h.d+h.a);Ivb(u,Pye);n.f=u;RKb(n,(EKb(),DKb));o.c=p.a-(o.b-q.a)/2;v=$wnd.Math.min(e,p.a);w=$wnd.Math.max(r,p.a+q.a);o.c<v?(o.c=v):o.c+o.b>w&&(o.c=w-o.b);Rmb(g.d,new sOb(o,UNb(g,o)));s=b==Yod?$wnd.Math.max(s,p.b+j.b.Mf().b):$wnd.Math.min(s,p.b)}s+=b==Yod?a.t:-a.t;t=VNb((g.e=s,g));t>0&&(RD(Vrb(a.b,b),127).a.b=t);for(k=m.Kc();k.Ob();){j=RD(k.Pb(),117);if(!j.c||j.c.d.c.length<=0){continue}o=j.c.i;o.c-=j.e.a;o.d-=j.e.b}} +function JSb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;b=new Tsb;for(i=new dMd(a);i.e!=i.i.gc();){h=RD(bMd(i),27);c=new _sb;Zjb(FSb,h,c);n=new TSb;e=RD(zDb(new SDb(null,new Twb(new is(Mr(yGd(h).a.Kc(),new ir)))),OBb(n,tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)])))),85);ISb(c,RD(e.xc((Geb(),true)),16),new VSb);d=RD(zDb(CDb(RD(e.xc(false),15).Lc(),new XSb),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),15);for(g=d.Kc();g.Ob();){f=RD(g.Pb(),74);m=KGd(f);if(m){j=RD(Wd(qtb(b.f,m)),21);if(!j){j=LSb(m);rtb(b.f,m,j)}ye(c,j)}}e=RD(zDb(new SDb(null,new Twb(new is(Mr(zGd(h).a.Kc(),new ir)))),OBb(n,tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb])))),85);ISb(c,RD(e.xc(true),16),new ZSb);d=RD(zDb(CDb(RD(e.xc(false),15).Lc(),new _Sb),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),15);for(l=d.Kc();l.Ob();){k=RD(l.Pb(),74);m=MGd(k);if(m){j=RD(Wd(qtb(b.f,m)),21);if(!j){j=LSb(m);rtb(b.f,m,j)}ye(c,j)}}}} +function zjb(a,b){xjb();var c,d,e,f,g,h,i,j,k,l,m,n,o,p;i=Ddb(a,0)<0;i&&(a=Odb(a));if(Ddb(a,0)==0){switch(b){case 0:return '0';case 1:return zxe;case 2:return '0.00';case 3:return '0.000';case 4:return '0.0000';case 5:return '0.00000';case 6:return '0.000000';default:n=new bib;b<0?(n.a+='0E+',n):(n.a+='0E',n);n.a+=b==qwe?'2147483648':''+-b;return n.a;}}k=18;l=$C(hE,zwe,28,k+1,15,1);c=k;p=a;do{j=p;p=Fdb(p,10);l[--c]=Ydb(Bdb(48,Vdb(j,Ndb(p,10))))&Bwe}while(Ddb(p,0)!=0);e=Vdb(Vdb(Vdb(k,c),b),1);if(b==0){i&&(l[--c]=45);return Ihb(l,c,k-c)}if(b>0&&Ddb(e,-6)>=0){if(Ddb(e,0)>=0){f=c+Ydb(e);for(h=k-1;h>=f;h--){l[h+1]=l[h]}l[++f]=46;i&&(l[--c]=45);return Ihb(l,c,k-c+1)}for(g=2;Ldb(g,Bdb(Odb(e),1));g++){l[--c]=48}l[--c]=46;l[--c]=48;i&&(l[--c]=45);return Ihb(l,c,k-c)}o=c+1;d=k;m=new cib;i&&(m.a+='-',m);if(d-o>=1){Thb(m,l[c]);m.a+='.';m.a+=Ihb(l,c+1,k-c-1)}else{m.a+=Ihb(l,c,k-c)}m.a+='E';Ddb(e,0)>0&&(m.a+='+',m);m.a+=''+Zdb(e);return m.a} +function Esd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;q=new rjd(a.g,a.f);p=vsd(a);p.a=$wnd.Math.max(p.a,b);p.b=$wnd.Math.max(p.b,c);w=p.a/q.a;k=p.b/q.b;u=p.a-q.a;i=p.b-q.b;if(d){g=!vCd(a)?RD(Gxd(a,(umd(),Nkd)),88):RD(Gxd(vCd(a),(umd(),Nkd)),88);h=dE(Gxd(a,(umd(),Hld)))===dE((Bod(),wod));for(s=new dMd((!a.c&&(a.c=new C5d(K4,a,9,9)),a.c));s.e!=s.i.gc();){r=RD(bMd(s),123);t=RD(Gxd(r,Old),64);if(t==(qpd(),opd)){t=osd(r,g);Ixd(r,Old,t)}switch(t.g){case 1:h||Dyd(r,r.i*w);break;case 2:Dyd(r,r.i+u);h||Eyd(r,r.j*k);break;case 3:h||Dyd(r,r.i*w);Eyd(r,r.j+i);break;case 4:h||Eyd(r,r.j*k);}}}zyd(a,p.a,p.b);if(e){for(m=new dMd((!a.n&&(a.n=new C5d(I4,a,1,7)),a.n));m.e!=m.i.gc();){l=RD(bMd(m),135);n=l.i+l.g/2;o=l.j+l.f/2;v=n/q.a;j=o/q.b;if(v+j>=1){if(v-j>0&&o>=0){Dyd(l,l.i+u);Eyd(l,l.j+i*j)}else if(v-j<0&&n>=0){Dyd(l,l.i+u*v);Eyd(l,l.j+i)}}}}Ixd(a,(umd(),kld),(Qpd(),f=RD(mfb(H3),9),new Fsb(f,RD(WEb(f,f.length),9),0)));return new rjd(w,k)} +function _4c(a){Cgd(a,new Pfd(Wfd($fd(Xfd(Zfd(Yfd(new agd,CFe),'ELK Radial'),'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'),new c5c),CFe)));Agd(a,CFe,fEe,iGd(R4c));Agd(a,CFe,_ze,iGd(Y4c));Agd(a,CFe,jAe,iGd(K4c));Agd(a,CFe,CAe,iGd(L4c));Agd(a,CFe,iAe,iGd(M4c));Agd(a,CFe,kAe,iGd(J4c));Agd(a,CFe,gAe,iGd(N4c));Agd(a,CFe,lAe,iGd(Q4c));Agd(a,CFe,tFe,iGd(H4c));Agd(a,CFe,sFe,iGd(I4c));Agd(a,CFe,rFe,iGd(T4c));Agd(a,CFe,xFe,iGd(W4c));Agd(a,CFe,yFe,iGd(U4c));Agd(a,CFe,zFe,iGd(V4c));Agd(a,CFe,wFe,iGd(O4c));Agd(a,CFe,pFe,iGd(P4c));Agd(a,CFe,qFe,iGd(S4c));Agd(a,CFe,uFe,iGd(X4c));Agd(a,CFe,vFe,iGd(Z4c));Agd(a,CFe,oFe,iGd(G4c))} +function Peb(a){var b,c,d,e,f,g,h,i,j,k,l;if(a==null){throw Adb(new Vgb(vve))}j=a;f=a.length;i=false;if(f>0){b=(BFb(0,a.length),a.charCodeAt(0));if(b==45||b==43){a=(BFb(1,a.length+1),a.substr(1));--f;i=b==45}}if(f==0){throw Adb(new Vgb(nxe+j+'"'))}while(a.length>0&&(BFb(0,a.length),a.charCodeAt(0)==48)){a=(BFb(1,a.length+1),a.substr(1));--f}if(f>(Ugb(),Sgb)[10]){throw Adb(new Vgb(nxe+j+'"'))}for(e=0;e<f;e++){if(dfb((BFb(e,a.length),a.charCodeAt(e)))==-1){throw Adb(new Vgb(nxe+j+'"'))}}l=0;g=Qgb[10];k=Rgb[10];h=Odb(Tgb[10]);c=true;d=f%g;if(d>0){l=-parseInt((AFb(0,d,a.length),a.substr(0,d)),10);a=(BFb(d,a.length+1),a.substr(d));f-=d;c=false}while(f>=g){d=parseInt((AFb(0,g,a.length),a.substr(0,g)),10);a=(BFb(g,a.length+1),a.substr(g));f-=g;if(c){c=false}else{if(Ddb(l,h)<0){throw Adb(new Vgb(nxe+j+'"'))}l=Ndb(l,k)}l=Vdb(l,d)}if(Ddb(l,0)>0){throw Adb(new Vgb(nxe+j+'"'))}if(!i){l=Odb(l);if(Ddb(l,0)<0){throw Adb(new Vgb(nxe+j+'"'))}}return l} +function oSd(a){gSd();var b,c,d,e,f,g,h,i;if(a==null)return null;e=qhb(a,Fhb(37));if(e<0){return a}else{i=new dib((AFb(0,e,a.length),a.substr(0,e)));b=$C(gE,YHe,28,4,15,1);h=0;d=0;for(g=a.length;e<g;e++){BFb(e,a.length);if(a.charCodeAt(e)==37&&a.length>e+2&&zSd((BFb(e+1,a.length),a.charCodeAt(e+1)),XRd,YRd)&&zSd((BFb(e+2,a.length),a.charCodeAt(e+2)),XRd,YRd)){c=DSd((BFb(e+1,a.length),a.charCodeAt(e+1)),(BFb(e+2,a.length),a.charCodeAt(e+2)));e+=2;if(d>0){(c&192)==128?(b[h++]=c<<24>>24):(d=0)}else if(c>=128){if((c&224)==192){b[h++]=c<<24>>24;d=2}else if((c&240)==224){b[h++]=c<<24>>24;d=3}else if((c&248)==240){b[h++]=c<<24>>24;d=4}}if(d>0){if(h==d){switch(h){case 2:{Thb(i,((b[0]&31)<<6|b[1]&63)&Bwe);break}case 3:{Thb(i,((b[0]&15)<<12|(b[1]&63)<<6|b[2]&63)&Bwe);break}}h=0;d=0}}else{for(f=0;f<h;++f){Thb(i,b[f]&Bwe)}h=0;i.a+=String.fromCharCode(c)}}else{for(f=0;f<h;++f){Thb(i,b[f]&Bwe)}h=0;Thb(i,(BFb(e,a.length),a.charCodeAt(e)))}}return i.a}} +function atd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;n=vCd(AGd(RD(QHd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),0),84)));o=vCd(AGd(RD(QHd((!a.c&&(a.c=new Yie(E4,a,5,8)),a.c),0),84)));l=n==o;h=new pjd;b=RD(Gxd(a,(vnd(),ond)),75);if(!!b&&b.b>=2){if((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i==0){c=(bvd(),e=new Rzd,e);WGd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a),c)}else if((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i>1){m=new mMd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a));while(m.e!=m.i.gc()){cMd(m)}}lsd(b,RD(QHd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a),0),166))}if(l){for(d=new dMd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a));d.e!=d.i.gc();){c=RD(bMd(d),166);for(j=new dMd((!c.a&&(c.a=new XZd(D4,c,5)),c.a));j.e!=j.i.gc();){i=RD(bMd(j),377);h.a=$wnd.Math.max(h.a,i.a);h.b=$wnd.Math.max(h.b,i.b)}}}for(g=new dMd((!a.n&&(a.n=new C5d(I4,a,1,7)),a.n));g.e!=g.i.gc();){f=RD(bMd(g),135);k=RD(Gxd(f,und),8);!!k&&Byd(f,k.a,k.b);if(l){h.a=$wnd.Math.max(h.a,f.i+f.g);h.b=$wnd.Math.max(h.b,f.j+f.f)}}return h} +function MA(a,b,c,d,e){var f,g,h;KA(a,b);g=b[0];f=ihb(c.c,0);h=-1;if(DA(c)){if(d>0){if(g+d>a.length){return false}h=HA((AFb(0,g+d,a.length),a.substr(0,g+d)),b)}else{h=HA(a,b)}}switch(f){case 71:h=EA(a,g,cD(WC(qJ,1),Nve,2,6,[Qwe,Rwe]),b);e.e=h;return true;case 77:return PA(a,b,e,h,g);case 76:return RA(a,b,e,h,g);case 69:return NA(a,b,g,e);case 99:return QA(a,b,g,e);case 97:h=EA(a,g,cD(WC(qJ,1),Nve,2,6,['AM','PM']),b);e.b=h;return true;case 121:return TA(a,b,g,h,c,e);case 100:if(h<=0){return false}e.c=h;return true;case 83:if(h<0){return false}return OA(h,g,b[0],e);case 104:h==12&&(h=0);case 75:case 72:if(h<0){return false}e.f=h;e.g=false;return true;case 107:if(h<0){return false}e.f=h;e.g=true;return true;case 109:if(h<0){return false}e.j=h;return true;case 115:if(h<0){return false}e.n=h;return true;case 90:if(g<a.length&&(BFb(g,a.length),a.charCodeAt(g)==90)){++b[0];e.o=0;return true}case 122:case 118:return SA(a,g,b,e);default:return false;}} +function YQc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;t=b.c.length;e=new sQc(a.a,c,null,null);B=$C(iE,vxe,28,t,15,1);p=$C(iE,vxe,28,t,15,1);o=$C(iE,vxe,28,t,15,1);q=0;for(h=0;h<t;h++){p[h]=lve;o[h]=qwe}for(i=0;i<t;i++){d=(tFb(i,b.c.length),RD(b.c[i],185));B[i]=qQc(d);B[q]>B[i]&&(q=i);for(l=new Anb(a.a.b);l.a<l.c.c.length;){k=RD(ynb(l),30);for(s=new Anb(k.a);s.a<s.c.c.length;){r=RD(ynb(s),10);w=Kfb(d.p[r.p])+Kfb(d.d[r.p]);p[i]=$wnd.Math.min(p[i],w);o[i]=$wnd.Math.max(o[i],w+r.o.b)}}}A=$C(iE,vxe,28,t,15,1);for(j=0;j<t;j++){(tFb(j,b.c.length),RD(b.c[j],185)).o==(EQc(),CQc)?(A[j]=p[q]-p[j]):(A[j]=o[q]-o[j])}f=$C(iE,vxe,28,t,15,1);for(n=new Anb(a.a.b);n.a<n.c.c.length;){m=RD(ynb(n),30);for(v=new Anb(m.a);v.a<v.c.c.length;){u=RD(ynb(v),10);for(g=0;g<t;g++){f[g]=Kfb((tFb(g,b.c.length),RD(b.c[g],185)).p[u.p])+Kfb((tFb(g,b.c.length),RD(b.c[g],185)).d[u.p])+A[g]}bFb(f,heb(iob.prototype.Me,iob,[]));e.p[u.p]=(f[1]+f[2])/2;e.d[u.p]=0}}return e} +function X6b(a,b,c){var d,e,f,g,h;d=b.i;f=a.i.o;e=a.i.d;h=a.n;g=xjd(cD(WC(l3,1),Nve,8,0,[h,a.a]));switch(a.j.g){case 1:SKb(b,(vLb(),sLb));d.d=-e.d-c-d.a;if(RD(RD(Vmb(b.d,0),187).of((Ywc(),swc)),291)==(Pnd(),Lnd)){RKb(b,(EKb(),DKb));d.c=g.a-Kfb(UD(mQb(a,ywc)))-c-d.b}else{RKb(b,(EKb(),CKb));d.c=g.a+Kfb(UD(mQb(a,ywc)))+c}break;case 2:RKb(b,(EKb(),CKb));d.c=f.a+e.c+c;if(RD(RD(Vmb(b.d,0),187).of((Ywc(),swc)),291)==(Pnd(),Lnd)){SKb(b,(vLb(),sLb));d.d=g.b-Kfb(UD(mQb(a,ywc)))-c-d.a}else{SKb(b,(vLb(),uLb));d.d=g.b+Kfb(UD(mQb(a,ywc)))+c}break;case 3:SKb(b,(vLb(),uLb));d.d=f.b+e.a+c;if(RD(RD(Vmb(b.d,0),187).of((Ywc(),swc)),291)==(Pnd(),Lnd)){RKb(b,(EKb(),DKb));d.c=g.a-Kfb(UD(mQb(a,ywc)))-c-d.b}else{RKb(b,(EKb(),CKb));d.c=g.a+Kfb(UD(mQb(a,ywc)))+c}break;case 4:RKb(b,(EKb(),DKb));d.c=-e.b-c-d.b;if(RD(RD(Vmb(b.d,0),187).of((Ywc(),swc)),291)==(Pnd(),Lnd)){SKb(b,(vLb(),sLb));d.d=g.b-Kfb(UD(mQb(a,ywc)))-c-d.a}else{SKb(b,(vLb(),uLb));d.d=g.b+Kfb(UD(mQb(a,ywc)))+c}}} +function Q8c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;c.Ug(AFe,1);!b.a&&(b.a=new C5d(J4,b,10,11));d=Kfb(UD(Gxd(b,(X7c(),x7c))));k=Kfb(UD(Gxd(b,Q7c)));m=RD(Gxd(b,N7c),107);n=new m9c(d,k);f=l9c(n,b,m);P8c(b,n);h=RD(Gxd(b,K7c),17).a;while(h>1){e=N8c(b);l=f.g;o=RD(Gxd(b,N7c),107);p=Kfb(UD(Gxd(b,x7c)));(!b.a&&(b.a=new C5d(J4,b,10,11)),b.a).i>1&&Kfb(UD(Gxd(b,(X6c(),T6c))))!=oxe&&(f.c+(o.b+o.c))/(f.b+(o.d+o.a))<p?Ixd(e,(X6c(),W6c),Kfb(UD(Gxd(b,W6c)))+Kfb(UD(Gxd(b,T6c)))):(!b.a&&(b.a=new C5d(J4,b,10,11)),b.a).i>1&&Kfb(UD(Gxd(b,(X6c(),S6c))))!=oxe&&(f.c+(o.b+o.c))/(f.b+(o.d+o.a))>p&&Ixd(e,(X6c(),W6c),$wnd.Math.max(Kfb(UD(Gxd(b,U6c))),Kfb(UD(Gxd(e,W6c)))-Kfb(UD(Gxd(b,S6c)))));n=new m9c(d,k);i=l9c(n,e,m);j=i.g;if(j>=l&&j==j){for(g=0;g<(!e.a&&(e.a=new C5d(J4,e,10,11)),e.a).i;g++){O8c(a,RD(QHd((!e.a&&(e.a=new C5d(J4,e,10,11)),e.a),g),27),RD(QHd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a),g),27))}P8c(b,n);jad(f,i.c);iad(f,i.b)}--h}Ixd(b,(X6c(),N6c),f.b);Ixd(b,O6c,f.c);c.Vg()} +function fHc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;b.Ug('Interactive node layering',1);c=new bnb;for(m=new Anb(a.a);m.a<m.c.c.length;){k=RD(ynb(m),10);i=k.n.a;h=i+k.o.a;h=$wnd.Math.max(i+1,h);s=new Jkb(c,0);d=null;while(s.b<s.d.gc()){q=(sFb(s.b<s.d.gc()),RD(s.d.Xb(s.c=s.b++),578));if(q.c>=h){sFb(s.b>0);s.a.Xb(s.c=--s.b);break}else if(q.a>i){if(!d){Rmb(q.b,k);q.c=$wnd.Math.min(q.c,i);q.a=$wnd.Math.max(q.a,h);d=q}else{Tmb(d.b,q.b);d.a=$wnd.Math.max(d.a,q.a);Ckb(s)}}}if(!d){d=new jHc;d.c=i;d.a=h;Ikb(s,d);Rmb(d.b,k)}}g=a.b;j=0;for(r=new Anb(c);r.a<r.c.c.length;){q=RD(ynb(r),578);e=new R4b(a);e.p=j++;ZEb(g.c,e);for(n=new Anb(q.b);n.a<n.c.c.length;){k=RD(ynb(n),10);g3b(k,e);k.p=0}}for(l=new Anb(a.a);l.a<l.c.c.length;){k=RD(ynb(l),10);if(k.p==0){p=eHc(k,a);while(p.a.gc()!=0){o=RD(p.a.ec().Kc().Pb(),10);p.a.Bc(o)!=null;ye(p,eHc(o,a))}}}f=new Jkb(g,0);while(f.b<f.d.gc()){(sFb(f.b<f.d.gc()),RD(f.d.Xb(f.c=f.b++),30)).a.c.length==0&&Ckb(f)}a.a.c.length=0;b.Vg()} +function grd(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I;n=0;D=0;for(i=new Anb(a);i.a<i.c.c.length;){h=RD(ynb(i),27);Dsd(h);n=$wnd.Math.max(n,h.g);D+=h.g*h.f}o=D/a.c.length;C=ard(a,o);D+=a.c.length*C;n=$wnd.Math.max(n,$wnd.Math.sqrt(D*g))+c.b;H=c.b;I=c.d;m=0;k=c.b+c.c;B=new Yub;Mub(B,sgb(0));w=new Yub;j=new Jkb(a,0);while(j.b<j.d.gc()){h=(sFb(j.b<j.d.gc()),RD(j.d.Xb(j.c=j.b++),27));G=h.g;l=h.f;if(H+G>n){if(f){Oub(w,m);Oub(B,sgb(j.b-1))}H=c.b;I+=m+b;m=0;k=$wnd.Math.max(k,c.b+c.c+G)}Dyd(h,H);Eyd(h,I);k=$wnd.Math.max(k,H+G+c.c);m=$wnd.Math.max(m,l);H+=G+b}k=$wnd.Math.max(k,d);F=I+m+c.a;if(F<e){m+=e-F;F=e}if(f){H=c.b;j=new Jkb(a,0);Oub(B,sgb(a.c.length));A=Sub(B,0);r=RD(evb(A),17).a;Oub(w,m);v=Sub(w,0);u=0;while(j.b<j.d.gc()){if(j.b==r){H=c.b;u=Kfb(UD(evb(v)));r=RD(evb(A),17).a}h=(sFb(j.b<j.d.gc()),RD(j.d.Xb(j.c=j.b++),27));s=h.f;Ayd(h,u);p=u;if(j.b==r){q=k-H-c.c;t=h.g;Cyd(h,q);Jsd(h,new rjd(q,p),new rjd(t,s))}H+=h.g+b}}return new rjd(k,F)} +function h0b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C;b.Ug('Compound graph postprocessor',1);c=Heb(TD(mQb(a,(yCc(),mCc))));h=RD(mQb(a,(Ywc(),_vc)),229);k=new _sb;for(r=h.ec().Kc();r.Ob();){q=RD(r.Pb(),18);g=new dnb(h.cc(q));yob();_mb(g,new M0b(a));v=H0b((tFb(0,g.c.length),RD(g.c[0],249)));A=I0b(RD(Vmb(g,g.c.length-1),249));t=v.i;n2b(A.i,t)?(s=t.e):(s=Y2b(t));l=i0b(q,g);Xub(q.a);m=null;for(f=new Anb(g);f.a<f.c.c.length;){e=RD(ynb(f),249);p=new pjd;e2b(p,e.a,s);n=e.b;d=new Ejd;Ajd(d,0,n.a);Cjd(d,p);u=new sjd(K3b(n.c));w=new sjd(K3b(n.d));$id(u,p);$id(w,p);if(m){d.b==0?(o=w):(o=(sFb(d.b!=0),RD(d.a.a.c,8)));B=$wnd.Math.abs(m.a-o.a)>Vze;C=$wnd.Math.abs(m.b-o.b)>Vze;(!c&&B&&C||c&&(B||C))&&Mub(q.a,u)}ye(q.a,d);d.b==0?(m=u):(m=(sFb(d.b!=0),RD(d.c.b.c,8)));j0b(n,l,p);if(I0b(e)==A){if(Y2b(A.i)!=e.a){p=new pjd;e2b(p,Y2b(A.i),s)}pQb(q,Wwc,p)}k0b(n,q,s);k.a.zc(n,k)}Y0b(q,v);Z0b(q,A)}for(j=k.a.ec().Kc();j.Ob();){i=RD(j.Pb(),18);Y0b(i,null);Z0b(i,null)}b.Vg()} +function lXc(a,b){var c,d,e,f,g,h,i,j,k,l,m;e=RD(mQb(a,(h_c(),H$c)),88);k=e==(Cmd(),ymd)||e==zmd?xmd:zmd;c=RD(zDb(CDb(new SDb(null,new Swb(a.b,16)),new $Xc),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);i=RD(zDb(GDb(c.Oc(),new aYc(b)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),15);i.Gc(RD(zDb(GDb(c.Oc(),new cYc(b)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),16));i.jd(new eYc(k));m=new yAb(new iYc(e));d=new Tsb;for(h=i.Kc();h.Ob();){g=RD(h.Pb(),240);j=RD(g.a,40);if(Heb(TD(g.c))){m.a.zc(j,(Geb(),Eeb))==null;(new zAb(m.a.Zc(j,false))).a.gc()>0&&Zjb(d,j,RD((new zAb(m.a.Zc(j,false))).a.Vc(),40));(new zAb(m.a.ad(j,true))).a.gc()>1&&Zjb(d,nXc(m,j),j)}else{if((new zAb(m.a.Zc(j,false))).a.gc()>0){f=RD((new zAb(m.a.Zc(j,false))).a.Vc(),40);dE(f)===dE(Wd(qtb(d.f,j)))&&RD(mQb(j,(q$c(),TZc)),15).Fc(f)}if((new zAb(m.a.ad(j,true))).a.gc()>1){l=nXc(m,j);dE(Wd(qtb(d.f,l)))===dE(j)&&RD(mQb(l,(q$c(),TZc)),15).Fc(j)}m.a.Bc(j)!=null}}} +function BTb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;if(a.gc()==1){return RD(a.Xb(0),235)}else if(a.gc()<=0){return new gUb}for(e=a.Kc();e.Ob();){c=RD(e.Pb(),235);o=0;k=lve;l=lve;i=qwe;j=qwe;for(n=new Anb(c.e);n.a<n.c.c.length;){m=RD(ynb(n),153);o+=RD(mQb(m,(yVb(),lVb)),17).a;k=$wnd.Math.min(k,m.d.a-m.e.a/2);l=$wnd.Math.min(l,m.d.b-m.e.b/2);i=$wnd.Math.max(i,m.d.a+m.e.a/2);j=$wnd.Math.max(j,m.d.b+m.e.b/2)}pQb(c,(yVb(),lVb),sgb(o));pQb(c,(JVb(),GVb),new rjd(k,l));pQb(c,FVb,new rjd(i,j))}yob();a.jd(new FTb);p=new gUb;kQb(p,RD(a.Xb(0),96));h=0;s=0;for(f=a.Kc();f.Ob();){c=RD(f.Pb(),235);q=ojd(ajd(RD(mQb(c,(JVb(),FVb)),8)),RD(mQb(c,GVb),8));h=$wnd.Math.max(h,q.a);s+=q.a*q.b}h=$wnd.Math.max(h,$wnd.Math.sqrt(s)*Kfb(UD(mQb(p,(yVb(),ZUb)))));r=Kfb(UD(mQb(p,rVb)));t=0;u=0;g=0;b=r;for(d=a.Kc();d.Ob();){c=RD(d.Pb(),235);q=ojd(ajd(RD(mQb(c,(JVb(),FVb)),8)),RD(mQb(c,GVb),8));if(t+q.a>h){t=0;u+=g+r;g=0}ATb(p,c,t,u);b=$wnd.Math.max(b,t+q.a);g=$wnd.Math.max(g,q.b);t+=q.a+r}return p} +function Aqe(a){zqe();var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(a==null)return null;f=Ahb(a);o=Dqe(f);if(o%4!=0){return null}p=o/4|0;if(p==0)return $C(gE,YHe,28,0,15,1);l=null;b=0;c=0;d=0;e=0;g=0;h=0;i=0;j=0;n=0;m=0;k=0;l=$C(gE,YHe,28,p*3,15,1);for(;n<p-1;n++){if(!Cqe(g=f[k++])||!Cqe(h=f[k++])||!Cqe(i=f[k++])||!Cqe(j=f[k++]))return null;b=xqe[g];c=xqe[h];d=xqe[i];e=xqe[j];l[m++]=(b<<2|c>>4)<<24>>24;l[m++]=((c&15)<<4|d>>2&15)<<24>>24;l[m++]=(d<<6|e)<<24>>24}if(!Cqe(g=f[k++])||!Cqe(h=f[k++])){return null}b=xqe[g];c=xqe[h];i=f[k++];j=f[k++];if(xqe[i]==-1||xqe[j]==-1){if(i==61&&j==61){if((c&15)!=0)return null;q=$C(gE,YHe,28,n*3+1,15,1);hib(l,0,q,0,n*3);q[m]=(b<<2|c>>4)<<24>>24;return q}else if(i!=61&&j==61){d=xqe[i];if((d&3)!=0)return null;q=$C(gE,YHe,28,n*3+2,15,1);hib(l,0,q,0,n*3);q[m++]=(b<<2|c>>4)<<24>>24;q[m]=((c&15)<<4|d>>2&15)<<24>>24;return q}else{return null}}else{d=xqe[i];e=xqe[j];l[m++]=(b<<2|c>>4)<<24>>24;l[m++]=((c&15)<<4|d>>2&15)<<24>>24;l[m++]=(d<<6|e)<<24>>24}return l} +function wfc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;b.Ug(qBe,1);o=RD(mQb(a,(yCc(),yAc)),223);for(e=new Anb(a.b);e.a<e.c.c.length;){d=RD(ynb(e),30);j=t2b(d.a);for(g=j,h=0,i=g.length;h<i;++h){f=g[h];if(f.k!=(r3b(),q3b)){continue}if(o==(Ymd(),Wmd)){for(l=new Anb(f.j);l.a<l.c.c.length;){k=RD(ynb(l),12);k.e.c.length==0||zfc(k);k.g.c.length==0||Afc(k)}}else if(ZD(mQb(f,(Ywc(),Awc)),18)){q=RD(mQb(f,Awc),18);r=RD(e3b(f,(qpd(),ppd)).Kc().Pb(),12);s=RD(e3b(f,Xod).Kc().Pb(),12);t=RD(mQb(r,Awc),12);u=RD(mQb(s,Awc),12);Y0b(q,u);Z0b(q,t);v=new sjd(s.i.n);v.a=xjd(cD(WC(l3,1),Nve,8,0,[u.i.n,u.n,u.a])).a;Mub(q.a,v);v=new sjd(r.i.n);v.a=xjd(cD(WC(l3,1),Nve,8,0,[t.i.n,t.n,t.a])).a;Mub(q.a,v)}else{if(f.j.c.length>=2){p=true;m=new Anb(f.j);c=RD(ynb(m),12);n=null;while(m.a<m.c.c.length){n=c;c=RD(ynb(m),12);if(!pb(mQb(n,Awc),mQb(c,Awc))){p=false;break}}}else{p=false}for(l=new Anb(f.j);l.a<l.c.c.length;){k=RD(ynb(l),12);k.e.c.length==0||xfc(k,p);k.g.c.length==0||yfc(k,p)}}g3b(f,null)}}b.Vg()} +function LQc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;for(h=new Anb(a.a.b);h.a<h.c.c.length;){f=RD(ynb(h),30);for(t=new Anb(f.a);t.a<t.c.c.length;){s=RD(ynb(t),10);b.g[s.p]=s;b.a[s.p]=s;b.d[s.p]=0}}i=a.a.b;b.c==(wQc(),uQc)&&(i=hv(i));for(g=i.Kc();g.Ob();){f=RD(g.Pb(),30);n=-1;m=f.a;if(b.o==(EQc(),DQc)){n=lve;m=hv(m)}for(v=m.Kc();v.Ob();){u=RD(v.Pb(),10);l=null;b.c==uQc?(l=RD(Vmb(a.b.f,u.p),15)):(l=RD(Vmb(a.b.b,u.p),15));if(l.gc()>0){d=l.gc();j=eE($wnd.Math.floor((d+1)/2))-1;e=eE($wnd.Math.ceil((d+1)/2))-1;if(b.o==DQc){for(k=e;k>=j;k--){if(b.a[u.p]==u){p=RD(l.Xb(k),42);o=RD(p.a,10);if(!Zsb(c,p.b)&&n>a.b.e[o.p]){b.a[o.p]=u;b.g[u.p]=b.g[o.p];b.a[u.p]=b.g[u.p];b.f[b.g[u.p].p]=(Geb(),Heb(b.f[b.g[u.p].p])&u.k==(r3b(),o3b)?true:false);n=a.b.e[o.p]}}}}else{for(k=j;k<=e;k++){if(b.a[u.p]==u){r=RD(l.Xb(k),42);q=RD(r.a,10);if(!Zsb(c,r.b)&&n<a.b.e[q.p]){b.a[q.p]=u;b.g[u.p]=b.g[q.p];b.a[u.p]=b.g[u.p];b.f[b.g[u.p].p]=(Geb(),Heb(b.f[b.g[u.p].p])&u.k==(r3b(),o3b)?true:false);n=a.b.e[q.p]}}}}}}}} +function iOc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;t=a.c[(tFb(0,b.c.length),RD(b.c[0],18)).p];A=a.c[(tFb(1,b.c.length),RD(b.c[1],18)).p];if(t.a.e.e-t.a.a-(t.b.e.e-t.b.a)==0&&A.a.e.e-A.a.a-(A.b.e.e-A.b.a)==0){return false}r=t.b.e.f;if(!ZD(r,10)){return false}q=RD(r,10);v=a.i[q.p];w=!q.c?-1:Wmb(q.c.a,q,0);f=oxe;if(w>0){e=RD(Vmb(q.c.a,w-1),10);g=a.i[e.p];B=$wnd.Math.ceil(bFc(a.n,e,q));f=v.a.e-q.d.d-(g.a.e+e.o.b+e.d.a)-B}j=oxe;if(w<q.c.a.c.length-1){i=RD(Vmb(q.c.a,w+1),10);k=a.i[i.p];B=$wnd.Math.ceil(bFc(a.n,i,q));j=k.a.e-i.d.d-(v.a.e+q.o.b+q.d.a)-B}if(c&&(Zy(),bz(vEe),$wnd.Math.abs(f-j)<=vEe||f==j||isNaN(f)&&isNaN(j))){return true}d=GOc(t.a);h=-GOc(t.b);l=-GOc(A.a);s=GOc(A.b);p=t.a.e.e-t.a.a-(t.b.e.e-t.b.a)>0&&A.a.e.e-A.a.a-(A.b.e.e-A.b.a)<0;o=t.a.e.e-t.a.a-(t.b.e.e-t.b.a)<0&&A.a.e.e-A.a.a-(A.b.e.e-A.b.a)>0;n=t.a.e.e+t.b.a<A.b.e.e+A.a.a;m=t.a.e.e+t.b.a>A.b.e.e+A.a.a;u=0;!p&&!o&&(m?f+l>0?(u=l):j-d>0&&(u=d):n&&(f+h>0?(u=h):j-s>0&&(u=s)));v.a.e+=u;v.b&&(v.d.e+=u);return false} +function OJb(a,b,c){var d,e,f,g,h,i,j,k,l,m;d=new Uid(b.Lf().a,b.Lf().b,b.Mf().a,b.Mf().b);e=new Tid;if(a.c){for(g=new Anb(b.Rf());g.a<g.c.c.length;){f=RD(ynb(g),187);e.c=f.Lf().a+b.Lf().a;e.d=f.Lf().b+b.Lf().b;e.b=f.Mf().a;e.a=f.Mf().b;Sid(d,e)}}for(j=new Anb(b.Xf());j.a<j.c.c.length;){i=RD(ynb(j),852);k=i.Lf().a+b.Lf().a;l=i.Lf().b+b.Lf().b;if(a.e){e.c=k;e.d=l;e.b=i.Mf().a;e.a=i.Mf().b;Sid(d,e)}if(a.d){for(g=new Anb(i.Rf());g.a<g.c.c.length;){f=RD(ynb(g),187);e.c=f.Lf().a+k;e.d=f.Lf().b+l;e.b=f.Mf().a;e.a=f.Mf().b;Sid(d,e)}}if(a.b){m=new rjd(-c,-c);if(RD(b.of((umd(),Lld)),181).Hc((Pod(),Nod))){for(g=new Anb(i.Rf());g.a<g.c.c.length;){f=RD(ynb(g),187);m.a+=f.Mf().a+c;m.b+=f.Mf().b+c}}m.a=$wnd.Math.max(m.a,0);m.b=$wnd.Math.max(m.b,0);MJb(d,i.Wf(),i.Uf(),b,i,m,c)}}a.b&&MJb(d,b.Wf(),b.Uf(),b,null,null,c);h=new S2b(b.Vf());h.d=$wnd.Math.max(0,b.Lf().b-d.d);h.a=$wnd.Math.max(0,d.d+d.a-(b.Lf().b+b.Mf().b));h.b=$wnd.Math.max(0,b.Lf().a-d.c);h.c=$wnd.Math.max(0,d.c+d.b-(b.Lf().a+b.Mf().a));b.Zf(h)} +function Mz(){var a=['\\u0000','\\u0001','\\u0002','\\u0003','\\u0004','\\u0005','\\u0006','\\u0007','\\b','\\t','\\n','\\u000B','\\f','\\r','\\u000E','\\u000F','\\u0010','\\u0011','\\u0012','\\u0013','\\u0014','\\u0015','\\u0016','\\u0017','\\u0018','\\u0019','\\u001A','\\u001B','\\u001C','\\u001D','\\u001E','\\u001F'];a[34]='\\"';a[92]='\\\\';a[173]='\\u00ad';a[1536]='\\u0600';a[1537]='\\u0601';a[1538]='\\u0602';a[1539]='\\u0603';a[1757]='\\u06dd';a[1807]='\\u070f';a[6068]='\\u17b4';a[6069]='\\u17b5';a[8203]='\\u200b';a[8204]='\\u200c';a[8205]='\\u200d';a[8206]='\\u200e';a[8207]='\\u200f';a[8232]='\\u2028';a[8233]='\\u2029';a[8234]='\\u202a';a[8235]='\\u202b';a[8236]='\\u202c';a[8237]='\\u202d';a[8238]='\\u202e';a[8288]='\\u2060';a[8289]='\\u2061';a[8290]='\\u2062';a[8291]='\\u2063';a[8292]='\\u2064';a[8298]='\\u206a';a[8299]='\\u206b';a[8300]='\\u206c';a[8301]='\\u206d';a[8302]='\\u206e';a[8303]='\\u206f';a[65279]='\\ufeff';a[65529]='\\ufff9';a[65530]='\\ufffa';a[65531]='\\ufffb';return a} +function zVb(a){Cgd(a,new Pfd(_fd(Wfd($fd(Xfd(Zfd(Yfd(new agd,Zze),'ELK Force'),'Force-based algorithm provided by the Eclipse Layout Kernel. Implements methods that follow physical analogies by simulating forces that move the nodes into a balanced distribution. Currently the original Eades model and the Fruchterman - Reingold model are supported.'),new CVb),Zze),ysb((aGd(),ZFd),cD(WC(T5,1),jwe,245,0,[XFd])))));Agd(a,Zze,$ze,sgb(1));Agd(a,Zze,_ze,80);Agd(a,Zze,aAe,5);Agd(a,Zze,Dze,Yze);Agd(a,Zze,bAe,sgb(1));Agd(a,Zze,cAe,(Geb(),true));Agd(a,Zze,Eze,iVb);Agd(a,Zze,dAe,iGd(_Ub));Agd(a,Zze,eAe,iGd(jVb));Agd(a,Zze,fAe,false);Agd(a,Zze,gAe,iGd(gVb));Agd(a,Zze,hAe,iGd(eVb));Agd(a,Zze,iAe,iGd(fVb));Agd(a,Zze,jAe,iGd(dVb));Agd(a,Zze,kAe,iGd(cVb));Agd(a,Zze,lAe,iGd(kVb));Agd(a,Zze,Rze,iGd(bVb));Agd(a,Zze,Uze,iGd(sVb));Agd(a,Zze,Sze,iGd(aVb));Agd(a,Zze,Wze,iGd(nVb));Agd(a,Zze,Tze,iGd(oVb));Agd(a,Zze,mAe,iGd(vVb));Agd(a,Zze,nAe,iGd(xVb));Agd(a,Zze,oAe,iGd(uVb));Agd(a,Zze,pAe,iGd(tVb));Agd(a,Zze,qAe,wVb)} +function hte(a,b){Vse();var c,d,e,f,g,h,i,j,k,l,m,n,o;if(bkb(wse)==0){l=$C(qdb,Nve,122,yse.length,0,1);for(g=0;g<l.length;g++){l[g]=(++Use,new xte(4))}d=new Rhb;for(f=0;f<vse.length;f++){k=(++Use,new xte(4));if(f<84){h=f*2;n=(BFb(h,XLe.length),XLe.charCodeAt(h));m=(BFb(h+1,XLe.length),XLe.charCodeAt(h+1));rte(k,n,m)}else{h=(f-84)*2;rte(k,zse[h],zse[h+1])}i=vse[f];lhb(i,'Specials')&&rte(k,65520,65533);if(lhb(i,VLe)){rte(k,983040,1048573);rte(k,1048576,1114109)}$jb(wse,i,k);$jb(xse,i,yte(k));j=d.a.length;0<j?(d.a=zhb(d.a,0,0)):0>j&&(d.a+=Hhb($C(hE,zwe,28,-j,15,1)));d.a+='Is';if(qhb(i,Fhb(32))>=0){for(e=0;e<i.length;e++){BFb(e,i.length);i.charCodeAt(e)!=32&&Jhb(d,(BFb(e,i.length),i.charCodeAt(e)))}}else{d.a+=''+i}lte(d.a,i,true)}lte(WLe,'Cn',false);lte(YLe,'Cn',true);c=(++Use,new xte(4));rte(c,0,MLe);$jb(wse,'ALL',c);$jb(xse,'ALL',yte(c));!Ase&&(Ase=new Tsb);$jb(Ase,WLe,WLe);!Ase&&(Ase=new Tsb);$jb(Ase,YLe,YLe);!Ase&&(Ase=new Tsb);$jb(Ase,'ALL','ALL')}o=b?RD(Xjb(wse,a),138):RD(Xjb(xse,a),138);return o} +function i_c(a){Cgd(a,new Pfd(_fd(Wfd($fd(Xfd(Zfd(Yfd(new agd,ZEe),'ELK Mr. Tree'),"Tree-based algorithm provided by the Eclipse Layout Kernel. Computes a spanning tree of the input graph and arranges all nodes according to the resulting parent-children hierarchy. I pity the fool who doesn't use Mr. Tree Layout."),new l_c),$Ee),xsb((aGd(),WFd)))));Agd(a,ZEe,Eze,U$c);Agd(a,ZEe,_ze,20);Agd(a,ZEe,ADe,3);Agd(a,ZEe,Dze,Yze);Agd(a,ZEe,$ze,sgb(1));Agd(a,ZEe,cAe,(Geb(),true));Agd(a,ZEe,LDe,iGd(G$c));Agd(a,ZEe,PDe,I$c);Agd(a,ZEe,dAe,iGd(L$c));Agd(a,ZEe,iEe,iGd(M$c));Agd(a,ZEe,jAe,iGd(O$c));Agd(a,ZEe,hAe,iGd(P$c));Agd(a,ZEe,CAe,iGd(Q$c));Agd(a,ZEe,iAe,iGd(R$c));Agd(a,ZEe,kAe,iGd(N$c));Agd(a,ZEe,gAe,iGd(S$c));Agd(a,ZEe,lAe,iGd(V$c));Agd(a,ZEe,VEe,iGd(g_c));Agd(a,ZEe,XEe,iGd(Y$c));Agd(a,ZEe,mAe,iGd(c_c));Agd(a,ZEe,nAe,iGd(e_c));Agd(a,ZEe,oAe,iGd(b_c));Agd(a,ZEe,pAe,iGd(a_c));Agd(a,ZEe,qAe,d_c);Agd(a,ZEe,UEe,iGd(W$c));Agd(a,ZEe,WEe,iGd(K$c));Agd(a,ZEe,TEe,iGd(f_c));Agd(a,ZEe,REe,iGd(F$c));Agd(a,ZEe,SEe,iGd(J$c))} +function rNb(a,b){var c,d,e,f,g,h,i,j,k,l,m;j=RD(RD(Qc(a.r,b),21),87);g=UMb(a,b);c=a.u.Hc((Pod(),Jod));for(i=j.Kc();i.Ob();){h=RD(i.Pb(),117);if(!h.c||h.c.d.c.length<=0){continue}m=h.b.Mf();k=h.c;l=k.i;l.b=(f=k.n,k.e.a+f.b+f.c);l.a=(e=k.n,k.e.b+e.d+e.a);switch(b.g){case 1:if(h.a){l.c=(m.a-l.b)/2;RKb(k,(EKb(),BKb))}else if(g||c){l.c=-l.b-a.s;RKb(k,(EKb(),DKb))}else{l.c=m.a+a.s;RKb(k,(EKb(),CKb))}l.d=-l.a-a.t;SKb(k,(vLb(),sLb));break;case 3:if(h.a){l.c=(m.a-l.b)/2;RKb(k,(EKb(),BKb))}else if(g||c){l.c=-l.b-a.s;RKb(k,(EKb(),DKb))}else{l.c=m.a+a.s;RKb(k,(EKb(),CKb))}l.d=m.b+a.t;SKb(k,(vLb(),uLb));break;case 2:if(h.a){d=a.v?l.a:RD(Vmb(k.d,0),187).Mf().b;l.d=(m.b-d)/2;SKb(k,(vLb(),tLb))}else if(g||c){l.d=-l.a-a.t;SKb(k,(vLb(),sLb))}else{l.d=m.b+a.t;SKb(k,(vLb(),uLb))}l.c=m.a+a.s;RKb(k,(EKb(),CKb));break;case 4:if(h.a){d=a.v?l.a:RD(Vmb(k.d,0),187).Mf().b;l.d=(m.b-d)/2;SKb(k,(vLb(),tLb))}else if(g||c){l.d=-l.a-a.t;SKb(k,(vLb(),sLb))}else{l.d=m.b+a.t;SKb(k,(vLb(),uLb))}l.c=-l.b-a.s;RKb(k,(EKb(),DKb));}g=false}} +function t6b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;m=false;l=false;if(Dod(RD(mQb(d,(yCc(),BBc)),101))){g=false;h=false;t:for(o=new Anb(d.j);o.a<o.c.c.length;){n=RD(ynb(o),12);for(q=Fl(Al(cD(WC(cJ,1),rve,20,0,[new T3b(n),new _3b(n)])));gs(q);){p=RD(hs(q),12);if(!Heb(TD(mQb(p.i,Uzc)))){if(n.j==(qpd(),Yod)){g=true;break t}if(n.j==npd){h=true;break t}}}}m=h&&!g;l=g&&!h}if(!m&&!l&&d.b.c.length!=0){k=0;for(j=new Anb(d.b);j.a<j.c.c.length;){i=RD(ynb(j),72);k+=i.n.b+i.o.b/2}k/=d.b.c.length;s=k>=d.o.b/2}else{s=!l}if(s){r=RD(mQb(d,(Ywc(),Xwc)),15);if(!r){f=new bnb;pQb(d,Xwc,f)}else if(m){f=r}else{e=RD(mQb(d,Vvc),15);if(!e){f=new bnb;pQb(d,Vvc,f)}else{r.gc()<=e.gc()?(f=r):(f=e)}}}else{e=RD(mQb(d,(Ywc(),Vvc)),15);if(!e){f=new bnb;pQb(d,Vvc,f)}else if(l){f=e}else{r=RD(mQb(d,Xwc),15);if(!r){f=new bnb;pQb(d,Xwc,f)}else{e.gc()<=r.gc()?(f=e):(f=r)}}}f.Fc(a);pQb(a,(Ywc(),Xvc),c);if(b.d==c){Z0b(b,null);c.e.c.length+c.g.c.length==0&&P3b(c,null);u6b(c)}else{Y0b(b,null);c.e.c.length+c.g.c.length==0&&P3b(c,null)}Xub(b.a)} +function GHc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I;c.Ug('MinWidth layering',1);n=b.b;A=b.a;I=RD(mQb(b,(yCc(),WAc)),17).a;h=RD(mQb(b,XAc),17).a;a.b=Kfb(UD(mQb(b,TBc)));a.d=oxe;for(u=new Anb(A);u.a<u.c.c.length;){s=RD(ynb(u),10);if(s.k!=(r3b(),p3b)){continue}D=s.o.b;a.d=$wnd.Math.min(a.d,D)}a.d=$wnd.Math.max(1,a.d);B=A.c.length;a.c=$C(kE,Pwe,28,B,15,1);a.f=$C(kE,Pwe,28,B,15,1);a.e=$C(iE,vxe,28,B,15,1);j=0;a.a=0;for(v=new Anb(A);v.a<v.c.c.length;){s=RD(ynb(v),10);s.p=j++;a.c[s.p]=EHc(Z2b(s));a.f[s.p]=EHc(a3b(s));a.e[s.p]=s.o.b/a.d;a.a+=a.e[s.p]}a.b/=a.d;a.a/=B;w=FHc(A);_mb(A,Fob(new MHc(a)));p=oxe;o=lve;g=null;H=I;G=I;f=h;e=h;if(I<0){H=RD(BHc.a.Id(),17).a;G=RD(BHc.b.Id(),17).a}if(h<0){f=RD(AHc.a.Id(),17).a;e=RD(AHc.b.Id(),17).a}for(F=H;F<=G;F++){for(d=f;d<=e;d++){C=DHc(a,F,d,A,w);r=Kfb(UD(C.a));m=RD(C.b,15);q=m.gc();if(r<p||r==p&&q<o){p=r;o=q;g=m}}}for(l=g.Kc();l.Ob();){k=RD(l.Pb(),15);i=new R4b(b);for(t=k.Kc();t.Ob();){s=RD(t.Pb(),10);g3b(s,i)}ZEb(n.c,i)}Eob(n);A.c.length=0;c.Vg()} +function UUc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;c.Ug('Spline edge routing',1);if(b.b.c.length==0){b.f.a=0;c.Vg();return}s=Kfb(UD(mQb(b,(yCc(),cCc))));h=Kfb(UD(mQb(b,XBc)));g=Kfb(UD(mQb(b,UBc)));r=RD(mQb(b,DAc),350);B=r==(lFc(),kFc);A=Kfb(UD(mQb(b,EAc)));a.d=b;a.j.c.length=0;a.a.c.length=0;akb(a.k);i=RD(Vmb(b.b,0),30);k=ar(i.a,(dSc(),bSc));o=RD(Vmb(b.b,b.b.c.length-1),30);l=ar(o.a,bSc);p=new Anb(b.b);q=null;G=0;do{t=p.a<p.c.c.length?RD(ynb(p),30):null;IUc(a,q,t);LUc(a);C=cwb(nDb(IDb(CDb(new SDb(null,new Swb(a.i,16)),new jVc),new lVc)));F=0;u=G;m=!q||k&&q==i;n=!t||l&&t==o;if(C>0){j=0;!!q&&(j+=h);j+=(C-1)*g;!!t&&(j+=h);B&&!!t&&(j=$wnd.Math.max(j,JUc(t,g,s,A)));if(j<s&&!m&&!n){F=(s-j)/2;j=s}u+=j}else !m&&!n&&(u+=s);!!t&&p2b(t,u);for(w=new Anb(a.i);w.a<w.c.c.length;){v=RD(ynb(w),131);v.a.c=G;v.a.b=u-G;v.F=F;v.p=!q}Tmb(a.a,a.i);G=u;!!t&&(G+=t.c.a);q=t;m=n}while(t);for(e=new Anb(a.j);e.a<e.c.c.length;){d=RD(ynb(e),18);f=PUc(a,d);pQb(d,(Ywc(),Rwc),f);D=RUc(a,d);pQb(d,Twc,D)}b.f.a=G;a.d=null;c.Vg()} +function Z9b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;a.b=b;a.a=RD(mQb(b,(yCc(),JAc)),17).a;a.c=RD(mQb(b,LAc),17).a;a.c==0&&(a.c=lve);q=new Jkb(b.b,0);while(q.b<q.d.gc()){p=(sFb(q.b<q.d.gc()),RD(q.d.Xb(q.c=q.b++),30));h=new bnb;k=-1;u=-1;for(t=new Anb(p.a);t.a<t.c.c.length;){s=RD(ynb(t),10);if(Kr((U9b(),new is(Mr(W2b(s).a.Kc(),new ir))))>=a.a){d=V9b(a,s);k=$wnd.Math.max(k,d.b);u=$wnd.Math.max(u,d.d);Rmb(h,new Ptd(s,d))}}B=new bnb;for(j=0;j<k;++j){Qmb(B,0,(sFb(q.b>0),q.a.Xb(q.c=--q.b),C=new R4b(a.b),Ikb(q,C),sFb(q.b<q.d.gc()),q.d.Xb(q.c=q.b++),C))}for(g=new Anb(h);g.a<g.c.c.length;){e=RD(ynb(g),42);n=RD(e.b,580).a;if(!n){continue}for(m=new Anb(n);m.a<m.c.c.length;){l=RD(ynb(m),10);Y9b(a,l,S9b,B)}}c=new bnb;for(i=0;i<u;++i){Rmb(c,(D=new R4b(a.b),Ikb(q,D),D))}for(f=new Anb(h);f.a<f.c.c.length;){e=RD(ynb(f),42);A=RD(e.b,580).c;if(!A){continue}for(w=new Anb(A);w.a<w.c.c.length;){v=RD(ynb(w),10);Y9b(a,v,T9b,c)}}}r=new Jkb(b.b,0);while(r.b<r.d.gc()){o=(sFb(r.b<r.d.gc()),RD(r.d.Xb(r.c=r.b++),30));o.a.c.length==0&&Ckb(r)}} +function wLd(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;p=a.i!=0;t=false;r=null;if(Mvd(a.e)){k=b.gc();if(k>0){m=k<100?null:new gLd(k);j=new $Hd(b);o=j.g;r=$C(kE,Pwe,28,k,15,1);d=0;u=new ZHd(k);for(e=0;e<a.i;++e){h=a.g[e];n=h;v:for(s=0;s<2;++s){for(i=k;--i>=0;){if(n!=null?pb(n,o[i]):dE(n)===dE(o[i])){if(r.length<=d){q=r;r=$C(kE,Pwe,28,2*r.length,15,1);hib(q,0,r,0,d)}r[d++]=e;WGd(u,o[i]);break v}}n=n;if(dE(n)===dE(h)){break}}}j=u;o=u.g;k=d;if(d>r.length){q=r;r=$C(kE,Pwe,28,d,15,1);hib(q,0,r,0,d)}if(d>0){t=true;for(f=0;f<d;++f){n=o[f];m=Kge(a,RD(n,76),m)}for(g=d;--g>=0;){THd(a,r[g])}if(d!=k){for(e=k;--e>=d;){THd(j,e)}q=r;r=$C(kE,Pwe,28,d,15,1);hib(q,0,r,0,d)}b=j}}}else{b=aHd(a,b);for(e=a.i;--e>=0;){if(b.Hc(a.g[e])){THd(a,e);t=true}}}if(t){if(r!=null){c=b.gc();l=c==1?dZd(a,4,b.Kc().Pb(),null,r[0],p):dZd(a,6,b,r,r[0],p);m=c<100?null:new gLd(c);for(e=b.Kc();e.Ob();){n=e.Pb();m=oge(a,RD(n,76),m)}if(!m){qvd(a.e,l)}else{m.nj(l);m.oj()}}else{m=tLd(b.gc());for(e=b.Kc();e.Ob();){n=e.Pb();m=oge(a,RD(n,76),m)}!!m&&m.oj()}return true}else{return false}} +function i_b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;c=new p_b(b);c.a||b_b(b);j=a_b(b);i=new Tp;q=new D_b;for(p=new Anb(b.a);p.a<p.c.c.length;){o=RD(ynb(p),10);for(e=new is(Mr(a3b(o).a.Kc(),new ir));gs(e);){d=RD(hs(e),18);if(d.c.i.k==(r3b(),m3b)||d.d.i.k==m3b){k=h_b(a,d,j,q);Rc(i,f_b(k.d),k.a)}}}g=new bnb;for(t=RD(mQb(c.c,(Ywc(),ewc)),21).Kc();t.Ob();){s=RD(t.Pb(),64);n=q.c[s.g];m=q.b[s.g];h=q.a[s.g];f=null;r=null;switch(s.g){case 4:f=new Uid(a.d.a,n,j.b.a-a.d.a,m-n);r=new Uid(a.d.a,n,h,m-n);l_b(j,new rjd(f.c+f.b,f.d));l_b(j,new rjd(f.c+f.b,f.d+f.a));break;case 2:f=new Uid(j.a.a,n,a.c.a-j.a.a,m-n);r=new Uid(a.c.a-h,n,h,m-n);l_b(j,new rjd(f.c,f.d));l_b(j,new rjd(f.c,f.d+f.a));break;case 1:f=new Uid(n,a.d.b,m-n,j.b.b-a.d.b);r=new Uid(n,a.d.b,m-n,h);l_b(j,new rjd(f.c,f.d+f.a));l_b(j,new rjd(f.c+f.b,f.d+f.a));break;case 3:f=new Uid(n,j.a.b,m-n,a.c.b-j.a.b);r=new Uid(n,a.c.b-h,m-n,h);l_b(j,new rjd(f.c,f.d));l_b(j,new rjd(f.c+f.b,f.d));}if(f){l=new y_b;l.d=s;l.b=f;l.c=r;l.a=Ux(RD(Qc(i,f_b(s)),21));ZEb(g.c,l)}}Tmb(c.b,g);c.d=DZb(LZb(j));return c} +function PQc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(c.p[b.p]!=null){return}h=true;c.p[b.p]=0;g=b;p=c.o==(EQc(),CQc)?pxe:oxe;do{e=a.b.e[g.p];f=g.c.a.c.length;if(c.o==CQc&&e>0||c.o==DQc&&e<f-1){i=null;j=null;c.o==DQc?(i=RD(Vmb(g.c.a,e+1),10)):(i=RD(Vmb(g.c.a,e-1),10));j=c.g[i.p];PQc(a,j,c);p=a.e.wg(p,b,g);c.j[b.p]==b&&(c.j[b.p]=c.j[j.p]);if(c.j[b.p]==c.j[j.p]){o=bFc(a.d,g,i);if(c.o==DQc){d=Kfb(c.p[b.p]);l=Kfb(c.p[j.p])+Kfb(c.d[i.p])-i.d.d-o-g.d.a-g.o.b-Kfb(c.d[g.p]);if(h){h=false;c.p[b.p]=$wnd.Math.min(l,p)}else{c.p[b.p]=$wnd.Math.min(d,$wnd.Math.min(l,p))}}else{d=Kfb(c.p[b.p]);l=Kfb(c.p[j.p])+Kfb(c.d[i.p])+i.o.b+i.d.a+o+g.d.d-Kfb(c.d[g.p]);if(h){h=false;c.p[b.p]=$wnd.Math.max(l,p)}else{c.p[b.p]=$wnd.Math.max(d,$wnd.Math.max(l,p))}}}else{o=Kfb(UD(mQb(a.a,(yCc(),bCc))));n=NQc(a,c.j[b.p]);k=NQc(a,c.j[j.p]);if(c.o==DQc){m=Kfb(c.p[b.p])+Kfb(c.d[g.p])+g.o.b+g.d.a+o-(Kfb(c.p[j.p])+Kfb(c.d[i.p])-i.d.d);TQc(n,k,m)}else{m=Kfb(c.p[b.p])+Kfb(c.d[g.p])-g.d.d-Kfb(c.p[j.p])-Kfb(c.d[i.p])-i.o.b-i.d.a-o;TQc(n,k,m)}}}else{p=a.e.wg(p,b,g)}g=c.a[g.p]}while(g!=b);qRc(a.e,b)} +function $Kc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C;c=Kfb(UD(mQb(a.a.j,(yCc(),iAc))));if(c<-1||!a.a.i||Cod(RD(mQb(a.a.o,BBc),101))||b3b(a.a.o,(qpd(),Xod)).gc()<2&&b3b(a.a.o,ppd).gc()<2){return true}if(a.a.c.kg()){return false}v=0;u=0;t=new bnb;for(i=a.a.e,j=0,k=i.length;j<k;++j){h=i[j];for(m=h,n=0,p=m.length;n<p;++n){l=m[n];if(l.k==(r3b(),q3b)){ZEb(t.c,l);continue}d=a.b[l.c.p][l.p];if(l.k==m3b){d.b=1;RD(mQb(l,(Ywc(),Awc)),12).j==(qpd(),Xod)&&(u+=d.a)}else{C=b3b(l,(qpd(),ppd));C.dc()||!br(C,new lLc)?(d.c=1):(e=b3b(l,Xod),(e.dc()||!br(e,new hLc))&&(v+=d.a))}for(g=new is(Mr(a3b(l).a.Kc(),new ir));gs(g);){f=RD(hs(g),18);v+=d.c;u+=d.b;B=f.d.i;ZKc(a,d,B)}r=Al(cD(WC(cJ,1),rve,20,0,[b3b(l,(qpd(),Yod)),b3b(l,npd)]));for(A=new is(new Il(r.a.length,r.a));gs(A);){w=RD(hs(A),12);s=RD(mQb(w,(Ywc(),Iwc)),10);if(s){v+=d.c;u+=d.b;ZKc(a,d,s)}}}for(o=new Anb(t);o.a<o.c.c.length;){l=RD(ynb(o),10);d=a.b[l.c.p][l.p];for(g=new is(Mr(a3b(l).a.Kc(),new ir));gs(g);){f=RD(hs(g),18);v+=d.c;u+=d.b;B=f.d.i;ZKc(a,d,B)}}t.c.length=0}b=v+u;q=b==0?oxe:(v-u)/b;return q>=c} +function zEd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;t=b;s=new Tp;u=new Tp;k=wDd(t,mIe);d=new OEd(a,c,s,u);QDd(d.a,d.b,d.c,d.d,k);i=(A=s.i,!A?(s.i=new zf(s,s.c)):A);for(C=i.Kc();C.Ob();){B=RD(C.Pb(),166);e=RD(Qc(s,B),21);for(p=e.Kc();p.Ob();){o=p.Pb();v=RD(Ao(a.d,o),166);if(v){h=(!B.e&&(B.e=new Yie(F4,B,10,9)),B.e);WGd(h,v)}else{g=zDd(t,uIe);m=AIe+o+BIe+g;n=m+zIe;throw Adb(new CDd(n))}}}j=(w=u.i,!w?(u.i=new zf(u,u.c)):w);for(F=j.Kc();F.Ob();){D=RD(F.Pb(),166);f=RD(Qc(u,D),21);for(r=f.Kc();r.Ob();){q=r.Pb();v=RD(Ao(a.d,q),166);if(v){l=(!D.g&&(D.g=new Yie(F4,D,9,10)),D.g);WGd(l,v)}else{g=zDd(t,uIe);m=AIe+q+BIe+g;n=m+zIe;throw Adb(new CDd(n))}}}!c.b&&(c.b=new Yie(E4,c,4,7));if(c.b.i!=0&&(!c.c&&(c.c=new Yie(E4,c,5,8)),c.c.i!=0)&&(!c.b&&(c.b=new Yie(E4,c,4,7)),c.b.i<=1&&(!c.c&&(c.c=new Yie(E4,c,5,8)),c.c.i<=1))&&(!c.a&&(c.a=new C5d(F4,c,6,6)),c.a).i==1){G=RD(QHd((!c.a&&(c.a=new C5d(F4,c,6,6)),c.a),0),166);if(!Dzd(G)&&!Ezd(G)){Kzd(G,RD(QHd((!c.b&&(c.b=new Yie(E4,c,4,7)),c.b),0),84));Lzd(G,RD(QHd((!c.c&&(c.c=new Yie(E4,c,5,8)),c.c),0),84))}}} +function QNc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;for(t=a.a,u=0,v=t.length;u<v;++u){s=t[u];j=lve;k=lve;for(o=new Anb(s.e);o.a<o.c.c.length;){m=RD(ynb(o),10);g=!m.c?-1:Wmb(m.c.a,m,0);if(g>0){l=RD(Vmb(m.c.a,g-1),10);B=bFc(a.b,m,l);q=m.n.b-m.d.d-(l.n.b+l.o.b+l.d.a+B)}else{q=m.n.b-m.d.d}j=$wnd.Math.min(q,j);if(g<m.c.a.c.length-1){l=RD(Vmb(m.c.a,g+1),10);B=bFc(a.b,m,l);r=l.n.b-l.d.d-(m.n.b+m.o.b+m.d.a+B)}else{r=2*m.n.b}k=$wnd.Math.min(r,k)}i=lve;f=false;e=RD(Vmb(s.e,0),10);for(D=new Anb(e.j);D.a<D.c.c.length;){C=RD(ynb(D),12);p=e.n.b+C.n.b+C.a.b;for(d=new Anb(C.e);d.a<d.c.c.length;){c=RD(ynb(d),18);w=c.c;b=w.i.n.b+w.n.b+w.a.b-p;if($wnd.Math.abs(b)<$wnd.Math.abs(i)&&$wnd.Math.abs(b)<(b<0?j:k)){i=b;f=true}}}h=RD(Vmb(s.e,s.e.c.length-1),10);for(A=new Anb(h.j);A.a<A.c.c.length;){w=RD(ynb(A),12);p=h.n.b+w.n.b+w.a.b;for(d=new Anb(w.g);d.a<d.c.c.length;){c=RD(ynb(d),18);C=c.d;b=C.i.n.b+C.n.b+C.a.b-p;if($wnd.Math.abs(b)<$wnd.Math.abs(i)&&$wnd.Math.abs(b)<(b<0?j:k)){i=b;f=true}}}if(f&&i!=0){for(n=new Anb(s.e);n.a<n.c.c.length;){m=RD(ynb(n),10);m.n.b+=i}}}} +function vac(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;d=new bnb;e=lve;f=lve;g=lve;if(c){e=a.f.a;for(p=new Anb(b.j);p.a<p.c.c.length;){o=RD(ynb(p),12);for(i=new Anb(o.g);i.a<i.c.c.length;){h=RD(ynb(i),18);if(h.a.b!=0){k=RD(Qub(h.a),8);if(k.a<e){f=e-k.a;g=lve;d.c.length=0;e=k.a}if(k.a<=e){ZEb(d.c,h);h.a.b>1&&(g=$wnd.Math.min(g,$wnd.Math.abs(RD(ju(h.a,1),8).b-k.b)))}}}}}else{for(p=new Anb(b.j);p.a<p.c.c.length;){o=RD(ynb(p),12);for(i=new Anb(o.e);i.a<i.c.c.length;){h=RD(ynb(i),18);if(h.a.b!=0){m=RD(Rub(h.a),8);if(m.a>e){f=m.a-e;g=lve;d.c.length=0;e=m.a}if(m.a>=e){ZEb(d.c,h);h.a.b>1&&(g=$wnd.Math.min(g,$wnd.Math.abs(RD(ju(h.a,h.a.b-2),8).b-m.b)))}}}}}if(d.c.length!=0&&f>b.o.a/2&&g>b.o.b/2){n=new R3b;P3b(n,b);Q3b(n,(qpd(),Yod));n.n.a=b.o.a/2;r=new R3b;P3b(r,b);Q3b(r,npd);r.n.a=b.o.a/2;r.n.b=b.o.b;for(i=new Anb(d);i.a<i.c.c.length;){h=RD(ynb(i),18);if(c){j=RD(Uub(h.a),8);q=h.a.b==0?K3b(h.d):RD(Qub(h.a),8);q.b>=j.b?Y0b(h,r):Y0b(h,n)}else{j=RD(Vub(h.a),8);q=h.a.b==0?K3b(h.c):RD(Rub(h.a),8);q.b>=j.b?Z0b(h,r):Z0b(h,n)}l=RD(mQb(h,(yCc(),RAc)),75);!!l&&ze(l,j,true)}b.n.a=e-b.o.a/2}} +function E0c(a,b,c){var d,e,f,g,h,i,j,k,l,m;for(h=Sub(a.b,0);h.b!=h.d.c;){g=RD(evb(h),40);if(lhb(g.c,IEe)){continue}j=iWc(g,a);b==(Cmd(),ymd)||b==zmd?_mb(j,new D1c):_mb(j,new H1c);i=j.c.length;for(d=0;d<i;d++){k=(tFb(d,j.c.length),RD(j.c[d],65)).c;lhb(k.c,'n11')&&o0;if(Heb(TD(mQb(g,(q$c(),UZc))))&&!mWc((tFb(d,j.c.length),RD(j.c[d],65)),a)){continue}e=i==1?0.5:(d+1)/(i+1);if(b==ymd){f=Kfb(UD(mQb(g,f$c)));m=g.e.b+g.f.b*e;Nub((tFb(d,j.c.length),RD(j.c[d],65)).a,new rjd($wnd.Math.min(f,g.e.a-c),m));Nub((tFb(d,j.c.length),RD(j.c[d],65)).a,new rjd(g.e.a,m))}else if(b==zmd){f=Kfb(UD(mQb(g,e$c)))+c;m=g.e.b+g.f.b*e;Nub((tFb(d,j.c.length),RD(j.c[d],65)).a,new rjd(f,m));Nub((tFb(d,j.c.length),RD(j.c[d],65)).a,new rjd(g.e.a+g.f.a,m))}else if(b==Bmd){f=Kfb(UD(mQb(g,f$c)));l=g.e.a+g.f.a*e;Nub((tFb(d,j.c.length),RD(j.c[d],65)).a,new rjd(l,$wnd.Math.min(g.e.b-c,f)));Nub((tFb(d,j.c.length),RD(j.c[d],65)).a,new rjd(l,g.e.b))}else{f=Kfb(UD(mQb(g,e$c)))+c;l=g.e.a+g.f.a*e;Nub((tFb(d,j.c.length),RD(j.c[d],65)).a,new rjd(l,f));Nub((tFb(d,j.c.length),RD(j.c[d],65)).a,new rjd(l,g.e.b+g.f.b))}}}} +function f2b(a,b,c,d,e,f,g,h,i){var j,k,l,m,n,o,p;n=c;k=new j3b(i);h3b(k,(r3b(),m3b));pQb(k,(Ywc(),iwc),g);pQb(k,(yCc(),BBc),(Bod(),wod));p=Kfb(UD(a.of(ABc)));pQb(k,ABc,p);l=new R3b;P3b(l,k);if(!(b!=zod&&b!=Aod)){d>=0?(n=vpd(h)):(n=spd(vpd(h)));a.qf(GBc,n)}j=new pjd;m=false;if(a.pf(zBc)){mjd(j,RD(a.of(zBc),8));m=true}else{ljd(j,g.a/2,g.b/2)}switch(n.g){case 4:pQb(k,UAc,(cxc(),$wc));pQb(k,bwc,(huc(),guc));k.o.b=g.b;p<0&&(k.o.a=-p);Q3b(l,(qpd(),Xod));m||(j.a=g.a);j.a-=g.a;break;case 2:pQb(k,UAc,(cxc(),axc));pQb(k,bwc,(huc(),euc));k.o.b=g.b;p<0&&(k.o.a=-p);Q3b(l,(qpd(),ppd));m||(j.a=0);break;case 1:pQb(k,owc,(Gvc(),Fvc));k.o.a=g.a;p<0&&(k.o.b=-p);Q3b(l,(qpd(),npd));m||(j.b=g.b);j.b-=g.b;break;case 3:pQb(k,owc,(Gvc(),Dvc));k.o.a=g.a;p<0&&(k.o.b=-p);Q3b(l,(qpd(),Yod));m||(j.b=0);}mjd(l.n,j);pQb(k,zBc,j);if(b==vod||b==xod||b==wod){o=0;if(b==vod&&a.pf(CBc)){switch(n.g){case 1:case 2:o=RD(a.of(CBc),17).a;break;case 3:case 4:o=-RD(a.of(CBc),17).a;}}else{switch(n.g){case 4:case 2:o=f.b;b==xod&&(o/=e.b);break;case 1:case 3:o=f.a;b==xod&&(o/=e.a);}}pQb(k,Jwc,o)}pQb(k,hwc,n);return k} +function OId(){MId();function h(f){var g=this;this.dispatch=function(a){var b=a.data;switch(b.cmd){case 'algorithms':var c=PId((yob(),new xpb(new glb(LId.b))));f.postMessage({id:b.id,data:c});break;case 'categories':var d=PId((yob(),new xpb(new glb(LId.c))));f.postMessage({id:b.id,data:d});break;case 'options':var e=PId((yob(),new xpb(new glb(LId.d))));f.postMessage({id:b.id,data:e});break;case 'register':SId(b.algorithms);f.postMessage({id:b.id});break;case 'layout':QId(b.graph,b.layoutOptions||{},b.options||{});f.postMessage({id:b.id,data:b.graph});break;}};this.saveDispatch=function(b){try{g.dispatch(b)}catch(a){f.postMessage({id:b.data.id,error:a})}}} +function j(b){var c=this;this.dispatcher=new h({postMessage:function(a){c.onmessage({data:a})}});this.postMessage=function(a){setTimeout(function(){c.dispatcher.saveDispatch({data:a})},0)}} +if(typeof document===Yxe&&typeof self!==Yxe){var i=new h(self);self.onmessage=i.saveDispatch}else if(typeof module!==Yxe&&module.exports){Object.defineProperty(exports,'__esModule',{value:true});module.exports={'default':j,Worker:j}}} +function i5b(a,b,c){var d,e,f,g,h,i,j,k,l,m;k=new j3b(c);kQb(k,b);pQb(k,(Ywc(),Awc),b);k.o.a=b.g;k.o.b=b.f;k.n.a=b.i;k.n.b=b.j;Rmb(c.a,k);Zjb(a.a,b,k);((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a).i!=0||Heb(TD(Gxd(b,(yCc(),NAc)))))&&pQb(k,Yvc,(Geb(),true));j=RD(mQb(c,kwc),21);l=RD(mQb(k,(yCc(),BBc)),101);l==(Bod(),Aod)?pQb(k,BBc,zod):l!=zod&&j.Fc((ovc(),kvc));m=0;d=RD(mQb(c,rAc),88);for(i=new dMd((!b.c&&(b.c=new C5d(K4,b,9,9)),b.c));i.e!=i.i.gc();){h=RD(bMd(i),123);e=vCd(b);(dE(Gxd(e,cAc))!==dE((kEc(),hEc))||dE(Gxd(e,pAc))===dE((Ptc(),Otc))||dE(Gxd(e,pAc))===dE((Ptc(),Mtc))||Heb(TD(Gxd(e,eAc)))||dE(Gxd(e,Yzc))!==dE((U$b(),T$b))||dE(Gxd(e,ZAc))===dE((aEc(),TDc))||dE(Gxd(e,ZAc))===dE((aEc(),UDc))||dE(Gxd(e,$Ac))===dE((_Cc(),SCc))||dE(Gxd(e,$Ac))===dE((_Cc(),UCc)))&&!Heb(TD(Gxd(b,aAc)))&&Ixd(h,zwc,sgb(m++));Heb(TD(Gxd(h,pBc)))||j5b(a,h,k,j,d,l)}for(g=new dMd((!b.n&&(b.n=new C5d(I4,b,1,7)),b.n));g.e!=g.i.gc();){f=RD(bMd(g),135);!Heb(TD(Gxd(f,pBc)))&&!!f.a&&Rmb(k.b,h5b(f))}Heb(TD(mQb(k,Uzc)))&&j.Fc((ovc(),fvc));if(Heb(TD(mQb(k,MAc)))){j.Fc((ovc(),jvc));j.Fc(ivc);pQb(k,BBc,zod)}return k} +function ird(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I;p=0;D=0;for(j=new Anb(a.b);j.a<j.c.c.length;){i=RD(ynb(j),163);!!i.c&&Dsd(i.c);p=$wnd.Math.max(p,urd(i));D+=urd(i)*trd(i)}q=D/a.b.c.length;C=brd(a.b,q);D+=a.b.c.length*C;p=$wnd.Math.max(p,$wnd.Math.sqrt(D*g))+c.b;H=c.b;I=c.d;n=0;l=c.b+c.c;B=new Yub;Mub(B,sgb(0));w=new Yub;k=new Jkb(a.b,0);o=null;h=new bnb;while(k.b<k.d.gc()){i=(sFb(k.b<k.d.gc()),RD(k.d.Xb(k.c=k.b++),163));G=urd(i);m=trd(i);if(H+G>p){if(f){Oub(w,n);Oub(B,sgb(k.b-1));Rmb(a.d,o);h.c.length=0}H=c.b;I+=n+b;n=0;l=$wnd.Math.max(l,c.b+c.c+G)}ZEb(h.c,i);xrd(i,H,I);l=$wnd.Math.max(l,H+G+c.c);n=$wnd.Math.max(n,m);H+=G+b;o=i}Tmb(a.a,h);Rmb(a.d,RD(Vmb(h,h.c.length-1),163));l=$wnd.Math.max(l,d);F=I+n+c.a;if(F<e){n+=e-F;F=e}if(f){H=c.b;k=new Jkb(a.b,0);Oub(B,sgb(a.b.c.length));A=Sub(B,0);s=RD(evb(A),17).a;Oub(w,n);v=Sub(w,0);u=0;while(k.b<k.d.gc()){if(k.b==s){H=c.b;u=Kfb(UD(evb(v)));s=RD(evb(A),17).a}i=(sFb(k.b<k.d.gc()),RD(k.d.Xb(k.c=k.b++),163));vrd(i,u);if(k.b==s){r=l-H-c.c;t=urd(i);wrd(i,r);yrd(i,(r-t)/2,0)}H+=urd(i)+b}}return new rjd(l,F)} +function zne(a){if(a.N)return;a.N=true;a.b=jBd(a,0);iBd(a.b,0);iBd(a.b,1);iBd(a.b,2);a.bb=jBd(a,1);iBd(a.bb,0);iBd(a.bb,1);a.fb=jBd(a,2);iBd(a.fb,3);iBd(a.fb,4);oBd(a.fb,5);a.qb=jBd(a,3);iBd(a.qb,0);oBd(a.qb,1);oBd(a.qb,2);iBd(a.qb,3);iBd(a.qb,4);oBd(a.qb,5);iBd(a.qb,6);a.a=kBd(a,4);a.c=kBd(a,5);a.d=kBd(a,6);a.e=kBd(a,7);a.f=kBd(a,8);a.g=kBd(a,9);a.i=kBd(a,10);a.j=kBd(a,11);a.k=kBd(a,12);a.n=kBd(a,13);a.o=kBd(a,14);a.p=kBd(a,15);a.q=kBd(a,16);a.s=kBd(a,17);a.r=kBd(a,18);a.t=kBd(a,19);a.u=kBd(a,20);a.v=kBd(a,21);a.w=kBd(a,22);a.B=kBd(a,23);a.A=kBd(a,24);a.C=kBd(a,25);a.D=kBd(a,26);a.F=kBd(a,27);a.G=kBd(a,28);a.H=kBd(a,29);a.J=kBd(a,30);a.I=kBd(a,31);a.K=kBd(a,32);a.M=kBd(a,33);a.L=kBd(a,34);a.P=kBd(a,35);a.Q=kBd(a,36);a.R=kBd(a,37);a.S=kBd(a,38);a.T=kBd(a,39);a.U=kBd(a,40);a.V=kBd(a,41);a.X=kBd(a,42);a.W=kBd(a,43);a.Y=kBd(a,44);a.Z=kBd(a,45);a.$=kBd(a,46);a._=kBd(a,47);a.ab=kBd(a,48);a.cb=kBd(a,49);a.db=kBd(a,50);a.eb=kBd(a,51);a.gb=kBd(a,52);a.hb=kBd(a,53);a.ib=kBd(a,54);a.jb=kBd(a,55);a.kb=kBd(a,56);a.lb=kBd(a,57);a.mb=kBd(a,58);a.nb=kBd(a,59);a.ob=kBd(a,60);a.pb=kBd(a,61)} +function w8b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;s=0;if(b.f.a==0){for(q=new Anb(a);q.a<q.c.c.length;){o=RD(ynb(q),10);s=$wnd.Math.max(s,o.n.a+o.o.a+o.d.c)}}else{s=b.f.a-b.c.a}s-=b.c.a;for(p=new Anb(a);p.a<p.c.c.length;){o=RD(ynb(p),10);x8b(o.n,s-o.o.a);y8b(o.f);u8b(o);(!o.q?(yob(),yob(),wob):o.q)._b((yCc(),IBc))&&x8b(RD(mQb(o,IBc),8),s-o.o.a);switch(RD(mQb(o,Rzc),255).g){case 1:pQb(o,Rzc,(Rjd(),Pjd));break;case 2:pQb(o,Rzc,(Rjd(),Ojd));}r=o.o;for(u=new Anb(o.j);u.a<u.c.c.length;){t=RD(ynb(u),12);x8b(t.n,r.a-t.o.a);x8b(t.a,t.o.a);Q3b(t,o8b(t.j));g=RD(mQb(t,CBc),17);!!g&&pQb(t,CBc,sgb(-g.a));for(f=new Anb(t.g);f.a<f.c.c.length;){e=RD(ynb(f),18);for(d=Sub(e.a,0);d.b!=d.d.c;){c=RD(evb(d),8);c.a=s-c.a}j=RD(mQb(e,RAc),75);if(j){for(i=Sub(j,0);i.b!=i.d.c;){h=RD(evb(i),8);h.a=s-h.a}}for(m=new Anb(e.b);m.a<m.c.c.length;){k=RD(ynb(m),72);x8b(k.n,s-k.o.a)}}for(n=new Anb(t.f);n.a<n.c.c.length;){k=RD(ynb(n),72);x8b(k.n,t.o.a-k.o.a)}}if(o.k==(r3b(),m3b)){pQb(o,(Ywc(),hwc),o8b(RD(mQb(o,hwc),64)));t8b(o)}for(l=new Anb(o.b);l.a<l.c.c.length;){k=RD(ynb(l),72);u8b(k);x8b(k.n,r.a-k.o.a)}}} +function z8b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;s=0;if(b.f.b==0){for(q=new Anb(a);q.a<q.c.c.length;){o=RD(ynb(q),10);s=$wnd.Math.max(s,o.n.b+o.o.b+o.d.a)}}else{s=b.f.b-b.c.b}s-=b.c.b;for(p=new Anb(a);p.a<p.c.c.length;){o=RD(ynb(p),10);A8b(o.n,s-o.o.b);B8b(o.f);v8b(o);(!o.q?(yob(),yob(),wob):o.q)._b((yCc(),IBc))&&A8b(RD(mQb(o,IBc),8),s-o.o.b);switch(RD(mQb(o,Rzc),255).g){case 3:pQb(o,Rzc,(Rjd(),Mjd));break;case 4:pQb(o,Rzc,(Rjd(),Qjd));}r=o.o;for(u=new Anb(o.j);u.a<u.c.c.length;){t=RD(ynb(u),12);A8b(t.n,r.b-t.o.b);A8b(t.a,t.o.b);Q3b(t,p8b(t.j));g=RD(mQb(t,CBc),17);!!g&&pQb(t,CBc,sgb(-g.a));for(f=new Anb(t.g);f.a<f.c.c.length;){e=RD(ynb(f),18);for(d=Sub(e.a,0);d.b!=d.d.c;){c=RD(evb(d),8);c.b=s-c.b}j=RD(mQb(e,RAc),75);if(j){for(i=Sub(j,0);i.b!=i.d.c;){h=RD(evb(i),8);h.b=s-h.b}}for(m=new Anb(e.b);m.a<m.c.c.length;){k=RD(ynb(m),72);A8b(k.n,s-k.o.b)}}for(n=new Anb(t.f);n.a<n.c.c.length;){k=RD(ynb(n),72);A8b(k.n,t.o.b-k.o.b)}}if(o.k==(r3b(),m3b)){pQb(o,(Ywc(),hwc),p8b(RD(mQb(o,hwc),64)));s8b(o)}for(l=new Anb(o.b);l.a<l.c.c.length;){k=RD(ynb(l),72);v8b(k);A8b(k.n,r.b-k.o.b)}}} +function Drc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H;s=new Jkb(a.b,0);k=b.Kc();o=0;j=RD(k.Pb(),17).a;v=0;c=new _sb;A=new Iub;while(s.b<s.d.gc()){r=(sFb(s.b<s.d.gc()),RD(s.d.Xb(s.c=s.b++),30));for(u=new Anb(r.a);u.a<u.c.c.length;){t=RD(ynb(u),10);for(n=new is(Mr(a3b(t).a.Kc(),new ir));gs(n);){l=RD(hs(n),18);A.a.zc(l,A)}for(m=new is(Mr(Z2b(t).a.Kc(),new ir));gs(m);){l=RD(hs(m),18);A.a.Bc(l)!=null}}if(o+1==j){e=new R4b(a);Ikb(s,e);f=new R4b(a);Ikb(s,f);for(C=A.a.ec().Kc();C.Ob();){B=RD(C.Pb(),18);if(!c.a._b(B)){++v;c.a.zc(B,c)}g=new j3b(a);pQb(g,(yCc(),BBc),(Bod(),yod));g3b(g,e);h3b(g,(r3b(),l3b));p=new R3b;P3b(p,g);Q3b(p,(qpd(),ppd));D=new R3b;P3b(D,g);Q3b(D,Xod);d=new j3b(a);pQb(d,BBc,yod);g3b(d,f);h3b(d,l3b);q=new R3b;P3b(q,d);Q3b(q,ppd);F=new R3b;P3b(F,d);Q3b(F,Xod);w=new a1b;Y0b(w,B.c);Z0b(w,p);pQb(w,(Ywc(),zwc),RD(mQb(B,zwc),17));H=new a1b;Y0b(H,D);Z0b(H,q);pQb(H,zwc,RD(mQb(B,zwc),17));Y0b(B,F);h=new Jrc(g,d,w,H,B);pQb(g,Wvc,h);pQb(d,Wvc,h);G=w.c.i;if(G.k==l3b){i=RD(mQb(G,Wvc),313);i.d=h;h.g=i}}if(k.Ob()){j=RD(k.Pb(),17).a}else{break}}++o}return sgb(v)} +function rkc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;p=new bnb;for(m=new Anb(a.d.b);m.a<m.c.c.length;){l=RD(ynb(m),30);for(o=new Anb(l.a);o.a<o.c.c.length;){n=RD(ynb(o),10);e=RD(Wjb(a.f,n),60);for(i=new is(Mr(a3b(n).a.Kc(),new ir));gs(i);){g=RD(hs(i),18);d=Sub(g.a,0);j=true;k=null;if(d.b!=d.d.c){b=RD(evb(d),8);c=null;if(g.c.j==(qpd(),Yod)){q=new Nlc(b,new rjd(b.a,e.d.d),e,g);q.f.a=true;q.a=g.c;ZEb(p.c,q)}if(g.c.j==npd){q=new Nlc(b,new rjd(b.a,e.d.d+e.d.a),e,g);q.f.d=true;q.a=g.c;ZEb(p.c,q)}while(d.b!=d.d.c){c=RD(evb(d),8);if(!rGb(b.b,c.b)){k=new Nlc(b,c,null,g);ZEb(p.c,k);if(j){j=false;if(c.b<e.d.d){k.f.a=true}else if(c.b>e.d.d+e.d.a){k.f.d=true}else{k.f.d=true;k.f.a=true}}}d.b!=d.d.c&&(b=c)}if(k){f=RD(Wjb(a.f,g.d.i),60);if(b.b<f.d.d){k.f.a=true}else if(b.b>f.d.d+f.d.a){k.f.d=true}else{k.f.d=true;k.f.a=true}}}}for(h=new is(Mr(Z2b(n).a.Kc(),new ir));gs(h);){g=RD(hs(h),18);if(g.a.b!=0){b=RD(Rub(g.a),8);if(g.d.j==(qpd(),Yod)){q=new Nlc(b,new rjd(b.a,e.d.d),e,g);q.f.a=true;q.a=g.d;ZEb(p.c,q)}if(g.d.j==npd){q=new Nlc(b,new rjd(b.a,e.d.d+e.d.a),e,g);q.f.d=true;q.a=g.d;ZEb(p.c,q)}}}}}return p} +function Nvd(a,b,c){var d,e,f,g,h,i,j,k,l,m;i=new bnb;l=b.length;g=$5d(c);for(j=0;j<l;++j){k=rhb(b,Fhb(61),j);d=wvd(g,(AFb(j,k,b.length),b.substr(j,k-j)));e=iXd(d);f=e.jk().wi();switch(ihb(b,++k)){case 39:{h=phb(b,39,++k);Rmb(i,new KTd(d,lwd((AFb(k,h,b.length),b.substr(k,h-k)),f,e)));j=h+1;break}case 34:{h=phb(b,34,++k);Rmb(i,new KTd(d,lwd((AFb(k,h,b.length),b.substr(k,h-k)),f,e)));j=h+1;break}case 91:{m=new bnb;Rmb(i,new KTd(d,m));n:for(;;){switch(ihb(b,++k)){case 39:{h=phb(b,39,++k);Rmb(m,lwd((AFb(k,h,b.length),b.substr(k,h-k)),f,e));k=h+1;break}case 34:{h=phb(b,34,++k);Rmb(m,lwd((AFb(k,h,b.length),b.substr(k,h-k)),f,e));k=h+1;break}case 110:{++k;if(b.indexOf('ull',k)==k){m.c.push(null)}else{throw Adb(new yz(MHe))}k+=3;break}}if(k<l){switch(BFb(k,b.length),b.charCodeAt(k)){case 44:{break}case 93:{break n}default:{throw Adb(new yz('Expecting , or ]'))}}}else{break}}j=k+1;break}case 110:{++k;if(b.indexOf('ull',k)==k){Rmb(i,new KTd(d,null))}else{throw Adb(new yz(MHe))}j=k+3;break}}if(j<l){BFb(j,b.length);if(b.charCodeAt(j)!=44){throw Adb(new yz('Expecting ,'))}}else{break}}return Ovd(a,i,c)} +function Oqe(a){var b,c,d,e,f;b=a.c;f=null;switch(b){case 6:return a.Em();case 13:return a.Fm();case 23:return a.wm();case 22:return a.Bm();case 18:return a.ym();case 8:Mqe(a);f=(Vse(),Dse);break;case 9:return a.em(true);case 19:return a.fm();case 10:switch(a.a){case 100:case 68:case 119:case 87:case 115:case 83:f=a.dm(a.a);Mqe(a);return f;case 101:case 102:case 110:case 114:case 116:case 117:case 118:case 120:{c=a.cm();c<txe?(f=(Vse(),Vse(),++Use,new Hte(0,c))):(f=cte(qse(c)))}break;case 99:return a.om();case 67:return a.jm();case 105:return a.rm();case 73:return a.km();case 103:return a.pm();case 88:return a.lm();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a.gm();case 80:case 112:f=Sqe(a,a.a);if(!f)throw Adb(new Lqe(TId((Hde(),hJe))));break;default:f=Yse(a.a);}Mqe(a);break;case 0:if(a.a==93||a.a==123||a.a==125)throw Adb(new Lqe(TId((Hde(),gJe))));f=Yse(a.a);d=a.a;Mqe(a);if((d&64512)==uxe&&a.c==0&&(a.a&64512)==56320){e=$C(hE,zwe,28,2,15,1);e[0]=d&Bwe;e[1]=a.a&Bwe;f=bte(cte(Ihb(e,0,e.length)),0);Mqe(a)}break;default:throw Adb(new Lqe(TId((Hde(),gJe))));}return f} +function WUc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F;C=new Yub;w=new Yub;q=-1;for(i=new Anb(a);i.a<i.c.c.length;){g=RD(ynb(i),131);g.s=q--;k=0;t=0;for(f=new Anb(g.t);f.a<f.c.c.length;){d=RD(ynb(f),274);t+=d.c}for(e=new Anb(g.i);e.a<e.c.c.length;){d=RD(ynb(e),274);k+=d.c}g.n=k;g.u=t;t==0?(Pub(w,g,w.c.b,w.c),true):k==0&&(Pub(C,g,C.c.b,C.c),true)}F=Xx(a);l=a.c.length;p=l+1;r=l-1;n=new bnb;while(F.a.gc()!=0){while(w.b!=0){v=(sFb(w.b!=0),RD(Wub(w,w.a.a),131));F.a.Bc(v)!=null;v.s=r--;$Uc(v,C,w)}while(C.b!=0){A=(sFb(C.b!=0),RD(Wub(C,C.a.a),131));F.a.Bc(A)!=null;A.s=p++;$Uc(A,C,w)}o=qwe;for(j=F.a.ec().Kc();j.Ob();){g=RD(j.Pb(),131);s=g.u-g.n;if(s>=o){if(s>o){n.c.length=0;o=s}ZEb(n.c,g)}}if(n.c.length!=0){m=RD(Vmb(n,Jwb(b,n.c.length)),131);F.a.Bc(m)!=null;m.s=p++;$Uc(m,C,w);n.c.length=0}}u=a.c.length+1;for(h=new Anb(a);h.a<h.c.c.length;){g=RD(ynb(h),131);g.s<l&&(g.s+=u)}for(B=new Anb(a);B.a<B.c.c.length;){A=RD(ynb(B),131);c=new Jkb(A.t,0);while(c.b<c.d.gc()){d=(sFb(c.b<c.d.gc()),RD(c.d.Xb(c.c=c.b++),274));D=d.b;if(A.s>D.s){Ckb(c);Ymb(D.i,d);if(d.c>0){d.a=D;Rmb(D.t,d);d.b=A;Rmb(A.i,d)}}}}} +function Efc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F;p=new cnb(b.b);u=new cnb(b.b);m=new cnb(b.b);B=new cnb(b.b);q=new cnb(b.b);for(A=Sub(b,0);A.b!=A.d.c;){v=RD(evb(A),12);for(h=new Anb(v.g);h.a<h.c.c.length;){f=RD(ynb(h),18);if(f.c.i==f.d.i){if(v.j==f.d.j){ZEb(B.c,f);continue}else if(v.j==(qpd(),Yod)&&f.d.j==npd){ZEb(q.c,f);continue}}}}for(i=new Anb(q);i.a<i.c.c.length;){f=RD(ynb(i),18);Ffc(a,f,c,d,(qpd(),Xod))}for(g=new Anb(B);g.a<g.c.c.length;){f=RD(ynb(g),18);C=new j3b(a);h3b(C,(r3b(),q3b));pQb(C,(yCc(),BBc),(Bod(),wod));pQb(C,(Ywc(),Awc),f);D=new R3b;pQb(D,Awc,f.d);Q3b(D,(qpd(),ppd));P3b(D,C);F=new R3b;pQb(F,Awc,f.c);Q3b(F,Xod);P3b(F,C);pQb(f.c,Iwc,C);pQb(f.d,Iwc,C);Y0b(f,null);Z0b(f,null);ZEb(c.c,C);pQb(C,$vc,sgb(2))}for(w=Sub(b,0);w.b!=w.d.c;){v=RD(evb(w),12);j=v.e.c.length>0;r=v.g.c.length>0;j&&r?(ZEb(m.c,v),true):j?(ZEb(p.c,v),true):r&&(ZEb(u.c,v),true)}for(o=new Anb(p);o.a<o.c.c.length;){n=RD(ynb(o),12);Rmb(e,Dfc(a,n,null,c))}for(t=new Anb(u);t.a<t.c.c.length;){s=RD(ynb(t),12);Rmb(e,Dfc(a,null,s,c))}for(l=new Anb(m);l.a<l.c.c.length;){k=RD(ynb(l),12);Rmb(e,Dfc(a,k,k,c))}} +function psd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;m=oxe;n=oxe;k=0;l=0;i=new bnb;for(h=new dMd((!a.b&&(a.b=new C5d(G4,a,12,3)),a.b));h.e!=h.i.gc();){f=RD(bMd(h),74);i=Al(cD(WC(cJ,1),rve,20,0,[i,(!f.n&&(f.n=new C5d(I4,f,1,7)),f.n)]))}for(t=Fl(Al(cD(WC(cJ,1),rve,20,0,[(!a.n&&(a.n=new C5d(I4,a,1,7)),a.n),(!a.a&&(a.a=new C5d(J4,a,10,11)),a.a),i])));gs(t);){s=RD(hs(t),422);j=RD(s.of((umd(),eld)),140);m>s.nh()-j.b&&(m=s.nh()-j.b);n>s.oh()-j.d&&(n=s.oh()-j.d);k<s.nh()+s.mh()+j.c&&(k=s.nh()+s.mh()+j.c);l<s.oh()+s.lh()+j.a&&(l=s.oh()+s.lh()+j.a)}for(g=new dMd((!a.b&&(a.b=new C5d(G4,a,12,3)),a.b));g.e!=g.i.gc();){f=RD(bMd(g),74);for(r=new dMd((!f.a&&(f.a=new C5d(F4,f,6,6)),f.a));r.e!=r.i.gc();){q=RD(bMd(r),166);o=q.j;d=q.b;p=q.k;e=q.c;m=$wnd.Math.min(m,o);m=$wnd.Math.min(m,d);k=$wnd.Math.max(k,o);k=$wnd.Math.max(k,d);n=$wnd.Math.min(n,p);n=$wnd.Math.min(n,e);l=$wnd.Math.max(l,p);l=$wnd.Math.max(l,e);for(c=new dMd((!q.a&&(q.a=new XZd(D4,q,5)),q.a));c.e!=c.i.gc();){b=RD(bMd(c),377);m=$wnd.Math.min(m,b.a);k=$wnd.Math.max(k,b.a);n=$wnd.Math.min(n,b.b);l=$wnd.Math.max(l,b.b)}}}Ixd(a,(umd(),Ikd),k-m);Ixd(a,Hkd,l-n)} +function uOc(a,b,c){var d,e,f,g,h,i,j,k,l;c.Ug('Network simplex node placement',1);a.e=b;a.n=RD(mQb(b,(Ywc(),Qwc)),312);tOc(a);fOc(a);FDb(EDb(new SDb(null,new Swb(a.e.b,16)),new iPc),new kPc(a));FDb(CDb(EDb(CDb(EDb(new SDb(null,new Swb(a.e.b,16)),new ZPc),new _Pc),new bQc),new dQc),new gPc(a));if(Heb(TD(mQb(a.e,(yCc(),gBc))))){g=c.eh(1);g.Ug('Straight Edges Pre-Processing',1);sOc(a);g.Vg()}AIb(a.f);f=RD(mQb(b,gCc),17).a*a.f.a.c.length;lJb(yJb(zJb(CJb(a.f),f),false),c.eh(1));if(a.d.a.gc()!=0){g=c.eh(1);g.Ug('Flexible Where Space Processing',1);h=RD(Lvb(KDb(GDb(new SDb(null,new Swb(a.f.a,16)),new mPc),new IOc)),17).a;i=RD(Lvb(JDb(GDb(new SDb(null,new Swb(a.f.a,16)),new oPc),new MOc)),17).a;j=i-h;k=eJb(new gJb,a.f);l=eJb(new gJb,a.f);rIb(uIb(tIb(sIb(vIb(new wIb,20000),j),k),l));FDb(CDb(CDb(_nb(a.i),new qPc),new sPc),new uPc(h,k,j,l));for(e=a.d.a.ec().Kc();e.Ob();){d=RD(e.Pb(),218);d.g=1}lJb(yJb(zJb(CJb(a.f),f),false),g.eh(1));g.Vg()}if(Heb(TD(mQb(b,gBc)))){g=c.eh(1);g.Ug('Straight Edges Post-Processing',1);rOc(a);g.Vg()}eOc(a);a.e=null;a.f=null;a.i=null;a.c=null;akb(a.k);a.j=null;a.a=null;a.o=null;a.d.a.$b();c.Vg()} +function XGc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;c.Ug('Depth first model order layering',1);a.d=b;q=new bnb;for(p=new Anb(a.d.a);p.a<p.c.c.length;){n=RD(ynb(p),10);n.k==(r3b(),p3b)&&(ZEb(q.c,n),true)}yob();_mb(q,new aHc);g=true;a.b=new R4b(a.d);a.a=null;Rmb(a.d.b,a.b);a.b.p=0;a.c=0;a.f=new Yub;for(o=new Anb(q);o.a<o.c.c.length;){n=RD(ynb(o),10);if(g){g3b(n,a.b);g=false}else{if(VGc(a,n)){m=a.c;m=UGc(m,n);d=m+2;k=m-a.c;if(a.f.b==0){TGc(a,d,n)}else{if(k>0){for(t=Sub(a.f,0);t.b!=t.d.c;){s=RD(evb(t),10);s.p+=m-a.e}WGc(a);Xub(a.f);TGc(a,d,n)}else{Mub(a.f,n);n.p=d;a.e=$wnd.Math.max(a.e,d);for(f=new is(Mr(Z2b(n).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);if(!e.c.i.c&&e.c.i.k==(r3b(),n3b)){Mub(a.f,e.c.i);e.c.i.p=d-1}}a.c=d}}}else{WGc(a);Xub(a.f);d=0;if(gs(new is(Mr(Z2b(n).a.Kc(),new ir)))){m=0;m=UGc(m,n);d=m+2;TGc(a,d,n)}else{Mub(a.f,n);n.p=0;a.e=$wnd.Math.max(a.e,0);a.b=RD(Vmb(a.d.b,0),30);a.c=0}}}}a.f.b==0||WGc(a);a.d.a.c.length=0;r=new bnb;for(j=new Anb(a.d.b);j.a<j.c.c.length;){h=RD(ynb(j),30);h.a.c.length==0&&(ZEb(r.c,h),true)}Ce(a.d.b,r);l=0;for(i=new Anb(a.d.b);i.a<i.c.c.length;){h=RD(ynb(i),30);h.p=l;++l}c.Vg()} +function EEd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K;D=null;G=b;F=pEd(a,DGd(c),G);jyd(F,zDd(G,uIe));H=RD(Ao(a.g,tDd(qC(G,bIe))),27);m=qC(G,'sourcePort');d=null;!!m&&(d=tDd(m));I=RD(Ao(a.j,d),123);if(!H){h=uDd(G);o="An edge must have a source node (edge id: '"+h;p=o+zIe;throw Adb(new CDd(p))}if(!!I&&!Hb(MCd(I),H)){i=zDd(G,uIe);q="The source port of an edge must be a port of the edge's source node (edge id: '"+i;r=q+zIe;throw Adb(new CDd(r))}B=(!F.b&&(F.b=new Yie(E4,F,4,7)),F.b);f=null;I?(f=I):(f=H);WGd(B,f);J=RD(Ao(a.g,tDd(qC(G,CIe))),27);n=qC(G,'targetPort');e=null;!!n&&(e=tDd(n));K=RD(Ao(a.j,e),123);if(!J){l=uDd(G);s="An edge must have a target node (edge id: '"+l;t=s+zIe;throw Adb(new CDd(t))}if(!!K&&!Hb(MCd(K),J)){j=zDd(G,uIe);u="The target port of an edge must be a port of the edge's target node (edge id: '"+j;v=u+zIe;throw Adb(new CDd(v))}C=(!F.c&&(F.c=new Yie(E4,F,5,8)),F.c);g=null;K?(g=K):(g=J);WGd(C,g);if((!F.b&&(F.b=new Yie(E4,F,4,7)),F.b).i==0||(!F.c&&(F.c=new Yie(E4,F,5,8)),F.c).i==0){k=zDd(G,uIe);w=yIe+k;A=w+zIe;throw Adb(new CDd(A))}GEd(G,F);FEd(G,F);D=CEd(a,G,F);return D} +function JTb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I;n=RD(mQb(a,(JVb(),HVb)),27);t=lve;u=lve;r=qwe;s=qwe;for(w=new Anb(a.e);w.a<w.c.c.length;){v=RD(ynb(w),153);F=v.d;G=v.e;t=$wnd.Math.min(t,F.a-G.a/2);u=$wnd.Math.min(u,F.b-G.b/2);r=$wnd.Math.max(r,F.a+G.a/2);s=$wnd.Math.max(s,F.b+G.b/2)}for(c=new Anb(a.b);c.a<c.c.c.length;){b=RD(ynb(c),250);F=b.d;G=b.e;t=$wnd.Math.min(t,F.a-G.a/2);u=$wnd.Math.min(u,F.b-G.b/2);r=$wnd.Math.max(r,F.a+G.a/2);s=$wnd.Math.max(s,F.b+G.b/2)}D=RD(Gxd(n,(yVb(),hVb)),107);C=new rjd(D.b-t,D.d-u);for(j=new Anb(a.e);j.a<j.c.c.length;){i=RD(ynb(j),153);B=mQb(i,HVb);if(ZD(B,207)){p=RD(B,27);A=$id(new sjd(i.d),C);Byd(p,A.a-p.g/2,A.b-p.f/2)}}for(f=new Anb(a.c);f.a<f.c.c.length;){e=RD(ynb(f),290);l=RD(mQb(e,HVb),74);m=IGd(l,true,true);H=new sjd(ZTb(e));$id(H,C);Nzd(m,H.a,H.b);Umb(e.a,new OTb(C,m));d=new sjd($Tb(e));$id(d,C);Gzd(m,d.a,d.b)}for(h=new Anb(a.d);h.a<h.c.c.length;){g=RD(ynb(h),454);o=RD(mQb(g,HVb),135);q=$id(new sjd(g.d),C);Byd(o,q.a,q.b)}I=r-t+(D.b+D.c);k=s-u+(D.d+D.a);Heb(TD(Gxd(n,(umd(),mld))))||Esd(n,I,k,false,true);Ixd(n,Ikd,I-(D.b+D.c));Ixd(n,Hkd,k-(D.d+D.a))} +function F$b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;l=H$b(B$b(a,(qpd(),bpd)),b);o=G$b(B$b(a,cpd),b);u=G$b(B$b(a,kpd),b);B=I$b(B$b(a,mpd),b);m=I$b(B$b(a,Zod),b);s=G$b(B$b(a,jpd),b);p=G$b(B$b(a,dpd),b);w=G$b(B$b(a,lpd),b);v=G$b(B$b(a,$od),b);C=I$b(B$b(a,apd),b);r=G$b(B$b(a,hpd),b);t=G$b(B$b(a,gpd),b);A=G$b(B$b(a,_od),b);D=I$b(B$b(a,ipd),b);n=I$b(B$b(a,epd),b);q=G$b(B$b(a,fpd),b);c=Hid(cD(WC(iE,1),vxe,28,15,[s.a,B.a,w.a,D.a]));d=Hid(cD(WC(iE,1),vxe,28,15,[o.a,l.a,u.a,q.a]));e=r.a;f=Hid(cD(WC(iE,1),vxe,28,15,[p.a,m.a,v.a,n.a]));j=Hid(cD(WC(iE,1),vxe,28,15,[s.b,o.b,p.b,t.b]));i=Hid(cD(WC(iE,1),vxe,28,15,[B.b,l.b,m.b,q.b]));k=C.b;h=Hid(cD(WC(iE,1),vxe,28,15,[w.b,u.b,v.b,A.b]));x$b(B$b(a,bpd),c+e,j+k);x$b(B$b(a,fpd),c+e,j+k);x$b(B$b(a,cpd),c+e,0);x$b(B$b(a,kpd),c+e,j+k+i);x$b(B$b(a,mpd),0,j+k);x$b(B$b(a,Zod),c+e+d,j+k);x$b(B$b(a,dpd),c+e+d,0);x$b(B$b(a,lpd),0,j+k+i);x$b(B$b(a,$od),c+e+d,j+k+i);x$b(B$b(a,apd),0,j);x$b(B$b(a,hpd),c,0);x$b(B$b(a,_od),0,j+k+i);x$b(B$b(a,epd),c+e+d,0);g=new pjd;g.a=Hid(cD(WC(iE,1),vxe,28,15,[c+d+e+f,C.a,t.a,A.a]));g.b=Hid(cD(WC(iE,1),vxe,28,15,[j+i+k+h,r.b,D.b,n.b]));return g} +function EFb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;s=new rjd(oxe,oxe);b=new rjd(pxe,pxe);for(B=new Anb(a);B.a<B.c.c.length;){A=RD(ynb(B),8);s.a=$wnd.Math.min(s.a,A.a);s.b=$wnd.Math.min(s.b,A.b);b.a=$wnd.Math.max(b.a,A.a);b.b=$wnd.Math.max(b.b,A.b)}m=new rjd(b.a-s.a,b.b-s.b);j=new rjd(s.a-50,s.b-m.a-50);k=new rjd(s.a-50,b.b+m.a+50);l=new rjd(b.a+m.b/2+50,s.b+m.b/2);n=new XFb(j,k,l);w=new _sb;f=new bnb;c=new bnb;w.a.zc(n,w);for(D=new Anb(a);D.a<D.c.c.length;){C=RD(ynb(D),8);f.c.length=0;for(v=w.a.ec().Kc();v.Ob();){t=RD(v.Pb(),317);d=t.d;bjd(d,t.a);$y(bjd(t.d,C),bjd(t.d,t.a))<0&&(ZEb(f.c,t),true)}c.c.length=0;for(u=new Anb(f);u.a<u.c.c.length;){t=RD(ynb(u),317);for(q=new Anb(t.e);q.a<q.c.c.length;){o=RD(ynb(q),177);g=true;for(i=new Anb(f);i.a<i.c.c.length;){h=RD(ynb(i),317);h!=t&&(Fvb(o,Vmb(h.e,0))||Fvb(o,Vmb(h.e,1))||Fvb(o,Vmb(h.e,2)))&&(g=false)}g&&(ZEb(c.c,o),true)}}Ve(w,f);xgb(w,new FFb);for(p=new Anb(c);p.a<p.c.c.length;){o=RD(ynb(p),177);Ysb(w,new XFb(C,o.a,o.b))}}r=new _sb;xgb(w,new HFb(r));e=r.a.ec().Kc();while(e.Ob()){o=RD(e.Pb(),177);(WFb(n,o.a)||WFb(n,o.b))&&e.Qb()}xgb(r,new JFb);return r} +function pvd(){pvd=geb;dvd();ovd=cvd.a;RD(QHd(xYd(cvd.a),0),19);ivd=cvd.f;RD(QHd(xYd(cvd.f),0),19);RD(QHd(xYd(cvd.f),1),35);nvd=cvd.n;RD(QHd(xYd(cvd.n),0),35);RD(QHd(xYd(cvd.n),1),35);RD(QHd(xYd(cvd.n),2),35);RD(QHd(xYd(cvd.n),3),35);jvd=cvd.g;RD(QHd(xYd(cvd.g),0),19);RD(QHd(xYd(cvd.g),1),35);fvd=cvd.c;RD(QHd(xYd(cvd.c),0),19);RD(QHd(xYd(cvd.c),1),19);kvd=cvd.i;RD(QHd(xYd(cvd.i),0),19);RD(QHd(xYd(cvd.i),1),19);RD(QHd(xYd(cvd.i),2),19);RD(QHd(xYd(cvd.i),3),19);RD(QHd(xYd(cvd.i),4),35);lvd=cvd.j;RD(QHd(xYd(cvd.j),0),19);gvd=cvd.d;RD(QHd(xYd(cvd.d),0),19);RD(QHd(xYd(cvd.d),1),19);RD(QHd(xYd(cvd.d),2),19);RD(QHd(xYd(cvd.d),3),19);RD(QHd(xYd(cvd.d),4),35);RD(QHd(xYd(cvd.d),5),35);RD(QHd(xYd(cvd.d),6),35);RD(QHd(xYd(cvd.d),7),35);evd=cvd.b;RD(QHd(xYd(cvd.b),0),35);RD(QHd(xYd(cvd.b),1),35);hvd=cvd.e;RD(QHd(xYd(cvd.e),0),35);RD(QHd(xYd(cvd.e),1),35);RD(QHd(xYd(cvd.e),2),35);RD(QHd(xYd(cvd.e),3),35);RD(QHd(xYd(cvd.e),4),19);RD(QHd(xYd(cvd.e),5),19);RD(QHd(xYd(cvd.e),6),19);RD(QHd(xYd(cvd.e),7),19);RD(QHd(xYd(cvd.e),8),19);RD(QHd(xYd(cvd.e),9),19);RD(QHd(xYd(cvd.e),10),35);mvd=cvd.k;RD(QHd(xYd(cvd.k),0),35);RD(QHd(xYd(cvd.k),1),35)} +function Pqe(a){var b,c,d,e,f;b=a.c;switch(b){case 11:return a.vm();case 12:return a.xm();case 14:return a.zm();case 15:return a.Cm();case 16:return a.Am();case 17:return a.Dm();case 21:Mqe(a);return Vse(),Vse(),Ese;case 10:switch(a.a){case 65:return a.hm();case 90:return a.mm();case 122:return a.tm();case 98:return a.nm();case 66:return a.im();case 60:return a.sm();case 62:return a.qm();}}f=Oqe(a);b=a.c;switch(b){case 3:return a.Im(f);case 4:return a.Gm(f);case 5:return a.Hm(f);case 0:if(a.a==123&&a.d<a.j){e=a.d;d=0;c=-1;if((b=ihb(a.i,e++))>=48&&b<=57){d=b-48;while(e<a.j&&(b=ihb(a.i,e++))>=48&&b<=57){d=d*10+b-48;if(d<0)throw Adb(new Lqe(TId((Hde(),CJe))))}}else{throw Adb(new Lqe(TId((Hde(),yJe))))}c=d;if(b==44){if(e>=a.j){throw Adb(new Lqe(TId((Hde(),AJe))))}else if((b=ihb(a.i,e++))>=48&&b<=57){c=b-48;while(e<a.j&&(b=ihb(a.i,e++))>=48&&b<=57){c=c*10+b-48;if(c<0)throw Adb(new Lqe(TId((Hde(),CJe))))}if(d>c)throw Adb(new Lqe(TId((Hde(),BJe))))}else{c=-1}}if(b!=125)throw Adb(new Lqe(TId((Hde(),zJe))));if(a.bm(e)){f=(Vse(),Vse(),++Use,new Kte(9,f));a.d=e+1}else{f=(Vse(),Vse(),++Use,new Kte(3,f));a.d=e}f.Om(d);f.Nm(c);Mqe(a)}}return f} +function bXb(a){var b,c,d,e,f;c=RD(mQb(a,(Ywc(),kwc)),21);b=vfd(YWb);e=RD(mQb(a,(yCc(),IAc)),346);e==(Fnd(),Cnd)&&ofd(b,ZWb);Heb(TD(mQb(a,GAc)))?pfd(b,(sXb(),nXb),(hcc(),Zbc)):pfd(b,(sXb(),pXb),(hcc(),Zbc));mQb(a,(rid(),qid))!=null&&ofd(b,$Wb);(Heb(TD(mQb(a,PAc)))||Heb(TD(mQb(a,HAc))))&&nfd(b,(sXb(),rXb),(hcc(),lbc));switch(RD(mQb(a,rAc),88).g){case 2:case 3:case 4:nfd(pfd(b,(sXb(),nXb),(hcc(),nbc)),rXb,mbc);}c.Hc((ovc(),fvc))&&nfd(pfd(pfd(b,(sXb(),nXb),(hcc(),kbc)),qXb,ibc),rXb,jbc);dE(mQb(a,ZAc))!==dE((aEc(),$Dc))&&pfd(b,(sXb(),pXb),(hcc(),Rbc));if(c.Hc(mvc)){pfd(b,(sXb(),nXb),(hcc(),Xbc));pfd(b,oXb,Vbc);pfd(b,pXb,Wbc)}dE(mQb(a,Xzc))!==dE(($uc(),Yuc))&&dE(mQb(a,yAc))!==dE((Ymd(),Vmd))&&nfd(b,(sXb(),rXb),(hcc(),Abc));Heb(TD(mQb(a,KAc)))&&pfd(b,(sXb(),pXb),(hcc(),zbc));Heb(TD(mQb(a,nAc)))&&pfd(b,(sXb(),pXb),(hcc(),dcc));if(eXb(a)){dE(mQb(a,IAc))===dE(Cnd)?(d=RD(mQb(a,gAc),299)):(d=RD(mQb(a,hAc),299));f=d==(xvc(),vvc)?(hcc(),Ubc):(hcc(),gcc);pfd(b,(sXb(),qXb),f)}switch(RD(mQb(a,vCc),388).g){case 1:pfd(b,(sXb(),qXb),(hcc(),ecc));break;case 2:nfd(pfd(pfd(b,(sXb(),pXb),(hcc(),ebc)),qXb,fbc),rXb,gbc);}dE(mQb(a,cAc))!==dE((kEc(),hEc))&&pfd(b,(sXb(),pXb),(hcc(),fcc));return b} +function crc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;if(Ujb(a.a,b)){if(Zsb(RD(Wjb(a.a,b),49),c)){return 1}}else{Zjb(a.a,b,new _sb)}if(Ujb(a.a,c)){if(Zsb(RD(Wjb(a.a,c),49),b)){return -1}}else{Zjb(a.a,c,new _sb)}if(Ujb(a.e,b)){if(Zsb(RD(Wjb(a.e,b),49),c)){return -1}}else{Zjb(a.e,b,new _sb)}if(Ujb(a.e,c)){if(Zsb(RD(Wjb(a.a,c),49),b)){return 1}}else{Zjb(a.e,c,new _sb)}if(a.c==(kEc(),iEc)||!nQb(b,(Ywc(),zwc))||!nQb(c,(Ywc(),zwc))){l=null;for(j=new Anb(b.j);j.a<j.c.c.length;){h=RD(ynb(j),12);h.e.c.length==0||RD(Vmb(h.e,0),18).c.i.c!=b.c&&(l=RD(Vmb(h.e,0),18).c)}n=null;for(i=new Anb(c.j);i.a<i.c.c.length;){h=RD(ynb(i),12);h.e.c.length==0||RD(Vmb(h.e,0),18).c.i.c!=c.c&&(n=RD(Vmb(h.e,0),18).c)}if(!!l&&!!n){k=l.i;m=n.i;if(!!k&&k==m){for(p=new Anb(k.j);p.a<p.c.c.length;){o=RD(ynb(p),12);if(o==l){erc(a,c,b);return -1}else if(o==n){erc(a,b,c);return 1}}return hgb(drc(a,b),drc(a,c))}for(r=a.d,s=0,t=r.length;s<t;++s){q=r[s];if(q==k){erc(a,c,b);return -1}else if(q==m){erc(a,b,c);return 1}}}if(!nQb(b,(Ywc(),zwc))||!nQb(c,zwc)){e=drc(a,b);g=drc(a,c);e>g?erc(a,b,c):erc(a,c,b);return e<g?-1:e>g?1:0}}d=RD(mQb(b,(Ywc(),zwc)),17).a;f=RD(mQb(c,zwc),17).a;d>f?erc(a,b,c):erc(a,c,b);return d<f?-1:d>f?1:0} +function uAd(b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;if(d==null){return null}if(b.a!=c.jk()){throw Adb(new agb(VHe+c.xe()+WHe))}if(ZD(c,469)){r=z1d(RD(c,685),d);if(!r){throw Adb(new agb(XHe+d+"' is not a valid enumerator of '"+c.xe()+"'"))}return r}switch(Oee((lke(),jke),c).Nl()){case 2:{d=nue(d,false);break}case 3:{d=nue(d,true);break}}e=Oee(jke,c).Jl();if(e){return e.jk().wi().ti(e,d)}n=Oee(jke,c).Ll();if(n){r=new bnb;for(k=xAd(d),l=0,m=k.length;l<m;++l){j=k[l];Rmb(r,n.jk().wi().ti(n,j))}return r}q=Oee(jke,c).Ml();if(!q.dc()){for(p=q.Kc();p.Ob();){o=RD(p.Pb(),156);try{r=o.jk().wi().ti(o,d);if(r!=null){return r}}catch(a){a=zdb(a);if(!ZD(a,63))throw Adb(a)}}throw Adb(new agb(XHe+d+"' does not match any member types of the union datatype '"+c.xe()+"'"))}RD(c,847).ok();f=Qje(c.kk());if(!f)return null;if(f==SI){h=0;try{h=Oeb(d,qwe,lve)&Bwe}catch(a){a=zdb(a);if(ZD(a,130)){g=Ahb(d);h=g[0]}else throw Adb(a)}return hfb(h)}if(f==qK){for(i=0;i<nAd.length;++i){try{return b2d(nAd[i],d)}catch(a){a=zdb(a);if(!ZD(a,33))throw Adb(a)}}throw Adb(new agb(XHe+d+"' is not a date formatted string of the form yyyy-MM-dd'T'HH:mm:ss'.'SSSZ or a valid subset thereof"))}throw Adb(new agb(XHe+d+"' is invalid. "))} +function z$b(){z$b=geb;y$b=new Tp;Rc(y$b,(qpd(),bpd),fpd);Rc(y$b,mpd,fpd);Rc(y$b,mpd,ipd);Rc(y$b,Zod,epd);Rc(y$b,Zod,fpd);Rc(y$b,cpd,fpd);Rc(y$b,cpd,gpd);Rc(y$b,kpd,_od);Rc(y$b,kpd,fpd);Rc(y$b,hpd,apd);Rc(y$b,hpd,fpd);Rc(y$b,hpd,gpd);Rc(y$b,hpd,_od);Rc(y$b,apd,hpd);Rc(y$b,apd,ipd);Rc(y$b,apd,epd);Rc(y$b,apd,fpd);Rc(y$b,jpd,jpd);Rc(y$b,jpd,gpd);Rc(y$b,jpd,ipd);Rc(y$b,dpd,dpd);Rc(y$b,dpd,gpd);Rc(y$b,dpd,epd);Rc(y$b,lpd,lpd);Rc(y$b,lpd,_od);Rc(y$b,lpd,ipd);Rc(y$b,$od,$od);Rc(y$b,$od,_od);Rc(y$b,$od,epd);Rc(y$b,gpd,cpd);Rc(y$b,gpd,hpd);Rc(y$b,gpd,jpd);Rc(y$b,gpd,dpd);Rc(y$b,gpd,fpd);Rc(y$b,gpd,gpd);Rc(y$b,gpd,ipd);Rc(y$b,gpd,epd);Rc(y$b,_od,kpd);Rc(y$b,_od,hpd);Rc(y$b,_od,lpd);Rc(y$b,_od,$od);Rc(y$b,_od,_od);Rc(y$b,_od,ipd);Rc(y$b,_od,epd);Rc(y$b,_od,fpd);Rc(y$b,ipd,mpd);Rc(y$b,ipd,apd);Rc(y$b,ipd,jpd);Rc(y$b,ipd,lpd);Rc(y$b,ipd,gpd);Rc(y$b,ipd,_od);Rc(y$b,ipd,ipd);Rc(y$b,ipd,fpd);Rc(y$b,epd,Zod);Rc(y$b,epd,apd);Rc(y$b,epd,dpd);Rc(y$b,epd,$od);Rc(y$b,epd,gpd);Rc(y$b,epd,_od);Rc(y$b,epd,epd);Rc(y$b,epd,fpd);Rc(y$b,fpd,bpd);Rc(y$b,fpd,mpd);Rc(y$b,fpd,Zod);Rc(y$b,fpd,cpd);Rc(y$b,fpd,kpd);Rc(y$b,fpd,hpd);Rc(y$b,fpd,apd);Rc(y$b,fpd,gpd);Rc(y$b,fpd,_od);Rc(y$b,fpd,ipd);Rc(y$b,fpd,epd);Rc(y$b,fpd,fpd)} +function _$b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;a.d=new rjd(oxe,oxe);a.c=new rjd(pxe,pxe);for(m=b.Kc();m.Ob();){k=RD(m.Pb(),36);for(t=new Anb(k.a);t.a<t.c.c.length;){s=RD(ynb(t),10);a.d.a=$wnd.Math.min(a.d.a,s.n.a-s.d.b);a.d.b=$wnd.Math.min(a.d.b,s.n.b-s.d.d);a.c.a=$wnd.Math.max(a.c.a,s.n.a+s.o.a+s.d.c);a.c.b=$wnd.Math.max(a.c.b,s.n.b+s.o.b+s.d.a)}}h=new q_b;for(l=b.Kc();l.Ob();){k=RD(l.Pb(),36);d=i_b(a,k);Rmb(h.a,d);d.a=d.a|!RD(mQb(d.c,(Ywc(),ewc)),21).dc()}a.b=(NXb(),B=new XXb,B.f=new EXb(c),B.b=DXb(B.f,h),B);RXb((o=a.b,new Oqd,o));a.e=new pjd;a.a=a.b.f.e;for(g=new Anb(h.a);g.a<g.c.c.length;){e=RD(ynb(g),855);u=SXb(a.b,e);o2b(e.c,u.a,u.b);for(q=new Anb(e.c.a);q.a<q.c.c.length;){p=RD(ynb(q),10);if(p.k==(r3b(),m3b)){r=d_b(a,p.n,RD(mQb(p,(Ywc(),hwc)),64));$id(hjd(p.n),r)}}}for(f=new Anb(h.a);f.a<f.c.c.length;){e=RD(ynb(f),855);for(j=new Anb(o_b(e));j.a<j.c.c.length;){i=RD(ynb(j),18);A=new Fjd(i.a);hu(A,0,K3b(i.c));Mub(A,K3b(i.d));n=null;for(w=Sub(A,0);w.b!=w.d.c;){v=RD(evb(w),8);if(!n){n=v;continue}if(_y(n.a,v.a)){a.e.a=$wnd.Math.min(a.e.a,n.a);a.a.a=$wnd.Math.max(a.a.a,n.a)}else if(_y(n.b,v.b)){a.e.b=$wnd.Math.min(a.e.b,n.b);a.a.b=$wnd.Math.max(a.a.b,n.b)}n=v}}}fjd(a.e);$id(a.a,a.e)} +function vib(a,b){var c,d,e,f,g,h,i,j;c=0;g=0;f=b.length;h=null;j=new cib;if(g<f&&(BFb(g,b.length),b.charCodeAt(g)==43)){++g;++c;if(g<f&&(BFb(g,b.length),b.charCodeAt(g)==43||(BFb(g,b.length),b.charCodeAt(g)==45))){throw Adb(new Vgb(nxe+b+'"'))}}while(g<f&&(BFb(g,b.length),b.charCodeAt(g)!=46)&&(BFb(g,b.length),b.charCodeAt(g)!=101)&&(BFb(g,b.length),b.charCodeAt(g)!=69)){++g}j.a+=''+zhb(b==null?vve:(uFb(b),b),c,g);if(g<f&&(BFb(g,b.length),b.charCodeAt(g)==46)){++g;c=g;while(g<f&&(BFb(g,b.length),b.charCodeAt(g)!=101)&&(BFb(g,b.length),b.charCodeAt(g)!=69)){++g}a.e=g-c;j.a+=''+zhb(b==null?vve:(uFb(b),b),c,g)}else{a.e=0}if(g<f&&(BFb(g,b.length),b.charCodeAt(g)==101||(BFb(g,b.length),b.charCodeAt(g)==69))){++g;c=g;if(g<f&&(BFb(g,b.length),b.charCodeAt(g)==43)){++g;g<f&&(BFb(g,b.length),b.charCodeAt(g)!=45)&&++c}h=(AFb(c,f,b.length),b.substr(c,f-c));a.e=a.e-Oeb(h,qwe,lve);if(a.e!=eE(a.e)){throw Adb(new Vgb('Scale out of range.'))}}i=j.a;if(i.length<16){a.f=(sib==null&&(sib=new RegExp('^[+-]?\\d*$','i')),sib.test(i)?parseInt(i,10):NaN);if(isNaN(a.f)){throw Adb(new Vgb(nxe+b+'"'))}a.a=Cib(a.f)}else{wib(a,new ejb(i))}a.d=j.a.length;for(e=0;e<j.a.length;++e){d=ihb(j.a,e);if(d!=45&&d!=48){break}--a.d}a.d==0&&(a.d=1)} +function Wae(a){_Ad(a.b,AKe,cD(WC(qJ,1),Nve,2,6,[CKe,'ConsistentTransient']));_Ad(a.a,AKe,cD(WC(qJ,1),Nve,2,6,[CKe,'WellFormedSourceURI']));_Ad(a.o,AKe,cD(WC(qJ,1),Nve,2,6,[CKe,'InterfaceIsAbstract AtMostOneID UniqueFeatureNames UniqueOperationSignatures NoCircularSuperTypes WellFormedMapEntryClass ConsistentSuperTypes DisjointFeatureAndOperationSignatures']));_Ad(a.p,AKe,cD(WC(qJ,1),Nve,2,6,[CKe,'WellFormedInstanceTypeName UniqueTypeParameterNames']));_Ad(a.v,AKe,cD(WC(qJ,1),Nve,2,6,[CKe,'UniqueEnumeratorNames UniqueEnumeratorLiterals']));_Ad(a.R,AKe,cD(WC(qJ,1),Nve,2,6,[CKe,'WellFormedName']));_Ad(a.T,AKe,cD(WC(qJ,1),Nve,2,6,[CKe,'UniqueParameterNames UniqueTypeParameterNames NoRepeatingVoid']));_Ad(a.U,AKe,cD(WC(qJ,1),Nve,2,6,[CKe,'WellFormedNsURI WellFormedNsPrefix UniqueSubpackageNames UniqueClassifierNames UniqueNsURIs']));_Ad(a.W,AKe,cD(WC(qJ,1),Nve,2,6,[CKe,'ConsistentOpposite SingleContainer ConsistentKeys ConsistentUnique ConsistentContainer']));_Ad(a.bb,AKe,cD(WC(qJ,1),Nve,2,6,[CKe,'ValidDefaultValueLiteral']));_Ad(a.eb,AKe,cD(WC(qJ,1),Nve,2,6,[CKe,'ValidLowerBound ValidUpperBound ConsistentBounds ValidType']));_Ad(a.H,AKe,cD(WC(qJ,1),Nve,2,6,[CKe,'ConsistentType ConsistentBounds ConsistentArguments']))} +function S7b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C;if(b.dc()){return}e=new Ejd;h=c?c:RD(b.Xb(0),18);o=h.c;HUc();m=o.i.k;if(!(m==(r3b(),p3b)||m==q3b||m==m3b||m==l3b)){throw Adb(new agb('The target node of the edge must be a normal node or a northSouthPort.'))}Oub(e,xjd(cD(WC(l3,1),Nve,8,0,[o.i.n,o.n,o.a])));if((qpd(),hpd).Hc(o.j)){q=Kfb(UD(mQb(o,(Ywc(),Swc))));l=new rjd(xjd(cD(WC(l3,1),Nve,8,0,[o.i.n,o.n,o.a])).a,q);Pub(e,l,e.c.b,e.c)}k=null;d=false;i=b.Kc();while(i.Ob()){g=RD(i.Pb(),18);f=g.a;if(f.b!=0){if(d){j=ijd($id(k,(sFb(f.b!=0),RD(f.a.a.c,8))),0.5);Pub(e,j,e.c.b,e.c);d=false}else{d=true}k=ajd((sFb(f.b!=0),RD(f.c.b.c,8)));ye(e,f);Xub(f)}}p=h.d;if(hpd.Hc(p.j)){q=Kfb(UD(mQb(p,(Ywc(),Swc))));l=new rjd(xjd(cD(WC(l3,1),Nve,8,0,[p.i.n,p.n,p.a])).a,q);Pub(e,l,e.c.b,e.c)}Oub(e,xjd(cD(WC(l3,1),Nve,8,0,[p.i.n,p.n,p.a])));a.d==(lFc(),iFc)&&(r=(sFb(e.b!=0),RD(e.a.a.c,8)),s=RD(ju(e,1),8),t=new qjd(BVc(o.j)),t.a*=5,t.b*=5,u=ojd(new rjd(s.a,s.b),r),v=new rjd(R7b(t.a,u.a),R7b(t.b,u.b)),$id(v,r),w=Sub(e,1),cvb(w,v),A=(sFb(e.b!=0),RD(e.c.b.c,8)),B=RD(ju(e,e.b-2),8),t=new qjd(BVc(p.j)),t.a*=5,t.b*=5,u=ojd(new rjd(B.a,B.b),A),C=new rjd(R7b(t.a,u.a),R7b(t.b,u.b)),$id(C,A),hu(e,e.b-1,C),undefined);n=new wUc(e);ye(h.a,sUc(n))} +function cud(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L,M,N,O,P;t=RD(QHd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),0),84);v=t.nh();w=t.oh();u=t.mh()/2;p=t.lh()/2;if(ZD(t,193)){s=RD(t,123);v+=MCd(s).i;v+=MCd(s).i}v+=u;w+=p;F=RD(QHd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b),0),84);H=F.nh();I=F.oh();G=F.mh()/2;A=F.lh()/2;if(ZD(F,193)){D=RD(F,123);H+=MCd(D).i;H+=MCd(D).i}H+=G;I+=A;if((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i==0){h=(bvd(),j=new Rzd,j);WGd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a),h)}else if((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i>1){o=new mMd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a));while(o.e!=o.i.gc()){cMd(o)}}g=RD(QHd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a),0),166);q=H;H>v+u?(q=v+u):H<v-u&&(q=v-u);r=I;I>w+p?(r=w+p):I<w-p&&(r=w-p);q>v-u&&q<v+u&&r>w-p&&r<w+p&&(q=v+u);Ozd(g,q);Pzd(g,r);B=v;v>H+G?(B=H+G):v<H-G&&(B=H-G);C=w;w>I+A?(C=I+A):w<I-A&&(C=I-A);B>H-G&&B<H+G&&C>I-A&&C<I+A&&(C=I+A);Hzd(g,B);Izd(g,C);sLd((!g.a&&(g.a=new XZd(D4,g,5)),g.a));f=Jwb(b,5);t==F&&++f;L=B-q;O=C-r;J=$wnd.Math.sqrt(L*L+O*O);l=J*0.20000000298023224;M=L/(f+1);P=O/(f+1);K=q;N=r;for(k=0;k<f;k++){K+=M;N+=P;m=K+Kwb(b,24)*Nxe*l-l/2;m<0?(m=1):m>c&&(m=c-1);n=N+Kwb(b,24)*Nxe*l-l/2;n<0?(n=1):n>d&&(n=d-1);e=(bvd(),i=new Xxd,i);Vxd(e,m);Wxd(e,n);WGd((!g.a&&(g.a=new XZd(D4,g,5)),g.a),e)}} +function Y7c(a){Cgd(a,new Pfd($fd(Xfd(Zfd(Yfd(new agd,$Fe),'ELK Rectangle Packing'),'Algorithm for packing of unconnected boxes, i.e. graphs without edges. The given order of the boxes is always preserved and the main reading direction of the boxes is left to right. The algorithm is divided into two phases. One phase approximates the width in which the rectangles can be placed. The next phase places the rectangles in rows using the previously calculated width as bounding width and bundles rectangles with a similar height in blocks. A compaction step reduces the size of the drawing. Finally, the rectangles are expanded to fill their bounding box and eliminate empty unused spaces.'),new _7c)));Agd(a,$Fe,Dze,1.3);Agd(a,$Fe,hAe,(Geb(),false));Agd(a,$Fe,Eze,O7c);Agd(a,$Fe,_ze,15);Agd(a,$Fe,YDe,iGd(y7c));Agd(a,$Fe,jAe,iGd(F7c));Agd(a,$Fe,CAe,iGd(H7c));Agd(a,$Fe,iAe,iGd(I7c));Agd(a,$Fe,kAe,iGd(E7c));Agd(a,$Fe,gAe,iGd(J7c));Agd(a,$Fe,lAe,iGd(P7c));Agd(a,$Fe,RFe,iGd(U7c));Agd(a,$Fe,SFe,iGd(T7c));Agd(a,$Fe,QFe,iGd(W7c));Agd(a,$Fe,PFe,iGd(V7c));Agd(a,$Fe,TFe,iGd(M7c));Agd(a,$Fe,UFe,iGd(L7c));Agd(a,$Fe,VFe,iGd(K7c));Agd(a,$Fe,WFe,iGd(S7c));Agd(a,$Fe,dAe,iGd(B7c));Agd(a,$Fe,iEe,iGd(C7c));Agd(a,$Fe,NFe,iGd(A7c));Agd(a,$Fe,MFe,iGd(z7c));Agd(a,$Fe,OFe,iGd(D7c));Agd(a,$Fe,LFe,iGd(R7c))} +function Ajb(a,b){xjb();var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H;B=a.e;o=a.d;e=a.a;if(B==0){switch(b){case 0:return '0';case 1:return zxe;case 2:return '0.00';case 3:return '0.000';case 4:return '0.0000';case 5:return '0.00000';case 6:return '0.000000';default:w=new bib;b<0?(w.a+='0E+',w):(w.a+='0E',w);w.a+=-b;return w.a;}}t=o*10+1+7;u=$C(hE,zwe,28,t+1,15,1);c=t;if(o==1){h=e[0];if(h<0){H=Cdb(h,yxe);do{p=H;H=Fdb(H,10);u[--c]=48+Ydb(Vdb(p,Ndb(H,10)))&Bwe}while(Ddb(H,0)!=0)}else{H=h;do{p=H;H=H/10|0;u[--c]=48+(p-H*10)&Bwe}while(H!=0)}}else{D=$C(kE,Pwe,28,o,15,1);G=o;hib(e,0,D,0,G);I:while(true){A=0;for(j=G-1;j>=0;j--){F=Bdb(Sdb(A,32),Cdb(D[j],yxe));r=yjb(F);D[j]=Ydb(r);A=Ydb(Tdb(r,32))}s=Ydb(A);q=c;do{u[--c]=48+s%10&Bwe}while((s=s/10|0)!=0&&c!=0);d=9-q+c;for(i=0;i<d&&c>0;i++){u[--c]=48}l=G-1;for(;D[l]==0;l--){if(l==0){break I}}G=l+1}while(u[c]==48){++c}}n=B<0;g=t-c-b-1;if(b==0){n&&(u[--c]=45);return Ihb(u,c,t-c)}if(b>0&&g>=-6){if(g>=0){k=c+g;for(m=t-1;m>=k;m--){u[m+1]=u[m]}u[++k]=46;n&&(u[--c]=45);return Ihb(u,c,t-c+1)}for(l=2;l<-g+1;l++){u[--c]=48}u[--c]=46;u[--c]=48;n&&(u[--c]=45);return Ihb(u,c,t-c)}C=c+1;f=t;v=new cib;n&&(v.a+='-',v);if(f-C>=1){Thb(v,u[c]);v.a+='.';v.a+=Ihb(u,c+1,t-c-1)}else{v.a+=Ihb(u,c,t-c)}v.a+='E';g>0&&(v.a+='+',v);v.a+=''+g;return v.a} +function Jad(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;a.c=b;a.g=new Tsb;c=(lud(),new zud(a.c));d=new PJb(c);LJb(d);t=WD(Gxd(a.c,(ncd(),gcd)));i=RD(Gxd(a.c,icd),324);v=RD(Gxd(a.c,jcd),437);g=RD(Gxd(a.c,bcd),490);u=RD(Gxd(a.c,hcd),438);a.j=Kfb(UD(Gxd(a.c,kcd)));h=a.a;switch(i.g){case 0:h=a.a;break;case 1:h=a.b;break;case 2:h=a.i;break;case 3:h=a.e;break;case 4:h=a.f;break;default:throw Adb(new agb(eGe+(i.f!=null?i.f:''+i.g)));}a.d=new qbd(h,v,g);pQb(a.d,(OQb(),MQb),TD(Gxd(a.c,dcd)));a.d.c=Heb(TD(Gxd(a.c,ccd)));if(tCd(a.c).i==0){return a.d}for(l=new dMd(tCd(a.c));l.e!=l.i.gc();){k=RD(bMd(l),27);n=k.g/2;m=k.f/2;w=new rjd(k.i+n,k.j+m);while(Ujb(a.g,w)){Zid(w,($wnd.Math.random()-0.5)*Vze,($wnd.Math.random()-0.5)*Vze)}p=RD(Gxd(k,(umd(),eld)),140);q=new TQb(w,new Uid(w.a-n-a.j/2-p.b,w.b-m-a.j/2-p.d,k.g+a.j+(p.b+p.c),k.f+a.j+(p.d+p.a)));Rmb(a.d.i,q);Zjb(a.g,w,new Ptd(q,k))}switch(u.g){case 0:if(t==null){a.d.d=RD(Vmb(a.d.i,0),68)}else{for(s=new Anb(a.d.i);s.a<s.c.c.length;){q=RD(ynb(s),68);o=RD(RD(Wjb(a.g,q.a),42).b,27).jh();o!=null&&lhb(o,t)&&(a.d.d=q)}}break;case 1:e=new rjd(a.c.g,a.c.f);e.a*=0.5;e.b*=0.5;Zid(e,a.c.i,a.c.j);f=oxe;for(r=new Anb(a.d.i);r.a<r.c.c.length;){q=RD(ynb(r),68);j=bjd(q.a,e);if(j<f){f=j;a.d.d=q}}break;default:throw Adb(new agb(eGe+(u.f!=null?u.f:''+u.g)));}return a.d} +function b5b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;m=0;for(e=new dMd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));e.e!=e.i.gc();){d=RD(bMd(e),27);if(!Heb(TD(Gxd(d,(yCc(),pBc))))){k=vCd(d);if((dE(Gxd(k,cAc))!==dE((kEc(),hEc))||dE(Gxd(k,pAc))===dE((Ptc(),Otc))||dE(Gxd(k,pAc))===dE((Ptc(),Mtc))||Heb(TD(Gxd(k,eAc)))||dE(Gxd(k,Yzc))!==dE((U$b(),T$b))||dE(Gxd(k,ZAc))===dE((aEc(),TDc))||dE(Gxd(k,ZAc))===dE((aEc(),UDc))||dE(Gxd(k,$Ac))===dE((_Cc(),SCc))||dE(Gxd(k,$Ac))===dE((_Cc(),UCc)))&&!Heb(TD(Gxd(d,aAc)))){Ixd(d,(Ywc(),zwc),sgb(m));++m}i5b(a,d,c)}}m=0;for(j=new dMd((!b.b&&(b.b=new C5d(G4,b,12,3)),b.b));j.e!=j.i.gc();){h=RD(bMd(j),74);if(dE(Gxd(b,(yCc(),cAc)))!==dE((kEc(),hEc))||dE(Gxd(b,pAc))===dE((Ptc(),Otc))||dE(Gxd(b,pAc))===dE((Ptc(),Mtc))||Heb(TD(Gxd(b,eAc)))||dE(Gxd(b,Yzc))!==dE((U$b(),T$b))||dE(Gxd(b,ZAc))===dE((aEc(),TDc))||dE(Gxd(b,ZAc))===dE((aEc(),UDc))||dE(Gxd(b,$Ac))===dE((_Cc(),SCc))||dE(Gxd(b,$Ac))===dE((_Cc(),UCc))){Ixd(h,(Ywc(),zwc),sgb(m));++m}p=JGd(h);q=LGd(h);l=Heb(TD(Gxd(p,NAc)));o=!Heb(TD(Gxd(h,pBc)));n=l&&ozd(h)&&Heb(TD(Gxd(h,OAc)));f=vCd(p)==b&&vCd(p)==vCd(q);g=(vCd(p)==b&&q==b)^(vCd(q)==b&&p==b);o&&!n&&(g||f)&&f5b(a,h,b,c)}if(vCd(b)){for(i=new dMd(uCd(vCd(b)));i.e!=i.i.gc();){h=RD(bMd(i),74);p=JGd(h);if(p==b&&ozd(h)){n=Heb(TD(Gxd(p,(yCc(),NAc))))&&Heb(TD(Gxd(h,OAc)));n&&f5b(a,h,b,c)}}}} +function SFc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L;c.Ug('Greedy cycle removal',1);t=b.a;L=t.c.length;a.a=$C(kE,Pwe,28,L,15,1);a.c=$C(kE,Pwe,28,L,15,1);a.b=$C(kE,Pwe,28,L,15,1);j=0;for(r=new Anb(t);r.a<r.c.c.length;){p=RD(ynb(r),10);p.p=j;for(C=new Anb(p.j);C.a<C.c.c.length;){w=RD(ynb(C),12);for(h=new Anb(w.e);h.a<h.c.c.length;){d=RD(ynb(h),18);if(d.c.i==p){continue}G=RD(mQb(d,(yCc(),KBc)),17).a;a.a[j]+=G>0?G+1:1}for(g=new Anb(w.g);g.a<g.c.c.length;){d=RD(ynb(g),18);if(d.d.i==p){continue}G=RD(mQb(d,(yCc(),KBc)),17).a;a.c[j]+=G>0?G+1:1}}a.c[j]==0?Mub(a.e,p):a.a[j]==0&&Mub(a.f,p);++j}o=-1;n=1;l=new bnb;a.d=RD(mQb(b,(Ywc(),Lwc)),234);while(L>0){while(a.e.b!=0){I=RD(Uub(a.e),10);a.b[I.p]=o--;TFc(a,I);--L}while(a.f.b!=0){J=RD(Uub(a.f),10);a.b[J.p]=n++;TFc(a,J);--L}if(L>0){m=qwe;for(s=new Anb(t);s.a<s.c.c.length;){p=RD(ynb(s),10);if(a.b[p.p]==0){u=a.c[p.p]-a.a[p.p];if(u>=m){if(u>m){l.c.length=0;m=u}ZEb(l.c,p)}}}k=a.sg(l);a.b[k.p]=n++;TFc(a,k);--L}}H=t.c.length+1;for(j=0;j<t.c.length;j++){a.b[j]<0&&(a.b[j]+=H)}for(q=new Anb(t);q.a<q.c.c.length;){p=RD(ynb(q),10);F=u2b(p.j);for(A=F,B=0,D=A.length;B<D;++B){w=A[B];v=s2b(w.g);for(e=v,f=0,i=e.length;f<i;++f){d=e[f];K=d.d.i.p;if(a.b[p.p]>a.b[K]){X0b(d,true);pQb(b,awc,(Geb(),true))}}}}a.a=null;a.c=null;a.b=null;Xub(a.f);Xub(a.e);c.Vg()} +function usd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;v=RD(QHd((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a),0),166);k=new Ejd;u=new Tsb;w=xsd(v);rtb(u.f,v,w);m=new Tsb;d=new Yub;for(o=Fl(Al(cD(WC(cJ,1),rve,20,0,[(!b.d&&(b.d=new Yie(G4,b,8,5)),b.d),(!b.e&&(b.e=new Yie(G4,b,7,4)),b.e)])));gs(o);){n=RD(hs(o),74);if((!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i!=1){throw Adb(new agb(tHe+(!a.a&&(a.a=new C5d(F4,a,6,6)),a.a).i))}if(n!=a){q=RD(QHd((!n.a&&(n.a=new C5d(F4,n,6,6)),n.a),0),166);Pub(d,q,d.c.b,d.c);p=RD(Wd(qtb(u.f,q)),13);if(!p){p=xsd(q);rtb(u.f,q,p)}l=c?ojd(new sjd(RD(Vmb(w,w.c.length-1),8)),RD(Vmb(p,p.c.length-1),8)):ojd(new sjd((tFb(0,w.c.length),RD(w.c[0],8))),(tFb(0,p.c.length),RD(p.c[0],8)));rtb(m.f,q,l)}}if(d.b!=0){r=RD(Vmb(w,c?w.c.length-1:0),8);for(j=1;j<w.c.length;j++){s=RD(Vmb(w,c?w.c.length-1-j:j),8);e=Sub(d,0);while(e.b!=e.d.c){q=RD(evb(e),166);p=RD(Wd(qtb(u.f,q)),13);if(p.c.length<=j){gvb(e)}else{t=$id(new sjd(RD(Vmb(p,c?p.c.length-1-j:j),8)),RD(Wd(qtb(m.f,q)),8));if(s.a!=t.a||s.b!=t.b){f=s.a-r.a;h=s.b-r.b;g=t.a-r.a;i=t.b-r.b;g*h==i*f&&(f==0||isNaN(f)?f:f<0?-1:1)==(g==0||isNaN(g)?g:g<0?-1:1)&&(h==0||isNaN(h)?h:h<0?-1:1)==(i==0||isNaN(i)?i:i<0?-1:1)?($wnd.Math.abs(f)<$wnd.Math.abs(g)||$wnd.Math.abs(h)<$wnd.Math.abs(i))&&(Pub(k,s,k.c.b,k.c),true):j>1&&(Pub(k,r,k.c.b,k.c),true);gvb(e)}}}r=s}}return k} +function S_c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;c.Ug(_Ee,1);D=RD(zDb(CDb(new SDb(null,new Swb(b,16)),new e0c),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);k=RD(zDb(CDb(new SDb(null,new Swb(b,16)),new g0c(b)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),15);o=RD(zDb(CDb(new SDb(null,new Swb(b,16)),new i0c(b)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),15);p=$C(Z$,NEe,40,b.gc(),0,1);for(g=0;g<k.gc();g++){e=RD(k.Xb(g),40);C=RD(mQb(e,(h_c(),W$c)),17).a;if(C>=0&&C<k.gc()&&!p[C]){p[C]=e;k.gd(g);--g}}for(h=0;h<k.gc();h++){e=RD(k.Xb(h),40);C=RD(mQb(e,(h_c(),W$c)),17).a;for(m=0;;m++){n=C+m;if(n<p.length&&n>=0&&!p[n]){p[n]=e;k.gd(h);--h;break}n=C-m;if(n<p.length&&n>=0&&!p[n]){p[n]=e;k.gd(h);--h;break}}}o.jd(new k0c);for(i=p.length-1;i>=0;i--){if(!p[i]&&!o.dc()){p[i]=RD(o.Xb(0),40);o.gd(0)}}for(j=0;j<p.length;j++){if(!p[j]&&!D.dc()){p[j]=RD(D.Xb(0),40);D.gd(0)}}for(f=0;f<p.length;f++){pQb(p[f],(q$c(),i$c),sgb(f))}l=RD(RDb(CDb(new SDb(null,new Swb(b,16)),new o0c),new a0c),534);for(w=l,A=0,B=w.length;A<B;++A){v=w[A];d=$Wc(v);S_c(a,d,c.eh(1/l.length|0));yob();tvb(d,new uGd((q$c(),i$c)));q=new Yub;for(u=Sub(d,0);u.b!=u.d.c;){t=RD(evb(u),40);for(s=Sub(v.d,0);s.b!=s.d.c;){r=RD(evb(s),65);r.c==t&&(Pub(q,r,q.c.b,q.c),true)}}Xub(v.d);ye(v.d,q)}c.Vg()} +function jTb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;d=new bnb;h=new bnb;q=b/2;n=a.gc();e=RD(a.Xb(0),8);r=RD(a.Xb(1),8);o=kTb(e.a,e.b,r.a,r.b,q);Rmb(d,(tFb(0,o.c.length),RD(o.c[0],8)));Rmb(h,(tFb(1,o.c.length),RD(o.c[1],8)));for(j=2;j<n;j++){p=e;e=r;r=RD(a.Xb(j),8);o=kTb(e.a,e.b,p.a,p.b,q);Rmb(d,(tFb(1,o.c.length),RD(o.c[1],8)));Rmb(h,(tFb(0,o.c.length),RD(o.c[0],8)));o=kTb(e.a,e.b,r.a,r.b,q);Rmb(d,(tFb(0,o.c.length),RD(o.c[0],8)));Rmb(h,(tFb(1,o.c.length),RD(o.c[1],8)))}o=kTb(r.a,r.b,e.a,e.b,q);Rmb(d,(tFb(1,o.c.length),RD(o.c[1],8)));Rmb(h,(tFb(0,o.c.length),RD(o.c[0],8)));c=new Ejd;g=new bnb;Mub(c,(tFb(0,d.c.length),RD(d.c[0],8)));for(k=1;k<d.c.length-2;k+=2){f=(tFb(k,d.c.length),RD(d.c[k],8));m=iTb((tFb(k-1,d.c.length),RD(d.c[k-1],8)),f,(tFb(k+1,d.c.length),RD(d.c[k+1],8)),(tFb(k+2,d.c.length),RD(d.c[k+2],8)));!isFinite(m.a)||!isFinite(m.b)?(Pub(c,f,c.c.b,c.c),true):(Pub(c,m,c.c.b,c.c),true)}Mub(c,RD(Vmb(d,d.c.length-1),8));Rmb(g,(tFb(0,h.c.length),RD(h.c[0],8)));for(l=1;l<h.c.length-2;l+=2){f=(tFb(l,h.c.length),RD(h.c[l],8));m=iTb((tFb(l-1,h.c.length),RD(h.c[l-1],8)),f,(tFb(l+1,h.c.length),RD(h.c[l+1],8)),(tFb(l+2,h.c.length),RD(h.c[l+2],8)));!isFinite(m.a)||!isFinite(m.b)?(ZEb(g.c,f),true):(ZEb(g.c,m),true)}Rmb(g,RD(Vmb(h,h.c.length-1),8));for(i=g.c.length-1;i>=0;i--){Mub(c,(tFb(i,g.c.length),RD(g.c[i],8)))}return c} +function l9c(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;t=Kfb(UD(Gxd(b,(X6c(),W6c))));n=Kfb(UD(Gxd(b,U6c)));m=Kfb(UD(Gxd(b,R6c)));Bad((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));r=U8c((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a),t,a.b);for(q=0;q<r.c.length;q++){i=(tFb(q,r.c.length),RD(r.c[q],186));if(q!=0){o=(tFb(q-1,r.c.length),RD(r.c[q-1],186));Gad(i,o.f+o.b+a.b)}p=J8c(q,r,t,a.b,Heb(TD(Gxd(b,(X7c(),L7c)))));if(Heb(TD(p.b))){for(f=new Anb(i.a);f.a<f.c.c.length;){e=RD(ynb(f),172);e.c=false;e.k=false;N9c(e)}i.d=new bnb;i.e=t;--q}else{k9c(a,i);if(q+1<r.c.length){a.e=$wnd.Math.max(i.e+a.b+RD(Vmb((tFb(q+1,r.c.length),RD(r.c[q+1],186)).a,0),172).r-t,a.c);a.f=$wnd.Math.min(i.e+a.b+RD(Vmb((tFb(q+1,r.c.length),RD(r.c[q+1],186)).a,0),172).r-t,a.d);if(i.d.c.length!=0){a.c=$wnd.Math.max(a.c,RD(Vmb(i.d,i.d.c.length-1),315).d+(i.d.c.length<=1?0:a.b));a.d=$wnd.Math.min(a.c,RD(Vmb(i.d,i.d.c.length-1),315).d+(i.d.c.length<=1?0:a.b))}}if(r.c.length==1){l=RD(Vmb(i.d,i.d.c.length-1),315);k=RD(Vmb(l.a,l.a.c.length-1),172);for(h=new Anb(k.n);h.a<h.c.c.length;){g=RD(ynb(h),209);a.c=$wnd.Math.max(a.c,k.r-g.d);a.d=$wnd.Math.min(a.d,k.r-g.d);a.e=$wnd.Math.max(a.e,g.d+a.b);a.f=$wnd.Math.min(a.f,g.d+a.b)}}}}s=zad(r,a.b);u=$wnd.Math.max(s.a,n-(c.b+c.c));j=$wnd.Math.max(s.b,m-(c.d+c.a));d=j-s.b;Ixd(b,M6c,d);Ixd(b,V6c,r);return new lad(a.a,u,s.b+d,(sad(),rad))} +function e9b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;A=RD(mQb(a,(yCc(),BBc)),101);if(!(A!=(Bod(),zod)&&A!=Aod)){return}o=a.b;n=o.c.length;k=new cnb((dk(n+2,lwe),dz(Bdb(Bdb(5,n+2),(n+2)/10|0))));p=new cnb((dk(n+2,lwe),dz(Bdb(Bdb(5,n+2),(n+2)/10|0))));Rmb(k,new Tsb);Rmb(k,new Tsb);Rmb(p,new bnb);Rmb(p,new bnb);w=new bnb;for(b=0;b<n;b++){c=(tFb(b,o.c.length),RD(o.c[b],30));B=(tFb(b,k.c.length),RD(k.c[b],85));q=new Tsb;ZEb(k.c,q);D=(tFb(b,p.c.length),RD(p.c[b],15));s=new bnb;ZEb(p.c,s);for(e=new Anb(c.a);e.a<e.c.c.length;){d=RD(ynb(e),10);if(a9b(d)){ZEb(w.c,d);continue}for(j=new is(Mr(Z2b(d).a.Kc(),new ir));gs(j);){h=RD(hs(j),18);F=h.c.i;if(!a9b(F)){continue}C=RD(B.xc(mQb(F,(Ywc(),Awc))),10);if(!C){C=_8b(a,F);B.zc(mQb(F,Awc),C);D.Fc(C)}Y0b(h,RD(Vmb(C.j,1),12))}for(i=new is(Mr(a3b(d).a.Kc(),new ir));gs(i);){h=RD(hs(i),18);G=h.d.i;if(!a9b(G)){continue}r=RD(Wjb(q,mQb(G,(Ywc(),Awc))),10);if(!r){r=_8b(a,G);Zjb(q,mQb(G,Awc),r);ZEb(s.c,r)}Z0b(h,RD(Vmb(r.j,0),12))}}}for(l=0;l<p.c.length;l++){t=(tFb(l,p.c.length),RD(p.c[l],15));if(t.dc()){continue}m=null;if(l==0){m=new R4b(a);wFb(0,o.c.length);XEb(o.c,0,m)}else if(l==k.c.length-1){m=new R4b(a);ZEb(o.c,m)}else{m=(tFb(l-1,o.c.length),RD(o.c[l-1],30))}for(g=t.Kc();g.Ob();){f=RD(g.Pb(),10);g3b(f,m)}}for(v=new Anb(w);v.a<v.c.c.length;){u=RD(ynb(v),10);g3b(u,null)}pQb(a,(Ywc(),fwc),w)} +function SNc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K;I=new bnb;for(o=new Anb(b.b);o.a<o.c.c.length;){m=RD(ynb(o),30);for(v=new Anb(m.a);v.a<v.c.c.length;){u=RD(ynb(v),10);u.p=-1;l=qwe;B=qwe;for(D=new Anb(u.j);D.a<D.c.c.length;){C=RD(ynb(D),12);for(e=new Anb(C.e);e.a<e.c.c.length;){c=RD(ynb(e),18);F=RD(mQb(c,(yCc(),MBc)),17).a;l=$wnd.Math.max(l,F)}for(d=new Anb(C.g);d.a<d.c.c.length;){c=RD(ynb(d),18);F=RD(mQb(c,(yCc(),MBc)),17).a;B=$wnd.Math.max(B,F)}}pQb(u,HNc,sgb(l));pQb(u,INc,sgb(B))}}r=0;for(n=new Anb(b.b);n.a<n.c.c.length;){m=RD(ynb(n),30);for(v=new Anb(m.a);v.a<v.c.c.length;){u=RD(ynb(v),10);if(u.p<0){H=new ZNc;H.b=r++;ONc(a,u,H);ZEb(I.c,H)}}}A=ev(I.c.length);k=ev(I.c.length);for(g=0;g<I.c.length;g++){Rmb(A,new bnb);Rmb(k,sgb(0))}MNc(b,I,A,k);J=RD(anb(I,$C(SY,uEe,261,I.c.length,0,1)),854);w=RD(anb(A,$C(QK,Ize,15,A.c.length,0,1)),198);j=$C(kE,Pwe,28,k.c.length,15,1);for(h=0;h<j.length;h++){j[h]=(tFb(h,k.c.length),RD(k.c[h],17)).a}s=0;t=new bnb;for(i=0;i<J.length;i++){j[i]==0&&(ZEb(t.c,J[i]),true)}q=$C(kE,Pwe,28,J.length,15,1);while(t.c.length!=0){H=RD(Xmb(t,0),261);q[H.b]=s++;while(!w[H.b].dc()){K=RD(w[H.b].gd(0),261);--j[K.b];j[K.b]==0&&(ZEb(t.c,K),true)}}a.a=$C(SY,uEe,261,J.length,0,1);for(f=0;f<J.length;f++){p=J[f];G=q[f];a.a[G]=p;p.b=G;for(v=new Anb(p.e);v.a<v.c.c.length;){u=RD(ynb(v),10);u.p=G}}return a.a} +function J8c(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r;p=false;i=false;m=a+1;o=(tFb(a,b.c.length),RD(b.c[a],186));h=o.a;j=null;for(g=0;g<o.a.c.length;g++){f=(tFb(g,h.c.length),RD(h.c[g],172));if(f.c){continue}if(f.b.c.length==0){gib();String.fromCharCode(10);Fad(o,f);--g;p=true;continue}if(!f.k){!!j&&gad(j);j=new had(!j?0:j.e+j.d+d,o.f,d);U9c(f,j.e+j.d,o.f);Rmb(o.d,j);aad(j,f);f.k=true}k=null;k=(r=null,g<o.a.c.length-1?(r=RD(Vmb(o.a,g+1),172)):m<b.c.length&&(tFb(m,b.c.length),RD(b.c[m],186)).a.c.length!=0&&(r=RD(Vmb((tFb(m,b.c.length),RD(b.c[m],186)).a,0),172)),r);q=false;!!k&&(q=!pb(k.j,o));if(k){if(k.b.c.length!=0&&!Heb(TD(RD(Vmb(k.b,0),27).of((X7c(),D7c))))){Q9c(f,c-f.s);gad(f.q);p=p|I8c(o,f,k,c,d)}else{Fad(o,k);break}if(k.b.c.length==0){b.c.length>m&&Fad((tFb(m,b.c.length),RD(b.c[m],186)),k);k=null;while(b.c.length>m&&(tFb(m,b.c.length),RD(b.c[m],186)).a.c.length==0){Ymb(b,(tFb(m,b.c.length),b.c[m]))}}if(!k){--g;continue}if(!Heb(TD(RD(Vmb(k.b,0),27).of((X7c(),D7c))))&&K8c(b,o,f,k,q,c,m,d)){p=true;continue}if(q){n=o.b;l=k.f;if(!Heb(TD(RD(Vmb(k.b,0),27).of(D7c)))&&L8c(b,o,f,k,c,m,d,e)){p=true;if(n<l){i=true;k.j=o;break}continue}else if(M8c(o,f)){f.c=true;p=true;continue}}else if(M8c(o,f)){f.c=true;p=true;continue}if(p){continue}}if(M8c(o,f)){f.c=true;p=true;!!k&&(k.k=false);continue}else{gad(f.q)}}return new Ptd((Geb(),p?true:false),i?true:false)} +function yCc(){yCc=geb;QBc=(umd(),Wld);RBc=Xld;SBc=Yld;TBc=Zld;VBc=$ld;WBc=_ld;ZBc=bmd;_Bc=dmd;aCc=emd;$Bc=cmd;bCc=fmd;dCc=gmd;fCc=jmd;YBc=amd;PBc=(Ozc(),ezc);UBc=fzc;XBc=gzc;cCc=hzc;JBc=new mGd(Rld,sgb(0));KBc=bzc;LBc=czc;MBc=dzc;vCc=Fzc;nCc=kzc;oCc=nzc;rCc=vzc;pCc=qzc;qCc=szc;xCc=Kzc;wCc=Hzc;tCc=Bzc;sCc=zzc;uCc=Dzc;iBc=Uyc;jBc=Vyc;DAc=dyc;EAc=gyc;jCc=mmd;lCc=qmd;iCc=lmd;hCc=kmd;kCc=(mqd(),jqd);new mGd(nmd,kCc);rBc=new A3b(12);qBc=new mGd(tld,rBc);zAc=(Ymd(),Umd);yAc=new mGd(Skd,zAc);ABc=new mGd(Gld,0);NBc=new mGd(Sld,sgb(1));Tzc=new mGd(Dkd,Yze);pBc=rld;BBc=Hld;GBc=Old;qAc=Mkd;Rzc=Bkd;IAc=Xkd;OBc=new mGd(Vld,(Geb(),true));NAc=$kd;OAc=_kd;lBc=kld;oBc=pld;mBc=mld;tAc=(Cmd(),Amd);rAc=new mGd(Nkd,tAc);dBc=ild;cBc=gld;EBc=Lld;DBc=Kld;FBc=Nld;uBc=(pod(),ood);new mGd(zld,uBc);wBc=Cld;xBc=Dld;yBc=Eld;vBc=Bld;mCc=jzc;$Ac=Fyc;ZAc=Dyc;gCc=izc;UAc=vyc;pAc=Rxc;oAc=Pxc;eAc=yxc;fAc=zxc;hAc=Exc;gAc=Axc;nAc=Nxc;aBc=Hyc;bBc=Iyc;QAc=oyc;kBc=Zyc;fBc=Myc;GAc=jyc;hBc=Syc;BAc=_xc;CAc=byc;dAc=Kkd;eBc=Jyc;Xzc=mxc;Wzc=kxc;Vzc=jxc;KAc=myc;JAc=lyc;LAc=nyc;nBc=nld;RAc=cld;FAc=Ukd;wAc=Qkd;vAc=Pkd;iAc=Hxc;CBc=Jld;Uzc=Jkd;MAc=Zkd;zBc=Fld;sBc=vld;tBc=xld;WAc=yyc;XAc=Ayc;IBc=Qld;Szc=ixc;YAc=Cyc;xAc=Xxc;uAc=Vxc;_Ac=eld;SAc=syc;gBc=Pyc;eCc=hmd;sAc=Txc;HBc=_yc;AAc=Zxc;jAc=Jxc;kAc=Kxc;TAc=uyc;lAc=Lxc;PAc=bld;VAc=xyc;mAc=Mxc;cAc=wxc;_zc=sxc;Zzc=qxc;$zc=rxc;aAc=uxc;Yzc=oxc;bAc=vxc;HAc=kyc} +function Mqe(a){var b,c,d;if(a.d>=a.j){a.a=-1;a.c=1;return}b=ihb(a.i,a.d++);a.a=b;if(a.b==1){switch(b){case 92:d=10;if(a.d>=a.j)throw Adb(new Lqe(TId((Hde(),VIe))));a.a=ihb(a.i,a.d++);break;case 45:if((a.e&512)==512&&a.d<a.j&&ihb(a.i,a.d)==91){++a.d;d=24}else d=0;break;case 91:if((a.e&512)!=512&&a.d<a.j&&ihb(a.i,a.d)==58){++a.d;d=20;break}default:if((b&64512)==uxe&&a.d<a.j){c=ihb(a.i,a.d);if((c&64512)==56320){a.a=txe+(b-uxe<<10)+c-56320;++a.d}}d=0;}a.c=d;return}switch(b){case 124:d=2;break;case 42:d=3;break;case 43:d=4;break;case 63:d=5;break;case 41:d=7;break;case 46:d=8;break;case 91:d=9;break;case 94:d=11;break;case 36:d=12;break;case 40:d=6;if(a.d>=a.j)break;if(ihb(a.i,a.d)!=63)break;if(++a.d>=a.j)throw Adb(new Lqe(TId((Hde(),WIe))));b=ihb(a.i,a.d++);switch(b){case 58:d=13;break;case 61:d=14;break;case 33:d=15;break;case 91:d=19;break;case 62:d=18;break;case 60:if(a.d>=a.j)throw Adb(new Lqe(TId((Hde(),WIe))));b=ihb(a.i,a.d++);if(b==61){d=16}else if(b==33){d=17}else throw Adb(new Lqe(TId((Hde(),XIe))));break;case 35:while(a.d<a.j){b=ihb(a.i,a.d++);if(b==41)break}if(b!=41)throw Adb(new Lqe(TId((Hde(),YIe))));d=21;break;default:if(b==45||97<=b&&b<=122||65<=b&&b<=90){--a.d;d=22;break}else if(b==40){d=23;break}throw Adb(new Lqe(TId((Hde(),WIe))));}break;case 92:d=10;if(a.d>=a.j)throw Adb(new Lqe(TId((Hde(),VIe))));a.a=ihb(a.i,a.d++);break;default:d=0;}a.c=d} +function oXc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;c.Ug('Process compaction',1);if(!Heb(TD(mQb(b,(h_c(),F$c))))){return}e=RD(mQb(b,H$c),88);n=Kfb(UD(mQb(b,_$c)));pXc(a,b,e);lXc(b,n/2/2);o=b.b;tvb(o,new EXc(e));for(j=Sub(o,0);j.b!=j.d.c;){i=RD(evb(j),40);if(!Heb(TD(mQb(i,(q$c(),n$c))))){d=mXc(i,e);p=lWc(i,b);l=0;m=0;if(d){q=d.e;switch(e.g){case 2:l=q.a-n-i.f.a;p.e.a-n-i.f.a<l&&(l=p.e.a-n-i.f.a);m=l+i.f.a;break;case 1:l=q.a+d.f.a+n;p.e.a+n>l&&(l=p.e.a+p.f.a+n);m=l+i.f.a;break;case 4:l=q.b-n-i.f.b;p.e.b-n-i.f.b<l&&(l=p.e.b-n-i.f.b);m=l+i.f.b;break;case 3:l=q.b+d.f.b+n;p.e.b+n>l&&(l=p.e.b+p.f.b+n);m=l+i.f.b;}}else if(p){switch(e.g){case 2:l=p.e.a-n-i.f.a;m=l+i.f.a;break;case 1:l=p.e.a+p.f.a+n;m=l+i.f.a;break;case 4:l=p.e.b-n-i.f.b;m=l+i.f.b;break;case 3:l=p.e.b+p.f.b+n;m=l+i.f.b;}}if(dE(mQb(b,K$c))===dE((LZc(),IZc))){f=l;g=m;h=DDb(CDb(new SDb(null,new Swb(a.a,16)),new IXc(f,g)));if(h.a!=null){e==(Cmd(),ymd)||e==zmd?(i.e.a=l):(i.e.b=l)}else{e==(Cmd(),ymd)||e==Bmd?(h=DDb(CDb(NDb(new SDb(null,new Swb(a.a,16))),new WXc(f)))):(h=DDb(CDb(NDb(new SDb(null,new Swb(a.a,16))),new YXc(f))));h.a!=null&&(e==ymd||e==zmd?(i.e.a=Kfb(UD((sFb(h.a!=null),RD(h.a,42)).a))):(i.e.b=Kfb(UD((sFb(h.a!=null),RD(h.a,42)).a))))}if(h.a!=null){k=Wmb(a.a,(sFb(h.a!=null),h.a),0);if(k>0&&k!=RD(mQb(i,f_c),17).a){pQb(i,UZc,(Geb(),true));pQb(i,f_c,sgb(k))}}}else{e==(Cmd(),ymd)||e==zmd?(i.e.a=l):(i.e.b=l)}}}c.Vg()} +function Fre(a){var b,c,d,e,f,g,h,i,j;a.b=1;Mqe(a);b=null;if(a.c==0&&a.a==94){Mqe(a);b=(Vse(),Vse(),++Use,new xte(4));rte(b,0,MLe);h=(null,++Use,new xte(4))}else{h=(Vse(),Vse(),++Use,new xte(4))}e=true;while((j=a.c)!=1){if(j==0&&a.a==93&&!e){if(b){wte(b,h);h=b}break}c=a.a;d=false;if(j==10){switch(c){case 100:case 68:case 119:case 87:case 115:case 83:ute(h,Ere(c));d=true;break;case 105:case 73:case 99:case 67:c=(ute(h,Ere(c)),-1);c<0&&(d=true);break;case 112:case 80:i=Sqe(a,c);if(!i)throw Adb(new Lqe(TId((Hde(),hJe))));ute(h,i);d=true;break;default:c=Dre(a);}}else if(j==24&&!e){if(b){wte(b,h);h=b}f=Fre(a);wte(h,f);if(a.c!=0||a.a!=93)throw Adb(new Lqe(TId((Hde(),lJe))));break}Mqe(a);if(!d){if(j==0){if(c==91)throw Adb(new Lqe(TId((Hde(),mJe))));if(c==93)throw Adb(new Lqe(TId((Hde(),nJe))));if(c==45&&!e&&a.a!=93)throw Adb(new Lqe(TId((Hde(),oJe))))}if(a.c!=0||a.a!=45||c==45&&e){rte(h,c,c)}else{Mqe(a);if((j=a.c)==1)throw Adb(new Lqe(TId((Hde(),jJe))));if(j==0&&a.a==93){rte(h,c,c);rte(h,45,45)}else if(j==0&&a.a==93||j==24){throw Adb(new Lqe(TId((Hde(),oJe))))}else{g=a.a;if(j==0){if(g==91)throw Adb(new Lqe(TId((Hde(),mJe))));if(g==93)throw Adb(new Lqe(TId((Hde(),nJe))));if(g==45)throw Adb(new Lqe(TId((Hde(),oJe))))}else j==10&&(g=Dre(a));Mqe(a);if(c>g)throw Adb(new Lqe(TId((Hde(),rJe))));rte(h,c,g)}}}e=false}if(a.c==1)throw Adb(new Lqe(TId((Hde(),jJe))));vte(h);ste(h);a.b=0;Mqe(a);return h} +function EGc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;c.Ug('Coffman-Graham Layering',1);if(b.a.c.length==0){c.Vg();return}v=RD(mQb(b,(yCc(),SAc)),17).a;i=0;g=0;for(m=new Anb(b.a);m.a<m.c.c.length;){l=RD(ynb(m),10);l.p=i++;for(f=new is(Mr(a3b(l).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);e.p=g++}}a.d=$C(xdb,Hye,28,i,16,1);a.a=$C(xdb,Hye,28,g,16,1);a.b=$C(kE,Pwe,28,i,15,1);a.e=$C(kE,Pwe,28,i,15,1);a.f=$C(kE,Pwe,28,i,15,1);Nc(a.c);FGc(a,b);o=new pwb(new JGc(a));for(u=new Anb(b.a);u.a<u.c.c.length;){s=RD(ynb(u),10);for(f=new is(Mr(Z2b(s).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);a.a[e.p]||++a.b[s.p]}a.b[s.p]==0&&(zFb(lwb(o,s),Bxe),true)}h=0;while(o.b.c.length!=0){s=RD(mwb(o),10);a.f[s.p]=h++;for(f=new is(Mr(a3b(s).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);if(a.a[e.p]){continue}q=e.d.i;--a.b[q.p];Rc(a.c,q,sgb(a.f[s.p]));a.b[q.p]==0&&(zFb(lwb(o,q),Bxe),true)}}n=new pwb(new NGc(a));for(t=new Anb(b.a);t.a<t.c.c.length;){s=RD(ynb(t),10);for(f=new is(Mr(a3b(s).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);a.a[e.p]||++a.e[s.p]}a.e[s.p]==0&&(zFb(lwb(n,s),Bxe),true)}k=new bnb;d=BGc(b,k);while(n.b.c.length!=0){r=RD(mwb(n),10);(d.a.c.length>=v||!zGc(r,d))&&(d=BGc(b,k));g3b(r,d);for(f=new is(Mr(Z2b(r).a.Kc(),new ir));gs(f);){e=RD(hs(f),18);if(a.a[e.p]){continue}p=e.c.i;--a.e[p.p];a.e[p.p]==0&&(zFb(lwb(n,p),Bxe),true)}}for(j=k.c.length-1;j>=0;--j){Rmb(b.b,(tFb(j,k.c.length),RD(k.c[j],30)))}b.a.c.length=0;c.Vg()} +function Sec(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;u=false;do{u=false;for(f=b?(new Xkb(a.a.b)).a.gc()-2:1;b?f>=0:f<(new Xkb(a.a.b)).a.gc();f+=b?-1:1){e=_5b(a.a,sgb(f));for(n=0;n<e.b;n++){l=RD(ju(e,n),10);if(!nQb(l,(Ywc(),zwc))){continue}if(a6b(a.a,sgb(f))&&a.r==(aEc(),TDc)||b6b(a.a,sgb(f))&&a.r==(aEc(),UDc)){continue}t=true;for(r=0;r<e.b;r++){q=RD(ju(e,r),10);nQb(q,zwc)&&(b&&RD(mQb(l,zwc),17).a<RD(mQb(q,zwc),17).a||!b&&RD(mQb(l,zwc),17).a>RD(mQb(q,zwc),17).a)&&(t=false)}if(!t){continue}i=b?f+1:f-1;h=_5b(a.a,sgb(i));g=false;s=true;d=false;for(k=Sub(h,0);k.b!=k.d.c;){j=RD(evb(k),10);if(nQb(j,zwc)){if(j.p!=l.p){g=g|(b?RD(mQb(j,zwc),17).a<RD(mQb(l,zwc),17).a:RD(mQb(j,zwc),17).a>RD(mQb(l,zwc),17).a);s=false}}else if(!g&&s){if(j.k==(r3b(),n3b)){d=true;b?(m=RD(hs(new is(Mr(Z2b(j).a.Kc(),new ir))),18).c.i):(m=RD(hs(new is(Mr(a3b(j).a.Kc(),new ir))),18).d.i);if(m==l){b?(c=RD(hs(new is(Mr(a3b(j).a.Kc(),new ir))),18).d.i):(c=RD(hs(new is(Mr(Z2b(j).a.Kc(),new ir))),18).c.i);(b?RD($5b(a.a,c),17).a-RD($5b(a.a,m),17).a:RD($5b(a.a,m),17).a-RD($5b(a.a,c),17).a)<=2&&(s=false)}}}}if(d&&s){b?(c=RD(hs(new is(Mr(a3b(l).a.Kc(),new ir))),18).d.i):(c=RD(hs(new is(Mr(Z2b(l).a.Kc(),new ir))),18).c.i);(b?RD($5b(a.a,c),17).a-RD($5b(a.a,l),17).a:RD($5b(a.a,l),17).a-RD($5b(a.a,c),17).a)<=2&&c.k==(r3b(),p3b)&&(s=false)}if(g||s){p=Xec(a,l,b);while(p.a.gc()!=0){o=RD(p.a.ec().Kc().Pb(),10);p.a.Bc(o)!=null;ye(p,Xec(a,o,b))}--n;u=true}}}}while(u)} +function Xae(a){_Ad(a.c,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#decimal']));_Ad(a.d,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#integer']));_Ad(a.e,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#boolean']));_Ad(a.f,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EBoolean',GIe,'EBoolean:Object']));_Ad(a.i,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#byte']));_Ad(a.g,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#hexBinary']));_Ad(a.j,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EByte',GIe,'EByte:Object']));_Ad(a.n,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EChar',GIe,'EChar:Object']));_Ad(a.t,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#double']));_Ad(a.u,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EDouble',GIe,'EDouble:Object']));_Ad(a.F,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#float']));_Ad(a.G,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EFloat',GIe,'EFloat:Object']));_Ad(a.I,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#int']));_Ad(a.J,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EInt',GIe,'EInt:Object']));_Ad(a.N,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#long']));_Ad(a.O,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'ELong',GIe,'ELong:Object']));_Ad(a.Z,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#short']));_Ad(a.$,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'EShort',GIe,'EShort:Object']));_Ad(a._,qKe,cD(WC(qJ,1),Nve,2,6,[DKe,'http://www.w3.org/2001/XMLSchema#string']))} +function C0c(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o;m=RD(d.a,17).a;n=RD(d.b,17).a;l=a.b;o=a.c;h=0;k=0;if(b==(Cmd(),ymd)||b==zmd){k=Uvb(QCb(HDb(GDb(new SDb(null,new Swb(c.b,16)),new b2c),new b1c)));if(l.e.b+l.f.b/2>k){j=++n;h=Kfb(UD(Lvb(JDb(GDb(new SDb(null,new Swb(c.b,16)),new d2c(e,j)),new d1c))))}else{i=++m;h=Kfb(UD(Lvb(KDb(GDb(new SDb(null,new Swb(c.b,16)),new f2c(e,i)),new h1c))))}}else{k=Uvb(QCb(HDb(GDb(new SDb(null,new Swb(c.b,16)),new x1c),new l1c)));if(l.e.a+l.f.a/2>k){j=++n;h=Kfb(UD(Lvb(JDb(GDb(new SDb(null,new Swb(c.b,16)),new z1c(e,j)),new n1c))))}else{i=++m;h=Kfb(UD(Lvb(KDb(GDb(new SDb(null,new Swb(c.b,16)),new B1c(e,i)),new r1c))))}}if(b==ymd){Oub(a.a,new rjd(Kfb(UD(mQb(l,(q$c(),f$c))))-e,h));Oub(a.a,new rjd(o.e.a+o.f.a+e+f,h));Oub(a.a,new rjd(o.e.a+o.f.a+e+f,o.e.b+o.f.b/2));Oub(a.a,new rjd(o.e.a+o.f.a,o.e.b+o.f.b/2))}else if(b==zmd){Oub(a.a,new rjd(Kfb(UD(mQb(l,(q$c(),e$c))))+e,l.e.b+l.f.b/2));Oub(a.a,new rjd(l.e.a+l.f.a+e,h));Oub(a.a,new rjd(o.e.a-e-f,h));Oub(a.a,new rjd(o.e.a-e-f,o.e.b+o.f.b/2));Oub(a.a,new rjd(o.e.a,o.e.b+o.f.b/2))}else if(b==Bmd){Oub(a.a,new rjd(h,Kfb(UD(mQb(l,(q$c(),f$c))))-e));Oub(a.a,new rjd(h,o.e.b+o.f.b+e+f));Oub(a.a,new rjd(o.e.a+o.f.a/2,o.e.b+o.f.b+e+f));Oub(a.a,new rjd(o.e.a+o.f.a/2,o.e.b+o.f.b+e))}else{a.a.b==0||(RD(Rub(a.a),8).b=Kfb(UD(mQb(l,(q$c(),e$c))))+e*RD(g.b,17).a);Oub(a.a,new rjd(h,Kfb(UD(mQb(l,(q$c(),e$c))))+e*RD(g.b,17).a));Oub(a.a,new rjd(h,o.e.b-e*RD(g.a,17).a-f))}return new Ptd(sgb(m),sgb(n))} +function ASd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;g=true;l=null;d=null;e=null;b=false;n=_Rd;j=null;f=null;h=0;i=sSd(a,h,ZRd,$Rd);if(i<a.length&&(BFb(i,a.length),a.charCodeAt(i)==58)){l=(AFb(h,i,a.length),a.substr(h,i-h));h=i+1}c=l!=null&&tpb(eSd,l.toLowerCase());if(c){i=a.lastIndexOf('!/');if(i==-1){throw Adb(new agb('no archive separator'))}g=true;d=zhb(a,h,++i);h=i}else if(h>=0&&lhb(a.substr(h,'//'.length),'//')){h+=2;i=sSd(a,h,aSd,bSd);d=(AFb(h,i,a.length),a.substr(h,i-h));h=i}else if(l!=null&&(h==a.length||(BFb(h,a.length),a.charCodeAt(h)!=47))){g=false;i=rhb(a,Fhb(35),h);i==-1&&(i=a.length);d=(AFb(h,i,a.length),a.substr(h,i-h));h=i}if(!c&&h<a.length&&(BFb(h,a.length),a.charCodeAt(h)==47)){i=sSd(a,h+1,aSd,bSd);k=(AFb(h+1,i,a.length),a.substr(h+1,i-(h+1)));if(k.length>0&&ihb(k,k.length-1)==58){e=k;h=i}}if(h<a.length&&(BFb(h,a.length),a.charCodeAt(h)==47)){++h;b=true}if(h<a.length&&(BFb(h,a.length),a.charCodeAt(h)!=63)&&(BFb(h,a.length),a.charCodeAt(h)!=35)){m=new bnb;while(h<a.length&&(BFb(h,a.length),a.charCodeAt(h)!=63)&&(BFb(h,a.length),a.charCodeAt(h)!=35)){i=sSd(a,h,aSd,bSd);Rmb(m,(AFb(h,i,a.length),a.substr(h,i-h)));h=i;h<a.length&&(BFb(h,a.length),a.charCodeAt(h)==47)&&(BSd(a,++h)||(m.c.push(''),undefined,true))}n=$C(qJ,Nve,2,m.c.length,6,1);anb(m,n)}if(h<a.length&&(BFb(h,a.length),a.charCodeAt(h)==63)){i=phb(a,35,++h);i==-1&&(i=a.length);j=(AFb(h,i,a.length),a.substr(h,i-h));h=i}h<a.length&&(f=yhb(a,++h));ISd(g,l,d,e,n,j);return new lSd(g,l,d,e,b,n,j,f)} +function P_b(){P_b=geb;z$b();O_b=new Tp;Rc(O_b,(qpd(),cpd),bpd);Rc(O_b,mpd,bpd);Rc(O_b,dpd,bpd);Rc(O_b,jpd,bpd);Rc(O_b,ipd,bpd);Rc(O_b,gpd,bpd);Rc(O_b,jpd,cpd);Rc(O_b,bpd,Zod);Rc(O_b,cpd,Zod);Rc(O_b,mpd,Zod);Rc(O_b,dpd,Zod);Rc(O_b,hpd,Zod);Rc(O_b,jpd,Zod);Rc(O_b,ipd,Zod);Rc(O_b,gpd,Zod);Rc(O_b,apd,Zod);Rc(O_b,bpd,kpd);Rc(O_b,cpd,kpd);Rc(O_b,Zod,kpd);Rc(O_b,mpd,kpd);Rc(O_b,dpd,kpd);Rc(O_b,hpd,kpd);Rc(O_b,jpd,kpd);Rc(O_b,apd,kpd);Rc(O_b,lpd,kpd);Rc(O_b,ipd,kpd);Rc(O_b,epd,kpd);Rc(O_b,gpd,kpd);Rc(O_b,cpd,mpd);Rc(O_b,dpd,mpd);Rc(O_b,jpd,mpd);Rc(O_b,gpd,mpd);Rc(O_b,cpd,dpd);Rc(O_b,mpd,dpd);Rc(O_b,jpd,dpd);Rc(O_b,dpd,dpd);Rc(O_b,ipd,dpd);Rc(O_b,bpd,$od);Rc(O_b,cpd,$od);Rc(O_b,Zod,$od);Rc(O_b,kpd,$od);Rc(O_b,mpd,$od);Rc(O_b,dpd,$od);Rc(O_b,hpd,$od);Rc(O_b,jpd,$od);Rc(O_b,lpd,$od);Rc(O_b,apd,$od);Rc(O_b,gpd,$od);Rc(O_b,ipd,$od);Rc(O_b,fpd,$od);Rc(O_b,bpd,lpd);Rc(O_b,cpd,lpd);Rc(O_b,Zod,lpd);Rc(O_b,mpd,lpd);Rc(O_b,dpd,lpd);Rc(O_b,hpd,lpd);Rc(O_b,jpd,lpd);Rc(O_b,apd,lpd);Rc(O_b,gpd,lpd);Rc(O_b,epd,lpd);Rc(O_b,fpd,lpd);Rc(O_b,cpd,apd);Rc(O_b,mpd,apd);Rc(O_b,dpd,apd);Rc(O_b,jpd,apd);Rc(O_b,lpd,apd);Rc(O_b,gpd,apd);Rc(O_b,ipd,apd);Rc(O_b,bpd,_od);Rc(O_b,cpd,_od);Rc(O_b,Zod,_od);Rc(O_b,mpd,_od);Rc(O_b,dpd,_od);Rc(O_b,hpd,_od);Rc(O_b,jpd,_od);Rc(O_b,apd,_od);Rc(O_b,gpd,_od);Rc(O_b,cpd,ipd);Rc(O_b,Zod,ipd);Rc(O_b,kpd,ipd);Rc(O_b,dpd,ipd);Rc(O_b,bpd,epd);Rc(O_b,cpd,epd);Rc(O_b,kpd,epd);Rc(O_b,mpd,epd);Rc(O_b,dpd,epd);Rc(O_b,hpd,epd);Rc(O_b,jpd,epd);Rc(O_b,jpd,fpd);Rc(O_b,dpd,fpd);Rc(O_b,apd,bpd);Rc(O_b,apd,mpd);Rc(O_b,apd,Zod);Rc(O_b,hpd,bpd);Rc(O_b,hpd,cpd);Rc(O_b,hpd,kpd)} +function _Qc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;c.Ug('Brandes & Koepf node placement',1);a.a=b;a.c=iRc(b);d=RD(mQb(b,(yCc(),fBc)),281);n=Heb(TD(mQb(b,gBc)));a.d=d==(Ouc(),Luc)&&!n||d==Iuc;$Qc(a,b);v=null;w=null;r=null;s=null;q=(dk(4,iwe),new cnb(4));switch(RD(mQb(b,fBc),281).g){case 3:r=new sQc(b,a.c.d,(EQc(),CQc),(wQc(),uQc));ZEb(q.c,r);break;case 1:s=new sQc(b,a.c.d,(EQc(),DQc),(wQc(),uQc));ZEb(q.c,s);break;case 4:v=new sQc(b,a.c.d,(EQc(),CQc),(wQc(),vQc));ZEb(q.c,v);break;case 2:w=new sQc(b,a.c.d,(EQc(),DQc),(wQc(),vQc));ZEb(q.c,w);break;default:r=new sQc(b,a.c.d,(EQc(),CQc),(wQc(),uQc));s=new sQc(b,a.c.d,DQc,uQc);v=new sQc(b,a.c.d,CQc,vQc);w=new sQc(b,a.c.d,DQc,vQc);ZEb(q.c,v);ZEb(q.c,w);ZEb(q.c,r);ZEb(q.c,s);}e=new MQc(b,a.c);for(h=new Anb(q);h.a<h.c.c.length;){f=RD(ynb(h),185);LQc(e,f,a.b);KQc(f)}m=new RQc(b,a.c);for(i=new Anb(q);i.a<i.c.c.length;){f=RD(ynb(i),185);OQc(m,f)}if(c._g()){for(j=new Anb(q);j.a<j.c.c.length;){f=RD(ynb(j),185);c.bh(f+' size is '+qQc(f))}}l=null;if(a.d){k=YQc(a,q,a.c.d);XQc(b,k,c)&&(l=k)}if(!l){for(j=new Anb(q);j.a<j.c.c.length;){f=RD(ynb(j),185);XQc(b,f,c)&&(!l||qQc(l)>qQc(f))&&(l=f)}}!l&&(l=(tFb(0,q.c.length),RD(q.c[0],185)));for(p=new Anb(b.b);p.a<p.c.c.length;){o=RD(ynb(p),30);for(u=new Anb(o.a);u.a<u.c.c.length;){t=RD(ynb(u),10);t.n.b=Kfb(l.p[t.p])+Kfb(l.d[t.p])}}if(c._g()){c.bh('Chosen node placement: '+l);c.bh('Blocks: '+bRc(l));c.bh('Classes: '+cRc(l,c));c.bh('Marked edges: '+a.b)}for(g=new Anb(q);g.a<g.c.c.length;){f=RD(ynb(g),185);f.g=null;f.b=null;f.a=null;f.d=null;f.j=null;f.i=null;f.p=null}gRc(a.c);a.b.a.$b();c.Vg()} +function GVc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;if(a.c.length==1){CVc((tFb(0,a.c.length),RD(a.c[0],121)));return tFb(0,a.c.length),RD(a.c[0],121)}else if(a.c.length<=0){return new YWc}for(i=new Anb(a);i.a<i.c.c.length;){g=RD(ynb(i),121);s=0;o=lve;p=lve;m=qwe;n=qwe;for(r=Sub(g.b,0);r.b!=r.d.c;){q=RD(evb(r),40);s+=RD(mQb(q,(h_c(),X$c)),17).a;o=$wnd.Math.min(o,q.e.a);p=$wnd.Math.min(p,q.e.b);m=$wnd.Math.max(m,q.e.a+q.f.a);n=$wnd.Math.max(n,q.e.b+q.f.b)}pQb(g,(h_c(),X$c),sgb(s));pQb(g,(q$c(),SZc),new rjd(o,p));pQb(g,RZc,new rjd(m,n))}yob();_mb(a,new KVc);v=new YWc;kQb(v,(tFb(0,a.c.length),RD(a.c[0],96)));l=0;D=0;for(j=new Anb(a);j.a<j.c.c.length;){g=RD(ynb(j),121);w=ojd(ajd(RD(mQb(g,(q$c(),RZc)),8)),RD(mQb(g,SZc),8));l=$wnd.Math.max(l,w.a);D+=w.a*w.b}l=$wnd.Math.max(l,$wnd.Math.sqrt(D)*Kfb(UD(mQb(v,(h_c(),E$c)))));A=Kfb(UD(mQb(v,_$c)));F=0;G=0;k=0;b=A;for(h=new Anb(a);h.a<h.c.c.length;){g=RD(ynb(h),121);w=ojd(ajd(RD(mQb(g,(q$c(),RZc)),8)),RD(mQb(g,SZc),8));if(F+w.a>l){F=0;G+=k+A;k=0}FVc(v,g,F,G);b=$wnd.Math.max(b,F+w.a);k=$wnd.Math.max(k,w.b);F+=w.a+A}u=new Tsb;c=new Tsb;for(C=new Anb(a);C.a<C.c.c.length;){B=RD(ynb(C),121);d=Heb(TD(mQb(B,(umd(),Mkd))));t=!B.q?(null,wob):B.q;for(f=t.vc().Kc();f.Ob();){e=RD(f.Pb(),44);if(Ujb(u,e.ld())){if(dE(RD(e.ld(),149).Sg())!==dE(e.md())){if(d&&Ujb(c,e.ld())){gib();'Found different values for property '+RD(e.ld(),149).Pg()+' in components.';String.fromCharCode(10)}else{Zjb(u,RD(e.ld(),149),e.md());pQb(v,RD(e.ld(),149),e.md());d&&Zjb(c,RD(e.ld(),149),e.md())}}}else{Zjb(u,RD(e.ld(),149),e.md());pQb(v,RD(e.ld(),149),e.md())}}}CVc(v);return v} +function f7d(a,b){switch(a.e){case 0:case 2:case 4:case 6:case 42:case 44:case 46:case 48:case 8:case 10:case 12:case 14:case 16:case 18:case 20:case 22:case 24:case 26:case 28:case 30:case 32:case 34:case 36:case 38:return new sje(a.b,a.a,b,a.c);case 1:return new _Zd(a.a,b,BYd(b.Dh(),a.c));case 43:return new lie(a.a,b,BYd(b.Dh(),a.c));case 3:return new XZd(a.a,b,BYd(b.Dh(),a.c));case 45:return new iie(a.a,b,BYd(b.Dh(),a.c));case 41:return new DVd(RD(WVd(a.c),29),a.a,b,BYd(b.Dh(),a.c));case 50:return new Cje(RD(WVd(a.c),29),a.a,b,BYd(b.Dh(),a.c));case 5:return new oie(a.a,b,BYd(b.Dh(),a.c),a.d.n);case 47:return new sie(a.a,b,BYd(b.Dh(),a.c),a.d.n);case 7:return new C5d(a.a,b,BYd(b.Dh(),a.c),a.d.n);case 49:return new G5d(a.a,b,BYd(b.Dh(),a.c),a.d.n);case 9:return new gie(a.a,b,BYd(b.Dh(),a.c));case 11:return new eie(a.a,b,BYd(b.Dh(),a.c));case 13:return new aie(a.a,b,BYd(b.Dh(),a.c));case 15:return new Kfe(a.a,b,BYd(b.Dh(),a.c));case 17:return new Cie(a.a,b,BYd(b.Dh(),a.c));case 19:return new zie(a.a,b,BYd(b.Dh(),a.c));case 21:return new vie(a.a,b,BYd(b.Dh(),a.c));case 23:return new PZd(a.a,b,BYd(b.Dh(),a.c));case 25:return new bje(a.a,b,BYd(b.Dh(),a.c),a.d.n);case 27:return new Yie(a.a,b,BYd(b.Dh(),a.c),a.d.n);case 29:return new Tie(a.a,b,BYd(b.Dh(),a.c),a.d.n);case 31:return new Nie(a.a,b,BYd(b.Dh(),a.c),a.d.n);case 33:return new $ie(a.a,b,BYd(b.Dh(),a.c),a.d.n);case 35:return new Vie(a.a,b,BYd(b.Dh(),a.c),a.d.n);case 37:return new Pie(a.a,b,BYd(b.Dh(),a.c),a.d.n);case 39:return new Iie(a.a,b,BYd(b.Dh(),a.c),a.d.n);case 40:return new Uge(b,BYd(b.Dh(),a.c));default:throw Adb(new yz('Unknown feature style: '+a.e));}} +function h2c(a){var b,c,d,e,f,g,h,i;f=0;e=a.a.b;for(i=Sub(a.a,0);i.b!=i.d.c;){h=RD(evb(i),240);g=(f+1)/(e+1);if(!a.c&&!a.d){return}else if(!!a.c&&!a.d){a.g=true;if(a.b==(Cmd(),ymd)){d=a.c.e.b+a.c.f.b+a.e*(f+1);b=new rjd(Kfb(UD(mQb(a.c,(q$c(),e$c))))+a.e,d);c=new rjd(Kfb(UD(mQb(a.c,f$c)))-a.e,d)}else if(a.b==zmd){d=a.c.e.b+a.c.f.b+a.e*(f+1);b=new rjd(Kfb(UD(mQb(a.c,(q$c(),f$c))))-a.e,d);c=new rjd(Kfb(UD(mQb(a.c,e$c)))+a.e,d)}else if(a.b==Bmd){d=a.c.e.a+a.c.f.a+a.e*(f+1);b=new rjd(d,Kfb(UD(mQb(a.c,(q$c(),e$c))))+a.e);c=new rjd(d,Kfb(UD(mQb(a.c,f$c)))-a.e)}else{d=a.c.e.a+a.c.f.a+a.e*(f+1);b=new rjd(d,Kfb(UD(mQb(a.c,(q$c(),f$c))))-a.e);c=new rjd(d,Kfb(UD(mQb(a.c,e$c)))+a.e)}}else if(!!a.c&&!!a.d){if(a.b==(Cmd(),ymd)){d=a.d.e.b*g+(a.c.e.b+a.c.f.b)*(1-g);b=new rjd(Kfb(UD(mQb(a.c,(q$c(),e$c))))+a.e,d);c=new rjd(Kfb(UD(mQb(a.c,f$c)))-a.e,d)}else if(a.b==zmd){d=a.d.e.b*g+(a.c.e.b+a.c.f.b)*(1-g);b=new rjd(Kfb(UD(mQb(a.c,(q$c(),f$c))))-a.e,d);c=new rjd(Kfb(UD(mQb(a.c,e$c)))+a.e,d)}else if(a.b==Bmd){d=a.d.e.a*g+(a.c.e.a+a.c.f.a)*(1-g);b=new rjd(d,Kfb(UD(mQb(a.c,(q$c(),e$c))))+a.e);c=new rjd(d,Kfb(UD(mQb(a.c,f$c)))-a.e)}else{d=a.d.e.a*g+(a.c.e.a+a.c.f.a)*(1-g);b=new rjd(d,Kfb(UD(mQb(a.c,(q$c(),f$c))))-a.e);c=new rjd(d,Kfb(UD(mQb(a.c,e$c)))+a.e)}}else{a.f=true;if(a.b==(Cmd(),ymd)){d=a.d.e.b-a.e*(f+1);b=new rjd(Kfb(UD(mQb(a.d,(q$c(),e$c))))+a.e,d);c=new rjd(Kfb(UD(mQb(a.d,f$c)))-a.e,d)}else if(a.b==zmd){d=a.d.e.b-a.e*(f+1);b=new rjd(Kfb(UD(mQb(a.d,(q$c(),f$c))))-a.e,d);c=new rjd(Kfb(UD(mQb(a.d,e$c)))+a.e,d)}else if(a.b==Bmd){d=a.d.e.a-a.e*(f+1);b=new rjd(d,Kfb(UD(mQb(a.d,(q$c(),e$c))))+a.e);c=new rjd(d,Kfb(UD(mQb(a.d,f$c)))-a.e)}else{d=a.d.e.a-a.e*(f+1);b=new rjd(d,Kfb(UD(mQb(a.d,(q$c(),f$c))))-a.e);c=new rjd(d,Kfb(UD(mQb(a.d,e$c)))+a.e)}}RD(h.a,8).a=b.a;RD(h.a,8).b=b.b;h.b.a=c.a;h.b.b=c.b;++f}} +function LA(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r;switch(b){case 71:h=d.q.getFullYear()-Owe>=-1900?1:0;c>=4?Zhb(a,cD(WC(qJ,1),Nve,2,6,[Qwe,Rwe])[h]):Zhb(a,cD(WC(qJ,1),Nve,2,6,['BC','AD'])[h]);break;case 121:AA(a,c,d);break;case 77:zA(a,c,d);break;case 107:i=e.q.getHours();i==0?UA(a,24,c):UA(a,i,c);break;case 83:yA(a,c,e);break;case 69:k=d.q.getDay();c==5?Zhb(a,cD(WC(qJ,1),Nve,2,6,['S','M','T','W','T','F','S'])[k]):c==4?Zhb(a,cD(WC(qJ,1),Nve,2,6,[Swe,Twe,Uwe,Vwe,Wwe,Xwe,Ywe])[k]):Zhb(a,cD(WC(qJ,1),Nve,2,6,['Sun','Mon','Tue','Wed','Thu','Fri','Sat'])[k]);break;case 97:e.q.getHours()>=12&&e.q.getHours()<24?Zhb(a,cD(WC(qJ,1),Nve,2,6,['AM','PM'])[1]):Zhb(a,cD(WC(qJ,1),Nve,2,6,['AM','PM'])[0]);break;case 104:l=e.q.getHours()%12;l==0?UA(a,12,c):UA(a,l,c);break;case 75:m=e.q.getHours()%12;UA(a,m,c);break;case 72:n=e.q.getHours();UA(a,n,c);break;case 99:o=d.q.getDay();c==5?Zhb(a,cD(WC(qJ,1),Nve,2,6,['S','M','T','W','T','F','S'])[o]):c==4?Zhb(a,cD(WC(qJ,1),Nve,2,6,[Swe,Twe,Uwe,Vwe,Wwe,Xwe,Ywe])[o]):c==3?Zhb(a,cD(WC(qJ,1),Nve,2,6,['Sun','Mon','Tue','Wed','Thu','Fri','Sat'])[o]):UA(a,o,1);break;case 76:p=d.q.getMonth();c==5?Zhb(a,cD(WC(qJ,1),Nve,2,6,['J','F','M','A','M','J','J','A','S','O','N','D'])[p]):c==4?Zhb(a,cD(WC(qJ,1),Nve,2,6,[Cwe,Dwe,Ewe,Fwe,Gwe,Hwe,Iwe,Jwe,Kwe,Lwe,Mwe,Nwe])[p]):c==3?Zhb(a,cD(WC(qJ,1),Nve,2,6,['Jan','Feb','Mar','Apr',Gwe,'Jun','Jul','Aug','Sep','Oct','Nov','Dec'])[p]):UA(a,p+1,c);break;case 81:q=d.q.getMonth()/3|0;c<4?Zhb(a,cD(WC(qJ,1),Nve,2,6,['Q1','Q2','Q3','Q4'])[q]):Zhb(a,cD(WC(qJ,1),Nve,2,6,['1st quarter','2nd quarter','3rd quarter','4th quarter'])[q]);break;case 100:r=d.q.getDate();UA(a,r,c);break;case 109:j=e.q.getMinutes();UA(a,j,c);break;case 115:g=e.q.getSeconds();UA(a,g,c);break;case 122:c<4?Zhb(a,f.c[0]):Zhb(a,f.c[1]);break;case 118:Zhb(a,f.b);break;case 90:c<3?Zhb(a,cB(f)):c==3?Zhb(a,bB(f)):Zhb(a,eB(f.a));break;default:return false;}return true} +function f5b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H;X4b(b);i=RD(QHd((!b.b&&(b.b=new Yie(E4,b,4,7)),b.b),0),84);k=RD(QHd((!b.c&&(b.c=new Yie(E4,b,5,8)),b.c),0),84);h=AGd(i);j=AGd(k);g=(!b.a&&(b.a=new C5d(F4,b,6,6)),b.a).i==0?null:RD(QHd((!b.a&&(b.a=new C5d(F4,b,6,6)),b.a),0),166);A=RD(Wjb(a.a,h),10);F=RD(Wjb(a.a,j),10);B=null;G=null;if(ZD(i,193)){w=RD(Wjb(a.a,i),305);if(ZD(w,12)){B=RD(w,12)}else if(ZD(w,10)){A=RD(w,10);B=RD(Vmb(A.j,0),12)}}if(ZD(k,193)){D=RD(Wjb(a.a,k),305);if(ZD(D,12)){G=RD(D,12)}else if(ZD(D,10)){F=RD(D,10);G=RD(Vmb(F.j,0),12)}}if(!A||!F){throw Adb(new Ked('The source or the target of edge '+b+' could not be found. '+'This usually happens when an edge connects a node laid out by ELK Layered to a node in '+'another level of hierarchy laid out by either another instance of ELK Layered or another '+'layout algorithm alltogether. The former can be solved by setting the hierarchyHandling '+'option to INCLUDE_CHILDREN.'))}p=new a1b;kQb(p,b);pQb(p,(Ywc(),Awc),b);pQb(p,(yCc(),RAc),null);n=RD(mQb(d,kwc),21);A==F&&n.Fc((ovc(),nvc));if(!B){v=(BEc(),zEc);C=null;if(!!g&&Dod(RD(mQb(A,BBc),101))){C=new rjd(g.j,g.k);Fsd(C,kzd(b));Gsd(C,c);if(NGd(j,h)){v=yEc;$id(C,A.n)}}B=g2b(A,C,v,d)}if(!G){v=(BEc(),yEc);H=null;if(!!g&&Dod(RD(mQb(F,BBc),101))){H=new rjd(g.b,g.c);Fsd(H,kzd(b));Gsd(H,c)}G=g2b(F,H,v,Y2b(F))}Y0b(p,B);Z0b(p,G);(B.e.c.length>1||B.g.c.length>1||G.e.c.length>1||G.g.c.length>1)&&n.Fc((ovc(),ivc));for(m=new dMd((!b.n&&(b.n=new C5d(I4,b,1,7)),b.n));m.e!=m.i.gc();){l=RD(bMd(m),135);if(!Heb(TD(Gxd(l,pBc)))&&!!l.a){q=h5b(l);Rmb(p.b,q);switch(RD(mQb(q,wAc),278).g){case 1:case 2:n.Fc((ovc(),gvc));break;case 0:n.Fc((ovc(),evc));pQb(q,wAc,(Omd(),Lmd));}}}f=RD(mQb(d,oAc),322);r=RD(mQb(d,kBc),323);e=f==(stc(),ptc)||r==(JDc(),FDc);if(!!g&&(!g.a&&(g.a=new XZd(D4,g,5)),g.a).i!=0&&e){s=ssd(g);o=new Ejd;for(u=Sub(s,0);u.b!=u.d.c;){t=RD(evb(u),8);Mub(o,new sjd(t))}pQb(p,Bwc,o)}return p} +function F0c(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I;C=0;D=0;A=new Tsb;v=RD(Lvb(JDb(GDb(new SDb(null,new Swb(a.b,16)),new v1c),new Z0c)),17).a+1;B=$C(kE,Pwe,28,v,15,1);q=$C(kE,Pwe,28,v,15,1);for(p=0;p<v;p++){B[p]=0;q[p]=0}i=RD(zDb(BDb(new SDb(null,new Swb(a.a,16))),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);for(k=i.Kc();k.Ob();){j=RD(k.Pb(),65);G=RD(mQb(j.b,(h_c(),f_c)),17).a;I=RD(mQb(j.c,f_c),17).a;u=I-G;if(u>1){for(h=G+1;h<I;h++){l=h;w=RD(zDb(CDb(new SDb(null,new Swb(a.b,16)),new P1c(l)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[vBb]))),15);o=0;if(b==(Cmd(),ymd)||b==zmd){w.jd(new V1c);for(o=0;o<w.gc();o++){r=(h-G)/(I-G);if(RD(w.Xb(o),40).e.b>j.b.e.b*(1-r)+j.c.e.b*r){break}}if(w.gc()>0){H=j.a.b==0?ajd(j.b.e):RD(Rub(j.a),8);t=$id(ajd(RD(w.Xb(w.gc()-1),40).e),RD(w.Xb(w.gc()-1),40).f);m=$id(ajd(RD(w.Xb(0),40).e),RD(w.Xb(0),40).f);if(o>=w.gc()-1&&H.b>t.b&&j.c.e.b>t.b){continue}if(o<=0&&H.b<m.a&&j.c.e.b<m.b){continue}}}else{w.jd(new Z1c);for(o=0;o<w.gc();o++){r=(h-G)/(I-G);if(RD(w.Xb(o),40).e.a>j.b.e.a*(1-r)+j.c.e.a*r){break}}if(w.gc()>0){H=j.a.b==0?ajd(j.b.e):RD(Rub(j.a),8);t=$id(ajd(RD(w.Xb(w.gc()-1),40).e),RD(w.Xb(w.gc()-1),40).f);m=$id(ajd(RD(w.Xb(0),40).e),RD(w.Xb(0),40).f);if(o>=w.gc()-1&&H.a>t.a&&j.c.e.a>t.a){continue}if(o<=0&&H.a<m.a&&j.c.e.a<m.a){continue}}}e=new pjd;f=new pjd;Mub(j.a,e);Mub(j.a,f);g=new gud(e,f,j);s=Rdb(Sdb(h,32),Cdb(o,yxe));if(Ujb(A,Hgb(s))){n=RD(Wjb(A,Hgb(s)),675);Mub(n.a,g);Dmd(n.b)?tvb(n.a,new l2c):tvb(n.a,new p2c);h2c(n)}else{n=new i2c(o==0?null:RD(w.Xb(o-1),40),o==w.gc()?null:RD(w.Xb(o),40),g,a);Zjb(A,Hgb(s),n)}if(b==ymd||b==zmd){n.f&&n.d.e.b<=Kfb(UD(mQb(a,(q$c(),_Zc))))&&++C;n.g&&n.c.e.b+n.c.f.b>=Kfb(UD(mQb(a,(q$c(),$Zc))))&&++D}else{n.f&&n.d.e.a<=Kfb(UD(mQb(a,(q$c(),ZZc))))&&++C;n.g&&n.c.e.a+n.c.f.a>=Kfb(UD(mQb(a,(q$c(),YZc))))&&++D}}}else if(u==0){H0c(j)}else if(u<0){++B[G];++q[I];F=C0c(j,b,a,new Ptd(sgb(C),sgb(D)),c,d,new Ptd(sgb(q[I]),sgb(B[G])));C=RD(F.a,17).a;D=RD(F.b,17).a}}} +function qrc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;d=b;i=c;if(a.b&&d.j==(qpd(),ppd)&&i.j==(qpd(),ppd)){s=d;d=i;i=s}if(Ujb(a.a,d)){if(Zsb(RD(Wjb(a.a,d),49),i)){return 1}}else{Zjb(a.a,d,new _sb)}if(Ujb(a.a,i)){if(Zsb(RD(Wjb(a.a,i),49),d)){return -1}}else{Zjb(a.a,i,new _sb)}if(Ujb(a.d,d)){if(Zsb(RD(Wjb(a.d,d),49),i)){return -1}}else{Zjb(a.d,d,new _sb)}if(Ujb(a.d,i)){if(Zsb(RD(Wjb(a.a,i),49),d)){return 1}}else{Zjb(a.d,i,new _sb)}if(d.j!=i.j){r=yrc(d.j,i.j);r==-1?rrc(a,i,d):rrc(a,d,i);return r}if(d.e.c.length!=0&&i.e.c.length!=0){if(a.b){r=orc(d,i);if(r!=0){r==-1?rrc(a,i,d):r==1&&rrc(a,d,i);return r}}f=RD(Vmb(d.e,0),18).c.i;k=RD(Vmb(i.e,0),18).c.i;if(f==k){e=RD(mQb(RD(Vmb(d.e,0),18),(Ywc(),zwc)),17).a;j=RD(mQb(RD(Vmb(i.e,0),18),zwc),17).a;e>j?rrc(a,d,i):rrc(a,i,d);return e<j?-1:e>j?1:0}for(o=a.c,p=0,q=o.length;p<q;++p){n=o[p];if(n==f){rrc(a,d,i);return 1}else if(n==k){rrc(a,i,d);return -1}}}if(d.g.c.length!=0&&i.g.c.length!=0){h=RD(mQb(d,(Ywc(),xwc)),10);m=RD(mQb(i,xwc),10);if(a.e==(kEc(),jEc)&&!!h&&!!m&&nQb(h,zwc)&&nQb(m,zwc)){e=RD(mQb(h,zwc),17).a;j=RD(mQb(m,zwc),17).a;e>j?rrc(a,d,i):rrc(a,i,d);return e<j?-1:e>j?1:0}if(a.b){r=orc(d,i);if(r!=0){r==-1?rrc(a,i,d):r==1&&rrc(a,d,i);return r}}g=0;l=0;nQb(RD(Vmb(d.g,0),18),zwc)&&(g=RD(mQb(RD(Vmb(d.g,0),18),zwc),17).a);nQb(RD(Vmb(i.g,0),18),zwc)&&(l=RD(mQb(RD(Vmb(d.g,0),18),zwc),17).a);if(!!h&&h==m){if(Heb(TD(mQb(RD(Vmb(d.g,0),18),Nwc)))&&!Heb(TD(mQb(RD(Vmb(i.g,0),18),Nwc)))){rrc(a,d,i);return 1}else if(!Heb(TD(mQb(RD(Vmb(d.g,0),18),Nwc)))&&Heb(TD(mQb(RD(Vmb(i.g,0),18),Nwc)))){rrc(a,i,d);return -1}g>l?rrc(a,d,i):rrc(a,i,d);return g<l?-1:g>l?1:0}if(a.f){a.f._b(h)&&(g=RD(a.f.xc(h),17).a);a.f._b(m)&&(l=RD(a.f.xc(m),17).a)}g>l?rrc(a,d,i):rrc(a,i,d);return g<l?-1:g>l?1:0}if(d.e.c.length!=0&&i.g.c.length!=0){rrc(a,d,i);return 1}else if(d.g.c.length!=0&&i.e.c.length!=0){rrc(a,i,d);return -1}else if(nQb(d,(Ywc(),zwc))&&nQb(i,zwc)){e=RD(mQb(d,zwc),17).a;j=RD(mQb(i,zwc),17).a;e>j?rrc(a,d,i):rrc(a,i,d);return e<j?-1:e>j?1:0}else{rrc(a,i,d);return -1}} +function Yae(a){if(a.gb)return;a.gb=true;a.b=jBd(a,0);iBd(a.b,18);oBd(a.b,19);a.a=jBd(a,1);iBd(a.a,1);oBd(a.a,2);oBd(a.a,3);oBd(a.a,4);oBd(a.a,5);a.o=jBd(a,2);iBd(a.o,8);iBd(a.o,9);oBd(a.o,10);oBd(a.o,11);oBd(a.o,12);oBd(a.o,13);oBd(a.o,14);oBd(a.o,15);oBd(a.o,16);oBd(a.o,17);oBd(a.o,18);oBd(a.o,19);oBd(a.o,20);oBd(a.o,21);oBd(a.o,22);oBd(a.o,23);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);nBd(a.o);a.p=jBd(a,3);iBd(a.p,2);iBd(a.p,3);iBd(a.p,4);iBd(a.p,5);oBd(a.p,6);oBd(a.p,7);nBd(a.p);nBd(a.p);a.q=jBd(a,4);iBd(a.q,8);a.v=jBd(a,5);oBd(a.v,9);nBd(a.v);nBd(a.v);nBd(a.v);a.w=jBd(a,6);iBd(a.w,2);iBd(a.w,3);iBd(a.w,4);oBd(a.w,5);a.B=jBd(a,7);oBd(a.B,1);nBd(a.B);nBd(a.B);nBd(a.B);a.Q=jBd(a,8);oBd(a.Q,0);nBd(a.Q);a.R=jBd(a,9);iBd(a.R,1);a.S=jBd(a,10);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);nBd(a.S);a.T=jBd(a,11);oBd(a.T,10);oBd(a.T,11);oBd(a.T,12);oBd(a.T,13);oBd(a.T,14);nBd(a.T);nBd(a.T);a.U=jBd(a,12);iBd(a.U,2);iBd(a.U,3);oBd(a.U,4);oBd(a.U,5);oBd(a.U,6);oBd(a.U,7);nBd(a.U);a.V=jBd(a,13);oBd(a.V,10);a.W=jBd(a,14);iBd(a.W,18);iBd(a.W,19);iBd(a.W,20);oBd(a.W,21);oBd(a.W,22);oBd(a.W,23);a.bb=jBd(a,15);iBd(a.bb,10);iBd(a.bb,11);iBd(a.bb,12);iBd(a.bb,13);iBd(a.bb,14);iBd(a.bb,15);iBd(a.bb,16);oBd(a.bb,17);nBd(a.bb);nBd(a.bb);a.eb=jBd(a,16);iBd(a.eb,2);iBd(a.eb,3);iBd(a.eb,4);iBd(a.eb,5);iBd(a.eb,6);iBd(a.eb,7);oBd(a.eb,8);oBd(a.eb,9);a.ab=jBd(a,17);iBd(a.ab,0);iBd(a.ab,1);a.H=jBd(a,18);oBd(a.H,0);oBd(a.H,1);oBd(a.H,2);oBd(a.H,3);oBd(a.H,4);oBd(a.H,5);nBd(a.H);a.db=jBd(a,19);oBd(a.db,2);a.c=kBd(a,20);a.d=kBd(a,21);a.e=kBd(a,22);a.f=kBd(a,23);a.i=kBd(a,24);a.g=kBd(a,25);a.j=kBd(a,26);a.k=kBd(a,27);a.n=kBd(a,28);a.r=kBd(a,29);a.s=kBd(a,30);a.t=kBd(a,31);a.u=kBd(a,32);a.fb=kBd(a,33);a.A=kBd(a,34);a.C=kBd(a,35);a.D=kBd(a,36);a.F=kBd(a,37);a.G=kBd(a,38);a.I=kBd(a,39);a.J=kBd(a,40);a.L=kBd(a,41);a.M=kBd(a,42);a.N=kBd(a,43);a.O=kBd(a,44);a.P=kBd(a,45);a.X=kBd(a,46);a.Y=kBd(a,47);a.Z=kBd(a,48);a.$=kBd(a,49);a._=kBd(a,50);a.cb=kBd(a,51);a.K=kBd(a,52)} +function d5b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;g=new Yub;w=RD(mQb(c,(yCc(),rAc)),88);p=0;ye(g,(!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));while(g.b!=0){k=RD(g.b==0?null:(sFb(g.b!=0),Wub(g,g.a.a)),27);j=vCd(k);(dE(Gxd(j,cAc))!==dE((kEc(),hEc))||dE(Gxd(j,pAc))===dE((Ptc(),Otc))||dE(Gxd(j,pAc))===dE((Ptc(),Mtc))||Heb(TD(Gxd(j,eAc)))||dE(Gxd(j,Yzc))!==dE((U$b(),T$b))||dE(Gxd(j,ZAc))===dE((aEc(),TDc))||dE(Gxd(j,ZAc))===dE((aEc(),UDc))||dE(Gxd(j,$Ac))===dE((_Cc(),SCc))||dE(Gxd(j,$Ac))===dE((_Cc(),UCc)))&&!Heb(TD(Gxd(k,aAc)))&&Ixd(k,(Ywc(),zwc),sgb(p++));r=!Heb(TD(Gxd(k,pBc)));if(r){m=(!k.a&&(k.a=new C5d(J4,k,10,11)),k.a).i!=0;o=a5b(k);n=dE(Gxd(k,IAc))===dE((Fnd(),Cnd));G=!Hxd(k,(umd(),Akd))||khb(WD(Gxd(k,Akd)));u=null;if(G&&n&&(m||o)){u=Z4b(k);pQb(u,rAc,w);nQb(u,PBc)&&HCc(new RCc(Kfb(UD(mQb(u,PBc)))),u);if(RD(Gxd(k,lBc),181).gc()!=0){l=u;FDb(new SDb(null,(!k.c&&(k.c=new C5d(K4,k,9,9)),new Swb(k.c,16))),new u5b(l));V4b(k,u)}}A=c;B=RD(Wjb(a.a,vCd(k)),10);!!B&&(A=B.e);t=i5b(a,k,A);if(u){t.e=u;u.e=t;ye(g,(!k.a&&(k.a=new C5d(J4,k,10,11)),k.a))}}}p=0;Pub(g,b,g.c.b,g.c);while(g.b!=0){f=RD(g.b==0?null:(sFb(g.b!=0),Wub(g,g.a.a)),27);for(i=new dMd((!f.b&&(f.b=new C5d(G4,f,12,3)),f.b));i.e!=i.i.gc();){h=RD(bMd(i),74);X4b(h);(dE(Gxd(b,cAc))!==dE((kEc(),hEc))||dE(Gxd(b,pAc))===dE((Ptc(),Otc))||dE(Gxd(b,pAc))===dE((Ptc(),Mtc))||Heb(TD(Gxd(b,eAc)))||dE(Gxd(b,Yzc))!==dE((U$b(),T$b))||dE(Gxd(b,ZAc))===dE((aEc(),TDc))||dE(Gxd(b,ZAc))===dE((aEc(),UDc))||dE(Gxd(b,$Ac))===dE((_Cc(),SCc))||dE(Gxd(b,$Ac))===dE((_Cc(),UCc)))&&Ixd(h,(Ywc(),zwc),sgb(p++));D=AGd(RD(QHd((!h.b&&(h.b=new Yie(E4,h,4,7)),h.b),0),84));F=AGd(RD(QHd((!h.c&&(h.c=new Yie(E4,h,5,8)),h.c),0),84));if(Heb(TD(Gxd(h,pBc)))||Heb(TD(Gxd(D,pBc)))||Heb(TD(Gxd(F,pBc)))){continue}q=ozd(h)&&Heb(TD(Gxd(D,NAc)))&&Heb(TD(Gxd(h,OAc)));v=f;q||NGd(F,D)?(v=D):NGd(D,F)&&(v=F);A=c;B=RD(Wjb(a.a,v),10);!!B&&(A=B.e);s=f5b(a,h,v,A);pQb(s,(Ywc(),Zvc),_4b(a,h,b,c))}n=dE(Gxd(f,IAc))===dE((Fnd(),Cnd));if(n){for(e=new dMd((!f.a&&(f.a=new C5d(J4,f,10,11)),f.a));e.e!=e.i.gc();){d=RD(bMd(e),27);G=!Hxd(d,(umd(),Akd))||khb(WD(Gxd(d,Akd)));C=dE(Gxd(d,IAc))===dE(Cnd);G&&C&&(Pub(g,d,g.c.b,g.c),true)}}}} +function Ywc(){Ywc=geb;var a,b;Awc=new jGd(rAe);Zvc=new jGd('coordinateOrigin');Kwc=new jGd('processors');Yvc=new kGd('compoundNode',(Geb(),false));nwc=new kGd('insideConnections',false);Bwc=new jGd('originalBendpoints');Cwc=new jGd('originalDummyNodePosition');Dwc=new jGd('originalLabelEdge');Mwc=new jGd('representedLabels');cwc=new jGd('endLabels');dwc=new jGd('endLabel.origin');swc=new kGd('labelSide',(Pnd(),Ond));ywc=new kGd('maxEdgeThickness',0);Nwc=new kGd('reversed',false);Lwc=new jGd(sAe);vwc=new kGd('longEdgeSource',null);wwc=new kGd('longEdgeTarget',null);uwc=new kGd('longEdgeHasLabelDummies',false);twc=new kGd('longEdgeBeforeLabelDummy',false);bwc=new kGd('edgeConstraint',(huc(),fuc));pwc=new jGd('inLayerLayoutUnit');owc=new kGd('inLayerConstraint',(Gvc(),Evc));qwc=new kGd('inLayerSuccessorConstraint',new bnb);rwc=new kGd('inLayerSuccessorConstraintBetweenNonDummies',false);Iwc=new jGd('portDummy');$vc=new kGd('crossingHint',sgb(0));kwc=new kGd('graphProperties',(b=RD(mfb(iX),9),new Fsb(b,RD(WEb(b,b.length),9),0)));hwc=new kGd('externalPortSide',(qpd(),opd));iwc=new kGd('externalPortSize',new pjd);fwc=new jGd('externalPortReplacedDummies');gwc=new jGd('externalPortReplacedDummy');ewc=new kGd('externalPortConnections',(a=RD(mfb(E3),9),new Fsb(a,RD(WEb(a,a.length),9),0)));Jwc=new kGd(Xye,0);Uvc=new jGd('barycenterAssociates');Xwc=new jGd('TopSideComments');Vvc=new jGd('BottomSideComments');Xvc=new jGd('CommentConnectionPort');mwc=new kGd('inputCollect',false);Gwc=new kGd('outputCollect',false);awc=new kGd('cyclic',false);_vc=new jGd('crossHierarchyMap');Wwc=new jGd('targetOffset');new kGd('splineLabelSize',new pjd);Qwc=new jGd('spacings');Hwc=new kGd('partitionConstraint',false);Wvc=new jGd('breakingPoint.info');Uwc=new jGd('splines.survivingEdge');Twc=new jGd('splines.route.start');Rwc=new jGd('splines.edgeChain');Fwc=new jGd('originalPortConstraints');Pwc=new jGd('selfLoopHolder');Swc=new jGd('splines.nsPortY');zwc=new jGd('modelOrder');xwc=new jGd('longEdgeTargetNode');jwc=new kGd(GBe,false);Owc=new kGd(GBe,false);lwc=new jGd('layerConstraints.hiddenNodes');Ewc=new jGd('layerConstraints.opposidePort');Vwc=new jGd('targetNode.modelOrder')} +function D0c(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;for(l=Sub(a.b,0);l.b!=l.d.c;){k=RD(evb(l),40);if(lhb(k.c,IEe)){continue}f=RD(zDb(new SDb(null,new Swb(hWc(k,a),16)),tBb(new ZBb,new XBb,new wCb,cD(WC(QL,1),jwe,108,0,[(xBb(),vBb)]))),15);b==(Cmd(),ymd)||b==zmd?f.jd(new L1c):f.jd(new R1c);o=f.gc();for(e=0;e<o;e++){g=o==1?0.5:(1+e)/(o+1);if(b==ymd){j=Kfb(UD(mQb(k,(q$c(),e$c))));if(k.e.a+k.f.a+d<j){Oub(RD(f.Xb(e),65).a,new rjd(j+c,k.e.b+k.f.b*g))}else if(RD(f.Xb(e),65).a.b>0){h=RD(Rub(RD(f.Xb(e),65).a),8).a;m=k.e.a+k.f.a/2;i=RD(Rub(RD(f.Xb(e),65).a),8).b;n=k.e.b+k.f.b/2;d>0&&$wnd.Math.abs(i-n)/($wnd.Math.abs(h-m)/40)>50&&(n>i?Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a+d/5.3,k.e.b+k.f.b*g-d/2)):Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a+d/5.3,k.e.b+k.f.b*g+d/2)))}Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a,k.e.b+k.f.b*g))}else if(b==zmd){j=Kfb(UD(mQb(k,(q$c(),f$c))));if(k.e.a-d>j){Oub(RD(f.Xb(e),65).a,new rjd(j-c,k.e.b+k.f.b*g))}else if(RD(f.Xb(e),65).a.b>0){h=RD(Rub(RD(f.Xb(e),65).a),8).a;m=k.e.a+k.f.a/2;i=RD(Rub(RD(f.Xb(e),65).a),8).b;n=k.e.b+k.f.b/2;d>0&&$wnd.Math.abs(i-n)/($wnd.Math.abs(h-m)/40)>50&&(n>i?Oub(RD(f.Xb(e),65).a,new rjd(k.e.a-d/5.3,k.e.b+k.f.b*g-d/2)):Oub(RD(f.Xb(e),65).a,new rjd(k.e.a-d/5.3,k.e.b+k.f.b*g+d/2)))}Oub(RD(f.Xb(e),65).a,new rjd(k.e.a,k.e.b+k.f.b*g))}else if(b==Bmd){j=Kfb(UD(mQb(k,(q$c(),e$c))));if(k.e.b+k.f.b+d<j){Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g,j+c))}else if(RD(f.Xb(e),65).a.b>0){h=RD(Rub(RD(f.Xb(e),65).a),8).a;m=k.e.a+k.f.a/2;i=RD(Rub(RD(f.Xb(e),65).a),8).b;n=k.e.b+k.f.b/2;d>0&&$wnd.Math.abs(h-m)/($wnd.Math.abs(i-n)/40)>50&&(m>h?Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g-d/2,k.e.b+d/5.3+k.f.b)):Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g+d/2,k.e.b+d/5.3+k.f.b)))}Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g,k.e.b+k.f.b))}else{j=Kfb(UD(mQb(k,(q$c(),f$c))));if(mWc(RD(f.Xb(e),65),a)){Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g,RD(Rub(RD(f.Xb(e),65).a),8).b))}else if(k.e.b-d>j){Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g,j-c))}else if(RD(f.Xb(e),65).a.b>0){h=RD(Rub(RD(f.Xb(e),65).a),8).a;m=k.e.a+k.f.a/2;i=RD(Rub(RD(f.Xb(e),65).a),8).b;n=k.e.b+k.f.b/2;d>0&&$wnd.Math.abs(h-m)/($wnd.Math.abs(i-n)/40)>50&&(m>h?Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g-d/2,k.e.b-d/5.3)):Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g+d/2,k.e.b-d/5.3)))}Oub(RD(f.Xb(e),65).a,new rjd(k.e.a+k.f.a*g,k.e.b))}}}} +function umd(){umd=geb;var a,b;Akd=new jGd(OGe);Tld=new jGd(PGe);Ckd=(Rjd(),Ljd);Bkd=new lGd(MDe,Ckd);new Xsd;Dkd=new lGd(Dze,null);Ekd=new jGd(QGe);Lkd=(ukd(),ysb(tkd,cD(WC(q3,1),jwe,298,0,[pkd])));Kkd=new lGd(YDe,Lkd);Mkd=new lGd(LDe,(Geb(),false));Okd=(Cmd(),Amd);Nkd=new lGd(PDe,Okd);Tkd=(Ymd(),Xmd);Skd=new lGd(kDe,Tkd);Wkd=new lGd(MGe,false);Ykd=(Fnd(),Dnd);Xkd=new lGd(fDe,Ykd);uld=new A3b(12);tld=new lGd(Eze,uld);ald=new lGd(dAe,false);bld=new lGd(iEe,false);sld=new lGd(gAe,false);Ild=(Bod(),Aod);Hld=new lGd(eAe,Ild);Qld=new jGd(fEe);Rld=new jGd($ze);Sld=new jGd(bAe);Vld=new jGd(cAe);dld=new Ejd;cld=new lGd(ZDe,dld);Jkd=new lGd(aEe,false);Zkd=new lGd(bEe,false);new jGd(RGe);fld=new P2b;eld=new lGd(gEe,fld);rld=new lGd(JDe,false);new Xsd;Uld=new lGd(SGe,1);Ikd=new jGd(TGe);Hkd=new jGd(UGe);mmd=new lGd(mAe,false);new lGd(VGe,true);sgb(0);new lGd(WGe,sgb(100));new lGd(XGe,false);sgb(0);new lGd(YGe,sgb(4000));sgb(0);new lGd(ZGe,sgb(400));new lGd($Ge,false);new lGd(_Ge,false);new lGd(aHe,true);new lGd(bHe,false);Gkd=(Grd(),Frd);Fkd=new lGd(NGe,Gkd);Wld=new lGd(xDe,10);Xld=new lGd(yDe,10);Yld=new lGd(Bze,20);Zld=new lGd(zDe,10);$ld=new lGd(aAe,2);_ld=new lGd(ADe,10);bmd=new lGd(BDe,0);cmd=new lGd(EDe,5);dmd=new lGd(CDe,1);emd=new lGd(DDe,1);fmd=new lGd(_ze,20);gmd=new lGd(FDe,10);jmd=new lGd(GDe,10);amd=new jGd(HDe);imd=new Q2b;hmd=new lGd(hEe,imd);xld=new jGd(eEe);wld=false;vld=new lGd(dEe,wld);hld=new A3b(5);gld=new lGd(QDe,hld);jld=(dod(),b=RD(mfb(A3),9),new Fsb(b,RD(WEb(b,b.length),9),0));ild=new lGd(kAe,jld);Ald=(pod(),mod);zld=new lGd(TDe,Ald);Cld=new jGd(UDe);Dld=new jGd(VDe);Eld=new jGd(WDe);Bld=new jGd(XDe);lld=(a=RD(mfb(H3),9),new Fsb(a,RD(WEb(a,a.length),9),0));kld=new lGd(jAe,lld);qld=xsb((dqd(),Ypd));pld=new lGd(iAe,qld);old=new rjd(0,0);nld=new lGd(CAe,old);mld=new lGd(hAe,false);Rkd=(Omd(),Lmd);Qkd=new lGd($De,Rkd);Pkd=new lGd(fAe,false);new jGd(cHe);sgb(1);new lGd(dHe,null);Fld=new jGd(cEe);Jld=new jGd(_De);Pld=(qpd(),opd);Old=new lGd(KDe,Pld);Gld=new jGd(IDe);Mld=(Pod(),xsb(Nod));Lld=new lGd(lAe,Mld);Kld=new lGd(RDe,false);Nld=new lGd(SDe,true);new Xsd;qmd=new lGd(nAe,1);smd=new lGd(eHe,null);lmd=new lGd(oAe,150);kmd=new lGd(pAe,1.414);nmd=new lGd(qAe,null);omd=new lGd(fHe,1);$kd=new lGd(NDe,false);_kd=new lGd(ODe,false);Ukd=new lGd(Cze,1);Vkd=(ind(),gnd);new lGd(gHe,Vkd);yld=true;rmd=(mqd(),jqd);tmd=jqd;pmd=jqd} +function hcc(){hcc=geb;nbc=new icc('DIRECTION_PREPROCESSOR',0);kbc=new icc('COMMENT_PREPROCESSOR',1);obc=new icc('EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER',2);Ebc=new icc('INTERACTIVE_EXTERNAL_PORT_POSITIONER',3);Xbc=new icc('PARTITION_PREPROCESSOR',4);Ibc=new icc('LABEL_DUMMY_INSERTER',5);bcc=new icc('SELF_LOOP_PREPROCESSOR',6);Nbc=new icc('LAYER_CONSTRAINT_PREPROCESSOR',7);Vbc=new icc('PARTITION_MIDPROCESSOR',8);zbc=new icc('HIGH_DEGREE_NODE_LAYER_PROCESSOR',9);Rbc=new icc('NODE_PROMOTION',10);Mbc=new icc('LAYER_CONSTRAINT_POSTPROCESSOR',11);Wbc=new icc('PARTITION_POSTPROCESSOR',12);vbc=new icc('HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR',13);dcc=new icc('SEMI_INTERACTIVE_CROSSMIN_PROCESSOR',14);ebc=new icc('BREAKING_POINT_INSERTER',15);Qbc=new icc('LONG_EDGE_SPLITTER',16);Zbc=new icc('PORT_SIDE_PROCESSOR',17);Fbc=new icc('INVERTED_PORT_PROCESSOR',18);Ybc=new icc('PORT_LIST_SORTER',19);fcc=new icc('SORT_BY_INPUT_ORDER_OF_MODEL',20);Tbc=new icc('NORTH_SOUTH_PORT_PREPROCESSOR',21);fbc=new icc('BREAKING_POINT_PROCESSOR',22);Ubc=new icc(jBe,23);gcc=new icc(kBe,24);_bc=new icc('SELF_LOOP_PORT_RESTORER',25);ecc=new icc('SINGLE_EDGE_GRAPH_WRAPPER',26);Gbc=new icc('IN_LAYER_CONSTRAINT_PROCESSOR',27);sbc=new icc('END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR',28);Hbc=new icc('LABEL_AND_NODE_SIZE_PROCESSOR',29);Dbc=new icc('INNERMOST_NODE_MARGIN_CALCULATOR',30);ccc=new icc('SELF_LOOP_ROUTER',31);ibc=new icc('COMMENT_NODE_MARGIN_CALCULATOR',32);qbc=new icc('END_LABEL_PREPROCESSOR',33);Kbc=new icc('LABEL_DUMMY_SWITCHER',34);hbc=new icc('CENTER_LABEL_MANAGEMENT_PROCESSOR',35);Lbc=new icc('LABEL_SIDE_SELECTOR',36);Bbc=new icc('HYPEREDGE_DUMMY_MERGER',37);wbc=new icc('HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR',38);Obc=new icc('LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR',39);ybc=new icc('HIERARCHICAL_PORT_POSITION_PROCESSOR',40);lbc=new icc('CONSTRAINTS_POSTPROCESSOR',41);jbc=new icc('COMMENT_POSTPROCESSOR',42);Cbc=new icc('HYPERNODE_PROCESSOR',43);xbc=new icc('HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER',44);Pbc=new icc('LONG_EDGE_JOINER',45);acc=new icc('SELF_LOOP_POSTPROCESSOR',46);gbc=new icc('BREAKING_POINT_REMOVER',47);Sbc=new icc('NORTH_SOUTH_PORT_POSTPROCESSOR',48);Abc=new icc('HORIZONTAL_COMPACTOR',49);Jbc=new icc('LABEL_DUMMY_REMOVER',50);tbc=new icc('FINAL_SPLINE_BENDPOINTS_CALCULATOR',51);rbc=new icc('END_LABEL_SORTER',52);$bc=new icc('REVERSED_EDGE_RESTORER',53);pbc=new icc('END_LABEL_POSTPROCESSOR',54);ubc=new icc('HIERARCHICAL_NODE_RESIZER',55);mbc=new icc('DIRECTION_POSTPROCESSOR',56)} +function Ozc(){Ozc=geb;Uxc=($tc(),Ytc);Txc=new lGd(HBe,Uxc);jyc=new lGd(IBe,(Geb(),false));pyc=(Ovc(),Mvc);oyc=new lGd(JBe,pyc);Hyc=new lGd(KBe,false);Iyc=new lGd(LBe,true);ixc=new lGd(MBe,false);azc=(sEc(),qEc);_yc=new lGd(NBe,azc);sgb(1);izc=new lGd(OBe,sgb(7));jzc=new lGd(PBe,false);kyc=new lGd(QBe,false);Sxc=(Ptc(),Ltc);Rxc=new lGd(RBe,Sxc);Gyc=(_Cc(),ZCc);Fyc=new lGd(SBe,Gyc);wyc=(cxc(),bxc);vyc=new lGd(TBe,wyc);sgb(-1);uyc=new lGd(UBe,null);sgb(-1);xyc=new lGd(VBe,sgb(-1));sgb(-1);yyc=new lGd(WBe,sgb(4));sgb(-1);Ayc=new lGd(XBe,sgb(2));Eyc=(aEc(),$Dc);Dyc=new lGd(YBe,Eyc);sgb(0);Cyc=new lGd(ZBe,sgb(0));syc=new lGd($Be,sgb(lve));Qxc=(stc(),qtc);Pxc=new lGd(_Be,Qxc);yxc=new lGd(aCe,false);Hxc=new lGd(bCe,0.1);Nxc=new lGd(cCe,false);Jxc=new lGd(dCe,null);Kxc=new lGd(eCe,null);sgb(-1);Lxc=new lGd(fCe,null);sgb(-1);Mxc=new lGd(gCe,sgb(-1));sgb(0);zxc=new lGd(hCe,sgb(40));Fxc=(xvc(),wvc);Exc=new lGd(iCe,Fxc);Bxc=uvc;Axc=new lGd(jCe,Bxc);$yc=(JDc(),EDc);Zyc=new lGd(kCe,$yc);Pyc=new jGd(lCe);Kyc=(Cuc(),Auc);Jyc=new lGd(mCe,Kyc);Nyc=(Ouc(),Luc);Myc=new lGd(nCe,Nyc);new Xsd;Syc=new lGd(oCe,0.3);Uyc=new jGd(pCe);Wyc=(wDc(),uDc);Vyc=new lGd(qCe,Wyc);ayc=(KEc(),IEc);_xc=new lGd(rCe,ayc);cyc=(TEc(),SEc);byc=new lGd(sCe,cyc);eyc=(lFc(),kFc);dyc=new lGd(tCe,eyc);gyc=new lGd(uCe,0.2);Zxc=new lGd(vCe,2);ezc=new lGd(wCe,null);gzc=new lGd(xCe,10);fzc=new lGd(yCe,10);hzc=new lGd(zCe,20);sgb(0);bzc=new lGd(ACe,sgb(0));sgb(0);czc=new lGd(BCe,sgb(0));sgb(0);dzc=new lGd(CCe,sgb(0));jxc=new lGd(DCe,false);nxc=($uc(),Yuc);mxc=new lGd(ECe,nxc);lxc=(jtc(),itc);kxc=new lGd(FCe,lxc);myc=new lGd(GCe,false);sgb(0);lyc=new lGd(HCe,sgb(16));sgb(0);nyc=new lGd(ICe,sgb(5));Gzc=(DFc(),BFc);Fzc=new lGd(JCe,Gzc);kzc=new lGd(KCe,10);nzc=new lGd(LCe,1);wzc=(Etc(),Dtc);vzc=new lGd(MCe,wzc);qzc=new jGd(NCe);tzc=sgb(1);sgb(0);szc=new lGd(OCe,tzc);Lzc=(uFc(),rFc);Kzc=new lGd(PCe,Lzc);Hzc=new jGd(QCe);Bzc=new lGd(RCe,true);zzc=new lGd(SCe,2);Dzc=new lGd(TCe,true);Yxc=(tuc(),ruc);Xxc=new lGd(UCe,Yxc);Wxc=(btc(),Zsc);Vxc=new lGd(VCe,Wxc);xxc=(kEc(),hEc);wxc=new lGd(WCe,xxc);vxc=new lGd(XCe,false);uxc=new lGd(YCe,false);pxc=(U$b(),T$b);oxc=new lGd(ZCe,pxc);txc=(lDc(),iDc);sxc=new lGd($Ce,txc);qxc=new lGd(_Ce,0);rxc=new lGd(aDe,0);ryc=Ntc;qyc=ptc;zyc=YCc;Byc=YCc;tyc=TCc;Ixc=(Fnd(),Cnd);Oxc=qtc;Gxc=qtc;Cxc=qtc;Dxc=Cnd;Qyc=HDc;Ryc=EDc;Lyc=EDc;Oyc=EDc;Tyc=GDc;Yyc=HDc;Xyc=HDc;fyc=(Ymd(),Wmd);hyc=Wmd;iyc=kFc;$xc=Vmd;lzc=CFc;mzc=AFc;ozc=CFc;pzc=AFc;xzc=CFc;yzc=AFc;rzc=Ctc;uzc=Dtc;Mzc=CFc;Nzc=AFc;Izc=CFc;Jzc=AFc;Czc=AFc;Azc=AFc;Ezc=AFc} +function iNc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb;cb=0;for(H=b,K=0,N=H.length;K<N;++K){F=H[K];for(V=new Anb(F.j);V.a<V.c.c.length;){U=RD(ynb(V),12);X=0;for(h=new Anb(U.g);h.a<h.c.c.length;){g=RD(ynb(h),18);F.c!=g.d.i.c&&++X}X>0&&(a.a[U.p]=cb++)}}hb=0;for(I=c,L=0,O=I.length;L<O;++L){F=I[L];P=0;for(V=new Anb(F.j);V.a<V.c.c.length;){U=RD(ynb(V),12);if(U.j==(qpd(),Yod)){for(h=new Anb(U.e);h.a<h.c.c.length;){g=RD(ynb(h),18);if(F.c!=g.c.i.c){++P;break}}}else{break}}R=0;Y=new Jkb(F.j,F.j.c.length);while(Y.b>0){U=(sFb(Y.b>0),RD(Y.a.Xb(Y.c=--Y.b),12));X=0;for(h=new Anb(U.e);h.a<h.c.c.length;){g=RD(ynb(h),18);F.c!=g.c.i.c&&++X}if(X>0){if(U.j==(qpd(),Yod)){a.a[U.p]=hb;++hb}else{a.a[U.p]=hb+P+R;++R}}}hb+=R}W=new Tsb;o=new Iub;for(G=b,J=0,M=G.length;J<M;++J){F=G[J];for(fb=new Anb(F.j);fb.a<fb.c.c.length;){eb=RD(ynb(fb),12);for(h=new Anb(eb.g);h.a<h.c.c.length;){g=RD(ynb(h),18);jb=g.d;if(F.c!=jb.i.c){db=RD(Wd(qtb(W.f,eb)),478);ib=RD(Wd(qtb(W.f,jb)),478);if(!db&&!ib){n=new lNc;o.a.zc(n,o);Rmb(n.a,g);Rmb(n.d,eb);rtb(W.f,eb,n);Rmb(n.d,jb);rtb(W.f,jb,n)}else if(!db){Rmb(ib.a,g);Rmb(ib.d,eb);rtb(W.f,eb,ib)}else if(!ib){Rmb(db.a,g);Rmb(db.d,jb);rtb(W.f,jb,db)}else if(db==ib){Rmb(db.a,g)}else{Rmb(db.a,g);for(T=new Anb(ib.d);T.a<T.c.c.length;){S=RD(ynb(T),12);rtb(W.f,S,db)}Tmb(db.a,ib.a);Tmb(db.d,ib.d);o.a.Bc(ib)!=null}}}}}p=RD(Ee(o,$C(OY,{3:1,4:1,5:1,2045:1},478,o.a.gc(),0,1)),2045);D=b[0].c;bb=c[0].c;for(k=p,l=0,m=k.length;l<m;++l){j=k[l];j.e=cb;j.f=hb;for(V=new Anb(j.d);V.a<V.c.c.length;){U=RD(ynb(V),12);Z=a.a[U.p];if(U.i.c==D){Z<j.e&&(j.e=Z);Z>j.b&&(j.b=Z)}else if(U.i.c==bb){Z<j.f&&(j.f=Z);Z>j.c&&(j.c=Z)}}}Wnb(p,0,p.length,null);gb=$C(kE,Pwe,28,p.length,15,1);d=$C(kE,Pwe,28,hb+1,15,1);for(r=0;r<p.length;r++){gb[r]=p[r].f;d[gb[r]]=1}f=0;for(s=0;s<d.length;s++){d[s]==1?(d[s]=f):--f}$=0;for(t=0;t<gb.length;t++){gb[t]+=d[gb[t]];$=$wnd.Math.max($,gb[t]+1)}i=1;while(i<$){i*=2}lb=2*i-1;i-=1;kb=$C(kE,Pwe,28,lb,15,1);e=0;for(B=0;B<gb.length;B++){A=gb[B]+i;++kb[A];while(A>0){A%2>0&&(e+=kb[A+1]);A=(A-1)/2|0;++kb[A]}}C=$C(NY,rve,374,p.length*2,0,1);for(u=0;u<p.length;u++){C[2*u]=new oNc(p[u],p[u].e,p[u].b,(sNc(),rNc));C[2*u+1]=new oNc(p[u],p[u].b,p[u].e,qNc)}Wnb(C,0,C.length,null);Q=0;for(v=0;v<C.length;v++){switch(C[v].d.g){case 0:++Q;break;case 1:--Q;e+=Q;}}ab=$C(NY,rve,374,p.length*2,0,1);for(w=0;w<p.length;w++){ab[2*w]=new oNc(p[w],p[w].f,p[w].c,(sNc(),rNc));ab[2*w+1]=new oNc(p[w],p[w].c,p[w].f,qNc)}Wnb(ab,0,ab.length,null);Q=0;for(q=0;q<ab.length;q++){switch(ab[q].d.g){case 0:++Q;break;case 1:--Q;e+=Q;}}return e} +function Vse(){Vse=geb;Ese=new Wse(7);Gse=(++Use,new Hte(8,94));++Use;new Hte(8,64);Hse=(++Use,new Hte(8,36));Nse=(++Use,new Hte(8,65));Ose=(++Use,new Hte(8,122));Pse=(++Use,new Hte(8,90));Sse=(++Use,new Hte(8,98));Lse=(++Use,new Hte(8,66));Qse=(++Use,new Hte(8,60));Tse=(++Use,new Hte(8,62));Dse=new Wse(11);Bse=(++Use,new xte(4));rte(Bse,48,57);Rse=(++Use,new xte(4));rte(Rse,48,57);rte(Rse,65,90);rte(Rse,95,95);rte(Rse,97,122);Mse=(++Use,new xte(4));rte(Mse,9,9);rte(Mse,10,10);rte(Mse,12,12);rte(Mse,13,13);rte(Mse,32,32);Ise=yte(Bse);Kse=yte(Rse);Jse=yte(Mse);wse=new Tsb;xse=new Tsb;yse=cD(WC(qJ,1),Nve,2,6,['Cn','Lu','Ll','Lt','Lm','Lo','Mn','Me','Mc','Nd','Nl','No','Zs','Zl','Zp','Cc','Cf',null,'Co','Cs','Pd','Ps','Pe','Pc','Po','Sm','Sc','Sk','So','Pi','Pf','L','M','N','Z','C','P','S']);vse=cD(WC(qJ,1),Nve,2,6,['Basic Latin','Latin-1 Supplement','Latin Extended-A','Latin Extended-B','IPA Extensions','Spacing Modifier Letters','Combining Diacritical Marks','Greek','Cyrillic','Armenian','Hebrew','Arabic','Syriac','Thaana','Devanagari','Bengali','Gurmukhi','Gujarati','Oriya','Tamil','Telugu','Kannada','Malayalam','Sinhala','Thai','Lao','Tibetan','Myanmar','Georgian','Hangul Jamo','Ethiopic','Cherokee','Unified Canadian Aboriginal Syllabics','Ogham','Runic','Khmer','Mongolian','Latin Extended Additional','Greek Extended','General Punctuation','Superscripts and Subscripts','Currency Symbols','Combining Marks for Symbols','Letterlike Symbols','Number Forms','Arrows','Mathematical Operators','Miscellaneous Technical','Control Pictures','Optical Character Recognition','Enclosed Alphanumerics','Box Drawing','Block Elements','Geometric Shapes','Miscellaneous Symbols','Dingbats','Braille Patterns','CJK Radicals Supplement','Kangxi Radicals','Ideographic Description Characters','CJK Symbols and Punctuation','Hiragana','Katakana','Bopomofo','Hangul Compatibility Jamo','Kanbun','Bopomofo Extended','Enclosed CJK Letters and Months','CJK Compatibility','CJK Unified Ideographs Extension A','CJK Unified Ideographs','Yi Syllables','Yi Radicals','Hangul Syllables',VLe,'CJK Compatibility Ideographs','Alphabetic Presentation Forms','Arabic Presentation Forms-A','Combining Half Marks','CJK Compatibility Forms','Small Form Variants','Arabic Presentation Forms-B','Specials','Halfwidth and Fullwidth Forms','Old Italic','Gothic','Deseret','Byzantine Musical Symbols','Musical Symbols','Mathematical Alphanumeric Symbols','CJK Unified Ideographs Extension B','CJK Compatibility Ideographs Supplement','Tags']);zse=cD(WC(kE,1),Pwe,28,15,[66304,66351,66352,66383,66560,66639,118784,119039,119040,119295,119808,120831,131072,173782,194560,195103,917504,917631])} +function hMb(){hMb=geb;eMb=new kMb('OUT_T_L',0,(EKb(),CKb),(vLb(),sLb),(ZJb(),WJb),WJb,cD(WC(bL,1),rve,21,0,[ysb((dod(),_nd),cD(WC(A3,1),jwe,95,0,[cod,Xnd]))]));dMb=new kMb('OUT_T_C',1,BKb,sLb,WJb,XJb,cD(WC(bL,1),rve,21,0,[ysb(_nd,cD(WC(A3,1),jwe,95,0,[cod,Wnd])),ysb(_nd,cD(WC(A3,1),jwe,95,0,[cod,Wnd,Ynd]))]));fMb=new kMb('OUT_T_R',2,DKb,sLb,WJb,YJb,cD(WC(bL,1),rve,21,0,[ysb(_nd,cD(WC(A3,1),jwe,95,0,[cod,Znd]))]));XLb=new kMb('OUT_B_L',3,CKb,uLb,YJb,WJb,cD(WC(bL,1),rve,21,0,[ysb(_nd,cD(WC(A3,1),jwe,95,0,[aod,Xnd]))]));WLb=new kMb('OUT_B_C',4,BKb,uLb,YJb,XJb,cD(WC(bL,1),rve,21,0,[ysb(_nd,cD(WC(A3,1),jwe,95,0,[aod,Wnd])),ysb(_nd,cD(WC(A3,1),jwe,95,0,[aod,Wnd,Ynd]))]));YLb=new kMb('OUT_B_R',5,DKb,uLb,YJb,YJb,cD(WC(bL,1),rve,21,0,[ysb(_nd,cD(WC(A3,1),jwe,95,0,[aod,Znd]))]));_Lb=new kMb('OUT_L_T',6,DKb,uLb,WJb,WJb,cD(WC(bL,1),rve,21,0,[ysb(_nd,cD(WC(A3,1),jwe,95,0,[Xnd,cod,Ynd]))]));$Lb=new kMb('OUT_L_C',7,DKb,tLb,XJb,WJb,cD(WC(bL,1),rve,21,0,[ysb(_nd,cD(WC(A3,1),jwe,95,0,[Xnd,bod])),ysb(_nd,cD(WC(A3,1),jwe,95,0,[Xnd,bod,Ynd]))]));ZLb=new kMb('OUT_L_B',8,DKb,sLb,YJb,WJb,cD(WC(bL,1),rve,21,0,[ysb(_nd,cD(WC(A3,1),jwe,95,0,[Xnd,aod,Ynd]))]));cMb=new kMb('OUT_R_T',9,CKb,uLb,WJb,YJb,cD(WC(bL,1),rve,21,0,[ysb(_nd,cD(WC(A3,1),jwe,95,0,[Znd,cod,Ynd]))]));bMb=new kMb('OUT_R_C',10,CKb,tLb,XJb,YJb,cD(WC(bL,1),rve,21,0,[ysb(_nd,cD(WC(A3,1),jwe,95,0,[Znd,bod])),ysb(_nd,cD(WC(A3,1),jwe,95,0,[Znd,bod,Ynd]))]));aMb=new kMb('OUT_R_B',11,CKb,sLb,YJb,YJb,cD(WC(bL,1),rve,21,0,[ysb(_nd,cD(WC(A3,1),jwe,95,0,[Znd,aod,Ynd]))]));ULb=new kMb('IN_T_L',12,CKb,uLb,WJb,WJb,cD(WC(bL,1),rve,21,0,[ysb($nd,cD(WC(A3,1),jwe,95,0,[cod,Xnd])),ysb($nd,cD(WC(A3,1),jwe,95,0,[cod,Xnd,Ynd]))]));TLb=new kMb('IN_T_C',13,BKb,uLb,WJb,XJb,cD(WC(bL,1),rve,21,0,[ysb($nd,cD(WC(A3,1),jwe,95,0,[cod,Wnd])),ysb($nd,cD(WC(A3,1),jwe,95,0,[cod,Wnd,Ynd]))]));VLb=new kMb('IN_T_R',14,DKb,uLb,WJb,YJb,cD(WC(bL,1),rve,21,0,[ysb($nd,cD(WC(A3,1),jwe,95,0,[cod,Znd])),ysb($nd,cD(WC(A3,1),jwe,95,0,[cod,Znd,Ynd]))]));RLb=new kMb('IN_C_L',15,CKb,tLb,XJb,WJb,cD(WC(bL,1),rve,21,0,[ysb($nd,cD(WC(A3,1),jwe,95,0,[bod,Xnd])),ysb($nd,cD(WC(A3,1),jwe,95,0,[bod,Xnd,Ynd]))]));QLb=new kMb('IN_C_C',16,BKb,tLb,XJb,XJb,cD(WC(bL,1),rve,21,0,[ysb($nd,cD(WC(A3,1),jwe,95,0,[bod,Wnd])),ysb($nd,cD(WC(A3,1),jwe,95,0,[bod,Wnd,Ynd]))]));SLb=new kMb('IN_C_R',17,DKb,tLb,XJb,YJb,cD(WC(bL,1),rve,21,0,[ysb($nd,cD(WC(A3,1),jwe,95,0,[bod,Znd])),ysb($nd,cD(WC(A3,1),jwe,95,0,[bod,Znd,Ynd]))]));OLb=new kMb('IN_B_L',18,CKb,sLb,YJb,WJb,cD(WC(bL,1),rve,21,0,[ysb($nd,cD(WC(A3,1),jwe,95,0,[aod,Xnd])),ysb($nd,cD(WC(A3,1),jwe,95,0,[aod,Xnd,Ynd]))]));NLb=new kMb('IN_B_C',19,BKb,sLb,YJb,XJb,cD(WC(bL,1),rve,21,0,[ysb($nd,cD(WC(A3,1),jwe,95,0,[aod,Wnd])),ysb($nd,cD(WC(A3,1),jwe,95,0,[aod,Wnd,Ynd]))]));PLb=new kMb('IN_B_R',20,DKb,sLb,YJb,YJb,cD(WC(bL,1),rve,21,0,[ysb($nd,cD(WC(A3,1),jwe,95,0,[aod,Znd])),ysb($nd,cD(WC(A3,1),jwe,95,0,[aod,Znd,Ynd]))]));gMb=new kMb(Sye,21,null,null,null,null,cD(WC(bL,1),rve,21,0,[]))} +function JTd(){JTd=geb;nTd=(lTd(),kTd).b;RD(QHd(xYd(kTd.b),0),35);RD(QHd(xYd(kTd.b),1),19);mTd=kTd.a;RD(QHd(xYd(kTd.a),0),35);RD(QHd(xYd(kTd.a),1),19);RD(QHd(xYd(kTd.a),2),19);RD(QHd(xYd(kTd.a),3),19);RD(QHd(xYd(kTd.a),4),19);oTd=kTd.o;RD(QHd(xYd(kTd.o),0),35);RD(QHd(xYd(kTd.o),1),35);qTd=RD(QHd(xYd(kTd.o),2),19);RD(QHd(xYd(kTd.o),3),19);RD(QHd(xYd(kTd.o),4),19);RD(QHd(xYd(kTd.o),5),19);RD(QHd(xYd(kTd.o),6),19);RD(QHd(xYd(kTd.o),7),19);RD(QHd(xYd(kTd.o),8),19);RD(QHd(xYd(kTd.o),9),19);RD(QHd(xYd(kTd.o),10),19);RD(QHd(xYd(kTd.o),11),19);RD(QHd(xYd(kTd.o),12),19);RD(QHd(xYd(kTd.o),13),19);RD(QHd(xYd(kTd.o),14),19);RD(QHd(xYd(kTd.o),15),19);RD(QHd(uYd(kTd.o),0),62);RD(QHd(uYd(kTd.o),1),62);RD(QHd(uYd(kTd.o),2),62);RD(QHd(uYd(kTd.o),3),62);RD(QHd(uYd(kTd.o),4),62);RD(QHd(uYd(kTd.o),5),62);RD(QHd(uYd(kTd.o),6),62);RD(QHd(uYd(kTd.o),7),62);RD(QHd(uYd(kTd.o),8),62);RD(QHd(uYd(kTd.o),9),62);pTd=kTd.p;RD(QHd(xYd(kTd.p),0),35);RD(QHd(xYd(kTd.p),1),35);RD(QHd(xYd(kTd.p),2),35);RD(QHd(xYd(kTd.p),3),35);RD(QHd(xYd(kTd.p),4),19);RD(QHd(xYd(kTd.p),5),19);RD(QHd(uYd(kTd.p),0),62);RD(QHd(uYd(kTd.p),1),62);rTd=kTd.q;RD(QHd(xYd(kTd.q),0),35);sTd=kTd.v;RD(QHd(xYd(kTd.v),0),19);RD(QHd(uYd(kTd.v),0),62);RD(QHd(uYd(kTd.v),1),62);RD(QHd(uYd(kTd.v),2),62);tTd=kTd.w;RD(QHd(xYd(kTd.w),0),35);RD(QHd(xYd(kTd.w),1),35);RD(QHd(xYd(kTd.w),2),35);RD(QHd(xYd(kTd.w),3),19);uTd=kTd.B;RD(QHd(xYd(kTd.B),0),19);RD(QHd(uYd(kTd.B),0),62);RD(QHd(uYd(kTd.B),1),62);RD(QHd(uYd(kTd.B),2),62);xTd=kTd.Q;RD(QHd(xYd(kTd.Q),0),19);RD(QHd(uYd(kTd.Q),0),62);yTd=kTd.R;RD(QHd(xYd(kTd.R),0),35);zTd=kTd.S;RD(QHd(uYd(kTd.S),0),62);RD(QHd(uYd(kTd.S),1),62);RD(QHd(uYd(kTd.S),2),62);RD(QHd(uYd(kTd.S),3),62);RD(QHd(uYd(kTd.S),4),62);RD(QHd(uYd(kTd.S),5),62);RD(QHd(uYd(kTd.S),6),62);RD(QHd(uYd(kTd.S),7),62);RD(QHd(uYd(kTd.S),8),62);RD(QHd(uYd(kTd.S),9),62);RD(QHd(uYd(kTd.S),10),62);RD(QHd(uYd(kTd.S),11),62);RD(QHd(uYd(kTd.S),12),62);RD(QHd(uYd(kTd.S),13),62);RD(QHd(uYd(kTd.S),14),62);ATd=kTd.T;RD(QHd(xYd(kTd.T),0),19);RD(QHd(xYd(kTd.T),2),19);BTd=RD(QHd(xYd(kTd.T),3),19);RD(QHd(xYd(kTd.T),4),19);RD(QHd(uYd(kTd.T),0),62);RD(QHd(uYd(kTd.T),1),62);RD(QHd(xYd(kTd.T),1),19);CTd=kTd.U;RD(QHd(xYd(kTd.U),0),35);RD(QHd(xYd(kTd.U),1),35);RD(QHd(xYd(kTd.U),2),19);RD(QHd(xYd(kTd.U),3),19);RD(QHd(xYd(kTd.U),4),19);RD(QHd(xYd(kTd.U),5),19);RD(QHd(uYd(kTd.U),0),62);DTd=kTd.V;RD(QHd(xYd(kTd.V),0),19);ETd=kTd.W;RD(QHd(xYd(kTd.W),0),35);RD(QHd(xYd(kTd.W),1),35);RD(QHd(xYd(kTd.W),2),35);RD(QHd(xYd(kTd.W),3),19);RD(QHd(xYd(kTd.W),4),19);RD(QHd(xYd(kTd.W),5),19);GTd=kTd.bb;RD(QHd(xYd(kTd.bb),0),35);RD(QHd(xYd(kTd.bb),1),35);RD(QHd(xYd(kTd.bb),2),35);RD(QHd(xYd(kTd.bb),3),35);RD(QHd(xYd(kTd.bb),4),35);RD(QHd(xYd(kTd.bb),5),35);RD(QHd(xYd(kTd.bb),6),35);RD(QHd(xYd(kTd.bb),7),19);RD(QHd(uYd(kTd.bb),0),62);RD(QHd(uYd(kTd.bb),1),62);HTd=kTd.eb;RD(QHd(xYd(kTd.eb),0),35);RD(QHd(xYd(kTd.eb),1),35);RD(QHd(xYd(kTd.eb),2),35);RD(QHd(xYd(kTd.eb),3),35);RD(QHd(xYd(kTd.eb),4),35);RD(QHd(xYd(kTd.eb),5),35);RD(QHd(xYd(kTd.eb),6),19);RD(QHd(xYd(kTd.eb),7),19);FTd=kTd.ab;RD(QHd(xYd(kTd.ab),0),35);RD(QHd(xYd(kTd.ab),1),35);vTd=kTd.H;RD(QHd(xYd(kTd.H),0),19);RD(QHd(xYd(kTd.H),1),19);RD(QHd(xYd(kTd.H),2),19);RD(QHd(xYd(kTd.H),3),19);RD(QHd(xYd(kTd.H),4),19);RD(QHd(xYd(kTd.H),5),19);RD(QHd(uYd(kTd.H),0),62);ITd=kTd.db;RD(QHd(xYd(kTd.db),0),19);wTd=kTd.M} +function Ane(a){var b;if(a.O)return;a.O=true;PAd(a,'type');CBd(a,'ecore.xml.type');DBd(a,dLe);b=RD(N5d((YSd(),XSd),dLe),2044);WGd(zYd(a.fb),a.b);vBd(a.b,Vbb,'AnyType',false,false,true);tBd(RD(QHd(xYd(a.b),0),35),a.wb.D,pKe,null,0,-1,Vbb,false,false,true,false,false,false);tBd(RD(QHd(xYd(a.b),1),35),a.wb.D,'any',null,0,-1,Vbb,true,true,true,false,false,true);tBd(RD(QHd(xYd(a.b),2),35),a.wb.D,'anyAttribute',null,0,-1,Vbb,false,false,true,false,false,false);vBd(a.bb,Xbb,iLe,false,false,true);tBd(RD(QHd(xYd(a.bb),0),35),a.gb,'data',null,0,1,Xbb,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.bb),1),35),a.gb,CIe,null,1,1,Xbb,false,false,true,false,true,false);vBd(a.fb,Ybb,jLe,false,false,true);tBd(RD(QHd(xYd(a.fb),0),35),b.gb,'rawValue',null,0,1,Ybb,true,true,true,false,true,true);tBd(RD(QHd(xYd(a.fb),1),35),b.a,aIe,null,0,1,Ybb,true,true,true,false,true,true);zBd(RD(QHd(xYd(a.fb),2),19),a.wb.q,null,'instanceType',1,1,Ybb,false,false,true,false,false,false,false);vBd(a.qb,Zbb,kLe,false,false,true);tBd(RD(QHd(xYd(a.qb),0),35),a.wb.D,pKe,null,0,-1,null,false,false,true,false,false,false);zBd(RD(QHd(xYd(a.qb),1),19),a.wb.ab,null,'xMLNSPrefixMap',0,-1,null,true,false,true,true,false,false,false);zBd(RD(QHd(xYd(a.qb),2),19),a.wb.ab,null,'xSISchemaLocation',0,-1,null,true,false,true,true,false,false,false);tBd(RD(QHd(xYd(a.qb),3),35),a.gb,'cDATA',null,0,-2,null,true,true,true,false,false,true);tBd(RD(QHd(xYd(a.qb),4),35),a.gb,'comment',null,0,-2,null,true,true,true,false,false,true);zBd(RD(QHd(xYd(a.qb),5),19),a.bb,null,KLe,0,-2,null,true,true,true,true,false,false,true);tBd(RD(QHd(xYd(a.qb),6),35),a.gb,hIe,null,0,-2,null,true,true,true,false,false,true);xBd(a.a,jJ,'AnySimpleType',true);xBd(a.c,qJ,'AnyURI',true);xBd(a.d,WC(gE,1),'Base64Binary',true);xBd(a.e,xdb,'Boolean',true);xBd(a.f,QI,'BooleanObject',true);xBd(a.g,gE,'Byte',true);xBd(a.i,RI,'ByteObject',true);xBd(a.j,qJ,'Date',true);xBd(a.k,qJ,'DateTime',true);xBd(a.n,tJ,'Decimal',true);xBd(a.o,iE,'Double',true);xBd(a.p,VI,'DoubleObject',true);xBd(a.q,qJ,'Duration',true);xBd(a.s,QK,'ENTITIES',true);xBd(a.r,QK,'ENTITIESBase',true);xBd(a.t,qJ,qLe,true);xBd(a.u,jE,'Float',true);xBd(a.v,ZI,'FloatObject',true);xBd(a.w,qJ,'GDay',true);xBd(a.B,qJ,'GMonth',true);xBd(a.A,qJ,'GMonthDay',true);xBd(a.C,qJ,'GYear',true);xBd(a.D,qJ,'GYearMonth',true);xBd(a.F,WC(gE,1),'HexBinary',true);xBd(a.G,qJ,'ID',true);xBd(a.H,qJ,'IDREF',true);xBd(a.J,QK,'IDREFS',true);xBd(a.I,QK,'IDREFSBase',true);xBd(a.K,kE,'Int',true);xBd(a.M,uJ,'Integer',true);xBd(a.L,bJ,'IntObject',true);xBd(a.P,qJ,'Language',true);xBd(a.Q,lE,'Long',true);xBd(a.R,eJ,'LongObject',true);xBd(a.S,qJ,'Name',true);xBd(a.T,qJ,rLe,true);xBd(a.U,uJ,'NegativeInteger',true);xBd(a.V,qJ,BLe,true);xBd(a.X,QK,'NMTOKENS',true);xBd(a.W,QK,'NMTOKENSBase',true);xBd(a.Y,uJ,'NonNegativeInteger',true);xBd(a.Z,uJ,'NonPositiveInteger',true);xBd(a.$,qJ,'NormalizedString',true);xBd(a._,qJ,'NOTATION',true);xBd(a.ab,qJ,'PositiveInteger',true);xBd(a.cb,qJ,'QName',true);xBd(a.db,wdb,'Short',true);xBd(a.eb,lJ,'ShortObject',true);xBd(a.gb,qJ,uwe,true);xBd(a.hb,qJ,'Time',true);xBd(a.ib,qJ,'Token',true);xBd(a.jb,wdb,'UnsignedByte',true);xBd(a.kb,lJ,'UnsignedByteObject',true);xBd(a.lb,lE,'UnsignedInt',true);xBd(a.mb,eJ,'UnsignedIntObject',true);xBd(a.nb,uJ,'UnsignedLong',true);xBd(a.ob,kE,'UnsignedShort',true);xBd(a.pb,bJ,'UnsignedShortObject',true);pBd(a,dLe);yne(a)} +function Fed(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,ab;if(d.$g()){return yob(),yob(),vob}if(Heb(TD(Gxd(b,(umd(),rld))))){return yob(),yob(),vob}A=(!b.a&&(b.a=new C5d(J4,b,10,11)),b.a).i!=0;C=Ded(b);B=!C.dc();if(A||B){e=RD(Gxd(b,Tld),143);if(!e){throw Adb(new Jed('Resolved algorithm is not set; apply a LayoutAlgorithmResolver before computing layout.'))}Y=Ofd(e,(aGd(),YFd));Bed(b);if(!A&&B&&!Y){return yob(),yob(),vob}t=new bnb;if(dE(Gxd(b,Xkd))===dE((Fnd(),Cnd))&&(Ofd(e,VFd)||Ofd(e,UFd))){if(Heb(TD(Gxd(b,mmd)))){throw Adb(new Jed('Topdown layout cannot be used together with hierarchy handling.'))}M=Aed(a,b);N=new Yub;ye(N,(!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));while(N.b!=0){K=RD(N.b==0?null:(sFb(N.b!=0),Wub(N,N.a.a)),27);Bed(K);X=dE(Gxd(K,Xkd))===dE(End);if(X||Hxd(K,Akd)&&!Nfd(e,Gxd(K,Tld))){q=Fed(a,K,c,d);Tmb(t,q);Ixd(K,Xkd,End);ksd(K)}else{ye(N,(!K.a&&(K.a=new C5d(J4,K,10,11)),K.a))}}}else{M=(!b.a&&(b.a=new C5d(J4,b,10,11)),b.a).i;if(Heb(TD(Gxd(b,mmd)))){Z=d.eh(1);Z.Ug(yGe,1);if(Gxd(b,nmd)==null){throw Adb(new Jed(b.k+' has not been assigned a top-down node type.'))}if(RD(Gxd(b,nmd),280)==(mqd(),jqd)||RD(Gxd(b,nmd),280)==lqd){for(s=new dMd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));s.e!=s.i.gc();){r=RD(bMd(s),27);J=RD(Gxd(r,Tld),143);if((!r.a&&(r.a=new C5d(J4,r,10,11)),r.a).i>0&&(ltd(J.f),false)){if(RD(Gxd(r,nmd),280)==jqd){throw Adb(new Jed('Topdown Layout Providers should only be used on parallel nodes.'))}fE(ltd(J.f));null.Um();zyd(r,$wnd.Math.max(r.g,null.Vm),$wnd.Math.max(r.f,null.Vm))}else if(Gxd(r,smd)!=null){h=RD(Gxd(r,smd),347);W=h.Tg(r);zyd(r,$wnd.Math.max(r.g,W.a),$wnd.Math.max(r.f,W.b))}}}O=RD(Gxd(b,tld),107);n=b.g-(O.b+O.c);m=b.f-(O.d+O.a);Z.bh('Available Child Area: ('+n+'|'+m+')');Ixd(b,Dkd,n/m);Ced(b,e,d.eh(M));if(RD(Gxd(b,nmd),280)==lqd){psd(b);zyd(b,O.b+Kfb(UD(Gxd(b,Ikd)))+O.c,O.d+Kfb(UD(Gxd(b,Hkd)))+O.a)}Z.bh('Executed layout algorithm: '+WD(Gxd(b,Akd))+' on node '+b.k);if(RD(Gxd(b,nmd),280)==jqd){if(n<0||m<0){throw Adb(new Jed('The size defined by the parent parallel node is too small for the space provided by the paddings of the child hierarchical node. '+b.k))}Hxd(b,Ikd)||Hxd(b,Hkd)||psd(b);p=Kfb(UD(Gxd(b,Ikd)));o=Kfb(UD(Gxd(b,Hkd)));Z.bh('Desired Child Area: ('+p+'|'+o+')');Q=n/p;R=m/o;P=$wnd.Math.min(Q,$wnd.Math.min(R,Kfb(UD(Gxd(b,omd)))));Ixd(b,qmd,P);Z.bh(b.k+' -- Local Scale Factor (X|Y): ('+Q+'|'+R+')');u=RD(Gxd(b,Kkd),21);f=0;g=0;P<Q&&(u.Hc((ukd(),okd))?(f=(n/2-p*P/2)/P):u.Hc(qkd)&&(f=(n-p*P)/P));P<R&&(u.Hc((ukd(),skd))?(g=(m/2-o*P/2)/P):u.Hc(rkd)&&(g=(m-o*P)/P));$=f+(O.b/P-O.b);ab=g+(O.d/P-O.d);Z.bh('Shift: ('+$+'|'+ab+')');for(L=new dMd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));L.e!=L.i.gc();){K=RD(bMd(L),27);Dyd(K,K.i+$);Eyd(K,K.j+ab)}for(w=new dMd((!b.b&&(b.b=new C5d(G4,b,12,3)),b.b));w.e!=w.i.gc();){v=RD(bMd(w),74);for(T=new dMd((!v.a&&(v.a=new C5d(F4,v,6,6)),v.a));T.e!=T.i.gc();){S=RD(bMd(T),166);Nzd(S,S.j+$,S.k+ab);Gzd(S,S.b+$,S.c+ab);for(j=new dMd((!S.a&&(S.a=new XZd(D4,S,5)),S.a));j.e!=j.i.gc();){i=RD(bMd(j),377);Uxd(i,i.a+$,i.b+ab)}}for(I=new dMd((!v.n&&(v.n=new C5d(I4,v,1,7)),v.n));I.e!=I.i.gc();){H=RD(bMd(I),135);Byd(H,H.i+$,H.j+ab)}G=RD(Gxd(v,cld),75);for(F=Sub(G,0);F.b!=F.d.c;){D=RD(evb(F),8);D.a+=$;D.b+=ab}Ixd(v,cld,G)}}Z.Vg()}for(l=new dMd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));l.e!=l.i.gc();){k=RD(bMd(l),27);q=Fed(a,k,c,d);Tmb(t,q);ksd(k)}}if(d.$g()){return yob(),yob(),vob}for(V=new Anb(t);V.a<V.c.c.length;){U=RD(ynb(V),74);Ixd(U,rld,(Geb(),true))}Heb(TD(Gxd(b,mmd)))||Ced(b,e,d.eh(M));Ged(t);return B&&Y?C:(yob(),yob(),vob)}else{return yob(),yob(),vob}} +function Jre(a,b){var c,d;if(!Bre){Bre=new Tsb;Cre=new Tsb;d=(Vse(),Vse(),++Use,new xte(4));ose(d,'\t\n\r\r ');$jb(Bre,QLe,d);$jb(Cre,QLe,yte(d));d=(null,++Use,new xte(4));ose(d,TLe);$jb(Bre,OLe,d);$jb(Cre,OLe,yte(d));d=(null,++Use,new xte(4));ose(d,TLe);$jb(Bre,OLe,d);$jb(Cre,OLe,yte(d));d=(null,++Use,new xte(4));ose(d,ULe);ute(d,RD(Xjb(Bre,OLe),122));$jb(Bre,PLe,d);$jb(Cre,PLe,yte(d));d=(null,++Use,new xte(4));ose(d,'-.0:AZ__az\xB7\xB7\xC0\xD6\xD8\xF6\xF8\u0131\u0134\u013E\u0141\u0148\u014A\u017E\u0180\u01C3\u01CD\u01F0\u01F4\u01F5\u01FA\u0217\u0250\u02A8\u02BB\u02C1\u02D0\u02D1\u0300\u0345\u0360\u0361\u0386\u038A\u038C\u038C\u038E\u03A1\u03A3\u03CE\u03D0\u03D6\u03DA\u03DA\u03DC\u03DC\u03DE\u03DE\u03E0\u03E0\u03E2\u03F3\u0401\u040C\u040E\u044F\u0451\u045C\u045E\u0481\u0483\u0486\u0490\u04C4\u04C7\u04C8\u04CB\u04CC\u04D0\u04EB\u04EE\u04F5\u04F8\u04F9\u0531\u0556\u0559\u0559\u0561\u0586\u0591\u05A1\u05A3\u05B9\u05BB\u05BD\u05BF\u05BF\u05C1\u05C2\u05C4\u05C4\u05D0\u05EA\u05F0\u05F2\u0621\u063A\u0640\u0652\u0660\u0669\u0670\u06B7\u06BA\u06BE\u06C0\u06CE\u06D0\u06D3\u06D5\u06E8\u06EA\u06ED\u06F0\u06F9\u0901\u0903\u0905\u0939\u093C\u094D\u0951\u0954\u0958\u0963\u0966\u096F\u0981\u0983\u0985\u098C\u098F\u0990\u0993\u09A8\u09AA\u09B0\u09B2\u09B2\u09B6\u09B9\u09BC\u09BC\u09BE\u09C4\u09C7\u09C8\u09CB\u09CD\u09D7\u09D7\u09DC\u09DD\u09DF\u09E3\u09E6\u09F1\u0A02\u0A02\u0A05\u0A0A\u0A0F\u0A10\u0A13\u0A28\u0A2A\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3C\u0A3E\u0A42\u0A47\u0A48\u0A4B\u0A4D\u0A59\u0A5C\u0A5E\u0A5E\u0A66\u0A74\u0A81\u0A83\u0A85\u0A8B\u0A8D\u0A8D\u0A8F\u0A91\u0A93\u0AA8\u0AAA\u0AB0\u0AB2\u0AB3\u0AB5\u0AB9\u0ABC\u0AC5\u0AC7\u0AC9\u0ACB\u0ACD\u0AE0\u0AE0\u0AE6\u0AEF\u0B01\u0B03\u0B05\u0B0C\u0B0F\u0B10\u0B13\u0B28\u0B2A\u0B30\u0B32\u0B33\u0B36\u0B39\u0B3C\u0B43\u0B47\u0B48\u0B4B\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F\u0B61\u0B66\u0B6F\u0B82\u0B83\u0B85\u0B8A\u0B8E\u0B90\u0B92\u0B95\u0B99\u0B9A\u0B9C\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BAA\u0BAE\u0BB5\u0BB7\u0BB9\u0BBE\u0BC2\u0BC6\u0BC8\u0BCA\u0BCD\u0BD7\u0BD7\u0BE7\u0BEF\u0C01\u0C03\u0C05\u0C0C\u0C0E\u0C10\u0C12\u0C28\u0C2A\u0C33\u0C35\u0C39\u0C3E\u0C44\u0C46\u0C48\u0C4A\u0C4D\u0C55\u0C56\u0C60\u0C61\u0C66\u0C6F\u0C82\u0C83\u0C85\u0C8C\u0C8E\u0C90\u0C92\u0CA8\u0CAA\u0CB3\u0CB5\u0CB9\u0CBE\u0CC4\u0CC6\u0CC8\u0CCA\u0CCD\u0CD5\u0CD6\u0CDE\u0CDE\u0CE0\u0CE1\u0CE6\u0CEF\u0D02\u0D03\u0D05\u0D0C\u0D0E\u0D10\u0D12\u0D28\u0D2A\u0D39\u0D3E\u0D43\u0D46\u0D48\u0D4A\u0D4D\u0D57\u0D57\u0D60\u0D61\u0D66\u0D6F\u0E01\u0E2E\u0E30\u0E3A\u0E40\u0E4E\u0E50\u0E59\u0E81\u0E82\u0E84\u0E84\u0E87\u0E88\u0E8A\u0E8A\u0E8D\u0E8D\u0E94\u0E97\u0E99\u0E9F\u0EA1\u0EA3\u0EA5\u0EA5\u0EA7\u0EA7\u0EAA\u0EAB\u0EAD\u0EAE\u0EB0\u0EB9\u0EBB\u0EBD\u0EC0\u0EC4\u0EC6\u0EC6\u0EC8\u0ECD\u0ED0\u0ED9\u0F18\u0F19\u0F20\u0F29\u0F35\u0F35\u0F37\u0F37\u0F39\u0F39\u0F3E\u0F47\u0F49\u0F69\u0F71\u0F84\u0F86\u0F8B\u0F90\u0F95\u0F97\u0F97\u0F99\u0FAD\u0FB1\u0FB7\u0FB9\u0FB9\u10A0\u10C5\u10D0\u10F6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110B\u110C\u110E\u1112\u113C\u113C\u113E\u113E\u1140\u1140\u114C\u114C\u114E\u114E\u1150\u1150\u1154\u1155\u1159\u1159\u115F\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116D\u116E\u1172\u1173\u1175\u1175\u119E\u119E\u11A8\u11A8\u11AB\u11AB\u11AE\u11AF\u11B7\u11B8\u11BA\u11BA\u11BC\u11C2\u11EB\u11EB\u11F0\u11F0\u11F9\u11F9\u1E00\u1E9B\u1EA0\u1EF9\u1F00\u1F15\u1F18\u1F1D\u1F20\u1F45\u1F48\u1F4D\u1F50\u1F57\u1F59\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F7D\u1F80\u1FB4\u1FB6\u1FBC\u1FBE\u1FBE\u1FC2\u1FC4\u1FC6\u1FCC\u1FD0\u1FD3\u1FD6\u1FDB\u1FE0\u1FEC\u1FF2\u1FF4\u1FF6\u1FFC\u20D0\u20DC\u20E1\u20E1\u2126\u2126\u212A\u212B\u212E\u212E\u2180\u2182\u3005\u3005\u3007\u3007\u3021\u302F\u3031\u3035\u3041\u3094\u3099\u309A\u309D\u309E\u30A1\u30FA\u30FC\u30FE\u3105\u312C\u4E00\u9FA5\uAC00\uD7A3');$jb(Bre,RLe,d);$jb(Cre,RLe,yte(d));d=(null,++Use,new xte(4));ose(d,ULe);rte(d,95,95);rte(d,58,58);$jb(Bre,SLe,d);$jb(Cre,SLe,yte(d))}c=b?RD(Xjb(Bre,a),138):RD(Xjb(Cre,a),138);return c} +function zCc(a){Cgd(a,new Pfd(_fd(Wfd($fd(Xfd(Zfd(Yfd(new agd,sxe),'ELK Layered'),'Layer-based algorithm provided by the Eclipse Layout Kernel. Arranges as many edges as possible into one direction by placing nodes into subsequent layers. This implementation supports different routing styles (straight, orthogonal, splines); if orthogonal routing is selected, arbitrary port constraints are respected, thus enabling the layout of block diagrams such as actor-oriented models or circuit schematics. Furthermore, full layout of compound graphs with cross-hierarchy edges is supported when the respective option is activated on the top level.'),new CCc),sxe),ysb((aGd(),_Fd),cD(WC(T5,1),jwe,245,0,[YFd,ZFd,XFd,$Fd,VFd,UFd])))));Agd(a,sxe,xDe,iGd(QBc));Agd(a,sxe,yDe,iGd(RBc));Agd(a,sxe,Bze,iGd(SBc));Agd(a,sxe,zDe,iGd(TBc));Agd(a,sxe,aAe,iGd(VBc));Agd(a,sxe,ADe,iGd(WBc));Agd(a,sxe,BDe,iGd(ZBc));Agd(a,sxe,CDe,iGd(_Bc));Agd(a,sxe,DDe,iGd(aCc));Agd(a,sxe,EDe,iGd($Bc));Agd(a,sxe,_ze,iGd(bCc));Agd(a,sxe,FDe,iGd(dCc));Agd(a,sxe,GDe,iGd(fCc));Agd(a,sxe,HDe,iGd(YBc));Agd(a,sxe,wCe,iGd(PBc));Agd(a,sxe,yCe,iGd(UBc));Agd(a,sxe,xCe,iGd(XBc));Agd(a,sxe,zCe,iGd(cCc));Agd(a,sxe,$ze,sgb(0));Agd(a,sxe,ACe,iGd(KBc));Agd(a,sxe,BCe,iGd(LBc));Agd(a,sxe,CCe,iGd(MBc));Agd(a,sxe,JCe,iGd(vCc));Agd(a,sxe,KCe,iGd(nCc));Agd(a,sxe,LCe,iGd(oCc));Agd(a,sxe,MCe,iGd(rCc));Agd(a,sxe,NCe,iGd(pCc));Agd(a,sxe,OCe,iGd(qCc));Agd(a,sxe,PCe,iGd(xCc));Agd(a,sxe,QCe,iGd(wCc));Agd(a,sxe,RCe,iGd(tCc));Agd(a,sxe,SCe,iGd(sCc));Agd(a,sxe,TCe,iGd(uCc));Agd(a,sxe,pCe,iGd(iBc));Agd(a,sxe,qCe,iGd(jBc));Agd(a,sxe,tCe,iGd(DAc));Agd(a,sxe,uCe,iGd(EAc));Agd(a,sxe,mAe,iGd(jCc));Agd(a,sxe,nAe,iGd(lCc));Agd(a,sxe,oAe,iGd(iCc));Agd(a,sxe,pAe,iGd(hCc));Agd(a,sxe,qAe,kCc);Agd(a,sxe,Eze,rBc);Agd(a,sxe,kDe,zAc);Agd(a,sxe,IDe,0);Agd(a,sxe,bAe,sgb(1));Agd(a,sxe,Dze,Yze);Agd(a,sxe,JDe,iGd(pBc));Agd(a,sxe,eAe,iGd(BBc));Agd(a,sxe,KDe,iGd(GBc));Agd(a,sxe,LDe,iGd(qAc));Agd(a,sxe,MDe,iGd(Rzc));Agd(a,sxe,fDe,iGd(IAc));Agd(a,sxe,cAe,(Geb(),true));Agd(a,sxe,NDe,iGd(NAc));Agd(a,sxe,ODe,iGd(OAc));Agd(a,sxe,jAe,iGd(lBc));Agd(a,sxe,iAe,iGd(oBc));Agd(a,sxe,hAe,iGd(mBc));Agd(a,sxe,PDe,tAc);Agd(a,sxe,kAe,iGd(dBc));Agd(a,sxe,QDe,iGd(cBc));Agd(a,sxe,lAe,iGd(EBc));Agd(a,sxe,RDe,iGd(DBc));Agd(a,sxe,SDe,iGd(FBc));Agd(a,sxe,TDe,uBc);Agd(a,sxe,UDe,iGd(wBc));Agd(a,sxe,VDe,iGd(xBc));Agd(a,sxe,WDe,iGd(yBc));Agd(a,sxe,XDe,iGd(vBc));Agd(a,sxe,PBe,iGd(mCc));Agd(a,sxe,SBe,iGd($Ac));Agd(a,sxe,YBe,iGd(ZAc));Agd(a,sxe,OBe,iGd(gCc));Agd(a,sxe,TBe,iGd(UAc));Agd(a,sxe,RBe,iGd(pAc));Agd(a,sxe,_Be,iGd(oAc));Agd(a,sxe,aCe,iGd(eAc));Agd(a,sxe,hCe,iGd(fAc));Agd(a,sxe,iCe,iGd(hAc));Agd(a,sxe,jCe,iGd(gAc));Agd(a,sxe,cCe,iGd(nAc));Agd(a,sxe,KBe,iGd(aBc));Agd(a,sxe,LBe,iGd(bBc));Agd(a,sxe,JBe,iGd(QAc));Agd(a,sxe,kCe,iGd(kBc));Agd(a,sxe,nCe,iGd(fBc));Agd(a,sxe,IBe,iGd(GAc));Agd(a,sxe,oCe,iGd(hBc));Agd(a,sxe,rCe,iGd(BAc));Agd(a,sxe,sCe,iGd(CAc));Agd(a,sxe,YDe,iGd(dAc));Agd(a,sxe,mCe,iGd(eBc));Agd(a,sxe,ECe,iGd(Xzc));Agd(a,sxe,FCe,iGd(Wzc));Agd(a,sxe,DCe,iGd(Vzc));Agd(a,sxe,GCe,iGd(KAc));Agd(a,sxe,HCe,iGd(JAc));Agd(a,sxe,ICe,iGd(LAc));Agd(a,sxe,CAe,iGd(nBc));Agd(a,sxe,ZDe,iGd(RAc));Agd(a,sxe,Cze,iGd(FAc));Agd(a,sxe,$De,iGd(wAc));Agd(a,sxe,fAe,iGd(vAc));Agd(a,sxe,bCe,iGd(iAc));Agd(a,sxe,_De,iGd(CBc));Agd(a,sxe,aEe,iGd(Uzc));Agd(a,sxe,bEe,iGd(MAc));Agd(a,sxe,cEe,iGd(zBc));Agd(a,sxe,dEe,iGd(sBc));Agd(a,sxe,eEe,iGd(tBc));Agd(a,sxe,WBe,iGd(WAc));Agd(a,sxe,XBe,iGd(XAc));Agd(a,sxe,fEe,iGd(IBc));Agd(a,sxe,MBe,iGd(Szc));Agd(a,sxe,ZBe,iGd(YAc));Agd(a,sxe,UCe,iGd(xAc));Agd(a,sxe,VCe,iGd(uAc));Agd(a,sxe,gEe,iGd(_Ac));Agd(a,sxe,$Be,iGd(SAc));Agd(a,sxe,lCe,iGd(gBc));Agd(a,sxe,hEe,iGd(eCc));Agd(a,sxe,HBe,iGd(sAc));Agd(a,sxe,NBe,iGd(HBc));Agd(a,sxe,vCe,iGd(AAc));Agd(a,sxe,dCe,iGd(jAc));Agd(a,sxe,eCe,iGd(kAc));Agd(a,sxe,UBe,iGd(TAc));Agd(a,sxe,fCe,iGd(lAc));Agd(a,sxe,iEe,iGd(PAc));Agd(a,sxe,VBe,iGd(VAc));Agd(a,sxe,gCe,iGd(mAc));Agd(a,sxe,WCe,iGd(cAc));Agd(a,sxe,$Ce,iGd(_zc));Agd(a,sxe,_Ce,iGd(Zzc));Agd(a,sxe,aDe,iGd($zc));Agd(a,sxe,YCe,iGd(aAc));Agd(a,sxe,ZCe,iGd(Yzc));Agd(a,sxe,XCe,iGd(bAc));Agd(a,sxe,QBe,iGd(HAc))} +function yne(a){_Ad(a.a,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'anySimpleType']));_Ad(a.b,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'anyType',rKe,pKe]));_Ad(RD(QHd(xYd(a.b),0),35),qKe,cD(WC(qJ,1),Nve,2,6,[rKe,YKe,GIe,':mixed']));_Ad(RD(QHd(xYd(a.b),1),35),qKe,cD(WC(qJ,1),Nve,2,6,[rKe,YKe,cLe,eLe,GIe,':1',nLe,'lax']));_Ad(RD(QHd(xYd(a.b),2),35),qKe,cD(WC(qJ,1),Nve,2,6,[rKe,WKe,cLe,eLe,GIe,':2',nLe,'lax']));_Ad(a.c,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'anyURI',bLe,ZKe]));_Ad(a.d,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'base64Binary',bLe,ZKe]));_Ad(a.e,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,hve,bLe,ZKe]));_Ad(a.f,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'boolean:Object',DKe,hve]));_Ad(a.g,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,dKe]));_Ad(a.i,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'byte:Object',DKe,dKe]));_Ad(a.j,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'date',bLe,ZKe]));_Ad(a.k,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'dateTime',bLe,ZKe]));_Ad(a.n,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'decimal',bLe,ZKe]));_Ad(a.o,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,fKe,bLe,ZKe]));_Ad(a.p,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'double:Object',DKe,fKe]));_Ad(a.q,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'duration',bLe,ZKe]));_Ad(a.s,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'ENTITIES',DKe,oLe,pLe,'1']));_Ad(a.r,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,oLe,$Ke,qLe]));_Ad(a.t,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,qLe,DKe,rLe]));_Ad(a.u,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,gKe,bLe,ZKe]));_Ad(a.v,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'float:Object',DKe,gKe]));_Ad(a.w,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'gDay',bLe,ZKe]));_Ad(a.B,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'gMonth',bLe,ZKe]));_Ad(a.A,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'gMonthDay',bLe,ZKe]));_Ad(a.C,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'gYear',bLe,ZKe]));_Ad(a.D,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'gYearMonth',bLe,ZKe]));_Ad(a.F,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'hexBinary',bLe,ZKe]));_Ad(a.G,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'ID',DKe,rLe]));_Ad(a.H,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'IDREF',DKe,rLe]));_Ad(a.J,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'IDREFS',DKe,sLe,pLe,'1']));_Ad(a.I,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,sLe,$Ke,'IDREF']));_Ad(a.K,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,hKe]));_Ad(a.M,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,tLe]));_Ad(a.L,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'int:Object',DKe,hKe]));_Ad(a.P,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'language',DKe,uLe,vLe,wLe]));_Ad(a.Q,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,iKe]));_Ad(a.R,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'long:Object',DKe,iKe]));_Ad(a.S,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'Name',DKe,uLe,vLe,xLe]));_Ad(a.T,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,rLe,DKe,'Name',vLe,yLe]));_Ad(a.U,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'negativeInteger',DKe,zLe,ALe,'-1']));_Ad(a.V,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,BLe,DKe,uLe,vLe,'\\c+']));_Ad(a.X,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'NMTOKENS',DKe,CLe,pLe,'1']));_Ad(a.W,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,CLe,$Ke,BLe]));_Ad(a.Y,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,DLe,DKe,tLe,ELe,'0']));_Ad(a.Z,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,zLe,DKe,tLe,ALe,'0']));_Ad(a.$,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,FLe,DKe,jve,bLe,'replace']));_Ad(a._,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'NOTATION',bLe,ZKe]));_Ad(a.ab,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'positiveInteger',DKe,DLe,ELe,'1']));_Ad(a.bb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'processingInstruction_._type',rKe,'empty']));_Ad(RD(QHd(xYd(a.bb),0),35),qKe,cD(WC(qJ,1),Nve,2,6,[rKe,VKe,GIe,'data']));_Ad(RD(QHd(xYd(a.bb),1),35),qKe,cD(WC(qJ,1),Nve,2,6,[rKe,VKe,GIe,CIe]));_Ad(a.cb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'QName',bLe,ZKe]));_Ad(a.db,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,jKe]));_Ad(a.eb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'short:Object',DKe,jKe]));_Ad(a.fb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'simpleAnyType',rKe,UKe]));_Ad(RD(QHd(xYd(a.fb),0),35),qKe,cD(WC(qJ,1),Nve,2,6,[GIe,':3',rKe,UKe]));_Ad(RD(QHd(xYd(a.fb),1),35),qKe,cD(WC(qJ,1),Nve,2,6,[GIe,':4',rKe,UKe]));_Ad(RD(QHd(xYd(a.fb),2),19),qKe,cD(WC(qJ,1),Nve,2,6,[GIe,':5',rKe,UKe]));_Ad(a.gb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,jve,bLe,'preserve']));_Ad(a.hb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'time',bLe,ZKe]));_Ad(a.ib,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,uLe,DKe,FLe,bLe,ZKe]));_Ad(a.jb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,GLe,ALe,'255',ELe,'0']));_Ad(a.kb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'unsignedByte:Object',DKe,GLe]));_Ad(a.lb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,HLe,ALe,'4294967295',ELe,'0']));_Ad(a.mb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'unsignedInt:Object',DKe,HLe]));_Ad(a.nb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'unsignedLong',DKe,DLe,ALe,ILe,ELe,'0']));_Ad(a.ob,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,JLe,ALe,'65535',ELe,'0']));_Ad(a.pb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'unsignedShort:Object',DKe,JLe]));_Ad(a.qb,qKe,cD(WC(qJ,1),Nve,2,6,[GIe,'',rKe,pKe]));_Ad(RD(QHd(xYd(a.qb),0),35),qKe,cD(WC(qJ,1),Nve,2,6,[rKe,YKe,GIe,':mixed']));_Ad(RD(QHd(xYd(a.qb),1),19),qKe,cD(WC(qJ,1),Nve,2,6,[rKe,VKe,GIe,'xmlns:prefix']));_Ad(RD(QHd(xYd(a.qb),2),19),qKe,cD(WC(qJ,1),Nve,2,6,[rKe,VKe,GIe,'xsi:schemaLocation']));_Ad(RD(QHd(xYd(a.qb),3),35),qKe,cD(WC(qJ,1),Nve,2,6,[rKe,XKe,GIe,'cDATA',_Ke,aLe]));_Ad(RD(QHd(xYd(a.qb),4),35),qKe,cD(WC(qJ,1),Nve,2,6,[rKe,XKe,GIe,'comment',_Ke,aLe]));_Ad(RD(QHd(xYd(a.qb),5),19),qKe,cD(WC(qJ,1),Nve,2,6,[rKe,XKe,GIe,KLe,_Ke,aLe]));_Ad(RD(QHd(xYd(a.qb),6),35),qKe,cD(WC(qJ,1),Nve,2,6,[rKe,XKe,GIe,hIe,_Ke,aLe]))} +function TId(a){return lhb('_UI_EMFDiagnostic_marker',a)?'EMF Problem':lhb('_UI_CircularContainment_diagnostic',a)?'An object may not circularly contain itself':lhb(TIe,a)?'Wrong character.':lhb(UIe,a)?'Invalid reference number.':lhb(VIe,a)?'A character is required after \\.':lhb(WIe,a)?"'?' is not expected. '(?:' or '(?=' or '(?!' or '(?<' or '(?#' or '(?>'?":lhb(XIe,a)?"'(?<' or '(?<!' is expected.":lhb(YIe,a)?'A comment is not terminated.':lhb(ZIe,a)?"')' is expected.":lhb($Ie,a)?'Unexpected end of the pattern in a modifier group.':lhb(_Ie,a)?"':' is expected.":lhb(aJe,a)?'Unexpected end of the pattern in a conditional group.':lhb(bJe,a)?'A back reference or an anchor or a lookahead or a look-behind is expected in a conditional pattern.':lhb(cJe,a)?'There are more than three choices in a conditional group.':lhb(dJe,a)?'A character in U+0040-U+005f must follow \\c.':lhb(eJe,a)?"A '{' is required before a character category.":lhb(fJe,a)?"A property name is not closed by '}'.":lhb(gJe,a)?'Unexpected meta character.':lhb(hJe,a)?'Unknown property.':lhb(iJe,a)?"A POSIX character class must be closed by ':]'.":lhb(jJe,a)?'Unexpected end of the pattern in a character class.':lhb(kJe,a)?'Unknown name for a POSIX character class.':lhb('parser.cc.4',a)?"'-' is invalid here.":lhb(lJe,a)?"']' is expected.":lhb(mJe,a)?"'[' is invalid in a character class. Write '\\['.":lhb(nJe,a)?"']' is invalid in a character class. Write '\\]'.":lhb(oJe,a)?"'-' is an invalid character range. Write '\\-'.":lhb(pJe,a)?"'[' is expected.":lhb(qJe,a)?"')' or '-[' or '+[' or '&[' is expected.":lhb(rJe,a)?'The range end code point is less than the start code point.':lhb(sJe,a)?'Invalid Unicode hex notation.':lhb(tJe,a)?'Overflow in a hex notation.':lhb(uJe,a)?"'\\x{' must be closed by '}'.":lhb(vJe,a)?'Invalid Unicode code point.':lhb(wJe,a)?'An anchor must not be here.':lhb(xJe,a)?'This expression is not supported in the current option setting.':lhb(yJe,a)?'Invalid quantifier. A digit is expected.':lhb(zJe,a)?"Invalid quantifier. Invalid quantity or a '}' is missing.":lhb(AJe,a)?"Invalid quantifier. A digit or '}' is expected.":lhb(BJe,a)?'Invalid quantifier. A min quantity must be <= a max quantity.':lhb(CJe,a)?'Invalid quantifier. A quantity value overflow.':lhb('_UI_PackageRegistry_extensionpoint',a)?'Ecore Package Registry for Generated Packages':lhb('_UI_DynamicPackageRegistry_extensionpoint',a)?'Ecore Package Registry for Dynamic Packages':lhb('_UI_FactoryRegistry_extensionpoint',a)?'Ecore Factory Override Registry':lhb('_UI_URIExtensionParserRegistry_extensionpoint',a)?'URI Extension Parser Registry':lhb('_UI_URIProtocolParserRegistry_extensionpoint',a)?'URI Protocol Parser Registry':lhb('_UI_URIContentParserRegistry_extensionpoint',a)?'URI Content Parser Registry':lhb('_UI_ContentHandlerRegistry_extensionpoint',a)?'Content Handler Registry':lhb('_UI_URIMappingRegistry_extensionpoint',a)?'URI Converter Mapping Registry':lhb('_UI_PackageRegistryImplementation_extensionpoint',a)?'Ecore Package Registry Implementation':lhb('_UI_ValidationDelegateRegistry_extensionpoint',a)?'Validation Delegate Registry':lhb('_UI_SettingDelegateRegistry_extensionpoint',a)?'Feature Setting Delegate Factory Registry':lhb('_UI_InvocationDelegateRegistry_extensionpoint',a)?'Operation Invocation Delegate Factory Registry':lhb('_UI_EClassInterfaceNotAbstract_diagnostic',a)?'A class that is an interface must also be abstract':lhb('_UI_EClassNoCircularSuperTypes_diagnostic',a)?'A class may not be a super type of itself':lhb('_UI_EClassNotWellFormedMapEntryNoInstanceClassName_diagnostic',a)?"A class that inherits from a map entry class must have instance class name 'java.util.Map$Entry'":lhb('_UI_EReferenceOppositeOfOppositeInconsistent_diagnostic',a)?'The opposite of the opposite may not be a reference different from this one':lhb('_UI_EReferenceOppositeNotFeatureOfType_diagnostic',a)?"The opposite must be a feature of the reference's type":lhb('_UI_EReferenceTransientOppositeNotTransient_diagnostic',a)?'The opposite of a transient reference must be transient if it is proxy resolving':lhb('_UI_EReferenceOppositeBothContainment_diagnostic',a)?'The opposite of a containment reference must not be a containment reference':lhb('_UI_EReferenceConsistentUnique_diagnostic',a)?'A containment or bidirectional reference must be unique if its upper bound is different from 1':lhb('_UI_ETypedElementNoType_diagnostic',a)?'The typed element must have a type':lhb('_UI_EAttributeNoDataType_diagnostic',a)?'The generic attribute type must not refer to a class':lhb('_UI_EReferenceNoClass_diagnostic',a)?'The generic reference type must not refer to a data type':lhb('_UI_EGenericTypeNoTypeParameterAndClassifier_diagnostic',a)?"A generic type can't refer to both a type parameter and a classifier":lhb('_UI_EGenericTypeNoClass_diagnostic',a)?'A generic super type must refer to a class':lhb('_UI_EGenericTypeNoTypeParameterOrClassifier_diagnostic',a)?'A generic type in this context must refer to a classifier or a type parameter':lhb('_UI_EGenericTypeBoundsOnlyForTypeArgument_diagnostic',a)?'A generic type may have bounds only when used as a type argument':lhb('_UI_EGenericTypeNoUpperAndLowerBound_diagnostic',a)?'A generic type must not have both a lower and an upper bound':lhb('_UI_EGenericTypeNoTypeParameterOrClassifierAndBound_diagnostic',a)?'A generic type with bounds must not also refer to a type parameter or classifier':lhb('_UI_EGenericTypeNoArguments_diagnostic',a)?'A generic type may have arguments only if it refers to a classifier':lhb('_UI_EGenericTypeOutOfScopeTypeParameter_diagnostic',a)?'A generic type may only refer to a type parameter that is in scope':a} +function $Bd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;if(a.r)return;a.r=true;PAd(a,'graph');CBd(a,'graph');DBd(a,$He);eBd(a.o,'T');WGd(zYd(a.a),a.p);WGd(zYd(a.f),a.a);WGd(zYd(a.n),a.f);WGd(zYd(a.g),a.n);WGd(zYd(a.c),a.n);WGd(zYd(a.i),a.c);WGd(zYd(a.j),a.c);WGd(zYd(a.d),a.f);WGd(zYd(a.e),a.a);vBd(a.p,U5,kze,true,true,false);o=bBd(a.p,a.p,'setProperty');p=fBd(o);j=lBd(a.o);k=(c=(d=new s2d,d),c);WGd((!j.d&&(j.d=new XZd(o7,j,1)),j.d),k);l=mBd(p);n2d(k,l);dBd(o,j,_He);j=mBd(p);dBd(o,j,aIe);o=bBd(a.p,null,'getProperty');p=fBd(o);j=lBd(a.o);k=mBd(p);WGd((!j.d&&(j.d=new XZd(o7,j,1)),j.d),k);dBd(o,j,_He);j=mBd(p);n=XVd(o,j,null);!!n&&n.oj();o=bBd(a.p,a.wb.e,'hasProperty');j=lBd(a.o);k=(e=(f=new s2d,f),e);WGd((!j.d&&(j.d=new XZd(o7,j,1)),j.d),k);dBd(o,j,_He);o=bBd(a.p,a.p,'copyProperties');cBd(o,a.p,bIe);o=bBd(a.p,null,'getAllProperties');j=lBd(a.wb.P);k=lBd(a.o);WGd((!j.d&&(j.d=new XZd(o7,j,1)),j.d),k);l=(g=(h=new s2d,h),g);WGd((!k.d&&(k.d=new XZd(o7,k,1)),k.d),l);k=lBd(a.wb.M);WGd((!j.d&&(j.d=new XZd(o7,j,1)),j.d),k);m=XVd(o,j,null);!!m&&m.oj();vBd(a.a,C4,xHe,true,false,true);zBd(RD(QHd(xYd(a.a),0),19),a.k,null,cIe,0,-1,C4,false,false,true,true,false,false,false);vBd(a.f,H4,zHe,true,false,true);zBd(RD(QHd(xYd(a.f),0),19),a.g,RD(QHd(xYd(a.g),0),19),'labels',0,-1,H4,false,false,true,true,false,false,false);tBd(RD(QHd(xYd(a.f),1),35),a.wb._,dIe,null,0,1,H4,false,false,true,false,true,false);vBd(a.n,L4,'ElkShape',true,false,true);tBd(RD(QHd(xYd(a.n),0),35),a.wb.t,eIe,zxe,1,1,L4,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.n),1),35),a.wb.t,fIe,zxe,1,1,L4,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.n),2),35),a.wb.t,'x',zxe,1,1,L4,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.n),3),35),a.wb.t,'y',zxe,1,1,L4,false,false,true,false,true,false);o=bBd(a.n,null,'setDimensions');cBd(o,a.wb.t,fIe);cBd(o,a.wb.t,eIe);o=bBd(a.n,null,'setLocation');cBd(o,a.wb.t,'x');cBd(o,a.wb.t,'y');vBd(a.g,I4,FHe,false,false,true);zBd(RD(QHd(xYd(a.g),0),19),a.f,RD(QHd(xYd(a.f),0),19),gIe,0,1,I4,false,false,true,false,false,false,false);tBd(RD(QHd(xYd(a.g),1),35),a.wb._,hIe,'',0,1,I4,false,false,true,false,true,false);vBd(a.c,E4,AHe,true,false,true);zBd(RD(QHd(xYd(a.c),0),19),a.d,RD(QHd(xYd(a.d),1),19),'outgoingEdges',0,-1,E4,false,false,true,false,true,false,false);zBd(RD(QHd(xYd(a.c),1),19),a.d,RD(QHd(xYd(a.d),2),19),'incomingEdges',0,-1,E4,false,false,true,false,true,false,false);vBd(a.i,J4,GHe,false,false,true);zBd(RD(QHd(xYd(a.i),0),19),a.j,RD(QHd(xYd(a.j),0),19),'ports',0,-1,J4,false,false,true,true,false,false,false);zBd(RD(QHd(xYd(a.i),1),19),a.i,RD(QHd(xYd(a.i),2),19),iIe,0,-1,J4,false,false,true,true,false,false,false);zBd(RD(QHd(xYd(a.i),2),19),a.i,RD(QHd(xYd(a.i),1),19),gIe,0,1,J4,false,false,true,false,false,false,false);zBd(RD(QHd(xYd(a.i),3),19),a.d,RD(QHd(xYd(a.d),0),19),'containedEdges',0,-1,J4,false,false,true,true,false,false,false);tBd(RD(QHd(xYd(a.i),4),35),a.wb.e,jIe,null,0,1,J4,true,true,false,false,true,true);vBd(a.j,K4,HHe,false,false,true);zBd(RD(QHd(xYd(a.j),0),19),a.i,RD(QHd(xYd(a.i),0),19),gIe,0,1,K4,false,false,true,false,false,false,false);vBd(a.d,G4,BHe,false,false,true);zBd(RD(QHd(xYd(a.d),0),19),a.i,RD(QHd(xYd(a.i),3),19),'containingNode',0,1,G4,false,false,true,false,false,false,false);zBd(RD(QHd(xYd(a.d),1),19),a.c,RD(QHd(xYd(a.c),0),19),kIe,0,-1,G4,false,false,true,false,true,false,false);zBd(RD(QHd(xYd(a.d),2),19),a.c,RD(QHd(xYd(a.c),1),19),lIe,0,-1,G4,false,false,true,false,true,false,false);zBd(RD(QHd(xYd(a.d),3),19),a.e,RD(QHd(xYd(a.e),5),19),mIe,0,-1,G4,false,false,true,true,false,false,false);tBd(RD(QHd(xYd(a.d),4),35),a.wb.e,'hyperedge',null,0,1,G4,true,true,false,false,true,true);tBd(RD(QHd(xYd(a.d),5),35),a.wb.e,jIe,null,0,1,G4,true,true,false,false,true,true);tBd(RD(QHd(xYd(a.d),6),35),a.wb.e,'selfloop',null,0,1,G4,true,true,false,false,true,true);tBd(RD(QHd(xYd(a.d),7),35),a.wb.e,'connected',null,0,1,G4,true,true,false,false,true,true);vBd(a.b,D4,yHe,false,false,true);tBd(RD(QHd(xYd(a.b),0),35),a.wb.t,'x',zxe,1,1,D4,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.b),1),35),a.wb.t,'y',zxe,1,1,D4,false,false,true,false,true,false);o=bBd(a.b,null,'set');cBd(o,a.wb.t,'x');cBd(o,a.wb.t,'y');vBd(a.e,F4,CHe,false,false,true);tBd(RD(QHd(xYd(a.e),0),35),a.wb.t,'startX',null,0,1,F4,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.e),1),35),a.wb.t,'startY',null,0,1,F4,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.e),2),35),a.wb.t,'endX',null,0,1,F4,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.e),3),35),a.wb.t,'endY',null,0,1,F4,false,false,true,false,true,false);zBd(RD(QHd(xYd(a.e),4),19),a.b,null,nIe,0,-1,F4,false,false,true,true,false,false,false);zBd(RD(QHd(xYd(a.e),5),19),a.d,RD(QHd(xYd(a.d),3),19),gIe,0,1,F4,false,false,true,false,false,false,false);zBd(RD(QHd(xYd(a.e),6),19),a.c,null,oIe,0,1,F4,false,false,true,false,true,false,false);zBd(RD(QHd(xYd(a.e),7),19),a.c,null,pIe,0,1,F4,false,false,true,false,true,false,false);zBd(RD(QHd(xYd(a.e),8),19),a.e,RD(QHd(xYd(a.e),9),19),qIe,0,-1,F4,false,false,true,false,true,false,false);zBd(RD(QHd(xYd(a.e),9),19),a.e,RD(QHd(xYd(a.e),8),19),rIe,0,-1,F4,false,false,true,false,true,false,false);tBd(RD(QHd(xYd(a.e),10),35),a.wb._,dIe,null,0,1,F4,false,false,true,false,true,false);o=bBd(a.e,null,'setStartLocation');cBd(o,a.wb.t,'x');cBd(o,a.wb.t,'y');o=bBd(a.e,null,'setEndLocation');cBd(o,a.wb.t,'x');cBd(o,a.wb.t,'y');vBd(a.k,UK,'ElkPropertyToValueMapEntry',false,false,false);j=lBd(a.o);k=(i=(b=new s2d,b),i);WGd((!j.d&&(j.d=new XZd(o7,j,1)),j.d),k);uBd(RD(QHd(xYd(a.k),0),35),j,'key',UK,false,false,true,false);tBd(RD(QHd(xYd(a.k),1),35),a.s,aIe,null,0,1,UK,false,false,true,false,true,false);xBd(a.o,V5,'IProperty',true);xBd(a.s,jJ,'PropertyValue',true);pBd(a,$He)} +function Kqe(){Kqe=geb;Jqe=$C(gE,YHe,28,txe,15,1);Jqe[9]=35;Jqe[10]=19;Jqe[13]=19;Jqe[32]=51;Jqe[33]=49;Jqe[34]=33;Knb(Jqe,35,38,49);Jqe[38]=1;Knb(Jqe,39,45,49);Knb(Jqe,45,47,-71);Jqe[47]=49;Knb(Jqe,48,58,-71);Jqe[58]=61;Jqe[59]=49;Jqe[60]=1;Jqe[61]=49;Jqe[62]=33;Knb(Jqe,63,65,49);Knb(Jqe,65,91,-3);Knb(Jqe,91,93,33);Jqe[93]=1;Jqe[94]=33;Jqe[95]=-3;Jqe[96]=33;Knb(Jqe,97,123,-3);Knb(Jqe,123,183,33);Jqe[183]=-87;Knb(Jqe,184,192,33);Knb(Jqe,192,215,-19);Jqe[215]=33;Knb(Jqe,216,247,-19);Jqe[247]=33;Knb(Jqe,248,306,-19);Knb(Jqe,306,308,33);Knb(Jqe,308,319,-19);Knb(Jqe,319,321,33);Knb(Jqe,321,329,-19);Jqe[329]=33;Knb(Jqe,330,383,-19);Jqe[383]=33;Knb(Jqe,384,452,-19);Knb(Jqe,452,461,33);Knb(Jqe,461,497,-19);Knb(Jqe,497,500,33);Knb(Jqe,500,502,-19);Knb(Jqe,502,506,33);Knb(Jqe,506,536,-19);Knb(Jqe,536,592,33);Knb(Jqe,592,681,-19);Knb(Jqe,681,699,33);Knb(Jqe,699,706,-19);Knb(Jqe,706,720,33);Knb(Jqe,720,722,-87);Knb(Jqe,722,768,33);Knb(Jqe,768,838,-87);Knb(Jqe,838,864,33);Knb(Jqe,864,866,-87);Knb(Jqe,866,902,33);Jqe[902]=-19;Jqe[903]=-87;Knb(Jqe,904,907,-19);Jqe[907]=33;Jqe[908]=-19;Jqe[909]=33;Knb(Jqe,910,930,-19);Jqe[930]=33;Knb(Jqe,931,975,-19);Jqe[975]=33;Knb(Jqe,976,983,-19);Knb(Jqe,983,986,33);Jqe[986]=-19;Jqe[987]=33;Jqe[988]=-19;Jqe[989]=33;Jqe[990]=-19;Jqe[991]=33;Jqe[992]=-19;Jqe[993]=33;Knb(Jqe,994,1012,-19);Knb(Jqe,1012,1025,33);Knb(Jqe,1025,1037,-19);Jqe[1037]=33;Knb(Jqe,1038,1104,-19);Jqe[1104]=33;Knb(Jqe,1105,1117,-19);Jqe[1117]=33;Knb(Jqe,1118,1154,-19);Jqe[1154]=33;Knb(Jqe,1155,1159,-87);Knb(Jqe,1159,1168,33);Knb(Jqe,1168,1221,-19);Knb(Jqe,1221,1223,33);Knb(Jqe,1223,1225,-19);Knb(Jqe,1225,1227,33);Knb(Jqe,1227,1229,-19);Knb(Jqe,1229,1232,33);Knb(Jqe,1232,1260,-19);Knb(Jqe,1260,1262,33);Knb(Jqe,1262,1270,-19);Knb(Jqe,1270,1272,33);Knb(Jqe,1272,1274,-19);Knb(Jqe,1274,1329,33);Knb(Jqe,1329,1367,-19);Knb(Jqe,1367,1369,33);Jqe[1369]=-19;Knb(Jqe,1370,1377,33);Knb(Jqe,1377,1415,-19);Knb(Jqe,1415,1425,33);Knb(Jqe,1425,1442,-87);Jqe[1442]=33;Knb(Jqe,1443,1466,-87);Jqe[1466]=33;Knb(Jqe,1467,1470,-87);Jqe[1470]=33;Jqe[1471]=-87;Jqe[1472]=33;Knb(Jqe,1473,1475,-87);Jqe[1475]=33;Jqe[1476]=-87;Knb(Jqe,1477,1488,33);Knb(Jqe,1488,1515,-19);Knb(Jqe,1515,1520,33);Knb(Jqe,1520,1523,-19);Knb(Jqe,1523,1569,33);Knb(Jqe,1569,1595,-19);Knb(Jqe,1595,1600,33);Jqe[1600]=-87;Knb(Jqe,1601,1611,-19);Knb(Jqe,1611,1619,-87);Knb(Jqe,1619,1632,33);Knb(Jqe,1632,1642,-87);Knb(Jqe,1642,1648,33);Jqe[1648]=-87;Knb(Jqe,1649,1720,-19);Knb(Jqe,1720,1722,33);Knb(Jqe,1722,1727,-19);Jqe[1727]=33;Knb(Jqe,1728,1743,-19);Jqe[1743]=33;Knb(Jqe,1744,1748,-19);Jqe[1748]=33;Jqe[1749]=-19;Knb(Jqe,1750,1765,-87);Knb(Jqe,1765,1767,-19);Knb(Jqe,1767,1769,-87);Jqe[1769]=33;Knb(Jqe,1770,1774,-87);Knb(Jqe,1774,1776,33);Knb(Jqe,1776,1786,-87);Knb(Jqe,1786,2305,33);Knb(Jqe,2305,2308,-87);Jqe[2308]=33;Knb(Jqe,2309,2362,-19);Knb(Jqe,2362,2364,33);Jqe[2364]=-87;Jqe[2365]=-19;Knb(Jqe,2366,2382,-87);Knb(Jqe,2382,2385,33);Knb(Jqe,2385,2389,-87);Knb(Jqe,2389,2392,33);Knb(Jqe,2392,2402,-19);Knb(Jqe,2402,2404,-87);Knb(Jqe,2404,2406,33);Knb(Jqe,2406,2416,-87);Knb(Jqe,2416,2433,33);Knb(Jqe,2433,2436,-87);Jqe[2436]=33;Knb(Jqe,2437,2445,-19);Knb(Jqe,2445,2447,33);Knb(Jqe,2447,2449,-19);Knb(Jqe,2449,2451,33);Knb(Jqe,2451,2473,-19);Jqe[2473]=33;Knb(Jqe,2474,2481,-19);Jqe[2481]=33;Jqe[2482]=-19;Knb(Jqe,2483,2486,33);Knb(Jqe,2486,2490,-19);Knb(Jqe,2490,2492,33);Jqe[2492]=-87;Jqe[2493]=33;Knb(Jqe,2494,2501,-87);Knb(Jqe,2501,2503,33);Knb(Jqe,2503,2505,-87);Knb(Jqe,2505,2507,33);Knb(Jqe,2507,2510,-87);Knb(Jqe,2510,2519,33);Jqe[2519]=-87;Knb(Jqe,2520,2524,33);Knb(Jqe,2524,2526,-19);Jqe[2526]=33;Knb(Jqe,2527,2530,-19);Knb(Jqe,2530,2532,-87);Knb(Jqe,2532,2534,33);Knb(Jqe,2534,2544,-87);Knb(Jqe,2544,2546,-19);Knb(Jqe,2546,2562,33);Jqe[2562]=-87;Knb(Jqe,2563,2565,33);Knb(Jqe,2565,2571,-19);Knb(Jqe,2571,2575,33);Knb(Jqe,2575,2577,-19);Knb(Jqe,2577,2579,33);Knb(Jqe,2579,2601,-19);Jqe[2601]=33;Knb(Jqe,2602,2609,-19);Jqe[2609]=33;Knb(Jqe,2610,2612,-19);Jqe[2612]=33;Knb(Jqe,2613,2615,-19);Jqe[2615]=33;Knb(Jqe,2616,2618,-19);Knb(Jqe,2618,2620,33);Jqe[2620]=-87;Jqe[2621]=33;Knb(Jqe,2622,2627,-87);Knb(Jqe,2627,2631,33);Knb(Jqe,2631,2633,-87);Knb(Jqe,2633,2635,33);Knb(Jqe,2635,2638,-87);Knb(Jqe,2638,2649,33);Knb(Jqe,2649,2653,-19);Jqe[2653]=33;Jqe[2654]=-19;Knb(Jqe,2655,2662,33);Knb(Jqe,2662,2674,-87);Knb(Jqe,2674,2677,-19);Knb(Jqe,2677,2689,33);Knb(Jqe,2689,2692,-87);Jqe[2692]=33;Knb(Jqe,2693,2700,-19);Jqe[2700]=33;Jqe[2701]=-19;Jqe[2702]=33;Knb(Jqe,2703,2706,-19);Jqe[2706]=33;Knb(Jqe,2707,2729,-19);Jqe[2729]=33;Knb(Jqe,2730,2737,-19);Jqe[2737]=33;Knb(Jqe,2738,2740,-19);Jqe[2740]=33;Knb(Jqe,2741,2746,-19);Knb(Jqe,2746,2748,33);Jqe[2748]=-87;Jqe[2749]=-19;Knb(Jqe,2750,2758,-87);Jqe[2758]=33;Knb(Jqe,2759,2762,-87);Jqe[2762]=33;Knb(Jqe,2763,2766,-87);Knb(Jqe,2766,2784,33);Jqe[2784]=-19;Knb(Jqe,2785,2790,33);Knb(Jqe,2790,2800,-87);Knb(Jqe,2800,2817,33);Knb(Jqe,2817,2820,-87);Jqe[2820]=33;Knb(Jqe,2821,2829,-19);Knb(Jqe,2829,2831,33);Knb(Jqe,2831,2833,-19);Knb(Jqe,2833,2835,33);Knb(Jqe,2835,2857,-19);Jqe[2857]=33;Knb(Jqe,2858,2865,-19);Jqe[2865]=33;Knb(Jqe,2866,2868,-19);Knb(Jqe,2868,2870,33);Knb(Jqe,2870,2874,-19);Knb(Jqe,2874,2876,33);Jqe[2876]=-87;Jqe[2877]=-19;Knb(Jqe,2878,2884,-87);Knb(Jqe,2884,2887,33);Knb(Jqe,2887,2889,-87);Knb(Jqe,2889,2891,33);Knb(Jqe,2891,2894,-87);Knb(Jqe,2894,2902,33);Knb(Jqe,2902,2904,-87);Knb(Jqe,2904,2908,33);Knb(Jqe,2908,2910,-19);Jqe[2910]=33;Knb(Jqe,2911,2914,-19);Knb(Jqe,2914,2918,33);Knb(Jqe,2918,2928,-87);Knb(Jqe,2928,2946,33);Knb(Jqe,2946,2948,-87);Jqe[2948]=33;Knb(Jqe,2949,2955,-19);Knb(Jqe,2955,2958,33);Knb(Jqe,2958,2961,-19);Jqe[2961]=33;Knb(Jqe,2962,2966,-19);Knb(Jqe,2966,2969,33);Knb(Jqe,2969,2971,-19);Jqe[2971]=33;Jqe[2972]=-19;Jqe[2973]=33;Knb(Jqe,2974,2976,-19);Knb(Jqe,2976,2979,33);Knb(Jqe,2979,2981,-19);Knb(Jqe,2981,2984,33);Knb(Jqe,2984,2987,-19);Knb(Jqe,2987,2990,33);Knb(Jqe,2990,2998,-19);Jqe[2998]=33;Knb(Jqe,2999,3002,-19);Knb(Jqe,3002,3006,33);Knb(Jqe,3006,3011,-87);Knb(Jqe,3011,3014,33);Knb(Jqe,3014,3017,-87);Jqe[3017]=33;Knb(Jqe,3018,3022,-87);Knb(Jqe,3022,3031,33);Jqe[3031]=-87;Knb(Jqe,3032,3047,33);Knb(Jqe,3047,3056,-87);Knb(Jqe,3056,3073,33);Knb(Jqe,3073,3076,-87);Jqe[3076]=33;Knb(Jqe,3077,3085,-19);Jqe[3085]=33;Knb(Jqe,3086,3089,-19);Jqe[3089]=33;Knb(Jqe,3090,3113,-19);Jqe[3113]=33;Knb(Jqe,3114,3124,-19);Jqe[3124]=33;Knb(Jqe,3125,3130,-19);Knb(Jqe,3130,3134,33);Knb(Jqe,3134,3141,-87);Jqe[3141]=33;Knb(Jqe,3142,3145,-87);Jqe[3145]=33;Knb(Jqe,3146,3150,-87);Knb(Jqe,3150,3157,33);Knb(Jqe,3157,3159,-87);Knb(Jqe,3159,3168,33);Knb(Jqe,3168,3170,-19);Knb(Jqe,3170,3174,33);Knb(Jqe,3174,3184,-87);Knb(Jqe,3184,3202,33);Knb(Jqe,3202,3204,-87);Jqe[3204]=33;Knb(Jqe,3205,3213,-19);Jqe[3213]=33;Knb(Jqe,3214,3217,-19);Jqe[3217]=33;Knb(Jqe,3218,3241,-19);Jqe[3241]=33;Knb(Jqe,3242,3252,-19);Jqe[3252]=33;Knb(Jqe,3253,3258,-19);Knb(Jqe,3258,3262,33);Knb(Jqe,3262,3269,-87);Jqe[3269]=33;Knb(Jqe,3270,3273,-87);Jqe[3273]=33;Knb(Jqe,3274,3278,-87);Knb(Jqe,3278,3285,33);Knb(Jqe,3285,3287,-87);Knb(Jqe,3287,3294,33);Jqe[3294]=-19;Jqe[3295]=33;Knb(Jqe,3296,3298,-19);Knb(Jqe,3298,3302,33);Knb(Jqe,3302,3312,-87);Knb(Jqe,3312,3330,33);Knb(Jqe,3330,3332,-87);Jqe[3332]=33;Knb(Jqe,3333,3341,-19);Jqe[3341]=33;Knb(Jqe,3342,3345,-19);Jqe[3345]=33;Knb(Jqe,3346,3369,-19);Jqe[3369]=33;Knb(Jqe,3370,3386,-19);Knb(Jqe,3386,3390,33);Knb(Jqe,3390,3396,-87);Knb(Jqe,3396,3398,33);Knb(Jqe,3398,3401,-87);Jqe[3401]=33;Knb(Jqe,3402,3406,-87);Knb(Jqe,3406,3415,33);Jqe[3415]=-87;Knb(Jqe,3416,3424,33);Knb(Jqe,3424,3426,-19);Knb(Jqe,3426,3430,33);Knb(Jqe,3430,3440,-87);Knb(Jqe,3440,3585,33);Knb(Jqe,3585,3631,-19);Jqe[3631]=33;Jqe[3632]=-19;Jqe[3633]=-87;Knb(Jqe,3634,3636,-19);Knb(Jqe,3636,3643,-87);Knb(Jqe,3643,3648,33);Knb(Jqe,3648,3654,-19);Knb(Jqe,3654,3663,-87);Jqe[3663]=33;Knb(Jqe,3664,3674,-87);Knb(Jqe,3674,3713,33);Knb(Jqe,3713,3715,-19);Jqe[3715]=33;Jqe[3716]=-19;Knb(Jqe,3717,3719,33);Knb(Jqe,3719,3721,-19);Jqe[3721]=33;Jqe[3722]=-19;Knb(Jqe,3723,3725,33);Jqe[3725]=-19;Knb(Jqe,3726,3732,33);Knb(Jqe,3732,3736,-19);Jqe[3736]=33;Knb(Jqe,3737,3744,-19);Jqe[3744]=33;Knb(Jqe,3745,3748,-19);Jqe[3748]=33;Jqe[3749]=-19;Jqe[3750]=33;Jqe[3751]=-19;Knb(Jqe,3752,3754,33);Knb(Jqe,3754,3756,-19);Jqe[3756]=33;Knb(Jqe,3757,3759,-19);Jqe[3759]=33;Jqe[3760]=-19;Jqe[3761]=-87;Knb(Jqe,3762,3764,-19);Knb(Jqe,3764,3770,-87);Jqe[3770]=33;Knb(Jqe,3771,3773,-87);Jqe[3773]=-19;Knb(Jqe,3774,3776,33);Knb(Jqe,3776,3781,-19);Jqe[3781]=33;Jqe[3782]=-87;Jqe[3783]=33;Knb(Jqe,3784,3790,-87);Knb(Jqe,3790,3792,33);Knb(Jqe,3792,3802,-87);Knb(Jqe,3802,3864,33);Knb(Jqe,3864,3866,-87);Knb(Jqe,3866,3872,33);Knb(Jqe,3872,3882,-87);Knb(Jqe,3882,3893,33);Jqe[3893]=-87;Jqe[3894]=33;Jqe[3895]=-87;Jqe[3896]=33;Jqe[3897]=-87;Knb(Jqe,3898,3902,33);Knb(Jqe,3902,3904,-87);Knb(Jqe,3904,3912,-19);Jqe[3912]=33;Knb(Jqe,3913,3946,-19);Knb(Jqe,3946,3953,33);Knb(Jqe,3953,3973,-87);Jqe[3973]=33;Knb(Jqe,3974,3980,-87);Knb(Jqe,3980,3984,33);Knb(Jqe,3984,3990,-87);Jqe[3990]=33;Jqe[3991]=-87;Jqe[3992]=33;Knb(Jqe,3993,4014,-87);Knb(Jqe,4014,4017,33);Knb(Jqe,4017,4024,-87);Jqe[4024]=33;Jqe[4025]=-87;Knb(Jqe,4026,4256,33);Knb(Jqe,4256,4294,-19);Knb(Jqe,4294,4304,33);Knb(Jqe,4304,4343,-19);Knb(Jqe,4343,4352,33);Jqe[4352]=-19;Jqe[4353]=33;Knb(Jqe,4354,4356,-19);Jqe[4356]=33;Knb(Jqe,4357,4360,-19);Jqe[4360]=33;Jqe[4361]=-19;Jqe[4362]=33;Knb(Jqe,4363,4365,-19);Jqe[4365]=33;Knb(Jqe,4366,4371,-19);Knb(Jqe,4371,4412,33);Jqe[4412]=-19;Jqe[4413]=33;Jqe[4414]=-19;Jqe[4415]=33;Jqe[4416]=-19;Knb(Jqe,4417,4428,33);Jqe[4428]=-19;Jqe[4429]=33;Jqe[4430]=-19;Jqe[4431]=33;Jqe[4432]=-19;Knb(Jqe,4433,4436,33);Knb(Jqe,4436,4438,-19);Knb(Jqe,4438,4441,33);Jqe[4441]=-19;Knb(Jqe,4442,4447,33);Knb(Jqe,4447,4450,-19);Jqe[4450]=33;Jqe[4451]=-19;Jqe[4452]=33;Jqe[4453]=-19;Jqe[4454]=33;Jqe[4455]=-19;Jqe[4456]=33;Jqe[4457]=-19;Knb(Jqe,4458,4461,33);Knb(Jqe,4461,4463,-19);Knb(Jqe,4463,4466,33);Knb(Jqe,4466,4468,-19);Jqe[4468]=33;Jqe[4469]=-19;Knb(Jqe,4470,4510,33);Jqe[4510]=-19;Knb(Jqe,4511,4520,33);Jqe[4520]=-19;Knb(Jqe,4521,4523,33);Jqe[4523]=-19;Knb(Jqe,4524,4526,33);Knb(Jqe,4526,4528,-19);Knb(Jqe,4528,4535,33);Knb(Jqe,4535,4537,-19);Jqe[4537]=33;Jqe[4538]=-19;Jqe[4539]=33;Knb(Jqe,4540,4547,-19);Knb(Jqe,4547,4587,33);Jqe[4587]=-19;Knb(Jqe,4588,4592,33);Jqe[4592]=-19;Knb(Jqe,4593,4601,33);Jqe[4601]=-19;Knb(Jqe,4602,7680,33);Knb(Jqe,7680,7836,-19);Knb(Jqe,7836,7840,33);Knb(Jqe,7840,7930,-19);Knb(Jqe,7930,7936,33);Knb(Jqe,7936,7958,-19);Knb(Jqe,7958,7960,33);Knb(Jqe,7960,7966,-19);Knb(Jqe,7966,7968,33);Knb(Jqe,7968,8006,-19);Knb(Jqe,8006,8008,33);Knb(Jqe,8008,8014,-19);Knb(Jqe,8014,8016,33);Knb(Jqe,8016,8024,-19);Jqe[8024]=33;Jqe[8025]=-19;Jqe[8026]=33;Jqe[8027]=-19;Jqe[8028]=33;Jqe[8029]=-19;Jqe[8030]=33;Knb(Jqe,8031,8062,-19);Knb(Jqe,8062,8064,33);Knb(Jqe,8064,8117,-19);Jqe[8117]=33;Knb(Jqe,8118,8125,-19);Jqe[8125]=33;Jqe[8126]=-19;Knb(Jqe,8127,8130,33);Knb(Jqe,8130,8133,-19);Jqe[8133]=33;Knb(Jqe,8134,8141,-19);Knb(Jqe,8141,8144,33);Knb(Jqe,8144,8148,-19);Knb(Jqe,8148,8150,33);Knb(Jqe,8150,8156,-19);Knb(Jqe,8156,8160,33);Knb(Jqe,8160,8173,-19);Knb(Jqe,8173,8178,33);Knb(Jqe,8178,8181,-19);Jqe[8181]=33;Knb(Jqe,8182,8189,-19);Knb(Jqe,8189,8400,33);Knb(Jqe,8400,8413,-87);Knb(Jqe,8413,8417,33);Jqe[8417]=-87;Knb(Jqe,8418,8486,33);Jqe[8486]=-19;Knb(Jqe,8487,8490,33);Knb(Jqe,8490,8492,-19);Knb(Jqe,8492,8494,33);Jqe[8494]=-19;Knb(Jqe,8495,8576,33);Knb(Jqe,8576,8579,-19);Knb(Jqe,8579,12293,33);Jqe[12293]=-87;Jqe[12294]=33;Jqe[12295]=-19;Knb(Jqe,12296,12321,33);Knb(Jqe,12321,12330,-19);Knb(Jqe,12330,12336,-87);Jqe[12336]=33;Knb(Jqe,12337,12342,-87);Knb(Jqe,12342,12353,33);Knb(Jqe,12353,12437,-19);Knb(Jqe,12437,12441,33);Knb(Jqe,12441,12443,-87);Knb(Jqe,12443,12445,33);Knb(Jqe,12445,12447,-87);Knb(Jqe,12447,12449,33);Knb(Jqe,12449,12539,-19);Jqe[12539]=33;Knb(Jqe,12540,12543,-87);Knb(Jqe,12543,12549,33);Knb(Jqe,12549,12589,-19);Knb(Jqe,12589,19968,33);Knb(Jqe,19968,40870,-19);Knb(Jqe,40870,44032,33);Knb(Jqe,44032,55204,-19);Knb(Jqe,55204,uxe,33);Knb(Jqe,57344,65534,33)} +function Zae(a){var b,c,d,e,f,g,h;if(a.hb)return;a.hb=true;PAd(a,'ecore');CBd(a,'ecore');DBd(a,AKe);eBd(a.fb,'E');eBd(a.L,'T');eBd(a.P,'K');eBd(a.P,'V');eBd(a.cb,'E');WGd(zYd(a.b),a.bb);WGd(zYd(a.a),a.Q);WGd(zYd(a.o),a.p);WGd(zYd(a.p),a.R);WGd(zYd(a.q),a.p);WGd(zYd(a.v),a.q);WGd(zYd(a.w),a.R);WGd(zYd(a.B),a.Q);WGd(zYd(a.R),a.Q);WGd(zYd(a.T),a.eb);WGd(zYd(a.U),a.R);WGd(zYd(a.V),a.eb);WGd(zYd(a.W),a.bb);WGd(zYd(a.bb),a.eb);WGd(zYd(a.eb),a.R);WGd(zYd(a.db),a.R);vBd(a.b,g7,RJe,false,false,true);tBd(RD(QHd(xYd(a.b),0),35),a.e,'iD',null,0,1,g7,false,false,true,false,true,false);zBd(RD(QHd(xYd(a.b),1),19),a.q,null,'eAttributeType',1,1,g7,true,true,false,false,true,false,true);vBd(a.a,f7,OJe,false,false,true);tBd(RD(QHd(xYd(a.a),0),35),a._,bIe,null,0,1,f7,false,false,true,false,true,false);zBd(RD(QHd(xYd(a.a),1),19),a.ab,null,'details',0,-1,f7,false,false,true,true,false,false,false);zBd(RD(QHd(xYd(a.a),2),19),a.Q,RD(QHd(xYd(a.Q),0),19),'eModelElement',0,1,f7,true,false,true,false,false,false,false);zBd(RD(QHd(xYd(a.a),3),19),a.S,null,'contents',0,-1,f7,false,false,true,true,false,false,false);zBd(RD(QHd(xYd(a.a),4),19),a.S,null,'references',0,-1,f7,false,false,true,false,true,false,false);vBd(a.o,h7,'EClass',false,false,true);tBd(RD(QHd(xYd(a.o),0),35),a.e,'abstract',null,0,1,h7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.o),1),35),a.e,'interface',null,0,1,h7,false,false,true,false,true,false);zBd(RD(QHd(xYd(a.o),2),19),a.o,null,'eSuperTypes',0,-1,h7,false,false,true,false,true,true,false);zBd(RD(QHd(xYd(a.o),3),19),a.T,RD(QHd(xYd(a.T),0),19),'eOperations',0,-1,h7,false,false,true,true,false,false,false);zBd(RD(QHd(xYd(a.o),4),19),a.b,null,'eAllAttributes',0,-1,h7,true,true,false,false,true,false,true);zBd(RD(QHd(xYd(a.o),5),19),a.W,null,'eAllReferences',0,-1,h7,true,true,false,false,true,false,true);zBd(RD(QHd(xYd(a.o),6),19),a.W,null,'eReferences',0,-1,h7,true,true,false,false,true,false,true);zBd(RD(QHd(xYd(a.o),7),19),a.b,null,'eAttributes',0,-1,h7,true,true,false,false,true,false,true);zBd(RD(QHd(xYd(a.o),8),19),a.W,null,'eAllContainments',0,-1,h7,true,true,false,false,true,false,true);zBd(RD(QHd(xYd(a.o),9),19),a.T,null,'eAllOperations',0,-1,h7,true,true,false,false,true,false,true);zBd(RD(QHd(xYd(a.o),10),19),a.bb,null,'eAllStructuralFeatures',0,-1,h7,true,true,false,false,true,false,true);zBd(RD(QHd(xYd(a.o),11),19),a.o,null,'eAllSuperTypes',0,-1,h7,true,true,false,false,true,false,true);zBd(RD(QHd(xYd(a.o),12),19),a.b,null,'eIDAttribute',0,1,h7,true,true,false,false,false,false,true);zBd(RD(QHd(xYd(a.o),13),19),a.bb,RD(QHd(xYd(a.bb),7),19),'eStructuralFeatures',0,-1,h7,false,false,true,true,false,false,false);zBd(RD(QHd(xYd(a.o),14),19),a.H,null,'eGenericSuperTypes',0,-1,h7,false,false,true,true,false,true,false);zBd(RD(QHd(xYd(a.o),15),19),a.H,null,'eAllGenericSuperTypes',0,-1,h7,true,true,false,false,true,false,true);h=yBd(RD(QHd(uYd(a.o),0),62),a.e,'isSuperTypeOf');cBd(h,a.o,'someClass');yBd(RD(QHd(uYd(a.o),1),62),a.I,'getFeatureCount');h=yBd(RD(QHd(uYd(a.o),2),62),a.bb,EKe);cBd(h,a.I,'featureID');h=yBd(RD(QHd(uYd(a.o),3),62),a.I,FKe);cBd(h,a.bb,GKe);h=yBd(RD(QHd(uYd(a.o),4),62),a.bb,EKe);cBd(h,a._,'featureName');yBd(RD(QHd(uYd(a.o),5),62),a.I,'getOperationCount');h=yBd(RD(QHd(uYd(a.o),6),62),a.T,'getEOperation');cBd(h,a.I,'operationID');h=yBd(RD(QHd(uYd(a.o),7),62),a.I,HKe);cBd(h,a.T,IKe);h=yBd(RD(QHd(uYd(a.o),8),62),a.T,'getOverride');cBd(h,a.T,IKe);h=yBd(RD(QHd(uYd(a.o),9),62),a.H,'getFeatureType');cBd(h,a.bb,GKe);vBd(a.p,i7,SJe,true,false,true);tBd(RD(QHd(xYd(a.p),0),35),a._,'instanceClassName',null,0,1,i7,false,true,true,true,true,false);b=lBd(a.L);c=Vae();WGd((!b.d&&(b.d=new XZd(o7,b,1)),b.d),c);uBd(RD(QHd(xYd(a.p),1),35),b,'instanceClass',i7,true,true,false,true);tBd(RD(QHd(xYd(a.p),2),35),a.M,JKe,null,0,1,i7,true,true,false,false,true,true);tBd(RD(QHd(xYd(a.p),3),35),a._,'instanceTypeName',null,0,1,i7,false,true,true,true,true,false);zBd(RD(QHd(xYd(a.p),4),19),a.U,RD(QHd(xYd(a.U),3),19),'ePackage',0,1,i7,true,false,false,false,true,false,false);zBd(RD(QHd(xYd(a.p),5),19),a.db,null,KKe,0,-1,i7,false,false,true,true,true,false,false);h=yBd(RD(QHd(uYd(a.p),0),62),a.e,LKe);cBd(h,a.M,gve);yBd(RD(QHd(uYd(a.p),1),62),a.I,'getClassifierID');vBd(a.q,k7,'EDataType',false,false,true);tBd(RD(QHd(xYd(a.q),0),35),a.e,'serializable',FGe,0,1,k7,false,false,true,false,true,false);vBd(a.v,m7,'EEnum',false,false,true);zBd(RD(QHd(xYd(a.v),0),19),a.w,RD(QHd(xYd(a.w),3),19),'eLiterals',0,-1,m7,false,false,true,true,false,false,false);h=yBd(RD(QHd(uYd(a.v),0),62),a.w,MKe);cBd(h,a._,GIe);h=yBd(RD(QHd(uYd(a.v),1),62),a.w,MKe);cBd(h,a.I,aIe);h=yBd(RD(QHd(uYd(a.v),2),62),a.w,'getEEnumLiteralByLiteral');cBd(h,a._,'literal');vBd(a.w,l7,TJe,false,false,true);tBd(RD(QHd(xYd(a.w),0),35),a.I,aIe,null,0,1,l7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.w),1),35),a.A,'instance',null,0,1,l7,true,false,true,false,true,false);tBd(RD(QHd(xYd(a.w),2),35),a._,'literal',null,0,1,l7,false,false,true,false,true,false);zBd(RD(QHd(xYd(a.w),3),19),a.v,RD(QHd(xYd(a.v),0),19),'eEnum',0,1,l7,true,false,false,false,false,false,false);vBd(a.B,n7,'EFactory',false,false,true);zBd(RD(QHd(xYd(a.B),0),19),a.U,RD(QHd(xYd(a.U),2),19),'ePackage',1,1,n7,true,false,true,false,false,false,false);h=yBd(RD(QHd(uYd(a.B),0),62),a.S,'create');cBd(h,a.o,'eClass');h=yBd(RD(QHd(uYd(a.B),1),62),a.M,'createFromString');cBd(h,a.q,'eDataType');cBd(h,a._,'literalValue');h=yBd(RD(QHd(uYd(a.B),2),62),a._,'convertToString');cBd(h,a.q,'eDataType');cBd(h,a.M,'instanceValue');vBd(a.Q,p7,DHe,true,false,true);zBd(RD(QHd(xYd(a.Q),0),19),a.a,RD(QHd(xYd(a.a),2),19),'eAnnotations',0,-1,p7,false,false,true,true,false,false,false);h=yBd(RD(QHd(uYd(a.Q),0),62),a.a,'getEAnnotation');cBd(h,a._,bIe);vBd(a.R,q7,EHe,true,false,true);tBd(RD(QHd(xYd(a.R),0),35),a._,GIe,null,0,1,q7,false,false,true,false,true,false);vBd(a.S,r7,'EObject',false,false,true);yBd(RD(QHd(uYd(a.S),0),62),a.o,'eClass');yBd(RD(QHd(uYd(a.S),1),62),a.e,'eIsProxy');yBd(RD(QHd(uYd(a.S),2),62),a.X,'eResource');yBd(RD(QHd(uYd(a.S),3),62),a.S,'eContainer');yBd(RD(QHd(uYd(a.S),4),62),a.bb,'eContainingFeature');yBd(RD(QHd(uYd(a.S),5),62),a.W,'eContainmentFeature');h=yBd(RD(QHd(uYd(a.S),6),62),null,'eContents');b=lBd(a.fb);c=lBd(a.S);WGd((!b.d&&(b.d=new XZd(o7,b,1)),b.d),c);e=XVd(h,b,null);!!e&&e.oj();h=yBd(RD(QHd(uYd(a.S),7),62),null,'eAllContents');b=lBd(a.cb);c=lBd(a.S);WGd((!b.d&&(b.d=new XZd(o7,b,1)),b.d),c);f=XVd(h,b,null);!!f&&f.oj();h=yBd(RD(QHd(uYd(a.S),8),62),null,'eCrossReferences');b=lBd(a.fb);c=lBd(a.S);WGd((!b.d&&(b.d=new XZd(o7,b,1)),b.d),c);g=XVd(h,b,null);!!g&&g.oj();h=yBd(RD(QHd(uYd(a.S),9),62),a.M,'eGet');cBd(h,a.bb,GKe);h=yBd(RD(QHd(uYd(a.S),10),62),a.M,'eGet');cBd(h,a.bb,GKe);cBd(h,a.e,'resolve');h=yBd(RD(QHd(uYd(a.S),11),62),null,'eSet');cBd(h,a.bb,GKe);cBd(h,a.M,'newValue');h=yBd(RD(QHd(uYd(a.S),12),62),a.e,'eIsSet');cBd(h,a.bb,GKe);h=yBd(RD(QHd(uYd(a.S),13),62),null,'eUnset');cBd(h,a.bb,GKe);h=yBd(RD(QHd(uYd(a.S),14),62),a.M,'eInvoke');cBd(h,a.T,IKe);b=lBd(a.fb);c=Vae();WGd((!b.d&&(b.d=new XZd(o7,b,1)),b.d),c);dBd(h,b,'arguments');aBd(h,a.K);vBd(a.T,s7,VJe,false,false,true);zBd(RD(QHd(xYd(a.T),0),19),a.o,RD(QHd(xYd(a.o),3),19),NKe,0,1,s7,true,false,false,false,false,false,false);zBd(RD(QHd(xYd(a.T),1),19),a.db,null,KKe,0,-1,s7,false,false,true,true,true,false,false);zBd(RD(QHd(xYd(a.T),2),19),a.V,RD(QHd(xYd(a.V),0),19),'eParameters',0,-1,s7,false,false,true,true,false,false,false);zBd(RD(QHd(xYd(a.T),3),19),a.p,null,'eExceptions',0,-1,s7,false,false,true,false,true,true,false);zBd(RD(QHd(xYd(a.T),4),19),a.H,null,'eGenericExceptions',0,-1,s7,false,false,true,true,false,true,false);yBd(RD(QHd(uYd(a.T),0),62),a.I,HKe);h=yBd(RD(QHd(uYd(a.T),1),62),a.e,'isOverrideOf');cBd(h,a.T,'someOperation');vBd(a.U,t7,'EPackage',false,false,true);tBd(RD(QHd(xYd(a.U),0),35),a._,'nsURI',null,0,1,t7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.U),1),35),a._,'nsPrefix',null,0,1,t7,false,false,true,false,true,false);zBd(RD(QHd(xYd(a.U),2),19),a.B,RD(QHd(xYd(a.B),0),19),'eFactoryInstance',1,1,t7,true,false,true,false,false,false,false);zBd(RD(QHd(xYd(a.U),3),19),a.p,RD(QHd(xYd(a.p),4),19),'eClassifiers',0,-1,t7,false,false,true,true,true,false,false);zBd(RD(QHd(xYd(a.U),4),19),a.U,RD(QHd(xYd(a.U),5),19),'eSubpackages',0,-1,t7,false,false,true,true,true,false,false);zBd(RD(QHd(xYd(a.U),5),19),a.U,RD(QHd(xYd(a.U),4),19),'eSuperPackage',0,1,t7,true,false,false,false,true,false,false);h=yBd(RD(QHd(uYd(a.U),0),62),a.p,'getEClassifier');cBd(h,a._,GIe);vBd(a.V,u7,WJe,false,false,true);zBd(RD(QHd(xYd(a.V),0),19),a.T,RD(QHd(xYd(a.T),2),19),'eOperation',0,1,u7,true,false,false,false,false,false,false);vBd(a.W,v7,XJe,false,false,true);tBd(RD(QHd(xYd(a.W),0),35),a.e,'containment',null,0,1,v7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.W),1),35),a.e,'container',null,0,1,v7,true,true,false,false,true,true);tBd(RD(QHd(xYd(a.W),2),35),a.e,'resolveProxies',FGe,0,1,v7,false,false,true,false,true,false);zBd(RD(QHd(xYd(a.W),3),19),a.W,null,'eOpposite',0,1,v7,false,false,true,false,true,false,false);zBd(RD(QHd(xYd(a.W),4),19),a.o,null,'eReferenceType',1,1,v7,true,true,false,false,true,false,true);zBd(RD(QHd(xYd(a.W),5),19),a.b,null,'eKeys',0,-1,v7,false,false,true,false,true,false,false);vBd(a.bb,y7,QJe,true,false,true);tBd(RD(QHd(xYd(a.bb),0),35),a.e,'changeable',FGe,0,1,y7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.bb),1),35),a.e,'volatile',null,0,1,y7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.bb),2),35),a.e,'transient',null,0,1,y7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.bb),3),35),a._,'defaultValueLiteral',null,0,1,y7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.bb),4),35),a.M,JKe,null,0,1,y7,true,true,false,false,true,true);tBd(RD(QHd(xYd(a.bb),5),35),a.e,'unsettable',null,0,1,y7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.bb),6),35),a.e,'derived',null,0,1,y7,false,false,true,false,true,false);zBd(RD(QHd(xYd(a.bb),7),19),a.o,RD(QHd(xYd(a.o),13),19),NKe,0,1,y7,true,false,false,false,false,false,false);yBd(RD(QHd(uYd(a.bb),0),62),a.I,FKe);h=yBd(RD(QHd(uYd(a.bb),1),62),null,'getContainerClass');b=lBd(a.L);c=Vae();WGd((!b.d&&(b.d=new XZd(o7,b,1)),b.d),c);d=XVd(h,b,null);!!d&&d.oj();vBd(a.eb,A7,PJe,true,false,true);tBd(RD(QHd(xYd(a.eb),0),35),a.e,'ordered',FGe,0,1,A7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.eb),1),35),a.e,'unique',FGe,0,1,A7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.eb),2),35),a.I,'lowerBound',null,0,1,A7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.eb),3),35),a.I,'upperBound','1',0,1,A7,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.eb),4),35),a.e,'many',null,0,1,A7,true,true,false,false,true,true);tBd(RD(QHd(xYd(a.eb),5),35),a.e,'required',null,0,1,A7,true,true,false,false,true,true);zBd(RD(QHd(xYd(a.eb),6),19),a.p,null,'eType',0,1,A7,false,true,true,false,true,true,false);zBd(RD(QHd(xYd(a.eb),7),19),a.H,null,'eGenericType',0,1,A7,false,true,true,true,false,true,false);vBd(a.ab,UK,'EStringToStringMapEntry',false,false,false);tBd(RD(QHd(xYd(a.ab),0),35),a._,'key',null,0,1,UK,false,false,true,false,true,false);tBd(RD(QHd(xYd(a.ab),1),35),a._,aIe,null,0,1,UK,false,false,true,false,true,false);vBd(a.H,o7,UJe,false,false,true);zBd(RD(QHd(xYd(a.H),0),19),a.H,null,'eUpperBound',0,1,o7,false,false,true,true,false,false,false);zBd(RD(QHd(xYd(a.H),1),19),a.H,null,'eTypeArguments',0,-1,o7,false,false,true,true,false,false,false);zBd(RD(QHd(xYd(a.H),2),19),a.p,null,'eRawType',1,1,o7,true,false,false,false,true,false,true);zBd(RD(QHd(xYd(a.H),3),19),a.H,null,'eLowerBound',0,1,o7,false,false,true,true,false,false,false);zBd(RD(QHd(xYd(a.H),4),19),a.db,null,'eTypeParameter',0,1,o7,false,false,true,false,false,false,false);zBd(RD(QHd(xYd(a.H),5),19),a.p,null,'eClassifier',0,1,o7,false,false,true,false,true,false,false);h=yBd(RD(QHd(uYd(a.H),0),62),a.e,LKe);cBd(h,a.M,gve);vBd(a.db,z7,YJe,false,false,true);zBd(RD(QHd(xYd(a.db),0),19),a.H,null,'eBounds',0,-1,z7,false,false,true,true,false,false,false);xBd(a.c,tJ,'EBigDecimal',true);xBd(a.d,uJ,'EBigInteger',true);xBd(a.e,xdb,'EBoolean',true);xBd(a.f,QI,'EBooleanObject',true);xBd(a.i,gE,'EByte',true);xBd(a.g,WC(gE,1),'EByteArray',true);xBd(a.j,RI,'EByteObject',true);xBd(a.k,hE,'EChar',true);xBd(a.n,SI,'ECharacterObject',true);xBd(a.r,qK,'EDate',true);xBd(a.s,T6,'EDiagnosticChain',false);xBd(a.t,iE,'EDouble',true);xBd(a.u,VI,'EDoubleObject',true);xBd(a.fb,Y6,'EEList',false);xBd(a.A,Z6,'EEnumerator',false);xBd(a.C,Tbb,'EFeatureMap',false);xBd(a.D,Jbb,'EFeatureMapEntry',false);xBd(a.F,jE,'EFloat',true);xBd(a.G,ZI,'EFloatObject',true);xBd(a.I,kE,'EInt',true);xBd(a.J,bJ,'EIntegerObject',true);xBd(a.L,UI,'EJavaClass',true);xBd(a.M,jJ,'EJavaObject',true);xBd(a.N,lE,'ELong',true);xBd(a.O,eJ,'ELongObject',true);xBd(a.P,VK,'EMap',false);xBd(a.X,Aab,'EResource',false);xBd(a.Y,zab,'EResourceSet',false);xBd(a.Z,wdb,'EShort',true);xBd(a.$,lJ,'EShortObject',true);xBd(a._,qJ,'EString',true);xBd(a.cb,a7,'ETreeIterator',false);xBd(a.K,$6,'EInvocationTargetException',false);pBd(a,AKe)} +var gve='object',hve='boolean',ive='number',jve='string',kve='function',lve=2147483647,mve='java.lang',nve={3:1},ove='com.google.common.base',pve=', ',qve='%s (%s) must not be negative',rve={3:1,4:1,5:1},sve='negative size: ',tve='no calls to next() since the last call to remove()',uve='Optional.of(',vve='null',wve={204:1,51:1},xve='com.google.common.collect',yve={204:1,51:1,128:1},zve={229:1,3:1},Ave={51:1},Bve='java.util',Cve={85:1},Dve={20:1,31:1,16:1},Eve=2063,Fve={20:1,31:1,16:1,21:1},Gve={85:1,139:1,133:1},Hve={20:1,31:1,16:1,21:1,87:1},Ive={20:1,31:1,16:1,277:1,21:1,87:1},Jve={51:1,128:1},Kve={358:1,44:1},Lve='AbstractMapEntry',Mve='expectedValuesPerKey',Nve={3:1,6:1,4:1,5:1},Ove=16384,Pve={159:1},Qve={41:1},Rve={202:1},Sve={l:4194303,m:4194303,h:524287},Tve={253:1,3:1,34:1},Uve='range unbounded on this side',Vve={20:1},Wve={20:1,16:1},Xve={3:1,20:1,31:1,16:1},Yve={307:1,3:1,20:1,31:1,16:1,15:1,59:1},Zve={3:1,4:1,5:1,173:1},$ve={3:1,85:1},_ve={20:1,16:1,21:1},awe={3:1,20:1,31:1,16:1,21:1},bwe={20:1,16:1,21:1,87:1},cwe=461845907,dwe=-862048943,ewe={3:1,6:1,4:1,5:1,173:1},fwe='expectedSize',gwe=1024,hwe=1073741824,iwe='initialArraySize',jwe={3:1,6:1,4:1,9:1,5:1},kwe={20:1,31:1,56:1,16:1,15:1},lwe='arraySize',mwe={20:1,31:1,56:1,16:1,15:1,59:1},nwe={46:1},owe={380:1},pwe=1.0E-4,qwe=-2147483648,rwe='__noinit__',swe={3:1,103:1,63:1,82:1},twe='com.google.gwt.core.client.impl',uwe='String',vwe='com.google.gwt.core.client',wwe='anonymous',xwe='fnStack',ywe='Unknown',zwe={201:1,3:1,4:1},Awe=1000,Bwe=65535,Cwe='January',Dwe='February',Ewe='March',Fwe='April',Gwe='May',Hwe='June',Iwe='July',Jwe='August',Kwe='September',Lwe='October',Mwe='November',Nwe='December',Owe=1900,Pwe={53:1,3:1,4:1},Qwe='Before Christ',Rwe='Anno Domini',Swe='Sunday',Twe='Monday',Uwe='Tuesday',Vwe='Wednesday',Wwe='Thursday',Xwe='Friday',Ywe='Saturday',Zwe='com.google.gwt.i18n.shared',$we='DateTimeFormat',_we='com.google.gwt.i18n.client',axe='DefaultDateTimeFormatInfo',bxe={3:1,4:1,34:1,206:1},cxe='com.google.gwt.json.client',dxe=4194303,exe=1048575,fxe=524288,gxe=4194304,hxe=17592186044416,ixe=1000000000,jxe=-17592186044416,kxe='java.io',lxe={3:1,103:1,77:1,63:1,82:1},mxe={3:1,296:1,82:1},nxe='For input string: "',oxe=Infinity,pxe=-Infinity,qxe=4096,rxe={3:1,4:1,376:1},sxe='org.eclipse.elk.layered',txe=65536,uxe=55296,vxe={109:1,3:1,4:1},wxe=100000,xxe=0.3010299956639812,yxe=4294967295,zxe='0.0',Axe={44:1},Bxe='Unable to add element to queue',Cxe={3:1,4:1,20:1,31:1,56:1,13:1,16:1,15:1,59:1},Dxe={3:1,20:1,31:1,56:1,16:1,15:1,59:1},Exe={20:1,16:1,15:1},Fxe={3:1,50:1},Gxe={189:1},Hxe={3:1,4:1,85:1},Ixe={3:1,4:1,20:1,31:1,16:1,49:1,21:1},Jxe='delete',Kxe=1.4901161193847656E-8,Lxe=1.1102230246251565E-16,Mxe=15525485,Nxe=5.9604644775390625E-8,Oxe=16777216,Pxe=16777215,Qxe=', length: ',Rxe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1},Sxe='subMap: ',Txe=' less than ',Uxe={3:1,34:1,22:1,304:1},Vxe='java.util.function',Wxe='java.util.logging',Xxe={3:1,4:1,5:1,856:1},Yxe='undefined',Zxe='java.util.stream',$xe={533:1,687:1},_xe='fromIndex: ',aye=' > toIndex: ',bye=', toIndex: ',cye='Index: ',dye=', Size: ',eye='org.eclipse.elk.alg.common',fye={50:1},gye='org.eclipse.elk.alg.common.compaction',hye='Scanline/EventHandler',iye='org.eclipse.elk.alg.common.compaction.oned',jye='CNode belongs to another CGroup.',kye='ISpacingsHandler/1',lye='The ',mye=' instance has been finished already.',nye='The direction ',oye=' is not supported by the CGraph instance.',pye='OneDimensionalCompactor',qye='OneDimensionalCompactor/lambda$0$Type',rye='Quadruplet',sye='ScanlineConstraintCalculator',tye='ScanlineConstraintCalculator/ConstraintsScanlineHandler',uye='ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type',vye='ScanlineConstraintCalculator/Timestamp',wye='ScanlineConstraintCalculator/lambda$0$Type',xye={178:1,46:1},yye='org.eclipse.elk.alg.common.compaction.options',zye='org.eclipse.elk.core.data',Aye='org.eclipse.elk.polyomino.traversalStrategy',Bye='org.eclipse.elk.polyomino.lowLevelSort',Cye='org.eclipse.elk.polyomino.highLevelSort',Dye='org.eclipse.elk.polyomino.fill',Eye={134:1},Fye='polyomino',Gye='org.eclipse.elk.alg.common.networksimplex',Hye={183:1,3:1,4:1},Iye='org.eclipse.elk.alg.common.nodespacing',Jye='org.eclipse.elk.alg.common.nodespacing.cellsystem',Kye='CENTER',Lye={217:1,336:1},Mye={3:1,4:1,5:1,603:1},Nye='LEFT',Oye='RIGHT',Pye='Vertical alignment cannot be null',Qye='BOTTOM',Rye='org.eclipse.elk.alg.common.nodespacing.internal',Sye='UNDEFINED',Tye=0.01,Uye='org.eclipse.elk.alg.common.nodespacing.internal.algorithm',Vye='LabelPlacer/lambda$0$Type',Wye='LabelPlacer/lambda$1$Type',Xye='portRatioOrPosition',Yye='org.eclipse.elk.alg.common.overlaps',Zye='DOWN',$ye='org.eclipse.elk.alg.common.polyomino',_ye='NORTH',aze='EAST',bze='SOUTH',cze='WEST',dze='org.eclipse.elk.alg.common.polyomino.structures',eze='Direction',fze='Grid is only of size ',gze='. Requested point (',hze=') is out of bounds.',ize=' Given center based coordinates were (',jze='org.eclipse.elk.graph.properties',kze='IPropertyHolder',lze={3:1,96:1,137:1},mze='org.eclipse.elk.alg.common.spore',nze='org.eclipse.elk.alg.common.utils',oze={205:1},pze='org.eclipse.elk.core',qze='Connected Components Compaction',rze='org.eclipse.elk.alg.disco',sze='org.eclipse.elk.alg.disco.graph',tze='org.eclipse.elk.alg.disco.options',uze='CompactionStrategy',vze='org.eclipse.elk.disco.componentCompaction.strategy',wze='org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm',xze='org.eclipse.elk.disco.debug.discoGraph',yze='org.eclipse.elk.disco.debug.discoPolys',zze='componentCompaction',Aze='org.eclipse.elk.disco',Bze='org.eclipse.elk.spacing.componentComponent',Cze='org.eclipse.elk.edge.thickness',Dze='org.eclipse.elk.aspectRatio',Eze='org.eclipse.elk.padding',Fze='org.eclipse.elk.alg.disco.transform',Gze=1.5707963267948966,Hze=1.7976931348623157E308,Ize={3:1,4:1,5:1,198:1},Jze={3:1,6:1,4:1,5:1,100:1,115:1},Kze='org.eclipse.elk.alg.force',Lze='ComponentsProcessor',Mze='ComponentsProcessor/1',Nze='ElkGraphImporter/lambda$0$Type',Oze='org.eclipse.elk.alg.force.graph',Pze='Component Layout',Qze='org.eclipse.elk.alg.force.model',Rze='org.eclipse.elk.force.model',Sze='org.eclipse.elk.force.iterations',Tze='org.eclipse.elk.force.repulsivePower',Uze='org.eclipse.elk.force.temperature',Vze=0.001,Wze='org.eclipse.elk.force.repulsion',Xze='org.eclipse.elk.alg.force.options',Yze=1.600000023841858,Zze='org.eclipse.elk.force',$ze='org.eclipse.elk.priority',_ze='org.eclipse.elk.spacing.nodeNode',aAe='org.eclipse.elk.spacing.edgeLabel',bAe='org.eclipse.elk.randomSeed',cAe='org.eclipse.elk.separateConnectedComponents',dAe='org.eclipse.elk.interactive',eAe='org.eclipse.elk.portConstraints',fAe='org.eclipse.elk.edgeLabels.inline',gAe='org.eclipse.elk.omitNodeMicroLayout',hAe='org.eclipse.elk.nodeSize.fixedGraphSize',iAe='org.eclipse.elk.nodeSize.options',jAe='org.eclipse.elk.nodeSize.constraints',kAe='org.eclipse.elk.nodeLabels.placement',lAe='org.eclipse.elk.portLabels.placement',mAe='org.eclipse.elk.topdownLayout',nAe='org.eclipse.elk.topdown.scaleFactor',oAe='org.eclipse.elk.topdown.hierarchicalNodeWidth',pAe='org.eclipse.elk.topdown.hierarchicalNodeAspectRatio',qAe='org.eclipse.elk.topdown.nodeType',rAe='origin',sAe='random',tAe='boundingBox.upLeft',uAe='boundingBox.lowRight',vAe='org.eclipse.elk.stress.fixed',wAe='org.eclipse.elk.stress.desiredEdgeLength',xAe='org.eclipse.elk.stress.dimension',yAe='org.eclipse.elk.stress.epsilon',zAe='org.eclipse.elk.stress.iterationLimit',AAe='org.eclipse.elk.stress',BAe='ELK Stress',CAe='org.eclipse.elk.nodeSize.minimum',DAe='org.eclipse.elk.alg.force.stress',EAe='Layered layout',FAe='org.eclipse.elk.alg.layered',GAe='org.eclipse.elk.alg.layered.compaction.components',HAe='org.eclipse.elk.alg.layered.compaction.oned',IAe='org.eclipse.elk.alg.layered.compaction.oned.algs',JAe='org.eclipse.elk.alg.layered.compaction.recthull',KAe='org.eclipse.elk.alg.layered.components',LAe='NONE',MAe='MODEL_ORDER',NAe={3:1,6:1,4:1,9:1,5:1,126:1},OAe={3:1,6:1,4:1,5:1,150:1,100:1,115:1},PAe='org.eclipse.elk.alg.layered.compound',QAe={47:1},RAe='org.eclipse.elk.alg.layered.graph',SAe=' -> ',TAe='Not supported by LGraph',UAe='Port side is undefined',VAe={3:1,6:1,4:1,5:1,483:1,150:1,100:1,115:1},WAe={3:1,6:1,4:1,5:1,150:1,199:1,210:1,100:1,115:1},XAe={3:1,6:1,4:1,5:1,150:1,2042:1,210:1,100:1,115:1},YAe='([{"\' \t\r\n',ZAe=')]}"\' \t\r\n',$Ae='The given string contains parts that cannot be parsed as numbers.',_Ae='org.eclipse.elk.core.math',aBe={3:1,4:1,140:1,214:1,423:1},bBe={3:1,4:1,107:1,214:1,423:1},cBe='org.eclipse.elk.alg.layered.graph.transform',dBe='ElkGraphImporter',eBe='ElkGraphImporter/lambda$1$Type',fBe='ElkGraphImporter/lambda$2$Type',gBe='ElkGraphImporter/lambda$4$Type',hBe='org.eclipse.elk.alg.layered.intermediate',iBe='Node margin calculation',jBe='ONE_SIDED_GREEDY_SWITCH',kBe='TWO_SIDED_GREEDY_SWITCH',lBe='No implementation is available for the layout processor ',mBe='IntermediateProcessorStrategy',nBe="Node '",oBe='FIRST_SEPARATE',pBe='LAST_SEPARATE',qBe='Odd port side processing',rBe='org.eclipse.elk.alg.layered.intermediate.compaction',sBe='org.eclipse.elk.alg.layered.intermediate.greedyswitch',tBe='org.eclipse.elk.alg.layered.p3order.counting',uBe={230:1},vBe='org.eclipse.elk.alg.layered.intermediate.loops',wBe='org.eclipse.elk.alg.layered.intermediate.loops.ordering',xBe='org.eclipse.elk.alg.layered.intermediate.loops.routing',yBe='org.eclipse.elk.alg.layered.intermediate.preserveorder',zBe='org.eclipse.elk.alg.layered.intermediate.wrapping',ABe='org.eclipse.elk.alg.layered.options',BBe='INTERACTIVE',CBe='GREEDY',DBe='DEPTH_FIRST',EBe='EDGE_LENGTH',FBe='SELF_LOOPS',GBe='firstTryWithInitialOrder',HBe='org.eclipse.elk.layered.directionCongruency',IBe='org.eclipse.elk.layered.feedbackEdges',JBe='org.eclipse.elk.layered.interactiveReferencePoint',KBe='org.eclipse.elk.layered.mergeEdges',LBe='org.eclipse.elk.layered.mergeHierarchyEdges',MBe='org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides',NBe='org.eclipse.elk.layered.portSortingStrategy',OBe='org.eclipse.elk.layered.thoroughness',PBe='org.eclipse.elk.layered.unnecessaryBendpoints',QBe='org.eclipse.elk.layered.generatePositionAndLayerIds',RBe='org.eclipse.elk.layered.cycleBreaking.strategy',SBe='org.eclipse.elk.layered.layering.strategy',TBe='org.eclipse.elk.layered.layering.layerConstraint',UBe='org.eclipse.elk.layered.layering.layerChoiceConstraint',VBe='org.eclipse.elk.layered.layering.layerId',WBe='org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth',XBe='org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor',YBe='org.eclipse.elk.layered.layering.nodePromotion.strategy',ZBe='org.eclipse.elk.layered.layering.nodePromotion.maxIterations',$Be='org.eclipse.elk.layered.layering.coffmanGraham.layerBound',_Be='org.eclipse.elk.layered.crossingMinimization.strategy',aCe='org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder',bCe='org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness',cCe='org.eclipse.elk.layered.crossingMinimization.semiInteractive',dCe='org.eclipse.elk.layered.crossingMinimization.inLayerPredOf',eCe='org.eclipse.elk.layered.crossingMinimization.inLayerSuccOf',fCe='org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint',gCe='org.eclipse.elk.layered.crossingMinimization.positionId',hCe='org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold',iCe='org.eclipse.elk.layered.crossingMinimization.greedySwitch.type',jCe='org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type',kCe='org.eclipse.elk.layered.nodePlacement.strategy',lCe='org.eclipse.elk.layered.nodePlacement.favorStraightEdges',mCe='org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening',nCe='org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment',oCe='org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening',pCe='org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility',qCe='org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default',rCe='org.eclipse.elk.layered.edgeRouting.selfLoopDistribution',sCe='org.eclipse.elk.layered.edgeRouting.selfLoopOrdering',tCe='org.eclipse.elk.layered.edgeRouting.splines.mode',uCe='org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor',vCe='org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth',wCe='org.eclipse.elk.layered.spacing.baseValue',xCe='org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers',yCe='org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers',zCe='org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers',ACe='org.eclipse.elk.layered.priority.direction',BCe='org.eclipse.elk.layered.priority.shortness',CCe='org.eclipse.elk.layered.priority.straightness',DCe='org.eclipse.elk.layered.compaction.connectedComponents',ECe='org.eclipse.elk.layered.compaction.postCompaction.strategy',FCe='org.eclipse.elk.layered.compaction.postCompaction.constraints',GCe='org.eclipse.elk.layered.highDegreeNodes.treatment',HCe='org.eclipse.elk.layered.highDegreeNodes.threshold',ICe='org.eclipse.elk.layered.highDegreeNodes.treeHeight',JCe='org.eclipse.elk.layered.wrapping.strategy',KCe='org.eclipse.elk.layered.wrapping.additionalEdgeSpacing',LCe='org.eclipse.elk.layered.wrapping.correctionFactor',MCe='org.eclipse.elk.layered.wrapping.cutting.strategy',NCe='org.eclipse.elk.layered.wrapping.cutting.cuts',OCe='org.eclipse.elk.layered.wrapping.cutting.msd.freedom',PCe='org.eclipse.elk.layered.wrapping.validify.strategy',QCe='org.eclipse.elk.layered.wrapping.validify.forbiddenIndices',RCe='org.eclipse.elk.layered.wrapping.multiEdge.improveCuts',SCe='org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty',TCe='org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges',UCe='org.eclipse.elk.layered.edgeLabels.sideSelection',VCe='org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy',WCe='org.eclipse.elk.layered.considerModelOrder.strategy',XCe='org.eclipse.elk.layered.considerModelOrder.portModelOrder',YCe='org.eclipse.elk.layered.considerModelOrder.noModelOrder',ZCe='org.eclipse.elk.layered.considerModelOrder.components',$Ce='org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy',_Ce='org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence',aDe='org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence',bDe='layering',cDe='layering.minWidth',dDe='layering.nodePromotion',eDe='crossingMinimization',fDe='org.eclipse.elk.hierarchyHandling',gDe='crossingMinimization.greedySwitch',hDe='nodePlacement',iDe='nodePlacement.bk',jDe='edgeRouting',kDe='org.eclipse.elk.edgeRouting',lDe='spacing',mDe='priority',nDe='compaction',oDe='compaction.postCompaction',pDe='Specifies whether and how post-process compaction is applied.',qDe='highDegreeNodes',rDe='wrapping',sDe='wrapping.cutting',tDe='wrapping.validify',uDe='wrapping.multiEdge',vDe='edgeLabels',wDe='considerModelOrder',xDe='org.eclipse.elk.spacing.commentComment',yDe='org.eclipse.elk.spacing.commentNode',zDe='org.eclipse.elk.spacing.edgeEdge',ADe='org.eclipse.elk.spacing.edgeNode',BDe='org.eclipse.elk.spacing.labelLabel',CDe='org.eclipse.elk.spacing.labelPortHorizontal',DDe='org.eclipse.elk.spacing.labelPortVertical',EDe='org.eclipse.elk.spacing.labelNode',FDe='org.eclipse.elk.spacing.nodeSelfLoop',GDe='org.eclipse.elk.spacing.portPort',HDe='org.eclipse.elk.spacing.individual',IDe='org.eclipse.elk.port.borderOffset',JDe='org.eclipse.elk.noLayout',KDe='org.eclipse.elk.port.side',LDe='org.eclipse.elk.debugMode',MDe='org.eclipse.elk.alignment',NDe='org.eclipse.elk.insideSelfLoops.activate',ODe='org.eclipse.elk.insideSelfLoops.yo',PDe='org.eclipse.elk.direction',QDe='org.eclipse.elk.nodeLabels.padding',RDe='org.eclipse.elk.portLabels.nextToPortIfPossible',SDe='org.eclipse.elk.portLabels.treatAsGroup',TDe='org.eclipse.elk.portAlignment.default',UDe='org.eclipse.elk.portAlignment.north',VDe='org.eclipse.elk.portAlignment.south',WDe='org.eclipse.elk.portAlignment.west',XDe='org.eclipse.elk.portAlignment.east',YDe='org.eclipse.elk.contentAlignment',ZDe='org.eclipse.elk.junctionPoints',$De='org.eclipse.elk.edgeLabels.placement',_De='org.eclipse.elk.port.index',aEe='org.eclipse.elk.commentBox',bEe='org.eclipse.elk.hypernode',cEe='org.eclipse.elk.port.anchor',dEe='org.eclipse.elk.partitioning.activate',eEe='org.eclipse.elk.partitioning.partition',fEe='org.eclipse.elk.position',gEe='org.eclipse.elk.margins',hEe='org.eclipse.elk.spacing.portsSurrounding',iEe='org.eclipse.elk.interactiveLayout',jEe='org.eclipse.elk.core.util',kEe={3:1,4:1,5:1,601:1},lEe='NETWORK_SIMPLEX',mEe='SIMPLE',nEe={106:1,47:1},oEe='org.eclipse.elk.alg.layered.p1cycles',pEe='org.eclipse.elk.alg.layered.p2layers',qEe={413:1,230:1},rEe={846:1,3:1,4:1},sEe='org.eclipse.elk.alg.layered.p3order',tEe='org.eclipse.elk.alg.layered.p4nodes',uEe={3:1,4:1,5:1,854:1},vEe=1.0E-5,wEe='org.eclipse.elk.alg.layered.p4nodes.bk',xEe='org.eclipse.elk.alg.layered.p5edges',yEe='org.eclipse.elk.alg.layered.p5edges.orthogonal',zEe='org.eclipse.elk.alg.layered.p5edges.orthogonal.direction',AEe=1.0E-6,BEe='org.eclipse.elk.alg.layered.p5edges.splines',CEe=0.09999999999999998,DEe=1.0E-8,EEe=4.71238898038469,FEe=3.141592653589793,GEe='org.eclipse.elk.alg.mrtree',HEe=0.10000000149011612,IEe='SUPER_ROOT',JEe='org.eclipse.elk.alg.mrtree.graph',KEe=-1.7976931348623157E308,LEe='org.eclipse.elk.alg.mrtree.intermediate',MEe='Processor compute fanout',NEe={3:1,6:1,4:1,5:1,534:1,100:1,115:1},OEe='Set neighbors in level',PEe='org.eclipse.elk.alg.mrtree.options',QEe='DESCENDANTS',REe='org.eclipse.elk.mrtree.compaction',SEe='org.eclipse.elk.mrtree.edgeEndTextureLength',TEe='org.eclipse.elk.mrtree.treeLevel',UEe='org.eclipse.elk.mrtree.positionConstraint',VEe='org.eclipse.elk.mrtree.weighting',WEe='org.eclipse.elk.mrtree.edgeRoutingMode',XEe='org.eclipse.elk.mrtree.searchOrder',YEe='Position Constraint',ZEe='org.eclipse.elk.mrtree',$Ee='org.eclipse.elk.tree',_Ee='Processor arrange level',aFe='org.eclipse.elk.alg.mrtree.p2order',bFe='org.eclipse.elk.alg.mrtree.p4route',cFe='org.eclipse.elk.alg.radial',dFe=6.283185307179586,eFe='Before',fFe=4.9E-324,gFe='After',hFe='org.eclipse.elk.alg.radial.intermediate',iFe='COMPACTION',jFe='org.eclipse.elk.alg.radial.intermediate.compaction',kFe={3:1,4:1,5:1,100:1},lFe='org.eclipse.elk.alg.radial.intermediate.optimization',mFe='No implementation is available for the layout option ',nFe='org.eclipse.elk.alg.radial.options',oFe='org.eclipse.elk.radial.centerOnRoot',pFe='org.eclipse.elk.radial.orderId',qFe='org.eclipse.elk.radial.radius',rFe='org.eclipse.elk.radial.rotate',sFe='org.eclipse.elk.radial.compactor',tFe='org.eclipse.elk.radial.compactionStepSize',uFe='org.eclipse.elk.radial.sorter',vFe='org.eclipse.elk.radial.wedgeCriteria',wFe='org.eclipse.elk.radial.optimizationCriteria',xFe='org.eclipse.elk.radial.rotation.targetAngle',yFe='org.eclipse.elk.radial.rotation.computeAdditionalWedgeSpace',zFe='org.eclipse.elk.radial.rotation.outgoingEdgeAngles',AFe='Compaction',BFe='rotation',CFe='org.eclipse.elk.radial',DFe='org.eclipse.elk.alg.radial.p1position.wedge',EFe='org.eclipse.elk.alg.radial.sorting',FFe=5.497787143782138,GFe=3.9269908169872414,HFe=2.356194490192345,IFe='org.eclipse.elk.alg.rectpacking',JFe='org.eclipse.elk.alg.rectpacking.intermediate',KFe='org.eclipse.elk.alg.rectpacking.options',LFe='org.eclipse.elk.rectpacking.trybox',MFe='org.eclipse.elk.rectpacking.currentPosition',NFe='org.eclipse.elk.rectpacking.desiredPosition',OFe='org.eclipse.elk.rectpacking.inNewRow',PFe='org.eclipse.elk.rectpacking.widthApproximation.strategy',QFe='org.eclipse.elk.rectpacking.widthApproximation.targetWidth',RFe='org.eclipse.elk.rectpacking.widthApproximation.optimizationGoal',SFe='org.eclipse.elk.rectpacking.widthApproximation.lastPlaceShift',TFe='org.eclipse.elk.rectpacking.packing.strategy',UFe='org.eclipse.elk.rectpacking.packing.compaction.rowHeightReevaluation',VFe='org.eclipse.elk.rectpacking.packing.compaction.iterations',WFe='org.eclipse.elk.rectpacking.whiteSpaceElimination.strategy',XFe='widthApproximation',YFe='Compaction Strategy',ZFe='packing.compaction',$Fe='org.eclipse.elk.rectpacking',_Fe='org.eclipse.elk.alg.rectpacking.p1widthapproximation',aGe='org.eclipse.elk.alg.rectpacking.p2packing',bGe='No Compaction',cGe='org.eclipse.elk.alg.rectpacking.p3whitespaceelimination',dGe='org.eclipse.elk.alg.rectpacking.util',eGe='No implementation available for ',fGe='org.eclipse.elk.alg.spore',gGe='org.eclipse.elk.alg.spore.options',hGe='org.eclipse.elk.sporeCompaction',iGe='org.eclipse.elk.underlyingLayoutAlgorithm',jGe='org.eclipse.elk.processingOrder.treeConstruction',kGe='org.eclipse.elk.processingOrder.spanningTreeCostFunction',lGe='org.eclipse.elk.processingOrder.preferredRoot',mGe='org.eclipse.elk.processingOrder.rootSelection',nGe='org.eclipse.elk.structure.structureExtractionStrategy',oGe='org.eclipse.elk.compaction.compactionStrategy',pGe='org.eclipse.elk.compaction.orthogonal',qGe='org.eclipse.elk.overlapRemoval.maxIterations',rGe='org.eclipse.elk.overlapRemoval.runScanline',sGe='processingOrder',tGe='overlapRemoval',uGe='org.eclipse.elk.sporeOverlap',vGe='org.eclipse.elk.alg.spore.p1structure',wGe='org.eclipse.elk.alg.spore.p2processingorder',xGe='org.eclipse.elk.alg.spore.p3execution',yGe='Topdown Layout',zGe='Invalid index: ',AGe='org.eclipse.elk.core.alg',BGe={341:1},CGe={295:1},DGe='Make sure its type is registered with the ',EGe=' utility class.',FGe='true',GGe='false',HGe="Couldn't clone property '",IGe=0.05,JGe='org.eclipse.elk.core.options',KGe=1.2999999523162842,LGe='org.eclipse.elk.box',MGe='org.eclipse.elk.expandNodes',NGe='org.eclipse.elk.box.packingMode',OGe='org.eclipse.elk.algorithm',PGe='org.eclipse.elk.resolvedAlgorithm',QGe='org.eclipse.elk.bendPoints',RGe='org.eclipse.elk.labelManager',SGe='org.eclipse.elk.scaleFactor',TGe='org.eclipse.elk.childAreaWidth',UGe='org.eclipse.elk.childAreaHeight',VGe='org.eclipse.elk.animate',WGe='org.eclipse.elk.animTimeFactor',XGe='org.eclipse.elk.layoutAncestors',YGe='org.eclipse.elk.maxAnimTime',ZGe='org.eclipse.elk.minAnimTime',$Ge='org.eclipse.elk.progressBar',_Ge='org.eclipse.elk.validateGraph',aHe='org.eclipse.elk.validateOptions',bHe='org.eclipse.elk.zoomToFit',cHe='org.eclipse.elk.font.name',dHe='org.eclipse.elk.font.size',eHe='org.eclipse.elk.topdown.sizeApproximator',fHe='org.eclipse.elk.topdown.scaleCap',gHe='org.eclipse.elk.edge.type',hHe='partitioning',iHe='nodeLabels',jHe='portAlignment',kHe='nodeSize',lHe='port',mHe='portLabels',nHe='topdown',oHe='insideSelfLoops',pHe='org.eclipse.elk.fixed',qHe='org.eclipse.elk.random',rHe={3:1,34:1,22:1,347:1},sHe='port must have a parent node to calculate the port side',tHe='The edge needs to have exactly one edge section. Found: ',uHe='org.eclipse.elk.core.util.adapters',vHe='org.eclipse.emf.ecore',wHe='org.eclipse.elk.graph',xHe='EMapPropertyHolder',yHe='ElkBendPoint',zHe='ElkGraphElement',AHe='ElkConnectableShape',BHe='ElkEdge',CHe='ElkEdgeSection',DHe='EModelElement',EHe='ENamedElement',FHe='ElkLabel',GHe='ElkNode',HHe='ElkPort',IHe={94:1,93:1},JHe='org.eclipse.emf.common.notify.impl',KHe="The feature '",LHe="' is not a valid changeable feature",MHe='Expecting null',NHe="' is not a valid feature",OHe='The feature ID',PHe=' is not a valid feature ID',QHe=32768,RHe={110:1,94:1,93:1,58:1,54:1,99:1},SHe='org.eclipse.emf.ecore.impl',THe='org.eclipse.elk.graph.impl',UHe='Recursive containment not allowed for ',VHe="The datatype '",WHe="' is not a valid classifier",XHe="The value '",YHe={195:1,3:1,4:1},ZHe="The class '",$He='http://www.eclipse.org/elk/ElkGraph',_He='property',aIe='value',bIe='source',cIe='properties',dIe='identifier',eIe='height',fIe='width',gIe='parent',hIe='text',iIe='children',jIe='hierarchical',kIe='sources',lIe='targets',mIe='sections',nIe='bendPoints',oIe='outgoingShape',pIe='incomingShape',qIe='outgoingSections',rIe='incomingSections',sIe='org.eclipse.emf.common.util',tIe='Severe implementation error in the Json to ElkGraph importer.',uIe='id',vIe='org.eclipse.elk.graph.json',wIe='Unhandled parameter types: ',xIe='startPoint',yIe="An edge must have at least one source and one target (edge id: '",zIe="').",AIe='Referenced edge section does not exist: ',BIe=" (edge id: '",CIe='target',DIe='sourcePoint',EIe='targetPoint',FIe='group',GIe='name',HIe='connectableShape cannot be null',IIe='edge cannot be null',JIe="Passed edge is not 'simple'.",KIe='org.eclipse.elk.graph.util',LIe="The 'no duplicates' constraint is violated",MIe='targetIndex=',NIe=', size=',OIe='sourceIndex=',PIe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1},QIe={3:1,4:1,20:1,31:1,56:1,16:1,51:1,15:1,59:1,70:1,66:1,61:1,596:1},RIe='logging',SIe='measureExecutionTime',TIe='parser.parse.1',UIe='parser.parse.2',VIe='parser.next.1',WIe='parser.next.2',XIe='parser.next.3',YIe='parser.next.4',ZIe='parser.factor.1',$Ie='parser.factor.2',_Ie='parser.factor.3',aJe='parser.factor.4',bJe='parser.factor.5',cJe='parser.factor.6',dJe='parser.atom.1',eJe='parser.atom.2',fJe='parser.atom.3',gJe='parser.atom.4',hJe='parser.atom.5',iJe='parser.cc.1',jJe='parser.cc.2',kJe='parser.cc.3',lJe='parser.cc.5',mJe='parser.cc.6',nJe='parser.cc.7',oJe='parser.cc.8',pJe='parser.ope.1',qJe='parser.ope.2',rJe='parser.ope.3',sJe='parser.descape.1',tJe='parser.descape.2',uJe='parser.descape.3',vJe='parser.descape.4',wJe='parser.descape.5',xJe='parser.process.1',yJe='parser.quantifier.1',zJe='parser.quantifier.2',AJe='parser.quantifier.3',BJe='parser.quantifier.4',CJe='parser.quantifier.5',DJe='org.eclipse.emf.common.notify',EJe={424:1,686:1},FJe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1},GJe={378:1,152:1},HJe='index=',IJe={3:1,4:1,5:1,129:1},JJe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,61:1},KJe={3:1,6:1,4:1,5:1,198:1},LJe={3:1,4:1,5:1,173:1,379:1},MJe=';/?:@&=+$,',NJe='invalid authority: ',OJe='EAnnotation',PJe='ETypedElement',QJe='EStructuralFeature',RJe='EAttribute',SJe='EClassifier',TJe='EEnumLiteral',UJe='EGenericType',VJe='EOperation',WJe='EParameter',XJe='EReference',YJe='ETypeParameter',ZJe='org.eclipse.emf.ecore.util',$Je={79:1},_Je={3:1,20:1,16:1,15:1,61:1,597:1,79:1,71:1,97:1},aKe='org.eclipse.emf.ecore.util.FeatureMap$Entry',bKe=8192,cKe=2048,dKe='byte',eKe='char',fKe='double',gKe='float',hKe='int',iKe='long',jKe='short',kKe='java.lang.Object',lKe={3:1,4:1,5:1,254:1},mKe={3:1,4:1,5:1,688:1},nKe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,71:1},oKe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,79:1,71:1,97:1},pKe='mixed',qKe='http:///org/eclipse/emf/ecore/util/ExtendedMetaData',rKe='kind',sKe={3:1,4:1,5:1,689:1},tKe={3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1,79:1,71:1,97:1},uKe={20:1,31:1,56:1,16:1,15:1,61:1,71:1},vKe={51:1,128:1,287:1},wKe={76:1,343:1},xKe="The value of type '",yKe="' must be of type '",zKe=1352,AKe='http://www.eclipse.org/emf/2002/Ecore',BKe=-32768,CKe='constraints',DKe='baseType',EKe='getEStructuralFeature',FKe='getFeatureID',GKe='feature',HKe='getOperationID',IKe='operation',JKe='defaultValue',KKe='eTypeParameters',LKe='isInstance',MKe='getEEnumLiteral',NKe='eContainingClass',OKe={57:1},PKe={3:1,4:1,5:1,124:1},QKe='org.eclipse.emf.ecore.resource',RKe={94:1,93:1,599:1,2034:1},SKe='org.eclipse.emf.ecore.resource.impl',TKe='unspecified',UKe='simple',VKe='attribute',WKe='attributeWildcard',XKe='element',YKe='elementWildcard',ZKe='collapse',$Ke='itemType',_Ke='namespace',aLe='##targetNamespace',bLe='whiteSpace',cLe='wildcards',dLe='http://www.eclipse.org/emf/2003/XMLType',eLe='##any',fLe='uninitialized',gLe='The multiplicity constraint is violated',hLe='org.eclipse.emf.ecore.xml.type',iLe='ProcessingInstruction',jLe='SimpleAnyType',kLe='XMLTypeDocumentRoot',lLe='org.eclipse.emf.ecore.xml.type.impl',mLe='INF',nLe='processing',oLe='ENTITIES_._base',pLe='minLength',qLe='ENTITY',rLe='NCName',sLe='IDREFS_._base',tLe='integer',uLe='token',vLe='pattern',wLe='[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*',xLe='\\i\\c*',yLe='[\\i-[:]][\\c-[:]]*',zLe='nonPositiveInteger',ALe='maxInclusive',BLe='NMTOKEN',CLe='NMTOKENS_._base',DLe='nonNegativeInteger',ELe='minInclusive',FLe='normalizedString',GLe='unsignedByte',HLe='unsignedInt',ILe='18446744073709551615',JLe='unsignedShort',KLe='processingInstruction',LLe='org.eclipse.emf.ecore.xml.type.internal',MLe=1114111,NLe='Internal Error: shorthands: \\u',OLe='xml:isDigit',PLe='xml:isWord',QLe='xml:isSpace',RLe='xml:isNameChar',SLe='xml:isInitialNameChar',TLe='09\u0660\u0669\u06F0\u06F9\u0966\u096F\u09E6\u09EF\u0A66\u0A6F\u0AE6\u0AEF\u0B66\u0B6F\u0BE7\u0BEF\u0C66\u0C6F\u0CE6\u0CEF\u0D66\u0D6F\u0E50\u0E59\u0ED0\u0ED9\u0F20\u0F29',ULe='AZaz\xC0\xD6\xD8\xF6\xF8\u0131\u0134\u013E\u0141\u0148\u014A\u017E\u0180\u01C3\u01CD\u01F0\u01F4\u01F5\u01FA\u0217\u0250\u02A8\u02BB\u02C1\u0386\u0386\u0388\u038A\u038C\u038C\u038E\u03A1\u03A3\u03CE\u03D0\u03D6\u03DA\u03DA\u03DC\u03DC\u03DE\u03DE\u03E0\u03E0\u03E2\u03F3\u0401\u040C\u040E\u044F\u0451\u045C\u045E\u0481\u0490\u04C4\u04C7\u04C8\u04CB\u04CC\u04D0\u04EB\u04EE\u04F5\u04F8\u04F9\u0531\u0556\u0559\u0559\u0561\u0586\u05D0\u05EA\u05F0\u05F2\u0621\u063A\u0641\u064A\u0671\u06B7\u06BA\u06BE\u06C0\u06CE\u06D0\u06D3\u06D5\u06D5\u06E5\u06E6\u0905\u0939\u093D\u093D\u0958\u0961\u0985\u098C\u098F\u0990\u0993\u09A8\u09AA\u09B0\u09B2\u09B2\u09B6\u09B9\u09DC\u09DD\u09DF\u09E1\u09F0\u09F1\u0A05\u0A0A\u0A0F\u0A10\u0A13\u0A28\u0A2A\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59\u0A5C\u0A5E\u0A5E\u0A72\u0A74\u0A85\u0A8B\u0A8D\u0A8D\u0A8F\u0A91\u0A93\u0AA8\u0AAA\u0AB0\u0AB2\u0AB3\u0AB5\u0AB9\u0ABD\u0ABD\u0AE0\u0AE0\u0B05\u0B0C\u0B0F\u0B10\u0B13\u0B28\u0B2A\u0B30\u0B32\u0B33\u0B36\u0B39\u0B3D\u0B3D\u0B5C\u0B5D\u0B5F\u0B61\u0B85\u0B8A\u0B8E\u0B90\u0B92\u0B95\u0B99\u0B9A\u0B9C\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BAA\u0BAE\u0BB5\u0BB7\u0BB9\u0C05\u0C0C\u0C0E\u0C10\u0C12\u0C28\u0C2A\u0C33\u0C35\u0C39\u0C60\u0C61\u0C85\u0C8C\u0C8E\u0C90\u0C92\u0CA8\u0CAA\u0CB3\u0CB5\u0CB9\u0CDE\u0CDE\u0CE0\u0CE1\u0D05\u0D0C\u0D0E\u0D10\u0D12\u0D28\u0D2A\u0D39\u0D60\u0D61\u0E01\u0E2E\u0E30\u0E30\u0E32\u0E33\u0E40\u0E45\u0E81\u0E82\u0E84\u0E84\u0E87\u0E88\u0E8A\u0E8A\u0E8D\u0E8D\u0E94\u0E97\u0E99\u0E9F\u0EA1\u0EA3\u0EA5\u0EA5\u0EA7\u0EA7\u0EAA\u0EAB\u0EAD\u0EAE\u0EB0\u0EB0\u0EB2\u0EB3\u0EBD\u0EBD\u0EC0\u0EC4\u0F40\u0F47\u0F49\u0F69\u10A0\u10C5\u10D0\u10F6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110B\u110C\u110E\u1112\u113C\u113C\u113E\u113E\u1140\u1140\u114C\u114C\u114E\u114E\u1150\u1150\u1154\u1155\u1159\u1159\u115F\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116D\u116E\u1172\u1173\u1175\u1175\u119E\u119E\u11A8\u11A8\u11AB\u11AB\u11AE\u11AF\u11B7\u11B8\u11BA\u11BA\u11BC\u11C2\u11EB\u11EB\u11F0\u11F0\u11F9\u11F9\u1E00\u1E9B\u1EA0\u1EF9\u1F00\u1F15\u1F18\u1F1D\u1F20\u1F45\u1F48\u1F4D\u1F50\u1F57\u1F59\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F7D\u1F80\u1FB4\u1FB6\u1FBC\u1FBE\u1FBE\u1FC2\u1FC4\u1FC6\u1FCC\u1FD0\u1FD3\u1FD6\u1FDB\u1FE0\u1FEC\u1FF2\u1FF4\u1FF6\u1FFC\u2126\u2126\u212A\u212B\u212E\u212E\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30A1\u30FA\u3105\u312C\u4E00\u9FA5\uAC00\uD7A3',VLe='Private Use',WLe='ASSIGNED',XLe='\x00\x7F\x80\xFF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF\uAC00\uD7A3\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF',YLe='UNASSIGNED',ZLe={3:1,122:1},$Le='org.eclipse.emf.ecore.xml.type.util',_Le={3:1,4:1,5:1,381:1},aMe='org.eclipse.xtext.xbase.lib',bMe='Cannot add elements to a Range',cMe='Cannot set elements in a Range',dMe='Cannot remove elements from a Range',eMe='user.agent';var _,eeb,_db,ydb=-1;$wnd.goog=$wnd.goog||{};$wnd.goog.global=$wnd.goog.global||$wnd;eeb={};feb(1,null,{},nb);_.Fb=function ob(a){return mb(this,a)};_.Gb=function qb(){return this.Rm};_.Hb=function sb(){return kFb(this)};_.Ib=function ub(){var a;return nfb(rb(this))+'@'+(a=tb(this)>>>0,a.toString(16))};_.equals=function(a){return this.Fb(a)};_.hashCode=function(){return this.Hb()};_.toString=function(){return this.Ib()};var ND,OD,PD;feb(297,1,{297:1,2124:1},pfb);_.ve=function qfb(a){var b;b=new pfb;b.i=4;a>1?(b.c=xfb(this,a-1)):(b.c=this);return b};_.we=function wfb(){lfb(this);return this.b};_.xe=function yfb(){return nfb(this)};_.ye=function Afb(){return lfb(this),this.k};_.ze=function Cfb(){return (this.i&4)!=0};_.Ae=function Dfb(){return (this.i&1)!=0};_.Ib=function Gfb(){return ofb(this)};_.i=0;var kfb=1;var jJ=sfb(mve,'Object',1);var UI=sfb(mve,'Class',297);feb(2096,1,nve);var oE=sfb(ove,'Optional',2096);feb(1191,2096,nve,xb);_.Fb=function yb(a){return a===this};_.Hb=function zb(){return 2040732332};_.Ib=function Ab(){return 'Optional.absent()'};_.Jb=function Bb(a){Qb(a);return wb(),vb};var vb;var mE=sfb(ove,'Absent',1191);feb(636,1,{},Gb);var nE=sfb(ove,'Joiner',636);var pE=ufb(ove,'Predicate');feb(589,1,{178:1,589:1,3:1,46:1},Yb);_.Mb=function ac(a){return Xb(this,a)};_.Lb=function Zb(a){return Xb(this,a)};_.Fb=function $b(a){var b;if(ZD(a,589)){b=RD(a,589);return Rt(this.a,b.a)}return false};_.Hb=function _b(){return Cob(this.a)+306654252};_.Ib=function bc(){return Wb(this.a)};var qE=sfb(ove,'Predicates/AndPredicate',589);feb(419,2096,{419:1,3:1},cc);_.Fb=function dc(a){var b;if(ZD(a,419)){b=RD(a,419);return pb(this.a,b.a)}return false};_.Hb=function ec(){return 1502476572+tb(this.a)};_.Ib=function fc(){return uve+this.a+')'};_.Jb=function gc(a){return new cc(Rb(a.Kb(this.a),'the Function passed to Optional.transform() must not return null.'))};var rE=sfb(ove,'Present',419);feb(204,1,wve);_.Nb=function kc(a){Ztb(this,a)};_.Qb=function lc(){jc()};var eI=sfb(xve,'UnmodifiableIterator',204);feb(2076,204,yve);_.Qb=function nc(){jc()};_.Rb=function mc(a){throw Adb(new jib)};_.Wb=function oc(a){throw Adb(new jib)};var fI=sfb(xve,'UnmodifiableListIterator',2076);feb(399,2076,yve);_.Ob=function rc(){return this.c<this.d};_.Sb=function sc(){return this.c>0};_.Pb=function tc(){if(this.c>=this.d){throw Adb(new Dvb)}return this.Xb(this.c++)};_.Tb=function uc(){return this.c};_.Ub=function vc(){if(this.c<=0){throw Adb(new Dvb)}return this.Xb(--this.c)};_.Vb=function wc(){return this.c-1};_.c=0;_.d=0;var sE=sfb(xve,'AbstractIndexedListIterator',399);feb(713,204,wve);_.Ob=function Ac(){return xc(this)};_.Pb=function Bc(){return yc(this)};_.e=1;var tE=sfb(xve,'AbstractIterator',713);feb(2084,1,{229:1});_.Zb=function Hc(){var a;return a=this.f,!a?(this.f=this.ac()):a};_.Fb=function Ic(a){return xw(this,a)};_.Hb=function Jc(){return tb(this.Zb())};_.dc=function Kc(){return this.gc()==0};_.ec=function Lc(){return Ec(this)};_.Ib=function Mc(){return jeb(this.Zb())};var YE=sfb(xve,'AbstractMultimap',2084);feb(742,2084,zve);_.$b=function Xc(){Nc(this)};_._b=function Yc(a){return Oc(this,a)};_.ac=function Zc(){return new ne(this,this.c)};_.ic=function $c(a){return this.hc()};_.bc=function _c(){return new zf(this,this.c)};_.jc=function ad(){return this.mc(this.hc())};_.kc=function bd(){return new Hd(this)};_.lc=function cd(){return ek(this.c.vc().Nc(),new hh,64,this.d)};_.cc=function dd(a){return Qc(this,a)};_.fc=function gd(a){return Sc(this,a)};_.gc=function hd(){return this.d};_.mc=function jd(a){return yob(),new xpb(a)};_.nc=function kd(){return new Dd(this)};_.oc=function ld(){return ek(this.c.Cc().Nc(),new Fd,64,this.d)};_.pc=function md(a,b){return new lg(this,a,b,null)};_.d=0;var TE=sfb(xve,'AbstractMapBasedMultimap',742);feb(1696,742,zve);_.hc=function pd(){return new cnb(this.a)};_.jc=function qd(){return yob(),yob(),vob};_.cc=function sd(a){return RD(Qc(this,a),15)};_.fc=function ud(a){return RD(Sc(this,a),15)};_.Zb=function od(){return nd(this)};_.Fb=function rd(a){return xw(this,a)};_.qc=function td(a){return RD(Qc(this,a),15)};_.rc=function vd(a){return RD(Sc(this,a),15)};_.mc=function wd(a){return Hob(RD(a,15))};_.pc=function xd(a,b){return Vc(this,a,RD(b,15),null)};var uE=sfb(xve,'AbstractListMultimap',1696);feb(748,1,Ave);_.Nb=function zd(a){Ztb(this,a)};_.Ob=function Ad(){return this.c.Ob()||this.e.Ob()};_.Pb=function Bd(){var a;if(!this.e.Ob()){a=RD(this.c.Pb(),44);this.b=a.ld();this.a=RD(a.md(),16);this.e=this.a.Kc()}return this.sc(this.b,this.e.Pb())};_.Qb=function Cd(){this.e.Qb();RD(Hvb(this.a),16).dc()&&this.c.Qb();--this.d.d};var CE=sfb(xve,'AbstractMapBasedMultimap/Itr',748);feb(1129,748,Ave,Dd);_.sc=function Ed(a,b){return b};var vE=sfb(xve,'AbstractMapBasedMultimap/1',1129);feb(1130,1,{},Fd);_.Kb=function Gd(a){return RD(a,16).Nc()};var wE=sfb(xve,'AbstractMapBasedMultimap/1methodref$spliterator$Type',1130);feb(1131,748,Ave,Hd);_.sc=function Id(a,b){return new gp(a,b)};var xE=sfb(xve,'AbstractMapBasedMultimap/2',1131);var VK=ufb(Bve,'Map');feb(2065,1,Cve);_.wc=function Td(a){Bvb(this,a)};_.yc=function $d(a,b,c){return Cvb(this,a,b,c)};_.$b=function Od(){this.vc().$b()};_.tc=function Pd(a){return Jd(this,a)};_._b=function Qd(a){return !!Kd(this,a,false)};_.uc=function Rd(a){var b,c,d;for(c=this.vc().Kc();c.Ob();){b=RD(c.Pb(),44);d=b.md();if(dE(a)===dE(d)||a!=null&&pb(a,d)){return true}}return false};_.Fb=function Sd(a){var b,c,d;if(a===this){return true}if(!ZD(a,85)){return false}d=RD(a,85);if(this.gc()!=d.gc()){return false}for(c=d.vc().Kc();c.Ob();){b=RD(c.Pb(),44);if(!this.tc(b)){return false}}return true};_.xc=function Ud(a){return Wd(Kd(this,a,false))};_.Hb=function Xd(){return Bob(this.vc())};_.dc=function Yd(){return this.gc()==0};_.ec=function Zd(){return new Xkb(this)};_.zc=function _d(a,b){throw Adb(new kib('Put not supported on this map'))};_.Ac=function ae(a){Ld(this,a)};_.Bc=function be(a){return Wd(Kd(this,a,true))};_.gc=function ce(){return this.vc().gc()};_.Ib=function de(){return Md(this)};_.Cc=function ee(){return new glb(this)};var KJ=sfb(Bve,'AbstractMap',2065);feb(2085,2065,Cve);_.bc=function ge(){return new rf(this)};_.vc=function he(){return fe(this)};_.ec=function ie(){var a;a=this.g;return !a?(this.g=this.bc()):a};_.Cc=function je(){var a;a=this.i;return !a?(this.i=new nw(this)):a};var uH=sfb(xve,'Maps/ViewCachingAbstractMap',2085);feb(402,2085,Cve,ne);_.xc=function se(a){return ke(this,a)};_.Bc=function ve(a){return le(this,a)};_.$b=function oe(){this.d==this.e.c?this.e.$b():Ar(new mf(this))};_._b=function pe(a){return Wv(this.d,a)};_.Ec=function qe(){return new df(this)};_.Dc=function(){return this.Ec()};_.Fb=function re(a){return this===a||pb(this.d,a)};_.Hb=function te(){return tb(this.d)};_.ec=function ue(){return this.e.ec()};_.gc=function we(){return this.d.gc()};_.Ib=function xe(){return jeb(this.d)};var BE=sfb(xve,'AbstractMapBasedMultimap/AsMap',402);var cJ=ufb(mve,'Iterable');feb(31,1,Dve);_.Jc=function Le(a){xgb(this,a)};_.Lc=function Ne(){return this.Oc()};_.Nc=function Pe(){return new Swb(this,0)};_.Oc=function Qe(){return new SDb(null,this.Nc())};_.Fc=function Ge(a){throw Adb(new kib('Add not supported on this collection'))};_.Gc=function He(a){return ye(this,a)};_.$b=function Ie(){Ae(this)};_.Hc=function Je(a){return ze(this,a,false)};_.Ic=function Ke(a){return Be(this,a)};_.dc=function Me(){return this.gc()==0};_.Mc=function Oe(a){return ze(this,a,true)};_.Pc=function Re(){return De(this)};_.Qc=function Se(a){return Ee(this,a)};_.Ib=function Te(){return Fe(this)};var vJ=sfb(Bve,'AbstractCollection',31);var bL=ufb(Bve,'Set');feb(Eve,31,Fve);_.Nc=function Ye(){return new Swb(this,1)};_.Fb=function We(a){return Ue(this,a)};_.Hb=function Xe(){return Bob(this)};var RJ=sfb(Bve,'AbstractSet',Eve);feb(2068,Eve,Fve);var UH=sfb(xve,'Sets/ImprovedAbstractSet',2068);feb(2069,2068,Fve);_.$b=function $e(){this.Rc().$b()};_.Hc=function _e(a){return Ze(this,a)};_.dc=function af(){return this.Rc().dc()};_.Mc=function bf(a){var b;if(this.Hc(a)&&ZD(a,44)){b=RD(a,44);return this.Rc().ec().Mc(b.ld())}return false};_.gc=function cf(){return this.Rc().gc()};var nH=sfb(xve,'Maps/EntrySet',2069);feb(1127,2069,Fve,df);_.Hc=function ef(a){return Nk(this.a.d.vc(),a)};_.Kc=function ff(){return new mf(this.a)};_.Rc=function gf(){return this.a};_.Mc=function hf(a){var b;if(!Nk(this.a.d.vc(),a)){return false}b=RD(Hvb(RD(a,44)),44);Tc(this.a.e,b.ld());return true};_.Nc=function jf(){return gk(this.a.d.vc().Nc(),new kf(this.a))};var zE=sfb(xve,'AbstractMapBasedMultimap/AsMap/AsMapEntries',1127);feb(1128,1,{},kf);_.Kb=function lf(a){return me(this.a,RD(a,44))};var yE=sfb(xve,'AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type',1128);feb(746,1,Ave,mf);_.Nb=function nf(a){Ztb(this,a)};_.Pb=function pf(){var a;return a=RD(this.b.Pb(),44),this.a=RD(a.md(),16),me(this.c,a)};_.Ob=function of(){return this.b.Ob()};_.Qb=function qf(){Vb(!!this.a);this.b.Qb();this.c.e.d-=this.a.gc();this.a.$b();this.a=null};var AE=sfb(xve,'AbstractMapBasedMultimap/AsMap/AsMapIterator',746);feb(542,2068,Fve,rf);_.$b=function sf(){this.b.$b()};_.Hc=function tf(a){return this.b._b(a)};_.Jc=function uf(a){Qb(a);this.b.wc(new lw(a))};_.dc=function vf(){return this.b.dc()};_.Kc=function wf(){return new aw(this.b.vc().Kc())};_.Mc=function xf(a){if(this.b._b(a)){this.b.Bc(a);return true}return false};_.gc=function yf(){return this.b.gc()};var rH=sfb(xve,'Maps/KeySet',542);feb(327,542,Fve,zf);_.$b=function Af(){var a;Ar((a=this.b.vc().Kc(),new Hf(this,a)))};_.Ic=function Bf(a){return this.b.ec().Ic(a)};_.Fb=function Cf(a){return this===a||pb(this.b.ec(),a)};_.Hb=function Df(){return tb(this.b.ec())};_.Kc=function Ef(){var a;return a=this.b.vc().Kc(),new Hf(this,a)};_.Mc=function Ff(a){var b,c;c=0;b=RD(this.b.Bc(a),16);if(b){c=b.gc();b.$b();this.a.d-=c}return c>0};_.Nc=function Gf(){return this.b.ec().Nc()};var EE=sfb(xve,'AbstractMapBasedMultimap/KeySet',327);feb(747,1,Ave,Hf);_.Nb=function If(a){Ztb(this,a)};_.Ob=function Jf(){return this.c.Ob()};_.Pb=function Kf(){this.a=RD(this.c.Pb(),44);return this.a.ld()};_.Qb=function Lf(){var a;Vb(!!this.a);a=RD(this.a.md(),16);this.c.Qb();this.b.a.d-=a.gc();a.$b();this.a=null};var DE=sfb(xve,'AbstractMapBasedMultimap/KeySet/1',747);feb(503,402,{85:1,133:1},Mf);_.bc=function Nf(){return this.Sc()};_.ec=function Qf(){return this.Uc()};_.Sc=function Of(){return new eg(this.c,this.Wc())};_.Tc=function Pf(){return this.Wc().Tc()};_.Uc=function Rf(){var a;return a=this.b,!a?(this.b=this.Sc()):a};_.Vc=function Sf(){return this.Wc().Vc()};_.Wc=function Tf(){return RD(this.d,133)};var IE=sfb(xve,'AbstractMapBasedMultimap/SortedAsMap',503);feb(446,503,Gve,Uf);_.bc=function Wf(){return new gg(this.a,RD(RD(this.d,133),139))};_.Sc=function Xf(){return new gg(this.a,RD(RD(this.d,133),139))};_.ec=function _f(){var a;return a=this.b,RD(!a?(this.b=new gg(this.a,RD(RD(this.d,133),139))):a,277)};_.Uc=function ag(){var a;return a=this.b,RD(!a?(this.b=new gg(this.a,RD(RD(this.d,133),139))):a,277)};_.Wc=function cg(){return RD(RD(this.d,133),139)};_.Xc=function Vf(a){return RD(RD(this.d,133),139).Xc(a)};_.Yc=function Yf(a){return RD(RD(this.d,133),139).Yc(a)};_.Zc=function Zf(a,b){return new Uf(this.a,RD(RD(this.d,133),139).Zc(a,b))};_.$c=function $f(a){return RD(RD(this.d,133),139).$c(a)};_._c=function bg(a){return RD(RD(this.d,133),139)._c(a)};_.ad=function dg(a,b){return new Uf(this.a,RD(RD(this.d,133),139).ad(a,b))};var FE=sfb(xve,'AbstractMapBasedMultimap/NavigableAsMap',446);feb(502,327,Hve,eg);_.Nc=function fg(){return this.b.ec().Nc()};var JE=sfb(xve,'AbstractMapBasedMultimap/SortedKeySet',502);feb(401,502,Ive,gg);var GE=sfb(xve,'AbstractMapBasedMultimap/NavigableKeySet',401);feb(551,31,Dve,lg);_.Fc=function mg(a){var b,c;ig(this);c=this.d.dc();b=this.d.Fc(a);if(b){++this.f.d;c&&hg(this)}return b};_.Gc=function ng(a){var b,c,d;if(a.dc()){return false}d=(ig(this),this.d.gc());b=this.d.Gc(a);if(b){c=this.d.gc();this.f.d+=c-d;d==0&&hg(this)}return b};_.$b=function og(){var a;a=(ig(this),this.d.gc());if(a==0){return}this.d.$b();this.f.d-=a;jg(this)};_.Hc=function pg(a){ig(this);return this.d.Hc(a)};_.Ic=function qg(a){ig(this);return this.d.Ic(a)};_.Fb=function rg(a){if(a===this){return true}ig(this);return pb(this.d,a)};_.Hb=function sg(){ig(this);return tb(this.d)};_.Kc=function tg(){ig(this);return new Og(this)};_.Mc=function ug(a){var b;ig(this);b=this.d.Mc(a);if(b){--this.f.d;jg(this)}return b};_.gc=function vg(){return kg(this)};_.Nc=function wg(){return ig(this),this.d.Nc()};_.Ib=function xg(){ig(this);return jeb(this.d)};var LE=sfb(xve,'AbstractMapBasedMultimap/WrappedCollection',551);var QK=ufb(Bve,'List');feb(744,551,{20:1,31:1,16:1,15:1},yg);_.jd=function Hg(a){tvb(this,a)};_.Nc=function Ig(){return ig(this),this.d.Nc()};_.bd=function zg(a,b){var c;ig(this);c=this.d.dc();RD(this.d,15).bd(a,b);++this.a.d;c&&hg(this)};_.cd=function Ag(a,b){var c,d,e;if(b.dc()){return false}e=(ig(this),this.d.gc());c=RD(this.d,15).cd(a,b);if(c){d=this.d.gc();this.a.d+=d-e;e==0&&hg(this)}return c};_.Xb=function Bg(a){ig(this);return RD(this.d,15).Xb(a)};_.dd=function Cg(a){ig(this);return RD(this.d,15).dd(a)};_.ed=function Dg(){ig(this);return new Ug(this)};_.fd=function Eg(a){ig(this);return new Vg(this,a)};_.gd=function Fg(a){var b;ig(this);b=RD(this.d,15).gd(a);--this.a.d;jg(this);return b};_.hd=function Gg(a,b){ig(this);return RD(this.d,15).hd(a,b)};_.kd=function Jg(a,b){ig(this);return Vc(this.a,this.e,RD(this.d,15).kd(a,b),!this.b?this:this.b)};var NE=sfb(xve,'AbstractMapBasedMultimap/WrappedList',744);feb(1126,744,{20:1,31:1,16:1,15:1,59:1},Kg);var HE=sfb(xve,'AbstractMapBasedMultimap/RandomAccessWrappedList',1126);feb(628,1,Ave,Og);_.Nb=function Qg(a){Ztb(this,a)};_.Ob=function Rg(){Ng(this);return this.b.Ob()};_.Pb=function Sg(){Ng(this);return this.b.Pb()};_.Qb=function Tg(){Mg(this)};var KE=sfb(xve,'AbstractMapBasedMultimap/WrappedCollection/WrappedIterator',628);feb(745,628,Jve,Ug,Vg);_.Qb=function _g(){Mg(this)};_.Rb=function Wg(a){var b;b=kg(this.a)==0;(Ng(this),RD(this.b,128)).Rb(a);++this.a.a.d;b&&hg(this.a)};_.Sb=function Xg(){return (Ng(this),RD(this.b,128)).Sb()};_.Tb=function Yg(){return (Ng(this),RD(this.b,128)).Tb()};_.Ub=function Zg(){return (Ng(this),RD(this.b,128)).Ub()};_.Vb=function $g(){return (Ng(this),RD(this.b,128)).Vb()};_.Wb=function ah(a){(Ng(this),RD(this.b,128)).Wb(a)};var ME=sfb(xve,'AbstractMapBasedMultimap/WrappedList/WrappedListIterator',745);feb(743,551,Hve,bh);_.Nc=function dh(){return ig(this),this.d.Nc()};var QE=sfb(xve,'AbstractMapBasedMultimap/WrappedSortedSet',743);feb(1125,743,Ive,eh);var OE=sfb(xve,'AbstractMapBasedMultimap/WrappedNavigableSet',1125);feb(1124,551,Fve,fh);_.Nc=function gh(){return ig(this),this.d.Nc()};var PE=sfb(xve,'AbstractMapBasedMultimap/WrappedSet',1124);feb(1133,1,{},hh);_.Kb=function ih(a){return fd(RD(a,44))};var RE=sfb(xve,'AbstractMapBasedMultimap/lambda$1$Type',1133);feb(1132,1,{},jh);_.Kb=function kh(a){return new gp(this.a,a)};var SE=sfb(xve,'AbstractMapBasedMultimap/lambda$2$Type',1132);var UK=ufb(Bve,'Map/Entry');feb(358,1,Kve);_.Fb=function lh(a){var b;if(ZD(a,44)){b=RD(a,44);return Hb(this.ld(),b.ld())&&Hb(this.md(),b.md())}return false};_.Hb=function mh(){var a,b;a=this.ld();b=this.md();return (a==null?0:tb(a))^(b==null?0:tb(b))};_.nd=function nh(a){throw Adb(new jib)};_.Ib=function oh(){return this.ld()+'='+this.md()};var UE=sfb(xve,Lve,358);feb(2086,31,Dve);_.$b=function ph(){this.od().$b()};_.Hc=function qh(a){var b;if(ZD(a,44)){b=RD(a,44);return Cc(this.od(),b.ld(),b.md())}return false};_.Mc=function rh(a){var b;if(ZD(a,44)){b=RD(a,44);return Gc(this.od(),b.ld(),b.md())}return false};_.gc=function sh(){return this.od().d};var yH=sfb(xve,'Multimaps/Entries',2086);feb(749,2086,Dve,th);_.Kc=function uh(){return this.a.kc()};_.od=function vh(){return this.a};_.Nc=function wh(){return this.a.lc()};var VE=sfb(xve,'AbstractMultimap/Entries',749);feb(750,749,Fve,xh);_.Nc=function Ah(){return this.a.lc()};_.Fb=function yh(a){return Rx(this,a)};_.Hb=function zh(){return Sx(this)};var WE=sfb(xve,'AbstractMultimap/EntrySet',750);feb(751,31,Dve,Bh);_.$b=function Ch(){this.a.$b()};_.Hc=function Dh(a){return Dc(this.a,a)};_.Kc=function Eh(){return this.a.nc()};_.gc=function Fh(){return this.a.d};_.Nc=function Gh(){return this.a.oc()};var XE=sfb(xve,'AbstractMultimap/Values',751);feb(2087,31,{849:1,20:1,31:1,16:1});_.Jc=function Oh(a){Qb(a);Ih(this).Jc(new lx(a))};_.Nc=function Sh(){var a;return a=Ih(this).Nc(),ek(a,new sx,64|a.yd()&1296,this.a.d)};_.Fc=function Kh(a){Hh();return true};_.Gc=function Lh(a){return Qb(this),Qb(a),ZD(a,552)?nx(RD(a,849)):!a.dc()&&xr(this,a.Kc())};_.Hc=function Mh(a){var b;return b=RD(Xv(nd(this.a),a),16),(!b?0:b.gc())>0};_.Fb=function Nh(a){return ox(this,a)};_.Hb=function Ph(){return tb(Ih(this))};_.dc=function Qh(){return Ih(this).dc()};_.Mc=function Rh(a){return Rw(this,a,1)>0};_.Ib=function Th(){return jeb(Ih(this))};var $E=sfb(xve,'AbstractMultiset',2087);feb(2089,2068,Fve);_.$b=function Uh(){Nc(this.a.a)};_.Hc=function Vh(a){var b,c;if(ZD(a,504)){c=RD(a,425);if(RD(c.a.md(),16).gc()<=0){return false}b=Qw(this.a,c.a.ld());return b==RD(c.a.md(),16).gc()}return false};_.Mc=function Wh(a){var b,c,d,e;if(ZD(a,504)){c=RD(a,425);b=c.a.ld();d=RD(c.a.md(),16).gc();if(d!=0){e=this.a;return qx(e,b,d)}}return false};var IH=sfb(xve,'Multisets/EntrySet',2089);feb(1139,2089,Fve,Xh);_.Kc=function Yh(){return new _w(fe(nd(this.a.a)).Kc())};_.gc=function Zh(){return nd(this.a.a).gc()};var ZE=sfb(xve,'AbstractMultiset/EntrySet',1139);feb(627,742,zve);_.hc=function ai(){return this.pd()};_.jc=function bi(){return this.qd()};_.cc=function ei(a){return this.rd(a)};_.fc=function gi(a){return this.sd(a)};_.Zb=function _h(){var a;return a=this.f,!a?(this.f=this.ac()):a};_.qd=function ci(){return yob(),yob(),xob};_.Fb=function di(a){return xw(this,a)};_.rd=function fi(a){return RD(Qc(this,a),21)};_.sd=function hi(a){return RD(Sc(this,a),21)};_.mc=function ii(a){return yob(),new Lqb(RD(a,21))};_.pc=function ji(a,b){return new fh(this,a,RD(b,21))};var _E=sfb(xve,'AbstractSetMultimap',627);feb(1723,627,zve);_.hc=function mi(){return new yAb(this.b)};_.pd=function ni(){return new yAb(this.b)};_.jc=function oi(){return Zx(new yAb(this.b))};_.qd=function pi(){return Zx(new yAb(this.b))};_.cc=function qi(a){return RD(RD(Qc(this,a),21),87)};_.rd=function ri(a){return RD(RD(Qc(this,a),21),87)};_.fc=function si(a){return RD(RD(Sc(this,a),21),87)};_.sd=function ti(a){return RD(RD(Sc(this,a),21),87)};_.mc=function ui(a){return ZD(a,277)?Zx(RD(a,277)):(yob(),new jrb(RD(a,87)))};_.Zb=function li(){var a;return a=this.f,!a?(this.f=ZD(this.c,139)?new Uf(this,RD(this.c,139)):ZD(this.c,133)?new Mf(this,RD(this.c,133)):new ne(this,this.c)):a};_.pc=function vi(a,b){return ZD(b,277)?new eh(this,a,RD(b,277)):new bh(this,a,RD(b,87))};var bF=sfb(xve,'AbstractSortedSetMultimap',1723);feb(1724,1723,zve);_.Zb=function xi(){var a;return a=this.f,RD(RD(!a?(this.f=ZD(this.c,139)?new Uf(this,RD(this.c,139)):ZD(this.c,133)?new Mf(this,RD(this.c,133)):new ne(this,this.c)):a,133),139)};_.ec=function zi(){var a;return a=this.i,RD(RD(!a?(this.i=ZD(this.c,139)?new gg(this,RD(this.c,139)):ZD(this.c,133)?new eg(this,RD(this.c,133)):new zf(this,this.c)):a,87),277)};_.bc=function yi(){return ZD(this.c,139)?new gg(this,RD(this.c,139)):ZD(this.c,133)?new eg(this,RD(this.c,133)):new zf(this,this.c)};var aF=sfb(xve,'AbstractSortedKeySortedSetMultimap',1724);feb(2109,1,{2046:1});_.Fb=function Ai(a){return Qy(this,a)};_.Hb=function Bi(){var a;return Bob((a=this.g,!a?(this.g=new Di(this)):a))};_.Ib=function Ci(){var a;return Md((a=this.f,!a?(this.f=new Zj(this)):a))};var eF=sfb(xve,'AbstractTable',2109);feb(679,Eve,Fve,Di);_.$b=function Ei(){Xi()};_.Hc=function Fi(a){var b,c;if(ZD(a,479)){b=RD(a,697);c=RD(Xv(bj(this.a),Qm(b.c.e,b.b)),85);return !!c&&Nk(c.vc(),new gp(Qm(b.c.c,b.a),Ui(b.c,b.b,b.a)))}return false};_.Kc=function Gi(){return Vi(this.a)};_.Mc=function Hi(a){var b,c;if(ZD(a,479)){b=RD(a,697);c=RD(Xv(bj(this.a),Qm(b.c.e,b.b)),85);return !!c&&Ok(c.vc(),new gp(Qm(b.c.c,b.a),Ui(b.c,b.b,b.a)))}return false};_.gc=function Ii(){return dj(this.a)};_.Nc=function Ji(){return Wi(this.a)};var cF=sfb(xve,'AbstractTable/CellSet',679);feb(2025,31,Dve,Ki);_.$b=function Li(){Xi()};_.Hc=function Mi(a){return Yi(this.a,a)};_.Kc=function Ni(){return fj(this.a)};_.gc=function Oi(){return dj(this.a)};_.Nc=function Pi(){return gj(this.a)};var dF=sfb(xve,'AbstractTable/Values',2025);feb(1697,1696,zve);var fF=sfb(xve,'ArrayListMultimapGwtSerializationDependencies',1697);feb(520,1697,zve,Ri,Si);_.hc=function Ti(){return new cnb(this.a)};_.a=0;var gF=sfb(xve,'ArrayListMultimap',520);feb(678,2109,{678:1,2046:1,3:1},hj);var sF=sfb(xve,'ArrayTable',678);feb(2021,399,yve,ij);_.Xb=function jj(a){return new pj(this.a,a)};var hF=sfb(xve,'ArrayTable/1',2021);feb(2022,1,{},kj);_.td=function lj(a){return new pj(this.a,a)};var iF=sfb(xve,'ArrayTable/1methodref$getCell$Type',2022);feb(2110,1,{697:1});_.Fb=function mj(a){var b;if(a===this){return true}if(ZD(a,479)){b=RD(a,697);return Hb(Qm(this.c.e,this.b),Qm(b.c.e,b.b))&&Hb(Qm(this.c.c,this.a),Qm(b.c.c,b.a))&&Hb(Ui(this.c,this.b,this.a),Ui(b.c,b.b,b.a))}return false};_.Hb=function nj(){return Tnb(cD(WC(jJ,1),rve,1,5,[Qm(this.c.e,this.b),Qm(this.c.c,this.a),Ui(this.c,this.b,this.a)]))};_.Ib=function oj(){return '('+Qm(this.c.e,this.b)+','+Qm(this.c.c,this.a)+')='+Ui(this.c,this.b,this.a)};var bI=sfb(xve,'Tables/AbstractCell',2110);feb(479,2110,{479:1,697:1},pj);_.a=0;_.b=0;_.d=0;var jF=sfb(xve,'ArrayTable/2',479);feb(2024,1,{},qj);_.td=function rj(a){return _i(this.a,a)};var kF=sfb(xve,'ArrayTable/2methodref$getValue$Type',2024);feb(2023,399,yve,sj);_.Xb=function tj(a){return _i(this.a,a)};var lF=sfb(xve,'ArrayTable/3',2023);feb(2077,2065,Cve);_.$b=function vj(){Ar(this.kc())};_.vc=function wj(){return new gw(this)};_.lc=function xj(){return new Uwb(this.kc(),this.gc())};var pH=sfb(xve,'Maps/IteratorBasedAbstractMap',2077);feb(842,2077,Cve);_.$b=function Bj(){throw Adb(new jib)};_._b=function Cj(a){return En(this.c,a)};_.kc=function Dj(){return new Rj(this,this.c.b.c.gc())};_.lc=function Ej(){return fk(this.c.b.c.gc(),16,new Lj(this))};_.xc=function Fj(a){var b;b=RD(Fn(this.c,a),17);return !b?null:this.vd(b.a)};_.dc=function Gj(){return this.c.b.c.dc()};_.ec=function Hj(){return hn(this.c)};_.zc=function Ij(a,b){var c;c=RD(Fn(this.c,a),17);if(!c){throw Adb(new agb(this.ud()+' '+a+' not in '+hn(this.c)))}return this.wd(c.a,b)};_.Bc=function Jj(a){throw Adb(new jib)};_.gc=function Kj(){return this.c.b.c.gc()};var pF=sfb(xve,'ArrayTable/ArrayMap',842);feb(2020,1,{},Lj);_.td=function Mj(a){return yj(this.a,a)};var mF=sfb(xve,'ArrayTable/ArrayMap/0methodref$getEntry$Type',2020);feb(2018,358,Kve,Nj);_.ld=function Oj(){return zj(this.a,this.b)};_.md=function Pj(){return this.a.vd(this.b)};_.nd=function Qj(a){return this.a.wd(this.b,a)};_.b=0;var nF=sfb(xve,'ArrayTable/ArrayMap/1',2018);feb(2019,399,yve,Rj);_.Xb=function Sj(a){return yj(this.a,a)};var oF=sfb(xve,'ArrayTable/ArrayMap/2',2019);feb(2017,842,Cve,Tj);_.ud=function Uj(){return 'Column'};_.vd=function Vj(a){return Ui(this.b,this.a,a)};_.wd=function Wj(a,b){return cj(this.b,this.a,a,b)};_.a=0;var rF=sfb(xve,'ArrayTable/Row',2017);feb(843,842,Cve,Zj);_.vd=function _j(a){return new Tj(this.a,a)};_.zc=function ak(a,b){return RD(b,85),Xj()};_.wd=function bk(a,b){return RD(b,85),Yj()};_.ud=function $j(){return 'Row'};var qF=sfb(xve,'ArrayTable/RowMap',843);feb(1157,1,Pve,hk);_.Ad=function lk(a){return (this.a.yd()&-262&a)!=0};_.yd=function ik(){return this.a.yd()&-262};_.zd=function jk(){return this.a.zd()};_.Nb=function kk(a){this.a.Nb(new pk(a,this.b))};_.Bd=function mk(a){return this.a.Bd(new nk(a,this.b))};var yF=sfb(xve,'CollectSpliterators/1',1157);feb(1158,1,Qve,nk);_.Cd=function ok(a){this.a.Cd(this.b.Kb(a))};var tF=sfb(xve,'CollectSpliterators/1/lambda$0$Type',1158);feb(1159,1,Qve,pk);_.Cd=function qk(a){this.a.Cd(this.b.Kb(a))};var uF=sfb(xve,'CollectSpliterators/1/lambda$1$Type',1159);feb(1154,1,Pve,rk);_.Ad=function vk(a){return ((16464|this.b)&a)!=0};_.yd=function sk(){return 16464|this.b};_.zd=function tk(){return this.a.zd()};_.Nb=function uk(a){this.a.Qe(new zk(a,this.c))};_.Bd=function wk(a){return this.a.Re(new xk(a,this.c))};_.b=0;var xF=sfb(xve,'CollectSpliterators/1WithCharacteristics',1154);feb(1155,1,Rve,xk);_.Dd=function yk(a){this.a.Cd(this.b.td(a))};var vF=sfb(xve,'CollectSpliterators/1WithCharacteristics/lambda$0$Type',1155);feb(1156,1,Rve,zk);_.Dd=function Ak(a){this.a.Cd(this.b.td(a))};var wF=sfb(xve,'CollectSpliterators/1WithCharacteristics/lambda$1$Type',1156);feb(1150,1,Pve);_.Ad=function Gk(a){return (this.a&a)!=0};_.yd=function Dk(){return this.a};_.zd=function Ek(){!!this.e&&(this.b=Kgb(this.b,this.e.zd()));return Kgb(this.b,0)};_.Nb=function Fk(a){if(this.e){this.e.Nb(a);this.e=null}this.c.Nb(new Kk(this,a));this.b=0};_.Bd=function Hk(a){while(true){if(!!this.e&&this.e.Bd(a)){Pdb(this.b,Sve)&&(this.b=Vdb(this.b,1));return true}else{this.e=null}if(!this.c.Bd(new Ik(this))){return false}}};_.a=0;_.b=0;var CF=sfb(xve,'CollectSpliterators/FlatMapSpliterator',1150);feb(1152,1,Qve,Ik);_.Cd=function Jk(a){Bk(this.a,a)};var zF=sfb(xve,'CollectSpliterators/FlatMapSpliterator/lambda$0$Type',1152);feb(1153,1,Qve,Kk);_.Cd=function Lk(a){Ck(this.a,this.b,a)};var AF=sfb(xve,'CollectSpliterators/FlatMapSpliterator/lambda$1$Type',1153);feb(1151,1150,Pve,Mk);var BF=sfb(xve,'CollectSpliterators/FlatMapSpliteratorOfObject',1151);feb(253,1,Tve);_.Fd=function Sk(a){return this.Ed(RD(a,253))};_.Ed=function Rk(a){var b;if(a==(kl(),jl)){return 1}if(a==(Wk(),Vk)){return -1}b=(ux(),Leb(this.a,a.a));if(b!=0){return b}return ZD(this,526)==ZD(a,526)?0:ZD(this,526)?1:-1};_.Id=function Tk(){return this.a};_.Fb=function Uk(a){return Pk(this,a)};var HF=sfb(xve,'Cut',253);feb(1823,253,Tve,Xk);_.Ed=function Yk(a){return a==this?0:1};_.Gd=function Zk(a){throw Adb(new Ceb)};_.Hd=function $k(a){a.a+='+\u221E)'};_.Id=function _k(){throw Adb(new dgb(Uve))};_.Hb=function al(){return gib(),jFb(this)};_.Jd=function bl(a){return false};_.Ib=function cl(){return '+\u221E'};var Vk;var DF=sfb(xve,'Cut/AboveAll',1823);feb(526,253,{253:1,526:1,3:1,34:1},dl);_.Gd=function el(a){Yhb((a.a+='(',a),this.a)};_.Hd=function fl(a){Thb(Yhb(a,this.a),93)};_.Hb=function gl(){return ~tb(this.a)};_.Jd=function hl(a){return ux(),Leb(this.a,a)<0};_.Ib=function il(){return '/'+this.a+'\\'};var EF=sfb(xve,'Cut/AboveValue',526);feb(1822,253,Tve,ll);_.Ed=function ml(a){return a==this?0:-1};_.Gd=function nl(a){a.a+='(-\u221E'};_.Hd=function ol(a){throw Adb(new Ceb)};_.Id=function pl(){throw Adb(new dgb(Uve))};_.Hb=function ql(){return gib(),jFb(this)};_.Jd=function rl(a){return true};_.Ib=function sl(){return '-\u221E'};var jl;var FF=sfb(xve,'Cut/BelowAll',1822);feb(1824,253,Tve,tl);_.Gd=function ul(a){Yhb((a.a+='[',a),this.a)};_.Hd=function vl(a){Thb(Yhb(a,this.a),41)};_.Hb=function wl(){return tb(this.a)};_.Jd=function xl(a){return ux(),Leb(this.a,a)<=0};_.Ib=function yl(){return '\\'+this.a+'/'};var GF=sfb(xve,'Cut/BelowValue',1824);feb(547,1,Vve);_.Jc=function Bl(a){xgb(this,a)};_.Ib=function Cl(){return Lr(RD(Rb(this,'use Optional.orNull() instead of Optional.or(null)'),20).Kc())};var LF=sfb(xve,'FluentIterable',547);feb(442,547,Vve,Dl);_.Kc=function El(){return new is(Mr(this.a.Kc(),new ir))};var IF=sfb(xve,'FluentIterable/2',442);feb(1059,547,Vve,Gl);_.Kc=function Hl(){return Fl(this)};var KF=sfb(xve,'FluentIterable/3',1059);feb(724,399,yve,Il);_.Xb=function Jl(a){return this.a[a].Kc()};var JF=sfb(xve,'FluentIterable/3/1',724);feb(2070,1,{});_.Ib=function Kl(){return jeb(this.Kd().b)};var SF=sfb(xve,'ForwardingObject',2070);feb(2071,2070,Wve);_.Kd=function Ql(){return this.Ld()};_.Jc=function Rl(a){xgb(this,a)};_.Lc=function Ul(){return this.Oc()};_.Nc=function Xl(){return new Swb(this,0)};_.Oc=function Yl(){return new SDb(null,this.Nc())};_.Fc=function Ll(a){return this.Ld(),qpb()};_.Gc=function Ml(a){return this.Ld(),rpb()};_.$b=function Nl(){this.Ld(),spb()};_.Hc=function Ol(a){return this.Ld().Hc(a)};_.Ic=function Pl(a){return this.Ld().Ic(a)};_.dc=function Sl(){return this.Ld().b.dc()};_.Kc=function Tl(){return this.Ld().Kc()};_.Mc=function Vl(a){return this.Ld(),vpb()};_.gc=function Wl(){return this.Ld().b.gc()};_.Pc=function Zl(){return this.Ld().Pc()};_.Qc=function $l(a){return this.Ld().Qc(a)};var MF=sfb(xve,'ForwardingCollection',2071);feb(2078,31,Xve);_.Kc=function gm(){return this.Od()};_.Fc=function am(a){throw Adb(new jib)};_.Gc=function bm(a){throw Adb(new jib)};_.Md=function cm(){var a;a=this.c;return !a?(this.c=this.Nd()):a};_.$b=function dm(){throw Adb(new jib)};_.Hc=function em(a){return a!=null&&ze(this,a,false)};_.Nd=function fm(){switch(this.gc()){case 0:return tm(),tm(),sm;case 1:return tm(),new Dy(Qb(this.Od().Pb()));default:return new Fx(this,this.Pc());}};_.Mc=function hm(a){throw Adb(new jib)};var lG=sfb(xve,'ImmutableCollection',2078);feb(727,2078,Xve,im);_.Kc=function nm(){return Nr(this.a.Kc())};_.Hc=function jm(a){return a!=null&&this.a.Hc(a)};_.Ic=function km(a){return this.a.Ic(a)};_.dc=function lm(){return this.a.dc()};_.Od=function mm(){return Nr(this.a.Kc())};_.gc=function om(){return this.a.gc()};_.Pc=function pm(){return this.a.Pc()};_.Qc=function qm(a){return this.a.Qc(a)};_.Ib=function rm(){return jeb(this.a)};var NF=sfb(xve,'ForwardingImmutableCollection',727);feb(307,2078,Yve);_.Kc=function Em(){return this.Od()};_.ed=function Fm(){return this.Pd(0)};_.fd=function Hm(a){return this.Pd(a)};_.jd=function Lm(a){tvb(this,a)};_.Nc=function Mm(){return new Swb(this,16)};_.kd=function Om(a,b){return this.Qd(a,b)};_.bd=function wm(a,b){throw Adb(new jib)};_.cd=function xm(a,b){throw Adb(new jib)};_.Md=function ym(){return this};_.Fb=function Am(a){return $u(this,a)};_.Hb=function Bm(){return _u(this)};_.dd=function Cm(a){return a==null?-1:av(this,a)};_.Od=function Dm(){return this.Pd(0)};_.Pd=function Gm(a){return um(this,a)};_.gd=function Jm(a){throw Adb(new jib)};_.hd=function Km(a,b){throw Adb(new jib)};_.Qd=function Nm(a,b){var c;return Pm((c=new pv(this),new Rkb(c,a,b)))};var sm;var qG=sfb(xve,'ImmutableList',307);feb(2105,307,Yve);_.Kc=function Zm(){return Nr(this.Rd().Kc())};_.kd=function an(a,b){return Pm(this.Rd().kd(a,b))};_.Hc=function Rm(a){return a!=null&&this.Rd().Hc(a)};_.Ic=function Sm(a){return this.Rd().Ic(a)};_.Fb=function Tm(a){return pb(this.Rd(),a)};_.Xb=function Um(a){return Qm(this,a)};_.Hb=function Vm(){return tb(this.Rd())};_.dd=function Wm(a){return this.Rd().dd(a)};_.dc=function Xm(){return this.Rd().dc()};_.Od=function Ym(){return Nr(this.Rd().Kc())};_.gc=function $m(){return this.Rd().gc()};_.Qd=function _m(a,b){return Pm(this.Rd().kd(a,b))};_.Pc=function bn(){return this.Rd().Qc($C(jJ,rve,1,this.Rd().gc(),5,1))};_.Qc=function cn(a){return this.Rd().Qc(a)};_.Ib=function dn(){return jeb(this.Rd())};var OF=sfb(xve,'ForwardingImmutableList',2105);feb(729,1,$ve);_.vc=function pn(){return gn(this)};_.wc=function rn(a){Bvb(this,a)};_.ec=function vn(){return hn(this)};_.yc=function wn(a,b,c){return Cvb(this,a,b,c)};_.Cc=function Dn(){return this.Vd()};_.$b=function kn(){throw Adb(new jib)};_._b=function ln(a){return this.xc(a)!=null};_.uc=function mn(a){return this.Vd().Hc(a)};_.Td=function nn(){return new xq(this)};_.Ud=function on(){return new Gq(this)};_.Fb=function qn(a){return Tv(this,a)};_.Hb=function tn(){return gn(this).Hb()};_.dc=function un(){return this.gc()==0};_.zc=function zn(a,b){return jn()};_.Bc=function An(a){throw Adb(new jib)};_.Ib=function Bn(){return Zv(this)};_.Vd=function Cn(){if(this.e){return this.e}return this.e=this.Ud()};_.c=null;_.d=null;_.e=null;var en;var AG=sfb(xve,'ImmutableMap',729);feb(730,729,$ve);_._b=function Hn(a){return En(this,a)};_.uc=function In(a){return pqb(this.b,a)};_.Sd=function Jn(){return go(new Xn(this))};_.Td=function Kn(){return go(sqb(this.b))};_.Ud=function Ln(){return _l(),new im(tqb(this.b))};_.Fb=function Mn(a){return rqb(this.b,a)};_.xc=function Nn(a){return Fn(this,a)};_.Hb=function On(){return tb(this.b.c)};_.dc=function Pn(){return this.b.c.dc()};_.gc=function Qn(){return this.b.c.gc()};_.Ib=function Rn(){return jeb(this.b.c)};var QF=sfb(xve,'ForwardingImmutableMap',730);feb(2072,2071,_ve);_.Kd=function Sn(){return this.Wd()};_.Ld=function Tn(){return this.Wd()};_.Nc=function Wn(){return new Swb(this,1)};_.Fb=function Un(a){return a===this||this.Wd().Fb(a)};_.Hb=function Vn(){return this.Wd().Hb()};var TF=sfb(xve,'ForwardingSet',2072);feb(1085,2072,_ve,Xn);_.Kd=function Zn(){return qqb(this.a.b)};_.Ld=function $n(){return qqb(this.a.b)};_.Hc=function Yn(b){if(ZD(b,44)&&RD(b,44).ld()==null){return false}try{return Pqb(qqb(this.a.b),b)}catch(a){a=zdb(a);if(ZD(a,212)){return false}else throw Adb(a)}};_.Wd=function _n(){return qqb(this.a.b)};_.Qc=function ao(a){var b;b=Qqb(qqb(this.a.b),a);qqb(this.a.b).b.gc()<b.length&&bD(b,qqb(this.a.b).b.gc(),null);return b};var PF=sfb(xve,'ForwardingImmutableMap/1',1085);feb(2079,2078,awe);_.Kc=function eo(){return this.Od()};_.Nc=function fo(){return new Swb(this,1)};_.Fb=function bo(a){return Rx(this,a)};_.Hb=function co(){return Sx(this)};var CG=sfb(xve,'ImmutableSet',2079);feb(719,2079,awe);_.Kc=function no(){return Nr(new Ppb(this.a.b.Kc()))};_.Hc=function io(a){return a!=null&&tpb(this.a,a)};_.Ic=function jo(a){return upb(this.a,a)};_.Hb=function ko(){return tb(this.a.b)};_.dc=function lo(){return this.a.b.dc()};_.Od=function mo(){return Nr(new Ppb(this.a.b.Kc()))};_.gc=function oo(){return this.a.b.gc()};_.Pc=function po(){return this.a.b.Pc()};_.Qc=function qo(a){return wpb(this.a,a)};_.Ib=function ro(){return jeb(this.a.b)};var RF=sfb(xve,'ForwardingImmutableSet',719);feb(2073,2072,bwe);_.Kd=function so(){return this.b};_.Ld=function to(){return this.b};_.Wd=function uo(){return this.b};_.Nc=function vo(){return new $wb(this)};var UF=sfb(xve,'ForwardingSortedSet',2073);feb(543,2077,$ve,Io);_.Ac=function Ro(a){Ld(this,a)};_.Cc=function Uo(){var a;return a=this.d,new Gp(!a?(this.d=new mp(this)):a)};_.$b=function Jo(){wo(this)};_._b=function Ko(a){return !!Go(this,a,Ydb(Ndb(cwe,qgb(Ydb(Ndb(a==null?0:tb(a),dwe)),15))))};_.uc=function Lo(a){return xo(this,a)};_.kc=function Mo(){return new ap(this,this)};_.wc=function No(a){zo(this,a)};_.xc=function Oo(a){return Ao(this,a)};_.ec=function Po(){return new Np(this)};_.zc=function Qo(a,b){return Do(this,a,b)};_.Bc=function So(a){var b;b=Go(this,a,Ydb(Ndb(cwe,qgb(Ydb(Ndb(a==null?0:tb(a),dwe)),15))));if(!b){return null}else{yo(this,b);b.e=null;b.c=null;return b.i}};_.gc=function To(){return this.i};_.xd=function Vo(){var a;return a=this.d,new Gp(!a?(this.d=new mp(this)):a)};_.f=0;_.g=0;_.i=0;var fG=sfb(xve,'HashBiMap',543);feb(544,1,Ave);_.Nb=function Yo(a){Ztb(this,a)};_.Ob=function Zo(){return Wo(this)};_.Pb=function $o(){var a;if(!Wo(this)){throw Adb(new Dvb)}a=RD(Hvb(this.c),303);this.c=a.c;this.f=a;--this.d;return this.Xd(a)};_.Qb=function _o(){if(this.e.g!=this.b){throw Adb(new Jrb)}if(!this.f){throw Adb(new dgb(tve))}yo(this.e,this.f);this.b=this.e.g;this.f=null};_.b=0;_.d=0;_.f=null;var cG=sfb(xve,'HashBiMap/Itr',544);feb(1023,544,Ave,ap);_.Xd=function bp(a){return new cp(this,a)};var WF=sfb(xve,'HashBiMap/1',1023);feb(gwe,358,Kve,cp);_.ld=function dp(){return this.a.g};_.md=function ep(){return this.a.i};_.nd=function fp(a){var b,c,d;c=this.a.i;d=Ydb(Ndb(cwe,qgb(Ydb(Ndb(a==null?0:tb(a),dwe)),15)));if(d==this.a.f&&(dE(a)===dE(c)||a!=null&&pb(a,c))){return a}Nb(!Ho(this.b.a,a,d),a);yo(this.b.a,this.a);b=new kp(this.a.g,this.a.a,a,d);Bo(this.b.a,b,this.a);this.a.e=null;this.a.c=null;this.b.b=this.b.a.g;this.b.f==this.a&&(this.b.f=b);this.a=b;return c};var VF=sfb(xve,'HashBiMap/1/MapEntry',gwe);feb(246,358,{358:1,246:1,3:1,44:1},gp);_.ld=function hp(){return this.g};_.md=function ip(){return this.i};_.nd=function jp(a){throw Adb(new jib)};var mG=sfb(xve,'ImmutableEntry',246);feb(303,246,{358:1,303:1,246:1,3:1,44:1},kp);_.a=0;_.f=0;var XF=sfb(xve,'HashBiMap/BiEntry',303);feb(619,2077,$ve,mp);_.Ac=function vp(a){Ld(this,a)};_.Cc=function yp(){return new Np(this.a)};_.$b=function np(){wo(this.a)};_._b=function op(a){return xo(this.a,a)};_.kc=function pp(){return new Ap(this,this.a)};_.wc=function qp(a){Qb(a);zo(this.a,new Lp(a))};_.xc=function rp(a){return lp(this,a)};_.ec=function sp(){return new Gp(this)};_.zc=function up(a,b){return Eo(this.a,a,b,false)};_.Bc=function wp(a){var b;b=Ho(this.a,a,Ydb(Ndb(cwe,qgb(Ydb(Ndb(a==null?0:tb(a),dwe)),15))));if(!b){return null}else{yo(this.a,b);b.e=null;b.c=null;return b.g}};_.gc=function xp(){return this.a.i};_.xd=function zp(){return new Np(this.a)};var bG=sfb(xve,'HashBiMap/Inverse',619);feb(1020,544,Ave,Ap);_.Xd=function Bp(a){return new Cp(this,a)};var ZF=sfb(xve,'HashBiMap/Inverse/1',1020);feb(1021,358,Kve,Cp);_.ld=function Dp(){return this.a.i};_.md=function Ep(){return this.a.g};_.nd=function Fp(a){var b,c,d;d=this.a.g;b=Ydb(Ndb(cwe,qgb(Ydb(Ndb(a==null?0:tb(a),dwe)),15)));if(b==this.a.a&&(dE(a)===dE(d)||a!=null&&pb(a,d))){return a}Nb(!Go(this.b.a.a,a,b),a);yo(this.b.a.a,this.a);c=new kp(a,b,this.a.i,this.a.f);this.a=c;Bo(this.b.a.a,c,null);this.b.b=this.b.a.a.g;return d};var YF=sfb(xve,'HashBiMap/Inverse/1/InverseEntry',1021);feb(620,542,Fve,Gp);_.Kc=function Hp(){return new Jp(this.a.a)};_.Mc=function Ip(a){var b;b=Ho(this.a.a,a,Ydb(Ndb(cwe,qgb(Ydb(Ndb(a==null?0:tb(a),dwe)),15))));if(!b){return false}else{yo(this.a.a,b);return true}};var _F=sfb(xve,'HashBiMap/Inverse/InverseKeySet',620);feb(1019,544,Ave,Jp);_.Xd=function Kp(a){return a.i};var $F=sfb(xve,'HashBiMap/Inverse/InverseKeySet/1',1019);feb(1022,1,{},Lp);_.Yd=function Mp(a,b){tp(this.a,a,b)};var aG=sfb(xve,'HashBiMap/Inverse/lambda$0$Type',1022);feb(618,542,Fve,Np);_.Kc=function Op(){return new Qp(this.a)};_.Mc=function Pp(a){var b;b=Go(this.a,a,Ydb(Ndb(cwe,qgb(Ydb(Ndb(a==null?0:tb(a),dwe)),15))));if(!b){return false}else{yo(this.a,b);b.e=null;b.c=null;return true}};var eG=sfb(xve,'HashBiMap/KeySet',618);feb(1018,544,Ave,Qp);_.Xd=function Rp(a){return a.g};var dG=sfb(xve,'HashBiMap/KeySet/1',1018);feb(1123,627,zve);var gG=sfb(xve,'HashMultimapGwtSerializationDependencies',1123);feb(271,1123,zve,Tp);_.hc=function Up(){return new atb(Sv(this.a))};_.pd=function Vp(){return new atb(Sv(this.a))};_.a=2;var hG=sfb(xve,'HashMultimap',271);feb(2097,307,Yve);_.Hc=function Yp(a){return this.Zd().Hc(a)};_.dc=function Zp(){return this.Zd().dc()};_.gc=function $p(){return this.Zd().gc()};var iG=sfb(xve,'ImmutableAsList',2097);feb(2030,730,$ve);_.Vd=function aq(){return _l(),new Fy(this.a)};_.Cc=function bq(){return _l(),new Fy(this.a)};_.xd=function cq(){return _l(),new Fy(this.a)};var jG=sfb(xve,'ImmutableBiMap',2030);feb(2075,1,{});var kG=sfb(xve,'ImmutableCollection/Builder',2075);feb(1035,719,awe,dq);var nG=sfb(xve,'ImmutableEnumSet',1035);feb(980,399,yve,fq);_.Xb=function gq(a){return this.a.Xb(a)};var oG=sfb(xve,'ImmutableList/1',980);feb(979,2075,{},hq);var pG=sfb(xve,'ImmutableList/Builder',979);feb(623,204,wve,iq);_.Ob=function jq(){return this.a.Ob()};_.Pb=function kq(){return RD(this.a.Pb(),44).ld()};var rG=sfb(xve,'ImmutableMap/1',623);feb(1054,1,{},lq);_.Kb=function mq(a){return RD(a,44).ld()};var sG=sfb(xve,'ImmutableMap/2methodref$getKey$Type',1054);feb(1053,1,{},oq);var tG=sfb(xve,'ImmutableMap/Builder',1053);feb(2098,2079,awe);_.Md=function pq(){var a;return a=this.b,!a?(this.b=new Xq(this)):a};_.Nd=function qq(){return new Fx(this,Ee(this,$C(jJ,rve,1,this.gc(),5,1)))};var BG=sfb(xve,'ImmutableSet/CachingAsList',2098);feb(2099,2098,awe);_.Kc=function uq(){var a;return a=gn(this.a).Od(),new iq(a)};_.Nd=function rq(){return new Xq(this)};_.Jc=function sq(a){var b,c;Qb(a);c=this.gc();for(b=0;b<c;b++){a.Cd(RD(gn(this.a).Md().Xb(b),44).ld())}};_.Od=function tq(){var a;return a=this.b,um(!a?(this.b=new Xq(this)):a,0)};_.Nc=function vq(){return fk(this.gc(),1296,new Vq(this))};var FG=sfb(xve,'IndexedImmutableSet',2099);feb(1230,2099,awe,xq);_.Kc=function Bq(){var a;return a=gn(this.a).Od(),new iq(a)};_.Hc=function yq(a){return this.a._b(a)};_.Jc=function zq(a){Qb(a);Bvb(this.a,new Eq(a))};_.Od=function Aq(){var a;return a=gn(this.a).Od(),new iq(a)};_.gc=function Cq(){return this.a.gc()};_.Nc=function Dq(){return gk(gn(this.a).Nc(),new lq)};var vG=sfb(xve,'ImmutableMapKeySet',1230);feb(1231,1,{},Eq);_.Yd=function Fq(a,b){_l();this.a.Cd(a)};var uG=sfb(xve,'ImmutableMapKeySet/lambda$0$Type',1231);feb(1227,2078,Xve,Gq);_.Kc=function Kq(){return new Pq(this)};_.Md=function Hq(){var a;a=gn(this.a).Md();return new Sq(this,a)};_.Hc=function Iq(a){return a!=null&&Br(new Pq(this),a)};_.Od=function Jq(){return new Pq(this)};_.gc=function Lq(){return this.a.gc()};_.Nc=function Mq(){return gk(gn(this.a).Nc(),new Nq)};var zG=sfb(xve,'ImmutableMapValues',1227);feb(1228,1,{},Nq);_.Kb=function Oq(a){return RD(a,44).md()};var wG=sfb(xve,'ImmutableMapValues/0methodref$getValue$Type',1228);feb(637,204,wve,Pq);_.Ob=function Qq(){return this.a.Ob()};_.Pb=function Rq(){return RD(this.a.Pb(),44).md()};var xG=sfb(xve,'ImmutableMapValues/1',637);feb(1229,2097,Yve,Sq);_.Zd=function Tq(){return this.a};_.Xb=function Uq(a){return RD(this.b.Xb(a),44).md()};var yG=sfb(xve,'ImmutableMapValues/2',1229);feb(1232,1,{},Vq);_.td=function Wq(a){return wq(this.a,a)};var DG=sfb(xve,'IndexedImmutableSet/0methodref$get$Type',1232);feb(638,2097,Yve,Xq);_.Zd=function Yq(){return this.a};_.Xb=function Zq(a){return wq(this.a,a)};_.gc=function $q(){return this.a.a.gc()};var EG=sfb(xve,'IndexedImmutableSet/1',638);feb(43,1,{},ir);_.Kb=function jr(a){return RD(a,20).Kc()};_.Fb=function kr(a){return this===a};var GG=sfb(xve,'Iterables/10',43);feb(1055,547,Vve,mr);_.Jc=function nr(a){Qb(a);this.b.Jc(new qr(this.a,a))};_.Kc=function or(){return lr(this)};var IG=sfb(xve,'Iterables/4',1055);feb(1056,1,Qve,qr);_.Cd=function rr(a){pr(this.b,this.a,a)};var HG=sfb(xve,'Iterables/4/lambda$0$Type',1056);feb(1057,547,Vve,sr);_.Jc=function tr(a){Qb(a);xgb(this.a,new vr(a,this.b))};_.Kc=function ur(){return Mr(new dMd(this.a),this.b)};var KG=sfb(xve,'Iterables/5',1057);feb(1058,1,Qve,vr);_.Cd=function wr(a){this.a.Cd(Ksd(a))};var JG=sfb(xve,'Iterables/5/lambda$0$Type',1058);feb(1087,204,wve,Or);_.Ob=function Pr(){return this.a.Ob()};_.Pb=function Qr(){return this.a.Pb()};var LG=sfb(xve,'Iterators/1',1087);feb(1088,713,wve,Rr);_.Yb=function Sr(){var a;while(this.b.Ob()){a=this.b.Pb();if(this.a.Lb(a)){return a}}return this.e=2,null};var MG=sfb(xve,'Iterators/5',1088);feb(497,1,Ave);_.Nb=function Ur(a){Ztb(this,a)};_.Ob=function Vr(){return this.b.Ob()};_.Pb=function Wr(){return this.$d(this.b.Pb())};_.Qb=function Xr(){this.b.Qb()};var cI=sfb(xve,'TransformedIterator',497);feb(1089,497,Ave,Yr);_.$d=function Zr(a){return this.a.Kb(a)};var NG=sfb(xve,'Iterators/6',1089);feb(732,204,wve,$r);_.Ob=function _r(){return !this.a};_.Pb=function as(){if(this.a){throw Adb(new Dvb)}this.a=true;return this.b};_.a=false;var OG=sfb(xve,'Iterators/9',732);feb(1086,399,yve,ds);_.Xb=function es(a){return this.a[this.b+a]};_.b=0;var bs;var PG=sfb(xve,'Iterators/ArrayItr',1086);feb(38,1,{38:1,51:1},is);_.Nb=function js(a){Ztb(this,a)};_.Ob=function ks(){return gs(this)};_.Pb=function ls(){return hs(this)};_.Qb=function ms(){if(!this.c){throw Adb(new dgb(tve))}this.c.Qb();this.c=null};var QG=sfb(xve,'Iterators/ConcatenatedIterator',38);feb(22,1,{3:1,34:1,22:1});_.Fd=function rs(a){return ns(this,RD(a,22))};_.Fb=function ts(a){return this===a};_.Hb=function us(){return kFb(this)};_.Ib=function vs(){return ps(this)};_.g=0;var WI=sfb(mve,'Enum',22);feb(549,22,{549:1,3:1,34:1,22:1,51:1},As);_.Nb=function Bs(a){Ztb(this,a)};_.Ob=function Cs(){return false};_.Pb=function Ds(){throw Adb(new Dvb)};_.Qb=function Es(){Vb(false)};var ys;var RG=tfb(xve,'Iterators/EmptyModifiableIterator',549,WI,Gs,Fs);var Hs;feb(1907,627,zve);var XG=sfb(xve,'LinkedHashMultimapGwtSerializationDependencies',1907);feb(1908,1907,zve,Ks);_.hc=function Ms(){return new Jub(Sv(this.b))};_.$b=function Ls(){Nc(this);Ss(this.a,this.a)};_.pd=function Ns(){return new Jub(Sv(this.b))};_.ic=function Os(a){return new it(this,a,this.b)};_.kc=function Ps(){return new Zs(this)};_.lc=function Qs(){var a;return new Swb((a=this.g,RD(!a?(this.g=new xh(this)):a,21)),17)};_.ec=function Rs(){var a;return a=this.i,!a?(this.i=new zf(this,this.c)):a};_.nc=function Us(){return new cw(new Zs(this))};_.oc=function Vs(){var a;return gk(new Swb((a=this.g,RD(!a?(this.g=new xh(this)):a,21)),17),new Ws)};_.b=2;var YG=sfb(xve,'LinkedHashMultimap',1908);feb(1911,1,{},Ws);_.Kb=function Xs(a){return RD(a,44).md()};var SG=sfb(xve,'LinkedHashMultimap/0methodref$getValue$Type',1911);feb(834,1,Ave,Zs);_.Nb=function $s(a){Ztb(this,a)};_.Pb=function at(){return Ys(this)};_.Ob=function _s(){return this.a!=this.b.a};_.Qb=function bt(){Vb(!!this.c);Gc(this.b,this.c.g,this.c.i);this.c=null};var TG=sfb(xve,'LinkedHashMultimap/1',834);feb(227,246,{358:1,246:1,227:1,604:1,3:1,44:1},ct);_._d=function dt(){return RD(Hvb(this.f),604)};_.ae=function et(a){this.c=a};_.be=function ft(a){this.f=a};_.d=0;var UG=sfb(xve,'LinkedHashMultimap/ValueEntry',227);feb(1909,2068,{604:1,20:1,31:1,16:1,21:1},it);_.Fc=function jt(a){var b,c,d,e,f;f=Ydb(Ndb(cwe,qgb(Ydb(Ndb(a==null?0:tb(a),dwe)),15)));b=f&this.b.length-1;e=this.b[b];for(c=e;c;c=c.a){if(c.d==f&&Hb(c.i,a)){return false}}d=new ct(this.c,a,f,e);Ts(this.d,d);d.f=this;this.d=d;Ss(RD(Hvb(this.g.a.b),227),d);Ss(d,this.g.a);this.b[b]=d;++this.f;++this.e;gt(this);return true};_.$b=function kt(){var a,b;Mnb(this.b,null);this.f=0;for(a=this.a;a!=this;a=a._d()){b=RD(a,227);Ss(RD(Hvb(b.b),227),RD(Hvb(b.e),227))}this.a=this;this.d=this;++this.e};_.Hc=function lt(a){var b,c;c=Ydb(Ndb(cwe,qgb(Ydb(Ndb(a==null?0:tb(a),dwe)),15)));for(b=this.b[c&this.b.length-1];b;b=b.a){if(b.d==c&&Hb(b.i,a)){return true}}return false};_.Jc=function mt(a){var b;Qb(a);for(b=this.a;b!=this;b=b._d()){a.Cd(RD(b,227).i)}};_._d=function nt(){return this.a};_.Kc=function ot(){return new ut(this)};_.Mc=function pt(a){return ht(this,a)};_.ae=function qt(a){this.d=a};_.be=function rt(a){this.a=a};_.gc=function st(){return this.f};_.e=0;_.f=0;var WG=sfb(xve,'LinkedHashMultimap/ValueSet',1909);feb(1910,1,Ave,ut);_.Nb=function vt(a){Ztb(this,a)};_.Ob=function wt(){return tt(this),this.b!=this.c};_.Pb=function xt(){var a,b;tt(this);if(this.b==this.c){throw Adb(new Dvb)}a=RD(this.b,227);b=a.i;this.d=a;this.b=RD(Hvb(a.f),604);return b};_.Qb=function yt(){tt(this);Vb(!!this.d);ht(this.c,this.d.i);this.a=this.c.e;this.d=null};_.a=0;var VG=sfb(xve,'LinkedHashMultimap/ValueSet/1',1910);feb(780,2084,zve,Et);_.Zb=function Ft(){var a;return a=this.f,!a?(this.f=new zw(this)):a};_.Fb=function Kt(a){return xw(this,a)};_.cc=function Lt(a){return new su(this,a)};_.fc=function Ot(a){return Ct(this,a)};_.$b=function Gt(){At(this)};_._b=function Ht(a){return Bt(this,a)};_.ac=function It(){return new zw(this)};_.bc=function Jt(){return new vu(this)};_.qc=function Mt(a){return new su(this,a)};_.dc=function Nt(){return !this.a};_.rc=function Pt(a){return Ct(this,a)};_.gc=function Qt(){return this.d};_.c=0;_.d=0;var dH=sfb(xve,'LinkedListMultimap',780);feb(56,31,kwe);_.jd=function eu(a){tvb(this,a)};_.Nc=function fu(){return new Swb(this,16)};_.bd=function Tt(a,b){throw Adb(new kib('Add not supported on this list'))};_.Fc=function Ut(a){this.bd(this.gc(),a);return true};_.cd=function Vt(a,b){var c,d,e;uFb(b);c=false;for(e=b.Kc();e.Ob();){d=e.Pb();this.bd(a++,d);c=true}return c};_.$b=function Wt(){this.ce(0,this.gc())};_.Fb=function Xt(a){return Rt(this,a)};_.Hb=function Yt(){return Cob(this)};_.dd=function Zt(a){return St(this,a)};_.Kc=function $t(){return new Dkb(this)};_.ed=function _t(){return this.fd(0)};_.fd=function au(a){return new Jkb(this,a)};_.gd=function bu(a){throw Adb(new kib('Remove not supported on this list'))};_.ce=function cu(a,b){var c,d;d=this.fd(a);for(c=a;c<b;++c){d.Pb();d.Qb()}};_.hd=function du(a,b){throw Adb(new kib('Set not supported on this list'))};_.kd=function gu(a,b){return new Rkb(this,a,b)};_.j=0;var CJ=sfb(Bve,'AbstractList',56);feb(2062,56,kwe);_.bd=function lu(a,b){hu(this,a,b)};_.cd=function mu(a,b){return iu(this,a,b)};_.Xb=function nu(a){return ju(this,a)};_.Kc=function ou(){return this.fd(0)};_.gd=function pu(a){return ku(this,a)};_.hd=function qu(b,c){var d,e;d=this.fd(b);try{e=d.Pb();d.Wb(c);return e}catch(a){a=zdb(a);if(ZD(a,112)){throw Adb(new veb("Can't set element "+b))}else throw Adb(a)}};var QJ=sfb(Bve,'AbstractSequentialList',2062);feb(646,2062,kwe,su);_.fd=function tu(a){return ru(this,a)};_.gc=function uu(){var a;a=RD(Wjb(this.a.b,this.b),260);return !a?0:a.a};var $G=sfb(xve,'LinkedListMultimap/1',646);feb(1316,2068,Fve,vu);_.Hc=function wu(a){return Bt(this.a,a)};_.Kc=function xu(){return new Bu(this.a)};_.Mc=function yu(a){return !Ct(this.a,a).a.dc()};_.gc=function zu(){return bkb(this.a.b)};var ZG=sfb(xve,'LinkedListMultimap/1KeySetImpl',1316);feb(1315,1,Ave,Bu);_.Nb=function Cu(a){Ztb(this,a)};_.Ob=function Du(){Au(this);return !!this.c};_.Pb=function Eu(){Au(this);if(!this.c){throw Adb(new Dvb)}this.a=this.c;Ysb(this.d,this.a.a);do{this.c=this.c.b}while(!!this.c&&!Ysb(this.d,this.c.a));return this.a.a};_.Qb=function Fu(){Au(this);Vb(!!this.a);Ar(new Nu(this.e,this.a.a));this.a=null;this.b=this.e.c};_.b=0;var _G=sfb(xve,'LinkedListMultimap/DistinctKeyIterator',1315);feb(260,1,{260:1},Gu);_.a=0;var aH=sfb(xve,'LinkedListMultimap/KeyList',260);feb(511,358,{358:1,511:1,44:1},Hu);_.ld=function Iu(){return this.a};_.md=function Ju(){return this.f};_.nd=function Ku(a){var b;b=this.f;this.f=a;return b};var bH=sfb(xve,'LinkedListMultimap/Node',511);feb(566,1,Jve,Nu,Ou);_.Nb=function Qu(a){Ztb(this,a)};_.Rb=function Pu(a){this.e=zt(this.f,this.b,a,this.c);++this.d;this.a=null};_.Ob=function Ru(){return !!this.c};_.Sb=function Su(){return !!this.e};_.Pb=function Tu(){return Lu(this)};_.Tb=function Uu(){return this.d};_.Ub=function Vu(){return Mu(this)};_.Vb=function Wu(){return this.d-1};_.Qb=function Xu(){Vb(!!this.a);if(this.a!=this.c){this.e=this.a.e;--this.d}else{this.c=this.a.c}Dt(this.f,this.a);this.a=null};_.Wb=function Yu(a){Ub(!!this.a);this.a.f=a};_.d=0;var cH=sfb(xve,'LinkedListMultimap/ValueForKeyIterator',566);feb(1031,56,kwe);_.bd=function iv(a,b){this.a.bd(a,b)};_.cd=function jv(a,b){return this.a.cd(a,b)};_.Hc=function kv(a){return this.a.Hc(a)};_.Xb=function lv(a){return this.a.Xb(a)};_.gd=function mv(a){return this.a.gd(a)};_.hd=function nv(a,b){return this.a.hd(a,b)};_.gc=function ov(){return this.a.gc()};var fH=sfb(xve,'Lists/AbstractListWrapper',1031);feb(1032,1031,mwe);var gH=sfb(xve,'Lists/RandomAccessListWrapper',1032);feb(1034,1032,mwe,pv);_.fd=function qv(a){return this.a.fd(a)};var eH=sfb(xve,'Lists/1',1034);feb(441,56,{441:1,20:1,31:1,56:1,16:1,15:1},uv);_.bd=function vv(a,b){this.a.bd(tv(this,a),b)};_.$b=function wv(){this.a.$b()};_.Xb=function xv(a){return this.a.Xb(sv(this,a))};_.Kc=function yv(){return rv(this,0)};_.fd=function zv(a){return rv(this,a)};_.gd=function Av(a){return this.a.gd(sv(this,a))};_.ce=function Bv(a,b){(Tb(a,b,this.a.gc()),hv(this.a.kd(tv(this,b),tv(this,a)))).$b()};_.hd=function Cv(a,b){return this.a.hd(sv(this,a),b)};_.gc=function Dv(){return this.a.gc()};_.kd=function Ev(a,b){return Tb(a,b,this.a.gc()),hv(this.a.kd(tv(this,b),tv(this,a)))};var jH=sfb(xve,'Lists/ReverseList',441);feb(1030,441,{441:1,20:1,31:1,56:1,16:1,15:1,59:1},Fv);var hH=sfb(xve,'Lists/RandomAccessReverseList',1030);feb(1033,1,Jve,Gv);_.Nb=function Iv(a){Ztb(this,a)};_.Rb=function Hv(a){this.c.Rb(a);this.c.Ub();this.a=false};_.Ob=function Jv(){return this.c.Sb()};_.Sb=function Kv(){return this.c.Ob()};_.Pb=function Lv(){if(!this.c.Sb()){throw Adb(new Dvb)}this.a=true;return this.c.Ub()};_.Tb=function Mv(){return tv(this.b,this.c.Tb())};_.Ub=function Nv(){if(!this.c.Ob()){throw Adb(new Dvb)}this.a=true;return this.c.Pb()};_.Vb=function Ov(){return tv(this.b,this.c.Tb())-1};_.Qb=function Pv(){Vb(this.a);this.c.Qb();this.a=false};_.Wb=function Qv(a){Ub(this.a);this.c.Wb(a)};_.a=false;var iH=sfb(xve,'Lists/ReverseList/1',1033);feb(440,497,Ave,aw);_.$d=function bw(a){return _v(a)};var kH=sfb(xve,'Maps/1',440);feb(712,497,Ave,cw);_.$d=function dw(a){return RD(a,44).md()};var lH=sfb(xve,'Maps/2',712);feb(975,497,Ave,ew);_.$d=function fw(a){return new gp(a,Mw(this.a,a))};var mH=sfb(xve,'Maps/3',975);feb(972,2069,Fve,gw);_.Jc=function hw(a){uj(this.a,a)};_.Kc=function iw(){return this.a.kc()};_.Rc=function jw(){return this.a};_.Nc=function kw(){return this.a.lc()};var oH=sfb(xve,'Maps/IteratorBasedAbstractMap/1',972);feb(973,1,{},lw);_.Yd=function mw(a,b){this.a.Cd(a)};var qH=sfb(xve,'Maps/KeySet/lambda$0$Type',973);feb(971,31,Dve,nw);_.$b=function ow(){this.a.$b()};_.Hc=function pw(a){return this.a.uc(a)};_.Jc=function qw(a){Qb(a);this.a.wc(new vw(a))};_.dc=function rw(){return this.a.dc()};_.Kc=function sw(){return new cw(this.a.vc().Kc())};_.Mc=function tw(b){var c,d;try{return ze(this,b,true)}catch(a){a=zdb(a);if(ZD(a,48)){for(d=this.a.vc().Kc();d.Ob();){c=RD(d.Pb(),44);if(Hb(b,c.md())){this.a.Bc(c.ld());return true}}return false}else throw Adb(a)}};_.gc=function uw(){return this.a.gc()};var tH=sfb(xve,'Maps/Values',971);feb(974,1,{},vw);_.Yd=function ww(a,b){this.a.Cd(b)};var sH=sfb(xve,'Maps/Values/lambda$0$Type',974);feb(752,2085,Cve,zw);_.xc=function Dw(a){return this.a._b(a)?this.a.cc(a):null};_.Bc=function Gw(a){return this.a._b(a)?this.a.fc(a):null};_.$b=function Aw(){this.a.$b()};_._b=function Bw(a){return this.a._b(a)};_.Ec=function Cw(){return new Iw(this)};_.Dc=function(){return this.Ec()};_.dc=function Ew(){return this.a.dc()};_.ec=function Fw(){return this.a.ec()};_.gc=function Hw(){return this.a.ec().gc()};var xH=sfb(xve,'Multimaps/AsMap',752);feb(1134,2069,Fve,Iw);_.Kc=function Jw(){return Rv(this.a.a.ec(),new Nw(this))};_.Rc=function Kw(){return this.a};_.Mc=function Lw(a){var b;if(!Ze(this,a)){return false}b=RD(Hvb(RD(a,44)),44);yw(this.a,b.ld());return true};var wH=sfb(xve,'Multimaps/AsMap/EntrySet',1134);feb(1138,1,{},Nw);_.Kb=function Ow(a){return Mw(this,a)};_.Fb=function Pw(a){return this===a};var vH=sfb(xve,'Multimaps/AsMap/EntrySet/1',1138);feb(552,2087,{552:1,849:1,20:1,31:1,16:1},Sw);_.$b=function Tw(){Nc(this.a)};_.Hc=function Uw(a){return Oc(this.a,a)};_.Jc=function Vw(a){Qb(a);xgb(Pc(this.a),new fx(a))};_.Kc=function Ww(){return new aw(Pc(this.a).a.kc())};_.gc=function Xw(){return this.a.d};_.Nc=function Yw(){return gk(Pc(this.a).Nc(),new Zw)};var DH=sfb(xve,'Multimaps/Keys',552);feb(1136,1,{},Zw);_.Kb=function $w(a){return RD(a,44).ld()};var zH=sfb(xve,'Multimaps/Keys/0methodref$getKey$Type',1136);feb(1135,497,Ave,_w);_.$d=function ax(a){return new ex(RD(a,44))};var BH=sfb(xve,'Multimaps/Keys/1',1135);feb(2088,1,{425:1});_.Fb=function bx(a){var b;if(ZD(a,504)){b=RD(a,425);return RD(this.a.md(),16).gc()==RD(b.a.md(),16).gc()&&Hb(this.a.ld(),b.a.ld())}return false};_.Hb=function cx(){var a;a=this.a.ld();return (a==null?0:tb(a))^RD(this.a.md(),16).gc()};_.Ib=function dx(){var a,b;b=Ghb(this.a.ld());a=RD(this.a.md(),16).gc();return a==1?b:b+' x '+a};var HH=sfb(xve,'Multisets/AbstractEntry',2088);feb(504,2088,{504:1,425:1},ex);var AH=sfb(xve,'Multimaps/Keys/1/1',504);feb(1137,1,Qve,fx);_.Cd=function gx(a){this.a.Cd(RD(a,44).ld())};var CH=sfb(xve,'Multimaps/Keys/lambda$1$Type',1137);feb(1140,1,Qve,jx);_.Cd=function kx(a){hx(RD(a,425))};var EH=sfb(xve,'Multiset/lambda$0$Type',1140);feb(753,1,Qve,lx);_.Cd=function mx(a){ix(this.a,RD(a,425))};var FH=sfb(xve,'Multiset/lambda$1$Type',753);feb(1141,1,{},rx);var GH=sfb(xve,'Multisets/0methodref$add$Type',1141);feb(754,1,{},sx);_.Kb=function tx(a){return px(RD(a,425))};var JH=sfb(xve,'Multisets/lambda$1$Type',754);feb(2106,1,nve);var KH=sfb(xve,'RangeGwtSerializationDependencies',2106);feb(521,2106,{178:1,521:1,3:1,46:1},wx);_.Lb=function xx(a){return vx(this,RD(a,34))};_.Mb=function Bx(a){return vx(this,RD(a,34))};_.Fb=function zx(a){var b;if(ZD(a,521)){b=RD(a,521);return Pk(this.a,b.a)&&Pk(this.b,b.b)}return false};_.Hb=function Ax(){return this.a.Hb()*31+this.b.Hb()};_.Ib=function Cx(){return Dx(this.a,this.b)};var LH=sfb(xve,'Range',521);feb(654,2097,Yve,Fx);_.fd=function Jx(a){return um(this.b,a)};_.Zd=function Gx(){return this.a};_.Xb=function Hx(a){return Qm(this.b,a)};_.Pd=function Ix(a){return um(this.b,a)};var MH=sfb(xve,'RegularImmutableAsList',654);feb(656,2105,Yve,Kx);_.Rd=function Lx(){return this.a};var NH=sfb(xve,'RegularImmutableList',656);feb(548,730,$ve,Mx,Nx);var OH=sfb(xve,'RegularImmutableMap',548);feb(731,719,awe,Qx);var Ox;var PH=sfb(xve,'RegularImmutableSet',731);feb(2074,Eve,Fve);_.Kc=function by(){return new oy(this.a,this.b)};_.Fc=function $x(a){throw Adb(new jib)};_.Gc=function _x(a){throw Adb(new jib)};_.$b=function ay(){throw Adb(new jib)};_.Mc=function cy(a){throw Adb(new jib)};var VH=sfb(xve,'Sets/SetView',2074);feb(976,2074,Fve,ey);_.Kc=function iy(){return new oy(this.a,this.b)};_.Hc=function fy(a){return Bsb(this.a,a)&&this.b.Hc(a)};_.Ic=function gy(a){return Be(this.a,a)&&this.b.Ic(a)};_.dc=function hy(){return Aob(this.b,this.a)};_.Lc=function jy(){return CDb(new SDb(null,new Swb(this.a,1)),new qy(this.b))};_.gc=function ky(){return dy(this)};_.Oc=function ly(){return CDb(new SDb(null,new Swb(this.a,1)),new my(this.b))};var TH=sfb(xve,'Sets/2',976);feb(977,1,nwe,my);_.Mb=function ny(a){return this.a.Hc(a)};var QH=sfb(xve,'Sets/2/0methodref$contains$Type',977);feb(714,713,wve,oy);_.Yb=function py(){var a;while(Msb(this.a)){a=Nsb(this.a);if(this.c.Hc(a)){return a}}return this.e=2,null};var RH=sfb(xve,'Sets/2/1',714);feb(978,1,nwe,qy);_.Mb=function ry(a){return this.a.Hc(a)};var SH=sfb(xve,'Sets/2/1methodref$contains$Type',978);feb(616,2073,{616:1,3:1,20:1,16:1,277:1,21:1,87:1},sy);_.Kd=function ty(){return this.b};_.Ld=function uy(){return this.b};_.Wd=function vy(){return this.b};_.Jc=function wy(a){this.a.Jc(a)};_.Lc=function xy(){return this.a.Lc()};_.Oc=function yy(){return this.a.Oc()};var WH=sfb(xve,'Sets/UnmodifiableNavigableSet',616);feb(2031,2030,$ve,zy);_.Vd=function Ay(){return _l(),new Fy(this.a)};_.Cc=function By(){return _l(),new Fy(this.a)};_.xd=function Cy(){return _l(),new Fy(this.a)};var XH=sfb(xve,'SingletonImmutableBiMap',2031);feb(657,2105,Yve,Dy);_.Rd=function Ey(){return this.a};var YH=sfb(xve,'SingletonImmutableList',657);feb(363,2079,awe,Fy);_.Kc=function Iy(){return new $r(this.a)};_.Hc=function Gy(a){return pb(this.a,a)};_.Od=function Hy(){return new $r(this.a)};_.gc=function Jy(){return 1};var ZH=sfb(xve,'SingletonImmutableSet',363);feb(1148,1,{},My);_.Kb=function Ny(a){return RD(a,159)};var _H=sfb(xve,'Streams/lambda$0$Type',1148);feb(1149,1,owe,Oy);_.de=function Py(){Ky(this.a)};var aI=sfb(xve,'Streams/lambda$1$Type',1149);feb(1725,1724,zve,Ry);_.Zb=function Sy(){var a;return a=this.f,RD(RD(!a?(this.f=ZD(this.c,139)?new Uf(this,RD(this.c,139)):ZD(this.c,133)?new Mf(this,RD(this.c,133)):new ne(this,this.c)):a,133),139)};_.hc=function Vy(){return new yAb(this.b)};_.pd=function Wy(){return new yAb(this.b)};_.ec=function Yy(){var a;return a=this.i,RD(RD(!a?(this.i=ZD(this.c,139)?new gg(this,RD(this.c,139)):ZD(this.c,133)?new eg(this,RD(this.c,133)):new zf(this,this.c)):a,87),277)};_.ac=function Uy(){return ZD(this.c,139)?new Uf(this,RD(this.c,139)):ZD(this.c,133)?new Mf(this,RD(this.c,133)):new ne(this,this.c)};_.ic=function Xy(a){a==null&&this.a.Ne(a,a);return new yAb(this.b)};var dI=sfb(xve,'TreeMultimap',1725);feb(82,1,{3:1,82:1});_.ee=function pz(a){return new Error(a)};_.fe=function rz(){return this.e};_.ge=function sz(){var a,b,c;c=(this.k==null&&(this.k=$C(rJ,Nve,82,0,0,1)),this.k);b=$C(jJ,rve,1,c.length,5,1);for(a=0;a<c.length;a++){b[a]=c[a].e}return b};_.he=function tz(){return this.f};_.ie=function uz(){return this.g};_.je=function vz(){kz(this,qz(this.ee(lz(this,this.g))));gA(this)};_.Ib=function wz(){return lz(this,this.ie())};_.e=rwe;_.i=false;_.n=true;var rJ=sfb(mve,'Throwable',82);feb(103,82,{3:1,103:1,82:1});var YI=sfb(mve,'Exception',103);feb(63,103,swe,xz,yz);var kJ=sfb(mve,'RuntimeException',63);feb(607,63,swe);var dJ=sfb(mve,'JsException',607);feb(875,607,swe);var jI=sfb(twe,'JavaScriptExceptionBase',875);feb(486,875,{486:1,3:1,103:1,63:1,82:1},Cz);_.ie=function Fz(){Bz(this);return this.c};_.ke=function Gz(){return dE(this.b)===dE(zz)?null:this.b};var zz;var gI=sfb(vwe,'JavaScriptException',486);var hI=sfb(vwe,'JavaScriptObject$',0);var Jz;feb(2047,1,{});var iI=sfb(vwe,'Scheduler',2047);var Nz=0,Oz=0,Pz=-1;feb(902,2047,{},bA);var Zz;var kI=sfb(twe,'SchedulerImpl',902);var eA;feb(2058,1,{});var oI=sfb(twe,'StackTraceCreator/Collector',2058);feb(876,2058,{},mA);_.le=function nA(a){var b={},j;var c=[];a[xwe]=c;var d=arguments.callee.caller;while(d){var e=(fA(),d.name||(d.name=iA(d.toString())));c.push(e);var f=':'+e;var g=b[f];if(g){var h,i;for(h=0,i=g.length;h<i;h++){if(g[h]===d){return}}}(g||(b[f]=[])).push(d);d=d.caller}};_.me=function oA(a){var b,c,d,e;d=(fA(),a&&a[xwe]?a[xwe]:[]);c=d.length;e=$C(mJ,Nve,319,c,0,1);for(b=0;b<c;b++){e[b]=new ehb(d[b],null,-1)}return e};var lI=sfb(twe,'StackTraceCreator/CollectorLegacy',876);feb(2059,2058,{});_.le=function qA(a){};_.ne=function rA(a,b,c,d){return new ehb(b,a+'@'+d,c<0?-1:c)};_.me=function sA(a){var b,c,d,e,f,g;e=kA(a);f=$C(mJ,Nve,319,0,0,1);b=0;d=e.length;if(d==0){return f}g=pA(this,e[0]);lhb(g.d,wwe)||(f[b++]=g);for(c=1;c<d;c++){f[b++]=pA(this,e[c])}return f};var nI=sfb(twe,'StackTraceCreator/CollectorModern',2059);feb(877,2059,{},tA);_.ne=function uA(a,b,c,d){return new ehb(b,a,-1)};var mI=sfb(twe,'StackTraceCreator/CollectorModernNoSourceMap',877);feb(1064,1,{});var vI=sfb(Zwe,$we,1064);feb(624,1064,{624:1},XA);var VA;var pI=sfb(_we,$we,624);feb(2101,1,{});var wI=sfb(Zwe,axe,2101);feb(2102,2101,{});var qI=sfb(_we,axe,2102);feb(1120,1,{},aB);var ZA;var rI=sfb(_we,'LocaleInfo',1120);feb(2027,1,{},dB);_.a=0;var sI=sfb(_we,'TimeZone',2027);feb(1293,2102,{},jB);var tI=sfb('com.google.gwt.i18n.client.impl.cldr','DateTimeFormatInfoImpl',1293);feb(443,1,{443:1},kB);_.a=false;_.b=0;var uI=sfb(Zwe,'DateTimeFormat/PatternPart',443);feb(206,1,bxe,uB,vB,wB);_.Fd=function xB(a){return lB(this,RD(a,206))};_.Fb=function yB(a){return ZD(a,206)&&Gdb(Hdb(this.q.getTime()),Hdb(RD(a,206).q.getTime()))};_.Hb=function zB(){var a;a=Hdb(this.q.getTime());return Ydb($db(a,Udb(a,32)))};_.Ib=function BB(){var a,b,c;c=-this.q.getTimezoneOffset();a=(c>=0?'+':'')+(c/60|0);b=AB($wnd.Math.abs(c)%60);return (Mrb(),Krb)[this.q.getDay()]+' '+Lrb[this.q.getMonth()]+' '+AB(this.q.getDate())+' '+AB(this.q.getHours())+':'+AB(this.q.getMinutes())+':'+AB(this.q.getSeconds())+' GMT'+a+b+' '+this.q.getFullYear()};var qK=sfb(Bve,'Date',206);feb(2015,206,bxe,DB);_.a=false;_.b=0;_.c=0;_.d=0;_.e=0;_.f=0;_.g=false;_.i=0;_.j=0;_.k=0;_.n=0;_.o=0;_.p=0;var xI=sfb('com.google.gwt.i18n.shared.impl','DateRecord',2015);feb(2064,1,{});_.pe=function EB(){return null};_.qe=function FB(){return null};_.re=function GB(){return null};_.se=function HB(){return null};_.te=function IB(){return null};var GI=sfb(cxe,'JSONValue',2064);feb(221,2064,{221:1},MB,NB);_.Fb=function OB(a){if(!ZD(a,221)){return false}return Hz(this.a,RD(a,221).a)};_.oe=function PB(){return TB};_.Hb=function QB(){return Iz(this.a)};_.pe=function RB(){return this};_.Ib=function SB(){var a,b,c;c=new dib('[');for(b=0,a=this.a.length;b<a;b++){b>0&&(c.a+=',',c);Yhb(c,JB(this,b))}c.a+=']';return c.a};var yI=sfb(cxe,'JSONArray',221);feb(493,2064,{493:1},XB);_.oe=function YB(){return _B};_.qe=function ZB(){return this};_.Ib=function $B(){return Geb(),''+this.a};_.a=false;var UB,VB;var zI=sfb(cxe,'JSONBoolean',493);feb(997,63,swe,aC);var AI=sfb(cxe,'JSONException',997);feb(1036,2064,{},dC);_.oe=function eC(){return gC};_.Ib=function fC(){return vve};var bC;var BI=sfb(cxe,'JSONNull',1036);feb(263,2064,{263:1},hC);_.Fb=function iC(a){if(!ZD(a,263)){return false}return this.a==RD(a,263).a};_.oe=function jC(){return nC};_.Hb=function kC(){return Nfb(this.a)};_.re=function lC(){return this};_.Ib=function mC(){return this.a+''};_.a=0;var CI=sfb(cxe,'JSONNumber',263);feb(190,2064,{190:1},uC,vC);_.Fb=function wC(a){if(!ZD(a,190)){return false}return Hz(this.a,RD(a,190).a)};_.oe=function xC(){return BC};_.Hb=function yC(){return Iz(this.a)};_.se=function zC(){return this};_.Ib=function AC(){var a,b,c,d,e,f,g;g=new dib('{');a=true;f=oC(this,$C(qJ,Nve,2,0,6,1));for(c=f,d=0,e=c.length;d<e;++d){b=c[d];a?(a=false):(g.a+=pve,g);Zhb(g,Lz(b));g.a+=':';Yhb(g,qC(this,b))}g.a+='}';return g.a};var EI=sfb(cxe,'JSONObject',190);feb(605,Eve,Fve,CC);_.Hc=function DC(a){return bE(a)&&pC(this.a,WD(a))};_.Kc=function EC(){return new Dkb(new mob(this.b))};_.gc=function FC(){return this.b.length};var DI=sfb(cxe,'JSONObject/1',605);var GC;feb(211,2064,{211:1},OC);_.Fb=function PC(a){if(!ZD(a,211)){return false}return lhb(this.a,RD(a,211).a)};_.oe=function QC(){return UC};_.Hb=function RC(){return ohb(this.a)};_.te=function SC(){return this};_.Ib=function TC(){return Lz(this.a)};var FI=sfb(cxe,'JSONString',211);var eD;var ID,JD,KD,LD;feb(2060,1,{533:1});var II=sfb(kxe,'OutputStream',2060);feb(2061,2060,{533:1});var HI=sfb(kxe,'FilterOutputStream',2061);feb(878,2061,{533:1},oeb);var JI=sfb(kxe,'PrintStream',878);feb(427,1,{484:1});_.Ib=function seb(){return this.a};var KI=sfb(mve,'AbstractStringBuilder',427);feb(538,63,swe,teb);var LI=sfb(mve,'ArithmeticException',538);feb(77,63,lxe,ueb,veb);var aJ=sfb(mve,'IndexOutOfBoundsException',77);feb(333,77,{3:1,333:1,103:1,77:1,63:1,82:1},web,xeb);var MI=sfb(mve,'ArrayIndexOutOfBoundsException',333);feb(537,63,swe,yeb,zeb);var NI=sfb(mve,'ArrayStoreException',537);feb(296,82,mxe,Aeb);var XI=sfb(mve,'Error',296);feb(200,296,mxe,Ceb,Deb);var OI=sfb(mve,'AssertionError',200);ND={3:1,485:1,34:1};var Eeb,Feb;var QI=sfb(mve,'Boolean',485);feb(242,1,{3:1,242:1});var Meb;var iJ=sfb(mve,'Number',242);feb(222,242,{3:1,222:1,34:1,242:1},Seb);_.Fd=function Teb(a){return Reb(this,RD(a,222))};_.ue=function Ueb(){return this.a};_.Fb=function Veb(a){return ZD(a,222)&&RD(a,222).a==this.a};_.Hb=function Web(){return this.a};_.Ib=function Xeb(){return ''+this.a};_.a=0;var RI=sfb(mve,'Byte',222);var Yeb;feb(180,1,{3:1,180:1,34:1},bfb);_.Fd=function cfb(a){return afb(this,RD(a,180))};_.Fb=function efb(a){return ZD(a,180)&&RD(a,180).a==this.a};_.Hb=function ffb(){return this.a};_.Ib=function gfb(){return String.fromCharCode(this.a)};_.a=0;var _eb;var SI=sfb(mve,'Character',180);var ifb;feb(212,63,{3:1,212:1,103:1,63:1,82:1},Hfb,Ifb);var TI=sfb(mve,'ClassCastException',212);OD={3:1,34:1,345:1,242:1};var VI=sfb(mve,'Double',345);feb(161,242,{3:1,34:1,161:1,242:1},Tfb,Ufb);_.Fd=function Vfb(a){return Sfb(this,RD(a,161))};_.ue=function Wfb(){return this.a};_.Fb=function Xfb(a){return ZD(a,161)&&Lfb(this.a,RD(a,161).a)};_.Hb=function Yfb(){return eE(this.a)};_.Ib=function $fb(){return ''+this.a};_.a=0;var ZI=sfb(mve,'Float',161);feb(33,63,{3:1,103:1,33:1,63:1,82:1},_fb,agb,bgb);var $I=sfb(mve,'IllegalArgumentException',33);feb(73,63,swe,cgb,dgb);var _I=sfb(mve,'IllegalStateException',73);feb(17,242,{3:1,34:1,17:1,242:1},fgb);_.Fd=function igb(a){return egb(this,RD(a,17))};_.ue=function jgb(){return this.a};_.Fb=function kgb(a){return ZD(a,17)&&RD(a,17).a==this.a};_.Hb=function lgb(){return this.a};_.Ib=function rgb(){return ''+this.a};_.a=0;var bJ=sfb(mve,'Integer',17);var tgb;var vgb;feb(168,242,{3:1,34:1,168:1,242:1},zgb);_.Fd=function Bgb(a){return ygb(this,RD(a,168))};_.ue=function Cgb(){return Xdb(this.a)};_.Fb=function Dgb(a){return ZD(a,168)&&Gdb(RD(a,168).a,this.a)};_.Hb=function Egb(){return Fgb(this.a)};_.Ib=function Ggb(){return ''+Zdb(this.a)};_.a=0;var eJ=sfb(mve,'Long',168);var Igb;feb(2140,1,{});feb(1904,63,swe,Mgb);var fJ=sfb(mve,'NegativeArraySizeException',1904);feb(169,607,{3:1,103:1,169:1,63:1,82:1},Ngb,Ogb);_.ee=function Pgb(a){return new TypeError(a)};var gJ=sfb(mve,'NullPointerException',169);var Qgb,Rgb,Sgb,Tgb;feb(130,33,{3:1,103:1,33:1,130:1,63:1,82:1},Vgb);var hJ=sfb(mve,'NumberFormatException',130);feb(191,242,{3:1,34:1,242:1,191:1},Xgb);_.Fd=function Ygb(a){return Wgb(this,RD(a,191))};_.ue=function Zgb(){return this.a};_.Fb=function $gb(a){return ZD(a,191)&&RD(a,191).a==this.a};_.Hb=function _gb(){return this.a};_.Ib=function ahb(){return ''+this.a};_.a=0;var lJ=sfb(mve,'Short',191);var chb;feb(319,1,{3:1,319:1},ehb);_.Fb=function fhb(a){var b;if(ZD(a,319)){b=RD(a,319);return this.c==b.c&&this.d==b.d&&this.a==b.a&&this.b==b.b}return false};_.Hb=function ghb(){return Tnb(cD(WC(jJ,1),rve,1,5,[sgb(this.c),this.a,this.d,this.b]))};_.Ib=function hhb(){return this.a+'.'+this.d+'('+(this.b!=null?this.b:'Unknown Source')+(this.c>=0?':'+this.c:'')+')'};_.c=0;var mJ=sfb(mve,'StackTraceElement',319);PD={3:1,484:1,34:1,2:1};var qJ=sfb(mve,uwe,2);feb(111,427,{484:1},Qhb,Rhb,Shb);var nJ=sfb(mve,'StringBuffer',111);feb(104,427,{484:1},bib,cib,dib);var oJ=sfb(mve,'StringBuilder',104);feb(702,77,lxe,eib);var pJ=sfb(mve,'StringIndexOutOfBoundsException',702);feb(2145,1,{});var fib;feb(48,63,{3:1,103:1,63:1,82:1,48:1},jib,kib);var sJ=sfb(mve,'UnsupportedOperationException',48);feb(247,242,{3:1,34:1,242:1,247:1},Aib,Bib);_.Fd=function Eib(a){return uib(this,RD(a,247))};_.ue=function Fib(){return Neb(zib(this))};_.Fb=function Gib(a){var b;if(this===a){return true}if(ZD(a,247)){b=RD(a,247);return this.e==b.e&&uib(this,b)==0}return false};_.Hb=function Hib(){var a;if(this.b!=0){return this.b}if(this.a<54){a=Hdb(this.f);this.b=Ydb(Cdb(a,-1));this.b=33*this.b+Ydb(Cdb(Tdb(a,32),-1));this.b=17*this.b+eE(this.e);return this.b}this.b=17*Vib(this.c)+eE(this.e);return this.b};_.Ib=function Iib(){return zib(this)};_.a=0;_.b=0;_.d=0;_.e=0;_.f=0;var lib,mib,nib,oib,pib,qib,rib,sib;var tJ=sfb('java.math','BigDecimal',247);feb(92,242,{3:1,34:1,242:1,92:1},ajb,bjb,cjb,djb,ejb);_.Fd=function gjb(a){return Qib(this,RD(a,92))};_.ue=function hjb(){return Neb(Ajb(this,0))};_.Fb=function ijb(a){return Sib(this,a)};_.Hb=function ljb(){return Vib(this)};_.Ib=function njb(){return Ajb(this,0)};_.b=-2;_.c=0;_.d=0;_.e=0;var Jib,Kib,Lib,Mib,Nib,Oib;var uJ=sfb('java.math','BigInteger',92);var vjb,wjb;var Jjb,Kjb;feb(498,2065,Cve);_.$b=function dkb(){akb(this)};_._b=function ekb(a){return Ujb(this,a)};_.uc=function fkb(a){return Vjb(this,a,this.i)||Vjb(this,a,this.f)};_.vc=function gkb(){return new mkb(this)};_.xc=function hkb(a){return Wjb(this,a)};_.zc=function ikb(a,b){return Zjb(this,a,b)};_.Bc=function jkb(a){return _jb(this,a)};_.gc=function kkb(){return bkb(this)};_.g=0;var yJ=sfb(Bve,'AbstractHashMap',498);feb(267,Eve,Fve,mkb);_.$b=function nkb(){this.a.$b()};_.Hc=function okb(a){return lkb(this,a)};_.Kc=function pkb(){return new vkb(this.a)};_.Mc=function qkb(a){var b;if(lkb(this,a)){b=RD(a,44).ld();this.a.Bc(b);return true}return false};_.gc=function rkb(){return this.a.gc()};var xJ=sfb(Bve,'AbstractHashMap/EntrySet',267);feb(268,1,Ave,vkb);_.Nb=function wkb(a){Ztb(this,a)};_.Pb=function ykb(){return tkb(this)};_.Ob=function xkb(){return this.b};_.Qb=function zkb(){ukb(this)};_.b=false;_.d=0;var wJ=sfb(Bve,'AbstractHashMap/EntrySetIterator',268);feb(426,1,Ave,Dkb);_.Nb=function Ekb(a){Ztb(this,a)};_.Ob=function Fkb(){return Akb(this)};_.Pb=function Gkb(){return Bkb(this)};_.Qb=function Hkb(){Ckb(this)};_.b=0;_.c=-1;var zJ=sfb(Bve,'AbstractList/IteratorImpl',426);feb(98,426,Jve,Jkb);_.Qb=function Pkb(){Ckb(this)};_.Rb=function Kkb(a){Ikb(this,a)};_.Sb=function Lkb(){return this.b>0};_.Tb=function Mkb(){return this.b};_.Ub=function Nkb(){return sFb(this.b>0),this.a.Xb(this.c=--this.b)};_.Vb=function Okb(){return this.b-1};_.Wb=function Qkb(a){yFb(this.c!=-1);this.a.hd(this.c,a)};var AJ=sfb(Bve,'AbstractList/ListIteratorImpl',98);feb(244,56,kwe,Rkb);_.bd=function Skb(a,b){wFb(a,this.b);this.c.bd(this.a+a,b);++this.b};_.Xb=function Tkb(a){tFb(a,this.b);return this.c.Xb(this.a+a)};_.gd=function Ukb(a){var b;tFb(a,this.b);b=this.c.gd(this.a+a);--this.b;return b};_.hd=function Vkb(a,b){tFb(a,this.b);return this.c.hd(this.a+a,b)};_.gc=function Wkb(){return this.b};_.a=0;_.b=0;var BJ=sfb(Bve,'AbstractList/SubList',244);feb(266,Eve,Fve,Xkb);_.$b=function Ykb(){this.a.$b()};_.Hc=function Zkb(a){return this.a._b(a)};_.Kc=function $kb(){var a;return a=this.a.vc().Kc(),new blb(a)};_.Mc=function _kb(a){if(this.a._b(a)){this.a.Bc(a);return true}return false};_.gc=function alb(){return this.a.gc()};var EJ=sfb(Bve,'AbstractMap/1',266);feb(541,1,Ave,blb);_.Nb=function clb(a){Ztb(this,a)};_.Ob=function dlb(){return this.a.Ob()};_.Pb=function elb(){var a;return a=RD(this.a.Pb(),44),a.ld()};_.Qb=function flb(){this.a.Qb()};var DJ=sfb(Bve,'AbstractMap/1/1',541);feb(231,31,Dve,glb);_.$b=function hlb(){this.a.$b()};_.Hc=function ilb(a){return this.a.uc(a)};_.Kc=function jlb(){var a;return a=this.a.vc().Kc(),new llb(a)};_.gc=function klb(){return this.a.gc()};var GJ=sfb(Bve,'AbstractMap/2',231);feb(301,1,Ave,llb);_.Nb=function mlb(a){Ztb(this,a)};_.Ob=function nlb(){return this.a.Ob()};_.Pb=function olb(){var a;return a=RD(this.a.Pb(),44),a.md()};_.Qb=function plb(){this.a.Qb()};var FJ=sfb(Bve,'AbstractMap/2/1',301);feb(494,1,{494:1,44:1});_.Fb=function rlb(a){var b;if(!ZD(a,44)){return false}b=RD(a,44);return Fvb(this.d,b.ld())&&Fvb(this.e,b.md())};_.ld=function slb(){return this.d};_.md=function tlb(){return this.e};_.Hb=function ulb(){return Gvb(this.d)^Gvb(this.e)};_.nd=function vlb(a){return qlb(this,a)};_.Ib=function wlb(){return this.d+'='+this.e};var HJ=sfb(Bve,'AbstractMap/AbstractEntry',494);feb(397,494,{494:1,397:1,44:1},xlb);var IJ=sfb(Bve,'AbstractMap/SimpleEntry',397);feb(2082,1,Axe);_.Fb=function ylb(a){var b;if(!ZD(a,44)){return false}b=RD(a,44);return Fvb(this.ld(),b.ld())&&Fvb(this.md(),b.md())};_.Hb=function zlb(){return Gvb(this.ld())^Gvb(this.md())};_.Ib=function Alb(){return this.ld()+'='+this.md()};var JJ=sfb(Bve,Lve,2082);feb(2090,2065,Gve);_.Xc=function Dlb(a){return Vd(this.Ee(a))};_.tc=function Elb(a){return Blb(this,a)};_._b=function Flb(a){return Clb(this,a)};_.vc=function Glb(){return new Plb(this)};_.Tc=function Hlb(){return Klb(this.Ge())};_.Yc=function Ilb(a){return Vd(this.He(a))};_.xc=function Jlb(a){var b;b=a;return Wd(this.Fe(b))};_.$c=function Llb(a){return Vd(this.Ie(a))};_.ec=function Mlb(){return new Ulb(this)};_.Vc=function Nlb(){return Klb(this.Je())};_._c=function Olb(a){return Vd(this.Ke(a))};var OJ=sfb(Bve,'AbstractNavigableMap',2090);feb(629,Eve,Fve,Plb);_.Hc=function Qlb(a){return ZD(a,44)&&Blb(this.b,RD(a,44))};_.Kc=function Rlb(){return this.b.De()};_.Mc=function Slb(a){var b;if(ZD(a,44)){b=RD(a,44);return this.b.Le(b)}return false};_.gc=function Tlb(){return this.b.gc()};var LJ=sfb(Bve,'AbstractNavigableMap/EntrySet',629);feb(1146,Eve,Ive,Ulb);_.Nc=function $lb(){return new $wb(this)};_.$b=function Vlb(){this.a.$b()};_.Hc=function Wlb(a){return Clb(this.a,a)};_.Kc=function Xlb(){var a;a=this.a.vc().b.De();return new _lb(a)};_.Mc=function Ylb(a){if(Clb(this.a,a)){this.a.Bc(a);return true}return false};_.gc=function Zlb(){return this.a.gc()};var NJ=sfb(Bve,'AbstractNavigableMap/NavigableKeySet',1146);feb(1147,1,Ave,_lb);_.Nb=function amb(a){Ztb(this,a)};_.Ob=function bmb(){return Akb(this.a.a)};_.Pb=function cmb(){var a;a=vzb(this.a);return a.ld()};_.Qb=function dmb(){wzb(this.a)};var MJ=sfb(Bve,'AbstractNavigableMap/NavigableKeySet/1',1147);feb(2103,31,Dve);_.Fc=function emb(a){return zFb(lwb(this,a),Bxe),true};_.Gc=function fmb(a){uFb(a);mFb(a!=this,"Can't add a queue to itself");return ye(this,a)};_.$b=function gmb(){while(mwb(this)!=null);};var PJ=sfb(Bve,'AbstractQueue',2103);feb(310,31,{4:1,20:1,31:1,16:1},wmb,xmb);_.Fc=function ymb(a){return imb(this,a),true};_.$b=function Amb(){jmb(this)};_.Hc=function Bmb(a){return kmb(new Kmb(this),a)};_.dc=function Cmb(){return nmb(this)};_.Kc=function Dmb(){return new Kmb(this)};_.Mc=function Emb(a){return qmb(new Kmb(this),a)};_.gc=function Fmb(){return this.c-this.b&this.a.length-1};_.Nc=function Gmb(){return new Swb(this,272)};_.Qc=function Hmb(a){var b;b=this.c-this.b&this.a.length-1;a.length<b&&(a=cFb(new Array(b),a));lmb(this,a,b);a.length>b&&bD(a,b,null);return a};_.b=0;_.c=0;var TJ=sfb(Bve,'ArrayDeque',310);feb(459,1,Ave,Kmb);_.Nb=function Lmb(a){Ztb(this,a)};_.Ob=function Mmb(){return this.a!=this.b};_.Pb=function Nmb(){return Imb(this)};_.Qb=function Omb(){Jmb(this)};_.a=0;_.b=0;_.c=-1;var SJ=sfb(Bve,'ArrayDeque/IteratorImpl',459);feb(13,56,Cxe,bnb,cnb,dnb);_.bd=function enb(a,b){Qmb(this,a,b)};_.Fc=function fnb(a){return Rmb(this,a)};_.cd=function gnb(a,b){return Smb(this,a,b)};_.Gc=function hnb(a){return Tmb(this,a)};_.$b=function inb(){aFb(this.c,0)};_.Hc=function jnb(a){return Wmb(this,a,0)!=-1};_.Jc=function knb(a){Umb(this,a)};_.Xb=function lnb(a){return Vmb(this,a)};_.dd=function mnb(a){return Wmb(this,a,0)};_.dc=function nnb(){return this.c.length==0};_.Kc=function onb(){return new Anb(this)};_.gd=function pnb(a){return Xmb(this,a)};_.Mc=function qnb(a){return Ymb(this,a)};_.ce=function rnb(a,b){Zmb(this,a,b)};_.hd=function snb(a,b){return $mb(this,a,b)};_.gc=function tnb(){return this.c.length};_.jd=function unb(a){_mb(this,a)};_.Pc=function vnb(){return UEb(this.c)};_.Qc=function wnb(a){return anb(this,a)};var VJ=sfb(Bve,'ArrayList',13);feb(7,1,Ave,Anb);_.Nb=function Bnb(a){Ztb(this,a)};_.Ob=function Cnb(){return xnb(this)};_.Pb=function Dnb(){return ynb(this)};_.Qb=function Enb(){znb(this)};_.a=0;_.b=-1;var UJ=sfb(Bve,'ArrayList/1',7);feb(2112,$wnd.Function,{},iob);_.Me=function job(a,b){return Qfb(a,b)};feb(151,56,Dxe,mob);_.Hc=function nob(a){return St(this,a)!=-1};_.Jc=function oob(a){var b,c,d,e;uFb(a);for(c=this.a,d=0,e=c.length;d<e;++d){b=c[d];a.Cd(b)}};_.Xb=function pob(a){return kob(this,a)};_.hd=function qob(a,b){var c;c=(tFb(a,this.a.length),this.a[a]);bD(this.a,a,b);return c};_.gc=function rob(){return this.a.length};_.jd=function sob(a){Ynb(this.a,this.a.length,a)};_.Pc=function tob(){return lob(this,$C(jJ,rve,1,this.a.length,5,1))};_.Qc=function uob(a){return lob(this,a)};var WJ=sfb(Bve,'Arrays/ArrayList',151);var vob,wob,xob;feb(953,56,Dxe,Job);_.Hc=function Kob(a){return false};_.Xb=function Lob(a){return Iob(a)};_.Kc=function Mob(){return yob(),Qob(),Pob};_.ed=function Nob(){return yob(),Qob(),Pob};_.gc=function Oob(){return 0};var YJ=sfb(Bve,'Collections/EmptyList',953);feb(954,1,Jve,Rob);_.Nb=function Tob(a){Ztb(this,a)};_.Rb=function Sob(a){throw Adb(new jib)};_.Ob=function Uob(){return false};_.Sb=function Vob(){return false};_.Pb=function Wob(){throw Adb(new Dvb)};_.Tb=function Xob(){return 0};_.Ub=function Yob(){throw Adb(new Dvb)};_.Vb=function Zob(){return -1};_.Qb=function $ob(){throw Adb(new cgb)};_.Wb=function _ob(a){throw Adb(new cgb)};var Pob;var XJ=sfb(Bve,'Collections/EmptyListIterator',954);feb(956,2065,$ve,apb);_._b=function bpb(a){return false};_.uc=function cpb(a){return false};_.vc=function dpb(){return yob(),xob};_.xc=function epb(a){return null};_.ec=function fpb(){return yob(),xob};_.gc=function gpb(){return 0};_.Cc=function hpb(){return yob(),vob};var ZJ=sfb(Bve,'Collections/EmptyMap',956);feb(955,Eve,awe,ipb);_.Hc=function jpb(a){return false};_.Kc=function kpb(){return yob(),Qob(),Pob};_.gc=function lpb(){return 0};var $J=sfb(Bve,'Collections/EmptySet',955);feb(608,56,{3:1,20:1,31:1,56:1,16:1,15:1},mpb);_.Hc=function npb(a){return Fvb(this.a,a)};_.Xb=function opb(a){tFb(a,1);return this.a};_.gc=function ppb(){return 1};var _J=sfb(Bve,'Collections/SingletonList',608);feb(384,1,Wve,xpb);_.Jc=function Dpb(a){xgb(this,a)};_.Lc=function Gpb(){return new SDb(null,this.Nc())};_.Nc=function Jpb(){return new Swb(this,0)};_.Oc=function Kpb(){return new SDb(null,this.Nc())};_.Fc=function ypb(a){return qpb()};_.Gc=function zpb(a){return rpb()};_.$b=function Apb(){spb()};_.Hc=function Bpb(a){return tpb(this,a)};_.Ic=function Cpb(a){return upb(this,a)};_.dc=function Epb(){return this.b.dc()};_.Kc=function Fpb(){return new Ppb(this.b.Kc())};_.Mc=function Hpb(a){return vpb()};_.gc=function Ipb(){return this.b.gc()};_.Pc=function Lpb(){return this.b.Pc()};_.Qc=function Mpb(a){return wpb(this,a)};_.Ib=function Npb(){return jeb(this.b)};var bK=sfb(Bve,'Collections/UnmodifiableCollection',384);feb(383,1,Ave,Ppb);_.Nb=function Qpb(a){Ztb(this,a)};_.Ob=function Rpb(){return this.b.Ob()};_.Pb=function Spb(){return this.b.Pb()};_.Qb=function Tpb(){Opb()};var aK=sfb(Bve,'Collections/UnmodifiableCollectionIterator',383);feb(540,384,Exe,Upb);_.Nc=function fqb(){return new Swb(this,16)};_.bd=function Vpb(a,b){throw Adb(new jib)};_.cd=function Wpb(a,b){throw Adb(new jib)};_.Fb=function Xpb(a){return pb(this.a,a)};_.Xb=function Ypb(a){return this.a.Xb(a)};_.Hb=function Zpb(){return tb(this.a)};_.dd=function $pb(a){return this.a.dd(a)};_.dc=function _pb(){return this.a.dc()};_.ed=function aqb(){return new hqb(this.a.fd(0))};_.fd=function bqb(a){return new hqb(this.a.fd(a))};_.gd=function cqb(a){throw Adb(new jib)};_.hd=function dqb(a,b){throw Adb(new jib)};_.jd=function eqb(a){throw Adb(new jib)};_.kd=function gqb(a,b){return new Upb(this.a.kd(a,b))};var dK=sfb(Bve,'Collections/UnmodifiableList',540);feb(705,383,Jve,hqb);_.Qb=function nqb(){Opb()};_.Rb=function iqb(a){throw Adb(new jib)};_.Sb=function jqb(){return this.a.Sb()};_.Tb=function kqb(){return this.a.Tb()};_.Ub=function lqb(){return this.a.Ub()};_.Vb=function mqb(){return this.a.Vb()};_.Wb=function oqb(a){throw Adb(new jib)};var cK=sfb(Bve,'Collections/UnmodifiableListIterator',705);feb(609,1,Cve,uqb);_.wc=function Aqb(a){Bvb(this,a)};_.yc=function Fqb(a,b,c){return Cvb(this,a,b,c)};_.$b=function vqb(){throw Adb(new jib)};_._b=function wqb(a){return this.c._b(a)};_.uc=function xqb(a){return pqb(this,a)};_.vc=function yqb(){return qqb(this)};_.Fb=function zqb(a){return rqb(this,a)};_.xc=function Bqb(a){return this.c.xc(a)};_.Hb=function Cqb(){return tb(this.c)};_.dc=function Dqb(){return this.c.dc()};_.ec=function Eqb(){return sqb(this)};_.zc=function Gqb(a,b){throw Adb(new jib)};_.Bc=function Hqb(a){throw Adb(new jib)};_.gc=function Iqb(){return this.c.gc()};_.Ib=function Jqb(){return jeb(this.c)};_.Cc=function Kqb(){return tqb(this)};var hK=sfb(Bve,'Collections/UnmodifiableMap',609);feb(396,384,_ve,Lqb);_.Nc=function Oqb(){return new Swb(this,1)};_.Fb=function Mqb(a){return pb(this.b,a)};_.Hb=function Nqb(){return tb(this.b)};var jK=sfb(Bve,'Collections/UnmodifiableSet',396);feb(957,396,_ve,Sqb);_.Hc=function Tqb(a){return Pqb(this,a)};_.Ic=function Uqb(a){return this.b.Ic(a)};_.Kc=function Vqb(){var a;a=this.b.Kc();return new Yqb(a)};_.Pc=function Wqb(){var a;a=this.b.Pc();Rqb(a,a.length);return a};_.Qc=function Xqb(a){return Qqb(this,a)};var gK=sfb(Bve,'Collections/UnmodifiableMap/UnmodifiableEntrySet',957);feb(958,1,Ave,Yqb);_.Nb=function Zqb(a){Ztb(this,a)};_.Pb=function _qb(){return new brb(RD(this.a.Pb(),44))};_.Ob=function $qb(){return this.a.Ob()};_.Qb=function arb(){throw Adb(new jib)};var eK=sfb(Bve,'Collections/UnmodifiableMap/UnmodifiableEntrySet/1',958);feb(703,1,Axe,brb);_.Fb=function crb(a){return this.a.Fb(a)};_.ld=function drb(){return this.a.ld()};_.md=function erb(){return this.a.md()};_.Hb=function frb(){return this.a.Hb()};_.nd=function grb(a){throw Adb(new jib)};_.Ib=function hrb(){return jeb(this.a)};var fK=sfb(Bve,'Collections/UnmodifiableMap/UnmodifiableEntrySet/UnmodifiableEntry',703);feb(610,540,{20:1,16:1,15:1,59:1},irb);var iK=sfb(Bve,'Collections/UnmodifiableRandomAccessList',610);feb(704,396,bwe,jrb);_.Nc=function mrb(){return new $wb(this)};_.Fb=function krb(a){return pb(this.a,a)};_.Hb=function lrb(){return tb(this.a)};var kK=sfb(Bve,'Collections/UnmodifiableSortedSet',704);feb(858,1,Fxe,nrb);_.Ne=function orb(a,b){var c;return c=ygc(RD(a,12),RD(b,12)),c!=0?c:zgc(RD(a,12),RD(b,12))};_.Fb=function prb(a){return this===a};_.Oe=function qrb(){return new Frb(this)};var lK=sfb(Bve,'Comparator/lambda$0$Type',858);var rrb,srb,trb;feb(769,1,Fxe,wrb);_.Ne=function xrb(a,b){return vrb(RD(a,34),RD(b,34))};_.Fb=function yrb(a){return this===a};_.Oe=function zrb(){return urb(),trb};var mK=sfb(Bve,'Comparators/NaturalOrderComparator',769);feb(1226,1,Fxe,Brb);_.Ne=function Crb(a,b){return Arb(RD(a,34),RD(b,34))};_.Fb=function Drb(a){return this===a};_.Oe=function Erb(){return urb(),srb};var nK=sfb(Bve,'Comparators/ReverseNaturalOrderComparator',1226);feb(52,1,Fxe,Frb);_.Fb=function Hrb(a){return this===a};_.Ne=function Grb(a,b){return this.a.Ne(b,a)};_.Oe=function Irb(){return this.a};var oK=sfb(Bve,'Comparators/ReversedComparator',52);feb(175,63,swe,Jrb);var pK=sfb(Bve,'ConcurrentModificationException',175);var Krb,Lrb;feb(1948,1,Gxe,Prb);_.Pe=function Qrb(a){Nrb(this,a)};_.Ib=function Rrb(){return 'DoubleSummaryStatistics[count = '+Zdb(this.a)+', avg = '+(Idb(this.a,0)?Orb(this)/Xdb(this.a):0)+', min = '+this.c+', max = '+this.b+', sum = '+Orb(this)+']'};_.a=0;_.b=pxe;_.c=oxe;_.d=0;_.e=0;_.f=0;var rK=sfb(Bve,'DoubleSummaryStatistics',1948);feb(1868,63,swe,Srb);var sK=sfb(Bve,'EmptyStackException',1868);feb(461,2065,Cve,Zrb);_.zc=function dsb(a,b){return Xrb(this,a,b)};_.$b=function $rb(){Trb(this)};_._b=function _rb(a){return Urb(this,a)};_.uc=function asb(a){var b,c;for(c=new Osb(this.a);c.a<c.c.a.length;){b=Nsb(c);if(Fvb(a,this.b[b.g])){return true}}return false};_.vc=function bsb(){return new hsb(this)};_.xc=function csb(a){return Vrb(this,a)};_.Bc=function esb(a){return Yrb(this,a)};_.gc=function fsb(){return this.a.c};var wK=sfb(Bve,'EnumMap',461);feb(1340,Eve,Fve,hsb);_.$b=function isb(){Trb(this.a)};_.Hc=function jsb(a){return gsb(this,a)};_.Kc=function ksb(){return new nsb(this.a)};_.Mc=function lsb(a){var b;if(gsb(this,a)){b=RD(a,44).ld();Yrb(this.a,b);return true}return false};_.gc=function msb(){return this.a.a.c};var uK=sfb(Bve,'EnumMap/EntrySet',1340);feb(1341,1,Ave,nsb);_.Nb=function osb(a){Ztb(this,a)};_.Pb=function qsb(){return this.b=Nsb(this.a),new ssb(this.c,this.b)};_.Ob=function psb(){return Msb(this.a)};_.Qb=function rsb(){yFb(!!this.b);Yrb(this.c,this.b);this.b=null};var tK=sfb(Bve,'EnumMap/EntrySetIterator',1341);feb(1342,2082,Axe,ssb);_.ld=function tsb(){return this.a};_.md=function usb(){return this.b.b[this.a.g]};_.nd=function vsb(a){return _Eb(this.b.b,this.a.g,a)};var vK=sfb(Bve,'EnumMap/MapEntry',1342);feb(181,Eve,{20:1,31:1,16:1,181:1,21:1});var zK=sfb(Bve,'EnumSet',181);feb(162,181,{20:1,31:1,16:1,181:1,162:1,21:1},Fsb);_.Fc=function Gsb(a){return zsb(this,RD(a,22))};_.Hc=function Hsb(a){return Bsb(this,a)};_.Kc=function Isb(){return new Osb(this)};_.Mc=function Jsb(a){return Dsb(this,a)};_.gc=function Ksb(){return this.c};_.c=0;var yK=sfb(Bve,'EnumSet/EnumSetImpl',162);feb(356,1,Ave,Osb);_.Nb=function Psb(a){Ztb(this,a)};_.Pb=function Rsb(){return Nsb(this)};_.Ob=function Qsb(){return Msb(this)};_.Qb=function Ssb(){yFb(this.b!=-1);bD(this.c.b,this.b,null);--this.c.c;this.b=-1};_.a=-1;_.b=-1;var xK=sfb(Bve,'EnumSet/EnumSetImpl/IteratorImpl',356);feb(45,498,Hxe,Tsb,Usb,Vsb);_.Be=function Wsb(a,b){return dE(a)===dE(b)||a!=null&&pb(a,b)};_.Ce=function Xsb(a){var b;if(a==null){return 0}b=tb(a);return b|0};var AK=sfb(Bve,'HashMap',45);feb(49,Eve,Ixe,_sb,atb,btb);_.Fc=function dtb(a){return Ysb(this,a)};_.$b=function etb(){this.a.$b()};_.Hc=function ftb(a){return Zsb(this,a)};_.dc=function gtb(){return this.a.gc()==0};_.Kc=function htb(){return this.a.ec().Kc()};_.Mc=function itb(a){return $sb(this,a)};_.gc=function jtb(){return this.a.gc()};var BK=sfb(Bve,'HashSet',49);feb(1897,1,Rve,ltb);_.Dd=function mtb(a){ktb(this,a)};_.Ib=function ntb(){return 'IntSummaryStatistics[count = '+Zdb(this.a)+', avg = '+(Idb(this.a,0)?Xdb(this.d)/Xdb(this.a):0)+', min = '+this.c+', max = '+this.b+', sum = '+Zdb(this.d)+']'};_.a=0;_.b=qwe;_.c=lve;_.d=0;var CK=sfb(Bve,'IntSummaryStatistics',1897);feb(1062,1,Vve,ttb);_.Jc=function utb(a){xgb(this,a)};_.Kc=function vtb(){return new wtb(this)};_.c=0;var EK=sfb(Bve,'InternalHashCodeMap',1062);feb(726,1,Ave,wtb);_.Nb=function xtb(a){Ztb(this,a)};_.Pb=function ztb(){return this.d=this.a[this.c++],this.d};_.Ob=function ytb(){var a;if(this.c<this.a.length){return true}a=this.b.next();if(!a.done){this.a=a.value[1];this.c=0;return true}return false};_.Qb=function Atb(){stb(this.e,this.d.ld());this.c!=0&&--this.c};_.c=0;_.d=null;var DK=sfb(Bve,'InternalHashCodeMap/1',726);var Dtb;feb(1060,1,Vve,Ntb);_.Jc=function Otb(a){xgb(this,a)};_.Kc=function Ptb(){return new Qtb(this)};_.c=0;_.d=0;var HK=sfb(Bve,'InternalStringMap',1060);feb(725,1,Ave,Qtb);_.Nb=function Rtb(a){Ztb(this,a)};_.Pb=function Ttb(){return this.c=this.a,this.a=this.b.next(),new Vtb(this.d,this.c,this.d.d)};_.Ob=function Stb(){return !this.a.done};_.Qb=function Utb(){Mtb(this.d,this.c.value[0])};var FK=sfb(Bve,'InternalStringMap/1',725);feb(1061,2082,Axe,Vtb);_.ld=function Wtb(){return this.b.value[0]};_.md=function Xtb(){if(this.a.d!=this.c){return Ktb(this.a,this.b.value[0])}return this.b.value[1]};_.nd=function Ytb(a){return Ltb(this.a,this.b.value[0],a)};_.c=0;var GK=sfb(Bve,'InternalStringMap/2',1061);feb(215,45,Hxe,gub,hub);_.$b=function iub(){aub(this)};_._b=function jub(a){return bub(this,a)};_.uc=function kub(a){var b;b=this.d.a;while(b!=this.d){if(Fvb(b.e,a)){return true}b=b.a}return false};_.vc=function lub(){return new wub(this)};_.xc=function mub(a){return cub(this,a)};_.zc=function nub(a,b){return dub(this,a,b)};_.Bc=function oub(a){return fub(this,a)};_.gc=function pub(){return bkb(this.e)};_.c=false;var LK=sfb(Bve,'LinkedHashMap',215);feb(400,397,{494:1,397:1,400:1,44:1},tub,uub);var IK=sfb(Bve,'LinkedHashMap/ChainEntry',400);feb(715,Eve,Fve,wub);_.$b=function xub(){aub(this.a)};_.Hc=function yub(a){return vub(this,a)};_.Kc=function zub(){return new Dub(this)};_.Mc=function Aub(a){var b;if(vub(this,a)){b=RD(a,44).ld();fub(this.a,b);return true}return false};_.gc=function Bub(){return bkb(this.a.e)};var KK=sfb(Bve,'LinkedHashMap/EntrySet',715);feb(716,1,Ave,Dub);_.Nb=function Eub(a){Ztb(this,a)};_.Pb=function Gub(){return Cub(this)};_.Ob=function Fub(){return this.c!=this.d.a.d};_.Qb=function Hub(){yFb(!!this.a);rFb(this.d.a.e.g,this.b);rub(this.a);_jb(this.d.a.e,this.a.d);this.b=this.d.a.e.g;this.a=null};_.b=0;var JK=sfb(Bve,'LinkedHashMap/EntrySet/EntryIterator',716);feb(174,49,Ixe,Iub,Jub,Kub);var MK=sfb(Bve,'LinkedHashSet',174);feb(67,2062,{3:1,4:1,20:1,31:1,56:1,16:1,67:1,15:1},Yub,Zub);_.Fc=function $ub(a){return Mub(this,a)};_.$b=function _ub(){Xub(this)};_.fd=function avb(a){return Sub(this,a)};_.gc=function bvb(){return this.b};_.b=0;var PK=sfb(Bve,'LinkedList',67);feb(981,1,Jve,hvb);_.Nb=function jvb(a){Ztb(this,a)};_.Rb=function ivb(a){cvb(this,a)};_.Ob=function kvb(){return dvb(this)};_.Sb=function lvb(){return this.b.b!=this.d.a};_.Pb=function mvb(){return evb(this)};_.Tb=function nvb(){return this.a};_.Ub=function ovb(){return fvb(this)};_.Vb=function pvb(){return this.a-1};_.Qb=function qvb(){gvb(this)};_.Wb=function rvb(a){yFb(!!this.c);this.c.c=a};_.a=0;_.c=null;var NK=sfb(Bve,'LinkedList/ListIteratorImpl',981);feb(617,1,{},svb);var OK=sfb(Bve,'LinkedList/Node',617);feb(2057,1,{});var uvb,vvb;var TK=sfb(Bve,'Locale',2057);feb(873,2057,{},xvb);_.Ib=function yvb(){return ''};var RK=sfb(Bve,'Locale/1',873);feb(874,2057,{},zvb);_.Ib=function Avb(){return 'unknown'};var SK=sfb(Bve,'Locale/4',874);feb(112,63,{3:1,103:1,63:1,82:1,112:1},Dvb,Evb);var WK=sfb(Bve,'NoSuchElementException',112);feb(475,1,{475:1},Ovb);_.Fb=function Pvb(a){var b;if(a===this){return true}if(!ZD(a,475)){return false}b=RD(a,475);return Fvb(this.a,b.a)};_.Hb=function Qvb(){return Gvb(this.a)};_.Ib=function Rvb(){return this.a!=null?uve+Ghb(this.a)+')':'Optional.empty()'};var Jvb;var ZK=sfb(Bve,'Optional',475);feb(414,1,{414:1},Xvb,Yvb);_.Fb=function Zvb(a){var b;if(a===this){return true}if(!ZD(a,414)){return false}b=RD(a,414);return this.a==b.a&&Qfb(this.b,b.b)==0};_.Hb=function $vb(){return this.a?eE(this.b):0};_.Ib=function _vb(){return this.a?'OptionalDouble.of('+(''+this.b)+')':'OptionalDouble.empty()'};_.a=false;_.b=0;var Svb;var XK=sfb(Bve,'OptionalDouble',414);feb(524,1,{524:1},dwb,ewb);_.Fb=function fwb(a){var b;if(a===this){return true}if(!ZD(a,524)){return false}b=RD(a,524);return this.a==b.a&&hgb(this.b,b.b)==0};_.Hb=function gwb(){return this.a?this.b:0};_.Ib=function hwb(){return this.a?'OptionalInt.of('+(''+this.b)+')':'OptionalInt.empty()'};_.a=false;_.b=0;var awb;var YK=sfb(Bve,'OptionalInt',524);feb(510,2103,Dve,pwb);_.Gc=function qwb(a){return iwb(this,a)};_.$b=function rwb(){aFb(this.b.c,0)};_.Hc=function swb(a){return (a==null?-1:Wmb(this.b,a,0))!=-1};_.Kc=function twb(){return new zwb(this)};_.Mc=function uwb(a){return nwb(this,a)};_.gc=function vwb(){return this.b.c.length};_.Nc=function wwb(){return new Swb(this,256)};_.Pc=function xwb(){return UEb(this.b.c)};_.Qc=function ywb(a){return anb(this.b,a)};var _K=sfb(Bve,'PriorityQueue',510);feb(1296,1,Ave,zwb);_.Nb=function Awb(a){Ztb(this,a)};_.Ob=function Bwb(){return this.a<this.c.b.c.length};_.Pb=function Cwb(){sFb(this.a<this.c.b.c.length);this.b=this.a++;return Vmb(this.c.b,this.b)};_.Qb=function Dwb(){yFb(this.b!=-1);owb(this.c,this.a=this.b);this.b=-1};_.a=0;_.b=-1;var $K=sfb(Bve,'PriorityQueue/1',1296);feb(234,1,{234:1},Owb,Pwb);_.a=0;_.b=0;var Ewb,Fwb,Gwb=0;var aL=sfb(Bve,'Random',234);feb(25,1,Pve,Swb,Twb,Uwb);_.Ad=function Ywb(a){return (this.a&a)!=0};_.yd=function Vwb(){return this.a};_.zd=function Wwb(){Qwb(this);return this.c};_.Nb=function Xwb(a){Qwb(this);this.d.Nb(a)};_.Bd=function Zwb(a){return Rwb(this,a)};_.a=0;_.c=0;var qL=sfb(Bve,'Spliterators/IteratorSpliterator',25);feb(495,25,Pve,$wb);var cL=sfb(Bve,'SortedSet/1',495);feb(611,1,Gxe,axb);_.Pe=function bxb(a){this.a.Cd(a)};var dL=sfb(Bve,'Spliterator/OfDouble/0methodref$accept$Type',611);feb(612,1,Gxe,cxb);_.Pe=function dxb(a){this.a.Cd(a)};var eL=sfb(Bve,'Spliterator/OfDouble/1methodref$accept$Type',612);feb(613,1,Rve,exb);_.Dd=function fxb(a){this.a.Cd(sgb(a))};var fL=sfb(Bve,'Spliterator/OfInt/2methodref$accept$Type',613);feb(614,1,Rve,gxb);_.Dd=function hxb(a){this.a.Cd(sgb(a))};var gL=sfb(Bve,'Spliterator/OfInt/3methodref$accept$Type',614);feb(625,1,Pve);_.Nb=function nxb(a){_wb(this,a)};_.Ad=function oxb(a){return (this.d&a)!=0};_.yd=function lxb(){return this.d};_.zd=function mxb(){return this.e};_.d=0;_.e=0;var mL=sfb(Bve,'Spliterators/BaseSpliterator',625);feb(736,625,Pve);_.Qe=function qxb(a){ixb(this,a)};_.Nb=function rxb(a){ZD(a,189)?ixb(this,RD(a,189)):ixb(this,new cxb(a))};_.Bd=function sxb(a){return ZD(a,189)?this.Re(RD(a,189)):this.Re(new axb(a))};var hL=sfb(Bve,'Spliterators/AbstractDoubleSpliterator',736);feb(735,625,Pve);_.Qe=function uxb(a){ixb(this,a)};_.Nb=function vxb(a){ZD(a,202)?ixb(this,RD(a,202)):ixb(this,new gxb(a))};_.Bd=function wxb(a){return ZD(a,202)?this.Re(RD(a,202)):this.Re(new exb(a))};var iL=sfb(Bve,'Spliterators/AbstractIntSpliterator',735);feb(500,625,Pve);var jL=sfb(Bve,'Spliterators/AbstractSpliterator',500);feb(706,1,Pve);_.Nb=function Dxb(a){_wb(this,a)};_.Ad=function Exb(a){return (this.b&a)!=0};_.yd=function Bxb(){return this.b};_.zd=function Cxb(){return this.d-this.c};_.b=0;_.c=0;_.d=0;var lL=sfb(Bve,'Spliterators/BaseArraySpliterator',706);feb(960,706,Pve,Gxb);_.Se=function Hxb(a,b){Fxb(this,RD(a,41),b)};_.Nb=function Ixb(a){yxb(this,a)};_.Bd=function Jxb(a){return zxb(this,a)};var kL=sfb(Bve,'Spliterators/ArraySpliterator',960);feb(707,706,Pve,Lxb);_.Se=function Nxb(a,b){Kxb(this,RD(a,189),b)};_.Qe=function Oxb(a){yxb(this,a)};_.Nb=function Pxb(a){ZD(a,189)?yxb(this,RD(a,189)):yxb(this,new cxb(a))};_.Re=function Qxb(a){return zxb(this,a)};_.Bd=function Rxb(a){return ZD(a,189)?zxb(this,RD(a,189)):zxb(this,new axb(a))};var nL=sfb(Bve,'Spliterators/DoubleArraySpliterator',707);feb(2066,1,Pve);_.Nb=function Wxb(a){_wb(this,a)};_.Ad=function Xxb(a){return (16448&a)!=0};_.yd=function Uxb(){return 16448};_.zd=function Vxb(){return 0};var Sxb;var pL=sfb(Bve,'Spliterators/EmptySpliterator',2066);feb(959,2066,Pve,$xb);_.Qe=function _xb(a){Yxb(a)};_.Nb=function ayb(a){ZD(a,202)?Yxb(RD(a,202)):Yxb(new gxb(a))};_.Re=function byb(a){return Zxb(a)};_.Bd=function cyb(a){return ZD(a,202)?Zxb(RD(a,202)):Zxb(new exb(a))};var oL=sfb(Bve,'Spliterators/EmptySpliterator/OfInt',959);feb(588,56,Rxe,gyb);_.bd=function hyb(a,b){lyb(a,this.a.c.length+1);Qmb(this.a,a,b)};_.Fc=function iyb(a){return Rmb(this.a,a)};_.cd=function jyb(a,b){lyb(a,this.a.c.length+1);return Smb(this.a,a,b)};_.Gc=function kyb(a){return Tmb(this.a,a)};_.$b=function myb(){aFb(this.a.c,0)};_.Hc=function nyb(a){return Wmb(this.a,a,0)!=-1};_.Ic=function oyb(a){return Be(this.a,a)};_.Jc=function pyb(a){Umb(this.a,a)};_.Xb=function qyb(a){return lyb(a,this.a.c.length),Vmb(this.a,a)};_.dd=function ryb(a){return Wmb(this.a,a,0)};_.dc=function syb(){return this.a.c.length==0};_.Kc=function tyb(){return new Anb(this.a)};_.gd=function uyb(a){return lyb(a,this.a.c.length),Xmb(this.a,a)};_.ce=function vyb(a,b){Zmb(this.a,a,b)};_.hd=function wyb(a,b){return lyb(a,this.a.c.length),$mb(this.a,a,b)};_.gc=function xyb(){return this.a.c.length};_.jd=function yyb(a){_mb(this.a,a)};_.kd=function zyb(a,b){return new Rkb(this.a,a,b)};_.Pc=function Ayb(){return UEb(this.a.c)};_.Qc=function Byb(a){return anb(this.a,a)};_.Ib=function Cyb(){return Fe(this.a)};var EL=sfb(Bve,'Vector',588);feb(824,588,Rxe,Fyb);var rL=sfb(Bve,'Stack',824);feb(213,1,{213:1},Jyb);_.Ib=function Kyb(){return Iyb(this)};var sL=sfb(Bve,'StringJoiner',213);feb(553,2090,{3:1,85:1,139:1,133:1},dzb,ezb);_.$b=function fzb(){Lyb(this)};_.De=function gzb(){return new xzb(this)};_.vc=function hzb(){return new Dzb(this)};_.Ee=function izb(a){return Pyb(this,a,true)};_.Fe=function jzb(a){return Myb(this,a)};_.Ge=function kzb(){return Nyb(this)};_.He=function lzb(a){return Qyb(this,a,true)};_.Ie=function mzb(a){return Pyb(this,a,false)};_.Je=function nzb(){return Oyb(this)};_.Ke=function ozb(a){return Qyb(this,a,false)};_.Zc=function pzb(a,b){return Ryb(this,a,b)};_.zc=function qzb(a,b){return Wyb(this,a,b)};_.Bc=function rzb(a){return Xyb(this,a)};_.Le=function szb(a){return Yyb(this,a)};_.gc=function tzb(){return this.c};_.ad=function uzb(a,b){return czb(this,a,b)};_.c=0;var CL=sfb(Bve,'TreeMap',553);feb(554,1,Ave,xzb,yzb);_.Nb=function zzb(a){Ztb(this,a)};_.Pb=function Bzb(){return vzb(this)};_.Ob=function Azb(){return Akb(this.a)};_.Qb=function Czb(){wzb(this)};var tL=sfb(Bve,'TreeMap/EntryIterator',554);feb(1142,629,Fve,Dzb);_.$b=function Ezb(){Lyb(this.a)};var uL=sfb(Bve,'TreeMap/EntrySet',1142);feb(447,397,{494:1,397:1,44:1,447:1},Fzb);_.b=false;var vL=sfb(Bve,'TreeMap/Node',447);feb(630,1,{},Gzb);_.Ib=function Hzb(){return 'State: mv='+this.c+' value='+this.d+' done='+this.a+' found='+this.b};_.a=false;_.b=false;_.c=false;var wL=sfb(Bve,'TreeMap/State',630);feb(631,2090,Gve,Kzb);_.De=function Lzb(){return new yzb(this.c,this.f,this.b,this.a,this.e,this.d)};_.vc=function Mzb(){return new Plb(this)};_.Ee=function Nzb(a){return Izb(this,Pyb(this.c,a,true))};_.Fe=function Ozb(a){return Izb(this,Myb(this.c,a))};_.Ge=function Pzb(){var a;return this.f.Te()?this.a?(a=Pyb(this.c,this.b,true)):(a=Pyb(this.c,this.b,false)):(a=Nyb(this.c)),!!a&&Jzb(this,a.d)?a:null};_.He=function Qzb(a){return Izb(this,Qyb(this.c,a,true))};_.Ie=function Rzb(a){return Izb(this,Pyb(this.c,a,false))};_.Je=function Szb(){var a;this.f.Ue()?this.d?(a=Qyb(this.c,this.e,true)):(a=Qyb(this.c,this.e,false)):(a=Oyb(this.c));return !!a&&Jzb(this,a.d)?a:null};_.Ke=function Tzb(a){return Izb(this,Qyb(this.c,a,false))};_.Zc=function Uzb(a,b){if(this.f.Ue()&&this.c.a.Ne(a,this.e)>0){throw Adb(new agb(Sxe+a+' greater than '+this.e))}return this.f.Te()?bzb(this.c,this.b,this.a,a,b):Ryb(this.c,a,b)};_.zc=function Vzb(a,b){if(!Tyb(this.c,this.f,a,this.b,this.a,this.e,this.d)){throw Adb(new agb(a+' outside the range '+this.b+' to '+this.e))}return Wyb(this.c,a,b)};_.Bc=function Wzb(a){var b;b=a;if(!Tyb(this.c,this.f,b,this.b,this.a,this.e,this.d)){return null}return Xyb(this.c,b)};_.Le=function Xzb(a){return Jzb(this,a.ld())&&Yyb(this.c,a)};_.gc=function Yzb(){var a,b,c;this.f.Te()?this.a?(b=Pyb(this.c,this.b,true)):(b=Pyb(this.c,this.b,false)):(b=Nyb(this.c));if(!(!!b&&Jzb(this,b.d)?b:null)){return 0}a=0;for(c=new yzb(this.c,this.f,this.b,this.a,this.e,this.d);Akb(c.a);c.b=RD(Bkb(c.a),44)){++a}return a};_.ad=function Zzb(a,b){if(this.f.Te()&&this.c.a.Ne(a,this.b)<0){throw Adb(new agb(Sxe+a+Txe+this.b))}return this.f.Ue()?bzb(this.c,a,b,this.e,this.d):czb(this.c,a,b)};_.a=false;_.d=false;var BL=sfb(Bve,'TreeMap/SubMap',631);feb(304,22,Uxe,dAb);_.Te=function eAb(){return false};_.Ue=function fAb(){return false};var $zb,_zb,aAb,bAb;var AL=tfb(Bve,'TreeMap/SubMapType',304,WI,hAb,gAb);feb(1143,304,Uxe,iAb);_.Ue=function jAb(){return true};var xL=tfb(Bve,'TreeMap/SubMapType/1',1143,AL,null,null);feb(1144,304,Uxe,kAb);_.Te=function lAb(){return true};_.Ue=function mAb(){return true};var yL=tfb(Bve,'TreeMap/SubMapType/2',1144,AL,null,null);feb(1145,304,Uxe,nAb);_.Te=function oAb(){return true};var zL=tfb(Bve,'TreeMap/SubMapType/3',1145,AL,null,null);var pAb;feb(157,Eve,{3:1,20:1,31:1,16:1,277:1,21:1,87:1,157:1},xAb,yAb,zAb);_.Nc=function GAb(){return new $wb(this)};_.Fc=function AAb(a){return rAb(this,a)};_.$b=function BAb(){this.a.$b()};_.Hc=function CAb(a){return this.a._b(a)};_.Kc=function DAb(){return this.a.ec().Kc()};_.Mc=function EAb(a){return wAb(this,a)};_.gc=function FAb(){return this.a.gc()};var DL=sfb(Bve,'TreeSet',157);feb(1082,1,{},JAb);_.Ve=function KAb(a,b){return HAb(this.a,a,b)};var FL=sfb(Vxe,'BinaryOperator/lambda$0$Type',1082);feb(1083,1,{},LAb);_.Ve=function MAb(a,b){return IAb(this.a,a,b)};var GL=sfb(Vxe,'BinaryOperator/lambda$1$Type',1083);feb(952,1,{},NAb);_.Kb=function OAb(a){return a};var HL=sfb(Vxe,'Function/lambda$0$Type',952);feb(395,1,nwe,PAb);_.Mb=function QAb(a){return !this.a.Mb(a)};var IL=sfb(Vxe,'Predicate/lambda$2$Type',395);feb(581,1,{581:1});var JL=sfb(Wxe,'Handler',581);feb(2107,1,nve);_.xe=function TAb(){return 'DUMMY'};_.Ib=function UAb(){return this.xe()};var RAb;var LL=sfb(Wxe,'Level',2107);feb(1706,2107,nve,VAb);_.xe=function WAb(){return 'INFO'};var KL=sfb(Wxe,'Level/LevelInfo',1706);feb(1843,1,{},$Ab);var XAb;var ML=sfb(Wxe,'LogManager',1843);feb(1896,1,nve,aBb);_.b=null;var NL=sfb(Wxe,'LogRecord',1896);feb(525,1,{525:1},oBb);_.e=false;var bBb=false,cBb=false,dBb=false,eBb=false,fBb=false;var OL=sfb(Wxe,'Logger',525);feb(835,581,{581:1},rBb);var PL=sfb(Wxe,'SimpleConsoleLogHandler',835);feb(108,22,{3:1,34:1,22:1,108:1},yBb);var uBb,vBb,wBb;var QL=tfb(Zxe,'Collector/Characteristics',108,WI,ABb,zBb);var BBb;feb(758,1,{},DBb);var RL=sfb(Zxe,'CollectorImpl',758);feb(1074,1,{},RBb);_.Ve=function SBb(a,b){return Hyb(RD(a,213),RD(b,213))};var SL=sfb(Zxe,'Collectors/10methodref$merge$Type',1074);feb(1075,1,{},TBb);_.Kb=function UBb(a){return Iyb(RD(a,213))};var TL=sfb(Zxe,'Collectors/11methodref$toString$Type',1075);feb(1076,1,{},VBb);_.Kb=function WBb(a){return Geb(),SSb(a)?true:false};var UL=sfb(Zxe,'Collectors/12methodref$test$Type',1076);feb(144,1,{},XBb);_.Yd=function YBb(a,b){RD(a,16).Fc(b)};var VL=sfb(Zxe,'Collectors/20methodref$add$Type',144);feb(146,1,{},ZBb);_.Xe=function $Bb(){return new bnb};var WL=sfb(Zxe,'Collectors/21methodref$ctor$Type',146);feb(359,1,{},_Bb);_.Xe=function aCb(){return new _sb};var XL=sfb(Zxe,'Collectors/23methodref$ctor$Type',359);feb(360,1,{},bCb);_.Yd=function cCb(a,b){Ysb(RD(a,49),b)};var YL=sfb(Zxe,'Collectors/24methodref$add$Type',360);feb(1069,1,{},dCb);_.Ve=function eCb(a,b){return EBb(RD(a,15),RD(b,16))};var ZL=sfb(Zxe,'Collectors/4methodref$addAll$Type',1069);feb(1073,1,{},fCb);_.Yd=function gCb(a,b){Gyb(RD(a,213),RD(b,484))};var $L=sfb(Zxe,'Collectors/9methodref$add$Type',1073);feb(1072,1,{},hCb);_.Xe=function iCb(){return new Jyb(this.a,this.b,this.c)};var _L=sfb(Zxe,'Collectors/lambda$15$Type',1072);feb(1077,1,{},jCb);_.Xe=function kCb(){var a;return a=new gub,dub(a,(Geb(),false),new bnb),dub(a,true,new bnb),a};var aM=sfb(Zxe,'Collectors/lambda$22$Type',1077);feb(1078,1,{},lCb);_.Xe=function mCb(){return cD(WC(jJ,1),rve,1,5,[this.a])};var bM=sfb(Zxe,'Collectors/lambda$25$Type',1078);feb(1079,1,{},nCb);_.Yd=function oCb(a,b){GBb(this.a,SD(a))};var cM=sfb(Zxe,'Collectors/lambda$26$Type',1079);feb(1080,1,{},pCb);_.Ve=function qCb(a,b){return HBb(this.a,SD(a),SD(b))};var dM=sfb(Zxe,'Collectors/lambda$27$Type',1080);feb(1081,1,{},rCb);_.Kb=function sCb(a){return SD(a)[0]};var eM=sfb(Zxe,'Collectors/lambda$28$Type',1081);feb(728,1,{},uCb);_.Ve=function vCb(a,b){return tCb(a,b)};var fM=sfb(Zxe,'Collectors/lambda$4$Type',728);feb(145,1,{},wCb);_.Ve=function xCb(a,b){return JBb(RD(a,16),RD(b,16))};var gM=sfb(Zxe,'Collectors/lambda$42$Type',145);feb(361,1,{},yCb);_.Ve=function zCb(a,b){return KBb(RD(a,49),RD(b,49))};var hM=sfb(Zxe,'Collectors/lambda$50$Type',361);feb(362,1,{},ACb);_.Kb=function BCb(a){return RD(a,49)};var iM=sfb(Zxe,'Collectors/lambda$51$Type',362);feb(1068,1,{},CCb);_.Yd=function DCb(a,b){LBb(this.a,RD(a,85),b)};var jM=sfb(Zxe,'Collectors/lambda$7$Type',1068);feb(1070,1,{},ECb);_.Ve=function FCb(a,b){return NBb(RD(a,85),RD(b,85),new dCb)};var kM=sfb(Zxe,'Collectors/lambda$8$Type',1070);feb(1071,1,{},GCb);_.Kb=function HCb(a){return MBb(this.a,RD(a,85))};var lM=sfb(Zxe,'Collectors/lambda$9$Type',1071);feb(550,1,{});_.$e=function OCb(){ICb(this)};_.d=false;var TM=sfb(Zxe,'TerminatableStream',550);feb(827,550,$xe,WCb);_.$e=function XCb(){ICb(this)};var qM=sfb(Zxe,'DoubleStreamImpl',827);feb(1847,736,Pve,$Cb);_.Re=function aDb(a){return ZCb(this,RD(a,189))};_.a=null;var nM=sfb(Zxe,'DoubleStreamImpl/2',1847);feb(1848,1,Gxe,bDb);_.Pe=function cDb(a){_Cb(this.a,a)};var mM=sfb(Zxe,'DoubleStreamImpl/2/lambda$0$Type',1848);feb(1845,1,Gxe,dDb);_.Pe=function eDb(a){YCb(this.a,a)};var oM=sfb(Zxe,'DoubleStreamImpl/lambda$0$Type',1845);feb(1846,1,Gxe,fDb);_.Pe=function gDb(a){Nrb(this.a,a)};var pM=sfb(Zxe,'DoubleStreamImpl/lambda$2$Type',1846);feb(1397,735,Pve,kDb);_.Re=function lDb(a){return jDb(this,RD(a,202))};_.a=0;_.b=0;_.c=0;var rM=sfb(Zxe,'IntStream/5',1397);feb(806,550,$xe,oDb);_.$e=function pDb(){ICb(this)};_._e=function qDb(){return LCb(this),this.a};var vM=sfb(Zxe,'IntStreamImpl',806);feb(807,550,$xe,rDb);_.$e=function sDb(){ICb(this)};_._e=function tDb(){return LCb(this),Txb(),Sxb};var sM=sfb(Zxe,'IntStreamImpl/Empty',807);feb(1687,1,Rve,uDb);_.Dd=function vDb(a){ktb(this.a,a)};var uM=sfb(Zxe,'IntStreamImpl/lambda$4$Type',1687);var RM=ufb(Zxe,'Stream');feb(26,550,{533:1,687:1,848:1},SDb);_.$e=function TDb(){ICb(this)};var wDb;var QM=sfb(Zxe,'StreamImpl',26);feb(1102,500,Pve,YDb);_.Bd=function ZDb(a){while(WDb(this)){if(this.a.Bd(a)){return true}else{ICb(this.b);this.b=null;this.a=null}}return false};var xM=sfb(Zxe,'StreamImpl/1',1102);feb(1103,1,Qve,$Db);_.Cd=function _Db(a){XDb(this.a,RD(a,848))};var wM=sfb(Zxe,'StreamImpl/1/lambda$0$Type',1103);feb(1104,1,nwe,aEb);_.Mb=function bEb(a){return Ysb(this.a,a)};var yM=sfb(Zxe,'StreamImpl/1methodref$add$Type',1104);feb(1105,500,Pve,cEb);_.Bd=function dEb(a){var b;if(!this.a){b=new bnb;this.b.a.Nb(new eEb(b));yob();_mb(b,this.c);this.a=new Swb(b,16)}return Rwb(this.a,a)};_.a=null;var AM=sfb(Zxe,'StreamImpl/5',1105);feb(1106,1,Qve,eEb);_.Cd=function fEb(a){Rmb(this.a,a)};var zM=sfb(Zxe,'StreamImpl/5/2methodref$add$Type',1106);feb(737,500,Pve,hEb);_.Bd=function iEb(a){this.b=false;while(!this.b&&this.c.Bd(new jEb(this,a)));return this.b};_.b=false;var CM=sfb(Zxe,'StreamImpl/FilterSpliterator',737);feb(1096,1,Qve,jEb);_.Cd=function kEb(a){gEb(this.a,this.b,a)};var BM=sfb(Zxe,'StreamImpl/FilterSpliterator/lambda$0$Type',1096);feb(1091,736,Pve,nEb);_.Re=function oEb(a){return mEb(this,RD(a,189))};var EM=sfb(Zxe,'StreamImpl/MapToDoubleSpliterator',1091);feb(1095,1,Qve,pEb);_.Cd=function qEb(a){lEb(this.a,this.b,a)};var DM=sfb(Zxe,'StreamImpl/MapToDoubleSpliterator/lambda$0$Type',1095);feb(1090,735,Pve,tEb);_.Re=function uEb(a){return sEb(this,RD(a,202))};var GM=sfb(Zxe,'StreamImpl/MapToIntSpliterator',1090);feb(1094,1,Qve,vEb);_.Cd=function wEb(a){rEb(this.a,this.b,a)};var FM=sfb(Zxe,'StreamImpl/MapToIntSpliterator/lambda$0$Type',1094);feb(734,500,Pve,zEb);_.Bd=function AEb(a){return yEb(this,a)};var IM=sfb(Zxe,'StreamImpl/MapToObjSpliterator',734);feb(1093,1,Qve,BEb);_.Cd=function CEb(a){xEb(this.a,this.b,a)};var HM=sfb(Zxe,'StreamImpl/MapToObjSpliterator/lambda$0$Type',1093);feb(1092,500,Pve,DEb);_.Bd=function EEb(a){while(Idb(this.b,0)){if(!this.a.Bd(new FEb)){return false}this.b=Vdb(this.b,1)}return this.a.Bd(a)};_.b=0;var KM=sfb(Zxe,'StreamImpl/SkipSpliterator',1092);feb(1097,1,Qve,FEb);_.Cd=function GEb(a){};var JM=sfb(Zxe,'StreamImpl/SkipSpliterator/lambda$0$Type',1097);feb(626,1,Qve,IEb);_.Cd=function JEb(a){HEb(this,a)};var LM=sfb(Zxe,'StreamImpl/ValueConsumer',626);feb(1098,1,Qve,KEb);_.Cd=function LEb(a){xDb()};var MM=sfb(Zxe,'StreamImpl/lambda$0$Type',1098);feb(1099,1,Qve,MEb);_.Cd=function NEb(a){xDb()};var NM=sfb(Zxe,'StreamImpl/lambda$1$Type',1099);feb(1100,1,{},OEb);_.Ve=function PEb(a,b){return UDb(this.a,a,b)};var OM=sfb(Zxe,'StreamImpl/lambda$4$Type',1100);feb(1101,1,Qve,QEb);_.Cd=function REb(a){VDb(this.b,this.a,a)};var PM=sfb(Zxe,'StreamImpl/lambda$5$Type',1101);feb(1107,1,Qve,SEb);_.Cd=function TEb(a){PCb(this.a,RD(a,380))};var SM=sfb(Zxe,'TerminatableStream/lambda$0$Type',1107);feb(2142,1,{});feb(2014,1,{},gFb);var UM=sfb('javaemul.internal','ConsoleLogger',2014);var iFb=0;feb(2134,1,{});feb(1830,1,Qve,FFb);_.Cd=function GFb(a){RD(a,317)};var VM=sfb(eye,'BowyerWatsonTriangulation/lambda$0$Type',1830);feb(1831,1,Qve,HFb);_.Cd=function IFb(a){ye(this.a,RD(a,317).e)};var WM=sfb(eye,'BowyerWatsonTriangulation/lambda$1$Type',1831);feb(1832,1,Qve,JFb);_.Cd=function KFb(a){RD(a,177)};var XM=sfb(eye,'BowyerWatsonTriangulation/lambda$2$Type',1832);feb(1827,1,fye,NFb);_.Ne=function OFb(a,b){return MFb(this.a,RD(a,177),RD(b,177))};_.Fb=function PFb(a){return this===a};_.Oe=function QFb(){return new Frb(this)};var YM=sfb(eye,'NaiveMinST/lambda$0$Type',1827);feb(449,1,{},SFb);var ZM=sfb(eye,'NodeMicroLayout',449);feb(177,1,{177:1},TFb);_.Fb=function UFb(a){var b;if(ZD(a,177)){b=RD(a,177);return Fvb(this.a,b.a)&&Fvb(this.b,b.b)||Fvb(this.a,b.b)&&Fvb(this.b,b.a)}else{return false}};_.Hb=function VFb(){return Gvb(this.a)+Gvb(this.b)};var $M=sfb(eye,'TEdge',177);feb(317,1,{317:1},XFb);_.Fb=function YFb(a){var b;if(ZD(a,317)){b=RD(a,317);return WFb(this,b.a)&&WFb(this,b.b)&&WFb(this,b.c)}else{return false}};_.Hb=function ZFb(){return Gvb(this.a)+Gvb(this.b)+Gvb(this.c)};var _M=sfb(eye,'TTriangle',317);feb(225,1,{225:1},$Fb);var aN=sfb(eye,'Tree',225);feb(1218,1,{},aGb);var cN=sfb(gye,'Scanline',1218);var bN=ufb(gye,hye);feb(1758,1,{},dGb);var dN=sfb(iye,'CGraph',1758);feb(316,1,{316:1},fGb);_.b=0;_.c=0;_.d=0;_.g=0;_.i=0;_.k=pxe;var fN=sfb(iye,'CGroup',316);feb(830,1,{},jGb);var eN=sfb(iye,'CGroup/CGroupBuilder',830);feb(60,1,{60:1},kGb);_.Ib=function lGb(){var a;if(this.j){return WD(this.j.Kb(this))}return lfb(hN),hN.o+'@'+(a=kFb(this)>>>0,a.toString(16))};_.f=0;_.i=pxe;var hN=sfb(iye,'CNode',60);feb(829,1,{},qGb);var gN=sfb(iye,'CNode/CNodeBuilder',829);var vGb;feb(1590,1,{},xGb);_.ff=function yGb(a,b){return 0};_.gf=function zGb(a,b){return 0};var iN=sfb(iye,kye,1590);feb(1853,1,{},AGb);_.cf=function BGb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;j=oxe;for(d=new Anb(a.a.b);d.a<d.c.c.length;){b=RD(ynb(d),60);j=$wnd.Math.min(j,b.a.j.d.c+b.b.a)}n=new Yub;for(g=new Anb(a.a.a);g.a<g.c.c.length;){f=RD(ynb(g),316);f.k=j;f.g==0&&(Pub(n,f,n.c.b,n.c),true)}while(n.b!=0){f=RD(n.b==0?null:(sFb(n.b!=0),Wub(n,n.a.a)),316);e=f.j.d.c;for(m=f.a.a.ec().Kc();m.Ob();){k=RD(m.Pb(),60);p=f.k+k.b.a;!LGb(a,f,a.d)||k.d.c<p?(k.i=p):(k.i=k.d.c)}e-=f.j.i;f.b+=e;a.d==(Cmd(),zmd)||a.d==xmd?(f.c+=e):(f.c-=e);for(l=f.a.a.ec().Kc();l.Ob();){k=RD(l.Pb(),60);for(i=k.c.Kc();i.Ob();){h=RD(i.Pb(),60);Dmd(a.d)?(o=a.g.ff(k,h)):(o=a.g.gf(k,h));h.a.k=$wnd.Math.max(h.a.k,k.i+k.d.b+o-h.b.a);MGb(a,h,a.d)&&(h.a.k=$wnd.Math.max(h.a.k,h.d.c-h.b.a));--h.a.g;h.a.g==0&&Mub(n,h.a)}}}for(c=new Anb(a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),60);b.d.c=b.i}};var jN=sfb(iye,'LongestPathCompaction',1853);feb(1756,1,{},VGb);_.e=false;var CGb,DGb,EGb;var lN=sfb(iye,pye,1756);feb(1757,1,Qve,WGb);_.Cd=function XGb(a){NGb(this.a,RD(a,42))};var kN=sfb(iye,qye,1757);feb(1854,1,{},YGb);_.df=function ZGb(a){var b,c,d,e,f,g,h;for(c=new Anb(a.a.b);c.a<c.c.c.length;){b=RD(ynb(c),60);b.c.$b()}for(e=new Anb(a.a.b);e.a<e.c.c.length;){d=RD(ynb(e),60);for(g=new Anb(a.a.b);g.a<g.c.c.length;){f=RD(ynb(g),60);if(d==f){continue}if(!!d.a&&d.a==f.a){continue}Dmd(a.d)?(h=a.g.gf(d,f)):(h=a.g.ff(d,f));(f.d.c>d.d.c||d.d.c==f.d.c&&d.d.b<f.d.b)&&sGb(f.d.d+f.d.a+h,d.d.d)&&uGb(f.d.d,d.d.d+d.d.a+h)&&d.c.Fc(f)}}};var mN=sfb(iye,'QuadraticConstraintCalculation',1854);feb(529,1,{529:1},cHb);_.a=false;_.b=false;_.c=false;_.d=false;var nN=sfb(iye,rye,529);feb(817,1,{},fHb);_.df=function gHb(a){this.c=a;eHb(this,new xHb)};var tN=sfb(iye,sye,817);feb(1784,1,{693:1},lHb);_.bf=function mHb(a){iHb(this,RD(a,473))};var pN=sfb(iye,tye,1784);feb(1785,1,fye,oHb);_.Ne=function pHb(a,b){return nHb(RD(a,60),RD(b,60))};_.Fb=function qHb(a){return this===a};_.Oe=function rHb(){return new Frb(this)};var oN=sfb(iye,uye,1785);feb(473,1,{473:1},sHb);_.a=false;var qN=sfb(iye,vye,473);feb(1786,1,fye,tHb);_.Ne=function uHb(a,b){return hHb(RD(a,473),RD(b,473))};_.Fb=function vHb(a){return this===a};_.Oe=function wHb(){return new Frb(this)};var rN=sfb(iye,wye,1786);feb(1787,1,xye,xHb);_.Lb=function yHb(a){return RD(a,60),true};_.Fb=function zHb(a){return this===a};_.Mb=function AHb(a){return RD(a,60),true};var sN=sfb(iye,'ScanlineConstraintCalculator/lambda$1$Type',1787);feb(436,22,{3:1,34:1,22:1,436:1},EHb);var BHb,CHb;var uN=tfb(yye,'HighLevelSortingCriterion',436,WI,GHb,FHb);var HHb;feb(435,22,{3:1,34:1,22:1,435:1},MHb);var JHb,KHb;var vN=tfb(yye,'LowLevelSortingCriterion',435,WI,OHb,NHb);var PHb;var B2=ufb(zye,'ILayoutMetaDataProvider');feb(864,1,Eye,ZHb);_.hf=function $Hb(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Aye),Fye),'Polyomino Traversal Strategy'),'Traversal strategy for trying different candidate positions for polyominoes.'),XHb),(kid(),eid)),xN),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Bye),Fye),'Polyomino Secondary Sorting Criterion'),'Possible secondary sorting criteria for the processing order of polyominoes. They are used when polyominoes are equal according to the primary sorting criterion HighLevelSortingCriterion.'),VHb),eid),vN),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Cye),Fye),'Polyomino Primary Sorting Criterion'),'Possible primary sorting criteria for the processing order of polyominoes.'),THb),eid),uN),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Dye),Fye),'Fill Polyominoes'),'Use the Profile Fill algorithm to fill polyominoes to prevent small polyominoes from being placed inside of big polyominoes with large holes. Might increase packing area.'),(Geb(),true)),cid),QI),xsb(Whd))))};var RHb,SHb,THb,UHb,VHb,WHb,XHb;var wN=sfb(yye,'PolyominoOptions',864);feb(257,22,{3:1,34:1,22:1,257:1},jIb);var _Hb,aIb,bIb,cIb,dIb,eIb,fIb,gIb,hIb;var xN=tfb(yye,'TraversalStrategy',257,WI,lIb,kIb);var mIb;feb(218,1,{218:1},pIb);_.Ib=function qIb(){return 'NEdge[id='+this.b+' w='+this.g+' d='+this.a+']'};_.a=1;_.b=0;_.c=0;_.f=false;_.g=0;var zN=sfb(Gye,'NEdge',218);feb(182,1,{},wIb);var yN=sfb(Gye,'NEdge/NEdgeBuilder',182);feb(662,1,{},BIb);var AN=sfb(Gye,'NGraph',662);feb(125,1,{125:1},DIb);_.c=-1;_.d=0;_.e=0;_.i=-1;_.j=false;var DN=sfb(Gye,'NNode',125);feb(808,1,Exe,GIb);_.Jc=function OIb(a){xgb(this,a)};_.Lc=function VIb(){return new SDb(null,new Swb(this,16))};_.jd=function $Ib(a){tvb(this,a)};_.Nc=function _Ib(){return new Swb(this,16)};_.Oc=function aJb(){return new SDb(null,new Swb(this,16))};_.bd=function HIb(a,b){++this.b;Qmb(this.a,a,b)};_.Fc=function IIb(a){return EIb(this,a)};_.cd=function JIb(a,b){++this.b;return Smb(this.a,a,b)};_.Gc=function KIb(a){++this.b;return Tmb(this.a,a)};_.$b=function LIb(){++this.b;aFb(this.a.c,0)};_.Hc=function MIb(a){return Wmb(this.a,a,0)!=-1};_.Ic=function NIb(a){return Be(this.a,a)};_.Xb=function PIb(a){return Vmb(this.a,a)};_.dd=function QIb(a){return Wmb(this.a,a,0)};_.dc=function RIb(){return this.a.c.length==0};_.Kc=function SIb(){return Nr(new Anb(this.a))};_.ed=function TIb(){throw Adb(new jib)};_.fd=function UIb(a){throw Adb(new jib)};_.gd=function WIb(a){++this.b;return Xmb(this.a,a)};_.Mc=function XIb(a){return FIb(this,a)};_.hd=function YIb(a,b){++this.b;return $mb(this.a,a,b)};_.gc=function ZIb(){return this.a.c.length};_.kd=function bJb(a,b){return new Rkb(this.a,a,b)};_.Pc=function cJb(){return UEb(this.a.c)};_.Qc=function dJb(a){return anb(this.a,a)};_.b=0;var BN=sfb(Gye,'NNode/ChangeAwareArrayList',808);feb(275,1,{},gJb);var CN=sfb(Gye,'NNode/NNodeBuilder',275);feb(1695,1,{},BJb);_.a=false;_.f=lve;_.j=0;var EN=sfb(Gye,'NetworkSimplex',1695);feb(1314,1,Qve,HJb);_.Cd=function IJb(a){GJb(this.a,RD(a,695),true,false)};var FN=sfb(Iye,'NodeLabelAndSizeCalculator/lambda$0$Type',1314);feb(565,1,{},PJb);_.b=true;_.c=true;_.d=true;_.e=true;var GN=sfb(Iye,'NodeMarginCalculator',565);feb(217,1,{217:1});_.j=false;_.k=false;var IN=sfb(Jye,'Cell',217);feb(127,217,{127:1,217:1},TJb);_.jf=function UJb(){return SJb(this)};_.kf=function VJb(){var a;a=this.n;return this.a.a+a.b+a.c};var HN=sfb(Jye,'AtomicCell',127);feb(237,22,{3:1,34:1,22:1,237:1},$Jb);var WJb,XJb,YJb;var JN=tfb(Jye,'ContainerArea',237,WI,aKb,_Jb);var bKb;feb(336,217,Lye);var KN=sfb(Jye,'ContainerCell',336);feb(1538,336,Lye,wKb);_.jf=function xKb(){var a;a=0;this.e?this.b?(a=this.b.b):!!this.a[1][1]&&(a=this.a[1][1].jf()):(a=vKb(this,rKb(this,true)));return a>0?a+this.n.d+this.n.a:0};_.kf=function yKb(){var a,b,c,d,e;e=0;if(this.e){this.b?(e=this.b.a):!!this.a[1][1]&&(e=this.a[1][1].kf())}else if(this.g){e=vKb(this,pKb(this,null,true))}else{for(b=(ZJb(),cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb])),c=0,d=b.length;c<d;++c){a=b[c];e=$wnd.Math.max(e,vKb(this,pKb(this,a,true)))}}return e>0?e+this.n.b+this.n.c:0};_.lf=function zKb(){var a,b,c,d,e;if(this.g){a=pKb(this,null,false);for(c=(ZJb(),cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb])),d=0,e=c.length;d<e;++d){b=c[d];nKb(this,b,a)}}else{for(c=(ZJb(),cD(WC(JN,1),jwe,237,0,[WJb,XJb,YJb])),d=0,e=c.length;d<e;++d){b=c[d];a=pKb(this,b,false);nKb(this,b,a)}}};_.mf=function AKb(){var a,b,c,d;b=this.i;a=this.n;d=rKb(this,false);lKb(this,(ZJb(),WJb),b.d+a.d,d);lKb(this,YJb,b.d+b.a-a.a-d[2],d);c=b.a-a.d-a.a;if(d[0]>0){d[0]+=this.d;c-=d[0]}if(d[2]>0){d[2]+=this.d;c-=d[2]}this.c.a=$wnd.Math.max(0,c);this.c.d=b.d+a.d+(this.c.a-c)/2;d[1]=$wnd.Math.max(d[1],c);lKb(this,XJb,b.d+a.d+d[0]-(d[1]-c)/2,d)};_.b=null;_.d=0;_.e=false;_.f=false;_.g=false;var iKb=0,jKb=0;var LN=sfb(Jye,'GridContainerCell',1538);feb(471,22,{3:1,34:1,22:1,471:1},FKb);var BKb,CKb,DKb;var MN=tfb(Jye,'HorizontalLabelAlignment',471,WI,HKb,GKb);var IKb;feb(314,217,{217:1,314:1},TKb,UKb,VKb);_.jf=function WKb(){return PKb(this)};_.kf=function XKb(){return QKb(this)};_.a=0;_.c=false;var NN=sfb(Jye,'LabelCell',314);feb(252,336,{217:1,336:1,252:1},dLb);_.jf=function eLb(){return YKb(this)};_.kf=function fLb(){return ZKb(this)};_.lf=function iLb(){$Kb(this)};_.mf=function jLb(){_Kb(this)};_.b=0;_.c=0;_.d=false;var SN=sfb(Jye,'StripContainerCell',252);feb(1691,1,nwe,kLb);_.Mb=function lLb(a){return gLb(RD(a,217))};var ON=sfb(Jye,'StripContainerCell/lambda$0$Type',1691);feb(1692,1,{},mLb);_.Ye=function nLb(a){return RD(a,217).kf()};var PN=sfb(Jye,'StripContainerCell/lambda$1$Type',1692);feb(1693,1,nwe,oLb);_.Mb=function pLb(a){return hLb(RD(a,217))};var QN=sfb(Jye,'StripContainerCell/lambda$2$Type',1693);feb(1694,1,{},qLb);_.Ye=function rLb(a){return RD(a,217).jf()};var RN=sfb(Jye,'StripContainerCell/lambda$3$Type',1694);feb(472,22,{3:1,34:1,22:1,472:1},wLb);var sLb,tLb,uLb;var TN=tfb(Jye,'VerticalLabelAlignment',472,WI,yLb,xLb);var zLb;feb(800,1,{},CLb);_.c=0;_.d=0;_.k=0;_.s=0;_.t=0;_.v=false;_.w=0;_.D=false;var WN=sfb(Rye,'NodeContext',800);feb(1536,1,fye,FLb);_.Ne=function GLb(a,b){return ELb(RD(a,64),RD(b,64))};_.Fb=function HLb(a){return this===a};_.Oe=function ILb(){return new Frb(this)};var UN=sfb(Rye,'NodeContext/0methodref$comparePortSides$Type',1536);feb(1537,1,fye,JLb);_.Ne=function KLb(a,b){return DLb(RD(a,117),RD(b,117))};_.Fb=function LLb(a){return this===a};_.Oe=function MLb(){return new Frb(this)};var VN=sfb(Rye,'NodeContext/1methodref$comparePortContexts$Type',1537);feb(164,22,{3:1,34:1,22:1,164:1},kMb);var NLb,OLb,PLb,QLb,RLb,SLb,TLb,ULb,VLb,WLb,XLb,YLb,ZLb,$Lb,_Lb,aMb,bMb,cMb,dMb,eMb,fMb,gMb;var XN=tfb(Rye,'NodeLabelLocation',164,WI,nMb,mMb);var oMb;feb(117,1,{117:1},rMb);_.a=false;var YN=sfb(Rye,'PortContext',117);feb(1541,1,Qve,KMb);_.Cd=function LMb(a){NKb(RD(a,314))};var ZN=sfb(Uye,Vye,1541);feb(1542,1,nwe,MMb);_.Mb=function NMb(a){return !!RD(a,117).c};var $N=sfb(Uye,Wye,1542);feb(1543,1,Qve,OMb);_.Cd=function PMb(a){NKb(RD(a,117).c)};var _N=sfb(Uye,'LabelPlacer/lambda$2$Type',1543);var QMb;feb(1540,1,Qve,YMb);_.Cd=function ZMb(a){RMb();qMb(RD(a,117))};var aO=sfb(Uye,'NodeLabelAndSizeUtilities/lambda$0$Type',1540);feb(801,1,Qve,dNb);_.Cd=function eNb(a){bNb(this.b,this.c,this.a,RD(a,187))};_.a=false;_.c=false;var bO=sfb(Uye,'NodeLabelCellCreator/lambda$0$Type',801);feb(1539,1,Qve,kNb);_.Cd=function lNb(a){jNb(this.a,RD(a,187))};var cO=sfb(Uye,'PortContextCreator/lambda$0$Type',1539);var sNb;feb(1902,1,{},MNb);var eO=sfb(Yye,'GreedyRectangleStripOverlapRemover',1902);feb(1903,1,fye,ONb);_.Ne=function PNb(a,b){return NNb(RD(a,226),RD(b,226))};_.Fb=function QNb(a){return this===a};_.Oe=function RNb(){return new Frb(this)};var dO=sfb(Yye,'GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type',1903);feb(1849,1,{},YNb);_.a=5;_.e=0;var kO=sfb(Yye,'RectangleStripOverlapRemover',1849);feb(1850,1,fye,aOb);_.Ne=function bOb(a,b){return ZNb(RD(a,226),RD(b,226))};_.Fb=function cOb(a){return this===a};_.Oe=function dOb(){return new Frb(this)};var fO=sfb(Yye,'RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type',1850);feb(1852,1,fye,eOb);_.Ne=function fOb(a,b){return $Nb(RD(a,226),RD(b,226))};_.Fb=function gOb(a){return this===a};_.Oe=function hOb(){return new Frb(this)};var gO=sfb(Yye,'RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type',1852);feb(417,22,{3:1,34:1,22:1,417:1},nOb);var iOb,jOb,kOb,lOb;var hO=tfb(Yye,'RectangleStripOverlapRemover/OverlapRemovalDirection',417,WI,pOb,oOb);var qOb;feb(226,1,{226:1},sOb);var iO=sfb(Yye,'RectangleStripOverlapRemover/RectangleNode',226);feb(1851,1,Qve,tOb);_.Cd=function uOb(a){TNb(this.a,RD(a,226))};var jO=sfb(Yye,'RectangleStripOverlapRemover/lambda$1$Type',1851);feb(1323,1,fye,xOb);_.Ne=function yOb(a,b){return wOb(RD(a,176),RD(b,176))};_.Fb=function zOb(a){return this===a};_.Oe=function AOb(){return new Frb(this)};var oO=sfb($ye,'PolyominoCompactor/CornerCasesGreaterThanRestComparator',1323);feb(1326,1,{},BOb);_.Kb=function COb(a){return RD(a,334).a};var lO=sfb($ye,'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type',1326);feb(1327,1,nwe,DOb);_.Mb=function EOb(a){return RD(a,332).a};var mO=sfb($ye,'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type',1327);feb(1328,1,nwe,FOb);_.Mb=function GOb(a){return RD(a,332).a};var nO=sfb($ye,'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type',1328);feb(1321,1,fye,IOb);_.Ne=function JOb(a,b){return HOb(RD(a,176),RD(b,176))};_.Fb=function KOb(a){return this===a};_.Oe=function LOb(){return new Frb(this)};var qO=sfb($ye,'PolyominoCompactor/MinNumOfExtensionDirectionsComparator',1321);feb(1324,1,{},MOb);_.Kb=function NOb(a){return RD(a,334).a};var pO=sfb($ye,'PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type',1324);feb(781,1,fye,POb);_.Ne=function QOb(a,b){return OOb(RD(a,176),RD(b,176))};_.Fb=function ROb(a){return this===a};_.Oe=function SOb(){return new Frb(this)};var rO=sfb($ye,'PolyominoCompactor/MinNumOfExtensionsComparator',781);feb(1319,1,fye,UOb);_.Ne=function VOb(a,b){return TOb(RD(a,330),RD(b,330))};_.Fb=function WOb(a){return this===a};_.Oe=function XOb(){return new Frb(this)};var tO=sfb($ye,'PolyominoCompactor/MinPerimeterComparator',1319);feb(1320,1,fye,ZOb);_.Ne=function $Ob(a,b){return YOb(RD(a,330),RD(b,330))};_.Fb=function _Ob(a){return this===a};_.Oe=function aPb(){return new Frb(this)};var sO=sfb($ye,'PolyominoCompactor/MinPerimeterComparatorWithShape',1320);feb(1322,1,fye,cPb);_.Ne=function dPb(a,b){return bPb(RD(a,176),RD(b,176))};_.Fb=function ePb(a){return this===a};_.Oe=function fPb(){return new Frb(this)};var vO=sfb($ye,'PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator',1322);feb(1325,1,{},gPb);_.Kb=function hPb(a){return RD(a,334).a};var uO=sfb($ye,'PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type',1325);feb(782,1,{},kPb);_.Ve=function lPb(a,b){return jPb(this,RD(a,42),RD(b,176))};var wO=sfb($ye,'SuccessorCombination',782);feb(649,1,{},nPb);_.Ve=function oPb(a,b){var c;return mPb((c=RD(a,42),RD(b,176),c))};var xO=sfb($ye,'SuccessorJitter',649);feb(648,1,{},qPb);_.Ve=function rPb(a,b){var c;return pPb((c=RD(a,42),RD(b,176),c))};var yO=sfb($ye,'SuccessorLineByLine',648);feb(573,1,{},tPb);_.Ve=function uPb(a,b){var c;return sPb((c=RD(a,42),RD(b,176),c))};var zO=sfb($ye,'SuccessorManhattan',573);feb(1344,1,{},wPb);_.Ve=function xPb(a,b){var c;return vPb((c=RD(a,42),RD(b,176),c))};var AO=sfb($ye,'SuccessorMaxNormWindingInMathPosSense',1344);feb(409,1,{},APb);_.Ve=function BPb(a,b){return yPb(this,a,b)};_.c=false;_.d=false;_.e=false;_.f=false;var CO=sfb($ye,'SuccessorQuadrantsGeneric',409);feb(1345,1,{},CPb);_.Kb=function DPb(a){return RD(a,334).a};var BO=sfb($ye,'SuccessorQuadrantsGeneric/lambda$0$Type',1345);feb(332,22,{3:1,34:1,22:1,332:1},JPb);_.a=false;var EPb,FPb,GPb,HPb;var DO=tfb(dze,eze,332,WI,LPb,KPb);var MPb;feb(1317,1,{});_.Ib=function UPb(){var a,b,c,d,e,f;c=' ';a=sgb(0);for(e=0;e<this.o;e++){c+=''+a.a;a=sgb(OPb(a.a))}c+='\n';a=sgb(0);for(f=0;f<this.p;f++){c+=''+a.a;a=sgb(OPb(a.a));for(d=0;d<this.o;d++){b=SPb(this,d,f);Ddb(b,0)==0?(c+='_'):Ddb(b,1)==0?(c+='X'):(c+='0')}c+='\n'}return zhb(c,0,c.length-1)};_.o=0;_.p=0;var HO=sfb(dze,'TwoBitGrid',1317);feb(330,1317,{330:1},gQb);_.j=0;_.k=0;var EO=sfb(dze,'PlanarGrid',330);feb(176,330,{330:1,176:1});_.g=0;_.i=0;var FO=sfb(dze,'Polyomino',176);var U5=ufb(jze,kze);feb(137,1,lze,qQb);_.qf=function uQb(a,b){return oQb(this,a,b)};_.nf=function rQb(){return lQb(this)};_.of=function sQb(a){return mQb(this,a)};_.pf=function tQb(a){return nQb(this,a)};var W5=sfb(jze,'MapPropertyHolder',137);feb(1318,137,lze,vQb);var GO=sfb(dze,'Polyominoes',1318);var wQb=false,xQb,yQb;feb(1828,1,Qve,GQb);_.Cd=function HQb(a){AQb(RD(a,225))};var IO=sfb(mze,'DepthFirstCompaction/0methodref$compactTree$Type',1828);feb(825,1,Qve,IQb);_.Cd=function JQb(a){DQb(this.a,RD(a,225))};var JO=sfb(mze,'DepthFirstCompaction/lambda$1$Type',825);feb(1829,1,Qve,KQb);_.Cd=function LQb(a){EQb(this.a,this.b,this.c,RD(a,225))};var KO=sfb(mze,'DepthFirstCompaction/lambda$2$Type',1829);var MQb,NQb;feb(68,1,{68:1},TQb);var LO=sfb(mze,'Node',68);feb(1214,1,{},WQb);var QO=sfb(mze,'ScanlineOverlapCheck',1214);feb(1215,1,{693:1},$Qb);_.bf=function _Qb(a){YQb(this,RD(a,451))};var NO=sfb(mze,'ScanlineOverlapCheck/OverlapsScanlineHandler',1215);feb(1216,1,fye,bRb);_.Ne=function cRb(a,b){return aRb(RD(a,68),RD(b,68))};_.Fb=function dRb(a){return this===a};_.Oe=function eRb(){return new Frb(this)};var MO=sfb(mze,'ScanlineOverlapCheck/OverlapsScanlineHandler/lambda$0$Type',1216);feb(451,1,{451:1},fRb);_.a=false;var OO=sfb(mze,'ScanlineOverlapCheck/Timestamp',451);feb(1217,1,fye,gRb);_.Ne=function hRb(a,b){return XQb(RD(a,451),RD(b,451))};_.Fb=function iRb(a){return this===a};_.Oe=function jRb(){return new Frb(this)};var PO=sfb(mze,'ScanlineOverlapCheck/lambda$0$Type',1217);feb(557,1,{},kRb);var RO=sfb(nze,'SVGImage',557);feb(334,1,{334:1},lRb);_.Ib=function mRb(){return '('+this.a+pve+this.b+pve+this.c+')'};var SO=sfb(nze,'UniqueTriple',334);feb(205,1,oze);var f2=sfb(pze,'AbstractLayoutProvider',205);feb(1114,205,oze,pRb);_.rf=function qRb(a,b){var c,d,e,f;b.Ug(qze,1);this.a=Kfb(UD(Gxd(a,(tSb(),sSb))));if(Hxd(a,iSb)){e=WD(Gxd(a,iSb));c=sgd(ygd(),e);if(c){d=RD(ltd(c.f),205);d.rf(a,b.eh(1))}}f=new rTb(this.a);this.b=pTb(f,a);switch(RD(Gxd(a,(eSb(),aSb)),489).g){case 0:sRb(new wRb,this.b);Ixd(a,lSb,mQb(this.b,lSb));break;default:gib();String.fromCharCode(10);}hTb(f);Ixd(a,kSb,this.b);b.Vg()};_.a=0;var TO=sfb(rze,'DisCoLayoutProvider',1114);feb(1208,1,{},wRb);_.c=false;_.e=0;_.f=0;var UO=sfb(rze,'DisCoPolyominoCompactor',1208);feb(567,1,{567:1},DRb);_.b=true;var VO=sfb(sze,'DCComponent',567);feb(406,22,{3:1,34:1,22:1,406:1},JRb);_.a=false;var ERb,FRb,GRb,HRb;var WO=tfb(sze,'DCDirection',406,WI,LRb,KRb);var MRb;feb(272,137,{3:1,272:1,96:1,137:1},ORb);var XO=sfb(sze,'DCElement',272);feb(407,1,{407:1},QRb);_.c=0;var YO=sfb(sze,'DCExtension',407);feb(762,137,lze,TRb);var ZO=sfb(sze,'DCGraph',762);feb(489,22,{3:1,34:1,22:1,489:1},WRb);var URb;var $O=tfb(tze,uze,489,WI,YRb,XRb);var ZRb;feb(865,1,Eye,fSb);_.hf=function gSb(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,vze),zze),'Connected Components Compaction Strategy'),'Strategy for packing different connected components in order to save space and enhance readability of a graph.'),bSb),(kid(),eid)),$O),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,wze),zze),'Connected Components Layout Algorithm'),"A layout algorithm that is to be applied to each connected component before the components themselves are compacted. If unspecified, the positions of the components' nodes are not altered."),iid),qJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,xze),'debug'),'DCGraph'),'Access to the DCGraph is intended for the debug view,'),hid),jJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,yze),'debug'),'List of Polyominoes'),'Access to the polyominoes is intended for the debug view,'),hid),jJ),xsb(Whd))));uSb((new vSb,a))};var _Rb,aSb,bSb,cSb,dSb;var _O=sfb(tze,'DisCoMetaDataProvider',865);feb(1010,1,Eye,vSb);_.hf=function wSb(a){uSb(a)};var hSb,iSb,jSb,kSb,lSb,mSb,nSb,oSb,pSb,qSb,rSb,sSb;var bP=sfb(tze,'DisCoOptions',1010);feb(1011,1,{},xSb);_.sf=function ySb(){var a;return a=new pRb,a};_.tf=function zSb(a){};var aP=sfb(tze,'DisCoOptions/DiscoFactory',1011);feb(568,176,{330:1,176:1,568:1},DSb);_.a=0;_.b=0;_.c=0;_.d=0;var cP=sfb('org.eclipse.elk.alg.disco.structures','DCPolyomino',568);var ESb,FSb,GSb;feb(1286,1,nwe,TSb);_.Mb=function USb(a){return SSb(a)};var dP=sfb(Fze,'ElkGraphComponentsProcessor/lambda$0$Type',1286);feb(1287,1,{},VSb);_.Kb=function WSb(a){return HSb(),JGd(RD(a,74))};var eP=sfb(Fze,'ElkGraphComponentsProcessor/lambda$1$Type',1287);feb(1288,1,nwe,XSb);_.Mb=function YSb(a){return NSb(RD(a,74))};var fP=sfb(Fze,'ElkGraphComponentsProcessor/lambda$2$Type',1288);feb(1289,1,{},ZSb);_.Kb=function $Sb(a){return HSb(),LGd(RD(a,74))};var gP=sfb(Fze,'ElkGraphComponentsProcessor/lambda$3$Type',1289);feb(1290,1,nwe,_Sb);_.Mb=function aTb(a){return OSb(RD(a,74))};var hP=sfb(Fze,'ElkGraphComponentsProcessor/lambda$4$Type',1290);feb(1291,1,nwe,bTb);_.Mb=function cTb(a){return PSb(this.a,RD(a,74))};var iP=sfb(Fze,'ElkGraphComponentsProcessor/lambda$5$Type',1291);feb(1292,1,{},dTb);_.Kb=function eTb(a){return QSb(this.a,RD(a,74))};var jP=sfb(Fze,'ElkGraphComponentsProcessor/lambda$6$Type',1292);feb(1205,1,{},rTb);_.a=0;var mP=sfb(Fze,'ElkGraphTransformer',1205);feb(1206,1,{},tTb);_.Yd=function uTb(a,b){sTb(this,RD(a,167),RD(b,272))};var lP=sfb(Fze,'ElkGraphTransformer/OffsetApplier',1206);feb(1207,1,Qve,wTb);_.Cd=function xTb(a){vTb(this,RD(a,8))};var kP=sfb(Fze,'ElkGraphTransformer/OffsetApplier/OffSetToChainApplier',1207);feb(760,1,{},DTb);var oP=sfb(Kze,Lze,760);feb(1195,1,fye,FTb);_.Ne=function GTb(a,b){return ETb(RD(a,235),RD(b,235))};_.Fb=function HTb(a){return this===a};_.Oe=function ITb(){return new Frb(this)};var nP=sfb(Kze,Mze,1195);feb(1196,1,Qve,OTb);_.Cd=function PTb(a){NTb(this.b,this.a,RD(a,250))};var pP=sfb(Kze,Nze,1196);feb(738,205,oze,TTb);_.rf=function UTb(a,b){QTb(this,a,b)};var qP=sfb(Kze,'ForceLayoutProvider',738);feb(309,137,{3:1,309:1,96:1,137:1});var wP=sfb(Oze,'FParticle',309);feb(250,309,{3:1,250:1,309:1,96:1,137:1},WTb);_.Ib=function XTb(){var a;if(this.a){a=Wmb(this.a.a,this,0);return a>=0?'b'+a+'['+bUb(this.a)+']':'b['+bUb(this.a)+']'}return 'b_'+kFb(this)};var rP=sfb(Oze,'FBendpoint',250);feb(290,137,{3:1,290:1,96:1,137:1},cUb);_.Ib=function dUb(){return bUb(this)};var sP=sfb(Oze,'FEdge',290);feb(235,137,{3:1,235:1,96:1,137:1},gUb);var tP=sfb(Oze,'FGraph',235);feb(454,309,{3:1,454:1,309:1,96:1,137:1},iUb);_.Ib=function jUb(){return this.b==null||this.b.length==0?'l['+bUb(this.a)+']':'l_'+this.b};var uP=sfb(Oze,'FLabel',454);feb(153,309,{3:1,153:1,309:1,96:1,137:1},lUb);_.Ib=function mUb(){return kUb(this)};_.a=0;var vP=sfb(Oze,'FNode',153);feb(2100,1,{});_.vf=function rUb(a){nUb(this,a)};_.wf=function sUb(){oUb(this)};_.d=0;var xP=sfb(Qze,'AbstractForceModel',2100);feb(641,2100,{641:1},tUb);_.uf=function vUb(a,b){var c,d,e,f,g;qUb(this.f,a,b);e=ojd(ajd(b.d),a.d);g=$wnd.Math.sqrt(e.a*e.a+e.b*e.b);d=$wnd.Math.max(0,g-ejd(a.e)/2-ejd(b.e)/2);c=fUb(this.e,a,b);c>0?(f=-uUb(d,this.c)*c):(f=yUb(d,this.b)*RD(mQb(a,(yVb(),lVb)),17).a);ijd(e,f/g);return e};_.vf=function wUb(a){nUb(this,a);this.a=RD(mQb(a,(yVb(),aVb)),17).a;this.c=Kfb(UD(mQb(a,rVb)));this.b=Kfb(UD(mQb(a,nVb)))};_.xf=function xUb(a){return a<this.a};_.a=0;_.b=0;_.c=0;var yP=sfb(Qze,'EadesModel',641);feb(642,2100,{642:1},zUb);_.uf=function BUb(a,b){var c,d,e,f,g;qUb(this.f,a,b);e=ojd(ajd(b.d),a.d);g=$wnd.Math.sqrt(e.a*e.a+e.b*e.b);d=$wnd.Math.max(0,g-ejd(a.e)/2-ejd(b.e)/2);f=FUb(d,this.a)*RD(mQb(a,(yVb(),lVb)),17).a;c=fUb(this.e,a,b);c>0&&(f-=AUb(d,this.a)*c);ijd(e,f*this.b/g);return e};_.vf=function CUb(a){var b,c,d,e,f,g,h;nUb(this,a);this.b=Kfb(UD(mQb(a,(yVb(),sVb))));this.c=this.b/RD(mQb(a,aVb),17).a;d=a.e.c.length;f=0;e=0;for(h=new Anb(a.e);h.a<h.c.c.length;){g=RD(ynb(h),153);f+=g.e.a;e+=g.e.b}b=f*e;c=Kfb(UD(mQb(a,rVb)))*Tye;this.a=$wnd.Math.sqrt(b/(2*d))*c};_.wf=function DUb(){oUb(this);this.b-=this.c};_.xf=function EUb(a){return this.b>0};_.a=0;_.b=0;_.c=0;var zP=sfb(Qze,'FruchtermanReingoldModel',642);feb(860,1,Eye,PUb);_.hf=function QUb(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Rze),''),'Force Model'),'Determines the model for force calculation.'),IUb),(kid(),eid)),BP),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Sze),''),'Iterations'),'The number of iterations on the force model.'),sgb(300)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Tze),''),'Repulsive Power'),'Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model'),sgb(0)),gid),bJ),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Uze),''),'FR Temperature'),'The temperature is used as a scaling factor for particle displacements.'),Vze),did),VI),xsb(Whd))));zgd(a,Uze,Rze,NUb);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Wze),''),'Eades Repulsion'),"Factor for repulsive forces in Eades' model."),5),did),VI),xsb(Whd))));zgd(a,Wze,Rze,KUb);zVb((new AVb,a))};var GUb,HUb,IUb,JUb,KUb,LUb,MUb,NUb;var AP=sfb(Xze,'ForceMetaDataProvider',860);feb(432,22,{3:1,34:1,22:1,432:1},UUb);var RUb,SUb;var BP=tfb(Xze,'ForceModelStrategy',432,WI,WUb,VUb);var XUb;feb(Awe,1,Eye,AVb);_.hf=function BVb(a){zVb(a)};var ZUb,$Ub,_Ub,aVb,bVb,cVb,dVb,eVb,fVb,gVb,hVb,iVb,jVb,kVb,lVb,mVb,nVb,oVb,pVb,qVb,rVb,sVb,tVb,uVb,vVb,wVb,xVb;var DP=sfb(Xze,'ForceOptions',Awe);feb(1001,1,{},CVb);_.sf=function DVb(){var a;return a=new TTb,a};_.tf=function EVb(a){};var CP=sfb(Xze,'ForceOptions/ForceFactory',1001);var FVb,GVb,HVb,IVb;feb(861,1,Eye,RVb);_.hf=function SVb(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,vAe),''),'Fixed Position'),'Prevent that the node is moved by the layout algorithm.'),(Geb(),false)),(kid(),cid)),QI),xsb((Yhd(),Vhd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,wAe),''),'Desired Edge Length'),'Either specified for parent nodes or for individual edges, where the latter takes higher precedence.'),100),did),VI),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Thd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,xAe),''),'Layout Dimension'),'Dimensions that are permitted to be altered during layout.'),MVb),eid),JP),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,yAe),''),'Stress Epsilon'),'Termination criterion for the iterative process.'),Vze),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,zAe),''),'Iteration Limit'),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),sgb(lve)),gid),bJ),xsb(Whd))));eWb((new fWb,a))};var KVb,LVb,MVb,NVb,OVb,PVb;var EP=sfb(Xze,'StressMetaDataProvider',861);feb(1004,1,Eye,fWb);_.hf=function gWb(a){eWb(a)};var TVb,UVb,VVb,WVb,XVb,YVb,ZVb,$Vb,_Vb,aWb,bWb,cWb;var GP=sfb(Xze,'StressOptions',1004);feb(1005,1,{},hWb);_.sf=function iWb(){var a;return a=new kWb,a};_.tf=function jWb(a){};var FP=sfb(Xze,'StressOptions/StressFactory',1005);feb(1110,205,oze,kWb);_.rf=function lWb(a,b){var c,d,e,f,g;b.Ug(BAe,1);Heb(TD(Gxd(a,(dWb(),XVb))))?Heb(TD(Gxd(a,bWb)))||RFb((c=new SFb((lud(),new zud(a))),c)):QTb(new TTb,a,b.eh(1));e=KTb(a);d=CTb(this.a,e);for(g=d.Kc();g.Ob();){f=RD(g.Pb(),235);if(f.e.c.length<=1){continue}uWb(this.b,f);sWb(this.b);Umb(f.d,new mWb)}e=BTb(d);JTb(e);b.Vg()};var IP=sfb(DAe,'StressLayoutProvider',1110);feb(1111,1,Qve,mWb);_.Cd=function nWb(a){hUb(RD(a,454))};var HP=sfb(DAe,'StressLayoutProvider/lambda$0$Type',1111);feb(1002,1,{},vWb);_.c=0;_.e=0;_.g=0;var LP=sfb(DAe,'StressMajorization',1002);feb(391,22,{3:1,34:1,22:1,391:1},BWb);var xWb,yWb,zWb;var JP=tfb(DAe,'StressMajorization/Dimension',391,WI,DWb,CWb);var EWb;feb(1003,1,fye,GWb);_.Ne=function HWb(a,b){return wWb(this.a,RD(a,153),RD(b,153))};_.Fb=function IWb(a){return this===a};_.Oe=function JWb(){return new Frb(this)};var KP=sfb(DAe,'StressMajorization/lambda$0$Type',1003);feb(1192,1,{},RWb);var OP=sfb(FAe,'ElkLayered',1192);feb(1193,1,Qve,UWb);_.Cd=function VWb(a){SWb(this.a,RD(a,36))};var MP=sfb(FAe,'ElkLayered/lambda$0$Type',1193);feb(1194,1,Qve,WWb);_.Cd=function XWb(a){TWb(this.a,RD(a,36))};var NP=sfb(FAe,'ElkLayered/lambda$1$Type',1194);feb(1281,1,{},dXb);var YWb,ZWb,$Wb;var SP=sfb(FAe,'GraphConfigurator',1281);feb(770,1,Qve,fXb);_.Cd=function gXb(a){aXb(this.a,RD(a,10))};var PP=sfb(FAe,'GraphConfigurator/lambda$0$Type',770);feb(771,1,{},hXb);_.Kb=function iXb(a){return _Wb(),new SDb(null,new Swb(RD(a,30).a,16))};var QP=sfb(FAe,'GraphConfigurator/lambda$1$Type',771);feb(772,1,Qve,jXb);_.Cd=function kXb(a){aXb(this.a,RD(a,10))};var RP=sfb(FAe,'GraphConfigurator/lambda$2$Type',772);feb(1109,205,oze,lXb);_.rf=function mXb(a,b){var c;c=c5b(new k5b,a);dE(Gxd(a,(yCc(),IAc)))===dE((Fnd(),Cnd))?LWb(this.a,c,b):MWb(this.a,c,b);b.$g()||J5b(new N5b,c)};var TP=sfb(FAe,'LayeredLayoutProvider',1109);feb(367,22,{3:1,34:1,22:1,367:1},tXb);var nXb,oXb,pXb,qXb,rXb;var UP=tfb(FAe,'LayeredPhases',367,WI,vXb,uXb);var wXb;feb(1717,1,{},EXb);_.i=0;var yXb;var XP=sfb(GAe,'ComponentsToCGraphTransformer',1717);var jYb;feb(1718,1,{},FXb);_.yf=function GXb(a,b){return $wnd.Math.min(a.a!=null?Kfb(a.a):a.c.i,b.a!=null?Kfb(b.a):b.c.i)};_.zf=function HXb(a,b){return $wnd.Math.min(a.a!=null?Kfb(a.a):a.c.i,b.a!=null?Kfb(b.a):b.c.i)};var VP=sfb(GAe,'ComponentsToCGraphTransformer/1',1718);feb(86,1,{86:1});_.i=0;_.k=true;_.o=pxe;var bQ=sfb(HAe,'CNode',86);feb(470,86,{470:1,86:1},IXb,JXb);_.Ib=function KXb(){return ''};var WP=sfb(GAe,'ComponentsToCGraphTransformer/CRectNode',470);feb(1688,1,{},XXb);var LXb,MXb;var $P=sfb(GAe,'OneDimensionalComponentsCompaction',1688);feb(1689,1,{},$Xb);_.Kb=function _Xb(a){return YXb(RD(a,42))};_.Fb=function aYb(a){return this===a};var YP=sfb(GAe,'OneDimensionalComponentsCompaction/lambda$0$Type',1689);feb(1690,1,{},bYb);_.Kb=function cYb(a){return ZXb(RD(a,42))};_.Fb=function dYb(a){return this===a};var ZP=sfb(GAe,'OneDimensionalComponentsCompaction/lambda$1$Type',1690);feb(1720,1,{},fYb);var _P=sfb(HAe,'CGraph',1720);feb(194,1,{194:1},iYb);_.b=0;_.c=0;_.e=0;_.g=true;_.i=pxe;var aQ=sfb(HAe,'CGroup',194);feb(1719,1,{},lYb);_.yf=function mYb(a,b){return $wnd.Math.max(a.a!=null?Kfb(a.a):a.c.i,b.a!=null?Kfb(b.a):b.c.i)};_.zf=function nYb(a,b){return $wnd.Math.max(a.a!=null?Kfb(a.a):a.c.i,b.a!=null?Kfb(b.a):b.c.i)};var cQ=sfb(HAe,kye,1719);feb(1721,1,{},EYb);_.d=false;var oYb;var eQ=sfb(HAe,pye,1721);feb(1722,1,{},FYb);_.Kb=function GYb(a){return pYb(),Geb(),RD(RD(a,42).a,86).d.e!=0?true:false};_.Fb=function HYb(a){return this===a};var dQ=sfb(HAe,qye,1722);feb(833,1,{},KYb);_.a=false;_.b=false;_.c=false;_.d=false;var fQ=sfb(HAe,rye,833);feb(1898,1,{},QYb);var kQ=sfb(IAe,sye,1898);var wQ=ufb(JAe,hye);feb(1899,1,{382:1},UYb);_.bf=function VYb(a){SYb(this,RD(a,476))};var hQ=sfb(IAe,tye,1899);feb(Owe,1,fye,XYb);_.Ne=function YYb(a,b){return WYb(RD(a,86),RD(b,86))};_.Fb=function ZYb(a){return this===a};_.Oe=function $Yb(){return new Frb(this)};var gQ=sfb(IAe,uye,Owe);feb(476,1,{476:1},_Yb);_.a=false;var iQ=sfb(IAe,vye,476);feb(1901,1,fye,aZb);_.Ne=function bZb(a,b){return RYb(RD(a,476),RD(b,476))};_.Fb=function cZb(a){return this===a};_.Oe=function dZb(){return new Frb(this)};var jQ=sfb(IAe,wye,1901);feb(148,1,{148:1},eZb,fZb);_.Fb=function gZb(a){var b;if(a==null){return false}if(mQ!=rb(a)){return false}b=RD(a,148);return Fvb(this.c,b.c)&&Fvb(this.d,b.d)};_.Hb=function hZb(){return Tnb(cD(WC(jJ,1),rve,1,5,[this.c,this.d]))};_.Ib=function iZb(){return '('+this.c+pve+this.d+(this.a?'cx':'')+this.b+')'};_.a=true;_.c=0;_.d=0;var mQ=sfb(JAe,'Point',148);feb(416,22,{3:1,34:1,22:1,416:1},qZb);var jZb,kZb,lZb,mZb;var lQ=tfb(JAe,'Point/Quadrant',416,WI,uZb,tZb);var vZb;feb(1708,1,{},EZb);_.b=null;_.c=null;_.d=null;_.e=null;_.f=null;var xZb,yZb,zZb,AZb,BZb;var vQ=sfb(JAe,'RectilinearConvexHull',1708);feb(583,1,{382:1},PZb);_.bf=function QZb(a){OZb(this,RD(a,148))};_.b=0;var MZb;var oQ=sfb(JAe,'RectilinearConvexHull/MaximalElementsEventHandler',583);feb(1710,1,fye,SZb);_.Ne=function TZb(a,b){return RZb(UD(a),UD(b))};_.Fb=function UZb(a){return this===a};_.Oe=function VZb(){return new Frb(this)};var nQ=sfb(JAe,'RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type',1710);feb(1709,1,{382:1},XZb);_.bf=function YZb(a){WZb(this,RD(a,148))};_.a=0;_.b=null;_.c=null;_.d=null;_.e=null;var pQ=sfb(JAe,'RectilinearConvexHull/RectangleEventHandler',1709);feb(1711,1,fye,ZZb);_.Ne=function $Zb(a,b){return GZb(RD(a,148),RD(b,148))};_.Fb=function _Zb(a){return this===a};_.Oe=function a$b(){return new Frb(this)};var qQ=sfb(JAe,'RectilinearConvexHull/lambda$0$Type',1711);feb(1712,1,fye,b$b);_.Ne=function c$b(a,b){return HZb(RD(a,148),RD(b,148))};_.Fb=function d$b(a){return this===a};_.Oe=function e$b(){return new Frb(this)};var rQ=sfb(JAe,'RectilinearConvexHull/lambda$1$Type',1712);feb(1713,1,fye,f$b);_.Ne=function g$b(a,b){return IZb(RD(a,148),RD(b,148))};_.Fb=function h$b(a){return this===a};_.Oe=function i$b(){return new Frb(this)};var sQ=sfb(JAe,'RectilinearConvexHull/lambda$2$Type',1713);feb(1714,1,fye,j$b);_.Ne=function k$b(a,b){return JZb(RD(a,148),RD(b,148))};_.Fb=function l$b(a){return this===a};_.Oe=function m$b(){return new Frb(this)};var tQ=sfb(JAe,'RectilinearConvexHull/lambda$3$Type',1714);feb(1715,1,fye,n$b);_.Ne=function o$b(a,b){return KZb(RD(a,148),RD(b,148))};_.Fb=function p$b(a){return this===a};_.Oe=function q$b(){return new Frb(this)};var uQ=sfb(JAe,'RectilinearConvexHull/lambda$4$Type',1715);feb(1716,1,{},s$b);var xQ=sfb(JAe,'Scanline',1716);feb(2104,1,{});var yQ=sfb(KAe,'AbstractGraphPlacer',2104);feb(335,1,{335:1},C$b);_.Ff=function D$b(a){if(this.Gf(a)){Rc(this.b,RD(mQb(a,(Ywc(),ewc)),21),a);return true}else{return false}};_.Gf=function E$b(a){var b,c,d,e;b=RD(mQb(a,(Ywc(),ewc)),21);e=RD(Qc(y$b,b),21);for(d=e.Kc();d.Ob();){c=RD(d.Pb(),21);if(!RD(Qc(this.b,c),15).dc()){return false}}return true};var y$b;var BQ=sfb(KAe,'ComponentGroup',335);feb(779,2104,{},J$b);_.Hf=function K$b(a){var b,c;for(c=new Anb(this.a);c.a<c.c.c.length;){b=RD(ynb(c),335);if(b.Ff(a)){return}}Rmb(this.a,new C$b(a))};_.Ef=function L$b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;this.a.c.length=0;b.a.c.length=0;if(a.dc()){b.f.a=0;b.f.b=0;return}g=RD(a.Xb(0),36);kQb(b,g);for(e=a.Kc();e.Ob();){d=RD(e.Pb(),36);this.Hf(d)}o=new pjd;f=Kfb(UD(mQb(g,(yCc(),SBc))));for(j=new Anb(this.a);j.a<j.c.c.length;){h=RD(ynb(j),335);k=F$b(h,f);x$b(Uc(h.b),o.a,o.b);o.a+=k.a;o.b+=k.b}b.f.a=o.a-f;b.f.b=o.b-f;if(Heb(TD(mQb(g,Vzc)))&&dE(mQb(g,yAc))===dE((Ymd(),Umd))){for(n=a.Kc();n.Ob();){l=RD(n.Pb(),36);w$b(l,l.c.a,l.c.b)}c=new j_b;_$b(c,a,f);for(m=a.Kc();m.Ob();){l=RD(m.Pb(),36);$id(hjd(l.c),c.e)}$id(hjd(b.f),c.a)}for(i=new Anb(this.a);i.a<i.c.c.length;){h=RD(ynb(i),335);v$b(b,Uc(h.b))}};var zQ=sfb(KAe,'ComponentGroupGraphPlacer',779);feb(1312,779,{},N$b);_.Hf=function O$b(a){M$b(this,a)};_.Ef=function P$b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;this.a.c.length=0;b.a.c.length=0;if(a.dc()){b.f.a=0;b.f.b=0;return}g=RD(a.Xb(0),36);kQb(b,g);for(e=a.Kc();e.Ob();){d=RD(e.Pb(),36);M$b(this,d)}t=new pjd;s=new pjd;p=new pjd;o=new pjd;f=Kfb(UD(mQb(g,(yCc(),SBc))));for(j=new Anb(this.a);j.a<j.c.c.length;){h=RD(ynb(j),335);if(Dmd(RD(mQb(b,(umd(),Nkd)),88))){p.a=t.a;for(r=new aw(Pc(Fc(h.b).a).a.kc());r.b.Ob();){q=RD(_v(r.b.Pb()),21);if(q.Hc((qpd(),Yod))){p.a=s.a;break}}}else if(Emd(RD(mQb(b,Nkd),88))){p.b=t.b;for(r=new aw(Pc(Fc(h.b).a).a.kc());r.b.Ob();){q=RD(_v(r.b.Pb()),21);if(q.Hc((qpd(),ppd))){p.b=s.b;break}}}k=F$b(RD(h,579),f);x$b(Uc(h.b),p.a,p.b);if(Dmd(RD(mQb(b,Nkd),88))){s.a=p.a+k.a;o.a=$wnd.Math.max(o.a,s.a);for(r=new aw(Pc(Fc(h.b).a).a.kc());r.b.Ob();){q=RD(_v(r.b.Pb()),21);if(q.Hc((qpd(),npd))){t.a=p.a+k.a;break}}s.b=p.b+k.b;p.b=s.b;o.b=$wnd.Math.max(o.b,p.b)}else if(Emd(RD(mQb(b,Nkd),88))){s.b=p.b+k.b;o.b=$wnd.Math.max(o.b,s.b);for(r=new aw(Pc(Fc(h.b).a).a.kc());r.b.Ob();){q=RD(_v(r.b.Pb()),21);if(q.Hc((qpd(),Xod))){t.b=p.b+k.b;break}}s.a=p.a+k.a;p.a=s.a;o.a=$wnd.Math.max(o.a,p.a)}}b.f.a=o.a-f;b.f.b=o.b-f;if(Heb(TD(mQb(g,Vzc)))&&dE(mQb(g,yAc))===dE((Ymd(),Umd))){for(n=a.Kc();n.Ob();){l=RD(n.Pb(),36);w$b(l,l.c.a,l.c.b)}c=new j_b;_$b(c,a,f);for(m=a.Kc();m.Ob();){l=RD(m.Pb(),36);$id(hjd(l.c),c.e)}$id(hjd(b.f),c.a)}for(i=new Anb(this.a);i.a<i.c.c.length;){h=RD(ynb(i),335);v$b(b,Uc(h.b))}};var AQ=sfb(KAe,'ComponentGroupModelOrderGraphPlacer',1312);feb(389,22,{3:1,34:1,22:1,389:1},V$b);var Q$b,R$b,S$b,T$b;var CQ=tfb(KAe,'ComponentOrderingStrategy',389,WI,X$b,W$b);var Y$b;feb(659,1,{},j_b);var KQ=sfb(KAe,'ComponentsCompactor',659);feb(1533,13,Cxe,m_b);_.Fc=function n_b(a){return k_b(this,RD(a,148))};var DQ=sfb(KAe,'ComponentsCompactor/Hullpoints',1533);feb(1530,1,{855:1},p_b);_.a=false;var EQ=sfb(KAe,'ComponentsCompactor/InternalComponent',1530);feb(1529,1,Vve,q_b);_.Jc=function r_b(a){xgb(this,a)};_.Kc=function s_b(){return new Anb(this.a)};var FQ=sfb(KAe,'ComponentsCompactor/InternalConnectedComponents',1529);feb(1532,1,{602:1},t_b);_.Bf=function v_b(){return null};_.Cf=function w_b(){return this.a};_.Af=function u_b(){return f_b(this.d)};_.Df=function x_b(){return this.b};var GQ=sfb(KAe,'ComponentsCompactor/InternalExternalExtension',1532);feb(1531,1,{602:1},y_b);_.Cf=function B_b(){return this.a};_.Af=function z_b(){return f_b(this.d)};_.Bf=function A_b(){return this.c};_.Df=function C_b(){return this.b};var HQ=sfb(KAe,'ComponentsCompactor/InternalUnionExternalExtension',1531);feb(1535,1,{},D_b);var IQ=sfb(KAe,'ComponentsCompactor/OuterSegments',1535);feb(1534,1,{},E_b);var JQ=sfb(KAe,'ComponentsCompactor/Segments',1534);feb(1282,1,{},I_b);var MQ=sfb(KAe,Lze,1282);feb(1283,1,fye,K_b);_.Ne=function L_b(a,b){return J_b(RD(a,36),RD(b,36))};_.Fb=function M_b(a){return this===a};_.Oe=function N_b(){return new Frb(this)};var LQ=sfb(KAe,'ComponentsProcessor/lambda$0$Type',1283);feb(579,335,{335:1,579:1},S_b);_.Ff=function T_b(a){return Q_b(this,a)};_.Gf=function U_b(a){return R_b(this,a)};var O_b;var NQ=sfb(KAe,'ModelOrderComponentGroup',579);feb(1310,2104,{},V_b);_.Ef=function W_b(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(a.gc()==1){l=RD(a.Xb(0),36);if(l!=b){b.a.c.length=0;u$b(b,l,0,0);kQb(b,l);C2b(b.d,l.d);b.f.a=l.f.a;b.f.b=l.f.b}return}else if(a.dc()){b.a.c.length=0;b.f.a=0;b.f.b=0;return}this.Jf(a,b);e=RD(a.Xb(0),36);b.a.c.length=0;kQb(b,e);j=0;m=0;for(g=a.Kc();g.Ob();){f=RD(g.Pb(),36);k=f.f;j=$wnd.Math.max(j,k.a);m+=k.a*k.b}j=$wnd.Math.max(j,$wnd.Math.sqrt(m)*Kfb(UD(mQb(b,(yCc(),Tzc)))));d=Kfb(UD(mQb(b,SBc)));this.If(a,b,j,d);if(Heb(TD(mQb(e,Vzc)))){c=new j_b;_$b(c,a,d);for(i=a.Kc();i.Ob();){h=RD(i.Pb(),36);$id(hjd(h.c),c.e)}$id(hjd(b.f),c.a)}v$b(b,a)};_.If=function X_b(a,b,c,d){var e,f,g,h,i,j,k,l;k=0;l=0;h=0;e=d;for(g=a.Kc();g.Ob();){f=RD(g.Pb(),36);j=f.f;if(k+j.a>c){k=0;l+=h+d;h=0}i=f.c;w$b(f,k+i.a,l+i.b);hjd(i);e=$wnd.Math.max(e,k+j.a);h=$wnd.Math.max(h,j.b);k+=j.a+d}b.f.a=e;b.f.b=l+h};_.Jf=function Y_b(a,b){var c,d,e,f,g;if(dE(mQb(b,(yCc(),Yzc)))===dE((U$b(),T$b))){for(d=a.Kc();d.Ob();){c=RD(d.Pb(),36);g=0;for(f=new Anb(c.a);f.a<f.c.c.length;){e=RD(ynb(f),10);g+=RD(mQb(e,JBc),17).a}c.p=g}yob();a.jd(new b0b)}};var QQ=sfb(KAe,'SimpleRowGraphPlacer',1310);feb(1313,1310,{},Z_b);_.If=function $_b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n;m=0;n=0;h=0;e=d;i=null;l=0;for(g=a.Kc();g.Ob();){f=RD(g.Pb(),36);k=f.f;if(m+k.a>c&&!RD(mQb(f,(Ywc(),ewc)),21).Hc((qpd(),Yod))||!!i&&RD(mQb(i,(Ywc(),ewc)),21).Hc((qpd(),Xod))||RD(mQb(f,(Ywc(),ewc)),21).Hc((qpd(),ppd))){m=l;n+=h+d;h=0}j=f.c;RD(mQb(f,(Ywc(),ewc)),21).Hc((qpd(),Yod))&&(m=e+d);w$b(f,m+j.a,n+j.b);e=$wnd.Math.max(e,m+k.a);RD(mQb(f,ewc),21).Hc(npd)&&(l=$wnd.Math.max(l,m+k.a+d));hjd(j);h=$wnd.Math.max(h,k.b);m+=k.a+d;i=f}b.f.a=e;b.f.b=n+h};_.Jf=function __b(a,b){};var OQ=sfb(KAe,'ModelOrderRowGraphPlacer',1313);feb(1311,1,fye,b0b);_.Ne=function c0b(a,b){return a0b(RD(a,36),RD(b,36))};_.Fb=function d0b(a){return this===a};_.Oe=function e0b(){return new Frb(this)};var PQ=sfb(KAe,'SimpleRowGraphPlacer/1',1311);var f0b;feb(1280,1,xye,l0b);_.Lb=function m0b(a){var b;return b=RD(mQb(RD(a,249).b,(yCc(),RAc)),75),!!b&&b.b!=0};_.Fb=function n0b(a){return this===a};_.Mb=function o0b(a){var b;return b=RD(mQb(RD(a,249).b,(yCc(),RAc)),75),!!b&&b.b!=0};var RQ=sfb(PAe,'CompoundGraphPostprocessor/1',1280);feb(1279,1,QAe,E0b);_.Kf=function F0b(a,b){y0b(this,RD(a,36),b)};var TQ=sfb(PAe,'CompoundGraphPreprocessor',1279);feb(453,1,{453:1},G0b);_.c=false;var SQ=sfb(PAe,'CompoundGraphPreprocessor/ExternalPort',453);feb(249,1,{249:1},J0b);_.Ib=function K0b(){return ps(this.c)+':'+_0b(this.b)};var VQ=sfb(PAe,'CrossHierarchyEdge',249);feb(777,1,fye,M0b);_.Ne=function N0b(a,b){return L0b(this,RD(a,249),RD(b,249))};_.Fb=function O0b(a){return this===a};_.Oe=function Q0b(){return new Frb(this)};var UQ=sfb(PAe,'CrossHierarchyEdgeComparator',777);feb(305,137,{3:1,305:1,96:1,137:1});_.p=0;var dR=sfb(RAe,'LGraphElement',305);feb(18,305,{3:1,18:1,305:1,96:1,137:1},a1b);_.Ib=function b1b(){return _0b(this)};var WQ=sfb(RAe,'LEdge',18);feb(36,305,{3:1,20:1,36:1,305:1,96:1,137:1},d1b);_.Jc=function e1b(a){xgb(this,a)};_.Kc=function f1b(){return new Anb(this.b)};_.Ib=function g1b(){if(this.b.c.length==0){return 'G-unlayered'+Fe(this.a)}else if(this.a.c.length==0){return 'G-layered'+Fe(this.b)}return 'G[layerless'+Fe(this.a)+', layers'+Fe(this.b)+']'};var eR=sfb(RAe,'LGraph',36);var h1b;feb(666,1,{});_.Lf=function j1b(){return this.e.n};_.of=function k1b(a){return mQb(this.e,a)};_.Mf=function l1b(){return this.e.o};_.Nf=function m1b(){return this.e.p};_.pf=function n1b(a){return nQb(this.e,a)};_.Of=function o1b(a){this.e.n.a=a.a;this.e.n.b=a.b};_.Pf=function p1b(a){this.e.o.a=a.a;this.e.o.b=a.b};_.Qf=function q1b(a){this.e.p=a};var XQ=sfb(RAe,'LGraphAdapters/AbstractLShapeAdapter',666);feb(474,1,{853:1},r1b);_.Rf=function s1b(){var a,b;if(!this.b){this.b=ev(this.a.b.c.length);for(b=new Anb(this.a.b);b.a<b.c.c.length;){a=RD(ynb(b),72);Rmb(this.b,new D1b(a))}}return this.b};_.b=null;var YQ=sfb(RAe,'LGraphAdapters/LEdgeAdapter',474);feb(665,1,{},t1b);_.Sf=function u1b(){var a,b,c,d,e,f;if(!this.b){this.b=new bnb;for(d=new Anb(this.a.b);d.a<d.c.c.length;){c=RD(ynb(d),30);for(f=new Anb(c.a);f.a<f.c.c.length;){e=RD(ynb(f),10);if(this.c.Mb(e)){Rmb(this.b,new F1b(this,e,this.e));if(this.d){if(nQb(e,(Ywc(),Xwc))){for(b=RD(mQb(e,Xwc),15).Kc();b.Ob();){a=RD(b.Pb(),10);Rmb(this.b,new F1b(this,a,false))}}if(nQb(e,Vvc)){for(b=RD(mQb(e,Vvc),15).Kc();b.Ob();){a=RD(b.Pb(),10);Rmb(this.b,new F1b(this,a,false))}}}}}}}return this.b};_.Lf=function v1b(){throw Adb(new kib(TAe))};_.of=function w1b(a){return mQb(this.a,a)};_.Mf=function x1b(){return this.a.f};_.Nf=function y1b(){return this.a.p};_.pf=function z1b(a){return nQb(this.a,a)};_.Of=function A1b(a){throw Adb(new kib(TAe))};_.Pf=function B1b(a){this.a.f.a=a.a;this.a.f.b=a.b};_.Qf=function C1b(a){this.a.p=a};_.b=null;_.d=false;_.e=false;var ZQ=sfb(RAe,'LGraphAdapters/LGraphAdapter',665);feb(585,666,{187:1},D1b);var $Q=sfb(RAe,'LGraphAdapters/LLabelAdapter',585);feb(584,666,{695:1},F1b);_.Tf=function G1b(){return this.b};_.Uf=function H1b(){return yob(),yob(),vob};_.Rf=function I1b(){var a,b;if(!this.a){this.a=ev(RD(this.e,10).b.c.length);for(b=new Anb(RD(this.e,10).b);b.a<b.c.c.length;){a=RD(ynb(b),72);Rmb(this.a,new D1b(a))}}return this.a};_.Vf=function J1b(){var a;a=RD(this.e,10).d;return new R2b(a.d,a.c,a.a,a.b)};_.Wf=function K1b(){return yob(),yob(),vob};_.Xf=function L1b(){var a,b;if(!this.c){this.c=ev(RD(this.e,10).j.c.length);for(b=new Anb(RD(this.e,10).j);b.a<b.c.c.length;){a=RD(ynb(b),12);Rmb(this.c,new Q1b(a,this.d))}}return this.c};_.Yf=function M1b(){return Heb(TD(mQb(RD(this.e,10),(Ywc(),Yvc))))};_.Zf=function N1b(a){RD(this.e,10).d.b=a.b;RD(this.e,10).d.d=a.d;RD(this.e,10).d.c=a.c;RD(this.e,10).d.a=a.a};_.$f=function O1b(a){RD(this.e,10).f.b=a.b;RD(this.e,10).f.d=a.d;RD(this.e,10).f.c=a.c;RD(this.e,10).f.a=a.a};_._f=function P1b(){E1b(this,(i1b(),h1b))};_.a=null;_.b=null;_.c=null;_.d=false;var _Q=sfb(RAe,'LGraphAdapters/LNodeAdapter',584);feb(1788,666,{852:1},Q1b);_.Uf=function R1b(){var a,b,c,d,e,f,g,h;if(this.d&&RD(this.e,12).i.k==(r3b(),q3b)){return yob(),yob(),vob}else if(!this.a){this.a=new bnb;for(c=new Anb(RD(this.e,12).e);c.a<c.c.c.length;){a=RD(ynb(c),18);Rmb(this.a,new r1b(a))}if(this.d){d=RD(mQb(RD(this.e,12),(Ywc(),Iwc)),10);if(d){for(b=new is(Mr(Z2b(d).a.Kc(),new ir));gs(b);){a=RD(hs(b),18);Rmb(this.a,new r1b(a))}}}if(nQb(RD(this.e,12).i,(Ywc(),Pwc))){g=RD(mQb(RD(this.e,12).i,Pwc),337);h=RD(cub(g.e,this.e),113);if(h){for(f=new Anb(h.b);f.a<f.c.c.length;){e=RD(ynb(f),340);Rmb(this.a,new r1b(e.a))}}}}return this.a};_.Rf=function S1b(){var a,b;if(!this.b){this.b=ev(RD(this.e,12).f.c.length);for(b=new Anb(RD(this.e,12).f);b.a<b.c.c.length;){a=RD(ynb(b),72);Rmb(this.b,new D1b(a))}}return this.b};_.Wf=function T1b(){var a,b,c,d,e,f,g,h;if(this.d&&RD(this.e,12).i.k==(r3b(),q3b)){return yob(),yob(),vob}else if(!this.c){this.c=new bnb;for(c=new Anb(RD(this.e,12).g);c.a<c.c.c.length;){a=RD(ynb(c),18);Rmb(this.c,new r1b(a))}if(this.d){d=RD(mQb(RD(this.e,12),(Ywc(),Iwc)),10);if(d){for(b=new is(Mr(a3b(d).a.Kc(),new ir));gs(b);){a=RD(hs(b),18);Rmb(this.c,new r1b(a))}}}if(nQb(RD(this.e,12).i,(Ywc(),Pwc))){g=RD(mQb(RD(this.e,12).i,Pwc),337);h=RD(cub(g.e,this.e),113);if(h){for(f=new Anb(h.e);f.a<f.c.c.length;){e=RD(ynb(f),340);Rmb(this.c,new r1b(e.a))}}}}return this.c};_.ag=function U1b(){return RD(this.e,12).j};_.bg=function V1b(){return Heb(TD(mQb(RD(this.e,12),(Ywc(),nwc))))};_.a=null;_.b=null;_.c=null;_.d=false;var aR=sfb(RAe,'LGraphAdapters/LPortAdapter',1788);feb(1789,1,fye,X1b);_.Ne=function Y1b(a,b){return W1b(RD(a,12),RD(b,12))};_.Fb=function Z1b(a){return this===a};_.Oe=function $1b(){return new Frb(this)};var bR=sfb(RAe,'LGraphAdapters/PortComparator',1789);feb(818,1,nwe,_1b);_.Mb=function a2b(a){return RD(a,10),i1b(),true};var cR=sfb(RAe,'LGraphAdapters/lambda$0$Type',818);feb(404,305,{3:1,305:1,404:1,96:1,137:1});var yR=sfb(RAe,'LShape',404);feb(72,404,{3:1,305:1,72:1,404:1,96:1,137:1},x2b,y2b);_.Ib=function z2b(){var a;a=w2b(this);return a==null?'label':'l_'+a};var fR=sfb(RAe,'LLabel',72);feb(214,1,{3:1,4:1,214:1,423:1});_.Fb=function K2b(a){var b;if(ZD(a,214)){b=RD(a,214);return this.d==b.d&&this.a==b.a&&this.b==b.b&&this.c==b.c}else{return false}};_.Hb=function L2b(){var a,b;a=Nfb(this.b)<<16;a|=Nfb(this.a)&Bwe;b=Nfb(this.c)<<16;b|=Nfb(this.d)&Bwe;return a^b};_.cg=function N2b(b){var c,d,e,f,g,h,i,j,k,l,m;g=0;while(g<b.length&&M2b((BFb(g,b.length),b.charCodeAt(g)),YAe)){++g}c=b.length;while(c>0&&M2b((BFb(c-1,b.length),b.charCodeAt(c-1)),ZAe)){--c}if(g<c){l=vhb((AFb(g,c,b.length),b.substr(g,c-g)),',|;');try{for(i=l,j=0,k=i.length;j<k;++j){h=i[j];f=vhb(h,'=');if(f.length!=2){throw Adb(new agb('Expecting a list of key-value pairs.'))}e=Dhb(f[0]);m=Neb(Dhb(f[1]));lhb(e,'top')?(this.d=m):lhb(e,'left')?(this.b=m):lhb(e,'bottom')?(this.a=m):lhb(e,'right')&&(this.c=m)}}catch(a){a=zdb(a);if(ZD(a,130)){d=a;throw Adb(new agb($Ae+d))}else throw Adb(a)}}};_.Ib=function O2b(){return '[top='+this.d+',left='+this.b+',bottom='+this.a+',right='+this.c+']'};_.a=0;_.b=0;_.c=0;_.d=0;var m3=sfb(_Ae,'Spacing',214);feb(140,214,aBe,P2b,Q2b,R2b,S2b);var h3=sfb(_Ae,'ElkMargin',140);feb(660,140,aBe,T2b);var gR=sfb(RAe,'LMargin',660);feb(10,404,{3:1,305:1,10:1,404:1,96:1,137:1},j3b);_.Ib=function k3b(){return i3b(this)};_.i=false;var jR=sfb(RAe,'LNode',10);feb(273,22,{3:1,34:1,22:1,273:1},s3b);var l3b,m3b,n3b,o3b,p3b,q3b;var hR=tfb(RAe,'LNode/NodeType',273,WI,u3b,t3b);var v3b;feb(775,1,nwe,x3b);_.Mb=function y3b(a){return Heb(TD(mQb(RD(a,72),(yCc(),vAc))))};var iR=sfb(RAe,'LNode/lambda$0$Type',775);feb(107,214,bBe,z3b,A3b,B3b);var i3=sfb(_Ae,'ElkPadding',107);feb(778,107,bBe,C3b);var kR=sfb(RAe,'LPadding',778);feb(12,404,{3:1,305:1,12:1,404:1,96:1,137:1},R3b);_.Ib=function S3b(){var a,b,c;a=new bib;Zhb((a.a+='p_',a),M3b(this));!!this.i&&Zhb(Yhb((a.a+='[',a),this.i),']');if(this.e.c.length==1&&this.g.c.length==0&&RD(Vmb(this.e,0),18).c!=this){b=RD(Vmb(this.e,0),18).c;Zhb((a.a+=' << ',a),M3b(b));Zhb(Yhb((a.a+='[',a),b.i),']')}if(this.e.c.length==0&&this.g.c.length==1&&RD(Vmb(this.g,0),18).d!=this){c=RD(Vmb(this.g,0),18).d;Zhb((a.a+=' >> ',a),M3b(c));Zhb(Yhb((a.a+='[',a),c.i),']')}return a.a};_.c=true;_.d=false;var D3b,E3b,F3b,G3b,H3b,I3b;var xR=sfb(RAe,'LPort',12);feb(408,1,Vve,T3b);_.Jc=function U3b(a){xgb(this,a)};_.Kc=function V3b(){var a;a=new Anb(this.a.e);return new W3b(a)};var mR=sfb(RAe,'LPort/1',408);feb(1309,1,Ave,W3b);_.Nb=function X3b(a){Ztb(this,a)};_.Pb=function Z3b(){return RD(ynb(this.a),18).c};_.Ob=function Y3b(){return xnb(this.a)};_.Qb=function $3b(){znb(this.a)};var lR=sfb(RAe,'LPort/1/1',1309);feb(369,1,Vve,_3b);_.Jc=function a4b(a){xgb(this,a)};_.Kc=function b4b(){var a;return a=new Anb(this.a.g),new c4b(a)};var oR=sfb(RAe,'LPort/2',369);feb(776,1,Ave,c4b);_.Nb=function d4b(a){Ztb(this,a)};_.Pb=function f4b(){return RD(ynb(this.a),18).d};_.Ob=function e4b(){return xnb(this.a)};_.Qb=function g4b(){znb(this.a)};var nR=sfb(RAe,'LPort/2/1',776);feb(1302,1,Vve,h4b);_.Jc=function i4b(a){xgb(this,a)};_.Kc=function j4b(){return new l4b(this)};var qR=sfb(RAe,'LPort/CombineIter',1302);feb(208,1,Ave,l4b);_.Nb=function m4b(a){Ztb(this,a)};_.Qb=function p4b(){$tb()};_.Ob=function n4b(){return k4b(this)};_.Pb=function o4b(){return xnb(this.a)?ynb(this.a):ynb(this.b)};var pR=sfb(RAe,'LPort/CombineIter/1',208);feb(1303,1,xye,r4b);_.Lb=function s4b(a){return q4b(a)};_.Fb=function t4b(a){return this===a};_.Mb=function u4b(a){return J3b(),RD(a,12).g.c.length!=0};var rR=sfb(RAe,'LPort/lambda$0$Type',1303);feb(1304,1,xye,w4b);_.Lb=function x4b(a){return v4b(a)};_.Fb=function y4b(a){return this===a};_.Mb=function z4b(a){return J3b(),RD(a,12).e.c.length!=0};var sR=sfb(RAe,'LPort/lambda$1$Type',1304);feb(1305,1,xye,A4b);_.Lb=function B4b(a){return J3b(),RD(a,12).j==(qpd(),Yod)};_.Fb=function C4b(a){return this===a};_.Mb=function D4b(a){return J3b(),RD(a,12).j==(qpd(),Yod)};var tR=sfb(RAe,'LPort/lambda$2$Type',1305);feb(1306,1,xye,E4b);_.Lb=function F4b(a){return J3b(),RD(a,12).j==(qpd(),Xod)};_.Fb=function G4b(a){return this===a};_.Mb=function H4b(a){return J3b(),RD(a,12).j==(qpd(),Xod)};var uR=sfb(RAe,'LPort/lambda$3$Type',1306);feb(1307,1,xye,I4b);_.Lb=function J4b(a){return J3b(),RD(a,12).j==(qpd(),npd)};_.Fb=function K4b(a){return this===a};_.Mb=function L4b(a){return J3b(),RD(a,12).j==(qpd(),npd)};var vR=sfb(RAe,'LPort/lambda$4$Type',1307);feb(1308,1,xye,M4b);_.Lb=function N4b(a){return J3b(),RD(a,12).j==(qpd(),ppd)};_.Fb=function O4b(a){return this===a};_.Mb=function P4b(a){return J3b(),RD(a,12).j==(qpd(),ppd)};var wR=sfb(RAe,'LPort/lambda$5$Type',1308);feb(30,305,{3:1,20:1,305:1,30:1,96:1,137:1},R4b);_.Jc=function S4b(a){xgb(this,a)};_.Kc=function T4b(){return new Anb(this.a)};_.Ib=function U4b(){return 'L_'+Wmb(this.b.b,this,0)+Fe(this.a)};var zR=sfb(RAe,'Layer',30);feb(1330,1,{},k5b);var JR=sfb(cBe,dBe,1330);feb(1334,1,{},o5b);_.Kb=function p5b(a){return AGd(RD(a,84))};var AR=sfb(cBe,'ElkGraphImporter/0methodref$connectableShapeToNode$Type',1334);feb(1337,1,{},q5b);_.Kb=function r5b(a){return AGd(RD(a,84))};var BR=sfb(cBe,'ElkGraphImporter/1methodref$connectableShapeToNode$Type',1337);feb(1331,1,Qve,s5b);_.Cd=function t5b(a){$4b(this.a,RD(a,123))};var CR=sfb(cBe,Nze,1331);feb(1332,1,Qve,u5b);_.Cd=function v5b(a){$4b(this.a,RD(a,123))};var DR=sfb(cBe,eBe,1332);feb(1333,1,{},w5b);_.Kb=function x5b(a){return new SDb(null,new Swb(mzd(RD(a,74)),16))};var ER=sfb(cBe,fBe,1333);feb(1335,1,nwe,y5b);_.Mb=function z5b(a){return l5b(this.a,RD(a,27))};var FR=sfb(cBe,gBe,1335);feb(1336,1,{},A5b);_.Kb=function B5b(a){return new SDb(null,new Swb(lzd(RD(a,74)),16))};var GR=sfb(cBe,'ElkGraphImporter/lambda$5$Type',1336);feb(1338,1,nwe,C5b);_.Mb=function D5b(a){return m5b(this.a,RD(a,27))};var HR=sfb(cBe,'ElkGraphImporter/lambda$7$Type',1338);feb(1339,1,nwe,E5b);_.Mb=function F5b(a){return n5b(RD(a,74))};var IR=sfb(cBe,'ElkGraphImporter/lambda$8$Type',1339);feb(1297,1,{},N5b);var G5b;var OR=sfb(cBe,'ElkGraphLayoutTransferrer',1297);feb(1298,1,nwe,Q5b);_.Mb=function R5b(a){return O5b(this.a,RD(a,18))};var KR=sfb(cBe,'ElkGraphLayoutTransferrer/lambda$0$Type',1298);feb(1299,1,Qve,S5b);_.Cd=function T5b(a){H5b();Rmb(this.a,RD(a,18))};var LR=sfb(cBe,'ElkGraphLayoutTransferrer/lambda$1$Type',1299);feb(1300,1,nwe,U5b);_.Mb=function V5b(a){return P5b(this.a,RD(a,18))};var MR=sfb(cBe,'ElkGraphLayoutTransferrer/lambda$2$Type',1300);feb(1301,1,Qve,W5b);_.Cd=function X5b(a){H5b();Rmb(this.a,RD(a,18))};var NR=sfb(cBe,'ElkGraphLayoutTransferrer/lambda$3$Type',1301);feb(819,1,{},e6b);var PR=sfb(hBe,'BiLinkedHashMultiMap',819);feb(1550,1,QAe,h6b);_.Kf=function i6b(a,b){f6b(RD(a,36),b)};var SR=sfb(hBe,'CommentNodeMarginCalculator',1550);feb(1551,1,{},j6b);_.Kb=function k6b(a){return new SDb(null,new Swb(RD(a,30).a,16))};var QR=sfb(hBe,'CommentNodeMarginCalculator/lambda$0$Type',1551);feb(1552,1,Qve,l6b);_.Cd=function m6b(a){g6b(RD(a,10))};var RR=sfb(hBe,'CommentNodeMarginCalculator/lambda$1$Type',1552);feb(1553,1,QAe,q6b);_.Kf=function r6b(a,b){o6b(RD(a,36),b)};var TR=sfb(hBe,'CommentPostprocessor',1553);feb(1554,1,QAe,v6b);_.Kf=function w6b(a,b){s6b(RD(a,36),b)};var UR=sfb(hBe,'CommentPreprocessor',1554);feb(1555,1,QAe,y6b);_.Kf=function z6b(a,b){x6b(RD(a,36),b)};var VR=sfb(hBe,'ConstraintsPostprocessor',1555);feb(1556,1,QAe,G6b);_.Kf=function H6b(a,b){E6b(RD(a,36),b)};var WR=sfb(hBe,'EdgeAndLayerConstraintEdgeReverser',1556);feb(1557,1,QAe,K6b);_.Kf=function M6b(a,b){I6b(RD(a,36),b)};var $R=sfb(hBe,'EndLabelPostprocessor',1557);feb(1558,1,{},N6b);_.Kb=function O6b(a){return new SDb(null,new Swb(RD(a,30).a,16))};var XR=sfb(hBe,'EndLabelPostprocessor/lambda$0$Type',1558);feb(1559,1,nwe,P6b);_.Mb=function Q6b(a){return L6b(RD(a,10))};var YR=sfb(hBe,'EndLabelPostprocessor/lambda$1$Type',1559);feb(1560,1,Qve,R6b);_.Cd=function S6b(a){J6b(RD(a,10))};var ZR=sfb(hBe,'EndLabelPostprocessor/lambda$2$Type',1560);feb(1561,1,QAe,b7b);_.Kf=function e7b(a,b){Z6b(RD(a,36),b)};var fS=sfb(hBe,'EndLabelPreprocessor',1561);feb(1562,1,{},f7b);_.Kb=function g7b(a){return new SDb(null,new Swb(RD(a,30).a,16))};var _R=sfb(hBe,'EndLabelPreprocessor/lambda$0$Type',1562);feb(1563,1,Qve,h7b);_.Cd=function i7b(a){V6b(this.a,this.b,this.c,RD(a,10))};_.a=0;_.b=0;_.c=false;var aS=sfb(hBe,'EndLabelPreprocessor/lambda$1$Type',1563);feb(1564,1,nwe,j7b);_.Mb=function k7b(a){return dE(mQb(RD(a,72),(yCc(),wAc)))===dE((Omd(),Nmd))};var bS=sfb(hBe,'EndLabelPreprocessor/lambda$2$Type',1564);feb(1565,1,Qve,l7b);_.Cd=function m7b(a){Mub(this.a,RD(a,72))};var cS=sfb(hBe,'EndLabelPreprocessor/lambda$3$Type',1565);feb(1566,1,nwe,n7b);_.Mb=function o7b(a){return dE(mQb(RD(a,72),(yCc(),wAc)))===dE((Omd(),Mmd))};var dS=sfb(hBe,'EndLabelPreprocessor/lambda$4$Type',1566);feb(1567,1,Qve,p7b);_.Cd=function q7b(a){Mub(this.a,RD(a,72))};var eS=sfb(hBe,'EndLabelPreprocessor/lambda$5$Type',1567);feb(1615,1,QAe,z7b);_.Kf=function A7b(a,b){w7b(RD(a,36),b)};var r7b;var nS=sfb(hBe,'EndLabelSorter',1615);feb(1616,1,fye,C7b);_.Ne=function D7b(a,b){return B7b(RD(a,466),RD(b,466))};_.Fb=function E7b(a){return this===a};_.Oe=function F7b(){return new Frb(this)};var gS=sfb(hBe,'EndLabelSorter/1',1616);feb(466,1,{466:1},G7b);var hS=sfb(hBe,'EndLabelSorter/LabelGroup',466);feb(1617,1,{},H7b);_.Kb=function I7b(a){return s7b(),new SDb(null,new Swb(RD(a,30).a,16))};var iS=sfb(hBe,'EndLabelSorter/lambda$0$Type',1617);feb(1618,1,nwe,J7b);_.Mb=function K7b(a){return s7b(),RD(a,10).k==(r3b(),p3b)};var jS=sfb(hBe,'EndLabelSorter/lambda$1$Type',1618);feb(1619,1,Qve,L7b);_.Cd=function M7b(a){x7b(RD(a,10))};var kS=sfb(hBe,'EndLabelSorter/lambda$2$Type',1619);feb(1620,1,nwe,N7b);_.Mb=function O7b(a){return s7b(),dE(mQb(RD(a,72),(yCc(),wAc)))===dE((Omd(),Mmd))};var lS=sfb(hBe,'EndLabelSorter/lambda$3$Type',1620);feb(1621,1,nwe,P7b);_.Mb=function Q7b(a){return s7b(),dE(mQb(RD(a,72),(yCc(),wAc)))===dE((Omd(),Nmd))};var mS=sfb(hBe,'EndLabelSorter/lambda$4$Type',1621);feb(1568,1,QAe,a8b);_.Kf=function b8b(a,b){$7b(this,RD(a,36))};_.b=0;_.c=0;var uS=sfb(hBe,'FinalSplineBendpointsCalculator',1568);feb(1569,1,{},c8b);_.Kb=function d8b(a){return new SDb(null,new Swb(RD(a,30).a,16))};var oS=sfb(hBe,'FinalSplineBendpointsCalculator/lambda$0$Type',1569);feb(1570,1,{},e8b);_.Kb=function f8b(a){return new SDb(null,new Twb(new is(Mr(a3b(RD(a,10)).a.Kc(),new ir))))};var pS=sfb(hBe,'FinalSplineBendpointsCalculator/lambda$1$Type',1570);feb(1571,1,nwe,g8b);_.Mb=function h8b(a){return !W0b(RD(a,18))};var qS=sfb(hBe,'FinalSplineBendpointsCalculator/lambda$2$Type',1571);feb(1572,1,nwe,i8b);_.Mb=function j8b(a){return nQb(RD(a,18),(Ywc(),Twc))};var rS=sfb(hBe,'FinalSplineBendpointsCalculator/lambda$3$Type',1572);feb(1573,1,Qve,k8b);_.Cd=function l8b(a){T7b(this.a,RD(a,131))};var sS=sfb(hBe,'FinalSplineBendpointsCalculator/lambda$4$Type',1573);feb(1574,1,Qve,m8b);_.Cd=function n8b(a){Eob(RD(a,18).a)};var tS=sfb(hBe,'FinalSplineBendpointsCalculator/lambda$5$Type',1574);feb(803,1,QAe,L8b);_.Kf=function M8b(a,b){C8b(this,RD(a,36),b)};var wS=sfb(hBe,'GraphTransformer',803);feb(517,22,{3:1,34:1,22:1,517:1},Q8b);var N8b,O8b;var vS=tfb(hBe,'GraphTransformer/Mode',517,WI,S8b,R8b);var T8b;feb(1575,1,QAe,Z8b);_.Kf=function $8b(a,b){W8b(RD(a,36),b)};var xS=sfb(hBe,'HierarchicalNodeResizingProcessor',1575);feb(1576,1,QAe,f9b);_.Kf=function g9b(a,b){b9b(RD(a,36),b)};var zS=sfb(hBe,'HierarchicalPortConstraintProcessor',1576);feb(1577,1,fye,i9b);_.Ne=function j9b(a,b){return h9b(RD(a,10),RD(b,10))};_.Fb=function k9b(a){return this===a};_.Oe=function l9b(){return new Frb(this)};var yS=sfb(hBe,'HierarchicalPortConstraintProcessor/NodeComparator',1577);feb(1578,1,QAe,o9b);_.Kf=function p9b(a,b){m9b(RD(a,36),b)};var AS=sfb(hBe,'HierarchicalPortDummySizeProcessor',1578);feb(1579,1,QAe,C9b);_.Kf=function D9b(a,b){v9b(this,RD(a,36),b)};_.a=0;var DS=sfb(hBe,'HierarchicalPortOrthogonalEdgeRouter',1579);feb(1580,1,fye,F9b);_.Ne=function G9b(a,b){return E9b(RD(a,10),RD(b,10))};_.Fb=function H9b(a){return this===a};_.Oe=function I9b(){return new Frb(this)};var BS=sfb(hBe,'HierarchicalPortOrthogonalEdgeRouter/1',1580);feb(1581,1,fye,K9b);_.Ne=function L9b(a,b){return J9b(RD(a,10),RD(b,10))};_.Fb=function M9b(a){return this===a};_.Oe=function N9b(){return new Frb(this)};var CS=sfb(hBe,'HierarchicalPortOrthogonalEdgeRouter/2',1581);feb(1582,1,QAe,Q9b);_.Kf=function R9b(a,b){P9b(RD(a,36),b)};var ES=sfb(hBe,'HierarchicalPortPositionProcessor',1582);feb(1583,1,QAe,$9b);_.Kf=function _9b(a,b){Z9b(this,RD(a,36))};_.a=0;_.c=0;var S9b,T9b;var IS=sfb(hBe,'HighDegreeNodeLayeringProcessor',1583);feb(580,1,{580:1},aac);_.b=-1;_.d=-1;var FS=sfb(hBe,'HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation',580);feb(1584,1,{},bac);_.Kb=function cac(a){return U9b(),Z2b(RD(a,10))};_.Fb=function dac(a){return this===a};var GS=sfb(hBe,'HighDegreeNodeLayeringProcessor/lambda$0$Type',1584);feb(1585,1,{},eac);_.Kb=function fac(a){return U9b(),a3b(RD(a,10))};_.Fb=function gac(a){return this===a};var HS=sfb(hBe,'HighDegreeNodeLayeringProcessor/lambda$1$Type',1585);feb(1591,1,QAe,mac);_.Kf=function nac(a,b){lac(this,RD(a,36),b)};var NS=sfb(hBe,'HyperedgeDummyMerger',1591);feb(804,1,{},oac);_.a=false;_.b=false;_.c=false;var JS=sfb(hBe,'HyperedgeDummyMerger/MergeState',804);feb(1592,1,{},pac);_.Kb=function qac(a){return new SDb(null,new Swb(RD(a,30).a,16))};var KS=sfb(hBe,'HyperedgeDummyMerger/lambda$0$Type',1592);feb(1593,1,{},rac);_.Kb=function sac(a){return new SDb(null,new Swb(RD(a,10).j,16))};var LS=sfb(hBe,'HyperedgeDummyMerger/lambda$1$Type',1593);feb(1594,1,Qve,tac);_.Cd=function uac(a){RD(a,12).p=-1};var MS=sfb(hBe,'HyperedgeDummyMerger/lambda$2$Type',1594);feb(1595,1,QAe,xac);_.Kf=function yac(a,b){wac(RD(a,36),b)};var OS=sfb(hBe,'HypernodesProcessor',1595);feb(1596,1,QAe,Aac);_.Kf=function Bac(a,b){zac(RD(a,36),b)};var PS=sfb(hBe,'InLayerConstraintProcessor',1596);feb(1597,1,QAe,Dac);_.Kf=function Eac(a,b){Cac(RD(a,36),b)};var QS=sfb(hBe,'InnermostNodeMarginCalculator',1597);feb(1598,1,QAe,Iac);_.Kf=function Nac(a,b){Hac(this,RD(a,36))};_.a=pxe;_.b=pxe;_.c=oxe;_.d=oxe;var XS=sfb(hBe,'InteractiveExternalPortPositioner',1598);feb(1599,1,{},Oac);_.Kb=function Pac(a){return RD(a,18).d.i};_.Fb=function Qac(a){return this===a};var RS=sfb(hBe,'InteractiveExternalPortPositioner/lambda$0$Type',1599);feb(1600,1,{},Rac);_.Kb=function Sac(a){return Jac(this.a,UD(a))};_.Fb=function Tac(a){return this===a};var SS=sfb(hBe,'InteractiveExternalPortPositioner/lambda$1$Type',1600);feb(1601,1,{},Uac);_.Kb=function Vac(a){return RD(a,18).c.i};_.Fb=function Wac(a){return this===a};var TS=sfb(hBe,'InteractiveExternalPortPositioner/lambda$2$Type',1601);feb(1602,1,{},Xac);_.Kb=function Yac(a){return Kac(this.a,UD(a))};_.Fb=function Zac(a){return this===a};var US=sfb(hBe,'InteractiveExternalPortPositioner/lambda$3$Type',1602);feb(1603,1,{},$ac);_.Kb=function _ac(a){return Lac(this.a,UD(a))};_.Fb=function abc(a){return this===a};var VS=sfb(hBe,'InteractiveExternalPortPositioner/lambda$4$Type',1603);feb(1604,1,{},bbc);_.Kb=function cbc(a){return Mac(this.a,UD(a))};_.Fb=function dbc(a){return this===a};var WS=sfb(hBe,'InteractiveExternalPortPositioner/lambda$5$Type',1604);feb(81,22,{3:1,34:1,22:1,81:1,196:1},icc);_.dg=function jcc(){switch(this.g){case 15:return new Hrc;case 22:return new bsc;case 47:return new ksc;case 28:case 35:return new Ldc;case 32:return new h6b;case 42:return new q6b;case 1:return new v6b;case 41:return new y6b;case 56:return new L8b((P8b(),O8b));case 0:return new L8b((P8b(),N8b));case 2:return new G6b;case 54:return new K6b;case 33:return new b7b;case 51:return new a8b;case 55:return new Z8b;case 13:return new f9b;case 38:return new o9b;case 44:return new C9b;case 40:return new Q9b;case 9:return new $9b;case 49:return new Yjc;case 37:return new mac;case 43:return new xac;case 27:return new Aac;case 30:return new Dac;case 3:return new Iac;case 18:return new scc;case 29:return new ycc;case 5:return new Lcc;case 50:return new Ucc;case 34:return new pdc;case 36:return new Zdc;case 52:return new z7b;case 11:return new fec;case 7:return new pec;case 39:return new Dec;case 45:return new Gec;case 16:return new Kec;case 10:return new _ec;case 48:return new Bfc;case 21:return new Ifc;case 23:return new FKc((RKc(),PKc));case 8:return new Rfc;case 12:return new Zfc;case 4:return new cgc;case 19:return new xgc;case 17:return new Vgc;case 53:return new Ygc;case 6:return new Nhc;case 25:return new ahc;case 46:return new rhc;case 31:return new Yhc;case 14:return new jic;case 26:return new Ssc;case 20:return new yic;case 24:return new FKc((RKc(),QKc));default:throw Adb(new agb(lBe+(this.f!=null?this.f:''+this.g)));}};var ebc,fbc,gbc,hbc,ibc,jbc,kbc,lbc,mbc,nbc,obc,pbc,qbc,rbc,sbc,tbc,ubc,vbc,wbc,xbc,ybc,zbc,Abc,Bbc,Cbc,Dbc,Ebc,Fbc,Gbc,Hbc,Ibc,Jbc,Kbc,Lbc,Mbc,Nbc,Obc,Pbc,Qbc,Rbc,Sbc,Tbc,Ubc,Vbc,Wbc,Xbc,Ybc,Zbc,$bc,_bc,acc,bcc,ccc,dcc,ecc,fcc,gcc;var YS=tfb(hBe,mBe,81,WI,lcc,kcc);var mcc;feb(1605,1,QAe,scc);_.Kf=function tcc(a,b){qcc(RD(a,36),b)};var ZS=sfb(hBe,'InvertedPortProcessor',1605);feb(1606,1,QAe,ycc);_.Kf=function zcc(a,b){xcc(RD(a,36),b)};var bT=sfb(hBe,'LabelAndNodeSizeProcessor',1606);feb(1607,1,nwe,Acc);_.Mb=function Bcc(a){return RD(a,10).k==(r3b(),p3b)};var $S=sfb(hBe,'LabelAndNodeSizeProcessor/lambda$0$Type',1607);feb(1608,1,nwe,Ccc);_.Mb=function Dcc(a){return RD(a,10).k==(r3b(),m3b)};var _S=sfb(hBe,'LabelAndNodeSizeProcessor/lambda$1$Type',1608);feb(1609,1,Qve,Ecc);_.Cd=function Fcc(a){vcc(this.b,this.a,this.c,RD(a,10))};_.a=false;_.c=false;var aT=sfb(hBe,'LabelAndNodeSizeProcessor/lambda$2$Type',1609);feb(1610,1,QAe,Lcc);_.Kf=function Mcc(a,b){Jcc(RD(a,36),b)};var Gcc;var dT=sfb(hBe,'LabelDummyInserter',1610);feb(1611,1,xye,Ncc);_.Lb=function Occ(a){return dE(mQb(RD(a,72),(yCc(),wAc)))===dE((Omd(),Lmd))};_.Fb=function Pcc(a){return this===a};_.Mb=function Qcc(a){return dE(mQb(RD(a,72),(yCc(),wAc)))===dE((Omd(),Lmd))};var cT=sfb(hBe,'LabelDummyInserter/1',1611);feb(1612,1,QAe,Ucc);_.Kf=function Vcc(a,b){Tcc(RD(a,36),b)};var fT=sfb(hBe,'LabelDummyRemover',1612);feb(1613,1,nwe,Wcc);_.Mb=function Xcc(a){return Heb(TD(mQb(RD(a,72),(yCc(),vAc))))};var eT=sfb(hBe,'LabelDummyRemover/lambda$0$Type',1613);feb(1378,1,QAe,pdc);_.Kf=function tdc(a,b){ldc(this,RD(a,36),b)};_.a=null;var Ycc;var mT=sfb(hBe,'LabelDummySwitcher',1378);feb(293,1,{293:1},xdc);_.c=0;_.d=null;_.f=0;var gT=sfb(hBe,'LabelDummySwitcher/LabelDummyInfo',293);feb(1379,1,{},ydc);_.Kb=function zdc(a){return Zcc(),new SDb(null,new Swb(RD(a,30).a,16))};var hT=sfb(hBe,'LabelDummySwitcher/lambda$0$Type',1379);feb(1380,1,nwe,Adc);_.Mb=function Bdc(a){return Zcc(),RD(a,10).k==(r3b(),n3b)};var iT=sfb(hBe,'LabelDummySwitcher/lambda$1$Type',1380);feb(1381,1,{},Cdc);_.Kb=function Ddc(a){return qdc(this.a,RD(a,10))};var jT=sfb(hBe,'LabelDummySwitcher/lambda$2$Type',1381);feb(1382,1,Qve,Edc);_.Cd=function Fdc(a){rdc(this.a,RD(a,293))};var kT=sfb(hBe,'LabelDummySwitcher/lambda$3$Type',1382);feb(1383,1,fye,Gdc);_.Ne=function Hdc(a,b){return sdc(RD(a,293),RD(b,293))};_.Fb=function Idc(a){return this===a};_.Oe=function Jdc(){return new Frb(this)};var lT=sfb(hBe,'LabelDummySwitcher/lambda$4$Type',1383);feb(802,1,QAe,Ldc);_.Kf=function Mdc(a,b){Kdc(RD(a,36),b)};var nT=sfb(hBe,'LabelManagementProcessor',802);feb(1614,1,QAe,Zdc);_.Kf=function $dc(a,b){Tdc(RD(a,36),b)};var oT=sfb(hBe,'LabelSideSelector',1614);feb(1622,1,QAe,fec);_.Kf=function gec(a,b){bec(RD(a,36),b)};var pT=sfb(hBe,'LayerConstraintPostprocessor',1622);feb(1623,1,QAe,pec);_.Kf=function qec(a,b){nec(RD(a,36),b)};var hec;var rT=sfb(hBe,'LayerConstraintPreprocessor',1623);feb(371,22,{3:1,34:1,22:1,371:1},xec);var rec,sec,tec,uec;var qT=tfb(hBe,'LayerConstraintPreprocessor/HiddenNodeConnections',371,WI,zec,yec);var Aec;feb(1624,1,QAe,Dec);_.Kf=function Eec(a,b){Cec(RD(a,36),b)};var sT=sfb(hBe,'LayerSizeAndGraphHeightCalculator',1624);feb(1625,1,QAe,Gec);_.Kf=function Iec(a,b){Fec(RD(a,36),b)};var tT=sfb(hBe,'LongEdgeJoiner',1625);feb(1626,1,QAe,Kec);_.Kf=function Mec(a,b){Jec(RD(a,36),b)};var uT=sfb(hBe,'LongEdgeSplitter',1626);feb(1627,1,QAe,_ec);_.Kf=function cfc(a,b){Vec(this,RD(a,36),b)};_.e=0;_.f=0;_.j=0;_.k=0;_.n=0;_.o=0;var Pec,Qec;var AT=sfb(hBe,'NodePromotion',1627);feb(1628,1,fye,efc);_.Ne=function ffc(a,b){return dfc(RD(a,10),RD(b,10))};_.Fb=function gfc(a){return this===a};_.Oe=function hfc(){return new Frb(this)};var vT=sfb(hBe,'NodePromotion/1',1628);feb(1629,1,fye,jfc);_.Ne=function kfc(a,b){return ifc(RD(a,10),RD(b,10))};_.Fb=function lfc(a){return this===a};_.Oe=function mfc(){return new Frb(this)};var wT=sfb(hBe,'NodePromotion/2',1629);feb(1630,1,{},nfc);_.Kb=function ofc(a){return RD(a,42),Rec(),Geb(),true};_.Fb=function pfc(a){return this===a};var xT=sfb(hBe,'NodePromotion/lambda$0$Type',1630);feb(1631,1,{},qfc);_.Kb=function rfc(a){return afc(this.a,RD(a,42))};_.Fb=function sfc(a){return this===a};_.a=0;var yT=sfb(hBe,'NodePromotion/lambda$1$Type',1631);feb(1632,1,{},tfc);_.Kb=function ufc(a){return bfc(this.a,RD(a,42))};_.Fb=function vfc(a){return this===a};_.a=0;var zT=sfb(hBe,'NodePromotion/lambda$2$Type',1632);feb(1633,1,QAe,Bfc);_.Kf=function Cfc(a,b){wfc(RD(a,36),b)};var BT=sfb(hBe,'NorthSouthPortPostprocessor',1633);feb(1634,1,QAe,Ifc);_.Kf=function Kfc(a,b){Gfc(RD(a,36),b)};var DT=sfb(hBe,'NorthSouthPortPreprocessor',1634);feb(1635,1,fye,Lfc);_.Ne=function Mfc(a,b){return Jfc(RD(a,12),RD(b,12))};_.Fb=function Nfc(a){return this===a};_.Oe=function Ofc(){return new Frb(this)};var CT=sfb(hBe,'NorthSouthPortPreprocessor/lambda$0$Type',1635);feb(1636,1,QAe,Rfc);_.Kf=function Tfc(a,b){Qfc(RD(a,36),b)};var GT=sfb(hBe,'PartitionMidprocessor',1636);feb(1637,1,nwe,Ufc);_.Mb=function Vfc(a){return nQb(RD(a,10),(yCc(),tBc))};var ET=sfb(hBe,'PartitionMidprocessor/lambda$0$Type',1637);feb(1638,1,Qve,Wfc);_.Cd=function Xfc(a){Sfc(this.a,RD(a,10))};var FT=sfb(hBe,'PartitionMidprocessor/lambda$1$Type',1638);feb(1639,1,QAe,Zfc);_.Kf=function $fc(a,b){Yfc(RD(a,36),b)};var HT=sfb(hBe,'PartitionPostprocessor',1639);feb(1640,1,QAe,cgc);_.Kf=function dgc(a,b){agc(RD(a,36),b)};var MT=sfb(hBe,'PartitionPreprocessor',1640);feb(1641,1,nwe,egc);_.Mb=function fgc(a){return nQb(RD(a,10),(yCc(),tBc))};var IT=sfb(hBe,'PartitionPreprocessor/lambda$0$Type',1641);feb(1642,1,{},ggc);_.Kb=function hgc(a){return new SDb(null,new Twb(new is(Mr(a3b(RD(a,10)).a.Kc(),new ir))))};var JT=sfb(hBe,'PartitionPreprocessor/lambda$1$Type',1642);feb(1643,1,nwe,igc);_.Mb=function jgc(a){return _fc(RD(a,18))};var KT=sfb(hBe,'PartitionPreprocessor/lambda$2$Type',1643);feb(1644,1,Qve,kgc);_.Cd=function lgc(a){bgc(RD(a,18))};var LT=sfb(hBe,'PartitionPreprocessor/lambda$3$Type',1644);feb(1645,1,QAe,xgc);_.Kf=function Bgc(a,b){ugc(RD(a,36),b)};var mgc,ngc,ogc,pgc,qgc,rgc;var ST=sfb(hBe,'PortListSorter',1645);feb(1648,1,fye,Dgc);_.Ne=function Egc(a,b){return ygc(RD(a,12),RD(b,12))};_.Fb=function Fgc(a){return this===a};_.Oe=function Ggc(){return new Frb(this)};var NT=sfb(hBe,'PortListSorter/lambda$0$Type',1648);feb(1650,1,fye,Hgc);_.Ne=function Igc(a,b){return zgc(RD(a,12),RD(b,12))};_.Fb=function Jgc(a){return this===a};_.Oe=function Kgc(){return new Frb(this)};var OT=sfb(hBe,'PortListSorter/lambda$1$Type',1650);feb(1646,1,{},Lgc);_.Kb=function Mgc(a){return sgc(),RD(a,12).e};var PT=sfb(hBe,'PortListSorter/lambda$2$Type',1646);feb(1647,1,{},Ngc);_.Kb=function Ogc(a){return sgc(),RD(a,12).g};var QT=sfb(hBe,'PortListSorter/lambda$3$Type',1647);feb(1649,1,fye,Pgc);_.Ne=function Qgc(a,b){return Agc(RD(a,12),RD(b,12))};_.Fb=function Rgc(a){return this===a};_.Oe=function Sgc(){return new Frb(this)};var RT=sfb(hBe,'PortListSorter/lambda$4$Type',1649);feb(1651,1,QAe,Vgc);_.Kf=function Wgc(a,b){Tgc(RD(a,36),b)};var TT=sfb(hBe,'PortSideProcessor',1651);feb(1652,1,QAe,Ygc);_.Kf=function Zgc(a,b){Xgc(RD(a,36),b)};var UT=sfb(hBe,'ReversedEdgeRestorer',1652);feb(1657,1,QAe,ahc);_.Kf=function bhc(a,b){$gc(this,RD(a,36),b)};var _T=sfb(hBe,'SelfLoopPortRestorer',1657);feb(1658,1,{},chc);_.Kb=function dhc(a){return new SDb(null,new Swb(RD(a,30).a,16))};var VT=sfb(hBe,'SelfLoopPortRestorer/lambda$0$Type',1658);feb(1659,1,nwe,ehc);_.Mb=function fhc(a){return RD(a,10).k==(r3b(),p3b)};var WT=sfb(hBe,'SelfLoopPortRestorer/lambda$1$Type',1659);feb(1660,1,nwe,ghc);_.Mb=function hhc(a){return nQb(RD(a,10),(Ywc(),Pwc))};var XT=sfb(hBe,'SelfLoopPortRestorer/lambda$2$Type',1660);feb(1661,1,{},ihc);_.Kb=function jhc(a){return RD(mQb(RD(a,10),(Ywc(),Pwc)),337)};var YT=sfb(hBe,'SelfLoopPortRestorer/lambda$3$Type',1661);feb(1662,1,Qve,khc);_.Cd=function lhc(a){_gc(this.a,RD(a,337))};var ZT=sfb(hBe,'SelfLoopPortRestorer/lambda$4$Type',1662);feb(805,1,Qve,mhc);_.Cd=function nhc(a){Rmc(RD(a,105))};var $T=sfb(hBe,'SelfLoopPortRestorer/lambda$5$Type',805);feb(1663,1,QAe,rhc);_.Kf=function thc(a,b){ohc(RD(a,36),b)};var iU=sfb(hBe,'SelfLoopPostProcessor',1663);feb(1664,1,{},uhc);_.Kb=function vhc(a){return new SDb(null,new Swb(RD(a,30).a,16))};var aU=sfb(hBe,'SelfLoopPostProcessor/lambda$0$Type',1664);feb(1665,1,nwe,whc);_.Mb=function xhc(a){return RD(a,10).k==(r3b(),p3b)};var bU=sfb(hBe,'SelfLoopPostProcessor/lambda$1$Type',1665);feb(1666,1,nwe,yhc);_.Mb=function zhc(a){return nQb(RD(a,10),(Ywc(),Pwc))};var cU=sfb(hBe,'SelfLoopPostProcessor/lambda$2$Type',1666);feb(1667,1,Qve,Ahc);_.Cd=function Bhc(a){phc(RD(a,10))};var dU=sfb(hBe,'SelfLoopPostProcessor/lambda$3$Type',1667);feb(1668,1,{},Chc);_.Kb=function Dhc(a){return new SDb(null,new Swb(RD(a,105).f,1))};var eU=sfb(hBe,'SelfLoopPostProcessor/lambda$4$Type',1668);feb(1669,1,Qve,Ehc);_.Cd=function Fhc(a){qhc(this.a,RD(a,340))};var fU=sfb(hBe,'SelfLoopPostProcessor/lambda$5$Type',1669);feb(1670,1,nwe,Ghc);_.Mb=function Hhc(a){return !!RD(a,105).i};var gU=sfb(hBe,'SelfLoopPostProcessor/lambda$6$Type',1670);feb(1671,1,Qve,Ihc);_.Cd=function Jhc(a){shc(this.a,RD(a,105))};var hU=sfb(hBe,'SelfLoopPostProcessor/lambda$7$Type',1671);feb(1653,1,QAe,Nhc);_.Kf=function Ohc(a,b){Mhc(RD(a,36),b)};var mU=sfb(hBe,'SelfLoopPreProcessor',1653);feb(1654,1,{},Phc);_.Kb=function Qhc(a){return new SDb(null,new Swb(RD(a,105).f,1))};var jU=sfb(hBe,'SelfLoopPreProcessor/lambda$0$Type',1654);feb(1655,1,{},Rhc);_.Kb=function Shc(a){return RD(a,340).a};var kU=sfb(hBe,'SelfLoopPreProcessor/lambda$1$Type',1655);feb(1656,1,Qve,Thc);_.Cd=function Uhc(a){Lhc(RD(a,18))};var lU=sfb(hBe,'SelfLoopPreProcessor/lambda$2$Type',1656);feb(1672,1,QAe,Yhc);_.Kf=function Zhc(a,b){Whc(this,RD(a,36),b)};var sU=sfb(hBe,'SelfLoopRouter',1672);feb(1673,1,{},$hc);_.Kb=function _hc(a){return new SDb(null,new Swb(RD(a,30).a,16))};var nU=sfb(hBe,'SelfLoopRouter/lambda$0$Type',1673);feb(1674,1,nwe,aic);_.Mb=function bic(a){return RD(a,10).k==(r3b(),p3b)};var oU=sfb(hBe,'SelfLoopRouter/lambda$1$Type',1674);feb(1675,1,nwe,cic);_.Mb=function dic(a){return nQb(RD(a,10),(Ywc(),Pwc))};var pU=sfb(hBe,'SelfLoopRouter/lambda$2$Type',1675);feb(1676,1,{},eic);_.Kb=function fic(a){return RD(mQb(RD(a,10),(Ywc(),Pwc)),337)};var qU=sfb(hBe,'SelfLoopRouter/lambda$3$Type',1676);feb(1677,1,Qve,gic);_.Cd=function hic(a){Vhc(this.a,this.b,RD(a,337))};var rU=sfb(hBe,'SelfLoopRouter/lambda$4$Type',1677);feb(1678,1,QAe,jic);_.Kf=function mic(a,b){iic(RD(a,36),b)};var xU=sfb(hBe,'SemiInteractiveCrossMinProcessor',1678);feb(1679,1,nwe,nic);_.Mb=function oic(a){return RD(a,10).k==(r3b(),p3b)};var tU=sfb(hBe,'SemiInteractiveCrossMinProcessor/lambda$0$Type',1679);feb(1680,1,nwe,pic);_.Mb=function qic(a){return lQb(RD(a,10))._b((yCc(),IBc))};var uU=sfb(hBe,'SemiInteractiveCrossMinProcessor/lambda$1$Type',1680);feb(1681,1,fye,ric);_.Ne=function sic(a,b){return kic(RD(a,10),RD(b,10))};_.Fb=function tic(a){return this===a};_.Oe=function uic(){return new Frb(this)};var vU=sfb(hBe,'SemiInteractiveCrossMinProcessor/lambda$2$Type',1681);feb(1682,1,{},vic);_.Ve=function wic(a,b){return lic(RD(a,10),RD(b,10))};var wU=sfb(hBe,'SemiInteractiveCrossMinProcessor/lambda$3$Type',1682);feb(1684,1,QAe,yic);_.Kf=function Cic(a,b){xic(RD(a,36),b)};var AU=sfb(hBe,'SortByInputModelProcessor',1684);feb(1685,1,nwe,Dic);_.Mb=function Eic(a){return RD(a,12).g.c.length!=0};var yU=sfb(hBe,'SortByInputModelProcessor/lambda$0$Type',1685);feb(1686,1,Qve,Fic);_.Cd=function Gic(a){Aic(this.a,RD(a,12))};var zU=sfb(hBe,'SortByInputModelProcessor/lambda$1$Type',1686);feb(1759,817,{},Pic);_.df=function Qic(a){var b,c,d,e;this.c=a;switch(this.a.g){case 2:b=new bnb;FDb(CDb(new SDb(null,new Swb(this.c.a.b,16)),new Rjc),new Tjc(this,b));eHb(this,new Zic);Umb(b,new bjc);b.c.length=0;FDb(CDb(new SDb(null,new Swb(this.c.a.b,16)),new djc),new fjc(b));eHb(this,new jjc);Umb(b,new njc);b.c.length=0;c=Wvb(TCb(HDb(new SDb(null,new Swb(this.c.a.b,16)),new pjc(this))),new rjc);FDb(new SDb(null,new Swb(this.c.a.a,16)),new vjc(c,b));eHb(this,new zjc);Umb(b,new Djc);b.c.length=0;break;case 3:d=new bnb;eHb(this,new Ric);e=Wvb(TCb(HDb(new SDb(null,new Swb(this.c.a.b,16)),new Vic(this))),new tjc);FDb(CDb(new SDb(null,new Swb(this.c.a.b,16)),new Fjc),new Hjc(e,d));eHb(this,new Ljc);Umb(d,new Pjc);d.c.length=0;break;default:throw Adb(new Ied);}};_.b=0;var ZU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation',1759);feb(1760,1,xye,Ric);_.Lb=function Sic(a){return ZD(RD(a,60).g,154)};_.Fb=function Tic(a){return this===a};_.Mb=function Uic(a){return ZD(RD(a,60).g,154)};var BU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$0$Type',1760);feb(1761,1,{},Vic);_.Ye=function Wic(a){return Jic(this.a,RD(a,60))};var CU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$1$Type',1761);feb(1769,1,owe,Xic);_.de=function Yic(){Iic(this.a,this.b,-1)};_.b=0;var DU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$10$Type',1769);feb(1771,1,xye,Zic);_.Lb=function $ic(a){return ZD(RD(a,60).g,154)};_.Fb=function _ic(a){return this===a};_.Mb=function ajc(a){return ZD(RD(a,60).g,154)};var EU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$11$Type',1771);feb(1772,1,Qve,bjc);_.Cd=function cjc(a){RD(a,380).de()};var FU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$12$Type',1772);feb(1773,1,nwe,djc);_.Mb=function ejc(a){return ZD(RD(a,60).g,10)};var GU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$13$Type',1773);feb(1775,1,Qve,fjc);_.Cd=function gjc(a){Kic(this.a,RD(a,60))};var HU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$14$Type',1775);feb(1774,1,owe,hjc);_.de=function ijc(){Iic(this.b,this.a,-1)};_.a=0;var IU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$15$Type',1774);feb(1776,1,xye,jjc);_.Lb=function kjc(a){return ZD(RD(a,60).g,10)};_.Fb=function ljc(a){return this===a};_.Mb=function mjc(a){return ZD(RD(a,60).g,10)};var JU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$16$Type',1776);feb(1777,1,Qve,njc);_.Cd=function ojc(a){RD(a,380).de()};var KU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$17$Type',1777);feb(1778,1,{},pjc);_.Ye=function qjc(a){return Lic(this.a,RD(a,60))};var LU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$18$Type',1778);feb(1779,1,{},rjc);_.We=function sjc(){return 0};var MU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$19$Type',1779);feb(1762,1,{},tjc);_.We=function ujc(){return 0};var NU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$2$Type',1762);feb(1781,1,Qve,vjc);_.Cd=function wjc(a){Mic(this.a,this.b,RD(a,316))};_.a=0;var OU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$20$Type',1781);feb(1780,1,owe,xjc);_.de=function yjc(){Hic(this.a,this.b,-1)};_.b=0;var PU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$21$Type',1780);feb(1782,1,xye,zjc);_.Lb=function Ajc(a){return RD(a,60),true};_.Fb=function Bjc(a){return this===a};_.Mb=function Cjc(a){return RD(a,60),true};var QU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$22$Type',1782);feb(1783,1,Qve,Djc);_.Cd=function Ejc(a){RD(a,380).de()};var RU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$23$Type',1783);feb(1763,1,nwe,Fjc);_.Mb=function Gjc(a){return ZD(RD(a,60).g,10)};var SU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$3$Type',1763);feb(1765,1,Qve,Hjc);_.Cd=function Ijc(a){Nic(this.a,this.b,RD(a,60))};_.a=0;var TU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$4$Type',1765);feb(1764,1,owe,Jjc);_.de=function Kjc(){Iic(this.b,this.a,-1)};_.a=0;var UU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$5$Type',1764);feb(1766,1,xye,Ljc);_.Lb=function Mjc(a){return RD(a,60),true};_.Fb=function Njc(a){return this===a};_.Mb=function Ojc(a){return RD(a,60),true};var VU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$6$Type',1766);feb(1767,1,Qve,Pjc);_.Cd=function Qjc(a){RD(a,380).de()};var WU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$7$Type',1767);feb(1768,1,nwe,Rjc);_.Mb=function Sjc(a){return ZD(RD(a,60).g,154)};var XU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$8$Type',1768);feb(1770,1,Qve,Tjc);_.Cd=function Ujc(a){Oic(this.a,this.b,RD(a,60))};var YU=sfb(rBe,'EdgeAwareScanlineConstraintCalculation/lambda$9$Type',1770);feb(1586,1,QAe,Yjc);_.Kf=function bkc(a,b){Xjc(this,RD(a,36),b)};var Vjc;var bV=sfb(rBe,'HorizontalGraphCompactor',1586);feb(1587,1,{},ckc);_.ff=function dkc(a,b){var c,d,e;if(_jc(a,b)){return 0}c=Zjc(a);d=Zjc(b);if(!!c&&c.k==(r3b(),m3b)||!!d&&d.k==(r3b(),m3b)){return 0}e=RD(mQb(this.a.a,(Ywc(),Qwc)),312);return ZEc(e,c?c.k:(r3b(),o3b),d?d.k:(r3b(),o3b))};_.gf=function ekc(a,b){var c,d,e;if(_jc(a,b)){return 1}c=Zjc(a);d=Zjc(b);e=RD(mQb(this.a.a,(Ywc(),Qwc)),312);return aFc(e,c?c.k:(r3b(),o3b),d?d.k:(r3b(),o3b))};var $U=sfb(rBe,'HorizontalGraphCompactor/1',1587);feb(1588,1,{},fkc);_.ef=function gkc(a,b){return Wjc(),a.a.i==0};var _U=sfb(rBe,'HorizontalGraphCompactor/lambda$0$Type',1588);feb(1589,1,{},hkc);_.ef=function ikc(a,b){return akc(this.a,a,b)};var aV=sfb(rBe,'HorizontalGraphCompactor/lambda$1$Type',1589);feb(1730,1,{},Ckc);var jkc,kkc;var BV=sfb(rBe,'LGraphToCGraphTransformer',1730);feb(1738,1,nwe,Kkc);_.Mb=function Lkc(a){return a!=null};var cV=sfb(rBe,'LGraphToCGraphTransformer/0methodref$nonNull$Type',1738);feb(1731,1,{},Mkc);_.Kb=function Nkc(a){return lkc(),jeb(mQb(RD(RD(a,60).g,10),(Ywc(),Awc)))};var dV=sfb(rBe,'LGraphToCGraphTransformer/lambda$0$Type',1731);feb(1732,1,{},Okc);_.Kb=function Pkc(a){return lkc(),Mlc(RD(RD(a,60).g,154))};var eV=sfb(rBe,'LGraphToCGraphTransformer/lambda$1$Type',1732);feb(1741,1,nwe,Qkc);_.Mb=function Rkc(a){return lkc(),ZD(RD(a,60).g,10)};var fV=sfb(rBe,'LGraphToCGraphTransformer/lambda$10$Type',1741);feb(1742,1,Qve,Skc);_.Cd=function Tkc(a){Dkc(RD(a,60))};var gV=sfb(rBe,'LGraphToCGraphTransformer/lambda$11$Type',1742);feb(1743,1,nwe,Ukc);_.Mb=function Vkc(a){return lkc(),ZD(RD(a,60).g,154)};var hV=sfb(rBe,'LGraphToCGraphTransformer/lambda$12$Type',1743);feb(1747,1,Qve,Wkc);_.Cd=function Xkc(a){Ekc(RD(a,60))};var iV=sfb(rBe,'LGraphToCGraphTransformer/lambda$13$Type',1747);feb(1744,1,Qve,Ykc);_.Cd=function Zkc(a){Fkc(this.a,RD(a,8))};_.a=0;var jV=sfb(rBe,'LGraphToCGraphTransformer/lambda$14$Type',1744);feb(1745,1,Qve,$kc);_.Cd=function _kc(a){Gkc(this.a,RD(a,116))};_.a=0;var kV=sfb(rBe,'LGraphToCGraphTransformer/lambda$15$Type',1745);feb(1746,1,Qve,alc);_.Cd=function blc(a){Hkc(this.a,RD(a,8))};_.a=0;var lV=sfb(rBe,'LGraphToCGraphTransformer/lambda$16$Type',1746);feb(1748,1,{},clc);_.Kb=function dlc(a){return lkc(),new SDb(null,new Twb(new is(Mr(a3b(RD(a,10)).a.Kc(),new ir))))};var mV=sfb(rBe,'LGraphToCGraphTransformer/lambda$17$Type',1748);feb(1749,1,nwe,elc);_.Mb=function flc(a){return lkc(),W0b(RD(a,18))};var nV=sfb(rBe,'LGraphToCGraphTransformer/lambda$18$Type',1749);feb(1750,1,Qve,glc);_.Cd=function hlc(a){ukc(this.a,RD(a,18))};var oV=sfb(rBe,'LGraphToCGraphTransformer/lambda$19$Type',1750);feb(1734,1,Qve,ilc);_.Cd=function jlc(a){vkc(this.a,RD(a,154))};var pV=sfb(rBe,'LGraphToCGraphTransformer/lambda$2$Type',1734);feb(1751,1,{},klc);_.Kb=function llc(a){return lkc(),new SDb(null,new Swb(RD(a,30).a,16))};var qV=sfb(rBe,'LGraphToCGraphTransformer/lambda$20$Type',1751);feb(1752,1,{},mlc);_.Kb=function nlc(a){return lkc(),new SDb(null,new Twb(new is(Mr(a3b(RD(a,10)).a.Kc(),new ir))))};var rV=sfb(rBe,'LGraphToCGraphTransformer/lambda$21$Type',1752);feb(1753,1,{},olc);_.Kb=function plc(a){return lkc(),RD(mQb(RD(a,18),(Ywc(),Twc)),15)};var sV=sfb(rBe,'LGraphToCGraphTransformer/lambda$22$Type',1753);feb(1754,1,nwe,qlc);_.Mb=function rlc(a){return Ikc(RD(a,15))};var tV=sfb(rBe,'LGraphToCGraphTransformer/lambda$23$Type',1754);feb(1755,1,Qve,slc);_.Cd=function tlc(a){nkc(this.a,RD(a,15))};var uV=sfb(rBe,'LGraphToCGraphTransformer/lambda$24$Type',1755);feb(1733,1,Qve,ulc);_.Cd=function vlc(a){wkc(this.a,this.b,RD(a,154))};var vV=sfb(rBe,'LGraphToCGraphTransformer/lambda$3$Type',1733);feb(1735,1,{},wlc);_.Kb=function xlc(a){return lkc(),new SDb(null,new Swb(RD(a,30).a,16))};var wV=sfb(rBe,'LGraphToCGraphTransformer/lambda$4$Type',1735);feb(1736,1,{},ylc);_.Kb=function zlc(a){return lkc(),new SDb(null,new Twb(new is(Mr(a3b(RD(a,10)).a.Kc(),new ir))))};var xV=sfb(rBe,'LGraphToCGraphTransformer/lambda$5$Type',1736);feb(1737,1,{},Alc);_.Kb=function Blc(a){return lkc(),RD(mQb(RD(a,18),(Ywc(),Twc)),15)};var yV=sfb(rBe,'LGraphToCGraphTransformer/lambda$6$Type',1737);feb(1739,1,Qve,Clc);_.Cd=function Dlc(a){Jkc(this.a,RD(a,15))};var zV=sfb(rBe,'LGraphToCGraphTransformer/lambda$8$Type',1739);feb(1740,1,Qve,Elc);_.Cd=function Flc(a){xkc(this.a,this.b,RD(a,154))};var AV=sfb(rBe,'LGraphToCGraphTransformer/lambda$9$Type',1740);feb(1729,1,{},Jlc);_.cf=function Klc(a){var b,c,d,e,f;this.a=a;this.d=new BIb;this.c=$C(DN,rve,125,this.a.a.a.c.length,0,1);this.b=0;for(c=new Anb(this.a.a.a);c.a<c.c.c.length;){b=RD(ynb(c),316);b.d=this.b;f=eJb(fJb(new gJb,b),this.d);this.c[this.b]=f;++this.b}Ilc(this);Hlc(this);Glc(this);lJb(CJb(this.d),new Oqd);for(e=new Anb(this.a.a.b);e.a<e.c.c.length;){d=RD(ynb(e),60);d.d.c=this.c[d.a.d].e+d.b.a}};_.b=0;var CV=sfb(rBe,'NetworkSimplexCompaction',1729);feb(154,1,{34:1,154:1},Nlc);_.Fd=function Olc(a){return Llc(this,RD(a,154))};_.Ib=function Plc(){return Mlc(this)};var DV=sfb(rBe,'VerticalSegment',154);feb(841,1,{},Ylc);_.c=0;_.e=0;_.i=0;var GV=sfb(sBe,'BetweenLayerEdgeTwoNodeCrossingsCounter',841);feb(677,1,{677:1},dmc);_.Ib=function emc(){return 'AdjacencyList [node='+this.d+', adjacencies= '+this.a+']'};_.b=0;_.c=0;_.f=0;var FV=sfb(sBe,'BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList',677);feb(294,1,{34:1,294:1},hmc);_.Fd=function imc(a){return fmc(this,RD(a,294))};_.Ib=function jmc(){return 'Adjacency [position='+this.c+', cardinality='+this.a+', currentCardinality='+this.b+']'};_.a=0;_.b=0;_.c=0;var EV=sfb(sBe,'BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList/Adjacency',294);feb(2026,1,{},mmc);_.b=0;_.e=false;var HV=sfb(sBe,'CrossingMatrixFiller',2026);var QY=ufb(tBe,'IInitializable');feb(1867,1,uBe,smc);_.gg=function vmc(a,b,c,d,e,f){};_.ig=function xmc(a,b,c){};_.eg=function tmc(){return this.c!=(RKc(),PKc)};_.fg=function umc(){this.e=$C(kE,Pwe,28,this.d,15,1)};_.hg=function wmc(a,b){b[a][0].c.p=a};_.jg=function ymc(a,b,c,d){++this.d};_.kg=function zmc(){return true};_.lg=function Amc(a,b,c,d){omc(this,a,b,c);return nmc(this,b)};_.mg=function Bmc(a,b){var c;c=pmc(b,a.length);omc(this,a,c,b);return qmc(this,c)};_.d=0;var IV=sfb(sBe,'GreedySwitchHeuristic',1867);feb(2029,1,{},Kmc);_.b=0;_.d=0;var JV=sfb(sBe,'NorthSouthEdgeNeighbouringNodeCrossingsCounter',2029);feb(2016,1,{},Pmc);_.a=false;var KV=sfb(sBe,'SwitchDecider',2016);feb(105,1,{105:1},Vmc);_.a=null;_.c=null;_.i=null;var NV=sfb(vBe,'SelfHyperLoop',105);feb(2013,1,{},_mc);_.c=0;_.e=0;var MV=sfb(vBe,'SelfHyperLoopLabels',2013);feb(421,22,{3:1,34:1,22:1,421:1},fnc);var anc,bnc,cnc,dnc;var LV=tfb(vBe,'SelfHyperLoopLabels/Alignment',421,WI,hnc,gnc);var inc;feb(340,1,{340:1},knc);var OV=sfb(vBe,'SelfLoopEdge',340);feb(337,1,{337:1},onc);_.a=false;var QV=sfb(vBe,'SelfLoopHolder',337);feb(1790,1,nwe,qnc);_.Mb=function rnc(a){return W0b(RD(a,18))};var PV=sfb(vBe,'SelfLoopHolder/lambda$0$Type',1790);feb(113,1,{113:1},tnc);_.a=false;_.c=false;var SV=sfb(vBe,'SelfLoopPort',113);feb(1855,1,nwe,unc);_.Mb=function vnc(a){return W0b(RD(a,18))};var RV=sfb(vBe,'SelfLoopPort/lambda$0$Type',1855);feb(375,22,{3:1,34:1,22:1,375:1},Cnc);var wnc,xnc,ync,znc,Anc;var TV=tfb(vBe,'SelfLoopType',375,WI,Fnc,Enc);var Gnc;feb(1798,1,{},boc);var Inc,Jnc,Knc,Lnc;var gW=sfb(wBe,'PortRestorer',1798);feb(372,22,{3:1,34:1,22:1,372:1},koc);var goc,hoc,ioc;var UV=tfb(wBe,'PortRestorer/PortSideArea',372,WI,moc,loc);var noc;feb(1799,1,{},poc);_.Kb=function qoc(a){return Mnc(),RD(a,15).Oc()};var VV=sfb(wBe,'PortRestorer/lambda$0$Type',1799);feb(1800,1,Qve,roc);_.Cd=function soc(a){Mnc();RD(a,113).c=false};var WV=sfb(wBe,'PortRestorer/lambda$1$Type',1800);feb(1809,1,nwe,toc);_.Mb=function uoc(a){return Mnc(),RD(a,12).j==(qpd(),ppd)};var XV=sfb(wBe,'PortRestorer/lambda$10$Type',1809);feb(1810,1,{},voc);_.Kb=function woc(a){return Mnc(),RD(a,113).d};var YV=sfb(wBe,'PortRestorer/lambda$11$Type',1810);feb(1811,1,Qve,xoc);_.Cd=function yoc(a){coc(this.a,RD(a,12))};var ZV=sfb(wBe,'PortRestorer/lambda$12$Type',1811);feb(1801,1,Qve,zoc);_.Cd=function Aoc(a){doc(this.a,RD(a,105))};var $V=sfb(wBe,'PortRestorer/lambda$2$Type',1801);feb(1802,1,fye,Boc);_.Ne=function Coc(a,b){return eoc(RD(a,113),RD(b,113))};_.Fb=function Doc(a){return this===a};_.Oe=function Eoc(){return new Frb(this)};var _V=sfb(wBe,'PortRestorer/lambda$3$Type',1802);feb(1803,1,nwe,Foc);_.Mb=function Goc(a){return Mnc(),RD(a,113).c};var aW=sfb(wBe,'PortRestorer/lambda$4$Type',1803);feb(1804,1,nwe,Hoc);_.Mb=function Ioc(a){return Tnc(RD(a,12))};var bW=sfb(wBe,'PortRestorer/lambda$5$Type',1804);feb(1805,1,nwe,Joc);_.Mb=function Koc(a){return Mnc(),RD(a,12).j==(qpd(),Yod)};var cW=sfb(wBe,'PortRestorer/lambda$6$Type',1805);feb(1806,1,nwe,Loc);_.Mb=function Moc(a){return Mnc(),RD(a,12).j==(qpd(),Xod)};var dW=sfb(wBe,'PortRestorer/lambda$7$Type',1806);feb(1807,1,nwe,Noc);_.Mb=function Ooc(a){return Unc(RD(a,12))};var eW=sfb(wBe,'PortRestorer/lambda$8$Type',1807);feb(1808,1,nwe,Poc);_.Mb=function Qoc(a){return Mnc(),RD(a,12).j==(qpd(),npd)};var fW=sfb(wBe,'PortRestorer/lambda$9$Type',1808);feb(276,22,{3:1,34:1,22:1,276:1},fpc);var Yoc,Zoc,$oc,_oc,apc,bpc,cpc,dpc;var hW=tfb(wBe,'PortSideAssigner/Target',276,WI,hpc,gpc);var ipc;feb(1791,1,{},kpc);_.Kb=function lpc(a){return CDb(new SDb(null,new Swb(RD(a,105).j,16)),new Cpc)};var iW=sfb(wBe,'PortSideAssigner/lambda$1$Type',1791);feb(1792,1,{},mpc);_.Kb=function npc(a){return RD(a,113).d};var jW=sfb(wBe,'PortSideAssigner/lambda$2$Type',1792);feb(1793,1,Qve,opc);_.Cd=function ppc(a){Q3b(RD(a,12),(qpd(),Yod))};var kW=sfb(wBe,'PortSideAssigner/lambda$3$Type',1793);feb(1794,1,{},qpc);_.Kb=function rpc(a){return RD(a,113).d};var lW=sfb(wBe,'PortSideAssigner/lambda$4$Type',1794);feb(1795,1,Qve,spc);_.Cd=function tpc(a){Voc(this.a,RD(a,12))};var mW=sfb(wBe,'PortSideAssigner/lambda$5$Type',1795);feb(1796,1,fye,upc);_.Ne=function vpc(a,b){return Woc(RD(a,105),RD(b,105))};_.Fb=function wpc(a){return this===a};_.Oe=function xpc(){return new Frb(this)};var nW=sfb(wBe,'PortSideAssigner/lambda$6$Type',1796);feb(1797,1,fye,ypc);_.Ne=function zpc(a,b){return Xoc(RD(a,113),RD(b,113))};_.Fb=function Apc(a){return this===a};_.Oe=function Bpc(){return new Frb(this)};var oW=sfb(wBe,'PortSideAssigner/lambda$7$Type',1797);feb(820,1,nwe,Cpc);_.Mb=function Dpc(a){return RD(a,113).c};var pW=sfb(wBe,'PortSideAssigner/lambda$8$Type',820);feb(2108,1,{});var qW=sfb(xBe,'AbstractSelfLoopRouter',2108);feb(1816,1,fye,Mpc);_.Ne=function Npc(a,b){return Kpc(RD(a,105),RD(b,105))};_.Fb=function Opc(a){return this===a};_.Oe=function Ppc(){return new Frb(this)};var rW=sfb(xBe,Vye,1816);feb(1817,1,fye,Qpc);_.Ne=function Rpc(a,b){return Lpc(RD(a,105),RD(b,105))};_.Fb=function Spc(a){return this===a};_.Oe=function Tpc(){return new Frb(this)};var sW=sfb(xBe,Wye,1817);feb(1856,2108,{},dqc);_.ng=function eqc(a,b,c){return c};var uW=sfb(xBe,'OrthogonalSelfLoopRouter',1856);feb(1858,1,Qve,fqc);_.Cd=function gqc(a){cqc(this.b,this.a,RD(a,8))};var tW=sfb(xBe,'OrthogonalSelfLoopRouter/lambda$0$Type',1858);feb(1857,1856,{},jqc);_.ng=function kqc(a,b,c){var d,e;d=a.c.d;hu(c,0,$id(ajd(d.n),d.a));e=a.d.d;Mub(c,$id(ajd(e.n),e.a));return hqc(c)};var vW=sfb(xBe,'PolylineSelfLoopRouter',1857);feb(1812,1,{},yqc);_.a=null;var lqc;var zW=sfb(xBe,'RoutingDirector',1812);feb(1813,1,fye,Aqc);_.Ne=function Bqc(a,b){return zqc(RD(a,113),RD(b,113))};_.Fb=function Cqc(a){return this===a};_.Oe=function Dqc(){return new Frb(this)};var wW=sfb(xBe,'RoutingDirector/lambda$0$Type',1813);feb(1814,1,{},Eqc);_.Kb=function Fqc(a){return mqc(),RD(a,105).j};var xW=sfb(xBe,'RoutingDirector/lambda$1$Type',1814);feb(1815,1,Qve,Gqc);_.Cd=function Hqc(a){mqc();RD(a,15).jd(lqc)};var yW=sfb(xBe,'RoutingDirector/lambda$2$Type',1815);feb(1818,1,{},Sqc);var CW=sfb(xBe,'RoutingSlotAssigner',1818);feb(1819,1,nwe,Vqc);_.Mb=function Wqc(a){return Tqc(this.a,RD(a,105))};var AW=sfb(xBe,'RoutingSlotAssigner/lambda$0$Type',1819);feb(1820,1,fye,Xqc);_.Ne=function Yqc(a,b){return Uqc(this.a,RD(a,105),RD(b,105))};_.Fb=function Zqc(a){return this===a};_.Oe=function $qc(){return new Frb(this)};var BW=sfb(xBe,'RoutingSlotAssigner/lambda$1$Type',1820);feb(1859,1856,{},arc);_.ng=function brc(a,b,c){var d,e,f,g;d=Kfb(UD(k2b(a.b.g.b,(yCc(),VBc))));g=new Gjd(cD(WC(l3,1),Nve,8,0,[(f=a.c.d,$id(new sjd(f.n),f.a))]));_qc(a,b,c,g,d);Mub(g,(e=a.d.d,$id(new sjd(e.n),e.a)));return sUc(new wUc(g))};var DW=sfb(xBe,'SplineSelfLoopRouter',1859);feb(586,1,fye,frc,hrc);_.Ne=function irc(a,b){return crc(this,RD(a,10),RD(b,10))};_.Fb=function jrc(a){return this===a};_.Oe=function krc(){return new Frb(this)};var FW=sfb(yBe,'ModelOrderNodeComparator',586);feb(1821,1,nwe,lrc);_.Mb=function mrc(a){return RD(a,12).e.c.length!=0};var EW=sfb(yBe,'ModelOrderNodeComparator/lambda$0$Type',1821);feb(821,1,fye,trc,urc);_.Ne=function vrc(a,b){return prc(this,a,b)};_.Fb=function wrc(a){return this===a};_.Oe=function xrc(){return new Frb(this)};_.b=false;var GW=sfb(yBe,'ModelOrderPortComparator',821);feb(815,1,{},zrc);_.og=function Brc(a,b){var c,d,e,f;e=Arc(b);c=new bnb;f=b.f/e;for(d=1;d<e;++d){Rmb(c,sgb(Ydb(Hdb($wnd.Math.round(d*f)))))}return c};_.pg=function Crc(){return false};var HW=sfb(zBe,'ARDCutIndexHeuristic',815);feb(1544,1,QAe,Hrc);_.Kf=function Irc(a,b){Grc(RD(a,36),b)};var KW=sfb(zBe,'BreakingPointInserter',1544);feb(313,1,{313:1},Jrc);_.Ib=function Mrc(){var a;a=new bib;a.a+='BPInfo[';a.a+='\n\tstart=';Yhb(a,this.i);a.a+='\n\tend=';Yhb(a,this.a);a.a+='\n\tnodeStartEdge=';Yhb(a,this.e);a.a+='\n\tstartEndEdge=';Yhb(a,this.j);a.a+='\n\toriginalEdge=';Yhb(a,this.f);a.a+='\n\tstartInLayerDummy=';Yhb(a,this.k);a.a+='\n\tstartInLayerEdge=';Yhb(a,this.n);a.a+='\n\tendInLayerDummy=';Yhb(a,this.b);a.a+='\n\tendInLayerEdge=';Yhb(a,this.c);return a.a};var IW=sfb(zBe,'BreakingPointInserter/BPInfo',313);feb(661,1,{661:1},Trc);_.a=false;_.b=0;_.c=0;var JW=sfb(zBe,'BreakingPointInserter/Cut',661);feb(1545,1,QAe,bsc);_.Kf=function csc(a,b){_rc(RD(a,36),b)};var NW=sfb(zBe,'BreakingPointProcessor',1545);feb(1546,1,nwe,dsc);_.Mb=function esc(a){return Krc(RD(a,10))};var LW=sfb(zBe,'BreakingPointProcessor/0methodref$isEnd$Type',1546);feb(1547,1,nwe,fsc);_.Mb=function gsc(a){return Lrc(RD(a,10))};var MW=sfb(zBe,'BreakingPointProcessor/1methodref$isStart$Type',1547);feb(1548,1,QAe,ksc);_.Kf=function lsc(a,b){isc(this,RD(a,36),b)};var PW=sfb(zBe,'BreakingPointRemover',1548);feb(1549,1,Qve,msc);_.Cd=function nsc(a){RD(a,131).k=true};var OW=sfb(zBe,'BreakingPointRemover/lambda$0$Type',1549);feb(811,1,{},ysc);_.b=0;_.e=0;_.f=0;_.j=0;var VW=sfb(zBe,'GraphStats',811);feb(812,1,{},Asc);_.Ve=function Bsc(a,b){return $wnd.Math.max(Kfb(UD(a)),Kfb(UD(b)))};var QW=sfb(zBe,'GraphStats/0methodref$max$Type',812);feb(813,1,{},Csc);_.Ve=function Dsc(a,b){return $wnd.Math.max(Kfb(UD(a)),Kfb(UD(b)))};var RW=sfb(zBe,'GraphStats/2methodref$max$Type',813);feb(1726,1,{},Esc);_.Ve=function Fsc(a,b){return zsc(UD(a),UD(b))};var SW=sfb(zBe,'GraphStats/lambda$1$Type',1726);feb(1727,1,{},Gsc);_.Kb=function Hsc(a){return ssc(this.a,RD(a,30))};var TW=sfb(zBe,'GraphStats/lambda$2$Type',1727);feb(1728,1,{},Isc);_.Kb=function Jsc(a){return rsc(this.a,RD(a,30))};var UW=sfb(zBe,'GraphStats/lambda$6$Type',1728);feb(814,1,{},Ksc);_.og=function Lsc(a,b){var c;c=RD(mQb(a,(yCc(),pCc)),15);return c?c:(yob(),yob(),vob)};_.pg=function Msc(){return false};var WW=sfb(zBe,'ICutIndexCalculator/ManualCutIndexCalculator',814);feb(816,1,{},Nsc);_.og=function Osc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;u=(b.n==null&&vsc(b),b.n);i=(b.d==null&&vsc(b),b.d);t=$C(iE,vxe,28,u.length,15,1);t[0]=u[0];r=u[0];for(j=1;j<u.length;j++){t[j]=t[j-1]+u[j];r+=u[j]}e=Arc(b)-1;g=RD(mQb(a,(yCc(),qCc)),17).a;d=pxe;c=new bnb;for(m=$wnd.Math.max(0,e-g);m<=$wnd.Math.min(b.f-1,e+g);m++){p=r/(m+1);q=0;k=1;f=new bnb;s=pxe;l=0;h=0;o=i[0];if(m==0){s=r;h=(b.g==null&&(b.g=qsc(b,new Csc)),Kfb(b.g))}else{while(k<b.f){if(t[k-1]-q>=p){Rmb(f,sgb(k));s=$wnd.Math.max(s,t[k-1]-l);h+=o;q+=t[k-1]-q;l=t[k-1];o=i[k]}o=$wnd.Math.max(o,i[k]);++k}h+=o}n=$wnd.Math.min(1/s,1/b.b/h);if(n>d){d=n;c=f}}return c};_.pg=function Psc(){return false};var XW=sfb(zBe,'MSDCutIndexHeuristic',816);feb(1683,1,QAe,Ssc);_.Kf=function Tsc(a,b){Rsc(RD(a,36),b)};var YW=sfb(zBe,'SingleEdgeGraphWrapper',1683);feb(232,22,{3:1,34:1,22:1,232:1},ctc);var Xsc,Ysc,Zsc,$sc,_sc,atc;var ZW=tfb(ABe,'CenterEdgeLabelPlacementStrategy',232,WI,etc,dtc);var ftc;feb(431,22,{3:1,34:1,22:1,431:1},ktc);var htc,itc;var $W=tfb(ABe,'ConstraintCalculationStrategy',431,WI,mtc,ltc);var ntc;feb(322,22,{3:1,34:1,22:1,322:1,188:1,196:1},utc);_.dg=function wtc(){return ttc(this)};_.qg=function vtc(){return ttc(this)};var ptc,qtc,rtc;var _W=tfb(ABe,'CrossingMinimizationStrategy',322,WI,ytc,xtc);var ztc;feb(351,22,{3:1,34:1,22:1,351:1},Ftc);var Btc,Ctc,Dtc;var aX=tfb(ABe,'CuttingStrategy',351,WI,Htc,Gtc);var Itc;feb(348,22,{3:1,34:1,22:1,348:1,188:1,196:1},Rtc);_.dg=function Ttc(){return Qtc(this)};_.qg=function Stc(){return Qtc(this)};var Ktc,Ltc,Mtc,Ntc,Otc;var bX=tfb(ABe,'CycleBreakingStrategy',348,WI,Vtc,Utc);var Wtc;feb(428,22,{3:1,34:1,22:1,428:1},_tc);var Ytc,Ztc;var cX=tfb(ABe,'DirectionCongruency',428,WI,buc,auc);var cuc;feb(460,22,{3:1,34:1,22:1,460:1},iuc);var euc,fuc,guc;var dX=tfb(ABe,'EdgeConstraint',460,WI,kuc,juc);var luc;feb(283,22,{3:1,34:1,22:1,283:1},vuc);var nuc,ouc,puc,quc,ruc,suc;var eX=tfb(ABe,'EdgeLabelSideSelection',283,WI,xuc,wuc);var yuc;feb(488,22,{3:1,34:1,22:1,488:1},Duc);var Auc,Buc;var fX=tfb(ABe,'EdgeStraighteningStrategy',488,WI,Fuc,Euc);var Guc;feb(281,22,{3:1,34:1,22:1,281:1},Puc);var Iuc,Juc,Kuc,Luc,Muc,Nuc;var gX=tfb(ABe,'FixedAlignment',281,WI,Ruc,Quc);var Suc;feb(282,22,{3:1,34:1,22:1,282:1},_uc);var Uuc,Vuc,Wuc,Xuc,Yuc,Zuc;var hX=tfb(ABe,'GraphCompactionStrategy',282,WI,bvc,avc);var cvc;feb(259,22,{3:1,34:1,22:1,259:1},pvc);var evc,fvc,gvc,hvc,ivc,jvc,kvc,lvc,mvc,nvc;var iX=tfb(ABe,'GraphProperties',259,WI,rvc,qvc);var svc;feb(299,22,{3:1,34:1,22:1,299:1},yvc);var uvc,vvc,wvc;var jX=tfb(ABe,'GreedySwitchType',299,WI,Avc,zvc);var Bvc;feb(311,22,{3:1,34:1,22:1,311:1},Hvc);var Dvc,Evc,Fvc;var kX=tfb(ABe,'InLayerConstraint',311,WI,Jvc,Ivc);var Kvc;feb(429,22,{3:1,34:1,22:1,429:1},Pvc);var Mvc,Nvc;var lX=tfb(ABe,'InteractiveReferencePoint',429,WI,Rvc,Qvc);var Svc;var Uvc,Vvc,Wvc,Xvc,Yvc,Zvc,$vc,_vc,awc,bwc,cwc,dwc,ewc,fwc,gwc,hwc,iwc,jwc,kwc,lwc,mwc,nwc,owc,pwc,qwc,rwc,swc,twc,uwc,vwc,wwc,xwc,ywc,zwc,Awc,Bwc,Cwc,Dwc,Ewc,Fwc,Gwc,Hwc,Iwc,Jwc,Kwc,Lwc,Mwc,Nwc,Owc,Pwc,Qwc,Rwc,Swc,Twc,Uwc,Vwc,Wwc,Xwc;feb(171,22,{3:1,34:1,22:1,171:1},dxc);var Zwc,$wc,_wc,axc,bxc;var mX=tfb(ABe,'LayerConstraint',171,WI,fxc,exc);var gxc;feb(859,1,Eye,Pzc);_.hf=function Qzc(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,HBe),''),'Direction Congruency'),'Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other.'),Uxc),(kid(),eid)),cX),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,IBe),''),'Feedback Edges'),'Whether feedback edges should be highlighted by routing around the nodes.'),(Geb(),false)),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,JBe),''),'Interactive Reference Point'),'Determines which point of a node is considered by interactive layout phases.'),pyc),eid),lX),xsb(Whd))));zgd(a,JBe,RBe,ryc);zgd(a,JBe,_Be,qyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,KBe),''),'Merge Edges'),'Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,LBe),''),'Merge Hierarchy-Crossing Edges'),'If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port.'),true),cid),QI),xsb(Whd))));Egd(a,new Ahd(Nhd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,MBe),''),'Allow Non-Flow Ports To Switch Sides'),"Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."),false),cid),QI),xsb(Xhd)),cD(WC(qJ,1),Nve,2,6,['org.eclipse.elk.layered.northOrSouthPort']))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,NBe),''),'Port Sorting Strategy'),"Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."),azc),eid),xX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,OBe),''),'Thoroughness'),'How much effort should be spent to produce a nice layout.'),sgb(7)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,PBe),''),'Add Unnecessary Bendpoints'),'Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,QBe),''),'Generate Position and Layer IDs'),'If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,RBe),'cycleBreaking'),'Cycle Breaking Strategy'),'Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right).'),Sxc),eid),bX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,SBe),bDe),'Node Layering Strategy'),'Strategy for node layering.'),Gyc),eid),rX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,TBe),bDe),'Layer Constraint'),'Determines a constraint on the placement of the node regarding the layering.'),wyc),eid),mX),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,UBe),bDe),'Layer Choice Constraint'),"Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,VBe),bDe),'Layer ID'),'Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set.'),sgb(-1)),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,WBe),cDe),'Upper Bound On Width [MinWidth Layerer]'),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),sgb(4)),gid),bJ),xsb(Whd))));zgd(a,WBe,SBe,zyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,XBe),cDe),'Upper Layer Estimation Scaling Factor [MinWidth Layerer]'),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),sgb(2)),gid),bJ),xsb(Whd))));zgd(a,XBe,SBe,Byc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,YBe),dDe),'Node Promotion Strategy'),'Reduces number of dummy nodes after layering phase (if possible).'),Eyc),eid),vX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ZBe),dDe),'Max Node Promotion Iterations'),'Limits the number of iterations for node promotion.'),sgb(0)),gid),bJ),xsb(Whd))));zgd(a,ZBe,YBe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,$Be),'layering.coffmanGraham'),'Layer Bound'),'The maximum number of nodes allowed per layer.'),sgb(lve)),gid),bJ),xsb(Whd))));zgd(a,$Be,SBe,tyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,_Be),eDe),'Crossing Minimization Strategy'),'Strategy for crossing minimization.'),Qxc),eid),_W),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,aCe),eDe),'Force Node Model Order'),'The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,bCe),eDe),'Hierarchical Sweepiness'),'How likely it is to use cross-hierarchy (1) vs bottom-up (-1).'),0.1),did),VI),xsb(Whd))));zgd(a,bCe,fDe,Ixc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,cCe),eDe),'Semi-Interactive Crossing Minimization'),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),false),cid),QI),xsb(Whd))));zgd(a,cCe,_Be,Oxc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,dCe),eDe),'In Layer Predecessor of'),"Allows to set a constraint which specifies of which node the current node is the predecessor. If set to 's' then the node is the predecessor of 's' and is in the same layer"),null),iid),qJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,eCe),eDe),'In Layer Successor of'),"Allows to set a constraint which specifies of which node the current node is the successor. If set to 's' then the node is the successor of 's' and is in the same layer"),null),iid),qJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,fCe),eDe),'Position Choice Constraint'),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,gCe),eDe),'Position ID'),'Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set.'),sgb(-1)),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,hCe),gDe),'Greedy Switch Activation Threshold'),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),sgb(40)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,iCe),gDe),'Greedy Switch Crossing Minimization'),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),Fxc),eid),jX),xsb(Whd))));zgd(a,iCe,_Be,Gxc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,jCe),'crossingMinimization.greedySwitchHierarchical'),'Greedy Switch Crossing Minimization (hierarchical)'),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),Bxc),eid),jX),xsb(Whd))));zgd(a,jCe,_Be,Cxc);zgd(a,jCe,fDe,Dxc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,kCe),hDe),'Node Placement Strategy'),'Strategy for node placement.'),$yc),eid),uX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,lCe),hDe),'Favor Straight Edges Over Balancing'),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),cid),QI),xsb(Whd))));zgd(a,lCe,kCe,Qyc);zgd(a,lCe,kCe,Ryc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,mCe),iDe),'BK Edge Straightening'),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),Kyc),eid),fX),xsb(Whd))));zgd(a,mCe,kCe,Lyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,nCe),iDe),'BK Fixed Alignment'),'Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four.'),Nyc),eid),gX),xsb(Whd))));zgd(a,nCe,kCe,Oyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,oCe),'nodePlacement.linearSegments'),'Linear Segments Deflection Dampening'),'Dampens the movement of nodes to keep the diagram from getting too large.'),0.3),did),VI),xsb(Whd))));zgd(a,oCe,kCe,Tyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,pCe),'nodePlacement.networkSimplex'),'Node Flexibility'),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),eid),tX),xsb(Vhd))));zgd(a,pCe,kCe,Yyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,qCe),'nodePlacement.networkSimplex.nodeFlexibility'),'Node Flexibility Default'),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),Wyc),eid),tX),xsb(Whd))));zgd(a,qCe,kCe,Xyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,rCe),jDe),'Self-Loop Distribution'),'Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE.'),ayc),eid),zX),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,sCe),jDe),'Self-Loop Ordering'),'Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE.'),cyc),eid),AX),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,tCe),'edgeRouting.splines'),'Spline Routing Mode'),'Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes.'),eyc),eid),CX),xsb(Whd))));zgd(a,tCe,kDe,fyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,uCe),'edgeRouting.splines.sloppy'),'Sloppy Spline Layer Spacing Factor'),'Spacing factor for routing area between layers when using sloppy spline routing.'),0.2),did),VI),xsb(Whd))));zgd(a,uCe,kDe,hyc);zgd(a,uCe,tCe,iyc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,vCe),'edgeRouting.polyline'),'Sloped Edge Zone Width'),'Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer.'),2),did),VI),xsb(Whd))));zgd(a,vCe,kDe,$xc);Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,wCe),lDe),'Spacing Base Value'),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,xCe),lDe),'Edge Node Between Layers Spacing'),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,yCe),lDe),'Edge Edge Between Layer Spacing'),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,zCe),lDe),'Node Node Between Layers Spacing'),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ACe),mDe),'Direction Priority'),'Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase.'),sgb(0)),gid),bJ),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,BCe),mDe),'Shortness Priority'),'Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase.'),sgb(0)),gid),bJ),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,CCe),mDe),'Straightness Priority'),'Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement.'),sgb(0)),gid),bJ),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,DCe),nDe),qze),'Tries to further compact components (disconnected sub-graphs).'),false),cid),QI),xsb(Whd))));zgd(a,DCe,cAe,true);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ECe),oDe),'Post Compaction Strategy'),pDe),nxc),eid),hX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,FCe),oDe),'Post Compaction Constraint Calculation'),pDe),lxc),eid),$W),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,GCe),qDe),'High Degree Node Treatment'),'Makes room around high degree nodes to place leafs and trees.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,HCe),qDe),'High Degree Node Threshold'),'Whether a node is considered to have a high degree.'),sgb(16)),gid),bJ),xsb(Whd))));zgd(a,HCe,GCe,true);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ICe),qDe),'High Degree Node Maximum Tree Height'),'Maximum height of a subtree connected to a high degree node to be moved to separate layers.'),sgb(5)),gid),bJ),xsb(Whd))));zgd(a,ICe,GCe,true);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,JCe),rDe),'Graph Wrapping Strategy'),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),Gzc),eid),EX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,KCe),rDe),'Additional Wrapped Edges Spacing'),'To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing.'),10),did),VI),xsb(Whd))));zgd(a,KCe,JCe,lzc);zgd(a,KCe,JCe,mzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,LCe),rDe),'Correction Factor for Wrapping'),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),did),VI),xsb(Whd))));zgd(a,LCe,JCe,ozc);zgd(a,LCe,JCe,pzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,MCe),sDe),'Cutting Strategy'),'The strategy by which the layer indexes are determined at which the layering crumbles into chunks.'),wzc),eid),aX),xsb(Whd))));zgd(a,MCe,JCe,xzc);zgd(a,MCe,JCe,yzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,NCe),sDe),'Manually Specified Cuts'),'Allows the user to specify her own cuts for a certain graph.'),hid),QK),xsb(Whd))));zgd(a,NCe,MCe,rzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,OCe),'wrapping.cutting.msd'),'MSD Freedom'),'The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts.'),tzc),gid),bJ),xsb(Whd))));zgd(a,OCe,MCe,uzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,PCe),tDe),'Validification Strategy'),'When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed.'),Lzc),eid),DX),xsb(Whd))));zgd(a,PCe,JCe,Mzc);zgd(a,PCe,JCe,Nzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,QCe),tDe),'Valid Indices for Wrapping'),null),hid),QK),xsb(Whd))));zgd(a,QCe,JCe,Izc);zgd(a,QCe,JCe,Jzc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,RCe),uDe),'Improve Cuts'),'For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought.'),true),cid),QI),xsb(Whd))));zgd(a,RCe,JCe,Czc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,SCe),uDe),'Distance Penalty When Improving Cuts'),null),2),did),VI),xsb(Whd))));zgd(a,SCe,JCe,Azc);zgd(a,SCe,RCe,true);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,TCe),uDe),'Improve Wrapped Edges'),'The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges.'),true),cid),QI),xsb(Whd))));zgd(a,TCe,JCe,Ezc);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,UCe),vDe),'Edge Label Side Selection'),'Method to decide on edge label sides.'),Yxc),eid),eX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,VCe),vDe),'Edge Center Label Placement Strategy'),'Determines in which layer center labels of long edges should be placed.'),Wxc),eid),ZW),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Uhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,WCe),wDe),'Consider Model Order'),'Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting.'),xxc),eid),wX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,XCe),wDe),'Consider Port Order'),'If disabled the port order of output ports is derived from the edge order and input ports are ordered by their incoming connections. If enabled all ports are ordered by the port model order.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,YCe),wDe),'No Model Order'),'Set on a node to not set a model order for this node even though it is a real node.'),false),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ZCe),wDe),'Consider Model Order for Components'),'If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected.'),pxc),eid),CQ),xsb(Whd))));zgd(a,ZCe,cAe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,$Ce),wDe),'Long Edge Ordering Strategy'),'Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout.'),txc),eid),sX),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,_Ce),wDe),'Crossing Counter Node Order Influence'),'Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0).'),0),did),VI),xsb(Whd))));zgd(a,_Ce,WCe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,aDe),wDe),'Crossing Counter Port Order Influence'),'Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0).'),0),did),VI),xsb(Whd))));zgd(a,aDe,WCe,null);zCc((new ACc,a))};var ixc,jxc,kxc,lxc,mxc,nxc,oxc,pxc,qxc,rxc,sxc,txc,uxc,vxc,wxc,xxc,yxc,zxc,Axc,Bxc,Cxc,Dxc,Exc,Fxc,Gxc,Hxc,Ixc,Jxc,Kxc,Lxc,Mxc,Nxc,Oxc,Pxc,Qxc,Rxc,Sxc,Txc,Uxc,Vxc,Wxc,Xxc,Yxc,Zxc,$xc,_xc,ayc,byc,cyc,dyc,eyc,fyc,gyc,hyc,iyc,jyc,kyc,lyc,myc,nyc,oyc,pyc,qyc,ryc,syc,tyc,uyc,vyc,wyc,xyc,yyc,zyc,Ayc,Byc,Cyc,Dyc,Eyc,Fyc,Gyc,Hyc,Iyc,Jyc,Kyc,Lyc,Myc,Nyc,Oyc,Pyc,Qyc,Ryc,Syc,Tyc,Uyc,Vyc,Wyc,Xyc,Yyc,Zyc,$yc,_yc,azc,bzc,czc,dzc,ezc,fzc,gzc,hzc,izc,jzc,kzc,lzc,mzc,nzc,ozc,pzc,qzc,rzc,szc,tzc,uzc,vzc,wzc,xzc,yzc,zzc,Azc,Bzc,Czc,Dzc,Ezc,Fzc,Gzc,Hzc,Izc,Jzc,Kzc,Lzc,Mzc,Nzc;var nX=sfb(ABe,'LayeredMetaDataProvider',859);feb(998,1,Eye,ACc);_.hf=function BCc(a){zCc(a)};var Rzc,Szc,Tzc,Uzc,Vzc,Wzc,Xzc,Yzc,Zzc,$zc,_zc,aAc,bAc,cAc,dAc,eAc,fAc,gAc,hAc,iAc,jAc,kAc,lAc,mAc,nAc,oAc,pAc,qAc,rAc,sAc,tAc,uAc,vAc,wAc,xAc,yAc,zAc,AAc,BAc,CAc,DAc,EAc,FAc,GAc,HAc,IAc,JAc,KAc,LAc,MAc,NAc,OAc,PAc,QAc,RAc,SAc,TAc,UAc,VAc,WAc,XAc,YAc,ZAc,$Ac,_Ac,aBc,bBc,cBc,dBc,eBc,fBc,gBc,hBc,iBc,jBc,kBc,lBc,mBc,nBc,oBc,pBc,qBc,rBc,sBc,tBc,uBc,vBc,wBc,xBc,yBc,zBc,ABc,BBc,CBc,DBc,EBc,FBc,GBc,HBc,IBc,JBc,KBc,LBc,MBc,NBc,OBc,PBc,QBc,RBc,SBc,TBc,UBc,VBc,WBc,XBc,YBc,ZBc,$Bc,_Bc,aCc,bCc,cCc,dCc,eCc,fCc,gCc,hCc,iCc,jCc,kCc,lCc,mCc,nCc,oCc,pCc,qCc,rCc,sCc,tCc,uCc,vCc,wCc,xCc;var pX=sfb(ABe,'LayeredOptions',998);feb(999,1,{},CCc);_.sf=function DCc(){var a;return a=new lXb,a};_.tf=function ECc(a){};var oX=sfb(ABe,'LayeredOptions/LayeredFactory',999);feb(1391,1,{});_.a=0;var FCc;var b4=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder',1391);feb(792,1391,{},RCc);var OCc,PCc;var qX=sfb(ABe,'LayeredSpacings/LayeredSpacingsBuilder',792);feb(265,22,{3:1,34:1,22:1,265:1,188:1,196:1},bDc);_.dg=function dDc(){return aDc(this)};_.qg=function cDc(){return aDc(this)};var SCc,TCc,UCc,VCc,WCc,XCc,YCc,ZCc,$Cc;var rX=tfb(ABe,'LayeringStrategy',265,WI,fDc,eDc);var gDc;feb(390,22,{3:1,34:1,22:1,390:1},nDc);var iDc,jDc,kDc;var sX=tfb(ABe,'LongEdgeOrderingStrategy',390,WI,pDc,oDc);var qDc;feb(203,22,{3:1,34:1,22:1,203:1},yDc);var sDc,tDc,uDc,vDc;var tX=tfb(ABe,'NodeFlexibility',203,WI,BDc,ADc);var CDc;feb(323,22,{3:1,34:1,22:1,323:1,188:1,196:1},LDc);_.dg=function NDc(){return KDc(this)};_.qg=function MDc(){return KDc(this)};var EDc,FDc,GDc,HDc,IDc;var uX=tfb(ABe,'NodePlacementStrategy',323,WI,PDc,ODc);var QDc;feb(243,22,{3:1,34:1,22:1,243:1},bEc);var SDc,TDc,UDc,VDc,WDc,XDc,YDc,ZDc,$Dc,_Dc;var vX=tfb(ABe,'NodePromotionStrategy',243,WI,dEc,cEc);var eEc;feb(284,22,{3:1,34:1,22:1,284:1},lEc);var gEc,hEc,iEc,jEc;var wX=tfb(ABe,'OrderingStrategy',284,WI,nEc,mEc);var oEc;feb(430,22,{3:1,34:1,22:1,430:1},tEc);var qEc,rEc;var xX=tfb(ABe,'PortSortingStrategy',430,WI,vEc,uEc);var wEc;feb(463,22,{3:1,34:1,22:1,463:1},CEc);var yEc,zEc,AEc;var yX=tfb(ABe,'PortType',463,WI,EEc,DEc);var FEc;feb(387,22,{3:1,34:1,22:1,387:1},LEc);var HEc,IEc,JEc;var zX=tfb(ABe,'SelfLoopDistributionStrategy',387,WI,NEc,MEc);var OEc;feb(349,22,{3:1,34:1,22:1,349:1},UEc);var QEc,REc,SEc;var AX=tfb(ABe,'SelfLoopOrderingStrategy',349,WI,WEc,VEc);var XEc;feb(312,1,{312:1},gFc);var BX=sfb(ABe,'Spacings',312);feb(350,22,{3:1,34:1,22:1,350:1},mFc);var iFc,jFc,kFc;var CX=tfb(ABe,'SplineRoutingMode',350,WI,oFc,nFc);var pFc;feb(352,22,{3:1,34:1,22:1,352:1},vFc);var rFc,sFc,tFc;var DX=tfb(ABe,'ValidifyStrategy',352,WI,xFc,wFc);var yFc;feb(388,22,{3:1,34:1,22:1,388:1},EFc);var AFc,BFc,CFc;var EX=tfb(ABe,'WrappingStrategy',388,WI,GFc,FFc);var HFc;feb(1398,1,nEe,NFc);_.rg=function OFc(a){return RD(a,36),JFc};_.Kf=function PFc(a,b){MFc(this,RD(a,36),b)};var JFc;var FX=sfb(oEe,'DepthFirstCycleBreaker',1398);feb(793,1,nEe,UFc);_.rg=function WFc(a){return RD(a,36),QFc};_.Kf=function XFc(a,b){SFc(this,RD(a,36),b)};_.sg=function VFc(a){return RD(Vmb(a,Jwb(this.d,a.c.length)),10)};var QFc;var GX=sfb(oEe,'GreedyCycleBreaker',793);feb(1401,793,nEe,YFc);_.sg=function ZFc(a){var b,c,d,e;e=null;b=lve;for(d=new Anb(a);d.a<d.c.c.length;){c=RD(ynb(d),10);if(nQb(c,(Ywc(),zwc))&&RD(mQb(c,zwc),17).a<b){b=RD(mQb(c,zwc),17).a;e=c}}if(!e){return RD(Vmb(a,Jwb(this.d,a.c.length)),10)}return e};var HX=sfb(oEe,'GreedyModelOrderCycleBreaker',1401);feb(1399,1,nEe,cGc);_.rg=function dGc(a){return RD(a,36),$Fc};_.Kf=function eGc(a,b){bGc(this,RD(a,36),b)};var $Fc;var IX=sfb(oEe,'InteractiveCycleBreaker',1399);feb(1400,1,nEe,jGc);_.rg=function kGc(a){return RD(a,36),fGc};_.Kf=function lGc(a,b){iGc(this,RD(a,36),b)};_.a=0;_.b=0;var fGc;var JX=sfb(oEe,'ModelOrderCycleBreaker',1400);feb(1413,1,nEe,pGc);_.rg=function qGc(a){return RD(a,36),mGc};_.Kf=function sGc(a,b){oGc(this,RD(a,36),b)};var mGc;var LX=sfb(pEe,'BreadthFirstModelOrderLayerer',1413);feb(1414,1,fye,tGc);_.Ne=function uGc(a,b){return rGc(RD(a,10),RD(b,10))};_.Fb=function vGc(a){return this===a};_.Oe=function wGc(){return new Frb(this)};var KX=sfb(pEe,'BreadthFirstModelOrderLayerer/lambda$0$Type',1414);feb(1404,1,nEe,GGc);_.rg=function HGc(a){return RD(a,36),xGc};_.Kf=function IGc(a,b){EGc(this,RD(a,36),b)};var xGc;var OX=sfb(pEe,'CoffmanGrahamLayerer',1404);feb(1405,1,fye,JGc);_.Ne=function KGc(a,b){return AGc(this.a,RD(a,10),RD(b,10))};_.Fb=function LGc(a){return this===a};_.Oe=function MGc(){return new Frb(this)};var MX=sfb(pEe,'CoffmanGrahamLayerer/0methodref$compareNodesInTopo$Type',1405);feb(1406,1,fye,NGc);_.Ne=function OGc(a,b){return DGc(this.a,RD(a,10),RD(b,10))};_.Fb=function PGc(a){return this===a};_.Oe=function QGc(){return new Frb(this)};var NX=sfb(pEe,'CoffmanGrahamLayerer/lambda$1$Type',1406);feb(1415,1,nEe,YGc);_.rg=function ZGc(a){return RD(a,36),RGc};_.Kf=function _Gc(a,b){XGc(this,RD(a,36),b)};_.c=0;_.e=0;var RGc;var QX=sfb(pEe,'DepthFirstModelOrderLayerer',1415);feb(1416,1,fye,aHc);_.Ne=function bHc(a,b){return $Gc(RD(a,10),RD(b,10))};_.Fb=function cHc(a){return this===a};_.Oe=function dHc(){return new Frb(this)};var PX=sfb(pEe,'DepthFirstModelOrderLayerer/lambda$0$Type',1416);feb(1407,1,nEe,gHc);_.rg=function hHc(a){return RD(a,36),pfd(pfd(pfd(new ufd,(sXb(),nXb),(hcc(),Ebc)),oXb,Nbc),pXb,Mbc)};_.Kf=function iHc(a,b){fHc(RD(a,36),b)};var SX=sfb(pEe,'InteractiveLayerer',1407);feb(578,1,{578:1},jHc);_.a=0;_.c=0;var RX=sfb(pEe,'InteractiveLayerer/LayerSpan',578);feb(1403,1,nEe,pHc);_.rg=function qHc(a){return RD(a,36),kHc};_.Kf=function rHc(a,b){mHc(this,RD(a,36),b)};var kHc;var TX=sfb(pEe,'LongestPathLayerer',1403);feb(1412,1,nEe,xHc);_.rg=function yHc(a){return RD(a,36),sHc};_.Kf=function zHc(a,b){uHc(this,RD(a,36),b)};var sHc;var UX=sfb(pEe,'LongestPathSourceLayerer',1412);feb(1410,1,nEe,IHc);_.rg=function JHc(a){return RD(a,36),pfd(pfd(pfd(new ufd,(sXb(),nXb),(hcc(),obc)),oXb,Nbc),pXb,Mbc)};_.Kf=function KHc(a,b){GHc(this,RD(a,36),b)};_.a=0;_.b=0;_.d=0;var AHc,BHc;var WX=sfb(pEe,'MinWidthLayerer',1410);feb(1411,1,fye,MHc);_.Ne=function NHc(a,b){return LHc(this,RD(a,10),RD(b,10))};_.Fb=function OHc(a){return this===a};_.Oe=function PHc(){return new Frb(this)};var VX=sfb(pEe,'MinWidthLayerer/MinOutgoingEdgesComparator',1411);feb(1402,1,nEe,XHc);_.rg=function YHc(a){return RD(a,36),QHc};_.Kf=function ZHc(a,b){WHc(this,RD(a,36),b)};var QHc;var XX=sfb(pEe,'NetworkSimplexLayerer',1402);feb(1408,1,nEe,jIc);_.rg=function kIc(a){return RD(a,36),pfd(pfd(pfd(new ufd,(sXb(),nXb),(hcc(),obc)),oXb,Nbc),pXb,Mbc)};_.Kf=function lIc(a,b){gIc(this,RD(a,36),b)};_.d=0;_.f=0;_.g=0;_.i=0;_.s=0;_.t=0;_.u=0;var ZX=sfb(pEe,'StretchWidthLayerer',1408);feb(1409,1,fye,nIc);_.Ne=function oIc(a,b){return mIc(RD(a,10),RD(b,10))};_.Fb=function pIc(a){return this===a};_.Oe=function qIc(){return new Frb(this)};var YX=sfb(pEe,'StretchWidthLayerer/1',1409);feb(413,1,qEe);_.gg=function FIc(a,b,c,d,e,f){};_.ug=function DIc(a,b,c){return wIc(this,a,b,c)};_.fg=function EIc(){this.g=$C(jE,rEe,28,this.d,15,1);this.f=$C(jE,rEe,28,this.d,15,1)};_.hg=function GIc(a,b){this.e[a]=$C(kE,Pwe,28,b[a].length,15,1)};_.ig=function HIc(a,b,c){var d;d=c[a][b];d.p=b;this.e[a][b]=b};_.jg=function IIc(a,b,c,d){RD(Vmb(d[a][b].j,c),12).p=this.d++};_.b=0;_.c=0;_.d=0;var _X=sfb(sEe,'AbstractBarycenterPortDistributor',413);feb(1698,1,fye,JIc);_.Ne=function KIc(a,b){return zIc(this.a,RD(a,12),RD(b,12))};_.Fb=function LIc(a){return this===a};_.Oe=function MIc(){return new Frb(this)};var $X=sfb(sEe,'AbstractBarycenterPortDistributor/lambda$0$Type',1698);feb(832,1,uBe,UIc);_.gg=function XIc(a,b,c,d,e,f){};_.ig=function ZIc(a,b,c){};_.jg=function $Ic(a,b,c,d){};_.eg=function VIc(){return false};_.fg=function WIc(){this.c=this.e.a;this.g=this.f.g};_.hg=function YIc(a,b){b[a][0].c.p=a};_.kg=function _Ic(){return false};_.vg=function aJc(a,b,c,d){if(c){RIc(this,a)}else{OIc(this,a,d);PIc(this,a,b)}if(a.c.length>1){Heb(TD(mQb(Y2b((tFb(0,a.c.length),RD(a.c[0],10))),(yCc(),eAc))))?wLc(a,this.d,RD(this,669)):(yob(),_mb(a,this.d));nJc(this.e,a)}};_.lg=function bJc(a,b,c,d){var e,f,g,h,i,j,k;if(b!=SIc(c,a.length)){f=a[b-(c?1:-1)];sIc(this.f,f,c?(BEc(),zEc):(BEc(),yEc))}e=a[b][0];k=!d||e.k==(r3b(),m3b);j=dv(a[b]);this.vg(j,k,false,c);g=0;for(i=new Anb(j);i.a<i.c.c.length;){h=RD(ynb(i),10);a[b][g++]=h}return false};_.mg=function cJc(a,b){var c,d,e,f,g;g=SIc(b,a.length);f=dv(a[g]);this.vg(f,false,true,b);c=0;for(e=new Anb(f);e.a<e.c.c.length;){d=RD(ynb(e),10);a[g][c++]=d}return false};var cY=sfb(sEe,'BarycenterHeuristic',832);feb(667,1,{667:1},dJc);_.Ib=function eJc(){return 'BarycenterState [node='+this.c+', summedWeight='+this.d+', degree='+this.b+', barycenter='+this.a+', visited='+this.e+']'};_.b=0;_.d=0;_.e=false;var aY=sfb(sEe,'BarycenterHeuristic/BarycenterState',667);feb(1865,1,fye,fJc);_.Ne=function gJc(a,b){return QIc(this.a,RD(a,10),RD(b,10))};_.Fb=function hJc(a){return this===a};_.Oe=function iJc(){return new Frb(this)};var bY=sfb(sEe,'BarycenterHeuristic/lambda$0$Type',1865);feb(831,1,uBe,qJc);_.fg=function rJc(){};_.gg=function sJc(a,b,c,d,e,f){};_.jg=function vJc(a,b,c,d){};_.hg=function tJc(a,b){this.a[a]=$C(aY,{3:1,4:1,5:1,2117:1},667,b[a].length,0,1);this.b[a]=$C(dY,{3:1,4:1,5:1,2118:1},239,b[a].length,0,1)};_.ig=function uJc(a,b,c){mJc(this,c[a][b],true)};_.c=false;var fY=sfb(sEe,'ForsterConstraintResolver',831);feb(239,1,{239:1},yJc,zJc);_.Ib=function AJc(){var a,b;b=new bib;b.a+='[';for(a=0;a<this.d.length;a++){Zhb(b,i3b(this.d[a]));pJc(this.g,this.d[0]).a!=null&&Zhb(Zhb((b.a+='<',b),Pfb(pJc(this.g,this.d[0]).a)),'>');a<this.d.length-1&&(b.a+=pve,b)}return (b.a+=']',b).a};_.a=0;_.c=0;_.f=0;var dY=sfb(sEe,'ForsterConstraintResolver/ConstraintGroup',239);feb(1860,1,Qve,BJc);_.Cd=function CJc(a){mJc(this.a,RD(a,10),false)};var eY=sfb(sEe,'ForsterConstraintResolver/lambda$0$Type',1860);feb(219,1,{219:1,230:1},FJc);_.gg=function HJc(a,b,c,d,e,f){};_.hg=function IJc(a,b){};_.fg=function GJc(){this.r=$C(kE,Pwe,28,this.n,15,1)};_.ig=function JJc(a,b,c){var d,e;e=c[a][b];d=e.e;!!d&&Rmb(this.b,d)};_.jg=function KJc(a,b,c,d){++this.n};_.Ib=function LJc(){return Inb(this.e,new _sb)};_.g=false;_.i=false;_.n=0;_.s=false;var gY=sfb(sEe,'GraphInfoHolder',219);feb(1905,1,uBe,PJc);_.gg=function SJc(a,b,c,d,e,f){};_.hg=function TJc(a,b){};_.jg=function VJc(a,b,c,d){};_.ug=function QJc(a,b,c){c&&b>0?(pMc(this.a,a[b-1],a[b]),undefined):!c&&b<a.length-1?(pMc(this.a,a[b],a[b+1]),undefined):rMc(this.a,a[b],c?(qpd(),ppd):(qpd(),Xod));return MJc(this,a,b,c)};_.fg=function RJc(){this.d=$C(kE,Pwe,28,this.c,15,1);this.a=new DMc(this.d)};_.ig=function UJc(a,b,c){var d;d=c[a][b];this.c+=d.j.c.length};_.c=0;var hY=sfb(sEe,'GreedyPortDistributor',1905);feb(1421,1,nEe,aKc);_.rg=function bKc(a){return ZJc(RD(a,36))};_.Kf=function cKc(a,b){_Jc(RD(a,36),b)};var XJc;var jY=sfb(sEe,'InteractiveCrossingMinimizer',1421);feb(1422,1,fye,eKc);_.Ne=function fKc(a,b){return dKc(this,RD(a,10),RD(b,10))};_.Fb=function gKc(a){return this===a};_.Oe=function hKc(){return new Frb(this)};var iY=sfb(sEe,'InteractiveCrossingMinimizer/1',1422);feb(514,1,{514:1,106:1,47:1},FKc);_.rg=function GKc(a){var b;return RD(a,36),b=vfd(iKc),pfd(b,(sXb(),pXb),(hcc(),Ybc)),b};_.Kf=function HKc(a,b){wKc(this,RD(a,36),b)};_.e=0;var iKc;var pY=sfb(sEe,'LayerSweepCrossingMinimizer',514);feb(1418,1,Qve,IKc);_.Cd=function JKc(a){kKc(this.a,RD(a,219))};var kY=sfb(sEe,'LayerSweepCrossingMinimizer/0methodref$compareDifferentRandomizedLayouts$Type',1418);feb(1419,1,Qve,KKc);_.Cd=function LKc(a){tKc(this.a,RD(a,219))};var lY=sfb(sEe,'LayerSweepCrossingMinimizer/1methodref$minimizeCrossingsNoCounter$Type',1419);feb(1420,1,Qve,MKc);_.Cd=function NKc(a){vKc(this.a,RD(a,219))};var mY=sfb(sEe,'LayerSweepCrossingMinimizer/2methodref$minimizeCrossingsWithCounter$Type',1420);feb(464,22,{3:1,34:1,22:1,464:1},SKc);var OKc,PKc,QKc;var nY=tfb(sEe,'LayerSweepCrossingMinimizer/CrossMinType',464,WI,UKc,TKc);var VKc;feb(1417,1,nwe,XKc);_.Mb=function YKc(a){return jKc(),RD(a,30).a.c.length==0};var oY=sfb(sEe,'LayerSweepCrossingMinimizer/lambda$0$Type',1417);feb(1862,1,uBe,_Kc);_.fg=function aLc(){};_.gg=function bLc(a,b,c,d,e,f){};_.jg=function eLc(a,b,c,d){};_.hg=function cLc(a,b){b[a][0].c.p=a;this.b[a]=$C(qY,{3:1,4:1,5:1,2043:1},668,b[a].length,0,1)};_.ig=function dLc(a,b,c){var d;d=c[a][b];d.p=b;bD(this.b[a],b,new fLc)};var tY=sfb(sEe,'LayerSweepTypeDecider',1862);feb(668,1,{668:1},fLc);_.Ib=function gLc(){return 'NodeInfo [connectedEdges='+this.a+', hierarchicalInfluence='+this.b+', randomInfluence='+this.c+']'};_.a=0;_.b=0;_.c=0;var qY=sfb(sEe,'LayerSweepTypeDecider/NodeInfo',668);feb(1863,1,xye,hLc);_.Lb=function iLc(a){return k4b(new l4b(RD(a,12).b))};_.Fb=function jLc(a){return this===a};_.Mb=function kLc(a){return k4b(new l4b(RD(a,12).b))};var rY=sfb(sEe,'LayerSweepTypeDecider/lambda$0$Type',1863);feb(1864,1,xye,lLc);_.Lb=function mLc(a){return k4b(new l4b(RD(a,12).b))};_.Fb=function nLc(a){return this===a};_.Mb=function oLc(a){return k4b(new l4b(RD(a,12).b))};var sY=sfb(sEe,'LayerSweepTypeDecider/lambda$1$Type',1864);feb(1906,413,qEe,pLc);_.tg=function qLc(a,b,c){var d,e,f,g,h,i,j,k,l;j=this.g;switch(c.g){case 1:{d=0;e=0;for(i=new Anb(a.j);i.a<i.c.c.length;){g=RD(ynb(i),12);if(g.e.c.length!=0){++d;g.j==(qpd(),Yod)&&++e}}f=b+e;l=b+d;for(h=c3b(a,(BEc(),yEc)).Kc();h.Ob();){g=RD(h.Pb(),12);if(g.j==(qpd(),Yod)){j[g.p]=f;--f}else{j[g.p]=l;--l}}return d}case 2:{k=0;for(h=c3b(a,(BEc(),zEc)).Kc();h.Ob();){g=RD(h.Pb(),12);++k;j[g.p]=b+k}return k}default:throw Adb(new _fb);}};var uY=sfb(sEe,'LayerTotalPortDistributor',1906);feb(669,832,{669:1,230:1},vLc);_.vg=function xLc(a,b,c,d){if(c){RIc(this,a)}else{OIc(this,a,d);PIc(this,a,b)}if(a.c.length>1){Heb(TD(mQb(Y2b((tFb(0,a.c.length),RD(a.c[0],10))),(yCc(),eAc))))?wLc(a,this.d,this):(yob(),_mb(a,this.d));Heb(TD(mQb(Y2b((tFb(0,a.c.length),RD(a.c[0],10))),eAc)))||nJc(this.e,a)}};var wY=sfb(sEe,'ModelOrderBarycenterHeuristic',669);feb(1866,1,fye,yLc);_.Ne=function zLc(a,b){return tLc(this.a,RD(a,10),RD(b,10))};_.Fb=function ALc(a){return this===a};_.Oe=function BLc(){return new Frb(this)};var vY=sfb(sEe,'ModelOrderBarycenterHeuristic/lambda$0$Type',1866);feb(1423,1,nEe,FLc);_.rg=function GLc(a){var b;return RD(a,36),b=vfd(CLc),pfd(b,(sXb(),pXb),(hcc(),Ybc)),b};_.Kf=function HLc(a,b){ELc((RD(a,36),b))};var CLc;var xY=sfb(sEe,'NoCrossingMinimizer',1423);feb(809,413,qEe,ILc);_.tg=function JLc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;l=this.g;switch(c.g){case 1:{e=0;f=0;for(k=new Anb(a.j);k.a<k.c.c.length;){i=RD(ynb(k),12);if(i.e.c.length!=0){++e;i.j==(qpd(),Yod)&&++f}}d=1/(e+1);g=b+f*d;n=b+1-d;for(j=c3b(a,(BEc(),yEc)).Kc();j.Ob();){i=RD(j.Pb(),12);if(i.j==(qpd(),Yod)){l[i.p]=g;g-=d}else{l[i.p]=n;n-=d}}break}case 2:{h=0;for(k=new Anb(a.j);k.a<k.c.c.length;){i=RD(ynb(k),12);i.g.c.length==0||++h}d=1/(h+1);m=b+d;for(j=c3b(a,(BEc(),zEc)).Kc();j.Ob();){i=RD(j.Pb(),12);l[i.p]=m;m+=d}break}default:throw Adb(new agb('Port type is undefined'));}return 1};var yY=sfb(sEe,'NodeRelativePortDistributor',809);feb(822,1,{},NLc,OLc);var zY=sfb(sEe,'SweepCopy',822);feb(1861,1,uBe,RLc);_.hg=function ULc(a,b){};_.fg=function SLc(){var a;a=$C(kE,Pwe,28,this.f,15,1);this.d=new jNc(a);this.a=new DMc(a)};_.gg=function TLc(a,b,c,d,e,f){var g;g=RD(Vmb(f[a][b].j,c),12);e.c==g&&e.c.i.c==e.d.i.c&&++this.e[a]};_.ig=function VLc(a,b,c){var d;d=c[a][b];this.c[a]=this.c[a]|d.k==(r3b(),q3b)};_.jg=function WLc(a,b,c,d){var e;e=RD(Vmb(d[a][b].j,c),12);e.p=this.f++;e.g.c.length+e.e.c.length>1&&(e.j==(qpd(),Xod)?(this.b[a]=true):e.j==ppd&&a>0&&(this.b[a-1]=true))};_.f=0;var AY=sfb(tBe,'AllCrossingsCounter',1861);feb(595,1,{},_Lc);_.b=0;_.d=0;var BY=sfb(tBe,'BinaryIndexedTree',595);feb(532,1,{},DMc);var bMc,cMc;var LY=sfb(tBe,'CrossingsCounter',532);feb(1950,1,fye,HMc);_.Ne=function IMc(a,b){return wMc(this.a,RD(a,12),RD(b,12))};_.Fb=function JMc(a){return this===a};_.Oe=function KMc(){return new Frb(this)};var CY=sfb(tBe,'CrossingsCounter/lambda$0$Type',1950);feb(1951,1,fye,LMc);_.Ne=function MMc(a,b){return xMc(this.a,RD(a,12),RD(b,12))};_.Fb=function NMc(a){return this===a};_.Oe=function OMc(){return new Frb(this)};var DY=sfb(tBe,'CrossingsCounter/lambda$1$Type',1951);feb(1952,1,fye,PMc);_.Ne=function QMc(a,b){return yMc(this.a,RD(a,12),RD(b,12))};_.Fb=function RMc(a){return this===a};_.Oe=function SMc(){return new Frb(this)};var EY=sfb(tBe,'CrossingsCounter/lambda$2$Type',1952);feb(1953,1,fye,TMc);_.Ne=function UMc(a,b){return zMc(this.a,RD(a,12),RD(b,12))};_.Fb=function VMc(a){return this===a};_.Oe=function WMc(){return new Frb(this)};var FY=sfb(tBe,'CrossingsCounter/lambda$3$Type',1953);feb(1954,1,Qve,XMc);_.Cd=function YMc(a){EMc(this.a,RD(a,12))};var GY=sfb(tBe,'CrossingsCounter/lambda$4$Type',1954);feb(1955,1,nwe,ZMc);_.Mb=function $Mc(a){return FMc(this.a,RD(a,12))};var HY=sfb(tBe,'CrossingsCounter/lambda$5$Type',1955);feb(1956,1,Qve,aNc);_.Cd=function bNc(a){_Mc(this,a)};var IY=sfb(tBe,'CrossingsCounter/lambda$6$Type',1956);feb(1957,1,Qve,cNc);_.Cd=function dNc(a){var b;dMc();hmb(this.b,(b=this.a,RD(a,12),b))};var JY=sfb(tBe,'CrossingsCounter/lambda$7$Type',1957);feb(839,1,xye,eNc);_.Lb=function fNc(a){return dMc(),nQb(RD(a,12),(Ywc(),Iwc))};_.Fb=function gNc(a){return this===a};_.Mb=function hNc(a){return dMc(),nQb(RD(a,12),(Ywc(),Iwc))};var KY=sfb(tBe,'CrossingsCounter/lambda$8$Type',839);feb(1949,1,{},jNc);var PY=sfb(tBe,'HyperedgeCrossingsCounter',1949);feb(478,1,{34:1,478:1},lNc);_.Fd=function mNc(a){return kNc(this,RD(a,478))};_.b=0;_.c=0;_.e=0;_.f=0;var OY=sfb(tBe,'HyperedgeCrossingsCounter/Hyperedge',478);feb(374,1,{34:1,374:1},oNc);_.Fd=function pNc(a){return nNc(this,RD(a,374))};_.b=0;_.c=0;var NY=sfb(tBe,'HyperedgeCrossingsCounter/HyperedgeCorner',374);feb(531,22,{3:1,34:1,22:1,531:1},tNc);var qNc,rNc;var MY=tfb(tBe,'HyperedgeCrossingsCounter/HyperedgeCorner/Type',531,WI,vNc,uNc);var wNc;feb(1425,1,nEe,DNc);_.rg=function ENc(a){return RD(mQb(RD(a,36),(Ywc(),kwc)),21).Hc((ovc(),hvc))?zNc:null};_.Kf=function FNc(a,b){CNc(this,RD(a,36),b)};var zNc;var RY=sfb(tEe,'InteractiveNodePlacer',1425);feb(1426,1,nEe,TNc);_.rg=function UNc(a){return RD(mQb(RD(a,36),(Ywc(),kwc)),21).Hc((ovc(),hvc))?GNc:null};_.Kf=function VNc(a,b){RNc(this,RD(a,36),b)};var GNc,HNc,INc;var TY=sfb(tEe,'LinearSegmentsNodePlacer',1426);feb(261,1,{34:1,261:1},ZNc);_.Fd=function $Nc(a){return WNc(this,RD(a,261))};_.Fb=function _Nc(a){var b;if(ZD(a,261)){b=RD(a,261);return this.b==b.b}return false};_.Hb=function aOc(){return this.b};_.Ib=function bOc(){return 'ls'+Fe(this.e)};_.a=0;_.b=0;_.c=-1;_.d=-1;_.g=0;var SY=sfb(tEe,'LinearSegmentsNodePlacer/LinearSegment',261);feb(1428,1,nEe,yOc);_.rg=function zOc(a){return RD(mQb(RD(a,36),(Ywc(),kwc)),21).Hc((ovc(),hvc))?cOc:null};_.Kf=function HOc(a,b){uOc(this,RD(a,36),b)};_.b=0;_.g=0;var cOc;var DZ=sfb(tEe,'NetworkSimplexPlacer',1428);feb(1447,1,fye,IOc);_.Ne=function JOc(a,b){return hgb(RD(a,17).a,RD(b,17).a)};_.Fb=function KOc(a){return this===a};_.Oe=function LOc(){return new Frb(this)};var UY=sfb(tEe,'NetworkSimplexPlacer/0methodref$compare$Type',1447);feb(1449,1,fye,MOc);_.Ne=function NOc(a,b){return hgb(RD(a,17).a,RD(b,17).a)};_.Fb=function OOc(a){return this===a};_.Oe=function POc(){return new Frb(this)};var VY=sfb(tEe,'NetworkSimplexPlacer/1methodref$compare$Type',1449);feb(655,1,{655:1},QOc);var WY=sfb(tEe,'NetworkSimplexPlacer/EdgeRep',655);feb(412,1,{412:1},ROc);_.b=false;var XY=sfb(tEe,'NetworkSimplexPlacer/NodeRep',412);feb(515,13,{3:1,4:1,20:1,31:1,56:1,13:1,16:1,15:1,59:1,515:1},VOc);var aZ=sfb(tEe,'NetworkSimplexPlacer/Path',515);feb(1429,1,{},WOc);_.Kb=function XOc(a){return RD(a,18).d.i.k};var YY=sfb(tEe,'NetworkSimplexPlacer/Path/lambda$0$Type',1429);feb(1430,1,nwe,YOc);_.Mb=function ZOc(a){return RD(a,273)==(r3b(),o3b)};var ZY=sfb(tEe,'NetworkSimplexPlacer/Path/lambda$1$Type',1430);feb(1431,1,{},$Oc);_.Kb=function _Oc(a){return RD(a,18).d.i};var $Y=sfb(tEe,'NetworkSimplexPlacer/Path/lambda$2$Type',1431);feb(1432,1,nwe,aPc);_.Mb=function bPc(a){return EPc(zDc(RD(a,10)))};var _Y=sfb(tEe,'NetworkSimplexPlacer/Path/lambda$3$Type',1432);feb(1433,1,nwe,cPc);_.Mb=function dPc(a){return DOc(RD(a,12))};var bZ=sfb(tEe,'NetworkSimplexPlacer/lambda$0$Type',1433);feb(1434,1,Qve,ePc);_.Cd=function fPc(a){jOc(this.a,this.b,RD(a,12))};var cZ=sfb(tEe,'NetworkSimplexPlacer/lambda$1$Type',1434);feb(1443,1,Qve,gPc);_.Cd=function hPc(a){kOc(this.a,RD(a,18))};var dZ=sfb(tEe,'NetworkSimplexPlacer/lambda$10$Type',1443);feb(1444,1,{},iPc);_.Kb=function jPc(a){return dOc(),new SDb(null,new Swb(RD(a,30).a,16))};var eZ=sfb(tEe,'NetworkSimplexPlacer/lambda$11$Type',1444);feb(1445,1,Qve,kPc);_.Cd=function lPc(a){lOc(this.a,RD(a,10))};var fZ=sfb(tEe,'NetworkSimplexPlacer/lambda$12$Type',1445);feb(1446,1,{},mPc);_.Kb=function nPc(a){return dOc(),sgb(RD(a,125).e)};var gZ=sfb(tEe,'NetworkSimplexPlacer/lambda$13$Type',1446);feb(1448,1,{},oPc);_.Kb=function pPc(a){return dOc(),sgb(RD(a,125).e)};var hZ=sfb(tEe,'NetworkSimplexPlacer/lambda$15$Type',1448);feb(1450,1,nwe,qPc);_.Mb=function rPc(a){return dOc(),RD(a,412).c.k==(r3b(),p3b)};var iZ=sfb(tEe,'NetworkSimplexPlacer/lambda$17$Type',1450);feb(1451,1,nwe,sPc);_.Mb=function tPc(a){return dOc(),RD(a,412).c.j.c.length>1};var jZ=sfb(tEe,'NetworkSimplexPlacer/lambda$18$Type',1451);feb(1452,1,Qve,uPc);_.Cd=function vPc(a){EOc(this.c,this.b,this.d,this.a,RD(a,412))};_.c=0;_.d=0;var kZ=sfb(tEe,'NetworkSimplexPlacer/lambda$19$Type',1452);feb(1435,1,{},wPc);_.Kb=function xPc(a){return dOc(),new SDb(null,new Swb(RD(a,30).a,16))};var lZ=sfb(tEe,'NetworkSimplexPlacer/lambda$2$Type',1435);feb(1453,1,Qve,yPc);_.Cd=function zPc(a){FOc(this.a,RD(a,12))};_.a=0;var mZ=sfb(tEe,'NetworkSimplexPlacer/lambda$20$Type',1453);feb(1454,1,{},APc);_.Kb=function BPc(a){return dOc(),new SDb(null,new Swb(RD(a,30).a,16))};var nZ=sfb(tEe,'NetworkSimplexPlacer/lambda$21$Type',1454);feb(1455,1,Qve,CPc);_.Cd=function DPc(a){mOc(this.a,RD(a,10))};var oZ=sfb(tEe,'NetworkSimplexPlacer/lambda$22$Type',1455);feb(1456,1,nwe,FPc);_.Mb=function GPc(a){return EPc(a)};var pZ=sfb(tEe,'NetworkSimplexPlacer/lambda$23$Type',1456);feb(1457,1,{},HPc);_.Kb=function IPc(a){return dOc(),new SDb(null,new Swb(RD(a,30).a,16))};var qZ=sfb(tEe,'NetworkSimplexPlacer/lambda$24$Type',1457);feb(1458,1,nwe,JPc);_.Mb=function KPc(a){return nOc(this.a,RD(a,10))};var rZ=sfb(tEe,'NetworkSimplexPlacer/lambda$25$Type',1458);feb(1459,1,Qve,LPc);_.Cd=function MPc(a){oOc(this.a,this.b,RD(a,10))};var sZ=sfb(tEe,'NetworkSimplexPlacer/lambda$26$Type',1459);feb(1460,1,nwe,NPc);_.Mb=function OPc(a){return dOc(),!W0b(RD(a,18))};var tZ=sfb(tEe,'NetworkSimplexPlacer/lambda$27$Type',1460);feb(1461,1,nwe,PPc);_.Mb=function QPc(a){return dOc(),!W0b(RD(a,18))};var uZ=sfb(tEe,'NetworkSimplexPlacer/lambda$28$Type',1461);feb(1462,1,{},RPc);_.Ve=function SPc(a,b){return pOc(this.a,RD(a,30),RD(b,30))};var vZ=sfb(tEe,'NetworkSimplexPlacer/lambda$29$Type',1462);feb(1436,1,{},TPc);_.Kb=function UPc(a){return dOc(),new SDb(null,new Twb(new is(Mr(a3b(RD(a,10)).a.Kc(),new ir))))};var wZ=sfb(tEe,'NetworkSimplexPlacer/lambda$3$Type',1436);feb(1437,1,nwe,VPc);_.Mb=function WPc(a){return dOc(),COc(RD(a,18))};var xZ=sfb(tEe,'NetworkSimplexPlacer/lambda$4$Type',1437);feb(1438,1,Qve,XPc);_.Cd=function YPc(a){vOc(this.a,RD(a,18))};var yZ=sfb(tEe,'NetworkSimplexPlacer/lambda$5$Type',1438);feb(1439,1,{},ZPc);_.Kb=function $Pc(a){return dOc(),new SDb(null,new Swb(RD(a,30).a,16))};var zZ=sfb(tEe,'NetworkSimplexPlacer/lambda$6$Type',1439);feb(1440,1,nwe,_Pc);_.Mb=function aQc(a){return dOc(),RD(a,10).k==(r3b(),p3b)};var AZ=sfb(tEe,'NetworkSimplexPlacer/lambda$7$Type',1440);feb(1441,1,{},bQc);_.Kb=function cQc(a){return dOc(),new SDb(null,new Twb(new is(Mr(W2b(RD(a,10)).a.Kc(),new ir))))};var BZ=sfb(tEe,'NetworkSimplexPlacer/lambda$8$Type',1441);feb(1442,1,nwe,dQc);_.Mb=function eQc(a){return dOc(),V0b(RD(a,18))};var CZ=sfb(tEe,'NetworkSimplexPlacer/lambda$9$Type',1442);feb(1424,1,nEe,iQc);_.rg=function jQc(a){return RD(mQb(RD(a,36),(Ywc(),kwc)),21).Hc((ovc(),hvc))?fQc:null};_.Kf=function kQc(a,b){hQc(RD(a,36),b)};var fQc;var EZ=sfb(tEe,'SimpleNodePlacer',1424);feb(185,1,{185:1},sQc);_.Ib=function tQc(){var a;a='';this.c==(wQc(),vQc)?(a+=Oye):this.c==uQc&&(a+=Nye);this.o==(EQc(),CQc)?(a+=Zye):this.o==DQc?(a+='UP'):(a+='BALANCED');return a};var HZ=sfb(wEe,'BKAlignedLayout',185);feb(523,22,{3:1,34:1,22:1,523:1},xQc);var uQc,vQc;var FZ=tfb(wEe,'BKAlignedLayout/HDirection',523,WI,zQc,yQc);var AQc;feb(522,22,{3:1,34:1,22:1,522:1},FQc);var CQc,DQc;var GZ=tfb(wEe,'BKAlignedLayout/VDirection',522,WI,HQc,GQc);var IQc;feb(1699,1,{},MQc);var IZ=sfb(wEe,'BKAligner',1699);feb(1702,1,{},RQc);var LZ=sfb(wEe,'BKCompactor',1702);feb(663,1,{663:1},SQc);_.a=0;var JZ=sfb(wEe,'BKCompactor/ClassEdge',663);feb(467,1,{467:1},UQc);_.a=null;_.b=0;var KZ=sfb(wEe,'BKCompactor/ClassNode',467);feb(1427,1,nEe,aRc);_.rg=function eRc(a){return RD(mQb(RD(a,36),(Ywc(),kwc)),21).Hc((ovc(),hvc))?VQc:null};_.Kf=function fRc(a,b){_Qc(this,RD(a,36),b)};_.d=false;var VQc;var MZ=sfb(wEe,'BKNodePlacer',1427);feb(1700,1,{},hRc);_.d=0;var OZ=sfb(wEe,'NeighborhoodInformation',1700);feb(1701,1,fye,mRc);_.Ne=function nRc(a,b){return lRc(this,RD(a,42),RD(b,42))};_.Fb=function oRc(a){return this===a};_.Oe=function pRc(){return new Frb(this)};var NZ=sfb(wEe,'NeighborhoodInformation/NeighborComparator',1701);feb(823,1,{});var SZ=sfb(wEe,'ThresholdStrategy',823);feb(1825,823,{},uRc);_.wg=function vRc(a,b,c){return this.a.o==(EQc(),DQc)?oxe:pxe};_.xg=function wRc(){};var PZ=sfb(wEe,'ThresholdStrategy/NullThresholdStrategy',1825);feb(587,1,{587:1},xRc);_.c=false;_.d=false;var QZ=sfb(wEe,'ThresholdStrategy/Postprocessable',587);feb(1826,823,{},BRc);_.wg=function CRc(a,b,c){var d,e,f;e=b==c;d=this.a.a[c.p]==b;if(!(e||d)){return a}f=a;if(this.a.c==(wQc(),vQc)){e&&(f=yRc(this,b,true));!isNaN(f)&&!isFinite(f)&&d&&(f=yRc(this,c,false))}else{e&&(f=yRc(this,b,true));!isNaN(f)&&!isFinite(f)&&d&&(f=yRc(this,c,false))}return f};_.xg=function DRc(){var a,b,c,d,e;while(this.d.b!=0){e=RD(Tub(this.d),587);d=zRc(this,e);if(!d.a){continue}a=d.a;c=Heb(this.a.f[this.a.g[e.b.p].p]);if(!c&&!W0b(a)&&a.c.i.c==a.d.i.c){continue}b=ARc(this,e);b||Eyb(this.e,e)}while(this.e.a.c.length!=0){ARc(this,RD(Dyb(this.e),587))}};var RZ=sfb(wEe,'ThresholdStrategy/SimpleThresholdStrategy',1826);feb(645,1,{645:1,188:1,196:1},HRc);_.dg=function JRc(){return GRc(this)};_.qg=function IRc(){return GRc(this)};var ERc;var TZ=sfb(xEe,'EdgeRouterFactory',645);feb(1485,1,nEe,WRc);_.rg=function XRc(a){return URc(RD(a,36))};_.Kf=function YRc(a,b){VRc(RD(a,36),b)};var LRc,MRc,NRc,ORc,PRc,QRc,RRc,SRc;var UZ=sfb(xEe,'OrthogonalEdgeRouter',1485);feb(1478,1,nEe,lSc);_.rg=function mSc(a){return gSc(RD(a,36))};_.Kf=function nSc(a,b){iSc(this,RD(a,36),b)};var ZRc,$Rc,_Rc,aSc,bSc,cSc;var WZ=sfb(xEe,'PolylineEdgeRouter',1478);feb(1479,1,xye,pSc);_.Lb=function qSc(a){return oSc(RD(a,10))};_.Fb=function rSc(a){return this===a};_.Mb=function sSc(a){return oSc(RD(a,10))};var VZ=sfb(xEe,'PolylineEdgeRouter/1',1479);feb(1872,1,nwe,xSc);_.Mb=function ySc(a){return RD(a,132).c==(fTc(),dTc)};var XZ=sfb(yEe,'HyperEdgeCycleDetector/lambda$0$Type',1872);feb(1873,1,{},zSc);_.Ze=function ASc(a){return RD(a,132).d};var YZ=sfb(yEe,'HyperEdgeCycleDetector/lambda$1$Type',1873);feb(1874,1,nwe,BSc);_.Mb=function CSc(a){return RD(a,132).c==(fTc(),dTc)};var ZZ=sfb(yEe,'HyperEdgeCycleDetector/lambda$2$Type',1874);feb(1875,1,{},DSc);_.Ze=function ESc(a){return RD(a,132).d};var $Z=sfb(yEe,'HyperEdgeCycleDetector/lambda$3$Type',1875);feb(1876,1,{},FSc);_.Ze=function GSc(a){return RD(a,132).d};var _Z=sfb(yEe,'HyperEdgeCycleDetector/lambda$4$Type',1876);feb(1877,1,{},HSc);_.Ze=function ISc(a){return RD(a,132).d};var a$=sfb(yEe,'HyperEdgeCycleDetector/lambda$5$Type',1877);feb(118,1,{34:1,118:1},USc);_.Fd=function VSc(a){return KSc(this,RD(a,118))};_.Fb=function WSc(a){var b;if(ZD(a,118)){b=RD(a,118);return this.g==b.g}return false};_.Hb=function XSc(){return this.g};_.Ib=function ZSc(){var a,b,c,d;a=new dib('{');d=new Anb(this.n);while(d.a<d.c.c.length){c=RD(ynb(d),12);b=X2b(c.i);b==null&&(b='n'+$2b(c.i));a.a+=''+b;d.a<d.c.c.length&&(a.a+=',',a)}a.a+='}';return a.a};_.a=0;_.b=0;_.c=NaN;_.d=0;_.g=0;_.i=0;_.o=0;_.s=NaN;var l$=sfb(yEe,'HyperEdgeSegment',118);feb(132,1,{132:1},bTc);_.Ib=function cTc(){return this.a+'->'+this.b+' ('+os(this.c)+')'};_.d=0;var c$=sfb(yEe,'HyperEdgeSegmentDependency',132);feb(528,22,{3:1,34:1,22:1,528:1},gTc);var dTc,eTc;var b$=tfb(yEe,'HyperEdgeSegmentDependency/DependencyType',528,WI,iTc,hTc);var jTc;feb(1878,1,{},xTc);var k$=sfb(yEe,'HyperEdgeSegmentSplitter',1878);feb(1879,1,{},ATc);_.a=0;_.b=0;var d$=sfb(yEe,'HyperEdgeSegmentSplitter/AreaRating',1879);feb(339,1,{339:1},BTc);_.a=0;_.b=0;_.c=0;var e$=sfb(yEe,'HyperEdgeSegmentSplitter/FreeArea',339);feb(1880,1,fye,CTc);_.Ne=function DTc(a,b){return zTc(RD(a,118),RD(b,118))};_.Fb=function ETc(a){return this===a};_.Oe=function FTc(){return new Frb(this)};var f$=sfb(yEe,'HyperEdgeSegmentSplitter/lambda$0$Type',1880);feb(1881,1,Qve,GTc);_.Cd=function HTc(a){rTc(this.a,this.d,this.c,this.b,RD(a,118))};_.b=0;var g$=sfb(yEe,'HyperEdgeSegmentSplitter/lambda$1$Type',1881);feb(1882,1,{},ITc);_.Kb=function JTc(a){return new SDb(null,new Swb(RD(a,118).e,16))};var h$=sfb(yEe,'HyperEdgeSegmentSplitter/lambda$2$Type',1882);feb(1883,1,{},KTc);_.Kb=function LTc(a){return new SDb(null,new Swb(RD(a,118).j,16))};var i$=sfb(yEe,'HyperEdgeSegmentSplitter/lambda$3$Type',1883);feb(1884,1,{},MTc);_.Ye=function NTc(a){return Kfb(UD(a))};var j$=sfb(yEe,'HyperEdgeSegmentSplitter/lambda$4$Type',1884);feb(664,1,{},TTc);_.a=0;_.b=0;_.c=0;var o$=sfb(yEe,'OrthogonalRoutingGenerator',664);feb(1703,1,{},XTc);_.Kb=function YTc(a){return new SDb(null,new Swb(RD(a,118).e,16))};var m$=sfb(yEe,'OrthogonalRoutingGenerator/lambda$0$Type',1703);feb(1704,1,{},ZTc);_.Kb=function $Tc(a){return new SDb(null,new Swb(RD(a,118).j,16))};var n$=sfb(yEe,'OrthogonalRoutingGenerator/lambda$1$Type',1704);feb(670,1,{});var p$=sfb(zEe,'BaseRoutingDirectionStrategy',670);feb(1870,670,{},cUc);_.yg=function dUc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(!!a.r&&!a.q){return}k=b+a.o*c;for(j=new Anb(a.n);j.a<j.c.c.length;){i=RD(ynb(j),12);l=xjd(cD(WC(l3,1),Nve,8,0,[i.i.n,i.n,i.a])).a;for(h=new Anb(i.g);h.a<h.c.c.length;){g=RD(ynb(h),18);if(!W0b(g)){o=g.d;p=xjd(cD(WC(l3,1),Nve,8,0,[o.i.n,o.n,o.a])).a;if($wnd.Math.abs(l-p)>Vze){f=k;e=a;d=new rjd(l,f);Mub(g.a,d);_Tc(this,g,e,d,false);m=a.r;if(m){n=Kfb(UD(ju(m.e,0)));d=new rjd(n,f);Mub(g.a,d);_Tc(this,g,e,d,false);f=b+m.o*c;e=m;d=new rjd(n,f);Mub(g.a,d);_Tc(this,g,e,d,false)}d=new rjd(p,f);Mub(g.a,d);_Tc(this,g,e,d,false)}}}}};_.zg=function eUc(a){return a.i.n.a+a.n.a+a.a.a};_.Ag=function fUc(){return qpd(),npd};_.Bg=function gUc(){return qpd(),Yod};var q$=sfb(zEe,'NorthToSouthRoutingStrategy',1870);feb(1871,670,{},hUc);_.yg=function iUc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(!!a.r&&!a.q){return}k=b-a.o*c;for(j=new Anb(a.n);j.a<j.c.c.length;){i=RD(ynb(j),12);l=xjd(cD(WC(l3,1),Nve,8,0,[i.i.n,i.n,i.a])).a;for(h=new Anb(i.g);h.a<h.c.c.length;){g=RD(ynb(h),18);if(!W0b(g)){o=g.d;p=xjd(cD(WC(l3,1),Nve,8,0,[o.i.n,o.n,o.a])).a;if($wnd.Math.abs(l-p)>Vze){f=k;e=a;d=new rjd(l,f);Mub(g.a,d);_Tc(this,g,e,d,false);m=a.r;if(m){n=Kfb(UD(ju(m.e,0)));d=new rjd(n,f);Mub(g.a,d);_Tc(this,g,e,d,false);f=b-m.o*c;e=m;d=new rjd(n,f);Mub(g.a,d);_Tc(this,g,e,d,false)}d=new rjd(p,f);Mub(g.a,d);_Tc(this,g,e,d,false)}}}}};_.zg=function jUc(a){return a.i.n.a+a.n.a+a.a.a};_.Ag=function kUc(){return qpd(),Yod};_.Bg=function lUc(){return qpd(),npd};var r$=sfb(zEe,'SouthToNorthRoutingStrategy',1871);feb(1869,670,{},mUc);_.yg=function nUc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(!!a.r&&!a.q){return}k=b+a.o*c;for(j=new Anb(a.n);j.a<j.c.c.length;){i=RD(ynb(j),12);l=xjd(cD(WC(l3,1),Nve,8,0,[i.i.n,i.n,i.a])).b;for(h=new Anb(i.g);h.a<h.c.c.length;){g=RD(ynb(h),18);if(!W0b(g)){o=g.d;p=xjd(cD(WC(l3,1),Nve,8,0,[o.i.n,o.n,o.a])).b;if($wnd.Math.abs(l-p)>Vze){f=k;e=a;d=new rjd(f,l);Mub(g.a,d);_Tc(this,g,e,d,true);m=a.r;if(m){n=Kfb(UD(ju(m.e,0)));d=new rjd(f,n);Mub(g.a,d);_Tc(this,g,e,d,true);f=b+m.o*c;e=m;d=new rjd(f,n);Mub(g.a,d);_Tc(this,g,e,d,true)}d=new rjd(f,p);Mub(g.a,d);_Tc(this,g,e,d,true)}}}}};_.zg=function oUc(a){return a.i.n.b+a.n.b+a.a.b};_.Ag=function pUc(){return qpd(),Xod};_.Bg=function qUc(){return qpd(),ppd};var s$=sfb(zEe,'WestToEastRoutingStrategy',1869);feb(828,1,{},wUc);_.Ib=function xUc(){return Fe(this.a)};_.b=0;_.c=false;_.d=false;_.f=0;var u$=sfb(BEe,'NubSpline',828);feb(418,1,{418:1},AUc,BUc);var t$=sfb(BEe,'NubSpline/PolarCP',418);feb(1480,1,nEe,VUc);_.rg=function XUc(a){return QUc(RD(a,36))};_.Kf=function YUc(a,b){UUc(this,RD(a,36),b)};var CUc,DUc,EUc,FUc,GUc;var B$=sfb(BEe,'SplineEdgeRouter',1480);feb(274,1,{274:1},_Uc);_.Ib=function aVc(){return this.a+' ->('+this.c+') '+this.b};_.c=0;var v$=sfb(BEe,'SplineEdgeRouter/Dependency',274);feb(465,22,{3:1,34:1,22:1,465:1},eVc);var bVc,cVc;var w$=tfb(BEe,'SplineEdgeRouter/SideToProcess',465,WI,gVc,fVc);var hVc;feb(1481,1,nwe,jVc);_.Mb=function kVc(a){return HUc(),!RD(a,131).o};var x$=sfb(BEe,'SplineEdgeRouter/lambda$0$Type',1481);feb(1482,1,{},lVc);_.Ze=function mVc(a){return HUc(),RD(a,131).v+1};var y$=sfb(BEe,'SplineEdgeRouter/lambda$1$Type',1482);feb(1483,1,Qve,nVc);_.Cd=function oVc(a){SUc(this.a,this.b,RD(a,42))};var z$=sfb(BEe,'SplineEdgeRouter/lambda$2$Type',1483);feb(1484,1,Qve,pVc);_.Cd=function qVc(a){TUc(this.a,this.b,RD(a,42))};var A$=sfb(BEe,'SplineEdgeRouter/lambda$3$Type',1484);feb(131,1,{34:1,131:1},wVc,xVc);_.Fd=function yVc(a){return uVc(this,RD(a,131))};_.b=0;_.e=false;_.f=0;_.g=0;_.j=false;_.k=false;_.n=0;_.o=false;_.p=false;_.q=false;_.s=0;_.u=0;_.v=0;_.F=0;var D$=sfb(BEe,'SplineSegment',131);feb(468,1,{468:1},zVc);_.a=0;_.b=false;_.c=false;_.d=false;_.e=false;_.f=0;var C$=sfb(BEe,'SplineSegment/EdgeInformation',468);feb(1198,1,{},IVc);var F$=sfb(GEe,Lze,1198);feb(1199,1,fye,KVc);_.Ne=function LVc(a,b){return JVc(RD(a,121),RD(b,121))};_.Fb=function MVc(a){return this===a};_.Oe=function NVc(){return new Frb(this)};var E$=sfb(GEe,Mze,1199);feb(1197,1,{},TVc);var G$=sfb(GEe,'MrTree',1197);feb(405,22,{3:1,34:1,22:1,405:1,188:1,196:1},$Vc);_.dg=function aWc(){return ZVc(this)};_.qg=function _Vc(){return ZVc(this)};var UVc,VVc,WVc,XVc;var H$=tfb(GEe,'TreeLayoutPhases',405,WI,cWc,bWc);var dWc;feb(1112,205,oze,fWc);_.rf=function gWc(a,b){var c,d,e,f,g,h,i,j;Heb(TD(Gxd(a,(h_c(),S$c))))||RFb((c=new SFb((lud(),new zud(a))),c));g=b.eh(HEe);g.Ug('build tGraph',1);h=(i=new YWc,kQb(i,a),pQb(i,(q$c(),h$c),a),j=new Tsb,QVc(a,i,j),PVc(a,i,j),i);g.Vg();g=b.eh(HEe);g.Ug('Split graph',1);f=HVc(this.a,h);g.Vg();for(e=new Anb(f);e.a<e.c.c.length;){d=RD(ynb(e),121);RVc(this.b,d,b.eh(0.5999999940395355/f.c.length))}g=b.eh(HEe);g.Ug('Pack components',1);h=GVc(f);g.Vg();g=b.eh(HEe);g.Ug('Apply layout results',1);OVc(h);g.Vg()};var I$=sfb(GEe,'TreeLayoutProvider',1112);feb(1894,1,Vve,uWc);_.Jc=function vWc(a){xgb(this,a)};_.Kc=function wWc(){return yob(),Qob(),Pob};var J$=sfb(GEe,'TreeUtil/1',1894);feb(1895,1,Vve,xWc);_.Jc=function yWc(a){xgb(this,a)};_.Kc=function zWc(){return yob(),Qob(),Pob};var K$=sfb(GEe,'TreeUtil/2',1895);feb(1885,1,nwe,AWc);_.Mb=function BWc(a){return Heb(TD(mQb(RD(a,40),(q$c(),n$c))))};var L$=sfb(GEe,'TreeUtil/lambda$0$Type',1885);feb(1891,1,nwe,CWc);_.Mb=function DWc(a){return this.a.Hc(RD(a,40))};var M$=sfb(GEe,'TreeUtil/lambda$10$Type',1891);feb(1892,1,{},EWc);_.Kb=function FWc(a){return nWc(this.a,RD(a,40))};var N$=sfb(GEe,'TreeUtil/lambda$11$Type',1892);feb(1893,1,nwe,GWc);_.Mb=function HWc(a){return oWc(this.a,this.b,RD(a,40))};var O$=sfb(GEe,'TreeUtil/lambda$12$Type',1893);feb(1886,1,nwe,IWc);_.Mb=function JWc(a){return pWc(this.a,RD(a,65))};var P$=sfb(GEe,'TreeUtil/lambda$3$Type',1886);feb(1887,1,fye,KWc);_.Ne=function LWc(a,b){return qWc(RD(a,65),RD(b,65))};_.Fb=function MWc(a){return this===a};_.Oe=function NWc(){return new Frb(this)};var Q$=sfb(GEe,'TreeUtil/lambda$4$Type',1887);feb(1888,1,nwe,OWc);_.Mb=function PWc(a){return rWc(this.a,RD(a,65))};var R$=sfb(GEe,'TreeUtil/lambda$7$Type',1888);feb(1889,1,fye,QWc);_.Ne=function RWc(a,b){return sWc(RD(a,65),RD(b,65))};_.Fb=function SWc(a){return this===a};_.Oe=function TWc(){return new Frb(this)};var S$=sfb(GEe,'TreeUtil/lambda$8$Type',1889);feb(1890,1,{},UWc);_.Kb=function VWc(a){return RD(a,65).b};var T$=sfb(GEe,'TreeUtil/lambda$9$Type',1890);feb(508,137,{3:1,508:1,96:1,137:1});_.g=0;var V$=sfb(JEe,'TGraphElement',508);feb(65,508,{3:1,65:1,508:1,96:1,137:1},WWc);_.Ib=function XWc(){return !!this.b&&!!this.c?aXc(this.b)+'->'+aXc(this.c):'e_'+tb(this)};var U$=sfb(JEe,'TEdge',65);feb(121,137,{3:1,121:1,96:1,137:1},YWc);_.Ib=function ZWc(){var a,b,c,d,e;e=null;for(d=Sub(this.b,0);d.b!=d.d.c;){c=RD(evb(d),40);e+=(c.c==null||c.c.length==0?'n_'+c.g:'n_'+c.c)+'\n'}for(b=Sub(this.a,0);b.b!=b.d.c;){a=RD(evb(b),65);e+=(!!a.b&&!!a.c?aXc(a.b)+'->'+aXc(a.c):'e_'+tb(a))+'\n'}return e};var W$=sfb(JEe,'TGraph',121);feb(643,508,{3:1,508:1,643:1,96:1,137:1});var $$=sfb(JEe,'TShape',643);feb(40,643,{3:1,508:1,40:1,643:1,96:1,137:1},bXc);_.Ib=function cXc(){return aXc(this)};var Z$=sfb(JEe,'TNode',40);feb(236,1,Vve,dXc);_.Jc=function eXc(a){xgb(this,a)};_.Kc=function fXc(){var a;return a=Sub(this.a.d,0),new gXc(a)};var Y$=sfb(JEe,'TNode/2',236);feb(329,1,Ave,gXc);_.Nb=function hXc(a){Ztb(this,a)};_.Pb=function jXc(){return RD(evb(this.a),65).c};_.Ob=function iXc(){return dvb(this.a)};_.Qb=function kXc(){gvb(this.a)};var X$=sfb(JEe,'TNode/2/1',329);feb(1923,1,QAe,qXc);_.Kf=function DXc(a,b){oXc(this,RD(a,121),b)};var m_=sfb(LEe,'CompactionProcessor',1923);feb(1924,1,fye,EXc);_.Ne=function FXc(a,b){return rXc(this.a,RD(a,40),RD(b,40))};_.Fb=function GXc(a){return this===a};_.Oe=function HXc(){return new Frb(this)};var _$=sfb(LEe,'CompactionProcessor/lambda$0$Type',1924);feb(1925,1,nwe,IXc);_.Mb=function JXc(a){return sXc(this.b,this.a,RD(a,42))};_.a=0;_.b=0;var a_=sfb(LEe,'CompactionProcessor/lambda$1$Type',1925);feb(1934,1,fye,KXc);_.Ne=function LXc(a,b){return tXc(RD(a,40),RD(b,40))};_.Fb=function MXc(a){return this===a};_.Oe=function NXc(){return new Frb(this)};var b_=sfb(LEe,'CompactionProcessor/lambda$10$Type',1934);feb(1935,1,fye,OXc);_.Ne=function PXc(a,b){return uXc(RD(a,40),RD(b,40))};_.Fb=function QXc(a){return this===a};_.Oe=function RXc(){return new Frb(this)};var c_=sfb(LEe,'CompactionProcessor/lambda$11$Type',1935);feb(1936,1,fye,SXc);_.Ne=function TXc(a,b){return vXc(RD(a,40),RD(b,40))};_.Fb=function UXc(a){return this===a};_.Oe=function VXc(){return new Frb(this)};var d_=sfb(LEe,'CompactionProcessor/lambda$12$Type',1936);feb(1926,1,nwe,WXc);_.Mb=function XXc(a){return wXc(this.a,RD(a,42))};_.a=0;var e_=sfb(LEe,'CompactionProcessor/lambda$2$Type',1926);feb(1927,1,nwe,YXc);_.Mb=function ZXc(a){return xXc(this.a,RD(a,42))};_.a=0;var f_=sfb(LEe,'CompactionProcessor/lambda$3$Type',1927);feb(1928,1,nwe,$Xc);_.Mb=function _Xc(a){return RD(a,40).c.indexOf(IEe)==-1};var g_=sfb(LEe,'CompactionProcessor/lambda$4$Type',1928);feb(1929,1,{},aYc);_.Kb=function bYc(a){return yXc(this.a,RD(a,40))};_.a=0;var h_=sfb(LEe,'CompactionProcessor/lambda$5$Type',1929);feb(1930,1,{},cYc);_.Kb=function dYc(a){return zXc(this.a,RD(a,40))};_.a=0;var i_=sfb(LEe,'CompactionProcessor/lambda$6$Type',1930);feb(1931,1,fye,eYc);_.Ne=function fYc(a,b){return AXc(this.a,RD(a,240),RD(b,240))};_.Fb=function gYc(a){return this===a};_.Oe=function hYc(){return new Frb(this)};var j_=sfb(LEe,'CompactionProcessor/lambda$7$Type',1931);feb(1932,1,fye,iYc);_.Ne=function jYc(a,b){return BXc(this.a,RD(a,40),RD(b,40))};_.Fb=function kYc(a){return this===a};_.Oe=function lYc(){return new Frb(this)};var k_=sfb(LEe,'CompactionProcessor/lambda$8$Type',1932);feb(1933,1,fye,mYc);_.Ne=function nYc(a,b){return CXc(RD(a,40),RD(b,40))};_.Fb=function oYc(a){return this===a};_.Oe=function pYc(){return new Frb(this)};var l_=sfb(LEe,'CompactionProcessor/lambda$9$Type',1933);feb(1921,1,QAe,rYc);_.Kf=function sYc(a,b){qYc(RD(a,121),b)};var n_=sfb(LEe,'DirectionProcessor',1921);feb(1913,1,QAe,vYc);_.Kf=function xYc(a,b){uYc(this,RD(a,121),b)};var o_=sfb(LEe,'FanProcessor',1913);feb(1937,1,QAe,zYc);_.Kf=function CYc(a,b){yYc(RD(a,121),b)};var t_=sfb(LEe,'GraphBoundsProcessor',1937);feb(1938,1,{},DYc);_.Ye=function EYc(a){return RD(a,40).e.a};var p_=sfb(LEe,'GraphBoundsProcessor/lambda$0$Type',1938);feb(1939,1,{},FYc);_.Ye=function GYc(a){return RD(a,40).e.b};var q_=sfb(LEe,'GraphBoundsProcessor/lambda$1$Type',1939);feb(1940,1,{},HYc);_.Ye=function IYc(a){return AYc(RD(a,40))};var r_=sfb(LEe,'GraphBoundsProcessor/lambda$2$Type',1940);feb(1941,1,{},JYc);_.Ye=function KYc(a){return BYc(RD(a,40))};var s_=sfb(LEe,'GraphBoundsProcessor/lambda$3$Type',1941);feb(262,22,{3:1,34:1,22:1,262:1,196:1},XYc);_.dg=function YYc(){switch(this.g){case 0:return new DZc;case 1:return new vYc;case 2:return new nZc;case 3:return new tZc;case 4:return new gZc;case 8:return new cZc;case 5:return new rYc;case 6:return new AZc;case 7:return new qXc;case 9:return new zYc;case 10:return new GZc;default:throw Adb(new agb(lBe+(this.f!=null?this.f:''+this.g)));}};var LYc,MYc,NYc,OYc,PYc,QYc,RYc,SYc,TYc,UYc,VYc;var u_=tfb(LEe,mBe,262,WI,$Yc,ZYc);var _Yc;feb(1920,1,QAe,cZc);_.Kf=function dZc(a,b){bZc(RD(a,121),b)};var v_=sfb(LEe,'LevelCoordinatesProcessor',1920);feb(1918,1,QAe,gZc);_.Kf=function hZc(a,b){eZc(this,RD(a,121),b)};_.a=0;var x_=sfb(LEe,'LevelHeightProcessor',1918);feb(1919,1,Vve,iZc);_.Jc=function jZc(a){xgb(this,a)};_.Kc=function kZc(){return yob(),Qob(),Pob};var w_=sfb(LEe,'LevelHeightProcessor/1',1919);feb(1914,1,QAe,nZc);_.Kf=function oZc(a,b){lZc(this,RD(a,121),b)};var z_=sfb(LEe,'LevelProcessor',1914);feb(1915,1,nwe,pZc);_.Mb=function qZc(a){return Heb(TD(mQb(RD(a,40),(q$c(),n$c))))};var y_=sfb(LEe,'LevelProcessor/lambda$0$Type',1915);feb(1916,1,QAe,tZc);_.Kf=function uZc(a,b){rZc(this,RD(a,121),b)};_.a=0;var B_=sfb(LEe,'NeighborsProcessor',1916);feb(1917,1,Vve,vZc);_.Jc=function wZc(a){xgb(this,a)};_.Kc=function xZc(){return yob(),Qob(),Pob};var A_=sfb(LEe,'NeighborsProcessor/1',1917);feb(1922,1,QAe,AZc);_.Kf=function BZc(a,b){yZc(this,RD(a,121),b)};_.a=0;var C_=sfb(LEe,'NodePositionProcessor',1922);feb(1912,1,QAe,DZc);_.Kf=function EZc(a,b){CZc(this,RD(a,121),b)};var D_=sfb(LEe,'RootProcessor',1912);feb(1942,1,QAe,GZc);_.Kf=function HZc(a,b){FZc(RD(a,121),b)};var E_=sfb(LEe,'Untreeifyer',1942);feb(392,22,{3:1,34:1,22:1,392:1},MZc);var IZc,JZc,KZc;var F_=tfb(PEe,'EdgeRoutingMode',392,WI,OZc,NZc);var PZc;var RZc,SZc,TZc,UZc,VZc,WZc,XZc,YZc,ZZc,$Zc,_Zc,a$c,b$c,c$c,d$c,e$c,f$c,g$c,h$c,i$c,j$c,k$c,l$c,m$c,n$c,o$c,p$c;feb(862,1,Eye,C$c);_.hf=function D$c(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,REe),''),YEe),'Turns on Tree compaction which decreases the size of the whole tree by placing nodes of multiple levels in one large level'),(Geb(),false)),(kid(),cid)),QI),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,SEe),''),'Edge End Texture Length'),'Should be set to the length of the texture at the end of an edge. This value can be used to improve the Edge Routing.'),7),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,TEe),''),'Tree Level'),'The index for the tree level the node is in'),sgb(0)),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,UEe),''),YEe),'When set to a positive number this option will force the algorithm to place the node to the specified position within the trees layer if weighting is set to constraint'),sgb(-1)),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,VEe),''),'Weighting of Nodes'),'Which weighting to use when computing a node order.'),A$c),eid),J_),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,WEe),''),'Edge Routing Mode'),'Chooses an Edge Routing algorithm.'),u$c),eid),F_),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,XEe),''),'Search Order'),'Which search order to use when computing a spanning tree.'),x$c),eid),K_),xsb(Whd))));i_c((new j_c,a))};var r$c,s$c,t$c,u$c,v$c,w$c,x$c,y$c,z$c,A$c;var G_=sfb(PEe,'MrTreeMetaDataProvider',862);feb(1006,1,Eye,j_c);_.hf=function k_c(a){i_c(a)};var E$c,F$c,G$c,H$c,I$c,J$c,K$c,L$c,M$c,N$c,O$c,P$c,Q$c,R$c,S$c,T$c,U$c,V$c,W$c,X$c,Y$c,Z$c,$$c,_$c,a_c,b_c,c_c,d_c,e_c,f_c,g_c;var I_=sfb(PEe,'MrTreeOptions',1006);feb(1007,1,{},l_c);_.sf=function m_c(){var a;return a=new fWc,a};_.tf=function n_c(a){};var H_=sfb(PEe,'MrTreeOptions/MrtreeFactory',1007);feb(353,22,{3:1,34:1,22:1,353:1},t_c);var o_c,p_c,q_c,r_c;var J_=tfb(PEe,'OrderWeighting',353,WI,v_c,u_c);var w_c;feb(433,22,{3:1,34:1,22:1,433:1},B_c);var y_c,z_c;var K_=tfb(PEe,'TreeifyingOrder',433,WI,D_c,C_c);var E_c;feb(1486,1,nEe,N_c);_.rg=function O_c(a){return RD(a,121),G_c};_.Kf=function P_c(a,b){M_c(this,RD(a,121),b)};var G_c;var L_=sfb('org.eclipse.elk.alg.mrtree.p1treeify','DFSTreeifyer',1486);feb(1487,1,nEe,V_c);_.rg=function W_c(a){return RD(a,121),Q_c};_.Kf=function $_c(a,b){U_c(this,RD(a,121),b)};var Q_c;var T_=sfb(aFe,'NodeOrderer',1487);feb(1494,1,{},a0c);_.td=function b0c(a){return __c(a)};var M_=sfb(aFe,'NodeOrderer/0methodref$lambda$6$Type',1494);feb(1488,1,nwe,c0c);_.Mb=function d0c(a){return R_c(),Heb(TD(mQb(RD(a,40),(q$c(),n$c))))};var N_=sfb(aFe,'NodeOrderer/lambda$0$Type',1488);feb(1489,1,nwe,e0c);_.Mb=function f0c(a){return R_c(),RD(mQb(RD(a,40),(h_c(),W$c)),17).a<0};var O_=sfb(aFe,'NodeOrderer/lambda$1$Type',1489);feb(1490,1,nwe,g0c);_.Mb=function h0c(a){return X_c(this.a,RD(a,40))};var P_=sfb(aFe,'NodeOrderer/lambda$2$Type',1490);feb(1491,1,nwe,i0c);_.Mb=function j0c(a){return Y_c(this.a,RD(a,40))};var Q_=sfb(aFe,'NodeOrderer/lambda$3$Type',1491);feb(1492,1,fye,k0c);_.Ne=function l0c(a,b){return Z_c(RD(a,40),RD(b,40))};_.Fb=function m0c(a){return this===a};_.Oe=function n0c(){return new Frb(this)};var R_=sfb(aFe,'NodeOrderer/lambda$4$Type',1492);feb(1493,1,nwe,o0c);_.Mb=function p0c(a){return R_c(),RD(mQb(RD(a,40),(q$c(),XZc)),17).a!=0};var S_=sfb(aFe,'NodeOrderer/lambda$5$Type',1493);feb(1495,1,nEe,x0c);_.rg=function y0c(a){return RD(a,121),q0c};_.Kf=function z0c(a,b){v0c(this,RD(a,121),b)};_.b=0;var q0c;var U_=sfb('org.eclipse.elk.alg.mrtree.p3place','NodePlacer',1495);feb(1496,1,nEe,J0c);_.rg=function K0c(a){return RD(a,121),A0c};_.Kf=function Y0c(a,b){I0c(RD(a,121),b)};var A0c;var o0=sfb(bFe,'EdgeRouter',1496);feb(1498,1,fye,Z0c);_.Ne=function $0c(a,b){return hgb(RD(a,17).a,RD(b,17).a)};_.Fb=function _0c(a){return this===a};_.Oe=function a1c(){return new Frb(this)};var V_=sfb(bFe,'EdgeRouter/0methodref$compare$Type',1498);feb(1503,1,{},b1c);_.Ye=function c1c(a){return Kfb(UD(a))};var W_=sfb(bFe,'EdgeRouter/1methodref$doubleValue$Type',1503);feb(1505,1,fye,d1c);_.Ne=function e1c(a,b){return Qfb(Kfb(UD(a)),Kfb(UD(b)))};_.Fb=function f1c(a){return this===a};_.Oe=function g1c(){return new Frb(this)};var X_=sfb(bFe,'EdgeRouter/2methodref$compare$Type',1505);feb(1507,1,fye,h1c);_.Ne=function i1c(a,b){return Qfb(Kfb(UD(a)),Kfb(UD(b)))};_.Fb=function j1c(a){return this===a};_.Oe=function k1c(){return new Frb(this)};var Y_=sfb(bFe,'EdgeRouter/3methodref$compare$Type',1507);feb(1509,1,{},l1c);_.Ye=function m1c(a){return Kfb(UD(a))};var Z_=sfb(bFe,'EdgeRouter/4methodref$doubleValue$Type',1509);feb(1511,1,fye,n1c);_.Ne=function o1c(a,b){return Qfb(Kfb(UD(a)),Kfb(UD(b)))};_.Fb=function p1c(a){return this===a};_.Oe=function q1c(){return new Frb(this)};var $_=sfb(bFe,'EdgeRouter/5methodref$compare$Type',1511);feb(1513,1,fye,r1c);_.Ne=function s1c(a,b){return Qfb(Kfb(UD(a)),Kfb(UD(b)))};_.Fb=function t1c(a){return this===a};_.Oe=function u1c(){return new Frb(this)};var __=sfb(bFe,'EdgeRouter/6methodref$compare$Type',1513);feb(1497,1,{},v1c);_.Kb=function w1c(a){return B0c(),RD(mQb(RD(a,40),(h_c(),f_c)),17)};var a0=sfb(bFe,'EdgeRouter/lambda$0$Type',1497);feb(1508,1,{},x1c);_.Kb=function y1c(a){return L0c(RD(a,40))};var b0=sfb(bFe,'EdgeRouter/lambda$11$Type',1508);feb(1510,1,{},z1c);_.Kb=function A1c(a){return M0c(this.b,this.a,RD(a,40))};_.a=0;_.b=0;var c0=sfb(bFe,'EdgeRouter/lambda$13$Type',1510);feb(1512,1,{},B1c);_.Kb=function C1c(a){return N0c(this.b,this.a,RD(a,40))};_.a=0;_.b=0;var d0=sfb(bFe,'EdgeRouter/lambda$15$Type',1512);feb(1514,1,fye,D1c);_.Ne=function E1c(a,b){return O0c(RD(a,65),RD(b,65))};_.Fb=function F1c(a){return this===a};_.Oe=function G1c(){return new Frb(this)};var e0=sfb(bFe,'EdgeRouter/lambda$17$Type',1514);feb(1515,1,fye,H1c);_.Ne=function I1c(a,b){return P0c(RD(a,65),RD(b,65))};_.Fb=function J1c(a){return this===a};_.Oe=function K1c(){return new Frb(this)};var f0=sfb(bFe,'EdgeRouter/lambda$18$Type',1515);feb(1516,1,fye,L1c);_.Ne=function M1c(a,b){return Q0c(RD(a,65),RD(b,65))};_.Fb=function N1c(a){return this===a};_.Oe=function O1c(){return new Frb(this)};var g0=sfb(bFe,'EdgeRouter/lambda$19$Type',1516);feb(1499,1,nwe,P1c);_.Mb=function Q1c(a){return R0c(this.a,RD(a,40))};_.a=0;var h0=sfb(bFe,'EdgeRouter/lambda$2$Type',1499);feb(1517,1,fye,R1c);_.Ne=function S1c(a,b){return S0c(RD(a,65),RD(b,65))};_.Fb=function T1c(a){return this===a};_.Oe=function U1c(){return new Frb(this)};var i0=sfb(bFe,'EdgeRouter/lambda$20$Type',1517);feb(1500,1,fye,V1c);_.Ne=function W1c(a,b){return T0c(RD(a,40),RD(b,40))};_.Fb=function X1c(a){return this===a};_.Oe=function Y1c(){return new Frb(this)};var j0=sfb(bFe,'EdgeRouter/lambda$3$Type',1500);feb(1501,1,fye,Z1c);_.Ne=function $1c(a,b){return U0c(RD(a,40),RD(b,40))};_.Fb=function _1c(a){return this===a};_.Oe=function a2c(){return new Frb(this)};var k0=sfb(bFe,'EdgeRouter/lambda$4$Type',1501);feb(1502,1,{},b2c);_.Kb=function c2c(a){return V0c(RD(a,40))};var l0=sfb(bFe,'EdgeRouter/lambda$5$Type',1502);feb(1504,1,{},d2c);_.Kb=function e2c(a){return W0c(this.b,this.a,RD(a,40))};_.a=0;_.b=0;var m0=sfb(bFe,'EdgeRouter/lambda$7$Type',1504);feb(1506,1,{},f2c);_.Kb=function g2c(a){return X0c(this.b,this.a,RD(a,40))};_.a=0;_.b=0;var n0=sfb(bFe,'EdgeRouter/lambda$9$Type',1506);feb(675,1,{675:1},i2c);_.e=0;_.f=false;_.g=false;var r0=sfb(bFe,'MultiLevelEdgeNodeNodeGap',675);feb(1943,1,fye,l2c);_.Ne=function m2c(a,b){return j2c(RD(a,240),RD(b,240))};_.Fb=function n2c(a){return this===a};_.Oe=function o2c(){return new Frb(this)};var p0=sfb(bFe,'MultiLevelEdgeNodeNodeGap/lambda$0$Type',1943);feb(1944,1,fye,p2c);_.Ne=function q2c(a,b){return k2c(RD(a,240),RD(b,240))};_.Fb=function r2c(a){return this===a};_.Oe=function s2c(){return new Frb(this)};var q0=sfb(bFe,'MultiLevelEdgeNodeNodeGap/lambda$1$Type',1944);var t2c;feb(501,22,{3:1,34:1,22:1,501:1,188:1,196:1},z2c);_.dg=function B2c(){return y2c(this)};_.qg=function A2c(){return y2c(this)};var v2c,w2c;var s0=tfb(cFe,'RadialLayoutPhases',501,WI,D2c,C2c);var E2c;feb(1113,205,oze,H2c);_.rf=function I2c(a,b){var c,d,e,f,g,h;c=G2c(this,a);b.Ug('Radial layout',c.c.length);Heb(TD(Gxd(a,($4c(),N4c))))||RFb((d=new SFb((lud(),new zud(a))),d));h=K2c(a);Ixd(a,(u2c(),t2c),h);if(!h){throw Adb(new agb('The given graph is not a tree!'))}e=Kfb(UD(Gxd(a,S4c)));e==0&&(e=J2c(a));Ixd(a,S4c,e);for(g=new Anb(G2c(this,a));g.a<g.c.c.length;){f=RD(ynb(g),47);f.Kf(a,b.eh(1))}b.Vg()};var t0=sfb(cFe,'RadialLayoutProvider',1113);feb(556,1,fye,T2c);_.Ne=function U2c(a,b){return S2c(this.a,this.b,RD(a,27),RD(b,27))};_.Fb=function V2c(a){return this===a};_.Oe=function W2c(){return new Frb(this)};_.a=0;_.b=0;var u0=sfb(cFe,'RadialUtil/lambda$0$Type',556);feb(1395,1,QAe,Y2c);_.Kf=function Z2c(a,b){X2c(RD(a,27),b)};var v0=sfb(hFe,'CalculateGraphSize',1395);feb(1396,1,QAe,_2c);_.Kf=function a3c(a,b){$2c(RD(a,27))};var w0=sfb(hFe,'EdgeAngleCalculator',1396);feb(368,22,{3:1,34:1,22:1,368:1,196:1},h3c);_.dg=function i3c(){switch(this.g){case 0:return new Q3c;case 1:return new A3c;case 2:return new U3c;case 3:return new Y2c;case 4:return new _2c;default:throw Adb(new agb(lBe+(this.f!=null?this.f:''+this.g)));}};var b3c,c3c,d3c,e3c,f3c;var x0=tfb(hFe,mBe,368,WI,k3c,j3c);var l3c;feb(653,1,{});_.e=1;_.g=0;var y0=sfb(jFe,'AbstractRadiusExtensionCompaction',653);feb(1834,653,{},x3c);_.Cg=function y3c(a){var b,c,d,e,f,g,h,i,j;this.c=RD(Gxd(a,(u2c(),t2c)),27);r3c(this,this.c);this.d=u5c(RD(Gxd(a,($4c(),X4c)),300));i=RD(Gxd(a,H4c),17);!!i&&q3c(this,i.a);h=UD(Gxd(a,(umd(),fmd)));s3c(this,(uFb(h),h));j=Q2c(this.c);!!this.d&&this.d.Gg(j);t3c(this,j);g=new mob(cD(WC(J4,1),kFe,27,0,[this.c]));for(c=0;c<2;c++){for(b=0;b<j.c.length;b++){e=new mob(cD(WC(J4,1),kFe,27,0,[(tFb(b,j.c.length),RD(j.c[b],27))]));f=b<j.c.length-1?(tFb(b+1,j.c.length),RD(j.c[b+1],27)):(tFb(0,j.c.length),RD(j.c[0],27));d=b==0?RD(Vmb(j,j.c.length-1),27):(tFb(b-1,j.c.length),RD(j.c[b-1],27));v3c(this,(tFb(b,j.c.length),RD(j.c[b],27),g),d,f,e)}}};var z0=sfb(jFe,'AnnulusWedgeCompaction',1834);feb(1393,1,QAe,A3c);_.Kf=function B3c(a,b){z3c(RD(a,27),b)};var A0=sfb(jFe,'GeneralCompactor',1393);feb(1833,653,{},F3c);_.Cg=function G3c(a){var b,c,d,e;c=RD(Gxd(a,(u2c(),t2c)),27);this.f=c;this.b=u5c(RD(Gxd(a,($4c(),X4c)),300));e=RD(Gxd(a,H4c),17);!!e&&q3c(this,e.a);d=UD(Gxd(a,(umd(),fmd)));s3c(this,(uFb(d),d));b=Q2c(c);!!this.b&&this.b.Gg(b);D3c(this,b)};_.a=0;var B0=sfb(jFe,'RadialCompaction',1833);feb(1842,1,{},I3c);_.Dg=function J3c(a){var b,c,d,e,f,g;this.a=a;b=0;g=Q2c(a);d=0;for(f=new Anb(g);f.a<f.c.c.length;){e=RD(ynb(f),27);++d;for(c=d;c<g.c.length;c++){H3c(this,e,(tFb(c,g.c.length),RD(g.c[c],27)))&&(b+=1)}}return b};var C0=sfb(lFe,'CrossingMinimizationPosition',1842);feb(1840,1,{},K3c);_.Dg=function L3c(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;d=0;for(c=new is(Mr(zGd(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),74);h=AGd(RD(QHd((!b.c&&(b.c=new Yie(E4,b,5,8)),b.c),0),84));j=h.i+h.g/2;k=h.j+h.f/2;e=a.i+a.g/2;f=a.j+a.f/2;l=new pjd;l.a=j-e;l.b=k-f;g=new rjd(l.a,l.b);wid(g,a.g,a.f);l.a-=g.a;l.b-=g.b;e=j-l.a;f=k-l.b;i=new rjd(l.a,l.b);wid(i,h.g,h.f);l.a-=i.a;l.b-=i.b;j=e+l.a;k=f+l.b;m=j-e;n=k-f;d+=$wnd.Math.sqrt(m*m+n*n)}return d};var D0=sfb(lFe,'EdgeLengthOptimization',1840);feb(1841,1,{},M3c);_.Dg=function N3c(a){var b,c,d,e,f,g,h,i,j,k,l;d=0;for(c=new is(Mr(zGd(a).a.Kc(),new ir));gs(c);){b=RD(hs(c),74);h=AGd(RD(QHd((!b.c&&(b.c=new Yie(E4,b,5,8)),b.c),0),84));i=h.i+h.g/2;j=h.j+h.f/2;e=RD(Gxd(h,(umd(),Qld)),8);f=a.i+e.a+a.g/2;g=a.j+e.b+a.f;k=i-f;l=j-g;d+=$wnd.Math.sqrt(k*k+l*l)}return d};var E0=sfb(lFe,'EdgeLengthPositionOptimization',1841);feb(1392,653,QAe,Q3c);_.Kf=function R3c(a,b){P3c(this,RD(a,27),b)};var F0=sfb('org.eclipse.elk.alg.radial.intermediate.overlaps','RadiusExtensionOverlapRemoval',1392);feb(1394,1,QAe,U3c);_.Kf=function V3c(a,b){T3c(RD(a,27),b)};var G0=sfb('org.eclipse.elk.alg.radial.intermediate.rotation','GeneralRotator',1394);feb(434,22,{3:1,34:1,22:1,434:1},$3c);var W3c,X3c;var H0=tfb(nFe,'AnnulusWedgeCriteria',434,WI,a4c,_3c);var b4c;feb(393,22,{3:1,34:1,22:1,393:1},i4c);var d4c,e4c,f4c;var I0=tfb(nFe,uze,393,WI,k4c,j4c);var l4c;feb(863,1,Eye,E4c);_.hf=function F4c(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,oFe),''),'Center On Root'),'Centers the layout on the root of the tree i.e. so that the central node is also the center node of the final layout. This introduces additional whitespace.'),(Geb(),false)),(kid(),cid)),QI),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,pFe),''),'Order ID'),'The id can be used to define an order for nodes of one radius. This can be used to sort them in the layer accordingly.'),sgb(0)),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,qFe),''),'Radius'),'The radius option can be used to set the initial radius for the radial layouter.'),0),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,rFe),''),'Rotate'),'The rotate option determines whether a rotation of the layout should be performed.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,sFe),''),AFe),'With the compacter option it can be determined how compaction on the graph is done. It can be chosen between none, the radial compaction or the compaction of wedges separately.'),q4c),eid),I0),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,tFe),''),'Compaction Step Size'),'Determine the size of steps with which the compaction is done. Step size 1 correlates to a compaction of 1 pixel per Iteration.'),sgb(1)),gid),bJ),xsb(Whd))));zgd(a,tFe,sFe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,uFe),''),'Sorter'),'Sort the nodes per radius according to the sorting algorithm. The strategies are none, by the given order id, or sorting them by polar coordinates.'),A4c),eid),N0),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,vFe),''),'Annulus Wedge Criteria'),'Determine how the wedge for the node placement is calculated. It can be chosen between wedge determination by the number of leaves or by the maximum sum of diagonals.'),C4c),eid),H0),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,wFe),''),'Translation Optimization'),'Find the optimal translation of the nodes of the first radii according to this criteria. For example edge crossings can be minimized.'),s4c),eid),M0),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,xFe),BFe),'Target Angle'),'The angle in radians that the layout should be rotated to after layout.'),0),did),VI),xsb(Whd))));zgd(a,xFe,rFe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,yFe),BFe),'Additional Wedge Space'),'If set to true, modifies the target angle by rotating further such that space is left for an edge to pass in between the nodes. This option should only be used in conjunction with top-down layout.'),false),cid),QI),xsb(Whd))));zgd(a,yFe,rFe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,zFe),BFe),'Outgoing Edge Angles'),'Calculate the required angle of connected nodes to leave space for an incoming edge. This option should only be used in conjunction with top-down layout.'),false),cid),QI),xsb(Whd))));_4c((new a5c,a))};var n4c,o4c,p4c,q4c,r4c,s4c,t4c,u4c,v4c,w4c,x4c,y4c,z4c,A4c,B4c,C4c;var J0=sfb(nFe,'RadialMetaDataProvider',863);feb(1008,1,Eye,a5c);_.hf=function b5c(a){_4c(a)};var G4c,H4c,I4c,J4c,K4c,L4c,M4c,N4c,O4c,P4c,Q4c,R4c,S4c,T4c,U4c,V4c,W4c,X4c,Y4c,Z4c;var L0=sfb(nFe,'RadialOptions',1008);feb(1009,1,{},c5c);_.sf=function d5c(){var a;return a=new H2c,a};_.tf=function e5c(a){};var K0=sfb(nFe,'RadialOptions/RadialFactory',1009);feb(354,22,{3:1,34:1,22:1,354:1},l5c);var f5c,g5c,h5c,i5c;var M0=tfb(nFe,'RadialTranslationStrategy',354,WI,n5c,m5c);var o5c;feb(300,22,{3:1,34:1,22:1,300:1},v5c);var q5c,r5c,s5c;var N0=tfb(nFe,'SortingStrategy',300,WI,x5c,w5c);var y5c;feb(1476,1,nEe,D5c);_.rg=function E5c(a){return RD(a,27),null};_.Kf=function F5c(a,b){B5c(this,RD(a,27),b)};_.c=0;var O0=sfb('org.eclipse.elk.alg.radial.p1position','EadesRadial',1476);feb(1838,1,{},G5c);_.Eg=function H5c(a){return O2c(a)};var P0=sfb(DFe,'AnnulusWedgeByLeafs',1838);feb(1839,1,{},J5c);_.Eg=function K5c(a){return I5c(this,a)};var Q0=sfb(DFe,'AnnulusWedgeByNodeSpace',1839);feb(1477,1,nEe,N5c);_.rg=function O5c(a){return RD(a,27),null};_.Kf=function P5c(a,b){L5c(this,RD(a,27),b)};var R0=sfb('org.eclipse.elk.alg.radial.p2routing','StraightLineEdgeRouter',1477);feb(826,1,{},R5c);_.Fg=function S5c(a){};_.Gg=function U5c(a){Q5c(this,a)};var T0=sfb(EFe,'IDSorter',826);feb(1837,1,fye,V5c);_.Ne=function W5c(a,b){return T5c(RD(a,27),RD(b,27))};_.Fb=function X5c(a){return this===a};_.Oe=function Y5c(){return new Frb(this)};var S0=sfb(EFe,'IDSorter/lambda$0$Type',1837);feb(1836,1,{},_5c);_.Fg=function a6c(a){Z5c(this,a)};_.Gg=function b6c(a){var b;if(!a.dc()){if(!this.e){b=L2c(RD(a.Xb(0),27));Z5c(this,b)}Q5c(this.e,a)}};var U0=sfb(EFe,'PolarCoordinateSorter',1836);feb(445,22,{3:1,34:1,22:1,445:1},g6c);var c6c,d6c,e6c;var V0=tfb(IFe,'RectPackingLayoutPhases',445,WI,i6c,h6c);var j6c;feb(1118,205,oze,l6c);_.rf=function n6c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;b.Ug('Rectangle Packing',1);l=RD(Gxd(a,(X7c(),N7c)),107);i=Heb(TD(Gxd(a,G7c)));k=Kfb(UD(Gxd(a,Q7c)));C=Heb(TD(Gxd(a,R7c)));t=(!a.a&&(a.a=new C5d(J4,a,10,11)),a.a);Heb(TD(Gxd(a,J7c)))||RFb((e=new SFb((lud(),new zud(a))),e));B=false;if(C&&t.i>=3){v=RD(QHd(t,0),27);w=RD(QHd(t,1),27);f=0;while(f+2<t.i){u=v;v=w;w=RD(QHd(t,f+2),27);if(u.f>=v.f+w.f+k||w.f>=u.f+v.f+k){B=true;break}else{++f}}}else{B=true}if(!B){m=t.i;for(h=new dMd(t);h.e!=h.i.gc();){g=RD(bMd(h),27);Ixd(g,(umd(),Rld),sgb(m));--m}crd(a,new Oqd);b.Vg();return}c=(Sed(this.a),Ved(this.a,(f6c(),c6c),RD(Gxd(a,V7c),188)),Ved(this.a,d6c,RD(Gxd(a,M7c),188)),Ved(this.a,e6c,RD(Gxd(a,S7c),188)),Ped(this.a,(D=new ufd,pfd(D,c6c,(z6c(),y6c)),pfd(D,d6c,x6c),Heb(TD(Gxd(a,B7c)))&&pfd(D,c6c,w6c),D)),Qed(this.a,a));j=1/c.c.length;A=0;for(o=new Anb(c);o.a<o.c.c.length;){n=RD(ynb(o),47);if(b.$g()){return}n.Kf(a,b.eh(j));++A}q=0;p=0;for(s=new dMd(t);s.e!=s.i.gc();){r=RD(bMd(s),27);q=$wnd.Math.max(q,r.i+r.g);p=$wnd.Math.max(p,r.j+r.f)}Jsd(a,new rjd(Kfb(UD(Gxd(a,(X6c(),O6c)))),Kfb(UD(Gxd(a,N6c)))),new rjd(q,p));m6c(t,l);i||Esd(a,Kfb(UD(Gxd(a,O6c)))+(l.b+l.c),Kfb(UD(Gxd(a,N6c)))+(l.d+l.a),false,true);Heb(TD(Gxd(a,J7c)))||RFb((d=new SFb((lud(),new zud(a))),d));b.Vg()};var W0=sfb(IFe,'RectPackingLayoutProvider',1118);feb(1518,1,QAe,p6c);_.Kf=function r6c(a,b){o6c(RD(a,27),b)};var Y0=sfb(JFe,'InteractiveNodeReorderer',1518);feb(1519,1,fye,s6c);_.Ne=function t6c(a,b){return q6c(RD(a,27),RD(b,27))};_.Fb=function u6c(a){return this===a};_.Oe=function v6c(){return new Frb(this)};var X0=sfb(JFe,'InteractiveNodeReorderer/lambda$0$Type',1519);feb(456,22,{3:1,34:1,22:1,456:1,196:1},A6c);_.dg=function B6c(){switch(this.g){case 0:return new p6c;case 1:return new K6c;case 2:return new H6c;}return null};var w6c,x6c,y6c;var Z0=tfb(JFe,mBe,456,WI,D6c,C6c);var E6c;feb(1521,1,QAe,H6c);_.Kf=function I6c(a,b){G6c(RD(a,27),b)};var $0=sfb(JFe,'MinSizePostProcessor',1521);feb(1520,1,QAe,K6c);_.Kf=function L6c(a,b){J6c(RD(a,27),b)};var _0=sfb(JFe,'MinSizePreProcessor',1520);var M6c,N6c,O6c,P6c,Q6c,R6c,S6c,T6c,U6c,V6c,W6c;feb(394,22,{3:1,34:1,22:1,394:1},a7c);var Y6c,Z6c,$6c;var a1=tfb(KFe,'OptimizationGoal',394,WI,c7c,b7c);var d7c;feb(867,1,Eye,v7c);_.hf=function w7c(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,LFe),''),'Try box layout first'),'Whether one should check whether the regions are stackable to see whether box layout would do the job. For example, nodes with the same height are not stackable inside a row. Therefore, box layout will perform better and faster.'),(Geb(),false)),(kid(),cid)),QI),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,MFe),''),'Current position of a node in the order of nodes'),'The rectangles are ordered. Normally according to their definition the the model. This option specifies the current position of a node.'),sgb(-1)),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,NFe),''),'Desired index of node'),'The rectangles are ordered. Normally according to their definition the the model. This option allows to specify a desired position that has preference over the original position.'),sgb(-1)),gid),bJ),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,OFe),''),'In new Row'),'If set to true this node begins in a new row. Consequently this node cannot be moved in a previous layer during compaction. Width approximation does does not take this into account.'),false),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,PFe),XFe),'Width Approximation Strategy'),'Strategy for finding an initial width of the drawing.'),s7c),eid),l1),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,QFe),XFe),'Target Width'),'Option to place the rectangles in the given target width instead of approximating the width using the desired aspect ratio. The padding is not included in this. Meaning a drawing will have width of targetwidth + horizontal padding.'),-1),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,RFe),XFe),'Optimization Goal'),'Optimization goal for approximation of the bounding box given by the first iteration. Determines whether layout is sorted by the maximum scaling, aspect ratio, or area. Depending on the strategy the aspect ratio might be nearly ignored.'),q7c),eid),a1),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,SFe),XFe),'Shift Last Placed.'),'When placing a rectangle behind or below the last placed rectangle in the first iteration, it is sometimes possible to shift the rectangle further to the left or right, resulting in less whitespace. True (default) enables the shift and false disables it. Disabling the shift produces a greater approximated area by the first iteration and a layout, when using ONLY the first iteration (default not the case), where it is sometimes impossible to implement a size transformation of rectangles that will fill the bounding box and eliminate empty spaces.'),true),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,TFe),'packing'),YFe),'Strategy for finding an initial placement on nodes.'),l7c),eid),o1),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,UFe),ZFe),'Row Height Reevaluation'),'During the compaction step the height of a row is normally not changed. If this options is set, the blocks of other rows might be added if they exceed the row height. If this is the case the whole row has to be packed again to be optimal regarding the new row height. This option should, therefore, be used with care since it might be computation heavy.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,VFe),ZFe),'Compaction iterations'),'Defines the number of compaction iterations. E.g. if set to 2 the width is initially approximated, then the drawing is compacted and based on the resulting drawing the target width is decreased or increased and a second compaction step is executed and the result compared to the first one. The best run is used based on the scale measure.'),sgb(1)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,WFe),'whiteSpaceElimination'),'White Space Approximation Strategy'),'Strategy for expanding nodes such that whitespace in the parent is eliminated.'),eid),t1),xsb(Whd))));Y7c((new Z7c,a))};var f7c,g7c,h7c,i7c,j7c,k7c,l7c,m7c,n7c,o7c,p7c,q7c,r7c,s7c,t7c;var b1=sfb(KFe,'RectPackingMetaDataProvider',867);feb(1016,1,Eye,Z7c);_.hf=function $7c(a){Y7c(a)};var x7c,y7c,z7c,A7c,B7c,C7c,D7c,E7c,F7c,G7c,H7c,I7c,J7c,K7c,L7c,M7c,N7c,O7c,P7c,Q7c,R7c,S7c,T7c,U7c,V7c,W7c;var d1=sfb(KFe,'RectPackingOptions',1016);feb(1017,1,{},_7c);_.sf=function a8c(){var a;return a=new l6c,a};_.tf=function b8c(a){};var c1=sfb(KFe,'RectPackingOptions/RectpackingFactory',1017);feb(1705,1,{},g8c);_.a=0;_.c=false;var e1=sfb(_Fe,'AreaApproximation',1705);var h1=ufb(_Fe,'BestCandidateFilter');feb(673,1,{535:1},h8c);_.Hg=function i8c(a,b,c){var d,e,f,g,h,i;i=new bnb;f=oxe;for(h=new Anb(a);h.a<h.c.c.length;){g=RD(ynb(h),238);f=$wnd.Math.min(f,(g.c+(c.b+c.c))*(g.b+(c.d+c.a)))}for(e=new Anb(a);e.a<e.c.c.length;){d=RD(ynb(e),238);(d.c+(c.b+c.c))*(d.b+(c.d+c.a))==f&&(ZEb(i.c,d),true)}return i};var f1=sfb(_Fe,'AreaFilter',673);feb(674,1,{535:1},j8c);_.Hg=function k8c(a,b,c){var d,e,f,g,h,i;h=new bnb;i=oxe;for(g=new Anb(a);g.a<g.c.c.length;){f=RD(ynb(g),238);i=$wnd.Math.min(i,$wnd.Math.abs((f.c+(c.b+c.c))/(f.b+(c.d+c.a))-b))}for(e=new Anb(a);e.a<e.c.c.length;){d=RD(ynb(e),238);$wnd.Math.abs((d.c+(c.b+c.c))/(d.b+(c.d+c.a))-b)==i&&(ZEb(h.c,d),true)}return h};var g1=sfb(_Fe,'AspectRatioFilter',674);feb(1469,1,nEe,o8c);_.rg=function p8c(a){return RD(a,27),null};_.Kf=function q8c(a,b){n8c(RD(a,27),b)};var i1=sfb(_Fe,'GreedyWidthApproximator',1469);feb(672,1,{535:1},r8c);_.Hg=function s8c(a,b,c){var d,e,f,g,h,i;i=new bnb;f=pxe;for(h=new Anb(a);h.a<h.c.c.length;){g=RD(ynb(h),238);f=$wnd.Math.max(f,Aad(g.c+(c.b+c.c),g.b+(c.d+c.a),g.a))}for(e=new Anb(a);e.a<e.c.c.length;){d=RD(ynb(e),238);Aad(d.c+(c.b+c.c),d.b+(c.d+c.a),d.a)==f&&(ZEb(i.c,d),true)}return i};var j1=sfb(_Fe,'ScaleMeasureFilter',672);feb(1470,1,nEe,u8c);_.rg=function v8c(a){return RD(a,27),null};_.Kf=function w8c(a,b){t8c(RD(a,27),b)};var k1=sfb(_Fe,'TargetWidthWidthApproximator',1470);feb(491,22,{3:1,34:1,22:1,491:1,188:1,196:1},B8c);_.dg=function D8c(){return A8c(this)};_.qg=function C8c(){return A8c(this)};var x8c,y8c;var l1=tfb(_Fe,'WidthApproximationStrategy',491,WI,F8c,E8c);var G8c;feb(1471,1,nEe,R8c);_.rg=function S8c(a){return RD(a,27),null};_.Kf=function T8c(a,b){Q8c(this,RD(a,27),b)};var m1=sfb(aGe,'Compactor',1471);feb(1473,1,nEe,X8c);_.rg=function Y8c(a){return RD(a,27),null};_.Kf=function Z8c(a,b){W8c(RD(a,27),b)};var n1=sfb(aGe,'NoPlacement',1473);feb(439,22,{3:1,34:1,22:1,439:1,188:1,196:1},d9c);_.dg=function f9c(){return c9c(this)};_.qg=function e9c(){return c9c(this)};var $8c,_8c,a9c;var o1=tfb(aGe,'PackingStrategy',439,WI,h9c,g9c);var i9c;feb(810,1,{},m9c);_.a=0;_.b=0;_.c=0;_.d=oxe;_.e=0;_.f=oxe;var p1=sfb(aGe,'RowFillingAndCompaction',810);feb(1472,1,nEe,o9c);_.rg=function p9c(a){return RD(a,27),null};_.Kf=function q9c(a,b){n9c(RD(a,27),b)};var q1=sfb(aGe,'SimplePlacement',1472);feb(1474,1,nEe,s9c);_.rg=function t9c(a){return RD(a,27),null};_.Kf=function u9c(a,b){this.Ig(RD(a,27),b)};_.Ig=function v9c(a,b){r9c(a,b)};var r1=sfb(cGe,'EqualWhitespaceEliminator',1474);feb(1475,1474,nEe,x9c);_.Ig=function y9c(a,b){var c,d,e,f,g;b.Ug('To Aspect Ratio Whitesapce Eliminator',1);g=Kfb(UD(Gxd(a,(X6c(),O6c))));f=Kfb(UD(Gxd(a,N6c)));e=Kfb(UD(Gxd(a,(X7c(),x7c))));c=Kfb(UD(Gxd(a,M6c)));d=g/f;if(d<e){g=f*e;Ixd(a,O6c,g)}else{c+=g/e-f;Ixd(a,M6c,c);Ixd(a,N6c,f+c)}r9c(a,b);b.Vg()};var s1=sfb(cGe,'ToAspectratioNodeExpander',1475);feb(492,22,{3:1,34:1,22:1,492:1,188:1,196:1},D9c);_.dg=function F9c(){return C9c(this)};_.qg=function E9c(){return C9c(this)};var z9c,A9c;var t1=tfb(cGe,'WhiteSpaceEliminationStrategy',492,WI,H9c,G9c);var I9c;feb(172,1,{172:1},V9c);_.a=0;_.c=false;_.d=0;_.e=0;_.f=0;_.g=0;_.i=0;_.k=false;_.o=oxe;_.p=oxe;_.r=0;_.s=0;_.t=0;var w1=sfb(dGe,'Block',172);feb(209,1,{209:1},_9c);_.a=0;_.b=0;_.d=0;_.e=0;_.f=0;var u1=sfb(dGe,'BlockRow',209);feb(315,1,{315:1},had);_.b=0;_.c=0;_.d=0;_.e=0;_.f=0;var v1=sfb(dGe,'BlockStack',315);feb(238,1,{238:1},lad,mad);_.a=0;_.b=0;_.c=0;_.d=0;_.e=0;_.g=0;var y1=sfb(dGe,'DrawingData',238);feb(373,22,{3:1,34:1,22:1,373:1},tad);var nad,oad,pad,qad,rad;var x1=tfb(dGe,'DrawingDataDescriptor',373,WI,vad,uad);var wad;feb(186,1,{186:1},Had);_.b=0;_.c=0;_.e=0;_.f=0;var z1=sfb(dGe,'RectRow',186);feb(763,1,{},Pad);_.j=0;var F1=sfb(fGe,dBe,763);feb(1209,1,{},Qad);_.af=function Rad(a){return bjd(a.a,a.b)};var A1=sfb(fGe,Nze,1209);feb(1210,1,{},Sad);_.af=function Tad(a){return Kad(this.a,a)};var B1=sfb(fGe,eBe,1210);feb(1211,1,{},Uad);_.af=function Vad(a){return Lad(this.a,a)};var C1=sfb(fGe,fBe,1211);feb(1212,1,{},Wad);_.af=function Xad(a){return Mad(this.a,a)};var D1=sfb(fGe,'ElkGraphImporter/lambda$3$Type',1212);feb(1213,1,{},Yad);_.af=function Zad(a){return Nad(this.a,a)};var E1=sfb(fGe,gBe,1213);feb(1115,205,oze,$ad);_.rf=function abd(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;if(Hxd(a,(ncd(),mcd))){n=WD(Gxd(a,(Tcd(),Scd)));f=sgd(ygd(),n);if(f){g=RD(ltd(f.f),205);g.rf(a,b.eh(1))}}Ixd(a,hcd,(Mbd(),Kbd));Ixd(a,icd,(Xbd(),Ubd));Ixd(a,jcd,(ldd(),kdd));h=RD(Gxd(a,(Tcd(),Ocd)),17).a;b.Ug('Overlap removal',1);Heb(TD(Gxd(a,Ncd)))&&'null45scanlineOverlaps';i=new _sb;j=new cbd(i);d=new Pad;c=Jad(d,a);k=true;e=0;while(e<h&&k){if(Heb(TD(Gxd(a,Pcd)))){i.a.$b();VQb(new WQb(j),c.i);if(i.a.gc()==0){break}c.e=i}Sed(this.b);Ved(this.b,(gbd(),dbd),(_cd(),$cd));Ved(this.b,ebd,c.g);Ved(this.b,fbd,(Cbd(),Bbd));this.a=Qed(this.b,c);for(m=new Anb(this.a);m.a<m.c.c.length;){l=RD(ynb(m),47);l.Kf(c,b.eh(1))}Oad(d,c);k=Heb(TD(mQb(c,(OQb(),NQb))));++e}Iad(d,c);b.Vg()};var H1=sfb(fGe,'OverlapRemovalLayoutProvider',1115);feb(1116,1,{},cbd);var G1=sfb(fGe,'OverlapRemovalLayoutProvider/lambda$0$Type',1116);feb(444,22,{3:1,34:1,22:1,444:1},hbd);var dbd,ebd,fbd;var I1=tfb(fGe,'SPOrEPhases',444,WI,jbd,ibd);var kbd;feb(1219,1,{},nbd);var K1=sfb(fGe,'ShrinkTree',1219);feb(1117,205,oze,obd);_.rf=function pbd(a,b){var c,d,e,f,g;if(Hxd(a,(ncd(),mcd))){g=WD(Gxd(a,mcd));e=sgd(ygd(),g);if(e){f=RD(ltd(e.f),205);f.rf(a,b.eh(1))}}d=new Pad;c=Jad(d,a);mbd(this.a,c,b.eh(1));Iad(d,c)};var J1=sfb(fGe,'ShrinkTreeLayoutProvider',1117);feb(306,137,{3:1,306:1,96:1,137:1},qbd);_.c=false;var L1=sfb('org.eclipse.elk.alg.spore.graph','Graph',306);feb(490,22,{3:1,34:1,22:1,490:1,188:1,196:1},ubd);_.dg=function wbd(){return tbd(this)};_.qg=function vbd(){return tbd(this)};var rbd;var M1=tfb(gGe,uze,490,WI,ybd,xbd);var zbd;feb(558,22,{3:1,34:1,22:1,558:1,188:1,196:1},Dbd);_.dg=function Fbd(){return new Tdd};_.qg=function Ebd(){return new Tdd};var Bbd;var N1=tfb(gGe,'OverlapRemovalStrategy',558,WI,Hbd,Gbd);var Ibd;feb(438,22,{3:1,34:1,22:1,438:1},Nbd);var Kbd,Lbd;var O1=tfb(gGe,'RootSelection',438,WI,Pbd,Obd);var Qbd;feb(324,22,{3:1,34:1,22:1,324:1},Ybd);var Sbd,Tbd,Ubd,Vbd,Wbd;var P1=tfb(gGe,'SpanningTreeCostFunction',324,WI,$bd,Zbd);var _bd;feb(1014,1,Eye,pcd);_.hf=function qcd(a){ocd(a)};var bcd,ccd,dcd,ecd,fcd,gcd,hcd,icd,jcd,kcd,lcd,mcd;var R1=sfb(gGe,'SporeCompactionOptions',1014);feb(1015,1,{},rcd);_.sf=function scd(){var a;return a=new obd,a};_.tf=function tcd(a){};var Q1=sfb(gGe,'SporeCompactionOptions/SporeCompactionFactory',1015);feb(866,1,Eye,Lcd);_.hf=function Mcd(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,iGe),''),'Underlying Layout Algorithm'),'A layout algorithm that is applied to the graph before it is compacted. If this is null, nothing is applied before compaction.'),(kid(),iid)),qJ),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,nGe),'structure'),'Structure Extraction Strategy'),'This option defines what kind of triangulation or other partitioning of the plane is applied to the vertices.'),Icd),eid),V1),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,jGe),sGe),'Tree Construction Strategy'),'Whether a minimum spanning tree or a maximum spanning tree should be constructed.'),Gcd),eid),W1),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,kGe),sGe),'Cost Function for Spanning Tree'),'The cost function is used in the creation of the spanning tree.'),Ecd),eid),P1),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,lGe),sGe),'Root node for spanning tree construction'),'The identifier of the node that is preferred as the root of the spanning tree. If this is null, the first node is chosen.'),null),iid),qJ),xsb(Whd))));zgd(a,lGe,mGe,Acd);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,mGe),sGe),'Root selection for spanning tree'),'This sets the method used to select a root node for the construction of a spanning tree'),Ccd),eid),O1),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,oGe),nDe),YFe),'This option defines how the compaction is applied.'),vcd),eid),M1),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,pGe),nDe),'Orthogonal Compaction'),'Restricts the translation of nodes to orthogonal directions in the compaction phase.'),(Geb(),false)),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,qGe),tGe),'Upper limit for iterations of overlap removal'),null),sgb(64)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,rGe),tGe),'Whether to run a supplementary scanline overlap check.'),null),true),cid),QI),xsb(Whd))));Ucd((new Vcd,a));ocd((new pcd,a))};var ucd,vcd,wcd,xcd,ycd,zcd,Acd,Bcd,Ccd,Dcd,Ecd,Fcd,Gcd,Hcd,Icd,Jcd;var S1=sfb(gGe,'SporeMetaDataProvider',866);feb(1012,1,Eye,Vcd);_.hf=function Wcd(a){Ucd(a)};var Ncd,Ocd,Pcd,Qcd,Rcd,Scd;var U1=sfb(gGe,'SporeOverlapRemovalOptions',1012);feb(1013,1,{},Xcd);_.sf=function Ycd(){var a;return a=new $ad,a};_.tf=function Zcd(a){};var T1=sfb(gGe,'SporeOverlapRemovalOptions/SporeOverlapFactory',1013);feb(539,22,{3:1,34:1,22:1,539:1,188:1,196:1},cdd);_.dg=function edd(){return bdd(this)};_.qg=function ddd(){return bdd(this)};var $cd;var V1=tfb(gGe,'StructureExtractionStrategy',539,WI,gdd,fdd);var hdd;feb(437,22,{3:1,34:1,22:1,437:1,188:1,196:1},ndd);_.dg=function pdd(){return mdd(this)};_.qg=function odd(){return mdd(this)};var jdd,kdd;var W1=tfb(gGe,'TreeConstructionStrategy',437,WI,rdd,qdd);var sdd;feb(1463,1,nEe,vdd);_.rg=function wdd(a){return RD(a,306),new ufd};_.Kf=function xdd(a,b){udd(RD(a,306),b)};var Y1=sfb(vGe,'DelaunayTriangulationPhase',1463);feb(1464,1,Qve,ydd);_.Cd=function zdd(a){Rmb(this.a,RD(a,68).a)};var X1=sfb(vGe,'DelaunayTriangulationPhase/lambda$0$Type',1464);feb(794,1,nEe,Ddd);_.rg=function Edd(a){return RD(a,306),new ufd};_.Kf=function Fdd(a,b){this.Jg(RD(a,306),b)};_.Jg=function Gdd(a,b){var c,d,e;b.Ug('Minimum spanning tree construction',1);a.d?(d=a.d.a):(d=RD(Vmb(a.i,0),68).a);Heb(TD(mQb(a,(OQb(),MQb))))?(e=LFb(a.e,d,(c=a.b,c))):(e=LFb(a.e,d,a.b));Bdd(this,e,a);b.Vg()};var a2=sfb(wGe,'MinSTPhase',794);feb(1466,794,nEe,Hdd);_.Jg=function Jdd(a,b){var c,d,e,f;b.Ug('Maximum spanning tree construction',1);c=new Kdd(a);a.d?(e=a.d.c):(e=RD(Vmb(a.i,0),68).c);Heb(TD(mQb(a,(OQb(),MQb))))?(f=LFb(a.e,e,(d=c,d))):(f=LFb(a.e,e,c));Bdd(this,f,a);b.Vg()};var $1=sfb(wGe,'MaxSTPhase',1466);feb(1467,1,{},Kdd);_.af=function Ldd(a){return Idd(this.a,a)};var Z1=sfb(wGe,'MaxSTPhase/lambda$0$Type',1467);feb(1465,1,Qve,Mdd);_.Cd=function Ndd(a){Cdd(this.a,RD(a,68))};var _1=sfb(wGe,'MinSTPhase/lambda$0$Type',1465);feb(796,1,nEe,Tdd);_.rg=function Udd(a){return RD(a,306),new ufd};_.Kf=function Vdd(a,b){Sdd(this,RD(a,306),b)};_.a=false;var c2=sfb(xGe,'GrowTreePhase',796);feb(797,1,Qve,Wdd);_.Cd=function Xdd(a){Rdd(this.a,this.b,this.c,RD(a,225))};var b2=sfb(xGe,'GrowTreePhase/lambda$0$Type',797);feb(1468,1,nEe,_dd);_.rg=function aed(a){return RD(a,306),new ufd};_.Kf=function bed(a,b){$dd(this,RD(a,306),b)};var e2=sfb(xGe,'ShrinkTreeCompactionPhase',1468);feb(795,1,Qve,ced);_.Cd=function ded(a){Zdd(this.a,this.b,this.c,RD(a,225))};var d2=sfb(xGe,'ShrinkTreeCompactionPhase/lambda$0$Type',795);var j4=ufb(jEe,'IGraphElementVisitor');feb(872,1,{536:1},med);_.Kg=function ped(a){var b;b=led(this,a);kQb(b,RD(Wjb(this.b,a),96));jed(this,a,b)};var eed,fed,ged;var l2=sfb(pze,'LayoutConfigurator',872);var g2=ufb(pze,'LayoutConfigurator/IPropertyHolderOptionFilter');feb(944,1,{2032:1},qed);_.Lg=function red(a,b){return hed(),!a.pf(b)};var h2=sfb(pze,'LayoutConfigurator/lambda$0$Type',944);feb(943,1,{845:1},sed);_.Mg=function ted(a,b){return hed(),!a.pf(b)};var i2=sfb(pze,'LayoutConfigurator/lambda$1$Type',943);feb(945,1,{2032:1},ved);_.Lg=function wed(a,b){return ued(a,b)};var j2=sfb(pze,'LayoutConfigurator/lambda$2$Type',945);feb(946,1,nwe,xed);_.Mb=function yed(a){return oed(this.a,this.b,RD(a,2032))};var k2=sfb(pze,'LayoutConfigurator/lambda$3$Type',946);feb(869,1,{},Hed);var m2=sfb(pze,'RecursiveGraphLayoutEngine',869);feb(224,63,swe,Ied,Jed);var n2=sfb(pze,'UnsupportedConfigurationException',224);feb(370,63,swe,Ked);var o2=sfb(pze,'UnsupportedGraphException',370);feb(761,1,{});var N3=sfb(jEe,'AbstractRandomListAccessor',761);feb(450,761,{},Wed);_.Ng=function Yed(){return null};_.d=true;_.e=true;_.f=0;var u2=sfb(AGe,'AlgorithmAssembler',450);feb(1200,1,nwe,Zed);_.Mb=function $ed(a){return !!RD(a,106)};var p2=sfb(AGe,'AlgorithmAssembler/lambda$0$Type',1200);feb(1201,1,{},_ed);_.Kb=function afd(a){return Xed(this.a,RD(a,106))};var q2=sfb(AGe,'AlgorithmAssembler/lambda$1$Type',1201);feb(1202,1,nwe,bfd);_.Mb=function cfd(a){return !!RD(a,80)};var r2=sfb(AGe,'AlgorithmAssembler/lambda$2$Type',1202);feb(1203,1,Qve,dfd);_.Cd=function efd(a){ofd(this.a,RD(a,80))};var s2=sfb(AGe,'AlgorithmAssembler/lambda$3$Type',1203);feb(1204,1,Qve,ffd);_.Cd=function gfd(a){Red(this.a,this.b,RD(a,196))};var t2=sfb(AGe,'AlgorithmAssembler/lambda$4$Type',1204);feb(1343,1,fye,ifd);_.Ne=function jfd(a,b){return hfd(RD(a,196),RD(b,196))};_.Fb=function kfd(a){return this===a};_.Oe=function lfd(){return new Frb(this)};var v2=sfb(AGe,'EnumBasedFactoryComparator',1343);feb(80,761,{80:1},ufd);_.Ng=function wfd(){return new _sb};_.a=0;var w2=sfb(AGe,'LayoutProcessorConfiguration',80);feb(1025,1,{536:1},Bfd);_.Kg=function Ffd(a){Bvb(yfd,new Kfd(a))};var xfd,yfd,zfd;var A2=sfb(zye,'DeprecatedLayoutOptionReplacer',1025);feb(1026,1,Qve,Gfd);_.Cd=function Hfd(a){Cfd(RD(a,167))};var x2=sfb(zye,'DeprecatedLayoutOptionReplacer/lambda$0$Type',1026);feb(1027,1,Qve,Ifd);_.Cd=function Jfd(a){Dfd(RD(a,167))};var y2=sfb(zye,'DeprecatedLayoutOptionReplacer/lambda$1$Type',1027);feb(1028,1,{},Kfd);_.Yd=function Lfd(a,b){Efd(this.a,RD(a,149),RD(b,41))};var z2=sfb(zye,'DeprecatedLayoutOptionReplacer/lambda$2$Type',1028);feb(143,1,{701:1,143:1},Pfd);_.Fb=function Qfd(a){return Nfd(this,a)};_.Og=function Rfd(){return this.b};_.Pg=function Sfd(){return this.c};_.xe=function Tfd(){return this.e};_.Hb=function Ufd(){return ohb(this.c)};_.Ib=function Vfd(){return 'Layout Algorithm: '+this.c};var D2=sfb(zye,'LayoutAlgorithmData',143);feb(269,1,{},agd);var C2=sfb(zye,'LayoutAlgorithmData/Builder',269);feb(1029,1,{536:1},dgd);_.Kg=function egd(a){ZD(a,207)&&!Heb(TD(a.of((umd(),rld))))&&bgd(RD(a,27))};var E2=sfb(zye,'LayoutAlgorithmResolver',1029);feb(233,1,{701:1,233:1},fgd);_.Fb=function ggd(a){if(ZD(a,233)){return lhb(this.b,RD(a,233).b)}return false};_.Og=function hgd(){return this.a};_.Pg=function igd(){return this.b};_.xe=function jgd(){return this.d};_.Hb=function kgd(){return ohb(this.b)};_.Ib=function lgd(){return 'Layout Type: '+this.b};var G2=sfb(zye,'LayoutCategoryData',233);feb(357,1,{},pgd);var F2=sfb(zye,'LayoutCategoryData/Builder',357);feb(879,1,{},xgd);var qgd;var b3=sfb(zye,'LayoutMetaDataService',879);feb(880,1,{},Ggd);var I2=sfb(zye,'LayoutMetaDataService/Registry',880);feb(487,1,{487:1},Hgd);var H2=sfb(zye,'LayoutMetaDataService/Registry/Triple',487);feb(881,1,BGe,Igd);_.Qg=function Jgd(){return new pjd};var J2=sfb(zye,'LayoutMetaDataService/lambda$0$Type',881);feb(882,1,CGe,Kgd);_.Rg=function Lgd(a){return ajd(RD(a,8))};var K2=sfb(zye,'LayoutMetaDataService/lambda$1$Type',882);feb(891,1,BGe,Mgd);_.Qg=function Ngd(){return new bnb};var L2=sfb(zye,'LayoutMetaDataService/lambda$10$Type',891);feb(892,1,CGe,Ogd);_.Rg=function Pgd(a){return new dnb(RD(a,13))};var M2=sfb(zye,'LayoutMetaDataService/lambda$11$Type',892);feb(893,1,BGe,Qgd);_.Qg=function Rgd(){return new Yub};var N2=sfb(zye,'LayoutMetaDataService/lambda$12$Type',893);feb(894,1,CGe,Sgd);_.Rg=function Tgd(a){return gv(RD(a,67))};var O2=sfb(zye,'LayoutMetaDataService/lambda$13$Type',894);feb(895,1,BGe,Ugd);_.Qg=function Vgd(){return new _sb};var P2=sfb(zye,'LayoutMetaDataService/lambda$14$Type',895);feb(896,1,CGe,Wgd);_.Rg=function Xgd(a){return Ux(RD(a,49))};var Q2=sfb(zye,'LayoutMetaDataService/lambda$15$Type',896);feb(897,1,BGe,Ygd);_.Qg=function Zgd(){return new Iub};var R2=sfb(zye,'LayoutMetaDataService/lambda$16$Type',897);feb(898,1,CGe,$gd);_.Rg=function _gd(a){return Xx(RD(a,49))};var S2=sfb(zye,'LayoutMetaDataService/lambda$17$Type',898);feb(899,1,BGe,ahd);_.Qg=function bhd(){return new xAb};var T2=sfb(zye,'LayoutMetaDataService/lambda$18$Type',899);feb(900,1,CGe,chd);_.Rg=function dhd(a){return Yx(RD(a,157))};var U2=sfb(zye,'LayoutMetaDataService/lambda$19$Type',900);feb(883,1,BGe,ehd);_.Qg=function fhd(){return new Ejd};var V2=sfb(zye,'LayoutMetaDataService/lambda$2$Type',883);feb(884,1,CGe,ghd);_.Rg=function hhd(a){return new Fjd(RD(a,75))};var W2=sfb(zye,'LayoutMetaDataService/lambda$3$Type',884);feb(885,1,BGe,ihd);_.Qg=function jhd(){return new P2b};var X2=sfb(zye,'LayoutMetaDataService/lambda$4$Type',885);feb(886,1,CGe,khd);_.Rg=function lhd(a){return new S2b(RD(a,140))};var Y2=sfb(zye,'LayoutMetaDataService/lambda$5$Type',886);feb(887,1,BGe,mhd);_.Qg=function nhd(){return new z3b};var Z2=sfb(zye,'LayoutMetaDataService/lambda$6$Type',887);feb(888,1,CGe,ohd);_.Rg=function phd(a){return new B3b(RD(a,107))};var $2=sfb(zye,'LayoutMetaDataService/lambda$7$Type',888);feb(889,1,BGe,qhd);_.Qg=function rhd(){return new dtd};var _2=sfb(zye,'LayoutMetaDataService/lambda$8$Type',889);feb(890,1,CGe,shd);_.Rg=function thd(a){return new etd(RD(a,385))};var a3=sfb(zye,'LayoutMetaDataService/lambda$9$Type',890);var V5=ufb(jze,'IProperty');feb(23,1,{34:1,701:1,23:1,149:1},Ahd);_.Fd=function Bhd(a){return vhd(this,RD(a,149))};_.Fb=function Chd(a){return ZD(a,23)?lhb(this.f,RD(a,23).f):ZD(a,149)&&lhb(this.f,RD(a,149).Pg())};_.Sg=function Dhd(){var a;if(ZD(this.b,4)){a=FId(this.b);if(a==null){throw Adb(new dgb(HGe+this.f+"'. "+"Make sure it's type is registered with the "+(lfb(b6),b6.k)+EGe))}return a}else{return this.b}};_.Og=function Ehd(){return this.d};_.Pg=function Fhd(){return this.f};_.xe=function Ghd(){return this.i};_.Hb=function Hhd(){return ohb(this.f)};_.Ib=function Ihd(){return 'Layout Option: '+this.f};var f3=sfb(zye,'LayoutOptionData',23);feb(24,1,{},Shd);var c3=sfb(zye,'LayoutOptionData/Builder',24);feb(170,22,{3:1,34:1,22:1,170:1},Zhd);var Thd,Uhd,Vhd,Whd,Xhd;var d3=tfb(zye,'LayoutOptionData/Target',170,WI,_hd,$hd);var aid;feb(285,22,{3:1,34:1,22:1,285:1},lid);var cid,did,eid,fid,gid,hid,iid,jid;var e3=tfb(zye,'LayoutOptionData/Type',285,WI,nid,mid);var oid;var qid;var sid;feb(116,1,{116:1},Tid,Uid,Vid);_.Fb=function Wid(a){var b;if(a==null||!ZD(a,116)){return false}b=RD(a,116);return Fvb(this.c,b.c)&&Fvb(this.d,b.d)&&Fvb(this.b,b.b)&&Fvb(this.a,b.a)};_.Hb=function Xid(){return Tnb(cD(WC(jJ,1),rve,1,5,[this.c,this.d,this.b,this.a]))};_.Ib=function Yid(){return 'Rect[x='+this.c+',y='+this.d+',w='+this.b+',h='+this.a+']'};_.a=0;_.b=0;_.c=0;_.d=0;var j3=sfb(_Ae,'ElkRectangle',116);feb(8,1,{3:1,4:1,8:1,423:1},pjd,qjd,rjd,sjd);_.Fb=function tjd(a){return djd(this,a)};_.Hb=function ujd(){return Nfb(this.a)+pgb(Nfb(this.b))};_.cg=function wjd(b){var c,d,e,f;e=0;while(e<b.length&&vjd((BFb(e,b.length),b.charCodeAt(e)),YAe)){++e}c=b.length;while(c>0&&vjd((BFb(c-1,b.length),b.charCodeAt(c-1)),ZAe)){--c}if(e>=c){throw Adb(new agb('The given string does not contain any numbers.'))}f=vhb((AFb(e,c,b.length),b.substr(e,c-e)),',|;|\r|\n');if(f.length!=2){throw Adb(new agb('Exactly two numbers are expected, '+f.length+' were found.'))}try{this.a=Neb(Dhb(f[0]));this.b=Neb(Dhb(f[1]))}catch(a){a=zdb(a);if(ZD(a,130)){d=a;throw Adb(new agb($Ae+d))}else throw Adb(a)}};_.Ib=function yjd(){return '('+this.a+','+this.b+')'};_.a=0;_.b=0;var l3=sfb(_Ae,'KVector',8);feb(75,67,{3:1,4:1,20:1,31:1,56:1,16:1,67:1,15:1,75:1,423:1},Ejd,Fjd,Gjd);_.Pc=function Jjd(){return Djd(this)};_.cg=function Hjd(b){var c,d,e,f,g,h;e=vhb(b,',|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n');Xub(this);try{d=0;g=0;f=0;h=0;while(d<e.length){if(e[d]!=null&&Dhb(e[d]).length>0){g%2==0?(f=Neb(e[d])):(h=Neb(e[d]));g>0&&g%2!=0&&Mub(this,new rjd(f,h));++g}++d}}catch(a){a=zdb(a);if(ZD(a,130)){c=a;throw Adb(new agb('The given string does not match the expected format for vectors.'+c))}else throw Adb(a)}};_.Ib=function Kjd(){var a,b,c;a=new dib('(');b=Sub(this,0);while(b.b!=b.d.c){c=RD(evb(b),8);Zhb(a,c.a+','+c.b);b.b!=b.d.c&&(a.a+='; ',a)}return (a.a+=')',a).a};var k3=sfb(_Ae,'KVectorChain',75);feb(255,22,{3:1,34:1,22:1,255:1},Sjd);var Ljd,Mjd,Njd,Ojd,Pjd,Qjd;var n3=tfb(JGe,'Alignment',255,WI,Ujd,Tjd);var Vjd;feb(991,1,Eye,jkd);_.hf=function kkd(a){ikd(a)};var Xjd,Yjd,Zjd,$jd,_jd,akd,bkd,ckd,dkd,ekd,fkd,gkd;var p3=sfb(JGe,'BoxLayouterOptions',991);feb(992,1,{},lkd);_.sf=function mkd(){var a;return a=new jrd,a};_.tf=function nkd(a){};var o3=sfb(JGe,'BoxLayouterOptions/BoxFactory',992);feb(298,22,{3:1,34:1,22:1,298:1},vkd);var okd,pkd,qkd,rkd,skd,tkd;var q3=tfb(JGe,'ContentAlignment',298,WI,xkd,wkd);var ykd;feb(699,1,Eye,vmd);_.hf=function wmd(a){Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,OGe),''),'Layout Algorithm'),'Select a specific layout algorithm.'),(kid(),iid)),qJ),xsb((Yhd(),Whd)))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,PGe),''),'Resolved Layout Algorithm'),'Meta data associated with the selected algorithm.'),hid),D2),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,MDe),''),'Alignment'),'Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm.'),Ckd),eid),n3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,Dze),''),'Aspect Ratio'),'The desired aspect ratio of the drawing, that is the quotient of width by height.'),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,QGe),''),'Bend Points'),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),hid),k3),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,YDe),''),'Content Alignment'),'Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option.'),Lkd),fid),q3),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,LDe),''),'Debug Mode'),'Whether additional debug information shall be generated.'),(Geb(),false)),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,PDe),''),eze),'Overall direction of edges: horizontal (right / left) or vertical (down / up).'),Okd),eid),s3),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,kDe),''),'Edge Routing'),'What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline.'),Tkd),eid),u3),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,MGe),''),'Expand Nodes'),'If active, nodes are expanded to fill the area of their parent.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,fDe),''),'Hierarchy Handling'),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),Ykd),eid),y3),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Vhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Eze),''),'Padding'),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),uld),hid),i3),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Vhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,dAe),''),'Interactive'),'Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,iEe),''),'interactive Layout'),'Whether the graph should be changeable interactively and by setting constraints'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,gAe),''),'Omit Node Micro Layout'),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,eAe),''),'Port Constraints'),'Defines constraints of the position of the ports of a node.'),Ild),eid),C3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,fEe),''),'Position'),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),hid),l3),ysb(Vhd,cD(WC(d3,1),jwe,170,0,[Xhd,Uhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,$ze),''),'Priority'),'Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used.'),gid),bJ),ysb(Vhd,cD(WC(d3,1),jwe,170,0,[Thd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,bAe),''),'Randomization Seed'),'Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time).'),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,cAe),''),'Separate Connected Components'),'Whether each connected component should be processed separately.'),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ZDe),''),'Junction Points'),'This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order.'),dld),hid),k3),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,aEe),''),'Comment Box'),'Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related.'),false),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,bEe),''),'Hypernode'),'Whether the node should be handled as a hypernode.'),false),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,RGe),''),'Label Manager'),"Label managers can shorten labels upon a layout algorithm's request."),hid),g3),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Uhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,gEe),''),'Margins'),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),fld),hid),h3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,JDe),''),'No Layout'),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),false),cid),QI),ysb(Vhd,cD(WC(d3,1),jwe,170,0,[Thd,Xhd,Uhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,SGe),''),'Scale Factor'),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),did),VI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,TGe),''),'Child Area Width'),'The width of the area occupied by the laid out children of a node.'),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,UGe),''),'Child Area Height'),'The height of the area occupied by the laid out children of a node.'),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,mAe),''),yGe),"Turns topdown layout on and off. If this option is enabled, hierarchical layout will be computed first for the root node and then for its children recursively. Layouts are then scaled down to fit the area provided by their parents. Graphs must follow a certain structure for topdown layout to work properly. {@link TopdownNodeTypes.PARALLEL_NODE} nodes must have children of type {@link TopdownNodeTypes.HIERARCHICAL_NODE} and must define {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} for their children. Furthermore they need to be laid out using an algorithm that is a {@link TopdownLayoutProvider}. Hierarchical nodes can also be parents of other hierarchical nodes and can optionally use a {@link TopdownSizeApproximator} to dynamically set sizes during topdown layout. In this case {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} should be set on the node itself rather than the parent. The values are then used by the size approximator as base values. Hierarchical nodes require the layout option {@link nodeSize.fixedGraphSize} to be true to prevent the algorithm used there from resizing the hierarchical node. This option is not supported if 'Hierarchy Handling' is set to 'INCLUDE_CHILDREN'"),false),cid),QI),xsb(Whd))));zgd(a,mAe,qAe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,VGe),''),'Animate'),'Whether the shift from the old layout to the new computed layout shall be animated.'),true),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,WGe),''),'Animation Time Factor'),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),sgb(100)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,XGe),''),'Layout Ancestors'),'Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,YGe),''),'Maximal Animation Time'),'The maximal time for animations, in milliseconds.'),sgb(4000)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ZGe),''),'Minimal Animation Time'),'The minimal time for animations, in milliseconds.'),sgb(400)),gid),bJ),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,$Ge),''),'Progress Bar'),'Whether a progress bar shall be displayed during layout computations.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,_Ge),''),'Validate Graph'),'Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,aHe),''),'Validate Options'),'Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.'),true),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,bHe),''),'Zoom to Fit'),'Whether the zoom level shall be set to view the whole diagram after layout.'),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,NGe),'box'),'Box Layout Mode'),'Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better.'),Gkd),eid),R3),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,xDe),lDe),'Comment Comment Spacing'),'Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing.'),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,yDe),lDe),'Comment Node Spacing'),'Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing.'),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Bze),lDe),'Components Spacing'),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,zDe),lDe),'Edge Spacing'),'Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines.'),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,aAe),lDe),'Edge Label Spacing'),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ADe),lDe),'Edge Node Spacing'),'Spacing to be preserved between nodes and edges.'),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,BDe),lDe),'Label Spacing'),'Determines the amount of space to be left between two labels of the same graph element.'),0),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,EDe),lDe),'Label Node Spacing'),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,CDe),lDe),'Horizontal spacing between Label and Port'),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,DDe),lDe),'Vertical spacing between Label and Port'),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,_ze),lDe),'Node Spacing'),'The minimal distance to be preserved between each two nodes.'),20),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,FDe),lDe),'Node Self Loop Spacing'),'Spacing to be preserved between a node and its self loops.'),10),did),VI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,GDe),lDe),'Port Spacing'),'Spacing between pairs of ports of the same node.'),10),did),VI),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Vhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,HDe),lDe),'Individual Spacing'),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),hid),l4),ysb(Vhd,cD(WC(d3,1),jwe,170,0,[Thd,Xhd,Uhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,hEe),lDe),'Additional Port Space'),'Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border.'),imd),hid),h3),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,eEe),hHe),'Layout Partition'),'Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction).'),gid),bJ),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Vhd])))));zgd(a,eEe,dEe,yld);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,dEe),hHe),'Layout Partitioning'),'Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle.'),wld),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,QDe),iHe),'Node Label Padding'),'Define padding for node labels that are placed inside of a node.'),hld),hid),i3),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,kAe),iHe),'Node Label Placement'),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),jld),fid),A3),ysb(Vhd,cD(WC(d3,1),jwe,170,0,[Uhd])))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,TDe),jHe),'Port Alignment'),'Defines the default port distribution for a node. May be overridden for each side individually.'),Ald),eid),B3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,UDe),jHe),'Port Alignment (North)'),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),eid),B3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,VDe),jHe),'Port Alignment (South)'),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),eid),B3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,WDe),jHe),'Port Alignment (West)'),"Defines how ports on the western side are placed, overriding the node's general port alignment."),eid),B3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,XDe),jHe),'Port Alignment (East)'),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),eid),B3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,jAe),kHe),'Node Size Constraints'),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),lld),fid),H3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,iAe),kHe),'Node Size Options'),'Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications.'),qld),fid),I3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,CAe),kHe),'Node Size Minimum'),'The minimal size to which a node can be reduced.'),old),hid),l3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,hAe),kHe),'Fixed Graph Size'),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),false),cid),QI),xsb(Whd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,$De),vDe),'Edge Label Placement'),'Gives a hint on where to put edge labels.'),Rkd),eid),t3),xsb(Uhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,fAe),vDe),'Inline Edge Labels'),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),false),cid),QI),xsb(Uhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,cHe),'font'),'Font Name'),'Font name used for a label.'),iid),qJ),xsb(Uhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,dHe),'font'),'Font Size'),'Font size used for a label.'),gid),bJ),xsb(Uhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,cEe),lHe),'Port Anchor Offset'),'The offset to the port position where connections shall be attached.'),hid),l3),xsb(Xhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,_De),lHe),'Port Index'),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),gid),bJ),xsb(Xhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,KDe),lHe),'Port Side'),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),Pld),eid),E3),xsb(Xhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Khd(Ohd(Lhd(Mhd(new Shd,IDe),lHe),'Port Border Offset'),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),did),VI),xsb(Xhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,lAe),mHe),'Port Label Placement'),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),Mld),fid),D3),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,RDe),mHe),'Port Labels Next to Port'),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),false),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,SDe),mHe),'Treat Port Labels as Group'),'If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port.'),true),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,nAe),nHe),'Topdown Scale Factor'),"The scaling factor to be applied to the nodes laid out within the node in recursive topdown layout. The difference to 'Scale Factor' is that the node itself is not scaled. This value has to be set on hierarchical nodes."),1),did),VI),xsb(Whd))));zgd(a,nAe,qAe,rmd);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,eHe),nHe),'Topdown Size Approximator'),'The size approximator to be used to set sizes of hierarchical nodes during topdown layout. The default value is null, which results in nodes keeping whatever size is defined for them e.g. through parent parallel node or by manually setting the size.'),null),eid),M3),xsb(Vhd))));zgd(a,eHe,qAe,tmd);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,oAe),nHe),'Topdown Hierarchical Node Width'),'The fixed size of a hierarchical node when using topdown layout. If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself.'),150),did),VI),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Vhd])))));zgd(a,oAe,qAe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,pAe),nHe),'Topdown Hierarchical Node Aspect Ratio'),'The fixed aspect ratio of a hierarchical node when using topdown layout. Default is 1/sqrt(2). If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself.'),1.414),did),VI),ysb(Whd,cD(WC(d3,1),jwe,170,0,[Vhd])))));zgd(a,pAe,qAe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,qAe),nHe),'Topdown Node Type'),'The different node types used for topdown layout. If the node type is set to {@link TopdownNodeTypes.PARALLEL_NODE} the algorithm must be set to a {@link TopdownLayoutProvider} such as {@link TopdownPacking}. The {@link nodeSize.fixedGraphSize} option is technically only required for hierarchical nodes.'),null),eid),J3),xsb(Vhd))));zgd(a,qAe,hAe,null);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,fHe),nHe),'Topdown Scale Cap'),'Determines the upper limit for the topdown scale factor. The default value is 1.0 which ensures that nested children never end up appearing larger than their parents in terms of unit sizes such as the font size. If the limit is larger, nodes will fully utilize the available space, but it is counteriniuitive for inner nodes to have a larger scale than outer nodes.'),1),did),VI),xsb(Whd))));zgd(a,fHe,qAe,pmd);Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,NDe),oHe),'Activate Inside Self Loops'),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),false),cid),QI),xsb(Vhd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,ODe),oHe),'Inside Self Loop'),'Whether a self loop should be routed inside a node instead of around that node.'),false),cid),QI),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,Cze),'edge'),'Edge Thickness'),'The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it.'),1),did),VI),xsb(Thd))));Egd(a,new Ahd(Qhd(Phd(Rhd(Jhd(Khd(Ohd(Lhd(Mhd(new Shd,gHe),'edge'),'Edge Type'),'The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations.'),Vkd),eid),v3),xsb(Thd))));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,sxe),'Layered'),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.')));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,'org.eclipse.elk.orthogonal'),'Orthogonal'),'Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia \'86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.')));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,Zze),'Force'),'Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984.')));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,'org.eclipse.elk.circle'),'Circle'),'Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph.')));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,$Ee),'Tree'),'Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.')));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,'org.eclipse.elk.planar'),'Planar'),'Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable.')));Dgd(a,new fgd(mgd(ogd(ngd(new pgd,CFe),'Radial'),'Radial layout algorithms usually position the nodes of the graph on concentric circles.')));wnd((new xnd,a));ikd((new jkd,a));Gpd((new Hpd,a))};var Akd,Bkd,Ckd,Dkd,Ekd,Fkd,Gkd,Hkd,Ikd,Jkd,Kkd,Lkd,Mkd,Nkd,Okd,Pkd,Qkd,Rkd,Skd,Tkd,Ukd,Vkd,Wkd,Xkd,Ykd,Zkd,$kd,_kd,ald,bld,cld,dld,eld,fld,gld,hld,ild,jld,kld,lld,mld,nld,old,pld,qld,rld,sld,tld,uld,vld,wld,xld,yld,zld,Ald,Bld,Cld,Dld,Eld,Fld,Gld,Hld,Ild,Jld,Kld,Lld,Mld,Nld,Old,Pld,Qld,Rld,Sld,Tld,Uld,Vld,Wld,Xld,Yld,Zld,$ld,_ld,amd,bmd,cmd,dmd,emd,fmd,gmd,hmd,imd,jmd,kmd,lmd,mmd,nmd,omd,pmd,qmd,rmd,smd,tmd;var r3=sfb(JGe,'CoreOptions',699);feb(88,22,{3:1,34:1,22:1,88:1},Gmd);var xmd,ymd,zmd,Amd,Bmd;var s3=tfb(JGe,eze,88,WI,Imd,Hmd);var Jmd;feb(278,22,{3:1,34:1,22:1,278:1},Pmd);var Lmd,Mmd,Nmd;var t3=tfb(JGe,'EdgeLabelPlacement',278,WI,Rmd,Qmd);var Smd;feb(223,22,{3:1,34:1,22:1,223:1},Zmd);var Umd,Vmd,Wmd,Xmd;var u3=tfb(JGe,'EdgeRouting',223,WI,_md,$md);var and;feb(321,22,{3:1,34:1,22:1,321:1},jnd);var cnd,dnd,end,fnd,gnd,hnd;var v3=tfb(JGe,'EdgeType',321,WI,lnd,knd);var mnd;feb(989,1,Eye,xnd);_.hf=function ynd(a){wnd(a)};var ond,pnd,qnd,rnd,snd,tnd,und;var x3=sfb(JGe,'FixedLayouterOptions',989);feb(990,1,{},znd);_.sf=function And(){var a;return a=new btd,a};_.tf=function Bnd(a){};var w3=sfb(JGe,'FixedLayouterOptions/FixedFactory',990);feb(346,22,{3:1,34:1,22:1,346:1},Gnd);var Cnd,Dnd,End;var y3=tfb(JGe,'HierarchyHandling',346,WI,Ind,Hnd);var Jnd;feb(291,22,{3:1,34:1,22:1,291:1},Rnd);var Lnd,Mnd,Nnd,Ond;var z3=tfb(JGe,'LabelSide',291,WI,Tnd,Snd);var Und;feb(95,22,{3:1,34:1,22:1,95:1},eod);var Wnd,Xnd,Ynd,Znd,$nd,_nd,aod,bod,cod;var A3=tfb(JGe,'NodeLabelPlacement',95,WI,hod,god);var iod;feb(256,22,{3:1,34:1,22:1,256:1},qod);var kod,lod,mod,nod,ood;var B3=tfb(JGe,'PortAlignment',256,WI,sod,rod);var tod;feb(101,22,{3:1,34:1,22:1,101:1},Eod);var vod,wod,xod,yod,zod,Aod;var C3=tfb(JGe,'PortConstraints',101,WI,God,Fod);var Hod;feb(279,22,{3:1,34:1,22:1,279:1},Qod);var Jod,Kod,Lod,Mod,Nod,Ood;var D3=tfb(JGe,'PortLabelPlacement',279,WI,Uod,Tod);var Vod;feb(64,22,{3:1,34:1,22:1,64:1},upd);var Xod,Yod,Zod,$od,_od,apd,bpd,cpd,dpd,epd,fpd,gpd,hpd,ipd,jpd,kpd,lpd,mpd,npd,opd,ppd;var E3=tfb(JGe,'PortSide',64,WI,xpd,wpd);var ypd;feb(993,1,Eye,Hpd);_.hf=function Ipd(a){Gpd(a)};var Apd,Bpd,Cpd,Dpd,Epd;var G3=sfb(JGe,'RandomLayouterOptions',993);feb(994,1,{},Jpd);_.sf=function Kpd(){var a;return a=new eud,a};_.tf=function Lpd(a){};var F3=sfb(JGe,'RandomLayouterOptions/RandomFactory',994);feb(386,22,{3:1,34:1,22:1,386:1},Rpd);var Mpd,Npd,Opd,Ppd;var H3=tfb(JGe,'SizeConstraint',386,WI,Tpd,Spd);var Upd;feb(264,22,{3:1,34:1,22:1,264:1},eqd);var Wpd,Xpd,Ypd,Zpd,$pd,_pd,aqd,bqd,cqd;var I3=tfb(JGe,'SizeOptions',264,WI,gqd,fqd);var hqd;feb(280,22,{3:1,34:1,22:1,280:1},nqd);var jqd,kqd,lqd;var J3=tfb(JGe,'TopdownNodeTypes',280,WI,pqd,oqd);var qqd;feb(347,22,rHe);var sqd,tqd;var M3=tfb(JGe,'TopdownSizeApproximator',347,WI,xqd,wqd);feb(987,347,rHe,zqd);_.Tg=function Aqd(a){return yqd(a)};var K3=tfb(JGe,'TopdownSizeApproximator/1',987,M3,null,null);feb(988,347,rHe,Bqd);_.Tg=function Cqd(b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;c=RD(Gxd(b,(umd(),Tld)),143);A=(bvd(),o=new ACd,o);zxd(A,b);B=new Tsb;for(g=new dMd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));g.e!=g.i.gc();){e=RD(bMd(g),27);t=(n=new ACd,n);yCd(t,A);zxd(t,e);D=yqd(e);zyd(t,$wnd.Math.max(e.g,D.a),$wnd.Math.max(e.f,D.b));rtb(B.f,e,t)}for(f=new dMd((!b.a&&(b.a=new C5d(J4,b,10,11)),b.a));f.e!=f.i.gc();){e=RD(bMd(f),27);for(l=new dMd((!e.e&&(e.e=new Yie(G4,e,7,4)),e.e));l.e!=l.i.gc();){k=RD(bMd(l),74);v=RD(Wd(qtb(B.f,e)),27);w=RD(Wjb(B,QHd((!k.c&&(k.c=new Yie(E4,k,5,8)),k.c),0)),27);u=(m=new rzd,m);WGd((!u.b&&(u.b=new Yie(E4,u,4,7)),u.b),v);WGd((!u.c&&(u.c=new Yie(E4,u,5,8)),u.c),w);pzd(u,vCd(v));zxd(u,k)}}q=RD(ltd(c.f),205);try{q.rf(A,new ztd);mtd(c.f,q)}catch(a){a=zdb(a);if(ZD(a,103)){p=a;throw Adb(p)}else throw Adb(a)}Hxd(A,Ikd)||Hxd(A,Hkd)||psd(A);j=Kfb(UD(Gxd(A,Ikd)));i=Kfb(UD(Gxd(A,Hkd)));h=j/i;d=Kfb(UD(Gxd(A,lmd)))*$wnd.Math.sqrt((!A.a&&(A.a=new C5d(J4,A,10,11)),A.a).i);C=RD(Gxd(A,tld),107);s=C.b+C.c+1;r=C.d+C.a+1;return new rjd($wnd.Math.max(s,d),$wnd.Math.max(r,d/h))};var L3=tfb(JGe,'TopdownSizeApproximator/2',988,M3,null,null);var Dqd;feb(344,1,{871:1},Oqd);_.Ug=function Pqd(a,b){return Fqd(this,a,b)};_.Vg=function Qqd(){Hqd(this)};_.Wg=function Rqd(){return this.q};_.Xg=function Sqd(){return !this.f?null:Hob(this.f)};_.Yg=function Tqd(){return Hob(this.a)};_.Zg=function Uqd(){return this.p};_.$g=function Vqd(){return false};_._g=function Wqd(){return this.n};_.ah=function Xqd(){return this.p!=null&&!this.b};_.bh=function Yqd(a){var b;if(this.n){b=a;Rmb(this.f,b)}};_.dh=function Zqd(a,b){var c,d;this.n&&!!a&&Jqd(this,(c=new Zje,d=Rje(c,a),Yje(c),d),(ttd(),qtd))};_.eh=function $qd(a){var b;if(this.b){return null}else{b=Gqd(this,this.g);Mub(this.a,b);b.i=this;this.d=a;return b}};_.fh=function _qd(a){a>0&&!this.b&&Iqd(this,a)};_.b=false;_.c=0;_.d=-1;_.e=null;_.f=null;_.g=-1;_.j=false;_.k=false;_.n=false;_.o=0;_.q=0;_.r=0;var O3=sfb(jEe,'BasicProgressMonitor',344);feb(717,205,oze,jrd);_.rf=function nrd(a,b){crd(a,b)};var V3=sfb(jEe,'BoxLayoutProvider',717);feb(983,1,fye,prd);_.Ne=function qrd(a,b){return ord(this,RD(a,27),RD(b,27))};_.Fb=function rrd(a){return this===a};_.Oe=function srd(){return new Frb(this)};_.a=false;var P3=sfb(jEe,'BoxLayoutProvider/1',983);feb(163,1,{163:1},zrd,Ard);_.Ib=function Brd(){return this.c?zCd(this.c):Fe(this.b)};var Q3=sfb(jEe,'BoxLayoutProvider/Group',163);feb(320,22,{3:1,34:1,22:1,320:1},Hrd);var Crd,Drd,Erd,Frd;var R3=tfb(jEe,'BoxLayoutProvider/PackingMode',320,WI,Jrd,Ird);var Krd;feb(984,1,fye,Mrd);_.Ne=function Nrd(a,b){return krd(RD(a,163),RD(b,163))};_.Fb=function Ord(a){return this===a};_.Oe=function Prd(){return new Frb(this)};var S3=sfb(jEe,'BoxLayoutProvider/lambda$0$Type',984);feb(985,1,fye,Qrd);_.Ne=function Rrd(a,b){return lrd(RD(a,163),RD(b,163))};_.Fb=function Srd(a){return this===a};_.Oe=function Trd(){return new Frb(this)};var T3=sfb(jEe,'BoxLayoutProvider/lambda$1$Type',985);feb(986,1,fye,Urd);_.Ne=function Vrd(a,b){return mrd(RD(a,163),RD(b,163))};_.Fb=function Wrd(a){return this===a};_.Oe=function Xrd(){return new Frb(this)};var U3=sfb(jEe,'BoxLayoutProvider/lambda$2$Type',986);feb(1384,1,{845:1},Yrd);_.Mg=function Zrd(a,b){return GCc(),!ZD(b,167)||ued((hed(),ged,RD(a,167)),b)};var W3=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type',1384);feb(1385,1,Qve,$rd);_.Cd=function _rd(a){JCc(this.a,RD(a,149))};var X3=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type',1385);feb(1386,1,Qve,asd);_.Cd=function bsd(a){RD(a,96);GCc()};var Y3=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type',1386);feb(1390,1,Qve,csd);_.Cd=function dsd(a){KCc(this.a,RD(a,96))};var Z3=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type',1390);feb(1388,1,nwe,esd);_.Mb=function fsd(a){return LCc(this.a,this.b,RD(a,149))};var $3=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type',1388);feb(1387,1,nwe,gsd);_.Mb=function hsd(a){return NCc(this.a,this.b,RD(a,845))};var _3=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type',1387);feb(1389,1,Qve,isd);_.Cd=function jsd(a){MCc(this.a,this.b,RD(a,149))};var a4=sfb(jEe,'ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type',1389);feb(947,1,{},Lsd);_.Kb=function Msd(a){return Ksd(a)};_.Fb=function Nsd(a){return this===a};var c4=sfb(jEe,'ElkUtil/lambda$0$Type',947);feb(948,1,Qve,Osd);_.Cd=function Psd(a){ysd(this.a,this.b,RD(a,74))};_.a=0;_.b=0;var d4=sfb(jEe,'ElkUtil/lambda$1$Type',948);feb(949,1,Qve,Qsd);_.Cd=function Rsd(a){zsd(this.a,this.b,RD(a,166))};_.a=0;_.b=0;var e4=sfb(jEe,'ElkUtil/lambda$2$Type',949);feb(950,1,Qve,Ssd);_.Cd=function Tsd(a){Asd(this.a,this.b,RD(a,135))};_.a=0;_.b=0;var f4=sfb(jEe,'ElkUtil/lambda$3$Type',950);feb(951,1,Qve,Usd);_.Cd=function Vsd(a){Bsd(this.a,RD(a,377))};var g4=sfb(jEe,'ElkUtil/lambda$4$Type',951);feb(325,1,{34:1,325:1},Xsd);_.Fd=function Ysd(a){return Wsd(this,RD(a,242))};_.Fb=function Zsd(a){var b;if(ZD(a,325)){b=RD(a,325);return this.a==b.a}return false};_.Hb=function $sd(){return eE(this.a)};_.Ib=function _sd(){return this.a+' (exclusive)'};_.a=0;var h4=sfb(jEe,'ExclusiveBounds/ExclusiveLowerBound',325);feb(1119,205,oze,btd);_.rf=function ctd(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;b.Ug('Fixed Layout',1);f=RD(Gxd(a,(umd(),Skd)),223);l=0;m=0;for(s=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));s.e!=s.i.gc();){q=RD(bMd(s),27);B=RD(Gxd(q,(vnd(),und)),8);if(B){Byd(q,B.a,B.b);if(RD(Gxd(q,pnd),181).Hc((Qpd(),Mpd))){n=RD(Gxd(q,rnd),8);n.a>0&&n.b>0&&Esd(q,n.a,n.b,true,true)}}l=$wnd.Math.max(l,q.i+q.g);m=$wnd.Math.max(m,q.j+q.f);for(j=new dMd((!q.n&&(q.n=new C5d(I4,q,1,7)),q.n));j.e!=j.i.gc();){h=RD(bMd(j),135);B=RD(Gxd(h,und),8);!!B&&Byd(h,B.a,B.b);l=$wnd.Math.max(l,q.i+h.i+h.g);m=$wnd.Math.max(m,q.j+h.j+h.f)}for(v=new dMd((!q.c&&(q.c=new C5d(K4,q,9,9)),q.c));v.e!=v.i.gc();){u=RD(bMd(v),123);B=RD(Gxd(u,und),8);!!B&&Byd(u,B.a,B.b);w=q.i+u.i;A=q.j+u.j;l=$wnd.Math.max(l,w+u.g);m=$wnd.Math.max(m,A+u.f);for(i=new dMd((!u.n&&(u.n=new C5d(I4,u,1,7)),u.n));i.e!=i.i.gc();){h=RD(bMd(i),135);B=RD(Gxd(h,und),8);!!B&&Byd(h,B.a,B.b);l=$wnd.Math.max(l,w+h.i+h.g);m=$wnd.Math.max(m,A+h.j+h.f)}}for(e=new is(Mr(zGd(q).a.Kc(),new ir));gs(e);){c=RD(hs(e),74);k=atd(c);l=$wnd.Math.max(l,k.a);m=$wnd.Math.max(m,k.b)}for(d=new is(Mr(yGd(q).a.Kc(),new ir));gs(d);){c=RD(hs(d),74);if(vCd(JGd(c))!=a){k=atd(c);l=$wnd.Math.max(l,k.a);m=$wnd.Math.max(m,k.b)}}}if(f==(Ymd(),Umd)){for(r=new dMd((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a));r.e!=r.i.gc();){q=RD(bMd(r),27);for(d=new is(Mr(zGd(q).a.Kc(),new ir));gs(d);){c=RD(hs(d),74);g=tsd(c);g.b==0?Ixd(c,cld,null):Ixd(c,cld,g)}}}if(!Heb(TD(Gxd(a,(vnd(),qnd))))){t=RD(Gxd(a,snd),107);p=l+t.b+t.c;o=m+t.d+t.a;Esd(a,p,o,true,true)}b.Vg()};var i4=sfb(jEe,'FixedLayoutProvider',1119);feb(385,137,{3:1,423:1,385:1,96:1,137:1},dtd,etd);_.cg=function htd(b){var c,d,e,f,g,h,i,j,k;if(!b){return}try{j=vhb(b,';,;');for(g=j,h=0,i=g.length;h<i;++h){f=g[h];d=vhb(f,'\\:');e=vgd(ygd(),d[0]);if(!e){throw Adb(new agb('Invalid option id: '+d[0]))}k=zhd(e,d[1]);if(k==null){throw Adb(new agb('Invalid option value: '+d[1]))}k==null?(!this.q&&(this.q=new Tsb),_jb(this.q,e)):(!this.q&&(this.q=new Tsb),Zjb(this.q,e,k))}}catch(a){a=zdb(a);if(ZD(a,103)){c=a;throw Adb(new bgb(c))}else throw Adb(a)}};_.Ib=function itd(){var a;a=WD(zDb(GDb((!this.q?(yob(),yob(),wob):this.q).vc().Oc(),new jtd),sBb(new hCb,new fCb,new RBb,new TBb,cD(WC(QL,1),jwe,108,0,[]))));return a};var l4=sfb(jEe,'IndividualSpacings',385);feb(982,1,{},jtd);_.Kb=function ktd(a){return gtd(RD(a,44))};var k4=sfb(jEe,'IndividualSpacings/lambda$0$Type',982);feb(718,1,{},ntd);_.c=0;var m4=sfb(jEe,'InstancePool',718);feb(1835,1,{},otd);var o4=sfb(jEe,'LoggedGraph',1835);feb(415,22,{3:1,34:1,22:1,415:1},utd);var ptd,qtd,rtd,std;var n4=tfb(jEe,'LoggedGraph/Type',415,WI,wtd,vtd);var xtd;feb(1063,1,{871:1},ztd);_.Ug=function Atd(a,b){return false};_.Vg=function Btd(){};_.Wg=function Ctd(){return 0};_.Xg=function Dtd(){return null};_.Yg=function Etd(){return null};_.Zg=function Ftd(){return null};_.$g=function Gtd(){return false};_._g=function Htd(){return false};_.ah=function Itd(){return false};_.bh=function Jtd(a){};_.dh=function Ktd(a,b){};_.eh=function Ltd(a){return this};_.fh=function Mtd(a){};var p4=sfb(jEe,'NullElkProgressMonitor',1063);feb(42,1,{20:1,42:1},Ptd);_.Jc=function Rtd(a){xgb(this,a)};_.Fb=function Qtd(a){var b,c,d;if(ZD(a,42)){c=RD(a,42);b=this.a==null?c.a==null:pb(this.a,c.a);d=this.b==null?c.b==null:pb(this.b,c.b);return b&&d}else{return false}};_.Hb=function Std(){var a,b,c,d,e,f;c=this.a==null?0:tb(this.a);a=c&Bwe;b=c&-65536;f=this.b==null?0:tb(this.b);d=f&Bwe;e=f&-65536;return a^e>>16&Bwe|b^d<<16};_.Kc=function Ttd(){return new Vtd(this)};_.Ib=function Utd(){return this.a==null&&this.b==null?'pair(null,null)':this.a==null?'pair(null,'+jeb(this.b)+')':this.b==null?'pair('+jeb(this.a)+',null)':'pair('+jeb(this.a)+','+jeb(this.b)+')'};var r4=sfb(jEe,'Pair',42);feb(995,1,Ave,Vtd);_.Nb=function Wtd(a){Ztb(this,a)};_.Ob=function Xtd(){return !this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)};_.Pb=function Ytd(){if(!this.c&&!this.b&&this.a.a!=null){this.b=true;return this.a.a}else if(!this.c&&this.a.b!=null){this.c=true;return this.a.b}throw Adb(new Dvb)};_.Qb=function Ztd(){this.c&&this.a.b!=null?(this.a.b=null):this.b&&this.a.a!=null&&(this.a.a=null);throw Adb(new cgb)};_.b=false;_.c=false;var q4=sfb(jEe,'Pair/1',995);feb(455,1,{455:1},$td);_.Fb=function _td(a){return Fvb(this.a,RD(a,455).a)&&Fvb(this.c,RD(a,455).c)&&Fvb(this.d,RD(a,455).d)&&Fvb(this.b,RD(a,455).b)};_.Hb=function aud(){return Tnb(cD(WC(jJ,1),rve,1,5,[this.a,this.c,this.d,this.b]))};_.Ib=function bud(){return '('+this.a+pve+this.c+pve+this.d+pve+this.b+')'};var s4=sfb(jEe,'Quadruple',455);feb(1108,205,oze,eud);_.rf=function fud(a,b){var c,d,e,f,g;b.Ug('Random Layout',1);if((!a.a&&(a.a=new C5d(J4,a,10,11)),a.a).i==0){b.Vg();return}f=RD(Gxd(a,(Fpd(),Dpd)),17);!!f&&f.a!=0?(e=new Pwb(f.a)):(e=new Owb);c=Mfb(UD(Gxd(a,Apd)));g=Mfb(UD(Gxd(a,Epd)));d=RD(Gxd(a,Bpd),107);dud(a,e,c,g,d);b.Vg()};var t4=sfb(jEe,'RandomLayoutProvider',1108);feb(240,1,{240:1},gud);_.Fb=function hud(a){return Fvb(this.a,RD(a,240).a)&&Fvb(this.b,RD(a,240).b)&&Fvb(this.c,RD(a,240).c)};_.Hb=function iud(){return Tnb(cD(WC(jJ,1),rve,1,5,[this.a,this.b,this.c]))};_.Ib=function jud(){return '('+this.a+pve+this.b+pve+this.c+')'};var u4=sfb(jEe,'Triple',240);var kud;feb(562,1,{});_.Lf=function oud(){return new rjd(this.f.i,this.f.j)};_.of=function pud(a){if(hGd(a,(umd(),Gld))){return Gxd(this.f,mud)}return Gxd(this.f,a)};_.Mf=function qud(){return new rjd(this.f.g,this.f.f)};_.Nf=function rud(){return this.g};_.pf=function sud(a){return Hxd(this.f,a)};_.Of=function tud(a){Dyd(this.f,a.a);Eyd(this.f,a.b)};_.Pf=function uud(a){Cyd(this.f,a.a);Ayd(this.f,a.b)};_.Qf=function vud(a){this.g=a};_.g=0;var mud;var v4=sfb(uHe,'ElkGraphAdapters/AbstractElkGraphElementAdapter',562);feb(563,1,{853:1},wud);_.Rf=function xud(){var a,b;if(!this.b){this.b=fv(iyd(this.a).i);for(b=new dMd(iyd(this.a));b.e!=b.i.gc();){a=RD(bMd(b),135);Rmb(this.b,new Bud(a))}}return this.b};_.b=null;var w4=sfb(uHe,'ElkGraphAdapters/ElkEdgeAdapter',563);feb(289,562,{},zud);_.Sf=function Aud(){return yud(this)};_.a=null;var x4=sfb(uHe,'ElkGraphAdapters/ElkGraphAdapter',289);feb(640,562,{187:1},Bud);var y4=sfb(uHe,'ElkGraphAdapters/ElkLabelAdapter',640);feb(639,562,{695:1},Fud);_.Rf=function Iud(){return Cud(this)};_.Vf=function Jud(){var a;return a=RD(Gxd(this.f,(umd(),eld)),140),!a&&(a=new P2b),a};_.Xf=function Lud(){return Dud(this)};_.Zf=function Nud(a){var b;b=new S2b(a);Ixd(this.f,(umd(),eld),b)};_.$f=function Oud(a){Ixd(this.f,(umd(),tld),new B3b(a))};_.Tf=function Gud(){return this.d};_.Uf=function Hud(){var a,b;if(!this.a){this.a=new bnb;for(b=new is(Mr(yGd(RD(this.f,27)).a.Kc(),new ir));gs(b);){a=RD(hs(b),74);Rmb(this.a,new wud(a))}}return this.a};_.Wf=function Kud(){var a,b;if(!this.c){this.c=new bnb;for(b=new is(Mr(zGd(RD(this.f,27)).a.Kc(),new ir));gs(b);){a=RD(hs(b),74);Rmb(this.c,new wud(a))}}return this.c};_.Yf=function Mud(){return tCd(RD(this.f,27)).i!=0||Heb(TD(RD(this.f,27).of((umd(),$kd))))};_._f=function Pud(){Eud(this,(lud(),kud))};_.a=null;_.b=null;_.c=null;_.d=null;_.e=null;var z4=sfb(uHe,'ElkGraphAdapters/ElkNodeAdapter',639);feb(1284,562,{852:1},Rud);_.Rf=function Tud(){return Qud(this)};_.Uf=function Sud(){var a,b;if(!this.a){this.a=ev(RD(this.f,123).hh().i);for(b=new dMd(RD(this.f,123).hh());b.e!=b.i.gc();){a=RD(bMd(b),74);Rmb(this.a,new wud(a))}}return this.a};_.Wf=function Uud(){var a,b;if(!this.c){this.c=ev(RD(this.f,123).ih().i);for(b=new dMd(RD(this.f,123).ih());b.e!=b.i.gc();){a=RD(bMd(b),74);Rmb(this.c,new wud(a))}}return this.c};_.ag=function Vud(){return RD(RD(this.f,123).of((umd(),Old)),64)};_.bg=function Wud(){var a,b,c,d,e,f,g,h;d=MCd(RD(this.f,123));for(c=new dMd(RD(this.f,123).ih());c.e!=c.i.gc();){a=RD(bMd(c),74);for(h=new dMd((!a.c&&(a.c=new Yie(E4,a,5,8)),a.c));h.e!=h.i.gc();){g=RD(bMd(h),84);if(NGd(AGd(g),d)){return true}else if(AGd(g)==d&&Heb(TD(Gxd(a,(umd(),_kd))))){return true}}}for(b=new dMd(RD(this.f,123).hh());b.e!=b.i.gc();){a=RD(bMd(b),74);for(f=new dMd((!a.b&&(a.b=new Yie(E4,a,4,7)),a.b));f.e!=f.i.gc();){e=RD(bMd(f),84);if(NGd(AGd(e),d)){return true}}}return false};_.a=null;_.b=null;_.c=null;var A4=sfb(uHe,'ElkGraphAdapters/ElkPortAdapter',1284);feb(1285,1,fye,Yud);_.Ne=function Zud(a,b){return Xud(RD(a,123),RD(b,123))};_.Fb=function $ud(a){return this===a};_.Oe=function _ud(){return new Frb(this)};var B4=sfb(uHe,'ElkGraphAdapters/PortComparator',1285);var r7=ufb(vHe,'EObject');var C4=ufb(wHe,xHe);var D4=ufb(wHe,yHe);var H4=ufb(wHe,zHe);var L4=ufb(wHe,'ElkShape');var E4=ufb(wHe,AHe);var G4=ufb(wHe,BHe);var F4=ufb(wHe,CHe);var p7=ufb(vHe,DHe);var n7=ufb(vHe,'EFactory');var avd;var q7=ufb(vHe,EHe);var t7=ufb(vHe,'EPackage');var cvd;var evd,fvd,gvd,hvd,ivd,jvd,kvd,lvd,mvd,nvd,ovd;var I4=ufb(wHe,FHe);var J4=ufb(wHe,GHe);var K4=ufb(wHe,HHe);feb(93,1,IHe);_.th=function rvd(){this.uh();return null};_.uh=function svd(){return null};_.vh=function tvd(){return this.uh(),false};_.wh=function uvd(){return false};_.xh=function vvd(a){qvd(this,a)};var g6=sfb(JHe,'BasicNotifierImpl',93);feb(99,93,RHe);_.Yh=function Dwd(){return Mvd(this)};_.yh=function bwd(a,b){return a};_.zh=function cwd(){throw Adb(new jib)};_.Ah=function dwd(a){var b;return b=Z5d(RD(vYd(this.Dh(),this.Fh()),19)),this.Ph().Th(this,b.n,b.f,a)};_.Bh=function ewd(a,b){throw Adb(new jib)};_.Ch=function fwd(a,b,c){return xvd(this,a,b,c)};_.Dh=function gwd(){var a;if(this.zh()){a=this.zh().Nk();if(a){return a}}return this.ii()};_.Eh=function hwd(){return yvd(this)};_.Fh=function iwd(){throw Adb(new jib)};_.Gh=function kwd(){var a,b;b=this.$h().Ok();!b&&this.zh().Tk(b=(N2d(),a=P$d(rYd(this.Dh())),a==null?M2d:new Q2d(this,a)));return b};_.Hh=function mwd(a,b){return a};_.Ih=function nwd(a){var b;b=a.pk();return !b?BYd(this.Dh(),a):a.Lj()};_.Jh=function owd(){var a;a=this.zh();return !a?null:a.Qk()};_.Kh=function pwd(){return !this.zh()?null:this.zh().Nk()};_.Lh=function qwd(a,b,c){return Dvd(this,a,b,c)};_.Mh=function rwd(a){return Evd(this,a)};_.Nh=function swd(a,b){return Fvd(this,a,b)};_.Oh=function twd(){var a;a=this.zh();return !!a&&a.Rk()};_.Ph=function uwd(){throw Adb(new jib)};_.Qh=function vwd(){return Hvd(this)};_.Rh=function wwd(a,b,c,d){return Ivd(this,a,b,d)};_.Sh=function xwd(a,b,c){var d;return d=RD(vYd(this.Dh(),b),69),d.wk().zk(this,this.hi(),b-this.ji(),a,c)};_.Th=function ywd(a,b,c,d){return Jvd(this,a,b,d)};_.Uh=function zwd(a,b,c){var d;return d=RD(vYd(this.Dh(),b),69),d.wk().Ak(this,this.hi(),b-this.ji(),a,c)};_.Vh=function Awd(){return !!this.zh()&&!!this.zh().Pk()};_.Wh=function Bwd(a){return Kvd(this,a)};_.Xh=function Cwd(a){return Lvd(this,a)};_.Zh=function Ewd(a){return Pvd(this,a)};_.$h=function Fwd(){throw Adb(new jib)};_._h=function Gwd(){return !this.zh()?null:this.zh().Pk()};_.ai=function Hwd(){return Hvd(this)};_.bi=function Iwd(a,b){Wvd(this,a,b)};_.ci=function Jwd(a){this.$h().Sk(a)};_.di=function Kwd(a){this.$h().Vk(a)};_.ei=function Lwd(a){this.$h().Uk(a)};_.fi=function Mwd(a,b){var c,d,e,f;f=this.Jh();if(!!f&&!!a){b=rLd(f.El(),this,b);f.Il(this)}d=this.Ph();if(d){if((jwd(this,this.Ph(),this.Fh()).Bb&txe)!=0){e=d.Qh();!!e&&(!a?e.Hl(this):!f&&e.Il(this))}else{b=(c=this.Fh(),c>=0?this.Ah(b):this.Ph().Th(this,-1-c,null,b));b=this.Ch(null,-1,b)}}this.di(a);return b};_.gi=function Nwd(a){var b,c,d,e,f,g,h,i;c=this.Dh();f=BYd(c,a);b=this.ji();if(f>=b){return RD(a,69).wk().Dk(this,this.hi(),f-b)}else if(f<=-1){g=Eee((lke(),jke),c,a);if(g){nke();RD(g,69).xk()||(g=zfe(Qee(jke,g)));e=(d=this.Ih(g),RD(d>=0?this.Lh(d,true,true):Qvd(this,g,true),160));i=g.Ik();if(i>1||i==-1){return RD(RD(e,220).Sl(a,false),79)}}else{throw Adb(new agb(KHe+a.xe()+NHe))}}else if(a.Jk()){return d=this.Ih(a),RD(d>=0?this.Lh(d,false,true):Qvd(this,a,false),79)}h=new NTd(this,a);return h};_.hi=function Owd(){return Yvd(this)};_.ii=function Pwd(){return (lTd(),kTd).S};_.ji=function Qwd(){return AYd(this.ii())};_.ki=function Rwd(a){$vd(this,a)};_.Ib=function Swd(){return awd(this)};var G7=sfb(SHe,'BasicEObjectImpl',99);var ZSd;feb(119,99,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1});_.li=function _wd(a){var b;b=Vwd(this);return b[a]};_.mi=function axd(a,b){var c;c=Vwd(this);bD(c,a,b)};_.ni=function bxd(a){var b;b=Vwd(this);bD(b,a,null)};_.th=function cxd(){return RD(Ywd(this,4),129)};_.uh=function dxd(){throw Adb(new jib)};_.vh=function exd(){return (this.Db&4)!=0};_.zh=function fxd(){throw Adb(new jib)};_.oi=function gxd(a){$wd(this,2,a)};_.Bh=function hxd(a,b){this.Db=b<<16|this.Db&255;this.oi(a)};_.Dh=function ixd(){return Uwd(this)};_.Fh=function jxd(){return this.Db>>16};_.Gh=function kxd(){var a,b;return N2d(),b=P$d(rYd((a=RD(Ywd(this,16),29),!a?this.ii():a))),b==null?(null,M2d):new Q2d(this,b)};_.wh=function lxd(){return (this.Db&1)==0};_.Jh=function mxd(){return RD(Ywd(this,128),2034)};_.Kh=function nxd(){return RD(Ywd(this,16),29)};_.Oh=function oxd(){return (this.Db&32)!=0};_.Ph=function pxd(){return RD(Ywd(this,2),54)};_.Vh=function qxd(){return (this.Db&64)!=0};_.$h=function rxd(){throw Adb(new jib)};_._h=function sxd(){return RD(Ywd(this,64),288)};_.ci=function txd(a){$wd(this,16,a)};_.di=function uxd(a){$wd(this,128,a)};_.ei=function vxd(a){$wd(this,64,a)};_.hi=function wxd(){return Wwd(this)};_.Db=0;var xab=sfb(SHe,'MinimalEObjectImpl',119);feb(120,119,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1});_.oi=function xxd(a){this.Cb=a};_.Ph=function yxd(){return this.Cb};var wab=sfb(SHe,'MinimalEObjectImpl/Container',120);feb(2083,120,{110:1,342:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1});_.Lh=function Jxd(a,b,c){return Axd(this,a,b,c)};_.Uh=function Kxd(a,b,c){return Bxd(this,a,b,c)};_.Wh=function Lxd(a){return Cxd(this,a)};_.bi=function Mxd(a,b){Dxd(this,a,b)};_.ii=function Nxd(){return pvd(),ovd};_.ki=function Oxd(a){Exd(this,a)};_.nf=function Pxd(){return Fxd(this)};_.gh=function Qxd(){return !this.o&&(this.o=new DVd((pvd(),mvd),X4,this,0)),this.o};_.of=function Rxd(a){return Gxd(this,a)};_.pf=function Sxd(a){return Hxd(this,a)};_.qf=function Txd(a,b){return Ixd(this,a,b)};var M4=sfb(THe,'EMapPropertyHolderImpl',2083);feb(572,120,{110:1,377:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},Xxd);_.Lh=function Yxd(a,b,c){switch(a){case 0:return this.a;case 1:return this.b;}return Dvd(this,a,b,c)};_.Wh=function Zxd(a){switch(a){case 0:return this.a!=0;case 1:return this.b!=0;}return Kvd(this,a)};_.bi=function $xd(a,b){switch(a){case 0:Vxd(this,Kfb(UD(b)));return;case 1:Wxd(this,Kfb(UD(b)));return;}Wvd(this,a,b)};_.ii=function _xd(){return pvd(),evd};_.ki=function ayd(a){switch(a){case 0:Vxd(this,0);return;case 1:Wxd(this,0);return;}$vd(this,a)};_.Ib=function byd(){var a;if((this.Db&64)!=0)return awd(this);a=new Shb(awd(this));a.a+=' (x: ';Khb(a,this.a);a.a+=', y: ';Khb(a,this.b);a.a+=')';return a.a};_.a=0;_.b=0;var N4=sfb(THe,'ElkBendPointImpl',572);feb(739,2083,{110:1,342:1,167:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1});_.Lh=function lyd(a,b,c){return cyd(this,a,b,c)};_.Sh=function myd(a,b,c){return dyd(this,a,b,c)};_.Uh=function nyd(a,b,c){return eyd(this,a,b,c)};_.Wh=function oyd(a){return fyd(this,a)};_.bi=function pyd(a,b){gyd(this,a,b)};_.ii=function qyd(){return pvd(),ivd};_.ki=function ryd(a){hyd(this,a)};_.jh=function syd(){return this.k};_.kh=function tyd(){return iyd(this)};_.Ib=function uyd(){return kyd(this)};_.k=null;var R4=sfb(THe,'ElkGraphElementImpl',739);feb(740,739,{110:1,342:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1});_.Lh=function Gyd(a,b,c){return vyd(this,a,b,c)};_.Wh=function Hyd(a){return wyd(this,a)};_.bi=function Iyd(a,b){xyd(this,a,b)};_.ii=function Jyd(){return pvd(),nvd};_.ki=function Kyd(a){yyd(this,a)};_.lh=function Lyd(){return this.f};_.mh=function Myd(){return this.g};_.nh=function Nyd(){return this.i};_.oh=function Oyd(){return this.j};_.ph=function Pyd(a,b){zyd(this,a,b)};_.qh=function Qyd(a,b){Byd(this,a,b)};_.rh=function Ryd(a){Dyd(this,a)};_.sh=function Syd(a){Eyd(this,a)};_.Ib=function Tyd(){return Fyd(this)};_.f=0;_.g=0;_.i=0;_.j=0;var Y4=sfb(THe,'ElkShapeImpl',740);feb(741,740,{110:1,342:1,84:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1});_.Lh=function _yd(a,b,c){return Uyd(this,a,b,c)};_.Sh=function azd(a,b,c){return Vyd(this,a,b,c)};_.Uh=function bzd(a,b,c){return Wyd(this,a,b,c)};_.Wh=function czd(a){return Xyd(this,a)};_.bi=function dzd(a,b){Yyd(this,a,b)};_.ii=function ezd(){return pvd(),fvd};_.ki=function fzd(a){Zyd(this,a)};_.hh=function gzd(){return !this.d&&(this.d=new Yie(G4,this,8,5)),this.d};_.ih=function hzd(){return !this.e&&(this.e=new Yie(G4,this,7,4)),this.e};var O4=sfb(THe,'ElkConnectableShapeImpl',741);feb(326,739,{110:1,342:1,74:1,167:1,326:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},rzd);_.Ah=function szd(a){return jzd(this,a)};_.Lh=function tzd(a,b,c){switch(a){case 3:return kzd(this);case 4:return !this.b&&(this.b=new Yie(E4,this,4,7)),this.b;case 5:return !this.c&&(this.c=new Yie(E4,this,5,8)),this.c;case 6:return !this.a&&(this.a=new C5d(F4,this,6,6)),this.a;case 7:return Geb(),!this.b&&(this.b=new Yie(E4,this,4,7)),this.b.i<=1&&(!this.c&&(this.c=new Yie(E4,this,5,8)),this.c.i<=1)?false:true;case 8:return Geb(),nzd(this)?true:false;case 9:return Geb(),ozd(this)?true:false;case 10:return Geb(),!this.b&&(this.b=new Yie(E4,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new Yie(E4,this,5,8)),this.c.i!=0)?true:false;}return cyd(this,a,b,c)};_.Sh=function uzd(a,b,c){var d;switch(b){case 3:!!this.Cb&&(c=(d=this.Db>>16,d>=0?jzd(this,c):this.Cb.Th(this,-1-d,null,c)));return izd(this,RD(a,27),c);case 4:return !this.b&&(this.b=new Yie(E4,this,4,7)),qLd(this.b,a,c);case 5:return !this.c&&(this.c=new Yie(E4,this,5,8)),qLd(this.c,a,c);case 6:return !this.a&&(this.a=new C5d(F4,this,6,6)),qLd(this.a,a,c);}return dyd(this,a,b,c)};_.Uh=function vzd(a,b,c){switch(b){case 3:return izd(this,null,c);case 4:return !this.b&&(this.b=new Yie(E4,this,4,7)),rLd(this.b,a,c);case 5:return !this.c&&(this.c=new Yie(E4,this,5,8)),rLd(this.c,a,c);case 6:return !this.a&&(this.a=new C5d(F4,this,6,6)),rLd(this.a,a,c);}return eyd(this,a,b,c)};_.Wh=function wzd(a){switch(a){case 3:return !!kzd(this);case 4:return !!this.b&&this.b.i!=0;case 5:return !!this.c&&this.c.i!=0;case 6:return !!this.a&&this.a.i!=0;case 7:return !this.b&&(this.b=new Yie(E4,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new Yie(E4,this,5,8)),this.c.i<=1));case 8:return nzd(this);case 9:return ozd(this);case 10:return !this.b&&(this.b=new Yie(E4,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new Yie(E4,this,5,8)),this.c.i!=0);}return fyd(this,a)};_.bi=function xzd(a,b){switch(a){case 3:pzd(this,RD(b,27));return;case 4:!this.b&&(this.b=new Yie(E4,this,4,7));sLd(this.b);!this.b&&(this.b=new Yie(E4,this,4,7));YGd(this.b,RD(b,16));return;case 5:!this.c&&(this.c=new Yie(E4,this,5,8));sLd(this.c);!this.c&&(this.c=new Yie(E4,this,5,8));YGd(this.c,RD(b,16));return;case 6:!this.a&&(this.a=new C5d(F4,this,6,6));sLd(this.a);!this.a&&(this.a=new C5d(F4,this,6,6));YGd(this.a,RD(b,16));return;}gyd(this,a,b)};_.ii=function yzd(){return pvd(),gvd};_.ki=function zzd(a){switch(a){case 3:pzd(this,null);return;case 4:!this.b&&(this.b=new Yie(E4,this,4,7));sLd(this.b);return;case 5:!this.c&&(this.c=new Yie(E4,this,5,8));sLd(this.c);return;case 6:!this.a&&(this.a=new C5d(F4,this,6,6));sLd(this.a);return;}hyd(this,a)};_.Ib=function Azd(){return qzd(this)};var P4=sfb(THe,'ElkEdgeImpl',326);feb(452,2083,{110:1,342:1,166:1,452:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},Rzd);_.Ah=function Szd(a){return Czd(this,a)};_.Lh=function Tzd(a,b,c){switch(a){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return !this.a&&(this.a=new XZd(D4,this,5)),this.a;case 6:return Fzd(this);case 7:if(b)return Ezd(this);return this.i;case 8:if(b)return Dzd(this);return this.f;case 9:return !this.g&&(this.g=new Yie(F4,this,9,10)),this.g;case 10:return !this.e&&(this.e=new Yie(F4,this,10,9)),this.e;case 11:return this.d;}return Axd(this,a,b,c)};_.Sh=function Uzd(a,b,c){var d,e,f;switch(b){case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?Czd(this,c):this.Cb.Th(this,-1-e,null,c)));return Bzd(this,RD(a,74),c);case 9:return !this.g&&(this.g=new Yie(F4,this,9,10)),qLd(this.g,a,c);case 10:return !this.e&&(this.e=new Yie(F4,this,10,9)),qLd(this.e,a,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(pvd(),hvd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((pvd(),hvd)),a,c)};_.Uh=function Vzd(a,b,c){switch(b){case 5:return !this.a&&(this.a=new XZd(D4,this,5)),rLd(this.a,a,c);case 6:return Bzd(this,null,c);case 9:return !this.g&&(this.g=new Yie(F4,this,9,10)),rLd(this.g,a,c);case 10:return !this.e&&(this.e=new Yie(F4,this,10,9)),rLd(this.e,a,c);}return Bxd(this,a,b,c)};_.Wh=function Wzd(a){switch(a){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return !!this.a&&this.a.i!=0;case 6:return !!Fzd(this);case 7:return !!this.i;case 8:return !!this.f;case 9:return !!this.g&&this.g.i!=0;case 10:return !!this.e&&this.e.i!=0;case 11:return this.d!=null;}return Cxd(this,a)};_.bi=function Xzd(a,b){switch(a){case 1:Ozd(this,Kfb(UD(b)));return;case 2:Pzd(this,Kfb(UD(b)));return;case 3:Hzd(this,Kfb(UD(b)));return;case 4:Izd(this,Kfb(UD(b)));return;case 5:!this.a&&(this.a=new XZd(D4,this,5));sLd(this.a);!this.a&&(this.a=new XZd(D4,this,5));YGd(this.a,RD(b,16));return;case 6:Mzd(this,RD(b,74));return;case 7:Lzd(this,RD(b,84));return;case 8:Kzd(this,RD(b,84));return;case 9:!this.g&&(this.g=new Yie(F4,this,9,10));sLd(this.g);!this.g&&(this.g=new Yie(F4,this,9,10));YGd(this.g,RD(b,16));return;case 10:!this.e&&(this.e=new Yie(F4,this,10,9));sLd(this.e);!this.e&&(this.e=new Yie(F4,this,10,9));YGd(this.e,RD(b,16));return;case 11:Jzd(this,WD(b));return;}Dxd(this,a,b)};_.ii=function Yzd(){return pvd(),hvd};_.ki=function Zzd(a){switch(a){case 1:Ozd(this,0);return;case 2:Pzd(this,0);return;case 3:Hzd(this,0);return;case 4:Izd(this,0);return;case 5:!this.a&&(this.a=new XZd(D4,this,5));sLd(this.a);return;case 6:Mzd(this,null);return;case 7:Lzd(this,null);return;case 8:Kzd(this,null);return;case 9:!this.g&&(this.g=new Yie(F4,this,9,10));sLd(this.g);return;case 10:!this.e&&(this.e=new Yie(F4,this,10,9));sLd(this.e);return;case 11:Jzd(this,null);return;}Exd(this,a)};_.Ib=function $zd(){return Qzd(this)};_.b=0;_.c=0;_.d=null;_.j=0;_.k=0;var Q4=sfb(THe,'ElkEdgeSectionImpl',452);feb(158,120,{110:1,94:1,93:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1});_.Lh=function cAd(a,b,c){var d;if(a==0){return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab}return zvd(this,a-AYd(this.ii()),vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),a),b,c)};_.Sh=function dAd(a,b,c){var d,e;if(b==0){return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c)}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),e.wk().zk(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Uh=function eAd(a,b,c){var d,e;if(b==0){return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c)}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),e.wk().Ak(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Wh=function fAd(a){var b;if(a==0){return !!this.Ab&&this.Ab.i!=0}return Avd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.Zh=function gAd(a){return _zd(this,a)};_.bi=function hAd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;}Bvd(this,a-AYd(this.ii()),vYd((c=RD(Ywd(this,16),29),!c?this.ii():c),a),b)};_.di=function iAd(a){$wd(this,128,a)};_.ii=function jAd(){return JTd(),xTd};_.ki=function kAd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;}Cvd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.pi=function lAd(){this.Bb|=1};_.qi=function mAd(a){return bAd(this,a)};_.Bb=0;var k8=sfb(SHe,'EModelElementImpl',158);feb(720,158,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},yAd);_.ri=function zAd(a,b){return tAd(this,a,b)};_.si=function AAd(a){var b,c,d,e,f;if(this.a!=BXd(a)||(a.Bb&256)!=0){throw Adb(new agb(ZHe+a.zb+WHe))}for(d=zYd(a);tYd(d.a).i!=0;){c=RD(N_d(d,0,(b=RD(QHd(tYd(d.a),0),89),f=b.c,ZD(f,90)?RD(f,29):(JTd(),zTd))),29);if(DXd(c)){e=BXd(c).wi().si(c);RD(e,54).ci(a);return e}d=zYd(c)}return (a.D!=null?a.D:a.B)=='java.util.Map$Entry'?new LUd(a):new zUd(a)};_.ti=function BAd(a,b){return uAd(this,a,b)};_.Lh=function CAd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.a;}return zvd(this,a-AYd((JTd(),uTd)),vYd((d=RD(Ywd(this,16),29),!d?uTd:d),a),b,c)};_.Sh=function DAd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 1:!!this.a&&(c=RD(this.a,54).Th(this,4,t7,c));return rAd(this,RD(a,241),c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),uTd):d),b),69),e.wk().zk(this,Wwd(this),b-AYd((JTd(),uTd)),a,c)};_.Uh=function EAd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 1:return rAd(this,null,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),uTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),uTd)),a,c)};_.Wh=function FAd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return !!this.a;}return Avd(this,a-AYd((JTd(),uTd)),vYd((b=RD(Ywd(this,16),29),!b?uTd:b),a))};_.bi=function GAd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:wAd(this,RD(b,241));return;}Bvd(this,a-AYd((JTd(),uTd)),vYd((c=RD(Ywd(this,16),29),!c?uTd:c),a),b)};_.ii=function HAd(){return JTd(),uTd};_.ki=function IAd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:wAd(this,null);return;}Cvd(this,a-AYd((JTd(),uTd)),vYd((b=RD(Ywd(this,16),29),!b?uTd:b),a))};var nAd,oAd,pAd;var i8=sfb(SHe,'EFactoryImpl',720);feb(1037,720,{110:1,2113:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},KAd);_.ri=function LAd(a,b){switch(a.hk()){case 12:return RD(b,149).Pg();case 13:return jeb(b);default:throw Adb(new agb(VHe+a.xe()+WHe));}};_.si=function MAd(a){var b,c,d,e,f,g,h,i;switch(a.G==-1&&(a.G=(b=BXd(a),b?fZd(b.vi(),a):-1)),a.G){case 4:return f=new hCd,f;case 6:return g=new ACd,g;case 7:return h=new PCd,h;case 8:return d=new rzd,d;case 9:return c=new Xxd,c;case 10:return e=new Rzd,e;case 11:return i=new _Cd,i;default:throw Adb(new agb(ZHe+a.zb+WHe));}};_.ti=function NAd(a,b){switch(a.hk()){case 13:case 12:return null;default:throw Adb(new agb(VHe+a.xe()+WHe));}};var S4=sfb(THe,'ElkGraphFactoryImpl',1037);feb(448,158,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1});_.Gh=function RAd(){var a,b;b=(a=RD(Ywd(this,16),29),P$d(rYd(!a?this.ii():a)));return b==null?(N2d(),N2d(),M2d):new e3d(this,b)};_.Lh=function SAd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.xe();}return zvd(this,a-AYd(this.ii()),vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),a),b,c)};_.Wh=function TAd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;}return Avd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.bi=function UAd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:this.ui(WD(b));return;}Bvd(this,a-AYd(this.ii()),vYd((c=RD(Ywd(this,16),29),!c?this.ii():c),a),b)};_.ii=function VAd(){return JTd(),yTd};_.ki=function WAd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:this.ui(null);return;}Cvd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.xe=function XAd(){return this.zb};_.ui=function YAd(a){PAd(this,a)};_.Ib=function ZAd(){return QAd(this)};_.zb=null;var o8=sfb(SHe,'ENamedElementImpl',448);feb(184,448,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},EBd);_.Ah=function GBd(a){return qBd(this,a)};_.Lh=function HBd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return !this.rb&&(this.rb=new J5d(this,i7,this)),this.rb;case 6:return !this.vb&&(this.vb=new G5d(t7,this,6,7)),this.vb;case 7:if(b)return this.Db>>16==7?RD(this.Cb,241):null;return gBd(this);}return zvd(this,a-AYd((JTd(),CTd)),vYd((d=RD(Ywd(this,16),29),!d?CTd:d),a),b,c)};_.Sh=function IBd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 4:!!this.sb&&(c=RD(this.sb,54).Th(this,1,n7,c));return hBd(this,RD(a,480),c);case 5:return !this.rb&&(this.rb=new J5d(this,i7,this)),qLd(this.rb,a,c);case 6:return !this.vb&&(this.vb=new G5d(t7,this,6,7)),qLd(this.vb,a,c);case 7:!!this.Cb&&(c=(e=this.Db>>16,e>=0?qBd(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,7,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),CTd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),CTd)),a,c)};_.Uh=function JBd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 4:return hBd(this,null,c);case 5:return !this.rb&&(this.rb=new J5d(this,i7,this)),rLd(this.rb,a,c);case 6:return !this.vb&&(this.vb=new G5d(t7,this,6,7)),rLd(this.vb,a,c);case 7:return xvd(this,null,7,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),CTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),CTd)),a,c)};_.Wh=function KBd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return !!this.sb;case 5:return !!this.rb&&this.rb.i!=0;case 6:return !!this.vb&&this.vb.i!=0;case 7:return !!gBd(this);}return Avd(this,a-AYd((JTd(),CTd)),vYd((b=RD(Ywd(this,16),29),!b?CTd:b),a))};_.Zh=function LBd(a){var b;b=sBd(this,a);return b?b:_zd(this,a)};_.bi=function MBd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:PAd(this,WD(b));return;case 2:DBd(this,WD(b));return;case 3:CBd(this,WD(b));return;case 4:BBd(this,RD(b,480));return;case 5:!this.rb&&(this.rb=new J5d(this,i7,this));sLd(this.rb);!this.rb&&(this.rb=new J5d(this,i7,this));YGd(this.rb,RD(b,16));return;case 6:!this.vb&&(this.vb=new G5d(t7,this,6,7));sLd(this.vb);!this.vb&&(this.vb=new G5d(t7,this,6,7));YGd(this.vb,RD(b,16));return;}Bvd(this,a-AYd((JTd(),CTd)),vYd((c=RD(Ywd(this,16),29),!c?CTd:c),a),b)};_.ei=function NBd(a){var b,c;if(!!a&&!!this.rb){for(c=new dMd(this.rb);c.e!=c.i.gc();){b=bMd(c);ZD(b,364)&&(RD(b,364).w=null)}}$wd(this,64,a)};_.ii=function OBd(){return JTd(),CTd};_.ki=function PBd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:PAd(this,null);return;case 2:DBd(this,null);return;case 3:CBd(this,null);return;case 4:BBd(this,null);return;case 5:!this.rb&&(this.rb=new J5d(this,i7,this));sLd(this.rb);return;case 6:!this.vb&&(this.vb=new G5d(t7,this,6,7));sLd(this.vb);return;}Cvd(this,a-AYd((JTd(),CTd)),vYd((b=RD(Ywd(this,16),29),!b?CTd:b),a))};_.pi=function QBd(){rBd(this)};_.vi=function RBd(){return !this.rb&&(this.rb=new J5d(this,i7,this)),this.rb};_.wi=function SBd(){return this.sb};_.xi=function TBd(){return this.ub};_.yi=function UBd(){return this.xb};_.zi=function VBd(){return this.yb};_.Ai=function WBd(a){this.ub=a};_.Ib=function XBd(){var a;if((this.Db&64)!=0)return QAd(this);a=new Shb(QAd(this));a.a+=' (nsURI: ';Nhb(a,this.yb);a.a+=', nsPrefix: ';Nhb(a,this.xb);a.a+=')';return a.a};_.xb=null;_.yb=null;var $Ad;var y8=sfb(SHe,'EPackageImpl',184);feb(569,184,{110:1,2115:1,569:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},_Bd);_.q=false;_.r=false;var YBd=false;var T4=sfb(THe,'ElkGraphPackageImpl',569);feb(366,740,{110:1,342:1,167:1,135:1,422:1,366:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},hCd);_.Ah=function iCd(a){return cCd(this,a)};_.Lh=function jCd(a,b,c){switch(a){case 7:return dCd(this);case 8:return this.a;}return vyd(this,a,b,c)};_.Sh=function kCd(a,b,c){var d;switch(b){case 7:!!this.Cb&&(c=(d=this.Db>>16,d>=0?cCd(this,c):this.Cb.Th(this,-1-d,null,c)));return bCd(this,RD(a,167),c);}return dyd(this,a,b,c)};_.Uh=function lCd(a,b,c){if(b==7){return bCd(this,null,c)}return eyd(this,a,b,c)};_.Wh=function mCd(a){switch(a){case 7:return !!dCd(this);case 8:return !lhb('',this.a);}return wyd(this,a)};_.bi=function nCd(a,b){switch(a){case 7:eCd(this,RD(b,167));return;case 8:fCd(this,WD(b));return;}xyd(this,a,b)};_.ii=function oCd(){return pvd(),jvd};_.ki=function pCd(a){switch(a){case 7:eCd(this,null);return;case 8:fCd(this,'');return;}yyd(this,a)};_.Ib=function qCd(){return gCd(this)};_.a='';var U4=sfb(THe,'ElkLabelImpl',366);feb(207,741,{110:1,342:1,84:1,167:1,27:1,422:1,207:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},ACd);_.Ah=function BCd(a){return sCd(this,a)};_.Lh=function CCd(a,b,c){switch(a){case 9:return !this.c&&(this.c=new C5d(K4,this,9,9)),this.c;case 10:return !this.a&&(this.a=new C5d(J4,this,10,11)),this.a;case 11:return vCd(this);case 12:return !this.b&&(this.b=new C5d(G4,this,12,3)),this.b;case 13:return Geb(),!this.a&&(this.a=new C5d(J4,this,10,11)),this.a.i>0?true:false;}return Uyd(this,a,b,c)};_.Sh=function DCd(a,b,c){var d;switch(b){case 9:return !this.c&&(this.c=new C5d(K4,this,9,9)),qLd(this.c,a,c);case 10:return !this.a&&(this.a=new C5d(J4,this,10,11)),qLd(this.a,a,c);case 11:!!this.Cb&&(c=(d=this.Db>>16,d>=0?sCd(this,c):this.Cb.Th(this,-1-d,null,c)));return rCd(this,RD(a,27),c);case 12:return !this.b&&(this.b=new C5d(G4,this,12,3)),qLd(this.b,a,c);}return Vyd(this,a,b,c)};_.Uh=function ECd(a,b,c){switch(b){case 9:return !this.c&&(this.c=new C5d(K4,this,9,9)),rLd(this.c,a,c);case 10:return !this.a&&(this.a=new C5d(J4,this,10,11)),rLd(this.a,a,c);case 11:return rCd(this,null,c);case 12:return !this.b&&(this.b=new C5d(G4,this,12,3)),rLd(this.b,a,c);}return Wyd(this,a,b,c)};_.Wh=function FCd(a){switch(a){case 9:return !!this.c&&this.c.i!=0;case 10:return !!this.a&&this.a.i!=0;case 11:return !!vCd(this);case 12:return !!this.b&&this.b.i!=0;case 13:return !this.a&&(this.a=new C5d(J4,this,10,11)),this.a.i>0;}return Xyd(this,a)};_.bi=function GCd(a,b){switch(a){case 9:!this.c&&(this.c=new C5d(K4,this,9,9));sLd(this.c);!this.c&&(this.c=new C5d(K4,this,9,9));YGd(this.c,RD(b,16));return;case 10:!this.a&&(this.a=new C5d(J4,this,10,11));sLd(this.a);!this.a&&(this.a=new C5d(J4,this,10,11));YGd(this.a,RD(b,16));return;case 11:yCd(this,RD(b,27));return;case 12:!this.b&&(this.b=new C5d(G4,this,12,3));sLd(this.b);!this.b&&(this.b=new C5d(G4,this,12,3));YGd(this.b,RD(b,16));return;}Yyd(this,a,b)};_.ii=function HCd(){return pvd(),kvd};_.ki=function ICd(a){switch(a){case 9:!this.c&&(this.c=new C5d(K4,this,9,9));sLd(this.c);return;case 10:!this.a&&(this.a=new C5d(J4,this,10,11));sLd(this.a);return;case 11:yCd(this,null);return;case 12:!this.b&&(this.b=new C5d(G4,this,12,3));sLd(this.b);return;}Zyd(this,a)};_.Ib=function JCd(){return zCd(this)};var V4=sfb(THe,'ElkNodeImpl',207);feb(193,741,{110:1,342:1,84:1,167:1,123:1,422:1,193:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},PCd);_.Ah=function QCd(a){return LCd(this,a)};_.Lh=function RCd(a,b,c){if(a==9){return MCd(this)}return Uyd(this,a,b,c)};_.Sh=function SCd(a,b,c){var d;switch(b){case 9:!!this.Cb&&(c=(d=this.Db>>16,d>=0?LCd(this,c):this.Cb.Th(this,-1-d,null,c)));return KCd(this,RD(a,27),c);}return Vyd(this,a,b,c)};_.Uh=function TCd(a,b,c){if(b==9){return KCd(this,null,c)}return Wyd(this,a,b,c)};_.Wh=function UCd(a){if(a==9){return !!MCd(this)}return Xyd(this,a)};_.bi=function VCd(a,b){switch(a){case 9:NCd(this,RD(b,27));return;}Yyd(this,a,b)};_.ii=function WCd(){return pvd(),lvd};_.ki=function XCd(a){switch(a){case 9:NCd(this,null);return;}Zyd(this,a)};_.Ib=function YCd(){return OCd(this)};var W4=sfb(THe,'ElkPortImpl',193);var O6=ufb(sIe,'BasicEMap/Entry');feb(1122,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,119:1,120:1},_Cd);_.Fb=function fDd(a){return this===a};_.ld=function hDd(){return this.b};_.Hb=function jDd(){return kFb(this)};_.Di=function lDd(a){ZCd(this,RD(a,149))};_.Lh=function aDd(a,b,c){switch(a){case 0:return this.b;case 1:return this.c;}return Dvd(this,a,b,c)};_.Wh=function bDd(a){switch(a){case 0:return !!this.b;case 1:return this.c!=null;}return Kvd(this,a)};_.bi=function cDd(a,b){switch(a){case 0:ZCd(this,RD(b,149));return;case 1:$Cd(this,b);return;}Wvd(this,a,b)};_.ii=function dDd(){return pvd(),mvd};_.ki=function eDd(a){switch(a){case 0:ZCd(this,null);return;case 1:$Cd(this,null);return;}$vd(this,a)};_.Bi=function gDd(){var a;if(this.a==-1){a=this.b;this.a=!a?0:tb(a)}return this.a};_.md=function iDd(){return this.c};_.Ci=function kDd(a){this.a=a};_.nd=function mDd(a){var b;b=this.c;$Cd(this,a);return b};_.Ib=function nDd(){var a;if((this.Db&64)!=0)return awd(this);a=new bib;Zhb(Zhb(Zhb(a,this.b?this.b.Pg():vve),SAe),Ghb(this.c));return a.a};_.a=-1;_.c=null;var X4=sfb(THe,'ElkPropertyToValueMapEntryImpl',1122);feb(996,1,{},BDd);var Z4=sfb(vIe,'JsonAdapter',996);feb(216,63,swe,CDd);var $4=sfb(vIe,'JsonImportException',216);feb(868,1,{},IEd);var O5=sfb(vIe,'JsonImporter',868);feb(903,1,{},JEd);var _4=sfb(vIe,'JsonImporter/lambda$0$Type',903);feb(904,1,{},KEd);var a5=sfb(vIe,'JsonImporter/lambda$1$Type',904);feb(912,1,{},LEd);var b5=sfb(vIe,'JsonImporter/lambda$10$Type',912);feb(914,1,{},MEd);var c5=sfb(vIe,'JsonImporter/lambda$11$Type',914);feb(915,1,{},NEd);var d5=sfb(vIe,'JsonImporter/lambda$12$Type',915);feb(921,1,{},OEd);var e5=sfb(vIe,'JsonImporter/lambda$13$Type',921);feb(920,1,{},PEd);var f5=sfb(vIe,'JsonImporter/lambda$14$Type',920);feb(916,1,{},QEd);var g5=sfb(vIe,'JsonImporter/lambda$15$Type',916);feb(917,1,{},REd);var h5=sfb(vIe,'JsonImporter/lambda$16$Type',917);feb(918,1,{},SEd);var i5=sfb(vIe,'JsonImporter/lambda$17$Type',918);feb(919,1,{},TEd);var j5=sfb(vIe,'JsonImporter/lambda$18$Type',919);feb(924,1,{},UEd);var k5=sfb(vIe,'JsonImporter/lambda$19$Type',924);feb(905,1,{},VEd);var l5=sfb(vIe,'JsonImporter/lambda$2$Type',905);feb(922,1,{},WEd);var m5=sfb(vIe,'JsonImporter/lambda$20$Type',922);feb(923,1,{},XEd);var n5=sfb(vIe,'JsonImporter/lambda$21$Type',923);feb(927,1,{},YEd);var o5=sfb(vIe,'JsonImporter/lambda$22$Type',927);feb(925,1,{},ZEd);var p5=sfb(vIe,'JsonImporter/lambda$23$Type',925);feb(926,1,{},$Ed);var q5=sfb(vIe,'JsonImporter/lambda$24$Type',926);feb(929,1,{},_Ed);var r5=sfb(vIe,'JsonImporter/lambda$25$Type',929);feb(928,1,{},aFd);var s5=sfb(vIe,'JsonImporter/lambda$26$Type',928);feb(930,1,Qve,bFd);_.Cd=function cFd(a){_Dd(this.b,this.a,WD(a))};var t5=sfb(vIe,'JsonImporter/lambda$27$Type',930);feb(931,1,Qve,dFd);_.Cd=function eFd(a){aEd(this.b,this.a,WD(a))};var u5=sfb(vIe,'JsonImporter/lambda$28$Type',931);feb(932,1,{},fFd);var v5=sfb(vIe,'JsonImporter/lambda$29$Type',932);feb(908,1,{},gFd);var w5=sfb(vIe,'JsonImporter/lambda$3$Type',908);feb(933,1,{},hFd);var x5=sfb(vIe,'JsonImporter/lambda$30$Type',933);feb(934,1,{},iFd);var y5=sfb(vIe,'JsonImporter/lambda$31$Type',934);feb(935,1,{},jFd);var z5=sfb(vIe,'JsonImporter/lambda$32$Type',935);feb(936,1,{},kFd);var A5=sfb(vIe,'JsonImporter/lambda$33$Type',936);feb(937,1,{},lFd);var B5=sfb(vIe,'JsonImporter/lambda$34$Type',937);feb(870,1,{},nFd);var C5=sfb(vIe,'JsonImporter/lambda$35$Type',870);feb(941,1,{},pFd);var D5=sfb(vIe,'JsonImporter/lambda$36$Type',941);feb(938,1,Qve,qFd);_.Cd=function rFd(a){jEd(this.a,RD(a,377))};var E5=sfb(vIe,'JsonImporter/lambda$37$Type',938);feb(939,1,Qve,sFd);_.Cd=function tFd(a){kEd(this.a,this.b,RD(a,166))};var F5=sfb(vIe,'JsonImporter/lambda$38$Type',939);feb(940,1,Qve,uFd);_.Cd=function vFd(a){lEd(this.a,this.b,RD(a,166))};var G5=sfb(vIe,'JsonImporter/lambda$39$Type',940);feb(906,1,{},wFd);var H5=sfb(vIe,'JsonImporter/lambda$4$Type',906);feb(942,1,Qve,xFd);_.Cd=function yFd(a){mEd(this.a,RD(a,8))};var I5=sfb(vIe,'JsonImporter/lambda$40$Type',942);feb(907,1,{},zFd);var J5=sfb(vIe,'JsonImporter/lambda$5$Type',907);feb(911,1,{},AFd);var K5=sfb(vIe,'JsonImporter/lambda$6$Type',911);feb(909,1,{},BFd);var L5=sfb(vIe,'JsonImporter/lambda$7$Type',909);feb(910,1,{},CFd);var M5=sfb(vIe,'JsonImporter/lambda$8$Type',910);feb(913,1,{},DFd);var N5=sfb(vIe,'JsonImporter/lambda$9$Type',913);feb(961,1,Qve,MFd);_.Cd=function NFd(a){oDd(this.a,new OC(WD(a)))};var P5=sfb(vIe,'JsonMetaDataConverter/lambda$0$Type',961);feb(962,1,Qve,OFd);_.Cd=function PFd(a){IFd(this.a,RD(a,245))};var Q5=sfb(vIe,'JsonMetaDataConverter/lambda$1$Type',962);feb(963,1,Qve,QFd);_.Cd=function RFd(a){JFd(this.a,RD(a,143))};var R5=sfb(vIe,'JsonMetaDataConverter/lambda$2$Type',963);feb(964,1,Qve,SFd);_.Cd=function TFd(a){KFd(this.a,RD(a,170))};var S5=sfb(vIe,'JsonMetaDataConverter/lambda$3$Type',964);feb(245,22,{3:1,34:1,22:1,245:1},bGd);var UFd,VFd,WFd,XFd,YFd,ZFd,$Fd,_Fd;var T5=tfb(jze,'GraphFeature',245,WI,dGd,cGd);var eGd;feb(11,1,{34:1,149:1},jGd,kGd,lGd,mGd);_.Fd=function nGd(a){return gGd(this,RD(a,149))};_.Fb=function oGd(a){return hGd(this,a)};_.Sg=function pGd(){return iGd(this)};_.Pg=function qGd(){return this.b};_.Hb=function rGd(){return ohb(this.b)};_.Ib=function sGd(){return this.b};var Y5=sfb(jze,'Property',11);feb(671,1,fye,uGd);_.Ne=function vGd(a,b){return tGd(this,RD(a,96),RD(b,96))};_.Fb=function wGd(a){return this===a};_.Oe=function xGd(){return new Frb(this)};var X5=sfb(jze,'PropertyHolderComparator',671);feb(709,1,Ave,QGd);_.Nb=function RGd(a){Ztb(this,a)};_.Pb=function TGd(){return PGd(this)};_.Qb=function UGd(){$tb()};_.Ob=function SGd(){return !!this.a};var Z5=sfb(KIe,'ElkGraphUtil/AncestorIterator',709);var Y6=ufb(sIe,'EList');feb(70,56,{20:1,31:1,56:1,16:1,15:1,70:1,61:1});_.bd=function hHd(a,b){VGd(this,a,b)};_.Fc=function iHd(a){return WGd(this,a)};_.cd=function jHd(a,b){return XGd(this,a,b)};_.Gc=function kHd(a){return YGd(this,a)};_.Ii=function lHd(){return new yMd(this)};_.Ji=function mHd(){return new BMd(this)};_.Ki=function nHd(a){return ZGd(this,a)};_.Li=function oHd(){return true};_.Mi=function pHd(a,b){};_.Ni=function qHd(){};_.Oi=function rHd(a,b){$Gd(this,a,b)};_.Pi=function sHd(a,b,c){};_.Qi=function tHd(a,b){};_.Ri=function uHd(a,b,c){};_.Fb=function vHd(a){return _Gd(this,a)};_.Hb=function wHd(){return cHd(this)};_.Si=function xHd(){return false};_.Kc=function yHd(){return new dMd(this)};_.ed=function zHd(){return new mMd(this)};_.fd=function AHd(a){var b;b=this.gc();if(a<0||a>b)throw Adb(new aMd(a,b));return new nMd(this,a)};_.Ui=function BHd(a,b){this.Ti(a,this.dd(b))};_.Mc=function CHd(a){return dHd(this,a)};_.Wi=function DHd(a,b){return b};_.hd=function EHd(a,b){return eHd(this,a,b)};_.Ib=function FHd(){return fHd(this)};_.Yi=function GHd(){return true};_.Zi=function HHd(a,b){return gHd(this,b)};var u6=sfb(sIe,'AbstractEList',70);feb(66,70,PIe,YHd,ZHd,$Hd);_.Ei=function _Hd(a,b){return IHd(this,a,b)};_.Fi=function aId(a){return JHd(this,a)};_.Gi=function bId(a,b){KHd(this,a,b)};_.Hi=function cId(a){LHd(this,a)};_.$i=function dId(a){return NHd(this,a)};_.$b=function eId(){OHd(this)};_.Hc=function fId(a){return PHd(this,a)};_.Xb=function gId(a){return QHd(this,a)};_._i=function hId(a){var b,c,d;++this.j;c=this.g==null?0:this.g.length;if(a>c){d=this.g;b=c+(c/2|0)+4;b<a&&(b=a);this.g=this.aj(b);d!=null&&hib(d,0,this.g,0,this.i)}};_.dd=function iId(a){return RHd(this,a)};_.dc=function jId(){return this.i==0};_.Ti=function kId(a,b){return SHd(this,a,b)};_.aj=function lId(a){return $C(jJ,rve,1,a,5,1)};_.Vi=function mId(a){return this.g[a]};_.gd=function nId(a){return THd(this,a)};_.Xi=function oId(a,b){return UHd(this,a,b)};_.gc=function pId(){return this.i};_.Pc=function qId(){return WHd(this)};_.Qc=function rId(a){return XHd(this,a)};_.i=0;var D6=sfb(sIe,'BasicEList',66);var a7=ufb(sIe,'TreeIterator');feb(708,66,QIe);_.Nb=function vId(a){Ztb(this,a)};_.Ob=function wId(){return this.g==null&&!this.c?sId(this):this.g==null||this.i!=0&&RD(this.g[this.i-1],51).Ob()};_.Pb=function xId(){return tId(this)};_.Qb=function yId(){if(!this.e){throw Adb(new dgb('There is no valid object to remove.'))}this.e.Qb()};_.c=false;var v6=sfb(sIe,'AbstractTreeIterator',708);feb(700,708,QIe,zId);_.bj=function AId(a){var b;b=RD(a,58).Gh().Kc();ZD(b,287)&&RD(b,287).wl(new BId);return b};var _5=sfb(KIe,'ElkGraphUtil/PropertiesSkippingTreeIterator',700);feb(965,1,{},BId);var $5=sfb(KIe,'ElkGraphUtil/PropertiesSkippingTreeIterator/1',965);var CId,DId;var b6=sfb(KIe,'ElkReflect',null);feb(901,1,CGe,JId);_.Rg=function KId(a){return EId(),Asb(RD(a,181))};var a6=sfb(KIe,'ElkReflect/lambda$0$Type',901);var LId;var _6=ufb(sIe,'ResourceLocator');feb(1065,1,{});var S6=sfb(sIe,'DelegatingResourceLocator',1065);feb(1066,1065,{});var c6=sfb('org.eclipse.emf.common','EMFPlugin',1066);var d6=ufb(DJe,'Adapter');var e6=ufb(DJe,'Notification');feb(1174,1,EJe);_.cj=function VId(){return this.d};_.dj=function WId(a){};_.ej=function XId(a){this.d=a};_.fj=function YId(a){this.d==a&&(this.d=null)};_.d=null;var f6=sfb(JHe,'AdapterImpl',1174);feb(2093,70,FJe);_.Ei=function dJd(a,b){return ZId(this,a,b)};_.Fi=function eJd(a){var b,c,d;++this.j;if(a.dc()){return false}else{b=this.Ej();for(d=a.Kc();d.Ob();){c=d.Pb();this.rj(this.Zi(b,c));++b}return true}};_.Gi=function fJd(a,b){$Id(this,a,b)};_.Hi=function gJd(a){_Id(this,a)};_.pj=function hJd(){return this.sj()};_.$b=function iJd(){aJd(this,this.Ej(),this.Fj())};_.Hc=function jJd(a){return this.uj(a)};_.Ic=function kJd(a){return this.vj(a)};_.qj=function lJd(a,b){this.Bj().Um()};_.rj=function mJd(a){this.Bj().Um()};_.sj=function nJd(){return this.Bj()};_.tj=function oJd(){this.Bj().Um()};_.uj=function pJd(a){return this.Bj().Um()};_.vj=function qJd(a){return this.Bj().Um()};_.wj=function rJd(a){return this.Bj().Um()};_.xj=function sJd(a){return this.Bj().Um()};_.yj=function tJd(){return this.Bj().Um()};_.zj=function uJd(a){return this.Bj().Um()};_.Aj=function vJd(){return this.Bj().Um()};_.Cj=function wJd(a){return this.Bj().Um()};_.Dj=function xJd(a,b){return this.Bj().Um()};_.Ej=function yJd(){return this.Bj().Um()};_.Fj=function zJd(){return this.Bj().Um()};_.Gj=function AJd(a){return this.Bj().Um()};_.Hj=function BJd(){return this.Bj().Um()};_.Fb=function CJd(a){return this.wj(a)};_.Xb=function DJd(a){return this.Wi(a,this.xj(a))};_.Hb=function EJd(){return this.yj()};_.dd=function FJd(a){return this.zj(a)};_.dc=function GJd(){return this.Aj()};_.Ti=function HJd(a,b){return bJd(this,a,b)};_.Vi=function IJd(a){return this.xj(a)};_.gd=function JJd(a){return cJd(this,a)};_.Mc=function KJd(a){var b;b=this.dd(a);if(b>=0){this.gd(b);return true}else{return false}};_.Xi=function LJd(a,b){return this.Dj(a,this.Zi(a,b))};_.gc=function MJd(){return this.Ej()};_.Pc=function NJd(){return this.Fj()};_.Qc=function OJd(a){return this.Gj(a)};_.Ib=function PJd(){return this.Hj()};var R6=sfb(sIe,'DelegatingEList',2093);feb(2094,2093,FJe);_.Ei=function XJd(a,b){return QJd(this,a,b)};_.Fi=function YJd(a){return this.Ei(this.Ej(),a)};_.Gi=function ZJd(a,b){RJd(this,a,b)};_.Hi=function $Jd(a){SJd(this,a)};_.Li=function _Jd(){return !this.Mj()};_.$b=function aKd(){VJd(this)};_.Ij=function bKd(a,b,c,d,e){return new aLd(this,a,b,c,d,e)};_.Jj=function cKd(a){qvd(this.jj(),a)};_.Kj=function dKd(){return null};_.Lj=function eKd(){return -1};_.jj=function fKd(){return null};_.Mj=function gKd(){return false};_.Nj=function hKd(a,b){return b};_.Oj=function iKd(a,b){return b};_.Pj=function jKd(){return false};_.Qj=function kKd(){return !this.Aj()};_.Ti=function lKd(a,b){var c,d;if(this.Pj()){d=this.Qj();c=bJd(this,a,b);this.Jj(this.Ij(7,sgb(b),c,a,d));return c}else{return bJd(this,a,b)}};_.gd=function mKd(a){var b,c,d,e;if(this.Pj()){c=null;d=this.Qj();b=this.Ij(4,e=cJd(this,a),null,a,d);if(this.Mj()&&!!e){c=this.Oj(e,c);if(!c){this.Jj(b)}else{c.nj(b);c.oj()}}else{if(!c){this.Jj(b)}else{c.nj(b);c.oj()}}return e}else{e=cJd(this,a);if(this.Mj()&&!!e){c=this.Oj(e,null);!!c&&c.oj()}return e}};_.Xi=function nKd(a,b){return WJd(this,a,b)};var i6=sfb(JHe,'DelegatingNotifyingListImpl',2094);feb(152,1,GJe);_.nj=function PKd(a){return oKd(this,a)};_.oj=function QKd(){pKd(this)};_.gj=function RKd(){return this.d};_.Kj=function SKd(){return null};_.Rj=function TKd(){return null};_.hj=function UKd(a){return -1};_.ij=function VKd(){return yKd(this)};_.jj=function WKd(){return null};_.kj=function XKd(){return HKd(this)};_.lj=function YKd(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o};_.Sj=function ZKd(){return false};_.mj=function $Kd(a){var b,c,d,e,f,g,h,i,j,k,l;switch(this.d){case 1:case 2:{e=a.gj();switch(e){case 1:case 2:{f=a.jj();if(dE(f)===dE(this.jj())&&this.hj(null)==a.hj(null)){this.g=a.ij();a.gj()==1&&(this.d=1);return true}}}}case 4:{e=a.gj();switch(e){case 4:{f=a.jj();if(dE(f)===dE(this.jj())&&this.hj(null)==a.hj(null)){j=JKd(this);i=this.o<0?this.o<-2?-2-this.o-1:-1:this.o;g=a.lj();this.d=6;l=new ZHd(2);if(i<=g){WGd(l,this.n);WGd(l,a.kj());this.g=cD(WC(kE,1),Pwe,28,15,[this.o=i,g+1])}else{WGd(l,a.kj());WGd(l,this.n);this.g=cD(WC(kE,1),Pwe,28,15,[this.o=g,i])}this.n=l;j||(this.o=-2-this.o-1);return true}break}}break}case 6:{e=a.gj();switch(e){case 4:{f=a.jj();if(dE(f)===dE(this.jj())&&this.hj(null)==a.hj(null)){j=JKd(this);g=a.lj();k=RD(this.g,53);d=$C(kE,Pwe,28,k.length+1,15,1);b=0;while(b<k.length){h=k[b];if(h<=g){d[b++]=h;++g}else{break}}c=RD(this.n,15);c.bd(b,a.kj());d[b]=g;while(++b<d.length){d[b]=k[b-1]}this.g=d;j||(this.o=-2-d[0]);return true}break}}break}}return false};_.Ib=function _Kd(){var a,b,c,d;d=new Shb(nfb(this.Rm)+'@'+(b=tb(this)>>>0,b.toString(16)));d.a+=' (eventType: ';switch(this.d){case 1:{d.a+='SET';break}case 2:{d.a+='UNSET';break}case 3:{d.a+='ADD';break}case 5:{d.a+='ADD_MANY';break}case 4:{d.a+='REMOVE';break}case 6:{d.a+='REMOVE_MANY';break}case 7:{d.a+='MOVE';break}case 8:{d.a+='REMOVING_ADAPTER';break}case 9:{d.a+='RESOLVE';break}default:{Lhb(d,this.d);break}}IKd(this)&&(d.a+=', touch: true',d);d.a+=', position: ';Lhb(d,this.o<0?this.o<-2?-2-this.o-1:-1:this.o);d.a+=', notifier: ';Mhb(d,this.jj());d.a+=', feature: ';Mhb(d,this.Kj());d.a+=', oldValue: ';Mhb(d,HKd(this));d.a+=', newValue: ';if(this.d==6&&ZD(this.g,53)){c=RD(this.g,53);d.a+='[';for(a=0;a<c.length;){d.a+=c[a];++a<c.length&&(d.a+=pve,d)}d.a+=']'}else{Mhb(d,yKd(this))}d.a+=', isTouch: ';Ohb(d,IKd(this));d.a+=', wasSet: ';Ohb(d,JKd(this));d.a+=')';return d.a};_.d=0;_.e=0;_.f=0;_.j=0;_.k=0;_.o=0;_.p=0;var k6=sfb(JHe,'NotificationImpl',152);feb(1188,152,GJe,aLd);_.Kj=function bLd(){return this.a.Kj()};_.hj=function cLd(a){return this.a.Lj()};_.jj=function dLd(){return this.a.jj()};var h6=sfb(JHe,'DelegatingNotifyingListImpl/1',1188);feb(251,66,PIe,fLd,gLd);_.Fc=function hLd(a){return eLd(this,RD(a,378))};_.nj=function iLd(a){return eLd(this,a)};_.oj=function jLd(){var a,b,c;for(a=0;a<this.i;++a){b=RD(this.g[a],378);c=b.jj();c!=null&&b.gj()!=-1&&RD(c,94).xh(b)}};_.aj=function kLd(a){return $C(e6,rve,378,a,0,1)};var j6=sfb(JHe,'NotificationChainImpl',251);feb(1524,93,IHe);_.uh=function lLd(){return this.e};_.wh=function mLd(){return (this.f&1)!=0};_.f=1;var l6=sfb(JHe,'NotifierImpl',1524);feb(2091,66,PIe);_.Ei=function yLd(a,b){return nLd(this,a,b)};_.Fi=function zLd(a){return this.Ei(this.i,a)};_.Gi=function ALd(a,b){oLd(this,a,b)};_.Hi=function BLd(a){pLd(this,a)};_.Li=function CLd(){return !this.Mj()};_.$b=function DLd(){sLd(this)};_.Ij=function ELd(a,b,c,d,e){return new VLd(this,a,b,c,d,e)};_.Jj=function FLd(a){qvd(this.jj(),a)};_.Kj=function GLd(){return null};_.Lj=function HLd(){return -1};_.jj=function ILd(){return null};_.Mj=function JLd(){return false};_.Tj=function KLd(){return false};_.Nj=function LLd(a,b){return b};_.Oj=function MLd(a,b){return b};_.Pj=function NLd(){return false};_.Qj=function OLd(){return this.i!=0};_.Ti=function PLd(a,b){return uLd(this,a,b)};_.gd=function QLd(a){return vLd(this,a)};_.Xi=function RLd(a,b){return xLd(this,a,b)};_.Uj=function SLd(a,b){return b};_.Vj=function TLd(a,b){return b};_.Wj=function ULd(a,b,c){return c};var n6=sfb(JHe,'NotifyingListImpl',2091);feb(1187,152,GJe,VLd);_.Kj=function WLd(){return this.a.Kj()};_.hj=function XLd(a){return this.a.Lj()};_.jj=function YLd(){return this.a.jj()};var m6=sfb(JHe,'NotifyingListImpl/1',1187);feb(966,66,PIe,ZLd);_.Hc=function $Ld(a){if(this.i>10){if(!this.b||this.c.j!=this.a){this.b=new btb(this);this.a=this.j}return Zsb(this.b,a)}else{return PHd(this,a)}};_.Yi=function _Ld(){return true};_.a=0;var o6=sfb(sIe,'AbstractEList/1',966);feb(302,77,lxe,aMd);var p6=sfb(sIe,'AbstractEList/BasicIndexOutOfBoundsException',302);feb(37,1,Ave,dMd);_.Nb=function gMd(a){Ztb(this,a)};_.Xj=function eMd(){if(this.i.j!=this.f){throw Adb(new Jrb)}};_.Yj=function fMd(){return bMd(this)};_.Ob=function hMd(){return this.e!=this.i.gc()};_.Pb=function iMd(){return this.Yj()};_.Qb=function jMd(){cMd(this)};_.e=0;_.f=0;_.g=-1;var q6=sfb(sIe,'AbstractEList/EIterator',37);feb(286,37,Jve,mMd,nMd);_.Qb=function vMd(){cMd(this)};_.Rb=function oMd(a){kMd(this,a)};_.Zj=function pMd(){var b;try{b=this.d.Xb(--this.e);this.Xj();this.g=this.e;return b}catch(a){a=zdb(a);if(ZD(a,77)){this.Xj();throw Adb(new Dvb)}else throw Adb(a)}};_.$j=function qMd(a){lMd(this,a)};_.Sb=function rMd(){return this.e!=0};_.Tb=function sMd(){return this.e};_.Ub=function tMd(){return this.Zj()};_.Vb=function uMd(){return this.e-1};_.Wb=function wMd(a){this.$j(a)};var r6=sfb(sIe,'AbstractEList/EListIterator',286);feb(355,37,Ave,yMd);_.Yj=function zMd(){return xMd(this)};_.Qb=function AMd(){throw Adb(new jib)};var s6=sfb(sIe,'AbstractEList/NonResolvingEIterator',355);feb(398,286,Jve,BMd,CMd);_.Rb=function DMd(a){throw Adb(new jib)};_.Yj=function EMd(){var b;try{b=this.c.Vi(this.e);this.Xj();this.g=this.e++;return b}catch(a){a=zdb(a);if(ZD(a,77)){this.Xj();throw Adb(new Dvb)}else throw Adb(a)}};_.Zj=function FMd(){var b;try{b=this.c.Vi(--this.e);this.Xj();this.g=this.e;return b}catch(a){a=zdb(a);if(ZD(a,77)){this.Xj();throw Adb(new Dvb)}else throw Adb(a)}};_.Qb=function GMd(){throw Adb(new jib)};_.Wb=function HMd(a){throw Adb(new jib)};var t6=sfb(sIe,'AbstractEList/NonResolvingEListIterator',398);feb(2080,70,JJe);_.Ei=function PMd(a,b){var c,d,e,f,g,h,i,j,k,l,m;e=b.gc();if(e!=0){j=RD(Ywd(this.a,4),129);k=j==null?0:j.length;m=k+e;d=NMd(this,m);l=k-a;l>0&&hib(j,a,d,a+e,l);i=b.Kc();for(g=0;g<e;++g){h=i.Pb();c=a+g;LMd(d,c,gHd(this,h))}Bde(this,d);for(f=0;f<e;++f){h=d[a];this.Mi(a,h);++a}return true}else{++this.j;return false}};_.Fi=function QMd(a){var b,c,d,e,f,g,h,i,j;d=a.gc();if(d!=0){i=(c=RD(Ywd(this.a,4),129),c==null?0:c.length);j=i+d;b=NMd(this,j);h=a.Kc();for(f=i;f<j;++f){g=h.Pb();LMd(b,f,gHd(this,g))}Bde(this,b);for(e=i;e<j;++e){g=b[e];this.Mi(e,g)}return true}else{++this.j;return false}};_.Gi=function RMd(a,b){var c,d,e,f;d=RD(Ywd(this.a,4),129);e=d==null?0:d.length;c=NMd(this,e+1);f=gHd(this,b);a!=e&&hib(d,a,c,a+1,e-a);bD(c,a,f);Bde(this,c);this.Mi(a,b)};_.Hi=function SMd(a){var b,c,d;d=(c=RD(Ywd(this.a,4),129),c==null?0:c.length);b=NMd(this,d+1);LMd(b,d,gHd(this,a));Bde(this,b);this.Mi(d,a)};_.Ii=function TMd(){return new sNd(this)};_.Ji=function UMd(){return new vNd(this)};_.Ki=function VMd(a){var b,c;c=(b=RD(Ywd(this.a,4),129),b==null?0:b.length);if(a<0||a>c)throw Adb(new aMd(a,c));return new wNd(this,a)};_.$b=function WMd(){var a,b;++this.j;a=RD(Ywd(this.a,4),129);b=a==null?0:a.length;Bde(this,null);$Gd(this,b,a)};_.Hc=function XMd(a){var b,c,d,e,f;b=RD(Ywd(this.a,4),129);if(b!=null){if(a!=null){for(d=b,e=0,f=d.length;e<f;++e){c=d[e];if(pb(a,c)){return true}}}else{for(d=b,e=0,f=d.length;e<f;++e){c=d[e];if(dE(c)===dE(a)){return true}}}}return false};_.Xb=function YMd(a){var b,c;b=RD(Ywd(this.a,4),129);c=b==null?0:b.length;if(a>=c)throw Adb(new aMd(a,c));return b[a]};_.dd=function ZMd(a){var b,c,d;b=RD(Ywd(this.a,4),129);if(b!=null){if(a!=null){for(c=0,d=b.length;c<d;++c){if(pb(a,b[c])){return c}}}else{for(c=0,d=b.length;c<d;++c){if(dE(b[c])===dE(a)){return c}}}}return -1};_.dc=function $Md(){return RD(Ywd(this.a,4),129)==null};_.Kc=function _Md(){return new jNd(this)};_.ed=function aNd(){return new nNd(this)};_.fd=function bNd(a){var b,c;c=(b=RD(Ywd(this.a,4),129),b==null?0:b.length);if(a<0||a>c)throw Adb(new aMd(a,c));return new oNd(this,a)};_.Ti=function cNd(a,b){var c,d,e;c=MMd(this);e=c==null?0:c.length;if(a>=e)throw Adb(new veb(MIe+a+NIe+e));if(b>=e)throw Adb(new veb(OIe+b+NIe+e));d=c[b];if(a!=b){a<b?hib(c,a,c,a+1,b-a):hib(c,b+1,c,b,a-b);bD(c,a,d);Bde(this,c)}return d};_.Vi=function dNd(a){return RD(Ywd(this.a,4),129)[a]};_.gd=function eNd(a){return OMd(this,a)};_.Xi=function fNd(a,b){var c,d;c=MMd(this);d=c[a];LMd(c,a,gHd(this,b));Bde(this,c);return d};_.gc=function gNd(){var a;return a=RD(Ywd(this.a,4),129),a==null?0:a.length};_.Pc=function hNd(){var a,b,c;a=RD(Ywd(this.a,4),129);c=a==null?0:a.length;b=$C(d6,IJe,424,c,0,1);c>0&&hib(a,0,b,0,c);return b};_.Qc=function iNd(a){var b,c,d;b=RD(Ywd(this.a,4),129);d=b==null?0:b.length;if(d>0){if(a.length<d){c=IMd(rb(a).c,d);a=c}hib(b,0,a,0,d)}a.length>d&&bD(a,d,null);return a};var JMd;var A6=sfb(sIe,'ArrayDelegatingEList',2080);feb(1051,37,Ave,jNd);_.Xj=function kNd(){if(this.b.j!=this.f||dE(RD(Ywd(this.b.a,4),129))!==dE(this.a)){throw Adb(new Jrb)}};_.Qb=function lNd(){cMd(this);this.a=RD(Ywd(this.b.a,4),129)};var w6=sfb(sIe,'ArrayDelegatingEList/EIterator',1051);feb(722,286,Jve,nNd,oNd);_.Xj=function pNd(){if(this.b.j!=this.f||dE(RD(Ywd(this.b.a,4),129))!==dE(this.a)){throw Adb(new Jrb)}};_.$j=function qNd(a){lMd(this,a);this.a=RD(Ywd(this.b.a,4),129)};_.Qb=function rNd(){cMd(this);this.a=RD(Ywd(this.b.a,4),129)};var x6=sfb(sIe,'ArrayDelegatingEList/EListIterator',722);feb(1052,355,Ave,sNd);_.Xj=function tNd(){if(this.b.j!=this.f||dE(RD(Ywd(this.b.a,4),129))!==dE(this.a)){throw Adb(new Jrb)}};var y6=sfb(sIe,'ArrayDelegatingEList/NonResolvingEIterator',1052);feb(723,398,Jve,vNd,wNd);_.Xj=function xNd(){if(this.b.j!=this.f||dE(RD(Ywd(this.b.a,4),129))!==dE(this.a)){throw Adb(new Jrb)}};var z6=sfb(sIe,'ArrayDelegatingEList/NonResolvingEListIterator',723);feb(615,302,lxe,yNd);var B6=sfb(sIe,'BasicEList/BasicIndexOutOfBoundsException',615);feb(710,66,PIe,zNd);_.bd=function ANd(a,b){throw Adb(new jib)};_.Fc=function BNd(a){throw Adb(new jib)};_.cd=function CNd(a,b){throw Adb(new jib)};_.Gc=function DNd(a){throw Adb(new jib)};_.$b=function ENd(){throw Adb(new jib)};_._i=function FNd(a){throw Adb(new jib)};_.Kc=function GNd(){return this.Ii()};_.ed=function HNd(){return this.Ji()};_.fd=function INd(a){return this.Ki(a)};_.Ti=function JNd(a,b){throw Adb(new jib)};_.Ui=function KNd(a,b){throw Adb(new jib)};_.gd=function LNd(a){throw Adb(new jib)};_.Mc=function MNd(a){throw Adb(new jib)};_.hd=function NNd(a,b){throw Adb(new jib)};var C6=sfb(sIe,'BasicEList/UnmodifiableEList',710);feb(721,1,{3:1,20:1,16:1,15:1,61:1,597:1});_.bd=function mOd(a,b){ONd(this,a,RD(b,44))};_.Fc=function nOd(a){return PNd(this,RD(a,44))};_.Jc=function vOd(a){xgb(this,a)};_.Xb=function wOd(a){return RD(QHd(this.c,a),136)};_.Ti=function FOd(a,b){return RD(this.c.Ti(a,b),44)};_.Ui=function GOd(a,b){eOd(this,a,RD(b,44))};_.Lc=function JOd(){return new SDb(null,new Swb(this,16))};_.gd=function KOd(a){return RD(this.c.gd(a),44)};_.hd=function MOd(a,b){return kOd(this,a,RD(b,44))};_.jd=function OOd(a){tvb(this,a)};_.Nc=function POd(){return new Swb(this,16)};_.Oc=function QOd(){return new SDb(null,new Swb(this,16))};_.cd=function oOd(a,b){return this.c.cd(a,b)};_.Gc=function pOd(a){return this.c.Gc(a)};_.$b=function qOd(){this.c.$b()};_.Hc=function rOd(a){return this.c.Hc(a)};_.Ic=function sOd(a){return Be(this.c,a)};_._j=function tOd(){var a,b,c;if(this.d==null){this.d=$C(D6,KJe,66,2*this.f+1,0,1);c=this.e;this.f=0;for(b=this.c.Kc();b.e!=b.i.gc();){a=RD(b.Yj(),136);UNd(this,a)}this.e=c}};_.Fb=function uOd(a){return ZNd(this,a)};_.Hb=function xOd(){return cHd(this.c)};_.dd=function yOd(a){return this.c.dd(a)};_.ak=function zOd(){this.c=new YOd(this)};_.dc=function AOd(){return this.f==0};_.Kc=function BOd(){return this.c.Kc()};_.ed=function COd(){return this.c.ed()};_.fd=function DOd(a){return this.c.fd(a)};_.bk=function EOd(){return dOd(this)};_.ck=function HOd(a,b,c){return new ZPd(a,b,c)};_.dk=function IOd(){return new cPd};_.Mc=function LOd(a){return hOd(this,a)};_.gc=function NOd(){return this.f};_.kd=function ROd(a,b){return new Rkb(this.c,a,b)};_.Pc=function SOd(){return this.c.Pc()};_.Qc=function TOd(a){return this.c.Qc(a)};_.Ib=function UOd(){return fHd(this.c)};_.e=0;_.f=0;var Q6=sfb(sIe,'BasicEMap',721);feb(1046,66,PIe,YOd);_.Mi=function ZOd(a,b){VOd(this,RD(b,136))};_.Pi=function _Od(a,b,c){var d;++(d=this,RD(b,136),d).a.e};_.Qi=function aPd(a,b){WOd(this,RD(b,136))};_.Ri=function bPd(a,b,c){XOd(this,RD(b,136),RD(c,136))};_.Oi=function $Od(a,b){TNd(this.a)};var E6=sfb(sIe,'BasicEMap/1',1046);feb(1047,66,PIe,cPd);_.aj=function dPd(a){return $C(N6,LJe,621,a,0,1)};var F6=sfb(sIe,'BasicEMap/2',1047);feb(1048,Eve,Fve,ePd);_.$b=function fPd(){this.a.c.$b()};_.Hc=function gPd(a){return QNd(this.a,a)};_.Kc=function hPd(){return this.a.f==0?(jQd(),iQd.a):new DPd(this.a)};_.Mc=function iPd(a){var b;b=this.a.f;jOd(this.a,a);return this.a.f!=b};_.gc=function jPd(){return this.a.f};var G6=sfb(sIe,'BasicEMap/3',1048);feb(1049,31,Dve,kPd);_.$b=function lPd(){this.a.c.$b()};_.Hc=function mPd(a){return RNd(this.a,a)};_.Kc=function nPd(){return this.a.f==0?(jQd(),iQd.a):new FPd(this.a)};_.gc=function oPd(){return this.a.f};var H6=sfb(sIe,'BasicEMap/4',1049);feb(1050,Eve,Fve,qPd);_.$b=function rPd(){this.a.c.$b()};_.Hc=function sPd(a){var b,c,d,e,f,g,h,i,j;if(this.a.f>0&&ZD(a,44)){this.a._j();i=RD(a,44);h=i.ld();e=h==null?0:tb(h);f=bOd(this.a,e);b=this.a.d[f];if(b){c=RD(b.g,379);j=b.i;for(g=0;g<j;++g){d=c[g];if(d.Bi()==e&&d.Fb(i)){return true}}}}return false};_.Kc=function tPd(){return this.a.f==0?(jQd(),iQd.a):new xPd(this.a)};_.Mc=function uPd(a){return pPd(this,a)};_.gc=function vPd(){return this.a.f};var I6=sfb(sIe,'BasicEMap/5',1050);feb(622,1,Ave,xPd);_.Nb=function yPd(a){Ztb(this,a)};_.Ob=function zPd(){return this.b!=-1};_.Pb=function APd(){var a;if(this.f.e!=this.c){throw Adb(new Jrb)}if(this.b==-1){throw Adb(new Dvb)}this.d=this.a;this.e=this.b;wPd(this);a=RD(this.f.d[this.d].g[this.e],136);return this.ek(a)};_.Qb=function BPd(){if(this.f.e!=this.c){throw Adb(new Jrb)}if(this.e==-1){throw Adb(new cgb)}this.f.c.Mc(QHd(this.f.d[this.d],this.e));this.c=this.f.e;this.e=-1;this.a==this.d&&this.b!=-1&&--this.b};_.ek=function CPd(a){return a};_.a=0;_.b=-1;_.c=0;_.d=0;_.e=0;var J6=sfb(sIe,'BasicEMap/BasicEMapIterator',622);feb(1044,622,Ave,DPd);_.ek=function EPd(a){return a.ld()};var K6=sfb(sIe,'BasicEMap/BasicEMapKeyIterator',1044);feb(1045,622,Ave,FPd);_.ek=function GPd(a){return a.md()};var L6=sfb(sIe,'BasicEMap/BasicEMapValueIterator',1045);feb(1043,1,Cve,IPd);_.wc=function OPd(a){Bvb(this,a)};_.yc=function TPd(a,b,c){return Cvb(this,a,b,c)};_.$b=function JPd(){this.a.c.$b()};_._b=function KPd(a){return HPd(this,a)};_.uc=function LPd(a){return RNd(this.a,a)};_.vc=function MPd(){return YNd(this.a)};_.Fb=function NPd(a){return ZNd(this.a,a)};_.xc=function PPd(a){return $Nd(this.a,a)};_.Hb=function QPd(){return cHd(this.a.c)};_.dc=function RPd(){return this.a.f==0};_.ec=function SPd(){return cOd(this.a)};_.zc=function UPd(a,b){return fOd(this.a,a,b)};_.Bc=function VPd(a){return jOd(this.a,a)};_.gc=function WPd(){return this.a.f};_.Ib=function XPd(){return fHd(this.a.c)};_.Cc=function YPd(){return lOd(this.a)};var M6=sfb(sIe,'BasicEMap/DelegatingMap',1043);feb(621,1,{44:1,136:1,621:1},ZPd);_.Fb=function $Pd(a){var b;if(ZD(a,44)){b=RD(a,44);return (this.b!=null?pb(this.b,b.ld()):dE(this.b)===dE(b.ld()))&&(this.c!=null?pb(this.c,b.md()):dE(this.c)===dE(b.md()))}else{return false}};_.Bi=function _Pd(){return this.a};_.ld=function aQd(){return this.b};_.md=function bQd(){return this.c};_.Hb=function cQd(){return this.a^(this.c==null?0:tb(this.c))};_.Ci=function dQd(a){this.a=a};_.Di=function eQd(a){throw Adb(new xz)};_.nd=function fQd(a){var b;b=this.c;this.c=a;return b};_.Ib=function gQd(){return this.b+'->'+this.c};_.a=0;var N6=sfb(sIe,'BasicEMap/EntryImpl',621);feb(546,1,{},hQd);var P6=sfb(sIe,'BasicEMap/View',546);var iQd;feb(783,1,{});_.Fb=function xQd(a){return Rt((yob(),vob),a)};_.Hb=function yQd(){return Cob((yob(),vob))};_.Ib=function zQd(){return Fe((yob(),vob))};var V6=sfb(sIe,'ECollections/BasicEmptyUnmodifiableEList',783);feb(1348,1,Jve,AQd);_.Nb=function CQd(a){Ztb(this,a)};_.Rb=function BQd(a){throw Adb(new jib)};_.Ob=function DQd(){return false};_.Sb=function EQd(){return false};_.Pb=function FQd(){throw Adb(new Dvb)};_.Tb=function GQd(){return 0};_.Ub=function HQd(){throw Adb(new Dvb)};_.Vb=function IQd(){return -1};_.Qb=function JQd(){throw Adb(new jib)};_.Wb=function KQd(a){throw Adb(new jib)};var U6=sfb(sIe,'ECollections/BasicEmptyUnmodifiableEList/1',1348);feb(1346,783,{20:1,16:1,15:1,61:1},LQd);_.bd=function MQd(a,b){mQd()};_.Fc=function NQd(a){return nQd()};_.cd=function OQd(a,b){return oQd()};_.Gc=function PQd(a){return pQd()};_.$b=function QQd(){qQd()};_.Hc=function RQd(a){return false};_.Ic=function SQd(a){return false};_.Jc=function TQd(a){xgb(this,a)};_.Xb=function UQd(a){return Iob((yob(),vob,a)),null};_.dd=function VQd(a){return -1};_.dc=function WQd(){return true};_.Kc=function XQd(){return this.a};_.ed=function YQd(){return this.a};_.fd=function ZQd(a){return this.a};_.Ti=function $Qd(a,b){return rQd()};_.Ui=function _Qd(a,b){sQd()};_.Lc=function aRd(){return new SDb(null,new Swb(this,16))};_.gd=function bRd(a){return tQd()};_.Mc=function cRd(a){return uQd()};_.hd=function dRd(a,b){return vQd()};_.gc=function eRd(){return 0};_.jd=function fRd(a){tvb(this,a)};_.Nc=function gRd(){return new Swb(this,16)};_.Oc=function hRd(){return new SDb(null,new Swb(this,16))};_.kd=function iRd(a,b){return yob(),new Rkb(vob,a,b)};_.Pc=function jRd(){return De((yob(),vob))};_.Qc=function kRd(a){return yob(),Ee(vob,a)};var W6=sfb(sIe,'ECollections/EmptyUnmodifiableEList',1346);feb(1347,783,{20:1,16:1,15:1,61:1,597:1},lRd);_.bd=function mRd(a,b){mQd()};_.Fc=function nRd(a){return nQd()};_.cd=function oRd(a,b){return oQd()};_.Gc=function pRd(a){return pQd()};_.$b=function qRd(){qQd()};_.Hc=function rRd(a){return false};_.Ic=function sRd(a){return false};_.Jc=function tRd(a){xgb(this,a)};_.Xb=function uRd(a){return Iob((yob(),vob,a)),null};_.dd=function vRd(a){return -1};_.dc=function wRd(){return true};_.Kc=function xRd(){return this.a};_.ed=function yRd(){return this.a};_.fd=function zRd(a){return this.a};_.Ti=function BRd(a,b){return rQd()};_.Ui=function CRd(a,b){sQd()};_.Lc=function DRd(){return new SDb(null,new Swb(this,16))};_.gd=function ERd(a){return tQd()};_.Mc=function FRd(a){return uQd()};_.hd=function GRd(a,b){return vQd()};_.gc=function HRd(){return 0};_.jd=function IRd(a){tvb(this,a)};_.Nc=function JRd(){return new Swb(this,16)};_.Oc=function KRd(){return new SDb(null,new Swb(this,16))};_.kd=function LRd(a,b){return yob(),new Rkb(vob,a,b)};_.Pc=function MRd(){return De((yob(),vob))};_.Qc=function NRd(a){return yob(),Ee(vob,a)};_.bk=function ARd(){return yob(),yob(),wob};var X6=sfb(sIe,'ECollections/EmptyUnmodifiableEMap',1347);var Z6=ufb(sIe,'Enumerator');var ORd;feb(288,1,{288:1},lSd);_.Fb=function pSd(a){var b;if(this===a)return true;if(!ZD(a,288))return false;b=RD(a,288);return this.f==b.f&&rSd(this.i,b.i)&&qSd(this.a,(this.f&256)!=0?(b.f&256)!=0?b.a:null:(b.f&256)!=0?null:b.a)&&qSd(this.d,b.d)&&qSd(this.g,b.g)&&qSd(this.e,b.e)&&iSd(this,b)};_.Hb=function uSd(){return this.f};_.Ib=function CSd(){return jSd(this)};_.f=0;var SRd=0,TRd=0,URd=0,VRd=0,WRd=0,XRd=0,YRd=0,ZRd=0,$Rd=0,_Rd,aSd=0,bSd=0,cSd=0,dSd=0,eSd,fSd;var c7=sfb(sIe,'URI',288);feb(1121,45,Hxe,MSd);_.zc=function NSd(a,b){return RD($jb(this,WD(a),RD(b,288)),288)};var b7=sfb(sIe,'URI/URICache',1121);feb(506,66,PIe,OSd,PSd);_.Si=function QSd(){return true};var d7=sfb(sIe,'UniqueEList',506);feb(590,63,swe,RSd);var e7=sfb(sIe,'WrappedException',590);var f7=ufb(vHe,OJe);var A7=ufb(vHe,PJe);var y7=ufb(vHe,QJe);var g7=ufb(vHe,RJe);var i7=ufb(vHe,SJe);var h7=ufb(vHe,'EClass');var k7=ufb(vHe,'EDataType');var SSd;feb(1233,45,Hxe,VSd);_.xc=function WSd(a){return bE(a)?Xjb(this,a):Wd(qtb(this.f,a))};var j7=sfb(vHe,'EDataType/Internal/ConversionDelegate/Factory/Registry/Impl',1233);var m7=ufb(vHe,'EEnum');var l7=ufb(vHe,TJe);var o7=ufb(vHe,UJe);var s7=ufb(vHe,VJe);var XSd;var u7=ufb(vHe,WJe);var v7=ufb(vHe,XJe);feb(1042,1,{},_Sd);_.Ib=function aTd(){return 'NIL'};var w7=sfb(vHe,'EStructuralFeature/Internal/DynamicValueHolder/1',1042);var bTd;feb(1041,45,Hxe,eTd);_.xc=function fTd(a){return bE(a)?Xjb(this,a):Wd(qtb(this.f,a))};var x7=sfb(vHe,'EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl',1041);var z7=ufb(vHe,YJe);var B7=ufb(vHe,'EValidator/PatternMatcher');var gTd;var iTd;var kTd;var mTd,nTd,oTd,pTd,qTd,rTd,sTd,tTd,uTd,vTd,wTd,xTd,yTd,zTd,ATd,BTd,CTd,DTd,ETd,FTd,GTd,HTd,ITd;var Jbb=ufb(ZJe,'FeatureMap/Entry');feb(545,1,{76:1},KTd);_.Lk=function LTd(){return this.a};_.md=function MTd(){return this.b};var C7=sfb(SHe,'BasicEObjectImpl/1',545);feb(1040,1,$Je,NTd);_.Fk=function OTd(a){return Fvd(this.a,this.b,a)};_.Qj=function PTd(){return Lvd(this.a,this.b)};_.Wb=function QTd(a){Xvd(this.a,this.b,a)};_.Gk=function RTd(){_vd(this.a,this.b)};var D7=sfb(SHe,'BasicEObjectImpl/4',1040);feb(2081,1,{114:1});_.Mk=function UTd(a){this.e=a==0?STd:$C(jJ,rve,1,a,5,1)};_.li=function VTd(a){return this.e[a]};_.mi=function WTd(a,b){this.e[a]=b};_.ni=function XTd(a){this.e[a]=null};_.Nk=function YTd(){return this.c};_.Ok=function ZTd(){throw Adb(new jib)};_.Pk=function $Td(){throw Adb(new jib)};_.Qk=function _Td(){return this.d};_.Rk=function aUd(){return this.e!=null};_.Sk=function bUd(a){this.c=a};_.Tk=function cUd(a){throw Adb(new jib)};_.Uk=function dUd(a){throw Adb(new jib)};_.Vk=function eUd(a){this.d=a};var STd;var E7=sfb(SHe,'BasicEObjectImpl/EPropertiesHolderBaseImpl',2081);feb(192,2081,{114:1},fUd);_.Ok=function gUd(){return this.a};_.Pk=function hUd(){return this.b};_.Tk=function iUd(a){this.a=a};_.Uk=function jUd(a){this.b=a};var F7=sfb(SHe,'BasicEObjectImpl/EPropertiesHolderImpl',192);feb(516,99,RHe,kUd);_.uh=function lUd(){return this.f};_.zh=function mUd(){return this.k};_.Bh=function nUd(a,b){this.g=a;this.i=b};_.Dh=function oUd(){return (this.j&2)==0?this.ii():this.$h().Nk()};_.Fh=function pUd(){return this.i};_.wh=function qUd(){return (this.j&1)!=0};_.Ph=function rUd(){return this.g};_.Vh=function sUd(){return (this.j&4)!=0};_.$h=function tUd(){return !this.k&&(this.k=new fUd),this.k};_.ci=function uUd(a){this.$h().Sk(a);a?(this.j|=2):(this.j&=-3)};_.ei=function vUd(a){this.$h().Uk(a);a?(this.j|=4):(this.j&=-5)};_.ii=function wUd(){return (lTd(),kTd).S};_.i=0;_.j=1;var q8=sfb(SHe,'EObjectImpl',516);feb(798,516,{110:1,94:1,93:1,58:1,114:1,54:1,99:1},zUd);_.li=function AUd(a){return this.e[a]};_.mi=function BUd(a,b){this.e[a]=b};_.ni=function CUd(a){this.e[a]=null};_.Dh=function DUd(){return this.d};_.Ih=function EUd(a){return BYd(this.d,a)};_.Kh=function FUd(){return this.d};_.Oh=function GUd(){return this.e!=null};_.$h=function HUd(){!this.k&&(this.k=new VUd);return this.k};_.ci=function IUd(a){this.d=a};_.hi=function JUd(){var a;if(this.e==null){a=AYd(this.d);this.e=a==0?xUd:$C(jJ,rve,1,a,5,1)}return this};_.ji=function KUd(){return 0};var xUd;var J7=sfb(SHe,'DynamicEObjectImpl',798);feb(1522,798,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1},LUd);_.Fb=function NUd(a){return this===a};_.Hb=function RUd(){return kFb(this)};_.ci=function MUd(a){this.d=a;this.b=wYd(a,'key');this.c=wYd(a,aIe)};_.Bi=function OUd(){var a;if(this.a==-1){a=Gvd(this,this.b);this.a=a==null?0:tb(a)}return this.a};_.ld=function PUd(){return Gvd(this,this.b)};_.md=function QUd(){return Gvd(this,this.c)};_.Ci=function SUd(a){this.a=a};_.Di=function TUd(a){Xvd(this,this.b,a)};_.nd=function UUd(a){var b;b=Gvd(this,this.c);Xvd(this,this.c,a);return b};_.a=0;var H7=sfb(SHe,'DynamicEObjectImpl/BasicEMapEntry',1522);feb(1523,1,{114:1},VUd);_.Mk=function WUd(a){throw Adb(new jib)};_.li=function XUd(a){throw Adb(new jib)};_.mi=function YUd(a,b){throw Adb(new jib)};_.ni=function ZUd(a){throw Adb(new jib)};_.Nk=function $Ud(){throw Adb(new jib)};_.Ok=function _Ud(){return this.a};_.Pk=function aVd(){return this.b};_.Qk=function bVd(){return this.c};_.Rk=function cVd(){throw Adb(new jib)};_.Sk=function dVd(a){throw Adb(new jib)};_.Tk=function eVd(a){this.a=a};_.Uk=function fVd(a){this.b=a};_.Vk=function gVd(a){this.c=a};var I7=sfb(SHe,'DynamicEObjectImpl/DynamicEPropertiesHolderImpl',1523);feb(519,158,{110:1,94:1,93:1,598:1,155:1,58:1,114:1,54:1,99:1,519:1,158:1,119:1,120:1},pVd);_.Ah=function qVd(a){return iVd(this,a)};_.Lh=function rVd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.d;case 2:return c?(!this.b&&(this.b=new SVd((JTd(),FTd),C8,this)),this.b):(!this.b&&(this.b=new SVd((JTd(),FTd),C8,this)),dOd(this.b));case 3:return kVd(this);case 4:return !this.a&&(this.a=new XZd(r7,this,4)),this.a;case 5:return !this.c&&(this.c=new zie(r7,this,5)),this.c;}return zvd(this,a-AYd((JTd(),mTd)),vYd((d=RD(Ywd(this,16),29),!d?mTd:d),a),b,c)};_.Sh=function sVd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 3:!!this.Cb&&(c=(e=this.Db>>16,e>=0?iVd(this,c):this.Cb.Th(this,-1-e,null,c)));return hVd(this,RD(a,155),c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),mTd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),mTd)),a,c)};_.Uh=function tVd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 2:return !this.b&&(this.b=new SVd((JTd(),FTd),C8,this)),BVd(this.b,a,c);case 3:return hVd(this,null,c);case 4:return !this.a&&(this.a=new XZd(r7,this,4)),rLd(this.a,a,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),mTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),mTd)),a,c)};_.Wh=function uVd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return !!this.b&&this.b.f!=0;case 3:return !!kVd(this);case 4:return !!this.a&&this.a.i!=0;case 5:return !!this.c&&this.c.i!=0;}return Avd(this,a-AYd((JTd(),mTd)),vYd((b=RD(Ywd(this,16),29),!b?mTd:b),a))};_.bi=function vVd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:mVd(this,WD(b));return;case 2:!this.b&&(this.b=new SVd((JTd(),FTd),C8,this));CVd(this.b,b);return;case 3:lVd(this,RD(b,155));return;case 4:!this.a&&(this.a=new XZd(r7,this,4));sLd(this.a);!this.a&&(this.a=new XZd(r7,this,4));YGd(this.a,RD(b,16));return;case 5:!this.c&&(this.c=new zie(r7,this,5));sLd(this.c);!this.c&&(this.c=new zie(r7,this,5));YGd(this.c,RD(b,16));return;}Bvd(this,a-AYd((JTd(),mTd)),vYd((c=RD(Ywd(this,16),29),!c?mTd:c),a),b)};_.ii=function wVd(){return JTd(),mTd};_.ki=function xVd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:nVd(this,null);return;case 2:!this.b&&(this.b=new SVd((JTd(),FTd),C8,this));this.b.c.$b();return;case 3:lVd(this,null);return;case 4:!this.a&&(this.a=new XZd(r7,this,4));sLd(this.a);return;case 5:!this.c&&(this.c=new zie(r7,this,5));sLd(this.c);return;}Cvd(this,a-AYd((JTd(),mTd)),vYd((b=RD(Ywd(this,16),29),!b?mTd:b),a))};_.Ib=function yVd(){return oVd(this)};_.d=null;var L7=sfb(SHe,'EAnnotationImpl',519);feb(141,721,_Je,DVd);_.Gi=function EVd(a,b){zVd(this,a,RD(b,44))};_.Wk=function FVd(a,b){return AVd(this,RD(a,44),b)};_.$i=function GVd(a){return RD(RD(this.c,71).$i(a),136)};_.Ii=function HVd(){return RD(this.c,71).Ii()};_.Ji=function IVd(){return RD(this.c,71).Ji()};_.Ki=function JVd(a){return RD(this.c,71).Ki(a)};_.Xk=function KVd(a,b){return BVd(this,a,b)};_.Fk=function LVd(a){return RD(this.c,79).Fk(a)};_.ak=function MVd(){};_.Qj=function NVd(){return RD(this.c,79).Qj()};_.ck=function OVd(a,b,c){var d;d=RD(BXd(this.b).wi().si(this.b),136);d.Ci(a);d.Di(b);d.nd(c);return d};_.dk=function PVd(){return new uje(this)};_.Wb=function QVd(a){CVd(this,a)};_.Gk=function RVd(){RD(this.c,79).Gk()};var Dbb=sfb(ZJe,'EcoreEMap',141);feb(165,141,_Je,SVd);_._j=function TVd(){var a,b,c,d,e,f;if(this.d==null){f=$C(D6,KJe,66,2*this.f+1,0,1);for(c=this.c.Kc();c.e!=c.i.gc();){b=RD(c.Yj(),136);d=b.Bi();e=(d&lve)%f.length;a=f[e];!a&&(a=f[e]=new uje(this));a.Fc(b)}this.d=f}};var K7=sfb(SHe,'EAnnotationImpl/1',165);feb(292,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,481:1,54:1,99:1,158:1,292:1,119:1,120:1});_.Lh=function eWd(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Geb(),(this.Bb&256)!=0?true:false;case 3:return Geb(),(this.Bb&512)!=0?true:false;case 4:return sgb(this.s);case 5:return sgb(this.t);case 6:return Geb(),this.Jk()?true:false;case 7:return Geb(),e=this.s,e>=1?true:false;case 8:if(b)return WVd(this);return this.r;case 9:return this.q;}return zvd(this,a-AYd(this.ii()),vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),a),b,c)};_.Uh=function fWd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 9:return VVd(this,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),e.wk().Ak(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Wh=function gWd(a){var b,c;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Jk();case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&j2d(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&j2d(this.q).i==0);}return Avd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.bi=function hWd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:this.ui(WD(b));return;case 2:_Vd(this,Heb(TD(b)));return;case 3:aWd(this,Heb(TD(b)));return;case 4:$Vd(this,RD(b,17).a);return;case 5:this.Zk(RD(b,17).a);return;case 8:YVd(this,RD(b,142));return;case 9:d=XVd(this,RD(b,89),null);!!d&&d.oj();return;}Bvd(this,a-AYd(this.ii()),vYd((c=RD(Ywd(this,16),29),!c?this.ii():c),a),b)};_.ii=function iWd(){return JTd(),HTd};_.ki=function jWd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:this.ui(null);return;case 2:_Vd(this,true);return;case 3:aWd(this,true);return;case 4:$Vd(this,0);return;case 5:this.Zk(1);return;case 8:YVd(this,null);return;case 9:c=XVd(this,null,null);!!c&&c.oj();return;}Cvd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.pi=function kWd(){WVd(this);this.Bb|=1};_.Hk=function lWd(){return WVd(this)};_.Ik=function mWd(){return this.t};_.Jk=function nWd(){var a;return a=this.t,a>1||a==-1};_.Si=function oWd(){return (this.Bb&512)!=0};_.Yk=function pWd(a,b){return ZVd(this,a,b)};_.Zk=function qWd(a){bWd(this,a)};_.Ib=function rWd(){return cWd(this)};_.s=0;_.t=1;var A9=sfb(SHe,'ETypedElementImpl',292);feb(462,292,{110:1,94:1,93:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,462:1,292:1,119:1,120:1,692:1});_.Ah=function IWd(a){return sWd(this,a)};_.Lh=function JWd(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Geb(),(this.Bb&256)!=0?true:false;case 3:return Geb(),(this.Bb&512)!=0?true:false;case 4:return sgb(this.s);case 5:return sgb(this.t);case 6:return Geb(),this.Jk()?true:false;case 7:return Geb(),e=this.s,e>=1?true:false;case 8:if(b)return WVd(this);return this.r;case 9:return this.q;case 10:return Geb(),(this.Bb&gwe)!=0?true:false;case 11:return Geb(),(this.Bb&cKe)!=0?true:false;case 12:return Geb(),(this.Bb&qxe)!=0?true:false;case 13:return this.j;case 14:return tWd(this);case 15:return Geb(),(this.Bb&bKe)!=0?true:false;case 16:return Geb(),(this.Bb&Ove)!=0?true:false;case 17:return uWd(this);}return zvd(this,a-AYd(this.ii()),vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),a),b,c)};_.Sh=function KWd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 17:!!this.Cb&&(c=(e=this.Db>>16,e>=0?sWd(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,17,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),f.wk().zk(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Uh=function LWd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 9:return VVd(this,c);case 17:return xvd(this,null,17,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),e.wk().Ak(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Wh=function MWd(a){var b,c;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Jk();case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&j2d(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&j2d(this.q).i==0);case 10:return (this.Bb&gwe)==0;case 11:return (this.Bb&cKe)!=0;case 12:return (this.Bb&qxe)!=0;case 13:return this.j!=null;case 14:return tWd(this)!=null;case 15:return (this.Bb&bKe)!=0;case 16:return (this.Bb&Ove)!=0;case 17:return !!uWd(this);}return Avd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.bi=function NWd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:CWd(this,WD(b));return;case 2:_Vd(this,Heb(TD(b)));return;case 3:aWd(this,Heb(TD(b)));return;case 4:$Vd(this,RD(b,17).a);return;case 5:this.Zk(RD(b,17).a);return;case 8:YVd(this,RD(b,142));return;case 9:d=XVd(this,RD(b,89),null);!!d&&d.oj();return;case 10:xWd(this,Heb(TD(b)));return;case 11:FWd(this,Heb(TD(b)));return;case 12:DWd(this,Heb(TD(b)));return;case 13:yWd(this,WD(b));return;case 15:EWd(this,Heb(TD(b)));return;case 16:AWd(this,Heb(TD(b)));return;}Bvd(this,a-AYd(this.ii()),vYd((c=RD(Ywd(this,16),29),!c?this.ii():c),a),b)};_.ii=function OWd(){return JTd(),GTd};_.ki=function PWd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,90)&&v$d(yYd(RD(this.Cb,90)),4);PAd(this,null);return;case 2:_Vd(this,true);return;case 3:aWd(this,true);return;case 4:$Vd(this,0);return;case 5:this.Zk(1);return;case 8:YVd(this,null);return;case 9:c=XVd(this,null,null);!!c&&c.oj();return;case 10:xWd(this,true);return;case 11:FWd(this,false);return;case 12:DWd(this,false);return;case 13:this.i=null;zWd(this,null);return;case 15:EWd(this,false);return;case 16:AWd(this,false);return;}Cvd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.pi=function QWd(){Afe(Qee((lke(),jke),this));WVd(this);this.Bb|=1};_.pk=function RWd(){return this.f};_.ik=function SWd(){return tWd(this)};_.qk=function TWd(){return uWd(this)};_.uk=function UWd(){return null};_.$k=function VWd(){return this.k};_.Lj=function WWd(){return this.n};_.vk=function XWd(){return vWd(this)};_.wk=function YWd(){var a,b,c,d,e,f,g,h,i;if(!this.p){c=uWd(this);(c.i==null&&rYd(c),c.i).length;d=this.uk();!!d&&AYd(uWd(d));e=WVd(this);g=e.kk();a=!g?null:(g.i&1)!=0?g==xdb?QI:g==kE?bJ:g==jE?ZI:g==iE?VI:g==lE?eJ:g==wdb?lJ:g==gE?RI:SI:g;b=tWd(this);h=e.ik();Mje(this);(this.Bb&Ove)!=0&&(!!(f=Tee((lke(),jke),c))&&f!=this||!!(f=zfe(Qee(jke,this))))?(this.p=new Z6d(this,f)):this.Jk()?this.al()?!d?(this.Bb&bKe)!=0?!a?this.bl()?(this.p=new i7d(42,this)):(this.p=new i7d(0,this)):a==UK?(this.p=new g7d(50,O6,this)):this.bl()?(this.p=new g7d(43,a,this)):(this.p=new g7d(1,a,this)):!a?this.bl()?(this.p=new i7d(44,this)):(this.p=new i7d(2,this)):a==UK?(this.p=new g7d(41,O6,this)):this.bl()?(this.p=new g7d(45,a,this)):(this.p=new g7d(3,a,this)):(this.Bb&bKe)!=0?!a?this.bl()?(this.p=new j7d(46,this,d)):(this.p=new j7d(4,this,d)):this.bl()?(this.p=new h7d(47,a,this,d)):(this.p=new h7d(5,a,this,d)):!a?this.bl()?(this.p=new j7d(48,this,d)):(this.p=new j7d(6,this,d)):this.bl()?(this.p=new h7d(49,a,this,d)):(this.p=new h7d(7,a,this,d)):ZD(e,156)?a==Jbb?(this.p=new i7d(40,this)):(this.Bb&512)!=0?(this.Bb&bKe)!=0?!a?(this.p=new i7d(8,this)):(this.p=new g7d(9,a,this)):!a?(this.p=new i7d(10,this)):(this.p=new g7d(11,a,this)):(this.Bb&bKe)!=0?!a?(this.p=new i7d(12,this)):(this.p=new g7d(13,a,this)):!a?(this.p=new i7d(14,this)):(this.p=new g7d(15,a,this)):!d?this.bl()?(this.Bb&bKe)!=0?!a?(this.p=new i7d(16,this)):(this.p=new g7d(17,a,this)):!a?(this.p=new i7d(18,this)):(this.p=new g7d(19,a,this)):(this.Bb&bKe)!=0?!a?(this.p=new i7d(20,this)):(this.p=new g7d(21,a,this)):!a?(this.p=new i7d(22,this)):(this.p=new g7d(23,a,this)):(i=d.t,i>1||i==-1?this.bl()?(this.Bb&bKe)!=0?!a?(this.p=new j7d(24,this,d)):(this.p=new h7d(25,a,this,d)):!a?(this.p=new j7d(26,this,d)):(this.p=new h7d(27,a,this,d)):(this.Bb&bKe)!=0?!a?(this.p=new j7d(28,this,d)):(this.p=new h7d(29,a,this,d)):!a?(this.p=new j7d(30,this,d)):(this.p=new h7d(31,a,this,d)):this.bl()?(this.Bb&bKe)!=0?!a?(this.p=new j7d(32,this,d)):(this.p=new h7d(33,a,this,d)):!a?(this.p=new j7d(34,this,d)):(this.p=new h7d(35,a,this,d)):(this.Bb&bKe)!=0?!a?(this.p=new j7d(36,this,d)):(this.p=new h7d(37,a,this,d)):!a?(this.p=new j7d(38,this,d)):(this.p=new h7d(39,a,this,d))):this._k()?this.bl()?(this.p=new K7d(RD(e,29),this,d)):(this.p=new C7d(RD(e,29),this,d)):ZD(e,156)?a==Jbb?(this.p=new i7d(40,this)):(this.Bb&bKe)!=0?!a?(this.p=new J8d(RD(e,156),b,h,this)):(this.p=new L8d(b,h,this,(a8d(),g==kE?Y7d:g==xdb?T7d:g==lE?Z7d:g==jE?X7d:g==iE?W7d:g==wdb?_7d:g==gE?U7d:g==hE?V7d:$7d))):!a?(this.p=new C8d(RD(e,156),b,h,this)):(this.p=new E8d(b,h,this,(a8d(),g==kE?Y7d:g==xdb?T7d:g==lE?Z7d:g==jE?X7d:g==iE?W7d:g==wdb?_7d:g==gE?U7d:g==hE?V7d:$7d))):this.al()?!d?(this.Bb&bKe)!=0?this.bl()?(this.p=new d9d(RD(e,29),this)):(this.p=new b9d(RD(e,29),this)):this.bl()?(this.p=new _8d(RD(e,29),this)):(this.p=new Z8d(RD(e,29),this)):(this.Bb&bKe)!=0?this.bl()?(this.p=new l9d(RD(e,29),this,d)):(this.p=new j9d(RD(e,29),this,d)):this.bl()?(this.p=new h9d(RD(e,29),this,d)):(this.p=new f9d(RD(e,29),this,d)):this.bl()?!d?(this.Bb&bKe)!=0?(this.p=new p9d(RD(e,29),this)):(this.p=new n9d(RD(e,29),this)):(this.Bb&bKe)!=0?(this.p=new t9d(RD(e,29),this,d)):(this.p=new r9d(RD(e,29),this,d)):!d?(this.Bb&bKe)!=0?(this.p=new v9d(RD(e,29),this)):(this.p=new N8d(RD(e,29),this)):(this.Bb&bKe)!=0?(this.p=new z9d(RD(e,29),this,d)):(this.p=new x9d(RD(e,29),this,d))}return this.p};_.rk=function ZWd(){return (this.Bb&gwe)!=0};_._k=function $Wd(){return false};_.al=function _Wd(){return false};_.sk=function aXd(){return (this.Bb&Ove)!=0};_.xk=function bXd(){return wWd(this)};_.bl=function cXd(){return false};_.tk=function dXd(){return (this.Bb&bKe)!=0};_.cl=function eXd(a){this.k=a};_.ui=function fXd(a){CWd(this,a)};_.Ib=function gXd(){return GWd(this)};_.e=false;_.n=0;var s9=sfb(SHe,'EStructuralFeatureImpl',462);feb(331,462,{110:1,94:1,93:1,35:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,331:1,158:1,462:1,292:1,119:1,120:1,692:1},mXd);_.Lh=function nXd(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Geb(),(this.Bb&256)!=0?true:false;case 3:return Geb(),(this.Bb&512)!=0?true:false;case 4:return sgb(this.s);case 5:return sgb(this.t);case 6:return Geb(),jXd(this)?true:false;case 7:return Geb(),e=this.s,e>=1?true:false;case 8:if(b)return WVd(this);return this.r;case 9:return this.q;case 10:return Geb(),(this.Bb&gwe)!=0?true:false;case 11:return Geb(),(this.Bb&cKe)!=0?true:false;case 12:return Geb(),(this.Bb&qxe)!=0?true:false;case 13:return this.j;case 14:return tWd(this);case 15:return Geb(),(this.Bb&bKe)!=0?true:false;case 16:return Geb(),(this.Bb&Ove)!=0?true:false;case 17:return uWd(this);case 18:return Geb(),(this.Bb&QHe)!=0?true:false;case 19:if(b)return iXd(this);return hXd(this);}return zvd(this,a-AYd((JTd(),nTd)),vYd((d=RD(Ywd(this,16),29),!d?nTd:d),a),b,c)};_.Wh=function oXd(a){var b,c;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return jXd(this);case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&j2d(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&j2d(this.q).i==0);case 10:return (this.Bb&gwe)==0;case 11:return (this.Bb&cKe)!=0;case 12:return (this.Bb&qxe)!=0;case 13:return this.j!=null;case 14:return tWd(this)!=null;case 15:return (this.Bb&bKe)!=0;case 16:return (this.Bb&Ove)!=0;case 17:return !!uWd(this);case 18:return (this.Bb&QHe)!=0;case 19:return !!hXd(this);}return Avd(this,a-AYd((JTd(),nTd)),vYd((b=RD(Ywd(this,16),29),!b?nTd:b),a))};_.bi=function pXd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:CWd(this,WD(b));return;case 2:_Vd(this,Heb(TD(b)));return;case 3:aWd(this,Heb(TD(b)));return;case 4:$Vd(this,RD(b,17).a);return;case 5:lXd(this,RD(b,17).a);return;case 8:YVd(this,RD(b,142));return;case 9:d=XVd(this,RD(b,89),null);!!d&&d.oj();return;case 10:xWd(this,Heb(TD(b)));return;case 11:FWd(this,Heb(TD(b)));return;case 12:DWd(this,Heb(TD(b)));return;case 13:yWd(this,WD(b));return;case 15:EWd(this,Heb(TD(b)));return;case 16:AWd(this,Heb(TD(b)));return;case 18:kXd(this,Heb(TD(b)));return;}Bvd(this,a-AYd((JTd(),nTd)),vYd((c=RD(Ywd(this,16),29),!c?nTd:c),a),b)};_.ii=function qXd(){return JTd(),nTd};_.ki=function rXd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,90)&&v$d(yYd(RD(this.Cb,90)),4);PAd(this,null);return;case 2:_Vd(this,true);return;case 3:aWd(this,true);return;case 4:$Vd(this,0);return;case 5:this.b=0;bWd(this,1);return;case 8:YVd(this,null);return;case 9:c=XVd(this,null,null);!!c&&c.oj();return;case 10:xWd(this,true);return;case 11:FWd(this,false);return;case 12:DWd(this,false);return;case 13:this.i=null;zWd(this,null);return;case 15:EWd(this,false);return;case 16:AWd(this,false);return;case 18:kXd(this,false);return;}Cvd(this,a-AYd((JTd(),nTd)),vYd((b=RD(Ywd(this,16),29),!b?nTd:b),a))};_.pi=function sXd(){iXd(this);Afe(Qee((lke(),jke),this));WVd(this);this.Bb|=1};_.Jk=function tXd(){return jXd(this)};_.Yk=function uXd(a,b){this.b=0;this.a=null;return ZVd(this,a,b)};_.Zk=function vXd(a){lXd(this,a)};_.Ib=function wXd(){var a;if((this.Db&64)!=0)return GWd(this);a=new Shb(GWd(this));a.a+=' (iD: ';Ohb(a,(this.Bb&QHe)!=0);a.a+=')';return a.a};_.b=0;var M7=sfb(SHe,'EAttributeImpl',331);feb(364,448,{110:1,94:1,93:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,158:1,119:1,120:1,691:1});_.dl=function NXd(a){return a.Dh()==this};_.Ah=function OXd(a){return AXd(this,a)};_.Bh=function PXd(a,b){this.w=null;this.Db=b<<16|this.Db&255;this.Cb=a};_.Lh=function QXd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return DXd(this);case 4:return this.ik();case 5:return this.F;case 6:if(b)return BXd(this);return xXd(this);case 7:return !this.A&&(this.A=new iie(z7,this,7)),this.A;}return zvd(this,a-AYd(this.ii()),vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),a),b,c)};_.Sh=function RXd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?AXd(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,6,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),f.wk().zk(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Uh=function SXd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 6:return xvd(this,null,6,c);case 7:return !this.A&&(this.A=new iie(z7,this,7)),rLd(this.A,a,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),b),69),e.wk().Ak(this,Wwd(this),b-AYd(this.ii()),a,c)};_.Wh=function TXd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!DXd(this);case 4:return this.ik()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!xXd(this);case 7:return !!this.A&&this.A.i!=0;}return Avd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.bi=function UXd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:LXd(this,WD(b));return;case 2:IXd(this,WD(b));return;case 5:KXd(this,WD(b));return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);!this.A&&(this.A=new iie(z7,this,7));YGd(this.A,RD(b,16));return;}Bvd(this,a-AYd(this.ii()),vYd((c=RD(Ywd(this,16),29),!c?this.ii():c),a),b)};_.ii=function VXd(){return JTd(),pTd};_.ki=function WXd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,184)&&(RD(this.Cb,184).tb=null);PAd(this,null);return;case 2:yXd(this,null);zXd(this,this.D);return;case 5:KXd(this,null);return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);return;}Cvd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.hk=function XXd(){var a;return this.G==-1&&(this.G=(a=BXd(this),a?fZd(a.vi(),this):-1)),this.G};_.ik=function YXd(){return null};_.jk=function ZXd(){return BXd(this)};_.el=function $Xd(){return this.v};_.kk=function _Xd(){return DXd(this)};_.lk=function aYd(){return this.D!=null?this.D:this.B};_.mk=function bYd(){return this.F};_.fk=function cYd(a){return FXd(this,a)};_.fl=function dYd(a){this.v=a};_.gl=function eYd(a){GXd(this,a)};_.hl=function fYd(a){this.C=a};_.ui=function gYd(a){LXd(this,a)};_.Ib=function hYd(){return MXd(this)};_.C=null;_.D=null;_.G=-1;var c8=sfb(SHe,'EClassifierImpl',364);feb(90,364,{110:1,94:1,93:1,29:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,90:1,364:1,158:1,482:1,119:1,120:1,691:1},HYd);_.dl=function IYd(a){return DYd(this,a.Dh())};_.Lh=function JYd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return DXd(this);case 4:return null;case 5:return this.F;case 6:if(b)return BXd(this);return xXd(this);case 7:return !this.A&&(this.A=new iie(z7,this,7)),this.A;case 8:return Geb(),(this.Bb&256)!=0?true:false;case 9:return Geb(),(this.Bb&512)!=0?true:false;case 10:return zYd(this);case 11:return !this.q&&(this.q=new C5d(s7,this,11,10)),this.q;case 12:return mYd(this);case 13:return qYd(this);case 14:return qYd(this),this.r;case 15:return mYd(this),this.k;case 16:return nYd(this);case 17:return pYd(this);case 18:return rYd(this);case 19:return sYd(this);case 20:return mYd(this),this.o;case 21:return !this.s&&(this.s=new C5d(y7,this,21,17)),this.s;case 22:return tYd(this);case 23:return oYd(this);}return zvd(this,a-AYd((JTd(),oTd)),vYd((d=RD(Ywd(this,16),29),!d?oTd:d),a),b,c)};_.Sh=function KYd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?AXd(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,6,c);case 11:return !this.q&&(this.q=new C5d(s7,this,11,10)),qLd(this.q,a,c);case 21:return !this.s&&(this.s=new C5d(y7,this,21,17)),qLd(this.s,a,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),oTd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),oTd)),a,c)};_.Uh=function LYd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 6:return xvd(this,null,6,c);case 7:return !this.A&&(this.A=new iie(z7,this,7)),rLd(this.A,a,c);case 11:return !this.q&&(this.q=new C5d(s7,this,11,10)),rLd(this.q,a,c);case 21:return !this.s&&(this.s=new C5d(y7,this,21,17)),rLd(this.s,a,c);case 22:return rLd(tYd(this),a,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),oTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),oTd)),a,c)};_.Wh=function MYd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!DXd(this);case 4:return false;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!xXd(this);case 7:return !!this.A&&this.A.i!=0;case 8:return (this.Bb&256)!=0;case 9:return (this.Bb&512)!=0;case 10:return !!this.u&&tYd(this.u.a).i!=0&&!(!!this.n&&d$d(this.n));case 11:return !!this.q&&this.q.i!=0;case 12:return mYd(this).i!=0;case 13:return qYd(this).i!=0;case 14:return qYd(this),this.r.i!=0;case 15:return mYd(this),this.k.i!=0;case 16:return nYd(this).i!=0;case 17:return pYd(this).i!=0;case 18:return rYd(this).i!=0;case 19:return sYd(this).i!=0;case 20:return mYd(this),!!this.o;case 21:return !!this.s&&this.s.i!=0;case 22:return !!this.n&&d$d(this.n);case 23:return oYd(this).i!=0;}return Avd(this,a-AYd((JTd(),oTd)),vYd((b=RD(Ywd(this,16),29),!b?oTd:b),a))};_.Zh=function NYd(a){var b;b=this.i==null||!!this.q&&this.q.i!=0?null:wYd(this,a);return b?b:_zd(this,a)};_.bi=function OYd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:LXd(this,WD(b));return;case 2:IXd(this,WD(b));return;case 5:KXd(this,WD(b));return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);!this.A&&(this.A=new iie(z7,this,7));YGd(this.A,RD(b,16));return;case 8:EYd(this,Heb(TD(b)));return;case 9:FYd(this,Heb(TD(b)));return;case 10:VJd(zYd(this));YGd(zYd(this),RD(b,16));return;case 11:!this.q&&(this.q=new C5d(s7,this,11,10));sLd(this.q);!this.q&&(this.q=new C5d(s7,this,11,10));YGd(this.q,RD(b,16));return;case 21:!this.s&&(this.s=new C5d(y7,this,21,17));sLd(this.s);!this.s&&(this.s=new C5d(y7,this,21,17));YGd(this.s,RD(b,16));return;case 22:sLd(tYd(this));YGd(tYd(this),RD(b,16));return;}Bvd(this,a-AYd((JTd(),oTd)),vYd((c=RD(Ywd(this,16),29),!c?oTd:c),a),b)};_.ii=function PYd(){return JTd(),oTd};_.ki=function QYd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,184)&&(RD(this.Cb,184).tb=null);PAd(this,null);return;case 2:yXd(this,null);zXd(this,this.D);return;case 5:KXd(this,null);return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);return;case 8:EYd(this,false);return;case 9:FYd(this,false);return;case 10:!!this.u&&VJd(this.u);return;case 11:!this.q&&(this.q=new C5d(s7,this,11,10));sLd(this.q);return;case 21:!this.s&&(this.s=new C5d(y7,this,21,17));sLd(this.s);return;case 22:!!this.n&&sLd(this.n);return;}Cvd(this,a-AYd((JTd(),oTd)),vYd((b=RD(Ywd(this,16),29),!b?oTd:b),a))};_.pi=function RYd(){var a,b;mYd(this);qYd(this);nYd(this);pYd(this);rYd(this);sYd(this);oYd(this);OHd(q$d(yYd(this)));if(this.s){for(a=0,b=this.s.i;a<b;++a){aAd(QHd(this.s,a))}}if(this.q){for(a=0,b=this.q.i;a<b;++a){aAd(QHd(this.q,a))}}Oee((lke(),jke),this).xe();this.Bb|=1};_.Ib=function SYd(){return GYd(this)};_.k=null;_.r=null;var iYd,jYd,kYd;var b8=sfb(SHe,'EClassImpl',90);feb(2092,2091,nKe);_.Ei=function TYd(a,b){return nLd(this,a,b)};_.Fi=function UYd(a){return nLd(this,this.i,a)};_.Gi=function VYd(a,b){oLd(this,a,b)};_.Hi=function WYd(a){pLd(this,a)};_.Wk=function XYd(a,b){return qLd(this,a,b)};_.$i=function YYd(a){return NHd(this,a)};_.Xk=function aZd(a,b){return rLd(this,a,b)};_.Xi=function bZd(a,b){return xLd(this,a,b)};_.Ii=function ZYd(){return new yMd(this)};_.Ji=function $Yd(){return new BMd(this)};_.Ki=function _Yd(a){return ZGd(this,a)};var Ubb=sfb(ZJe,'NotifyingInternalEListImpl',2092);feb(632,2092,oKe);_.Hc=function lZd(a){return cZd(this,a)};_.Ij=function mZd(a,b,c,d,e){return dZd(this,a,b,c,d,e)};_.Jj=function nZd(a){eZd(this,a)};_.Fk=function oZd(a){return this};_.Lk=function pZd(){return vYd(this.e.Dh(),this.Lj())};_.Kj=function qZd(){return this.Lk()};_.Lj=function rZd(){return BYd(this.e.Dh(),this.Lk())};_.il=function sZd(){return RD(this.Lk().Hk(),29).kk()};_.jl=function tZd(){return Z5d(RD(this.Lk(),19)).n};_.jj=function uZd(){return this.e};_.kl=function vZd(){return true};_.ll=function wZd(){return false};_.ml=function xZd(){return false};_.nl=function yZd(){return false};_.dd=function zZd(a){return fZd(this,a)};_.Nj=function AZd(a,b){var c;return c=RD(a,54),this.ml()?this.kl()?c.Rh(this.e,this.jl(),this.il(),b):c.Rh(this.e,BYd(c.Dh(),Z5d(RD(this.Lk(),19))),null,b):c.Rh(this.e,-1-this.Lj(),null,b)};_.Oj=function BZd(a,b){var c;return c=RD(a,54),this.ml()?this.kl()?c.Th(this.e,this.jl(),this.il(),b):c.Th(this.e,BYd(c.Dh(),Z5d(RD(this.Lk(),19))),null,b):c.Th(this.e,-1-this.Lj(),null,b)};_.al=function CZd(){return false};_.ol=function DZd(){return true};_.fk=function EZd(a){return QRd(this.d,a)};_.Pj=function FZd(){return Mvd(this.e)};_.Qj=function GZd(){return this.i!=0};_.aj=function HZd(a){return IMd(this.d,a)};_.Wi=function IZd(a,b){return this.ol()&&this.nl()?gZd(this,a,RD(b,58)):b};_.pl=function JZd(a){return a.Vh()?Vvd(this.e,RD(a,54)):a};_.Wb=function KZd(a){hZd(this,a)};_.Pc=function LZd(){return iZd(this)};_.Qc=function MZd(a){var b;if(this.nl()){for(b=this.i-1;b>=0;--b){QHd(this,b)}}return XHd(this,a)};_.Gk=function NZd(){sLd(this)};_.Zi=function OZd(a,b){return jZd(this,a,b)};var ybb=sfb(ZJe,'EcoreEList',632);feb(505,632,oKe,PZd);_.Li=function QZd(){return false};_.Lj=function RZd(){return this.c};_.Mj=function SZd(){return false};_.ol=function TZd(){return true};_.Si=function UZd(){return true};_.Wi=function VZd(a,b){return b};_.Yi=function WZd(){return false};_.c=0;var ibb=sfb(ZJe,'EObjectEList',505);feb(83,505,oKe,XZd);_.Mj=function YZd(){return true};_.ml=function ZZd(){return false};_.al=function $Zd(){return true};var cbb=sfb(ZJe,'EObjectContainmentEList',83);feb(555,83,oKe,_Zd);_.Ni=function a$d(){this.b=true};_.Qj=function b$d(){return this.b};_.Gk=function c$d(){var a;sLd(this);if(Mvd(this.e)){a=this.b;this.b=false;qvd(this.e,new Q3d(this.e,2,this.c,a,false))}else{this.b=false}};_.b=false;var bbb=sfb(ZJe,'EObjectContainmentEList/Unsettable',555);feb(1161,555,oKe,h$d);_.Ti=function l$d(a,b){var c,d;return c=RD(uLd(this,a,b),89),Mvd(this.e)&&eZd(this,new c4d(this.a,7,(JTd(),qTd),sgb(b),(d=c.c,ZD(d,90)?RD(d,29):zTd),a)),c};_.Uj=function m$d(a,b){return e$d(this,RD(a,89),b)};_.Vj=function n$d(a,b){return f$d(this,RD(a,89),b)};_.Wj=function o$d(a,b,c){return g$d(this,RD(a,89),RD(b,89),c)};_.Ij=function i$d(a,b,c,d,e){switch(a){case 3:{return dZd(this,a,b,c,d,this.i>1)}case 5:{return dZd(this,a,b,c,d,this.i-RD(c,15).gc()>0)}default:{return new P3d(this.e,a,this.c,b,c,d,true)}}};_.Tj=function j$d(){return true};_.Qj=function k$d(){return d$d(this)};_.Gk=function p$d(){sLd(this)};var S7=sfb(SHe,'EClassImpl/1',1161);feb(1175,1174,EJe);_.dj=function t$d(a){var b,c,d,e,f,g,h;c=a.gj();if(c!=8){d=s$d(a);if(d==0){switch(c){case 1:case 9:{h=a.kj();if(h!=null){b=yYd(RD(h,482));!b.c&&(b.c=new X9d);dHd(b.c,a.jj())}g=a.ij();if(g!=null){e=RD(g,482);if((e.Bb&1)==0){b=yYd(e);!b.c&&(b.c=new X9d);WGd(b.c,RD(a.jj(),29))}}break}case 3:{g=a.ij();if(g!=null){e=RD(g,482);if((e.Bb&1)==0){b=yYd(e);!b.c&&(b.c=new X9d);WGd(b.c,RD(a.jj(),29))}}break}case 5:{g=a.ij();if(g!=null){for(f=RD(g,16).Kc();f.Ob();){e=RD(f.Pb(),482);if((e.Bb&1)==0){b=yYd(e);!b.c&&(b.c=new X9d);WGd(b.c,RD(a.jj(),29))}}}break}case 4:{h=a.kj();if(h!=null){e=RD(h,482);if((e.Bb&1)==0){b=yYd(e);!b.c&&(b.c=new X9d);dHd(b.c,a.jj())}}break}case 6:{h=a.kj();if(h!=null){for(f=RD(h,16).Kc();f.Ob();){e=RD(f.Pb(),482);if((e.Bb&1)==0){b=yYd(e);!b.c&&(b.c=new X9d);dHd(b.c,a.jj())}}}break}}}this.ql(d)}};_.ql=function u$d(a){r$d(this,a)};_.b=63;var u9=sfb(SHe,'ESuperAdapter',1175);feb(1176,1175,EJe,w$d);_.ql=function x$d(a){v$d(this,a)};var N7=sfb(SHe,'EClassImpl/10',1176);feb(1165,710,oKe);_.Ei=function y$d(a,b){return IHd(this,a,b)};_.Fi=function z$d(a){return JHd(this,a)};_.Gi=function A$d(a,b){KHd(this,a,b)};_.Hi=function B$d(a){LHd(this,a)};_.$i=function D$d(a){return NHd(this,a)};_.Xi=function L$d(a,b){return UHd(this,a,b)};_.Wk=function C$d(a,b){throw Adb(new jib)};_.Ii=function E$d(){return new yMd(this)};_.Ji=function F$d(){return new BMd(this)};_.Ki=function G$d(a){return ZGd(this,a)};_.Xk=function H$d(a,b){throw Adb(new jib)};_.Fk=function I$d(a){return this};_.Qj=function J$d(){return this.i!=0};_.Wb=function K$d(a){throw Adb(new jib)};_.Gk=function M$d(){throw Adb(new jib)};var xbb=sfb(ZJe,'EcoreEList/UnmodifiableEList',1165);feb(328,1165,oKe,N$d);_.Yi=function O$d(){return false};var wbb=sfb(ZJe,'EcoreEList/UnmodifiableEList/FastCompare',328);feb(1168,328,oKe,R$d);_.dd=function S$d(a){var b,c,d;if(ZD(a,179)){b=RD(a,179);c=b.Lj();if(c!=-1){for(d=this.i;c<d;++c){if(dE(this.g[c])===dE(a)){return c}}}}return -1};var O7=sfb(SHe,'EClassImpl/1EAllStructuralFeaturesList',1168);feb(1162,506,PIe,W$d);_.aj=function X$d(a){return $C(o7,sKe,89,a,0,1)};_.Yi=function Y$d(){return false};var P7=sfb(SHe,'EClassImpl/1EGenericSuperTypeEList',1162);feb(633,506,PIe,Z$d);_.aj=function $$d(a){return $C(y7,lKe,179,a,0,1)};_.Yi=function _$d(){return false};var Q7=sfb(SHe,'EClassImpl/1EStructuralFeatureUniqueEList',633);feb(755,506,PIe,a_d);_.aj=function b_d(a){return $C(v7,lKe,19,a,0,1)};_.Yi=function c_d(){return false};var R7=sfb(SHe,'EClassImpl/1ReferenceList',755);feb(1163,506,PIe,e_d);_.Mi=function f_d(a,b){d_d(this,RD(b,35))};_.aj=function g_d(a){return $C(g7,lKe,35,a,0,1)};_.Yi=function h_d(){return false};var T7=sfb(SHe,'EClassImpl/2',1163);feb(1164,506,PIe,i_d);_.aj=function j_d(a){return $C(g7,lKe,35,a,0,1)};_.Yi=function k_d(){return false};var U7=sfb(SHe,'EClassImpl/3',1164);feb(1166,328,oKe,n_d);_.Fc=function o_d(a){return l_d(this,RD(a,35))};_.Hi=function p_d(a){m_d(this,RD(a,35))};var V7=sfb(SHe,'EClassImpl/4',1166);feb(1167,328,oKe,s_d);_.Fc=function t_d(a){return q_d(this,RD(a,19))};_.Hi=function u_d(a){r_d(this,RD(a,19))};var W7=sfb(SHe,'EClassImpl/5',1167);feb(1169,506,PIe,v_d);_.aj=function w_d(a){return $C(s7,mKe,62,a,0,1)};_.Yi=function x_d(){return false};var X7=sfb(SHe,'EClassImpl/6',1169);feb(1170,506,PIe,y_d);_.aj=function z_d(a){return $C(v7,lKe,19,a,0,1)};_.Yi=function A_d(){return false};var Y7=sfb(SHe,'EClassImpl/7',1170);feb(2095,2094,{3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1,71:1});_.Ei=function B_d(a,b){return QJd(this,a,b)};_.Fi=function C_d(a){return QJd(this,this.Ej(),a)};_.Gi=function D_d(a,b){RJd(this,a,b)};_.Hi=function E_d(a){SJd(this,a)};_.Wk=function F_d(a,b){return TJd(this,a,b)};_.Xk=function L_d(a,b){return UJd(this,a,b)};_.Xi=function M_d(a,b){return WJd(this,a,b)};_.$i=function G_d(a){return this.xj(a)};_.Ii=function H_d(){return new yMd(this)};_.pj=function I_d(){return this.sj()};_.Ji=function J_d(){return new BMd(this)};_.Ki=function K_d(a){return ZGd(this,a)};var Qab=sfb(ZJe,'DelegatingNotifyingInternalEListImpl',2095);feb(756,2095,tKe);_.Li=function R_d(){var a;a=vYd(Uwd(this.b),this.Lj()).Hk();return ZD(a,156)&&!ZD(a,469)&&(a.kk().i&1)==0};_.Hc=function S_d(a){var b,c,d,e,f,g,h,i;if(this.ol()){i=this.Ej();if(i>4){if(this.fk(a)){if(this.al()){d=RD(a,54);c=d.Eh();h=c==this.b&&(this.ml()?d.yh(d.Fh(),RD(vYd(Uwd(this.b),this.Lj()).Hk(),29).kk())==Z5d(RD(vYd(Uwd(this.b),this.Lj()),19)).n:-1-d.Fh()==this.Lj());if(this.nl()&&!h&&!c&&!!d.Jh()){for(e=0;e<i;++e){b=O_d(this,this.xj(e));if(dE(b)===dE(a)){return true}}}return h}else if(this.ml()&&!this.ll()){f=RD(a,58).Mh(Z5d(RD(vYd(Uwd(this.b),this.Lj()),19)));if(dE(f)===dE(this.b)){return true}else if(f==null||!RD(f,58).Vh()){return false}}}else{return false}}g=this.uj(a);if(this.nl()&&!g){for(e=0;e<i;++e){d=O_d(this,this.xj(e));if(dE(d)===dE(a)){return true}}}return g}else{return this.uj(a)}};_.Ij=function T_d(a,b,c,d,e){return new P3d(this.b,a,this.Lj(),b,c,d,e)};_.Jj=function U_d(a){qvd(this.b,a)};_.Fk=function V_d(a){return this};_.Kj=function W_d(){return vYd(Uwd(this.b),this.Lj())};_.Lj=function X_d(){return BYd(Uwd(this.b),vYd(Uwd(this.b),this.Lj()))};_.jj=function Y_d(){return this.b};_.kl=function Z_d(){return !!vYd(Uwd(this.b),this.Lj()).Hk().kk()};_.Mj=function $_d(){var a,b;b=vYd(Uwd(this.b),this.Lj());if(ZD(b,102)){a=RD(b,19);return (a.Bb&QHe)!=0||!!Z5d(RD(b,19))}else{return false}};_.ll=function __d(){var a,b,c,d;b=vYd(Uwd(this.b),this.Lj());if(ZD(b,102)){a=RD(b,19);c=Z5d(a);return !!c&&(d=c.t,d>1||d==-1)}else{return false}};_.ml=function a0d(){var a,b,c;b=vYd(Uwd(this.b),this.Lj());if(ZD(b,102)){a=RD(b,19);c=Z5d(a);return !!c}else{return false}};_.nl=function b0d(){var a,b;b=vYd(Uwd(this.b),this.Lj());if(ZD(b,102)){a=RD(b,19);return (a.Bb&txe)!=0}else{return false}};_.dd=function c0d(a){var b,c,d,e;d=this.zj(a);if(d>=0)return d;if(this.ol()){for(c=0,e=this.Ej();c<e;++c){b=O_d(this,this.xj(c));if(dE(b)===dE(a)){return c}}}return -1};_.Nj=function d0d(a,b){var c;return c=RD(a,54),this.ml()?this.kl()?c.Rh(this.b,Z5d(RD(vYd(Uwd(this.b),this.Lj()),19)).n,RD(vYd(Uwd(this.b),this.Lj()).Hk(),29).kk(),b):c.Rh(this.b,BYd(c.Dh(),Z5d(RD(vYd(Uwd(this.b),this.Lj()),19))),null,b):c.Rh(this.b,-1-this.Lj(),null,b)};_.Oj=function e0d(a,b){var c;return c=RD(a,54),this.ml()?this.kl()?c.Th(this.b,Z5d(RD(vYd(Uwd(this.b),this.Lj()),19)).n,RD(vYd(Uwd(this.b),this.Lj()).Hk(),29).kk(),b):c.Th(this.b,BYd(c.Dh(),Z5d(RD(vYd(Uwd(this.b),this.Lj()),19))),null,b):c.Th(this.b,-1-this.Lj(),null,b)};_.al=function f0d(){var a,b;b=vYd(Uwd(this.b),this.Lj());if(ZD(b,102)){a=RD(b,19);return (a.Bb&QHe)!=0}else{return false}};_.ol=function g0d(){return ZD(vYd(Uwd(this.b),this.Lj()).Hk(),90)};_.fk=function h0d(a){return vYd(Uwd(this.b),this.Lj()).Hk().fk(a)};_.Pj=function i0d(){return Mvd(this.b)};_.Qj=function j0d(){return !this.Aj()};_.Si=function k0d(){return vYd(Uwd(this.b),this.Lj()).Si()};_.Wi=function l0d(a,b){return N_d(this,a,b)};_.Wb=function m0d(a){VJd(this);YGd(this,RD(a,15))};_.Pc=function n0d(){var a;if(this.nl()){for(a=this.Ej()-1;a>=0;--a){N_d(this,a,this.xj(a))}}return this.Fj()};_.Qc=function o0d(a){var b;if(this.nl()){for(b=this.Ej()-1;b>=0;--b){N_d(this,b,this.xj(b))}}return this.Gj(a)};_.Gk=function p0d(){VJd(this)};_.Zi=function q0d(a,b){return P_d(this,a,b)};var Pab=sfb(ZJe,'DelegatingEcoreEList',756);feb(1171,756,tKe,w0d);_.qj=function z0d(a,b){r0d(this,a,RD(b,29))};_.rj=function A0d(a){s0d(this,RD(a,29))};_.xj=function G0d(a){var b,c;return b=RD(QHd(tYd(this.a),a),89),c=b.c,ZD(c,90)?RD(c,29):(JTd(),zTd)};_.Cj=function L0d(a){var b,c;return b=RD(vLd(tYd(this.a),a),89),c=b.c,ZD(c,90)?RD(c,29):(JTd(),zTd)};_.Dj=function M0d(a,b){return u0d(this,a,RD(b,29))};_.Li=function x0d(){return false};_.Ij=function y0d(a,b,c,d,e){return null};_.sj=function B0d(){return new c1d(this)};_.tj=function C0d(){sLd(tYd(this.a))};_.uj=function D0d(a){return t0d(this,a)};_.vj=function E0d(a){var b,c;for(c=a.Kc();c.Ob();){b=c.Pb();if(!t0d(this,b)){return false}}return true};_.wj=function F0d(a){var b,c,d;if(ZD(a,15)){d=RD(a,15);if(d.gc()==tYd(this.a).i){for(b=d.Kc(),c=new dMd(this);b.Ob();){if(dE(b.Pb())!==dE(bMd(c))){return false}}return true}}return false};_.yj=function H0d(){var a,b,c,d,e;c=1;for(b=new dMd(tYd(this.a));b.e!=b.i.gc();){a=RD(bMd(b),89);d=(e=a.c,ZD(e,90)?RD(e,29):(JTd(),zTd));c=31*c+(!d?0:kFb(d))}return c};_.zj=function I0d(a){var b,c,d,e;d=0;for(c=new dMd(tYd(this.a));c.e!=c.i.gc();){b=RD(bMd(c),89);if(dE(a)===dE((e=b.c,ZD(e,90)?RD(e,29):(JTd(),zTd)))){return d}++d}return -1};_.Aj=function J0d(){return tYd(this.a).i==0};_.Bj=function K0d(){return null};_.Ej=function N0d(){return tYd(this.a).i};_.Fj=function O0d(){var a,b,c,d,e,f;f=tYd(this.a).i;e=$C(jJ,rve,1,f,5,1);c=0;for(b=new dMd(tYd(this.a));b.e!=b.i.gc();){a=RD(bMd(b),89);e[c++]=(d=a.c,ZD(d,90)?RD(d,29):(JTd(),zTd))}return e};_.Gj=function P0d(a){var b,c,d,e,f,g,h;h=tYd(this.a).i;if(a.length<h){e=IMd(rb(a).c,h);a=e}a.length>h&&bD(a,h,null);d=0;for(c=new dMd(tYd(this.a));c.e!=c.i.gc();){b=RD(bMd(c),89);f=(g=b.c,ZD(g,90)?RD(g,29):(JTd(),zTd));bD(a,d++,f)}return a};_.Hj=function Q0d(){var a,b,c,d,e;e=new Qhb;e.a+='[';a=tYd(this.a);for(b=0,d=tYd(this.a).i;b<d;){Nhb(e,Ghb((c=RD(QHd(a,b),89).c,ZD(c,90)?RD(c,29):(JTd(),zTd))));++b<d&&(e.a+=pve,e)}e.a+=']';return e.a};_.Jj=function R0d(a){};_.Lj=function S0d(){return 10};_.kl=function T0d(){return true};_.Mj=function U0d(){return false};_.ll=function V0d(){return false};_.ml=function W0d(){return false};_.nl=function X0d(){return true};_.al=function Y0d(){return false};_.ol=function Z0d(){return true};_.fk=function $0d(a){return ZD(a,90)};_.Qj=function _0d(){return CYd(this.a)};_.Si=function a1d(){return true};_.Yi=function b1d(){return true};var $7=sfb(SHe,'EClassImpl/8',1171);feb(1172,2062,kwe,c1d);_.fd=function d1d(a){return ZGd(this.a,a)};_.gc=function e1d(){return tYd(this.a.a).i};var Z7=sfb(SHe,'EClassImpl/8/1',1172);feb(1173,506,PIe,f1d);_.aj=function g1d(a){return $C(i7,rve,142,a,0,1)};_.Yi=function h1d(){return false};var _7=sfb(SHe,'EClassImpl/9',1173);feb(1160,49,Ixe,i1d);var a8=sfb(SHe,'EClassImpl/MyHashSet',1160);feb(577,364,{110:1,94:1,93:1,142:1,156:1,847:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,158:1,119:1,120:1,691:1},k1d);_.Lh=function l1d(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return DXd(this);case 4:return this.ik();case 5:return this.F;case 6:if(b)return BXd(this);return xXd(this);case 7:return !this.A&&(this.A=new iie(z7,this,7)),this.A;case 8:return Geb(),(this.Bb&256)!=0?true:false;}return zvd(this,a-AYd(this.ii()),vYd((d=RD(Ywd(this,16),29),!d?this.ii():d),a),b,c)};_.Wh=function m1d(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!DXd(this);case 4:return this.ik()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!xXd(this);case 7:return !!this.A&&this.A.i!=0;case 8:return (this.Bb&256)==0;}return Avd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.bi=function n1d(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:LXd(this,WD(b));return;case 2:IXd(this,WD(b));return;case 5:KXd(this,WD(b));return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);!this.A&&(this.A=new iie(z7,this,7));YGd(this.A,RD(b,16));return;case 8:j1d(this,Heb(TD(b)));return;}Bvd(this,a-AYd(this.ii()),vYd((c=RD(Ywd(this,16),29),!c?this.ii():c),a),b)};_.ii=function o1d(){return JTd(),rTd};_.ki=function p1d(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,184)&&(RD(this.Cb,184).tb=null);PAd(this,null);return;case 2:yXd(this,null);zXd(this,this.D);return;case 5:KXd(this,null);return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);return;case 8:j1d(this,true);return;}Cvd(this,a-AYd(this.ii()),vYd((b=RD(Ywd(this,16),29),!b?this.ii():b),a))};_.pi=function q1d(){Oee((lke(),jke),this).xe();this.Bb|=1};_.ok=function r1d(){var a,b,c;if(!this.c){a=Kje(BXd(this));if(!a.dc()){for(c=a.Kc();c.Ob();){b=WD(c.Pb());!!bAd(this,b)&&Jje(this)}}}return this.b};_.ik=function s1d(){var b;if(!this.e){b=null;try{b=DXd(this)}catch(a){a=zdb(a);if(!ZD(a,103))throw Adb(a)}this.d=null;!!b&&(b.i&1)!=0&&(b==xdb?(this.d=(Geb(),Eeb)):b==kE?(this.d=sgb(0)):b==jE?(this.d=new Tfb(0)):b==iE?(this.d=0):b==lE?(this.d=Hgb(0)):b==wdb?(this.d=bhb(0)):b==gE?(this.d=$eb(0)):(this.d=hfb(0)));this.e=true}return this.d};_.nk=function t1d(){return (this.Bb&256)!=0};_.rl=function u1d(a){a&&(this.D='org.eclipse.emf.common.util.AbstractEnumerator')};_.gl=function v1d(a){GXd(this,a);this.rl(a)};_.hl=function w1d(a){this.C=a;this.e=false};_.Ib=function x1d(){var a;if((this.Db&64)!=0)return MXd(this);a=new Shb(MXd(this));a.a+=' (serializable: ';Ohb(a,(this.Bb&256)!=0);a.a+=')';return a.a};_.c=false;_.d=null;_.e=false;var d8=sfb(SHe,'EDataTypeImpl',577);feb(469,577,{110:1,94:1,93:1,142:1,156:1,847:1,685:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,469:1,158:1,119:1,120:1,691:1},A1d);_.Lh=function B1d(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return DXd(this);case 4:return y1d(this);case 5:return this.F;case 6:if(b)return BXd(this);return xXd(this);case 7:return !this.A&&(this.A=new iie(z7,this,7)),this.A;case 8:return Geb(),(this.Bb&256)!=0?true:false;case 9:return !this.a&&(this.a=new C5d(l7,this,9,5)),this.a;}return zvd(this,a-AYd((JTd(),sTd)),vYd((d=RD(Ywd(this,16),29),!d?sTd:d),a),b,c)};_.Sh=function C1d(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?AXd(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,6,c);case 9:return !this.a&&(this.a=new C5d(l7,this,9,5)),qLd(this.a,a,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),sTd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),sTd)),a,c)};_.Uh=function D1d(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 6:return xvd(this,null,6,c);case 7:return !this.A&&(this.A=new iie(z7,this,7)),rLd(this.A,a,c);case 9:return !this.a&&(this.a=new C5d(l7,this,9,5)),rLd(this.a,a,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),sTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),sTd)),a,c)};_.Wh=function E1d(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!DXd(this);case 4:return !!y1d(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!xXd(this);case 7:return !!this.A&&this.A.i!=0;case 8:return (this.Bb&256)==0;case 9:return !!this.a&&this.a.i!=0;}return Avd(this,a-AYd((JTd(),sTd)),vYd((b=RD(Ywd(this,16),29),!b?sTd:b),a))};_.bi=function F1d(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:LXd(this,WD(b));return;case 2:IXd(this,WD(b));return;case 5:KXd(this,WD(b));return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);!this.A&&(this.A=new iie(z7,this,7));YGd(this.A,RD(b,16));return;case 8:j1d(this,Heb(TD(b)));return;case 9:!this.a&&(this.a=new C5d(l7,this,9,5));sLd(this.a);!this.a&&(this.a=new C5d(l7,this,9,5));YGd(this.a,RD(b,16));return;}Bvd(this,a-AYd((JTd(),sTd)),vYd((c=RD(Ywd(this,16),29),!c?sTd:c),a),b)};_.ii=function G1d(){return JTd(),sTd};_.ki=function H1d(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,184)&&(RD(this.Cb,184).tb=null);PAd(this,null);return;case 2:yXd(this,null);zXd(this,this.D);return;case 5:KXd(this,null);return;case 7:!this.A&&(this.A=new iie(z7,this,7));sLd(this.A);return;case 8:j1d(this,true);return;case 9:!this.a&&(this.a=new C5d(l7,this,9,5));sLd(this.a);return;}Cvd(this,a-AYd((JTd(),sTd)),vYd((b=RD(Ywd(this,16),29),!b?sTd:b),a))};_.pi=function I1d(){var a,b;if(this.a){for(a=0,b=this.a.i;a<b;++a){aAd(QHd(this.a,a))}}Oee((lke(),jke),this).xe();this.Bb|=1};_.ik=function J1d(){return y1d(this)};_.fk=function K1d(a){if(a!=null){return true}return false};_.rl=function L1d(a){};var e8=sfb(SHe,'EEnumImpl',469);feb(582,448,{110:1,94:1,93:1,2039:1,694:1,155:1,197:1,58:1,114:1,54:1,99:1,582:1,158:1,119:1,120:1},R1d);_.xe=function $1d(){return this.zb};_.Ah=function S1d(a){return M1d(this,a)};_.Lh=function T1d(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return sgb(this.d);case 3:return this.b?this.b:this.a;case 4:return e=this.c,e==null?this.zb:e;case 5:return this.Db>>16==5?RD(this.Cb,685):null;}return zvd(this,a-AYd((JTd(),tTd)),vYd((d=RD(Ywd(this,16),29),!d?tTd:d),a),b,c)};_.Sh=function U1d(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 5:!!this.Cb&&(c=(e=this.Db>>16,e>=0?M1d(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,5,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),tTd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),tTd)),a,c)};_.Uh=function V1d(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 5:return xvd(this,null,5,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),tTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),tTd)),a,c)};_.Wh=function W1d(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return !!this.b;case 4:return this.c!=null;case 5:return !!(this.Db>>16==5?RD(this.Cb,685):null);}return Avd(this,a-AYd((JTd(),tTd)),vYd((b=RD(Ywd(this,16),29),!b?tTd:b),a))};_.bi=function X1d(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:PAd(this,WD(b));return;case 2:Q1d(this,RD(b,17).a);return;case 3:O1d(this,RD(b,2039));return;case 4:P1d(this,WD(b));return;}Bvd(this,a-AYd((JTd(),tTd)),vYd((c=RD(Ywd(this,16),29),!c?tTd:c),a),b)};_.ii=function Y1d(){return JTd(),tTd};_.ki=function Z1d(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:PAd(this,null);return;case 2:Q1d(this,0);return;case 3:O1d(this,null);return;case 4:P1d(this,null);return;}Cvd(this,a-AYd((JTd(),tTd)),vYd((b=RD(Ywd(this,16),29),!b?tTd:b),a))};_.Ib=function _1d(){var a;return a=this.c,a==null?this.zb:a};_.b=null;_.c=null;_.d=0;var f8=sfb(SHe,'EEnumLiteralImpl',582);var h8=ufb(SHe,'EFactoryImpl/InternalEDateTimeFormat');feb(499,1,{2114:1},c2d);var g8=sfb(SHe,'EFactoryImpl/1ClientInternalEDateTimeFormat',499);feb(248,120,{110:1,94:1,93:1,89:1,58:1,114:1,54:1,99:1,248:1,119:1,120:1},s2d);_.Ch=function t2d(a,b,c){var d;c=xvd(this,a,b,c);if(!!this.e&&ZD(a,179)){d=k2d(this,this.e);d!=this.c&&(c=o2d(this,d,c))}return c};_.Lh=function u2d(a,b,c){var d;switch(a){case 0:return this.f;case 1:return !this.d&&(this.d=new XZd(o7,this,1)),this.d;case 2:if(b)return i2d(this);return this.c;case 3:return this.b;case 4:return this.e;case 5:if(b)return h2d(this);return this.a;}return zvd(this,a-AYd((JTd(),vTd)),vYd((d=RD(Ywd(this,16),29),!d?vTd:d),a),b,c)};_.Uh=function v2d(a,b,c){var d,e;switch(b){case 0:return g2d(this,null,c);case 1:return !this.d&&(this.d=new XZd(o7,this,1)),rLd(this.d,a,c);case 3:return e2d(this,null,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),vTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),vTd)),a,c)};_.Wh=function w2d(a){var b;switch(a){case 0:return !!this.f;case 1:return !!this.d&&this.d.i!=0;case 2:return !!this.c;case 3:return !!this.b;case 4:return !!this.e;case 5:return !!this.a;}return Avd(this,a-AYd((JTd(),vTd)),vYd((b=RD(Ywd(this,16),29),!b?vTd:b),a))};_.bi=function x2d(a,b){var c;switch(a){case 0:q2d(this,RD(b,89));return;case 1:!this.d&&(this.d=new XZd(o7,this,1));sLd(this.d);!this.d&&(this.d=new XZd(o7,this,1));YGd(this.d,RD(b,16));return;case 3:n2d(this,RD(b,89));return;case 4:p2d(this,RD(b,850));return;case 5:l2d(this,RD(b,142));return;}Bvd(this,a-AYd((JTd(),vTd)),vYd((c=RD(Ywd(this,16),29),!c?vTd:c),a),b)};_.ii=function y2d(){return JTd(),vTd};_.ki=function z2d(a){var b;switch(a){case 0:q2d(this,null);return;case 1:!this.d&&(this.d=new XZd(o7,this,1));sLd(this.d);return;case 3:n2d(this,null);return;case 4:p2d(this,null);return;case 5:l2d(this,null);return;}Cvd(this,a-AYd((JTd(),vTd)),vYd((b=RD(Ywd(this,16),29),!b?vTd:b),a))};_.Ib=function A2d(){var a;a=new dib(awd(this));a.a+=' (expression: ';r2d(this,a);a.a+=')';return a.a};var d2d;var j8=sfb(SHe,'EGenericTypeImpl',248);feb(2067,2062,uKe);_.Gi=function C2d(a,b){B2d(this,a,b)};_.Wk=function D2d(a,b){B2d(this,this.gc(),a);return b};_.$i=function E2d(a){return ju(this.pj(),a)};_.Ii=function F2d(){return this.Ji()};_.pj=function G2d(){return new mee(this)};_.Ji=function H2d(){return this.Ki(0)};_.Ki=function I2d(a){return this.pj().fd(a)};_.Xk=function J2d(a,b){ze(this,a,true);return b};_.Ti=function K2d(a,b){var c,d;d=ku(this,b);c=this.fd(a);c.Rb(d);return d};_.Ui=function L2d(a,b){var c;ze(this,b,true);c=this.fd(a);c.Rb(b)};var Gab=sfb(ZJe,'AbstractSequentialInternalEList',2067);feb(496,2067,uKe,Q2d);_.$i=function R2d(a){return ju(this.pj(),a)};_.Ii=function S2d(){if(this.b==null){return j3d(),j3d(),i3d}return this.sl()};_.pj=function T2d(){return new Whe(this.a,this.b)};_.Ji=function U2d(){if(this.b==null){return j3d(),j3d(),i3d}return this.sl()};_.Ki=function V2d(a){var b,c;if(this.b==null){if(a<0||a>1){throw Adb(new veb(HJe+a+', size=0'))}return j3d(),j3d(),i3d}c=this.sl();for(b=0;b<a;++b){k3d(c)}return c};_.dc=function W2d(){var a,b,c,d,e,f;if(this.b!=null){for(c=0;c<this.b.length;++c){a=this.b[c];if(!this.vl()||this.a.Xh(a)){f=this.a.Nh(a,false);nke();if(RD(a,69).xk()){b=RD(f,160);for(d=0,e=b.gc();d<e;++d){if(O2d(b.Tl(d))&&b.Ul(d)!=null){return false}}}else if(a.Jk()){if(!RD(f,16).dc()){return false}}else if(f!=null){return false}}}}return true};_.Kc=function X2d(){return P2d(this)};_.fd=function Y2d(a){var b,c;if(this.b==null){if(a!=0){throw Adb(new veb(HJe+a+', size=0'))}return j3d(),j3d(),i3d}c=this.ul()?this.tl():this.sl();for(b=0;b<a;++b){k3d(c)}return c};_.Ti=function Z2d(a,b){throw Adb(new jib)};_.Ui=function $2d(a,b){throw Adb(new jib)};_.sl=function _2d(){return new p3d(this.a,this.b)};_.tl=function a3d(){return new D3d(this.a,this.b)};_.ul=function b3d(){return true};_.gc=function c3d(){var a,b,c,d,e,f,g;e=0;if(this.b!=null){for(c=0;c<this.b.length;++c){a=this.b[c];if(!this.vl()||this.a.Xh(a)){g=this.a.Nh(a,false);nke();if(RD(a,69).xk()){b=RD(g,160);for(d=0,f=b.gc();d<f;++d){O2d(b.Tl(d))&&b.Ul(d)!=null&&++e}}else a.Jk()?(e+=RD(g,16).gc()):g!=null&&++e}}}return e};_.vl=function d3d(){return true};var M2d;var Wab=sfb(ZJe,'EContentsEList',496);feb(1177,496,uKe,e3d);_.sl=function f3d(){return new H3d(this.a,this.b)};_.tl=function g3d(){return new F3d(this.a,this.b)};_.vl=function h3d(){return false};var n8=sfb(SHe,'ENamedElementImpl/1',1177);feb(287,1,vKe,p3d);_.Nb=function s3d(a){Ztb(this,a)};_.Rb=function q3d(a){throw Adb(new jib)};_.wl=function r3d(a){if(this.g!=0||!!this.e){throw Adb(new dgb('Iterator already in use or already filtered'))}this.e=a};_.Ob=function t3d(){var a,b,c,d,e,f;switch(this.g){case 3:case 2:{return true}case 1:{return false}case -3:{!this.p?++this.n:this.p.Pb()}default:{if(!this.k||(!this.p?!l3d(this):!m3d(this,this.p))){while(this.d<this.c.length){b=this.c[this.d++];if((!this.e||b.pk()!=C4||b.Lj()!=0)&&(!this.vl()||this.b.Xh(b))){f=this.b.Nh(b,this.ul());this.f=(nke(),RD(b,69).xk());if(this.f||b.Jk()){if(this.ul()){d=RD(f,15);this.k=d}else{d=RD(f,71);this.k=this.j=d}if(ZD(this.k,59)){this.p=null;this.o=this.k.gc();this.n=0}else{this.p=!this.j?this.k.ed():this.j.Ji()}if(!this.p?l3d(this):m3d(this,this.p)){e=!this.p?!this.j?this.k.Xb(this.n++):this.j.$i(this.n++):this.p.Pb();if(this.f){a=RD(e,76);a.Lk();c=a.md();this.i=c}else{c=e;this.i=c}this.g=3;return true}}else if(f!=null){this.k=null;this.p=null;c=f;this.i=c;this.g=2;return true}}}this.k=null;this.p=null;this.f=false;this.g=1;return false}else{e=!this.p?!this.j?this.k.Xb(this.n++):this.j.$i(this.n++):this.p.Pb();if(this.f){a=RD(e,76);a.Lk();c=a.md();this.i=c}else{c=e;this.i=c}this.g=3;return true}}}};_.Sb=function u3d(){var a,b,c,d,e,f;switch(this.g){case -3:case -2:{return true}case -1:{return false}case 3:{!this.p?--this.n:this.p.Ub()}default:{if(!this.k||(!this.p?!n3d(this):!o3d(this,this.p))){while(this.d>0){b=this.c[--this.d];if((!this.e||b.pk()!=C4||b.Lj()!=0)&&(!this.vl()||this.b.Xh(b))){f=this.b.Nh(b,this.ul());this.f=(nke(),RD(b,69).xk());if(this.f||b.Jk()){if(this.ul()){d=RD(f,15);this.k=d}else{d=RD(f,71);this.k=this.j=d}if(ZD(this.k,59)){this.o=this.k.gc();this.n=this.o}else{this.p=!this.j?this.k.fd(this.k.gc()):this.j.Ki(this.k.gc())}if(!this.p?n3d(this):o3d(this,this.p)){e=!this.p?!this.j?this.k.Xb(--this.n):this.j.$i(--this.n):this.p.Ub();if(this.f){a=RD(e,76);a.Lk();c=a.md();this.i=c}else{c=e;this.i=c}this.g=-3;return true}}else if(f!=null){this.k=null;this.p=null;c=f;this.i=c;this.g=-2;return true}}}this.k=null;this.p=null;this.g=-1;return false}else{e=!this.p?!this.j?this.k.Xb(--this.n):this.j.$i(--this.n):this.p.Ub();if(this.f){a=RD(e,76);a.Lk();c=a.md();this.i=c}else{c=e;this.i=c}this.g=-3;return true}}}};_.Pb=function v3d(){return k3d(this)};_.Tb=function w3d(){return this.a};_.Ub=function x3d(){var a;if(this.g<-1||this.Sb()){--this.a;this.g=0;a=this.i;this.Sb();return a}else{throw Adb(new Dvb)}};_.Vb=function y3d(){return this.a-1};_.Qb=function z3d(){throw Adb(new jib)};_.ul=function A3d(){return false};_.Wb=function B3d(a){throw Adb(new jib)};_.vl=function C3d(){return true};_.a=0;_.d=0;_.f=false;_.g=0;_.n=0;_.o=0;var i3d;var Uab=sfb(ZJe,'EContentsEList/FeatureIteratorImpl',287);feb(711,287,vKe,D3d);_.ul=function E3d(){return true};var Vab=sfb(ZJe,'EContentsEList/ResolvingFeatureIteratorImpl',711);feb(1178,711,vKe,F3d);_.vl=function G3d(){return false};var l8=sfb(SHe,'ENamedElementImpl/1/1',1178);feb(1179,287,vKe,H3d);_.vl=function I3d(){return false};var m8=sfb(SHe,'ENamedElementImpl/1/2',1179);feb(39,152,GJe,L3d,M3d,N3d,O3d,P3d,Q3d,R3d,S3d,T3d,U3d,V3d,W3d,X3d,Y3d,Z3d,$3d,_3d,a4d,b4d,c4d,d4d,e4d,f4d,g4d,h4d);_.Kj=function i4d(){return K3d(this)};_.Rj=function j4d(){var a;a=K3d(this);if(a){return a.ik()}return null};_.hj=function k4d(a){this.b==-1&&!!this.a&&(this.b=this.c.Hh(this.a.Lj(),this.a.pk()));return this.c.yh(this.b,a)};_.jj=function l4d(){return this.c};_.Sj=function m4d(){var a;a=K3d(this);if(a){return a.tk()}return false};_.b=-1;var p8=sfb(SHe,'ENotificationImpl',39);feb(411,292,{110:1,94:1,93:1,155:1,197:1,58:1,62:1,114:1,481:1,54:1,99:1,158:1,411:1,292:1,119:1,120:1},q4d);_.Ah=function r4d(a){return n4d(this,a)};_.Lh=function s4d(a,b,c){var d,e,f;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Geb(),(this.Bb&256)!=0?true:false;case 3:return Geb(),(this.Bb&512)!=0?true:false;case 4:return sgb(this.s);case 5:return sgb(this.t);case 6:return Geb(),f=this.t,f>1||f==-1?true:false;case 7:return Geb(),e=this.s,e>=1?true:false;case 8:if(b)return WVd(this);return this.r;case 9:return this.q;case 10:return this.Db>>16==10?RD(this.Cb,29):null;case 11:return !this.d&&(this.d=new iie(z7,this,11)),this.d;case 12:return !this.c&&(this.c=new C5d(u7,this,12,10)),this.c;case 13:return !this.a&&(this.a=new F4d(this,this)),this.a;case 14:return o4d(this);}return zvd(this,a-AYd((JTd(),ATd)),vYd((d=RD(Ywd(this,16),29),!d?ATd:d),a),b,c)};_.Sh=function t4d(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 10:!!this.Cb&&(c=(e=this.Db>>16,e>=0?n4d(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,10,c);case 12:return !this.c&&(this.c=new C5d(u7,this,12,10)),qLd(this.c,a,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),ATd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),ATd)),a,c)};_.Uh=function u4d(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 9:return VVd(this,c);case 10:return xvd(this,null,10,c);case 11:return !this.d&&(this.d=new iie(z7,this,11)),rLd(this.d,a,c);case 12:return !this.c&&(this.c=new C5d(u7,this,12,10)),rLd(this.c,a,c);case 14:return rLd(o4d(this),a,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),ATd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),ATd)),a,c)};_.Wh=function v4d(a){var b,c,d;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return d=this.t,d>1||d==-1;case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&j2d(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&j2d(this.q).i==0);case 10:return !!(this.Db>>16==10?RD(this.Cb,29):null);case 11:return !!this.d&&this.d.i!=0;case 12:return !!this.c&&this.c.i!=0;case 13:return !!this.a&&o4d(this.a.a).i!=0&&!(!!this.b&&o5d(this.b));case 14:return !!this.b&&o5d(this.b);}return Avd(this,a-AYd((JTd(),ATd)),vYd((b=RD(Ywd(this,16),29),!b?ATd:b),a))};_.bi=function w4d(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:PAd(this,WD(b));return;case 2:_Vd(this,Heb(TD(b)));return;case 3:aWd(this,Heb(TD(b)));return;case 4:$Vd(this,RD(b,17).a);return;case 5:bWd(this,RD(b,17).a);return;case 8:YVd(this,RD(b,142));return;case 9:d=XVd(this,RD(b,89),null);!!d&&d.oj();return;case 11:!this.d&&(this.d=new iie(z7,this,11));sLd(this.d);!this.d&&(this.d=new iie(z7,this,11));YGd(this.d,RD(b,16));return;case 12:!this.c&&(this.c=new C5d(u7,this,12,10));sLd(this.c);!this.c&&(this.c=new C5d(u7,this,12,10));YGd(this.c,RD(b,16));return;case 13:!this.a&&(this.a=new F4d(this,this));VJd(this.a);!this.a&&(this.a=new F4d(this,this));YGd(this.a,RD(b,16));return;case 14:sLd(o4d(this));YGd(o4d(this),RD(b,16));return;}Bvd(this,a-AYd((JTd(),ATd)),vYd((c=RD(Ywd(this,16),29),!c?ATd:c),a),b)};_.ii=function x4d(){return JTd(),ATd};_.ki=function y4d(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:PAd(this,null);return;case 2:_Vd(this,true);return;case 3:aWd(this,true);return;case 4:$Vd(this,0);return;case 5:bWd(this,1);return;case 8:YVd(this,null);return;case 9:c=XVd(this,null,null);!!c&&c.oj();return;case 11:!this.d&&(this.d=new iie(z7,this,11));sLd(this.d);return;case 12:!this.c&&(this.c=new C5d(u7,this,12,10));sLd(this.c);return;case 13:!!this.a&&VJd(this.a);return;case 14:!!this.b&&sLd(this.b);return;}Cvd(this,a-AYd((JTd(),ATd)),vYd((b=RD(Ywd(this,16),29),!b?ATd:b),a))};_.pi=function z4d(){var a,b;if(this.c){for(a=0,b=this.c.i;a<b;++a){aAd(QHd(this.c,a))}}WVd(this);this.Bb|=1};var u8=sfb(SHe,'EOperationImpl',411);feb(513,756,tKe,F4d);_.qj=function I4d(a,b){A4d(this,a,RD(b,142))};_.rj=function J4d(a){B4d(this,RD(a,142))};_.xj=function P4d(a){var b,c;return b=RD(QHd(o4d(this.a),a),89),c=b.c,c?c:(JTd(),wTd)};_.Cj=function U4d(a){var b,c;return b=RD(vLd(o4d(this.a),a),89),c=b.c,c?c:(JTd(),wTd)};_.Dj=function V4d(a,b){return D4d(this,a,RD(b,142))};_.Li=function G4d(){return false};_.Ij=function H4d(a,b,c,d,e){return null};_.sj=function K4d(){return new l5d(this)};_.tj=function L4d(){sLd(o4d(this.a))};_.uj=function M4d(a){return C4d(this,a)};_.vj=function N4d(a){var b,c;for(c=a.Kc();c.Ob();){b=c.Pb();if(!C4d(this,b)){return false}}return true};_.wj=function O4d(a){var b,c,d;if(ZD(a,15)){d=RD(a,15);if(d.gc()==o4d(this.a).i){for(b=d.Kc(),c=new dMd(this);b.Ob();){if(dE(b.Pb())!==dE(bMd(c))){return false}}return true}}return false};_.yj=function Q4d(){var a,b,c,d,e;c=1;for(b=new dMd(o4d(this.a));b.e!=b.i.gc();){a=RD(bMd(b),89);d=(e=a.c,e?e:(JTd(),wTd));c=31*c+(!d?0:tb(d))}return c};_.zj=function R4d(a){var b,c,d,e;d=0;for(c=new dMd(o4d(this.a));c.e!=c.i.gc();){b=RD(bMd(c),89);if(dE(a)===dE((e=b.c,e?e:(JTd(),wTd)))){return d}++d}return -1};_.Aj=function S4d(){return o4d(this.a).i==0};_.Bj=function T4d(){return null};_.Ej=function W4d(){return o4d(this.a).i};_.Fj=function X4d(){var a,b,c,d,e,f;f=o4d(this.a).i;e=$C(jJ,rve,1,f,5,1);c=0;for(b=new dMd(o4d(this.a));b.e!=b.i.gc();){a=RD(bMd(b),89);e[c++]=(d=a.c,d?d:(JTd(),wTd))}return e};_.Gj=function Y4d(a){var b,c,d,e,f,g,h;h=o4d(this.a).i;if(a.length<h){e=IMd(rb(a).c,h);a=e}a.length>h&&bD(a,h,null);d=0;for(c=new dMd(o4d(this.a));c.e!=c.i.gc();){b=RD(bMd(c),89);f=(g=b.c,g?g:(JTd(),wTd));bD(a,d++,f)}return a};_.Hj=function Z4d(){var a,b,c,d,e;e=new Qhb;e.a+='[';a=o4d(this.a);for(b=0,d=o4d(this.a).i;b<d;){Nhb(e,Ghb((c=RD(QHd(a,b),89).c,c?c:(JTd(),wTd))));++b<d&&(e.a+=pve,e)}e.a+=']';return e.a};_.Jj=function $4d(a){};_.Lj=function _4d(){return 13};_.kl=function a5d(){return true};_.Mj=function b5d(){return false};_.ll=function c5d(){return false};_.ml=function d5d(){return false};_.nl=function e5d(){return true};_.al=function f5d(){return false};_.ol=function g5d(){return true};_.fk=function h5d(a){return ZD(a,142)};_.Qj=function i5d(){return p4d(this.a)};_.Si=function j5d(){return true};_.Yi=function k5d(){return true};var s8=sfb(SHe,'EOperationImpl/1',513);feb(1376,2062,kwe,l5d);_.fd=function m5d(a){return ZGd(this.a,a)};_.gc=function n5d(){return o4d(this.a.a).i};var r8=sfb(SHe,'EOperationImpl/1/1',1376);feb(1377,555,oKe,s5d);_.Ti=function w5d(a,b){var c,d;return c=RD(uLd(this,a,b),89),Mvd(this.e)&&eZd(this,new c4d(this.a,7,(JTd(),BTd),sgb(b),(d=c.c,d?d:wTd),a)),c};_.Uj=function x5d(a,b){return p5d(this,RD(a,89),b)};_.Vj=function y5d(a,b){return q5d(this,RD(a,89),b)};_.Wj=function z5d(a,b,c){return r5d(this,RD(a,89),RD(b,89),c)};_.Ij=function t5d(a,b,c,d,e){switch(a){case 3:{return dZd(this,a,b,c,d,this.i>1)}case 5:{return dZd(this,a,b,c,d,this.i-RD(c,15).gc()>0)}default:{return new P3d(this.e,a,this.c,b,c,d,true)}}};_.Tj=function u5d(){return true};_.Qj=function v5d(){return o5d(this)};_.Gk=function A5d(){sLd(this)};var t8=sfb(SHe,'EOperationImpl/2',1377);feb(507,1,{2037:1,507:1},B5d);var v8=sfb(SHe,'EPackageImpl/1',507);feb(14,83,oKe,C5d);_.il=function D5d(){return this.d};_.jl=function E5d(){return this.b};_.ml=function F5d(){return true};_.b=0;var gbb=sfb(ZJe,'EObjectContainmentWithInverseEList',14);feb(365,14,oKe,G5d);_.nl=function H5d(){return true};_.Wi=function I5d(a,b){return gZd(this,a,RD(b,58))};var dbb=sfb(ZJe,'EObjectContainmentWithInverseEList/Resolving',365);feb(308,365,oKe,J5d);_.Ni=function K5d(){this.a.tb=null};var w8=sfb(SHe,'EPackageImpl/2',308);feb(1278,1,{},L5d);var x8=sfb(SHe,'EPackageImpl/3',1278);feb(733,45,Hxe,O5d);_._b=function P5d(a){return bE(a)?Yjb(this,a):!!qtb(this.f,a)};var z8=sfb(SHe,'EPackageRegistryImpl',733);feb(518,292,{110:1,94:1,93:1,155:1,197:1,58:1,2116:1,114:1,481:1,54:1,99:1,158:1,518:1,292:1,119:1,120:1},R5d);_.Ah=function S5d(a){return Q5d(this,a)};_.Lh=function T5d(a,b,c){var d,e,f;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Geb(),(this.Bb&256)!=0?true:false;case 3:return Geb(),(this.Bb&512)!=0?true:false;case 4:return sgb(this.s);case 5:return sgb(this.t);case 6:return Geb(),f=this.t,f>1||f==-1?true:false;case 7:return Geb(),e=this.s,e>=1?true:false;case 8:if(b)return WVd(this);return this.r;case 9:return this.q;case 10:return this.Db>>16==10?RD(this.Cb,62):null;}return zvd(this,a-AYd((JTd(),DTd)),vYd((d=RD(Ywd(this,16),29),!d?DTd:d),a),b,c)};_.Sh=function U5d(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),qLd(this.Ab,a,c);case 10:!!this.Cb&&(c=(e=this.Db>>16,e>=0?Q5d(this,c):this.Cb.Th(this,-1-e,null,c)));return xvd(this,a,10,c);}return f=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),DTd):d),b),69),f.wk().zk(this,Wwd(this),b-AYd((JTd(),DTd)),a,c)};_.Uh=function V5d(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 9:return VVd(this,c);case 10:return xvd(this,null,10,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),DTd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),DTd)),a,c)};_.Wh=function W5d(a){var b,c,d;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return d=this.t,d>1||d==-1;case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&j2d(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&j2d(this.q).i==0);case 10:return !!(this.Db>>16==10?RD(this.Cb,62):null);}return Avd(this,a-AYd((JTd(),DTd)),vYd((b=RD(Ywd(this,16),29),!b?DTd:b),a))};_.ii=function X5d(){return JTd(),DTd};var A8=sfb(SHe,'EParameterImpl',518);feb(102,462,{110:1,94:1,93:1,155:1,197:1,58:1,19:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,102:1,462:1,292:1,119:1,120:1,692:1},d6d);_.Lh=function e6d(a,b,c){var d,e,f,g;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Geb(),(this.Bb&256)!=0?true:false;case 3:return Geb(),(this.Bb&512)!=0?true:false;case 4:return sgb(this.s);case 5:return sgb(this.t);case 6:return Geb(),g=this.t,g>1||g==-1?true:false;case 7:return Geb(),e=this.s,e>=1?true:false;case 8:if(b)return WVd(this);return this.r;case 9:return this.q;case 10:return Geb(),(this.Bb&gwe)!=0?true:false;case 11:return Geb(),(this.Bb&cKe)!=0?true:false;case 12:return Geb(),(this.Bb&qxe)!=0?true:false;case 13:return this.j;case 14:return tWd(this);case 15:return Geb(),(this.Bb&bKe)!=0?true:false;case 16:return Geb(),(this.Bb&Ove)!=0?true:false;case 17:return uWd(this);case 18:return Geb(),(this.Bb&QHe)!=0?true:false;case 19:return Geb(),f=Z5d(this),!!f&&(f.Bb&QHe)!=0?true:false;case 20:return Geb(),(this.Bb&txe)!=0?true:false;case 21:if(b)return Z5d(this);return this.b;case 22:if(b)return $5d(this);return Y5d(this);case 23:return !this.a&&(this.a=new zie(g7,this,23)),this.a;}return zvd(this,a-AYd((JTd(),ETd)),vYd((d=RD(Ywd(this,16),29),!d?ETd:d),a),b,c)};_.Wh=function f6d(a){var b,c,d,e;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return e=this.t,e>1||e==-1;case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&j2d(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&j2d(this.q).i==0);case 10:return (this.Bb&gwe)==0;case 11:return (this.Bb&cKe)!=0;case 12:return (this.Bb&qxe)!=0;case 13:return this.j!=null;case 14:return tWd(this)!=null;case 15:return (this.Bb&bKe)!=0;case 16:return (this.Bb&Ove)!=0;case 17:return !!uWd(this);case 18:return (this.Bb&QHe)!=0;case 19:return d=Z5d(this),!!d&&(d.Bb&QHe)!=0;case 20:return (this.Bb&txe)==0;case 21:return !!this.b;case 22:return !!Y5d(this);case 23:return !!this.a&&this.a.i!=0;}return Avd(this,a-AYd((JTd(),ETd)),vYd((b=RD(Ywd(this,16),29),!b?ETd:b),a))};_.bi=function g6d(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:CWd(this,WD(b));return;case 2:_Vd(this,Heb(TD(b)));return;case 3:aWd(this,Heb(TD(b)));return;case 4:$Vd(this,RD(b,17).a);return;case 5:bWd(this,RD(b,17).a);return;case 8:YVd(this,RD(b,142));return;case 9:d=XVd(this,RD(b,89),null);!!d&&d.oj();return;case 10:xWd(this,Heb(TD(b)));return;case 11:FWd(this,Heb(TD(b)));return;case 12:DWd(this,Heb(TD(b)));return;case 13:yWd(this,WD(b));return;case 15:EWd(this,Heb(TD(b)));return;case 16:AWd(this,Heb(TD(b)));return;case 18:_5d(this,Heb(TD(b)));return;case 20:c6d(this,Heb(TD(b)));return;case 21:b6d(this,RD(b,19));return;case 23:!this.a&&(this.a=new zie(g7,this,23));sLd(this.a);!this.a&&(this.a=new zie(g7,this,23));YGd(this.a,RD(b,16));return;}Bvd(this,a-AYd((JTd(),ETd)),vYd((c=RD(Ywd(this,16),29),!c?ETd:c),a),b)};_.ii=function h6d(){return JTd(),ETd};_.ki=function i6d(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:ZD(this.Cb,90)&&v$d(yYd(RD(this.Cb,90)),4);PAd(this,null);return;case 2:_Vd(this,true);return;case 3:aWd(this,true);return;case 4:$Vd(this,0);return;case 5:bWd(this,1);return;case 8:YVd(this,null);return;case 9:c=XVd(this,null,null);!!c&&c.oj();return;case 10:xWd(this,true);return;case 11:FWd(this,false);return;case 12:DWd(this,false);return;case 13:this.i=null;zWd(this,null);return;case 15:EWd(this,false);return;case 16:AWd(this,false);return;case 18:a6d(this,false);ZD(this.Cb,90)&&v$d(yYd(RD(this.Cb,90)),2);return;case 20:c6d(this,true);return;case 21:b6d(this,null);return;case 23:!this.a&&(this.a=new zie(g7,this,23));sLd(this.a);return;}Cvd(this,a-AYd((JTd(),ETd)),vYd((b=RD(Ywd(this,16),29),!b?ETd:b),a))};_.pi=function j6d(){$5d(this);Afe(Qee((lke(),jke),this));WVd(this);this.Bb|=1};_.uk=function k6d(){return Z5d(this)};_._k=function l6d(){var a;return a=Z5d(this),!!a&&(a.Bb&QHe)!=0};_.al=function m6d(){return (this.Bb&QHe)!=0};_.bl=function n6d(){return (this.Bb&txe)!=0};_.Yk=function o6d(a,b){this.c=null;return ZVd(this,a,b)};_.Ib=function p6d(){var a;if((this.Db&64)!=0)return GWd(this);a=new Shb(GWd(this));a.a+=' (containment: ';Ohb(a,(this.Bb&QHe)!=0);a.a+=', resolveProxies: ';Ohb(a,(this.Bb&txe)!=0);a.a+=')';return a.a};var B8=sfb(SHe,'EReferenceImpl',102);feb(561,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,561:1,119:1,120:1},v6d);_.Fb=function B6d(a){return this===a};_.ld=function D6d(){return this.b};_.md=function E6d(){return this.c};_.Hb=function F6d(){return kFb(this)};_.Di=function H6d(a){q6d(this,WD(a))};_.nd=function I6d(a){return u6d(this,WD(a))};_.Lh=function w6d(a,b,c){var d;switch(a){case 0:return this.b;case 1:return this.c;}return zvd(this,a-AYd((JTd(),FTd)),vYd((d=RD(Ywd(this,16),29),!d?FTd:d),a),b,c)};_.Wh=function x6d(a){var b;switch(a){case 0:return this.b!=null;case 1:return this.c!=null;}return Avd(this,a-AYd((JTd(),FTd)),vYd((b=RD(Ywd(this,16),29),!b?FTd:b),a))};_.bi=function y6d(a,b){var c;switch(a){case 0:r6d(this,WD(b));return;case 1:t6d(this,WD(b));return;}Bvd(this,a-AYd((JTd(),FTd)),vYd((c=RD(Ywd(this,16),29),!c?FTd:c),a),b)};_.ii=function z6d(){return JTd(),FTd};_.ki=function A6d(a){var b;switch(a){case 0:s6d(this,null);return;case 1:t6d(this,null);return;}Cvd(this,a-AYd((JTd(),FTd)),vYd((b=RD(Ywd(this,16),29),!b?FTd:b),a))};_.Bi=function C6d(){var a;if(this.a==-1){a=this.b;this.a=a==null?0:ohb(a)}return this.a};_.Ci=function G6d(a){this.a=a};_.Ib=function J6d(){var a;if((this.Db&64)!=0)return awd(this);a=new Shb(awd(this));a.a+=' (key: ';Nhb(a,this.b);a.a+=', value: ';Nhb(a,this.c);a.a+=')';return a.a};_.a=-1;_.b=null;_.c=null;var C8=sfb(SHe,'EStringToStringMapEntryImpl',561);var Ibb=ufb(ZJe,'FeatureMap/Entry/Internal');feb(576,1,wKe);_.xl=function M6d(a){return this.yl(RD(a,54))};_.yl=function N6d(a){return this.xl(a)};_.Fb=function O6d(a){var b,c;if(this===a){return true}else if(ZD(a,76)){b=RD(a,76);if(b.Lk()==this.c){c=this.md();return c==null?b.md()==null:pb(c,b.md())}else{return false}}else{return false}};_.Lk=function P6d(){return this.c};_.Hb=function Q6d(){var a;a=this.md();return tb(this.c)^(a==null?0:tb(a))};_.Ib=function R6d(){var a,b;a=this.c;b=BXd(a.qk()).yi();a.xe();return (b!=null&&b.length!=0?b+':'+a.xe():a.xe())+'='+this.md()};var D8=sfb(SHe,'EStructuralFeatureImpl/BasicFeatureMapEntry',576);feb(791,576,wKe,U6d);_.yl=function V6d(a){return new U6d(this.c,a)};_.md=function W6d(){return this.a};_.zl=function X6d(a,b,c){return S6d(this,a,this.a,b,c)};_.Al=function Y6d(a,b,c){return T6d(this,a,this.a,b,c)};var E8=sfb(SHe,'EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry',791);feb(1350,1,{},Z6d);_.yk=function $6d(a,b,c,d,e){var f;f=RD(Evd(a,this.b),220);return f.Yl(this.a).Fk(d)};_.zk=function _6d(a,b,c,d,e){var f;f=RD(Evd(a,this.b),220);return f.Pl(this.a,d,e)};_.Ak=function a7d(a,b,c,d,e){var f;f=RD(Evd(a,this.b),220);return f.Ql(this.a,d,e)};_.Bk=function b7d(a,b,c){var d;d=RD(Evd(a,this.b),220);return d.Yl(this.a).Qj()};_.Ck=function c7d(a,b,c,d){var e;e=RD(Evd(a,this.b),220);e.Yl(this.a).Wb(d)};_.Dk=function d7d(a,b,c){return RD(Evd(a,this.b),220).Yl(this.a)};_.Ek=function e7d(a,b,c){var d;d=RD(Evd(a,this.b),220);d.Yl(this.a).Gk()};var F8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator',1350);feb(91,1,{},g7d,h7d,i7d,j7d);_.yk=function k7d(a,b,c,d,e){var f;f=b.li(c);f==null&&b.mi(c,f=f7d(this,a));if(!e){switch(this.e){case 50:case 41:return RD(f,597).bk();case 40:return RD(f,220).Vl();}}return f};_.zk=function l7d(a,b,c,d,e){var f,g;g=b.li(c);g==null&&b.mi(c,g=f7d(this,a));f=RD(g,71).Wk(d,e);return f};_.Ak=function m7d(a,b,c,d,e){var f;f=b.li(c);f!=null&&(e=RD(f,71).Xk(d,e));return e};_.Bk=function n7d(a,b,c){var d;d=b.li(c);return d!=null&&RD(d,79).Qj()};_.Ck=function o7d(a,b,c,d){var e;e=RD(b.li(c),79);!e&&b.mi(c,e=f7d(this,a));e.Wb(d)};_.Dk=function p7d(a,b,c){var d,e;e=b.li(c);e==null&&b.mi(c,e=f7d(this,a));if(ZD(e,79)){return RD(e,79)}else{d=RD(b.li(c),15);return new I9d(d)}};_.Ek=function q7d(a,b,c){var d;d=RD(b.li(c),79);!d&&b.mi(c,d=f7d(this,a));d.Gk()};_.b=0;_.e=0;var G8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateMany',91);feb(512,1,{});_.zk=function u7d(a,b,c,d,e){throw Adb(new jib)};_.Ak=function v7d(a,b,c,d,e){throw Adb(new jib)};_.Dk=function w7d(a,b,c){return new x7d(this,a,b,c)};var r7d;var n9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingle',512);feb(1367,1,$Je,x7d);_.Fk=function y7d(a){return this.a.yk(this.c,this.d,this.b,a,true)};_.Qj=function z7d(){return this.a.Bk(this.c,this.d,this.b)};_.Wb=function A7d(a){this.a.Ck(this.c,this.d,this.b,a)};_.Gk=function B7d(){this.a.Ek(this.c,this.d,this.b)};_.b=0;var H8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingle/1',1367);feb(784,512,{},C7d);_.yk=function D7d(a,b,c,d,e){return jwd(a,a.Ph(),a.Fh())==this.b?this.bl()&&d?yvd(a):a.Ph():null};_.zk=function E7d(a,b,c,d,e){var f,g;!!a.Ph()&&(e=(f=a.Fh(),f>=0?a.Ah(e):a.Ph().Th(a,-1-f,null,e)));g=BYd(a.Dh(),this.e);return a.Ch(d,g,e)};_.Ak=function F7d(a,b,c,d,e){var f;f=BYd(a.Dh(),this.e);return a.Ch(null,f,e)};_.Bk=function G7d(a,b,c){var d;d=BYd(a.Dh(),this.e);return !!a.Ph()&&a.Fh()==d};_.Ck=function H7d(a,b,c,d){var e,f,g,h,i;if(d!=null&&!FXd(this.a,d)){throw Adb(new Ifb(xKe+(ZD(d,58)?GYd(RD(d,58).Dh()):ofb(rb(d)))+yKe+this.a+"'"))}e=a.Ph();g=BYd(a.Dh(),this.e);if(dE(d)!==dE(e)||a.Fh()!=g&&d!=null){if(Oje(a,RD(d,58)))throw Adb(new agb(UHe+a.Ib()));i=null;!!e&&(i=(f=a.Fh(),f>=0?a.Ah(i):a.Ph().Th(a,-1-f,null,i)));h=RD(d,54);!!h&&(i=h.Rh(a,BYd(h.Dh(),this.b),null,i));i=a.Ch(h,g,i);!!i&&i.oj()}else{a.vh()&&a.wh()&&qvd(a,new N3d(a,1,g,d,d))}};_.Ek=function I7d(a,b,c){var d,e,f,g;d=a.Ph();if(d){g=(e=a.Fh(),e>=0?a.Ah(null):a.Ph().Th(a,-1-e,null,null));f=BYd(a.Dh(),this.e);g=a.Ch(null,f,g);!!g&&g.oj()}else{a.vh()&&a.wh()&&qvd(a,new b4d(a,1,this.e,null,null))}};_.bl=function J7d(){return false};var J8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleContainer',784);feb(1351,784,{},K7d);_.bl=function L7d(){return true};var I8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving',1351);feb(574,512,{});_.yk=function O7d(a,b,c,d,e){var f;return f=b.li(c),f==null?this.b:dE(f)===dE(r7d)?null:f};_.Bk=function P7d(a,b,c){var d;d=b.li(c);return d!=null&&(dE(d)===dE(r7d)||!pb(d,this.b))};_.Ck=function Q7d(a,b,c,d){var e,f;if(a.vh()&&a.wh()){e=(f=b.li(c),f==null?this.b:dE(f)===dE(r7d)?null:f);if(d==null){if(this.c!=null){b.mi(c,null);d=this.b}else this.b!=null?b.mi(c,r7d):b.mi(c,null)}else{this.Bl(d);b.mi(c,d)}qvd(a,this.d.Cl(a,1,this.e,e,d))}else{if(d==null){this.c!=null?b.mi(c,null):this.b!=null?b.mi(c,r7d):b.mi(c,null)}else{this.Bl(d);b.mi(c,d)}}};_.Ek=function R7d(a,b,c){var d,e;if(a.vh()&&a.wh()){d=(e=b.li(c),e==null?this.b:dE(e)===dE(r7d)?null:e);b.ni(c);qvd(a,this.d.Cl(a,1,this.e,d,this.b))}else{b.ni(c)}};_.Bl=function S7d(a){throw Adb(new Hfb)};var Y8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData',574);feb(zKe,1,{},b8d);_.Cl=function c8d(a,b,c,d,e){return new b4d(a,b,c,d,e)};_.Dl=function d8d(a,b,c,d,e,f){return new d4d(a,b,c,d,e,f)};var T7d,U7d,V7d,W7d,X7d,Y7d,Z7d,$7d,_7d;var S8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator',zKe);feb(1368,zKe,{},e8d);_.Cl=function f8d(a,b,c,d,e){return new g4d(a,b,c,Heb(TD(d)),Heb(TD(e)))};_.Dl=function g8d(a,b,c,d,e,f){return new h4d(a,b,c,Heb(TD(d)),Heb(TD(e)),f)};var K8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1',1368);feb(1369,zKe,{},h8d);_.Cl=function i8d(a,b,c,d,e){return new R3d(a,b,c,RD(d,222).a,RD(e,222).a)};_.Dl=function j8d(a,b,c,d,e,f){return new S3d(a,b,c,RD(d,222).a,RD(e,222).a,f)};var L8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2',1369);feb(1370,zKe,{},k8d);_.Cl=function l8d(a,b,c,d,e){return new T3d(a,b,c,RD(d,180).a,RD(e,180).a)};_.Dl=function m8d(a,b,c,d,e,f){return new U3d(a,b,c,RD(d,180).a,RD(e,180).a,f)};var M8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3',1370);feb(1371,zKe,{},n8d);_.Cl=function o8d(a,b,c,d,e){return new V3d(a,b,c,Kfb(UD(d)),Kfb(UD(e)))};_.Dl=function p8d(a,b,c,d,e,f){return new W3d(a,b,c,Kfb(UD(d)),Kfb(UD(e)),f)};var N8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4',1371);feb(1372,zKe,{},q8d);_.Cl=function r8d(a,b,c,d,e){return new X3d(a,b,c,RD(d,161).a,RD(e,161).a)};_.Dl=function s8d(a,b,c,d,e,f){return new Y3d(a,b,c,RD(d,161).a,RD(e,161).a,f)};var O8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5',1372);feb(1373,zKe,{},t8d);_.Cl=function u8d(a,b,c,d,e){return new Z3d(a,b,c,RD(d,17).a,RD(e,17).a)};_.Dl=function v8d(a,b,c,d,e,f){return new $3d(a,b,c,RD(d,17).a,RD(e,17).a,f)};var P8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6',1373);feb(1374,zKe,{},w8d);_.Cl=function x8d(a,b,c,d,e){return new _3d(a,b,c,RD(d,168).a,RD(e,168).a)};_.Dl=function y8d(a,b,c,d,e,f){return new a4d(a,b,c,RD(d,168).a,RD(e,168).a,f)};var Q8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7',1374);feb(1375,zKe,{},z8d);_.Cl=function A8d(a,b,c,d,e){return new e4d(a,b,c,RD(d,191).a,RD(e,191).a)};_.Dl=function B8d(a,b,c,d,e,f){return new f4d(a,b,c,RD(d,191).a,RD(e,191).a,f)};var R8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8',1375);feb(1353,574,{},C8d);_.Bl=function D8d(a){if(!this.a.fk(a)){throw Adb(new Ifb(xKe+rb(a)+yKe+this.a+"'"))}};var T8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic',1353);feb(1354,574,{},E8d);_.Bl=function F8d(a){};var U8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic',1354);feb(785,574,{});_.Bk=function G8d(a,b,c){var d;d=b.li(c);return d!=null};_.Ck=function H8d(a,b,c,d){var e,f;if(a.vh()&&a.wh()){e=true;f=b.li(c);if(f==null){e=false;f=this.b}else dE(f)===dE(r7d)&&(f=null);if(d==null){if(this.c!=null){b.mi(c,null);d=this.b}else{b.mi(c,r7d)}}else{this.Bl(d);b.mi(c,d)}qvd(a,this.d.Dl(a,1,this.e,f,d,!e))}else{if(d==null){this.c!=null?b.mi(c,null):b.mi(c,r7d)}else{this.Bl(d);b.mi(c,d)}}};_.Ek=function I8d(a,b,c){var d,e;if(a.vh()&&a.wh()){d=true;e=b.li(c);if(e==null){d=false;e=this.b}else dE(e)===dE(r7d)&&(e=null);b.ni(c);qvd(a,this.d.Dl(a,2,this.e,e,this.b,d))}else{b.ni(c)}};var X8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable',785);feb(1355,785,{},J8d);_.Bl=function K8d(a){if(!this.a.fk(a)){throw Adb(new Ifb(xKe+rb(a)+yKe+this.a+"'"))}};var V8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic',1355);feb(1356,785,{},L8d);_.Bl=function M8d(a){};var W8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic',1356);feb(410,512,{},N8d);_.yk=function P8d(a,b,c,d,e){var f,g,h,i,j;j=b.li(c);if(this.tk()&&dE(j)===dE(r7d)){return null}else if(this.bl()&&d&&j!=null){h=RD(j,54);if(h.Vh()){i=Vvd(a,h);if(h!=i){if(!FXd(this.a,i)){throw Adb(new Ifb(xKe+rb(i)+yKe+this.a+"'"))}b.mi(c,j=i);if(this.al()){f=RD(i,54);g=h.Th(a,!this.b?-1-BYd(a.Dh(),this.e):BYd(h.Dh(),this.b),null,null);!f.Ph()&&(g=f.Rh(a,!this.b?-1-BYd(a.Dh(),this.e):BYd(f.Dh(),this.b),null,g));!!g&&g.oj()}a.vh()&&a.wh()&&qvd(a,new b4d(a,9,this.e,h,i))}}return j}else{return j}};_.zk=function Q8d(a,b,c,d,e){var f,g;g=b.li(c);dE(g)===dE(r7d)&&(g=null);b.mi(c,d);if(this.Mj()){if(dE(g)!==dE(d)&&g!=null){f=RD(g,54);e=f.Th(a,BYd(f.Dh(),this.b),null,e)}}else this.al()&&g!=null&&(e=RD(g,54).Th(a,-1-BYd(a.Dh(),this.e),null,e));if(a.vh()&&a.wh()){!e&&(e=new gLd(4));e.nj(new b4d(a,1,this.e,g,d))}return e};_.Ak=function R8d(a,b,c,d,e){var f;f=b.li(c);dE(f)===dE(r7d)&&(f=null);b.ni(c);if(a.vh()&&a.wh()){!e&&(e=new gLd(4));this.tk()?e.nj(new b4d(a,2,this.e,f,null)):e.nj(new b4d(a,1,this.e,f,null))}return e};_.Bk=function S8d(a,b,c){var d;d=b.li(c);return d!=null};_.Ck=function T8d(a,b,c,d){var e,f,g,h,i;if(d!=null&&!FXd(this.a,d)){throw Adb(new Ifb(xKe+(ZD(d,58)?GYd(RD(d,58).Dh()):ofb(rb(d)))+yKe+this.a+"'"))}i=b.li(c);h=i!=null;this.tk()&&dE(i)===dE(r7d)&&(i=null);g=null;if(this.Mj()){if(dE(i)!==dE(d)){if(i!=null){e=RD(i,54);g=e.Th(a,BYd(e.Dh(),this.b),null,g)}if(d!=null){e=RD(d,54);g=e.Rh(a,BYd(e.Dh(),this.b),null,g)}}}else if(this.al()){if(dE(i)!==dE(d)){i!=null&&(g=RD(i,54).Th(a,-1-BYd(a.Dh(),this.e),null,g));d!=null&&(g=RD(d,54).Rh(a,-1-BYd(a.Dh(),this.e),null,g))}}d==null&&this.tk()?b.mi(c,r7d):b.mi(c,d);if(a.vh()&&a.wh()){f=new d4d(a,1,this.e,i,d,this.tk()&&!h);if(!g){qvd(a,f)}else{g.nj(f);g.oj()}}else !!g&&g.oj()};_.Ek=function U8d(a,b,c){var d,e,f,g,h;h=b.li(c);g=h!=null;this.tk()&&dE(h)===dE(r7d)&&(h=null);f=null;if(h!=null){if(this.Mj()){d=RD(h,54);f=d.Th(a,BYd(d.Dh(),this.b),null,f)}else this.al()&&(f=RD(h,54).Th(a,-1-BYd(a.Dh(),this.e),null,f))}b.ni(c);if(a.vh()&&a.wh()){e=new d4d(a,this.tk()?2:1,this.e,h,null,g);if(!f){qvd(a,e)}else{f.nj(e);f.oj()}}else !!f&&f.oj()};_.Mj=function V8d(){return false};_.al=function W8d(){return false};_.bl=function X8d(){return false};_.tk=function Y8d(){return false};var m9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObject',410);feb(575,410,{},Z8d);_.al=function $8d(){return true};var e9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment',575);feb(1359,575,{},_8d);_.bl=function a9d(){return true};var Z8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving',1359);feb(787,575,{},b9d);_.tk=function c9d(){return true};var _8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable',787);feb(1361,787,{},d9d);_.bl=function e9d(){return true};var $8=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving',1361);feb(650,575,{},f9d);_.Mj=function g9d(){return true};var d9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse',650);feb(1360,650,{},h9d);_.bl=function i9d(){return true};var a9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving',1360);feb(788,650,{},j9d);_.tk=function k9d(){return true};var c9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable',788);feb(1362,788,{},l9d);_.bl=function m9d(){return true};var b9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving',1362);feb(651,410,{},n9d);_.bl=function o9d(){return true};var i9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving',651);feb(1363,651,{},p9d);_.tk=function q9d(){return true};var f9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable',1363);feb(789,651,{},r9d);_.Mj=function s9d(){return true};var h9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse',789);feb(1364,789,{},t9d);_.tk=function u9d(){return true};var g9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable',1364);feb(1357,410,{},v9d);_.tk=function w9d(){return true};var j9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable',1357);feb(786,410,{},x9d);_.Mj=function y9d(){return true};var l9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse',786);feb(1358,786,{},z9d);_.tk=function A9d(){return true};var k9=sfb(SHe,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable',1358);feb(790,576,wKe,D9d);_.yl=function E9d(a){return new D9d(this.a,this.c,a)};_.md=function F9d(){return this.b};_.zl=function G9d(a,b,c){return B9d(this,a,this.b,c)};_.Al=function H9d(a,b,c){return C9d(this,a,this.b,c)};var o9=sfb(SHe,'EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry',790);feb(1365,1,$Je,I9d);_.Fk=function J9d(a){return this.a};_.Qj=function K9d(){return ZD(this.a,97)?RD(this.a,97).Qj():!this.a.dc()};_.Wb=function L9d(a){this.a.$b();this.a.Gc(RD(a,15))};_.Gk=function M9d(){ZD(this.a,97)?RD(this.a,97).Gk():this.a.$b()};var p9=sfb(SHe,'EStructuralFeatureImpl/SettingMany',1365);feb(1366,576,wKe,N9d);_.xl=function O9d(a){return new S9d((nme(),mme),this.b.ri(this.a,a))};_.md=function P9d(){return null};_.zl=function Q9d(a,b,c){return c};_.Al=function R9d(a,b,c){return c};var q9=sfb(SHe,'EStructuralFeatureImpl/SimpleContentFeatureMapEntry',1366);feb(652,576,wKe,S9d);_.xl=function T9d(a){return new S9d(this.c,a)};_.md=function U9d(){return this.a};_.zl=function V9d(a,b,c){return c};_.Al=function W9d(a,b,c){return c};var r9=sfb(SHe,'EStructuralFeatureImpl/SimpleFeatureMapEntry',652);feb(403,506,PIe,X9d);_.aj=function Y9d(a){return $C(h7,rve,29,a,0,1)};_.Yi=function Z9d(){return false};var t9=sfb(SHe,'ESuperAdapter/1',403);feb(457,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,850:1,54:1,99:1,158:1,457:1,119:1,120:1},_9d);_.Lh=function aae(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return !this.a&&(this.a=new iae(this,o7,this)),this.a;}return zvd(this,a-AYd((JTd(),ITd)),vYd((d=RD(Ywd(this,16),29),!d?ITd:d),a),b,c)};_.Uh=function bae(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new C5d(f7,this,0,3)),rLd(this.Ab,a,c);case 2:return !this.a&&(this.a=new iae(this,o7,this)),rLd(this.a,a,c);}return e=RD(vYd((d=RD(Ywd(this,16),29),!d?(JTd(),ITd):d),b),69),e.wk().Ak(this,Wwd(this),b-AYd((JTd(),ITd)),a,c)};_.Wh=function cae(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return !!this.a&&this.a.i!=0;}return Avd(this,a-AYd((JTd(),ITd)),vYd((b=RD(Ywd(this,16),29),!b?ITd:b),a))};_.bi=function dae(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);!this.Ab&&(this.Ab=new C5d(f7,this,0,3));YGd(this.Ab,RD(b,16));return;case 1:PAd(this,WD(b));return;case 2:!this.a&&(this.a=new iae(this,o7,this));sLd(this.a);!this.a&&(this.a=new iae(this,o7,this));YGd(this.a,RD(b,16));return;}Bvd(this,a-AYd((JTd(),ITd)),vYd((c=RD(Ywd(this,16),29),!c?ITd:c),a),b)};_.ii=function eae(){return JTd(),ITd};_.ki=function fae(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new C5d(f7,this,0,3));sLd(this.Ab);return;case 1:PAd(this,null);return;case 2:!this.a&&(this.a=new iae(this,o7,this));sLd(this.a);return;}Cvd(this,a-AYd((JTd(),ITd)),vYd((b=RD(Ywd(this,16),29),!b?ITd:b),a))};var z9=sfb(SHe,'ETypeParameterImpl',457);feb(458,83,oKe,iae);_.Nj=function jae(a,b){return gae(this,RD(a,89),b)};_.Oj=function kae(a,b){return hae(this,RD(a,89),b)};var v9=sfb(SHe,'ETypeParameterImpl/1',458);feb(647,45,Hxe,lae);_.ec=function mae(){return new pae(this)};var y9=sfb(SHe,'ETypeParameterImpl/2',647);feb(570,Eve,Fve,pae);_.Fc=function qae(a){return nae(this,RD(a,89))};_.Gc=function rae(a){var b,c,d;d=false;for(c=a.Kc();c.Ob();){b=RD(c.Pb(),89);Zjb(this.a,b,'')==null&&(d=true)}return d};_.$b=function sae(){akb(this.a)};_.Hc=function tae(a){return Ujb(this.a,a)};_.Kc=function uae(){var a;return a=new vkb((new mkb(this.a)).a),new xae(a)};_.Mc=function vae(a){return oae(this,a)};_.gc=function wae(){return bkb(this.a)};var x9=sfb(SHe,'ETypeParameterImpl/2/1',570);feb(571,1,Ave,xae);_.Nb=function yae(a){Ztb(this,a)};_.Pb=function Aae(){return RD(tkb(this.a).ld(),89)};_.Ob=function zae(){return this.a.b};_.Qb=function Bae(){ukb(this.a)};var w9=sfb(SHe,'ETypeParameterImpl/2/1/1',571);feb(1329,45,Hxe,Cae);_._b=function Dae(a){return bE(a)?Yjb(this,a):!!qtb(this.f,a)};_.xc=function Eae(a){var b,c;b=bE(a)?Xjb(this,a):Wd(qtb(this.f,a));if(ZD(b,851)){c=RD(b,851);b=c.Kk();Zjb(this,RD(a,241),b);return b}else return b!=null?b:a==null?(Gie(),Fie):null};var B9=sfb(SHe,'EValidatorRegistryImpl',1329);feb(1349,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,2040:1,54:1,99:1,158:1,119:1,120:1},Mae);_.ri=function Nae(a,b){switch(a.hk()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return b==null?null:jeb(b);case 25:return Gae(b);case 27:return Hae(b);case 28:return Iae(b);case 29:return b==null?null:a2d(nAd[0],RD(b,206));case 41:return b==null?'':nfb(RD(b,297));case 42:return jeb(b);case 50:return WD(b);default:throw Adb(new agb(VHe+a.xe()+WHe));}};_.si=function Oae(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;switch(a.G==-1&&(a.G=(m=BXd(a),m?fZd(m.vi(),a):-1)),a.G){case 0:return c=new mXd,c;case 1:return b=new pVd,b;case 2:return d=new HYd,d;case 4:return e=new k1d,e;case 5:return f=new A1d,f;case 6:return g=new R1d,g;case 7:return h=new yAd,h;case 10:return j=new kUd,j;case 11:return k=new q4d,k;case 12:return l=new EBd,l;case 13:return n=new R5d,n;case 14:return o=new d6d,o;case 17:return p=new v6d,p;case 18:return i=new s2d,i;case 19:return q=new _9d,q;default:throw Adb(new agb(ZHe+a.zb+WHe));}};_.ti=function Pae(a,b){switch(a.hk()){case 20:return b==null?null:new Bib(b);case 21:return b==null?null:new ejb(b);case 23:case 22:return b==null?null:Fae(b);case 26:case 24:return b==null?null:$eb(Oeb(b,-128,127)<<24>>24);case 25:return vAd(b);case 27:return Jae(b);case 28:return Kae(b);case 29:return Lae(b);case 32:case 31:return b==null?null:Neb(b);case 38:case 37:return b==null?null:new Ufb(b);case 40:case 39:return b==null?null:sgb(Oeb(b,qwe,lve));case 41:return null;case 42:return b==null?null:null;case 44:case 43:return b==null?null:Hgb(Peb(b));case 49:case 48:return b==null?null:bhb(Oeb(b,BKe,32767)<<16>>16);case 50:return b;default:throw Adb(new agb(VHe+a.xe()+WHe));}};var C9=sfb(SHe,'EcoreFactoryImpl',1349);feb(560,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,2038:1,54:1,99:1,158:1,184:1,560:1,119:1,120:1,690:1},$ae);_.gb=false;_.hb=false;var Rae,Sae=false;var tab=sfb(SHe,'EcorePackageImpl',560);feb(1234,1,{851:1},cbe);_.Kk=function dbe(){return fke(),eke};var N9=sfb(SHe,'EcorePackageImpl/1',1234);feb(1243,1,OKe,ebe);_.fk=function fbe(a){return ZD(a,155)};_.gk=function gbe(a){return $C(p7,rve,155,a,0,1)};var D9=sfb(SHe,'EcorePackageImpl/10',1243);feb(1244,1,OKe,hbe);_.fk=function ibe(a){return ZD(a,197)};_.gk=function jbe(a){return $C(q7,rve,197,a,0,1)};var E9=sfb(SHe,'EcorePackageImpl/11',1244);feb(1245,1,OKe,kbe);_.fk=function lbe(a){return ZD(a,58)};_.gk=function mbe(a){return $C(r7,rve,58,a,0,1)};var F9=sfb(SHe,'EcorePackageImpl/12',1245);feb(1246,1,OKe,nbe);_.fk=function obe(a){return ZD(a,411)};_.gk=function pbe(a){return $C(s7,mKe,62,a,0,1)};var G9=sfb(SHe,'EcorePackageImpl/13',1246);feb(1247,1,OKe,qbe);_.fk=function rbe(a){return ZD(a,241)};_.gk=function sbe(a){return $C(t7,rve,241,a,0,1)};var H9=sfb(SHe,'EcorePackageImpl/14',1247);feb(1248,1,OKe,tbe);_.fk=function ube(a){return ZD(a,518)};_.gk=function vbe(a){return $C(u7,rve,2116,a,0,1)};var I9=sfb(SHe,'EcorePackageImpl/15',1248);feb(1249,1,OKe,wbe);_.fk=function xbe(a){return ZD(a,102)};_.gk=function ybe(a){return $C(v7,lKe,19,a,0,1)};var J9=sfb(SHe,'EcorePackageImpl/16',1249);feb(1250,1,OKe,zbe);_.fk=function Abe(a){return ZD(a,179)};_.gk=function Bbe(a){return $C(y7,lKe,179,a,0,1)};var K9=sfb(SHe,'EcorePackageImpl/17',1250);feb(1251,1,OKe,Cbe);_.fk=function Dbe(a){return ZD(a,481)};_.gk=function Ebe(a){return $C(A7,rve,481,a,0,1)};var L9=sfb(SHe,'EcorePackageImpl/18',1251);feb(1252,1,OKe,Fbe);_.fk=function Gbe(a){return ZD(a,561)};_.gk=function Hbe(a){return $C(C8,LJe,561,a,0,1)};var M9=sfb(SHe,'EcorePackageImpl/19',1252);feb(1235,1,OKe,Ibe);_.fk=function Jbe(a){return ZD(a,331)};_.gk=function Kbe(a){return $C(g7,lKe,35,a,0,1)};var Y9=sfb(SHe,'EcorePackageImpl/2',1235);feb(1253,1,OKe,Lbe);_.fk=function Mbe(a){return ZD(a,248)};_.gk=function Nbe(a){return $C(o7,sKe,89,a,0,1)};var O9=sfb(SHe,'EcorePackageImpl/20',1253);feb(1254,1,OKe,Obe);_.fk=function Pbe(a){return ZD(a,457)};_.gk=function Qbe(a){return $C(z7,rve,850,a,0,1)};var P9=sfb(SHe,'EcorePackageImpl/21',1254);feb(1255,1,OKe,Rbe);_.fk=function Sbe(a){return $D(a)};_.gk=function Tbe(a){return $C(QI,Nve,485,a,8,1)};var Q9=sfb(SHe,'EcorePackageImpl/22',1255);feb(1256,1,OKe,Ube);_.fk=function Vbe(a){return ZD(a,195)};_.gk=function Wbe(a){return $C(gE,Nve,195,a,0,2)};var R9=sfb(SHe,'EcorePackageImpl/23',1256);feb(1257,1,OKe,Xbe);_.fk=function Ybe(a){return ZD(a,222)};_.gk=function Zbe(a){return $C(RI,Nve,222,a,0,1)};var S9=sfb(SHe,'EcorePackageImpl/24',1257);feb(1258,1,OKe,$be);_.fk=function _be(a){return ZD(a,180)};_.gk=function ace(a){return $C(SI,Nve,180,a,0,1)};var T9=sfb(SHe,'EcorePackageImpl/25',1258);feb(1259,1,OKe,bce);_.fk=function cce(a){return ZD(a,206)};_.gk=function dce(a){return $C(qK,Nve,206,a,0,1)};var U9=sfb(SHe,'EcorePackageImpl/26',1259);feb(1260,1,OKe,ece);_.fk=function fce(a){return false};_.gk=function gce(a){return $C(T6,rve,2215,a,0,1)};var V9=sfb(SHe,'EcorePackageImpl/27',1260);feb(1261,1,OKe,hce);_.fk=function ice(a){return _D(a)};_.gk=function jce(a){return $C(VI,Nve,345,a,7,1)};var W9=sfb(SHe,'EcorePackageImpl/28',1261);feb(1262,1,OKe,kce);_.fk=function lce(a){return ZD(a,61)};_.gk=function mce(a){return $C(Y6,Ize,61,a,0,1)};var X9=sfb(SHe,'EcorePackageImpl/29',1262);feb(1236,1,OKe,nce);_.fk=function oce(a){return ZD(a,519)};_.gk=function pce(a){return $C(f7,{3:1,4:1,5:1,2033:1},598,a,0,1)};var hab=sfb(SHe,'EcorePackageImpl/3',1236);feb(1263,1,OKe,qce);_.fk=function rce(a){return ZD(a,582)};_.gk=function sce(a){return $C(Z6,rve,2039,a,0,1)};var Z9=sfb(SHe,'EcorePackageImpl/30',1263);feb(1264,1,OKe,tce);_.fk=function uce(a){return ZD(a,160)};_.gk=function vce(a){return $C(Tbb,Ize,160,a,0,1)};var $9=sfb(SHe,'EcorePackageImpl/31',1264);feb(1265,1,OKe,wce);_.fk=function xce(a){return ZD(a,76)};_.gk=function yce(a){return $C(Jbb,PKe,76,a,0,1)};var _9=sfb(SHe,'EcorePackageImpl/32',1265);feb(1266,1,OKe,zce);_.fk=function Ace(a){return ZD(a,161)};_.gk=function Bce(a){return $C(ZI,Nve,161,a,0,1)};var aab=sfb(SHe,'EcorePackageImpl/33',1266);feb(1267,1,OKe,Cce);_.fk=function Dce(a){return ZD(a,17)};_.gk=function Ece(a){return $C(bJ,Nve,17,a,0,1)};var bab=sfb(SHe,'EcorePackageImpl/34',1267);feb(1268,1,OKe,Fce);_.fk=function Gce(a){return ZD(a,297)};_.gk=function Hce(a){return $C(UI,rve,297,a,0,1)};var cab=sfb(SHe,'EcorePackageImpl/35',1268);feb(1269,1,OKe,Ice);_.fk=function Jce(a){return ZD(a,168)};_.gk=function Kce(a){return $C(eJ,Nve,168,a,0,1)};var dab=sfb(SHe,'EcorePackageImpl/36',1269);feb(1270,1,OKe,Lce);_.fk=function Mce(a){return ZD(a,85)};_.gk=function Nce(a){return $C(VK,rve,85,a,0,1)};var eab=sfb(SHe,'EcorePackageImpl/37',1270);feb(1271,1,OKe,Oce);_.fk=function Pce(a){return ZD(a,599)};_.gk=function Qce(a){return $C(Aab,rve,599,a,0,1)};var fab=sfb(SHe,'EcorePackageImpl/38',1271);feb(1272,1,OKe,Rce);_.fk=function Sce(a){return false};_.gk=function Tce(a){return $C(zab,rve,2216,a,0,1)};var gab=sfb(SHe,'EcorePackageImpl/39',1272);feb(1237,1,OKe,Uce);_.fk=function Vce(a){return ZD(a,90)};_.gk=function Wce(a){return $C(h7,rve,29,a,0,1)};var nab=sfb(SHe,'EcorePackageImpl/4',1237);feb(1273,1,OKe,Xce);_.fk=function Yce(a){return ZD(a,191)};_.gk=function Zce(a){return $C(lJ,Nve,191,a,0,1)};var iab=sfb(SHe,'EcorePackageImpl/40',1273);feb(1274,1,OKe,$ce);_.fk=function _ce(a){return bE(a)};_.gk=function ade(a){return $C(qJ,Nve,2,a,6,1)};var jab=sfb(SHe,'EcorePackageImpl/41',1274);feb(1275,1,OKe,bde);_.fk=function cde(a){return ZD(a,596)};_.gk=function dde(a){return $C(a7,rve,596,a,0,1)};var kab=sfb(SHe,'EcorePackageImpl/42',1275);feb(1276,1,OKe,ede);_.fk=function fde(a){return false};_.gk=function gde(a){return $C($6,Nve,2217,a,0,1)};var lab=sfb(SHe,'EcorePackageImpl/43',1276);feb(1277,1,OKe,hde);_.fk=function ide(a){return ZD(a,44)};_.gk=function jde(a){return $C(UK,Zve,44,a,0,1)};var mab=sfb(SHe,'EcorePackageImpl/44',1277);feb(1238,1,OKe,kde);_.fk=function lde(a){return ZD(a,142)};_.gk=function mde(a){return $C(i7,rve,142,a,0,1)};var oab=sfb(SHe,'EcorePackageImpl/5',1238);feb(1239,1,OKe,nde);_.fk=function ode(a){return ZD(a,156)};_.gk=function pde(a){return $C(k7,rve,156,a,0,1)};var pab=sfb(SHe,'EcorePackageImpl/6',1239);feb(1240,1,OKe,qde);_.fk=function rde(a){return ZD(a,469)};_.gk=function sde(a){return $C(m7,rve,685,a,0,1)};var qab=sfb(SHe,'EcorePackageImpl/7',1240);feb(1241,1,OKe,tde);_.fk=function ude(a){return ZD(a,582)};_.gk=function vde(a){return $C(l7,rve,694,a,0,1)};var rab=sfb(SHe,'EcorePackageImpl/8',1241);feb(1242,1,OKe,wde);_.fk=function xde(a){return ZD(a,480)};_.gk=function yde(a){return $C(n7,rve,480,a,0,1)};var sab=sfb(SHe,'EcorePackageImpl/9',1242);feb(1038,2080,JJe,Cde);_.Mi=function Dde(a,b){zde(this,RD(b,424))};_.Qi=function Ede(a,b){Ade(this,a,RD(b,424))};var vab=sfb(SHe,'MinimalEObjectImpl/1ArrayDelegatingAdapterList',1038);feb(1039,152,GJe,Fde);_.jj=function Gde(){return this.a.a};var uab=sfb(SHe,'MinimalEObjectImpl/1ArrayDelegatingAdapterList/1',1039);feb(1067,1066,{},Ide);var yab=sfb('org.eclipse.emf.ecore.plugin','EcorePlugin',1067);var Aab=ufb(QKe,'Resource');feb(799,1524,RKe);_.Hl=function Mde(a){};_.Il=function Nde(a){};_.El=function Ode(){return !this.a&&(this.a=new Zde(this)),this.a};_.Fl=function Pde(a){var b,c,d,e,f;d=a.length;if(d>0){BFb(0,a.length);if(a.charCodeAt(0)==47){f=new cnb(4);e=1;for(b=1;b<d;++b){BFb(b,a.length);if(a.charCodeAt(b)==47){Rmb(f,e==b?'':(AFb(e,b,a.length),a.substr(e,b-e)));e=b+1}}Rmb(f,(BFb(e,a.length+1),a.substr(e)));return Jde(this,f)}else{BFb(d-1,a.length);if(a.charCodeAt(d-1)==63){c=uhb(a,Fhb(63),d-2);c>0&&(a=(AFb(0,c,a.length),a.substr(0,c)))}}}return Kde(this,a)};_.Gl=function Qde(){return this.c};_.Ib=function Rde(){var a;return nfb(this.Rm)+'@'+(a=tb(this)>>>0,a.toString(16))+" uri='"+this.d+"'"};_.b=false;var Eab=sfb(SKe,'ResourceImpl',799);feb(1525,799,RKe,Sde);var Bab=sfb(SKe,'BinaryResourceImpl',1525);feb(1190,708,QIe);_.bj=function Vde(a){return ZD(a,58)?Tde(this,RD(a,58)):ZD(a,599)?new dMd(RD(a,599).El()):dE(a)===dE(this.f)?RD(a,16).Kc():(jQd(),iQd.a)};_.Ob=function Wde(){return Ude(this)};_.a=false;var Ebb=sfb(ZJe,'EcoreUtil/ContentTreeIterator',1190);feb(1526,1190,QIe,Xde);_.bj=function Yde(a){return dE(a)===dE(this.f)?RD(a,15).Kc():new _je(RD(a,58))};var Cab=sfb(SKe,'ResourceImpl/5',1526);feb(658,2092,nKe,Zde);_.Hc=function $de(a){return this.i<=4?PHd(this,a):ZD(a,54)&&RD(a,54).Jh()==this.a};_.Mi=function _de(a,b){a==this.i-1&&(this.a.b||(this.a.b=true,null))};_.Oi=function aee(a,b){a==0?this.a.b||(this.a.b=true,null):$Gd(this,a,b)};_.Qi=function bee(a,b){};_.Ri=function cee(a,b,c){};_.Lj=function dee(){return 2};_.jj=function eee(){return this.a};_.Mj=function fee(){return true};_.Nj=function gee(a,b){var c;c=RD(a,54);b=c.fi(this.a,b);return b};_.Oj=function hee(a,b){var c;c=RD(a,54);return c.fi(null,b)};_.Pj=function iee(){return false};_.Si=function jee(){return true};_.aj=function kee(a){return $C(r7,rve,58,a,0,1)};_.Yi=function lee(){return false};var Dab=sfb(SKe,'ResourceImpl/ContentsEList',658);feb(970,2062,kwe,mee);_.fd=function nee(a){return this.a.Ki(a)};_.gc=function oee(){return this.a.gc()};var Fab=sfb(ZJe,'AbstractSequentialInternalEList/1',970);var hke,ike,jke,kke;feb(634,1,{},Yee);var pee,qee;var Lab=sfb(ZJe,'BasicExtendedMetaData',634);feb(1181,1,{},afe);_.Jl=function bfe(){return null};_.Kl=function cfe(){this.a==-2&&$ee(this,uee(this.d,this.b));return this.a};_.Ll=function dfe(){return null};_.Ml=function efe(){return yob(),yob(),vob};_.xe=function ffe(){this.c==fLe&&_ee(this,zee(this.d,this.b));return this.c};_.Nl=function gfe(){return 0};_.a=-2;_.c=fLe;var Hab=sfb(ZJe,'BasicExtendedMetaData/EClassExtendedMetaDataImpl',1181);feb(1182,1,{},mfe);_.Jl=function nfe(){this.a==(ree(),pee)&&hfe(this,tee(this.f,this.b));return this.a};_.Kl=function ofe(){return 0};_.Ll=function pfe(){this.c==(ree(),pee)&&ife(this,xee(this.f,this.b));return this.c};_.Ml=function qfe(){!this.d&&jfe(this,yee(this.f,this.b));return this.d};_.xe=function rfe(){this.e==fLe&&kfe(this,zee(this.f,this.b));return this.e};_.Nl=function sfe(){this.g==-2&&lfe(this,Cee(this.f,this.b));return this.g};_.e=fLe;_.g=-2;var Iab=sfb(ZJe,'BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl',1182);feb(1180,1,{},wfe);_.b=false;_.c=false;var Jab=sfb(ZJe,'BasicExtendedMetaData/EPackageExtendedMetaDataImpl',1180);feb(1183,1,{},Jfe);_.c=-2;_.e=fLe;_.f=fLe;var Kab=sfb(ZJe,'BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl',1183);feb(593,632,oKe,Kfe);_.Lj=function Lfe(){return this.c};_.ol=function Mfe(){return false};_.Wi=function Nfe(a,b){return b};_.c=0;var Yab=sfb(ZJe,'EDataTypeEList',593);var Tbb=ufb(ZJe,'FeatureMap');feb(78,593,{3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},Uge);_.bd=function Vge(a,b){Ofe(this,a,RD(b,76))};_.Fc=function Wge(a){return Rfe(this,RD(a,76))};_.Hi=function _ge(a){Wfe(this,RD(a,76))};_.Nj=function khe(a,b){return mge(this,RD(a,76),b)};_.Oj=function lhe(a,b){return oge(this,RD(a,76),b)};_.Ti=function nhe(a,b){return uge(this,a,b)};_.Wi=function phe(a,b){return zge(this,a,RD(b,76))};_.hd=function rhe(a,b){return Cge(this,a,RD(b,76))};_.Uj=function vhe(a,b){return Ige(this,RD(a,76),b)};_.Vj=function whe(a,b){return Kge(this,RD(a,76),b)};_.Wj=function xhe(a,b,c){return Lge(this,RD(a,76),RD(b,76),c)};_.Zi=function zhe(a,b){return Tge(this,a,RD(b,76))};_.Ol=function Xge(a,b){return Qfe(this,a,b)};_.cd=function Yge(a,b){var c,d,e,f,g,h,i,j,k;j=new ZHd(b.gc());for(e=b.Kc();e.Ob();){d=RD(e.Pb(),76);f=d.Lk();if(qke(this.e,f)){(!f.Si()||!cge(this,f,d.md())&&!PHd(j,d))&&WGd(j,d)}else{k=pke(this.e.Dh(),f);c=RD(this.g,124);g=true;for(h=0;h<this.i;++h){i=c[h];if(k.am(i.Lk())){RD(eHd(this,h,d),76);g=false;break}}g&&WGd(j,d)}}return XGd(this,a,j)};_.Gc=function Zge(a){var b,c,d,e,f,g,h,i,j;i=new ZHd(a.gc());for(d=a.Kc();d.Ob();){c=RD(d.Pb(),76);e=c.Lk();if(qke(this.e,e)){(!e.Si()||!cge(this,e,c.md())&&!PHd(i,c))&&WGd(i,c)}else{j=pke(this.e.Dh(),e);b=RD(this.g,124);f=true;for(g=0;g<this.i;++g){h=b[g];if(j.am(h.Lk())){RD(eHd(this,g,c),76);f=false;break}}f&&WGd(i,c)}}return YGd(this,i)};_.Fi=function $ge(a){this.j=-1;return nLd(this,this.i,a)};_.Pl=function ahe(a,b,c){return Xfe(this,a,b,c)};_.Xk=function bhe(a,b){return _fe(this,a,b)};_.Ql=function che(a,b,c){return age(this,a,b,c)};_.Rl=function dhe(){return this};_.Sl=function ehe(a,b){return ige(this,a,b)};_.Tl=function fhe(a){return RD(QHd(this,a),76).Lk()};_.Ul=function ghe(a){return RD(QHd(this,a),76).md()};_.Vl=function hhe(){return this.b};_.Mj=function ihe(){return true};_.Tj=function jhe(){return true};_.Wl=function mhe(a){return !pge(this,a)};_.aj=function ohe(a){return $C(Ibb,PKe,343,a,0,1)};_.pl=function qhe(a){return Age(this,a)};_.Wb=function she(a){Dge(this,a)};_.Xl=function the(a,b){Fge(this,a,b)};_.Yl=function uhe(a){return Gge(this,a)};_.Zl=function yhe(a){Sge(this,a)};var Oab=sfb(ZJe,'BasicFeatureMap',78);feb(1960,1,Jve);_.Nb=function Fhe(a){Ztb(this,a)};_.Rb=function Ehe(b){if(this.g==-1){throw Adb(new cgb)}Ahe(this);try{Pfe(this.e,this.b,this.a,b);this.d=this.e.j;Dhe(this)}catch(a){a=zdb(a);if(ZD(a,77)){throw Adb(new Jrb)}else throw Adb(a)}};_.Ob=function Ghe(){return Bhe(this)};_.Sb=function Hhe(){return Che(this)};_.Pb=function Ihe(){return Dhe(this)};_.Tb=function Jhe(){return this.a};_.Ub=function Khe(){var a;if(Che(this)){Ahe(this);this.g=--this.a;if(this.ul()){a=Bge(this.e,this.b,this.c,this.a,this.j);this.j=a}this.i=0;return this.j}else{throw Adb(new Dvb)}};_.Vb=function Lhe(){return this.a-1};_.Qb=function Mhe(){if(this.g==-1){throw Adb(new cgb)}Ahe(this);try{xge(this.e,this.b,this.g);this.d=this.e.j;if(this.g<this.a){--this.a;--this.c}--this.g}catch(a){a=zdb(a);if(ZD(a,77)){throw Adb(new Jrb)}else throw Adb(a)}};_.ul=function Nhe(){return false};_.Wb=function Ohe(b){if(this.g==-1){throw Adb(new cgb)}Ahe(this);try{Ege(this.e,this.b,this.g,b);this.d=this.e.j}catch(a){a=zdb(a);if(ZD(a,77)){throw Adb(new Jrb)}else throw Adb(a)}};_.a=0;_.c=0;_.d=0;_.f=false;_.g=0;_.i=0;var Lbb=sfb(ZJe,'FeatureMapUtil/BasicFeatureEIterator',1960);feb(420,1960,Jve,Phe);_.$l=function Qhe(){var a,b,c;c=this.e.i;a=RD(this.e.g,124);while(this.c<c){b=a[this.c];if(this.k.am(b.Lk())){this.j=this.f?b:b.md();this.i=2;return true}++this.c}this.i=1;this.g=-1;return false};_._l=function Rhe(){var a,b;a=RD(this.e.g,124);while(--this.c>=0){b=a[this.c];if(this.k.am(b.Lk())){this.j=this.f?b:b.md();this.i=-2;return true}}this.i=-1;this.g=-1;return false};var Mab=sfb(ZJe,'BasicFeatureMap/FeatureEIterator',420);feb(676,420,Jve,She);_.ul=function The(){return true};var Nab=sfb(ZJe,'BasicFeatureMap/ResolvingFeatureEIterator',676);feb(968,496,uKe,Uhe);_.pj=function Vhe(){return this};var Rab=sfb(ZJe,'EContentsEList/1',968);feb(969,496,uKe,Whe);_.ul=function Xhe(){return false};var Sab=sfb(ZJe,'EContentsEList/2',969);feb(967,287,vKe,Yhe);_.wl=function Zhe(a){};_.Ob=function $he(){return false};_.Sb=function _he(){return false};var Tab=sfb(ZJe,'EContentsEList/FeatureIteratorImpl/1',967);feb(840,593,oKe,aie);_.Ni=function bie(){this.a=true};_.Qj=function cie(){return this.a};_.Gk=function die(){var a;sLd(this);if(Mvd(this.e)){a=this.a;this.a=false;qvd(this.e,new Q3d(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var Xab=sfb(ZJe,'EDataTypeEList/Unsettable',840);feb(1958,593,oKe,eie);_.Si=function fie(){return true};var $ab=sfb(ZJe,'EDataTypeUniqueEList',1958);feb(1959,840,oKe,gie);_.Si=function hie(){return true};var Zab=sfb(ZJe,'EDataTypeUniqueEList/Unsettable',1959);feb(147,83,oKe,iie);_.nl=function jie(){return true};_.Wi=function kie(a,b){return gZd(this,a,RD(b,58))};var _ab=sfb(ZJe,'EObjectContainmentEList/Resolving',147);feb(1184,555,oKe,lie);_.nl=function mie(){return true};_.Wi=function nie(a,b){return gZd(this,a,RD(b,58))};var abb=sfb(ZJe,'EObjectContainmentEList/Unsettable/Resolving',1184);feb(766,14,oKe,oie);_.Ni=function pie(){this.a=true};_.Qj=function qie(){return this.a};_.Gk=function rie(){var a;sLd(this);if(Mvd(this.e)){a=this.a;this.a=false;qvd(this.e,new Q3d(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var fbb=sfb(ZJe,'EObjectContainmentWithInverseEList/Unsettable',766);feb(1222,766,oKe,sie);_.nl=function tie(){return true};_.Wi=function uie(a,b){return gZd(this,a,RD(b,58))};var ebb=sfb(ZJe,'EObjectContainmentWithInverseEList/Unsettable/Resolving',1222);feb(757,505,oKe,vie);_.Ni=function wie(){this.a=true};_.Qj=function xie(){return this.a};_.Gk=function yie(){var a;sLd(this);if(Mvd(this.e)){a=this.a;this.a=false;qvd(this.e,new Q3d(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var hbb=sfb(ZJe,'EObjectEList/Unsettable',757);feb(338,505,oKe,zie);_.nl=function Aie(){return true};_.Wi=function Bie(a,b){return gZd(this,a,RD(b,58))};var kbb=sfb(ZJe,'EObjectResolvingEList',338);feb(1844,757,oKe,Cie);_.nl=function Die(){return true};_.Wi=function Eie(a,b){return gZd(this,a,RD(b,58))};var jbb=sfb(ZJe,'EObjectResolvingEList/Unsettable',1844);feb(1527,1,{},Hie);var Fie;var lbb=sfb(ZJe,'EObjectValidator',1527);feb(559,505,oKe,Iie);_.il=function Jie(){return this.d};_.jl=function Kie(){return this.b};_.Mj=function Lie(){return true};_.ml=function Mie(){return true};_.b=0;var pbb=sfb(ZJe,'EObjectWithInverseEList',559);feb(1225,559,oKe,Nie);_.ll=function Oie(){return true};var mbb=sfb(ZJe,'EObjectWithInverseEList/ManyInverse',1225);feb(635,559,oKe,Pie);_.Ni=function Qie(){this.a=true};_.Qj=function Rie(){return this.a};_.Gk=function Sie(){var a;sLd(this);if(Mvd(this.e)){a=this.a;this.a=false;qvd(this.e,new Q3d(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var obb=sfb(ZJe,'EObjectWithInverseEList/Unsettable',635);feb(1224,635,oKe,Tie);_.ll=function Uie(){return true};var nbb=sfb(ZJe,'EObjectWithInverseEList/Unsettable/ManyInverse',1224);feb(767,559,oKe,Vie);_.nl=function Wie(){return true};_.Wi=function Xie(a,b){return gZd(this,a,RD(b,58))};var tbb=sfb(ZJe,'EObjectWithInverseResolvingEList',767);feb(32,767,oKe,Yie);_.ll=function Zie(){return true};var qbb=sfb(ZJe,'EObjectWithInverseResolvingEList/ManyInverse',32);feb(768,635,oKe,$ie);_.nl=function _ie(){return true};_.Wi=function aje(a,b){return gZd(this,a,RD(b,58))};var sbb=sfb(ZJe,'EObjectWithInverseResolvingEList/Unsettable',768);feb(1223,768,oKe,bje);_.ll=function cje(){return true};var rbb=sfb(ZJe,'EObjectWithInverseResolvingEList/Unsettable/ManyInverse',1223);feb(1185,632,oKe);_.Li=function dje(){return (this.b&1792)==0};_.Ni=function eje(){this.b|=1};_.kl=function fje(){return (this.b&4)!=0};_.Mj=function gje(){return (this.b&40)!=0};_.ll=function hje(){return (this.b&16)!=0};_.ml=function ije(){return (this.b&8)!=0};_.nl=function jje(){return (this.b&cKe)!=0};_.al=function kje(){return (this.b&32)!=0};_.ol=function lje(){return (this.b&gwe)!=0};_.fk=function mje(a){return !this.d?this.Lk().Hk().fk(a):QRd(this.d,a)};_.Qj=function nje(){return (this.b&2)!=0?(this.b&1)!=0:this.i!=0};_.Si=function oje(){return (this.b&128)!=0};_.Gk=function qje(){var a;sLd(this);if((this.b&2)!=0){if(Mvd(this.e)){a=(this.b&1)!=0;this.b&=-2;eZd(this,new Q3d(this.e,2,BYd(this.e.Dh(),this.Lk()),a,false))}else{this.b&=-2}}};_.Yi=function rje(){return (this.b&1536)==0};_.b=0;var vbb=sfb(ZJe,'EcoreEList/Generic',1185);feb(1186,1185,oKe,sje);_.Lk=function tje(){return this.a};var ubb=sfb(ZJe,'EcoreEList/Dynamic',1186);feb(765,66,PIe,uje);_.aj=function vje(a){return IMd(this.a.a,a)};var zbb=sfb(ZJe,'EcoreEMap/1',765);feb(764,83,oKe,wje);_.Mi=function xje(a,b){UNd(this.b,RD(b,136))};_.Oi=function yje(a,b){TNd(this.b)};_.Pi=function zje(a,b,c){var d;++(d=this.b,RD(b,136),d).e};_.Qi=function Aje(a,b){VNd(this.b,RD(b,136))};_.Ri=function Bje(a,b,c){VNd(this.b,RD(c,136));dE(c)===dE(b)&&RD(c,136).Ci(aOd(RD(b,136).ld()));UNd(this.b,RD(b,136))};var Abb=sfb(ZJe,'EcoreEMap/DelegateEObjectContainmentEList',764);feb(1220,141,_Je,Cje);var Cbb=sfb(ZJe,'EcoreEMap/Unsettable',1220);feb(1221,764,oKe,Dje);_.Ni=function Eje(){this.a=true};_.Qj=function Fje(){return this.a};_.Gk=function Gje(){var a;sLd(this);if(Mvd(this.e)){a=this.a;this.a=false;qvd(this.e,new Q3d(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var Bbb=sfb(ZJe,'EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList',1221);feb(1189,215,Hxe,Zje);_.a=false;_.b=false;var Fbb=sfb(ZJe,'EcoreUtil/Copier',1189);feb(759,1,Ave,_je);_.Nb=function ake(a){Ztb(this,a)};_.Ob=function bke(){return $je(this)};_.Pb=function cke(){var a;$je(this);a=this.b;this.b=null;return a};_.Qb=function dke(){this.a.Qb()};var Gbb=sfb(ZJe,'EcoreUtil/ProperContentIterator',759);feb(1528,1527,{},gke);var eke;var Hbb=sfb(ZJe,'EcoreValidator',1528);var mke;var Sbb=ufb(ZJe,'FeatureMapUtil/Validator');feb(1295,1,{2041:1},rke);_.am=function ske(a){return true};var Kbb=sfb(ZJe,'FeatureMapUtil/1',1295);feb(773,1,{2041:1},wke);_.am=function xke(a){var b;if(this.c==a)return true;b=TD(Wjb(this.a,a));if(b==null){if(vke(this,a)){yke(this.a,a,(Geb(),Feb));return true}else{yke(this.a,a,(Geb(),Eeb));return false}}else{return b==(Geb(),Feb)}};_.e=false;var tke;var Nbb=sfb(ZJe,'FeatureMapUtil/BasicValidator',773);feb(774,45,Hxe,zke);var Mbb=sfb(ZJe,'FeatureMapUtil/BasicValidator/Cache',774);feb(509,56,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,71:1,97:1},Eke);_.bd=function Fke(a,b){Pfe(this.c,this.b,a,b)};_.Fc=function Gke(a){return Qfe(this.c,this.b,a)};_.cd=function Hke(a,b){return Sfe(this.c,this.b,a,b)};_.Gc=function Ike(a){return Ake(this,a)};_.Gi=function Jke(a,b){Ufe(this.c,this.b,a,b)};_.Wk=function Kke(a,b){return Xfe(this.c,this.b,a,b)};_.$i=function Lke(a){return hge(this.c,this.b,a,false)};_.Ii=function Mke(){return Yfe(this.c,this.b)};_.Ji=function Nke(){return Zfe(this.c,this.b)};_.Ki=function Oke(a){return $fe(this.c,this.b,a)};_.Xk=function Pke(a,b){return Bke(this,a,b)};_.$b=function Qke(){Cke(this)};_.Hc=function Rke(a){return cge(this.c,this.b,a)};_.Ic=function Ske(a){return ege(this.c,this.b,a)};_.Xb=function Tke(a){return hge(this.c,this.b,a,true)};_.Fk=function Uke(a){return this};_.dd=function Vke(a){return jge(this.c,this.b,a)};_.dc=function Wke(){return Dke(this)};_.Qj=function Xke(){return !pge(this.c,this.b)};_.Kc=function Yke(){return qge(this.c,this.b)};_.ed=function Zke(){return sge(this.c,this.b)};_.fd=function $ke(a){return tge(this.c,this.b,a)};_.Ti=function _ke(a,b){return vge(this.c,this.b,a,b)};_.Ui=function ale(a,b){wge(this.c,this.b,a,b)};_.gd=function ble(a){return xge(this.c,this.b,a)};_.Mc=function cle(a){return yge(this.c,this.b,a)};_.hd=function dle(a,b){return Ege(this.c,this.b,a,b)};_.Wb=function ele(a){bge(this.c,this.b);Ake(this,RD(a,15))};_.gc=function fle(){return Nge(this.c,this.b)};_.Pc=function gle(){return Oge(this.c,this.b)};_.Qc=function hle(a){return Qge(this.c,this.b,a)};_.Ib=function ile(){var a,b;b=new Qhb;b.a+='[';for(a=Yfe(this.c,this.b);Bhe(a);){Nhb(b,Ghb(Dhe(a)));Bhe(a)&&(b.a+=pve,b)}b.a+=']';return b.a};_.Gk=function jle(){bge(this.c,this.b)};var Obb=sfb(ZJe,'FeatureMapUtil/FeatureEList',509);feb(644,39,GJe,lle);_.hj=function mle(a){return kle(this,a)};_.mj=function nle(a){var b,c,d,e,f,g,h;switch(this.d){case 1:case 2:{f=a.jj();if(dE(f)===dE(this.c)&&kle(this,null)==a.hj(null)){this.g=a.ij();a.gj()==1&&(this.d=1);return true}break}case 3:{e=a.gj();switch(e){case 3:{f=a.jj();if(dE(f)===dE(this.c)&&kle(this,null)==a.hj(null)){this.d=5;b=new ZHd(2);WGd(b,this.g);WGd(b,a.ij());this.g=b;return true}break}}break}case 5:{e=a.gj();switch(e){case 3:{f=a.jj();if(dE(f)===dE(this.c)&&kle(this,null)==a.hj(null)){c=RD(this.g,16);c.Fc(a.ij());return true}break}}break}case 4:{e=a.gj();switch(e){case 3:{f=a.jj();if(dE(f)===dE(this.c)&&kle(this,null)==a.hj(null)){this.d=1;this.g=a.ij();return true}break}case 4:{f=a.jj();if(dE(f)===dE(this.c)&&kle(this,null)==a.hj(null)){this.d=6;h=new ZHd(2);WGd(h,this.n);WGd(h,a.kj());this.n=h;g=cD(WC(kE,1),Pwe,28,15,[this.o,a.lj()]);this.g=g;return true}break}}break}case 6:{e=a.gj();switch(e){case 4:{f=a.jj();if(dE(f)===dE(this.c)&&kle(this,null)==a.hj(null)){c=RD(this.n,16);c.Fc(a.kj());g=RD(this.g,53);d=$C(kE,Pwe,28,g.length+1,15,1);hib(g,0,d,0,g.length);d[g.length]=a.lj();this.g=d;return true}break}}break}}return false};var Pbb=sfb(ZJe,'FeatureMapUtil/FeatureENotificationImpl',644);feb(564,509,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},ole);_.Ol=function ple(a,b){return Qfe(this.c,a,b)};_.Pl=function qle(a,b,c){return Xfe(this.c,a,b,c)};_.Ql=function rle(a,b,c){return age(this.c,a,b,c)};_.Rl=function sle(){return this};_.Sl=function tle(a,b){return ige(this.c,a,b)};_.Tl=function ule(a){return RD(hge(this.c,this.b,a,false),76).Lk()};_.Ul=function vle(a){return RD(hge(this.c,this.b,a,false),76).md()};_.Vl=function wle(){return this.a};_.Wl=function xle(a){return !pge(this.c,a)};_.Xl=function yle(a,b){Fge(this.c,a,b)};_.Yl=function zle(a){return Gge(this.c,a)};_.Zl=function Ale(a){Sge(this.c,a)};var Qbb=sfb(ZJe,'FeatureMapUtil/FeatureFeatureMap',564);feb(1294,1,$Je,Ble);_.Fk=function Cle(a){return hge(this.b,this.a,-1,a)};_.Qj=function Dle(){return !pge(this.b,this.a)};_.Wb=function Ele(a){Fge(this.b,this.a,a)};_.Gk=function Fle(){bge(this.b,this.a)};var Rbb=sfb(ZJe,'FeatureMapUtil/FeatureValue',1294);var Gle,Hle,Ile,Jle,Kle;var Vbb=ufb(hLe,'AnyType');feb(680,63,swe,Mle);var Wbb=sfb(hLe,'InvalidDatatypeValueException',680);var Xbb=ufb(hLe,iLe);var Ybb=ufb(hLe,jLe);var Zbb=ufb(hLe,kLe);var Nle;var Ple;var Rle,Sle,Tle,Ule,Vle,Wle,Xle,Yle,Zle,$le,_le,ame,bme,cme,dme,eme,fme,gme,hme,ime,jme,kme,lme,mme;feb(844,516,{110:1,94:1,93:1,58:1,54:1,99:1,857:1},ome);_.Lh=function pme(a,b,c){switch(a){case 0:if(c)return !this.c&&(this.c=new Uge(this,0)),this.c;return !this.c&&(this.c=new Uge(this,0)),this.c.b;case 1:if(c)return !this.c&&(this.c=new Uge(this,0)),RD(rge(this.c,(nme(),Sle)),160);return (!this.c&&(this.c=new Uge(this,0)),RD(RD(rge(this.c,(nme(),Sle)),160),220)).Vl();case 2:if(c)return !this.b&&(this.b=new Uge(this,2)),this.b;return !this.b&&(this.b=new Uge(this,2)),this.b.b;}return zvd(this,a-AYd(this.ii()),vYd((this.j&2)==0?this.ii():(!this.k&&(this.k=new fUd),this.k).Nk(),a),b,c)};_.Uh=function qme(a,b,c){var d;switch(b){case 0:return !this.c&&(this.c=new Uge(this,0)),_fe(this.c,a,c);case 1:return (!this.c&&(this.c=new Uge(this,0)),RD(RD(rge(this.c,(nme(),Sle)),160),71)).Xk(a,c);case 2:return !this.b&&(this.b=new Uge(this,2)),_fe(this.b,a,c);}return d=RD(vYd((this.j&2)==0?this.ii():(!this.k&&(this.k=new fUd),this.k).Nk(),b),69),d.wk().Ak(this,Yvd(this),b-AYd(this.ii()),a,c)};_.Wh=function rme(a){switch(a){case 0:return !!this.c&&this.c.i!=0;case 1:return !(!this.c&&(this.c=new Uge(this,0)),RD(rge(this.c,(nme(),Sle)),160)).dc();case 2:return !!this.b&&this.b.i!=0;}return Avd(this,a-AYd(this.ii()),vYd((this.j&2)==0?this.ii():(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.bi=function sme(a,b){switch(a){case 0:!this.c&&(this.c=new Uge(this,0));Dge(this.c,b);return;case 1:(!this.c&&(this.c=new Uge(this,0)),RD(RD(rge(this.c,(nme(),Sle)),160),220)).Wb(b);return;case 2:!this.b&&(this.b=new Uge(this,2));Dge(this.b,b);return;}Bvd(this,a-AYd(this.ii()),vYd((this.j&2)==0?this.ii():(!this.k&&(this.k=new fUd),this.k).Nk(),a),b)};_.ii=function tme(){return nme(),Rle};_.ki=function ume(a){switch(a){case 0:!this.c&&(this.c=new Uge(this,0));sLd(this.c);return;case 1:(!this.c&&(this.c=new Uge(this,0)),RD(rge(this.c,(nme(),Sle)),160)).$b();return;case 2:!this.b&&(this.b=new Uge(this,2));sLd(this.b);return;}Cvd(this,a-AYd(this.ii()),vYd((this.j&2)==0?this.ii():(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.Ib=function vme(){var a;if((this.j&4)!=0)return awd(this);a=new Shb(awd(this));a.a+=' (mixed: ';Mhb(a,this.c);a.a+=', anyAttribute: ';Mhb(a,this.b);a.a+=')';return a.a};var $bb=sfb(lLe,'AnyTypeImpl',844);feb(681,516,{110:1,94:1,93:1,58:1,54:1,99:1,2119:1,681:1},yme);_.Lh=function zme(a,b,c){switch(a){case 0:return this.a;case 1:return this.b;}return zvd(this,a-AYd((nme(),cme)),vYd((this.j&2)==0?cme:(!this.k&&(this.k=new fUd),this.k).Nk(),a),b,c)};_.Wh=function Ame(a){switch(a){case 0:return this.a!=null;case 1:return this.b!=null;}return Avd(this,a-AYd((nme(),cme)),vYd((this.j&2)==0?cme:(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.bi=function Bme(a,b){switch(a){case 0:wme(this,WD(b));return;case 1:xme(this,WD(b));return;}Bvd(this,a-AYd((nme(),cme)),vYd((this.j&2)==0?cme:(!this.k&&(this.k=new fUd),this.k).Nk(),a),b)};_.ii=function Cme(){return nme(),cme};_.ki=function Dme(a){switch(a){case 0:this.a=null;return;case 1:this.b=null;return;}Cvd(this,a-AYd((nme(),cme)),vYd((this.j&2)==0?cme:(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.Ib=function Eme(){var a;if((this.j&4)!=0)return awd(this);a=new Shb(awd(this));a.a+=' (data: ';Nhb(a,this.a);a.a+=', target: ';Nhb(a,this.b);a.a+=')';return a.a};_.a=null;_.b=null;var _bb=sfb(lLe,'ProcessingInstructionImpl',681);feb(682,844,{110:1,94:1,93:1,58:1,54:1,99:1,857:1,2120:1,682:1},Hme);_.Lh=function Ime(a,b,c){switch(a){case 0:if(c)return !this.c&&(this.c=new Uge(this,0)),this.c;return !this.c&&(this.c=new Uge(this,0)),this.c.b;case 1:if(c)return !this.c&&(this.c=new Uge(this,0)),RD(rge(this.c,(nme(),Sle)),160);return (!this.c&&(this.c=new Uge(this,0)),RD(RD(rge(this.c,(nme(),Sle)),160),220)).Vl();case 2:if(c)return !this.b&&(this.b=new Uge(this,2)),this.b;return !this.b&&(this.b=new Uge(this,2)),this.b.b;case 3:return !this.c&&(this.c=new Uge(this,0)),WD(ige(this.c,(nme(),fme),true));case 4:return Ije(this.a,(!this.c&&(this.c=new Uge(this,0)),WD(ige(this.c,(nme(),fme),true))));case 5:return this.a;}return zvd(this,a-AYd((nme(),eme)),vYd((this.j&2)==0?eme:(!this.k&&(this.k=new fUd),this.k).Nk(),a),b,c)};_.Wh=function Jme(a){switch(a){case 0:return !!this.c&&this.c.i!=0;case 1:return !(!this.c&&(this.c=new Uge(this,0)),RD(rge(this.c,(nme(),Sle)),160)).dc();case 2:return !!this.b&&this.b.i!=0;case 3:return !this.c&&(this.c=new Uge(this,0)),WD(ige(this.c,(nme(),fme),true))!=null;case 4:return Ije(this.a,(!this.c&&(this.c=new Uge(this,0)),WD(ige(this.c,(nme(),fme),true))))!=null;case 5:return !!this.a;}return Avd(this,a-AYd((nme(),eme)),vYd((this.j&2)==0?eme:(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.bi=function Kme(a,b){switch(a){case 0:!this.c&&(this.c=new Uge(this,0));Dge(this.c,b);return;case 1:(!this.c&&(this.c=new Uge(this,0)),RD(RD(rge(this.c,(nme(),Sle)),160),220)).Wb(b);return;case 2:!this.b&&(this.b=new Uge(this,2));Dge(this.b,b);return;case 3:Gme(this,WD(b));return;case 4:Gme(this,Hje(this.a,b));return;case 5:Fme(this,RD(b,156));return;}Bvd(this,a-AYd((nme(),eme)),vYd((this.j&2)==0?eme:(!this.k&&(this.k=new fUd),this.k).Nk(),a),b)};_.ii=function Lme(){return nme(),eme};_.ki=function Mme(a){switch(a){case 0:!this.c&&(this.c=new Uge(this,0));sLd(this.c);return;case 1:(!this.c&&(this.c=new Uge(this,0)),RD(rge(this.c,(nme(),Sle)),160)).$b();return;case 2:!this.b&&(this.b=new Uge(this,2));sLd(this.b);return;case 3:!this.c&&(this.c=new Uge(this,0));Fge(this.c,(nme(),fme),null);return;case 4:Gme(this,Hje(this.a,null));return;case 5:this.a=null;return;}Cvd(this,a-AYd((nme(),eme)),vYd((this.j&2)==0?eme:(!this.k&&(this.k=new fUd),this.k).Nk(),a))};var acb=sfb(lLe,'SimpleAnyTypeImpl',682);feb(683,516,{110:1,94:1,93:1,58:1,54:1,99:1,2121:1,683:1},Nme);_.Lh=function Ome(a,b,c){switch(a){case 0:if(c)return !this.a&&(this.a=new Uge(this,0)),this.a;return !this.a&&(this.a=new Uge(this,0)),this.a.b;case 1:return c?(!this.b&&(this.b=new DVd((JTd(),FTd),C8,this,1)),this.b):(!this.b&&(this.b=new DVd((JTd(),FTd),C8,this,1)),dOd(this.b));case 2:return c?(!this.c&&(this.c=new DVd((JTd(),FTd),C8,this,2)),this.c):(!this.c&&(this.c=new DVd((JTd(),FTd),C8,this,2)),dOd(this.c));case 3:return !this.a&&(this.a=new Uge(this,0)),rge(this.a,(nme(),ime));case 4:return !this.a&&(this.a=new Uge(this,0)),rge(this.a,(nme(),jme));case 5:return !this.a&&(this.a=new Uge(this,0)),rge(this.a,(nme(),lme));case 6:return !this.a&&(this.a=new Uge(this,0)),rge(this.a,(nme(),mme));}return zvd(this,a-AYd((nme(),hme)),vYd((this.j&2)==0?hme:(!this.k&&(this.k=new fUd),this.k).Nk(),a),b,c)};_.Uh=function Pme(a,b,c){var d;switch(b){case 0:return !this.a&&(this.a=new Uge(this,0)),_fe(this.a,a,c);case 1:return !this.b&&(this.b=new DVd((JTd(),FTd),C8,this,1)),BVd(this.b,a,c);case 2:return !this.c&&(this.c=new DVd((JTd(),FTd),C8,this,2)),BVd(this.c,a,c);case 5:return !this.a&&(this.a=new Uge(this,0)),Bke(rge(this.a,(nme(),lme)),a,c);}return d=RD(vYd((this.j&2)==0?(nme(),hme):(!this.k&&(this.k=new fUd),this.k).Nk(),b),69),d.wk().Ak(this,Yvd(this),b-AYd((nme(),hme)),a,c)};_.Wh=function Qme(a){switch(a){case 0:return !!this.a&&this.a.i!=0;case 1:return !!this.b&&this.b.f!=0;case 2:return !!this.c&&this.c.f!=0;case 3:return !this.a&&(this.a=new Uge(this,0)),!Dke(rge(this.a,(nme(),ime)));case 4:return !this.a&&(this.a=new Uge(this,0)),!Dke(rge(this.a,(nme(),jme)));case 5:return !this.a&&(this.a=new Uge(this,0)),!Dke(rge(this.a,(nme(),lme)));case 6:return !this.a&&(this.a=new Uge(this,0)),!Dke(rge(this.a,(nme(),mme)));}return Avd(this,a-AYd((nme(),hme)),vYd((this.j&2)==0?hme:(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.bi=function Rme(a,b){switch(a){case 0:!this.a&&(this.a=new Uge(this,0));Dge(this.a,b);return;case 1:!this.b&&(this.b=new DVd((JTd(),FTd),C8,this,1));CVd(this.b,b);return;case 2:!this.c&&(this.c=new DVd((JTd(),FTd),C8,this,2));CVd(this.c,b);return;case 3:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),ime)));!this.a&&(this.a=new Uge(this,0));Ake(rge(this.a,ime),RD(b,16));return;case 4:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),jme)));!this.a&&(this.a=new Uge(this,0));Ake(rge(this.a,jme),RD(b,16));return;case 5:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),lme)));!this.a&&(this.a=new Uge(this,0));Ake(rge(this.a,lme),RD(b,16));return;case 6:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),mme)));!this.a&&(this.a=new Uge(this,0));Ake(rge(this.a,mme),RD(b,16));return;}Bvd(this,a-AYd((nme(),hme)),vYd((this.j&2)==0?hme:(!this.k&&(this.k=new fUd),this.k).Nk(),a),b)};_.ii=function Sme(){return nme(),hme};_.ki=function Tme(a){switch(a){case 0:!this.a&&(this.a=new Uge(this,0));sLd(this.a);return;case 1:!this.b&&(this.b=new DVd((JTd(),FTd),C8,this,1));this.b.c.$b();return;case 2:!this.c&&(this.c=new DVd((JTd(),FTd),C8,this,2));this.c.c.$b();return;case 3:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),ime)));return;case 4:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),jme)));return;case 5:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),lme)));return;case 6:!this.a&&(this.a=new Uge(this,0));Cke(rge(this.a,(nme(),mme)));return;}Cvd(this,a-AYd((nme(),hme)),vYd((this.j&2)==0?hme:(!this.k&&(this.k=new fUd),this.k).Nk(),a))};_.Ib=function Ume(){var a;if((this.j&4)!=0)return awd(this);a=new Shb(awd(this));a.a+=' (mixed: ';Mhb(a,this.a);a.a+=')';return a.a};var bcb=sfb(lLe,'XMLTypeDocumentRootImpl',683);feb(2028,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1,2122:1},rne);_.ri=function sne(a,b){switch(a.hk()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return b==null?null:jeb(b);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return WD(b);case 6:return _me(RD(b,195));case 12:case 47:case 49:case 11:return tAd(this,a,b);case 13:return b==null?null:yib(RD(b,247));case 15:case 14:return b==null?null:ane(Kfb(UD(b)));case 17:return bne((nme(),b));case 18:return bne(b);case 21:case 20:return b==null?null:cne(RD(b,161).a);case 27:return dne(RD(b,195));case 30:return ene((nme(),RD(b,15)));case 31:return ene(RD(b,15));case 40:return hne((nme(),b));case 42:return fne((nme(),b));case 43:return fne(b);case 59:case 48:return gne((nme(),b));default:throw Adb(new agb(VHe+a.xe()+WHe));}};_.si=function tne(a){var b,c,d,e,f;switch(a.G==-1&&(a.G=(c=BXd(a),c?fZd(c.vi(),a):-1)),a.G){case 0:return b=new ome,b;case 1:return d=new yme,d;case 2:return e=new Hme,e;case 3:return f=new Nme,f;default:throw Adb(new agb(ZHe+a.zb+WHe));}};_.ti=function une(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;switch(a.hk()){case 5:case 52:case 4:return b;case 6:return ine(b);case 8:case 7:return b==null?null:$me(b);case 9:return b==null?null:$eb(Oeb((d=nue(b,true),d.length>0&&(BFb(0,d.length),d.charCodeAt(0)==43)?(BFb(1,d.length+1),d.substr(1)):d),-128,127)<<24>>24);case 10:return b==null?null:$eb(Oeb((e=nue(b,true),e.length>0&&(BFb(0,e.length),e.charCodeAt(0)==43)?(BFb(1,e.length+1),e.substr(1)):e),-128,127)<<24>>24);case 11:return WD(uAd(this,(nme(),Vle),b));case 12:return WD(uAd(this,(nme(),Wle),b));case 13:return b==null?null:new Bib(nue(b,true));case 15:case 14:return jne(b);case 16:return WD(uAd(this,(nme(),Xle),b));case 17:return kne((nme(),b));case 18:return kne(b);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return nue(b,true);case 21:case 20:return lne(b);case 22:return WD(uAd(this,(nme(),Yle),b));case 23:return WD(uAd(this,(nme(),Zle),b));case 24:return WD(uAd(this,(nme(),$le),b));case 25:return WD(uAd(this,(nme(),_le),b));case 26:return WD(uAd(this,(nme(),ame),b));case 27:return mne(b);case 30:return nne((nme(),b));case 31:return nne(b);case 32:return b==null?null:sgb(Oeb((k=nue(b,true),k.length>0&&(BFb(0,k.length),k.charCodeAt(0)==43)?(BFb(1,k.length+1),k.substr(1)):k),qwe,lve));case 33:return b==null?null:new ejb((l=nue(b,true),l.length>0&&(BFb(0,l.length),l.charCodeAt(0)==43)?(BFb(1,l.length+1),l.substr(1)):l));case 34:return b==null?null:sgb(Oeb((m=nue(b,true),m.length>0&&(BFb(0,m.length),m.charCodeAt(0)==43)?(BFb(1,m.length+1),m.substr(1)):m),qwe,lve));case 36:return b==null?null:Hgb(Peb((n=nue(b,true),n.length>0&&(BFb(0,n.length),n.charCodeAt(0)==43)?(BFb(1,n.length+1),n.substr(1)):n)));case 37:return b==null?null:Hgb(Peb((o=nue(b,true),o.length>0&&(BFb(0,o.length),o.charCodeAt(0)==43)?(BFb(1,o.length+1),o.substr(1)):o)));case 40:return qne((nme(),b));case 42:return one((nme(),b));case 43:return one(b);case 44:return b==null?null:new ejb((p=nue(b,true),p.length>0&&(BFb(0,p.length),p.charCodeAt(0)==43)?(BFb(1,p.length+1),p.substr(1)):p));case 45:return b==null?null:new ejb((q=nue(b,true),q.length>0&&(BFb(0,q.length),q.charCodeAt(0)==43)?(BFb(1,q.length+1),q.substr(1)):q));case 46:return nue(b,false);case 47:return WD(uAd(this,(nme(),bme),b));case 59:case 48:return pne((nme(),b));case 49:return WD(uAd(this,(nme(),dme),b));case 50:return b==null?null:bhb(Oeb((r=nue(b,true),r.length>0&&(BFb(0,r.length),r.charCodeAt(0)==43)?(BFb(1,r.length+1),r.substr(1)):r),BKe,32767)<<16>>16);case 51:return b==null?null:bhb(Oeb((f=nue(b,true),f.length>0&&(BFb(0,f.length),f.charCodeAt(0)==43)?(BFb(1,f.length+1),f.substr(1)):f),BKe,32767)<<16>>16);case 53:return WD(uAd(this,(nme(),gme),b));case 55:return b==null?null:bhb(Oeb((g=nue(b,true),g.length>0&&(BFb(0,g.length),g.charCodeAt(0)==43)?(BFb(1,g.length+1),g.substr(1)):g),BKe,32767)<<16>>16);case 56:return b==null?null:bhb(Oeb((h=nue(b,true),h.length>0&&(BFb(0,h.length),h.charCodeAt(0)==43)?(BFb(1,h.length+1),h.substr(1)):h),BKe,32767)<<16>>16);case 57:return b==null?null:Hgb(Peb((i=nue(b,true),i.length>0&&(BFb(0,i.length),i.charCodeAt(0)==43)?(BFb(1,i.length+1),i.substr(1)):i)));case 58:return b==null?null:Hgb(Peb((j=nue(b,true),j.length>0&&(BFb(0,j.length),j.charCodeAt(0)==43)?(BFb(1,j.length+1),j.substr(1)):j)));case 60:return b==null?null:sgb(Oeb((c=nue(b,true),c.length>0&&(BFb(0,c.length),c.charCodeAt(0)==43)?(BFb(1,c.length+1),c.substr(1)):c),qwe,lve));case 61:return b==null?null:sgb(Oeb(nue(b,true),qwe,lve));default:throw Adb(new agb(VHe+a.xe()+WHe));}};var Vme,Wme,Xme,Yme;var ccb=sfb(lLe,'XMLTypeFactoryImpl',2028);feb(594,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1,2044:1,594:1},Bne);_.N=false;_.O=false;var wne=false;var bdb=sfb(lLe,'XMLTypePackageImpl',594);feb(1961,1,{851:1},Ene);_.Kk=function Fne(){return rue(),que};var ncb=sfb(lLe,'XMLTypePackageImpl/1',1961);feb(1970,1,OKe,Gne);_.fk=function Hne(a){return bE(a)};_.gk=function Ine(a){return $C(qJ,Nve,2,a,6,1)};var dcb=sfb(lLe,'XMLTypePackageImpl/10',1970);feb(1971,1,OKe,Jne);_.fk=function Kne(a){return bE(a)};_.gk=function Lne(a){return $C(qJ,Nve,2,a,6,1)};var ecb=sfb(lLe,'XMLTypePackageImpl/11',1971);feb(1972,1,OKe,Mne);_.fk=function Nne(a){return bE(a)};_.gk=function One(a){return $C(qJ,Nve,2,a,6,1)};var fcb=sfb(lLe,'XMLTypePackageImpl/12',1972);feb(1973,1,OKe,Pne);_.fk=function Qne(a){return _D(a)};_.gk=function Rne(a){return $C(VI,Nve,345,a,7,1)};var gcb=sfb(lLe,'XMLTypePackageImpl/13',1973);feb(1974,1,OKe,Sne);_.fk=function Tne(a){return bE(a)};_.gk=function Une(a){return $C(qJ,Nve,2,a,6,1)};var hcb=sfb(lLe,'XMLTypePackageImpl/14',1974);feb(1975,1,OKe,Vne);_.fk=function Wne(a){return ZD(a,15)};_.gk=function Xne(a){return $C(QK,Ize,15,a,0,1)};var icb=sfb(lLe,'XMLTypePackageImpl/15',1975);feb(1976,1,OKe,Yne);_.fk=function Zne(a){return ZD(a,15)};_.gk=function $ne(a){return $C(QK,Ize,15,a,0,1)};var jcb=sfb(lLe,'XMLTypePackageImpl/16',1976);feb(1977,1,OKe,_ne);_.fk=function aoe(a){return bE(a)};_.gk=function boe(a){return $C(qJ,Nve,2,a,6,1)};var kcb=sfb(lLe,'XMLTypePackageImpl/17',1977);feb(1978,1,OKe,coe);_.fk=function doe(a){return ZD(a,161)};_.gk=function eoe(a){return $C(ZI,Nve,161,a,0,1)};var lcb=sfb(lLe,'XMLTypePackageImpl/18',1978);feb(1979,1,OKe,foe);_.fk=function goe(a){return bE(a)};_.gk=function hoe(a){return $C(qJ,Nve,2,a,6,1)};var mcb=sfb(lLe,'XMLTypePackageImpl/19',1979);feb(1962,1,OKe,ioe);_.fk=function joe(a){return ZD(a,857)};_.gk=function koe(a){return $C(Vbb,rve,857,a,0,1)};var ycb=sfb(lLe,'XMLTypePackageImpl/2',1962);feb(1980,1,OKe,loe);_.fk=function moe(a){return bE(a)};_.gk=function noe(a){return $C(qJ,Nve,2,a,6,1)};var ocb=sfb(lLe,'XMLTypePackageImpl/20',1980);feb(1981,1,OKe,ooe);_.fk=function poe(a){return bE(a)};_.gk=function qoe(a){return $C(qJ,Nve,2,a,6,1)};var pcb=sfb(lLe,'XMLTypePackageImpl/21',1981);feb(1982,1,OKe,roe);_.fk=function soe(a){return bE(a)};_.gk=function toe(a){return $C(qJ,Nve,2,a,6,1)};var qcb=sfb(lLe,'XMLTypePackageImpl/22',1982);feb(1983,1,OKe,uoe);_.fk=function voe(a){return bE(a)};_.gk=function woe(a){return $C(qJ,Nve,2,a,6,1)};var rcb=sfb(lLe,'XMLTypePackageImpl/23',1983);feb(1984,1,OKe,xoe);_.fk=function yoe(a){return ZD(a,195)};_.gk=function zoe(a){return $C(gE,Nve,195,a,0,2)};var scb=sfb(lLe,'XMLTypePackageImpl/24',1984);feb(1985,1,OKe,Aoe);_.fk=function Boe(a){return bE(a)};_.gk=function Coe(a){return $C(qJ,Nve,2,a,6,1)};var tcb=sfb(lLe,'XMLTypePackageImpl/25',1985);feb(1986,1,OKe,Doe);_.fk=function Eoe(a){return bE(a)};_.gk=function Foe(a){return $C(qJ,Nve,2,a,6,1)};var ucb=sfb(lLe,'XMLTypePackageImpl/26',1986);feb(1987,1,OKe,Goe);_.fk=function Hoe(a){return ZD(a,15)};_.gk=function Ioe(a){return $C(QK,Ize,15,a,0,1)};var vcb=sfb(lLe,'XMLTypePackageImpl/27',1987);feb(1988,1,OKe,Joe);_.fk=function Koe(a){return ZD(a,15)};_.gk=function Loe(a){return $C(QK,Ize,15,a,0,1)};var wcb=sfb(lLe,'XMLTypePackageImpl/28',1988);feb(1989,1,OKe,Moe);_.fk=function Noe(a){return bE(a)};_.gk=function Ooe(a){return $C(qJ,Nve,2,a,6,1)};var xcb=sfb(lLe,'XMLTypePackageImpl/29',1989);feb(1963,1,OKe,Poe);_.fk=function Qoe(a){return ZD(a,681)};_.gk=function Roe(a){return $C(Xbb,rve,2119,a,0,1)};var Jcb=sfb(lLe,'XMLTypePackageImpl/3',1963);feb(1990,1,OKe,Soe);_.fk=function Toe(a){return ZD(a,17)};_.gk=function Uoe(a){return $C(bJ,Nve,17,a,0,1)};var zcb=sfb(lLe,'XMLTypePackageImpl/30',1990);feb(1991,1,OKe,Voe);_.fk=function Woe(a){return bE(a)};_.gk=function Xoe(a){return $C(qJ,Nve,2,a,6,1)};var Acb=sfb(lLe,'XMLTypePackageImpl/31',1991);feb(1992,1,OKe,Yoe);_.fk=function Zoe(a){return ZD(a,168)};_.gk=function $oe(a){return $C(eJ,Nve,168,a,0,1)};var Bcb=sfb(lLe,'XMLTypePackageImpl/32',1992);feb(1993,1,OKe,_oe);_.fk=function ape(a){return bE(a)};_.gk=function bpe(a){return $C(qJ,Nve,2,a,6,1)};var Ccb=sfb(lLe,'XMLTypePackageImpl/33',1993);feb(1994,1,OKe,cpe);_.fk=function dpe(a){return bE(a)};_.gk=function epe(a){return $C(qJ,Nve,2,a,6,1)};var Dcb=sfb(lLe,'XMLTypePackageImpl/34',1994);feb(1995,1,OKe,fpe);_.fk=function gpe(a){return bE(a)};_.gk=function hpe(a){return $C(qJ,Nve,2,a,6,1)};var Ecb=sfb(lLe,'XMLTypePackageImpl/35',1995);feb(1996,1,OKe,ipe);_.fk=function jpe(a){return bE(a)};_.gk=function kpe(a){return $C(qJ,Nve,2,a,6,1)};var Fcb=sfb(lLe,'XMLTypePackageImpl/36',1996);feb(1997,1,OKe,lpe);_.fk=function mpe(a){return ZD(a,15)};_.gk=function npe(a){return $C(QK,Ize,15,a,0,1)};var Gcb=sfb(lLe,'XMLTypePackageImpl/37',1997);feb(1998,1,OKe,ope);_.fk=function ppe(a){return ZD(a,15)};_.gk=function qpe(a){return $C(QK,Ize,15,a,0,1)};var Hcb=sfb(lLe,'XMLTypePackageImpl/38',1998);feb(1999,1,OKe,rpe);_.fk=function spe(a){return bE(a)};_.gk=function tpe(a){return $C(qJ,Nve,2,a,6,1)};var Icb=sfb(lLe,'XMLTypePackageImpl/39',1999);feb(1964,1,OKe,upe);_.fk=function vpe(a){return ZD(a,682)};_.gk=function wpe(a){return $C(Ybb,rve,2120,a,0,1)};var Ucb=sfb(lLe,'XMLTypePackageImpl/4',1964);feb(2000,1,OKe,xpe);_.fk=function ype(a){return bE(a)};_.gk=function zpe(a){return $C(qJ,Nve,2,a,6,1)};var Kcb=sfb(lLe,'XMLTypePackageImpl/40',2000);feb(2001,1,OKe,Ape);_.fk=function Bpe(a){return bE(a)};_.gk=function Cpe(a){return $C(qJ,Nve,2,a,6,1)};var Lcb=sfb(lLe,'XMLTypePackageImpl/41',2001);feb(2002,1,OKe,Dpe);_.fk=function Epe(a){return bE(a)};_.gk=function Fpe(a){return $C(qJ,Nve,2,a,6,1)};var Mcb=sfb(lLe,'XMLTypePackageImpl/42',2002);feb(2003,1,OKe,Gpe);_.fk=function Hpe(a){return bE(a)};_.gk=function Ipe(a){return $C(qJ,Nve,2,a,6,1)};var Ncb=sfb(lLe,'XMLTypePackageImpl/43',2003);feb(2004,1,OKe,Jpe);_.fk=function Kpe(a){return bE(a)};_.gk=function Lpe(a){return $C(qJ,Nve,2,a,6,1)};var Ocb=sfb(lLe,'XMLTypePackageImpl/44',2004);feb(2005,1,OKe,Mpe);_.fk=function Npe(a){return ZD(a,191)};_.gk=function Ope(a){return $C(lJ,Nve,191,a,0,1)};var Pcb=sfb(lLe,'XMLTypePackageImpl/45',2005);feb(2006,1,OKe,Ppe);_.fk=function Qpe(a){return bE(a)};_.gk=function Rpe(a){return $C(qJ,Nve,2,a,6,1)};var Qcb=sfb(lLe,'XMLTypePackageImpl/46',2006);feb(2007,1,OKe,Spe);_.fk=function Tpe(a){return bE(a)};_.gk=function Upe(a){return $C(qJ,Nve,2,a,6,1)};var Rcb=sfb(lLe,'XMLTypePackageImpl/47',2007);feb(2008,1,OKe,Vpe);_.fk=function Wpe(a){return bE(a)};_.gk=function Xpe(a){return $C(qJ,Nve,2,a,6,1)};var Scb=sfb(lLe,'XMLTypePackageImpl/48',2008);feb(2009,1,OKe,Ype);_.fk=function Zpe(a){return ZD(a,191)};_.gk=function $pe(a){return $C(lJ,Nve,191,a,0,1)};var Tcb=sfb(lLe,'XMLTypePackageImpl/49',2009);feb(1965,1,OKe,_pe);_.fk=function aqe(a){return ZD(a,683)};_.gk=function bqe(a){return $C(Zbb,rve,2121,a,0,1)};var Ycb=sfb(lLe,'XMLTypePackageImpl/5',1965);feb(2010,1,OKe,cqe);_.fk=function dqe(a){return ZD(a,168)};_.gk=function eqe(a){return $C(eJ,Nve,168,a,0,1)};var Vcb=sfb(lLe,'XMLTypePackageImpl/50',2010);feb(2011,1,OKe,fqe);_.fk=function gqe(a){return bE(a)};_.gk=function hqe(a){return $C(qJ,Nve,2,a,6,1)};var Wcb=sfb(lLe,'XMLTypePackageImpl/51',2011);feb(2012,1,OKe,iqe);_.fk=function jqe(a){return ZD(a,17)};_.gk=function kqe(a){return $C(bJ,Nve,17,a,0,1)};var Xcb=sfb(lLe,'XMLTypePackageImpl/52',2012);feb(1966,1,OKe,lqe);_.fk=function mqe(a){return bE(a)};_.gk=function nqe(a){return $C(qJ,Nve,2,a,6,1)};var Zcb=sfb(lLe,'XMLTypePackageImpl/6',1966);feb(1967,1,OKe,oqe);_.fk=function pqe(a){return ZD(a,195)};_.gk=function qqe(a){return $C(gE,Nve,195,a,0,2)};var $cb=sfb(lLe,'XMLTypePackageImpl/7',1967);feb(1968,1,OKe,rqe);_.fk=function sqe(a){return $D(a)};_.gk=function tqe(a){return $C(QI,Nve,485,a,8,1)};var _cb=sfb(lLe,'XMLTypePackageImpl/8',1968);feb(1969,1,OKe,uqe);_.fk=function vqe(a){return ZD(a,222)};_.gk=function wqe(a){return $C(RI,Nve,222,a,0,1)};var adb=sfb(lLe,'XMLTypePackageImpl/9',1969);var xqe,yqe;var Eqe,Fqe;var Jqe;feb(55,63,swe,Lqe);var cdb=sfb(LLe,'RegEx/ParseException',55);feb(836,1,{},Tqe);_.bm=function Uqe(a){return a<this.j&&ihb(this.i,a)==63};_.cm=function Vqe(){var a,b,c,d,e;if(this.c!=10)throw Adb(new Lqe(TId((Hde(),VIe))));a=this.a;switch(a){case 101:a=27;break;case 102:a=12;break;case 110:a=10;break;case 114:a=13;break;case 116:a=9;break;case 120:Mqe(this);if(this.c!=0)throw Adb(new Lqe(TId((Hde(),sJe))));if(this.a==123){e=0;c=0;do{Mqe(this);if(this.c!=0)throw Adb(new Lqe(TId((Hde(),sJe))));if((e=Xqe(this.a))<0)break;if(c>c*16)throw Adb(new Lqe(TId((Hde(),tJe))));c=c*16+e}while(true);if(this.a!=125)throw Adb(new Lqe(TId((Hde(),uJe))));if(c>MLe)throw Adb(new Lqe(TId((Hde(),vJe))));a=c}else{e=0;if(this.c!=0||(e=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));c=e;Mqe(this);if(this.c!=0||(e=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));c=c*16+e;a=c}break;case 117:d=0;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;a=b;break;case 118:Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;Mqe(this);if(this.c!=0||(d=Xqe(this.a))<0)throw Adb(new Lqe(TId((Hde(),sJe))));b=b*16+d;if(b>MLe)throw Adb(new Lqe(TId((Hde(),'parser.descappe.4'))));a=b;break;case 65:case 90:case 122:throw Adb(new Lqe(TId((Hde(),wJe))));}return a};_.dm=function Wqe(a){var b,c;switch(a){case 100:c=(this.e&32)==32?hte('Nd',true):(Vse(),Bse);break;case 68:c=(this.e&32)==32?hte('Nd',false):(Vse(),Ise);break;case 119:c=(this.e&32)==32?hte('IsWord',true):(Vse(),Rse);break;case 87:c=(this.e&32)==32?hte('IsWord',false):(Vse(),Kse);break;case 115:c=(this.e&32)==32?hte('IsSpace',true):(Vse(),Mse);break;case 83:c=(this.e&32)==32?hte('IsSpace',false):(Vse(),Jse);break;default:throw Adb(new yz((b=a,NLe+b.toString(16))));}return c};_.em=function Yqe(a){var b,c,d,e,f,g,h,i,j,k,l,m;this.b=1;Mqe(this);b=null;if(this.c==0&&this.a==94){Mqe(this);if(a){k=(Vse(),Vse(),++Use,new xte(5))}else{b=(Vse(),Vse(),++Use,new xte(4));rte(b,0,MLe);k=(null,++Use,new xte(4))}}else{k=(Vse(),Vse(),++Use,new xte(4))}e=true;while((m=this.c)!=1){if(m==0&&this.a==93&&!e)break;e=false;c=this.a;d=false;if(m==10){switch(c){case 100:case 68:case 119:case 87:case 115:case 83:ute(k,this.dm(c));d=true;break;case 105:case 73:case 99:case 67:c=this.um(k,c);c<0&&(d=true);break;case 112:case 80:l=Sqe(this,c);if(!l)throw Adb(new Lqe(TId((Hde(),hJe))));ute(k,l);d=true;break;default:c=this.cm();}}else if(m==20){g=phb(this.i,58,this.d);if(g<0)throw Adb(new Lqe(TId((Hde(),iJe))));h=true;if(ihb(this.i,this.d)==94){++this.d;h=false}f=zhb(this.i,this.d,g);i=ite(f,h,(this.e&512)==512);if(!i)throw Adb(new Lqe(TId((Hde(),kJe))));ute(k,i);d=true;if(g+1>=this.j||ihb(this.i,g+1)!=93)throw Adb(new Lqe(TId((Hde(),iJe))));this.d=g+2}Mqe(this);if(!d){if(this.c!=0||this.a!=45){rte(k,c,c)}else{Mqe(this);if((m=this.c)==1)throw Adb(new Lqe(TId((Hde(),jJe))));if(m==0&&this.a==93){rte(k,c,c);rte(k,45,45)}else{j=this.a;m==10&&(j=this.cm());Mqe(this);rte(k,c,j)}}}(this.e&gwe)==gwe&&this.c==0&&this.a==44&&Mqe(this)}if(this.c==1)throw Adb(new Lqe(TId((Hde(),jJe))));if(b){wte(b,k);k=b}vte(k);ste(k);this.b=0;Mqe(this);return k};_.fm=function Zqe(){var a,b,c,d;c=this.em(false);while((d=this.c)!=7){a=this.a;if(d==0&&(a==45||a==38)||d==4){Mqe(this);if(this.c!=9)throw Adb(new Lqe(TId((Hde(),pJe))));b=this.em(false);if(d==4)ute(c,b);else if(a==45)wte(c,b);else if(a==38)tte(c,b);else throw Adb(new yz('ASSERT'))}else{throw Adb(new Lqe(TId((Hde(),qJe))))}}Mqe(this);return c};_.gm=function $qe(){var a,b;a=this.a-48;b=(Vse(),Vse(),++Use,new eue(12,null,a));!this.g&&(this.g=new gyb);dyb(this.g,new Bte(a));Mqe(this);return b};_.hm=function _qe(){Mqe(this);return Vse(),Nse};_.im=function are(){Mqe(this);return Vse(),Lse};_.jm=function bre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.km=function cre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.lm=function dre(){Mqe(this);return fte()};_.mm=function ere(){Mqe(this);return Vse(),Pse};_.nm=function fre(){Mqe(this);return Vse(),Sse};_.om=function gre(){var a;if(this.d>=this.j||((a=ihb(this.i,this.d++))&65504)!=64)throw Adb(new Lqe(TId((Hde(),dJe))));Mqe(this);return Vse(),Vse(),++Use,new Hte(0,a-64)};_.pm=function hre(){Mqe(this);return gte()};_.qm=function ire(){Mqe(this);return Vse(),Tse};_.rm=function jre(){var a;a=(Vse(),Vse(),++Use,new Hte(0,105));Mqe(this);return a};_.sm=function kre(){Mqe(this);return Vse(),Qse};_.tm=function lre(){Mqe(this);return Vse(),Ose};_.um=function mre(a,b){return this.cm()};_.vm=function nre(){Mqe(this);return Vse(),Gse};_.wm=function ore(){var a,b,c,d,e;if(this.d+1>=this.j)throw Adb(new Lqe(TId((Hde(),aJe))));d=-1;b=null;a=ihb(this.i,this.d);if(49<=a&&a<=57){d=a-48;!this.g&&(this.g=new gyb);dyb(this.g,new Bte(d));++this.d;if(ihb(this.i,this.d)!=41)throw Adb(new Lqe(TId((Hde(),ZIe))));++this.d}else{a==63&&--this.d;Mqe(this);b=Pqe(this);switch(b.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));break;default:throw Adb(new Lqe(TId((Hde(),bJe))));}}Mqe(this);e=Qqe(this);c=null;if(e.e==2){if(e.Pm()!=2)throw Adb(new Lqe(TId((Hde(),cJe))));c=e.Lm(1);e=e.Lm(0)}if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return Vse(),Vse(),++Use,new Ute(d,b,e,c)};_.xm=function pre(){Mqe(this);return Vse(),Hse};_.ym=function qre(){var a;Mqe(this);a=_se(24,Qqe(this));if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.zm=function rre(){var a;Mqe(this);a=_se(20,Qqe(this));if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.Am=function sre(){var a;Mqe(this);a=_se(22,Qqe(this));if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.Bm=function tre(){var a,b,c,d,e;a=0;c=0;b=-1;while(this.d<this.j){b=ihb(this.i,this.d);e=rse(b);if(e==0)break;a|=e;++this.d}if(this.d>=this.j)throw Adb(new Lqe(TId((Hde(),$Ie))));if(b==45){++this.d;while(this.d<this.j){b=ihb(this.i,this.d);e=rse(b);if(e==0)break;c|=e;++this.d}if(this.d>=this.j)throw Adb(new Lqe(TId((Hde(),$Ie))))}if(b==58){++this.d;Mqe(this);d=ate(Qqe(this),a,c);if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this)}else if(b==41){++this.d;Mqe(this);d=ate(Qqe(this),a,c)}else throw Adb(new Lqe(TId((Hde(),_Ie))));return d};_.Cm=function ure(){var a;Mqe(this);a=_se(21,Qqe(this));if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.Dm=function vre(){var a;Mqe(this);a=_se(23,Qqe(this));if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.Em=function wre(){var a,b;Mqe(this);a=this.f++;b=bte(Qqe(this),a);if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return b};_.Fm=function xre(){var a;Mqe(this);a=bte(Qqe(this),0);if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.Gm=function yre(a){Mqe(this);if(this.c==5){Mqe(this);return $se(a,(Vse(),Vse(),++Use,new Kte(9,a)))}else return $se(a,(Vse(),Vse(),++Use,new Kte(3,a)))};_.Hm=function zre(a){var b;Mqe(this);b=(Vse(),Vse(),++Use,new iue(2));if(this.c==5){Mqe(this);hue(b,(null,Ese));hue(b,a)}else{hue(b,a);hue(b,(null,Ese))}return b};_.Im=function Are(a){Mqe(this);if(this.c==5){Mqe(this);return Vse(),Vse(),++Use,new Kte(9,a)}else return Vse(),Vse(),++Use,new Kte(3,a)};_.a=0;_.b=0;_.c=0;_.d=0;_.e=0;_.f=1;_.g=null;_.j=0;var gdb=sfb(LLe,'RegEx/RegexParser',836);feb(1947,836,{},Gre);_.bm=function Hre(a){return false};_.cm=function Ire(){return Dre(this)};_.dm=function Kre(a){return Ere(a)};_.em=function Lre(a){return Fre(this)};_.fm=function Mre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.gm=function Nre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.hm=function Ore(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.im=function Pre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.jm=function Qre(){Mqe(this);return Ere(67)};_.km=function Rre(){Mqe(this);return Ere(73)};_.lm=function Sre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.mm=function Tre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.nm=function Ure(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.om=function Vre(){Mqe(this);return Ere(99)};_.pm=function Wre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.qm=function Xre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.rm=function Yre(){Mqe(this);return Ere(105)};_.sm=function Zre(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.tm=function $re(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.um=function _re(a,b){return ute(a,Ere(b)),-1};_.vm=function ase(){Mqe(this);return Vse(),Vse(),++Use,new Hte(0,94)};_.wm=function bse(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.xm=function cse(){Mqe(this);return Vse(),Vse(),++Use,new Hte(0,36)};_.ym=function dse(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.zm=function ese(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.Am=function fse(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.Bm=function gse(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.Cm=function hse(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.Dm=function ise(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.Em=function jse(){var a;Mqe(this);a=bte(Qqe(this),0);if(this.c!=7)throw Adb(new Lqe(TId((Hde(),ZIe))));Mqe(this);return a};_.Fm=function kse(){throw Adb(new Lqe(TId((Hde(),xJe))))};_.Gm=function lse(a){Mqe(this);return $se(a,(Vse(),Vse(),++Use,new Kte(3,a)))};_.Hm=function mse(a){var b;Mqe(this);b=(Vse(),Vse(),++Use,new iue(2));hue(b,a);hue(b,(null,Ese));return b};_.Im=function nse(a){Mqe(this);return Vse(),Vse(),++Use,new Kte(3,a)};var Bre=null,Cre=null;var ddb=sfb(LLe,'RegEx/ParserForXMLSchema',1947);feb(122,1,ZLe,Wse);_.Jm=function Xse(a){throw Adb(new yz('Not supported.'))};_.Km=function dte(){return -1};_.Lm=function ete(a){return null};_.Mm=function jte(){return null};_.Nm=function mte(a){};_.Om=function nte(a){};_.Pm=function ote(){return 0};_.Ib=function pte(){return this.Qm(0)};_.Qm=function qte(a){return this.e==11?'.':''};_.e=0;var vse,wse,xse,yse,zse,Ase=null,Bse,Cse=null,Dse,Ese,Fse=null,Gse,Hse,Ise,Jse,Kse,Lse,Mse,Nse,Ose,Pse,Qse,Rse,Sse,Tse,Use=0;var qdb=sfb(LLe,'RegEx/Token',122);feb(138,122,{3:1,138:1,122:1},xte);_.Qm=function Ate(a){var b,c,d;if(this.e==4){if(this==Dse)c='.';else if(this==Bse)c='\\d';else if(this==Rse)c='\\w';else if(this==Mse)c='\\s';else{d=new Qhb;d.a+='[';for(b=0;b<this.b.length;b+=2){(a&gwe)!=0&&b>0&&(d.a+=',',d);if(this.b[b]===this.b[b+1]){Nhb(d,zte(this.b[b]))}else{Nhb(d,zte(this.b[b]));d.a+='-';Nhb(d,zte(this.b[b+1]))}}d.a+=']';c=d.a}}else{if(this==Ise)c='\\D';else if(this==Kse)c='\\W';else if(this==Jse)c='\\S';else{d=new Qhb;d.a+='[^';for(b=0;b<this.b.length;b+=2){(a&gwe)!=0&&b>0&&(d.a+=',',d);if(this.b[b]===this.b[b+1]){Nhb(d,zte(this.b[b]))}else{Nhb(d,zte(this.b[b]));d.a+='-';Nhb(d,zte(this.b[b+1]))}}d.a+=']';c=d.a}}return c};_.a=false;_.c=false;var edb=sfb(LLe,'RegEx/RangeToken',138);feb(592,1,{592:1},Bte);_.a=0;var fdb=sfb(LLe,'RegEx/RegexParser/ReferencePosition',592);feb(591,1,{3:1,591:1},Dte);_.Fb=function Ete(a){var b;if(a==null)return false;if(!ZD(a,591))return false;b=RD(a,591);return lhb(this.b,b.b)&&this.a==b.a};_.Hb=function Fte(){return ohb(this.b+'/'+pse(this.a))};_.Ib=function Gte(){return this.c.Qm(this.a)};_.a=0;var hdb=sfb(LLe,'RegEx/RegularExpression',591);feb(228,122,ZLe,Hte);_.Km=function Ite(){return this.a};_.Qm=function Jte(a){var b,c,d;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:d='\\'+XD(this.a&Bwe);break;case 12:d='\\f';break;case 10:d='\\n';break;case 13:d='\\r';break;case 9:d='\\t';break;case 27:d='\\e';break;default:if(this.a>=txe){c=(b=this.a>>>0,'0'+b.toString(16));d='\\v'+zhb(c,c.length-6,c.length)}else d=''+XD(this.a&Bwe);}break;case 8:this==Gse||this==Hse?(d=''+XD(this.a&Bwe)):(d='\\'+XD(this.a&Bwe));break;default:d=null;}return d};_.a=0;var idb=sfb(LLe,'RegEx/Token/CharToken',228);feb(318,122,ZLe,Kte);_.Lm=function Lte(a){return this.a};_.Nm=function Mte(a){this.b=a};_.Om=function Nte(a){this.c=a};_.Pm=function Ote(){return 1};_.Qm=function Pte(a){var b;if(this.e==3){if(this.c<0&&this.b<0){b=this.a.Qm(a)+'*'}else if(this.c==this.b){b=this.a.Qm(a)+'{'+this.c+'}'}else if(this.c>=0&&this.b>=0){b=this.a.Qm(a)+'{'+this.c+','+this.b+'}'}else if(this.c>=0&&this.b<0){b=this.a.Qm(a)+'{'+this.c+',}'}else throw Adb(new yz('Token#toString(): CLOSURE '+this.c+pve+this.b))}else{if(this.c<0&&this.b<0){b=this.a.Qm(a)+'*?'}else if(this.c==this.b){b=this.a.Qm(a)+'{'+this.c+'}?'}else if(this.c>=0&&this.b>=0){b=this.a.Qm(a)+'{'+this.c+','+this.b+'}?'}else if(this.c>=0&&this.b<0){b=this.a.Qm(a)+'{'+this.c+',}?'}else throw Adb(new yz('Token#toString(): NONGREEDYCLOSURE '+this.c+pve+this.b))}return b};_.b=0;_.c=0;var jdb=sfb(LLe,'RegEx/Token/ClosureToken',318);feb(837,122,ZLe,Qte);_.Lm=function Rte(a){return a==0?this.a:this.b};_.Pm=function Ste(){return 2};_.Qm=function Tte(a){var b;this.b.e==3&&this.b.Lm(0)==this.a?(b=this.a.Qm(a)+'+'):this.b.e==9&&this.b.Lm(0)==this.a?(b=this.a.Qm(a)+'+?'):(b=this.a.Qm(a)+(''+this.b.Qm(a)));return b};var kdb=sfb(LLe,'RegEx/Token/ConcatToken',837);feb(1945,122,ZLe,Ute);_.Lm=function Vte(a){if(a==0)return this.d;if(a==1)return this.b;throw Adb(new yz('Internal Error: '+a))};_.Pm=function Wte(){return !this.b?1:2};_.Qm=function Xte(a){var b;this.c>0?(b='(?('+this.c+')'):this.a.e==8?(b='(?('+this.a+')'):(b='(?'+this.a);!this.b?(b+=this.d+')'):(b+=this.d+'|'+this.b+')');return b};_.c=0;var ldb=sfb(LLe,'RegEx/Token/ConditionToken',1945);feb(1946,122,ZLe,Yte);_.Lm=function Zte(a){return this.b};_.Pm=function $te(){return 1};_.Qm=function _te(a){return '(?'+(this.a==0?'':pse(this.a))+(this.c==0?'':pse(this.c))+':'+this.b.Qm(a)+')'};_.a=0;_.c=0;var mdb=sfb(LLe,'RegEx/Token/ModifierToken',1946);feb(838,122,ZLe,aue);_.Lm=function bue(a){return this.a};_.Pm=function cue(){return 1};_.Qm=function due(a){var b;b=null;switch(this.e){case 6:this.b==0?(b='(?:'+this.a.Qm(a)+')'):(b='('+this.a.Qm(a)+')');break;case 20:b='(?='+this.a.Qm(a)+')';break;case 21:b='(?!'+this.a.Qm(a)+')';break;case 22:b='(?<='+this.a.Qm(a)+')';break;case 23:b='(?<!'+this.a.Qm(a)+')';break;case 24:b='(?>'+this.a.Qm(a)+')';}return b};_.b=0;var ndb=sfb(LLe,'RegEx/Token/ParenToken',838);feb(530,122,{3:1,122:1,530:1},eue);_.Mm=function fue(){return this.b};_.Qm=function gue(a){return this.e==12?'\\'+this.a:tse(this.b)};_.a=0;var odb=sfb(LLe,'RegEx/Token/StringToken',530);feb(477,122,ZLe,iue);_.Jm=function jue(a){hue(this,a)};_.Lm=function kue(a){return RD(eyb(this.a,a),122)};_.Pm=function lue(){return !this.a?0:this.a.a.c.length};_.Qm=function mue(a){var b,c,d,e,f;if(this.e==1){if(this.a.a.c.length==2){b=RD(eyb(this.a,0),122);c=RD(eyb(this.a,1),122);c.e==3&&c.Lm(0)==b?(e=b.Qm(a)+'+'):c.e==9&&c.Lm(0)==b?(e=b.Qm(a)+'+?'):(e=b.Qm(a)+(''+c.Qm(a)))}else{f=new Qhb;for(d=0;d<this.a.a.c.length;d++){Nhb(f,RD(eyb(this.a,d),122).Qm(a))}e=f.a}return e}if(this.a.a.c.length==2&&RD(eyb(this.a,1),122).e==7){e=RD(eyb(this.a,0),122).Qm(a)+'?'}else if(this.a.a.c.length==2&&RD(eyb(this.a,0),122).e==7){e=RD(eyb(this.a,1),122).Qm(a)+'??'}else{f=new Qhb;Nhb(f,RD(eyb(this.a,0),122).Qm(a));for(d=1;d<this.a.a.c.length;d++){f.a+='|';Nhb(f,RD(eyb(this.a,d),122).Qm(a))}e=f.a}return e};var pdb=sfb(LLe,'RegEx/Token/UnionToken',477);feb(527,1,{600:1},oue);_.Ib=function pue(){return this.a.b};var rdb=sfb($Le,'XMLTypeUtil/PatternMatcherImpl',527);feb(1707,1527,{},sue);var que;var sdb=sfb($Le,'XMLTypeValidator',1707);feb(270,1,Vve,vue);_.Jc=function wue(a){xgb(this,a)};_.Kc=function xue(){return (this.b-this.a)*this.c<0?tue:new Rue(this)};_.a=0;_.b=0;_.c=0;var tue;var vdb=sfb(aMe,'ExclusiveRange',270);feb(1084,1,Jve,Cue);_.Rb=function Due(a){RD(a,17);yue()};_.Nb=function Eue(a){Ztb(this,a)};_.Pb=function Hue(){return zue()};_.Ub=function Jue(){return Aue()};_.Wb=function Mue(a){RD(a,17);Bue()};_.Ob=function Fue(){return false};_.Sb=function Gue(){return false};_.Tb=function Iue(){return -1};_.Vb=function Kue(){return -1};_.Qb=function Lue(){throw Adb(new kib(dMe))};var tdb=sfb(aMe,'ExclusiveRange/1',1084);feb(258,1,Jve,Rue);_.Rb=function Sue(a){RD(a,17);Nue()};_.Nb=function Tue(a){Ztb(this,a)};_.Pb=function Wue(){return Oue(this)};_.Ub=function Yue(){return Pue(this)};_.Wb=function _ue(a){RD(a,17);Que()};_.Ob=function Uue(){return this.c.c<0?this.a>=this.c.b:this.a<=this.c.b};_.Sb=function Vue(){return this.b>0};_.Tb=function Xue(){return this.b};_.Vb=function Zue(){return this.b-1};_.Qb=function $ue(){throw Adb(new kib(dMe))};_.a=0;_.b=0;var udb=sfb(aMe,'ExclusiveRange/RangeIterator',258);var hE=vfb(eKe,'C');var kE=vfb(hKe,'I');var xdb=vfb(hve,'Z');var lE=vfb(iKe,'J');var gE=vfb(dKe,'B');var iE=vfb(fKe,'D');var jE=vfb(gKe,'F');var wdb=vfb(jKe,'S');var g3=ufb('org.eclipse.elk.core.labels','ILabelManager');var T6=ufb(sIe,'DiagnosticChain');var zab=ufb(QKe,'ResourceSet');var $6=sfb(sIe,'InvocationTargetException',null);var fve=(Qz(),Tz);var gwtOnLoad=gwtOnLoad=ceb;aeb(leb);deb('permProps',[[['locale','default'],[eMe,'gecko1_8']],[['locale','default'],[eMe,'safari']]]); +// -------------- RUN GWT INITIALIZATION CODE -------------- +gwtOnLoad(null, 'elk', null); + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],3:[function(require,module,exports){ +'use strict'; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/******************************************************************************* + * Copyright (c) 2021 Kiel University and others. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +var ELK = require('./elk-api.js').default; + +var ELKNode = function (_ELK) { + _inherits(ELKNode, _ELK); + + function ELKNode() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + _classCallCheck(this, ELKNode); + + var optionsClone = Object.assign({}, options); + + var workerThreadsExist = false; + try { + require.resolve('web-worker'); + workerThreadsExist = true; + } catch (e) {} + + // user requested a worker + if (options.workerUrl) { + if (workerThreadsExist) { + var Worker = require('web-worker'); + optionsClone.workerFactory = function (url) { + return new Worker(url); + }; + } else { + console.warn('Web worker requested but \'web-worker\' package not installed. \nConsider installing the package or pass your own \'workerFactory\' to ELK\'s constructor.\n... Falling back to non-web worker version.'); + } + } + + // unless no other workerFactory is registered, use the fake worker + if (!optionsClone.workerFactory) { + var _require = require('./elk-worker.min.js'), + _Worker = _require.Worker; + + optionsClone.workerFactory = function (url) { + return new _Worker(url); + }; + } + + return _possibleConstructorReturn(this, (ELKNode.__proto__ || Object.getPrototypeOf(ELKNode)).call(this, optionsClone)); + } + + return ELKNode; +}(ELK); + +Object.defineProperty(module.exports, "__esModule", { + value: true +}); +module.exports = ELKNode; +ELKNode.default = ELKNode; +},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(require,module,exports){ +/** + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module.exports = Worker; +},{}]},{},[3])(3) +}); + + +/***/ }), + +/***/ 3791: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + a: () => (/* binding */ createText), + c: () => (/* binding */ computeDimensionOfText) +}); + +// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +var constructs_namespaceObject = {}; +__webpack_require__.r(constructs_namespaceObject); +__webpack_require__.d(constructs_namespaceObject, { + attentionMarkers: () => (attentionMarkers), + contentInitial: () => (contentInitial), + disable: () => (disable), + document: () => (constructs_document), + flow: () => (constructs_flow), + flowInitial: () => (flowInitial), + insideSpan: () => (insideSpan), + string: () => (constructs_string), + text: () => (constructs_text) +}); + +// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-f47111a7.js + 8 modules +var mermaid_f47111a7 = __webpack_require__(6257); +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js +/** + * @typedef {import('mdast').Root|import('mdast').Content} Node + * + * @typedef Options + * Configuration (optional). + * @property {boolean | null | undefined} [includeImageAlt=true] + * Whether to use `alt` for `image`s. + * @property {boolean | null | undefined} [includeHtml=true] + * Whether to use `value` of HTML. + */ + +/** @type {Options} */ +const emptyOptions = {} + +/** + * Get the text content of a node or list of nodes. + * + * Prefers the node’s plain-text fields, otherwise serializes its children, + * and if the given value is an array, serialize the nodes in it. + * + * @param {unknown} value + * Thing to serialize, typically `Node`. + * @param {Options | null | undefined} [options] + * Configuration (optional). + * @returns {string} + * Serialized `value`. + */ +function lib_toString(value, options) { + const settings = options || emptyOptions + const includeImageAlt = + typeof settings.includeImageAlt === 'boolean' + ? settings.includeImageAlt + : true + const includeHtml = + typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true + + return one(value, includeImageAlt, includeHtml) +} + +/** + * One node or several nodes. + * + * @param {unknown} value + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized node. + */ +function one(value, includeImageAlt, includeHtml) { + if (node(value)) { + if ('value' in value) { + return value.type === 'html' && !includeHtml ? '' : value.value + } + + if (includeImageAlt && 'alt' in value && value.alt) { + return value.alt + } + + if ('children' in value) { + return lib_all(value.children, includeImageAlt, includeHtml) + } + } + + if (Array.isArray(value)) { + return lib_all(value, includeImageAlt, includeHtml) + } + + return '' +} + +/** + * Serialize a list of nodes. + * + * @param {Array<unknown>} values + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized nodes. + */ +function lib_all(values, includeImageAlt, includeHtml) { + /** @type {Array<string>} */ + const result = [] + let index = -1 + + while (++index < values.length) { + result[index] = one(values[index], includeImageAlt, includeHtml) + } + + return result.join('') +} + +/** + * Check if `value` looks like a node. + * + * @param {unknown} value + * Thing. + * @returns {value is Node} + * Whether `value` is a node. + */ +function node(value) { + return Boolean(value && typeof value === 'object') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array<T>} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array<unknown>} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {Array<T>} items + * Items to add to `list`. + * @returns {Array<T>} + * Either `list` or `items`. + */ +function push(list, items) { + if (list.length > 0) { + splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + * @typedef {import('micromark-util-types').Handles} Handles + * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension + * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension + */ + + + +const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty + +/** + * Combine multiple syntax extensions into one. + * + * @param {Array<Extension>} extensions + * List of syntax extensions. + * @returns {NormalizedExtension} + * A single combined extension. + */ +function combineExtensions(extensions) { + /** @type {NormalizedExtension} */ + const all = {} + let index = -1 + + while (++index < extensions.length) { + syntaxExtension(all, extensions[index]) + } + + return all +} + +/** + * Merge `extension` into `all`. + * + * @param {NormalizedExtension} all + * Extension to merge into. + * @param {Extension} extension + * Extension to merge. + * @returns {void} + */ +function syntaxExtension(all, extension) { + /** @type {keyof Extension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + /** @type {Record<string, unknown>} */ + const left = maybe || (all[hook] = {}) + /** @type {Record<string, unknown> | undefined} */ + const right = extension[hook] + /** @type {string} */ + let code + + if (right) { + for (code in right) { + if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] + const value = right[code] + constructs( + // @ts-expect-error Looks like a list. + left[code], + Array.isArray(value) ? value : value ? [value] : [] + ) + } + } + } +} + +/** + * Merge `list` into `existing` (both lists of constructs). + * Mutates `existing`. + * + * @param {Array<unknown>} existing + * @param {Array<unknown>} list + * @returns {void} + */ +function constructs(existing, list) { + let index = -1 + /** @type {Array<unknown>} */ + const before = [] + + while (++index < list.length) { + // @ts-expect-error Looks like an object. + ;(list[index].add === 'after' ? existing : before).push(list[index]) + } + + splice(existing, 0, 0, before) +} + +/** + * Combine multiple HTML extensions into one. + * + * @param {Array<HtmlExtension>} htmlExtensions + * List of HTML extensions. + * @returns {HtmlExtension} + * A single combined HTML extension. + */ +function combineHtmlExtensions(htmlExtensions) { + /** @type {HtmlExtension} */ + const handlers = {} + let index = -1 + + while (++index < htmlExtensions.length) { + htmlExtension(handlers, htmlExtensions[index]) + } + + return handlers +} + +/** + * Merge `extension` into `all`. + * + * @param {HtmlExtension} all + * Extension to merge into. + * @param {HtmlExtension} extension + * Extension to merge. + * @returns {void} + */ +function htmlExtension(all, extension) { + /** @type {keyof HtmlExtension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + const left = maybe || (all[hook] = {}) + const right = extension[hook] + /** @type {keyof Handles} */ + let type + + if (right) { + for (type in right) { + // @ts-expect-error assume document vs regular handler are managed correctly. + left[type] = right[type] + } + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +// This module is generated by `script/`. +// +// CommonMark handles attention (emphasis, strong) markers based on what comes +// before or after them. +// One such difference is if those characters are Unicode punctuation. +// This script is generated from the Unicode data. + +/** + * Regular expression that matches a unicode punctuation character. + */ +const unicodePunctuationRegex = + /[!-\/:-@\[-`\{-~\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]/ + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + + +/** + * Check whether the character code represents an ASCII alpha (`a` through `z`, + * case insensitive). + * + * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. + * + * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) + * to U+005A (`Z`). + * + * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) + * to U+007A (`z`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlpha = regexCheck(/[A-Za-z]/) + +/** + * Check whether the character code represents an ASCII alphanumeric (`a` + * through `z`, case insensitive, or `0` through `9`). + * + * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha + * (see `asciiAlpha`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) + +/** + * Check whether the character code represents an ASCII atext. + * + * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in + * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), + * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F + * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E + * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE + * (`{`) to U+007E TILDE (`~`). + * + * See: + * **\[RFC5322]**: + * [Internet Message Format](https://tools.ietf.org/html/rfc5322). + * P. Resnick. + * IETF. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) + +/** + * Check whether a character code is an ASCII control character. + * + * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) + * to U+001F (US), or U+007F (DEL). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code !== null && (code < 32 || code === 127) + ) +} + +/** + * Check whether the character code represents an ASCII digit (`0` through `9`). + * + * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to + * U+0039 (`9`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiDigit = regexCheck(/\d/) + +/** + * Check whether the character code represents an ASCII hex digit (`a` through + * `f`, case insensitive, or `0` through `9`). + * + * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex + * digit, or an ASCII lower hex digit. + * + * An **ASCII upper hex digit** is a character in the inclusive range U+0041 + * (`A`) to U+0046 (`F`). + * + * An **ASCII lower hex digit** is a character in the inclusive range U+0061 + * (`a`) to U+0066 (`f`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) + +/** + * Check whether the character code represents ASCII punctuation. + * + * An **ASCII punctuation** is a character in the inclusive ranges U+0021 + * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT + * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT + * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) + +/** + * Check whether a character code is a markdown line ending. + * + * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN + * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). + * + * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE + * RETURN (CR) are replaced by these virtual characters depending on whether + * they occurred together. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEnding(code) { + return code !== null && code < -2 +} + +/** + * Check whether a character code is a markdown line ending (see + * `markdownLineEnding`) or markdown space (see `markdownSpace`). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEndingOrSpace(code) { + return code !== null && (code < 0 || code === 32) +} + +/** + * Check whether a character code is a markdown space. + * + * A **markdown space** is the concrete character U+0020 SPACE (SP) and the + * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). + * + * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is + * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL + * SPACE (VS) characters, depending on the column at which the tab occurred. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownSpace(code) { + return code === -2 || code === -1 || code === 32 +} + +// Size note: removing ASCII from the regex and using `asciiPunctuation` here +// In fact adds to the bundle size. +/** + * Check whether the character code represents Unicode punctuation. + * + * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, + * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` + * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` + * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII + * punctuation (see `asciiPunctuation`). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodePunctuation = regexCheck(unicodePunctuationRegex) + +/** + * Check whether the character code represents Unicode whitespace. + * + * Note that this does handle micromark specific markdown whitespace characters. + * See `markdownLineEndingOrSpace` to check that. + * + * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, + * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), + * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodeWhitespace = regexCheck(/\s/) + +/** + * Create a code check from a regex. + * + * @param {RegExp} regex + * @returns {(code: Code) => boolean} + */ +function regexCheck(regex) { + return check + + /** + * Check whether a code matches the bound regex. + * + * @param {Code} code + * Character code. + * @returns {boolean} + * Whether the character code matches the bound regex. + */ + function check(code) { + return code !== null && regex.test(String.fromCharCode(code)) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * spaces in markdown are often optional, in which case this factory can be + * used and `ok` will be switched to whether spaces were found or not + * * one line ending or space can be detected with `markdownSpace(code)` right + * before using `factorySpace` + * + * ###### Examples + * + * Where `␉` represents a tab (plus how much it expands) and `␠` represents a + * single space. + * + * ```markdown + * ␉ + * ␠␠␠␠ + * ␉␠ + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {TokenType} type + * Type (`' \t'`). + * @param {number | undefined} [max=Infinity] + * Max (exclusive). + * @returns + * Start state. + */ +function factorySpace(effects, ok, type, max) { + const limit = max ? max - 1 : Number.POSITIVE_INFINITY + let size = 0 + return start + + /** @type {State} */ + function start(code) { + if (markdownSpace(code)) { + effects.enter(type) + return prefix(code) + } + return ok(code) + } + + /** @type {State} */ + function prefix(code) { + if (markdownSpace(code) && size++ < limit) { + effects.consume(code) + return prefix + } + effects.exit(type) + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + +/** @type {InitialConstruct} */ +const content = { + tokenize: initializeContent +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeContent(effects) { + const contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ) + /** @type {Token} */ + let previous + return contentStart + + /** @type {State} */ + function afterContentStartConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, contentStart, 'linePrefix') + } + + /** @type {State} */ + function paragraphInitial(code) { + effects.enter('paragraph') + return lineStart(code) + } + + /** @type {State} */ + function lineStart(code) { + const token = effects.enter('chunkText', { + contentType: 'text', + previous + }) + if (previous) { + previous.next = token + } + previous = token + return data(code) + } + + /** @type {State} */ + function data(code) { + if (code === null) { + effects.exit('chunkText') + effects.exit('paragraph') + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + effects.exit('chunkText') + return lineStart + } + + // Data. + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + +/** + * @typedef {[Construct, ContainerState]} StackItem + */ + + + + +/** @type {InitialConstruct} */ +const document_document = { + tokenize: initializeDocument +} + +/** @type {Construct} */ +const containerConstruct = { + tokenize: tokenizeContainer +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeDocument(effects) { + const self = this + /** @type {Array<StackItem>} */ + const stack = [] + let continued = 0 + /** @type {TokenizeContext | undefined} */ + let childFlow + /** @type {Token | undefined} */ + let childToken + /** @type {number} */ + let lineStartOffset + return start + + /** @type {State} */ + function start(code) { + // First we iterate through the open blocks, starting with the root + // document, and descending through last children down to the last open + // block. + // Each block imposes a condition that the line must satisfy if the block is + // to remain open. + // For example, a block quote requires a `>` character. + // A paragraph requires a non-blank line. + // In this phase we may match all or just some of the open blocks. + // But we cannot close unmatched blocks yet, because we may have a lazy + // continuation line. + if (continued < stack.length) { + const item = stack[continued] + self.containerState = item[1] + return effects.attempt( + item[0].continuation, + documentContinue, + checkNewContainers + )(code) + } + + // Done. + return checkNewContainers(code) + } + + /** @type {State} */ + function documentContinue(code) { + continued++ + + // Note: this field is called `_closeFlow` but it also closes containers. + // Perhaps a good idea to rename it but it’s already used in the wild by + // extensions. + if (self.containerState._closeFlow) { + self.containerState._closeFlow = undefined + if (childFlow) { + closeFlow() + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when dealing with lazy lines in `writeToChild`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {Point | undefined} */ + let point + + // Find the flow chunk. + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + point = self.events[indexBeforeFlow][1].end + break + } + } + exitContainers(continued) + + // Fix positions. + let index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + return checkNewContainers(code) + } + return start(code) + } + + /** @type {State} */ + function checkNewContainers(code) { + // Next, after consuming the continuation markers for existing blocks, we + // look for new block starts (e.g. `>` for a block quote). + // If we encounter a new block start, we close any blocks unmatched in + // step 1 before creating the new block as a child of the last matched + // block. + if (continued === stack.length) { + // No need to `check` whether there’s a container, of `exitContainers` + // would be moot. + // We can instead immediately `attempt` to parse one. + if (!childFlow) { + return documentContinued(code) + } + + // If we have concrete content, such as block HTML or fenced code, + // we can’t have containers “pierce” into them, so we can immediately + // start. + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { + return flowStart(code) + } + + // If we do have flow, it could still be a blank line, + // but we’d be interrupting it w/ a new container if there’s a current + // construct. + // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer + // needed in micromark-extension-gfm-table@1.0.6). + self.interrupt = Boolean( + childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack + ) + } + + // Check if there is a new container. + self.containerState = {} + return effects.check( + containerConstruct, + thereIsANewContainer, + thereIsNoNewContainer + )(code) + } + + /** @type {State} */ + function thereIsANewContainer(code) { + if (childFlow) closeFlow() + exitContainers(continued) + return documentContinued(code) + } + + /** @type {State} */ + function thereIsNoNewContainer(code) { + self.parser.lazy[self.now().line] = continued !== stack.length + lineStartOffset = self.now().offset + return flowStart(code) + } + + /** @type {State} */ + function documentContinued(code) { + // Try new containers. + self.containerState = {} + return effects.attempt( + containerConstruct, + containerContinue, + flowStart + )(code) + } + + /** @type {State} */ + function containerContinue(code) { + continued++ + stack.push([self.currentConstruct, self.containerState]) + // Try another. + return documentContinued(code) + } + + /** @type {State} */ + function flowStart(code) { + if (code === null) { + if (childFlow) closeFlow() + exitContainers(0) + effects.consume(code) + return + } + childFlow = childFlow || self.parser.flow(self.now()) + effects.enter('chunkFlow', { + contentType: 'flow', + previous: childToken, + _tokenizer: childFlow + }) + return flowContinue(code) + } + + /** @type {State} */ + function flowContinue(code) { + if (code === null) { + writeToChild(effects.exit('chunkFlow'), true) + exitContainers(0) + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + writeToChild(effects.exit('chunkFlow')) + // Get ready for the next line. + continued = 0 + self.interrupt = undefined + return start + } + effects.consume(code) + return flowContinue + } + + /** + * @param {Token} token + * @param {boolean | undefined} [eof] + * @returns {void} + */ + function writeToChild(token, eof) { + const stream = self.sliceStream(token) + if (eof) stream.push(null) + token.previous = childToken + if (childToken) childToken.next = token + childToken = token + childFlow.defineSkip(token.start) + childFlow.write(stream) + + // Alright, so we just added a lazy line: + // + // ```markdown + // > a + // b. + // + // Or: + // + // > ~~~c + // d + // + // Or: + // + // > | e | + // f + // ``` + // + // The construct in the second example (fenced code) does not accept lazy + // lines, so it marked itself as done at the end of its first line, and + // then the content construct parses `d`. + // Most constructs in markdown match on the first line: if the first line + // forms a construct, a non-lazy line can’t “unmake” it. + // + // The construct in the third example is potentially a GFM table, and + // those are *weird*. + // It *could* be a table, from the first line, if the following line + // matches a condition. + // In this case, that second line is lazy, which “unmakes” the first line + // and turns the whole into one content block. + // + // We’ve now parsed the non-lazy and the lazy line, and can figure out + // whether the lazy line started a new flow block. + // If it did, we exit the current containers between the two flow blocks. + if (self.parser.lazy[token.start.line]) { + let index = childFlow.events.length + while (index--) { + if ( + // The token starts before the line ending… + childFlow.events[index][1].start.offset < lineStartOffset && + // …and either is not ended yet… + (!childFlow.events[index][1].end || + // …or ends after it. + childFlow.events[index][1].end.offset > lineStartOffset) + ) { + // Exit: there’s still something open, which means it’s a lazy line + // part of something. + return + } + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when closing flow in `documentContinue`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {boolean | undefined} */ + let seen + /** @type {Point | undefined} */ + let point + + // Find the previous chunk (the one before the lazy line). + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + if (seen) { + point = self.events[indexBeforeFlow][1].end + break + } + seen = true + } + } + exitContainers(continued) + + // Fix positions. + index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + } + } + + /** + * @param {number} size + * @returns {void} + */ + function exitContainers(size) { + let index = stack.length + + // Exit open containers. + while (index-- > size) { + const entry = stack[index] + self.containerState = entry[1] + entry[0].exit.call(self, effects) + } + stack.length = size + } + function closeFlow() { + childFlow.write([null]) + childToken = undefined + childFlow = undefined + self.containerState._closeFlow = undefined + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContainer(effects, ok, nok) { + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok, nok), + 'linePrefix', + this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blankLine = { + tokenize: tokenizeBlankLine, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLine(effects, ok, nok) { + return start + + /** + * Start of blank line. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + return markdownSpace(code) + ? factorySpace(effects, after, 'linePrefix')(code) + : after(code) + } + + /** + * At eof/eol, after optional whitespace. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array<T>} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function micromark_util_chunked_splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array<unknown>} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {Array<T>} items + * Items to add to `list`. + * @returns {Array<T>} + * Either `list` or `items`. + */ +function micromark_util_chunked_push(list, items) { + if (list.length > 0) { + micromark_util_chunked_splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Token} Token + */ + + +/** + * Tokenize subcontent. + * + * @param {Array<Event>} events + * List of events. + * @returns {boolean} + * Whether subtokens were found. + */ +function subtokenize(events) { + /** @type {Record<string, number>} */ + const jumps = {} + let index = -1 + /** @type {Event} */ + let event + /** @type {number | undefined} */ + let lineIndex + /** @type {number} */ + let otherIndex + /** @type {Event} */ + let otherEvent + /** @type {Array<Event>} */ + let parameters + /** @type {Array<Event>} */ + let subevents + /** @type {boolean | undefined} */ + let more + while (++index < events.length) { + while (index in jumps) { + index = jumps[index] + } + event = events[index] + + // Add a hook for the GFM tasklist extension, which needs to know if text + // is in the first content of a list item. + if ( + index && + event[1].type === 'chunkFlow' && + events[index - 1][1].type === 'listItemPrefix' + ) { + subevents = event[1]._tokenizer.events + otherIndex = 0 + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'lineEndingBlank' + ) { + otherIndex += 2 + } + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'content' + ) { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === 'content') { + break + } + if (subevents[otherIndex][1].type === 'chunkText') { + subevents[otherIndex][1]._isInFirstContentOfListItem = true + otherIndex++ + } + } + } + } + + // Enter. + if (event[0] === 'enter') { + if (event[1].contentType) { + Object.assign(jumps, subcontent(events, index)) + index = jumps[index] + more = true + } + } + // Exit. + else if (event[1]._container) { + otherIndex = index + lineIndex = undefined + while (otherIndex--) { + otherEvent = events[otherIndex] + if ( + otherEvent[1].type === 'lineEnding' || + otherEvent[1].type === 'lineEndingBlank' + ) { + if (otherEvent[0] === 'enter') { + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + } + otherEvent[1].type = 'lineEnding' + lineIndex = otherIndex + } + } else { + break + } + } + if (lineIndex) { + // Fix position. + event[1].end = Object.assign({}, events[lineIndex][1].start) + + // Switch container exit w/ line endings. + parameters = events.slice(lineIndex, index) + parameters.unshift(event) + micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) + } + } + } + return !more +} + +/** + * Tokenize embedded tokens. + * + * @param {Array<Event>} events + * @param {number} eventIndex + * @returns {Record<string, number>} + */ +function subcontent(events, eventIndex) { + const token = events[eventIndex][1] + const context = events[eventIndex][2] + let startPosition = eventIndex - 1 + /** @type {Array<number>} */ + const startPositions = [] + const tokenizer = + token._tokenizer || context.parser[token.contentType](token.start) + const childEvents = tokenizer.events + /** @type {Array<[number, number]>} */ + const jumps = [] + /** @type {Record<string, number>} */ + const gaps = {} + /** @type {Array<Chunk>} */ + let stream + /** @type {Token | undefined} */ + let previous + let index = -1 + /** @type {Token | undefined} */ + let current = token + let adjust = 0 + let start = 0 + const breaks = [start] + + // Loop forward through the linked tokens to pass them in order to the + // subtokenizer. + while (current) { + // Find the position of the event for this token. + while (events[++startPosition][1] !== current) { + // Empty. + } + startPositions.push(startPosition) + if (!current._tokenizer) { + stream = context.sliceStream(current) + if (!current.next) { + stream.push(null) + } + if (previous) { + tokenizer.defineSkip(current.start) + } + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true + } + tokenizer.write(stream) + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = undefined + } + } + + // Unravel the next token. + previous = current + current = current.next + } + + // Now, loop back through all events (and linked tokens), to figure out which + // parts belong where. + current = token + while (++index < childEvents.length) { + if ( + // Find a void token that includes a break. + childEvents[index][0] === 'exit' && + childEvents[index - 1][0] === 'enter' && + childEvents[index][1].type === childEvents[index - 1][1].type && + childEvents[index][1].start.line !== childEvents[index][1].end.line + ) { + start = index + 1 + breaks.push(start) + // Help GC. + current._tokenizer = undefined + current.previous = undefined + current = current.next + } + } + + // Help GC. + tokenizer.events = [] + + // If there’s one more token (which is the cases for lines that end in an + // EOF), that’s perfect: the last point we found starts it. + // If there isn’t then make sure any remaining content is added to it. + if (current) { + // Help GC. + current._tokenizer = undefined + current.previous = undefined + } else { + breaks.pop() + } + + // Now splice the events from the subtokenizer into the current events, + // moving back to front so that splice indices aren’t affected. + index = breaks.length + while (index--) { + const slice = childEvents.slice(breaks[index], breaks[index + 1]) + const start = startPositions.pop() + jumps.unshift([start, start + slice.length - 1]) + micromark_util_chunked_splice(events, start, 2, slice) + } + index = -1 + while (++index < jumps.length) { + gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] + adjust += jumps[index][1] - jumps[index][0] - 1 + } + return gaps +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** + * No name because it must not be turned off. + * @type {Construct} + */ +const content_content = { + tokenize: tokenizeContent, + resolve: resolveContent +} + +/** @type {Construct} */ +const continuationConstruct = { + tokenize: tokenizeContinuation, + partial: true +} + +/** + * Content is transparent: it’s parsed right now. That way, definitions are also + * parsed right now: before text in paragraphs (specifically, media) are parsed. + * + * @type {Resolver} + */ +function resolveContent(events) { + subtokenize(events) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContent(effects, ok) { + /** @type {Token | undefined} */ + let previous + return chunkStart + + /** + * Before a content chunk. + * + * ```markdown + * > | abc + * ^ + * ``` + * + * @type {State} + */ + function chunkStart(code) { + effects.enter('content') + previous = effects.enter('chunkContent', { + contentType: 'content' + }) + return chunkInside(code) + } + + /** + * In a content chunk. + * + * ```markdown + * > | abc + * ^^^ + * ``` + * + * @type {State} + */ + function chunkInside(code) { + if (code === null) { + return contentEnd(code) + } + + // To do: in `markdown-rs`, each line is parsed on its own, and everything + // is stitched together resolving. + if (markdownLineEnding(code)) { + return effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code) + } + + // Data. + effects.consume(code) + return chunkInside + } + + /** + * + * + * @type {State} + */ + function contentEnd(code) { + effects.exit('chunkContent') + effects.exit('content') + return ok(code) + } + + /** + * + * + * @type {State} + */ + function contentContinue(code) { + effects.consume(code) + effects.exit('chunkContent') + previous.next = effects.enter('chunkContent', { + contentType: 'content', + previous + }) + previous = previous.next + return chunkInside + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContinuation(effects, ok, nok) { + const self = this + return startLookahead + + /** + * + * + * @type {State} + */ + function startLookahead(code) { + effects.exit('chunkContent') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, prefixed, 'linePrefix') + } + + /** + * + * + * @type {State} + */ + function prefixed(code) { + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + + // Always populated by defaults. + + const tail = self.events[self.events.length - 1] + if ( + !self.parser.constructs.disable.null.includes('codeIndented') && + tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ) { + return ok(code) + } + return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + + +/** @type {InitialConstruct} */ +const flow = { + tokenize: initializeFlow +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeFlow(effects) { + const self = this + const initial = effects.attempt( + // Try to parse a blank line. + blankLine, + atBlankEnding, + // Try to parse initial flow (essentially, only code). + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content_content, afterConstruct) + ), + 'linePrefix' + ) + ) + ) + return initial + + /** @type {State} */ + function atBlankEnding(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEndingBlank') + effects.consume(code) + effects.exit('lineEndingBlank') + self.currentConstruct = undefined + return initial + } + + /** @type {State} */ + function afterConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + self.currentConstruct = undefined + return initial + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +const resolver = { + resolveAll: createResolver() +} +const string = initializeFactory('string') +const text_text = initializeFactory('text') + +/** + * @param {'string' | 'text'} field + * @returns {InitialConstruct} + */ +function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: createResolver( + field === 'text' ? resolveAllLineSuffixes : undefined + ) + } + + /** + * @this {TokenizeContext} + * @type {Initializer} + */ + function initializeText(effects) { + const self = this + const constructs = this.parser.constructs[field] + const text = effects.attempt(constructs, start, notText) + return start + + /** @type {State} */ + function start(code) { + return atBreak(code) ? text(code) : notText(code) + } + + /** @type {State} */ + function notText(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('data') + effects.consume(code) + return data + } + + /** @type {State} */ + function data(code) { + if (atBreak(code)) { + effects.exit('data') + return text(code) + } + + // Data. + effects.consume(code) + return data + } + + /** + * @param {Code} code + * @returns {boolean} + */ + function atBreak(code) { + if (code === null) { + return true + } + const list = constructs[code] + let index = -1 + if (list) { + // Always populated by defaults. + + while (++index < list.length) { + const item = list[index] + if (!item.previous || item.previous.call(self, self.previous)) { + return true + } + } + } + return false + } + } +} + +/** + * @param {Resolver | undefined} [extraResolver] + * @returns {Resolver} + */ +function createResolver(extraResolver) { + return resolveAllText + + /** @type {Resolver} */ + function resolveAllText(events, context) { + let index = -1 + /** @type {number | undefined} */ + let enter + + // A rather boring computation (to merge adjacent `data` events) which + // improves mm performance by 29%. + while (++index <= events.length) { + if (enter === undefined) { + if (events[index] && events[index][1].type === 'data') { + enter = index + index++ + } + } else if (!events[index] || events[index][1].type !== 'data') { + // Don’t do anything if there is one data token. + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + index = enter + 2 + } + enter = undefined + } + } + return extraResolver ? extraResolver(events, context) : events + } +} + +/** + * A rather ugly set of instructions which again looks at chunks in the input + * stream. + * The reason to do this here is that it is *much* faster to parse in reverse. + * And that we can’t hook into `null` to split the line suffix before an EOF. + * To do: figure out if we can make this into a clean utility, or even in core. + * As it will be useful for GFMs literal autolink extension (and maybe even + * tables?) + * + * @type {Resolver} + */ +function resolveAllLineSuffixes(events, context) { + let eventIndex = 0 // Skip first. + + while (++eventIndex <= events.length) { + if ( + (eventIndex === events.length || + events[eventIndex][1].type === 'lineEnding') && + events[eventIndex - 1][1].type === 'data' + ) { + const data = events[eventIndex - 1][1] + const chunks = context.sliceStream(data) + let index = chunks.length + let bufferIndex = -1 + let size = 0 + /** @type {boolean | undefined} */ + let tabs + while (index--) { + const chunk = chunks[index] + if (typeof chunk === 'string') { + bufferIndex = chunk.length + while (chunk.charCodeAt(bufferIndex - 1) === 32) { + size++ + bufferIndex-- + } + if (bufferIndex) break + bufferIndex = -1 + } + // Number + else if (chunk === -2) { + tabs = true + size++ + } else if (chunk === -1) { + // Empty + } else { + // Replacement character, exit. + index++ + break + } + } + if (size) { + const token = { + type: + eventIndex === events.length || tabs || size < 2 + ? 'lineSuffix' + : 'hardBreakTrailing', + start: { + line: data.end.line, + column: data.end.column - size, + offset: data.end.offset - size, + _index: data.start._index + index, + _bufferIndex: index + ? bufferIndex + : data.start._bufferIndex + bufferIndex + }, + end: Object.assign({}, data.end) + } + data.end = Object.assign({}, token.start) + if (data.start.offset === data.end.offset) { + Object.assign(data, token) + } else { + events.splice( + eventIndex, + 0, + ['enter', token, context], + ['exit', token, context] + ) + eventIndex += 2 + } + } + eventIndex++ + } + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js +/** + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * Call all `resolveAll`s. + * + * @param {Array<{resolveAll?: Resolver | undefined}>} constructs + * List of constructs, optionally with `resolveAll`s. + * @param {Array<Event>} events + * List of events. + * @param {TokenizeContext} context + * Context used by `tokenize`. + * @returns {Array<Event>} + * Changed events. + */ +function resolveAll(constructs, events, context) { + /** @type {Array<Resolver>} */ + const called = [] + let index = -1 + + while (++index < constructs.length) { + const resolve = constructs[index].resolveAll + + if (resolve && !called.includes(resolve)) { + events = resolve(events, context) + called.push(resolve) + } + } + + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenType} TokenType + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * @callback Restore + * @returns {void} + * + * @typedef Info + * @property {Restore} restore + * @property {number} from + * + * @callback ReturnHandle + * Handle a successful run. + * @param {Construct} construct + * @param {Info} info + * @returns {void} + */ + + + + +/** + * Create a tokenizer. + * Tokenizers deal with one type of data (e.g., containers, flow, text). + * The parser is the object dealing with it all. + * `initialize` works like other constructs, except that only its `tokenize` + * function is used, in which case it doesn’t receive an `ok` or `nok`. + * `from` can be given to set the point before the first character, although + * when further lines are indented, they must be set with `defineSkip`. + * + * @param {ParseContext} parser + * @param {InitialConstruct} initialize + * @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from] + * @returns {TokenizeContext} + */ +function createTokenizer(parser, initialize, from) { + /** @type {Point} */ + let point = Object.assign( + from + ? Object.assign({}, from) + : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ) + /** @type {Record<string, number>} */ + const columnStart = {} + /** @type {Array<Construct>} */ + const resolveAllConstructs = [] + /** @type {Array<Chunk>} */ + let chunks = [] + /** @type {Array<Token>} */ + let stack = [] + /** @type {boolean | undefined} */ + let consumed = true + + /** + * Tools used for tokenizing. + * + * @type {Effects} + */ + const effects = { + consume, + enter, + exit, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, { + interrupt: true + }) + } + + /** + * State and tools for resolving and serializing. + * + * @type {TokenizeContext} + */ + const context = { + previous: null, + code: null, + containerState: {}, + events: [], + parser, + sliceStream, + sliceSerialize, + now, + defineSkip, + write + } + + /** + * The state function. + * + * @type {State | void} + */ + let state = initialize.tokenize.call(context, effects) + + /** + * Track which character we expect to be consumed, to catch bugs. + * + * @type {Code} + */ + let expectedCode + if (initialize.resolveAll) { + resolveAllConstructs.push(initialize) + } + return context + + /** @type {TokenizeContext['write']} */ + function write(slice) { + chunks = push(chunks, slice) + main() + + // Exit if we’re not done, resolve might change stuff. + if (chunks[chunks.length - 1] !== null) { + return [] + } + addResult(initialize, 0) + + // Otherwise, resolve, and exit. + context.events = resolveAll(resolveAllConstructs, context.events, context) + return context.events + } + + // + // Tools. + // + + /** @type {TokenizeContext['sliceSerialize']} */ + function sliceSerialize(token, expandTabs) { + return serializeChunks(sliceStream(token), expandTabs) + } + + /** @type {TokenizeContext['sliceStream']} */ + function sliceStream(token) { + return sliceChunks(chunks, token) + } + + /** @type {TokenizeContext['now']} */ + function now() { + // This is a hot path, so we clone manually instead of `Object.assign({}, point)` + const {line, column, offset, _index, _bufferIndex} = point + return { + line, + column, + offset, + _index, + _bufferIndex + } + } + + /** @type {TokenizeContext['defineSkip']} */ + function defineSkip(value) { + columnStart[value.line] = value.column + accountForPotentialSkip() + } + + // + // State management. + // + + /** + * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by + * `consume`). + * Here is where we walk through the chunks, which either include strings of + * several characters, or numerical character codes. + * The reason to do this in a loop instead of a call is so the stack can + * drain. + * + * @returns {void} + */ + function main() { + /** @type {number} */ + let chunkIndex + while (point._index < chunks.length) { + const chunk = chunks[point._index] + + // If we’re in a buffer chunk, loop through it. + if (typeof chunk === 'string') { + chunkIndex = point._index + if (point._bufferIndex < 0) { + point._bufferIndex = 0 + } + while ( + point._index === chunkIndex && + point._bufferIndex < chunk.length + ) { + go(chunk.charCodeAt(point._bufferIndex)) + } + } else { + go(chunk) + } + } + } + + /** + * Deal with one code. + * + * @param {Code} code + * @returns {void} + */ + function go(code) { + consumed = undefined + expectedCode = code + state = state(code) + } + + /** @type {Effects['consume']} */ + function consume(code) { + if (markdownLineEnding(code)) { + point.line++ + point.column = 1 + point.offset += code === -3 ? 2 : 1 + accountForPotentialSkip() + } else if (code !== -1) { + point.column++ + point.offset++ + } + + // Not in a string chunk. + if (point._bufferIndex < 0) { + point._index++ + } else { + point._bufferIndex++ + + // At end of string chunk. + // @ts-expect-error Points w/ non-negative `_bufferIndex` reference + // strings. + if (point._bufferIndex === chunks[point._index].length) { + point._bufferIndex = -1 + point._index++ + } + } + + // Expose the previous character. + context.previous = code + + // Mark as consumed. + consumed = true + } + + /** @type {Effects['enter']} */ + function enter(type, fields) { + /** @type {Token} */ + // @ts-expect-error Patch instead of assign required fields to help GC. + const token = fields || {} + token.type = type + token.start = now() + context.events.push(['enter', token, context]) + stack.push(token) + return token + } + + /** @type {Effects['exit']} */ + function exit(type) { + const token = stack.pop() + token.end = now() + context.events.push(['exit', token, context]) + return token + } + + /** + * Use results. + * + * @type {ReturnHandle} + */ + function onsuccessfulconstruct(construct, info) { + addResult(construct, info.from) + } + + /** + * Discard results. + * + * @type {ReturnHandle} + */ + function onsuccessfulcheck(_, info) { + info.restore() + } + + /** + * Factory to attempt/check/interrupt. + * + * @param {ReturnHandle} onreturn + * @param {{interrupt?: boolean | undefined} | undefined} [fields] + */ + function constructFactory(onreturn, fields) { + return hook + + /** + * Handle either an object mapping codes to constructs, a list of + * constructs, or a single construct. + * + * @param {Array<Construct> | Construct | ConstructRecord} constructs + * @param {State} returnState + * @param {State | undefined} [bogusState] + * @returns {State} + */ + function hook(constructs, returnState, bogusState) { + /** @type {Array<Construct>} */ + let listOfConstructs + /** @type {number} */ + let constructIndex + /** @type {Construct} */ + let currentConstruct + /** @type {Info} */ + let info + return Array.isArray(constructs) /* c8 ignore next 1 */ + ? handleListOfConstructs(constructs) + : 'tokenize' in constructs + ? // @ts-expect-error Looks like a construct. + handleListOfConstructs([constructs]) + : handleMapOfConstructs(constructs) + + /** + * Handle a list of construct. + * + * @param {ConstructRecord} map + * @returns {State} + */ + function handleMapOfConstructs(map) { + return start + + /** @type {State} */ + function start(code) { + const def = code !== null && map[code] + const all = code !== null && map.null + const list = [ + // To do: add more extension tests. + /* c8 ignore next 2 */ + ...(Array.isArray(def) ? def : def ? [def] : []), + ...(Array.isArray(all) ? all : all ? [all] : []) + ] + return handleListOfConstructs(list)(code) + } + } + + /** + * Handle a list of construct. + * + * @param {Array<Construct>} list + * @returns {State} + */ + function handleListOfConstructs(list) { + listOfConstructs = list + constructIndex = 0 + if (list.length === 0) { + return bogusState + } + return handleConstruct(list[constructIndex]) + } + + /** + * Handle a single construct. + * + * @param {Construct} construct + * @returns {State} + */ + function handleConstruct(construct) { + return start + + /** @type {State} */ + function start(code) { + // To do: not needed to store if there is no bogus state, probably? + // Currently doesn’t work because `inspect` in document does a check + // w/o a bogus, which doesn’t make sense. But it does seem to help perf + // by not storing. + info = store() + currentConstruct = construct + if (!construct.partial) { + context.currentConstruct = construct + } + + // Always populated by defaults. + + if ( + construct.name && + context.parser.constructs.disable.null.includes(construct.name) + ) { + return nok(code) + } + return construct.tokenize.call( + // If we do have fields, create an object w/ `context` as its + // prototype. + // This allows a “live binding”, which is needed for `interrupt`. + fields ? Object.assign(Object.create(context), fields) : context, + effects, + ok, + nok + )(code) + } + } + + /** @type {State} */ + function ok(code) { + consumed = true + onreturn(currentConstruct, info) + return returnState + } + + /** @type {State} */ + function nok(code) { + consumed = true + info.restore() + if (++constructIndex < listOfConstructs.length) { + return handleConstruct(listOfConstructs[constructIndex]) + } + return bogusState + } + } + } + + /** + * @param {Construct} construct + * @param {number} from + * @returns {void} + */ + function addResult(construct, from) { + if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { + resolveAllConstructs.push(construct) + } + if (construct.resolve) { + splice( + context.events, + from, + context.events.length - from, + construct.resolve(context.events.slice(from), context) + ) + } + if (construct.resolveTo) { + context.events = construct.resolveTo(context.events, context) + } + } + + /** + * Store state. + * + * @returns {Info} + */ + function store() { + const startPoint = now() + const startPrevious = context.previous + const startCurrentConstruct = context.currentConstruct + const startEventsIndex = context.events.length + const startStack = Array.from(stack) + return { + restore, + from: startEventsIndex + } + + /** + * Restore state. + * + * @returns {void} + */ + function restore() { + point = startPoint + context.previous = startPrevious + context.currentConstruct = startCurrentConstruct + context.events.length = startEventsIndex + stack = startStack + accountForPotentialSkip() + } + } + + /** + * Move the current point a bit forward in the line when it’s on a column + * skip. + * + * @returns {void} + */ + function accountForPotentialSkip() { + if (point.line in columnStart && point.column < 2) { + point.column = columnStart[point.line] + point.offset += columnStart[point.line] - 1 + } + } +} + +/** + * Get the chunks from a slice of chunks in the range of a token. + * + * @param {Array<Chunk>} chunks + * @param {Pick<Token, 'end' | 'start'>} token + * @returns {Array<Chunk>} + */ +function sliceChunks(chunks, token) { + const startIndex = token.start._index + const startBufferIndex = token.start._bufferIndex + const endIndex = token.end._index + const endBufferIndex = token.end._bufferIndex + /** @type {Array<Chunk>} */ + let view + if (startIndex === endIndex) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] + } else { + view = chunks.slice(startIndex, endIndex) + if (startBufferIndex > -1) { + const head = view[0] + if (typeof head === 'string') { + view[0] = head.slice(startBufferIndex) + } else { + view.shift() + } + } + if (endBufferIndex > 0) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view.push(chunks[endIndex].slice(0, endBufferIndex)) + } + } + return view +} + +/** + * Get the string value of a slice of chunks. + * + * @param {Array<Chunk>} chunks + * @param {boolean | undefined} [expandTabs=false] + * @returns {string} + */ +function serializeChunks(chunks, expandTabs) { + let index = -1 + /** @type {Array<string>} */ + const result = [] + /** @type {boolean | undefined} */ + let atTab + while (++index < chunks.length) { + const chunk = chunks[index] + /** @type {string} */ + let value + if (typeof chunk === 'string') { + value = chunk + } else + switch (chunk) { + case -5: { + value = '\r' + break + } + case -4: { + value = '\n' + break + } + case -3: { + value = '\r' + '\n' + break + } + case -2: { + value = expandTabs ? ' ' : '\t' + break + } + case -1: { + if (!expandTabs && atTab) continue + value = ' ' + break + } + default: { + // Currently only replacement character. + value = String.fromCharCode(chunk) + } + } + atTab = chunk === -2 + result.push(value) + } + return result.join('') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const thematicBreak = { + name: 'thematicBreak', + tokenize: tokenizeThematicBreak +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeThematicBreak(effects, ok, nok) { + let size = 0 + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of thematic break. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('thematicBreak') + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * After optional whitespace, at marker. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + marker = code + return atBreak(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.enter('thematicBreakSequence') + return sequence(code) + } + if (size >= 3 && (code === null || markdownLineEnding(code))) { + effects.exit('thematicBreak') + return ok(code) + } + return nok(code) + } + + /** + * In sequence. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function sequence(code) { + if (code === marker) { + effects.consume(code) + size++ + return sequence + } + effects.exit('thematicBreakSequence') + return markdownSpace(code) + ? factorySpace(effects, atBreak, 'whitespace')(code) + : atBreak(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + +/** @type {Construct} */ +const list = { + name: 'list', + tokenize: tokenizeListStart, + continuation: { + tokenize: tokenizeListContinuation + }, + exit: tokenizeListEnd +} + +/** @type {Construct} */ +const listItemPrefixWhitespaceConstruct = { + tokenize: tokenizeListItemPrefixWhitespace, + partial: true +} + +/** @type {Construct} */ +const indentConstruct = { + tokenize: tokenizeIndent, + partial: true +} + +// To do: `markdown-rs` parses list items on their own and later stitches them +// together. + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListStart(effects, ok, nok) { + const self = this + const tail = self.events[self.events.length - 1] + let initialSize = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + let size = 0 + return start + + /** @type {State} */ + function start(code) { + const kind = + self.containerState.type || + (code === 42 || code === 43 || code === 45 + ? 'listUnordered' + : 'listOrdered') + if ( + kind === 'listUnordered' + ? !self.containerState.marker || code === self.containerState.marker + : asciiDigit(code) + ) { + if (!self.containerState.type) { + self.containerState.type = kind + effects.enter(kind, { + _container: true + }) + } + if (kind === 'listUnordered') { + effects.enter('listItemPrefix') + return code === 42 || code === 45 + ? effects.check(thematicBreak, nok, atMarker)(code) + : atMarker(code) + } + if (!self.interrupt || code === 49) { + effects.enter('listItemPrefix') + effects.enter('listItemValue') + return inside(code) + } + } + return nok(code) + } + + /** @type {State} */ + function inside(code) { + if (asciiDigit(code) && ++size < 10) { + effects.consume(code) + return inside + } + if ( + (!self.interrupt || size < 2) && + (self.containerState.marker + ? code === self.containerState.marker + : code === 41 || code === 46) + ) { + effects.exit('listItemValue') + return atMarker(code) + } + return nok(code) + } + + /** + * @type {State} + **/ + function atMarker(code) { + effects.enter('listItemMarker') + effects.consume(code) + effects.exit('listItemMarker') + self.containerState.marker = self.containerState.marker || code + return effects.check( + blankLine, + // Can’t be empty when interrupting. + self.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ) + } + + /** @type {State} */ + function onBlank(code) { + self.containerState.initialBlankLine = true + initialSize++ + return endOfPrefix(code) + } + + /** @type {State} */ + function otherPrefix(code) { + if (markdownSpace(code)) { + effects.enter('listItemPrefixWhitespace') + effects.consume(code) + effects.exit('listItemPrefixWhitespace') + return endOfPrefix + } + return nok(code) + } + + /** @type {State} */ + function endOfPrefix(code) { + self.containerState.size = + initialSize + + self.sliceSerialize(effects.exit('listItemPrefix'), true).length + return ok(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListContinuation(effects, ok, nok) { + const self = this + self.containerState._closeFlow = undefined + return effects.check(blankLine, onBlank, notBlank) + + /** @type {State} */ + function onBlank(code) { + self.containerState.furtherBlankLines = + self.containerState.furtherBlankLines || + self.containerState.initialBlankLine + + // We have a blank line. + // Still, try to consume at most the items size. + return factorySpace( + effects, + ok, + 'listItemIndent', + self.containerState.size + 1 + )(code) + } + + /** @type {State} */ + function notBlank(code) { + if (self.containerState.furtherBlankLines || !markdownSpace(code)) { + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return notInCurrentItem(code) + } + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) + } + + /** @type {State} */ + function notInCurrentItem(code) { + // While we do continue, we signal that the flow should be closed. + self.containerState._closeFlow = true + // As we’re closing flow, we’re no longer interrupting. + self.interrupt = undefined + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(list, ok, nok), + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeIndent(effects, ok, nok) { + const self = this + return factorySpace( + effects, + afterPrefix, + 'listItemIndent', + self.containerState.size + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'listItemIndent' && + tail[2].sliceSerialize(tail[1], true).length === self.containerState.size + ? ok(code) + : nok(code) + } +} + +/** + * @type {Exiter} + * @this {TokenizeContext} + */ +function tokenizeListEnd(effects) { + effects.exit(this.containerState.type) +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListItemPrefixWhitespace(effects, ok, nok) { + const self = this + + // Always populated by defaults. + + return factorySpace( + effects, + afterPrefix, + 'listItemPrefixWhitespace', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return !markdownSpace(code) && + tail && + tail[1].type === 'listItemPrefixWhitespace' + ? ok(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blockQuote = { + name: 'blockQuote', + tokenize: tokenizeBlockQuoteStart, + continuation: { + tokenize: tokenizeBlockQuoteContinuation + }, + exit +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteStart(effects, ok, nok) { + const self = this + return start + + /** + * Start of block quote. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 62) { + const state = self.containerState + if (!state.open) { + effects.enter('blockQuote', { + _container: true + }) + state.open = true + } + effects.enter('blockQuotePrefix') + effects.enter('blockQuoteMarker') + effects.consume(code) + effects.exit('blockQuoteMarker') + return after + } + return nok(code) + } + + /** + * After `>`, before optional whitespace. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownSpace(code)) { + effects.enter('blockQuotePrefixWhitespace') + effects.consume(code) + effects.exit('blockQuotePrefixWhitespace') + effects.exit('blockQuotePrefix') + return ok + } + effects.exit('blockQuotePrefix') + return ok(code) + } +} + +/** + * Start of block quote continuation. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteContinuation(effects, ok, nok) { + const self = this + return contStart + + /** + * Start of block quote continuation. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contStart(code) { + if (markdownSpace(code)) { + // Always populated by defaults. + + return factorySpace( + effects, + contBefore, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } + return contBefore(code) + } + + /** + * At `>`, after optional whitespace. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contBefore(code) { + return effects.attempt(blockQuote, ok, nok)(code) + } +} + +/** @type {Exiter} */ +function exit(effects) { + effects.exit('blockQuote') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse destinations. + * + * ###### Examples + * + * ```markdown + * <a> + * <a\>b> + * <a b> + * <a)> + * a + * a\)b + * a(b)c + * a(b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type for whole (`<a>` or `b`). + * @param {TokenType} literalType + * Type when enclosed (`<a>`). + * @param {TokenType} literalMarkerType + * Type for enclosing (`<` and `>`). + * @param {TokenType} rawType + * Type when not enclosed (`b`). + * @param {TokenType} stringType + * Type for the value (`a` or `b`). + * @param {number | undefined} [max=Infinity] + * Depth of nested parens (inclusive). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryDestination( + effects, + ok, + nok, + type, + literalType, + literalMarkerType, + rawType, + stringType, + max +) { + const limit = max || Number.POSITIVE_INFINITY + let balance = 0 + return start + + /** + * Start of destination. + * + * ```markdown + * > | <aa> + * ^ + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 60) { + effects.enter(type) + effects.enter(literalType) + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + return enclosedBefore + } + + // ASCII control, space, closing paren. + if (code === null || code === 32 || code === 41 || asciiControl(code)) { + return nok(code) + } + effects.enter(type) + effects.enter(rawType) + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return raw(code) + } + + /** + * After `<`, at an enclosed destination. + * + * ```markdown + * > | <aa> + * ^ + * ``` + * + * @type {State} + */ + function enclosedBefore(code) { + if (code === 62) { + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + effects.exit(literalType) + effects.exit(type) + return ok + } + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return enclosed(code) + } + + /** + * In enclosed destination. + * + * ```markdown + * > | <aa> + * ^ + * ``` + * + * @type {State} + */ + function enclosed(code) { + if (code === 62) { + effects.exit('chunkString') + effects.exit(stringType) + return enclosedBefore(code) + } + if (code === null || code === 60 || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? enclosedEscape : enclosed + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | <a\*a> + * ^ + * ``` + * + * @type {State} + */ + function enclosedEscape(code) { + if (code === 60 || code === 62 || code === 92) { + effects.consume(code) + return enclosed + } + return enclosed(code) + } + + /** + * In raw destination. + * + * ```markdown + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function raw(code) { + if ( + !balance && + (code === null || code === 41 || markdownLineEndingOrSpace(code)) + ) { + effects.exit('chunkString') + effects.exit(stringType) + effects.exit(rawType) + effects.exit(type) + return ok(code) + } + if (balance < limit && code === 40) { + effects.consume(code) + balance++ + return raw + } + if (code === 41) { + effects.consume(code) + balance-- + return raw + } + + // ASCII control (but *not* `\0`) and space and `(`. + // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it + // doesn’t. + if (code === null || code === 32 || code === 40 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? rawEscape : raw + } + + /** + * After `\`, at special character. + * + * ```markdown + * > | a\*a + * ^ + * ``` + * + * @type {State} + */ + function rawEscape(code) { + if (code === 40 || code === 41 || code === 92) { + effects.consume(code) + return raw + } + return raw(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse labels. + * + * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. + * + * ###### Examples + * + * ```markdown + * [a] + * [a + * b] + * [a\]b] + * ``` + * + * @this {TokenizeContext} + * Tokenize context. + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole label (`[a]`). + * @param {TokenType} markerType + * Type for the markers (`[` and `]`). + * @param {TokenType} stringType + * Type for the identifier (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryLabel(effects, ok, nok, type, markerType, stringType) { + const self = this + let size = 0 + /** @type {boolean} */ + let seen + return start + + /** + * Start of label. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.enter(stringType) + return atBreak + } + + /** + * In label, at something, before something else. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if ( + size > 999 || + code === null || + code === 91 || + (code === 93 && !seen) || + // To do: remove in the future once we’ve switched from + // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + // which doesn’t need this. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + (code === 94 && + !size && + '_hiddenFootnoteSupport' in self.parser.constructs) + ) { + return nok(code) + } + if (code === 93) { + effects.exit(stringType) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + + // To do: indent? Link chunks and EOLs together? + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return atBreak + } + effects.enter('chunkString', { + contentType: 'string' + }) + return labelInside(code) + } + + /** + * In label, in text. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function labelInside(code) { + if ( + code === null || + code === 91 || + code === 93 || + markdownLineEnding(code) || + size++ > 999 + ) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + if (!seen) seen = !markdownSpace(code) + return code === 92 ? labelEscape : labelInside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | [a\*a] + * ^ + * ``` + * + * @type {State} + */ + function labelEscape(code) { + if (code === 91 || code === 92 || code === 93) { + effects.consume(code) + size++ + return labelInside + } + return labelInside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +/** + * Parse titles. + * + * ###### Examples + * + * ```markdown + * "a" + * 'b' + * (c) + * "a + * b" + * 'a + * b' + * (a\)b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole title (`"a"`, `'b'`, `(c)`). + * @param {TokenType} markerType + * Type for the markers (`"`, `'`, `(`, and `)`). + * @param {TokenType} stringType + * Type for the value (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryTitle(effects, ok, nok, type, markerType, stringType) { + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of title. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 34 || code === 39 || code === 40) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + marker = code === 40 ? 41 : code + return begin + } + return nok(code) + } + + /** + * After opening marker. + * + * This is also used at the closing marker. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function begin(code) { + if (code === marker) { + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + effects.enter(stringType) + return atBreak(code) + } + + /** + * At something, before something else. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.exit(stringType) + return begin(marker) + } + if (code === null) { + return nok(code) + } + + // Note: blank lines can’t exist in content. + if (markdownLineEnding(code)) { + // To do: use `space_or_tab_eol_with_options`, connect. + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, atBreak, 'linePrefix') + } + effects.enter('chunkString', { + contentType: 'string' + }) + return inside(code) + } + + /** + * + * + * @type {State} + */ + function inside(code) { + if (code === marker || code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + return code === 92 ? escape : inside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | "a\*b" + * ^ + * ``` + * + * @type {State} + */ + function escape(code) { + if (code === marker || code === 92) { + effects.consume(code) + return inside + } + return inside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + */ + + + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * line endings or spaces in markdown are often optional, in which case this + * factory can be used and `ok` will be switched to whether spaces were found + * or not + * * one line ending or space can be detected with + * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @returns + * Start state. + */ +function factoryWhitespace(effects, ok) { + /** @type {boolean} */ + let seen + return start + + /** @type {State} */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + seen = true + return start + } + if (markdownSpace(code)) { + return factorySpace( + effects, + start, + seen ? 'linePrefix' : 'lineSuffix' + )(code) + } + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js +/** + * Normalize an identifier (as found in references, definitions). + * + * Collapses markdown whitespace, trim, and then lower- and uppercase. + * + * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their + * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different + * uppercase character (U+0398 (`Θ`)). + * So, to get a canonical form, we perform both lower- and uppercase. + * + * Using uppercase last makes sure keys will never interact with default + * prototypal values (such as `constructor`): nothing in the prototype of + * `Object` is uppercase. + * + * @param {string} value + * Identifier to normalize. + * @returns {string} + * Normalized identifier. + */ +function normalizeIdentifier(value) { + return ( + value + // Collapse markdown whitespace. + .replace(/[\t\n\r ]+/g, ' ') + // Trim. + .replace(/^ | $/g, '') + // Some characters are considered “uppercase”, but if their lowercase + // counterpart is uppercased will result in a different uppercase + // character. + // Hence, to get that form, we perform both lower- and uppercase. + // Upper case makes sure keys will not interact with default prototypal + // methods: no method is uppercase. + .toLowerCase() + .toUpperCase() + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + +/** @type {Construct} */ +const definition = { + name: 'definition', + tokenize: tokenizeDefinition +} + +/** @type {Construct} */ +const titleBefore = { + tokenize: tokenizeTitleBefore, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeDefinition(effects, ok, nok) { + const self = this + /** @type {string} */ + let identifier + return start + + /** + * At start of a definition. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Do not interrupt paragraphs (but do follow definitions). + // To do: do `interrupt` the way `markdown-rs` does. + // To do: parse whitespace the way `markdown-rs` does. + effects.enter('definition') + return before(code) + } + + /** + * After optional whitespace, at `[`. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + // To do: parse whitespace the way `markdown-rs` does. + + return factoryLabel.call( + self, + effects, + labelAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionLabel', + 'definitionLabelMarker', + 'definitionLabelString' + )(code) + } + + /** + * After label. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function labelAfter(code) { + identifier = normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + if (code === 58) { + effects.enter('definitionMarker') + effects.consume(code) + effects.exit('definitionMarker') + return markerAfter + } + return nok(code) + } + + /** + * After marker. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function markerAfter(code) { + // Note: whitespace is optional. + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, destinationBefore)(code) + : destinationBefore(code) + } + + /** + * Before destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationBefore(code) { + return factoryDestination( + effects, + destinationAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionDestination', + 'definitionDestinationLiteral', + 'definitionDestinationLiteralMarker', + 'definitionDestinationRaw', + 'definitionDestinationString' + )(code) + } + + /** + * After destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationAfter(code) { + return effects.attempt(titleBefore, after, after)(code) + } + + /** + * After definition. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return markdownSpace(code) + ? factorySpace(effects, afterWhitespace, 'whitespace')(code) + : afterWhitespace(code) + } + + /** + * After definition, after optional whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function afterWhitespace(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('definition') + + // Note: we don’t care about uniqueness. + // It’s likely that that doesn’t happen very frequently. + // It is more likely that it wastes precious time. + self.parser.defined.push(identifier) + + // To do: `markdown-rs` interrupt. + // // You’d be interrupting. + // tokenizer.interrupt = true + return ok(code) + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeTitleBefore(effects, ok, nok) { + return titleBefore + + /** + * After destination, at whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, beforeMarker)(code) + : nok(code) + } + + /** + * At title. + * + * ```markdown + * | [a]: b + * > | "c" + * ^ + * ``` + * + * @type {State} + */ + function beforeMarker(code) { + return factoryTitle( + effects, + titleAfter, + nok, + 'definitionTitle', + 'definitionTitleMarker', + 'definitionTitleString' + )(code) + } + + /** + * After title. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfter(code) { + return markdownSpace(code) + ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) + : titleAfterOptionalWhitespace(code) + } + + /** + * After title, after optional whitespace. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfterOptionalWhitespace(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const codeIndented = { + name: 'codeIndented', + tokenize: tokenizeCodeIndented +} + +/** @type {Construct} */ +const furtherStart = { + tokenize: tokenizeFurtherStart, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeIndented(effects, ok, nok) { + const self = this + return start + + /** + * Start of code (indented). + * + * > **Parsing note**: it is not needed to check if this first line is a + * > filled line (that it has a non-whitespace character), because blank lines + * > are parsed already, so we never run into that. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: manually check if interrupting like `markdown-rs`. + + effects.enter('codeIndented') + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? atBreak(code) + : nok(code) + } + + /** + * At a break. + * + * ```markdown + * > | aaa + * ^ ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === null) { + return after(code) + } + if (markdownLineEnding(code)) { + return effects.attempt(furtherStart, atBreak, after)(code) + } + effects.enter('codeFlowValue') + return inside(code) + } + + /** + * In code content. + * + * ```markdown + * > | aaa + * ^^^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return atBreak(code) + } + effects.consume(code) + return inside + } + + /** @type {State} */ + function after(code) { + effects.exit('codeIndented') + // To do: allow interrupting like `markdown-rs`. + // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeFurtherStart(effects, ok, nok) { + const self = this + return furtherStart + + /** + * At eol, trying to parse another indent. + * + * ```markdown + * > | aaa + * ^ + * | bbb + * ``` + * + * @type {State} + */ + function furtherStart(code) { + // To do: improve `lazy` / `pierce` handling. + // If this is a lazy line, it can’t be code. + if (self.parser.lazy[self.now().line]) { + return nok(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return furtherStart + } + + // To do: the code here in `micromark-js` is a bit different from + // `markdown-rs` because there it can attempt spaces. + // We can’t yet. + // + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? ok(code) + : markdownLineEnding(code) + ? furtherStart(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const headingAtx = { + name: 'headingAtx', + tokenize: tokenizeHeadingAtx, + resolve: resolveHeadingAtx +} + +/** @type {Resolver} */ +function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2 + let contentStart = 3 + /** @type {Token} */ + let content + /** @type {Token} */ + let text + + // Prefix whitespace, part of the opening. + if (events[contentStart][1].type === 'whitespace') { + contentStart += 2 + } + + // Suffix whitespace, part of the closing. + if ( + contentEnd - 2 > contentStart && + events[contentEnd][1].type === 'whitespace' + ) { + contentEnd -= 2 + } + if ( + events[contentEnd][1].type === 'atxHeadingSequence' && + (contentStart === contentEnd - 1 || + (contentEnd - 4 > contentStart && + events[contentEnd - 2][1].type === 'whitespace')) + ) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 + } + if (contentEnd > contentStart) { + content = { + type: 'atxHeadingText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end + } + text = { + type: 'chunkText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + contentType: 'text' + } + splice(events, contentStart, contentEnd - contentStart + 1, [ + ['enter', content, context], + ['enter', text, context], + ['exit', text, context], + ['exit', content, context] + ]) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHeadingAtx(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of a heading (atx). + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + effects.enter('atxHeading') + return before(code) + } + + /** + * After optional whitespace, at `#`. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('atxHeadingSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 35 && size++ < 6) { + effects.consume(code) + return sequenceOpen + } + + // Always at least one `#`. + if (code === null || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingSequence') + return atBreak(code) + } + return nok(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === 35) { + effects.enter('atxHeadingSequence') + return sequenceFurther(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('atxHeading') + // To do: interrupt like `markdown-rs`. + // // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } + if (markdownSpace(code)) { + return factorySpace(effects, atBreak, 'whitespace')(code) + } + + // To do: generate `data` tokens, add the `text` token later. + // Needs edit map, see: `markdown.rs`. + effects.enter('atxHeadingText') + return data(code) + } + + /** + * In further sequence (after whitespace). + * + * Could be normal “visible” hashes in the heading or a final sequence. + * + * ```markdown + * > | ## aa ## + * ^ + * ``` + * + * @type {State} + */ + function sequenceFurther(code) { + if (code === 35) { + effects.consume(code) + return sequenceFurther + } + effects.exit('atxHeadingSequence') + return atBreak(code) + } + + /** + * In text. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingText') + return atBreak(code) + } + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const setextUnderline = { + name: 'setextUnderline', + tokenize: tokenizeSetextUnderline, + resolveTo: resolveToSetextUnderline +} + +/** @type {Resolver} */ +function resolveToSetextUnderline(events, context) { + // To do: resolve like `markdown-rs`. + let index = events.length + /** @type {number | undefined} */ + let content + /** @type {number | undefined} */ + let text + /** @type {number | undefined} */ + let definition + + // Find the opening of the content. + // It’ll always exist: we don’t tokenize if it isn’t there. + while (index--) { + if (events[index][0] === 'enter') { + if (events[index][1].type === 'content') { + content = index + break + } + if (events[index][1].type === 'paragraph') { + text = index + } + } + // Exit + else { + if (events[index][1].type === 'content') { + // Remove the content end (if needed we’ll add it later) + events.splice(index, 1) + } + if (!definition && events[index][1].type === 'definition') { + definition = index + } + } + } + const heading = { + type: 'setextHeading', + start: Object.assign({}, events[text][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + + // Change the paragraph to setext heading text. + events[text][1].type = 'setextHeadingText' + + // If we have definitions in the content, we’ll keep on having content, + // but we need move it. + if (definition) { + events.splice(text, 0, ['enter', heading, context]) + events.splice(definition + 1, 0, ['exit', events[content][1], context]) + events[content][1].end = Object.assign({}, events[definition][1].end) + } else { + events[content][1] = heading + } + + // Add the heading exit at the end. + events.push(['exit', heading, context]) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeSetextUnderline(effects, ok, nok) { + const self = this + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * At start of heading (setext) underline. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + let index = self.events.length + /** @type {boolean | undefined} */ + let paragraph + // Find an opening. + while (index--) { + // Skip enter/exit of line ending, line prefix, and content. + // We can now either have a definition or a paragraph. + if ( + self.events[index][1].type !== 'lineEnding' && + self.events[index][1].type !== 'linePrefix' && + self.events[index][1].type !== 'content' + ) { + paragraph = self.events[index][1].type === 'paragraph' + break + } + } + + // To do: handle lazy/pierce like `markdown-rs`. + // To do: parse indent like `markdown-rs`. + if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { + effects.enter('setextHeadingLine') + marker = code + return before(code) + } + return nok(code) + } + + /** + * After optional whitespace, at `-` or `=`. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('setextHeadingLineSequence') + return inside(code) + } + + /** + * In sequence. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + effects.exit('setextHeadingLineSequence') + return markdownSpace(code) + ? factorySpace(effects, after, 'lineSuffix')(code) + : after(code) + } + + /** + * After sequence, after optional whitespace. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('setextHeadingLine') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js +/** + * List of lowercase HTML “block” tag names. + * + * The list, when parsing HTML (flow), results in more relaxed rules (condition + * 6). + * Because they are known blocks, the HTML-like syntax doesn’t have to be + * strictly parsed. + * For tag names not in this list, a more strict algorithm (condition 7) is used + * to detect whether the HTML-like syntax is seen as HTML (flow) or not. + * + * This is copied from: + * <https://spec.commonmark.org/0.30/#html-blocks>. + * + * > 👉 **Note**: `search` was added in `CommonMark@0.31`. + */ +const htmlBlockNames = [ + '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' +] + +/** + * List of lowercase HTML “raw” tag names. + * + * The list, when parsing HTML (flow), results in HTML that can include lines + * without exiting, until a closing tag also in this list is found (condition + * 1). + * + * This module is copied from: + * <https://spec.commonmark.org/0.30/#html-blocks>. + * + * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. + */ +const htmlRawNames = ['pre', 'script', 'style', 'textarea'] + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + +/** @type {Construct} */ +const htmlFlow = { + name: 'htmlFlow', + tokenize: tokenizeHtmlFlow, + resolveTo: resolveToHtmlFlow, + concrete: true +} + +/** @type {Construct} */ +const blankLineBefore = { + tokenize: tokenizeBlankLineBefore, + partial: true +} +const nonLazyContinuationStart = { + tokenize: tokenizeNonLazyContinuationStart, + partial: true +} + +/** @type {Resolver} */ +function resolveToHtmlFlow(events) { + let index = events.length + while (index--) { + if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { + break + } + } + if (index > 1 && events[index - 2][1].type === 'linePrefix') { + // Add the prefix start to the HTML token. + events[index][1].start = events[index - 2][1].start + // Add the prefix start to the HTML line token. + events[index + 1][1].start = events[index - 2][1].start + // Remove the line prefix. + events.splice(index - 2, 2) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlFlow(effects, ok, nok) { + const self = this + /** @type {number} */ + let marker + /** @type {boolean} */ + let closingTag + /** @type {string} */ + let buffer + /** @type {number} */ + let index + /** @type {Code} */ + let markerB + return start + + /** + * Start of HTML (flow). + * + * ```markdown + * > | <x /> + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * At `<`, after optional whitespace. + * + * ```markdown + * > | <x /> + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('htmlFlow') + effects.enter('htmlFlowData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | <x /> + * ^ + * > | <!doctype> + * ^ + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + closingTag = true + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + marker = 3 + // To do: + // tokenizer.concrete = true + // To do: use `markdown-rs` style interrupt. + // While we’re in an instruction instead of a declaration, we’re on a `?` + // right now, so we do need to search for `>`, similar to declarations. + return self.interrupt ? ok : continuationDeclarationInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After `<!`, at declaration, comment, or CDATA. + * + * ```markdown + * > | <!doctype> + * ^ + * > | <!--xxx--> + * ^ + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + marker = 2 + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + marker = 5 + index = 0 + return cdataOpenInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + marker = 4 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After `<!-`, inside a comment, at another `-`. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After `<![`, inside CDATA, expecting `CDATA[`. + * + * ```markdown + * > | <![CDATA[>&<]]> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + if (index === value.length) { + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return cdataOpenInside + } + return nok(code) + } + + /** + * After `</`, in closing tag, at tag name. + * + * ```markdown + * > | </x> + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * In tag name. + * + * ```markdown + * > | <ab> + * ^^ + * > | </ab> + * ^^ + * ``` + * + * @type {State} + */ + function tagName(code) { + if ( + code === null || + code === 47 || + code === 62 || + markdownLineEndingOrSpace(code) + ) { + const slash = code === 47 + const name = buffer.toLowerCase() + if (!slash && !closingTag && htmlRawNames.includes(name)) { + marker = 1 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + if (htmlBlockNames.includes(buffer.toLowerCase())) { + marker = 6 + if (slash) { + effects.consume(code) + return basicSelfClosing + } + + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + marker = 7 + // Do not support complete HTML when interrupting. + return self.interrupt && !self.parser.lazy[self.now().line] + ? nok(code) + : closingTag + ? completeClosingTagAfter(code) + : completeAttributeNameBefore(code) + } + + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + buffer += String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After closing slash of a basic tag name. + * + * ```markdown + * > | <div/> + * ^ + * ``` + * + * @type {State} + */ + function basicSelfClosing(code) { + if (code === 62) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return nok(code) + } + + /** + * After closing slash of a complete tag name. + * + * ```markdown + * > | <x/> + * ^ + * ``` + * + * @type {State} + */ + function completeClosingTagAfter(code) { + if (markdownSpace(code)) { + effects.consume(code) + return completeClosingTagAfter + } + return completeEnd(code) + } + + /** + * At an attribute name. + * + * At first, this state is used after a complete tag name, after whitespace, + * where it expects optional attributes or the end of the tag. + * It is also reused after attributes, when expecting more optional + * attributes. + * + * ```markdown + * > | <a /> + * ^ + * > | <a :b> + * ^ + * > | <a _b> + * ^ + * > | <a b> + * ^ + * > | <a > + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameBefore(code) { + if (code === 47) { + effects.consume(code) + return completeEnd + } + + // ASCII alphanumerical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return completeAttributeName + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameBefore + } + return completeEnd(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | <a :b> + * ^ + * > | <a _b> + * ^ + * > | <a b> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeName(code) { + // ASCII alphanumerical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return completeAttributeName + } + return completeAttributeNameAfter(code) + } + + /** + * After attribute name, at an optional initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | <a b> + * ^ + * > | <a b=c> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return completeAttributeValueBefore + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameAfter + } + return completeAttributeNameBefore(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | <a b=c> + * ^ + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + markerB = code + return completeAttributeValueQuoted + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeValueBefore + } + return completeAttributeValueUnquoted(code) + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | <a b="c"> + * ^ + * > | <a b='c'> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuoted(code) { + if (code === markerB) { + effects.consume(code) + markerB = null + return completeAttributeValueQuotedAfter + } + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return completeAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | <a b=c> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 47 || + code === 60 || + code === 61 || + code === 62 || + code === 96 || + markdownLineEndingOrSpace(code) + ) { + return completeAttributeNameAfter(code) + } + effects.consume(code) + return completeAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the + * end of the tag. + * + * ```markdown + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownSpace(code)) { + return completeAttributeNameBefore(code) + } + return nok(code) + } + + /** + * In certain circumstances of a complete tag where only an `>` is allowed. + * + * ```markdown + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeEnd(code) { + if (code === 62) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * After `>` in a complete tag. + * + * ```markdown + * > | <x> + * ^ + * ``` + * + * @type {State} + */ + function completeAfter(code) { + if (code === null || markdownLineEnding(code)) { + // // Do not form containers. + // tokenizer.concrete = true + return continuation(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * In continuation of any HTML kind. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function continuation(code) { + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationCommentInside + } + if (code === 60 && marker === 1) { + effects.consume(code) + return continuationRawTagOpen + } + if (code === 62 && marker === 4) { + effects.consume(code) + return continuationClose + } + if (code === 63 && marker === 3) { + effects.consume(code) + return continuationDeclarationInside + } + if (code === 93 && marker === 5) { + effects.consume(code) + return continuationCdataInside + } + if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { + effects.exit('htmlFlowData') + return effects.check( + blankLineBefore, + continuationAfter, + continuationStart + )(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationStart(code) + } + effects.consume(code) + return continuation + } + + /** + * In continuation, at eol. + * + * ```markdown + * > | <x> + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStart(code) { + return effects.check( + nonLazyContinuationStart, + continuationStartNonLazy, + continuationAfter + )(code) + } + + /** + * In continuation, at eol, before non-lazy content. + * + * ```markdown + * > | <x> + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStartNonLazy(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return continuationBefore + } + + /** + * In continuation, before non-lazy content. + * + * ```markdown + * | <x> + * > | asd + * ^ + * ``` + * + * @type {State} + */ + function continuationBefore(code) { + if (code === null || markdownLineEnding(code)) { + return continuationStart(code) + } + effects.enter('htmlFlowData') + return continuation(code) + } + + /** + * In comment continuation, after one `-`, expecting another. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function continuationCommentInside(code) { + if (code === 45) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In raw continuation, after `<`, at `/`. + * + * ```markdown + * > | <script>console.log(1)</script> + * ^ + * ``` + * + * @type {State} + */ + function continuationRawTagOpen(code) { + if (code === 47) { + effects.consume(code) + buffer = '' + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In raw continuation, after `</`, in a raw tag name. + * + * ```markdown + * > | <script>console.log(1)</script> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function continuationRawEndTag(code) { + if (code === 62) { + const name = buffer.toLowerCase() + if (htmlRawNames.includes(name)) { + effects.consume(code) + return continuationClose + } + return continuation(code) + } + if (asciiAlpha(code) && buffer.length < 8) { + effects.consume(code) + // @ts-expect-error: not null. + buffer += String.fromCharCode(code) + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In cdata continuation, after `]`, expecting `]>`. + * + * ```markdown + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationCdataInside(code) { + if (code === 93) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In declaration or instruction continuation, at `>`. + * + * ```markdown + * > | <!--> + * ^ + * > | <?> + * ^ + * > | <!q> + * ^ + * > | <!--ab--> + * ^ + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationDeclarationInside(code) { + if (code === 62) { + effects.consume(code) + return continuationClose + } + + // More dashes. + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In closed continuation: everything we get until the eol/eof is part of it. + * + * ```markdown + * > | <!doctype> + * ^ + * ``` + * + * @type {State} + */ + function continuationClose(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationAfter(code) + } + effects.consume(code) + return continuationClose + } + + /** + * Done. + * + * ```markdown + * > | <!doctype> + * ^ + * ``` + * + * @type {State} + */ + function continuationAfter(code) { + effects.exit('htmlFlow') + // // Feel free to interrupt. + // tokenizer.interrupt = false + // // No longer concrete. + // tokenizer.concrete = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuationStart(effects, ok, nok) { + const self = this + return start + + /** + * At eol, before continuation. + * + * ```markdown + * > | * ```js + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return after + } + return nok(code) + } + + /** + * A continuation. + * + * ```markdown + * | * ```js + * > | b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLineBefore(effects, ok, nok) { + return start + + /** + * Before eol, expecting blank line. + * + * ```markdown + * > | <div> + * ^ + * | + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return effects.attempt(blankLine, ok, nok) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const nonLazyContinuation = { + tokenize: tokenizeNonLazyContinuation, + partial: true +} + +/** @type {Construct} */ +const codeFenced = { + name: 'codeFenced', + tokenize: tokenizeCodeFenced, + concrete: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeFenced(effects, ok, nok) { + const self = this + /** @type {Construct} */ + const closeStart = { + tokenize: tokenizeCloseStart, + partial: true + } + let initialPrefix = 0 + let sizeOpen = 0 + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of code. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse whitespace like `markdown-rs`. + return beforeSequenceOpen(code) + } + + /** + * In opening fence, after prefix, at sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeSequenceOpen(code) { + const tail = self.events[self.events.length - 1] + initialPrefix = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + marker = code + effects.enter('codeFenced') + effects.enter('codeFencedFence') + effects.enter('codeFencedFenceSequence') + return sequenceOpen(code) + } + + /** + * In opening fence sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === marker) { + sizeOpen++ + effects.consume(code) + return sequenceOpen + } + if (sizeOpen < 3) { + return nok(code) + } + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, infoBefore, 'whitespace')(code) + : infoBefore(code) + } + + /** + * In opening fence, after the sequence (and optional whitespace), before info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function infoBefore(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return self.interrupt + ? ok(code) + : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFencedFenceInfo') + effects.enter('chunkString', { + contentType: 'string' + }) + return info(code) + } + + /** + * In info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function info(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return infoBefore(code) + } + if (markdownSpace(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return factorySpace(effects, metaBefore, 'whitespace')(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return info + } + + /** + * In opening fence, after info and whitespace, before meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function metaBefore(code) { + if (code === null || markdownLineEnding(code)) { + return infoBefore(code) + } + effects.enter('codeFencedFenceMeta') + effects.enter('chunkString', { + contentType: 'string' + }) + return meta(code) + } + + /** + * In meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function meta(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceMeta') + return infoBefore(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return meta + } + + /** + * At eol/eof in code, before a non-lazy closing fence or content. + * + * ```markdown + * > | ~~~js + * ^ + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function atNonLazyBreak(code) { + return effects.attempt(closeStart, after, contentBefore)(code) + } + + /** + * Before code content, not a closing fence, at eol. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return contentStart + } + + /** + * Before code content, not a closing fence. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentStart(code) { + return initialPrefix > 0 && markdownSpace(code) + ? factorySpace( + effects, + beforeContentChunk, + 'linePrefix', + initialPrefix + 1 + )(code) + : beforeContentChunk(code) + } + + /** + * Before code content, after optional prefix. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeContentChunk(code) { + if (code === null || markdownLineEnding(code)) { + return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFlowValue') + return contentChunk(code) + } + + /** + * In code content. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^^^^^^^^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentChunk(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return beforeContentChunk(code) + } + effects.consume(code) + return contentChunk + } + + /** + * After code. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + effects.exit('codeFenced') + return ok(code) + } + + /** + * @this {TokenizeContext} + * @type {Tokenizer} + */ + function tokenizeCloseStart(effects, ok, nok) { + let size = 0 + return startBefore + + /** + * + * + * @type {State} + */ + function startBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return start + } + + /** + * Before closing fence, at optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Always populated by defaults. + + // To do: `enter` here or in next state? + effects.enter('codeFencedFence') + return markdownSpace(code) + ? factorySpace( + effects, + beforeSequenceClose, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : beforeSequenceClose(code) + } + + /** + * In closing fence, after optional whitespace, at sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function beforeSequenceClose(code) { + if (code === marker) { + effects.enter('codeFencedFenceSequence') + return sequenceClose(code) + } + return nok(code) + } + + /** + * In closing fence sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + if (code === marker) { + size++ + effects.consume(code) + return sequenceClose + } + if (size >= sizeOpen) { + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) + : sequenceCloseAfter(code) + } + return nok(code) + } + + /** + * After closing fence sequence, after optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceCloseAfter(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return ok(code) + } + return nok(code) + } + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuation(effects, ok, nok) { + const self = this + return start + + /** + * + * + * @type {State} + */ + function start(code) { + if (code === null) { + return nok(code) + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineStart + } + + /** + * + * + * @type {State} + */ + function lineStart(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/character-entities/index.js +/** + * Map of named character references. + * + * @type {Record<string, string>} + */ +const characterEntities = { + AElig: 'Æ', + AMP: '&', + Aacute: 'Á', + Abreve: 'Ă', + Acirc: 'Â', + Acy: 'А', + Afr: '𝔄', + Agrave: 'À', + Alpha: 'Α', + Amacr: 'Ā', + And: '⩓', + Aogon: 'Ą', + Aopf: '𝔸', + ApplyFunction: '⁡', + Aring: 'Å', + Ascr: '𝒜', + Assign: '≔', + Atilde: 'Ã', + Auml: 'Ä', + Backslash: '∖', + Barv: '⫧', + Barwed: '⌆', + Bcy: 'Б', + Because: '∵', + Bernoullis: 'ℬ', + Beta: 'Β', + Bfr: '𝔅', + Bopf: '𝔹', + Breve: '˘', + Bscr: 'ℬ', + Bumpeq: '≎', + CHcy: 'Ч', + COPY: '©', + Cacute: 'Ć', + Cap: '⋒', + CapitalDifferentialD: 'ⅅ', + Cayleys: 'ℭ', + Ccaron: 'Č', + Ccedil: 'Ç', + Ccirc: 'Ĉ', + Cconint: '∰', + Cdot: 'Ċ', + Cedilla: '¸', + CenterDot: '·', + Cfr: 'ℭ', + Chi: 'Χ', + CircleDot: '⊙', + CircleMinus: '⊖', + CirclePlus: '⊕', + CircleTimes: '⊗', + ClockwiseContourIntegral: '∲', + CloseCurlyDoubleQuote: '”', + CloseCurlyQuote: '’', + Colon: '∷', + Colone: '⩴', + Congruent: '≡', + Conint: '∯', + ContourIntegral: '∮', + Copf: 'ℂ', + Coproduct: '∐', + CounterClockwiseContourIntegral: '∳', + Cross: '⨯', + Cscr: '𝒞', + Cup: '⋓', + CupCap: '≍', + DD: 'ⅅ', + DDotrahd: '⤑', + DJcy: 'Ђ', + DScy: 'Ѕ', + DZcy: 'Џ', + Dagger: '‡', + Darr: '↡', + Dashv: '⫤', + Dcaron: 'Ď', + Dcy: 'Д', + Del: '∇', + Delta: 'Δ', + Dfr: '𝔇', + DiacriticalAcute: '´', + DiacriticalDot: '˙', + DiacriticalDoubleAcute: '˝', + DiacriticalGrave: '`', + DiacriticalTilde: '˜', + Diamond: '⋄', + DifferentialD: 'ⅆ', + Dopf: '𝔻', + Dot: '¨', + DotDot: '⃜', + DotEqual: '≐', + DoubleContourIntegral: '∯', + DoubleDot: '¨', + DoubleDownArrow: '⇓', + DoubleLeftArrow: '⇐', + DoubleLeftRightArrow: '⇔', + DoubleLeftTee: '⫤', + DoubleLongLeftArrow: '⟸', + DoubleLongLeftRightArrow: '⟺', + DoubleLongRightArrow: '⟹', + DoubleRightArrow: '⇒', + DoubleRightTee: '⊨', + DoubleUpArrow: '⇑', + DoubleUpDownArrow: '⇕', + DoubleVerticalBar: '∥', + DownArrow: '↓', + DownArrowBar: '⤓', + DownArrowUpArrow: '⇵', + DownBreve: '̑', + DownLeftRightVector: '⥐', + DownLeftTeeVector: '⥞', + DownLeftVector: '↽', + DownLeftVectorBar: '⥖', + DownRightTeeVector: '⥟', + DownRightVector: '⇁', + DownRightVectorBar: '⥗', + DownTee: '⊤', + DownTeeArrow: '↧', + Downarrow: '⇓', + Dscr: '𝒟', + Dstrok: 'Đ', + ENG: 'Ŋ', + ETH: 'Ð', + Eacute: 'É', + Ecaron: 'Ě', + Ecirc: 'Ê', + Ecy: 'Э', + Edot: 'Ė', + Efr: '𝔈', + Egrave: 'È', + Element: '∈', + Emacr: 'Ē', + EmptySmallSquare: '◻', + EmptyVerySmallSquare: '▫', + Eogon: 'Ę', + Eopf: '𝔼', + Epsilon: 'Ε', + Equal: '⩵', + EqualTilde: '≂', + Equilibrium: '⇌', + Escr: 'ℰ', + Esim: '⩳', + Eta: 'Η', + Euml: 'Ë', + Exists: '∃', + ExponentialE: 'ⅇ', + Fcy: 'Ф', + Ffr: '𝔉', + FilledSmallSquare: '◼', + FilledVerySmallSquare: '▪', + Fopf: '𝔽', + ForAll: '∀', + Fouriertrf: 'ℱ', + Fscr: 'ℱ', + GJcy: 'Ѓ', + GT: '>', + Gamma: 'Γ', + Gammad: 'Ϝ', + Gbreve: 'Ğ', + Gcedil: 'Ģ', + Gcirc: 'Ĝ', + Gcy: 'Г', + Gdot: 'Ġ', + Gfr: '𝔊', + Gg: '⋙', + Gopf: '𝔾', + GreaterEqual: '≥', + GreaterEqualLess: '⋛', + GreaterFullEqual: '≧', + GreaterGreater: '⪢', + GreaterLess: '≷', + GreaterSlantEqual: '⩾', + GreaterTilde: '≳', + Gscr: '𝒢', + Gt: '≫', + HARDcy: 'Ъ', + Hacek: 'ˇ', + Hat: '^', + Hcirc: 'Ĥ', + Hfr: 'ℌ', + HilbertSpace: 'ℋ', + Hopf: 'ℍ', + HorizontalLine: '─', + Hscr: 'ℋ', + Hstrok: 'Ħ', + HumpDownHump: '≎', + HumpEqual: '≏', + IEcy: 'Е', + IJlig: 'IJ', + IOcy: 'Ё', + Iacute: 'Í', + Icirc: 'Î', + Icy: 'И', + Idot: 'İ', + Ifr: 'ℑ', + Igrave: 'Ì', + Im: 'ℑ', + Imacr: 'Ī', + ImaginaryI: 'ⅈ', + Implies: '⇒', + Int: '∬', + Integral: '∫', + Intersection: '⋂', + InvisibleComma: '⁣', + InvisibleTimes: '⁢', + Iogon: 'Į', + Iopf: '𝕀', + Iota: 'Ι', + Iscr: 'ℐ', + Itilde: 'Ĩ', + Iukcy: 'І', + Iuml: 'Ï', + Jcirc: 'Ĵ', + Jcy: 'Й', + Jfr: '𝔍', + Jopf: '𝕁', + Jscr: '𝒥', + Jsercy: 'Ј', + Jukcy: 'Є', + KHcy: 'Х', + KJcy: 'Ќ', + Kappa: 'Κ', + Kcedil: 'Ķ', + Kcy: 'К', + Kfr: '𝔎', + Kopf: '𝕂', + Kscr: '𝒦', + LJcy: 'Љ', + LT: '<', + Lacute: 'Ĺ', + Lambda: 'Λ', + Lang: '⟪', + Laplacetrf: 'ℒ', + Larr: '↞', + Lcaron: 'Ľ', + Lcedil: 'Ļ', + Lcy: 'Л', + LeftAngleBracket: '⟨', + LeftArrow: '←', + LeftArrowBar: '⇤', + LeftArrowRightArrow: '⇆', + LeftCeiling: '⌈', + LeftDoubleBracket: '⟦', + LeftDownTeeVector: '⥡', + LeftDownVector: '⇃', + LeftDownVectorBar: '⥙', + LeftFloor: '⌊', + LeftRightArrow: '↔', + LeftRightVector: '⥎', + LeftTee: '⊣', + LeftTeeArrow: '↤', + LeftTeeVector: '⥚', + LeftTriangle: '⊲', + LeftTriangleBar: '⧏', + LeftTriangleEqual: '⊴', + LeftUpDownVector: '⥑', + LeftUpTeeVector: '⥠', + LeftUpVector: '↿', + LeftUpVectorBar: '⥘', + LeftVector: '↼', + LeftVectorBar: '⥒', + Leftarrow: '⇐', + Leftrightarrow: '⇔', + LessEqualGreater: '⋚', + LessFullEqual: '≦', + LessGreater: '≶', + LessLess: '⪡', + LessSlantEqual: '⩽', + LessTilde: '≲', + Lfr: '𝔏', + Ll: '⋘', + Lleftarrow: '⇚', + Lmidot: 'Ŀ', + LongLeftArrow: '⟵', + LongLeftRightArrow: '⟷', + LongRightArrow: '⟶', + Longleftarrow: '⟸', + Longleftrightarrow: '⟺', + Longrightarrow: '⟹', + Lopf: '𝕃', + LowerLeftArrow: '↙', + LowerRightArrow: '↘', + Lscr: 'ℒ', + Lsh: '↰', + Lstrok: 'Ł', + Lt: '≪', + Map: '⤅', + Mcy: 'М', + MediumSpace: ' ', + Mellintrf: 'ℳ', + Mfr: '𝔐', + MinusPlus: '∓', + Mopf: '𝕄', + Mscr: 'ℳ', + Mu: 'Μ', + NJcy: 'Њ', + Nacute: 'Ń', + Ncaron: 'Ň', + Ncedil: 'Ņ', + Ncy: 'Н', + NegativeMediumSpace: '​', + NegativeThickSpace: '​', + NegativeThinSpace: '​', + NegativeVeryThinSpace: '​', + NestedGreaterGreater: '≫', + NestedLessLess: '≪', + NewLine: '\n', + Nfr: '𝔑', + NoBreak: '⁠', + NonBreakingSpace: ' ', + Nopf: 'ℕ', + Not: '⫬', + NotCongruent: '≢', + NotCupCap: '≭', + NotDoubleVerticalBar: '∦', + NotElement: '∉', + NotEqual: '≠', + NotEqualTilde: '≂̸', + NotExists: '∄', + NotGreater: '≯', + NotGreaterEqual: '≱', + NotGreaterFullEqual: '≧̸', + NotGreaterGreater: '≫̸', + NotGreaterLess: '≹', + NotGreaterSlantEqual: '⩾̸', + NotGreaterTilde: '≵', + NotHumpDownHump: '≎̸', + NotHumpEqual: '≏̸', + NotLeftTriangle: '⋪', + NotLeftTriangleBar: '⧏̸', + NotLeftTriangleEqual: '⋬', + NotLess: '≮', + NotLessEqual: '≰', + NotLessGreater: '≸', + NotLessLess: '≪̸', + NotLessSlantEqual: '⩽̸', + NotLessTilde: '≴', + NotNestedGreaterGreater: '⪢̸', + NotNestedLessLess: '⪡̸', + NotPrecedes: '⊀', + NotPrecedesEqual: '⪯̸', + NotPrecedesSlantEqual: '⋠', + NotReverseElement: '∌', + NotRightTriangle: '⋫', + NotRightTriangleBar: '⧐̸', + NotRightTriangleEqual: '⋭', + NotSquareSubset: '⊏̸', + NotSquareSubsetEqual: '⋢', + NotSquareSuperset: '⊐̸', + NotSquareSupersetEqual: '⋣', + NotSubset: '⊂⃒', + NotSubsetEqual: '⊈', + NotSucceeds: '⊁', + NotSucceedsEqual: '⪰̸', + NotSucceedsSlantEqual: '⋡', + NotSucceedsTilde: '≿̸', + NotSuperset: '⊃⃒', + NotSupersetEqual: '⊉', + NotTilde: '≁', + NotTildeEqual: '≄', + NotTildeFullEqual: '≇', + NotTildeTilde: '≉', + NotVerticalBar: '∤', + Nscr: '𝒩', + Ntilde: 'Ñ', + Nu: 'Ν', + OElig: 'Œ', + Oacute: 'Ó', + Ocirc: 'Ô', + Ocy: 'О', + Odblac: 'Ő', + Ofr: '𝔒', + Ograve: 'Ò', + Omacr: 'Ō', + Omega: 'Ω', + Omicron: 'Ο', + Oopf: '𝕆', + OpenCurlyDoubleQuote: '“', + OpenCurlyQuote: '‘', + Or: '⩔', + Oscr: '𝒪', + Oslash: 'Ø', + Otilde: 'Õ', + Otimes: '⨷', + Ouml: 'Ö', + OverBar: '‾', + OverBrace: '⏞', + OverBracket: '⎴', + OverParenthesis: '⏜', + PartialD: '∂', + Pcy: 'П', + Pfr: '𝔓', + Phi: 'Φ', + Pi: 'Π', + PlusMinus: '±', + Poincareplane: 'ℌ', + Popf: 'ℙ', + Pr: '⪻', + Precedes: '≺', + PrecedesEqual: '⪯', + PrecedesSlantEqual: '≼', + PrecedesTilde: '≾', + Prime: '″', + Product: '∏', + Proportion: '∷', + Proportional: '∝', + Pscr: '𝒫', + Psi: 'Ψ', + QUOT: '"', + Qfr: '𝔔', + Qopf: 'ℚ', + Qscr: '𝒬', + RBarr: '⤐', + REG: '®', + Racute: 'Ŕ', + Rang: '⟫', + Rarr: '↠', + Rarrtl: '⤖', + Rcaron: 'Ř', + Rcedil: 'Ŗ', + Rcy: 'Р', + Re: 'ℜ', + ReverseElement: '∋', + ReverseEquilibrium: '⇋', + ReverseUpEquilibrium: '⥯', + Rfr: 'ℜ', + Rho: 'Ρ', + RightAngleBracket: '⟩', + RightArrow: '→', + RightArrowBar: '⇥', + RightArrowLeftArrow: '⇄', + RightCeiling: '⌉', + RightDoubleBracket: '⟧', + RightDownTeeVector: '⥝', + RightDownVector: '⇂', + RightDownVectorBar: '⥕', + RightFloor: '⌋', + RightTee: '⊢', + RightTeeArrow: '↦', + RightTeeVector: '⥛', + RightTriangle: '⊳', + RightTriangleBar: '⧐', + RightTriangleEqual: '⊵', + RightUpDownVector: '⥏', + RightUpTeeVector: '⥜', + RightUpVector: '↾', + RightUpVectorBar: '⥔', + RightVector: '⇀', + RightVectorBar: '⥓', + Rightarrow: '⇒', + Ropf: 'ℝ', + RoundImplies: '⥰', + Rrightarrow: '⇛', + Rscr: 'ℛ', + Rsh: '↱', + RuleDelayed: '⧴', + SHCHcy: 'Щ', + SHcy: 'Ш', + SOFTcy: 'Ь', + Sacute: 'Ś', + Sc: '⪼', + Scaron: 'Š', + Scedil: 'Ş', + Scirc: 'Ŝ', + Scy: 'С', + Sfr: '𝔖', + ShortDownArrow: '↓', + ShortLeftArrow: '←', + ShortRightArrow: '→', + ShortUpArrow: '↑', + Sigma: 'Σ', + SmallCircle: '∘', + Sopf: '𝕊', + Sqrt: '√', + Square: '□', + SquareIntersection: '⊓', + SquareSubset: '⊏', + SquareSubsetEqual: '⊑', + SquareSuperset: '⊐', + SquareSupersetEqual: '⊒', + SquareUnion: '⊔', + Sscr: '𝒮', + Star: '⋆', + Sub: '⋐', + Subset: '⋐', + SubsetEqual: '⊆', + Succeeds: '≻', + SucceedsEqual: '⪰', + SucceedsSlantEqual: '≽', + SucceedsTilde: '≿', + SuchThat: '∋', + Sum: '∑', + Sup: '⋑', + Superset: '⊃', + SupersetEqual: '⊇', + Supset: '⋑', + THORN: 'Þ', + TRADE: '™', + TSHcy: 'Ћ', + TScy: 'Ц', + Tab: '\t', + Tau: 'Τ', + Tcaron: 'Ť', + Tcedil: 'Ţ', + Tcy: 'Т', + Tfr: '𝔗', + Therefore: '∴', + Theta: 'Θ', + ThickSpace: '  ', + ThinSpace: ' ', + Tilde: '∼', + TildeEqual: '≃', + TildeFullEqual: '≅', + TildeTilde: '≈', + Topf: '𝕋', + TripleDot: '⃛', + Tscr: '𝒯', + Tstrok: 'Ŧ', + Uacute: 'Ú', + Uarr: '↟', + Uarrocir: '⥉', + Ubrcy: 'Ў', + Ubreve: 'Ŭ', + Ucirc: 'Û', + Ucy: 'У', + Udblac: 'Ű', + Ufr: '𝔘', + Ugrave: 'Ù', + Umacr: 'Ū', + UnderBar: '_', + UnderBrace: '⏟', + UnderBracket: '⎵', + UnderParenthesis: '⏝', + Union: '⋃', + UnionPlus: '⊎', + Uogon: 'Ų', + Uopf: '𝕌', + UpArrow: '↑', + UpArrowBar: '⤒', + UpArrowDownArrow: '⇅', + UpDownArrow: '↕', + UpEquilibrium: '⥮', + UpTee: '⊥', + UpTeeArrow: '↥', + Uparrow: '⇑', + Updownarrow: '⇕', + UpperLeftArrow: '↖', + UpperRightArrow: '↗', + Upsi: 'ϒ', + Upsilon: 'Υ', + Uring: 'Ů', + Uscr: '𝒰', + Utilde: 'Ũ', + Uuml: 'Ü', + VDash: '⊫', + Vbar: '⫫', + Vcy: 'В', + Vdash: '⊩', + Vdashl: '⫦', + Vee: '⋁', + Verbar: '‖', + Vert: '‖', + VerticalBar: '∣', + VerticalLine: '|', + VerticalSeparator: '❘', + VerticalTilde: '≀', + VeryThinSpace: ' ', + Vfr: '𝔙', + Vopf: '𝕍', + Vscr: '𝒱', + Vvdash: '⊪', + Wcirc: 'Ŵ', + Wedge: '⋀', + Wfr: '𝔚', + Wopf: '𝕎', + Wscr: '𝒲', + Xfr: '𝔛', + Xi: 'Ξ', + Xopf: '𝕏', + Xscr: '𝒳', + YAcy: 'Я', + YIcy: 'Ї', + YUcy: 'Ю', + Yacute: 'Ý', + Ycirc: 'Ŷ', + Ycy: 'Ы', + Yfr: '𝔜', + Yopf: '𝕐', + Yscr: '𝒴', + Yuml: 'Ÿ', + ZHcy: 'Ж', + Zacute: 'Ź', + Zcaron: 'Ž', + Zcy: 'З', + Zdot: 'Ż', + ZeroWidthSpace: '​', + Zeta: 'Ζ', + Zfr: 'ℨ', + Zopf: 'ℤ', + Zscr: '𝒵', + aacute: 'á', + abreve: 'ă', + ac: '∾', + acE: '∾̳', + acd: '∿', + acirc: 'â', + acute: '´', + acy: 'а', + aelig: 'æ', + af: '⁡', + afr: '𝔞', + agrave: 'à', + alefsym: 'ℵ', + aleph: 'ℵ', + alpha: 'α', + amacr: 'ā', + amalg: '⨿', + amp: '&', + and: '∧', + andand: '⩕', + andd: '⩜', + andslope: '⩘', + andv: '⩚', + ang: '∠', + ange: '⦤', + angle: '∠', + angmsd: '∡', + angmsdaa: '⦨', + angmsdab: '⦩', + angmsdac: '⦪', + angmsdad: '⦫', + angmsdae: '⦬', + angmsdaf: '⦭', + angmsdag: '⦮', + angmsdah: '⦯', + angrt: '∟', + angrtvb: '⊾', + angrtvbd: '⦝', + angsph: '∢', + angst: 'Å', + angzarr: '⍼', + aogon: 'ą', + aopf: '𝕒', + ap: '≈', + apE: '⩰', + apacir: '⩯', + ape: '≊', + apid: '≋', + apos: "'", + approx: '≈', + approxeq: '≊', + aring: 'å', + ascr: '𝒶', + ast: '*', + asymp: '≈', + asympeq: '≍', + atilde: 'ã', + auml: 'ä', + awconint: '∳', + awint: '⨑', + bNot: '⫭', + backcong: '≌', + backepsilon: '϶', + backprime: '‵', + backsim: '∽', + backsimeq: '⋍', + barvee: '⊽', + barwed: '⌅', + barwedge: '⌅', + bbrk: '⎵', + bbrktbrk: '⎶', + bcong: '≌', + bcy: 'б', + bdquo: '„', + becaus: '∵', + because: '∵', + bemptyv: '⦰', + bepsi: '϶', + bernou: 'ℬ', + beta: 'β', + beth: 'ℶ', + between: '≬', + bfr: '𝔟', + bigcap: '⋂', + bigcirc: '◯', + bigcup: '⋃', + bigodot: '⨀', + bigoplus: '⨁', + bigotimes: '⨂', + bigsqcup: '⨆', + bigstar: '★', + bigtriangledown: '▽', + bigtriangleup: '△', + biguplus: '⨄', + bigvee: '⋁', + bigwedge: '⋀', + bkarow: '⤍', + blacklozenge: '⧫', + blacksquare: '▪', + blacktriangle: '▴', + blacktriangledown: '▾', + blacktriangleleft: '◂', + blacktriangleright: '▸', + blank: '␣', + blk12: '▒', + blk14: '░', + blk34: '▓', + block: '█', + bne: '=⃥', + bnequiv: '≡⃥', + bnot: '⌐', + bopf: '𝕓', + bot: '⊥', + bottom: '⊥', + bowtie: '⋈', + boxDL: '╗', + boxDR: '╔', + boxDl: '╖', + boxDr: '╓', + boxH: '═', + boxHD: '╦', + boxHU: '╩', + boxHd: '╤', + boxHu: '╧', + boxUL: '╝', + boxUR: '╚', + boxUl: '╜', + boxUr: '╙', + boxV: '║', + boxVH: '╬', + boxVL: '╣', + boxVR: '╠', + boxVh: '╫', + boxVl: '╢', + boxVr: '╟', + boxbox: '⧉', + boxdL: '╕', + boxdR: '╒', + boxdl: '┐', + boxdr: '┌', + boxh: '─', + boxhD: '╥', + boxhU: '╨', + boxhd: '┬', + boxhu: '┴', + boxminus: '⊟', + boxplus: '⊞', + boxtimes: '⊠', + boxuL: '╛', + boxuR: '╘', + boxul: '┘', + boxur: '└', + boxv: '│', + boxvH: '╪', + boxvL: '╡', + boxvR: '╞', + boxvh: '┼', + boxvl: '┤', + boxvr: '├', + bprime: '‵', + breve: '˘', + brvbar: '¦', + bscr: '𝒷', + bsemi: '⁏', + bsim: '∽', + bsime: '⋍', + bsol: '\\', + bsolb: '⧅', + bsolhsub: '⟈', + bull: '•', + bullet: '•', + bump: '≎', + bumpE: '⪮', + bumpe: '≏', + bumpeq: '≏', + cacute: 'ć', + cap: '∩', + capand: '⩄', + capbrcup: '⩉', + capcap: '⩋', + capcup: '⩇', + capdot: '⩀', + caps: '∩︀', + caret: '⁁', + caron: 'ˇ', + ccaps: '⩍', + ccaron: 'č', + ccedil: 'ç', + ccirc: 'ĉ', + ccups: '⩌', + ccupssm: '⩐', + cdot: 'ċ', + cedil: '¸', + cemptyv: '⦲', + cent: '¢', + centerdot: '·', + cfr: '𝔠', + chcy: 'ч', + check: '✓', + checkmark: '✓', + chi: 'χ', + cir: '○', + cirE: '⧃', + circ: 'ˆ', + circeq: '≗', + circlearrowleft: '↺', + circlearrowright: '↻', + circledR: '®', + circledS: 'Ⓢ', + circledast: '⊛', + circledcirc: '⊚', + circleddash: '⊝', + cire: '≗', + cirfnint: '⨐', + cirmid: '⫯', + cirscir: '⧂', + clubs: '♣', + clubsuit: '♣', + colon: ':', + colone: '≔', + coloneq: '≔', + comma: ',', + commat: '@', + comp: '∁', + compfn: '∘', + complement: '∁', + complexes: 'ℂ', + cong: '≅', + congdot: '⩭', + conint: '∮', + copf: '𝕔', + coprod: '∐', + copy: '©', + copysr: '℗', + crarr: '↵', + cross: '✗', + cscr: '𝒸', + csub: '⫏', + csube: '⫑', + csup: '⫐', + csupe: '⫒', + ctdot: '⋯', + cudarrl: '⤸', + cudarrr: '⤵', + cuepr: '⋞', + cuesc: '⋟', + cularr: '↶', + cularrp: '⤽', + cup: '∪', + cupbrcap: '⩈', + cupcap: '⩆', + cupcup: '⩊', + cupdot: '⊍', + cupor: '⩅', + cups: '∪︀', + curarr: '↷', + curarrm: '⤼', + curlyeqprec: '⋞', + curlyeqsucc: '⋟', + curlyvee: '⋎', + curlywedge: '⋏', + curren: '¤', + curvearrowleft: '↶', + curvearrowright: '↷', + cuvee: '⋎', + cuwed: '⋏', + cwconint: '∲', + cwint: '∱', + cylcty: '⌭', + dArr: '⇓', + dHar: '⥥', + dagger: '†', + daleth: 'ℸ', + darr: '↓', + dash: '‐', + dashv: '⊣', + dbkarow: '⤏', + dblac: '˝', + dcaron: 'ď', + dcy: 'д', + dd: 'ⅆ', + ddagger: '‡', + ddarr: '⇊', + ddotseq: '⩷', + deg: '°', + delta: 'δ', + demptyv: '⦱', + dfisht: '⥿', + dfr: '𝔡', + dharl: '⇃', + dharr: '⇂', + diam: '⋄', + diamond: '⋄', + diamondsuit: '♦', + diams: '♦', + die: '¨', + digamma: 'ϝ', + disin: '⋲', + div: '÷', + divide: '÷', + divideontimes: '⋇', + divonx: '⋇', + djcy: 'ђ', + dlcorn: '⌞', + dlcrop: '⌍', + dollar: '$', + dopf: '𝕕', + dot: '˙', + doteq: '≐', + doteqdot: '≑', + dotminus: '∸', + dotplus: '∔', + dotsquare: '⊡', + doublebarwedge: '⌆', + downarrow: '↓', + downdownarrows: '⇊', + downharpoonleft: '⇃', + downharpoonright: '⇂', + drbkarow: '⤐', + drcorn: '⌟', + drcrop: '⌌', + dscr: '𝒹', + dscy: 'ѕ', + dsol: '⧶', + dstrok: 'đ', + dtdot: '⋱', + dtri: '▿', + dtrif: '▾', + duarr: '⇵', + duhar: '⥯', + dwangle: '⦦', + dzcy: 'џ', + dzigrarr: '⟿', + eDDot: '⩷', + eDot: '≑', + eacute: 'é', + easter: '⩮', + ecaron: 'ě', + ecir: '≖', + ecirc: 'ê', + ecolon: '≕', + ecy: 'э', + edot: 'ė', + ee: 'ⅇ', + efDot: '≒', + efr: '𝔢', + eg: '⪚', + egrave: 'è', + egs: '⪖', + egsdot: '⪘', + el: '⪙', + elinters: '⏧', + ell: 'ℓ', + els: '⪕', + elsdot: '⪗', + emacr: 'ē', + empty: '∅', + emptyset: '∅', + emptyv: '∅', + emsp13: ' ', + emsp14: ' ', + emsp: ' ', + eng: 'ŋ', + ensp: ' ', + eogon: 'ę', + eopf: '𝕖', + epar: '⋕', + eparsl: '⧣', + eplus: '⩱', + epsi: 'ε', + epsilon: 'ε', + epsiv: 'ϵ', + eqcirc: '≖', + eqcolon: '≕', + eqsim: '≂', + eqslantgtr: '⪖', + eqslantless: '⪕', + equals: '=', + equest: '≟', + equiv: '≡', + equivDD: '⩸', + eqvparsl: '⧥', + erDot: '≓', + erarr: '⥱', + escr: 'ℯ', + esdot: '≐', + esim: '≂', + eta: 'η', + eth: 'ð', + euml: 'ë', + euro: '€', + excl: '!', + exist: '∃', + expectation: 'ℰ', + exponentiale: 'ⅇ', + fallingdotseq: '≒', + fcy: 'ф', + female: '♀', + ffilig: 'ffi', + fflig: 'ff', + ffllig: 'ffl', + ffr: '𝔣', + filig: 'fi', + fjlig: 'fj', + flat: '♭', + fllig: 'fl', + fltns: '▱', + fnof: 'ƒ', + fopf: '𝕗', + forall: '∀', + fork: '⋔', + forkv: '⫙', + fpartint: '⨍', + frac12: '½', + frac13: '⅓', + frac14: '¼', + frac15: '⅕', + frac16: '⅙', + frac18: '⅛', + frac23: '⅔', + frac25: '⅖', + frac34: '¾', + frac35: '⅗', + frac38: '⅜', + frac45: '⅘', + frac56: '⅚', + frac58: '⅝', + frac78: '⅞', + frasl: '⁄', + frown: '⌢', + fscr: '𝒻', + gE: '≧', + gEl: '⪌', + gacute: 'ǵ', + gamma: 'γ', + gammad: 'ϝ', + gap: '⪆', + gbreve: 'ğ', + gcirc: 'ĝ', + gcy: 'г', + gdot: 'ġ', + ge: '≥', + gel: '⋛', + geq: '≥', + geqq: '≧', + geqslant: '⩾', + ges: '⩾', + gescc: '⪩', + gesdot: '⪀', + gesdoto: '⪂', + gesdotol: '⪄', + gesl: '⋛︀', + gesles: '⪔', + gfr: '𝔤', + gg: '≫', + ggg: '⋙', + gimel: 'ℷ', + gjcy: 'ѓ', + gl: '≷', + glE: '⪒', + gla: '⪥', + glj: '⪤', + gnE: '≩', + gnap: '⪊', + gnapprox: '⪊', + gne: '⪈', + gneq: '⪈', + gneqq: '≩', + gnsim: '⋧', + gopf: '𝕘', + grave: '`', + gscr: 'ℊ', + gsim: '≳', + gsime: '⪎', + gsiml: '⪐', + gt: '>', + gtcc: '⪧', + gtcir: '⩺', + gtdot: '⋗', + gtlPar: '⦕', + gtquest: '⩼', + gtrapprox: '⪆', + gtrarr: '⥸', + gtrdot: '⋗', + gtreqless: '⋛', + gtreqqless: '⪌', + gtrless: '≷', + gtrsim: '≳', + gvertneqq: '≩︀', + gvnE: '≩︀', + hArr: '⇔', + hairsp: ' ', + half: '½', + hamilt: 'ℋ', + hardcy: 'ъ', + harr: '↔', + harrcir: '⥈', + harrw: '↭', + hbar: 'ℏ', + hcirc: 'ĥ', + hearts: '♥', + heartsuit: '♥', + hellip: '…', + hercon: '⊹', + hfr: '𝔥', + hksearow: '⤥', + hkswarow: '⤦', + hoarr: '⇿', + homtht: '∻', + hookleftarrow: '↩', + hookrightarrow: '↪', + hopf: '𝕙', + horbar: '―', + hscr: '𝒽', + hslash: 'ℏ', + hstrok: 'ħ', + hybull: '⁃', + hyphen: '‐', + iacute: 'í', + ic: '⁣', + icirc: 'î', + icy: 'и', + iecy: 'е', + iexcl: '¡', + iff: '⇔', + ifr: '𝔦', + igrave: 'ì', + ii: 'ⅈ', + iiiint: '⨌', + iiint: '∭', + iinfin: '⧜', + iiota: '℩', + ijlig: 'ij', + imacr: 'ī', + image: 'ℑ', + imagline: 'ℐ', + imagpart: 'ℑ', + imath: 'ı', + imof: '⊷', + imped: 'Ƶ', + in: '∈', + incare: '℅', + infin: '∞', + infintie: '⧝', + inodot: 'ı', + int: '∫', + intcal: '⊺', + integers: 'ℤ', + intercal: '⊺', + intlarhk: '⨗', + intprod: '⨼', + iocy: 'ё', + iogon: 'į', + iopf: '𝕚', + iota: 'ι', + iprod: '⨼', + iquest: '¿', + iscr: '𝒾', + isin: '∈', + isinE: '⋹', + isindot: '⋵', + isins: '⋴', + isinsv: '⋳', + isinv: '∈', + it: '⁢', + itilde: 'ĩ', + iukcy: 'і', + iuml: 'ï', + jcirc: 'ĵ', + jcy: 'й', + jfr: '𝔧', + jmath: 'ȷ', + jopf: '𝕛', + jscr: '𝒿', + jsercy: 'ј', + jukcy: 'є', + kappa: 'κ', + kappav: 'ϰ', + kcedil: 'ķ', + kcy: 'к', + kfr: '𝔨', + kgreen: 'ĸ', + khcy: 'х', + kjcy: 'ќ', + kopf: '𝕜', + kscr: '𝓀', + lAarr: '⇚', + lArr: '⇐', + lAtail: '⤛', + lBarr: '⤎', + lE: '≦', + lEg: '⪋', + lHar: '⥢', + lacute: 'ĺ', + laemptyv: '⦴', + lagran: 'ℒ', + lambda: 'λ', + lang: '⟨', + langd: '⦑', + langle: '⟨', + lap: '⪅', + laquo: '«', + larr: '←', + larrb: '⇤', + larrbfs: '⤟', + larrfs: '⤝', + larrhk: '↩', + larrlp: '↫', + larrpl: '⤹', + larrsim: '⥳', + larrtl: '↢', + lat: '⪫', + latail: '⤙', + late: '⪭', + lates: '⪭︀', + lbarr: '⤌', + lbbrk: '❲', + lbrace: '{', + lbrack: '[', + lbrke: '⦋', + lbrksld: '⦏', + lbrkslu: '⦍', + lcaron: 'ľ', + lcedil: 'ļ', + lceil: '⌈', + lcub: '{', + lcy: 'л', + ldca: '⤶', + ldquo: '“', + ldquor: '„', + ldrdhar: '⥧', + ldrushar: '⥋', + ldsh: '↲', + le: '≤', + leftarrow: '←', + leftarrowtail: '↢', + leftharpoondown: '↽', + leftharpoonup: '↼', + leftleftarrows: '⇇', + leftrightarrow: '↔', + leftrightarrows: '⇆', + leftrightharpoons: '⇋', + leftrightsquigarrow: '↭', + leftthreetimes: '⋋', + leg: '⋚', + leq: '≤', + leqq: '≦', + leqslant: '⩽', + les: '⩽', + lescc: '⪨', + lesdot: '⩿', + lesdoto: '⪁', + lesdotor: '⪃', + lesg: '⋚︀', + lesges: '⪓', + lessapprox: '⪅', + lessdot: '⋖', + lesseqgtr: '⋚', + lesseqqgtr: '⪋', + lessgtr: '≶', + lesssim: '≲', + lfisht: '⥼', + lfloor: '⌊', + lfr: '𝔩', + lg: '≶', + lgE: '⪑', + lhard: '↽', + lharu: '↼', + lharul: '⥪', + lhblk: '▄', + ljcy: 'љ', + ll: '≪', + llarr: '⇇', + llcorner: '⌞', + llhard: '⥫', + lltri: '◺', + lmidot: 'ŀ', + lmoust: '⎰', + lmoustache: '⎰', + lnE: '≨', + lnap: '⪉', + lnapprox: '⪉', + lne: '⪇', + lneq: '⪇', + lneqq: '≨', + lnsim: '⋦', + loang: '⟬', + loarr: '⇽', + lobrk: '⟦', + longleftarrow: '⟵', + longleftrightarrow: '⟷', + longmapsto: '⟼', + longrightarrow: '⟶', + looparrowleft: '↫', + looparrowright: '↬', + lopar: '⦅', + lopf: '𝕝', + loplus: '⨭', + lotimes: '⨴', + lowast: '∗', + lowbar: '_', + loz: '◊', + lozenge: '◊', + lozf: '⧫', + lpar: '(', + lparlt: '⦓', + lrarr: '⇆', + lrcorner: '⌟', + lrhar: '⇋', + lrhard: '⥭', + lrm: '‎', + lrtri: '⊿', + lsaquo: '‹', + lscr: '𝓁', + lsh: '↰', + lsim: '≲', + lsime: '⪍', + lsimg: '⪏', + lsqb: '[', + lsquo: '‘', + lsquor: '‚', + lstrok: 'ł', + lt: '<', + ltcc: '⪦', + ltcir: '⩹', + ltdot: '⋖', + lthree: '⋋', + ltimes: '⋉', + ltlarr: '⥶', + ltquest: '⩻', + ltrPar: '⦖', + ltri: '◃', + ltrie: '⊴', + ltrif: '◂', + lurdshar: '⥊', + luruhar: '⥦', + lvertneqq: '≨︀', + lvnE: '≨︀', + mDDot: '∺', + macr: '¯', + male: '♂', + malt: '✠', + maltese: '✠', + map: '↦', + mapsto: '↦', + mapstodown: '↧', + mapstoleft: '↤', + mapstoup: '↥', + marker: '▮', + mcomma: '⨩', + mcy: 'м', + mdash: '—', + measuredangle: '∡', + mfr: '𝔪', + mho: '℧', + micro: 'µ', + mid: '∣', + midast: '*', + midcir: '⫰', + middot: '·', + minus: '−', + minusb: '⊟', + minusd: '∸', + minusdu: '⨪', + mlcp: '⫛', + mldr: '…', + mnplus: '∓', + models: '⊧', + mopf: '𝕞', + mp: '∓', + mscr: '𝓂', + mstpos: '∾', + mu: 'μ', + multimap: '⊸', + mumap: '⊸', + nGg: '⋙̸', + nGt: '≫⃒', + nGtv: '≫̸', + nLeftarrow: '⇍', + nLeftrightarrow: '⇎', + nLl: '⋘̸', + nLt: '≪⃒', + nLtv: '≪̸', + nRightarrow: '⇏', + nVDash: '⊯', + nVdash: '⊮', + nabla: '∇', + nacute: 'ń', + nang: '∠⃒', + nap: '≉', + napE: '⩰̸', + napid: '≋̸', + napos: 'ʼn', + napprox: '≉', + natur: '♮', + natural: '♮', + naturals: 'ℕ', + nbsp: ' ', + nbump: '≎̸', + nbumpe: '≏̸', + ncap: '⩃', + ncaron: 'ň', + ncedil: 'ņ', + ncong: '≇', + ncongdot: '⩭̸', + ncup: '⩂', + ncy: 'н', + ndash: '–', + ne: '≠', + neArr: '⇗', + nearhk: '⤤', + nearr: '↗', + nearrow: '↗', + nedot: '≐̸', + nequiv: '≢', + nesear: '⤨', + nesim: '≂̸', + nexist: '∄', + nexists: '∄', + nfr: '𝔫', + ngE: '≧̸', + nge: '≱', + ngeq: '≱', + ngeqq: '≧̸', + ngeqslant: '⩾̸', + nges: '⩾̸', + ngsim: '≵', + ngt: '≯', + ngtr: '≯', + nhArr: '⇎', + nharr: '↮', + nhpar: '⫲', + ni: '∋', + nis: '⋼', + nisd: '⋺', + niv: '∋', + njcy: 'њ', + nlArr: '⇍', + nlE: '≦̸', + nlarr: '↚', + nldr: '‥', + nle: '≰', + nleftarrow: '↚', + nleftrightarrow: '↮', + nleq: '≰', + nleqq: '≦̸', + nleqslant: '⩽̸', + nles: '⩽̸', + nless: '≮', + nlsim: '≴', + nlt: '≮', + nltri: '⋪', + nltrie: '⋬', + nmid: '∤', + nopf: '𝕟', + not: '¬', + notin: '∉', + notinE: '⋹̸', + notindot: '⋵̸', + notinva: '∉', + notinvb: '⋷', + notinvc: '⋶', + notni: '∌', + notniva: '∌', + notnivb: '⋾', + notnivc: '⋽', + npar: '∦', + nparallel: '∦', + nparsl: '⫽⃥', + npart: '∂̸', + npolint: '⨔', + npr: '⊀', + nprcue: '⋠', + npre: '⪯̸', + nprec: '⊀', + npreceq: '⪯̸', + nrArr: '⇏', + nrarr: '↛', + nrarrc: '⤳̸', + nrarrw: '↝̸', + nrightarrow: '↛', + nrtri: '⋫', + nrtrie: '⋭', + nsc: '⊁', + nsccue: '⋡', + nsce: '⪰̸', + nscr: '𝓃', + nshortmid: '∤', + nshortparallel: '∦', + nsim: '≁', + nsime: '≄', + nsimeq: '≄', + nsmid: '∤', + nspar: '∦', + nsqsube: '⋢', + nsqsupe: '⋣', + nsub: '⊄', + nsubE: '⫅̸', + nsube: '⊈', + nsubset: '⊂⃒', + nsubseteq: '⊈', + nsubseteqq: '⫅̸', + nsucc: '⊁', + nsucceq: '⪰̸', + nsup: '⊅', + nsupE: '⫆̸', + nsupe: '⊉', + nsupset: '⊃⃒', + nsupseteq: '⊉', + nsupseteqq: '⫆̸', + ntgl: '≹', + ntilde: 'ñ', + ntlg: '≸', + ntriangleleft: '⋪', + ntrianglelefteq: '⋬', + ntriangleright: '⋫', + ntrianglerighteq: '⋭', + nu: 'ν', + num: '#', + numero: '№', + numsp: ' ', + nvDash: '⊭', + nvHarr: '⤄', + nvap: '≍⃒', + nvdash: '⊬', + nvge: '≥⃒', + nvgt: '>⃒', + nvinfin: '⧞', + nvlArr: '⤂', + nvle: '≤⃒', + nvlt: '<⃒', + nvltrie: '⊴⃒', + nvrArr: '⤃', + nvrtrie: '⊵⃒', + nvsim: '∼⃒', + nwArr: '⇖', + nwarhk: '⤣', + nwarr: '↖', + nwarrow: '↖', + nwnear: '⤧', + oS: 'Ⓢ', + oacute: 'ó', + oast: '⊛', + ocir: '⊚', + ocirc: 'ô', + ocy: 'о', + odash: '⊝', + odblac: 'ő', + odiv: '⨸', + odot: '⊙', + odsold: '⦼', + oelig: 'œ', + ofcir: '⦿', + ofr: '𝔬', + ogon: '˛', + ograve: 'ò', + ogt: '⧁', + ohbar: '⦵', + ohm: 'Ω', + oint: '∮', + olarr: '↺', + olcir: '⦾', + olcross: '⦻', + oline: '‾', + olt: '⧀', + omacr: 'ō', + omega: 'ω', + omicron: 'ο', + omid: '⦶', + ominus: '⊖', + oopf: '𝕠', + opar: '⦷', + operp: '⦹', + oplus: '⊕', + or: '∨', + orarr: '↻', + ord: '⩝', + order: 'ℴ', + orderof: 'ℴ', + ordf: 'ª', + ordm: 'º', + origof: '⊶', + oror: '⩖', + orslope: '⩗', + orv: '⩛', + oscr: 'ℴ', + oslash: 'ø', + osol: '⊘', + otilde: 'õ', + otimes: '⊗', + otimesas: '⨶', + ouml: 'ö', + ovbar: '⌽', + par: '∥', + para: '¶', + parallel: '∥', + parsim: '⫳', + parsl: '⫽', + part: '∂', + pcy: 'п', + percnt: '%', + period: '.', + permil: '‰', + perp: '⊥', + pertenk: '‱', + pfr: '𝔭', + phi: 'φ', + phiv: 'ϕ', + phmmat: 'ℳ', + phone: '☎', + pi: 'π', + pitchfork: '⋔', + piv: 'ϖ', + planck: 'ℏ', + planckh: 'ℎ', + plankv: 'ℏ', + plus: '+', + plusacir: '⨣', + plusb: '⊞', + pluscir: '⨢', + plusdo: '∔', + plusdu: '⨥', + pluse: '⩲', + plusmn: '±', + plussim: '⨦', + plustwo: '⨧', + pm: '±', + pointint: '⨕', + popf: '𝕡', + pound: '£', + pr: '≺', + prE: '⪳', + prap: '⪷', + prcue: '≼', + pre: '⪯', + prec: '≺', + precapprox: '⪷', + preccurlyeq: '≼', + preceq: '⪯', + precnapprox: '⪹', + precneqq: '⪵', + precnsim: '⋨', + precsim: '≾', + prime: '′', + primes: 'ℙ', + prnE: '⪵', + prnap: '⪹', + prnsim: '⋨', + prod: '∏', + profalar: '⌮', + profline: '⌒', + profsurf: '⌓', + prop: '∝', + propto: '∝', + prsim: '≾', + prurel: '⊰', + pscr: '𝓅', + psi: 'ψ', + puncsp: ' ', + qfr: '𝔮', + qint: '⨌', + qopf: '𝕢', + qprime: '⁗', + qscr: '𝓆', + quaternions: 'ℍ', + quatint: '⨖', + quest: '?', + questeq: '≟', + quot: '"', + rAarr: '⇛', + rArr: '⇒', + rAtail: '⤜', + rBarr: '⤏', + rHar: '⥤', + race: '∽̱', + racute: 'ŕ', + radic: '√', + raemptyv: '⦳', + rang: '⟩', + rangd: '⦒', + range: '⦥', + rangle: '⟩', + raquo: '»', + rarr: '→', + rarrap: '⥵', + rarrb: '⇥', + rarrbfs: '⤠', + rarrc: '⤳', + rarrfs: '⤞', + rarrhk: '↪', + rarrlp: '↬', + rarrpl: '⥅', + rarrsim: '⥴', + rarrtl: '↣', + rarrw: '↝', + ratail: '⤚', + ratio: '∶', + rationals: 'ℚ', + rbarr: '⤍', + rbbrk: '❳', + rbrace: '}', + rbrack: ']', + rbrke: '⦌', + rbrksld: '⦎', + rbrkslu: '⦐', + rcaron: 'ř', + rcedil: 'ŗ', + rceil: '⌉', + rcub: '}', + rcy: 'р', + rdca: '⤷', + rdldhar: '⥩', + rdquo: '”', + rdquor: '”', + rdsh: '↳', + real: 'ℜ', + realine: 'ℛ', + realpart: 'ℜ', + reals: 'ℝ', + rect: '▭', + reg: '®', + rfisht: '⥽', + rfloor: '⌋', + rfr: '𝔯', + rhard: '⇁', + rharu: '⇀', + rharul: '⥬', + rho: 'ρ', + rhov: 'ϱ', + rightarrow: '→', + rightarrowtail: '↣', + rightharpoondown: '⇁', + rightharpoonup: '⇀', + rightleftarrows: '⇄', + rightleftharpoons: '⇌', + rightrightarrows: '⇉', + rightsquigarrow: '↝', + rightthreetimes: '⋌', + ring: '˚', + risingdotseq: '≓', + rlarr: '⇄', + rlhar: '⇌', + rlm: '‏', + rmoust: '⎱', + rmoustache: '⎱', + rnmid: '⫮', + roang: '⟭', + roarr: '⇾', + robrk: '⟧', + ropar: '⦆', + ropf: '𝕣', + roplus: '⨮', + rotimes: '⨵', + rpar: ')', + rpargt: '⦔', + rppolint: '⨒', + rrarr: '⇉', + rsaquo: '›', + rscr: '𝓇', + rsh: '↱', + rsqb: ']', + rsquo: '’', + rsquor: '’', + rthree: '⋌', + rtimes: '⋊', + rtri: '▹', + rtrie: '⊵', + rtrif: '▸', + rtriltri: '⧎', + ruluhar: '⥨', + rx: '℞', + sacute: 'ś', + sbquo: '‚', + sc: '≻', + scE: '⪴', + scap: '⪸', + scaron: 'š', + sccue: '≽', + sce: '⪰', + scedil: 'ş', + scirc: 'ŝ', + scnE: '⪶', + scnap: '⪺', + scnsim: '⋩', + scpolint: '⨓', + scsim: '≿', + scy: 'с', + sdot: '⋅', + sdotb: '⊡', + sdote: '⩦', + seArr: '⇘', + searhk: '⤥', + searr: '↘', + searrow: '↘', + sect: '§', + semi: ';', + seswar: '⤩', + setminus: '∖', + setmn: '∖', + sext: '✶', + sfr: '𝔰', + sfrown: '⌢', + sharp: '♯', + shchcy: 'щ', + shcy: 'ш', + shortmid: '∣', + shortparallel: '∥', + shy: '­', + sigma: 'σ', + sigmaf: 'ς', + sigmav: 'ς', + sim: '∼', + simdot: '⩪', + sime: '≃', + simeq: '≃', + simg: '⪞', + simgE: '⪠', + siml: '⪝', + simlE: '⪟', + simne: '≆', + simplus: '⨤', + simrarr: '⥲', + slarr: '←', + smallsetminus: '∖', + smashp: '⨳', + smeparsl: '⧤', + smid: '∣', + smile: '⌣', + smt: '⪪', + smte: '⪬', + smtes: '⪬︀', + softcy: 'ь', + sol: '/', + solb: '⧄', + solbar: '⌿', + sopf: '𝕤', + spades: '♠', + spadesuit: '♠', + spar: '∥', + sqcap: '⊓', + sqcaps: '⊓︀', + sqcup: '⊔', + sqcups: '⊔︀', + sqsub: '⊏', + sqsube: '⊑', + sqsubset: '⊏', + sqsubseteq: '⊑', + sqsup: '⊐', + sqsupe: '⊒', + sqsupset: '⊐', + sqsupseteq: '⊒', + squ: '□', + square: '□', + squarf: '▪', + squf: '▪', + srarr: '→', + sscr: '𝓈', + ssetmn: '∖', + ssmile: '⌣', + sstarf: '⋆', + star: '☆', + starf: '★', + straightepsilon: 'ϵ', + straightphi: 'ϕ', + strns: '¯', + sub: '⊂', + subE: '⫅', + subdot: '⪽', + sube: '⊆', + subedot: '⫃', + submult: '⫁', + subnE: '⫋', + subne: '⊊', + subplus: '⪿', + subrarr: '⥹', + subset: '⊂', + subseteq: '⊆', + subseteqq: '⫅', + subsetneq: '⊊', + subsetneqq: '⫋', + subsim: '⫇', + subsub: '⫕', + subsup: '⫓', + succ: '≻', + succapprox: '⪸', + succcurlyeq: '≽', + succeq: '⪰', + succnapprox: '⪺', + succneqq: '⪶', + succnsim: '⋩', + succsim: '≿', + sum: '∑', + sung: '♪', + sup1: '¹', + sup2: '²', + sup3: '³', + sup: '⊃', + supE: '⫆', + supdot: '⪾', + supdsub: '⫘', + supe: '⊇', + supedot: '⫄', + suphsol: '⟉', + suphsub: '⫗', + suplarr: '⥻', + supmult: '⫂', + supnE: '⫌', + supne: '⊋', + supplus: '⫀', + supset: '⊃', + supseteq: '⊇', + supseteqq: '⫆', + supsetneq: '⊋', + supsetneqq: '⫌', + supsim: '⫈', + supsub: '⫔', + supsup: '⫖', + swArr: '⇙', + swarhk: '⤦', + swarr: '↙', + swarrow: '↙', + swnwar: '⤪', + szlig: 'ß', + target: '⌖', + tau: 'τ', + tbrk: '⎴', + tcaron: 'ť', + tcedil: 'ţ', + tcy: 'т', + tdot: '⃛', + telrec: '⌕', + tfr: '𝔱', + there4: '∴', + therefore: '∴', + theta: 'θ', + thetasym: 'ϑ', + thetav: 'ϑ', + thickapprox: '≈', + thicksim: '∼', + thinsp: ' ', + thkap: '≈', + thksim: '∼', + thorn: 'þ', + tilde: '˜', + times: '×', + timesb: '⊠', + timesbar: '⨱', + timesd: '⨰', + tint: '∭', + toea: '⤨', + top: '⊤', + topbot: '⌶', + topcir: '⫱', + topf: '𝕥', + topfork: '⫚', + tosa: '⤩', + tprime: '‴', + trade: '™', + triangle: '▵', + triangledown: '▿', + triangleleft: '◃', + trianglelefteq: '⊴', + triangleq: '≜', + triangleright: '▹', + trianglerighteq: '⊵', + tridot: '◬', + trie: '≜', + triminus: '⨺', + triplus: '⨹', + trisb: '⧍', + tritime: '⨻', + trpezium: '⏢', + tscr: '𝓉', + tscy: 'ц', + tshcy: 'ћ', + tstrok: 'ŧ', + twixt: '≬', + twoheadleftarrow: '↞', + twoheadrightarrow: '↠', + uArr: '⇑', + uHar: '⥣', + uacute: 'ú', + uarr: '↑', + ubrcy: 'ў', + ubreve: 'ŭ', + ucirc: 'û', + ucy: 'у', + udarr: '⇅', + udblac: 'ű', + udhar: '⥮', + ufisht: '⥾', + ufr: '𝔲', + ugrave: 'ù', + uharl: '↿', + uharr: '↾', + uhblk: '▀', + ulcorn: '⌜', + ulcorner: '⌜', + ulcrop: '⌏', + ultri: '◸', + umacr: 'ū', + uml: '¨', + uogon: 'ų', + uopf: '𝕦', + uparrow: '↑', + updownarrow: '↕', + upharpoonleft: '↿', + upharpoonright: '↾', + uplus: '⊎', + upsi: 'υ', + upsih: 'ϒ', + upsilon: 'υ', + upuparrows: '⇈', + urcorn: '⌝', + urcorner: '⌝', + urcrop: '⌎', + uring: 'ů', + urtri: '◹', + uscr: '𝓊', + utdot: '⋰', + utilde: 'ũ', + utri: '▵', + utrif: '▴', + uuarr: '⇈', + uuml: 'ü', + uwangle: '⦧', + vArr: '⇕', + vBar: '⫨', + vBarv: '⫩', + vDash: '⊨', + vangrt: '⦜', + varepsilon: 'ϵ', + varkappa: 'ϰ', + varnothing: '∅', + varphi: 'ϕ', + varpi: 'ϖ', + varpropto: '∝', + varr: '↕', + varrho: 'ϱ', + varsigma: 'ς', + varsubsetneq: '⊊︀', + varsubsetneqq: '⫋︀', + varsupsetneq: '⊋︀', + varsupsetneqq: '⫌︀', + vartheta: 'ϑ', + vartriangleleft: '⊲', + vartriangleright: '⊳', + vcy: 'в', + vdash: '⊢', + vee: '∨', + veebar: '⊻', + veeeq: '≚', + vellip: '⋮', + verbar: '|', + vert: '|', + vfr: '𝔳', + vltri: '⊲', + vnsub: '⊂⃒', + vnsup: '⊃⃒', + vopf: '𝕧', + vprop: '∝', + vrtri: '⊳', + vscr: '𝓋', + vsubnE: '⫋︀', + vsubne: '⊊︀', + vsupnE: '⫌︀', + vsupne: '⊋︀', + vzigzag: '⦚', + wcirc: 'ŵ', + wedbar: '⩟', + wedge: '∧', + wedgeq: '≙', + weierp: '℘', + wfr: '𝔴', + wopf: '𝕨', + wp: '℘', + wr: '≀', + wreath: '≀', + wscr: '𝓌', + xcap: '⋂', + xcirc: '◯', + xcup: '⋃', + xdtri: '▽', + xfr: '𝔵', + xhArr: '⟺', + xharr: '⟷', + xi: 'ξ', + xlArr: '⟸', + xlarr: '⟵', + xmap: '⟼', + xnis: '⋻', + xodot: '⨀', + xopf: '𝕩', + xoplus: '⨁', + xotime: '⨂', + xrArr: '⟹', + xrarr: '⟶', + xscr: '𝓍', + xsqcup: '⨆', + xuplus: '⨄', + xutri: '△', + xvee: '⋁', + xwedge: '⋀', + yacute: 'ý', + yacy: 'я', + ycirc: 'ŷ', + ycy: 'ы', + yen: '¥', + yfr: '𝔶', + yicy: 'ї', + yopf: '𝕪', + yscr: '𝓎', + yucy: 'ю', + yuml: 'ÿ', + zacute: 'ź', + zcaron: 'ž', + zcy: 'з', + zdot: 'ż', + zeetrf: 'ℨ', + zeta: 'ζ', + zfr: '𝔷', + zhcy: 'ж', + zigrarr: '⇝', + zopf: '𝕫', + zscr: '𝓏', + zwj: '‍', + zwnj: '‌' +} + +;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js + + +const own = {}.hasOwnProperty + +/** + * Decode a single character reference (without the `&` or `;`). + * You probably only need this when you’re building parsers yourself that follow + * different rules compared to HTML. + * This is optimized to be tiny in browsers. + * + * @param {string} value + * `notin` (named), `#123` (deci), `#x123` (hexa). + * @returns {string|false} + * Decoded reference. + */ +function decodeNamedCharacterReference(value) { + return own.call(characterEntities, value) ? characterEntities[value] : false +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const characterReference = { + name: 'characterReference', + tokenize: tokenizeCharacterReference +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterReference(effects, ok, nok) { + const self = this + let size = 0 + /** @type {number} */ + let max + /** @type {(code: Code) => boolean} */ + let test + return start + + /** + * Start of character reference. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterReference') + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + return open + } + + /** + * After `&`, at `#` for numeric references or alphanumeric for named + * references. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 35) { + effects.enter('characterReferenceMarkerNumeric') + effects.consume(code) + effects.exit('characterReferenceMarkerNumeric') + return numeric + } + effects.enter('characterReferenceValue') + max = 31 + test = asciiAlphanumeric + return value(code) + } + + /** + * After `#`, at `x` for hexadecimals or digit for decimals. + * + * ```markdown + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function numeric(code) { + if (code === 88 || code === 120) { + effects.enter('characterReferenceMarkerHexadecimal') + effects.consume(code) + effects.exit('characterReferenceMarkerHexadecimal') + effects.enter('characterReferenceValue') + max = 6 + test = asciiHexDigit + return value + } + effects.enter('characterReferenceValue') + max = 7 + test = asciiDigit + return value(code) + } + + /** + * After markers (`&#x`, `&#`, or `&`), in value, before `;`. + * + * The character reference kind defines what and how many characters are + * allowed. + * + * ```markdown + * > | a&b + * ^^^ + * > | a{b + * ^^^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function value(code) { + if (code === 59 && size) { + const token = effects.exit('characterReferenceValue') + if ( + test === asciiAlphanumeric && + !decodeNamedCharacterReference(self.sliceSerialize(token)) + ) { + return nok(code) + } + + // To do: `markdown-rs` uses a different name: + // `CharacterReferenceMarkerSemi`. + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + effects.exit('characterReference') + return ok + } + if (test(code) && size++ < max) { + effects.consume(code) + return value + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const characterEscape = { + name: 'characterEscape', + tokenize: tokenizeCharacterEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterEscape(effects, ok, nok) { + return start + + /** + * Start of character escape. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterEscape') + effects.enter('escapeMarker') + effects.consume(code) + effects.exit('escapeMarker') + return inside + } + + /** + * After `\`, at punctuation. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + // ASCII punctuation. + if (asciiPunctuation(code)) { + effects.enter('characterEscapeValue') + effects.consume(code) + effects.exit('characterEscapeValue') + effects.exit('characterEscape') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const lineEnding = { + name: 'lineEnding', + tokenize: tokenizeLineEnding +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLineEnding(effects, ok) { + return start + + /** @type {State} */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, ok, 'linePrefix') + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + + +/** @type {Construct} */ +const labelEnd = { + name: 'labelEnd', + tokenize: tokenizeLabelEnd, + resolveTo: resolveToLabelEnd, + resolveAll: resolveAllLabelEnd +} + +/** @type {Construct} */ +const resourceConstruct = { + tokenize: tokenizeResource +} +/** @type {Construct} */ +const referenceFullConstruct = { + tokenize: tokenizeReferenceFull +} +/** @type {Construct} */ +const referenceCollapsedConstruct = { + tokenize: tokenizeReferenceCollapsed +} + +/** @type {Resolver} */ +function resolveAllLabelEnd(events) { + let index = -1 + while (++index < events.length) { + const token = events[index][1] + if ( + token.type === 'labelImage' || + token.type === 'labelLink' || + token.type === 'labelEnd' + ) { + // Remove the marker. + events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) + token.type = 'data' + index++ + } + } + return events +} + +/** @type {Resolver} */ +function resolveToLabelEnd(events, context) { + let index = events.length + let offset = 0 + /** @type {Token} */ + let token + /** @type {number | undefined} */ + let open + /** @type {number | undefined} */ + let close + /** @type {Array<Event>} */ + let media + + // Find an opening. + while (index--) { + token = events[index][1] + if (open) { + // If we see another link, or inactive link label, we’ve been here before. + if ( + token.type === 'link' || + (token.type === 'labelLink' && token._inactive) + ) { + break + } + + // Mark other link openings as inactive, as we can’t have links in + // links. + if (events[index][0] === 'enter' && token.type === 'labelLink') { + token._inactive = true + } + } else if (close) { + if ( + events[index][0] === 'enter' && + (token.type === 'labelImage' || token.type === 'labelLink') && + !token._balanced + ) { + open = index + if (token.type !== 'labelLink') { + offset = 2 + break + } + } + } else if (token.type === 'labelEnd') { + close = index + } + } + const group = { + type: events[open][1].type === 'labelLink' ? 'link' : 'image', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + const label = { + type: 'label', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[close][1].end) + } + const text = { + type: 'labelText', + start: Object.assign({}, events[open + offset + 2][1].end), + end: Object.assign({}, events[close - 2][1].start) + } + media = [ + ['enter', group, context], + ['enter', label, context] + ] + + // Opening marker. + media = push(media, events.slice(open + 1, open + offset + 3)) + + // Text open. + media = push(media, [['enter', text, context]]) + + // Always populated by defaults. + + // Between. + media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ) + + // Text close, marker close, label close. + media = push(media, [ + ['exit', text, context], + events[close - 2], + events[close - 1], + ['exit', label, context] + ]) + + // Reference, resource, or so. + media = push(media, events.slice(close + 1)) + + // Media close. + media = push(media, [['exit', group, context]]) + splice(events, open, events.length, media) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelEnd(effects, ok, nok) { + const self = this + let index = self.events.length + /** @type {Token} */ + let labelStart + /** @type {boolean} */ + let defined + + // Find an opening. + while (index--) { + if ( + (self.events[index][1].type === 'labelImage' || + self.events[index][1].type === 'labelLink') && + !self.events[index][1]._balanced + ) { + labelStart = self.events[index][1] + break + } + } + return start + + /** + * Start of label end. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ``` + * + * @type {State} + */ + function start(code) { + // If there is not an okay opening. + if (!labelStart) { + return nok(code) + } + + // If the corresponding label (link) start is marked as inactive, + // it means we’d be wrapping a link, like this: + // + // ```markdown + // > | a [b [c](d) e](f) g. + // ^ + // ``` + // + // We can’t have that, so it’s just balanced brackets. + if (labelStart._inactive) { + return labelEndNok(code) + } + defined = self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize({ + start: labelStart.end, + end: self.now() + }) + ) + ) + effects.enter('labelEnd') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelEnd') + return after + } + + /** + * After `]`. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + // Note: `markdown-rs` also parses GFM footnotes here, which for us is in + // an extension. + + // Resource (`[asd](fgh)`)? + if (code === 40) { + return effects.attempt( + resourceConstruct, + labelEndOk, + defined ? labelEndOk : labelEndNok + )(code) + } + + // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? + if (code === 91) { + return effects.attempt( + referenceFullConstruct, + labelEndOk, + defined ? referenceNotFull : labelEndNok + )(code) + } + + // Shortcut (`[asd]`) reference? + return defined ? labelEndOk(code) : labelEndNok(code) + } + + /** + * After `]`, at `[`, but not at a full reference. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function referenceNotFull(code) { + return effects.attempt( + referenceCollapsedConstruct, + labelEndOk, + labelEndNok + )(code) + } + + /** + * Done, we found something. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndOk(code) { + // Note: `markdown-rs` does a bunch of stuff here. + return ok(code) + } + + /** + * Done, it’s nothing. + * + * There was an okay opening, but we didn’t match anything. + * + * ```markdown + * > | [a](b c + * ^ + * > | [a][b c + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndNok(code) { + labelStart._balanced = true + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeResource(effects, ok, nok) { + return resourceStart + + /** + * At a resource. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceStart(code) { + effects.enter('resource') + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + return resourceBefore + } + + /** + * In resource, after `(`, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceOpen)(code) + : resourceOpen(code) + } + + /** + * In resource, after optional whitespace, at `)` or a destination. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceOpen(code) { + if (code === 41) { + return resourceEnd(code) + } + return factoryDestination( + effects, + resourceDestinationAfter, + resourceDestinationMissing, + 'resourceDestination', + 'resourceDestinationLiteral', + 'resourceDestinationLiteralMarker', + 'resourceDestinationRaw', + 'resourceDestinationString', + 32 + )(code) + } + + /** + * In resource, after destination, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceBetween)(code) + : resourceEnd(code) + } + + /** + * At invalid destination. + * + * ```markdown + * > | [a](<<) b + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationMissing(code) { + return nok(code) + } + + /** + * In resource, after destination and whitespace, at `(` or title. + * + * ```markdown + * > | [a](b ) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBetween(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + resourceTitleAfter, + nok, + 'resourceTitle', + 'resourceTitleMarker', + 'resourceTitleString' + )(code) + } + return resourceEnd(code) + } + + /** + * In resource, after title, at optional whitespace. + * + * ```markdown + * > | [a](b "c") d + * ^ + * ``` + * + * @type {State} + */ + function resourceTitleAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceEnd)(code) + : resourceEnd(code) + } + + /** + * In resource, at `)`. + * + * ```markdown + * > | [a](b) d + * ^ + * ``` + * + * @type {State} + */ + function resourceEnd(code) { + if (code === 41) { + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + effects.exit('resource') + return ok + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceFull(effects, ok, nok) { + const self = this + return referenceFull + + /** + * In a reference (full), at the `[`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFull(code) { + return factoryLabel.call( + self, + effects, + referenceFullAfter, + referenceFullMissing, + 'reference', + 'referenceMarker', + 'referenceString' + )(code) + } + + /** + * In a reference (full), after `]`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullAfter(code) { + return self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + ) + ? ok(code) + : nok(code) + } + + /** + * In reference (full) that was missing. + * + * ```markdown + * > | [a][b d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullMissing(code) { + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceCollapsed(effects, ok, nok) { + return referenceCollapsedStart + + /** + * In reference (collapsed), at `[`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedStart(code) { + // We only attempt a collapsed label if there’s a `[`. + + effects.enter('reference') + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + return referenceCollapsedOpen + } + + /** + * In reference (collapsed), at `]`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedOpen(code) { + if (code === 93) { + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + effects.exit('reference') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartImage = { + name: 'labelStartImage', + tokenize: tokenizeLabelStartImage, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartImage(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (image) start. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelImage') + effects.enter('labelImageMarker') + effects.consume(code) + effects.exit('labelImageMarker') + return open + } + + /** + * After `!`, at `[`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 91) { + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelImage') + return after + } + return nok(code) + } + + /** + * After `![`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * This is needed in because, when GFM footnotes are enabled, images never + * form when started with a `^`. + * Instead, links form: + * + * ```markdown + * ![^a](b) + * + * ![^a][b] + * + * [b]: c + * ``` + * + * ```html + * <p>!<a href=\"b\">^a</a></p> + * <p>!<a href=\"c\">^a</a></p> + * ``` + * + * @type {State} + */ + function after(code) { + // To do: use a new field to do this, this is still needed for + // `micromark-extension-gfm-footnote`, but the `label-start-link` + // behavior isn’t. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + +/** + * Classify whether a code represents whitespace, punctuation, or something + * else. + * + * Used for attention (emphasis, strong), whose sequences can open or close + * based on the class of surrounding characters. + * + * > 👉 **Note**: eof (`null`) is seen as whitespace. + * + * @param {Code} code + * Code. + * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} + * Group. + */ +function classifyCharacter(code) { + if ( + code === null || + markdownLineEndingOrSpace(code) || + unicodeWhitespace(code) + ) { + return 1 + } + if (unicodePunctuation(code)) { + return 2 + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const attention = { + name: 'attention', + tokenize: tokenizeAttention, + resolveAll: resolveAllAttention +} + +/** + * Take all events and resolve attention to emphasis or strong. + * + * @type {Resolver} + */ +function resolveAllAttention(events, context) { + let index = -1 + /** @type {number} */ + let open + /** @type {Token} */ + let group + /** @type {Token} */ + let text + /** @type {Token} */ + let openingSequence + /** @type {Token} */ + let closingSequence + /** @type {number} */ + let use + /** @type {Array<Event>} */ + let nextEvents + /** @type {number} */ + let offset + + // Walk through all events. + // + // Note: performance of this is fine on an mb of normal markdown, but it’s + // a bottleneck for malicious stuff. + while (++index < events.length) { + // Find a token that can close. + if ( + events[index][0] === 'enter' && + events[index][1].type === 'attentionSequence' && + events[index][1]._close + ) { + open = index + + // Now walk back to find an opener. + while (open--) { + // Find a token that can open the closer. + if ( + events[open][0] === 'exit' && + events[open][1].type === 'attentionSequence' && + events[open][1]._open && + // If the markers are the same: + context.sliceSerialize(events[open][1]).charCodeAt(0) === + context.sliceSerialize(events[index][1]).charCodeAt(0) + ) { + // If the opening can close or the closing can open, + // and the close size *is not* a multiple of three, + // but the sum of the opening and closing size *is* multiple of three, + // then don’t match. + if ( + (events[open][1]._close || events[index][1]._open) && + (events[index][1].end.offset - events[index][1].start.offset) % 3 && + !( + (events[open][1].end.offset - + events[open][1].start.offset + + events[index][1].end.offset - + events[index][1].start.offset) % + 3 + ) + ) { + continue + } + + // Number of markers to use from the sequence. + use = + events[open][1].end.offset - events[open][1].start.offset > 1 && + events[index][1].end.offset - events[index][1].start.offset > 1 + ? 2 + : 1 + const start = Object.assign({}, events[open][1].end) + const end = Object.assign({}, events[index][1].start) + movePoint(start, -use) + movePoint(end, use) + openingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start, + end: Object.assign({}, events[open][1].end) + } + closingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start: Object.assign({}, events[index][1].start), + end + } + text = { + type: use > 1 ? 'strongText' : 'emphasisText', + start: Object.assign({}, events[open][1].end), + end: Object.assign({}, events[index][1].start) + } + group = { + type: use > 1 ? 'strong' : 'emphasis', + start: Object.assign({}, openingSequence.start), + end: Object.assign({}, closingSequence.end) + } + events[open][1].end = Object.assign({}, openingSequence.start) + events[index][1].start = Object.assign({}, closingSequence.end) + nextEvents = [] + + // If there are more markers in the opening, add them before. + if (events[open][1].end.offset - events[open][1].start.offset) { + nextEvents = push(nextEvents, [ + ['enter', events[open][1], context], + ['exit', events[open][1], context] + ]) + } + + // Opening. + nextEvents = push(nextEvents, [ + ['enter', group, context], + ['enter', openingSequence, context], + ['exit', openingSequence, context], + ['enter', text, context] + ]) + + // Always populated by defaults. + + // Between. + nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index), + context + ) + ) + + // Closing. + nextEvents = push(nextEvents, [ + ['exit', text, context], + ['enter', closingSequence, context], + ['exit', closingSequence, context], + ['exit', group, context] + ]) + + // If there are more markers in the closing, add them after. + if (events[index][1].end.offset - events[index][1].start.offset) { + offset = 2 + nextEvents = push(nextEvents, [ + ['enter', events[index][1], context], + ['exit', events[index][1], context] + ]) + } else { + offset = 0 + } + splice(events, open - 1, index - open + 3, nextEvents) + index = open + nextEvents.length - offset - 2 + break + } + } + } + } + + // Remove remaining sequences. + index = -1 + while (++index < events.length) { + if (events[index][1].type === 'attentionSequence') { + events[index][1].type = 'data' + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAttention(effects, ok) { + const attentionMarkers = this.parser.constructs.attentionMarkers.null + const previous = this.previous + const before = classifyCharacter(previous) + + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Before a sequence. + * + * ```markdown + * > | ** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + marker = code + effects.enter('attentionSequence') + return inside(code) + } + + /** + * In a sequence. + * + * ```markdown + * > | ** + * ^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + const token = effects.exit('attentionSequence') + + // To do: next major: move this to resolver, just like `markdown-rs`. + const after = classifyCharacter(code) + + // Always populated by defaults. + + const open = + !after || (after === 2 && before) || attentionMarkers.includes(code) + const close = + !before || (before === 2 && after) || attentionMarkers.includes(previous) + token._open = Boolean(marker === 42 ? open : open && (before || !close)) + token._close = Boolean(marker === 42 ? close : close && (after || !open)) + return ok(code) + } +} + +/** + * Move a point a bit. + * + * Note: `move` only works inside lines! It’s not possible to move past other + * chunks (replacement characters, tabs, or line endings). + * + * @param {Point} point + * @param {number} offset + * @returns {void} + */ +function movePoint(point, offset) { + point.column += offset + point.offset += offset + point._bufferIndex += offset +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const autolink = { + name: 'autolink', + tokenize: tokenizeAutolink +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAutolink(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of an autolink. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('autolink') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.enter('autolinkProtocol') + return open + } + + /** + * After `<`, at protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (asciiAlpha(code)) { + effects.consume(code) + return schemeOrEmailAtext + } + return emailAtext(code) + } + + /** + * At second byte of protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function schemeOrEmailAtext(code) { + // ASCII alphanumeric and `+`, `-`, and `.`. + if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { + // Count the previous alphabetical from `open` too. + size = 1 + return schemeInsideOrEmailAtext(code) + } + return emailAtext(code) + } + + /** + * In ambiguous protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function schemeInsideOrEmailAtext(code) { + if (code === 58) { + effects.consume(code) + size = 0 + return urlInside + } + + // ASCII alphanumeric and `+`, `-`, and `.`. + if ( + (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && + size++ < 32 + ) { + effects.consume(code) + return schemeInsideOrEmailAtext + } + size = 0 + return emailAtext(code) + } + + /** + * After protocol, in URL. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * ``` + * + * @type {State} + */ + function urlInside(code) { + if (code === 62) { + effects.exit('autolinkProtocol') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + + // ASCII control, space, or `<`. + if (code === null || code === 32 || code === 60 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return urlInside + } + + /** + * In email atext. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailAtext(code) { + if (code === 64) { + effects.consume(code) + return emailAtSignOrDot + } + if (asciiAtext(code)) { + effects.consume(code) + return emailAtext + } + return nok(code) + } + + /** + * In label, after at-sign or dot. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ ^ + * ``` + * + * @type {State} + */ + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) + } + + /** + * In label, where `.` and `>` are allowed. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailLabel(code) { + if (code === 46) { + effects.consume(code) + size = 0 + return emailAtSignOrDot + } + if (code === 62) { + // Exit, then change the token type. + effects.exit('autolinkProtocol').type = 'autolinkEmail' + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + return emailValue(code) + } + + /** + * In label, where `.` and `>` are *not* allowed. + * + * Though, this is also used in `emailLabel` to parse other values. + * + * ```markdown + * > | a<user.name@ex-ample.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailValue(code) { + // ASCII alphanumeric or `-`. + if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { + const next = code === 45 ? emailValue : emailLabel + effects.consume(code) + return next + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const htmlText = { + name: 'htmlText', + tokenize: tokenizeHtmlText +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlText(effects, ok, nok) { + const self = this + /** @type {NonNullable<Code> | undefined} */ + let marker + /** @type {number} */ + let index + /** @type {State} */ + let returnState + return start + + /** + * Start of HTML (text). + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('htmlText') + effects.enter('htmlTextData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | a <b> c + * ^ + * > | a <!doctype> c + * ^ + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + return instruction + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagOpen + } + return nok(code) + } + + /** + * After `<!`, at declaration, comment, or CDATA. + * + * ```markdown + * > | a <!doctype> c + * ^ + * > | a <!--b--> c + * ^ + * > | a <![CDATA[>&<]]> c + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + index = 0 + return cdataOpenInside + } + if (asciiAlpha(code)) { + effects.consume(code) + return declaration + } + return nok(code) + } + + /** + * In a comment, after `<!-`, at another `-`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return nok(code) + } + + /** + * In comment. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function comment(code) { + if (code === null) { + return nok(code) + } + if (code === 45) { + effects.consume(code) + return commentClose + } + if (markdownLineEnding(code)) { + returnState = comment + return lineEndingBefore(code) + } + effects.consume(code) + return comment + } + + /** + * In comment, after `-`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentClose(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return comment(code) + } + + /** + * In comment, after `--`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentEnd(code) { + return code === 62 + ? end(code) + : code === 45 + ? commentClose(code) + : comment(code) + } + + /** + * After `<![`, in CDATA, expecting `CDATA[`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + return index === value.length ? cdata : cdataOpenInside + } + return nok(code) + } + + /** + * In CDATA. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^^^ + * ``` + * + * @type {State} + */ + function cdata(code) { + if (code === null) { + return nok(code) + } + if (code === 93) { + effects.consume(code) + return cdataClose + } + if (markdownLineEnding(code)) { + returnState = cdata + return lineEndingBefore(code) + } + effects.consume(code) + return cdata + } + + /** + * In CDATA, after `]`, at another `]`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataClose(code) { + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In CDATA, after `]]`, at `>`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataEnd(code) { + if (code === 62) { + return end(code) + } + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In declaration. + * + * ```markdown + * > | a <!b> c + * ^ + * ``` + * + * @type {State} + */ + function declaration(code) { + if (code === null || code === 62) { + return end(code) + } + if (markdownLineEnding(code)) { + returnState = declaration + return lineEndingBefore(code) + } + effects.consume(code) + return declaration + } + + /** + * In instruction. + * + * ```markdown + * > | a <?b?> c + * ^ + * ``` + * + * @type {State} + */ + function instruction(code) { + if (code === null) { + return nok(code) + } + if (code === 63) { + effects.consume(code) + return instructionClose + } + if (markdownLineEnding(code)) { + returnState = instruction + return lineEndingBefore(code) + } + effects.consume(code) + return instruction + } + + /** + * In instruction, after `?`, at `>`. + * + * ```markdown + * > | a <?b?> c + * ^ + * ``` + * + * @type {State} + */ + function instructionClose(code) { + return code === 62 ? end(code) : instruction(code) + } + + /** + * After `</`, in closing tag, at tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagClose + } + return nok(code) + } + + /** + * After `</x`, in a tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagClose(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagClose + } + return tagCloseBetween(code) + } + + /** + * In closing tag, after tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseBetween(code) { + if (markdownLineEnding(code)) { + returnState = tagCloseBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagCloseBetween + } + return end(code) + } + + /** + * After `<x`, in opening tag name. + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function tagOpen(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagOpen + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In opening tag, after tag name. + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function tagOpenBetween(code) { + if (code === 47) { + effects.consume(code) + return end + } + + // ASCII alphabetical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return tagOpenAttributeName + } + if (markdownLineEnding(code)) { + returnState = tagOpenBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenBetween + } + return end(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | a <b c> d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeName(code) { + // ASCII alphabetical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return tagOpenAttributeName + } + return tagOpenAttributeNameAfter(code) + } + + /** + * After attribute name, before initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | a <b c> d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeNameAfter + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeNameAfter + } + return tagOpenBetween(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | a <b c=d> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + marker = code + return tagOpenAttributeValueQuoted + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueBefore + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code) + marker = undefined + return tagOpenAttributeValueQuotedAfter + } + if (code === null) { + return nok(code) + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueQuoted + return lineEndingBefore(code) + } + effects.consume(code) + return tagOpenAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | a <b c=d> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 60 || + code === 61 || + code === 96 + ) { + return nok(code) + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the end + * of the tag. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In certain circumstances of a tag where only an `>` is allowed. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function end(code) { + if (code === 62) { + effects.consume(code) + effects.exit('htmlTextData') + effects.exit('htmlText') + return ok + } + return nok(code) + } + + /** + * At eol. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * > | a <!--a + * ^ + * | b--> + * ``` + * + * @type {State} + */ + function lineEndingBefore(code) { + effects.exit('htmlTextData') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineEndingAfter + } + + /** + * After eol, at optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a <!--a + * > | b--> + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfter(code) { + // Always populated by defaults. + + return markdownSpace(code) + ? factorySpace( + effects, + lineEndingAfterPrefix, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : lineEndingAfterPrefix(code) + } + + /** + * After eol, after optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a <!--a + * > | b--> + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfterPrefix(code) { + effects.enter('htmlTextData') + return returnState(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartLink = { + name: 'labelStartLink', + tokenize: tokenizeLabelStartLink, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartLink(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (link) start. + * + * ```markdown + * > | a [b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelLink') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelLink') + return after + } + + /** @type {State} */ + function after(code) { + // To do: this isn’t needed in `micromark-extension-gfm-footnote`, + // remove. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const hardBreakEscape = { + name: 'hardBreakEscape', + tokenize: tokenizeHardBreakEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHardBreakEscape(effects, ok, nok) { + return start + + /** + * Start of a hard break (escape). + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('hardBreakEscape') + effects.consume(code) + return after + } + + /** + * After `\`, at eol. + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownLineEnding(code)) { + effects.exit('hardBreakEscape') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Previous} Previous + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const codeText = { + name: 'codeText', + tokenize: tokenizeCodeText, + resolve: resolveCodeText, + previous +} + +// To do: next major: don’t resolve, like `markdown-rs`. +/** @type {Resolver} */ +function resolveCodeText(events) { + let tailExitIndex = events.length - 4 + let headEnterIndex = 3 + /** @type {number} */ + let index + /** @type {number | undefined} */ + let enter + + // If we start and end with an EOL or a space. + if ( + (events[headEnterIndex][1].type === 'lineEnding' || + events[headEnterIndex][1].type === 'space') && + (events[tailExitIndex][1].type === 'lineEnding' || + events[tailExitIndex][1].type === 'space') + ) { + index = headEnterIndex + + // And we have data. + while (++index < tailExitIndex) { + if (events[index][1].type === 'codeTextData') { + // Then we have padding. + events[headEnterIndex][1].type = 'codeTextPadding' + events[tailExitIndex][1].type = 'codeTextPadding' + headEnterIndex += 2 + tailExitIndex -= 2 + break + } + } + } + + // Merge adjacent spaces and data. + index = headEnterIndex - 1 + tailExitIndex++ + while (++index <= tailExitIndex) { + if (enter === undefined) { + if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { + enter = index + } + } else if ( + index === tailExitIndex || + events[index][1].type === 'lineEnding' + ) { + events[enter][1].type = 'codeTextData' + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + tailExitIndex -= index - enter - 2 + index = enter + 2 + } + enter = undefined + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Previous} + */ +function previous(code) { + // If there is a previous code, there will always be a tail. + return ( + code !== 96 || + this.events[this.events.length - 1][1].type === 'characterEscape' + ) +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeText(effects, ok, nok) { + const self = this + let sizeOpen = 0 + /** @type {number} */ + let size + /** @type {Token} */ + let token + return start + + /** + * Start of code (text). + * + * ```markdown + * > | `a` + * ^ + * > | \`a` + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('codeText') + effects.enter('codeTextSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 96) { + effects.consume(code) + sizeOpen++ + return sequenceOpen + } + effects.exit('codeTextSequence') + return between(code) + } + + /** + * Between something and something else. + * + * ```markdown + * > | `a` + * ^^ + * ``` + * + * @type {State} + */ + function between(code) { + // EOF. + if (code === null) { + return nok(code) + } + + // To do: next major: don’t do spaces in resolve, but when compiling, + // like `markdown-rs`. + // Tabs don’t work, and virtual spaces don’t make sense. + if (code === 32) { + effects.enter('space') + effects.consume(code) + effects.exit('space') + return between + } + + // Closing fence? Could also be data. + if (code === 96) { + token = effects.enter('codeTextSequence') + size = 0 + return sequenceClose(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return between + } + + // Data. + effects.enter('codeTextData') + return data(code) + } + + /** + * In data. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if ( + code === null || + code === 32 || + code === 96 || + markdownLineEnding(code) + ) { + effects.exit('codeTextData') + return between(code) + } + effects.consume(code) + return data + } + + /** + * In closing sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + // More. + if (code === 96) { + effects.consume(code) + size++ + return sequenceClose + } + + // Done! + if (size === sizeOpen) { + effects.exit('codeTextSequence') + effects.exit('codeText') + return ok(code) + } + + // More or less accents: mark as data. + token.type = 'codeTextData' + return data(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + */ + + + + +/** @satisfies {Extension['document']} */ +const constructs_document = { + [42]: list, + [43]: list, + [45]: list, + [48]: list, + [49]: list, + [50]: list, + [51]: list, + [52]: list, + [53]: list, + [54]: list, + [55]: list, + [56]: list, + [57]: list, + [62]: blockQuote +} + +/** @satisfies {Extension['contentInitial']} */ +const contentInitial = { + [91]: definition +} + +/** @satisfies {Extension['flowInitial']} */ +const flowInitial = { + [-2]: codeIndented, + [-1]: codeIndented, + [32]: codeIndented +} + +/** @satisfies {Extension['flow']} */ +const constructs_flow = { + [35]: headingAtx, + [42]: thematicBreak, + [45]: [setextUnderline, thematicBreak], + [60]: htmlFlow, + [61]: setextUnderline, + [95]: thematicBreak, + [96]: codeFenced, + [126]: codeFenced +} + +/** @satisfies {Extension['string']} */ +const constructs_string = { + [38]: characterReference, + [92]: characterEscape +} + +/** @satisfies {Extension['text']} */ +const constructs_text = { + [-5]: lineEnding, + [-4]: lineEnding, + [-3]: lineEnding, + [33]: labelStartImage, + [38]: characterReference, + [42]: attention, + [60]: [autolink, htmlText], + [91]: labelStartLink, + [92]: [hardBreakEscape, characterEscape], + [93]: labelEnd, + [95]: attention, + [96]: codeText +} + +/** @satisfies {Extension['insideSpan']} */ +const insideSpan = { + null: [attention, resolver] +} + +/** @satisfies {Extension['attentionMarkers']} */ +const attentionMarkers = { + null: [42, 95] +} + +/** @satisfies {Extension['disable']} */ +const disable = { + null: [] +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js +/** + * @typedef {import('micromark-util-types').Create} Create + * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + */ + + + + + + + + + +/** + * @param {ParseOptions | null | undefined} [options] + * @returns {ParseContext} + */ +function parse(options) { + const settings = options || {} + const constructs = + /** @type {FullNormalizedExtension} */ + combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) + + /** @type {ParseContext} */ + const parser = { + defined: [], + lazy: {}, + constructs, + content: create(content), + document: create(document_document), + flow: create(flow), + string: create(string), + text: create(text_text) + } + return parser + + /** + * @param {InitialConstruct} initial + */ + function create(initial) { + return creator + /** @type {Create} */ + function creator(from) { + return createTokenizer(parser, initial, from) + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Value} Value + */ + +/** + * @callback Preprocessor + * @param {Value} value + * @param {Encoding | null | undefined} [encoding] + * @param {boolean | null | undefined} [end=false] + * @returns {Array<Chunk>} + */ + +const search = /[\0\t\n\r]/g + +/** + * @returns {Preprocessor} + */ +function preprocess() { + let column = 1 + let buffer = '' + /** @type {boolean | undefined} */ + let start = true + /** @type {boolean | undefined} */ + let atCarriageReturn + return preprocessor + + /** @type {Preprocessor} */ + function preprocessor(value, encoding, end) { + /** @type {Array<Chunk>} */ + const chunks = [] + /** @type {RegExpMatchArray | null} */ + let match + /** @type {number} */ + let next + /** @type {number} */ + let startPosition + /** @type {number} */ + let endPosition + /** @type {Code} */ + let code + + // @ts-expect-error `Buffer` does allow an encoding. + value = buffer + value.toString(encoding) + startPosition = 0 + buffer = '' + if (start) { + // To do: `markdown-rs` actually parses BOMs (byte order mark). + if (value.charCodeAt(0) === 65279) { + startPosition++ + } + start = undefined + } + while (startPosition < value.length) { + search.lastIndex = startPosition + match = search.exec(value) + endPosition = + match && match.index !== undefined ? match.index : value.length + code = value.charCodeAt(endPosition) + if (!match) { + buffer = value.slice(startPosition) + break + } + if (code === 10 && startPosition === endPosition && atCarriageReturn) { + chunks.push(-3) + atCarriageReturn = undefined + } else { + if (atCarriageReturn) { + chunks.push(-5) + atCarriageReturn = undefined + } + if (startPosition < endPosition) { + chunks.push(value.slice(startPosition, endPosition)) + column += endPosition - startPosition + } + switch (code) { + case 0: { + chunks.push(65533) + column++ + break + } + case 9: { + next = Math.ceil(column / 4) * 4 + chunks.push(-2) + while (column++ < next) chunks.push(-1) + break + } + case 10: { + chunks.push(-4) + column = 1 + break + } + default: { + atCarriageReturn = true + column = 1 + } + } + } + startPosition = endPosition + 1 + } + if (end) { + if (atCarriageReturn) chunks.push(-5) + if (buffer) chunks.push(buffer) + chunks.push(null) + } + return chunks + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js +/** + * @typedef {import('micromark-util-types').Event} Event + */ + + + +/** + * @param {Array<Event>} events + * @returns {Array<Event>} + */ +function postprocess(events) { + while (!subtokenize(events)) { + // Empty + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js +/** + * Turn the number (in string form as either hexa- or plain decimal) coming from + * a numeric character reference into a character. + * + * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes + * non-characters and control characters safe. + * + * @param {string} value + * Value to decode. + * @param {number} base + * Numeric base. + * @returns {string} + * Character. + */ +function decodeNumericCharacterReference(value, base) { + const code = Number.parseInt(value, base) + if ( + // C0 except for HT, LF, FF, CR, space. + code < 9 || + code === 11 || + (code > 13 && code < 32) || + // Control character (DEL) of C0, and C1 controls. + (code > 126 && code < 160) || + // Lone high surrogates and low surrogates. + (code > 55295 && code < 57344) || + // Noncharacters. + (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || + (code & 65535) === 65535 || + (code & 65535) === 65534 /* eslint-enable no-bitwise */ || + // Out of range + code > 1114111 + ) { + return '\uFFFD' + } + return String.fromCharCode(code) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js + + +const characterEscapeOrReference = + /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi + +/** + * Decode markdown strings (which occur in places such as fenced code info + * strings, destinations, labels, and titles). + * + * The “string” content type allows character escapes and -references. + * This decodes those. + * + * @param {string} value + * Value to decode. + * @returns {string} + * Decoded value. + */ +function decodeString(value) { + return value.replace(characterEscapeOrReference, decode) +} + +/** + * @param {string} $0 + * @param {string} $1 + * @param {string} $2 + * @returns {string} + */ +function decode($0, $1, $2) { + if ($1) { + // Escape. + return $1 + } + + // Reference. + const head = $2.charCodeAt(0) + if (head === 35) { + const head = $2.charCodeAt(1) + const hex = head === 120 || head === 88 + return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) + } + return decodeNamedCharacterReference($2) || $0 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js +/** + * @typedef {import('unist').Node} Node + * @typedef {import('unist').Point} Point + * @typedef {import('unist').Position} Position + */ + +/** + * @typedef NodeLike + * @property {string} type + * @property {PositionLike | null | undefined} [position] + * + * @typedef PositionLike + * @property {PointLike | null | undefined} [start] + * @property {PointLike | null | undefined} [end] + * + * @typedef PointLike + * @property {number | null | undefined} [line] + * @property {number | null | undefined} [column] + * @property {number | null | undefined} [offset] + */ + +/** + * Serialize the positional info of a point, position (start and end points), + * or node. + * + * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] + * Node, position, or point. + * @returns {string} + * Pretty printed positional info of a node (`string`). + * + * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) + * or a point `l:c` (when given `point`), where `l` stands for line, `c` for + * column, `s` for `start`, and `e` for end. + * An empty string (`''`) is returned if the given value is neither `node`, + * `position`, nor `point`. + */ +function stringifyPosition(value) { + // Nothing. + if (!value || typeof value !== 'object') { + return '' + } + + // Node. + if ('position' in value || 'type' in value) { + return position(value.position) + } + + // Position. + if ('start' in value || 'end' in value) { + return position(value) + } + + // Point. + if ('line' in value || 'column' in value) { + return point(value) + } + + // ? + return '' +} + +/** + * @param {Point | PointLike | null | undefined} point + * @returns {string} + */ +function point(point) { + return index(point && point.line) + ':' + index(point && point.column) +} + +/** + * @param {Position | PositionLike | null | undefined} pos + * @returns {string} + */ +function position(pos) { + return point(pos && pos.start) + '-' + point(pos && pos.end) +} + +/** + * @param {number | null | undefined} value + * @returns {number} + */ +function index(value) { + return value && typeof value === 'number' ? value : 1 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js +/** + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Value} Value + * + * @typedef {import('unist').Parent} UnistParent + * @typedef {import('unist').Point} Point + * + * @typedef {import('mdast').PhrasingContent} PhrasingContent + * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent + * @typedef {import('mdast').Content} Content + * @typedef {import('mdast').Break} Break + * @typedef {import('mdast').Blockquote} Blockquote + * @typedef {import('mdast').Code} Code + * @typedef {import('mdast').Definition} Definition + * @typedef {import('mdast').Emphasis} Emphasis + * @typedef {import('mdast').Heading} Heading + * @typedef {import('mdast').HTML} HTML + * @typedef {import('mdast').Image} Image + * @typedef {import('mdast').ImageReference} ImageReference + * @typedef {import('mdast').InlineCode} InlineCode + * @typedef {import('mdast').Link} Link + * @typedef {import('mdast').LinkReference} LinkReference + * @typedef {import('mdast').List} List + * @typedef {import('mdast').ListItem} ListItem + * @typedef {import('mdast').Paragraph} Paragraph + * @typedef {import('mdast').Root} Root + * @typedef {import('mdast').Strong} Strong + * @typedef {import('mdast').Text} Text + * @typedef {import('mdast').ThematicBreak} ThematicBreak + * @typedef {import('mdast').ReferenceType} ReferenceType + * @typedef {import('../index.js').CompileData} CompileData + */ + +/** + * @typedef {Root | Content} Node + * @typedef {Extract<Node, UnistParent>} Parent + * + * @typedef {Omit<UnistParent, 'type' | 'children'> & {type: 'fragment', children: Array<PhrasingContent>}} Fragment + */ + +/** + * @callback Transform + * Extra transform, to change the AST afterwards. + * @param {Root} tree + * Tree to transform. + * @returns {Root | undefined | null | void} + * New tree or nothing (in which case the current tree is used). + * + * @callback Handle + * Handle a token. + * @param {CompileContext} this + * Context. + * @param {Token} token + * Current token. + * @returns {void} + * Nothing. + * + * @typedef {Record<string, Handle>} Handles + * Token types mapping to handles + * + * @callback OnEnterError + * Handle the case where the `right` token is open, but it is closed (by the + * `left` token) or because we reached the end of the document. + * @param {Omit<CompileContext, 'sliceSerialize'>} this + * Context. + * @param {Token | undefined} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @callback OnExitError + * Handle the case where the `right` token is open but it is closed by + * exiting the `left` token. + * @param {Omit<CompileContext, 'sliceSerialize'>} this + * Context. + * @param {Token} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @typedef {[Token, OnEnterError | undefined]} TokenTuple + * Open token on the stack, with an optional error handler for when + * that token isn’t closed properly. + */ + +/** + * @typedef Config + * Configuration. + * + * We have our defaults, but extensions will add more. + * @property {Array<string>} canContainEols + * Token types where line endings are used. + * @property {Handles} enter + * Opening handles. + * @property {Handles} exit + * Closing handles. + * @property {Array<Transform>} transforms + * Tree transforms. + * + * @typedef {Partial<Config>} Extension + * Change how markdown tokens from micromark are turned into mdast. + * + * @typedef CompileContext + * mdast compiler context. + * @property {Array<Node | Fragment>} stack + * Stack of nodes. + * @property {Array<TokenTuple>} tokenStack + * Stack of tokens. + * @property {<Key extends keyof CompileData>(key: Key) => CompileData[Key]} getData + * Get data from the key/value store. + * @property {<Key extends keyof CompileData>(key: Key, value?: CompileData[Key]) => void} setData + * Set data into the key/value store. + * @property {(this: CompileContext) => void} buffer + * Capture some of the output data. + * @property {(this: CompileContext) => string} resume + * Stop capturing and access the output data. + * @property {<Kind extends Node>(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter + * Enter a token. + * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit + * Exit a token. + * @property {TokenizeContext['sliceSerialize']} sliceSerialize + * Get the string value of a token. + * @property {Config} config + * Configuration. + * + * @typedef FromMarkdownOptions + * Configuration for how to build mdast. + * @property {Array<Extension | Array<Extension>> | null | undefined} [mdastExtensions] + * Extensions for this utility to change how tokens are turned into a tree. + * + * @typedef {ParseOptions & FromMarkdownOptions} Options + * Configuration. + */ + +// To do: micromark: create a registry of tokens? +// To do: next major: don’t return given `Node` from `enter`. +// To do: next major: remove setter/getter. + + + + + + + + + + +const lib_own = {}.hasOwnProperty + +/** + * @param value + * Markdown to parse. + * @param encoding + * Character encoding for when `value` is `Buffer`. + * @param options + * Configuration. + * @returns + * mdast tree. + */ +const fromMarkdown = + /** + * @type {( + * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & + * ((value: Value, options?: Options | null | undefined) => Root) + * )} + */ + + /** + * @param {Value} value + * @param {Encoding | Options | null | undefined} [encoding] + * @param {Options | null | undefined} [options] + * @returns {Root} + */ + function (value, encoding, options) { + if (typeof encoding !== 'string') { + options = encoding + encoding = undefined + } + return compiler(options)( + postprocess( + parse(options).document().write(preprocess()(value, encoding, true)) + ) + ) + } + +/** + * Note this compiler only understand complete buffering, not streaming. + * + * @param {Options | null | undefined} [options] + */ +function compiler(options) { + /** @type {Config} */ + const config = { + transforms: [], + canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], + enter: { + autolink: opener(link), + autolinkProtocol: onenterdata, + autolinkEmail: onenterdata, + atxHeading: opener(heading), + blockQuote: opener(blockQuote), + characterEscape: onenterdata, + characterReference: onenterdata, + codeFenced: opener(codeFlow), + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: opener(codeFlow, buffer), + codeText: opener(codeText, buffer), + codeTextData: onenterdata, + data: onenterdata, + codeFlowValue: onenterdata, + definition: opener(definition), + definitionDestinationString: buffer, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: opener(emphasis), + hardBreakEscape: opener(hardBreak), + hardBreakTrailing: opener(hardBreak), + htmlFlow: opener(html, buffer), + htmlFlowData: onenterdata, + htmlText: opener(html, buffer), + htmlTextData: onenterdata, + image: opener(image), + label: buffer, + link: opener(link), + listItem: opener(listItem), + listItemValue: onenterlistitemvalue, + listOrdered: opener(list, onenterlistordered), + listUnordered: opener(list), + paragraph: opener(paragraph), + reference: onenterreference, + referenceString: buffer, + resourceDestinationString: buffer, + resourceTitleString: buffer, + setextHeading: opener(heading), + strong: opener(strong), + thematicBreak: opener(thematicBreak) + }, + exit: { + atxHeading: closer(), + atxHeadingSequence: onexitatxheadingsequence, + autolink: closer(), + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: closer(), + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: closer(onexitcodefenced), + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: onexitcodefencedfencemeta, + codeFlowValue: onexitdata, + codeIndented: closer(onexitcodeindented), + codeText: closer(onexitcodetext), + codeTextData: onexitdata, + data: onexitdata, + definition: closer(), + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: closer(), + hardBreakEscape: closer(onexithardbreak), + hardBreakTrailing: closer(onexithardbreak), + htmlFlow: closer(onexithtmlflow), + htmlFlowData: onexitdata, + htmlText: closer(onexithtmltext), + htmlTextData: onexitdata, + image: closer(onexitimage), + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: closer(onexitlink), + listItem: closer(), + listOrdered: closer(), + listUnordered: closer(), + paragraph: closer(), + referenceString: onexitreferencestring, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + resource: onexitresource, + setextHeading: closer(onexitsetextheading), + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: closer(), + thematicBreak: closer() + } + } + configure(config, (options || {}).mdastExtensions || []) + + /** @type {CompileData} */ + const data = {} + return compile + + /** + * Turn micromark events into an mdast tree. + * + * @param {Array<Event>} events + * Events. + * @returns {Root} + * mdast tree. + */ + function compile(events) { + /** @type {Root} */ + let tree = { + type: 'root', + children: [] + } + /** @type {Omit<CompileContext, 'sliceSerialize'>} */ + const context = { + stack: [tree], + tokenStack: [], + config, + enter, + exit, + buffer, + resume, + setData, + getData + } + /** @type {Array<number>} */ + const listStack = [] + let index = -1 + while (++index < events.length) { + // We preprocess lists to add `listItem` tokens, and to infer whether + // items the list itself are spread out. + if ( + events[index][1].type === 'listOrdered' || + events[index][1].type === 'listUnordered' + ) { + if (events[index][0] === 'enter') { + listStack.push(index) + } else { + const tail = listStack.pop() + index = prepareList(events, tail, index) + } + } + } + index = -1 + while (++index < events.length) { + const handler = config[events[index][0]] + if (lib_own.call(handler, events[index][1].type)) { + handler[events[index][1].type].call( + Object.assign( + { + sliceSerialize: events[index][2].sliceSerialize + }, + context + ), + events[index][1] + ) + } + } + + // Handle tokens still being open. + if (context.tokenStack.length > 0) { + const tail = context.tokenStack[context.tokenStack.length - 1] + const handler = tail[1] || defaultOnError + handler.call(context, undefined, tail[0]) + } + + // Figure out `root` position. + tree.position = { + start: lib_point( + events.length > 0 + ? events[0][1].start + : { + line: 1, + column: 1, + offset: 0 + } + ), + end: lib_point( + events.length > 0 + ? events[events.length - 2][1].end + : { + line: 1, + column: 1, + offset: 0 + } + ) + } + + // Call transforms. + index = -1 + while (++index < config.transforms.length) { + tree = config.transforms[index](tree) || tree + } + return tree + } + + /** + * @param {Array<Event>} events + * @param {number} start + * @param {number} length + * @returns {number} + */ + function prepareList(events, start, length) { + let index = start - 1 + let containerBalance = -1 + let listSpread = false + /** @type {Token | undefined} */ + let listItem + /** @type {number | undefined} */ + let lineIndex + /** @type {number | undefined} */ + let firstBlankLineIndex + /** @type {boolean | undefined} */ + let atMarker + while (++index <= length) { + const event = events[index] + if ( + event[1].type === 'listUnordered' || + event[1].type === 'listOrdered' || + event[1].type === 'blockQuote' + ) { + if (event[0] === 'enter') { + containerBalance++ + } else { + containerBalance-- + } + atMarker = undefined + } else if (event[1].type === 'lineEndingBlank') { + if (event[0] === 'enter') { + if ( + listItem && + !atMarker && + !containerBalance && + !firstBlankLineIndex + ) { + firstBlankLineIndex = index + } + atMarker = undefined + } + } else if ( + event[1].type === 'linePrefix' || + event[1].type === 'listItemValue' || + event[1].type === 'listItemMarker' || + event[1].type === 'listItemPrefix' || + event[1].type === 'listItemPrefixWhitespace' + ) { + // Empty. + } else { + atMarker = undefined + } + if ( + (!containerBalance && + event[0] === 'enter' && + event[1].type === 'listItemPrefix') || + (containerBalance === -1 && + event[0] === 'exit' && + (event[1].type === 'listUnordered' || + event[1].type === 'listOrdered')) + ) { + if (listItem) { + let tailIndex = index + lineIndex = undefined + while (tailIndex--) { + const tailEvent = events[tailIndex] + if ( + tailEvent[1].type === 'lineEnding' || + tailEvent[1].type === 'lineEndingBlank' + ) { + if (tailEvent[0] === 'exit') continue + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + listSpread = true + } + tailEvent[1].type = 'lineEnding' + lineIndex = tailIndex + } else if ( + tailEvent[1].type === 'linePrefix' || + tailEvent[1].type === 'blockQuotePrefix' || + tailEvent[1].type === 'blockQuotePrefixWhitespace' || + tailEvent[1].type === 'blockQuoteMarker' || + tailEvent[1].type === 'listItemIndent' + ) { + // Empty + } else { + break + } + } + if ( + firstBlankLineIndex && + (!lineIndex || firstBlankLineIndex < lineIndex) + ) { + listItem._spread = true + } + + // Fix position. + listItem.end = Object.assign( + {}, + lineIndex ? events[lineIndex][1].start : event[1].end + ) + events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) + index++ + length++ + } + + // Create a new list item. + if (event[1].type === 'listItemPrefix') { + listItem = { + type: 'listItem', + _spread: false, + start: Object.assign({}, event[1].start), + // @ts-expect-error: we’ll add `end` in a second. + end: undefined + } + // @ts-expect-error: `listItem` is most definitely defined, TS... + events.splice(index, 0, ['enter', listItem, event[2]]) + index++ + length++ + firstBlankLineIndex = undefined + atMarker = true + } + } + } + events[start][1]._spread = listSpread + return length + } + + /** + * Set data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @param {CompileData[Key]} [value] + * New value. + * @returns {void} + * Nothing. + */ + function setData(key, value) { + data[key] = value + } + + /** + * Get data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @returns {CompileData[Key]} + * Value. + */ + function getData(key) { + return data[key] + } + + /** + * Create an opener handle. + * + * @param {(token: Token) => Node} create + * Create a node. + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function opener(create, and) { + return open + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function open(token) { + enter.call(this, create(token), token) + if (and) and.call(this, token) + } + } + + /** + * @this {CompileContext} + * @returns {void} + */ + function buffer() { + this.stack.push({ + type: 'fragment', + children: [] + }) + } + + /** + * @template {Node} Kind + * Node type. + * @this {CompileContext} + * Context. + * @param {Kind} node + * Node to enter. + * @param {Token} token + * Corresponding token. + * @param {OnEnterError | undefined} [errorHandler] + * Handle the case where this token is open, but it is closed by something else. + * @returns {Kind} + * The given node. + */ + function enter(node, token, errorHandler) { + const parent = this.stack[this.stack.length - 1] + // @ts-expect-error: Assume `Node` can exist as a child of `parent`. + parent.children.push(node) + this.stack.push(node) + this.tokenStack.push([token, errorHandler]) + // @ts-expect-error: `end` will be patched later. + node.position = { + start: lib_point(token.start) + } + return node + } + + /** + * Create a closer handle. + * + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function closer(and) { + return close + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function close(token) { + if (and) and.call(this, token) + exit.call(this, token) + } + } + + /** + * @this {CompileContext} + * Context. + * @param {Token} token + * Corresponding token. + * @param {OnExitError | undefined} [onExitError] + * Handle the case where another token is open. + * @returns {Node} + * The closed node. + */ + function exit(token, onExitError) { + const node = this.stack.pop() + const open = this.tokenStack.pop() + if (!open) { + throw new Error( + 'Cannot close `' + + token.type + + '` (' + + stringifyPosition({ + start: token.start, + end: token.end + }) + + '): it’s not open' + ) + } else if (open[0].type !== token.type) { + if (onExitError) { + onExitError.call(this, token, open[0]) + } else { + const handler = open[1] || defaultOnError + handler.call(this, token, open[0]) + } + } + node.position.end = lib_point(token.end) + return node + } + + /** + * @this {CompileContext} + * @returns {string} + */ + function resume() { + return lib_toString(this.stack.pop()) + } + + // + // Handlers. + // + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistordered() { + setData('expectingFirstListItemValue', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistitemvalue(token) { + if (getData('expectingFirstListItemValue')) { + const ancestor = this.stack[this.stack.length - 2] + ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) + setData('expectingFirstListItemValue') + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfenceinfo() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.lang = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfencemeta() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.meta = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfence() { + // Exit if this is the closing fence. + if (getData('flowCodeInside')) return + this.buffer() + setData('flowCodeInside', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefenced() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') + setData('flowCodeInside') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodeindented() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/(\r?\n|\r)$/g, '') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitionlabelstring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + node.label = label + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiontitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiondestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitatxheadingsequence(token) { + const node = this.stack[this.stack.length - 1] + if (!node.depth) { + const depth = this.sliceSerialize(token).length + node.depth = depth + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadingtext() { + setData('setextHeadingSlurpLineEnding', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadinglinesequence(token) { + const node = this.stack[this.stack.length - 1] + node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheading() { + setData('setextHeadingSlurpLineEnding') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterdata(token) { + const node = this.stack[this.stack.length - 1] + let tail = node.children[node.children.length - 1] + if (!tail || tail.type !== 'text') { + // Add a new text node. + tail = text() + // @ts-expect-error: we’ll add `end` later. + tail.position = { + start: lib_point(token.start) + } + // @ts-expect-error: Assume `parent` accepts `text`. + node.children.push(tail) + } + this.stack.push(tail) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitdata(token) { + const tail = this.stack.pop() + tail.value += this.sliceSerialize(token) + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlineending(token) { + const context = this.stack[this.stack.length - 1] + // If we’re at a hard break, include the line ending in there. + if (getData('atHardBreak')) { + const tail = context.children[context.children.length - 1] + tail.position.end = lib_point(token.end) + setData('atHardBreak') + return + } + if ( + !getData('setextHeadingSlurpLineEnding') && + config.canContainEols.includes(context.type) + ) { + onenterdata.call(this, token) + onexitdata.call(this, token) + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithardbreak() { + setData('atHardBreak', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmlflow() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmltext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcodetext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlink() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitimage() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabeltext(token) { + const string = this.sliceSerialize(token) + const ancestor = this.stack[this.stack.length - 2] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + ancestor.label = decodeString(string) + // @ts-expect-error: same as above. + ancestor.identifier = normalizeIdentifier(string).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabel() { + const fragment = this.stack[this.stack.length - 1] + const value = this.resume() + const node = this.stack[this.stack.length - 1] + // Assume a reference. + setData('inReference', true) + if (node.type === 'link') { + /** @type {Array<StaticPhrasingContent>} */ + // @ts-expect-error: Assume static phrasing content. + const children = fragment.children + node.children = children + } else { + node.alt = value + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcedestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcetitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresource() { + setData('inReference') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterreference() { + setData('referenceType', 'collapsed') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitreferencestring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + node.label = label + // @ts-expect-error: same as above. + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + setData('referenceType', 'full') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcharacterreferencemarker(token) { + setData('characterReferenceType', token.type) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcharacterreferencevalue(token) { + const data = this.sliceSerialize(token) + const type = getData('characterReferenceType') + /** @type {string} */ + let value + if (type) { + value = decodeNumericCharacterReference( + data, + type === 'characterReferenceMarkerNumeric' ? 10 : 16 + ) + setData('characterReferenceType') + } else { + const result = decodeNamedCharacterReference(data) + value = result + } + const tail = this.stack.pop() + tail.value += value + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkprotocol(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = this.sliceSerialize(token) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkemail(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = 'mailto:' + this.sliceSerialize(token) + } + + // + // Creaters. + // + + /** @returns {Blockquote} */ + function blockQuote() { + return { + type: 'blockquote', + children: [] + } + } + + /** @returns {Code} */ + function codeFlow() { + return { + type: 'code', + lang: null, + meta: null, + value: '' + } + } + + /** @returns {InlineCode} */ + function codeText() { + return { + type: 'inlineCode', + value: '' + } + } + + /** @returns {Definition} */ + function definition() { + return { + type: 'definition', + identifier: '', + label: null, + title: null, + url: '' + } + } + + /** @returns {Emphasis} */ + function emphasis() { + return { + type: 'emphasis', + children: [] + } + } + + /** @returns {Heading} */ + function heading() { + // @ts-expect-error `depth` will be set later. + return { + type: 'heading', + depth: undefined, + children: [] + } + } + + /** @returns {Break} */ + function hardBreak() { + return { + type: 'break' + } + } + + /** @returns {HTML} */ + function html() { + return { + type: 'html', + value: '' + } + } + + /** @returns {Image} */ + function image() { + return { + type: 'image', + title: null, + url: '', + alt: null + } + } + + /** @returns {Link} */ + function link() { + return { + type: 'link', + title: null, + url: '', + children: [] + } + } + + /** + * @param {Token} token + * @returns {List} + */ + function list(token) { + return { + type: 'list', + ordered: token.type === 'listOrdered', + start: null, + spread: token._spread, + children: [] + } + } + + /** + * @param {Token} token + * @returns {ListItem} + */ + function listItem(token) { + return { + type: 'listItem', + spread: token._spread, + checked: null, + children: [] + } + } + + /** @returns {Paragraph} */ + function paragraph() { + return { + type: 'paragraph', + children: [] + } + } + + /** @returns {Strong} */ + function strong() { + return { + type: 'strong', + children: [] + } + } + + /** @returns {Text} */ + function text() { + return { + type: 'text', + value: '' + } + } + + /** @returns {ThematicBreak} */ + function thematicBreak() { + return { + type: 'thematicBreak' + } + } +} + +/** + * Copy a point-like value. + * + * @param {Point} d + * Point-like value. + * @returns {Point} + * unist point. + */ +function lib_point(d) { + return { + line: d.line, + column: d.column, + offset: d.offset + } +} + +/** + * @param {Config} combined + * @param {Array<Extension | Array<Extension>>} extensions + * @returns {void} + */ +function configure(combined, extensions) { + let index = -1 + while (++index < extensions.length) { + const value = extensions[index] + if (Array.isArray(value)) { + configure(combined, value) + } else { + extension(combined, value) + } + } +} + +/** + * @param {Config} combined + * @param {Extension} extension + * @returns {void} + */ +function extension(combined, extension) { + /** @type {keyof Extension} */ + let key + for (key in extension) { + if (lib_own.call(extension, key)) { + if (key === 'canContainEols') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'transforms') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'enter' || key === 'exit') { + const right = extension[key] + if (right) { + Object.assign(combined[key], right) + } + } + } + } +} + +/** @type {OnEnterError} */ +function defaultOnError(left, right) { + if (left) { + throw new Error( + 'Cannot close `' + + left.type + + '` (' + + stringifyPosition({ + start: left.start, + end: left.end + }) + + '): a different token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is open' + ) + } else { + throw new Error( + 'Cannot close document, a token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is still open' + ) + } +} + +// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js +var esm = __webpack_require__(513); +;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-6b48ae7d.js + + + +function preprocessMarkdown(markdown) { + const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); + const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); + return withoutExtraSpaces; +} +function markdownToLines(markdown) { + const preprocessedMarkdown = preprocessMarkdown(markdown); + const { children } = fromMarkdown(preprocessedMarkdown); + const lines = [[]]; + let currentLine = 0; + function processNode(node, parentType = "normal") { + if (node.type === "text") { + const textLines = node.value.split("\n"); + textLines.forEach((textLine, index) => { + if (index !== 0) { + currentLine++; + lines.push([]); + } + textLine.split(" ").forEach((word) => { + if (word) { + lines[currentLine].push({ content: word, type: parentType }); + } + }); + }); + } else if (node.type === "strong" || node.type === "emphasis") { + node.children.forEach((contentNode) => { + processNode(contentNode, node.type); + }); + } + } + children.forEach((treeNode) => { + if (treeNode.type === "paragraph") { + treeNode.children.forEach((contentNode) => { + processNode(contentNode); + }); + } + }); + return lines; +} +function markdownToHTML(markdown) { + const { children } = fromMarkdown(markdown); + function output(node) { + if (node.type === "text") { + return node.value.replace(/\n/g, "<br/>"); + } else if (node.type === "strong") { + return `<strong>${node.children.map(output).join("")}</strong>`; + } else if (node.type === "emphasis") { + return `<em>${node.children.map(output).join("")}</em>`; + } else if (node.type === "paragraph") { + return `<p>${node.children.map(output).join("")}</p>`; + } + return `Unsupported markdown: ${node.type}`; + } + return children.map(output).join(""); +} +function splitTextToChars(text) { + if (Intl.Segmenter) { + return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); + } + return [...text]; +} +function splitWordToFitWidth(checkFit, word) { + const characters = splitTextToChars(word.content); + return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); +} +function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { + if (remainingChars.length === 0) { + return [ + { content: usedChars.join(""), type }, + { content: "", type } + ]; + } + const [nextChar, ...rest] = remainingChars; + const newWord = [...usedChars, nextChar]; + if (checkFit([{ content: newWord.join(""), type }])) { + return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); + } + if (usedChars.length === 0 && nextChar) { + usedChars.push(nextChar); + remainingChars.shift(); + } + return [ + { content: usedChars.join(""), type }, + { content: remainingChars.join(""), type } + ]; +} +function splitLineToFitWidth(line, checkFit) { + if (line.some(({ content }) => content.includes("\n"))) { + throw new Error("splitLineToFitWidth does not support newlines in the line"); + } + return splitLineToFitWidthRecursion(line, checkFit); +} +function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { + if (words.length === 0) { + if (newLine.length > 0) { + lines.push(newLine); + } + return lines.length > 0 ? lines : []; + } + let joiner = ""; + if (words[0].content === " ") { + joiner = " "; + words.shift(); + } + const nextWord = words.shift() ?? { content: " ", type: "normal" }; + const lineWithNextWord = [...newLine]; + if (joiner !== "") { + lineWithNextWord.push({ content: joiner, type: "normal" }); + } + lineWithNextWord.push(nextWord); + if (checkFit(lineWithNextWord)) { + return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); + } + if (newLine.length > 0) { + lines.push(newLine); + words.unshift(nextWord); + } else if (nextWord.content) { + const [line, rest] = splitWordToFitWidth(checkFit, nextWord); + lines.push([line]); + if (rest.content) { + words.unshift(rest); + } + } + return splitLineToFitWidthRecursion(words, checkFit, lines); +} +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlSpan(element, node, width, classes, addBackground = false) { + const fo = element.append("foreignObject"); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + ` + <span class="${labelClass} ${classes}" ` + (node.labelStyle ? 'style="' + node.labelStyle + '"' : "") + ">" + label + "</span>" + ); + applyStyle(div, node.labelStyle); + div.style("display", "table-cell"); + div.style("white-space", "nowrap"); + div.style("max-width", width + "px"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + if (addBackground) { + div.attr("class", "labelBkg"); + } + let bbox = div.node().getBoundingClientRect(); + if (bbox.width === width) { + div.style("display", "table"); + div.style("white-space", "break-spaces"); + div.style("width", width + "px"); + bbox = div.node().getBoundingClientRect(); + } + fo.style("width", bbox.width); + fo.style("height", bbox.height); + return fo.node(); +} +function createTspan(textElement, lineIndex, lineHeight) { + return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); +} +function computeWidthOfText(parentNode, lineHeight, line) { + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, line); + const textLength = testSpan.node().getComputedTextLength(); + testElement.remove(); + return textLength; +} +function computeDimensionOfText(parentNode, lineHeight, text) { + var _a; + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); + const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); + if (textDimension) { + testElement.remove(); + } + return textDimension; +} +function createFormattedText(width, g, structuredText, addBackground = false) { + const lineHeight = 1.1; + const labelGroup = g.append("g"); + const bkg = labelGroup.insert("rect").attr("class", "background"); + const textElement = labelGroup.append("text").attr("y", "-10.1"); + let lineIndex = 0; + for (const line of structuredText) { + const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; + const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); + for (const preparedLine of linesUnderWidth) { + const tspan = createTspan(textElement, lineIndex, lineHeight); + updateTextContentAndStyles(tspan, preparedLine); + lineIndex++; + } + } + if (addBackground) { + const bbox = textElement.node().getBBox(); + const padding = 2; + bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); + return labelGroup.node(); + } else { + return textElement.node(); + } +} +function updateTextContentAndStyles(tspan, wrappedLine) { + tspan.text(""); + wrappedLine.forEach((word, index) => { + const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); + if (index === 0) { + innerTspan.text(word.content); + } else { + innerTspan.text(" " + word.content); + } + }); +} +const createText = (el, text = "", { + style = "", + isTitle = false, + classes = "", + useHtmlLabels = true, + isNode = true, + width = 200, + addSvgBackground = false +} = {}) => { + mermaid_f47111a7.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); + if (useHtmlLabels) { + const htmlText = markdownToHTML(text); + const node = { + isNode, + label: (0,mermaid_f47111a7.M)(htmlText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `<i class='${s.replace(":", " ")}'></i>` + ), + labelStyle: style.replace("fill:", "color:") + }; + const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); + return vertexNode; + } else { + const structuredText = markdownToLines(text); + const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); + return svgLabel; + } +}; + + + +/***/ }), + +/***/ 8747: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ a: () => (/* binding */ insertMarkers$1), +/* harmony export */ b: () => (/* binding */ clear$1), +/* harmony export */ c: () => (/* binding */ createLabel$1), +/* harmony export */ d: () => (/* binding */ clear), +/* harmony export */ e: () => (/* binding */ insertNode), +/* harmony export */ f: () => (/* binding */ insertEdgeLabel), +/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins), +/* harmony export */ h: () => (/* binding */ insertEdge), +/* harmony export */ i: () => (/* binding */ intersectRect$1), +/* harmony export */ j: () => (/* binding */ positionEdgeLabel), +/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset), +/* harmony export */ l: () => (/* binding */ labelHelper), +/* harmony export */ m: () => (/* binding */ addEdgeMarkers), +/* harmony export */ p: () => (/* binding */ positionNode), +/* harmony export */ s: () => (/* binding */ setNodeElem), +/* harmony export */ u: () => (/* binding */ updateNodeBounds) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3791); + + + +const insertMarkers = (elem, markerArray, type, id) => { + markerArray.forEach((markerName) => { + markers[markerName](elem, type, id); + }); +}; +const extension = (elem, type, id) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).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"); +}; +const composition = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).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"); +}; +const aggregation = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).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"); +}; +const dependency = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).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"); +}; +const lollipop = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).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); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).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); +}; +const point = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).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"); +}; +const circle$1 = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).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"); +}; +const cross = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).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"); +}; +const barb = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-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"); +}; +const markers = { + extension, + composition, + aggregation, + dependency, + lollipop, + point, + circle: circle$1, + cross, + barb +}; +const insertMarkers$1 = insertMarkers; +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlLabel(node) { + const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + '<span class="' + labelClass + '" ' + (node.labelStyle ? 'style="' + node.labelStyle + '"' : "") + ">" + label + "</span>" + ); + applyStyle(div, node.labelStyle); + div.style("display", "inline-block"); + div.style("white-space", "nowrap"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + return fo.node(); +} +const createLabel = (_vertexText, style, isTitle, isNode) => { + let vertexText = _vertexText || ""; + if (typeof vertexText === "object") { + vertexText = vertexText[0]; + } + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + vertexText = vertexText.replace(/\\n|\n/g, "<br />"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText); + const node = { + isNode, + label: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `<i class='${s.replace(":", " ")}'></i>` + ), + labelStyle: style.replace("fill:", "color:") + }; + let vertexNode = addHtmlLabel(node); + return vertexNode; + } else { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", style.replace("color:", "fill:")); + let rows = []; + if (typeof vertexText === "string") { + rows = vertexText.split(/\\n|\n|<br\s*\/?>/gi); + } else if (Array.isArray(vertexText)) { + rows = vertexText; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + if (isTitle) { + tspan.setAttribute("class", "title-row"); + } else { + tspan.setAttribute("class", "row"); + } + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; + } +}; +const createLabel$1 = createLabel; +const labelHelper = async (parent, node, _classes, isNode) => { + let classes; + const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); + if (!_classes) { + classes = "node default"; + } else { + classes = _classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); + let labelText; + if (node.labelText === void 0) { + labelText = ""; + } else { + labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; + } + const textNode = label.node(); + let text; + if (node.labelType === "markdown") { + text = (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), { + useHtmlLabels, + width: node.width || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth, + classes: "markdown-node-label" + }); + } else { + text = textNode.appendChild( + createLabel$1( + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), + node.labelStyle, + false, + isNode + ) + ); + } + let bbox = text.getBBox(); + const halfPadding = node.padding / 2; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); + const images = div.getElementsByTagName("img"); + if (images) { + const noImgText = labelText.replace(/<img[^>]*>/g, "").trim() === ""; + await Promise.all( + [...images].map( + (img) => new Promise((res) => { + function setupImage() { + img.style.display = "flex"; + img.style.flexDirection = "column"; + if (noImgText) { + const bodyFontSize = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize; + const enlargingFactor = 5; + const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; + img.style.minWidth = width; + img.style.maxWidth = width; + } else { + img.style.width = "100%"; + } + res(img); + } + setTimeout(() => { + if (img.complete) { + setupImage(); + } + }); + img.addEventListener("error", setupImage); + img.addEventListener("load", setupImage); + }) + ) + ); + } + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (useHtmlLabels) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } else { + label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); + } + if (node.centerLabel) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } + label.insert("rect", ":first-child"); + return { shapeSvg, bbox, halfPadding, label }; +}; +const updateNodeBounds = (node, element) => { + const bbox = element.node().getBBox(); + node.width = bbox.width; + node.height = bbox.height; +}; +function insertPolygonShape(parent, w, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); +} +function intersectNode(node, point2) { + return node.intersect(point2); +} +function intersectEllipse(node, rx, ry, point2) { + var cx = node.x; + var cy = node.y; + var px = cx - point2.x; + var py = cy - point2.y; + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + var dx = Math.abs(rx * ry * px / det); + if (point2.x < cx) { + dx = -dx; + } + var dy = Math.abs(rx * ry * py / det); + if (point2.y < cy) { + dy = -dy; + } + return { x: cx + dx, y: cy + dy }; +} +function intersectCircle(node, rx, point2) { + return intersectEllipse(node, rx, rx, point2); +} +function intersectLine(p1, p2, q1, q2) { + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x, y; + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; + if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { + return; + } + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; + if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { + return; + } + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return; + } + offset = Math.abs(denom / 2); + num = b1 * c2 - b2 * c1; + x = num < 0 ? (num - offset) / denom : (num + offset) / denom; + num = a2 * c1 - a1 * c2; + y = num < 0 ? (num - offset) / denom : (num + offset) / denom; + return { x, y }; +} +function sameSign(r1, r2) { + return r1 * r2 > 0; +} +function intersectPolygon(node, polyPoints, point2) { + var x1 = node.x; + var y1 = node.y; + var intersections = []; + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + if (typeof polyPoints.forEach === "function") { + polyPoints.forEach(function(entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + } else { + minX = Math.min(minX, polyPoints.x); + minY = Math.min(minY, polyPoints.y); + } + var left = x1 - node.width / 2 - minX; + var top = y1 - node.height / 2 - minY; + for (var i = 0; i < polyPoints.length; i++) { + var p1 = polyPoints[i]; + var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; + var intersect2 = intersectLine( + node, + point2, + { x: left + p1.x, y: top + p1.y }, + { x: left + p2.x, y: top + p2.y } + ); + if (intersect2) { + intersections.push(intersect2); + } + } + if (!intersections.length) { + return node; + } + if (intersections.length > 1) { + intersections.sort(function(p, q) { + var pdx = p.x - point2.x; + var pdy = p.y - point2.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + var qdx = q.x - point2.x; + var qdy = q.y - point2.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); + } + return intersections[0]; +} +const intersectRect = (node, point2) => { + var x = node.x; + var y = node.y; + var dx = point2.x - x; + var dy = point2.y - y; + var w = node.width / 2; + var h = node.height / 2; + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w = -w; + } + sx = w; + sy = dx === 0 ? 0 : w * dy / dx; + } + return { x: x + sx, y: y + sy }; +}; +const intersectRect$1 = intersectRect; +const intersect = { + node: intersectNode, + circle: intersectCircle, + ellipse: intersectEllipse, + polygon: intersectPolygon, + rect: intersectRect$1 +}; +const note = async (parent, node) => { + const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels; + if (!useHtmlLabels) { + node.centerLabel = true; + } + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes); + const rect2 = shapeSvg.insert("rect", ":first-child"); + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const note$1 = note; +const expandAndDeduplicateDirections = (directions) => { + const uniqueDirections = /* @__PURE__ */ new Set(); + for (const direction of directions) { + switch (direction) { + case "x": + uniqueDirections.add("right"); + uniqueDirections.add("left"); + break; + case "y": + uniqueDirections.add("up"); + uniqueDirections.add("down"); + break; + default: + uniqueDirections.add(direction); + break; + } + } + return uniqueDirections; +}; +const getArrowPoints = (duplicatedDirections, bbox, node) => { + const directions = expandAndDeduplicateDirections(duplicatedDirections); + const f = 2; + const height = bbox.height + 2 * node.padding; + const midpoint = height / f; + const width = bbox.width + 2 * midpoint + node.padding; + const padding = node.padding / 2; + if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) { + return [ + // Bottom + { x: 0, y: 0 }, + { x: midpoint, y: 0 }, + { x: width / 2, y: 2 * padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: 0 }, + // Right + { x: width, y: -height / 3 }, + { x: width + 2 * padding, y: -height / 2 }, + { x: width, y: -2 * height / 3 }, + { x: width, y: -height }, + // Top + { x: width - midpoint, y: -height }, + { x: width / 2, y: -height - 2 * padding }, + { x: midpoint, y: -height }, + // Left + { x: 0, y: -height }, + { x: 0, y: -2 * height / 3 }, + { x: -2 * padding, y: -height / 2 }, + { x: 0, y: -height / 3 } + ]; + } + if (directions.has("right") && directions.has("left") && directions.has("up")) { + return [ + { x: midpoint, y: 0 }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("right") && directions.has("left") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: midpoint, y: -height }, + { x: width - midpoint, y: -height }, + { x: width, y: 0 } + ]; + } + if (directions.has("right") && directions.has("up") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: width, y: -midpoint }, + { x: width, y: -height + midpoint }, + { x: 0, y: -height } + ]; + } + if (directions.has("left") && directions.has("up") && directions.has("down")) { + return [ + { x: width, y: 0 }, + { x: 0, y: -midpoint }, + { x: 0, y: -height + midpoint }, + { x: width, y: -height } + ]; + } + if (directions.has("right") && directions.has("left")) { + return [ + { x: midpoint, y: 0 }, + { x: midpoint, y: -padding }, + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: width - midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("up") && directions.has("down")) { + return [ + // Bottom center + { x: width / 2, y: 0 }, + // Left pont of bottom arrow + { x: 0, y: -padding }, + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: 0, y: -height + padding }, + // Top of arrow + { x: width / 2, y: -height }, + { x: width, y: -height + padding }, + // Top of right vertical bar + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding }, + { x: width, y: -padding } + ]; + } + if (directions.has("right") && directions.has("up")) { + return [ + { x: 0, y: 0 }, + { x: width, y: -midpoint }, + { x: 0, y: -height } + ]; + } + if (directions.has("right") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: width, y: 0 }, + { x: 0, y: -height } + ]; + } + if (directions.has("left") && directions.has("up")) { + return [ + { x: width, y: 0 }, + { x: 0, y: -midpoint }, + { x: width, y: -height } + ]; + } + if (directions.has("left") && directions.has("down")) { + return [ + { x: width, y: 0 }, + { x: 0, y: 0 }, + { x: width, y: -height } + ]; + } + if (directions.has("right")) { + return [ + { x: midpoint, y: -padding }, + { x: midpoint, y: -padding }, + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: width - midpoint, y: -height + padding }, + // top left corner of arrow + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding } + ]; + } + if (directions.has("left")) { + return [ + { x: midpoint, y: 0 }, + { x: midpoint, y: -padding }, + // Two points, the right corners + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("up")) { + return [ + // Bottom center + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: 0, y: -height + padding }, + // Top of arrow + { x: width / 2, y: -height }, + { x: width, y: -height + padding }, + // Top of right vertical bar + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding } + ]; + } + if (directions.has("down")) { + return [ + // Bottom center + { x: width / 2, y: 0 }, + // Left pont of bottom arrow + { x: 0, y: -padding }, + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding }, + { x: width, y: -padding } + ]; + } + return [{ x: 0, y: 0 }]; +}; +const formatClass = (str) => { + if (str) { + return " " + str; + } + return ""; +}; +const getClassesFromNode = (node, otherClasses) => { + return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( + node.class + )}`; +}; +const question = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const s = w + h; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)"); + const questionElem = insertPolygonShape(shapeSvg, s, s, points); + questionElem.attr("style", node.style); + updateNodeBounds(node, questionElem); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called"); + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const choice = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const s = 28; + const points = [ + { x: 0, y: s / 2 }, + { x: s / 2, y: 0 }, + { x: 0, y: -s / 2 }, + { x: -s / 2, y: 0 } + ]; + const choice2 = shapeSvg.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ); + choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); + node.width = 28; + node.height = 28; + node.intersect = function(point2) { + return intersect.circle(node, 14, point2); + }; + return shapeSvg; +}; +const hexagon = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const f = 4; + const h = bbox.height + node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const hex = insertPolygonShape(shapeSvg, w, h, points); + hex.attr("style", node.style); + updateNodeBounds(node, hex); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const block_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true); + const f = 2; + const h = bbox.height + 2 * node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = getArrowPoints(node.directions, bbox, node); + const blockArrow = insertPolygonShape(shapeSvg, w, h, points); + blockArrow.attr("style", node.style); + updateNodeBounds(node, blockArrow); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_left_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -h / 2, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + node.width = w + h; + node.height = h; + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_right = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_left = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w + h / 6, y: 0 }, + { x: w - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w + 2 * h / 6, y: 0 }, + { x: w - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const inv_trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_right_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w + h / 2, y: 0 }, + { x: w, y: -h / 2 }, + { x: w + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const cylinder = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const rx = w / 2; + const ry = rx / (2.5 + w / 50); + const h = bbox.height + ry + node.padding; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; + const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); + updateNodeBounds(node, el); + node.intersect = function(point2) { + const pos = intersect.rect(node, point2); + const x = pos.x - node.x; + if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { + let y = ry * ry * (1 - x * x / (rx * rx)); + if (y != 0) { + y = Math.sqrt(y); + } + y = ry - y; + if (point2.y - node.y > 0) { + y = -y; + } + pos.y += y; + } + return pos; + }; + return shapeSvg; +}; +const rect = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes + " " + node.class, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = node.positioned ? node.width : bbox.width + node.padding; + const totalHeight = node.positioned ? node.height : bbox.height + node.padding; + const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; + const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; + rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const composite = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = node.positioned ? node.width : bbox.width + node.padding; + const totalHeight = node.positioned ? node.height : bbox.height + node.padding; + const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; + const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; + rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const labelRect = async (parent, node) => { + const { shapeSvg } = await labelHelper(parent, node, "label", true); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = 0; + const totalHeight = 0; + rect2.attr("width", totalWidth).attr("height", totalHeight); + shapeSvg.attr("class", "label edgeLabel"); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { + const strokeDashArray = []; + const addBorder = (length) => { + strokeDashArray.push(length, 0); + }; + const skipBorder = (length) => { + strokeDashArray.push(0, length); + }; + if (borders.includes("t")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("r")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + if (borders.includes("b")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("l")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); +} +const rectWithTitle = (parent, node) => { + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const innerLine = shapeSvg.insert("line"); + const label = shapeSvg.insert("g").attr("class", "label"); + const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; + let title = ""; + if (typeof text2 === "object") { + title = text2[0]; + } else { + title = text2; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object"); + const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); + let bbox = { width: 0, height: 0 }; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2); + const textRows = text2.slice(1, text2.length); + let titleBox = text.getBBox(); + const descr = label.node().appendChild( + createLabel$1(textRows.join ? textRows.join("<br/>") : textRows, node.labelStyle, true, true) + ); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = descr.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const halfPadding = node.padding / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" + ); + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" + ); + bbox = label.node().getBBox(); + label.attr( + "transform", + "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" + ); + rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const stadium = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const h = bbox.height + node.padding; + const w = bbox.width + h / 4 + node.padding; + const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const circle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main"); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding, point2); + }; + return shapeSvg; +}; +const doublecircle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const gap = 5; + const circleGroup = shapeSvg.insert("g", ":first-child"); + const outerCircle = circleGroup.insert("circle"); + const innerCircle = circleGroup.insert("circle"); + circleGroup.attr("class", node.class); + outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); + innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main"); + updateNodeBounds(node, outerCircle); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); + }; + return shapeSvg; +}; +const subroutine = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w + 8, y: 0 }, + { x: w + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const start = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const forkJoin = (parent, node, dir) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + let width = 70; + let height = 10; + if (dir === "LR") { + width = 10; + height = 70; + } + const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); + updateNodeBounds(node, shape); + node.height = node.height + node.padding / 2; + node.width = node.width + node.padding / 2; + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const end = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const innerCircle = shapeSvg.insert("circle", ":first-child"); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const class_box = (parent, node) => { + const halfPadding = node.padding / 2; + const rowPadding = 4; + const lineHeight = 8; + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const topLine = shapeSvg.insert("line"); + const bottomLine = shapeSvg.insert("line"); + let maxWidth = 0; + let maxHeight = rowPadding; + const labelContainer = shapeSvg.insert("g").attr("class", "label"); + let verticalPos = 0; + const hasInterface = node.classData.annotations && node.classData.annotations[0]; + const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; + const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); + let interfaceBBox = interfaceLabel.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = interfaceLabel.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel); + interfaceBBox = div.getBoundingClientRect(); + dv.attr("width", interfaceBBox.width); + dv.attr("height", interfaceBBox.height); + } + if (node.classData.annotations[0]) { + maxHeight += interfaceBBox.height + rowPadding; + maxWidth += interfaceBBox.width; + } + let classTitleString = node.classData.label; + if (node.classData.type !== void 0 && node.classData.type !== "") { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + classTitleString += "<" + node.classData.type + ">"; + } else { + classTitleString += "<" + node.classData.type + ">"; + } + } + const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle"); + let classTitleBBox = classTitleLabel.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = classTitleLabel.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel); + classTitleBBox = div.getBoundingClientRect(); + dv.attr("width", classTitleBBox.width); + dv.attr("height", classTitleBBox.height); + } + maxHeight += classTitleBBox.height + rowPadding; + if (classTitleBBox.width > maxWidth) { + maxWidth = classTitleBBox.width; + } + const classAttributes = []; + node.classData.members.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let parsedText = parsedInfo.displayText; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + parsedText = parsedText.replace(/</g, "<").replace(/>/g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + parsedText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classAttributes.push(lbl); + }); + maxHeight += lineHeight; + const classMethods = []; + node.classData.methods.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let displayText = parsedInfo.displayText; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + displayText = displayText.replace(/</g, "<").replace(/>/g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + displayText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classMethods.push(lbl); + }); + maxHeight += lineHeight; + if (hasInterface) { + let diffX2 = (maxWidth - interfaceBBox.width) / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" + ); + verticalPos = interfaceBBox.height + rowPadding; + } + let diffX = (maxWidth - classTitleBBox.width) / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + verticalPos += classTitleBBox.height + rowPadding; + topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classAttributes.forEach((lbl) => { + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + verticalPos += lineHeight; + bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classMethods.forEach((lbl) => { + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const shapes = { + rhombus: question, + composite, + question, + rect, + labelRect, + rectWithTitle, + choice, + circle, + doublecircle, + stadium, + hexagon, + block_arrow, + rect_left_inv_arrow, + lean_right, + lean_left, + trapezoid, + inv_trapezoid, + rect_right_inv_arrow, + cylinder, + start, + end, + note: note$1, + subroutine, + fork: forkJoin, + join: forkJoin, + class_box +}; +let nodeElems = {}; +const insertNode = async (elem, node, dir) => { + let newEl; + let el; + if (node.link) { + let target; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") { + target = "_top"; + } else if (node.linkTarget) { + target = node.linkTarget || "_blank"; + } + newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); + el = await shapes[node.shape](newEl, node, dir); + } else { + el = await shapes[node.shape](elem, node, dir); + newEl = el; + } + if (node.tooltip) { + el.attr("title", node.tooltip); + } + if (node.class) { + el.attr("class", "node default " + node.class); + } + newEl.attr("data-node", "true"); + newEl.attr("data-id", node.id); + nodeElems[node.id] = newEl; + if (node.haveCallback) { + nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); + } + return newEl; +}; +const setNodeElem = (elem, node) => { + nodeElems[node.id] = elem; +}; +const clear$1 = () => { + nodeElems = {}; +}; +const positionNode = (node) => { + const el = nodeElems[node.id]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace( + "Transforming node", + node.diff, + node, + "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" + ); + const padding = 8; + const diff = node.diff || 0; + if (node.clusterNode) { + el.attr( + "transform", + "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" + ); + } else { + el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); + } + return diff; +}; +const getSubGraphTitleMargins = ({ + flowchart +}) => { + var _a, _b; + const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0; + const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0; + const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; + return { + subGraphTitleTopMargin, + subGraphTitleBottomMargin, + subGraphTitleTotalMargin + }; +}; +const markerOffsets = { + aggregation: 18, + extension: 18, + composition: 18, + dependency: 6, + lollipop: 13.5, + arrow_point: 5.3 +}; +function calculateDeltaAndAngle(point1, point2) { + if (point1 === void 0 || point2 === void 0) { + return { angle: 0, deltaX: 0, deltaY: 0 }; + } + point1 = pointTransformer(point1); + point2 = pointTransformer(point2); + const [x1, y1] = [point1.x, point1.y]; + const [x2, y2] = [point2.x, point2.y]; + const deltaX = x2 - x1; + const deltaY = y2 - y1; + return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; +} +const pointTransformer = (data) => { + if (Array.isArray(data)) { + return { x: data[0], y: data[1] }; + } + return data; +}; +const getLineFunctionsWithOffset = (edge) => { + return { + x: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaX } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } + return pointTransformer(d).x + offset; + }, + y: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaY } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } + return pointTransformer(d).y + offset; + } + }; +}; +const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => { + if (edge.arrowTypeStart) { + addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType); + } + if (edge.arrowTypeEnd) { + addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType); + } +}; +const arrowTypesMap = { + arrow_cross: "cross", + arrow_point: "point", + arrow_barb: "barb", + arrow_circle: "circle", + aggregation: "aggregation", + extension: "extension", + composition: "composition", + dependency: "dependency", + lollipop: "lollipop" +}; +const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => { + const endMarkerType = arrowTypesMap[arrowType]; + if (!endMarkerType) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`); + return; + } + const suffix = position === "start" ? "Start" : "End"; + svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`); +}; +let edgeLabels = {}; +let terminalLabels = {}; +const clear = () => { + edgeLabels = {}; + terminalLabels = {}; +}; +const insertEdgeLabel = (elem, edge) => { + const useHtmlLabels = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); + const labelElement = edge.labelType === "markdown" ? (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, { + style: edge.labelStyle, + useHtmlLabels, + addSvgBackground: true + }) : createLabel$1(edge.label, edge.labelStyle); + const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); + const label = edgeLabel.insert("g").attr("class", "label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + if (useHtmlLabels) { + const div = labelElement.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + edgeLabels[edge.id] = edgeLabel; + edge.width = bbox.width; + edge.height = bbox.height; + let fo; + if (edge.startLabelLeft) { + const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); + const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startLeft = startEdgeLabelLeft; + setTerminalWidth(fo, edge.startLabelLeft); + } + if (edge.startLabelRight) { + const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); + const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); + fo = startEdgeLabelRight.node().appendChild(startLabelElement); + inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startRight = startEdgeLabelRight; + setTerminalWidth(fo, edge.startLabelRight); + } + if (edge.endLabelLeft) { + const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); + const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelLeft.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endLeft = endEdgeLabelLeft; + setTerminalWidth(fo, edge.endLabelLeft); + } + if (edge.endLabelRight) { + const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); + const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelRight.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endRight = endEdgeLabelRight; + setTerminalWidth(fo, edge.endLabelRight); + } + return labelElement; +}; +function setTerminalWidth(fo, value) { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) { + fo.style.width = value.length * 9 + "px"; + fo.style.height = "12px"; + } +} +const positionEdgeLabel = (edge, paths) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths); + let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig); + if (edge.label) { + const el = edgeLabels[edge.id]; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug( + "Moving label " + edge.label + " from (", + x, + ",", + y, + ") to (", + pos.x, + ",", + pos.y, + ") abc88" + ); + if (paths.updatedPath) { + x = pos.x; + y = pos.y; + } + } + el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`); + } + if (edge.startLabelLeft) { + const el = terminalLabels[edge.id].startLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.startLabelRight) { + const el = terminalLabels[edge.id].startRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition( + edge.arrowTypeStart ? 10 : 0, + "start_right", + path + ); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.endLabelLeft) { + const el = terminalLabels[edge.id].endLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.endLabelRight) { + const el = terminalLabels[edge.id].endRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } +}; +const outsideNode = (node, point2) => { + const x = node.x; + const y = node.y; + const dx = Math.abs(point2.x - x); + const dy = Math.abs(point2.y - y); + const w = node.width / 2; + const h = node.height / 2; + if (dx >= w || dy >= h) { + return true; + } + return false; +}; +const intersection = (node, outsidePoint, insidePoint) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(outsidePoint)} + insidePoint : ${JSON.stringify(insidePoint)} + node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); + const x = node.x; + const y = node.y; + const dx = Math.abs(x - insidePoint.x); + const w = node.width / 2; + let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; + const h = node.height / 2; + const Q = Math.abs(outsidePoint.y - insidePoint.y); + const R = Math.abs(outsidePoint.x - insidePoint.x); + if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { + let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; + r = R * q / Q; + const res = { + x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, + y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q + }; + if (r === 0) { + res.x = outsidePoint.x; + res.y = outsidePoint.y; + } + if (R === 0) { + res.x = outsidePoint.x; + } + if (Q === 0) { + res.y = outsidePoint.y; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); + return res; + } else { + if (insidePoint.x < outsidePoint.x) { + r = outsidePoint.x - w - x; + } else { + r = x - w - outsidePoint.x; + } + let q = Q * r / R; + let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; + let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); + if (r === 0) { + _x = outsidePoint.x; + _y = outsidePoint.y; + } + if (R === 0) { + _x = outsidePoint.x; + } + if (Q === 0) { + _y = outsidePoint.y; + } + return { x: _x, y: _y }; + } +}; +const cutPathAtIntersect = (_points, boundaryNode) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode); + let points = []; + let lastPointOutside = _points[0]; + let isInside = false; + _points.forEach((point2) => { + if (!outsideNode(boundaryNode, point2) && !isInside) { + const inter = intersection(boundaryNode, lastPointOutside, point2); + let pointPresent = false; + points.forEach((p) => { + pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; + }); + if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { + points.push(inter); + } + isInside = true; + } else { + lastPointOutside = point2; + if (!isInside) { + points.push(point2); + } + } + }); + return points; +}; +const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { + let points = edge.points; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e); + let pointsHasChanged = false; + const tail = graph.node(e.v); + var head = graph.node(e.w); + if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) { + points = points.slice(1, edge.points.length - 1); + points.unshift(tail.intersect(points[0])); + points.push(head.intersect(points[points.length - 1])); + } + if (edge.toCluster) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]); + points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); + pointsHasChanged = true; + } + if (edge.fromCluster) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]); + points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); + pointsHasChanged = true; + } + const lineData = points.filter((p) => !Number.isNaN(p.y)); + let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM; + if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { + curve = edge.curve; + } + const { x, y } = getLineFunctionsWithOffset(edge); + const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve); + let strokeClasses; + switch (edge.thickness) { + case "normal": + strokeClasses = "edge-thickness-normal"; + break; + case "thick": + strokeClasses = "edge-thickness-thick"; + break; + case "invisible": + strokeClasses = "edge-thickness-thick"; + break; + default: + strokeClasses = ""; + } + switch (edge.pattern) { + case "solid": + strokeClasses += " edge-pattern-solid"; + break; + case "dotted": + strokeClasses += " edge-pattern-dotted"; + break; + case "dashed": + strokeClasses += " edge-pattern-dashed"; + break; + } + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); + let url = ""; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + addEdgeMarkers(svgPath, edge, url, id, diagramType); + let paths = {}; + if (pointsHasChanged) { + paths.updatedPath = points; + } + paths.originalPath = edge.points; + return paths; +}; + + + +/***/ }), + +/***/ 6216: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ d: () => (/* binding */ db), +/* harmony export */ f: () => (/* binding */ flowDb), +/* harmony export */ p: () => (/* binding */ parser$1) +/* harmony export */ }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [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], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 49], $Ve = [1, 48], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 44], $Vl = [1, 46], $Vm = [1, 42], $Vn = [1, 47], $Vo = [1, 43], $Vp = [1, 50], $Vq = [1, 45], $Vr = [1, 51], $Vs = [1, 52], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 57], $Vy = [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], $Vz = [1, 61], $VA = [1, 60], $VB = [1, 62], $VC = [8, 9, 11, 73, 75], $VD = [1, 88], $VE = [1, 93], $VF = [1, 92], $VG = [1, 89], $VH = [1, 85], $VI = [1, 91], $VJ = [1, 87], $VK = [1, 94], $VL = [1, 90], $VM = [1, 95], $VN = [1, 86], $VO = [8, 9, 10, 11, 73, 75], $VP = [8, 9, 10, 11, 44, 73, 75], $VQ = [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], $VR = [8, 9, 11, 42, 58, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VS = [42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VT = [1, 121], $VU = [1, 120], $VV = [1, 128], $VW = [1, 142], $VX = [1, 143], $VY = [1, 144], $VZ = [1, 145], $V_ = [1, 130], $V$ = [1, 132], $V01 = [1, 136], $V11 = [1, 137], $V21 = [1, 138], $V31 = [1, 139], $V41 = [1, 140], $V51 = [1, 141], $V61 = [1, 146], $V71 = [1, 147], $V81 = [1, 126], $V91 = [1, 127], $Va1 = [1, 134], $Vb1 = [1, 129], $Vc1 = [1, 133], $Vd1 = [1, 131], $Ve1 = [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], $Vf1 = [1, 149], $Vg1 = [8, 9, 11], $Vh1 = [8, 9, 10, 11, 14, 42, 58, 86, 102, 103, 106, 108, 111, 112, 113], $Vi1 = [1, 169], $Vj1 = [1, 165], $Vk1 = [1, 166], $Vl1 = [1, 170], $Vm1 = [1, 167], $Vn1 = [1, 168], $Vo1 = [75, 113, 116], $Vp1 = [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], $Vq1 = [10, 103], $Vr1 = [31, 47, 49, 51, 53, 55, 60, 62, 64, 65, 67, 69, 113, 114, 115], $Vs1 = [1, 235], $Vt1 = [1, 233], $Vu1 = [1, 237], $Vv1 = [1, 231], $Vw1 = [1, 232], $Vx1 = [1, 234], $Vy1 = [1, 236], $Vz1 = [1, 238], $VA1 = [1, 255], $VB1 = [8, 9, 11, 103], $VC1 = [8, 9, 10, 11, 58, 81, 102, 103, 106, 107, 108, 109]; + var parser2 = { + trace: function trace() { + }, + 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 anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 2: + this.$ = []; + break; + case 3: + if (!Array.isArray($$[$0]) || $$[$0].length > 0) { + $$[$0 - 1].push($$[$0]); + } + this.$ = $$[$0 - 1]; + break; + case 4: + case 176: + this.$ = $$[$0]; + break; + case 11: + yy.setDirection("TB"); + this.$ = "TB"; + break; + case 12: + yy.setDirection($$[$0 - 1]); + this.$ = $$[$0 - 1]; + break; + case 27: + this.$ = $$[$0 - 1].nodes; + break; + case 28: + case 29: + case 30: + case 31: + case 32: + this.$ = []; + break; + case 33: + this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]); + break; + case 34: + this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]); + break; + case 35: + this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0); + break; + case 37: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 38: + case 39: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 43: + yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]); + this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) }; + break; + case 44: + yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]); + this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) }; + break; + case 45: + this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] }; + break; + case 46: + this.$ = { stmt: $$[$0], nodes: $$[$0] }; + break; + case 47: + this.$ = [$$[$0]]; + break; + case 48: + this.$ = $$[$0 - 4].concat($$[$0]); + break; + case 49: + this.$ = $$[$0]; + break; + case 50: + this.$ = $$[$0 - 2]; + yy.setClass($$[$0 - 2], $$[$0]); + break; + case 51: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "square"); + break; + case 52: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle"); + break; + case 53: + this.$ = $$[$0 - 5]; + yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle"); + break; + case 54: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse"); + break; + case 55: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium"); + break; + case 56: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine"); + break; + case 57: + this.$ = $$[$0 - 7]; + yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]])); + break; + case 58: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder"); + break; + case 59: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "round"); + break; + case 60: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond"); + break; + case 61: + this.$ = $$[$0 - 5]; + yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon"); + break; + case 62: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd"); + break; + case 63: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid"); + break; + case 64: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid"); + break; + case 65: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right"); + break; + case 66: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left"); + break; + case 67: + this.$ = $$[$0]; + yy.addVertex($$[$0]); + break; + case 68: + $$[$0 - 1].text = $$[$0]; + this.$ = $$[$0 - 1]; + break; + case 69: + case 70: + $$[$0 - 2].text = $$[$0 - 1]; + this.$ = $$[$0 - 2]; + break; + case 71: + this.$ = $$[$0]; + break; + case 72: + var inf = yy.destructLink($$[$0], $$[$0 - 2]); + this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] }; + break; + case 73: + this.$ = { text: $$[$0], type: "text" }; + break; + case 74: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 75: + this.$ = { text: $$[$0], type: "string" }; + break; + case 76: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 77: + var inf = yy.destructLink($$[$0]); + this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length }; + break; + case 78: + this.$ = $$[$0 - 1]; + break; + case 79: + this.$ = { text: $$[$0], type: "text" }; + break; + case 80: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 81: + this.$ = { text: $$[$0], type: "string" }; + break; + case 82: + case 97: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 94: + this.$ = { text: $$[$0], type: "text" }; + break; + case 95: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 96: + this.$ = { text: $$[$0], type: "text" }; + break; + case 98: + this.$ = $$[$0 - 4]; + yy.addClass($$[$0 - 2], $$[$0]); + break; + case 99: + this.$ = $$[$0 - 4]; + yy.setClass($$[$0 - 2], $$[$0]); + break; + case 100: + case 108: + this.$ = $$[$0 - 1]; + yy.setClickEvent($$[$0 - 1], $$[$0]); + break; + case 101: + case 109: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 102: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 103: + this.$ = $$[$0 - 4]; + yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 4], $$[$0]); + break; + case 104: + this.$ = $$[$0 - 2]; + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 105: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 4], $$[$0 - 2]); + yy.setTooltip($$[$0 - 4], $$[$0]); + break; + case 106: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 107: + this.$ = $$[$0 - 6]; + yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]); + yy.setTooltip($$[$0 - 6], $$[$0 - 2]); + break; + case 110: + this.$ = $$[$0 - 1]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 111: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 112: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); + break; + case 113: + this.$ = $$[$0 - 5]; + yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]); + yy.setTooltip($$[$0 - 5], $$[$0 - 2]); + break; + case 114: + this.$ = $$[$0 - 4]; + yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]); + break; + case 115: + this.$ = $$[$0 - 4]; + yy.updateLink([$$[$0 - 2]], $$[$0]); + break; + case 116: + this.$ = $$[$0 - 4]; + yy.updateLink($$[$0 - 2], $$[$0]); + break; + case 117: + this.$ = $$[$0 - 8]; + yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]); + yy.updateLink([$$[$0 - 6]], $$[$0]); + break; + case 118: + this.$ = $$[$0 - 8]; + yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]); + yy.updateLink($$[$0 - 6], $$[$0]); + break; + case 119: + this.$ = $$[$0 - 6]; + yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]); + break; + case 120: + this.$ = $$[$0 - 6]; + yy.updateLinkInterpolate($$[$0 - 4], $$[$0]); + break; + case 121: + case 123: + this.$ = [$$[$0]]; + break; + case 122: + case 124: + $$[$0 - 2].push($$[$0]); + this.$ = $$[$0 - 2]; + break; + case 126: + this.$ = $$[$0 - 1] + $$[$0]; + break; + case 174: + this.$ = $$[$0]; + break; + case 175: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + case 177: + this.$ = $$[$0 - 1] + "" + $$[$0]; + 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: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: $Vx, 15: 53, 18: 56 }, o($Vy, [2, 3]), o($Vy, [2, 4]), o($Vy, [2, 5]), o($Vy, [2, 6]), o($Vy, [2, 7]), o($Vy, [2, 8]), { 8: $Vz, 9: $VA, 11: $VB, 21: 58, 39: 59, 70: 63, 73: [1, 64], 75: [1, 65] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 66 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 67 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 68 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 69 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 70 }, { 8: $Vz, 9: $VA, 10: [1, 71], 11: $VB, 21: 72 }, o($Vy, [2, 36]), { 35: [1, 73] }, { 37: [1, 74] }, o($Vy, [2, 39]), o($VC, [2, 46], { 18: 75, 10: $Vx }), { 10: [1, 76] }, { 10: [1, 77] }, { 10: [1, 78] }, { 10: [1, 79] }, { 14: $VD, 42: $VE, 58: $VF, 77: [1, 83], 86: $VG, 92: [1, 80], 94: [1, 81], 98: 82, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, o($Vy, [2, 178]), o($Vy, [2, 179]), o($Vy, [2, 180]), o($Vy, [2, 181]), o($VO, [2, 47]), o($VO, [2, 49], { 44: [1, 96] }), o($VP, [2, 67], { 110: 109, 29: [1, 97], 42: $Vd, 46: [1, 98], 48: [1, 99], 50: [1, 100], 52: [1, 101], 54: [1, 102], 56: [1, 103], 58: $Ve, 61: [1, 104], 63: [1, 105], 65: [1, 106], 66: [1, 107], 68: [1, 108], 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($VQ, [2, 174]), o($VQ, [2, 135]), o($VQ, [2, 136]), o($VQ, [2, 137]), o($VQ, [2, 138]), o($VQ, [2, 139]), o($VQ, [2, 140]), o($VQ, [2, 141]), o($VQ, [2, 142]), o($VQ, [2, 143]), o($VQ, [2, 144]), o($VQ, [2, 145]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 110] }, o($VR, [2, 26], { 18: 111, 10: $Vx }), o($Vy, [2, 27]), { 40: 112, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vy, [2, 40]), o($Vy, [2, 41]), o($Vy, [2, 42]), o($VS, [2, 71], { 71: 113, 60: [1, 115], 72: [1, 114] }), { 74: 116, 76: 117, 77: [1, 118], 78: [1, 119], 113: $VT, 116: $VU }, o([42, 58, 60, 72, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 77]), o($Vy, [2, 28]), o($Vy, [2, 29]), o($Vy, [2, 30]), o($Vy, [2, 31]), o($Vy, [2, 32]), { 10: $VV, 12: $VW, 14: $VX, 27: $VY, 28: 122, 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 77: [1, 124], 78: [1, 125], 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 123, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Ve1, $V4, { 5: 148 }), o($Vy, [2, 37]), o($Vy, [2, 38]), o($VC, [2, 45], { 42: $Vf1 }), { 42: $Vd, 45: 150, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 99: [1, 151], 100: 152, 102: [1, 153] }, { 42: $Vd, 45: 154, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 42: $Vd, 45: 155, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 100], { 10: [1, 156], 93: [1, 157] }), { 77: [1, 158] }, o($Vg1, [2, 108], { 117: 160, 10: [1, 159], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 110], { 10: [1, 161] }), o($Vh1, [2, 176]), o($Vh1, [2, 163]), o($Vh1, [2, 164]), o($Vh1, [2, 165]), o($Vh1, [2, 166]), o($Vh1, [2, 167]), o($Vh1, [2, 168]), o($Vh1, [2, 169]), o($Vh1, [2, 170]), o($Vh1, [2, 171]), o($Vh1, [2, 172]), o($Vh1, [2, 173]), { 42: $Vd, 45: 162, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 30: 163, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 171, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 173, 48: [1, 172], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 174, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 175, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 176, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 106: [1, 177] }, { 30: 178, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 179, 63: [1, 180], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 181, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 182, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 183, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VQ, [2, 175]), o($V3, [2, 20]), o($VR, [2, 25]), o($VC, [2, 43], { 18: 184, 10: $Vx }), o($VS, [2, 68], { 10: [1, 185] }), { 10: [1, 186] }, { 30: 187, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 75: [1, 188], 76: 189, 113: $VT, 116: $VU }, o($Vo1, [2, 73]), o($Vo1, [2, 75]), o($Vo1, [2, 76]), o($Vo1, [2, 161]), o($Vo1, [2, 162]), { 8: $Vz, 9: $VA, 10: $VV, 11: $VB, 12: $VW, 14: $VX, 21: 191, 27: $VY, 29: [1, 190], 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 192, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Vp1, [2, 94]), o($Vp1, [2, 96]), o($Vp1, [2, 97]), o($Vp1, [2, 150]), o($Vp1, [2, 151]), o($Vp1, [2, 152]), o($Vp1, [2, 153]), o($Vp1, [2, 154]), o($Vp1, [2, 155]), o($Vp1, [2, 156]), o($Vp1, [2, 157]), o($Vp1, [2, 158]), o($Vp1, [2, 159]), o($Vp1, [2, 160]), o($Vp1, [2, 83]), o($Vp1, [2, 84]), o($Vp1, [2, 85]), o($Vp1, [2, 86]), o($Vp1, [2, 87]), o($Vp1, [2, 88]), o($Vp1, [2, 89]), o($Vp1, [2, 90]), o($Vp1, [2, 91]), o($Vp1, [2, 92]), o($Vp1, [2, 93]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 193], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vx, 18: 194 }, { 10: [1, 195], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 196] }, { 10: [1, 197], 103: [1, 198] }, o($Vq1, [2, 121]), { 10: [1, 199], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 200], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 77: [1, 201] }, o($Vg1, [2, 102], { 10: [1, 202] }), o($Vg1, [2, 104], { 10: [1, 203] }), { 77: [1, 204] }, o($Vh1, [2, 177]), { 77: [1, 205], 95: [1, 206] }, o($VO, [2, 50], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), { 31: [1, 207], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Vr1, [2, 79]), o($Vr1, [2, 81]), o($Vr1, [2, 82]), o($Vr1, [2, 146]), o($Vr1, [2, 147]), o($Vr1, [2, 148]), o($Vr1, [2, 149]), { 47: [1, 209], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 210, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 49: [1, 211], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 51: [1, 212], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 53: [1, 213], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 55: [1, 214], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 58: [1, 215] }, { 62: [1, 216], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 64: [1, 217], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 218, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 31: [1, 219], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 220], 69: [1, 221], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 223], 69: [1, 222], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VC, [2, 44], { 42: $Vf1 }), o($VS, [2, 70]), o($VS, [2, 69]), { 60: [1, 224], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VS, [2, 72]), o($Vo1, [2, 74]), { 30: 225, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Ve1, $V4, { 5: 226 }), o($Vp1, [2, 95]), o($Vy, [2, 35]), { 41: 227, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 228, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 239, 101: [1, 240], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 241, 101: [1, 242], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 102: [1, 243] }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 244, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 42: $Vd, 45: 245, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 101]), { 77: [1, 246] }, { 77: [1, 247], 95: [1, 248] }, o($Vg1, [2, 109]), o($Vg1, [2, 111], { 10: [1, 249] }), o($Vg1, [2, 112]), o($VP, [2, 51]), o($Vr1, [2, 80]), o($VP, [2, 52]), { 49: [1, 250], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 59]), o($VP, [2, 54]), o($VP, [2, 55]), o($VP, [2, 56]), { 106: [1, 251] }, o($VP, [2, 58]), o($VP, [2, 60]), { 64: [1, 252], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 62]), o($VP, [2, 63]), o($VP, [2, 65]), o($VP, [2, 64]), o($VP, [2, 66]), o([10, 42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 78]), { 31: [1, 253], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 254], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($VO, [2, 48]), o($Vg1, [2, 114], { 103: $VA1 }), o($VB1, [2, 123], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($VC1, [2, 125]), o($VC1, [2, 127]), o($VC1, [2, 128]), o($VC1, [2, 129]), o($VC1, [2, 130]), o($VC1, [2, 131]), o($VC1, [2, 132]), o($VC1, [2, 133]), o($VC1, [2, 134]), o($Vg1, [2, 115], { 103: $VA1 }), { 10: [1, 257] }, o($Vg1, [2, 116], { 103: $VA1 }), { 10: [1, 258] }, o($Vq1, [2, 122]), o($Vg1, [2, 98], { 103: $VA1 }), o($Vg1, [2, 99], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($Vg1, [2, 103]), o($Vg1, [2, 105], { 10: [1, 259] }), o($Vg1, [2, 106]), { 95: [1, 260] }, { 49: [1, 261] }, { 60: [1, 262] }, { 64: [1, 263] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 264 }, o($Vy, [2, 34]), { 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 104: 265, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VC1, [2, 126]), { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 266, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 267, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 95: [1, 268] }, o($Vg1, [2, 113]), o($VP, [2, 53]), { 30: 269, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 61]), o($Ve1, $V4, { 5: 270 }), o($VB1, [2, 124], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($Vg1, [2, 119], { 117: 160, 10: [1, 271], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 120], { 117: 160, 10: [1, 272], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 107]), { 31: [1, 273], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 274], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 275, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 276, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VP, [2, 57]), o($Vy, [2, 33]), o($Vg1, [2, 117], { 103: $VA1 }), o($Vg1, [2, 118], { 103: $VA1 })], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 34; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 36; + case 3: + this.popState(); + return "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: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 30: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 31: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 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: + this.popState(); + return 13; + case 39: + this.popState(); + return 14; + case 40: + this.popState(); + return 14; + case 41: + this.popState(); + return 14; + case 42: + this.popState(); + return 14; + case 43: + this.popState(); + return 14; + case 44: + this.popState(); + return 14; + case 45: + this.popState(); + return 14; + case 46: + this.popState(); + return 14; + case 47: + this.popState(); + return 14; + case 48: + this.popState(); + return 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: + this.popState(); + return 75; + case 62: + this.pushState("edgeText"); + return 73; + case 63: + return 116; + case 64: + this.popState(); + return 75; + case 65: + this.pushState("thickEdgeText"); + return 73; + case 66: + return 116; + case 67: + this.popState(); + return 75; + case 68: + this.pushState("dottedEdgeText"); + return 73; + case 69: + return 116; + case 70: + return 75; + case 71: + this.popState(); + return 51; + case 72: + return "TEXT"; + case 73: + this.pushState("ellipseText"); + return 50; + case 74: + this.popState(); + return 53; + case 75: + this.pushState("text"); + return 52; + case 76: + this.popState(); + return 55; + case 77: + this.pushState("text"); + return 54; + case 78: + return 56; + case 79: + this.pushState("text"); + return 65; + case 80: + this.popState(); + return 62; + case 81: + this.pushState("text"); + return 61; + case 82: + this.popState(); + return 47; + case 83: + this.pushState("text"); + return 46; + case 84: + this.popState(); + return 67; + case 85: + this.popState(); + return 69; + case 86: + return 114; + case 87: + this.pushState("trapText"); + return 66; + case 88: + this.pushState("trapText"); + return 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: + this.popState(); + return 60; + case 101: + this.pushState("text"); + return 60; + case 102: + this.popState(); + return 49; + case 103: + this.pushState("text"); + return 48; + case 104: + this.popState(); + return 31; + case 105: + this.pushState("text"); + return 29; + case 106: + this.popState(); + return 64; + case 107: + this.pushState("text"); + return 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": false }, "callbackname": { "rules": [8, 9, 10, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "href": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "click": { "rules": [15, 18, 27, 28, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dottedEdgeText": { "rules": [15, 18, 67, 69, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "thickEdgeText": { "rules": [15, 18, 64, 66, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "edgeText": { "rules": [15, 18, 61, 63, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "trapText": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 84, 85, 86, 87, 88, 101, 103, 105, 107], "inclusive": false }, "ellipseText": { "rules": [15, 18, 70, 71, 72, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "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": false }, "vertex": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "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": false }, "acc_descr_multiline": { "rules": [5, 6, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr": { "rules": [3, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_title": { "rules": [1, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "md_string": { "rules": [13, 14, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "string": { "rules": [15, 16, 17, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "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": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const MERMAID_DOM_ID_PREFIX = "flowchart-"; +let vertexCounter = 0; +let config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); +let vertices = {}; +let edges = []; +let classes = {}; +let subGraphs = []; +let subGraphLookup = {}; +let tooltips = {}; +let subCount = 0; +let firstGraphFlag = true; +let direction; +let version; +let funs = []; +const sanitizeText = (txt) => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, config); +const lookUpDomId = function(id) { + const vertexKeys = Object.keys(vertices); + for (const vertexKey of vertexKeys) { + if (vertices[vertexKey].id === id) { + return vertices[vertexKey].domId; + } + } + return id; +}; +const addVertex = function(_id, textObj, type, style, classes2, dir, props = {}) { + let txt; + let id = _id; + if (id === void 0) { + return; + } + if (id.trim().length === 0) { + return; + } + if (vertices[id] === void 0) { + vertices[id] = { + id, + labelType: "text", + domId: MERMAID_DOM_ID_PREFIX + id + "-" + vertexCounter, + styles: [], + classes: [] + }; + } + vertexCounter++; + if (textObj !== void 0) { + config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + txt = sanitizeText(textObj.text.trim()); + vertices[id].labelType = textObj.type; + if (txt[0] === '"' && txt[txt.length - 1] === '"') { + txt = txt.substring(1, txt.length - 1); + } + vertices[id].text = txt; + } else { + if (vertices[id].text === void 0) { + vertices[id].text = _id; + } + } + if (type !== void 0) { + vertices[id].type = type; + } + if (style !== void 0 && style !== null) { + style.forEach(function(s) { + vertices[id].styles.push(s); + }); + } + if (classes2 !== void 0 && classes2 !== null) { + classes2.forEach(function(s) { + vertices[id].classes.push(s); + }); + } + if (dir !== void 0) { + vertices[id].dir = dir; + } + if (vertices[id].props === void 0) { + vertices[id].props = props; + } else if (props !== void 0) { + Object.assign(vertices[id].props, props); + } +}; +const addSingleLink = function(_start, _end, type) { + let start = _start; + let end = _end; + const edge = { start, end, type: void 0, text: "", labelType: "text" }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 Got edge...", edge); + const linkTextObj = type.text; + if (linkTextObj !== void 0) { + edge.text = sanitizeText(linkTextObj.text.trim()); + if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') { + edge.text = edge.text.substring(1, edge.text.length - 1); + } + edge.labelType = linkTextObj.type; + } + if (type !== void 0) { + edge.type = type.type; + edge.stroke = type.stroke; + edge.length = type.length; + } + if ((edge == null ? void 0 : edge.length) > 10) { + edge.length = 10; + } + if (edges.length < (config.maxEdges ?? 500)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 pushing edge..."); + edges.push(edge); + } else { + throw new Error( + `Edge limit exceeded. ${edges.length} edges found, but the limit is ${config.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.` + ); + } +}; +const addLink = function(_start, _end, type) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("addLink (abc78)", _start, _end, type); + let i, j; + for (i = 0; i < _start.length; i++) { + for (j = 0; j < _end.length; j++) { + addSingleLink(_start[i], _end[j], type); + } + } +}; +const updateLinkInterpolate = function(positions, interp) { + positions.forEach(function(pos) { + if (pos === "default") { + edges.defaultInterpolate = interp; + } else { + edges[pos].interpolate = interp; + } + }); +}; +const updateLink = function(positions, style) { + positions.forEach(function(pos) { + if (pos >= edges.length) { + throw new Error( + `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)` + ); + } + if (pos === "default") { + edges.defaultStyle = style; + } else { + if (_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.isSubstringInArray("fill", style) === -1) { + style.push("fill:none"); + } + edges[pos].style = style; + } + }); +}; +const addClass = function(ids, style) { + ids.split(",").forEach(function(id) { + if (classes[id] === void 0) { + classes[id] = { id, styles: [], textStyles: [] }; + } + if (style !== void 0 && style !== null) { + style.forEach(function(s) { + if (s.match("color")) { + const newStyle = s.replace("fill", "bgFill").replace("color", "fill"); + classes[id].textStyles.push(newStyle); + } + classes[id].styles.push(s); + }); + } + }); +}; +const setDirection = function(dir) { + direction = dir; + if (direction.match(/.*</)) { + direction = "RL"; + } + if (direction.match(/.*\^/)) { + direction = "BT"; + } + if (direction.match(/.*>/)) { + direction = "LR"; + } + if (direction.match(/.*v/)) { + direction = "TB"; + } + if (direction === "TD") { + direction = "TB"; + } +}; +const setClass = function(ids, className) { + ids.split(",").forEach(function(_id) { + let id = _id; + if (vertices[id] !== void 0) { + vertices[id].classes.push(className); + } + if (subGraphLookup[id] !== void 0) { + subGraphLookup[id].classes.push(className); + } + }); +}; +const setTooltip = function(ids, tooltip) { + ids.split(",").forEach(function(id) { + if (tooltip !== void 0) { + tooltips[version === "gen-1" ? lookUpDomId(id) : id] = sanitizeText(tooltip); + } + }); +}; +const setClickFun = function(id, functionName, functionArgs) { + let domId = lookUpDomId(id); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i = 0; i < argList.length; i++) { + let item = argList[i].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i] = item; + } + } + if (argList.length === 0) { + argList.push(id); + } + if (vertices[id] !== void 0) { + vertices[id].haveCallback = true; + funs.push(function() { + const elem = document.querySelector(`[id="${domId}"]`); + if (elem !== null) { + elem.addEventListener( + "click", + function() { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList); + }, + false + ); + } + }); + } +}; +const setLink = function(ids, linkStr, target) { + ids.split(",").forEach(function(id) { + if (vertices[id] !== void 0) { + vertices[id].link = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config); + vertices[id].linkTarget = target; + } + }); + setClass(ids, "clickable"); +}; +const getTooltip = function(id) { + if (tooltips.hasOwnProperty(id)) { + return tooltips[id]; + } + return void 0; +}; +const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id) { + setClickFun(id, functionName, functionArgs); + }); + setClass(ids, "clickable"); +}; +const bindFunctions = function(element) { + funs.forEach(function(fun) { + fun(element); + }); +}; +const getDirection = function() { + return direction.trim(); +}; +const getVertices = function() { + return vertices; +}; +const getEdges = function() { + return edges; +}; +const getClasses = function() { + return classes; +}; +const setupToolTips = function(element) { + let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(".mermaidTooltip"); + if ((tooltipElem._groups || tooltipElem)[0][0] === null) { + tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); + } + const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(element).select("svg"); + const nodes = svg.selectAll("g.node"); + nodes.on("mouseover", function() { + const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); + const title = el.attr("title"); + if (title === null) { + return; + } + const rect = this.getBoundingClientRect(); + tooltipElem.transition().duration(200).style("opacity", ".9"); + tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px"); + tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "<br/>")); + el.classed("hover", true); + }).on("mouseout", function() { + tooltipElem.transition().duration(500).style("opacity", 0); + const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); + el.classed("hover", false); + }); +}; +funs.push(setupToolTips); +const clear = function(ver = "gen-1") { + vertices = {}; + classes = {}; + edges = []; + funs = [setupToolTips]; + subGraphs = []; + subGraphLookup = {}; + subCount = 0; + tooltips = {}; + firstGraphFlag = true; + version = ver; + config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.v)(); +}; +const setGen = (ver) => { + version = ver || "gen-2"; +}; +const defaultStyle = function() { + return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"; +}; +const addSubGraph = function(_id, list, _title) { + let id = _id.text.trim(); + let title = _title.text; + if (_id === _title && _title.text.match(/\s/)) { + id = void 0; + } + function uniq(a) { + const prims = { boolean: {}, number: {}, string: {} }; + const objs = []; + let dir2; + const nodeList2 = a.filter(function(item) { + const type = typeof item; + if (item.stmt && item.stmt === "dir") { + dir2 = item.value; + return false; + } + if (item.trim() === "") { + return false; + } + if (type in prims) { + return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true; + } else { + return objs.includes(item) ? false : objs.push(item); + } + }); + return { nodeList: nodeList2, dir: dir2 }; + } + let nodeList = []; + const { nodeList: nl, dir } = uniq(nodeList.concat.apply(nodeList, list)); + nodeList = nl; + if (version === "gen-1") { + for (let i = 0; i < nodeList.length; i++) { + nodeList[i] = lookUpDomId(nodeList[i]); + } + } + id = id || "subGraph" + subCount; + title = title || ""; + title = sanitizeText(title); + subCount = subCount + 1; + const subGraph = { + id, + nodes: nodeList, + title: title.trim(), + classes: [], + dir, + labelType: _title.type + }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir); + subGraph.nodes = makeUniq(subGraph, subGraphs).nodes; + subGraphs.push(subGraph); + subGraphLookup[id] = subGraph; + return id; +}; +const getPosForId = function(id) { + for (const [i, subGraph] of subGraphs.entries()) { + if (subGraph.id === id) { + return i; + } + } + return -1; +}; +let secCount = -1; +const posCrossRef = []; +const indexNodes2 = function(id, pos) { + const nodes = subGraphs[pos].nodes; + secCount = secCount + 1; + if (secCount > 2e3) { + return; + } + posCrossRef[secCount] = pos; + if (subGraphs[pos].id === id) { + return { + result: true, + count: 0 + }; + } + let count = 0; + let posCount = 1; + while (count < nodes.length) { + const childPos = getPosForId(nodes[count]); + if (childPos >= 0) { + const res = indexNodes2(id, childPos); + if (res.result) { + return { + result: true, + count: posCount + res.count + }; + } else { + posCount = posCount + res.count; + } + } + count = count + 1; + } + return { + result: false, + count: posCount + }; +}; +const getDepthFirstPos = function(pos) { + return posCrossRef[pos]; +}; +const indexNodes = function() { + secCount = -1; + if (subGraphs.length > 0) { + indexNodes2("none", subGraphs.length - 1); + } +}; +const getSubGraphs = function() { + return subGraphs; +}; +const firstGraph = () => { + if (firstGraphFlag) { + firstGraphFlag = false; + return true; + } + return false; +}; +const destructStartLink = (_str) => { + let str = _str.trim(); + let type = "arrow_open"; + switch (str[0]) { + case "<": + type = "arrow_point"; + str = str.slice(1); + break; + case "x": + type = "arrow_cross"; + str = str.slice(1); + break; + case "o": + type = "arrow_circle"; + str = str.slice(1); + break; + } + let stroke = "normal"; + if (str.includes("=")) { + stroke = "thick"; + } + if (str.includes(".")) { + stroke = "dotted"; + } + return { type, stroke }; +}; +const countChar = (char, str) => { + const length = str.length; + let count = 0; + for (let i = 0; i < length; ++i) { + if (str[i] === char) { + ++count; + } + } + return count; +}; +const destructEndLink = (_str) => { + const str = _str.trim(); + let line = str.slice(0, -1); + let type = "arrow_open"; + switch (str.slice(-1)) { + case "x": + type = "arrow_cross"; + if (str[0] === "x") { + type = "double_" + type; + line = line.slice(1); + } + break; + case ">": + type = "arrow_point"; + if (str[0] === "<") { + type = "double_" + type; + line = line.slice(1); + } + break; + case "o": + type = "arrow_circle"; + if (str[0] === "o") { + type = "double_" + type; + line = line.slice(1); + } + break; + } + let stroke = "normal"; + let length = line.length - 1; + if (line[0] === "=") { + stroke = "thick"; + } + if (line[0] === "~") { + stroke = "invisible"; + } + let dots = countChar(".", line); + if (dots) { + stroke = "dotted"; + length = dots; + } + return { type, stroke, length }; +}; +const destructLink = (_str, _startStr) => { + const info = destructEndLink(_str); + let startInfo; + if (_startStr) { + startInfo = destructStartLink(_startStr); + if (startInfo.stroke !== info.stroke) { + return { type: "INVALID", stroke: "INVALID" }; + } + if (startInfo.type === "arrow_open") { + startInfo.type = info.type; + } else { + if (startInfo.type !== info.type) { + return { type: "INVALID", stroke: "INVALID" }; + } + startInfo.type = "double_" + startInfo.type; + } + if (startInfo.type === "double_arrow") { + startInfo.type = "double_arrow_point"; + } + startInfo.length = info.length; + return startInfo; + } + return info; +}; +const exists = (allSgs, _id) => { + let res = false; + allSgs.forEach((sg) => { + const pos = sg.nodes.indexOf(_id); + if (pos >= 0) { + res = true; + } + }); + return res; +}; +const makeUniq = (sg, allSubgraphs) => { + const res = []; + sg.nodes.forEach((_id, pos) => { + if (!exists(allSubgraphs, _id)) { + res.push(sg.nodes[pos]); + } + }); + return { nodes: res }; +}; +const lex = { + firstGraph +}; +const flowDb = { + defaultConfig: () => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.K.flowchart, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.g, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.a, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.b, + addVertex, + lookUpDomId, + addLink, + updateLinkInterpolate, + updateLink, + addClass, + setDirection, + setClass, + setTooltip, + getTooltip, + setClickEvent, + setLink, + bindFunctions, + getDirection, + getVertices, + getEdges, + getClasses, + clear, + setGen, + defaultStyle, + addSubGraph, + getDepthFirstPos, + indexNodes, + getSubGraphs, + destructLink, + lex, + exists, + makeUniq, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.t +}; +const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addClass, + addLink, + addSingleLink, + addSubGraph, + addVertex, + bindFunctions, + clear, + default: flowDb, + defaultStyle, + destructLink, + firstGraph, + getClasses, + getDepthFirstPos, + getDirection, + getEdges, + getSubGraphs, + getTooltip, + getVertices, + indexNodes, + lex, + lookUpDomId, + setClass, + setClickEvent, + setDirection, + setGen, + setLink, + updateLink, + updateLinkInterpolate +}, Symbol.toStringTag, { value: "Module" })); + + + +/***/ }), + +/***/ 2235: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _flowDb_4b19a42f_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6216); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8747); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6257); +/* harmony import */ var elkjs_lib_elk_bundled_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2954); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9418); + + + + + + + + + + + + + + + + +const findCommonAncestor = (id1, id2, treeData) => { + const { parentById } = treeData; + const visited = /* @__PURE__ */ new Set(); + let currentId = id1; + while (currentId) { + visited.add(currentId); + if (currentId === id2) { + return currentId; + } + currentId = parentById[currentId]; + } + currentId = id2; + while (currentId) { + if (visited.has(currentId)) { + return currentId; + } + currentId = parentById[currentId]; + } + return "root"; +}; +const elk = new elkjs_lib_elk_bundled_js__WEBPACK_IMPORTED_MODULE_1__(); +let portPos = {}; +const conf = {}; +let nodeDb = {}; +const addVertices = async function(vert, svgId, root, doc, diagObj, parentLookupDb, graph) { + const svg = root.select(`[id="${svgId}"]`); + const nodes = svg.insert("g").attr("class", "nodes"); + const keys = Object.keys(vert); + await Promise.all( + keys.map(async function(id) { + const vertex = vert[id]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + classStr = classStr + " flowchart-label"; + const styles2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.k)(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + const labelData = { width: 0, height: 0 }; + const ports = [ + { + id: vertex.id + "-west", + layoutOptions: { + "port.side": "WEST" + } + }, + { + id: vertex.id + "-east", + layoutOptions: { + "port.side": "EAST" + } + }, + { + id: vertex.id + "-south", + layoutOptions: { + "port.side": "SOUTH" + } + }, + { + id: vertex.id + "-north", + layoutOptions: { + "port.side": "NORTH" + } + } + ]; + let radius = 0; + let _shape = ""; + let layoutOptions = {}; + switch (vertex.type) { + case "round": + radius = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + layoutOptions = { + portConstraints: "FIXED_SIDE" + }; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + case "doublecircle": + _shape = "doublecircle"; + break; + default: + _shape = "rect"; + } + const node = { + labelStyle: styles2.labelStyle, + shape: _shape, + labelText: vertexText, + labelType: vertex.labelType, + rx: radius, + ry: radius, + class: classStr, + style: styles2.style, + id: vertex.id, + link: vertex.link, + linkTarget: vertex.linkTarget, + tooltip: diagObj.db.getTooltip(vertex.id) || "", + domId: diagObj.db.lookUpDomId(vertex.id), + haveCallback: vertex.haveCallback, + width: vertex.type === "group" ? 500 : void 0, + dir: vertex.dir, + type: vertex.type, + props: vertex.props, + padding: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.F)().flowchart.padding + }; + let boundingBox; + let nodeEl; + if (node.type !== "group") { + nodeEl = await (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.e)(nodes, node, vertex.dir); + boundingBox = nodeEl.node().getBBox(); + } else { + doc.createElementNS("http://www.w3.org/2000/svg", "text"); + const { shapeSvg, bbox } = await (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.l)(nodes, node, void 0, true); + labelData.width = bbox.width; + labelData.wrappingWidth = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.F)().flowchart.wrappingWidth; + labelData.height = bbox.height; + labelData.labelNode = shapeSvg.node(); + node.labelData = labelData; + } + const data = { + id: vertex.id, + ports: vertex.type === "diamond" ? ports : [], + // labelStyle: styles.labelStyle, + // shape: _shape, + layoutOptions, + labelText: vertexText, + labelData, + // labels: [{ text: vertexText }], + // rx: radius, + // ry: radius, + // class: classStr, + // style: styles.style, + // link: vertex.link, + // linkTarget: vertex.linkTarget, + // tooltip: diagObj.db.getTooltip(vertex.id) || '', + domId: diagObj.db.lookUpDomId(vertex.id), + // haveCallback: vertex.haveCallback, + width: boundingBox == null ? void 0 : boundingBox.width, + height: boundingBox == null ? void 0 : boundingBox.height, + // dir: vertex.dir, + type: vertex.type, + // props: vertex.props, + // padding: getConfig().flowchart.padding, + // boundingBox, + el: nodeEl, + parent: parentLookupDb.parentById[vertex.id] + }; + nodeDb[node.id] = data; + }) + ); + return graph; +}; +const getNextPosition = (position, edgeDirection, graphDirection) => { + const portPos2 = { + TB: { + in: { + north: "north" + }, + out: { + south: "west", + west: "east", + east: "south" + } + }, + LR: { + in: { + west: "west" + }, + out: { + east: "south", + south: "north", + north: "east" + } + }, + RL: { + in: { + east: "east" + }, + out: { + west: "north", + north: "south", + south: "west" + } + }, + BT: { + in: { + south: "south" + }, + out: { + north: "east", + east: "west", + west: "north" + } + } + }; + portPos2.TD = portPos2.TB; + return portPos2[graphDirection][edgeDirection][position]; +}; +const getNextPort = (node, edgeDirection, graphDirection) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("getNextPort", { node, edgeDirection, graphDirection }); + if (!portPos[node]) { + switch (graphDirection) { + case "TB": + case "TD": + portPos[node] = { + inPosition: "north", + outPosition: "south" + }; + break; + case "BT": + portPos[node] = { + inPosition: "south", + outPosition: "north" + }; + break; + case "RL": + portPos[node] = { + inPosition: "east", + outPosition: "west" + }; + break; + case "LR": + portPos[node] = { + inPosition: "west", + outPosition: "east" + }; + break; + } + } + const result = edgeDirection === "in" ? portPos[node].inPosition : portPos[node].outPosition; + if (edgeDirection === "in") { + portPos[node].inPosition = getNextPosition( + portPos[node].inPosition, + edgeDirection, + graphDirection + ); + } else { + portPos[node].outPosition = getNextPosition( + portPos[node].outPosition, + edgeDirection, + graphDirection + ); + } + return result; +}; +const getEdgeStartEndPoint = (edge, dir) => { + let source = edge.start; + let target = edge.end; + const sourceId = source; + const targetId = target; + const startNode = nodeDb[source]; + const endNode = nodeDb[target]; + if (!startNode || !endNode) { + return { source, target }; + } + if (startNode.type === "diamond") { + source = `${source}-${getNextPort(source, "out", dir)}`; + } + if (endNode.type === "diamond") { + target = `${target}-${getNextPort(target, "in", dir)}`; + } + return { source, target, sourceId, targetId }; +}; +const addEdges = function(edges, diagObj, graph, svg) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("abc78 edges = ", edges); + const labelsEl = svg.insert("g").attr("class", "edgeLabels"); + let linkIdCnt = {}; + let dir = diagObj.db.getDirection(); + let defaultStyle; + let defaultLabelStyle; + if (edges.defaultStyle !== void 0) { + const defaultStyles = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.k)(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges.forEach(function(edge) { + const linkIdBase = "L-" + edge.start + "-" + edge.end; + if (linkIdCnt[linkIdBase] === void 0) { + linkIdCnt[linkIdBase] = 0; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } else { + linkIdCnt[linkIdBase]++; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } + let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = { style: "", labelStyle: "" }; + edgeData.minlen = edge.length || 1; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + edgeData.arrowTypeStart = "arrow_open"; + edgeData.arrowTypeEnd = "arrow_open"; + switch (edge.type) { + case "double_arrow_cross": + edgeData.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + edgeData.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + edgeData.arrowTypeStart = "arrow_point"; + case "arrow_point": + edgeData.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + edgeData.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + edgeData.arrowTypeEnd = "arrow_circle"; + break; + } + let style = ""; + let labelStyle = ""; + switch (edge.stroke) { + case "normal": + style = "fill:none;"; + if (defaultStyle !== void 0) { + style = defaultStyle; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + edgeData.thickness = "normal"; + edgeData.pattern = "solid"; + break; + case "dotted": + edgeData.thickness = "normal"; + edgeData.pattern = "dotted"; + edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + edgeData.thickness = "thick"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 3.5px;fill:none;"; + break; + } + if (edge.style !== void 0) { + const styles2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.k)(edge.style); + style = styles2.style; + labelStyle = styles2.labelStyle; + } + edgeData.style = edgeData.style += style; + edgeData.labelStyle = edgeData.labelStyle += labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.n)(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .lUB); + } else if (edges.defaultInterpolate !== void 0) { + edgeData.curve = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.n)(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .lUB); + } else { + edgeData.curve = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.n)(conf.curve, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .lUB); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + } + edgeData.labelType = edge.labelType; + edgeData.label = edge.text.replace(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.e.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + edgeData.id = linkId; + edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; + const labelEl = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.f)(labelsEl, edgeData); + const { source, target, sourceId, targetId } = getEdgeStartEndPoint(edge, dir); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("abc78 source and target", source, target); + graph.edges.push({ + id: "e" + edge.start + edge.end, + sources: [source], + targets: [target], + sourceId, + targetId, + labelEl, + labels: [ + { + width: edgeData.width, + height: edgeData.height, + orgWidth: edgeData.width, + orgHeight: edgeData.height, + text: edgeData.label, + layoutOptions: { + "edgeLabels.inline": "true", + "edgeLabels.placement": "CENTER" + } + } + ], + edgeData + }); + }); + return graph; +}; +const addMarkersToEdge = function(svgPath, edgeData, diagramType, arrowMarkerAbsolute, id) { + let url = ""; + if (arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.m)(svgPath, edgeData, url, id, diagramType); +}; +const getClasses = function(text, diagObj) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("Extracting classes"); + return diagObj.db.getClasses(); +}; +const addSubGraphs = function(db2) { + const parentLookupDb = { parentById: {}, childrenById: {} }; + const subgraphs = db2.getSubGraphs(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("Subgraphs - ", subgraphs); + subgraphs.forEach(function(subgraph) { + subgraph.nodes.forEach(function(node) { + parentLookupDb.parentById[node] = subgraph.id; + if (parentLookupDb.childrenById[subgraph.id] === void 0) { + parentLookupDb.childrenById[subgraph.id] = []; + } + parentLookupDb.childrenById[subgraph.id].push(node); + }); + }); + subgraphs.forEach(function(subgraph) { + ({ id: subgraph.id }); + if (parentLookupDb.parentById[subgraph.id] !== void 0) { + parentLookupDb.parentById[subgraph.id]; + } + }); + return parentLookupDb; +}; +const calcOffset = function(src, dest, parentLookupDb) { + const ancestor = findCommonAncestor(src, dest, parentLookupDb); + if (ancestor === void 0 || ancestor === "root") { + return { x: 0, y: 0 }; + } + const ancestorOffset = nodeDb[ancestor].offset; + return { x: ancestorOffset.posX, y: ancestorOffset.posY }; +}; +const insertEdge = function(edgesEl, edge, edgeData, diagObj, parentLookupDb, id) { + const offset = calcOffset(edge.sourceId, edge.targetId, parentLookupDb); + const src = edge.sections[0].startPoint; + const dest = edge.sections[0].endPoint; + const segments = edge.sections[0].bendPoints ? edge.sections[0].bendPoints : []; + const segPoints = segments.map((segment) => [segment.x + offset.x, segment.y + offset.y]); + const points = [ + [src.x + offset.x, src.y + offset.y], + ...segPoints, + [dest.x + offset.x, dest.y + offset.y] + ]; + const { x, y } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.k)(edge.edgeData); + const curve = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .lUB); + const edgePath = edgesEl.insert("path").attr("d", curve(points)).attr("class", "path " + edgeData.classes).attr("fill", "none"); + const edgeG = edgesEl.insert("g").attr("class", "edgeLabel"); + const edgeWithLabel = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(edgeG.node().appendChild(edge.labelEl)); + const box = edgeWithLabel.node().firstChild.getBoundingClientRect(); + edgeWithLabel.attr("width", box.width); + edgeWithLabel.attr("height", box.height); + edgeG.attr( + "transform", + `translate(${edge.labels[0].x + offset.x}, ${edge.labels[0].y + offset.y})` + ); + addMarkersToEdge(edgePath, edgeData, diagObj.type, diagObj.arrowMarkerAbsolute, id); +}; +const insertChildren = (nodeArray, parentLookupDb) => { + nodeArray.forEach((node) => { + if (!node.children) { + node.children = []; + } + const childIds = parentLookupDb.childrenById[node.id]; + if (childIds) { + childIds.forEach((childId) => { + node.children.push(nodeDb[childId]); + }); + } + insertChildren(node.children, parentLookupDb); + }); +}; +const draw = async function(text, id, _version, diagObj) { + var _a; + diagObj.db.clear(); + nodeDb = {}; + portPos = {}; + diagObj.db.setGen("gen-2"); + diagObj.parser.parse(text); + const renderEl = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("style", "height:400px").attr("id", "cy"); + let graph = { + id: "root", + layoutOptions: { + "elk.hierarchyHandling": "INCLUDE_CHILDREN", + "org.eclipse.elk.padding": "[top=100, left=100, bottom=110, right=110]", + "elk.layered.spacing.edgeNodeBetweenLayers": "30", + // 'elk.layered.mergeEdges': 'true', + "elk.direction": "DOWN" + // 'elk.ports.sameLayerEdges': true, + // 'nodePlacement.strategy': 'SIMPLE', + }, + children: [], + edges: [] + }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("Drawing flowchart using v3 renderer", elk); + let dir = diagObj.db.getDirection(); + switch (dir) { + case "BT": + graph.layoutOptions["elk.direction"] = "UP"; + break; + case "TB": + graph.layoutOptions["elk.direction"] = "DOWN"; + break; + case "LR": + graph.layoutOptions["elk.direction"] = "RIGHT"; + break; + case "RL": + graph.layoutOptions["elk.direction"] = "LEFT"; + break; + } + const { securityLevel, flowchart: conf2 } = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.F)(); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const svg = root.select(`[id="${id}"]`); + const markers = ["point", "circle", "cross"]; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.a)(svg, markers, diagObj.type, id); + const vert = diagObj.db.getVertices(); + let subG; + const subGraphs = diagObj.db.getSubGraphs(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("Subgraphs - ", subGraphs); + for (let i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + diagObj.db.addVertex( + subG.id, + { text: subG.title, type: subG.labelType }, + "group", + void 0, + subG.classes, + subG.dir + ); + } + const subGraphsEl = svg.insert("g").attr("class", "subgraphs"); + const parentLookupDb = addSubGraphs(diagObj.db); + graph = await addVertices(vert, id, root, doc, diagObj, parentLookupDb, graph); + const edgesEl = svg.insert("g").attr("class", "edges edgePath"); + const edges = diagObj.db.getEdges(); + graph = addEdges(edges, diagObj, graph, svg); + const nodes = Object.keys(nodeDb); + nodes.forEach((nodeId) => { + const node = nodeDb[nodeId]; + if (!node.parent) { + graph.children.push(node); + } + if (parentLookupDb.childrenById[nodeId] !== void 0) { + node.labels = [ + { + text: node.labelText, + layoutOptions: { + "nodeLabels.placement": "[H_CENTER, V_TOP, INSIDE]" + }, + width: node.labelData.width, + height: node.labelData.height + // width: 100, + // height: 100, + } + ]; + delete node.x; + delete node.y; + delete node.width; + delete node.height; + } + }); + insertChildren(graph.children, parentLookupDb); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("after layout", JSON.stringify(graph, null, 2)); + const g = await elk.layout(graph); + drawNodes(0, 0, g.children, svg, subGraphsEl, diagObj, 0); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("after layout", g); + (_a = g.edges) == null ? void 0 : _a.map((edge) => { + insertEdge(edgesEl, edge, edge.edgeData, diagObj, parentLookupDb, id); + }); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.o)({}, svg, conf2.diagramPadding, conf2.useMaxWidth); + renderEl.remove(); +}; +const drawNodes = (relX, relY, nodeArray, svg, subgraphsEl, diagObj, depth) => { + nodeArray.forEach(function(node) { + if (node) { + nodeDb[node.id].offset = { + posX: node.x + relX, + posY: node.y + relY, + x: relX, + y: relY, + depth, + width: node.width, + height: node.height + }; + if (node.type === "group") { + const subgraphEl = subgraphsEl.insert("g").attr("class", "subgraph"); + subgraphEl.insert("rect").attr("class", "subgraph subgraph-lvl-" + depth % 5 + " node").attr("x", node.x + relX).attr("y", node.y + relY).attr("width", node.width).attr("height", node.height); + const label = subgraphEl.insert("g").attr("class", "label"); + const labelCentering = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.F)().flowchart.htmlLabels ? node.labelData.width / 2 : 0; + label.attr( + "transform", + `translate(${node.labels[0].x + relX + node.x + labelCentering}, ${node.labels[0].y + relY + node.y + 3})` + ); + label.node().appendChild(node.labelData.labelNode); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("Id (UGH)= ", node.type, node.labels); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.info("Id (UGH)= ", node.id); + node.el.attr( + "transform", + `translate(${node.x + relX + node.width / 2}, ${node.y + relY + node.height / 2})` + ); + } + } + }); + nodeArray.forEach(function(node) { + if (node && node.type === "group") { + drawNodes(relX + node.x, relY + node.y, node.children, svg, subgraphsEl, diagObj, depth + 1); + } + }); +}; +const renderer = { + getClasses, + draw +}; +const genSections = (options) => { + let sections = ""; + for (let i = 0; i < 5; i++) { + sections += ` + .subgraph-lvl-${i} { + fill: ${options[`surface${i}`]}; + stroke: ${options[`surfacePeer${i}`]}; + } + `; + } + return sections; +}; +const getStyles = (options) => `.label { + font-family: ${options.fontFamily}; + color: ${options.nodeTextColor || options.textColor}; + } + .cluster-label text { + fill: ${options.titleColor}; + } + .cluster-label span { + color: ${options.titleColor}; + } + + .label text,span { + fill: ${options.nodeTextColor || options.textColor}; + color: ${options.nodeTextColor || options.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.85; + background-color: ${options.edgeLabelBackground}; + fill: ${options.edgeLabelBackground}; + } + text-align: center; + } + + .cluster rect { + fill: ${options.clusterBkg}; + stroke: ${options.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${options.titleColor}; + } + + .cluster span { + color: ${options.titleColor}; + } + /* .cluster div { + color: ${options.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${options.fontFamily}; + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } + .subgraph { + stroke-width:2; + rx:3; + } + // .subgraph-lvl-1 { + // fill:#ccc; + // // stroke:black; + // } + + .flowchart-label text { + text-anchor: middle; + } + + ${genSections(options)} +`; +const styles = getStyles; +const diagram = { + db: _flowDb_4b19a42f_js__WEBPACK_IMPORTED_MODULE_7__.d, + renderer, + parser: _flowDb_4b19a42f_js__WEBPACK_IMPORTED_MODULE_7__.p, + styles +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/2662fbc1.16d1fb5d.js b/assets/js/2662fbc1.16d1fb5d.js new file mode 100644 index 00000000..28f8384c --- /dev/null +++ b/assets/js/2662fbc1.16d1fb5d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[1847],{9543:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"about":[{"type":"link","label":"Introduction","href":"/tagreader-python/docs/about/introduction","docId":"about/introduction","unlisted":false},{"type":"category","label":"Usage","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"Basic usage","href":"/tagreader-python/docs/about/usage/basic-usage","docId":"about/usage/basic-usage","unlisted":false},{"type":"link","label":"Data sources","href":"/tagreader-python/docs/about/usage/data-source","docId":"about/usage/data-source","unlisted":false},{"type":"link","label":"Fetching metadata","href":"/tagreader-python/docs/about/usage/fetching-metadata","docId":"about/usage/fetching-metadata","unlisted":false},{"type":"link","label":"Caching results","href":"/tagreader-python/docs/about/usage/caching","docId":"about/usage/caching","unlisted":false},{"type":"link","label":"Time zones","href":"/tagreader-python/docs/about/usage/time-zone","docId":"about/usage/time-zone","unlisted":false}],"href":"/tagreader-python/docs/category/usage"}],"contribute":[{"type":"link","label":"Overview","href":"/tagreader-python/docs/contribute/overview","docId":"contribute/overview","unlisted":false},{"type":"link","label":"Get started","href":"/tagreader-python/docs/contribute/how-to-start-contributing","docId":"contribute/how-to-start-contributing","unlisted":false},{"type":"link","label":"Ground rules","href":"/tagreader-python/docs/contribute/ground-rules","docId":"contribute/ground-rules","unlisted":false},{"type":"category","label":"Developer guide","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Publishing","href":"/tagreader-python/docs/contribute/development-guide/publishing","docId":"contribute/development-guide/publishing","unlisted":false},{"type":"link","label":"Setup","href":"/tagreader-python/docs/contribute/development-guide/setup","docId":"contribute/development-guide/setup","unlisted":false},{"type":"link","label":"Testing","href":"/tagreader-python/docs/contribute/development-guide/testing","docId":"contribute/development-guide/testing","unlisted":false},{"type":"link","label":"Upgrading","href":"/tagreader-python/docs/contribute/development-guide/upgrading","docId":"contribute/development-guide/upgrading","unlisted":false}],"href":"/tagreader-python/docs/category/developer-guide"},{"type":"link","label":"Documentation","href":"/tagreader-python/docs/contribute/documentation","docId":"contribute/documentation","unlisted":false}]},"docs":{"about/introduction":{"id":"about/introduction","title":"Introduction","description":"Tagreader is a Python package for reading timeseries data from the OSIsoft PI and Aspen Infoplus.21","sidebar":"about"},"about/usage/basic-usage":{"id":"about/usage/basic-usage","title":"Basic usage","description":"The module is imported with","sidebar":"about"},"about/usage/caching":{"id":"about/usage/caching","title":"Caching results","description":"It is possible to cache data locally using SQLite-files that will be attached to the client upon client creation. Whenever","sidebar":"about"},"about/usage/data-source":{"id":"about/usage/data-source","title":"Data sources","description":"Tagreader supports connecting to PI and IP.21 servers using a Web API interfaces. When calling certain","sidebar":"about"},"about/usage/fetching-metadata":{"id":"about/usage/fetching-metadata","title":"Fetching metadata","description":"Two client methods have been created to fetch basic metadata for one or more tags.","sidebar":"about"},"about/usage/time-zone":{"id":"about/usage/time-zone","title":"Time zones","description":"It is important to understand how Tagreader uses and interprets time zones. Queries to the backend servers are always","sidebar":"about"},"contribute/development-guide/publishing":{"id":"contribute/development-guide/publishing","title":"Publishing","description":"TBD","sidebar":"contribute"},"contribute/development-guide/setup":{"id":"contribute/development-guide/setup","title":"Setup","description":"Prerequisites","sidebar":"contribute"},"contribute/development-guide/testing":{"id":"contribute/development-guide/testing","title":"Testing","description":"TBD","sidebar":"contribute"},"contribute/development-guide/upgrading":{"id":"contribute/development-guide/upgrading","title":"Upgrading","description":"TBD","sidebar":"contribute"},"contribute/documentation":{"id":"contribute/documentation","title":"Documentation","description":"This site was generated from the contents of your documentation folder using Docusaurus, and we host it on GitHub Pages.","sidebar":"contribute"},"contribute/ground-rules":{"id":"contribute/ground-rules","title":"Ground rules","description":"* Always make sure that the main branch is ready to deploy. If something break, we fix it as soon as possible.","sidebar":"contribute"},"contribute/how-to-start-contributing":{"id":"contribute/how-to-start-contributing","title":"Get started","description":"Welcome! We are glad that you want to contribute to our project! \ud83d\udc96","sidebar":"contribute"},"contribute/overview":{"id":"contribute/overview","title":"Overview","description":"Getting started","sidebar":"contribute"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/2746.90938529.js b/assets/js/2746.90938529.js new file mode 100644 index 00000000..846820a6 --- /dev/null +++ b/assets/js/2746.90938529.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[2746],{4075:(e,t,n)=>{n.d(t,{M:()=>d});var r=n(9592),i=n(53),a=n(4722);n(3046);function d(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:l(e)};return r.A(e.graph())||(t.value=i.A(e.graph())),t}function o(e){return a.A(e.nodes(),(function(t){var n=e.node(t),i=e.parent(t),a={v:t};return r.A(n)||(a.value=n),r.A(i)||(a.parent=i),a}))}function l(e){return a.A(e.edges(),(function(t){var n=e.edge(t),i={v:t.v,w:t.w};return r.A(t.name)||(i.name=t.name),r.A(n)||(i.value=n),i}))}},53:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(1641);const i=function(e){return(0,r.A)(e,4)}},2746:(e,t,n)=>{n.d(t,{r:()=>E});var r=n(1176),i=n(4075),a=n(8747),d=n(6257),o=n(697),l=n(358),s=n(6312);let c={},h={},g={};const f=(e,t)=>(d.l.trace("In isDescendant",t," ",e," = ",h[t].includes(e)),!!h[t].includes(e)),u=(e,t,n,r)=>{d.l.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const i=t.children(e)||[];e!==r&&i.push(e),d.l.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach((i=>{if(t.children(i).length>0)u(i,t,n,r);else{const a=t.node(i);d.l.info("cp ",i," to ",r," with parent ",e),n.setNode(i,a),r!==t.parent(i)&&(d.l.warn("Setting parent",i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(d.l.debug("Setting parent",i,e),n.setParent(i,e)):(d.l.info("In copy ",e,"root",r,"data",t.node(e),r),d.l.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const o=t.edges(i);d.l.debug("Copying Edges",o),o.forEach((i=>{d.l.info("Edge",i);const a=t.edge(i.v,i.w,i.name);d.l.info("Edge data",a,r);try{((e,t)=>(d.l.info("Descendants of ",t," is ",h[t]),d.l.info("Edge is ",e),e.v!==t&&e.w!==t&&(h[t]?h[t].includes(e.v)||f(e.v,t)||f(e.w,t)||h[t].includes(e.w):(d.l.debug("Tilt, ",t,",not in descendants"),!1))))(i,r)?(d.l.info("Copying as ",i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),d.l.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):d.l.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",e)}catch(o){d.l.error(o)}}))}d.l.debug("Removing node",i),t.removeNode(i)}))},w=(e,t)=>{const n=t.children(e);let r=[...n];for(const i of n)g[i]=e,r=[...r,...w(i,t)];return r},p=(e,t)=>{d.l.trace("Searching",e);const n=t.children(e);if(d.l.trace("Searching children of id ",e,n),n.length<1)return d.l.trace("This is a valid node",e),e;for(const r of n){const n=p(r,t);if(n)return d.l.trace("Found replacement for",e," => ",n),n}},v=e=>c[e]&&c[e].externalConnections&&c[e]?c[e].id:e,y=(e,t)=>{if(d.l.warn("extractor - ",t,i.M(e),e.children("D")),t>10)return void d.l.error("Bailing out");let n=e.nodes(),r=!1;for(const i of n){const t=e.children(i);r=r||t.length>0}if(r){d.l.debug("Nodes = ",n,t);for(const r of n)if(d.l.debug("Extracting node",r,c,c[r]&&!c[r].externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),c[r])if(!c[r].externalConnections&&e.children(r)&&e.children(r).length>0){d.l.warn("Cluster without external connections, without a parent and with children",r,t);let n="TB"===e.graph().rankdir?"LR":"TB";c[r]&&c[r].clusterData&&c[r].clusterData.dir&&(n=c[r].clusterData.dir,d.l.warn("Fixing dir",c[r].clusterData.dir,n));const a=new o.T({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));d.l.warn("Old graph before copy",i.M(e)),u(r,e,a,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:c[r].clusterData,labelText:c[r].labelText,graph:a}),d.l.warn("New graph after copy node: (",r,")",i.M(a)),d.l.debug("Old graph after copy",i.M(e))}else d.l.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!c[r].externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),d.l.debug(c);else d.l.debug("Not a cluster",r,t);n=e.nodes(),d.l.warn("New list of nodes",n);for(const r of n){const n=e.node(r);d.l.warn(" Now next level",r,n),n.clusterNode&&y(n.graph,t+1)}}else d.l.debug("Done, no node has children",e.nodes())},x=(e,t)=>{if(0===t.length)return[];let n=Object.assign(t);return t.forEach((t=>{const r=e.children(t),i=x(e,r);n=[...n,...i]})),n},m={rect:(e,t)=>{d.l.info("Creating subgraph rect for ",t.id,t);const n=(0,d.c)(),r=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),i=r.insert("rect",":first-child"),o=(0,d.m)(n.flowchart.htmlLabels),c=r.insert("g").attr("class","cluster-label"),h="markdown"===t.labelType?(0,l.a)(c,t.labelText,{style:t.labelStyle,useHtmlLabels:o}):c.node().appendChild((0,a.c)(t.labelText,t.labelStyle,void 0,!0));let g=h.getBBox();if((0,d.m)(n.flowchart.htmlLabels)){const e=h.children[0],t=(0,s.Ltv)(h);g=e.getBoundingClientRect(),t.attr("width",g.width),t.attr("height",g.height)}const f=0*t.padding,u=f/2,w=t.width<=g.width+f?g.width+f:t.width;t.width<=g.width+f?t.diff=(g.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,d.l.trace("Data ",t,JSON.stringify(t)),i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-w/2).attr("y",t.y-t.height/2-u).attr("width",w).attr("height",t.height+f);const{subGraphTitleTopMargin:p}=(0,a.g)(n);o?c.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+p})`):c.attr("transform",`translate(${t.x}, ${t.y-t.height/2+p})`);const v=i.node().getBBox();return t.width=v.width,t.height=v.height,t.intersect=function(e){return(0,a.i)(t,e)},r},roundedWithTitle:(e,t)=>{const n=(0,d.c)(),r=e.insert("g").attr("class",t.classes).attr("id",t.id),i=r.insert("rect",":first-child"),o=r.insert("g").attr("class","cluster-label"),l=r.append("rect"),c=o.node().appendChild((0,a.c)(t.labelText,t.labelStyle,void 0,!0));let h=c.getBBox();if((0,d.m)(n.flowchart.htmlLabels)){const e=c.children[0],t=(0,s.Ltv)(c);h=e.getBoundingClientRect(),t.attr("width",h.width),t.attr("height",h.height)}h=c.getBBox();const g=0*t.padding,f=g/2,u=t.width<=h.width+t.padding?h.width+t.padding:t.width;t.width<=h.width+t.padding?t.diff=(h.width+0*t.padding-t.width)/2:t.diff=-t.padding/2,i.attr("class","outer").attr("x",t.x-u/2-f).attr("y",t.y-t.height/2-f).attr("width",u+g).attr("height",t.height+g),l.attr("class","inner").attr("x",t.x-u/2-f).attr("y",t.y-t.height/2-f+h.height-1).attr("width",u+g).attr("height",t.height+g-h.height-3);const{subGraphTitleTopMargin:w}=(0,a.g)(n);o.attr("transform",`translate(${t.x-h.width/2}, ${t.y-t.height/2-t.padding/3+((0,d.m)(n.flowchart.htmlLabels)?5:3)+w})`);const p=i.node().getBBox();return t.height=p.height,t.intersect=function(e){return(0,a.i)(t,e)},r},noteGroup:(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),i=0*t.padding,d=i/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-d).attr("y",t.y-t.height/2-d).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");const o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return(0,a.i)(t,e)},n},divider:(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),i=0*t.padding,d=i/2;r.attr("class","divider").attr("x",t.x-t.width/2-d).attr("y",t.y-t.height/2).attr("width",t.width+i).attr("height",t.height+i);const o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.diff=-t.padding/2,t.intersect=function(e){return(0,a.i)(t,e)},n}};let b={};const C=async(e,t,n,o,l,s)=>{d.l.info("Graph in recursive render: XXX",i.M(t),l);const h=t.graph().rankdir;d.l.trace("Dir in recursive render - dir:",h);const g=e.insert("g").attr("class","root");t.nodes()?d.l.info("Recursive render XXX",t.nodes()):d.l.info("No nodes found for",t),t.edges().length>0&&d.l.trace("Recursive edges",t.edge(t.edges()[0]));const f=g.insert("g").attr("class","clusters"),u=g.insert("g").attr("class","edgePaths"),w=g.insert("g").attr("class","edgeLabels"),v=g.insert("g").attr("class","nodes");await Promise.all(t.nodes().map((async function(e){const r=t.node(e);if(void 0!==l){const n=JSON.parse(JSON.stringify(l.clusterData));d.l.info("Setting data for cluster XXX (",e,") ",n,l),t.setNode(l.id,n),t.parent(e)||(d.l.trace("Setting parent",e,l.id),t.setParent(e,l.id,n))}if(d.l.info("(Insert) Node XXX"+e+": "+JSON.stringify(t.node(e))),r&&r.clusterNode){d.l.info("Cluster identified",e,r.width,t.node(e));const i=await C(v,r.graph,n,o,t.node(e),s),l=i.elem;(0,a.u)(r,l),r.diff=i.diff||0,d.l.info("Node bounds (abc123)",e,r,r.width,r.x,r.y),(0,a.s)(l,r),d.l.warn("Recursive render complete ",l,r)}else t.children(e).length>0?(d.l.info("Cluster - the non recursive path XXX",e,r.id,r,t),d.l.info(p(r.id,t)),c[r.id]={id:p(r.id,t),node:r}):(d.l.info("Node - the non recursive path",e,r.id,r),await(0,a.e)(v,t.node(e),h))}))),t.edges().forEach((function(e){const n=t.edge(e.v,e.w,e.name);d.l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),d.l.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),d.l.info("Fix",c,"ids:",e.v,e.w,"Translating: ",c[e.v],c[e.w]),(0,a.f)(w,n)})),t.edges().forEach((function(e){d.l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e))})),d.l.info("#############################################"),d.l.info("### Layout ###"),d.l.info("#############################################"),d.l.info(t),(0,r.Zp)(t),d.l.info("Graph after layout:",i.M(t));let y=0;const{subGraphTitleTotalMargin:E}=(0,a.g)(s);return(e=>x(e,e.children()))(t).forEach((function(e){const n=t.node(e);d.l.info("Position "+e+": "+JSON.stringify(t.node(e))),d.l.info("Position "+e+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n&&n.clusterNode?(n.y+=E,(0,a.p)(n)):t.children(e).length>0?(n.height+=E,((e,t)=>{d.l.trace("Inserting cluster");const n=t.shape||"rect";b[t.id]=m[n](e,t)})(f,n),c[n.id].node=n):(n.y+=E/2,(0,a.p)(n))})),t.edges().forEach((function(e){const r=t.edge(e);d.l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(r),r),r.points.forEach((e=>e.y+=E/2));const i=(0,a.h)(u,e,r,c,n,t,o);(0,a.j)(r,i)})),t.nodes().forEach((function(e){const n=t.node(e);d.l.info(e,n.type,n.diff),"group"===n.type&&(y=n.diff)})),{elem:g,diff:y}},E=async(e,t,n,r,o)=>{(0,a.a)(e,n,r,o),(0,a.b)(),(0,a.d)(),b={},h={},g={},c={},d.l.warn("Graph at first:",JSON.stringify(i.M(t))),((e,t)=>{if(!e||t>10)d.l.debug("Opting out, no graph ");else{d.l.debug("Opting in, graph "),e.nodes().forEach((function(t){e.children(t).length>0&&(d.l.warn("Cluster identified",t," Replacement id in edges: ",p(t,e)),h[t]=w(t,e),c[t]={id:p(t,e),clusterData:e.node(t)})})),e.nodes().forEach((function(t){const n=e.children(t),r=e.edges();n.length>0?(d.l.debug("Cluster identified",t,h),r.forEach((e=>{e.v!==t&&e.w!==t&&f(e.v,t)^f(e.w,t)&&(d.l.warn("Edge: ",e," leaves cluster ",t),d.l.warn("Descendants of XXX ",t,": ",h[t]),c[t].externalConnections=!0)}))):d.l.debug("Not a cluster ",t,h)}));for(let t of Object.keys(c)){const n=c[t].id,r=e.parent(n);r!==t&&c[r]&&!c[r].externalConnections&&(c[t].id=r)}e.edges().forEach((function(t){const n=e.edge(t);d.l.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),d.l.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(d.l.warn("Fix XXX",c,"ids:",t.v,t.w,"Translating: ",c[t.v]," --- ",c[t.w]),c[t.v]&&c[t.w]&&c[t.v]===c[t.w]){d.l.warn("Fixing and trixing link to self - removing XXX",t.v,t.w,t.name),d.l.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),r=v(t.v),i=v(t.w),e.removeEdge(t.v,t.w,t.name);const a=t.w+"---"+t.v;e.setNode(a,{domId:a,id:a,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const o=structuredClone(n),l=structuredClone(n);o.label="",o.arrowTypeEnd="none",l.label="",o.fromCluster=t.v,l.toCluster=t.v,e.setEdge(r,a,o,t.name+"-cyclic-special"),e.setEdge(a,i,l,t.name+"-cyclic-special")}else if(c[t.v]||c[t.w]){if(d.l.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),r=v(t.v),i=v(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){const i=e.parent(r);c[i].externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){const r=e.parent(i);c[r].externalConnections=!0,n.toCluster=t.w}d.l.warn("Fix Replacing with XXX",r,i,t.name),e.setEdge(r,i,n,t.name)}})),d.l.warn("Adjusted Graph",i.M(e)),y(e,0),d.l.trace(c)}})(t),d.l.warn("Graph after:",JSON.stringify(i.M(t)));const l=(0,d.c)();await C(e,t,r,o,void 0,l)}}}]); \ No newline at end of file diff --git a/assets/js/307.48d39973.js b/assets/js/307.48d39973.js new file mode 100644 index 00000000..cf9ee506 --- /dev/null +++ b/assets/js/307.48d39973.js @@ -0,0 +1,10065 @@ +"use strict"; +exports.id = 307; +exports.ids = [307]; +exports.modules = { + +/***/ 1176: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + Zp: () => (/* reexport */ layout) +}); + +// UNUSED EXPORTS: acyclic, normalize, rank + +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js +var uniqueId = __webpack_require__(5664); +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/map.js +var map = __webpack_require__(4722); +// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules +var range = __webpack_require__(1395); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js +var graphlib = __webpack_require__(697); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js +/* + * Simple doubly linked list implementation derived from Cormen, et al., + * "Introduction to Algorithms". + */ + + + +class List { + constructor() { + var sentinel = {}; + sentinel._next = sentinel._prev = sentinel; + this._sentinel = sentinel; + } + dequeue() { + var sentinel = this._sentinel; + var entry = sentinel._prev; + if (entry !== sentinel) { + unlink(entry); + return entry; + } + } + enqueue(entry) { + var sentinel = this._sentinel; + if (entry._prev && entry._next) { + unlink(entry); + } + entry._next = sentinel._next; + sentinel._next._prev = entry; + sentinel._next = entry; + entry._prev = sentinel; + } + toString() { + var strs = []; + var sentinel = this._sentinel; + var curr = sentinel._prev; + while (curr !== sentinel) { + strs.push(JSON.stringify(curr, filterOutLinks)); + curr = curr._prev; + } + return '[' + strs.join(', ') + ']'; + } +} + +function unlink(entry) { + entry._prev._next = entry._next; + entry._next._prev = entry._prev; + delete entry._next; + delete entry._prev; +} + +function filterOutLinks(k, v) { + if (k !== '_next' && k !== '_prev') { + return v; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js + + + + +/* + * A greedy heuristic for finding a feedback arc set for a graph. A feedback + * arc set is a set of edges that can be removed to make a graph acyclic. + * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and + * effective heuristic for the feedback arc set problem." This implementation + * adjusts that from the paper to allow for weighted edges. + */ + + +var DEFAULT_WEIGHT_FN = constant/* default */.A(1); + +function greedyFAS(g, weightFn) { + if (g.nodeCount() <= 1) { + return []; + } + var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); + var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); + + // Expand multi-edges + return flatten/* default */.A( + map/* default */.A(results, function (e) { + return g.outEdges(e.v, e.w); + }) + ); +} + +function doGreedyFAS(g, buckets, zeroIdx) { + var results = []; + var sources = buckets[buckets.length - 1]; + var sinks = buckets[0]; + + var entry; + while (g.nodeCount()) { + while ((entry = sinks.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + while ((entry = sources.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + if (g.nodeCount()) { + for (var i = buckets.length - 2; i > 0; --i) { + entry = buckets[i].dequeue(); + if (entry) { + results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); + break; + } + } + } + } + + return results; +} + +function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { + var results = collectPredecessors ? [] : undefined; + + forEach/* default */.A(g.inEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var uEntry = g.node(edge.v); + + if (collectPredecessors) { + results.push({ v: edge.v, w: edge.w }); + } + + uEntry.out -= weight; + assignBucket(buckets, zeroIdx, uEntry); + }); + + forEach/* default */.A(g.outEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var w = edge.w; + var wEntry = g.node(w); + wEntry['in'] -= weight; + assignBucket(buckets, zeroIdx, wEntry); + }); + + g.removeNode(entry.v); + + return results; +} + +function buildState(g, weightFn) { + var fasGraph = new graphlib/* Graph */.T(); + var maxIn = 0; + var maxOut = 0; + + forEach/* default */.A(g.nodes(), function (v) { + fasGraph.setNode(v, { v: v, in: 0, out: 0 }); + }); + + // Aggregate weights on nodes, but also sum the weights across multi-edges + // into a single edge for the fasGraph. + forEach/* default */.A(g.edges(), function (e) { + var prevWeight = fasGraph.edge(e.v, e.w) || 0; + var weight = weightFn(e); + var edgeWeight = prevWeight + weight; + fasGraph.setEdge(e.v, e.w, edgeWeight); + maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); + maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); + }); + + var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { + return new List(); + }); + var zeroIdx = maxIn + 1; + + forEach/* default */.A(fasGraph.nodes(), function (v) { + assignBucket(buckets, zeroIdx, fasGraph.node(v)); + }); + + return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; +} + +function assignBucket(buckets, zeroIdx, entry) { + if (!entry.out) { + buckets[0].enqueue(entry); + } else if (!entry['in']) { + buckets[buckets.length - 1].enqueue(entry); + } else { + buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js + + + + + +function run(g) { + var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); + forEach/* default */.A(fas, function (e) { + var label = g.edge(e); + g.removeEdge(e); + label.forwardName = e.name; + label.reversed = true; + g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); + }); + + function weightFn(g) { + return function (e) { + return g.edge(e).weight; + }; + } +} + +function dfsFAS(g) { + var fas = []; + var stack = {}; + var visited = {}; + + function dfs(v) { + if (has/* default */.A(visited, v)) { + return; + } + visited[v] = true; + stack[v] = true; + forEach/* default */.A(g.outEdges(v), function (e) { + if (has/* default */.A(stack, e.w)) { + fas.push(e); + } else { + dfs(e.w); + } + }); + delete stack[v]; + } + + forEach/* default */.A(g.nodes(), dfs); + return fas; +} + +function undo(g) { + forEach/* default */.A(g.edges(), function (e) { + var label = g.edge(e); + if (label.reversed) { + g.removeEdge(e); + + var forwardName = label.forwardName; + delete label.reversed; + delete label.forwardName; + g.setEdge(e.w, e.v, label, forwardName); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules +var merge = __webpack_require__(8879); +// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules +var pick = __webpack_require__(1942); +// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js +var defaults = __webpack_require__(3068); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js + + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !(0,isSymbol/* default */.A)(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +/* harmony default export */ const _baseExtremum = (baseExtremum); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +/* harmony default export */ const _baseGt = (baseGt); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js + + + + +/** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ +function max(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseGt) + : undefined; +} + +/* harmony default export */ const lodash_es_max = (max); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +/* harmony default export */ const lodash_es_last = (last); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js +var _baseAssignValue = __webpack_require__(2528); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js + + + + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); + + (0,_baseForOwn/* default */.A)(object, function(value, key, object) { + (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ const lodash_es_mapValues = (mapValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +/* harmony default export */ const _baseLt = (baseLt); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js + + + + +/** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ +function min(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_min = (min); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js +var _root = __webpack_require__(1917); +;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js + + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return _root/* default */.A.Date.now(); +}; + +/* harmony default export */ const lodash_es_now = (now); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js + + + + + +/* + * Adds a dummy node to the graph and return v. + */ +function addDummyNode(g, type, attrs, name) { + var v; + do { + v = uniqueId/* default */.A(name); + } while (g.hasNode(v)); + + attrs.dummy = type; + g.setNode(v, attrs); + return v; +} + +/* + * Returns a new graph with only simple edges. Handles aggregation of data + * associated with multi-edges. + */ +function simplify(g) { + var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + simplified.setNode(v, g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; + var label = g.edge(e); + simplified.setEdge(e.v, e.w, { + weight: simpleLabel.weight + label.weight, + minlen: Math.max(simpleLabel.minlen, label.minlen), + }); + }); + return simplified; +} + +function asNonCompoundGraph(g) { + var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + if (!g.children(v).length) { + simplified.setNode(v, g.node(v)); + } + }); + forEach/* default */.A(g.edges(), function (e) { + simplified.setEdge(e, g.edge(e)); + }); + return simplified; +} + +function successorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var sucs = {}; + _.forEach(g.outEdges(v), function (e) { + sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; + }); + return sucs; + }); + return _.zipObject(g.nodes(), weightMap); +} + +function predecessorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var preds = {}; + _.forEach(g.inEdges(v), function (e) { + preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; + }); + return preds; + }); + return _.zipObject(g.nodes(), weightMap); +} + +/* + * Finds where a line starting at point ({x, y}) would intersect a rectangle + * ({x, y, width, height}) if it were pointing at the rectangle's center. + */ +function intersectRect(rect, point) { + var x = rect.x; + var y = rect.y; + + // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes + var dx = point.x - x; + var dy = point.y - y; + var w = rect.width / 2; + var h = rect.height / 2; + + if (!dx && !dy) { + throw new Error('Not possible to find intersection inside of the rectangle'); + } + + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } + sx = (h * dx) / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } + sx = w; + sy = (w * dy) / dx; + } + + return { x: x + sx, y: y + sy }; +} + +/* + * Given a DAG with each node assigned "rank" and "order" properties, this + * function will produce a matrix with the ids of each node. + */ +function buildLayerMatrix(g) { + var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { + return []; + }); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + var rank = node.rank; + if (!isUndefined/* default */.A(rank)) { + layering[rank][node.order] = v; + } + }); + return layering; +} + +/* + * Adjusts the ranks for all nodes in the graph such that all nodes v have + * rank(v) >= 0 and at least one node w has rank(w) = 0. + */ +function normalizeRanks(g) { + var min = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (has/* default */.A(node, 'rank')) { + node.rank -= min; + } + }); +} + +function removeEmptyRanks(g) { + // Ranks may not start at 0, so we need to offset them + var offset = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + + var layers = []; + forEach/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank - offset; + if (!layers[rank]) { + layers[rank] = []; + } + layers[rank].push(v); + }); + + var delta = 0; + var nodeRankFactor = g.graph().nodeRankFactor; + forEach/* default */.A(layers, function (vs, i) { + if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { + --delta; + } else if (delta) { + forEach/* default */.A(vs, function (v) { + g.node(v).rank += delta; + }); + } + }); +} + +function addBorderNode(g, prefix, rank, order) { + var node = { + width: 0, + height: 0, + }; + if (arguments.length >= 4) { + node.rank = rank; + node.order = order; + } + return addDummyNode(g, 'border', node, prefix); +} + +function util_maxRank(g) { + return lodash_es_max( + map/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank; + if (!isUndefined/* default */.A(rank)) { + return rank; + } + }) + ); +} + +/* + * Partition a collection into two groups: `lhs` and `rhs`. If the supplied + * function returns true for an entry it goes into `lhs`. Otherwise it goes + * into `rhs. + */ +function partition(collection, fn) { + var result = { lhs: [], rhs: [] }; + forEach/* default */.A(collection, function (value) { + if (fn(value)) { + result.lhs.push(value); + } else { + result.rhs.push(value); + } + }); + return result; +} + +/* + * Returns a new function that wraps `fn` with a timer. The wrapper logs the + * time it takes to execute the function. + */ +function util_time(name, fn) { + var start = lodash_es_now(); + try { + return fn(); + } finally { + console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); + } +} + +function notime(name, fn) { + return fn(); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js + + + + + +function addBorderSegments(g) { + function dfs(v) { + var children = g.children(v); + var node = g.node(v); + if (children.length) { + forEach/* default */.A(children, dfs); + } + + if (has/* default */.A(node, 'minRank')) { + node.borderLeft = []; + node.borderRight = []; + for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { + add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); + add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); + } + } + } + + forEach/* default */.A(g.children(), dfs); +} + +function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { + var label = { width: 0, height: 0, rank: rank, borderType: prop }; + var prev = sgNode[prop][rank - 1]; + var curr = addDummyNode(g, 'border', label, prefix); + sgNode[prop][rank] = curr; + g.setParent(curr, sg); + if (prev) { + g.setEdge(prev, curr, { weight: 1 }); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js + + + + +function adjust(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'lr' || rankDir === 'rl') { + swapWidthHeight(g); + } +} + +function coordinate_system_undo(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'bt' || rankDir === 'rl') { + reverseY(g); + } + + if (rankDir === 'lr' || rankDir === 'rl') { + swapXY(g); + swapWidthHeight(g); + } +} + +function swapWidthHeight(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapWidthHeightOne(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + swapWidthHeightOne(g.edge(e)); + }); +} + +function swapWidthHeightOne(attrs) { + var w = attrs.width; + attrs.width = attrs.height; + attrs.height = w; +} + +function reverseY(g) { + forEach/* default */.A(g.nodes(), function (v) { + reverseYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, reverseYOne); + if (has/* default */.A(edge, 'y')) { + reverseYOne(edge); + } + }); +} + +function reverseYOne(attrs) { + attrs.y = -attrs.y; +} + +function swapXY(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapXYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, swapXYOne); + if (has/* default */.A(edge, 'x')) { + swapXYOne(edge); + } + }); +} + +function swapXYOne(attrs) { + var x = attrs.x; + attrs.x = attrs.y; + attrs.y = x; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js + + + + + +/* + * Breaks any long edges in the graph into short segments that span 1 layer + * each. This operation is undoable with the denormalize function. + * + * Pre-conditions: + * + * 1. The input graph is a DAG. + * 2. Each node in the graph has a "rank" property. + * + * Post-condition: + * + * 1. All edges in the graph have a length of 1. + * 2. Dummy nodes are added where edges have been split into segments. + * 3. The graph is augmented with a "dummyChains" attribute which contains + * the first dummy in each chain of dummy nodes produced. + */ +function normalize_run(g) { + g.graph().dummyChains = []; + forEach/* default */.A(g.edges(), function (edge) { + normalizeEdge(g, edge); + }); +} + +function normalizeEdge(g, e) { + var v = e.v; + var vRank = g.node(v).rank; + var w = e.w; + var wRank = g.node(w).rank; + var name = e.name; + var edgeLabel = g.edge(e); + var labelRank = edgeLabel.labelRank; + + if (wRank === vRank + 1) return; + + g.removeEdge(e); + + var dummy, attrs, i; + for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { + edgeLabel.points = []; + attrs = { + width: 0, + height: 0, + edgeLabel: edgeLabel, + edgeObj: e, + rank: vRank, + }; + dummy = addDummyNode(g, 'edge', attrs, '_d'); + if (vRank === labelRank) { + attrs.width = edgeLabel.width; + attrs.height = edgeLabel.height; + // @ts-expect-error + attrs.dummy = 'edge-label'; + // @ts-expect-error + attrs.labelpos = edgeLabel.labelpos; + } + g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); + if (i === 0) { + g.graph().dummyChains.push(dummy); + } + v = dummy; + } + + g.setEdge(v, w, { weight: edgeLabel.weight }, name); +} + +function normalize_undo(g) { + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var origLabel = node.edgeLabel; + var w; + g.setEdge(node.edgeObj, origLabel); + while (node.dummy) { + w = g.successors(v)[0]; + g.removeNode(v); + origLabel.points.push({ x: node.x, y: node.y }); + if (node.dummy === 'edge-label') { + origLabel.x = node.x; + origLabel.y = node.y; + origLabel.width = node.width; + origLabel.height = node.height; + } + v = w; + node = g.node(v); + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js + + + + +/** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ +function minBy(array, iteratee) { + return (array && array.length) + ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_minBy = (minBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js + + + + +/* + * Initializes ranks for the input graph using the longest path algorithm. This + * algorithm scales well and is fast in practice, it yields rather poor + * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom + * ranks wide and leaving edges longer than necessary. However, due to its + * speed, this algorithm is good for getting an initial ranking that can be fed + * into other algorithms. + * + * This algorithm does not normalize layers because it will be used by other + * algorithms in most cases. If using this algorithm directly, be sure to + * run normalize at the end. + * + * Pre-conditions: + * + * 1. Input graph is a DAG. + * 2. Input graph node labels can be assigned properties. + * + * Post-conditions: + * + * 1. Each node will be assign an (unnormalized) "rank" property. + */ +function longestPath(g) { + var visited = {}; + + function dfs(v) { + var label = g.node(v); + if (has/* default */.A(visited, v)) { + return label.rank; + } + visited[v] = true; + + var rank = lodash_es_min( + map/* default */.A(g.outEdges(v), function (e) { + return dfs(e.w) - g.edge(e).minlen; + }) + ); + + if ( + rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + rank === undefined || // return value of _.map([]) for Lodash 4 + rank === null + ) { + // return value of _.map([null]) + rank = 0; + } + + return (label.rank = rank); + } + + forEach/* default */.A(g.sources(), dfs); +} + +/* + * Returns the amount of slack for the given edge. The slack is defined as the + * difference between the length of the edge and its minimum length. + */ +function slack(g, e) { + return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js + + + + + + +/* + * Constructs a spanning tree with tight edges and adjusted the input node's + * ranks to achieve this. A tight edge is one that is has a length that matches + * its "minlen" attribute. + * + * The basic structure for this function is derived from Gansner, et al., "A + * Technique for Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a DAG. + * 2. Graph must be connected. + * 3. Graph must have at least one node. + * 5. Graph nodes must have been previously assigned a "rank" property that + * respects the "minlen" property of incident edges. + * 6. Graph edges must have a "minlen" property. + * + * Post-conditions: + * + * - Graph nodes will have their rank adjusted to ensure that all edges are + * tight. + * + * Returns a tree (undirected graph) that is constructed using only "tight" + * edges. + */ +function feasibleTree(g) { + var t = new graphlib/* Graph */.T({ directed: false }); + + // Choose arbitrary node from which to start our tree + var start = g.nodes()[0]; + var size = g.nodeCount(); + t.setNode(start, {}); + + var edge, delta; + while (tightTree(t, g) < size) { + edge = findMinSlackEdge(t, g); + delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); + shiftRanks(t, g, delta); + } + + return t; +} + +/* + * Finds a maximal tree of tight edges and returns the number of nodes in the + * tree. + */ +function tightTree(t, g) { + function dfs(v) { + forEach/* default */.A(g.nodeEdges(v), function (e) { + var edgeV = e.v, + w = v === edgeV ? e.w : edgeV; + if (!t.hasNode(w) && !slack(g, e)) { + t.setNode(w, {}); + t.setEdge(v, w, {}); + dfs(w); + } + }); + } + + forEach/* default */.A(t.nodes(), dfs); + return t.nodeCount(); +} + +/* + * Finds the edge with the smallest slack that is incident on tree and returns + * it. + */ +function findMinSlackEdge(t, g) { + return lodash_es_minBy(g.edges(), function (e) { + if (t.hasNode(e.v) !== t.hasNode(e.w)) { + return slack(g, e); + } + }); +} + +function shiftRanks(t, g, delta) { + forEach/* default */.A(t.nodes(), function (v) { + g.node(v).rank += delta; + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js + + + + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!(0,isArrayLike/* default */.A)(collection)) { + var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); + collection = (0,keys/* default */.A)(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +/* harmony default export */ const _createFind = (createFind); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js + + +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = (0,toFinite/* default */.A)(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +/* harmony default export */ const lodash_es_toInteger = (toInteger); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); +} + +/* harmony default export */ const lodash_es_findIndex = (findIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js + + + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = _createFind(lodash_es_findIndex); + +/* harmony default export */ const lodash_es_find = (find); + +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js + + + + + +var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function dijkstra_dijkstra(g, source, weightFn, edgeFn) { + return runDijkstra( + g, + String(source), + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runDijkstra(g, source, weightFn, edgeFn) { + var results = {}; + var pq = new PriorityQueue(); + var v, vEntry; + + var updateNeighbors = function (edge) { + var w = edge.v !== v ? edge.v : edge.w; + var wEntry = results[w]; + var weight = weightFn(edge); + var distance = vEntry.distance + weight; + + if (weight < 0) { + throw new Error( + 'dijkstra does not allow negative edge weights. ' + + 'Bad edge: ' + + edge + + ' Weight: ' + + weight + ); + } + + if (distance < wEntry.distance) { + wEntry.distance = distance; + wEntry.predecessor = v; + pq.decrease(w, distance); + } + }; + + g.nodes().forEach(function (v) { + var distance = v === source ? 0 : Number.POSITIVE_INFINITY; + results[v] = { distance: distance }; + pq.add(v, distance); + }); + + while (pq.size() > 0) { + v = pq.removeMin(); + vEntry = results[v]; + if (vEntry.distance === Number.POSITIVE_INFINITY) { + break; + } + + edgeFn(v).forEach(updateNeighbors); + } + + return results; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js + + + + + +function dijkstraAll(g, weightFunc, edgeFunc) { + return _.transform( + g.nodes(), + function (acc, v) { + acc[v] = dijkstra(g, v, weightFunc, edgeFunc); + }, + {} + ); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js + + + + +var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function floydWarshall(g, weightFn, edgeFn) { + return runFloydWarshall( + g, + weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runFloydWarshall(g, weightFn, edgeFn) { + var results = {}; + var nodes = g.nodes(); + + nodes.forEach(function (v) { + results[v] = {}; + results[v][v] = { distance: 0 }; + nodes.forEach(function (w) { + if (v !== w) { + results[v][w] = { distance: Number.POSITIVE_INFINITY }; + } + }); + edgeFn(v).forEach(function (edge) { + var w = edge.v === v ? edge.w : edge.v; + var d = weightFn(edge); + results[v][w] = { distance: d, predecessor: v }; + }); + }); + + nodes.forEach(function (k) { + var rowK = results[k]; + nodes.forEach(function (i) { + var rowI = results[i]; + nodes.forEach(function (j) { + var ik = rowI[k]; + var kj = rowK[j]; + var ij = rowI[j]; + var altDistance = ik.distance + kj.distance; + if (altDistance < ij.distance) { + ij.distance = altDistance; + ij.predecessor = kj.predecessor; + } + }); + }); + }); + + return results; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules +var _baseKeys = __webpack_require__(1852); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules +var _baseGetTag = __webpack_require__(8496); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js + + + + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); +} + +/* harmony default export */ const lodash_es_isString = (isString); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js + + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = (0,_baseProperty/* default */.A)('length'); + +/* harmony default export */ const _asciiSize = (asciiSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/* harmony default export */ const _hasUnicode = (hasUnicode); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js +/** Used to compose unicode character classes. */ +var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', + _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', + _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', + _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', + _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, + _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', + rsCombo = '[' + _unicodeSize_rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + _unicodeSize_rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', + rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +/* harmony default export */ const _unicodeSize = (unicodeSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js + + + + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return _hasUnicode(string) + ? _unicodeSize(string) + : _asciiSize(string); +} + +/* harmony default export */ const _stringSize = (stringSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + if (collection == null) { + return 0; + } + if ((0,isArrayLike/* default */.A)(collection)) { + return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; + } + var tag = (0,_getTag/* default */.A)(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return (0,_baseKeys/* default */.A)(collection).length; +} + +/* harmony default export */ const lodash_es_size = (size); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js + + + + +topsort_topsort.CycleException = topsort_CycleException; + +function topsort_topsort(g) { + var visited = {}; + var stack = {}; + var results = []; + + function visit(node) { + if (has/* default */.A(stack, node)) { + throw new topsort_CycleException(); + } + + if (!has/* default */.A(visited, node)) { + stack[node] = true; + visited[node] = true; + forEach/* default */.A(g.predecessors(node), visit); + delete stack[node]; + results.push(node); + } + } + + forEach/* default */.A(g.sinks(), visit); + + if (lodash_es_size(visited) !== g.nodeCount()) { + throw new topsort_CycleException(); + } + + return results; +} + +function topsort_CycleException() {} +topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js + + + + +function isAcyclic(g) { + try { + topsort(g); + } catch (e) { + if (e instanceof CycleException) { + return false; + } + throw e; + } + return true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js + + + + +/* + * A helper that preforms a pre- or post-order traversal on the input graph + * and returns the nodes in the order they were visited. If the graph is + * undirected then this algorithm will navigate using neighbors. If the graph + * is directed then this algorithm will navigate using successors. + * + * Order must be one of "pre" or "post". + */ +function dfs(g, vs, order) { + if (!isArray/* default */.A(vs)) { + vs = [vs]; + } + + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); + + var acc = []; + var visited = {}; + forEach/* default */.A(vs, function (v) { + if (!g.hasNode(v)) { + throw new Error('Graph does not have node: ' + v); + } + + doDfs(g, v, order === 'post', visited, navigation, acc); + }); + return acc; +} + +function doDfs(g, v, postorder, visited, navigation, acc) { + if (!has/* default */.A(visited, v)) { + visited[v] = true; + + if (!postorder) { + acc.push(v); + } + forEach/* default */.A(navigation(v), function (w) { + doDfs(g, w, postorder, visited, navigation, acc); + }); + if (postorder) { + acc.push(v); + } + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js + + + + +function postorder(g, vs) { + return dfs(g, vs, 'post'); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js + + + + +function preorder(g, vs) { + return dfs(g, vs, 'pre'); +} + +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules +var graph = __webpack_require__(3046); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js + + + + + + +function prim(g, weightFunc) { + var result = new Graph(); + var parents = {}; + var pq = new PriorityQueue(); + var v; + + function updateNeighbors(edge) { + var w = edge.v === v ? edge.w : edge.v; + var pri = pq.priority(w); + if (pri !== undefined) { + var edgeWeight = weightFunc(edge); + if (edgeWeight < pri) { + parents[w] = v; + pq.decrease(w, edgeWeight); + } + } + } + + if (g.nodeCount() === 0) { + return result; + } + + _.each(g.nodes(), function (v) { + pq.add(v, Number.POSITIVE_INFINITY); + result.setNode(v); + }); + + // Start from an arbitrary node + pq.decrease(g.nodes()[0], 0); + + var init = false; + while (pq.size() > 0) { + v = pq.removeMin(); + if (_.has(parents, v)) { + result.setEdge(v, parents[v]); + } else if (init) { + throw new Error('Input graph is not connected: ' + g); + } else { + init = true; + } + + g.nodeEdges(v).forEach(updateNeighbors); + } + + return result; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js + + + + + + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js + + + + + + + + +// Expose some internals for testing purposes +networkSimplex.initLowLimValues = initLowLimValues; +networkSimplex.initCutValues = initCutValues; +networkSimplex.calcCutValue = calcCutValue; +networkSimplex.leaveEdge = leaveEdge; +networkSimplex.enterEdge = enterEdge; +networkSimplex.exchangeEdges = exchangeEdges; + +/* + * The network simplex algorithm assigns ranks to each node in the input graph + * and iteratively improves the ranking to reduce the length of edges. + * + * Preconditions: + * + * 1. The input graph must be a DAG. + * 2. All nodes in the graph must have an object value. + * 3. All edges in the graph must have "minlen" and "weight" attributes. + * + * Postconditions: + * + * 1. All nodes in the graph will have an assigned "rank" attribute that has + * been optimized by the network simplex algorithm. Ranks start at 0. + * + * + * A rough sketch of the algorithm is as follows: + * + * 1. Assign initial ranks to each node. We use the longest path algorithm, + * which assigns ranks to the lowest position possible. In general this + * leads to very wide bottom ranks and unnecessarily long edges. + * 2. Construct a feasible tight tree. A tight tree is one such that all + * edges in the tree have no slack (difference between length of edge + * and minlen for the edge). This by itself greatly improves the assigned + * rankings by shorting edges. + * 3. Iteratively find edges that have negative cut values. Generally a + * negative cut value indicates that the edge could be removed and a new + * tree edge could be added to produce a more compact graph. + * + * Much of the algorithms here are derived from Gansner, et al., "A Technique + * for Drawing Directed Graphs." The structure of the file roughly follows the + * structure of the overall algorithm. + */ +function networkSimplex(g) { + g = simplify(g); + longestPath(g); + var t = feasibleTree(g); + initLowLimValues(t); + initCutValues(t, g); + + var e, f; + while ((e = leaveEdge(t))) { + f = enterEdge(t, g, e); + exchangeEdges(t, g, e, f); + } +} + +/* + * Initializes cut values for all edges in the tree. + */ +function initCutValues(t, g) { + var vs = postorder(t, t.nodes()); + vs = vs.slice(0, vs.length - 1); + forEach/* default */.A(vs, function (v) { + assignCutValue(t, g, v); + }); +} + +function assignCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + t.edge(child, parent).cutvalue = calcCutValue(t, g, child); +} + +/* + * Given the tight tree, its graph, and a child in the graph calculate and + * return the cut value for the edge between the child and its parent. + */ +function calcCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + // True if the child is on the tail end of the edge in the directed graph + var childIsTail = true; + // The graph's view of the tree edge we're inspecting + var graphEdge = g.edge(child, parent); + // The accumulated cut value for the edge between this node and its parent + var cutValue = 0; + + if (!graphEdge) { + childIsTail = false; + graphEdge = g.edge(parent, child); + } + + cutValue = graphEdge.weight; + + forEach/* default */.A(g.nodeEdges(child), function (e) { + var isOutEdge = e.v === child, + other = isOutEdge ? e.w : e.v; + + if (other !== parent) { + var pointsToHead = isOutEdge === childIsTail, + otherWeight = g.edge(e).weight; + + cutValue += pointsToHead ? otherWeight : -otherWeight; + if (isTreeEdge(t, child, other)) { + var otherCutValue = t.edge(child, other).cutvalue; + cutValue += pointsToHead ? -otherCutValue : otherCutValue; + } + } + }); + + return cutValue; +} + +function initLowLimValues(tree, root) { + if (arguments.length < 2) { + root = tree.nodes()[0]; + } + dfsAssignLowLim(tree, {}, 1, root); +} + +function dfsAssignLowLim(tree, visited, nextLim, v, parent) { + var low = nextLim; + var label = tree.node(v); + + visited[v] = true; + forEach/* default */.A(tree.neighbors(v), function (w) { + if (!has/* default */.A(visited, w)) { + nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); + } + }); + + label.low = low; + label.lim = nextLim++; + if (parent) { + label.parent = parent; + } else { + // TODO should be able to remove this when we incrementally update low lim + delete label.parent; + } + + return nextLim; +} + +function leaveEdge(tree) { + return lodash_es_find(tree.edges(), function (e) { + return tree.edge(e).cutvalue < 0; + }); +} + +function enterEdge(t, g, edge) { + var v = edge.v; + var w = edge.w; + + // For the rest of this function we assume that v is the tail and w is the + // head, so if we don't have this edge in the graph we should flip it to + // match the correct orientation. + if (!g.hasEdge(v, w)) { + v = edge.w; + w = edge.v; + } + + var vLabel = t.node(v); + var wLabel = t.node(w); + var tailLabel = vLabel; + var flip = false; + + // If the root is in the tail of the edge then we need to flip the logic that + // checks for the head and tail nodes in the candidates function below. + if (vLabel.lim > wLabel.lim) { + tailLabel = wLabel; + flip = true; + } + + var candidates = filter/* default */.A(g.edges(), function (edge) { + return ( + flip === isDescendant(t, t.node(edge.v), tailLabel) && + flip !== isDescendant(t, t.node(edge.w), tailLabel) + ); + }); + + return lodash_es_minBy(candidates, function (edge) { + return slack(g, edge); + }); +} + +function exchangeEdges(t, g, e, f) { + var v = e.v; + var w = e.w; + t.removeEdge(v, w); + t.setEdge(f.v, f.w, {}); + initLowLimValues(t); + initCutValues(t, g); + updateRanks(t, g); +} + +function updateRanks(t, g) { + var root = lodash_es_find(t.nodes(), function (v) { + return !g.node(v).parent; + }); + var vs = preorder(t, root); + vs = vs.slice(1); + forEach/* default */.A(vs, function (v) { + var parent = t.node(v).parent, + edge = g.edge(v, parent), + flipped = false; + + if (!edge) { + edge = g.edge(parent, v); + flipped = true; + } + + g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); + }); +} + +/* + * Returns true if the edge is in the tree. + */ +function isTreeEdge(tree, u, v) { + return tree.hasEdge(u, v); +} + +/* + * Returns true if the specified node is descendant of the root node per the + * assigned low and lim attributes in the tree. + */ +function isDescendant(tree, vLabel, rootLabel) { + return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js + + + + + + +/* + * Assigns a rank to each node in the input graph that respects the "minlen" + * constraint specified on edges between nodes. + * + * This basic structure is derived from Gansner, et al., "A Technique for + * Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a connected DAG + * 2. Graph nodes must be objects + * 3. Graph edges must have "weight" and "minlen" attributes + * + * Post-conditions: + * + * 1. Graph nodes will have a "rank" attribute based on the results of the + * algorithm. Ranks can start at any index (including negative), we'll + * fix them up later. + */ +function rank(g) { + switch (g.graph().ranker) { + case 'network-simplex': + networkSimplexRanker(g); + break; + case 'tight-tree': + tightTreeRanker(g); + break; + case 'longest-path': + longestPathRanker(g); + break; + default: + networkSimplexRanker(g); + } +} + +// A fast and simple ranker, but results are far from optimal. +var longestPathRanker = longestPath; + +function tightTreeRanker(g) { + longestPath(g); + feasibleTree(g); +} + +function networkSimplexRanker(g) { + networkSimplex(g); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js + + + + + +/* + * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, + * adds appropriate edges to ensure that all cluster nodes are placed between + * these boundries, and ensures that the graph is connected. + * + * In addition we ensure, through the use of the minlen property, that nodes + * and subgraph border nodes to not end up on the same rank. + * + * Preconditions: + * + * 1. Input graph is a DAG + * 2. Nodes in the input graph has a minlen attribute + * + * Postconditions: + * + * 1. Input graph is connected. + * 2. Dummy nodes are added for the tops and bottoms of subgraphs. + * 3. The minlen attribute for nodes is adjusted to ensure nodes do not + * get placed on the same rank as subgraph border nodes. + * + * The nesting graph idea comes from Sander, "Layout of Compound Directed + * Graphs." + */ +function nesting_graph_run(g) { + var root = addDummyNode(g, 'root', {}, '_root'); + var depths = treeDepths(g); + var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array + var nodeSep = 2 * height + 1; + + g.graph().nestingRoot = root; + + // Multiply minlen by nodeSep to align nodes on non-border ranks. + forEach/* default */.A(g.edges(), function (e) { + g.edge(e).minlen *= nodeSep; + }); + + // Calculate a weight that is sufficient to keep subgraphs vertically compact + var weight = sumWeights(g) + 1; + + // Create border nodes and link them up + forEach/* default */.A(g.children(), function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + }); + + // Save the multiplier for node layers for later removal of empty border + // layers. + g.graph().nodeRankFactor = nodeSep; +} + +function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { + var children = g.children(v); + if (!children.length) { + if (v !== root) { + g.setEdge(root, v, { weight: 0, minlen: nodeSep }); + } + return; + } + + var top = addBorderNode(g, '_bt'); + var bottom = addBorderNode(g, '_bb'); + var label = g.node(v); + + g.setParent(top, v); + label.borderTop = top; + g.setParent(bottom, v); + label.borderBottom = bottom; + + forEach/* default */.A(children, function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + + var childNode = g.node(child); + var childTop = childNode.borderTop ? childNode.borderTop : child; + var childBottom = childNode.borderBottom ? childNode.borderBottom : child; + var thisWeight = childNode.borderTop ? weight : 2 * weight; + var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; + + g.setEdge(top, childTop, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + + g.setEdge(childBottom, bottom, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + }); + + if (!g.parent(v)) { + g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); + } +} + +function treeDepths(g) { + var depths = {}; + function dfs(v, depth) { + var children = g.children(v); + if (children && children.length) { + forEach/* default */.A(children, function (child) { + dfs(child, depth + 1); + }); + } + depths[v] = depth; + } + forEach/* default */.A(g.children(), function (v) { + dfs(v, 1); + }); + return depths; +} + +function sumWeights(g) { + return reduce/* default */.A( + g.edges(), + function (acc, e) { + return acc + g.edge(e).weight; + }, + 0 + ); +} + +function cleanup(g) { + var graphLabel = g.graph(); + g.removeNode(graphLabel.nestingRoot); + delete graphLabel.nestingRoot; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.nestingEdge) { + g.removeEdge(e); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules +var _baseClone = __webpack_require__(1641); +;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js + + + + +function addSubgraphConstraints(g, cg, vs) { + var prev = {}, + rootPrev; + + forEach/* default */.A(vs, function (v) { + var child = g.parent(v), + parent, + prevChild; + while (child) { + parent = g.parent(child); + if (parent) { + prevChild = prev[parent]; + prev[parent] = child; + } else { + prevChild = rootPrev; + rootPrev = child; + } + if (prevChild && prevChild !== child) { + cg.setEdge(prevChild, child); + return; + } + child = parent; + } + }); + + /* + function dfs(v) { + var children = v ? g.children(v) : g.children(); + if (children.length) { + var min = Number.POSITIVE_INFINITY, + subgraphs = []; + _.each(children, function(child) { + var childMin = dfs(child); + if (g.children(child).length) { + subgraphs.push({ v: child, order: childMin }); + } + min = Math.min(min, childMin); + }); + _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { + cg.setEdge(prev.v, curr.v); + return curr; + }); + return min; + } + return g.node(v).order; + } + dfs(undefined); + */ +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js + + + + + +/* + * Constructs a graph that can be used to sort a layer of nodes. The graph will + * contain all base and subgraph nodes from the request layer in their original + * hierarchy and any edges that are incident on these nodes and are of the type + * requested by the "relationship" parameter. + * + * Nodes from the requested rank that do not have parents are assigned a root + * node in the output graph, which is set in the root graph attribute. This + * makes it easy to walk the hierarchy of movable nodes during ordering. + * + * Pre-conditions: + * + * 1. Input graph is a DAG + * 2. Base nodes in the input graph have a rank attribute + * 3. Subgraph nodes in the input graph has minRank and maxRank attributes + * 4. Edges have an assigned weight + * + * Post-conditions: + * + * 1. Output graph has all nodes in the movable rank with preserved + * hierarchy. + * 2. Root nodes in the movable layer are made children of the node + * indicated by the root attribute of the graph. + * 3. Non-movable nodes incident on movable nodes, selected by the + * relationship parameter, are included in the graph (without hierarchy). + * 4. Edges incident on movable nodes, selected by the relationship + * parameter, are added to the output graph. + * 5. The weights for copied edges are aggregated as need, since the output + * graph is not a multi-graph. + */ +function buildLayerGraph(g, rank, relationship) { + var root = createRootNode(g), + result = new graphlib/* Graph */.T({ compound: true }) + .setGraph({ root: root }) + .setDefaultNodeLabel(function (v) { + return g.node(v); + }); + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v), + parent = g.parent(v); + + if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { + result.setNode(v); + result.setParent(v, parent || root); + + // This assumes we have only short edges! + forEach/* default */.A(g[relationship](v), function (e) { + var u = e.v === v ? e.w : e.v, + edge = result.edge(u, v), + weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; + result.setEdge(u, v, { weight: g.edge(e).weight + weight }); + }); + + if (has/* default */.A(node, 'minRank')) { + result.setNode(v, { + borderLeft: node.borderLeft[rank], + borderRight: node.borderRight[rank], + }); + } + } + }); + + return result; +} + +function createRootNode(g) { + var v; + while (g.hasNode((v = uniqueId/* default */.A('_root')))); + return v; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +/* harmony default export */ const _baseZipObject = (baseZipObject); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js + + + +/** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ +function zipObject(props, values) { + return _baseZipObject(props || [], values || [], _assignValue/* default */.A); +} + +/* harmony default export */ const lodash_es_zipObject = (zipObject); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js +var _baseMap = __webpack_require__(2568); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +/* harmony default export */ const _baseSortBy = (baseSortBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js + + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = (0,isSymbol/* default */.A)(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = (0,isSymbol/* default */.A)(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +/* harmony default export */ const _compareAscending = (compareAscending); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js + + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = _compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +/* harmony default export */ const _compareMultiple = (compareMultiple); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js + + + + + + + + + + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + if ((0,isArray/* default */.A)(iteratee)) { + return function(value) { + return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity/* default */.A]; + } + + var index = -1; + iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); + + var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { + var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return _baseSortBy(result, function(object, other) { + return _compareMultiple(object, other, orders); + }); +} + +/* harmony default export */ const _baseOrderBy = (baseOrderBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js + + + + + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ +var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); +}); + +/* harmony default export */ const lodash_es_sortBy = (sortBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js + + + + +/* + * A function that takes a layering (an array of layers, each with an array of + * ordererd nodes) and a graph and returns a weighted crossing count. + * + * Pre-conditions: + * + * 1. Input graph must be simple (not a multigraph), directed, and include + * only simple edges. + * 2. Edges in the input graph must have assigned weights. + * + * Post-conditions: + * + * 1. The graph and layering matrix are left unchanged. + * + * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." + */ +function crossCount(g, layering) { + var cc = 0; + for (var i = 1; i < layering.length; ++i) { + cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); + } + return cc; +} + +function twoLayerCrossCount(g, northLayer, southLayer) { + // Sort all of the edges between the north and south layers by their position + // in the north layer and then the south. Map these edges to the position of + // their head in the south layer. + var southPos = lodash_es_zipObject( + southLayer, + map/* default */.A(southLayer, function (v, i) { + return i; + }) + ); + var southEntries = flatten/* default */.A( + map/* default */.A(northLayer, function (v) { + return lodash_es_sortBy( + map/* default */.A(g.outEdges(v), function (e) { + return { pos: southPos[e.w], weight: g.edge(e).weight }; + }), + 'pos' + ); + }) + ); + + // Build the accumulator tree + var firstIndex = 1; + while (firstIndex < southLayer.length) firstIndex <<= 1; + var treeSize = 2 * firstIndex - 1; + firstIndex -= 1; + var tree = map/* default */.A(new Array(treeSize), function () { + return 0; + }); + + // Calculate the weighted crossings + var cc = 0; + forEach/* default */.A( + // @ts-expect-error + southEntries.forEach(function (entry) { + var index = entry.pos + firstIndex; + tree[index] += entry.weight; + var weightSum = 0; + // @ts-expect-error + while (index > 0) { + // @ts-expect-error + if (index % 2) { + weightSum += tree[index + 1]; + } + // @ts-expect-error + index = (index - 1) >> 1; + tree[index] += entry.weight; + } + cc += entry.weight * weightSum; + }) + ); + + return cc; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js + + + + +/* + * Assigns an initial order value for each node by performing a DFS search + * starting from nodes in the first rank. Nodes are assigned an order in their + * rank as they are first visited. + * + * This approach comes from Gansner, et al., "A Technique for Drawing Directed + * Graphs." + * + * Returns a layering matrix with an array per layer and each layer sorted by + * the order of its nodes. + */ +function initOrder(g) { + var visited = {}; + var simpleNodes = filter/* default */.A(g.nodes(), function (v) { + return !g.children(v).length; + }); + var maxRank = lodash_es_max( + map/* default */.A(simpleNodes, function (v) { + return g.node(v).rank; + }) + ); + var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { + return []; + }); + + function dfs(v) { + if (has/* default */.A(visited, v)) return; + visited[v] = true; + var node = g.node(v); + layers[node.rank].push(v); + forEach/* default */.A(g.successors(v), dfs); + } + + var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { + return g.node(v).rank; + }); + forEach/* default */.A(orderedVs, dfs); + + return layers; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js + + + + +function barycenter(g, movable) { + return map/* default */.A(movable, function (v) { + var inV = g.inEdges(v); + if (!inV.length) { + return { v: v }; + } else { + var result = reduce/* default */.A( + inV, + function (acc, e) { + var edge = g.edge(e), + nodeU = g.node(e.v); + return { + sum: acc.sum + edge.weight * nodeU.order, + weight: acc.weight + edge.weight, + }; + }, + { sum: 0, weight: 0 } + ); + + return { + v: v, + barycenter: result.sum / result.weight, + weight: result.weight, + }; + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js + + + + +/* + * Given a list of entries of the form {v, barycenter, weight} and a + * constraint graph this function will resolve any conflicts between the + * constraint graph and the barycenters for the entries. If the barycenters for + * an entry would violate a constraint in the constraint graph then we coalesce + * the nodes in the conflict into a new node that respects the contraint and + * aggregates barycenter and weight information. + * + * This implementation is based on the description in Forster, "A Fast and + * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it + * differs in some specific details. + * + * Pre-conditions: + * + * 1. Each entry has the form {v, barycenter, weight}, or if the node has + * no barycenter, then {v}. + * + * Returns: + * + * A new list of entries of the form {vs, i, barycenter, weight}. The list + * `vs` may either be a singleton or it may be an aggregation of nodes + * ordered such that they do not violate constraints from the constraint + * graph. The property `i` is the lowest original index of any of the + * elements in `vs`. + */ +function resolveConflicts(entries, cg) { + var mappedEntries = {}; + forEach/* default */.A(entries, function (entry, i) { + var tmp = (mappedEntries[entry.v] = { + indegree: 0, + in: [], + out: [], + vs: [entry.v], + i: i, + }); + if (!isUndefined/* default */.A(entry.barycenter)) { + // @ts-expect-error + tmp.barycenter = entry.barycenter; + // @ts-expect-error + tmp.weight = entry.weight; + } + }); + + forEach/* default */.A(cg.edges(), function (e) { + var entryV = mappedEntries[e.v]; + var entryW = mappedEntries[e.w]; + if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { + entryW.indegree++; + entryV.out.push(mappedEntries[e.w]); + } + }); + + var sourceSet = filter/* default */.A(mappedEntries, function (entry) { + // @ts-expect-error + return !entry.indegree; + }); + + return doResolveConflicts(sourceSet); +} + +function doResolveConflicts(sourceSet) { + var entries = []; + + function handleIn(vEntry) { + return function (uEntry) { + if (uEntry.merged) { + return; + } + if ( + isUndefined/* default */.A(uEntry.barycenter) || + isUndefined/* default */.A(vEntry.barycenter) || + uEntry.barycenter >= vEntry.barycenter + ) { + mergeEntries(vEntry, uEntry); + } + }; + } + + function handleOut(vEntry) { + return function (wEntry) { + wEntry['in'].push(vEntry); + if (--wEntry.indegree === 0) { + sourceSet.push(wEntry); + } + }; + } + + while (sourceSet.length) { + var entry = sourceSet.pop(); + entries.push(entry); + forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); + forEach/* default */.A(entry.out, handleOut(entry)); + } + + return map/* default */.A( + filter/* default */.A(entries, function (entry) { + return !entry.merged; + }), + function (entry) { + return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); + } + ); +} + +function mergeEntries(target, source) { + var sum = 0; + var weight = 0; + + if (target.weight) { + sum += target.barycenter * target.weight; + weight += target.weight; + } + + if (source.weight) { + sum += source.barycenter * source.weight; + weight += source.weight; + } + + target.vs = source.vs.concat(target.vs); + target.barycenter = sum / weight; + target.weight = weight; + target.i = Math.min(source.i, target.i); + source.merged = true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js + + + + + +function sort(entries, biasRight) { + var parts = partition(entries, function (entry) { + return has/* default */.A(entry, 'barycenter'); + }); + var sortable = parts.lhs, + unsortable = lodash_es_sortBy(parts.rhs, function (entry) { + return -entry.i; + }), + vs = [], + sum = 0, + weight = 0, + vsIndex = 0; + + sortable.sort(compareWithBias(!!biasRight)); + + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + + forEach/* default */.A(sortable, function (entry) { + vsIndex += entry.vs.length; + vs.push(entry.vs); + sum += entry.barycenter * entry.weight; + weight += entry.weight; + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + }); + + var result = { vs: flatten/* default */.A(vs) }; + if (weight) { + result.barycenter = sum / weight; + result.weight = weight; + } + return result; +} + +function consumeUnsortable(vs, unsortable, index) { + var last; + while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { + unsortable.pop(); + vs.push(last.vs); + index++; + } + return index; +} + +function compareWithBias(bias) { + return function (entryV, entryW) { + if (entryV.barycenter < entryW.barycenter) { + return -1; + } else if (entryV.barycenter > entryW.barycenter) { + return 1; + } + + return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; + }; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js + + + + + + + +function sortSubgraph(g, v, cg, biasRight) { + var movable = g.children(v); + var node = g.node(v); + var bl = node ? node.borderLeft : undefined; + var br = node ? node.borderRight : undefined; + var subgraphs = {}; + + if (bl) { + movable = filter/* default */.A(movable, function (w) { + return w !== bl && w !== br; + }); + } + + var barycenters = barycenter(g, movable); + forEach/* default */.A(barycenters, function (entry) { + if (g.children(entry.v).length) { + var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); + subgraphs[entry.v] = subgraphResult; + if (has/* default */.A(subgraphResult, 'barycenter')) { + mergeBarycenters(entry, subgraphResult); + } + } + }); + + var entries = resolveConflicts(barycenters, cg); + expandSubgraphs(entries, subgraphs); + + var result = sort(entries, biasRight); + + if (bl) { + result.vs = flatten/* default */.A([bl, result.vs, br]); + if (g.predecessors(bl).length) { + var blPred = g.node(g.predecessors(bl)[0]), + brPred = g.node(g.predecessors(br)[0]); + if (!has/* default */.A(result, 'barycenter')) { + result.barycenter = 0; + result.weight = 0; + } + result.barycenter = + (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); + result.weight += 2; + } + } + + return result; +} + +function expandSubgraphs(entries, subgraphs) { + forEach/* default */.A(entries, function (entry) { + entry.vs = flatten/* default */.A( + entry.vs.map(function (v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }) + ); + }); +} + +function mergeBarycenters(target, other) { + if (!isUndefined/* default */.A(target.barycenter)) { + target.barycenter = + (target.barycenter * target.weight + other.barycenter * other.weight) / + (target.weight + other.weight); + target.weight += other.weight; + } else { + target.barycenter = other.barycenter; + target.weight = other.weight; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js + + + + + + + + + + + +/* + * Applies heuristics to minimize edge crossings in the graph and sets the best + * order solution as an order attribute on each node. + * + * Pre-conditions: + * + * 1. Graph must be DAG + * 2. Graph nodes must be objects with a "rank" attribute + * 3. Graph edges must have the "weight" attribute + * + * Post-conditions: + * + * 1. Graph nodes will have an "order" attribute based on the results of the + * algorithm. + */ +function order(g) { + var maxRank = util_maxRank(g), + downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), + upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); + + var layering = initOrder(g); + assignOrder(g, layering); + + var bestCC = Number.POSITIVE_INFINITY, + best; + + for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { + sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); + + layering = buildLayerMatrix(g); + var cc = crossCount(g, layering); + if (cc < bestCC) { + lastBest = 0; + best = lodash_es_cloneDeep(layering); + bestCC = cc; + } + } + + assignOrder(g, best); +} + +function buildLayerGraphs(g, ranks, relationship) { + return map/* default */.A(ranks, function (rank) { + return buildLayerGraph(g, rank, relationship); + }); +} + +function sweepLayerGraphs(layerGraphs, biasRight) { + var cg = new graphlib/* Graph */.T(); + forEach/* default */.A(layerGraphs, function (lg) { + var root = lg.graph().root; + var sorted = sortSubgraph(lg, root, cg, biasRight); + forEach/* default */.A(sorted.vs, function (v, i) { + lg.node(v).order = i; + }); + addSubgraphConstraints(lg, cg, sorted.vs); + }); +} + +function assignOrder(g, layering) { + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, i) { + g.node(v).order = i; + }); + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js + + + + +function parentDummyChains(g) { + var postorderNums = parent_dummy_chains_postorder(g); + + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var edgeObj = node.edgeObj; + var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); + var path = pathData.path; + var lca = pathData.lca; + var pathIdx = 0; + var pathV = path[pathIdx]; + var ascending = true; + + while (v !== edgeObj.w) { + node = g.node(v); + + if (ascending) { + while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { + pathIdx++; + } + + if (pathV === lca) { + ascending = false; + } + } + + if (!ascending) { + while ( + pathIdx < path.length - 1 && + g.node((pathV = path[pathIdx + 1])).minRank <= node.rank + ) { + pathIdx++; + } + pathV = path[pathIdx]; + } + + g.setParent(v, pathV); + v = g.successors(v)[0]; + } + }); +} + +// Find a path from v to w through the lowest common ancestor (LCA). Return the +// full path and the LCA. +function findPath(g, postorderNums, v, w) { + var vPath = []; + var wPath = []; + var low = Math.min(postorderNums[v].low, postorderNums[w].low); + var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); + var parent; + var lca; + + // Traverse up from v to find the LCA + parent = v; + do { + parent = g.parent(parent); + vPath.push(parent); + } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); + lca = parent; + + // Traverse from w to LCA + parent = w; + while ((parent = g.parent(parent)) !== lca) { + wPath.push(parent); + } + + return { path: vPath.concat(wPath.reverse()), lca: lca }; +} + +function parent_dummy_chains_postorder(g) { + var result = {}; + var lim = 0; + + function dfs(v) { + var low = lim; + forEach/* default */.A(g.children(v), dfs); + result[v] = { low: low, lim: lim++ }; + } + forEach/* default */.A(g.children(), dfs); + + return result; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js +var _castFunction = __webpack_require__(9922); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js + + + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); +} + +/* harmony default export */ const lodash_es_forOwn = (forOwn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules +var _baseFor = __webpack_require__(4574); +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js + + + + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); +} + +/* harmony default export */ const lodash_es_forIn = (forIn); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js + + + + +/* + * This module provides coordinate assignment based on Brandes and Köpf, "Fast + * and Simple Horizontal Coordinate Assignment." + */ + + + +/* + * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" + * property. A type-1 conflict is one where a non-inner segment crosses an + * inner segment. An inner segment is an edge with both incident nodes marked + * with the "dummy" property. + * + * This algorithm scans layer by layer, starting with the second, for type-1 + * conflicts between the current layer and the previous layer. For each layer + * it scans the nodes from left to right until it reaches one that is incident + * on an inner segment. It then scans predecessors to determine if they have + * edges that cross that inner segment. At the end a final scan is done for all + * nodes on the current rank to see if they cross the last visited inner + * segment. + * + * This algorithm (safely) assumes that a dummy node will only be incident on a + * single node in the layers being scanned. + */ +function findType1Conflicts(g, layering) { + var conflicts = {}; + + function visitLayer(prevLayer, layer) { + var // last visited node in the previous layer that is incident on an inner + // segment. + k0 = 0, + // Tracks the last node in this layer scanned for crossings with a type-1 + // segment. + scanPos = 0, + prevLayerLength = prevLayer.length, + lastNode = lodash_es_last(layer); + + forEach/* default */.A(layer, function (v, i) { + var w = findOtherInnerSegmentNode(g, v), + k1 = w ? g.node(w).order : prevLayerLength; + + if (w || v === lastNode) { + forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { + forEach/* default */.A(g.predecessors(scanNode), function (u) { + var uLabel = g.node(u), + uPos = uLabel.order; + if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { + addConflict(conflicts, u, scanNode); + } + }); + }); + // @ts-expect-error + scanPos = i + 1; + k0 = k1; + } + }); + + return layer; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findType2Conflicts(g, layering) { + var conflicts = {}; + + function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { + var v; + forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { + v = south[i]; + if (g.node(v).dummy) { + forEach/* default */.A(g.predecessors(v), function (u) { + var uNode = g.node(u); + if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { + addConflict(conflicts, u, v); + } + }); + } + }); + } + + function visitLayer(north, south) { + var prevNorthPos = -1, + nextNorthPos, + southPos = 0; + + forEach/* default */.A(south, function (v, southLookahead) { + if (g.node(v).dummy === 'border') { + var predecessors = g.predecessors(v); + if (predecessors.length) { + nextNorthPos = g.node(predecessors[0]).order; + scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); + // @ts-expect-error + southPos = southLookahead; + prevNorthPos = nextNorthPos; + } + } + scan(south, southPos, south.length, nextNorthPos, north.length); + }); + + return south; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findOtherInnerSegmentNode(g, v) { + if (g.node(v).dummy) { + return lodash_es_find(g.predecessors(v), function (u) { + return g.node(u).dummy; + }); + } +} + +function addConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + + var conflictsV = conflicts[v]; + if (!conflictsV) { + conflicts[v] = conflictsV = {}; + } + conflictsV[w] = true; +} + +function hasConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + return has/* default */.A(conflicts[v], w); +} + +/* + * Try to align nodes into vertical "blocks" where possible. This algorithm + * attempts to align a node with one of its median neighbors. If the edge + * connecting a neighbor is a type-1 conflict then we ignore that possibility. + * If a previous node has already formed a block with a node after the node + * we're trying to form a block with, we also ignore that possibility - our + * blocks would be split in that scenario. + */ +function verticalAlignment(g, layering, conflicts, neighborFn) { + var root = {}, + align = {}, + pos = {}; + + // We cache the position here based on the layering because the graph and + // layering may be out of sync. The layering matrix is manipulated to + // generate different extreme alignments. + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, order) { + root[v] = v; + align[v] = v; + pos[v] = order; + }); + }); + + forEach/* default */.A(layering, function (layer) { + var prevIdx = -1; + forEach/* default */.A(layer, function (v) { + var ws = neighborFn(v); + if (ws.length) { + ws = lodash_es_sortBy(ws, function (w) { + return pos[w]; + }); + var mp = (ws.length - 1) / 2; + for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { + var w = ws[i]; + if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { + align[w] = v; + align[v] = root[v] = root[w]; + prevIdx = pos[w]; + } + } + } + }); + }); + + return { root: root, align: align }; +} + +function horizontalCompaction(g, layering, root, align, reverseSep) { + // This portion of the algorithm differs from BK due to a number of problems. + // Instead of their algorithm we construct a new block graph and do two + // sweeps. The first sweep places blocks with the smallest possible + // coordinates. The second sweep removes unused space by moving blocks to the + // greatest coordinates without violating separation. + var xs = {}, + blockG = buildBlockGraph(g, layering, root, reverseSep), + borderType = reverseSep ? 'borderLeft' : 'borderRight'; + + function iterate(setXsFunc, nextNodesFunc) { + var stack = blockG.nodes(); + var elem = stack.pop(); + var visited = {}; + while (elem) { + if (visited[elem]) { + setXsFunc(elem); + } else { + visited[elem] = true; + stack.push(elem); + stack = stack.concat(nextNodesFunc(elem)); + } + + elem = stack.pop(); + } + } + + // First pass, assign smallest coordinates + function pass1(elem) { + xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { + return Math.max(acc, xs[e.v] + blockG.edge(e)); + }, 0); + } + + // Second pass, assign greatest coordinates + function pass2(elem) { + var min = blockG.outEdges(elem).reduce(function (acc, e) { + return Math.min(acc, xs[e.w] - blockG.edge(e)); + }, Number.POSITIVE_INFINITY); + + var node = g.node(elem); + if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { + xs[elem] = Math.max(xs[elem], min); + } + } + + iterate(pass1, blockG.predecessors.bind(blockG)); + iterate(pass2, blockG.successors.bind(blockG)); + + // Assign x coordinates to all nodes + forEach/* default */.A(align, function (v) { + xs[v] = xs[root[v]]; + }); + + return xs; +} + +function buildBlockGraph(g, layering, root, reverseSep) { + var blockGraph = new graphlib/* Graph */.T(), + graphLabel = g.graph(), + sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); + + forEach/* default */.A(layering, function (layer) { + var u; + forEach/* default */.A(layer, function (v) { + var vRoot = root[v]; + blockGraph.setNode(vRoot); + if (u) { + var uRoot = root[u], + prevMax = blockGraph.edge(uRoot, vRoot); + blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); + } + u = v; + }); + }); + + return blockGraph; +} + +/* + * Returns the alignment that has the smallest width of the given alignments. + */ +function findSmallestWidthAlignment(g, xss) { + return lodash_es_minBy(values/* default */.A(xss), function (xs) { + var max = Number.NEGATIVE_INFINITY; + var min = Number.POSITIVE_INFINITY; + + lodash_es_forIn(xs, function (x, v) { + var halfWidth = width(g, v) / 2; + + max = Math.max(x + halfWidth, max); + min = Math.min(x - halfWidth, min); + }); + + return max - min; + }); +} + +/* + * Align the coordinates of each of the layout alignments such that + * left-biased alignments have their minimum coordinate at the same point as + * the minimum coordinate of the smallest width alignment and right-biased + * alignments have their maximum coordinate at the same point as the maximum + * coordinate of the smallest width alignment. + */ +function alignCoordinates(xss, alignTo) { + var alignToVals = values/* default */.A(alignTo), + alignToMin = lodash_es_min(alignToVals), + alignToMax = lodash_es_max(alignToVals); + + forEach/* default */.A(['u', 'd'], function (vert) { + forEach/* default */.A(['l', 'r'], function (horiz) { + var alignment = vert + horiz, + xs = xss[alignment], + delta; + if (xs === alignTo) return; + + var xsVals = values/* default */.A(xs); + delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); + + if (delta) { + xss[alignment] = lodash_es_mapValues(xs, function (x) { + return x + delta; + }); + } + }); + }); +} + +function balance(xss, align) { + return lodash_es_mapValues(xss.ul, function (ignore, v) { + if (align) { + return xss[align.toLowerCase()][v]; + } else { + var xs = lodash_es_sortBy(map/* default */.A(xss, v)); + return (xs[1] + xs[2]) / 2; + } + }); +} + +function positionX(g) { + var layering = buildLayerMatrix(g); + var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); + + var xss = {}; + var adjustedLayering; + forEach/* default */.A(['u', 'd'], function (vert) { + adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); + forEach/* default */.A(['l', 'r'], function (horiz) { + if (horiz === 'r') { + adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { + return values/* default */.A(inner).reverse(); + }); + } + + var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); + var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); + var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); + if (horiz === 'r') { + xs = lodash_es_mapValues(xs, function (x) { + return -x; + }); + } + xss[vert + horiz] = xs; + }); + }); + + var smallestWidth = findSmallestWidthAlignment(g, xss); + alignCoordinates(xss, smallestWidth); + return balance(xss, g.graph().align); +} + +function sep(nodeSep, edgeSep, reverseSep) { + return function (g, v, w) { + var vLabel = g.node(v); + var wLabel = g.node(w); + var sum = 0; + var delta; + + sum += vLabel.width / 2; + if (has/* default */.A(vLabel, 'labelpos')) { + switch (vLabel.labelpos.toLowerCase()) { + case 'l': + delta = -vLabel.width / 2; + break; + case 'r': + delta = vLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; + sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; + + sum += wLabel.width / 2; + if (has/* default */.A(wLabel, 'labelpos')) { + switch (wLabel.labelpos.toLowerCase()) { + case 'l': + delta = wLabel.width / 2; + break; + case 'r': + delta = -wLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + return sum; + }; +} + +function width(g, v) { + return g.node(v).width; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js + + + + + + +function position(g) { + g = asNonCompoundGraph(g); + + positionY(g); + lodash_es_forOwn(positionX(g), function (x, v) { + g.node(v).x = x; + }); +} + +function positionY(g) { + var layering = buildLayerMatrix(g); + var rankSep = g.graph().ranksep; + var prevY = 0; + forEach/* default */.A(layering, function (layer) { + var maxHeight = lodash_es_max( + map/* default */.A(layer, function (v) { + return g.node(v).height; + }) + ); + forEach/* default */.A(layer, function (v) { + g.node(v).y = prevY + maxHeight / 2; + }); + prevY += maxHeight + rankSep; + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js + + + + + + + + + + + + + + + +function layout(g, opts) { + var time = opts && opts.debugTiming ? util_time : notime; + time('layout', function () { + var layoutGraph = time(' buildLayoutGraph', function () { + return buildLayoutGraph(g); + }); + time(' runLayout', function () { + runLayout(layoutGraph, time); + }); + time(' updateInputGraph', function () { + updateInputGraph(g, layoutGraph); + }); + }); +} + +function runLayout(g, time) { + time(' makeSpaceForEdgeLabels', function () { + makeSpaceForEdgeLabels(g); + }); + time(' removeSelfEdges', function () { + removeSelfEdges(g); + }); + time(' acyclic', function () { + run(g); + }); + time(' nestingGraph.run', function () { + nesting_graph_run(g); + }); + time(' rank', function () { + rank(asNonCompoundGraph(g)); + }); + time(' injectEdgeLabelProxies', function () { + injectEdgeLabelProxies(g); + }); + time(' removeEmptyRanks', function () { + removeEmptyRanks(g); + }); + time(' nestingGraph.cleanup', function () { + cleanup(g); + }); + time(' normalizeRanks', function () { + normalizeRanks(g); + }); + time(' assignRankMinMax', function () { + assignRankMinMax(g); + }); + time(' removeEdgeLabelProxies', function () { + removeEdgeLabelProxies(g); + }); + time(' normalize.run', function () { + normalize_run(g); + }); + time(' parentDummyChains', function () { + parentDummyChains(g); + }); + time(' addBorderSegments', function () { + addBorderSegments(g); + }); + time(' order', function () { + order(g); + }); + time(' insertSelfEdges', function () { + insertSelfEdges(g); + }); + time(' adjustCoordinateSystem', function () { + adjust(g); + }); + time(' position', function () { + position(g); + }); + time(' positionSelfEdges', function () { + positionSelfEdges(g); + }); + time(' removeBorderNodes', function () { + removeBorderNodes(g); + }); + time(' normalize.undo', function () { + normalize_undo(g); + }); + time(' fixupEdgeLabelCoords', function () { + fixupEdgeLabelCoords(g); + }); + time(' undoCoordinateSystem', function () { + coordinate_system_undo(g); + }); + time(' translateGraph', function () { + translateGraph(g); + }); + time(' assignNodeIntersects', function () { + assignNodeIntersects(g); + }); + time(' reversePoints', function () { + reversePointsForReversedEdges(g); + }); + time(' acyclic.undo', function () { + undo(g); + }); +} + +/* + * Copies final layout information from the layout graph back to the input + * graph. This process only copies whitelisted attributes from the layout graph + * to the input graph, so it serves as a good place to determine what + * attributes can influence layout. + */ +function updateInputGraph(inputGraph, layoutGraph) { + forEach/* default */.A(inputGraph.nodes(), function (v) { + var inputLabel = inputGraph.node(v); + var layoutLabel = layoutGraph.node(v); + + if (inputLabel) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + + if (layoutGraph.children(v).length) { + inputLabel.width = layoutLabel.width; + inputLabel.height = layoutLabel.height; + } + } + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var inputLabel = inputGraph.edge(e); + var layoutLabel = layoutGraph.edge(e); + + inputLabel.points = layoutLabel.points; + if (has/* default */.A(layoutLabel, 'x')) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + } + }); + + inputGraph.graph().width = layoutGraph.graph().width; + inputGraph.graph().height = layoutGraph.graph().height; +} + +var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; +var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; +var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; +var nodeNumAttrs = ['width', 'height']; +var nodeDefaults = { width: 0, height: 0 }; +var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; +var edgeDefaults = { + minlen: 1, + weight: 1, + width: 0, + height: 0, + labeloffset: 10, + labelpos: 'r', +}; +var edgeAttrs = ['labelpos']; + +/* + * Constructs a new graph from the input graph, which can be used for layout. + * This process copies only whitelisted attributes from the input graph to the + * layout graph. Thus this function serves as a good place to determine what + * attributes can influence layout. + */ +function buildLayoutGraph(inputGraph) { + var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); + var graph = canonicalize(inputGraph.graph()); + + g.setGraph( + merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) + ); + + forEach/* default */.A(inputGraph.nodes(), function (v) { + var node = canonicalize(inputGraph.node(v)); + g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); + g.setParent(v, inputGraph.parent(v)); + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var edge = canonicalize(inputGraph.edge(e)); + g.setEdge( + e, + merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) + ); + }); + + return g; +} + +/* + * This idea comes from the Gansner paper: to account for edge labels in our + * layout we split each rank in half by doubling minlen and halving ranksep. + * Then we can place labels at these mid-points between nodes. + * + * We also add some minimal padding to the width to push the label for the edge + * away from the edge itself a bit. + */ +function makeSpaceForEdgeLabels(g) { + var graph = g.graph(); + graph.ranksep /= 2; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + edge.minlen *= 2; + if (edge.labelpos.toLowerCase() !== 'c') { + if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { + edge.width += edge.labeloffset; + } else { + edge.height += edge.labeloffset; + } + } + }); +} + +/* + * Creates temporary dummy nodes that capture the rank in which each edge's + * label is going to, if it has one of non-zero width and height. We do this + * so that we can safely remove empty ranks while preserving balance for the + * label's position. + */ +function injectEdgeLabelProxies(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.width && edge.height) { + var v = g.node(e.v); + var w = g.node(e.w); + var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; + addDummyNode(g, 'edge-proxy', label, '_ep'); + } + }); +} + +function assignRankMinMax(g) { + var maxRank = 0; + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.borderTop) { + node.minRank = g.node(node.borderTop).rank; + node.maxRank = g.node(node.borderBottom).rank; + // @ts-expect-error + maxRank = lodash_es_max(maxRank, node.maxRank); + } + }); + g.graph().maxRank = maxRank; +} + +function removeEdgeLabelProxies(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'edge-proxy') { + g.edge(node.e).labelRank = node.rank; + g.removeNode(v); + } + }); +} + +function translateGraph(g) { + var minX = Number.POSITIVE_INFINITY; + var maxX = 0; + var minY = Number.POSITIVE_INFINITY; + var maxY = 0; + var graphLabel = g.graph(); + var marginX = graphLabel.marginx || 0; + var marginY = graphLabel.marginy || 0; + + function getExtremes(attrs) { + var x = attrs.x; + var y = attrs.y; + var w = attrs.width; + var h = attrs.height; + minX = Math.min(minX, x - w / 2); + maxX = Math.max(maxX, x + w / 2); + minY = Math.min(minY, y - h / 2); + maxY = Math.max(maxY, y + h / 2); + } + + forEach/* default */.A(g.nodes(), function (v) { + getExtremes(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + getExtremes(edge); + } + }); + + minX -= marginX; + minY -= marginY; + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + node.x -= minX; + node.y -= minY; + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, function (p) { + p.x -= minX; + p.y -= minY; + }); + if (has/* default */.A(edge, 'x')) { + edge.x -= minX; + } + if (has/* default */.A(edge, 'y')) { + edge.y -= minY; + } + }); + + graphLabel.width = maxX - minX + marginX; + graphLabel.height = maxY - minY + marginY; +} + +function assignNodeIntersects(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + var nodeV = g.node(e.v); + var nodeW = g.node(e.w); + var p1, p2; + if (!edge.points) { + edge.points = []; + p1 = nodeW; + p2 = nodeV; + } else { + p1 = edge.points[0]; + p2 = edge.points[edge.points.length - 1]; + } + edge.points.unshift(intersectRect(nodeV, p1)); + edge.points.push(intersectRect(nodeW, p2)); + }); +} + +function fixupEdgeLabelCoords(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + if (edge.labelpos === 'l' || edge.labelpos === 'r') { + edge.width -= edge.labeloffset; + } + switch (edge.labelpos) { + case 'l': + edge.x -= edge.width / 2 + edge.labeloffset; + break; + case 'r': + edge.x += edge.width / 2 + edge.labeloffset; + break; + } + } + }); +} + +function reversePointsForReversedEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.reversed) { + edge.points.reverse(); + } + }); +} + +function removeBorderNodes(g) { + forEach/* default */.A(g.nodes(), function (v) { + if (g.children(v).length) { + var node = g.node(v); + var t = g.node(node.borderTop); + var b = g.node(node.borderBottom); + var l = g.node(lodash_es_last(node.borderLeft)); + var r = g.node(lodash_es_last(node.borderRight)); + + node.width = Math.abs(r.x - l.x); + node.height = Math.abs(b.y - t.y); + node.x = l.x + node.width / 2; + node.y = t.y + node.height / 2; + } + }); + + forEach/* default */.A(g.nodes(), function (v) { + if (g.node(v).dummy === 'border') { + g.removeNode(v); + } + }); +} + +function removeSelfEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + if (e.v === e.w) { + var node = g.node(e.v); + if (!node.selfEdges) { + node.selfEdges = []; + } + node.selfEdges.push({ e: e, label: g.edge(e) }); + g.removeEdge(e); + } + }); +} + +function insertSelfEdges(g) { + var layers = buildLayerMatrix(g); + forEach/* default */.A(layers, function (layer) { + var orderShift = 0; + forEach/* default */.A(layer, function (v, i) { + var node = g.node(v); + node.order = i + orderShift; + forEach/* default */.A(node.selfEdges, function (selfEdge) { + addDummyNode( + g, + 'selfedge', + { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node.rank, + order: i + ++orderShift, + e: selfEdge.e, + label: selfEdge.label, + }, + '_se' + ); + }); + delete node.selfEdges; + }); + }); +} + +function positionSelfEdges(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'selfedge') { + var selfNode = g.node(node.e.v); + var x = selfNode.x + selfNode.width / 2; + var y = selfNode.y; + var dx = node.x - x; + var dy = selfNode.height / 2; + g.setEdge(node.e, node.label); + g.removeNode(v); + node.label.points = [ + { x: x + (2 * dx) / 3, y: y - dy }, + { x: x + (5 * dx) / 6, y: y - dy }, + { x: x + dx, y: y }, + { x: x + (5 * dx) / 6, y: y + dy }, + { x: x + (2 * dx) / 3, y: y + dy }, + ]; + node.label.x = node.x; + node.label.y = node.y; + } + }); +} + +function selectNumberAttrs(obj, attrs) { + return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); +} + +function canonicalize(attrs) { + var newAttrs = {}; + forEach/* default */.A(attrs, function (v, k) { + newAttrs[k.toLowerCase()] = v; + }); + return newAttrs; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + + + + + + + + +/***/ }), + +/***/ 3046: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + T: () => (/* binding */ Graph) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js +var isFunction = __webpack_require__(9610); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js +var isEmpty = __webpack_require__(6401); +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/* harmony default export */ const _baseIsNaN = (baseIsNaN); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/* harmony default export */ const _strictIndexOf = (strictIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js + + + + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? _strictIndexOf(array, value, fromIndex) + : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); +} + +/* harmony default export */ const _baseIndexOf = (baseIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js + + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && _baseIndexOf(array, value, 0) > -1; +} + +/* harmony default export */ const _arrayIncludes = (arrayIncludes); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js +var _Set = __webpack_require__(9857); +;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +/* harmony default export */ const lodash_es_noop = (noop); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { + return new _Set/* default */.A(values); +}; + +/* harmony default export */ const _createSet = (createSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js + + + + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = _arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = _arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : _createSet(array); + if (set) { + return (0,_setToArray/* default */.A)(set); + } + isCommon = false; + includes = _cacheHas/* default */.A; + seen = new _SetCache/* default */.A; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/* harmony default export */ const _baseUniq = (baseUniq); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js +var isArrayLikeObject = __webpack_require__(3533); +;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js + + + + + +/** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ +var union = (0,_baseRest/* default */.A)(function(arrays) { + return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); +}); + +/* harmony default export */ const lodash_es_union = (union); + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + + +var DEFAULT_EDGE_NAME = '\x00'; +var GRAPH_NODE = '\x00'; +var EDGE_KEY_DELIM = '\x01'; + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. +class Graph { + constructor(opts = {}) { + this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; + this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; + this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; + + // Label for the graph itself + this._label = undefined; + + // Defaults to be set when creating a new node + this._defaultNodeLabelFn = constant/* default */.A(undefined); + + // Defaults to be set when creating a new edge + this._defaultEdgeLabelFn = constant/* default */.A(undefined); + + // v -> label + this._nodes = {}; + + if (this._isCompound) { + // v -> parent + this._parent = {}; + + // v -> children + this._children = {}; + this._children[GRAPH_NODE] = {}; + } + + // v -> edgeObj + this._in = {}; + + // u -> v -> Number + this._preds = {}; + + // v -> edgeObj + this._out = {}; + + // v -> w -> Number + this._sucs = {}; + + // e -> edgeObj + this._edgeObjs = {}; + + // e -> label + this._edgeLabels = {}; + } + /* === Graph functions ========= */ + isDirected() { + return this._isDirected; + } + isMultigraph() { + return this._isMultigraph; + } + isCompound() { + return this._isCompound; + } + setGraph(label) { + this._label = label; + return this; + } + graph() { + return this._label; + } + /* === Node functions ========== */ + setDefaultNodeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; + } + nodeCount() { + return this._nodeCount; + } + nodes() { + return keys/* default */.A(this._nodes); + } + sources() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._in[v]); + }); + } + sinks() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._out[v]); + }); + } + setNodes(vs, value) { + var args = arguments; + var self = this; + forEach/* default */.A(vs, function (v) { + if (args.length > 1) { + self.setNode(v, value); + } else { + self.setNode(v); + } + }); + return this; + } + setNode(v, value) { + if (has/* default */.A(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; + } + return this; + } + + // @ts-expect-error + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; + } + node(v) { + return this._nodes[v]; + } + hasNode(v) { + return has/* default */.A(this._nodes, v); + } + removeNode(v) { + var self = this; + if (has/* default */.A(this._nodes, v)) { + var removeEdge = function (e) { + self.removeEdge(self._edgeObjs[e]); + }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + forEach/* default */.A(this.children(v), function (child) { + self.setParent(child); + }); + delete this._children[v]; + } + forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; + } + setParent(v, parent) { + if (!this._isCompound) { + throw new Error('Cannot set parent in a non-compound graph'); + } + + if (isUndefined/* default */.A(parent)) { + parent = GRAPH_NODE; + } else { + // Coerce parent to string + parent += ''; + for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); + } + } + + this.setNode(parent); + } + + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; + } + _removeFromParentsChildList(v) { + delete this._children[this._parent[v]][v]; + } + parent(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } + } + children(v) { + if (isUndefined/* default */.A(v)) { + v = GRAPH_NODE; + } + + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return keys/* default */.A(children); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } + } + predecessors(v) { + var predsV = this._preds[v]; + if (predsV) { + return keys/* default */.A(predsV); + } + } + successors(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return keys/* default */.A(sucsV); + } + } + neighbors(v) { + var preds = this.predecessors(v); + if (preds) { + return lodash_es_union(preds, this.successors(v)); + } + } + isLeaf(v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; + } + filterNodes(filter) { + // @ts-expect-error + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound, + }); + + copy.setGraph(this.graph()); + + var self = this; + forEach/* default */.A(this._nodes, function (value, v) { + if (filter(v)) { + copy.setNode(v, value); + } + }); + + forEach/* default */.A(this._edgeObjs, function (e) { + // @ts-expect-error + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self.edge(e)); + } + }); + + var parents = {}; + function findParent(v) { + var parent = self.parent(v); + if (parent === undefined || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); + } + } + + if (this._isCompound) { + forEach/* default */.A(copy.nodes(), function (v) { + copy.setParent(v, findParent(v)); + }); + } + + return copy; + } + /* === Edge functions ========== */ + setDefaultEdgeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; + } + edgeCount() { + return this._edgeCount; + } + edges() { + return values/* default */.A(this._edgeObjs); + } + setPath(vs, value) { + var self = this; + var args = arguments; + reduce/* default */.A(vs, function (v, w) { + if (args.length > 1) { + self.setEdge(v, w, value); + } else { + self.setEdge(v, w); + } + return w; + }); + return this; + } + /* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ + setEdge() { + var v, w, name, value; + var valueSpecified = false; + var arg0 = arguments[0]; + + if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; + } + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; + } + } + + v = '' + v; + w = '' + w; + if (!isUndefined/* default */.A(name)) { + name = '' + name; + } + + var e = edgeArgsToId(this._isDirected, v, w, name); + if (has/* default */.A(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; + } + return this; + } + + if (!isUndefined/* default */.A(name) && !this._isMultigraph) { + throw new Error('Cannot set a named edge when isMultigraph = false'); + } + + // It didn't exist, so we need to create it. + // First ensure the nodes exist. + this.setNode(v); + this.setNode(w); + + // @ts-expect-error + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + // Ensure we add undirected edges in a consistent way. + v = edgeObj.v; + w = edgeObj.w; + + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; + } + edge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return this._edgeLabels[e]; + } + hasEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return has/* default */.A(this._edgeLabels, e); + } + removeEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; + } + inEdges(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = values/* default */.A(inV); + if (!u) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.v === u; + }); + } + } + outEdges(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = values/* default */.A(outV); + if (!w) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.w === w; + }); + } + } + nodeEdges(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } + } +} + +/* Number of nodes in the graph. Should only be changed by the implementation. */ +Graph.prototype._nodeCount = 0; + +/* Number of edges in the graph. Should only be changed by the implementation. */ +Graph.prototype._edgeCount = 0; + +function incrementOrInitEntry(map, k) { + if (map[k]) { + map[k]++; + } else { + map[k] = 1; + } +} + +function decrementOrRemoveEntry(map, k) { + if (!--map[k]) { + delete map[k]; + } +} + +function edgeArgsToId(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); +} + +function edgeArgsToObj(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v: v, w: w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; +} + +function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); +} + + +/***/ }), + +/***/ 697: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) +/* harmony export */ }); +/* unused harmony export version */ +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); +// Includes only the "core" of graphlib + + + +const version = '2.1.9-pre'; + + + + +/***/ }), + +/***/ 2062: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _SetCache) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules +var _MapCache = __webpack_require__(9471); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/* harmony default export */ const _setCacheAdd = (setCacheAdd); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ const _setCacheHas = (setCacheHas); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new _MapCache/* default */.A; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; +SetCache.prototype.has = _setCacheHas; + +/* harmony default export */ const _SetCache = (SetCache); + + +/***/ }), + +/***/ 2641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); + + +/***/ }), + +/***/ 2634: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); + + +/***/ }), + +/***/ 5572: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); + + +/***/ }), + +/***/ 6912: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); + + +/***/ }), + +/***/ 1641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseClone) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js +var _arrayEach = __webpack_require__(2641); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js +var _copyObject = __webpack_require__(2031); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js + + + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssign = (baseAssign); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js + + + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssignIn = (baseAssignIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js +var _cloneBuffer = __webpack_require__(154); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js +var _copyArray = __webpack_require__(9759); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js +var _getSymbols = __webpack_require__(4792); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js + + + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); +} + +/* harmony default export */ const _copySymbols = (copySymbols); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js +var _getPrototype = __webpack_require__(5647); +// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js +var stubArray = __webpack_require__(3153); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { + var result = []; + while (object) { + (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); + object = (0,_getPrototype/* default */.A)(object); + } + return result; +}; + +/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js + + + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); +} + +/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js +var _baseGetAllKeys = __webpack_require__(3831); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js + + + + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); +} + +/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/* harmony default export */ const _initCloneArray = (initCloneArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js +var _cloneArrayBuffer = __webpack_require__(565); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js + + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/* harmony default export */ const _cloneDataView = (cloneDataView); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/* harmony default export */ const _cloneRegExp = (cloneRegExp); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js + + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/* harmony default export */ const _cloneSymbol = (cloneSymbol); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js +var _cloneTypedArray = __webpack_require__(1801); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js + + + + + + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return (0,_cloneArrayBuffer/* default */.A)(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return _cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return (0,_cloneTypedArray/* default */.A)(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return _cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return _cloneSymbol(object); + } +} + +/* harmony default export */ const _initCloneByTag = (initCloneByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules +var _initCloneObject = __webpack_require__(8598); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js + + + +/** `Object#toString` result references. */ +var _baseIsMap_mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; +} + +/* harmony default export */ const _baseIsMap = (baseIsMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js +var _nodeUtil = __webpack_require__(4841); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js + + + + +/* Node.js helper references. */ +var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; + +/* harmony default export */ const lodash_es_isMap = (isMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js + + + +/** `Object#toString` result references. */ +var _baseIsSet_setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; +} + +/* harmony default export */ const _baseIsSet = (baseIsSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js + + + + +/* Node.js helper references. */ +var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; + +/* harmony default export */ const lodash_es_isSet = (isSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js + + + + + + + + + + + + + + + + + + + + + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + _baseClone_boolTag = '[object Boolean]', + _baseClone_dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + _baseClone_mapTag = '[object Map]', + _baseClone_numberTag = '[object Number]', + objectTag = '[object Object]', + _baseClone_regexpTag = '[object RegExp]', + _baseClone_setTag = '[object Set]', + _baseClone_stringTag = '[object String]', + _baseClone_symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var _baseClone_arrayBufferTag = '[object ArrayBuffer]', + _baseClone_dataViewTag = '[object DataView]', + _baseClone_float32Tag = '[object Float32Array]', + _baseClone_float64Tag = '[object Float64Array]', + _baseClone_int8Tag = '[object Int8Array]', + _baseClone_int16Tag = '[object Int16Array]', + _baseClone_int32Tag = '[object Int32Array]', + _baseClone_uint8Tag = '[object Uint8Array]', + _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', + _baseClone_uint16Tag = '[object Uint16Array]', + _baseClone_uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = +cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = +cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = +cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = +cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = +cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = +cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = +cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = +cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = +cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!(0,isObject/* default */.A)(value)) { + return value; + } + var isArr = (0,isArray/* default */.A)(value); + if (isArr) { + result = _initCloneArray(value); + if (!isDeep) { + return (0,_copyArray/* default */.A)(value, result); + } + } else { + var tag = (0,_getTag/* default */.A)(value), + isFunc = tag == funcTag || tag == genTag; + + if ((0,isBuffer/* default */.A)(value)) { + return (0,_cloneBuffer/* default */.A)(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); + if (!isDeep) { + return isFlat + ? _copySymbolsIn(value, _baseAssignIn(result, value)) + : _copySymbols(value, _baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = _initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new _Stack/* default */.A); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (lodash_es_isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (lodash_es_isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) + : (isFlat ? keysIn/* default */.A : keys/* default */.A); + + var props = isArr ? undefined : keysFunc(value); + (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +/* harmony default export */ const _baseClone = (baseClone); + + +/***/ }), + +/***/ 6240: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseEach) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js + + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!(0,isArrayLike/* default */.A)(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +/* harmony default export */ const _createBaseEach = (createBaseEach); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js + + + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = _createBaseEach(_baseForOwn/* default */.A); + +/* harmony default export */ const _baseEach = (baseEach); + + +/***/ }), + +/***/ 5707: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); + + +/***/ }), + +/***/ 3588: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseFlatten) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules +var isArguments = __webpack_require__(2274); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js + + + + +/** Built-in value references. */ +var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/* harmony default export */ const _isFlattenable = (isFlattenable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js + + + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = _isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + (0,_arrayPush/* default */.A)(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/* harmony default export */ const _baseFlatten = (baseFlatten); + + +/***/ }), + +/***/ 9841: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); + + +/***/ }), + +/***/ 6318: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); + + +/***/ }), + +/***/ 3831: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6912); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); + + +/***/ }), + +/***/ 9574: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseIteratee) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arraySome = (arraySome); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!_arraySome(other, function(othValue, othIndex) { + if (!(0,_cacheHas/* default */.A)(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalArrays = (equalArrays); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js +var _Uint8Array = __webpack_require__(3988); +// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js +var eq = __webpack_require__(6984); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ const _mapToArray = (mapToArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _equalByTag_COMPARE_PARTIAL_FLAG = 1, + _equalByTag_COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return (0,eq/* default */.A)(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = _mapToArray; + + case setTag: + var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; + convert || (convert = _setToArray/* default */.A); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ const _equalByTag = (equalByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js + + +/** Used to compose bitmasks for value comparisons. */ +var _equalObjects_COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, + objProps = (0,_getAllKeys/* default */.A)(object), + objLength = objProps.length, + othProps = (0,_getAllKeys/* default */.A)(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalObjects = (equalObjects); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules +var isTypedArray = __webpack_require__(3858); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var _baseIsEqualDeep_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = (0,isArray/* default */.A)(object), + othIsArr = (0,isArray/* default */.A)(other), + objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), + othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && (0,isBuffer/* default */.A)(object)) { + if (!(0,isBuffer/* default */.A)(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new _Stack/* default */.A); + return (objIsArr || (0,isTypedArray/* default */.A)(object)) + ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new _Stack/* default */.A); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new _Stack/* default */.A); + return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { + return value !== value && other !== other; + } + return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ const _baseIsEqual = (baseIsEqual); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, + _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new _Stack/* default */.A; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ const _baseIsMatch = (baseIsMatch); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !(0,isObject/* default */.A)(value); +} + +/* harmony default export */ const _isStrictComparable = (isStrictComparable); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = (0,keys/* default */.A)(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, _isStrictComparable(value)]; + } + return result; +} + +/* harmony default export */ const _getMatchData = (getMatchData); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = _getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return _matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || _baseIsMatch(object, source, matchData); + }; +} + +/* harmony default export */ const _baseMatches = (baseMatches); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ const lodash_es_get = (get); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, + _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { + return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); + } + return function(object) { + var objValue = lodash_es_get(object, path); + return (objValue === undefined && objValue === srcValue) + ? (0,hasIn/* default */.A)(object, path) + : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return (0,_baseGet/* default */.A)(object, path); + }; +} + +/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); +} + +/* harmony default export */ const lodash_es_property = (property); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity/* default */.A; + } + if (typeof value == 'object') { + return (0,isArray/* default */.A)(value) + ? _baseMatchesProperty(value[0], value[1]) + : _baseMatches(value); + } + return lodash_es_property(value); +} + +/* harmony default export */ const _baseIteratee = (baseIteratee); + + +/***/ }), + +/***/ 2568: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; + + (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); + + +/***/ }), + +/***/ 805: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); + + +/***/ }), + +/***/ 4099: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); + + +/***/ }), + +/***/ 9922: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9008); + + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); + + +/***/ }), + +/***/ 7819: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _castPath) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js +var memoize = __webpack_require__(6632); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = (0,memoize/* default */.A)(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ const _memoizeCapped = (memoizeCapped); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js + + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = _memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ const _stringToPath = (stringToPath); + +// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules +var lodash_es_toString = __webpack_require__(8894); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if ((0,isArray/* default */.A)(value)) { + return value; + } + return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); +} + +/* harmony default export */ const _castPath = (castPath); + + +/***/ }), + +/***/ 9042: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3831); +/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4792); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); + + +/***/ }), + +/***/ 4792: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); +/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3153); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); + + +/***/ }), + +/***/ 5054: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2274); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2049); +/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5353); +/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && + ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); + + +/***/ }), + +/***/ 6586: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1882); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); + + +/***/ }), + +/***/ 9959: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); + + +/***/ }), + +/***/ 3282: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1882); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); + + +/***/ }), + +/***/ 3068: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4326); +/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6984); +/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); +/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5615); + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); + + +/***/ }), + +/***/ 1662: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_filter) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js +var _arrayFilter = __webpack_require__(2634); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js + + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + (0,_baseEach/* default */.A)(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +/* harmony default export */ const _baseFilter = (baseFilter); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js + + + + + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ +function filter(collection, predicate) { + var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; + return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); +} + +/* harmony default export */ const lodash_es_filter = (filter); + + +/***/ }), + +/***/ 4098: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3588); + + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); + + +/***/ }), + +/***/ 8058: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2641); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); +/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9922); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); + + +/***/ }), + +/***/ 8585: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_has) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && _baseHas_hasOwnProperty.call(object, key); +} + +/* harmony default export */ const _baseHas = (baseHas); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js + + + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); +} + +/* harmony default export */ const lodash_es_has = (has); + + +/***/ }), + +/***/ 9188: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_hasIn) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ const _baseHasIn = (baseHasIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); +} + +/* harmony default export */ const lodash_es_hasIn = (hasIn); + + +/***/ }), + +/***/ 1882: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8496); +/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3098); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); + + +/***/ }), + +/***/ 9592: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); + + +/***/ }), + +/***/ 2184: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3607); +/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1852); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); + + +/***/ }), + +/***/ 4722: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5572); +/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9574); +/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2568); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); + + +/***/ }), + +/***/ 1942: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_pick) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules +var _castPath = __webpack_require__(7819); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js +var _isIndex = __webpack_require__(5353); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js + + + + + + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!(0,isObject/* default */.A)(object)) { + return object; + } + path = (0,_castPath/* default */.A)(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = (0,_toKey/* default */.A)(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = (0,isObject/* default */.A)(objValue) + ? objValue + : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); + } + } + (0,_assignValue/* default */.A)(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/* harmony default export */ const _baseSet = (baseSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js + + + + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = (0,_baseGet/* default */.A)(object, path); + + if (predicate(value, path)) { + _baseSet(result, (0,_castPath/* default */.A)(path, object), value); + } + } + return result; +} + +/* harmony default export */ const _basePickBy = (basePickBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js + + + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return _basePickBy(object, paths, function(value, path) { + return (0,hasIn/* default */.A)(object, path); + }); +} + +/* harmony default export */ const _basePick = (basePick); + +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules +var _overRest = __webpack_require__(6875); +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules +var _setToString = __webpack_require__(7525); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js + + + + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); +} + +/* harmony default export */ const _flatRest = (flatRest); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js + + + +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = _flatRest(function(object, paths) { + return object == null ? {} : _basePick(object, paths); +}); + +/* harmony default export */ const lodash_es_pick = (pick); + + +/***/ }), + +/***/ 1395: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_range) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +/* harmony default export */ const _baseRange = (baseRange); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js + + + + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = (0,toFinite/* default */.A)(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = (0,toFinite/* default */.A)(end); + } + step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); + return _baseRange(start, end, step, fromRight); + }; +} + +/* harmony default export */ const _createRange = (createRange); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js + + +/** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ +var range = _createRange(); + +/* harmony default export */ const lodash_es_range = (range); + + +/***/ }), + +/***/ 9463: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_reduce) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/* harmony default export */ const _arrayReduce = (arrayReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +/* harmony default export */ const _baseReduce = (baseReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js + + + + + + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ +function reduce(collection, iteratee, accumulator) { + var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, + initAccum = arguments.length < 3; + + return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); +} + +/* harmony default export */ const lodash_es_reduce = (reduce); + + +/***/ }), + +/***/ 3153: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); + + +/***/ }), + +/***/ 4342: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toFinite) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js +/** Used to match a single whitespace character. */ +var reWhitespace = /\s/; + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ +function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; +} + +/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js + + +/** Used to match leading whitespace. */ +var reTrimStart = /^\s+/; + +/** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ +function baseTrim(string) { + return string + ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; +} + +/* harmony default export */ const _baseTrim = (baseTrim); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js + + + + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if ((0,isSymbol/* default */.A)(value)) { + return NAN; + } + if ((0,isObject/* default */.A)(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = (0,isObject/* default */.A)(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = _baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +/* harmony default export */ const lodash_es_toNumber = (toNumber); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = lodash_es_toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +/* harmony default export */ const lodash_es_toFinite = (toFinite); + + +/***/ }), + +/***/ 8894: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toString) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if ((0,isArray/* default */.A)(value)) { + // Recursively convert values (susceptible to call stack limits). + return (0,_arrayMap/* default */.A)(value, baseToString) + ''; + } + if ((0,isSymbol/* default */.A)(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const _baseToString = (baseToString); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString_toString(value) { + return value == null ? '' : _baseToString(value); +} + +/* harmony default export */ const lodash_es_toString = (toString_toString); + + +/***/ }), + +/***/ 5664: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8894); + + +/** Used to generate unique IDs. */ +var idCounter = 0; + +/** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ +function uniqueId(prefix) { + var id = ++idCounter; + return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); + + +/***/ }), + +/***/ 8207: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_values) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js + + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return (0,_arrayMap/* default */.A)(props, function(key) { + return object[key]; + }); +} + +/* harmony default export */ const _baseValues = (baseValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js + + + +/** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ +function values(object) { + return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); +} + +/* harmony default export */ const lodash_es_values = (values); + + +/***/ }), + +/***/ 9688: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1176); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9418); + + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [5, 6, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], $V5 = [1, 18], $V6 = [2, 7], $V7 = [1, 22], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 20], $Ve = [1, 28], $Vf = [1, 29], $Vg = [62, 63], $Vh = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 51, 53, 62, 63], $Vi = [1, 47], $Vj = [1, 48], $Vk = [1, 49], $Vl = [1, 50], $Vm = [1, 51], $Vn = [1, 52], $Vo = [1, 53], $Vp = [53, 54], $Vq = [1, 64], $Vr = [1, 60], $Vs = [1, 61], $Vt = [1, 62], $Vu = [1, 63], $Vv = [1, 65], $Vw = [1, 69], $Vx = [1, 70], $Vy = [1, 67], $Vz = [1, 68], $VA = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "directive": 4, "NEWLINE": 5, "RD": 6, "diagram": 7, "EOF": 8, "acc_title": 9, "acc_title_value": 10, "acc_descr": 11, "acc_descr_value": 12, "acc_descr_multiline_value": 13, "requirementDef": 14, "elementDef": 15, "relationshipDef": 16, "requirementType": 17, "requirementName": 18, "STRUCT_START": 19, "requirementBody": 20, "ID": 21, "COLONSEP": 22, "id": 23, "TEXT": 24, "text": 25, "RISK": 26, "riskLevel": 27, "VERIFYMTHD": 28, "verifyType": 29, "STRUCT_STOP": 30, "REQUIREMENT": 31, "FUNCTIONAL_REQUIREMENT": 32, "INTERFACE_REQUIREMENT": 33, "PERFORMANCE_REQUIREMENT": 34, "PHYSICAL_REQUIREMENT": 35, "DESIGN_CONSTRAINT": 36, "LOW_RISK": 37, "MED_RISK": 38, "HIGH_RISK": 39, "VERIFY_ANALYSIS": 40, "VERIFY_DEMONSTRATION": 41, "VERIFY_INSPECTION": 42, "VERIFY_TEST": 43, "ELEMENT": 44, "elementName": 45, "elementBody": 46, "TYPE": 47, "type": 48, "DOCREF": 49, "ref": 50, "END_ARROW_L": 51, "relationship": 52, "LINE": 53, "END_ARROW_R": 54, "CONTAINS": 55, "COPIES": 56, "DERIVES": 57, "SATISFIES": 58, "VERIFIES": 59, "REFINES": 60, "TRACES": 61, "unqString": 62, "qString": 63, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 9: "acc_title", 10: "acc_title_value", 11: "acc_descr", 12: "acc_descr_value", 13: "acc_descr_multiline_value", 19: "STRUCT_START", 21: "ID", 22: "COLONSEP", 24: "TEXT", 26: "RISK", 28: "VERIFYMTHD", 30: "STRUCT_STOP", 31: "REQUIREMENT", 32: "FUNCTIONAL_REQUIREMENT", 33: "INTERFACE_REQUIREMENT", 34: "PERFORMANCE_REQUIREMENT", 35: "PHYSICAL_REQUIREMENT", 36: "DESIGN_CONSTRAINT", 37: "LOW_RISK", 38: "MED_RISK", 39: "HIGH_RISK", 40: "VERIFY_ANALYSIS", 41: "VERIFY_DEMONSTRATION", 42: "VERIFY_INSPECTION", 43: "VERIFY_TEST", 44: "ELEMENT", 47: "TYPE", 49: "DOCREF", 51: "END_ARROW_L", 53: "LINE", 54: "END_ARROW_R", 55: "CONTAINS", 56: "COPIES", 57: "DERIVES", 58: "SATISFIES", 59: "VERIFIES", 60: "REFINES", 61: "TRACES", 62: "unqString", 63: "qString" }, + productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [14, 5], [20, 5], [20, 5], [20, 5], [20, 5], [20, 2], [20, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [27, 1], [27, 1], [27, 1], [29, 1], [29, 1], [29, 1], [29, 1], [15, 5], [46, 5], [46, 5], [46, 2], [46, 1], [16, 5], [16, 5], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [18, 1], [18, 1], [23, 1], [23, 1], [25, 1], [25, 1], [45, 1], [45, 1], [48, 1], [48, 1], [50, 1], [50, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 4: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 5: + case 6: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 7: + this.$ = []; + break; + case 13: + yy.addRequirement($$[$0 - 3], $$[$0 - 4]); + break; + case 14: + yy.setNewReqId($$[$0 - 2]); + break; + case 15: + yy.setNewReqText($$[$0 - 2]); + break; + case 16: + yy.setNewReqRisk($$[$0 - 2]); + break; + case 17: + yy.setNewReqVerifyMethod($$[$0 - 2]); + break; + case 20: + this.$ = yy.RequirementType.REQUIREMENT; + break; + case 21: + this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT; + break; + case 22: + this.$ = yy.RequirementType.INTERFACE_REQUIREMENT; + break; + case 23: + this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT; + break; + case 24: + this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT; + break; + case 25: + this.$ = yy.RequirementType.DESIGN_CONSTRAINT; + break; + case 26: + this.$ = yy.RiskLevel.LOW_RISK; + break; + case 27: + this.$ = yy.RiskLevel.MED_RISK; + break; + case 28: + this.$ = yy.RiskLevel.HIGH_RISK; + break; + case 29: + this.$ = yy.VerifyType.VERIFY_ANALYSIS; + break; + case 30: + this.$ = yy.VerifyType.VERIFY_DEMONSTRATION; + break; + case 31: + this.$ = yy.VerifyType.VERIFY_INSPECTION; + break; + case 32: + this.$ = yy.VerifyType.VERIFY_TEST; + break; + case 33: + yy.addElement($$[$0 - 3]); + break; + case 34: + yy.setNewElementType($$[$0 - 2]); + break; + case 35: + yy.setNewElementDocRef($$[$0 - 2]); + break; + case 38: + yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 39: + yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 40: + this.$ = yy.Relationships.CONTAINS; + break; + case 41: + this.$ = yy.Relationships.COPIES; + break; + case 42: + this.$ = yy.Relationships.DERIVES; + break; + case 43: + this.$ = yy.Relationships.SATISFIES; + break; + case 44: + this.$ = yy.Relationships.VERIFIES; + break; + case 45: + this.$ = yy.Relationships.REFINES; + break; + case 46: + this.$ = yy.Relationships.TRACES; + break; + } + }, + table: [{ 3: 1, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, o($V4, [2, 6]), { 3: 12, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [2, 2] }, { 4: 17, 5: $V5, 7: 13, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, o($V4, [2, 4]), o($V4, [2, 5]), { 1: [2, 1] }, { 8: [1, 30] }, { 4: 17, 5: $V5, 7: 31, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 32, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 33, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 34, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 35, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 18: 36, 62: [1, 37], 63: [1, 38] }, { 45: 39, 62: [1, 40], 63: [1, 41] }, { 51: [1, 42], 53: [1, 43] }, o($Vg, [2, 20]), o($Vg, [2, 21]), o($Vg, [2, 22]), o($Vg, [2, 23]), o($Vg, [2, 24]), o($Vg, [2, 25]), o($Vh, [2, 49]), o($Vh, [2, 50]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 19: [1, 44] }, { 19: [2, 47] }, { 19: [2, 48] }, { 19: [1, 45] }, { 19: [2, 53] }, { 19: [2, 54] }, { 52: 46, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 52: 54, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 5: [1, 55] }, { 5: [1, 56] }, { 53: [1, 57] }, o($Vp, [2, 40]), o($Vp, [2, 41]), o($Vp, [2, 42]), o($Vp, [2, 43]), o($Vp, [2, 44]), o($Vp, [2, 45]), o($Vp, [2, 46]), { 54: [1, 58] }, { 5: $Vq, 20: 59, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 66, 47: $Vy, 49: $Vz }, { 23: 71, 62: $Ve, 63: $Vf }, { 23: 72, 62: $Ve, 63: $Vf }, o($VA, [2, 13]), { 22: [1, 73] }, { 22: [1, 74] }, { 22: [1, 75] }, { 22: [1, 76] }, { 5: $Vq, 20: 77, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, o($VA, [2, 19]), o($VA, [2, 33]), { 22: [1, 78] }, { 22: [1, 79] }, { 5: $Vw, 30: $Vx, 46: 80, 47: $Vy, 49: $Vz }, o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), { 23: 81, 62: $Ve, 63: $Vf }, { 25: 82, 62: [1, 83], 63: [1, 84] }, { 27: 85, 37: [1, 86], 38: [1, 87], 39: [1, 88] }, { 29: 89, 40: [1, 90], 41: [1, 91], 42: [1, 92], 43: [1, 93] }, o($VA, [2, 18]), { 48: 94, 62: [1, 95], 63: [1, 96] }, { 50: 97, 62: [1, 98], 63: [1, 99] }, o($VA, [2, 36]), { 5: [1, 100] }, { 5: [1, 101] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 102] }, { 5: [2, 26] }, { 5: [2, 27] }, { 5: [2, 28] }, { 5: [1, 103] }, { 5: [2, 29] }, { 5: [2, 30] }, { 5: [2, 31] }, { 5: [2, 32] }, { 5: [1, 104] }, { 5: [2, 55] }, { 5: [2, 56] }, { 5: [1, 105] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: $Vq, 20: 106, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 107, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 108, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 109, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 110, 47: $Vy, 49: $Vz }, { 5: $Vw, 30: $Vx, 46: 111, 47: $Vy, 49: $Vz }, o($VA, [2, 14]), o($VA, [2, 15]), o($VA, [2, 16]), o($VA, [2, 17]), o($VA, [2, 34]), o($VA, [2, 35])], + defaultActions: { 8: [2, 2], 12: [2, 1], 30: [2, 3], 31: [2, 8], 32: [2, 9], 33: [2, 10], 34: [2, 11], 35: [2, 12], 37: [2, 47], 38: [2, 48], 40: [2, 53], 41: [2, 54], 83: [2, 51], 84: [2, 52], 86: [2, 26], 87: [2, 27], 88: [2, 28], 90: [2, 29], 91: [2, 30], 92: [2, 31], 93: [2, 32], 95: [2, 55], 96: [2, 56], 98: [2, 57], 99: [2, 58] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return "title"; + case 1: + this.begin("acc_title"); + return 9; + case 2: + this.popState(); + return "acc_title_value"; + case 3: + this.begin("acc_descr"); + return 11; + case 4: + this.popState(); + return "acc_descr_value"; + case 5: + this.begin("acc_descr_multiline"); + break; + case 6: + this.popState(); + break; + case 7: + return "acc_descr_multiline_value"; + case 8: + return 5; + case 9: + break; + case 10: + break; + case 11: + break; + case 12: + return 8; + case 13: + return 6; + case 14: + return 19; + case 15: + return 30; + case 16: + return 22; + case 17: + return 21; + case 18: + return 24; + case 19: + return 26; + case 20: + return 28; + case 21: + return 31; + case 22: + return 32; + case 23: + return 33; + case 24: + return 34; + case 25: + return 35; + case 26: + return 36; + case 27: + return 37; + case 28: + return 38; + case 29: + return 39; + case 30: + return 40; + case 31: + return 41; + case 32: + return 42; + case 33: + return 43; + case 34: + return 44; + case 35: + return 55; + case 36: + return 56; + case 37: + return 57; + case 38: + return 58; + case 39: + return 59; + case 40: + return 60; + case 41: + return 61; + case 42: + return 47; + case 43: + return 49; + case 44: + return 51; + case 45: + return 54; + case 46: + return 53; + case 47: + this.begin("string"); + break; + case 48: + this.popState(); + break; + case 49: + return "qString"; + case 50: + yy_.yytext = yy_.yytext.trim(); + return 62; + } + }, + rules: [/^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^\r\n\{\<\>\-\=]*)/i], + conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "unqString": { "rules": [], "inclusive": false }, "token": { "rules": [], "inclusive": false }, "string": { "rules": [48, 49], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 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, 50], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let relations = []; +let latestRequirement = {}; +let requirements = {}; +let latestElement = {}; +let elements = {}; +const RequirementType = { + REQUIREMENT: "Requirement", + FUNCTIONAL_REQUIREMENT: "Functional Requirement", + INTERFACE_REQUIREMENT: "Interface Requirement", + PERFORMANCE_REQUIREMENT: "Performance Requirement", + PHYSICAL_REQUIREMENT: "Physical Requirement", + DESIGN_CONSTRAINT: "Design Constraint" +}; +const RiskLevel = { + LOW_RISK: "Low", + MED_RISK: "Medium", + HIGH_RISK: "High" +}; +const VerifyType = { + VERIFY_ANALYSIS: "Analysis", + VERIFY_DEMONSTRATION: "Demonstration", + VERIFY_INSPECTION: "Inspection", + VERIFY_TEST: "Test" +}; +const Relationships = { + CONTAINS: "contains", + COPIES: "copies", + DERIVES: "derives", + SATISFIES: "satisfies", + VERIFIES: "verifies", + REFINES: "refines", + TRACES: "traces" +}; +const addRequirement = (name, type) => { + if (requirements[name] === void 0) { + requirements[name] = { + name, + type, + id: latestRequirement.id, + text: latestRequirement.text, + risk: latestRequirement.risk, + verifyMethod: latestRequirement.verifyMethod + }; + } + latestRequirement = {}; + return requirements[name]; +}; +const getRequirements = () => requirements; +const setNewReqId = (id) => { + if (latestRequirement !== void 0) { + latestRequirement.id = id; + } +}; +const setNewReqText = (text) => { + if (latestRequirement !== void 0) { + latestRequirement.text = text; + } +}; +const setNewReqRisk = (risk) => { + if (latestRequirement !== void 0) { + latestRequirement.risk = risk; + } +}; +const setNewReqVerifyMethod = (verifyMethod) => { + if (latestRequirement !== void 0) { + latestRequirement.verifyMethod = verifyMethod; + } +}; +const addElement = (name) => { + if (elements[name] === void 0) { + elements[name] = { + name, + type: latestElement.type, + docRef: latestElement.docRef + }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Added new requirement: ", name); + } + latestElement = {}; + return elements[name]; +}; +const getElements = () => elements; +const setNewElementType = (type) => { + if (latestElement !== void 0) { + latestElement.type = type; + } +}; +const setNewElementDocRef = (docRef) => { + if (latestElement !== void 0) { + latestElement.docRef = docRef; + } +}; +const addRelationship = (type, src, dst) => { + relations.push({ + type, + src, + dst + }); +}; +const getRelationships = () => relations; +const clear = () => { + relations = []; + latestRequirement = {}; + requirements = {}; + latestElement = {}; + elements = {}; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.v)(); +}; +const db = { + RequirementType, + RiskLevel, + VerifyType, + Relationships, + getConfig: () => (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().req, + addRequirement, + getRequirements, + setNewReqId, + setNewReqText, + setNewReqRisk, + setNewReqVerifyMethod, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.g, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.b, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.a, + addElement, + getElements, + setNewElementType, + setNewElementDocRef, + addRelationship, + getRelationships, + clear +}; +const getStyles = (options) => ` + + marker { + fill: ${options.relationColor}; + stroke: ${options.relationColor}; + } + + marker.cross { + stroke: ${options.lineColor}; + } + + svg { + font-family: ${options.fontFamily}; + font-size: ${options.fontSize}; + } + + .reqBox { + fill: ${options.requirementBackground}; + fill-opacity: 1.0; + stroke: ${options.requirementBorderColor}; + stroke-width: ${options.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${options.requirementTextColor}; + } + .reqLabelBox { + fill: ${options.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${options.requirementBorderColor}; + stroke-width: ${options.requirementBorderSize}; + } + .relationshipLine { + stroke: ${options.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${options.relationLabelColor}; + } + +`; +const styles = getStyles; +const ReqMarkers = { + CONTAINS: "contains", + ARROW: "arrow" +}; +const insertLineEndings = (parentNode, conf2) => { + let containsNode = parentNode.append("defs").append("marker").attr("id", ReqMarkers.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", conf2.line_height / 2).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("g"); + containsNode.append("circle").attr("cx", conf2.line_height / 2).attr("cy", conf2.line_height / 2).attr("r", conf2.line_height / 2).attr("fill", "none"); + containsNode.append("line").attr("x1", 0).attr("x2", conf2.line_height).attr("y1", conf2.line_height / 2).attr("y2", conf2.line_height / 2).attr("stroke-width", 1); + containsNode.append("line").attr("y1", 0).attr("y2", conf2.line_height).attr("x1", conf2.line_height / 2).attr("x2", conf2.line_height / 2).attr("stroke-width", 1); + parentNode.append("defs").append("marker").attr("id", ReqMarkers.ARROW + "_line_ending").attr("refX", conf2.line_height).attr("refY", 0.5 * conf2.line_height).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("path").attr( + "d", + `M0,0 + L${conf2.line_height},${conf2.line_height / 2} + M${conf2.line_height},${conf2.line_height / 2} + L0,${conf2.line_height}` + ).attr("stroke-width", 1); +}; +const markers = { + ReqMarkers, + insertLineEndings +}; +let conf = {}; +let relCnt = 0; +const newRectNode = (parentNode, id) => { + return parentNode.insert("rect", "#" + id).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", conf.rect_min_width + "px").attr("height", conf.rect_min_height + "px"); +}; +const newTitleNode = (parentNode, id, txts) => { + let x = conf.rect_min_width / 2; + let title = parentNode.append("text").attr("class", "req reqLabel reqTitle").attr("id", id).attr("x", x).attr("y", conf.rect_padding).attr("dominant-baseline", "hanging"); + let i = 0; + txts.forEach((textStr) => { + if (i == 0) { + title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", 0).text(textStr); + } else { + title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", conf.line_height * 0.75).text(textStr); + } + i++; + }); + let yPadding = 1.5 * conf.rect_padding; + let linePadding = i * conf.line_height * 0.75; + let totalY = yPadding + linePadding; + parentNode.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", conf.rect_min_width).attr("y1", totalY).attr("y2", totalY); + return { + titleNode: title, + y: totalY + }; +}; +const newBodyNode = (parentNode, id, txts, yStart) => { + let body = parentNode.append("text").attr("class", "req reqLabel").attr("id", id).attr("x", conf.rect_padding).attr("y", yStart).attr("dominant-baseline", "hanging"); + let currentRow = 0; + const charLimit = 30; + let wrappedTxts = []; + txts.forEach((textStr) => { + let currentTextLen = textStr.length; + while (currentTextLen > charLimit && currentRow < 3) { + let firstPart = textStr.substring(0, charLimit); + textStr = textStr.substring(charLimit, textStr.length); + currentTextLen = textStr.length; + wrappedTxts[wrappedTxts.length] = firstPart; + currentRow++; + } + if (currentRow == 3) { + let lastStr = wrappedTxts[wrappedTxts.length - 1]; + wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + "..."; + } else { + wrappedTxts[wrappedTxts.length] = textStr; + } + currentRow = 0; + }); + wrappedTxts.forEach((textStr) => { + body.append("tspan").attr("x", conf.rect_padding).attr("dy", conf.line_height).text(textStr); + }); + return body; +}; +const addEdgeLabel = (parentNode, svgPath, conf2, txt) => { + const len = svgPath.node().getTotalLength(); + const labelPoint = svgPath.node().getPointAtLength(len * 0.5); + const labelId = "rel" + relCnt; + relCnt++; + const labelNode = parentNode.append("text").attr("class", "req relationshipLabel").attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(txt); + const labelBBox = labelNode.node().getBBox(); + parentNode.insert("rect", "#" + labelId).attr("class", "req reqLabelBox").attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height).attr("fill", "white").attr("fill-opacity", "85%"); +}; +const drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) { + const edge = g.edge(elementString(rel.src), elementString(rel.dst)); + const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }); + const svgPath = svg.insert("path", "#" + insert).attr("class", "er relationshipLine").attr("d", lineFunction(edge.points)).attr("fill", "none"); + if (rel.type == diagObj.db.Relationships.CONTAINS) { + svgPath.attr( + "marker-start", + "url(" + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.e.getUrl(conf.arrowMarkerAbsolute) + "#" + rel.type + "_line_ending)" + ); + } else { + svgPath.attr("stroke-dasharray", "10,7"); + svgPath.attr( + "marker-end", + "url(" + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.e.getUrl(conf.arrowMarkerAbsolute) + "#" + markers.ReqMarkers.ARROW + "_line_ending)" + ); + } + addEdgeLabel(svg, svgPath, conf, `<<${rel.type}>>`); + return; +}; +const drawReqs = (reqs, graph, svgNode) => { + Object.keys(reqs).forEach((reqName) => { + let req = reqs[reqName]; + reqName = elementString(reqName); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Added new requirement: ", reqName); + const groupNode = svgNode.append("g").attr("id", reqName); + const textId = "req-" + reqName; + const rectNode = newRectNode(groupNode, textId); + let titleNodeInfo = newTitleNode(groupNode, reqName + "_title", [ + `<<${req.type}>>`, + `${req.name}` + ]); + newBodyNode( + groupNode, + reqName + "_body", + [ + `Id: ${req.id}`, + `Text: ${req.text}`, + `Risk: ${req.risk}`, + `Verification: ${req.verifyMethod}` + ], + titleNodeInfo.y + ); + const rectBBox = rectNode.node().getBBox(); + graph.setNode(reqName, { + width: rectBBox.width, + height: rectBBox.height, + shape: "rect", + id: reqName + }); + }); +}; +const drawElements = (els, graph, svgNode) => { + Object.keys(els).forEach((elName) => { + let el = els[elName]; + const id = elementString(elName); + const groupNode = svgNode.append("g").attr("id", id); + const textId = "element-" + id; + const rectNode = newRectNode(groupNode, textId); + let titleNodeInfo = newTitleNode(groupNode, textId + "_title", [`<<Element>>`, `${elName}`]); + newBodyNode( + groupNode, + textId + "_body", + [`Type: ${el.type || "Not Specified"}`, `Doc Ref: ${el.docRef || "None"}`], + titleNodeInfo.y + ); + const rectBBox = rectNode.node().getBBox(); + graph.setNode(id, { + width: rectBBox.width, + height: rectBBox.height, + shape: "rect", + id + }); + }); +}; +const addRelationships = (relationships, g) => { + relationships.forEach(function(r) { + let src = elementString(r.src); + let dst = elementString(r.dst); + g.setEdge(src, dst, { relationship: r }); + }); + return relationships; +}; +const adjustEntities = function(svgNode, graph) { + graph.nodes().forEach(function(v) { + if (v !== void 0 && graph.node(v) !== void 0) { + svgNode.select("#" + v); + svgNode.select("#" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )" + ); + } + }); + return; +}; +const elementString = (str) => { + return str.replace(/\s/g, "").replace(/\./g, "_"); +}; +const draw = (text, id, _version, diagObj) => { + conf = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().requirement; + const securityLevel = conf.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); + const svg = root.select(`[id='${id}']`); + markers.insertLineEndings(svg, conf); + const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ + multigraph: false, + compound: false, + directed: true + }).setGraph({ + rankdir: conf.layoutDirection, + marginx: 20, + marginy: 20, + nodesep: 100, + edgesep: 100, + ranksep: 100 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let requirements2 = diagObj.db.getRequirements(); + let elements2 = diagObj.db.getElements(); + let relationships = diagObj.db.getRelationships(); + drawReqs(requirements2, g, svg); + drawElements(elements2, g, svg); + addRelationships(relationships, g); + (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__/* .layout */ .Zp)(g); + adjustEntities(svg, g); + relationships.forEach(function(rel) { + drawRelationshipFromLayout(svg, rel, g, id, diagObj); + }); + const padding = conf.rect_padding; + const svgBounds = svg.node().getBBox(); + const width = svgBounds.width + padding * 2; + const height = svgBounds.height + padding * 2; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.i)(svg, height, width, conf.useMaxWidth); + svg.attr("viewBox", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`); +}; +const renderer = { + draw +}; +const diagram = { + parser: parser$1, + db, + renderer, + styles +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/317.bfe1114e.js b/assets/js/317.bfe1114e.js new file mode 100644 index 00000000..574d2f84 --- /dev/null +++ b/assets/js/317.bfe1114e.js @@ -0,0 +1,26888 @@ +"use strict"; +exports.id = 317; +exports.ids = [317]; +exports.modules = { + +/***/ 646: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ H: () => (/* binding */ addHtmlLabel) +/* harmony export */ }); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2933); + + + + +function addHtmlLabel(root, node) { + var fo = root.append('foreignObject').attr('width', '100000'); + + var div = fo.append('xhtml:div'); + div.attr('xmlns', 'http://www.w3.org/1999/xhtml'); + + var label = node.label; + switch (typeof label) { + case 'function': + div.insert(label); + break; + case 'object': + // Currently we assume this is a DOM object. + div.insert(function () { + return label; + }); + break; + default: + div.html(label); + } + + _util_js__WEBPACK_IMPORTED_MODULE_0__/* .applyStyle */ .AV(div, node.labelStyle); + div.style('display', 'inline-block'); + // Fix for firefox + div.style('white-space', 'nowrap'); + + var client = div.node().getBoundingClientRect(); + fo.attr('width', client.width).attr('height', client.height); + + return fo; +} + + +/***/ }), + +/***/ 2933: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AV: () => (/* binding */ applyStyle), +/* harmony export */ De: () => (/* binding */ isSubgraph), +/* harmony export */ c$: () => (/* binding */ applyTransition), +/* harmony export */ gh: () => (/* binding */ edgeToId), +/* harmony export */ nh: () => (/* binding */ applyClass) +/* harmony export */ }); +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4963); +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9610); + + +// Public utility functions + + +/* + * Returns true if the specified node in the graph is a subgraph node. A + * subgraph node is one that contains other nodes. + */ +function isSubgraph(g, v) { + return !!g.children(v).length; +} + +function edgeToId(e) { + return escapeId(e.v) + ':' + escapeId(e.w) + ':' + escapeId(e.name); +} + +var ID_DELIM = /:/g; +function escapeId(str) { + return str ? String(str).replace(ID_DELIM, '\\:') : ''; +} + +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr('style', styleFn); + } +} + +function applyClass(dom, classFn, otherClasses) { + if (classFn) { + dom.attr('class', classFn).attr('class', otherClasses + ' ' + dom.attr('class')); + } +} + +function applyTransition(selection, g) { + var graph = g.graph(); + + if (lodash_es__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A(graph)) { + var transition = graph.transition; + if (lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(transition)) { + return transition(selection); + } + } + + return selection; +} + + +/***/ }), + +/***/ 1176: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + Zp: () => (/* reexport */ layout) +}); + +// UNUSED EXPORTS: acyclic, normalize, rank + +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js +var uniqueId = __webpack_require__(5664); +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/map.js +var map = __webpack_require__(4722); +// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules +var range = __webpack_require__(1395); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js +var graphlib = __webpack_require__(697); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js +/* + * Simple doubly linked list implementation derived from Cormen, et al., + * "Introduction to Algorithms". + */ + + + +class List { + constructor() { + var sentinel = {}; + sentinel._next = sentinel._prev = sentinel; + this._sentinel = sentinel; + } + dequeue() { + var sentinel = this._sentinel; + var entry = sentinel._prev; + if (entry !== sentinel) { + unlink(entry); + return entry; + } + } + enqueue(entry) { + var sentinel = this._sentinel; + if (entry._prev && entry._next) { + unlink(entry); + } + entry._next = sentinel._next; + sentinel._next._prev = entry; + sentinel._next = entry; + entry._prev = sentinel; + } + toString() { + var strs = []; + var sentinel = this._sentinel; + var curr = sentinel._prev; + while (curr !== sentinel) { + strs.push(JSON.stringify(curr, filterOutLinks)); + curr = curr._prev; + } + return '[' + strs.join(', ') + ']'; + } +} + +function unlink(entry) { + entry._prev._next = entry._next; + entry._next._prev = entry._prev; + delete entry._next; + delete entry._prev; +} + +function filterOutLinks(k, v) { + if (k !== '_next' && k !== '_prev') { + return v; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js + + + + +/* + * A greedy heuristic for finding a feedback arc set for a graph. A feedback + * arc set is a set of edges that can be removed to make a graph acyclic. + * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and + * effective heuristic for the feedback arc set problem." This implementation + * adjusts that from the paper to allow for weighted edges. + */ + + +var DEFAULT_WEIGHT_FN = constant/* default */.A(1); + +function greedyFAS(g, weightFn) { + if (g.nodeCount() <= 1) { + return []; + } + var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); + var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); + + // Expand multi-edges + return flatten/* default */.A( + map/* default */.A(results, function (e) { + return g.outEdges(e.v, e.w); + }) + ); +} + +function doGreedyFAS(g, buckets, zeroIdx) { + var results = []; + var sources = buckets[buckets.length - 1]; + var sinks = buckets[0]; + + var entry; + while (g.nodeCount()) { + while ((entry = sinks.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + while ((entry = sources.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + if (g.nodeCount()) { + for (var i = buckets.length - 2; i > 0; --i) { + entry = buckets[i].dequeue(); + if (entry) { + results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); + break; + } + } + } + } + + return results; +} + +function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { + var results = collectPredecessors ? [] : undefined; + + forEach/* default */.A(g.inEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var uEntry = g.node(edge.v); + + if (collectPredecessors) { + results.push({ v: edge.v, w: edge.w }); + } + + uEntry.out -= weight; + assignBucket(buckets, zeroIdx, uEntry); + }); + + forEach/* default */.A(g.outEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var w = edge.w; + var wEntry = g.node(w); + wEntry['in'] -= weight; + assignBucket(buckets, zeroIdx, wEntry); + }); + + g.removeNode(entry.v); + + return results; +} + +function buildState(g, weightFn) { + var fasGraph = new graphlib/* Graph */.T(); + var maxIn = 0; + var maxOut = 0; + + forEach/* default */.A(g.nodes(), function (v) { + fasGraph.setNode(v, { v: v, in: 0, out: 0 }); + }); + + // Aggregate weights on nodes, but also sum the weights across multi-edges + // into a single edge for the fasGraph. + forEach/* default */.A(g.edges(), function (e) { + var prevWeight = fasGraph.edge(e.v, e.w) || 0; + var weight = weightFn(e); + var edgeWeight = prevWeight + weight; + fasGraph.setEdge(e.v, e.w, edgeWeight); + maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); + maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); + }); + + var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { + return new List(); + }); + var zeroIdx = maxIn + 1; + + forEach/* default */.A(fasGraph.nodes(), function (v) { + assignBucket(buckets, zeroIdx, fasGraph.node(v)); + }); + + return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; +} + +function assignBucket(buckets, zeroIdx, entry) { + if (!entry.out) { + buckets[0].enqueue(entry); + } else if (!entry['in']) { + buckets[buckets.length - 1].enqueue(entry); + } else { + buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js + + + + + +function run(g) { + var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); + forEach/* default */.A(fas, function (e) { + var label = g.edge(e); + g.removeEdge(e); + label.forwardName = e.name; + label.reversed = true; + g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); + }); + + function weightFn(g) { + return function (e) { + return g.edge(e).weight; + }; + } +} + +function dfsFAS(g) { + var fas = []; + var stack = {}; + var visited = {}; + + function dfs(v) { + if (has/* default */.A(visited, v)) { + return; + } + visited[v] = true; + stack[v] = true; + forEach/* default */.A(g.outEdges(v), function (e) { + if (has/* default */.A(stack, e.w)) { + fas.push(e); + } else { + dfs(e.w); + } + }); + delete stack[v]; + } + + forEach/* default */.A(g.nodes(), dfs); + return fas; +} + +function undo(g) { + forEach/* default */.A(g.edges(), function (e) { + var label = g.edge(e); + if (label.reversed) { + g.removeEdge(e); + + var forwardName = label.forwardName; + delete label.reversed; + delete label.forwardName; + g.setEdge(e.w, e.v, label, forwardName); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules +var merge = __webpack_require__(8879); +// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules +var pick = __webpack_require__(1942); +// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js +var defaults = __webpack_require__(3068); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js + + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !(0,isSymbol/* default */.A)(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +/* harmony default export */ const _baseExtremum = (baseExtremum); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +/* harmony default export */ const _baseGt = (baseGt); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js + + + + +/** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ +function max(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseGt) + : undefined; +} + +/* harmony default export */ const lodash_es_max = (max); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +/* harmony default export */ const lodash_es_last = (last); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js +var _baseAssignValue = __webpack_require__(2528); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js + + + + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); + + (0,_baseForOwn/* default */.A)(object, function(value, key, object) { + (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ const lodash_es_mapValues = (mapValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +/* harmony default export */ const _baseLt = (baseLt); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js + + + + +/** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ +function min(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_min = (min); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js +var _root = __webpack_require__(1917); +;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js + + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return _root/* default */.A.Date.now(); +}; + +/* harmony default export */ const lodash_es_now = (now); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js + + + + + +/* + * Adds a dummy node to the graph and return v. + */ +function addDummyNode(g, type, attrs, name) { + var v; + do { + v = uniqueId/* default */.A(name); + } while (g.hasNode(v)); + + attrs.dummy = type; + g.setNode(v, attrs); + return v; +} + +/* + * Returns a new graph with only simple edges. Handles aggregation of data + * associated with multi-edges. + */ +function simplify(g) { + var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + simplified.setNode(v, g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; + var label = g.edge(e); + simplified.setEdge(e.v, e.w, { + weight: simpleLabel.weight + label.weight, + minlen: Math.max(simpleLabel.minlen, label.minlen), + }); + }); + return simplified; +} + +function asNonCompoundGraph(g) { + var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + if (!g.children(v).length) { + simplified.setNode(v, g.node(v)); + } + }); + forEach/* default */.A(g.edges(), function (e) { + simplified.setEdge(e, g.edge(e)); + }); + return simplified; +} + +function successorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var sucs = {}; + _.forEach(g.outEdges(v), function (e) { + sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; + }); + return sucs; + }); + return _.zipObject(g.nodes(), weightMap); +} + +function predecessorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var preds = {}; + _.forEach(g.inEdges(v), function (e) { + preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; + }); + return preds; + }); + return _.zipObject(g.nodes(), weightMap); +} + +/* + * Finds where a line starting at point ({x, y}) would intersect a rectangle + * ({x, y, width, height}) if it were pointing at the rectangle's center. + */ +function intersectRect(rect, point) { + var x = rect.x; + var y = rect.y; + + // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes + var dx = point.x - x; + var dy = point.y - y; + var w = rect.width / 2; + var h = rect.height / 2; + + if (!dx && !dy) { + throw new Error('Not possible to find intersection inside of the rectangle'); + } + + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } + sx = (h * dx) / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } + sx = w; + sy = (w * dy) / dx; + } + + return { x: x + sx, y: y + sy }; +} + +/* + * Given a DAG with each node assigned "rank" and "order" properties, this + * function will produce a matrix with the ids of each node. + */ +function buildLayerMatrix(g) { + var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { + return []; + }); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + var rank = node.rank; + if (!isUndefined/* default */.A(rank)) { + layering[rank][node.order] = v; + } + }); + return layering; +} + +/* + * Adjusts the ranks for all nodes in the graph such that all nodes v have + * rank(v) >= 0 and at least one node w has rank(w) = 0. + */ +function normalizeRanks(g) { + var min = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (has/* default */.A(node, 'rank')) { + node.rank -= min; + } + }); +} + +function removeEmptyRanks(g) { + // Ranks may not start at 0, so we need to offset them + var offset = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + + var layers = []; + forEach/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank - offset; + if (!layers[rank]) { + layers[rank] = []; + } + layers[rank].push(v); + }); + + var delta = 0; + var nodeRankFactor = g.graph().nodeRankFactor; + forEach/* default */.A(layers, function (vs, i) { + if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { + --delta; + } else if (delta) { + forEach/* default */.A(vs, function (v) { + g.node(v).rank += delta; + }); + } + }); +} + +function addBorderNode(g, prefix, rank, order) { + var node = { + width: 0, + height: 0, + }; + if (arguments.length >= 4) { + node.rank = rank; + node.order = order; + } + return addDummyNode(g, 'border', node, prefix); +} + +function util_maxRank(g) { + return lodash_es_max( + map/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank; + if (!isUndefined/* default */.A(rank)) { + return rank; + } + }) + ); +} + +/* + * Partition a collection into two groups: `lhs` and `rhs`. If the supplied + * function returns true for an entry it goes into `lhs`. Otherwise it goes + * into `rhs. + */ +function partition(collection, fn) { + var result = { lhs: [], rhs: [] }; + forEach/* default */.A(collection, function (value) { + if (fn(value)) { + result.lhs.push(value); + } else { + result.rhs.push(value); + } + }); + return result; +} + +/* + * Returns a new function that wraps `fn` with a timer. The wrapper logs the + * time it takes to execute the function. + */ +function util_time(name, fn) { + var start = lodash_es_now(); + try { + return fn(); + } finally { + console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); + } +} + +function notime(name, fn) { + return fn(); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js + + + + + +function addBorderSegments(g) { + function dfs(v) { + var children = g.children(v); + var node = g.node(v); + if (children.length) { + forEach/* default */.A(children, dfs); + } + + if (has/* default */.A(node, 'minRank')) { + node.borderLeft = []; + node.borderRight = []; + for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { + add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); + add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); + } + } + } + + forEach/* default */.A(g.children(), dfs); +} + +function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { + var label = { width: 0, height: 0, rank: rank, borderType: prop }; + var prev = sgNode[prop][rank - 1]; + var curr = addDummyNode(g, 'border', label, prefix); + sgNode[prop][rank] = curr; + g.setParent(curr, sg); + if (prev) { + g.setEdge(prev, curr, { weight: 1 }); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js + + + + +function adjust(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'lr' || rankDir === 'rl') { + swapWidthHeight(g); + } +} + +function coordinate_system_undo(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'bt' || rankDir === 'rl') { + reverseY(g); + } + + if (rankDir === 'lr' || rankDir === 'rl') { + swapXY(g); + swapWidthHeight(g); + } +} + +function swapWidthHeight(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapWidthHeightOne(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + swapWidthHeightOne(g.edge(e)); + }); +} + +function swapWidthHeightOne(attrs) { + var w = attrs.width; + attrs.width = attrs.height; + attrs.height = w; +} + +function reverseY(g) { + forEach/* default */.A(g.nodes(), function (v) { + reverseYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, reverseYOne); + if (has/* default */.A(edge, 'y')) { + reverseYOne(edge); + } + }); +} + +function reverseYOne(attrs) { + attrs.y = -attrs.y; +} + +function swapXY(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapXYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, swapXYOne); + if (has/* default */.A(edge, 'x')) { + swapXYOne(edge); + } + }); +} + +function swapXYOne(attrs) { + var x = attrs.x; + attrs.x = attrs.y; + attrs.y = x; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js + + + + + +/* + * Breaks any long edges in the graph into short segments that span 1 layer + * each. This operation is undoable with the denormalize function. + * + * Pre-conditions: + * + * 1. The input graph is a DAG. + * 2. Each node in the graph has a "rank" property. + * + * Post-condition: + * + * 1. All edges in the graph have a length of 1. + * 2. Dummy nodes are added where edges have been split into segments. + * 3. The graph is augmented with a "dummyChains" attribute which contains + * the first dummy in each chain of dummy nodes produced. + */ +function normalize_run(g) { + g.graph().dummyChains = []; + forEach/* default */.A(g.edges(), function (edge) { + normalizeEdge(g, edge); + }); +} + +function normalizeEdge(g, e) { + var v = e.v; + var vRank = g.node(v).rank; + var w = e.w; + var wRank = g.node(w).rank; + var name = e.name; + var edgeLabel = g.edge(e); + var labelRank = edgeLabel.labelRank; + + if (wRank === vRank + 1) return; + + g.removeEdge(e); + + var dummy, attrs, i; + for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { + edgeLabel.points = []; + attrs = { + width: 0, + height: 0, + edgeLabel: edgeLabel, + edgeObj: e, + rank: vRank, + }; + dummy = addDummyNode(g, 'edge', attrs, '_d'); + if (vRank === labelRank) { + attrs.width = edgeLabel.width; + attrs.height = edgeLabel.height; + // @ts-expect-error + attrs.dummy = 'edge-label'; + // @ts-expect-error + attrs.labelpos = edgeLabel.labelpos; + } + g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); + if (i === 0) { + g.graph().dummyChains.push(dummy); + } + v = dummy; + } + + g.setEdge(v, w, { weight: edgeLabel.weight }, name); +} + +function normalize_undo(g) { + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var origLabel = node.edgeLabel; + var w; + g.setEdge(node.edgeObj, origLabel); + while (node.dummy) { + w = g.successors(v)[0]; + g.removeNode(v); + origLabel.points.push({ x: node.x, y: node.y }); + if (node.dummy === 'edge-label') { + origLabel.x = node.x; + origLabel.y = node.y; + origLabel.width = node.width; + origLabel.height = node.height; + } + v = w; + node = g.node(v); + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js + + + + +/** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ +function minBy(array, iteratee) { + return (array && array.length) + ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_minBy = (minBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js + + + + +/* + * Initializes ranks for the input graph using the longest path algorithm. This + * algorithm scales well and is fast in practice, it yields rather poor + * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom + * ranks wide and leaving edges longer than necessary. However, due to its + * speed, this algorithm is good for getting an initial ranking that can be fed + * into other algorithms. + * + * This algorithm does not normalize layers because it will be used by other + * algorithms in most cases. If using this algorithm directly, be sure to + * run normalize at the end. + * + * Pre-conditions: + * + * 1. Input graph is a DAG. + * 2. Input graph node labels can be assigned properties. + * + * Post-conditions: + * + * 1. Each node will be assign an (unnormalized) "rank" property. + */ +function longestPath(g) { + var visited = {}; + + function dfs(v) { + var label = g.node(v); + if (has/* default */.A(visited, v)) { + return label.rank; + } + visited[v] = true; + + var rank = lodash_es_min( + map/* default */.A(g.outEdges(v), function (e) { + return dfs(e.w) - g.edge(e).minlen; + }) + ); + + if ( + rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + rank === undefined || // return value of _.map([]) for Lodash 4 + rank === null + ) { + // return value of _.map([null]) + rank = 0; + } + + return (label.rank = rank); + } + + forEach/* default */.A(g.sources(), dfs); +} + +/* + * Returns the amount of slack for the given edge. The slack is defined as the + * difference between the length of the edge and its minimum length. + */ +function slack(g, e) { + return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js + + + + + + +/* + * Constructs a spanning tree with tight edges and adjusted the input node's + * ranks to achieve this. A tight edge is one that is has a length that matches + * its "minlen" attribute. + * + * The basic structure for this function is derived from Gansner, et al., "A + * Technique for Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a DAG. + * 2. Graph must be connected. + * 3. Graph must have at least one node. + * 5. Graph nodes must have been previously assigned a "rank" property that + * respects the "minlen" property of incident edges. + * 6. Graph edges must have a "minlen" property. + * + * Post-conditions: + * + * - Graph nodes will have their rank adjusted to ensure that all edges are + * tight. + * + * Returns a tree (undirected graph) that is constructed using only "tight" + * edges. + */ +function feasibleTree(g) { + var t = new graphlib/* Graph */.T({ directed: false }); + + // Choose arbitrary node from which to start our tree + var start = g.nodes()[0]; + var size = g.nodeCount(); + t.setNode(start, {}); + + var edge, delta; + while (tightTree(t, g) < size) { + edge = findMinSlackEdge(t, g); + delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); + shiftRanks(t, g, delta); + } + + return t; +} + +/* + * Finds a maximal tree of tight edges and returns the number of nodes in the + * tree. + */ +function tightTree(t, g) { + function dfs(v) { + forEach/* default */.A(g.nodeEdges(v), function (e) { + var edgeV = e.v, + w = v === edgeV ? e.w : edgeV; + if (!t.hasNode(w) && !slack(g, e)) { + t.setNode(w, {}); + t.setEdge(v, w, {}); + dfs(w); + } + }); + } + + forEach/* default */.A(t.nodes(), dfs); + return t.nodeCount(); +} + +/* + * Finds the edge with the smallest slack that is incident on tree and returns + * it. + */ +function findMinSlackEdge(t, g) { + return lodash_es_minBy(g.edges(), function (e) { + if (t.hasNode(e.v) !== t.hasNode(e.w)) { + return slack(g, e); + } + }); +} + +function shiftRanks(t, g, delta) { + forEach/* default */.A(t.nodes(), function (v) { + g.node(v).rank += delta; + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js + + + + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!(0,isArrayLike/* default */.A)(collection)) { + var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); + collection = (0,keys/* default */.A)(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +/* harmony default export */ const _createFind = (createFind); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js + + +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = (0,toFinite/* default */.A)(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +/* harmony default export */ const lodash_es_toInteger = (toInteger); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); +} + +/* harmony default export */ const lodash_es_findIndex = (findIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js + + + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = _createFind(lodash_es_findIndex); + +/* harmony default export */ const lodash_es_find = (find); + +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js + + + + + +var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function dijkstra_dijkstra(g, source, weightFn, edgeFn) { + return runDijkstra( + g, + String(source), + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runDijkstra(g, source, weightFn, edgeFn) { + var results = {}; + var pq = new PriorityQueue(); + var v, vEntry; + + var updateNeighbors = function (edge) { + var w = edge.v !== v ? edge.v : edge.w; + var wEntry = results[w]; + var weight = weightFn(edge); + var distance = vEntry.distance + weight; + + if (weight < 0) { + throw new Error( + 'dijkstra does not allow negative edge weights. ' + + 'Bad edge: ' + + edge + + ' Weight: ' + + weight + ); + } + + if (distance < wEntry.distance) { + wEntry.distance = distance; + wEntry.predecessor = v; + pq.decrease(w, distance); + } + }; + + g.nodes().forEach(function (v) { + var distance = v === source ? 0 : Number.POSITIVE_INFINITY; + results[v] = { distance: distance }; + pq.add(v, distance); + }); + + while (pq.size() > 0) { + v = pq.removeMin(); + vEntry = results[v]; + if (vEntry.distance === Number.POSITIVE_INFINITY) { + break; + } + + edgeFn(v).forEach(updateNeighbors); + } + + return results; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js + + + + + +function dijkstraAll(g, weightFunc, edgeFunc) { + return _.transform( + g.nodes(), + function (acc, v) { + acc[v] = dijkstra(g, v, weightFunc, edgeFunc); + }, + {} + ); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js + + + + +var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function floydWarshall(g, weightFn, edgeFn) { + return runFloydWarshall( + g, + weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runFloydWarshall(g, weightFn, edgeFn) { + var results = {}; + var nodes = g.nodes(); + + nodes.forEach(function (v) { + results[v] = {}; + results[v][v] = { distance: 0 }; + nodes.forEach(function (w) { + if (v !== w) { + results[v][w] = { distance: Number.POSITIVE_INFINITY }; + } + }); + edgeFn(v).forEach(function (edge) { + var w = edge.v === v ? edge.w : edge.v; + var d = weightFn(edge); + results[v][w] = { distance: d, predecessor: v }; + }); + }); + + nodes.forEach(function (k) { + var rowK = results[k]; + nodes.forEach(function (i) { + var rowI = results[i]; + nodes.forEach(function (j) { + var ik = rowI[k]; + var kj = rowK[j]; + var ij = rowI[j]; + var altDistance = ik.distance + kj.distance; + if (altDistance < ij.distance) { + ij.distance = altDistance; + ij.predecessor = kj.predecessor; + } + }); + }); + }); + + return results; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules +var _baseKeys = __webpack_require__(1852); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules +var _baseGetTag = __webpack_require__(8496); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js + + + + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); +} + +/* harmony default export */ const lodash_es_isString = (isString); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js + + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = (0,_baseProperty/* default */.A)('length'); + +/* harmony default export */ const _asciiSize = (asciiSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/* harmony default export */ const _hasUnicode = (hasUnicode); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js +/** Used to compose unicode character classes. */ +var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', + _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', + _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', + _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', + _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, + _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', + rsCombo = '[' + _unicodeSize_rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + _unicodeSize_rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', + rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +/* harmony default export */ const _unicodeSize = (unicodeSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js + + + + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return _hasUnicode(string) + ? _unicodeSize(string) + : _asciiSize(string); +} + +/* harmony default export */ const _stringSize = (stringSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + if (collection == null) { + return 0; + } + if ((0,isArrayLike/* default */.A)(collection)) { + return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; + } + var tag = (0,_getTag/* default */.A)(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return (0,_baseKeys/* default */.A)(collection).length; +} + +/* harmony default export */ const lodash_es_size = (size); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js + + + + +topsort_topsort.CycleException = topsort_CycleException; + +function topsort_topsort(g) { + var visited = {}; + var stack = {}; + var results = []; + + function visit(node) { + if (has/* default */.A(stack, node)) { + throw new topsort_CycleException(); + } + + if (!has/* default */.A(visited, node)) { + stack[node] = true; + visited[node] = true; + forEach/* default */.A(g.predecessors(node), visit); + delete stack[node]; + results.push(node); + } + } + + forEach/* default */.A(g.sinks(), visit); + + if (lodash_es_size(visited) !== g.nodeCount()) { + throw new topsort_CycleException(); + } + + return results; +} + +function topsort_CycleException() {} +topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js + + + + +function isAcyclic(g) { + try { + topsort(g); + } catch (e) { + if (e instanceof CycleException) { + return false; + } + throw e; + } + return true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js + + + + +/* + * A helper that preforms a pre- or post-order traversal on the input graph + * and returns the nodes in the order they were visited. If the graph is + * undirected then this algorithm will navigate using neighbors. If the graph + * is directed then this algorithm will navigate using successors. + * + * Order must be one of "pre" or "post". + */ +function dfs(g, vs, order) { + if (!isArray/* default */.A(vs)) { + vs = [vs]; + } + + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); + + var acc = []; + var visited = {}; + forEach/* default */.A(vs, function (v) { + if (!g.hasNode(v)) { + throw new Error('Graph does not have node: ' + v); + } + + doDfs(g, v, order === 'post', visited, navigation, acc); + }); + return acc; +} + +function doDfs(g, v, postorder, visited, navigation, acc) { + if (!has/* default */.A(visited, v)) { + visited[v] = true; + + if (!postorder) { + acc.push(v); + } + forEach/* default */.A(navigation(v), function (w) { + doDfs(g, w, postorder, visited, navigation, acc); + }); + if (postorder) { + acc.push(v); + } + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js + + + + +function postorder(g, vs) { + return dfs(g, vs, 'post'); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js + + + + +function preorder(g, vs) { + return dfs(g, vs, 'pre'); +} + +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules +var graph = __webpack_require__(3046); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js + + + + + + +function prim(g, weightFunc) { + var result = new Graph(); + var parents = {}; + var pq = new PriorityQueue(); + var v; + + function updateNeighbors(edge) { + var w = edge.v === v ? edge.w : edge.v; + var pri = pq.priority(w); + if (pri !== undefined) { + var edgeWeight = weightFunc(edge); + if (edgeWeight < pri) { + parents[w] = v; + pq.decrease(w, edgeWeight); + } + } + } + + if (g.nodeCount() === 0) { + return result; + } + + _.each(g.nodes(), function (v) { + pq.add(v, Number.POSITIVE_INFINITY); + result.setNode(v); + }); + + // Start from an arbitrary node + pq.decrease(g.nodes()[0], 0); + + var init = false; + while (pq.size() > 0) { + v = pq.removeMin(); + if (_.has(parents, v)) { + result.setEdge(v, parents[v]); + } else if (init) { + throw new Error('Input graph is not connected: ' + g); + } else { + init = true; + } + + g.nodeEdges(v).forEach(updateNeighbors); + } + + return result; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js + + + + + + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js + + + + + + + + +// Expose some internals for testing purposes +networkSimplex.initLowLimValues = initLowLimValues; +networkSimplex.initCutValues = initCutValues; +networkSimplex.calcCutValue = calcCutValue; +networkSimplex.leaveEdge = leaveEdge; +networkSimplex.enterEdge = enterEdge; +networkSimplex.exchangeEdges = exchangeEdges; + +/* + * The network simplex algorithm assigns ranks to each node in the input graph + * and iteratively improves the ranking to reduce the length of edges. + * + * Preconditions: + * + * 1. The input graph must be a DAG. + * 2. All nodes in the graph must have an object value. + * 3. All edges in the graph must have "minlen" and "weight" attributes. + * + * Postconditions: + * + * 1. All nodes in the graph will have an assigned "rank" attribute that has + * been optimized by the network simplex algorithm. Ranks start at 0. + * + * + * A rough sketch of the algorithm is as follows: + * + * 1. Assign initial ranks to each node. We use the longest path algorithm, + * which assigns ranks to the lowest position possible. In general this + * leads to very wide bottom ranks and unnecessarily long edges. + * 2. Construct a feasible tight tree. A tight tree is one such that all + * edges in the tree have no slack (difference between length of edge + * and minlen for the edge). This by itself greatly improves the assigned + * rankings by shorting edges. + * 3. Iteratively find edges that have negative cut values. Generally a + * negative cut value indicates that the edge could be removed and a new + * tree edge could be added to produce a more compact graph. + * + * Much of the algorithms here are derived from Gansner, et al., "A Technique + * for Drawing Directed Graphs." The structure of the file roughly follows the + * structure of the overall algorithm. + */ +function networkSimplex(g) { + g = simplify(g); + longestPath(g); + var t = feasibleTree(g); + initLowLimValues(t); + initCutValues(t, g); + + var e, f; + while ((e = leaveEdge(t))) { + f = enterEdge(t, g, e); + exchangeEdges(t, g, e, f); + } +} + +/* + * Initializes cut values for all edges in the tree. + */ +function initCutValues(t, g) { + var vs = postorder(t, t.nodes()); + vs = vs.slice(0, vs.length - 1); + forEach/* default */.A(vs, function (v) { + assignCutValue(t, g, v); + }); +} + +function assignCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + t.edge(child, parent).cutvalue = calcCutValue(t, g, child); +} + +/* + * Given the tight tree, its graph, and a child in the graph calculate and + * return the cut value for the edge between the child and its parent. + */ +function calcCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + // True if the child is on the tail end of the edge in the directed graph + var childIsTail = true; + // The graph's view of the tree edge we're inspecting + var graphEdge = g.edge(child, parent); + // The accumulated cut value for the edge between this node and its parent + var cutValue = 0; + + if (!graphEdge) { + childIsTail = false; + graphEdge = g.edge(parent, child); + } + + cutValue = graphEdge.weight; + + forEach/* default */.A(g.nodeEdges(child), function (e) { + var isOutEdge = e.v === child, + other = isOutEdge ? e.w : e.v; + + if (other !== parent) { + var pointsToHead = isOutEdge === childIsTail, + otherWeight = g.edge(e).weight; + + cutValue += pointsToHead ? otherWeight : -otherWeight; + if (isTreeEdge(t, child, other)) { + var otherCutValue = t.edge(child, other).cutvalue; + cutValue += pointsToHead ? -otherCutValue : otherCutValue; + } + } + }); + + return cutValue; +} + +function initLowLimValues(tree, root) { + if (arguments.length < 2) { + root = tree.nodes()[0]; + } + dfsAssignLowLim(tree, {}, 1, root); +} + +function dfsAssignLowLim(tree, visited, nextLim, v, parent) { + var low = nextLim; + var label = tree.node(v); + + visited[v] = true; + forEach/* default */.A(tree.neighbors(v), function (w) { + if (!has/* default */.A(visited, w)) { + nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); + } + }); + + label.low = low; + label.lim = nextLim++; + if (parent) { + label.parent = parent; + } else { + // TODO should be able to remove this when we incrementally update low lim + delete label.parent; + } + + return nextLim; +} + +function leaveEdge(tree) { + return lodash_es_find(tree.edges(), function (e) { + return tree.edge(e).cutvalue < 0; + }); +} + +function enterEdge(t, g, edge) { + var v = edge.v; + var w = edge.w; + + // For the rest of this function we assume that v is the tail and w is the + // head, so if we don't have this edge in the graph we should flip it to + // match the correct orientation. + if (!g.hasEdge(v, w)) { + v = edge.w; + w = edge.v; + } + + var vLabel = t.node(v); + var wLabel = t.node(w); + var tailLabel = vLabel; + var flip = false; + + // If the root is in the tail of the edge then we need to flip the logic that + // checks for the head and tail nodes in the candidates function below. + if (vLabel.lim > wLabel.lim) { + tailLabel = wLabel; + flip = true; + } + + var candidates = filter/* default */.A(g.edges(), function (edge) { + return ( + flip === isDescendant(t, t.node(edge.v), tailLabel) && + flip !== isDescendant(t, t.node(edge.w), tailLabel) + ); + }); + + return lodash_es_minBy(candidates, function (edge) { + return slack(g, edge); + }); +} + +function exchangeEdges(t, g, e, f) { + var v = e.v; + var w = e.w; + t.removeEdge(v, w); + t.setEdge(f.v, f.w, {}); + initLowLimValues(t); + initCutValues(t, g); + updateRanks(t, g); +} + +function updateRanks(t, g) { + var root = lodash_es_find(t.nodes(), function (v) { + return !g.node(v).parent; + }); + var vs = preorder(t, root); + vs = vs.slice(1); + forEach/* default */.A(vs, function (v) { + var parent = t.node(v).parent, + edge = g.edge(v, parent), + flipped = false; + + if (!edge) { + edge = g.edge(parent, v); + flipped = true; + } + + g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); + }); +} + +/* + * Returns true if the edge is in the tree. + */ +function isTreeEdge(tree, u, v) { + return tree.hasEdge(u, v); +} + +/* + * Returns true if the specified node is descendant of the root node per the + * assigned low and lim attributes in the tree. + */ +function isDescendant(tree, vLabel, rootLabel) { + return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js + + + + + + +/* + * Assigns a rank to each node in the input graph that respects the "minlen" + * constraint specified on edges between nodes. + * + * This basic structure is derived from Gansner, et al., "A Technique for + * Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a connected DAG + * 2. Graph nodes must be objects + * 3. Graph edges must have "weight" and "minlen" attributes + * + * Post-conditions: + * + * 1. Graph nodes will have a "rank" attribute based on the results of the + * algorithm. Ranks can start at any index (including negative), we'll + * fix them up later. + */ +function rank(g) { + switch (g.graph().ranker) { + case 'network-simplex': + networkSimplexRanker(g); + break; + case 'tight-tree': + tightTreeRanker(g); + break; + case 'longest-path': + longestPathRanker(g); + break; + default: + networkSimplexRanker(g); + } +} + +// A fast and simple ranker, but results are far from optimal. +var longestPathRanker = longestPath; + +function tightTreeRanker(g) { + longestPath(g); + feasibleTree(g); +} + +function networkSimplexRanker(g) { + networkSimplex(g); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js + + + + + +/* + * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, + * adds appropriate edges to ensure that all cluster nodes are placed between + * these boundries, and ensures that the graph is connected. + * + * In addition we ensure, through the use of the minlen property, that nodes + * and subgraph border nodes to not end up on the same rank. + * + * Preconditions: + * + * 1. Input graph is a DAG + * 2. Nodes in the input graph has a minlen attribute + * + * Postconditions: + * + * 1. Input graph is connected. + * 2. Dummy nodes are added for the tops and bottoms of subgraphs. + * 3. The minlen attribute for nodes is adjusted to ensure nodes do not + * get placed on the same rank as subgraph border nodes. + * + * The nesting graph idea comes from Sander, "Layout of Compound Directed + * Graphs." + */ +function nesting_graph_run(g) { + var root = addDummyNode(g, 'root', {}, '_root'); + var depths = treeDepths(g); + var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array + var nodeSep = 2 * height + 1; + + g.graph().nestingRoot = root; + + // Multiply minlen by nodeSep to align nodes on non-border ranks. + forEach/* default */.A(g.edges(), function (e) { + g.edge(e).minlen *= nodeSep; + }); + + // Calculate a weight that is sufficient to keep subgraphs vertically compact + var weight = sumWeights(g) + 1; + + // Create border nodes and link them up + forEach/* default */.A(g.children(), function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + }); + + // Save the multiplier for node layers for later removal of empty border + // layers. + g.graph().nodeRankFactor = nodeSep; +} + +function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { + var children = g.children(v); + if (!children.length) { + if (v !== root) { + g.setEdge(root, v, { weight: 0, minlen: nodeSep }); + } + return; + } + + var top = addBorderNode(g, '_bt'); + var bottom = addBorderNode(g, '_bb'); + var label = g.node(v); + + g.setParent(top, v); + label.borderTop = top; + g.setParent(bottom, v); + label.borderBottom = bottom; + + forEach/* default */.A(children, function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + + var childNode = g.node(child); + var childTop = childNode.borderTop ? childNode.borderTop : child; + var childBottom = childNode.borderBottom ? childNode.borderBottom : child; + var thisWeight = childNode.borderTop ? weight : 2 * weight; + var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; + + g.setEdge(top, childTop, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + + g.setEdge(childBottom, bottom, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + }); + + if (!g.parent(v)) { + g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); + } +} + +function treeDepths(g) { + var depths = {}; + function dfs(v, depth) { + var children = g.children(v); + if (children && children.length) { + forEach/* default */.A(children, function (child) { + dfs(child, depth + 1); + }); + } + depths[v] = depth; + } + forEach/* default */.A(g.children(), function (v) { + dfs(v, 1); + }); + return depths; +} + +function sumWeights(g) { + return reduce/* default */.A( + g.edges(), + function (acc, e) { + return acc + g.edge(e).weight; + }, + 0 + ); +} + +function cleanup(g) { + var graphLabel = g.graph(); + g.removeNode(graphLabel.nestingRoot); + delete graphLabel.nestingRoot; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.nestingEdge) { + g.removeEdge(e); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules +var _baseClone = __webpack_require__(1641); +;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js + + + + +function addSubgraphConstraints(g, cg, vs) { + var prev = {}, + rootPrev; + + forEach/* default */.A(vs, function (v) { + var child = g.parent(v), + parent, + prevChild; + while (child) { + parent = g.parent(child); + if (parent) { + prevChild = prev[parent]; + prev[parent] = child; + } else { + prevChild = rootPrev; + rootPrev = child; + } + if (prevChild && prevChild !== child) { + cg.setEdge(prevChild, child); + return; + } + child = parent; + } + }); + + /* + function dfs(v) { + var children = v ? g.children(v) : g.children(); + if (children.length) { + var min = Number.POSITIVE_INFINITY, + subgraphs = []; + _.each(children, function(child) { + var childMin = dfs(child); + if (g.children(child).length) { + subgraphs.push({ v: child, order: childMin }); + } + min = Math.min(min, childMin); + }); + _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { + cg.setEdge(prev.v, curr.v); + return curr; + }); + return min; + } + return g.node(v).order; + } + dfs(undefined); + */ +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js + + + + + +/* + * Constructs a graph that can be used to sort a layer of nodes. The graph will + * contain all base and subgraph nodes from the request layer in their original + * hierarchy and any edges that are incident on these nodes and are of the type + * requested by the "relationship" parameter. + * + * Nodes from the requested rank that do not have parents are assigned a root + * node in the output graph, which is set in the root graph attribute. This + * makes it easy to walk the hierarchy of movable nodes during ordering. + * + * Pre-conditions: + * + * 1. Input graph is a DAG + * 2. Base nodes in the input graph have a rank attribute + * 3. Subgraph nodes in the input graph has minRank and maxRank attributes + * 4. Edges have an assigned weight + * + * Post-conditions: + * + * 1. Output graph has all nodes in the movable rank with preserved + * hierarchy. + * 2. Root nodes in the movable layer are made children of the node + * indicated by the root attribute of the graph. + * 3. Non-movable nodes incident on movable nodes, selected by the + * relationship parameter, are included in the graph (without hierarchy). + * 4. Edges incident on movable nodes, selected by the relationship + * parameter, are added to the output graph. + * 5. The weights for copied edges are aggregated as need, since the output + * graph is not a multi-graph. + */ +function buildLayerGraph(g, rank, relationship) { + var root = createRootNode(g), + result = new graphlib/* Graph */.T({ compound: true }) + .setGraph({ root: root }) + .setDefaultNodeLabel(function (v) { + return g.node(v); + }); + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v), + parent = g.parent(v); + + if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { + result.setNode(v); + result.setParent(v, parent || root); + + // This assumes we have only short edges! + forEach/* default */.A(g[relationship](v), function (e) { + var u = e.v === v ? e.w : e.v, + edge = result.edge(u, v), + weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; + result.setEdge(u, v, { weight: g.edge(e).weight + weight }); + }); + + if (has/* default */.A(node, 'minRank')) { + result.setNode(v, { + borderLeft: node.borderLeft[rank], + borderRight: node.borderRight[rank], + }); + } + } + }); + + return result; +} + +function createRootNode(g) { + var v; + while (g.hasNode((v = uniqueId/* default */.A('_root')))); + return v; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +/* harmony default export */ const _baseZipObject = (baseZipObject); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js + + + +/** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ +function zipObject(props, values) { + return _baseZipObject(props || [], values || [], _assignValue/* default */.A); +} + +/* harmony default export */ const lodash_es_zipObject = (zipObject); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js +var _baseMap = __webpack_require__(2568); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +/* harmony default export */ const _baseSortBy = (baseSortBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js + + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = (0,isSymbol/* default */.A)(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = (0,isSymbol/* default */.A)(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +/* harmony default export */ const _compareAscending = (compareAscending); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js + + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = _compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +/* harmony default export */ const _compareMultiple = (compareMultiple); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js + + + + + + + + + + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + if ((0,isArray/* default */.A)(iteratee)) { + return function(value) { + return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity/* default */.A]; + } + + var index = -1; + iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); + + var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { + var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return _baseSortBy(result, function(object, other) { + return _compareMultiple(object, other, orders); + }); +} + +/* harmony default export */ const _baseOrderBy = (baseOrderBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js + + + + + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ +var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); +}); + +/* harmony default export */ const lodash_es_sortBy = (sortBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js + + + + +/* + * A function that takes a layering (an array of layers, each with an array of + * ordererd nodes) and a graph and returns a weighted crossing count. + * + * Pre-conditions: + * + * 1. Input graph must be simple (not a multigraph), directed, and include + * only simple edges. + * 2. Edges in the input graph must have assigned weights. + * + * Post-conditions: + * + * 1. The graph and layering matrix are left unchanged. + * + * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." + */ +function crossCount(g, layering) { + var cc = 0; + for (var i = 1; i < layering.length; ++i) { + cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); + } + return cc; +} + +function twoLayerCrossCount(g, northLayer, southLayer) { + // Sort all of the edges between the north and south layers by their position + // in the north layer and then the south. Map these edges to the position of + // their head in the south layer. + var southPos = lodash_es_zipObject( + southLayer, + map/* default */.A(southLayer, function (v, i) { + return i; + }) + ); + var southEntries = flatten/* default */.A( + map/* default */.A(northLayer, function (v) { + return lodash_es_sortBy( + map/* default */.A(g.outEdges(v), function (e) { + return { pos: southPos[e.w], weight: g.edge(e).weight }; + }), + 'pos' + ); + }) + ); + + // Build the accumulator tree + var firstIndex = 1; + while (firstIndex < southLayer.length) firstIndex <<= 1; + var treeSize = 2 * firstIndex - 1; + firstIndex -= 1; + var tree = map/* default */.A(new Array(treeSize), function () { + return 0; + }); + + // Calculate the weighted crossings + var cc = 0; + forEach/* default */.A( + // @ts-expect-error + southEntries.forEach(function (entry) { + var index = entry.pos + firstIndex; + tree[index] += entry.weight; + var weightSum = 0; + // @ts-expect-error + while (index > 0) { + // @ts-expect-error + if (index % 2) { + weightSum += tree[index + 1]; + } + // @ts-expect-error + index = (index - 1) >> 1; + tree[index] += entry.weight; + } + cc += entry.weight * weightSum; + }) + ); + + return cc; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js + + + + +/* + * Assigns an initial order value for each node by performing a DFS search + * starting from nodes in the first rank. Nodes are assigned an order in their + * rank as they are first visited. + * + * This approach comes from Gansner, et al., "A Technique for Drawing Directed + * Graphs." + * + * Returns a layering matrix with an array per layer and each layer sorted by + * the order of its nodes. + */ +function initOrder(g) { + var visited = {}; + var simpleNodes = filter/* default */.A(g.nodes(), function (v) { + return !g.children(v).length; + }); + var maxRank = lodash_es_max( + map/* default */.A(simpleNodes, function (v) { + return g.node(v).rank; + }) + ); + var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { + return []; + }); + + function dfs(v) { + if (has/* default */.A(visited, v)) return; + visited[v] = true; + var node = g.node(v); + layers[node.rank].push(v); + forEach/* default */.A(g.successors(v), dfs); + } + + var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { + return g.node(v).rank; + }); + forEach/* default */.A(orderedVs, dfs); + + return layers; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js + + + + +function barycenter(g, movable) { + return map/* default */.A(movable, function (v) { + var inV = g.inEdges(v); + if (!inV.length) { + return { v: v }; + } else { + var result = reduce/* default */.A( + inV, + function (acc, e) { + var edge = g.edge(e), + nodeU = g.node(e.v); + return { + sum: acc.sum + edge.weight * nodeU.order, + weight: acc.weight + edge.weight, + }; + }, + { sum: 0, weight: 0 } + ); + + return { + v: v, + barycenter: result.sum / result.weight, + weight: result.weight, + }; + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js + + + + +/* + * Given a list of entries of the form {v, barycenter, weight} and a + * constraint graph this function will resolve any conflicts between the + * constraint graph and the barycenters for the entries. If the barycenters for + * an entry would violate a constraint in the constraint graph then we coalesce + * the nodes in the conflict into a new node that respects the contraint and + * aggregates barycenter and weight information. + * + * This implementation is based on the description in Forster, "A Fast and + * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it + * differs in some specific details. + * + * Pre-conditions: + * + * 1. Each entry has the form {v, barycenter, weight}, or if the node has + * no barycenter, then {v}. + * + * Returns: + * + * A new list of entries of the form {vs, i, barycenter, weight}. The list + * `vs` may either be a singleton or it may be an aggregation of nodes + * ordered such that they do not violate constraints from the constraint + * graph. The property `i` is the lowest original index of any of the + * elements in `vs`. + */ +function resolveConflicts(entries, cg) { + var mappedEntries = {}; + forEach/* default */.A(entries, function (entry, i) { + var tmp = (mappedEntries[entry.v] = { + indegree: 0, + in: [], + out: [], + vs: [entry.v], + i: i, + }); + if (!isUndefined/* default */.A(entry.barycenter)) { + // @ts-expect-error + tmp.barycenter = entry.barycenter; + // @ts-expect-error + tmp.weight = entry.weight; + } + }); + + forEach/* default */.A(cg.edges(), function (e) { + var entryV = mappedEntries[e.v]; + var entryW = mappedEntries[e.w]; + if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { + entryW.indegree++; + entryV.out.push(mappedEntries[e.w]); + } + }); + + var sourceSet = filter/* default */.A(mappedEntries, function (entry) { + // @ts-expect-error + return !entry.indegree; + }); + + return doResolveConflicts(sourceSet); +} + +function doResolveConflicts(sourceSet) { + var entries = []; + + function handleIn(vEntry) { + return function (uEntry) { + if (uEntry.merged) { + return; + } + if ( + isUndefined/* default */.A(uEntry.barycenter) || + isUndefined/* default */.A(vEntry.barycenter) || + uEntry.barycenter >= vEntry.barycenter + ) { + mergeEntries(vEntry, uEntry); + } + }; + } + + function handleOut(vEntry) { + return function (wEntry) { + wEntry['in'].push(vEntry); + if (--wEntry.indegree === 0) { + sourceSet.push(wEntry); + } + }; + } + + while (sourceSet.length) { + var entry = sourceSet.pop(); + entries.push(entry); + forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); + forEach/* default */.A(entry.out, handleOut(entry)); + } + + return map/* default */.A( + filter/* default */.A(entries, function (entry) { + return !entry.merged; + }), + function (entry) { + return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); + } + ); +} + +function mergeEntries(target, source) { + var sum = 0; + var weight = 0; + + if (target.weight) { + sum += target.barycenter * target.weight; + weight += target.weight; + } + + if (source.weight) { + sum += source.barycenter * source.weight; + weight += source.weight; + } + + target.vs = source.vs.concat(target.vs); + target.barycenter = sum / weight; + target.weight = weight; + target.i = Math.min(source.i, target.i); + source.merged = true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js + + + + + +function sort(entries, biasRight) { + var parts = partition(entries, function (entry) { + return has/* default */.A(entry, 'barycenter'); + }); + var sortable = parts.lhs, + unsortable = lodash_es_sortBy(parts.rhs, function (entry) { + return -entry.i; + }), + vs = [], + sum = 0, + weight = 0, + vsIndex = 0; + + sortable.sort(compareWithBias(!!biasRight)); + + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + + forEach/* default */.A(sortable, function (entry) { + vsIndex += entry.vs.length; + vs.push(entry.vs); + sum += entry.barycenter * entry.weight; + weight += entry.weight; + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + }); + + var result = { vs: flatten/* default */.A(vs) }; + if (weight) { + result.barycenter = sum / weight; + result.weight = weight; + } + return result; +} + +function consumeUnsortable(vs, unsortable, index) { + var last; + while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { + unsortable.pop(); + vs.push(last.vs); + index++; + } + return index; +} + +function compareWithBias(bias) { + return function (entryV, entryW) { + if (entryV.barycenter < entryW.barycenter) { + return -1; + } else if (entryV.barycenter > entryW.barycenter) { + return 1; + } + + return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; + }; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js + + + + + + + +function sortSubgraph(g, v, cg, biasRight) { + var movable = g.children(v); + var node = g.node(v); + var bl = node ? node.borderLeft : undefined; + var br = node ? node.borderRight : undefined; + var subgraphs = {}; + + if (bl) { + movable = filter/* default */.A(movable, function (w) { + return w !== bl && w !== br; + }); + } + + var barycenters = barycenter(g, movable); + forEach/* default */.A(barycenters, function (entry) { + if (g.children(entry.v).length) { + var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); + subgraphs[entry.v] = subgraphResult; + if (has/* default */.A(subgraphResult, 'barycenter')) { + mergeBarycenters(entry, subgraphResult); + } + } + }); + + var entries = resolveConflicts(barycenters, cg); + expandSubgraphs(entries, subgraphs); + + var result = sort(entries, biasRight); + + if (bl) { + result.vs = flatten/* default */.A([bl, result.vs, br]); + if (g.predecessors(bl).length) { + var blPred = g.node(g.predecessors(bl)[0]), + brPred = g.node(g.predecessors(br)[0]); + if (!has/* default */.A(result, 'barycenter')) { + result.barycenter = 0; + result.weight = 0; + } + result.barycenter = + (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); + result.weight += 2; + } + } + + return result; +} + +function expandSubgraphs(entries, subgraphs) { + forEach/* default */.A(entries, function (entry) { + entry.vs = flatten/* default */.A( + entry.vs.map(function (v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }) + ); + }); +} + +function mergeBarycenters(target, other) { + if (!isUndefined/* default */.A(target.barycenter)) { + target.barycenter = + (target.barycenter * target.weight + other.barycenter * other.weight) / + (target.weight + other.weight); + target.weight += other.weight; + } else { + target.barycenter = other.barycenter; + target.weight = other.weight; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js + + + + + + + + + + + +/* + * Applies heuristics to minimize edge crossings in the graph and sets the best + * order solution as an order attribute on each node. + * + * Pre-conditions: + * + * 1. Graph must be DAG + * 2. Graph nodes must be objects with a "rank" attribute + * 3. Graph edges must have the "weight" attribute + * + * Post-conditions: + * + * 1. Graph nodes will have an "order" attribute based on the results of the + * algorithm. + */ +function order(g) { + var maxRank = util_maxRank(g), + downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), + upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); + + var layering = initOrder(g); + assignOrder(g, layering); + + var bestCC = Number.POSITIVE_INFINITY, + best; + + for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { + sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); + + layering = buildLayerMatrix(g); + var cc = crossCount(g, layering); + if (cc < bestCC) { + lastBest = 0; + best = lodash_es_cloneDeep(layering); + bestCC = cc; + } + } + + assignOrder(g, best); +} + +function buildLayerGraphs(g, ranks, relationship) { + return map/* default */.A(ranks, function (rank) { + return buildLayerGraph(g, rank, relationship); + }); +} + +function sweepLayerGraphs(layerGraphs, biasRight) { + var cg = new graphlib/* Graph */.T(); + forEach/* default */.A(layerGraphs, function (lg) { + var root = lg.graph().root; + var sorted = sortSubgraph(lg, root, cg, biasRight); + forEach/* default */.A(sorted.vs, function (v, i) { + lg.node(v).order = i; + }); + addSubgraphConstraints(lg, cg, sorted.vs); + }); +} + +function assignOrder(g, layering) { + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, i) { + g.node(v).order = i; + }); + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js + + + + +function parentDummyChains(g) { + var postorderNums = parent_dummy_chains_postorder(g); + + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var edgeObj = node.edgeObj; + var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); + var path = pathData.path; + var lca = pathData.lca; + var pathIdx = 0; + var pathV = path[pathIdx]; + var ascending = true; + + while (v !== edgeObj.w) { + node = g.node(v); + + if (ascending) { + while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { + pathIdx++; + } + + if (pathV === lca) { + ascending = false; + } + } + + if (!ascending) { + while ( + pathIdx < path.length - 1 && + g.node((pathV = path[pathIdx + 1])).minRank <= node.rank + ) { + pathIdx++; + } + pathV = path[pathIdx]; + } + + g.setParent(v, pathV); + v = g.successors(v)[0]; + } + }); +} + +// Find a path from v to w through the lowest common ancestor (LCA). Return the +// full path and the LCA. +function findPath(g, postorderNums, v, w) { + var vPath = []; + var wPath = []; + var low = Math.min(postorderNums[v].low, postorderNums[w].low); + var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); + var parent; + var lca; + + // Traverse up from v to find the LCA + parent = v; + do { + parent = g.parent(parent); + vPath.push(parent); + } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); + lca = parent; + + // Traverse from w to LCA + parent = w; + while ((parent = g.parent(parent)) !== lca) { + wPath.push(parent); + } + + return { path: vPath.concat(wPath.reverse()), lca: lca }; +} + +function parent_dummy_chains_postorder(g) { + var result = {}; + var lim = 0; + + function dfs(v) { + var low = lim; + forEach/* default */.A(g.children(v), dfs); + result[v] = { low: low, lim: lim++ }; + } + forEach/* default */.A(g.children(), dfs); + + return result; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js +var _castFunction = __webpack_require__(9922); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js + + + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); +} + +/* harmony default export */ const lodash_es_forOwn = (forOwn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules +var _baseFor = __webpack_require__(4574); +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js + + + + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); +} + +/* harmony default export */ const lodash_es_forIn = (forIn); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js + + + + +/* + * This module provides coordinate assignment based on Brandes and Köpf, "Fast + * and Simple Horizontal Coordinate Assignment." + */ + + + +/* + * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" + * property. A type-1 conflict is one where a non-inner segment crosses an + * inner segment. An inner segment is an edge with both incident nodes marked + * with the "dummy" property. + * + * This algorithm scans layer by layer, starting with the second, for type-1 + * conflicts between the current layer and the previous layer. For each layer + * it scans the nodes from left to right until it reaches one that is incident + * on an inner segment. It then scans predecessors to determine if they have + * edges that cross that inner segment. At the end a final scan is done for all + * nodes on the current rank to see if they cross the last visited inner + * segment. + * + * This algorithm (safely) assumes that a dummy node will only be incident on a + * single node in the layers being scanned. + */ +function findType1Conflicts(g, layering) { + var conflicts = {}; + + function visitLayer(prevLayer, layer) { + var // last visited node in the previous layer that is incident on an inner + // segment. + k0 = 0, + // Tracks the last node in this layer scanned for crossings with a type-1 + // segment. + scanPos = 0, + prevLayerLength = prevLayer.length, + lastNode = lodash_es_last(layer); + + forEach/* default */.A(layer, function (v, i) { + var w = findOtherInnerSegmentNode(g, v), + k1 = w ? g.node(w).order : prevLayerLength; + + if (w || v === lastNode) { + forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { + forEach/* default */.A(g.predecessors(scanNode), function (u) { + var uLabel = g.node(u), + uPos = uLabel.order; + if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { + addConflict(conflicts, u, scanNode); + } + }); + }); + // @ts-expect-error + scanPos = i + 1; + k0 = k1; + } + }); + + return layer; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findType2Conflicts(g, layering) { + var conflicts = {}; + + function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { + var v; + forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { + v = south[i]; + if (g.node(v).dummy) { + forEach/* default */.A(g.predecessors(v), function (u) { + var uNode = g.node(u); + if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { + addConflict(conflicts, u, v); + } + }); + } + }); + } + + function visitLayer(north, south) { + var prevNorthPos = -1, + nextNorthPos, + southPos = 0; + + forEach/* default */.A(south, function (v, southLookahead) { + if (g.node(v).dummy === 'border') { + var predecessors = g.predecessors(v); + if (predecessors.length) { + nextNorthPos = g.node(predecessors[0]).order; + scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); + // @ts-expect-error + southPos = southLookahead; + prevNorthPos = nextNorthPos; + } + } + scan(south, southPos, south.length, nextNorthPos, north.length); + }); + + return south; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findOtherInnerSegmentNode(g, v) { + if (g.node(v).dummy) { + return lodash_es_find(g.predecessors(v), function (u) { + return g.node(u).dummy; + }); + } +} + +function addConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + + var conflictsV = conflicts[v]; + if (!conflictsV) { + conflicts[v] = conflictsV = {}; + } + conflictsV[w] = true; +} + +function hasConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + return has/* default */.A(conflicts[v], w); +} + +/* + * Try to align nodes into vertical "blocks" where possible. This algorithm + * attempts to align a node with one of its median neighbors. If the edge + * connecting a neighbor is a type-1 conflict then we ignore that possibility. + * If a previous node has already formed a block with a node after the node + * we're trying to form a block with, we also ignore that possibility - our + * blocks would be split in that scenario. + */ +function verticalAlignment(g, layering, conflicts, neighborFn) { + var root = {}, + align = {}, + pos = {}; + + // We cache the position here based on the layering because the graph and + // layering may be out of sync. The layering matrix is manipulated to + // generate different extreme alignments. + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, order) { + root[v] = v; + align[v] = v; + pos[v] = order; + }); + }); + + forEach/* default */.A(layering, function (layer) { + var prevIdx = -1; + forEach/* default */.A(layer, function (v) { + var ws = neighborFn(v); + if (ws.length) { + ws = lodash_es_sortBy(ws, function (w) { + return pos[w]; + }); + var mp = (ws.length - 1) / 2; + for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { + var w = ws[i]; + if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { + align[w] = v; + align[v] = root[v] = root[w]; + prevIdx = pos[w]; + } + } + } + }); + }); + + return { root: root, align: align }; +} + +function horizontalCompaction(g, layering, root, align, reverseSep) { + // This portion of the algorithm differs from BK due to a number of problems. + // Instead of their algorithm we construct a new block graph and do two + // sweeps. The first sweep places blocks with the smallest possible + // coordinates. The second sweep removes unused space by moving blocks to the + // greatest coordinates without violating separation. + var xs = {}, + blockG = buildBlockGraph(g, layering, root, reverseSep), + borderType = reverseSep ? 'borderLeft' : 'borderRight'; + + function iterate(setXsFunc, nextNodesFunc) { + var stack = blockG.nodes(); + var elem = stack.pop(); + var visited = {}; + while (elem) { + if (visited[elem]) { + setXsFunc(elem); + } else { + visited[elem] = true; + stack.push(elem); + stack = stack.concat(nextNodesFunc(elem)); + } + + elem = stack.pop(); + } + } + + // First pass, assign smallest coordinates + function pass1(elem) { + xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { + return Math.max(acc, xs[e.v] + blockG.edge(e)); + }, 0); + } + + // Second pass, assign greatest coordinates + function pass2(elem) { + var min = blockG.outEdges(elem).reduce(function (acc, e) { + return Math.min(acc, xs[e.w] - blockG.edge(e)); + }, Number.POSITIVE_INFINITY); + + var node = g.node(elem); + if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { + xs[elem] = Math.max(xs[elem], min); + } + } + + iterate(pass1, blockG.predecessors.bind(blockG)); + iterate(pass2, blockG.successors.bind(blockG)); + + // Assign x coordinates to all nodes + forEach/* default */.A(align, function (v) { + xs[v] = xs[root[v]]; + }); + + return xs; +} + +function buildBlockGraph(g, layering, root, reverseSep) { + var blockGraph = new graphlib/* Graph */.T(), + graphLabel = g.graph(), + sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); + + forEach/* default */.A(layering, function (layer) { + var u; + forEach/* default */.A(layer, function (v) { + var vRoot = root[v]; + blockGraph.setNode(vRoot); + if (u) { + var uRoot = root[u], + prevMax = blockGraph.edge(uRoot, vRoot); + blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); + } + u = v; + }); + }); + + return blockGraph; +} + +/* + * Returns the alignment that has the smallest width of the given alignments. + */ +function findSmallestWidthAlignment(g, xss) { + return lodash_es_minBy(values/* default */.A(xss), function (xs) { + var max = Number.NEGATIVE_INFINITY; + var min = Number.POSITIVE_INFINITY; + + lodash_es_forIn(xs, function (x, v) { + var halfWidth = width(g, v) / 2; + + max = Math.max(x + halfWidth, max); + min = Math.min(x - halfWidth, min); + }); + + return max - min; + }); +} + +/* + * Align the coordinates of each of the layout alignments such that + * left-biased alignments have their minimum coordinate at the same point as + * the minimum coordinate of the smallest width alignment and right-biased + * alignments have their maximum coordinate at the same point as the maximum + * coordinate of the smallest width alignment. + */ +function alignCoordinates(xss, alignTo) { + var alignToVals = values/* default */.A(alignTo), + alignToMin = lodash_es_min(alignToVals), + alignToMax = lodash_es_max(alignToVals); + + forEach/* default */.A(['u', 'd'], function (vert) { + forEach/* default */.A(['l', 'r'], function (horiz) { + var alignment = vert + horiz, + xs = xss[alignment], + delta; + if (xs === alignTo) return; + + var xsVals = values/* default */.A(xs); + delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); + + if (delta) { + xss[alignment] = lodash_es_mapValues(xs, function (x) { + return x + delta; + }); + } + }); + }); +} + +function balance(xss, align) { + return lodash_es_mapValues(xss.ul, function (ignore, v) { + if (align) { + return xss[align.toLowerCase()][v]; + } else { + var xs = lodash_es_sortBy(map/* default */.A(xss, v)); + return (xs[1] + xs[2]) / 2; + } + }); +} + +function positionX(g) { + var layering = buildLayerMatrix(g); + var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); + + var xss = {}; + var adjustedLayering; + forEach/* default */.A(['u', 'd'], function (vert) { + adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); + forEach/* default */.A(['l', 'r'], function (horiz) { + if (horiz === 'r') { + adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { + return values/* default */.A(inner).reverse(); + }); + } + + var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); + var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); + var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); + if (horiz === 'r') { + xs = lodash_es_mapValues(xs, function (x) { + return -x; + }); + } + xss[vert + horiz] = xs; + }); + }); + + var smallestWidth = findSmallestWidthAlignment(g, xss); + alignCoordinates(xss, smallestWidth); + return balance(xss, g.graph().align); +} + +function sep(nodeSep, edgeSep, reverseSep) { + return function (g, v, w) { + var vLabel = g.node(v); + var wLabel = g.node(w); + var sum = 0; + var delta; + + sum += vLabel.width / 2; + if (has/* default */.A(vLabel, 'labelpos')) { + switch (vLabel.labelpos.toLowerCase()) { + case 'l': + delta = -vLabel.width / 2; + break; + case 'r': + delta = vLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; + sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; + + sum += wLabel.width / 2; + if (has/* default */.A(wLabel, 'labelpos')) { + switch (wLabel.labelpos.toLowerCase()) { + case 'l': + delta = wLabel.width / 2; + break; + case 'r': + delta = -wLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + return sum; + }; +} + +function width(g, v) { + return g.node(v).width; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js + + + + + + +function position(g) { + g = asNonCompoundGraph(g); + + positionY(g); + lodash_es_forOwn(positionX(g), function (x, v) { + g.node(v).x = x; + }); +} + +function positionY(g) { + var layering = buildLayerMatrix(g); + var rankSep = g.graph().ranksep; + var prevY = 0; + forEach/* default */.A(layering, function (layer) { + var maxHeight = lodash_es_max( + map/* default */.A(layer, function (v) { + return g.node(v).height; + }) + ); + forEach/* default */.A(layer, function (v) { + g.node(v).y = prevY + maxHeight / 2; + }); + prevY += maxHeight + rankSep; + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js + + + + + + + + + + + + + + + +function layout(g, opts) { + var time = opts && opts.debugTiming ? util_time : notime; + time('layout', function () { + var layoutGraph = time(' buildLayoutGraph', function () { + return buildLayoutGraph(g); + }); + time(' runLayout', function () { + runLayout(layoutGraph, time); + }); + time(' updateInputGraph', function () { + updateInputGraph(g, layoutGraph); + }); + }); +} + +function runLayout(g, time) { + time(' makeSpaceForEdgeLabels', function () { + makeSpaceForEdgeLabels(g); + }); + time(' removeSelfEdges', function () { + removeSelfEdges(g); + }); + time(' acyclic', function () { + run(g); + }); + time(' nestingGraph.run', function () { + nesting_graph_run(g); + }); + time(' rank', function () { + rank(asNonCompoundGraph(g)); + }); + time(' injectEdgeLabelProxies', function () { + injectEdgeLabelProxies(g); + }); + time(' removeEmptyRanks', function () { + removeEmptyRanks(g); + }); + time(' nestingGraph.cleanup', function () { + cleanup(g); + }); + time(' normalizeRanks', function () { + normalizeRanks(g); + }); + time(' assignRankMinMax', function () { + assignRankMinMax(g); + }); + time(' removeEdgeLabelProxies', function () { + removeEdgeLabelProxies(g); + }); + time(' normalize.run', function () { + normalize_run(g); + }); + time(' parentDummyChains', function () { + parentDummyChains(g); + }); + time(' addBorderSegments', function () { + addBorderSegments(g); + }); + time(' order', function () { + order(g); + }); + time(' insertSelfEdges', function () { + insertSelfEdges(g); + }); + time(' adjustCoordinateSystem', function () { + adjust(g); + }); + time(' position', function () { + position(g); + }); + time(' positionSelfEdges', function () { + positionSelfEdges(g); + }); + time(' removeBorderNodes', function () { + removeBorderNodes(g); + }); + time(' normalize.undo', function () { + normalize_undo(g); + }); + time(' fixupEdgeLabelCoords', function () { + fixupEdgeLabelCoords(g); + }); + time(' undoCoordinateSystem', function () { + coordinate_system_undo(g); + }); + time(' translateGraph', function () { + translateGraph(g); + }); + time(' assignNodeIntersects', function () { + assignNodeIntersects(g); + }); + time(' reversePoints', function () { + reversePointsForReversedEdges(g); + }); + time(' acyclic.undo', function () { + undo(g); + }); +} + +/* + * Copies final layout information from the layout graph back to the input + * graph. This process only copies whitelisted attributes from the layout graph + * to the input graph, so it serves as a good place to determine what + * attributes can influence layout. + */ +function updateInputGraph(inputGraph, layoutGraph) { + forEach/* default */.A(inputGraph.nodes(), function (v) { + var inputLabel = inputGraph.node(v); + var layoutLabel = layoutGraph.node(v); + + if (inputLabel) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + + if (layoutGraph.children(v).length) { + inputLabel.width = layoutLabel.width; + inputLabel.height = layoutLabel.height; + } + } + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var inputLabel = inputGraph.edge(e); + var layoutLabel = layoutGraph.edge(e); + + inputLabel.points = layoutLabel.points; + if (has/* default */.A(layoutLabel, 'x')) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + } + }); + + inputGraph.graph().width = layoutGraph.graph().width; + inputGraph.graph().height = layoutGraph.graph().height; +} + +var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; +var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; +var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; +var nodeNumAttrs = ['width', 'height']; +var nodeDefaults = { width: 0, height: 0 }; +var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; +var edgeDefaults = { + minlen: 1, + weight: 1, + width: 0, + height: 0, + labeloffset: 10, + labelpos: 'r', +}; +var edgeAttrs = ['labelpos']; + +/* + * Constructs a new graph from the input graph, which can be used for layout. + * This process copies only whitelisted attributes from the input graph to the + * layout graph. Thus this function serves as a good place to determine what + * attributes can influence layout. + */ +function buildLayoutGraph(inputGraph) { + var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); + var graph = canonicalize(inputGraph.graph()); + + g.setGraph( + merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) + ); + + forEach/* default */.A(inputGraph.nodes(), function (v) { + var node = canonicalize(inputGraph.node(v)); + g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); + g.setParent(v, inputGraph.parent(v)); + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var edge = canonicalize(inputGraph.edge(e)); + g.setEdge( + e, + merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) + ); + }); + + return g; +} + +/* + * This idea comes from the Gansner paper: to account for edge labels in our + * layout we split each rank in half by doubling minlen and halving ranksep. + * Then we can place labels at these mid-points between nodes. + * + * We also add some minimal padding to the width to push the label for the edge + * away from the edge itself a bit. + */ +function makeSpaceForEdgeLabels(g) { + var graph = g.graph(); + graph.ranksep /= 2; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + edge.minlen *= 2; + if (edge.labelpos.toLowerCase() !== 'c') { + if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { + edge.width += edge.labeloffset; + } else { + edge.height += edge.labeloffset; + } + } + }); +} + +/* + * Creates temporary dummy nodes that capture the rank in which each edge's + * label is going to, if it has one of non-zero width and height. We do this + * so that we can safely remove empty ranks while preserving balance for the + * label's position. + */ +function injectEdgeLabelProxies(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.width && edge.height) { + var v = g.node(e.v); + var w = g.node(e.w); + var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; + addDummyNode(g, 'edge-proxy', label, '_ep'); + } + }); +} + +function assignRankMinMax(g) { + var maxRank = 0; + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.borderTop) { + node.minRank = g.node(node.borderTop).rank; + node.maxRank = g.node(node.borderBottom).rank; + // @ts-expect-error + maxRank = lodash_es_max(maxRank, node.maxRank); + } + }); + g.graph().maxRank = maxRank; +} + +function removeEdgeLabelProxies(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'edge-proxy') { + g.edge(node.e).labelRank = node.rank; + g.removeNode(v); + } + }); +} + +function translateGraph(g) { + var minX = Number.POSITIVE_INFINITY; + var maxX = 0; + var minY = Number.POSITIVE_INFINITY; + var maxY = 0; + var graphLabel = g.graph(); + var marginX = graphLabel.marginx || 0; + var marginY = graphLabel.marginy || 0; + + function getExtremes(attrs) { + var x = attrs.x; + var y = attrs.y; + var w = attrs.width; + var h = attrs.height; + minX = Math.min(minX, x - w / 2); + maxX = Math.max(maxX, x + w / 2); + minY = Math.min(minY, y - h / 2); + maxY = Math.max(maxY, y + h / 2); + } + + forEach/* default */.A(g.nodes(), function (v) { + getExtremes(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + getExtremes(edge); + } + }); + + minX -= marginX; + minY -= marginY; + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + node.x -= minX; + node.y -= minY; + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, function (p) { + p.x -= minX; + p.y -= minY; + }); + if (has/* default */.A(edge, 'x')) { + edge.x -= minX; + } + if (has/* default */.A(edge, 'y')) { + edge.y -= minY; + } + }); + + graphLabel.width = maxX - minX + marginX; + graphLabel.height = maxY - minY + marginY; +} + +function assignNodeIntersects(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + var nodeV = g.node(e.v); + var nodeW = g.node(e.w); + var p1, p2; + if (!edge.points) { + edge.points = []; + p1 = nodeW; + p2 = nodeV; + } else { + p1 = edge.points[0]; + p2 = edge.points[edge.points.length - 1]; + } + edge.points.unshift(intersectRect(nodeV, p1)); + edge.points.push(intersectRect(nodeW, p2)); + }); +} + +function fixupEdgeLabelCoords(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + if (edge.labelpos === 'l' || edge.labelpos === 'r') { + edge.width -= edge.labeloffset; + } + switch (edge.labelpos) { + case 'l': + edge.x -= edge.width / 2 + edge.labeloffset; + break; + case 'r': + edge.x += edge.width / 2 + edge.labeloffset; + break; + } + } + }); +} + +function reversePointsForReversedEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.reversed) { + edge.points.reverse(); + } + }); +} + +function removeBorderNodes(g) { + forEach/* default */.A(g.nodes(), function (v) { + if (g.children(v).length) { + var node = g.node(v); + var t = g.node(node.borderTop); + var b = g.node(node.borderBottom); + var l = g.node(lodash_es_last(node.borderLeft)); + var r = g.node(lodash_es_last(node.borderRight)); + + node.width = Math.abs(r.x - l.x); + node.height = Math.abs(b.y - t.y); + node.x = l.x + node.width / 2; + node.y = t.y + node.height / 2; + } + }); + + forEach/* default */.A(g.nodes(), function (v) { + if (g.node(v).dummy === 'border') { + g.removeNode(v); + } + }); +} + +function removeSelfEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + if (e.v === e.w) { + var node = g.node(e.v); + if (!node.selfEdges) { + node.selfEdges = []; + } + node.selfEdges.push({ e: e, label: g.edge(e) }); + g.removeEdge(e); + } + }); +} + +function insertSelfEdges(g) { + var layers = buildLayerMatrix(g); + forEach/* default */.A(layers, function (layer) { + var orderShift = 0; + forEach/* default */.A(layer, function (v, i) { + var node = g.node(v); + node.order = i + orderShift; + forEach/* default */.A(node.selfEdges, function (selfEdge) { + addDummyNode( + g, + 'selfedge', + { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node.rank, + order: i + ++orderShift, + e: selfEdge.e, + label: selfEdge.label, + }, + '_se' + ); + }); + delete node.selfEdges; + }); + }); +} + +function positionSelfEdges(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'selfedge') { + var selfNode = g.node(node.e.v); + var x = selfNode.x + selfNode.width / 2; + var y = selfNode.y; + var dx = node.x - x; + var dy = selfNode.height / 2; + g.setEdge(node.e, node.label); + g.removeNode(v); + node.label.points = [ + { x: x + (2 * dx) / 3, y: y - dy }, + { x: x + (5 * dx) / 6, y: y - dy }, + { x: x + dx, y: y }, + { x: x + (5 * dx) / 6, y: y + dy }, + { x: x + (2 * dx) / 3, y: y + dy }, + ]; + node.label.x = node.x; + node.label.y = node.y; + } + }); +} + +function selectNumberAttrs(obj, attrs) { + return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); +} + +function canonicalize(attrs) { + var newAttrs = {}; + forEach/* default */.A(attrs, function (v, k) { + newAttrs[k.toLowerCase()] = v; + }); + return newAttrs; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + + + + + + + + +/***/ }), + +/***/ 3046: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + T: () => (/* binding */ Graph) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js +var isFunction = __webpack_require__(9610); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js +var isEmpty = __webpack_require__(6401); +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/* harmony default export */ const _baseIsNaN = (baseIsNaN); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/* harmony default export */ const _strictIndexOf = (strictIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js + + + + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? _strictIndexOf(array, value, fromIndex) + : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); +} + +/* harmony default export */ const _baseIndexOf = (baseIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js + + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && _baseIndexOf(array, value, 0) > -1; +} + +/* harmony default export */ const _arrayIncludes = (arrayIncludes); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js +var _Set = __webpack_require__(9857); +;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +/* harmony default export */ const lodash_es_noop = (noop); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { + return new _Set/* default */.A(values); +}; + +/* harmony default export */ const _createSet = (createSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js + + + + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = _arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = _arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : _createSet(array); + if (set) { + return (0,_setToArray/* default */.A)(set); + } + isCommon = false; + includes = _cacheHas/* default */.A; + seen = new _SetCache/* default */.A; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/* harmony default export */ const _baseUniq = (baseUniq); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js +var isArrayLikeObject = __webpack_require__(3533); +;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js + + + + + +/** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ +var union = (0,_baseRest/* default */.A)(function(arrays) { + return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); +}); + +/* harmony default export */ const lodash_es_union = (union); + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + + +var DEFAULT_EDGE_NAME = '\x00'; +var GRAPH_NODE = '\x00'; +var EDGE_KEY_DELIM = '\x01'; + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. +class Graph { + constructor(opts = {}) { + this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; + this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; + this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; + + // Label for the graph itself + this._label = undefined; + + // Defaults to be set when creating a new node + this._defaultNodeLabelFn = constant/* default */.A(undefined); + + // Defaults to be set when creating a new edge + this._defaultEdgeLabelFn = constant/* default */.A(undefined); + + // v -> label + this._nodes = {}; + + if (this._isCompound) { + // v -> parent + this._parent = {}; + + // v -> children + this._children = {}; + this._children[GRAPH_NODE] = {}; + } + + // v -> edgeObj + this._in = {}; + + // u -> v -> Number + this._preds = {}; + + // v -> edgeObj + this._out = {}; + + // v -> w -> Number + this._sucs = {}; + + // e -> edgeObj + this._edgeObjs = {}; + + // e -> label + this._edgeLabels = {}; + } + /* === Graph functions ========= */ + isDirected() { + return this._isDirected; + } + isMultigraph() { + return this._isMultigraph; + } + isCompound() { + return this._isCompound; + } + setGraph(label) { + this._label = label; + return this; + } + graph() { + return this._label; + } + /* === Node functions ========== */ + setDefaultNodeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; + } + nodeCount() { + return this._nodeCount; + } + nodes() { + return keys/* default */.A(this._nodes); + } + sources() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._in[v]); + }); + } + sinks() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._out[v]); + }); + } + setNodes(vs, value) { + var args = arguments; + var self = this; + forEach/* default */.A(vs, function (v) { + if (args.length > 1) { + self.setNode(v, value); + } else { + self.setNode(v); + } + }); + return this; + } + setNode(v, value) { + if (has/* default */.A(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; + } + return this; + } + + // @ts-expect-error + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; + } + node(v) { + return this._nodes[v]; + } + hasNode(v) { + return has/* default */.A(this._nodes, v); + } + removeNode(v) { + var self = this; + if (has/* default */.A(this._nodes, v)) { + var removeEdge = function (e) { + self.removeEdge(self._edgeObjs[e]); + }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + forEach/* default */.A(this.children(v), function (child) { + self.setParent(child); + }); + delete this._children[v]; + } + forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; + } + setParent(v, parent) { + if (!this._isCompound) { + throw new Error('Cannot set parent in a non-compound graph'); + } + + if (isUndefined/* default */.A(parent)) { + parent = GRAPH_NODE; + } else { + // Coerce parent to string + parent += ''; + for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); + } + } + + this.setNode(parent); + } + + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; + } + _removeFromParentsChildList(v) { + delete this._children[this._parent[v]][v]; + } + parent(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } + } + children(v) { + if (isUndefined/* default */.A(v)) { + v = GRAPH_NODE; + } + + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return keys/* default */.A(children); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } + } + predecessors(v) { + var predsV = this._preds[v]; + if (predsV) { + return keys/* default */.A(predsV); + } + } + successors(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return keys/* default */.A(sucsV); + } + } + neighbors(v) { + var preds = this.predecessors(v); + if (preds) { + return lodash_es_union(preds, this.successors(v)); + } + } + isLeaf(v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; + } + filterNodes(filter) { + // @ts-expect-error + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound, + }); + + copy.setGraph(this.graph()); + + var self = this; + forEach/* default */.A(this._nodes, function (value, v) { + if (filter(v)) { + copy.setNode(v, value); + } + }); + + forEach/* default */.A(this._edgeObjs, function (e) { + // @ts-expect-error + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self.edge(e)); + } + }); + + var parents = {}; + function findParent(v) { + var parent = self.parent(v); + if (parent === undefined || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); + } + } + + if (this._isCompound) { + forEach/* default */.A(copy.nodes(), function (v) { + copy.setParent(v, findParent(v)); + }); + } + + return copy; + } + /* === Edge functions ========== */ + setDefaultEdgeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; + } + edgeCount() { + return this._edgeCount; + } + edges() { + return values/* default */.A(this._edgeObjs); + } + setPath(vs, value) { + var self = this; + var args = arguments; + reduce/* default */.A(vs, function (v, w) { + if (args.length > 1) { + self.setEdge(v, w, value); + } else { + self.setEdge(v, w); + } + return w; + }); + return this; + } + /* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ + setEdge() { + var v, w, name, value; + var valueSpecified = false; + var arg0 = arguments[0]; + + if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; + } + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; + } + } + + v = '' + v; + w = '' + w; + if (!isUndefined/* default */.A(name)) { + name = '' + name; + } + + var e = edgeArgsToId(this._isDirected, v, w, name); + if (has/* default */.A(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; + } + return this; + } + + if (!isUndefined/* default */.A(name) && !this._isMultigraph) { + throw new Error('Cannot set a named edge when isMultigraph = false'); + } + + // It didn't exist, so we need to create it. + // First ensure the nodes exist. + this.setNode(v); + this.setNode(w); + + // @ts-expect-error + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + // Ensure we add undirected edges in a consistent way. + v = edgeObj.v; + w = edgeObj.w; + + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; + } + edge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return this._edgeLabels[e]; + } + hasEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return has/* default */.A(this._edgeLabels, e); + } + removeEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; + } + inEdges(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = values/* default */.A(inV); + if (!u) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.v === u; + }); + } + } + outEdges(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = values/* default */.A(outV); + if (!w) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.w === w; + }); + } + } + nodeEdges(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } + } +} + +/* Number of nodes in the graph. Should only be changed by the implementation. */ +Graph.prototype._nodeCount = 0; + +/* Number of edges in the graph. Should only be changed by the implementation. */ +Graph.prototype._edgeCount = 0; + +function incrementOrInitEntry(map, k) { + if (map[k]) { + map[k]++; + } else { + map[k] = 1; + } +} + +function decrementOrRemoveEntry(map, k) { + if (!--map[k]) { + delete map[k]; + } +} + +function edgeArgsToId(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); +} + +function edgeArgsToObj(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v: v, w: w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; +} + +function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); +} + + +/***/ }), + +/***/ 697: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) +/* harmony export */ }); +/* unused harmony export version */ +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); +// Includes only the "core" of graphlib + + + +const version = '2.1.9-pre'; + + + + +/***/ }), + +/***/ 4075: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ M: () => (/* binding */ write) +/* harmony export */ }); +/* unused harmony export read */ +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9592); +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53); +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4722); +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); + + + + + +function write(g) { + var json = { + options: { + directed: g.isDirected(), + multigraph: g.isMultigraph(), + compound: g.isCompound(), + }, + nodes: writeNodes(g), + edges: writeEdges(g), + }; + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(g.graph())) { + json.value = lodash_es__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A(g.graph()); + } + return json; +} + +function writeNodes(g) { + return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.nodes(), function (v) { + var nodeValue = g.node(v); + var parent = g.parent(v); + var node = { v: v }; + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(nodeValue)) { + node.value = nodeValue; + } + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(parent)) { + node.parent = parent; + } + return node; + }); +} + +function writeEdges(g) { + return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.edges(), function (e) { + var edgeValue = g.edge(e); + var edge = { v: e.v, w: e.w }; + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(e.name)) { + edge.name = e.name; + } + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(edgeValue)) { + edge.value = edgeValue; + } + return edge; + }); +} + +function read(json) { + var g = new Graph(json.options).setGraph(json.value); + _.each(json.nodes, function (entry) { + g.setNode(entry.v, entry.value); + if (entry.parent) { + g.setParent(entry.v, entry.parent); + } + }); + _.each(json.edges, function (entry) { + g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); + }); + return g; +} + + +/***/ }), + +/***/ 5937: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2453); +/* harmony import */ var _color_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4886); +/* IMPORT */ + + +/* MAIN */ +const channel = (color, channel) => { + return _utils_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.lang.round(_color_index_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.parse(color)[channel]); +}; +/* EXPORT */ +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (channel); + + +/***/ }), + +/***/ 2062: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _SetCache) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules +var _MapCache = __webpack_require__(9471); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/* harmony default export */ const _setCacheAdd = (setCacheAdd); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ const _setCacheHas = (setCacheHas); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new _MapCache/* default */.A; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; +SetCache.prototype.has = _setCacheHas; + +/* harmony default export */ const _SetCache = (SetCache); + + +/***/ }), + +/***/ 2641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); + + +/***/ }), + +/***/ 2634: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); + + +/***/ }), + +/***/ 5572: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); + + +/***/ }), + +/***/ 6912: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); + + +/***/ }), + +/***/ 1641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseClone) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js +var _arrayEach = __webpack_require__(2641); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js +var _copyObject = __webpack_require__(2031); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js + + + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssign = (baseAssign); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js + + + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssignIn = (baseAssignIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js +var _cloneBuffer = __webpack_require__(154); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js +var _copyArray = __webpack_require__(9759); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js +var _getSymbols = __webpack_require__(4792); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js + + + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); +} + +/* harmony default export */ const _copySymbols = (copySymbols); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js +var _getPrototype = __webpack_require__(5647); +// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js +var stubArray = __webpack_require__(3153); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { + var result = []; + while (object) { + (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); + object = (0,_getPrototype/* default */.A)(object); + } + return result; +}; + +/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js + + + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); +} + +/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js +var _baseGetAllKeys = __webpack_require__(3831); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js + + + + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); +} + +/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/* harmony default export */ const _initCloneArray = (initCloneArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js +var _cloneArrayBuffer = __webpack_require__(565); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js + + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/* harmony default export */ const _cloneDataView = (cloneDataView); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/* harmony default export */ const _cloneRegExp = (cloneRegExp); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js + + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/* harmony default export */ const _cloneSymbol = (cloneSymbol); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js +var _cloneTypedArray = __webpack_require__(1801); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js + + + + + + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return (0,_cloneArrayBuffer/* default */.A)(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return _cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return (0,_cloneTypedArray/* default */.A)(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return _cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return _cloneSymbol(object); + } +} + +/* harmony default export */ const _initCloneByTag = (initCloneByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules +var _initCloneObject = __webpack_require__(8598); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js + + + +/** `Object#toString` result references. */ +var _baseIsMap_mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; +} + +/* harmony default export */ const _baseIsMap = (baseIsMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js +var _nodeUtil = __webpack_require__(4841); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js + + + + +/* Node.js helper references. */ +var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; + +/* harmony default export */ const lodash_es_isMap = (isMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js + + + +/** `Object#toString` result references. */ +var _baseIsSet_setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; +} + +/* harmony default export */ const _baseIsSet = (baseIsSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js + + + + +/* Node.js helper references. */ +var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; + +/* harmony default export */ const lodash_es_isSet = (isSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js + + + + + + + + + + + + + + + + + + + + + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + _baseClone_boolTag = '[object Boolean]', + _baseClone_dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + _baseClone_mapTag = '[object Map]', + _baseClone_numberTag = '[object Number]', + objectTag = '[object Object]', + _baseClone_regexpTag = '[object RegExp]', + _baseClone_setTag = '[object Set]', + _baseClone_stringTag = '[object String]', + _baseClone_symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var _baseClone_arrayBufferTag = '[object ArrayBuffer]', + _baseClone_dataViewTag = '[object DataView]', + _baseClone_float32Tag = '[object Float32Array]', + _baseClone_float64Tag = '[object Float64Array]', + _baseClone_int8Tag = '[object Int8Array]', + _baseClone_int16Tag = '[object Int16Array]', + _baseClone_int32Tag = '[object Int32Array]', + _baseClone_uint8Tag = '[object Uint8Array]', + _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', + _baseClone_uint16Tag = '[object Uint16Array]', + _baseClone_uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = +cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = +cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = +cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = +cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = +cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = +cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = +cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = +cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = +cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!(0,isObject/* default */.A)(value)) { + return value; + } + var isArr = (0,isArray/* default */.A)(value); + if (isArr) { + result = _initCloneArray(value); + if (!isDeep) { + return (0,_copyArray/* default */.A)(value, result); + } + } else { + var tag = (0,_getTag/* default */.A)(value), + isFunc = tag == funcTag || tag == genTag; + + if ((0,isBuffer/* default */.A)(value)) { + return (0,_cloneBuffer/* default */.A)(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); + if (!isDeep) { + return isFlat + ? _copySymbolsIn(value, _baseAssignIn(result, value)) + : _copySymbols(value, _baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = _initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new _Stack/* default */.A); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (lodash_es_isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (lodash_es_isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) + : (isFlat ? keysIn/* default */.A : keys/* default */.A); + + var props = isArr ? undefined : keysFunc(value); + (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +/* harmony default export */ const _baseClone = (baseClone); + + +/***/ }), + +/***/ 6240: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseEach) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js + + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!(0,isArrayLike/* default */.A)(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +/* harmony default export */ const _createBaseEach = (createBaseEach); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js + + + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = _createBaseEach(_baseForOwn/* default */.A); + +/* harmony default export */ const _baseEach = (baseEach); + + +/***/ }), + +/***/ 5707: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); + + +/***/ }), + +/***/ 3588: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseFlatten) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules +var isArguments = __webpack_require__(2274); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js + + + + +/** Built-in value references. */ +var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/* harmony default export */ const _isFlattenable = (isFlattenable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js + + + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = _isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + (0,_arrayPush/* default */.A)(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/* harmony default export */ const _baseFlatten = (baseFlatten); + + +/***/ }), + +/***/ 9841: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); + + +/***/ }), + +/***/ 6318: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); + + +/***/ }), + +/***/ 3831: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6912); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); + + +/***/ }), + +/***/ 9574: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseIteratee) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arraySome = (arraySome); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!_arraySome(other, function(othValue, othIndex) { + if (!(0,_cacheHas/* default */.A)(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalArrays = (equalArrays); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js +var _Uint8Array = __webpack_require__(3988); +// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js +var eq = __webpack_require__(6984); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ const _mapToArray = (mapToArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _equalByTag_COMPARE_PARTIAL_FLAG = 1, + _equalByTag_COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return (0,eq/* default */.A)(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = _mapToArray; + + case setTag: + var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; + convert || (convert = _setToArray/* default */.A); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ const _equalByTag = (equalByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js + + +/** Used to compose bitmasks for value comparisons. */ +var _equalObjects_COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, + objProps = (0,_getAllKeys/* default */.A)(object), + objLength = objProps.length, + othProps = (0,_getAllKeys/* default */.A)(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalObjects = (equalObjects); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules +var isTypedArray = __webpack_require__(3858); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var _baseIsEqualDeep_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = (0,isArray/* default */.A)(object), + othIsArr = (0,isArray/* default */.A)(other), + objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), + othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && (0,isBuffer/* default */.A)(object)) { + if (!(0,isBuffer/* default */.A)(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new _Stack/* default */.A); + return (objIsArr || (0,isTypedArray/* default */.A)(object)) + ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new _Stack/* default */.A); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new _Stack/* default */.A); + return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { + return value !== value && other !== other; + } + return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ const _baseIsEqual = (baseIsEqual); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, + _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new _Stack/* default */.A; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ const _baseIsMatch = (baseIsMatch); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !(0,isObject/* default */.A)(value); +} + +/* harmony default export */ const _isStrictComparable = (isStrictComparable); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = (0,keys/* default */.A)(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, _isStrictComparable(value)]; + } + return result; +} + +/* harmony default export */ const _getMatchData = (getMatchData); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = _getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return _matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || _baseIsMatch(object, source, matchData); + }; +} + +/* harmony default export */ const _baseMatches = (baseMatches); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ const lodash_es_get = (get); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, + _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { + return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); + } + return function(object) { + var objValue = lodash_es_get(object, path); + return (objValue === undefined && objValue === srcValue) + ? (0,hasIn/* default */.A)(object, path) + : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return (0,_baseGet/* default */.A)(object, path); + }; +} + +/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); +} + +/* harmony default export */ const lodash_es_property = (property); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity/* default */.A; + } + if (typeof value == 'object') { + return (0,isArray/* default */.A)(value) + ? _baseMatchesProperty(value[0], value[1]) + : _baseMatches(value); + } + return lodash_es_property(value); +} + +/* harmony default export */ const _baseIteratee = (baseIteratee); + + +/***/ }), + +/***/ 2568: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; + + (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); + + +/***/ }), + +/***/ 805: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); + + +/***/ }), + +/***/ 4099: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); + + +/***/ }), + +/***/ 9922: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9008); + + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); + + +/***/ }), + +/***/ 7819: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _castPath) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js +var memoize = __webpack_require__(6632); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = (0,memoize/* default */.A)(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ const _memoizeCapped = (memoizeCapped); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js + + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = _memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ const _stringToPath = (stringToPath); + +// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules +var lodash_es_toString = __webpack_require__(8894); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if ((0,isArray/* default */.A)(value)) { + return value; + } + return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); +} + +/* harmony default export */ const _castPath = (castPath); + + +/***/ }), + +/***/ 9042: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3831); +/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4792); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); + + +/***/ }), + +/***/ 4792: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); +/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3153); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); + + +/***/ }), + +/***/ 5054: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2274); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2049); +/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5353); +/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && + ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); + + +/***/ }), + +/***/ 6586: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1882); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); + + +/***/ }), + +/***/ 9959: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); + + +/***/ }), + +/***/ 3282: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1882); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); + + +/***/ }), + +/***/ 53: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseClone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1641); + + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ +function clone(value) { + return (0,_baseClone_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value, CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone); + + +/***/ }), + +/***/ 3068: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4326); +/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6984); +/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); +/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5615); + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); + + +/***/ }), + +/***/ 1662: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_filter) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js +var _arrayFilter = __webpack_require__(2634); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js + + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + (0,_baseEach/* default */.A)(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +/* harmony default export */ const _baseFilter = (baseFilter); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js + + + + + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ +function filter(collection, predicate) { + var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; + return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); +} + +/* harmony default export */ const lodash_es_filter = (filter); + + +/***/ }), + +/***/ 4098: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3588); + + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); + + +/***/ }), + +/***/ 8058: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2641); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); +/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9922); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); + + +/***/ }), + +/***/ 8585: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_has) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && _baseHas_hasOwnProperty.call(object, key); +} + +/* harmony default export */ const _baseHas = (baseHas); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js + + + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); +} + +/* harmony default export */ const lodash_es_has = (has); + + +/***/ }), + +/***/ 9188: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_hasIn) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ const _baseHasIn = (baseHasIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); +} + +/* harmony default export */ const lodash_es_hasIn = (hasIn); + + +/***/ }), + +/***/ 1882: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8496); +/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3098); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); + + +/***/ }), + +/***/ 9592: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); + + +/***/ }), + +/***/ 2184: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3607); +/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1852); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); + + +/***/ }), + +/***/ 4722: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5572); +/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9574); +/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2568); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); + + +/***/ }), + +/***/ 1942: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_pick) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules +var _castPath = __webpack_require__(7819); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js +var _isIndex = __webpack_require__(5353); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js + + + + + + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!(0,isObject/* default */.A)(object)) { + return object; + } + path = (0,_castPath/* default */.A)(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = (0,_toKey/* default */.A)(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = (0,isObject/* default */.A)(objValue) + ? objValue + : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); + } + } + (0,_assignValue/* default */.A)(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/* harmony default export */ const _baseSet = (baseSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js + + + + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = (0,_baseGet/* default */.A)(object, path); + + if (predicate(value, path)) { + _baseSet(result, (0,_castPath/* default */.A)(path, object), value); + } + } + return result; +} + +/* harmony default export */ const _basePickBy = (basePickBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js + + + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return _basePickBy(object, paths, function(value, path) { + return (0,hasIn/* default */.A)(object, path); + }); +} + +/* harmony default export */ const _basePick = (basePick); + +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules +var _overRest = __webpack_require__(6875); +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules +var _setToString = __webpack_require__(7525); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js + + + + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); +} + +/* harmony default export */ const _flatRest = (flatRest); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js + + + +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = _flatRest(function(object, paths) { + return object == null ? {} : _basePick(object, paths); +}); + +/* harmony default export */ const lodash_es_pick = (pick); + + +/***/ }), + +/***/ 1395: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_range) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +/* harmony default export */ const _baseRange = (baseRange); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js + + + + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = (0,toFinite/* default */.A)(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = (0,toFinite/* default */.A)(end); + } + step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); + return _baseRange(start, end, step, fromRight); + }; +} + +/* harmony default export */ const _createRange = (createRange); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js + + +/** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ +var range = _createRange(); + +/* harmony default export */ const lodash_es_range = (range); + + +/***/ }), + +/***/ 9463: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_reduce) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/* harmony default export */ const _arrayReduce = (arrayReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +/* harmony default export */ const _baseReduce = (baseReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js + + + + + + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ +function reduce(collection, iteratee, accumulator) { + var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, + initAccum = arguments.length < 3; + + return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); +} + +/* harmony default export */ const lodash_es_reduce = (reduce); + + +/***/ }), + +/***/ 3153: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); + + +/***/ }), + +/***/ 4342: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toFinite) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js +/** Used to match a single whitespace character. */ +var reWhitespace = /\s/; + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ +function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; +} + +/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js + + +/** Used to match leading whitespace. */ +var reTrimStart = /^\s+/; + +/** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ +function baseTrim(string) { + return string + ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; +} + +/* harmony default export */ const _baseTrim = (baseTrim); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js + + + + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if ((0,isSymbol/* default */.A)(value)) { + return NAN; + } + if ((0,isObject/* default */.A)(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = (0,isObject/* default */.A)(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = _baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +/* harmony default export */ const lodash_es_toNumber = (toNumber); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = lodash_es_toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +/* harmony default export */ const lodash_es_toFinite = (toFinite); + + +/***/ }), + +/***/ 8894: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toString) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if ((0,isArray/* default */.A)(value)) { + // Recursively convert values (susceptible to call stack limits). + return (0,_arrayMap/* default */.A)(value, baseToString) + ''; + } + if ((0,isSymbol/* default */.A)(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const _baseToString = (baseToString); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString_toString(value) { + return value == null ? '' : _baseToString(value); +} + +/* harmony default export */ const lodash_es_toString = (toString_toString); + + +/***/ }), + +/***/ 5664: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8894); + + +/** Used to generate unique IDs. */ +var idCounter = 0; + +/** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ +function uniqueId(prefix) { + var id = ++idCounter; + return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); + + +/***/ }), + +/***/ 8207: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_values) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js + + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return (0,_arrayMap/* default */.A)(props, function(key) { + return object[key]; + }); +} + +/* harmony default export */ const _baseValues = (baseValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js + + + +/** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ +function values(object) { + return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); +} + +/* harmony default export */ const lodash_es_values = (values); + + +/***/ }), + +/***/ 3791: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + a: () => (/* binding */ createText), + c: () => (/* binding */ computeDimensionOfText) +}); + +// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +var constructs_namespaceObject = {}; +__webpack_require__.r(constructs_namespaceObject); +__webpack_require__.d(constructs_namespaceObject, { + attentionMarkers: () => (attentionMarkers), + contentInitial: () => (contentInitial), + disable: () => (disable), + document: () => (constructs_document), + flow: () => (constructs_flow), + flowInitial: () => (flowInitial), + insideSpan: () => (insideSpan), + string: () => (constructs_string), + text: () => (constructs_text) +}); + +// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-f47111a7.js + 8 modules +var mermaid_f47111a7 = __webpack_require__(6257); +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js +/** + * @typedef {import('mdast').Root|import('mdast').Content} Node + * + * @typedef Options + * Configuration (optional). + * @property {boolean | null | undefined} [includeImageAlt=true] + * Whether to use `alt` for `image`s. + * @property {boolean | null | undefined} [includeHtml=true] + * Whether to use `value` of HTML. + */ + +/** @type {Options} */ +const emptyOptions = {} + +/** + * Get the text content of a node or list of nodes. + * + * Prefers the node’s plain-text fields, otherwise serializes its children, + * and if the given value is an array, serialize the nodes in it. + * + * @param {unknown} value + * Thing to serialize, typically `Node`. + * @param {Options | null | undefined} [options] + * Configuration (optional). + * @returns {string} + * Serialized `value`. + */ +function lib_toString(value, options) { + const settings = options || emptyOptions + const includeImageAlt = + typeof settings.includeImageAlt === 'boolean' + ? settings.includeImageAlt + : true + const includeHtml = + typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true + + return one(value, includeImageAlt, includeHtml) +} + +/** + * One node or several nodes. + * + * @param {unknown} value + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized node. + */ +function one(value, includeImageAlt, includeHtml) { + if (node(value)) { + if ('value' in value) { + return value.type === 'html' && !includeHtml ? '' : value.value + } + + if (includeImageAlt && 'alt' in value && value.alt) { + return value.alt + } + + if ('children' in value) { + return lib_all(value.children, includeImageAlt, includeHtml) + } + } + + if (Array.isArray(value)) { + return lib_all(value, includeImageAlt, includeHtml) + } + + return '' +} + +/** + * Serialize a list of nodes. + * + * @param {Array<unknown>} values + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized nodes. + */ +function lib_all(values, includeImageAlt, includeHtml) { + /** @type {Array<string>} */ + const result = [] + let index = -1 + + while (++index < values.length) { + result[index] = one(values[index], includeImageAlt, includeHtml) + } + + return result.join('') +} + +/** + * Check if `value` looks like a node. + * + * @param {unknown} value + * Thing. + * @returns {value is Node} + * Whether `value` is a node. + */ +function node(value) { + return Boolean(value && typeof value === 'object') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array<T>} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array<unknown>} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {Array<T>} items + * Items to add to `list`. + * @returns {Array<T>} + * Either `list` or `items`. + */ +function push(list, items) { + if (list.length > 0) { + splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + * @typedef {import('micromark-util-types').Handles} Handles + * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension + * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension + */ + + + +const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty + +/** + * Combine multiple syntax extensions into one. + * + * @param {Array<Extension>} extensions + * List of syntax extensions. + * @returns {NormalizedExtension} + * A single combined extension. + */ +function combineExtensions(extensions) { + /** @type {NormalizedExtension} */ + const all = {} + let index = -1 + + while (++index < extensions.length) { + syntaxExtension(all, extensions[index]) + } + + return all +} + +/** + * Merge `extension` into `all`. + * + * @param {NormalizedExtension} all + * Extension to merge into. + * @param {Extension} extension + * Extension to merge. + * @returns {void} + */ +function syntaxExtension(all, extension) { + /** @type {keyof Extension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + /** @type {Record<string, unknown>} */ + const left = maybe || (all[hook] = {}) + /** @type {Record<string, unknown> | undefined} */ + const right = extension[hook] + /** @type {string} */ + let code + + if (right) { + for (code in right) { + if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] + const value = right[code] + constructs( + // @ts-expect-error Looks like a list. + left[code], + Array.isArray(value) ? value : value ? [value] : [] + ) + } + } + } +} + +/** + * Merge `list` into `existing` (both lists of constructs). + * Mutates `existing`. + * + * @param {Array<unknown>} existing + * @param {Array<unknown>} list + * @returns {void} + */ +function constructs(existing, list) { + let index = -1 + /** @type {Array<unknown>} */ + const before = [] + + while (++index < list.length) { + // @ts-expect-error Looks like an object. + ;(list[index].add === 'after' ? existing : before).push(list[index]) + } + + splice(existing, 0, 0, before) +} + +/** + * Combine multiple HTML extensions into one. + * + * @param {Array<HtmlExtension>} htmlExtensions + * List of HTML extensions. + * @returns {HtmlExtension} + * A single combined HTML extension. + */ +function combineHtmlExtensions(htmlExtensions) { + /** @type {HtmlExtension} */ + const handlers = {} + let index = -1 + + while (++index < htmlExtensions.length) { + htmlExtension(handlers, htmlExtensions[index]) + } + + return handlers +} + +/** + * Merge `extension` into `all`. + * + * @param {HtmlExtension} all + * Extension to merge into. + * @param {HtmlExtension} extension + * Extension to merge. + * @returns {void} + */ +function htmlExtension(all, extension) { + /** @type {keyof HtmlExtension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + const left = maybe || (all[hook] = {}) + const right = extension[hook] + /** @type {keyof Handles} */ + let type + + if (right) { + for (type in right) { + // @ts-expect-error assume document vs regular handler are managed correctly. + left[type] = right[type] + } + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +// This module is generated by `script/`. +// +// CommonMark handles attention (emphasis, strong) markers based on what comes +// before or after them. +// One such difference is if those characters are Unicode punctuation. +// This script is generated from the Unicode data. + +/** + * Regular expression that matches a unicode punctuation character. + */ +const unicodePunctuationRegex = + /[!-\/:-@\[-`\{-~\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]/ + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + + +/** + * Check whether the character code represents an ASCII alpha (`a` through `z`, + * case insensitive). + * + * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. + * + * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) + * to U+005A (`Z`). + * + * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) + * to U+007A (`z`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlpha = regexCheck(/[A-Za-z]/) + +/** + * Check whether the character code represents an ASCII alphanumeric (`a` + * through `z`, case insensitive, or `0` through `9`). + * + * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha + * (see `asciiAlpha`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) + +/** + * Check whether the character code represents an ASCII atext. + * + * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in + * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), + * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F + * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E + * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE + * (`{`) to U+007E TILDE (`~`). + * + * See: + * **\[RFC5322]**: + * [Internet Message Format](https://tools.ietf.org/html/rfc5322). + * P. Resnick. + * IETF. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) + +/** + * Check whether a character code is an ASCII control character. + * + * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) + * to U+001F (US), or U+007F (DEL). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code !== null && (code < 32 || code === 127) + ) +} + +/** + * Check whether the character code represents an ASCII digit (`0` through `9`). + * + * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to + * U+0039 (`9`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiDigit = regexCheck(/\d/) + +/** + * Check whether the character code represents an ASCII hex digit (`a` through + * `f`, case insensitive, or `0` through `9`). + * + * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex + * digit, or an ASCII lower hex digit. + * + * An **ASCII upper hex digit** is a character in the inclusive range U+0041 + * (`A`) to U+0046 (`F`). + * + * An **ASCII lower hex digit** is a character in the inclusive range U+0061 + * (`a`) to U+0066 (`f`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) + +/** + * Check whether the character code represents ASCII punctuation. + * + * An **ASCII punctuation** is a character in the inclusive ranges U+0021 + * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT + * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT + * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) + +/** + * Check whether a character code is a markdown line ending. + * + * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN + * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). + * + * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE + * RETURN (CR) are replaced by these virtual characters depending on whether + * they occurred together. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEnding(code) { + return code !== null && code < -2 +} + +/** + * Check whether a character code is a markdown line ending (see + * `markdownLineEnding`) or markdown space (see `markdownSpace`). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEndingOrSpace(code) { + return code !== null && (code < 0 || code === 32) +} + +/** + * Check whether a character code is a markdown space. + * + * A **markdown space** is the concrete character U+0020 SPACE (SP) and the + * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). + * + * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is + * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL + * SPACE (VS) characters, depending on the column at which the tab occurred. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownSpace(code) { + return code === -2 || code === -1 || code === 32 +} + +// Size note: removing ASCII from the regex and using `asciiPunctuation` here +// In fact adds to the bundle size. +/** + * Check whether the character code represents Unicode punctuation. + * + * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, + * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` + * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` + * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII + * punctuation (see `asciiPunctuation`). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodePunctuation = regexCheck(unicodePunctuationRegex) + +/** + * Check whether the character code represents Unicode whitespace. + * + * Note that this does handle micromark specific markdown whitespace characters. + * See `markdownLineEndingOrSpace` to check that. + * + * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, + * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), + * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodeWhitespace = regexCheck(/\s/) + +/** + * Create a code check from a regex. + * + * @param {RegExp} regex + * @returns {(code: Code) => boolean} + */ +function regexCheck(regex) { + return check + + /** + * Check whether a code matches the bound regex. + * + * @param {Code} code + * Character code. + * @returns {boolean} + * Whether the character code matches the bound regex. + */ + function check(code) { + return code !== null && regex.test(String.fromCharCode(code)) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * spaces in markdown are often optional, in which case this factory can be + * used and `ok` will be switched to whether spaces were found or not + * * one line ending or space can be detected with `markdownSpace(code)` right + * before using `factorySpace` + * + * ###### Examples + * + * Where `␉` represents a tab (plus how much it expands) and `␠` represents a + * single space. + * + * ```markdown + * ␉ + * ␠␠␠␠ + * ␉␠ + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {TokenType} type + * Type (`' \t'`). + * @param {number | undefined} [max=Infinity] + * Max (exclusive). + * @returns + * Start state. + */ +function factorySpace(effects, ok, type, max) { + const limit = max ? max - 1 : Number.POSITIVE_INFINITY + let size = 0 + return start + + /** @type {State} */ + function start(code) { + if (markdownSpace(code)) { + effects.enter(type) + return prefix(code) + } + return ok(code) + } + + /** @type {State} */ + function prefix(code) { + if (markdownSpace(code) && size++ < limit) { + effects.consume(code) + return prefix + } + effects.exit(type) + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + +/** @type {InitialConstruct} */ +const content = { + tokenize: initializeContent +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeContent(effects) { + const contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ) + /** @type {Token} */ + let previous + return contentStart + + /** @type {State} */ + function afterContentStartConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, contentStart, 'linePrefix') + } + + /** @type {State} */ + function paragraphInitial(code) { + effects.enter('paragraph') + return lineStart(code) + } + + /** @type {State} */ + function lineStart(code) { + const token = effects.enter('chunkText', { + contentType: 'text', + previous + }) + if (previous) { + previous.next = token + } + previous = token + return data(code) + } + + /** @type {State} */ + function data(code) { + if (code === null) { + effects.exit('chunkText') + effects.exit('paragraph') + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + effects.exit('chunkText') + return lineStart + } + + // Data. + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + +/** + * @typedef {[Construct, ContainerState]} StackItem + */ + + + + +/** @type {InitialConstruct} */ +const document_document = { + tokenize: initializeDocument +} + +/** @type {Construct} */ +const containerConstruct = { + tokenize: tokenizeContainer +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeDocument(effects) { + const self = this + /** @type {Array<StackItem>} */ + const stack = [] + let continued = 0 + /** @type {TokenizeContext | undefined} */ + let childFlow + /** @type {Token | undefined} */ + let childToken + /** @type {number} */ + let lineStartOffset + return start + + /** @type {State} */ + function start(code) { + // First we iterate through the open blocks, starting with the root + // document, and descending through last children down to the last open + // block. + // Each block imposes a condition that the line must satisfy if the block is + // to remain open. + // For example, a block quote requires a `>` character. + // A paragraph requires a non-blank line. + // In this phase we may match all or just some of the open blocks. + // But we cannot close unmatched blocks yet, because we may have a lazy + // continuation line. + if (continued < stack.length) { + const item = stack[continued] + self.containerState = item[1] + return effects.attempt( + item[0].continuation, + documentContinue, + checkNewContainers + )(code) + } + + // Done. + return checkNewContainers(code) + } + + /** @type {State} */ + function documentContinue(code) { + continued++ + + // Note: this field is called `_closeFlow` but it also closes containers. + // Perhaps a good idea to rename it but it’s already used in the wild by + // extensions. + if (self.containerState._closeFlow) { + self.containerState._closeFlow = undefined + if (childFlow) { + closeFlow() + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when dealing with lazy lines in `writeToChild`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {Point | undefined} */ + let point + + // Find the flow chunk. + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + point = self.events[indexBeforeFlow][1].end + break + } + } + exitContainers(continued) + + // Fix positions. + let index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + return checkNewContainers(code) + } + return start(code) + } + + /** @type {State} */ + function checkNewContainers(code) { + // Next, after consuming the continuation markers for existing blocks, we + // look for new block starts (e.g. `>` for a block quote). + // If we encounter a new block start, we close any blocks unmatched in + // step 1 before creating the new block as a child of the last matched + // block. + if (continued === stack.length) { + // No need to `check` whether there’s a container, of `exitContainers` + // would be moot. + // We can instead immediately `attempt` to parse one. + if (!childFlow) { + return documentContinued(code) + } + + // If we have concrete content, such as block HTML or fenced code, + // we can’t have containers “pierce” into them, so we can immediately + // start. + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { + return flowStart(code) + } + + // If we do have flow, it could still be a blank line, + // but we’d be interrupting it w/ a new container if there’s a current + // construct. + // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer + // needed in micromark-extension-gfm-table@1.0.6). + self.interrupt = Boolean( + childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack + ) + } + + // Check if there is a new container. + self.containerState = {} + return effects.check( + containerConstruct, + thereIsANewContainer, + thereIsNoNewContainer + )(code) + } + + /** @type {State} */ + function thereIsANewContainer(code) { + if (childFlow) closeFlow() + exitContainers(continued) + return documentContinued(code) + } + + /** @type {State} */ + function thereIsNoNewContainer(code) { + self.parser.lazy[self.now().line] = continued !== stack.length + lineStartOffset = self.now().offset + return flowStart(code) + } + + /** @type {State} */ + function documentContinued(code) { + // Try new containers. + self.containerState = {} + return effects.attempt( + containerConstruct, + containerContinue, + flowStart + )(code) + } + + /** @type {State} */ + function containerContinue(code) { + continued++ + stack.push([self.currentConstruct, self.containerState]) + // Try another. + return documentContinued(code) + } + + /** @type {State} */ + function flowStart(code) { + if (code === null) { + if (childFlow) closeFlow() + exitContainers(0) + effects.consume(code) + return + } + childFlow = childFlow || self.parser.flow(self.now()) + effects.enter('chunkFlow', { + contentType: 'flow', + previous: childToken, + _tokenizer: childFlow + }) + return flowContinue(code) + } + + /** @type {State} */ + function flowContinue(code) { + if (code === null) { + writeToChild(effects.exit('chunkFlow'), true) + exitContainers(0) + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + writeToChild(effects.exit('chunkFlow')) + // Get ready for the next line. + continued = 0 + self.interrupt = undefined + return start + } + effects.consume(code) + return flowContinue + } + + /** + * @param {Token} token + * @param {boolean | undefined} [eof] + * @returns {void} + */ + function writeToChild(token, eof) { + const stream = self.sliceStream(token) + if (eof) stream.push(null) + token.previous = childToken + if (childToken) childToken.next = token + childToken = token + childFlow.defineSkip(token.start) + childFlow.write(stream) + + // Alright, so we just added a lazy line: + // + // ```markdown + // > a + // b. + // + // Or: + // + // > ~~~c + // d + // + // Or: + // + // > | e | + // f + // ``` + // + // The construct in the second example (fenced code) does not accept lazy + // lines, so it marked itself as done at the end of its first line, and + // then the content construct parses `d`. + // Most constructs in markdown match on the first line: if the first line + // forms a construct, a non-lazy line can’t “unmake” it. + // + // The construct in the third example is potentially a GFM table, and + // those are *weird*. + // It *could* be a table, from the first line, if the following line + // matches a condition. + // In this case, that second line is lazy, which “unmakes” the first line + // and turns the whole into one content block. + // + // We’ve now parsed the non-lazy and the lazy line, and can figure out + // whether the lazy line started a new flow block. + // If it did, we exit the current containers between the two flow blocks. + if (self.parser.lazy[token.start.line]) { + let index = childFlow.events.length + while (index--) { + if ( + // The token starts before the line ending… + childFlow.events[index][1].start.offset < lineStartOffset && + // …and either is not ended yet… + (!childFlow.events[index][1].end || + // …or ends after it. + childFlow.events[index][1].end.offset > lineStartOffset) + ) { + // Exit: there’s still something open, which means it’s a lazy line + // part of something. + return + } + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when closing flow in `documentContinue`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {boolean | undefined} */ + let seen + /** @type {Point | undefined} */ + let point + + // Find the previous chunk (the one before the lazy line). + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + if (seen) { + point = self.events[indexBeforeFlow][1].end + break + } + seen = true + } + } + exitContainers(continued) + + // Fix positions. + index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + } + } + + /** + * @param {number} size + * @returns {void} + */ + function exitContainers(size) { + let index = stack.length + + // Exit open containers. + while (index-- > size) { + const entry = stack[index] + self.containerState = entry[1] + entry[0].exit.call(self, effects) + } + stack.length = size + } + function closeFlow() { + childFlow.write([null]) + childToken = undefined + childFlow = undefined + self.containerState._closeFlow = undefined + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContainer(effects, ok, nok) { + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok, nok), + 'linePrefix', + this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blankLine = { + tokenize: tokenizeBlankLine, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLine(effects, ok, nok) { + return start + + /** + * Start of blank line. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + return markdownSpace(code) + ? factorySpace(effects, after, 'linePrefix')(code) + : after(code) + } + + /** + * At eof/eol, after optional whitespace. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array<T>} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function micromark_util_chunked_splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array<unknown>} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {Array<T>} items + * Items to add to `list`. + * @returns {Array<T>} + * Either `list` or `items`. + */ +function micromark_util_chunked_push(list, items) { + if (list.length > 0) { + micromark_util_chunked_splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Token} Token + */ + + +/** + * Tokenize subcontent. + * + * @param {Array<Event>} events + * List of events. + * @returns {boolean} + * Whether subtokens were found. + */ +function subtokenize(events) { + /** @type {Record<string, number>} */ + const jumps = {} + let index = -1 + /** @type {Event} */ + let event + /** @type {number | undefined} */ + let lineIndex + /** @type {number} */ + let otherIndex + /** @type {Event} */ + let otherEvent + /** @type {Array<Event>} */ + let parameters + /** @type {Array<Event>} */ + let subevents + /** @type {boolean | undefined} */ + let more + while (++index < events.length) { + while (index in jumps) { + index = jumps[index] + } + event = events[index] + + // Add a hook for the GFM tasklist extension, which needs to know if text + // is in the first content of a list item. + if ( + index && + event[1].type === 'chunkFlow' && + events[index - 1][1].type === 'listItemPrefix' + ) { + subevents = event[1]._tokenizer.events + otherIndex = 0 + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'lineEndingBlank' + ) { + otherIndex += 2 + } + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'content' + ) { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === 'content') { + break + } + if (subevents[otherIndex][1].type === 'chunkText') { + subevents[otherIndex][1]._isInFirstContentOfListItem = true + otherIndex++ + } + } + } + } + + // Enter. + if (event[0] === 'enter') { + if (event[1].contentType) { + Object.assign(jumps, subcontent(events, index)) + index = jumps[index] + more = true + } + } + // Exit. + else if (event[1]._container) { + otherIndex = index + lineIndex = undefined + while (otherIndex--) { + otherEvent = events[otherIndex] + if ( + otherEvent[1].type === 'lineEnding' || + otherEvent[1].type === 'lineEndingBlank' + ) { + if (otherEvent[0] === 'enter') { + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + } + otherEvent[1].type = 'lineEnding' + lineIndex = otherIndex + } + } else { + break + } + } + if (lineIndex) { + // Fix position. + event[1].end = Object.assign({}, events[lineIndex][1].start) + + // Switch container exit w/ line endings. + parameters = events.slice(lineIndex, index) + parameters.unshift(event) + micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) + } + } + } + return !more +} + +/** + * Tokenize embedded tokens. + * + * @param {Array<Event>} events + * @param {number} eventIndex + * @returns {Record<string, number>} + */ +function subcontent(events, eventIndex) { + const token = events[eventIndex][1] + const context = events[eventIndex][2] + let startPosition = eventIndex - 1 + /** @type {Array<number>} */ + const startPositions = [] + const tokenizer = + token._tokenizer || context.parser[token.contentType](token.start) + const childEvents = tokenizer.events + /** @type {Array<[number, number]>} */ + const jumps = [] + /** @type {Record<string, number>} */ + const gaps = {} + /** @type {Array<Chunk>} */ + let stream + /** @type {Token | undefined} */ + let previous + let index = -1 + /** @type {Token | undefined} */ + let current = token + let adjust = 0 + let start = 0 + const breaks = [start] + + // Loop forward through the linked tokens to pass them in order to the + // subtokenizer. + while (current) { + // Find the position of the event for this token. + while (events[++startPosition][1] !== current) { + // Empty. + } + startPositions.push(startPosition) + if (!current._tokenizer) { + stream = context.sliceStream(current) + if (!current.next) { + stream.push(null) + } + if (previous) { + tokenizer.defineSkip(current.start) + } + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true + } + tokenizer.write(stream) + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = undefined + } + } + + // Unravel the next token. + previous = current + current = current.next + } + + // Now, loop back through all events (and linked tokens), to figure out which + // parts belong where. + current = token + while (++index < childEvents.length) { + if ( + // Find a void token that includes a break. + childEvents[index][0] === 'exit' && + childEvents[index - 1][0] === 'enter' && + childEvents[index][1].type === childEvents[index - 1][1].type && + childEvents[index][1].start.line !== childEvents[index][1].end.line + ) { + start = index + 1 + breaks.push(start) + // Help GC. + current._tokenizer = undefined + current.previous = undefined + current = current.next + } + } + + // Help GC. + tokenizer.events = [] + + // If there’s one more token (which is the cases for lines that end in an + // EOF), that’s perfect: the last point we found starts it. + // If there isn’t then make sure any remaining content is added to it. + if (current) { + // Help GC. + current._tokenizer = undefined + current.previous = undefined + } else { + breaks.pop() + } + + // Now splice the events from the subtokenizer into the current events, + // moving back to front so that splice indices aren’t affected. + index = breaks.length + while (index--) { + const slice = childEvents.slice(breaks[index], breaks[index + 1]) + const start = startPositions.pop() + jumps.unshift([start, start + slice.length - 1]) + micromark_util_chunked_splice(events, start, 2, slice) + } + index = -1 + while (++index < jumps.length) { + gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] + adjust += jumps[index][1] - jumps[index][0] - 1 + } + return gaps +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** + * No name because it must not be turned off. + * @type {Construct} + */ +const content_content = { + tokenize: tokenizeContent, + resolve: resolveContent +} + +/** @type {Construct} */ +const continuationConstruct = { + tokenize: tokenizeContinuation, + partial: true +} + +/** + * Content is transparent: it’s parsed right now. That way, definitions are also + * parsed right now: before text in paragraphs (specifically, media) are parsed. + * + * @type {Resolver} + */ +function resolveContent(events) { + subtokenize(events) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContent(effects, ok) { + /** @type {Token | undefined} */ + let previous + return chunkStart + + /** + * Before a content chunk. + * + * ```markdown + * > | abc + * ^ + * ``` + * + * @type {State} + */ + function chunkStart(code) { + effects.enter('content') + previous = effects.enter('chunkContent', { + contentType: 'content' + }) + return chunkInside(code) + } + + /** + * In a content chunk. + * + * ```markdown + * > | abc + * ^^^ + * ``` + * + * @type {State} + */ + function chunkInside(code) { + if (code === null) { + return contentEnd(code) + } + + // To do: in `markdown-rs`, each line is parsed on its own, and everything + // is stitched together resolving. + if (markdownLineEnding(code)) { + return effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code) + } + + // Data. + effects.consume(code) + return chunkInside + } + + /** + * + * + * @type {State} + */ + function contentEnd(code) { + effects.exit('chunkContent') + effects.exit('content') + return ok(code) + } + + /** + * + * + * @type {State} + */ + function contentContinue(code) { + effects.consume(code) + effects.exit('chunkContent') + previous.next = effects.enter('chunkContent', { + contentType: 'content', + previous + }) + previous = previous.next + return chunkInside + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContinuation(effects, ok, nok) { + const self = this + return startLookahead + + /** + * + * + * @type {State} + */ + function startLookahead(code) { + effects.exit('chunkContent') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, prefixed, 'linePrefix') + } + + /** + * + * + * @type {State} + */ + function prefixed(code) { + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + + // Always populated by defaults. + + const tail = self.events[self.events.length - 1] + if ( + !self.parser.constructs.disable.null.includes('codeIndented') && + tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ) { + return ok(code) + } + return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + + +/** @type {InitialConstruct} */ +const flow = { + tokenize: initializeFlow +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeFlow(effects) { + const self = this + const initial = effects.attempt( + // Try to parse a blank line. + blankLine, + atBlankEnding, + // Try to parse initial flow (essentially, only code). + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content_content, afterConstruct) + ), + 'linePrefix' + ) + ) + ) + return initial + + /** @type {State} */ + function atBlankEnding(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEndingBlank') + effects.consume(code) + effects.exit('lineEndingBlank') + self.currentConstruct = undefined + return initial + } + + /** @type {State} */ + function afterConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + self.currentConstruct = undefined + return initial + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +const resolver = { + resolveAll: createResolver() +} +const string = initializeFactory('string') +const text_text = initializeFactory('text') + +/** + * @param {'string' | 'text'} field + * @returns {InitialConstruct} + */ +function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: createResolver( + field === 'text' ? resolveAllLineSuffixes : undefined + ) + } + + /** + * @this {TokenizeContext} + * @type {Initializer} + */ + function initializeText(effects) { + const self = this + const constructs = this.parser.constructs[field] + const text = effects.attempt(constructs, start, notText) + return start + + /** @type {State} */ + function start(code) { + return atBreak(code) ? text(code) : notText(code) + } + + /** @type {State} */ + function notText(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('data') + effects.consume(code) + return data + } + + /** @type {State} */ + function data(code) { + if (atBreak(code)) { + effects.exit('data') + return text(code) + } + + // Data. + effects.consume(code) + return data + } + + /** + * @param {Code} code + * @returns {boolean} + */ + function atBreak(code) { + if (code === null) { + return true + } + const list = constructs[code] + let index = -1 + if (list) { + // Always populated by defaults. + + while (++index < list.length) { + const item = list[index] + if (!item.previous || item.previous.call(self, self.previous)) { + return true + } + } + } + return false + } + } +} + +/** + * @param {Resolver | undefined} [extraResolver] + * @returns {Resolver} + */ +function createResolver(extraResolver) { + return resolveAllText + + /** @type {Resolver} */ + function resolveAllText(events, context) { + let index = -1 + /** @type {number | undefined} */ + let enter + + // A rather boring computation (to merge adjacent `data` events) which + // improves mm performance by 29%. + while (++index <= events.length) { + if (enter === undefined) { + if (events[index] && events[index][1].type === 'data') { + enter = index + index++ + } + } else if (!events[index] || events[index][1].type !== 'data') { + // Don’t do anything if there is one data token. + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + index = enter + 2 + } + enter = undefined + } + } + return extraResolver ? extraResolver(events, context) : events + } +} + +/** + * A rather ugly set of instructions which again looks at chunks in the input + * stream. + * The reason to do this here is that it is *much* faster to parse in reverse. + * And that we can’t hook into `null` to split the line suffix before an EOF. + * To do: figure out if we can make this into a clean utility, or even in core. + * As it will be useful for GFMs literal autolink extension (and maybe even + * tables?) + * + * @type {Resolver} + */ +function resolveAllLineSuffixes(events, context) { + let eventIndex = 0 // Skip first. + + while (++eventIndex <= events.length) { + if ( + (eventIndex === events.length || + events[eventIndex][1].type === 'lineEnding') && + events[eventIndex - 1][1].type === 'data' + ) { + const data = events[eventIndex - 1][1] + const chunks = context.sliceStream(data) + let index = chunks.length + let bufferIndex = -1 + let size = 0 + /** @type {boolean | undefined} */ + let tabs + while (index--) { + const chunk = chunks[index] + if (typeof chunk === 'string') { + bufferIndex = chunk.length + while (chunk.charCodeAt(bufferIndex - 1) === 32) { + size++ + bufferIndex-- + } + if (bufferIndex) break + bufferIndex = -1 + } + // Number + else if (chunk === -2) { + tabs = true + size++ + } else if (chunk === -1) { + // Empty + } else { + // Replacement character, exit. + index++ + break + } + } + if (size) { + const token = { + type: + eventIndex === events.length || tabs || size < 2 + ? 'lineSuffix' + : 'hardBreakTrailing', + start: { + line: data.end.line, + column: data.end.column - size, + offset: data.end.offset - size, + _index: data.start._index + index, + _bufferIndex: index + ? bufferIndex + : data.start._bufferIndex + bufferIndex + }, + end: Object.assign({}, data.end) + } + data.end = Object.assign({}, token.start) + if (data.start.offset === data.end.offset) { + Object.assign(data, token) + } else { + events.splice( + eventIndex, + 0, + ['enter', token, context], + ['exit', token, context] + ) + eventIndex += 2 + } + } + eventIndex++ + } + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js +/** + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * Call all `resolveAll`s. + * + * @param {Array<{resolveAll?: Resolver | undefined}>} constructs + * List of constructs, optionally with `resolveAll`s. + * @param {Array<Event>} events + * List of events. + * @param {TokenizeContext} context + * Context used by `tokenize`. + * @returns {Array<Event>} + * Changed events. + */ +function resolveAll(constructs, events, context) { + /** @type {Array<Resolver>} */ + const called = [] + let index = -1 + + while (++index < constructs.length) { + const resolve = constructs[index].resolveAll + + if (resolve && !called.includes(resolve)) { + events = resolve(events, context) + called.push(resolve) + } + } + + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenType} TokenType + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * @callback Restore + * @returns {void} + * + * @typedef Info + * @property {Restore} restore + * @property {number} from + * + * @callback ReturnHandle + * Handle a successful run. + * @param {Construct} construct + * @param {Info} info + * @returns {void} + */ + + + + +/** + * Create a tokenizer. + * Tokenizers deal with one type of data (e.g., containers, flow, text). + * The parser is the object dealing with it all. + * `initialize` works like other constructs, except that only its `tokenize` + * function is used, in which case it doesn’t receive an `ok` or `nok`. + * `from` can be given to set the point before the first character, although + * when further lines are indented, they must be set with `defineSkip`. + * + * @param {ParseContext} parser + * @param {InitialConstruct} initialize + * @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from] + * @returns {TokenizeContext} + */ +function createTokenizer(parser, initialize, from) { + /** @type {Point} */ + let point = Object.assign( + from + ? Object.assign({}, from) + : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ) + /** @type {Record<string, number>} */ + const columnStart = {} + /** @type {Array<Construct>} */ + const resolveAllConstructs = [] + /** @type {Array<Chunk>} */ + let chunks = [] + /** @type {Array<Token>} */ + let stack = [] + /** @type {boolean | undefined} */ + let consumed = true + + /** + * Tools used for tokenizing. + * + * @type {Effects} + */ + const effects = { + consume, + enter, + exit, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, { + interrupt: true + }) + } + + /** + * State and tools for resolving and serializing. + * + * @type {TokenizeContext} + */ + const context = { + previous: null, + code: null, + containerState: {}, + events: [], + parser, + sliceStream, + sliceSerialize, + now, + defineSkip, + write + } + + /** + * The state function. + * + * @type {State | void} + */ + let state = initialize.tokenize.call(context, effects) + + /** + * Track which character we expect to be consumed, to catch bugs. + * + * @type {Code} + */ + let expectedCode + if (initialize.resolveAll) { + resolveAllConstructs.push(initialize) + } + return context + + /** @type {TokenizeContext['write']} */ + function write(slice) { + chunks = push(chunks, slice) + main() + + // Exit if we’re not done, resolve might change stuff. + if (chunks[chunks.length - 1] !== null) { + return [] + } + addResult(initialize, 0) + + // Otherwise, resolve, and exit. + context.events = resolveAll(resolveAllConstructs, context.events, context) + return context.events + } + + // + // Tools. + // + + /** @type {TokenizeContext['sliceSerialize']} */ + function sliceSerialize(token, expandTabs) { + return serializeChunks(sliceStream(token), expandTabs) + } + + /** @type {TokenizeContext['sliceStream']} */ + function sliceStream(token) { + return sliceChunks(chunks, token) + } + + /** @type {TokenizeContext['now']} */ + function now() { + // This is a hot path, so we clone manually instead of `Object.assign({}, point)` + const {line, column, offset, _index, _bufferIndex} = point + return { + line, + column, + offset, + _index, + _bufferIndex + } + } + + /** @type {TokenizeContext['defineSkip']} */ + function defineSkip(value) { + columnStart[value.line] = value.column + accountForPotentialSkip() + } + + // + // State management. + // + + /** + * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by + * `consume`). + * Here is where we walk through the chunks, which either include strings of + * several characters, or numerical character codes. + * The reason to do this in a loop instead of a call is so the stack can + * drain. + * + * @returns {void} + */ + function main() { + /** @type {number} */ + let chunkIndex + while (point._index < chunks.length) { + const chunk = chunks[point._index] + + // If we’re in a buffer chunk, loop through it. + if (typeof chunk === 'string') { + chunkIndex = point._index + if (point._bufferIndex < 0) { + point._bufferIndex = 0 + } + while ( + point._index === chunkIndex && + point._bufferIndex < chunk.length + ) { + go(chunk.charCodeAt(point._bufferIndex)) + } + } else { + go(chunk) + } + } + } + + /** + * Deal with one code. + * + * @param {Code} code + * @returns {void} + */ + function go(code) { + consumed = undefined + expectedCode = code + state = state(code) + } + + /** @type {Effects['consume']} */ + function consume(code) { + if (markdownLineEnding(code)) { + point.line++ + point.column = 1 + point.offset += code === -3 ? 2 : 1 + accountForPotentialSkip() + } else if (code !== -1) { + point.column++ + point.offset++ + } + + // Not in a string chunk. + if (point._bufferIndex < 0) { + point._index++ + } else { + point._bufferIndex++ + + // At end of string chunk. + // @ts-expect-error Points w/ non-negative `_bufferIndex` reference + // strings. + if (point._bufferIndex === chunks[point._index].length) { + point._bufferIndex = -1 + point._index++ + } + } + + // Expose the previous character. + context.previous = code + + // Mark as consumed. + consumed = true + } + + /** @type {Effects['enter']} */ + function enter(type, fields) { + /** @type {Token} */ + // @ts-expect-error Patch instead of assign required fields to help GC. + const token = fields || {} + token.type = type + token.start = now() + context.events.push(['enter', token, context]) + stack.push(token) + return token + } + + /** @type {Effects['exit']} */ + function exit(type) { + const token = stack.pop() + token.end = now() + context.events.push(['exit', token, context]) + return token + } + + /** + * Use results. + * + * @type {ReturnHandle} + */ + function onsuccessfulconstruct(construct, info) { + addResult(construct, info.from) + } + + /** + * Discard results. + * + * @type {ReturnHandle} + */ + function onsuccessfulcheck(_, info) { + info.restore() + } + + /** + * Factory to attempt/check/interrupt. + * + * @param {ReturnHandle} onreturn + * @param {{interrupt?: boolean | undefined} | undefined} [fields] + */ + function constructFactory(onreturn, fields) { + return hook + + /** + * Handle either an object mapping codes to constructs, a list of + * constructs, or a single construct. + * + * @param {Array<Construct> | Construct | ConstructRecord} constructs + * @param {State} returnState + * @param {State | undefined} [bogusState] + * @returns {State} + */ + function hook(constructs, returnState, bogusState) { + /** @type {Array<Construct>} */ + let listOfConstructs + /** @type {number} */ + let constructIndex + /** @type {Construct} */ + let currentConstruct + /** @type {Info} */ + let info + return Array.isArray(constructs) /* c8 ignore next 1 */ + ? handleListOfConstructs(constructs) + : 'tokenize' in constructs + ? // @ts-expect-error Looks like a construct. + handleListOfConstructs([constructs]) + : handleMapOfConstructs(constructs) + + /** + * Handle a list of construct. + * + * @param {ConstructRecord} map + * @returns {State} + */ + function handleMapOfConstructs(map) { + return start + + /** @type {State} */ + function start(code) { + const def = code !== null && map[code] + const all = code !== null && map.null + const list = [ + // To do: add more extension tests. + /* c8 ignore next 2 */ + ...(Array.isArray(def) ? def : def ? [def] : []), + ...(Array.isArray(all) ? all : all ? [all] : []) + ] + return handleListOfConstructs(list)(code) + } + } + + /** + * Handle a list of construct. + * + * @param {Array<Construct>} list + * @returns {State} + */ + function handleListOfConstructs(list) { + listOfConstructs = list + constructIndex = 0 + if (list.length === 0) { + return bogusState + } + return handleConstruct(list[constructIndex]) + } + + /** + * Handle a single construct. + * + * @param {Construct} construct + * @returns {State} + */ + function handleConstruct(construct) { + return start + + /** @type {State} */ + function start(code) { + // To do: not needed to store if there is no bogus state, probably? + // Currently doesn’t work because `inspect` in document does a check + // w/o a bogus, which doesn’t make sense. But it does seem to help perf + // by not storing. + info = store() + currentConstruct = construct + if (!construct.partial) { + context.currentConstruct = construct + } + + // Always populated by defaults. + + if ( + construct.name && + context.parser.constructs.disable.null.includes(construct.name) + ) { + return nok(code) + } + return construct.tokenize.call( + // If we do have fields, create an object w/ `context` as its + // prototype. + // This allows a “live binding”, which is needed for `interrupt`. + fields ? Object.assign(Object.create(context), fields) : context, + effects, + ok, + nok + )(code) + } + } + + /** @type {State} */ + function ok(code) { + consumed = true + onreturn(currentConstruct, info) + return returnState + } + + /** @type {State} */ + function nok(code) { + consumed = true + info.restore() + if (++constructIndex < listOfConstructs.length) { + return handleConstruct(listOfConstructs[constructIndex]) + } + return bogusState + } + } + } + + /** + * @param {Construct} construct + * @param {number} from + * @returns {void} + */ + function addResult(construct, from) { + if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { + resolveAllConstructs.push(construct) + } + if (construct.resolve) { + splice( + context.events, + from, + context.events.length - from, + construct.resolve(context.events.slice(from), context) + ) + } + if (construct.resolveTo) { + context.events = construct.resolveTo(context.events, context) + } + } + + /** + * Store state. + * + * @returns {Info} + */ + function store() { + const startPoint = now() + const startPrevious = context.previous + const startCurrentConstruct = context.currentConstruct + const startEventsIndex = context.events.length + const startStack = Array.from(stack) + return { + restore, + from: startEventsIndex + } + + /** + * Restore state. + * + * @returns {void} + */ + function restore() { + point = startPoint + context.previous = startPrevious + context.currentConstruct = startCurrentConstruct + context.events.length = startEventsIndex + stack = startStack + accountForPotentialSkip() + } + } + + /** + * Move the current point a bit forward in the line when it’s on a column + * skip. + * + * @returns {void} + */ + function accountForPotentialSkip() { + if (point.line in columnStart && point.column < 2) { + point.column = columnStart[point.line] + point.offset += columnStart[point.line] - 1 + } + } +} + +/** + * Get the chunks from a slice of chunks in the range of a token. + * + * @param {Array<Chunk>} chunks + * @param {Pick<Token, 'end' | 'start'>} token + * @returns {Array<Chunk>} + */ +function sliceChunks(chunks, token) { + const startIndex = token.start._index + const startBufferIndex = token.start._bufferIndex + const endIndex = token.end._index + const endBufferIndex = token.end._bufferIndex + /** @type {Array<Chunk>} */ + let view + if (startIndex === endIndex) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] + } else { + view = chunks.slice(startIndex, endIndex) + if (startBufferIndex > -1) { + const head = view[0] + if (typeof head === 'string') { + view[0] = head.slice(startBufferIndex) + } else { + view.shift() + } + } + if (endBufferIndex > 0) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view.push(chunks[endIndex].slice(0, endBufferIndex)) + } + } + return view +} + +/** + * Get the string value of a slice of chunks. + * + * @param {Array<Chunk>} chunks + * @param {boolean | undefined} [expandTabs=false] + * @returns {string} + */ +function serializeChunks(chunks, expandTabs) { + let index = -1 + /** @type {Array<string>} */ + const result = [] + /** @type {boolean | undefined} */ + let atTab + while (++index < chunks.length) { + const chunk = chunks[index] + /** @type {string} */ + let value + if (typeof chunk === 'string') { + value = chunk + } else + switch (chunk) { + case -5: { + value = '\r' + break + } + case -4: { + value = '\n' + break + } + case -3: { + value = '\r' + '\n' + break + } + case -2: { + value = expandTabs ? ' ' : '\t' + break + } + case -1: { + if (!expandTabs && atTab) continue + value = ' ' + break + } + default: { + // Currently only replacement character. + value = String.fromCharCode(chunk) + } + } + atTab = chunk === -2 + result.push(value) + } + return result.join('') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const thematicBreak = { + name: 'thematicBreak', + tokenize: tokenizeThematicBreak +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeThematicBreak(effects, ok, nok) { + let size = 0 + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of thematic break. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('thematicBreak') + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * After optional whitespace, at marker. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + marker = code + return atBreak(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.enter('thematicBreakSequence') + return sequence(code) + } + if (size >= 3 && (code === null || markdownLineEnding(code))) { + effects.exit('thematicBreak') + return ok(code) + } + return nok(code) + } + + /** + * In sequence. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function sequence(code) { + if (code === marker) { + effects.consume(code) + size++ + return sequence + } + effects.exit('thematicBreakSequence') + return markdownSpace(code) + ? factorySpace(effects, atBreak, 'whitespace')(code) + : atBreak(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + +/** @type {Construct} */ +const list = { + name: 'list', + tokenize: tokenizeListStart, + continuation: { + tokenize: tokenizeListContinuation + }, + exit: tokenizeListEnd +} + +/** @type {Construct} */ +const listItemPrefixWhitespaceConstruct = { + tokenize: tokenizeListItemPrefixWhitespace, + partial: true +} + +/** @type {Construct} */ +const indentConstruct = { + tokenize: tokenizeIndent, + partial: true +} + +// To do: `markdown-rs` parses list items on their own and later stitches them +// together. + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListStart(effects, ok, nok) { + const self = this + const tail = self.events[self.events.length - 1] + let initialSize = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + let size = 0 + return start + + /** @type {State} */ + function start(code) { + const kind = + self.containerState.type || + (code === 42 || code === 43 || code === 45 + ? 'listUnordered' + : 'listOrdered') + if ( + kind === 'listUnordered' + ? !self.containerState.marker || code === self.containerState.marker + : asciiDigit(code) + ) { + if (!self.containerState.type) { + self.containerState.type = kind + effects.enter(kind, { + _container: true + }) + } + if (kind === 'listUnordered') { + effects.enter('listItemPrefix') + return code === 42 || code === 45 + ? effects.check(thematicBreak, nok, atMarker)(code) + : atMarker(code) + } + if (!self.interrupt || code === 49) { + effects.enter('listItemPrefix') + effects.enter('listItemValue') + return inside(code) + } + } + return nok(code) + } + + /** @type {State} */ + function inside(code) { + if (asciiDigit(code) && ++size < 10) { + effects.consume(code) + return inside + } + if ( + (!self.interrupt || size < 2) && + (self.containerState.marker + ? code === self.containerState.marker + : code === 41 || code === 46) + ) { + effects.exit('listItemValue') + return atMarker(code) + } + return nok(code) + } + + /** + * @type {State} + **/ + function atMarker(code) { + effects.enter('listItemMarker') + effects.consume(code) + effects.exit('listItemMarker') + self.containerState.marker = self.containerState.marker || code + return effects.check( + blankLine, + // Can’t be empty when interrupting. + self.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ) + } + + /** @type {State} */ + function onBlank(code) { + self.containerState.initialBlankLine = true + initialSize++ + return endOfPrefix(code) + } + + /** @type {State} */ + function otherPrefix(code) { + if (markdownSpace(code)) { + effects.enter('listItemPrefixWhitespace') + effects.consume(code) + effects.exit('listItemPrefixWhitespace') + return endOfPrefix + } + return nok(code) + } + + /** @type {State} */ + function endOfPrefix(code) { + self.containerState.size = + initialSize + + self.sliceSerialize(effects.exit('listItemPrefix'), true).length + return ok(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListContinuation(effects, ok, nok) { + const self = this + self.containerState._closeFlow = undefined + return effects.check(blankLine, onBlank, notBlank) + + /** @type {State} */ + function onBlank(code) { + self.containerState.furtherBlankLines = + self.containerState.furtherBlankLines || + self.containerState.initialBlankLine + + // We have a blank line. + // Still, try to consume at most the items size. + return factorySpace( + effects, + ok, + 'listItemIndent', + self.containerState.size + 1 + )(code) + } + + /** @type {State} */ + function notBlank(code) { + if (self.containerState.furtherBlankLines || !markdownSpace(code)) { + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return notInCurrentItem(code) + } + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) + } + + /** @type {State} */ + function notInCurrentItem(code) { + // While we do continue, we signal that the flow should be closed. + self.containerState._closeFlow = true + // As we’re closing flow, we’re no longer interrupting. + self.interrupt = undefined + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(list, ok, nok), + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeIndent(effects, ok, nok) { + const self = this + return factorySpace( + effects, + afterPrefix, + 'listItemIndent', + self.containerState.size + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'listItemIndent' && + tail[2].sliceSerialize(tail[1], true).length === self.containerState.size + ? ok(code) + : nok(code) + } +} + +/** + * @type {Exiter} + * @this {TokenizeContext} + */ +function tokenizeListEnd(effects) { + effects.exit(this.containerState.type) +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListItemPrefixWhitespace(effects, ok, nok) { + const self = this + + // Always populated by defaults. + + return factorySpace( + effects, + afterPrefix, + 'listItemPrefixWhitespace', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return !markdownSpace(code) && + tail && + tail[1].type === 'listItemPrefixWhitespace' + ? ok(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blockQuote = { + name: 'blockQuote', + tokenize: tokenizeBlockQuoteStart, + continuation: { + tokenize: tokenizeBlockQuoteContinuation + }, + exit +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteStart(effects, ok, nok) { + const self = this + return start + + /** + * Start of block quote. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 62) { + const state = self.containerState + if (!state.open) { + effects.enter('blockQuote', { + _container: true + }) + state.open = true + } + effects.enter('blockQuotePrefix') + effects.enter('blockQuoteMarker') + effects.consume(code) + effects.exit('blockQuoteMarker') + return after + } + return nok(code) + } + + /** + * After `>`, before optional whitespace. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownSpace(code)) { + effects.enter('blockQuotePrefixWhitespace') + effects.consume(code) + effects.exit('blockQuotePrefixWhitespace') + effects.exit('blockQuotePrefix') + return ok + } + effects.exit('blockQuotePrefix') + return ok(code) + } +} + +/** + * Start of block quote continuation. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteContinuation(effects, ok, nok) { + const self = this + return contStart + + /** + * Start of block quote continuation. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contStart(code) { + if (markdownSpace(code)) { + // Always populated by defaults. + + return factorySpace( + effects, + contBefore, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } + return contBefore(code) + } + + /** + * At `>`, after optional whitespace. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contBefore(code) { + return effects.attempt(blockQuote, ok, nok)(code) + } +} + +/** @type {Exiter} */ +function exit(effects) { + effects.exit('blockQuote') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse destinations. + * + * ###### Examples + * + * ```markdown + * <a> + * <a\>b> + * <a b> + * <a)> + * a + * a\)b + * a(b)c + * a(b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type for whole (`<a>` or `b`). + * @param {TokenType} literalType + * Type when enclosed (`<a>`). + * @param {TokenType} literalMarkerType + * Type for enclosing (`<` and `>`). + * @param {TokenType} rawType + * Type when not enclosed (`b`). + * @param {TokenType} stringType + * Type for the value (`a` or `b`). + * @param {number | undefined} [max=Infinity] + * Depth of nested parens (inclusive). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryDestination( + effects, + ok, + nok, + type, + literalType, + literalMarkerType, + rawType, + stringType, + max +) { + const limit = max || Number.POSITIVE_INFINITY + let balance = 0 + return start + + /** + * Start of destination. + * + * ```markdown + * > | <aa> + * ^ + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 60) { + effects.enter(type) + effects.enter(literalType) + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + return enclosedBefore + } + + // ASCII control, space, closing paren. + if (code === null || code === 32 || code === 41 || asciiControl(code)) { + return nok(code) + } + effects.enter(type) + effects.enter(rawType) + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return raw(code) + } + + /** + * After `<`, at an enclosed destination. + * + * ```markdown + * > | <aa> + * ^ + * ``` + * + * @type {State} + */ + function enclosedBefore(code) { + if (code === 62) { + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + effects.exit(literalType) + effects.exit(type) + return ok + } + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return enclosed(code) + } + + /** + * In enclosed destination. + * + * ```markdown + * > | <aa> + * ^ + * ``` + * + * @type {State} + */ + function enclosed(code) { + if (code === 62) { + effects.exit('chunkString') + effects.exit(stringType) + return enclosedBefore(code) + } + if (code === null || code === 60 || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? enclosedEscape : enclosed + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | <a\*a> + * ^ + * ``` + * + * @type {State} + */ + function enclosedEscape(code) { + if (code === 60 || code === 62 || code === 92) { + effects.consume(code) + return enclosed + } + return enclosed(code) + } + + /** + * In raw destination. + * + * ```markdown + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function raw(code) { + if ( + !balance && + (code === null || code === 41 || markdownLineEndingOrSpace(code)) + ) { + effects.exit('chunkString') + effects.exit(stringType) + effects.exit(rawType) + effects.exit(type) + return ok(code) + } + if (balance < limit && code === 40) { + effects.consume(code) + balance++ + return raw + } + if (code === 41) { + effects.consume(code) + balance-- + return raw + } + + // ASCII control (but *not* `\0`) and space and `(`. + // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it + // doesn’t. + if (code === null || code === 32 || code === 40 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? rawEscape : raw + } + + /** + * After `\`, at special character. + * + * ```markdown + * > | a\*a + * ^ + * ``` + * + * @type {State} + */ + function rawEscape(code) { + if (code === 40 || code === 41 || code === 92) { + effects.consume(code) + return raw + } + return raw(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse labels. + * + * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. + * + * ###### Examples + * + * ```markdown + * [a] + * [a + * b] + * [a\]b] + * ``` + * + * @this {TokenizeContext} + * Tokenize context. + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole label (`[a]`). + * @param {TokenType} markerType + * Type for the markers (`[` and `]`). + * @param {TokenType} stringType + * Type for the identifier (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryLabel(effects, ok, nok, type, markerType, stringType) { + const self = this + let size = 0 + /** @type {boolean} */ + let seen + return start + + /** + * Start of label. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.enter(stringType) + return atBreak + } + + /** + * In label, at something, before something else. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if ( + size > 999 || + code === null || + code === 91 || + (code === 93 && !seen) || + // To do: remove in the future once we’ve switched from + // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + // which doesn’t need this. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + (code === 94 && + !size && + '_hiddenFootnoteSupport' in self.parser.constructs) + ) { + return nok(code) + } + if (code === 93) { + effects.exit(stringType) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + + // To do: indent? Link chunks and EOLs together? + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return atBreak + } + effects.enter('chunkString', { + contentType: 'string' + }) + return labelInside(code) + } + + /** + * In label, in text. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function labelInside(code) { + if ( + code === null || + code === 91 || + code === 93 || + markdownLineEnding(code) || + size++ > 999 + ) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + if (!seen) seen = !markdownSpace(code) + return code === 92 ? labelEscape : labelInside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | [a\*a] + * ^ + * ``` + * + * @type {State} + */ + function labelEscape(code) { + if (code === 91 || code === 92 || code === 93) { + effects.consume(code) + size++ + return labelInside + } + return labelInside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +/** + * Parse titles. + * + * ###### Examples + * + * ```markdown + * "a" + * 'b' + * (c) + * "a + * b" + * 'a + * b' + * (a\)b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole title (`"a"`, `'b'`, `(c)`). + * @param {TokenType} markerType + * Type for the markers (`"`, `'`, `(`, and `)`). + * @param {TokenType} stringType + * Type for the value (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryTitle(effects, ok, nok, type, markerType, stringType) { + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of title. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 34 || code === 39 || code === 40) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + marker = code === 40 ? 41 : code + return begin + } + return nok(code) + } + + /** + * After opening marker. + * + * This is also used at the closing marker. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function begin(code) { + if (code === marker) { + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + effects.enter(stringType) + return atBreak(code) + } + + /** + * At something, before something else. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.exit(stringType) + return begin(marker) + } + if (code === null) { + return nok(code) + } + + // Note: blank lines can’t exist in content. + if (markdownLineEnding(code)) { + // To do: use `space_or_tab_eol_with_options`, connect. + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, atBreak, 'linePrefix') + } + effects.enter('chunkString', { + contentType: 'string' + }) + return inside(code) + } + + /** + * + * + * @type {State} + */ + function inside(code) { + if (code === marker || code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + return code === 92 ? escape : inside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | "a\*b" + * ^ + * ``` + * + * @type {State} + */ + function escape(code) { + if (code === marker || code === 92) { + effects.consume(code) + return inside + } + return inside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + */ + + + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * line endings or spaces in markdown are often optional, in which case this + * factory can be used and `ok` will be switched to whether spaces were found + * or not + * * one line ending or space can be detected with + * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @returns + * Start state. + */ +function factoryWhitespace(effects, ok) { + /** @type {boolean} */ + let seen + return start + + /** @type {State} */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + seen = true + return start + } + if (markdownSpace(code)) { + return factorySpace( + effects, + start, + seen ? 'linePrefix' : 'lineSuffix' + )(code) + } + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js +/** + * Normalize an identifier (as found in references, definitions). + * + * Collapses markdown whitespace, trim, and then lower- and uppercase. + * + * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their + * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different + * uppercase character (U+0398 (`Θ`)). + * So, to get a canonical form, we perform both lower- and uppercase. + * + * Using uppercase last makes sure keys will never interact with default + * prototypal values (such as `constructor`): nothing in the prototype of + * `Object` is uppercase. + * + * @param {string} value + * Identifier to normalize. + * @returns {string} + * Normalized identifier. + */ +function normalizeIdentifier(value) { + return ( + value + // Collapse markdown whitespace. + .replace(/[\t\n\r ]+/g, ' ') + // Trim. + .replace(/^ | $/g, '') + // Some characters are considered “uppercase”, but if their lowercase + // counterpart is uppercased will result in a different uppercase + // character. + // Hence, to get that form, we perform both lower- and uppercase. + // Upper case makes sure keys will not interact with default prototypal + // methods: no method is uppercase. + .toLowerCase() + .toUpperCase() + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + +/** @type {Construct} */ +const definition = { + name: 'definition', + tokenize: tokenizeDefinition +} + +/** @type {Construct} */ +const titleBefore = { + tokenize: tokenizeTitleBefore, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeDefinition(effects, ok, nok) { + const self = this + /** @type {string} */ + let identifier + return start + + /** + * At start of a definition. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Do not interrupt paragraphs (but do follow definitions). + // To do: do `interrupt` the way `markdown-rs` does. + // To do: parse whitespace the way `markdown-rs` does. + effects.enter('definition') + return before(code) + } + + /** + * After optional whitespace, at `[`. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + // To do: parse whitespace the way `markdown-rs` does. + + return factoryLabel.call( + self, + effects, + labelAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionLabel', + 'definitionLabelMarker', + 'definitionLabelString' + )(code) + } + + /** + * After label. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function labelAfter(code) { + identifier = normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + if (code === 58) { + effects.enter('definitionMarker') + effects.consume(code) + effects.exit('definitionMarker') + return markerAfter + } + return nok(code) + } + + /** + * After marker. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function markerAfter(code) { + // Note: whitespace is optional. + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, destinationBefore)(code) + : destinationBefore(code) + } + + /** + * Before destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationBefore(code) { + return factoryDestination( + effects, + destinationAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionDestination', + 'definitionDestinationLiteral', + 'definitionDestinationLiteralMarker', + 'definitionDestinationRaw', + 'definitionDestinationString' + )(code) + } + + /** + * After destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationAfter(code) { + return effects.attempt(titleBefore, after, after)(code) + } + + /** + * After definition. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return markdownSpace(code) + ? factorySpace(effects, afterWhitespace, 'whitespace')(code) + : afterWhitespace(code) + } + + /** + * After definition, after optional whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function afterWhitespace(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('definition') + + // Note: we don’t care about uniqueness. + // It’s likely that that doesn’t happen very frequently. + // It is more likely that it wastes precious time. + self.parser.defined.push(identifier) + + // To do: `markdown-rs` interrupt. + // // You’d be interrupting. + // tokenizer.interrupt = true + return ok(code) + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeTitleBefore(effects, ok, nok) { + return titleBefore + + /** + * After destination, at whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, beforeMarker)(code) + : nok(code) + } + + /** + * At title. + * + * ```markdown + * | [a]: b + * > | "c" + * ^ + * ``` + * + * @type {State} + */ + function beforeMarker(code) { + return factoryTitle( + effects, + titleAfter, + nok, + 'definitionTitle', + 'definitionTitleMarker', + 'definitionTitleString' + )(code) + } + + /** + * After title. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfter(code) { + return markdownSpace(code) + ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) + : titleAfterOptionalWhitespace(code) + } + + /** + * After title, after optional whitespace. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfterOptionalWhitespace(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const codeIndented = { + name: 'codeIndented', + tokenize: tokenizeCodeIndented +} + +/** @type {Construct} */ +const furtherStart = { + tokenize: tokenizeFurtherStart, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeIndented(effects, ok, nok) { + const self = this + return start + + /** + * Start of code (indented). + * + * > **Parsing note**: it is not needed to check if this first line is a + * > filled line (that it has a non-whitespace character), because blank lines + * > are parsed already, so we never run into that. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: manually check if interrupting like `markdown-rs`. + + effects.enter('codeIndented') + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? atBreak(code) + : nok(code) + } + + /** + * At a break. + * + * ```markdown + * > | aaa + * ^ ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === null) { + return after(code) + } + if (markdownLineEnding(code)) { + return effects.attempt(furtherStart, atBreak, after)(code) + } + effects.enter('codeFlowValue') + return inside(code) + } + + /** + * In code content. + * + * ```markdown + * > | aaa + * ^^^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return atBreak(code) + } + effects.consume(code) + return inside + } + + /** @type {State} */ + function after(code) { + effects.exit('codeIndented') + // To do: allow interrupting like `markdown-rs`. + // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeFurtherStart(effects, ok, nok) { + const self = this + return furtherStart + + /** + * At eol, trying to parse another indent. + * + * ```markdown + * > | aaa + * ^ + * | bbb + * ``` + * + * @type {State} + */ + function furtherStart(code) { + // To do: improve `lazy` / `pierce` handling. + // If this is a lazy line, it can’t be code. + if (self.parser.lazy[self.now().line]) { + return nok(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return furtherStart + } + + // To do: the code here in `micromark-js` is a bit different from + // `markdown-rs` because there it can attempt spaces. + // We can’t yet. + // + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? ok(code) + : markdownLineEnding(code) + ? furtherStart(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const headingAtx = { + name: 'headingAtx', + tokenize: tokenizeHeadingAtx, + resolve: resolveHeadingAtx +} + +/** @type {Resolver} */ +function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2 + let contentStart = 3 + /** @type {Token} */ + let content + /** @type {Token} */ + let text + + // Prefix whitespace, part of the opening. + if (events[contentStart][1].type === 'whitespace') { + contentStart += 2 + } + + // Suffix whitespace, part of the closing. + if ( + contentEnd - 2 > contentStart && + events[contentEnd][1].type === 'whitespace' + ) { + contentEnd -= 2 + } + if ( + events[contentEnd][1].type === 'atxHeadingSequence' && + (contentStart === contentEnd - 1 || + (contentEnd - 4 > contentStart && + events[contentEnd - 2][1].type === 'whitespace')) + ) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 + } + if (contentEnd > contentStart) { + content = { + type: 'atxHeadingText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end + } + text = { + type: 'chunkText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + contentType: 'text' + } + splice(events, contentStart, contentEnd - contentStart + 1, [ + ['enter', content, context], + ['enter', text, context], + ['exit', text, context], + ['exit', content, context] + ]) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHeadingAtx(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of a heading (atx). + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + effects.enter('atxHeading') + return before(code) + } + + /** + * After optional whitespace, at `#`. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('atxHeadingSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 35 && size++ < 6) { + effects.consume(code) + return sequenceOpen + } + + // Always at least one `#`. + if (code === null || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingSequence') + return atBreak(code) + } + return nok(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === 35) { + effects.enter('atxHeadingSequence') + return sequenceFurther(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('atxHeading') + // To do: interrupt like `markdown-rs`. + // // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } + if (markdownSpace(code)) { + return factorySpace(effects, atBreak, 'whitespace')(code) + } + + // To do: generate `data` tokens, add the `text` token later. + // Needs edit map, see: `markdown.rs`. + effects.enter('atxHeadingText') + return data(code) + } + + /** + * In further sequence (after whitespace). + * + * Could be normal “visible” hashes in the heading or a final sequence. + * + * ```markdown + * > | ## aa ## + * ^ + * ``` + * + * @type {State} + */ + function sequenceFurther(code) { + if (code === 35) { + effects.consume(code) + return sequenceFurther + } + effects.exit('atxHeadingSequence') + return atBreak(code) + } + + /** + * In text. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingText') + return atBreak(code) + } + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const setextUnderline = { + name: 'setextUnderline', + tokenize: tokenizeSetextUnderline, + resolveTo: resolveToSetextUnderline +} + +/** @type {Resolver} */ +function resolveToSetextUnderline(events, context) { + // To do: resolve like `markdown-rs`. + let index = events.length + /** @type {number | undefined} */ + let content + /** @type {number | undefined} */ + let text + /** @type {number | undefined} */ + let definition + + // Find the opening of the content. + // It’ll always exist: we don’t tokenize if it isn’t there. + while (index--) { + if (events[index][0] === 'enter') { + if (events[index][1].type === 'content') { + content = index + break + } + if (events[index][1].type === 'paragraph') { + text = index + } + } + // Exit + else { + if (events[index][1].type === 'content') { + // Remove the content end (if needed we’ll add it later) + events.splice(index, 1) + } + if (!definition && events[index][1].type === 'definition') { + definition = index + } + } + } + const heading = { + type: 'setextHeading', + start: Object.assign({}, events[text][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + + // Change the paragraph to setext heading text. + events[text][1].type = 'setextHeadingText' + + // If we have definitions in the content, we’ll keep on having content, + // but we need move it. + if (definition) { + events.splice(text, 0, ['enter', heading, context]) + events.splice(definition + 1, 0, ['exit', events[content][1], context]) + events[content][1].end = Object.assign({}, events[definition][1].end) + } else { + events[content][1] = heading + } + + // Add the heading exit at the end. + events.push(['exit', heading, context]) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeSetextUnderline(effects, ok, nok) { + const self = this + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * At start of heading (setext) underline. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + let index = self.events.length + /** @type {boolean | undefined} */ + let paragraph + // Find an opening. + while (index--) { + // Skip enter/exit of line ending, line prefix, and content. + // We can now either have a definition or a paragraph. + if ( + self.events[index][1].type !== 'lineEnding' && + self.events[index][1].type !== 'linePrefix' && + self.events[index][1].type !== 'content' + ) { + paragraph = self.events[index][1].type === 'paragraph' + break + } + } + + // To do: handle lazy/pierce like `markdown-rs`. + // To do: parse indent like `markdown-rs`. + if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { + effects.enter('setextHeadingLine') + marker = code + return before(code) + } + return nok(code) + } + + /** + * After optional whitespace, at `-` or `=`. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('setextHeadingLineSequence') + return inside(code) + } + + /** + * In sequence. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + effects.exit('setextHeadingLineSequence') + return markdownSpace(code) + ? factorySpace(effects, after, 'lineSuffix')(code) + : after(code) + } + + /** + * After sequence, after optional whitespace. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('setextHeadingLine') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js +/** + * List of lowercase HTML “block” tag names. + * + * The list, when parsing HTML (flow), results in more relaxed rules (condition + * 6). + * Because they are known blocks, the HTML-like syntax doesn’t have to be + * strictly parsed. + * For tag names not in this list, a more strict algorithm (condition 7) is used + * to detect whether the HTML-like syntax is seen as HTML (flow) or not. + * + * This is copied from: + * <https://spec.commonmark.org/0.30/#html-blocks>. + * + * > 👉 **Note**: `search` was added in `CommonMark@0.31`. + */ +const htmlBlockNames = [ + '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' +] + +/** + * List of lowercase HTML “raw” tag names. + * + * The list, when parsing HTML (flow), results in HTML that can include lines + * without exiting, until a closing tag also in this list is found (condition + * 1). + * + * This module is copied from: + * <https://spec.commonmark.org/0.30/#html-blocks>. + * + * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. + */ +const htmlRawNames = ['pre', 'script', 'style', 'textarea'] + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + +/** @type {Construct} */ +const htmlFlow = { + name: 'htmlFlow', + tokenize: tokenizeHtmlFlow, + resolveTo: resolveToHtmlFlow, + concrete: true +} + +/** @type {Construct} */ +const blankLineBefore = { + tokenize: tokenizeBlankLineBefore, + partial: true +} +const nonLazyContinuationStart = { + tokenize: tokenizeNonLazyContinuationStart, + partial: true +} + +/** @type {Resolver} */ +function resolveToHtmlFlow(events) { + let index = events.length + while (index--) { + if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { + break + } + } + if (index > 1 && events[index - 2][1].type === 'linePrefix') { + // Add the prefix start to the HTML token. + events[index][1].start = events[index - 2][1].start + // Add the prefix start to the HTML line token. + events[index + 1][1].start = events[index - 2][1].start + // Remove the line prefix. + events.splice(index - 2, 2) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlFlow(effects, ok, nok) { + const self = this + /** @type {number} */ + let marker + /** @type {boolean} */ + let closingTag + /** @type {string} */ + let buffer + /** @type {number} */ + let index + /** @type {Code} */ + let markerB + return start + + /** + * Start of HTML (flow). + * + * ```markdown + * > | <x /> + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * At `<`, after optional whitespace. + * + * ```markdown + * > | <x /> + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('htmlFlow') + effects.enter('htmlFlowData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | <x /> + * ^ + * > | <!doctype> + * ^ + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + closingTag = true + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + marker = 3 + // To do: + // tokenizer.concrete = true + // To do: use `markdown-rs` style interrupt. + // While we’re in an instruction instead of a declaration, we’re on a `?` + // right now, so we do need to search for `>`, similar to declarations. + return self.interrupt ? ok : continuationDeclarationInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After `<!`, at declaration, comment, or CDATA. + * + * ```markdown + * > | <!doctype> + * ^ + * > | <!--xxx--> + * ^ + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + marker = 2 + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + marker = 5 + index = 0 + return cdataOpenInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + marker = 4 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After `<!-`, inside a comment, at another `-`. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After `<![`, inside CDATA, expecting `CDATA[`. + * + * ```markdown + * > | <![CDATA[>&<]]> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + if (index === value.length) { + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return cdataOpenInside + } + return nok(code) + } + + /** + * After `</`, in closing tag, at tag name. + * + * ```markdown + * > | </x> + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * In tag name. + * + * ```markdown + * > | <ab> + * ^^ + * > | </ab> + * ^^ + * ``` + * + * @type {State} + */ + function tagName(code) { + if ( + code === null || + code === 47 || + code === 62 || + markdownLineEndingOrSpace(code) + ) { + const slash = code === 47 + const name = buffer.toLowerCase() + if (!slash && !closingTag && htmlRawNames.includes(name)) { + marker = 1 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + if (htmlBlockNames.includes(buffer.toLowerCase())) { + marker = 6 + if (slash) { + effects.consume(code) + return basicSelfClosing + } + + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + marker = 7 + // Do not support complete HTML when interrupting. + return self.interrupt && !self.parser.lazy[self.now().line] + ? nok(code) + : closingTag + ? completeClosingTagAfter(code) + : completeAttributeNameBefore(code) + } + + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + buffer += String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After closing slash of a basic tag name. + * + * ```markdown + * > | <div/> + * ^ + * ``` + * + * @type {State} + */ + function basicSelfClosing(code) { + if (code === 62) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return nok(code) + } + + /** + * After closing slash of a complete tag name. + * + * ```markdown + * > | <x/> + * ^ + * ``` + * + * @type {State} + */ + function completeClosingTagAfter(code) { + if (markdownSpace(code)) { + effects.consume(code) + return completeClosingTagAfter + } + return completeEnd(code) + } + + /** + * At an attribute name. + * + * At first, this state is used after a complete tag name, after whitespace, + * where it expects optional attributes or the end of the tag. + * It is also reused after attributes, when expecting more optional + * attributes. + * + * ```markdown + * > | <a /> + * ^ + * > | <a :b> + * ^ + * > | <a _b> + * ^ + * > | <a b> + * ^ + * > | <a > + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameBefore(code) { + if (code === 47) { + effects.consume(code) + return completeEnd + } + + // ASCII alphanumerical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return completeAttributeName + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameBefore + } + return completeEnd(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | <a :b> + * ^ + * > | <a _b> + * ^ + * > | <a b> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeName(code) { + // ASCII alphanumerical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return completeAttributeName + } + return completeAttributeNameAfter(code) + } + + /** + * After attribute name, at an optional initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | <a b> + * ^ + * > | <a b=c> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return completeAttributeValueBefore + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameAfter + } + return completeAttributeNameBefore(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | <a b=c> + * ^ + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + markerB = code + return completeAttributeValueQuoted + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeValueBefore + } + return completeAttributeValueUnquoted(code) + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | <a b="c"> + * ^ + * > | <a b='c'> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuoted(code) { + if (code === markerB) { + effects.consume(code) + markerB = null + return completeAttributeValueQuotedAfter + } + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return completeAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | <a b=c> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 47 || + code === 60 || + code === 61 || + code === 62 || + code === 96 || + markdownLineEndingOrSpace(code) + ) { + return completeAttributeNameAfter(code) + } + effects.consume(code) + return completeAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the + * end of the tag. + * + * ```markdown + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownSpace(code)) { + return completeAttributeNameBefore(code) + } + return nok(code) + } + + /** + * In certain circumstances of a complete tag where only an `>` is allowed. + * + * ```markdown + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeEnd(code) { + if (code === 62) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * After `>` in a complete tag. + * + * ```markdown + * > | <x> + * ^ + * ``` + * + * @type {State} + */ + function completeAfter(code) { + if (code === null || markdownLineEnding(code)) { + // // Do not form containers. + // tokenizer.concrete = true + return continuation(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * In continuation of any HTML kind. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function continuation(code) { + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationCommentInside + } + if (code === 60 && marker === 1) { + effects.consume(code) + return continuationRawTagOpen + } + if (code === 62 && marker === 4) { + effects.consume(code) + return continuationClose + } + if (code === 63 && marker === 3) { + effects.consume(code) + return continuationDeclarationInside + } + if (code === 93 && marker === 5) { + effects.consume(code) + return continuationCdataInside + } + if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { + effects.exit('htmlFlowData') + return effects.check( + blankLineBefore, + continuationAfter, + continuationStart + )(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationStart(code) + } + effects.consume(code) + return continuation + } + + /** + * In continuation, at eol. + * + * ```markdown + * > | <x> + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStart(code) { + return effects.check( + nonLazyContinuationStart, + continuationStartNonLazy, + continuationAfter + )(code) + } + + /** + * In continuation, at eol, before non-lazy content. + * + * ```markdown + * > | <x> + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStartNonLazy(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return continuationBefore + } + + /** + * In continuation, before non-lazy content. + * + * ```markdown + * | <x> + * > | asd + * ^ + * ``` + * + * @type {State} + */ + function continuationBefore(code) { + if (code === null || markdownLineEnding(code)) { + return continuationStart(code) + } + effects.enter('htmlFlowData') + return continuation(code) + } + + /** + * In comment continuation, after one `-`, expecting another. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function continuationCommentInside(code) { + if (code === 45) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In raw continuation, after `<`, at `/`. + * + * ```markdown + * > | <script>console.log(1)</script> + * ^ + * ``` + * + * @type {State} + */ + function continuationRawTagOpen(code) { + if (code === 47) { + effects.consume(code) + buffer = '' + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In raw continuation, after `</`, in a raw tag name. + * + * ```markdown + * > | <script>console.log(1)</script> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function continuationRawEndTag(code) { + if (code === 62) { + const name = buffer.toLowerCase() + if (htmlRawNames.includes(name)) { + effects.consume(code) + return continuationClose + } + return continuation(code) + } + if (asciiAlpha(code) && buffer.length < 8) { + effects.consume(code) + // @ts-expect-error: not null. + buffer += String.fromCharCode(code) + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In cdata continuation, after `]`, expecting `]>`. + * + * ```markdown + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationCdataInside(code) { + if (code === 93) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In declaration or instruction continuation, at `>`. + * + * ```markdown + * > | <!--> + * ^ + * > | <?> + * ^ + * > | <!q> + * ^ + * > | <!--ab--> + * ^ + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationDeclarationInside(code) { + if (code === 62) { + effects.consume(code) + return continuationClose + } + + // More dashes. + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In closed continuation: everything we get until the eol/eof is part of it. + * + * ```markdown + * > | <!doctype> + * ^ + * ``` + * + * @type {State} + */ + function continuationClose(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationAfter(code) + } + effects.consume(code) + return continuationClose + } + + /** + * Done. + * + * ```markdown + * > | <!doctype> + * ^ + * ``` + * + * @type {State} + */ + function continuationAfter(code) { + effects.exit('htmlFlow') + // // Feel free to interrupt. + // tokenizer.interrupt = false + // // No longer concrete. + // tokenizer.concrete = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuationStart(effects, ok, nok) { + const self = this + return start + + /** + * At eol, before continuation. + * + * ```markdown + * > | * ```js + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return after + } + return nok(code) + } + + /** + * A continuation. + * + * ```markdown + * | * ```js + * > | b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLineBefore(effects, ok, nok) { + return start + + /** + * Before eol, expecting blank line. + * + * ```markdown + * > | <div> + * ^ + * | + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return effects.attempt(blankLine, ok, nok) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const nonLazyContinuation = { + tokenize: tokenizeNonLazyContinuation, + partial: true +} + +/** @type {Construct} */ +const codeFenced = { + name: 'codeFenced', + tokenize: tokenizeCodeFenced, + concrete: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeFenced(effects, ok, nok) { + const self = this + /** @type {Construct} */ + const closeStart = { + tokenize: tokenizeCloseStart, + partial: true + } + let initialPrefix = 0 + let sizeOpen = 0 + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of code. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse whitespace like `markdown-rs`. + return beforeSequenceOpen(code) + } + + /** + * In opening fence, after prefix, at sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeSequenceOpen(code) { + const tail = self.events[self.events.length - 1] + initialPrefix = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + marker = code + effects.enter('codeFenced') + effects.enter('codeFencedFence') + effects.enter('codeFencedFenceSequence') + return sequenceOpen(code) + } + + /** + * In opening fence sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === marker) { + sizeOpen++ + effects.consume(code) + return sequenceOpen + } + if (sizeOpen < 3) { + return nok(code) + } + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, infoBefore, 'whitespace')(code) + : infoBefore(code) + } + + /** + * In opening fence, after the sequence (and optional whitespace), before info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function infoBefore(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return self.interrupt + ? ok(code) + : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFencedFenceInfo') + effects.enter('chunkString', { + contentType: 'string' + }) + return info(code) + } + + /** + * In info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function info(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return infoBefore(code) + } + if (markdownSpace(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return factorySpace(effects, metaBefore, 'whitespace')(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return info + } + + /** + * In opening fence, after info and whitespace, before meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function metaBefore(code) { + if (code === null || markdownLineEnding(code)) { + return infoBefore(code) + } + effects.enter('codeFencedFenceMeta') + effects.enter('chunkString', { + contentType: 'string' + }) + return meta(code) + } + + /** + * In meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function meta(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceMeta') + return infoBefore(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return meta + } + + /** + * At eol/eof in code, before a non-lazy closing fence or content. + * + * ```markdown + * > | ~~~js + * ^ + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function atNonLazyBreak(code) { + return effects.attempt(closeStart, after, contentBefore)(code) + } + + /** + * Before code content, not a closing fence, at eol. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return contentStart + } + + /** + * Before code content, not a closing fence. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentStart(code) { + return initialPrefix > 0 && markdownSpace(code) + ? factorySpace( + effects, + beforeContentChunk, + 'linePrefix', + initialPrefix + 1 + )(code) + : beforeContentChunk(code) + } + + /** + * Before code content, after optional prefix. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeContentChunk(code) { + if (code === null || markdownLineEnding(code)) { + return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFlowValue') + return contentChunk(code) + } + + /** + * In code content. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^^^^^^^^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentChunk(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return beforeContentChunk(code) + } + effects.consume(code) + return contentChunk + } + + /** + * After code. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + effects.exit('codeFenced') + return ok(code) + } + + /** + * @this {TokenizeContext} + * @type {Tokenizer} + */ + function tokenizeCloseStart(effects, ok, nok) { + let size = 0 + return startBefore + + /** + * + * + * @type {State} + */ + function startBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return start + } + + /** + * Before closing fence, at optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Always populated by defaults. + + // To do: `enter` here or in next state? + effects.enter('codeFencedFence') + return markdownSpace(code) + ? factorySpace( + effects, + beforeSequenceClose, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : beforeSequenceClose(code) + } + + /** + * In closing fence, after optional whitespace, at sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function beforeSequenceClose(code) { + if (code === marker) { + effects.enter('codeFencedFenceSequence') + return sequenceClose(code) + } + return nok(code) + } + + /** + * In closing fence sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + if (code === marker) { + size++ + effects.consume(code) + return sequenceClose + } + if (size >= sizeOpen) { + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) + : sequenceCloseAfter(code) + } + return nok(code) + } + + /** + * After closing fence sequence, after optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceCloseAfter(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return ok(code) + } + return nok(code) + } + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuation(effects, ok, nok) { + const self = this + return start + + /** + * + * + * @type {State} + */ + function start(code) { + if (code === null) { + return nok(code) + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineStart + } + + /** + * + * + * @type {State} + */ + function lineStart(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/character-entities/index.js +/** + * Map of named character references. + * + * @type {Record<string, string>} + */ +const characterEntities = { + AElig: 'Æ', + AMP: '&', + Aacute: 'Á', + Abreve: 'Ă', + Acirc: 'Â', + Acy: 'А', + Afr: '𝔄', + Agrave: 'À', + Alpha: 'Α', + Amacr: 'Ā', + And: '⩓', + Aogon: 'Ą', + Aopf: '𝔸', + ApplyFunction: '⁡', + Aring: 'Å', + Ascr: '𝒜', + Assign: '≔', + Atilde: 'Ã', + Auml: 'Ä', + Backslash: '∖', + Barv: '⫧', + Barwed: '⌆', + Bcy: 'Б', + Because: '∵', + Bernoullis: 'ℬ', + Beta: 'Β', + Bfr: '𝔅', + Bopf: '𝔹', + Breve: '˘', + Bscr: 'ℬ', + Bumpeq: '≎', + CHcy: 'Ч', + COPY: '©', + Cacute: 'Ć', + Cap: '⋒', + CapitalDifferentialD: 'ⅅ', + Cayleys: 'ℭ', + Ccaron: 'Č', + Ccedil: 'Ç', + Ccirc: 'Ĉ', + Cconint: '∰', + Cdot: 'Ċ', + Cedilla: '¸', + CenterDot: '·', + Cfr: 'ℭ', + Chi: 'Χ', + CircleDot: '⊙', + CircleMinus: '⊖', + CirclePlus: '⊕', + CircleTimes: '⊗', + ClockwiseContourIntegral: '∲', + CloseCurlyDoubleQuote: '”', + CloseCurlyQuote: '’', + Colon: '∷', + Colone: '⩴', + Congruent: '≡', + Conint: '∯', + ContourIntegral: '∮', + Copf: 'ℂ', + Coproduct: '∐', + CounterClockwiseContourIntegral: '∳', + Cross: '⨯', + Cscr: '𝒞', + Cup: '⋓', + CupCap: '≍', + DD: 'ⅅ', + DDotrahd: '⤑', + DJcy: 'Ђ', + DScy: 'Ѕ', + DZcy: 'Џ', + Dagger: '‡', + Darr: '↡', + Dashv: '⫤', + Dcaron: 'Ď', + Dcy: 'Д', + Del: '∇', + Delta: 'Δ', + Dfr: '𝔇', + DiacriticalAcute: '´', + DiacriticalDot: '˙', + DiacriticalDoubleAcute: '˝', + DiacriticalGrave: '`', + DiacriticalTilde: '˜', + Diamond: '⋄', + DifferentialD: 'ⅆ', + Dopf: '𝔻', + Dot: '¨', + DotDot: '⃜', + DotEqual: '≐', + DoubleContourIntegral: '∯', + DoubleDot: '¨', + DoubleDownArrow: '⇓', + DoubleLeftArrow: '⇐', + DoubleLeftRightArrow: '⇔', + DoubleLeftTee: '⫤', + DoubleLongLeftArrow: '⟸', + DoubleLongLeftRightArrow: '⟺', + DoubleLongRightArrow: '⟹', + DoubleRightArrow: '⇒', + DoubleRightTee: '⊨', + DoubleUpArrow: '⇑', + DoubleUpDownArrow: '⇕', + DoubleVerticalBar: '∥', + DownArrow: '↓', + DownArrowBar: '⤓', + DownArrowUpArrow: '⇵', + DownBreve: '̑', + DownLeftRightVector: '⥐', + DownLeftTeeVector: '⥞', + DownLeftVector: '↽', + DownLeftVectorBar: '⥖', + DownRightTeeVector: '⥟', + DownRightVector: '⇁', + DownRightVectorBar: '⥗', + DownTee: '⊤', + DownTeeArrow: '↧', + Downarrow: '⇓', + Dscr: '𝒟', + Dstrok: 'Đ', + ENG: 'Ŋ', + ETH: 'Ð', + Eacute: 'É', + Ecaron: 'Ě', + Ecirc: 'Ê', + Ecy: 'Э', + Edot: 'Ė', + Efr: '𝔈', + Egrave: 'È', + Element: '∈', + Emacr: 'Ē', + EmptySmallSquare: '◻', + EmptyVerySmallSquare: '▫', + Eogon: 'Ę', + Eopf: '𝔼', + Epsilon: 'Ε', + Equal: '⩵', + EqualTilde: '≂', + Equilibrium: '⇌', + Escr: 'ℰ', + Esim: '⩳', + Eta: 'Η', + Euml: 'Ë', + Exists: '∃', + ExponentialE: 'ⅇ', + Fcy: 'Ф', + Ffr: '𝔉', + FilledSmallSquare: '◼', + FilledVerySmallSquare: '▪', + Fopf: '𝔽', + ForAll: '∀', + Fouriertrf: 'ℱ', + Fscr: 'ℱ', + GJcy: 'Ѓ', + GT: '>', + Gamma: 'Γ', + Gammad: 'Ϝ', + Gbreve: 'Ğ', + Gcedil: 'Ģ', + Gcirc: 'Ĝ', + Gcy: 'Г', + Gdot: 'Ġ', + Gfr: '𝔊', + Gg: '⋙', + Gopf: '𝔾', + GreaterEqual: '≥', + GreaterEqualLess: '⋛', + GreaterFullEqual: '≧', + GreaterGreater: '⪢', + GreaterLess: '≷', + GreaterSlantEqual: '⩾', + GreaterTilde: '≳', + Gscr: '𝒢', + Gt: '≫', + HARDcy: 'Ъ', + Hacek: 'ˇ', + Hat: '^', + Hcirc: 'Ĥ', + Hfr: 'ℌ', + HilbertSpace: 'ℋ', + Hopf: 'ℍ', + HorizontalLine: '─', + Hscr: 'ℋ', + Hstrok: 'Ħ', + HumpDownHump: '≎', + HumpEqual: '≏', + IEcy: 'Е', + IJlig: 'IJ', + IOcy: 'Ё', + Iacute: 'Í', + Icirc: 'Î', + Icy: 'И', + Idot: 'İ', + Ifr: 'ℑ', + Igrave: 'Ì', + Im: 'ℑ', + Imacr: 'Ī', + ImaginaryI: 'ⅈ', + Implies: '⇒', + Int: '∬', + Integral: '∫', + Intersection: '⋂', + InvisibleComma: '⁣', + InvisibleTimes: '⁢', + Iogon: 'Į', + Iopf: '𝕀', + Iota: 'Ι', + Iscr: 'ℐ', + Itilde: 'Ĩ', + Iukcy: 'І', + Iuml: 'Ï', + Jcirc: 'Ĵ', + Jcy: 'Й', + Jfr: '𝔍', + Jopf: '𝕁', + Jscr: '𝒥', + Jsercy: 'Ј', + Jukcy: 'Є', + KHcy: 'Х', + KJcy: 'Ќ', + Kappa: 'Κ', + Kcedil: 'Ķ', + Kcy: 'К', + Kfr: '𝔎', + Kopf: '𝕂', + Kscr: '𝒦', + LJcy: 'Љ', + LT: '<', + Lacute: 'Ĺ', + Lambda: 'Λ', + Lang: '⟪', + Laplacetrf: 'ℒ', + Larr: '↞', + Lcaron: 'Ľ', + Lcedil: 'Ļ', + Lcy: 'Л', + LeftAngleBracket: '⟨', + LeftArrow: '←', + LeftArrowBar: '⇤', + LeftArrowRightArrow: '⇆', + LeftCeiling: '⌈', + LeftDoubleBracket: '⟦', + LeftDownTeeVector: '⥡', + LeftDownVector: '⇃', + LeftDownVectorBar: '⥙', + LeftFloor: '⌊', + LeftRightArrow: '↔', + LeftRightVector: '⥎', + LeftTee: '⊣', + LeftTeeArrow: '↤', + LeftTeeVector: '⥚', + LeftTriangle: '⊲', + LeftTriangleBar: '⧏', + LeftTriangleEqual: '⊴', + LeftUpDownVector: '⥑', + LeftUpTeeVector: '⥠', + LeftUpVector: '↿', + LeftUpVectorBar: '⥘', + LeftVector: '↼', + LeftVectorBar: '⥒', + Leftarrow: '⇐', + Leftrightarrow: '⇔', + LessEqualGreater: '⋚', + LessFullEqual: '≦', + LessGreater: '≶', + LessLess: '⪡', + LessSlantEqual: '⩽', + LessTilde: '≲', + Lfr: '𝔏', + Ll: '⋘', + Lleftarrow: '⇚', + Lmidot: 'Ŀ', + LongLeftArrow: '⟵', + LongLeftRightArrow: '⟷', + LongRightArrow: '⟶', + Longleftarrow: '⟸', + Longleftrightarrow: '⟺', + Longrightarrow: '⟹', + Lopf: '𝕃', + LowerLeftArrow: '↙', + LowerRightArrow: '↘', + Lscr: 'ℒ', + Lsh: '↰', + Lstrok: 'Ł', + Lt: '≪', + Map: '⤅', + Mcy: 'М', + MediumSpace: ' ', + Mellintrf: 'ℳ', + Mfr: '𝔐', + MinusPlus: '∓', + Mopf: '𝕄', + Mscr: 'ℳ', + Mu: 'Μ', + NJcy: 'Њ', + Nacute: 'Ń', + Ncaron: 'Ň', + Ncedil: 'Ņ', + Ncy: 'Н', + NegativeMediumSpace: '​', + NegativeThickSpace: '​', + NegativeThinSpace: '​', + NegativeVeryThinSpace: '​', + NestedGreaterGreater: '≫', + NestedLessLess: '≪', + NewLine: '\n', + Nfr: '𝔑', + NoBreak: '⁠', + NonBreakingSpace: ' ', + Nopf: 'ℕ', + Not: '⫬', + NotCongruent: '≢', + NotCupCap: '≭', + NotDoubleVerticalBar: '∦', + NotElement: '∉', + NotEqual: '≠', + NotEqualTilde: '≂̸', + NotExists: '∄', + NotGreater: '≯', + NotGreaterEqual: '≱', + NotGreaterFullEqual: '≧̸', + NotGreaterGreater: '≫̸', + NotGreaterLess: '≹', + NotGreaterSlantEqual: '⩾̸', + NotGreaterTilde: '≵', + NotHumpDownHump: '≎̸', + NotHumpEqual: '≏̸', + NotLeftTriangle: '⋪', + NotLeftTriangleBar: '⧏̸', + NotLeftTriangleEqual: '⋬', + NotLess: '≮', + NotLessEqual: '≰', + NotLessGreater: '≸', + NotLessLess: '≪̸', + NotLessSlantEqual: '⩽̸', + NotLessTilde: '≴', + NotNestedGreaterGreater: '⪢̸', + NotNestedLessLess: '⪡̸', + NotPrecedes: '⊀', + NotPrecedesEqual: '⪯̸', + NotPrecedesSlantEqual: '⋠', + NotReverseElement: '∌', + NotRightTriangle: '⋫', + NotRightTriangleBar: '⧐̸', + NotRightTriangleEqual: '⋭', + NotSquareSubset: '⊏̸', + NotSquareSubsetEqual: '⋢', + NotSquareSuperset: '⊐̸', + NotSquareSupersetEqual: '⋣', + NotSubset: '⊂⃒', + NotSubsetEqual: '⊈', + NotSucceeds: '⊁', + NotSucceedsEqual: '⪰̸', + NotSucceedsSlantEqual: '⋡', + NotSucceedsTilde: '≿̸', + NotSuperset: '⊃⃒', + NotSupersetEqual: '⊉', + NotTilde: '≁', + NotTildeEqual: '≄', + NotTildeFullEqual: '≇', + NotTildeTilde: '≉', + NotVerticalBar: '∤', + Nscr: '𝒩', + Ntilde: 'Ñ', + Nu: 'Ν', + OElig: 'Œ', + Oacute: 'Ó', + Ocirc: 'Ô', + Ocy: 'О', + Odblac: 'Ő', + Ofr: '𝔒', + Ograve: 'Ò', + Omacr: 'Ō', + Omega: 'Ω', + Omicron: 'Ο', + Oopf: '𝕆', + OpenCurlyDoubleQuote: '“', + OpenCurlyQuote: '‘', + Or: '⩔', + Oscr: '𝒪', + Oslash: 'Ø', + Otilde: 'Õ', + Otimes: '⨷', + Ouml: 'Ö', + OverBar: '‾', + OverBrace: '⏞', + OverBracket: '⎴', + OverParenthesis: '⏜', + PartialD: '∂', + Pcy: 'П', + Pfr: '𝔓', + Phi: 'Φ', + Pi: 'Π', + PlusMinus: '±', + Poincareplane: 'ℌ', + Popf: 'ℙ', + Pr: '⪻', + Precedes: '≺', + PrecedesEqual: '⪯', + PrecedesSlantEqual: '≼', + PrecedesTilde: '≾', + Prime: '″', + Product: '∏', + Proportion: '∷', + Proportional: '∝', + Pscr: '𝒫', + Psi: 'Ψ', + QUOT: '"', + Qfr: '𝔔', + Qopf: 'ℚ', + Qscr: '𝒬', + RBarr: '⤐', + REG: '®', + Racute: 'Ŕ', + Rang: '⟫', + Rarr: '↠', + Rarrtl: '⤖', + Rcaron: 'Ř', + Rcedil: 'Ŗ', + Rcy: 'Р', + Re: 'ℜ', + ReverseElement: '∋', + ReverseEquilibrium: '⇋', + ReverseUpEquilibrium: '⥯', + Rfr: 'ℜ', + Rho: 'Ρ', + RightAngleBracket: '⟩', + RightArrow: '→', + RightArrowBar: '⇥', + RightArrowLeftArrow: '⇄', + RightCeiling: '⌉', + RightDoubleBracket: '⟧', + RightDownTeeVector: '⥝', + RightDownVector: '⇂', + RightDownVectorBar: '⥕', + RightFloor: '⌋', + RightTee: '⊢', + RightTeeArrow: '↦', + RightTeeVector: '⥛', + RightTriangle: '⊳', + RightTriangleBar: '⧐', + RightTriangleEqual: '⊵', + RightUpDownVector: '⥏', + RightUpTeeVector: '⥜', + RightUpVector: '↾', + RightUpVectorBar: '⥔', + RightVector: '⇀', + RightVectorBar: '⥓', + Rightarrow: '⇒', + Ropf: 'ℝ', + RoundImplies: '⥰', + Rrightarrow: '⇛', + Rscr: 'ℛ', + Rsh: '↱', + RuleDelayed: '⧴', + SHCHcy: 'Щ', + SHcy: 'Ш', + SOFTcy: 'Ь', + Sacute: 'Ś', + Sc: '⪼', + Scaron: 'Š', + Scedil: 'Ş', + Scirc: 'Ŝ', + Scy: 'С', + Sfr: '𝔖', + ShortDownArrow: '↓', + ShortLeftArrow: '←', + ShortRightArrow: '→', + ShortUpArrow: '↑', + Sigma: 'Σ', + SmallCircle: '∘', + Sopf: '𝕊', + Sqrt: '√', + Square: '□', + SquareIntersection: '⊓', + SquareSubset: '⊏', + SquareSubsetEqual: '⊑', + SquareSuperset: '⊐', + SquareSupersetEqual: '⊒', + SquareUnion: '⊔', + Sscr: '𝒮', + Star: '⋆', + Sub: '⋐', + Subset: '⋐', + SubsetEqual: '⊆', + Succeeds: '≻', + SucceedsEqual: '⪰', + SucceedsSlantEqual: '≽', + SucceedsTilde: '≿', + SuchThat: '∋', + Sum: '∑', + Sup: '⋑', + Superset: '⊃', + SupersetEqual: '⊇', + Supset: '⋑', + THORN: 'Þ', + TRADE: '™', + TSHcy: 'Ћ', + TScy: 'Ц', + Tab: '\t', + Tau: 'Τ', + Tcaron: 'Ť', + Tcedil: 'Ţ', + Tcy: 'Т', + Tfr: '𝔗', + Therefore: '∴', + Theta: 'Θ', + ThickSpace: '  ', + ThinSpace: ' ', + Tilde: '∼', + TildeEqual: '≃', + TildeFullEqual: '≅', + TildeTilde: '≈', + Topf: '𝕋', + TripleDot: '⃛', + Tscr: '𝒯', + Tstrok: 'Ŧ', + Uacute: 'Ú', + Uarr: '↟', + Uarrocir: '⥉', + Ubrcy: 'Ў', + Ubreve: 'Ŭ', + Ucirc: 'Û', + Ucy: 'У', + Udblac: 'Ű', + Ufr: '𝔘', + Ugrave: 'Ù', + Umacr: 'Ū', + UnderBar: '_', + UnderBrace: '⏟', + UnderBracket: '⎵', + UnderParenthesis: '⏝', + Union: '⋃', + UnionPlus: '⊎', + Uogon: 'Ų', + Uopf: '𝕌', + UpArrow: '↑', + UpArrowBar: '⤒', + UpArrowDownArrow: '⇅', + UpDownArrow: '↕', + UpEquilibrium: '⥮', + UpTee: '⊥', + UpTeeArrow: '↥', + Uparrow: '⇑', + Updownarrow: '⇕', + UpperLeftArrow: '↖', + UpperRightArrow: '↗', + Upsi: 'ϒ', + Upsilon: 'Υ', + Uring: 'Ů', + Uscr: '𝒰', + Utilde: 'Ũ', + Uuml: 'Ü', + VDash: '⊫', + Vbar: '⫫', + Vcy: 'В', + Vdash: '⊩', + Vdashl: '⫦', + Vee: '⋁', + Verbar: '‖', + Vert: '‖', + VerticalBar: '∣', + VerticalLine: '|', + VerticalSeparator: '❘', + VerticalTilde: '≀', + VeryThinSpace: ' ', + Vfr: '𝔙', + Vopf: '𝕍', + Vscr: '𝒱', + Vvdash: '⊪', + Wcirc: 'Ŵ', + Wedge: '⋀', + Wfr: '𝔚', + Wopf: '𝕎', + Wscr: '𝒲', + Xfr: '𝔛', + Xi: 'Ξ', + Xopf: '𝕏', + Xscr: '𝒳', + YAcy: 'Я', + YIcy: 'Ї', + YUcy: 'Ю', + Yacute: 'Ý', + Ycirc: 'Ŷ', + Ycy: 'Ы', + Yfr: '𝔜', + Yopf: '𝕐', + Yscr: '𝒴', + Yuml: 'Ÿ', + ZHcy: 'Ж', + Zacute: 'Ź', + Zcaron: 'Ž', + Zcy: 'З', + Zdot: 'Ż', + ZeroWidthSpace: '​', + Zeta: 'Ζ', + Zfr: 'ℨ', + Zopf: 'ℤ', + Zscr: '𝒵', + aacute: 'á', + abreve: 'ă', + ac: '∾', + acE: '∾̳', + acd: '∿', + acirc: 'â', + acute: '´', + acy: 'а', + aelig: 'æ', + af: '⁡', + afr: '𝔞', + agrave: 'à', + alefsym: 'ℵ', + aleph: 'ℵ', + alpha: 'α', + amacr: 'ā', + amalg: '⨿', + amp: '&', + and: '∧', + andand: '⩕', + andd: '⩜', + andslope: '⩘', + andv: '⩚', + ang: '∠', + ange: '⦤', + angle: '∠', + angmsd: '∡', + angmsdaa: '⦨', + angmsdab: '⦩', + angmsdac: '⦪', + angmsdad: '⦫', + angmsdae: '⦬', + angmsdaf: '⦭', + angmsdag: '⦮', + angmsdah: '⦯', + angrt: '∟', + angrtvb: '⊾', + angrtvbd: '⦝', + angsph: '∢', + angst: 'Å', + angzarr: '⍼', + aogon: 'ą', + aopf: '𝕒', + ap: '≈', + apE: '⩰', + apacir: '⩯', + ape: '≊', + apid: '≋', + apos: "'", + approx: '≈', + approxeq: '≊', + aring: 'å', + ascr: '𝒶', + ast: '*', + asymp: '≈', + asympeq: '≍', + atilde: 'ã', + auml: 'ä', + awconint: '∳', + awint: '⨑', + bNot: '⫭', + backcong: '≌', + backepsilon: '϶', + backprime: '‵', + backsim: '∽', + backsimeq: '⋍', + barvee: '⊽', + barwed: '⌅', + barwedge: '⌅', + bbrk: '⎵', + bbrktbrk: '⎶', + bcong: '≌', + bcy: 'б', + bdquo: '„', + becaus: '∵', + because: '∵', + bemptyv: '⦰', + bepsi: '϶', + bernou: 'ℬ', + beta: 'β', + beth: 'ℶ', + between: '≬', + bfr: '𝔟', + bigcap: '⋂', + bigcirc: '◯', + bigcup: '⋃', + bigodot: '⨀', + bigoplus: '⨁', + bigotimes: '⨂', + bigsqcup: '⨆', + bigstar: '★', + bigtriangledown: '▽', + bigtriangleup: '△', + biguplus: '⨄', + bigvee: '⋁', + bigwedge: '⋀', + bkarow: '⤍', + blacklozenge: '⧫', + blacksquare: '▪', + blacktriangle: '▴', + blacktriangledown: '▾', + blacktriangleleft: '◂', + blacktriangleright: '▸', + blank: '␣', + blk12: '▒', + blk14: '░', + blk34: '▓', + block: '█', + bne: '=⃥', + bnequiv: '≡⃥', + bnot: '⌐', + bopf: '𝕓', + bot: '⊥', + bottom: '⊥', + bowtie: '⋈', + boxDL: '╗', + boxDR: '╔', + boxDl: '╖', + boxDr: '╓', + boxH: '═', + boxHD: '╦', + boxHU: '╩', + boxHd: '╤', + boxHu: '╧', + boxUL: '╝', + boxUR: '╚', + boxUl: '╜', + boxUr: '╙', + boxV: '║', + boxVH: '╬', + boxVL: '╣', + boxVR: '╠', + boxVh: '╫', + boxVl: '╢', + boxVr: '╟', + boxbox: '⧉', + boxdL: '╕', + boxdR: '╒', + boxdl: '┐', + boxdr: '┌', + boxh: '─', + boxhD: '╥', + boxhU: '╨', + boxhd: '┬', + boxhu: '┴', + boxminus: '⊟', + boxplus: '⊞', + boxtimes: '⊠', + boxuL: '╛', + boxuR: '╘', + boxul: '┘', + boxur: '└', + boxv: '│', + boxvH: '╪', + boxvL: '╡', + boxvR: '╞', + boxvh: '┼', + boxvl: '┤', + boxvr: '├', + bprime: '‵', + breve: '˘', + brvbar: '¦', + bscr: '𝒷', + bsemi: '⁏', + bsim: '∽', + bsime: '⋍', + bsol: '\\', + bsolb: '⧅', + bsolhsub: '⟈', + bull: '•', + bullet: '•', + bump: '≎', + bumpE: '⪮', + bumpe: '≏', + bumpeq: '≏', + cacute: 'ć', + cap: '∩', + capand: '⩄', + capbrcup: '⩉', + capcap: '⩋', + capcup: '⩇', + capdot: '⩀', + caps: '∩︀', + caret: '⁁', + caron: 'ˇ', + ccaps: '⩍', + ccaron: 'č', + ccedil: 'ç', + ccirc: 'ĉ', + ccups: '⩌', + ccupssm: '⩐', + cdot: 'ċ', + cedil: '¸', + cemptyv: '⦲', + cent: '¢', + centerdot: '·', + cfr: '𝔠', + chcy: 'ч', + check: '✓', + checkmark: '✓', + chi: 'χ', + cir: '○', + cirE: '⧃', + circ: 'ˆ', + circeq: '≗', + circlearrowleft: '↺', + circlearrowright: '↻', + circledR: '®', + circledS: 'Ⓢ', + circledast: '⊛', + circledcirc: '⊚', + circleddash: '⊝', + cire: '≗', + cirfnint: '⨐', + cirmid: '⫯', + cirscir: '⧂', + clubs: '♣', + clubsuit: '♣', + colon: ':', + colone: '≔', + coloneq: '≔', + comma: ',', + commat: '@', + comp: '∁', + compfn: '∘', + complement: '∁', + complexes: 'ℂ', + cong: '≅', + congdot: '⩭', + conint: '∮', + copf: '𝕔', + coprod: '∐', + copy: '©', + copysr: '℗', + crarr: '↵', + cross: '✗', + cscr: '𝒸', + csub: '⫏', + csube: '⫑', + csup: '⫐', + csupe: '⫒', + ctdot: '⋯', + cudarrl: '⤸', + cudarrr: '⤵', + cuepr: '⋞', + cuesc: '⋟', + cularr: '↶', + cularrp: '⤽', + cup: '∪', + cupbrcap: '⩈', + cupcap: '⩆', + cupcup: '⩊', + cupdot: '⊍', + cupor: '⩅', + cups: '∪︀', + curarr: '↷', + curarrm: '⤼', + curlyeqprec: '⋞', + curlyeqsucc: '⋟', + curlyvee: '⋎', + curlywedge: '⋏', + curren: '¤', + curvearrowleft: '↶', + curvearrowright: '↷', + cuvee: '⋎', + cuwed: '⋏', + cwconint: '∲', + cwint: '∱', + cylcty: '⌭', + dArr: '⇓', + dHar: '⥥', + dagger: '†', + daleth: 'ℸ', + darr: '↓', + dash: '‐', + dashv: '⊣', + dbkarow: '⤏', + dblac: '˝', + dcaron: 'ď', + dcy: 'д', + dd: 'ⅆ', + ddagger: '‡', + ddarr: '⇊', + ddotseq: '⩷', + deg: '°', + delta: 'δ', + demptyv: '⦱', + dfisht: '⥿', + dfr: '𝔡', + dharl: '⇃', + dharr: '⇂', + diam: '⋄', + diamond: '⋄', + diamondsuit: '♦', + diams: '♦', + die: '¨', + digamma: 'ϝ', + disin: '⋲', + div: '÷', + divide: '÷', + divideontimes: '⋇', + divonx: '⋇', + djcy: 'ђ', + dlcorn: '⌞', + dlcrop: '⌍', + dollar: '$', + dopf: '𝕕', + dot: '˙', + doteq: '≐', + doteqdot: '≑', + dotminus: '∸', + dotplus: '∔', + dotsquare: '⊡', + doublebarwedge: '⌆', + downarrow: '↓', + downdownarrows: '⇊', + downharpoonleft: '⇃', + downharpoonright: '⇂', + drbkarow: '⤐', + drcorn: '⌟', + drcrop: '⌌', + dscr: '𝒹', + dscy: 'ѕ', + dsol: '⧶', + dstrok: 'đ', + dtdot: '⋱', + dtri: '▿', + dtrif: '▾', + duarr: '⇵', + duhar: '⥯', + dwangle: '⦦', + dzcy: 'џ', + dzigrarr: '⟿', + eDDot: '⩷', + eDot: '≑', + eacute: 'é', + easter: '⩮', + ecaron: 'ě', + ecir: '≖', + ecirc: 'ê', + ecolon: '≕', + ecy: 'э', + edot: 'ė', + ee: 'ⅇ', + efDot: '≒', + efr: '𝔢', + eg: '⪚', + egrave: 'è', + egs: '⪖', + egsdot: '⪘', + el: '⪙', + elinters: '⏧', + ell: 'ℓ', + els: '⪕', + elsdot: '⪗', + emacr: 'ē', + empty: '∅', + emptyset: '∅', + emptyv: '∅', + emsp13: ' ', + emsp14: ' ', + emsp: ' ', + eng: 'ŋ', + ensp: ' ', + eogon: 'ę', + eopf: '𝕖', + epar: '⋕', + eparsl: '⧣', + eplus: '⩱', + epsi: 'ε', + epsilon: 'ε', + epsiv: 'ϵ', + eqcirc: '≖', + eqcolon: '≕', + eqsim: '≂', + eqslantgtr: '⪖', + eqslantless: '⪕', + equals: '=', + equest: '≟', + equiv: '≡', + equivDD: '⩸', + eqvparsl: '⧥', + erDot: '≓', + erarr: '⥱', + escr: 'ℯ', + esdot: '≐', + esim: '≂', + eta: 'η', + eth: 'ð', + euml: 'ë', + euro: '€', + excl: '!', + exist: '∃', + expectation: 'ℰ', + exponentiale: 'ⅇ', + fallingdotseq: '≒', + fcy: 'ф', + female: '♀', + ffilig: 'ffi', + fflig: 'ff', + ffllig: 'ffl', + ffr: '𝔣', + filig: 'fi', + fjlig: 'fj', + flat: '♭', + fllig: 'fl', + fltns: '▱', + fnof: 'ƒ', + fopf: '𝕗', + forall: '∀', + fork: '⋔', + forkv: '⫙', + fpartint: '⨍', + frac12: '½', + frac13: '⅓', + frac14: '¼', + frac15: '⅕', + frac16: '⅙', + frac18: '⅛', + frac23: '⅔', + frac25: '⅖', + frac34: '¾', + frac35: '⅗', + frac38: '⅜', + frac45: '⅘', + frac56: '⅚', + frac58: '⅝', + frac78: '⅞', + frasl: '⁄', + frown: '⌢', + fscr: '𝒻', + gE: '≧', + gEl: '⪌', + gacute: 'ǵ', + gamma: 'γ', + gammad: 'ϝ', + gap: '⪆', + gbreve: 'ğ', + gcirc: 'ĝ', + gcy: 'г', + gdot: 'ġ', + ge: '≥', + gel: '⋛', + geq: '≥', + geqq: '≧', + geqslant: '⩾', + ges: '⩾', + gescc: '⪩', + gesdot: '⪀', + gesdoto: '⪂', + gesdotol: '⪄', + gesl: '⋛︀', + gesles: '⪔', + gfr: '𝔤', + gg: '≫', + ggg: '⋙', + gimel: 'ℷ', + gjcy: 'ѓ', + gl: '≷', + glE: '⪒', + gla: '⪥', + glj: '⪤', + gnE: '≩', + gnap: '⪊', + gnapprox: '⪊', + gne: '⪈', + gneq: '⪈', + gneqq: '≩', + gnsim: '⋧', + gopf: '𝕘', + grave: '`', + gscr: 'ℊ', + gsim: '≳', + gsime: '⪎', + gsiml: '⪐', + gt: '>', + gtcc: '⪧', + gtcir: '⩺', + gtdot: '⋗', + gtlPar: '⦕', + gtquest: '⩼', + gtrapprox: '⪆', + gtrarr: '⥸', + gtrdot: '⋗', + gtreqless: '⋛', + gtreqqless: '⪌', + gtrless: '≷', + gtrsim: '≳', + gvertneqq: '≩︀', + gvnE: '≩︀', + hArr: '⇔', + hairsp: ' ', + half: '½', + hamilt: 'ℋ', + hardcy: 'ъ', + harr: '↔', + harrcir: '⥈', + harrw: '↭', + hbar: 'ℏ', + hcirc: 'ĥ', + hearts: '♥', + heartsuit: '♥', + hellip: '…', + hercon: '⊹', + hfr: '𝔥', + hksearow: '⤥', + hkswarow: '⤦', + hoarr: '⇿', + homtht: '∻', + hookleftarrow: '↩', + hookrightarrow: '↪', + hopf: '𝕙', + horbar: '―', + hscr: '𝒽', + hslash: 'ℏ', + hstrok: 'ħ', + hybull: '⁃', + hyphen: '‐', + iacute: 'í', + ic: '⁣', + icirc: 'î', + icy: 'и', + iecy: 'е', + iexcl: '¡', + iff: '⇔', + ifr: '𝔦', + igrave: 'ì', + ii: 'ⅈ', + iiiint: '⨌', + iiint: '∭', + iinfin: '⧜', + iiota: '℩', + ijlig: 'ij', + imacr: 'ī', + image: 'ℑ', + imagline: 'ℐ', + imagpart: 'ℑ', + imath: 'ı', + imof: '⊷', + imped: 'Ƶ', + in: '∈', + incare: '℅', + infin: '∞', + infintie: '⧝', + inodot: 'ı', + int: '∫', + intcal: '⊺', + integers: 'ℤ', + intercal: '⊺', + intlarhk: '⨗', + intprod: '⨼', + iocy: 'ё', + iogon: 'į', + iopf: '𝕚', + iota: 'ι', + iprod: '⨼', + iquest: '¿', + iscr: '𝒾', + isin: '∈', + isinE: '⋹', + isindot: '⋵', + isins: '⋴', + isinsv: '⋳', + isinv: '∈', + it: '⁢', + itilde: 'ĩ', + iukcy: 'і', + iuml: 'ï', + jcirc: 'ĵ', + jcy: 'й', + jfr: '𝔧', + jmath: 'ȷ', + jopf: '𝕛', + jscr: '𝒿', + jsercy: 'ј', + jukcy: 'є', + kappa: 'κ', + kappav: 'ϰ', + kcedil: 'ķ', + kcy: 'к', + kfr: '𝔨', + kgreen: 'ĸ', + khcy: 'х', + kjcy: 'ќ', + kopf: '𝕜', + kscr: '𝓀', + lAarr: '⇚', + lArr: '⇐', + lAtail: '⤛', + lBarr: '⤎', + lE: '≦', + lEg: '⪋', + lHar: '⥢', + lacute: 'ĺ', + laemptyv: '⦴', + lagran: 'ℒ', + lambda: 'λ', + lang: '⟨', + langd: '⦑', + langle: '⟨', + lap: '⪅', + laquo: '«', + larr: '←', + larrb: '⇤', + larrbfs: '⤟', + larrfs: '⤝', + larrhk: '↩', + larrlp: '↫', + larrpl: '⤹', + larrsim: '⥳', + larrtl: '↢', + lat: '⪫', + latail: '⤙', + late: '⪭', + lates: '⪭︀', + lbarr: '⤌', + lbbrk: '❲', + lbrace: '{', + lbrack: '[', + lbrke: '⦋', + lbrksld: '⦏', + lbrkslu: '⦍', + lcaron: 'ľ', + lcedil: 'ļ', + lceil: '⌈', + lcub: '{', + lcy: 'л', + ldca: '⤶', + ldquo: '“', + ldquor: '„', + ldrdhar: '⥧', + ldrushar: '⥋', + ldsh: '↲', + le: '≤', + leftarrow: '←', + leftarrowtail: '↢', + leftharpoondown: '↽', + leftharpoonup: '↼', + leftleftarrows: '⇇', + leftrightarrow: '↔', + leftrightarrows: '⇆', + leftrightharpoons: '⇋', + leftrightsquigarrow: '↭', + leftthreetimes: '⋋', + leg: '⋚', + leq: '≤', + leqq: '≦', + leqslant: '⩽', + les: '⩽', + lescc: '⪨', + lesdot: '⩿', + lesdoto: '⪁', + lesdotor: '⪃', + lesg: '⋚︀', + lesges: '⪓', + lessapprox: '⪅', + lessdot: '⋖', + lesseqgtr: '⋚', + lesseqqgtr: '⪋', + lessgtr: '≶', + lesssim: '≲', + lfisht: '⥼', + lfloor: '⌊', + lfr: '𝔩', + lg: '≶', + lgE: '⪑', + lhard: '↽', + lharu: '↼', + lharul: '⥪', + lhblk: '▄', + ljcy: 'љ', + ll: '≪', + llarr: '⇇', + llcorner: '⌞', + llhard: '⥫', + lltri: '◺', + lmidot: 'ŀ', + lmoust: '⎰', + lmoustache: '⎰', + lnE: '≨', + lnap: '⪉', + lnapprox: '⪉', + lne: '⪇', + lneq: '⪇', + lneqq: '≨', + lnsim: '⋦', + loang: '⟬', + loarr: '⇽', + lobrk: '⟦', + longleftarrow: '⟵', + longleftrightarrow: '⟷', + longmapsto: '⟼', + longrightarrow: '⟶', + looparrowleft: '↫', + looparrowright: '↬', + lopar: '⦅', + lopf: '𝕝', + loplus: '⨭', + lotimes: '⨴', + lowast: '∗', + lowbar: '_', + loz: '◊', + lozenge: '◊', + lozf: '⧫', + lpar: '(', + lparlt: '⦓', + lrarr: '⇆', + lrcorner: '⌟', + lrhar: '⇋', + lrhard: '⥭', + lrm: '‎', + lrtri: '⊿', + lsaquo: '‹', + lscr: '𝓁', + lsh: '↰', + lsim: '≲', + lsime: '⪍', + lsimg: '⪏', + lsqb: '[', + lsquo: '‘', + lsquor: '‚', + lstrok: 'ł', + lt: '<', + ltcc: '⪦', + ltcir: '⩹', + ltdot: '⋖', + lthree: '⋋', + ltimes: '⋉', + ltlarr: '⥶', + ltquest: '⩻', + ltrPar: '⦖', + ltri: '◃', + ltrie: '⊴', + ltrif: '◂', + lurdshar: '⥊', + luruhar: '⥦', + lvertneqq: '≨︀', + lvnE: '≨︀', + mDDot: '∺', + macr: '¯', + male: '♂', + malt: '✠', + maltese: '✠', + map: '↦', + mapsto: '↦', + mapstodown: '↧', + mapstoleft: '↤', + mapstoup: '↥', + marker: '▮', + mcomma: '⨩', + mcy: 'м', + mdash: '—', + measuredangle: '∡', + mfr: '𝔪', + mho: '℧', + micro: 'µ', + mid: '∣', + midast: '*', + midcir: '⫰', + middot: '·', + minus: '−', + minusb: '⊟', + minusd: '∸', + minusdu: '⨪', + mlcp: '⫛', + mldr: '…', + mnplus: '∓', + models: '⊧', + mopf: '𝕞', + mp: '∓', + mscr: '𝓂', + mstpos: '∾', + mu: 'μ', + multimap: '⊸', + mumap: '⊸', + nGg: '⋙̸', + nGt: '≫⃒', + nGtv: '≫̸', + nLeftarrow: '⇍', + nLeftrightarrow: '⇎', + nLl: '⋘̸', + nLt: '≪⃒', + nLtv: '≪̸', + nRightarrow: '⇏', + nVDash: '⊯', + nVdash: '⊮', + nabla: '∇', + nacute: 'ń', + nang: '∠⃒', + nap: '≉', + napE: '⩰̸', + napid: '≋̸', + napos: 'ʼn', + napprox: '≉', + natur: '♮', + natural: '♮', + naturals: 'ℕ', + nbsp: ' ', + nbump: '≎̸', + nbumpe: '≏̸', + ncap: '⩃', + ncaron: 'ň', + ncedil: 'ņ', + ncong: '≇', + ncongdot: '⩭̸', + ncup: '⩂', + ncy: 'н', + ndash: '–', + ne: '≠', + neArr: '⇗', + nearhk: '⤤', + nearr: '↗', + nearrow: '↗', + nedot: '≐̸', + nequiv: '≢', + nesear: '⤨', + nesim: '≂̸', + nexist: '∄', + nexists: '∄', + nfr: '𝔫', + ngE: '≧̸', + nge: '≱', + ngeq: '≱', + ngeqq: '≧̸', + ngeqslant: '⩾̸', + nges: '⩾̸', + ngsim: '≵', + ngt: '≯', + ngtr: '≯', + nhArr: '⇎', + nharr: '↮', + nhpar: '⫲', + ni: '∋', + nis: '⋼', + nisd: '⋺', + niv: '∋', + njcy: 'њ', + nlArr: '⇍', + nlE: '≦̸', + nlarr: '↚', + nldr: '‥', + nle: '≰', + nleftarrow: '↚', + nleftrightarrow: '↮', + nleq: '≰', + nleqq: '≦̸', + nleqslant: '⩽̸', + nles: '⩽̸', + nless: '≮', + nlsim: '≴', + nlt: '≮', + nltri: '⋪', + nltrie: '⋬', + nmid: '∤', + nopf: '𝕟', + not: '¬', + notin: '∉', + notinE: '⋹̸', + notindot: '⋵̸', + notinva: '∉', + notinvb: '⋷', + notinvc: '⋶', + notni: '∌', + notniva: '∌', + notnivb: '⋾', + notnivc: '⋽', + npar: '∦', + nparallel: '∦', + nparsl: '⫽⃥', + npart: '∂̸', + npolint: '⨔', + npr: '⊀', + nprcue: '⋠', + npre: '⪯̸', + nprec: '⊀', + npreceq: '⪯̸', + nrArr: '⇏', + nrarr: '↛', + nrarrc: '⤳̸', + nrarrw: '↝̸', + nrightarrow: '↛', + nrtri: '⋫', + nrtrie: '⋭', + nsc: '⊁', + nsccue: '⋡', + nsce: '⪰̸', + nscr: '𝓃', + nshortmid: '∤', + nshortparallel: '∦', + nsim: '≁', + nsime: '≄', + nsimeq: '≄', + nsmid: '∤', + nspar: '∦', + nsqsube: '⋢', + nsqsupe: '⋣', + nsub: '⊄', + nsubE: '⫅̸', + nsube: '⊈', + nsubset: '⊂⃒', + nsubseteq: '⊈', + nsubseteqq: '⫅̸', + nsucc: '⊁', + nsucceq: '⪰̸', + nsup: '⊅', + nsupE: '⫆̸', + nsupe: '⊉', + nsupset: '⊃⃒', + nsupseteq: '⊉', + nsupseteqq: '⫆̸', + ntgl: '≹', + ntilde: 'ñ', + ntlg: '≸', + ntriangleleft: '⋪', + ntrianglelefteq: '⋬', + ntriangleright: '⋫', + ntrianglerighteq: '⋭', + nu: 'ν', + num: '#', + numero: '№', + numsp: ' ', + nvDash: '⊭', + nvHarr: '⤄', + nvap: '≍⃒', + nvdash: '⊬', + nvge: '≥⃒', + nvgt: '>⃒', + nvinfin: '⧞', + nvlArr: '⤂', + nvle: '≤⃒', + nvlt: '<⃒', + nvltrie: '⊴⃒', + nvrArr: '⤃', + nvrtrie: '⊵⃒', + nvsim: '∼⃒', + nwArr: '⇖', + nwarhk: '⤣', + nwarr: '↖', + nwarrow: '↖', + nwnear: '⤧', + oS: 'Ⓢ', + oacute: 'ó', + oast: '⊛', + ocir: '⊚', + ocirc: 'ô', + ocy: 'о', + odash: '⊝', + odblac: 'ő', + odiv: '⨸', + odot: '⊙', + odsold: '⦼', + oelig: 'œ', + ofcir: '⦿', + ofr: '𝔬', + ogon: '˛', + ograve: 'ò', + ogt: '⧁', + ohbar: '⦵', + ohm: 'Ω', + oint: '∮', + olarr: '↺', + olcir: '⦾', + olcross: '⦻', + oline: '‾', + olt: '⧀', + omacr: 'ō', + omega: 'ω', + omicron: 'ο', + omid: '⦶', + ominus: '⊖', + oopf: '𝕠', + opar: '⦷', + operp: '⦹', + oplus: '⊕', + or: '∨', + orarr: '↻', + ord: '⩝', + order: 'ℴ', + orderof: 'ℴ', + ordf: 'ª', + ordm: 'º', + origof: '⊶', + oror: '⩖', + orslope: '⩗', + orv: '⩛', + oscr: 'ℴ', + oslash: 'ø', + osol: '⊘', + otilde: 'õ', + otimes: '⊗', + otimesas: '⨶', + ouml: 'ö', + ovbar: '⌽', + par: '∥', + para: '¶', + parallel: '∥', + parsim: '⫳', + parsl: '⫽', + part: '∂', + pcy: 'п', + percnt: '%', + period: '.', + permil: '‰', + perp: '⊥', + pertenk: '‱', + pfr: '𝔭', + phi: 'φ', + phiv: 'ϕ', + phmmat: 'ℳ', + phone: '☎', + pi: 'π', + pitchfork: '⋔', + piv: 'ϖ', + planck: 'ℏ', + planckh: 'ℎ', + plankv: 'ℏ', + plus: '+', + plusacir: '⨣', + plusb: '⊞', + pluscir: '⨢', + plusdo: '∔', + plusdu: '⨥', + pluse: '⩲', + plusmn: '±', + plussim: '⨦', + plustwo: '⨧', + pm: '±', + pointint: '⨕', + popf: '𝕡', + pound: '£', + pr: '≺', + prE: '⪳', + prap: '⪷', + prcue: '≼', + pre: '⪯', + prec: '≺', + precapprox: '⪷', + preccurlyeq: '≼', + preceq: '⪯', + precnapprox: '⪹', + precneqq: '⪵', + precnsim: '⋨', + precsim: '≾', + prime: '′', + primes: 'ℙ', + prnE: '⪵', + prnap: '⪹', + prnsim: '⋨', + prod: '∏', + profalar: '⌮', + profline: '⌒', + profsurf: '⌓', + prop: '∝', + propto: '∝', + prsim: '≾', + prurel: '⊰', + pscr: '𝓅', + psi: 'ψ', + puncsp: ' ', + qfr: '𝔮', + qint: '⨌', + qopf: '𝕢', + qprime: '⁗', + qscr: '𝓆', + quaternions: 'ℍ', + quatint: '⨖', + quest: '?', + questeq: '≟', + quot: '"', + rAarr: '⇛', + rArr: '⇒', + rAtail: '⤜', + rBarr: '⤏', + rHar: '⥤', + race: '∽̱', + racute: 'ŕ', + radic: '√', + raemptyv: '⦳', + rang: '⟩', + rangd: '⦒', + range: '⦥', + rangle: '⟩', + raquo: '»', + rarr: '→', + rarrap: '⥵', + rarrb: '⇥', + rarrbfs: '⤠', + rarrc: '⤳', + rarrfs: '⤞', + rarrhk: '↪', + rarrlp: '↬', + rarrpl: '⥅', + rarrsim: '⥴', + rarrtl: '↣', + rarrw: '↝', + ratail: '⤚', + ratio: '∶', + rationals: 'ℚ', + rbarr: '⤍', + rbbrk: '❳', + rbrace: '}', + rbrack: ']', + rbrke: '⦌', + rbrksld: '⦎', + rbrkslu: '⦐', + rcaron: 'ř', + rcedil: 'ŗ', + rceil: '⌉', + rcub: '}', + rcy: 'р', + rdca: '⤷', + rdldhar: '⥩', + rdquo: '”', + rdquor: '”', + rdsh: '↳', + real: 'ℜ', + realine: 'ℛ', + realpart: 'ℜ', + reals: 'ℝ', + rect: '▭', + reg: '®', + rfisht: '⥽', + rfloor: '⌋', + rfr: '𝔯', + rhard: '⇁', + rharu: '⇀', + rharul: '⥬', + rho: 'ρ', + rhov: 'ϱ', + rightarrow: '→', + rightarrowtail: '↣', + rightharpoondown: '⇁', + rightharpoonup: '⇀', + rightleftarrows: '⇄', + rightleftharpoons: '⇌', + rightrightarrows: '⇉', + rightsquigarrow: '↝', + rightthreetimes: '⋌', + ring: '˚', + risingdotseq: '≓', + rlarr: '⇄', + rlhar: '⇌', + rlm: '‏', + rmoust: '⎱', + rmoustache: '⎱', + rnmid: '⫮', + roang: '⟭', + roarr: '⇾', + robrk: '⟧', + ropar: '⦆', + ropf: '𝕣', + roplus: '⨮', + rotimes: '⨵', + rpar: ')', + rpargt: '⦔', + rppolint: '⨒', + rrarr: '⇉', + rsaquo: '›', + rscr: '𝓇', + rsh: '↱', + rsqb: ']', + rsquo: '’', + rsquor: '’', + rthree: '⋌', + rtimes: '⋊', + rtri: '▹', + rtrie: '⊵', + rtrif: '▸', + rtriltri: '⧎', + ruluhar: '⥨', + rx: '℞', + sacute: 'ś', + sbquo: '‚', + sc: '≻', + scE: '⪴', + scap: '⪸', + scaron: 'š', + sccue: '≽', + sce: '⪰', + scedil: 'ş', + scirc: 'ŝ', + scnE: '⪶', + scnap: '⪺', + scnsim: '⋩', + scpolint: '⨓', + scsim: '≿', + scy: 'с', + sdot: '⋅', + sdotb: '⊡', + sdote: '⩦', + seArr: '⇘', + searhk: '⤥', + searr: '↘', + searrow: '↘', + sect: '§', + semi: ';', + seswar: '⤩', + setminus: '∖', + setmn: '∖', + sext: '✶', + sfr: '𝔰', + sfrown: '⌢', + sharp: '♯', + shchcy: 'щ', + shcy: 'ш', + shortmid: '∣', + shortparallel: '∥', + shy: '­', + sigma: 'σ', + sigmaf: 'ς', + sigmav: 'ς', + sim: '∼', + simdot: '⩪', + sime: '≃', + simeq: '≃', + simg: '⪞', + simgE: '⪠', + siml: '⪝', + simlE: '⪟', + simne: '≆', + simplus: '⨤', + simrarr: '⥲', + slarr: '←', + smallsetminus: '∖', + smashp: '⨳', + smeparsl: '⧤', + smid: '∣', + smile: '⌣', + smt: '⪪', + smte: '⪬', + smtes: '⪬︀', + softcy: 'ь', + sol: '/', + solb: '⧄', + solbar: '⌿', + sopf: '𝕤', + spades: '♠', + spadesuit: '♠', + spar: '∥', + sqcap: '⊓', + sqcaps: '⊓︀', + sqcup: '⊔', + sqcups: '⊔︀', + sqsub: '⊏', + sqsube: '⊑', + sqsubset: '⊏', + sqsubseteq: '⊑', + sqsup: '⊐', + sqsupe: '⊒', + sqsupset: '⊐', + sqsupseteq: '⊒', + squ: '□', + square: '□', + squarf: '▪', + squf: '▪', + srarr: '→', + sscr: '𝓈', + ssetmn: '∖', + ssmile: '⌣', + sstarf: '⋆', + star: '☆', + starf: '★', + straightepsilon: 'ϵ', + straightphi: 'ϕ', + strns: '¯', + sub: '⊂', + subE: '⫅', + subdot: '⪽', + sube: '⊆', + subedot: '⫃', + submult: '⫁', + subnE: '⫋', + subne: '⊊', + subplus: '⪿', + subrarr: '⥹', + subset: '⊂', + subseteq: '⊆', + subseteqq: '⫅', + subsetneq: '⊊', + subsetneqq: '⫋', + subsim: '⫇', + subsub: '⫕', + subsup: '⫓', + succ: '≻', + succapprox: '⪸', + succcurlyeq: '≽', + succeq: '⪰', + succnapprox: '⪺', + succneqq: '⪶', + succnsim: '⋩', + succsim: '≿', + sum: '∑', + sung: '♪', + sup1: '¹', + sup2: '²', + sup3: '³', + sup: '⊃', + supE: '⫆', + supdot: '⪾', + supdsub: '⫘', + supe: '⊇', + supedot: '⫄', + suphsol: '⟉', + suphsub: '⫗', + suplarr: '⥻', + supmult: '⫂', + supnE: '⫌', + supne: '⊋', + supplus: '⫀', + supset: '⊃', + supseteq: '⊇', + supseteqq: '⫆', + supsetneq: '⊋', + supsetneqq: '⫌', + supsim: '⫈', + supsub: '⫔', + supsup: '⫖', + swArr: '⇙', + swarhk: '⤦', + swarr: '↙', + swarrow: '↙', + swnwar: '⤪', + szlig: 'ß', + target: '⌖', + tau: 'τ', + tbrk: '⎴', + tcaron: 'ť', + tcedil: 'ţ', + tcy: 'т', + tdot: '⃛', + telrec: '⌕', + tfr: '𝔱', + there4: '∴', + therefore: '∴', + theta: 'θ', + thetasym: 'ϑ', + thetav: 'ϑ', + thickapprox: '≈', + thicksim: '∼', + thinsp: ' ', + thkap: '≈', + thksim: '∼', + thorn: 'þ', + tilde: '˜', + times: '×', + timesb: '⊠', + timesbar: '⨱', + timesd: '⨰', + tint: '∭', + toea: '⤨', + top: '⊤', + topbot: '⌶', + topcir: '⫱', + topf: '𝕥', + topfork: '⫚', + tosa: '⤩', + tprime: '‴', + trade: '™', + triangle: '▵', + triangledown: '▿', + triangleleft: '◃', + trianglelefteq: '⊴', + triangleq: '≜', + triangleright: '▹', + trianglerighteq: '⊵', + tridot: '◬', + trie: '≜', + triminus: '⨺', + triplus: '⨹', + trisb: '⧍', + tritime: '⨻', + trpezium: '⏢', + tscr: '𝓉', + tscy: 'ц', + tshcy: 'ћ', + tstrok: 'ŧ', + twixt: '≬', + twoheadleftarrow: '↞', + twoheadrightarrow: '↠', + uArr: '⇑', + uHar: '⥣', + uacute: 'ú', + uarr: '↑', + ubrcy: 'ў', + ubreve: 'ŭ', + ucirc: 'û', + ucy: 'у', + udarr: '⇅', + udblac: 'ű', + udhar: '⥮', + ufisht: '⥾', + ufr: '𝔲', + ugrave: 'ù', + uharl: '↿', + uharr: '↾', + uhblk: '▀', + ulcorn: '⌜', + ulcorner: '⌜', + ulcrop: '⌏', + ultri: '◸', + umacr: 'ū', + uml: '¨', + uogon: 'ų', + uopf: '𝕦', + uparrow: '↑', + updownarrow: '↕', + upharpoonleft: '↿', + upharpoonright: '↾', + uplus: '⊎', + upsi: 'υ', + upsih: 'ϒ', + upsilon: 'υ', + upuparrows: '⇈', + urcorn: '⌝', + urcorner: '⌝', + urcrop: '⌎', + uring: 'ů', + urtri: '◹', + uscr: '𝓊', + utdot: '⋰', + utilde: 'ũ', + utri: '▵', + utrif: '▴', + uuarr: '⇈', + uuml: 'ü', + uwangle: '⦧', + vArr: '⇕', + vBar: '⫨', + vBarv: '⫩', + vDash: '⊨', + vangrt: '⦜', + varepsilon: 'ϵ', + varkappa: 'ϰ', + varnothing: '∅', + varphi: 'ϕ', + varpi: 'ϖ', + varpropto: '∝', + varr: '↕', + varrho: 'ϱ', + varsigma: 'ς', + varsubsetneq: '⊊︀', + varsubsetneqq: '⫋︀', + varsupsetneq: '⊋︀', + varsupsetneqq: '⫌︀', + vartheta: 'ϑ', + vartriangleleft: '⊲', + vartriangleright: '⊳', + vcy: 'в', + vdash: '⊢', + vee: '∨', + veebar: '⊻', + veeeq: '≚', + vellip: '⋮', + verbar: '|', + vert: '|', + vfr: '𝔳', + vltri: '⊲', + vnsub: '⊂⃒', + vnsup: '⊃⃒', + vopf: '𝕧', + vprop: '∝', + vrtri: '⊳', + vscr: '𝓋', + vsubnE: '⫋︀', + vsubne: '⊊︀', + vsupnE: '⫌︀', + vsupne: '⊋︀', + vzigzag: '⦚', + wcirc: 'ŵ', + wedbar: '⩟', + wedge: '∧', + wedgeq: '≙', + weierp: '℘', + wfr: '𝔴', + wopf: '𝕨', + wp: '℘', + wr: '≀', + wreath: '≀', + wscr: '𝓌', + xcap: '⋂', + xcirc: '◯', + xcup: '⋃', + xdtri: '▽', + xfr: '𝔵', + xhArr: '⟺', + xharr: '⟷', + xi: 'ξ', + xlArr: '⟸', + xlarr: '⟵', + xmap: '⟼', + xnis: '⋻', + xodot: '⨀', + xopf: '𝕩', + xoplus: '⨁', + xotime: '⨂', + xrArr: '⟹', + xrarr: '⟶', + xscr: '𝓍', + xsqcup: '⨆', + xuplus: '⨄', + xutri: '△', + xvee: '⋁', + xwedge: '⋀', + yacute: 'ý', + yacy: 'я', + ycirc: 'ŷ', + ycy: 'ы', + yen: '¥', + yfr: '𝔶', + yicy: 'ї', + yopf: '𝕪', + yscr: '𝓎', + yucy: 'ю', + yuml: 'ÿ', + zacute: 'ź', + zcaron: 'ž', + zcy: 'з', + zdot: 'ż', + zeetrf: 'ℨ', + zeta: 'ζ', + zfr: '𝔷', + zhcy: 'ж', + zigrarr: '⇝', + zopf: '𝕫', + zscr: '𝓏', + zwj: '‍', + zwnj: '‌' +} + +;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js + + +const own = {}.hasOwnProperty + +/** + * Decode a single character reference (without the `&` or `;`). + * You probably only need this when you’re building parsers yourself that follow + * different rules compared to HTML. + * This is optimized to be tiny in browsers. + * + * @param {string} value + * `notin` (named), `#123` (deci), `#x123` (hexa). + * @returns {string|false} + * Decoded reference. + */ +function decodeNamedCharacterReference(value) { + return own.call(characterEntities, value) ? characterEntities[value] : false +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const characterReference = { + name: 'characterReference', + tokenize: tokenizeCharacterReference +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterReference(effects, ok, nok) { + const self = this + let size = 0 + /** @type {number} */ + let max + /** @type {(code: Code) => boolean} */ + let test + return start + + /** + * Start of character reference. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterReference') + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + return open + } + + /** + * After `&`, at `#` for numeric references or alphanumeric for named + * references. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 35) { + effects.enter('characterReferenceMarkerNumeric') + effects.consume(code) + effects.exit('characterReferenceMarkerNumeric') + return numeric + } + effects.enter('characterReferenceValue') + max = 31 + test = asciiAlphanumeric + return value(code) + } + + /** + * After `#`, at `x` for hexadecimals or digit for decimals. + * + * ```markdown + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function numeric(code) { + if (code === 88 || code === 120) { + effects.enter('characterReferenceMarkerHexadecimal') + effects.consume(code) + effects.exit('characterReferenceMarkerHexadecimal') + effects.enter('characterReferenceValue') + max = 6 + test = asciiHexDigit + return value + } + effects.enter('characterReferenceValue') + max = 7 + test = asciiDigit + return value(code) + } + + /** + * After markers (`&#x`, `&#`, or `&`), in value, before `;`. + * + * The character reference kind defines what and how many characters are + * allowed. + * + * ```markdown + * > | a&b + * ^^^ + * > | a{b + * ^^^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function value(code) { + if (code === 59 && size) { + const token = effects.exit('characterReferenceValue') + if ( + test === asciiAlphanumeric && + !decodeNamedCharacterReference(self.sliceSerialize(token)) + ) { + return nok(code) + } + + // To do: `markdown-rs` uses a different name: + // `CharacterReferenceMarkerSemi`. + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + effects.exit('characterReference') + return ok + } + if (test(code) && size++ < max) { + effects.consume(code) + return value + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const characterEscape = { + name: 'characterEscape', + tokenize: tokenizeCharacterEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterEscape(effects, ok, nok) { + return start + + /** + * Start of character escape. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterEscape') + effects.enter('escapeMarker') + effects.consume(code) + effects.exit('escapeMarker') + return inside + } + + /** + * After `\`, at punctuation. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + // ASCII punctuation. + if (asciiPunctuation(code)) { + effects.enter('characterEscapeValue') + effects.consume(code) + effects.exit('characterEscapeValue') + effects.exit('characterEscape') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const lineEnding = { + name: 'lineEnding', + tokenize: tokenizeLineEnding +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLineEnding(effects, ok) { + return start + + /** @type {State} */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, ok, 'linePrefix') + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + + +/** @type {Construct} */ +const labelEnd = { + name: 'labelEnd', + tokenize: tokenizeLabelEnd, + resolveTo: resolveToLabelEnd, + resolveAll: resolveAllLabelEnd +} + +/** @type {Construct} */ +const resourceConstruct = { + tokenize: tokenizeResource +} +/** @type {Construct} */ +const referenceFullConstruct = { + tokenize: tokenizeReferenceFull +} +/** @type {Construct} */ +const referenceCollapsedConstruct = { + tokenize: tokenizeReferenceCollapsed +} + +/** @type {Resolver} */ +function resolveAllLabelEnd(events) { + let index = -1 + while (++index < events.length) { + const token = events[index][1] + if ( + token.type === 'labelImage' || + token.type === 'labelLink' || + token.type === 'labelEnd' + ) { + // Remove the marker. + events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) + token.type = 'data' + index++ + } + } + return events +} + +/** @type {Resolver} */ +function resolveToLabelEnd(events, context) { + let index = events.length + let offset = 0 + /** @type {Token} */ + let token + /** @type {number | undefined} */ + let open + /** @type {number | undefined} */ + let close + /** @type {Array<Event>} */ + let media + + // Find an opening. + while (index--) { + token = events[index][1] + if (open) { + // If we see another link, or inactive link label, we’ve been here before. + if ( + token.type === 'link' || + (token.type === 'labelLink' && token._inactive) + ) { + break + } + + // Mark other link openings as inactive, as we can’t have links in + // links. + if (events[index][0] === 'enter' && token.type === 'labelLink') { + token._inactive = true + } + } else if (close) { + if ( + events[index][0] === 'enter' && + (token.type === 'labelImage' || token.type === 'labelLink') && + !token._balanced + ) { + open = index + if (token.type !== 'labelLink') { + offset = 2 + break + } + } + } else if (token.type === 'labelEnd') { + close = index + } + } + const group = { + type: events[open][1].type === 'labelLink' ? 'link' : 'image', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + const label = { + type: 'label', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[close][1].end) + } + const text = { + type: 'labelText', + start: Object.assign({}, events[open + offset + 2][1].end), + end: Object.assign({}, events[close - 2][1].start) + } + media = [ + ['enter', group, context], + ['enter', label, context] + ] + + // Opening marker. + media = push(media, events.slice(open + 1, open + offset + 3)) + + // Text open. + media = push(media, [['enter', text, context]]) + + // Always populated by defaults. + + // Between. + media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ) + + // Text close, marker close, label close. + media = push(media, [ + ['exit', text, context], + events[close - 2], + events[close - 1], + ['exit', label, context] + ]) + + // Reference, resource, or so. + media = push(media, events.slice(close + 1)) + + // Media close. + media = push(media, [['exit', group, context]]) + splice(events, open, events.length, media) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelEnd(effects, ok, nok) { + const self = this + let index = self.events.length + /** @type {Token} */ + let labelStart + /** @type {boolean} */ + let defined + + // Find an opening. + while (index--) { + if ( + (self.events[index][1].type === 'labelImage' || + self.events[index][1].type === 'labelLink') && + !self.events[index][1]._balanced + ) { + labelStart = self.events[index][1] + break + } + } + return start + + /** + * Start of label end. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ``` + * + * @type {State} + */ + function start(code) { + // If there is not an okay opening. + if (!labelStart) { + return nok(code) + } + + // If the corresponding label (link) start is marked as inactive, + // it means we’d be wrapping a link, like this: + // + // ```markdown + // > | a [b [c](d) e](f) g. + // ^ + // ``` + // + // We can’t have that, so it’s just balanced brackets. + if (labelStart._inactive) { + return labelEndNok(code) + } + defined = self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize({ + start: labelStart.end, + end: self.now() + }) + ) + ) + effects.enter('labelEnd') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelEnd') + return after + } + + /** + * After `]`. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + // Note: `markdown-rs` also parses GFM footnotes here, which for us is in + // an extension. + + // Resource (`[asd](fgh)`)? + if (code === 40) { + return effects.attempt( + resourceConstruct, + labelEndOk, + defined ? labelEndOk : labelEndNok + )(code) + } + + // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? + if (code === 91) { + return effects.attempt( + referenceFullConstruct, + labelEndOk, + defined ? referenceNotFull : labelEndNok + )(code) + } + + // Shortcut (`[asd]`) reference? + return defined ? labelEndOk(code) : labelEndNok(code) + } + + /** + * After `]`, at `[`, but not at a full reference. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function referenceNotFull(code) { + return effects.attempt( + referenceCollapsedConstruct, + labelEndOk, + labelEndNok + )(code) + } + + /** + * Done, we found something. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndOk(code) { + // Note: `markdown-rs` does a bunch of stuff here. + return ok(code) + } + + /** + * Done, it’s nothing. + * + * There was an okay opening, but we didn’t match anything. + * + * ```markdown + * > | [a](b c + * ^ + * > | [a][b c + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndNok(code) { + labelStart._balanced = true + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeResource(effects, ok, nok) { + return resourceStart + + /** + * At a resource. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceStart(code) { + effects.enter('resource') + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + return resourceBefore + } + + /** + * In resource, after `(`, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceOpen)(code) + : resourceOpen(code) + } + + /** + * In resource, after optional whitespace, at `)` or a destination. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceOpen(code) { + if (code === 41) { + return resourceEnd(code) + } + return factoryDestination( + effects, + resourceDestinationAfter, + resourceDestinationMissing, + 'resourceDestination', + 'resourceDestinationLiteral', + 'resourceDestinationLiteralMarker', + 'resourceDestinationRaw', + 'resourceDestinationString', + 32 + )(code) + } + + /** + * In resource, after destination, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceBetween)(code) + : resourceEnd(code) + } + + /** + * At invalid destination. + * + * ```markdown + * > | [a](<<) b + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationMissing(code) { + return nok(code) + } + + /** + * In resource, after destination and whitespace, at `(` or title. + * + * ```markdown + * > | [a](b ) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBetween(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + resourceTitleAfter, + nok, + 'resourceTitle', + 'resourceTitleMarker', + 'resourceTitleString' + )(code) + } + return resourceEnd(code) + } + + /** + * In resource, after title, at optional whitespace. + * + * ```markdown + * > | [a](b "c") d + * ^ + * ``` + * + * @type {State} + */ + function resourceTitleAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceEnd)(code) + : resourceEnd(code) + } + + /** + * In resource, at `)`. + * + * ```markdown + * > | [a](b) d + * ^ + * ``` + * + * @type {State} + */ + function resourceEnd(code) { + if (code === 41) { + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + effects.exit('resource') + return ok + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceFull(effects, ok, nok) { + const self = this + return referenceFull + + /** + * In a reference (full), at the `[`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFull(code) { + return factoryLabel.call( + self, + effects, + referenceFullAfter, + referenceFullMissing, + 'reference', + 'referenceMarker', + 'referenceString' + )(code) + } + + /** + * In a reference (full), after `]`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullAfter(code) { + return self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + ) + ? ok(code) + : nok(code) + } + + /** + * In reference (full) that was missing. + * + * ```markdown + * > | [a][b d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullMissing(code) { + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceCollapsed(effects, ok, nok) { + return referenceCollapsedStart + + /** + * In reference (collapsed), at `[`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedStart(code) { + // We only attempt a collapsed label if there’s a `[`. + + effects.enter('reference') + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + return referenceCollapsedOpen + } + + /** + * In reference (collapsed), at `]`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedOpen(code) { + if (code === 93) { + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + effects.exit('reference') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartImage = { + name: 'labelStartImage', + tokenize: tokenizeLabelStartImage, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartImage(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (image) start. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelImage') + effects.enter('labelImageMarker') + effects.consume(code) + effects.exit('labelImageMarker') + return open + } + + /** + * After `!`, at `[`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 91) { + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelImage') + return after + } + return nok(code) + } + + /** + * After `![`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * This is needed in because, when GFM footnotes are enabled, images never + * form when started with a `^`. + * Instead, links form: + * + * ```markdown + * ![^a](b) + * + * ![^a][b] + * + * [b]: c + * ``` + * + * ```html + * <p>!<a href=\"b\">^a</a></p> + * <p>!<a href=\"c\">^a</a></p> + * ``` + * + * @type {State} + */ + function after(code) { + // To do: use a new field to do this, this is still needed for + // `micromark-extension-gfm-footnote`, but the `label-start-link` + // behavior isn’t. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + +/** + * Classify whether a code represents whitespace, punctuation, or something + * else. + * + * Used for attention (emphasis, strong), whose sequences can open or close + * based on the class of surrounding characters. + * + * > 👉 **Note**: eof (`null`) is seen as whitespace. + * + * @param {Code} code + * Code. + * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} + * Group. + */ +function classifyCharacter(code) { + if ( + code === null || + markdownLineEndingOrSpace(code) || + unicodeWhitespace(code) + ) { + return 1 + } + if (unicodePunctuation(code)) { + return 2 + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const attention = { + name: 'attention', + tokenize: tokenizeAttention, + resolveAll: resolveAllAttention +} + +/** + * Take all events and resolve attention to emphasis or strong. + * + * @type {Resolver} + */ +function resolveAllAttention(events, context) { + let index = -1 + /** @type {number} */ + let open + /** @type {Token} */ + let group + /** @type {Token} */ + let text + /** @type {Token} */ + let openingSequence + /** @type {Token} */ + let closingSequence + /** @type {number} */ + let use + /** @type {Array<Event>} */ + let nextEvents + /** @type {number} */ + let offset + + // Walk through all events. + // + // Note: performance of this is fine on an mb of normal markdown, but it’s + // a bottleneck for malicious stuff. + while (++index < events.length) { + // Find a token that can close. + if ( + events[index][0] === 'enter' && + events[index][1].type === 'attentionSequence' && + events[index][1]._close + ) { + open = index + + // Now walk back to find an opener. + while (open--) { + // Find a token that can open the closer. + if ( + events[open][0] === 'exit' && + events[open][1].type === 'attentionSequence' && + events[open][1]._open && + // If the markers are the same: + context.sliceSerialize(events[open][1]).charCodeAt(0) === + context.sliceSerialize(events[index][1]).charCodeAt(0) + ) { + // If the opening can close or the closing can open, + // and the close size *is not* a multiple of three, + // but the sum of the opening and closing size *is* multiple of three, + // then don’t match. + if ( + (events[open][1]._close || events[index][1]._open) && + (events[index][1].end.offset - events[index][1].start.offset) % 3 && + !( + (events[open][1].end.offset - + events[open][1].start.offset + + events[index][1].end.offset - + events[index][1].start.offset) % + 3 + ) + ) { + continue + } + + // Number of markers to use from the sequence. + use = + events[open][1].end.offset - events[open][1].start.offset > 1 && + events[index][1].end.offset - events[index][1].start.offset > 1 + ? 2 + : 1 + const start = Object.assign({}, events[open][1].end) + const end = Object.assign({}, events[index][1].start) + movePoint(start, -use) + movePoint(end, use) + openingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start, + end: Object.assign({}, events[open][1].end) + } + closingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start: Object.assign({}, events[index][1].start), + end + } + text = { + type: use > 1 ? 'strongText' : 'emphasisText', + start: Object.assign({}, events[open][1].end), + end: Object.assign({}, events[index][1].start) + } + group = { + type: use > 1 ? 'strong' : 'emphasis', + start: Object.assign({}, openingSequence.start), + end: Object.assign({}, closingSequence.end) + } + events[open][1].end = Object.assign({}, openingSequence.start) + events[index][1].start = Object.assign({}, closingSequence.end) + nextEvents = [] + + // If there are more markers in the opening, add them before. + if (events[open][1].end.offset - events[open][1].start.offset) { + nextEvents = push(nextEvents, [ + ['enter', events[open][1], context], + ['exit', events[open][1], context] + ]) + } + + // Opening. + nextEvents = push(nextEvents, [ + ['enter', group, context], + ['enter', openingSequence, context], + ['exit', openingSequence, context], + ['enter', text, context] + ]) + + // Always populated by defaults. + + // Between. + nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index), + context + ) + ) + + // Closing. + nextEvents = push(nextEvents, [ + ['exit', text, context], + ['enter', closingSequence, context], + ['exit', closingSequence, context], + ['exit', group, context] + ]) + + // If there are more markers in the closing, add them after. + if (events[index][1].end.offset - events[index][1].start.offset) { + offset = 2 + nextEvents = push(nextEvents, [ + ['enter', events[index][1], context], + ['exit', events[index][1], context] + ]) + } else { + offset = 0 + } + splice(events, open - 1, index - open + 3, nextEvents) + index = open + nextEvents.length - offset - 2 + break + } + } + } + } + + // Remove remaining sequences. + index = -1 + while (++index < events.length) { + if (events[index][1].type === 'attentionSequence') { + events[index][1].type = 'data' + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAttention(effects, ok) { + const attentionMarkers = this.parser.constructs.attentionMarkers.null + const previous = this.previous + const before = classifyCharacter(previous) + + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Before a sequence. + * + * ```markdown + * > | ** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + marker = code + effects.enter('attentionSequence') + return inside(code) + } + + /** + * In a sequence. + * + * ```markdown + * > | ** + * ^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + const token = effects.exit('attentionSequence') + + // To do: next major: move this to resolver, just like `markdown-rs`. + const after = classifyCharacter(code) + + // Always populated by defaults. + + const open = + !after || (after === 2 && before) || attentionMarkers.includes(code) + const close = + !before || (before === 2 && after) || attentionMarkers.includes(previous) + token._open = Boolean(marker === 42 ? open : open && (before || !close)) + token._close = Boolean(marker === 42 ? close : close && (after || !open)) + return ok(code) + } +} + +/** + * Move a point a bit. + * + * Note: `move` only works inside lines! It’s not possible to move past other + * chunks (replacement characters, tabs, or line endings). + * + * @param {Point} point + * @param {number} offset + * @returns {void} + */ +function movePoint(point, offset) { + point.column += offset + point.offset += offset + point._bufferIndex += offset +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const autolink = { + name: 'autolink', + tokenize: tokenizeAutolink +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAutolink(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of an autolink. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('autolink') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.enter('autolinkProtocol') + return open + } + + /** + * After `<`, at protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (asciiAlpha(code)) { + effects.consume(code) + return schemeOrEmailAtext + } + return emailAtext(code) + } + + /** + * At second byte of protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function schemeOrEmailAtext(code) { + // ASCII alphanumeric and `+`, `-`, and `.`. + if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { + // Count the previous alphabetical from `open` too. + size = 1 + return schemeInsideOrEmailAtext(code) + } + return emailAtext(code) + } + + /** + * In ambiguous protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function schemeInsideOrEmailAtext(code) { + if (code === 58) { + effects.consume(code) + size = 0 + return urlInside + } + + // ASCII alphanumeric and `+`, `-`, and `.`. + if ( + (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && + size++ < 32 + ) { + effects.consume(code) + return schemeInsideOrEmailAtext + } + size = 0 + return emailAtext(code) + } + + /** + * After protocol, in URL. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * ``` + * + * @type {State} + */ + function urlInside(code) { + if (code === 62) { + effects.exit('autolinkProtocol') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + + // ASCII control, space, or `<`. + if (code === null || code === 32 || code === 60 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return urlInside + } + + /** + * In email atext. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailAtext(code) { + if (code === 64) { + effects.consume(code) + return emailAtSignOrDot + } + if (asciiAtext(code)) { + effects.consume(code) + return emailAtext + } + return nok(code) + } + + /** + * In label, after at-sign or dot. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ ^ + * ``` + * + * @type {State} + */ + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) + } + + /** + * In label, where `.` and `>` are allowed. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailLabel(code) { + if (code === 46) { + effects.consume(code) + size = 0 + return emailAtSignOrDot + } + if (code === 62) { + // Exit, then change the token type. + effects.exit('autolinkProtocol').type = 'autolinkEmail' + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + return emailValue(code) + } + + /** + * In label, where `.` and `>` are *not* allowed. + * + * Though, this is also used in `emailLabel` to parse other values. + * + * ```markdown + * > | a<user.name@ex-ample.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailValue(code) { + // ASCII alphanumeric or `-`. + if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { + const next = code === 45 ? emailValue : emailLabel + effects.consume(code) + return next + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const htmlText = { + name: 'htmlText', + tokenize: tokenizeHtmlText +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlText(effects, ok, nok) { + const self = this + /** @type {NonNullable<Code> | undefined} */ + let marker + /** @type {number} */ + let index + /** @type {State} */ + let returnState + return start + + /** + * Start of HTML (text). + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('htmlText') + effects.enter('htmlTextData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | a <b> c + * ^ + * > | a <!doctype> c + * ^ + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + return instruction + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagOpen + } + return nok(code) + } + + /** + * After `<!`, at declaration, comment, or CDATA. + * + * ```markdown + * > | a <!doctype> c + * ^ + * > | a <!--b--> c + * ^ + * > | a <![CDATA[>&<]]> c + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + index = 0 + return cdataOpenInside + } + if (asciiAlpha(code)) { + effects.consume(code) + return declaration + } + return nok(code) + } + + /** + * In a comment, after `<!-`, at another `-`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return nok(code) + } + + /** + * In comment. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function comment(code) { + if (code === null) { + return nok(code) + } + if (code === 45) { + effects.consume(code) + return commentClose + } + if (markdownLineEnding(code)) { + returnState = comment + return lineEndingBefore(code) + } + effects.consume(code) + return comment + } + + /** + * In comment, after `-`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentClose(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return comment(code) + } + + /** + * In comment, after `--`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentEnd(code) { + return code === 62 + ? end(code) + : code === 45 + ? commentClose(code) + : comment(code) + } + + /** + * After `<![`, in CDATA, expecting `CDATA[`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + return index === value.length ? cdata : cdataOpenInside + } + return nok(code) + } + + /** + * In CDATA. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^^^ + * ``` + * + * @type {State} + */ + function cdata(code) { + if (code === null) { + return nok(code) + } + if (code === 93) { + effects.consume(code) + return cdataClose + } + if (markdownLineEnding(code)) { + returnState = cdata + return lineEndingBefore(code) + } + effects.consume(code) + return cdata + } + + /** + * In CDATA, after `]`, at another `]`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataClose(code) { + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In CDATA, after `]]`, at `>`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataEnd(code) { + if (code === 62) { + return end(code) + } + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In declaration. + * + * ```markdown + * > | a <!b> c + * ^ + * ``` + * + * @type {State} + */ + function declaration(code) { + if (code === null || code === 62) { + return end(code) + } + if (markdownLineEnding(code)) { + returnState = declaration + return lineEndingBefore(code) + } + effects.consume(code) + return declaration + } + + /** + * In instruction. + * + * ```markdown + * > | a <?b?> c + * ^ + * ``` + * + * @type {State} + */ + function instruction(code) { + if (code === null) { + return nok(code) + } + if (code === 63) { + effects.consume(code) + return instructionClose + } + if (markdownLineEnding(code)) { + returnState = instruction + return lineEndingBefore(code) + } + effects.consume(code) + return instruction + } + + /** + * In instruction, after `?`, at `>`. + * + * ```markdown + * > | a <?b?> c + * ^ + * ``` + * + * @type {State} + */ + function instructionClose(code) { + return code === 62 ? end(code) : instruction(code) + } + + /** + * After `</`, in closing tag, at tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagClose + } + return nok(code) + } + + /** + * After `</x`, in a tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagClose(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagClose + } + return tagCloseBetween(code) + } + + /** + * In closing tag, after tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseBetween(code) { + if (markdownLineEnding(code)) { + returnState = tagCloseBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagCloseBetween + } + return end(code) + } + + /** + * After `<x`, in opening tag name. + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function tagOpen(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagOpen + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In opening tag, after tag name. + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function tagOpenBetween(code) { + if (code === 47) { + effects.consume(code) + return end + } + + // ASCII alphabetical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return tagOpenAttributeName + } + if (markdownLineEnding(code)) { + returnState = tagOpenBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenBetween + } + return end(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | a <b c> d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeName(code) { + // ASCII alphabetical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return tagOpenAttributeName + } + return tagOpenAttributeNameAfter(code) + } + + /** + * After attribute name, before initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | a <b c> d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeNameAfter + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeNameAfter + } + return tagOpenBetween(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | a <b c=d> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + marker = code + return tagOpenAttributeValueQuoted + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueBefore + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code) + marker = undefined + return tagOpenAttributeValueQuotedAfter + } + if (code === null) { + return nok(code) + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueQuoted + return lineEndingBefore(code) + } + effects.consume(code) + return tagOpenAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | a <b c=d> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 60 || + code === 61 || + code === 96 + ) { + return nok(code) + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the end + * of the tag. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In certain circumstances of a tag where only an `>` is allowed. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function end(code) { + if (code === 62) { + effects.consume(code) + effects.exit('htmlTextData') + effects.exit('htmlText') + return ok + } + return nok(code) + } + + /** + * At eol. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * > | a <!--a + * ^ + * | b--> + * ``` + * + * @type {State} + */ + function lineEndingBefore(code) { + effects.exit('htmlTextData') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineEndingAfter + } + + /** + * After eol, at optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a <!--a + * > | b--> + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfter(code) { + // Always populated by defaults. + + return markdownSpace(code) + ? factorySpace( + effects, + lineEndingAfterPrefix, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : lineEndingAfterPrefix(code) + } + + /** + * After eol, after optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a <!--a + * > | b--> + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfterPrefix(code) { + effects.enter('htmlTextData') + return returnState(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartLink = { + name: 'labelStartLink', + tokenize: tokenizeLabelStartLink, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartLink(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (link) start. + * + * ```markdown + * > | a [b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelLink') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelLink') + return after + } + + /** @type {State} */ + function after(code) { + // To do: this isn’t needed in `micromark-extension-gfm-footnote`, + // remove. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const hardBreakEscape = { + name: 'hardBreakEscape', + tokenize: tokenizeHardBreakEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHardBreakEscape(effects, ok, nok) { + return start + + /** + * Start of a hard break (escape). + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('hardBreakEscape') + effects.consume(code) + return after + } + + /** + * After `\`, at eol. + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownLineEnding(code)) { + effects.exit('hardBreakEscape') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Previous} Previous + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const codeText = { + name: 'codeText', + tokenize: tokenizeCodeText, + resolve: resolveCodeText, + previous +} + +// To do: next major: don’t resolve, like `markdown-rs`. +/** @type {Resolver} */ +function resolveCodeText(events) { + let tailExitIndex = events.length - 4 + let headEnterIndex = 3 + /** @type {number} */ + let index + /** @type {number | undefined} */ + let enter + + // If we start and end with an EOL or a space. + if ( + (events[headEnterIndex][1].type === 'lineEnding' || + events[headEnterIndex][1].type === 'space') && + (events[tailExitIndex][1].type === 'lineEnding' || + events[tailExitIndex][1].type === 'space') + ) { + index = headEnterIndex + + // And we have data. + while (++index < tailExitIndex) { + if (events[index][1].type === 'codeTextData') { + // Then we have padding. + events[headEnterIndex][1].type = 'codeTextPadding' + events[tailExitIndex][1].type = 'codeTextPadding' + headEnterIndex += 2 + tailExitIndex -= 2 + break + } + } + } + + // Merge adjacent spaces and data. + index = headEnterIndex - 1 + tailExitIndex++ + while (++index <= tailExitIndex) { + if (enter === undefined) { + if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { + enter = index + } + } else if ( + index === tailExitIndex || + events[index][1].type === 'lineEnding' + ) { + events[enter][1].type = 'codeTextData' + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + tailExitIndex -= index - enter - 2 + index = enter + 2 + } + enter = undefined + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Previous} + */ +function previous(code) { + // If there is a previous code, there will always be a tail. + return ( + code !== 96 || + this.events[this.events.length - 1][1].type === 'characterEscape' + ) +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeText(effects, ok, nok) { + const self = this + let sizeOpen = 0 + /** @type {number} */ + let size + /** @type {Token} */ + let token + return start + + /** + * Start of code (text). + * + * ```markdown + * > | `a` + * ^ + * > | \`a` + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('codeText') + effects.enter('codeTextSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 96) { + effects.consume(code) + sizeOpen++ + return sequenceOpen + } + effects.exit('codeTextSequence') + return between(code) + } + + /** + * Between something and something else. + * + * ```markdown + * > | `a` + * ^^ + * ``` + * + * @type {State} + */ + function between(code) { + // EOF. + if (code === null) { + return nok(code) + } + + // To do: next major: don’t do spaces in resolve, but when compiling, + // like `markdown-rs`. + // Tabs don’t work, and virtual spaces don’t make sense. + if (code === 32) { + effects.enter('space') + effects.consume(code) + effects.exit('space') + return between + } + + // Closing fence? Could also be data. + if (code === 96) { + token = effects.enter('codeTextSequence') + size = 0 + return sequenceClose(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return between + } + + // Data. + effects.enter('codeTextData') + return data(code) + } + + /** + * In data. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if ( + code === null || + code === 32 || + code === 96 || + markdownLineEnding(code) + ) { + effects.exit('codeTextData') + return between(code) + } + effects.consume(code) + return data + } + + /** + * In closing sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + // More. + if (code === 96) { + effects.consume(code) + size++ + return sequenceClose + } + + // Done! + if (size === sizeOpen) { + effects.exit('codeTextSequence') + effects.exit('codeText') + return ok(code) + } + + // More or less accents: mark as data. + token.type = 'codeTextData' + return data(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + */ + + + + +/** @satisfies {Extension['document']} */ +const constructs_document = { + [42]: list, + [43]: list, + [45]: list, + [48]: list, + [49]: list, + [50]: list, + [51]: list, + [52]: list, + [53]: list, + [54]: list, + [55]: list, + [56]: list, + [57]: list, + [62]: blockQuote +} + +/** @satisfies {Extension['contentInitial']} */ +const contentInitial = { + [91]: definition +} + +/** @satisfies {Extension['flowInitial']} */ +const flowInitial = { + [-2]: codeIndented, + [-1]: codeIndented, + [32]: codeIndented +} + +/** @satisfies {Extension['flow']} */ +const constructs_flow = { + [35]: headingAtx, + [42]: thematicBreak, + [45]: [setextUnderline, thematicBreak], + [60]: htmlFlow, + [61]: setextUnderline, + [95]: thematicBreak, + [96]: codeFenced, + [126]: codeFenced +} + +/** @satisfies {Extension['string']} */ +const constructs_string = { + [38]: characterReference, + [92]: characterEscape +} + +/** @satisfies {Extension['text']} */ +const constructs_text = { + [-5]: lineEnding, + [-4]: lineEnding, + [-3]: lineEnding, + [33]: labelStartImage, + [38]: characterReference, + [42]: attention, + [60]: [autolink, htmlText], + [91]: labelStartLink, + [92]: [hardBreakEscape, characterEscape], + [93]: labelEnd, + [95]: attention, + [96]: codeText +} + +/** @satisfies {Extension['insideSpan']} */ +const insideSpan = { + null: [attention, resolver] +} + +/** @satisfies {Extension['attentionMarkers']} */ +const attentionMarkers = { + null: [42, 95] +} + +/** @satisfies {Extension['disable']} */ +const disable = { + null: [] +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js +/** + * @typedef {import('micromark-util-types').Create} Create + * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + */ + + + + + + + + + +/** + * @param {ParseOptions | null | undefined} [options] + * @returns {ParseContext} + */ +function parse(options) { + const settings = options || {} + const constructs = + /** @type {FullNormalizedExtension} */ + combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) + + /** @type {ParseContext} */ + const parser = { + defined: [], + lazy: {}, + constructs, + content: create(content), + document: create(document_document), + flow: create(flow), + string: create(string), + text: create(text_text) + } + return parser + + /** + * @param {InitialConstruct} initial + */ + function create(initial) { + return creator + /** @type {Create} */ + function creator(from) { + return createTokenizer(parser, initial, from) + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Value} Value + */ + +/** + * @callback Preprocessor + * @param {Value} value + * @param {Encoding | null | undefined} [encoding] + * @param {boolean | null | undefined} [end=false] + * @returns {Array<Chunk>} + */ + +const search = /[\0\t\n\r]/g + +/** + * @returns {Preprocessor} + */ +function preprocess() { + let column = 1 + let buffer = '' + /** @type {boolean | undefined} */ + let start = true + /** @type {boolean | undefined} */ + let atCarriageReturn + return preprocessor + + /** @type {Preprocessor} */ + function preprocessor(value, encoding, end) { + /** @type {Array<Chunk>} */ + const chunks = [] + /** @type {RegExpMatchArray | null} */ + let match + /** @type {number} */ + let next + /** @type {number} */ + let startPosition + /** @type {number} */ + let endPosition + /** @type {Code} */ + let code + + // @ts-expect-error `Buffer` does allow an encoding. + value = buffer + value.toString(encoding) + startPosition = 0 + buffer = '' + if (start) { + // To do: `markdown-rs` actually parses BOMs (byte order mark). + if (value.charCodeAt(0) === 65279) { + startPosition++ + } + start = undefined + } + while (startPosition < value.length) { + search.lastIndex = startPosition + match = search.exec(value) + endPosition = + match && match.index !== undefined ? match.index : value.length + code = value.charCodeAt(endPosition) + if (!match) { + buffer = value.slice(startPosition) + break + } + if (code === 10 && startPosition === endPosition && atCarriageReturn) { + chunks.push(-3) + atCarriageReturn = undefined + } else { + if (atCarriageReturn) { + chunks.push(-5) + atCarriageReturn = undefined + } + if (startPosition < endPosition) { + chunks.push(value.slice(startPosition, endPosition)) + column += endPosition - startPosition + } + switch (code) { + case 0: { + chunks.push(65533) + column++ + break + } + case 9: { + next = Math.ceil(column / 4) * 4 + chunks.push(-2) + while (column++ < next) chunks.push(-1) + break + } + case 10: { + chunks.push(-4) + column = 1 + break + } + default: { + atCarriageReturn = true + column = 1 + } + } + } + startPosition = endPosition + 1 + } + if (end) { + if (atCarriageReturn) chunks.push(-5) + if (buffer) chunks.push(buffer) + chunks.push(null) + } + return chunks + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js +/** + * @typedef {import('micromark-util-types').Event} Event + */ + + + +/** + * @param {Array<Event>} events + * @returns {Array<Event>} + */ +function postprocess(events) { + while (!subtokenize(events)) { + // Empty + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js +/** + * Turn the number (in string form as either hexa- or plain decimal) coming from + * a numeric character reference into a character. + * + * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes + * non-characters and control characters safe. + * + * @param {string} value + * Value to decode. + * @param {number} base + * Numeric base. + * @returns {string} + * Character. + */ +function decodeNumericCharacterReference(value, base) { + const code = Number.parseInt(value, base) + if ( + // C0 except for HT, LF, FF, CR, space. + code < 9 || + code === 11 || + (code > 13 && code < 32) || + // Control character (DEL) of C0, and C1 controls. + (code > 126 && code < 160) || + // Lone high surrogates and low surrogates. + (code > 55295 && code < 57344) || + // Noncharacters. + (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || + (code & 65535) === 65535 || + (code & 65535) === 65534 /* eslint-enable no-bitwise */ || + // Out of range + code > 1114111 + ) { + return '\uFFFD' + } + return String.fromCharCode(code) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js + + +const characterEscapeOrReference = + /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi + +/** + * Decode markdown strings (which occur in places such as fenced code info + * strings, destinations, labels, and titles). + * + * The “string” content type allows character escapes and -references. + * This decodes those. + * + * @param {string} value + * Value to decode. + * @returns {string} + * Decoded value. + */ +function decodeString(value) { + return value.replace(characterEscapeOrReference, decode) +} + +/** + * @param {string} $0 + * @param {string} $1 + * @param {string} $2 + * @returns {string} + */ +function decode($0, $1, $2) { + if ($1) { + // Escape. + return $1 + } + + // Reference. + const head = $2.charCodeAt(0) + if (head === 35) { + const head = $2.charCodeAt(1) + const hex = head === 120 || head === 88 + return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) + } + return decodeNamedCharacterReference($2) || $0 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js +/** + * @typedef {import('unist').Node} Node + * @typedef {import('unist').Point} Point + * @typedef {import('unist').Position} Position + */ + +/** + * @typedef NodeLike + * @property {string} type + * @property {PositionLike | null | undefined} [position] + * + * @typedef PositionLike + * @property {PointLike | null | undefined} [start] + * @property {PointLike | null | undefined} [end] + * + * @typedef PointLike + * @property {number | null | undefined} [line] + * @property {number | null | undefined} [column] + * @property {number | null | undefined} [offset] + */ + +/** + * Serialize the positional info of a point, position (start and end points), + * or node. + * + * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] + * Node, position, or point. + * @returns {string} + * Pretty printed positional info of a node (`string`). + * + * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) + * or a point `l:c` (when given `point`), where `l` stands for line, `c` for + * column, `s` for `start`, and `e` for end. + * An empty string (`''`) is returned if the given value is neither `node`, + * `position`, nor `point`. + */ +function stringifyPosition(value) { + // Nothing. + if (!value || typeof value !== 'object') { + return '' + } + + // Node. + if ('position' in value || 'type' in value) { + return position(value.position) + } + + // Position. + if ('start' in value || 'end' in value) { + return position(value) + } + + // Point. + if ('line' in value || 'column' in value) { + return point(value) + } + + // ? + return '' +} + +/** + * @param {Point | PointLike | null | undefined} point + * @returns {string} + */ +function point(point) { + return index(point && point.line) + ':' + index(point && point.column) +} + +/** + * @param {Position | PositionLike | null | undefined} pos + * @returns {string} + */ +function position(pos) { + return point(pos && pos.start) + '-' + point(pos && pos.end) +} + +/** + * @param {number | null | undefined} value + * @returns {number} + */ +function index(value) { + return value && typeof value === 'number' ? value : 1 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js +/** + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Value} Value + * + * @typedef {import('unist').Parent} UnistParent + * @typedef {import('unist').Point} Point + * + * @typedef {import('mdast').PhrasingContent} PhrasingContent + * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent + * @typedef {import('mdast').Content} Content + * @typedef {import('mdast').Break} Break + * @typedef {import('mdast').Blockquote} Blockquote + * @typedef {import('mdast').Code} Code + * @typedef {import('mdast').Definition} Definition + * @typedef {import('mdast').Emphasis} Emphasis + * @typedef {import('mdast').Heading} Heading + * @typedef {import('mdast').HTML} HTML + * @typedef {import('mdast').Image} Image + * @typedef {import('mdast').ImageReference} ImageReference + * @typedef {import('mdast').InlineCode} InlineCode + * @typedef {import('mdast').Link} Link + * @typedef {import('mdast').LinkReference} LinkReference + * @typedef {import('mdast').List} List + * @typedef {import('mdast').ListItem} ListItem + * @typedef {import('mdast').Paragraph} Paragraph + * @typedef {import('mdast').Root} Root + * @typedef {import('mdast').Strong} Strong + * @typedef {import('mdast').Text} Text + * @typedef {import('mdast').ThematicBreak} ThematicBreak + * @typedef {import('mdast').ReferenceType} ReferenceType + * @typedef {import('../index.js').CompileData} CompileData + */ + +/** + * @typedef {Root | Content} Node + * @typedef {Extract<Node, UnistParent>} Parent + * + * @typedef {Omit<UnistParent, 'type' | 'children'> & {type: 'fragment', children: Array<PhrasingContent>}} Fragment + */ + +/** + * @callback Transform + * Extra transform, to change the AST afterwards. + * @param {Root} tree + * Tree to transform. + * @returns {Root | undefined | null | void} + * New tree or nothing (in which case the current tree is used). + * + * @callback Handle + * Handle a token. + * @param {CompileContext} this + * Context. + * @param {Token} token + * Current token. + * @returns {void} + * Nothing. + * + * @typedef {Record<string, Handle>} Handles + * Token types mapping to handles + * + * @callback OnEnterError + * Handle the case where the `right` token is open, but it is closed (by the + * `left` token) or because we reached the end of the document. + * @param {Omit<CompileContext, 'sliceSerialize'>} this + * Context. + * @param {Token | undefined} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @callback OnExitError + * Handle the case where the `right` token is open but it is closed by + * exiting the `left` token. + * @param {Omit<CompileContext, 'sliceSerialize'>} this + * Context. + * @param {Token} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @typedef {[Token, OnEnterError | undefined]} TokenTuple + * Open token on the stack, with an optional error handler for when + * that token isn’t closed properly. + */ + +/** + * @typedef Config + * Configuration. + * + * We have our defaults, but extensions will add more. + * @property {Array<string>} canContainEols + * Token types where line endings are used. + * @property {Handles} enter + * Opening handles. + * @property {Handles} exit + * Closing handles. + * @property {Array<Transform>} transforms + * Tree transforms. + * + * @typedef {Partial<Config>} Extension + * Change how markdown tokens from micromark are turned into mdast. + * + * @typedef CompileContext + * mdast compiler context. + * @property {Array<Node | Fragment>} stack + * Stack of nodes. + * @property {Array<TokenTuple>} tokenStack + * Stack of tokens. + * @property {<Key extends keyof CompileData>(key: Key) => CompileData[Key]} getData + * Get data from the key/value store. + * @property {<Key extends keyof CompileData>(key: Key, value?: CompileData[Key]) => void} setData + * Set data into the key/value store. + * @property {(this: CompileContext) => void} buffer + * Capture some of the output data. + * @property {(this: CompileContext) => string} resume + * Stop capturing and access the output data. + * @property {<Kind extends Node>(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter + * Enter a token. + * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit + * Exit a token. + * @property {TokenizeContext['sliceSerialize']} sliceSerialize + * Get the string value of a token. + * @property {Config} config + * Configuration. + * + * @typedef FromMarkdownOptions + * Configuration for how to build mdast. + * @property {Array<Extension | Array<Extension>> | null | undefined} [mdastExtensions] + * Extensions for this utility to change how tokens are turned into a tree. + * + * @typedef {ParseOptions & FromMarkdownOptions} Options + * Configuration. + */ + +// To do: micromark: create a registry of tokens? +// To do: next major: don’t return given `Node` from `enter`. +// To do: next major: remove setter/getter. + + + + + + + + + + +const lib_own = {}.hasOwnProperty + +/** + * @param value + * Markdown to parse. + * @param encoding + * Character encoding for when `value` is `Buffer`. + * @param options + * Configuration. + * @returns + * mdast tree. + */ +const fromMarkdown = + /** + * @type {( + * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & + * ((value: Value, options?: Options | null | undefined) => Root) + * )} + */ + + /** + * @param {Value} value + * @param {Encoding | Options | null | undefined} [encoding] + * @param {Options | null | undefined} [options] + * @returns {Root} + */ + function (value, encoding, options) { + if (typeof encoding !== 'string') { + options = encoding + encoding = undefined + } + return compiler(options)( + postprocess( + parse(options).document().write(preprocess()(value, encoding, true)) + ) + ) + } + +/** + * Note this compiler only understand complete buffering, not streaming. + * + * @param {Options | null | undefined} [options] + */ +function compiler(options) { + /** @type {Config} */ + const config = { + transforms: [], + canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], + enter: { + autolink: opener(link), + autolinkProtocol: onenterdata, + autolinkEmail: onenterdata, + atxHeading: opener(heading), + blockQuote: opener(blockQuote), + characterEscape: onenterdata, + characterReference: onenterdata, + codeFenced: opener(codeFlow), + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: opener(codeFlow, buffer), + codeText: opener(codeText, buffer), + codeTextData: onenterdata, + data: onenterdata, + codeFlowValue: onenterdata, + definition: opener(definition), + definitionDestinationString: buffer, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: opener(emphasis), + hardBreakEscape: opener(hardBreak), + hardBreakTrailing: opener(hardBreak), + htmlFlow: opener(html, buffer), + htmlFlowData: onenterdata, + htmlText: opener(html, buffer), + htmlTextData: onenterdata, + image: opener(image), + label: buffer, + link: opener(link), + listItem: opener(listItem), + listItemValue: onenterlistitemvalue, + listOrdered: opener(list, onenterlistordered), + listUnordered: opener(list), + paragraph: opener(paragraph), + reference: onenterreference, + referenceString: buffer, + resourceDestinationString: buffer, + resourceTitleString: buffer, + setextHeading: opener(heading), + strong: opener(strong), + thematicBreak: opener(thematicBreak) + }, + exit: { + atxHeading: closer(), + atxHeadingSequence: onexitatxheadingsequence, + autolink: closer(), + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: closer(), + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: closer(onexitcodefenced), + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: onexitcodefencedfencemeta, + codeFlowValue: onexitdata, + codeIndented: closer(onexitcodeindented), + codeText: closer(onexitcodetext), + codeTextData: onexitdata, + data: onexitdata, + definition: closer(), + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: closer(), + hardBreakEscape: closer(onexithardbreak), + hardBreakTrailing: closer(onexithardbreak), + htmlFlow: closer(onexithtmlflow), + htmlFlowData: onexitdata, + htmlText: closer(onexithtmltext), + htmlTextData: onexitdata, + image: closer(onexitimage), + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: closer(onexitlink), + listItem: closer(), + listOrdered: closer(), + listUnordered: closer(), + paragraph: closer(), + referenceString: onexitreferencestring, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + resource: onexitresource, + setextHeading: closer(onexitsetextheading), + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: closer(), + thematicBreak: closer() + } + } + configure(config, (options || {}).mdastExtensions || []) + + /** @type {CompileData} */ + const data = {} + return compile + + /** + * Turn micromark events into an mdast tree. + * + * @param {Array<Event>} events + * Events. + * @returns {Root} + * mdast tree. + */ + function compile(events) { + /** @type {Root} */ + let tree = { + type: 'root', + children: [] + } + /** @type {Omit<CompileContext, 'sliceSerialize'>} */ + const context = { + stack: [tree], + tokenStack: [], + config, + enter, + exit, + buffer, + resume, + setData, + getData + } + /** @type {Array<number>} */ + const listStack = [] + let index = -1 + while (++index < events.length) { + // We preprocess lists to add `listItem` tokens, and to infer whether + // items the list itself are spread out. + if ( + events[index][1].type === 'listOrdered' || + events[index][1].type === 'listUnordered' + ) { + if (events[index][0] === 'enter') { + listStack.push(index) + } else { + const tail = listStack.pop() + index = prepareList(events, tail, index) + } + } + } + index = -1 + while (++index < events.length) { + const handler = config[events[index][0]] + if (lib_own.call(handler, events[index][1].type)) { + handler[events[index][1].type].call( + Object.assign( + { + sliceSerialize: events[index][2].sliceSerialize + }, + context + ), + events[index][1] + ) + } + } + + // Handle tokens still being open. + if (context.tokenStack.length > 0) { + const tail = context.tokenStack[context.tokenStack.length - 1] + const handler = tail[1] || defaultOnError + handler.call(context, undefined, tail[0]) + } + + // Figure out `root` position. + tree.position = { + start: lib_point( + events.length > 0 + ? events[0][1].start + : { + line: 1, + column: 1, + offset: 0 + } + ), + end: lib_point( + events.length > 0 + ? events[events.length - 2][1].end + : { + line: 1, + column: 1, + offset: 0 + } + ) + } + + // Call transforms. + index = -1 + while (++index < config.transforms.length) { + tree = config.transforms[index](tree) || tree + } + return tree + } + + /** + * @param {Array<Event>} events + * @param {number} start + * @param {number} length + * @returns {number} + */ + function prepareList(events, start, length) { + let index = start - 1 + let containerBalance = -1 + let listSpread = false + /** @type {Token | undefined} */ + let listItem + /** @type {number | undefined} */ + let lineIndex + /** @type {number | undefined} */ + let firstBlankLineIndex + /** @type {boolean | undefined} */ + let atMarker + while (++index <= length) { + const event = events[index] + if ( + event[1].type === 'listUnordered' || + event[1].type === 'listOrdered' || + event[1].type === 'blockQuote' + ) { + if (event[0] === 'enter') { + containerBalance++ + } else { + containerBalance-- + } + atMarker = undefined + } else if (event[1].type === 'lineEndingBlank') { + if (event[0] === 'enter') { + if ( + listItem && + !atMarker && + !containerBalance && + !firstBlankLineIndex + ) { + firstBlankLineIndex = index + } + atMarker = undefined + } + } else if ( + event[1].type === 'linePrefix' || + event[1].type === 'listItemValue' || + event[1].type === 'listItemMarker' || + event[1].type === 'listItemPrefix' || + event[1].type === 'listItemPrefixWhitespace' + ) { + // Empty. + } else { + atMarker = undefined + } + if ( + (!containerBalance && + event[0] === 'enter' && + event[1].type === 'listItemPrefix') || + (containerBalance === -1 && + event[0] === 'exit' && + (event[1].type === 'listUnordered' || + event[1].type === 'listOrdered')) + ) { + if (listItem) { + let tailIndex = index + lineIndex = undefined + while (tailIndex--) { + const tailEvent = events[tailIndex] + if ( + tailEvent[1].type === 'lineEnding' || + tailEvent[1].type === 'lineEndingBlank' + ) { + if (tailEvent[0] === 'exit') continue + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + listSpread = true + } + tailEvent[1].type = 'lineEnding' + lineIndex = tailIndex + } else if ( + tailEvent[1].type === 'linePrefix' || + tailEvent[1].type === 'blockQuotePrefix' || + tailEvent[1].type === 'blockQuotePrefixWhitespace' || + tailEvent[1].type === 'blockQuoteMarker' || + tailEvent[1].type === 'listItemIndent' + ) { + // Empty + } else { + break + } + } + if ( + firstBlankLineIndex && + (!lineIndex || firstBlankLineIndex < lineIndex) + ) { + listItem._spread = true + } + + // Fix position. + listItem.end = Object.assign( + {}, + lineIndex ? events[lineIndex][1].start : event[1].end + ) + events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) + index++ + length++ + } + + // Create a new list item. + if (event[1].type === 'listItemPrefix') { + listItem = { + type: 'listItem', + _spread: false, + start: Object.assign({}, event[1].start), + // @ts-expect-error: we’ll add `end` in a second. + end: undefined + } + // @ts-expect-error: `listItem` is most definitely defined, TS... + events.splice(index, 0, ['enter', listItem, event[2]]) + index++ + length++ + firstBlankLineIndex = undefined + atMarker = true + } + } + } + events[start][1]._spread = listSpread + return length + } + + /** + * Set data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @param {CompileData[Key]} [value] + * New value. + * @returns {void} + * Nothing. + */ + function setData(key, value) { + data[key] = value + } + + /** + * Get data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @returns {CompileData[Key]} + * Value. + */ + function getData(key) { + return data[key] + } + + /** + * Create an opener handle. + * + * @param {(token: Token) => Node} create + * Create a node. + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function opener(create, and) { + return open + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function open(token) { + enter.call(this, create(token), token) + if (and) and.call(this, token) + } + } + + /** + * @this {CompileContext} + * @returns {void} + */ + function buffer() { + this.stack.push({ + type: 'fragment', + children: [] + }) + } + + /** + * @template {Node} Kind + * Node type. + * @this {CompileContext} + * Context. + * @param {Kind} node + * Node to enter. + * @param {Token} token + * Corresponding token. + * @param {OnEnterError | undefined} [errorHandler] + * Handle the case where this token is open, but it is closed by something else. + * @returns {Kind} + * The given node. + */ + function enter(node, token, errorHandler) { + const parent = this.stack[this.stack.length - 1] + // @ts-expect-error: Assume `Node` can exist as a child of `parent`. + parent.children.push(node) + this.stack.push(node) + this.tokenStack.push([token, errorHandler]) + // @ts-expect-error: `end` will be patched later. + node.position = { + start: lib_point(token.start) + } + return node + } + + /** + * Create a closer handle. + * + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function closer(and) { + return close + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function close(token) { + if (and) and.call(this, token) + exit.call(this, token) + } + } + + /** + * @this {CompileContext} + * Context. + * @param {Token} token + * Corresponding token. + * @param {OnExitError | undefined} [onExitError] + * Handle the case where another token is open. + * @returns {Node} + * The closed node. + */ + function exit(token, onExitError) { + const node = this.stack.pop() + const open = this.tokenStack.pop() + if (!open) { + throw new Error( + 'Cannot close `' + + token.type + + '` (' + + stringifyPosition({ + start: token.start, + end: token.end + }) + + '): it’s not open' + ) + } else if (open[0].type !== token.type) { + if (onExitError) { + onExitError.call(this, token, open[0]) + } else { + const handler = open[1] || defaultOnError + handler.call(this, token, open[0]) + } + } + node.position.end = lib_point(token.end) + return node + } + + /** + * @this {CompileContext} + * @returns {string} + */ + function resume() { + return lib_toString(this.stack.pop()) + } + + // + // Handlers. + // + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistordered() { + setData('expectingFirstListItemValue', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistitemvalue(token) { + if (getData('expectingFirstListItemValue')) { + const ancestor = this.stack[this.stack.length - 2] + ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) + setData('expectingFirstListItemValue') + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfenceinfo() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.lang = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfencemeta() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.meta = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfence() { + // Exit if this is the closing fence. + if (getData('flowCodeInside')) return + this.buffer() + setData('flowCodeInside', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefenced() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') + setData('flowCodeInside') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodeindented() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/(\r?\n|\r)$/g, '') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitionlabelstring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + node.label = label + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiontitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiondestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitatxheadingsequence(token) { + const node = this.stack[this.stack.length - 1] + if (!node.depth) { + const depth = this.sliceSerialize(token).length + node.depth = depth + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadingtext() { + setData('setextHeadingSlurpLineEnding', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadinglinesequence(token) { + const node = this.stack[this.stack.length - 1] + node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheading() { + setData('setextHeadingSlurpLineEnding') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterdata(token) { + const node = this.stack[this.stack.length - 1] + let tail = node.children[node.children.length - 1] + if (!tail || tail.type !== 'text') { + // Add a new text node. + tail = text() + // @ts-expect-error: we’ll add `end` later. + tail.position = { + start: lib_point(token.start) + } + // @ts-expect-error: Assume `parent` accepts `text`. + node.children.push(tail) + } + this.stack.push(tail) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitdata(token) { + const tail = this.stack.pop() + tail.value += this.sliceSerialize(token) + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlineending(token) { + const context = this.stack[this.stack.length - 1] + // If we’re at a hard break, include the line ending in there. + if (getData('atHardBreak')) { + const tail = context.children[context.children.length - 1] + tail.position.end = lib_point(token.end) + setData('atHardBreak') + return + } + if ( + !getData('setextHeadingSlurpLineEnding') && + config.canContainEols.includes(context.type) + ) { + onenterdata.call(this, token) + onexitdata.call(this, token) + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithardbreak() { + setData('atHardBreak', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmlflow() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmltext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcodetext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlink() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitimage() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabeltext(token) { + const string = this.sliceSerialize(token) + const ancestor = this.stack[this.stack.length - 2] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + ancestor.label = decodeString(string) + // @ts-expect-error: same as above. + ancestor.identifier = normalizeIdentifier(string).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabel() { + const fragment = this.stack[this.stack.length - 1] + const value = this.resume() + const node = this.stack[this.stack.length - 1] + // Assume a reference. + setData('inReference', true) + if (node.type === 'link') { + /** @type {Array<StaticPhrasingContent>} */ + // @ts-expect-error: Assume static phrasing content. + const children = fragment.children + node.children = children + } else { + node.alt = value + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcedestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcetitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresource() { + setData('inReference') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterreference() { + setData('referenceType', 'collapsed') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitreferencestring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + node.label = label + // @ts-expect-error: same as above. + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + setData('referenceType', 'full') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcharacterreferencemarker(token) { + setData('characterReferenceType', token.type) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcharacterreferencevalue(token) { + const data = this.sliceSerialize(token) + const type = getData('characterReferenceType') + /** @type {string} */ + let value + if (type) { + value = decodeNumericCharacterReference( + data, + type === 'characterReferenceMarkerNumeric' ? 10 : 16 + ) + setData('characterReferenceType') + } else { + const result = decodeNamedCharacterReference(data) + value = result + } + const tail = this.stack.pop() + tail.value += value + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkprotocol(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = this.sliceSerialize(token) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkemail(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = 'mailto:' + this.sliceSerialize(token) + } + + // + // Creaters. + // + + /** @returns {Blockquote} */ + function blockQuote() { + return { + type: 'blockquote', + children: [] + } + } + + /** @returns {Code} */ + function codeFlow() { + return { + type: 'code', + lang: null, + meta: null, + value: '' + } + } + + /** @returns {InlineCode} */ + function codeText() { + return { + type: 'inlineCode', + value: '' + } + } + + /** @returns {Definition} */ + function definition() { + return { + type: 'definition', + identifier: '', + label: null, + title: null, + url: '' + } + } + + /** @returns {Emphasis} */ + function emphasis() { + return { + type: 'emphasis', + children: [] + } + } + + /** @returns {Heading} */ + function heading() { + // @ts-expect-error `depth` will be set later. + return { + type: 'heading', + depth: undefined, + children: [] + } + } + + /** @returns {Break} */ + function hardBreak() { + return { + type: 'break' + } + } + + /** @returns {HTML} */ + function html() { + return { + type: 'html', + value: '' + } + } + + /** @returns {Image} */ + function image() { + return { + type: 'image', + title: null, + url: '', + alt: null + } + } + + /** @returns {Link} */ + function link() { + return { + type: 'link', + title: null, + url: '', + children: [] + } + } + + /** + * @param {Token} token + * @returns {List} + */ + function list(token) { + return { + type: 'list', + ordered: token.type === 'listOrdered', + start: null, + spread: token._spread, + children: [] + } + } + + /** + * @param {Token} token + * @returns {ListItem} + */ + function listItem(token) { + return { + type: 'listItem', + spread: token._spread, + checked: null, + children: [] + } + } + + /** @returns {Paragraph} */ + function paragraph() { + return { + type: 'paragraph', + children: [] + } + } + + /** @returns {Strong} */ + function strong() { + return { + type: 'strong', + children: [] + } + } + + /** @returns {Text} */ + function text() { + return { + type: 'text', + value: '' + } + } + + /** @returns {ThematicBreak} */ + function thematicBreak() { + return { + type: 'thematicBreak' + } + } +} + +/** + * Copy a point-like value. + * + * @param {Point} d + * Point-like value. + * @returns {Point} + * unist point. + */ +function lib_point(d) { + return { + line: d.line, + column: d.column, + offset: d.offset + } +} + +/** + * @param {Config} combined + * @param {Array<Extension | Array<Extension>>} extensions + * @returns {void} + */ +function configure(combined, extensions) { + let index = -1 + while (++index < extensions.length) { + const value = extensions[index] + if (Array.isArray(value)) { + configure(combined, value) + } else { + extension(combined, value) + } + } +} + +/** + * @param {Config} combined + * @param {Extension} extension + * @returns {void} + */ +function extension(combined, extension) { + /** @type {keyof Extension} */ + let key + for (key in extension) { + if (lib_own.call(extension, key)) { + if (key === 'canContainEols') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'transforms') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'enter' || key === 'exit') { + const right = extension[key] + if (right) { + Object.assign(combined[key], right) + } + } + } + } +} + +/** @type {OnEnterError} */ +function defaultOnError(left, right) { + if (left) { + throw new Error( + 'Cannot close `' + + left.type + + '` (' + + stringifyPosition({ + start: left.start, + end: left.end + }) + + '): a different token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is open' + ) + } else { + throw new Error( + 'Cannot close document, a token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is still open' + ) + } +} + +// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js +var esm = __webpack_require__(513); +;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-6b48ae7d.js + + + +function preprocessMarkdown(markdown) { + const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); + const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); + return withoutExtraSpaces; +} +function markdownToLines(markdown) { + const preprocessedMarkdown = preprocessMarkdown(markdown); + const { children } = fromMarkdown(preprocessedMarkdown); + const lines = [[]]; + let currentLine = 0; + function processNode(node, parentType = "normal") { + if (node.type === "text") { + const textLines = node.value.split("\n"); + textLines.forEach((textLine, index) => { + if (index !== 0) { + currentLine++; + lines.push([]); + } + textLine.split(" ").forEach((word) => { + if (word) { + lines[currentLine].push({ content: word, type: parentType }); + } + }); + }); + } else if (node.type === "strong" || node.type === "emphasis") { + node.children.forEach((contentNode) => { + processNode(contentNode, node.type); + }); + } + } + children.forEach((treeNode) => { + if (treeNode.type === "paragraph") { + treeNode.children.forEach((contentNode) => { + processNode(contentNode); + }); + } + }); + return lines; +} +function markdownToHTML(markdown) { + const { children } = fromMarkdown(markdown); + function output(node) { + if (node.type === "text") { + return node.value.replace(/\n/g, "<br/>"); + } else if (node.type === "strong") { + return `<strong>${node.children.map(output).join("")}</strong>`; + } else if (node.type === "emphasis") { + return `<em>${node.children.map(output).join("")}</em>`; + } else if (node.type === "paragraph") { + return `<p>${node.children.map(output).join("")}</p>`; + } + return `Unsupported markdown: ${node.type}`; + } + return children.map(output).join(""); +} +function splitTextToChars(text) { + if (Intl.Segmenter) { + return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); + } + return [...text]; +} +function splitWordToFitWidth(checkFit, word) { + const characters = splitTextToChars(word.content); + return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); +} +function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { + if (remainingChars.length === 0) { + return [ + { content: usedChars.join(""), type }, + { content: "", type } + ]; + } + const [nextChar, ...rest] = remainingChars; + const newWord = [...usedChars, nextChar]; + if (checkFit([{ content: newWord.join(""), type }])) { + return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); + } + if (usedChars.length === 0 && nextChar) { + usedChars.push(nextChar); + remainingChars.shift(); + } + return [ + { content: usedChars.join(""), type }, + { content: remainingChars.join(""), type } + ]; +} +function splitLineToFitWidth(line, checkFit) { + if (line.some(({ content }) => content.includes("\n"))) { + throw new Error("splitLineToFitWidth does not support newlines in the line"); + } + return splitLineToFitWidthRecursion(line, checkFit); +} +function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { + if (words.length === 0) { + if (newLine.length > 0) { + lines.push(newLine); + } + return lines.length > 0 ? lines : []; + } + let joiner = ""; + if (words[0].content === " ") { + joiner = " "; + words.shift(); + } + const nextWord = words.shift() ?? { content: " ", type: "normal" }; + const lineWithNextWord = [...newLine]; + if (joiner !== "") { + lineWithNextWord.push({ content: joiner, type: "normal" }); + } + lineWithNextWord.push(nextWord); + if (checkFit(lineWithNextWord)) { + return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); + } + if (newLine.length > 0) { + lines.push(newLine); + words.unshift(nextWord); + } else if (nextWord.content) { + const [line, rest] = splitWordToFitWidth(checkFit, nextWord); + lines.push([line]); + if (rest.content) { + words.unshift(rest); + } + } + return splitLineToFitWidthRecursion(words, checkFit, lines); +} +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlSpan(element, node, width, classes, addBackground = false) { + const fo = element.append("foreignObject"); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + ` + <span class="${labelClass} ${classes}" ` + (node.labelStyle ? 'style="' + node.labelStyle + '"' : "") + ">" + label + "</span>" + ); + applyStyle(div, node.labelStyle); + div.style("display", "table-cell"); + div.style("white-space", "nowrap"); + div.style("max-width", width + "px"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + if (addBackground) { + div.attr("class", "labelBkg"); + } + let bbox = div.node().getBoundingClientRect(); + if (bbox.width === width) { + div.style("display", "table"); + div.style("white-space", "break-spaces"); + div.style("width", width + "px"); + bbox = div.node().getBoundingClientRect(); + } + fo.style("width", bbox.width); + fo.style("height", bbox.height); + return fo.node(); +} +function createTspan(textElement, lineIndex, lineHeight) { + return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); +} +function computeWidthOfText(parentNode, lineHeight, line) { + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, line); + const textLength = testSpan.node().getComputedTextLength(); + testElement.remove(); + return textLength; +} +function computeDimensionOfText(parentNode, lineHeight, text) { + var _a; + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); + const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); + if (textDimension) { + testElement.remove(); + } + return textDimension; +} +function createFormattedText(width, g, structuredText, addBackground = false) { + const lineHeight = 1.1; + const labelGroup = g.append("g"); + const bkg = labelGroup.insert("rect").attr("class", "background"); + const textElement = labelGroup.append("text").attr("y", "-10.1"); + let lineIndex = 0; + for (const line of structuredText) { + const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; + const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); + for (const preparedLine of linesUnderWidth) { + const tspan = createTspan(textElement, lineIndex, lineHeight); + updateTextContentAndStyles(tspan, preparedLine); + lineIndex++; + } + } + if (addBackground) { + const bbox = textElement.node().getBBox(); + const padding = 2; + bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); + return labelGroup.node(); + } else { + return textElement.node(); + } +} +function updateTextContentAndStyles(tspan, wrappedLine) { + tspan.text(""); + wrappedLine.forEach((word, index) => { + const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); + if (index === 0) { + innerTspan.text(word.content); + } else { + innerTspan.text(" " + word.content); + } + }); +} +const createText = (el, text = "", { + style = "", + isTitle = false, + classes = "", + useHtmlLabels = true, + isNode = true, + width = 200, + addSvgBackground = false +} = {}) => { + mermaid_f47111a7.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); + if (useHtmlLabels) { + const htmlText = markdownToHTML(text); + const node = { + isNode, + label: (0,mermaid_f47111a7.M)(htmlText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `<i class='${s.replace(":", " ")}'></i>` + ), + labelStyle: style.replace("fill:", "color:") + }; + const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); + return vertexNode; + } else { + const structuredText = markdownToLines(text); + const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); + return svgLabel; + } +}; + + + +/***/ }), + +/***/ 8747: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ a: () => (/* binding */ insertMarkers$1), +/* harmony export */ b: () => (/* binding */ clear$1), +/* harmony export */ c: () => (/* binding */ createLabel$1), +/* harmony export */ d: () => (/* binding */ clear), +/* harmony export */ e: () => (/* binding */ insertNode), +/* harmony export */ f: () => (/* binding */ insertEdgeLabel), +/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins), +/* harmony export */ h: () => (/* binding */ insertEdge), +/* harmony export */ i: () => (/* binding */ intersectRect$1), +/* harmony export */ j: () => (/* binding */ positionEdgeLabel), +/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset), +/* harmony export */ l: () => (/* binding */ labelHelper), +/* harmony export */ m: () => (/* binding */ addEdgeMarkers), +/* harmony export */ p: () => (/* binding */ positionNode), +/* harmony export */ s: () => (/* binding */ setNodeElem), +/* harmony export */ u: () => (/* binding */ updateNodeBounds) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3791); + + + +const insertMarkers = (elem, markerArray, type, id) => { + markerArray.forEach((markerName) => { + markers[markerName](elem, type, id); + }); +}; +const extension = (elem, type, id) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).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"); +}; +const composition = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).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"); +}; +const aggregation = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).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"); +}; +const dependency = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).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"); +}; +const lollipop = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).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); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).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); +}; +const point = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).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"); +}; +const circle$1 = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).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"); +}; +const cross = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).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"); +}; +const barb = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-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"); +}; +const markers = { + extension, + composition, + aggregation, + dependency, + lollipop, + point, + circle: circle$1, + cross, + barb +}; +const insertMarkers$1 = insertMarkers; +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlLabel(node) { + const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + '<span class="' + labelClass + '" ' + (node.labelStyle ? 'style="' + node.labelStyle + '"' : "") + ">" + label + "</span>" + ); + applyStyle(div, node.labelStyle); + div.style("display", "inline-block"); + div.style("white-space", "nowrap"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + return fo.node(); +} +const createLabel = (_vertexText, style, isTitle, isNode) => { + let vertexText = _vertexText || ""; + if (typeof vertexText === "object") { + vertexText = vertexText[0]; + } + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + vertexText = vertexText.replace(/\\n|\n/g, "<br />"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText); + const node = { + isNode, + label: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `<i class='${s.replace(":", " ")}'></i>` + ), + labelStyle: style.replace("fill:", "color:") + }; + let vertexNode = addHtmlLabel(node); + return vertexNode; + } else { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", style.replace("color:", "fill:")); + let rows = []; + if (typeof vertexText === "string") { + rows = vertexText.split(/\\n|\n|<br\s*\/?>/gi); + } else if (Array.isArray(vertexText)) { + rows = vertexText; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + if (isTitle) { + tspan.setAttribute("class", "title-row"); + } else { + tspan.setAttribute("class", "row"); + } + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; + } +}; +const createLabel$1 = createLabel; +const labelHelper = async (parent, node, _classes, isNode) => { + let classes; + const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); + if (!_classes) { + classes = "node default"; + } else { + classes = _classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); + let labelText; + if (node.labelText === void 0) { + labelText = ""; + } else { + labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; + } + const textNode = label.node(); + let text; + if (node.labelType === "markdown") { + text = (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), { + useHtmlLabels, + width: node.width || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth, + classes: "markdown-node-label" + }); + } else { + text = textNode.appendChild( + createLabel$1( + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), + node.labelStyle, + false, + isNode + ) + ); + } + let bbox = text.getBBox(); + const halfPadding = node.padding / 2; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); + const images = div.getElementsByTagName("img"); + if (images) { + const noImgText = labelText.replace(/<img[^>]*>/g, "").trim() === ""; + await Promise.all( + [...images].map( + (img) => new Promise((res) => { + function setupImage() { + img.style.display = "flex"; + img.style.flexDirection = "column"; + if (noImgText) { + const bodyFontSize = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize; + const enlargingFactor = 5; + const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; + img.style.minWidth = width; + img.style.maxWidth = width; + } else { + img.style.width = "100%"; + } + res(img); + } + setTimeout(() => { + if (img.complete) { + setupImage(); + } + }); + img.addEventListener("error", setupImage); + img.addEventListener("load", setupImage); + }) + ) + ); + } + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (useHtmlLabels) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } else { + label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); + } + if (node.centerLabel) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } + label.insert("rect", ":first-child"); + return { shapeSvg, bbox, halfPadding, label }; +}; +const updateNodeBounds = (node, element) => { + const bbox = element.node().getBBox(); + node.width = bbox.width; + node.height = bbox.height; +}; +function insertPolygonShape(parent, w, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); +} +function intersectNode(node, point2) { + return node.intersect(point2); +} +function intersectEllipse(node, rx, ry, point2) { + var cx = node.x; + var cy = node.y; + var px = cx - point2.x; + var py = cy - point2.y; + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + var dx = Math.abs(rx * ry * px / det); + if (point2.x < cx) { + dx = -dx; + } + var dy = Math.abs(rx * ry * py / det); + if (point2.y < cy) { + dy = -dy; + } + return { x: cx + dx, y: cy + dy }; +} +function intersectCircle(node, rx, point2) { + return intersectEllipse(node, rx, rx, point2); +} +function intersectLine(p1, p2, q1, q2) { + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x, y; + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; + if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { + return; + } + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; + if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { + return; + } + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return; + } + offset = Math.abs(denom / 2); + num = b1 * c2 - b2 * c1; + x = num < 0 ? (num - offset) / denom : (num + offset) / denom; + num = a2 * c1 - a1 * c2; + y = num < 0 ? (num - offset) / denom : (num + offset) / denom; + return { x, y }; +} +function sameSign(r1, r2) { + return r1 * r2 > 0; +} +function intersectPolygon(node, polyPoints, point2) { + var x1 = node.x; + var y1 = node.y; + var intersections = []; + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + if (typeof polyPoints.forEach === "function") { + polyPoints.forEach(function(entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + } else { + minX = Math.min(minX, polyPoints.x); + minY = Math.min(minY, polyPoints.y); + } + var left = x1 - node.width / 2 - minX; + var top = y1 - node.height / 2 - minY; + for (var i = 0; i < polyPoints.length; i++) { + var p1 = polyPoints[i]; + var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; + var intersect2 = intersectLine( + node, + point2, + { x: left + p1.x, y: top + p1.y }, + { x: left + p2.x, y: top + p2.y } + ); + if (intersect2) { + intersections.push(intersect2); + } + } + if (!intersections.length) { + return node; + } + if (intersections.length > 1) { + intersections.sort(function(p, q) { + var pdx = p.x - point2.x; + var pdy = p.y - point2.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + var qdx = q.x - point2.x; + var qdy = q.y - point2.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); + } + return intersections[0]; +} +const intersectRect = (node, point2) => { + var x = node.x; + var y = node.y; + var dx = point2.x - x; + var dy = point2.y - y; + var w = node.width / 2; + var h = node.height / 2; + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w = -w; + } + sx = w; + sy = dx === 0 ? 0 : w * dy / dx; + } + return { x: x + sx, y: y + sy }; +}; +const intersectRect$1 = intersectRect; +const intersect = { + node: intersectNode, + circle: intersectCircle, + ellipse: intersectEllipse, + polygon: intersectPolygon, + rect: intersectRect$1 +}; +const note = async (parent, node) => { + const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels; + if (!useHtmlLabels) { + node.centerLabel = true; + } + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes); + const rect2 = shapeSvg.insert("rect", ":first-child"); + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const note$1 = note; +const expandAndDeduplicateDirections = (directions) => { + const uniqueDirections = /* @__PURE__ */ new Set(); + for (const direction of directions) { + switch (direction) { + case "x": + uniqueDirections.add("right"); + uniqueDirections.add("left"); + break; + case "y": + uniqueDirections.add("up"); + uniqueDirections.add("down"); + break; + default: + uniqueDirections.add(direction); + break; + } + } + return uniqueDirections; +}; +const getArrowPoints = (duplicatedDirections, bbox, node) => { + const directions = expandAndDeduplicateDirections(duplicatedDirections); + const f = 2; + const height = bbox.height + 2 * node.padding; + const midpoint = height / f; + const width = bbox.width + 2 * midpoint + node.padding; + const padding = node.padding / 2; + if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) { + return [ + // Bottom + { x: 0, y: 0 }, + { x: midpoint, y: 0 }, + { x: width / 2, y: 2 * padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: 0 }, + // Right + { x: width, y: -height / 3 }, + { x: width + 2 * padding, y: -height / 2 }, + { x: width, y: -2 * height / 3 }, + { x: width, y: -height }, + // Top + { x: width - midpoint, y: -height }, + { x: width / 2, y: -height - 2 * padding }, + { x: midpoint, y: -height }, + // Left + { x: 0, y: -height }, + { x: 0, y: -2 * height / 3 }, + { x: -2 * padding, y: -height / 2 }, + { x: 0, y: -height / 3 } + ]; + } + if (directions.has("right") && directions.has("left") && directions.has("up")) { + return [ + { x: midpoint, y: 0 }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("right") && directions.has("left") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: midpoint, y: -height }, + { x: width - midpoint, y: -height }, + { x: width, y: 0 } + ]; + } + if (directions.has("right") && directions.has("up") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: width, y: -midpoint }, + { x: width, y: -height + midpoint }, + { x: 0, y: -height } + ]; + } + if (directions.has("left") && directions.has("up") && directions.has("down")) { + return [ + { x: width, y: 0 }, + { x: 0, y: -midpoint }, + { x: 0, y: -height + midpoint }, + { x: width, y: -height } + ]; + } + if (directions.has("right") && directions.has("left")) { + return [ + { x: midpoint, y: 0 }, + { x: midpoint, y: -padding }, + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: width - midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("up") && directions.has("down")) { + return [ + // Bottom center + { x: width / 2, y: 0 }, + // Left pont of bottom arrow + { x: 0, y: -padding }, + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: 0, y: -height + padding }, + // Top of arrow + { x: width / 2, y: -height }, + { x: width, y: -height + padding }, + // Top of right vertical bar + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding }, + { x: width, y: -padding } + ]; + } + if (directions.has("right") && directions.has("up")) { + return [ + { x: 0, y: 0 }, + { x: width, y: -midpoint }, + { x: 0, y: -height } + ]; + } + if (directions.has("right") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: width, y: 0 }, + { x: 0, y: -height } + ]; + } + if (directions.has("left") && directions.has("up")) { + return [ + { x: width, y: 0 }, + { x: 0, y: -midpoint }, + { x: width, y: -height } + ]; + } + if (directions.has("left") && directions.has("down")) { + return [ + { x: width, y: 0 }, + { x: 0, y: 0 }, + { x: width, y: -height } + ]; + } + if (directions.has("right")) { + return [ + { x: midpoint, y: -padding }, + { x: midpoint, y: -padding }, + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: width - midpoint, y: -height + padding }, + // top left corner of arrow + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding } + ]; + } + if (directions.has("left")) { + return [ + { x: midpoint, y: 0 }, + { x: midpoint, y: -padding }, + // Two points, the right corners + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("up")) { + return [ + // Bottom center + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: 0, y: -height + padding }, + // Top of arrow + { x: width / 2, y: -height }, + { x: width, y: -height + padding }, + // Top of right vertical bar + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding } + ]; + } + if (directions.has("down")) { + return [ + // Bottom center + { x: width / 2, y: 0 }, + // Left pont of bottom arrow + { x: 0, y: -padding }, + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding }, + { x: width, y: -padding } + ]; + } + return [{ x: 0, y: 0 }]; +}; +const formatClass = (str) => { + if (str) { + return " " + str; + } + return ""; +}; +const getClassesFromNode = (node, otherClasses) => { + return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( + node.class + )}`; +}; +const question = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const s = w + h; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)"); + const questionElem = insertPolygonShape(shapeSvg, s, s, points); + questionElem.attr("style", node.style); + updateNodeBounds(node, questionElem); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called"); + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const choice = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const s = 28; + const points = [ + { x: 0, y: s / 2 }, + { x: s / 2, y: 0 }, + { x: 0, y: -s / 2 }, + { x: -s / 2, y: 0 } + ]; + const choice2 = shapeSvg.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ); + choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); + node.width = 28; + node.height = 28; + node.intersect = function(point2) { + return intersect.circle(node, 14, point2); + }; + return shapeSvg; +}; +const hexagon = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const f = 4; + const h = bbox.height + node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const hex = insertPolygonShape(shapeSvg, w, h, points); + hex.attr("style", node.style); + updateNodeBounds(node, hex); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const block_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true); + const f = 2; + const h = bbox.height + 2 * node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = getArrowPoints(node.directions, bbox, node); + const blockArrow = insertPolygonShape(shapeSvg, w, h, points); + blockArrow.attr("style", node.style); + updateNodeBounds(node, blockArrow); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_left_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -h / 2, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + node.width = w + h; + node.height = h; + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_right = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_left = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w + h / 6, y: 0 }, + { x: w - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w + 2 * h / 6, y: 0 }, + { x: w - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const inv_trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_right_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w + h / 2, y: 0 }, + { x: w, y: -h / 2 }, + { x: w + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const cylinder = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const rx = w / 2; + const ry = rx / (2.5 + w / 50); + const h = bbox.height + ry + node.padding; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; + const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); + updateNodeBounds(node, el); + node.intersect = function(point2) { + const pos = intersect.rect(node, point2); + const x = pos.x - node.x; + if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { + let y = ry * ry * (1 - x * x / (rx * rx)); + if (y != 0) { + y = Math.sqrt(y); + } + y = ry - y; + if (point2.y - node.y > 0) { + y = -y; + } + pos.y += y; + } + return pos; + }; + return shapeSvg; +}; +const rect = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes + " " + node.class, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = node.positioned ? node.width : bbox.width + node.padding; + const totalHeight = node.positioned ? node.height : bbox.height + node.padding; + const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; + const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; + rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const composite = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = node.positioned ? node.width : bbox.width + node.padding; + const totalHeight = node.positioned ? node.height : bbox.height + node.padding; + const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; + const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; + rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const labelRect = async (parent, node) => { + const { shapeSvg } = await labelHelper(parent, node, "label", true); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = 0; + const totalHeight = 0; + rect2.attr("width", totalWidth).attr("height", totalHeight); + shapeSvg.attr("class", "label edgeLabel"); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { + const strokeDashArray = []; + const addBorder = (length) => { + strokeDashArray.push(length, 0); + }; + const skipBorder = (length) => { + strokeDashArray.push(0, length); + }; + if (borders.includes("t")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("r")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + if (borders.includes("b")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("l")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); +} +const rectWithTitle = (parent, node) => { + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const innerLine = shapeSvg.insert("line"); + const label = shapeSvg.insert("g").attr("class", "label"); + const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; + let title = ""; + if (typeof text2 === "object") { + title = text2[0]; + } else { + title = text2; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object"); + const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); + let bbox = { width: 0, height: 0 }; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2); + const textRows = text2.slice(1, text2.length); + let titleBox = text.getBBox(); + const descr = label.node().appendChild( + createLabel$1(textRows.join ? textRows.join("<br/>") : textRows, node.labelStyle, true, true) + ); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = descr.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const halfPadding = node.padding / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" + ); + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" + ); + bbox = label.node().getBBox(); + label.attr( + "transform", + "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" + ); + rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const stadium = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const h = bbox.height + node.padding; + const w = bbox.width + h / 4 + node.padding; + const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const circle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main"); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding, point2); + }; + return shapeSvg; +}; +const doublecircle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const gap = 5; + const circleGroup = shapeSvg.insert("g", ":first-child"); + const outerCircle = circleGroup.insert("circle"); + const innerCircle = circleGroup.insert("circle"); + circleGroup.attr("class", node.class); + outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); + innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main"); + updateNodeBounds(node, outerCircle); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); + }; + return shapeSvg; +}; +const subroutine = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w + 8, y: 0 }, + { x: w + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const start = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const forkJoin = (parent, node, dir) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + let width = 70; + let height = 10; + if (dir === "LR") { + width = 10; + height = 70; + } + const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); + updateNodeBounds(node, shape); + node.height = node.height + node.padding / 2; + node.width = node.width + node.padding / 2; + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const end = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const innerCircle = shapeSvg.insert("circle", ":first-child"); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const class_box = (parent, node) => { + const halfPadding = node.padding / 2; + const rowPadding = 4; + const lineHeight = 8; + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const topLine = shapeSvg.insert("line"); + const bottomLine = shapeSvg.insert("line"); + let maxWidth = 0; + let maxHeight = rowPadding; + const labelContainer = shapeSvg.insert("g").attr("class", "label"); + let verticalPos = 0; + const hasInterface = node.classData.annotations && node.classData.annotations[0]; + const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; + const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); + let interfaceBBox = interfaceLabel.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = interfaceLabel.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel); + interfaceBBox = div.getBoundingClientRect(); + dv.attr("width", interfaceBBox.width); + dv.attr("height", interfaceBBox.height); + } + if (node.classData.annotations[0]) { + maxHeight += interfaceBBox.height + rowPadding; + maxWidth += interfaceBBox.width; + } + let classTitleString = node.classData.label; + if (node.classData.type !== void 0 && node.classData.type !== "") { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + classTitleString += "<" + node.classData.type + ">"; + } else { + classTitleString += "<" + node.classData.type + ">"; + } + } + const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle"); + let classTitleBBox = classTitleLabel.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = classTitleLabel.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel); + classTitleBBox = div.getBoundingClientRect(); + dv.attr("width", classTitleBBox.width); + dv.attr("height", classTitleBBox.height); + } + maxHeight += classTitleBBox.height + rowPadding; + if (classTitleBBox.width > maxWidth) { + maxWidth = classTitleBBox.width; + } + const classAttributes = []; + node.classData.members.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let parsedText = parsedInfo.displayText; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + parsedText = parsedText.replace(/</g, "<").replace(/>/g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + parsedText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classAttributes.push(lbl); + }); + maxHeight += lineHeight; + const classMethods = []; + node.classData.methods.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let displayText = parsedInfo.displayText; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + displayText = displayText.replace(/</g, "<").replace(/>/g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + displayText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classMethods.push(lbl); + }); + maxHeight += lineHeight; + if (hasInterface) { + let diffX2 = (maxWidth - interfaceBBox.width) / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" + ); + verticalPos = interfaceBBox.height + rowPadding; + } + let diffX = (maxWidth - classTitleBBox.width) / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + verticalPos += classTitleBBox.height + rowPadding; + topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classAttributes.forEach((lbl) => { + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + verticalPos += lineHeight; + bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classMethods.forEach((lbl) => { + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const shapes = { + rhombus: question, + composite, + question, + rect, + labelRect, + rectWithTitle, + choice, + circle, + doublecircle, + stadium, + hexagon, + block_arrow, + rect_left_inv_arrow, + lean_right, + lean_left, + trapezoid, + inv_trapezoid, + rect_right_inv_arrow, + cylinder, + start, + end, + note: note$1, + subroutine, + fork: forkJoin, + join: forkJoin, + class_box +}; +let nodeElems = {}; +const insertNode = async (elem, node, dir) => { + let newEl; + let el; + if (node.link) { + let target; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") { + target = "_top"; + } else if (node.linkTarget) { + target = node.linkTarget || "_blank"; + } + newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); + el = await shapes[node.shape](newEl, node, dir); + } else { + el = await shapes[node.shape](elem, node, dir); + newEl = el; + } + if (node.tooltip) { + el.attr("title", node.tooltip); + } + if (node.class) { + el.attr("class", "node default " + node.class); + } + newEl.attr("data-node", "true"); + newEl.attr("data-id", node.id); + nodeElems[node.id] = newEl; + if (node.haveCallback) { + nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); + } + return newEl; +}; +const setNodeElem = (elem, node) => { + nodeElems[node.id] = elem; +}; +const clear$1 = () => { + nodeElems = {}; +}; +const positionNode = (node) => { + const el = nodeElems[node.id]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace( + "Transforming node", + node.diff, + node, + "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" + ); + const padding = 8; + const diff = node.diff || 0; + if (node.clusterNode) { + el.attr( + "transform", + "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" + ); + } else { + el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); + } + return diff; +}; +const getSubGraphTitleMargins = ({ + flowchart +}) => { + var _a, _b; + const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0; + const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0; + const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; + return { + subGraphTitleTopMargin, + subGraphTitleBottomMargin, + subGraphTitleTotalMargin + }; +}; +const markerOffsets = { + aggregation: 18, + extension: 18, + composition: 18, + dependency: 6, + lollipop: 13.5, + arrow_point: 5.3 +}; +function calculateDeltaAndAngle(point1, point2) { + if (point1 === void 0 || point2 === void 0) { + return { angle: 0, deltaX: 0, deltaY: 0 }; + } + point1 = pointTransformer(point1); + point2 = pointTransformer(point2); + const [x1, y1] = [point1.x, point1.y]; + const [x2, y2] = [point2.x, point2.y]; + const deltaX = x2 - x1; + const deltaY = y2 - y1; + return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; +} +const pointTransformer = (data) => { + if (Array.isArray(data)) { + return { x: data[0], y: data[1] }; + } + return data; +}; +const getLineFunctionsWithOffset = (edge) => { + return { + x: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaX } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } + return pointTransformer(d).x + offset; + }, + y: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaY } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } + return pointTransformer(d).y + offset; + } + }; +}; +const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => { + if (edge.arrowTypeStart) { + addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType); + } + if (edge.arrowTypeEnd) { + addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType); + } +}; +const arrowTypesMap = { + arrow_cross: "cross", + arrow_point: "point", + arrow_barb: "barb", + arrow_circle: "circle", + aggregation: "aggregation", + extension: "extension", + composition: "composition", + dependency: "dependency", + lollipop: "lollipop" +}; +const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => { + const endMarkerType = arrowTypesMap[arrowType]; + if (!endMarkerType) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`); + return; + } + const suffix = position === "start" ? "Start" : "End"; + svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`); +}; +let edgeLabels = {}; +let terminalLabels = {}; +const clear = () => { + edgeLabels = {}; + terminalLabels = {}; +}; +const insertEdgeLabel = (elem, edge) => { + const useHtmlLabels = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); + const labelElement = edge.labelType === "markdown" ? (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, { + style: edge.labelStyle, + useHtmlLabels, + addSvgBackground: true + }) : createLabel$1(edge.label, edge.labelStyle); + const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); + const label = edgeLabel.insert("g").attr("class", "label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + if (useHtmlLabels) { + const div = labelElement.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + edgeLabels[edge.id] = edgeLabel; + edge.width = bbox.width; + edge.height = bbox.height; + let fo; + if (edge.startLabelLeft) { + const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); + const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startLeft = startEdgeLabelLeft; + setTerminalWidth(fo, edge.startLabelLeft); + } + if (edge.startLabelRight) { + const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); + const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); + fo = startEdgeLabelRight.node().appendChild(startLabelElement); + inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startRight = startEdgeLabelRight; + setTerminalWidth(fo, edge.startLabelRight); + } + if (edge.endLabelLeft) { + const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); + const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelLeft.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endLeft = endEdgeLabelLeft; + setTerminalWidth(fo, edge.endLabelLeft); + } + if (edge.endLabelRight) { + const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); + const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelRight.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endRight = endEdgeLabelRight; + setTerminalWidth(fo, edge.endLabelRight); + } + return labelElement; +}; +function setTerminalWidth(fo, value) { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) { + fo.style.width = value.length * 9 + "px"; + fo.style.height = "12px"; + } +} +const positionEdgeLabel = (edge, paths) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths); + let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig); + if (edge.label) { + const el = edgeLabels[edge.id]; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug( + "Moving label " + edge.label + " from (", + x, + ",", + y, + ") to (", + pos.x, + ",", + pos.y, + ") abc88" + ); + if (paths.updatedPath) { + x = pos.x; + y = pos.y; + } + } + el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`); + } + if (edge.startLabelLeft) { + const el = terminalLabels[edge.id].startLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.startLabelRight) { + const el = terminalLabels[edge.id].startRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition( + edge.arrowTypeStart ? 10 : 0, + "start_right", + path + ); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.endLabelLeft) { + const el = terminalLabels[edge.id].endLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.endLabelRight) { + const el = terminalLabels[edge.id].endRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } +}; +const outsideNode = (node, point2) => { + const x = node.x; + const y = node.y; + const dx = Math.abs(point2.x - x); + const dy = Math.abs(point2.y - y); + const w = node.width / 2; + const h = node.height / 2; + if (dx >= w || dy >= h) { + return true; + } + return false; +}; +const intersection = (node, outsidePoint, insidePoint) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(outsidePoint)} + insidePoint : ${JSON.stringify(insidePoint)} + node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); + const x = node.x; + const y = node.y; + const dx = Math.abs(x - insidePoint.x); + const w = node.width / 2; + let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; + const h = node.height / 2; + const Q = Math.abs(outsidePoint.y - insidePoint.y); + const R = Math.abs(outsidePoint.x - insidePoint.x); + if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { + let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; + r = R * q / Q; + const res = { + x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, + y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q + }; + if (r === 0) { + res.x = outsidePoint.x; + res.y = outsidePoint.y; + } + if (R === 0) { + res.x = outsidePoint.x; + } + if (Q === 0) { + res.y = outsidePoint.y; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); + return res; + } else { + if (insidePoint.x < outsidePoint.x) { + r = outsidePoint.x - w - x; + } else { + r = x - w - outsidePoint.x; + } + let q = Q * r / R; + let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; + let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); + if (r === 0) { + _x = outsidePoint.x; + _y = outsidePoint.y; + } + if (R === 0) { + _x = outsidePoint.x; + } + if (Q === 0) { + _y = outsidePoint.y; + } + return { x: _x, y: _y }; + } +}; +const cutPathAtIntersect = (_points, boundaryNode) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode); + let points = []; + let lastPointOutside = _points[0]; + let isInside = false; + _points.forEach((point2) => { + if (!outsideNode(boundaryNode, point2) && !isInside) { + const inter = intersection(boundaryNode, lastPointOutside, point2); + let pointPresent = false; + points.forEach((p) => { + pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; + }); + if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { + points.push(inter); + } + isInside = true; + } else { + lastPointOutside = point2; + if (!isInside) { + points.push(point2); + } + } + }); + return points; +}; +const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { + let points = edge.points; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e); + let pointsHasChanged = false; + const tail = graph.node(e.v); + var head = graph.node(e.w); + if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) { + points = points.slice(1, edge.points.length - 1); + points.unshift(tail.intersect(points[0])); + points.push(head.intersect(points[points.length - 1])); + } + if (edge.toCluster) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]); + points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); + pointsHasChanged = true; + } + if (edge.fromCluster) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]); + points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); + pointsHasChanged = true; + } + const lineData = points.filter((p) => !Number.isNaN(p.y)); + let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM; + if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { + curve = edge.curve; + } + const { x, y } = getLineFunctionsWithOffset(edge); + const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve); + let strokeClasses; + switch (edge.thickness) { + case "normal": + strokeClasses = "edge-thickness-normal"; + break; + case "thick": + strokeClasses = "edge-thickness-thick"; + break; + case "invisible": + strokeClasses = "edge-thickness-thick"; + break; + default: + strokeClasses = ""; + } + switch (edge.pattern) { + case "solid": + strokeClasses += " edge-pattern-solid"; + break; + case "dotted": + strokeClasses += " edge-pattern-dotted"; + break; + case "dashed": + strokeClasses += " edge-pattern-dashed"; + break; + } + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); + let url = ""; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + addEdgeMarkers(svgPath, edge, url, id, diagramType); + let paths = {}; + if (pointsHasChanged) { + paths.updatedPath = points; + } + paths.originalPath = edge.points; + return paths; +}; + + + +/***/ }), + +/***/ 6216: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ d: () => (/* binding */ db), +/* harmony export */ f: () => (/* binding */ flowDb), +/* harmony export */ p: () => (/* binding */ parser$1) +/* harmony export */ }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 4], $V1 = [1, 3], $V2 = [1, 5], $V3 = [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], $V4 = [2, 2], $V5 = [1, 13], $V6 = [1, 14], $V7 = [1, 15], $V8 = [1, 16], $V9 = [1, 23], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 49], $Ve = [1, 48], $Vf = [1, 29], $Vg = [1, 30], $Vh = [1, 31], $Vi = [1, 32], $Vj = [1, 33], $Vk = [1, 44], $Vl = [1, 46], $Vm = [1, 42], $Vn = [1, 47], $Vo = [1, 43], $Vp = [1, 50], $Vq = [1, 45], $Vr = [1, 51], $Vs = [1, 52], $Vt = [1, 34], $Vu = [1, 35], $Vv = [1, 36], $Vw = [1, 37], $Vx = [1, 57], $Vy = [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], $Vz = [1, 61], $VA = [1, 60], $VB = [1, 62], $VC = [8, 9, 11, 73, 75], $VD = [1, 88], $VE = [1, 93], $VF = [1, 92], $VG = [1, 89], $VH = [1, 85], $VI = [1, 91], $VJ = [1, 87], $VK = [1, 94], $VL = [1, 90], $VM = [1, 95], $VN = [1, 86], $VO = [8, 9, 10, 11, 73, 75], $VP = [8, 9, 10, 11, 44, 73, 75], $VQ = [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], $VR = [8, 9, 11, 42, 58, 73, 75, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VS = [42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], $VT = [1, 121], $VU = [1, 120], $VV = [1, 128], $VW = [1, 142], $VX = [1, 143], $VY = [1, 144], $VZ = [1, 145], $V_ = [1, 130], $V$ = [1, 132], $V01 = [1, 136], $V11 = [1, 137], $V21 = [1, 138], $V31 = [1, 139], $V41 = [1, 140], $V51 = [1, 141], $V61 = [1, 146], $V71 = [1, 147], $V81 = [1, 126], $V91 = [1, 127], $Va1 = [1, 134], $Vb1 = [1, 129], $Vc1 = [1, 133], $Vd1 = [1, 131], $Ve1 = [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], $Vf1 = [1, 149], $Vg1 = [8, 9, 11], $Vh1 = [8, 9, 10, 11, 14, 42, 58, 86, 102, 103, 106, 108, 111, 112, 113], $Vi1 = [1, 169], $Vj1 = [1, 165], $Vk1 = [1, 166], $Vl1 = [1, 170], $Vm1 = [1, 167], $Vn1 = [1, 168], $Vo1 = [75, 113, 116], $Vp1 = [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], $Vq1 = [10, 103], $Vr1 = [31, 47, 49, 51, 53, 55, 60, 62, 64, 65, 67, 69, 113, 114, 115], $Vs1 = [1, 235], $Vt1 = [1, 233], $Vu1 = [1, 237], $Vv1 = [1, 231], $Vw1 = [1, 232], $Vx1 = [1, 234], $Vy1 = [1, 236], $Vz1 = [1, 238], $VA1 = [1, 255], $VB1 = [8, 9, 11, 103], $VC1 = [8, 9, 10, 11, 58, 81, 102, 103, 106, 107, 108, 109]; + var parser2 = { + trace: function trace() { + }, + 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 anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 2: + this.$ = []; + break; + case 3: + if (!Array.isArray($$[$0]) || $$[$0].length > 0) { + $$[$0 - 1].push($$[$0]); + } + this.$ = $$[$0 - 1]; + break; + case 4: + case 176: + this.$ = $$[$0]; + break; + case 11: + yy.setDirection("TB"); + this.$ = "TB"; + break; + case 12: + yy.setDirection($$[$0 - 1]); + this.$ = $$[$0 - 1]; + break; + case 27: + this.$ = $$[$0 - 1].nodes; + break; + case 28: + case 29: + case 30: + case 31: + case 32: + this.$ = []; + break; + case 33: + this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]); + break; + case 34: + this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]); + break; + case 35: + this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0); + break; + case 37: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 38: + case 39: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 43: + yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]); + this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) }; + break; + case 44: + yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]); + this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) }; + break; + case 45: + this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] }; + break; + case 46: + this.$ = { stmt: $$[$0], nodes: $$[$0] }; + break; + case 47: + this.$ = [$$[$0]]; + break; + case 48: + this.$ = $$[$0 - 4].concat($$[$0]); + break; + case 49: + this.$ = $$[$0]; + break; + case 50: + this.$ = $$[$0 - 2]; + yy.setClass($$[$0 - 2], $$[$0]); + break; + case 51: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "square"); + break; + case 52: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle"); + break; + case 53: + this.$ = $$[$0 - 5]; + yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle"); + break; + case 54: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse"); + break; + case 55: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium"); + break; + case 56: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine"); + break; + case 57: + this.$ = $$[$0 - 7]; + yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]])); + break; + case 58: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder"); + break; + case 59: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "round"); + break; + case 60: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond"); + break; + case 61: + this.$ = $$[$0 - 5]; + yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon"); + break; + case 62: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd"); + break; + case 63: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid"); + break; + case 64: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid"); + break; + case 65: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right"); + break; + case 66: + this.$ = $$[$0 - 3]; + yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left"); + break; + case 67: + this.$ = $$[$0]; + yy.addVertex($$[$0]); + break; + case 68: + $$[$0 - 1].text = $$[$0]; + this.$ = $$[$0 - 1]; + break; + case 69: + case 70: + $$[$0 - 2].text = $$[$0 - 1]; + this.$ = $$[$0 - 2]; + break; + case 71: + this.$ = $$[$0]; + break; + case 72: + var inf = yy.destructLink($$[$0], $$[$0 - 2]); + this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] }; + break; + case 73: + this.$ = { text: $$[$0], type: "text" }; + break; + case 74: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 75: + this.$ = { text: $$[$0], type: "string" }; + break; + case 76: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 77: + var inf = yy.destructLink($$[$0]); + this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length }; + break; + case 78: + this.$ = $$[$0 - 1]; + break; + case 79: + this.$ = { text: $$[$0], type: "text" }; + break; + case 80: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 81: + this.$ = { text: $$[$0], type: "string" }; + break; + case 82: + case 97: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 94: + this.$ = { text: $$[$0], type: "text" }; + break; + case 95: + this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type }; + break; + case 96: + this.$ = { text: $$[$0], type: "text" }; + break; + case 98: + this.$ = $$[$0 - 4]; + yy.addClass($$[$0 - 2], $$[$0]); + break; + case 99: + this.$ = $$[$0 - 4]; + yy.setClass($$[$0 - 2], $$[$0]); + break; + case 100: + case 108: + this.$ = $$[$0 - 1]; + yy.setClickEvent($$[$0 - 1], $$[$0]); + break; + case 101: + case 109: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 102: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 103: + this.$ = $$[$0 - 4]; + yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 4], $$[$0]); + break; + case 104: + this.$ = $$[$0 - 2]; + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 105: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 4], $$[$0 - 2]); + yy.setTooltip($$[$0 - 4], $$[$0]); + break; + case 106: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 107: + this.$ = $$[$0 - 6]; + yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]); + yy.setTooltip($$[$0 - 6], $$[$0 - 2]); + break; + case 110: + this.$ = $$[$0 - 1]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 111: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 3], $$[$0 - 2]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 112: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); + break; + case 113: + this.$ = $$[$0 - 5]; + yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]); + yy.setTooltip($$[$0 - 5], $$[$0 - 2]); + break; + case 114: + this.$ = $$[$0 - 4]; + yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]); + break; + case 115: + this.$ = $$[$0 - 4]; + yy.updateLink([$$[$0 - 2]], $$[$0]); + break; + case 116: + this.$ = $$[$0 - 4]; + yy.updateLink($$[$0 - 2], $$[$0]); + break; + case 117: + this.$ = $$[$0 - 8]; + yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]); + yy.updateLink([$$[$0 - 6]], $$[$0]); + break; + case 118: + this.$ = $$[$0 - 8]; + yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]); + yy.updateLink($$[$0 - 6], $$[$0]); + break; + case 119: + this.$ = $$[$0 - 6]; + yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]); + break; + case 120: + this.$ = $$[$0 - 6]; + yy.updateLinkInterpolate($$[$0 - 4], $$[$0]); + break; + case 121: + case 123: + this.$ = [$$[$0]]; + break; + case 122: + case 124: + $$[$0 - 2].push($$[$0]); + this.$ = $$[$0 - 2]; + break; + case 126: + this.$ = $$[$0 - 1] + $$[$0]; + break; + case 174: + this.$ = $$[$0]; + break; + case 175: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + case 177: + this.$ = $$[$0 - 1] + "" + $$[$0]; + 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: $V0, 10: $V1, 12: $V2 }, { 1: [3] }, o($V3, $V4, { 5: 6 }), { 4: 7, 9: $V0, 10: $V1, 12: $V2 }, { 4: 8, 9: $V0, 10: $V1, 12: $V2 }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($V3, [2, 9]), o($V3, [2, 10]), o($V3, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: $Vx, 15: 53, 18: 56 }, o($Vy, [2, 3]), o($Vy, [2, 4]), o($Vy, [2, 5]), o($Vy, [2, 6]), o($Vy, [2, 7]), o($Vy, [2, 8]), { 8: $Vz, 9: $VA, 11: $VB, 21: 58, 39: 59, 70: 63, 73: [1, 64], 75: [1, 65] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 66 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 67 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 68 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 69 }, { 8: $Vz, 9: $VA, 11: $VB, 21: 70 }, { 8: $Vz, 9: $VA, 10: [1, 71], 11: $VB, 21: 72 }, o($Vy, [2, 36]), { 35: [1, 73] }, { 37: [1, 74] }, o($Vy, [2, 39]), o($VC, [2, 46], { 18: 75, 10: $Vx }), { 10: [1, 76] }, { 10: [1, 77] }, { 10: [1, 78] }, { 10: [1, 79] }, { 14: $VD, 42: $VE, 58: $VF, 77: [1, 83], 86: $VG, 92: [1, 80], 94: [1, 81], 98: 82, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, o($Vy, [2, 178]), o($Vy, [2, 179]), o($Vy, [2, 180]), o($Vy, [2, 181]), o($VO, [2, 47]), o($VO, [2, 49], { 44: [1, 96] }), o($VP, [2, 67], { 110: 109, 29: [1, 97], 42: $Vd, 46: [1, 98], 48: [1, 99], 50: [1, 100], 52: [1, 101], 54: [1, 102], 56: [1, 103], 58: $Ve, 61: [1, 104], 63: [1, 105], 65: [1, 106], 66: [1, 107], 68: [1, 108], 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($VQ, [2, 174]), o($VQ, [2, 135]), o($VQ, [2, 136]), o($VQ, [2, 137]), o($VQ, [2, 138]), o($VQ, [2, 139]), o($VQ, [2, 140]), o($VQ, [2, 141]), o($VQ, [2, 142]), o($VQ, [2, 143]), o($VQ, [2, 144]), o($VQ, [2, 145]), o($V3, [2, 12]), o($V3, [2, 18]), o($V3, [2, 19]), { 9: [1, 110] }, o($VR, [2, 26], { 18: 111, 10: $Vx }), o($Vy, [2, 27]), { 40: 112, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vy, [2, 40]), o($Vy, [2, 41]), o($Vy, [2, 42]), o($VS, [2, 71], { 71: 113, 60: [1, 115], 72: [1, 114] }), { 74: 116, 76: 117, 77: [1, 118], 78: [1, 119], 113: $VT, 116: $VU }, o([42, 58, 60, 72, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 77]), o($Vy, [2, 28]), o($Vy, [2, 29]), o($Vy, [2, 30]), o($Vy, [2, 31]), o($Vy, [2, 32]), { 10: $VV, 12: $VW, 14: $VX, 27: $VY, 28: 122, 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 77: [1, 124], 78: [1, 125], 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 123, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Ve1, $V4, { 5: 148 }), o($Vy, [2, 37]), o($Vy, [2, 38]), o($VC, [2, 45], { 42: $Vf1 }), { 42: $Vd, 45: 150, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 99: [1, 151], 100: 152, 102: [1, 153] }, { 42: $Vd, 45: 154, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 42: $Vd, 45: 155, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 100], { 10: [1, 156], 93: [1, 157] }), { 77: [1, 158] }, o($Vg1, [2, 108], { 117: 160, 10: [1, 159], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 110], { 10: [1, 161] }), o($Vh1, [2, 176]), o($Vh1, [2, 163]), o($Vh1, [2, 164]), o($Vh1, [2, 165]), o($Vh1, [2, 166]), o($Vh1, [2, 167]), o($Vh1, [2, 168]), o($Vh1, [2, 169]), o($Vh1, [2, 170]), o($Vh1, [2, 171]), o($Vh1, [2, 172]), o($Vh1, [2, 173]), { 42: $Vd, 45: 162, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 30: 163, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 171, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 173, 48: [1, 172], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 174, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 175, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 176, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 106: [1, 177] }, { 30: 178, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 179, 63: [1, 180], 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 181, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 182, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 183, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VQ, [2, 175]), o($V3, [2, 20]), o($VR, [2, 25]), o($VC, [2, 43], { 18: 184, 10: $Vx }), o($VS, [2, 68], { 10: [1, 185] }), { 10: [1, 186] }, { 30: 187, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 75: [1, 188], 76: 189, 113: $VT, 116: $VU }, o($Vo1, [2, 73]), o($Vo1, [2, 75]), o($Vo1, [2, 76]), o($Vo1, [2, 161]), o($Vo1, [2, 162]), { 8: $Vz, 9: $VA, 10: $VV, 11: $VB, 12: $VW, 14: $VX, 21: 191, 27: $VY, 29: [1, 190], 32: $VZ, 42: $V_, 58: $V$, 73: $V01, 80: 135, 81: $V11, 82: $V21, 83: $V31, 84: $V41, 85: $V51, 86: $V61, 87: $V71, 88: 192, 102: $V81, 106: $V91, 108: $Va1, 111: $Vb1, 112: $Vc1, 113: $Vd1 }, o($Vp1, [2, 94]), o($Vp1, [2, 96]), o($Vp1, [2, 97]), o($Vp1, [2, 150]), o($Vp1, [2, 151]), o($Vp1, [2, 152]), o($Vp1, [2, 153]), o($Vp1, [2, 154]), o($Vp1, [2, 155]), o($Vp1, [2, 156]), o($Vp1, [2, 157]), o($Vp1, [2, 158]), o($Vp1, [2, 159]), o($Vp1, [2, 160]), o($Vp1, [2, 83]), o($Vp1, [2, 84]), o($Vp1, [2, 85]), o($Vp1, [2, 86]), o($Vp1, [2, 87]), o($Vp1, [2, 88]), o($Vp1, [2, 89]), o($Vp1, [2, 90]), o($Vp1, [2, 91]), o($Vp1, [2, 92]), o($Vp1, [2, 93]), { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 193], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vx, 18: 194 }, { 10: [1, 195], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 196] }, { 10: [1, 197], 103: [1, 198] }, o($Vq1, [2, 121]), { 10: [1, 199], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: [1, 200], 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 109, 111: $Vq, 112: $Vr, 113: $Vs }, { 77: [1, 201] }, o($Vg1, [2, 102], { 10: [1, 202] }), o($Vg1, [2, 104], { 10: [1, 203] }), { 77: [1, 204] }, o($Vh1, [2, 177]), { 77: [1, 205], 95: [1, 206] }, o($VO, [2, 50], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), { 31: [1, 207], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Vr1, [2, 79]), o($Vr1, [2, 81]), o($Vr1, [2, 82]), o($Vr1, [2, 146]), o($Vr1, [2, 147]), o($Vr1, [2, 148]), o($Vr1, [2, 149]), { 47: [1, 209], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 210, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 49: [1, 211], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 51: [1, 212], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 53: [1, 213], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 55: [1, 214], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 58: [1, 215] }, { 62: [1, 216], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 64: [1, 217], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 30: 218, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 31: [1, 219], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 220], 69: [1, 221], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 65: $Vi1, 67: [1, 223], 69: [1, 222], 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VC, [2, 44], { 42: $Vf1 }), o($VS, [2, 70]), o($VS, [2, 69]), { 60: [1, 224], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VS, [2, 72]), o($Vo1, [2, 74]), { 30: 225, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($Ve1, $V4, { 5: 226 }), o($Vp1, [2, 95]), o($Vy, [2, 35]), { 41: 227, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 228, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 239, 101: [1, 240], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 241, 101: [1, 242], 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 102: [1, 243] }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 244, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 42: $Vd, 45: 245, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs }, o($Vg1, [2, 101]), { 77: [1, 246] }, { 77: [1, 247], 95: [1, 248] }, o($Vg1, [2, 109]), o($Vg1, [2, 111], { 10: [1, 249] }), o($Vg1, [2, 112]), o($VP, [2, 51]), o($Vr1, [2, 80]), o($VP, [2, 52]), { 49: [1, 250], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 59]), o($VP, [2, 54]), o($VP, [2, 55]), o($VP, [2, 56]), { 106: [1, 251] }, o($VP, [2, 58]), o($VP, [2, 60]), { 64: [1, 252], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 62]), o($VP, [2, 63]), o($VP, [2, 65]), o($VP, [2, 64]), o($VP, [2, 66]), o([10, 42, 58, 86, 99, 102, 103, 106, 108, 111, 112, 113], [2, 78]), { 31: [1, 253], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 254], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, o($VO, [2, 48]), o($Vg1, [2, 114], { 103: $VA1 }), o($VB1, [2, 123], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($VC1, [2, 125]), o($VC1, [2, 127]), o($VC1, [2, 128]), o($VC1, [2, 129]), o($VC1, [2, 130]), o($VC1, [2, 131]), o($VC1, [2, 132]), o($VC1, [2, 133]), o($VC1, [2, 134]), o($Vg1, [2, 115], { 103: $VA1 }), { 10: [1, 257] }, o($Vg1, [2, 116], { 103: $VA1 }), { 10: [1, 258] }, o($Vq1, [2, 122]), o($Vg1, [2, 98], { 103: $VA1 }), o($Vg1, [2, 99], { 110: 109, 42: $Vd, 58: $Ve, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 111: $Vq, 112: $Vr, 113: $Vs }), o($Vg1, [2, 103]), o($Vg1, [2, 105], { 10: [1, 259] }), o($Vg1, [2, 106]), { 95: [1, 260] }, { 49: [1, 261] }, { 60: [1, 262] }, { 64: [1, 263] }, { 8: $Vz, 9: $VA, 11: $VB, 21: 264 }, o($Vy, [2, 34]), { 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 104: 265, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VC1, [2, 126]), { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 266, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 14: $VD, 42: $VE, 58: $VF, 86: $VG, 98: 267, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN, 117: 84 }, { 95: [1, 268] }, o($Vg1, [2, 113]), o($VP, [2, 53]), { 30: 269, 65: $Vi1, 77: $Vj1, 78: $Vk1, 79: 164, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, o($VP, [2, 61]), o($Ve1, $V4, { 5: 270 }), o($VB1, [2, 124], { 105: 256, 10: $Vs1, 58: $Vt1, 81: $Vu1, 102: $Vv1, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }), o($Vg1, [2, 119], { 117: 160, 10: [1, 271], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 120], { 117: 160, 10: [1, 272], 14: $VD, 42: $VE, 58: $VF, 86: $VG, 102: $VH, 103: $VI, 106: $VJ, 108: $VK, 111: $VL, 112: $VM, 113: $VN }), o($Vg1, [2, 107]), { 31: [1, 273], 65: $Vi1, 79: 208, 113: $Vl1, 114: $Vm1, 115: $Vn1 }, { 6: 11, 7: 12, 8: $V5, 9: $V6, 10: $V7, 11: $V8, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: $V9, 32: [1, 274], 33: 24, 34: $Va, 36: $Vb, 38: $Vc, 40: 28, 41: 38, 42: $Vd, 43: 39, 45: 40, 58: $Ve, 81: $Vf, 82: $Vg, 83: $Vh, 84: $Vi, 85: $Vj, 86: $Vk, 99: $Vl, 102: $Vm, 103: $Vn, 106: $Vo, 108: $Vp, 110: 41, 111: $Vq, 112: $Vr, 113: $Vs, 118: $Vt, 119: $Vu, 120: $Vv, 121: $Vw }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 275, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, { 10: $Vs1, 58: $Vt1, 81: $Vu1, 89: 276, 102: $Vv1, 104: 229, 105: 230, 106: $Vw1, 107: $Vx1, 108: $Vy1, 109: $Vz1 }, o($VP, [2, 57]), o($Vy, [2, 33]), o($Vg1, [2, 117], { 103: $VA1 }), o($Vg1, [2, 118], { 103: $VA1 })], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex2() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex2(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex2() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 34; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 36; + case 3: + this.popState(); + return "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: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 30: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 12; + case 31: + if (yy.lex.firstGraph()) { + this.begin("dir"); + } + return 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: + this.popState(); + return 13; + case 39: + this.popState(); + return 14; + case 40: + this.popState(); + return 14; + case 41: + this.popState(); + return 14; + case 42: + this.popState(); + return 14; + case 43: + this.popState(); + return 14; + case 44: + this.popState(); + return 14; + case 45: + this.popState(); + return 14; + case 46: + this.popState(); + return 14; + case 47: + this.popState(); + return 14; + case 48: + this.popState(); + return 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: + this.popState(); + return 75; + case 62: + this.pushState("edgeText"); + return 73; + case 63: + return 116; + case 64: + this.popState(); + return 75; + case 65: + this.pushState("thickEdgeText"); + return 73; + case 66: + return 116; + case 67: + this.popState(); + return 75; + case 68: + this.pushState("dottedEdgeText"); + return 73; + case 69: + return 116; + case 70: + return 75; + case 71: + this.popState(); + return 51; + case 72: + return "TEXT"; + case 73: + this.pushState("ellipseText"); + return 50; + case 74: + this.popState(); + return 53; + case 75: + this.pushState("text"); + return 52; + case 76: + this.popState(); + return 55; + case 77: + this.pushState("text"); + return 54; + case 78: + return 56; + case 79: + this.pushState("text"); + return 65; + case 80: + this.popState(); + return 62; + case 81: + this.pushState("text"); + return 61; + case 82: + this.popState(); + return 47; + case 83: + this.pushState("text"); + return 46; + case 84: + this.popState(); + return 67; + case 85: + this.popState(); + return 69; + case 86: + return 114; + case 87: + this.pushState("trapText"); + return 66; + case 88: + this.pushState("trapText"); + return 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: + this.popState(); + return 60; + case 101: + this.pushState("text"); + return 60; + case 102: + this.popState(); + return 49; + case 103: + this.pushState("text"); + return 48; + case 104: + this.popState(); + return 31; + case 105: + this.pushState("text"); + return 29; + case 106: + this.popState(); + return 64; + case 107: + this.pushState("text"); + return 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": false }, "callbackname": { "rules": [8, 9, 10, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "href": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "click": { "rules": [15, 18, 27, 28, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "dottedEdgeText": { "rules": [15, 18, 67, 69, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "thickEdgeText": { "rules": [15, 18, 64, 66, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "edgeText": { "rules": [15, 18, 61, 63, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "trapText": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 84, 85, 86, 87, 88, 101, 103, 105, 107], "inclusive": false }, "ellipseText": { "rules": [15, 18, 70, 71, 72, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "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": false }, "vertex": { "rules": [15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "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": false }, "acc_descr_multiline": { "rules": [5, 6, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_descr": { "rules": [3, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "acc_title": { "rules": [1, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "md_string": { "rules": [13, 14, 15, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "string": { "rules": [15, 16, 17, 18, 70, 73, 75, 77, 81, 83, 87, 88, 101, 103, 105, 107], "inclusive": false }, "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": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const MERMAID_DOM_ID_PREFIX = "flowchart-"; +let vertexCounter = 0; +let config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); +let vertices = {}; +let edges = []; +let classes = {}; +let subGraphs = []; +let subGraphLookup = {}; +let tooltips = {}; +let subCount = 0; +let firstGraphFlag = true; +let direction; +let version; +let funs = []; +const sanitizeText = (txt) => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, config); +const lookUpDomId = function(id) { + const vertexKeys = Object.keys(vertices); + for (const vertexKey of vertexKeys) { + if (vertices[vertexKey].id === id) { + return vertices[vertexKey].domId; + } + } + return id; +}; +const addVertex = function(_id, textObj, type, style, classes2, dir, props = {}) { + let txt; + let id = _id; + if (id === void 0) { + return; + } + if (id.trim().length === 0) { + return; + } + if (vertices[id] === void 0) { + vertices[id] = { + id, + labelType: "text", + domId: MERMAID_DOM_ID_PREFIX + id + "-" + vertexCounter, + styles: [], + classes: [] + }; + } + vertexCounter++; + if (textObj !== void 0) { + config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + txt = sanitizeText(textObj.text.trim()); + vertices[id].labelType = textObj.type; + if (txt[0] === '"' && txt[txt.length - 1] === '"') { + txt = txt.substring(1, txt.length - 1); + } + vertices[id].text = txt; + } else { + if (vertices[id].text === void 0) { + vertices[id].text = _id; + } + } + if (type !== void 0) { + vertices[id].type = type; + } + if (style !== void 0 && style !== null) { + style.forEach(function(s) { + vertices[id].styles.push(s); + }); + } + if (classes2 !== void 0 && classes2 !== null) { + classes2.forEach(function(s) { + vertices[id].classes.push(s); + }); + } + if (dir !== void 0) { + vertices[id].dir = dir; + } + if (vertices[id].props === void 0) { + vertices[id].props = props; + } else if (props !== void 0) { + Object.assign(vertices[id].props, props); + } +}; +const addSingleLink = function(_start, _end, type) { + let start = _start; + let end = _end; + const edge = { start, end, type: void 0, text: "", labelType: "text" }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 Got edge...", edge); + const linkTextObj = type.text; + if (linkTextObj !== void 0) { + edge.text = sanitizeText(linkTextObj.text.trim()); + if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') { + edge.text = edge.text.substring(1, edge.text.length - 1); + } + edge.labelType = linkTextObj.type; + } + if (type !== void 0) { + edge.type = type.type; + edge.stroke = type.stroke; + edge.length = type.length; + } + if ((edge == null ? void 0 : edge.length) > 10) { + edge.length = 10; + } + if (edges.length < (config.maxEdges ?? 500)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc78 pushing edge..."); + edges.push(edge); + } else { + throw new Error( + `Edge limit exceeded. ${edges.length} edges found, but the limit is ${config.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.` + ); + } +}; +const addLink = function(_start, _end, type) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("addLink (abc78)", _start, _end, type); + let i, j; + for (i = 0; i < _start.length; i++) { + for (j = 0; j < _end.length; j++) { + addSingleLink(_start[i], _end[j], type); + } + } +}; +const updateLinkInterpolate = function(positions, interp) { + positions.forEach(function(pos) { + if (pos === "default") { + edges.defaultInterpolate = interp; + } else { + edges[pos].interpolate = interp; + } + }); +}; +const updateLink = function(positions, style) { + positions.forEach(function(pos) { + if (pos >= edges.length) { + throw new Error( + `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)` + ); + } + if (pos === "default") { + edges.defaultStyle = style; + } else { + if (_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.isSubstringInArray("fill", style) === -1) { + style.push("fill:none"); + } + edges[pos].style = style; + } + }); +}; +const addClass = function(ids, style) { + ids.split(",").forEach(function(id) { + if (classes[id] === void 0) { + classes[id] = { id, styles: [], textStyles: [] }; + } + if (style !== void 0 && style !== null) { + style.forEach(function(s) { + if (s.match("color")) { + const newStyle = s.replace("fill", "bgFill").replace("color", "fill"); + classes[id].textStyles.push(newStyle); + } + classes[id].styles.push(s); + }); + } + }); +}; +const setDirection = function(dir) { + direction = dir; + if (direction.match(/.*</)) { + direction = "RL"; + } + if (direction.match(/.*\^/)) { + direction = "BT"; + } + if (direction.match(/.*>/)) { + direction = "LR"; + } + if (direction.match(/.*v/)) { + direction = "TB"; + } + if (direction === "TD") { + direction = "TB"; + } +}; +const setClass = function(ids, className) { + ids.split(",").forEach(function(_id) { + let id = _id; + if (vertices[id] !== void 0) { + vertices[id].classes.push(className); + } + if (subGraphLookup[id] !== void 0) { + subGraphLookup[id].classes.push(className); + } + }); +}; +const setTooltip = function(ids, tooltip) { + ids.split(",").forEach(function(id) { + if (tooltip !== void 0) { + tooltips[version === "gen-1" ? lookUpDomId(id) : id] = sanitizeText(tooltip); + } + }); +}; +const setClickFun = function(id, functionName, functionArgs) { + let domId = lookUpDomId(id); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i = 0; i < argList.length; i++) { + let item = argList[i].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i] = item; + } + } + if (argList.length === 0) { + argList.push(id); + } + if (vertices[id] !== void 0) { + vertices[id].haveCallback = true; + funs.push(function() { + const elem = document.querySelector(`[id="${domId}"]`); + if (elem !== null) { + elem.addEventListener( + "click", + function() { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList); + }, + false + ); + } + }); + } +}; +const setLink = function(ids, linkStr, target) { + ids.split(",").forEach(function(id) { + if (vertices[id] !== void 0) { + vertices[id].link = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config); + vertices[id].linkTarget = target; + } + }); + setClass(ids, "clickable"); +}; +const getTooltip = function(id) { + if (tooltips.hasOwnProperty(id)) { + return tooltips[id]; + } + return void 0; +}; +const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id) { + setClickFun(id, functionName, functionArgs); + }); + setClass(ids, "clickable"); +}; +const bindFunctions = function(element) { + funs.forEach(function(fun) { + fun(element); + }); +}; +const getDirection = function() { + return direction.trim(); +}; +const getVertices = function() { + return vertices; +}; +const getEdges = function() { + return edges; +}; +const getClasses = function() { + return classes; +}; +const setupToolTips = function(element) { + let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(".mermaidTooltip"); + if ((tooltipElem._groups || tooltipElem)[0][0] === null) { + tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); + } + const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(element).select("svg"); + const nodes = svg.selectAll("g.node"); + nodes.on("mouseover", function() { + const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); + const title = el.attr("title"); + if (title === null) { + return; + } + const rect = this.getBoundingClientRect(); + tooltipElem.transition().duration(200).style("opacity", ".9"); + tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.bottom + "px"); + tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "<br/>")); + el.classed("hover", true); + }).on("mouseout", function() { + tooltipElem.transition().duration(500).style("opacity", 0); + const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); + el.classed("hover", false); + }); +}; +funs.push(setupToolTips); +const clear = function(ver = "gen-1") { + vertices = {}; + classes = {}; + edges = []; + funs = [setupToolTips]; + subGraphs = []; + subGraphLookup = {}; + subCount = 0; + tooltips = {}; + firstGraphFlag = true; + version = ver; + config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.v)(); +}; +const setGen = (ver) => { + version = ver || "gen-2"; +}; +const defaultStyle = function() { + return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"; +}; +const addSubGraph = function(_id, list, _title) { + let id = _id.text.trim(); + let title = _title.text; + if (_id === _title && _title.text.match(/\s/)) { + id = void 0; + } + function uniq(a) { + const prims = { boolean: {}, number: {}, string: {} }; + const objs = []; + let dir2; + const nodeList2 = a.filter(function(item) { + const type = typeof item; + if (item.stmt && item.stmt === "dir") { + dir2 = item.value; + return false; + } + if (item.trim() === "") { + return false; + } + if (type in prims) { + return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true; + } else { + return objs.includes(item) ? false : objs.push(item); + } + }); + return { nodeList: nodeList2, dir: dir2 }; + } + let nodeList = []; + const { nodeList: nl, dir } = uniq(nodeList.concat.apply(nodeList, list)); + nodeList = nl; + if (version === "gen-1") { + for (let i = 0; i < nodeList.length; i++) { + nodeList[i] = lookUpDomId(nodeList[i]); + } + } + id = id || "subGraph" + subCount; + title = title || ""; + title = sanitizeText(title); + subCount = subCount + 1; + const subGraph = { + id, + nodes: nodeList, + title: title.trim(), + classes: [], + dir, + labelType: _title.type + }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Adding", subGraph.id, subGraph.nodes, subGraph.dir); + subGraph.nodes = makeUniq(subGraph, subGraphs).nodes; + subGraphs.push(subGraph); + subGraphLookup[id] = subGraph; + return id; +}; +const getPosForId = function(id) { + for (const [i, subGraph] of subGraphs.entries()) { + if (subGraph.id === id) { + return i; + } + } + return -1; +}; +let secCount = -1; +const posCrossRef = []; +const indexNodes2 = function(id, pos) { + const nodes = subGraphs[pos].nodes; + secCount = secCount + 1; + if (secCount > 2e3) { + return; + } + posCrossRef[secCount] = pos; + if (subGraphs[pos].id === id) { + return { + result: true, + count: 0 + }; + } + let count = 0; + let posCount = 1; + while (count < nodes.length) { + const childPos = getPosForId(nodes[count]); + if (childPos >= 0) { + const res = indexNodes2(id, childPos); + if (res.result) { + return { + result: true, + count: posCount + res.count + }; + } else { + posCount = posCount + res.count; + } + } + count = count + 1; + } + return { + result: false, + count: posCount + }; +}; +const getDepthFirstPos = function(pos) { + return posCrossRef[pos]; +}; +const indexNodes = function() { + secCount = -1; + if (subGraphs.length > 0) { + indexNodes2("none", subGraphs.length - 1); + } +}; +const getSubGraphs = function() { + return subGraphs; +}; +const firstGraph = () => { + if (firstGraphFlag) { + firstGraphFlag = false; + return true; + } + return false; +}; +const destructStartLink = (_str) => { + let str = _str.trim(); + let type = "arrow_open"; + switch (str[0]) { + case "<": + type = "arrow_point"; + str = str.slice(1); + break; + case "x": + type = "arrow_cross"; + str = str.slice(1); + break; + case "o": + type = "arrow_circle"; + str = str.slice(1); + break; + } + let stroke = "normal"; + if (str.includes("=")) { + stroke = "thick"; + } + if (str.includes(".")) { + stroke = "dotted"; + } + return { type, stroke }; +}; +const countChar = (char, str) => { + const length = str.length; + let count = 0; + for (let i = 0; i < length; ++i) { + if (str[i] === char) { + ++count; + } + } + return count; +}; +const destructEndLink = (_str) => { + const str = _str.trim(); + let line = str.slice(0, -1); + let type = "arrow_open"; + switch (str.slice(-1)) { + case "x": + type = "arrow_cross"; + if (str[0] === "x") { + type = "double_" + type; + line = line.slice(1); + } + break; + case ">": + type = "arrow_point"; + if (str[0] === "<") { + type = "double_" + type; + line = line.slice(1); + } + break; + case "o": + type = "arrow_circle"; + if (str[0] === "o") { + type = "double_" + type; + line = line.slice(1); + } + break; + } + let stroke = "normal"; + let length = line.length - 1; + if (line[0] === "=") { + stroke = "thick"; + } + if (line[0] === "~") { + stroke = "invisible"; + } + let dots = countChar(".", line); + if (dots) { + stroke = "dotted"; + length = dots; + } + return { type, stroke, length }; +}; +const destructLink = (_str, _startStr) => { + const info = destructEndLink(_str); + let startInfo; + if (_startStr) { + startInfo = destructStartLink(_startStr); + if (startInfo.stroke !== info.stroke) { + return { type: "INVALID", stroke: "INVALID" }; + } + if (startInfo.type === "arrow_open") { + startInfo.type = info.type; + } else { + if (startInfo.type !== info.type) { + return { type: "INVALID", stroke: "INVALID" }; + } + startInfo.type = "double_" + startInfo.type; + } + if (startInfo.type === "double_arrow") { + startInfo.type = "double_arrow_point"; + } + startInfo.length = info.length; + return startInfo; + } + return info; +}; +const exists = (allSgs, _id) => { + let res = false; + allSgs.forEach((sg) => { + const pos = sg.nodes.indexOf(_id); + if (pos >= 0) { + res = true; + } + }); + return res; +}; +const makeUniq = (sg, allSubgraphs) => { + const res = []; + sg.nodes.forEach((_id, pos) => { + if (!exists(allSubgraphs, _id)) { + res.push(sg.nodes[pos]); + } + }); + return { nodes: res }; +}; +const lex = { + firstGraph +}; +const flowDb = { + defaultConfig: () => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.K.flowchart, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.g, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.a, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.b, + addVertex, + lookUpDomId, + addLink, + updateLinkInterpolate, + updateLink, + addClass, + setDirection, + setClass, + setTooltip, + getTooltip, + setClickEvent, + setLink, + bindFunctions, + getDirection, + getVertices, + getEdges, + getClasses, + clear, + setGen, + defaultStyle, + addSubGraph, + getDepthFirstPos, + indexNodes, + getSubGraphs, + destructLink, + lex, + exists, + makeUniq, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.t +}; +const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addClass, + addLink, + addSingleLink, + addSubGraph, + addVertex, + bindFunctions, + clear, + default: flowDb, + defaultStyle, + destructLink, + firstGraph, + getClasses, + getDepthFirstPos, + getDirection, + getEdges, + getSubGraphs, + getTooltip, + getVertices, + indexNodes, + lex, + lookUpDomId, + setClass, + setClickEvent, + setDirection, + setGen, + setLink, + updateLink, + updateLinkInterpolate +}, Symbol.toStringTag, { value: "Module" })); + + + +/***/ }), + +/***/ 2317: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _flowDb_4b19a42f_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6216); +/* harmony import */ var _styles_3ed67cfa_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8696); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(697); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1176); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4075); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9418); + + + + + + + + + + + + + + + + + + + + + +const diagram = { + parser: _flowDb_4b19a42f_js__WEBPACK_IMPORTED_MODULE_7__.p, + db: _flowDb_4b19a42f_js__WEBPACK_IMPORTED_MODULE_7__.f, + renderer: _styles_3ed67cfa_js__WEBPACK_IMPORTED_MODULE_8__.f, + styles: _styles_3ed67cfa_js__WEBPACK_IMPORTED_MODULE_8__.a, + init: (cnf) => { + if (!cnf.flowchart) { + cnf.flowchart = {}; + } + cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_9__.p)({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } }); + _styles_3ed67cfa_js__WEBPACK_IMPORTED_MODULE_8__.f.setConf(cnf.flowchart); + _flowDb_4b19a42f_js__WEBPACK_IMPORTED_MODULE_7__.f.clear(); + _flowDb_4b19a42f_js__WEBPACK_IMPORTED_MODULE_7__.f.setGen("gen-2"); + } +}; + + + +/***/ }), + +/***/ 2746: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ r: () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1176); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4075); +/* harmony import */ var _edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8747); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); +/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3791); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6312); + + + + + + + +let clusterDb = {}; +let descendants = {}; +let parents = {}; +const clear$1 = () => { + descendants = {}; + parents = {}; + clusterDb = {}; +}; +const isDescendant = (id, ancestorId) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("In isDescendant", ancestorId, " ", id, " = ", descendants[ancestorId].includes(id)); + if (descendants[ancestorId].includes(id)) { + return true; + } + return false; +}; +const edgeInCluster = (edge, clusterId) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Descendants of ", clusterId, " is ", descendants[clusterId]); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge is ", edge); + if (edge.v === clusterId) { + return false; + } + if (edge.w === clusterId) { + return false; + } + if (!descendants[clusterId]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Tilt, ", clusterId, ",not in descendants"); + return false; + } + return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w); +}; +const copy = (clusterId, graph, newGraph, rootId) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Copying children of ", + clusterId, + "root", + rootId, + "data", + graph.node(clusterId), + rootId + ); + const nodes = graph.children(clusterId) || []; + if (clusterId !== rootId) { + nodes.push(clusterId); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes); + nodes.forEach((node) => { + if (graph.children(node).length > 0) { + copy(node, graph, newGraph, rootId); + } else { + const data = graph.node(node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("cp ", node, " to ", rootId, " with parent ", clusterId); + newGraph.setNode(node, data); + if (rootId !== graph.parent(node)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Setting parent", node, graph.parent(node)); + newGraph.setParent(node, graph.parent(node)); + } + if (clusterId !== rootId && node !== clusterId) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Setting parent", node, clusterId); + newGraph.setParent(node, clusterId); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( + "Not Setting parent for node=", + node, + "cluster!==rootId", + clusterId !== rootId, + "node!==clusterId", + node !== clusterId + ); + } + const edges = graph.edges(node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Copying Edges", edges); + edges.forEach((edge) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge", edge); + const data2 = graph.edge(edge.v, edge.w, edge.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge data", data2, rootId); + try { + if (edgeInCluster(edge, rootId)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Copying as ", edge.v, edge.w, data2, edge.name); + newGraph.setEdge(edge.v, edge.w, data2, edge.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0])); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info( + "Skipping copy of edge ", + edge.v, + "-->", + edge.w, + " rootId: ", + rootId, + " clusterId:", + clusterId + ); + } + } catch (e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error(e); + } + }); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Removing node", node); + graph.removeNode(node); + }); +}; +const extractDescendants = (id, graph) => { + const children = graph.children(id); + let res = [...children]; + for (const child of children) { + parents[child] = id; + res = [...res, ...extractDescendants(child, graph)]; + } + return res; +}; +const findNonClusterChild = (id, graph) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching", id); + const children = graph.children(id); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching children of id ", id, children); + if (children.length < 1) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("This is a valid node", id); + return id; + } + for (const child of children) { + const _id = findNonClusterChild(child, graph); + if (_id) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Found replacement for", id, " => ", _id); + return _id; + } + } +}; +const getAnchorId = (id) => { + if (!clusterDb[id]) { + return id; + } + if (!clusterDb[id].externalConnections) { + return id; + } + if (clusterDb[id]) { + return clusterDb[id].id; + } + return id; +}; +const adjustClustersAndEdges = (graph, depth) => { + if (!graph || depth > 10) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting out, no graph "); + return; + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting in, graph "); + } + graph.nodes().forEach(function(id) { + const children = graph.children(id); + if (children.length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Cluster identified", + id, + " Replacement id in edges: ", + findNonClusterChild(id, graph) + ); + descendants[id] = extractDescendants(id, graph); + clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) }; + } + }); + graph.nodes().forEach(function(id) { + const children = graph.children(id); + const edges = graph.edges(); + if (children.length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Cluster identified", id, descendants); + edges.forEach((edge) => { + if (edge.v !== id && edge.w !== id) { + const d1 = isDescendant(edge.v, id); + const d2 = isDescendant(edge.w, id); + if (d1 ^ d2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge: ", edge, " leaves cluster ", id); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Descendants of XXX ", id, ": ", descendants[id]); + clusterDb[id].externalConnections = true; + } + } + }); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster ", id, descendants); + } + }); + for (let id of Object.keys(clusterDb)) { + const nonClusterChild = clusterDb[id].id; + const parent = graph.parent(nonClusterChild); + if (parent !== id && clusterDb[parent] && !clusterDb[parent].externalConnections) { + clusterDb[id].id = parent; + } + } + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); + let v = e.v; + let w = e.w; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Fix XXX", + clusterDb, + "ids:", + e.v, + e.w, + "Translating: ", + clusterDb[e.v], + " --- ", + clusterDb[e.w] + ); + if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + const specialId = e.w + "---" + e.v; + graph.setNode(specialId, { + domId: specialId, + id: specialId, + labelStyle: "", + labelText: edge.label, + padding: 0, + shape: "labelRect", + style: "" + }); + const edge1 = structuredClone(edge); + const edge2 = structuredClone(edge); + edge1.label = ""; + edge1.arrowTypeEnd = "none"; + edge2.label = ""; + edge1.fromCluster = e.v; + edge2.toCluster = e.v; + graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special"); + graph.setEdge(specialId, w, edge2, e.name + "-cyclic-special"); + } else if (clusterDb[e.v] || clusterDb[e.w]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + if (v !== e.v) { + const parent = graph.parent(v); + clusterDb[parent].externalConnections = true; + edge.fromCluster = e.v; + } + if (w !== e.w) { + const parent = graph.parent(w); + clusterDb[parent].externalConnections = true; + edge.toCluster = e.w; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fix Replacing with XXX", v, w, e.name); + graph.setEdge(v, w, edge, e.name); + } + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Adjusted Graph", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + extractor(graph, 0); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace(clusterDb); +}; +const extractor = (graph, depth) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("extractor - ", depth, dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), graph.children("D")); + if (depth > 10) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error("Bailing out"); + return; + } + let nodes = graph.nodes(); + let hasChildren = false; + for (const node of nodes) { + const children = graph.children(node); + hasChildren = hasChildren || children.length > 0; + } + if (!hasChildren) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Done, no node has children", graph.nodes()); + return; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Nodes = ", nodes, depth); + for (const node of nodes) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( + "Extracting node", + node, + clusterDb, + clusterDb[node] && !clusterDb[node].externalConnections, + !graph.parent(node), + graph.node(node), + graph.children("D"), + " Depth ", + depth + ); + if (!clusterDb[node]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster", node, depth); + } else if (!clusterDb[node].externalConnections && // !graph.parent(node) && + graph.children(node) && graph.children(node).length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Cluster without external connections, without a parent and with children", + node, + depth + ); + const graphSettings = graph.graph(); + let dir = graphSettings.rankdir === "TB" ? "LR" : "TB"; + if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) { + dir = clusterDb[node].clusterData.dir; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing dir", clusterDb[node].clusterData.dir, dir); + } + const clusterGraph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + // Todo: set proper spacing + nodesep: 50, + ranksep: 50, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Old graph before copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + copy(node, graph, clusterGraph, node); + graph.setNode(node, { + clusterNode: true, + id: node, + clusterData: clusterDb[node].clusterData, + labelText: clusterDb[node].labelText, + graph: clusterGraph + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New graph after copy node: (", node, ")", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(clusterGraph)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Old graph after copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Cluster ** ", + node, + " **not meeting the criteria !externalConnections:", + !clusterDb[node].externalConnections, + " no parent: ", + !graph.parent(node), + " children ", + graph.children(node) && graph.children(node).length > 0, + graph.children("D"), + depth + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(clusterDb); + } + } + nodes = graph.nodes(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New list of nodes", nodes); + for (const node of nodes) { + const data = graph.node(node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(" Now next level", node, data); + if (data.clusterNode) { + extractor(data.graph, depth + 1); + } + } +}; +const sorter = (graph, nodes) => { + if (nodes.length === 0) { + return []; + } + let result = Object.assign(nodes); + nodes.forEach((node) => { + const children = graph.children(node); + const sorted = sorter(graph, children); + result = [...result, ...sorted]; + }); + return result; +}; +const sortNodesByHierarchy = (graph) => sorter(graph, graph.children()); +const rect = (parent, node) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Creating subgraph rect for ", node.id, node); + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + const shapeSvg = parent.insert("g").attr("class", "cluster" + (node.class ? " " + node.class : "")).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const useHtmlLabels = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const text = node.labelType === "markdown" ? (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_5__.a)(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild((0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); + let bbox = text.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const padding = 0 * node.padding; + const halfPadding = padding / 2; + const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width; + if (node.width <= bbox.width + padding) { + node.diff = (bbox.width - node.width) / 2 - node.padding / 2; + } else { + node.diff = -node.padding / 2; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Data ", node, JSON.stringify(node)); + rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding); + const { subGraphTitleTopMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); + if (useHtmlLabels) { + label.attr( + "transform", + // This puts the label on top of the box instead of inside it + `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` + ); + } else { + label.attr( + "transform", + // This puts the label on top of the box instead of inside it + `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` + ); + } + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const noteGroup = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", node.width + padding).attr("height", node.height + padding).attr("fill", "none"); + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const roundedWithTitle = (parent, node) => { + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const innerRect = shapeSvg.append("rect"); + const text = label.node().appendChild((0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); + let bbox = text.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + bbox = text.getBBox(); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width; + if (node.width <= bbox.width + node.padding) { + node.diff = (bbox.width + node.padding * 0 - node.width) / 2; + } else { + node.diff = -node.padding / 2; + } + rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding); + innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3); + const { subGraphTitleTopMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); + label.attr( + "transform", + `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 - node.padding / 3 + ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels) ? 5 : 3) + subGraphTitleTopMargin})` + ); + const rectBox = rect2.node().getBBox(); + node.height = rectBox.height; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const divider = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + rect2.attr("class", "divider").attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2).attr("width", node.width + padding).attr("height", node.height + padding); + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.diff = -node.padding / 2; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const shapes = { rect, roundedWithTitle, noteGroup, divider }; +let clusterElems = {}; +const insertCluster = (elem, node) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Inserting cluster"); + const shape = node.shape || "rect"; + clusterElems[node.id] = shapes[shape](elem, node); +}; +const clear = () => { + clusterElems = {}; +}; +const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph in recursive render: XXX", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), parentCluster); + const dir = graph.graph().rankdir; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Dir in recursive render - dir:", dir); + const elem = _elem.insert("g").attr("class", "root"); + if (!graph.nodes()) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("No nodes found for", graph); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Recursive render XXX", graph.nodes()); + } + if (graph.edges().length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Recursive edges", graph.edge(graph.edges()[0])); + } + const clusters = elem.insert("g").attr("class", "clusters"); + const edgePaths = elem.insert("g").attr("class", "edgePaths"); + const edgeLabels = elem.insert("g").attr("class", "edgeLabels"); + const nodes = elem.insert("g").attr("class", "nodes"); + await Promise.all( + graph.nodes().map(async function(v) { + const node = graph.node(v); + if (parentCluster !== void 0) { + const data = JSON.parse(JSON.stringify(parentCluster.clusterData)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Setting data for cluster XXX (", v, ") ", data, parentCluster); + graph.setNode(parentCluster.id, data); + if (!graph.parent(v)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Setting parent", v, parentCluster.id); + graph.setParent(v, parentCluster.id, data); + } + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v))); + if (node && node.clusterNode) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster identified", v, node.width, graph.node(v)); + const o = await recursiveRender( + nodes, + node.graph, + diagramType, + id, + graph.node(v), + siteConfig + ); + const newEl = o.elem; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.u)(node, newEl); + node.diff = o.diff || 0; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node bounds (abc123)", v, node, node.width, node.x, node.y); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.s)(newEl, node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Recursive render complete ", newEl, node); + } else { + if (graph.children(v).length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster - the non recursive path XXX", v, node.id, node, graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(findNonClusterChild(node.id, graph)); + clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node }; + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node - the non recursive path", v, node.id, node); + await (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.e)(nodes, graph.node(v), dir); + } + } + }) + ); + graph.edges().forEach(function(e) { + const edge = graph.edge(e.v, e.w, e.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e))); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Fix", clusterDb, "ids:", e.v, e.w, "Translating: ", clusterDb[e.v], clusterDb[e.w]); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.f)(edgeLabels, edge); + }); + graph.edges().forEach(function(e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("### Layout ###"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(graph); + (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__/* .layout */ .Zp)(graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph after layout:", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + let diff = 0; + const { subGraphTitleTotalMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); + sortNodesByHierarchy(graph).forEach(function(v) { + const node = graph.node(v); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Position " + v + ": " + JSON.stringify(graph.node(v))); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info( + "Position " + v + ": (" + node.x, + "," + node.y, + ") width: ", + node.width, + " height: ", + node.height + ); + if (node && node.clusterNode) { + node.y += subGraphTitleTotalMargin; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); + } else { + if (graph.children(v).length > 0) { + node.height += subGraphTitleTotalMargin; + insertCluster(clusters, node); + clusterDb[node.id].node = node; + } else { + node.y += subGraphTitleTotalMargin / 2; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); + } + } + }); + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge); + edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2); + const paths = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.h)(edgePaths, e, edge, clusterDb, diagramType, graph, id); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.j)(edge, paths); + }); + graph.nodes().forEach(function(v) { + const n = graph.node(v); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(v, n.type, n.diff); + if (n.type === "group") { + diff = n.diff; + } + }); + return { elem, diff }; +}; +const render = async (elem, graph, markers, diagramType, id) => { + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.a)(elem, markers, diagramType, id); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.b)(); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.d)(); + clear(); + clear$1(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph at first:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); + adjustClustersAndEdges(graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph after:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + await recursiveRender(elem, graph, diagramType, id, void 0, siteConfig); +}; + + + +/***/ }), + +/***/ 8696: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ a: () => (/* binding */ flowStyles), +/* harmony export */ f: () => (/* binding */ flowRendererV2) +/* harmony export */ }); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(697); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6312); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6257); +/* harmony import */ var _index_fc10efb0_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2746); +/* harmony import */ var dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(646); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5937); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5582); + + + + + + +const conf = {}; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + conf[key] = cnf[key]; + } +}; +const addVertices = async function(vert, g, svgId, root, doc, diagObj) { + const svg = root.select(`[id="${svgId}"]`); + const keys = Object.keys(vert); + for (const id of keys) { + const vertex = vert[id]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + classStr = classStr + " flowchart-label"; + const styles = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.k)(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + let vertexNode; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("vertex", vertex, vertex.labelType); + if (vertex.labelType === "markdown") { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("vertex", vertex, vertex.labelType); + } else { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.htmlLabels)) { + const node = { + label: vertexText + }; + vertexNode = (0,dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_3__/* .addHtmlLabel */ .H)(svg, node).node(); + vertexNode.parentNode.removeChild(vertexNode); + } else { + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", styles.labelStyle.replace("color:", "fill:")); + const rows = vertexText.split(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.e.lineBreakRegex); + for (const row of rows) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "1"); + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + vertexNode = svgLabel; + } + } + let radius = 0; + let _shape = ""; + switch (vertex.type) { + case "round": + radius = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + case "doublecircle": + _shape = "doublecircle"; + break; + default: + _shape = "rect"; + } + const labelText = await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.r)(vertexText, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)()); + g.setNode(vertex.id, { + labelStyle: styles.labelStyle, + shape: _shape, + labelText, + labelType: vertex.labelType, + rx: radius, + ry: radius, + class: classStr, + style: styles.style, + id: vertex.id, + link: vertex.link, + linkTarget: vertex.linkTarget, + tooltip: diagObj.db.getTooltip(vertex.id) || "", + domId: diagObj.db.lookUpDomId(vertex.id), + haveCallback: vertex.haveCallback, + width: vertex.type === "group" ? 500 : void 0, + dir: vertex.dir, + type: vertex.type, + props: vertex.props, + padding: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.padding + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("setNode", { + labelStyle: styles.labelStyle, + labelType: vertex.labelType, + shape: _shape, + labelText, + rx: radius, + ry: radius, + class: classStr, + style: styles.style, + id: vertex.id, + domId: diagObj.db.lookUpDomId(vertex.id), + width: vertex.type === "group" ? 500 : void 0, + type: vertex.type, + dir: vertex.dir, + props: vertex.props, + padding: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)().flowchart.padding + }); + } +}; +const addEdges = async function(edges, g, diagObj) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 edges = ", edges); + let cnt = 0; + let linkIdCnt = {}; + let defaultStyle; + let defaultLabelStyle; + if (edges.defaultStyle !== void 0) { + const defaultStyles = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.k)(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + for (const edge of edges) { + cnt++; + const linkIdBase = "L-" + edge.start + "-" + edge.end; + if (linkIdCnt[linkIdBase] === void 0) { + linkIdCnt[linkIdBase] = 0; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } else { + linkIdCnt[linkIdBase]++; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } + let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); + const linkNameStart = "LS-" + edge.start; + const linkNameEnd = "LE-" + edge.end; + const edgeData = { style: "", labelStyle: "" }; + edgeData.minlen = edge.length || 1; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + edgeData.arrowTypeStart = "arrow_open"; + edgeData.arrowTypeEnd = "arrow_open"; + switch (edge.type) { + case "double_arrow_cross": + edgeData.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + edgeData.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + edgeData.arrowTypeStart = "arrow_point"; + case "arrow_point": + edgeData.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + edgeData.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + edgeData.arrowTypeEnd = "arrow_circle"; + break; + } + let style = ""; + let labelStyle = ""; + switch (edge.stroke) { + case "normal": + style = "fill:none;"; + if (defaultStyle !== void 0) { + style = defaultStyle; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + edgeData.thickness = "normal"; + edgeData.pattern = "solid"; + break; + case "dotted": + edgeData.thickness = "normal"; + edgeData.pattern = "dotted"; + edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + edgeData.thickness = "thick"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 3.5px;fill:none;"; + break; + case "invisible": + edgeData.thickness = "invisible"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 0;fill:none;"; + break; + } + if (edge.style !== void 0) { + const styles = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.k)(edge.style); + style = styles.style; + labelStyle = styles.labelStyle; + } + edgeData.style = edgeData.style += style; + edgeData.labelStyle = edgeData.labelStyle += labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.n)(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB); + } else if (edges.defaultInterpolate !== void 0) { + edgeData.curve = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.n)(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB); + } else { + edgeData.curve = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.n)(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__/* .curveLinear */ .lUB); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + } + edgeData.labelType = edge.labelType; + edgeData.label = await (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.r)(edge.text.replace(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.e.lineBreakRegex, "\n"), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)()); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + edgeData.id = linkId; + edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; + g.setEdge(edge.start, edge.end, edgeData, cnt); + } +}; +const getClasses = function(text, diagObj) { + return diagObj.db.getClasses(); +}; +const draw = async function(text, id, _version, diagObj) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Drawing flowchart"); + let dir = diagObj.db.getDirection(); + if (dir === void 0) { + dir = "TD"; + } + const { securityLevel, flowchart: conf2 } = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.c)(); + const nodeSpacing = conf2.nodeSpacing || 50; + const rankSpacing = conf2.rankSpacing || 50; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Graph */ .T({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 0, + marginy: 0 + }).setDefaultEdgeLabel(function() { + return {}; + }); + let subG; + const subGraphs = diagObj.db.getSubGraphs(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Subgraphs - ", subGraphs); + for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) { + subG = subGraphs[i2]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Subgraph - ", subG); + diagObj.db.addVertex( + subG.id, + { text: subG.title, type: subG.labelType }, + "group", + void 0, + subG.classes, + subG.dir + ); + } + const vert = diagObj.db.getVertices(); + const edges = diagObj.db.getEdges(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Edges", edges); + let i = 0; + for (i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .selectAll */ .Ubm)("cluster").append("text"); + for (let j = 0; j < subG.nodes.length; j++) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.l.info("Setting up subgraphs", subG.nodes[j], subG.id); + g.setParent(subG.nodes[j], subG.id); + } + } + await addVertices(vert, g, id, root, doc, diagObj); + await addEdges(edges, g); + const svg = root.select(`[id="${id}"]`); + const element = root.select("#" + id + " g"); + await (0,_index_fc10efb0_js__WEBPACK_IMPORTED_MODULE_4__.r)(element, g, ["point", "circle", "cross"], "flowchart", id); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.u.insertTitle(svg, "flowchartTitleText", conf2.titleTopMargin, diagObj.db.getDiagramTitle()); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_2__.o)(g, svg, conf2.diagramPadding, conf2.useMaxWidth); + diagObj.db.indexNodes("subGraph" + i); + if (!conf2.htmlLabels) { + const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect.setAttribute("rx", 0); + rect.setAttribute("ry", 0); + rect.setAttribute("width", dim.width); + rect.setAttribute("height", dim.height); + label.insertBefore(rect, label.firstChild); + } + } + const keys = Object.keys(vert); + keys.forEach(function(key) { + const vertex = vert[key]; + if (vertex.link) { + const node = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#" + id + ' [id="' + key + '"]'); + if (node) { + const link = doc.createElementNS("http://www.w3.org/2000/svg", "a"); + link.setAttributeNS("http://www.w3.org/2000/svg", "class", vertex.classes.join(" ")); + link.setAttributeNS("http://www.w3.org/2000/svg", "href", vertex.link); + link.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"); + if (securityLevel === "sandbox") { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top"); + } else if (vertex.linkTarget) { + link.setAttributeNS("http://www.w3.org/2000/svg", "target", vertex.linkTarget); + } + const linkNode = node.insert(function() { + return link; + }, ":first-child"); + const shape = node.select(".label-container"); + if (shape) { + linkNode.append(function() { + return shape.node(); + }); + } + const label = node.select(".label"); + if (label) { + linkNode.append(function() { + return label.node(); + }); + } + } + } + }); +}; +const flowRendererV2 = { + setConf, + addVertices, + addEdges, + getClasses, + draw +}; +const fade = (color, opacity) => { + const channel = khroma__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A; + const r = channel(color, "r"); + const g = channel(color, "g"); + const b = channel(color, "b"); + return khroma__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A(r, g, b, opacity); +}; +const getStyles = (options) => `.label { + font-family: ${options.fontFamily}; + color: ${options.nodeTextColor || options.textColor}; + } + .cluster-label text { + fill: ${options.titleColor}; + } + .cluster-label span,p { + color: ${options.titleColor}; + } + + .label text,span,p { + fill: ${options.nodeTextColor || options.textColor}; + color: ${options.nodeTextColor || options.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${options.edgeLabelBackground}; + fill: ${options.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${fade(options.edgeLabelBackground, 0.5)}; + // background-color: + } + + .cluster rect { + fill: ${options.clusterBkg}; + stroke: ${options.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${options.titleColor}; + } + + .cluster span,p { + color: ${options.titleColor}; + } + /* .cluster div { + color: ${options.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${options.fontFamily}; + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } +`; +const flowStyles = getStyles; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/327.b1507568.js b/assets/js/327.b1507568.js new file mode 100644 index 00000000..8de9ef0c --- /dev/null +++ b/assets/js/327.b1507568.js @@ -0,0 +1,1323 @@ +"use strict"; +exports.id = 327; +exports.ids = [327]; +exports.modules = { + +/***/ 8327: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8886); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9418); + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 18], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 14]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "journey": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "taskName": 18, "taskData": 19, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 9: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 10: + case 11: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 12: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 13: + yy.addTask($$[$0 - 1], $$[$0]); + this.$ = "task"; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 15, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, o($V0, [2, 11]), o($V0, [2, 12]), { 19: [1, 18] }, o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 13])], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 10; + case 3: + break; + case 4: + break; + case 5: + return 4; + case 6: + return 11; + case 7: + this.begin("acc_title"); + return 12; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.begin("acc_descr"); + return 14; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + return 17; + case 15: + return 18; + case 16: + return 19; + case 17: + return ":"; + case 18: + return 6; + case 19: + return "INVALID"; + } + }, + rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let currentSection = ""; +const sections = []; +const tasks = []; +const rawTasks = []; +const clear = function() { + sections.length = 0; + tasks.length = 0; + currentSection = ""; + rawTasks.length = 0; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.v)(); +}; +const addSection = function(txt) { + currentSection = txt; + sections.push(txt); +}; +const getSections = function() { + return sections; +}; +const getTasks = function() { + let allItemsProcessed = compileTasks(); + const maxDepth = 100; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } + tasks.push(...rawTasks); + return tasks; +}; +const updateActors = function() { + const tempActors = []; + tasks.forEach((task) => { + if (task.people) { + tempActors.push(...task.people); + } + }); + const unique = new Set(tempActors); + return [...unique].sort(); +}; +const addTask = function(descr, taskData) { + const pieces = taskData.substr(1).split(":"); + let score = 0; + let peeps = []; + if (pieces.length === 1) { + score = Number(pieces[0]); + peeps = []; + } else { + score = Number(pieces[0]); + peeps = pieces[1].split(","); + } + const peopleList = peeps.map((s) => s.trim()); + const rawTask = { + section: currentSection, + type: currentSection, + people: peopleList, + task: descr, + score + }; + rawTasks.push(rawTask); +}; +const addTaskOrg = function(descr) { + const newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + tasks.push(newTask); +}; +const compileTasks = function() { + const compileTask = function(pos) { + return rawTasks[pos].processed; + }; + let allProcessed = true; + for (const [i, rawTask] of rawTasks.entries()) { + compileTask(i); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; +}; +const getActors = function() { + return updateActors(); +}; +const db = { + getConfig: () => (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey, + clear, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.t, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.g, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.b, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.a, + addSection, + getSections, + getTasks, + addTask, + addTaskOrg, + getActors +}; +const getStyles = (options) => `.label { + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + color: ${options.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${options.textColor} + } + + .legend { + fill: ${options.textColor}; + } + + .label text { + fill: #333; + } + .label { + color: ${options.textColor} + } + + .face { + ${options.faceColor ? `fill: ${options.faceColor}` : "fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${options.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${options.fillType0 ? `fill: ${options.fillType0}` : ""}; + } + .task-type-1, .section-type-1 { + ${options.fillType0 ? `fill: ${options.fillType1}` : ""}; + } + .task-type-2, .section-type-2 { + ${options.fillType0 ? `fill: ${options.fillType2}` : ""}; + } + .task-type-3, .section-type-3 { + ${options.fillType0 ? `fill: ${options.fillType3}` : ""}; + } + .task-type-4, .section-type-4 { + ${options.fillType0 ? `fill: ${options.fillType4}` : ""}; + } + .task-type-5, .section-type-5 { + ${options.fillType0 ? `fill: ${options.fillType5}` : ""}; + } + .task-type-6, .section-type-6 { + ${options.fillType0 ? `fill: ${options.fillType6}` : ""}; + } + .task-type-7, .section-type-7 { + ${options.fillType0 ? `fill: ${options.fillType7}` : ""}; + } + + .actor-0 { + ${options.actor0 ? `fill: ${options.actor0}` : ""}; + } + .actor-1 { + ${options.actor1 ? `fill: ${options.actor1}` : ""}; + } + .actor-2 { + ${options.actor2 ? `fill: ${options.actor2}` : ""}; + } + .actor-3 { + ${options.actor3 ? `fill: ${options.actor3}` : ""}; + } + .actor-4 { + ${options.actor4 ? `fill: ${options.actor4}` : ""}; + } + .actor-5 { + ${options.actor5 ? `fill: ${options.actor5}` : ""}; + } +`; +const styles = getStyles; +const drawRect = function(elem, rectData) { + return (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.d)(elem, rectData); +}; +const drawFace = function(element, faceData) { + const radius = 15; + const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible"); + const face = element.append("g"); + face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + function smile(face2) { + const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .JLW)().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")"); + } + function sad(face2) { + const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .JLW)().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")"); + } + function ambivalent(face2) { + face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); + } + if (faceData.score > 3) { + smile(face); + } else if (faceData.score < 3) { + sad(face); + } else { + ambivalent(face); + } + return circleElement; +}; +const drawCircle = function(element, circleData) { + const circleElement = element.append("circle"); + circleElement.attr("cx", circleData.cx); + circleElement.attr("cy", circleData.cy); + circleElement.attr("class", "actor-" + circleData.pos); + circleElement.attr("fill", circleData.fill); + circleElement.attr("stroke", circleData.stroke); + circleElement.attr("r", circleData.r); + if (circleElement.class !== void 0) { + circleElement.attr("class", circleElement.class); + } + if (circleData.title !== void 0) { + circleElement.append("title").text(circleData.title); + } + return circleElement; +}; +const drawText = function(elem, textData) { + return (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.f)(elem, textData); +}; +const drawLabel = function(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.labelMargin; + txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; + drawText(elem, txtObject); +}; +const drawSection = function(elem, section, conf2) { + const g = elem.append("g"); + const rect = (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.g)(); + rect.x = section.x; + rect.y = section.y; + rect.fill = section.fill; + rect.width = conf2.width * section.taskCount + // width of the tasks + conf2.diagramMarginX * (section.taskCount - 1); + rect.height = conf2.height; + rect.class = "journey-section section-type-" + section.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + _drawTextCandidateFunc(conf2)( + section.text, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "journey-section section-type-" + section.num }, + conf2, + section.colour + ); +}; +let taskCount = -1; +const drawTask = function(elem, task, conf2) { + const center = task.x + conf2.width / 2; + const g = elem.append("g"); + taskCount++; + const maxHeight = 300 + 5 * 30; + g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"); + drawFace(g, { + cx: center, + cy: 300 + (5 - task.score) * 30, + score: task.score + }); + const rect = (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.g)(); + rect.x = task.x; + rect.y = task.y; + rect.fill = task.fill; + rect.width = conf2.width; + rect.height = conf2.height; + rect.class = "task task-type-" + task.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + let xPos = task.x + 14; + task.people.forEach((person) => { + const colour = task.actors[person].color; + const circle = { + cx: xPos, + cy: task.y, + r: 7, + fill: colour, + stroke: "#000", + title: person, + pos: task.actors[person].position + }; + drawCircle(g, circle); + xPos += 10; + }); + _drawTextCandidateFunc(conf2)( + task.task, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "task" }, + conf2, + task.colour + ); +}; +const drawBackgroundRect = function(elem, bounds2) { + (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.a)(elem, bounds2); +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs, colour) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) { + const { taskFontSize, taskFontFamily } = conf2; + const lines = content.split(/<br\s*\/?>/gi); + for (let i = 0; i < lines.length; i++) { + const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily); + text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const body = g.append("switch"); + const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed"); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, body, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (key in fromTextAttrsDict) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const initGraphics = function(graphics) { + graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); +}; +const svgDraw = { + drawRect, + drawCircle, + drawSection, + drawText, + drawLabel, + drawTask, + drawBackgroundRect, + initGraphics +}; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + keys.forEach(function(key) { + conf[key] = cnf[key]; + }); +}; +const actors = {}; +function drawActorLegend(diagram2) { + const conf2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey; + let yPos = 60; + Object.keys(actors).forEach((person) => { + const colour = actors[person].color; + const circleData = { + cx: 20, + cy: yPos, + r: 7, + fill: colour, + stroke: "#000", + pos: actors[person].position + }; + svgDraw.drawCircle(diagram2, circleData); + const labelData = { + x: 40, + y: yPos + 7, + fill: "#666", + text: person, + textMargin: conf2.boxTextMargin | 5 + }; + svgDraw.drawText(diagram2, labelData); + yPos += 20; + }); +} +const conf = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey; +const LEFT_MARGIN = conf.leftMargin; +const draw = function(text, id, version, diagObj) { + const conf2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey; + const securityLevel = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); + bounds.init(); + const diagram2 = root.select("#" + id); + svgDraw.initGraphics(diagram2); + const tasks2 = diagObj.db.getTasks(); + const title = diagObj.db.getDiagramTitle(); + const actorNames = diagObj.db.getActors(); + for (const member in actors) { + delete actors[member]; + } + let actorPos = 0; + actorNames.forEach((actorName) => { + actors[actorName] = { + color: conf2.actorColours[actorPos % conf2.actorColours.length], + position: actorPos + }; + actorPos++; + }); + drawActorLegend(diagram2); + bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50); + drawTasks(diagram2, tasks2, 0); + const box = bounds.getBounds(); + if (title) { + diagram2.append("text").text(title).attr("x", LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25); + } + const height = box.stopy - box.starty + 2 * conf2.diagramMarginY; + const width = LEFT_MARGIN + box.stopx + 2 * conf2.diagramMarginX; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.i)(diagram2, height, width, conf2.useMaxWidth); + diagram2.append("line").attr("x1", LEFT_MARGIN).attr("y1", conf2.height * 4).attr("x2", width - LEFT_MARGIN - 4).attr("y2", conf2.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); + const extraVertForTitle = title ? 70 : 0; + diagram2.attr("viewBox", `${box.startx} -25 ${width} ${height + extraVertForTitle}`); + diagram2.attr("preserveAspectRatio", "xMinYMin meet"); + diagram2.attr("height", height + extraVertForTitle + 25); +}; +const bounds = { + data: { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }, + verticalPos: 0, + sequenceItems: [], + init: function() { + this.sequenceItems = []; + this.data = { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0 + }; + this.verticalPos = 0; + }, + updateVal: function(obj, key, val, fun) { + if (obj[key] === void 0) { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + }, + updateBounds: function(startx, starty, stopx, stopy) { + const conf2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey; + const _self = this; + let cnt = 0; + function updateFn(type) { + return function updateItemBounds(item) { + cnt++; + const n = _self.sequenceItems.length - cnt + 1; + _self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min); + _self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max); + _self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max); + if (!(type === "activation")) { + _self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min); + _self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max); + _self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min); + _self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max); + } + }; + } + this.sequenceItems.forEach(updateFn()); + }, + insert: function(startx, starty, stopx, stopy) { + const _startx = Math.min(startx, stopx); + const _stopx = Math.max(startx, stopx); + const _starty = Math.min(starty, stopy); + const _stopy = Math.max(starty, stopy); + this.updateVal(bounds.data, "startx", _startx, Math.min); + this.updateVal(bounds.data, "starty", _starty, Math.min); + this.updateVal(bounds.data, "stopx", _stopx, Math.max); + this.updateVal(bounds.data, "stopy", _stopy, Math.max); + this.updateBounds(_startx, _starty, _stopx, _stopy); + }, + bumpVerticalPos: function(bump) { + this.verticalPos = this.verticalPos + bump; + this.data.stopy = this.verticalPos; + }, + getVerticalPos: function() { + return this.verticalPos; + }, + getBounds: function() { + return this.data; + } +}; +const fills = conf.sectionFills; +const textColours = conf.sectionColours; +const drawTasks = function(diagram2, tasks2, verticalPos) { + const conf2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().journey; + let lastSection = ""; + const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY; + const taskPos = verticalPos + sectionVHeight; + let sectionNumber = 0; + let fill = "#CCC"; + let colour = "black"; + let num = 0; + for (const [i, task] of tasks2.entries()) { + if (lastSection !== task.section) { + fill = fills[sectionNumber % fills.length]; + num = sectionNumber % fills.length; + colour = textColours[sectionNumber % textColours.length]; + let taskInSectionCount = 0; + const currentSection2 = task.section; + for (let taskIndex = i; taskIndex < tasks2.length; taskIndex++) { + if (tasks2[taskIndex].section == currentSection2) { + taskInSectionCount = taskInSectionCount + 1; + } else { + break; + } + } + const section = { + x: i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN, + y: 50, + text: task.section, + fill, + num, + colour, + taskCount: taskInSectionCount + }; + svgDraw.drawSection(diagram2, section, conf2); + lastSection = task.section; + sectionNumber++; + } + const taskActors = task.people.reduce((acc, actorName) => { + if (actors[actorName]) { + acc[actorName] = actors[actorName]; + } + return acc; + }, {}); + task.x = i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN; + task.y = taskPos; + task.width = conf2.diagramMarginX; + task.height = conf2.diagramMarginY; + task.colour = colour; + task.fill = fill; + task.num = num; + task.actors = taskActors; + svgDraw.drawTask(diagram2, task, conf2); + bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30); + } +}; +const renderer = { + setConf, + draw +}; +const diagram = { + parser: parser$1, + db, + renderer, + styles, + init: (cnf) => { + renderer.setConf(cnf.journey); + db.clear(); + } +}; + + + +/***/ }), + +/***/ 8886: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ a: () => (/* binding */ drawBackgroundRect), +/* harmony export */ b: () => (/* binding */ drawEmbeddedImage), +/* harmony export */ c: () => (/* binding */ drawImage), +/* harmony export */ d: () => (/* binding */ drawRect), +/* harmony export */ e: () => (/* binding */ getTextObj), +/* harmony export */ f: () => (/* binding */ drawText), +/* harmony export */ g: () => (/* binding */ getNoteRect) +/* harmony export */ }); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6750); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); + + +const drawRect = (element, rectData) => { + const rectElement = element.append("rect"); + rectElement.attr("x", rectData.x); + rectElement.attr("y", rectData.y); + rectElement.attr("fill", rectData.fill); + rectElement.attr("stroke", rectData.stroke); + rectElement.attr("width", rectData.width); + rectElement.attr("height", rectData.height); + if (rectData.name) { + rectElement.attr("name", rectData.name); + } + rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx); + rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry); + if (rectData.attrs !== void 0) { + for (const attrKey in rectData.attrs) { + rectElement.attr(attrKey, rectData.attrs[attrKey]); + } + } + rectData.class !== void 0 && rectElement.attr("class", rectData.class); + return rectElement; +}; +const drawBackgroundRect = (element, bounds) => { + const rectData = { + x: bounds.startx, + y: bounds.starty, + width: bounds.stopx - bounds.startx, + height: bounds.stopy - bounds.starty, + fill: bounds.fill, + stroke: bounds.stroke, + class: "rect" + }; + const rectElement = drawRect(element, rectData); + rectElement.lower(); +}; +const drawText = (element, textData) => { + const nText = textData.text.replace(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.J, " "); + const textElem = element.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.attr("class", "legend"); + textElem.style("text-anchor", textData.anchor); + textData.class !== void 0 && textElem.attr("class", textData.class); + const tspan = textElem.append("tspan"); + tspan.attr("x", textData.x + textData.textMargin * 2); + tspan.text(nText); + return textElem; +}; +const drawImage = (elem, x, y, link) => { + const imageElement = elem.append("image"); + imageElement.attr("x", x); + imageElement.attr("y", y); + const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(link); + imageElement.attr("xlink:href", sanitizedLink); +}; +const drawEmbeddedImage = (element, x, y, link) => { + const imageElement = element.append("use"); + imageElement.attr("x", x); + imageElement.attr("y", y); + const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(link); + imageElement.attr("xlink:href", `#${sanitizedLink}`); +}; +const getNoteRect = () => { + const noteRectData = { + x: 0, + y: 0, + width: 100, + height: 100, + fill: "#EDF2AE", + stroke: "#666", + anchor: "start", + rx: 0, + ry: 0 + }; + return noteRectData; +}; +const getTextObj = () => { + const testObject = { + x: 0, + y: 0, + width: 100, + height: 100, + "text-anchor": "start", + style: "#666", + textMargin: 0, + rx: 0, + ry: 0, + tspan: true + }; + return testObject; +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/358.7f285e68.js b/assets/js/358.7f285e68.js new file mode 100644 index 00000000..f8ca656d --- /dev/null +++ b/assets/js/358.7f285e68.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[358],{358:(e,n,t)=>{t.d(n,{a:()=>ln,c:()=>cn});var r={};t.r(r),t.d(r,{attentionMarkers:()=>Le,contentInitial:()=>Te,disable:()=>Pe,document:()=>Ce,flow:()=>De,flowInitial:()=>ze,insideSpan:()=>Me,string:()=>Be,text:()=>_e});var i=t(6257);const u={};function o(e,n,t){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||t?e.value:"";if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return c(e.children,n,t)}return Array.isArray(e)?c(e,n,t):""}function c(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=o(e[i],n,t);return r.join("")}function s(e,n,t,r){const i=e.length;let u,o=0;if(n=n<0?-n>i?0:i+n:n>i?i:n,t=t>0?t:0,r.length<1e4)u=Array.from(r),u.unshift(n,t),e.splice(...u);else for(t&&e.splice(n,t);o<r.length;)u=r.slice(o,o+1e4),u.unshift(n,0),e.splice(...u),o+=1e4,n+=1e4}function l(e,n){return e.length>0?(s(e,e.length,0,n),e):n}const a={}.hasOwnProperty;function f(e,n){let t;for(t in n){const r=(a.call(e,t)?e[t]:void 0)||(e[t]={}),i=n[t];let u;if(i)for(u in i){a.call(r,u)||(r[u]=[]);const e=i[u];d(r[u],Array.isArray(e)?e:e?[e]:[])}}}function d(e,n){let t=-1;const r=[];for(;++t<n.length;)("after"===n[t].add?e:r).push(n[t]);s(e,0,0,r)}const h=A(/[A-Za-z]/),p=A(/[\dA-Za-z]/),m=A(/[#-'*+\--9=?A-Z^-~]/);function g(e){return null!==e&&(e<32||127===e)}const x=A(/\d/),k=A(/[\dA-Fa-f]/),y=A(/[!-/:-@[-`{-~]/);function F(e){return null!==e&&e<-2}function v(e){return null!==e&&(e<0||32===e)}function b(e){return-2===e||-1===e||32===e}const S=A(/[!-\/:-@\[-`\{-~\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]/),E=A(/\s/);function A(e){return function(n){return null!==n&&e.test(String.fromCharCode(n))}}function I(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let u=0;return function(r){if(b(r))return e.enter(t),o(r);return n(r)};function o(r){return b(r)&&u++<i?(e.consume(r),o):(e.exit(t),n(r))}}const w={tokenize:function(e){const n=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I(e,n,"linePrefix")}),(function(n){return e.enter("paragraph"),r(n)}));let t;return n;function r(n){const r=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=r),t=r,i(n)}function i(n){return null===n?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(n)):F(n)?(e.consume(n),e.exit("chunkText"),r):(e.consume(n),i)}}};const C={tokenize:function(e){const n=this,t=[];let r,i,u,o=0;return c;function c(r){if(o<t.length){const i=t[o];return n.containerState=i[1],e.attempt(i[0].continuation,l,a)(r)}return a(r)}function l(e){if(o++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,r&&y();const t=n.events.length;let i,u=t;for(;u--;)if("exit"===n.events[u][0]&&"chunkFlow"===n.events[u][1].type){i=n.events[u][1].end;break}k(o);let c=t;for(;c<n.events.length;)n.events[c][1].end=Object.assign({},i),c++;return s(n.events,u+1,0,n.events.slice(t)),n.events.length=c,a(e)}return c(e)}function a(i){if(o===t.length){if(!r)return h(i);if(r.currentConstruct&&r.currentConstruct.concrete)return m(i);n.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(T,f,d)(i)}function f(e){return r&&y(),k(o),h(e)}function d(e){return n.parser.lazy[n.now().line]=o!==t.length,u=n.now().offset,m(e)}function h(t){return n.containerState={},e.attempt(T,p,m)(t)}function p(e){return o++,t.push([n.currentConstruct,n.containerState]),h(e)}function m(t){return null===t?(r&&y(),k(0),void e.consume(t)):(r=r||n.parser.flow(n.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:r}),g(t))}function g(t){return null===t?(x(e.exit("chunkFlow"),!0),k(0),void e.consume(t)):F(t)?(e.consume(t),x(e.exit("chunkFlow")),o=0,n.interrupt=void 0,c):(e.consume(t),g)}function x(e,t){const c=n.sliceStream(e);if(t&&c.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(c),n.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<u&&(!r.events[e][1].end||r.events[e][1].end.offset>u))return;const t=n.events.length;let i,c,l=t;for(;l--;)if("exit"===n.events[l][0]&&"chunkFlow"===n.events[l][1].type){if(i){c=n.events[l][1].end;break}i=!0}for(k(o),e=t;e<n.events.length;)n.events[e][1].end=Object.assign({},c),e++;s(n.events,l+1,0,n.events.slice(t)),n.events.length=e}}function k(r){let i=t.length;for(;i-- >r;){const r=t[i];n.containerState=r[1],r[0].exit.call(n,e)}t.length=r}function y(){r.write([null]),i=void 0,r=void 0,n.containerState._closeFlow=void 0}}},T={tokenize:function(e,n,t){return I(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const z={tokenize:function(e,n,t){return function(n){return b(n)?I(e,r,"linePrefix")(n):r(n)};function r(e){return null===e||F(e)?n(e):t(e)}},partial:!0};function D(e,n,t,r){const i=e.length;let u,o=0;if(n=n<0?-n>i?0:i+n:n>i?i:n,t=t>0?t:0,r.length<1e4)u=Array.from(r),u.unshift(n,t),e.splice(...u);else for(t&&e.splice(n,t);o<r.length;)u=r.slice(o,o+1e4),u.unshift(n,0),e.splice(...u),o+=1e4,n+=1e4}function B(e){const n={};let t,r,i,u,o,c,s,l=-1;for(;++l<e.length;){for(;l in n;)l=n[l];if(t=e[l],l&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[l-1][1].type&&(c=t[1]._tokenizer.events,i=0,i<c.length&&"lineEndingBlank"===c[i][1].type&&(i+=2),i<c.length&&"content"===c[i][1].type))for(;++i<c.length&&"content"!==c[i][1].type;)"chunkText"===c[i][1].type&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===t[0])t[1].contentType&&(Object.assign(n,_(e,l)),l=n[l],s=!0);else if(t[1]._container){for(i=l,r=void 0;i--&&(u=e[i],"lineEnding"===u[1].type||"lineEndingBlank"===u[1].type);)"enter"===u[0]&&(r&&(e[r][1].type="lineEndingBlank"),u[1].type="lineEnding",r=i);r&&(t[1].end=Object.assign({},e[r][1].start),o=e.slice(r,l),o.unshift(t),D(e,r,l-r+1,o))}}return!s}function _(e,n){const t=e[n][1],r=e[n][2];let i=n-1;const u=[],o=t._tokenizer||r.parser[t.contentType](t.start),c=o.events,s=[],l={};let a,f,d=-1,h=t,p=0,m=0;const g=[m];for(;h;){for(;e[++i][1]!==h;);u.push(i),h._tokenizer||(a=r.sliceStream(h),h.next||a.push(null),f&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(a),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=t;++d<c.length;)"exit"===c[d][0]&&"enter"===c[d-1][0]&&c[d][1].type===c[d-1][1].type&&c[d][1].start.line!==c[d][1].end.line&&(m=d+1,g.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):g.pop(),d=g.length;d--;){const n=c.slice(g[d],g[d+1]),t=u.pop();s.unshift([t,t+n.length-1]),D(e,t,2,n)}for(d=-1;++d<s.length;)l[p+s[d][0]]=p+s[d][1],p+=s[d][1]-s[d][0]-1;return l}const M={tokenize:function(e,n){let t;return function(n){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),r(n)};function r(n){return null===n?i(n):F(n)?e.check(L,u,i)(n):(e.consume(n),r)}function i(t){return e.exit("chunkContent"),e.exit("content"),n(t)}function u(n){return e.consume(n),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,r}},resolve:function(e){return B(e),e}},L={tokenize:function(e,n,t){const r=this;return function(n){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),I(e,i,"linePrefix")};function i(i){if(null===i||F(i))return t(i);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&"linePrefix"===u[1].type&&u[2].sliceSerialize(u[1],!0).length>=4?n(i):e.interrupt(r.parser.constructs.flow,t,n)(i)}},partial:!0};const P={tokenize:function(e){const n=this,t=e.attempt(z,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}),e.attempt(this.parser.constructs.flowInitial,r,I(e,e.attempt(this.parser.constructs.flow,r,e.attempt(M,r)),"linePrefix")));return t;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n.currentConstruct=void 0,t;e.consume(r)}}};const O={resolveAll:q()},j=R("string"),H=R("text");function R(e){return{tokenize:function(n){const t=this,r=this.parser.constructs[e],i=n.attempt(r,u,o);return u;function u(e){return s(e)?i(e):o(e)}function o(e){if(null!==e)return n.enter("data"),n.consume(e),c;n.consume(e)}function c(e){return s(e)?(n.exit("data"),i(e)):(n.consume(e),c)}function s(e){if(null===e)return!0;const n=r[e];let i=-1;if(n)for(;++i<n.length;){const e=n[i];if(!e.previous||e.previous.call(t,t.previous))return!0}return!1}},resolveAll:q("text"===e?V:void 0)}}function q(e){return function(n,t){let r,i=-1;for(;++i<=n.length;)void 0===r?n[i]&&"data"===n[i][1].type&&(r=i,i++):n[i]&&"data"===n[i][1].type||(i!==r+2&&(n[r][1].end=n[i-1][1].end,n.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(n,t):n}}function V(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||"lineEnding"===e[t][1].type)&&"data"===e[t-1][1].type){const r=e[t-1][1],i=n.sliceStream(r);let u,o=i.length,c=-1,s=0;for(;o--;){const e=i[o];if("string"==typeof e){for(c=e.length;32===e.charCodeAt(c-1);)s++,c--;if(c)break;c=-1}else if(-2===e)u=!0,s++;else if(-1!==e){o++;break}}if(s){const i={type:t===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?c:r.start._bufferIndex+c},end:Object.assign({},r.end)};r.end=Object.assign({},i.start),r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(t,0,["enter",i,n],["exit",i,n]),t+=2)}t++}return e}function Q(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const u=e[i].resolveAll;u&&!r.includes(u)&&(n=u(n,t),r.push(u))}return n}function N(e,n,t){let r=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},u=[];let o=[],c=[],a=!0;const f={consume:function(e){F(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,S()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++));d.previous=e,a=!0},enter:function(e,n){const t=n||{};return t.type=e,t.start=g(),d.events.push(["enter",t,d]),c.push(t),t},exit:function(e){const n=c.pop();return n.end=g(),d.events.push(["exit",n,d]),n},attempt:v((function(e,n){b(e,n.from)})),check:v(y),interrupt:v(y,{interrupt:!0})},d={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:m,sliceSerialize:function(e,n){return function(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const u=e[t];let o;if("string"==typeof u)o=u;else switch(u){case-5:o="\r";break;case-4:o="\n";break;case-3:o="\r\n";break;case-2:o=n?" ":"\t";break;case-1:if(!n&&i)continue;o=" ";break;default:o=String.fromCharCode(u)}i=-2===u,r.push(o)}return r.join("")}(m(e),n)},now:g,defineSkip:function(e){i[e.line]=e.column,S()},write:function(e){if(o=l(o,e),x(),null!==o[o.length-1])return[];return b(n,0),d.events=Q(u,d.events,d),d.events}};let h,p=n.tokenize.call(d,f);return n.resolveAll&&u.push(n),d;function m(e){return function(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,u=n.end._bufferIndex;let o;if(t===i)o=[e[t].slice(r,u)];else{if(o=e.slice(t,i),r>-1){const e=o[0];"string"==typeof e?o[0]=e.slice(r):o.shift()}u>0&&o.push(e[i].slice(0,u))}return o}(o,e)}function g(){const{line:e,column:n,offset:t,_index:i,_bufferIndex:u}=r;return{line:e,column:n,offset:t,_index:i,_bufferIndex:u}}function x(){let e;for(;r._index<o.length;){const n=o[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;)k(n.charCodeAt(r._bufferIndex));else k(n)}}function k(e){a=void 0,h=e,p=p(e)}function y(e,n){n.restore()}function v(e,n){return function(t,i,u){let o,s,l,h;return Array.isArray(t)?p(t):"tokenize"in t?p([t]):function(e){return n;function n(n){const t=null!==n&&e[n],r=null!==n&&e.null;return p([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(r)?r:r?[r]:[]])(n)}}(t);function p(e){return o=e,s=0,0===e.length?u:m(e[s])}function m(e){return function(t){h=function(){const e=g(),n=d.previous,t=d.currentConstruct,i=d.events.length,u=Array.from(c);return{restore:o,from:i};function o(){r=e,d.previous=n,d.currentConstruct=t,d.events.length=i,c=u,S()}}(),l=e,e.partial||(d.currentConstruct=e);if(e.name&&d.parser.constructs.disable.null.includes(e.name))return k(t);return e.tokenize.call(n?Object.assign(Object.create(d),n):d,f,x,k)(t)}}function x(n){return a=!0,e(l,h),i}function k(e){return a=!0,h.restore(),++s<o.length?m(o[s]):u}}}function b(e,n){e.resolveAll&&!u.includes(e)&&u.push(e),e.resolve&&s(d.events,n,d.events.length-n,e.resolve(d.events.slice(n),d)),e.resolveTo&&(d.events=e.resolveTo(d.events,d))}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}const U={name:"thematicBreak",tokenize:function(e,n,t){let r,i=0;return function(n){return e.enter("thematicBreak"),function(e){return r=e,u(e)}(n)};function u(u){return u===r?(e.enter("thematicBreakSequence"),o(u)):i>=3&&(null===u||F(u))?(e.exit("thematicBreak"),n(u)):t(u)}function o(n){return n===r?(e.consume(n),i++,o):(e.exit("thematicBreakSequence"),b(n)?I(e,u,"whitespace")(n):u(n))}}};const $={name:"list",tokenize:function(e,n,t){const r=this,i=r.events[r.events.length-1];let u=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(n){const i=r.containerState.type||(42===n||43===n||45===n?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||n===r.containerState.marker:x(n)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===n||45===n?e.check(U,t,s)(n):s(n);if(!r.interrupt||49===n)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(n)}return t(n)};function c(n){return x(n)&&++o<10?(e.consume(n),c):(!r.interrupt||o<2)&&(r.containerState.marker?n===r.containerState.marker:41===n||46===n)?(e.exit("listItemValue"),s(n)):t(n)}function s(n){return e.enter("listItemMarker"),e.consume(n),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||n,e.check(z,r.interrupt?t:l,e.attempt(W,f,a))}function l(e){return r.containerState.initialBlankLine=!0,u++,f(e)}function a(n){return b(n)?(e.enter("listItemPrefixWhitespace"),e.consume(n),e.exit("listItemPrefixWhitespace"),f):t(n)}function f(t){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(t)}},continuation:{tokenize:function(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(z,(function(t){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,I(e,n,"listItemIndent",r.containerState.size+1)(t)}),(function(t){if(r.containerState.furtherBlankLines||!b(t))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(t);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Z,n,i)(t)}));function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,I(e,e.attempt($,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},W={tokenize:function(e,n,t){const r=this;return I(e,(function(e){const i=r.events[r.events.length-1];return!b(e)&&i&&"listItemPrefixWhitespace"===i[1].type?n(e):t(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},Z={tokenize:function(e,n,t){const r=this;return I(e,(function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?n(e):t(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};const Y={name:"blockQuote",tokenize:function(e,n,t){const r=this;return function(n){if(62===n){const t=r.containerState;return t.open||(e.enter("blockQuote",{_container:!0}),t.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(n),e.exit("blockQuoteMarker"),i}return t(n)};function i(t){return b(t)?(e.enter("blockQuotePrefixWhitespace"),e.consume(t),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(t))}},continuation:{tokenize:function(e,n,t){const r=this;return function(n){if(b(n))return I(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n);return i(n)};function i(r){return e.attempt(Y,n,t)(r)}}},exit:function(e){e.exit("blockQuote")}};function G(e,n,t,r,i,u,o,c,s){const l=s||Number.POSITIVE_INFINITY;let a=0;return function(n){if(60===n)return e.enter(r),e.enter(i),e.enter(u),e.consume(n),e.exit(u),f;if(null===n||32===n||41===n||g(n))return t(n);return e.enter(r),e.enter(o),e.enter(c),e.enter("chunkString",{contentType:"string"}),p(n)};function f(t){return 62===t?(e.enter(u),e.consume(t),e.exit(u),e.exit(i),e.exit(r),n):(e.enter(c),e.enter("chunkString",{contentType:"string"}),d(t))}function d(n){return 62===n?(e.exit("chunkString"),e.exit(c),f(n)):null===n||60===n||F(n)?t(n):(e.consume(n),92===n?h:d)}function h(n){return 60===n||62===n||92===n?(e.consume(n),d):d(n)}function p(i){return a||null!==i&&41!==i&&!v(i)?a<l&&40===i?(e.consume(i),a++,p):41===i?(e.consume(i),a--,p):null===i||32===i||40===i||g(i)?t(i):(e.consume(i),92===i?m:p):(e.exit("chunkString"),e.exit(c),e.exit(o),e.exit(r),n(i))}function m(n){return 40===n||41===n||92===n?(e.consume(n),p):p(n)}}function J(e,n,t,r,i,u){const o=this;let c,s=0;return function(n){return e.enter(r),e.enter(i),e.consume(n),e.exit(i),e.enter(u),l};function l(f){return s>999||null===f||91===f||93===f&&!c||94===f&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?t(f):93===f?(e.exit(u),e.enter(i),e.consume(f),e.exit(i),e.exit(r),n):F(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),a(f))}function a(n){return null===n||91===n||93===n||F(n)||s++>999?(e.exit("chunkString"),l(n)):(e.consume(n),c||(c=!b(n)),92===n?f:a)}function f(n){return 91===n||92===n||93===n?(e.consume(n),s++,a):a(n)}}function K(e,n,t,r,i,u){let o;return function(n){if(34===n||39===n||40===n)return e.enter(r),e.enter(i),e.consume(n),e.exit(i),o=40===n?41:n,c;return t(n)};function c(t){return t===o?(e.enter(i),e.consume(t),e.exit(i),e.exit(r),n):(e.enter(u),s(t))}function s(n){return n===o?(e.exit(u),c(o)):null===n?t(n):F(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),I(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(n))}function l(n){return n===o||null===n||F(n)?(e.exit("chunkString"),s(n)):(e.consume(n),92===n?a:l)}function a(n){return n===o||92===n?(e.consume(n),l):l(n)}}function X(e,n){let t;return function r(i){if(F(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r;if(b(i))return I(e,r,t?"linePrefix":"lineSuffix")(i);return n(i)}}function ee(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ne={name:"definition",tokenize:function(e,n,t){const r=this;let i;return function(n){return e.enter("definition"),function(n){return J.call(r,e,u,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(n)}(n)};function u(n){return i=ee(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===n?(e.enter("definitionMarker"),e.consume(n),e.exit("definitionMarker"),o):t(n)}function o(n){return v(n)?X(e,c)(n):c(n)}function c(n){return G(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(n)}function s(n){return e.attempt(te,l,l)(n)}function l(n){return b(n)?I(e,a,"whitespace")(n):a(n)}function a(u){return null===u||F(u)?(e.exit("definition"),r.parser.defined.push(i),n(u)):t(u)}}},te={tokenize:function(e,n,t){return function(n){return v(n)?X(e,r)(n):t(n)};function r(n){return K(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(n)}function i(n){return b(n)?I(e,u,"whitespace")(n):u(n)}function u(e){return null===e||F(e)?n(e):t(e)}},partial:!0};const re={name:"codeIndented",tokenize:function(e,n,t){const r=this;return function(n){return e.enter("codeIndented"),I(e,i,"linePrefix",5)(n)};function i(e){const n=r.events[r.events.length-1];return n&&"linePrefix"===n[1].type&&n[2].sliceSerialize(n[1],!0).length>=4?u(e):t(e)}function u(n){return null===n?c(n):F(n)?e.attempt(ie,u,c)(n):(e.enter("codeFlowValue"),o(n))}function o(n){return null===n||F(n)?(e.exit("codeFlowValue"),u(n)):(e.consume(n),o)}function c(t){return e.exit("codeIndented"),n(t)}}},ie={tokenize:function(e,n,t){const r=this;return i;function i(n){return r.parser.lazy[r.now().line]?t(n):F(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),i):I(e,u,"linePrefix",5)(n)}function u(e){const u=r.events[r.events.length-1];return u&&"linePrefix"===u[1].type&&u[2].sliceSerialize(u[1],!0).length>=4?n(e):F(e)?i(e):t(e)}},partial:!0};const ue={name:"headingAtx",tokenize:function(e,n,t){let r=0;return function(n){return e.enter("atxHeading"),function(n){return e.enter("atxHeadingSequence"),i(n)}(n)};function i(n){return 35===n&&r++<6?(e.consume(n),i):null===n||v(n)?(e.exit("atxHeadingSequence"),u(n)):t(n)}function u(t){return 35===t?(e.enter("atxHeadingSequence"),o(t)):null===t||F(t)?(e.exit("atxHeading"),n(t)):b(t)?I(e,u,"whitespace")(t):(e.enter("atxHeadingText"),c(t))}function o(n){return 35===n?(e.consume(n),o):(e.exit("atxHeadingSequence"),u(n))}function c(n){return null===n||35===n||v(n)?(e.exit("atxHeadingText"),u(n)):(e.consume(n),c)}},resolve:function(e,n){let t,r,i=e.length-2,u=3;"whitespace"===e[u][1].type&&(u+=2);i-2>u&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(u===i-1||i-4>u&&"whitespace"===e[i-2][1].type)&&(i-=u+1===i?2:4);i>u&&(t={type:"atxHeadingText",start:e[u][1].start,end:e[i][1].end},r={type:"chunkText",start:e[u][1].start,end:e[i][1].end,contentType:"text"},s(e,u,i-u+1,[["enter",t,n],["enter",r,n],["exit",r,n],["exit",t,n]]));return e}};const oe={name:"setextUnderline",tokenize:function(e,n,t){const r=this;let i;return function(n){let o,c=r.events.length;for(;c--;)if("lineEnding"!==r.events[c][1].type&&"linePrefix"!==r.events[c][1].type&&"content"!==r.events[c][1].type){o="paragraph"===r.events[c][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||o))return e.enter("setextHeadingLine"),i=n,function(n){return e.enter("setextHeadingLineSequence"),u(n)}(n);return t(n)};function u(n){return n===i?(e.consume(n),u):(e.exit("setextHeadingLineSequence"),b(n)?I(e,o,"lineSuffix")(n):o(n))}function o(r){return null===r||F(r)?(e.exit("setextHeadingLine"),n(r)):t(r)}},resolveTo:function(e,n){let t,r,i,u=e.length;for(;u--;)if("enter"===e[u][0]){if("content"===e[u][1].type){t=u;break}"paragraph"===e[u][1].type&&(r=u)}else"content"===e[u][1].type&&e.splice(u,1),i||"definition"!==e[u][1].type||(i=u);const o={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,n]),e.splice(i+1,0,["exit",e[t][1],n]),e[t][1].end=Object.assign({},e[i][1].end)):e[t][1]=o;return e.push(["exit",o,n]),e}};const ce=["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"],se=["pre","script","style","textarea"],le={name:"htmlFlow",tokenize:function(e,n,t){const r=this;let i,u,o,c,s;return function(n){return function(n){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),l}(n)};function l(c){return 33===c?(e.consume(c),a):47===c?(e.consume(c),u=!0,m):63===c?(e.consume(c),i=3,r.interrupt?n:H):h(c)?(e.consume(c),o=String.fromCharCode(c),g):t(c)}function a(u){return 45===u?(e.consume(u),i=2,f):91===u?(e.consume(u),i=5,c=0,d):h(u)?(e.consume(u),i=4,r.interrupt?n:H):t(u)}function f(i){return 45===i?(e.consume(i),r.interrupt?n:H):t(i)}function d(i){const u="CDATA[";return i===u.charCodeAt(c++)?(e.consume(i),6===c?r.interrupt?n:D:d):t(i)}function m(n){return h(n)?(e.consume(n),o=String.fromCharCode(n),g):t(n)}function g(c){if(null===c||47===c||62===c||v(c)){const s=47===c,l=o.toLowerCase();return s||u||!se.includes(l)?ce.includes(o.toLowerCase())?(i=6,s?(e.consume(c),x):r.interrupt?n(c):D(c)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(c):u?k(c):y(c)):(i=1,r.interrupt?n(c):D(c))}return 45===c||p(c)?(e.consume(c),o+=String.fromCharCode(c),g):t(c)}function x(i){return 62===i?(e.consume(i),r.interrupt?n:D):t(i)}function k(n){return b(n)?(e.consume(n),k):T(n)}function y(n){return 47===n?(e.consume(n),T):58===n||95===n||h(n)?(e.consume(n),S):b(n)?(e.consume(n),y):T(n)}function S(n){return 45===n||46===n||58===n||95===n||p(n)?(e.consume(n),S):E(n)}function E(n){return 61===n?(e.consume(n),A):b(n)?(e.consume(n),E):y(n)}function A(n){return null===n||60===n||61===n||62===n||96===n?t(n):34===n||39===n?(e.consume(n),s=n,I):b(n)?(e.consume(n),A):w(n)}function I(n){return n===s?(e.consume(n),s=null,C):null===n||F(n)?t(n):(e.consume(n),I)}function w(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||v(n)?E(n):(e.consume(n),w)}function C(e){return 47===e||62===e||b(e)?y(e):t(e)}function T(n){return 62===n?(e.consume(n),z):t(n)}function z(n){return null===n||F(n)?D(n):b(n)?(e.consume(n),z):t(n)}function D(n){return 45===n&&2===i?(e.consume(n),L):60===n&&1===i?(e.consume(n),P):62===n&&4===i?(e.consume(n),R):63===n&&3===i?(e.consume(n),H):93===n&&5===i?(e.consume(n),j):!F(n)||6!==i&&7!==i?null===n||F(n)?(e.exit("htmlFlowData"),B(n)):(e.consume(n),D):(e.exit("htmlFlowData"),e.check(ae,q,B)(n))}function B(n){return e.check(fe,_,q)(n)}function _(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),M}function M(n){return null===n||F(n)?B(n):(e.enter("htmlFlowData"),D(n))}function L(n){return 45===n?(e.consume(n),H):D(n)}function P(n){return 47===n?(e.consume(n),o="",O):D(n)}function O(n){if(62===n){const t=o.toLowerCase();return se.includes(t)?(e.consume(n),R):D(n)}return h(n)&&o.length<8?(e.consume(n),o+=String.fromCharCode(n),O):D(n)}function j(n){return 93===n?(e.consume(n),H):D(n)}function H(n){return 62===n?(e.consume(n),R):45===n&&2===i?(e.consume(n),H):D(n)}function R(n){return null===n||F(n)?(e.exit("htmlFlowData"),q(n)):(e.consume(n),R)}function q(t){return e.exit("htmlFlow"),n(t)}},resolveTo:function(e){let n=e.length;for(;n--&&("enter"!==e[n][0]||"htmlFlow"!==e[n][1].type););n>1&&"linePrefix"===e[n-2][1].type&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2));return e},concrete:!0},ae={tokenize:function(e,n,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(z,n,t)}},partial:!0},fe={tokenize:function(e,n,t){const r=this;return function(n){if(F(n))return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),i;return t(n)};function i(e){return r.parser.lazy[r.now().line]?t(e):n(e)}},partial:!0};const de={tokenize:function(e,n,t){const r=this;return function(n){if(null===n)return t(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),i};function i(e){return r.parser.lazy[r.now().line]?t(e):n(e)}},partial:!0},he={name:"codeFenced",tokenize:function(e,n,t){const r=this,i={tokenize:function(e,n,t){let i=0;return o;function o(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),s}function s(n){return e.enter("codeFencedFence"),b(n)?I(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n):l(n)}function l(n){return n===u?(e.enter("codeFencedFenceSequence"),a(n)):t(n)}function a(n){return n===u?(i++,e.consume(n),a):i>=c?(e.exit("codeFencedFenceSequence"),b(n)?I(e,f,"whitespace")(n):f(n)):t(n)}function f(r){return null===r||F(r)?(e.exit("codeFencedFence"),n(r)):t(r)}},partial:!0};let u,o=0,c=0;return function(n){return function(n){const t=r.events[r.events.length-1];return o=t&&"linePrefix"===t[1].type?t[2].sliceSerialize(t[1],!0).length:0,u=n,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(n)}(n)};function s(n){return n===u?(c++,e.consume(n),s):c<3?t(n):(e.exit("codeFencedFenceSequence"),b(n)?I(e,l,"whitespace")(n):l(n))}function l(t){return null===t||F(t)?(e.exit("codeFencedFence"),r.interrupt?n(t):e.check(de,h,k)(t)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),a(t))}function a(n){return null===n||F(n)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(n)):b(n)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),I(e,f,"whitespace")(n)):96===n&&n===u?t(n):(e.consume(n),a)}function f(n){return null===n||F(n)?l(n):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(n))}function d(n){return null===n||F(n)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(n)):96===n&&n===u?t(n):(e.consume(n),d)}function h(n){return e.attempt(i,k,p)(n)}function p(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),m}function m(n){return o>0&&b(n)?I(e,g,"linePrefix",o+1)(n):g(n)}function g(n){return null===n||F(n)?e.check(de,h,k)(n):(e.enter("codeFlowValue"),x(n))}function x(n){return null===n||F(n)?(e.exit("codeFlowValue"),g(n)):(e.consume(n),x)}function k(t){return e.exit("codeFenced"),n(t)}},concrete:!0};const pe=document.createElement("i");function me(e){const n="&"+e+";";pe.innerHTML=n;const t=pe.textContent;return(59!==t.charCodeAt(t.length-1)||"semi"===e)&&(t!==n&&t)}const ge={name:"characterReference",tokenize:function(e,n,t){const r=this;let i,u,o=0;return function(n){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(n),e.exit("characterReferenceMarker"),c};function c(n){return 35===n?(e.enter("characterReferenceMarkerNumeric"),e.consume(n),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),i=31,u=p,l(n))}function s(n){return 88===n||120===n?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(n),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,u=k,l):(e.enter("characterReferenceValue"),i=7,u=x,l(n))}function l(c){if(59===c&&o){const i=e.exit("characterReferenceValue");return u!==p||me(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n):t(c)}return u(c)&&o++<i?(e.consume(c),l):t(c)}}};const xe={name:"characterEscape",tokenize:function(e,n,t){return function(n){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(n),e.exit("escapeMarker"),r};function r(r){return y(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(r)}}};const ke={name:"lineEnding",tokenize:function(e,n){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I(e,n,"linePrefix")}}};const ye={name:"labelEnd",tokenize:function(e,n,t){const r=this;let i,u,o=r.events.length;for(;o--;)if(("labelImage"===r.events[o][1].type||"labelLink"===r.events[o][1].type)&&!r.events[o][1]._balanced){i=r.events[o][1];break}return function(n){if(!i)return t(n);if(i._inactive)return a(n);return u=r.parser.defined.includes(ee(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(n),e.exit("labelMarker"),e.exit("labelEnd"),c};function c(n){return 40===n?e.attempt(Fe,l,u?l:a)(n):91===n?e.attempt(ve,l,u?s:a)(n):u?l(n):a(n)}function s(n){return e.attempt(be,l,a)(n)}function l(e){return n(e)}function a(e){return i._balanced=!0,t(e)}},resolveTo:function(e,n){let t,r,i,u,o=e.length,c=0;for(;o--;)if(t=e[o][1],r){if("link"===t.type||"labelLink"===t.type&&t._inactive)break;"enter"===e[o][0]&&"labelLink"===t.type&&(t._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===t.type||"labelLink"===t.type)&&!t._balanced&&(r=o,"labelLink"!==t.type)){c=2;break}}else"labelEnd"===t.type&&(i=o);const a={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},f={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[i][1].end)},d={type:"labelText",start:Object.assign({},e[r+c+2][1].end),end:Object.assign({},e[i-2][1].start)};return u=[["enter",a,n],["enter",f,n]],u=l(u,e.slice(r+1,r+c+3)),u=l(u,[["enter",d,n]]),u=l(u,Q(n.parser.constructs.insideSpan.null,e.slice(r+c+4,i-3),n)),u=l(u,[["exit",d,n],e[i-2],e[i-1],["exit",f,n]]),u=l(u,e.slice(i+1)),u=l(u,[["exit",a,n]]),s(e,r,e.length,u),e},resolveAll:function(e){let n=-1;for(;++n<e.length;){const t=e[n][1];"labelImage"!==t.type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(n+1,"labelImage"===t.type?4:2),t.type="data",n++)}return e}},Fe={tokenize:function(e,n,t){return function(n){return e.enter("resource"),e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),r};function r(n){return v(n)?X(e,i)(n):i(n)}function i(n){return 41===n?l(n):G(e,u,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(n)}function u(n){return v(n)?X(e,c)(n):l(n)}function o(e){return t(e)}function c(n){return 34===n||39===n||40===n?K(e,s,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(n):l(n)}function s(n){return v(n)?X(e,l)(n):l(n)}function l(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),n):t(r)}}},ve={tokenize:function(e,n,t){const r=this;return function(n){return J.call(r,e,i,u,"reference","referenceMarker","referenceString")(n)};function i(e){return r.parser.defined.includes(ee(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(e):t(e)}function u(e){return t(e)}}},be={tokenize:function(e,n,t){return function(n){return e.enter("reference"),e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),n):t(r)}}};function Se(e){return null===e||v(e)||E(e)?1:S(e)?2:void 0}const Ee={name:"attention",tokenize:function(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Se(r);let u;return function(n){return u=n,e.enter("attentionSequence"),o(n)};function o(c){if(c===u)return e.consume(c),o;const s=e.exit("attentionSequence"),l=Se(c),a=!l||2===l&&i||t.includes(c),f=!i||2===i&&l||t.includes(r);return s._open=Boolean(42===u?a:a&&(i||!f)),s._close=Boolean(42===u?f:f&&(l||!a)),n(c)}},resolveAll:function(e,n){let t,r,i,u,o,c,a,f,d=-1;for(;++d<e.length;)if("enter"===e[d][0]&&"attentionSequence"===e[d][1].type&&e[d][1]._close)for(t=d;t--;)if("exit"===e[t][0]&&"attentionSequence"===e[t][1].type&&e[t][1]._open&&n.sliceSerialize(e[t][1]).charCodeAt(0)===n.sliceSerialize(e[d][1]).charCodeAt(0)){if((e[t][1]._close||e[d][1]._open)&&(e[d][1].end.offset-e[d][1].start.offset)%3&&!((e[t][1].end.offset-e[t][1].start.offset+e[d][1].end.offset-e[d][1].start.offset)%3))continue;c=e[t][1].end.offset-e[t][1].start.offset>1&&e[d][1].end.offset-e[d][1].start.offset>1?2:1;const h=Object.assign({},e[t][1].end),p=Object.assign({},e[d][1].start);Ae(h,-c),Ae(p,c),u={type:c>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[t][1].end)},o={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[d][1].start),end:p},i={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[t][1].end),end:Object.assign({},e[d][1].start)},r={type:c>1?"strong":"emphasis",start:Object.assign({},u.start),end:Object.assign({},o.end)},e[t][1].end=Object.assign({},u.start),e[d][1].start=Object.assign({},o.end),a=[],e[t][1].end.offset-e[t][1].start.offset&&(a=l(a,[["enter",e[t][1],n],["exit",e[t][1],n]])),a=l(a,[["enter",r,n],["enter",u,n],["exit",u,n],["enter",i,n]]),a=l(a,Q(n.parser.constructs.insideSpan.null,e.slice(t+1,d),n)),a=l(a,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",r,n]]),e[d][1].end.offset-e[d][1].start.offset?(f=2,a=l(a,[["enter",e[d][1],n],["exit",e[d][1],n]])):f=0,s(e,t-1,d-t+3,a),d=t+a.length-f-2;break}d=-1;for(;++d<e.length;)"attentionSequence"===e[d][1].type&&(e[d][1].type="data");return e}};function Ae(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Ie={name:"htmlText",tokenize:function(e,n,t){const r=this;let i,u,o;return function(n){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(n),c};function c(n){return 33===n?(e.consume(n),s):47===n?(e.consume(n),A):63===n?(e.consume(n),S):h(n)?(e.consume(n),T):t(n)}function s(n){return 45===n?(e.consume(n),l):91===n?(e.consume(n),u=0,m):h(n)?(e.consume(n),y):t(n)}function l(n){return 45===n?(e.consume(n),d):t(n)}function a(n){return null===n?t(n):45===n?(e.consume(n),f):F(n)?(o=a,j(n)):(e.consume(n),a)}function f(n){return 45===n?(e.consume(n),d):a(n)}function d(e){return 62===e?O(e):45===e?f(e):a(e)}function m(n){const r="CDATA[";return n===r.charCodeAt(u++)?(e.consume(n),6===u?g:m):t(n)}function g(n){return null===n?t(n):93===n?(e.consume(n),x):F(n)?(o=g,j(n)):(e.consume(n),g)}function x(n){return 93===n?(e.consume(n),k):g(n)}function k(n){return 62===n?O(n):93===n?(e.consume(n),k):g(n)}function y(n){return null===n||62===n?O(n):F(n)?(o=y,j(n)):(e.consume(n),y)}function S(n){return null===n?t(n):63===n?(e.consume(n),E):F(n)?(o=S,j(n)):(e.consume(n),S)}function E(e){return 62===e?O(e):S(e)}function A(n){return h(n)?(e.consume(n),w):t(n)}function w(n){return 45===n||p(n)?(e.consume(n),w):C(n)}function C(n){return F(n)?(o=C,j(n)):b(n)?(e.consume(n),C):O(n)}function T(n){return 45===n||p(n)?(e.consume(n),T):47===n||62===n||v(n)?z(n):t(n)}function z(n){return 47===n?(e.consume(n),O):58===n||95===n||h(n)?(e.consume(n),D):F(n)?(o=z,j(n)):b(n)?(e.consume(n),z):O(n)}function D(n){return 45===n||46===n||58===n||95===n||p(n)?(e.consume(n),D):B(n)}function B(n){return 61===n?(e.consume(n),_):F(n)?(o=B,j(n)):b(n)?(e.consume(n),B):z(n)}function _(n){return null===n||60===n||61===n||62===n||96===n?t(n):34===n||39===n?(e.consume(n),i=n,M):F(n)?(o=_,j(n)):b(n)?(e.consume(n),_):(e.consume(n),L)}function M(n){return n===i?(e.consume(n),i=void 0,P):null===n?t(n):F(n)?(o=M,j(n)):(e.consume(n),M)}function L(n){return null===n||34===n||39===n||60===n||61===n||96===n?t(n):47===n||62===n||v(n)?z(n):(e.consume(n),L)}function P(e){return 47===e||62===e||v(e)?z(e):t(e)}function O(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),n):t(r)}function j(n){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),H}function H(n){return b(n)?I(e,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(n):R(n)}function R(n){return e.enter("htmlTextData"),o(n)}}};const we={name:"codeText",tokenize:function(e,n,t){let r,i,u=0;return function(n){return e.enter("codeText"),e.enter("codeTextSequence"),o(n)};function o(n){return 96===n?(e.consume(n),u++,o):(e.exit("codeTextSequence"),c(n))}function c(n){return null===n?t(n):32===n?(e.enter("space"),e.consume(n),e.exit("space"),c):96===n?(i=e.enter("codeTextSequence"),r=0,l(n)):F(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),c):(e.enter("codeTextData"),s(n))}function s(n){return null===n||32===n||96===n||F(n)?(e.exit("codeTextData"),c(n)):(e.consume(n),s)}function l(t){return 96===t?(e.consume(t),r++,l):r===u?(e.exit("codeTextSequence"),e.exit("codeText"),n(t)):(i.type="codeTextData",s(t))}},resolve:function(e){let n,t,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(n=i;++n<r;)if("codeTextData"===e[n][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}n=i-1,r++;for(;++n<=r;)void 0===t?n!==r&&"lineEnding"!==e[n][1].type&&(t=n):n!==r&&"lineEnding"!==e[n][1].type||(e[t][1].type="codeTextData",n!==t+2&&(e[t][1].end=e[n-1][1].end,e.splice(t+2,n-t-2),r-=n-t-2,n=t+2),t=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};const Ce={42:$,43:$,45:$,48:$,49:$,50:$,51:$,52:$,53:$,54:$,55:$,56:$,57:$,62:Y},Te={91:ne},ze={[-2]:re,[-1]:re,32:re},De={35:ue,42:U,45:[oe,U],60:le,61:oe,95:U,96:he,126:he},Be={38:ge,92:xe},_e={[-5]:ke,[-4]:ke,[-3]:ke,33:{name:"labelStartImage",tokenize:function(e,n,t){const r=this;return function(n){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(n),e.exit("labelImageMarker"),i};function i(n){return 91===n?(e.enter("labelMarker"),e.consume(n),e.exit("labelMarker"),e.exit("labelImage"),u):t(n)}function u(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?t(e):n(e)}},resolveAll:ye.resolveAll},38:ge,42:Ee,60:[{name:"autolink",tokenize:function(e,n,t){let r=0;return function(n){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(n){return h(n)?(e.consume(n),u):s(n)}function u(e){return 43===e||45===e||46===e||p(e)?(r=1,o(e)):s(e)}function o(n){return 58===n?(e.consume(n),r=0,c):(43===n||45===n||46===n||p(n))&&r++<32?(e.consume(n),o):(r=0,s(n))}function c(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),n):null===r||32===r||60===r||g(r)?t(r):(e.consume(r),c)}function s(n){return 64===n?(e.consume(n),l):m(n)?(e.consume(n),s):t(n)}function l(e){return p(e)?a(e):t(e)}function a(t){return 46===t?(e.consume(t),r=0,l):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.exit("autolink"),n):f(t)}function f(n){if((45===n||p(n))&&r++<63){const t=45===n?f:a;return e.consume(n),t}return t(n)}}},Ie],91:{name:"labelStartLink",tokenize:function(e,n,t){const r=this;return function(n){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(n),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?t(e):n(e)}},resolveAll:ye.resolveAll},92:[{name:"hardBreakEscape",tokenize:function(e,n,t){return function(n){return e.enter("hardBreakEscape"),e.consume(n),r};function r(r){return F(r)?(e.exit("hardBreakEscape"),n(r)):t(r)}}},xe],93:ye,95:Ee,96:we},Me={null:[Ee,O]},Le={null:[42,95]},Pe={null:[]};function Oe(e){const n=function(e){const n={};let t=-1;for(;++t<e.length;)f(n,e[t]);return n}([r,...(e||{}).extensions||[]]),t={defined:[],lazy:{},constructs:n,content:i(w),document:i(C),flow:i(P),string:i(j),text:i(H)};return t;function i(e){return function(n){return N(t,e,n)}}}const je=/[\0\t\n\r]/g;function He(e,n){const t=Number.parseInt(e,n);return t<9||11===t||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||!(65535&~t)||65534==(65535&t)||t>1114111?"\ufffd":String.fromCharCode(t)}const Re=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qe(e,n,t){if(n)return n;if(35===t.charCodeAt(0)){const e=t.charCodeAt(1),n=120===e||88===e;return He(t.slice(n?2:1),n?16:10)}return me(t)||e}function Ve(e){return e&&"object"==typeof e?"position"in e||"type"in e?Ne(e.position):"start"in e||"end"in e?Ne(e):"line"in e||"column"in e?Qe(e):"":""}function Qe(e){return Ue(e&&e.line)+":"+Ue(e&&e.column)}function Ne(e){return Qe(e&&e.start)+"-"+Qe(e&&e.end)}function Ue(e){return e&&"number"==typeof e?e:1}const $e={}.hasOwnProperty,We=function(e,n,t){return"string"!=typeof n&&(t=n,n=void 0),function(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(ue),autolinkProtocol:T,autolinkEmail:T,atxHeading:l(ne),blockQuote:l(Y),characterEscape:T,characterReference:T,codeFenced:l(G),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(G,a),codeText:l(J,a),codeTextData:T,data:T,codeFlowValue:T,definition:l(K),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(X),hardBreakEscape:l(te),hardBreakTrailing:l(te),htmlFlow:l(re,a),htmlFlowData:T,htmlText:l(re,a),htmlTextData:T,image:l(ie),label:a,link:l(ue),listItem:l(ce),listItemValue:g,listOrdered:l(oe,m),listUnordered:l(oe),paragraph:l(se),reference:Q,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(ne),strong:l(le),thematicBreak:l(fe)},exit:{atxHeading:d(),atxHeadingSequence:A,autolink:d(),autolinkEmail:Z,autolinkProtocol:W,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:$,codeFenced:d(F),codeFencedFence:y,codeFencedFenceInfo:x,codeFencedFenceMeta:k,codeFlowValue:z,codeIndented:d(v),codeText:d(L),codeTextData:z,data:z,definition:d(),definitionDestinationString:E,definitionLabelString:b,definitionTitleString:S,emphasis:d(),hardBreakEscape:d(B),hardBreakTrailing:d(B),htmlFlow:d(_),htmlFlowData:z,htmlText:d(M),htmlTextData:z,image:d(O),label:H,labelText:j,lineEnding:D,link:d(P),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:N,resourceDestinationString:R,resourceTitleString:q,resource:V,setextHeading:d(C),setextHeadingLineSequence:w,setextHeadingText:I,strong:d(),thematicBreak:d()}};Ye(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(e){let t={type:"root",children:[]};const r={stack:[t],tokenStack:[],config:n,enter:f,exit:h,buffer:a,resume:p,setData:c,getData:s},u=[];let o=-1;for(;++o<e.length;)if("listOrdered"===e[o][1].type||"listUnordered"===e[o][1].type)if("enter"===e[o][0])u.push(o);else{o=i(e,u.pop(),o)}for(o=-1;++o<e.length;){const t=n[e[o][0]];$e.call(t,e[o][1].type)&&t[e[o][1].type].call(Object.assign({sliceSerialize:e[o][2].sliceSerialize},r),e[o][1])}if(r.tokenStack.length>0){const e=r.tokenStack[r.tokenStack.length-1];(e[1]||Je).call(r,void 0,e[0])}for(t.position={start:Ze(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ze(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},o=-1;++o<n.transforms.length;)t=n.transforms[o](t)||t;return t}function i(e,n,t){let r,i,u,o,c=n-1,s=-1,l=!1;for(;++c<=t;){const n=e[c];if("listUnordered"===n[1].type||"listOrdered"===n[1].type||"blockQuote"===n[1].type?("enter"===n[0]?s++:s--,o=void 0):"lineEndingBlank"===n[1].type?"enter"===n[0]&&(!r||o||s||u||(u=c),o=void 0):"linePrefix"===n[1].type||"listItemValue"===n[1].type||"listItemMarker"===n[1].type||"listItemPrefix"===n[1].type||"listItemPrefixWhitespace"===n[1].type||(o=void 0),!s&&"enter"===n[0]&&"listItemPrefix"===n[1].type||-1===s&&"exit"===n[0]&&("listUnordered"===n[1].type||"listOrdered"===n[1].type)){if(r){let o=c;for(i=void 0;o--;){const n=e[o];if("lineEnding"===n[1].type||"lineEndingBlank"===n[1].type){if("exit"===n[0])continue;i&&(e[i][1].type="lineEndingBlank",l=!0),n[1].type="lineEnding",i=o}else if("linePrefix"!==n[1].type&&"blockQuotePrefix"!==n[1].type&&"blockQuotePrefixWhitespace"!==n[1].type&&"blockQuoteMarker"!==n[1].type&&"listItemIndent"!==n[1].type)break}u&&(!i||u<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:n[1].end),e.splice(i||c,0,["exit",r,n[2]]),c++,t++}"listItemPrefix"===n[1].type&&(r={type:"listItem",_spread:!1,start:Object.assign({},n[1].start),end:void 0},e.splice(c,0,["enter",r,n[2]]),c++,t++,u=void 0,o=!0)}}return e[n][1]._spread=l,t}function c(e,n){t[e]=n}function s(e){return t[e]}function l(e,n){return t;function t(t){f.call(this,e(t),t),n&&n.call(this,t)}}function a(){this.stack.push({type:"fragment",children:[]})}function f(e,n,t){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([n,t]),e.position={start:Ze(n.start)},e}function d(e){return n;function n(n){e&&e.call(this,n),h.call(this,n)}}function h(e,n){const t=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Ve({start:e.start,end:e.end})+"): it\u2019s not open");if(r[0].type!==e.type)if(n)n.call(this,e,r[0]);else{(r[1]||Je).call(this,e,r[0])}return t.position.end=Ze(e.end),t}function p(){return function(e,n){const t=n||u;return o(e,"boolean"!=typeof t.includeImageAlt||t.includeImageAlt,"boolean"!=typeof t.includeHtml||t.includeHtml)}(this.stack.pop())}function m(){c("expectingFirstListItemValue",!0)}function g(e){if(s("expectingFirstListItemValue")){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),c("expectingFirstListItemValue")}}function x(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function k(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function y(){s("flowCodeInside")||(this.buffer(),c("flowCodeInside",!0))}function F(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),c("flowCodeInside")}function v(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.label=n,t.identifier=ee(this.sliceSerialize(e)).toLowerCase()}function S(){const e=this.resume();this.stack[this.stack.length-1].title=e}function E(){const e=this.resume();this.stack[this.stack.length-1].url=e}function A(e){const n=this.stack[this.stack.length-1];if(!n.depth){const t=this.sliceSerialize(e).length;n.depth=t}}function I(){c("setextHeadingSlurpLineEnding",!0)}function w(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function C(){c("setextHeadingSlurpLineEnding")}function T(e){const n=this.stack[this.stack.length-1];let t=n.children[n.children.length-1];t&&"text"===t.type||(t=ae(),t.position={start:Ze(e.start)},n.children.push(t)),this.stack.push(t)}function z(e){const n=this.stack.pop();n.value+=this.sliceSerialize(e),n.position.end=Ze(e.end)}function D(e){const t=this.stack[this.stack.length-1];if(s("atHardBreak")){return t.children[t.children.length-1].position.end=Ze(e.end),void c("atHardBreak")}!s("setextHeadingSlurpLineEnding")&&n.canContainEols.includes(t.type)&&(T.call(this,e),z.call(this,e))}function B(){c("atHardBreak",!0)}function _(){const e=this.resume();this.stack[this.stack.length-1].value=e}function M(){const e=this.resume();this.stack[this.stack.length-1].value=e}function L(){const e=this.resume();this.stack[this.stack.length-1].value=e}function P(){const e=this.stack[this.stack.length-1];if(s("inReference")){const n=s("referenceType")||"shortcut";e.type+="Reference",e.referenceType=n,delete e.url,delete e.title}else delete e.identifier,delete e.label;c("referenceType")}function O(){const e=this.stack[this.stack.length-1];if(s("inReference")){const n=s("referenceType")||"shortcut";e.type+="Reference",e.referenceType=n,delete e.url,delete e.title}else delete e.identifier,delete e.label;c("referenceType")}function j(e){const n=this.sliceSerialize(e),t=this.stack[this.stack.length-2];t.label=function(e){return e.replace(Re,qe)}(n),t.identifier=ee(n).toLowerCase()}function H(){const e=this.stack[this.stack.length-1],n=this.resume(),t=this.stack[this.stack.length-1];if(c("inReference",!0),"link"===t.type){const n=e.children;t.children=n}else t.alt=n}function R(){const e=this.resume();this.stack[this.stack.length-1].url=e}function q(){const e=this.resume();this.stack[this.stack.length-1].title=e}function V(){c("inReference")}function Q(){c("referenceType","collapsed")}function N(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.label=n,t.identifier=ee(this.sliceSerialize(e)).toLowerCase(),c("referenceType","full")}function U(e){c("characterReferenceType",e.type)}function $(e){const n=this.sliceSerialize(e),t=s("characterReferenceType");let r;if(t)r=He(n,"characterReferenceMarkerNumeric"===t?10:16),c("characterReferenceType");else{r=me(n)}const i=this.stack.pop();i.value+=r,i.position.end=Ze(e.end)}function W(e){z.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function Z(e){z.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function Y(){return{type:"blockquote",children:[]}}function G(){return{type:"code",lang:null,meta:null,value:""}}function J(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function ne(){return{type:"heading",depth:void 0,children:[]}}function te(){return{type:"break"}}function re(){return{type:"html",value:""}}function ie(){return{type:"image",title:null,url:"",alt:null}}function ue(){return{type:"link",title:null,url:"",children:[]}}function oe(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ce(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function se(){return{type:"paragraph",children:[]}}function le(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function fe(){return{type:"thematicBreak"}}}(t)(function(e){for(;!B(e););return e}(Oe(t).document().write(function(){let e,n=1,t="",r=!0;return function(i,u,o){const c=[];let s,l,a,f,d;for(i=t+i.toString(u),a=0,t="",r&&(65279===i.charCodeAt(0)&&a++,r=void 0);a<i.length;){if(je.lastIndex=a,s=je.exec(i),f=s&&void 0!==s.index?s.index:i.length,d=i.charCodeAt(f),!s){t=i.slice(a);break}if(10===d&&a===f&&e)c.push(-3),e=void 0;else switch(e&&(c.push(-5),e=void 0),a<f&&(c.push(i.slice(a,f)),n+=f-a),d){case 0:c.push(65533),n++;break;case 9:for(l=4*Math.ceil(n/4),c.push(-2);n++<l;)c.push(-1);break;case 10:c.push(-4),n=1;break;default:e=!0,n=1}a=f+1}return o&&(e&&c.push(-5),t&&c.push(t),c.push(null)),c}}()(e,n,!0))))};function Ze(e){return{line:e.line,column:e.column,offset:e.offset}}function Ye(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?Ye(e,r):Ge(e,r)}}function Ge(e,n){let t;for(t in n)if($e.call(n,t))if("canContainEols"===t){const r=n[t];r&&e[t].push(...r)}else if("transforms"===t){const r=n[t];r&&e[t].push(...r)}else if("enter"===t||"exit"===t){const r=n[t];r&&Object.assign(e[t],r)}}function Je(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ve({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ve({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ve({start:n.start,end:n.end})+") is still open")}var Ke=t(513);function Xe(e){const n=function(e){const n=e.replace(/\n{2,}/g,"\n");return(0,Ke.T)(n)}(e),{children:t}=We(n),r=[[]];let i=0;function u(e,n="normal"){if("text"===e.type){e.value.split("\n").forEach(((e,t)=>{0!==t&&(i++,r.push([])),e.split(" ").forEach((e=>{e&&r[i].push({content:e,type:n})}))}))}else"strong"!==e.type&&"emphasis"!==e.type||e.children.forEach((n=>{u(n,e.type)}))}return t.forEach((e=>{"paragraph"===e.type&&e.children.forEach((e=>{u(e)}))})),r}function en(e,n){var t;return nn(e,[],(t=n.content,Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((e=>e.segment)):[...t]),n.type)}function nn(e,n,t,r){if(0===t.length)return[{content:n.join(""),type:r},{content:"",type:r}];const[i,...u]=t,o=[...n,i];return e([{content:o.join(""),type:r}])?nn(e,o,u,r):(0===n.length&&i&&(n.push(i),t.shift()),[{content:n.join(""),type:r},{content:t.join(""),type:r}])}function tn(e,n){if(e.some((({content:e})=>e.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return rn(e,n)}function rn(e,n,t=[],r=[]){if(0===e.length)return r.length>0&&t.push(r),t.length>0?t:[];let i="";" "===e[0].content&&(i=" ",e.shift());const u=e.shift()??{content:" ",type:"normal"},o=[...r];if(""!==i&&o.push({content:i,type:"normal"}),o.push(u),n(o))return rn(e,n,t,o);if(r.length>0)t.push(r),e.unshift(u);else if(u.content){const[r,i]=en(n,u);t.push([r]),i.content&&e.unshift(i)}return rn(e,n,t)}function un(e,n,t){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",n*t-.1+"em").attr("dy",t+"em")}function on(e,n,t){const r=e.append("text"),i=un(r,1,n);sn(i,t);const u=i.node().getComputedTextLength();return r.remove(),u}function cn(e,n,t){var r;const i=e.append("text"),u=un(i,1,n);sn(u,[{content:t,type:"normal"}]);const o=null==(r=u.node())?void 0:r.getBoundingClientRect();return o&&i.remove(),o}function sn(e,n){e.text(""),n.forEach(((n,t)=>{const r=e.append("tspan").attr("font-style","emphasis"===n.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===n.type?"bold":"normal");0===t?r.text(n.content):r.text(" "+n.content)}))}const ln=(e,n="",{style:t="",isTitle:r=!1,classes:u="",useHtmlLabels:o=!0,isNode:c=!0,width:s=200,addSvgBackground:l=!1}={})=>{if(i.l.info("createText",n,t,r,u,o,c,l),o){const r=function(e){const{children:n}=We(e);return n.map((function e(n){return"text"===n.type?n.value.replace(/\n/g,"<br/>"):"strong"===n.type?`<strong>${n.children.map(e).join("")}</strong>`:"emphasis"===n.type?`<em>${n.children.map(e).join("")}</em>`:"paragraph"===n.type?`<p>${n.children.map(e).join("")}</p>`:`Unsupported markdown: ${n.type}`})).join("")}(n),o=function(e,n,t,r,i=!1){const u=e.append("foreignObject"),o=u.append("xhtml:div"),c=n.label,s=n.isNode?"nodeLabel":"edgeLabel";var l,a;o.html(`\n <span class="${s} ${r}" `+(n.labelStyle?'style="'+n.labelStyle+'"':"")+">"+c+"</span>"),l=o,(a=n.labelStyle)&&l.attr("style",a),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("max-width",t+"px"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&o.attr("class","labelBkg");let f=o.node().getBoundingClientRect();return f.width===t&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",t+"px"),f=o.node().getBoundingClientRect()),u.style("width",f.width),u.style("height",f.height),u.node()}(e,{isNode:c,label:(0,i.M)(r).replace(/fa[blrs]?:fa-[\w-]+/g,(e=>`<i class='${e.replace(":"," ")}'></i>`)),labelStyle:t.replace("fill:","color:")},s,u,l);return o}{const t=function(e,n,t,r=!1){const i=n.append("g"),u=i.insert("rect").attr("class","background"),o=i.append("text").attr("y","-10.1");let c=0;for(const s of t){const n=n=>on(i,1.1,n)<=e,t=n(s)?[s]:tn(s,n);for(const e of t)sn(un(o,c,1.1),e),c++}if(r){const e=o.node().getBBox(),n=2;return u.attr("x",-n).attr("y",-n).attr("width",e.width+2*n).attr("height",e.height+2*n),i.node()}return o.node()}(s,e,Xe(n),l);return t}}}}]); \ No newline at end of file diff --git a/assets/js/3771.5dded75d.js b/assets/js/3771.5dded75d.js new file mode 100644 index 00000000..38fd4136 --- /dev/null +++ b/assets/js/3771.5dded75d.js @@ -0,0 +1,2 @@ +/*! For license information please see 3771.5dded75d.js.LICENSE.txt */ +(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[3771],{7799:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n,r=this.getChild().getNodes(),i=0;i<r.length;i++)null==(n=r[i]).getChild()?(n.moveBy(e,t),n.displacementX+=e,n.displacementY+=t):n.propogateDisplacementToChildren(e,t)},a.prototype.setPred1=function(e){this.pred1=e},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(e){this.next=e},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(e){this.processed=e},a.prototype.isProcessed=function(){return processed},e.exports=a},function(e,t,n){"use strict";var r=n(0).FDLayout,i=n(4),a=n(3),o=n(5),s=n(2),l=n(1),u=n(0).FDLayoutConstants,c=n(0).LayoutConstants,h=n(0).Point,d=n(0).PointD,p=n(0).Layout,g=n(0).Integer,f=n(0).IGeometry,v=n(0).LGraph,y=n(0).Transform;function m(){r.call(this),this.toBeTiled={}}for(var b in m.prototype=Object.create(r.prototype),r)m[b]=r[b];m.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},m.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},m.prototype.newNode=function(e){return new o(this.graphManager,e)},m.prototype.newEdge=function(e){return new s(null,null,e)},m.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(l.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=u.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=u.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=u.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=u.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=u.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},m.prototype.layout=function(){return c.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},m.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)l.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(e){return t.has(e)})),this.graphManager.setAllNodesToApplyGravitation(n));else{var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},m.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},m.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n<e.length;n++){var r=e[n].rect,i=e[n].id;t[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return t},m.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if("during"===u.ANIMATE)this.emit("layoutstarted");else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},m.prototype.calculateNodesToApplyGravitationTo=function(){var e,t,n=[],r=this.graphManager.getGraphs(),i=r.length;for(t=0;t<i;t++)(e=r[t]).updateConnected(),e.isConnected||(n=n.concat(e.getNodes()));return n},m.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());var t,n=new Set;for(t=0;t<e.length;t++){var r=e[t];if(!n.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new d),r.getBendpoints().push(new d),this.createDummyNodesForBendpoints(r),n.add(r);else{var o=[];if(o=(o=o.concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i)),!n.has(o[0])){var s;if(o.length>1)for(s=0;s<o.length;s++){var l=o[s];l.getBendpoints().push(new d),this.createDummyNodesForBendpoints(l)}o.forEach((function(e){n.add(e)}))}}}if(n.size==e.length)break}},m.prototype.positionNodesRadially=function(e){for(var t=new h(0,0),n=Math.ceil(Math.sqrt(e.length)),r=0,i=0,a=0,o=new d(0,0),s=0;s<e.length;s++){s%n==0&&(a=0,i=r,0!=s&&(i+=l.DEFAULT_COMPONENT_SEPERATION),r=0);var u=e[s],g=p.findCenterOfTree(u);t.x=a,t.y=i,(o=m.radialLayout(u,g,t)).y>r&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(c.WORLD_CENTER_X-o.x/2,c.WORLD_CENTER_Y-o.y/2))},m.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);m.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o<e.length;o++)e[o].transform(a);var s=new d(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},m.branchRadialLayout=function(e,t,n,r,i,a){var o=(r-n+1)/2;o<0&&(o+=180);var s=(o+n)%360*f.TWO_PI/360,l=(Math.cos(s),i*Math.cos(s)),u=i*Math.sin(s);e.setCenter(l,u);var c=[],h=(c=c.concat(e.getEdges())).length;null!=t&&h--;for(var d,p=0,g=c.length,v=e.getEdgesBetween(t);v.length>1;){var y=v[0];v.splice(0,1);var b=c.indexOf(y);b>=0&&c.splice(b,1),g--,h--}d=null!=t?(c.indexOf(v[0])+1)%g:0;for(var x=Math.abs(r-n)/h,w=d;p!=h;w=++w%g){var E=c[w].getOtherEnd(e);if(E!=t){var _=(n+p*x)%360,T=(_+x)%360;m.branchRadialLayout(E,e,_,T,i+a,a),p++}}},m.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;n<e.length;n++){var r=e[n].getDiagonal();r>t&&(t=r)}return t},m.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},m.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=(s=r[i]).getParent();0!==this.getNodeDegreeWithChildren(s)||null!=a.id&&this.getToBeTiled(a)||n.push(s)}for(i=0;i<n.length;i++){var s,l=(s=n[i]).getParent().id;void 0===t[l]&&(t[l]=[]),t[l]=t[l].concat(s)}Object.keys(t).forEach((function(n){if(t[n].length>1){var r="DummyCompound_"+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),l=i.getChild();l.add(a);for(var u=0;u<t[n].length;u++){var c=t[n][u];l.remove(c),s.add(c)}}}))},m.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)t[this.compoundOrder[n].id]=this.compoundOrder[n],e[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},m.prototype.clearZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach((function(n){var r=e.idToDummyNode[n];t[n]=e.tileNodes(e.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=t[n].width,r.rect.height=t[n].height}))},m.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},m.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach((function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)}))},m.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];var n=e.getChild();if(null==n)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[t]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[t]=!0,!0},m.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;r<t.length;r++){var i=t[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},m.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(null==e.getChild())return t;for(var n=e.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];t+=this.getNodeDegreeWithChildren(i)}return t},m.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},m.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var n=e[t];null!=n.getChild()&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},m.prototype.adjustLocations=function(e,t,n,r,i){n+=i;for(var a=t+=r,o=0;o<e.rows.length;o++){var s=e.rows[o];t=a;for(var l=0,u=0;u<s.length;u++){var c=s[u];c.rect.x=t,c.rect.y=n,t+=c.rect.width+e.horizontalPadding,c.rect.height>l&&(l=c.rect.height)}n+=l+e.verticalPadding}},m.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach((function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height}))},m.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};e.sort((function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height<t.rect.width*t.rect.height?1:0}));for(var r=0;r<e.length;r++){var i=e[r];0==n.rows.length?this.insertNodeToRow(n,i,0,t):this.canAddHorizontal(n,i.rect.width,i.rect.height)?this.insertNodeToRow(n,i,this.getShortestRowIndex(n),t):this.insertNodeToRow(n,i,n.rows.length,t),this.shiftToLastRow(n)}return n},m.prototype.insertNodeToRow=function(e,t,n,r){var i=r;n==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var a=e.rowWidth[n]+t.rect.width;e.rows[n].length>0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width<a&&(e.width=a);var o=t.rect.height;n>0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},m.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]<n&&(t=r,n=e.rowWidth[r]);return t},m.prototype.getLongestRowIndex=function(e){for(var t=-1,n=Number.MIN_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]>n&&(t=r,n=e.rowWidth[r]);return t},m.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a,o,s=0;return e.rowHeight[r]<n&&r>0&&(s=n+e.verticalPadding-e.rowHeight[r]),a=e.width-i>=t+e.horizontalPadding?(e.height+s)/(i+t+e.horizontalPadding):(e.height+s)/e.width,s=n+e.verticalPadding,(o=e.width<t?(e.height+s)/t:(e.height+s)/e.width)<1&&(o=1/o),a<1&&(a=1/a),a<o},m.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),n=e.rowWidth.length-1,r=e.rows[t],i=r[r.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[n]>a&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;s<r.length;s++)r[s].height>o&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]<i.height+e.verticalPadding&&(e.rowHeight[n]=i.height+e.verticalPadding);var u=e.rowHeight[t]+e.rowHeight[n];e.height+=u-l,this.shiftToLastRow(e)}},m.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},m.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},m.prototype.reduceTrees=function(){for(var e,t=[],n=!0;n;){var r=this.graphManager.getAllNodes(),i=[];n=!1;for(var a=0;a<r.length;a++)1!=(e=r[a]).getEdges().length||e.getEdges()[0].isInterGraph||null!=e.getChild()||(i.push([e,e.getEdges()[0],e.getOwner()]),n=!0);if(1==n){for(var o=[],s=0;s<i.length;s++)1==i[s][0].getEdges().length&&(o.push(i[s]),i[s][0].getOwner().remove(i[s][0]));t.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=t},m.prototype.growTree=function(e){for(var t,n=e[e.length-1],r=0;r<n.length;r++)t=n[r],this.findPlaceforPrunedNode(t),t[2].add(t[0]),t[2].add(t[1],t[1].source,t[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},m.prototype.findPlaceforPrunedNode=function(e){var t,n,r=e[0],i=(n=r==e[1].source?e[1].target:e[1].source).startX,a=n.finishX,o=n.startY,s=n.finishY,l=[0,0,0,0];if(o>0)for(var c=i;c<=a;c++)l[0]+=this.grid[c][o-1].length+this.grid[c][o].length-1;if(a<this.grid.length-1)for(c=o;c<=s;c++)l[1]+=this.grid[a+1][c].length+this.grid[a][c].length-1;if(s<this.grid[0].length-1)for(c=i;c<=a;c++)l[2]+=this.grid[c][s+1].length+this.grid[c][s].length-1;if(i>0)for(c=o;c<=s;c++)l[3]+=this.grid[i-1][c].length+this.grid[i][c].length-1;for(var h,d,p=g.MAX_VALUE,f=0;f<l.length;f++)l[f]<p?(p=l[f],h=1,d=f):l[f]==p&&h++;if(3==h&&0==p)0==l[0]&&0==l[1]&&0==l[2]?t=1:0==l[0]&&0==l[1]&&0==l[3]?t=0:0==l[0]&&0==l[2]&&0==l[3]?t=3:0==l[1]&&0==l[2]&&0==l[3]&&(t=2);else if(2==h&&0==p){var v=Math.floor(2*Math.random());t=0==l[0]&&0==l[1]?0==v?0:1:0==l[0]&&0==l[2]?0==v?0:2:0==l[0]&&0==l[3]?0==v?0:3:0==l[1]&&0==l[2]?0==v?1:2:0==l[1]&&0==l[3]?0==v?1:3:0==v?2:3}else t=4==h&&0==p?v=Math.floor(4*Math.random()):d;0==t?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-u.DEFAULT_EDGE_LENGTH-r.getHeight()/2):1==t?r.setCenter(n.getCenterX()+n.getWidth()/2+u.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):2==t?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+u.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-u.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())},e.exports=m},function(e,t,n){"use strict";var r={};r.layoutBase=n(0),r.CoSEConstants=n(1),r.CoSEEdge=n(2),r.CoSEGraph=n(3),r.CoSEGraphManager=n(4),r.CoSELayout=n(6),r.CoSENode=n(5),e.exports=r}])},e.exports=r(n(3143))},3457:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,a=n(0).CoSEConstants,o=n(0).CoSELayout,s=n(0).CoSENode,l=n(0).layoutBase.PointD,u=n(0).layoutBase.DimensionD,c={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(e){this.options=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}(c,e),d(this.options)}var d=function(e){null!=e.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),null!=e.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),null!=e.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),null!=e.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),null!=e.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),null!=e.numIter&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),null!=e.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),null!=e.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),null!=e.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),null!=e.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),"draft"==e.quality?r.QUALITY=0:"proof"==e.quality?r.QUALITY=2:r.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=r.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL="function"==typeof e.tilingPaddingVertical?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof e.tilingPaddingHorizontal?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};h.prototype.run=function(){var e,t,n=this.options,r=(this.idToLNode={},this.layout=new o),i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var a=r.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),l=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var u=0;u<l.length;u++){var c=l[u],h=this.idToLNode[c.data("source")],d=this.idToLNode[c.data("target")];h!==d&&0==h.getEdgesBetween(d).length&&(a.add(r.newEdge(),h,d).id=c.id())}var p=function(e,t){"number"==typeof e&&(e=t);var n=e.data("id"),r=i.idToLNode[n];return{x:r.getRect().getCenterX(),y:r.getRect().getCenterY()}},g=function a(){for(var o,s=function(){n.fit&&n.cy.fit(n.eles,n.padding),e||(e=!0,i.cy.one("layoutready",n.ready),i.cy.trigger({type:"layoutready",layout:i}))},l=i.options.refresh,u=0;u<l&&!o;u++)o=i.stopped||i.layout.tick();if(o)return r.checkLayoutSuccess()&&!r.isSubLayout&&r.doPostLayout(),r.tilingPostLayout&&r.tilingPostLayout(),r.isLayoutFinished=!0,i.options.eles.nodes().positions(p),s(),i.cy.one("layoutstop",i.options.stop),i.cy.trigger({type:"layoutstop",layout:i}),t&&cancelAnimationFrame(t),void(e=!1);var c=i.layout.getPositionsData();n.eles.nodes().positions((function(e,t){if("number"==typeof e&&(e=t),!e.isParent()){for(var n=e.id(),r=c[n],i=e;null==r&&(r=c[i.data("parent")]||c["DummyCompound_"+i.data("parent")],c[n]=r,null!=(i=i.parent()[0])););return null!=r?{x:r.x,y:r.y}:{x:e.position("x"),y:e.position("y")}}})),s(),t=requestAnimationFrame(a)};return r.addListener("layoutstarted",(function(){"during"===i.options.animate&&(t=requestAnimationFrame(g))})),r.runLayout(),"during"!==this.options.animate&&(i.options.eles.nodes().not(":parent").layoutPositions(i,i.options,p),e=!1),this},h.prototype.getTopMostNodes=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id()]=!0;var r=e.filter((function(e,n){"number"==typeof e&&(e=n);for(var r=e.parent()[0];null!=r;){if(t[r.id()])return!1;r=r.parent()[0]}return!0}));return r},h.prototype.processChildrenList=function(e,t,n){for(var r=t.length,i=0;i<r;i++){var a,o,c=t[i],h=c.children(),d=c.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((a=null!=c.outerWidth()&&null!=c.outerHeight()?e.add(new s(n.graphManager,new l(c.position("x")-d.w/2,c.position("y")-d.h/2),new u(parseFloat(d.w),parseFloat(d.h)))):e.add(new s(this.graphManager))).id=c.data("id"),a.paddingLeft=parseInt(c.css("padding")),a.paddingTop=parseInt(c.css("padding")),a.paddingRight=parseInt(c.css("padding")),a.paddingBottom=parseInt(c.css("padding")),this.options.nodeDimensionsIncludeLabels&&c.isParent()){var p=c.boundingBox({includeLabels:!0,includeNodes:!1}).w,g=c.boundingBox({includeLabels:!0,includeNodes:!1}).h,f=c.css("text-halign");a.labelWidth=p,a.labelHeight=g,a.labelPos=f}this.idToLNode[c.data("id")]=a,isNaN(a.rect.x)&&(a.rect.x=0),isNaN(a.rect.y)&&(a.rect.y=0),null!=h&&h.length>0&&(o=n.getGraphManager().add(n.newGraph(),a),this.processChildrenList(o,h,n))}},h.prototype.stop=function(){return this.stopped=!0,this};var p=function(e){e("layout","cose-bilkent",h)};"undefined"!=typeof cytoscape&&p(cytoscape),e.exports=p}])},e.exports=r(n(7799))},4726:(e,t,n)=>{"use strict";var r=n(8221),i=n(5731),a=n(8156),o=n(3560),s=n(2072);function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(r),c=l(i),h=l(a),d=l(o),p=l(s);function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(l){s=!0,i=l}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var w="undefined"==typeof window?null:window,E=w?w.navigator:null;w&&w.document;var _=g(""),T=g({}),D=g((function(){})),C="undefined"==typeof HTMLElement?"undefined":g(HTMLElement),N=function(e){return e&&e.instanceString&&L(e.instanceString)?e.instanceString():null},A=function(e){return null!=e&&g(e)==_},L=function(e){return null!=e&&g(e)===D},k=function(e){return!O(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},S=function(e){return null!=e&&g(e)===T&&!k(e)&&e.constructor===Object},I=function(e){return null!=e&&g(e)===g(1)&&!isNaN(e)},M=function(e){return"undefined"===C?void 0:null!=e&&e instanceof HTMLElement},O=function(e){return P(e)||R(e)},P=function(e){return"collection"===N(e)&&e._private.single},R=function(e){return"collection"===N(e)&&!e._private.single},B=function(e){return"core"===N(e)},F=function(e){return"stylesheet"===N(e)},z=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},G=function(e){return function(e){return null!=e&&g(e)===T}(e)&&L(e.then)},Y=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join("$")});var n=function n(){var r,i=arguments,a=t.apply(this,i),o=n.cache;return(r=o[a])||(r=o[a]=e.apply(this,i)),r};return n.cache={},n},X=Y((function(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))})),V=Y((function(e){return e.replace(/(-\w)/g,(function(e){return e[1].toUpperCase()}))})),U=Y((function(e,t){return e+t[0].toUpperCase()+t.substring(1)}),(function(e,t){return e+"$"+t})),j=function(e){return z(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},q="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",H="rgb[a]?\\(("+q+"[%]?)\\s*,\\s*("+q+"[%]?)\\s*,\\s*("+q+"[%]?)(?:\\s*,\\s*("+q+"))?\\)",W="rgb[a]?\\((?:"+q+"[%]?)\\s*,\\s*(?:"+q+"[%]?)\\s*,\\s*(?:"+q+"[%]?)(?:\\s*,\\s*(?:"+q+"))?\\)",$="hsl[a]?\\(("+q+")\\s*,\\s*("+q+"[%])\\s*,\\s*("+q+"[%])(?:\\s*,\\s*("+q+"))?\\)",K="hsl[a]?\\((?:"+q+")\\s*,\\s*(?:"+q+"[%])\\s*,\\s*(?:"+q+"[%])(?:\\s*,\\s*(?:"+q+"))?\\)",Z=function(e,t){return e<t?-1:e>t?1:0},Q=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n<t.length;n++){var r=t[n];if(null!=r)for(var i=Object.keys(r),a=0;a<i.length;a++){var o=i[a];e[o]=r[o]}}return e},J=function(e){return(k(e)?e:null)||function(e){return ee[e.toLowerCase()]}(e)||function(e){if((4===e.length||7===e.length)&&"#"===e[0]){var t,n,r,i=16;return 4===e.length?(t=parseInt(e[1]+e[1],i),n=parseInt(e[2]+e[2],i),r=parseInt(e[3]+e[3],i)):(t=parseInt(e[1]+e[2],i),n=parseInt(e[3]+e[4],i),r=parseInt(e[5]+e[6],i)),[t,n,r]}}(e)||function(e){var t,n=new RegExp("^"+H+"$").exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var a=n[i];if("%"===a[a.length-1]&&(r[i]=!0),a=parseFloat(a),r[i]&&(a=a/100*255),a<0||a>255)return;t.push(Math.floor(a))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t}(e)||function(e){var t,n,r,i,a,o,s,l;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+$+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(i=parseFloat(c[3]))<0||i>100)return;if(i/=100,void 0!==(a=c[4])&&((a=parseFloat(a))<0||a>1))return;if(0===r)o=s=l=Math.round(255*i);else{var h=i<.5?i*(1+r):i+r-i*r,d=2*i-h;o=Math.round(255*u(d,h,n+1/3)),s=Math.round(255*u(d,h,n)),l=Math.round(255*u(d,h,n-1/3))}t=[o,s,l,a]}return t}(e)},ee={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},te=function(e){for(var t=e.map,n=e.keys,r=n.length,i=0;i<r;i++){var a=n[i];if(S(a))throw Error("Tried to set map with object key");i<n.length-1?(null==t[a]&&(t[a]={}),t=t[a]):t[a]=e.value}},ne=function(e){for(var t=e.map,n=e.keys,r=n.length,i=0;i<r;i++){var a=n[i];if(S(a))throw Error("Tried to get map with object key");if(null==(t=t[a]))return t}return t},re=w?w.performance:null,ie=re&&re.now?function(){return re.now()}:function(){return Date.now()},ae=function(){if(w){if(w.requestAnimationFrame)return function(e){w.requestAnimationFrame(e)};if(w.mozRequestAnimationFrame)return function(e){w.mozRequestAnimationFrame(e)};if(w.webkitRequestAnimationFrame)return function(e){w.webkitRequestAnimationFrame(e)};if(w.msRequestAnimationFrame)return function(e){w.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(ie())}),1e3/60)}}(),oe=function(e){return ae(e)},se=ie,le=9261,ue=5381,ce=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:le;!(t=e.next()).done;)n=65599*n+t.value|0;return n},he=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:le)+e|0},de=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue;return(t<<5)+t+e|0},pe=function(e){return 2097152*e[0]+e[1]},ge=function(e,t){return[he(e[0],t[0]),de(e[1],t[1])]},fe=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return ce({next:function(){return r<i?n.value=e.charCodeAt(r++):n.done=!0,n}},t)},ve=function(){return ye(arguments)},ye=function(e){for(var t,n=0;n<e.length;n++){var r=e[n];t=0===n?fe(r):fe(r,t)}return t},me=!0,be=null!=console.warn,xe=null!=console.trace,we=Number.MAX_SAFE_INTEGER||9007199254740991,Ee=function(){return!0},_e=function(){return!1},Te=function(){return 0},De=function(){},Ce=function(e){throw new Error(e)},Ne=function(e){if(void 0===e)return me;me=!!e},Ae=function(e){Ne()&&(be?console.warn(e):(console.log(e),xe&&console.trace()))},Le=function(e){return null==e?e:k(e)?e.slice():S(e)?function(e){return Q({},e)}(e):e},ke=function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t},Se={},Ie=function(){return Se},Me=function(e){var t=Object.keys(e);return function(n){for(var r={},i=0;i<t.length;i++){var a=t[i],o=null==n?void 0:n[a];r[a]=void 0===o?e[a]:o}return r}},Oe=function(e,t,n){for(var r=e.length-1;r>=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},Pe=function(e){e.splice(0,e.length)},Re=function(e,t,n){return n&&(t=U(n,t)),e[t]},Be=function(e,t,n,r){n&&(t=U(n,t)),e[t]=r},Fe="undefined"!=typeof Map?Map:function(){function e(){f(this,e),this._obj={}}return y(e,[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}]),e}(),ze=function(){function e(t){if(f(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r<n.length;r++)this.add(n[r])}}return y(e,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(e){var t=this._obj;1!==t[e]&&(t[e]=1,this.size++)}},{key:"delete",value:function(e){var t=this._obj;1===t[e]&&(t[e]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(e){return 1===this._obj[e]}},{key:"toArray",value:function(){var e=this;return Object.keys(this._obj).filter((function(t){return e.has(t)}))}},{key:"forEach",value:function(e,t){return this.toArray().forEach(e,t)}}]),e}(),Ge="undefined"!==("undefined"==typeof Set?"undefined":g(Set))?Set:ze,Ye=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&B(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new Ge,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),t.renderedPosition){var a=t.renderedPosition,o=e.pan(),s=e.zoom();i.position={x:(a.x-o.x)/s,y:(a.y-o.y)/s}}var l=[];k(t.classes)?l=t.classes:A(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;u<c;u++){var h=l[u];h&&""!==h&&i.classes.add(h)}this.createEmitter();var d=t.style||t.css;d&&(Ae("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(d)),(void 0===n||n)&&this.restore()}else Ce("An element must be of type `nodes` or `edges`; you specified `"+r+"`")}else Ce("An element must have a core reference and parameters set")},Xe=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(t,n,r){var i;S(t)&&!O(t)&&(t=(i=t).roots||i.root,n=i.visit,r=i.directed),r=2!==arguments.length||L(n)?r:n,n=L(n)?n:function(){};for(var a,o=this._private.cy,s=t=A(t)?this.filter(t):t,l=[],u=[],c={},h={},d={},p=0,g=this.byGroup(),f=g.nodes,v=g.edges,y=0;y<s.length;y++){var m=s[y],b=m.id();m.isNode()&&(l.unshift(m),e.bfs&&(d[b]=!0,u.push(m)),h[b]=0)}for(var x=function(){var t=e.bfs?l.shift():l.pop(),i=t.id();if(e.dfs){if(d[i])return"continue";d[i]=!0,u.push(t)}var o,s=h[i],g=c[i],y=null!=g?g.source():null,m=null!=g?g.target():null,b=null==g?void 0:t.same(y)?m[0]:y[0];if(!0===(o=n(t,g,b,p++,s)))return a=t,"break";if(!1===o)return"break";for(var x=t.connectedEdges().filter((function(e){return(!r||e.source().same(t))&&v.has(e)})),w=0;w<x.length;w++){var E=x[w],_=E.connectedNodes().filter((function(e){return!e.same(t)&&f.has(e)})),T=_.id();0===_.length||d[T]||(_=_[0],l.push(_),e.bfs&&(d[T]=!0,u.push(_)),c[T]=E,h[T]=h[i]+1)}};0!==l.length;){var w=x();if("continue"!==w&&"break"===w)break}for(var E=o.collection(),_=0;_<u.length;_++){var T=u[_],D=c[T.id()];null!=D&&E.push(D),E.push(T)}return{path:o.collection(E),found:o.collection(a)}}},Ve={breadthFirstSearch:Xe({bfs:!0}),depthFirstSearch:Xe({dfs:!0})};Ve.bfs=Ve.breadthFirstSearch,Ve.dfs=Ve.depthFirstSearch;var Ue=Me({root:null,weight:function(e){return 1},directed:!1}),je={dijkstra:function(e){if(!S(e)){var t=arguments;e={root:t[0],weight:t[1],directed:t[2]}}var n=Ue(e),r=n.root,i=n.weight,a=n.directed,o=this,s=i,l=A(r)?this.filter(r)[0]:r[0],u={},h={},d={},p=this.byGroup(),g=p.nodes,f=p.edges;f.unmergeBy((function(e){return e.isLoop()}));for(var v=function(e){return u[e.id()]},y=function(e,t){u[e.id()]=t,m.updateItem(e)},m=new c.default((function(e,t){return v(e)-v(t)})),b=0;b<g.length;b++){var x=g[b];u[x.id()]=x.same(l)?0:1/0,m.push(x)}for(var w=function(e,t){for(var n,r=(a?e.edgesTo(t):e.edgesWith(t)).intersect(f),i=1/0,o=0;o<r.length;o++){var l=r[o],u=s(l);(u<i||!n)&&(i=u,n=l)}return{edge:n,dist:i}};m.size()>0;){var E=m.pop(),_=v(E),T=E.id();if(d[T]=_,_!==1/0)for(var D=E.neighborhood().intersect(g),C=0;C<D.length;C++){var N=D[C],L=N.id(),k=w(E,N),I=_+k.dist;I<v(N)&&(y(N,I),h[L]={node:E,edge:k.edge})}}return{distanceTo:function(e){var t=A(e)?g.filter(e)[0]:e[0];return d[t.id()]},pathTo:function(e){var t=A(e)?g.filter(e)[0]:e[0],n=[],r=t,i=r.id();if(t.length>0)for(n.unshift(t);h[i];){var a=h[i];n.unshift(a.edge),n.unshift(a.node),i=(r=a.node).id()}return o.spawn(n)}}}},qe={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,i=n.length,a=new Array(i),o=n,s=function(e){for(var t=0;t<a.length;t++){if(a[t].has(e))return t}},l=0;l<i;l++)a[l]=this.spawn(n[l]);for(var u=r.sort((function(t,n){return e(t)-e(n)})),c=0;c<u.length;c++){var h=u[c],d=h.source()[0],p=h.target()[0],g=s(d),f=s(p),v=a[g],y=a[f];g!==f&&(o.merge(h),v.merge(y),a.splice(f,1))}return o}},He=Me({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),We={aStar:function(e){var t=this.cy(),n=He(e),r=n.root,i=n.goal,a=n.heuristic,o=n.directed,s=n.weight;r=t.collection(r)[0],i=t.collection(i)[0];var l,u,h=r.id(),d=i.id(),p={},g={},f={},v=new c.default((function(e,t){return g[e.id()]-g[t.id()]})),y=new Ge,m={},b={},x=function(e,t){v.push(e),y.add(t)};x(r,h),p[h]=0,g[h]=a(r);for(var w,E=0;v.size()>0;){if(l=v.pop(),u=l.id(),y.delete(u),E++,u===d){for(var _=[],T=i,D=d,C=b[D];_.unshift(T),null!=C&&_.unshift(C),null!=(T=m[D]);)C=b[D=T.id()];return{found:!0,distance:p[u],path:this.spawn(_),steps:E}}f[u]=!0;for(var N=l._private.edges,A=0;A<N.length;A++){var L=N[A];if(this.hasElementWithId(L.id())&&(!o||L.data("source")===u)){var k=L.source(),S=L.target(),I=k.id()!==u?k:S,M=I.id();if(this.hasElementWithId(M)&&!f[M]){var O=p[u]+s(L);w=M,y.has(w)?O<p[M]&&(p[M]=O,g[M]=O+a(I),m[M]=l,b[M]=L):(p[M]=O,g[M]=O+a(I),x(I,M),m[M]=l,b[M]=L)}}}}return{found:!1,distance:void 0,path:void 0,steps:E}}},$e=Me({weight:function(e){return 1},directed:!1}),Ke={floydWarshall:function(e){for(var t=this.cy(),n=$e(e),r=n.weight,i=n.directed,a=r,o=this.byGroup(),s=o.nodes,l=o.edges,u=s.length,c=u*u,h=function(e){return s.indexOf(e)},d=function(e){return s[e]},p=new Array(c),g=0;g<c;g++){var f=g%u,v=(g-f)/u;p[g]=v===f?0:1/0}for(var y=new Array(c),m=new Array(c),b=0;b<l.length;b++){var x=l[b],w=x.source()[0],E=x.target()[0];if(w!==E){var _=h(w),T=h(E),D=_*u+T,C=a(x);if(p[D]>C&&(p[D]=C,y[D]=T,m[D]=x),!i){var N=T*u+_;!i&&p[N]>C&&(p[N]=C,y[N]=_,m[N]=x)}}}for(var L=0;L<u;L++)for(var k=0;k<u;k++)for(var S=k*u+L,I=0;I<u;I++){var M=k*u+I,O=L*u+I;p[S]+p[O]<p[M]&&(p[M]=p[S]+p[O],y[M]=y[S])}var P=function(e){return h(function(e){return(A(e)?t.filter(e):e)[0]}(e))},R={distance:function(e,t){var n=P(e),r=P(t);return p[n*u+r]},path:function(e,n){var r=P(e),i=P(n),a=d(r);if(r===i)return a.collection();if(null==y[r*u+i])return t.collection();var o,s=t.collection(),l=r;for(s.merge(a);r!==i;)l=r,r=y[r*u+i],o=m[l*u+r],s.merge(o),s.merge(d(r));return s}};return R}},Ze=Me({weight:function(e){return 1},directed:!1,root:null}),Qe={bellmanFord:function(e){var t=this,n=Ze(e),r=n.weight,i=n.directed,a=n.root,o=r,s=this,l=this.cy(),u=this.byGroup(),c=u.edges,h=u.nodes,d=h.length,p=new Fe,g=!1,f=[];a=l.collection(a)[0],c.unmergeBy((function(e){return e.isLoop()}));for(var v=c.length,y=function(e){var t=p.get(e.id());return t||(t={},p.set(e.id(),t)),t},m=function(e){return(A(e)?l.$(e):e)[0]},b=0;b<d;b++){var x=h[b],w=y(x);x.same(a)?w.dist=0:w.dist=1/0,w.pred=null,w.edge=null}for(var E=!1,_=function(e,t,n,r,i,a){var o=r.dist+a;o<i.dist&&!n.same(r.edge)&&(i.dist=o,i.pred=e,i.edge=n,E=!0)},T=1;T<d;T++){E=!1;for(var D=0;D<v;D++){var C=c[D],N=C.source(),L=C.target(),k=o(C),S=y(N),I=y(L);_(N,0,C,S,I,k),i||_(L,0,C,I,S,k)}if(!E)break}if(E)for(var M=[],O=0;O<v;O++){var P=c[O],R=P.source(),B=P.target(),F=o(P),z=y(R).dist,G=y(B).dist;if(z+F<G||!i&&G+F<z){if(g||(Ae("Graph contains a negative weight cycle for Bellman-Ford"),g=!0),!1===e.findNegativeWeightCycles)break;var Y=[];z+F<G&&Y.push(R),!i&&G+F<z&&Y.push(B);for(var X=Y.length,V=0;V<X;V++){var U=Y[V],j=[U];j.push(y(U).edge);for(var q=y(U).pred;-1===j.indexOf(q);)j.push(q),j.push(y(q).edge),q=y(q).pred;for(var H=(j=j.slice(j.indexOf(q)))[0].id(),W=0,$=2;$<j.length;$+=2)j[$].id()<H&&(H=j[$].id(),W=$);(j=j.slice(W).concat(j.slice(0,W))).push(j[0]);var K=j.map((function(e){return e.id()})).join(",");-1===M.indexOf(K)&&(f.push(s.spawn(j)),M.push(K))}}}return{distanceTo:function(e){return y(m(e)).dist},pathTo:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,r=[],i=m(e);;){if(null==i)return t.spawn();var o=y(i),l=o.edge,u=o.pred;if(r.unshift(i[0]),i.same(n)&&r.length>0)break;null!=l&&r.unshift(l),i=u}return s.spawn(r)},hasNegativeWeightCycle:g,negativeWeightCycles:f}}},Je=Math.sqrt(2),et=function(e,t,n){0===n.length&&Ce("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],i=r[1],a=r[2],o=t[i],s=t[a],l=n,u=l.length-1;u>=0;u--){var c=l[u],h=c[1],d=c[2];(t[h]===o&&t[d]===s||t[h]===s&&t[d]===o)&&l.splice(u,1)}for(var p=0;p<l.length;p++){var g=l[p];g[1]===s?(l[p]=g.slice(),l[p][1]=o):g[2]===s&&(l[p]=g.slice(),l[p][2]=o)}for(var f=0;f<t.length;f++)t[f]===s&&(t[f]=o);return l},tt=function(e,t,n,r){for(;n>r;){var i=Math.floor(Math.random()*t.length);t=et(i,e,t),n--}return t},nt={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var i=n.length,a=r.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/Je);if(!(i<2)){for(var l=[],u=0;u<a;u++){var c=r[u];l.push([u,n.indexOf(c.source()),n.indexOf(c.target())])}for(var h=1/0,d=[],p=new Array(i),g=new Array(i),f=new Array(i),v=function(e,t){for(var n=0;n<i;n++)t[n]=e[n]},y=0;y<=o;y++){for(var m=0;m<i;m++)g[m]=m;var b=tt(g,l.slice(),i,s),x=b.slice();v(g,f);var w=tt(g,b,s,2),E=tt(f,x,s,2);w.length<=E.length&&w.length<h?(h=w.length,d=w,v(g,p)):E.length<=w.length&&E.length<h&&(h=E.length,d=E,v(f,p))}for(var _=this.spawn(d.map((function(e){return r[e[0]]}))),T=this.spawn(),D=this.spawn(),C=p[0],N=0;N<p.length;N++){var A=p[N],L=n[N];A===C?T.merge(L):D.merge(L)}var k=function(t){var n=e.spawn();return t.forEach((function(t){n.merge(t),t.connectedEdges().forEach((function(t){e.contains(t)&&!_.contains(t)&&n.merge(t)}))})),n},S=[k(T),k(D)];return{cut:_,components:S,partition1:T,partition2:D}}Ce("At least 2 nodes are required for Karger-Stein algorithm")}},rt=function(e,t,n){return{x:e.x*t+n.x,y:e.y*t+n.y}},it=function(e,t,n){return{x:(e.x-n.x)/t,y:(e.y-n.y)/t}},at=function(e){return{x:e[0],y:e[1]}},ot=function(e,t){return Math.atan2(t,e)-Math.PI/2},st=Math.log2||function(e){return Math.log(e)/Math.log(2)},lt=function(e){return e>0?1:e<0?-1:0},ut=function(e,t){return Math.sqrt(ct(e,t))},ct=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},ht=function(e){for(var t=e.length,n=0,r=0;r<t;r++)n+=e[r];for(var i=0;i<t;i++)e[i]=e[i]/n;return e},dt=function(e,t,n,r){return(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n},pt=function(e,t,n,r){return{x:dt(e.x,t.x,n.x,r),y:dt(e.y,t.y,n.y,r)}},gt=function(e,t,n){return Math.max(e,Math.min(n,t))},ft=function(e){if(null==e)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(null!=e.x1&&null!=e.y1){if(null!=e.x2&&null!=e.y2&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},vt=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},yt=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},mt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},bt=function(e){var t,n,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===a.length)t=n=r=i=a[0];else if(2===a.length)t=r=a[0],i=n=a[1];else if(4===a.length){var o=b(a,4);t=o[0],n=o[1],r=o[2],i=o[3]}return e.x1-=i,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},xt=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},wt=function(e,t){return!(e.x1>t.x2)&&(!(t.x1>e.x2)&&(!(e.x2<t.x1)&&(!(t.x2<e.x1)&&(!(e.y2<t.y1)&&(!(t.y2<e.y1)&&(!(e.y1>t.y2)&&!(t.y1>e.y2)))))))},Et=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},_t=function(e,t){return Et(e,t.x1,t.y1)&&Et(e,t.x2,t.y2)},Tt=function(e,t,n,r,i,a,o){var s,l=Xt(i,a),u=i/2,c=a/2,h=r-c-o;if((s=Rt(e,t,n,r,n-u+l-o,h,n+u-l+o,h,!1)).length>0)return s;var d=n+u+o;if((s=Rt(e,t,n,r,d,r-c+l-o,d,r+c-l+o,!1)).length>0)return s;var p=r+c+o;if((s=Rt(e,t,n,r,n-u+l-o,p,n+u-l+o,p,!1)).length>0)return s;var g,f=n-u-o;if((s=Rt(e,t,n,r,f,r-c+l-o,f,r+c-l+o,!1)).length>0)return s;var v=n-u+l,y=r-c+l;if((g=Ot(e,t,n,r,v,y,l+o)).length>0&&g[0]<=v&&g[1]<=y)return[g[0],g[1]];var m=n+u-l,b=r-c+l;if((g=Ot(e,t,n,r,m,b,l+o)).length>0&&g[0]>=m&&g[1]<=b)return[g[0],g[1]];var x=n+u-l,w=r+c-l;if((g=Ot(e,t,n,r,x,w,l+o)).length>0&&g[0]>=x&&g[1]>=w)return[g[0],g[1]];var E=n-u+l,_=r+c-l;return(g=Ot(e,t,n,r,E,_,l+o)).length>0&&g[0]<=E&&g[1]>=_?[g[0],g[1]]:[]},Dt=function(e,t,n,r,i,a,o){var s=o,l=Math.min(n,i),u=Math.max(n,i),c=Math.min(r,a),h=Math.max(r,a);return l-s<=e&&e<=u+s&&c-s<=t&&t<=h+s},Ct=function(e,t,n,r,i,a,o,s,l){var u=Math.min(n,o,i)-l,c=Math.max(n,o,i)+l,h=Math.min(r,s,a)-l,d=Math.max(r,s,a)+l;return!(e<u||e>c||t<h||t>d)},Nt=function(e,t,n,r,i,a,o,s){var l=[];!function(e,t,n,r,i){var a,o,s,l,u,c,h,d;0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),a=(o=(3*n-t*t)/9)*o*o+(s/=54)*s,i[1]=0,h=t/3,a>0?(u=(u=s+Math.sqrt(a))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=(c=s-Math.sqrt(a))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-h+u+c,h+=(u+c)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-c+u)/2,i[3]=h,i[5]=-h):(i[5]=i[3]=0,0===a?(d=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*d-h,i[4]=i[2]=-(d+h)):(l=(o=-o)*o*o,l=Math.acos(s/Math.sqrt(l)),d=2*Math.sqrt(o),i[0]=-h+d*Math.cos(l/3),i[2]=-h+d*Math.cos((l+2*Math.PI)/3),i[4]=-h+d*Math.cos((l+4*Math.PI)/3)))}(1*n*n-4*n*i+2*n*o+4*i*i-4*i*o+o*o+r*r-4*r*a+2*r*s+4*a*a-4*a*s+s*s,9*n*i-3*n*n-3*n*o-6*i*i+3*i*o+9*r*a-3*r*r-3*r*s-6*a*a+3*a*s,3*n*n-6*n*i+n*o-n*e+2*i*i+2*i*e-o*e+3*r*r-6*r*a+r*s-r*t+2*a*a+2*a*t-s*t,1*n*i-n*n+n*e-i*e+r*a-r*r+r*t-a*t,l);for(var u=[],c=0;c<6;c+=2)Math.abs(l[c+1])<1e-7&&l[c]>=0&&l[c]<=1&&u.push(l[c]);u.push(1),u.push(0);for(var h,d,p,g=-1,f=0;f<u.length;f++)h=Math.pow(1-u[f],2)*n+2*(1-u[f])*u[f]*i+u[f]*u[f]*o,d=Math.pow(1-u[f],2)*r+2*(1-u[f])*u[f]*a+u[f]*u[f]*s,p=Math.pow(h-e,2)+Math.pow(d-t,2),g>=0?p<g&&(g=p):g=p;return g},At=function(e,t,n,r,i,a){var o=[e-n,t-r],s=[i-n,a-r],l=s[0]*s[0]+s[1]*s[1],u=o[0]*o[0]+o[1]*o[1],c=o[0]*s[0]+o[1]*s[1],h=c*c/l;return c<0?u:h>l?(e-i)*(e-i)+(t-a)*(t-a):u-h},Lt=function(e,t,n){for(var r,i,a,o,s=0,l=0;l<n.length/2;l++)if(r=n[2*l],i=n[2*l+1],l+1<n.length/2?(a=n[2*(l+1)],o=n[2*(l+1)+1]):(a=n[2*(l+1-n.length/2)],o=n[2*(l+1-n.length/2)+1]),r==e&&a==e);else{if(!(r>=e&&e>=a||r<=e&&e<=a))continue;(e-r)/(a-r)*(o-i)+i>t&&s++}return s%2!=0},kt=function(e,t,n,r,i,a,o,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var h,d=Math.cos(-u),p=Math.sin(-u),g=0;g<c.length/2;g++)c[2*g]=a/2*(n[2*g]*d-n[2*g+1]*p),c[2*g+1]=o/2*(n[2*g+1]*d+n[2*g]*p),c[2*g]+=r,c[2*g+1]+=i;if(l>0){var f=It(c,-l);h=St(f)}else h=c;return Lt(e,t,h)},St=function(e){for(var t,n,r,i,a,o,s,l,u=new Array(e.length/2),c=0;c<e.length/4;c++){t=e[4*c],n=e[4*c+1],r=e[4*c+2],i=e[4*c+3],c<e.length/4-1?(a=e[4*(c+1)],o=e[4*(c+1)+1],s=e[4*(c+1)+2],l=e[4*(c+1)+3]):(a=e[0],o=e[1],s=e[2],l=e[3]);var h=Rt(t,n,r,i,a,o,s,l,!0);u[2*c]=h[0],u[2*c+1]=h[1]}return u},It=function(e,t){for(var n,r,i,a,o=new Array(2*e.length),s=0;s<e.length/2;s++){n=e[2*s],r=e[2*s+1],s<e.length/2-1?(i=e[2*(s+1)],a=e[2*(s+1)+1]):(i=e[0],a=e[1]);var l=a-r,u=-(i-n),c=Math.sqrt(l*l+u*u),h=l/c,d=u/c;o[4*s]=n+h*t,o[4*s+1]=r+d*t,o[4*s+2]=i+h*t,o[4*s+3]=a+d*t}return o},Mt=function(e,t,n,r,i,a,o){return e-=i,t-=a,(e/=n/2+o)*e+(t/=r/2+o)*t<=1},Ot=function(e,t,n,r,i,a,o){var s=[n-e,r-t],l=[e-i,t-a],u=s[0]*s[0]+s[1]*s[1],c=2*(l[0]*s[0]+l[1]*s[1]),h=c*c-4*u*(l[0]*l[0]+l[1]*l[1]-o*o);if(h<0)return[];var d=(-c+Math.sqrt(h))/(2*u),p=(-c-Math.sqrt(h))/(2*u),g=Math.min(d,p),f=Math.max(d,p),v=[];if(g>=0&&g<=1&&v.push(g),f>=0&&f<=1&&v.push(f),0===v.length)return[];var y=v[0]*s[0]+e,m=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[y,m]:[y,m,v[1]*s[0]+e,v[1]*s[1]+t]:[y,m]},Pt=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},Rt=function(e,t,n,r,i,a,o,s,l){var u=e-i,c=n-e,h=o-i,d=t-a,p=r-t,g=s-a,f=h*d-g*u,v=c*d-p*u,y=g*c-h*p;if(0!==y){var m=f/y,b=v/y,x=-.001;return x<=m&&m<=1.001&&x<=b&&b<=1.001||l?[e+m*c,t+m*p]:[]}return 0===f||0===v?Pt(e,n,o)===o?[o,s]:Pt(e,n,i)===i?[i,a]:Pt(i,o,n)===n?[n,r]:[]:[]},Bt=function(e,t,n,r,i,a,o,s){var l,u,c,h,d,p,g=[],f=new Array(n.length),v=!0;if(null==a&&(v=!1),v){for(var y=0;y<f.length/2;y++)f[2*y]=n[2*y]*a+r,f[2*y+1]=n[2*y+1]*o+i;if(s>0){var m=It(f,-s);u=St(m)}else u=f}else u=n;for(var b=0;b<u.length/2;b++)c=u[2*b],h=u[2*b+1],b<u.length/2-1?(d=u[2*(b+1)],p=u[2*(b+1)+1]):(d=u[0],p=u[1]),0!==(l=Rt(e,t,r,i,c,h,d,p)).length&&g.push(l[0],l[1]);return g},Ft=function(e,t,n){var r=[e[0]-t[0],e[1]-t[1]],i=Math.sqrt(r[0]*r[0]+r[1]*r[1]),a=(i-n)/i;return a<0&&(a=1e-5),[t[0]+a*r[0],t[1]+a*r[1]]},zt=function(e,t){var n=Yt(e,t);return n=Gt(n)},Gt=function(e){for(var t,n,r=e.length/2,i=1/0,a=1/0,o=-1/0,s=-1/0,l=0;l<r;l++)t=e[2*l],n=e[2*l+1],i=Math.min(i,t),o=Math.max(o,t),a=Math.min(a,n),s=Math.max(s,n);for(var u=2/(o-i),c=2/(s-a),h=0;h<r;h++)t=e[2*h]=e[2*h]*u,n=e[2*h+1]=e[2*h+1]*c,i=Math.min(i,t),o=Math.max(o,t),a=Math.min(a,n),s=Math.max(s,n);if(a<-1)for(var d=0;d<r;d++)n=e[2*d+1]=e[2*d+1]+(-1-a);return e},Yt=function(e,t){var n=1/e*2*Math.PI,r=e%2==0?Math.PI/2+n/2:Math.PI/2;r+=t;for(var i,a=new Array(2*e),o=0;o<e;o++)i=o*n+r,a[2*o]=Math.cos(i),a[2*o+1]=Math.sin(-i);return a},Xt=function(e,t){return Math.min(e/4,t/4,8)},Vt=function(e,t){return Math.min(e/10,t/10,8)},Ut=function(e,t){return{heightOffset:Math.min(15,.05*t),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},jt=Me({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),qt={pageRank:function(e){for(var t=jt(e),n=t.dampingFactor,r=t.precision,i=t.iterations,a=t.weight,o=this._private.cy,s=this.byGroup(),l=s.nodes,u=s.edges,c=l.length,h=c*c,d=u.length,p=new Array(h),g=new Array(c),f=(1-n)/c,v=0;v<c;v++){for(var y=0;y<c;y++){p[v*c+y]=0}g[v]=0}for(var m=0;m<d;m++){var b=u[m],x=b.data("source"),w=b.data("target");if(x!==w){var E=l.indexOfId(x),_=l.indexOfId(w),T=a(b);p[_*c+E]+=T,g[E]+=T}}for(var D=1/c+f,C=0;C<c;C++)if(0===g[C])for(var N=0;N<c;N++){p[N*c+C]=D}else for(var A=0;A<c;A++){var L=A*c+C;p[L]=p[L]/g[C]+f}for(var k,S=new Array(c),I=new Array(c),M=0;M<c;M++)S[M]=1;for(var O=0;O<i;O++){for(var P=0;P<c;P++)I[P]=0;for(var R=0;R<c;R++)for(var B=0;B<c;B++){var F=R*c+B;I[R]+=p[F]*S[B]}ht(I),k=S,S=I,I=k;for(var z=0,G=0;G<c;G++){var Y=k[G]-S[G];z+=Y*Y}if(z<r)break}return{rank:function(e){return e=o.collection(e)[0],S[l.indexOf(e)]}}}},Ht=Me({root:null,weight:function(e){return 1},directed:!1,alpha:0}),Wt={degreeCentralityNormalized:function(e){e=Ht(e);var t=this.cy(),n=this.nodes(),r=n.length;if(e.directed){for(var i={},a={},o=0,s=0,l=0;l<r;l++){var u=n[l],c=u.id();e.root=u;var h=this.degreeCentrality(e);o<h.indegree&&(o=h.indegree),s<h.outdegree&&(s=h.outdegree),i[c]=h.indegree,a[c]=h.outdegree}return{indegree:function(e){return 0==o?0:(A(e)&&(e=t.filter(e)),i[e.id()]/o)},outdegree:function(e){return 0===s?0:(A(e)&&(e=t.filter(e)),a[e.id()]/s)}}}for(var d={},p=0,g=0;g<r;g++){var f=n[g];e.root=f;var v=this.degreeCentrality(e);p<v.degree&&(p=v.degree),d[f.id()]=v.degree}return{degree:function(e){return 0===p?0:(A(e)&&(e=t.filter(e)),d[e.id()]/p)}}},degreeCentrality:function(e){e=Ht(e);var t=this.cy(),n=this,r=e,i=r.root,a=r.weight,o=r.directed,s=r.alpha;if(i=t.collection(i)[0],o){for(var l=i.connectedEdges(),u=l.filter((function(e){return e.target().same(i)&&n.has(e)})),c=l.filter((function(e){return e.source().same(i)&&n.has(e)})),h=u.length,d=c.length,p=0,g=0,f=0;f<u.length;f++)p+=a(u[f]);for(var v=0;v<c.length;v++)g+=a(c[v]);return{indegree:Math.pow(h,1-s)*Math.pow(p,s),outdegree:Math.pow(d,1-s)*Math.pow(g,s)}}for(var y=i.connectedEdges().intersection(n),m=y.length,b=0,x=0;x<y.length;x++)b+=a(y[x]);return{degree:Math.pow(m,1-s)*Math.pow(b,s)}}};Wt.dc=Wt.degreeCentrality,Wt.dcn=Wt.degreeCentralityNormalised=Wt.degreeCentralityNormalized;var $t=Me({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),Kt={closenessCentralityNormalized:function(e){for(var t=$t(e),n=t.harmonic,r=t.weight,i=t.directed,a=this.cy(),o={},s=0,l=this.nodes(),u=this.floydWarshall({weight:r,directed:i}),c=0;c<l.length;c++){for(var h=0,d=l[c],p=0;p<l.length;p++)if(c!==p){var g=u.distance(d,l[p]);h+=n?1/g:g}n||(h=1/h),s<h&&(s=h),o[d.id()]=h}return{closeness:function(e){return 0==s?0:(e=A(e)?a.filter(e)[0].id():e.id(),o[e]/s)}}},closenessCentrality:function(e){var t=$t(e),n=t.root,r=t.weight,i=t.directed,a=t.harmonic;n=this.filter(n)[0];for(var o=this.dijkstra({root:n,weight:r,directed:i}),s=0,l=this.nodes(),u=0;u<l.length;u++){var c=l[u];if(!c.same(n)){var h=o.distanceTo(c);s+=a?1/h:h}}return a?s:1/s}};Kt.cc=Kt.closenessCentrality,Kt.ccn=Kt.closenessCentralityNormalised=Kt.closenessCentralityNormalized;var Zt=Me({weight:null,directed:!1}),Qt={betweennessCentrality:function(e){for(var t=Zt(e),n=t.directed,r=t.weight,i=null!=r,a=this.cy(),o=this.nodes(),s={},l={},u=0,h=function(e,t){l[e]=t,t>u&&(u=t)},d=function(e){return l[e]},p=0;p<o.length;p++){var g=o[p],f=g.id();s[f]=n?g.outgoers().nodes():g.openNeighborhood().nodes(),h(f,0)}for(var v=function(e){for(var t=o[e].id(),n=[],l={},u={},p={},g=new c.default((function(e,t){return p[e]-p[t]})),f=0;f<o.length;f++){var v=o[f].id();l[v]=[],u[v]=0,p[v]=1/0}for(u[t]=1,p[t]=0,g.push(t);!g.empty();){var y=g.pop();if(n.push(y),i)for(var m=0;m<s[y].length;m++){var b=s[y][m],x=a.getElementById(y),w=void 0;w=x.edgesTo(b).length>0?x.edgesTo(b)[0]:b.edgesTo(x)[0];var E=r(w);b=b.id(),p[b]>p[y]+E&&(p[b]=p[y]+E,g.nodes.indexOf(b)<0?g.push(b):g.updateItem(b),u[b]=0,l[b]=[]),p[b]==p[y]+E&&(u[b]=u[b]+u[y],l[b].push(y))}else for(var _=0;_<s[y].length;_++){var T=s[y][_].id();p[T]==1/0&&(g.push(T),p[T]=p[y]+1),p[T]==p[y]+1&&(u[T]=u[T]+u[y],l[T].push(y))}}for(var D={},C=0;C<o.length;C++)D[o[C].id()]=0;for(;n.length>0;){for(var N=n.pop(),A=0;A<l[N].length;A++){var L=l[N][A];D[L]=D[L]+u[L]/u[N]*(1+D[N])}N!=o[e].id()&&h(N,d(N)+D[N])}},y=0;y<o.length;y++)v(y);var m={betweenness:function(e){var t=a.collection(e).id();return d(t)},betweennessNormalized:function(e){if(0==u)return 0;var t=a.collection(e).id();return d(t)/u}};return m.betweennessNormalised=m.betweennessNormalized,m}};Qt.bc=Qt.betweennessCentrality;var Jt=Me({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(e){return 1}]}),en=function(e,t){for(var n=0,r=0;r<t.length;r++)n+=t[r](e);return n},tn=function(e,t){for(var n,r=0;r<t;r++){n=0;for(var i=0;i<t;i++)n+=e[i*t+r];for(var a=0;a<t;a++)e[a*t+r]=e[a*t+r]/n}},nn=function(e,t,n){for(var r=new Array(n*n),i=0;i<n;i++){for(var a=0;a<n;a++)r[i*n+a]=0;for(var o=0;o<n;o++)for(var s=0;s<n;s++)r[i*n+s]+=e[i*n+o]*t[o*n+s]}return r},rn=function(e,t,n){for(var r=e.slice(0),i=1;i<n;i++)e=nn(e,r,t);return e},an=function(e,t,n){for(var r=new Array(t*t),i=0;i<t*t;i++)r[i]=Math.pow(e[i],n);return tn(r,t),r},on=function(e,t,n,r){for(var i=0;i<n;i++){if(Math.round(e[i]*Math.pow(10,r))/Math.pow(10,r)!==Math.round(t[i]*Math.pow(10,r))/Math.pow(10,r))return!1}return!0},sn=function(e,t){for(var n=0;n<e.length;n++)if(!t[n]||e[n].id()!==t[n].id())return!1;return!0},ln=function(e){for(var t=this.nodes(),n=this.edges(),r=this.cy(),i=function(e){return Jt(e)}(e),a={},o=0;o<t.length;o++)a[t[o].id()]=o;for(var s,l=t.length,u=l*l,c=new Array(u),h=0;h<u;h++)c[h]=0;for(var d=0;d<n.length;d++){var p=n[d],g=a[p.source().id()],f=a[p.target().id()],v=en(p,i.attributes);c[g*l+f]+=v,c[f*l+g]+=v}!function(e,t,n){for(var r=0;r<t;r++)e[r*t+r]=n}(c,l,i.multFactor),tn(c,l);for(var y=!0,m=0;y&&m<i.maxIterations;)y=!1,s=rn(c,l,i.expandFactor),c=an(s,l,i.inflateFactor),on(c,s,u,4)||(y=!0),m++;var b=function(e,t,n,r){for(var i=[],a=0;a<t;a++){for(var o=[],s=0;s<t;s++)Math.round(1e3*e[a*t+s])/1e3>0&&o.push(n[s]);0!==o.length&&i.push(r.collection(o))}return i}(c,l,t,r);return b=function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e.length;n++)t!=n&&sn(e[t],e[n])&&e.splice(n,1);return e}(b),b},un={markovClustering:ln,mcl:ln},cn=function(e){return e},hn=function(e,t){return Math.abs(t-e)},dn=function(e,t,n){return e+hn(t,n)},pn=function(e,t,n){return e+Math.pow(n-t,2)},gn=function(e){return Math.sqrt(e)},fn=function(e,t,n){return Math.max(e,hn(t,n))},vn=function(e,t,n,r,i){for(var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:cn,o=r,s=0;s<e;s++)o=i(o,t(s),n(s));return a(o)},yn={euclidean:function(e,t,n){return e>=2?vn(e,t,n,0,pn,gn):vn(e,t,n,0,dn)},squaredEuclidean:function(e,t,n){return vn(e,t,n,0,pn)},manhattan:function(e,t,n){return vn(e,t,n,0,dn)},max:function(e,t,n){return vn(e,t,n,-1/0,fn)}};function mn(e,t,n,r,i,a){var o;return o=L(e)?e:yn[e]||yn.euclidean,0===t&&L(e)?o(i,a):o(t,n,r,i,a)}yn["squared-euclidean"]=yn.squaredEuclidean,yn.squaredeuclidean=yn.squaredEuclidean;var bn=Me({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),xn=function(e){return bn(e)},wn=function(e,t,n,r,i){var a="kMedoids"!==i?function(e){return n[e]}:function(e){return r[e](n)},o=n,s=t;return mn(e,r.length,a,(function(e){return r[e](t)}),o,s)},En=function(e,t,n){for(var r=n.length,i=new Array(r),a=new Array(r),o=new Array(t),s=null,l=0;l<r;l++)i[l]=e.min(n[l]).value,a[l]=e.max(n[l]).value;for(var u=0;u<t;u++){s=[];for(var c=0;c<r;c++)s[c]=Math.random()*(a[c]-i[c])+i[c];o[u]=s}return o},_n=function(e,t,n,r,i){for(var a=1/0,o=0,s=0;s<t.length;s++){var l=wn(n,e,t[s],r,i);l<a&&(a=l,o=s)}return o},Tn=function(e,t,n){for(var r=[],i=null,a=0;a<t.length;a++)n[(i=t[a]).id()]===e&&r.push(i);return r},Dn=function(e,t,n){for(var r=0;r<e.length;r++)for(var i=0;i<e[r].length;i++){if(Math.abs(e[r][i]-t[r][i])>n)return!1}return!0},Cn=function(e,t,n){for(var r=0;r<n;r++)if(e===t[r])return!0;return!1},Nn=function(e,t){var n=new Array(t);if(e.length<50)for(var r=0;r<t;r++){for(var i=e[Math.floor(Math.random()*e.length)];Cn(i,n,r);)i=e[Math.floor(Math.random()*e.length)];n[r]=i}else for(var a=0;a<t;a++)n[a]=e[Math.floor(Math.random()*e.length)];return n},An=function(e,t,n){for(var r=0,i=0;i<t.length;i++)r+=wn("manhattan",t[i],e,n,"kMedoids");return r},Ln=function(e,t,n,r,i){for(var a,o,s=0;s<t.length;s++)for(var l=0;l<e.length;l++)r[s][l]=Math.pow(n[s][l],i.m);for(var u=0;u<e.length;u++)for(var c=0;c<i.attributes.length;c++){a=0,o=0;for(var h=0;h<t.length;h++)a+=r[h][u]*i.attributes[c](t[h]),o+=r[h][u];e[u][c]=a/o}},kn=function(e,t,n,r,i){for(var a=0;a<e.length;a++)t[a]=e[a].slice();for(var o,s,l,u=2/(i.m-1),c=0;c<n.length;c++)for(var h=0;h<r.length;h++){o=0;for(var d=0;d<n.length;d++)s=wn(i.distance,r[h],n[c],i.attributes,"cmeans"),l=wn(i.distance,r[h],n[d],i.attributes,"cmeans"),o+=Math.pow(s/l,u);e[h][c]=1/o}},Sn=function(e){var t,n,r,i,a,o=this.cy(),s=this.nodes(),l=xn(e);i=new Array(s.length);for(var u=0;u<s.length;u++)i[u]=new Array(l.k);r=new Array(s.length);for(var c=0;c<s.length;c++)r[c]=new Array(l.k);for(var h=0;h<s.length;h++){for(var d=0,p=0;p<l.k;p++)r[h][p]=Math.random(),d+=r[h][p];for(var g=0;g<l.k;g++)r[h][g]=r[h][g]/d}n=new Array(l.k);for(var f=0;f<l.k;f++)n[f]=new Array(l.attributes.length);a=new Array(s.length);for(var v=0;v<s.length;v++)a[v]=new Array(l.k);for(var y=!0,m=0;y&&m<l.maxIterations;)y=!1,Ln(n,s,r,a,l),kn(r,i,n,s,l),Dn(r,i,l.sensitivityThreshold)||(y=!0),m++;return t=function(e,t,n,r){for(var i,a,o=new Array(n.k),s=0;s<o.length;s++)o[s]=[];for(var l=0;l<t.length;l++){i=-1/0,a=-1;for(var u=0;u<t[0].length;u++)t[l][u]>i&&(i=t[l][u],a=u);o[a].push(e[l])}for(var c=0;c<o.length;c++)o[c]=r.collection(o[c]);return o}(s,r,l,o),{clusters:t,degreeOfMembership:r}},In={kMeans:function(e){var t,n=this.cy(),r=this.nodes(),i=null,a=xn(e),o=new Array(a.k),s={};a.testMode?"number"==typeof a.testCentroids?(a.testCentroids,t=En(r,a.k,a.attributes)):t="object"===g(a.testCentroids)?a.testCentroids:En(r,a.k,a.attributes):t=En(r,a.k,a.attributes);for(var l,u,c,h=!0,d=0;h&&d<a.maxIterations;){for(var p=0;p<r.length;p++)s[(i=r[p]).id()]=_n(i,t,a.distance,a.attributes,"kMeans");h=!1;for(var f=0;f<a.k;f++){var v=Tn(f,r,s);if(0!==v.length){for(var y=a.attributes.length,m=t[f],b=new Array(y),x=new Array(y),w=0;w<y;w++){x[w]=0;for(var E=0;E<v.length;E++)i=v[E],x[w]+=a.attributes[w](i);b[w]=x[w]/v.length,l=b[w],u=m[w],c=a.sensitivityThreshold,Math.abs(u-l)<=c||(h=!0)}t[f]=b,o[f]=n.collection(v)}}d++}return o},kMedoids:function(e){var t,n,r=this.cy(),i=this.nodes(),a=null,o=xn(e),s=new Array(o.k),l={},u=new Array(o.k);o.testMode?"number"==typeof o.testCentroids||(t="object"===g(o.testCentroids)?o.testCentroids:Nn(i,o.k)):t=Nn(i,o.k);for(var c=!0,h=0;c&&h<o.maxIterations;){for(var d=0;d<i.length;d++)l[(a=i[d]).id()]=_n(a,t,o.distance,o.attributes,"kMedoids");c=!1;for(var p=0;p<t.length;p++){var f=Tn(p,i,l);if(0!==f.length){u[p]=An(t[p],f,o.attributes);for(var v=0;v<f.length;v++)(n=An(f[v],f,o.attributes))<u[p]&&(u[p]=n,t[p]=f[v],c=!0);s[p]=r.collection(f)}}h++}return s},fuzzyCMeans:Sn,fcm:Sn},Mn=Me({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),On={single:"min",complete:"max"},Pn=function(e,t,n,r,i){for(var a,o=0,s=1/0,l=i.attributes,u=function(e,t){return mn(i.distance,l.length,(function(t){return l[t](e)}),(function(e){return l[e](t)}),e,t)},c=0;c<e.length;c++){var h=e[c].key,d=n[h][r[h]];d<s&&(o=h,s=d)}if("threshold"===i.mode&&s>=i.threshold||"dendrogram"===i.mode&&1===e.length)return!1;var p,g=t[o],f=t[r[o]];p="dendrogram"===i.mode?{left:g,right:f,key:g.key}:{value:g.value.concat(f.value),key:g.key},e[g.index]=p,e.splice(f.index,1),t[g.key]=p;for(var v=0;v<e.length;v++){var y=e[v];g.key===y.key?a=1/0:"min"===i.linkage?(a=n[g.key][y.key],n[g.key][y.key]>n[f.key][y.key]&&(a=n[f.key][y.key])):"max"===i.linkage?(a=n[g.key][y.key],n[g.key][y.key]<n[f.key][y.key]&&(a=n[f.key][y.key])):a="mean"===i.linkage?(n[g.key][y.key]*g.size+n[f.key][y.key]*f.size)/(g.size+f.size):"dendrogram"===i.mode?u(y.value,g.value):u(y.value[0],g.value[0]),n[g.key][y.key]=n[y.key][g.key]=a}for(var m=0;m<e.length;m++){var b=e[m].key;if(r[b]===g.key||r[b]===f.key){for(var x=b,w=0;w<e.length;w++){var E=e[w].key;n[b][E]<n[b][x]&&(x=E)}r[b]=x}e[m].index=m}return g.key=f.key=g.index=f.index=null,!0},Rn=function e(t,n,r){t&&(t.value?n.push(t.value):(t.left&&e(t.left,n),t.right&&e(t.right,n)))},Bn=function e(t,n){if(!t)return"";if(t.left&&t.right){var r=e(t.left,n),i=e(t.right,n),a=n.add({group:"nodes",data:{id:r+","+i}});return n.add({group:"edges",data:{source:r,target:a.id()}}),n.add({group:"edges",data:{source:i,target:a.id()}}),a.id()}return t.value?t.value.id():void 0},Fn=function e(t,n,r){if(!t)return[];var i=[],a=[],o=[];return 0===n?(t.left&&Rn(t.left,i),t.right&&Rn(t.right,a),o=i.concat(a),[r.collection(o)]):1===n?t.value?[r.collection(t.value)]:(t.left&&Rn(t.left,i),t.right&&Rn(t.right,a),[r.collection(i),r.collection(a)]):t.value?[r.collection(t.value)]:(t.left&&(i=e(t.left,n-1,r)),t.right&&(a=e(t.right,n-1,r)),i.concat(a))},zn=function(e){for(var t=this.cy(),n=this.nodes(),r=function(e){var t=Mn(e),n=On[t.linkage];return null!=n&&(t.linkage=n),t}(e),i=r.attributes,a=function(e,t){return mn(r.distance,i.length,(function(t){return i[t](e)}),(function(e){return i[e](t)}),e,t)},o=[],s=[],l=[],u=[],c=0;c<n.length;c++){var h={value:"dendrogram"===r.mode?n[c]:[n[c]],key:c,index:c};o[c]=h,u[c]=h,s[c]=[],l[c]=0}for(var d=0;d<o.length;d++)for(var p=0;p<=d;p++){var g=void 0;g="dendrogram"===r.mode?d===p?1/0:a(o[d].value,o[p].value):d===p?1/0:a(o[d].value[0],o[p].value[0]),s[d][p]=g,s[p][d]=g,g<s[d][l[d]]&&(l[d]=p)}for(var f,v=Pn(o,u,s,l,r);v;)v=Pn(o,u,s,l,r);return"dendrogram"===r.mode?(f=Fn(o[0],r.dendrogramDepth,t),r.addDendrogram&&Bn(o[0],t)):(f=new Array(o.length),o.forEach((function(e,n){e.key=e.index=null,f[n]=t.collection(e.value)}))),f},Gn={hierarchicalClustering:zn,hca:zn},Yn=Me({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),Xn=function(e,t,n,r){var i=function(e,t){return r[t](e)};return-mn(e,r.length,(function(e){return i(t,e)}),(function(e){return i(n,e)}),t,n)},Vn=function(e,t){var n=null;return n="median"===t?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n<e.length&&e.splice(n,e.length-n),t>0&&e.splice(0,t)):e=e.slice(t,n);for(var a=0,o=e.length-1;o>=0;o--){var s=e[o];i?isFinite(s)||(e[o]=-1/0,a++):e.splice(o,1)}r&&e.sort((function(e,t){return e-t}));var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+a]:(e[u-1+a]+e[u+a])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,i=0,a=t;a<n;a++){var o=e[a];isFinite(o)&&(r+=o,i++)}return r/i}(e):"min"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,i=t;i<n;i++){var a=e[i];isFinite(a)&&(r=Math.min(a,r))}return r}(e):"max"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,i=t;i<n;i++){var a=e[i];isFinite(a)&&(r=Math.max(a,r))}return r}(e):t,n},Un=function(e,t,n){for(var r=[],i=0;i<e;i++){for(var a=-1,o=-1/0,s=0;s<n.length;s++){var l=n[s];t[i*e+l]>o&&(a=l,o=t[i*e+l])}a>0&&r.push(a)}for(var u=0;u<n.length;u++)r[n[u]]=n[u];return r},jn=function(e){for(var t,n,r,i,a,o,s=this.cy(),l=this.nodes(),u=function(e){var t=e.damping,n=e.preference;.5<=t&&t<1||Ce("Damping must range on [0.5, 1). Got: ".concat(t));var r=["median","mean","min","max"];return r.some((function(e){return e===n}))||I(n)||Ce("Preference must be one of [".concat(r.map((function(e){return"'".concat(e,"'")})).join(", "),"] or a number. Got: ").concat(n)),Yn(e)}(e),c={},h=0;h<l.length;h++)c[l[h].id()]=h;n=(t=l.length)*t,r=new Array(n);for(var d=0;d<n;d++)r[d]=-1/0;for(var p=0;p<t;p++)for(var g=0;g<t;g++)p!==g&&(r[p*t+g]=Xn(u.distance,l[p],l[g],u.attributes));i=Vn(r,u.preference);for(var f=0;f<t;f++)r[f*t+f]=i;a=new Array(n);for(var v=0;v<n;v++)a[v]=0;o=new Array(n);for(var y=0;y<n;y++)o[y]=0;for(var m=new Array(t),b=new Array(t),x=new Array(t),w=0;w<t;w++)m[w]=0,b[w]=0,x[w]=0;for(var E,_=new Array(t*u.minIterations),T=0;T<_.length;T++)_[T]=0;for(E=0;E<u.maxIterations;E++){for(var D=0;D<t;D++){for(var C=-1/0,N=-1/0,A=-1,L=0,k=0;k<t;k++)m[k]=a[D*t+k],(L=o[D*t+k]+r[D*t+k])>=C?(N=C,C=L,A=k):L>N&&(N=L);for(var S=0;S<t;S++)a[D*t+S]=(1-u.damping)*(r[D*t+S]-C)+u.damping*m[S];a[D*t+A]=(1-u.damping)*(r[D*t+A]-N)+u.damping*m[A]}for(var M=0;M<t;M++){for(var O=0,P=0;P<t;P++)m[P]=o[P*t+M],b[P]=Math.max(0,a[P*t+M]),O+=b[P];O-=b[M],b[M]=a[M*t+M],O+=b[M];for(var R=0;R<t;R++)o[R*t+M]=(1-u.damping)*Math.min(0,O-b[R])+u.damping*m[R];o[M*t+M]=(1-u.damping)*(O-b[M])+u.damping*m[M]}for(var B=0,F=0;F<t;F++){var z=o[F*t+F]+a[F*t+F]>0?1:0;_[E%u.minIterations*t+F]=z,B+=z}if(B>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var G=0,Y=0;Y<t;Y++){x[Y]=0;for(var X=0;X<u.minIterations;X++)x[Y]+=_[X*t+Y];0!==x[Y]&&x[Y]!==u.minIterations||G++}if(G===t)break}}for(var V=function(e,t,n){for(var r=[],i=0;i<e;i++)t[i*e+i]+n[i*e+i]>0&&r.push(i);return r}(t,a,o),U=function(e,t,n){for(var r=Un(e,t,n),i=0;i<n.length;i++){for(var a=[],o=0;o<r.length;o++)r[o]===n[i]&&a.push(o);for(var s=-1,l=-1/0,u=0;u<a.length;u++){for(var c=0,h=0;h<a.length;h++)c+=t[a[h]*e+a[u]];c>l&&(s=u,l=c)}n[i]=a[s]}return Un(e,t,n)}(t,r,V),j={},q=0;q<V.length;q++)j[V[q]]=[];for(var H=0;H<l.length;H++){var W=U[c[l[H].id()]];null!=W&&j[W].push(l[H])}for(var $=new Array(V.length),K=0;K<V.length;K++)$[K]=s.collection(j[V[K]]);return $},qn={affinityPropagation:jn,ap:jn},Hn=Me({root:void 0,directed:!1}),Wn=function(){var e=this,t={},n=0,r=0,i=[],a=[],o={},s=function s(l,u,c){l===c&&(r+=1),t[u]={id:n,low:n++,cutVertex:!1};var h,d,p,g,f=e.getElementById(u).connectedEdges().intersection(e);0===f.size()?i.push(e.spawn(e.getElementById(u))):f.forEach((function(n){h=n.source().id(),d=n.target().id(),(p=h===u?d:h)!==c&&(g=n.id(),o[g]||(o[g]=!0,a.push({x:u,y:p,edge:n})),p in t?t[u].low=Math.min(t[u].low,t[p].id):(s(l,p,u),t[u].low=Math.min(t[u].low,t[p].low),t[u].id<=t[p].low&&(t[u].cutVertex=!0,function(n,r){for(var o=a.length-1,s=[],l=e.spawn();a[o].x!=n||a[o].y!=r;)s.push(a.pop().edge),o--;s.push(a.pop().edge),s.forEach((function(n){var r=n.connectedNodes().intersection(e);l.merge(n),r.forEach((function(n){var r=n.id(),i=n.connectedEdges().intersection(e);l.merge(n),t[r].cutVertex?l.merge(i.filter((function(e){return e.isLoop()}))):l.merge(i)}))})),i.push(l)}(u,p))))}))};e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||(r=0,s(n,n),t[n].cutVertex=r>1)}}));var l=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(l),components:i}},$n=function(){var e=this,t={},n=0,r=[],i=[],a=e.spawn(e),o=function o(s){if(i.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var l=e.spawn();;){var u=i.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),h=l.merge(c);r.push(h),a=a.difference(h)}};return e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||o(n)}})),{cut:a,components:r}},Kn={};[Ve,je,qe,We,Ke,Qe,nt,qt,Wt,Kt,Qt,un,In,Gn,qn,{hierholzer:function(e){if(!S(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n,r,i,a=Hn(e),o=a.root,s=a.directed,l=this,u=!1;o&&(i=A(o)?this.filter(o)[0].id():o[0].id());var c={},h={};s?l.forEach((function(e){var t=e.id();if(e.isNode()){var i=e.indegree(!0),a=e.outdegree(!0),o=i-a,s=a-i;1==o?n?u=!0:n=t:1==s?r?u=!0:r=t:(s>1||o>1)&&(u=!0),c[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&c[t].push(e.id())}))}else h[t]=[void 0,e.target().id()]})):l.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach((function(e){return c[t].push(e.id())}))):h[t]=[e.source().id(),e.target().id()]}));var d={found:!1,trail:void 0};if(u)return d;if(r&&n)if(s){if(i&&r!=i)return d;i=r}else{if(i&&r!=i&&n!=i)return d;i||(i=r)}else i||(i=l[0].id());var p=function(e){for(var t,n,r,i=e,a=[e];c[i].length;)t=c[i].shift(),n=h[t][0],i!=(r=h[t][1])?(c[r]=c[r].filter((function(e){return e!=t})),i=r):s||i==n||(c[n]=c[n].filter((function(e){return e!=t})),i=n),a.unshift(t),a.unshift(i);return a},g=[],f=[];for(f=p(i);1!=f.length;)0==c[f[0]].length?(g.unshift(l.getElementById(f.shift())),g.unshift(l.getElementById(f.shift()))):f=p(f.shift()).concat(f);for(var v in g.unshift(l.getElementById(f.shift())),c)if(c[v].length)return d;return d.found=!0,d.trail=this.spawn(g,!0),d}},{hopcroftTarjanBiconnected:Wn,htbc:Wn,htb:Wn,hopcroftTarjanBiconnectedComponents:Wn},{tarjanStronglyConnected:$n,tsc:$n,tscc:$n,tarjanStronglyConnectedComponents:$n}].forEach((function(e){Q(Kn,e)}));var Zn=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};Zn.prototype={fulfill:function(e){return Qn(this,1,"fulfillValue",e)},reject:function(e){return Qn(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new Zn;return n.onFulfilled.push(tr(e,r,"fulfill")),n.onRejected.push(tr(t,r,"reject")),Jn(n),r.proxy}};var Qn=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,Jn(e)),e},Jn=function(e){1===e.state?er(e,"onFulfilled",e.fulfillValue):2===e.state&&er(e,"onRejected",e.rejectReason)},er=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var i=function(){for(var e=0;e<r.length;e++)r[e](n)};"function"==typeof setImmediate?setImmediate(i):setTimeout(i,0)}},tr=function(e,t,n){return function(r){if("function"!=typeof e)t[n].call(t,r);else{var i;try{i=e(r)}catch(a){return void t.reject(a)}nr(t,i)}}},nr=function e(t,n){if(t!==n&&t.proxy!==n){var r;if("object"===g(n)&&null!==n||"function"==typeof n)try{r=n.then}catch(a){return void t.reject(a)}if("function"!=typeof r)t.fulfill(n);else{var i=!1;try{r.call(n,(function(r){i||(i=!0,r===n?t.reject(new TypeError("circular thenable chain")):e(t,r))}),(function(e){i||(i=!0,t.reject(e))}))}catch(a){i||t.reject(a)}}}else t.reject(new TypeError("cannot resolve promise with itself"))};Zn.all=function(e){return new Zn((function(t,n){for(var r=new Array(e.length),i=0,a=function(n,a){r[n]=a,++i===e.length&&t(r)},o=0;o<e.length;o++)!function(t){var r=e[t];null!=r&&null!=r.then?r.then((function(e){a(t,e)}),(function(e){n(e)})):a(t,r)}(o)}))},Zn.resolve=function(e){return new Zn((function(t,n){t(e)}))},Zn.reject=function(e){return new Zn((function(t,n){n(e)}))};var rr="undefined"!=typeof Promise?Promise:Zn,ir=function(e,t,n){var r=B(e),i=!r,a=this._private=Q({duration:1e3},t,n);if(a.target=e,a.style=a.style||a.css,a.started=!1,a.playing=!1,a.hooked=!1,a.applying=!1,a.progress=0,a.completes=[],a.frames=[],a.complete&&L(a.complete)&&a.completes.push(a.complete),i){var o=e.position();a.startPosition=a.startPosition||{x:o.x,y:o.y},a.startStyle=a.startStyle||e.cy().style().getAnimationStartStyle(e,a.style)}if(r){var s=e.pan();a.startPan={x:s.x,y:s.y},a.startZoom=e.zoom()}this.length=1,this[0]=this},ar=ir.prototype;Q(ar,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var t=e.target._private.animation;(e.queue?t.queue:t.current).push(this),O(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return 1===e.progress&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var t=this._private;return void 0===e?t.progress*t.duration:this.progress(e/t.duration)},progress:function(e){var t=this._private,n=t.playing;return void 0===e?t.progress:(n&&this.pause(),t.progress=e,t.started=!1,n&&this.play(),this)},completed:function(){return 1===this._private.progress},reverse:function(){var e=this._private,t=e.playing;t&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=function(t,n){var r=e[t];null!=r&&(e[t]=e[n],e[n]=r)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var r=0;r<e.style.length;r++){var i=e.style[r],a=i.name,o=e.startStyle[a];e.startStyle[a]=i,e.style[r]=o}return t&&this.play(),this},promise:function(e){var t,n=this._private;if("frame"===e)t=n.frames;else t=n.completes;return new rr((function(e,n){t.push((function(){e()}))}))}}),ar.complete=ar.completed,ar.run=ar.play,ar.running=ar.playing;var or={animated:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return!1;var n=t[0];return n?n._private.animation.current.length>0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n<t.length;n++){t[n]._private.animation.queue=[]}return this}},delay:function(){return function(e,t){return(this._private.cy||this).styleEnabled()?this.animate({delay:e,duration:e,complete:t}):this}},delayAnimation:function(){return function(e,t){return(this._private.cy||this).styleEnabled()?this.animation({delay:e,duration:e,complete:t}):this}},animation:function(){return function(e,t){var n=this,r=void 0!==n.length,i=r?n:[n],a=this._private.cy||this,o=!r,s=!o;if(!a.styleEnabled())return this;var l=a.style();if(e=Q({},e,t),0===Object.keys(e).length)return new ir(i[0],e);switch(void 0===e.duration&&(e.duration=400),e.duration){case"slow":e.duration=600;break;case"fast":e.duration=200}if(s&&(e.style=l.getPropsList(e.style||e.css),e.css=void 0),s&&null!=e.renderedPosition){var u=e.renderedPosition,c=a.pan(),h=a.zoom();e.position=it(u,h,c)}if(o&&null!=e.panBy){var d=e.panBy,p=a.pan();e.pan={x:p.x+d.x,y:p.y+d.y}}var g=e.center||e.centre;if(o&&null!=g){var f=a.getCenterPan(g.eles,e.zoom);null!=f&&(e.pan=f)}if(o&&null!=e.fit){var v=e.fit,y=a.getFitViewport(v.eles||v.boundingBox,v.padding);null!=y&&(e.pan=y.pan,e.zoom=y.zoom)}if(o&&S(e.zoom)){var m=a.getZoomedViewport(e.zoom);null!=m?(m.zoomed&&(e.zoom=m.zoom),m.panned&&(e.pan=m.pan)):e.zoom=null}return new ir(i[0],e)}},animate:function(){return function(e,t){var n=this,r=void 0!==n.length?n:[n];if(!(this._private.cy||this).styleEnabled())return this;t&&(e=Q({},e,t));for(var i=0;i<r.length;i++){var a=r[i],o=a.animated()&&(void 0===e.queue||e.queue);a.animation(e,o?{queue:!0}:void 0).play()}return this}},stop:function(){return function(e,t){var n=this,r=void 0!==n.length?n:[n],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var a=0;a<r.length;a++){for(var o=r[a]._private,s=o.animation.current,l=0;l<s.length;l++){var u=s[l]._private;t&&(u.duration=0)}e&&(o.animation.queue=[]),t||(o.animation.current=[])}return i.notify("draw"),this}}},sr={data:function(e){return e=Q({},{field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(e){},beforeSet:function(e,t){},onSet:function(e){},canSet:function(e){return!0}},e),function(t,n){var r=e,i=this,a=void 0!==i.length,o=a?i:[i],s=a?i[0]:i;if(A(t)){var l,u=-1!==t.indexOf(".")&&p.default(t);if(r.allowGetting&&void 0===n)return s&&(r.beforeGet(s),l=u&&void 0===s._private[r.field][t]?h.default(s._private[r.field],u):s._private[r.field][t]),l;if(r.allowSetting&&void 0!==n&&!r.immutableKeys[t]){var c=m({},t,n);r.beforeSet(i,c);for(var g=0,f=o.length;g<f;g++){var v=o[g];r.canSet(v)&&(u&&void 0===s._private[r.field][t]?d.default(v._private[r.field],u,n):v._private[r.field][t]=n)}r.updateStyle&&i.updateStyle(),r.onSet(i),r.settingTriggersEvent&&i[r.triggerFnName](r.settingEvent)}}else if(r.allowSetting&&S(t)){var y,b,x=t,w=Object.keys(x);r.beforeSet(i,x);for(var E=0;E<w.length;E++){if(b=x[y=w[E]],!r.immutableKeys[y])for(var _=0;_<o.length;_++){var T=o[_];r.canSet(T)&&(T._private[r.field][y]=b)}}r.updateStyle&&i.updateStyle(),r.onSet(i),r.settingTriggersEvent&&i[r.triggerFnName](r.settingEvent)}else if(r.allowBinding&&L(t)){var D=t;i.on(r.bindingEvent,D)}else if(r.allowGetting&&void 0===t){var C;return s&&(r.beforeGet(s),C=s._private[r.field]),C}return i}},removeData:function(e){return e=Q({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},e),function(t){var n=e,r=this,i=void 0!==r.length?r:[r];if(A(t)){for(var a=t.split(/\s+/),o=a.length,s=0;s<o;s++){var l=a[s];if(!z(l))if(!n.immutableKeys[l])for(var u=0,c=i.length;u<c;u++)i[u]._private[n.field][l]=void 0}n.triggerEvent&&r[n.triggerFnName](n.event)}else if(void 0===t){for(var h=0,d=i.length;h<d;h++)for(var p=i[h]._private[n.field],g=Object.keys(p),f=0;f<g.length;f++){var v=g[f];!n.immutableKeys[v]&&(p[v]=void 0)}n.triggerEvent&&r[n.triggerFnName](n.event)}return r}}},lr={eventAliasesOn:function(e){var t=e;t.addListener=t.listen=t.bind=t.on,t.unlisten=t.unbind=t.off=t.removeListener,t.trigger=t.emit,t.pon=t.promiseOn=function(e,t){var n=this,r=Array.prototype.slice.call(arguments,0);return new rr((function(e,t){var i=r.concat([function(t){n.off.apply(n,a),e(t)}]),a=i.concat([]);n.on.apply(n,i)}))}}},ur={};[or,sr,lr].forEach((function(e){Q(ur,e)}));var cr={animate:ur.animate(),animation:ur.animation(),animated:ur.animated(),clearQueue:ur.clearQueue(),delay:ur.delay(),delayAnimation:ur.delayAnimation(),stop:ur.stop()},hr={classes:function(e){var t=this;if(void 0===e){var n=[];return t[0]._private.classes.forEach((function(e){return n.push(e)})),n}k(e)||(e=(e||"").match(/\S+/g)||[]);for(var r=[],i=new Ge(e),a=0;a<t.length;a++){for(var o=t[a],s=o._private,l=s.classes,u=!1,c=0;c<e.length;c++){var h=e[c];if(!l.has(h)){u=!0;break}}u||(u=l.size!==e.length),u&&(s.classes=i,r.push(o))}return r.length>0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){k(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,i=[],a=0,o=n.length;a<o;a++)for(var s=n[a],l=s._private.classes,u=!1,c=0;c<e.length;c++){var h=e[c],d=l.has(h),p=!1;t||r&&!d?(l.add(h),p=!0):(!t||r&&d)&&(l.delete(h),p=!0),!u&&p&&(i.push(s),u=!0)}return i.length>0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};hr.className=hr.classNames=hr.classes;var dr={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:q,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};dr.variable="(?:[\\w-.]|(?:\\\\"+dr.metaChar+"))+",dr.className="(?:[\\w-]|(?:\\\\"+dr.metaChar+"))+",dr.value=dr.string+"|"+dr.number,dr.id=dr.variable,function(){var e,t,n;for(e=dr.comparatorOp.split("|"),n=0;n<e.length;n++)t=e[n],dr.comparatorOp+="|@"+t;for(e=dr.comparatorOp.split("|"),n=0;n<e.length;n++)(t=e[n]).indexOf("!")>=0||"="!==t&&(dr.comparatorOp+="|\\!"+t)}();var pr=0,gr=1,fr=2,vr=3,yr=4,mr=5,br=6,xr=7,wr=8,Er=9,_r=10,Tr=11,Dr=12,Cr=13,Nr=14,Ar=15,Lr=16,kr=17,Sr=18,Ir=19,Mr=20,Or=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return function(e,t){return-1*Z(e,t)}(e.selector,t.selector)})),Pr=function(){for(var e,t={},n=0;n<Or.length;n++)t[(e=Or[n]).selector]=e.matches;return t}(),Rr="("+Or.map((function(e){return e.selector})).join("|")+")",Br=function(e){return e.replace(new RegExp("\\\\("+dr.metaChar+")","g"),(function(e,t){return t}))},Fr=function(e,t,n){e[e.length-1]=n},zr=[{name:"group",query:!0,regex:"("+dr.group+")",populate:function(e,t,n){var r=b(n,1)[0];t.checks.push({type:pr,value:"*"===r?r:r+"s"})}},{name:"state",query:!0,regex:Rr,populate:function(e,t,n){var r=b(n,1)[0];t.checks.push({type:xr,value:r})}},{name:"id",query:!0,regex:"\\#("+dr.id+")",populate:function(e,t,n){var r=b(n,1)[0];t.checks.push({type:wr,value:Br(r)})}},{name:"className",query:!0,regex:"\\.("+dr.className+")",populate:function(e,t,n){var r=b(n,1)[0];t.checks.push({type:Er,value:Br(r)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+dr.variable+")\\s*\\]",populate:function(e,t,n){var r=b(n,1)[0];t.checks.push({type:yr,field:Br(r)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+dr.variable+")\\s*("+dr.comparatorOp+")\\s*("+dr.value+")\\s*\\]",populate:function(e,t,n){var r=b(n,3),i=r[0],a=r[1],o=r[2];o=null!=new RegExp("^"+dr.string+"$").exec(o)?o.substring(1,o.length-1):parseFloat(o),t.checks.push({type:vr,field:Br(i),operator:a,value:o})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+dr.boolOp+")\\s*("+dr.variable+")\\s*\\]",populate:function(e,t,n){var r=b(n,2),i=r[0],a=r[1];t.checks.push({type:mr,field:Br(a),operator:i})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+dr.meta+")\\s*("+dr.comparatorOp+")\\s*("+dr.number+")\\s*\\]\\]",populate:function(e,t,n){var r=b(n,3),i=r[0],a=r[1],o=r[2];t.checks.push({type:br,field:Br(i),operator:a,value:parseFloat(o)})}},{name:"nextQuery",separator:!0,regex:dr.separator,populate:function(e,t){var n=e.currentSubject,r=e.edgeCount,i=e.compoundCount,a=e[e.length-1];return null!=n&&(a.subject=n,e.currentSubject=null),a.edgeCount=r,a.compoundCount=i,e.edgeCount=0,e.compoundCount=0,e[e.length++]={checks:[]}}},{name:"directedEdge",separator:!0,regex:dr.directedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r=t,i={checks:[]};return n.checks.push({type:Tr,source:r,target:i}),Fr(e,0,n),e.edgeCount++,i}var a={checks:[]},o=t,s={checks:[]};return a.checks.push({type:Dr,source:o,target:s}),Fr(e,0,a),e.edgeCount++,s}},{name:"undirectedEdge",separator:!0,regex:dr.undirectedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r=t,i={checks:[]};return n.checks.push({type:_r,nodes:[r,i]}),Fr(e,0,n),e.edgeCount++,i}var a={checks:[]},o=t,s={checks:[]};return a.checks.push({type:Nr,node:o,neighbor:s}),Fr(e,0,a),s}},{name:"child",separator:!0,regex:dr.child,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r={checks:[]},i=e[e.length-1];return n.checks.push({type:Ar,parent:i,child:r}),Fr(e,0,n),e.compoundCount++,r}if(e.currentSubject===t){var a={checks:[]},o=e[e.length-1],s={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]};return a.checks.push({type:Ir,left:o,right:s,subject:l}),l.checks=t.checks,t.checks=[{type:Mr}],c.checks.push({type:Mr}),s.checks.push({type:kr,parent:c,child:u}),Fr(e,0,a),e.currentSubject=l,e.compoundCount++,u}var h={checks:[]},d={checks:[]},p=[{type:kr,parent:h,child:d}];return h.checks=t.checks,t.checks=p,e.compoundCount++,d}},{name:"descendant",separator:!0,regex:dr.descendant,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r={checks:[]},i=e[e.length-1];return n.checks.push({type:Lr,ancestor:i,descendant:r}),Fr(e,0,n),e.compoundCount++,r}if(e.currentSubject===t){var a={checks:[]},o=e[e.length-1],s={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]};return a.checks.push({type:Ir,left:o,right:s,subject:l}),l.checks=t.checks,t.checks=[{type:Mr}],c.checks.push({type:Mr}),s.checks.push({type:Sr,ancestor:c,descendant:u}),Fr(e,0,a),e.currentSubject=l,e.compoundCount++,u}var h={checks:[]},d={checks:[]},p=[{type:Sr,ancestor:h,descendant:d}];return h.checks=t.checks,t.checks=p,e.compoundCount++,d}},{name:"subject",modifier:!0,regex:dr.subject,populate:function(e,t){if(null!=e.currentSubject&&e.currentSubject!==t)return Ae("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t;var n=e[e.length-1].checks[0],r=null==n?null:n.type;r===Tr?n.type=Cr:r===_r&&(n.type=Nr,n.node=n.nodes[1],n.neighbor=n.nodes[0],n.nodes=null)}}];zr.forEach((function(e){return e.regexObj=new RegExp("^"+e.regex)}));var Gr=function(e){for(var t,n,r,i=0;i<zr.length;i++){var a=zr[i],o=a.name,s=e.match(a.regexObj);if(null!=s){n=s,t=a,r=o;var l=s[0];e=e.substring(l.length);break}}return{expr:t,match:n,name:r,remaining:e}},Yr={parse:function(e){var t=this,n=t.inputText=e,r=t[0]={checks:[]};for(t.length=1,n=function(e){var t=e.match(/^\s+/);if(t){var n=t[0];e=e.substring(n.length)}return e}(n);;){var i=Gr(n);if(null==i.expr)return Ae("The selector `"+e+"`is invalid"),!1;var a=i.match.slice(1),o=i.expr.populate(t,r,a);if(!1===o)return!1;if(null!=o&&(r=o),(n=i.remaining).match(/^\s*$/))break}var s=t[t.length-1];null!=t.currentSubject&&(s.subject=t.currentSubject),s.edgeCount=t.edgeCount,s.compoundCount=t.compoundCount;for(var l=0;l<t.length;l++){var u=t[l];if(u.compoundCount>0&&u.edgeCount>0)return Ae("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return Ae("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&Ae("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return A(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(r,a){var o=r.type,s=r.value;switch(o){case pr:var l=e(s);return l.substring(0,l.length-1);case vr:var u=r.field,c=r.operator;return"["+u+n(e(c))+t(s)+"]";case mr:var h=r.operator,d=r.field;return"["+e(h)+d+"]";case yr:return"["+r.field+"]";case br:var p=r.operator;return"[["+r.field+n(e(p))+t(s)+"]]";case xr:return s;case wr:return"#"+s;case Er:return"."+s;case kr:case Ar:return i(r.parent,a)+n(">")+i(r.child,a);case Sr:case Lr:return i(r.ancestor,a)+" "+i(r.descendant,a);case Ir:var g=i(r.left,a),f=i(r.subject,a),v=i(r.right,a);return g+(g.length>0?" ":"")+f+v;case Mr:return""}},i=function(e,t){return e.checks.reduce((function(n,i,a){return n+(t===e&&0===a?"$":"")+r(i,t)}),"")},a="",o=0;o<this.length;o++){var s=this[o];a+=i(s,s.subject),this.length>1&&o<this.length-1&&(a+=", ")}return this.toStringCache=a,a}},Xr=function(e,t,n){var r,i,a,o=A(e),s=I(e),l=A(n),u=!1,c=!1,h=!1;switch(t.indexOf("!")>=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(o||l||u)&&(i=o||s?""+e:"",a=""+n),u&&(e=i=i.toLowerCase(),n=a=a.toLowerCase()),t){case"*=":r=i.indexOf(a)>=0;break;case"$=":r=i.indexOf(a,i.length-a.length)>=0;break;case"^=":r=0===i.indexOf(a);break;case"=":r=e===n;break;case">":h=!0,r=e>n;break;case">=":h=!0,r=e>=n;break;case"<":h=!0,r=e<n;break;case"<=":h=!0,r=e<=n;break;default:r=!1}return!c||null==e&&h||(r=!r),r},Vr=function(e,t){return e.data(t)},Ur=[],jr=function(e,t){return e.checks.every((function(e){return Ur[e.type](e,t)}))};Ur[pr]=function(e,t){var n=e.value;return"*"===n||n===t.group()},Ur[xr]=function(e,t){return function(e,t){return Pr[e](t)}(e.value,t)},Ur[wr]=function(e,t){var n=e.value;return t.id()===n},Ur[Er]=function(e,t){var n=e.value;return t.hasClass(n)},Ur[br]=function(e,t){var n=e.field,r=e.operator,i=e.value;return Xr(function(e,t){return e[t]()}(t,n),r,i)},Ur[vr]=function(e,t){var n=e.field,r=e.operator,i=e.value;return Xr(Vr(t,n),r,i)},Ur[mr]=function(e,t){var n=e.field,r=e.operator;return function(e,t){switch(t){case"?":return!!e;case"!":return!e;case"^":return void 0===e}}(Vr(t,n),r)},Ur[yr]=function(e,t){var n=e.field;return e.operator,void 0!==Vr(t,n)},Ur[_r]=function(e,t){var n=e.nodes[0],r=e.nodes[1],i=t.source(),a=t.target();return jr(n,i)&&jr(r,a)||jr(r,i)&&jr(n,a)},Ur[Nr]=function(e,t){return jr(e.node,t)&&t.neighborhood().some((function(t){return t.isNode()&&jr(e.neighbor,t)}))},Ur[Tr]=function(e,t){return jr(e.source,t.source())&&jr(e.target,t.target())},Ur[Dr]=function(e,t){return jr(e.source,t)&&t.outgoers().some((function(t){return t.isNode()&&jr(e.target,t)}))},Ur[Cr]=function(e,t){return jr(e.target,t)&&t.incomers().some((function(t){return t.isNode()&&jr(e.source,t)}))},Ur[Ar]=function(e,t){return jr(e.child,t)&&jr(e.parent,t.parent())},Ur[kr]=function(e,t){return jr(e.parent,t)&&t.children().some((function(t){return jr(e.child,t)}))},Ur[Lr]=function(e,t){return jr(e.descendant,t)&&t.ancestors().some((function(t){return jr(e.ancestor,t)}))},Ur[Sr]=function(e,t){return jr(e.ancestor,t)&&t.descendants().some((function(t){return jr(e.descendant,t)}))},Ur[Ir]=function(e,t){return jr(e.subject,t)&&jr(e.left,t)&&jr(e.right,t)},Ur[Mr]=function(){return!0},Ur[gr]=function(e,t){return e.value.has(t)},Ur[fr]=function(e,t){return(0,e.value)(t)};var qr={matches:function(e){for(var t=0;t<this.length;t++){var n=this[t];if(jr(n,e))return!0}return!1},filter:function(e){var t=this;if(1===t.length&&1===t[0].checks.length&&t[0].checks[0].type===wr)return e.getElementById(t[0].checks[0].value).collection();var n=function(e){for(var n=0;n<t.length;n++){var r=t[n];if(jr(r,e))return!0}return!1};return null==t.text()&&(n=function(){return!0}),e.filter(n)}},Hr=function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==e||A(e)&&e.match(/^\s*$/)||(O(e)?this.addQuery({checks:[{type:gr,value:e.collection()}]}):L(e)?this.addQuery({checks:[{type:fr,value:e}]}):A(e)?this.parse(e)||(this.invalid=!0):Ce("A selector must be created from a string; found "))},Wr=Hr.prototype;[Yr,qr].forEach((function(e){return Q(Wr,e)})),Wr.text=function(){return this.inputText},Wr.size=function(){return this.length},Wr.eq=function(e){return this[e]},Wr.sameText=function(e){return!this.invalid&&!e.invalid&&this.text()===e.text()},Wr.addQuery=function(e){this[this.length++]=e},Wr.selector=Wr.toString;var $r={allAre:function(e){var t=new Hr(e);return this.every((function(e){return t.matches(e)}))},is:function(e){var t=new Hr(e);return this.some((function(e){return t.matches(e)}))},some:function(e,t){for(var n=0;n<this.length;n++){if(t?e.apply(t,[this[n],n,this]):e(this[n],n,this))return!0}return!1},every:function(e,t){for(var n=0;n<this.length;n++){if(!(t?e.apply(t,[this[n],n,this]):e(this[n],n,this)))return!1}return!0},same:function(e){if(this===e)return!0;e=this.cy().collection(e);var t=this.length;return t===e.length&&(1===t?this[0]===e[0]:this.every((function(t){return e.hasElementWithId(t.id())})))},anySame:function(e){return e=this.cy().collection(e),this.some((function(t){return e.hasElementWithId(t.id())}))},allAreNeighbors:function(e){e=this.cy().collection(e);var t=this.neighborhood();return e.every((function(e){return t.hasElementWithId(e.id())}))},contains:function(e){e=this.cy().collection(e);var t=this;return e.every((function(e){return t.hasElementWithId(e.id())}))}};$r.allAreNeighbours=$r.allAreNeighbors,$r.has=$r.contains,$r.equal=$r.equals=$r.same;var Kr,Zr,Qr=function(e,t){return function(n,r,i,a){var o,s=n,l=this;if(null==s?o="":O(s)&&1===s.length&&(o=s.id()),1===l.length&&o){var u=l[0]._private,c=u.traversalCache=u.traversalCache||{},h=c[t]=c[t]||[],d=fe(o),p=h[d];return p||(h[d]=e.call(l,n,r,i,a))}return e.call(l,n,r,i,a)}},Jr={parent:function(e){var t=[];if(1===this.length){var n=this[0]._private.parent;if(n)return n}for(var r=0;r<this.length;r++){var i=this[r]._private.parent;i&&t.push(i)}return this.spawn(t,!0).filter(e)},parents:function(e){for(var t=[],n=this.parent();n.nonempty();){for(var r=0;r<n.length;r++){var i=n[r];t.push(i)}n=n.parent()}return this.spawn(t,!0).filter(e)},commonAncestors:function(e){for(var t,n=0;n<this.length;n++){var r=this[n].parents();t=(t=t||r).intersect(r)}return t.filter(e)},orphans:function(e){return this.stdFilter((function(e){return e.isOrphan()})).filter(e)},nonorphans:function(e){return this.stdFilter((function(e){return e.isChild()})).filter(e)},children:Qr((function(e){for(var t=[],n=0;n<this.length;n++)for(var r=this[n]._private.children,i=0;i<r.length;i++)t.push(r[i]);return this.spawn(t,!0).filter(e)}),"children"),siblings:function(e){return this.parent().children().not(this).filter(e)},isParent:function(){var e=this[0];if(e)return e.isNode()&&0!==e._private.children.length},isChildless:function(){var e=this[0];if(e)return e.isNode()&&0===e._private.children.length},isChild:function(){var e=this[0];if(e)return e.isNode()&&null!=e._private.parent},isOrphan:function(){var e=this[0];if(e)return e.isNode()&&null==e._private.parent},descendants:function(e){var t=[];return function e(n){for(var r=0;r<n.length;r++){var i=n[r];t.push(i),i.children().nonempty()&&e(i.children())}}(this.children()),this.spawn(t,!0).filter(e)}};function ei(e,t,n,r){for(var i=[],a=new Ge,o=e.cy().hasCompoundNodes(),s=0;s<e.length;s++){var l=e[s];n?i.push(l):o&&r(i,a,l)}for(;i.length>0;){var u=i.shift();t(u),a.add(u.id()),o&&r(i,a,u)}return e}function ti(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i<r.length;i++){var a=r[i];t.has(a.id())||e.push(a)}}function ni(e,t,n){if(n.isChild()){var r=n._private.parent;t.has(r.id())||e.push(r)}}function ri(e,t,n){ni(e,t,n),ti(e,t,n)}Jr.forEachDown=function(e){return ei(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ti)},Jr.forEachUp=function(e){return ei(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ni)},Jr.forEachUpAndDown=function(e){return ei(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ri)},Jr.ancestors=Jr.parents,(Kr=Zr={data:ur.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:ur.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:ur.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ur.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:ur.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:ur.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Kr.data,Kr.removeAttr=Kr.removeData;var ii,ai,oi=Zr,si={};function li(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],a=i._private.edges,o=0;o<a.length;o++){var s=a[o];!t&&s.isLoop()||(r+=e(i,s))}return r}}}function ui(e,t){return function(n){for(var r,i=this.nodes(),a=0;a<i.length;a++){var o=i[a][e](n);void 0===o||void 0!==r&&!t(o,r)||(r=o)}return r}}Q(si,{degree:li((function(e,t){return t.source().same(t.target())?2:1})),indegree:li((function(e,t){return t.target().same(e)?1:0})),outdegree:li((function(e,t){return t.source().same(e)?1:0}))}),Q(si,{minDegree:ui("degree",(function(e,t){return e<t})),maxDegree:ui("degree",(function(e,t){return e>t})),minIndegree:ui("indegree",(function(e,t){return e<t})),maxIndegree:ui("indegree",(function(e,t){return e>t})),minOutdegree:ui("outdegree",(function(e,t){return e<t})),maxOutdegree:ui("outdegree",(function(e,t){return e>t}))}),Q(si,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r<n.length;r++)t+=n[r].degree(e);return t}});var ci=function(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(!i.locked()){var a=i._private.position,o={x:null!=t.x?t.x-a.x:0,y:null!=t.y?t.y-a.y:0};!i.isParent()||0===o.x&&0===o.y||i.children().shift(o,n),i.dirtyBoundingBoxCache()}}},hi={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},beforeSet:function(e,t){ci(e,t,!1)},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()}};ii=ai={position:ur.data(hi),silentPosition:ur.data(Q({},hi,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(e,t){ci(e,t,!0)},onSet:function(e){e.dirtyCompoundBoundsCache()}})),positions:function(e,t){if(S(e))t?this.silentPosition(e):this.position(e);else if(L(e)){var n=e,r=this.cy();r.startBatch();for(var i=0;i<this.length;i++){var a,o=this[i];(a=n(o,i))&&(t?o.silentPosition(a):o.position(a))}r.endBatch()}return this},silentPositions:function(e){return this.positions(e,!0)},shift:function(e,t,n){var r;if(S(e)?(r={x:I(e.x)?e.x:0,y:I(e.y)?e.y:0},n=t):A(e)&&I(t)&&((r={x:0,y:0})[e]=t),null!=r){var i=this.cy();i.startBatch();for(var a=0;a<this.length;a++){var o=this[a];if(!(i.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this))){var s=o.position(),l={x:s.x+r.x,y:s.y+r.y};n?o.silentPosition(l):o.position(l)}}i.endBatch()}return this},silentShift:function(e,t){return S(e)?this.shift(e,!0):A(e)&&I(t)&&this.shift(e,t,!0),this},renderedPosition:function(e,t){var n=this[0],r=this.cy(),i=r.zoom(),a=r.pan(),o=S(e)?e:void 0,s=void 0!==o||void 0!==t&&A(e);if(n&&n.isNode()){if(!s){var l=n.position();return o=rt(l,i,a),void 0===e?o:o[e]}for(var u=0;u<this.length;u++){var c=this[u];void 0!==t?c.position(e,(t-a[e])/i):void 0!==o&&c.position(it(o,i,a))}}else if(!s)return;return this},relativePosition:function(e,t){var n=this[0],r=this.cy(),i=S(e)?e:void 0,a=void 0!==i||void 0!==t&&A(e),o=r.hasCompoundNodes();if(n&&n.isNode()){if(!a){var s=n.position(),l=o?n.parent():null,u=l&&l.length>0,c=u;u&&(l=l[0]);var h=c?l.position():{x:0,y:0};return i={x:s.x-h.x,y:s.y-h.y},void 0===e?i:i[e]}for(var d=0;d<this.length;d++){var p=this[d],g=o?p.parent():null,f=g&&g.length>0,v=f;f&&(g=g[0]);var y=v?g.position():{x:0,y:0};void 0!==t?p.position(e,t+y[e]):void 0!==i&&p.position({x:i.x+y.x,y:i.y+y.y})}}else if(!a)return;return this}},ii.modelPosition=ii.point=ii.position,ii.modelPositions=ii.points=ii.positions,ii.renderedPoint=ii.renderedPosition,ii.relativePoint=ii.relativePosition;var di,pi,gi=ai;di=pi={},pi.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),a=t.x1*r+i.x,o=t.x2*r+i.x,s=t.y1*r+i.y,l=t.y2*r+i.y;return{x1:a,x2:o,y1:s,y2:l,w:o-a,h:l-s}},pi.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}})),this):this},pi.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,i={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},a=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;0!==a.w&&0!==a.h||((a={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=o.x-a.w/2,a.x2=o.x+a.w/2,a.y1=o.y-a.h/2,a.y2=o.y+a.h/2);var s=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(s=100*s/i.width.val);var l=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(l=100*l/i.width.val);var u=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(u=100*u/i.height.val);var c=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(c=100*c/i.height.val);var h=y(i.width.val-a.w,s,l),d=h.biasDiff,p=h.biasComplementDiff,g=y(i.height.val-a.h,u,c),f=g.biasDiff,v=g.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(a.w,a.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(a.w,i.width.val),o.x=(-d+a.x1+a.x2+p)/2,t.autoHeight=Math.max(a.h,i.height.val),o.y=(-f+a.y1+a.y2+v)/2}function y(e,t,n){var r=0,i=0,a=t+n;return e>0&&a>0&&(r=t/a*e,i=n/a*e),{biasDiff:r,biasComplementDiff:i}}}for(var r=0;r<this.length;r++){var i=this[r],a=i._private;a.compoundBoundsClean&&!e||(n(i),t.batching()||(a.compoundBoundsClean=!0))}return this};var fi=function(e){return e===1/0||e===-1/0?0:e},vi=function(e,t,n,r,i){r-t!=0&&i-n!=0&&null!=t&&null!=n&&null!=r&&null!=i&&(e.x1=t<e.x1?t:e.x1,e.x2=r>e.x2?r:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=i>e.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},yi=function(e,t){return null==t?e:vi(e,t.x1,t.y1,t.x2,t.y2)},mi=function(e,t,n){return Re(e,t,n)},bi=function(e,t,n){if(!t.cy().headless()){var r,i,a=t._private,o=a.rstyle,s=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=o.srcX,i=o.srcY):"target"===n?(r=o.tgtX,i=o.tgtY):(r=o.midX,i=o.midY);var l=a.arrowBounds=a.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=i-s,u.x2=r+s,u.y2=i+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,mt(u,1),vi(e,u.x1,u.y1,u.x2,u.y2)}}},xi=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var i=t._private,a=i.rstyle;if(t.pstyle(r+"label").strValue){var o,s,l,u,c=t.pstyle("text-halign"),h=t.pstyle("text-valign"),d=mi(a,"labelWidth",n),p=mi(a,"labelHeight",n),g=mi(a,"labelX",n),f=mi(a,"labelY",n),v=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),x=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,_=p,T=d,D=T/2,C=_/2;if(m)o=g-D,s=g+D,l=f-C,u=f+C;else{switch(c.value){case"left":o=g-T,s=g;break;case"center":o=g-D,s=g+D;break;case"right":o=g,s=g+T}switch(h.value){case"top":l=f-_,u=f;break;case"center":l=f-C,u=f+C;break;case"bottom":l=f,u=f+_}}o+=v-Math.max(x,w)-E-2,s+=v+Math.max(x,w)+E+2,l+=y-Math.max(x,w)-E-2,u+=y+Math.max(x,w)+E+2;var N=n||"main",A=i.labelBounds,L=A[N]=A[N]||{};L.x1=o,L.y1=l,L.x2=s,L.y2=u,L.w=s-o,L.h=u-l;var k=m&&"autorotate"===b.strValue,S=null!=b.pfValue&&0!==b.pfValue;if(k||S){var I=k?mi(i.rstyle,"labelAngle",n):b.pfValue,M=Math.cos(I),O=Math.sin(I),P=(o+s)/2,R=(l+u)/2;if(!m){switch(c.value){case"left":P=s;break;case"right":P=o}switch(h.value){case"top":R=u;break;case"bottom":R=l}}var B=function(e,t){return{x:(e-=P)*M-(t-=R)*O+P,y:e*O+t*M+R}},F=B(o,l),z=B(o,u),G=B(s,l),Y=B(s,u);o=Math.min(F.x,z.x,G.x,Y.x),s=Math.max(F.x,z.x,G.x,Y.x),l=Math.min(F.y,z.y,G.y,Y.y),u=Math.max(F.y,z.y,G.y,Y.y)}var X=N+"Rot",V=A[X]=A[X]||{};V.x1=o,V.y1=l,V.x2=s,V.y2=u,V.w=s-o,V.h=u-l,vi(e,o,l,s,u),vi(i.labelBounds.all,o,l,s,u)}return e}},wi=function(e,t){var n,r,i,a,o,s,l,u=e._private.cy,c=u.styleEnabled(),h=u.headless(),d=ft(),p=e._private,g=e.isNode(),f=e.isEdge(),v=p.rstyle,y=g&&c?e.pstyle("bounds-expansion").pfValue:[0],m=function(e){return"none"!==e.pstyle("display").value},b=!c||m(e)&&(!f||m(e.source())&&m(e.target()));if(b){var x=0;c&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(x=e.pstyle("overlay-padding").value);var w=0;c&&t.includeUnderlays&&0!==e.pstyle("underlay-opacity").value&&(w=e.pstyle("underlay-padding").value);var E=Math.max(x,w),_=0;if(c&&(_=e.pstyle("width").pfValue/2),g&&t.includeNodes){var T=e.position();o=T.x,s=T.y;var D=e.outerWidth()/2,C=e.outerHeight()/2;vi(d,n=o-D,i=s-C,r=o+D,a=s+C),c&&t.includeOutlines&&function(e,t){if(!t.cy().headless()){var n,r,i,a=t.pstyle("outline-opacity").value,o=t.pstyle("outline-width").value;if(a>0&&o>0){var s=t.pstyle("outline-offset").value,l=t.pstyle("shape").value,u=o+s,c=(e.w+2*u)/e.w,h=(e.h+2*u)/e.h,d=0;["diamond","pentagon","round-triangle"].includes(l)?(c=(e.w+2.4*u)/e.w,d=-u/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(l)?c=(e.w+2.4*u)/e.w:"star"===l?(c=(e.w+2.8*u)/e.w,h=(e.h+2.6*u)/e.h,d=-u/3.8):"triangle"===l?(c=(e.w+2.8*u)/e.w,h=(e.h+2.4*u)/e.h,d=-u/1.4):"vee"===l&&(c=(e.w+4.4*u)/e.w,h=(e.h+3.8*u)/e.h,d=.5*-u);var p=e.h*h-e.h,g=e.w*c-e.w;if(bt(e,[Math.ceil(p/2),Math.ceil(g/2)]),0!==d){var f=(r=0,i=d,{x1:(n=e).x1+r,x2:n.x2+r,y1:n.y1+i,y2:n.y2+i,w:n.w,h:n.h});vt(e,f)}}}}(d,e)}else if(f&&t.includeEdges)if(c&&!h){var N=e.pstyle("curve-style").strValue;if(n=Math.min(v.srcX,v.midX,v.tgtX),r=Math.max(v.srcX,v.midX,v.tgtX),i=Math.min(v.srcY,v.midY,v.tgtY),a=Math.max(v.srcY,v.midY,v.tgtY),vi(d,n-=_,i-=_,r+=_,a+=_),"haystack"===N){var A=v.haystackPts;if(A&&2===A.length){if(n=A[0].x,i=A[0].y,n>(r=A[1].x)){var L=n;n=r,r=L}if(i>(a=A[1].y)){var k=i;i=a,a=k}vi(d,n-_,i-_,r+_,a+_)}}else if("bezier"===N||"unbundled-bezier"===N||"segments"===N||"taxi"===N){var S;switch(N){case"bezier":case"unbundled-bezier":S=v.bezierPts;break;case"segments":case"taxi":S=v.linePts}if(null!=S)for(var I=0;I<S.length;I++){var M=S[I];n=M.x-_,r=M.x+_,i=M.y-_,a=M.y+_,vi(d,n,i,r,a)}}}else{var O=e.source().position(),P=e.target().position();if((n=O.x)>(r=P.x)){var R=n;n=r,r=R}if((i=O.y)>(a=P.y)){var B=i;i=a,a=B}vi(d,n-=_,i-=_,r+=_,a+=_)}if(c&&t.includeEdges&&f&&(bi(d,e,"mid-source"),bi(d,e,"mid-target"),bi(d,e,"source"),bi(d,e,"target")),c)if("yes"===e.pstyle("ghost").value){var F=e.pstyle("ghost-offset-x").pfValue,z=e.pstyle("ghost-offset-y").pfValue;vi(d,d.x1+F,d.y1+z,d.x2+F,d.y2+z)}var G=p.bodyBounds=p.bodyBounds||{};xt(G,d),bt(G,y),mt(G,1),c&&(n=d.x1,r=d.x2,i=d.y1,a=d.y2,vi(d,n-E,i-E,r+E,a+E));var Y=p.overlayBounds=p.overlayBounds||{};xt(Y,d),bt(Y,y),mt(Y,1);var X=p.labelBounds=p.labelBounds||{};null!=X.all?((l=X.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):X.all=ft(),c&&t.includeLabels&&(t.includeMainLabels&&xi(d,e,null),f&&(t.includeSourceLabels&&xi(d,e,"source"),t.includeTargetLabels&&xi(d,e,"target")))}return d.x1=fi(d.x1),d.y1=fi(d.y1),d.x2=fi(d.x2),d.y2=fi(d.y2),d.w=fi(d.x2-d.x1),d.h=fi(d.y2-d.y1),d.w>0&&d.h>0&&b&&(bt(d,y),mt(d,1)),d},Ei=function(e){var t=0,n=function(e){return(e?1:0)<<t++},r=0;return r+=n(e.incudeNodes),r+=n(e.includeEdges),r+=n(e.includeLabels),r+=n(e.includeMainLabels),r+=n(e.includeSourceLabels),r+=n(e.includeTargetLabels),r+=n(e.includeOverlays),r+=n(e.includeOutlines)},_i=function(e){if(e.isEdge()){var t=e.source().position(),n=e.target().position(),r=function(e){return Math.round(e)};return function(e,t){var n={value:0,done:!1},r=0,i=e.length;return ce({next:function(){return r<i?n.value=e[r++]:n.done=!0,n}},t)}([r(t.x),r(t.y),r(n.x),r(n.y)])}return 0},Ti=function(e,t){var n,r=e._private,i=e.isEdge(),a=(null==t?Ci:Ei(t))===Ci,o=_i(e),s=r.bbCachePosKey===o,l=t.useCache&&s,u=function(e){return null==e._private.bbCache||e._private.styleDirty};if(!l||u(e)||i&&u(e.source())||u(e.target())?(s||e.recalculateRenderedStyle(l),n=wi(e,Di),r.bbCache=n,r.bbCachePosKey=o):n=r.bbCache,!a){var c=e.isNode();n=ft(),(t.includeNodes&&c||t.includeEdges&&!c)&&(t.includeOverlays?yi(n,r.overlayBounds):yi(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!i||t.includeSourceLabels&&t.includeTargetLabels)?yi(n,r.labelBounds.all):(t.includeMainLabels&&yi(n,r.labelBounds.mainRot),t.includeSourceLabels&&yi(n,r.labelBounds.sourceRot),t.includeTargetLabels&&yi(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},Di={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},Ci=Ei(Di),Ni=Me(Di);pi.boundingBox=function(e){var t;if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==e&&void 0!==e.useCache&&!0!==e.useCache){t=ft();var n=Ni(e=e||Di),r=this;if(r.cy().styleEnabled())for(var i=0;i<r.length;i++){var a=r[i],o=a._private,s=_i(a),l=o.bbCachePosKey===s,u=n.useCache&&l&&!o.styleDirty;a.recalculateRenderedStyle(u)}this.updateCompoundBounds(!e.useCache);for(var c=0;c<r.length;c++){var h=r[c];yi(t,Ti(h,n))}}else e=void 0===e?Di:Ni(e),t=Ti(this[0],e);return t.x1=fi(t.x1),t.y1=fi(t.y1),t.x2=fi(t.x2),t.y2=fi(t.y2),t.w=fi(t.x2-t.x1),t.h=fi(t.y2-t.y1),t},pi.dirtyBoundingBoxCache=function(){for(var e=0;e<this.length;e++){var t=this[e]._private;t.bbCache=null,t.bbCachePosKey=null,t.bodyBounds=null,t.overlayBounds=null,t.labelBounds.all=null,t.labelBounds.source=null,t.labelBounds.target=null,t.labelBounds.main=null,t.labelBounds.sourceRot=null,t.labelBounds.targetRot=null,t.labelBounds.mainRot=null,t.arrowBounds.source=null,t.arrowBounds.target=null,t.arrowBounds["mid-source"]=null,t.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},pi.boundingBoxAt=function(e){var t=this.nodes(),n=this.cy(),r=n.hasCompoundNodes(),i=n.collection();if(r&&(i=t.filter((function(e){return e.isParent()})),t=t.not(i)),S(e)){var a=e;e=function(){return a}}n.startBatch(),t.forEach((function(t,n){return t._private.bbAtOldPos=e(t,n)})).silentPositions(e),r&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0));var o=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}}(this.boundingBox({useCache:!1}));return t.silentPositions((function(e){return e._private.bbAtOldPos})),r&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0)),n.endBatch(),o},di.boundingbox=di.bb=di.boundingBox,di.renderedBoundingbox=di.renderedBoundingBox;var Ai,Li,ki=pi;Ai=Li={};var Si=function(e){e.uppercaseName=j(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=j(e.outerName),Ai[e.name]=function(){var t=this[0],n=t._private,r=n.cy._private.styleEnabled;if(t){if(r){if(t.isParent())return t.updateCompoundBounds(),n[e.autoName]||0;var i=t.pstyle(e.name);return"label"===i.strValue?(t.recalculateRenderedStyle(),n.rstyle[e.labelName]||0):i.pfValue}return 1}},Ai["outer"+e.uppercaseName]=function(){var t=this[0],n=t._private.cy._private.styleEnabled;if(t)return n?t[e.name]()+t.pstyle("border-width").pfValue+2*t.padding():1},Ai["rendered"+e.uppercaseName]=function(){var t=this[0];if(t)return t[e.name]()*this.cy().zoom()},Ai["rendered"+e.uppercaseOuterName]=function(){var t=this[0];if(t)return t[e.outerName]()*this.cy().zoom()}};Si({name:"width"}),Si({name:"height"}),Li.padding=function(){var e=this[0],t=e._private;return e.isParent()?(e.updateCompoundBounds(),void 0!==t.autoPadding?t.autoPadding:e.pstyle("padding").pfValue):e.pstyle("padding").pfValue},Li.paddedHeight=function(){var e=this[0];return e.height()+2*e.padding()},Li.paddedWidth=function(){var e=this[0];return e.width()+2*e.padding()};var Ii=Li,Mi={controlPoints:{get:function(e){return e.renderer().getControlPoints(e)},mult:!0},segmentPoints:{get:function(e){return e.renderer().getSegmentPoints(e)},mult:!0},sourceEndpoint:{get:function(e){return e.renderer().getSourceEndpoint(e)}},targetEndpoint:{get:function(e){return e.renderer().getTargetEndpoint(e)}},midpoint:{get:function(e){return e.renderer().getEdgeMidpoint(e)}}},Oi=Object.keys(Mi).reduce((function(e,t){var n=Mi[t],r=function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)}(t);return e[t]=function(){return function(e,t){if(e.isEdge())return t(e)}(this,n.get)},n.mult?e[r]=function(){return function(e,t){if(e.isEdge()){var n=e.cy(),r=n.pan(),i=n.zoom();return t(e).map((function(e){return rt(e,i,r)}))}}(this,n.get)}:e[r]=function(){return function(e,t){if(e.isEdge()){var n=e.cy();return rt(t(e),n.zoom(),n.pan())}}(this,n.get)},e}),{}),Pi=Q({},gi,ki,Ii,Oi),Ri=function(e,t){this.recycle(e,t)};function Bi(){return!1}function Fi(){return!0}Ri.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=Bi,null!=e&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?Fi:Bi):null!=e&&e.type?t=e:this.type=e,null!=t&&(this.originalEvent=t.originalEvent,this.type=null!=t.type?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition){var n=this.position,r=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:n.x*r+i.x,y:n.y*r+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=Fi;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=Fi;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Fi,this.stopPropagation()},isDefaultPrevented:Bi,isPropagationStopped:Bi,isImmediatePropagationStopped:Bi};var zi=/^([^.]+)(\.(?:[^.]+))?$/,Gi={qualifierCompare:function(e,t){return e===t},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},Yi=Object.keys(Gi),Xi={};function Vi(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xi,t=arguments.length>1?arguments[1]:void 0,n=0;n<Yi.length;n++){var r=Yi[n];this[r]=e[r]||Gi[r]}this.context=t||this.context,this.listeners=[],this.emitting=0}var Ui=Vi.prototype,ji=function(e,t,n,r,i,a,o){L(r)&&(i=r,r=null),o&&(a=null==a?o:Q({},a,o));for(var s=k(n)?n:n.split(/\s+/),l=0;l<s.length;l++){var u=s[l];if(!z(u)){var c=u.match(zi);if(c)if(!1===t(e,u,c[1],c[2]?c[2]:null,r,i,a))break}}},qi=function(e,t){return e.addEventFields(e.context,t),new Ri(t.type,t)},Hi=function(e,t,n){if("event"!==N(n))if(S(n))t(e,qi(e,n));else for(var r=k(n)?n:n.split(/\s+/),i=0;i<r.length;i++){var a=r[i];if(!z(a)){var o=a.match(zi);if(o){var s=o[1],l=o[2]?o[2]:null;t(e,qi(e,{type:s,namespace:l,target:e.context}))}}}else t(e,n)};Ui.on=Ui.addListener=function(e,t,n,r,i){return ji(this,(function(e,t,n,r,i,a,o){L(a)&&e.listeners.push({event:t,callback:a,type:n,namespace:r,qualifier:i,conf:o})}),e,t,n,r,i),this},Ui.one=function(e,t,n,r){return this.on(e,t,n,r,{one:!0})},Ui.removeListener=Ui.off=function(e,t,n,r){var i=this;0!==this.emitting&&(this.listeners=this.listeners.slice());for(var a=this.listeners,o=function(o){var s=a[o];ji(i,(function(t,n,r,i,l,u){if((s.type===r||"*"===e)&&(!i&&".*"!==s.namespace||s.namespace===i)&&(!l||t.qualifierCompare(s.qualifier,l))&&(!u||s.callback===u))return a.splice(o,1),!1}),e,t,n,r)},s=a.length-1;s>=0;s--)o(s);return this},Ui.removeAllListeners=function(){return this.removeListener("*")},Ui.emit=Ui.trigger=function(e,t,n){var r=this.listeners,i=r.length;return this.emitting++,k(t)||(t=[t]),Hi(this,(function(e,a){null!=n&&(r=[{event:a.event,type:a.type,namespace:a.namespace,callback:n}],i=r.length);for(var o=function(n){var i=r[n];if(i.type===a.type&&(!i.namespace||i.namespace===a.namespace||".*"===i.namespace)&&e.eventMatches(e.context,i,a)){var o=[a];null!=t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.push(r)}}(o,t),e.beforeEmit(e.context,i,a),i.conf&&i.conf.one&&(e.listeners=e.listeners.filter((function(e){return e!==i})));var s=e.callbackContext(e.context,i,a),l=i.callback.apply(s,o);e.afterEmit(e.context,i,a),!1===l&&(a.stopPropagation(),a.preventDefault())}},s=0;s<i;s++)o(s);e.bubble(e.context)&&!a.isPropagationStopped()&&e.parent(e.context).emit(a,t)}),e),this.emitting--,this};var Wi={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&P(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e.cy(),t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e},beforeEmit:function(e,t){t.conf&&t.conf.once&&t.conf.onceCollection.removeListener(t.event,t.qualifier,t.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},$i=function(e){return A(e)?new Hr(e):e},Ki={createEmitter:function(){for(var e=0;e<this.length;e++){var t=this[e],n=t._private;n.emitter||(n.emitter=new Vi(Wi,t))}return this},emitter:function(){return this._private.emitter},on:function(e,t,n){for(var r=$i(t),i=0;i<this.length;i++){this[i].emitter().on(e,r,n)}return this},removeListener:function(e,t,n){for(var r=$i(t),i=0;i<this.length;i++){this[i].emitter().removeListener(e,r,n)}return this},removeAllListeners:function(){for(var e=0;e<this.length;e++){this[e].emitter().removeAllListeners()}return this},one:function(e,t,n){for(var r=$i(t),i=0;i<this.length;i++){this[i].emitter().one(e,r,n)}return this},once:function(e,t,n){for(var r=$i(t),i=0;i<this.length;i++){this[i].emitter().on(e,r,n,{once:!0,onceCollection:this})}},emit:function(e,t){for(var n=0;n<this.length;n++){this[n].emitter().emit(e,t)}return this},emitAndNotify:function(e,t){if(0!==this.length)return this.cy().notify(e,this),this.emit(e,t),this}};ur.eventAliasesOn(Ki);var Zi={nodes:function(e){return this.filter((function(e){return e.isNode()})).filter(e)},edges:function(e){return this.filter((function(e){return e.isEdge()})).filter(e)},byGroup:function(){for(var e=this.spawn(),t=this.spawn(),n=0;n<this.length;n++){var r=this[n];r.isNode()?e.push(r):t.push(r)}return{nodes:e,edges:t}},filter:function(e,t){if(void 0===e)return this;if(A(e)||O(e))return new Hr(e).filter(this);if(L(e)){for(var n=this.spawn(),r=this,i=0;i<r.length;i++){var a=r[i];(t?e.apply(t,[a,i,r]):e(a,i,r))&&n.push(a)}return n}return this.spawn()},not:function(e){if(e){A(e)&&(e=this.filter(e));for(var t=this.spawn(),n=0;n<this.length;n++){var r=this[n];e.has(r)||t.push(r)}return t}return this},absoluteComplement:function(){return this.cy().mutableElements().not(this)},intersect:function(e){if(A(e)){var t=e;return this.filter(t)}for(var n=this.spawn(),r=e,i=this.length<e.length,a=i?this:r,o=i?r:this,s=0;s<a.length;s++){var l=a[s];o.has(l)&&n.push(l)}return n},xor:function(e){var t=this._private.cy;A(e)&&(e=t.$(e));var n=this.spawn(),r=e,i=function(e,t){for(var r=0;r<e.length;r++){var i=e[r],a=i._private.data.id;t.hasElementWithId(a)||n.push(i)}};return i(this,r),i(r,this),n},diff:function(e){var t=this._private.cy;A(e)&&(e=t.$(e));var n=this.spawn(),r=this.spawn(),i=this.spawn(),a=e,o=function(e,t,n){for(var r=0;r<e.length;r++){var a=e[r],o=a._private.data.id;t.hasElementWithId(o)?i.merge(a):n.push(a)}};return o(this,a,n),o(a,this,r),{left:n,right:r,both:i}},add:function(e){var t=this._private.cy;if(!e)return this;if(A(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=this.spawnSelf(),i=0;i<e.length;i++){var a=e[i],o=!this.has(a);o&&r.push(a)}return r},merge:function(e){var t=this._private,n=t.cy;if(!e)return this;if(e&&A(e)){var r=e;e=n.mutableElements().filter(r)}for(var i=t.map,a=0;a<e.length;a++){var o=e[a],s=o._private.data.id;if(!i.has(s)){var l=this.length++;this[l]=o,i.set(s,{ele:o,index:l})}}return this},unmergeAt:function(e){var t=this[e].id(),n=this._private.map;this[e]=void 0,n.delete(t);var r=e===this.length-1;if(this.length>1&&!r){var i=this.length-1,a=this[i],o=a._private.data.id;this[i]=void 0,this[e]=a,n.set(o,{ele:a,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&A(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r<e.length;r++)this.unmergeOne(e[r]);return this},unmergeBy:function(e){for(var t=this.length-1;t>=0;t--){e(this[t])&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],r=this,i=0;i<r.length;i++){var a=r[i],o=t?e.apply(t,[a,i,r]):e(a,i,r);n.push(o)}return n},reduce:function(e,t){for(var n=t,r=this,i=0;i<r.length;i++)n=e(n,r[i],i,r);return n},max:function(e,t){for(var n,r=-1/0,i=this,a=0;a<i.length;a++){var o=i[a],s=t?e.apply(t,[o,a,i]):e(o,a,i);s>r&&(r=s,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,i=this,a=0;a<i.length;a++){var o=i[a],s=t?e.apply(t,[o,a,i]):e(o,a,i);s<r&&(r=s,n=o)}return{value:r,ele:n}}},Qi=Zi;Qi.u=Qi["|"]=Qi["+"]=Qi.union=Qi.or=Qi.add,Qi["\\"]=Qi["!"]=Qi["-"]=Qi.difference=Qi.relativeComplement=Qi.subtract=Qi.not,Qi.n=Qi["&"]=Qi["."]=Qi.and=Qi.intersection=Qi.intersect,Qi["^"]=Qi["(+)"]=Qi["(-)"]=Qi.symmetricDifference=Qi.symdiff=Qi.xor,Qi.fnFilter=Qi.filterFn=Qi.stdFilter=Qi.filter,Qi.complement=Qi.abscomp=Qi.absoluteComplement;var Ji=function(e,t){var n=e.cy().hasCompoundNodes();function r(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?n?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?we:0}var i=r(e)-r(t);if(0!==i)return i;function a(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}var o=a(e)-a(t);if(0!==o)return o;var s=e.pstyle("z-index").value-t.pstyle("z-index").value;return 0!==s?s:e.poolIndex()-t.poolIndex()},ea={forEach:function(e,t){if(L(e))for(var n=this.length,r=0;r<n;r++){var i=this[r];if(!1===(t?e.apply(t,[i,r,this]):e(i,r,this)))break}return this},toArray:function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t]);return e},slice:function(e,t){var n=[],r=this.length;null==t&&(t=r),null==e&&(e=0),e<0&&(e=r+e),t<0&&(t=r+t);for(var i=e;i>=0&&i<t&&i<r;i++)n.push(this[i]);return this.spawn(n)},size:function(){return this.length},eq:function(e){return this[e]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return 0===this.length},nonempty:function(){return!this.empty()},sort:function(e){if(!L(e))return this;var t=this.toArray().sort(e);return this.spawn(t)},sortByZIndex:function(){return this.sort(Ji)},zDepth:function(){var e=this[0];if(e){var t=e._private;if("nodes"===t.group){var n=t.data.parent?e.parents().size():0;return e.isParent()?n:we-1}var r=t.source,i=t.target,a=r.zDepth(),o=i.zDepth();return Math.max(a,o,0)}}};ea.each=ea.forEach;var ta;ta="undefined",("undefined"==typeof Symbol?"undefined":g(Symbol))!=ta&&g(Symbol.iterator)!=ta&&(ea[Symbol.iterator]=function(){var e=this,t={value:void 0,done:!1},n=0,r=this.length;return m({next:function(){return n<r?t.value=e[n++]:(t.value=void 0,t.done=!0),t}},Symbol.iterator,(function(){return this}))});var na=Me({nodeDimensionsIncludeLabels:!1}),ra={layoutDimensions:function(e){var t;if(e=na(e),this.takesUpSpace())if(e.nodeDimensionsIncludeLabels){var n=this.boundingBox();t={w:n.w,h:n.h}}else t={w:this.outerWidth(),h:this.outerHeight()};else t={w:0,h:0};return 0!==t.w&&0!==t.h||(t.w=t.h=1),t},layoutPositions:function(e,t,n){var r=this.nodes().filter((function(e){return!e.isParent()})),i=this.cy(),a=t.eles,o=function(e){return e.id()},s=Y(n,o);e.emit({type:"layoutstart",layout:e}),e.animations=[];var l=t.spacingFactor&&1!==t.spacingFactor,u=function(){if(!l)return null;for(var e=ft(),t=0;t<r.length;t++){var n=r[t],i=s(n,t);yt(e,i.x,i.y)}return e}(),c=Y((function(e,n){var r=s(e,n);l&&(r=function(e,t,n){var r=t.x1+t.w/2,i=t.y1+t.h/2;return{x:r+(n.x-r)*e,y:i+(n.y-i)*e}}(Math.abs(t.spacingFactor),u,r));return null!=t.transform&&(r=t.transform(e,r)),r}),o);if(t.animate){for(var h=0;h<r.length;h++){var d=r[h],p=c(d,h);if(null==t.animateFilter||t.animateFilter(d,h)){var g=d.animation({position:p,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(g)}else d.position(p)}if(t.fit){var f=i.animation({fit:{boundingBox:a.boundingBoxAt(c),padding:t.padding},duration:t.animationDuration,easing:t.animationEasing});e.animations.push(f)}else if(void 0!==t.zoom&&void 0!==t.pan){var v=i.animation({zoom:t.zoom,pan:t.pan,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(v)}e.animations.forEach((function(e){return e.play()})),e.one("layoutready",t.ready),e.emit({type:"layoutready",layout:e}),rr.all(e.animations.map((function(e){return e.promise()}))).then((function(){e.one("layoutstop",t.stop),e.emit({type:"layoutstop",layout:e})}))}else r.positions(c),t.fit&&i.fit(t.eles,t.padding),null!=t.zoom&&i.zoom(t.zoom),t.pan&&i.pan(t.pan),e.one("layoutready",t.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",t.stop),e.emit({type:"layoutstop",layout:e});return this},layout:function(e){return this.cy().makeLayout(Q({},e,{eles:this}))}};function ia(e,t,n){var r,i=n._private,a=i.styleCache=i.styleCache||[];return null!=(r=a[e])?r:r=a[e]=t(n)}function aa(e,t){return e=fe(e),function(n){return ia(e,t,n)}}function oa(e,t){e=fe(e);var n=function(e){return t.call(e)};return function(){var t=this[0];if(t)return ia(e,n,t)}}ra.createLayout=ra.makeLayout=ra.layout;var sa={recalculateRenderedStyle:function(e){var t=this.cy(),n=t.renderer(),r=t.styleEnabled();return n&&r&&n.recalculateRenderedStyle(this,e),this},dirtyStyleCache:function(){var e,t=this.cy(),n=function(e){return e._private.styleCache=null};t.hasCompoundNodes()?((e=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(e.connectedEdges()),e.forEach(n)):this.forEach((function(e){n(e),e.connectedEdges().forEach(n)}));return this},updateStyle:function(e){var t=this._private.cy;if(!t.styleEnabled())return this;if(t.batching())return t._private.batchStyleEles.merge(this),this;var n=this;e=!(!e&&void 0!==e),t.hasCompoundNodes()&&(n=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var r=n;return e?r.emitAndNotify("style"):r.emit("style"),n.forEach((function(e){return e._private.styleDirty=!0})),this},cleanStyle:function(){var e=this.cy();if(e.styleEnabled())for(var t=0;t<this.length;t++){var n=this[t];n._private.styleDirty&&(n._private.styleDirty=!1,e.style().apply(n))}},parsedStyle:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var i=n._private.style[e];return null!=i?i:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,i=n.style();if(S(e)){var a=e;i.applyBypass(this,a,r),this.emitAndNotify("style")}else if(A(e)){if(void 0===t){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}i.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?i.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(void 0===e)for(var a=0;a<i.length;a++){var o=i[a];r.removeAllBypasses(o,n)}else{e=e.split(/\s+/);for(var s=0;s<i.length;s++){var l=i[s];r.removeBypasses(l,e,n)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var e=this.cy();if(!e.styleEnabled())return 1;var t=e.hasCompoundNodes(),n=this[0];if(n){var r=n._private,i=n.pstyle("opacity").value;if(!t)return i;var a=r.data.parent?n.parents():null;if(a)for(var o=0;o<a.length;o++){i*=a[o].pstyle("opacity").value}return i}},transparent:function(){if(!this.cy().styleEnabled())return!1;var e=this[0],t=e.cy().hasCompoundNodes();return e?t?0===e.effectiveOpacity():0===e.pstyle("opacity").value:void 0},backgrounding:function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding}};function la(e,t){var n=e._private.data.parent?e.parents():null;if(n)for(var r=0;r<n.length;r++){if(!t(n[r]))return!1}return!0}function ua(e){var t=e.ok,n=e.edgeOkViaNode||e.ok,r=e.parentOk||e.ok;return function(){var e=this.cy();if(!e.styleEnabled())return!0;var i=this[0],a=e.hasCompoundNodes();if(i){var o=i._private;if(!t(i))return!1;if(i.isNode())return!a||la(i,r);var s=o.source,l=o.target;return n(s)&&(!a||la(s,n))&&(s===l||n(l)&&(!a||la(l,n)))}}}var ca=aa("eleTakesUpSpace",(function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())}));sa.takesUpSpace=oa("takesUpSpace",ua({ok:ca}));var ha=aa("eleInteractive",(function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&ca(e)})),da=aa("parentInteractive",(function(e){return"visible"===e.pstyle("visibility").value&&ca(e)}));sa.interactive=oa("interactive",ua({ok:ha,parentOk:da,edgeOkViaNode:ca})),sa.noninteractive=function(){var e=this[0];if(e)return!e.interactive()};var pa=aa("eleVisible",(function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&ca(e)})),ga=ca;sa.visible=oa("visible",ua({ok:pa,edgeOkViaNode:ga})),sa.hidden=function(){var e=this[0];if(e)return!e.visible()},sa.isBundledBezier=oa("isBundledBezier",(function(){return!!this.cy().styleEnabled()&&(!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace())})),sa.bypass=sa.css=sa.style,sa.renderedCss=sa.renderedStyle,sa.removeBypass=sa.removeCss=sa.removeStyle,sa.pstyle=sa.parsedStyle;var fa={};function va(e){return function(){var t=arguments,n=[];if(2===t.length){var r=t[0],i=t[1];this.on(e.event,r,i)}else if(1===t.length&&L(t[0])){var a=t[0];this.on(e.event,a)}else if(0===t.length||1===t.length&&k(t[0])){for(var o=1===t.length?t[0]:null,s=0;s<this.length;s++){var l=this[s],u=!e.ableField||l._private[e.ableField],c=l._private[e.field]!=e.value;if(e.overrideAble){var h=e.overrideAble(l);if(void 0!==h&&(u=h,!h))return this}u&&(l._private[e.field]=e.value,c&&n.push(l))}var d=this.spawn(n);d.updateStyle(),d.emit(e.event),o&&d.emit(o)}return this}}function ya(e){fa[e.field]=function(){var t=this[0];if(t){if(e.overrideField){var n=e.overrideField(t);if(void 0!==n)return n}return t._private[e.field]}},fa[e.on]=va({event:e.on,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!0}),fa[e.off]=va({event:e.off,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!1})}ya({field:"locked",overrideField:function(e){return!!e.cy().autolock()||void 0},on:"lock",off:"unlock"}),ya({field:"grabbable",overrideField:function(e){return!e.cy().autoungrabify()&&!e.pannable()&&void 0},on:"grabify",off:"ungrabify"}),ya({field:"selected",ableField:"selectable",overrideAble:function(e){return!e.cy().autounselectify()&&void 0},on:"select",off:"unselect"}),ya({field:"selectable",overrideField:function(e){return!e.cy().autounselectify()&&void 0},on:"selectify",off:"unselectify"}),fa.deselect=fa.unselect,fa.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},ya({field:"active",on:"activate",off:"unactivate"}),ya({field:"pannable",on:"panify",off:"unpanify"}),fa.inactive=function(){var e=this[0];if(e)return!e._private.active};var ma={},ba=function(e){return function(t){for(var n=[],r=0;r<this.length;r++){var i=this[r];if(i.isNode()){for(var a=!1,o=i.connectedEdges(),s=0;s<o.length;s++){var l=o[s],u=l.source(),c=l.target();if(e.noIncomingEdges&&c===i&&u!==i||e.noOutgoingEdges&&u===i&&c!==i){a=!0;break}}a||n.push(i)}}return this.spawn(n,!0).filter(t)}},xa=function(e){return function(t){for(var n=[],r=0;r<this.length;r++){var i=this[r];if(i.isNode())for(var a=i.connectedEdges(),o=0;o<a.length;o++){var s=a[o],l=s.source(),u=s.target();e.outgoing&&l===i?(n.push(s),n.push(u)):e.incoming&&u===i&&(n.push(s),n.push(l))}}return this.spawn(n,!0).filter(t)}},wa=function(e){return function(t){for(var n=this,r=[],i={};;){var a=e.outgoing?n.outgoers():n.incomers();if(0===a.length)break;for(var o=!1,s=0;s<a.length;s++){var l=a[s],u=l.id();i[u]||(i[u]=!0,r.push(l),o=!0)}if(!o)break;n=a}return this.spawn(r,!0).filter(t)}};function Ea(e){return function(t){for(var n=[],r=0;r<this.length;r++){var i=this[r]._private[e.attr];i&&n.push(i)}return this.spawn(n,!0).filter(t)}}function _a(e){return function(t){var n=[],r=this._private.cy,i=e||{};A(t)&&(t=r.$(t));for(var a=0;a<t.length;a++)for(var o=t[a]._private.edges,s=0;s<o.length;s++){var l=o[s],u=l._private.data,c=this.hasElementWithId(u.source)&&t.hasElementWithId(u.target),h=t.hasElementWithId(u.source)&&this.hasElementWithId(u.target);if(c||h){if(i.thisIsSrc||i.thisIsTgt){if(i.thisIsSrc&&!c)continue;if(i.thisIsTgt&&!h)continue}n.push(l)}}return this.spawn(n,!0)}}function Ta(e){return e=Q({},{codirected:!1},e),function(t){for(var n=[],r=this.edges(),i=e,a=0;a<r.length;a++)for(var o=r[a]._private,s=o.source,l=s._private.data.id,u=o.data.target,c=s._private.edges,h=0;h<c.length;h++){var d=c[h],p=d._private.data,g=p.target,f=p.source,v=g===u&&f===l,y=l===g&&u===f;(i.codirected&&v||!i.codirected&&(v||y))&&n.push(d)}return this.spawn(n,!0).filter(t)}}ma.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},Q(ma,{roots:ba({noIncomingEdges:!0}),leaves:ba({noOutgoingEdges:!0}),outgoers:Qr(xa({outgoing:!0}),"outgoers"),successors:wa({outgoing:!0}),incomers:Qr(xa({incoming:!0}),"incomers"),predecessors:wa({incoming:!0})}),Q(ma,{neighborhood:Qr((function(e){for(var t=[],n=this.nodes(),r=0;r<n.length;r++)for(var i=n[r],a=i.connectedEdges(),o=0;o<a.length;o++){var s=a[o],l=s.source(),u=s.target(),c=i===l?u:l;c.length>0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),ma.neighbourhood=ma.neighborhood,ma.closedNeighbourhood=ma.closedNeighborhood,ma.openNeighbourhood=ma.openNeighborhood,Q(ma,{source:Qr((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:Qr((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:Ea({attr:"source"}),targets:Ea({attr:"target"})}),Q(ma,{edgesWith:Qr(_a(),"edgesWith"),edgesTo:Qr(_a({thisIsSrc:!0}),"edgesTo")}),Q(ma,{connectedEdges:Qr((function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];if(r.isNode())for(var i=r._private.edges,a=0;a<i.length;a++){var o=i[a];t.push(o)}}return this.spawn(t,!0).filter(e)}),"connectedEdges"),connectedNodes:Qr((function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];r.isEdge()&&(t.push(r.source()[0]),t.push(r.target()[0]))}return this.spawn(t,!0).filter(e)}),"connectedNodes"),parallelEdges:Qr(Ta(),"parallelEdges"),codirectedEdges:Qr(Ta({codirected:!0}),"codirectedEdges")}),Q(ma,{components:function(e){var t=this,n=t.cy(),r=n.collection(),i=null==e?t.nodes():e.nodes(),a=[];null!=e&&i.empty()&&(i=e.sources());var o=function(e,t){r.merge(e),i.unmerge(e),t.merge(e)};if(i.empty())return t.spawn();var s=function(){var e=n.collection();a.push(e);var r=i[0];o(r,e),t.bfs({directed:!1,roots:r,visit:function(t){return o(t,e)}}),e.forEach((function(n){n.connectedEdges().forEach((function(n){t.has(n)&&e.has(n.source())&&e.has(n.target())&&e.merge(n)}))}))};do{s()}while(i.length>0);return a},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),ma.componentsOf=ma.components;var Da=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var i=new Fe,a=!1;if(t){if(t.length>0&&S(t[0])&&!P(t[0])){a=!0;for(var o=[],s=new Ge,l=0,u=t.length;l<u;l++){var c=t[l];null==c.data&&(c.data={});var h=c.data;if(null==h.id)h.id=ke();else if(e.hasElementWithId(h.id)||s.has(h.id))continue;var d=new Ye(e,c,!1);o.push(d),s.add(h.id)}t=o}}else t=[];this.length=0;for(var p=0,g=t.length;p<g;p++){var f=t[p][0];if(null!=f){var v=f._private.data.id;n&&i.has(v)||(n&&i.set(v,{index:this.length,ele:f}),this[this.length]=f,this.length++)}}this._private={eles:this,cy:e,get map(){return null==this.lazyMap&&this.rebuildMap(),this.lazyMap},set map(e){this.lazyMap=e},rebuildMap:function(){for(var e=this.lazyMap=new Fe,t=this.eles,n=0;n<t.length;n++){var r=t[n];e.set(r.id(),{index:n,ele:r})}}},n&&(this._private.map=i),a&&!r&&this.restore()}else Ce("A collection must have a reference to the core")},Ca=Ye.prototype=Da.prototype=Object.create(Array.prototype);Ca.instanceString=function(){return"collection"},Ca.spawn=function(e,t){return new Da(this.cy(),e,t)},Ca.spawnSelf=function(){return this.spawn(this)},Ca.cy=function(){return this._private.cy},Ca.renderer=function(){return this._private.cy.renderer()},Ca.element=function(){return this[0]},Ca.collection=function(){return R(this)?this:new Da(this._private.cy,[this])},Ca.unique=function(){return new Da(this._private.cy,this,!0)},Ca.hasElementWithId=function(e){return e=""+e,this._private.map.has(e)},Ca.getElementById=function(e){e=""+e;var t=this._private.cy,n=this._private.map.get(e);return n?n.ele:new Da(t)},Ca.$id=Ca.getElementById,Ca.poolIndex=function(){var e=this._private.cy._private.elements,t=this[0]._private.data.id;return e._private.map.get(t).index},Ca.indexOf=function(e){var t=e[0]._private.data.id;return this._private.map.get(t).index},Ca.indexOfId=function(e){return e=""+e,this._private.map.get(e).index},Ca.json=function(e){var t=this.element(),n=this.cy();if(null==t&&e)return this;if(null!=t){var r=t._private;if(S(e)){if(n.startBatch(),e.data){t.data(e.data);var i=r.data;if(t.isEdge()){var a=!1,o={},s=e.data.source,l=e.data.target;null!=s&&s!=i.source&&(o.source=""+s,a=!0),null!=l&&l!=i.target&&(o.target=""+l,a=!0),a&&(t=t.move(o))}else{var u="parent"in e.data,c=e.data.parent;!u||null==c&&null==i.parent||c==i.parent||(void 0===c&&(c=null),null!=c&&(c=""+c),t=t.move({parent:c}))}}e.position&&t.position(e.position);var h=function(n,i,a){var o=e[n];null!=o&&o!==r[n]&&(o?t[i]():t[a]())};return h("removed","remove","restore"),h("selected","select","unselect"),h("selectable","selectify","unselectify"),h("locked","lock","unlock"),h("grabbable","grabify","ungrabify"),h("pannable","panify","unpanify"),null!=e.classes&&t.classes(e.classes),n.endBatch(),this}if(void 0===e){var d={data:Le(r.data),position:Le(r.position),group:r.group,removed:r.removed,selected:r.selected,selectable:r.selectable,locked:r.locked,grabbable:r.grabbable,pannable:r.pannable,classes:null};d.classes="";var p=0;return r.classes.forEach((function(e){return d.classes+=0==p++?e:" "+e})),d}}},Ca.jsons=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t].json();e.push(n)}return e},Ca.clone=function(){for(var e=this.cy(),t=[],n=0;n<this.length;n++){var r=this[n].json(),i=new Ye(e,r,!1);t.push(i)}return new Da(e,t)},Ca.copy=Ca.clone,Ca.restore=function(){for(var e,t,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,a=i.cy(),o=a._private,s=[],l=[],u=0,c=i.length;u<c;u++){var h=i[u];r&&!h.removed()||(h.isNode()?s.push(h):l.push(h))}e=s.concat(l);var d=function(){e.splice(t,1),t--};for(t=0;t<e.length;t++){var p=e[t],g=p._private,f=g.data;if(p.clearTraversalCache(),r||g.removed)if(void 0===f.id)f.id=ke();else if(I(f.id))f.id=""+f.id;else{if(z(f.id)||!A(f.id)){Ce("Can not create element with invalid string ID `"+f.id+"`"),d();continue}if(a.hasElementWithId(f.id)){Ce("Can not create second element with ID `"+f.id+"`"),d();continue}}else;var v=f.id;if(p.isNode()){var y=g.position;null==y.x&&(y.x=0),null==y.y&&(y.y=0)}if(p.isEdge()){for(var m=p,b=["source","target"],x=b.length,w=!1,E=0;E<x;E++){var _=b[E],T=f[_];I(T)&&(T=f[_]=""+f[_]),null==T||""===T?(Ce("Can not create edge `"+v+"` with unspecified "+_),w=!0):a.hasElementWithId(T)||(Ce("Can not create edge `"+v+"` with nonexistant "+_+" `"+T+"`"),w=!0)}if(w){d();continue}var D=a.getElementById(f.source),C=a.getElementById(f.target);D.same(C)?D._private.edges.push(m):(D._private.edges.push(m),C._private.edges.push(m)),m._private.source=D,m._private.target=C}g.map=new Fe,g.map.set(v,{ele:p,index:0}),g.removed=!1,r&&a.addToPool(p)}for(var N=0;N<s.length;N++){var L=s[N],k=L._private.data;I(k.parent)&&(k.parent=""+k.parent);var S=k.parent;if(null!=S||L._private.parent){var M=L._private.parent?a.collection().merge(L._private.parent):a.getElementById(S);if(M.empty())k.parent=void 0;else if(M[0].removed())Ae("Node added with missing parent, reference to parent removed"),k.parent=void 0,L._private.parent=null;else{for(var O=!1,P=M;!P.empty();){if(L.same(P)){O=!0,k.parent=void 0;break}P=P.parent()}O||(M[0]._private.children.push(L),L._private.parent=M[0],o.hasCompoundNodes=!0)}}}if(e.length>0){for(var R=e.length===i.length?i:new Da(a,e),B=0;B<R.length;B++){var F=R[B];F.isNode()||(F.parallelEdges().clearTraversalCache(),F.source().clearTraversalCache(),F.target().clearTraversalCache())}(o.hasCompoundNodes?a.collection().merge(R).merge(R.connectedNodes()).merge(R.parent()):R).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(n),n?R.emitAndNotify("add"):r&&R.emit("add")}return i},Ca.removed=function(){var e=this[0];return e&&e._private.removed},Ca.inside=function(){var e=this[0];return e&&!e._private.removed},Ca.remove=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},a=n._private.cy;function o(e){var n=i[e.id()];t&&e.removed()||n||(i[e.id()]=!0,e.isNode()?(r.push(e),function(e){for(var t=e._private.edges,n=0;n<t.length;n++)o(t[n])}(e),function(e){for(var t=e._private.children,n=0;n<t.length;n++)o(t[n])}(e)):r.unshift(e))}for(var s=0,l=n.length;s<l;s++){o(n[s])}function u(e,t){var n=e._private.edges;Oe(n,t),e.clearTraversalCache()}function c(e){e.clearTraversalCache()}var h=[];function d(e,t){t=t[0];var n=(e=e[0])._private.children,r=e.id();Oe(n,t),t._private.parent=null,h.ids[r]||(h.ids[r]=!0,h.push(e))}h.ids={},n.dirtyCompoundBoundsCache(),t&&a.removeFromPool(r);for(var p=0;p<r.length;p++){var g=r[p];if(g.isEdge()){var f=g.source()[0],v=g.target()[0];u(f,g),u(v,g);for(var y=g.parallelEdges(),m=0;m<y.length;m++){var b=y[m];c(b),b.isBundledBezier()&&b.dirtyBoundingBoxCache()}}else{var x=g.parent();0!==x.length&&d(x,g)}t&&(g._private.removed=!0)}var w=a._private.elements;a._private.hasCompoundNodes=!1;for(var E=0;E<w.length;E++){if(w[E].isParent()){a._private.hasCompoundNodes=!0;break}}var _=new Da(this.cy(),r);_.size()>0&&(e?_.emitAndNotify("remove"):t&&_.emit("remove"));for(var T=0;T<h.length;T++){var D=h[T];t&&D.removed()||D.updateStyle()}return _},Ca.move=function(e){var t=this._private.cy,n=this,r=!1,i=!1,a=function(e){return null==e?e:""+e};if(void 0!==e.source||void 0!==e.target){var o=a(e.source),s=a(e.target),l=null!=o&&t.hasElementWithId(o),u=null!=s&&t.hasElementWithId(s);(l||u)&&(t.batch((function(){n.remove(r,i),n.emitAndNotify("moveout");for(var e=0;e<n.length;e++){var t=n[e],a=t._private.data;t.isEdge()&&(l&&(a.source=o),u&&(a.target=s))}n.restore(r,i)})),n.emitAndNotify("move"))}else if(void 0!==e.parent){var c=a(e.parent);if(null===c||t.hasElementWithId(c)){var h=null===c?void 0:c;t.batch((function(){var e=n.remove(r,i);e.emitAndNotify("moveout");for(var t=0;t<n.length;t++){var a=n[t],o=a._private.data;a.isNode()&&(o.parent=h)}e.restore(r,i)})),n.emitAndNotify("move")}}return this},[Kn,cr,hr,$r,Jr,oi,si,Pi,Ki,Zi,{isNode:function(){return"nodes"===this.group()},isEdge:function(){return"edges"===this.group()},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var e=this[0];if(e)return e._private.group}},ea,ra,sa,fa,ma].forEach((function(e){Q(Ca,e)}));var Na={add:function(e){var t,n=this;if(O(e)){var r=e;if(r._private.cy===n)t=r.restore();else{for(var i=[],a=0;a<r.length;a++){var o=r[a];i.push(o.json())}t=new Da(n,i)}}else if(k(e)){t=new Da(n,e)}else if(S(e)&&(k(e.nodes)||k(e.edges))){for(var s=e,l=[],u=["nodes","edges"],c=0,h=u.length;c<h;c++){var d=u[c],p=s[d];if(k(p))for(var g=0,f=p.length;g<f;g++){var v=Q({group:d},p[g]);l.push(v)}}t=new Da(n,l)}else{t=new Ye(n,e).collection()}return t},remove:function(e){if(O(e));else if(A(e)){var t=e;e=this.$(t)}return e.remove()}};function Aa(e,t,n,r){var i=4,a=1e-7,o=10,s=11,l=1/(s-1),u="undefined"!=typeof Float32Array;if(4!==arguments.length)return!1;for(var c=0;c<4;++c)if("number"!=typeof arguments[c]||isNaN(arguments[c])||!isFinite(arguments[c]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var h=u?new Float32Array(s):new Array(s);function d(e,t){return 1-3*t+3*e}function p(e,t){return 3*t-6*e}function g(e){return 3*e}function f(e,t,n){return((d(t,n)*e+p(t,n))*e+g(t))*e}function v(e,t,n){return 3*d(t,n)*e*e+2*p(t,n)*e+g(t)}function y(t){for(var r=0,u=1,c=s-1;u!==c&&h[u]<=t;++u)r+=l;--u;var d=r+(t-h[u])/(h[u+1]-h[u])*l,p=v(d,e,n);return p>=.001?function(t,r){for(var a=0;a<i;++a){var o=v(r,e,n);if(0===o)return r;r-=(f(r,e,n)-t)/o}return r}(t,d):0===p?d:function(t,r,i){var s,l,u=0;do{(s=f(l=r+(i-r)/2,e,n)-t)>0?i=l:r=l}while(Math.abs(s)>a&&++u<o);return l}(t,r,r+l)}var m=!1;function b(){m=!0,e===t&&n===r||function(){for(var t=0;t<s;++t)h[t]=f(t*l,e,n)}()}var x=function(i){return m||b(),e===t&&n===r?i:0===i?0:1===i?1:f(y(i),t,r)};x.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var w="generateBezier("+[e,t,n,r]+")";return x.toString=function(){return w},x}var La=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},a=t(n,.5*r,i),o=t(n,.5*r,a),s=t(n,r,o),l=1/6*(i.dx+2*(a.dx+o.dx)+s.dx),u=1/6*(i.dv+2*(a.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,i){var a,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,h=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,l.tension=t,l.friction=r,o=(a=null!==i)?(c=e(t,r))/i*.016:.016;s=n(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>h&&Math.abs(s.v)>h;);return a?function(e){return u[e*(u.length-1)|0]}:c}}(),ka=function(e,t,n,r){var i=Aa(e,t,n,r);return function(e,t,n){return e+(t-e)*i(n)}},Sa={linear:function(e,t,n){return e+(t-e)*n},ease:ka(.25,.1,.25,1),"ease-in":ka(.42,0,1,1),"ease-out":ka(0,0,.58,1),"ease-in-out":ka(.42,0,.58,1),"ease-in-sine":ka(.47,0,.745,.715),"ease-out-sine":ka(.39,.575,.565,1),"ease-in-out-sine":ka(.445,.05,.55,.95),"ease-in-quad":ka(.55,.085,.68,.53),"ease-out-quad":ka(.25,.46,.45,.94),"ease-in-out-quad":ka(.455,.03,.515,.955),"ease-in-cubic":ka(.55,.055,.675,.19),"ease-out-cubic":ka(.215,.61,.355,1),"ease-in-out-cubic":ka(.645,.045,.355,1),"ease-in-quart":ka(.895,.03,.685,.22),"ease-out-quart":ka(.165,.84,.44,1),"ease-in-out-quart":ka(.77,0,.175,1),"ease-in-quint":ka(.755,.05,.855,.06),"ease-out-quint":ka(.23,1,.32,1),"ease-in-out-quint":ka(.86,0,.07,1),"ease-in-expo":ka(.95,.05,.795,.035),"ease-out-expo":ka(.19,1,.22,1),"ease-in-out-expo":ka(1,0,0,1),"ease-in-circ":ka(.6,.04,.98,.335),"ease-out-circ":ka(.075,.82,.165,1),"ease-in-out-circ":ka(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Sa.linear;var r=La(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":ka};function Ia(e,t,n,r,i){if(1===r)return n;if(t===n)return n;var a=i(t,n,r);return null==e||((e.roundValue||e.color)&&(a=Math.round(a)),void 0!==e.min&&(a=Math.max(a,e.min)),void 0!==e.max&&(a=Math.min(a,e.max))),a}function Ma(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function Oa(e,t,n,r,i){var a=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var o=Ma(e,i),s=Ma(t,i);if(I(o)&&I(s))return Ia(a,o,s,n,r);if(k(o)&&k(s)){for(var l=[],u=0;u<s.length;u++){var c=o[u],h=s[u];if(null!=c&&null!=h){var d=Ia(a,c,h,n,r);l.push(d)}else l.push(h)}return l}}function Pa(e,t,n,r){var i=!r,a=e._private,o=t._private,s=o.easing,l=o.startTime,u=(r?e:e.cy()).style();if(!o.easingImpl)if(null==s)o.easingImpl=Sa.linear;else{var c,h,d;if(A(s))c=u.parse("transition-timing-function",s).value;else c=s;A(c)?(h=c,d=[]):(h=c[1],d=c.slice(2).map((function(e){return+e}))),d.length>0?("spring"===h&&d.push(o.duration),o.easingImpl=Sa[h].apply(null,d)):o.easingImpl=Sa[h]}var p,g=o.easingImpl;if(p=0===o.duration?1:(n-l)/o.duration,o.applying&&(p=o.progress),p<0?p=0:p>1&&(p=1),null==o.delay){var f=o.startPosition,v=o.position;if(v&&i&&!e.locked()){var y={};Ra(f.x,v.x)&&(y.x=Oa(f.x,v.x,p,g)),Ra(f.y,v.y)&&(y.y=Oa(f.y,v.y,p,g)),e.position(y)}var m=o.startPan,b=o.pan,x=a.pan,w=null!=b&&r;w&&(Ra(m.x,b.x)&&(x.x=Oa(m.x,b.x,p,g)),Ra(m.y,b.y)&&(x.y=Oa(m.y,b.y,p,g)),e.emit("pan"));var E=o.startZoom,_=o.zoom,T=null!=_&&r;T&&(Ra(E,_)&&(a.zoom=gt(a.minZoom,Oa(E,_,p,g),a.maxZoom)),e.emit("zoom")),(w||T)&&e.emit("viewport");var D=o.style;if(D&&D.length>0&&i){for(var C=0;C<D.length;C++){var N=D[C],L=N.name,k=N,S=o.startStyle[L],I=Oa(S,k,p,g,u.properties[S.name]);u.overrideBypass(e,L,I)}e.emit("style")}}return o.progress=p,p}function Ra(e,t){return null!=e&&null!=t&&(!(!I(e)||!I(t))||!(!e||!t))}function Ba(e,t,n,r){var i=t._private;i.started=!0,i.startTime=n-i.progress*i.duration}function Fa(e,t){var n=t._private.aniEles,r=[];function i(t,n){var i=t._private,a=i.animation.current,o=i.animation.queue,s=!1;if(0===a.length){var l=o.shift();l&&a.push(l)}for(var u=function(e){for(var t=e.length-1;t>=0;t--){(0,e[t])()}e.splice(0,e.length)},c=a.length-1;c>=0;c--){var h=a[c],d=h._private;d.stopped?(a.splice(c,1),d.hooked=!1,d.playing=!1,d.started=!1,u(d.frames)):(d.playing||d.applying)&&(d.playing&&d.applying&&(d.applying=!1),d.started||Ba(0,h,e),Pa(t,h,e,n),d.applying&&(d.applying=!1),u(d.frames),null!=d.step&&d.step(e),h.completed()&&(a.splice(c,1),d.hooked=!1,d.playing=!1,d.started=!1,u(d.completes)),s=!0)}return n||0!==a.length||0!==o.length||r.push(t),s}for(var a=!1,o=0;o<n.length;o++){var s=i(n[o]);a=a||s}var l=i(t,!0);(a||l)&&(n.length>0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var za={animate:ur.animate(),animation:ur.animation(),animated:ur.animated(),clearQueue:ur.clearQueue(),delay:ur.delay(),delayAnimation:ur.delayAnimation(),stop:ur.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){Fa(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&oe((function(n){Fa(n,e),t()}))}()}}},Ga={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&P(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},Ya=function(e){return A(e)?new Hr(e):e},Xa={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Vi(Ga,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Ya(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Ya(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Ya(t),n),this},once:function(e,t,n){return this.emitter().one(e,Ya(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};ur.eventAliasesOn(Xa);var Va={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};Va.jpeg=Va.jpg;var Ua={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n=e.name,r=t.extension("layout",n);if(null!=r){var i;i=A(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$();var a=new r(Q({},e,{cy:t,eles:i}));return a}Ce("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?")}else Ce("A `name` must be specified to make a layout");else Ce("Layout options must be specified to make a layout")}};Ua.createLayout=Ua.makeLayout=Ua.layout;var ja={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r<n.length;r++){var i=n[r],a=e[i];t.getElementById(i).data(a)}}))}},qa=Me({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),Ha={renderTo:function(e,t,n,r){return this._private.renderer.renderTo(e,t,n,r),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(e){var t=this,n=t.extension("renderer",e.name);if(null!=n){void 0!==e.wheelSensitivity&&Ae("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var r=qa(e);r.cy=t,t._private.renderer=new n(r),this.notify("init")}else Ce("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"))},destroyRenderer:function(){var e=this;e.notify("destroy");var t=e.container();if(t)for(t._cyreg=null;t.childNodes.length>0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Ha.invalidateDimensions=Ha.resize;var Wa={collection:function(e,t){return A(e)?this.$(e):O(e)?e.collection():k(e)?(t||(t={}),new Da(this,e,t.unique,t.removed)):new Da(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};Wa.elements=Wa.filter=Wa.$;var $a={},Ka="t";$a.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r<e.length;r++){var i=e[r],a=t.getContextMeta(i);if(!a.empty){var o=t.getContextStyle(a),s=t.applyContextStyle(a,o,i);i._private.appliedInitStyle?t.updateTransitions(i,s.diffProps):i._private.appliedInitStyle=!0,t.updateStyleHints(i)&&n.push(i)}}return n},$a.getPropertiesDiff=function(e,t){var n=this,r=n._private.propDiffs=n._private.propDiffs||{},i=e+"-"+t,a=r[i];if(a)return a;for(var o=[],s={},l=0;l<n.length;l++){var u=n[l],c=e[l]===Ka,h=t[l]===Ka,d=c!==h,p=u.mappedProperties.length>0;if(d||h&&p){var g=void 0;d&&p||d?g=u.properties:p&&(g=u.mappedProperties);for(var f=0;f<g.length;f++){for(var v=g[f],y=v.name,m=!1,b=l+1;b<n.length;b++){var x=n[b];if(t[b]===Ka&&(m=null!=x.properties[v.name]))break}s[y]||m||(s[y]=!0,o.push(y))}}}return r[i]=o,o},$a.getContextMeta=function(e){for(var t,n=this,r="",i=e._private.styleCxtKey||"",a=0;a<n.length;a++){var o=n[a];r+=o.selector&&o.selector.matches(e)?Ka:"f"}return t=n.getPropertiesDiff(i,r),e._private.styleCxtKey=r,{key:r,diffPropNames:t,empty:0===t.length}},$a.getContextStyle=function(e){var t=e.key,n=this._private.contextStyles=this._private.contextStyles||{};if(n[t])return n[t];for(var r={_private:{key:t}},i=0;i<this.length;i++){var a=this[i];if(t[i]===Ka)for(var o=0;o<a.properties.length;o++){var s=a.properties[o];r[s.name]=s}}return n[t]=r,r},$a.applyContextStyle=function(e,t,n){for(var r=e.diffPropNames,i={},a=this.types,o=0;o<r.length;o++){var s=r[o],l=t[s],u=n.pstyle(s);if(!l){if(!u)continue;l=u.bypass?{name:s,deleteBypassed:!0}:{name:s,delete:!0}}if(u!==l){if(l.mapped===a.fn&&null!=u&&null!=u.mapping&&u.mapping.value===l.value){var c=u.mapping;if((c.fnValue=l.value(n))===c.prevFnValue)continue}var h=i[s]={prev:u};this.applyParsedProperty(n,l),h.next=n.pstyle(s),h.next&&h.next.bypass&&(h.next=h.next.bypassed)}}return{diffProps:i}},$a.updateStyleHints=function(e){var t=e._private,n=this,r=n.propertyGroupNames,i=n.propertyGroupKeys,a=function(e,t,r){return n.getPropertiesHash(e,t,r)},o=t.styleKey;if(e.removed())return!1;var s="nodes"===t.group,l=e._private.style;r=Object.keys(l);for(var u=0;u<i.length;u++){var c=i[u];t.styleKeys[c]=[le,ue]}for(var h,d=function(e,n){return t.styleKeys[n][0]=he(e,t.styleKeys[n][0])},p=function(e,n){return t.styleKeys[n][1]=de(e,t.styleKeys[n][1])},g=function(e,t){d(e,t),p(e,t)},f=function(e,t){for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);d(r,t),p(r,t)}},v=0;v<r.length;v++){var y=r[v],m=l[y];if(null!=m){var b=this.properties[y],x=b.type,w=b.groupKey,E=void 0;null!=b.hashOverride?E=b.hashOverride(e,m):null!=m.pfValue&&(E=m.pfValue);var _=null==b.enums?m.value:null,T=null!=E,D=T||null!=_,C=m.units;if(x.number&&D&&!x.multiple)g(-128<(h=T?E:_)&&h<128&&Math.floor(h)!==h?2e9-(1024*h|0):h,w),T||null==C||f(C,w);else f(m.strValue,w)}}for(var N,A,L=[le,ue],k=0;k<i.length;k++){var S=i[k],I=t.styleKeys[S];L[0]=he(I[0],L[0]),L[1]=de(I[1],L[1])}t.styleKey=(N=L[0],A=L[1],2097152*N+A);var M=t.styleKeys;t.labelDimsKey=pe(M.labelDimensions);var O=a(e,["label"],M.labelDimensions);if(t.labelKey=pe(O),t.labelStyleKey=pe(ge(M.commonLabel,O)),!s){var P=a(e,["source-label"],M.labelDimensions);t.sourceLabelKey=pe(P),t.sourceLabelStyleKey=pe(ge(M.commonLabel,P));var R=a(e,["target-label"],M.labelDimensions);t.targetLabelKey=pe(R),t.targetLabelStyleKey=pe(ge(M.commonLabel,R))}if(s){var B=t.styleKeys,F=B.nodeBody,z=B.nodeBorder,G=B.nodeOutline,Y=B.backgroundImage,X=B.compound,V=B.pie,U=[F,z,G,Y,X,V].filter((function(e){return null!=e})).reduce(ge,[le,ue]);t.nodeKey=pe(U),t.hasPie=null!=V&&V[0]!==le&&V[1]!==ue}return o!==t.styleKey},$a.clearStyleHints=function(e){var t=e._private;t.styleCxtKey="",t.styleKeys={},t.styleKey=null,t.labelKey=null,t.labelStyleKey=null,t.sourceLabelKey=null,t.sourceLabelStyleKey=null,t.targetLabelKey=null,t.targetLabelStyleKey=null,t.nodeKey=null,t.hasPie=null},$a.applyParsedProperty=function(e,t){var n,r=this,i=t,a=e._private.style,o=r.types,s=r.properties[i.name].type,l=i.bypass,u=a[i.name],c=u&&u.bypass,h=e._private,d="mapping",p=function(e){return null==e?null:null!=e.pfValue?e.pfValue:e.value},g=function(){var t=p(u),n=p(i);r.checkTriggers(e,i.name,t,n)};if("curve-style"===t.name&&e.isEdge()&&("bezier"!==t.value&&e.isLoop()||"haystack"===t.value&&(e.source().isParent()||e.target().isParent()))&&(i=t=this.parse(t.name,"bezier",l)),i.delete)return a[i.name]=void 0,g(),!0;if(i.deleteBypassed)return u?!!u.bypass&&(u.bypassed=void 0,g(),!0):(g(),!0);if(i.deleteBypass)return u?!!u.bypass&&(a[i.name]=u.bypassed,g(),!0):(g(),!0);var f=function(){Ae("Do not assign mappings to elements without corresponding data (i.e. ele `"+e.id()+"` has no mapping for property `"+i.name+"` with data field `"+i.field+"`); try a `["+i.field+"]` selector to limit scope to elements with `"+i.field+"` defined")};switch(i.mapped){case o.mapData:for(var v,y=i.field.split("."),m=h.data,b=0;b<y.length&&m;b++){m=m[y[b]]}if(null==m)return f(),!1;if(!I(m))return Ae("Do not use continuous mappers without specifying numeric data (i.e. `"+i.field+": "+m+"` for `"+e.id()+"` is non-numeric)"),!1;var x=i.fieldMax-i.fieldMin;if((v=0===x?0:(m-i.fieldMin)/x)<0?v=0:v>1&&(v=1),s.color){var w=i.valueMin[0],E=i.valueMax[0],_=i.valueMin[1],T=i.valueMax[1],D=i.valueMin[2],C=i.valueMax[2],N=null==i.valueMin[3]?1:i.valueMin[3],A=null==i.valueMax[3]?1:i.valueMax[3],L=[Math.round(w+(E-w)*v),Math.round(_+(T-_)*v),Math.round(D+(C-D)*v),Math.round(N+(A-N)*v)];n={bypass:i.bypass,name:i.name,value:L,strValue:"rgb("+L[0]+", "+L[1]+", "+L[2]+")"}}else{if(!s.number)return!1;var k=i.valueMin+(i.valueMax-i.valueMin)*v;n=this.parse(i.name,k,i.bypass,d)}if(!n)return f(),!1;n.mapping=i,i=n;break;case o.data:for(var S=i.field.split("."),M=h.data,O=0;O<S.length&&M;O++){M=M[S[O]]}if(null!=M&&(n=this.parse(i.name,M,i.bypass,d)),!n)return f(),!1;n.mapping=i,i=n;break;case o.fn:var P=i.value,R=null!=i.fnValue?i.fnValue:P(e);if(i.prevFnValue=R,null==R)return Ae("Custom function mappers may not return null (i.e. `"+i.name+"` for ele `"+e.id()+"` is null)"),!1;if(!(n=this.parse(i.name,R,i.bypass,d)))return Ae("Custom function mappers may not return invalid values for the property type (i.e. `"+i.name+"` for ele `"+e.id()+"` is invalid)"),!1;n.mapping=Le(i),i=n;break;case void 0:break;default:return!1}return l?(i.bypassed=c?u.bypassed:u,a[i.name]=i):c?u.bypassed=i:a[i.name]=i,g(),!0},$a.cleanElements=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(this.clearStyleHints(r),r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache(),t)for(var i=r._private.style,a=Object.keys(i),o=0;o<a.length;o++){var s=a[o],l=i[s];null!=l&&(l.bypass?l.bypassed=null:i[s]=null)}else r._private.style={}}},$a.update=function(){this._private.cy.mutableElements().updateStyle()},$a.updateTransitions=function(e,t){var n=this,r=e._private,i=e.pstyle("transition-property").value,a=e.pstyle("transition-duration").pfValue,o=e.pstyle("transition-delay").pfValue;if(i.length>0&&a>0){for(var s={},l=!1,u=0;u<i.length;u++){var c=i[u],h=e.pstyle(c),d=t[c];if(d){var p=d.prev,g=null!=d.next?d.next:h,f=!1,v=void 0,y=1e-6;p&&(I(p.pfValue)&&I(g.pfValue)?(f=g.pfValue-p.pfValue,v=p.pfValue+y*f):I(p.value)&&I(g.value)?(f=g.value-p.value,v=p.value+y*f):k(p.value)&&k(g.value)&&(f=p.value[0]!==g.value[0]||p.value[1]!==g.value[1]||p.value[2]!==g.value[2],v=p.strValue),f&&(s[c]=g.strValue,this.applyBypass(e,c,v),l=!0))}}if(!l)return;r.transitioning=!0,new rr((function(t){o>0?e.delayAnimation(o).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:a,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1)},$a.checkTrigger=function(e,t,n,r,i,a){var o=this.properties[t],s=i(o);null!=s&&s(n,r)&&a(o)},$a.checkZOrderTrigger=function(e,t,n,r){var i=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){i._private.cy.notify("zorder",e)}))},$a.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(i){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!i.triggersBoundsOfParallelBeziers||"curve-style"!==t||"bezier"!==n&&"bezier"!==r||e.parallelEdges().forEach((function(e){e.isBundledBezier()&&e.dirtyBoundingBoxCache()})),!i.triggersBoundsOfConnectedEdges||"display"!==t||"none"!==n&&"none"!==r||e.connectedEdges().forEach((function(e){e.dirtyBoundingBoxCache()}))}))},$a.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var Za={applyBypass:function(e,t,n,r){var i=[];if("*"===t||"**"===t){if(void 0!==n)for(var a=0;a<this.properties.length;a++){var o=this.properties[a].name,s=this.parse(o,n,!0);s&&i.push(s)}}else if(A(t)){var l=this.parse(t,n,!0);l&&i.push(l)}else{if(!S(t))return!1;var u=t;r=n;for(var c=Object.keys(u),h=0;h<c.length;h++){var d=c[h],p=u[d];if(void 0===p&&(p=u[V(d)]),void 0!==p){var g=this.parse(d,p,!0);g&&i.push(g)}}}if(0===i.length)return!1;for(var f=!1,v=0;v<e.length;v++){for(var y=e[v],m={},b=void 0,x=0;x<i.length;x++){var w=i[x];if(r){var E=y.pstyle(w.name);b=m[w.name]={prev:E}}f=this.applyParsedProperty(y,Le(w))||f,r&&(b.next=y.pstyle(w.name))}f&&this.updateStyleHints(y),r&&this.updateTransitions(y,m,true)}return f},overrideBypass:function(e,t,n){t=X(t);for(var r=0;r<e.length;r++){var i=e[r],a=i._private.style[t],o=this.properties[t].type,s=o.color,l=o.mutiple,u=a?null!=a.pfValue?a.pfValue:a.value:null;a&&a.bypass?(a.value=n,null!=a.pfValue&&(a.pfValue=n),a.strValue=s?"rgb("+n.join(",")+")":l?n.join(" "):""+n,this.updateStyleHints(i)):this.applyBypass(i,t,n),this.checkTriggers(i,t,u,n)}},removeAllBypasses:function(e,t){return this.removeBypasses(e,this.propertyNames,t)},removeBypasses:function(e,t,n){for(var r=0;r<e.length;r++){for(var i=e[r],a={},o=0;o<t.length;o++){var s=t[o],l=this.properties[s],u=i.pstyle(l.name);if(u&&u.bypass){var c=this.parse(s,"",!0),h=a[l.name]={prev:u};this.applyParsedProperty(i,c),h.next=i.pstyle(l.name)}}this.updateStyleHints(i),n&&this.updateTransitions(i,a,true)}}},Qa={getEmSizeInPixels:function(){var e=this.containerCss("font-size");return null!=e?parseFloat(e):1},containerCss:function(e){var t=this._private.cy,n=t.container(),r=t.window();if(r&&n&&r.getComputedStyle)return r.getComputedStyle(n).getPropertyValue(e)}},Ja={getRenderedStyle:function(e,t){return t?this.getStylePropertyValue(e,t,!0):this.getRawStyle(e,!0)},getRawStyle:function(e,t){var n=this;if(e=e[0]){for(var r={},i=0;i<n.properties.length;i++){var a=n.properties[i],o=n.getStylePropertyValue(e,a.name,t);null!=o&&(r[a.name]=o,r[V(a.name)]=o)}return r}},getIndexedStyle:function(e,t,n,r){var i=e.pstyle(t)[n][r];return null!=i?i:e.cy().style().getDefaultProperty(t)[n][0]},getStylePropertyValue:function(e,t,n){if(e=e[0]){var r=this.properties[t];r.alias&&(r=r.pointsTo);var i=r.type,a=e.pstyle(r.name);if(a){var o=a.value,s=a.units,l=a.strValue;if(n&&i.number&&null!=o&&I(o)){var u=e.cy().zoom(),c=function(e){return e*u},h=function(e,t){return c(e)+t},d=k(o);return(d?s.every((function(e){return null!=e})):null!=s)?d?o.map((function(e,t){return h(e,s[t])})).join(" "):h(o,s):d?o.map((function(e){return A(e)?e:""+c(e)})).join(" "):""+c(o)}if(null!=l)return l}return null}},getAnimationStartStyle:function(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r].name,a=e.pstyle(i);void 0!==a&&(a=S(a)?this.parse(i,a.strValue):this.parse(i,a)),a&&(n[i]=a)}return n},getPropsList:function(e){var t=[],n=e,r=this.properties;if(n)for(var i=Object.keys(n),a=0;a<i.length;a++){var o=i[a],s=n[o],l=r[o]||r[X(o)],u=this.parse(l.name,s);u&&t.push(u)}return t},getNonDefaultPropertiesHash:function(e,t,n){var r,i,a,o,s,l,u=n.slice();for(s=0;s<t.length;s++)if(r=t[s],null!=(i=e.pstyle(r,!1)))if(null!=i.pfValue)u[0]=he(o,u[0]),u[1]=de(o,u[1]);else for(a=i.strValue,l=0;l<a.length;l++)o=a.charCodeAt(l),u[0]=he(o,u[0]),u[1]=de(o,u[1]);return u}};Ja.getPropertiesHash=Ja.getNonDefaultPropertiesHash;var eo={appendFromJson:function(e){for(var t=this,n=0;n<e.length;n++){var r=e[n],i=r.selector,a=r.style||r.css,o=Object.keys(a);t.selector(i);for(var s=0;s<o.length;s++){var l=o[s],u=a[l];t.css(l,u)}}return t},fromJson:function(e){var t=this;return t.resetToDefault(),t.appendFromJson(e),t},json:function(){for(var e=[],t=this.defaultLength;t<this.length;t++){for(var n=this[t],r=n.selector,i=n.properties,a={},o=0;o<i.length;o++){var s=i[o];a[s.name]=s.strValue}e.push({selector:r?r.toString():"core",style:a})}return e}},to={appendFromString:function(e){var t,n,r,i=this,a=""+e;function o(){a=a.length>t.length?a.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(a=a.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(a.match(/^\s*$/))break;var l=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){Ae("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}t=l[0];var u=l[1];if("core"!==u)if(new Hr(u).invalid){Ae("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),o();continue}var c=l[2],h=!1;n=c;for(var d=[];;){if(n.match(/^\s*$/))break;var p=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){Ae("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),h=!0;break}r=p[0];var g=p[1],f=p[2];if(this.properties[g])i.parse(g,f)?(d.push({name:g,val:f}),s()):(Ae("Skipping property: Invalid property definition in: "+r),s());else Ae("Skipping property: Invalid property name in: "+r),s()}if(h){o();break}i.selector(u);for(var v=0;v<d.length;v++){var y=d[v];i.css(y.name,y.val)}o()}return i},fromString:function(e){var t=this;return t.resetToDefault(),t.appendFromString(e),t}},no={};!function(){var e=q,t=W,n=K,r=function(e){return"^"+e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},i=function(r){var i=e+"|\\w+|"+t+"|"+n+"|\\#[0-9a-fA-F]{3}|\\#[0-9a-fA-F]{6}";return"^"+r+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+e+")\\s*\\,\\s*("+e+")\\s*,\\s*("+i+")\\s*\\,\\s*("+i+")\\)$"},a=["^url\\s*\\(\\s*['\"]?(.+?)['\"]?\\s*\\)$","^(none)$","^(.+)$"];no.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi"]},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:r("data")},layoutData:{mapping:!0,regex:r("layoutData")},scratch:{mapping:!0,regex:r("scratch")},mapData:{mapping:!0,regex:i("mapData")},mapLayoutData:{mapping:!0,regex:i("mapLayoutData")},mapScratch:{mapping:!0,regex:i("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:a,singleRegexMatchValue:!0},urls:{regexes:a,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(e,t){switch(e.length){case 2:return"deg"!==t[0]&&"rad"!==t[0]&&"deg"!==t[1]&&"rad"!==t[1];case 1:return A(e[0])||"deg"===t[0]||"rad"===t[0];default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(e){var t=e.length;return 1===t||2===t||4===t}}};var o={zeroNonZero:function(e,t){return(null==e||null==t)&&e!==t||(0==e&&0!=t||0!=e&&0==t)},any:function(e,t){return e!=t},emptyNonEmpty:function(e,t){var n=z(e),r=z(t);return n&&!r||!n&&r}},s=no.types,l=[{name:"label",type:s.text,triggersBounds:o.any,triggersZOrder:o.emptyNonEmpty},{name:"text-rotation",type:s.textRotation,triggersBounds:o.any},{name:"text-margin-x",type:s.bidirectionalSize,triggersBounds:o.any},{name:"text-margin-y",type:s.bidirectionalSize,triggersBounds:o.any}],u=[{name:"source-label",type:s.text,triggersBounds:o.any},{name:"source-text-rotation",type:s.textRotation,triggersBounds:o.any},{name:"source-text-margin-x",type:s.bidirectionalSize,triggersBounds:o.any},{name:"source-text-margin-y",type:s.bidirectionalSize,triggersBounds:o.any},{name:"source-text-offset",type:s.size,triggersBounds:o.any}],c=[{name:"target-label",type:s.text,triggersBounds:o.any},{name:"target-text-rotation",type:s.textRotation,triggersBounds:o.any},{name:"target-text-margin-x",type:s.bidirectionalSize,triggersBounds:o.any},{name:"target-text-margin-y",type:s.bidirectionalSize,triggersBounds:o.any},{name:"target-text-offset",type:s.size,triggersBounds:o.any}],h=[{name:"font-family",type:s.fontFamily,triggersBounds:o.any},{name:"font-style",type:s.fontStyle,triggersBounds:o.any},{name:"font-weight",type:s.fontWeight,triggersBounds:o.any},{name:"font-size",type:s.size,triggersBounds:o.any},{name:"text-transform",type:s.textTransform,triggersBounds:o.any},{name:"text-wrap",type:s.textWrap,triggersBounds:o.any},{name:"text-overflow-wrap",type:s.textOverflowWrap,triggersBounds:o.any},{name:"text-max-width",type:s.size,triggersBounds:o.any},{name:"text-outline-width",type:s.size,triggersBounds:o.any},{name:"line-height",type:s.positiveNumber,triggersBounds:o.any}],d=[{name:"text-valign",type:s.valign,triggersBounds:o.any},{name:"text-halign",type:s.halign,triggersBounds:o.any},{name:"color",type:s.color},{name:"text-outline-color",type:s.color},{name:"text-outline-opacity",type:s.zeroOneNumber},{name:"text-background-color",type:s.color},{name:"text-background-opacity",type:s.zeroOneNumber},{name:"text-background-padding",type:s.size,triggersBounds:o.any},{name:"text-border-opacity",type:s.zeroOneNumber},{name:"text-border-color",type:s.color},{name:"text-border-width",type:s.size,triggersBounds:o.any},{name:"text-border-style",type:s.borderStyle,triggersBounds:o.any},{name:"text-background-shape",type:s.textBackgroundShape,triggersBounds:o.any},{name:"text-justification",type:s.justification}],p=[{name:"events",type:s.bool,triggersZOrder:o.any},{name:"text-events",type:s.bool,triggersZOrder:o.any}],g=[{name:"display",type:s.display,triggersZOrder:o.any,triggersBounds:o.any,triggersBoundsOfConnectedEdges:!0},{name:"visibility",type:s.visibility,triggersZOrder:o.any},{name:"opacity",type:s.zeroOneNumber,triggersZOrder:o.zeroNonZero},{name:"text-opacity",type:s.zeroOneNumber},{name:"min-zoomed-font-size",type:s.size},{name:"z-compound-depth",type:s.zCompoundDepth,triggersZOrder:o.any},{name:"z-index-compare",type:s.zIndexCompare,triggersZOrder:o.any},{name:"z-index",type:s.number,triggersZOrder:o.any}],f=[{name:"overlay-padding",type:s.size,triggersBounds:o.any},{name:"overlay-color",type:s.color},{name:"overlay-opacity",type:s.zeroOneNumber,triggersBounds:o.zeroNonZero},{name:"overlay-shape",type:s.overlayShape,triggersBounds:o.any}],v=[{name:"underlay-padding",type:s.size,triggersBounds:o.any},{name:"underlay-color",type:s.color},{name:"underlay-opacity",type:s.zeroOneNumber,triggersBounds:o.zeroNonZero},{name:"underlay-shape",type:s.overlayShape,triggersBounds:o.any}],y=[{name:"transition-property",type:s.propList},{name:"transition-duration",type:s.time},{name:"transition-delay",type:s.time},{name:"transition-timing-function",type:s.easing}],m=function(e,t){return"label"===t.value?-e.poolIndex():t.pfValue},b=[{name:"height",type:s.nodeSize,triggersBounds:o.any,hashOverride:m},{name:"width",type:s.nodeSize,triggersBounds:o.any,hashOverride:m},{name:"shape",type:s.nodeShape,triggersBounds:o.any},{name:"shape-polygon-points",type:s.polygonPointList,triggersBounds:o.any},{name:"background-color",type:s.color},{name:"background-fill",type:s.fill},{name:"background-opacity",type:s.zeroOneNumber},{name:"background-blacken",type:s.nOneOneNumber},{name:"background-gradient-stop-colors",type:s.colors},{name:"background-gradient-stop-positions",type:s.percentages},{name:"background-gradient-direction",type:s.gradientDirection},{name:"padding",type:s.sizeMaybePercent,triggersBounds:o.any},{name:"padding-relative-to",type:s.paddingRelativeTo,triggersBounds:o.any},{name:"bounds-expansion",type:s.boundsExpansion,triggersBounds:o.any}],x=[{name:"border-color",type:s.color},{name:"border-opacity",type:s.zeroOneNumber},{name:"border-width",type:s.size,triggersBounds:o.any},{name:"border-style",type:s.borderStyle}],w=[{name:"outline-color",type:s.color},{name:"outline-opacity",type:s.zeroOneNumber},{name:"outline-width",type:s.size,triggersBounds:o.any},{name:"outline-style",type:s.borderStyle},{name:"outline-offset",type:s.size,triggersBounds:o.any}],E=[{name:"background-image",type:s.urls},{name:"background-image-crossorigin",type:s.bgCrossOrigin},{name:"background-image-opacity",type:s.zeroOneNumbers},{name:"background-image-containment",type:s.bgContainment},{name:"background-image-smoothing",type:s.bools},{name:"background-position-x",type:s.bgPos},{name:"background-position-y",type:s.bgPos},{name:"background-width-relative-to",type:s.bgRelativeTo},{name:"background-height-relative-to",type:s.bgRelativeTo},{name:"background-repeat",type:s.bgRepeat},{name:"background-fit",type:s.bgFit},{name:"background-clip",type:s.bgClip},{name:"background-width",type:s.bgWH},{name:"background-height",type:s.bgWH},{name:"background-offset-x",type:s.bgPos},{name:"background-offset-y",type:s.bgPos}],_=[{name:"position",type:s.position,triggersBounds:o.any},{name:"compound-sizing-wrt-labels",type:s.compoundIncludeLabels,triggersBounds:o.any},{name:"min-width",type:s.size,triggersBounds:o.any},{name:"min-width-bias-left",type:s.sizeMaybePercent,triggersBounds:o.any},{name:"min-width-bias-right",type:s.sizeMaybePercent,triggersBounds:o.any},{name:"min-height",type:s.size,triggersBounds:o.any},{name:"min-height-bias-top",type:s.sizeMaybePercent,triggersBounds:o.any},{name:"min-height-bias-bottom",type:s.sizeMaybePercent,triggersBounds:o.any}],T=[{name:"line-style",type:s.lineStyle},{name:"line-color",type:s.color},{name:"line-fill",type:s.fill},{name:"line-cap",type:s.lineCap},{name:"line-opacity",type:s.zeroOneNumber},{name:"line-dash-pattern",type:s.numbers},{name:"line-dash-offset",type:s.number},{name:"line-gradient-stop-colors",type:s.colors},{name:"line-gradient-stop-positions",type:s.percentages},{name:"curve-style",type:s.curveStyle,triggersBounds:o.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:s.zeroOneNumber,triggersBounds:o.any},{name:"source-endpoint",type:s.edgeEndpoint,triggersBounds:o.any},{name:"target-endpoint",type:s.edgeEndpoint,triggersBounds:o.any},{name:"control-point-step-size",type:s.size,triggersBounds:o.any},{name:"control-point-distances",type:s.bidirectionalSizes,triggersBounds:o.any},{name:"control-point-weights",type:s.numbers,triggersBounds:o.any},{name:"segment-distances",type:s.bidirectionalSizes,triggersBounds:o.any},{name:"segment-weights",type:s.numbers,triggersBounds:o.any},{name:"taxi-turn",type:s.bidirectionalSizeMaybePercent,triggersBounds:o.any},{name:"taxi-turn-min-distance",type:s.size,triggersBounds:o.any},{name:"taxi-direction",type:s.axisDirection,triggersBounds:o.any},{name:"edge-distances",type:s.edgeDistances,triggersBounds:o.any},{name:"arrow-scale",type:s.positiveNumber,triggersBounds:o.any},{name:"loop-direction",type:s.angle,triggersBounds:o.any},{name:"loop-sweep",type:s.angle,triggersBounds:o.any},{name:"source-distance-from-node",type:s.size,triggersBounds:o.any},{name:"target-distance-from-node",type:s.size,triggersBounds:o.any}],D=[{name:"ghost",type:s.bool,triggersBounds:o.any},{name:"ghost-offset-x",type:s.bidirectionalSize,triggersBounds:o.any},{name:"ghost-offset-y",type:s.bidirectionalSize,triggersBounds:o.any},{name:"ghost-opacity",type:s.zeroOneNumber}],C=[{name:"selection-box-color",type:s.color},{name:"selection-box-opacity",type:s.zeroOneNumber},{name:"selection-box-border-color",type:s.color},{name:"selection-box-border-width",type:s.size},{name:"active-bg-color",type:s.color},{name:"active-bg-opacity",type:s.zeroOneNumber},{name:"active-bg-size",type:s.size},{name:"outside-texture-bg-color",type:s.color},{name:"outside-texture-bg-opacity",type:s.zeroOneNumber}],N=[];no.pieBackgroundN=16,N.push({name:"pie-size",type:s.sizeMaybePercent});for(var L=1;L<=no.pieBackgroundN;L++)N.push({name:"pie-"+L+"-background-color",type:s.color}),N.push({name:"pie-"+L+"-background-size",type:s.percent}),N.push({name:"pie-"+L+"-background-opacity",type:s.zeroOneNumber});var k=[],S=no.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:s.arrowShape,triggersBounds:o.any},{name:"arrow-color",type:s.color},{name:"arrow-fill",type:s.arrowFill},{name:"arrow-width",type:s.arrowWidth}].forEach((function(e){S.forEach((function(t){var n=t+"-"+e.name,r=e.type,i=e.triggersBounds;k.push({name:n,type:r,triggersBounds:i})}))}),{});var I=no.properties=[].concat(p,y,g,f,v,D,d,h,l,u,c,b,x,w,E,N,_,T,k,C),M=no.propertyGroups={behavior:p,transition:y,visibility:g,overlay:f,underlay:v,ghost:D,commonLabel:d,labelDimensions:h,mainLabel:l,sourceLabel:u,targetLabel:c,nodeBody:b,nodeBorder:x,nodeOutline:w,backgroundImage:E,pie:N,compound:_,edgeLine:T,edgeArrow:k,core:C},O=no.propertyGroupNames={};(no.propertyGroupKeys=Object.keys(M)).forEach((function(e){O[e]=M[e].map((function(e){return e.name})),M[e].forEach((function(t){return t.groupKey=e}))}));var P=no.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];no.propertyNames=I.map((function(e){return e.name}));for(var R=0;R<I.length;R++){var B=I[R];I[B.name]=B}for(var F=0;F<P.length;F++){var G=P[F],Y=I[G.pointsTo],X={name:G.name,alias:!0,pointsTo:Y};I.push(X),I[G.name]=X}}(),no.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},no.getDefaultProperties=function(){var e=this._private;if(null!=e.defaultProperties)return e.defaultProperties;for(var t=Q({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce((function(e,t){for(var n=1;n<=no.pieBackgroundN;n++){var r=t.name.replace("{{i}}",n),i=t.value;e[r]=i}return e}),{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"taxi-turn":"50%","taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce((function(e,t){return no.arrowPrefixes.forEach((function(n){var r=n+"-"+t.name,i=t.value;e[r]=i})),e}),{})),n={},r=0;r<this.properties.length;r++){var i=this.properties[r];if(!i.pointsTo){var a=i.name,o=t[a],s=this.parse(a,o);n[a]=s}}return e.defaultProperties=n,e.defaultProperties},no.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var ro={parse:function(e,t,n,r){var i=this;if(L(t))return i.parseImplWarn(e,t,n,r);var a,o=ve(e,""+t,n?"t":"f","mapping"===r||!0===r||!1===r||null==r?"dontcare":r),s=i.propCache=i.propCache||[];return(a=s[o])||(a=s[o]=i.parseImplWarn(e,t,n,r)),(n||"mapping"===r)&&(a=Le(a))&&(a.value=Le(a.value)),a},parseImplWarn:function(e,t,n,r){var i=this.parseImpl(e,t,n,r);return i||null==t||Ae("The style property `".concat(e,": ").concat(t,"` is invalid")),!i||"width"!==i.name&&"height"!==i.name||"label"!==t||Ae("The style value of `label` is deprecated for `"+i.name+"`"),i}};ro.parseImpl=function(e,t,n,r){var i=this;e=X(e);var a=i.properties[e],o=t,s=i.types;if(!a)return null;if(void 0===t)return null;a.alias&&(a=a.pointsTo,e=a.name);var l=A(t);l&&(t=t.trim());var u,c,h=a.type;if(!h)return null;if(n&&(""===t||null===t))return{name:e,value:t,bypass:!0,deleteBypass:!0};if(L(t))return{name:e,value:t,strValue:"fn",mapped:s.fn,bypass:n};if(!l||r||t.length<7||"a"!==t[1]);else{if(t.length>=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var d=s.data;return{name:e,value:u,strValue:""+t,mapped:d,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(h.multiple)return!1;var p=s.mapData;if(!h.color&&!h.number)return!1;var g=this.parse(e,c[4]);if(!g||g.mapped)return!1;var f=this.parse(e,c[5]);if(!f||f.mapped)return!1;if(g.pfValue===f.pfValue||g.strValue===f.strValue)return Ae("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+g.strValue+"`"),this.parse(e,g.strValue);if(h.color){var v=g.value,y=f.value;if(!(v[0]!==y[0]||v[1]!==y[1]||v[2]!==y[2]||v[3]!==y[3]&&(null!=v[3]&&1!==v[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:p,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:g.value,valueMax:f.value,bypass:n}}}if(h.multiple&&"multiple"!==r){var m;if(m=l?t.split(/\s+/):k(t)?t:[t],h.evenMultiple&&m.length%2!=0)return null;for(var b=[],x=[],w=[],E="",_=!1,T=0;T<m.length;T++){var D=i.parse(e,m[T],n,"multiple");_=_||A(D.value),b.push(D.value),w.push(null!=D.pfValue?D.pfValue:D.value),x.push(D.units),E+=(T>0?" ":"")+D.strValue}return h.validate&&!h.validate(b,x)?null:h.singleEnum&&_?1===b.length&&A(b[0])?{name:e,value:b[0],strValue:b[0],bypass:n}:null:{name:e,value:b,pfValue:w,strValue:E,bypass:n,units:x}}var C,N,S=function(){for(var r=0;r<h.enums.length;r++){if(h.enums[r]===t)return{name:e,value:t,strValue:""+t,bypass:n}}return null};if(h.number){var M,O="px";if(h.units&&(M=h.units),h.implicitUnits&&(O=h.implicitUnits),!h.unitless)if(l){var P="px|em"+(h.allowPercent?"|\\%":"");M&&(P=M);var R=t.match("^("+q+")("+P+")?$");R&&(t=R[1],M=R[2]||O)}else M&&!h.implicitUnits||(M=O);if(t=parseFloat(t),isNaN(t)&&void 0===h.enums)return null;if(isNaN(t)&&void 0!==h.enums)return t=o,S();if(h.integer&&(!I(N=t)||Math.floor(N)!==N))return null;if(void 0!==h.min&&(t<h.min||h.strictMin&&t===h.min)||void 0!==h.max&&(t>h.max||h.strictMax&&t===h.max))return null;var B={name:e,value:t,strValue:""+t+(M||""),units:M,bypass:n};return h.unitless||"px"!==M&&"em"!==M?B.pfValue=t:B.pfValue="px"!==M&&M?this.getEmSizeInPixels()*t:t,"ms"!==M&&"s"!==M||(B.pfValue="ms"===M?t:1e3*t),"deg"!==M&&"rad"!==M||(B.pfValue="rad"===M?t:(C=t,Math.PI*C/180)),"%"===M&&(B.pfValue=t/100),B}if(h.propList){var F=[],z=""+t;if("none"===z);else{for(var G=z.split(/\s*,\s*|\s+/),Y=0;Y<G.length;Y++){var V=G[Y].trim();i.properties[V]?F.push(V):Ae("`"+V+"` is not a valid property name")}if(0===F.length)return null}return{name:e,value:F,strValue:0===F.length?"none":F.join(" "),bypass:n}}if(h.color){var U=J(t);return U?{name:e,value:U,pfValue:U,strValue:"rgb("+U[0]+","+U[1]+","+U[2]+")",bypass:n}:null}if(h.regex||h.regexes){if(h.enums){var j=S();if(j)return j}for(var H=h.regexes?h.regexes:[h.regex],W=0;W<H.length;W++){var $=new RegExp(H[W]).exec(t);if($)return{name:e,value:h.singleRegexMatchValue?$[1]:$,strValue:""+t,bypass:n}}return null}return h.string?{name:e,value:""+t,strValue:""+t,bypass:n}:h.enums?S():null};var io=function e(t){if(!(this instanceof e))return new e(t);B(t)?(this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()):Ce("A style must have a core reference")},ao=io.prototype;ao.instanceString=function(){return"style"},ao.clear=function(){for(var e=this._private,t=e.cy.elements(),n=0;n<this.length;n++)this[n]=void 0;return this.length=0,e.contextStyles={},e.propDiffs={},this.cleanElements(t,!0),t.forEach((function(e){var t=e[0]._private;t.styleDirty=!0,t.appliedInitStyle=!1})),this},ao.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},ao.core=function(e){return this._private.coreStyle[e]||this.getDefaultProperty(e)},ao.selector=function(e){var t="core"===e?null:new Hr(e),n=this.length++;return this[n]={selector:t,properties:[],mappedProperties:[],index:n},this},ao.css=function(){var e=arguments;if(1===e.length)for(var t=e[0],n=0;n<this.properties.length;n++){var r=this.properties[n],i=t[r.name];void 0===i&&(i=t[V(r.name)]),void 0!==i&&this.cssRule(r.name,i)}else 2===e.length&&this.cssRule(e[0],e[1]);return this},ao.style=ao.css,ao.cssRule=function(e,t){var n=this.parse(e,t);if(n){var r=this.length-1;this[r].properties.push(n),this[r].properties[n.name]=n,n.name.match(/pie-(\d+)-background-size/)&&n.value&&(this._private.hasPie=!0),n.mapped&&this[r].mappedProperties.push(n),!this[r].selector&&(this._private.coreStyle[n.name]=n)}return this},ao.append=function(e){return F(e)?e.appendToStyle(this):k(e)?this.appendFromJson(e):A(e)&&this.appendFromString(e),this},io.fromJson=function(e,t){var n=new io(e);return n.fromJson(t),n},io.fromString=function(e,t){return new io(e).fromString(t)},[$a,Za,Qa,Ja,eo,to,no,ro].forEach((function(e){Q(ao,e)})),io.types=ao.types,io.properties=ao.properties,io.propertyGroups=ao.propertyGroups,io.propertyGroupNames=ao.propertyGroupNames,io.propertyGroupKeys=ao.propertyGroupKeys;var oo={style:function(e){e&&this.setStyle(e).update();return this._private.style},setStyle:function(e){var t=this._private;return F(e)?t.style=e.generateStyle(this):k(e)?t.style=io.fromJson(this,e):A(e)?t.style=io.fromString(this,e):t.style=io(this),t.style},updateStyle:function(){this.mutableElements().updateStyle()}},so={autolock:function(e){return void 0===e?this._private.autolock:(this._private.autolock=!!e,this)},autoungrabify:function(e){return void 0===e?this._private.autoungrabify:(this._private.autoungrabify=!!e,this)},autounselectify:function(e){return void 0===e?this._private.autounselectify:(this._private.autounselectify=!!e,this)},selectionType:function(e){var t=this._private;return null==t.selectionType&&(t.selectionType="single"),void 0===e?t.selectionType:("additive"!==e&&"single"!==e||(t.selectionType=e),this)},panningEnabled:function(e){return void 0===e?this._private.panningEnabled:(this._private.panningEnabled=!!e,this)},userPanningEnabled:function(e){return void 0===e?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!e,this)},zoomingEnabled:function(e){return void 0===e?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!e,this)},userZoomingEnabled:function(e){return void 0===e?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!e,this)},boxSelectionEnabled:function(e){return void 0===e?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!e,this)},pan:function(){var e,t,n,r,i,a=arguments,o=this._private.pan;switch(a.length){case 0:return o;case 1:if(A(a[0]))return o[e=a[0]];if(S(a[0])){if(!this._private.panningEnabled)return this;r=(n=a[0]).x,i=n.y,I(r)&&(o.x=r),I(i)&&(o.y=i),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;t=a[1],"x"!==(e=a[0])&&"y"!==e||!I(t)||(o[e]=t),this.emit("pan viewport")}return this.notify("viewport"),this},panBy:function(e,t){var n,r,i,a,o,s=arguments,l=this._private.pan;if(!this._private.panningEnabled)return this;switch(s.length){case 1:S(e)&&(a=(i=s[0]).x,o=i.y,I(a)&&(l.x+=a),I(o)&&(l.y+=o),this.emit("pan viewport"));break;case 2:r=t,"x"!==(n=e)&&"y"!==n||!I(r)||(l[n]+=r),this.emit("pan viewport")}return this.notify("viewport"),this},fit:function(e,t){var n=this.getFitViewport(e,t);if(n){var r=this._private;r.zoom=n.zoom,r.pan=n.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(e,t){if(I(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled){var n,r;if(A(e)){var i=e;e=this.$(i)}else if(S(r=e)&&I(r.x1)&&I(r.x2)&&I(r.y1)&&I(r.y2)){var a=e;(n={x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2}).w=n.x2-n.x1,n.h=n.y2-n.y1}else O(e)||(e=this.mutableElements());if(!O(e)||!e.empty()){n=n||e.boundingBox();var o,s=this.width(),l=this.height();if(t=I(t)?t:0,!isNaN(s)&&!isNaN(l)&&s>0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:o=(o=(o=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:o)<this._private.minZoom?this._private.minZoom:o,pan:{x:(s-o*(n.x1+n.x2))/2,y:(l-o*(n.y1+n.y2))/2}}}}},zoomRange:function(e,t){var n=this._private;if(null==t){var r=e;e=r.min,t=r.max}return I(e)&&I(t)&&e<=t?(n.minZoom=e,n.maxZoom=t):I(e)&&void 0===t&&e<=n.maxZoom?n.minZoom=e:I(t)&&void 0===e&&t>=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,i=r.pan,a=r.zoom,o=!1;if(r.zoomingEnabled||(o=!0),I(e)?n=e:S(e)&&(n=e.level,null!=e.position?t=rt(e.position,a,i):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(o=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)<r.minZoom?r.minZoom:n,o||!I(n)||n===a||null!=t&&(!I(t.x)||!I(t.y)))return null;if(null!=t){var s=i,l=a,u=n;return{zoomed:!0,panned:!0,zoom:u,pan:{x:-u/l*(t.x-s.x)+t.x,y:-u/l*(t.y-s.y)+t.y}}}return{zoomed:!0,panned:!1,zoom:n,pan:i}},zoom:function(e){if(void 0===e)return this._private.zoom;var t=this.getZoomedViewport(e),n=this._private;return null!=t&&t.zoomed?(n.zoom=t.zoom,t.panned&&(n.pan.x=t.pan.x,n.pan.y=t.pan.y),this.emit("zoom"+(t.panned?" pan":"")+" viewport"),this.notify("viewport"),this):this},viewport:function(e){var t=this._private,n=!0,r=!0,i=[],a=!1,o=!1;if(!e)return this;if(I(e.zoom)||(n=!1),S(e.pan)||(r=!1),!n&&!r)return this;if(n){var s=e.zoom;s<t.minZoom||s>t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=s,i.push("zoom"))}if(r&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;I(l.x)&&(t.pan.x=l.x,o=!1),I(l.y)&&(t.pan.y=l.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(A(e)){var n=e;e=this.mutableElements().filter(n)}else O(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),i=this.width(),a=this.height();return{x:(i-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(a-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container,i=this;return n.sizeCache=n.sizeCache||(r?(e=i.window().getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};so.centre=so.center,so.autolockNodes=so.autolock,so.autoungrabifyNodes=so.autoungrabify;var lo={data:ur.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:ur.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:ur.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ur.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};lo.attr=lo.data,lo.removeAttr=lo.removeData;var uo=function(e){var t=this,n=(e=Q({},e)).container;n&&!M(n)&&M(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var a=void 0!==w&&void 0!==n&&!e.headless,o=e;o.layout=Q({name:a?"grid":"null"},o.layout),o.renderer=Q({name:a?"canvas":"null"},o.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:o,elements:new Da(this),listeners:[],aniEles:new Da(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?a:o.styleEnabled,zoom:I(o.zoom)?o.zoom:1,pan:{x:S(o.pan)&&I(o.pan.x)?o.pan.x:0,y:S(o.pan)&&I(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});l.styleEnabled&&t.setStyle([]);var u=Q({},o,o.renderer);t.initRenderer(u);!function(e,t){if(e.some(G))return rr.all(e).then(t);t(e)}([o.style,o.elements],(function(e){var n=e[0],a=e[1];l.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var i=t.mutableElements();i.length>0&&i.remove(),null!=e&&(S(e)||k(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var a=Q({},t._private.options.layout);a.eles=t.elements(),t.layout(a).run()}(a,(function(){t.startAnimationLoop(),l.ready=!0,L(o.ready)&&t.on("ready",o.ready);for(var e=0;e<i.length;e++){var n=i[e];t.on("ready",n)}r&&(r.readies=[]),t.emit("ready")}),o.done)}))},co=uo.prototype;Q(co,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container||null},window:function(){if(null==this._private.container)return w;var e=this._private.container.ownerDocument;return void 0===e||null==e?w:e.defaultView||w},mount:function(e){if(null!=e){var t=this,n=t._private,r=n.options;return!M(e)&&M(e[0])&&(e=e[0]),t.stopAnimationLoop(),t.destroyRenderer(),n.container=e,n.styleEnabled=!0,t.invalidateSize(),t.initRenderer(Q({},r,r.renderer,{name:"null"===r.renderer.name?"canvas":r.renderer.name})),t.startAnimationLoop(),t.style(r.style),t.emit("mount"),t}},unmount:function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e},options:function(){return Le(this._private.options)},json:function(e){var t=this,n=t._private,r=t.mutableElements();if(S(e)){if(t.startBatch(),e.elements){var i={},a=function(e,n){for(var r=[],a=[],o=0;o<e.length;o++){var s=e[o];if(s.data.id){var l=""+s.data.id,u=t.getElementById(l);i[l]=!0,0!==u.length?a.push({ele:u,json:s}):n?(s.group=n,r.push(s)):r.push(s)}else Ae("cy.json() cannot handle elements without an ID attribute")}t.add(r);for(var c=0;c<a.length;c++){var h=a[c],d=h.ele,p=h.json;d.json(p)}};if(k(e.elements))a(e.elements);else for(var o=["nodes","edges"],s=0;s<o.length;s++){var l=o[s],u=e.elements[l];k(u)&&a(u,l)}var c=t.collection();r.filter((function(e){return!i[e.id()]})).forEach((function(e){e.isParent()?c.merge(e):e.remove()})),c.forEach((function(e){return e.children().move({parent:null})})),c.forEach((function(e){return function(e){return t.getElementById(e.id())}(e).remove()}))}e.style&&t.style(e.style),null!=e.zoom&&e.zoom!==n.zoom&&t.zoom(e.zoom),e.pan&&(e.pan.x===n.pan.x&&e.pan.y===n.pan.y||t.pan(e.pan)),e.data&&t.data(e.data);for(var h=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],d=0;d<h.length;d++){var p=h[d];null!=e[p]&&t[p](e[p])}return t.endBatch(),this}var g={};!!e?g.elements=this.elements().map((function(e){return e.json()})):(g.elements={},r.forEach((function(e){var t=e.group();g.elements[t]||(g.elements[t]=[]),g.elements[t].push(e.json())}))),this._private.styleEnabled&&(g.style=t.style().json()),g.data=Le(t.data());var f=n.options;return g.zoomingEnabled=n.zoomingEnabled,g.userZoomingEnabled=n.userZoomingEnabled,g.zoom=n.zoom,g.minZoom=n.minZoom,g.maxZoom=n.maxZoom,g.panningEnabled=n.panningEnabled,g.userPanningEnabled=n.userPanningEnabled,g.pan=Le(n.pan),g.boxSelectionEnabled=n.boxSelectionEnabled,g.renderer=Le(f.renderer),g.hideEdgesOnViewport=f.hideEdgesOnViewport,g.textureOnViewport=f.textureOnViewport,g.wheelSensitivity=f.wheelSensitivity,g.motionBlur=f.motionBlur,g.multiClickDebounceTime=f.multiClickDebounceTime,g}}),co.$id=co.getElementById,[Na,za,Xa,Va,Ua,ja,Ha,Wa,oo,so,lo].forEach((function(e){Q(co,e)}));var ho={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},po={maximal:!1,acyclic:!1},go=function(e){return e.scratch("breadthfirst")},fo=function(e,t){return e.scratch("breadthfirst",t)};function vo(e){this.options=Q({},ho,po,e)}vo.prototype.run=function(){var e,t=this.options,n=t,r=t.cy,i=n.eles,a=i.nodes().filter((function(e){return!e.isParent()})),o=i,s=n.directed,l=n.acyclic||n.maximal||n.maximalAdjustments>0,u=ft(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(O(n.roots))e=n.roots;else if(k(n.roots)){for(var c=[],h=0;h<n.roots.length;h++){var d=n.roots[h],p=r.getElementById(d);c.push(p)}e=r.collection(c)}else if(A(n.roots))e=r.$(n.roots);else if(s)e=a.roots();else{var g=i.components();e=r.collection();for(var f=function(t){var n=g[t],r=n.maxDegree(!1),i=n.filter((function(e){return e.degree(!1)===r}));e=e.add(i)},v=0;v<g.length;v++)f(v)}var y=[],m={},b=function(e,t){null==y[t]&&(y[t]=[]);var n=y[t].length;y[t].push(e),fo(e,{index:n,depth:t})};o.bfs({roots:e,directed:n.directed,visit:function(e,t,n,r,i){var a=e[0],o=a.id();b(a,i),m[o]=!0}});for(var x=[],w=0;w<a.length;w++){var E=a[w];m[E.id()]||x.push(E)}var _=function(e){for(var t=y[e],n=0;n<t.length;n++){var r=t[n];null!=r?fo(r,{depth:e,index:n}):(t.splice(n,1),n--)}},T=function(){for(var e=0;e<y.length;e++)_(e)},D=function(e,t){for(var r=go(e),a=e.incomers().filter((function(e){return e.isNode()&&i.has(e)})),o=-1,s=e.id(),l=0;l<a.length;l++){var u=a[l],c=go(u);o=Math.max(o,c.depth)}if(r.depth<=o){if(!n.acyclic&&t[s])return null;var h=o+1;return function(e,t){var n=go(e),r=n.depth,i=n.index;y[r][i]=null,b(e,t)}(e,h),t[s]=h,!0}return!1};if(s&&l){var C=[],N={},L=function(e){return C.push(e)};for(a.forEach((function(e){return C.push(e)}));C.length>0;){var S=C.shift(),I=D(S,N);if(I)S.outgoers().filter((function(e){return e.isNode()&&i.has(e)})).forEach(L);else if(null===I){Ae("Detected double maximal shift for node `"+S.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}T();var M=0;if(n.avoidOverlap)for(var P=0;P<a.length;P++){var R=a[P].layoutDimensions(n),B=R.w,F=R.h;M=Math.max(M,B,F)}var z={},G=function(e){if(z[e.id()])return z[e.id()];for(var t=go(e).depth,n=e.neighborhood(),r=0,i=0,o=0;o<n.length;o++){var s=n[o];if(!s.isEdge()&&!s.isParent()&&a.has(s)){var l=go(s);if(null!=l){var u=l.index,c=l.depth;if(null!=u&&null!=c){var h=y[c].length;c<t&&(r+=u/h,i++)}}}}return r/=i=Math.max(1,i),0===i&&(r=0),z[e.id()]=r,r},Y=function(e,t){var n=G(e)-G(t);return 0===n?Z(e.id(),t.id()):n};void 0!==n.depthSort&&(Y=n.depthSort);for(var X=0;X<y.length;X++)y[X].sort(Y),_(X);for(var V=[],U=0;U<x.length;U++)V.push(x[U]);y.unshift(V),T();for(var j=0,q=0;q<y.length;q++)j=Math.max(y[q].length,j);var H=u.x1+u.w/2,W=u.x1+u.h/2,$=y.reduce((function(e,t){return Math.max(e,t.length)}),0);return i.nodes().layoutPositions(this,n,(function(e){var t=go(e),r=t.depth,i=t.index,a=y[r].length,o=Math.max(u.w/((n.grid?$:a)+1),M),s=Math.max(u.h/(y.length+1),M),l=Math.min(u.w/2/y.length,u.h/2/y.length);if(l=Math.max(l,M),n.circle){var c=l*r+l-(y.length>0&&y[0].length<=3?l/2:0),h=2*Math.PI/y[r].length*i;return 0===r&&1===y[0].length&&(c=1),{x:H+c*Math.cos(h),y:W+c*Math.sin(h)}}return{x:H+(i+1-(a+1)/2)*o,y:(r+1)*s}})),this};var yo={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function mo(e){this.options=Q({},yo,e)}mo.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));for(var o,s=ft(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l=s.x1+s.w/2,u=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/a.length:t.sweep)/Math.max(1,a.length-1),h=0,d=0;d<a.length;d++){var p=a[d].layoutDimensions(t),g=p.w,f=p.h;h=Math.max(h,g,f)}if(o=I(t.radius)?t.radius:a.length<=1?0:Math.min(s.h,s.w)/2-h,a.length>1&&t.avoidOverlap){h*=1.75;var v=Math.cos(c)-Math.cos(0),y=Math.sin(c)-Math.sin(0),m=Math.sqrt(h*h/(v*v+y*y));o=Math.max(m,o)}return r.nodes().layoutPositions(this,t,(function(e,n){var r=t.startAngle+n*c*(i?1:-1),a=o*Math.cos(r),s=o*Math.sin(r);return{x:l+a,y:u+s}})),this};var bo,xo={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function wo(e){this.options=Q({},xo,e)}wo.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,i=t.eles,a=i.nodes().not(":parent"),o=ft(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=o.x1+o.w/2,l=o.y1+o.h/2,u=[],c=0,h=0;h<a.length;h++){var d,p=a[h];d=t.concentric(p),u.push({value:d,node:p}),p._private.scratch.concentric=d}a.updateStyle();for(var g=0;g<a.length;g++){var f=a[g].layoutDimensions(t);c=Math.max(c,f.w,f.h)}u.sort((function(e,t){return t.value-e.value}));for(var v=t.levelWidth(a),y=[[]],m=y[0],b=0;b<u.length;b++){var x=u[b];if(m.length>0)Math.abs(m[0].value-x.value)>=v&&(m=[],y.push(m));m.push(x)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var E=y.length>0&&y[0].length>1,_=(Math.min(o.w,o.h)/2-w)/(y.length+E?1:0);w=Math.min(w,_)}for(var T=0,D=0;D<y.length;D++){var C=y[D],N=void 0===t.sweep?2*Math.PI-2*Math.PI/C.length:t.sweep,A=C.dTheta=N/Math.max(1,C.length-1);if(C.length>1&&t.avoidOverlap){var L=Math.cos(A)-Math.cos(0),k=Math.sin(A)-Math.sin(0),S=Math.sqrt(w*w/(L*L+k*k));T=Math.max(S,T)}C.r=T,T+=w}if(t.equidistant){for(var I=0,M=0,O=0;O<y.length;O++){var P=y[O].r-M;I=Math.max(I,P)}M=0;for(var R=0;R<y.length;R++){var B=y[R];0===R&&(M=B.r),B.r=M,M+=I}}for(var F={},z=0;z<y.length;z++)for(var G=y[z],Y=G.dTheta,X=G.r,V=0;V<G.length;V++){var U=G[V],j=t.startAngle+(n?1:-1)*Y*V,q={x:s+X*Math.cos(j),y:l+X*Math.sin(j)};F[U.node.id()]=q}return i.nodes().layoutPositions(this,t,(function(e){var t=e.id();return F[t]})),this};var Eo={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(e,t){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(e){return 2048},nodeOverlap:4,idealEdgeLength:function(e){return 32},edgeElasticity:function(e){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function _o(e){this.options=Q({},Eo,e),this.options.layout=this;var t=this.options.eles.nodes(),n=this.options.eles.edges().filter((function(e){var n=e.source().data("id"),r=e.target().data("id"),i=t.some((function(e){return e.data("id")===n})),a=t.some((function(e){return e.data("id")===r}));return!i||!a}));this.options.eles=this.options.eles.not(n)}_o.prototype.run=function(){var e=this.options,t=e.cy,n=this;n.stopped=!1,!0!==e.animate&&!1!==e.animate||n.emit({type:"layoutstart",layout:n}),bo=!0===e.debug;var r=To(t,n,e);bo&&undefined(r),e.randomize&&No(r);var i=se(),a=function(){Lo(r,t,e),!0===e.fit&&t.fit(e.padding)},o=function(t){return!(n.stopped||t>=e.numIter)&&(ko(r,e),r.temperature=r.temperature*e.coolingFactor,!(r.temperature<e.minTemp))},s=function(){if(!0===e.animate||!1===e.animate)a(),n.one("layoutstop",e.stop),n.emit({type:"layoutstop",layout:n});else{var t=e.eles.nodes(),i=Ao(r,e,t);t.layoutPositions(n,e,i)}},l=0,u=!0;if(!0===e.animate){!function t(){for(var n=0;u&&n<e.refresh;)u=o(l),l++,n++;u?(se()-i>=e.animationThreshold&&a(),oe(t)):(Xo(r,e),s())}()}else{for(;u;)u=o(l),l++;Xo(r,e),s()}return this},_o.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},_o.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var To=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),a=ft(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},s=n.eles.components(),l={},u=0;u<s.length;u++)for(var c=s[u],h=0;h<c.length;h++){l[c[h].id()]=u}for(u=0;u<o.nodeSize;u++){var d=(y=i[u]).layoutDimensions(n);(O={}).isLocked=y.locked(),O.id=y.data("id"),O.parentId=y.data("parent"),O.cmptId=l[y.id()],O.children=[],O.positionX=y.position("x"),O.positionY=y.position("y"),O.offsetX=0,O.offsetY=0,O.height=d.w,O.width=d.h,O.maxX=O.positionX+O.width/2,O.minX=O.positionX-O.width/2,O.maxY=O.positionY+O.height/2,O.minY=O.positionY-O.height/2,O.padLeft=parseFloat(y.style("padding")),O.padRight=parseFloat(y.style("padding")),O.padTop=parseFloat(y.style("padding")),O.padBottom=parseFloat(y.style("padding")),O.nodeRepulsion=L(n.nodeRepulsion)?n.nodeRepulsion(y):n.nodeRepulsion,o.layoutNodes.push(O),o.idToIndex[O.id]=u}var p=[],g=0,f=-1,v=[];for(u=0;u<o.nodeSize;u++){var y,m=(y=o.layoutNodes[u]).parentId;null!=m?o.layoutNodes[o.idToIndex[m]].children.push(y.id):(p[++f]=y.id,v.push(y.id))}for(o.graphSet.push(v);g<=f;){var b=p[g++],x=o.idToIndex[b],w=o.layoutNodes[x].children;if(w.length>0){o.graphSet.push(w);for(u=0;u<w.length;u++)p[++f]=w[u]}}for(u=0;u<o.graphSet.length;u++){var E=o.graphSet[u];for(h=0;h<E.length;h++){var _=o.idToIndex[E[h]];o.indexToGraph[_]=u}}for(u=0;u<o.edgeSize;u++){var T=r[u],D={};D.id=T.data("id"),D.sourceId=T.data("source"),D.targetId=T.data("target");var C=L(n.idealEdgeLength)?n.idealEdgeLength(T):n.idealEdgeLength,N=L(n.edgeElasticity)?n.edgeElasticity(T):n.edgeElasticity,A=o.idToIndex[D.sourceId],k=o.idToIndex[D.targetId];if(o.indexToGraph[A]!=o.indexToGraph[k]){for(var S=Do(D.sourceId,D.targetId,o),I=o.graphSet[S],M=0,O=o.layoutNodes[A];-1===I.indexOf(O.id);)O=o.layoutNodes[o.idToIndex[O.parentId]],M++;for(O=o.layoutNodes[k];-1===I.indexOf(O.id);)O=o.layoutNodes[o.idToIndex[O.parentId]],M++;C*=M*n.nestingFactor}D.idealLength=C,D.elasticity=N,o.layoutEdges.push(D)}return o},Do=function(e,t,n){var r=Co(e,t,0,n);return 2>r.count?0:r.graph},Co=function e(t,n,r,i){var a=i.graphSet[r];if(-1<a.indexOf(t)&&-1<a.indexOf(n))return{count:2,graph:r};for(var o=0,s=0;s<a.length;s++){var l=a[s],u=i.idToIndex[l],c=i.layoutNodes[u].children;if(0!==c.length){var h=e(t,n,i.indexToGraph[i.idToIndex[c[0]]],i);if(0!==h.count){if(1!==h.count)return h;if(2===++o)break}}}return{count:o,graph:r}},No=function(e,t){for(var n=e.clientWidth,r=e.clientHeight,i=0;i<e.nodeSize;i++){var a=e.layoutNodes[i];0!==a.children.length||a.isLocked||(a.positionX=Math.random()*n,a.positionY=Math.random()*r)}},Ao=function(e,t,n){var r=e.boundingBox,i={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return t.boundingBox&&(n.forEach((function(t){var n=e.layoutNodes[e.idToIndex[t.data("id")]];i.x1=Math.min(i.x1,n.positionX),i.x2=Math.max(i.x2,n.positionX),i.y1=Math.min(i.y1,n.positionY),i.y2=Math.max(i.y2,n.positionY)})),i.w=i.x2-i.x1,i.h=i.y2-i.y1),function(n,a){var o=e.layoutNodes[e.idToIndex[n.data("id")]];if(t.boundingBox){var s=(o.positionX-i.x1)/i.w,l=(o.positionY-i.y1)/i.h;return{x:r.x1+s*r.w,y:r.y1+l*r.h}}return{x:o.positionX,y:o.positionY}}},Lo=function(e,t,n){var r=n.layout,i=n.eles.nodes(),a=Ao(e,n,i);i.positions(a),!0!==e.ready&&(e.ready=!0,r.one("layoutready",n.ready),r.emit({type:"layoutready",layout:this}))},ko=function(e,t,n){So(e,t),Ro(e),Bo(e,t),Fo(e),zo(e)},So=function(e,t){for(var n=0;n<e.graphSet.length;n++)for(var r=e.graphSet[n],i=r.length,a=0;a<i;a++)for(var o=e.layoutNodes[e.idToIndex[r[a]]],s=a+1;s<i;s++){var l=e.layoutNodes[e.idToIndex[r[s]]];Mo(o,l,e,t)}},Io=function(e){return-e+2*e*Math.random()},Mo=function(e,t,n,r){if(e.cmptId===t.cmptId||n.isCompound){var i=t.positionX-e.positionX,a=t.positionY-e.positionY;0===i&&0===a&&(i=Io(1),a=Io(1));var o=Oo(e,t,i,a);if(o>0)var s=(u=r.nodeOverlap*o)*i/(f=Math.sqrt(i*i+a*a)),l=u*a/f;else{var u,c=Po(e,i,a),h=Po(t,-1*i,-1*a),d=h.x-c.x,p=h.y-c.y,g=d*d+p*p,f=Math.sqrt(g);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/g)*d/f,l=u*p/f}e.isLocked||(e.offsetX-=s,e.offsetY-=l),t.isLocked||(t.offsetX+=s,t.offsetY+=l)}},Oo=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else i=t.maxX-e.minX;if(r>0)var a=e.maxY-t.minY;else a=t.maxY-e.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},Po=function(e,t,n){var r=e.positionX,i=e.positionY,a=e.height||1,o=e.width||1,s=n/t,l=a/o,u={};return 0===t&&0<n||0===t&&0>n?(u.x=r,u.y=i+a/2,u):0<t&&-1*l<=s&&s<=l?(u.x=r+o/2,u.y=i+o*n/2/t,u):0>t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=i-o*n/2/t,u):0<n&&(s<=-1*l||s>=l)?(u.x=r+a*t/2/n,u.y=i+a/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-a*t/2/n,u.y=i-a/2,u):u},Ro=function(e,t){for(var n=0;n<e.edgeSize;n++){var r=e.layoutEdges[n],i=e.idToIndex[r.sourceId],a=e.layoutNodes[i],o=e.idToIndex[r.targetId],s=e.layoutNodes[o],l=s.positionX-a.positionX,u=s.positionY-a.positionY;if(0!==l||0!==u){var c=Po(a,l,u),h=Po(s,-1*l,-1*u),d=h.x-c.x,p=h.y-c.y,g=Math.sqrt(d*d+p*p),f=Math.pow(r.idealLength-g,2)/r.elasticity;if(0!==g)var v=f*d/g,y=f*p/g;else v=0,y=0;a.isLocked||(a.offsetX+=v,a.offsetY+=y),s.isLocked||(s.offsetX-=v,s.offsetY-=y)}}},Bo=function(e,t){if(0!==t.gravity)for(var n=0;n<e.graphSet.length;n++){var r=e.graphSet[n],i=r.length;if(0===n)var a=e.clientHeight/2,o=e.clientWidth/2;else{var s=e.layoutNodes[e.idToIndex[r[0]]],l=e.layoutNodes[e.idToIndex[s.parentId]];a=l.positionX,o=l.positionY}for(var u=0;u<i;u++){var c=e.layoutNodes[e.idToIndex[r[u]]];if(!c.isLocked){var h=a-c.positionX,d=o-c.positionY,p=Math.sqrt(h*h+d*d);if(p>1){var g=t.gravity*h/p,f=t.gravity*d/p;c.offsetX+=g,c.offsetY+=f}}}}},Fo=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var a=n[r++],o=e.idToIndex[a],s=e.layoutNodes[o],l=s.children;if(0<l.length&&!s.isLocked){for(var u=s.offsetX,c=s.offsetY,h=0;h<l.length;h++){var d=e.layoutNodes[e.idToIndex[l[h]]];d.offsetX+=u,d.offsetY+=c,n[++i]=l[h]}s.offsetX=0,s.offsetY=0}}},zo=function(e,t){for(var n=0;n<e.nodeSize;n++){0<(i=e.layoutNodes[n]).children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0)}for(n=0;n<e.nodeSize;n++){if(!(0<(i=e.layoutNodes[n]).children.length||i.isLocked)){var r=Go(i.offsetX,i.offsetY,e.temperature);i.positionX+=r.x,i.positionY+=r.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,Yo(i,e)}}for(n=0;n<e.nodeSize;n++){var i;0<(i=e.layoutNodes[n]).children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)}},Go=function(e,t,n){var r=Math.sqrt(e*e+t*t);if(r>n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},Yo=function e(t,n){var r=t.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],a=!1;return(null==i.maxX||t.maxX+i.padRight>i.maxX)&&(i.maxX=t.maxX+i.padRight,a=!0),(null==i.minX||t.minX-i.padLeft<i.minX)&&(i.minX=t.minX-i.padLeft,a=!0),(null==i.maxY||t.maxY+i.padBottom>i.maxY)&&(i.maxY=t.maxY+i.padBottom,a=!0),(null==i.minY||t.minY-i.padTop<i.minY)&&(i.minY=t.minY-i.padTop,a=!0),a?e(i,n):void 0}},Xo=function(e,t){for(var n=e.layoutNodes,r=[],i=0;i<n.length;i++){var a=n[i],o=a.cmptId;(r[o]=r[o]||[]).push(a)}var s=0;for(i=0;i<r.length;i++){if(f=r[i]){f.x1=1/0,f.x2=-1/0,f.y1=1/0,f.y2=-1/0;for(var l=0;l<f.length;l++){var u=f[l];f.x1=Math.min(f.x1,u.positionX-u.width/2),f.x2=Math.max(f.x2,u.positionX+u.width/2),f.y1=Math.min(f.y1,u.positionY-u.height/2),f.y2=Math.max(f.y2,u.positionY+u.height/2)}f.w=f.x2-f.x1,f.h=f.y2-f.y1,s+=f.w*f.h}}r.sort((function(e,t){return t.w*t.h-e.w*e.h}));var c=0,h=0,d=0,p=0,g=Math.sqrt(s)*e.clientWidth/e.clientHeight;for(i=0;i<r.length;i++){var f;if(f=r[i]){for(l=0;l<f.length;l++){(u=f[l]).isLocked||(u.positionX+=c-f.x1,u.positionY+=h-f.y1)}c+=f.w+t.componentSpacing,d+=f.w+t.componentSpacing,p=Math.max(p,f.h),d>g&&(h+=p+t.componentSpacing,c=0,d=0,p=0)}}},Vo={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Uo(e){this.options=Q({},Vo,e)}Uo.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));var a=ft(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===a.h||0===a.w)r.nodes().layoutPositions(this,t,(function(e){return{x:a.x1,y:a.y1}}));else{var o=i.size(),s=Math.sqrt(o*a.h/a.w),l=Math.round(s),u=Math.round(a.w/a.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},h=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},d=t.rows,p=null!=t.cols?t.cols:t.columns;if(null!=d&&null!=p)l=d,u=p;else if(null!=d&&null==p)l=d,u=Math.ceil(o/l);else if(null==d&&null!=p)u=p,l=Math.ceil(o/u);else if(u*l>o){var g=c(),f=h();(g-1)*f>=o?c(g-1):(f-1)*g>=o&&h(f-1)}else for(;u*l<o;){var v=c(),y=h();(y+1)*v>=o?h(y+1):c(v+1)}var m=a.w/u,b=a.h/l;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var x=0;x<i.length;x++){var w=i[x],E=w._private.position;null!=E.x&&null!=E.y||(E.x=0,E.y=0);var _=w.layoutDimensions(t),T=t.avoidOverlapPadding,D=_.w+T,C=_.h+T;m=Math.max(m,D),b=Math.max(b,C)}for(var N={},A=function(e,t){return!!N["c-"+e+"-"+t]},L=function(e,t){N["c-"+e+"-"+t]=!0},k=0,S=0,I=function(){++S>=u&&(S=0,k++)},M={},O=0;O<i.length;O++){var P=i[O],R=t.position(P);if(R&&(void 0!==R.row||void 0!==R.col)){var B={row:R.row,col:R.col};if(void 0===B.col)for(B.col=0;A(B.row,B.col);)B.col++;else if(void 0===B.row)for(B.row=0;A(B.row,B.col);)B.row++;M[P.id()]=B,L(B.row,B.col)}}i.layoutPositions(this,t,(function(e,t){var n,r;if(e.locked()||e.isParent())return!1;var i=M[e.id()];if(i)n=i.col*m+m/2+a.x1,r=i.row*b+b/2+a.y1;else{for(;A(k,S);)I();n=S*m+m/2+a.x1,r=k*b+b/2+a.y1,L(k,S),I()}return{x:n,y:r}}))}return this};var jo={ready:function(){},stop:function(){}};function qo(e){this.options=Q({},jo,e)}qo.prototype.run=function(){var e=this.options,t=e.eles,n=this;return e.cy,n.emit("layoutstart"),t.nodes().positions((function(){return{x:0,y:0}})),n.one("layoutready",e.ready),n.emit("layoutready"),n.one("layoutstop",e.stop),n.emit("layoutstop"),this},qo.prototype.stop=function(){return this};var Ho={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Wo(e){this.options=Q({},Ho,e)}Wo.prototype.run=function(){var e=this.options,t=e.eles.nodes(),n=L(e.positions);return t.layoutPositions(this,e,(function(t,r){var i=function(t){if(null==e.positions)return function(e){return{x:e.x,y:e.y}}(t.position());if(n)return e.positions(t);var r=e.positions[t._private.data.id];return null==r?null:r}(t);return!t.locked()&&null!=i&&i})),this};var $o={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Ko(e){this.options=Q({},$o,e)}Ko.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles,r=ft(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});return n.nodes().layoutPositions(this,e,(function(e,t){return{x:r.x1+Math.round(Math.random()*r.w),y:r.y1+Math.round(Math.random()*r.h)}})),this};var Zo=[{name:"breadthfirst",impl:vo},{name:"circle",impl:mo},{name:"concentric",impl:wo},{name:"cose",impl:_o},{name:"grid",impl:Uo},{name:"null",impl:qo},{name:"preset",impl:Wo},{name:"random",impl:Ko}];function Qo(e){this.options=e,this.notifications=0}var Jo=function(){},es=function(){throw new Error("A headless instance can not render images")};Qo.prototype={recalculateRenderedStyle:Jo,notify:function(){this.notifications++},init:Jo,isHeadless:function(){return!0},png:es,jpg:es};var ts={arrowShapeWidth:.3,registerArrowShapes:function(){var e=this.arrowShapes={},t=this,n=function(e,t,n,r,i,a,o){var s=i.x-n/2-o,l=i.x+n/2+o,u=i.y-n/2-o,c=i.y+n/2+o;return s<=e&&e<=l&&u<=t&&t<=c},r=function(e,t,n,r,i){var a=e*Math.cos(r)-t*Math.sin(r),o=(e*Math.sin(r)+t*Math.cos(r))*n;return{x:a*n+i.x,y:o+i.y}},i=function(e,t,n,i){for(var a=[],o=0;o<e.length;o+=2){var s=e[o],l=e[o+1];a.push(r(s,l,t,n,i))}return a},a=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r.x,r.y)}return t},o=function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").pfValue*2},s=function(r,s){A(s)&&(s=e[s]),e[r]=Q({name:r,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(e,t,n,r,o,s){var l=a(i(this.points,n+2*s,r,o));return Lt(e,t,l)},roughCollide:n,draw:function(e,n,r,a){var o=i(this.points,n,r,a);t.arrowShapeImpl("polygon")(e,o)},spacing:function(e){return 0},gap:o},s)};s("none",{collide:_e,roughCollide:_e,draw:De,spacing:Te,gap:Te}),s("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),s("arrow","triangle"),s("triangle-backcurve",{points:e.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:function(e,n,a,o,s){var l=i(this.points,n,a,o),u=this.controlPoint,c=r(u[0],u[1],n,a,o);t.arrowShapeImpl(this.name)(e,l,c)},gap:function(e){return.8*o(e)}}),s("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(e,t,n,r,o,s,l){var u=a(i(this.points,n+2*l,r,o)),c=a(i(this.pointsTee,n+2*l,r,o));return Lt(e,t,u)||Lt(e,t,c)},draw:function(e,n,r,a,o){var s=i(this.points,n,r,a),l=i(this.pointsTee,n,r,a);t.arrowShapeImpl(this.name)(e,s,l)}}),s("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(e,t,n,r,o,s,l){var u=o,c=Math.pow(u.x-e,2)+Math.pow(u.y-t,2)<=Math.pow((n+2*l)*this.radius,2),h=a(i(this.points,n+2*l,r,o));return Lt(e,t,h)||c},draw:function(e,n,r,a,o){var s=i(this.pointsTr,n,r,a);t.arrowShapeImpl(this.name)(e,s,a.x,a.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius}}),s("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(e,t){var n=this.baseCrossLinePts.slice(),r=t/e;return n[3]=n[3]-r,n[5]=n[5]-r,n},collide:function(e,t,n,r,o,s,l){var u=a(i(this.points,n+2*l,r,o)),c=a(i(this.crossLinePts(n,s),n+2*l,r,o));return Lt(e,t,u)||Lt(e,t,c)},draw:function(e,n,r,a,o){var s=i(this.points,n,r,a),l=i(this.crossLinePts(n,o),n,r,a);t.arrowShapeImpl(this.name)(e,s,l)}}),s("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(e){return.525*o(e)}}),s("circle",{radius:.15,collide:function(e,t,n,r,i,a,o){var s=i;return Math.pow(s.x-e,2)+Math.pow(s.y-t,2)<=Math.pow((n+2*o)*this.radius,2)},draw:function(e,n,r,i,a){t.arrowShapeImpl(this.name)(e,i.x,i.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius}}),s("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(e){return 1},gap:function(e){return 1}}),s("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),s("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").value}}),s("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(e){return.95*e.pstyle("width").pfValue*e.pstyle("arrow-scale").value}})}},ns={projectIntoViewport:function(e,t){var n=this.cy,r=this.findContainerClientCoords(),i=r[0],a=r[1],o=r[4],s=n.pan(),l=n.zoom();return[((e-i)/o-s.x)/l,((t-a)/o-s.y)/l]},findContainerClientCoords:function(){if(this.containerBB)return this.containerBB;var e=this.container,t=e.getBoundingClientRect(),n=this.cy.window().getComputedStyle(e),r=function(e){return parseFloat(n.getPropertyValue(e))},i=r("padding-left"),a=r("padding-right"),o=r("padding-top"),s=r("padding-bottom"),l=r("border-left-width"),u=r("border-right-width"),c=r("border-top-width"),h=(r("border-bottom-width"),e.clientWidth),d=e.clientHeight,p=i+a,g=o+s,f=l+u,v=t.width/(h+f),y=h-p,m=d-g,b=t.left+i+l,x=t.top+o+c;return this.containerBB=[b,x,y,m,v]},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(e,t,n,r){return this.findNearestElements(e,t,n,r)[0]},findNearestElements:function(e,t,n,r){var i,a,o=this,s=this,l=s.getCachedZSortedEles(),u=[],c=s.cy.zoom(),h=s.cy.hasCompoundNodes(),d=(r?24:8)/c,p=(r?8:2)/c,g=(r?8:2)/c,f=1/0;function v(e,t){if(e.isNode()){if(a)return;a=e,u.push(e)}if(e.isEdge()&&(null==t||t<f))if(i){if(i.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value&&i.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value)for(var n=0;n<u.length;n++)if(u[n].isEdge()){u[n]=e,i=e,f=null!=t?t:f;break}}else u.push(e),i=e,f=null!=t?t:f}function y(n){var r=n.outerWidth()+2*p,i=n.outerHeight()+2*p,a=r/2,l=i/2,u=n.position();if(u.x-a<=e&&e<=u.x+a&&u.y-l<=t&&t<=u.y+l&&s.nodeShapes[o.getNodeShape(n)].checkPoint(e,t,0,r,i,u.x,u.y))return v(n,0),!0}function m(n){var r,i=n._private,a=i.rscratch,l=n.pstyle("width").pfValue,c=n.pstyle("arrow-scale").value,p=l/2+d,g=p*p,f=2*p,m=i.source,b=i.target;if("segments"===a.edgeType||"straight"===a.edgeType||"haystack"===a.edgeType){for(var x=a.allpts,w=0;w+3<x.length;w+=2)if(Dt(e,t,x[w],x[w+1],x[w+2],x[w+3],f)&&g>(r=At(e,t,x[w],x[w+1],x[w+2],x[w+3])))return v(n,r),!0}else if("bezier"===a.edgeType||"multibezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType)for(x=a.allpts,w=0;w+5<a.allpts.length;w+=4)if(Ct(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5],f)&&g>(r=Nt(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return v(n,r),!0;m=m||i.source,b=b||i.target;var E=o.getArrowWidth(l,c),_=[{name:"source",x:a.arrowStartX,y:a.arrowStartY,angle:a.srcArrowAngle},{name:"target",x:a.arrowEndX,y:a.arrowEndY,angle:a.tgtArrowAngle},{name:"mid-source",x:a.midX,y:a.midY,angle:a.midsrcArrowAngle},{name:"mid-target",x:a.midX,y:a.midY,angle:a.midtgtArrowAngle}];for(w=0;w<_.length;w++){var T=_[w],D=s.arrowShapes[n.pstyle(T.name+"-arrow-shape").value],C=n.pstyle("width").pfValue;if(D.roughCollide(e,t,E,T.angle,{x:T.x,y:T.y},C,d)&&D.collide(e,t,E,T.angle,{x:T.x,y:T.y},C,d))return v(n),!0}h&&u.length>0&&(y(m),y(b))}function b(e,t,n){return Re(e,t,n)}function x(n,r){var i,a=n._private,o=g;i=r?r+"-":"",n.boundingBox();var s=a.labelBounds[r||"main"],l=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=b(a.rscratch,"labelX",r),c=b(a.rscratch,"labelY",r),h=b(a.rscratch,"labelAngle",r),d=n.pstyle(i+"text-margin-x").pfValue,p=n.pstyle(i+"text-margin-y").pfValue,f=s.x1-o-d,y=s.x2+o-d,m=s.y1-o-p,x=s.y2+o-p;if(h){var w=Math.cos(h),E=Math.sin(h),_=function(e,t){return{x:(e-=u)*w-(t-=c)*E+u,y:e*E+t*w+c}},T=_(f,m),D=_(f,x),C=_(y,m),N=_(y,x),A=[T.x+d,T.y+p,C.x+d,C.y+p,N.x+d,N.y+p,D.x+d,D.y+p];if(Lt(e,t,A))return v(n),!0}else if(Et(s,e,t))return v(n),!0}}n&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var E=l[w];E.isNode()?y(E)||x(E):m(E)||x(E)||x(E,"source")||x(E,"target")}return u},getAllInBox:function(e,t,n,r){for(var i,a,o=this.getCachedZSortedEles().interactive,s=[],l=Math.min(e,n),u=Math.max(e,n),c=Math.min(t,r),h=Math.max(t,r),d=ft({x1:e=l,y1:t=c,x2:n=u,y2:r=h}),p=0;p<o.length;p++){var g=o[p];if(g.isNode()){var f=g,v=f.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});wt(d,v)&&!_t(v,d)&&s.push(f)}else{var y=g,m=y._private,b=m.rscratch;if(null!=b.startX&&null!=b.startY&&!Et(d,b.startX,b.startY))continue;if(null!=b.endX&&null!=b.endY&&!Et(d,b.endX,b.endY))continue;if("bezier"===b.edgeType||"multibezier"===b.edgeType||"self"===b.edgeType||"compound"===b.edgeType||"segments"===b.edgeType||"haystack"===b.edgeType){for(var x=m.rstyle.bezierPts||m.rstyle.linePts||m.rstyle.haystackPts,w=!0,E=0;E<x.length;E++)if(i=d,a=x[E],!Et(i,a.x,a.y)){w=!1;break}w&&s.push(y)}else"haystack"!==b.edgeType&&"straight"!==b.edgeType||s.push(y)}}return s}},rs={calculateArrowAngles:function(e){var t,n,r,i,a,o,s=e._private.rscratch,l="haystack"===s.edgeType,u="bezier"===s.edgeType,c="multibezier"===s.edgeType,h="segments"===s.edgeType,d="compound"===s.edgeType,p="self"===s.edgeType;if(l?(r=s.haystackPts[0],i=s.haystackPts[1],a=s.haystackPts[2],o=s.haystackPts[3]):(r=s.arrowStartX,i=s.arrowStartY,a=s.arrowEndX,o=s.arrowEndY),f=s.midX,v=s.midY,h)t=r-s.segpts[0],n=i-s.segpts[1];else if(c||d||p||u){var g=s.allpts;t=r-dt(g[0],g[2],g[4],.1),n=i-dt(g[1],g[3],g[5],.1)}else t=r-f,n=i-v;s.srcArrowAngle=ot(t,n);var f=s.midX,v=s.midY;if(l&&(f=(r+a)/2,v=(i+o)/2),t=a-r,n=o-i,h)if((g=s.allpts).length/2%2==0){var y=(m=g.length/2)-2;t=g[m]-g[y],n=g[m+1]-g[y+1]}else{y=(m=g.length/2-1)-2;var m,b=m+2;t=g[m]-g[y],n=g[m+1]-g[y+1]}else if(c||d||p){var x,w,E,_,g=s.allpts;if(s.ctrlpts.length/2%2==0){var T=(D=(C=g.length/2-1)+2)+2;x=dt(g[C],g[D],g[T],0),w=dt(g[C+1],g[D+1],g[T+1],0),E=dt(g[C],g[D],g[T],1e-4),_=dt(g[C+1],g[D+1],g[T+1],1e-4)}else{var D,C;T=(D=g.length/2-1)+2;x=dt(g[C=D-2],g[D],g[T],.4999),w=dt(g[C+1],g[D+1],g[T+1],.4999),E=dt(g[C],g[D],g[T],.5),_=dt(g[C+1],g[D+1],g[T+1],.5)}t=E-x,n=_-w}(s.midtgtArrowAngle=ot(t,n),s.midDispX=t,s.midDispY=n,t*=-1,n*=-1,h)&&((g=s.allpts).length/2%2==0||(t=-(g[b=(m=g.length/2-1)+2]-g[m]),n=-(g[b+1]-g[m+1])));if(s.midsrcArrowAngle=ot(t,n),h)t=a-s.segpts[s.segpts.length-2],n=o-s.segpts[s.segpts.length-1];else if(c||d||p||u){var N=(g=s.allpts).length;t=a-dt(g[N-6],g[N-4],g[N-2],.9),n=o-dt(g[N-5],g[N-3],g[N-1],.9)}else t=a-f,n=o-v;s.tgtArrowAngle=ot(t,n)}};rs.getArrowWidth=rs.getArrowHeight=function(e,t){var n=this.arrowWidthCache=this.arrowWidthCache||{},r=n[e+", "+t];return r||(r=Math.max(Math.pow(13.37*e,.9),29)*t,n[e+", "+t]=r,r)};var is={};function as(e){var t=[];if(null!=e){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];t.push({x:r,y:i})}return t}}is.findMidptPtsEtc=function(e,t){var n,r=t.posPts,i=t.intersectionPts,a=t.vectorNormInverse,o=e.pstyle("source-endpoint"),s=e.pstyle("target-endpoint"),l=null!=o.units&&null!=s.units;switch(e.pstyle("edge-distances").value){case"node-position":n=r;break;case"intersection":n=i;break;case"endpoints":if(l){var u=b(this.manualEndptToPx(e.source()[0],o),2),c=u[0],h=u[1],d=b(this.manualEndptToPx(e.target()[0],s),2),p=d[0],g=d[1],f={x1:c,y1:h,x2:p,y2:g};a=function(e,t,n,r){var i=r-t,a=n-e,o=Math.sqrt(a*a+i*i);return{x:-i/o,y:a/o}}(c,h,p,g),n=f}else Ae("Edge ".concat(e.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),n=i}return{midptPts:n,vectorNormInverse:a}},is.findHaystackPoints=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n._private,i=r.rscratch;if(!i.haystack){var a=2*Math.random()*Math.PI;i.source={x:Math.cos(a),y:Math.sin(a)},a=2*Math.random()*Math.PI,i.target={x:Math.cos(a),y:Math.sin(a)}}var o=r.source,s=r.target,l=o.position(),u=s.position(),c=o.width(),h=s.width(),d=o.height(),p=s.height(),g=n.pstyle("haystack-radius").value/2;i.haystackPts=i.allpts=[i.source.x*c*g+l.x,i.source.y*d*g+l.y,i.target.x*h*g+u.x,i.target.y*p*g+u.y],i.midX=(i.allpts[0]+i.allpts[2])/2,i.midY=(i.allpts[1]+i.allpts[3])/2,i.edgeType="haystack",i.haystack=!0,this.storeEdgeProjections(n),this.calculateArrowAngles(n),this.recalculateEdgeLabelProjections(n),this.calculateLabelAngles(n)}},is.findSegmentsPoints=function(e,t){var n=e._private.rscratch,r=e.pstyle("segment-weights"),i=e.pstyle("segment-distances"),a=Math.min(r.pfValue.length,i.pfValue.length);n.edgeType="segments",n.segpts=[];for(var o=0;o<a;o++){var s=r.pfValue[o],l=i.pfValue[o],u=1-s,c=s,h=this.findMidptPtsEtc(e,t),d=h.midptPts,p=h.vectorNormInverse,g={x:d.x1*u+d.x2*c,y:d.y1*u+d.y2*c};n.segpts.push(g.x+p.x*l,g.y+p.y*l)}},is.findLoopPoints=function(e,t,n,r){var i=e._private.rscratch,a=t.dirCounts,o=t.srcPos,s=e.pstyle("control-point-distances"),l=s?s.pfValue[0]:void 0,u=e.pstyle("loop-direction").pfValue,c=e.pstyle("loop-sweep").pfValue,h=e.pstyle("control-point-step-size").pfValue;i.edgeType="self";var d=n,p=h;r&&(d=0,p=l);var g=u-Math.PI/2,f=g-c/2,v=g+c/2,y=String(u+"_"+c);d=void 0===a[y]?a[y]=0:++a[y],i.ctrlpts=[o.x+1.4*Math.cos(f)*p*(d/3+1),o.y+1.4*Math.sin(f)*p*(d/3+1),o.x+1.4*Math.cos(v)*p*(d/3+1),o.y+1.4*Math.sin(v)*p*(d/3+1)]},is.findCompoundLoopPoints=function(e,t,n,r){var i=e._private.rscratch;i.edgeType="compound";var a=t.srcPos,o=t.tgtPos,s=t.srcW,l=t.srcH,u=t.tgtW,c=t.tgtH,h=e.pstyle("control-point-step-size").pfValue,d=e.pstyle("control-point-distances"),p=d?d.pfValue[0]:void 0,g=n,f=h;r&&(g=0,f=p);var v={x:a.x-s/2,y:a.y-l/2},y={x:o.x-u/2,y:o.y-c/2},m={x:Math.min(v.x,y.x),y:Math.min(v.y,y.y)},b=Math.max(.5,Math.log(.01*s)),x=Math.max(.5,Math.log(.01*u));i.ctrlpts=[m.x,m.y-(1+Math.pow(50,1.12)/100)*f*(g/3+1)*b,m.x-(1+Math.pow(50,1.12)/100)*f*(g/3+1)*x,m.y]},is.findStraightEdgePoints=function(e){e._private.rscratch.edgeType="straight"},is.findBezierPoints=function(e,t,n,r,i){var a=e._private.rscratch,o=e.pstyle("control-point-step-size").pfValue,s=e.pstyle("control-point-distances"),l=e.pstyle("control-point-weights"),u=s&&l?Math.min(s.value.length,l.value.length):1,c=s?s.pfValue[0]:void 0,h=l.value[0],d=r;a.edgeType=d?"multibezier":"bezier",a.ctrlpts=[];for(var p=0;p<u;p++){var g=(.5-t.eles.length/2+n)*o*(i?-1:1),f=void 0,v=lt(g);d&&(c=s?s.pfValue[p]:o,h=l.value[p]);var y=void 0!==(f=r?c:void 0!==c?v*c:void 0)?f:g,m=1-h,b=h,x=this.findMidptPtsEtc(e,t),w=x.midptPts,E=x.vectorNormInverse,_={x:w.x1*m+w.x2*b,y:w.y1*m+w.y2*b};a.ctrlpts.push(_.x+E.x*y,_.y+E.y*y)}},is.findTaxiPoints=function(e,t){var n=e._private.rscratch;n.edgeType="segments";var r="vertical",i="horizontal",a="leftward",o="rightward",s="downward",l="upward",u=t.posPts,c=t.srcW,h=t.srcH,d=t.tgtW,p=t.tgtH,g="node-position"!==e.pstyle("edge-distances").value,f=e.pstyle("taxi-direction").value,v=f,y=e.pstyle("taxi-turn"),m="%"===y.units,b=y.pfValue,x=b<0,w=e.pstyle("taxi-turn-min-distance").pfValue,E=g?(c+d)/2:0,_=g?(h+p)/2:0,T=u.x2-u.x1,D=u.y2-u.y1,C=function(e,t){return e>0?Math.max(e-t,0):Math.min(e+t,0)},N=C(T,E),A=C(D,_),L=!1;"auto"===v?f=Math.abs(N)>Math.abs(A)?i:r:v===l||v===s?(f=r,L=!0):v!==a&&v!==o||(f=i,L=!0);var k,S=f===r,I=S?A:N,M=S?D:T,O=lt(M),P=!1;(L&&(m||x)||!(v===s&&M<0||v===l&&M>0||v===a&&M>0||v===o&&M<0)||(I=(O*=-1)*Math.abs(I),P=!0),m)?k=(b<0?1+b:b)*I:k=(b<0?I:0)+b*O;var R=function(e){return Math.abs(e)<w||Math.abs(e)>=Math.abs(I)},B=R(k),F=R(Math.abs(I)-Math.abs(k));if((B||F)&&!P)if(S){var z=Math.abs(M)<=h/2,G=Math.abs(T)<=d/2;if(z){var Y=(u.x1+u.x2)/2,X=u.y1,V=u.y2;n.segpts=[Y,X,Y,V]}else if(G){var U=(u.y1+u.y2)/2,j=u.x1,q=u.x2;n.segpts=[j,U,q,U]}else n.segpts=[u.x1,u.y2]}else{var H=Math.abs(M)<=c/2,W=Math.abs(D)<=p/2;if(H){var $=(u.y1+u.y2)/2,K=u.x1,Z=u.x2;n.segpts=[K,$,Z,$]}else if(W){var Q=(u.x1+u.x2)/2,J=u.y1,ee=u.y2;n.segpts=[Q,J,Q,ee]}else n.segpts=[u.x2,u.y1]}else if(S){var te=u.y1+k+(g?h/2*O:0),ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else{var ie=u.x1+k+(g?c/2*O:0),ae=u.y1,oe=u.y2;n.segpts=[ie,ae,ie,oe]}},is.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,i=t.tgtPos,a=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,h=!I(n.startX)||!I(n.startY),d=!I(n.arrowStartX)||!I(n.arrowStartY),p=!I(n.endX)||!I(n.endY),g=!I(n.arrowEndX)||!I(n.arrowEndY),f=3*(this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth),v=ut({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),y=v<f,m=ut({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.endX,y:n.endY}),b=m<f,x=!1;if(h||d||y){x=!0;var w={x:n.ctrlpts[0]-r.x,y:n.ctrlpts[1]-r.y},E=Math.sqrt(w.x*w.x+w.y*w.y),_={x:w.x/E,y:w.y/E},T=Math.max(a,o),D={x:n.ctrlpts[0]+2*_.x*T,y:n.ctrlpts[1]+2*_.y*T},C=u.intersectLine(r.x,r.y,a,o,D.x,D.y,0);y?(n.ctrlpts[0]=n.ctrlpts[0]+_.x*(f-v),n.ctrlpts[1]=n.ctrlpts[1]+_.y*(f-v)):(n.ctrlpts[0]=C[0]+_.x*f,n.ctrlpts[1]=C[1]+_.y*f)}if(p||g||b){x=!0;var N={x:n.ctrlpts[0]-i.x,y:n.ctrlpts[1]-i.y},A=Math.sqrt(N.x*N.x+N.y*N.y),L={x:N.x/A,y:N.y/A},k=Math.max(a,o),S={x:n.ctrlpts[0]+2*L.x*k,y:n.ctrlpts[1]+2*L.y*k},M=c.intersectLine(i.x,i.y,s,l,S.x,S.y,0);b?(n.ctrlpts[0]=n.ctrlpts[0]+L.x*(f-m),n.ctrlpts[1]=n.ctrlpts[1]+L.y*(f-m)):(n.ctrlpts[0]=M[0]+L.x*f,n.ctrlpts[1]=M[1]+L.y*f)}x&&this.findEndpoints(e)}},is.storeAllpts=function(e){var t=e._private.rscratch;if("multibezier"===t.edgeType||"bezier"===t.edgeType||"self"===t.edgeType||"compound"===t.edgeType){t.allpts=[],t.allpts.push(t.startX,t.startY);for(var n=0;n+1<t.ctrlpts.length;n+=2)t.allpts.push(t.ctrlpts[n],t.ctrlpts[n+1]),n+3<t.ctrlpts.length&&t.allpts.push((t.ctrlpts[n]+t.ctrlpts[n+2])/2,(t.ctrlpts[n+1]+t.ctrlpts[n+3])/2);var r;t.allpts.push(t.endX,t.endY),t.ctrlpts.length/2%2==0?(r=t.allpts.length/2-1,t.midX=t.allpts[r],t.midY=t.allpts[r+1]):(r=t.allpts.length/2-3,.5,t.midX=dt(t.allpts[r],t.allpts[r+2],t.allpts[r+4],.5),t.midY=dt(t.allpts[r+1],t.allpts[r+3],t.allpts[r+5],.5))}else if("straight"===t.edgeType)t.allpts=[t.startX,t.startY,t.endX,t.endY],t.midX=(t.startX+t.endX+t.arrowStartX+t.arrowEndX)/4,t.midY=(t.startY+t.endY+t.arrowStartY+t.arrowEndY)/4;else if("segments"===t.edgeType)if(t.allpts=[],t.allpts.push(t.startX,t.startY),t.allpts.push.apply(t.allpts,t.segpts),t.allpts.push(t.endX,t.endY),t.segpts.length%4==0){var i=t.segpts.length/2,a=i-2;t.midX=(t.segpts[a]+t.segpts[i])/2,t.midY=(t.segpts[a+1]+t.segpts[i+1])/2}else{var o=t.segpts.length/2-1;t.midX=t.segpts[o],t.midY=t.segpts[o+1]}},is.checkForInvalidEdgeWarning=function(e){var t=e[0]._private.rscratch;t.nodesOverlap||I(t.startX)&&I(t.startY)&&I(t.endX)&&I(t.endY)?t.loggedErr=!1:t.loggedErr||(t.loggedErr=!0,Ae("Edge `"+e.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},is.findEdgeControlPoints=function(e){var t=this;if(e&&0!==e.length){for(var n=this,r=n.cy.hasCompoundNodes(),i={map:new Fe,get:function(e){var t=this.map.get(e[0]);return null!=t?t.get(e[1]):null},set:function(e,t){var n=this.map.get(e[0]);null==n&&(n=new Fe,this.map.set(e[0],n)),n.set(e[1],t)}},a=[],o=[],s=0;s<e.length;s++){var l=e[s],u=l._private,c=l.pstyle("curve-style").value;if(!l.removed()&&l.takesUpSpace())if("haystack"!==c){var h="unbundled-bezier"===c||"segments"===c||"straight"===c||"straight-triangle"===c||"taxi"===c,d="unbundled-bezier"===c||"bezier"===c,p=u.source,g=u.target,f=[p.poolIndex(),g.poolIndex()].sort(),v=i.get(f);null==v&&(v={eles:[]},i.set(f,v),a.push(f)),v.eles.push(l),h&&(v.hasUnbundled=!0),d&&(v.hasBezier=!0)}else o.push(l)}for(var y=function(e){var o=a[e],s=i.get(o),l=void 0;if(!s.hasUnbundled){var u=s.eles[0].parallelEdges().filter((function(e){return e.isBundledBezier()}));Pe(s.eles),u.forEach((function(e){return s.eles.push(e)})),s.eles.sort((function(e,t){return e.poolIndex()-t.poolIndex()}))}var c=s.eles[0],h=c.source(),d=c.target();if(h.poolIndex()>d.poolIndex()){var p=h;h=d,d=p}var g=s.srcPos=h.position(),f=s.tgtPos=d.position(),v=s.srcW=h.outerWidth(),y=s.srcH=h.outerHeight(),m=s.tgtW=d.outerWidth(),b=s.tgtH=d.outerHeight(),x=s.srcShape=n.nodeShapes[t.getNodeShape(h)],w=s.tgtShape=n.nodeShapes[t.getNodeShape(d)];s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var E=0;E<s.eles.length;E++){var _=s.eles[E],T=_[0]._private.rscratch,D=_.pstyle("curve-style").value,C="unbundled-bezier"===D||"segments"===D||"taxi"===D,N=!h.same(_.source());if(!s.calculatedIntersection&&h!==d&&(s.hasBezier||s.hasUnbundled)){s.calculatedIntersection=!0;var A=x.intersectLine(g.x,g.y,v,y,f.x,f.y,0),L=s.srcIntn=A,k=w.intersectLine(f.x,f.y,m,b,g.x,g.y,0),S=s.tgtIntn=k,M=s.intersectionPts={x1:A[0],x2:k[0],y1:A[1],y2:k[1]},O=s.posPts={x1:g.x,x2:f.x,y1:g.y,y2:f.y},P=k[1]-A[1],R=k[0]-A[0],B=Math.sqrt(R*R+P*P),F=s.vector={x:R,y:P},z=s.vectorNorm={x:F.x/B,y:F.y/B},G={x:-z.y,y:z.x};s.nodesOverlap=!I(B)||w.checkPoint(A[0],A[1],0,m,b,f.x,f.y)||x.checkPoint(k[0],k[1],0,v,y,g.x,g.y),s.vectorNormInverse=G,l={nodesOverlap:s.nodesOverlap,dirCounts:s.dirCounts,calculatedIntersection:!0,hasBezier:s.hasBezier,hasUnbundled:s.hasUnbundled,eles:s.eles,srcPos:f,tgtPos:g,srcW:m,srcH:b,tgtW:v,tgtH:y,srcIntn:S,tgtIntn:L,srcShape:w,tgtShape:x,posPts:{x1:O.x2,y1:O.y2,x2:O.x1,y2:O.y1},intersectionPts:{x1:M.x2,y1:M.y2,x2:M.x1,y2:M.y1},vector:{x:-F.x,y:-F.y},vectorNorm:{x:-z.x,y:-z.y},vectorNormInverse:{x:-G.x,y:-G.y}}}var Y=N?l:s;T.nodesOverlap=Y.nodesOverlap,T.srcIntn=Y.srcIntn,T.tgtIntn=Y.tgtIntn,r&&(h.isParent()||h.isChild()||d.isParent()||d.isChild())&&(h.parents().anySame(d)||d.parents().anySame(h)||h.same(d)&&h.isParent())?t.findCompoundLoopPoints(_,Y,E,C):h===d?t.findLoopPoints(_,Y,E,C):"segments"===D?t.findSegmentsPoints(_,Y):"taxi"===D?t.findTaxiPoints(_,Y):"straight"===D||!C&&s.eles.length%2==1&&E===Math.floor(s.eles.length/2)?t.findStraightEdgePoints(_):t.findBezierPoints(_,Y,E,C,N),t.findEndpoints(_),t.tryToCorrectInvalidPoints(_,Y),t.checkForInvalidEdgeWarning(_),t.storeAllpts(_),t.storeEdgeProjections(_),t.calculateArrowAngles(_),t.recalculateEdgeLabelProjections(_),t.calculateLabelAngles(_)}},m=0;m<a.length;m++)y(m);this.findHaystackPoints(o)}},is.getSegmentPoints=function(e){var t=e[0]._private.rscratch;if("segments"===t.edgeType)return this.recalculateRenderedStyle(e),as(t.segpts)},is.getControlPoints=function(e){var t=e[0]._private.rscratch,n=t.edgeType;if("bezier"===n||"multibezier"===n||"self"===n||"compound"===n)return this.recalculateRenderedStyle(e),as(t.ctrlpts)},is.getEdgeMidpoint=function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),{x:t.midX,y:t.midY}};var os={manualEndptToPx:function(e,t){var n=e.position(),r=e.outerWidth(),i=e.outerHeight();if(2===t.value.length){var a=[t.pfValue[0],t.pfValue[1]];return"%"===t.units[0]&&(a[0]=a[0]*r),"%"===t.units[1]&&(a[1]=a[1]*i),a[0]+=n.x,a[1]+=n.y,a}var o=t.pfValue[0];o=-Math.PI/2+o;var s=2*Math.max(r,i),l=[n.x+Math.cos(o)*s,n.y+Math.sin(o)*s];return this.nodeShapes[this.getNodeShape(e)].intersectLine(n.x,n.y,r,i,l[0],l[1],0)},findEndpoints:function(e){var t,n,r,i,a,o=this,s=e.source()[0],l=e.target()[0],u=s.position(),c=l.position(),h=e.pstyle("target-arrow-shape").value,d=e.pstyle("source-arrow-shape").value,p=e.pstyle("target-distance-from-node").pfValue,g=e.pstyle("source-distance-from-node").pfValue,f=e.pstyle("curve-style").value,v=e._private.rscratch,y=v.edgeType,m="self"===y||"compound"===y,b="bezier"===y||"multibezier"===y||m,x="bezier"!==y,w="straight"===y||"segments"===y,E="segments"===y,_=b||x||w,T=m||"taxi"===f,D=e.pstyle("source-endpoint"),C=T?"outside-to-node":D.value,N=e.pstyle("target-endpoint"),A=T?"outside-to-node":N.value;if(v.srcManEndpt=D,v.tgtManEndpt=N,b){var L=[v.ctrlpts[0],v.ctrlpts[1]];n=x?[v.ctrlpts[v.ctrlpts.length-2],v.ctrlpts[v.ctrlpts.length-1]]:L,r=L}else if(w){var k=E?v.segpts.slice(0,2):[c.x,c.y];n=E?v.segpts.slice(v.segpts.length-2):[u.x,u.y],r=k}if("inside-to-node"===A)t=[c.x,c.y];else if(N.units)t=this.manualEndptToPx(l,N);else if("outside-to-line"===A)t=v.tgtIntn;else if("outside-to-node"===A||"outside-to-node-or-label"===A?i=n:"outside-to-line"!==A&&"outside-to-line-or-label"!==A||(i=[u.x,u.y]),t=o.nodeShapes[this.getNodeShape(l)].intersectLine(c.x,c.y,l.outerWidth(),l.outerHeight(),i[0],i[1],0),"outside-to-node-or-label"===A||"outside-to-line-or-label"===A){var S=l._private.rscratch,M=S.labelWidth,O=S.labelHeight,P=S.labelX,R=S.labelY,B=M/2,F=O/2,z=l.pstyle("text-valign").value;"top"===z?R-=F:"bottom"===z&&(R+=F);var G=l.pstyle("text-halign").value;"left"===G?P-=B:"right"===G&&(P+=B);var Y=Bt(i[0],i[1],[P-B,R-F,P+B,R-F,P+B,R+F,P-B,R+F],c.x,c.y);if(Y.length>0){var X=u,V=ct(X,at(t)),U=ct(X,at(Y)),j=V;if(U<V&&(t=Y,j=U),Y.length>2)ct(X,{x:Y[2],y:Y[3]})<j&&(t=[Y[2],Y[3]])}}var q=Ft(t,n,o.arrowShapes[h].spacing(e)+p),H=Ft(t,n,o.arrowShapes[h].gap(e)+p);if(v.endX=H[0],v.endY=H[1],v.arrowEndX=q[0],v.arrowEndY=q[1],"inside-to-node"===C)t=[u.x,u.y];else if(D.units)t=this.manualEndptToPx(s,D);else if("outside-to-line"===C)t=v.srcIntn;else if("outside-to-node"===C||"outside-to-node-or-label"===C?a=r:"outside-to-line"!==C&&"outside-to-line-or-label"!==C||(a=[c.x,c.y]),t=o.nodeShapes[this.getNodeShape(s)].intersectLine(u.x,u.y,s.outerWidth(),s.outerHeight(),a[0],a[1],0),"outside-to-node-or-label"===C||"outside-to-line-or-label"===C){var W=s._private.rscratch,$=W.labelWidth,K=W.labelHeight,Z=W.labelX,Q=W.labelY,J=$/2,ee=K/2,te=s.pstyle("text-valign").value;"top"===te?Q-=ee:"bottom"===te&&(Q+=ee);var ne=s.pstyle("text-halign").value;"left"===ne?Z-=J:"right"===ne&&(Z+=J);var re=Bt(a[0],a[1],[Z-J,Q-ee,Z+J,Q-ee,Z+J,Q+ee,Z-J,Q+ee],u.x,u.y);if(re.length>0){var ie=c,ae=ct(ie,at(t)),oe=ct(ie,at(re)),se=ae;if(oe<ae&&(t=[re[0],re[1]],se=oe),re.length>2)ct(ie,{x:re[2],y:re[3]})<se&&(t=[re[2],re[3]])}}var le=Ft(t,r,o.arrowShapes[d].spacing(e)+g),ue=Ft(t,r,o.arrowShapes[d].gap(e)+g);v.startX=ue[0],v.startY=ue[1],v.arrowStartX=le[0],v.arrowStartY=le[1],_&&(I(v.startX)&&I(v.startY)&&I(v.endX)&&I(v.endY)?v.badLine=!1:v.badLine=!0)},getSourceEndpoint:function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),"haystack"===t.edgeType?{x:t.haystackPts[0],y:t.haystackPts[1]}:{x:t.arrowStartX,y:t.arrowStartY}},getTargetEndpoint:function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),"haystack"===t.edgeType?{x:t.haystackPts[2],y:t.haystackPts[3]}:{x:t.arrowEndX,y:t.arrowEndY}}},ss={};function ls(e,t,n){for(var r=function(e,t,n,r){return dt(e,t,n,r)},i=t._private.rstyle.bezierPts,a=0;a<e.bezierProjPcts.length;a++){var o=e.bezierProjPcts[a];i.push({x:r(n[0],n[2],n[4],o),y:r(n[1],n[3],n[5],o)})}}ss.storeEdgeProjections=function(e){var t=e._private,n=t.rscratch,r=n.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,"multibezier"===r||"bezier"===r||"self"===r||"compound"===r){t.rstyle.bezierPts=[];for(var i=0;i+5<n.allpts.length;i+=4)ls(this,e,n.allpts.slice(i,i+6))}else if("segments"===r){var a=t.rstyle.linePts=[];for(i=0;i+1<n.allpts.length;i+=2)a.push({x:n.allpts[i],y:n.allpts[i+1]})}else if("haystack"===r){var o=n.haystackPts;t.rstyle.haystackPts=[{x:o[0],y:o[1]},{x:o[2],y:o[3]}]}t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth},ss.recalculateEdgeProjections=function(e){this.findEdgeControlPoints(e)};var us={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!z(t)){var n,r,i=e._private,a=e.width(),o=e.height(),s=e.padding(),l=e.position(),u=e.pstyle("text-halign").strValue,c=e.pstyle("text-valign").strValue,h=i.rscratch,d=i.rstyle;switch(u){case"left":n=l.x-a/2-s;break;case"right":n=l.x+a/2+s;break;default:n=l.x}switch(c){case"top":r=l.y-o/2-s;break;case"bottom":r=l.y+o/2+s;break;default:r=l.y}h.labelX=n,h.labelY=r,d.labelX=n,d.labelY=r,this.calculateLabelAngles(e),this.applyLabelDimensions(e)}}},cs=function(e,t){var n=Math.atan(t/e);return 0===e&&n<0&&(n*=-1),n},hs=function(e,t){var n=t.x-e.x,r=t.y-e.y;return cs(n,r)};us.recalculateEdgeLabelProjections=function(e){var t,n=e._private,r=n.rscratch,i=this,a={mid:e.pstyle("label").strValue,source:e.pstyle("source-label").strValue,target:e.pstyle("target-label").strValue};if(a.mid||a.source||a.target){t={x:r.midX,y:r.midY};var o=function(e,t,r){Be(n.rscratch,e,t,r),Be(n.rstyle,e,t,r)};o("labelX",null,t.x),o("labelY",null,t.y);var s=cs(r.midDispX,r.midDispY);o("labelAutoAngle",null,s);var l=function e(){if(e.cache)return e.cache;for(var t=[],a=0;a+5<r.allpts.length;a+=4){var o={x:r.allpts[a],y:r.allpts[a+1]},s={x:r.allpts[a+2],y:r.allpts[a+3]},l={x:r.allpts[a+4],y:r.allpts[a+5]};t.push({p0:o,p1:s,p2:l,startDist:0,length:0,segments:[]})}var u=n.rstyle.bezierPts,c=i.bezierProjPcts.length;function h(e,t,n,r,i){var a=ut(t,n),o=e.segments[e.segments.length-1],s={p0:t,p1:n,t0:r,t1:i,startDist:o?o.startDist+o.length:0,length:a};e.segments.push(s),e.length+=a}for(var d=0;d<t.length;d++){var p=t[d],g=t[d-1];g&&(p.startDist=g.startDist+g.length),h(p,p.p0,u[d*c],0,i.bezierProjPcts[0]);for(var f=0;f<c-1;f++)h(p,u[d*c+f],u[d*c+f+1],i.bezierProjPcts[f],i.bezierProjPcts[f+1]);h(p,u[d*c+c-1],p.p2,i.bezierProjPcts[c-1],1)}return e.cache=t},u=function(n){var i,s="source"===n;if(a[n]){var u=e.pstyle(n+"-text-offset").pfValue;switch(r.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var c,h=l(),d=0,p=0,g=0;g<h.length;g++){for(var f=h[s?g:h.length-1-g],v=0;v<f.segments.length;v++){var y=f.segments[s?v:f.segments.length-1-v],m=g===h.length-1&&v===f.segments.length-1;if(d=p,(p+=y.length)>=u||m){c={cp:f,segment:y};break}}if(c)break}var b=c.cp,x=c.segment,w=(u-d)/x.length,E=x.t1-x.t0,_=s?x.t0+E*w:x.t1-E*w;_=gt(0,_,1),t=pt(b.p0,b.p1,b.p2,_),i=function(e,t,n,r){var i=gt(0,r-.001,1),a=gt(0,r+.001,1),o=pt(e,t,n,i),s=pt(e,t,n,a);return hs(o,s)}(b.p0,b.p1,b.p2,_);break;case"straight":case"segments":case"haystack":for(var T,D,C,N,A=0,L=r.allpts.length,k=0;k+3<L&&(s?(C={x:r.allpts[k],y:r.allpts[k+1]},N={x:r.allpts[k+2],y:r.allpts[k+3]}):(C={x:r.allpts[L-2-k],y:r.allpts[L-1-k]},N={x:r.allpts[L-4-k],y:r.allpts[L-3-k]}),D=A,!((A+=T=ut(C,N))>=u));k+=2);var S=(u-D)/T;S=gt(0,S,1),t=function(e,t,n,r){var i=t.x-e.x,a=t.y-e.y,o=ut(e,t),s=i/o,l=a/o;return n=null==n?0:n,r=null!=r?r:n*o,{x:e.x+s*r,y:e.y+l*r}}(C,N,S),i=hs(C,N)}o("labelX",n,t.x),o("labelY",n,t.y),o("labelAutoAngle",n,i)}};u("source"),u("target"),this.applyLabelDimensions(e)}},us.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},us.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),i=this.calculateLabelDimensions(e,r),a=e.pstyle("line-height").pfValue,o=e.pstyle("text-wrap").strValue,s=Re(n.rscratch,"labelWrapCachedLines",t)||[],l="wrap"!==o?1:Math.max(s.length,1),u=i.height/l,c=u*a,h=i.width,d=i.height+(l-1)*(a-1)*u;Be(n.rstyle,"labelWidth",t,h),Be(n.rscratch,"labelWidth",t,h),Be(n.rstyle,"labelHeight",t,d),Be(n.rscratch,"labelHeight",t,d),Be(n.rscratch,"labelLineHeight",t,c)},us.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,a=e.pstyle("text-transform").value,o=function(e,r){return r?(Be(n.rscratch,e,t,r),r):Re(n.rscratch,e,t)};if(!i)return"";"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var l=o("labelKey");if(null!=l&&o("labelWrapKey")===l)return o("labelWrapCachedText");for(var u=i.split("\n"),c=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,d=[],p=/[\s\u200b]+/,g=h?"":" ",f=0;f<u.length;f++){var v=u[f],y=this.calculateLabelDimensions(e,v).width;if(h){var m=v.split("").join("\u200b");v=m}if(y>c){for(var b=v.split(p),x="",w=0;w<b.length;w++){var E=b[w],_=0===x.length?E:x+g+E;this.calculateLabelDimensions(e,_).width<=c?x+=E+g:(x&&d.push(x),x=E+g)}x.match(/^[\s\u200b]+$/)||d.push(x)}else d.push(v)}o("labelWrapCachedLines",d),i=o("labelWrapCachedText",d.join("\n")),o("labelWrapKey",l)}else if("ellipsis"===s){var T=e.pstyle("text-max-width").pfValue,D="",C=!1;if(this.calculateLabelDimensions(e,i).width<T)return i;for(var N=0;N<i.length;N++){if(this.calculateLabelDimensions(e,D+i[N]+"\u2026").width>T)break;D+=i[N],N===i.length-1&&(C=!0)}return C||(D+="\u2026"),D}return i},us.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},us.calculateLabelDimensions=function(e,t){var n=fe(t,e._private.labelDimsKey),r=this.labelDimCache||(this.labelDimCache=[]),i=r[n];if(null!=i)return i;var a=e.pstyle("font-style").strValue,o=e.pstyle("font-size").pfValue,s=e.pstyle("font-family").strValue,l=e.pstyle("font-weight").strValue,u=this.labelCalcCanvas,c=this.labelCalcCanvasContext;if(!u){u=this.labelCalcCanvas=document.createElement("canvas"),c=this.labelCalcCanvasContext=u.getContext("2d");var h=u.style;h.position="absolute",h.left="-9999px",h.top="-9999px",h.zIndex="-1",h.visibility="hidden",h.pointerEvents="none"}c.font="".concat(a," ").concat(l," ").concat(o,"px ").concat(s);for(var d=0,p=0,g=t.split("\n"),f=0;f<g.length;f++){var v=g[f],y=c.measureText(v),m=Math.ceil(y.width),b=o;d=Math.max(m,d),p+=b}return d+=0,p+=0,r[n]={width:d,height:p}},us.calculateLabelAngle=function(e,t){var n=e._private.rscratch,r=e.isEdge(),i=t?t+"-":"",a=e.pstyle(i+"text-rotation"),o=a.strValue;return"none"===o?0:r&&"autorotate"===o?n.labelAutoAngle:"autorotate"===o?0:a.pfValue},us.calculateLabelAngles=function(e){var t=this,n=e.isEdge(),r=e._private.rscratch;r.labelAngle=t.calculateLabelAngle(e),n&&(r.sourceLabelAngle=t.calculateLabelAngle(e,"source"),r.targetLabelAngle=t.calculateLabelAngle(e,"target"))};var ds={},ps=!1;ds.getNodeShape=function(e){var t=e.pstyle("shape").value;if("cutrectangle"===t&&(e.width()<28||e.height()<28))return ps||(Ae("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),ps=!0),"rectangle";if(e.isParent())return"rectangle"===t||"roundrectangle"===t||"round-rectangle"===t||"cutrectangle"===t||"cut-rectangle"===t||"barrel"===t?t:"rectangle";if("polygon"===t){var n=e.pstyle("shape-polygon-points").value;return this.nodeShapes.makePolygon(n).name}return t};var gs={registerCalculationListeners:function(){var e=this.cy,t=e.collection(),n=this,r=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r<e.length;r++){var i=e[r]._private.rstyle;i.clean=!1,i.cleanConnected=!1}};n.binder(e).on("bounds.* dirty.*",(function(e){var t=e.target;r(t)})).on("style.* background.*",(function(e){var t=e.target;r(t,!1)}));var i=function(i){if(i){var a=n.onUpdateEleCalcsFns;t.cleanStyle();for(var o=0;o<t.length;o++){var s=t[o],l=s._private.rstyle;s.isNode()&&!l.cleanConnected&&(r(s.connectedEdges()),l.cleanConnected=!0)}if(a)for(var u=0;u<a.length;u++){(0,a[u])(i,t)}n.recalculateRenderedStyle(t),t=e.collection()}};n.flushRenderedStyleQueue=function(){i(!0)},n.beforeRender(i,n.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(e){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(e)},recalculateRenderedStyle:function(e,t){var n=function(e){return e._private.rstyle.cleanConnected},r=[],i=[];if(!this.destroyed){void 0===t&&(t=!0);for(var a=0;a<e.length;a++){var o=e[a],s=o._private,l=s.rstyle;!o.isEdge()||n(o.source())&&n(o.target())||(l.clean=!1),t&&l.clean||o.removed()||"none"!==o.pstyle("display").value&&("nodes"===s.group?i.push(o):r.push(o),l.clean=!0)}for(var u=0;u<i.length;u++){var c=i[u],h=c._private.rstyle,d=c.position();this.recalculateNodeLabelProjection(c),h.nodeX=d.x,h.nodeY=d.y,h.nodeW=c.pstyle("width").pfValue,h.nodeH=c.pstyle("height").pfValue}this.recalculateEdgeProjections(r);for(var p=0;p<r.length;p++){var g=r[p]._private,f=g.rstyle,v=g.rscratch;f.srcX=v.arrowStartX,f.srcY=v.arrowStartY,f.tgtX=v.arrowEndX,f.tgtY=v.arrowEndY,f.midX=v.midX,f.midY=v.midY,f.labelAngle=v.labelAngle,f.sourceLabelAngle=v.sourceLabelAngle,f.targetLabelAngle=v.targetLabelAngle}}}},fs={updateCachedGrabbedEles:function(){var e=this.cachedZSortedEles;if(e){e.drag=[],e.nondrag=[];for(var t=[],n=0;n<e.length;n++){var r=(i=e[n])._private.rscratch;i.grabbed()&&!i.isParent()?t.push(i):r.inDragLayer?e.drag.push(i):e.nondrag.push(i)}for(n=0;n<t.length;n++){var i=t[n];e.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(e){if(e||!this.cachedZSortedEles){var t=this.cy.mutableElements().toArray();t.sort(Ji),t.interactive=t.filter((function(e){return e.interactive()})),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()}else t=this.cachedZSortedEles;return t}},vs={};[ns,rs,is,os,ss,us,ds,gs,fs].forEach((function(e){Q(vs,e)}));var ys={getCachedImage:function(e,t,n){var r=this.imageCache=this.imageCache||{},i=r[e];if(i)return i.image.complete||i.image.addEventListener("load",n),i.image;var a=(i=r[e]=r[e]||{}).image=new Image;a.addEventListener("load",n),a.addEventListener("error",(function(){a.error=!0}));var o="data:";return e.substring(0,5).toLowerCase()===o||(t="null"===t?null:t,a.crossOrigin=t),a.src=e,a}},ms={registerBinding:function(e,t,n,r){var i=Array.prototype.slice.apply(arguments,[1]),a=this.binder(e);return a.on.apply(a,i)}};ms.binder=function(e){var t,n=this,r=n.cy.window(),i=e===r||e===r.document||e===r.document.body||(t=e,"undefined"!=typeof HTMLElement&&t instanceof HTMLElement);if(null==n.supportsPassiveEvents){var a=!1;try{var o=Object.defineProperty({},"passive",{get:function(){return a=!0,!0}});r.addEventListener("test",null,o)}catch(l){}n.supportsPassiveEvents=a}var s=function(t,r,a){var o=Array.prototype.slice.call(arguments);return i&&n.supportsPassiveEvents&&(o[2]={capture:null!=a&&a,passive:!1,once:!1}),n.bindings.push({target:e,args:o}),(e.addEventListener||e.on).apply(e,o),this};return{on:s,addEventListener:s,addListener:s,bind:s}},ms.nodeIsDraggable=function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},ms.nodeIsGrabbable=function(e){return this.nodeIsDraggable(e)&&e.interactive()},ms.load=function(){var e=this,t=e.cy.window(),n=function(e){return e.selected()},r=function(t,n,r,i){null==t&&(t=e.cy);for(var a=0;a<n.length;a++){var o=n[a];t.emit({originalEvent:r,type:o,position:i})}},i=function(e){return e.shiftKey||e.metaKey||e.ctrlKey},a=function(t,n){var r=!0;if(e.cy.hasCompoundNodes()&&t&&t.pannable())for(var i=0;n&&i<n.length;i++){if((t=n[i]).isNode()&&t.isParent()&&!t.pannable()){r=!1;break}}else r=!0;return r},o=function(e){e[0]._private.rscratch.inDragLayer=!0},s=function(e){e[0]._private.rscratch.isGrabTarget=!0},l=function(e,t){var n=t.addToList;n.has(e)||!e.grabbable()||e.locked()||(n.merge(e),function(e){e[0]._private.grabbed=!0}(e))},c=function(t,n){n=n||{};var r=t.cy().hasCompoundNodes();n.inDragLayer&&(t.forEach(o),t.neighborhood().stdFilter((function(e){return!r||e.isEdge()})).forEach(o)),n.addToList&&t.forEach((function(e){l(e,n)})),function(e,t){if(e.cy().hasCompoundNodes()&&(null!=t.inDragLayer||null!=t.addToList)){var n=e.descendants();t.inDragLayer&&(n.forEach(o),n.connectedEdges().forEach(o)),t.addToList&&l(n,t)}}(t,n),p(t,{inDragLayer:n.inDragLayer}),e.updateCachedGrabbedEles()},h=c,d=function(t){t&&(e.getCachedZSortedEles().forEach((function(e){!function(e){e[0]._private.grabbed=!1}(e),function(e){e[0]._private.rscratch.inDragLayer=!1}(e),function(e){e[0]._private.rscratch.isGrabTarget=!1}(e)})),e.updateCachedGrabbedEles())},p=function(e,t){if((null!=t.inDragLayer||null!=t.addToList)&&e.cy().hasCompoundNodes()){var n=e.ancestors().orphans();if(!n.same(e)){var r=n.descendants().spawnSelf().merge(n).unmerge(e).unmerge(e.descendants()),i=r.connectedEdges();t.inDragLayer&&(i.forEach(o),r.forEach(o)),t.addToList&&r.forEach((function(e){l(e,t)}))}}},g=function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},f="undefined"!=typeof MutationObserver,v="undefined"!=typeof ResizeObserver;f?(e.removeObserver=new MutationObserver((function(t){for(var n=0;n<t.length;n++){var r=t[n].removedNodes;if(r)for(var i=0;i<r.length;i++){if(r[i]===e.container){e.destroy();break}}}})),e.container.parentNode&&e.removeObserver.observe(e.container.parentNode,{childList:!0})):e.registerBinding(e.container,"DOMNodeRemoved",(function(t){e.destroy()}));var y=u.default((function(){e.cy.resize()}),100);f&&(e.styleObserver=new MutationObserver(y),e.styleObserver.observe(e.container,{attributes:!0})),e.registerBinding(t,"resize",y),v&&(e.resizeObserver=new ResizeObserver(y),e.resizeObserver.observe(e.container));var m=function(){e.invalidateContainerClientCoordsCache()};!function(e,t){for(;null!=e;)t(e),e=e.parentNode}(e.container,(function(t){e.registerBinding(t,"transitionend",m),e.registerBinding(t,"animationend",m),e.registerBinding(t,"scroll",m)})),e.registerBinding(e.container,"contextmenu",(function(e){e.preventDefault()}));var b,x,w,E=function(t){for(var n=e.findContainerClientCoords(),r=n[0],i=n[1],a=n[2],o=n[3],s=t.touches?t.touches:[t],l=!1,u=0;u<s.length;u++){var c=s[u];if(r<=c.clientX&&c.clientX<=r+a&&i<=c.clientY&&c.clientY<=i+o){l=!0;break}}if(!l)return!1;for(var h=e.container,d=t.target.parentNode,p=!1;d;){if(d===h){p=!0;break}d=d.parentNode}return!!p};e.registerBinding(e.container,"mousedown",(function(t){if(E(t)){t.preventDefault(),g(),e.hoverData.capture=!0,e.hoverData.which=t.which;var n=e.cy,i=[t.clientX,t.clientY],a=e.projectIntoViewport(i[0],i[1]),o=e.selection,l=e.findNearestElements(a[0],a[1],!0,!1),u=l[0],d=e.dragData.possibleDragElements;e.hoverData.mdownPos=a,e.hoverData.mdownGPos=i;if(3==t.which){e.hoverData.cxtStarted=!0;var p={originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}};u?(u.activate(),u.emit(p),e.hoverData.down=u):n.emit(p),e.hoverData.downTime=(new Date).getTime(),e.hoverData.cxtDragged=!1}else if(1==t.which){if(u&&u.activate(),null!=u&&e.nodeIsGrabbable(u)){var f=function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}};if(s(u),u.selected()){d=e.dragData.possibleDragElements=n.collection();var v=n.$((function(t){return t.isNode()&&t.selected()&&e.nodeIsGrabbable(t)}));c(v,{addToList:d}),u.emit(f("grabon")),v.forEach((function(e){e.emit(f("grab"))}))}else d=e.dragData.possibleDragElements=n.collection(),h(u,{addToList:d}),u.emit(f("grabon")).emit(f("grab"));e.redrawHint("eles",!0),e.redrawHint("drag",!0)}e.hoverData.down=u,e.hoverData.downs=l,e.hoverData.downTime=(new Date).getTime(),r(u,["mousedown","tapstart","vmousedown"],t,{x:a[0],y:a[1]}),null==u?(o[4]=1,e.data.bgActivePosistion={x:a[0],y:a[1]},e.redrawHint("select",!0),e.redraw()):u.pannable()&&(o[4]=1),e.hoverData.tapholdCancelled=!1,clearTimeout(e.hoverData.tapholdTimeout),e.hoverData.tapholdTimeout=setTimeout((function(){if(!e.hoverData.tapholdCancelled){var r=e.hoverData.down;r?r.emit({originalEvent:t,type:"taphold",position:{x:a[0],y:a[1]}}):n.emit({originalEvent:t,type:"taphold",position:{x:a[0],y:a[1]}})}}),e.tapholdDuration)}o[0]=o[2]=a[0],o[1]=o[3]=a[1]}}),!1),e.registerBinding(t,"mousemove",(function(t){if(e.hoverData.capture||E(t)){var n=!1,o=e.cy,s=o.zoom(),l=[t.clientX,t.clientY],u=e.projectIntoViewport(l[0],l[1]),h=e.hoverData.mdownPos,p=e.hoverData.mdownGPos,g=e.selection,f=null;e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.selecting||(f=e.findNearestElement(u[0],u[1],!0,!1));var v,y=e.hoverData.last,m=e.hoverData.down,b=[u[0]-g[2],u[1]-g[3]],x=e.dragData.possibleDragElements;if(p){var w=l[0]-p[0],_=w*w,T=l[1]-p[1],D=_+T*T;e.hoverData.isOverThresholdDrag=v=D>=e.desktopTapThreshold2}var C=i(t);v&&(e.hoverData.tapholdCancelled=!0);n=!0,r(f,["mousemove","vmousemove","tapdrag"],t,{x:u[0],y:u[1]});var N=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:u[0],y:u[1]}}),g[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(v){var A={originalEvent:t,type:"cxtdrag",position:{x:u[0],y:u[1]}};m?m.emit(A):o.emit(A),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&f===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:u[0],y:u[1]}}),e.hoverData.cxtOver=f,f&&f.emit({originalEvent:t,type:"cxtdragover",position:{x:u[0],y:u[1]}}))}}else if(e.hoverData.dragging){if(n=!0,o.panningEnabled()&&o.userPanningEnabled()){var L;if(e.hoverData.justStartedPan){var k=e.hoverData.mdownPos;L={x:(u[0]-k[0])*s,y:(u[1]-k[1])*s},e.hoverData.justStartedPan=!1}else L={x:b[0]*s,y:b[1]*s};o.panBy(L),o.emit("dragpan"),e.hoverData.dragged=!0}u=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=g[4]||null!=m&&!m.pannable()){if(m&&m.pannable()&&m.active()&&m.unactivate(),m&&m.grabbed()||f==y||(y&&r(y,["mouseout","tapdragout"],t,{x:u[0],y:u[1]}),f&&r(f,["mouseover","tapdragover"],t,{x:u[0],y:u[1]}),e.hoverData.last=f),m)if(v){if(o.boxSelectionEnabled()&&C)m&&m.grabbed()&&(d(x),m.emit("freeon"),x.emit("free"),e.dragData.didDrag&&(m.emit("dragfreeon"),x.emit("dragfree"))),N();else if(m&&m.grabbed()&&e.nodeIsDraggable(m)){var S=!e.dragData.didDrag;S&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||c(x,{inDragLayer:!0});var M={x:0,y:0};if(I(b[0])&&I(b[1])&&(M.x+=b[0],M.y+=b[1],S)){var O=e.hoverData.dragDelta;O&&I(O[0])&&I(O[1])&&(M.x+=O[0],M.y+=O[1])}e.hoverData.draggingEles=!0,x.silentShift(M).emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(b[0]),t.push(b[1])):(t[0]+=b[0],t[1]+=b[1])}();n=!0}else if(v){if(e.hoverData.dragging||!o.boxSelectionEnabled()||!C&&o.panningEnabled()&&o.userPanningEnabled()){if(!e.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()){a(m,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,g[4]=0,e.data.bgActivePosistion=at(h),e.redrawHint("select",!0),e.redraw())}}else N();m&&m.pannable()&&m.active()&&m.unactivate()}return g[2]=u[0],g[3]=u[1],n?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}}),!1),e.registerBinding(t,"mouseup",(function(t){if(e.hoverData.capture){e.hoverData.capture=!1;var a=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,h=i(t);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var p={originalEvent:t,type:"cxttapend",position:{x:o[0],y:o[1]}};if(c?c.emit(p):a.emit(p),!e.hoverData.cxtDragged){var g={originalEvent:t,type:"cxttap",position:{x:o[0],y:o[1]}};c?c.emit(g):a.emit(g)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(r(l,["mouseup","tapend","vmouseup"],t,{x:o[0],y:o[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(r(c,["click","tap","vclick"],t,{x:o[0],y:o[1]}),x=!1,t.timeStamp-w<=a.multiClickDebounceTime()?(b&&clearTimeout(b),x=!0,w=null,r(c,["dblclick","dbltap","vdblclick"],t,{x:o[0],y:o[1]})):(b=setTimeout((function(){x||r(c,["oneclick","onetap","voneclick"],t,{x:o[0],y:o[1]})}),a.multiClickDebounceTime()),w=t.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||i(t)||(a.$(n).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=a.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===a.selectionType()||h?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):h||(a.$(n).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var f=a.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),f.length>0&&e.redrawHint("eles",!0),a.emit({type:"boxend",originalEvent:t,position:{x:o[0],y:o[1]}});var v=function(e){return e.selectable()&&!e.selected()};"additive"===a.selectionType()||h||a.$(n).unmerge(f).unselect(),f.emit("box").stdFilter(v).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var y=c&&c.grabbed();d(u),y&&(c.emit("freeon"),u.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null}}),!1);var _,T,D,C,N,A,L,k,S,M,O,P,R,B=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),i=n.pan(),a=e.projectIntoViewport(t.clientX,t.clientY),o=[a[0]*r+i.x,a[1]*r+i.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var l=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(l=e.gestureStartZoom*t.scale),n.zoom({level:l,renderedPosition:{x:o[0],y:o[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",B,!0),e.registerBinding(t,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"gesturestart",(function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()}),!0),e.registerBinding(e.container,"gesturechange",(function(t){e.hasTouchStarted||B(t)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var F,z,G,Y,X,V,U,j=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},q=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",F=function(t){if(e.hasTouchStarted=!0,E(t)){g(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,i=e.touchData.now,a=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);i[0]=o[0],i[1]=o[1]}if(t.touches[1]){o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);i[2]=o[0],i[3]=o[1]}if(t.touches[2]){o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);i[4]=o[0],i[5]=o[1]}if(t.touches[1]){e.touchData.singleTouchMoved=!0,d(e.dragData.touchDragEles);var l=e.findContainerClientCoords();S=l[0],M=l[1],O=l[2],P=l[3],_=t.touches[0].clientX-S,T=t.touches[0].clientY-M,D=t.touches[1].clientX-S,C=t.touches[1].clientY-M,R=0<=_&&_<=O&&0<=D&&D<=O&&0<=T&&T<=P&&0<=C&&C<=P;var u=n.pan(),p=n.zoom();N=j(_,T,D,C),A=q(_,T,D,C),k=[((L=[(_+D)/2,(T+C)/2])[0]-u.x)/p,(L[1]-u.y)/p];if(A<4e4&&!t.touches[2]){var f=e.findNearestElement(i[0],i[1],!0,!0),v=e.findNearestElement(i[2],i[3],!0,!0);return f&&f.isNode()?(f.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=f):v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=v):n.emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var y=e.findNearestElements(i[0],i[1],!0,!0),m=y[0];if(null!=m&&(m.activate(),e.touchData.start=m,e.touchData.starts=y,e.nodeIsGrabbable(m))){var b=e.dragData.touchDragEles=n.collection(),x=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),m.selected()?(x=n.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),c(x,{addToList:b})):h(m,{addToList:b}),s(m);var w=function(e){return{originalEvent:t,type:e,position:{x:i[0],y:i[1]}}};m.emit(w("grabon")),x?x.forEach((function(e){e.emit(w("grab"))})):m.emit(w("grab"))}r(m,["touchstart","tapstart","vmousedown"],t,{x:i[0],y:i[1]}),null==m&&(e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||r(e.touchData.start,["taphold"],t,{x:i[0],y:i[1]})}),e.tapholdDuration)}if(t.touches.length>=1){for(var I=e.touchData.startPosition=[null,null,null,null,null,null],B=0;B<i.length;B++)I[B]=a[B]=i[B];var F=t.touches[0];e.touchData.startGPosition=[F.clientX,F.clientY]}}},!1),e.registerBinding(window,"touchmove",z=function(t){var n=e.touchData.capture;if(n||E(t)){var i=e.selection,o=e.cy,s=e.touchData.now,l=e.touchData.earlier,u=o.zoom();if(t.touches[0]){var h=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=h[0],s[1]=h[1]}if(t.touches[1]){h=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);s[2]=h[0],s[3]=h[1]}if(t.touches[2]){h=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);s[4]=h[0],s[5]=h[1]}var p,g=e.touchData.startGPosition;if(n&&t.touches[0]&&g){for(var f=[],v=0;v<s.length;v++)f[v]=s[v]-l[v];var y=t.touches[0].clientX-g[0],m=y*y,b=t.touches[0].clientY-g[1];p=m+b*b>=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var x=t.touches[0].clientX-S,w=t.touches[0].clientY-M,L=t.touches[1].clientX-S,O=t.touches[1].clientY-M,P=q(x,w,L,O);if(P/A>=2.25||P>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var B={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(B),e.touchData.start=null):o.emit(B)}}if(n&&e.touchData.cxt){B={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}};e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(B):o.emit(B),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var F=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&F===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=F,F&&F.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(n&&t.touches[2]&&o.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(s[0]+s[2]+s[4])/3,i[3]=(s[1]+s[3]+s[5])/3):(i[0]=(s[0]+s[2]+s[4])/3,i[1]=(s[1]+s[3]+s[5])/3,i[2]=(s[0]+s[2]+s[4])/3+1,i[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var z=0;z<ee.length;z++){var G=ee[z]._private;G.grabbed=!1,G.rscratch.inDragLayer=!1}}var Y=e.touchData.start,X=(x=t.touches[0].clientX-S,w=t.touches[0].clientY-M,L=t.touches[1].clientX-S,O=t.touches[1].clientY-M,j(x,w,L,O)),V=X/N;if(R){var U=(x-_+(L-D))/2,H=(w-T+(O-C))/2,W=o.zoom(),$=W*V,K=o.pan(),Z=k[0]*W+K.x,Q=k[1]*W+K.y,J={x:-$/W*(Z-K.x-U)+Z,y:-$/W*(Q-K.y-H)+Q};if(Y&&Y.active()){var ee=e.dragData.touchDragEles;d(ee),e.redrawHint("drag",!0),e.redrawHint("eles",!0),Y.unactivate().emit("freeon"),ee.emit("free"),e.dragData.didDrag&&(Y.emit("dragfreeon"),ee.emit("dragfree"))}o.viewport({zoom:$,pan:J,cancelOnFailedZoom:!0}),o.emit("pinchzoom"),N=X,_=x,T=w,D=L,C=O,e.pinching=!0}if(t.touches[0]){h=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=h[0],s[1]=h[1]}if(t.touches[1]){h=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);s[2]=h[0],s[3]=h[1]}if(t.touches[2]){h=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);s[4]=h[0],s[5]=h[1]}}else if(t.touches[0]&&!e.touchData.didSelect){var te=e.touchData.start,ne=e.touchData.last;if(e.hoverData.draggingEles||e.swipePanning||(F=e.findNearestElement(s[0],s[1],!0,!0)),n&&null!=te&&t.preventDefault(),n&&null!=te&&e.nodeIsDraggable(te))if(p){ee=e.dragData.touchDragEles;var re=!e.dragData.didDrag;re&&c(ee,{inDragLayer:!0}),e.dragData.didDrag=!0;var ie={x:0,y:0};if(I(f[0])&&I(f[1]))if(ie.x+=f[0],ie.y+=f[1],re)e.redrawHint("eles",!0),(ae=e.touchData.dragDelta)&&I(ae[0])&&I(ae[1])&&(ie.x+=ae[0],ie.y+=ae[1]);e.hoverData.draggingEles=!0,ee.silentShift(ie).emit("position drag"),e.redrawHint("drag",!0),e.touchData.startPosition[0]==l[0]&&e.touchData.startPosition[1]==l[1]&&e.redrawHint("eles",!0),e.redraw()}else{var ae;0===(ae=e.touchData.dragDelta=e.touchData.dragDelta||[]).length?(ae.push(f[0]),ae.push(f[1])):(ae[0]+=f[0],ae[1]+=f[1])}if(r(te||F,["touchmove","tapdrag","vmousemove"],t,{x:s[0],y:s[1]}),te&&te.grabbed()||F==ne||(ne&&ne.emit({originalEvent:t,type:"tapdragout",position:{x:s[0],y:s[1]}}),F&&F.emit({originalEvent:t,type:"tapdragover",position:{x:s[0],y:s[1]}})),e.touchData.last=F,n)for(z=0;z<s.length;z++)s[z]&&e.touchData.startPosition[z]&&p&&(e.touchData.singleTouchMoved=!0);if(n&&(null==te||te.pannable())&&o.panningEnabled()&&o.userPanningEnabled()){a(te,e.touchData.starts)&&(t.preventDefault(),e.data.bgActivePosistion||(e.data.bgActivePosistion=at(e.touchData.startPosition)),e.swipePanning?(o.panBy({x:f[0]*u,y:f[1]*u}),o.emit("dragpan")):p&&(e.swipePanning=!0,o.panBy({x:y*u,y:b*u}),o.emit("dragpan"),te&&(te.unactivate(),e.redrawHint("select",!0),e.touchData.start=null)));h=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=h[0],s[1]=h[1]}}for(v=0;v<s.length;v++)l[v]=s[v];n&&t.touches.length>0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(t,"touchcancel",G=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",Y=function(t){var i=e.touchData.start;if(e.touchData.capture){0===t.touches.length&&(e.touchData.capture=!1),t.preventDefault();var a=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),u=e.touchData.now,c=e.touchData.earlier;if(t.touches[0]){var h=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);u[0]=h[0],u[1]=h[1]}if(t.touches[1]){h=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);u[2]=h[0],u[3]=h[1]}if(t.touches[2]){h=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);u[4]=h[0],u[5]=h[1]}if(i&&i.unactivate(),e.touchData.cxt){if(o={originalEvent:t,type:"cxttapend",position:{x:u[0],y:u[1]}},i?i.emit(o):s.emit(o),!e.touchData.cxtDragged){var p={originalEvent:t,type:"cxttap",position:{x:u[0],y:u[1]}};i?i.emit(p):s.emit(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!t.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var g=s.collection(e.getAllInBox(a[0],a[1],a[2],a[3]));a[0]=void 0,a[1]=void 0,a[2]=void 0,a[3]=void 0,a[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:t,position:{x:u[0],y:u[1]}});g.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),g.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=i&&i.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(t.touches[1]);else if(t.touches[0]);else if(!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var f=e.dragData.touchDragEles;if(null!=i){var v=i._private.grabbed;d(f),e.redrawHint("drag",!0),e.redrawHint("eles",!0),v&&(i.emit("freeon"),f.emit("free"),e.dragData.didDrag&&(i.emit("dragfreeon"),f.emit("dragfree"))),r(i,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]}),i.unactivate(),e.touchData.start=null}else{var y=e.findNearestElement(u[0],u[1],!0,!0);r(y,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]})}var m=e.touchData.startPosition[0]-u[0],b=m*m,x=e.touchData.startPosition[1]-u[1],w=(b+x*x)*l*l;e.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),r(i,["tap","vclick"],t,{x:u[0],y:u[1]}),X=!1,t.timeStamp-U<=s.multiClickDebounceTime()?(V&&clearTimeout(V),X=!0,U=null,r(i,["dbltap","vdblclick"],t,{x:u[0],y:u[1]})):(V=setTimeout((function(){X||r(i,["onetap","voneclick"],t,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),U=t.timeStamp)),null!=i&&!e.dragData.didDrag&&i._private.selectable&&w<e.touchTapThreshold2&&!e.pinching&&("single"===s.selectionType()?(s.$(n).unmerge(i).unselect(["tapunselect"]),i.select(["tapselect"])):i.selected()?i.unselect(["tapunselect"]):i.select(["tapselect"]),e.redrawHint("eles",!0)),e.touchData.singleTouchMoved=!0}for(var E=0;E<u.length;E++)c[E]=u[E];e.dragData.didDrag=!1,0===t.touches.length&&(e.touchData.dragDelta=[],e.touchData.startPosition=[null,null,null,null,null,null],e.touchData.startGPosition=null,e.touchData.didSelect=!1),t.touches.length<2&&(1===t.touches.length&&(e.touchData.startGPosition=[t.touches[0].clientX,t.touches[0].clientY]),e.pinching=!1,e.redrawHint("eles",!0),e.redraw())}},!1),"undefined"==typeof TouchEvent){var H=[],W=function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},$=function(e){H.push(function(e){return{event:e,touch:W(e)}}(e))},K=function(e){for(var t=0;t<H.length;t++){if(H[t].event.pointerId===e.pointerId)return void H.splice(t,1)}},Z=function(e){e.touches=H.map((function(e){return e.touch}))},Q=function(e){return"mouse"===e.pointerType||4===e.pointerType};e.registerBinding(e.container,"pointerdown",(function(e){Q(e)||(e.preventDefault(),$(e),Z(e),F(e))})),e.registerBinding(e.container,"pointerup",(function(e){Q(e)||(K(e),Z(e),Y(e))})),e.registerBinding(e.container,"pointercancel",(function(e){Q(e)||(K(e),Z(e),G())})),e.registerBinding(e.container,"pointermove",(function(e){Q(e)||(e.preventDefault(),function(e){var t=H.filter((function(t){return t.event.pointerId===e.pointerId}))[0];t.event=e,t.touch=W(e)}(e),Z(e),z(e))}))}};var bs={generatePolygon:function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl("polygon",e,t,n,r,i,this.points)},intersectLine:function(e,t,n,r,i,a,o){return Bt(i,a,this.points,e,t,n/2,r/2,o)},checkPoint:function(e,t,n,r,i,a,o){return kt(e,t,this.points,a,o,r,i,[0,-1],n)}}}};bs.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,r,i,a,o){return function(e,t,n,r,i,a){var o=n-e,s=r-t;o/=i,s/=a;var l=Math.sqrt(o*o+s*s),u=l-1;if(u<0)return[];var c=u/l;return[(n-e)*c+e,(r-t)*c+t]}(i,a,e,t,n/2+o,r/2+o)},checkPoint:function(e,t,n,r,i,a,o){return Mt(e,t,r,i,a,o,n)}}},bs.generateRoundPolygon=function(e,t){for(var n=new Array(2*t.length),r=0;r<t.length/2;r++){var i=2*r,a=void 0;a=r<t.length/2-1?2*(r+1):0,n[4*r]=t[i],n[4*r+1]=t[i+1];var o=t[a]-t[i],s=t[a+1]-t[i+1],l=Math.sqrt(o*o+s*s);n[4*r+2]=o/l,n[4*r+3]=s/l}return this.nodeShapes[e]={renderer:this,name:e,points:n,draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl("round-polygon",e,t,n,r,i,this.points)},intersectLine:function(e,t,n,r,i,a,o){return function(e,t,n,r,i,a,o,s){for(var l,u=[],c=new Array(n.length),h=a/2,d=o/2,p=Vt(a,o),g=0;g<n.length/4;g++){var f,v=void 0;v=0===g?n.length-2:4*g-2,f=4*g+2;var y=r+h*n[4*g],m=i+d*n[4*g+1],b=-n[v]*n[f]-n[v+1]*n[f+1],x=p/Math.tan(Math.acos(b)/2),w=y-x*n[v],E=m-x*n[v+1],_=y+x*n[f],T=m+x*n[f+1];0===g?(c[n.length-2]=w,c[n.length-1]=E):(c[4*g-2]=w,c[4*g-1]=E),c[4*g]=_,c[4*g+1]=T;var D=n[v+1],C=-n[v];D*n[f]+C*n[f+1]<0&&(D*=-1,C*=-1),0!==(l=Ot(e,t,r,i,w+D*p,E+C*p,p)).length&&u.push(l[0],l[1])}for(var N=0;N<c.length/4;N++)0!==(l=Rt(e,t,r,i,c[4*N],c[4*N+1],c[4*N+2],c[4*N+3],!1)).length&&u.push(l[0],l[1]);if(u.length>2){for(var A=[u[0],u[1]],L=Math.pow(A[0]-e,2)+Math.pow(A[1]-t,2),k=1;k<u.length/2;k++){var S=Math.pow(u[2*k]-e,2)+Math.pow(u[2*k+1]-t,2);S<=L&&(A[0]=u[2*k],A[1]=u[2*k+1],L=S)}return A}return u}(i,a,this.points,e,t,n,r)},checkPoint:function(e,t,n,r,i,a,o){return function(e,t,n,r,i,a,o){for(var s=new Array(n.length),l=a/2,u=o/2,c=Vt(a,o),h=c*c,d=0;d<n.length/4;d++){var p,g=void 0;g=0===d?n.length-2:4*d-2,p=4*d+2;var f=r+l*n[4*d],v=i+u*n[4*d+1],y=-n[g]*n[p]-n[g+1]*n[p+1],m=c/Math.tan(Math.acos(y)/2),b=f-m*n[g],x=v-m*n[g+1],w=f+m*n[p],E=v+m*n[p+1];s[4*d]=b,s[4*d+1]=x,s[4*d+2]=w,s[4*d+3]=E;var _=n[g+1],T=-n[g];_*n[p]+T*n[p+1]<0&&(_*=-1,T*=-1);var D=b+_*c,C=x+T*c;if(Math.pow(D-e,2)+Math.pow(C-t,2)<=h)return!0}return Lt(e,t,s)}(e,t,this.points,a,o,r,i)}}},bs.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:zt(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,r,i,a,o){return Tt(i,a,e,t,n,r,o)},checkPoint:function(e,t,n,r,i,a,o){var s=Xt(r,i),l=2*s;return!!kt(e,t,this.points,a,o,r,i-l,[0,-1],n)||(!!kt(e,t,this.points,a,o,r-l,i,[0,-1],n)||(!!Mt(e,t,l,l,a-r/2+s,o-i/2+s,n)||(!!Mt(e,t,l,l,a+r/2-s,o-i/2+s,n)||(!!Mt(e,t,l,l,a+r/2-s,o+i/2-s,n)||!!Mt(e,t,l,l,a-r/2+s,o+i/2-s,n)))))}}},bs.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:8,points:zt(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},generateCutTrianglePts:function(e,t,n,r){var i=this.cornerLength,a=t/2,o=e/2,s=n-o,l=n+o,u=r-a,c=r+a;return{topLeft:[s,u+i,s+i,u,s+i,u+i],topRight:[l-i,u,l,u+i,l-i,u+i],bottomRight:[l,c-i,l-i,c,l-i,c-i],bottomLeft:[s+i,c,s,c-i,s+i,c-i]}},intersectLine:function(e,t,n,r,i,a,o){var s=this.generateCutTrianglePts(n+2*o,r+2*o,e,t),l=[].concat.apply([],[s.topLeft.splice(0,4),s.topRight.splice(0,4),s.bottomRight.splice(0,4),s.bottomLeft.splice(0,4)]);return Bt(i,a,l,e,t)},checkPoint:function(e,t,n,r,i,a,o){if(kt(e,t,this.points,a,o,r,i-2*this.cornerLength,[0,-1],n))return!0;if(kt(e,t,this.points,a,o,r-2*this.cornerLength,i,[0,-1],n))return!0;var s=this.generateCutTrianglePts(r,i,a,o);return Lt(e,t,s.topLeft)||Lt(e,t,s.topRight)||Lt(e,t,s.bottomRight)||Lt(e,t,s.bottomLeft)}}},bs.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:zt(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,r,i,a,o){var s=this.generateBarrelBezierPts(n+2*o,r+2*o,e,t),l=function(e){var t=pt({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.15),n=pt({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.5),r=pt({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.85);return[e[0],e[1],t.x,t.y,n.x,n.y,r.x,r.y,e[4],e[5]]},u=[].concat(l(s.topLeft),l(s.topRight),l(s.bottomRight),l(s.bottomLeft));return Bt(i,a,u,e,t)},generateBarrelBezierPts:function(e,t,n,r){var i=t/2,a=e/2,o=n-a,s=n+a,l=r-i,u=r+i,c=Ut(e,t),h=c.heightOffset,d=c.widthOffset,p=c.ctrlPtOffsetPct*e,g={topLeft:[o,l+h,o+p,l,o+d,l],topRight:[s-d,l,s-p,l,s,l+h],bottomRight:[s,u-h,s-p,u,s-d,u],bottomLeft:[o+d,u,o+p,u,o,u-h]};return g.topLeft.isTop=!0,g.topRight.isTop=!0,g.bottomLeft.isBottom=!0,g.bottomRight.isBottom=!0,g},checkPoint:function(e,t,n,r,i,a,o){var s=Ut(r,i),l=s.heightOffset,u=s.widthOffset;if(kt(e,t,this.points,a,o,r,i-2*l,[0,-1],n))return!0;if(kt(e,t,this.points,a,o,r-2*u,i,[0,-1],n))return!0;for(var c=this.generateBarrelBezierPts(r,i,a,o),h=function(e,t,n){var r,i,a=n[4],o=n[2],s=n[0],l=n[5],u=n[1],c=Math.min(a,s),h=Math.max(a,s),d=Math.min(l,u),p=Math.max(l,u);if(c<=e&&e<=h&&d<=t&&t<=p){var g=[(r=a)-2*(i=o)+s,2*(i-r),r],f=function(e,t,n,r){var i=t*t-4*e*(n-=r);if(i<0)return[];var a=Math.sqrt(i),o=2*e;return[(-t+a)/o,(-t-a)/o]}(g[0],g[1],g[2],e).filter((function(e){return 0<=e&&e<=1}));if(f.length>0)return f[0]}return null},d=Object.keys(c),p=0;p<d.length;p++){var g=c[d[p]],f=h(e,t,g);if(null!=f){var v=g[5],y=g[3],m=g[1],b=dt(v,y,m,f);if(g.isTop&&b<=t)return!0;if(g.isBottom&&t<=b)return!0}}return!1}}},bs.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:zt(4,0),draw:function(e,t,n,r,i){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,r,i,a,o){var s=t-(r/2+o),l=Rt(i,a,e,t,e-(n/2+o),s,e+(n/2+o),s,!1);return l.length>0?l:Tt(i,a,e,t,n,r,o)},checkPoint:function(e,t,n,r,i,a,o){var s=Xt(r,i),l=2*s;if(kt(e,t,this.points,a,o,r,i-l,[0,-1],n))return!0;if(kt(e,t,this.points,a,o,r-l,i,[0,-1],n))return!0;var u=r/2+2*n,c=i/2+2*n;return!!Lt(e,t,[a-u,o-c,a-u,o,a+u,o,a+u,o-c])||(!!Mt(e,t,l,l,a+r/2-s,o+i/2-s,n)||!!Mt(e,t,l,l,a-r/2+s,o+i/2-s,n))}}},bs.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",zt(3,0)),this.generateRoundPolygon("round-triangle",zt(3,0)),this.generatePolygon("rectangle",zt(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",zt(5,0)),this.generateRoundPolygon("round-pentagon",zt(5,0)),this.generatePolygon("hexagon",zt(6,0)),this.generateRoundPolygon("round-hexagon",zt(6,0)),this.generatePolygon("heptagon",zt(7,0)),this.generateRoundPolygon("round-heptagon",zt(7,0)),this.generatePolygon("octagon",zt(8,0)),this.generateRoundPolygon("round-octagon",zt(8,0));var r=new Array(20),i=Yt(5,0),a=Yt(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s<a.length/2;s++)a[2*s]*=o,a[2*s+1]*=o;for(s=0;s<5;s++)r[4*s]=i[2*s],r[4*s+1]=i[2*s+1],r[4*s+2]=a[2*s],r[4*s+3]=a[2*s+1];r=Gt(r),this.generatePolygon("star",r),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);var l=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",l),this.generateRoundPolygon("round-tag",l),e.makePolygon=function(e){var n,r="polygon-"+e.join("$");return(n=this[r])?n:t.generatePolygon(r,e)}};var xs={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||Ie();var t=this;void 0===t.averageRedrawTime&&(t.averageRedrawTime=0),void 0===t.lastRedrawTime&&(t.lastRedrawTime=0),void 0===t.lastDrawTime&&(t.lastDrawTime=0),t.requestedFrame=!0,t.renderOptions=e},beforeRender:function(e,t){if(!this.destroyed){null==t&&Ce("Priority is not optional for beforeRender");var n=this.beforeRenderCallbacks;n.push({fn:e,priority:t}),n.sort((function(e,t){return t.priority-e.priority}))}}},ws=function(e,t,n){for(var r=e.beforeRenderCallbacks,i=0;i<r.length;i++)r[i].fn(t,n)};xs.startRenderLoop=function(){var e=this,t=e.cy;if(!e.renderLoopStarted){e.renderLoopStarted=!0;oe((function n(r){if(!e.destroyed){if(t.batching());else if(e.requestedFrame&&!e.skipFrame){ws(e,!0,r);var i=se();e.render(e.renderOptions);var a=e.lastDrawTime=se();void 0===e.averageRedrawTime&&(e.averageRedrawTime=a-i),void 0===e.redrawCount&&(e.redrawCount=0),e.redrawCount++,void 0===e.redrawTotalTime&&(e.redrawTotalTime=0);var o=a-i;e.redrawTotalTime+=o,e.lastRedrawTime=o,e.averageRedrawTime=e.averageRedrawTime/2+o/2,e.requestedFrame=!1}else ws(e,!1,r);e.skipFrame=!1,oe(n)}}))}};var Es=function(e){this.init(e)},_s=Es.prototype;_s.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],_s.init=function(e){var t=this;t.options=e,t.cy=e.cy;var n=t.container=e.cy.container(),r=t.cy.window();if(r){var i=r.document,a=i.head,o="__________cytoscape_stylesheet",s="__________cytoscape_container",l=null!=i.getElementById(o);if(n.className.indexOf(s)<0&&(n.className=(n.className||"")+" "+s),!l){var u=i.createElement("style");u.id=o,u.textContent="."+s+" { position: relative; }",a.insertBefore(u,a.children[0])}"static"===r.getComputedStyle(n).getPropertyValue("position")&&Ae("A Cytoscape container has style position:static and so can not use UI extensions properly")}t.selection=[void 0,void 0,void 0,void 0,0],t.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],t.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},t.dragData={possibleDragElements:[]},t.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},t.redraws=0,t.showFps=e.showFps,t.debug=e.debug,t.hideEdgesOnViewport=e.hideEdgesOnViewport,t.textureOnViewport=e.textureOnViewport,t.wheelSensitivity=e.wheelSensitivity,t.motionBlurEnabled=e.motionBlur,t.forcedPixelRatio=I(e.pixelRatio)?e.pixelRatio:null,t.motionBlur=e.motionBlur,t.motionBlurOpacity=e.motionBlurOpacity,t.motionBlurTransparency=1-t.motionBlurOpacity,t.motionBlurPxRatio=1,t.mbPxRBlurry=1,t.minMbLowQualFrames=4,t.fullQualityMb=!1,t.clearedForMotionBlur=[],t.desktopTapThreshold=e.desktopTapThreshold,t.desktopTapThreshold2=e.desktopTapThreshold*e.desktopTapThreshold,t.touchTapThreshold=e.touchTapThreshold,t.touchTapThreshold2=e.touchTapThreshold*e.touchTapThreshold,t.tapholdDuration=500,t.bindings=[],t.beforeRenderCallbacks=[],t.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},t.registerNodeShapes(),t.registerArrowShapes(),t.registerCalculationListeners()},_s.notify=function(e,t){var n=this,r=n.cy;this.destroyed||("init"!==e?"destroy"!==e?(("add"===e||"remove"===e||"move"===e&&r.hasCompoundNodes()||"load"===e||"zorder"===e||"mount"===e)&&n.invalidateCachedZSortedEles(),"viewport"===e&&n.redrawHint("select",!0),"load"!==e&&"resize"!==e&&"mount"!==e||(n.invalidateContainerClientCoordsCache(),n.matchCanvasSize(n.container)),n.redrawHint("eles",!0),n.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()):n.destroy():n.load())},_s.destroy=function(){var e=this;e.destroyed=!0,e.cy.stopAnimationLoop();for(var t=0;t<e.bindings.length;t++){var n=e.bindings[t],r=n.target;(r.off||r.removeEventListener).apply(r,n.args)}if(e.bindings=[],e.beforeRenderCallbacks=[],e.onUpdateEleCalcsFns=[],e.removeObserver&&e.removeObserver.disconnect(),e.styleObserver&&e.styleObserver.disconnect(),e.resizeObserver&&e.resizeObserver.disconnect(),e.labelCalcDiv)try{document.body.removeChild(e.labelCalcDiv)}catch(i){}},_s.isHeadless=function(){return!1},[ts,vs,ys,ms,bs,xs].forEach((function(e){Q(_s,e)}));var Ts=1e3/60,Ds=function(e){return function(){var t=this,n=this.renderer;if(!t.dequeueingSetup){t.dequeueingSetup=!0;var r=u.default((function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()}),e.deqRedrawThreshold),i=e.priority||De;n.beforeRender((function(i,a){var o=se(),s=n.averageRedrawTime,l=n.lastRedrawTime,u=[],c=n.cy.extent(),h=n.getPixelRatio();for(i||n.flushRenderedStyleQueue();;){var d=se(),p=d-o,g=d-a;if(l<Ts){var f=Ts-(i?s:0);if(g>=e.deqFastCost*f)break}else if(i){if(p>=e.deqCost*l||p>=e.deqAvgCost*s)break}else if(g>=e.deqNoDrawCost*Ts)break;var v=e.deq(t,h,c);if(!(v.length>0))break;for(var y=0;y<v.length;y++)u.push(v[y])}u.length>0&&(e.onDeqd(t,u),!i&&e.shouldRedraw(t,u,h,c)&&r())}),i(t))}}},Cs=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_e;f(this,e),this.idsByKey=new Fe,this.keyForId=new Fe,this.cachesByLvl=new Fe,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return y(e,[{key:"getIdsFor",value:function(e){null==e&&Ce("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new Ge,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new Fe,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),Ns={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},As=Me({getKey:null,doesEleInvalidateKey:_e,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Ee,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Ls=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=As(t);Q(n,r),n.lookup=new Cs(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},ks=Ls.prototype;ks.reasons=Ns,ks.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},ks.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},ks.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new c.default((function(e,t){return t.reqs-e.reqs}))},ks.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},ks.getElement=function(e,t,n,r,i){var a=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(st(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),c=t.h*u,h=t.w*u,d=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,d))return null;var p,g=l.get(e,r);if(g&&g.invalidated&&(g.invalidated=!1,g.texture.invalidatedWidth-=g.width),g)return g;if(p=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||h>1024)return null;var f=a.getTextureQueue(p),v=f[f.length-2],y=function(){return a.recycleTexture(p,h)||a.addTexture(p,h)};v||(v=f[f.length-1]),v||(v=y()),v.width-v.usedWidth<h&&(v=y());for(var m,b=function(e){return e&&e.scaledLabelShown===d},x=i&&i===Ns.dequeue,w=i&&i===Ns.highQuality,E=i&&i===Ns.downscale,_=r+1;_<=3;_++){var T=l.get(e,_);if(T){m=T;break}}var D=m&&m.level===r+1?m:null,C=function(){v.context.drawImage(D.texture.canvas,D.x,0,D.width,D.height,v.usedWidth,0,h,c)};if(v.context.setTransform(1,0,0,1,0,0),v.context.clearRect(v.usedWidth,0,h,p),b(D))C();else if(b(m)){if(!w)return a.queueElement(e,m.level-1),m;for(var N=m.level;N>r;N--)D=a.getElement(e,t,n,N,Ns.downscale);C()}else{var A;if(!x&&!w&&!E)for(var L=r-1;L>=-4;L--){var k=l.get(e,L);if(k){A=k;break}}if(b(A))return a.queueElement(e,r),A;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,e,t,d,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return g={x:v.usedWidth,texture:v,level:r,scale:u,width:h,height:c,scaledLabelShown:d},v.usedWidth+=Math.ceil(h+8),v.eleCaches.push(g),l.set(e,r,g),a.checkTextureFullness(v),g},ks.invalidateElements=function(e){for(var t=0;t<e.length;t++)this.invalidateElement(e[t])},ks.invalidateElement=function(e){var t=this,n=t.lookup,r=[];if(n.isInvalid(e)){for(var i=-4;i<=3;i++){var a=n.getForCachedKey(e,i);a&&r.push(a)}if(n.invalidate(e))for(var o=0;o<r.length;o++){var s=r[o],l=s.texture;l.invalidatedWidth+=s.width,s.invalidated=!0,t.checkTextureUtility(l)}t.removeFromQueue(e)}},ks.checkTextureUtility=function(e){e.invalidatedWidth>=.2*e.width&&this.retireTexture(e)},ks.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?Oe(t,e):e.fullnessChecks++},ks.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;Oe(n,e),e.retired=!0;for(var i=e.eleCaches,a=0;a<i.length;a++){var o=i[a];r.deleteCache(o.key,o.level)}Pe(i),this.getRetiredTextureQueue(t).push(e)},ks.addTexture=function(e,t){var n={};return this.getTextureQueue(e).push(n),n.eleCaches=[],n.height=e,n.width=Math.max(1024,t),n.usedWidth=0,n.invalidatedWidth=0,n.fullnessChecks=0,n.canvas=this.renderer.makeOffscreenCanvas(n.width,n.height),n.context=n.canvas.getContext("2d"),n},ks.recycleTexture=function(e,t){for(var n=this.getTextureQueue(e),r=this.getRetiredTextureQueue(e),i=0;i<r.length;i++){var a=r[i];if(a.width>=t)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,Pe(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),Oe(r,a),n.push(a),a}},ks.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(e),a=r[i];if(a)a.level=Math.max(a.level,t),a.eles.merge(e),a.reqs++,n.updateItem(a);else{var o={eles:e.spawn().merge(e),level:t,reqs:1,key:i};n.push(o),r[i]=o}},ks.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=[],a=t.lookup,o=0;o<1&&n.size()>0;o++){var s=n.pop(),l=s.key,u=s.eles[0],c=a.hasCache(u,s.level);if(r[l]=null,!c){i.push(s);var h=t.getBoundingBox(u);t.getElement(u,h,e,s.level,Ns.dequeue)}}return i},ks.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),i=n[r];null!=i&&(1===i.eles.length?(i.reqs=we,t.updateItem(i),t.pop(),n[r]=null):i.eles.unmerge(e))},ks.onDequeue=function(e){this.onDequeues.push(e)},ks.offDequeue=function(e){Oe(this.onDequeues,e)},ks.setupDequeueing=Ds({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n<e.onDequeues.length;n++){(0,e.onDequeues[n])(t)}},shouldRedraw:function(e,t,n,r){for(var i=0;i<t.length;i++)for(var a=t[i].eles,o=0;o<a.length;o++){var s=a[o].boundingBox();if(wt(s,r))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}});var Ss=function(e){var t=this,n=t.renderer=e,r=n.cy;t.layersByLevel={},t.firstGet=!0,t.lastInvalidationTime=se()-500,t.skipping=!1,t.eleTxrDeqs=r.collection(),t.scheduleElementRefinement=u.default((function(){t.refineElementTextures(t.eleTxrDeqs),t.eleTxrDeqs.unmerge(t.eleTxrDeqs)}),50),n.beforeRender((function(e,n){n-t.lastInvalidationTime<=250?t.skipping=!0:t.skipping=!1}),n.beforeRenderPriorities.lyrTxrSkip);t.layersQueue=new c.default((function(e,t){return t.reqs-e.reqs})),t.setupDequeueing()},Is=Ss.prototype,Ms=0,Os=Math.pow(2,53)-1;Is.makeLayer=function(e,t){var n=Math.pow(2,t),r=Math.ceil(e.w*n),i=Math.ceil(e.h*n),a=this.renderer.makeOffscreenCanvas(r,i),o={id:Ms=++Ms%Os,bb:e,level:t,width:r,height:i,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0},s=o.context,l=-o.bb.x1,u=-o.bb.y1;return s.scale(n,n),s.translate(l,u),o},Is.getLayers=function(e,t,n){var r=this,i=r.renderer.cy.zoom(),a=r.firstGet;if(r.firstGet=!1,null==n)if((n=Math.ceil(st(i*t)))<-4)n=-4;else if(i>=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var o,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},i=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};i(1),i(-1);for(var a=c.length-1;a>=0;a--){var o=c[a];o.invalid&&Oe(c,o)}}();var h=function(t){var i=(t=t||{}).after;if(function(){if(!o){o=ft();for(var t=0;t<e.length;t++)vt(o,e[t].boundingBox())}}(),o.w*u*(o.h*u)>16e6)return null;var a=r.makeLayer(o,n);if(null!=i){var s=c.indexOf(i)+1;c.splice(s,0,a)}else(void 0===t.insert||t.insert)&&c.unshift(a);return a};if(r.skipping&&!a)return null;for(var d=null,p=e.length/1,g=!a,f=0;f<e.length;f++){var v=e[f],y=v._private.rscratch,m=y.imgLayerCaches=y.imgLayerCaches||{},b=m[n];if(b)d=b;else{if((!d||d.eles.length>=p||!_t(d.bb,v.boundingBox()))&&!(d=h({insert:!0,after:d})))return null;s||g?r.queueLayer(d,v):r.drawEleInLayer(d,v,n,t),d.eles.push(v),m[n]=d}}return s||(g?null:c)},Is.getEleLevelForLayerLevel=function(e,t){return e},Is.drawEleInLayer=function(e,t,n,r){var i=this.renderer,a=e.context,o=t.boundingBox();0!==o.w&&0!==o.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),i.setImgSmoothing(a,!1),i.drawCachedElement(a,t,null,null,n,true),i.setImgSmoothing(a,!0))},Is.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i<n.length;i++){var a=n[i];if(a.reqs>0)return!1;if(a.invalid)return!1;r+=a.eles.length}return r===t.length},Is.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r<n.length;r++){for(var i=n[r],a=-1,o=0;o<t.length;o++)if(i.eles[0]===t[o]){a=o;break}if(a<0)this.invalidateLayer(i);else{var s=a;for(o=0;o<i.eles.length;o++)if(i.eles[o]!==t[s+o]){this.invalidateLayer(i);break}}}},Is.updateElementsInLayers=function(e,t){for(var n=P(e[0]),r=0;r<e.length;r++)for(var i=n?null:e[r],a=n?e[r]:e[r].ele,o=a._private.rscratch,s=o.imgLayerCaches=o.imgLayerCaches||{},l=-4;l<=2;l++){var u=s[l];u&&(i&&this.getEleLevelForLayerLevel(u.level)!==i.level||t(u,a,i))}},Is.haveLayers=function(){for(var e=!1,t=-4;t<=2;t++){var n=this.layersByLevel[t];if(n&&n.length>0){e=!0;break}}return e},Is.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=se(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},Is.invalidateLayer=function(e){if(this.lastInvalidationTime=se(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];Oe(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i<n.length;i++){var a=n[i]._private.rscratch.imgLayerCaches;a&&(a[t]=null)}}},Is.refineElementTextures=function(e){var t=this;t.updateElementsInLayers(e,(function(e,n,r){var i=e.replacement;if(i||((i=e.replacement=t.makeLayer(e.bb,e.level)).replaces=e,i.eles=e.eles),!i.reqs)for(var a=0;a<i.eles.length;a++)t.queueLayer(i,i.eles[a])}))},Is.enqueueElementRefinement=function(e){this.eleTxrDeqs.merge(e),this.scheduleElementRefinement()},Is.queueLayer=function(e,t){var n=this.layersQueue,r=e.elesQueue,i=r.hasId=r.hasId||{};if(!e.replacement){if(t){if(i[t.id()])return;r.push(t),i[t.id()]=!0}e.reqs?(e.reqs++,n.updateItem(e)):(e.reqs=1,n.push(e))}},Is.dequeue=function(e){for(var t=this,n=t.layersQueue,r=[],i=0;i<1&&0!==n.size();){var a=n.peek();if(a.replacement)n.pop();else if(a.replaces&&a!==a.replaces.replacement)n.pop();else if(a.invalid)n.pop();else{var o=a.elesQueue.shift();o&&(t.drawEleInLayer(a,o,a.level,e),i++),0===r.length&&r.push(!0),0===a.elesQueue.length&&(n.pop(),a.reqs=0,a.replaces&&t.applyLayerReplacement(a),t.requestRedraw())}}return r},Is.applyLayerReplacement=function(e){var t=this.layersByLevel[e.level],n=e.replaces,r=t.indexOf(n);if(!(r<0||n.invalid)){t[r]=e;for(var i=0;i<e.eles.length;i++){var a=e.eles[i]._private,o=a.imgLayerCaches=a.imgLayerCaches||{};o&&(o[e.level]=e)}this.requestRedraw()}},Is.requestRedraw=u.default((function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()}),100),Is.setupDequeueing=Ds({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t){return e.dequeue(t)},onDeqd:De,shouldRedraw:Ee,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}});var Ps,Rs={};function Bs(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.lineTo(r.x,r.y)}}function Fs(e,t,n){for(var r,i=0;i<t.length;i++){var a=t[i];0===i&&(r=a),e.lineTo(a.x,a.y)}e.quadraticCurveTo(n.x,n.y,r.x,r.y)}function zs(e,t,n){e.beginPath&&e.beginPath();for(var r=t,i=0;i<r.length;i++){var a=r[i];e.lineTo(a.x,a.y)}var o=n,s=n[0];e.moveTo(s.x,s.y);for(i=1;i<o.length;i++){a=o[i];e.lineTo(a.x,a.y)}e.closePath&&e.closePath()}function Gs(e,t,n,r,i){e.beginPath&&e.beginPath(),e.arc(n,r,i,0,2*Math.PI,!1);var a=t,o=a[0];e.moveTo(o.x,o.y);for(var s=0;s<a.length;s++){var l=a[s];e.lineTo(l.x,l.y)}e.closePath&&e.closePath()}function Ys(e,t,n,r){e.arc(t,n,r,0,2*Math.PI,!1)}Rs.arrowShapeImpl=function(e){return(Ps||(Ps={polygon:Bs,"triangle-backcurve":Fs,"triangle-tee":zs,"circle-triangle":Gs,"triangle-cross":zs,circle:Ys}))[e]};var Xs={drawElement:function(e,t,n,r,i,a){t.isNode()?this.drawNode(e,t,n,r,i,a):this.drawEdge(e,t,n,r,i,a)},drawElementOverlay:function(e,t){t.isNode()?this.drawNodeOverlay(e,t):this.drawEdgeOverlay(e,t)},drawElementUnderlay:function(e,t){t.isNode()?this.drawNodeUnderlay(e,t):this.drawEdgeUnderlay(e,t)},drawCachedElementPortion:function(e,t,n,r,i,a,o,s){var l=this,u=n.getBoundingBox(t);if(0!==u.w&&0!==u.h){var c=n.getElement(t,u,r,i,a);if(null!=c){var h=s(l,t);if(0===h)return;var d,p,g,f,v,y,m=o(l,t),b=u.x1,x=u.y1,w=u.w,E=u.h;if(0!==m){var _=n.getRotationPoint(t);g=_.x,f=_.y,e.translate(g,f),e.rotate(m),(v=l.getImgSmoothing(e))||l.setImgSmoothing(e,!0);var T=n.getRotationOffset(t);d=T.x,p=T.y}else d=b,p=x;1!==h&&(y=e.globalAlpha,e.globalAlpha=y*h),e.drawImage(c.texture.canvas,c.x,0,c.width,c.height,d,p,w,E),1!==h&&(e.globalAlpha=y),0!==m&&(e.rotate(-m),e.translate(-g,-f),v||l.setImgSmoothing(e,!1))}else n.drawElement(e,t)}}},Vs=function(){return 0},Us=function(e,t){return e.getTextAngle(t,null)},js=function(e,t){return e.getTextAngle(t,"source")},qs=function(e,t){return e.getTextAngle(t,"target")},Hs=function(e,t){return t.effectiveOpacity()},Ws=function(e,t){return t.pstyle("text-opacity").pfValue*t.effectiveOpacity()};Xs.drawCachedElement=function(e,t,n,r,i,a){var o=this,s=o.data,l=s.eleTxrCache,u=s.lblTxrCache,c=s.slbTxrCache,h=s.tlbTxrCache,d=t.boundingBox(),p=!0===a?l.reasons.highQuality:null;if(0!==d.w&&0!==d.h&&t.visible()&&(!r||wt(d,r))){var g=t.isEdge(),f=t.element()._private.rscratch.badLine;o.drawElementUnderlay(e,t),o.drawCachedElementPortion(e,t,l,n,i,p,Vs,Hs),g&&f||o.drawCachedElementPortion(e,t,u,n,i,p,Us,Ws),g&&!f&&(o.drawCachedElementPortion(e,t,c,n,i,p,js,Ws),o.drawCachedElementPortion(e,t,h,n,i,p,qs,Ws)),o.drawElementOverlay(e,t)}},Xs.drawElements=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];this.drawElement(e,r)}},Xs.drawCachedElements=function(e,t,n,r){for(var i=0;i<t.length;i++){var a=t[i];this.drawCachedElement(e,a,n,r)}},Xs.drawCachedNodes=function(e,t,n,r){for(var i=0;i<t.length;i++){var a=t[i];a.isNode()&&this.drawCachedElement(e,a,n,r)}},Xs.drawLayeredElements=function(e,t,n,r){var i=this.data.lyrTxrCache.getLayers(t,n);if(i)for(var a=0;a<i.length;a++){var o=i[a],s=o.bb;0!==s.w&&0!==s.h&&e.drawImage(o.canvas,s.x1,s.y1,s.w,s.h)}else this.drawCachedElements(e,t,n,r)};var $s={drawEdge:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=t._private.rscratch;if((!a||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=a?t.pstyle("opacity").value:1,c=a?t.pstyle("line-opacity").value:1,h=t.pstyle("curve-style").value,d=t.pstyle("line-style").value,p=t.pstyle("width").pfValue,g=t.pstyle("line-cap").value,f=u*c,v=u*c,y=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;"straight-triangle"===h?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=p,e.lineCap=g,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,d),e.lineCap="butt")},m=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;o.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var b=t.pstyle("ghost-offset-x").pfValue,x=t.pstyle("ghost-offset-y").pfValue,w=t.pstyle("ghost-opacity").value,E=f*w;e.translate(b,x),y(E),m(E),e.translate(-b,-x)}i&&o.drawEdgeUnderlay(e,t),y(),m(),i&&o.drawEdgeOverlay(e,t),o.drawElementText(e,t,null,r),n&&e.translate(l.x1,l.y1)}}},Ks=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var i=this,a=i.usePaths(),o=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==o.edgeType||a?t.lineCap="round":t.lineCap="butt",i.colorStrokeStyle(t,l[0],l[1],l[2],r),i.drawEdgePath(n,t,o.allpts,"solid")}}}};$s.drawEdgeOverlay=Ks("overlay"),$s.drawEdgeUnderlay=Ks("underlay"),$s.drawEdgePath=function(e,t,n,r){var i,a=e._private.rscratch,o=t,s=!1,l=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(l){var h=n.join("$");a.pathCacheKey&&a.pathCacheKey===h?(i=t=a.pathCache,s=!0):(i=t=new Path2D,a.pathCacheKey=h,a.pathCache=i)}if(o.setLineDash)switch(r){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(u),o.lineDashOffset=c;break;case"solid":o.setLineDash([])}if(!s&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+3<n.length;d+=4)t.quadraticCurveTo(n[d],n[d+1],n[d+2],n[d+3]);break;case"straight":case"segments":case"haystack":for(var p=2;p+1<n.length;p+=2)t.lineTo(n[p],n[p+1])}t=o,l?t.stroke(i):t.stroke(),t.setLineDash&&t.setLineDash([])},$s.drawEdgeTrianglePath=function(e,t,n){t.fillStyle=t.strokeStyle;for(var r=e.pstyle("width").pfValue,i=0;i+1<n.length;i+=2){var a=[n[i+2]-n[i],n[i+3]-n[i+1]],o=Math.sqrt(a[0]*a[0]+a[1]*a[1]),s=[a[1]/o,-a[0]/o],l=[s[0]*r/2,s[1]*r/2];t.beginPath(),t.moveTo(n[i]-l[0],n[i+1]-l[1]),t.lineTo(n[i]+l[0],n[i+1]+l[1]),t.lineTo(n[i+2],n[i+3]),t.closePath(),t.fill()}},$s.drawArrowheads=function(e,t,n){var r=t._private.rscratch,i="haystack"===r.edgeType;i||this.drawArrowhead(e,t,"source",r.arrowStartX,r.arrowStartY,r.srcArrowAngle,n),this.drawArrowhead(e,t,"mid-target",r.midX,r.midY,r.midtgtArrowAngle,n),this.drawArrowhead(e,t,"mid-source",r.midX,r.midY,r.midsrcArrowAngle,n),i||this.drawArrowhead(e,t,"target",r.arrowEndX,r.arrowEndY,r.tgtArrowAngle,n)},$s.drawArrowhead=function(e,t,n,r,i,a,o){if(!(isNaN(r)||null==r||isNaN(i)||null==i||isNaN(a)||null==a)){var s=this,l=t.pstyle(n+"-arrow-shape").value;if("none"!==l){var u="hollow"===t.pstyle(n+"-arrow-fill").value?"both":"filled",c=t.pstyle(n+"-arrow-fill").value,h=t.pstyle("width").pfValue,d=t.pstyle(n+"-arrow-width"),p="match-line"===d.value?h:d.pfValue;"%"===d.units&&(p*=h);var g=t.pstyle("opacity").value;void 0===o&&(o=g);var f=e.globalCompositeOperation;1===o&&"hollow"!==c||(e.globalCompositeOperation="destination-out",s.colorFillStyle(e,255,255,255,1),s.colorStrokeStyle(e,255,255,255,1),s.drawArrowShape(t,e,u,h,l,p,r,i,a),e.globalCompositeOperation=f);var v=t.pstyle(n+"-arrow-color").value;s.colorFillStyle(e,v[0],v[1],v[2],o),s.colorStrokeStyle(e,v[0],v[1],v[2],o),s.drawArrowShape(t,e,c,h,l,p,r,i,a)}}},$s.drawArrowShape=function(e,t,n,r,i,a,o,s,l){var u,c=this,h=this.usePaths()&&"triangle-cross"!==i,d=!1,p=t,g={x:o,y:s},f=e.pstyle("arrow-scale").value,v=this.getArrowWidth(r,f),y=c.arrowShapes[i];if(h){var m=c.arrowPathCache=c.arrowPathCache||[],b=fe(i),x=m[b];null!=x?(u=t=x,d=!0):(u=t=new Path2D,m[b]=u)}d||(t.beginPath&&t.beginPath(),h?y.draw(t,1,0,{x:0,y:0},1):y.draw(t,v,l,g,r),t.closePath&&t.closePath()),t=p,h&&(t.translate(o,s),t.rotate(l),t.scale(v,v)),"filled"!==n&&"both"!==n||(h?t.fill(u):t.fill()),"hollow"!==n&&"both"!==n||(t.lineWidth=a/(h?v:1),t.lineJoin="miter",h?t.stroke(u):t.stroke()),h&&(t.scale(1/v,1/v),t.rotate(-l),t.translate(-o,-s))};var Zs={safeDrawImage:function(e,t,n,r,i,a,o,s,l,u){if(!(i<=0||a<=0||l<=0||u<=0))try{e.drawImage(t,n,r,i,a,o,s,l,u)}catch(c){Ae(c)}},drawInscribedImage:function(e,t,n,r,i){var a=this,o=n.position(),s=o.x,l=o.y,u=n.cy().style(),c=u.getIndexedStyle.bind(u),h=c(n,"background-fit","value",r),d=c(n,"background-repeat","value",r),p=n.width(),g=n.height(),f=2*n.padding(),v=p+("inner"===c(n,"background-width-relative-to","value",r)?0:f),y=g+("inner"===c(n,"background-height-relative-to","value",r)?0:f),m=n._private.rscratch,b="node"===c(n,"background-clip","value",r),x=c(n,"background-image-opacity","value",r)*i,w=c(n,"background-image-smoothing","value",r),E=t.width||t.cachedW,_=t.height||t.cachedH;null!=E&&null!=_||(document.body.appendChild(t),E=t.cachedW=t.width||t.offsetWidth,_=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t));var T=E,D=_;if("auto"!==c(n,"background-width","value",r)&&(T="%"===c(n,"background-width","units",r)?c(n,"background-width","pfValue",r)*v:c(n,"background-width","pfValue",r)),"auto"!==c(n,"background-height","value",r)&&(D="%"===c(n,"background-height","units",r)?c(n,"background-height","pfValue",r)*y:c(n,"background-height","pfValue",r)),0!==T&&0!==D){if("contain"===h)T*=C=Math.min(v/T,y/D),D*=C;else if("cover"===h){var C;T*=C=Math.max(v/T,y/D),D*=C}var N=s-v/2,A=c(n,"background-position-x","units",r),L=c(n,"background-position-x","pfValue",r);N+="%"===A?(v-T)*L:L;var k=c(n,"background-offset-x","units",r),S=c(n,"background-offset-x","pfValue",r);N+="%"===k?(v-T)*S:S;var I=l-y/2,M=c(n,"background-position-y","units",r),O=c(n,"background-position-y","pfValue",r);I+="%"===M?(y-D)*O:O;var P=c(n,"background-offset-y","units",r),R=c(n,"background-offset-y","pfValue",r);I+="%"===P?(y-D)*R:R,m.pathCache&&(N-=s,I-=l,s=0,l=0);var B=e.globalAlpha;e.globalAlpha=x;var F=a.getImgSmoothing(e),z=!1;if("no"===w&&F?(a.setImgSmoothing(e,!1),z=!0):"yes"!==w||F||(a.setImgSmoothing(e,!0),z=!0),"no-repeat"===d)b&&(e.save(),m.pathCache?e.clip(m.pathCache):(a.nodeShapes[a.getNodeShape(n)].draw(e,s,l,v,y),e.clip())),a.safeDrawImage(e,t,0,0,E,_,N,I,T,D),b&&e.restore();else{var G=e.createPattern(t,d);e.fillStyle=G,a.nodeShapes[a.getNodeShape(n)].draw(e,s,l,v,y),e.translate(N,I),e.fill(),e.translate(-N,-I)}e.globalAlpha=B,z&&a.setImgSmoothing(e,F)}}},Qs={};function Js(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.quadraticCurveTo(t+r,n,t+r,n+a),e.lineTo(t+r,n+i-a),e.quadraticCurveTo(t+r,n+i,t+r-a,n+i),e.lineTo(t+a,n+i),e.quadraticCurveTo(t,n+i,t,n+i-a),e.lineTo(t,n+a),e.quadraticCurveTo(t,n,t+a,n),e.closePath(),o?e.stroke():e.fill()}Qs.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(st(n*r));t=Math.pow(2,i)}return!(e.pstyle("font-size").pfValue*t<e.pstyle("min-zoomed-font-size").pfValue)},Qs.drawElementText=function(e,t,n,r,i){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this;if(null==r){if(a&&!o.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,c=t.pstyle("label"),h=t.pstyle("source-label"),d=t.pstyle("target-label");if(u||(!c||!c.value)&&(!h||!h.value)&&(!d||!d.value))return;e.textAlign="center",e.textBaseline="bottom"}var p,g=!n;n&&(p=n,e.translate(-p.x1,-p.y1)),null==i?(o.drawText(e,t,null,g,a),t.isEdge()&&(o.drawText(e,t,"source",g,a),o.drawText(e,t,"target",g,a))):o.drawText(e,t,i,g,a),n&&e.translate(p.x1,p.y1)},Qs.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n<this.fontCaches.length;n++)if((t=this.fontCaches[n]).context===e)return t;return t={context:e},this.fontCaches.push(t),t},Qs.setupTextStyle=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",a=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+o+" "+i+" "+a,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},Qs.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",i=e.pstyle(r+"text-rotation"),a=Re(n,"labelAngle",t);return"autorotate"===i.strValue?e.isEdge()?a:0:"none"===i.strValue?0:i.pfValue},Qs.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=t._private.rscratch,o=i?t.effectiveOpacity():1;if(!i||0!==o&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,l,u=Re(a,"labelX",n),c=Re(a,"labelY",n),h=this.getLabelText(t,n);if(null!=h&&""!==h&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(e,t,i);var d,p=n?n+"-":"",g=Re(a,"labelWidth",n),f=Re(a,"labelHeight",n),v=t.pstyle(p+"text-margin-x").pfValue,y=t.pstyle(p+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(m&&(b="center",x="center"),u+=v,c+=y,0!==(d=r?this.getTextAngle(t,n):0)&&(s=u,l=c,e.translate(s,l),e.rotate(d),u=0,c=0),x){case"top":break;case"center":c+=f/2;break;case"bottom":c+=f}var w=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,_=t.pstyle("text-border-width").pfValue,T=t.pstyle("text-background-padding").pfValue,D=0===t.pstyle("text-background-shape").strValue.indexOf("round");if(w>0||_>0&&E>0){var C=u-T;switch(b){case"left":C-=g;break;case"center":C-=g/2}var N=c-f-T,A=g+2*T,L=f+2*T;if(w>0){var k=e.fillStyle,S=t.pstyle("text-background-color").value;e.fillStyle="rgba("+S[0]+","+S[1]+","+S[2]+","+w*o+")",D?Js(e,C,N,A,L,2):e.fillRect(C,N,A,L),e.fillStyle=k}if(_>0&&E>0){var I=e.strokeStyle,M=e.lineWidth,O=t.pstyle("text-border-color").value,P=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+O[0]+","+O[1]+","+O[2]+","+E*o+")",e.lineWidth=_,e.setLineDash)switch(P){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=_/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(D?Js(e,C,N,A,L,2,"stroke"):e.strokeRect(C,N,A,L),"double"===P){var R=_/2;D?Js(e,C+R,N+R,A-2*R,L-2*R,2,"stroke"):e.strokeRect(C+R,N+R,A-2*R,L-2*R)}e.setLineDash&&e.setLineDash([]),e.lineWidth=M,e.strokeStyle=I}}var B=2*t.pstyle("text-outline-width").pfValue;if(B>0&&(e.lineWidth=B),"wrap"===t.pstyle("text-wrap").value){var F=Re(a,"labelWrapCachedLines",n),z=Re(a,"labelLineHeight",n),G=g/2,Y=this.getLabelJustification(t);switch("auto"===Y||("left"===b?"left"===Y?u+=-g:"center"===Y&&(u+=-G):"center"===b?"left"===Y?u+=-G:"right"===Y&&(u+=G):"right"===b&&("center"===Y?u+=G:"right"===Y&&(u+=g))),x){case"top":case"center":case"bottom":c-=(F.length-1)*z}for(var X=0;X<F.length;X++)B>0&&e.strokeText(F[X],u,c),e.fillText(F[X],u,c),c+=z}else B>0&&e.strokeText(h,u,c),e.fillText(h,u,c);0!==d&&(e.rotate(-d),e.translate(-s,-l))}}};var el={drawNode:function(e,t,n){var r,i,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,h=t.position();if(I(h.x)&&I(h.y)&&(!s||t.visible())){var d,p,g=s?t.effectiveOpacity():1,f=l.usePaths(),v=!1,y=t.padding();r=t.width()+2*y,i=t.height()+2*y,n&&(p=n,e.translate(-p.x1,-p.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),x=new Array(m.length),w=0,E=0;E<m.length;E++){var _=m[E];if(b[E]=null!=_&&"none"!==_){var T=t.cy().style().getIndexedStyle(t,"background-image-crossorigin","value",E);w++,x[E]=l.getCachedImage(_,T,(function(){u.backgroundTimestamp=Date.now(),t.emitAndNotify("background")}))}}var D=t.pstyle("background-blacken").value,C=t.pstyle("border-width").pfValue,N=t.pstyle("background-opacity").value*g,A=t.pstyle("border-color").value,L=t.pstyle("border-style").value,k=t.pstyle("border-opacity").value*g,S=t.pstyle("outline-width").pfValue,M=t.pstyle("outline-color").value,O=t.pstyle("outline-style").value,P=t.pstyle("outline-opacity").value*g,R=t.pstyle("outline-offset").value;e.lineJoin="miter";var B=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N;l.eleFillStyle(e,t,n)},F=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k;l.colorStrokeStyle(e,A[0],A[1],A[2],t)},z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P;l.colorStrokeStyle(e,M[0],M[1],M[2],t)},G=function(e,t,n,r){var i,a=l.nodePathCache=l.nodePathCache||[],o=ve("polygon"===n?n+","+r.join(","):n,""+t,""+e),s=a[o],u=!1;return null!=s?(i=s,u=!0,c.pathCache=i):(i=new Path2D,a[o]=c.pathCache=i),{path:i,cacheHit:u}},Y=t.pstyle("shape").strValue,X=t.pstyle("shape-polygon-points").pfValue;if(f){e.translate(h.x,h.y);var V=G(r,i,Y,X);d=V.path,v=V.cacheHit}var U=function(){if(!v){var n=h;f&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(d||e,n.x,n.y,r,i)}f?e.fill(d):e.fill()},j=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=u.backgrounding,a=0,o=0;o<x.length;o++){var s=t.cy().style().getIndexedStyle(t,"background-image-containment","value",o);r&&"over"===s||!r&&"inside"===s?a++:b[o]&&x[o].complete&&!x[o].error&&(a++,l.drawInscribedImage(e,x[o],t,o,n))}u.backgrounding=!(a===w),i!==u.backgrounding&&t.updateStyle(!1)},q=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g;l.hasPie(t)&&(l.drawPie(e,t,a),n&&(f||l.nodeShapes[l.getNodeShape(t)].draw(e,h.x,h.y,r,i)))},H=function(){var t=(D>0?D:-D)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:g),n=D>0?0:255;0!==D&&(l.colorFillStyle(e,n,n,n,t),f?e.fill(d):e.fill())},W=function(){if(C>0){if(e.lineWidth=C,e.lineCap="butt",e.setLineDash)switch(L){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}if(f?e.stroke(d):e.stroke(),"double"===L){e.lineWidth=C/3;var t=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",f?e.stroke(d):e.stroke(),e.globalCompositeOperation=t}e.setLineDash&&e.setLineDash([])}},$=function(){if(S>0){if(e.lineWidth=S,e.lineCap="butt",e.setLineDash)switch(O){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var n=h;f&&(n={x:0,y:0});var a,o=l.getNodeShape(t),s=(r+C+(S+R))/r,u=(i+C+(S+R))/i,c=r*s,d=i*u,p=l.nodeShapes[o].points;if(f)a=G(c,d,o,p).path;if("ellipse"===o)l.drawEllipsePath(a||e,n.x,n.y,c,d);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(o)){var g=0,v=0,y=0;"round-diamond"===o?g=1.4*(C+R+S):"round-heptagon"===o?(g=1.075*(C+R+S),y=-(C/2+R+S)/35):"round-hexagon"===o?g=1.12*(C+R+S):"round-pentagon"===o?(g=1.13*(C+R+S),y=-(C/2+R+S)/15):"round-tag"===o?(g=1.12*(C+R+S),v=.07*(C/2+S+R)):"round-triangle"===o&&(g=(C+R+S)*(Math.PI/2),y=-(C+R/2+S)/Math.PI),0!==g&&(s=(r+g)/r,u=(i+g)/i),l.drawRoundPolygonPath(a||e,n.x+v,n.y+y,r*s,i*u,p)}else if(["roundrectangle","round-rectangle"].includes(o))l.drawRoundRectanglePath(a||e,n.x,n.y,c,d);else if(["cutrectangle","cut-rectangle"].includes(o))l.drawCutRectanglePath(a||e,n.x,n.y,c,d);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(o))l.drawBottomRoundRectanglePath(a||e,n.x,n.y,c,d);else if("barrel"===o)l.drawBarrelPath(a||e,n.x,n.y,c,d);else if(o.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(o)){p=St(It(p,(C+S+R)/r)),l.drawPolygonPath(a||e,n.x,n.y,r,i,p)}else{p=St(It(p,-((C+S+R)/r))),l.drawPolygonPath(a||e,n.x,n.y,r,i,p)}if(f?e.stroke(a):e.stroke(),"double"===O){e.lineWidth=C/3;var m=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",f?e.stroke(a):e.stroke(),e.globalCompositeOperation=m}e.setLineDash&&e.setLineDash([])}};if("yes"===t.pstyle("ghost").value){var K=t.pstyle("ghost-offset-x").pfValue,Z=t.pstyle("ghost-offset-y").pfValue,Q=t.pstyle("ghost-opacity").value,J=Q*g;e.translate(K,Z),z(),$(),B(Q*N),U(),j(J,!0),F(Q*k),W(),q(0!==D||0!==C),j(J,!1),H(J),e.translate(-K,-Z)}f&&e.translate(-h.x,-h.y),o&&l.drawNodeUnderlay(e,t,h,r,i),f&&e.translate(h.x,h.y),z(),$(),B(),U(),j(g,!0),F(),W(),q(0!==D||0!==C),j(g,!1),H(),f&&e.translate(-h.x,-h.y),l.drawElementText(e,t,null,a),o&&l.drawNodeOverlay(e,t,h,r,i),n&&e.translate(p.x1,p.y1)}}},tl=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n,r,i,a){if(n.visible()){var o=n.pstyle("".concat(e,"-padding")).pfValue,s=n.pstyle("".concat(e,"-opacity")).value,l=n.pstyle("".concat(e,"-color")).value,u=n.pstyle("".concat(e,"-shape")).value;if(s>0){if(r=r||n.position(),null==i||null==a){var c=n.padding();i=n.width()+2*c,a=n.height()+2*c}this.colorFillStyle(t,l[0],l[1],l[2],s),this.nodeShapes[u].draw(t,r.x,r.y,i+2*o,a+2*o),t.fill()}}}};el.drawNodeOverlay=tl("overlay"),el.drawNodeUnderlay=tl("underlay"),el.hasPie=function(e){return(e=e[0])._private.hasPie},el.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var i=t.cy().style(),a=t.pstyle("pie-size"),o=r.x,s=r.y,l=t.width(),u=t.height(),c=Math.min(l,u)/2,h=0;this.usePaths()&&(o=0,s=0),"%"===a.units?c*=a.pfValue:void 0!==a.pfValue&&(c=a.pfValue/2);for(var d=1;d<=i.pieBackgroundN;d++){var p=t.pstyle("pie-"+d+"-background-size").value,g=t.pstyle("pie-"+d+"-background-color").value,f=t.pstyle("pie-"+d+"-background-opacity").value*n,v=p/100;v+h>1&&(v=1-h);var y=1.5*Math.PI+2*Math.PI*h,m=y+2*Math.PI*v;0===p||h>=1||h+v>1||(e.beginPath(),e.moveTo(o,s),e.arc(o,s,c,y,m),e.closePath(),this.colorFillStyle(e,g[0],g[1],g[2],f),e.fill(),h+=v)}};var nl={};nl.getPixelRatio=function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t},nl.paintCache=function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;i<n.length;i++)if((t=n[i]).context===e){r=!1;break}return r&&(t={context:e},n.push(t)),t},nl.createGradientStyleFor=function(e,t,n,r,i){var a,o=this.usePaths(),s=n.pstyle(t+"-gradient-stop-colors").value,l=n.pstyle(t+"-gradient-stop-positions").pfValue;if("radial-gradient"===r)if(n.isEdge()){var u=n.sourceEndpoint(),c=n.targetEndpoint(),h=n.midpoint(),d=ut(u,h),p=ut(c,h);a=e.createRadialGradient(h.x,h.y,0,h.x,h.y,Math.max(d,p))}else{var g=o?{x:0,y:0}:n.position(),f=n.paddedWidth(),v=n.paddedHeight();a=e.createRadialGradient(g.x,g.y,0,g.x,g.y,Math.max(f,v))}else if(n.isEdge()){var y=n.sourceEndpoint(),m=n.targetEndpoint();a=e.createLinearGradient(y.x,y.y,m.x,m.y)}else{var b=o?{x:0,y:0}:n.position(),x=n.paddedWidth()/2,w=n.paddedHeight()/2;switch(n.pstyle("background-gradient-direction").value){case"to-bottom":a=e.createLinearGradient(b.x,b.y-w,b.x,b.y+w);break;case"to-top":a=e.createLinearGradient(b.x,b.y+w,b.x,b.y-w);break;case"to-left":a=e.createLinearGradient(b.x+x,b.y,b.x-x,b.y);break;case"to-right":a=e.createLinearGradient(b.x-x,b.y,b.x+x,b.y);break;case"to-bottom-right":case"to-right-bottom":a=e.createLinearGradient(b.x-x,b.y-w,b.x+x,b.y+w);break;case"to-top-right":case"to-right-top":a=e.createLinearGradient(b.x-x,b.y+w,b.x+x,b.y-w);break;case"to-bottom-left":case"to-left-bottom":a=e.createLinearGradient(b.x+x,b.y-w,b.x-x,b.y+w);break;case"to-top-left":case"to-left-top":a=e.createLinearGradient(b.x+x,b.y+w,b.x-x,b.y-w)}}if(!a)return null;for(var E=l.length===s.length,_=s.length,T=0;T<_;T++)a.addColorStop(E?l[T]:T/(_-1),"rgba("+s[T][0]+","+s[T][1]+","+s[T][2]+","+i+")");return a},nl.gradientFillStyle=function(e,t,n,r){var i=this.createGradientStyleFor(e,"background",t,n,r);if(!i)return null;e.fillStyle=i},nl.colorFillStyle=function(e,t,n,r,i){e.fillStyle="rgba("+t+","+n+","+r+","+i+")"},nl.eleFillStyle=function(e,t,n){var r=t.pstyle("background-fill").value;if("linear-gradient"===r||"radial-gradient"===r)this.gradientFillStyle(e,t,r,n);else{var i=t.pstyle("background-color").value;this.colorFillStyle(e,i[0],i[1],i[2],n)}},nl.gradientStrokeStyle=function(e,t,n,r){var i=this.createGradientStyleFor(e,"line",t,n,r);if(!i)return null;e.strokeStyle=i},nl.colorStrokeStyle=function(e,t,n,r,i){e.strokeStyle="rgba("+t+","+n+","+r+","+i+")"},nl.eleStrokeStyle=function(e,t,n){var r=t.pstyle("line-fill").value;if("linear-gradient"===r||"radial-gradient"===r)this.gradientStrokeStyle(e,t,r,n);else{var i=t.pstyle("line-color").value;this.colorStrokeStyle(e,i[0],i[1],i[2],n)}},nl.matchCanvasSize=function(e){var t=this,n=t.data,r=t.findContainerClientCoords(),i=r[2],a=r[3],o=t.getPixelRatio(),s=t.motionBlurPxRatio;e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE]&&e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG]||(o=s);var l,u=i*o,c=a*o;if(u!==t.canvasWidth||c!==t.canvasHeight){t.fontCaches=null;var h=n.canvasContainer;h.style.width=i+"px",h.style.height=a+"px";for(var d=0;d<t.CANVAS_LAYERS;d++)(l=n.canvases[d]).width=u,l.height=c,l.style.width=i+"px",l.style.height=a+"px";for(d=0;d<t.BUFFER_COUNT;d++)(l=n.bufferCanvases[d]).width=u,l.height=c,l.style.width=i+"px",l.style.height=a+"px";t.textureMult=1,o<=1&&(l=n.bufferCanvases[t.TEXTURE_BUFFER],t.textureMult=2,l.width=u*t.textureMult,l.height=c*t.textureMult),t.canvasWidth=u,t.canvasHeight=c}},nl.renderTo=function(e,t,n,r){this.render({forcedContext:e,forcedZoom:t,forcedPan:n,drawAllLayers:!0,forcedPxRatio:r})},nl.render=function(e){var t=(e=e||Ie()).forcedContext,n=e.drawAllLayers,r=e.drawOnlyNodeLayer,i=e.forcedZoom,a=e.forcedPan,o=this,s=void 0===e.forcedPxRatio?this.getPixelRatio():e.forcedPxRatio,l=o.cy,u=o.data,c=u.canvasNeedsRedraw,h=o.textureOnViewport&&!t&&(o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming),d=void 0!==e.motionBlur?e.motionBlur:o.motionBlur,p=o.motionBlurPxRatio,g=l.hasCompoundNodes(),f=o.hoverData.draggingEles,v=!(!o.hoverData.selecting&&!o.touchData.selecting),y=d=d&&!t&&o.motionBlurEnabled&&!v;t||(o.prevPxRatio!==s&&(o.invalidateContainerClientCoordsCache(),o.matchCanvasSize(o.container),o.redrawHint("eles",!0),o.redrawHint("drag",!0)),o.prevPxRatio=s),!t&&o.motionBlurTimeout&&clearTimeout(o.motionBlurTimeout),d&&(null==o.mbFrames&&(o.mbFrames=0),o.mbFrames++,o.mbFrames<3&&(y=!1),o.mbFrames>o.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!h&&(c[o.NODE]=!0,c[o.SELECT_BOX]=!0);var m=l.style(),b=l.zoom(),x=void 0!==i?i:b,w=l.pan(),E={x:w.x,y:w.y},_={zoom:b,pan:{x:w.x,y:w.y}},T=o.prevViewport;void 0===T||_.zoom!==T.zoom||_.pan.x!==T.pan.x||_.pan.y!==T.pan.y||f&&!g||(o.motionBlurPxRatio=1),a&&(E=a),x*=s,E.x*=s,E.y*=s;var D=o.getCachedZSortedEles();function C(e,t,n,r,i){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",o.colorFillStyle(e,255,255,255,o.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=a}function N(e,r){var s,l,c,h;o.clearingMotionBlur||e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]?(s=E,l=x,c=o.canvasWidth,h=o.canvasHeight):(s={x:w.x*p,y:w.y*p},l=b*p,c=o.canvasWidth*p,h=o.canvasHeight*p),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?C(e,0,0,c,h):t||void 0!==r&&!r||e.clearRect(0,0,c,h),n||(e.translate(s.x,s.y),e.scale(l,l)),a&&e.translate(a.x,a.y),i&&e.scale(i,i)}if(h||(o.textureDrawLastFrame=!1),h){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=l.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var A=o.data.bufferContexts[o.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:s*o.textureMult}),(_=o.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:o.canvasWidth,height:o.canvasHeight}).mpan={x:(0-_.pan.x)/_.zoom,y:(0-_.pan.y)/_.zoom}}c[o.DRAG]=!1,c[o.NODE]=!1;var L=u.contexts[o.NODE],k=o.textureCache.texture;_=o.textureCache.viewport;L.setTransform(1,0,0,1,0,0),d?C(L,0,0,_.width,_.height):L.clearRect(0,0,_.width,_.height);var S=m.core("outside-texture-bg-color").value,I=m.core("outside-texture-bg-opacity").value;o.colorFillStyle(L,S[0],S[1],S[2],I),L.fillRect(0,0,_.width,_.height);b=l.zoom();N(L,!1),L.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/s,_.height/_.zoom/s),L.drawImage(k,_.mpan.x,_.mpan.y,_.width/_.zoom/s,_.height/_.zoom/s)}else o.textureOnViewport&&!t&&(o.textureCache=null);var M=l.extent(),O=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),P=o.hideEdgesOnViewport&&O,R=[];if(R[o.NODE]=!c[o.NODE]&&d&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,R[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),R[o.DRAG]=!c[o.DRAG]&&d&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,R[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),c[o.NODE]||n||r||R[o.NODE]){var B=d&&!R[o.NODE]&&1!==p;N(L=t||(B?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:u.contexts[o.NODE]),d&&!B?"motionBlur":void 0),P?o.drawCachedNodes(L,D.nondrag,s,M):o.drawLayeredElements(L,D.nondrag,s,M),o.debug&&o.drawDebugPoints(L,D.nondrag),n||d||(c[o.NODE]=!1)}if(!r&&(c[o.DRAG]||n||R[o.DRAG])){B=d&&!R[o.DRAG]&&1!==p;N(L=t||(B?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:u.contexts[o.DRAG]),d&&!B?"motionBlur":void 0),P?o.drawCachedNodes(L,D.drag,s,M):o.drawCachedElements(L,D.drag,s,M),o.debug&&o.drawDebugPoints(L,D.drag),n||d||(c[o.DRAG]=!1)}if(o.showFps||!r&&c[o.SELECT_BOX]&&!n){if(N(L=t||u.contexts[o.SELECT_BOX]),1==o.selection[4]&&(o.hoverData.selecting||o.touchData.selecting)){b=o.cy.zoom();var F=m.core("selection-box-border-width").value/b;L.lineWidth=F,L.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",L.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),F>0&&(L.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",L.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(u.bgActivePosistion&&!o.hoverData.selecting){b=o.cy.zoom();var z=u.bgActivePosistion;L.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",L.beginPath(),L.arc(z.x,z.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),L.fill()}var G=o.lastRedrawTime;if(o.showFps&&G){G=Math.round(G);var Y=Math.round(1e3/G);L.setTransform(1,0,0,1,0,0),L.fillStyle="rgba(255, 0, 0, 0.75)",L.strokeStyle="rgba(255, 0, 0, 0.75)",L.lineWidth=1,L.fillText("1 frame = "+G+" ms = "+Y+" fps",0,20);L.strokeRect(0,30,250,20),L.fillRect(0,30,250*Math.min(Y/60,1),20)}n||(c[o.SELECT_BOX]=!1)}if(d&&1!==p){var X=u.contexts[o.NODE],V=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],U=u.contexts[o.DRAG],j=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],q=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!y?e.clearRect(0,0,o.canvasWidth,o.canvasHeight):C(e,0,0,o.canvasWidth,o.canvasHeight);var r=p;e.drawImage(t,0,0,o.canvasWidth*r,o.canvasHeight*r,0,0,o.canvasWidth,o.canvasHeight)};(c[o.NODE]||R[o.NODE])&&(q(X,V,R[o.NODE]),c[o.NODE]=!1),(c[o.DRAG]||R[o.DRAG])&&(q(U,j,R[o.DRAG]),c[o.DRAG]=!1)}o.prevViewport=_,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),d&&(o.motionBlurTimeout=setTimeout((function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!h,o.mbFrames=0,c[o.NODE]=!0,c[o.DRAG]=!0,o.redraw()}),100)),t||l.emit("render")};for(var rl={drawPolygonPath:function(e,t,n,r,i,a){var o=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*a[0],n+s*a[1]);for(var l=1;l<a.length/2;l++)e.lineTo(t+o*a[2*l],n+s*a[2*l+1]);e.closePath()},drawRoundPolygonPath:function(e,t,n,r,i,a){var o=r/2,s=i/2,l=Vt(r,i);e.beginPath&&e.beginPath();for(var u=0;u<a.length/4;u++){var c,h=void 0;h=0===u?a.length-2:4*u-2,c=4*u+2;var d=t+o*a[4*u],p=n+s*a[4*u+1],g=-a[h]*a[c]-a[h+1]*a[c+1],f=l/Math.tan(Math.acos(g)/2),v=d-f*a[h],y=p-f*a[h+1],m=d+f*a[c],b=p+f*a[c+1];0===u?e.moveTo(v,y):e.lineTo(v,y),e.arcTo(d,p,m,b,l)}e.closePath()},drawRoundRectanglePath:function(e,t,n,r,i){var a=r/2,o=i/2,s=Xt(r,i);e.beginPath&&e.beginPath(),e.moveTo(t,n-o),e.arcTo(t+a,n-o,t+a,n,s),e.arcTo(t+a,n+o,t,n+o,s),e.arcTo(t-a,n+o,t-a,n,s),e.arcTo(t-a,n-o,t,n-o,s),e.lineTo(t,n-o),e.closePath()},drawBottomRoundRectanglePath:function(e,t,n,r,i){var a=r/2,o=i/2,s=Xt(r,i);e.beginPath&&e.beginPath(),e.moveTo(t,n-o),e.lineTo(t+a,n-o),e.lineTo(t+a,n),e.arcTo(t+a,n+o,t,n+o,s),e.arcTo(t-a,n+o,t-a,n,s),e.lineTo(t-a,n-o),e.lineTo(t,n-o),e.closePath()},drawCutRectanglePath:function(e,t,n,r,i){var a=r/2,o=i/2;e.beginPath&&e.beginPath(),e.moveTo(t-a+8,n-o),e.lineTo(t+a-8,n-o),e.lineTo(t+a,n-o+8),e.lineTo(t+a,n+o-8),e.lineTo(t+a-8,n+o),e.lineTo(t-a+8,n+o),e.lineTo(t-a,n+o-8),e.lineTo(t-a,n-o+8),e.closePath()},drawBarrelPath:function(e,t,n,r,i){var a=r/2,o=i/2,s=t-a,l=t+a,u=n-o,c=n+o,h=Ut(r,i),d=h.widthOffset,p=h.heightOffset,g=h.ctrlPtOffsetPct*d;e.beginPath&&e.beginPath(),e.moveTo(s,u+p),e.lineTo(s,c-p),e.quadraticCurveTo(s+g,c,s+d,c),e.lineTo(l-d,c),e.quadraticCurveTo(l-g,c,l,c-p),e.lineTo(l,u+p),e.quadraticCurveTo(l-g,u,l-d,u),e.lineTo(s+d,u),e.quadraticCurveTo(s+g,u,s,u+p),e.closePath()}},il=Math.sin(0),al=Math.cos(0),ol={},sl={},ll=Math.PI/40,ul=0*Math.PI;ul<2*Math.PI;ul+=ll)ol[ul]=Math.sin(ul),sl[ul]=Math.cos(ul);rl.drawEllipsePath=function(e,t,n,r,i){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,n,r/2,i/2,0,0,2*Math.PI);else for(var a,o,s=r/2,l=i/2,u=0*Math.PI;u<2*Math.PI;u+=ll)a=t-s*ol[u]*il+s*sl[u]*al,o=n+l*sl[u]*il+l*ol[u]*al,0===u?e.moveTo(a,o):e.lineTo(a,o);e.closePath()};var cl={};function hl(e){var t=e.indexOf(",");return e.substr(t+1)}function dl(e,t,n){var r=function(){return t.toDataURL(n,e.quality)};switch(e.output){case"blob-promise":return new rr((function(r,i){try{t.toBlob((function(e){null!=e?r(e):i(new Error("`canvas.toBlob()` sent a null value in its callback"))}),n,e.quality)}catch(a){i(a)}}));case"blob":return function(e,t){for(var n=atob(e),r=new ArrayBuffer(n.length),i=new Uint8Array(r),a=0;a<n.length;a++)i[a]=n.charCodeAt(a);return new Blob([r],{type:t})}(hl(r()),n);case"base64":return hl(r());default:return r()}}cl.createBuffer=function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,[n,n.getContext("2d")]},cl.bufferCanvasImage=function(e){var t=this.cy,n=t.mutableElements().boundingBox(),r=this.findContainerClientCoords(),i=e.full?Math.ceil(n.w):r[2],a=e.full?Math.ceil(n.h):r[3],o=I(e.maxWidth)||I(e.maxHeight),s=this.getPixelRatio(),l=1;if(void 0!==e.scale)i*=e.scale,a*=e.scale,l=e.scale;else if(o){var u=1/0,c=1/0;I(e.maxWidth)&&(u=l*e.maxWidth/i),I(e.maxHeight)&&(c=l*e.maxHeight/a),i*=l=Math.min(u,c),a*=l}o||(i*=s,a*=s,l*=s);var h=document.createElement("canvas");h.width=i,h.height=a,h.style.width=i+"px",h.style.height=a+"px";var d=h.getContext("2d");if(i>0&&a>0){d.clearRect(0,0,i,a),d.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(e.full)d.translate(-n.x1*l,-n.y1*l),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(n.x1*l,n.y1*l);else{var g=t.pan(),f={x:g.x*l,y:g.y*l};l*=t.zoom(),d.translate(f.x,f.y),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(-f.x,-f.y)}e.bg&&(d.globalCompositeOperation="destination-over",d.fillStyle=e.bg,d.rect(0,0,i,a),d.fill())}return h},cl.png=function(e){return dl(e,this.bufferCanvasImage(e),"image/png")},cl.jpg=function(e){return dl(e,this.bufferCanvasImage(e),"image/jpeg")};var pl={nodeShapeImpl:function(e,t,n,r,i,a,o){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,i,a);case"polygon":return this.drawPolygonPath(t,n,r,i,a,o);case"round-polygon":return this.drawRoundPolygonPath(t,n,r,i,a,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,n,r,i,a);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,n,r,i,a);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,n,r,i,a);case"barrel":return this.drawBarrelPath(t,n,r,i,a)}}},gl=vl,fl=vl.prototype;function vl(e){var t=this;t.data={canvases:new Array(fl.CANVAS_LAYERS),contexts:new Array(fl.CANVAS_LAYERS),canvasNeedsRedraw:new Array(fl.CANVAS_LAYERS),bufferCanvases:new Array(fl.BUFFER_COUNT),bufferContexts:new Array(fl.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",r="rgba(0,0,0,0)";t.data.canvasContainer=document.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[n]=r,i.position="relative",i.zIndex="0",i.overflow="hidden";var a=e.cy.container();a.appendChild(t.data.canvasContainer),a.style[n]=r;var o={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};E&&E.userAgent.match(/msie|trident|edge/i)&&(o["-ms-touch-action"]="none",o["touch-action"]="none");for(var s=0;s<fl.CANVAS_LAYERS;s++){var l=t.data.canvases[s]=document.createElement("canvas");t.data.contexts[s]=l.getContext("2d"),Object.keys(o).forEach((function(e){l.style[e]=o[e]})),l.style.position="absolute",l.setAttribute("data-id","layer"+s),l.style.zIndex=String(fl.CANVAS_LAYERS-s),t.data.canvasContainer.appendChild(l),t.data.canvasNeedsRedraw[s]=!1}t.data.topCanvas=t.data.canvases[0],t.data.canvases[fl.NODE].setAttribute("data-id","layer"+fl.NODE+"-node"),t.data.canvases[fl.SELECT_BOX].setAttribute("data-id","layer"+fl.SELECT_BOX+"-selectbox"),t.data.canvases[fl.DRAG].setAttribute("data-id","layer"+fl.DRAG+"-drag");for(s=0;s<fl.BUFFER_COUNT;s++)t.data.bufferCanvases[s]=document.createElement("canvas"),t.data.bufferContexts[s]=t.data.bufferCanvases[s].getContext("2d"),t.data.bufferCanvases[s].style.position="absolute",t.data.bufferCanvases[s].setAttribute("data-id","buffer"+s),t.data.bufferCanvases[s].style.zIndex=String(-s-1),t.data.bufferCanvases[s].style.visibility="hidden";t.pathsEnabled=!0;var u=ft(),c=function(e){return{x:-e.w/2,y:-e.h/2}},h=function(e){return e.boundingBox(),e[0]._private.bodyBounds},d=function(e){return e.boundingBox(),e[0]._private.labelBounds.main||u},p=function(e){return e.boundingBox(),e[0]._private.labelBounds.source||u},g=function(e){return e.boundingBox(),e[0]._private.labelBounds.target||u},f=function(e,t){return t},v=function(e,t,n){var r=e?e+"-":"";return{x:t.x+n.pstyle(r+"text-margin-x").pfValue,y:t.y+n.pstyle(r+"text-margin-y").pfValue}},y=function(e,t,n){var r=e[0]._private.rscratch;return{x:r[t],y:r[n]}},m=t.data.eleTxrCache=new Ls(t,{getKey:function(e){return e[0]._private.nodeKey},doesEleInvalidateKey:function(e){var t=e[0]._private;return!(t.oldBackgroundTimestamp===t.backgroundTimestamp)},drawElement:function(e,n,r,i,a){return t.drawElement(e,n,r,!1,!1,a)},getBoundingBox:h,getRotationPoint:function(e){return{x:((t=h(e)).x1+t.x2)/2,y:(t.y1+t.y2)/2};var t},getRotationOffset:function(e){return c(h(e))},allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),b=t.data.lblTxrCache=new Ls(t,{getKey:function(e){return e[0]._private.labelStyleKey},drawElement:function(e,n,r,i,a){return t.drawElementText(e,n,r,i,"main",a)},getBoundingBox:d,getRotationPoint:function(e){return v("",y(e,"labelX","labelY"),e)},getRotationOffset:function(e){var t=d(e),n=c(d(e));if(e.isNode()){switch(e.pstyle("text-halign").value){case"left":n.x=-t.w;break;case"right":n.x=0}switch(e.pstyle("text-valign").value){case"top":n.y=-t.h;break;case"bottom":n.y=0}}return n},isVisible:f}),x=t.data.slbTxrCache=new Ls(t,{getKey:function(e){return e[0]._private.sourceLabelStyleKey},drawElement:function(e,n,r,i,a){return t.drawElementText(e,n,r,i,"source",a)},getBoundingBox:p,getRotationPoint:function(e){return v("source",y(e,"sourceLabelX","sourceLabelY"),e)},getRotationOffset:function(e){return c(p(e))},isVisible:f}),w=t.data.tlbTxrCache=new Ls(t,{getKey:function(e){return e[0]._private.targetLabelStyleKey},drawElement:function(e,n,r,i,a){return t.drawElementText(e,n,r,i,"target",a)},getBoundingBox:g,getRotationPoint:function(e){return v("target",y(e,"targetLabelX","targetLabelY"),e)},getRotationOffset:function(e){return c(g(e))},isVisible:f}),_=t.data.lyrTxrCache=new Ss(t);t.onUpdateEleCalcs((function(e,t){m.invalidateElements(t),b.invalidateElements(t),x.invalidateElements(t),w.invalidateElements(t),_.invalidateElements(t);for(var n=0;n<t.length;n++){var r=t[n]._private;r.oldBackgroundTimestamp=r.backgroundTimestamp}}));var T=function(e){for(var t=0;t<e.length;t++)_.enqueueElementRefinement(e[t].ele)};m.onDequeue(T),b.onDequeue(T),x.onDequeue(T),w.onDequeue(T)}fl.CANVAS_LAYERS=3,fl.SELECT_BOX=0,fl.DRAG=1,fl.NODE=2,fl.BUFFER_COUNT=3,fl.TEXTURE_BUFFER=0,fl.MOTIONBLUR_BUFFER_NODE=1,fl.MOTIONBLUR_BUFFER_DRAG=2,fl.redrawHint=function(e,t){var n=this;switch(e){case"eles":n.data.canvasNeedsRedraw[fl.NODE]=t;break;case"drag":n.data.canvasNeedsRedraw[fl.DRAG]=t;break;case"select":n.data.canvasNeedsRedraw[fl.SELECT_BOX]=t}};var yl="undefined"!=typeof Path2D;fl.path2dEnabled=function(e){if(void 0===e)return this.pathsEnabled;this.pathsEnabled=!!e},fl.usePaths=function(){return yl&&this.pathsEnabled},fl.setImgSmoothing=function(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)},fl.getImgSmoothing=function(e){return null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled},fl.makeOffscreenCanvas=function(e,t){var n;return"undefined"!==("undefined"==typeof OffscreenCanvas?"undefined":g(OffscreenCanvas))?n=new OffscreenCanvas(e,t):((n=document.createElement("canvas")).width=e,n.height=t),n},[Rs,Xs,$s,Zs,Qs,el,nl,rl,cl,pl].forEach((function(e){Q(fl,e)}));var ml=[{type:"layout",extensions:Zo},{type:"renderer",extensions:[{name:"null",impl:Qo},{name:"base",impl:Es},{name:"canvas",impl:gl}]}],bl={},xl={};function wl(e,t,n){var r=n,i=function(n){Ae("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if("core"===e){if(uo.prototype[t])return i(t);uo.prototype[t]=n}else if("collection"===e){if(Da.prototype[t])return i(t);Da.prototype[t]=n}else if("layout"===e){for(var a=function(e){this.options=e,n.call(this,e),S(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},o=a.prototype=Object.create(n.prototype),s=[],l=0;l<s.length;l++){var u=s[l];o[u]=o[u]||function(){return this}}o.start&&!o.run?o.run=function(){return this.start(),this}:!o.start&&o.run&&(o.start=function(){return this.run(),this});var c=n.prototype.stop;o.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var n=0;n<t.length;n++)t[n].stop()}return c?c.call(this):this.emit("layoutstop"),this},o.destroy||(o.destroy=function(){return this}),o.cy=function(){return this._private.cy};var h=function(e){return e._private.cy},d={addEventFields:function(e,t){t.layout=e,t.cy=h(e),t.target=e},bubble:function(){return!0},parent:function(e){return h(e)}};Q(o,{createEmitter:function(){return this._private.emitter=new Vi(d,this),this},emitter:function(){return this._private.emitter},on:function(e,t){return this.emitter().on(e,t),this},one:function(e,t){return this.emitter().one(e,t),this},once:function(e,t){return this.emitter().one(e,t),this},removeListener:function(e,t){return this.emitter().removeListener(e,t),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(e,t){return this.emitter().emit(e,t),this}}),ur.eventAliasesOn(o),r=a}else if("renderer"===e&&"null"!==t&&"base"!==t){var p=El("renderer","base"),g=p.prototype,f=n,v=n.prototype,y=function(){p.apply(this,arguments),f.apply(this,arguments)},m=y.prototype;for(var b in g){var x=g[b];if(null!=v[b])return i(b);m[b]=x}for(var w in v)m[w]=v[w];g.clientFunctions.forEach((function(e){m[e]=m[e]||function(){Ce("Renderer does not implement `renderer."+e+"()` on its prototype")}})),r=y}else if("__proto__"===e||"constructor"===e||"prototype"===e)return Ce(e+" is an illegal type to be registered, possibly lead to prototype pollutions");return te({map:bl,keys:[e,t],value:r})}function El(e,t){return ne({map:bl,keys:[e,t]})}function _l(e,t,n,r,i){return te({map:xl,keys:[e,t,n,r],value:i})}function Tl(e,t,n,r){return ne({map:xl,keys:[e,t,n,r]})}var Dl=function(){return 2===arguments.length?El.apply(null,arguments):3===arguments.length?wl.apply(null,arguments):4===arguments.length?Tl.apply(null,arguments):5===arguments.length?_l.apply(null,arguments):void Ce("Invalid extension access syntax")};uo.prototype.extension=Dl,ml.forEach((function(e){e.extensions.forEach((function(t){wl(e.type,t.name,t.impl)}))}));var Cl=function e(){if(!(this instanceof e))return new e;this.length=0},Nl=Cl.prototype;Nl.instanceString=function(){return"stylesheet"},Nl.selector=function(e){return this[this.length++]={selector:e,properties:[]},this},Nl.css=function(e,t){var n=this.length-1;if(A(e))this[n].properties.push({name:e,value:t});else if(S(e))for(var r=e,i=Object.keys(r),a=0;a<i.length;a++){var o=i[a],s=r[o];if(null!=s){var l=io.properties[o]||io.properties[V(o)];if(null!=l){var u=l.name,c=s;this[n].properties.push({name:u,value:c})}}}return this},Nl.style=Nl.css,Nl.generateStyle=function(e){var t=new io(e);return this.appendToStyle(t)},Nl.appendToStyle=function(e){for(var t=0;t<this.length;t++){var n=this[t],r=n.selector,i=n.properties;e.selector(r);for(var a=0;a<i.length;a++){var o=i[a];e.css(o.name,o.value)}}return e};var Al=function(e){return void 0===e&&(e={}),S(e)?new uo(e):A(e)?Dl.apply(Dl,arguments):void 0};Al.use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(Al),e.apply(null,t),this},Al.warnings=function(e){return Ne(e)},Al.version="3.28.1",Al.stylesheet=Al.Stylesheet=Cl,e.exports=Al},5731:(e,t,n)=>{e.exports=n(4297)},4297:function(e,t){var n,r,i;(function(){var a,o,s,l,u,c,h,d,p,g,f,v,y,m,b;s=Math.floor,g=Math.min,o=function(e,t){return e<t?-1:e>t?1:0},p=function(e,t,n,r,i){var a;if(null==n&&(n=0),null==i&&(i=o),n<0)throw new Error("lo must be non-negative");for(null==r&&(r=e.length);n<r;)i(t,e[a=s((n+r)/2)])<0?r=a:n=a+1;return[].splice.apply(e,[n,n-n].concat(t)),t},c=function(e,t,n){return null==n&&(n=o),e.push(t),m(e,0,e.length-1,n)},u=function(e,t){var n,r;return null==t&&(t=o),n=e.pop(),e.length?(r=e[0],e[0]=n,b(e,0,t)):r=n,r},d=function(e,t,n){var r;return null==n&&(n=o),r=e[0],e[0]=t,b(e,0,n),r},h=function(e,t,n){var r;return null==n&&(n=o),e.length&&n(e[0],t)<0&&(t=(r=[e[0],t])[0],e[0]=r[1],b(e,0,n)),t},l=function(e,t){var n,r,i,a,l,u;for(null==t&&(t=o),a=function(){u=[];for(var t=0,n=s(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse(),l=[],r=0,i=a.length;r<i;r++)n=a[r],l.push(b(e,n,t));return l},y=function(e,t,n){var r;if(null==n&&(n=o),-1!==(r=e.indexOf(t)))return m(e,0,r,n),b(e,r,n)},f=function(e,t,n){var r,i,a,s,u;if(null==n&&(n=o),!(i=e.slice(0,t)).length)return i;for(l(i,n),a=0,s=(u=e.slice(t)).length;a<s;a++)r=u[a],h(i,r,n);return i.sort(n).reverse()},v=function(e,t,n){var r,i,a,s,c,h,d,f,v;if(null==n&&(n=o),10*t<=e.length){if(!(a=e.slice(0,t).sort(n)).length)return a;for(i=a[a.length-1],s=0,h=(d=e.slice(t)).length;s<h;s++)n(r=d[s],i)<0&&(p(a,r,0,null,n),a.pop(),i=a[a.length-1]);return a}for(l(e,n),v=[],c=0,f=g(t,e.length);0<=f?c<f:c>f;0<=f?++c:--c)v.push(u(e,n));return v},m=function(e,t,n,r){var i,a,s;for(null==r&&(r=o),i=e[n];n>t&&r(i,a=e[s=n-1>>1])<0;)e[n]=a,n=s;return e[n]=i},b=function(e,t,n){var r,i,a,s,l;for(null==n&&(n=o),i=e.length,l=t,a=e[t],r=2*t+1;r<i;)(s=r+1)<i&&!(n(e[r],e[s])<0)&&(r=s),e[t]=e[r],r=2*(t=r)+1;return e[t]=a,m(e,l,t,n)},a=function(){function e(e){this.cmp=null!=e?e:o,this.nodes=[]}return e.push=c,e.pop=u,e.replace=d,e.pushpop=h,e.heapify=l,e.updateItem=y,e.nlargest=f,e.nsmallest=v,e.prototype.push=function(e){return c(this.nodes,e,this.cmp)},e.prototype.pop=function(){return u(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return d(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return h(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return l(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return y(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return(t=new e).nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),r=[],void 0===(i="function"==typeof(n=function(){return a})?n.apply(t,r):n)||(e.exports=i)}).call(this)},3143:function(e){var t;t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26)}([function(e,t,n){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r},function(e,t,n){"use strict";var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){this.vGraphObject=e}},function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),l=n(4);function u(e,t,n,o){null==n&&null==o&&(o=t),r.call(this,o),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,this.rect=null!=n&&null!=t?new a(t.x,t.y,n.width,n.height):new a}for(var c in u.prototype=Object.create(r.prototype),r)u[c]=r[c];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(e){this.rect.width=e},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(e){this.rect.height=e},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},u.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},u.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},u.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},u.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach((function(r){if(r.target==e){if(r.source!=n)throw"Incorrect edge source!";t.push(r)}})),t},u.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach((function(r){if(r.source!=n&&r.target!=n)throw"Incorrect edge source and/or target";r.target!=e&&r.source!=e||t.push(r)})),t},u.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach((function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw"Incorrect incidency!";e.add(n.source)}})),e},u.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),n=0;n<t.length;n++)t[n].withChildren().forEach((function(t){e.add(t)}));return e},u.prototype.getNoOfChildren=function(){var e=0;if(null==this.child)e=1;else for(var t=this.child.getNodes(),n=0;n<t.length;n++)e+=t[n].getNoOfChildren();return 0==e&&(e=1),e},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},u.prototype.scatter=function(){var e,t,n=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY;e=o.WORLD_CENTER_X+s.nextDouble()*(r-n)+n;var i=-o.INITIAL_WORLD_BOUNDARY,a=o.INITIAL_WORLD_BOUNDARY;t=o.WORLD_CENTER_Y+s.nextDouble()*(a-i)+i,this.rect.x=e,this.rect.y=t},u.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var e=this.getChild();if(e.updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS){var t=e.getRight()-e.getLeft(),n=e.getBottom()-e.getTop();this.labelWidth>t&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new l(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=u},function(e,t,n){"use strict";function r(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r},function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),l=n(1),u=n(13),c=n(12),h=n(11);function d(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof o?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in d.prototype=Object.create(r.prototype),r)d[p]=r[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(e,t,n){if(null==t&&null==n){var r=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(t.owner!=n.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=n.owner?null:(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i)},d.prototype.remove=function(e){var t=e;if(e instanceof s){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=t.edges.slice(),r=n.length,i=0;i<r;i++)(a=n[i]).isInterGraph?this.graphManager.remove(a):a.source.owner.remove(a);if(-1==(o=this.nodes.indexOf(t)))throw"Node not in owner node list!";this.nodes.splice(o,1)}else if(e instanceof l){var a;if(null==(a=e))throw"Edge is null!";if(null==a.source||null==a.target)throw"Source and/or target is null!";if(null==a.source.owner||null==a.target.owner||a.source.owner!=this||a.target.owner!=this)throw"Source and/or target owner is invalid!";var o,u=a.source.edges.indexOf(a),c=a.target.edges.indexOf(a);if(!(u>-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(u,1),a.target!=a.source&&a.target.edges.splice(c,1),-1==(o=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(o,1)}},d.prototype.updateLeftTop=function(){for(var e,t,n,r=i.MAX_VALUE,a=i.MAX_VALUE,o=this.getNodes(),s=o.length,l=0;l<s;l++){var u=o[l];r>(e=u.getTop())&&(r=e),a>(t=u.getLeft())&&(a=t)}return r==i.MAX_VALUE?null:(n=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=a-n,this.top=r-n,new c(this.left,this.top))},d.prototype.updateBounds=function(e){for(var t,n,r,a,o,s=i.MAX_VALUE,l=-i.MAX_VALUE,c=i.MAX_VALUE,h=-i.MAX_VALUE,d=this.nodes,p=d.length,g=0;g<p;g++){var f=d[g];e&&null!=f.child&&f.updateBounds(),s>(t=f.getLeft())&&(s=t),l<(n=f.getRight())&&(l=n),c>(r=f.getTop())&&(c=r),h<(a=f.getBottom())&&(h=a)}var v=new u(s,c,l-s,h-c);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),o=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=v.x-o,this.right=v.x+v.width+o,this.top=v.y-o,this.bottom=v.y+v.height+o},d.calculateBounds=function(e){for(var t,n,r,a,o=i.MAX_VALUE,s=-i.MAX_VALUE,l=i.MAX_VALUE,c=-i.MAX_VALUE,h=e.length,d=0;d<h;d++){var p=e[d];o>(t=p.getLeft())&&(o=t),s<(n=p.getRight())&&(s=n),l>(r=p.getTop())&&(l=r),c<(a=p.getBottom())&&(c=a)}return new u(o,l,s-o,c-l)},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r<n;r++)e+=t[r].calcEstimatedSize();return this.estimatedSize=0==e?a.EMPTY_COMPOUND_NODE_SIZE:e/Math.sqrt(this.nodes.length),this.estimatedSize},d.prototype.updateConnected=function(){var e=this;if(0!=this.nodes.length){var t,n,r=new h,i=new Set,a=this.nodes[0];for(a.withChildren().forEach((function(e){r.push(e),i.add(e)}));0!==r.length;)for(var o=(t=(a=r.shift()).getEdges()).length,s=0;s<o;s++)null==(n=t[s].getOtherEndInGraph(a,this))||i.has(n)||n.withChildren().forEach((function(e){r.push(e),i.add(e)}));if(this.isConnected=!1,i.size>=this.nodes.length){var l=0;i.forEach((function(t){t.owner==e&&l++})),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},e.exports=d},function(e,t,n){"use strict";var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(null==n&&null==r&&null==i){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return e.parent=t,t.child=e,e}i=n,n=e;var a=(r=t).getOwner(),o=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==o||o.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var n,a=[],o=(a=a.concat(t.getEdges())).length,s=0;s<o;s++)n=a[s],t.remove(n);var l,u=[];for(o=(u=u.concat(t.getNodes())).length,s=0;s<o;s++)l=u[s],t.remove(l);t==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(t);this.graphs.splice(c,1),t.parent=null}else if(e instanceof i){if(null==(n=e))throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(null==n.source||null==n.target)throw"Source and/or target is null!";if(-1==n.source.edges.indexOf(n)||-1==n.target.edges.indexOf(n))throw"Source and/or target doesn't know this edge!";if(c=n.source.edges.indexOf(n),n.source.edges.splice(c,1),c=n.target.edges.indexOf(n),n.target.edges.splice(c,1),null==n.source.owner||null==n.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==n.source.owner.getGraphManager().edges.indexOf(n))throw"Not in owner graph manager's edge list!";c=n.source.owner.getGraphManager().edges.indexOf(n),n.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(null==this.allNodes){for(var e=[],t=this.getGraphs(),n=t.length,r=0;r<n;r++)e=e.concat(t[r].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(null==this.allEdges){for(var e=[],t=this.getGraphs(),n=(t.length,0);n<t.length;n++)e=e.concat(t[n].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,null==e.parent&&(e.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,t){if(null==e||null==t)throw"assert failed";if(e==t)return!0;for(var n,r=e.getOwner();null!=(n=r.getParent());){if(n==t)return!0;if(null==(r=n.getOwner()))break}for(r=t.getOwner();null!=(n=r.getParent());){if(n==e)return!0;if(null==(r=n.getOwner()))break}return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,t,n,r,i,a=this.getAllEdges(),o=a.length,s=0;s<o;s++)if(t=(e=a[s]).source,n=e.target,e.lca=null,e.sourceInLca=t,e.targetInLca=n,t!=n){for(r=t.getOwner();null==e.lca;){for(e.targetInLca=n,i=n.getOwner();null==e.lca;){if(i==r){e.lca=i;break}if(i==this.rootGraph)break;if(null!=e.lca)throw"assert failed";e.targetInLca=i.getParent(),i=e.targetInLca.getOwner()}if(r==this.rootGraph)break;null==e.lca&&(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(null==e.lca)throw"assert failed"}else e.lca=t.getOwner()},a.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();for(var n=e.getOwner();null!=n;){for(var r=t.getOwner();null!=r;){if(r==n)return r;r=r.getParent().getOwner()}n=n.getParent().getOwner()}return n},a.prototype.calcInclusionTreeDepths=function(e,t){var n;null==e&&null==t&&(e=this.rootGraph,t=1);for(var r=e.getNodes(),i=r.length,a=0;a<i;a++)(n=r[a]).inclusionTreeDepth=t,null!=n.child&&this.calcInclusionTreeDepths(n.child,t+1)},a.prototype.includesInvalidEdge=function(){for(var e,t=this.edges.length,n=0;n<t;n++)if(e=this.edges[n],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},e.exports=a},function(e,t,n){"use strict";var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=3*i.MAX_NODE_DISPLACEMENT_INCREMENTAL,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i},function(e,t,n){"use strict";var r=n(12);function i(){}i.calcSeparationAmount=function(e,t,n,r){if(!e.intersects(t))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(e,t,i),n[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),n[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]<s?s=n[0]:o=n[1],n[0]=-1*i[0]*(s/2+r),n[1]=-1*i[1]*(o/2+r)},i.decideDirectionsForOverlappingNodes=function(e,t,n){e.getCenterX()<t.getCenterX()?n[0]=-1:n[0]=1,e.getCenterY()<t.getCenterY()?n[1]=-1:n[1]=1},i.getIntersection2=function(e,t,n){var r=e.getCenterX(),i=e.getCenterY(),a=t.getCenterX(),o=t.getCenterY();if(e.intersects(t))return n[0]=r,n[1]=i,n[2]=a,n[3]=o,!0;var s=e.getX(),l=e.getY(),u=e.getRight(),c=e.getX(),h=e.getBottom(),d=e.getRight(),p=e.getWidthHalf(),g=e.getHeightHalf(),f=t.getX(),v=t.getY(),y=t.getRight(),m=t.getX(),b=t.getBottom(),x=t.getRight(),w=t.getWidthHalf(),E=t.getHeightHalf(),_=!1,T=!1;if(r===a){if(i>o)return n[0]=r,n[1]=l,n[2]=a,n[3]=b,!1;if(i<o)return n[0]=r,n[1]=h,n[2]=a,n[3]=v,!1}else if(i===o){if(r>a)return n[0]=s,n[1]=i,n[2]=y,n[3]=o,!1;if(r<a)return n[0]=u,n[1]=i,n[2]=f,n[3]=o,!1}else{var D=e.height/e.width,C=t.height/t.width,N=(o-i)/(a-r),A=void 0,L=void 0,k=void 0,S=void 0,I=void 0,M=void 0;if(-D===N?r>a?(n[0]=c,n[1]=h,_=!0):(n[0]=u,n[1]=l,_=!0):D===N&&(r>a?(n[0]=s,n[1]=l,_=!0):(n[0]=d,n[1]=h,_=!0)),-C===N?a>r?(n[2]=m,n[3]=b,T=!0):(n[2]=y,n[3]=v,T=!0):C===N&&(a>r?(n[2]=f,n[3]=v,T=!0):(n[2]=x,n[3]=b,T=!0)),_&&T)return!1;if(r>a?i>o?(A=this.getCardinalDirection(D,N,4),L=this.getCardinalDirection(C,N,2)):(A=this.getCardinalDirection(-D,N,3),L=this.getCardinalDirection(-C,N,1)):i>o?(A=this.getCardinalDirection(-D,N,1),L=this.getCardinalDirection(-C,N,3)):(A=this.getCardinalDirection(D,N,2),L=this.getCardinalDirection(C,N,4)),!_)switch(A){case 1:S=l,k=r+-g/N,n[0]=k,n[1]=S;break;case 2:k=d,S=i+p*N,n[0]=k,n[1]=S;break;case 3:S=h,k=r+g/N,n[0]=k,n[1]=S;break;case 4:k=c,S=i+-p*N,n[0]=k,n[1]=S}if(!T)switch(L){case 1:M=v,I=a+-E/N,n[2]=I,n[3]=M;break;case 2:I=x,M=o+w*N,n[2]=I,n[3]=M;break;case 3:M=b,I=a+E/N,n[2]=I,n[3]=M;break;case 4:I=m,M=o+-w*N,n[2]=I,n[3]=M}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(null==i)return this.getIntersection2(e,t,n);var a,o,s,l,u,c,h,d=e.x,p=e.y,g=t.x,f=t.y,v=n.x,y=n.y,m=i.x,b=i.y;return 0==(h=(a=f-p)*(l=v-m)-(o=b-y)*(s=d-g))?null:new r((s*(c=m*y-v*b)-l*(u=g*p-d*f))/h,(o*u-a*c)/h)},i.angleOfVector=function(e,t,n,r){var i=void 0;return e!==n?(i=Math.atan((r-t)/(n-e)),n<e?i+=Math.PI:r<t&&(i+=this.TWO_PI)):i=r<t?this.ONE_AND_HALF_PI:this.HALF_PI,i},i.doIntersect=function(e,t,n,r){var i=e.x,a=e.y,o=t.x,s=t.y,l=n.x,u=n.y,c=r.x,h=r.y,d=(o-i)*(h-u)-(c-l)*(s-a);if(0===d)return!1;var p=((h-u)*(c-i)+(l-c)*(h-a))/d,g=((a-s)*(c-i)+(o-i)*(h-a))/d;return 0<p&&p<1&&0<g&&g<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i},function(e,t,n){"use strict";function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r},function(e,t,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){return{value:e,next:null,prev:null}},a=function(e,t,n,r){return null!==e?e.next=t:r.head=t,null!==n?n.prev=t:r.tail=t,t.prev=e,t.next=n,r.length++,t},o=function(e,t){var n=e.prev,r=e.next;return null!==n?n.next=r:t.head=r,null!==r?r.prev=n:t.tail=n,e.prev=e.next=null,t.length--,e},s=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.length=0,this.head=null,this.tail=null,null!=t&&t.forEach((function(e){return n.push(e)}))}return r(e,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(e,t){return a(t.prev,i(e),t,this)}},{key:"insertAfter",value:function(e,t){return a(t,i(e),t.next,this)}},{key:"insertNodeBefore",value:function(e,t){return a(t.prev,e,t,this)}},{key:"insertNodeAfter",value:function(e,t){return a(t,e,t.next,this)}},{key:"push",value:function(e){return a(this.tail,i(e),null,this)}},{key:"unshift",value:function(e){return a(null,i(e),this.head,this)}},{key:"remove",value:function(e){return o(e,this)}},{key:"pop",value:function(){return o(this.tail,this).value}},{key:"popNode",value:function(){return o(this.tail,this)}},{key:"shift",value:function(){return o(this.head,this).value}},{key:"shiftNode",value:function(){return o(this.head,this)}},{key:"get_object_at",value:function(e){if(e<=this.length()){for(var t=1,n=this.head;t<e;)n=n.next,t++;return n.value}}},{key:"set_object_at",value:function(e,t){if(e<=this.length()){for(var n=1,r=this.head;n<e;)r=r.next,n++;r.value=t}}}]),e}();e.exports=s},function(e,t,n){"use strict";function r(e,t,n){this.x=null,this.y=null,null==e&&null==t&&null==n?(this.x=0,this.y=0):"number"==typeof e&&"number"==typeof t&&null==n?(this.x=e,this.y=t):"Point"==e.constructor.name&&null==t&&null==n&&(n=e,this.x=n.x,this.y=n.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(e,t,n){"Point"==e.constructor.name&&null==t&&null==n?(n=e,this.setLocation(n.x,n.y)):"number"==typeof e&&"number"==typeof t&&null==n&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},r.prototype.move=function(e,t){this.x=e,this.y=t},r.prototype.translate=function(e,t){this.x+=e,this.y+=t},r.prototype.equals=function(e){if("Point"==e.constructor.name){var t=e;return this.x==t.x&&this.y==t.y}return this==e},r.prototype.toString=function(){return(new r).constructor.name+"[x="+this.x+",y="+this.y+"]"},e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){this.x=0,this.y=0,this.width=0,this.height=0,null!=e&&null!=t&&null!=n&&null!=r&&(this.x=e,this.y=t,this.width=n,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(e){this.x=e},r.prototype.getY=function(){return this.y},r.prototype.setY=function(e){this.y=e},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},e.exports=r},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function i(){}i.lastID=0,i.createID=function(e){return i.isPrimitive(e)?e:(null!=e.uniqueID||(e.uniqueID=i.getString(),i.lastID++),e.uniqueID)},i.getString=function(e){return null==e&&(e=i.lastID),"Object#"+e},i.isPrimitive=function(e){var t=void 0===e?"undefined":r(e);return null==e||"object"!=t&&"function"!=t},e.exports=i},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i=n(0),a=n(6),o=n(3),s=n(1),l=n(5),u=n(4),c=n(17),h=n(27);function d(e){h.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=e&&(this.isRemoteUse=e)}d.RANDOM_SEED=1,d.prototype=Object.create(h.prototype),d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},d.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},d.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},d.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e,e},d.prototype.newGraph=function(e){return new l(null,this.graphManager,e)},d.prototype.newNode=function(e){return new o(this.graphManager,e)},d.prototype.newEdge=function(e){return new s(null,null,e)},d.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},d.prototype.runLayout=function(){var e;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),e=!this.checkLayoutSuccess()&&this.layout(),"during"!==i.ANIMATE&&(e&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},d.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},d.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];var n=this.graphManager.getRoot().getNodes();for(t=0;t<n.length;t++)n[t];this.update(this.graphManager.getRoot())}},d.prototype.update=function(e){if(null==e)this.update2();else if(e instanceof o){var t=e;if(null!=t.getChild())for(var n=t.getChild().getNodes(),r=0;r<n.length;r++)update(n[r]);null!=t.vGraphObject&&t.vGraphObject.update(t)}else if(e instanceof s){var i=e;null!=i.vGraphObject&&i.vGraphObject.update(i)}else if(e instanceof l){var a=e;null!=a.vGraphObject&&a.vGraphObject.update(a)}},d.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},d.prototype.transform=function(e){if(null==e)this.transform(new u(0,0));else{var t=new c,n=this.graphManager.getRoot().updateLeftTop();if(null!=n){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(n.x),t.setDeviceOrgY(n.y);for(var r=this.getAllNodes(),i=0;i<r.length;i++)r[i].transform(t)}}},d.prototype.positionNodesRandomly=function(e){if(null==e)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,n,r=e.getNodes(),i=0;i<r.length;i++)null==(n=(t=r[i]).getChild())||0==n.getNodes().length?t.scatter():(this.positionNodesRandomly(n),t.updateBounds())},d.prototype.getFlatForest=function(){for(var e=[],t=!0,n=this.graphManager.getRoot().getNodes(),i=!0,a=0;a<n.length;a++)null!=n[a].getChild()&&(i=!1);if(!i)return e;var o=new Set,s=[],l=new Map,u=[];for(u=u.concat(n);u.length>0&&t;){for(s.push(u[0]);s.length>0&&t;){var c=s[0];s.splice(0,1),o.add(c);var h=c.getEdges();for(a=0;a<h.length;a++){var d=h[a].getOtherEnd(c);if(l.get(c)!=d){if(o.has(d)){t=!1;break}s.push(d),l.set(d,c)}}}if(t){var p=[].concat(r(o));for(e.push(p),a=0;a<p.length;a++){var g=p[a],f=u.indexOf(g);f>-1&&u.splice(f,1)}o=new Set,l=new Map}else e=[]}return e},d.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i<e.bendpoints.length;i++){var a=this.newNode(null);a.setRect(new Point(0,0),new Dimension(1,1)),r.add(a);var o=this.newEdge(null);this.graphManager.add(o,n,a),t.add(a),n=a}return o=this.newEdge(null),this.graphManager.add(o,n,e.target),this.edgeToDummyNodes.set(e,t),e.isInterGraph()?this.graphManager.remove(e):r.remove(e),t},d.prototype.createBendpointsFromDummyNodes=function(){var e=[];e=e.concat(this.graphManager.getAllEdges()),e=[].concat(r(this.edgeToDummyNodes.keys())).concat(e);for(var t=0;t<e.length;t++){var n=e[t];if(n.bendpoints.length>0){for(var i=this.edgeToDummyNodes.get(n),a=0;a<i.length;a++){var o=i[a],s=new u(o.getCenterX(),o.getCenterY()),l=n.bendpoints.get(a);l.x=s.x,l.y=s.y,o.getOwner().remove(o)}this.graphManager.add(n,n.source,n.target)}}},d.transform=function(e,t,n,r){if(null!=n&&null!=r){var i=t;return e<=50?i-=(t-t/n)/50*(50-e):i+=(t*r-t)/50*(e-50),i}var a,o;return e<=50?(a=9*t/500,o=t/10):(a=9*t/50,o=-8*t),a*e+o},d.findCenterOfTree=function(e){var t=[];t=t.concat(e);var n=[],r=new Map,i=!1,a=null;1!=t.length&&2!=t.length||(i=!0,a=t[0]);for(var o=0;o<t.length;o++){var s=(c=t[o]).getNeighborsList().size;r.set(c,c.getNeighborsList().size),1==s&&n.push(c)}var l=[];for(l=l.concat(n);!i;){var u=[];for(u=u.concat(l),l=[],o=0;o<t.length;o++){var c=t[o],h=t.indexOf(c);h>=0&&t.splice(h,1),c.getNeighborsList().forEach((function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;1==t&&l.push(e),r.set(e,t)}}))}n=n.concat(l),1!=t.length&&2!=t.length||(i=!0,a=t[0])}return a},d.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=d},function(e,t,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},e.exports=r},function(e,t,n){"use strict";var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return 0!=n&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return 0!=n&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return 0!=n&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return 0!=n&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i},function(e,t,n){"use strict";var r=n(15),i=n(7),a=n(0),o=n(8),s=n(9);function l(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,o,s,l=this.getGraphManager().getAllEdges(),u=0;u<l.length;u++)(e=l[u]).idealLength=this.idealEdgeLength,e.isInterGraph&&(n=e.getSource(),r=e.getTarget(),o=e.getSourceInLca().getEstimatedSize(),s=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=o+s-2*a.SIMPLE_NODE_SIZE),t=e.getLca().getInclusionTreeDepth(),e.idealLength+=i.DEFAULT_EDGE_LENGTH*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*t))},l.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>i.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),n=0;n<t.length;n++)e=t[n],this.calcSpringForce(e,e.idealLength)},l.prototype.calcRepulsionForces=function(){var e,t,n,r,a,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&o&&this.updateGrid(),a=new Set,e=0;e<l.length;e++)n=l[e],this.calculateRepulsionForceOfANode(n,a,o,s),a.add(n);else for(e=0;e<l.length;e++)for(n=l[e],t=e+1;t<l.length;t++)r=l[t],n.getOwner()==r.getOwner()&&this.calcRepulsionForce(n,r)},l.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),n=0;n<t.length;n++)e=t[n],this.calcGravitationalForce(e)},l.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t=0;t<e.length;t++)e[t].move()},l.prototype.calcSpringForce=function(e,t){var n,r,i,a,o=e.getSource(),s=e.getTarget();if(this.uniformLeafNodeSizes&&null==o.getChild()&&null==s.getChild())e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;0!=(n=e.getLength())&&(i=(r=this.springConstant*(n-t))*(e.lengthX/n),a=r*(e.lengthY/n),o.springForceX+=i,o.springForceY+=a,s.springForceX-=i,s.springForceY-=a)},l.prototype.calcRepulsionForce=function(e,t){var n,r,a,l,u,c,h,d=e.getRect(),p=t.getRect(),g=new Array(2),f=new Array(4);if(d.intersects(p)){o.calcSeparationAmount(d,p,g,i.DEFAULT_EDGE_LENGTH/2),c=2*g[0],h=2*g[1];var v=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren);e.repulsionForceX-=v*c,e.repulsionForceY-=v*h,t.repulsionForceX+=v*c,t.repulsionForceY+=v*h}else this.uniformLeafNodeSizes&&null==e.getChild()&&null==t.getChild()?(n=p.getCenterX()-d.getCenterX(),r=p.getCenterY()-d.getCenterY()):(o.getIntersection(d,p,f),n=f[2]-f[0],r=f[3]-f[1]),Math.abs(n)<i.MIN_REPULSION_DIST&&(n=s.sign(n)*i.MIN_REPULSION_DIST),Math.abs(r)<i.MIN_REPULSION_DIST&&(r=s.sign(r)*i.MIN_REPULSION_DIST),a=n*n+r*r,l=Math.sqrt(a),c=(u=this.repulsionConstant*e.noOfChildren*t.noOfChildren/a)*n/l,h=u*r/l,e.repulsionForceX-=c,e.repulsionForceY-=h,t.repulsionForceX+=c,t.repulsionForceY+=h},l.prototype.calcGravitationalForce=function(e){var t,n,r,i,a,o,s,l;n=((t=e.getOwner()).getRight()+t.getLeft())/2,r=(t.getTop()+t.getBottom())/2,i=e.getCenterX()-n,a=e.getCenterY()-r,o=Math.abs(i)+e.getWidth()/2,s=Math.abs(a)+e.getHeight()/2,e.getOwner()==this.graphManager.getRoot()?(o>(l=t.getEstimatedSize()*this.gravityRangeFactor)||s>l)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a):(o>(l=t.getEstimatedSize()*this.compoundGravityRangeFactor)||s>l)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},l.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},l.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),n=0;n<t.length;n++)(e=t[n]).noOfChildren=e.getNoOfChildren()},l.prototype.calcGrid=function(e){var t,n;t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange));for(var r=new Array(t),i=0;i<t;i++)r[i]=new Array(n);for(i=0;i<t;i++)for(var a=0;a<n;a++)r[i][a]=new Array;return r},l.prototype.addNodeToGrid=function(e,t,n){var r,i,a,o;r=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),i=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-n)/this.repulsionRange)),o=parseInt(Math.floor((e.getRect().height+e.getRect().y-n)/this.repulsionRange));for(var s=r;s<=i;s++)for(var l=a;l<=o;l++)this.grid[s][l].push(e),e.setGridCoordinates(r,i,a,o)},l.prototype.updateGrid=function(){var e,t,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<n.length;e++)t=n[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},l.prototype.calculateRepulsionForceOfANode=function(e,t,n,r){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&n||r){var a,o=new Set;e.surrounding=new Array;for(var s=this.grid,l=e.startX-1;l<e.finishX+2;l++)for(var u=e.startY-1;u<e.finishY+2;u++)if(!(l<0||u<0||l>=s.length||u>=s[0].length))for(var c=0;c<s[l][u].length;c++)if(a=s[l][u][c],e.getOwner()==a.getOwner()&&e!=a&&!t.has(a)&&!o.has(a)){var h=Math.abs(e.getCenterX()-a.getCenterX())-(e.getWidth()/2+a.getWidth()/2),d=Math.abs(e.getCenterY()-a.getCenterY())-(e.getHeight()/2+a.getHeight()/2);h<=this.repulsionRange&&d<=this.repulsionRange&&o.add(a)}e.surrounding=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(o))}for(l=0;l<e.surrounding.length;l++)this.calcRepulsionForce(e,e.surrounding[l])},l.prototype.calcRepulsionRange=function(){return 0},e.exports=l},function(e,t,n){"use strict";var r=n(1),i=n(7);function a(e,t,n){r.call(this,e,t,n),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];e.exports=a},function(e,t,n){"use strict";var r=n(3);function i(e,t,n,i){r.call(this,e,t,n,i),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];i.prototype.setGridCoordinates=function(e,t,n,r){this.startX=e,this.finishX=t,this.startY=n,this.finishY=r},e.exports=i},function(e,t,n){"use strict";function r(e,t){this.width=0,this.height=0,null!==e&&null!==t&&(this.height=t,this.width=e)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},e.exports=r},function(e,t,n){"use strict";var r=n(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(e,t){var n=r.createID(e);this.contains(n)||(this.map[n]=t,this.keys.push(e))},i.prototype.contains=function(e){return r.createID(e),null!=this.map[e]},i.prototype.get=function(e){var t=r.createID(e);return this.map[t]},i.prototype.keySet=function(){return this.keys},e.exports=i},function(e,t,n){"use strict";var r=n(14);function i(){this.set={}}i.prototype.add=function(e){var t=r.createID(e);this.contains(t)||(this.set[t]=e)},i.prototype.remove=function(e){delete this.set[r.createID(e)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(e){return this.set[r.createID(e)]==e},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),n=t.length,r=0;r<n;r++)e.push(this.set[t[r]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(e){for(var t=e.length,n=0;n<t;n++){var r=e[n];this.add(r)}},e.exports=i},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(11),a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),null===n&&void 0===n||(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=t instanceof i?t.size():t.length,this._quicksort(t,0,r-1)}return r(e,[{key:"_quicksort",value:function(e,t,n){if(t<n){var r=this._partition(e,t,n);this._quicksort(e,t,r),this._quicksort(e,r+1,n)}}},{key:"_partition",value:function(e,t,n){for(var r=this._get(e,t),i=t,a=n;;){for(;this.compareFunction(r,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,i),r);)i++;if(!(i<a))return a;this._swap(e,i,a),i++,a--}}},{key:"_get",value:function(e,t){return e instanceof i?e.get_object_at(t):e[t]}},{key:"_set",value:function(e,t,n){e instanceof i?e.set_object_at(t,n):e[t]=n}},{key:"_swap",value:function(e,t,n){var r=this._get(e,t);this._set(e,t,this._get(e,n)),this._set(e,n,r)}},{key:"_defaultCompareFunction",value:function(e,t){return t>e}}]),e}();e.exports=a},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=a,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[o][s]=0}this.tracebackGrid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.tracebackGrid[l]=new Array(this.jMax);for(var u=0;u<this.jMax;u++)this.tracebackGrid[l][u]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var r=1;r<this.jMax;r++){var i=[this.sequence1[n-1]===this.sequence2[r-1]?this.grid[n-1][r-1]+this.match_score:this.grid[n-1][r-1]+this.mismatch_penalty,this.grid[n-1][r]+this.gap_penalty,this.grid[n][r-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[n][r]=i[a[0]],this.tracebackGrid[n][r]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var t=e[0],n=this.tracebackGrid[t.pos[0]][t.pos[1]];n[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),n[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:"-"+t.seq2}),n[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:"-"+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),0===t.pos[0]&&0===t.pos[1]&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,t){for(var n=[],r=-1;-1!==(r=e.indexOf(t,r+1));)n.push(r);return n}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),e}();e.exports=i},function(e,t,n){"use strict";var r=function(){};r.FDLayout=n(18),r.FDLayoutConstants=n(7),r.FDLayoutEdge=n(19),r.FDLayoutNode=n(20),r.DimensionD=n(21),r.HashMap=n(22),r.HashSet=n(23),r.IGeometry=n(8),r.IMath=n(9),r.Integer=n(10),r.Point=n(12),r.PointD=n(4),r.RandomSeed=n(16),r.RectangleD=n(13),r.Transform=n(17),r.UniqueIDGeneretor=n(14),r.Quicksort=n(24),r.LinkedList=n(11),r.LGraphObject=n(2),r.LGraph=n(5),r.LEdge=n(1),r.LGraphManager=n(6),r.LNode=n(3),r.Layout=n(15),r.LayoutConstants=n(0),r.NeedlemanWunsch=n(25),e.exports=r},function(e,t,n){"use strict";function r(){this.listeners=[]}var i=r.prototype;i.addListener=function(e,t){this.listeners.push({event:e,callback:t})},i.removeListener=function(e,t){for(var n=this.listeners.length;n>=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];e===r.event&&r.callback(t)}},e.exports=r}])},e.exports=t()},1549:(e,t,n)=>{var r=n(2032),i=n(3862),a=n(6721),o=n(2749),s=n(5749);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=o,l.prototype.set=s,e.exports=l},79:(e,t,n)=>{var r=n(3702),i=n(80),a=n(4739),o=n(8655),s=n(1175);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=o,l.prototype.set=s,e.exports=l},8223:(e,t,n)=>{var r=n(6110)(n(9325),"Map");e.exports=r},3661:(e,t,n)=>{var r=n(3040),i=n(7670),a=n(289),o=n(4509),s=n(2949);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=o,l.prototype.set=s,e.exports=l},1873:(e,t,n)=>{var r=n(9325).Symbol;e.exports=r},4932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},6547:(e,t,n)=>{var r=n(3360),i=n(5288),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];a.call(e,t)&&i(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},8406:(e,t,n)=>{var r=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},3360:(e,t,n)=>{var r=n(3243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},2184:(e,t,n)=>{var r=n(1769),i=n(7797);e.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n<a;)e=e[i(t[n++])];return n&&n==a?e:void 0}},2552:(e,t,n)=>{var r=n(1873),i=n(659),a=n(9350),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):a(e)}},5083:(e,t,n)=>{var r=n(9501),i=n(7296),a=n(3805),o=n(7473),s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,h=u.hasOwnProperty,d=RegExp("^"+c.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||i(e))&&(r(e)?d:s).test(o(e))}},3170:(e,t,n)=>{var r=n(6547),i=n(1769),a=n(361),o=n(3805),s=n(7797);e.exports=function(e,t,n,l){if(!o(e))return e;for(var u=-1,c=(t=i(t,e)).length,h=c-1,d=e;null!=d&&++u<c;){var p=s(t[u]),g=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(u!=h){var f=d[p];void 0===(g=l?l(f,p,d):void 0)&&(g=o(f)?f:a(t[u+1])?[]:{})}r(d,p,g),d=d[p]}return e}},7556:(e,t,n)=>{var r=n(1873),i=n(4932),a=n(6449),o=n(4394),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return i(t,e)+"";if(o(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},4128:(e,t,n)=>{var r=n(1800),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},1769:(e,t,n)=>{var r=n(6449),i=n(8586),a=n(1802),o=n(3222);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:a(o(e))}},3007:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},5481:(e,t,n)=>{var r=n(9325)["__core-js_shared__"];e.exports=r},3243:(e,t,n)=>{var r=n(6110),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},4840:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},2651:(e,t,n)=>{var r=n(4218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},6110:(e,t,n)=>{var r=n(5083),i=n(392);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},659:(e,t,n)=>{var r=n(1873),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},2032:(e,t,n)=>{var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6721:(e,t,n)=>{var r=n(1042),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},2749:(e,t,n)=>{var r=n(1042),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},5749:(e,t,n)=>{var r=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},8586:(e,t,n)=>{var r=n(6449),i=n(4394),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(o.test(e)||!a.test(e)||null!=t&&e in Object(t))}},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7296:(e,t,n)=>{var r,i=n(5481),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},80:(e,t,n)=>{var r=n(8406),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},4739:(e,t,n)=>{var r=n(8406);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},8655:(e,t,n)=>{var r=n(8406);e.exports=function(e){return r(this.__data__,e)>-1}},1175:(e,t,n)=>{var r=n(8406);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},3040:(e,t,n)=>{var r=n(1549),i=n(79),a=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},7670:(e,t,n)=>{var r=n(2651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},289:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},4509:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},2949:(e,t,n)=>{var r=n(2651);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},2224:(e,t,n)=>{var r=n(104);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},1042:(e,t,n)=>{var r=n(6110)(Object,"create");e.exports=r},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9325:(e,t,n)=>{var r=n(4840),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();e.exports=a},1802:(e,t,n)=>{var r=n(2224),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(a,"$1"):n||e)})),t}));e.exports=o},7797:(e,t,n)=>{var r=n(4394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},1800:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},8221:(e,t,n)=>{var r=n(3805),i=n(124),a=n(9374),o=Math.max,s=Math.min;e.exports=function(e,t,n){var l,u,c,h,d,p,g=0,f=!1,v=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=l,r=u;return l=u=void 0,g=t,h=e.apply(r,n)}function b(e){var n=e-p;return void 0===p||n>=t||n<0||v&&e-g>=c}function x(){var e=i();if(b(e))return w(e);d=setTimeout(x,function(e){var n=t-(e-p);return v?s(n,c-(e-g)):n}(e))}function w(e){return d=void 0,y&&l?m(e):(l=u=void 0,h)}function E(){var e=i(),n=b(e);if(l=arguments,u=this,p=e,n){if(void 0===d)return function(e){return g=e,d=setTimeout(x,t),f?m(e):h}(p);if(v)return clearTimeout(d),d=setTimeout(x,t),m(p)}return void 0===d&&(d=setTimeout(x,t)),h}return t=a(t)||0,r(n)&&(f=!!n.leading,c=(v="maxWait"in n)?o(a(n.maxWait)||0,t):c,y="trailing"in n?!!n.trailing:y),E.cancel=function(){void 0!==d&&clearTimeout(d),g=0,l=p=u=d=void 0},E.flush=function(){return void 0===d?h:w(i())},E}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},8156:(e,t,n)=>{var r=n(2184);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},6449:e=>{var t=Array.isArray;e.exports=t},9501:(e,t,n)=>{var r=n(2552),i=n(3805);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4394:(e,t,n)=>{var r=n(2552),i=n(346);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},104:(e,t,n)=>{var r=n(3661);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},124:(e,t,n)=>{var r=n(9325);e.exports=function(){return r.Date.now()}},3560:(e,t,n)=>{var r=n(3170);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},9374:(e,t,n)=>{var r=n(4128),i=n(3805),a=n(4394),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):o.test(e)?NaN:+e}},2072:(e,t,n)=>{var r=n(4932),i=n(3007),a=n(6449),o=n(4394),s=n(1802),l=n(7797),u=n(3222);e.exports=function(e){return a(e)?r(e,l):o(e)?[e]:i(s(u(e)))}},3222:(e,t,n)=>{var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},3771:(e,t,n)=>{"use strict";n.d(t,{diagram:()=>w});var r=n(6257),i=n(4726),a=n(3457),o=n(6312),s=n(358),l=n(3219),u=n(8041),c=n(5263),h=(n(4353),n(6750),n(2838),function(){var e=function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},t=[1,4],n=[1,13],r=[1,12],i=[1,15],a=[1,16],o=[1,20],s=[1,19],l=[6,7,8],u=[1,26],c=[1,24],h=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],g=[1,33],f=[1,34],v=[1,6,7,11,13,15,16,19,22],y={trace:function(){},yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:r.getLogger().trace("Icon: ",a[s]),r.decorateNode({icon:a[s]});break;case 17:case 21:r.decorateNode({class:a[s]});break;case 18:r.getLogger().trace("SPACELIST");break;case 19:r.getLogger().trace("Node: ",a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:r.decorateNode({icon:a[s]});break;case 25:r.getLogger().trace("node found ..",a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace("node found ..",a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])}}},table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},{6:n,9:22,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},{6:u,7:c,10:23,11:h},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:s}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:c,10:32,11:h},{1:[2,7],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},e(p,[2,14],{7:g,11:f}),e(v,[2,8]),e(v,[2,9]),e(v,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(p,[2,13],{7:g,11:f}),e(v,[2,11]),e(v,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},parse:function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",l=0,u=0,c=a.slice.call(arguments,1),h=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);h.setInput(e,d.yy),d.yy.lexer=h,d.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var g=h.yylloc;a.push(g);var f=h.options&&h.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var v,y,m,b,x,w,E,_,T,D={};;){if(y=n[n.length-1],this.defaultActions[y]?m=this.defaultActions[y]:(null==v&&(T=void 0,"number"!=typeof(T=r.pop()||h.lex()||1)&&(T instanceof Array&&(T=(r=T).pop()),T=t.symbols_[T]||T),v=T),m=o[y]&&o[y][v]),void 0===m||!m.length||!m[0]){var C="";for(x in _=[],o[y])this.terminals_[x]&&x>2&&_.push("'"+this.terminals_[x]+"'");C=h.showPosition?"Parse error on line "+(l+1)+":\n"+h.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==v?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(C,{text:h.match,token:this.terminals_[v]||v,line:h.yylineno,loc:g,expected:_})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+v);switch(m[0]){case 1:n.push(v),i.push(h.yytext),a.push(h.yylloc),n.push(m[1]),v=null,u=h.yyleng,s=h.yytext,l=h.yylineno,g=h.yylloc;break;case 2:if(w=this.productions_[m[1]][1],D.$=i[i.length-w],D._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},f&&(D._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),void 0!==(b=this.performAction.apply(D,[s,u,l,d.yy,m[1],i,a].concat(c))))return b;w&&(n=n.slice(0,-1*w*2),i=i.slice(0,-1*w),a=a.slice(0,-1*w)),n.push(this.productions_[m[1]][0]),i.push(D.$),a.push(D._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},m={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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 i=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===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>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(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,t,n,r){switch(n){case 0:return e.getLogger().trace("Found comment",t.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return e.getLogger().trace("Long description:",t.yytext),20}},rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};function b(){this.yy={}}return y.lexer=m,b.prototype=y,y.Parser=b,new b}());h.parser=h;const d=h;let p=[],g=0,f={};const v={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},y={clear:()=>{p=[],g=0,f={}},addNode:(e,t,n,i)=>{var a,o;r.l.info("addNode",e,t,n,i);const s=(0,r.c)();let l=(null==(a=s.mindmap)?void 0:a.padding)??r.B.mindmap.padding;switch(i){case v.ROUNDED_RECT:case v.RECT:case v.HEXAGON:l*=2}const u={id:g++,nodeId:(0,r.d)(t,s),level:e,descr:(0,r.d)(n,s),type:i,children:[],width:(null==(o=s.mindmap)?void 0:o.maxNodeWidth)??r.B.mindmap.maxNodeWidth,padding:l},c=function(e){for(let t=p.length-1;t>=0;t--)if(p[t].level<e)return p[t];return null}(e);if(c)c.children.push(u),p.push(u);else{if(0!==p.length)throw new Error('There can be only one root. No parent could be found for ("'+u.descr+'")');p.push(u)}},getMindmap:()=>p.length>0?p[0]:null,nodeType:v,getType:(e,t)=>{switch(r.l.debug("In get type",e,t),e){case"[":return v.RECT;case"(":return")"===t?v.ROUNDED_RECT:v.CLOUD;case"((":return v.CIRCLE;case")":return v.CLOUD;case"))":return v.BANG;case"{{":return v.HEXAGON;default:return v.DEFAULT}},setElementForId:(e,t)=>{f[e]=t},decorateNode:e=>{if(!e)return;const t=(0,r.c)(),n=p[p.length-1];e.icon&&(n.icon=(0,r.d)(e.icon,t)),e.class&&(n.class=(0,r.d)(e.class,t))},type2Str:e=>{switch(e){case v.DEFAULT:return"no-border";case v.RECT:return"rect";case v.ROUNDED_RECT:return"rounded-rect";case v.CIRCLE:return"circle";case v.CLOUD:return"cloud";case v.BANG:return"bang";case v.HEXAGON:return"hexgon";default:return"no-border"}},getLogger:()=>r.l,getElementById:e=>f[e]};function m(e,t,n,i,a){!function(e,t,n,i,a){const o=a.htmlLabels,l=i%11,u=t.append("g");n.section=l;let c="section-"+l;l<0&&(c+=" section-root"),u.attr("class",(n.class?n.class+" ":"")+"mindmap-node "+c);const h=u.append("g"),d=u.append("g"),p=n.descr.replace(/(<br\/*>)/g,"\n");(0,s.a)(d,p,{useHtmlLabels:o,width:n.width,classes:"mindmap-node-label"}),o||d.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const g=d.node().getBBox(),[f]=(0,r.D)(a.fontSize);if(n.height=g.height+1.1*f*.5+n.padding,n.width=g.width+2*n.padding,n.icon)if(n.type===e.nodeType.CIRCLE)n.height+=50,n.width+=50,u.append("foreignObject").attr("height","50px").attr("width",n.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+l+" "+n.icon),d.attr("transform","translate("+n.width/2+", "+(n.height/2-1.5*n.padding)+")");else{n.width+=50;const e=n.height;n.height=Math.max(e,60);const t=Math.abs(n.height-e);u.append("foreignObject").attr("width","60px").attr("height",n.height).attr("style","text-align: center;margin-top:"+t/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+l+" "+n.icon),d.attr("transform","translate("+(25+n.width/2)+", "+(t/2+n.padding/2)+")")}else if(o){const e=(n.width-g.width)/2,t=(n.height-g.height)/2;d.attr("transform","translate("+e+", "+t+")")}else{const e=n.width/2,t=n.padding/2;d.attr("transform","translate("+e+", "+t+")")}switch(n.type){case e.nodeType.DEFAULT:!function(e,t,n,r){t.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("d",`M0 ${n.height-5} v${10-n.height} q0,-5 5,-5 h${n.width-10} q5,0 5,5 v${n.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",n.height).attr("x2",n.width).attr("y2",n.height)}(e,h,n,l);break;case e.nodeType.ROUNDED_RECT:!function(e,t,n){t.append("rect").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("height",n.height).attr("rx",n.padding).attr("ry",n.padding).attr("width",n.width)}(e,h,n);break;case e.nodeType.RECT:!function(e,t,n){t.append("rect").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("height",n.height).attr("width",n.width)}(e,h,n);break;case e.nodeType.CIRCLE:h.attr("transform","translate("+n.width/2+", "+ +n.height/2+")"),function(e,t,n){t.append("circle").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("r",n.width/2)}(e,h,n);break;case e.nodeType.CLOUD:!function(e,t,n){const r=n.width,i=n.height,a=.15*r,o=.25*r,s=.35*r,l=.2*r;t.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${.25*r},${-1*r*.1}\n a${s},${s} 1 0,1 ${.4*r},${-1*r*.1}\n a${o},${o} 1 0,1 ${.35*r},${1*r*.2}\n\n a${a},${a} 1 0,1 ${.15*r},${1*i*.35}\n a${l},${l} 1 0,1 ${-1*r*.15},${1*i*.65}\n\n a${o},${a} 1 0,1 ${-1*r*.25},${.15*r}\n a${s},${s} 1 0,1 ${-1*r*.5},0\n a${a},${a} 1 0,1 ${-1*r*.25},${-1*r*.15}\n\n a${a},${a} 1 0,1 ${-1*r*.1},${-1*i*.35}\n a${l},${l} 1 0,1 ${.1*r},${-1*i*.65}\n\n H0 V0 Z`)}(e,h,n);break;case e.nodeType.BANG:!function(e,t,n){const r=n.width,i=n.height,a=.15*r;t.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${.25*r},${-1*i*.1}\n a${a},${a} 1 0,0 ${.25*r},0\n a${a},${a} 1 0,0 ${.25*r},0\n a${a},${a} 1 0,0 ${.25*r},${1*i*.1}\n\n a${a},${a} 1 0,0 ${.15*r},${1*i*.33}\n a${.8*a},${.8*a} 1 0,0 0,${1*i*.34}\n a${a},${a} 1 0,0 ${-1*r*.15},${1*i*.33}\n\n a${a},${a} 1 0,0 ${-1*r*.25},${.15*i}\n a${a},${a} 1 0,0 ${-1*r*.25},0\n a${a},${a} 1 0,0 ${-1*r*.25},0\n a${a},${a} 1 0,0 ${-1*r*.25},${-1*i*.15}\n\n a${a},${a} 1 0,0 ${-1*r*.1},${-1*i*.33}\n a${.8*a},${.8*a} 1 0,0 0,${-1*i*.34}\n a${a},${a} 1 0,0 ${.1*r},${-1*i*.33}\n\n H0 V0 Z`)}(e,h,n);break;case e.nodeType.HEXAGON:!function(e,t,n){const r=n.height,i=r/4,a=n.width-n.padding+2*i;!function(e,t,n,r,i){e.insert("polygon",":first-child").attr("points",r.map((function(e){return e.x+","+e.y})).join(" ")).attr("transform","translate("+(i.width-t)/2+", "+n+")")}(t,a,r,[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],n)}(0,h,n)}e.setElementForId(n.id,u),n.height}(e,t,n,i,a),n.children&&n.children.forEach(((n,r)=>{m(e,t,n,i<0?r:i,a)}))}function b(e,t,n,r){t.add({group:"nodes",data:{id:e.id.toString(),labelText:e.descr,height:e.height,width:e.width,level:r,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach((i=>{b(i,t,n,r+1),t.add({group:"edges",data:{id:`${e.id}_${i.id}`,source:e.id,target:i.id,depth:r,section:i.section}})}))}function x(e,t){return new Promise((n=>{const a=(0,o.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),s=i({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});a.remove(),b(e,s,t,0),s.nodes().forEach((function(e){e.layoutDimensions=()=>{const t=e.data();return{w:t.width,h:t.height}}})),s.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),s.ready((e=>{r.l.info("Ready",e),n(s)}))}))}i.use(a);const w={db:y,renderer:{draw:async(e,t,n,i)=>{var a,o;r.l.debug("Rendering mindmap diagram\n"+e);const s=i.db,l=s.getMindmap();if(!l)return;const u=(0,r.c)();u.htmlLabels=!1;const c=(0,r.A)(t),h=c.append("g");h.attr("class","mindmap-edges");const d=c.append("g");d.attr("class","mindmap-nodes"),m(s,d,l,-1,u);const p=await x(l,u);!function(e,t){t.edges().map(((t,n)=>{const i=t.data();if(t[0]._private.bodyBounds){const a=t[0]._private.rscratch;r.l.trace("Edge: ",n,i),e.insert("path").attr("d",`M ${a.startX},${a.startY} L ${a.midX},${a.midY} L${a.endX},${a.endY} `).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth)}}))}(h,p),function(e,t){t.nodes().map(((t,n)=>{const i=t.data();i.x=t.position().x,i.y=t.position().y,function(e,t){const n=e.getElementById(t.id),r=t.x||0,i=t.y||0;n.attr("transform","translate("+r+","+i+")")}(e,i);const a=e.getElementById(i.nodeId);r.l.info("Id:",n,"Position: (",t.position().x,", ",t.position().y,")",i),a.attr("transform",`translate(${t.position().x-i.width/2}, ${t.position().y-i.height/2})`),a.attr("attr",`apa-${n})`)}))}(s,p),(0,r.o)(void 0,c,(null==(a=u.mindmap)?void 0:a.padding)??r.B.mindmap.padding,(null==(o=u.mindmap)?void 0:o.useMaxWidth)??r.B.mindmap.useMaxWidth)}},parser:d,styles:e=>`\n .edge {\n stroke-width: 3;\n }\n ${(e=>{let t="";for(let n=0;n<e.THEME_COLOR_LIMIT;n++)e["lineColor"+n]=e["lineColor"+n]||e["cScaleInv"+n],(0,l.A)(e["lineColor"+n])?e["lineColor"+n]=(0,u.A)(e["lineColor"+n],20):e["lineColor"+n]=(0,c.A)(e["lineColor"+n],20);for(let n=0;n<e.THEME_COLOR_LIMIT;n++){const r=""+(17-3*n);t+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {\n fill: ${e["cScale"+n]};\n }\n .section-${n-1} text {\n fill: ${e["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${e["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${r};\n }\n .section-${n-1} line {\n stroke: ${e["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return t})(e)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${e.git0};\n }\n .section-root text {\n fill: ${e.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`}}}]); \ No newline at end of file diff --git a/assets/js/3771.5dded75d.js.LICENSE.txt b/assets/js/3771.5dded75d.js.LICENSE.txt new file mode 100644 index 00000000..a9f6f124 --- /dev/null +++ b/assets/js/3771.5dded75d.js.LICENSE.txt @@ -0,0 +1,9 @@ +/*! +Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable +Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) +Licensed under The MIT License (http://opensource.org/licenses/MIT) +*/ + +/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + +/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ diff --git a/assets/js/3863.4e79c37a.js b/assets/js/3863.4e79c37a.js new file mode 100644 index 00000000..c5945ce3 --- /dev/null +++ b/assets/js/3863.4e79c37a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[3863],{3863:(t,e,n)=>{n.d(e,{diagram:()=>nt});var a=n(6257),i=n(6312),s=n(8886),r=n(6750),l=(n(4353),n(2838),function(){var t=function(t,e,n,a){for(n=n||{},a=t.length;a--;n[t[a]]=e);return n},e=[1,24],n=[1,25],a=[1,26],i=[1,27],s=[1,28],r=[1,63],l=[1,64],o=[1,65],h=[1,66],d=[1,67],u=[1,68],p=[1,69],y=[1,29],f=[1,30],b=[1,31],g=[1,32],x=[1,33],_=[1,34],m=[1,35],E=[1,36],A=[1,37],S=[1,38],C=[1,39],k=[1,40],O=[1,41],v=[1,42],T=[1,43],w=[1,44],R=[1,45],D=[1,46],N=[1,47],P=[1,48],M=[1,50],j=[1,51],B=[1,52],L=[1,53],Y=[1,54],I=[1,55],U=[1,56],F=[1,57],X=[1,58],z=[1,59],W=[1,60],Q=[14,42],$=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],q=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],V=[1,82],G=[1,83],H=[1,84],K=[1,85],J=[12,14,42],Z=[12,14,33,42],tt=[12,14,33,42,76,77,79,80],et=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],at={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:function(t,e,n,a,i,s,r){var l=s.length-1;switch(i){case 3:a.setDirection("TB");break;case 4:a.setDirection("BT");break;case 5:a.setDirection("RL");break;case 6:a.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:a.setC4Type(s[l-3]);break;case 19:a.setTitle(s[l].substring(6)),this.$=s[l].substring(6);break;case 20:a.setAccDescription(s[l].substring(15)),this.$=s[l].substring(15);break;case 21:this.$=s[l].trim(),a.setTitle(this.$);break;case 22:case 23:this.$=s[l].trim(),a.setAccDescription(this.$);break;case 28:case 29:s[l].splice(2,0,"ENTERPRISE"),a.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 30:a.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 31:s[l].splice(2,0,"CONTAINER"),a.addContainerBoundary(...s[l]),this.$=s[l];break;case 32:a.addDeploymentNode("node",...s[l]),this.$=s[l];break;case 33:a.addDeploymentNode("nodeL",...s[l]),this.$=s[l];break;case 34:a.addDeploymentNode("nodeR",...s[l]),this.$=s[l];break;case 35:a.popBoundaryParseStack();break;case 39:a.addPersonOrSystem("person",...s[l]),this.$=s[l];break;case 40:a.addPersonOrSystem("external_person",...s[l]),this.$=s[l];break;case 41:a.addPersonOrSystem("system",...s[l]),this.$=s[l];break;case 42:a.addPersonOrSystem("system_db",...s[l]),this.$=s[l];break;case 43:a.addPersonOrSystem("system_queue",...s[l]),this.$=s[l];break;case 44:a.addPersonOrSystem("external_system",...s[l]),this.$=s[l];break;case 45:a.addPersonOrSystem("external_system_db",...s[l]),this.$=s[l];break;case 46:a.addPersonOrSystem("external_system_queue",...s[l]),this.$=s[l];break;case 47:a.addContainer("container",...s[l]),this.$=s[l];break;case 48:a.addContainer("container_db",...s[l]),this.$=s[l];break;case 49:a.addContainer("container_queue",...s[l]),this.$=s[l];break;case 50:a.addContainer("external_container",...s[l]),this.$=s[l];break;case 51:a.addContainer("external_container_db",...s[l]),this.$=s[l];break;case 52:a.addContainer("external_container_queue",...s[l]),this.$=s[l];break;case 53:a.addComponent("component",...s[l]),this.$=s[l];break;case 54:a.addComponent("component_db",...s[l]),this.$=s[l];break;case 55:a.addComponent("component_queue",...s[l]),this.$=s[l];break;case 56:a.addComponent("external_component",...s[l]),this.$=s[l];break;case 57:a.addComponent("external_component_db",...s[l]),this.$=s[l];break;case 58:a.addComponent("external_component_queue",...s[l]),this.$=s[l];break;case 60:a.addRel("rel",...s[l]),this.$=s[l];break;case 61:a.addRel("birel",...s[l]),this.$=s[l];break;case 62:a.addRel("rel_u",...s[l]),this.$=s[l];break;case 63:a.addRel("rel_d",...s[l]),this.$=s[l];break;case 64:a.addRel("rel_l",...s[l]),this.$=s[l];break;case 65:a.addRel("rel_r",...s[l]),this.$=s[l];break;case 66:a.addRel("rel_b",...s[l]),this.$=s[l];break;case 67:s[l].splice(0,1),a.addRel("rel",...s[l]),this.$=s[l];break;case 68:a.updateElStyle("update_el_style",...s[l]),this.$=s[l];break;case 69:a.updateRelStyle("update_rel_style",...s[l]),this.$=s[l];break;case 70:a.updateLayoutConfig("update_layout_config",...s[l]),this.$=s[l];break;case 71:this.$=[s[l]];break;case 72:s[l].unshift(s[l-1]),this.$=s[l];break;case 73:case 75:this.$=s[l].trim();break;case 74:let t={};t[s[l-1].trim()]=s[l].trim(),this.$=t;break;case 76:this.$=""}},table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:o,38:h,39:d,40:u,41:p,43:23,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W},{13:70,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:o,38:h,39:d,40:u,41:p,43:23,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W},{13:71,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:o,38:h,39:d,40:u,41:p,43:23,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W},{13:72,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:o,38:h,39:d,40:u,41:p,43:23,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W},{13:73,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:o,38:h,39:d,40:u,41:p,43:23,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W},{14:[1,74]},t(Q,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:l,37:o,38:h,39:d,40:u,41:p,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W}),t(Q,[2,14]),t($,[2,16],{12:[1,76]}),t(Q,[2,36],{12:[1,77]}),t(q,[2,19]),t(q,[2,20]),{25:[1,78]},{27:[1,79]},t(q,[2,23]),{35:80,75:81,76:V,77:G,79:H,80:K},{35:86,75:81,76:V,77:G,79:H,80:K},{35:87,75:81,76:V,77:G,79:H,80:K},{35:88,75:81,76:V,77:G,79:H,80:K},{35:89,75:81,76:V,77:G,79:H,80:K},{35:90,75:81,76:V,77:G,79:H,80:K},{35:91,75:81,76:V,77:G,79:H,80:K},{35:92,75:81,76:V,77:G,79:H,80:K},{35:93,75:81,76:V,77:G,79:H,80:K},{35:94,75:81,76:V,77:G,79:H,80:K},{35:95,75:81,76:V,77:G,79:H,80:K},{35:96,75:81,76:V,77:G,79:H,80:K},{35:97,75:81,76:V,77:G,79:H,80:K},{35:98,75:81,76:V,77:G,79:H,80:K},{35:99,75:81,76:V,77:G,79:H,80:K},{35:100,75:81,76:V,77:G,79:H,80:K},{35:101,75:81,76:V,77:G,79:H,80:K},{35:102,75:81,76:V,77:G,79:H,80:K},{35:103,75:81,76:V,77:G,79:H,80:K},{35:104,75:81,76:V,77:G,79:H,80:K},t(J,[2,59]),{35:105,75:81,76:V,77:G,79:H,80:K},{35:106,75:81,76:V,77:G,79:H,80:K},{35:107,75:81,76:V,77:G,79:H,80:K},{35:108,75:81,76:V,77:G,79:H,80:K},{35:109,75:81,76:V,77:G,79:H,80:K},{35:110,75:81,76:V,77:G,79:H,80:K},{35:111,75:81,76:V,77:G,79:H,80:K},{35:112,75:81,76:V,77:G,79:H,80:K},{35:113,75:81,76:V,77:G,79:H,80:K},{35:114,75:81,76:V,77:G,79:H,80:K},{35:115,75:81,76:V,77:G,79:H,80:K},{20:116,29:49,30:61,32:62,34:r,36:l,37:o,38:h,39:d,40:u,41:p,43:23,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W},{12:[1,118],33:[1,117]},{35:119,75:81,76:V,77:G,79:H,80:K},{35:120,75:81,76:V,77:G,79:H,80:K},{35:121,75:81,76:V,77:G,79:H,80:K},{35:122,75:81,76:V,77:G,79:H,80:K},{35:123,75:81,76:V,77:G,79:H,80:K},{35:124,75:81,76:V,77:G,79:H,80:K},{35:125,75:81,76:V,77:G,79:H,80:K},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Q,[2,15]),t($,[2,17],{21:22,19:130,22:e,23:n,24:a,26:i,28:s}),t(Q,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:n,24:a,26:i,28:s,34:r,36:l,37:o,38:h,39:d,40:u,41:p,44:y,45:f,46:b,47:g,48:x,49:_,50:m,51:E,52:A,53:S,54:C,55:k,56:O,57:v,58:T,59:w,60:R,61:D,62:N,63:P,64:M,65:j,66:B,67:L,68:Y,69:I,70:U,71:F,72:X,73:z,74:W}),t(q,[2,21]),t(q,[2,22]),t(J,[2,39]),t(Z,[2,71],{75:81,35:132,76:V,77:G,79:H,80:K}),t(tt,[2,73]),{78:[1,133]},t(tt,[2,75]),t(tt,[2,76]),t(J,[2,40]),t(J,[2,41]),t(J,[2,42]),t(J,[2,43]),t(J,[2,44]),t(J,[2,45]),t(J,[2,46]),t(J,[2,47]),t(J,[2,48]),t(J,[2,49]),t(J,[2,50]),t(J,[2,51]),t(J,[2,52]),t(J,[2,53]),t(J,[2,54]),t(J,[2,55]),t(J,[2,56]),t(J,[2,57]),t(J,[2,58]),t(J,[2,60]),t(J,[2,61]),t(J,[2,62]),t(J,[2,63]),t(J,[2,64]),t(J,[2,65]),t(J,[2,66]),t(J,[2,67]),t(J,[2,68]),t(J,[2,69]),t(J,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(et,[2,28]),t(et,[2,29]),t(et,[2,30]),t(et,[2,31]),t(et,[2,32]),t(et,[2,33]),t(et,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t($,[2,18]),t(Q,[2,38]),t(Z,[2,72]),t(tt,[2,74]),t(J,[2,24]),t(J,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],a=[],i=[null],s=[],r=this.table,l="",o=0,c=0,h=s.slice.call(arguments,1),d=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);d.setInput(t,u.yy),u.yy.lexer=d,u.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;s.push(y);var f=d.options&&d.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,g,x,_,m,E,A,S,C,k={};;){if(g=n[n.length-1],this.defaultActions[g]?x=this.defaultActions[g]:(null==b&&(C=void 0,"number"!=typeof(C=a.pop()||d.lex()||1)&&(C instanceof Array&&(C=(a=C).pop()),C=e.symbols_[C]||C),b=C),x=r[g]&&r[g][b]),void 0===x||!x.length||!x[0]){var O="";for(m in S=[],r[g])this.terminals_[m]&&m>2&&S.push("'"+this.terminals_[m]+"'");O=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(O,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:y,expected:S})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+b);switch(x[0]){case 1:n.push(b),i.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,c=d.yyleng,l=d.yytext,o=d.yylineno,y=d.yylloc;break;case 2:if(E=this.productions_[x[1]][1],k.$=i[i.length-E],k._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},f&&(k._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),void 0!==(_=this.performAction.apply(k,[l,c,o,u.yy,x[1],i,s].concat(h))))return _;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),s=s.slice(0,-1*E)),n.push(this.productions_[x[1]][0]),i.push(k.$),s.push(k._$),A=r[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0}},it={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=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 i=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===a.length?this.yylloc.first_column:0)+a[a.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,a,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((n=this._input.match(this.rules[i[s]]))&&(!e||n[0].length>e[0].length)){if(e=n,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,a){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,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,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};function st(){this.yy={}}return at.lexer=it,st.prototype=at,at.Parser=st,new st}());l.parser=l;const o=l;let h=[],d=[""],u="global",p="",y=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],f=[],b="",g=!1,x=4,_=2;var m;const E=function(t){return null==t?h:h.filter((e=>e.parentBoundary===t))},A=function(t){return null==t?y:y.filter((e=>e.parentBoundary===t))},S=function(){return g},C={addPersonOrSystem:function(t,e,n,a,i,s,r){if(null===e||null===n)return;let l={};const o=h.find((t=>t.alias===e));if(o&&e===o.alias?l=o:(l.alias=e,h.push(l)),l.label=null==n?{text:""}:{text:n},null==a)l.descr={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]={text:e}}else l.descr={text:a};if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.sprite=i;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=e}else l.link=r;l.typeC4Shape={text:t},l.parentBoundary=u,l.wrap=S()},addPersonOrSystemBoundary:function(t,e,n,a,i){if(null===t||null===e)return;let s={};const r=y.find((e=>e.alias===t));if(r&&t===r.alias?s=r:(s.alias=t,y.push(s)),s.label=null==e?{text:""}:{text:e},null==n)s.type={text:"system"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]={text:e}}else s.type={text:n};if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]=e}else s.tags=a;if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.link=i;s.parentBoundary=u,s.wrap=S(),p=u,u=t,d.push(p)},addContainer:function(t,e,n,a,i,s,r,l){if(null===e||null===n)return;let o={};const c=h.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,h.push(o)),o.label=null==n?{text:""}:{text:n},null==a)o.techn={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]={text:e}}else o.techn={text:a};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.sprite=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=S(),o.typeC4Shape={text:t},o.parentBoundary=u},addContainerBoundary:function(t,e,n,a,i){if(null===t||null===e)return;let s={};const r=y.find((e=>e.alias===t));if(r&&t===r.alias?s=r:(s.alias=t,y.push(s)),s.label=null==e?{text:""}:{text:e},null==n)s.type={text:"container"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]={text:e}}else s.type={text:n};if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]=e}else s.tags=a;if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.link=i;s.parentBoundary=u,s.wrap=S(),p=u,u=t,d.push(p)},addComponent:function(t,e,n,a,i,s,r,l){if(null===e||null===n)return;let o={};const c=h.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,h.push(o)),o.label=null==n?{text:""}:{text:n},null==a)o.techn={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]={text:e}}else o.techn={text:a};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.sprite=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=S(),o.typeC4Shape={text:t},o.parentBoundary=u},addDeploymentNode:function(t,e,n,a,i,s,r,l){if(null===e||null===n)return;let o={};const c=y.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,y.push(o)),o.label=null==n?{text:""}:{text:n},null==a)o.type={text:"node"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]={text:e}}else o.type={text:a};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.nodeType=t,o.parentBoundary=u,o.wrap=S(),p=u,u=e,d.push(p)},popBoundaryParseStack:function(){u=p,d.pop(),p=d.pop(),d.push(p)},addRel:function(t,e,n,a,i,s,r,l,o){if(null==t||null==e||null==n||null==a)return;let c={};const h=f.find((t=>t.from===e&&t.to===n));if(h?c=h:f.push(c),c.type=t,c.from=e,c.to=n,c.label={text:a},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==s)c.descr={text:""};else if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]={text:e}}else c.descr={text:s};if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]=e}else c.sprite=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.tags=l;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=S()},updateElStyle:function(t,e,n,a,i,s,r,l,o,c,d){let u=h.find((t=>t.alias===e));if(void 0!==u||(u=y.find((t=>t.alias===e)),void 0!==u)){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];u[t]=e}else u.bgColor=n;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];u[t]=e}else u.fontColor=a;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];u[t]=e}else u.borderColor=i;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];u[t]=e}else u.shadowing=s;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];u[t]=e}else u.shape=r;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];u[t]=e}else u.sprite=l;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];u[t]=e}else u.techn=o;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];u[t]=e}else u.legendText=c;if(null!=d)if("object"==typeof d){let[t,e]=Object.entries(d)[0];u[t]=e}else u.legendSprite=d}},updateRelStyle:function(t,e,n,a,i,s,r){const l=f.find((t=>t.from===e&&t.to===n));if(void 0!==l){if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.textColor=a;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.lineColor=i;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=parseInt(e)}else l.offsetX=parseInt(s);if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=parseInt(e)}else l.offsetY=parseInt(r)}},updateLayoutConfig:function(t,e,n){let a=x,i=_;if("object"==typeof e){const t=Object.values(e)[0];a=parseInt(t)}else a=parseInt(e);if("object"==typeof n){const t=Object.values(n)[0];i=parseInt(t)}else i=parseInt(n);a>=1&&(x=a),i>=1&&(_=i)},autoWrap:S,setWrap:function(t){g=t},getC4ShapeArray:E,getC4Shape:function(t){return h.find((e=>e.alias===t))},getC4ShapeKeys:function(t){return Object.keys(E(t))},getBoundaries:A,getBoundarys:A,getCurrentBoundaryParse:function(){return u},getParentBoundaryParse:function(){return p},getRels:function(){return f},getTitle:function(){return b},getC4Type:function(){return m},getC4ShapeInRow:function(){return x},getC4BoundaryInRow:function(){return _},setAccTitle:a.s,getAccTitle:a.g,getAccDescription:a.a,setAccDescription:a.b,getConfig:()=>(0,a.c)().c4,clear:function(){h=[],y=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],p="",u="global",d=[""],f=[],d=[""],b="",g=!1,x=4,_=2},LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(t){let e=(0,a.d)(t,(0,a.c)());b=e},setC4Type:function(t){let e=(0,a.d)(t,(0,a.c)());m=e}},k=function(t,e){return(0,s.d)(t,e)},O=function(t,e,n,a,i,s){const l=t.append("image");l.attr("width",e),l.attr("height",n),l.attr("x",a),l.attr("y",i);let o=s.startsWith("data:image/png;base64")?s:(0,r.Jf)(s);l.attr("xlink:href",o)},v=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),T=function(){function t(t,e,n,a,s,r,l){i(e.append("text").attr("x",n+s/2).attr("y",a+r/2+5).style("text-anchor","middle").text(t),l)}function e(t,e,n,s,r,l,o,c){const{fontSize:h,fontFamily:d,fontWeight:u}=c,p=t.split(a.e.lineBreakRegex);for(let a=0;a<p.length;a++){const t=a*h-h*(p.length-1)/2,l=e.append("text").attr("x",n+r/2).attr("y",s).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",h).style("font-weight",u).style("font-family",d);l.append("tspan").attr("dy",t).text(p[a]).attr("alignment-baseline","mathematical"),i(l,o)}}function n(t,n,a,s,r,l,o,c){const h=n.append("switch"),d=h.append("foreignObject").attr("x",a).attr("y",s).attr("width",r).attr("height",l).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,a,s,r,0,o,c),i(d,o)}function i(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(a){return"fo"===a.textPlacement?n:"old"===a.textPlacement?t:e}}(),w=function(t,e,n){const a=t.append("g");let i=e.bgColor?e.bgColor:"none",s=e.borderColor?e.borderColor:"#444444",r=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let o={x:e.x,y:e.y,fill:i,stroke:s,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};k(a,o);let c=n.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=r,T(n)(e.label.text,a,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=n.boundaryFont(),c.fontColor=r,T(n)(e.type.text,a,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=n.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=r,T(n)(e.descr.text,a,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))},R=function(t,e,n){var a;let i=e.bgColor?e.bgColor:n[e.typeC4Shape.text+"_bg_color"],r=e.borderColor?e.borderColor:n[e.typeC4Shape.text+"_border_color"],l=e.fontColor?e.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const c=t.append("g");c.attr("class","person-man");const h=(0,s.g)();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":h.x=e.x,h.y=e.y,h.fill=i,h.width=e.width,h.height=e.height,h.stroke=r,h.rx=2.5,h.ry=2.5,h.attrs={"stroke-width":.5},k(c,h);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":c.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),c.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":c.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),c.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let d=v(n,e.typeC4Shape.text);switch(c.append("text").attr("fill",l).attr("font-family",d.fontFamily).attr("font-size",d.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":O(c,48,48,e.x+e.width/2-24,e.y+e.image.Y,o)}let u=n[e.typeC4Shape.text+"Font"]();return u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=l,T(n)(e.label.text,c,e.x,e.y+e.label.Y,e.width,e.height,{fill:l},u),u=n[e.typeC4Shape.text+"Font"](),u.fontColor=l,e.techn&&""!==(null==(a=e.techn)?void 0:a.text)?T(n)(e.techn.text,c,e.x,e.y+e.techn.Y,e.width,e.height,{fill:l,"font-style":"italic"},u):e.type&&""!==e.type.text&&T(n)(e.type.text,c,e.x,e.y+e.type.Y,e.width,e.height,{fill:l,"font-style":"italic"},u),e.descr&&""!==e.descr.text&&(u=n.personFont(),u.fontColor=l,T(n)(e.descr.text,c,e.x,e.y+e.descr.Y,e.width,e.height,{fill:l},u)),e.height},D=(t,e,n)=>{const a=t.append("g");let i=0;for(let s of e){let t=s.textColor?s.textColor:"#444444",e=s.lineColor?s.lineColor:"#444444",r=s.offsetX?parseInt(s.offsetX):0,l=s.offsetY?parseInt(s.offsetY):0,o="";if(0===i){let t=a.append("line");t.attr("x1",s.startPoint.x),t.attr("y1",s.startPoint.y),t.attr("x2",s.endPoint.x),t.attr("y2",s.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==s.type&&t.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||t.attr("marker-start","url("+o+"#arrowend)"),i=-1}else{let t=a.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),"rel_b"!==s.type&&t.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||t.attr("marker-start","url("+o+"#arrowend)")}let c=n.messageFont();T(n)(s.label.text,a,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+r,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+l,s.label.width,s.label.height,{fill:t},c),s.techn&&""!==s.techn.text&&(c=n.messageFont(),T(n)("["+s.techn.text+"]",a,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+r,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+n.messageFontSize+5+l,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:t,"font-style":"italic"},c))}},N=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).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")},P=function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},M=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")},j=function(t){const e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},B=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},L=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},Y=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")};let I=0,U=0,F=4,X=2;l.yy=C;let z={};class W{constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,Q(t.db.getConfig())}setData(t,e,n,a){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=a}updateVal(t,e,n,a){void 0===t[e]?t[e]=n:t[e]=a(n,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,n=e+t.width,a=this.nextData.starty+2*t.margin,i=a+t.height;(e>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>F)&&(e=this.nextData.startx+t.margin+z.nextLinePaddingX,a=this.nextData.stopy+2*t.margin,this.nextData.stopx=n=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=a+t.height,this.nextData.cnt=1),t.x=e,t.y=a,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",a,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",a,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Q(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}}const Q=function(t){(0,a.f)(z,t),t.fontFamily&&(z.personFontFamily=z.systemFontFamily=z.messageFontFamily=t.fontFamily),t.fontSize&&(z.personFontSize=z.systemFontSize=z.messageFontSize=t.fontSize),t.fontWeight&&(z.personFontWeight=z.systemFontWeight=z.messageFontWeight=t.fontWeight)},$=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),q=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight});function V(t,e,n,i,s){if(!e[t].width)if(n)e[t].text=(0,a.w)(e[t].text,s,i),e[t].textLines=e[t].text.split(a.e.lineBreakRegex).length,e[t].width=s,e[t].height=(0,a.j)(e[t].text,i);else{let n=e[t].text.split(a.e.lineBreakRegex);e[t].textLines=n.length;let s=0;e[t].height=0,e[t].width=0;for(const r of n)e[t].width=Math.max((0,a.h)(r,i),e[t].width),s=(0,a.j)(r,i),e[t].height=e[t].height+s}}const G=function(t,e,n){e.x=n.data.startx,e.y=n.data.starty,e.width=n.data.stopx-n.data.startx,e.height=n.data.stopy-n.data.starty,e.label.y=z.c4ShapeMargin-35;let i=e.wrap&&z.wrap,s=q(z);s.fontSize=s.fontSize+2,s.fontWeight="bold",V("label",e,i,s,(0,a.h)(e.label.text,s)),w(t,e,z)},H=function(t,e,n,i){let s=0;for(const r of i){s=0;const i=n[r];let l=$(z,i.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,i.typeC4Shape.width=(0,a.h)("\xab"+i.typeC4Shape.text+"\xbb",l),i.typeC4Shape.height=l.fontSize+2,i.typeC4Shape.Y=z.c4ShapePadding,s=i.typeC4Shape.Y+i.typeC4Shape.height-4,i.image={width:0,height:0,Y:0},i.typeC4Shape.text){case"person":case"external_person":i.image.width=48,i.image.height=48,i.image.Y=s,s=i.image.Y+i.image.height}i.sprite&&(i.image.width=48,i.image.height=48,i.image.Y=s,s=i.image.Y+i.image.height);let o=i.wrap&&z.wrap,c=z.width-2*z.c4ShapePadding,h=$(z,i.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",V("label",i,o,h,c),i.label.Y=s+8,s=i.label.Y+i.label.height,i.type&&""!==i.type.text){i.type.text="["+i.type.text+"]",V("type",i,o,$(z,i.typeC4Shape.text),c),i.type.Y=s+5,s=i.type.Y+i.type.height}else if(i.techn&&""!==i.techn.text){i.techn.text="["+i.techn.text+"]",V("techn",i,o,$(z,i.techn.text),c),i.techn.Y=s+5,s=i.techn.Y+i.techn.height}let d=s,u=i.label.width;if(i.descr&&""!==i.descr.text){V("descr",i,o,$(z,i.typeC4Shape.text),c),i.descr.Y=s+20,s=i.descr.Y+i.descr.height,u=Math.max(i.label.width,i.descr.width),d=s-5*i.descr.textLines}u+=z.c4ShapePadding,i.width=Math.max(i.width||z.width,u,z.width),i.height=Math.max(i.height||z.height,d,z.height),i.margin=i.margin||z.c4ShapeMargin,t.insert(i),R(e,i,z)}t.bumpLastMargin(z.c4ShapeMargin)};class K{constructor(t,e){this.x=t,this.y=e}}let J=function(t,e){let n=t.x,a=t.y,i=e.x,s=e.y,r=n+t.width/2,l=a+t.height/2,o=Math.abs(n-i),c=Math.abs(a-s),h=c/o,d=t.height/t.width,u=null;return a==s&&n<i?u=new K(n+t.width,l):a==s&&n>i?u=new K(n,l):n==i&&a<s?u=new K(r,a+t.height):n==i&&a>s&&(u=new K(r,a)),n>i&&a<s?u=d>=h?new K(n,l+h*t.width/2):new K(r-o/c*t.height/2,a+t.height):n<i&&a<s?u=d>=h?new K(n+t.width,l+h*t.width/2):new K(r+o/c*t.height/2,a+t.height):n<i&&a>s?u=d>=h?new K(n+t.width,l-h*t.width/2):new K(r+t.height/2*o/c,a):n>i&&a>s&&(u=d>=h?new K(n,l-t.width/2*h):new K(r-t.height/2*o/c,a)),u},Z=function(t,e){let n={x:0,y:0};n.x=e.x+e.width/2,n.y=e.y+e.height/2;let a=J(t,n);return n.x=t.x+t.width/2,n.y=t.y+t.height/2,{startPoint:a,endPoint:J(e,n)}};function tt(t,e,n,a,i){let s=new W(i);s.data.widthLimit=n.data.widthLimit/Math.min(X,a.length);for(let[r,l]of a.entries()){let a=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=a,a=l.image.Y+l.image.height);let o=l.wrap&&z.wrap,c=q(z);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",V("label",l,o,c,s.data.widthLimit),l.label.Y=a+8,a=l.label.Y+l.label.height,l.type&&""!==l.type.text){l.type.text="["+l.type.text+"]",V("type",l,o,q(z),s.data.widthLimit),l.type.Y=a+5,a=l.type.Y+l.type.height}if(l.descr&&""!==l.descr.text){let t=q(z);t.fontSize=t.fontSize-2,V("descr",l,o,t,s.data.widthLimit),l.descr.Y=a+20,a=l.descr.Y+l.descr.height}if(0==r||r%X==0){let t=n.data.startx+z.diagramMarginX,e=n.data.stopy+z.diagramMarginY+a;s.setData(t,t,e,e)}else{let t=s.data.stopx!==s.data.startx?s.data.stopx+z.diagramMarginX:s.data.startx,e=s.data.starty;s.setData(t,t,e,e)}s.name=l.alias;let h=i.db.getC4ShapeArray(l.alias),d=i.db.getC4ShapeKeys(l.alias);d.length>0&&H(s,t,h,d),e=l.alias;let u=i.db.getBoundarys(e);u.length>0&&tt(t,e,s,u,i),"global"!==l.alias&&G(t,l,s),n.data.stopy=Math.max(s.data.stopy+z.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(s.data.stopx+z.c4ShapeMargin,n.data.stopx),I=Math.max(I,n.data.stopx),U=Math.max(U,n.data.stopy)}}const et={drawPersonOrSystemArray:H,drawBoundary:G,setConf:Q,draw:function(t,e,n,s){z=(0,a.c)().c4;const r=(0,a.c)().securityLevel;let l;"sandbox"===r&&(l=(0,i.Ltv)("#i"+e));const o="sandbox"===r?(0,i.Ltv)(l.nodes()[0].contentDocument.body):(0,i.Ltv)("body");let c=s.db;s.db.setWrap(z.wrap),F=c.getC4ShapeInRow(),X=c.getC4BoundaryInRow(),a.l.debug(`C:${JSON.stringify(z,null,2)}`);const h="sandbox"===r?o.select(`[id="${e}"]`):(0,i.Ltv)(`[id="${e}"]`);L(h),B(h),Y(h);let d=new W(s);d.setData(z.diagramMarginX,z.diagramMarginX,z.diagramMarginY,z.diagramMarginY),d.data.widthLimit=screen.availWidth,I=z.diagramMarginX,U=z.diagramMarginY;const u=s.db.getTitle();tt(h,"",d,s.db.getBoundarys(""),s),N(h),P(h),j(h),M(h),function(t,e,n,i){let s=0;for(let l of e){s+=1;let t=l.wrap&&z.wrap,e={fontFamily:(r=z).messageFontFamily,fontSize:r.messageFontSize,fontWeight:r.messageFontWeight};"C4Dynamic"===i.db.getC4Type()&&(l.label.text=s+": "+l.label.text);let o=(0,a.h)(l.label.text,e);V("label",l,t,e,o),l.techn&&""!==l.techn.text&&(o=(0,a.h)(l.techn.text,e),V("techn",l,t,e,o)),l.descr&&""!==l.descr.text&&(o=(0,a.h)(l.descr.text,e),V("descr",l,t,e,o));let c=n(l.from),h=n(l.to),d=Z(c,h);l.startPoint=d.startPoint,l.endPoint=d.endPoint}var r;D(t,e,z)}(h,s.db.getRels(),s.db.getC4Shape,s),d.data.stopx=I,d.data.stopy=U;const p=d.data;let y=p.stopy-p.starty+2*z.diagramMarginY;const f=p.stopx-p.startx+2*z.diagramMarginX;u&&h.append("text").text(u).attr("x",(p.stopx-p.startx)/2-4*z.diagramMarginX).attr("y",p.starty+z.diagramMarginY),(0,a.i)(h,y,f,z.useMaxWidth);const b=u?60:0;h.attr("viewBox",p.startx-z.diagramMarginX+" -"+(z.diagramMarginY+b)+" "+f+" "+(y+b)),a.l.debug("models:",p)}},nt={parser:o,db:C,renderer:et,styles:t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,init:({c4:t,wrap:e})=>{et.setConf(t),C.setWrap(e)}}},8886:(t,e,n)=>{n.d(e,{a:()=>r,b:()=>c,c:()=>o,d:()=>s,e:()=>d,f:()=>l,g:()=>h});var a=n(6750),i=n(6257);const s=(t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),void 0!==e.rx&&n.attr("rx",e.rx),void 0!==e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const a in e.attrs)n.attr(a,e.attrs[a]);return void 0!==e.class&&n.attr("class",e.class),n},r=(t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};s(t,n).lower()},l=(t,e)=>{const n=e.text.replace(i.J," "),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.attr("class","legend"),a.style("text-anchor",e.anchor),void 0!==e.class&&a.attr("class",e.class);const s=a.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.text(n),a},o=(t,e,n,i)=>{const s=t.append("image");s.attr("x",e),s.attr("y",n);const r=(0,a.Jf)(i);s.attr("xlink:href",r)},c=(t,e,n,i)=>{const s=t.append("use");s.attr("x",e),s.attr("y",n);const r=(0,a.Jf)(i);s.attr("xlink:href",`#${r}`)},h=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),d=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})}}]); \ No newline at end of file diff --git a/assets/js/3a55b9ff.2fb2e80e.js b/assets/js/3a55b9ff.2fb2e80e.js new file mode 100644 index 00000000..7f71dca4 --- /dev/null +++ b/assets/js/3a55b9ff.2fb2e80e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[9742],{4477:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var n=a(4848),s=a(8453);const i={sidebar_position:3},r="Fetching metadata",o={id:"about/usage/fetching-metadata",title:"Fetching metadata",description:"Two client methods have been created to fetch basic metadata for one or more tags.",source:"@site/docs/about/usage/fetching-metadata.md",sourceDirName:"about/usage",slug:"/about/usage/fetching-metadata",permalink:"/tagreader-python/docs/about/usage/fetching-metadata",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/about/usage/fetching-metadata.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"about",previous:{title:"Data sources",permalink:"/tagreader-python/docs/about/usage/data-source"},next:{title:"Caching results",permalink:"/tagreader-python/docs/about/usage/caching"}},d={},c=[{value:"get_units()",id:"get_units",level:3},{value:"get_description()",id:"get_description",level:3}];function g(e){const t={code:"code",h1:"h1",h3:"h3",header:"header",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"fetching-metadata",children:"Fetching metadata"})}),"\n",(0,n.jsx)(t.p,{children:"Two client methods have been created to fetch basic metadata for one or more tags."}),"\n",(0,n.jsx)(t.h3,{id:"get_units",children:"get_units()"}),"\n",(0,n.jsxs)(t.p,{children:["Fetches the engineering unit(s) for the tag(s) provided. The argument ",(0,n.jsx)(t.code,{children:"tags"})," can be either a single tagname as string,\nor a list of tagnames."]}),"\n",(0,n.jsx)(t.h3,{id:"get_description",children:"get_description()"}),"\n",(0,n.jsxs)(t.p,{children:["Fetches the description(s) for the tag(s) provided. The argument ",(0,n.jsx)(t.code,{children:"tags"})," can be either a single tagname as string,\nor a list of tagnames."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Example"}),":"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-python",children:'tags = ["BA:ACTIVE.1", "BA:LEVEL.1", "BA:CONC.1"]\nunits = c.get_units(tags)\ndesc = c.get_descriptions(tags)\ntag = "BA:CONC.1"\ndf[tag].plot(grid=True, title=desc[tag]).set_ylabel(units[tag])\n'})})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(g,{...e})}):g(e)}}}]); \ No newline at end of file diff --git a/assets/js/3b435a04.119fc3ad.js b/assets/js/3b435a04.119fc3ad.js new file mode 100644 index 00000000..8963677c --- /dev/null +++ b/assets/js/3b435a04.119fc3ad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[7405],{5226:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>a});var n=r(4848),i=r(8453);const o={title:"Overview",sidebar_position:1},s="Overview",c={id:"contribute/overview",title:"Overview",description:"Getting started",source:"@site/docs/contribute/overview.md",sourceDirName:"contribute",slug:"/contribute/overview",permalink:"/tagreader-python/docs/contribute/overview",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/contribute/overview.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"Overview",sidebar_position:1},sidebar:"contribute",next:{title:"Get started",permalink:"/tagreader-python/docs/contribute/how-to-start-contributing"}},d={},a=[{value:"Getting started",id:"getting-started",level:2},{value:"Project structure",id:"project-structure",level:2}];function u(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"overview",children:"Overview"})}),"\n",(0,n.jsx)(t.h2,{id:"getting-started",children:"Getting started"}),"\n",(0,n.jsxs)(t.p,{children:["For setting up a development environment, see the ",(0,n.jsx)(t.a,{href:"/tagreader-python/docs/contribute/development-guide/setup",children:"development guide"})]}),"\n",(0,n.jsxs)(t.p,{children:["For starting contributing, see the ",(0,n.jsx)(t.a,{href:"/tagreader-python/docs/contribute/how-to-start-contributing",children:"contribute section"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"project-structure",children:"Project structure"}),"\n",(0,n.jsx)(t.p,{children:"Here\u2019s how the app is organized."}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"\u251c\u2500\u2500 .github/ - GitHub Actions and more\n\u251c\u2500\u2500 tagreader/ - The source code\n\u251c\u2500\u2500 tests/ - Tests\n\u2502\u2500\u2500 documentation/ - Documentation\n\u2514\u2500\u2500 ...\n"})})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(u,{...e})}):u(e)}}}]); \ No newline at end of file diff --git a/assets/js/4.4581e262.js b/assets/js/4.4581e262.js new file mode 100644 index 00000000..63f5f9b9 --- /dev/null +++ b/assets/js/4.4581e262.js @@ -0,0 +1,26263 @@ +"use strict"; +exports.id = 4; +exports.ids = [4]; +exports.modules = { + +/***/ 1176: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + Zp: () => (/* reexport */ layout) +}); + +// UNUSED EXPORTS: acyclic, normalize, rank + +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js +var uniqueId = __webpack_require__(5664); +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/map.js +var map = __webpack_require__(4722); +// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules +var range = __webpack_require__(1395); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js +var graphlib = __webpack_require__(697); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js +/* + * Simple doubly linked list implementation derived from Cormen, et al., + * "Introduction to Algorithms". + */ + + + +class List { + constructor() { + var sentinel = {}; + sentinel._next = sentinel._prev = sentinel; + this._sentinel = sentinel; + } + dequeue() { + var sentinel = this._sentinel; + var entry = sentinel._prev; + if (entry !== sentinel) { + unlink(entry); + return entry; + } + } + enqueue(entry) { + var sentinel = this._sentinel; + if (entry._prev && entry._next) { + unlink(entry); + } + entry._next = sentinel._next; + sentinel._next._prev = entry; + sentinel._next = entry; + entry._prev = sentinel; + } + toString() { + var strs = []; + var sentinel = this._sentinel; + var curr = sentinel._prev; + while (curr !== sentinel) { + strs.push(JSON.stringify(curr, filterOutLinks)); + curr = curr._prev; + } + return '[' + strs.join(', ') + ']'; + } +} + +function unlink(entry) { + entry._prev._next = entry._next; + entry._next._prev = entry._prev; + delete entry._next; + delete entry._prev; +} + +function filterOutLinks(k, v) { + if (k !== '_next' && k !== '_prev') { + return v; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js + + + + +/* + * A greedy heuristic for finding a feedback arc set for a graph. A feedback + * arc set is a set of edges that can be removed to make a graph acyclic. + * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and + * effective heuristic for the feedback arc set problem." This implementation + * adjusts that from the paper to allow for weighted edges. + */ + + +var DEFAULT_WEIGHT_FN = constant/* default */.A(1); + +function greedyFAS(g, weightFn) { + if (g.nodeCount() <= 1) { + return []; + } + var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); + var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); + + // Expand multi-edges + return flatten/* default */.A( + map/* default */.A(results, function (e) { + return g.outEdges(e.v, e.w); + }) + ); +} + +function doGreedyFAS(g, buckets, zeroIdx) { + var results = []; + var sources = buckets[buckets.length - 1]; + var sinks = buckets[0]; + + var entry; + while (g.nodeCount()) { + while ((entry = sinks.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + while ((entry = sources.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + if (g.nodeCount()) { + for (var i = buckets.length - 2; i > 0; --i) { + entry = buckets[i].dequeue(); + if (entry) { + results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); + break; + } + } + } + } + + return results; +} + +function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { + var results = collectPredecessors ? [] : undefined; + + forEach/* default */.A(g.inEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var uEntry = g.node(edge.v); + + if (collectPredecessors) { + results.push({ v: edge.v, w: edge.w }); + } + + uEntry.out -= weight; + assignBucket(buckets, zeroIdx, uEntry); + }); + + forEach/* default */.A(g.outEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var w = edge.w; + var wEntry = g.node(w); + wEntry['in'] -= weight; + assignBucket(buckets, zeroIdx, wEntry); + }); + + g.removeNode(entry.v); + + return results; +} + +function buildState(g, weightFn) { + var fasGraph = new graphlib/* Graph */.T(); + var maxIn = 0; + var maxOut = 0; + + forEach/* default */.A(g.nodes(), function (v) { + fasGraph.setNode(v, { v: v, in: 0, out: 0 }); + }); + + // Aggregate weights on nodes, but also sum the weights across multi-edges + // into a single edge for the fasGraph. + forEach/* default */.A(g.edges(), function (e) { + var prevWeight = fasGraph.edge(e.v, e.w) || 0; + var weight = weightFn(e); + var edgeWeight = prevWeight + weight; + fasGraph.setEdge(e.v, e.w, edgeWeight); + maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); + maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); + }); + + var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { + return new List(); + }); + var zeroIdx = maxIn + 1; + + forEach/* default */.A(fasGraph.nodes(), function (v) { + assignBucket(buckets, zeroIdx, fasGraph.node(v)); + }); + + return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; +} + +function assignBucket(buckets, zeroIdx, entry) { + if (!entry.out) { + buckets[0].enqueue(entry); + } else if (!entry['in']) { + buckets[buckets.length - 1].enqueue(entry); + } else { + buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js + + + + + +function run(g) { + var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); + forEach/* default */.A(fas, function (e) { + var label = g.edge(e); + g.removeEdge(e); + label.forwardName = e.name; + label.reversed = true; + g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); + }); + + function weightFn(g) { + return function (e) { + return g.edge(e).weight; + }; + } +} + +function dfsFAS(g) { + var fas = []; + var stack = {}; + var visited = {}; + + function dfs(v) { + if (has/* default */.A(visited, v)) { + return; + } + visited[v] = true; + stack[v] = true; + forEach/* default */.A(g.outEdges(v), function (e) { + if (has/* default */.A(stack, e.w)) { + fas.push(e); + } else { + dfs(e.w); + } + }); + delete stack[v]; + } + + forEach/* default */.A(g.nodes(), dfs); + return fas; +} + +function undo(g) { + forEach/* default */.A(g.edges(), function (e) { + var label = g.edge(e); + if (label.reversed) { + g.removeEdge(e); + + var forwardName = label.forwardName; + delete label.reversed; + delete label.forwardName; + g.setEdge(e.w, e.v, label, forwardName); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules +var merge = __webpack_require__(8879); +// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules +var pick = __webpack_require__(1942); +// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js +var defaults = __webpack_require__(3068); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js + + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !(0,isSymbol/* default */.A)(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +/* harmony default export */ const _baseExtremum = (baseExtremum); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +/* harmony default export */ const _baseGt = (baseGt); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js + + + + +/** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ +function max(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseGt) + : undefined; +} + +/* harmony default export */ const lodash_es_max = (max); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +/* harmony default export */ const lodash_es_last = (last); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js +var _baseAssignValue = __webpack_require__(2528); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js + + + + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); + + (0,_baseForOwn/* default */.A)(object, function(value, key, object) { + (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ const lodash_es_mapValues = (mapValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +/* harmony default export */ const _baseLt = (baseLt); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js + + + + +/** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ +function min(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_min = (min); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js +var _root = __webpack_require__(1917); +;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js + + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return _root/* default */.A.Date.now(); +}; + +/* harmony default export */ const lodash_es_now = (now); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js + + + + + +/* + * Adds a dummy node to the graph and return v. + */ +function addDummyNode(g, type, attrs, name) { + var v; + do { + v = uniqueId/* default */.A(name); + } while (g.hasNode(v)); + + attrs.dummy = type; + g.setNode(v, attrs); + return v; +} + +/* + * Returns a new graph with only simple edges. Handles aggregation of data + * associated with multi-edges. + */ +function simplify(g) { + var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + simplified.setNode(v, g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; + var label = g.edge(e); + simplified.setEdge(e.v, e.w, { + weight: simpleLabel.weight + label.weight, + minlen: Math.max(simpleLabel.minlen, label.minlen), + }); + }); + return simplified; +} + +function asNonCompoundGraph(g) { + var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + if (!g.children(v).length) { + simplified.setNode(v, g.node(v)); + } + }); + forEach/* default */.A(g.edges(), function (e) { + simplified.setEdge(e, g.edge(e)); + }); + return simplified; +} + +function successorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var sucs = {}; + _.forEach(g.outEdges(v), function (e) { + sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; + }); + return sucs; + }); + return _.zipObject(g.nodes(), weightMap); +} + +function predecessorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var preds = {}; + _.forEach(g.inEdges(v), function (e) { + preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; + }); + return preds; + }); + return _.zipObject(g.nodes(), weightMap); +} + +/* + * Finds where a line starting at point ({x, y}) would intersect a rectangle + * ({x, y, width, height}) if it were pointing at the rectangle's center. + */ +function intersectRect(rect, point) { + var x = rect.x; + var y = rect.y; + + // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes + var dx = point.x - x; + var dy = point.y - y; + var w = rect.width / 2; + var h = rect.height / 2; + + if (!dx && !dy) { + throw new Error('Not possible to find intersection inside of the rectangle'); + } + + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } + sx = (h * dx) / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } + sx = w; + sy = (w * dy) / dx; + } + + return { x: x + sx, y: y + sy }; +} + +/* + * Given a DAG with each node assigned "rank" and "order" properties, this + * function will produce a matrix with the ids of each node. + */ +function buildLayerMatrix(g) { + var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { + return []; + }); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + var rank = node.rank; + if (!isUndefined/* default */.A(rank)) { + layering[rank][node.order] = v; + } + }); + return layering; +} + +/* + * Adjusts the ranks for all nodes in the graph such that all nodes v have + * rank(v) >= 0 and at least one node w has rank(w) = 0. + */ +function normalizeRanks(g) { + var min = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (has/* default */.A(node, 'rank')) { + node.rank -= min; + } + }); +} + +function removeEmptyRanks(g) { + // Ranks may not start at 0, so we need to offset them + var offset = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + + var layers = []; + forEach/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank - offset; + if (!layers[rank]) { + layers[rank] = []; + } + layers[rank].push(v); + }); + + var delta = 0; + var nodeRankFactor = g.graph().nodeRankFactor; + forEach/* default */.A(layers, function (vs, i) { + if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { + --delta; + } else if (delta) { + forEach/* default */.A(vs, function (v) { + g.node(v).rank += delta; + }); + } + }); +} + +function addBorderNode(g, prefix, rank, order) { + var node = { + width: 0, + height: 0, + }; + if (arguments.length >= 4) { + node.rank = rank; + node.order = order; + } + return addDummyNode(g, 'border', node, prefix); +} + +function util_maxRank(g) { + return lodash_es_max( + map/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank; + if (!isUndefined/* default */.A(rank)) { + return rank; + } + }) + ); +} + +/* + * Partition a collection into two groups: `lhs` and `rhs`. If the supplied + * function returns true for an entry it goes into `lhs`. Otherwise it goes + * into `rhs. + */ +function partition(collection, fn) { + var result = { lhs: [], rhs: [] }; + forEach/* default */.A(collection, function (value) { + if (fn(value)) { + result.lhs.push(value); + } else { + result.rhs.push(value); + } + }); + return result; +} + +/* + * Returns a new function that wraps `fn` with a timer. The wrapper logs the + * time it takes to execute the function. + */ +function util_time(name, fn) { + var start = lodash_es_now(); + try { + return fn(); + } finally { + console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); + } +} + +function notime(name, fn) { + return fn(); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js + + + + + +function addBorderSegments(g) { + function dfs(v) { + var children = g.children(v); + var node = g.node(v); + if (children.length) { + forEach/* default */.A(children, dfs); + } + + if (has/* default */.A(node, 'minRank')) { + node.borderLeft = []; + node.borderRight = []; + for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { + add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); + add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); + } + } + } + + forEach/* default */.A(g.children(), dfs); +} + +function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { + var label = { width: 0, height: 0, rank: rank, borderType: prop }; + var prev = sgNode[prop][rank - 1]; + var curr = addDummyNode(g, 'border', label, prefix); + sgNode[prop][rank] = curr; + g.setParent(curr, sg); + if (prev) { + g.setEdge(prev, curr, { weight: 1 }); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js + + + + +function adjust(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'lr' || rankDir === 'rl') { + swapWidthHeight(g); + } +} + +function coordinate_system_undo(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'bt' || rankDir === 'rl') { + reverseY(g); + } + + if (rankDir === 'lr' || rankDir === 'rl') { + swapXY(g); + swapWidthHeight(g); + } +} + +function swapWidthHeight(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapWidthHeightOne(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + swapWidthHeightOne(g.edge(e)); + }); +} + +function swapWidthHeightOne(attrs) { + var w = attrs.width; + attrs.width = attrs.height; + attrs.height = w; +} + +function reverseY(g) { + forEach/* default */.A(g.nodes(), function (v) { + reverseYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, reverseYOne); + if (has/* default */.A(edge, 'y')) { + reverseYOne(edge); + } + }); +} + +function reverseYOne(attrs) { + attrs.y = -attrs.y; +} + +function swapXY(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapXYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, swapXYOne); + if (has/* default */.A(edge, 'x')) { + swapXYOne(edge); + } + }); +} + +function swapXYOne(attrs) { + var x = attrs.x; + attrs.x = attrs.y; + attrs.y = x; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js + + + + + +/* + * Breaks any long edges in the graph into short segments that span 1 layer + * each. This operation is undoable with the denormalize function. + * + * Pre-conditions: + * + * 1. The input graph is a DAG. + * 2. Each node in the graph has a "rank" property. + * + * Post-condition: + * + * 1. All edges in the graph have a length of 1. + * 2. Dummy nodes are added where edges have been split into segments. + * 3. The graph is augmented with a "dummyChains" attribute which contains + * the first dummy in each chain of dummy nodes produced. + */ +function normalize_run(g) { + g.graph().dummyChains = []; + forEach/* default */.A(g.edges(), function (edge) { + normalizeEdge(g, edge); + }); +} + +function normalizeEdge(g, e) { + var v = e.v; + var vRank = g.node(v).rank; + var w = e.w; + var wRank = g.node(w).rank; + var name = e.name; + var edgeLabel = g.edge(e); + var labelRank = edgeLabel.labelRank; + + if (wRank === vRank + 1) return; + + g.removeEdge(e); + + var dummy, attrs, i; + for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { + edgeLabel.points = []; + attrs = { + width: 0, + height: 0, + edgeLabel: edgeLabel, + edgeObj: e, + rank: vRank, + }; + dummy = addDummyNode(g, 'edge', attrs, '_d'); + if (vRank === labelRank) { + attrs.width = edgeLabel.width; + attrs.height = edgeLabel.height; + // @ts-expect-error + attrs.dummy = 'edge-label'; + // @ts-expect-error + attrs.labelpos = edgeLabel.labelpos; + } + g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); + if (i === 0) { + g.graph().dummyChains.push(dummy); + } + v = dummy; + } + + g.setEdge(v, w, { weight: edgeLabel.weight }, name); +} + +function normalize_undo(g) { + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var origLabel = node.edgeLabel; + var w; + g.setEdge(node.edgeObj, origLabel); + while (node.dummy) { + w = g.successors(v)[0]; + g.removeNode(v); + origLabel.points.push({ x: node.x, y: node.y }); + if (node.dummy === 'edge-label') { + origLabel.x = node.x; + origLabel.y = node.y; + origLabel.width = node.width; + origLabel.height = node.height; + } + v = w; + node = g.node(v); + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js + + + + +/** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ +function minBy(array, iteratee) { + return (array && array.length) + ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_minBy = (minBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js + + + + +/* + * Initializes ranks for the input graph using the longest path algorithm. This + * algorithm scales well and is fast in practice, it yields rather poor + * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom + * ranks wide and leaving edges longer than necessary. However, due to its + * speed, this algorithm is good for getting an initial ranking that can be fed + * into other algorithms. + * + * This algorithm does not normalize layers because it will be used by other + * algorithms in most cases. If using this algorithm directly, be sure to + * run normalize at the end. + * + * Pre-conditions: + * + * 1. Input graph is a DAG. + * 2. Input graph node labels can be assigned properties. + * + * Post-conditions: + * + * 1. Each node will be assign an (unnormalized) "rank" property. + */ +function longestPath(g) { + var visited = {}; + + function dfs(v) { + var label = g.node(v); + if (has/* default */.A(visited, v)) { + return label.rank; + } + visited[v] = true; + + var rank = lodash_es_min( + map/* default */.A(g.outEdges(v), function (e) { + return dfs(e.w) - g.edge(e).minlen; + }) + ); + + if ( + rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + rank === undefined || // return value of _.map([]) for Lodash 4 + rank === null + ) { + // return value of _.map([null]) + rank = 0; + } + + return (label.rank = rank); + } + + forEach/* default */.A(g.sources(), dfs); +} + +/* + * Returns the amount of slack for the given edge. The slack is defined as the + * difference between the length of the edge and its minimum length. + */ +function slack(g, e) { + return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js + + + + + + +/* + * Constructs a spanning tree with tight edges and adjusted the input node's + * ranks to achieve this. A tight edge is one that is has a length that matches + * its "minlen" attribute. + * + * The basic structure for this function is derived from Gansner, et al., "A + * Technique for Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a DAG. + * 2. Graph must be connected. + * 3. Graph must have at least one node. + * 5. Graph nodes must have been previously assigned a "rank" property that + * respects the "minlen" property of incident edges. + * 6. Graph edges must have a "minlen" property. + * + * Post-conditions: + * + * - Graph nodes will have their rank adjusted to ensure that all edges are + * tight. + * + * Returns a tree (undirected graph) that is constructed using only "tight" + * edges. + */ +function feasibleTree(g) { + var t = new graphlib/* Graph */.T({ directed: false }); + + // Choose arbitrary node from which to start our tree + var start = g.nodes()[0]; + var size = g.nodeCount(); + t.setNode(start, {}); + + var edge, delta; + while (tightTree(t, g) < size) { + edge = findMinSlackEdge(t, g); + delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); + shiftRanks(t, g, delta); + } + + return t; +} + +/* + * Finds a maximal tree of tight edges and returns the number of nodes in the + * tree. + */ +function tightTree(t, g) { + function dfs(v) { + forEach/* default */.A(g.nodeEdges(v), function (e) { + var edgeV = e.v, + w = v === edgeV ? e.w : edgeV; + if (!t.hasNode(w) && !slack(g, e)) { + t.setNode(w, {}); + t.setEdge(v, w, {}); + dfs(w); + } + }); + } + + forEach/* default */.A(t.nodes(), dfs); + return t.nodeCount(); +} + +/* + * Finds the edge with the smallest slack that is incident on tree and returns + * it. + */ +function findMinSlackEdge(t, g) { + return lodash_es_minBy(g.edges(), function (e) { + if (t.hasNode(e.v) !== t.hasNode(e.w)) { + return slack(g, e); + } + }); +} + +function shiftRanks(t, g, delta) { + forEach/* default */.A(t.nodes(), function (v) { + g.node(v).rank += delta; + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js + + + + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!(0,isArrayLike/* default */.A)(collection)) { + var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); + collection = (0,keys/* default */.A)(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +/* harmony default export */ const _createFind = (createFind); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js + + +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = (0,toFinite/* default */.A)(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +/* harmony default export */ const lodash_es_toInteger = (toInteger); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); +} + +/* harmony default export */ const lodash_es_findIndex = (findIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js + + + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = _createFind(lodash_es_findIndex); + +/* harmony default export */ const lodash_es_find = (find); + +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js + + + + + +var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function dijkstra_dijkstra(g, source, weightFn, edgeFn) { + return runDijkstra( + g, + String(source), + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runDijkstra(g, source, weightFn, edgeFn) { + var results = {}; + var pq = new PriorityQueue(); + var v, vEntry; + + var updateNeighbors = function (edge) { + var w = edge.v !== v ? edge.v : edge.w; + var wEntry = results[w]; + var weight = weightFn(edge); + var distance = vEntry.distance + weight; + + if (weight < 0) { + throw new Error( + 'dijkstra does not allow negative edge weights. ' + + 'Bad edge: ' + + edge + + ' Weight: ' + + weight + ); + } + + if (distance < wEntry.distance) { + wEntry.distance = distance; + wEntry.predecessor = v; + pq.decrease(w, distance); + } + }; + + g.nodes().forEach(function (v) { + var distance = v === source ? 0 : Number.POSITIVE_INFINITY; + results[v] = { distance: distance }; + pq.add(v, distance); + }); + + while (pq.size() > 0) { + v = pq.removeMin(); + vEntry = results[v]; + if (vEntry.distance === Number.POSITIVE_INFINITY) { + break; + } + + edgeFn(v).forEach(updateNeighbors); + } + + return results; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js + + + + + +function dijkstraAll(g, weightFunc, edgeFunc) { + return _.transform( + g.nodes(), + function (acc, v) { + acc[v] = dijkstra(g, v, weightFunc, edgeFunc); + }, + {} + ); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js + + + + +var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function floydWarshall(g, weightFn, edgeFn) { + return runFloydWarshall( + g, + weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runFloydWarshall(g, weightFn, edgeFn) { + var results = {}; + var nodes = g.nodes(); + + nodes.forEach(function (v) { + results[v] = {}; + results[v][v] = { distance: 0 }; + nodes.forEach(function (w) { + if (v !== w) { + results[v][w] = { distance: Number.POSITIVE_INFINITY }; + } + }); + edgeFn(v).forEach(function (edge) { + var w = edge.v === v ? edge.w : edge.v; + var d = weightFn(edge); + results[v][w] = { distance: d, predecessor: v }; + }); + }); + + nodes.forEach(function (k) { + var rowK = results[k]; + nodes.forEach(function (i) { + var rowI = results[i]; + nodes.forEach(function (j) { + var ik = rowI[k]; + var kj = rowK[j]; + var ij = rowI[j]; + var altDistance = ik.distance + kj.distance; + if (altDistance < ij.distance) { + ij.distance = altDistance; + ij.predecessor = kj.predecessor; + } + }); + }); + }); + + return results; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules +var _baseKeys = __webpack_require__(1852); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules +var _baseGetTag = __webpack_require__(8496); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js + + + + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); +} + +/* harmony default export */ const lodash_es_isString = (isString); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js + + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = (0,_baseProperty/* default */.A)('length'); + +/* harmony default export */ const _asciiSize = (asciiSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/* harmony default export */ const _hasUnicode = (hasUnicode); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js +/** Used to compose unicode character classes. */ +var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', + _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', + _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', + _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', + _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, + _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', + rsCombo = '[' + _unicodeSize_rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + _unicodeSize_rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', + rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +/* harmony default export */ const _unicodeSize = (unicodeSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js + + + + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return _hasUnicode(string) + ? _unicodeSize(string) + : _asciiSize(string); +} + +/* harmony default export */ const _stringSize = (stringSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + if (collection == null) { + return 0; + } + if ((0,isArrayLike/* default */.A)(collection)) { + return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; + } + var tag = (0,_getTag/* default */.A)(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return (0,_baseKeys/* default */.A)(collection).length; +} + +/* harmony default export */ const lodash_es_size = (size); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js + + + + +topsort_topsort.CycleException = topsort_CycleException; + +function topsort_topsort(g) { + var visited = {}; + var stack = {}; + var results = []; + + function visit(node) { + if (has/* default */.A(stack, node)) { + throw new topsort_CycleException(); + } + + if (!has/* default */.A(visited, node)) { + stack[node] = true; + visited[node] = true; + forEach/* default */.A(g.predecessors(node), visit); + delete stack[node]; + results.push(node); + } + } + + forEach/* default */.A(g.sinks(), visit); + + if (lodash_es_size(visited) !== g.nodeCount()) { + throw new topsort_CycleException(); + } + + return results; +} + +function topsort_CycleException() {} +topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js + + + + +function isAcyclic(g) { + try { + topsort(g); + } catch (e) { + if (e instanceof CycleException) { + return false; + } + throw e; + } + return true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js + + + + +/* + * A helper that preforms a pre- or post-order traversal on the input graph + * and returns the nodes in the order they were visited. If the graph is + * undirected then this algorithm will navigate using neighbors. If the graph + * is directed then this algorithm will navigate using successors. + * + * Order must be one of "pre" or "post". + */ +function dfs(g, vs, order) { + if (!isArray/* default */.A(vs)) { + vs = [vs]; + } + + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); + + var acc = []; + var visited = {}; + forEach/* default */.A(vs, function (v) { + if (!g.hasNode(v)) { + throw new Error('Graph does not have node: ' + v); + } + + doDfs(g, v, order === 'post', visited, navigation, acc); + }); + return acc; +} + +function doDfs(g, v, postorder, visited, navigation, acc) { + if (!has/* default */.A(visited, v)) { + visited[v] = true; + + if (!postorder) { + acc.push(v); + } + forEach/* default */.A(navigation(v), function (w) { + doDfs(g, w, postorder, visited, navigation, acc); + }); + if (postorder) { + acc.push(v); + } + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js + + + + +function postorder(g, vs) { + return dfs(g, vs, 'post'); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js + + + + +function preorder(g, vs) { + return dfs(g, vs, 'pre'); +} + +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules +var graph = __webpack_require__(3046); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js + + + + + + +function prim(g, weightFunc) { + var result = new Graph(); + var parents = {}; + var pq = new PriorityQueue(); + var v; + + function updateNeighbors(edge) { + var w = edge.v === v ? edge.w : edge.v; + var pri = pq.priority(w); + if (pri !== undefined) { + var edgeWeight = weightFunc(edge); + if (edgeWeight < pri) { + parents[w] = v; + pq.decrease(w, edgeWeight); + } + } + } + + if (g.nodeCount() === 0) { + return result; + } + + _.each(g.nodes(), function (v) { + pq.add(v, Number.POSITIVE_INFINITY); + result.setNode(v); + }); + + // Start from an arbitrary node + pq.decrease(g.nodes()[0], 0); + + var init = false; + while (pq.size() > 0) { + v = pq.removeMin(); + if (_.has(parents, v)) { + result.setEdge(v, parents[v]); + } else if (init) { + throw new Error('Input graph is not connected: ' + g); + } else { + init = true; + } + + g.nodeEdges(v).forEach(updateNeighbors); + } + + return result; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js + + + + + + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js + + + + + + + + +// Expose some internals for testing purposes +networkSimplex.initLowLimValues = initLowLimValues; +networkSimplex.initCutValues = initCutValues; +networkSimplex.calcCutValue = calcCutValue; +networkSimplex.leaveEdge = leaveEdge; +networkSimplex.enterEdge = enterEdge; +networkSimplex.exchangeEdges = exchangeEdges; + +/* + * The network simplex algorithm assigns ranks to each node in the input graph + * and iteratively improves the ranking to reduce the length of edges. + * + * Preconditions: + * + * 1. The input graph must be a DAG. + * 2. All nodes in the graph must have an object value. + * 3. All edges in the graph must have "minlen" and "weight" attributes. + * + * Postconditions: + * + * 1. All nodes in the graph will have an assigned "rank" attribute that has + * been optimized by the network simplex algorithm. Ranks start at 0. + * + * + * A rough sketch of the algorithm is as follows: + * + * 1. Assign initial ranks to each node. We use the longest path algorithm, + * which assigns ranks to the lowest position possible. In general this + * leads to very wide bottom ranks and unnecessarily long edges. + * 2. Construct a feasible tight tree. A tight tree is one such that all + * edges in the tree have no slack (difference between length of edge + * and minlen for the edge). This by itself greatly improves the assigned + * rankings by shorting edges. + * 3. Iteratively find edges that have negative cut values. Generally a + * negative cut value indicates that the edge could be removed and a new + * tree edge could be added to produce a more compact graph. + * + * Much of the algorithms here are derived from Gansner, et al., "A Technique + * for Drawing Directed Graphs." The structure of the file roughly follows the + * structure of the overall algorithm. + */ +function networkSimplex(g) { + g = simplify(g); + longestPath(g); + var t = feasibleTree(g); + initLowLimValues(t); + initCutValues(t, g); + + var e, f; + while ((e = leaveEdge(t))) { + f = enterEdge(t, g, e); + exchangeEdges(t, g, e, f); + } +} + +/* + * Initializes cut values for all edges in the tree. + */ +function initCutValues(t, g) { + var vs = postorder(t, t.nodes()); + vs = vs.slice(0, vs.length - 1); + forEach/* default */.A(vs, function (v) { + assignCutValue(t, g, v); + }); +} + +function assignCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + t.edge(child, parent).cutvalue = calcCutValue(t, g, child); +} + +/* + * Given the tight tree, its graph, and a child in the graph calculate and + * return the cut value for the edge between the child and its parent. + */ +function calcCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + // True if the child is on the tail end of the edge in the directed graph + var childIsTail = true; + // The graph's view of the tree edge we're inspecting + var graphEdge = g.edge(child, parent); + // The accumulated cut value for the edge between this node and its parent + var cutValue = 0; + + if (!graphEdge) { + childIsTail = false; + graphEdge = g.edge(parent, child); + } + + cutValue = graphEdge.weight; + + forEach/* default */.A(g.nodeEdges(child), function (e) { + var isOutEdge = e.v === child, + other = isOutEdge ? e.w : e.v; + + if (other !== parent) { + var pointsToHead = isOutEdge === childIsTail, + otherWeight = g.edge(e).weight; + + cutValue += pointsToHead ? otherWeight : -otherWeight; + if (isTreeEdge(t, child, other)) { + var otherCutValue = t.edge(child, other).cutvalue; + cutValue += pointsToHead ? -otherCutValue : otherCutValue; + } + } + }); + + return cutValue; +} + +function initLowLimValues(tree, root) { + if (arguments.length < 2) { + root = tree.nodes()[0]; + } + dfsAssignLowLim(tree, {}, 1, root); +} + +function dfsAssignLowLim(tree, visited, nextLim, v, parent) { + var low = nextLim; + var label = tree.node(v); + + visited[v] = true; + forEach/* default */.A(tree.neighbors(v), function (w) { + if (!has/* default */.A(visited, w)) { + nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); + } + }); + + label.low = low; + label.lim = nextLim++; + if (parent) { + label.parent = parent; + } else { + // TODO should be able to remove this when we incrementally update low lim + delete label.parent; + } + + return nextLim; +} + +function leaveEdge(tree) { + return lodash_es_find(tree.edges(), function (e) { + return tree.edge(e).cutvalue < 0; + }); +} + +function enterEdge(t, g, edge) { + var v = edge.v; + var w = edge.w; + + // For the rest of this function we assume that v is the tail and w is the + // head, so if we don't have this edge in the graph we should flip it to + // match the correct orientation. + if (!g.hasEdge(v, w)) { + v = edge.w; + w = edge.v; + } + + var vLabel = t.node(v); + var wLabel = t.node(w); + var tailLabel = vLabel; + var flip = false; + + // If the root is in the tail of the edge then we need to flip the logic that + // checks for the head and tail nodes in the candidates function below. + if (vLabel.lim > wLabel.lim) { + tailLabel = wLabel; + flip = true; + } + + var candidates = filter/* default */.A(g.edges(), function (edge) { + return ( + flip === isDescendant(t, t.node(edge.v), tailLabel) && + flip !== isDescendant(t, t.node(edge.w), tailLabel) + ); + }); + + return lodash_es_minBy(candidates, function (edge) { + return slack(g, edge); + }); +} + +function exchangeEdges(t, g, e, f) { + var v = e.v; + var w = e.w; + t.removeEdge(v, w); + t.setEdge(f.v, f.w, {}); + initLowLimValues(t); + initCutValues(t, g); + updateRanks(t, g); +} + +function updateRanks(t, g) { + var root = lodash_es_find(t.nodes(), function (v) { + return !g.node(v).parent; + }); + var vs = preorder(t, root); + vs = vs.slice(1); + forEach/* default */.A(vs, function (v) { + var parent = t.node(v).parent, + edge = g.edge(v, parent), + flipped = false; + + if (!edge) { + edge = g.edge(parent, v); + flipped = true; + } + + g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); + }); +} + +/* + * Returns true if the edge is in the tree. + */ +function isTreeEdge(tree, u, v) { + return tree.hasEdge(u, v); +} + +/* + * Returns true if the specified node is descendant of the root node per the + * assigned low and lim attributes in the tree. + */ +function isDescendant(tree, vLabel, rootLabel) { + return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js + + + + + + +/* + * Assigns a rank to each node in the input graph that respects the "minlen" + * constraint specified on edges between nodes. + * + * This basic structure is derived from Gansner, et al., "A Technique for + * Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a connected DAG + * 2. Graph nodes must be objects + * 3. Graph edges must have "weight" and "minlen" attributes + * + * Post-conditions: + * + * 1. Graph nodes will have a "rank" attribute based on the results of the + * algorithm. Ranks can start at any index (including negative), we'll + * fix them up later. + */ +function rank(g) { + switch (g.graph().ranker) { + case 'network-simplex': + networkSimplexRanker(g); + break; + case 'tight-tree': + tightTreeRanker(g); + break; + case 'longest-path': + longestPathRanker(g); + break; + default: + networkSimplexRanker(g); + } +} + +// A fast and simple ranker, but results are far from optimal. +var longestPathRanker = longestPath; + +function tightTreeRanker(g) { + longestPath(g); + feasibleTree(g); +} + +function networkSimplexRanker(g) { + networkSimplex(g); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js + + + + + +/* + * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, + * adds appropriate edges to ensure that all cluster nodes are placed between + * these boundries, and ensures that the graph is connected. + * + * In addition we ensure, through the use of the minlen property, that nodes + * and subgraph border nodes to not end up on the same rank. + * + * Preconditions: + * + * 1. Input graph is a DAG + * 2. Nodes in the input graph has a minlen attribute + * + * Postconditions: + * + * 1. Input graph is connected. + * 2. Dummy nodes are added for the tops and bottoms of subgraphs. + * 3. The minlen attribute for nodes is adjusted to ensure nodes do not + * get placed on the same rank as subgraph border nodes. + * + * The nesting graph idea comes from Sander, "Layout of Compound Directed + * Graphs." + */ +function nesting_graph_run(g) { + var root = addDummyNode(g, 'root', {}, '_root'); + var depths = treeDepths(g); + var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array + var nodeSep = 2 * height + 1; + + g.graph().nestingRoot = root; + + // Multiply minlen by nodeSep to align nodes on non-border ranks. + forEach/* default */.A(g.edges(), function (e) { + g.edge(e).minlen *= nodeSep; + }); + + // Calculate a weight that is sufficient to keep subgraphs vertically compact + var weight = sumWeights(g) + 1; + + // Create border nodes and link them up + forEach/* default */.A(g.children(), function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + }); + + // Save the multiplier for node layers for later removal of empty border + // layers. + g.graph().nodeRankFactor = nodeSep; +} + +function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { + var children = g.children(v); + if (!children.length) { + if (v !== root) { + g.setEdge(root, v, { weight: 0, minlen: nodeSep }); + } + return; + } + + var top = addBorderNode(g, '_bt'); + var bottom = addBorderNode(g, '_bb'); + var label = g.node(v); + + g.setParent(top, v); + label.borderTop = top; + g.setParent(bottom, v); + label.borderBottom = bottom; + + forEach/* default */.A(children, function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + + var childNode = g.node(child); + var childTop = childNode.borderTop ? childNode.borderTop : child; + var childBottom = childNode.borderBottom ? childNode.borderBottom : child; + var thisWeight = childNode.borderTop ? weight : 2 * weight; + var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; + + g.setEdge(top, childTop, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + + g.setEdge(childBottom, bottom, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + }); + + if (!g.parent(v)) { + g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); + } +} + +function treeDepths(g) { + var depths = {}; + function dfs(v, depth) { + var children = g.children(v); + if (children && children.length) { + forEach/* default */.A(children, function (child) { + dfs(child, depth + 1); + }); + } + depths[v] = depth; + } + forEach/* default */.A(g.children(), function (v) { + dfs(v, 1); + }); + return depths; +} + +function sumWeights(g) { + return reduce/* default */.A( + g.edges(), + function (acc, e) { + return acc + g.edge(e).weight; + }, + 0 + ); +} + +function cleanup(g) { + var graphLabel = g.graph(); + g.removeNode(graphLabel.nestingRoot); + delete graphLabel.nestingRoot; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.nestingEdge) { + g.removeEdge(e); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules +var _baseClone = __webpack_require__(1641); +;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js + + + + +function addSubgraphConstraints(g, cg, vs) { + var prev = {}, + rootPrev; + + forEach/* default */.A(vs, function (v) { + var child = g.parent(v), + parent, + prevChild; + while (child) { + parent = g.parent(child); + if (parent) { + prevChild = prev[parent]; + prev[parent] = child; + } else { + prevChild = rootPrev; + rootPrev = child; + } + if (prevChild && prevChild !== child) { + cg.setEdge(prevChild, child); + return; + } + child = parent; + } + }); + + /* + function dfs(v) { + var children = v ? g.children(v) : g.children(); + if (children.length) { + var min = Number.POSITIVE_INFINITY, + subgraphs = []; + _.each(children, function(child) { + var childMin = dfs(child); + if (g.children(child).length) { + subgraphs.push({ v: child, order: childMin }); + } + min = Math.min(min, childMin); + }); + _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { + cg.setEdge(prev.v, curr.v); + return curr; + }); + return min; + } + return g.node(v).order; + } + dfs(undefined); + */ +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js + + + + + +/* + * Constructs a graph that can be used to sort a layer of nodes. The graph will + * contain all base and subgraph nodes from the request layer in their original + * hierarchy and any edges that are incident on these nodes and are of the type + * requested by the "relationship" parameter. + * + * Nodes from the requested rank that do not have parents are assigned a root + * node in the output graph, which is set in the root graph attribute. This + * makes it easy to walk the hierarchy of movable nodes during ordering. + * + * Pre-conditions: + * + * 1. Input graph is a DAG + * 2. Base nodes in the input graph have a rank attribute + * 3. Subgraph nodes in the input graph has minRank and maxRank attributes + * 4. Edges have an assigned weight + * + * Post-conditions: + * + * 1. Output graph has all nodes in the movable rank with preserved + * hierarchy. + * 2. Root nodes in the movable layer are made children of the node + * indicated by the root attribute of the graph. + * 3. Non-movable nodes incident on movable nodes, selected by the + * relationship parameter, are included in the graph (without hierarchy). + * 4. Edges incident on movable nodes, selected by the relationship + * parameter, are added to the output graph. + * 5. The weights for copied edges are aggregated as need, since the output + * graph is not a multi-graph. + */ +function buildLayerGraph(g, rank, relationship) { + var root = createRootNode(g), + result = new graphlib/* Graph */.T({ compound: true }) + .setGraph({ root: root }) + .setDefaultNodeLabel(function (v) { + return g.node(v); + }); + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v), + parent = g.parent(v); + + if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { + result.setNode(v); + result.setParent(v, parent || root); + + // This assumes we have only short edges! + forEach/* default */.A(g[relationship](v), function (e) { + var u = e.v === v ? e.w : e.v, + edge = result.edge(u, v), + weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; + result.setEdge(u, v, { weight: g.edge(e).weight + weight }); + }); + + if (has/* default */.A(node, 'minRank')) { + result.setNode(v, { + borderLeft: node.borderLeft[rank], + borderRight: node.borderRight[rank], + }); + } + } + }); + + return result; +} + +function createRootNode(g) { + var v; + while (g.hasNode((v = uniqueId/* default */.A('_root')))); + return v; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +/* harmony default export */ const _baseZipObject = (baseZipObject); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js + + + +/** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ +function zipObject(props, values) { + return _baseZipObject(props || [], values || [], _assignValue/* default */.A); +} + +/* harmony default export */ const lodash_es_zipObject = (zipObject); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js +var _baseMap = __webpack_require__(2568); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +/* harmony default export */ const _baseSortBy = (baseSortBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js + + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = (0,isSymbol/* default */.A)(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = (0,isSymbol/* default */.A)(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +/* harmony default export */ const _compareAscending = (compareAscending); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js + + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = _compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +/* harmony default export */ const _compareMultiple = (compareMultiple); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js + + + + + + + + + + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + if ((0,isArray/* default */.A)(iteratee)) { + return function(value) { + return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity/* default */.A]; + } + + var index = -1; + iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); + + var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { + var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return _baseSortBy(result, function(object, other) { + return _compareMultiple(object, other, orders); + }); +} + +/* harmony default export */ const _baseOrderBy = (baseOrderBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js + + + + + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ +var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); +}); + +/* harmony default export */ const lodash_es_sortBy = (sortBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js + + + + +/* + * A function that takes a layering (an array of layers, each with an array of + * ordererd nodes) and a graph and returns a weighted crossing count. + * + * Pre-conditions: + * + * 1. Input graph must be simple (not a multigraph), directed, and include + * only simple edges. + * 2. Edges in the input graph must have assigned weights. + * + * Post-conditions: + * + * 1. The graph and layering matrix are left unchanged. + * + * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." + */ +function crossCount(g, layering) { + var cc = 0; + for (var i = 1; i < layering.length; ++i) { + cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); + } + return cc; +} + +function twoLayerCrossCount(g, northLayer, southLayer) { + // Sort all of the edges between the north and south layers by their position + // in the north layer and then the south. Map these edges to the position of + // their head in the south layer. + var southPos = lodash_es_zipObject( + southLayer, + map/* default */.A(southLayer, function (v, i) { + return i; + }) + ); + var southEntries = flatten/* default */.A( + map/* default */.A(northLayer, function (v) { + return lodash_es_sortBy( + map/* default */.A(g.outEdges(v), function (e) { + return { pos: southPos[e.w], weight: g.edge(e).weight }; + }), + 'pos' + ); + }) + ); + + // Build the accumulator tree + var firstIndex = 1; + while (firstIndex < southLayer.length) firstIndex <<= 1; + var treeSize = 2 * firstIndex - 1; + firstIndex -= 1; + var tree = map/* default */.A(new Array(treeSize), function () { + return 0; + }); + + // Calculate the weighted crossings + var cc = 0; + forEach/* default */.A( + // @ts-expect-error + southEntries.forEach(function (entry) { + var index = entry.pos + firstIndex; + tree[index] += entry.weight; + var weightSum = 0; + // @ts-expect-error + while (index > 0) { + // @ts-expect-error + if (index % 2) { + weightSum += tree[index + 1]; + } + // @ts-expect-error + index = (index - 1) >> 1; + tree[index] += entry.weight; + } + cc += entry.weight * weightSum; + }) + ); + + return cc; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js + + + + +/* + * Assigns an initial order value for each node by performing a DFS search + * starting from nodes in the first rank. Nodes are assigned an order in their + * rank as they are first visited. + * + * This approach comes from Gansner, et al., "A Technique for Drawing Directed + * Graphs." + * + * Returns a layering matrix with an array per layer and each layer sorted by + * the order of its nodes. + */ +function initOrder(g) { + var visited = {}; + var simpleNodes = filter/* default */.A(g.nodes(), function (v) { + return !g.children(v).length; + }); + var maxRank = lodash_es_max( + map/* default */.A(simpleNodes, function (v) { + return g.node(v).rank; + }) + ); + var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { + return []; + }); + + function dfs(v) { + if (has/* default */.A(visited, v)) return; + visited[v] = true; + var node = g.node(v); + layers[node.rank].push(v); + forEach/* default */.A(g.successors(v), dfs); + } + + var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { + return g.node(v).rank; + }); + forEach/* default */.A(orderedVs, dfs); + + return layers; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js + + + + +function barycenter(g, movable) { + return map/* default */.A(movable, function (v) { + var inV = g.inEdges(v); + if (!inV.length) { + return { v: v }; + } else { + var result = reduce/* default */.A( + inV, + function (acc, e) { + var edge = g.edge(e), + nodeU = g.node(e.v); + return { + sum: acc.sum + edge.weight * nodeU.order, + weight: acc.weight + edge.weight, + }; + }, + { sum: 0, weight: 0 } + ); + + return { + v: v, + barycenter: result.sum / result.weight, + weight: result.weight, + }; + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js + + + + +/* + * Given a list of entries of the form {v, barycenter, weight} and a + * constraint graph this function will resolve any conflicts between the + * constraint graph and the barycenters for the entries. If the barycenters for + * an entry would violate a constraint in the constraint graph then we coalesce + * the nodes in the conflict into a new node that respects the contraint and + * aggregates barycenter and weight information. + * + * This implementation is based on the description in Forster, "A Fast and + * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it + * differs in some specific details. + * + * Pre-conditions: + * + * 1. Each entry has the form {v, barycenter, weight}, or if the node has + * no barycenter, then {v}. + * + * Returns: + * + * A new list of entries of the form {vs, i, barycenter, weight}. The list + * `vs` may either be a singleton or it may be an aggregation of nodes + * ordered such that they do not violate constraints from the constraint + * graph. The property `i` is the lowest original index of any of the + * elements in `vs`. + */ +function resolveConflicts(entries, cg) { + var mappedEntries = {}; + forEach/* default */.A(entries, function (entry, i) { + var tmp = (mappedEntries[entry.v] = { + indegree: 0, + in: [], + out: [], + vs: [entry.v], + i: i, + }); + if (!isUndefined/* default */.A(entry.barycenter)) { + // @ts-expect-error + tmp.barycenter = entry.barycenter; + // @ts-expect-error + tmp.weight = entry.weight; + } + }); + + forEach/* default */.A(cg.edges(), function (e) { + var entryV = mappedEntries[e.v]; + var entryW = mappedEntries[e.w]; + if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { + entryW.indegree++; + entryV.out.push(mappedEntries[e.w]); + } + }); + + var sourceSet = filter/* default */.A(mappedEntries, function (entry) { + // @ts-expect-error + return !entry.indegree; + }); + + return doResolveConflicts(sourceSet); +} + +function doResolveConflicts(sourceSet) { + var entries = []; + + function handleIn(vEntry) { + return function (uEntry) { + if (uEntry.merged) { + return; + } + if ( + isUndefined/* default */.A(uEntry.barycenter) || + isUndefined/* default */.A(vEntry.barycenter) || + uEntry.barycenter >= vEntry.barycenter + ) { + mergeEntries(vEntry, uEntry); + } + }; + } + + function handleOut(vEntry) { + return function (wEntry) { + wEntry['in'].push(vEntry); + if (--wEntry.indegree === 0) { + sourceSet.push(wEntry); + } + }; + } + + while (sourceSet.length) { + var entry = sourceSet.pop(); + entries.push(entry); + forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); + forEach/* default */.A(entry.out, handleOut(entry)); + } + + return map/* default */.A( + filter/* default */.A(entries, function (entry) { + return !entry.merged; + }), + function (entry) { + return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); + } + ); +} + +function mergeEntries(target, source) { + var sum = 0; + var weight = 0; + + if (target.weight) { + sum += target.barycenter * target.weight; + weight += target.weight; + } + + if (source.weight) { + sum += source.barycenter * source.weight; + weight += source.weight; + } + + target.vs = source.vs.concat(target.vs); + target.barycenter = sum / weight; + target.weight = weight; + target.i = Math.min(source.i, target.i); + source.merged = true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js + + + + + +function sort(entries, biasRight) { + var parts = partition(entries, function (entry) { + return has/* default */.A(entry, 'barycenter'); + }); + var sortable = parts.lhs, + unsortable = lodash_es_sortBy(parts.rhs, function (entry) { + return -entry.i; + }), + vs = [], + sum = 0, + weight = 0, + vsIndex = 0; + + sortable.sort(compareWithBias(!!biasRight)); + + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + + forEach/* default */.A(sortable, function (entry) { + vsIndex += entry.vs.length; + vs.push(entry.vs); + sum += entry.barycenter * entry.weight; + weight += entry.weight; + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + }); + + var result = { vs: flatten/* default */.A(vs) }; + if (weight) { + result.barycenter = sum / weight; + result.weight = weight; + } + return result; +} + +function consumeUnsortable(vs, unsortable, index) { + var last; + while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { + unsortable.pop(); + vs.push(last.vs); + index++; + } + return index; +} + +function compareWithBias(bias) { + return function (entryV, entryW) { + if (entryV.barycenter < entryW.barycenter) { + return -1; + } else if (entryV.barycenter > entryW.barycenter) { + return 1; + } + + return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; + }; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js + + + + + + + +function sortSubgraph(g, v, cg, biasRight) { + var movable = g.children(v); + var node = g.node(v); + var bl = node ? node.borderLeft : undefined; + var br = node ? node.borderRight : undefined; + var subgraphs = {}; + + if (bl) { + movable = filter/* default */.A(movable, function (w) { + return w !== bl && w !== br; + }); + } + + var barycenters = barycenter(g, movable); + forEach/* default */.A(barycenters, function (entry) { + if (g.children(entry.v).length) { + var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); + subgraphs[entry.v] = subgraphResult; + if (has/* default */.A(subgraphResult, 'barycenter')) { + mergeBarycenters(entry, subgraphResult); + } + } + }); + + var entries = resolveConflicts(barycenters, cg); + expandSubgraphs(entries, subgraphs); + + var result = sort(entries, biasRight); + + if (bl) { + result.vs = flatten/* default */.A([bl, result.vs, br]); + if (g.predecessors(bl).length) { + var blPred = g.node(g.predecessors(bl)[0]), + brPred = g.node(g.predecessors(br)[0]); + if (!has/* default */.A(result, 'barycenter')) { + result.barycenter = 0; + result.weight = 0; + } + result.barycenter = + (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); + result.weight += 2; + } + } + + return result; +} + +function expandSubgraphs(entries, subgraphs) { + forEach/* default */.A(entries, function (entry) { + entry.vs = flatten/* default */.A( + entry.vs.map(function (v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }) + ); + }); +} + +function mergeBarycenters(target, other) { + if (!isUndefined/* default */.A(target.barycenter)) { + target.barycenter = + (target.barycenter * target.weight + other.barycenter * other.weight) / + (target.weight + other.weight); + target.weight += other.weight; + } else { + target.barycenter = other.barycenter; + target.weight = other.weight; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js + + + + + + + + + + + +/* + * Applies heuristics to minimize edge crossings in the graph and sets the best + * order solution as an order attribute on each node. + * + * Pre-conditions: + * + * 1. Graph must be DAG + * 2. Graph nodes must be objects with a "rank" attribute + * 3. Graph edges must have the "weight" attribute + * + * Post-conditions: + * + * 1. Graph nodes will have an "order" attribute based on the results of the + * algorithm. + */ +function order(g) { + var maxRank = util_maxRank(g), + downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), + upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); + + var layering = initOrder(g); + assignOrder(g, layering); + + var bestCC = Number.POSITIVE_INFINITY, + best; + + for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { + sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); + + layering = buildLayerMatrix(g); + var cc = crossCount(g, layering); + if (cc < bestCC) { + lastBest = 0; + best = lodash_es_cloneDeep(layering); + bestCC = cc; + } + } + + assignOrder(g, best); +} + +function buildLayerGraphs(g, ranks, relationship) { + return map/* default */.A(ranks, function (rank) { + return buildLayerGraph(g, rank, relationship); + }); +} + +function sweepLayerGraphs(layerGraphs, biasRight) { + var cg = new graphlib/* Graph */.T(); + forEach/* default */.A(layerGraphs, function (lg) { + var root = lg.graph().root; + var sorted = sortSubgraph(lg, root, cg, biasRight); + forEach/* default */.A(sorted.vs, function (v, i) { + lg.node(v).order = i; + }); + addSubgraphConstraints(lg, cg, sorted.vs); + }); +} + +function assignOrder(g, layering) { + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, i) { + g.node(v).order = i; + }); + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js + + + + +function parentDummyChains(g) { + var postorderNums = parent_dummy_chains_postorder(g); + + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var edgeObj = node.edgeObj; + var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); + var path = pathData.path; + var lca = pathData.lca; + var pathIdx = 0; + var pathV = path[pathIdx]; + var ascending = true; + + while (v !== edgeObj.w) { + node = g.node(v); + + if (ascending) { + while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { + pathIdx++; + } + + if (pathV === lca) { + ascending = false; + } + } + + if (!ascending) { + while ( + pathIdx < path.length - 1 && + g.node((pathV = path[pathIdx + 1])).minRank <= node.rank + ) { + pathIdx++; + } + pathV = path[pathIdx]; + } + + g.setParent(v, pathV); + v = g.successors(v)[0]; + } + }); +} + +// Find a path from v to w through the lowest common ancestor (LCA). Return the +// full path and the LCA. +function findPath(g, postorderNums, v, w) { + var vPath = []; + var wPath = []; + var low = Math.min(postorderNums[v].low, postorderNums[w].low); + var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); + var parent; + var lca; + + // Traverse up from v to find the LCA + parent = v; + do { + parent = g.parent(parent); + vPath.push(parent); + } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); + lca = parent; + + // Traverse from w to LCA + parent = w; + while ((parent = g.parent(parent)) !== lca) { + wPath.push(parent); + } + + return { path: vPath.concat(wPath.reverse()), lca: lca }; +} + +function parent_dummy_chains_postorder(g) { + var result = {}; + var lim = 0; + + function dfs(v) { + var low = lim; + forEach/* default */.A(g.children(v), dfs); + result[v] = { low: low, lim: lim++ }; + } + forEach/* default */.A(g.children(), dfs); + + return result; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js +var _castFunction = __webpack_require__(9922); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js + + + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); +} + +/* harmony default export */ const lodash_es_forOwn = (forOwn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules +var _baseFor = __webpack_require__(4574); +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js + + + + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); +} + +/* harmony default export */ const lodash_es_forIn = (forIn); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js + + + + +/* + * This module provides coordinate assignment based on Brandes and Köpf, "Fast + * and Simple Horizontal Coordinate Assignment." + */ + + + +/* + * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" + * property. A type-1 conflict is one where a non-inner segment crosses an + * inner segment. An inner segment is an edge with both incident nodes marked + * with the "dummy" property. + * + * This algorithm scans layer by layer, starting with the second, for type-1 + * conflicts between the current layer and the previous layer. For each layer + * it scans the nodes from left to right until it reaches one that is incident + * on an inner segment. It then scans predecessors to determine if they have + * edges that cross that inner segment. At the end a final scan is done for all + * nodes on the current rank to see if they cross the last visited inner + * segment. + * + * This algorithm (safely) assumes that a dummy node will only be incident on a + * single node in the layers being scanned. + */ +function findType1Conflicts(g, layering) { + var conflicts = {}; + + function visitLayer(prevLayer, layer) { + var // last visited node in the previous layer that is incident on an inner + // segment. + k0 = 0, + // Tracks the last node in this layer scanned for crossings with a type-1 + // segment. + scanPos = 0, + prevLayerLength = prevLayer.length, + lastNode = lodash_es_last(layer); + + forEach/* default */.A(layer, function (v, i) { + var w = findOtherInnerSegmentNode(g, v), + k1 = w ? g.node(w).order : prevLayerLength; + + if (w || v === lastNode) { + forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { + forEach/* default */.A(g.predecessors(scanNode), function (u) { + var uLabel = g.node(u), + uPos = uLabel.order; + if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { + addConflict(conflicts, u, scanNode); + } + }); + }); + // @ts-expect-error + scanPos = i + 1; + k0 = k1; + } + }); + + return layer; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findType2Conflicts(g, layering) { + var conflicts = {}; + + function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { + var v; + forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { + v = south[i]; + if (g.node(v).dummy) { + forEach/* default */.A(g.predecessors(v), function (u) { + var uNode = g.node(u); + if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { + addConflict(conflicts, u, v); + } + }); + } + }); + } + + function visitLayer(north, south) { + var prevNorthPos = -1, + nextNorthPos, + southPos = 0; + + forEach/* default */.A(south, function (v, southLookahead) { + if (g.node(v).dummy === 'border') { + var predecessors = g.predecessors(v); + if (predecessors.length) { + nextNorthPos = g.node(predecessors[0]).order; + scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); + // @ts-expect-error + southPos = southLookahead; + prevNorthPos = nextNorthPos; + } + } + scan(south, southPos, south.length, nextNorthPos, north.length); + }); + + return south; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findOtherInnerSegmentNode(g, v) { + if (g.node(v).dummy) { + return lodash_es_find(g.predecessors(v), function (u) { + return g.node(u).dummy; + }); + } +} + +function addConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + + var conflictsV = conflicts[v]; + if (!conflictsV) { + conflicts[v] = conflictsV = {}; + } + conflictsV[w] = true; +} + +function hasConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + return has/* default */.A(conflicts[v], w); +} + +/* + * Try to align nodes into vertical "blocks" where possible. This algorithm + * attempts to align a node with one of its median neighbors. If the edge + * connecting a neighbor is a type-1 conflict then we ignore that possibility. + * If a previous node has already formed a block with a node after the node + * we're trying to form a block with, we also ignore that possibility - our + * blocks would be split in that scenario. + */ +function verticalAlignment(g, layering, conflicts, neighborFn) { + var root = {}, + align = {}, + pos = {}; + + // We cache the position here based on the layering because the graph and + // layering may be out of sync. The layering matrix is manipulated to + // generate different extreme alignments. + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, order) { + root[v] = v; + align[v] = v; + pos[v] = order; + }); + }); + + forEach/* default */.A(layering, function (layer) { + var prevIdx = -1; + forEach/* default */.A(layer, function (v) { + var ws = neighborFn(v); + if (ws.length) { + ws = lodash_es_sortBy(ws, function (w) { + return pos[w]; + }); + var mp = (ws.length - 1) / 2; + for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { + var w = ws[i]; + if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { + align[w] = v; + align[v] = root[v] = root[w]; + prevIdx = pos[w]; + } + } + } + }); + }); + + return { root: root, align: align }; +} + +function horizontalCompaction(g, layering, root, align, reverseSep) { + // This portion of the algorithm differs from BK due to a number of problems. + // Instead of their algorithm we construct a new block graph and do two + // sweeps. The first sweep places blocks with the smallest possible + // coordinates. The second sweep removes unused space by moving blocks to the + // greatest coordinates without violating separation. + var xs = {}, + blockG = buildBlockGraph(g, layering, root, reverseSep), + borderType = reverseSep ? 'borderLeft' : 'borderRight'; + + function iterate(setXsFunc, nextNodesFunc) { + var stack = blockG.nodes(); + var elem = stack.pop(); + var visited = {}; + while (elem) { + if (visited[elem]) { + setXsFunc(elem); + } else { + visited[elem] = true; + stack.push(elem); + stack = stack.concat(nextNodesFunc(elem)); + } + + elem = stack.pop(); + } + } + + // First pass, assign smallest coordinates + function pass1(elem) { + xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { + return Math.max(acc, xs[e.v] + blockG.edge(e)); + }, 0); + } + + // Second pass, assign greatest coordinates + function pass2(elem) { + var min = blockG.outEdges(elem).reduce(function (acc, e) { + return Math.min(acc, xs[e.w] - blockG.edge(e)); + }, Number.POSITIVE_INFINITY); + + var node = g.node(elem); + if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { + xs[elem] = Math.max(xs[elem], min); + } + } + + iterate(pass1, blockG.predecessors.bind(blockG)); + iterate(pass2, blockG.successors.bind(blockG)); + + // Assign x coordinates to all nodes + forEach/* default */.A(align, function (v) { + xs[v] = xs[root[v]]; + }); + + return xs; +} + +function buildBlockGraph(g, layering, root, reverseSep) { + var blockGraph = new graphlib/* Graph */.T(), + graphLabel = g.graph(), + sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); + + forEach/* default */.A(layering, function (layer) { + var u; + forEach/* default */.A(layer, function (v) { + var vRoot = root[v]; + blockGraph.setNode(vRoot); + if (u) { + var uRoot = root[u], + prevMax = blockGraph.edge(uRoot, vRoot); + blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); + } + u = v; + }); + }); + + return blockGraph; +} + +/* + * Returns the alignment that has the smallest width of the given alignments. + */ +function findSmallestWidthAlignment(g, xss) { + return lodash_es_minBy(values/* default */.A(xss), function (xs) { + var max = Number.NEGATIVE_INFINITY; + var min = Number.POSITIVE_INFINITY; + + lodash_es_forIn(xs, function (x, v) { + var halfWidth = width(g, v) / 2; + + max = Math.max(x + halfWidth, max); + min = Math.min(x - halfWidth, min); + }); + + return max - min; + }); +} + +/* + * Align the coordinates of each of the layout alignments such that + * left-biased alignments have their minimum coordinate at the same point as + * the minimum coordinate of the smallest width alignment and right-biased + * alignments have their maximum coordinate at the same point as the maximum + * coordinate of the smallest width alignment. + */ +function alignCoordinates(xss, alignTo) { + var alignToVals = values/* default */.A(alignTo), + alignToMin = lodash_es_min(alignToVals), + alignToMax = lodash_es_max(alignToVals); + + forEach/* default */.A(['u', 'd'], function (vert) { + forEach/* default */.A(['l', 'r'], function (horiz) { + var alignment = vert + horiz, + xs = xss[alignment], + delta; + if (xs === alignTo) return; + + var xsVals = values/* default */.A(xs); + delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); + + if (delta) { + xss[alignment] = lodash_es_mapValues(xs, function (x) { + return x + delta; + }); + } + }); + }); +} + +function balance(xss, align) { + return lodash_es_mapValues(xss.ul, function (ignore, v) { + if (align) { + return xss[align.toLowerCase()][v]; + } else { + var xs = lodash_es_sortBy(map/* default */.A(xss, v)); + return (xs[1] + xs[2]) / 2; + } + }); +} + +function positionX(g) { + var layering = buildLayerMatrix(g); + var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); + + var xss = {}; + var adjustedLayering; + forEach/* default */.A(['u', 'd'], function (vert) { + adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); + forEach/* default */.A(['l', 'r'], function (horiz) { + if (horiz === 'r') { + adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { + return values/* default */.A(inner).reverse(); + }); + } + + var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); + var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); + var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); + if (horiz === 'r') { + xs = lodash_es_mapValues(xs, function (x) { + return -x; + }); + } + xss[vert + horiz] = xs; + }); + }); + + var smallestWidth = findSmallestWidthAlignment(g, xss); + alignCoordinates(xss, smallestWidth); + return balance(xss, g.graph().align); +} + +function sep(nodeSep, edgeSep, reverseSep) { + return function (g, v, w) { + var vLabel = g.node(v); + var wLabel = g.node(w); + var sum = 0; + var delta; + + sum += vLabel.width / 2; + if (has/* default */.A(vLabel, 'labelpos')) { + switch (vLabel.labelpos.toLowerCase()) { + case 'l': + delta = -vLabel.width / 2; + break; + case 'r': + delta = vLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; + sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; + + sum += wLabel.width / 2; + if (has/* default */.A(wLabel, 'labelpos')) { + switch (wLabel.labelpos.toLowerCase()) { + case 'l': + delta = wLabel.width / 2; + break; + case 'r': + delta = -wLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + return sum; + }; +} + +function width(g, v) { + return g.node(v).width; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js + + + + + + +function position(g) { + g = asNonCompoundGraph(g); + + positionY(g); + lodash_es_forOwn(positionX(g), function (x, v) { + g.node(v).x = x; + }); +} + +function positionY(g) { + var layering = buildLayerMatrix(g); + var rankSep = g.graph().ranksep; + var prevY = 0; + forEach/* default */.A(layering, function (layer) { + var maxHeight = lodash_es_max( + map/* default */.A(layer, function (v) { + return g.node(v).height; + }) + ); + forEach/* default */.A(layer, function (v) { + g.node(v).y = prevY + maxHeight / 2; + }); + prevY += maxHeight + rankSep; + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js + + + + + + + + + + + + + + + +function layout(g, opts) { + var time = opts && opts.debugTiming ? util_time : notime; + time('layout', function () { + var layoutGraph = time(' buildLayoutGraph', function () { + return buildLayoutGraph(g); + }); + time(' runLayout', function () { + runLayout(layoutGraph, time); + }); + time(' updateInputGraph', function () { + updateInputGraph(g, layoutGraph); + }); + }); +} + +function runLayout(g, time) { + time(' makeSpaceForEdgeLabels', function () { + makeSpaceForEdgeLabels(g); + }); + time(' removeSelfEdges', function () { + removeSelfEdges(g); + }); + time(' acyclic', function () { + run(g); + }); + time(' nestingGraph.run', function () { + nesting_graph_run(g); + }); + time(' rank', function () { + rank(asNonCompoundGraph(g)); + }); + time(' injectEdgeLabelProxies', function () { + injectEdgeLabelProxies(g); + }); + time(' removeEmptyRanks', function () { + removeEmptyRanks(g); + }); + time(' nestingGraph.cleanup', function () { + cleanup(g); + }); + time(' normalizeRanks', function () { + normalizeRanks(g); + }); + time(' assignRankMinMax', function () { + assignRankMinMax(g); + }); + time(' removeEdgeLabelProxies', function () { + removeEdgeLabelProxies(g); + }); + time(' normalize.run', function () { + normalize_run(g); + }); + time(' parentDummyChains', function () { + parentDummyChains(g); + }); + time(' addBorderSegments', function () { + addBorderSegments(g); + }); + time(' order', function () { + order(g); + }); + time(' insertSelfEdges', function () { + insertSelfEdges(g); + }); + time(' adjustCoordinateSystem', function () { + adjust(g); + }); + time(' position', function () { + position(g); + }); + time(' positionSelfEdges', function () { + positionSelfEdges(g); + }); + time(' removeBorderNodes', function () { + removeBorderNodes(g); + }); + time(' normalize.undo', function () { + normalize_undo(g); + }); + time(' fixupEdgeLabelCoords', function () { + fixupEdgeLabelCoords(g); + }); + time(' undoCoordinateSystem', function () { + coordinate_system_undo(g); + }); + time(' translateGraph', function () { + translateGraph(g); + }); + time(' assignNodeIntersects', function () { + assignNodeIntersects(g); + }); + time(' reversePoints', function () { + reversePointsForReversedEdges(g); + }); + time(' acyclic.undo', function () { + undo(g); + }); +} + +/* + * Copies final layout information from the layout graph back to the input + * graph. This process only copies whitelisted attributes from the layout graph + * to the input graph, so it serves as a good place to determine what + * attributes can influence layout. + */ +function updateInputGraph(inputGraph, layoutGraph) { + forEach/* default */.A(inputGraph.nodes(), function (v) { + var inputLabel = inputGraph.node(v); + var layoutLabel = layoutGraph.node(v); + + if (inputLabel) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + + if (layoutGraph.children(v).length) { + inputLabel.width = layoutLabel.width; + inputLabel.height = layoutLabel.height; + } + } + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var inputLabel = inputGraph.edge(e); + var layoutLabel = layoutGraph.edge(e); + + inputLabel.points = layoutLabel.points; + if (has/* default */.A(layoutLabel, 'x')) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + } + }); + + inputGraph.graph().width = layoutGraph.graph().width; + inputGraph.graph().height = layoutGraph.graph().height; +} + +var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; +var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; +var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; +var nodeNumAttrs = ['width', 'height']; +var nodeDefaults = { width: 0, height: 0 }; +var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; +var edgeDefaults = { + minlen: 1, + weight: 1, + width: 0, + height: 0, + labeloffset: 10, + labelpos: 'r', +}; +var edgeAttrs = ['labelpos']; + +/* + * Constructs a new graph from the input graph, which can be used for layout. + * This process copies only whitelisted attributes from the input graph to the + * layout graph. Thus this function serves as a good place to determine what + * attributes can influence layout. + */ +function buildLayoutGraph(inputGraph) { + var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); + var graph = canonicalize(inputGraph.graph()); + + g.setGraph( + merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) + ); + + forEach/* default */.A(inputGraph.nodes(), function (v) { + var node = canonicalize(inputGraph.node(v)); + g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); + g.setParent(v, inputGraph.parent(v)); + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var edge = canonicalize(inputGraph.edge(e)); + g.setEdge( + e, + merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) + ); + }); + + return g; +} + +/* + * This idea comes from the Gansner paper: to account for edge labels in our + * layout we split each rank in half by doubling minlen and halving ranksep. + * Then we can place labels at these mid-points between nodes. + * + * We also add some minimal padding to the width to push the label for the edge + * away from the edge itself a bit. + */ +function makeSpaceForEdgeLabels(g) { + var graph = g.graph(); + graph.ranksep /= 2; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + edge.minlen *= 2; + if (edge.labelpos.toLowerCase() !== 'c') { + if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { + edge.width += edge.labeloffset; + } else { + edge.height += edge.labeloffset; + } + } + }); +} + +/* + * Creates temporary dummy nodes that capture the rank in which each edge's + * label is going to, if it has one of non-zero width and height. We do this + * so that we can safely remove empty ranks while preserving balance for the + * label's position. + */ +function injectEdgeLabelProxies(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.width && edge.height) { + var v = g.node(e.v); + var w = g.node(e.w); + var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; + addDummyNode(g, 'edge-proxy', label, '_ep'); + } + }); +} + +function assignRankMinMax(g) { + var maxRank = 0; + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.borderTop) { + node.minRank = g.node(node.borderTop).rank; + node.maxRank = g.node(node.borderBottom).rank; + // @ts-expect-error + maxRank = lodash_es_max(maxRank, node.maxRank); + } + }); + g.graph().maxRank = maxRank; +} + +function removeEdgeLabelProxies(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'edge-proxy') { + g.edge(node.e).labelRank = node.rank; + g.removeNode(v); + } + }); +} + +function translateGraph(g) { + var minX = Number.POSITIVE_INFINITY; + var maxX = 0; + var minY = Number.POSITIVE_INFINITY; + var maxY = 0; + var graphLabel = g.graph(); + var marginX = graphLabel.marginx || 0; + var marginY = graphLabel.marginy || 0; + + function getExtremes(attrs) { + var x = attrs.x; + var y = attrs.y; + var w = attrs.width; + var h = attrs.height; + minX = Math.min(minX, x - w / 2); + maxX = Math.max(maxX, x + w / 2); + minY = Math.min(minY, y - h / 2); + maxY = Math.max(maxY, y + h / 2); + } + + forEach/* default */.A(g.nodes(), function (v) { + getExtremes(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + getExtremes(edge); + } + }); + + minX -= marginX; + minY -= marginY; + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + node.x -= minX; + node.y -= minY; + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, function (p) { + p.x -= minX; + p.y -= minY; + }); + if (has/* default */.A(edge, 'x')) { + edge.x -= minX; + } + if (has/* default */.A(edge, 'y')) { + edge.y -= minY; + } + }); + + graphLabel.width = maxX - minX + marginX; + graphLabel.height = maxY - minY + marginY; +} + +function assignNodeIntersects(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + var nodeV = g.node(e.v); + var nodeW = g.node(e.w); + var p1, p2; + if (!edge.points) { + edge.points = []; + p1 = nodeW; + p2 = nodeV; + } else { + p1 = edge.points[0]; + p2 = edge.points[edge.points.length - 1]; + } + edge.points.unshift(intersectRect(nodeV, p1)); + edge.points.push(intersectRect(nodeW, p2)); + }); +} + +function fixupEdgeLabelCoords(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + if (edge.labelpos === 'l' || edge.labelpos === 'r') { + edge.width -= edge.labeloffset; + } + switch (edge.labelpos) { + case 'l': + edge.x -= edge.width / 2 + edge.labeloffset; + break; + case 'r': + edge.x += edge.width / 2 + edge.labeloffset; + break; + } + } + }); +} + +function reversePointsForReversedEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.reversed) { + edge.points.reverse(); + } + }); +} + +function removeBorderNodes(g) { + forEach/* default */.A(g.nodes(), function (v) { + if (g.children(v).length) { + var node = g.node(v); + var t = g.node(node.borderTop); + var b = g.node(node.borderBottom); + var l = g.node(lodash_es_last(node.borderLeft)); + var r = g.node(lodash_es_last(node.borderRight)); + + node.width = Math.abs(r.x - l.x); + node.height = Math.abs(b.y - t.y); + node.x = l.x + node.width / 2; + node.y = t.y + node.height / 2; + } + }); + + forEach/* default */.A(g.nodes(), function (v) { + if (g.node(v).dummy === 'border') { + g.removeNode(v); + } + }); +} + +function removeSelfEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + if (e.v === e.w) { + var node = g.node(e.v); + if (!node.selfEdges) { + node.selfEdges = []; + } + node.selfEdges.push({ e: e, label: g.edge(e) }); + g.removeEdge(e); + } + }); +} + +function insertSelfEdges(g) { + var layers = buildLayerMatrix(g); + forEach/* default */.A(layers, function (layer) { + var orderShift = 0; + forEach/* default */.A(layer, function (v, i) { + var node = g.node(v); + node.order = i + orderShift; + forEach/* default */.A(node.selfEdges, function (selfEdge) { + addDummyNode( + g, + 'selfedge', + { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node.rank, + order: i + ++orderShift, + e: selfEdge.e, + label: selfEdge.label, + }, + '_se' + ); + }); + delete node.selfEdges; + }); + }); +} + +function positionSelfEdges(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'selfedge') { + var selfNode = g.node(node.e.v); + var x = selfNode.x + selfNode.width / 2; + var y = selfNode.y; + var dx = node.x - x; + var dy = selfNode.height / 2; + g.setEdge(node.e, node.label); + g.removeNode(v); + node.label.points = [ + { x: x + (2 * dx) / 3, y: y - dy }, + { x: x + (5 * dx) / 6, y: y - dy }, + { x: x + dx, y: y }, + { x: x + (5 * dx) / 6, y: y + dy }, + { x: x + (2 * dx) / 3, y: y + dy }, + ]; + node.label.x = node.x; + node.label.y = node.y; + } + }); +} + +function selectNumberAttrs(obj, attrs) { + return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); +} + +function canonicalize(attrs) { + var newAttrs = {}; + forEach/* default */.A(attrs, function (v, k) { + newAttrs[k.toLowerCase()] = v; + }); + return newAttrs; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + + + + + + + + +/***/ }), + +/***/ 3046: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + T: () => (/* binding */ Graph) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js +var isFunction = __webpack_require__(9610); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js +var isEmpty = __webpack_require__(6401); +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/* harmony default export */ const _baseIsNaN = (baseIsNaN); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/* harmony default export */ const _strictIndexOf = (strictIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js + + + + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? _strictIndexOf(array, value, fromIndex) + : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); +} + +/* harmony default export */ const _baseIndexOf = (baseIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js + + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && _baseIndexOf(array, value, 0) > -1; +} + +/* harmony default export */ const _arrayIncludes = (arrayIncludes); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js +var _Set = __webpack_require__(9857); +;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +/* harmony default export */ const lodash_es_noop = (noop); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { + return new _Set/* default */.A(values); +}; + +/* harmony default export */ const _createSet = (createSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js + + + + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = _arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = _arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : _createSet(array); + if (set) { + return (0,_setToArray/* default */.A)(set); + } + isCommon = false; + includes = _cacheHas/* default */.A; + seen = new _SetCache/* default */.A; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/* harmony default export */ const _baseUniq = (baseUniq); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js +var isArrayLikeObject = __webpack_require__(3533); +;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js + + + + + +/** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ +var union = (0,_baseRest/* default */.A)(function(arrays) { + return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); +}); + +/* harmony default export */ const lodash_es_union = (union); + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + + +var DEFAULT_EDGE_NAME = '\x00'; +var GRAPH_NODE = '\x00'; +var EDGE_KEY_DELIM = '\x01'; + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. +class Graph { + constructor(opts = {}) { + this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; + this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; + this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; + + // Label for the graph itself + this._label = undefined; + + // Defaults to be set when creating a new node + this._defaultNodeLabelFn = constant/* default */.A(undefined); + + // Defaults to be set when creating a new edge + this._defaultEdgeLabelFn = constant/* default */.A(undefined); + + // v -> label + this._nodes = {}; + + if (this._isCompound) { + // v -> parent + this._parent = {}; + + // v -> children + this._children = {}; + this._children[GRAPH_NODE] = {}; + } + + // v -> edgeObj + this._in = {}; + + // u -> v -> Number + this._preds = {}; + + // v -> edgeObj + this._out = {}; + + // v -> w -> Number + this._sucs = {}; + + // e -> edgeObj + this._edgeObjs = {}; + + // e -> label + this._edgeLabels = {}; + } + /* === Graph functions ========= */ + isDirected() { + return this._isDirected; + } + isMultigraph() { + return this._isMultigraph; + } + isCompound() { + return this._isCompound; + } + setGraph(label) { + this._label = label; + return this; + } + graph() { + return this._label; + } + /* === Node functions ========== */ + setDefaultNodeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; + } + nodeCount() { + return this._nodeCount; + } + nodes() { + return keys/* default */.A(this._nodes); + } + sources() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._in[v]); + }); + } + sinks() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._out[v]); + }); + } + setNodes(vs, value) { + var args = arguments; + var self = this; + forEach/* default */.A(vs, function (v) { + if (args.length > 1) { + self.setNode(v, value); + } else { + self.setNode(v); + } + }); + return this; + } + setNode(v, value) { + if (has/* default */.A(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; + } + return this; + } + + // @ts-expect-error + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; + } + node(v) { + return this._nodes[v]; + } + hasNode(v) { + return has/* default */.A(this._nodes, v); + } + removeNode(v) { + var self = this; + if (has/* default */.A(this._nodes, v)) { + var removeEdge = function (e) { + self.removeEdge(self._edgeObjs[e]); + }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + forEach/* default */.A(this.children(v), function (child) { + self.setParent(child); + }); + delete this._children[v]; + } + forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; + } + setParent(v, parent) { + if (!this._isCompound) { + throw new Error('Cannot set parent in a non-compound graph'); + } + + if (isUndefined/* default */.A(parent)) { + parent = GRAPH_NODE; + } else { + // Coerce parent to string + parent += ''; + for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); + } + } + + this.setNode(parent); + } + + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; + } + _removeFromParentsChildList(v) { + delete this._children[this._parent[v]][v]; + } + parent(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } + } + children(v) { + if (isUndefined/* default */.A(v)) { + v = GRAPH_NODE; + } + + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return keys/* default */.A(children); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } + } + predecessors(v) { + var predsV = this._preds[v]; + if (predsV) { + return keys/* default */.A(predsV); + } + } + successors(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return keys/* default */.A(sucsV); + } + } + neighbors(v) { + var preds = this.predecessors(v); + if (preds) { + return lodash_es_union(preds, this.successors(v)); + } + } + isLeaf(v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; + } + filterNodes(filter) { + // @ts-expect-error + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound, + }); + + copy.setGraph(this.graph()); + + var self = this; + forEach/* default */.A(this._nodes, function (value, v) { + if (filter(v)) { + copy.setNode(v, value); + } + }); + + forEach/* default */.A(this._edgeObjs, function (e) { + // @ts-expect-error + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self.edge(e)); + } + }); + + var parents = {}; + function findParent(v) { + var parent = self.parent(v); + if (parent === undefined || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); + } + } + + if (this._isCompound) { + forEach/* default */.A(copy.nodes(), function (v) { + copy.setParent(v, findParent(v)); + }); + } + + return copy; + } + /* === Edge functions ========== */ + setDefaultEdgeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; + } + edgeCount() { + return this._edgeCount; + } + edges() { + return values/* default */.A(this._edgeObjs); + } + setPath(vs, value) { + var self = this; + var args = arguments; + reduce/* default */.A(vs, function (v, w) { + if (args.length > 1) { + self.setEdge(v, w, value); + } else { + self.setEdge(v, w); + } + return w; + }); + return this; + } + /* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ + setEdge() { + var v, w, name, value; + var valueSpecified = false; + var arg0 = arguments[0]; + + if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; + } + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; + } + } + + v = '' + v; + w = '' + w; + if (!isUndefined/* default */.A(name)) { + name = '' + name; + } + + var e = edgeArgsToId(this._isDirected, v, w, name); + if (has/* default */.A(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; + } + return this; + } + + if (!isUndefined/* default */.A(name) && !this._isMultigraph) { + throw new Error('Cannot set a named edge when isMultigraph = false'); + } + + // It didn't exist, so we need to create it. + // First ensure the nodes exist. + this.setNode(v); + this.setNode(w); + + // @ts-expect-error + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + // Ensure we add undirected edges in a consistent way. + v = edgeObj.v; + w = edgeObj.w; + + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; + } + edge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return this._edgeLabels[e]; + } + hasEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return has/* default */.A(this._edgeLabels, e); + } + removeEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; + } + inEdges(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = values/* default */.A(inV); + if (!u) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.v === u; + }); + } + } + outEdges(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = values/* default */.A(outV); + if (!w) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.w === w; + }); + } + } + nodeEdges(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } + } +} + +/* Number of nodes in the graph. Should only be changed by the implementation. */ +Graph.prototype._nodeCount = 0; + +/* Number of edges in the graph. Should only be changed by the implementation. */ +Graph.prototype._edgeCount = 0; + +function incrementOrInitEntry(map, k) { + if (map[k]) { + map[k]++; + } else { + map[k] = 1; + } +} + +function decrementOrRemoveEntry(map, k) { + if (!--map[k]) { + delete map[k]; + } +} + +function edgeArgsToId(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); +} + +function edgeArgsToObj(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v: v, w: w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; +} + +function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); +} + + +/***/ }), + +/***/ 697: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) +/* harmony export */ }); +/* unused harmony export version */ +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); +// Includes only the "core" of graphlib + + + +const version = '2.1.9-pre'; + + + + +/***/ }), + +/***/ 4075: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ M: () => (/* binding */ write) +/* harmony export */ }); +/* unused harmony export read */ +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9592); +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53); +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4722); +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); + + + + + +function write(g) { + var json = { + options: { + directed: g.isDirected(), + multigraph: g.isMultigraph(), + compound: g.isCompound(), + }, + nodes: writeNodes(g), + edges: writeEdges(g), + }; + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(g.graph())) { + json.value = lodash_es__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A(g.graph()); + } + return json; +} + +function writeNodes(g) { + return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.nodes(), function (v) { + var nodeValue = g.node(v); + var parent = g.parent(v); + var node = { v: v }; + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(nodeValue)) { + node.value = nodeValue; + } + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(parent)) { + node.parent = parent; + } + return node; + }); +} + +function writeEdges(g) { + return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.edges(), function (e) { + var edgeValue = g.edge(e); + var edge = { v: e.v, w: e.w }; + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(e.name)) { + edge.name = e.name; + } + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(edgeValue)) { + edge.value = edgeValue; + } + return edge; + }); +} + +function read(json) { + var g = new Graph(json.options).setGraph(json.value); + _.each(json.nodes, function (entry) { + g.setNode(entry.v, entry.value); + if (entry.parent) { + g.setParent(entry.v, entry.parent); + } + }); + _.each(json.edges, function (entry) { + g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); + }); + return g; +} + + +/***/ }), + +/***/ 2062: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _SetCache) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules +var _MapCache = __webpack_require__(9471); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/* harmony default export */ const _setCacheAdd = (setCacheAdd); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ const _setCacheHas = (setCacheHas); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new _MapCache/* default */.A; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; +SetCache.prototype.has = _setCacheHas; + +/* harmony default export */ const _SetCache = (SetCache); + + +/***/ }), + +/***/ 2641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); + + +/***/ }), + +/***/ 2634: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); + + +/***/ }), + +/***/ 5572: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); + + +/***/ }), + +/***/ 6912: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); + + +/***/ }), + +/***/ 1641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseClone) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js +var _arrayEach = __webpack_require__(2641); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js +var _copyObject = __webpack_require__(2031); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js + + + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssign = (baseAssign); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js + + + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssignIn = (baseAssignIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js +var _cloneBuffer = __webpack_require__(154); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js +var _copyArray = __webpack_require__(9759); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js +var _getSymbols = __webpack_require__(4792); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js + + + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); +} + +/* harmony default export */ const _copySymbols = (copySymbols); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js +var _getPrototype = __webpack_require__(5647); +// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js +var stubArray = __webpack_require__(3153); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { + var result = []; + while (object) { + (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); + object = (0,_getPrototype/* default */.A)(object); + } + return result; +}; + +/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js + + + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); +} + +/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js +var _baseGetAllKeys = __webpack_require__(3831); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js + + + + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); +} + +/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/* harmony default export */ const _initCloneArray = (initCloneArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js +var _cloneArrayBuffer = __webpack_require__(565); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js + + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/* harmony default export */ const _cloneDataView = (cloneDataView); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/* harmony default export */ const _cloneRegExp = (cloneRegExp); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js + + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/* harmony default export */ const _cloneSymbol = (cloneSymbol); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js +var _cloneTypedArray = __webpack_require__(1801); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js + + + + + + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return (0,_cloneArrayBuffer/* default */.A)(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return _cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return (0,_cloneTypedArray/* default */.A)(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return _cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return _cloneSymbol(object); + } +} + +/* harmony default export */ const _initCloneByTag = (initCloneByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules +var _initCloneObject = __webpack_require__(8598); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js + + + +/** `Object#toString` result references. */ +var _baseIsMap_mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; +} + +/* harmony default export */ const _baseIsMap = (baseIsMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js +var _nodeUtil = __webpack_require__(4841); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js + + + + +/* Node.js helper references. */ +var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; + +/* harmony default export */ const lodash_es_isMap = (isMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js + + + +/** `Object#toString` result references. */ +var _baseIsSet_setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; +} + +/* harmony default export */ const _baseIsSet = (baseIsSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js + + + + +/* Node.js helper references. */ +var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; + +/* harmony default export */ const lodash_es_isSet = (isSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js + + + + + + + + + + + + + + + + + + + + + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + _baseClone_boolTag = '[object Boolean]', + _baseClone_dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + _baseClone_mapTag = '[object Map]', + _baseClone_numberTag = '[object Number]', + objectTag = '[object Object]', + _baseClone_regexpTag = '[object RegExp]', + _baseClone_setTag = '[object Set]', + _baseClone_stringTag = '[object String]', + _baseClone_symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var _baseClone_arrayBufferTag = '[object ArrayBuffer]', + _baseClone_dataViewTag = '[object DataView]', + _baseClone_float32Tag = '[object Float32Array]', + _baseClone_float64Tag = '[object Float64Array]', + _baseClone_int8Tag = '[object Int8Array]', + _baseClone_int16Tag = '[object Int16Array]', + _baseClone_int32Tag = '[object Int32Array]', + _baseClone_uint8Tag = '[object Uint8Array]', + _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', + _baseClone_uint16Tag = '[object Uint16Array]', + _baseClone_uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = +cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = +cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = +cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = +cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = +cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = +cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = +cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = +cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = +cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!(0,isObject/* default */.A)(value)) { + return value; + } + var isArr = (0,isArray/* default */.A)(value); + if (isArr) { + result = _initCloneArray(value); + if (!isDeep) { + return (0,_copyArray/* default */.A)(value, result); + } + } else { + var tag = (0,_getTag/* default */.A)(value), + isFunc = tag == funcTag || tag == genTag; + + if ((0,isBuffer/* default */.A)(value)) { + return (0,_cloneBuffer/* default */.A)(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); + if (!isDeep) { + return isFlat + ? _copySymbolsIn(value, _baseAssignIn(result, value)) + : _copySymbols(value, _baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = _initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new _Stack/* default */.A); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (lodash_es_isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (lodash_es_isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) + : (isFlat ? keysIn/* default */.A : keys/* default */.A); + + var props = isArr ? undefined : keysFunc(value); + (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +/* harmony default export */ const _baseClone = (baseClone); + + +/***/ }), + +/***/ 6240: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseEach) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js + + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!(0,isArrayLike/* default */.A)(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +/* harmony default export */ const _createBaseEach = (createBaseEach); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js + + + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = _createBaseEach(_baseForOwn/* default */.A); + +/* harmony default export */ const _baseEach = (baseEach); + + +/***/ }), + +/***/ 5707: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); + + +/***/ }), + +/***/ 3588: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseFlatten) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules +var isArguments = __webpack_require__(2274); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js + + + + +/** Built-in value references. */ +var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/* harmony default export */ const _isFlattenable = (isFlattenable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js + + + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = _isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + (0,_arrayPush/* default */.A)(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/* harmony default export */ const _baseFlatten = (baseFlatten); + + +/***/ }), + +/***/ 9841: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); + + +/***/ }), + +/***/ 6318: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); + + +/***/ }), + +/***/ 3831: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6912); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); + + +/***/ }), + +/***/ 9574: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseIteratee) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arraySome = (arraySome); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!_arraySome(other, function(othValue, othIndex) { + if (!(0,_cacheHas/* default */.A)(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalArrays = (equalArrays); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js +var _Uint8Array = __webpack_require__(3988); +// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js +var eq = __webpack_require__(6984); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ const _mapToArray = (mapToArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _equalByTag_COMPARE_PARTIAL_FLAG = 1, + _equalByTag_COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return (0,eq/* default */.A)(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = _mapToArray; + + case setTag: + var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; + convert || (convert = _setToArray/* default */.A); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ const _equalByTag = (equalByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js + + +/** Used to compose bitmasks for value comparisons. */ +var _equalObjects_COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, + objProps = (0,_getAllKeys/* default */.A)(object), + objLength = objProps.length, + othProps = (0,_getAllKeys/* default */.A)(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalObjects = (equalObjects); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules +var isTypedArray = __webpack_require__(3858); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var _baseIsEqualDeep_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = (0,isArray/* default */.A)(object), + othIsArr = (0,isArray/* default */.A)(other), + objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), + othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && (0,isBuffer/* default */.A)(object)) { + if (!(0,isBuffer/* default */.A)(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new _Stack/* default */.A); + return (objIsArr || (0,isTypedArray/* default */.A)(object)) + ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new _Stack/* default */.A); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new _Stack/* default */.A); + return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { + return value !== value && other !== other; + } + return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ const _baseIsEqual = (baseIsEqual); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, + _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new _Stack/* default */.A; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ const _baseIsMatch = (baseIsMatch); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !(0,isObject/* default */.A)(value); +} + +/* harmony default export */ const _isStrictComparable = (isStrictComparable); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = (0,keys/* default */.A)(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, _isStrictComparable(value)]; + } + return result; +} + +/* harmony default export */ const _getMatchData = (getMatchData); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = _getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return _matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || _baseIsMatch(object, source, matchData); + }; +} + +/* harmony default export */ const _baseMatches = (baseMatches); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ const lodash_es_get = (get); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, + _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { + return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); + } + return function(object) { + var objValue = lodash_es_get(object, path); + return (objValue === undefined && objValue === srcValue) + ? (0,hasIn/* default */.A)(object, path) + : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return (0,_baseGet/* default */.A)(object, path); + }; +} + +/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); +} + +/* harmony default export */ const lodash_es_property = (property); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity/* default */.A; + } + if (typeof value == 'object') { + return (0,isArray/* default */.A)(value) + ? _baseMatchesProperty(value[0], value[1]) + : _baseMatches(value); + } + return lodash_es_property(value); +} + +/* harmony default export */ const _baseIteratee = (baseIteratee); + + +/***/ }), + +/***/ 2568: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; + + (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); + + +/***/ }), + +/***/ 805: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); + + +/***/ }), + +/***/ 4099: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); + + +/***/ }), + +/***/ 9922: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9008); + + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); + + +/***/ }), + +/***/ 7819: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _castPath) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js +var memoize = __webpack_require__(6632); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = (0,memoize/* default */.A)(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ const _memoizeCapped = (memoizeCapped); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js + + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = _memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ const _stringToPath = (stringToPath); + +// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules +var lodash_es_toString = __webpack_require__(8894); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if ((0,isArray/* default */.A)(value)) { + return value; + } + return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); +} + +/* harmony default export */ const _castPath = (castPath); + + +/***/ }), + +/***/ 9042: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3831); +/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4792); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); + + +/***/ }), + +/***/ 4792: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); +/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3153); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); + + +/***/ }), + +/***/ 5054: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2274); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2049); +/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5353); +/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && + ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); + + +/***/ }), + +/***/ 6586: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1882); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); + + +/***/ }), + +/***/ 9959: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); + + +/***/ }), + +/***/ 3282: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1882); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); + + +/***/ }), + +/***/ 53: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseClone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1641); + + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ +function clone(value) { + return (0,_baseClone_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value, CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone); + + +/***/ }), + +/***/ 3068: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4326); +/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6984); +/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); +/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5615); + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); + + +/***/ }), + +/***/ 1662: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_filter) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js +var _arrayFilter = __webpack_require__(2634); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js + + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + (0,_baseEach/* default */.A)(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +/* harmony default export */ const _baseFilter = (baseFilter); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js + + + + + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ +function filter(collection, predicate) { + var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; + return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); +} + +/* harmony default export */ const lodash_es_filter = (filter); + + +/***/ }), + +/***/ 4098: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3588); + + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); + + +/***/ }), + +/***/ 8058: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2641); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); +/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9922); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); + + +/***/ }), + +/***/ 8585: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_has) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && _baseHas_hasOwnProperty.call(object, key); +} + +/* harmony default export */ const _baseHas = (baseHas); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js + + + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); +} + +/* harmony default export */ const lodash_es_has = (has); + + +/***/ }), + +/***/ 9188: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_hasIn) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ const _baseHasIn = (baseHasIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); +} + +/* harmony default export */ const lodash_es_hasIn = (hasIn); + + +/***/ }), + +/***/ 1882: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8496); +/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3098); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); + + +/***/ }), + +/***/ 9592: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); + + +/***/ }), + +/***/ 2184: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3607); +/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1852); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); + + +/***/ }), + +/***/ 4722: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5572); +/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9574); +/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2568); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); + + +/***/ }), + +/***/ 1942: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_pick) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules +var _castPath = __webpack_require__(7819); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js +var _isIndex = __webpack_require__(5353); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js + + + + + + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!(0,isObject/* default */.A)(object)) { + return object; + } + path = (0,_castPath/* default */.A)(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = (0,_toKey/* default */.A)(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = (0,isObject/* default */.A)(objValue) + ? objValue + : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); + } + } + (0,_assignValue/* default */.A)(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/* harmony default export */ const _baseSet = (baseSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js + + + + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = (0,_baseGet/* default */.A)(object, path); + + if (predicate(value, path)) { + _baseSet(result, (0,_castPath/* default */.A)(path, object), value); + } + } + return result; +} + +/* harmony default export */ const _basePickBy = (basePickBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js + + + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return _basePickBy(object, paths, function(value, path) { + return (0,hasIn/* default */.A)(object, path); + }); +} + +/* harmony default export */ const _basePick = (basePick); + +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules +var _overRest = __webpack_require__(6875); +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules +var _setToString = __webpack_require__(7525); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js + + + + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); +} + +/* harmony default export */ const _flatRest = (flatRest); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js + + + +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = _flatRest(function(object, paths) { + return object == null ? {} : _basePick(object, paths); +}); + +/* harmony default export */ const lodash_es_pick = (pick); + + +/***/ }), + +/***/ 1395: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_range) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +/* harmony default export */ const _baseRange = (baseRange); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js + + + + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = (0,toFinite/* default */.A)(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = (0,toFinite/* default */.A)(end); + } + step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); + return _baseRange(start, end, step, fromRight); + }; +} + +/* harmony default export */ const _createRange = (createRange); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js + + +/** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ +var range = _createRange(); + +/* harmony default export */ const lodash_es_range = (range); + + +/***/ }), + +/***/ 9463: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_reduce) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/* harmony default export */ const _arrayReduce = (arrayReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +/* harmony default export */ const _baseReduce = (baseReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js + + + + + + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ +function reduce(collection, iteratee, accumulator) { + var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, + initAccum = arguments.length < 3; + + return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); +} + +/* harmony default export */ const lodash_es_reduce = (reduce); + + +/***/ }), + +/***/ 3153: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); + + +/***/ }), + +/***/ 4342: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toFinite) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js +/** Used to match a single whitespace character. */ +var reWhitespace = /\s/; + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ +function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; +} + +/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js + + +/** Used to match leading whitespace. */ +var reTrimStart = /^\s+/; + +/** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ +function baseTrim(string) { + return string + ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; +} + +/* harmony default export */ const _baseTrim = (baseTrim); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js + + + + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if ((0,isSymbol/* default */.A)(value)) { + return NAN; + } + if ((0,isObject/* default */.A)(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = (0,isObject/* default */.A)(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = _baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +/* harmony default export */ const lodash_es_toNumber = (toNumber); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = lodash_es_toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +/* harmony default export */ const lodash_es_toFinite = (toFinite); + + +/***/ }), + +/***/ 8894: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toString) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if ((0,isArray/* default */.A)(value)) { + // Recursively convert values (susceptible to call stack limits). + return (0,_arrayMap/* default */.A)(value, baseToString) + ''; + } + if ((0,isSymbol/* default */.A)(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const _baseToString = (baseToString); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString_toString(value) { + return value == null ? '' : _baseToString(value); +} + +/* harmony default export */ const lodash_es_toString = (toString_toString); + + +/***/ }), + +/***/ 5664: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8894); + + +/** Used to generate unique IDs. */ +var idCounter = 0; + +/** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ +function uniqueId(prefix) { + var id = ++idCounter; + return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); + + +/***/ }), + +/***/ 8207: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_values) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js + + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return (0,_arrayMap/* default */.A)(props, function(key) { + return object[key]; + }); +} + +/* harmony default export */ const _baseValues = (baseValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js + + + +/** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ +function values(object) { + return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); +} + +/* harmony default export */ const lodash_es_values = (values); + + +/***/ }), + +/***/ 4: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _styles_991ebdfc_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(7308); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(697); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6257); +/* harmony import */ var _index_fc10efb0_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2746); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9418); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1176); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4075); + + + + + + + + + + + + + + + + + + + +const sanitizeText = (txt) => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.e.sanitizeText(txt, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)()); +let conf = { + dividerMargin: 10, + padding: 5, + textHeight: 10, + curve: void 0 +}; +const addNamespaces = function(namespaces, g, _id, diagObj) { + const keys = Object.keys(namespaces); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.info("keys:", keys); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.info(namespaces); + keys.forEach(function(id) { + var _a, _b; + const vertex = namespaces[id]; + const shape = "rect"; + const node = { + shape, + id: vertex.id, + domId: vertex.domId, + labelText: sanitizeText(vertex.id), + labelStyle: "", + style: "fill: none; stroke: black", + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((_a = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart) == null ? void 0 : _a.padding) ?? ((_b = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().class) == null ? void 0 : _b.padding) + }; + g.setNode(vertex.id, node); + addClasses(vertex.classes, g, _id, diagObj, vertex.id); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.info("setNode", node); + }); +}; +const addClasses = function(classes, g, _id, diagObj, parent) { + const keys = Object.keys(classes); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.info("keys:", keys); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.info(classes); + keys.filter((id) => classes[id].parent == parent).forEach(function(id) { + var _a, _b; + const vertex = classes[id]; + const cssClassStr = vertex.cssClasses.join(" "); + const styles2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.k)(vertex.styles); + const vertexText = vertex.label ?? vertex.id; + const radius = 0; + const shape = "class_box"; + const node = { + labelStyle: styles2.labelStyle, + shape, + labelText: sanitizeText(vertexText), + classData: vertex, + rx: radius, + ry: radius, + class: cssClassStr, + style: styles2.style, + id: vertex.id, + domId: vertex.domId, + tooltip: diagObj.db.getTooltip(vertex.id, parent) || "", + haveCallback: vertex.haveCallback, + link: vertex.link, + width: vertex.type === "group" ? 500 : void 0, + type: vertex.type, + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((_a = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart) == null ? void 0 : _a.padding) ?? ((_b = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().class) == null ? void 0 : _b.padding) + }; + g.setNode(vertex.id, node); + if (parent) { + g.setParent(vertex.id, parent); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.info("setNode", node); + }); +}; +const addNotes = function(notes, g, startEdgeId, classes) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.info(notes); + notes.forEach(function(note, i) { + var _a, _b; + const vertex = note; + const cssNoteStr = ""; + const styles2 = { labelStyle: "", style: "" }; + const vertexText = vertex.text; + const radius = 0; + const shape = "note"; + const node = { + labelStyle: styles2.labelStyle, + shape, + labelText: sanitizeText(vertexText), + noteData: vertex, + rx: radius, + ry: radius, + class: cssNoteStr, + style: styles2.style, + id: vertex.id, + domId: vertex.id, + tooltip: "", + type: "note", + // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release + padding: ((_a = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart) == null ? void 0 : _a.padding) ?? ((_b = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().class) == null ? void 0 : _b.padding) + }; + g.setNode(vertex.id, node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.info("setNode", node); + if (!vertex.class || !(vertex.class in classes)) { + return; + } + const edgeId = startEdgeId + i; + const edgeData = { + id: `edgeNote${edgeId}`, + //Set relationship style and line type + classes: "relation", + pattern: "dotted", + // Set link type for rendering + arrowhead: "none", + //Set edge extra labels + startLabelRight: "", + endLabelLeft: "", + //Set relation arrow types + arrowTypeStart: "none", + arrowTypeEnd: "none", + style: "fill:none", + labelStyle: "", + curve: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.n)(conf.curve, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .lUB) + }; + g.setEdge(vertex.id, vertex.class, edgeData, edgeId); + }); +}; +const addRelations = function(relations, g) { + const conf2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart; + let cnt = 0; + relations.forEach(function(edge) { + var _a; + cnt++; + const edgeData = { + //Set relationship style and line type + classes: "relation", + pattern: edge.relation.lineType == 1 ? "dashed" : "solid", + id: `id_${edge.id1}_${edge.id2}_${cnt}`, + // Set link type for rendering + arrowhead: edge.type === "arrow_open" ? "none" : "normal", + //Set edge extra labels + startLabelRight: edge.relationTitle1 === "none" ? "" : edge.relationTitle1, + endLabelLeft: edge.relationTitle2 === "none" ? "" : edge.relationTitle2, + //Set relation arrow types + arrowTypeStart: getArrowMarker(edge.relation.type1), + arrowTypeEnd: getArrowMarker(edge.relation.type2), + style: "fill:none", + labelStyle: "", + curve: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.n)(conf2 == null ? void 0 : conf2.curve, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .lUB) + }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.info(edgeData, edge); + if (edge.style !== void 0) { + const styles2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.k)(edge.style); + edgeData.style = styles2.style; + edgeData.labelStyle = styles2.labelStyle; + } + edge.text = edge.title; + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + if (((_a = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart) == null ? void 0 : _a.htmlLabels) ?? (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().htmlLabels) { + edgeData.labelType = "html"; + edgeData.label = '<span class="edgeLabel">' + edge.text + "</span>"; + } else { + edgeData.labelType = "text"; + edgeData.label = edge.text.replace(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.e.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + } + } + g.setEdge(edge.id1, edge.id2, edgeData, cnt); + }); +}; +const setConf = function(cnf) { + conf = { + ...conf, + ...cnf + }; +}; +const draw = async function(text, id, _version, diagObj) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.info("Drawing class - ", id); + const conf2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().flowchart ?? (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().class; + const securityLevel = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.info("config:", conf2); + const nodeSpacing = (conf2 == null ? void 0 : conf2.nodeSpacing) ?? 50; + const rankSpacing = (conf2 == null ? void 0 : conf2.rankSpacing) ?? 50; + const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Graph */ .T({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: diagObj.db.getDirection(), + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + const namespaces = diagObj.db.getNamespaces(); + const classes = diagObj.db.getClasses(); + const relations = diagObj.db.getRelations(); + const notes = diagObj.db.getNotes(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.info(relations); + addNamespaces(namespaces, g, id, diagObj); + addClasses(classes, g, id, diagObj); + addRelations(relations, g); + addNotes(notes, g, relations.length + 1, classes); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); + const svg = root.select(`[id="${id}"]`); + const element = root.select("#" + id + " g"); + await (0,_index_fc10efb0_js__WEBPACK_IMPORTED_MODULE_8__.r)( + element, + g, + ["aggregation", "extension", "composition", "dependency", "lollipop"], + "classDiagram", + id + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.u.insertTitle(svg, "classTitleText", (conf2 == null ? void 0 : conf2.titleTopMargin) ?? 5, diagObj.db.getDiagramTitle()); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.o)(g, svg, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth); + if (!(conf2 == null ? void 0 : conf2.htmlLabels)) { + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const labels = doc.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect = doc.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect.setAttribute("rx", 0); + rect.setAttribute("ry", 0); + rect.setAttribute("width", dim.width); + rect.setAttribute("height", dim.height); + label.insertBefore(rect, label.firstChild); + } + } +}; +function getArrowMarker(type) { + let marker; + switch (type) { + case 0: + marker = "aggregation"; + break; + case 1: + marker = "extension"; + break; + case 2: + marker = "composition"; + break; + case 3: + marker = "dependency"; + break; + case 4: + marker = "lollipop"; + break; + default: + marker = "none"; + } + return marker; +} +const renderer = { + setConf, + draw +}; +const diagram = { + parser: _styles_991ebdfc_js__WEBPACK_IMPORTED_MODULE_9__.p, + db: _styles_991ebdfc_js__WEBPACK_IMPORTED_MODULE_9__.d, + renderer, + styles: _styles_991ebdfc_js__WEBPACK_IMPORTED_MODULE_9__.s, + init: (cnf) => { + if (!cnf.class) { + cnf.class = {}; + } + cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + _styles_991ebdfc_js__WEBPACK_IMPORTED_MODULE_9__.d.clear(); + } +}; + + + +/***/ }), + +/***/ 3791: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + a: () => (/* binding */ createText), + c: () => (/* binding */ computeDimensionOfText) +}); + +// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +var constructs_namespaceObject = {}; +__webpack_require__.r(constructs_namespaceObject); +__webpack_require__.d(constructs_namespaceObject, { + attentionMarkers: () => (attentionMarkers), + contentInitial: () => (contentInitial), + disable: () => (disable), + document: () => (constructs_document), + flow: () => (constructs_flow), + flowInitial: () => (flowInitial), + insideSpan: () => (insideSpan), + string: () => (constructs_string), + text: () => (constructs_text) +}); + +// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-f47111a7.js + 8 modules +var mermaid_f47111a7 = __webpack_require__(6257); +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js +/** + * @typedef {import('mdast').Root|import('mdast').Content} Node + * + * @typedef Options + * Configuration (optional). + * @property {boolean | null | undefined} [includeImageAlt=true] + * Whether to use `alt` for `image`s. + * @property {boolean | null | undefined} [includeHtml=true] + * Whether to use `value` of HTML. + */ + +/** @type {Options} */ +const emptyOptions = {} + +/** + * Get the text content of a node or list of nodes. + * + * Prefers the node’s plain-text fields, otherwise serializes its children, + * and if the given value is an array, serialize the nodes in it. + * + * @param {unknown} value + * Thing to serialize, typically `Node`. + * @param {Options | null | undefined} [options] + * Configuration (optional). + * @returns {string} + * Serialized `value`. + */ +function lib_toString(value, options) { + const settings = options || emptyOptions + const includeImageAlt = + typeof settings.includeImageAlt === 'boolean' + ? settings.includeImageAlt + : true + const includeHtml = + typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true + + return one(value, includeImageAlt, includeHtml) +} + +/** + * One node or several nodes. + * + * @param {unknown} value + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized node. + */ +function one(value, includeImageAlt, includeHtml) { + if (node(value)) { + if ('value' in value) { + return value.type === 'html' && !includeHtml ? '' : value.value + } + + if (includeImageAlt && 'alt' in value && value.alt) { + return value.alt + } + + if ('children' in value) { + return lib_all(value.children, includeImageAlt, includeHtml) + } + } + + if (Array.isArray(value)) { + return lib_all(value, includeImageAlt, includeHtml) + } + + return '' +} + +/** + * Serialize a list of nodes. + * + * @param {Array<unknown>} values + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized nodes. + */ +function lib_all(values, includeImageAlt, includeHtml) { + /** @type {Array<string>} */ + const result = [] + let index = -1 + + while (++index < values.length) { + result[index] = one(values[index], includeImageAlt, includeHtml) + } + + return result.join('') +} + +/** + * Check if `value` looks like a node. + * + * @param {unknown} value + * Thing. + * @returns {value is Node} + * Whether `value` is a node. + */ +function node(value) { + return Boolean(value && typeof value === 'object') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array<T>} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array<unknown>} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {Array<T>} items + * Items to add to `list`. + * @returns {Array<T>} + * Either `list` or `items`. + */ +function push(list, items) { + if (list.length > 0) { + splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + * @typedef {import('micromark-util-types').Handles} Handles + * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension + * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension + */ + + + +const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty + +/** + * Combine multiple syntax extensions into one. + * + * @param {Array<Extension>} extensions + * List of syntax extensions. + * @returns {NormalizedExtension} + * A single combined extension. + */ +function combineExtensions(extensions) { + /** @type {NormalizedExtension} */ + const all = {} + let index = -1 + + while (++index < extensions.length) { + syntaxExtension(all, extensions[index]) + } + + return all +} + +/** + * Merge `extension` into `all`. + * + * @param {NormalizedExtension} all + * Extension to merge into. + * @param {Extension} extension + * Extension to merge. + * @returns {void} + */ +function syntaxExtension(all, extension) { + /** @type {keyof Extension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + /** @type {Record<string, unknown>} */ + const left = maybe || (all[hook] = {}) + /** @type {Record<string, unknown> | undefined} */ + const right = extension[hook] + /** @type {string} */ + let code + + if (right) { + for (code in right) { + if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] + const value = right[code] + constructs( + // @ts-expect-error Looks like a list. + left[code], + Array.isArray(value) ? value : value ? [value] : [] + ) + } + } + } +} + +/** + * Merge `list` into `existing` (both lists of constructs). + * Mutates `existing`. + * + * @param {Array<unknown>} existing + * @param {Array<unknown>} list + * @returns {void} + */ +function constructs(existing, list) { + let index = -1 + /** @type {Array<unknown>} */ + const before = [] + + while (++index < list.length) { + // @ts-expect-error Looks like an object. + ;(list[index].add === 'after' ? existing : before).push(list[index]) + } + + splice(existing, 0, 0, before) +} + +/** + * Combine multiple HTML extensions into one. + * + * @param {Array<HtmlExtension>} htmlExtensions + * List of HTML extensions. + * @returns {HtmlExtension} + * A single combined HTML extension. + */ +function combineHtmlExtensions(htmlExtensions) { + /** @type {HtmlExtension} */ + const handlers = {} + let index = -1 + + while (++index < htmlExtensions.length) { + htmlExtension(handlers, htmlExtensions[index]) + } + + return handlers +} + +/** + * Merge `extension` into `all`. + * + * @param {HtmlExtension} all + * Extension to merge into. + * @param {HtmlExtension} extension + * Extension to merge. + * @returns {void} + */ +function htmlExtension(all, extension) { + /** @type {keyof HtmlExtension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + const left = maybe || (all[hook] = {}) + const right = extension[hook] + /** @type {keyof Handles} */ + let type + + if (right) { + for (type in right) { + // @ts-expect-error assume document vs regular handler are managed correctly. + left[type] = right[type] + } + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +// This module is generated by `script/`. +// +// CommonMark handles attention (emphasis, strong) markers based on what comes +// before or after them. +// One such difference is if those characters are Unicode punctuation. +// This script is generated from the Unicode data. + +/** + * Regular expression that matches a unicode punctuation character. + */ +const unicodePunctuationRegex = + /[!-\/:-@\[-`\{-~\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]/ + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + + +/** + * Check whether the character code represents an ASCII alpha (`a` through `z`, + * case insensitive). + * + * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. + * + * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) + * to U+005A (`Z`). + * + * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) + * to U+007A (`z`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlpha = regexCheck(/[A-Za-z]/) + +/** + * Check whether the character code represents an ASCII alphanumeric (`a` + * through `z`, case insensitive, or `0` through `9`). + * + * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha + * (see `asciiAlpha`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) + +/** + * Check whether the character code represents an ASCII atext. + * + * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in + * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), + * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F + * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E + * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE + * (`{`) to U+007E TILDE (`~`). + * + * See: + * **\[RFC5322]**: + * [Internet Message Format](https://tools.ietf.org/html/rfc5322). + * P. Resnick. + * IETF. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) + +/** + * Check whether a character code is an ASCII control character. + * + * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) + * to U+001F (US), or U+007F (DEL). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code !== null && (code < 32 || code === 127) + ) +} + +/** + * Check whether the character code represents an ASCII digit (`0` through `9`). + * + * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to + * U+0039 (`9`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiDigit = regexCheck(/\d/) + +/** + * Check whether the character code represents an ASCII hex digit (`a` through + * `f`, case insensitive, or `0` through `9`). + * + * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex + * digit, or an ASCII lower hex digit. + * + * An **ASCII upper hex digit** is a character in the inclusive range U+0041 + * (`A`) to U+0046 (`F`). + * + * An **ASCII lower hex digit** is a character in the inclusive range U+0061 + * (`a`) to U+0066 (`f`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) + +/** + * Check whether the character code represents ASCII punctuation. + * + * An **ASCII punctuation** is a character in the inclusive ranges U+0021 + * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT + * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT + * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) + +/** + * Check whether a character code is a markdown line ending. + * + * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN + * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). + * + * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE + * RETURN (CR) are replaced by these virtual characters depending on whether + * they occurred together. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEnding(code) { + return code !== null && code < -2 +} + +/** + * Check whether a character code is a markdown line ending (see + * `markdownLineEnding`) or markdown space (see `markdownSpace`). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEndingOrSpace(code) { + return code !== null && (code < 0 || code === 32) +} + +/** + * Check whether a character code is a markdown space. + * + * A **markdown space** is the concrete character U+0020 SPACE (SP) and the + * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). + * + * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is + * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL + * SPACE (VS) characters, depending on the column at which the tab occurred. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownSpace(code) { + return code === -2 || code === -1 || code === 32 +} + +// Size note: removing ASCII from the regex and using `asciiPunctuation` here +// In fact adds to the bundle size. +/** + * Check whether the character code represents Unicode punctuation. + * + * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, + * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` + * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` + * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII + * punctuation (see `asciiPunctuation`). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodePunctuation = regexCheck(unicodePunctuationRegex) + +/** + * Check whether the character code represents Unicode whitespace. + * + * Note that this does handle micromark specific markdown whitespace characters. + * See `markdownLineEndingOrSpace` to check that. + * + * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, + * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), + * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodeWhitespace = regexCheck(/\s/) + +/** + * Create a code check from a regex. + * + * @param {RegExp} regex + * @returns {(code: Code) => boolean} + */ +function regexCheck(regex) { + return check + + /** + * Check whether a code matches the bound regex. + * + * @param {Code} code + * Character code. + * @returns {boolean} + * Whether the character code matches the bound regex. + */ + function check(code) { + return code !== null && regex.test(String.fromCharCode(code)) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * spaces in markdown are often optional, in which case this factory can be + * used and `ok` will be switched to whether spaces were found or not + * * one line ending or space can be detected with `markdownSpace(code)` right + * before using `factorySpace` + * + * ###### Examples + * + * Where `␉` represents a tab (plus how much it expands) and `␠` represents a + * single space. + * + * ```markdown + * ␉ + * ␠␠␠␠ + * ␉␠ + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {TokenType} type + * Type (`' \t'`). + * @param {number | undefined} [max=Infinity] + * Max (exclusive). + * @returns + * Start state. + */ +function factorySpace(effects, ok, type, max) { + const limit = max ? max - 1 : Number.POSITIVE_INFINITY + let size = 0 + return start + + /** @type {State} */ + function start(code) { + if (markdownSpace(code)) { + effects.enter(type) + return prefix(code) + } + return ok(code) + } + + /** @type {State} */ + function prefix(code) { + if (markdownSpace(code) && size++ < limit) { + effects.consume(code) + return prefix + } + effects.exit(type) + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + +/** @type {InitialConstruct} */ +const content = { + tokenize: initializeContent +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeContent(effects) { + const contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ) + /** @type {Token} */ + let previous + return contentStart + + /** @type {State} */ + function afterContentStartConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, contentStart, 'linePrefix') + } + + /** @type {State} */ + function paragraphInitial(code) { + effects.enter('paragraph') + return lineStart(code) + } + + /** @type {State} */ + function lineStart(code) { + const token = effects.enter('chunkText', { + contentType: 'text', + previous + }) + if (previous) { + previous.next = token + } + previous = token + return data(code) + } + + /** @type {State} */ + function data(code) { + if (code === null) { + effects.exit('chunkText') + effects.exit('paragraph') + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + effects.exit('chunkText') + return lineStart + } + + // Data. + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + +/** + * @typedef {[Construct, ContainerState]} StackItem + */ + + + + +/** @type {InitialConstruct} */ +const document_document = { + tokenize: initializeDocument +} + +/** @type {Construct} */ +const containerConstruct = { + tokenize: tokenizeContainer +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeDocument(effects) { + const self = this + /** @type {Array<StackItem>} */ + const stack = [] + let continued = 0 + /** @type {TokenizeContext | undefined} */ + let childFlow + /** @type {Token | undefined} */ + let childToken + /** @type {number} */ + let lineStartOffset + return start + + /** @type {State} */ + function start(code) { + // First we iterate through the open blocks, starting with the root + // document, and descending through last children down to the last open + // block. + // Each block imposes a condition that the line must satisfy if the block is + // to remain open. + // For example, a block quote requires a `>` character. + // A paragraph requires a non-blank line. + // In this phase we may match all or just some of the open blocks. + // But we cannot close unmatched blocks yet, because we may have a lazy + // continuation line. + if (continued < stack.length) { + const item = stack[continued] + self.containerState = item[1] + return effects.attempt( + item[0].continuation, + documentContinue, + checkNewContainers + )(code) + } + + // Done. + return checkNewContainers(code) + } + + /** @type {State} */ + function documentContinue(code) { + continued++ + + // Note: this field is called `_closeFlow` but it also closes containers. + // Perhaps a good idea to rename it but it’s already used in the wild by + // extensions. + if (self.containerState._closeFlow) { + self.containerState._closeFlow = undefined + if (childFlow) { + closeFlow() + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when dealing with lazy lines in `writeToChild`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {Point | undefined} */ + let point + + // Find the flow chunk. + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + point = self.events[indexBeforeFlow][1].end + break + } + } + exitContainers(continued) + + // Fix positions. + let index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + return checkNewContainers(code) + } + return start(code) + } + + /** @type {State} */ + function checkNewContainers(code) { + // Next, after consuming the continuation markers for existing blocks, we + // look for new block starts (e.g. `>` for a block quote). + // If we encounter a new block start, we close any blocks unmatched in + // step 1 before creating the new block as a child of the last matched + // block. + if (continued === stack.length) { + // No need to `check` whether there’s a container, of `exitContainers` + // would be moot. + // We can instead immediately `attempt` to parse one. + if (!childFlow) { + return documentContinued(code) + } + + // If we have concrete content, such as block HTML or fenced code, + // we can’t have containers “pierce” into them, so we can immediately + // start. + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { + return flowStart(code) + } + + // If we do have flow, it could still be a blank line, + // but we’d be interrupting it w/ a new container if there’s a current + // construct. + // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer + // needed in micromark-extension-gfm-table@1.0.6). + self.interrupt = Boolean( + childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack + ) + } + + // Check if there is a new container. + self.containerState = {} + return effects.check( + containerConstruct, + thereIsANewContainer, + thereIsNoNewContainer + )(code) + } + + /** @type {State} */ + function thereIsANewContainer(code) { + if (childFlow) closeFlow() + exitContainers(continued) + return documentContinued(code) + } + + /** @type {State} */ + function thereIsNoNewContainer(code) { + self.parser.lazy[self.now().line] = continued !== stack.length + lineStartOffset = self.now().offset + return flowStart(code) + } + + /** @type {State} */ + function documentContinued(code) { + // Try new containers. + self.containerState = {} + return effects.attempt( + containerConstruct, + containerContinue, + flowStart + )(code) + } + + /** @type {State} */ + function containerContinue(code) { + continued++ + stack.push([self.currentConstruct, self.containerState]) + // Try another. + return documentContinued(code) + } + + /** @type {State} */ + function flowStart(code) { + if (code === null) { + if (childFlow) closeFlow() + exitContainers(0) + effects.consume(code) + return + } + childFlow = childFlow || self.parser.flow(self.now()) + effects.enter('chunkFlow', { + contentType: 'flow', + previous: childToken, + _tokenizer: childFlow + }) + return flowContinue(code) + } + + /** @type {State} */ + function flowContinue(code) { + if (code === null) { + writeToChild(effects.exit('chunkFlow'), true) + exitContainers(0) + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + writeToChild(effects.exit('chunkFlow')) + // Get ready for the next line. + continued = 0 + self.interrupt = undefined + return start + } + effects.consume(code) + return flowContinue + } + + /** + * @param {Token} token + * @param {boolean | undefined} [eof] + * @returns {void} + */ + function writeToChild(token, eof) { + const stream = self.sliceStream(token) + if (eof) stream.push(null) + token.previous = childToken + if (childToken) childToken.next = token + childToken = token + childFlow.defineSkip(token.start) + childFlow.write(stream) + + // Alright, so we just added a lazy line: + // + // ```markdown + // > a + // b. + // + // Or: + // + // > ~~~c + // d + // + // Or: + // + // > | e | + // f + // ``` + // + // The construct in the second example (fenced code) does not accept lazy + // lines, so it marked itself as done at the end of its first line, and + // then the content construct parses `d`. + // Most constructs in markdown match on the first line: if the first line + // forms a construct, a non-lazy line can’t “unmake” it. + // + // The construct in the third example is potentially a GFM table, and + // those are *weird*. + // It *could* be a table, from the first line, if the following line + // matches a condition. + // In this case, that second line is lazy, which “unmakes” the first line + // and turns the whole into one content block. + // + // We’ve now parsed the non-lazy and the lazy line, and can figure out + // whether the lazy line started a new flow block. + // If it did, we exit the current containers between the two flow blocks. + if (self.parser.lazy[token.start.line]) { + let index = childFlow.events.length + while (index--) { + if ( + // The token starts before the line ending… + childFlow.events[index][1].start.offset < lineStartOffset && + // …and either is not ended yet… + (!childFlow.events[index][1].end || + // …or ends after it. + childFlow.events[index][1].end.offset > lineStartOffset) + ) { + // Exit: there’s still something open, which means it’s a lazy line + // part of something. + return + } + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when closing flow in `documentContinue`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {boolean | undefined} */ + let seen + /** @type {Point | undefined} */ + let point + + // Find the previous chunk (the one before the lazy line). + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + if (seen) { + point = self.events[indexBeforeFlow][1].end + break + } + seen = true + } + } + exitContainers(continued) + + // Fix positions. + index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + } + } + + /** + * @param {number} size + * @returns {void} + */ + function exitContainers(size) { + let index = stack.length + + // Exit open containers. + while (index-- > size) { + const entry = stack[index] + self.containerState = entry[1] + entry[0].exit.call(self, effects) + } + stack.length = size + } + function closeFlow() { + childFlow.write([null]) + childToken = undefined + childFlow = undefined + self.containerState._closeFlow = undefined + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContainer(effects, ok, nok) { + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok, nok), + 'linePrefix', + this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blankLine = { + tokenize: tokenizeBlankLine, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLine(effects, ok, nok) { + return start + + /** + * Start of blank line. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + return markdownSpace(code) + ? factorySpace(effects, after, 'linePrefix')(code) + : after(code) + } + + /** + * At eof/eol, after optional whitespace. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array<T>} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function micromark_util_chunked_splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array<unknown>} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {Array<T>} items + * Items to add to `list`. + * @returns {Array<T>} + * Either `list` or `items`. + */ +function micromark_util_chunked_push(list, items) { + if (list.length > 0) { + micromark_util_chunked_splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Token} Token + */ + + +/** + * Tokenize subcontent. + * + * @param {Array<Event>} events + * List of events. + * @returns {boolean} + * Whether subtokens were found. + */ +function subtokenize(events) { + /** @type {Record<string, number>} */ + const jumps = {} + let index = -1 + /** @type {Event} */ + let event + /** @type {number | undefined} */ + let lineIndex + /** @type {number} */ + let otherIndex + /** @type {Event} */ + let otherEvent + /** @type {Array<Event>} */ + let parameters + /** @type {Array<Event>} */ + let subevents + /** @type {boolean | undefined} */ + let more + while (++index < events.length) { + while (index in jumps) { + index = jumps[index] + } + event = events[index] + + // Add a hook for the GFM tasklist extension, which needs to know if text + // is in the first content of a list item. + if ( + index && + event[1].type === 'chunkFlow' && + events[index - 1][1].type === 'listItemPrefix' + ) { + subevents = event[1]._tokenizer.events + otherIndex = 0 + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'lineEndingBlank' + ) { + otherIndex += 2 + } + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'content' + ) { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === 'content') { + break + } + if (subevents[otherIndex][1].type === 'chunkText') { + subevents[otherIndex][1]._isInFirstContentOfListItem = true + otherIndex++ + } + } + } + } + + // Enter. + if (event[0] === 'enter') { + if (event[1].contentType) { + Object.assign(jumps, subcontent(events, index)) + index = jumps[index] + more = true + } + } + // Exit. + else if (event[1]._container) { + otherIndex = index + lineIndex = undefined + while (otherIndex--) { + otherEvent = events[otherIndex] + if ( + otherEvent[1].type === 'lineEnding' || + otherEvent[1].type === 'lineEndingBlank' + ) { + if (otherEvent[0] === 'enter') { + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + } + otherEvent[1].type = 'lineEnding' + lineIndex = otherIndex + } + } else { + break + } + } + if (lineIndex) { + // Fix position. + event[1].end = Object.assign({}, events[lineIndex][1].start) + + // Switch container exit w/ line endings. + parameters = events.slice(lineIndex, index) + parameters.unshift(event) + micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) + } + } + } + return !more +} + +/** + * Tokenize embedded tokens. + * + * @param {Array<Event>} events + * @param {number} eventIndex + * @returns {Record<string, number>} + */ +function subcontent(events, eventIndex) { + const token = events[eventIndex][1] + const context = events[eventIndex][2] + let startPosition = eventIndex - 1 + /** @type {Array<number>} */ + const startPositions = [] + const tokenizer = + token._tokenizer || context.parser[token.contentType](token.start) + const childEvents = tokenizer.events + /** @type {Array<[number, number]>} */ + const jumps = [] + /** @type {Record<string, number>} */ + const gaps = {} + /** @type {Array<Chunk>} */ + let stream + /** @type {Token | undefined} */ + let previous + let index = -1 + /** @type {Token | undefined} */ + let current = token + let adjust = 0 + let start = 0 + const breaks = [start] + + // Loop forward through the linked tokens to pass them in order to the + // subtokenizer. + while (current) { + // Find the position of the event for this token. + while (events[++startPosition][1] !== current) { + // Empty. + } + startPositions.push(startPosition) + if (!current._tokenizer) { + stream = context.sliceStream(current) + if (!current.next) { + stream.push(null) + } + if (previous) { + tokenizer.defineSkip(current.start) + } + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true + } + tokenizer.write(stream) + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = undefined + } + } + + // Unravel the next token. + previous = current + current = current.next + } + + // Now, loop back through all events (and linked tokens), to figure out which + // parts belong where. + current = token + while (++index < childEvents.length) { + if ( + // Find a void token that includes a break. + childEvents[index][0] === 'exit' && + childEvents[index - 1][0] === 'enter' && + childEvents[index][1].type === childEvents[index - 1][1].type && + childEvents[index][1].start.line !== childEvents[index][1].end.line + ) { + start = index + 1 + breaks.push(start) + // Help GC. + current._tokenizer = undefined + current.previous = undefined + current = current.next + } + } + + // Help GC. + tokenizer.events = [] + + // If there’s one more token (which is the cases for lines that end in an + // EOF), that’s perfect: the last point we found starts it. + // If there isn’t then make sure any remaining content is added to it. + if (current) { + // Help GC. + current._tokenizer = undefined + current.previous = undefined + } else { + breaks.pop() + } + + // Now splice the events from the subtokenizer into the current events, + // moving back to front so that splice indices aren’t affected. + index = breaks.length + while (index--) { + const slice = childEvents.slice(breaks[index], breaks[index + 1]) + const start = startPositions.pop() + jumps.unshift([start, start + slice.length - 1]) + micromark_util_chunked_splice(events, start, 2, slice) + } + index = -1 + while (++index < jumps.length) { + gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] + adjust += jumps[index][1] - jumps[index][0] - 1 + } + return gaps +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** + * No name because it must not be turned off. + * @type {Construct} + */ +const content_content = { + tokenize: tokenizeContent, + resolve: resolveContent +} + +/** @type {Construct} */ +const continuationConstruct = { + tokenize: tokenizeContinuation, + partial: true +} + +/** + * Content is transparent: it’s parsed right now. That way, definitions are also + * parsed right now: before text in paragraphs (specifically, media) are parsed. + * + * @type {Resolver} + */ +function resolveContent(events) { + subtokenize(events) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContent(effects, ok) { + /** @type {Token | undefined} */ + let previous + return chunkStart + + /** + * Before a content chunk. + * + * ```markdown + * > | abc + * ^ + * ``` + * + * @type {State} + */ + function chunkStart(code) { + effects.enter('content') + previous = effects.enter('chunkContent', { + contentType: 'content' + }) + return chunkInside(code) + } + + /** + * In a content chunk. + * + * ```markdown + * > | abc + * ^^^ + * ``` + * + * @type {State} + */ + function chunkInside(code) { + if (code === null) { + return contentEnd(code) + } + + // To do: in `markdown-rs`, each line is parsed on its own, and everything + // is stitched together resolving. + if (markdownLineEnding(code)) { + return effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code) + } + + // Data. + effects.consume(code) + return chunkInside + } + + /** + * + * + * @type {State} + */ + function contentEnd(code) { + effects.exit('chunkContent') + effects.exit('content') + return ok(code) + } + + /** + * + * + * @type {State} + */ + function contentContinue(code) { + effects.consume(code) + effects.exit('chunkContent') + previous.next = effects.enter('chunkContent', { + contentType: 'content', + previous + }) + previous = previous.next + return chunkInside + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContinuation(effects, ok, nok) { + const self = this + return startLookahead + + /** + * + * + * @type {State} + */ + function startLookahead(code) { + effects.exit('chunkContent') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, prefixed, 'linePrefix') + } + + /** + * + * + * @type {State} + */ + function prefixed(code) { + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + + // Always populated by defaults. + + const tail = self.events[self.events.length - 1] + if ( + !self.parser.constructs.disable.null.includes('codeIndented') && + tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ) { + return ok(code) + } + return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + + +/** @type {InitialConstruct} */ +const flow = { + tokenize: initializeFlow +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeFlow(effects) { + const self = this + const initial = effects.attempt( + // Try to parse a blank line. + blankLine, + atBlankEnding, + // Try to parse initial flow (essentially, only code). + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content_content, afterConstruct) + ), + 'linePrefix' + ) + ) + ) + return initial + + /** @type {State} */ + function atBlankEnding(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEndingBlank') + effects.consume(code) + effects.exit('lineEndingBlank') + self.currentConstruct = undefined + return initial + } + + /** @type {State} */ + function afterConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + self.currentConstruct = undefined + return initial + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +const resolver = { + resolveAll: createResolver() +} +const string = initializeFactory('string') +const text_text = initializeFactory('text') + +/** + * @param {'string' | 'text'} field + * @returns {InitialConstruct} + */ +function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: createResolver( + field === 'text' ? resolveAllLineSuffixes : undefined + ) + } + + /** + * @this {TokenizeContext} + * @type {Initializer} + */ + function initializeText(effects) { + const self = this + const constructs = this.parser.constructs[field] + const text = effects.attempt(constructs, start, notText) + return start + + /** @type {State} */ + function start(code) { + return atBreak(code) ? text(code) : notText(code) + } + + /** @type {State} */ + function notText(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('data') + effects.consume(code) + return data + } + + /** @type {State} */ + function data(code) { + if (atBreak(code)) { + effects.exit('data') + return text(code) + } + + // Data. + effects.consume(code) + return data + } + + /** + * @param {Code} code + * @returns {boolean} + */ + function atBreak(code) { + if (code === null) { + return true + } + const list = constructs[code] + let index = -1 + if (list) { + // Always populated by defaults. + + while (++index < list.length) { + const item = list[index] + if (!item.previous || item.previous.call(self, self.previous)) { + return true + } + } + } + return false + } + } +} + +/** + * @param {Resolver | undefined} [extraResolver] + * @returns {Resolver} + */ +function createResolver(extraResolver) { + return resolveAllText + + /** @type {Resolver} */ + function resolveAllText(events, context) { + let index = -1 + /** @type {number | undefined} */ + let enter + + // A rather boring computation (to merge adjacent `data` events) which + // improves mm performance by 29%. + while (++index <= events.length) { + if (enter === undefined) { + if (events[index] && events[index][1].type === 'data') { + enter = index + index++ + } + } else if (!events[index] || events[index][1].type !== 'data') { + // Don’t do anything if there is one data token. + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + index = enter + 2 + } + enter = undefined + } + } + return extraResolver ? extraResolver(events, context) : events + } +} + +/** + * A rather ugly set of instructions which again looks at chunks in the input + * stream. + * The reason to do this here is that it is *much* faster to parse in reverse. + * And that we can’t hook into `null` to split the line suffix before an EOF. + * To do: figure out if we can make this into a clean utility, or even in core. + * As it will be useful for GFMs literal autolink extension (and maybe even + * tables?) + * + * @type {Resolver} + */ +function resolveAllLineSuffixes(events, context) { + let eventIndex = 0 // Skip first. + + while (++eventIndex <= events.length) { + if ( + (eventIndex === events.length || + events[eventIndex][1].type === 'lineEnding') && + events[eventIndex - 1][1].type === 'data' + ) { + const data = events[eventIndex - 1][1] + const chunks = context.sliceStream(data) + let index = chunks.length + let bufferIndex = -1 + let size = 0 + /** @type {boolean | undefined} */ + let tabs + while (index--) { + const chunk = chunks[index] + if (typeof chunk === 'string') { + bufferIndex = chunk.length + while (chunk.charCodeAt(bufferIndex - 1) === 32) { + size++ + bufferIndex-- + } + if (bufferIndex) break + bufferIndex = -1 + } + // Number + else if (chunk === -2) { + tabs = true + size++ + } else if (chunk === -1) { + // Empty + } else { + // Replacement character, exit. + index++ + break + } + } + if (size) { + const token = { + type: + eventIndex === events.length || tabs || size < 2 + ? 'lineSuffix' + : 'hardBreakTrailing', + start: { + line: data.end.line, + column: data.end.column - size, + offset: data.end.offset - size, + _index: data.start._index + index, + _bufferIndex: index + ? bufferIndex + : data.start._bufferIndex + bufferIndex + }, + end: Object.assign({}, data.end) + } + data.end = Object.assign({}, token.start) + if (data.start.offset === data.end.offset) { + Object.assign(data, token) + } else { + events.splice( + eventIndex, + 0, + ['enter', token, context], + ['exit', token, context] + ) + eventIndex += 2 + } + } + eventIndex++ + } + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js +/** + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * Call all `resolveAll`s. + * + * @param {Array<{resolveAll?: Resolver | undefined}>} constructs + * List of constructs, optionally with `resolveAll`s. + * @param {Array<Event>} events + * List of events. + * @param {TokenizeContext} context + * Context used by `tokenize`. + * @returns {Array<Event>} + * Changed events. + */ +function resolveAll(constructs, events, context) { + /** @type {Array<Resolver>} */ + const called = [] + let index = -1 + + while (++index < constructs.length) { + const resolve = constructs[index].resolveAll + + if (resolve && !called.includes(resolve)) { + events = resolve(events, context) + called.push(resolve) + } + } + + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenType} TokenType + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * @callback Restore + * @returns {void} + * + * @typedef Info + * @property {Restore} restore + * @property {number} from + * + * @callback ReturnHandle + * Handle a successful run. + * @param {Construct} construct + * @param {Info} info + * @returns {void} + */ + + + + +/** + * Create a tokenizer. + * Tokenizers deal with one type of data (e.g., containers, flow, text). + * The parser is the object dealing with it all. + * `initialize` works like other constructs, except that only its `tokenize` + * function is used, in which case it doesn’t receive an `ok` or `nok`. + * `from` can be given to set the point before the first character, although + * when further lines are indented, they must be set with `defineSkip`. + * + * @param {ParseContext} parser + * @param {InitialConstruct} initialize + * @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from] + * @returns {TokenizeContext} + */ +function createTokenizer(parser, initialize, from) { + /** @type {Point} */ + let point = Object.assign( + from + ? Object.assign({}, from) + : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ) + /** @type {Record<string, number>} */ + const columnStart = {} + /** @type {Array<Construct>} */ + const resolveAllConstructs = [] + /** @type {Array<Chunk>} */ + let chunks = [] + /** @type {Array<Token>} */ + let stack = [] + /** @type {boolean | undefined} */ + let consumed = true + + /** + * Tools used for tokenizing. + * + * @type {Effects} + */ + const effects = { + consume, + enter, + exit, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, { + interrupt: true + }) + } + + /** + * State and tools for resolving and serializing. + * + * @type {TokenizeContext} + */ + const context = { + previous: null, + code: null, + containerState: {}, + events: [], + parser, + sliceStream, + sliceSerialize, + now, + defineSkip, + write + } + + /** + * The state function. + * + * @type {State | void} + */ + let state = initialize.tokenize.call(context, effects) + + /** + * Track which character we expect to be consumed, to catch bugs. + * + * @type {Code} + */ + let expectedCode + if (initialize.resolveAll) { + resolveAllConstructs.push(initialize) + } + return context + + /** @type {TokenizeContext['write']} */ + function write(slice) { + chunks = push(chunks, slice) + main() + + // Exit if we’re not done, resolve might change stuff. + if (chunks[chunks.length - 1] !== null) { + return [] + } + addResult(initialize, 0) + + // Otherwise, resolve, and exit. + context.events = resolveAll(resolveAllConstructs, context.events, context) + return context.events + } + + // + // Tools. + // + + /** @type {TokenizeContext['sliceSerialize']} */ + function sliceSerialize(token, expandTabs) { + return serializeChunks(sliceStream(token), expandTabs) + } + + /** @type {TokenizeContext['sliceStream']} */ + function sliceStream(token) { + return sliceChunks(chunks, token) + } + + /** @type {TokenizeContext['now']} */ + function now() { + // This is a hot path, so we clone manually instead of `Object.assign({}, point)` + const {line, column, offset, _index, _bufferIndex} = point + return { + line, + column, + offset, + _index, + _bufferIndex + } + } + + /** @type {TokenizeContext['defineSkip']} */ + function defineSkip(value) { + columnStart[value.line] = value.column + accountForPotentialSkip() + } + + // + // State management. + // + + /** + * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by + * `consume`). + * Here is where we walk through the chunks, which either include strings of + * several characters, or numerical character codes. + * The reason to do this in a loop instead of a call is so the stack can + * drain. + * + * @returns {void} + */ + function main() { + /** @type {number} */ + let chunkIndex + while (point._index < chunks.length) { + const chunk = chunks[point._index] + + // If we’re in a buffer chunk, loop through it. + if (typeof chunk === 'string') { + chunkIndex = point._index + if (point._bufferIndex < 0) { + point._bufferIndex = 0 + } + while ( + point._index === chunkIndex && + point._bufferIndex < chunk.length + ) { + go(chunk.charCodeAt(point._bufferIndex)) + } + } else { + go(chunk) + } + } + } + + /** + * Deal with one code. + * + * @param {Code} code + * @returns {void} + */ + function go(code) { + consumed = undefined + expectedCode = code + state = state(code) + } + + /** @type {Effects['consume']} */ + function consume(code) { + if (markdownLineEnding(code)) { + point.line++ + point.column = 1 + point.offset += code === -3 ? 2 : 1 + accountForPotentialSkip() + } else if (code !== -1) { + point.column++ + point.offset++ + } + + // Not in a string chunk. + if (point._bufferIndex < 0) { + point._index++ + } else { + point._bufferIndex++ + + // At end of string chunk. + // @ts-expect-error Points w/ non-negative `_bufferIndex` reference + // strings. + if (point._bufferIndex === chunks[point._index].length) { + point._bufferIndex = -1 + point._index++ + } + } + + // Expose the previous character. + context.previous = code + + // Mark as consumed. + consumed = true + } + + /** @type {Effects['enter']} */ + function enter(type, fields) { + /** @type {Token} */ + // @ts-expect-error Patch instead of assign required fields to help GC. + const token = fields || {} + token.type = type + token.start = now() + context.events.push(['enter', token, context]) + stack.push(token) + return token + } + + /** @type {Effects['exit']} */ + function exit(type) { + const token = stack.pop() + token.end = now() + context.events.push(['exit', token, context]) + return token + } + + /** + * Use results. + * + * @type {ReturnHandle} + */ + function onsuccessfulconstruct(construct, info) { + addResult(construct, info.from) + } + + /** + * Discard results. + * + * @type {ReturnHandle} + */ + function onsuccessfulcheck(_, info) { + info.restore() + } + + /** + * Factory to attempt/check/interrupt. + * + * @param {ReturnHandle} onreturn + * @param {{interrupt?: boolean | undefined} | undefined} [fields] + */ + function constructFactory(onreturn, fields) { + return hook + + /** + * Handle either an object mapping codes to constructs, a list of + * constructs, or a single construct. + * + * @param {Array<Construct> | Construct | ConstructRecord} constructs + * @param {State} returnState + * @param {State | undefined} [bogusState] + * @returns {State} + */ + function hook(constructs, returnState, bogusState) { + /** @type {Array<Construct>} */ + let listOfConstructs + /** @type {number} */ + let constructIndex + /** @type {Construct} */ + let currentConstruct + /** @type {Info} */ + let info + return Array.isArray(constructs) /* c8 ignore next 1 */ + ? handleListOfConstructs(constructs) + : 'tokenize' in constructs + ? // @ts-expect-error Looks like a construct. + handleListOfConstructs([constructs]) + : handleMapOfConstructs(constructs) + + /** + * Handle a list of construct. + * + * @param {ConstructRecord} map + * @returns {State} + */ + function handleMapOfConstructs(map) { + return start + + /** @type {State} */ + function start(code) { + const def = code !== null && map[code] + const all = code !== null && map.null + const list = [ + // To do: add more extension tests. + /* c8 ignore next 2 */ + ...(Array.isArray(def) ? def : def ? [def] : []), + ...(Array.isArray(all) ? all : all ? [all] : []) + ] + return handleListOfConstructs(list)(code) + } + } + + /** + * Handle a list of construct. + * + * @param {Array<Construct>} list + * @returns {State} + */ + function handleListOfConstructs(list) { + listOfConstructs = list + constructIndex = 0 + if (list.length === 0) { + return bogusState + } + return handleConstruct(list[constructIndex]) + } + + /** + * Handle a single construct. + * + * @param {Construct} construct + * @returns {State} + */ + function handleConstruct(construct) { + return start + + /** @type {State} */ + function start(code) { + // To do: not needed to store if there is no bogus state, probably? + // Currently doesn’t work because `inspect` in document does a check + // w/o a bogus, which doesn’t make sense. But it does seem to help perf + // by not storing. + info = store() + currentConstruct = construct + if (!construct.partial) { + context.currentConstruct = construct + } + + // Always populated by defaults. + + if ( + construct.name && + context.parser.constructs.disable.null.includes(construct.name) + ) { + return nok(code) + } + return construct.tokenize.call( + // If we do have fields, create an object w/ `context` as its + // prototype. + // This allows a “live binding”, which is needed for `interrupt`. + fields ? Object.assign(Object.create(context), fields) : context, + effects, + ok, + nok + )(code) + } + } + + /** @type {State} */ + function ok(code) { + consumed = true + onreturn(currentConstruct, info) + return returnState + } + + /** @type {State} */ + function nok(code) { + consumed = true + info.restore() + if (++constructIndex < listOfConstructs.length) { + return handleConstruct(listOfConstructs[constructIndex]) + } + return bogusState + } + } + } + + /** + * @param {Construct} construct + * @param {number} from + * @returns {void} + */ + function addResult(construct, from) { + if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { + resolveAllConstructs.push(construct) + } + if (construct.resolve) { + splice( + context.events, + from, + context.events.length - from, + construct.resolve(context.events.slice(from), context) + ) + } + if (construct.resolveTo) { + context.events = construct.resolveTo(context.events, context) + } + } + + /** + * Store state. + * + * @returns {Info} + */ + function store() { + const startPoint = now() + const startPrevious = context.previous + const startCurrentConstruct = context.currentConstruct + const startEventsIndex = context.events.length + const startStack = Array.from(stack) + return { + restore, + from: startEventsIndex + } + + /** + * Restore state. + * + * @returns {void} + */ + function restore() { + point = startPoint + context.previous = startPrevious + context.currentConstruct = startCurrentConstruct + context.events.length = startEventsIndex + stack = startStack + accountForPotentialSkip() + } + } + + /** + * Move the current point a bit forward in the line when it’s on a column + * skip. + * + * @returns {void} + */ + function accountForPotentialSkip() { + if (point.line in columnStart && point.column < 2) { + point.column = columnStart[point.line] + point.offset += columnStart[point.line] - 1 + } + } +} + +/** + * Get the chunks from a slice of chunks in the range of a token. + * + * @param {Array<Chunk>} chunks + * @param {Pick<Token, 'end' | 'start'>} token + * @returns {Array<Chunk>} + */ +function sliceChunks(chunks, token) { + const startIndex = token.start._index + const startBufferIndex = token.start._bufferIndex + const endIndex = token.end._index + const endBufferIndex = token.end._bufferIndex + /** @type {Array<Chunk>} */ + let view + if (startIndex === endIndex) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] + } else { + view = chunks.slice(startIndex, endIndex) + if (startBufferIndex > -1) { + const head = view[0] + if (typeof head === 'string') { + view[0] = head.slice(startBufferIndex) + } else { + view.shift() + } + } + if (endBufferIndex > 0) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view.push(chunks[endIndex].slice(0, endBufferIndex)) + } + } + return view +} + +/** + * Get the string value of a slice of chunks. + * + * @param {Array<Chunk>} chunks + * @param {boolean | undefined} [expandTabs=false] + * @returns {string} + */ +function serializeChunks(chunks, expandTabs) { + let index = -1 + /** @type {Array<string>} */ + const result = [] + /** @type {boolean | undefined} */ + let atTab + while (++index < chunks.length) { + const chunk = chunks[index] + /** @type {string} */ + let value + if (typeof chunk === 'string') { + value = chunk + } else + switch (chunk) { + case -5: { + value = '\r' + break + } + case -4: { + value = '\n' + break + } + case -3: { + value = '\r' + '\n' + break + } + case -2: { + value = expandTabs ? ' ' : '\t' + break + } + case -1: { + if (!expandTabs && atTab) continue + value = ' ' + break + } + default: { + // Currently only replacement character. + value = String.fromCharCode(chunk) + } + } + atTab = chunk === -2 + result.push(value) + } + return result.join('') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const thematicBreak = { + name: 'thematicBreak', + tokenize: tokenizeThematicBreak +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeThematicBreak(effects, ok, nok) { + let size = 0 + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of thematic break. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('thematicBreak') + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * After optional whitespace, at marker. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + marker = code + return atBreak(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.enter('thematicBreakSequence') + return sequence(code) + } + if (size >= 3 && (code === null || markdownLineEnding(code))) { + effects.exit('thematicBreak') + return ok(code) + } + return nok(code) + } + + /** + * In sequence. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function sequence(code) { + if (code === marker) { + effects.consume(code) + size++ + return sequence + } + effects.exit('thematicBreakSequence') + return markdownSpace(code) + ? factorySpace(effects, atBreak, 'whitespace')(code) + : atBreak(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + +/** @type {Construct} */ +const list = { + name: 'list', + tokenize: tokenizeListStart, + continuation: { + tokenize: tokenizeListContinuation + }, + exit: tokenizeListEnd +} + +/** @type {Construct} */ +const listItemPrefixWhitespaceConstruct = { + tokenize: tokenizeListItemPrefixWhitespace, + partial: true +} + +/** @type {Construct} */ +const indentConstruct = { + tokenize: tokenizeIndent, + partial: true +} + +// To do: `markdown-rs` parses list items on their own and later stitches them +// together. + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListStart(effects, ok, nok) { + const self = this + const tail = self.events[self.events.length - 1] + let initialSize = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + let size = 0 + return start + + /** @type {State} */ + function start(code) { + const kind = + self.containerState.type || + (code === 42 || code === 43 || code === 45 + ? 'listUnordered' + : 'listOrdered') + if ( + kind === 'listUnordered' + ? !self.containerState.marker || code === self.containerState.marker + : asciiDigit(code) + ) { + if (!self.containerState.type) { + self.containerState.type = kind + effects.enter(kind, { + _container: true + }) + } + if (kind === 'listUnordered') { + effects.enter('listItemPrefix') + return code === 42 || code === 45 + ? effects.check(thematicBreak, nok, atMarker)(code) + : atMarker(code) + } + if (!self.interrupt || code === 49) { + effects.enter('listItemPrefix') + effects.enter('listItemValue') + return inside(code) + } + } + return nok(code) + } + + /** @type {State} */ + function inside(code) { + if (asciiDigit(code) && ++size < 10) { + effects.consume(code) + return inside + } + if ( + (!self.interrupt || size < 2) && + (self.containerState.marker + ? code === self.containerState.marker + : code === 41 || code === 46) + ) { + effects.exit('listItemValue') + return atMarker(code) + } + return nok(code) + } + + /** + * @type {State} + **/ + function atMarker(code) { + effects.enter('listItemMarker') + effects.consume(code) + effects.exit('listItemMarker') + self.containerState.marker = self.containerState.marker || code + return effects.check( + blankLine, + // Can’t be empty when interrupting. + self.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ) + } + + /** @type {State} */ + function onBlank(code) { + self.containerState.initialBlankLine = true + initialSize++ + return endOfPrefix(code) + } + + /** @type {State} */ + function otherPrefix(code) { + if (markdownSpace(code)) { + effects.enter('listItemPrefixWhitespace') + effects.consume(code) + effects.exit('listItemPrefixWhitespace') + return endOfPrefix + } + return nok(code) + } + + /** @type {State} */ + function endOfPrefix(code) { + self.containerState.size = + initialSize + + self.sliceSerialize(effects.exit('listItemPrefix'), true).length + return ok(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListContinuation(effects, ok, nok) { + const self = this + self.containerState._closeFlow = undefined + return effects.check(blankLine, onBlank, notBlank) + + /** @type {State} */ + function onBlank(code) { + self.containerState.furtherBlankLines = + self.containerState.furtherBlankLines || + self.containerState.initialBlankLine + + // We have a blank line. + // Still, try to consume at most the items size. + return factorySpace( + effects, + ok, + 'listItemIndent', + self.containerState.size + 1 + )(code) + } + + /** @type {State} */ + function notBlank(code) { + if (self.containerState.furtherBlankLines || !markdownSpace(code)) { + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return notInCurrentItem(code) + } + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) + } + + /** @type {State} */ + function notInCurrentItem(code) { + // While we do continue, we signal that the flow should be closed. + self.containerState._closeFlow = true + // As we’re closing flow, we’re no longer interrupting. + self.interrupt = undefined + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(list, ok, nok), + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeIndent(effects, ok, nok) { + const self = this + return factorySpace( + effects, + afterPrefix, + 'listItemIndent', + self.containerState.size + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'listItemIndent' && + tail[2].sliceSerialize(tail[1], true).length === self.containerState.size + ? ok(code) + : nok(code) + } +} + +/** + * @type {Exiter} + * @this {TokenizeContext} + */ +function tokenizeListEnd(effects) { + effects.exit(this.containerState.type) +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListItemPrefixWhitespace(effects, ok, nok) { + const self = this + + // Always populated by defaults. + + return factorySpace( + effects, + afterPrefix, + 'listItemPrefixWhitespace', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return !markdownSpace(code) && + tail && + tail[1].type === 'listItemPrefixWhitespace' + ? ok(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blockQuote = { + name: 'blockQuote', + tokenize: tokenizeBlockQuoteStart, + continuation: { + tokenize: tokenizeBlockQuoteContinuation + }, + exit +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteStart(effects, ok, nok) { + const self = this + return start + + /** + * Start of block quote. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 62) { + const state = self.containerState + if (!state.open) { + effects.enter('blockQuote', { + _container: true + }) + state.open = true + } + effects.enter('blockQuotePrefix') + effects.enter('blockQuoteMarker') + effects.consume(code) + effects.exit('blockQuoteMarker') + return after + } + return nok(code) + } + + /** + * After `>`, before optional whitespace. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownSpace(code)) { + effects.enter('blockQuotePrefixWhitespace') + effects.consume(code) + effects.exit('blockQuotePrefixWhitespace') + effects.exit('blockQuotePrefix') + return ok + } + effects.exit('blockQuotePrefix') + return ok(code) + } +} + +/** + * Start of block quote continuation. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteContinuation(effects, ok, nok) { + const self = this + return contStart + + /** + * Start of block quote continuation. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contStart(code) { + if (markdownSpace(code)) { + // Always populated by defaults. + + return factorySpace( + effects, + contBefore, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } + return contBefore(code) + } + + /** + * At `>`, after optional whitespace. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contBefore(code) { + return effects.attempt(blockQuote, ok, nok)(code) + } +} + +/** @type {Exiter} */ +function exit(effects) { + effects.exit('blockQuote') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse destinations. + * + * ###### Examples + * + * ```markdown + * <a> + * <a\>b> + * <a b> + * <a)> + * a + * a\)b + * a(b)c + * a(b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type for whole (`<a>` or `b`). + * @param {TokenType} literalType + * Type when enclosed (`<a>`). + * @param {TokenType} literalMarkerType + * Type for enclosing (`<` and `>`). + * @param {TokenType} rawType + * Type when not enclosed (`b`). + * @param {TokenType} stringType + * Type for the value (`a` or `b`). + * @param {number | undefined} [max=Infinity] + * Depth of nested parens (inclusive). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryDestination( + effects, + ok, + nok, + type, + literalType, + literalMarkerType, + rawType, + stringType, + max +) { + const limit = max || Number.POSITIVE_INFINITY + let balance = 0 + return start + + /** + * Start of destination. + * + * ```markdown + * > | <aa> + * ^ + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 60) { + effects.enter(type) + effects.enter(literalType) + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + return enclosedBefore + } + + // ASCII control, space, closing paren. + if (code === null || code === 32 || code === 41 || asciiControl(code)) { + return nok(code) + } + effects.enter(type) + effects.enter(rawType) + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return raw(code) + } + + /** + * After `<`, at an enclosed destination. + * + * ```markdown + * > | <aa> + * ^ + * ``` + * + * @type {State} + */ + function enclosedBefore(code) { + if (code === 62) { + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + effects.exit(literalType) + effects.exit(type) + return ok + } + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return enclosed(code) + } + + /** + * In enclosed destination. + * + * ```markdown + * > | <aa> + * ^ + * ``` + * + * @type {State} + */ + function enclosed(code) { + if (code === 62) { + effects.exit('chunkString') + effects.exit(stringType) + return enclosedBefore(code) + } + if (code === null || code === 60 || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? enclosedEscape : enclosed + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | <a\*a> + * ^ + * ``` + * + * @type {State} + */ + function enclosedEscape(code) { + if (code === 60 || code === 62 || code === 92) { + effects.consume(code) + return enclosed + } + return enclosed(code) + } + + /** + * In raw destination. + * + * ```markdown + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function raw(code) { + if ( + !balance && + (code === null || code === 41 || markdownLineEndingOrSpace(code)) + ) { + effects.exit('chunkString') + effects.exit(stringType) + effects.exit(rawType) + effects.exit(type) + return ok(code) + } + if (balance < limit && code === 40) { + effects.consume(code) + balance++ + return raw + } + if (code === 41) { + effects.consume(code) + balance-- + return raw + } + + // ASCII control (but *not* `\0`) and space and `(`. + // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it + // doesn’t. + if (code === null || code === 32 || code === 40 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? rawEscape : raw + } + + /** + * After `\`, at special character. + * + * ```markdown + * > | a\*a + * ^ + * ``` + * + * @type {State} + */ + function rawEscape(code) { + if (code === 40 || code === 41 || code === 92) { + effects.consume(code) + return raw + } + return raw(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse labels. + * + * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. + * + * ###### Examples + * + * ```markdown + * [a] + * [a + * b] + * [a\]b] + * ``` + * + * @this {TokenizeContext} + * Tokenize context. + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole label (`[a]`). + * @param {TokenType} markerType + * Type for the markers (`[` and `]`). + * @param {TokenType} stringType + * Type for the identifier (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryLabel(effects, ok, nok, type, markerType, stringType) { + const self = this + let size = 0 + /** @type {boolean} */ + let seen + return start + + /** + * Start of label. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.enter(stringType) + return atBreak + } + + /** + * In label, at something, before something else. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if ( + size > 999 || + code === null || + code === 91 || + (code === 93 && !seen) || + // To do: remove in the future once we’ve switched from + // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + // which doesn’t need this. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + (code === 94 && + !size && + '_hiddenFootnoteSupport' in self.parser.constructs) + ) { + return nok(code) + } + if (code === 93) { + effects.exit(stringType) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + + // To do: indent? Link chunks and EOLs together? + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return atBreak + } + effects.enter('chunkString', { + contentType: 'string' + }) + return labelInside(code) + } + + /** + * In label, in text. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function labelInside(code) { + if ( + code === null || + code === 91 || + code === 93 || + markdownLineEnding(code) || + size++ > 999 + ) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + if (!seen) seen = !markdownSpace(code) + return code === 92 ? labelEscape : labelInside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | [a\*a] + * ^ + * ``` + * + * @type {State} + */ + function labelEscape(code) { + if (code === 91 || code === 92 || code === 93) { + effects.consume(code) + size++ + return labelInside + } + return labelInside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +/** + * Parse titles. + * + * ###### Examples + * + * ```markdown + * "a" + * 'b' + * (c) + * "a + * b" + * 'a + * b' + * (a\)b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole title (`"a"`, `'b'`, `(c)`). + * @param {TokenType} markerType + * Type for the markers (`"`, `'`, `(`, and `)`). + * @param {TokenType} stringType + * Type for the value (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryTitle(effects, ok, nok, type, markerType, stringType) { + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of title. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 34 || code === 39 || code === 40) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + marker = code === 40 ? 41 : code + return begin + } + return nok(code) + } + + /** + * After opening marker. + * + * This is also used at the closing marker. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function begin(code) { + if (code === marker) { + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + effects.enter(stringType) + return atBreak(code) + } + + /** + * At something, before something else. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.exit(stringType) + return begin(marker) + } + if (code === null) { + return nok(code) + } + + // Note: blank lines can’t exist in content. + if (markdownLineEnding(code)) { + // To do: use `space_or_tab_eol_with_options`, connect. + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, atBreak, 'linePrefix') + } + effects.enter('chunkString', { + contentType: 'string' + }) + return inside(code) + } + + /** + * + * + * @type {State} + */ + function inside(code) { + if (code === marker || code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + return code === 92 ? escape : inside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | "a\*b" + * ^ + * ``` + * + * @type {State} + */ + function escape(code) { + if (code === marker || code === 92) { + effects.consume(code) + return inside + } + return inside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + */ + + + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * line endings or spaces in markdown are often optional, in which case this + * factory can be used and `ok` will be switched to whether spaces were found + * or not + * * one line ending or space can be detected with + * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @returns + * Start state. + */ +function factoryWhitespace(effects, ok) { + /** @type {boolean} */ + let seen + return start + + /** @type {State} */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + seen = true + return start + } + if (markdownSpace(code)) { + return factorySpace( + effects, + start, + seen ? 'linePrefix' : 'lineSuffix' + )(code) + } + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js +/** + * Normalize an identifier (as found in references, definitions). + * + * Collapses markdown whitespace, trim, and then lower- and uppercase. + * + * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their + * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different + * uppercase character (U+0398 (`Θ`)). + * So, to get a canonical form, we perform both lower- and uppercase. + * + * Using uppercase last makes sure keys will never interact with default + * prototypal values (such as `constructor`): nothing in the prototype of + * `Object` is uppercase. + * + * @param {string} value + * Identifier to normalize. + * @returns {string} + * Normalized identifier. + */ +function normalizeIdentifier(value) { + return ( + value + // Collapse markdown whitespace. + .replace(/[\t\n\r ]+/g, ' ') + // Trim. + .replace(/^ | $/g, '') + // Some characters are considered “uppercase”, but if their lowercase + // counterpart is uppercased will result in a different uppercase + // character. + // Hence, to get that form, we perform both lower- and uppercase. + // Upper case makes sure keys will not interact with default prototypal + // methods: no method is uppercase. + .toLowerCase() + .toUpperCase() + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + +/** @type {Construct} */ +const definition = { + name: 'definition', + tokenize: tokenizeDefinition +} + +/** @type {Construct} */ +const titleBefore = { + tokenize: tokenizeTitleBefore, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeDefinition(effects, ok, nok) { + const self = this + /** @type {string} */ + let identifier + return start + + /** + * At start of a definition. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Do not interrupt paragraphs (but do follow definitions). + // To do: do `interrupt` the way `markdown-rs` does. + // To do: parse whitespace the way `markdown-rs` does. + effects.enter('definition') + return before(code) + } + + /** + * After optional whitespace, at `[`. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + // To do: parse whitespace the way `markdown-rs` does. + + return factoryLabel.call( + self, + effects, + labelAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionLabel', + 'definitionLabelMarker', + 'definitionLabelString' + )(code) + } + + /** + * After label. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function labelAfter(code) { + identifier = normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + if (code === 58) { + effects.enter('definitionMarker') + effects.consume(code) + effects.exit('definitionMarker') + return markerAfter + } + return nok(code) + } + + /** + * After marker. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function markerAfter(code) { + // Note: whitespace is optional. + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, destinationBefore)(code) + : destinationBefore(code) + } + + /** + * Before destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationBefore(code) { + return factoryDestination( + effects, + destinationAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionDestination', + 'definitionDestinationLiteral', + 'definitionDestinationLiteralMarker', + 'definitionDestinationRaw', + 'definitionDestinationString' + )(code) + } + + /** + * After destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationAfter(code) { + return effects.attempt(titleBefore, after, after)(code) + } + + /** + * After definition. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return markdownSpace(code) + ? factorySpace(effects, afterWhitespace, 'whitespace')(code) + : afterWhitespace(code) + } + + /** + * After definition, after optional whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function afterWhitespace(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('definition') + + // Note: we don’t care about uniqueness. + // It’s likely that that doesn’t happen very frequently. + // It is more likely that it wastes precious time. + self.parser.defined.push(identifier) + + // To do: `markdown-rs` interrupt. + // // You’d be interrupting. + // tokenizer.interrupt = true + return ok(code) + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeTitleBefore(effects, ok, nok) { + return titleBefore + + /** + * After destination, at whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, beforeMarker)(code) + : nok(code) + } + + /** + * At title. + * + * ```markdown + * | [a]: b + * > | "c" + * ^ + * ``` + * + * @type {State} + */ + function beforeMarker(code) { + return factoryTitle( + effects, + titleAfter, + nok, + 'definitionTitle', + 'definitionTitleMarker', + 'definitionTitleString' + )(code) + } + + /** + * After title. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfter(code) { + return markdownSpace(code) + ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) + : titleAfterOptionalWhitespace(code) + } + + /** + * After title, after optional whitespace. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfterOptionalWhitespace(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const codeIndented = { + name: 'codeIndented', + tokenize: tokenizeCodeIndented +} + +/** @type {Construct} */ +const furtherStart = { + tokenize: tokenizeFurtherStart, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeIndented(effects, ok, nok) { + const self = this + return start + + /** + * Start of code (indented). + * + * > **Parsing note**: it is not needed to check if this first line is a + * > filled line (that it has a non-whitespace character), because blank lines + * > are parsed already, so we never run into that. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: manually check if interrupting like `markdown-rs`. + + effects.enter('codeIndented') + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? atBreak(code) + : nok(code) + } + + /** + * At a break. + * + * ```markdown + * > | aaa + * ^ ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === null) { + return after(code) + } + if (markdownLineEnding(code)) { + return effects.attempt(furtherStart, atBreak, after)(code) + } + effects.enter('codeFlowValue') + return inside(code) + } + + /** + * In code content. + * + * ```markdown + * > | aaa + * ^^^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return atBreak(code) + } + effects.consume(code) + return inside + } + + /** @type {State} */ + function after(code) { + effects.exit('codeIndented') + // To do: allow interrupting like `markdown-rs`. + // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeFurtherStart(effects, ok, nok) { + const self = this + return furtherStart + + /** + * At eol, trying to parse another indent. + * + * ```markdown + * > | aaa + * ^ + * | bbb + * ``` + * + * @type {State} + */ + function furtherStart(code) { + // To do: improve `lazy` / `pierce` handling. + // If this is a lazy line, it can’t be code. + if (self.parser.lazy[self.now().line]) { + return nok(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return furtherStart + } + + // To do: the code here in `micromark-js` is a bit different from + // `markdown-rs` because there it can attempt spaces. + // We can’t yet. + // + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? ok(code) + : markdownLineEnding(code) + ? furtherStart(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const headingAtx = { + name: 'headingAtx', + tokenize: tokenizeHeadingAtx, + resolve: resolveHeadingAtx +} + +/** @type {Resolver} */ +function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2 + let contentStart = 3 + /** @type {Token} */ + let content + /** @type {Token} */ + let text + + // Prefix whitespace, part of the opening. + if (events[contentStart][1].type === 'whitespace') { + contentStart += 2 + } + + // Suffix whitespace, part of the closing. + if ( + contentEnd - 2 > contentStart && + events[contentEnd][1].type === 'whitespace' + ) { + contentEnd -= 2 + } + if ( + events[contentEnd][1].type === 'atxHeadingSequence' && + (contentStart === contentEnd - 1 || + (contentEnd - 4 > contentStart && + events[contentEnd - 2][1].type === 'whitespace')) + ) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 + } + if (contentEnd > contentStart) { + content = { + type: 'atxHeadingText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end + } + text = { + type: 'chunkText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + contentType: 'text' + } + splice(events, contentStart, contentEnd - contentStart + 1, [ + ['enter', content, context], + ['enter', text, context], + ['exit', text, context], + ['exit', content, context] + ]) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHeadingAtx(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of a heading (atx). + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + effects.enter('atxHeading') + return before(code) + } + + /** + * After optional whitespace, at `#`. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('atxHeadingSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 35 && size++ < 6) { + effects.consume(code) + return sequenceOpen + } + + // Always at least one `#`. + if (code === null || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingSequence') + return atBreak(code) + } + return nok(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === 35) { + effects.enter('atxHeadingSequence') + return sequenceFurther(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('atxHeading') + // To do: interrupt like `markdown-rs`. + // // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } + if (markdownSpace(code)) { + return factorySpace(effects, atBreak, 'whitespace')(code) + } + + // To do: generate `data` tokens, add the `text` token later. + // Needs edit map, see: `markdown.rs`. + effects.enter('atxHeadingText') + return data(code) + } + + /** + * In further sequence (after whitespace). + * + * Could be normal “visible” hashes in the heading or a final sequence. + * + * ```markdown + * > | ## aa ## + * ^ + * ``` + * + * @type {State} + */ + function sequenceFurther(code) { + if (code === 35) { + effects.consume(code) + return sequenceFurther + } + effects.exit('atxHeadingSequence') + return atBreak(code) + } + + /** + * In text. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingText') + return atBreak(code) + } + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const setextUnderline = { + name: 'setextUnderline', + tokenize: tokenizeSetextUnderline, + resolveTo: resolveToSetextUnderline +} + +/** @type {Resolver} */ +function resolveToSetextUnderline(events, context) { + // To do: resolve like `markdown-rs`. + let index = events.length + /** @type {number | undefined} */ + let content + /** @type {number | undefined} */ + let text + /** @type {number | undefined} */ + let definition + + // Find the opening of the content. + // It’ll always exist: we don’t tokenize if it isn’t there. + while (index--) { + if (events[index][0] === 'enter') { + if (events[index][1].type === 'content') { + content = index + break + } + if (events[index][1].type === 'paragraph') { + text = index + } + } + // Exit + else { + if (events[index][1].type === 'content') { + // Remove the content end (if needed we’ll add it later) + events.splice(index, 1) + } + if (!definition && events[index][1].type === 'definition') { + definition = index + } + } + } + const heading = { + type: 'setextHeading', + start: Object.assign({}, events[text][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + + // Change the paragraph to setext heading text. + events[text][1].type = 'setextHeadingText' + + // If we have definitions in the content, we’ll keep on having content, + // but we need move it. + if (definition) { + events.splice(text, 0, ['enter', heading, context]) + events.splice(definition + 1, 0, ['exit', events[content][1], context]) + events[content][1].end = Object.assign({}, events[definition][1].end) + } else { + events[content][1] = heading + } + + // Add the heading exit at the end. + events.push(['exit', heading, context]) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeSetextUnderline(effects, ok, nok) { + const self = this + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * At start of heading (setext) underline. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + let index = self.events.length + /** @type {boolean | undefined} */ + let paragraph + // Find an opening. + while (index--) { + // Skip enter/exit of line ending, line prefix, and content. + // We can now either have a definition or a paragraph. + if ( + self.events[index][1].type !== 'lineEnding' && + self.events[index][1].type !== 'linePrefix' && + self.events[index][1].type !== 'content' + ) { + paragraph = self.events[index][1].type === 'paragraph' + break + } + } + + // To do: handle lazy/pierce like `markdown-rs`. + // To do: parse indent like `markdown-rs`. + if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { + effects.enter('setextHeadingLine') + marker = code + return before(code) + } + return nok(code) + } + + /** + * After optional whitespace, at `-` or `=`. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('setextHeadingLineSequence') + return inside(code) + } + + /** + * In sequence. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + effects.exit('setextHeadingLineSequence') + return markdownSpace(code) + ? factorySpace(effects, after, 'lineSuffix')(code) + : after(code) + } + + /** + * After sequence, after optional whitespace. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('setextHeadingLine') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js +/** + * List of lowercase HTML “block” tag names. + * + * The list, when parsing HTML (flow), results in more relaxed rules (condition + * 6). + * Because they are known blocks, the HTML-like syntax doesn’t have to be + * strictly parsed. + * For tag names not in this list, a more strict algorithm (condition 7) is used + * to detect whether the HTML-like syntax is seen as HTML (flow) or not. + * + * This is copied from: + * <https://spec.commonmark.org/0.30/#html-blocks>. + * + * > 👉 **Note**: `search` was added in `CommonMark@0.31`. + */ +const htmlBlockNames = [ + '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' +] + +/** + * List of lowercase HTML “raw” tag names. + * + * The list, when parsing HTML (flow), results in HTML that can include lines + * without exiting, until a closing tag also in this list is found (condition + * 1). + * + * This module is copied from: + * <https://spec.commonmark.org/0.30/#html-blocks>. + * + * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. + */ +const htmlRawNames = ['pre', 'script', 'style', 'textarea'] + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + +/** @type {Construct} */ +const htmlFlow = { + name: 'htmlFlow', + tokenize: tokenizeHtmlFlow, + resolveTo: resolveToHtmlFlow, + concrete: true +} + +/** @type {Construct} */ +const blankLineBefore = { + tokenize: tokenizeBlankLineBefore, + partial: true +} +const nonLazyContinuationStart = { + tokenize: tokenizeNonLazyContinuationStart, + partial: true +} + +/** @type {Resolver} */ +function resolveToHtmlFlow(events) { + let index = events.length + while (index--) { + if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { + break + } + } + if (index > 1 && events[index - 2][1].type === 'linePrefix') { + // Add the prefix start to the HTML token. + events[index][1].start = events[index - 2][1].start + // Add the prefix start to the HTML line token. + events[index + 1][1].start = events[index - 2][1].start + // Remove the line prefix. + events.splice(index - 2, 2) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlFlow(effects, ok, nok) { + const self = this + /** @type {number} */ + let marker + /** @type {boolean} */ + let closingTag + /** @type {string} */ + let buffer + /** @type {number} */ + let index + /** @type {Code} */ + let markerB + return start + + /** + * Start of HTML (flow). + * + * ```markdown + * > | <x /> + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * At `<`, after optional whitespace. + * + * ```markdown + * > | <x /> + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('htmlFlow') + effects.enter('htmlFlowData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | <x /> + * ^ + * > | <!doctype> + * ^ + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + closingTag = true + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + marker = 3 + // To do: + // tokenizer.concrete = true + // To do: use `markdown-rs` style interrupt. + // While we’re in an instruction instead of a declaration, we’re on a `?` + // right now, so we do need to search for `>`, similar to declarations. + return self.interrupt ? ok : continuationDeclarationInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After `<!`, at declaration, comment, or CDATA. + * + * ```markdown + * > | <!doctype> + * ^ + * > | <!--xxx--> + * ^ + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + marker = 2 + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + marker = 5 + index = 0 + return cdataOpenInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + marker = 4 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After `<!-`, inside a comment, at another `-`. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After `<![`, inside CDATA, expecting `CDATA[`. + * + * ```markdown + * > | <![CDATA[>&<]]> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + if (index === value.length) { + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return cdataOpenInside + } + return nok(code) + } + + /** + * After `</`, in closing tag, at tag name. + * + * ```markdown + * > | </x> + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * In tag name. + * + * ```markdown + * > | <ab> + * ^^ + * > | </ab> + * ^^ + * ``` + * + * @type {State} + */ + function tagName(code) { + if ( + code === null || + code === 47 || + code === 62 || + markdownLineEndingOrSpace(code) + ) { + const slash = code === 47 + const name = buffer.toLowerCase() + if (!slash && !closingTag && htmlRawNames.includes(name)) { + marker = 1 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + if (htmlBlockNames.includes(buffer.toLowerCase())) { + marker = 6 + if (slash) { + effects.consume(code) + return basicSelfClosing + } + + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + marker = 7 + // Do not support complete HTML when interrupting. + return self.interrupt && !self.parser.lazy[self.now().line] + ? nok(code) + : closingTag + ? completeClosingTagAfter(code) + : completeAttributeNameBefore(code) + } + + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + buffer += String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After closing slash of a basic tag name. + * + * ```markdown + * > | <div/> + * ^ + * ``` + * + * @type {State} + */ + function basicSelfClosing(code) { + if (code === 62) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return nok(code) + } + + /** + * After closing slash of a complete tag name. + * + * ```markdown + * > | <x/> + * ^ + * ``` + * + * @type {State} + */ + function completeClosingTagAfter(code) { + if (markdownSpace(code)) { + effects.consume(code) + return completeClosingTagAfter + } + return completeEnd(code) + } + + /** + * At an attribute name. + * + * At first, this state is used after a complete tag name, after whitespace, + * where it expects optional attributes or the end of the tag. + * It is also reused after attributes, when expecting more optional + * attributes. + * + * ```markdown + * > | <a /> + * ^ + * > | <a :b> + * ^ + * > | <a _b> + * ^ + * > | <a b> + * ^ + * > | <a > + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameBefore(code) { + if (code === 47) { + effects.consume(code) + return completeEnd + } + + // ASCII alphanumerical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return completeAttributeName + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameBefore + } + return completeEnd(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | <a :b> + * ^ + * > | <a _b> + * ^ + * > | <a b> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeName(code) { + // ASCII alphanumerical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return completeAttributeName + } + return completeAttributeNameAfter(code) + } + + /** + * After attribute name, at an optional initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | <a b> + * ^ + * > | <a b=c> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return completeAttributeValueBefore + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameAfter + } + return completeAttributeNameBefore(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | <a b=c> + * ^ + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + markerB = code + return completeAttributeValueQuoted + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeValueBefore + } + return completeAttributeValueUnquoted(code) + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | <a b="c"> + * ^ + * > | <a b='c'> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuoted(code) { + if (code === markerB) { + effects.consume(code) + markerB = null + return completeAttributeValueQuotedAfter + } + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return completeAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | <a b=c> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 47 || + code === 60 || + code === 61 || + code === 62 || + code === 96 || + markdownLineEndingOrSpace(code) + ) { + return completeAttributeNameAfter(code) + } + effects.consume(code) + return completeAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the + * end of the tag. + * + * ```markdown + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownSpace(code)) { + return completeAttributeNameBefore(code) + } + return nok(code) + } + + /** + * In certain circumstances of a complete tag where only an `>` is allowed. + * + * ```markdown + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeEnd(code) { + if (code === 62) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * After `>` in a complete tag. + * + * ```markdown + * > | <x> + * ^ + * ``` + * + * @type {State} + */ + function completeAfter(code) { + if (code === null || markdownLineEnding(code)) { + // // Do not form containers. + // tokenizer.concrete = true + return continuation(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * In continuation of any HTML kind. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function continuation(code) { + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationCommentInside + } + if (code === 60 && marker === 1) { + effects.consume(code) + return continuationRawTagOpen + } + if (code === 62 && marker === 4) { + effects.consume(code) + return continuationClose + } + if (code === 63 && marker === 3) { + effects.consume(code) + return continuationDeclarationInside + } + if (code === 93 && marker === 5) { + effects.consume(code) + return continuationCdataInside + } + if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { + effects.exit('htmlFlowData') + return effects.check( + blankLineBefore, + continuationAfter, + continuationStart + )(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationStart(code) + } + effects.consume(code) + return continuation + } + + /** + * In continuation, at eol. + * + * ```markdown + * > | <x> + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStart(code) { + return effects.check( + nonLazyContinuationStart, + continuationStartNonLazy, + continuationAfter + )(code) + } + + /** + * In continuation, at eol, before non-lazy content. + * + * ```markdown + * > | <x> + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStartNonLazy(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return continuationBefore + } + + /** + * In continuation, before non-lazy content. + * + * ```markdown + * | <x> + * > | asd + * ^ + * ``` + * + * @type {State} + */ + function continuationBefore(code) { + if (code === null || markdownLineEnding(code)) { + return continuationStart(code) + } + effects.enter('htmlFlowData') + return continuation(code) + } + + /** + * In comment continuation, after one `-`, expecting another. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function continuationCommentInside(code) { + if (code === 45) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In raw continuation, after `<`, at `/`. + * + * ```markdown + * > | <script>console.log(1)</script> + * ^ + * ``` + * + * @type {State} + */ + function continuationRawTagOpen(code) { + if (code === 47) { + effects.consume(code) + buffer = '' + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In raw continuation, after `</`, in a raw tag name. + * + * ```markdown + * > | <script>console.log(1)</script> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function continuationRawEndTag(code) { + if (code === 62) { + const name = buffer.toLowerCase() + if (htmlRawNames.includes(name)) { + effects.consume(code) + return continuationClose + } + return continuation(code) + } + if (asciiAlpha(code) && buffer.length < 8) { + effects.consume(code) + // @ts-expect-error: not null. + buffer += String.fromCharCode(code) + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In cdata continuation, after `]`, expecting `]>`. + * + * ```markdown + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationCdataInside(code) { + if (code === 93) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In declaration or instruction continuation, at `>`. + * + * ```markdown + * > | <!--> + * ^ + * > | <?> + * ^ + * > | <!q> + * ^ + * > | <!--ab--> + * ^ + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationDeclarationInside(code) { + if (code === 62) { + effects.consume(code) + return continuationClose + } + + // More dashes. + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In closed continuation: everything we get until the eol/eof is part of it. + * + * ```markdown + * > | <!doctype> + * ^ + * ``` + * + * @type {State} + */ + function continuationClose(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationAfter(code) + } + effects.consume(code) + return continuationClose + } + + /** + * Done. + * + * ```markdown + * > | <!doctype> + * ^ + * ``` + * + * @type {State} + */ + function continuationAfter(code) { + effects.exit('htmlFlow') + // // Feel free to interrupt. + // tokenizer.interrupt = false + // // No longer concrete. + // tokenizer.concrete = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuationStart(effects, ok, nok) { + const self = this + return start + + /** + * At eol, before continuation. + * + * ```markdown + * > | * ```js + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return after + } + return nok(code) + } + + /** + * A continuation. + * + * ```markdown + * | * ```js + * > | b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLineBefore(effects, ok, nok) { + return start + + /** + * Before eol, expecting blank line. + * + * ```markdown + * > | <div> + * ^ + * | + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return effects.attempt(blankLine, ok, nok) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const nonLazyContinuation = { + tokenize: tokenizeNonLazyContinuation, + partial: true +} + +/** @type {Construct} */ +const codeFenced = { + name: 'codeFenced', + tokenize: tokenizeCodeFenced, + concrete: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeFenced(effects, ok, nok) { + const self = this + /** @type {Construct} */ + const closeStart = { + tokenize: tokenizeCloseStart, + partial: true + } + let initialPrefix = 0 + let sizeOpen = 0 + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of code. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse whitespace like `markdown-rs`. + return beforeSequenceOpen(code) + } + + /** + * In opening fence, after prefix, at sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeSequenceOpen(code) { + const tail = self.events[self.events.length - 1] + initialPrefix = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + marker = code + effects.enter('codeFenced') + effects.enter('codeFencedFence') + effects.enter('codeFencedFenceSequence') + return sequenceOpen(code) + } + + /** + * In opening fence sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === marker) { + sizeOpen++ + effects.consume(code) + return sequenceOpen + } + if (sizeOpen < 3) { + return nok(code) + } + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, infoBefore, 'whitespace')(code) + : infoBefore(code) + } + + /** + * In opening fence, after the sequence (and optional whitespace), before info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function infoBefore(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return self.interrupt + ? ok(code) + : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFencedFenceInfo') + effects.enter('chunkString', { + contentType: 'string' + }) + return info(code) + } + + /** + * In info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function info(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return infoBefore(code) + } + if (markdownSpace(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return factorySpace(effects, metaBefore, 'whitespace')(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return info + } + + /** + * In opening fence, after info and whitespace, before meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function metaBefore(code) { + if (code === null || markdownLineEnding(code)) { + return infoBefore(code) + } + effects.enter('codeFencedFenceMeta') + effects.enter('chunkString', { + contentType: 'string' + }) + return meta(code) + } + + /** + * In meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function meta(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceMeta') + return infoBefore(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return meta + } + + /** + * At eol/eof in code, before a non-lazy closing fence or content. + * + * ```markdown + * > | ~~~js + * ^ + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function atNonLazyBreak(code) { + return effects.attempt(closeStart, after, contentBefore)(code) + } + + /** + * Before code content, not a closing fence, at eol. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return contentStart + } + + /** + * Before code content, not a closing fence. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentStart(code) { + return initialPrefix > 0 && markdownSpace(code) + ? factorySpace( + effects, + beforeContentChunk, + 'linePrefix', + initialPrefix + 1 + )(code) + : beforeContentChunk(code) + } + + /** + * Before code content, after optional prefix. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeContentChunk(code) { + if (code === null || markdownLineEnding(code)) { + return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFlowValue') + return contentChunk(code) + } + + /** + * In code content. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^^^^^^^^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentChunk(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return beforeContentChunk(code) + } + effects.consume(code) + return contentChunk + } + + /** + * After code. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + effects.exit('codeFenced') + return ok(code) + } + + /** + * @this {TokenizeContext} + * @type {Tokenizer} + */ + function tokenizeCloseStart(effects, ok, nok) { + let size = 0 + return startBefore + + /** + * + * + * @type {State} + */ + function startBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return start + } + + /** + * Before closing fence, at optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Always populated by defaults. + + // To do: `enter` here or in next state? + effects.enter('codeFencedFence') + return markdownSpace(code) + ? factorySpace( + effects, + beforeSequenceClose, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : beforeSequenceClose(code) + } + + /** + * In closing fence, after optional whitespace, at sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function beforeSequenceClose(code) { + if (code === marker) { + effects.enter('codeFencedFenceSequence') + return sequenceClose(code) + } + return nok(code) + } + + /** + * In closing fence sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + if (code === marker) { + size++ + effects.consume(code) + return sequenceClose + } + if (size >= sizeOpen) { + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) + : sequenceCloseAfter(code) + } + return nok(code) + } + + /** + * After closing fence sequence, after optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceCloseAfter(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return ok(code) + } + return nok(code) + } + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuation(effects, ok, nok) { + const self = this + return start + + /** + * + * + * @type {State} + */ + function start(code) { + if (code === null) { + return nok(code) + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineStart + } + + /** + * + * + * @type {State} + */ + function lineStart(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/character-entities/index.js +/** + * Map of named character references. + * + * @type {Record<string, string>} + */ +const characterEntities = { + AElig: 'Æ', + AMP: '&', + Aacute: 'Á', + Abreve: 'Ă', + Acirc: 'Â', + Acy: 'А', + Afr: '𝔄', + Agrave: 'À', + Alpha: 'Α', + Amacr: 'Ā', + And: '⩓', + Aogon: 'Ą', + Aopf: '𝔸', + ApplyFunction: '⁡', + Aring: 'Å', + Ascr: '𝒜', + Assign: '≔', + Atilde: 'Ã', + Auml: 'Ä', + Backslash: '∖', + Barv: '⫧', + Barwed: '⌆', + Bcy: 'Б', + Because: '∵', + Bernoullis: 'ℬ', + Beta: 'Β', + Bfr: '𝔅', + Bopf: '𝔹', + Breve: '˘', + Bscr: 'ℬ', + Bumpeq: '≎', + CHcy: 'Ч', + COPY: '©', + Cacute: 'Ć', + Cap: '⋒', + CapitalDifferentialD: 'ⅅ', + Cayleys: 'ℭ', + Ccaron: 'Č', + Ccedil: 'Ç', + Ccirc: 'Ĉ', + Cconint: '∰', + Cdot: 'Ċ', + Cedilla: '¸', + CenterDot: '·', + Cfr: 'ℭ', + Chi: 'Χ', + CircleDot: '⊙', + CircleMinus: '⊖', + CirclePlus: '⊕', + CircleTimes: '⊗', + ClockwiseContourIntegral: '∲', + CloseCurlyDoubleQuote: '”', + CloseCurlyQuote: '’', + Colon: '∷', + Colone: '⩴', + Congruent: '≡', + Conint: '∯', + ContourIntegral: '∮', + Copf: 'ℂ', + Coproduct: '∐', + CounterClockwiseContourIntegral: '∳', + Cross: '⨯', + Cscr: '𝒞', + Cup: '⋓', + CupCap: '≍', + DD: 'ⅅ', + DDotrahd: '⤑', + DJcy: 'Ђ', + DScy: 'Ѕ', + DZcy: 'Џ', + Dagger: '‡', + Darr: '↡', + Dashv: '⫤', + Dcaron: 'Ď', + Dcy: 'Д', + Del: '∇', + Delta: 'Δ', + Dfr: '𝔇', + DiacriticalAcute: '´', + DiacriticalDot: '˙', + DiacriticalDoubleAcute: '˝', + DiacriticalGrave: '`', + DiacriticalTilde: '˜', + Diamond: '⋄', + DifferentialD: 'ⅆ', + Dopf: '𝔻', + Dot: '¨', + DotDot: '⃜', + DotEqual: '≐', + DoubleContourIntegral: '∯', + DoubleDot: '¨', + DoubleDownArrow: '⇓', + DoubleLeftArrow: '⇐', + DoubleLeftRightArrow: '⇔', + DoubleLeftTee: '⫤', + DoubleLongLeftArrow: '⟸', + DoubleLongLeftRightArrow: '⟺', + DoubleLongRightArrow: '⟹', + DoubleRightArrow: '⇒', + DoubleRightTee: '⊨', + DoubleUpArrow: '⇑', + DoubleUpDownArrow: '⇕', + DoubleVerticalBar: '∥', + DownArrow: '↓', + DownArrowBar: '⤓', + DownArrowUpArrow: '⇵', + DownBreve: '̑', + DownLeftRightVector: '⥐', + DownLeftTeeVector: '⥞', + DownLeftVector: '↽', + DownLeftVectorBar: '⥖', + DownRightTeeVector: '⥟', + DownRightVector: '⇁', + DownRightVectorBar: '⥗', + DownTee: '⊤', + DownTeeArrow: '↧', + Downarrow: '⇓', + Dscr: '𝒟', + Dstrok: 'Đ', + ENG: 'Ŋ', + ETH: 'Ð', + Eacute: 'É', + Ecaron: 'Ě', + Ecirc: 'Ê', + Ecy: 'Э', + Edot: 'Ė', + Efr: '𝔈', + Egrave: 'È', + Element: '∈', + Emacr: 'Ē', + EmptySmallSquare: '◻', + EmptyVerySmallSquare: '▫', + Eogon: 'Ę', + Eopf: '𝔼', + Epsilon: 'Ε', + Equal: '⩵', + EqualTilde: '≂', + Equilibrium: '⇌', + Escr: 'ℰ', + Esim: '⩳', + Eta: 'Η', + Euml: 'Ë', + Exists: '∃', + ExponentialE: 'ⅇ', + Fcy: 'Ф', + Ffr: '𝔉', + FilledSmallSquare: '◼', + FilledVerySmallSquare: '▪', + Fopf: '𝔽', + ForAll: '∀', + Fouriertrf: 'ℱ', + Fscr: 'ℱ', + GJcy: 'Ѓ', + GT: '>', + Gamma: 'Γ', + Gammad: 'Ϝ', + Gbreve: 'Ğ', + Gcedil: 'Ģ', + Gcirc: 'Ĝ', + Gcy: 'Г', + Gdot: 'Ġ', + Gfr: '𝔊', + Gg: '⋙', + Gopf: '𝔾', + GreaterEqual: '≥', + GreaterEqualLess: '⋛', + GreaterFullEqual: '≧', + GreaterGreater: '⪢', + GreaterLess: '≷', + GreaterSlantEqual: '⩾', + GreaterTilde: '≳', + Gscr: '𝒢', + Gt: '≫', + HARDcy: 'Ъ', + Hacek: 'ˇ', + Hat: '^', + Hcirc: 'Ĥ', + Hfr: 'ℌ', + HilbertSpace: 'ℋ', + Hopf: 'ℍ', + HorizontalLine: '─', + Hscr: 'ℋ', + Hstrok: 'Ħ', + HumpDownHump: '≎', + HumpEqual: '≏', + IEcy: 'Е', + IJlig: 'IJ', + IOcy: 'Ё', + Iacute: 'Í', + Icirc: 'Î', + Icy: 'И', + Idot: 'İ', + Ifr: 'ℑ', + Igrave: 'Ì', + Im: 'ℑ', + Imacr: 'Ī', + ImaginaryI: 'ⅈ', + Implies: '⇒', + Int: '∬', + Integral: '∫', + Intersection: '⋂', + InvisibleComma: '⁣', + InvisibleTimes: '⁢', + Iogon: 'Į', + Iopf: '𝕀', + Iota: 'Ι', + Iscr: 'ℐ', + Itilde: 'Ĩ', + Iukcy: 'І', + Iuml: 'Ï', + Jcirc: 'Ĵ', + Jcy: 'Й', + Jfr: '𝔍', + Jopf: '𝕁', + Jscr: '𝒥', + Jsercy: 'Ј', + Jukcy: 'Є', + KHcy: 'Х', + KJcy: 'Ќ', + Kappa: 'Κ', + Kcedil: 'Ķ', + Kcy: 'К', + Kfr: '𝔎', + Kopf: '𝕂', + Kscr: '𝒦', + LJcy: 'Љ', + LT: '<', + Lacute: 'Ĺ', + Lambda: 'Λ', + Lang: '⟪', + Laplacetrf: 'ℒ', + Larr: '↞', + Lcaron: 'Ľ', + Lcedil: 'Ļ', + Lcy: 'Л', + LeftAngleBracket: '⟨', + LeftArrow: '←', + LeftArrowBar: '⇤', + LeftArrowRightArrow: '⇆', + LeftCeiling: '⌈', + LeftDoubleBracket: '⟦', + LeftDownTeeVector: '⥡', + LeftDownVector: '⇃', + LeftDownVectorBar: '⥙', + LeftFloor: '⌊', + LeftRightArrow: '↔', + LeftRightVector: '⥎', + LeftTee: '⊣', + LeftTeeArrow: '↤', + LeftTeeVector: '⥚', + LeftTriangle: '⊲', + LeftTriangleBar: '⧏', + LeftTriangleEqual: '⊴', + LeftUpDownVector: '⥑', + LeftUpTeeVector: '⥠', + LeftUpVector: '↿', + LeftUpVectorBar: '⥘', + LeftVector: '↼', + LeftVectorBar: '⥒', + Leftarrow: '⇐', + Leftrightarrow: '⇔', + LessEqualGreater: '⋚', + LessFullEqual: '≦', + LessGreater: '≶', + LessLess: '⪡', + LessSlantEqual: '⩽', + LessTilde: '≲', + Lfr: '𝔏', + Ll: '⋘', + Lleftarrow: '⇚', + Lmidot: 'Ŀ', + LongLeftArrow: '⟵', + LongLeftRightArrow: '⟷', + LongRightArrow: '⟶', + Longleftarrow: '⟸', + Longleftrightarrow: '⟺', + Longrightarrow: '⟹', + Lopf: '𝕃', + LowerLeftArrow: '↙', + LowerRightArrow: '↘', + Lscr: 'ℒ', + Lsh: '↰', + Lstrok: 'Ł', + Lt: '≪', + Map: '⤅', + Mcy: 'М', + MediumSpace: ' ', + Mellintrf: 'ℳ', + Mfr: '𝔐', + MinusPlus: '∓', + Mopf: '𝕄', + Mscr: 'ℳ', + Mu: 'Μ', + NJcy: 'Њ', + Nacute: 'Ń', + Ncaron: 'Ň', + Ncedil: 'Ņ', + Ncy: 'Н', + NegativeMediumSpace: '​', + NegativeThickSpace: '​', + NegativeThinSpace: '​', + NegativeVeryThinSpace: '​', + NestedGreaterGreater: '≫', + NestedLessLess: '≪', + NewLine: '\n', + Nfr: '𝔑', + NoBreak: '⁠', + NonBreakingSpace: ' ', + Nopf: 'ℕ', + Not: '⫬', + NotCongruent: '≢', + NotCupCap: '≭', + NotDoubleVerticalBar: '∦', + NotElement: '∉', + NotEqual: '≠', + NotEqualTilde: '≂̸', + NotExists: '∄', + NotGreater: '≯', + NotGreaterEqual: '≱', + NotGreaterFullEqual: '≧̸', + NotGreaterGreater: '≫̸', + NotGreaterLess: '≹', + NotGreaterSlantEqual: '⩾̸', + NotGreaterTilde: '≵', + NotHumpDownHump: '≎̸', + NotHumpEqual: '≏̸', + NotLeftTriangle: '⋪', + NotLeftTriangleBar: '⧏̸', + NotLeftTriangleEqual: '⋬', + NotLess: '≮', + NotLessEqual: '≰', + NotLessGreater: '≸', + NotLessLess: '≪̸', + NotLessSlantEqual: '⩽̸', + NotLessTilde: '≴', + NotNestedGreaterGreater: '⪢̸', + NotNestedLessLess: '⪡̸', + NotPrecedes: '⊀', + NotPrecedesEqual: '⪯̸', + NotPrecedesSlantEqual: '⋠', + NotReverseElement: '∌', + NotRightTriangle: '⋫', + NotRightTriangleBar: '⧐̸', + NotRightTriangleEqual: '⋭', + NotSquareSubset: '⊏̸', + NotSquareSubsetEqual: '⋢', + NotSquareSuperset: '⊐̸', + NotSquareSupersetEqual: '⋣', + NotSubset: '⊂⃒', + NotSubsetEqual: '⊈', + NotSucceeds: '⊁', + NotSucceedsEqual: '⪰̸', + NotSucceedsSlantEqual: '⋡', + NotSucceedsTilde: '≿̸', + NotSuperset: '⊃⃒', + NotSupersetEqual: '⊉', + NotTilde: '≁', + NotTildeEqual: '≄', + NotTildeFullEqual: '≇', + NotTildeTilde: '≉', + NotVerticalBar: '∤', + Nscr: '𝒩', + Ntilde: 'Ñ', + Nu: 'Ν', + OElig: 'Œ', + Oacute: 'Ó', + Ocirc: 'Ô', + Ocy: 'О', + Odblac: 'Ő', + Ofr: '𝔒', + Ograve: 'Ò', + Omacr: 'Ō', + Omega: 'Ω', + Omicron: 'Ο', + Oopf: '𝕆', + OpenCurlyDoubleQuote: '“', + OpenCurlyQuote: '‘', + Or: '⩔', + Oscr: '𝒪', + Oslash: 'Ø', + Otilde: 'Õ', + Otimes: '⨷', + Ouml: 'Ö', + OverBar: '‾', + OverBrace: '⏞', + OverBracket: '⎴', + OverParenthesis: '⏜', + PartialD: '∂', + Pcy: 'П', + Pfr: '𝔓', + Phi: 'Φ', + Pi: 'Π', + PlusMinus: '±', + Poincareplane: 'ℌ', + Popf: 'ℙ', + Pr: '⪻', + Precedes: '≺', + PrecedesEqual: '⪯', + PrecedesSlantEqual: '≼', + PrecedesTilde: '≾', + Prime: '″', + Product: '∏', + Proportion: '∷', + Proportional: '∝', + Pscr: '𝒫', + Psi: 'Ψ', + QUOT: '"', + Qfr: '𝔔', + Qopf: 'ℚ', + Qscr: '𝒬', + RBarr: '⤐', + REG: '®', + Racute: 'Ŕ', + Rang: '⟫', + Rarr: '↠', + Rarrtl: '⤖', + Rcaron: 'Ř', + Rcedil: 'Ŗ', + Rcy: 'Р', + Re: 'ℜ', + ReverseElement: '∋', + ReverseEquilibrium: '⇋', + ReverseUpEquilibrium: '⥯', + Rfr: 'ℜ', + Rho: 'Ρ', + RightAngleBracket: '⟩', + RightArrow: '→', + RightArrowBar: '⇥', + RightArrowLeftArrow: '⇄', + RightCeiling: '⌉', + RightDoubleBracket: '⟧', + RightDownTeeVector: '⥝', + RightDownVector: '⇂', + RightDownVectorBar: '⥕', + RightFloor: '⌋', + RightTee: '⊢', + RightTeeArrow: '↦', + RightTeeVector: '⥛', + RightTriangle: '⊳', + RightTriangleBar: '⧐', + RightTriangleEqual: '⊵', + RightUpDownVector: '⥏', + RightUpTeeVector: '⥜', + RightUpVector: '↾', + RightUpVectorBar: '⥔', + RightVector: '⇀', + RightVectorBar: '⥓', + Rightarrow: '⇒', + Ropf: 'ℝ', + RoundImplies: '⥰', + Rrightarrow: '⇛', + Rscr: 'ℛ', + Rsh: '↱', + RuleDelayed: '⧴', + SHCHcy: 'Щ', + SHcy: 'Ш', + SOFTcy: 'Ь', + Sacute: 'Ś', + Sc: '⪼', + Scaron: 'Š', + Scedil: 'Ş', + Scirc: 'Ŝ', + Scy: 'С', + Sfr: '𝔖', + ShortDownArrow: '↓', + ShortLeftArrow: '←', + ShortRightArrow: '→', + ShortUpArrow: '↑', + Sigma: 'Σ', + SmallCircle: '∘', + Sopf: '𝕊', + Sqrt: '√', + Square: '□', + SquareIntersection: '⊓', + SquareSubset: '⊏', + SquareSubsetEqual: '⊑', + SquareSuperset: '⊐', + SquareSupersetEqual: '⊒', + SquareUnion: '⊔', + Sscr: '𝒮', + Star: '⋆', + Sub: '⋐', + Subset: '⋐', + SubsetEqual: '⊆', + Succeeds: '≻', + SucceedsEqual: '⪰', + SucceedsSlantEqual: '≽', + SucceedsTilde: '≿', + SuchThat: '∋', + Sum: '∑', + Sup: '⋑', + Superset: '⊃', + SupersetEqual: '⊇', + Supset: '⋑', + THORN: 'Þ', + TRADE: '™', + TSHcy: 'Ћ', + TScy: 'Ц', + Tab: '\t', + Tau: 'Τ', + Tcaron: 'Ť', + Tcedil: 'Ţ', + Tcy: 'Т', + Tfr: '𝔗', + Therefore: '∴', + Theta: 'Θ', + ThickSpace: '  ', + ThinSpace: ' ', + Tilde: '∼', + TildeEqual: '≃', + TildeFullEqual: '≅', + TildeTilde: '≈', + Topf: '𝕋', + TripleDot: '⃛', + Tscr: '𝒯', + Tstrok: 'Ŧ', + Uacute: 'Ú', + Uarr: '↟', + Uarrocir: '⥉', + Ubrcy: 'Ў', + Ubreve: 'Ŭ', + Ucirc: 'Û', + Ucy: 'У', + Udblac: 'Ű', + Ufr: '𝔘', + Ugrave: 'Ù', + Umacr: 'Ū', + UnderBar: '_', + UnderBrace: '⏟', + UnderBracket: '⎵', + UnderParenthesis: '⏝', + Union: '⋃', + UnionPlus: '⊎', + Uogon: 'Ų', + Uopf: '𝕌', + UpArrow: '↑', + UpArrowBar: '⤒', + UpArrowDownArrow: '⇅', + UpDownArrow: '↕', + UpEquilibrium: '⥮', + UpTee: '⊥', + UpTeeArrow: '↥', + Uparrow: '⇑', + Updownarrow: '⇕', + UpperLeftArrow: '↖', + UpperRightArrow: '↗', + Upsi: 'ϒ', + Upsilon: 'Υ', + Uring: 'Ů', + Uscr: '𝒰', + Utilde: 'Ũ', + Uuml: 'Ü', + VDash: '⊫', + Vbar: '⫫', + Vcy: 'В', + Vdash: '⊩', + Vdashl: '⫦', + Vee: '⋁', + Verbar: '‖', + Vert: '‖', + VerticalBar: '∣', + VerticalLine: '|', + VerticalSeparator: '❘', + VerticalTilde: '≀', + VeryThinSpace: ' ', + Vfr: '𝔙', + Vopf: '𝕍', + Vscr: '𝒱', + Vvdash: '⊪', + Wcirc: 'Ŵ', + Wedge: '⋀', + Wfr: '𝔚', + Wopf: '𝕎', + Wscr: '𝒲', + Xfr: '𝔛', + Xi: 'Ξ', + Xopf: '𝕏', + Xscr: '𝒳', + YAcy: 'Я', + YIcy: 'Ї', + YUcy: 'Ю', + Yacute: 'Ý', + Ycirc: 'Ŷ', + Ycy: 'Ы', + Yfr: '𝔜', + Yopf: '𝕐', + Yscr: '𝒴', + Yuml: 'Ÿ', + ZHcy: 'Ж', + Zacute: 'Ź', + Zcaron: 'Ž', + Zcy: 'З', + Zdot: 'Ż', + ZeroWidthSpace: '​', + Zeta: 'Ζ', + Zfr: 'ℨ', + Zopf: 'ℤ', + Zscr: '𝒵', + aacute: 'á', + abreve: 'ă', + ac: '∾', + acE: '∾̳', + acd: '∿', + acirc: 'â', + acute: '´', + acy: 'а', + aelig: 'æ', + af: '⁡', + afr: '𝔞', + agrave: 'à', + alefsym: 'ℵ', + aleph: 'ℵ', + alpha: 'α', + amacr: 'ā', + amalg: '⨿', + amp: '&', + and: '∧', + andand: '⩕', + andd: '⩜', + andslope: '⩘', + andv: '⩚', + ang: '∠', + ange: '⦤', + angle: '∠', + angmsd: '∡', + angmsdaa: '⦨', + angmsdab: '⦩', + angmsdac: '⦪', + angmsdad: '⦫', + angmsdae: '⦬', + angmsdaf: '⦭', + angmsdag: '⦮', + angmsdah: '⦯', + angrt: '∟', + angrtvb: '⊾', + angrtvbd: '⦝', + angsph: '∢', + angst: 'Å', + angzarr: '⍼', + aogon: 'ą', + aopf: '𝕒', + ap: '≈', + apE: '⩰', + apacir: '⩯', + ape: '≊', + apid: '≋', + apos: "'", + approx: '≈', + approxeq: '≊', + aring: 'å', + ascr: '𝒶', + ast: '*', + asymp: '≈', + asympeq: '≍', + atilde: 'ã', + auml: 'ä', + awconint: '∳', + awint: '⨑', + bNot: '⫭', + backcong: '≌', + backepsilon: '϶', + backprime: '‵', + backsim: '∽', + backsimeq: '⋍', + barvee: '⊽', + barwed: '⌅', + barwedge: '⌅', + bbrk: '⎵', + bbrktbrk: '⎶', + bcong: '≌', + bcy: 'б', + bdquo: '„', + becaus: '∵', + because: '∵', + bemptyv: '⦰', + bepsi: '϶', + bernou: 'ℬ', + beta: 'β', + beth: 'ℶ', + between: '≬', + bfr: '𝔟', + bigcap: '⋂', + bigcirc: '◯', + bigcup: '⋃', + bigodot: '⨀', + bigoplus: '⨁', + bigotimes: '⨂', + bigsqcup: '⨆', + bigstar: '★', + bigtriangledown: '▽', + bigtriangleup: '△', + biguplus: '⨄', + bigvee: '⋁', + bigwedge: '⋀', + bkarow: '⤍', + blacklozenge: '⧫', + blacksquare: '▪', + blacktriangle: '▴', + blacktriangledown: '▾', + blacktriangleleft: '◂', + blacktriangleright: '▸', + blank: '␣', + blk12: '▒', + blk14: '░', + blk34: '▓', + block: '█', + bne: '=⃥', + bnequiv: '≡⃥', + bnot: '⌐', + bopf: '𝕓', + bot: '⊥', + bottom: '⊥', + bowtie: '⋈', + boxDL: '╗', + boxDR: '╔', + boxDl: '╖', + boxDr: '╓', + boxH: '═', + boxHD: '╦', + boxHU: '╩', + boxHd: '╤', + boxHu: '╧', + boxUL: '╝', + boxUR: '╚', + boxUl: '╜', + boxUr: '╙', + boxV: '║', + boxVH: '╬', + boxVL: '╣', + boxVR: '╠', + boxVh: '╫', + boxVl: '╢', + boxVr: '╟', + boxbox: '⧉', + boxdL: '╕', + boxdR: '╒', + boxdl: '┐', + boxdr: '┌', + boxh: '─', + boxhD: '╥', + boxhU: '╨', + boxhd: '┬', + boxhu: '┴', + boxminus: '⊟', + boxplus: '⊞', + boxtimes: '⊠', + boxuL: '╛', + boxuR: '╘', + boxul: '┘', + boxur: '└', + boxv: '│', + boxvH: '╪', + boxvL: '╡', + boxvR: '╞', + boxvh: '┼', + boxvl: '┤', + boxvr: '├', + bprime: '‵', + breve: '˘', + brvbar: '¦', + bscr: '𝒷', + bsemi: '⁏', + bsim: '∽', + bsime: '⋍', + bsol: '\\', + bsolb: '⧅', + bsolhsub: '⟈', + bull: '•', + bullet: '•', + bump: '≎', + bumpE: '⪮', + bumpe: '≏', + bumpeq: '≏', + cacute: 'ć', + cap: '∩', + capand: '⩄', + capbrcup: '⩉', + capcap: '⩋', + capcup: '⩇', + capdot: '⩀', + caps: '∩︀', + caret: '⁁', + caron: 'ˇ', + ccaps: '⩍', + ccaron: 'č', + ccedil: 'ç', + ccirc: 'ĉ', + ccups: '⩌', + ccupssm: '⩐', + cdot: 'ċ', + cedil: '¸', + cemptyv: '⦲', + cent: '¢', + centerdot: '·', + cfr: '𝔠', + chcy: 'ч', + check: '✓', + checkmark: '✓', + chi: 'χ', + cir: '○', + cirE: '⧃', + circ: 'ˆ', + circeq: '≗', + circlearrowleft: '↺', + circlearrowright: '↻', + circledR: '®', + circledS: 'Ⓢ', + circledast: '⊛', + circledcirc: '⊚', + circleddash: '⊝', + cire: '≗', + cirfnint: '⨐', + cirmid: '⫯', + cirscir: '⧂', + clubs: '♣', + clubsuit: '♣', + colon: ':', + colone: '≔', + coloneq: '≔', + comma: ',', + commat: '@', + comp: '∁', + compfn: '∘', + complement: '∁', + complexes: 'ℂ', + cong: '≅', + congdot: '⩭', + conint: '∮', + copf: '𝕔', + coprod: '∐', + copy: '©', + copysr: '℗', + crarr: '↵', + cross: '✗', + cscr: '𝒸', + csub: '⫏', + csube: '⫑', + csup: '⫐', + csupe: '⫒', + ctdot: '⋯', + cudarrl: '⤸', + cudarrr: '⤵', + cuepr: '⋞', + cuesc: '⋟', + cularr: '↶', + cularrp: '⤽', + cup: '∪', + cupbrcap: '⩈', + cupcap: '⩆', + cupcup: '⩊', + cupdot: '⊍', + cupor: '⩅', + cups: '∪︀', + curarr: '↷', + curarrm: '⤼', + curlyeqprec: '⋞', + curlyeqsucc: '⋟', + curlyvee: '⋎', + curlywedge: '⋏', + curren: '¤', + curvearrowleft: '↶', + curvearrowright: '↷', + cuvee: '⋎', + cuwed: '⋏', + cwconint: '∲', + cwint: '∱', + cylcty: '⌭', + dArr: '⇓', + dHar: '⥥', + dagger: '†', + daleth: 'ℸ', + darr: '↓', + dash: '‐', + dashv: '⊣', + dbkarow: '⤏', + dblac: '˝', + dcaron: 'ď', + dcy: 'д', + dd: 'ⅆ', + ddagger: '‡', + ddarr: '⇊', + ddotseq: '⩷', + deg: '°', + delta: 'δ', + demptyv: '⦱', + dfisht: '⥿', + dfr: '𝔡', + dharl: '⇃', + dharr: '⇂', + diam: '⋄', + diamond: '⋄', + diamondsuit: '♦', + diams: '♦', + die: '¨', + digamma: 'ϝ', + disin: '⋲', + div: '÷', + divide: '÷', + divideontimes: '⋇', + divonx: '⋇', + djcy: 'ђ', + dlcorn: '⌞', + dlcrop: '⌍', + dollar: '$', + dopf: '𝕕', + dot: '˙', + doteq: '≐', + doteqdot: '≑', + dotminus: '∸', + dotplus: '∔', + dotsquare: '⊡', + doublebarwedge: '⌆', + downarrow: '↓', + downdownarrows: '⇊', + downharpoonleft: '⇃', + downharpoonright: '⇂', + drbkarow: '⤐', + drcorn: '⌟', + drcrop: '⌌', + dscr: '𝒹', + dscy: 'ѕ', + dsol: '⧶', + dstrok: 'đ', + dtdot: '⋱', + dtri: '▿', + dtrif: '▾', + duarr: '⇵', + duhar: '⥯', + dwangle: '⦦', + dzcy: 'џ', + dzigrarr: '⟿', + eDDot: '⩷', + eDot: '≑', + eacute: 'é', + easter: '⩮', + ecaron: 'ě', + ecir: '≖', + ecirc: 'ê', + ecolon: '≕', + ecy: 'э', + edot: 'ė', + ee: 'ⅇ', + efDot: '≒', + efr: '𝔢', + eg: '⪚', + egrave: 'è', + egs: '⪖', + egsdot: '⪘', + el: '⪙', + elinters: '⏧', + ell: 'ℓ', + els: '⪕', + elsdot: '⪗', + emacr: 'ē', + empty: '∅', + emptyset: '∅', + emptyv: '∅', + emsp13: ' ', + emsp14: ' ', + emsp: ' ', + eng: 'ŋ', + ensp: ' ', + eogon: 'ę', + eopf: '𝕖', + epar: '⋕', + eparsl: '⧣', + eplus: '⩱', + epsi: 'ε', + epsilon: 'ε', + epsiv: 'ϵ', + eqcirc: '≖', + eqcolon: '≕', + eqsim: '≂', + eqslantgtr: '⪖', + eqslantless: '⪕', + equals: '=', + equest: '≟', + equiv: '≡', + equivDD: '⩸', + eqvparsl: '⧥', + erDot: '≓', + erarr: '⥱', + escr: 'ℯ', + esdot: '≐', + esim: '≂', + eta: 'η', + eth: 'ð', + euml: 'ë', + euro: '€', + excl: '!', + exist: '∃', + expectation: 'ℰ', + exponentiale: 'ⅇ', + fallingdotseq: '≒', + fcy: 'ф', + female: '♀', + ffilig: 'ffi', + fflig: 'ff', + ffllig: 'ffl', + ffr: '𝔣', + filig: 'fi', + fjlig: 'fj', + flat: '♭', + fllig: 'fl', + fltns: '▱', + fnof: 'ƒ', + fopf: '𝕗', + forall: '∀', + fork: '⋔', + forkv: '⫙', + fpartint: '⨍', + frac12: '½', + frac13: '⅓', + frac14: '¼', + frac15: '⅕', + frac16: '⅙', + frac18: '⅛', + frac23: '⅔', + frac25: '⅖', + frac34: '¾', + frac35: '⅗', + frac38: '⅜', + frac45: '⅘', + frac56: '⅚', + frac58: '⅝', + frac78: '⅞', + frasl: '⁄', + frown: '⌢', + fscr: '𝒻', + gE: '≧', + gEl: '⪌', + gacute: 'ǵ', + gamma: 'γ', + gammad: 'ϝ', + gap: '⪆', + gbreve: 'ğ', + gcirc: 'ĝ', + gcy: 'г', + gdot: 'ġ', + ge: '≥', + gel: '⋛', + geq: '≥', + geqq: '≧', + geqslant: '⩾', + ges: '⩾', + gescc: '⪩', + gesdot: '⪀', + gesdoto: '⪂', + gesdotol: '⪄', + gesl: '⋛︀', + gesles: '⪔', + gfr: '𝔤', + gg: '≫', + ggg: '⋙', + gimel: 'ℷ', + gjcy: 'ѓ', + gl: '≷', + glE: '⪒', + gla: '⪥', + glj: '⪤', + gnE: '≩', + gnap: '⪊', + gnapprox: '⪊', + gne: '⪈', + gneq: '⪈', + gneqq: '≩', + gnsim: '⋧', + gopf: '𝕘', + grave: '`', + gscr: 'ℊ', + gsim: '≳', + gsime: '⪎', + gsiml: '⪐', + gt: '>', + gtcc: '⪧', + gtcir: '⩺', + gtdot: '⋗', + gtlPar: '⦕', + gtquest: '⩼', + gtrapprox: '⪆', + gtrarr: '⥸', + gtrdot: '⋗', + gtreqless: '⋛', + gtreqqless: '⪌', + gtrless: '≷', + gtrsim: '≳', + gvertneqq: '≩︀', + gvnE: '≩︀', + hArr: '⇔', + hairsp: ' ', + half: '½', + hamilt: 'ℋ', + hardcy: 'ъ', + harr: '↔', + harrcir: '⥈', + harrw: '↭', + hbar: 'ℏ', + hcirc: 'ĥ', + hearts: '♥', + heartsuit: '♥', + hellip: '…', + hercon: '⊹', + hfr: '𝔥', + hksearow: '⤥', + hkswarow: '⤦', + hoarr: '⇿', + homtht: '∻', + hookleftarrow: '↩', + hookrightarrow: '↪', + hopf: '𝕙', + horbar: '―', + hscr: '𝒽', + hslash: 'ℏ', + hstrok: 'ħ', + hybull: '⁃', + hyphen: '‐', + iacute: 'í', + ic: '⁣', + icirc: 'î', + icy: 'и', + iecy: 'е', + iexcl: '¡', + iff: '⇔', + ifr: '𝔦', + igrave: 'ì', + ii: 'ⅈ', + iiiint: '⨌', + iiint: '∭', + iinfin: '⧜', + iiota: '℩', + ijlig: 'ij', + imacr: 'ī', + image: 'ℑ', + imagline: 'ℐ', + imagpart: 'ℑ', + imath: 'ı', + imof: '⊷', + imped: 'Ƶ', + in: '∈', + incare: '℅', + infin: '∞', + infintie: '⧝', + inodot: 'ı', + int: '∫', + intcal: '⊺', + integers: 'ℤ', + intercal: '⊺', + intlarhk: '⨗', + intprod: '⨼', + iocy: 'ё', + iogon: 'į', + iopf: '𝕚', + iota: 'ι', + iprod: '⨼', + iquest: '¿', + iscr: '𝒾', + isin: '∈', + isinE: '⋹', + isindot: '⋵', + isins: '⋴', + isinsv: '⋳', + isinv: '∈', + it: '⁢', + itilde: 'ĩ', + iukcy: 'і', + iuml: 'ï', + jcirc: 'ĵ', + jcy: 'й', + jfr: '𝔧', + jmath: 'ȷ', + jopf: '𝕛', + jscr: '𝒿', + jsercy: 'ј', + jukcy: 'є', + kappa: 'κ', + kappav: 'ϰ', + kcedil: 'ķ', + kcy: 'к', + kfr: '𝔨', + kgreen: 'ĸ', + khcy: 'х', + kjcy: 'ќ', + kopf: '𝕜', + kscr: '𝓀', + lAarr: '⇚', + lArr: '⇐', + lAtail: '⤛', + lBarr: '⤎', + lE: '≦', + lEg: '⪋', + lHar: '⥢', + lacute: 'ĺ', + laemptyv: '⦴', + lagran: 'ℒ', + lambda: 'λ', + lang: '⟨', + langd: '⦑', + langle: '⟨', + lap: '⪅', + laquo: '«', + larr: '←', + larrb: '⇤', + larrbfs: '⤟', + larrfs: '⤝', + larrhk: '↩', + larrlp: '↫', + larrpl: '⤹', + larrsim: '⥳', + larrtl: '↢', + lat: '⪫', + latail: '⤙', + late: '⪭', + lates: '⪭︀', + lbarr: '⤌', + lbbrk: '❲', + lbrace: '{', + lbrack: '[', + lbrke: '⦋', + lbrksld: '⦏', + lbrkslu: '⦍', + lcaron: 'ľ', + lcedil: 'ļ', + lceil: '⌈', + lcub: '{', + lcy: 'л', + ldca: '⤶', + ldquo: '“', + ldquor: '„', + ldrdhar: '⥧', + ldrushar: '⥋', + ldsh: '↲', + le: '≤', + leftarrow: '←', + leftarrowtail: '↢', + leftharpoondown: '↽', + leftharpoonup: '↼', + leftleftarrows: '⇇', + leftrightarrow: '↔', + leftrightarrows: '⇆', + leftrightharpoons: '⇋', + leftrightsquigarrow: '↭', + leftthreetimes: '⋋', + leg: '⋚', + leq: '≤', + leqq: '≦', + leqslant: '⩽', + les: '⩽', + lescc: '⪨', + lesdot: '⩿', + lesdoto: '⪁', + lesdotor: '⪃', + lesg: '⋚︀', + lesges: '⪓', + lessapprox: '⪅', + lessdot: '⋖', + lesseqgtr: '⋚', + lesseqqgtr: '⪋', + lessgtr: '≶', + lesssim: '≲', + lfisht: '⥼', + lfloor: '⌊', + lfr: '𝔩', + lg: '≶', + lgE: '⪑', + lhard: '↽', + lharu: '↼', + lharul: '⥪', + lhblk: '▄', + ljcy: 'љ', + ll: '≪', + llarr: '⇇', + llcorner: '⌞', + llhard: '⥫', + lltri: '◺', + lmidot: 'ŀ', + lmoust: '⎰', + lmoustache: '⎰', + lnE: '≨', + lnap: '⪉', + lnapprox: '⪉', + lne: '⪇', + lneq: '⪇', + lneqq: '≨', + lnsim: '⋦', + loang: '⟬', + loarr: '⇽', + lobrk: '⟦', + longleftarrow: '⟵', + longleftrightarrow: '⟷', + longmapsto: '⟼', + longrightarrow: '⟶', + looparrowleft: '↫', + looparrowright: '↬', + lopar: '⦅', + lopf: '𝕝', + loplus: '⨭', + lotimes: '⨴', + lowast: '∗', + lowbar: '_', + loz: '◊', + lozenge: '◊', + lozf: '⧫', + lpar: '(', + lparlt: '⦓', + lrarr: '⇆', + lrcorner: '⌟', + lrhar: '⇋', + lrhard: '⥭', + lrm: '‎', + lrtri: '⊿', + lsaquo: '‹', + lscr: '𝓁', + lsh: '↰', + lsim: '≲', + lsime: '⪍', + lsimg: '⪏', + lsqb: '[', + lsquo: '‘', + lsquor: '‚', + lstrok: 'ł', + lt: '<', + ltcc: '⪦', + ltcir: '⩹', + ltdot: '⋖', + lthree: '⋋', + ltimes: '⋉', + ltlarr: '⥶', + ltquest: '⩻', + ltrPar: '⦖', + ltri: '◃', + ltrie: '⊴', + ltrif: '◂', + lurdshar: '⥊', + luruhar: '⥦', + lvertneqq: '≨︀', + lvnE: '≨︀', + mDDot: '∺', + macr: '¯', + male: '♂', + malt: '✠', + maltese: '✠', + map: '↦', + mapsto: '↦', + mapstodown: '↧', + mapstoleft: '↤', + mapstoup: '↥', + marker: '▮', + mcomma: '⨩', + mcy: 'м', + mdash: '—', + measuredangle: '∡', + mfr: '𝔪', + mho: '℧', + micro: 'µ', + mid: '∣', + midast: '*', + midcir: '⫰', + middot: '·', + minus: '−', + minusb: '⊟', + minusd: '∸', + minusdu: '⨪', + mlcp: '⫛', + mldr: '…', + mnplus: '∓', + models: '⊧', + mopf: '𝕞', + mp: '∓', + mscr: '𝓂', + mstpos: '∾', + mu: 'μ', + multimap: '⊸', + mumap: '⊸', + nGg: '⋙̸', + nGt: '≫⃒', + nGtv: '≫̸', + nLeftarrow: '⇍', + nLeftrightarrow: '⇎', + nLl: '⋘̸', + nLt: '≪⃒', + nLtv: '≪̸', + nRightarrow: '⇏', + nVDash: '⊯', + nVdash: '⊮', + nabla: '∇', + nacute: 'ń', + nang: '∠⃒', + nap: '≉', + napE: '⩰̸', + napid: '≋̸', + napos: 'ʼn', + napprox: '≉', + natur: '♮', + natural: '♮', + naturals: 'ℕ', + nbsp: ' ', + nbump: '≎̸', + nbumpe: '≏̸', + ncap: '⩃', + ncaron: 'ň', + ncedil: 'ņ', + ncong: '≇', + ncongdot: '⩭̸', + ncup: '⩂', + ncy: 'н', + ndash: '–', + ne: '≠', + neArr: '⇗', + nearhk: '⤤', + nearr: '↗', + nearrow: '↗', + nedot: '≐̸', + nequiv: '≢', + nesear: '⤨', + nesim: '≂̸', + nexist: '∄', + nexists: '∄', + nfr: '𝔫', + ngE: '≧̸', + nge: '≱', + ngeq: '≱', + ngeqq: '≧̸', + ngeqslant: '⩾̸', + nges: '⩾̸', + ngsim: '≵', + ngt: '≯', + ngtr: '≯', + nhArr: '⇎', + nharr: '↮', + nhpar: '⫲', + ni: '∋', + nis: '⋼', + nisd: '⋺', + niv: '∋', + njcy: 'њ', + nlArr: '⇍', + nlE: '≦̸', + nlarr: '↚', + nldr: '‥', + nle: '≰', + nleftarrow: '↚', + nleftrightarrow: '↮', + nleq: '≰', + nleqq: '≦̸', + nleqslant: '⩽̸', + nles: '⩽̸', + nless: '≮', + nlsim: '≴', + nlt: '≮', + nltri: '⋪', + nltrie: '⋬', + nmid: '∤', + nopf: '𝕟', + not: '¬', + notin: '∉', + notinE: '⋹̸', + notindot: '⋵̸', + notinva: '∉', + notinvb: '⋷', + notinvc: '⋶', + notni: '∌', + notniva: '∌', + notnivb: '⋾', + notnivc: '⋽', + npar: '∦', + nparallel: '∦', + nparsl: '⫽⃥', + npart: '∂̸', + npolint: '⨔', + npr: '⊀', + nprcue: '⋠', + npre: '⪯̸', + nprec: '⊀', + npreceq: '⪯̸', + nrArr: '⇏', + nrarr: '↛', + nrarrc: '⤳̸', + nrarrw: '↝̸', + nrightarrow: '↛', + nrtri: '⋫', + nrtrie: '⋭', + nsc: '⊁', + nsccue: '⋡', + nsce: '⪰̸', + nscr: '𝓃', + nshortmid: '∤', + nshortparallel: '∦', + nsim: '≁', + nsime: '≄', + nsimeq: '≄', + nsmid: '∤', + nspar: '∦', + nsqsube: '⋢', + nsqsupe: '⋣', + nsub: '⊄', + nsubE: '⫅̸', + nsube: '⊈', + nsubset: '⊂⃒', + nsubseteq: '⊈', + nsubseteqq: '⫅̸', + nsucc: '⊁', + nsucceq: '⪰̸', + nsup: '⊅', + nsupE: '⫆̸', + nsupe: '⊉', + nsupset: '⊃⃒', + nsupseteq: '⊉', + nsupseteqq: '⫆̸', + ntgl: '≹', + ntilde: 'ñ', + ntlg: '≸', + ntriangleleft: '⋪', + ntrianglelefteq: '⋬', + ntriangleright: '⋫', + ntrianglerighteq: '⋭', + nu: 'ν', + num: '#', + numero: '№', + numsp: ' ', + nvDash: '⊭', + nvHarr: '⤄', + nvap: '≍⃒', + nvdash: '⊬', + nvge: '≥⃒', + nvgt: '>⃒', + nvinfin: '⧞', + nvlArr: '⤂', + nvle: '≤⃒', + nvlt: '<⃒', + nvltrie: '⊴⃒', + nvrArr: '⤃', + nvrtrie: '⊵⃒', + nvsim: '∼⃒', + nwArr: '⇖', + nwarhk: '⤣', + nwarr: '↖', + nwarrow: '↖', + nwnear: '⤧', + oS: 'Ⓢ', + oacute: 'ó', + oast: '⊛', + ocir: '⊚', + ocirc: 'ô', + ocy: 'о', + odash: '⊝', + odblac: 'ő', + odiv: '⨸', + odot: '⊙', + odsold: '⦼', + oelig: 'œ', + ofcir: '⦿', + ofr: '𝔬', + ogon: '˛', + ograve: 'ò', + ogt: '⧁', + ohbar: '⦵', + ohm: 'Ω', + oint: '∮', + olarr: '↺', + olcir: '⦾', + olcross: '⦻', + oline: '‾', + olt: '⧀', + omacr: 'ō', + omega: 'ω', + omicron: 'ο', + omid: '⦶', + ominus: '⊖', + oopf: '𝕠', + opar: '⦷', + operp: '⦹', + oplus: '⊕', + or: '∨', + orarr: '↻', + ord: '⩝', + order: 'ℴ', + orderof: 'ℴ', + ordf: 'ª', + ordm: 'º', + origof: '⊶', + oror: '⩖', + orslope: '⩗', + orv: '⩛', + oscr: 'ℴ', + oslash: 'ø', + osol: '⊘', + otilde: 'õ', + otimes: '⊗', + otimesas: '⨶', + ouml: 'ö', + ovbar: '⌽', + par: '∥', + para: '¶', + parallel: '∥', + parsim: '⫳', + parsl: '⫽', + part: '∂', + pcy: 'п', + percnt: '%', + period: '.', + permil: '‰', + perp: '⊥', + pertenk: '‱', + pfr: '𝔭', + phi: 'φ', + phiv: 'ϕ', + phmmat: 'ℳ', + phone: '☎', + pi: 'π', + pitchfork: '⋔', + piv: 'ϖ', + planck: 'ℏ', + planckh: 'ℎ', + plankv: 'ℏ', + plus: '+', + plusacir: '⨣', + plusb: '⊞', + pluscir: '⨢', + plusdo: '∔', + plusdu: '⨥', + pluse: '⩲', + plusmn: '±', + plussim: '⨦', + plustwo: '⨧', + pm: '±', + pointint: '⨕', + popf: '𝕡', + pound: '£', + pr: '≺', + prE: '⪳', + prap: '⪷', + prcue: '≼', + pre: '⪯', + prec: '≺', + precapprox: '⪷', + preccurlyeq: '≼', + preceq: '⪯', + precnapprox: '⪹', + precneqq: '⪵', + precnsim: '⋨', + precsim: '≾', + prime: '′', + primes: 'ℙ', + prnE: '⪵', + prnap: '⪹', + prnsim: '⋨', + prod: '∏', + profalar: '⌮', + profline: '⌒', + profsurf: '⌓', + prop: '∝', + propto: '∝', + prsim: '≾', + prurel: '⊰', + pscr: '𝓅', + psi: 'ψ', + puncsp: ' ', + qfr: '𝔮', + qint: '⨌', + qopf: '𝕢', + qprime: '⁗', + qscr: '𝓆', + quaternions: 'ℍ', + quatint: '⨖', + quest: '?', + questeq: '≟', + quot: '"', + rAarr: '⇛', + rArr: '⇒', + rAtail: '⤜', + rBarr: '⤏', + rHar: '⥤', + race: '∽̱', + racute: 'ŕ', + radic: '√', + raemptyv: '⦳', + rang: '⟩', + rangd: '⦒', + range: '⦥', + rangle: '⟩', + raquo: '»', + rarr: '→', + rarrap: '⥵', + rarrb: '⇥', + rarrbfs: '⤠', + rarrc: '⤳', + rarrfs: '⤞', + rarrhk: '↪', + rarrlp: '↬', + rarrpl: '⥅', + rarrsim: '⥴', + rarrtl: '↣', + rarrw: '↝', + ratail: '⤚', + ratio: '∶', + rationals: 'ℚ', + rbarr: '⤍', + rbbrk: '❳', + rbrace: '}', + rbrack: ']', + rbrke: '⦌', + rbrksld: '⦎', + rbrkslu: '⦐', + rcaron: 'ř', + rcedil: 'ŗ', + rceil: '⌉', + rcub: '}', + rcy: 'р', + rdca: '⤷', + rdldhar: '⥩', + rdquo: '”', + rdquor: '”', + rdsh: '↳', + real: 'ℜ', + realine: 'ℛ', + realpart: 'ℜ', + reals: 'ℝ', + rect: '▭', + reg: '®', + rfisht: '⥽', + rfloor: '⌋', + rfr: '𝔯', + rhard: '⇁', + rharu: '⇀', + rharul: '⥬', + rho: 'ρ', + rhov: 'ϱ', + rightarrow: '→', + rightarrowtail: '↣', + rightharpoondown: '⇁', + rightharpoonup: '⇀', + rightleftarrows: '⇄', + rightleftharpoons: '⇌', + rightrightarrows: '⇉', + rightsquigarrow: '↝', + rightthreetimes: '⋌', + ring: '˚', + risingdotseq: '≓', + rlarr: '⇄', + rlhar: '⇌', + rlm: '‏', + rmoust: '⎱', + rmoustache: '⎱', + rnmid: '⫮', + roang: '⟭', + roarr: '⇾', + robrk: '⟧', + ropar: '⦆', + ropf: '𝕣', + roplus: '⨮', + rotimes: '⨵', + rpar: ')', + rpargt: '⦔', + rppolint: '⨒', + rrarr: '⇉', + rsaquo: '›', + rscr: '𝓇', + rsh: '↱', + rsqb: ']', + rsquo: '’', + rsquor: '’', + rthree: '⋌', + rtimes: '⋊', + rtri: '▹', + rtrie: '⊵', + rtrif: '▸', + rtriltri: '⧎', + ruluhar: '⥨', + rx: '℞', + sacute: 'ś', + sbquo: '‚', + sc: '≻', + scE: '⪴', + scap: '⪸', + scaron: 'š', + sccue: '≽', + sce: '⪰', + scedil: 'ş', + scirc: 'ŝ', + scnE: '⪶', + scnap: '⪺', + scnsim: '⋩', + scpolint: '⨓', + scsim: '≿', + scy: 'с', + sdot: '⋅', + sdotb: '⊡', + sdote: '⩦', + seArr: '⇘', + searhk: '⤥', + searr: '↘', + searrow: '↘', + sect: '§', + semi: ';', + seswar: '⤩', + setminus: '∖', + setmn: '∖', + sext: '✶', + sfr: '𝔰', + sfrown: '⌢', + sharp: '♯', + shchcy: 'щ', + shcy: 'ш', + shortmid: '∣', + shortparallel: '∥', + shy: '­', + sigma: 'σ', + sigmaf: 'ς', + sigmav: 'ς', + sim: '∼', + simdot: '⩪', + sime: '≃', + simeq: '≃', + simg: '⪞', + simgE: '⪠', + siml: '⪝', + simlE: '⪟', + simne: '≆', + simplus: '⨤', + simrarr: '⥲', + slarr: '←', + smallsetminus: '∖', + smashp: '⨳', + smeparsl: '⧤', + smid: '∣', + smile: '⌣', + smt: '⪪', + smte: '⪬', + smtes: '⪬︀', + softcy: 'ь', + sol: '/', + solb: '⧄', + solbar: '⌿', + sopf: '𝕤', + spades: '♠', + spadesuit: '♠', + spar: '∥', + sqcap: '⊓', + sqcaps: '⊓︀', + sqcup: '⊔', + sqcups: '⊔︀', + sqsub: '⊏', + sqsube: '⊑', + sqsubset: '⊏', + sqsubseteq: '⊑', + sqsup: '⊐', + sqsupe: '⊒', + sqsupset: '⊐', + sqsupseteq: '⊒', + squ: '□', + square: '□', + squarf: '▪', + squf: '▪', + srarr: '→', + sscr: '𝓈', + ssetmn: '∖', + ssmile: '⌣', + sstarf: '⋆', + star: '☆', + starf: '★', + straightepsilon: 'ϵ', + straightphi: 'ϕ', + strns: '¯', + sub: '⊂', + subE: '⫅', + subdot: '⪽', + sube: '⊆', + subedot: '⫃', + submult: '⫁', + subnE: '⫋', + subne: '⊊', + subplus: '⪿', + subrarr: '⥹', + subset: '⊂', + subseteq: '⊆', + subseteqq: '⫅', + subsetneq: '⊊', + subsetneqq: '⫋', + subsim: '⫇', + subsub: '⫕', + subsup: '⫓', + succ: '≻', + succapprox: '⪸', + succcurlyeq: '≽', + succeq: '⪰', + succnapprox: '⪺', + succneqq: '⪶', + succnsim: '⋩', + succsim: '≿', + sum: '∑', + sung: '♪', + sup1: '¹', + sup2: '²', + sup3: '³', + sup: '⊃', + supE: '⫆', + supdot: '⪾', + supdsub: '⫘', + supe: '⊇', + supedot: '⫄', + suphsol: '⟉', + suphsub: '⫗', + suplarr: '⥻', + supmult: '⫂', + supnE: '⫌', + supne: '⊋', + supplus: '⫀', + supset: '⊃', + supseteq: '⊇', + supseteqq: '⫆', + supsetneq: '⊋', + supsetneqq: '⫌', + supsim: '⫈', + supsub: '⫔', + supsup: '⫖', + swArr: '⇙', + swarhk: '⤦', + swarr: '↙', + swarrow: '↙', + swnwar: '⤪', + szlig: 'ß', + target: '⌖', + tau: 'τ', + tbrk: '⎴', + tcaron: 'ť', + tcedil: 'ţ', + tcy: 'т', + tdot: '⃛', + telrec: '⌕', + tfr: '𝔱', + there4: '∴', + therefore: '∴', + theta: 'θ', + thetasym: 'ϑ', + thetav: 'ϑ', + thickapprox: '≈', + thicksim: '∼', + thinsp: ' ', + thkap: '≈', + thksim: '∼', + thorn: 'þ', + tilde: '˜', + times: '×', + timesb: '⊠', + timesbar: '⨱', + timesd: '⨰', + tint: '∭', + toea: '⤨', + top: '⊤', + topbot: '⌶', + topcir: '⫱', + topf: '𝕥', + topfork: '⫚', + tosa: '⤩', + tprime: '‴', + trade: '™', + triangle: '▵', + triangledown: '▿', + triangleleft: '◃', + trianglelefteq: '⊴', + triangleq: '≜', + triangleright: '▹', + trianglerighteq: '⊵', + tridot: '◬', + trie: '≜', + triminus: '⨺', + triplus: '⨹', + trisb: '⧍', + tritime: '⨻', + trpezium: '⏢', + tscr: '𝓉', + tscy: 'ц', + tshcy: 'ћ', + tstrok: 'ŧ', + twixt: '≬', + twoheadleftarrow: '↞', + twoheadrightarrow: '↠', + uArr: '⇑', + uHar: '⥣', + uacute: 'ú', + uarr: '↑', + ubrcy: 'ў', + ubreve: 'ŭ', + ucirc: 'û', + ucy: 'у', + udarr: '⇅', + udblac: 'ű', + udhar: '⥮', + ufisht: '⥾', + ufr: '𝔲', + ugrave: 'ù', + uharl: '↿', + uharr: '↾', + uhblk: '▀', + ulcorn: '⌜', + ulcorner: '⌜', + ulcrop: '⌏', + ultri: '◸', + umacr: 'ū', + uml: '¨', + uogon: 'ų', + uopf: '𝕦', + uparrow: '↑', + updownarrow: '↕', + upharpoonleft: '↿', + upharpoonright: '↾', + uplus: '⊎', + upsi: 'υ', + upsih: 'ϒ', + upsilon: 'υ', + upuparrows: '⇈', + urcorn: '⌝', + urcorner: '⌝', + urcrop: '⌎', + uring: 'ů', + urtri: '◹', + uscr: '𝓊', + utdot: '⋰', + utilde: 'ũ', + utri: '▵', + utrif: '▴', + uuarr: '⇈', + uuml: 'ü', + uwangle: '⦧', + vArr: '⇕', + vBar: '⫨', + vBarv: '⫩', + vDash: '⊨', + vangrt: '⦜', + varepsilon: 'ϵ', + varkappa: 'ϰ', + varnothing: '∅', + varphi: 'ϕ', + varpi: 'ϖ', + varpropto: '∝', + varr: '↕', + varrho: 'ϱ', + varsigma: 'ς', + varsubsetneq: '⊊︀', + varsubsetneqq: '⫋︀', + varsupsetneq: '⊋︀', + varsupsetneqq: '⫌︀', + vartheta: 'ϑ', + vartriangleleft: '⊲', + vartriangleright: '⊳', + vcy: 'в', + vdash: '⊢', + vee: '∨', + veebar: '⊻', + veeeq: '≚', + vellip: '⋮', + verbar: '|', + vert: '|', + vfr: '𝔳', + vltri: '⊲', + vnsub: '⊂⃒', + vnsup: '⊃⃒', + vopf: '𝕧', + vprop: '∝', + vrtri: '⊳', + vscr: '𝓋', + vsubnE: '⫋︀', + vsubne: '⊊︀', + vsupnE: '⫌︀', + vsupne: '⊋︀', + vzigzag: '⦚', + wcirc: 'ŵ', + wedbar: '⩟', + wedge: '∧', + wedgeq: '≙', + weierp: '℘', + wfr: '𝔴', + wopf: '𝕨', + wp: '℘', + wr: '≀', + wreath: '≀', + wscr: '𝓌', + xcap: '⋂', + xcirc: '◯', + xcup: '⋃', + xdtri: '▽', + xfr: '𝔵', + xhArr: '⟺', + xharr: '⟷', + xi: 'ξ', + xlArr: '⟸', + xlarr: '⟵', + xmap: '⟼', + xnis: '⋻', + xodot: '⨀', + xopf: '𝕩', + xoplus: '⨁', + xotime: '⨂', + xrArr: '⟹', + xrarr: '⟶', + xscr: '𝓍', + xsqcup: '⨆', + xuplus: '⨄', + xutri: '△', + xvee: '⋁', + xwedge: '⋀', + yacute: 'ý', + yacy: 'я', + ycirc: 'ŷ', + ycy: 'ы', + yen: '¥', + yfr: '𝔶', + yicy: 'ї', + yopf: '𝕪', + yscr: '𝓎', + yucy: 'ю', + yuml: 'ÿ', + zacute: 'ź', + zcaron: 'ž', + zcy: 'з', + zdot: 'ż', + zeetrf: 'ℨ', + zeta: 'ζ', + zfr: '𝔷', + zhcy: 'ж', + zigrarr: '⇝', + zopf: '𝕫', + zscr: '𝓏', + zwj: '‍', + zwnj: '‌' +} + +;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js + + +const own = {}.hasOwnProperty + +/** + * Decode a single character reference (without the `&` or `;`). + * You probably only need this when you’re building parsers yourself that follow + * different rules compared to HTML. + * This is optimized to be tiny in browsers. + * + * @param {string} value + * `notin` (named), `#123` (deci), `#x123` (hexa). + * @returns {string|false} + * Decoded reference. + */ +function decodeNamedCharacterReference(value) { + return own.call(characterEntities, value) ? characterEntities[value] : false +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const characterReference = { + name: 'characterReference', + tokenize: tokenizeCharacterReference +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterReference(effects, ok, nok) { + const self = this + let size = 0 + /** @type {number} */ + let max + /** @type {(code: Code) => boolean} */ + let test + return start + + /** + * Start of character reference. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterReference') + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + return open + } + + /** + * After `&`, at `#` for numeric references or alphanumeric for named + * references. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 35) { + effects.enter('characterReferenceMarkerNumeric') + effects.consume(code) + effects.exit('characterReferenceMarkerNumeric') + return numeric + } + effects.enter('characterReferenceValue') + max = 31 + test = asciiAlphanumeric + return value(code) + } + + /** + * After `#`, at `x` for hexadecimals or digit for decimals. + * + * ```markdown + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function numeric(code) { + if (code === 88 || code === 120) { + effects.enter('characterReferenceMarkerHexadecimal') + effects.consume(code) + effects.exit('characterReferenceMarkerHexadecimal') + effects.enter('characterReferenceValue') + max = 6 + test = asciiHexDigit + return value + } + effects.enter('characterReferenceValue') + max = 7 + test = asciiDigit + return value(code) + } + + /** + * After markers (`&#x`, `&#`, or `&`), in value, before `;`. + * + * The character reference kind defines what and how many characters are + * allowed. + * + * ```markdown + * > | a&b + * ^^^ + * > | a{b + * ^^^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function value(code) { + if (code === 59 && size) { + const token = effects.exit('characterReferenceValue') + if ( + test === asciiAlphanumeric && + !decodeNamedCharacterReference(self.sliceSerialize(token)) + ) { + return nok(code) + } + + // To do: `markdown-rs` uses a different name: + // `CharacterReferenceMarkerSemi`. + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + effects.exit('characterReference') + return ok + } + if (test(code) && size++ < max) { + effects.consume(code) + return value + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const characterEscape = { + name: 'characterEscape', + tokenize: tokenizeCharacterEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterEscape(effects, ok, nok) { + return start + + /** + * Start of character escape. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterEscape') + effects.enter('escapeMarker') + effects.consume(code) + effects.exit('escapeMarker') + return inside + } + + /** + * After `\`, at punctuation. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + // ASCII punctuation. + if (asciiPunctuation(code)) { + effects.enter('characterEscapeValue') + effects.consume(code) + effects.exit('characterEscapeValue') + effects.exit('characterEscape') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const lineEnding = { + name: 'lineEnding', + tokenize: tokenizeLineEnding +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLineEnding(effects, ok) { + return start + + /** @type {State} */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, ok, 'linePrefix') + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + + +/** @type {Construct} */ +const labelEnd = { + name: 'labelEnd', + tokenize: tokenizeLabelEnd, + resolveTo: resolveToLabelEnd, + resolveAll: resolveAllLabelEnd +} + +/** @type {Construct} */ +const resourceConstruct = { + tokenize: tokenizeResource +} +/** @type {Construct} */ +const referenceFullConstruct = { + tokenize: tokenizeReferenceFull +} +/** @type {Construct} */ +const referenceCollapsedConstruct = { + tokenize: tokenizeReferenceCollapsed +} + +/** @type {Resolver} */ +function resolveAllLabelEnd(events) { + let index = -1 + while (++index < events.length) { + const token = events[index][1] + if ( + token.type === 'labelImage' || + token.type === 'labelLink' || + token.type === 'labelEnd' + ) { + // Remove the marker. + events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) + token.type = 'data' + index++ + } + } + return events +} + +/** @type {Resolver} */ +function resolveToLabelEnd(events, context) { + let index = events.length + let offset = 0 + /** @type {Token} */ + let token + /** @type {number | undefined} */ + let open + /** @type {number | undefined} */ + let close + /** @type {Array<Event>} */ + let media + + // Find an opening. + while (index--) { + token = events[index][1] + if (open) { + // If we see another link, or inactive link label, we’ve been here before. + if ( + token.type === 'link' || + (token.type === 'labelLink' && token._inactive) + ) { + break + } + + // Mark other link openings as inactive, as we can’t have links in + // links. + if (events[index][0] === 'enter' && token.type === 'labelLink') { + token._inactive = true + } + } else if (close) { + if ( + events[index][0] === 'enter' && + (token.type === 'labelImage' || token.type === 'labelLink') && + !token._balanced + ) { + open = index + if (token.type !== 'labelLink') { + offset = 2 + break + } + } + } else if (token.type === 'labelEnd') { + close = index + } + } + const group = { + type: events[open][1].type === 'labelLink' ? 'link' : 'image', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + const label = { + type: 'label', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[close][1].end) + } + const text = { + type: 'labelText', + start: Object.assign({}, events[open + offset + 2][1].end), + end: Object.assign({}, events[close - 2][1].start) + } + media = [ + ['enter', group, context], + ['enter', label, context] + ] + + // Opening marker. + media = push(media, events.slice(open + 1, open + offset + 3)) + + // Text open. + media = push(media, [['enter', text, context]]) + + // Always populated by defaults. + + // Between. + media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ) + + // Text close, marker close, label close. + media = push(media, [ + ['exit', text, context], + events[close - 2], + events[close - 1], + ['exit', label, context] + ]) + + // Reference, resource, or so. + media = push(media, events.slice(close + 1)) + + // Media close. + media = push(media, [['exit', group, context]]) + splice(events, open, events.length, media) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelEnd(effects, ok, nok) { + const self = this + let index = self.events.length + /** @type {Token} */ + let labelStart + /** @type {boolean} */ + let defined + + // Find an opening. + while (index--) { + if ( + (self.events[index][1].type === 'labelImage' || + self.events[index][1].type === 'labelLink') && + !self.events[index][1]._balanced + ) { + labelStart = self.events[index][1] + break + } + } + return start + + /** + * Start of label end. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ``` + * + * @type {State} + */ + function start(code) { + // If there is not an okay opening. + if (!labelStart) { + return nok(code) + } + + // If the corresponding label (link) start is marked as inactive, + // it means we’d be wrapping a link, like this: + // + // ```markdown + // > | a [b [c](d) e](f) g. + // ^ + // ``` + // + // We can’t have that, so it’s just balanced brackets. + if (labelStart._inactive) { + return labelEndNok(code) + } + defined = self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize({ + start: labelStart.end, + end: self.now() + }) + ) + ) + effects.enter('labelEnd') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelEnd') + return after + } + + /** + * After `]`. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + // Note: `markdown-rs` also parses GFM footnotes here, which for us is in + // an extension. + + // Resource (`[asd](fgh)`)? + if (code === 40) { + return effects.attempt( + resourceConstruct, + labelEndOk, + defined ? labelEndOk : labelEndNok + )(code) + } + + // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? + if (code === 91) { + return effects.attempt( + referenceFullConstruct, + labelEndOk, + defined ? referenceNotFull : labelEndNok + )(code) + } + + // Shortcut (`[asd]`) reference? + return defined ? labelEndOk(code) : labelEndNok(code) + } + + /** + * After `]`, at `[`, but not at a full reference. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function referenceNotFull(code) { + return effects.attempt( + referenceCollapsedConstruct, + labelEndOk, + labelEndNok + )(code) + } + + /** + * Done, we found something. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndOk(code) { + // Note: `markdown-rs` does a bunch of stuff here. + return ok(code) + } + + /** + * Done, it’s nothing. + * + * There was an okay opening, but we didn’t match anything. + * + * ```markdown + * > | [a](b c + * ^ + * > | [a][b c + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndNok(code) { + labelStart._balanced = true + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeResource(effects, ok, nok) { + return resourceStart + + /** + * At a resource. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceStart(code) { + effects.enter('resource') + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + return resourceBefore + } + + /** + * In resource, after `(`, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceOpen)(code) + : resourceOpen(code) + } + + /** + * In resource, after optional whitespace, at `)` or a destination. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceOpen(code) { + if (code === 41) { + return resourceEnd(code) + } + return factoryDestination( + effects, + resourceDestinationAfter, + resourceDestinationMissing, + 'resourceDestination', + 'resourceDestinationLiteral', + 'resourceDestinationLiteralMarker', + 'resourceDestinationRaw', + 'resourceDestinationString', + 32 + )(code) + } + + /** + * In resource, after destination, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceBetween)(code) + : resourceEnd(code) + } + + /** + * At invalid destination. + * + * ```markdown + * > | [a](<<) b + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationMissing(code) { + return nok(code) + } + + /** + * In resource, after destination and whitespace, at `(` or title. + * + * ```markdown + * > | [a](b ) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBetween(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + resourceTitleAfter, + nok, + 'resourceTitle', + 'resourceTitleMarker', + 'resourceTitleString' + )(code) + } + return resourceEnd(code) + } + + /** + * In resource, after title, at optional whitespace. + * + * ```markdown + * > | [a](b "c") d + * ^ + * ``` + * + * @type {State} + */ + function resourceTitleAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceEnd)(code) + : resourceEnd(code) + } + + /** + * In resource, at `)`. + * + * ```markdown + * > | [a](b) d + * ^ + * ``` + * + * @type {State} + */ + function resourceEnd(code) { + if (code === 41) { + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + effects.exit('resource') + return ok + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceFull(effects, ok, nok) { + const self = this + return referenceFull + + /** + * In a reference (full), at the `[`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFull(code) { + return factoryLabel.call( + self, + effects, + referenceFullAfter, + referenceFullMissing, + 'reference', + 'referenceMarker', + 'referenceString' + )(code) + } + + /** + * In a reference (full), after `]`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullAfter(code) { + return self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + ) + ? ok(code) + : nok(code) + } + + /** + * In reference (full) that was missing. + * + * ```markdown + * > | [a][b d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullMissing(code) { + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceCollapsed(effects, ok, nok) { + return referenceCollapsedStart + + /** + * In reference (collapsed), at `[`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedStart(code) { + // We only attempt a collapsed label if there’s a `[`. + + effects.enter('reference') + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + return referenceCollapsedOpen + } + + /** + * In reference (collapsed), at `]`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedOpen(code) { + if (code === 93) { + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + effects.exit('reference') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartImage = { + name: 'labelStartImage', + tokenize: tokenizeLabelStartImage, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartImage(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (image) start. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelImage') + effects.enter('labelImageMarker') + effects.consume(code) + effects.exit('labelImageMarker') + return open + } + + /** + * After `!`, at `[`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 91) { + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelImage') + return after + } + return nok(code) + } + + /** + * After `![`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * This is needed in because, when GFM footnotes are enabled, images never + * form when started with a `^`. + * Instead, links form: + * + * ```markdown + * ![^a](b) + * + * ![^a][b] + * + * [b]: c + * ``` + * + * ```html + * <p>!<a href=\"b\">^a</a></p> + * <p>!<a href=\"c\">^a</a></p> + * ``` + * + * @type {State} + */ + function after(code) { + // To do: use a new field to do this, this is still needed for + // `micromark-extension-gfm-footnote`, but the `label-start-link` + // behavior isn’t. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + +/** + * Classify whether a code represents whitespace, punctuation, or something + * else. + * + * Used for attention (emphasis, strong), whose sequences can open or close + * based on the class of surrounding characters. + * + * > 👉 **Note**: eof (`null`) is seen as whitespace. + * + * @param {Code} code + * Code. + * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} + * Group. + */ +function classifyCharacter(code) { + if ( + code === null || + markdownLineEndingOrSpace(code) || + unicodeWhitespace(code) + ) { + return 1 + } + if (unicodePunctuation(code)) { + return 2 + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const attention = { + name: 'attention', + tokenize: tokenizeAttention, + resolveAll: resolveAllAttention +} + +/** + * Take all events and resolve attention to emphasis or strong. + * + * @type {Resolver} + */ +function resolveAllAttention(events, context) { + let index = -1 + /** @type {number} */ + let open + /** @type {Token} */ + let group + /** @type {Token} */ + let text + /** @type {Token} */ + let openingSequence + /** @type {Token} */ + let closingSequence + /** @type {number} */ + let use + /** @type {Array<Event>} */ + let nextEvents + /** @type {number} */ + let offset + + // Walk through all events. + // + // Note: performance of this is fine on an mb of normal markdown, but it’s + // a bottleneck for malicious stuff. + while (++index < events.length) { + // Find a token that can close. + if ( + events[index][0] === 'enter' && + events[index][1].type === 'attentionSequence' && + events[index][1]._close + ) { + open = index + + // Now walk back to find an opener. + while (open--) { + // Find a token that can open the closer. + if ( + events[open][0] === 'exit' && + events[open][1].type === 'attentionSequence' && + events[open][1]._open && + // If the markers are the same: + context.sliceSerialize(events[open][1]).charCodeAt(0) === + context.sliceSerialize(events[index][1]).charCodeAt(0) + ) { + // If the opening can close or the closing can open, + // and the close size *is not* a multiple of three, + // but the sum of the opening and closing size *is* multiple of three, + // then don’t match. + if ( + (events[open][1]._close || events[index][1]._open) && + (events[index][1].end.offset - events[index][1].start.offset) % 3 && + !( + (events[open][1].end.offset - + events[open][1].start.offset + + events[index][1].end.offset - + events[index][1].start.offset) % + 3 + ) + ) { + continue + } + + // Number of markers to use from the sequence. + use = + events[open][1].end.offset - events[open][1].start.offset > 1 && + events[index][1].end.offset - events[index][1].start.offset > 1 + ? 2 + : 1 + const start = Object.assign({}, events[open][1].end) + const end = Object.assign({}, events[index][1].start) + movePoint(start, -use) + movePoint(end, use) + openingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start, + end: Object.assign({}, events[open][1].end) + } + closingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start: Object.assign({}, events[index][1].start), + end + } + text = { + type: use > 1 ? 'strongText' : 'emphasisText', + start: Object.assign({}, events[open][1].end), + end: Object.assign({}, events[index][1].start) + } + group = { + type: use > 1 ? 'strong' : 'emphasis', + start: Object.assign({}, openingSequence.start), + end: Object.assign({}, closingSequence.end) + } + events[open][1].end = Object.assign({}, openingSequence.start) + events[index][1].start = Object.assign({}, closingSequence.end) + nextEvents = [] + + // If there are more markers in the opening, add them before. + if (events[open][1].end.offset - events[open][1].start.offset) { + nextEvents = push(nextEvents, [ + ['enter', events[open][1], context], + ['exit', events[open][1], context] + ]) + } + + // Opening. + nextEvents = push(nextEvents, [ + ['enter', group, context], + ['enter', openingSequence, context], + ['exit', openingSequence, context], + ['enter', text, context] + ]) + + // Always populated by defaults. + + // Between. + nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index), + context + ) + ) + + // Closing. + nextEvents = push(nextEvents, [ + ['exit', text, context], + ['enter', closingSequence, context], + ['exit', closingSequence, context], + ['exit', group, context] + ]) + + // If there are more markers in the closing, add them after. + if (events[index][1].end.offset - events[index][1].start.offset) { + offset = 2 + nextEvents = push(nextEvents, [ + ['enter', events[index][1], context], + ['exit', events[index][1], context] + ]) + } else { + offset = 0 + } + splice(events, open - 1, index - open + 3, nextEvents) + index = open + nextEvents.length - offset - 2 + break + } + } + } + } + + // Remove remaining sequences. + index = -1 + while (++index < events.length) { + if (events[index][1].type === 'attentionSequence') { + events[index][1].type = 'data' + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAttention(effects, ok) { + const attentionMarkers = this.parser.constructs.attentionMarkers.null + const previous = this.previous + const before = classifyCharacter(previous) + + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Before a sequence. + * + * ```markdown + * > | ** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + marker = code + effects.enter('attentionSequence') + return inside(code) + } + + /** + * In a sequence. + * + * ```markdown + * > | ** + * ^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + const token = effects.exit('attentionSequence') + + // To do: next major: move this to resolver, just like `markdown-rs`. + const after = classifyCharacter(code) + + // Always populated by defaults. + + const open = + !after || (after === 2 && before) || attentionMarkers.includes(code) + const close = + !before || (before === 2 && after) || attentionMarkers.includes(previous) + token._open = Boolean(marker === 42 ? open : open && (before || !close)) + token._close = Boolean(marker === 42 ? close : close && (after || !open)) + return ok(code) + } +} + +/** + * Move a point a bit. + * + * Note: `move` only works inside lines! It’s not possible to move past other + * chunks (replacement characters, tabs, or line endings). + * + * @param {Point} point + * @param {number} offset + * @returns {void} + */ +function movePoint(point, offset) { + point.column += offset + point.offset += offset + point._bufferIndex += offset +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const autolink = { + name: 'autolink', + tokenize: tokenizeAutolink +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAutolink(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of an autolink. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('autolink') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.enter('autolinkProtocol') + return open + } + + /** + * After `<`, at protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (asciiAlpha(code)) { + effects.consume(code) + return schemeOrEmailAtext + } + return emailAtext(code) + } + + /** + * At second byte of protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function schemeOrEmailAtext(code) { + // ASCII alphanumeric and `+`, `-`, and `.`. + if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { + // Count the previous alphabetical from `open` too. + size = 1 + return schemeInsideOrEmailAtext(code) + } + return emailAtext(code) + } + + /** + * In ambiguous protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function schemeInsideOrEmailAtext(code) { + if (code === 58) { + effects.consume(code) + size = 0 + return urlInside + } + + // ASCII alphanumeric and `+`, `-`, and `.`. + if ( + (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && + size++ < 32 + ) { + effects.consume(code) + return schemeInsideOrEmailAtext + } + size = 0 + return emailAtext(code) + } + + /** + * After protocol, in URL. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * ``` + * + * @type {State} + */ + function urlInside(code) { + if (code === 62) { + effects.exit('autolinkProtocol') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + + // ASCII control, space, or `<`. + if (code === null || code === 32 || code === 60 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return urlInside + } + + /** + * In email atext. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailAtext(code) { + if (code === 64) { + effects.consume(code) + return emailAtSignOrDot + } + if (asciiAtext(code)) { + effects.consume(code) + return emailAtext + } + return nok(code) + } + + /** + * In label, after at-sign or dot. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ ^ + * ``` + * + * @type {State} + */ + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) + } + + /** + * In label, where `.` and `>` are allowed. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailLabel(code) { + if (code === 46) { + effects.consume(code) + size = 0 + return emailAtSignOrDot + } + if (code === 62) { + // Exit, then change the token type. + effects.exit('autolinkProtocol').type = 'autolinkEmail' + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + return emailValue(code) + } + + /** + * In label, where `.` and `>` are *not* allowed. + * + * Though, this is also used in `emailLabel` to parse other values. + * + * ```markdown + * > | a<user.name@ex-ample.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailValue(code) { + // ASCII alphanumeric or `-`. + if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { + const next = code === 45 ? emailValue : emailLabel + effects.consume(code) + return next + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const htmlText = { + name: 'htmlText', + tokenize: tokenizeHtmlText +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlText(effects, ok, nok) { + const self = this + /** @type {NonNullable<Code> | undefined} */ + let marker + /** @type {number} */ + let index + /** @type {State} */ + let returnState + return start + + /** + * Start of HTML (text). + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('htmlText') + effects.enter('htmlTextData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | a <b> c + * ^ + * > | a <!doctype> c + * ^ + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + return instruction + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagOpen + } + return nok(code) + } + + /** + * After `<!`, at declaration, comment, or CDATA. + * + * ```markdown + * > | a <!doctype> c + * ^ + * > | a <!--b--> c + * ^ + * > | a <![CDATA[>&<]]> c + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + index = 0 + return cdataOpenInside + } + if (asciiAlpha(code)) { + effects.consume(code) + return declaration + } + return nok(code) + } + + /** + * In a comment, after `<!-`, at another `-`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return nok(code) + } + + /** + * In comment. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function comment(code) { + if (code === null) { + return nok(code) + } + if (code === 45) { + effects.consume(code) + return commentClose + } + if (markdownLineEnding(code)) { + returnState = comment + return lineEndingBefore(code) + } + effects.consume(code) + return comment + } + + /** + * In comment, after `-`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentClose(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return comment(code) + } + + /** + * In comment, after `--`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentEnd(code) { + return code === 62 + ? end(code) + : code === 45 + ? commentClose(code) + : comment(code) + } + + /** + * After `<![`, in CDATA, expecting `CDATA[`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + return index === value.length ? cdata : cdataOpenInside + } + return nok(code) + } + + /** + * In CDATA. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^^^ + * ``` + * + * @type {State} + */ + function cdata(code) { + if (code === null) { + return nok(code) + } + if (code === 93) { + effects.consume(code) + return cdataClose + } + if (markdownLineEnding(code)) { + returnState = cdata + return lineEndingBefore(code) + } + effects.consume(code) + return cdata + } + + /** + * In CDATA, after `]`, at another `]`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataClose(code) { + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In CDATA, after `]]`, at `>`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataEnd(code) { + if (code === 62) { + return end(code) + } + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In declaration. + * + * ```markdown + * > | a <!b> c + * ^ + * ``` + * + * @type {State} + */ + function declaration(code) { + if (code === null || code === 62) { + return end(code) + } + if (markdownLineEnding(code)) { + returnState = declaration + return lineEndingBefore(code) + } + effects.consume(code) + return declaration + } + + /** + * In instruction. + * + * ```markdown + * > | a <?b?> c + * ^ + * ``` + * + * @type {State} + */ + function instruction(code) { + if (code === null) { + return nok(code) + } + if (code === 63) { + effects.consume(code) + return instructionClose + } + if (markdownLineEnding(code)) { + returnState = instruction + return lineEndingBefore(code) + } + effects.consume(code) + return instruction + } + + /** + * In instruction, after `?`, at `>`. + * + * ```markdown + * > | a <?b?> c + * ^ + * ``` + * + * @type {State} + */ + function instructionClose(code) { + return code === 62 ? end(code) : instruction(code) + } + + /** + * After `</`, in closing tag, at tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagClose + } + return nok(code) + } + + /** + * After `</x`, in a tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagClose(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagClose + } + return tagCloseBetween(code) + } + + /** + * In closing tag, after tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseBetween(code) { + if (markdownLineEnding(code)) { + returnState = tagCloseBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagCloseBetween + } + return end(code) + } + + /** + * After `<x`, in opening tag name. + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function tagOpen(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagOpen + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In opening tag, after tag name. + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function tagOpenBetween(code) { + if (code === 47) { + effects.consume(code) + return end + } + + // ASCII alphabetical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return tagOpenAttributeName + } + if (markdownLineEnding(code)) { + returnState = tagOpenBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenBetween + } + return end(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | a <b c> d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeName(code) { + // ASCII alphabetical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return tagOpenAttributeName + } + return tagOpenAttributeNameAfter(code) + } + + /** + * After attribute name, before initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | a <b c> d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeNameAfter + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeNameAfter + } + return tagOpenBetween(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | a <b c=d> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + marker = code + return tagOpenAttributeValueQuoted + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueBefore + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code) + marker = undefined + return tagOpenAttributeValueQuotedAfter + } + if (code === null) { + return nok(code) + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueQuoted + return lineEndingBefore(code) + } + effects.consume(code) + return tagOpenAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | a <b c=d> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 60 || + code === 61 || + code === 96 + ) { + return nok(code) + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the end + * of the tag. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In certain circumstances of a tag where only an `>` is allowed. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function end(code) { + if (code === 62) { + effects.consume(code) + effects.exit('htmlTextData') + effects.exit('htmlText') + return ok + } + return nok(code) + } + + /** + * At eol. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * > | a <!--a + * ^ + * | b--> + * ``` + * + * @type {State} + */ + function lineEndingBefore(code) { + effects.exit('htmlTextData') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineEndingAfter + } + + /** + * After eol, at optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a <!--a + * > | b--> + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfter(code) { + // Always populated by defaults. + + return markdownSpace(code) + ? factorySpace( + effects, + lineEndingAfterPrefix, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : lineEndingAfterPrefix(code) + } + + /** + * After eol, after optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a <!--a + * > | b--> + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfterPrefix(code) { + effects.enter('htmlTextData') + return returnState(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartLink = { + name: 'labelStartLink', + tokenize: tokenizeLabelStartLink, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartLink(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (link) start. + * + * ```markdown + * > | a [b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelLink') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelLink') + return after + } + + /** @type {State} */ + function after(code) { + // To do: this isn’t needed in `micromark-extension-gfm-footnote`, + // remove. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const hardBreakEscape = { + name: 'hardBreakEscape', + tokenize: tokenizeHardBreakEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHardBreakEscape(effects, ok, nok) { + return start + + /** + * Start of a hard break (escape). + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('hardBreakEscape') + effects.consume(code) + return after + } + + /** + * After `\`, at eol. + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownLineEnding(code)) { + effects.exit('hardBreakEscape') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Previous} Previous + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const codeText = { + name: 'codeText', + tokenize: tokenizeCodeText, + resolve: resolveCodeText, + previous +} + +// To do: next major: don’t resolve, like `markdown-rs`. +/** @type {Resolver} */ +function resolveCodeText(events) { + let tailExitIndex = events.length - 4 + let headEnterIndex = 3 + /** @type {number} */ + let index + /** @type {number | undefined} */ + let enter + + // If we start and end with an EOL or a space. + if ( + (events[headEnterIndex][1].type === 'lineEnding' || + events[headEnterIndex][1].type === 'space') && + (events[tailExitIndex][1].type === 'lineEnding' || + events[tailExitIndex][1].type === 'space') + ) { + index = headEnterIndex + + // And we have data. + while (++index < tailExitIndex) { + if (events[index][1].type === 'codeTextData') { + // Then we have padding. + events[headEnterIndex][1].type = 'codeTextPadding' + events[tailExitIndex][1].type = 'codeTextPadding' + headEnterIndex += 2 + tailExitIndex -= 2 + break + } + } + } + + // Merge adjacent spaces and data. + index = headEnterIndex - 1 + tailExitIndex++ + while (++index <= tailExitIndex) { + if (enter === undefined) { + if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { + enter = index + } + } else if ( + index === tailExitIndex || + events[index][1].type === 'lineEnding' + ) { + events[enter][1].type = 'codeTextData' + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + tailExitIndex -= index - enter - 2 + index = enter + 2 + } + enter = undefined + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Previous} + */ +function previous(code) { + // If there is a previous code, there will always be a tail. + return ( + code !== 96 || + this.events[this.events.length - 1][1].type === 'characterEscape' + ) +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeText(effects, ok, nok) { + const self = this + let sizeOpen = 0 + /** @type {number} */ + let size + /** @type {Token} */ + let token + return start + + /** + * Start of code (text). + * + * ```markdown + * > | `a` + * ^ + * > | \`a` + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('codeText') + effects.enter('codeTextSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 96) { + effects.consume(code) + sizeOpen++ + return sequenceOpen + } + effects.exit('codeTextSequence') + return between(code) + } + + /** + * Between something and something else. + * + * ```markdown + * > | `a` + * ^^ + * ``` + * + * @type {State} + */ + function between(code) { + // EOF. + if (code === null) { + return nok(code) + } + + // To do: next major: don’t do spaces in resolve, but when compiling, + // like `markdown-rs`. + // Tabs don’t work, and virtual spaces don’t make sense. + if (code === 32) { + effects.enter('space') + effects.consume(code) + effects.exit('space') + return between + } + + // Closing fence? Could also be data. + if (code === 96) { + token = effects.enter('codeTextSequence') + size = 0 + return sequenceClose(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return between + } + + // Data. + effects.enter('codeTextData') + return data(code) + } + + /** + * In data. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if ( + code === null || + code === 32 || + code === 96 || + markdownLineEnding(code) + ) { + effects.exit('codeTextData') + return between(code) + } + effects.consume(code) + return data + } + + /** + * In closing sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + // More. + if (code === 96) { + effects.consume(code) + size++ + return sequenceClose + } + + // Done! + if (size === sizeOpen) { + effects.exit('codeTextSequence') + effects.exit('codeText') + return ok(code) + } + + // More or less accents: mark as data. + token.type = 'codeTextData' + return data(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + */ + + + + +/** @satisfies {Extension['document']} */ +const constructs_document = { + [42]: list, + [43]: list, + [45]: list, + [48]: list, + [49]: list, + [50]: list, + [51]: list, + [52]: list, + [53]: list, + [54]: list, + [55]: list, + [56]: list, + [57]: list, + [62]: blockQuote +} + +/** @satisfies {Extension['contentInitial']} */ +const contentInitial = { + [91]: definition +} + +/** @satisfies {Extension['flowInitial']} */ +const flowInitial = { + [-2]: codeIndented, + [-1]: codeIndented, + [32]: codeIndented +} + +/** @satisfies {Extension['flow']} */ +const constructs_flow = { + [35]: headingAtx, + [42]: thematicBreak, + [45]: [setextUnderline, thematicBreak], + [60]: htmlFlow, + [61]: setextUnderline, + [95]: thematicBreak, + [96]: codeFenced, + [126]: codeFenced +} + +/** @satisfies {Extension['string']} */ +const constructs_string = { + [38]: characterReference, + [92]: characterEscape +} + +/** @satisfies {Extension['text']} */ +const constructs_text = { + [-5]: lineEnding, + [-4]: lineEnding, + [-3]: lineEnding, + [33]: labelStartImage, + [38]: characterReference, + [42]: attention, + [60]: [autolink, htmlText], + [91]: labelStartLink, + [92]: [hardBreakEscape, characterEscape], + [93]: labelEnd, + [95]: attention, + [96]: codeText +} + +/** @satisfies {Extension['insideSpan']} */ +const insideSpan = { + null: [attention, resolver] +} + +/** @satisfies {Extension['attentionMarkers']} */ +const attentionMarkers = { + null: [42, 95] +} + +/** @satisfies {Extension['disable']} */ +const disable = { + null: [] +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js +/** + * @typedef {import('micromark-util-types').Create} Create + * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + */ + + + + + + + + + +/** + * @param {ParseOptions | null | undefined} [options] + * @returns {ParseContext} + */ +function parse(options) { + const settings = options || {} + const constructs = + /** @type {FullNormalizedExtension} */ + combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) + + /** @type {ParseContext} */ + const parser = { + defined: [], + lazy: {}, + constructs, + content: create(content), + document: create(document_document), + flow: create(flow), + string: create(string), + text: create(text_text) + } + return parser + + /** + * @param {InitialConstruct} initial + */ + function create(initial) { + return creator + /** @type {Create} */ + function creator(from) { + return createTokenizer(parser, initial, from) + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Value} Value + */ + +/** + * @callback Preprocessor + * @param {Value} value + * @param {Encoding | null | undefined} [encoding] + * @param {boolean | null | undefined} [end=false] + * @returns {Array<Chunk>} + */ + +const search = /[\0\t\n\r]/g + +/** + * @returns {Preprocessor} + */ +function preprocess() { + let column = 1 + let buffer = '' + /** @type {boolean | undefined} */ + let start = true + /** @type {boolean | undefined} */ + let atCarriageReturn + return preprocessor + + /** @type {Preprocessor} */ + function preprocessor(value, encoding, end) { + /** @type {Array<Chunk>} */ + const chunks = [] + /** @type {RegExpMatchArray | null} */ + let match + /** @type {number} */ + let next + /** @type {number} */ + let startPosition + /** @type {number} */ + let endPosition + /** @type {Code} */ + let code + + // @ts-expect-error `Buffer` does allow an encoding. + value = buffer + value.toString(encoding) + startPosition = 0 + buffer = '' + if (start) { + // To do: `markdown-rs` actually parses BOMs (byte order mark). + if (value.charCodeAt(0) === 65279) { + startPosition++ + } + start = undefined + } + while (startPosition < value.length) { + search.lastIndex = startPosition + match = search.exec(value) + endPosition = + match && match.index !== undefined ? match.index : value.length + code = value.charCodeAt(endPosition) + if (!match) { + buffer = value.slice(startPosition) + break + } + if (code === 10 && startPosition === endPosition && atCarriageReturn) { + chunks.push(-3) + atCarriageReturn = undefined + } else { + if (atCarriageReturn) { + chunks.push(-5) + atCarriageReturn = undefined + } + if (startPosition < endPosition) { + chunks.push(value.slice(startPosition, endPosition)) + column += endPosition - startPosition + } + switch (code) { + case 0: { + chunks.push(65533) + column++ + break + } + case 9: { + next = Math.ceil(column / 4) * 4 + chunks.push(-2) + while (column++ < next) chunks.push(-1) + break + } + case 10: { + chunks.push(-4) + column = 1 + break + } + default: { + atCarriageReturn = true + column = 1 + } + } + } + startPosition = endPosition + 1 + } + if (end) { + if (atCarriageReturn) chunks.push(-5) + if (buffer) chunks.push(buffer) + chunks.push(null) + } + return chunks + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js +/** + * @typedef {import('micromark-util-types').Event} Event + */ + + + +/** + * @param {Array<Event>} events + * @returns {Array<Event>} + */ +function postprocess(events) { + while (!subtokenize(events)) { + // Empty + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js +/** + * Turn the number (in string form as either hexa- or plain decimal) coming from + * a numeric character reference into a character. + * + * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes + * non-characters and control characters safe. + * + * @param {string} value + * Value to decode. + * @param {number} base + * Numeric base. + * @returns {string} + * Character. + */ +function decodeNumericCharacterReference(value, base) { + const code = Number.parseInt(value, base) + if ( + // C0 except for HT, LF, FF, CR, space. + code < 9 || + code === 11 || + (code > 13 && code < 32) || + // Control character (DEL) of C0, and C1 controls. + (code > 126 && code < 160) || + // Lone high surrogates and low surrogates. + (code > 55295 && code < 57344) || + // Noncharacters. + (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || + (code & 65535) === 65535 || + (code & 65535) === 65534 /* eslint-enable no-bitwise */ || + // Out of range + code > 1114111 + ) { + return '\uFFFD' + } + return String.fromCharCode(code) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js + + +const characterEscapeOrReference = + /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi + +/** + * Decode markdown strings (which occur in places such as fenced code info + * strings, destinations, labels, and titles). + * + * The “string” content type allows character escapes and -references. + * This decodes those. + * + * @param {string} value + * Value to decode. + * @returns {string} + * Decoded value. + */ +function decodeString(value) { + return value.replace(characterEscapeOrReference, decode) +} + +/** + * @param {string} $0 + * @param {string} $1 + * @param {string} $2 + * @returns {string} + */ +function decode($0, $1, $2) { + if ($1) { + // Escape. + return $1 + } + + // Reference. + const head = $2.charCodeAt(0) + if (head === 35) { + const head = $2.charCodeAt(1) + const hex = head === 120 || head === 88 + return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) + } + return decodeNamedCharacterReference($2) || $0 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js +/** + * @typedef {import('unist').Node} Node + * @typedef {import('unist').Point} Point + * @typedef {import('unist').Position} Position + */ + +/** + * @typedef NodeLike + * @property {string} type + * @property {PositionLike | null | undefined} [position] + * + * @typedef PositionLike + * @property {PointLike | null | undefined} [start] + * @property {PointLike | null | undefined} [end] + * + * @typedef PointLike + * @property {number | null | undefined} [line] + * @property {number | null | undefined} [column] + * @property {number | null | undefined} [offset] + */ + +/** + * Serialize the positional info of a point, position (start and end points), + * or node. + * + * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] + * Node, position, or point. + * @returns {string} + * Pretty printed positional info of a node (`string`). + * + * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) + * or a point `l:c` (when given `point`), where `l` stands for line, `c` for + * column, `s` for `start`, and `e` for end. + * An empty string (`''`) is returned if the given value is neither `node`, + * `position`, nor `point`. + */ +function stringifyPosition(value) { + // Nothing. + if (!value || typeof value !== 'object') { + return '' + } + + // Node. + if ('position' in value || 'type' in value) { + return position(value.position) + } + + // Position. + if ('start' in value || 'end' in value) { + return position(value) + } + + // Point. + if ('line' in value || 'column' in value) { + return point(value) + } + + // ? + return '' +} + +/** + * @param {Point | PointLike | null | undefined} point + * @returns {string} + */ +function point(point) { + return index(point && point.line) + ':' + index(point && point.column) +} + +/** + * @param {Position | PositionLike | null | undefined} pos + * @returns {string} + */ +function position(pos) { + return point(pos && pos.start) + '-' + point(pos && pos.end) +} + +/** + * @param {number | null | undefined} value + * @returns {number} + */ +function index(value) { + return value && typeof value === 'number' ? value : 1 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js +/** + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Value} Value + * + * @typedef {import('unist').Parent} UnistParent + * @typedef {import('unist').Point} Point + * + * @typedef {import('mdast').PhrasingContent} PhrasingContent + * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent + * @typedef {import('mdast').Content} Content + * @typedef {import('mdast').Break} Break + * @typedef {import('mdast').Blockquote} Blockquote + * @typedef {import('mdast').Code} Code + * @typedef {import('mdast').Definition} Definition + * @typedef {import('mdast').Emphasis} Emphasis + * @typedef {import('mdast').Heading} Heading + * @typedef {import('mdast').HTML} HTML + * @typedef {import('mdast').Image} Image + * @typedef {import('mdast').ImageReference} ImageReference + * @typedef {import('mdast').InlineCode} InlineCode + * @typedef {import('mdast').Link} Link + * @typedef {import('mdast').LinkReference} LinkReference + * @typedef {import('mdast').List} List + * @typedef {import('mdast').ListItem} ListItem + * @typedef {import('mdast').Paragraph} Paragraph + * @typedef {import('mdast').Root} Root + * @typedef {import('mdast').Strong} Strong + * @typedef {import('mdast').Text} Text + * @typedef {import('mdast').ThematicBreak} ThematicBreak + * @typedef {import('mdast').ReferenceType} ReferenceType + * @typedef {import('../index.js').CompileData} CompileData + */ + +/** + * @typedef {Root | Content} Node + * @typedef {Extract<Node, UnistParent>} Parent + * + * @typedef {Omit<UnistParent, 'type' | 'children'> & {type: 'fragment', children: Array<PhrasingContent>}} Fragment + */ + +/** + * @callback Transform + * Extra transform, to change the AST afterwards. + * @param {Root} tree + * Tree to transform. + * @returns {Root | undefined | null | void} + * New tree or nothing (in which case the current tree is used). + * + * @callback Handle + * Handle a token. + * @param {CompileContext} this + * Context. + * @param {Token} token + * Current token. + * @returns {void} + * Nothing. + * + * @typedef {Record<string, Handle>} Handles + * Token types mapping to handles + * + * @callback OnEnterError + * Handle the case where the `right` token is open, but it is closed (by the + * `left` token) or because we reached the end of the document. + * @param {Omit<CompileContext, 'sliceSerialize'>} this + * Context. + * @param {Token | undefined} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @callback OnExitError + * Handle the case where the `right` token is open but it is closed by + * exiting the `left` token. + * @param {Omit<CompileContext, 'sliceSerialize'>} this + * Context. + * @param {Token} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @typedef {[Token, OnEnterError | undefined]} TokenTuple + * Open token on the stack, with an optional error handler for when + * that token isn’t closed properly. + */ + +/** + * @typedef Config + * Configuration. + * + * We have our defaults, but extensions will add more. + * @property {Array<string>} canContainEols + * Token types where line endings are used. + * @property {Handles} enter + * Opening handles. + * @property {Handles} exit + * Closing handles. + * @property {Array<Transform>} transforms + * Tree transforms. + * + * @typedef {Partial<Config>} Extension + * Change how markdown tokens from micromark are turned into mdast. + * + * @typedef CompileContext + * mdast compiler context. + * @property {Array<Node | Fragment>} stack + * Stack of nodes. + * @property {Array<TokenTuple>} tokenStack + * Stack of tokens. + * @property {<Key extends keyof CompileData>(key: Key) => CompileData[Key]} getData + * Get data from the key/value store. + * @property {<Key extends keyof CompileData>(key: Key, value?: CompileData[Key]) => void} setData + * Set data into the key/value store. + * @property {(this: CompileContext) => void} buffer + * Capture some of the output data. + * @property {(this: CompileContext) => string} resume + * Stop capturing and access the output data. + * @property {<Kind extends Node>(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter + * Enter a token. + * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit + * Exit a token. + * @property {TokenizeContext['sliceSerialize']} sliceSerialize + * Get the string value of a token. + * @property {Config} config + * Configuration. + * + * @typedef FromMarkdownOptions + * Configuration for how to build mdast. + * @property {Array<Extension | Array<Extension>> | null | undefined} [mdastExtensions] + * Extensions for this utility to change how tokens are turned into a tree. + * + * @typedef {ParseOptions & FromMarkdownOptions} Options + * Configuration. + */ + +// To do: micromark: create a registry of tokens? +// To do: next major: don’t return given `Node` from `enter`. +// To do: next major: remove setter/getter. + + + + + + + + + + +const lib_own = {}.hasOwnProperty + +/** + * @param value + * Markdown to parse. + * @param encoding + * Character encoding for when `value` is `Buffer`. + * @param options + * Configuration. + * @returns + * mdast tree. + */ +const fromMarkdown = + /** + * @type {( + * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & + * ((value: Value, options?: Options | null | undefined) => Root) + * )} + */ + + /** + * @param {Value} value + * @param {Encoding | Options | null | undefined} [encoding] + * @param {Options | null | undefined} [options] + * @returns {Root} + */ + function (value, encoding, options) { + if (typeof encoding !== 'string') { + options = encoding + encoding = undefined + } + return compiler(options)( + postprocess( + parse(options).document().write(preprocess()(value, encoding, true)) + ) + ) + } + +/** + * Note this compiler only understand complete buffering, not streaming. + * + * @param {Options | null | undefined} [options] + */ +function compiler(options) { + /** @type {Config} */ + const config = { + transforms: [], + canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], + enter: { + autolink: opener(link), + autolinkProtocol: onenterdata, + autolinkEmail: onenterdata, + atxHeading: opener(heading), + blockQuote: opener(blockQuote), + characterEscape: onenterdata, + characterReference: onenterdata, + codeFenced: opener(codeFlow), + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: opener(codeFlow, buffer), + codeText: opener(codeText, buffer), + codeTextData: onenterdata, + data: onenterdata, + codeFlowValue: onenterdata, + definition: opener(definition), + definitionDestinationString: buffer, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: opener(emphasis), + hardBreakEscape: opener(hardBreak), + hardBreakTrailing: opener(hardBreak), + htmlFlow: opener(html, buffer), + htmlFlowData: onenterdata, + htmlText: opener(html, buffer), + htmlTextData: onenterdata, + image: opener(image), + label: buffer, + link: opener(link), + listItem: opener(listItem), + listItemValue: onenterlistitemvalue, + listOrdered: opener(list, onenterlistordered), + listUnordered: opener(list), + paragraph: opener(paragraph), + reference: onenterreference, + referenceString: buffer, + resourceDestinationString: buffer, + resourceTitleString: buffer, + setextHeading: opener(heading), + strong: opener(strong), + thematicBreak: opener(thematicBreak) + }, + exit: { + atxHeading: closer(), + atxHeadingSequence: onexitatxheadingsequence, + autolink: closer(), + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: closer(), + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: closer(onexitcodefenced), + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: onexitcodefencedfencemeta, + codeFlowValue: onexitdata, + codeIndented: closer(onexitcodeindented), + codeText: closer(onexitcodetext), + codeTextData: onexitdata, + data: onexitdata, + definition: closer(), + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: closer(), + hardBreakEscape: closer(onexithardbreak), + hardBreakTrailing: closer(onexithardbreak), + htmlFlow: closer(onexithtmlflow), + htmlFlowData: onexitdata, + htmlText: closer(onexithtmltext), + htmlTextData: onexitdata, + image: closer(onexitimage), + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: closer(onexitlink), + listItem: closer(), + listOrdered: closer(), + listUnordered: closer(), + paragraph: closer(), + referenceString: onexitreferencestring, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + resource: onexitresource, + setextHeading: closer(onexitsetextheading), + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: closer(), + thematicBreak: closer() + } + } + configure(config, (options || {}).mdastExtensions || []) + + /** @type {CompileData} */ + const data = {} + return compile + + /** + * Turn micromark events into an mdast tree. + * + * @param {Array<Event>} events + * Events. + * @returns {Root} + * mdast tree. + */ + function compile(events) { + /** @type {Root} */ + let tree = { + type: 'root', + children: [] + } + /** @type {Omit<CompileContext, 'sliceSerialize'>} */ + const context = { + stack: [tree], + tokenStack: [], + config, + enter, + exit, + buffer, + resume, + setData, + getData + } + /** @type {Array<number>} */ + const listStack = [] + let index = -1 + while (++index < events.length) { + // We preprocess lists to add `listItem` tokens, and to infer whether + // items the list itself are spread out. + if ( + events[index][1].type === 'listOrdered' || + events[index][1].type === 'listUnordered' + ) { + if (events[index][0] === 'enter') { + listStack.push(index) + } else { + const tail = listStack.pop() + index = prepareList(events, tail, index) + } + } + } + index = -1 + while (++index < events.length) { + const handler = config[events[index][0]] + if (lib_own.call(handler, events[index][1].type)) { + handler[events[index][1].type].call( + Object.assign( + { + sliceSerialize: events[index][2].sliceSerialize + }, + context + ), + events[index][1] + ) + } + } + + // Handle tokens still being open. + if (context.tokenStack.length > 0) { + const tail = context.tokenStack[context.tokenStack.length - 1] + const handler = tail[1] || defaultOnError + handler.call(context, undefined, tail[0]) + } + + // Figure out `root` position. + tree.position = { + start: lib_point( + events.length > 0 + ? events[0][1].start + : { + line: 1, + column: 1, + offset: 0 + } + ), + end: lib_point( + events.length > 0 + ? events[events.length - 2][1].end + : { + line: 1, + column: 1, + offset: 0 + } + ) + } + + // Call transforms. + index = -1 + while (++index < config.transforms.length) { + tree = config.transforms[index](tree) || tree + } + return tree + } + + /** + * @param {Array<Event>} events + * @param {number} start + * @param {number} length + * @returns {number} + */ + function prepareList(events, start, length) { + let index = start - 1 + let containerBalance = -1 + let listSpread = false + /** @type {Token | undefined} */ + let listItem + /** @type {number | undefined} */ + let lineIndex + /** @type {number | undefined} */ + let firstBlankLineIndex + /** @type {boolean | undefined} */ + let atMarker + while (++index <= length) { + const event = events[index] + if ( + event[1].type === 'listUnordered' || + event[1].type === 'listOrdered' || + event[1].type === 'blockQuote' + ) { + if (event[0] === 'enter') { + containerBalance++ + } else { + containerBalance-- + } + atMarker = undefined + } else if (event[1].type === 'lineEndingBlank') { + if (event[0] === 'enter') { + if ( + listItem && + !atMarker && + !containerBalance && + !firstBlankLineIndex + ) { + firstBlankLineIndex = index + } + atMarker = undefined + } + } else if ( + event[1].type === 'linePrefix' || + event[1].type === 'listItemValue' || + event[1].type === 'listItemMarker' || + event[1].type === 'listItemPrefix' || + event[1].type === 'listItemPrefixWhitespace' + ) { + // Empty. + } else { + atMarker = undefined + } + if ( + (!containerBalance && + event[0] === 'enter' && + event[1].type === 'listItemPrefix') || + (containerBalance === -1 && + event[0] === 'exit' && + (event[1].type === 'listUnordered' || + event[1].type === 'listOrdered')) + ) { + if (listItem) { + let tailIndex = index + lineIndex = undefined + while (tailIndex--) { + const tailEvent = events[tailIndex] + if ( + tailEvent[1].type === 'lineEnding' || + tailEvent[1].type === 'lineEndingBlank' + ) { + if (tailEvent[0] === 'exit') continue + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + listSpread = true + } + tailEvent[1].type = 'lineEnding' + lineIndex = tailIndex + } else if ( + tailEvent[1].type === 'linePrefix' || + tailEvent[1].type === 'blockQuotePrefix' || + tailEvent[1].type === 'blockQuotePrefixWhitespace' || + tailEvent[1].type === 'blockQuoteMarker' || + tailEvent[1].type === 'listItemIndent' + ) { + // Empty + } else { + break + } + } + if ( + firstBlankLineIndex && + (!lineIndex || firstBlankLineIndex < lineIndex) + ) { + listItem._spread = true + } + + // Fix position. + listItem.end = Object.assign( + {}, + lineIndex ? events[lineIndex][1].start : event[1].end + ) + events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) + index++ + length++ + } + + // Create a new list item. + if (event[1].type === 'listItemPrefix') { + listItem = { + type: 'listItem', + _spread: false, + start: Object.assign({}, event[1].start), + // @ts-expect-error: we’ll add `end` in a second. + end: undefined + } + // @ts-expect-error: `listItem` is most definitely defined, TS... + events.splice(index, 0, ['enter', listItem, event[2]]) + index++ + length++ + firstBlankLineIndex = undefined + atMarker = true + } + } + } + events[start][1]._spread = listSpread + return length + } + + /** + * Set data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @param {CompileData[Key]} [value] + * New value. + * @returns {void} + * Nothing. + */ + function setData(key, value) { + data[key] = value + } + + /** + * Get data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @returns {CompileData[Key]} + * Value. + */ + function getData(key) { + return data[key] + } + + /** + * Create an opener handle. + * + * @param {(token: Token) => Node} create + * Create a node. + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function opener(create, and) { + return open + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function open(token) { + enter.call(this, create(token), token) + if (and) and.call(this, token) + } + } + + /** + * @this {CompileContext} + * @returns {void} + */ + function buffer() { + this.stack.push({ + type: 'fragment', + children: [] + }) + } + + /** + * @template {Node} Kind + * Node type. + * @this {CompileContext} + * Context. + * @param {Kind} node + * Node to enter. + * @param {Token} token + * Corresponding token. + * @param {OnEnterError | undefined} [errorHandler] + * Handle the case where this token is open, but it is closed by something else. + * @returns {Kind} + * The given node. + */ + function enter(node, token, errorHandler) { + const parent = this.stack[this.stack.length - 1] + // @ts-expect-error: Assume `Node` can exist as a child of `parent`. + parent.children.push(node) + this.stack.push(node) + this.tokenStack.push([token, errorHandler]) + // @ts-expect-error: `end` will be patched later. + node.position = { + start: lib_point(token.start) + } + return node + } + + /** + * Create a closer handle. + * + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function closer(and) { + return close + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function close(token) { + if (and) and.call(this, token) + exit.call(this, token) + } + } + + /** + * @this {CompileContext} + * Context. + * @param {Token} token + * Corresponding token. + * @param {OnExitError | undefined} [onExitError] + * Handle the case where another token is open. + * @returns {Node} + * The closed node. + */ + function exit(token, onExitError) { + const node = this.stack.pop() + const open = this.tokenStack.pop() + if (!open) { + throw new Error( + 'Cannot close `' + + token.type + + '` (' + + stringifyPosition({ + start: token.start, + end: token.end + }) + + '): it’s not open' + ) + } else if (open[0].type !== token.type) { + if (onExitError) { + onExitError.call(this, token, open[0]) + } else { + const handler = open[1] || defaultOnError + handler.call(this, token, open[0]) + } + } + node.position.end = lib_point(token.end) + return node + } + + /** + * @this {CompileContext} + * @returns {string} + */ + function resume() { + return lib_toString(this.stack.pop()) + } + + // + // Handlers. + // + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistordered() { + setData('expectingFirstListItemValue', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistitemvalue(token) { + if (getData('expectingFirstListItemValue')) { + const ancestor = this.stack[this.stack.length - 2] + ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) + setData('expectingFirstListItemValue') + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfenceinfo() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.lang = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfencemeta() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.meta = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfence() { + // Exit if this is the closing fence. + if (getData('flowCodeInside')) return + this.buffer() + setData('flowCodeInside', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefenced() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') + setData('flowCodeInside') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodeindented() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/(\r?\n|\r)$/g, '') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitionlabelstring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + node.label = label + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiontitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiondestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitatxheadingsequence(token) { + const node = this.stack[this.stack.length - 1] + if (!node.depth) { + const depth = this.sliceSerialize(token).length + node.depth = depth + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadingtext() { + setData('setextHeadingSlurpLineEnding', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadinglinesequence(token) { + const node = this.stack[this.stack.length - 1] + node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheading() { + setData('setextHeadingSlurpLineEnding') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterdata(token) { + const node = this.stack[this.stack.length - 1] + let tail = node.children[node.children.length - 1] + if (!tail || tail.type !== 'text') { + // Add a new text node. + tail = text() + // @ts-expect-error: we’ll add `end` later. + tail.position = { + start: lib_point(token.start) + } + // @ts-expect-error: Assume `parent` accepts `text`. + node.children.push(tail) + } + this.stack.push(tail) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitdata(token) { + const tail = this.stack.pop() + tail.value += this.sliceSerialize(token) + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlineending(token) { + const context = this.stack[this.stack.length - 1] + // If we’re at a hard break, include the line ending in there. + if (getData('atHardBreak')) { + const tail = context.children[context.children.length - 1] + tail.position.end = lib_point(token.end) + setData('atHardBreak') + return + } + if ( + !getData('setextHeadingSlurpLineEnding') && + config.canContainEols.includes(context.type) + ) { + onenterdata.call(this, token) + onexitdata.call(this, token) + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithardbreak() { + setData('atHardBreak', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmlflow() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmltext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcodetext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlink() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitimage() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabeltext(token) { + const string = this.sliceSerialize(token) + const ancestor = this.stack[this.stack.length - 2] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + ancestor.label = decodeString(string) + // @ts-expect-error: same as above. + ancestor.identifier = normalizeIdentifier(string).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabel() { + const fragment = this.stack[this.stack.length - 1] + const value = this.resume() + const node = this.stack[this.stack.length - 1] + // Assume a reference. + setData('inReference', true) + if (node.type === 'link') { + /** @type {Array<StaticPhrasingContent>} */ + // @ts-expect-error: Assume static phrasing content. + const children = fragment.children + node.children = children + } else { + node.alt = value + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcedestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcetitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresource() { + setData('inReference') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterreference() { + setData('referenceType', 'collapsed') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitreferencestring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + node.label = label + // @ts-expect-error: same as above. + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + setData('referenceType', 'full') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcharacterreferencemarker(token) { + setData('characterReferenceType', token.type) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcharacterreferencevalue(token) { + const data = this.sliceSerialize(token) + const type = getData('characterReferenceType') + /** @type {string} */ + let value + if (type) { + value = decodeNumericCharacterReference( + data, + type === 'characterReferenceMarkerNumeric' ? 10 : 16 + ) + setData('characterReferenceType') + } else { + const result = decodeNamedCharacterReference(data) + value = result + } + const tail = this.stack.pop() + tail.value += value + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkprotocol(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = this.sliceSerialize(token) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkemail(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = 'mailto:' + this.sliceSerialize(token) + } + + // + // Creaters. + // + + /** @returns {Blockquote} */ + function blockQuote() { + return { + type: 'blockquote', + children: [] + } + } + + /** @returns {Code} */ + function codeFlow() { + return { + type: 'code', + lang: null, + meta: null, + value: '' + } + } + + /** @returns {InlineCode} */ + function codeText() { + return { + type: 'inlineCode', + value: '' + } + } + + /** @returns {Definition} */ + function definition() { + return { + type: 'definition', + identifier: '', + label: null, + title: null, + url: '' + } + } + + /** @returns {Emphasis} */ + function emphasis() { + return { + type: 'emphasis', + children: [] + } + } + + /** @returns {Heading} */ + function heading() { + // @ts-expect-error `depth` will be set later. + return { + type: 'heading', + depth: undefined, + children: [] + } + } + + /** @returns {Break} */ + function hardBreak() { + return { + type: 'break' + } + } + + /** @returns {HTML} */ + function html() { + return { + type: 'html', + value: '' + } + } + + /** @returns {Image} */ + function image() { + return { + type: 'image', + title: null, + url: '', + alt: null + } + } + + /** @returns {Link} */ + function link() { + return { + type: 'link', + title: null, + url: '', + children: [] + } + } + + /** + * @param {Token} token + * @returns {List} + */ + function list(token) { + return { + type: 'list', + ordered: token.type === 'listOrdered', + start: null, + spread: token._spread, + children: [] + } + } + + /** + * @param {Token} token + * @returns {ListItem} + */ + function listItem(token) { + return { + type: 'listItem', + spread: token._spread, + checked: null, + children: [] + } + } + + /** @returns {Paragraph} */ + function paragraph() { + return { + type: 'paragraph', + children: [] + } + } + + /** @returns {Strong} */ + function strong() { + return { + type: 'strong', + children: [] + } + } + + /** @returns {Text} */ + function text() { + return { + type: 'text', + value: '' + } + } + + /** @returns {ThematicBreak} */ + function thematicBreak() { + return { + type: 'thematicBreak' + } + } +} + +/** + * Copy a point-like value. + * + * @param {Point} d + * Point-like value. + * @returns {Point} + * unist point. + */ +function lib_point(d) { + return { + line: d.line, + column: d.column, + offset: d.offset + } +} + +/** + * @param {Config} combined + * @param {Array<Extension | Array<Extension>>} extensions + * @returns {void} + */ +function configure(combined, extensions) { + let index = -1 + while (++index < extensions.length) { + const value = extensions[index] + if (Array.isArray(value)) { + configure(combined, value) + } else { + extension(combined, value) + } + } +} + +/** + * @param {Config} combined + * @param {Extension} extension + * @returns {void} + */ +function extension(combined, extension) { + /** @type {keyof Extension} */ + let key + for (key in extension) { + if (lib_own.call(extension, key)) { + if (key === 'canContainEols') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'transforms') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'enter' || key === 'exit') { + const right = extension[key] + if (right) { + Object.assign(combined[key], right) + } + } + } + } +} + +/** @type {OnEnterError} */ +function defaultOnError(left, right) { + if (left) { + throw new Error( + 'Cannot close `' + + left.type + + '` (' + + stringifyPosition({ + start: left.start, + end: left.end + }) + + '): a different token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is open' + ) + } else { + throw new Error( + 'Cannot close document, a token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is still open' + ) + } +} + +// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js +var esm = __webpack_require__(513); +;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-6b48ae7d.js + + + +function preprocessMarkdown(markdown) { + const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); + const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); + return withoutExtraSpaces; +} +function markdownToLines(markdown) { + const preprocessedMarkdown = preprocessMarkdown(markdown); + const { children } = fromMarkdown(preprocessedMarkdown); + const lines = [[]]; + let currentLine = 0; + function processNode(node, parentType = "normal") { + if (node.type === "text") { + const textLines = node.value.split("\n"); + textLines.forEach((textLine, index) => { + if (index !== 0) { + currentLine++; + lines.push([]); + } + textLine.split(" ").forEach((word) => { + if (word) { + lines[currentLine].push({ content: word, type: parentType }); + } + }); + }); + } else if (node.type === "strong" || node.type === "emphasis") { + node.children.forEach((contentNode) => { + processNode(contentNode, node.type); + }); + } + } + children.forEach((treeNode) => { + if (treeNode.type === "paragraph") { + treeNode.children.forEach((contentNode) => { + processNode(contentNode); + }); + } + }); + return lines; +} +function markdownToHTML(markdown) { + const { children } = fromMarkdown(markdown); + function output(node) { + if (node.type === "text") { + return node.value.replace(/\n/g, "<br/>"); + } else if (node.type === "strong") { + return `<strong>${node.children.map(output).join("")}</strong>`; + } else if (node.type === "emphasis") { + return `<em>${node.children.map(output).join("")}</em>`; + } else if (node.type === "paragraph") { + return `<p>${node.children.map(output).join("")}</p>`; + } + return `Unsupported markdown: ${node.type}`; + } + return children.map(output).join(""); +} +function splitTextToChars(text) { + if (Intl.Segmenter) { + return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); + } + return [...text]; +} +function splitWordToFitWidth(checkFit, word) { + const characters = splitTextToChars(word.content); + return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); +} +function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { + if (remainingChars.length === 0) { + return [ + { content: usedChars.join(""), type }, + { content: "", type } + ]; + } + const [nextChar, ...rest] = remainingChars; + const newWord = [...usedChars, nextChar]; + if (checkFit([{ content: newWord.join(""), type }])) { + return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); + } + if (usedChars.length === 0 && nextChar) { + usedChars.push(nextChar); + remainingChars.shift(); + } + return [ + { content: usedChars.join(""), type }, + { content: remainingChars.join(""), type } + ]; +} +function splitLineToFitWidth(line, checkFit) { + if (line.some(({ content }) => content.includes("\n"))) { + throw new Error("splitLineToFitWidth does not support newlines in the line"); + } + return splitLineToFitWidthRecursion(line, checkFit); +} +function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { + if (words.length === 0) { + if (newLine.length > 0) { + lines.push(newLine); + } + return lines.length > 0 ? lines : []; + } + let joiner = ""; + if (words[0].content === " ") { + joiner = " "; + words.shift(); + } + const nextWord = words.shift() ?? { content: " ", type: "normal" }; + const lineWithNextWord = [...newLine]; + if (joiner !== "") { + lineWithNextWord.push({ content: joiner, type: "normal" }); + } + lineWithNextWord.push(nextWord); + if (checkFit(lineWithNextWord)) { + return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); + } + if (newLine.length > 0) { + lines.push(newLine); + words.unshift(nextWord); + } else if (nextWord.content) { + const [line, rest] = splitWordToFitWidth(checkFit, nextWord); + lines.push([line]); + if (rest.content) { + words.unshift(rest); + } + } + return splitLineToFitWidthRecursion(words, checkFit, lines); +} +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlSpan(element, node, width, classes, addBackground = false) { + const fo = element.append("foreignObject"); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + ` + <span class="${labelClass} ${classes}" ` + (node.labelStyle ? 'style="' + node.labelStyle + '"' : "") + ">" + label + "</span>" + ); + applyStyle(div, node.labelStyle); + div.style("display", "table-cell"); + div.style("white-space", "nowrap"); + div.style("max-width", width + "px"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + if (addBackground) { + div.attr("class", "labelBkg"); + } + let bbox = div.node().getBoundingClientRect(); + if (bbox.width === width) { + div.style("display", "table"); + div.style("white-space", "break-spaces"); + div.style("width", width + "px"); + bbox = div.node().getBoundingClientRect(); + } + fo.style("width", bbox.width); + fo.style("height", bbox.height); + return fo.node(); +} +function createTspan(textElement, lineIndex, lineHeight) { + return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); +} +function computeWidthOfText(parentNode, lineHeight, line) { + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, line); + const textLength = testSpan.node().getComputedTextLength(); + testElement.remove(); + return textLength; +} +function computeDimensionOfText(parentNode, lineHeight, text) { + var _a; + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); + const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); + if (textDimension) { + testElement.remove(); + } + return textDimension; +} +function createFormattedText(width, g, structuredText, addBackground = false) { + const lineHeight = 1.1; + const labelGroup = g.append("g"); + const bkg = labelGroup.insert("rect").attr("class", "background"); + const textElement = labelGroup.append("text").attr("y", "-10.1"); + let lineIndex = 0; + for (const line of structuredText) { + const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; + const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); + for (const preparedLine of linesUnderWidth) { + const tspan = createTspan(textElement, lineIndex, lineHeight); + updateTextContentAndStyles(tspan, preparedLine); + lineIndex++; + } + } + if (addBackground) { + const bbox = textElement.node().getBBox(); + const padding = 2; + bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); + return labelGroup.node(); + } else { + return textElement.node(); + } +} +function updateTextContentAndStyles(tspan, wrappedLine) { + tspan.text(""); + wrappedLine.forEach((word, index) => { + const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); + if (index === 0) { + innerTspan.text(word.content); + } else { + innerTspan.text(" " + word.content); + } + }); +} +const createText = (el, text = "", { + style = "", + isTitle = false, + classes = "", + useHtmlLabels = true, + isNode = true, + width = 200, + addSvgBackground = false +} = {}) => { + mermaid_f47111a7.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); + if (useHtmlLabels) { + const htmlText = markdownToHTML(text); + const node = { + isNode, + label: (0,mermaid_f47111a7.M)(htmlText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `<i class='${s.replace(":", " ")}'></i>` + ), + labelStyle: style.replace("fill:", "color:") + }; + const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); + return vertexNode; + } else { + const structuredText = markdownToLines(text); + const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); + return svgLabel; + } +}; + + + +/***/ }), + +/***/ 8747: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ a: () => (/* binding */ insertMarkers$1), +/* harmony export */ b: () => (/* binding */ clear$1), +/* harmony export */ c: () => (/* binding */ createLabel$1), +/* harmony export */ d: () => (/* binding */ clear), +/* harmony export */ e: () => (/* binding */ insertNode), +/* harmony export */ f: () => (/* binding */ insertEdgeLabel), +/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins), +/* harmony export */ h: () => (/* binding */ insertEdge), +/* harmony export */ i: () => (/* binding */ intersectRect$1), +/* harmony export */ j: () => (/* binding */ positionEdgeLabel), +/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset), +/* harmony export */ l: () => (/* binding */ labelHelper), +/* harmony export */ m: () => (/* binding */ addEdgeMarkers), +/* harmony export */ p: () => (/* binding */ positionNode), +/* harmony export */ s: () => (/* binding */ setNodeElem), +/* harmony export */ u: () => (/* binding */ updateNodeBounds) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3791); + + + +const insertMarkers = (elem, markerArray, type, id) => { + markerArray.forEach((markerName) => { + markers[markerName](elem, type, id); + }); +}; +const extension = (elem, type, id) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).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"); +}; +const composition = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).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"); +}; +const aggregation = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).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"); +}; +const dependency = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).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"); +}; +const lollipop = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).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); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).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); +}; +const point = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).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"); +}; +const circle$1 = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).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"); +}; +const cross = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).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"); +}; +const barb = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-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"); +}; +const markers = { + extension, + composition, + aggregation, + dependency, + lollipop, + point, + circle: circle$1, + cross, + barb +}; +const insertMarkers$1 = insertMarkers; +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlLabel(node) { + const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + '<span class="' + labelClass + '" ' + (node.labelStyle ? 'style="' + node.labelStyle + '"' : "") + ">" + label + "</span>" + ); + applyStyle(div, node.labelStyle); + div.style("display", "inline-block"); + div.style("white-space", "nowrap"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + return fo.node(); +} +const createLabel = (_vertexText, style, isTitle, isNode) => { + let vertexText = _vertexText || ""; + if (typeof vertexText === "object") { + vertexText = vertexText[0]; + } + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + vertexText = vertexText.replace(/\\n|\n/g, "<br />"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText); + const node = { + isNode, + label: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `<i class='${s.replace(":", " ")}'></i>` + ), + labelStyle: style.replace("fill:", "color:") + }; + let vertexNode = addHtmlLabel(node); + return vertexNode; + } else { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", style.replace("color:", "fill:")); + let rows = []; + if (typeof vertexText === "string") { + rows = vertexText.split(/\\n|\n|<br\s*\/?>/gi); + } else if (Array.isArray(vertexText)) { + rows = vertexText; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + if (isTitle) { + tspan.setAttribute("class", "title-row"); + } else { + tspan.setAttribute("class", "row"); + } + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; + } +}; +const createLabel$1 = createLabel; +const labelHelper = async (parent, node, _classes, isNode) => { + let classes; + const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); + if (!_classes) { + classes = "node default"; + } else { + classes = _classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); + let labelText; + if (node.labelText === void 0) { + labelText = ""; + } else { + labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; + } + const textNode = label.node(); + let text; + if (node.labelType === "markdown") { + text = (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), { + useHtmlLabels, + width: node.width || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth, + classes: "markdown-node-label" + }); + } else { + text = textNode.appendChild( + createLabel$1( + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), + node.labelStyle, + false, + isNode + ) + ); + } + let bbox = text.getBBox(); + const halfPadding = node.padding / 2; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); + const images = div.getElementsByTagName("img"); + if (images) { + const noImgText = labelText.replace(/<img[^>]*>/g, "").trim() === ""; + await Promise.all( + [...images].map( + (img) => new Promise((res) => { + function setupImage() { + img.style.display = "flex"; + img.style.flexDirection = "column"; + if (noImgText) { + const bodyFontSize = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize; + const enlargingFactor = 5; + const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; + img.style.minWidth = width; + img.style.maxWidth = width; + } else { + img.style.width = "100%"; + } + res(img); + } + setTimeout(() => { + if (img.complete) { + setupImage(); + } + }); + img.addEventListener("error", setupImage); + img.addEventListener("load", setupImage); + }) + ) + ); + } + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (useHtmlLabels) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } else { + label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); + } + if (node.centerLabel) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } + label.insert("rect", ":first-child"); + return { shapeSvg, bbox, halfPadding, label }; +}; +const updateNodeBounds = (node, element) => { + const bbox = element.node().getBBox(); + node.width = bbox.width; + node.height = bbox.height; +}; +function insertPolygonShape(parent, w, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); +} +function intersectNode(node, point2) { + return node.intersect(point2); +} +function intersectEllipse(node, rx, ry, point2) { + var cx = node.x; + var cy = node.y; + var px = cx - point2.x; + var py = cy - point2.y; + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + var dx = Math.abs(rx * ry * px / det); + if (point2.x < cx) { + dx = -dx; + } + var dy = Math.abs(rx * ry * py / det); + if (point2.y < cy) { + dy = -dy; + } + return { x: cx + dx, y: cy + dy }; +} +function intersectCircle(node, rx, point2) { + return intersectEllipse(node, rx, rx, point2); +} +function intersectLine(p1, p2, q1, q2) { + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x, y; + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; + if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { + return; + } + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; + if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { + return; + } + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return; + } + offset = Math.abs(denom / 2); + num = b1 * c2 - b2 * c1; + x = num < 0 ? (num - offset) / denom : (num + offset) / denom; + num = a2 * c1 - a1 * c2; + y = num < 0 ? (num - offset) / denom : (num + offset) / denom; + return { x, y }; +} +function sameSign(r1, r2) { + return r1 * r2 > 0; +} +function intersectPolygon(node, polyPoints, point2) { + var x1 = node.x; + var y1 = node.y; + var intersections = []; + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + if (typeof polyPoints.forEach === "function") { + polyPoints.forEach(function(entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + } else { + minX = Math.min(minX, polyPoints.x); + minY = Math.min(minY, polyPoints.y); + } + var left = x1 - node.width / 2 - minX; + var top = y1 - node.height / 2 - minY; + for (var i = 0; i < polyPoints.length; i++) { + var p1 = polyPoints[i]; + var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; + var intersect2 = intersectLine( + node, + point2, + { x: left + p1.x, y: top + p1.y }, + { x: left + p2.x, y: top + p2.y } + ); + if (intersect2) { + intersections.push(intersect2); + } + } + if (!intersections.length) { + return node; + } + if (intersections.length > 1) { + intersections.sort(function(p, q) { + var pdx = p.x - point2.x; + var pdy = p.y - point2.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + var qdx = q.x - point2.x; + var qdy = q.y - point2.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); + } + return intersections[0]; +} +const intersectRect = (node, point2) => { + var x = node.x; + var y = node.y; + var dx = point2.x - x; + var dy = point2.y - y; + var w = node.width / 2; + var h = node.height / 2; + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w = -w; + } + sx = w; + sy = dx === 0 ? 0 : w * dy / dx; + } + return { x: x + sx, y: y + sy }; +}; +const intersectRect$1 = intersectRect; +const intersect = { + node: intersectNode, + circle: intersectCircle, + ellipse: intersectEllipse, + polygon: intersectPolygon, + rect: intersectRect$1 +}; +const note = async (parent, node) => { + const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels; + if (!useHtmlLabels) { + node.centerLabel = true; + } + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes); + const rect2 = shapeSvg.insert("rect", ":first-child"); + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const note$1 = note; +const expandAndDeduplicateDirections = (directions) => { + const uniqueDirections = /* @__PURE__ */ new Set(); + for (const direction of directions) { + switch (direction) { + case "x": + uniqueDirections.add("right"); + uniqueDirections.add("left"); + break; + case "y": + uniqueDirections.add("up"); + uniqueDirections.add("down"); + break; + default: + uniqueDirections.add(direction); + break; + } + } + return uniqueDirections; +}; +const getArrowPoints = (duplicatedDirections, bbox, node) => { + const directions = expandAndDeduplicateDirections(duplicatedDirections); + const f = 2; + const height = bbox.height + 2 * node.padding; + const midpoint = height / f; + const width = bbox.width + 2 * midpoint + node.padding; + const padding = node.padding / 2; + if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) { + return [ + // Bottom + { x: 0, y: 0 }, + { x: midpoint, y: 0 }, + { x: width / 2, y: 2 * padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: 0 }, + // Right + { x: width, y: -height / 3 }, + { x: width + 2 * padding, y: -height / 2 }, + { x: width, y: -2 * height / 3 }, + { x: width, y: -height }, + // Top + { x: width - midpoint, y: -height }, + { x: width / 2, y: -height - 2 * padding }, + { x: midpoint, y: -height }, + // Left + { x: 0, y: -height }, + { x: 0, y: -2 * height / 3 }, + { x: -2 * padding, y: -height / 2 }, + { x: 0, y: -height / 3 } + ]; + } + if (directions.has("right") && directions.has("left") && directions.has("up")) { + return [ + { x: midpoint, y: 0 }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("right") && directions.has("left") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: midpoint, y: -height }, + { x: width - midpoint, y: -height }, + { x: width, y: 0 } + ]; + } + if (directions.has("right") && directions.has("up") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: width, y: -midpoint }, + { x: width, y: -height + midpoint }, + { x: 0, y: -height } + ]; + } + if (directions.has("left") && directions.has("up") && directions.has("down")) { + return [ + { x: width, y: 0 }, + { x: 0, y: -midpoint }, + { x: 0, y: -height + midpoint }, + { x: width, y: -height } + ]; + } + if (directions.has("right") && directions.has("left")) { + return [ + { x: midpoint, y: 0 }, + { x: midpoint, y: -padding }, + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: width - midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("up") && directions.has("down")) { + return [ + // Bottom center + { x: width / 2, y: 0 }, + // Left pont of bottom arrow + { x: 0, y: -padding }, + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: 0, y: -height + padding }, + // Top of arrow + { x: width / 2, y: -height }, + { x: width, y: -height + padding }, + // Top of right vertical bar + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding }, + { x: width, y: -padding } + ]; + } + if (directions.has("right") && directions.has("up")) { + return [ + { x: 0, y: 0 }, + { x: width, y: -midpoint }, + { x: 0, y: -height } + ]; + } + if (directions.has("right") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: width, y: 0 }, + { x: 0, y: -height } + ]; + } + if (directions.has("left") && directions.has("up")) { + return [ + { x: width, y: 0 }, + { x: 0, y: -midpoint }, + { x: width, y: -height } + ]; + } + if (directions.has("left") && directions.has("down")) { + return [ + { x: width, y: 0 }, + { x: 0, y: 0 }, + { x: width, y: -height } + ]; + } + if (directions.has("right")) { + return [ + { x: midpoint, y: -padding }, + { x: midpoint, y: -padding }, + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: width - midpoint, y: -height + padding }, + // top left corner of arrow + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding } + ]; + } + if (directions.has("left")) { + return [ + { x: midpoint, y: 0 }, + { x: midpoint, y: -padding }, + // Two points, the right corners + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("up")) { + return [ + // Bottom center + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: 0, y: -height + padding }, + // Top of arrow + { x: width / 2, y: -height }, + { x: width, y: -height + padding }, + // Top of right vertical bar + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding } + ]; + } + if (directions.has("down")) { + return [ + // Bottom center + { x: width / 2, y: 0 }, + // Left pont of bottom arrow + { x: 0, y: -padding }, + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding }, + { x: width, y: -padding } + ]; + } + return [{ x: 0, y: 0 }]; +}; +const formatClass = (str) => { + if (str) { + return " " + str; + } + return ""; +}; +const getClassesFromNode = (node, otherClasses) => { + return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( + node.class + )}`; +}; +const question = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const s = w + h; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)"); + const questionElem = insertPolygonShape(shapeSvg, s, s, points); + questionElem.attr("style", node.style); + updateNodeBounds(node, questionElem); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called"); + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const choice = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const s = 28; + const points = [ + { x: 0, y: s / 2 }, + { x: s / 2, y: 0 }, + { x: 0, y: -s / 2 }, + { x: -s / 2, y: 0 } + ]; + const choice2 = shapeSvg.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ); + choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); + node.width = 28; + node.height = 28; + node.intersect = function(point2) { + return intersect.circle(node, 14, point2); + }; + return shapeSvg; +}; +const hexagon = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const f = 4; + const h = bbox.height + node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const hex = insertPolygonShape(shapeSvg, w, h, points); + hex.attr("style", node.style); + updateNodeBounds(node, hex); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const block_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true); + const f = 2; + const h = bbox.height + 2 * node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = getArrowPoints(node.directions, bbox, node); + const blockArrow = insertPolygonShape(shapeSvg, w, h, points); + blockArrow.attr("style", node.style); + updateNodeBounds(node, blockArrow); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_left_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -h / 2, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + node.width = w + h; + node.height = h; + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_right = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_left = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w + h / 6, y: 0 }, + { x: w - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w + 2 * h / 6, y: 0 }, + { x: w - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const inv_trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_right_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w + h / 2, y: 0 }, + { x: w, y: -h / 2 }, + { x: w + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const cylinder = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const rx = w / 2; + const ry = rx / (2.5 + w / 50); + const h = bbox.height + ry + node.padding; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; + const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); + updateNodeBounds(node, el); + node.intersect = function(point2) { + const pos = intersect.rect(node, point2); + const x = pos.x - node.x; + if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { + let y = ry * ry * (1 - x * x / (rx * rx)); + if (y != 0) { + y = Math.sqrt(y); + } + y = ry - y; + if (point2.y - node.y > 0) { + y = -y; + } + pos.y += y; + } + return pos; + }; + return shapeSvg; +}; +const rect = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes + " " + node.class, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = node.positioned ? node.width : bbox.width + node.padding; + const totalHeight = node.positioned ? node.height : bbox.height + node.padding; + const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; + const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; + rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const composite = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = node.positioned ? node.width : bbox.width + node.padding; + const totalHeight = node.positioned ? node.height : bbox.height + node.padding; + const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; + const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; + rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const labelRect = async (parent, node) => { + const { shapeSvg } = await labelHelper(parent, node, "label", true); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = 0; + const totalHeight = 0; + rect2.attr("width", totalWidth).attr("height", totalHeight); + shapeSvg.attr("class", "label edgeLabel"); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { + const strokeDashArray = []; + const addBorder = (length) => { + strokeDashArray.push(length, 0); + }; + const skipBorder = (length) => { + strokeDashArray.push(0, length); + }; + if (borders.includes("t")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("r")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + if (borders.includes("b")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("l")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); +} +const rectWithTitle = (parent, node) => { + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const innerLine = shapeSvg.insert("line"); + const label = shapeSvg.insert("g").attr("class", "label"); + const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; + let title = ""; + if (typeof text2 === "object") { + title = text2[0]; + } else { + title = text2; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object"); + const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); + let bbox = { width: 0, height: 0 }; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2); + const textRows = text2.slice(1, text2.length); + let titleBox = text.getBBox(); + const descr = label.node().appendChild( + createLabel$1(textRows.join ? textRows.join("<br/>") : textRows, node.labelStyle, true, true) + ); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = descr.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const halfPadding = node.padding / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" + ); + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" + ); + bbox = label.node().getBBox(); + label.attr( + "transform", + "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" + ); + rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const stadium = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const h = bbox.height + node.padding; + const w = bbox.width + h / 4 + node.padding; + const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const circle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main"); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding, point2); + }; + return shapeSvg; +}; +const doublecircle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const gap = 5; + const circleGroup = shapeSvg.insert("g", ":first-child"); + const outerCircle = circleGroup.insert("circle"); + const innerCircle = circleGroup.insert("circle"); + circleGroup.attr("class", node.class); + outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); + innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main"); + updateNodeBounds(node, outerCircle); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); + }; + return shapeSvg; +}; +const subroutine = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w + 8, y: 0 }, + { x: w + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const start = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const forkJoin = (parent, node, dir) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + let width = 70; + let height = 10; + if (dir === "LR") { + width = 10; + height = 70; + } + const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); + updateNodeBounds(node, shape); + node.height = node.height + node.padding / 2; + node.width = node.width + node.padding / 2; + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const end = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const innerCircle = shapeSvg.insert("circle", ":first-child"); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const class_box = (parent, node) => { + const halfPadding = node.padding / 2; + const rowPadding = 4; + const lineHeight = 8; + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const topLine = shapeSvg.insert("line"); + const bottomLine = shapeSvg.insert("line"); + let maxWidth = 0; + let maxHeight = rowPadding; + const labelContainer = shapeSvg.insert("g").attr("class", "label"); + let verticalPos = 0; + const hasInterface = node.classData.annotations && node.classData.annotations[0]; + const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; + const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); + let interfaceBBox = interfaceLabel.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = interfaceLabel.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel); + interfaceBBox = div.getBoundingClientRect(); + dv.attr("width", interfaceBBox.width); + dv.attr("height", interfaceBBox.height); + } + if (node.classData.annotations[0]) { + maxHeight += interfaceBBox.height + rowPadding; + maxWidth += interfaceBBox.width; + } + let classTitleString = node.classData.label; + if (node.classData.type !== void 0 && node.classData.type !== "") { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + classTitleString += "<" + node.classData.type + ">"; + } else { + classTitleString += "<" + node.classData.type + ">"; + } + } + const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle"); + let classTitleBBox = classTitleLabel.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = classTitleLabel.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel); + classTitleBBox = div.getBoundingClientRect(); + dv.attr("width", classTitleBBox.width); + dv.attr("height", classTitleBBox.height); + } + maxHeight += classTitleBBox.height + rowPadding; + if (classTitleBBox.width > maxWidth) { + maxWidth = classTitleBBox.width; + } + const classAttributes = []; + node.classData.members.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let parsedText = parsedInfo.displayText; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + parsedText = parsedText.replace(/</g, "<").replace(/>/g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + parsedText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classAttributes.push(lbl); + }); + maxHeight += lineHeight; + const classMethods = []; + node.classData.methods.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let displayText = parsedInfo.displayText; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + displayText = displayText.replace(/</g, "<").replace(/>/g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + displayText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classMethods.push(lbl); + }); + maxHeight += lineHeight; + if (hasInterface) { + let diffX2 = (maxWidth - interfaceBBox.width) / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" + ); + verticalPos = interfaceBBox.height + rowPadding; + } + let diffX = (maxWidth - classTitleBBox.width) / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + verticalPos += classTitleBBox.height + rowPadding; + topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classAttributes.forEach((lbl) => { + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + verticalPos += lineHeight; + bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classMethods.forEach((lbl) => { + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const shapes = { + rhombus: question, + composite, + question, + rect, + labelRect, + rectWithTitle, + choice, + circle, + doublecircle, + stadium, + hexagon, + block_arrow, + rect_left_inv_arrow, + lean_right, + lean_left, + trapezoid, + inv_trapezoid, + rect_right_inv_arrow, + cylinder, + start, + end, + note: note$1, + subroutine, + fork: forkJoin, + join: forkJoin, + class_box +}; +let nodeElems = {}; +const insertNode = async (elem, node, dir) => { + let newEl; + let el; + if (node.link) { + let target; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") { + target = "_top"; + } else if (node.linkTarget) { + target = node.linkTarget || "_blank"; + } + newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); + el = await shapes[node.shape](newEl, node, dir); + } else { + el = await shapes[node.shape](elem, node, dir); + newEl = el; + } + if (node.tooltip) { + el.attr("title", node.tooltip); + } + if (node.class) { + el.attr("class", "node default " + node.class); + } + newEl.attr("data-node", "true"); + newEl.attr("data-id", node.id); + nodeElems[node.id] = newEl; + if (node.haveCallback) { + nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); + } + return newEl; +}; +const setNodeElem = (elem, node) => { + nodeElems[node.id] = elem; +}; +const clear$1 = () => { + nodeElems = {}; +}; +const positionNode = (node) => { + const el = nodeElems[node.id]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace( + "Transforming node", + node.diff, + node, + "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" + ); + const padding = 8; + const diff = node.diff || 0; + if (node.clusterNode) { + el.attr( + "transform", + "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" + ); + } else { + el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); + } + return diff; +}; +const getSubGraphTitleMargins = ({ + flowchart +}) => { + var _a, _b; + const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0; + const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0; + const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; + return { + subGraphTitleTopMargin, + subGraphTitleBottomMargin, + subGraphTitleTotalMargin + }; +}; +const markerOffsets = { + aggregation: 18, + extension: 18, + composition: 18, + dependency: 6, + lollipop: 13.5, + arrow_point: 5.3 +}; +function calculateDeltaAndAngle(point1, point2) { + if (point1 === void 0 || point2 === void 0) { + return { angle: 0, deltaX: 0, deltaY: 0 }; + } + point1 = pointTransformer(point1); + point2 = pointTransformer(point2); + const [x1, y1] = [point1.x, point1.y]; + const [x2, y2] = [point2.x, point2.y]; + const deltaX = x2 - x1; + const deltaY = y2 - y1; + return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; +} +const pointTransformer = (data) => { + if (Array.isArray(data)) { + return { x: data[0], y: data[1] }; + } + return data; +}; +const getLineFunctionsWithOffset = (edge) => { + return { + x: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaX } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } + return pointTransformer(d).x + offset; + }, + y: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaY } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } + return pointTransformer(d).y + offset; + } + }; +}; +const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => { + if (edge.arrowTypeStart) { + addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType); + } + if (edge.arrowTypeEnd) { + addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType); + } +}; +const arrowTypesMap = { + arrow_cross: "cross", + arrow_point: "point", + arrow_barb: "barb", + arrow_circle: "circle", + aggregation: "aggregation", + extension: "extension", + composition: "composition", + dependency: "dependency", + lollipop: "lollipop" +}; +const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => { + const endMarkerType = arrowTypesMap[arrowType]; + if (!endMarkerType) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`); + return; + } + const suffix = position === "start" ? "Start" : "End"; + svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`); +}; +let edgeLabels = {}; +let terminalLabels = {}; +const clear = () => { + edgeLabels = {}; + terminalLabels = {}; +}; +const insertEdgeLabel = (elem, edge) => { + const useHtmlLabels = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); + const labelElement = edge.labelType === "markdown" ? (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, { + style: edge.labelStyle, + useHtmlLabels, + addSvgBackground: true + }) : createLabel$1(edge.label, edge.labelStyle); + const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); + const label = edgeLabel.insert("g").attr("class", "label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + if (useHtmlLabels) { + const div = labelElement.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + edgeLabels[edge.id] = edgeLabel; + edge.width = bbox.width; + edge.height = bbox.height; + let fo; + if (edge.startLabelLeft) { + const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); + const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startLeft = startEdgeLabelLeft; + setTerminalWidth(fo, edge.startLabelLeft); + } + if (edge.startLabelRight) { + const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); + const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); + fo = startEdgeLabelRight.node().appendChild(startLabelElement); + inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startRight = startEdgeLabelRight; + setTerminalWidth(fo, edge.startLabelRight); + } + if (edge.endLabelLeft) { + const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); + const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelLeft.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endLeft = endEdgeLabelLeft; + setTerminalWidth(fo, edge.endLabelLeft); + } + if (edge.endLabelRight) { + const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); + const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelRight.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endRight = endEdgeLabelRight; + setTerminalWidth(fo, edge.endLabelRight); + } + return labelElement; +}; +function setTerminalWidth(fo, value) { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) { + fo.style.width = value.length * 9 + "px"; + fo.style.height = "12px"; + } +} +const positionEdgeLabel = (edge, paths) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths); + let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig); + if (edge.label) { + const el = edgeLabels[edge.id]; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug( + "Moving label " + edge.label + " from (", + x, + ",", + y, + ") to (", + pos.x, + ",", + pos.y, + ") abc88" + ); + if (paths.updatedPath) { + x = pos.x; + y = pos.y; + } + } + el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`); + } + if (edge.startLabelLeft) { + const el = terminalLabels[edge.id].startLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.startLabelRight) { + const el = terminalLabels[edge.id].startRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition( + edge.arrowTypeStart ? 10 : 0, + "start_right", + path + ); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.endLabelLeft) { + const el = terminalLabels[edge.id].endLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.endLabelRight) { + const el = terminalLabels[edge.id].endRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } +}; +const outsideNode = (node, point2) => { + const x = node.x; + const y = node.y; + const dx = Math.abs(point2.x - x); + const dy = Math.abs(point2.y - y); + const w = node.width / 2; + const h = node.height / 2; + if (dx >= w || dy >= h) { + return true; + } + return false; +}; +const intersection = (node, outsidePoint, insidePoint) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(outsidePoint)} + insidePoint : ${JSON.stringify(insidePoint)} + node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); + const x = node.x; + const y = node.y; + const dx = Math.abs(x - insidePoint.x); + const w = node.width / 2; + let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; + const h = node.height / 2; + const Q = Math.abs(outsidePoint.y - insidePoint.y); + const R = Math.abs(outsidePoint.x - insidePoint.x); + if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { + let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; + r = R * q / Q; + const res = { + x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, + y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q + }; + if (r === 0) { + res.x = outsidePoint.x; + res.y = outsidePoint.y; + } + if (R === 0) { + res.x = outsidePoint.x; + } + if (Q === 0) { + res.y = outsidePoint.y; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); + return res; + } else { + if (insidePoint.x < outsidePoint.x) { + r = outsidePoint.x - w - x; + } else { + r = x - w - outsidePoint.x; + } + let q = Q * r / R; + let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; + let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); + if (r === 0) { + _x = outsidePoint.x; + _y = outsidePoint.y; + } + if (R === 0) { + _x = outsidePoint.x; + } + if (Q === 0) { + _y = outsidePoint.y; + } + return { x: _x, y: _y }; + } +}; +const cutPathAtIntersect = (_points, boundaryNode) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode); + let points = []; + let lastPointOutside = _points[0]; + let isInside = false; + _points.forEach((point2) => { + if (!outsideNode(boundaryNode, point2) && !isInside) { + const inter = intersection(boundaryNode, lastPointOutside, point2); + let pointPresent = false; + points.forEach((p) => { + pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; + }); + if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { + points.push(inter); + } + isInside = true; + } else { + lastPointOutside = point2; + if (!isInside) { + points.push(point2); + } + } + }); + return points; +}; +const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { + let points = edge.points; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e); + let pointsHasChanged = false; + const tail = graph.node(e.v); + var head = graph.node(e.w); + if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) { + points = points.slice(1, edge.points.length - 1); + points.unshift(tail.intersect(points[0])); + points.push(head.intersect(points[points.length - 1])); + } + if (edge.toCluster) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]); + points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); + pointsHasChanged = true; + } + if (edge.fromCluster) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]); + points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); + pointsHasChanged = true; + } + const lineData = points.filter((p) => !Number.isNaN(p.y)); + let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM; + if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { + curve = edge.curve; + } + const { x, y } = getLineFunctionsWithOffset(edge); + const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve); + let strokeClasses; + switch (edge.thickness) { + case "normal": + strokeClasses = "edge-thickness-normal"; + break; + case "thick": + strokeClasses = "edge-thickness-thick"; + break; + case "invisible": + strokeClasses = "edge-thickness-thick"; + break; + default: + strokeClasses = ""; + } + switch (edge.pattern) { + case "solid": + strokeClasses += " edge-pattern-solid"; + break; + case "dotted": + strokeClasses += " edge-pattern-dotted"; + break; + case "dashed": + strokeClasses += " edge-pattern-dashed"; + break; + } + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); + let url = ""; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + addEdgeMarkers(svgPath, edge, url, id, diagramType); + let paths = {}; + if (pointsHasChanged) { + paths.updatedPath = points; + } + paths.originalPath = edge.points; + return paths; +}; + + + +/***/ }), + +/***/ 2746: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ r: () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1176); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4075); +/* harmony import */ var _edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8747); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); +/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3791); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6312); + + + + + + + +let clusterDb = {}; +let descendants = {}; +let parents = {}; +const clear$1 = () => { + descendants = {}; + parents = {}; + clusterDb = {}; +}; +const isDescendant = (id, ancestorId) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("In isDescendant", ancestorId, " ", id, " = ", descendants[ancestorId].includes(id)); + if (descendants[ancestorId].includes(id)) { + return true; + } + return false; +}; +const edgeInCluster = (edge, clusterId) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Descendants of ", clusterId, " is ", descendants[clusterId]); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge is ", edge); + if (edge.v === clusterId) { + return false; + } + if (edge.w === clusterId) { + return false; + } + if (!descendants[clusterId]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Tilt, ", clusterId, ",not in descendants"); + return false; + } + return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w); +}; +const copy = (clusterId, graph, newGraph, rootId) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Copying children of ", + clusterId, + "root", + rootId, + "data", + graph.node(clusterId), + rootId + ); + const nodes = graph.children(clusterId) || []; + if (clusterId !== rootId) { + nodes.push(clusterId); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes); + nodes.forEach((node) => { + if (graph.children(node).length > 0) { + copy(node, graph, newGraph, rootId); + } else { + const data = graph.node(node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("cp ", node, " to ", rootId, " with parent ", clusterId); + newGraph.setNode(node, data); + if (rootId !== graph.parent(node)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Setting parent", node, graph.parent(node)); + newGraph.setParent(node, graph.parent(node)); + } + if (clusterId !== rootId && node !== clusterId) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Setting parent", node, clusterId); + newGraph.setParent(node, clusterId); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( + "Not Setting parent for node=", + node, + "cluster!==rootId", + clusterId !== rootId, + "node!==clusterId", + node !== clusterId + ); + } + const edges = graph.edges(node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Copying Edges", edges); + edges.forEach((edge) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge", edge); + const data2 = graph.edge(edge.v, edge.w, edge.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge data", data2, rootId); + try { + if (edgeInCluster(edge, rootId)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Copying as ", edge.v, edge.w, data2, edge.name); + newGraph.setEdge(edge.v, edge.w, data2, edge.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0])); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info( + "Skipping copy of edge ", + edge.v, + "-->", + edge.w, + " rootId: ", + rootId, + " clusterId:", + clusterId + ); + } + } catch (e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error(e); + } + }); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Removing node", node); + graph.removeNode(node); + }); +}; +const extractDescendants = (id, graph) => { + const children = graph.children(id); + let res = [...children]; + for (const child of children) { + parents[child] = id; + res = [...res, ...extractDescendants(child, graph)]; + } + return res; +}; +const findNonClusterChild = (id, graph) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching", id); + const children = graph.children(id); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching children of id ", id, children); + if (children.length < 1) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("This is a valid node", id); + return id; + } + for (const child of children) { + const _id = findNonClusterChild(child, graph); + if (_id) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Found replacement for", id, " => ", _id); + return _id; + } + } +}; +const getAnchorId = (id) => { + if (!clusterDb[id]) { + return id; + } + if (!clusterDb[id].externalConnections) { + return id; + } + if (clusterDb[id]) { + return clusterDb[id].id; + } + return id; +}; +const adjustClustersAndEdges = (graph, depth) => { + if (!graph || depth > 10) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting out, no graph "); + return; + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting in, graph "); + } + graph.nodes().forEach(function(id) { + const children = graph.children(id); + if (children.length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Cluster identified", + id, + " Replacement id in edges: ", + findNonClusterChild(id, graph) + ); + descendants[id] = extractDescendants(id, graph); + clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) }; + } + }); + graph.nodes().forEach(function(id) { + const children = graph.children(id); + const edges = graph.edges(); + if (children.length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Cluster identified", id, descendants); + edges.forEach((edge) => { + if (edge.v !== id && edge.w !== id) { + const d1 = isDescendant(edge.v, id); + const d2 = isDescendant(edge.w, id); + if (d1 ^ d2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge: ", edge, " leaves cluster ", id); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Descendants of XXX ", id, ": ", descendants[id]); + clusterDb[id].externalConnections = true; + } + } + }); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster ", id, descendants); + } + }); + for (let id of Object.keys(clusterDb)) { + const nonClusterChild = clusterDb[id].id; + const parent = graph.parent(nonClusterChild); + if (parent !== id && clusterDb[parent] && !clusterDb[parent].externalConnections) { + clusterDb[id].id = parent; + } + } + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); + let v = e.v; + let w = e.w; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Fix XXX", + clusterDb, + "ids:", + e.v, + e.w, + "Translating: ", + clusterDb[e.v], + " --- ", + clusterDb[e.w] + ); + if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + const specialId = e.w + "---" + e.v; + graph.setNode(specialId, { + domId: specialId, + id: specialId, + labelStyle: "", + labelText: edge.label, + padding: 0, + shape: "labelRect", + style: "" + }); + const edge1 = structuredClone(edge); + const edge2 = structuredClone(edge); + edge1.label = ""; + edge1.arrowTypeEnd = "none"; + edge2.label = ""; + edge1.fromCluster = e.v; + edge2.toCluster = e.v; + graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special"); + graph.setEdge(specialId, w, edge2, e.name + "-cyclic-special"); + } else if (clusterDb[e.v] || clusterDb[e.w]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + if (v !== e.v) { + const parent = graph.parent(v); + clusterDb[parent].externalConnections = true; + edge.fromCluster = e.v; + } + if (w !== e.w) { + const parent = graph.parent(w); + clusterDb[parent].externalConnections = true; + edge.toCluster = e.w; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fix Replacing with XXX", v, w, e.name); + graph.setEdge(v, w, edge, e.name); + } + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Adjusted Graph", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + extractor(graph, 0); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace(clusterDb); +}; +const extractor = (graph, depth) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("extractor - ", depth, dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), graph.children("D")); + if (depth > 10) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error("Bailing out"); + return; + } + let nodes = graph.nodes(); + let hasChildren = false; + for (const node of nodes) { + const children = graph.children(node); + hasChildren = hasChildren || children.length > 0; + } + if (!hasChildren) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Done, no node has children", graph.nodes()); + return; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Nodes = ", nodes, depth); + for (const node of nodes) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( + "Extracting node", + node, + clusterDb, + clusterDb[node] && !clusterDb[node].externalConnections, + !graph.parent(node), + graph.node(node), + graph.children("D"), + " Depth ", + depth + ); + if (!clusterDb[node]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster", node, depth); + } else if (!clusterDb[node].externalConnections && // !graph.parent(node) && + graph.children(node) && graph.children(node).length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Cluster without external connections, without a parent and with children", + node, + depth + ); + const graphSettings = graph.graph(); + let dir = graphSettings.rankdir === "TB" ? "LR" : "TB"; + if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) { + dir = clusterDb[node].clusterData.dir; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing dir", clusterDb[node].clusterData.dir, dir); + } + const clusterGraph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + // Todo: set proper spacing + nodesep: 50, + ranksep: 50, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Old graph before copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + copy(node, graph, clusterGraph, node); + graph.setNode(node, { + clusterNode: true, + id: node, + clusterData: clusterDb[node].clusterData, + labelText: clusterDb[node].labelText, + graph: clusterGraph + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New graph after copy node: (", node, ")", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(clusterGraph)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Old graph after copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Cluster ** ", + node, + " **not meeting the criteria !externalConnections:", + !clusterDb[node].externalConnections, + " no parent: ", + !graph.parent(node), + " children ", + graph.children(node) && graph.children(node).length > 0, + graph.children("D"), + depth + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(clusterDb); + } + } + nodes = graph.nodes(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New list of nodes", nodes); + for (const node of nodes) { + const data = graph.node(node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(" Now next level", node, data); + if (data.clusterNode) { + extractor(data.graph, depth + 1); + } + } +}; +const sorter = (graph, nodes) => { + if (nodes.length === 0) { + return []; + } + let result = Object.assign(nodes); + nodes.forEach((node) => { + const children = graph.children(node); + const sorted = sorter(graph, children); + result = [...result, ...sorted]; + }); + return result; +}; +const sortNodesByHierarchy = (graph) => sorter(graph, graph.children()); +const rect = (parent, node) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Creating subgraph rect for ", node.id, node); + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + const shapeSvg = parent.insert("g").attr("class", "cluster" + (node.class ? " " + node.class : "")).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const useHtmlLabels = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const text = node.labelType === "markdown" ? (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_5__.a)(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild((0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); + let bbox = text.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const padding = 0 * node.padding; + const halfPadding = padding / 2; + const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width; + if (node.width <= bbox.width + padding) { + node.diff = (bbox.width - node.width) / 2 - node.padding / 2; + } else { + node.diff = -node.padding / 2; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Data ", node, JSON.stringify(node)); + rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding); + const { subGraphTitleTopMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); + if (useHtmlLabels) { + label.attr( + "transform", + // This puts the label on top of the box instead of inside it + `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` + ); + } else { + label.attr( + "transform", + // This puts the label on top of the box instead of inside it + `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` + ); + } + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const noteGroup = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", node.width + padding).attr("height", node.height + padding).attr("fill", "none"); + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const roundedWithTitle = (parent, node) => { + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const innerRect = shapeSvg.append("rect"); + const text = label.node().appendChild((0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); + let bbox = text.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + bbox = text.getBBox(); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width; + if (node.width <= bbox.width + node.padding) { + node.diff = (bbox.width + node.padding * 0 - node.width) / 2; + } else { + node.diff = -node.padding / 2; + } + rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding); + innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3); + const { subGraphTitleTopMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); + label.attr( + "transform", + `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 - node.padding / 3 + ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels) ? 5 : 3) + subGraphTitleTopMargin})` + ); + const rectBox = rect2.node().getBBox(); + node.height = rectBox.height; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const divider = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + rect2.attr("class", "divider").attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2).attr("width", node.width + padding).attr("height", node.height + padding); + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.diff = -node.padding / 2; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const shapes = { rect, roundedWithTitle, noteGroup, divider }; +let clusterElems = {}; +const insertCluster = (elem, node) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Inserting cluster"); + const shape = node.shape || "rect"; + clusterElems[node.id] = shapes[shape](elem, node); +}; +const clear = () => { + clusterElems = {}; +}; +const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph in recursive render: XXX", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), parentCluster); + const dir = graph.graph().rankdir; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Dir in recursive render - dir:", dir); + const elem = _elem.insert("g").attr("class", "root"); + if (!graph.nodes()) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("No nodes found for", graph); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Recursive render XXX", graph.nodes()); + } + if (graph.edges().length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Recursive edges", graph.edge(graph.edges()[0])); + } + const clusters = elem.insert("g").attr("class", "clusters"); + const edgePaths = elem.insert("g").attr("class", "edgePaths"); + const edgeLabels = elem.insert("g").attr("class", "edgeLabels"); + const nodes = elem.insert("g").attr("class", "nodes"); + await Promise.all( + graph.nodes().map(async function(v) { + const node = graph.node(v); + if (parentCluster !== void 0) { + const data = JSON.parse(JSON.stringify(parentCluster.clusterData)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Setting data for cluster XXX (", v, ") ", data, parentCluster); + graph.setNode(parentCluster.id, data); + if (!graph.parent(v)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Setting parent", v, parentCluster.id); + graph.setParent(v, parentCluster.id, data); + } + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v))); + if (node && node.clusterNode) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster identified", v, node.width, graph.node(v)); + const o = await recursiveRender( + nodes, + node.graph, + diagramType, + id, + graph.node(v), + siteConfig + ); + const newEl = o.elem; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.u)(node, newEl); + node.diff = o.diff || 0; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node bounds (abc123)", v, node, node.width, node.x, node.y); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.s)(newEl, node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Recursive render complete ", newEl, node); + } else { + if (graph.children(v).length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster - the non recursive path XXX", v, node.id, node, graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(findNonClusterChild(node.id, graph)); + clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node }; + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node - the non recursive path", v, node.id, node); + await (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.e)(nodes, graph.node(v), dir); + } + } + }) + ); + graph.edges().forEach(function(e) { + const edge = graph.edge(e.v, e.w, e.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e))); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Fix", clusterDb, "ids:", e.v, e.w, "Translating: ", clusterDb[e.v], clusterDb[e.w]); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.f)(edgeLabels, edge); + }); + graph.edges().forEach(function(e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("### Layout ###"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(graph); + (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__/* .layout */ .Zp)(graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph after layout:", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + let diff = 0; + const { subGraphTitleTotalMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); + sortNodesByHierarchy(graph).forEach(function(v) { + const node = graph.node(v); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Position " + v + ": " + JSON.stringify(graph.node(v))); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info( + "Position " + v + ": (" + node.x, + "," + node.y, + ") width: ", + node.width, + " height: ", + node.height + ); + if (node && node.clusterNode) { + node.y += subGraphTitleTotalMargin; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); + } else { + if (graph.children(v).length > 0) { + node.height += subGraphTitleTotalMargin; + insertCluster(clusters, node); + clusterDb[node.id].node = node; + } else { + node.y += subGraphTitleTotalMargin / 2; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); + } + } + }); + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge); + edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2); + const paths = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.h)(edgePaths, e, edge, clusterDb, diagramType, graph, id); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.j)(edge, paths); + }); + graph.nodes().forEach(function(v) { + const n = graph.node(v); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(v, n.type, n.diff); + if (n.type === "group") { + diff = n.diff; + } + }); + return { elem, diff }; +}; +const render = async (elem, graph, markers, diagramType, id) => { + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.a)(elem, markers, diagramType, id); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.b)(); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.d)(); + clear(); + clear$1(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph at first:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); + adjustClustersAndEdges(graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph after:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + await recursiveRender(elem, graph, diagramType, id, void 0, siteConfig); +}; + + + +/***/ }), + +/***/ 7308: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ d: () => (/* binding */ db), +/* harmony export */ p: () => (/* binding */ parser$1), +/* harmony export */ s: () => (/* binding */ styles) +/* harmony export */ }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 17], $V1 = [1, 18], $V2 = [1, 19], $V3 = [1, 39], $V4 = [1, 40], $V5 = [1, 25], $V6 = [1, 23], $V7 = [1, 24], $V8 = [1, 31], $V9 = [1, 32], $Va = [1, 33], $Vb = [1, 34], $Vc = [1, 35], $Vd = [1, 36], $Ve = [1, 26], $Vf = [1, 27], $Vg = [1, 28], $Vh = [1, 29], $Vi = [1, 43], $Vj = [1, 30], $Vk = [1, 42], $Vl = [1, 44], $Vm = [1, 41], $Vn = [1, 45], $Vo = [1, 9], $Vp = [1, 8, 9], $Vq = [1, 56], $Vr = [1, 57], $Vs = [1, 58], $Vt = [1, 59], $Vu = [1, 60], $Vv = [1, 61], $Vw = [1, 62], $Vx = [1, 8, 9, 39], $Vy = [1, 74], $Vz = [1, 8, 9, 12, 13, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], $VA = [1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 46, 59, 60, 61, 62, 63, 64, 65, 70, 72, 74, 80, 95, 97, 98], $VB = [13, 74, 80, 95, 97, 98], $VC = [13, 64, 65, 74, 80, 95, 97, 98], $VD = [13, 59, 60, 61, 62, 63, 74, 80, 95, 97, 98], $VE = [1, 93], $VF = [1, 110], $VG = [1, 108], $VH = [1, 102], $VI = [1, 103], $VJ = [1, 104], $VK = [1, 105], $VL = [1, 106], $VM = [1, 107], $VN = [1, 109], $VO = [1, 8, 9, 37, 39, 42], $VP = [1, 8, 9, 21], $VQ = [1, 8, 9, 78], $VR = [1, 8, 9, 21, 73, 74, 78, 80, 81, 82, 83, 84, 85]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "statements": 5, "graphConfig": 6, "CLASS_DIAGRAM": 7, "NEWLINE": 8, "EOF": 9, "statement": 10, "classLabel": 11, "SQS": 12, "STR": 13, "SQE": 14, "namespaceName": 15, "alphaNumToken": 16, "className": 17, "classLiteralName": 18, "GENERICTYPE": 19, "relationStatement": 20, "LABEL": 21, "namespaceStatement": 22, "classStatement": 23, "memberStatement": 24, "annotationStatement": 25, "clickStatement": 26, "styleStatement": 27, "cssClassStatement": 28, "noteStatement": 29, "direction": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "namespaceIdentifier": 36, "STRUCT_START": 37, "classStatements": 38, "STRUCT_STOP": 39, "NAMESPACE": 40, "classIdentifier": 41, "STYLE_SEPARATOR": 42, "members": 43, "CLASS": 44, "ANNOTATION_START": 45, "ANNOTATION_END": 46, "MEMBER": 47, "SEPARATOR": 48, "relation": 49, "NOTE_FOR": 50, "noteText": 51, "NOTE": 52, "direction_tb": 53, "direction_bt": 54, "direction_rl": 55, "direction_lr": 56, "relationType": 57, "lineType": 58, "AGGREGATION": 59, "EXTENSION": 60, "COMPOSITION": 61, "DEPENDENCY": 62, "LOLLIPOP": 63, "LINE": 64, "DOTTED_LINE": 65, "CALLBACK": 66, "LINK": 67, "LINK_TARGET": 68, "CLICK": 69, "CALLBACK_NAME": 70, "CALLBACK_ARGS": 71, "HREF": 72, "STYLE": 73, "ALPHA": 74, "stylesOpt": 75, "CSSCLASS": 76, "style": 77, "COMMA": 78, "styleComponent": 79, "NUM": 80, "COLON": 81, "UNIT": 82, "SPACE": 83, "BRKT": 84, "PCT": 85, "commentToken": 86, "textToken": 87, "graphCodeTokens": 88, "textNoTagsToken": 89, "TAGSTART": 90, "TAGEND": 91, "==": 92, "--": 93, "DEFAULT": 94, "MINUS": 95, "keywords": 96, "UNICODE_TEXT": 97, "BQUOTE_STR": 98, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 19: "GENERICTYPE", 21: "LABEL", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 37: "STRUCT_START", 39: "STRUCT_STOP", 40: "NAMESPACE", 42: "STYLE_SEPARATOR", 44: "CLASS", 45: "ANNOTATION_START", 46: "ANNOTATION_END", 47: "MEMBER", 48: "SEPARATOR", 50: "NOTE_FOR", 52: "NOTE", 53: "direction_tb", 54: "direction_bt", 55: "direction_rl", 56: "direction_lr", 59: "AGGREGATION", 60: "EXTENSION", 61: "COMPOSITION", 62: "DEPENDENCY", 63: "LOLLIPOP", 64: "LINE", 65: "DOTTED_LINE", 66: "CALLBACK", 67: "LINK", 68: "LINK_TARGET", 69: "CLICK", 70: "CALLBACK_NAME", 71: "CALLBACK_ARGS", 72: "HREF", 73: "STYLE", 74: "ALPHA", 76: "CSSCLASS", 78: "COMMA", 80: "NUM", 81: "COLON", 82: "UNIT", 83: "SPACE", 84: "BRKT", 85: "PCT", 88: "graphCodeTokens", 90: "TAGSTART", 91: "TAGEND", 92: "==", 93: "--", 94: "DEFAULT", 95: "MINUS", 96: "keywords", 97: "UNICODE_TEXT", 98: "BQUOTE_STR" }, + productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 2], [17, 1], [17, 1], [17, 2], [17, 2], [17, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [22, 4], [22, 5], [36, 2], [38, 1], [38, 2], [38, 3], [23, 1], [23, 3], [23, 4], [23, 6], [41, 2], [41, 3], [25, 4], [43, 1], [43, 2], [24, 1], [24, 2], [24, 1], [24, 1], [20, 3], [20, 4], [20, 4], [20, 5], [29, 3], [29, 2], [30, 1], [30, 1], [30, 1], [30, 1], [49, 3], [49, 2], [49, 2], [49, 1], [57, 1], [57, 1], [57, 1], [57, 1], [57, 1], [58, 1], [58, 1], [26, 3], [26, 4], [26, 3], [26, 4], [26, 4], [26, 5], [26, 3], [26, 4], [26, 4], [26, 5], [26, 4], [26, 5], [26, 5], [26, 6], [27, 3], [28, 3], [75, 1], [75, 3], [77, 1], [77, 2], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [86, 1], [86, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [89, 1], [89, 1], [89, 1], [89, 1], [16, 1], [16, 1], [16, 1], [16, 1], [18, 1], [51, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 8: + this.$ = $$[$0 - 1]; + break; + case 9: + case 11: + case 12: + this.$ = $$[$0]; + break; + case 10: + case 13: + this.$ = $$[$0 - 1] + $$[$0]; + break; + case 14: + case 15: + this.$ = $$[$0 - 1] + "~" + $$[$0] + "~"; + break; + case 16: + yy.addRelation($$[$0]); + break; + case 17: + $$[$0 - 1].title = yy.cleanupLabel($$[$0]); + yy.addRelation($$[$0 - 1]); + break; + case 27: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 28: + case 29: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 30: + yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]); + break; + case 31: + yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]); + break; + case 32: + this.$ = $$[$0]; + yy.addNamespace($$[$0]); + break; + case 33: + this.$ = [$$[$0]]; + break; + case 34: + this.$ = [$$[$0 - 1]]; + break; + case 35: + $$[$0].unshift($$[$0 - 2]); + this.$ = $$[$0]; + break; + case 37: + yy.setCssClass($$[$0 - 2], $$[$0]); + break; + case 38: + yy.addMembers($$[$0 - 3], $$[$0 - 1]); + break; + case 39: + yy.setCssClass($$[$0 - 5], $$[$0 - 3]); + yy.addMembers($$[$0 - 5], $$[$0 - 1]); + break; + case 40: + this.$ = $$[$0]; + yy.addClass($$[$0]); + break; + case 41: + this.$ = $$[$0 - 1]; + yy.addClass($$[$0 - 1]); + yy.setClassLabel($$[$0 - 1], $$[$0]); + break; + case 42: + yy.addAnnotation($$[$0], $$[$0 - 2]); + break; + case 43: + this.$ = [$$[$0]]; + break; + case 44: + $$[$0].push($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 45: + break; + case 46: + yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0])); + break; + case 47: + break; + case 48: + break; + case 49: + this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" }; + break; + case 50: + this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" }; + break; + case 51: + this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] }; + break; + case 52: + this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] }; + break; + case 53: + yy.addNote($$[$0], $$[$0 - 1]); + break; + case 54: + yy.addNote($$[$0]); + break; + case 55: + yy.setDirection("TB"); + break; + case 56: + yy.setDirection("BT"); + break; + case 57: + yy.setDirection("RL"); + break; + case 58: + yy.setDirection("LR"); + break; + case 59: + this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] }; + break; + case 60: + this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] }; + break; + case 61: + this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] }; + break; + case 62: + this.$ = { type1: "none", type2: "none", lineType: $$[$0] }; + break; + case 63: + this.$ = yy.relationType.AGGREGATION; + break; + case 64: + this.$ = yy.relationType.EXTENSION; + break; + case 65: + this.$ = yy.relationType.COMPOSITION; + break; + case 66: + this.$ = yy.relationType.DEPENDENCY; + break; + case 67: + this.$ = yy.relationType.LOLLIPOP; + break; + case 68: + this.$ = yy.lineType.LINE; + break; + case 69: + this.$ = yy.lineType.DOTTED_LINE; + break; + case 70: + case 76: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 1], $$[$0]); + break; + case 71: + case 77: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 2], $$[$0]); + break; + case 72: + this.$ = $$[$0 - 2]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 73: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 74: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 2], $$[$0]); + break; + case 75: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); + yy.setTooltip($$[$0 - 3], $$[$0 - 1]); + break; + case 78: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 79: + this.$ = $$[$0 - 4]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 80: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 81: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]); + break; + case 82: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 1]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 83: + this.$ = $$[$0 - 5]; + yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); + yy.setTooltip($$[$0 - 4], $$[$0 - 1]); + break; + case 84: + this.$ = $$[$0 - 2]; + yy.setCssStyle($$[$0 - 1], $$[$0]); + break; + case 85: + yy.setCssClass($$[$0 - 1], $$[$0]); + break; + case 86: + this.$ = [$$[$0]]; + break; + case 87: + $$[$0 - 2].push($$[$0]); + this.$ = $$[$0 - 2]; + break; + case 89: + this.$ = $$[$0 - 1] + $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vo, [2, 5], { 8: [1, 46] }), { 8: [1, 47] }, o($Vp, [2, 16], { 21: [1, 48] }), o($Vp, [2, 18]), o($Vp, [2, 19]), o($Vp, [2, 20]), o($Vp, [2, 21]), o($Vp, [2, 22]), o($Vp, [2, 23]), o($Vp, [2, 24]), o($Vp, [2, 25]), o($Vp, [2, 26]), { 32: [1, 49] }, { 34: [1, 50] }, o($Vp, [2, 29]), o($Vp, [2, 45], { 49: 51, 57: 54, 58: 55, 13: [1, 52], 21: [1, 53], 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }), { 37: [1, 63] }, o($Vx, [2, 36], { 37: [1, 65], 42: [1, 64] }), o($Vp, [2, 47]), o($Vp, [2, 48]), { 16: 66, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 67, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 68, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 69, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 74: [1, 70] }, { 13: [1, 71] }, { 16: 37, 17: 72, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: $Vy, 51: 73 }, o($Vp, [2, 55]), o($Vp, [2, 56]), o($Vp, [2, 57]), o($Vp, [2, 58]), o($Vz, [2, 11], { 16: 37, 18: 38, 17: 75, 19: [1, 76], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), o($Vz, [2, 12], { 19: [1, 77] }), { 15: 78, 16: 79, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 80, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VA, [2, 112]), o($VA, [2, 113]), o($VA, [2, 114]), o($VA, [2, 115]), o([1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], [2, 116]), o($Vo, [2, 6], { 10: 5, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 17: 20, 36: 21, 41: 22, 16: 37, 18: 38, 5: 81, 31: $V0, 33: $V1, 35: $V2, 40: $V3, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), { 5: 82, 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 17]), o($Vp, [2, 27]), o($Vp, [2, 28]), { 13: [1, 84], 16: 37, 17: 83, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 49: 85, 57: 54, 58: 55, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }, o($Vp, [2, 46]), { 58: 86, 64: $Vv, 65: $Vw }, o($VB, [2, 62], { 57: 87, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VC, [2, 63]), o($VC, [2, 64]), o($VC, [2, 65]), o($VC, [2, 66]), o($VC, [2, 67]), o($VD, [2, 68]), o($VD, [2, 69]), { 8: [1, 89], 23: 90, 38: 88, 41: 22, 44: $V4 }, { 16: 91, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 43: 92, 47: $VE }, { 46: [1, 94] }, { 13: [1, 95] }, { 13: [1, 96] }, { 70: [1, 97], 72: [1, 98] }, { 21: $VF, 73: $VG, 74: $VH, 75: 99, 77: 100, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, { 74: [1, 111] }, { 13: $Vy, 51: 112 }, o($Vp, [2, 54]), o($Vp, [2, 117]), o($Vz, [2, 13]), o($Vz, [2, 14]), o($Vz, [2, 15]), { 37: [2, 32] }, { 15: 113, 16: 79, 37: [2, 9], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, o($VO, [2, 40], { 11: 114, 12: [1, 115] }), o($Vo, [2, 7]), { 9: [1, 116] }, o($VP, [2, 49]), { 16: 37, 17: 117, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: [1, 119], 16: 37, 17: 118, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 61], { 57: 120, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VB, [2, 60]), { 39: [1, 121] }, { 23: 90, 38: 122, 41: 22, 44: $V4 }, { 8: [1, 123], 39: [2, 33] }, o($Vx, [2, 37], { 37: [1, 124] }), { 39: [1, 125] }, { 39: [2, 43], 43: 126, 47: $VE }, { 16: 37, 17: 127, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 70], { 13: [1, 128] }), o($Vp, [2, 72], { 13: [1, 130], 68: [1, 129] }), o($Vp, [2, 76], { 13: [1, 131], 71: [1, 132] }), { 13: [1, 133] }, o($Vp, [2, 84], { 78: [1, 134] }), o($VQ, [2, 86], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VR, [2, 88]), o($VR, [2, 90]), o($VR, [2, 91]), o($VR, [2, 92]), o($VR, [2, 93]), o($VR, [2, 94]), o($VR, [2, 95]), o($VR, [2, 96]), o($VR, [2, 97]), o($VR, [2, 98]), o($Vp, [2, 85]), o($Vp, [2, 53]), { 37: [2, 10] }, o($VO, [2, 41]), { 13: [1, 136] }, { 1: [2, 4] }, o($VP, [2, 51]), o($VP, [2, 50]), { 16: 37, 17: 137, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 59]), o($Vp, [2, 30]), { 39: [1, 138] }, { 23: 90, 38: 139, 39: [2, 34], 41: 22, 44: $V4 }, { 43: 140, 47: $VE }, o($Vx, [2, 38]), { 39: [2, 44] }, o($Vp, [2, 42]), o($Vp, [2, 71]), o($Vp, [2, 73]), o($Vp, [2, 74], { 68: [1, 141] }), o($Vp, [2, 77]), o($Vp, [2, 78], { 13: [1, 142] }), o($Vp, [2, 80], { 13: [1, 144], 68: [1, 143] }), { 21: $VF, 73: $VG, 74: $VH, 77: 145, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, o($VR, [2, 89]), { 14: [1, 146] }, o($VP, [2, 52]), o($Vp, [2, 31]), { 39: [2, 35] }, { 39: [1, 147] }, o($Vp, [2, 75]), o($Vp, [2, 79]), o($Vp, [2, 81]), o($Vp, [2, 82], { 68: [1, 148] }), o($VQ, [2, 87], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VO, [2, 8]), o($Vx, [2, 39]), o($Vp, [2, 83])], + defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 78: [2, 32], 113: [2, 10], 116: [2, 4], 126: [2, 44], 139: [2, 35] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 53; + case 1: + return 54; + case 2: + return 55; + case 3: + return 56; + case 4: + break; + case 5: + break; + case 6: + this.begin("acc_title"); + return 31; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 33; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + return 8; + case 14: + break; + case 15: + return 7; + case 16: + return 7; + case 17: + return "EDGE_STATE"; + case 18: + this.begin("callback_name"); + break; + case 19: + this.popState(); + break; + case 20: + this.popState(); + this.begin("callback_args"); + break; + case 21: + return 70; + case 22: + this.popState(); + break; + case 23: + return 71; + case 24: + this.popState(); + break; + case 25: + return "STR"; + case 26: + this.begin("string"); + break; + case 27: + return 73; + case 28: + this.begin("namespace"); + return 40; + case 29: + this.popState(); + return 8; + case 30: + break; + case 31: + this.begin("namespace-body"); + return 37; + case 32: + this.popState(); + return 39; + case 33: + return "EOF_IN_STRUCT"; + case 34: + return 8; + case 35: + break; + case 36: + return "EDGE_STATE"; + case 37: + this.begin("class"); + return 44; + case 38: + this.popState(); + return 8; + case 39: + break; + case 40: + this.popState(); + this.popState(); + return 39; + case 41: + this.begin("class-body"); + return 37; + case 42: + this.popState(); + return 39; + case 43: + return "EOF_IN_STRUCT"; + case 44: + return "EDGE_STATE"; + case 45: + return "OPEN_IN_STRUCT"; + case 46: + break; + case 47: + return "MEMBER"; + case 48: + return 76; + case 49: + return 66; + case 50: + return 67; + case 51: + return 69; + case 52: + return 50; + case 53: + return 52; + case 54: + return 45; + case 55: + return 46; + case 56: + return 72; + case 57: + this.popState(); + break; + case 58: + return "GENERICTYPE"; + case 59: + this.begin("generic"); + break; + case 60: + this.popState(); + break; + case 61: + return "BQUOTE_STR"; + case 62: + this.begin("bqstring"); + break; + case 63: + return 68; + case 64: + return 68; + case 65: + return 68; + case 66: + return 68; + case 67: + return 60; + case 68: + return 60; + case 69: + return 62; + case 70: + return 62; + case 71: + return 61; + case 72: + return 59; + case 73: + return 63; + case 74: + return 64; + case 75: + return 65; + case 76: + return 21; + case 77: + return 42; + case 78: + return 95; + case 79: + return "DOT"; + case 80: + return "PLUS"; + case 81: + return 81; + case 82: + return 78; + case 83: + return 84; + case 84: + return 84; + case 85: + return 85; + case 86: + return "EQUALS"; + case 87: + return "EQUALS"; + case 88: + return 74; + case 89: + return 12; + case 90: + return 14; + case 91: + return "PUNCTUATION"; + case 92: + return 80; + case 93: + return 97; + case 94: + return 83; + case 95: + return 83; + case 96: + return 9; + } + }, + rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:style\b)/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?::)/, /^(?:,)/, /^(?:#)/, /^(?:#)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-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])/, /^(?:\s)/, /^(?:\s)/, /^(?:$)/], + conditions: { "namespace-body": { "rules": [26, 32, 33, 34, 35, 36, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "namespace": { "rules": [26, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class-body": { "rules": [26, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class": { "rules": [26, 38, 39, 40, 41, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr": { "rules": [9, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_title": { "rules": [7, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_args": { "rules": [22, 23, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_name": { "rules": [19, 20, 21, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "href": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "struct": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "generic": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "bqstring": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "string": { "rules": [24, 25, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 28, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const visibilityValues = ["#", "+", "~", "-", ""]; +class ClassMember { + constructor(input, memberType) { + this.memberType = memberType; + this.visibility = ""; + this.classifier = ""; + const sanitizedInput = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)(input, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + this.parseMember(sanitizedInput); + } + getDisplayDetails() { + let displayText = this.visibility + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.x)(this.id); + if (this.memberType === "method") { + displayText += `(${(0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.x)(this.parameters.trim())})`; + if (this.returnType) { + displayText += " : " + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.x)(this.returnType); + } + } + displayText = displayText.trim(); + const cssStyle = this.parseClassifier(); + return { + displayText, + cssStyle + }; + } + parseMember(input) { + let potentialClassifier = ""; + if (this.memberType === "method") { + const methodRegEx = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/; + const match = input.match(methodRegEx); + if (match) { + const detectedVisibility = match[1] ? match[1].trim() : ""; + if (visibilityValues.includes(detectedVisibility)) { + this.visibility = detectedVisibility; + } + this.id = match[2].trim(); + this.parameters = match[3] ? match[3].trim() : ""; + potentialClassifier = match[4] ? match[4].trim() : ""; + this.returnType = match[5] ? match[5].trim() : ""; + if (potentialClassifier === "") { + const lastChar = this.returnType.substring(this.returnType.length - 1); + if (lastChar.match(/[$*]/)) { + potentialClassifier = lastChar; + this.returnType = this.returnType.substring(0, this.returnType.length - 1); + } + } + } + } else { + const length = input.length; + const firstChar = input.substring(0, 1); + const lastChar = input.substring(length - 1); + if (visibilityValues.includes(firstChar)) { + this.visibility = firstChar; + } + if (lastChar.match(/[$*]/)) { + potentialClassifier = lastChar; + } + this.id = input.substring( + this.visibility === "" ? 0 : 1, + potentialClassifier === "" ? length : length - 1 + ); + } + this.classifier = potentialClassifier; + } + parseClassifier() { + switch (this.classifier) { + case "*": + return "font-style:italic;"; + case "$": + return "text-decoration:underline;"; + default: + return ""; + } + } +} +const MERMAID_DOM_ID_PREFIX = "classId-"; +let relations = []; +let classes = {}; +let notes = []; +let classCounter = 0; +let namespaces = {}; +let namespaceCounter = 0; +let functions = []; +const sanitizeText = (txt) => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); +const splitClassNameAndType = function(_id) { + const id = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + let genericType = ""; + let className = id; + if (id.indexOf("~") > 0) { + const split = id.split("~"); + className = sanitizeText(split[0]); + genericType = sanitizeText(split[1]); + } + return { className, type: genericType }; +}; +const setClassLabel = function(_id, label) { + const id = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + if (label) { + label = sanitizeText(label); + } + const { className } = splitClassNameAndType(id); + classes[className].label = label; +}; +const addClass = function(_id) { + const id = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + const { className, type } = splitClassNameAndType(id); + if (Object.hasOwn(classes, className)) { + return; + } + const name = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(className, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + classes[name] = { + id: name, + type, + label: name, + cssClasses: [], + methods: [], + members: [], + annotations: [], + styles: [], + domId: MERMAID_DOM_ID_PREFIX + name + "-" + classCounter + }; + classCounter++; +}; +const lookUpDomId = function(_id) { + const id = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + if (id in classes) { + return classes[id].domId; + } + throw new Error("Class not found: " + id); +}; +const clear = function() { + relations = []; + classes = {}; + notes = []; + functions = []; + functions.push(setupToolTips); + namespaces = {}; + namespaceCounter = 0; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.v)(); +}; +const getClass = function(id) { + return classes[id]; +}; +const getClasses = function() { + return classes; +}; +const getRelations = function() { + return relations; +}; +const getNotes = function() { + return notes; +}; +const addRelation = function(relation) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Adding relation: " + JSON.stringify(relation)); + addClass(relation.id1); + addClass(relation.id2); + relation.id1 = splitClassNameAndType(relation.id1).className; + relation.id2 = splitClassNameAndType(relation.id2).className; + relation.relationTitle1 = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(relation.relationTitle1.trim(), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + relation.relationTitle2 = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(relation.relationTitle2.trim(), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + relations.push(relation); +}; +const addAnnotation = function(className, annotation) { + const validatedClassName = splitClassNameAndType(className).className; + classes[validatedClassName].annotations.push(annotation); +}; +const addMember = function(className, member) { + addClass(className); + const validatedClassName = splitClassNameAndType(className).className; + const theClass = classes[validatedClassName]; + if (typeof member === "string") { + const memberString = member.trim(); + if (memberString.startsWith("<<") && memberString.endsWith(">>")) { + theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2))); + } else if (memberString.indexOf(")") > 0) { + theClass.methods.push(new ClassMember(memberString, "method")); + } else if (memberString) { + theClass.members.push(new ClassMember(memberString, "attribute")); + } + } +}; +const addMembers = function(className, members) { + if (Array.isArray(members)) { + members.reverse(); + members.forEach((member) => addMember(className, member)); + } +}; +const addNote = function(text, className) { + const note = { + id: `note${notes.length}`, + class: className, + text + }; + notes.push(note); +}; +const cleanupLabel = function(label) { + if (label.startsWith(":")) { + label = label.substring(1); + } + return sanitizeText(label.trim()); +}; +const setCssClass = function(ids, className) { + ids.split(",").forEach(function(_id) { + let id = _id; + if (_id[0].match(/\d/)) { + id = MERMAID_DOM_ID_PREFIX + id; + } + if (classes[id] !== void 0) { + classes[id].cssClasses.push(className); + } + }); +}; +const setTooltip = function(ids, tooltip) { + ids.split(",").forEach(function(id) { + if (tooltip !== void 0) { + classes[id].tooltip = sanitizeText(tooltip); + } + }); +}; +const getTooltip = function(id, namespace) { + if (namespace) { + return namespaces[namespace].classes[id].tooltip; + } + return classes[id].tooltip; +}; +const setLink = function(ids, linkStr, target) { + const config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + ids.split(",").forEach(function(_id) { + let id = _id; + if (_id[0].match(/\d/)) { + id = MERMAID_DOM_ID_PREFIX + id; + } + if (classes[id] !== void 0) { + classes[id].link = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config); + if (config.securityLevel === "sandbox") { + classes[id].linkTarget = "_top"; + } else if (typeof target === "string") { + classes[id].linkTarget = sanitizeText(target); + } else { + classes[id].linkTarget = "_blank"; + } + } + }); + setCssClass(ids, "clickable"); +}; +const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id) { + setClickFunc(id, functionName, functionArgs); + classes[id].haveCallback = true; + }); + setCssClass(ids, "clickable"); +}; +const setClickFunc = function(_domId, functionName, functionArgs) { + const domId = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_domId, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + const config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + if (config.securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + const id = domId; + if (classes[id] !== void 0) { + const elemId = lookUpDomId(id); + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i = 0; i < argList.length; i++) { + let item = argList[i].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i] = item; + } + } + if (argList.length === 0) { + argList.push(elemId); + } + functions.push(function() { + const elem = document.querySelector(`[id="${elemId}"]`); + if (elem !== null) { + elem.addEventListener( + "click", + function() { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList); + }, + false + ); + } + }); + } +}; +const bindFunctions = function(element) { + functions.forEach(function(fun) { + fun(element); + }); +}; +const lineType = { + LINE: 0, + DOTTED_LINE: 1 +}; +const relationType = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3, + LOLLIPOP: 4 +}; +const setupToolTips = function(element) { + let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(".mermaidTooltip"); + if ((tooltipElem._groups || tooltipElem)[0][0] === null) { + tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); + } + const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(element).select("svg"); + const nodes = svg.selectAll("g.node"); + nodes.on("mouseover", function() { + const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); + const title = el.attr("title"); + if (title === null) { + return; + } + const rect = this.getBoundingClientRect(); + tooltipElem.transition().duration(200).style("opacity", ".9"); + tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.top - 14 + document.body.scrollTop + "px"); + tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "<br/>")); + el.classed("hover", true); + }).on("mouseout", function() { + tooltipElem.transition().duration(500).style("opacity", 0); + const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); + el.classed("hover", false); + }); +}; +functions.push(setupToolTips); +let direction = "TB"; +const getDirection = () => direction; +const setDirection = (dir) => { + direction = dir; +}; +const addNamespace = function(id) { + if (namespaces[id] !== void 0) { + return; + } + namespaces[id] = { + id, + classes: {}, + children: {}, + domId: MERMAID_DOM_ID_PREFIX + id + "-" + namespaceCounter + }; + namespaceCounter++; +}; +const getNamespace = function(name) { + return namespaces[name]; +}; +const getNamespaces = function() { + return namespaces; +}; +const addClassesToNamespace = function(id, classNames) { + if (namespaces[id] === void 0) { + return; + } + for (const name of classNames) { + const { className } = splitClassNameAndType(name); + classes[className].parent = id; + namespaces[id].classes[className] = classes[className]; + } +}; +const setCssStyle = function(id, styles2) { + const thisClass = classes[id]; + if (!styles2 || !thisClass) { + return; + } + for (const s of styles2) { + if (s.includes(",")) { + thisClass.styles.push(...s.split(",")); + } else { + thisClass.styles.push(s); + } + } +}; +const db = { + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.g, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.a, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.b, + getConfig: () => (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().class, + addClass, + bindFunctions, + clear, + getClass, + getClasses, + getNotes, + addAnnotation, + addNote, + getRelations, + addRelation, + getDirection, + setDirection, + addMember, + addMembers, + cleanupLabel, + lineType, + relationType, + setClickEvent, + setCssClass, + setLink, + getTooltip, + setTooltip, + lookUpDomId, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.t, + setClassLabel, + addNamespace, + addClassesToNamespace, + getNamespace, + getNamespaces, + setCssStyle +}; +const getStyles = (options) => `g.classGroup text { + fill: ${options.nodeBorder || options.classText}; + stroke: none; + font-family: ${options.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${options.classText}; +} +.edgeLabel .label rect { + fill: ${options.mainBkg}; +} +.label text { + fill: ${options.classText}; +} +.edgeLabel .label span { + background: ${options.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${options.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; +} + +g.classGroup line { + stroke: ${options.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${options.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${options.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${options.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${options.mainBkg} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${options.mainBkg} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; +} +`; +const styles = getStyles; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/4.d4e84adf.js b/assets/js/4.d4e84adf.js new file mode 100644 index 00000000..7adbed0c --- /dev/null +++ b/assets/js/4.d4e84adf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[4],{4:(e,t,l)=>{l.d(t,{diagram:()=>u});var n=l(7308),a=l(6312),o=l(697),i=l(6257),s=l(2746);l(4353),l(6750),l(2838),l(1176),l(4075);const d=e=>i.e.sanitizeText(e,(0,i.c)());let r={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const c=function(e,t,l,n,a){const o=Object.keys(e);i.l.info("keys:",o),i.l.info(e),o.filter((t=>e[t].parent==a)).forEach((function(l){var o,s;const r=e[l],c=r.cssClasses.join(" "),p=(0,i.k)(r.styles),b=r.label??r.id,u={labelStyle:p.labelStyle,shape:"class_box",labelText:d(b),classData:r,rx:0,ry:0,class:c,style:p.style,id:r.id,domId:r.domId,tooltip:n.db.getTooltip(r.id,a)||"",haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:(null==(o=(0,i.c)().flowchart)?void 0:o.padding)??(null==(s=(0,i.c)().class)?void 0:s.padding)};t.setNode(r.id,u),a&&t.setParent(r.id,a),i.l.info("setNode",u)}))};function p(e){let t;switch(e){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}const b={setConf:function(e){r={...r,...e}},draw:async function(e,t,l,n){i.l.info("Drawing class - ",t);const b=(0,i.c)().flowchart??(0,i.c)().class,u=(0,i.c)().securityLevel;i.l.info("config:",b);const f=(null==b?void 0:b.nodeSpacing)??50,y=(null==b?void 0:b.rankSpacing)??50,g=new o.T({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:f,ranksep:y,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),h=n.db.getNamespaces(),v=n.db.getClasses(),w=n.db.getRelations(),k=n.db.getNotes();let m;i.l.info(w),function(e,t,l,n){const a=Object.keys(e);i.l.info("keys:",a),i.l.info(e),a.forEach((function(a){var o,s;const r=e[a],p={shape:"rect",id:r.id,domId:r.domId,labelText:d(r.id),labelStyle:"",style:"fill: none; stroke: black",padding:(null==(o=(0,i.c)().flowchart)?void 0:o.padding)??(null==(s=(0,i.c)().class)?void 0:s.padding)};t.setNode(r.id,p),c(r.classes,t,l,n,r.id),i.l.info("setNode",p)}))}(h,g,t,n),c(v,g,t,n),function(e,t){const l=(0,i.c)().flowchart;let n=0;e.forEach((function(e){var o;n++;const s={classes:"relation",pattern:1==e.relation.lineType?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${n}`,arrowhead:"arrow_open"===e.type?"none":"normal",startLabelRight:"none"===e.relationTitle1?"":e.relationTitle1,endLabelLeft:"none"===e.relationTitle2?"":e.relationTitle2,arrowTypeStart:p(e.relation.type1),arrowTypeEnd:p(e.relation.type2),style:"fill:none",labelStyle:"",curve:(0,i.n)(null==l?void 0:l.curve,a.lUB)};if(i.l.info(s,e),void 0!==e.style){const t=(0,i.k)(e.style);s.style=t.style,s.labelStyle=t.labelStyle}e.text=e.title,void 0===e.text?void 0!==e.style&&(s.arrowheadStyle="fill: #333"):(s.arrowheadStyle="fill: #333",s.labelpos="c",(null==(o=(0,i.c)().flowchart)?void 0:o.htmlLabels)??(0,i.c)().htmlLabels?(s.labelType="html",s.label='<span class="edgeLabel">'+e.text+"</span>"):(s.labelType="text",s.label=e.text.replace(i.e.lineBreakRegex,"\n"),void 0===e.style&&(s.style=s.style||"stroke: #333; stroke-width: 1.5px;fill:none"),s.labelStyle=s.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,s,n)}))}(w,g),function(e,t,l,n){i.l.info(e),e.forEach((function(e,o){var s,c;const p=e,b="",u="",f=p.text,y={labelStyle:b,shape:"note",labelText:d(f),noteData:p,rx:0,ry:0,class:"",style:u,id:p.id,domId:p.id,tooltip:"",type:"note",padding:(null==(s=(0,i.c)().flowchart)?void 0:s.padding)??(null==(c=(0,i.c)().class)?void 0:c.padding)};if(t.setNode(p.id,y),i.l.info("setNode",y),!p.class||!(p.class in n))return;const g=l+o,h={id:`edgeNote${g}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:(0,i.n)(r.curve,a.lUB)};t.setEdge(p.id,p.class,h,g)}))}(k,g,w.length+1,v),"sandbox"===u&&(m=(0,a.Ltv)("#i"+t));const x="sandbox"===u?(0,a.Ltv)(m.nodes()[0].contentDocument.body):(0,a.Ltv)("body"),T=x.select(`[id="${t}"]`),S=x.select("#"+t+" g");if(await(0,s.r)(S,g,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),i.u.insertTitle(T,"classTitleText",(null==b?void 0:b.titleTopMargin)??5,n.db.getDiagramTitle()),(0,i.o)(g,T,null==b?void 0:b.diagramPadding,null==b?void 0:b.useMaxWidth),!(null==b?void 0:b.htmlLabels)){const e="sandbox"===u?m.nodes()[0].contentDocument:document,l=e.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const t of l){const l=t.getBBox(),n=e.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("rx",0),n.setAttribute("ry",0),n.setAttribute("width",l.width),n.setAttribute("height",l.height),t.insertBefore(n,t.firstChild)}}}},u={parser:n.p,db:n.d,renderer:b,styles:n.s,init:e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,n.d.clear()}}}}]); \ No newline at end of file diff --git a/assets/js/440.99fb5fa5.js b/assets/js/440.99fb5fa5.js new file mode 100644 index 00000000..c0afd5d5 --- /dev/null +++ b/assets/js/440.99fb5fa5.js @@ -0,0 +1,1410 @@ +"use strict"; +exports.id = 440; +exports.ids = [440]; +exports.modules = { + +/***/ 7440: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + diagram: () => (/* binding */ diagram) +}); + +// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-f47111a7.js + 8 modules +var mermaid_f47111a7 = __webpack_require__(6257); +// EXTERNAL MODULE: ./node_modules/d3/src/index.js + 197 modules +var src = __webpack_require__(6312); +;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-array/src/min.js +function min(values, valueof) { + let min; + if (valueof === undefined) { + for (const value of values) { + if (value != null + && (min > value || (min === undefined && value >= value))) { + min = value; + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null + && (min > value || (min === undefined && value >= value))) { + min = value; + } + } + } + return min; +} + +;// CONCATENATED MODULE: ./node_modules/d3-sankey/src/align.js + + +function targetDepth(d) { + return d.target.depth; +} + +function left(node) { + return node.depth; +} + +function right(node, n) { + return n - 1 - node.height; +} + +function justify(node, n) { + return node.sourceLinks.length ? node.depth : n - 1; +} + +function center(node) { + return node.targetLinks.length ? node.depth + : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1 + : 0; +} + +;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-array/src/sum.js +function sum(values, valueof) { + let sum = 0; + if (valueof === undefined) { + for (let value of values) { + if (value = +value) { + sum += value; + } + } + } else { + let index = -1; + for (let value of values) { + if (value = +valueof(value, ++index, values)) { + sum += value; + } + } + } + return sum; +} + +;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-array/src/max.js +function max(values, valueof) { + let max; + if (valueof === undefined) { + for (const value of values) { + if (value != null + && (max < value || (max === undefined && value >= value))) { + max = value; + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null + && (max < value || (max === undefined && value >= value))) { + max = value; + } + } + } + return max; +} + +;// CONCATENATED MODULE: ./node_modules/d3-sankey/src/constant.js +function constant(x) { + return function() { + return x; + }; +} + +;// CONCATENATED MODULE: ./node_modules/d3-sankey/src/sankey.js + + + + +function ascendingSourceBreadth(a, b) { + return ascendingBreadth(a.source, b.source) || a.index - b.index; +} + +function ascendingTargetBreadth(a, b) { + return ascendingBreadth(a.target, b.target) || a.index - b.index; +} + +function ascendingBreadth(a, b) { + return a.y0 - b.y0; +} + +function value(d) { + return d.value; +} + +function defaultId(d) { + return d.index; +} + +function defaultNodes(graph) { + return graph.nodes; +} + +function defaultLinks(graph) { + return graph.links; +} + +function find(nodeById, id) { + const node = nodeById.get(id); + if (!node) throw new Error("missing: " + id); + return node; +} + +function computeLinkBreadths({nodes}) { + for (const node of nodes) { + let y0 = node.y0; + let y1 = y0; + for (const link of node.sourceLinks) { + link.y0 = y0 + link.width / 2; + y0 += link.width; + } + for (const link of node.targetLinks) { + link.y1 = y1 + link.width / 2; + y1 += link.width; + } + } +} + +function Sankey() { + let x0 = 0, y0 = 0, x1 = 1, y1 = 1; // extent + let dx = 24; // nodeWidth + let dy = 8, py; // nodePadding + let id = defaultId; + let align = justify; + let sort; + let linkSort; + let nodes = defaultNodes; + let links = defaultLinks; + let iterations = 6; + + function sankey() { + const graph = {nodes: nodes.apply(null, arguments), links: links.apply(null, arguments)}; + computeNodeLinks(graph); + computeNodeValues(graph); + computeNodeDepths(graph); + computeNodeHeights(graph); + computeNodeBreadths(graph); + computeLinkBreadths(graph); + return graph; + } + + sankey.update = function(graph) { + computeLinkBreadths(graph); + return graph; + }; + + sankey.nodeId = function(_) { + return arguments.length ? (id = typeof _ === "function" ? _ : constant(_), sankey) : id; + }; + + sankey.nodeAlign = function(_) { + return arguments.length ? (align = typeof _ === "function" ? _ : constant(_), sankey) : align; + }; + + sankey.nodeSort = function(_) { + return arguments.length ? (sort = _, sankey) : sort; + }; + + sankey.nodeWidth = function(_) { + return arguments.length ? (dx = +_, sankey) : dx; + }; + + sankey.nodePadding = function(_) { + return arguments.length ? (dy = py = +_, sankey) : dy; + }; + + sankey.nodes = function(_) { + return arguments.length ? (nodes = typeof _ === "function" ? _ : constant(_), sankey) : nodes; + }; + + sankey.links = function(_) { + return arguments.length ? (links = typeof _ === "function" ? _ : constant(_), sankey) : links; + }; + + sankey.linkSort = function(_) { + return arguments.length ? (linkSort = _, sankey) : linkSort; + }; + + sankey.size = function(_) { + return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0]; + }; + + sankey.extent = function(_) { + return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]]; + }; + + sankey.iterations = function(_) { + return arguments.length ? (iterations = +_, sankey) : iterations; + }; + + function computeNodeLinks({nodes, links}) { + for (const [i, node] of nodes.entries()) { + node.index = i; + node.sourceLinks = []; + node.targetLinks = []; + } + const nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])); + for (const [i, link] of links.entries()) { + link.index = i; + let {source, target} = link; + if (typeof source !== "object") source = link.source = find(nodeById, source); + if (typeof target !== "object") target = link.target = find(nodeById, target); + source.sourceLinks.push(link); + target.targetLinks.push(link); + } + if (linkSort != null) { + for (const {sourceLinks, targetLinks} of nodes) { + sourceLinks.sort(linkSort); + targetLinks.sort(linkSort); + } + } + } + + function computeNodeValues({nodes}) { + for (const node of nodes) { + node.value = node.fixedValue === undefined + ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value)) + : node.fixedValue; + } + } + + function computeNodeDepths({nodes}) { + const n = nodes.length; + let current = new Set(nodes); + let next = new Set; + let x = 0; + while (current.size) { + for (const node of current) { + node.depth = x; + for (const {target} of node.sourceLinks) { + next.add(target); + } + } + if (++x > n) throw new Error("circular link"); + current = next; + next = new Set; + } + } + + function computeNodeHeights({nodes}) { + const n = nodes.length; + let current = new Set(nodes); + let next = new Set; + let x = 0; + while (current.size) { + for (const node of current) { + node.height = x; + for (const {source} of node.targetLinks) { + next.add(source); + } + } + if (++x > n) throw new Error("circular link"); + current = next; + next = new Set; + } + } + + function computeNodeLayers({nodes}) { + const x = max(nodes, d => d.depth) + 1; + const kx = (x1 - x0 - dx) / (x - 1); + const columns = new Array(x); + for (const node of nodes) { + const i = Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x)))); + node.layer = i; + node.x0 = x0 + i * kx; + node.x1 = node.x0 + dx; + if (columns[i]) columns[i].push(node); + else columns[i] = [node]; + } + if (sort) for (const column of columns) { + column.sort(sort); + } + return columns; + } + + function initializeNodeBreadths(columns) { + const ky = min(columns, c => (y1 - y0 - (c.length - 1) * py) / sum(c, value)); + for (const nodes of columns) { + let y = y0; + for (const node of nodes) { + node.y0 = y; + node.y1 = y + node.value * ky; + y = node.y1 + py; + for (const link of node.sourceLinks) { + link.width = link.value * ky; + } + } + y = (y1 - y + py) / (nodes.length + 1); + for (let i = 0; i < nodes.length; ++i) { + const node = nodes[i]; + node.y0 += y * (i + 1); + node.y1 += y * (i + 1); + } + reorderLinks(nodes); + } + } + + function computeNodeBreadths(graph) { + const columns = computeNodeLayers(graph); + py = Math.min(dy, (y1 - y0) / (max(columns, c => c.length) - 1)); + initializeNodeBreadths(columns); + for (let i = 0; i < iterations; ++i) { + const alpha = Math.pow(0.99, i); + const beta = Math.max(1 - alpha, (i + 1) / iterations); + relaxRightToLeft(columns, alpha, beta); + relaxLeftToRight(columns, alpha, beta); + } + } + + // Reposition each node based on its incoming (target) links. + function relaxLeftToRight(columns, alpha, beta) { + for (let i = 1, n = columns.length; i < n; ++i) { + const column = columns[i]; + for (const target of column) { + let y = 0; + let w = 0; + for (const {source, value} of target.targetLinks) { + let v = value * (target.layer - source.layer); + y += targetTop(source, target) * v; + w += v; + } + if (!(w > 0)) continue; + let dy = (y / w - target.y0) * alpha; + target.y0 += dy; + target.y1 += dy; + reorderNodeLinks(target); + } + if (sort === undefined) column.sort(ascendingBreadth); + resolveCollisions(column, beta); + } + } + + // Reposition each node based on its outgoing (source) links. + function relaxRightToLeft(columns, alpha, beta) { + for (let n = columns.length, i = n - 2; i >= 0; --i) { + const column = columns[i]; + for (const source of column) { + let y = 0; + let w = 0; + for (const {target, value} of source.sourceLinks) { + let v = value * (target.layer - source.layer); + y += sourceTop(source, target) * v; + w += v; + } + if (!(w > 0)) continue; + let dy = (y / w - source.y0) * alpha; + source.y0 += dy; + source.y1 += dy; + reorderNodeLinks(source); + } + if (sort === undefined) column.sort(ascendingBreadth); + resolveCollisions(column, beta); + } + } + + function resolveCollisions(nodes, alpha) { + const i = nodes.length >> 1; + const subject = nodes[i]; + resolveCollisionsBottomToTop(nodes, subject.y0 - py, i - 1, alpha); + resolveCollisionsTopToBottom(nodes, subject.y1 + py, i + 1, alpha); + resolveCollisionsBottomToTop(nodes, y1, nodes.length - 1, alpha); + resolveCollisionsTopToBottom(nodes, y0, 0, alpha); + } + + // Push any overlapping nodes down. + function resolveCollisionsTopToBottom(nodes, y, i, alpha) { + for (; i < nodes.length; ++i) { + const node = nodes[i]; + const dy = (y - node.y0) * alpha; + if (dy > 1e-6) node.y0 += dy, node.y1 += dy; + y = node.y1 + py; + } + } + + // Push any overlapping nodes up. + function resolveCollisionsBottomToTop(nodes, y, i, alpha) { + for (; i >= 0; --i) { + const node = nodes[i]; + const dy = (node.y1 - y) * alpha; + if (dy > 1e-6) node.y0 -= dy, node.y1 -= dy; + y = node.y0 - py; + } + } + + function reorderNodeLinks({sourceLinks, targetLinks}) { + if (linkSort === undefined) { + for (const {source: {sourceLinks}} of targetLinks) { + sourceLinks.sort(ascendingTargetBreadth); + } + for (const {target: {targetLinks}} of sourceLinks) { + targetLinks.sort(ascendingSourceBreadth); + } + } + } + + function reorderLinks(nodes) { + if (linkSort === undefined) { + for (const {sourceLinks, targetLinks} of nodes) { + sourceLinks.sort(ascendingTargetBreadth); + targetLinks.sort(ascendingSourceBreadth); + } + } + } + + // Returns the target.y0 that would produce an ideal link from source to target. + function targetTop(source, target) { + let y = source.y0 - (source.sourceLinks.length - 1) * py / 2; + for (const {target: node, width} of source.sourceLinks) { + if (node === target) break; + y += width + py; + } + for (const {source: node, width} of target.targetLinks) { + if (node === source) break; + y -= width; + } + return y; + } + + // Returns the source.y0 that would produce an ideal link from source to target. + function sourceTop(source, target) { + let y = target.y0 - (target.targetLinks.length - 1) * py / 2; + for (const {source: node, width} of target.targetLinks) { + if (node === source) break; + y += width + py; + } + for (const {target: node, width} of source.sourceLinks) { + if (node === target) break; + y -= width; + } + return y; + } + + return sankey; +} + +;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-path/src/path.js +var pi = Math.PI, + tau = 2 * pi, + epsilon = 1e-6, + tauEpsilon = tau - epsilon; + +function Path() { + this._x0 = this._y0 = // start of current subpath + this._x1 = this._y1 = null; // end of current subpath + this._ = ""; +} + +function path() { + return new Path; +} + +Path.prototype = path.prototype = { + constructor: Path, + moveTo: function(x, y) { + this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y); + }, + closePath: function() { + if (this._x1 !== null) { + this._x1 = this._x0, this._y1 = this._y0; + this._ += "Z"; + } + }, + lineTo: function(x, y) { + this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y); + }, + quadraticCurveTo: function(x1, y1, x, y) { + this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y); + }, + bezierCurveTo: function(x1, y1, x2, y2, x, y) { + this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y); + }, + arcTo: function(x1, y1, x2, y2, r) { + x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; + var x0 = this._x1, + y0 = this._y1, + x21 = x2 - x1, + y21 = y2 - y1, + x01 = x0 - x1, + y01 = y0 - y1, + l01_2 = x01 * x01 + y01 * y01; + + // Is the radius negative? Error. + if (r < 0) throw new Error("negative radius: " + r); + + // Is this path empty? Move to (x1,y1). + if (this._x1 === null) { + this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); + } + + // Or, is (x1,y1) coincident with (x0,y0)? Do nothing. + else if (!(l01_2 > epsilon)); + + // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear? + // Equivalently, is (x1,y1) coincident with (x2,y2)? + // Or, is the radius zero? Line to (x1,y1). + else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { + this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); + } + + // Otherwise, draw an arc! + else { + var x20 = x2 - x0, + y20 = y2 - y0, + l21_2 = x21 * x21 + y21 * y21, + l20_2 = x20 * x20 + y20 * y20, + l21 = Math.sqrt(l21_2), + l01 = Math.sqrt(l01_2), + l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), + t01 = l / l01, + t21 = l / l21; + + // If the start tangent is not coincident with (x0,y0), line to. + if (Math.abs(t01 - 1) > epsilon) { + this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); + } + + this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); + } + }, + arc: function(x, y, r, a0, a1, ccw) { + x = +x, y = +y, r = +r, ccw = !!ccw; + var dx = r * Math.cos(a0), + dy = r * Math.sin(a0), + x0 = x + dx, + y0 = y + dy, + cw = 1 ^ ccw, + da = ccw ? a0 - a1 : a1 - a0; + + // Is the radius negative? Error. + if (r < 0) throw new Error("negative radius: " + r); + + // Is this path empty? Move to (x0,y0). + if (this._x1 === null) { + this._ += "M" + x0 + "," + y0; + } + + // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0). + else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { + this._ += "L" + x0 + "," + y0; + } + + // Is this arc empty? We’re done. + if (!r) return; + + // Does the angle go the wrong way? Flip the direction. + if (da < 0) da = da % tau + tau; + + // Is this a complete circle? Draw two arcs to complete the circle. + if (da > tauEpsilon) { + this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); + } + + // Is this arc non-empty? Draw an arc! + else if (da > epsilon) { + this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1)); + } + }, + rect: function(x, y, w, h) { + this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z"; + }, + toString: function() { + return this._; + } +}; + +/* harmony default export */ const src_path = (path); + +;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-shape/src/array.js +var slice = Array.prototype.slice; + +;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-shape/src/constant.js +/* harmony default export */ function src_constant(x) { + return function constant() { + return x; + }; +} + +;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-shape/src/point.js +function point_x(p) { + return p[0]; +} + +function point_y(p) { + return p[1]; +} + +;// CONCATENATED MODULE: ./node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js + + + + + + +function linkSource(d) { + return d.source; +} + +function linkTarget(d) { + return d.target; +} + +function link_link(curve) { + var source = linkSource, + target = linkTarget, + x = point_x, + y = point_y, + context = null; + + function link() { + var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); + if (!context) context = buffer = src_path(); + curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv)); + if (buffer) return context = null, buffer + "" || null; + } + + link.source = function(_) { + return arguments.length ? (source = _, link) : source; + }; + + link.target = function(_) { + return arguments.length ? (target = _, link) : target; + }; + + link.x = function(_) { + return arguments.length ? (x = typeof _ === "function" ? _ : src_constant(+_), link) : x; + }; + + link.y = function(_) { + return arguments.length ? (y = typeof _ === "function" ? _ : src_constant(+_), link) : y; + }; + + link.context = function(_) { + return arguments.length ? ((context = _ == null ? null : _), link) : context; + }; + + return link; +} + +function curveHorizontal(context, x0, y0, x1, y1) { + context.moveTo(x0, y0); + context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); +} + +function curveVertical(context, x0, y0, x1, y1) { + context.moveTo(x0, y0); + context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1); +} + +function curveRadial(context, x0, y0, x1, y1) { + var p0 = pointRadial(x0, y0), + p1 = pointRadial(x0, y0 = (y0 + y1) / 2), + p2 = pointRadial(x1, y0), + p3 = pointRadial(x1, y1); + context.moveTo(p0[0], p0[1]); + context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]); +} + +function linkHorizontal() { + return link_link(curveHorizontal); +} + +function linkVertical() { + return link_link(curveVertical); +} + +function linkRadial() { + var l = link_link(curveRadial); + l.angle = l.x, delete l.x; + l.radius = l.y, delete l.y; + return l; +} + +;// CONCATENATED MODULE: ./node_modules/d3-sankey/src/sankeyLinkHorizontal.js + + +function horizontalSource(d) { + return [d.source.x1, d.y0]; +} + +function horizontalTarget(d) { + return [d.target.x0, d.y1]; +} + +/* harmony default export */ function sankeyLinkHorizontal() { + return linkHorizontal() + .source(horizontalSource) + .target(horizontalTarget); +} + +// EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js +var dayjs_min = __webpack_require__(4353); +// EXTERNAL MODULE: ./node_modules/@braintree/sanitize-url/dist/index.js +var dist = __webpack_require__(6750); +// EXTERNAL MODULE: ./node_modules/dompurify/dist/purify.es.mjs +var purify_es = __webpack_require__(9418); +;// CONCATENATED MODULE: ./node_modules/mermaid/dist/sankeyDiagram-97764748.js + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 9], $V1 = [1, 10], $V2 = [1, 5, 10, 12]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SANKEY": 4, "NEWLINE": 5, "csv": 6, "opt_eof": 7, "record": 8, "csv_tail": 9, "EOF": 10, "field[source]": 11, "COMMA": 12, "field[target]": 13, "field[value]": 14, "field": 15, "escaped": 16, "non_escaped": 17, "DQUOTE": 18, "ESCAPED_TEXT": 19, "NON_ESCAPED_TEXT": 20, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" }, + productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 7: + const source = yy.findOrCreateNode($$[$0 - 4].trim().replaceAll('""', '"')); + const target = yy.findOrCreateNode($$[$0 - 2].trim().replaceAll('""', '"')); + const value = parseFloat($$[$0].trim()); + yy.addLink(source, target, value); + break; + case 8: + case 9: + case 11: + this.$ = $$[$0]; + break; + case 10: + this.$ = $$[$0 - 1]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 1: [2, 6], 7: 11, 10: [1, 12] }, o($V1, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, o($V2, [2, 8]), o($V2, [2, 9]), { 19: [1, 16] }, o($V2, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, o($V1, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 15: 18, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 18: [1, 19] }, o($V1, [2, 3]), { 12: [1, 20] }, o($V2, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: $V0, 20: $V1 }, o([1, 5, 10], [2, 7])], + defaultActions: { 11: [2, 1], 12: [2, 5] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.pushState("csv"); + return 4; + case 1: + return 10; + case 2: + return 5; + case 3: + return 12; + case 4: + this.pushState("escaped_text"); + return 18; + case 5: + return 20; + case 6: + this.popState("escaped_text"); + return 18; + case 7: + return 19; + } + }, + rules: [/^(?:sankey-beta\b)/i, /^(?:$)/i, /^(?:((\u000D\u000A)|(\u000A)))/i, /^(?:(\u002C))/i, /^(?:(\u0022))/i, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i, /^(?:(\u0022)(?!(\u0022)))/i, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i], + conditions: { "csv": { "rules": [1, 2, 3, 4, 5, 6, 7], "inclusive": false }, "escaped_text": { "rules": [6, 7], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let links = []; +let nodes = []; +let nodesMap = {}; +const clear = () => { + links = []; + nodes = []; + nodesMap = {}; + (0,mermaid_f47111a7.v)(); +}; +class SankeyLink { + constructor(source, target, value = 0) { + this.source = source; + this.target = target; + this.value = value; + } +} +const addLink = (source, target, value) => { + links.push(new SankeyLink(source, target, value)); +}; +class SankeyNode { + constructor(ID) { + this.ID = ID; + } +} +const findOrCreateNode = (ID) => { + ID = mermaid_f47111a7.e.sanitizeText(ID, (0,mermaid_f47111a7.c)()); + if (!nodesMap[ID]) { + nodesMap[ID] = new SankeyNode(ID); + nodes.push(nodesMap[ID]); + } + return nodesMap[ID]; +}; +const getNodes = () => nodes; +const getLinks = () => links; +const getGraph = () => ({ + nodes: nodes.map((node) => ({ id: node.ID })), + links: links.map((link) => ({ + source: link.source.ID, + target: link.target.ID, + value: link.value + })) +}); +const db = { + nodesMap, + getConfig: () => (0,mermaid_f47111a7.c)().sankey, + getNodes, + getLinks, + getGraph, + addLink, + findOrCreateNode, + getAccTitle: mermaid_f47111a7.g, + setAccTitle: mermaid_f47111a7.s, + getAccDescription: mermaid_f47111a7.a, + setAccDescription: mermaid_f47111a7.b, + getDiagramTitle: mermaid_f47111a7.t, + setDiagramTitle: mermaid_f47111a7.q, + clear +}; +const _Uid = class _Uid2 { + static next(name) { + return new _Uid2(name + ++_Uid2.count); + } + constructor(id) { + this.id = id; + this.href = `#${id}`; + } + toString() { + return "url(" + this.href + ")"; + } +}; +_Uid.count = 0; +let Uid = _Uid; +const alignmentsMap = { + left: left, + right: right, + center: center, + justify: justify +}; +const draw = function(text, id, _version, diagObj) { + const { securityLevel, sankey: conf } = (0,mermaid_f47111a7.c)(); + const defaultSankeyConfig = mermaid_f47111a7.K.sankey; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,src/* select */.Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,src/* select */.Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,src/* select */.Ltv)("body"); + const svg = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : (0,src/* select */.Ltv)(`[id="${id}"]`); + const width = (conf == null ? void 0 : conf.width) ?? defaultSankeyConfig.width; + const height = (conf == null ? void 0 : conf.height) ?? defaultSankeyConfig.width; + const useMaxWidth = (conf == null ? void 0 : conf.useMaxWidth) ?? defaultSankeyConfig.useMaxWidth; + const nodeAlignment = (conf == null ? void 0 : conf.nodeAlignment) ?? defaultSankeyConfig.nodeAlignment; + const prefix = (conf == null ? void 0 : conf.prefix) ?? defaultSankeyConfig.prefix; + const suffix = (conf == null ? void 0 : conf.suffix) ?? defaultSankeyConfig.suffix; + const showValues = (conf == null ? void 0 : conf.showValues) ?? defaultSankeyConfig.showValues; + const graph = diagObj.db.getGraph(); + const nodeAlign = alignmentsMap[nodeAlignment]; + const nodeWidth = 10; + const sankey$1 = Sankey().nodeId((d) => d.id).nodeWidth(nodeWidth).nodePadding(10 + (showValues ? 15 : 0)).nodeAlign(nodeAlign).extent([ + [0, 0], + [width, height] + ]); + sankey$1(graph); + const colorScheme = (0,src/* scaleOrdinal */.UMr)(src/* schemeTableau10 */.zt); + svg.append("g").attr("class", "nodes").selectAll(".node").data(graph.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = Uid.next("node-")).id).attr("transform", function(d) { + return "translate(" + d.x0 + "," + d.y0 + ")"; + }).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => { + return d.y1 - d.y0; + }).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => colorScheme(d.id)); + const getText = ({ id: id2, value }) => { + if (!showValues) { + return id2; + } + return `${id2} +${prefix}${Math.round(value * 100) / 100}${suffix}`; + }; + svg.append("g").attr("class", "node-labels").attr("font-family", "sans-serif").attr("font-size", 14).selectAll("text").data(graph.nodes).join("text").attr("x", (d) => d.x0 < width / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${showValues ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < width / 2 ? "start" : "end").text(getText); + const link = svg.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(graph.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"); + const linkColor = (conf == null ? void 0 : conf.linkColor) || "gradient"; + if (linkColor === "gradient") { + const gradient = link.append("linearGradient").attr("id", (d) => (d.uid = Uid.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (d) => d.source.x1).attr("x2", (d) => d.target.x0); + gradient.append("stop").attr("offset", "0%").attr("stop-color", (d) => colorScheme(d.source.id)); + gradient.append("stop").attr("offset", "100%").attr("stop-color", (d) => colorScheme(d.target.id)); + } + let coloring; + switch (linkColor) { + case "gradient": + coloring = (d) => d.uid; + break; + case "source": + coloring = (d) => colorScheme(d.source.id); + break; + case "target": + coloring = (d) => colorScheme(d.target.id); + break; + default: + coloring = linkColor; + } + link.append("path").attr("d", sankeyLinkHorizontal()).attr("stroke", coloring).attr("stroke-width", (d) => Math.max(1, d.width)); + (0,mermaid_f47111a7.o)(void 0, svg, 0, useMaxWidth); +}; +const renderer = { + draw +}; +const prepareTextForParsing = (text) => { + const textToParse = text.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, "\n").trim(); + return textToParse; +}; +const originalParse = parser$1.parse.bind(parser$1); +parser$1.parse = (text) => originalParse(prepareTextForParsing(text)); +const diagram = { + parser: parser$1, + db, + renderer +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/469.5198d491.js b/assets/js/469.5198d491.js new file mode 100644 index 00000000..d7dbcdf6 --- /dev/null +++ b/assets/js/469.5198d491.js @@ -0,0 +1,540 @@ +"use strict"; +exports.id = 469; +exports.ids = [469]; +exports.modules = { + +/***/ 9469: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6750); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6312); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9418); + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 9, 10]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "info": 4, "document": 5, "EOF": 6, "line": 7, "statement": 8, "NL": 9, "showInfo": 10, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "info", 6: "EOF", 9: "NL", 10: "showInfo" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + $$.length - 1; + switch (yystate) { + case 1: + return yy; + case 4: + break; + case 6: + yy.setInfo(true); + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, o($V0, [2, 3]), o($V0, [2, 4]), o($V0, [2, 5]), o($V0, [2, 6])], + defaultActions: { 4: [2, 1] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 4; + case 1: + return 9; + case 2: + return "space"; + case 3: + return 10; + case 4: + return 6; + case 5: + return "TXT"; + } + }, + rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "INITIAL": { "rules": [0, 1, 2, 3, 4, 5], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const DEFAULT_INFO_DB = { + info: false +}; +let info = DEFAULT_INFO_DB.info; +const setInfo = (toggle) => { + info = toggle; +}; +const getInfo = () => info; +const clear = () => { + info = DEFAULT_INFO_DB.info; +}; +const db = { + clear, + setInfo, + getInfo +}; +const draw = (text, id, version) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("rendering info diagram\n" + text); + const svg = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.A)(id); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.i)(svg, 100, 400, true); + const group = svg.append("g"); + group.append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${version}`); +}; +const renderer = { draw }; +const diagram = { + parser: parser$1, + db, + renderer +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/4f9ad5cc.d8973fd1.js b/assets/js/4f9ad5cc.d8973fd1.js new file mode 100644 index 00000000..d0b3f52c --- /dev/null +++ b/assets/js/4f9ad5cc.d8973fd1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[4828],{2519:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>d,toc:()=>o});var s=t(4848),i=t(8453);const r={sidebar_position:1},a="Basic usage",d={id:"about/usage/basic-usage",title:"Basic usage",description:"The module is imported with",source:"@site/docs/about/usage/basic-usage.md",sourceDirName:"about/usage",slug:"/about/usage/basic-usage",permalink:"/tagreader-python/docs/about/usage/basic-usage",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/about/usage/basic-usage.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"about",previous:{title:"Usage",permalink:"/tagreader-python/docs/category/usage"},next:{title:"Data sources",permalink:"/tagreader-python/docs/about/usage/data-source"}},l={},o=[{value:"The Client",id:"the-client",level:2},{value:"Creating a client",id:"creating-a-client",level:2},{value:"Connecting to data source",id:"connecting-to-data-source",level:2},{value:"Searching for tags",id:"searching-for-tags",level:2},{value:"Reading data",id:"reading-data",level:2},{value:"Selecting what to read",id:"selecting-what-to-read",level:2},{value:"Status information",id:"status-information",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"basic-usage",children:"Basic usage"})}),"\n",(0,s.jsx)(n.p,{children:"The module is imported with"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"import tagreader\n"})}),"\n",(0,s.jsx)(n.h2,{id:"the-client",children:"The Client"}),"\n",(0,s.jsx)(n.p,{children:"The client presents the interface for communicating with the data source to the user. The interface shall be as unified\nas possible, regardless of the IMS type that is used. A handler object specifically designed for each IMS type is\nattached to the client when the client is created. The handler is responsible for handling the communication and data\ninterpretation between the server and the client object."}),"\n",(0,s.jsxs)(n.admonition,{title:"SSL verification",type:"info",children:[(0,s.jsx)(n.p,{children:"Equinor root certificates are automatically added when using an Equinor Managed computer, which allow SSL verification."}),(0,s.jsxs)(n.p,{children:["For non-Equinor users: If you run info SSL verification errors and prefer to not set ",(0,s.jsx)(n.code,{children:"verifySSL=False"})," ,\nyou can try the procedure outlined ",(0,s.jsx)(n.a,{href:"https://incognitjoe.github.io/adding-certs-to-requests.html",children:"here"}),"."]})]}),"\n",(0,s.jsxs)(n.admonition,{title:"ODBC support",type:"info",children:[(0,s.jsxs)(n.p,{children:["Tagreader as of version 5 does no longer support ODBC clients, which has been deprecated in favor of REST services.\nTo use ODBC, please refer to ",(0,s.jsx)(n.a,{href:"https://pypi.org/project/tagreader/#history",children:"Tagreader v4 on PyPI"}),".\nVersioned documentation is available in the source code on ",(0,s.jsx)(n.a,{href:"https://github.com/equinor/tagreader-python/releases",children:"GitHub Releases"}),"."]}),(0,s.jsx)(n.p,{children:"Use at your own discretion."})]}),"\n",(0,s.jsx)(n.h2,{id:"creating-a-client",children:"Creating a client"}),"\n",(0,s.jsxs)(n.p,{children:["A connection to a data source is prepared by creating an instance of ",(0,s.jsx)(n.code,{children:"tagreader.IMSClient"})," with the following input\narguments:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"datasource"})," : Name of data source"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"imstype"})," : The name of the ",(0,s.jsx)(n.a,{href:"/docs/about/usage/data-source",children:"IMS type"})," to query. Indicates the type of data source\nthat is requested, and therefore determines which handler type to use. Valid values are\n",(0,s.jsx)(n.code,{children:"piwebapi"})," and ",(0,s.jsx)(n.code,{children:"aspenone"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"tz"})," (optional): Time zone naive time stamps will be interpreted as belonging to this time zone. Similarly,\nthe returned data points will be localized to this time zone. ",(0,s.jsx)(n.strong,{children:"Default"}),": ",(0,s.jsx)(n.em,{children:'"Europe/Oslo"'}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The following input arguments can be used when connecting to either ",(0,s.jsx)(n.code,{children:"piwebapi"})," or to ",(0,s.jsx)(n.code,{children:"aspenone"}),". None of these\nshould be necessary to supply when connecting to Equinor servers."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"url"})," (optional): Path to server root, e.g. ",(0,s.jsxs)(n.em,{children:['"',(0,s.jsx)(n.a,{href:"https://aspenone/ProcessData/AtProcessDataREST.dll",children:"https://aspenone/ProcessData/AtProcessDataREST.dll"}),'"']}),"\nor ",(0,s.jsxs)(n.em,{children:['"',(0,s.jsx)(n.a,{href:"https://piwebapi/piwebapi",children:"https://piwebapi/piwebapi"}),'"']}),". ",(0,s.jsx)(n.strong,{children:"Default"}),": Path to Equinor server corresponding to selected ",(0,s.jsx)(n.code,{children:"imstype"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"verifySSL"})," (optional): Whether to verify SSL certificate sent from server. ",(0,s.jsx)(n.strong,{children:"Default"}),": ",(0,s.jsx)(n.code,{children:"True"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"auth"})," (optional): Auth object to pass to the server for authentication. ",(0,s.jsx)(n.strong,{children:"Default"}),": Kerberos-based auth object\nthat works with Equinor servers."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"cache"})," (optional): ",(0,s.jsx)(n.a,{href:"/tagreader-python/docs/about/usage/caching",children:"Cache"})," data locally in order to avoid re-reading the same data multiple times."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"connecting-to-data-source",children:"Connecting to data source"}),"\n",(0,s.jsxs)(n.p,{children:["After creating the client as described above, connect to the server with the ",(0,s.jsx)(n.code,{children:"connect()"})," method."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Example"})}),"\n",(0,s.jsx)(n.p,{children:"Connecting to the PINO PI data source using REST Web API:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'c = tagreader.IMSClient("PINO", "piwebapi")\nc.connect()\n'})}),"\n",(0,s.jsx)(n.p,{children:"Connecting to the Peregrino IP.21 data source using AspenTech Process Data REST Web API, specifying that all naive time\nstamps as well as the returned data shall use Rio local time, and using the local endpoint in Brazil:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'c = tagreader.IMSClient(datasource="PER",\n imstype="aspenone",\n tz="Brazil/East",\n url="https://aspenone-per.equinor.com/ProcessExplorer/ProcessData/AtProcessDataREST.dll")\nc.connect()\n'})}),"\n",(0,s.jsx)(n.p,{children:"Connecting to some other AspenTech Web API URL using NTLM authentication instead of default Kerberos and ignoring the\nserver's host certificate:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'import getpass\nfrom requests_ntlm import HttpNtlmAuth\nuser = "mydomain\\\\" + getpass.getuser()\npwd = getpass.getpass()\nauth = HttpNtlmAuth(user, pwd)\nc = tagreader.IMSClient(datasource="myplant",\n url="https://api.mycompany.com/aspenone",\n imstype="aspenone",\n auth=auth,\n verifySSL=False)\nc.connect()\n'})}),"\n",(0,s.jsx)(n.h2,{id:"searching-for-tags",children:"Searching for tags"}),"\n",(0,s.jsxs)(n.p,{children:["The client method ",(0,s.jsx)(n.code,{children:"search()"})," can be used to search for tags using either tag name, tag description or both."]}),"\n",(0,s.jsx)(n.p,{children:"Supply at least one of the following arguments:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"tag"})," : Name of tag"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"desc"})," : Description of tag"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"If both arguments are provided, the both must match."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"*"})," can be used as wildcard."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Examples"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'c = tagreader.IMSClient("PINO", "piwebapi")\nc.connect()\nc.search("cd*158")\nc.search(desc="*reactor*")\nc.search(tag="BA:*", desc="*Temperature*")\n'})}),"\n",(0,s.jsx)(n.h2,{id:"reading-data",children:"Reading data"}),"\n",(0,s.jsxs)(n.p,{children:["Data is read by calling the client method ",(0,s.jsx)(n.code,{children:"read()"})," with the following input arguments:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"tags"})," : List of tagnames. Wildcards are not allowed."]}),"\n",(0,s.jsxs)(n.p,{children:["Tags with maps (relevant for some InfoPlus.21 servers) can be on the form ",(0,s.jsx)(n.code,{children:"'tag;map'"})," , e.g. ",(0,s.jsx)(n.code,{children:"'109-HIC005;CS A_AUTO'"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"start_time"})," : Start of time period."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"end_time"})," : End of time period."]}),"\n",(0,s.jsxs)(n.p,{children:["Both ",(0,s.jsx)(n.code,{children:"start_time"})," and ",(0,s.jsx)(n.code,{children:"end_time"})," can be either datetime object or string. Strings are interpreted by the"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Timestamp.html",children:"Timestamp"})," method from Pandas.\nBoth timestamps can be left out when ",(0,s.jsx)(n.code,{children:"read_type = ReaderType.SNAPSHOT"})," . However, when using either of the Web APIs, ",(0,s.jsx)(n.code,{children:"end_time"})," provides the time at which the snapshot is taken."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"ts"})," : The interval between samples when querying interpolated or aggregated data. Ignored and can be left out when\n",(0,s.jsx)(n.code,{children:"read_type = ReaderType.SNAPSHOT"})," . ",(0,s.jsx)(n.strong,{children:"Default"})," 60 seconds."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"read_type"})," (optional): What kind of data to read. More info immediately below. ",(0,s.jsx)(n.strong,{children:"Default"})," Interpolated."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"get_status"})," (optonal): When set to ",(0,s.jsx)(n.code,{children:"True"})," will fetch status information in addition to values. ",(0,s.jsx)(n.strong,{children:"Default"})," ",(0,s.jsx)(n.code,{children:"False"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"selecting-what-to-read",children:"Selecting what to read"}),"\n",(0,s.jsxs)(n.p,{children:["By specifying the optional parameter ",(0,s.jsx)(n.code,{children:"read_type"})," to ",(0,s.jsx)(n.code,{children:"read()"})," , it is possible to specify what kind of data should be\nreturned. The default query method is interpolated. All valid values for ",(0,s.jsx)(n.code,{children:"read_type"})," are defined in the\n",(0,s.jsx)(n.code,{children:"utils.ReaderType"})," class (mirrored for convenience as ",(0,s.jsx)(n.code,{children:"tagreader.ReaderType"})," ), although not all are currently\nimplemented. Below is the list of implemented read types."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"INT"})," : The raw data points are interpolated so that one new data point is generated at each step of length ",(0,s.jsx)(n.code,{children:"ts"})]}),"\n",(0,s.jsxs)(n.li,{children:["starting at ",(0,s.jsx)(n.code,{children:"start_time"})," and ending at or less than ",(0,s.jsx)(n.code,{children:"ts"})," seconds before ",(0,s.jsx)(n.code,{children:"end_time"})," ."]}),"\n",(0,s.jsxs)(n.li,{children:["The following aggregated read types perform a weighted calculation of the raw data within each interval.\nWhere relevant, time-weighted calculations are used. Returned time stamps are anchored at the beginning of each\ninterval. So for the 60 seconds long interval between 08:11:00 and 08:12:00, the time stamp will be 08:11:00.","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"MIN"})," : The minimum value."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"MAX"})," : The maximum value."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"AVG"})," : The average value."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"VAR"})," : The variance."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"STD"})," : The standard deviation."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"RNG"})," : The range (max-min)."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"RAW"})," : Returns actual data points stored in the database."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"SNAPSHOT"})," : Returns the last recorded value. Only one tag can be read at a time. When using either of the Web API\nbased handlers, providing ",(0,s.jsx)(n.code,{children:"end_time"})," is possible in which case a snapshot at the specific time is returned."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Examples"})}),"\n",(0,s.jsx)(n.p,{children:"Read interpolated data for the provided tag with 3-minute intervals between the two time stamps:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"c = tagreader.IMSClient(\"PINO\", \"piwebapi\")\nc.connect()\ndf = c.read(['BA:ACTIVE.1'], '05-Jan-2020 08:00:00', '05/01/20 11:30am', 180)\n\n"})}),"\n",(0,s.jsx)(n.p,{children:"Read the average value for the two provided tags within each 3-minute interval between the two time stamps:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"df = c.read(['BA:CONC.1'], '05-Jan-2020 08:00:00', '05/01/20 11:30am', 180, read_type=tagreader.ReaderType.AVG)\n"})}),"\n",(0,s.jsx)(n.h2,{id:"status-information",children:"Status information"}),"\n",(0,s.jsxs)(n.p,{children:["The optional parameter ",(0,s.jsx)(n.code,{children:"get_status"})," was added to ",(0,s.jsx)(n.code,{children:"IMSClient.read()"})," in release 2.6.0. If set to ",(0,s.jsx)(n.code,{children:"True"}),", the resulting\ndataframe will be expanded with one additional column per tag. The column contains integer numbers that indicate the\nstatus, or quality, of the returned values."]}),"\n",(0,s.jsx)(n.p,{children:"In an effort to unify the status value for all IMS types, the following schema based on AspenTech was selected:"}),"\n",(0,s.jsx)(n.p,{children:"0: Good\n1: Suspect\n2: Bad\n4: Good/Modified\n5: Suspect/Modified\n6: Bad/Modified"}),"\n",(0,s.jsx)(n.p,{children:"The status value is obtained differently for the four IMS types:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Aspen Web API: Read directly from the ",(0,s.jsx)(n.code,{children:"l"}),' ("Level") field in the json output.']}),"\n",(0,s.jsxs)(n.li,{children:["PI Web API: Calculated as ",(0,s.jsx)(n.code,{children:"Questionable"})," + 2 * (1 - ",(0,s.jsx)(n.code,{children:"Good"}),") + 4 * ",(0,s.jsx)(n.code,{children:"Substituted"}),".\nnegative for various reasons for being bad."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For the two PI IMS types, it is assumed that ",(0,s.jsx)(n.code,{children:"Questionable"})," is never ",(0,s.jsx)(n.code,{children:"True"})," if ",(0,s.jsx)(n.code,{children:"Good"})," is ",(0,s.jsx)(n.code,{children:"False"})," or ",(0,s.jsx)(n.code,{children:"status != 0"}),".\nThis may be an incorrect assumption with resulting erroneous status value."]}),"\n",(0,s.jsx)(n.p,{children:"In summary, here is the resulting status value from tagreader for different combinations of status field values from\nthe IMS types:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"tagreader"}),(0,s.jsx)(n.th,{style:{textAlign:"center"},children:"Aspen Web API"}),(0,s.jsx)(n.th,{style:{textAlign:"left"},children:"PI Web API"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"0"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"l = 0"}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Good = True",(0,s.jsx)("br",{})," Questionable = False",(0,s.jsx)("br",{})," Substituted = False"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"1"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"l = 1"}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Good = True",(0,s.jsx)("br",{})," Questionable = True",(0,s.jsx)("br",{})," Substituted = False"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"2"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"l = 2"}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Good = False",(0,s.jsx)("br",{})," Questionable = False",(0,s.jsx)("br",{})," Substituted = False"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"4"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"l = 4"}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Good = True",(0,s.jsx)("br",{})," Questionable = False",(0,s.jsx)("br",{})," Substituted = True"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"5"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"l = 5"}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Good = True",(0,s.jsx)("br",{})," Questionable = True",(0,s.jsx)("br",{})," Substituted = True"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"6"}),(0,s.jsx)(n.td,{style:{textAlign:"center"},children:"l = 6"}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Good = False",(0,s.jsx)("br",{})," Questionable = False",(0,s.jsx)("br",{})," Substituted = True"]})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:["Please keep in mind when using ",(0,s.jsx)(n.code,{children:"get_status"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"This is an experimental feature. It may work as intended, or it may result in erroneous status values in some cases.\nIf that happens, please create an issue."}),"\n",(0,s.jsx)(n.li,{children:"Both how fetching status is activated and how it is returned may be changed at a later time."}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}}}]); \ No newline at end of file diff --git a/assets/js/506.f8e135de.js b/assets/js/506.f8e135de.js new file mode 100644 index 00000000..0cdee390 --- /dev/null +++ b/assets/js/506.f8e135de.js @@ -0,0 +1,1820 @@ +"use strict"; +exports.id = 506; +exports.ids = [506]; +exports.modules = { + +/***/ 6506: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9418); + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 6], $V2 = [1, 4], $V3 = [1, 5], $V4 = [2, 5], $V5 = [1, 12], $V6 = [5, 7, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40, 47], $V7 = [7, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40], $V8 = [7, 12, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40], $V9 = [7, 13, 47], $Va = [1, 42], $Vb = [1, 41], $Vc = [7, 13, 29, 32, 35, 38, 47], $Vd = [1, 55], $Ve = [1, 56], $Vf = [1, 57], $Vg = [7, 13, 32, 35, 42, 47]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "GG": 5, "document": 6, "EOF": 7, ":": 8, "DIR": 9, "options": 10, "body": 11, "OPT": 12, "NL": 13, "line": 14, "statement": 15, "commitStatement": 16, "mergeStatement": 17, "cherryPickStatement": 18, "acc_title": 19, "acc_title_value": 20, "acc_descr": 21, "acc_descr_value": 22, "acc_descr_multiline_value": 23, "section": 24, "branchStatement": 25, "CHECKOUT": 26, "ref": 27, "BRANCH": 28, "ORDER": 29, "NUM": 30, "CHERRY_PICK": 31, "COMMIT_ID": 32, "STR": 33, "PARENT_COMMIT": 34, "COMMIT_TAG": 35, "EMPTYSTR": 36, "MERGE": 37, "COMMIT_TYPE": 38, "commitType": 39, "COMMIT": 40, "commit_arg": 41, "COMMIT_MSG": 42, "NORMAL": 43, "REVERSE": 44, "HIGHLIGHT": 45, "ID": 46, ";": 47, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "GG", 7: "EOF", 8: ":", 9: "DIR", 12: "OPT", 13: "NL", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "section", 26: "CHECKOUT", 28: "BRANCH", 29: "ORDER", 30: "NUM", 31: "CHERRY_PICK", 32: "COMMIT_ID", 33: "STR", 34: "PARENT_COMMIT", 35: "COMMIT_TAG", 36: "EMPTYSTR", 37: "MERGE", 38: "COMMIT_TYPE", 40: "COMMIT", 42: "COMMIT_MSG", 43: "NORMAL", 44: "REVERSE", 45: "HIGHLIGHT", 46: "ID", 47: ";" }, + productions_: [0, [3, 2], [3, 3], [3, 4], [3, 5], [6, 0], [6, 2], [10, 2], [10, 1], [11, 0], [11, 2], [14, 2], [14, 1], [15, 1], [15, 1], [15, 1], [15, 2], [15, 2], [15, 1], [15, 1], [15, 1], [15, 2], [25, 2], [25, 4], [18, 3], [18, 5], [18, 5], [18, 7], [18, 7], [18, 5], [18, 5], [18, 5], [18, 7], [18, 7], [18, 7], [18, 7], [17, 2], [17, 4], [17, 4], [17, 4], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [16, 2], [16, 3], [16, 3], [16, 5], [16, 5], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [41, 0], [41, 1], [39, 1], [39, 1], [39, 1], [27, 1], [27, 1], [4, 1], [4, 1], [4, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 2: + return $$[$0]; + case 3: + return $$[$0 - 1]; + case 4: + yy.setDirection($$[$0 - 3]); + return $$[$0 - 1]; + case 6: + yy.setOptions($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 7: + $$[$0 - 1] += $$[$0]; + this.$ = $$[$0 - 1]; + break; + case 9: + this.$ = []; + break; + case 10: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 11: + this.$ = $$[$0 - 1]; + break; + case 16: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 17: + case 18: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 19: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 21: + yy.checkout($$[$0]); + break; + case 22: + yy.branch($$[$0]); + break; + case 23: + yy.branch($$[$0 - 2], $$[$0]); + break; + case 24: + yy.cherryPick($$[$0], "", void 0); + break; + case 25: + yy.cherryPick($$[$0 - 2], "", void 0, $$[$0]); + break; + case 26: + yy.cherryPick($$[$0 - 2], "", $$[$0]); + break; + case 27: + yy.cherryPick($$[$0 - 4], "", $$[$0], $$[$0 - 2]); + break; + case 28: + yy.cherryPick($$[$0 - 4], "", $$[$0 - 2], $$[$0]); + break; + case 29: + yy.cherryPick($$[$0], "", $$[$0 - 2]); + break; + case 30: + yy.cherryPick($$[$0], "", ""); + break; + case 31: + yy.cherryPick($$[$0 - 2], "", ""); + break; + case 32: + yy.cherryPick($$[$0 - 4], "", "", $$[$0 - 2]); + break; + case 33: + yy.cherryPick($$[$0 - 4], "", "", $$[$0]); + break; + case 34: + yy.cherryPick($$[$0 - 2], "", $$[$0 - 4], $$[$0]); + break; + case 35: + yy.cherryPick($$[$0 - 2], "", "", $$[$0]); + break; + case 36: + yy.merge($$[$0], "", "", ""); + break; + case 37: + yy.merge($$[$0 - 2], $$[$0], "", ""); + break; + case 38: + yy.merge($$[$0 - 2], "", $$[$0], ""); + break; + case 39: + yy.merge($$[$0 - 2], "", "", $$[$0]); + break; + case 40: + yy.merge($$[$0 - 4], $$[$0], "", $$[$0 - 2]); + break; + case 41: + yy.merge($$[$0 - 4], "", $$[$0], $$[$0 - 2]); + break; + case 42: + yy.merge($$[$0 - 4], "", $$[$0 - 2], $$[$0]); + break; + case 43: + yy.merge($$[$0 - 4], $$[$0 - 2], $$[$0], ""); + break; + case 44: + yy.merge($$[$0 - 4], $$[$0 - 2], "", $$[$0]); + break; + case 45: + yy.merge($$[$0 - 4], $$[$0], $$[$0 - 2], ""); + break; + case 46: + yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 47: + yy.merge($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]); + break; + case 48: + yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]); + break; + case 49: + yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 50: + yy.merge($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]); + break; + case 51: + yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 52: + yy.commit($$[$0]); + break; + case 53: + yy.commit("", "", yy.commitType.NORMAL, $$[$0]); + break; + case 54: + yy.commit("", "", $$[$0], ""); + break; + case 55: + yy.commit("", "", $$[$0], $$[$0 - 2]); + break; + case 56: + yy.commit("", "", $$[$0 - 2], $$[$0]); + break; + case 57: + yy.commit("", $$[$0], yy.commitType.NORMAL, ""); + break; + case 58: + yy.commit("", $$[$0 - 2], yy.commitType.NORMAL, $$[$0]); + break; + case 59: + yy.commit("", $$[$0], yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 60: + yy.commit("", $$[$0 - 2], $$[$0], ""); + break; + case 61: + yy.commit("", $$[$0], $$[$0 - 2], ""); + break; + case 62: + yy.commit("", $$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 63: + yy.commit("", $$[$0 - 4], $$[$0], $$[$0 - 2]); + break; + case 64: + yy.commit("", $$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 65: + yy.commit("", $$[$0], $$[$0 - 4], $$[$0 - 2]); + break; + case 66: + yy.commit("", $$[$0], $$[$0 - 2], $$[$0 - 4]); + break; + case 67: + yy.commit("", $$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 68: + yy.commit($$[$0], "", yy.commitType.NORMAL, ""); + break; + case 69: + yy.commit($$[$0], "", yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 70: + yy.commit($$[$0 - 2], "", yy.commitType.NORMAL, $$[$0]); + break; + case 71: + yy.commit($$[$0 - 2], "", $$[$0], ""); + break; + case 72: + yy.commit($$[$0], "", $$[$0 - 2], ""); + break; + case 73: + yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, ""); + break; + case 74: + yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, ""); + break; + case 75: + yy.commit($$[$0 - 4], "", $$[$0 - 2], $$[$0]); + break; + case 76: + yy.commit($$[$0 - 4], "", $$[$0], $$[$0 - 2]); + break; + case 77: + yy.commit($$[$0 - 2], "", $$[$0 - 4], $$[$0]); + break; + case 78: + yy.commit($$[$0], "", $$[$0 - 4], $$[$0 - 2]); + break; + case 79: + yy.commit($$[$0], "", $$[$0 - 2], $$[$0 - 4]); + break; + case 80: + yy.commit($$[$0 - 2], "", $$[$0], $$[$0 - 4]); + break; + case 81: + yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], ""); + break; + case 82: + yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], ""); + break; + case 83: + yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], ""); + break; + case 84: + yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], ""); + break; + case 85: + yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], ""); + break; + case 86: + yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], ""); + break; + case 87: + yy.commit($$[$0 - 4], $$[$0], yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 88: + yy.commit($$[$0 - 4], $$[$0 - 2], yy.commitType.NORMAL, $$[$0]); + break; + case 89: + yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, $$[$0 - 4]); + break; + case 90: + yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, $$[$0 - 4]); + break; + case 91: + yy.commit($$[$0], $$[$0 - 4], yy.commitType.NORMAL, $$[$0 - 2]); + break; + case 92: + yy.commit($$[$0 - 2], $$[$0 - 4], yy.commitType.NORMAL, $$[$0]); + break; + case 93: + yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]); + break; + case 94: + yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]); + break; + case 95: + yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]); + break; + case 96: + yy.commit($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]); + break; + case 97: + yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]); + break; + case 98: + yy.commit($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]); + break; + case 99: + yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0 - 2], $$[$0]); + break; + case 100: + yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0], $$[$0 - 2]); + break; + case 101: + yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0 - 4], $$[$0]); + break; + case 102: + yy.commit($$[$0], $$[$0 - 6], $$[$0 - 4], $$[$0 - 2]); + break; + case 103: + yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0], $$[$0 - 4]); + break; + case 104: + yy.commit($$[$0], $$[$0 - 6], $$[$0 - 2], $$[$0 - 4]); + break; + case 105: + yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], $$[$0 - 6]); + break; + case 106: + yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], $$[$0 - 6]); + break; + case 107: + yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], $$[$0 - 6]); + break; + case 108: + yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], $$[$0 - 6]); + break; + case 109: + yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], $$[$0 - 6]); + break; + case 110: + yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 6]); + break; + case 111: + yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0 - 6], $$[$0]); + break; + case 112: + yy.commit($$[$0], $$[$0 - 4], $$[$0 - 6], $$[$0 - 2]); + break; + case 113: + yy.commit($$[$0 - 2], $$[$0], $$[$0 - 6], $$[$0 - 4]); + break; + case 114: + yy.commit($$[$0], $$[$0 - 2], $$[$0 - 6], $$[$0 - 4]); + break; + case 115: + yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0 - 6], $$[$0]); + break; + case 116: + yy.commit($$[$0 - 4], $$[$0], $$[$0 - 6], $$[$0 - 2]); + break; + case 117: + this.$ = ""; + break; + case 118: + this.$ = $$[$0]; + break; + case 119: + this.$ = yy.commitType.NORMAL; + break; + case 120: + this.$ = yy.commitType.REVERSE; + break; + case 121: + this.$ = yy.commitType.HIGHLIGHT; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: $V0, 7: $V1, 13: $V2, 47: $V3 }, { 1: [3] }, { 3: 7, 4: 2, 5: $V0, 7: $V1, 13: $V2, 47: $V3 }, { 6: 8, 7: $V4, 8: [1, 9], 9: [1, 10], 10: 11, 13: $V5 }, o($V6, [2, 124]), o($V6, [2, 125]), o($V6, [2, 126]), { 1: [2, 1] }, { 7: [1, 13] }, { 6: 14, 7: $V4, 10: 11, 13: $V5 }, { 8: [1, 15] }, o($V7, [2, 9], { 11: 16, 12: [1, 17] }), o($V8, [2, 8]), { 1: [2, 2] }, { 7: [1, 18] }, { 6: 19, 7: $V4, 10: 11, 13: $V5 }, { 7: [2, 6], 13: [1, 22], 14: 20, 15: 21, 16: 23, 17: 24, 18: 25, 19: [1, 26], 21: [1, 27], 23: [1, 28], 24: [1, 29], 25: 30, 26: [1, 31], 28: [1, 35], 31: [1, 34], 37: [1, 33], 40: [1, 32] }, o($V8, [2, 7]), { 1: [2, 3] }, { 7: [1, 36] }, o($V7, [2, 10]), { 4: 37, 7: $V1, 13: $V2, 47: $V3 }, o($V7, [2, 12]), o($V9, [2, 13]), o($V9, [2, 14]), o($V9, [2, 15]), { 20: [1, 38] }, { 22: [1, 39] }, o($V9, [2, 18]), o($V9, [2, 19]), o($V9, [2, 20]), { 27: 40, 33: $Va, 46: $Vb }, o($V9, [2, 117], { 41: 43, 32: [1, 46], 33: [1, 48], 35: [1, 44], 38: [1, 45], 42: [1, 47] }), { 27: 49, 33: $Va, 46: $Vb }, { 32: [1, 50], 35: [1, 51] }, { 27: 52, 33: $Va, 46: $Vb }, { 1: [2, 4] }, o($V7, [2, 11]), o($V9, [2, 16]), o($V9, [2, 17]), o($V9, [2, 21]), o($Vc, [2, 122]), o($Vc, [2, 123]), o($V9, [2, 52]), { 33: [1, 53] }, { 39: 54, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 58] }, { 33: [1, 59] }, o($V9, [2, 118]), o($V9, [2, 36], { 32: [1, 60], 35: [1, 62], 38: [1, 61] }), { 33: [1, 63] }, { 33: [1, 64], 36: [1, 65] }, o($V9, [2, 22], { 29: [1, 66] }), o($V9, [2, 53], { 32: [1, 68], 38: [1, 67], 42: [1, 69] }), o($V9, [2, 54], { 32: [1, 71], 35: [1, 70], 42: [1, 72] }), o($Vg, [2, 119]), o($Vg, [2, 120]), o($Vg, [2, 121]), o($V9, [2, 57], { 35: [1, 73], 38: [1, 74], 42: [1, 75] }), o($V9, [2, 68], { 32: [1, 78], 35: [1, 76], 38: [1, 77] }), { 33: [1, 79] }, { 39: 80, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 81] }, o($V9, [2, 24], { 34: [1, 82], 35: [1, 83] }), { 32: [1, 84] }, { 32: [1, 85] }, { 30: [1, 86] }, { 39: 87, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 88] }, { 33: [1, 89] }, { 33: [1, 90] }, { 33: [1, 91] }, { 33: [1, 92] }, { 33: [1, 93] }, { 39: 94, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 95] }, { 33: [1, 96] }, { 39: 97, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 98] }, o($V9, [2, 37], { 35: [1, 100], 38: [1, 99] }), o($V9, [2, 38], { 32: [1, 102], 35: [1, 101] }), o($V9, [2, 39], { 32: [1, 103], 38: [1, 104] }), { 33: [1, 105] }, { 33: [1, 106], 36: [1, 107] }, { 33: [1, 108] }, { 33: [1, 109] }, o($V9, [2, 23]), o($V9, [2, 55], { 32: [1, 110], 42: [1, 111] }), o($V9, [2, 59], { 38: [1, 112], 42: [1, 113] }), o($V9, [2, 69], { 32: [1, 115], 38: [1, 114] }), o($V9, [2, 56], { 32: [1, 116], 42: [1, 117] }), o($V9, [2, 61], { 35: [1, 118], 42: [1, 119] }), o($V9, [2, 72], { 32: [1, 121], 35: [1, 120] }), o($V9, [2, 58], { 38: [1, 122], 42: [1, 123] }), o($V9, [2, 60], { 35: [1, 124], 42: [1, 125] }), o($V9, [2, 73], { 35: [1, 127], 38: [1, 126] }), o($V9, [2, 70], { 32: [1, 129], 38: [1, 128] }), o($V9, [2, 71], { 32: [1, 131], 35: [1, 130] }), o($V9, [2, 74], { 35: [1, 133], 38: [1, 132] }), { 39: 134, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 135] }, { 33: [1, 136] }, { 33: [1, 137] }, { 33: [1, 138] }, { 39: 139, 43: $Vd, 44: $Ve, 45: $Vf }, o($V9, [2, 25], { 35: [1, 140] }), o($V9, [2, 26], { 34: [1, 141] }), o($V9, [2, 31], { 34: [1, 142] }), o($V9, [2, 29], { 34: [1, 143] }), o($V9, [2, 30], { 34: [1, 144] }), { 33: [1, 145] }, { 33: [1, 146] }, { 39: 147, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 148] }, { 39: 149, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 150] }, { 33: [1, 151] }, { 33: [1, 152] }, { 33: [1, 153] }, { 33: [1, 154] }, { 33: [1, 155] }, { 33: [1, 156] }, { 39: 157, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 158] }, { 33: [1, 159] }, { 33: [1, 160] }, { 39: 161, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 162] }, { 39: 163, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 164] }, { 33: [1, 165] }, { 33: [1, 166] }, { 39: 167, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 168] }, o($V9, [2, 43], { 35: [1, 169] }), o($V9, [2, 44], { 38: [1, 170] }), o($V9, [2, 42], { 32: [1, 171] }), o($V9, [2, 45], { 35: [1, 172] }), o($V9, [2, 40], { 38: [1, 173] }), o($V9, [2, 41], { 32: [1, 174] }), { 33: [1, 175], 36: [1, 176] }, { 33: [1, 177] }, { 33: [1, 178] }, { 33: [1, 179] }, { 33: [1, 180] }, o($V9, [2, 66], { 42: [1, 181] }), o($V9, [2, 79], { 32: [1, 182] }), o($V9, [2, 67], { 42: [1, 183] }), o($V9, [2, 90], { 38: [1, 184] }), o($V9, [2, 80], { 32: [1, 185] }), o($V9, [2, 89], { 38: [1, 186] }), o($V9, [2, 65], { 42: [1, 187] }), o($V9, [2, 78], { 32: [1, 188] }), o($V9, [2, 64], { 42: [1, 189] }), o($V9, [2, 84], { 35: [1, 190] }), o($V9, [2, 77], { 32: [1, 191] }), o($V9, [2, 83], { 35: [1, 192] }), o($V9, [2, 63], { 42: [1, 193] }), o($V9, [2, 91], { 38: [1, 194] }), o($V9, [2, 62], { 42: [1, 195] }), o($V9, [2, 85], { 35: [1, 196] }), o($V9, [2, 86], { 35: [1, 197] }), o($V9, [2, 92], { 38: [1, 198] }), o($V9, [2, 76], { 32: [1, 199] }), o($V9, [2, 87], { 38: [1, 200] }), o($V9, [2, 75], { 32: [1, 201] }), o($V9, [2, 81], { 35: [1, 202] }), o($V9, [2, 82], { 35: [1, 203] }), o($V9, [2, 88], { 38: [1, 204] }), { 33: [1, 205] }, { 39: 206, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 207] }, { 33: [1, 208] }, { 39: 209, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 210] }, o($V9, [2, 27]), o($V9, [2, 32]), o($V9, [2, 28]), o($V9, [2, 33]), o($V9, [2, 34]), o($V9, [2, 35]), { 33: [1, 211] }, { 33: [1, 212] }, { 33: [1, 213] }, { 39: 214, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 215] }, { 39: 216, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 217] }, { 33: [1, 218] }, { 33: [1, 219] }, { 33: [1, 220] }, { 33: [1, 221] }, { 33: [1, 222] }, { 33: [1, 223] }, { 39: 224, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 225] }, { 33: [1, 226] }, { 33: [1, 227] }, { 39: 228, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 229] }, { 39: 230, 43: $Vd, 44: $Ve, 45: $Vf }, { 33: [1, 231] }, { 33: [1, 232] }, { 33: [1, 233] }, { 39: 234, 43: $Vd, 44: $Ve, 45: $Vf }, o($V9, [2, 46]), o($V9, [2, 48]), o($V9, [2, 47]), o($V9, [2, 49]), o($V9, [2, 51]), o($V9, [2, 50]), o($V9, [2, 107]), o($V9, [2, 108]), o($V9, [2, 105]), o($V9, [2, 106]), o($V9, [2, 110]), o($V9, [2, 109]), o($V9, [2, 114]), o($V9, [2, 113]), o($V9, [2, 112]), o($V9, [2, 111]), o($V9, [2, 116]), o($V9, [2, 115]), o($V9, [2, 104]), o($V9, [2, 103]), o($V9, [2, 102]), o($V9, [2, 101]), o($V9, [2, 99]), o($V9, [2, 100]), o($V9, [2, 98]), o($V9, [2, 97]), o($V9, [2, 96]), o($V9, [2, 95]), o($V9, [2, 93]), o($V9, [2, 94])], + defaultActions: { 7: [2, 1], 13: [2, 2], 18: [2, 3], 36: [2, 4] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("acc_title"); + return 19; + case 1: + this.popState(); + return "acc_title_value"; + case 2: + this.begin("acc_descr"); + return 21; + case 3: + this.popState(); + return "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 13; + case 8: + break; + case 9: + break; + case 10: + return 5; + case 11: + return 40; + case 12: + return 32; + case 13: + return 38; + case 14: + return 42; + case 15: + return 43; + case 16: + return 44; + case 17: + return 45; + case 18: + return 35; + case 19: + return 28; + case 20: + return 29; + case 21: + return 37; + case 22: + return 31; + case 23: + return 34; + case 24: + return 26; + case 25: + return 9; + case 26: + return 9; + case 27: + return 8; + case 28: + return "CARET"; + case 29: + this.begin("options"); + break; + case 30: + this.popState(); + break; + case 31: + return 12; + case 32: + return 36; + case 33: + this.begin("string"); + break; + case 34: + this.popState(); + break; + case 35: + return 33; + case 36: + return 30; + case 37: + return 46; + case 38: + return 7; + } + }, + rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gitGraph\b)/i, /^(?:commit(?=\s|$))/i, /^(?:id:)/i, /^(?:type:)/i, /^(?:msg:)/i, /^(?:NORMAL\b)/i, /^(?:REVERSE\b)/i, /^(?:HIGHLIGHT\b)/i, /^(?:tag:)/i, /^(?:branch(?=\s|$))/i, /^(?:order:)/i, /^(?:merge(?=\s|$))/i, /^(?:cherry-pick(?=\s|$))/i, /^(?:parent:)/i, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:TB\b)/i, /^(?::)/i, /^(?:\^)/i, /^(?:options\r?\n)/i, /^(?:[ \r\n\t]+end\b)/i, /^(?:[\s\S]+(?=[ \r\n\t]+end))/i, /^(?:["]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[0-9]+(?=\s|$))/i, /^(?:\w([-\./\w]*[-\w])?)/i, /^(?:$)/i, /^(?:\s+)/i], + conditions: { "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "options": { "rules": [30, 31], "inclusive": false }, "string": { "rules": [34, 35], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 36, 37, 38, 39], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const gitGraphParser = parser; +let mainBranchName = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph.mainBranchName; +let mainBranchOrder = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph.mainBranchOrder; +let commits = {}; +let head = null; +let branchesConfig = {}; +branchesConfig[mainBranchName] = { name: mainBranchName, order: mainBranchOrder }; +let branches = {}; +branches[mainBranchName] = head; +let curBranch = mainBranchName; +let direction = "LR"; +let seq = 0; +function getId() { + return (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.y)({ length: 7 }); +} +function uniqBy(list, fn) { + const recordMap = /* @__PURE__ */ Object.create(null); + return list.reduce((out, item) => { + const key = fn(item); + if (!recordMap[key]) { + recordMap[key] = true; + out.push(item); + } + return out; + }, []); +} +const setDirection = function(dir2) { + direction = dir2; +}; +let options = {}; +const setOptions = function(rawOptString) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("options str", rawOptString); + rawOptString = rawOptString && rawOptString.trim(); + rawOptString = rawOptString || "{}"; + try { + options = JSON.parse(rawOptString); + } catch (e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing gitGraph options", e.message); + } +}; +const getOptions = function() { + return options; +}; +const commit = function(msg, id, type, tag) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Entering commit:", msg, id, type, tag); + id = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(id, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + msg = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(msg, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + tag = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(tag, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + const commit2 = { + id: id ? id : seq + "-" + getId(), + message: msg, + seq: seq++, + type: type ? type : commitType$1.NORMAL, + tag: tag ? tag : "", + parents: head == null ? [] : [head.id], + branch: curBranch + }; + head = commit2; + commits[commit2.id] = commit2; + branches[curBranch] = commit2.id; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("in pushCommit " + commit2.id); +}; +const branch = function(name, order) { + name = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(name, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + if (branches[name] === void 0) { + branches[name] = head != null ? head.id : null; + branchesConfig[name] = { name, order: order ? parseInt(order, 10) : null }; + checkout(name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("in createBranch"); + } else { + let error = new Error( + 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + name + '")' + ); + error.hash = { + text: "branch " + name, + token: "branch " + name, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"checkout ' + name + '"'] + }; + throw error; + } +}; +const merge = function(otherBranch, custom_id, override_type, custom_tag) { + otherBranch = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(otherBranch, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + custom_id = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(custom_id, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + const currentCommit = commits[branches[curBranch]]; + const otherCommit = commits[branches[otherBranch]]; + if (curBranch === otherBranch) { + let error = new Error('Incorrect usage of "merge". Cannot merge a branch to itself'); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch abc"] + }; + throw error; + } else if (currentCommit === void 0 || !currentCommit) { + let error = new Error( + 'Incorrect usage of "merge". Current branch (' + curBranch + ")has no commits" + ); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["commit"] + }; + throw error; + } else if (branches[otherBranch] === void 0) { + let error = new Error( + 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") does not exist" + ); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch " + otherBranch] + }; + throw error; + } else if (otherCommit === void 0 || !otherCommit) { + let error = new Error( + 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") has no commits" + ); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"commit"'] + }; + throw error; + } else if (currentCommit === otherCommit) { + let error = new Error('Incorrect usage of "merge". Both branches have same head'); + error.hash = { + text: "merge " + otherBranch, + token: "merge " + otherBranch, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["branch abc"] + }; + throw error; + } else if (custom_id && commits[custom_id] !== void 0) { + let error = new Error( + 'Incorrect usage of "merge". Commit with id:' + custom_id + " already exists, use different custom Id" + ); + error.hash = { + text: "merge " + otherBranch + custom_id + override_type + custom_tag, + token: "merge " + otherBranch + custom_id + override_type + custom_tag, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: [ + "merge " + otherBranch + " " + custom_id + "_UNIQUE " + override_type + " " + custom_tag + ] + }; + throw error; + } + const commit2 = { + id: custom_id ? custom_id : seq + "-" + getId(), + message: "merged branch " + otherBranch + " into " + curBranch, + seq: seq++, + parents: [head == null ? null : head.id, branches[otherBranch]], + branch: curBranch, + type: commitType$1.MERGE, + customType: override_type, + customId: custom_id ? true : false, + tag: custom_tag ? custom_tag : "" + }; + head = commit2; + commits[commit2.id] = commit2; + branches[curBranch] = commit2.id; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(branches); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("in mergeBranch"); +}; +const cherryPick = function(sourceId, targetId, tag, parentCommitId) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Entering cherryPick:", sourceId, targetId, tag); + sourceId = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(sourceId, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + targetId = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(targetId, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + tag = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(tag, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + parentCommitId = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(parentCommitId, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + if (!sourceId || commits[sourceId] === void 0) { + let error = new Error( + 'Incorrect usage of "cherryPick". Source commit id should exist and provided' + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + let sourceCommit = commits[sourceId]; + let sourceCommitBranch = sourceCommit.branch; + if (parentCommitId && !(Array.isArray(sourceCommit.parents) && sourceCommit.parents.includes(parentCommitId))) { + let error = new Error( + "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit." + ); + throw error; + } + if (sourceCommit.type === commitType$1.MERGE && !parentCommitId) { + let error = new Error( + "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified." + ); + throw error; + } + if (!targetId || commits[targetId] === void 0) { + if (sourceCommitBranch === curBranch) { + let error = new Error( + 'Incorrect usage of "cherryPick". Source commit is already on current branch' + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + const currentCommit = commits[branches[curBranch]]; + if (currentCommit === void 0 || !currentCommit) { + let error = new Error( + 'Incorrect usage of "cherry-pick". Current branch (' + curBranch + ")has no commits" + ); + error.hash = { + text: "cherryPick " + sourceId + " " + targetId, + token: "cherryPick " + sourceId + " " + targetId, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ["cherry-pick abc"] + }; + throw error; + } + const commit2 = { + id: seq + "-" + getId(), + message: "cherry-picked " + sourceCommit + " into " + curBranch, + seq: seq++, + parents: [head == null ? null : head.id, sourceCommit.id], + branch: curBranch, + type: commitType$1.CHERRY_PICK, + tag: tag ?? `cherry-pick:${sourceCommit.id}${sourceCommit.type === commitType$1.MERGE ? `|parent:${parentCommitId}` : ""}` + }; + head = commit2; + commits[commit2.id] = commit2; + branches[curBranch] = commit2.id; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(branches); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("in cherryPick"); + } +}; +const checkout = function(branch2) { + branch2 = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.sanitizeText(branch2, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + if (branches[branch2] === void 0) { + let error = new Error( + 'Trying to checkout branch which is not yet created. (Help try using "branch ' + branch2 + '")' + ); + error.hash = { + text: "checkout " + branch2, + token: "checkout " + branch2, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"branch ' + branch2 + '"'] + }; + throw error; + } else { + curBranch = branch2; + const id = branches[curBranch]; + head = commits[id]; + } +}; +function upsert(arr, key, newVal) { + const index = arr.indexOf(key); + if (index === -1) { + arr.push(newVal); + } else { + arr.splice(index, 1, newVal); + } +} +function prettyPrintCommitHistory(commitArr) { + const commit2 = commitArr.reduce((out, commit3) => { + if (out.seq > commit3.seq) { + return out; + } + return commit3; + }, commitArr[0]); + let line = ""; + commitArr.forEach(function(c) { + if (c === commit2) { + line += " *"; + } else { + line += " |"; + } + }); + const label = [line, commit2.id, commit2.seq]; + for (let branch2 in branches) { + if (branches[branch2] === commit2.id) { + label.push(branch2); + } + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(label.join(" ")); + if (commit2.parents && commit2.parents.length == 2) { + const newCommit = commits[commit2.parents[0]]; + upsert(commitArr, commit2, newCommit); + commitArr.push(commits[commit2.parents[1]]); + } else if (commit2.parents.length == 0) { + return; + } else { + const nextCommit = commits[commit2.parents]; + upsert(commitArr, commit2, nextCommit); + } + commitArr = uniqBy(commitArr, (c) => c.id); + prettyPrintCommitHistory(commitArr); +} +const prettyPrint = function() { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(commits); + const node = getCommitsArray()[0]; + prettyPrintCommitHistory([node]); +}; +const clear$1 = function() { + commits = {}; + head = null; + let mainBranch = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph.mainBranchName; + let mainBranchOrder2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph.mainBranchOrder; + branches = {}; + branches[mainBranch] = null; + branchesConfig = {}; + branchesConfig[mainBranch] = { name: mainBranch, order: mainBranchOrder2 }; + curBranch = mainBranch; + seq = 0; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.v)(); +}; +const getBranchesAsObjArray = function() { + const branchesArray = Object.values(branchesConfig).map((branchConfig, i) => { + if (branchConfig.order !== null) { + return branchConfig; + } + return { + ...branchConfig, + order: parseFloat(`0.${i}`, 10) + }; + }).sort((a, b) => a.order - b.order).map(({ name }) => ({ name })); + return branchesArray; +}; +const getBranches = function() { + return branches; +}; +const getCommits = function() { + return commits; +}; +const getCommitsArray = function() { + const commitArr = Object.keys(commits).map(function(key) { + return commits[key]; + }); + commitArr.forEach(function(o) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(o.id); + }); + commitArr.sort((a, b) => a.seq - b.seq); + return commitArr; +}; +const getCurrentBranch = function() { + return curBranch; +}; +const getDirection = function() { + return direction; +}; +const getHead = function() { + return head; +}; +const commitType$1 = { + NORMAL: 0, + REVERSE: 1, + HIGHLIGHT: 2, + MERGE: 3, + CHERRY_PICK: 4 +}; +const gitGraphDb = { + getConfig: () => (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph, + setDirection, + setOptions, + getOptions, + commit, + branch, + merge, + cherryPick, + checkout, + //reset, + prettyPrint, + clear: clear$1, + getBranchesAsObjArray, + getBranches, + getCommits, + getCommitsArray, + getCurrentBranch, + getDirection, + getHead, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.g, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.a, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.b, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.t, + commitType: commitType$1 +}; +let allCommitsDict = {}; +const commitType = { + NORMAL: 0, + REVERSE: 1, + HIGHLIGHT: 2, + MERGE: 3, + CHERRY_PICK: 4 +}; +const THEME_COLOR_LIMIT = 8; +let branchPos = {}; +let commitPos = {}; +let lanes = []; +let maxPos = 0; +let dir = "LR"; +const clear = () => { + branchPos = {}; + commitPos = {}; + allCommitsDict = {}; + maxPos = 0; + lanes = []; + dir = "LR"; +}; +const drawText = (txt) => { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + let rows = []; + if (typeof txt === "string") { + rows = txt.split(/\\n|\n|<br\s*\/?>/gi); + } else if (Array.isArray(txt)) { + rows = txt; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + tspan.setAttribute("class", "row"); + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; +}; +const findClosestParent = (parents) => { + let closestParent = ""; + let maxPosition = 0; + parents.forEach((parent) => { + const parentPosition = dir === "TB" ? commitPos[parent].y : commitPos[parent].x; + if (parentPosition >= maxPosition) { + closestParent = parent; + maxPosition = parentPosition; + } + }); + return closestParent || void 0; +}; +const drawCommits = (svg, commits2, modifyGraph) => { + const gitGraphConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph; + const gBullets = svg.append("g").attr("class", "commit-bullets"); + const gLabels = svg.append("g").attr("class", "commit-labels"); + let pos = 0; + if (dir === "TB") { + pos = 30; + } + const keys = Object.keys(commits2); + const sortedKeys = keys.sort((a, b) => { + return commits2[a].seq - commits2[b].seq; + }); + const isParallelCommits = gitGraphConfig.parallelCommits; + const layoutOffset = 10; + const commitStep = 40; + sortedKeys.forEach((key) => { + const commit2 = commits2[key]; + if (isParallelCommits) { + if (commit2.parents.length) { + const closestParent = findClosestParent(commit2.parents); + pos = dir === "TB" ? commitPos[closestParent].y + commitStep : commitPos[closestParent].x + commitStep; + } else { + pos = 0; + if (dir === "TB") { + pos = 30; + } + } + } + const posWithOffset = pos + layoutOffset; + const y = dir === "TB" ? posWithOffset : branchPos[commit2.branch].pos; + const x = dir === "TB" ? branchPos[commit2.branch].pos : posWithOffset; + if (modifyGraph) { + let typeClass; + let commitSymbolType = commit2.customType !== void 0 && commit2.customType !== "" ? commit2.customType : commit2.type; + switch (commitSymbolType) { + case commitType.NORMAL: + typeClass = "commit-normal"; + break; + case commitType.REVERSE: + typeClass = "commit-reverse"; + break; + case commitType.HIGHLIGHT: + typeClass = "commit-highlight"; + break; + case commitType.MERGE: + typeClass = "commit-merge"; + break; + case commitType.CHERRY_PICK: + typeClass = "commit-cherry-pick"; + break; + default: + typeClass = "commit-normal"; + } + if (commitSymbolType === commitType.HIGHLIGHT) { + const circle = gBullets.append("rect"); + circle.attr("x", x - 10); + circle.attr("y", y - 10); + circle.attr("height", 20); + circle.attr("width", 20); + circle.attr( + "class", + `commit ${commit2.id} commit-highlight${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-outer` + ); + gBullets.append("rect").attr("x", x - 6).attr("y", y - 6).attr("height", 12).attr("width", 12).attr( + "class", + `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-inner` + ); + } else if (commitSymbolType === commitType.CHERRY_PICK) { + gBullets.append("circle").attr("cx", x).attr("cy", y).attr("r", 10).attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("circle").attr("cx", x - 3).attr("cy", y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("circle").attr("cx", x + 3).attr("cy", y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("line").attr("x1", x + 3).attr("y1", y + 1).attr("x2", x).attr("y2", y - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + gBullets.append("line").attr("x1", x - 3).attr("y1", y + 1).attr("x2", x).attr("y2", y - 5).attr("stroke", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); + } else { + const circle = gBullets.append("circle"); + circle.attr("cx", x); + circle.attr("cy", y); + circle.attr("r", commit2.type === commitType.MERGE ? 9 : 10); + circle.attr( + "class", + `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); + if (commitSymbolType === commitType.MERGE) { + const circle2 = gBullets.append("circle"); + circle2.attr("cx", x); + circle2.attr("cy", y); + circle2.attr("r", 6); + circle2.attr( + "class", + `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); + } + if (commitSymbolType === commitType.REVERSE) { + const cross = gBullets.append("path"); + cross.attr("d", `M ${x - 5},${y - 5}L${x + 5},${y + 5}M${x - 5},${y + 5}L${x + 5},${y - 5}`).attr( + "class", + `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); + } + } + } + if (dir === "TB") { + commitPos[commit2.id] = { x, y: posWithOffset }; + } else { + commitPos[commit2.id] = { x: posWithOffset, y }; + } + if (modifyGraph) { + const px = 4; + const py = 2; + if (commit2.type !== commitType.CHERRY_PICK && (commit2.customId && commit2.type === commitType.MERGE || commit2.type !== commitType.MERGE) && gitGraphConfig.showCommitLabel) { + const wrapper = gLabels.append("g"); + const labelBkg = wrapper.insert("rect").attr("class", "commit-label-bkg"); + const text = wrapper.append("text").attr("x", pos).attr("y", y + 25).attr("class", "commit-label").text(commit2.id); + let bbox = text.node().getBBox(); + labelBkg.attr("x", posWithOffset - bbox.width / 2 - py).attr("y", y + 13.5).attr("width", bbox.width + 2 * py).attr("height", bbox.height + 2 * py); + if (dir === "TB") { + labelBkg.attr("x", x - (bbox.width + 4 * px + 5)).attr("y", y - 12); + text.attr("x", x - (bbox.width + 4 * px)).attr("y", y + bbox.height - 12); + } + if (dir !== "TB") { + text.attr("x", posWithOffset - bbox.width / 2); + } + if (gitGraphConfig.rotateCommitLabel) { + if (dir === "TB") { + text.attr("transform", "rotate(-45, " + x + ", " + y + ")"); + labelBkg.attr("transform", "rotate(-45, " + x + ", " + y + ")"); + } else { + let r_x = -7.5 - (bbox.width + 10) / 25 * 9.5; + let r_y = 10 + bbox.width / 25 * 8.5; + wrapper.attr( + "transform", + "translate(" + r_x + ", " + r_y + ") rotate(-45, " + pos + ", " + y + ")" + ); + } + } + } + if (commit2.tag) { + const rect = gLabels.insert("polygon"); + const hole = gLabels.append("circle"); + const tag = gLabels.append("text").attr("y", y - 16).attr("class", "tag-label").text(commit2.tag); + let tagBbox = tag.node().getBBox(); + tag.attr("x", posWithOffset - tagBbox.width / 2); + const h2 = tagBbox.height / 2; + const ly = y - 19.2; + rect.attr("class", "tag-label-bkg").attr( + "points", + ` + ${pos - tagBbox.width / 2 - px / 2},${ly + py} + ${pos - tagBbox.width / 2 - px / 2},${ly - py} + ${posWithOffset - tagBbox.width / 2 - px},${ly - h2 - py} + ${posWithOffset + tagBbox.width / 2 + px},${ly - h2 - py} + ${posWithOffset + tagBbox.width / 2 + px},${ly + h2 + py} + ${posWithOffset - tagBbox.width / 2 - px},${ly + h2 + py}` + ); + hole.attr("cx", pos - tagBbox.width / 2 + px / 2).attr("cy", ly).attr("r", 1.5).attr("class", "tag-hole"); + if (dir === "TB") { + rect.attr("class", "tag-label-bkg").attr( + "points", + ` + ${x},${pos + py} + ${x},${pos - py} + ${x + layoutOffset},${pos - h2 - py} + ${x + layoutOffset + tagBbox.width + px},${pos - h2 - py} + ${x + layoutOffset + tagBbox.width + px},${pos + h2 + py} + ${x + layoutOffset},${pos + h2 + py}` + ).attr("transform", "translate(12,12) rotate(45, " + x + "," + pos + ")"); + hole.attr("cx", x + px / 2).attr("cy", pos).attr("transform", "translate(12,12) rotate(45, " + x + "," + pos + ")"); + tag.attr("x", x + 5).attr("y", pos + 3).attr("transform", "translate(14,14) rotate(45, " + x + "," + pos + ")"); + } + } + } + pos += commitStep + layoutOffset; + if (pos > maxPos) { + maxPos = pos; + } + }); +}; +const shouldRerouteArrow = (commitA, commitB, p1, p2, allCommits) => { + const commitBIsFurthest = dir === "TB" ? p1.x < p2.x : p1.y < p2.y; + const branchToGetCurve = commitBIsFurthest ? commitB.branch : commitA.branch; + const isOnBranchToGetCurve = (x) => x.branch === branchToGetCurve; + const isBetweenCommits = (x) => x.seq > commitA.seq && x.seq < commitB.seq; + return Object.values(allCommits).some((commitX) => { + return isBetweenCommits(commitX) && isOnBranchToGetCurve(commitX); + }); +}; +const findLane = (y1, y2, depth = 0) => { + const candidate = y1 + Math.abs(y1 - y2) / 2; + if (depth > 5) { + return candidate; + } + let ok = lanes.every((lane) => Math.abs(lane - candidate) >= 10); + if (ok) { + lanes.push(candidate); + return candidate; + } + const diff = Math.abs(y1 - y2); + return findLane(y1, y2 - diff / 5, depth + 1); +}; +const drawArrow = (svg, commitA, commitB, allCommits) => { + const p1 = commitPos[commitA.id]; + const p2 = commitPos[commitB.id]; + const arrowNeedsRerouting = shouldRerouteArrow(commitA, commitB, p1, p2, allCommits); + let arc = ""; + let arc2 = ""; + let radius = 0; + let offset = 0; + let colorClassNum = branchPos[commitB.branch].index; + if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) { + colorClassNum = branchPos[commitA.branch].index; + } + let lineDef; + if (arrowNeedsRerouting) { + arc = "A 10 10, 0, 0, 0,"; + arc2 = "A 10 10, 0, 0, 1,"; + radius = 10; + offset = 10; + const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y); + const lineX = p1.x < p2.x ? findLane(p1.x, p2.x) : findLane(p2.x, p1.x); + if (dir === "TB") { + if (p1.x < p2.x) { + lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc2} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } else { + colorClassNum = branchPos[commitA.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc2} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + } else { + if (p1.y < p2.y) { + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY - radius} ${arc} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc2} ${p2.x} ${lineY + offset} L ${p2.x} ${p2.y}`; + } else { + colorClassNum = branchPos[commitA.branch].index; + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY + radius} ${arc2} ${p1.x + offset} ${lineY} L ${p2.x - radius} ${lineY} ${arc} ${p2.x} ${lineY - offset} L ${p2.x} ${p2.y}`; + } + } + } else { + arc = "A 20 20, 0, 0, 0,"; + arc2 = "A 20 20, 0, 0, 1,"; + radius = 20; + offset = 20; + if (dir === "TB") { + if (p1.x < p2.x) { + if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) { + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } else { + lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`; + } + } + if (p1.x > p2.x) { + arc = "A 20 20, 0, 0, 0,"; + arc2 = "A 20 20, 0, 0, 1,"; + radius = 20; + offset = 20; + if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) { + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc2} ${p1.x - offset} ${p2.y} L ${p2.x} ${p2.y}`; + } else { + lineDef = `M ${p1.x} ${p1.y} L ${p2.x + radius} ${p1.y} ${arc} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`; + } + } + if (p1.x === p2.x) { + lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`; + } + } else { + if (p1.y < p2.y) { + if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) { + lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${p1.y + offset} L ${p2.x} ${p2.y}`; + } else { + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + } + if (p1.y > p2.y) { + if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) { + lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${p2.x} ${p2.y}`; + } else { + lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc2} ${p1.x + offset} ${p2.y} L ${p2.x} ${p2.y}`; + } + } + if (p1.y === p2.y) { + lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`; + } + } + } + svg.append("path").attr("d", lineDef).attr("class", "arrow arrow" + colorClassNum % THEME_COLOR_LIMIT); +}; +const drawArrows = (svg, commits2) => { + const gArrows = svg.append("g").attr("class", "commit-arrows"); + Object.keys(commits2).forEach((key) => { + const commit2 = commits2[key]; + if (commit2.parents && commit2.parents.length > 0) { + commit2.parents.forEach((parent) => { + drawArrow(gArrows, commits2[parent], commit2, commits2); + }); + } + }); +}; +const drawBranches = (svg, branches2) => { + const gitGraphConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().gitGraph; + const g = svg.append("g"); + branches2.forEach((branch2, index) => { + const adjustIndexForTheme = index % THEME_COLOR_LIMIT; + const pos = branchPos[branch2.name].pos; + const line = g.append("line"); + line.attr("x1", 0); + line.attr("y1", pos); + line.attr("x2", maxPos); + line.attr("y2", pos); + line.attr("class", "branch branch" + adjustIndexForTheme); + if (dir === "TB") { + line.attr("y1", 30); + line.attr("x1", pos); + line.attr("y2", maxPos); + line.attr("x2", pos); + } + lanes.push(pos); + let name = branch2.name; + const labelElement = drawText(name); + const bkg = g.insert("rect"); + const branchLabel = g.insert("g").attr("class", "branchLabel"); + const label = branchLabel.insert("g").attr("class", "label branch-label" + adjustIndexForTheme); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + bkg.attr("class", "branchLabelBkg label" + adjustIndexForTheme).attr("rx", 4).attr("ry", 4).attr("x", -bbox.width - 4 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)).attr("y", -bbox.height / 2 + 8).attr("width", bbox.width + 18).attr("height", bbox.height + 4); + label.attr( + "transform", + "translate(" + (-bbox.width - 14 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)) + ", " + (pos - bbox.height / 2 - 1) + ")" + ); + if (dir === "TB") { + bkg.attr("x", pos - bbox.width / 2 - 10).attr("y", 0); + label.attr("transform", "translate(" + (pos - bbox.width / 2 - 5) + ", 0)"); + } + if (dir !== "TB") { + bkg.attr("transform", "translate(-19, " + (pos - bbox.height / 2) + ")"); + } + }); +}; +const draw = function(txt, id, ver, diagObj) { + clear(); + const conf = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + const gitGraphConfig = conf.gitGraph; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("in gitgraph renderer", txt + "\n", "id:", id, ver); + allCommitsDict = diagObj.db.getCommits(); + const branches2 = diagObj.db.getBranchesAsObjArray(); + dir = diagObj.db.getDirection(); + const diagram2 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(`[id="${id}"]`); + let pos = 0; + branches2.forEach((branch2, index) => { + const labelElement = drawText(branch2.name); + const g = diagram2.append("g"); + const branchLabel = g.insert("g").attr("class", "branchLabel"); + const label = branchLabel.insert("g").attr("class", "label branch-label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + branchPos[branch2.name] = { pos, index }; + pos += 50 + (gitGraphConfig.rotateCommitLabel ? 40 : 0) + (dir === "TB" ? bbox.width / 2 : 0); + label.remove(); + branchLabel.remove(); + g.remove(); + }); + drawCommits(diagram2, allCommitsDict, false); + if (gitGraphConfig.showBranches) { + drawBranches(diagram2, branches2); + } + drawArrows(diagram2, allCommitsDict); + drawCommits(diagram2, allCommitsDict, true); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.u.insertTitle( + diagram2, + "gitTitleText", + gitGraphConfig.titleTopMargin, + diagObj.db.getDiagramTitle() + ); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.z)( + void 0, + diagram2, + gitGraphConfig.diagramPadding, + gitGraphConfig.useMaxWidth ?? conf.useMaxWidth + ); +}; +const gitGraphRenderer = { + draw +}; +const getStyles = (options2) => ` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0, 1, 2, 3, 4, 5, 6, 7].map( + (i) => ` + .branch-label${i} { fill: ${options2["gitBranchLabel" + i]}; } + .commit${i} { stroke: ${options2["git" + i]}; fill: ${options2["git" + i]}; } + .commit-highlight${i} { stroke: ${options2["gitInv" + i]}; fill: ${options2["gitInv" + i]}; } + .label${i} { fill: ${options2["git" + i]}; } + .arrow${i} { stroke: ${options2["git" + i]}; } + ` +).join("\n")} + + .branch { + stroke-width: 1; + stroke: ${options2.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${options2.commitLabelFontSize}; fill: ${options2.commitLabelColor};} + .commit-label-bkg { font-size: ${options2.commitLabelFontSize}; fill: ${options2.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${options2.tagLabelFontSize}; fill: ${options2.tagLabelColor};} + .tag-label-bkg { fill: ${options2.tagLabelBackground}; stroke: ${options2.tagLabelBorder}; } + .tag-hole { fill: ${options2.textColor}; } + + .commit-merge { + stroke: ${options2.primaryColor}; + fill: ${options2.primaryColor}; + } + .commit-reverse { + stroke: ${options2.primaryColor}; + fill: ${options2.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${options2.primaryColor}; + fill: ${options2.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options2.textColor}; + } +`; +const gitGraphStyles = getStyles; +const diagram = { + parser: gitGraphParser, + db: gitGraphDb, + renderer: gitGraphRenderer, + styles: gitGraphStyles +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/51515e66.559d977c.js b/assets/js/51515e66.559d977c.js new file mode 100644 index 00000000..d73c9261 --- /dev/null +++ b/assets/js/51515e66.559d977c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[7505],{3491:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var r=t(4848),s=t(8453);const a={sidebar_position:1},i="Introduction",o={id:"about/introduction",title:"Introduction",description:"Tagreader is a Python package for reading timeseries data from the OSIsoft PI and Aspen Infoplus.21",source:"@site/docs/about/introduction.md",sourceDirName:"about",slug:"/about/introduction",permalink:"/tagreader-python/docs/about/introduction",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/about/introduction.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"about",next:{title:"Usage",permalink:"/tagreader-python/docs/category/usage"}},d={},l=[{value:"System requirements",id:"system-requirements",level:2},{value:"Installation",id:"installation",level:2},{value:"Usage",id:"usage",level:2},{value:"Usage example",id:"usage-example",level:3},{value:"Jupyter Notebook Quickstart",id:"jupyter-notebook-quickstart",level:3},{value:"Contribute",id:"contribute",level:2}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"introduction",children:"Introduction"})}),"\n",(0,r.jsx)(n.p,{children:"Tagreader is a Python package for reading timeseries data from the OSIsoft PI and Aspen Infoplus.21\nInformation Manufacturing Systems (IMS) systems. It is intended to be easy to use, and present as similar interfaces\nas possible to the backend historians."}),"\n",(0,r.jsx)(n.h2,{id:"system-requirements",children:"System requirements"}),"\n",(0,r.jsx)(n.p,{children:"The only requirements are Python >= 3.8, with Windows, Linux or macOS."}),"\n",(0,r.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(n.p,{children:"You can install tagreader directly into your project from pypi by using pip\nor another package manager."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:'language-shell"',children:"pip install tagreader\n"})}),"\n",(0,r.jsx)(n.p,{children:"The following are required and will be installed:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"pandas"}),"\n",(0,r.jsx)(n.li,{children:"requests"}),"\n",(0,r.jsx)(n.li,{children:"requests-kerberos"}),"\n",(0,r.jsx)(n.li,{children:"certifi"}),"\n",(0,r.jsx)(n.li,{children:"diskcache"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,r.jsxs)(n.p,{children:["Tagreader easy to use for both Equinor internal IMS services, and non-internal usage. For non-internal usage\nyou simply need to provide the corresponding IMS service URLs and IMSType. See ",(0,r.jsx)(n.a,{href:"/tagreader-python/docs/about/usage/data-source",children:"data source"})," for details."]}),"\n",(0,r.jsx)(n.h3,{id:"usage-example",children:"Usage example"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'import tagreader\nc = tagreader.IMSClient("mysource", "aspenone")\nprint(c.search("tag*"))\ndf = c.read_tags(["tag1", "tag2"], "18.06.2020 08:00:00", "18.06.2020 09:00:00", 60)\n'})}),"\n",(0,r.jsx)(n.h3,{id:"jupyter-notebook-quickstart",children:"Jupyter Notebook Quickstart"}),"\n",(0,r.jsx)(n.p,{children:"Jupyter Notebook examples can be found in /examples. In order to run these examples, you need to install the\noptional dependencies."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-shell",children:"pip install tagreader[notebooks]\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The quickstart Jupyter Notebook can be found ",(0,r.jsx)(n.a,{href:"https://github.com/equinor/tagreader-python/blob/main/examples/quickstart.ipynb",children:"here"})]}),"\n",(0,r.jsxs)(n.p,{children:["For more details, see the ",(0,r.jsx)(n.a,{href:"/docs/about/usage/basic-usage",children:"Usage section"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"contribute",children:"Contribute"}),"\n",(0,r.jsx)(n.p,{children:"As Tagreader is an open source project, all contributions are welcome. This includes code, bug reports, issues,\nfeature requests, and documentation. The preferred way of submitting a contribution is to either create an issue on\nGitHub or to fork the project and make a pull request."}),"\n",(0,r.jsxs)(n.p,{children:["For starting contributing, see the ",(0,r.jsx)(n.a,{href:"/tagreader-python/docs/contribute/how-to-start-contributing",children:"contribute section"})]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}}}]); \ No newline at end of file diff --git a/assets/js/555.245cb126.js b/assets/js/555.245cb126.js new file mode 100644 index 00000000..612733d1 --- /dev/null +++ b/assets/js/555.245cb126.js @@ -0,0 +1,2105 @@ +exports.id = 555; +exports.ids = [555]; +exports.modules = { + +/***/ 7375: +/***/ (function(module) { + +!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),a=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return r.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return r.ordinal(t.week(),"W");case"w":case"ww":return s.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return s.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return s.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return n.bind(this)(a)}}})); + +/***/ }), + +/***/ 445: +/***/ (function(module) { + +!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(e){var t=h("months"),n=(h("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=h("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f<a;f+=1){var h=s[f],u=d[h],c=u&&u[0],l=u&&u[1];s[f]=l?{regex:c,parser:l}:h.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else{var o=i.regex,f=i.parser,h=e.slice(r),u=o.exec(h)[0];f.call(t,u),e=e.replace(u,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,s=e.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],h=!0===s[3],u=f||h,d=s[2];h&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(e,t,n){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date("")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""))}else i.call(this,e)}}})); + +/***/ }), + +/***/ 8313: +/***/ (function(module) { + +!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";var e="day";return function(t,i,s){var a=function(t){return t.add(4-t.isoWeekday(),e)},d=i.prototype;d.isoWeekYear=function(){return a(this).year()},d.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var i,d,n,o,r=a(this),u=(i=this.isoWeekYear(),d=this.$u,n=(d?s.utc:s)().year(i).startOf("year"),o=4-n.isoWeekday(),n.isoWeekday()>4&&(o+=7),n.add(o,e));return r.diff(u,"week")+1},d.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var n=d.startOf;d.startOf=function(e,t){var i=this.$utils(),s=!!i.u(t)||t;return"isoweek"===i.p(e)?s?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):n.bind(this)(e,t)}}})); + +/***/ }), + +/***/ 1555: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6750); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4353); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8313); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(445); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7375); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6312); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9418); + + + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 35, 37], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 29], $V6 = [1, 30], $V7 = [1, 31], $V8 = [1, 9], $V9 = [1, 10], $Va = [1, 11], $Vb = [1, 12], $Vc = [1, 13], $Vd = [1, 14], $Ve = [1, 15], $Vf = [1, 16], $Vg = [1, 18], $Vh = [1, 19], $Vi = [1, 20], $Vj = [1, 21], $Vk = [1, 22], $Vl = [1, 24], $Vm = [1, 32]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "gantt": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NL": 10, "weekday": 11, "weekday_monday": 12, "weekday_tuesday": 13, "weekday_wednesday": 14, "weekday_thursday": 15, "weekday_friday": 16, "weekday_saturday": 17, "weekday_sunday": 18, "dateFormat": 19, "inclusiveEndDates": 20, "topAxis": 21, "axisFormat": 22, "tickInterval": 23, "excludes": 24, "includes": 25, "todayMarker": 26, "title": 27, "acc_title": 28, "acc_title_value": 29, "acc_descr": 30, "acc_descr_value": 31, "acc_descr_multiline_value": 32, "section": 33, "clickStatement": 34, "taskTxt": 35, "taskData": 36, "click": 37, "callbackname": 38, "callbackargs": 39, "href": 40, "clickStatementDebug": 41, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 19: "dateFormat", 20: "inclusiveEndDates", 21: "topAxis", 22: "axisFormat", 23: "tickInterval", 24: "excludes", 25: "includes", 26: "todayMarker", 27: "title", 28: "acc_title", 29: "acc_title_value", 30: "acc_descr", 31: "acc_descr_value", 32: "acc_descr_multiline_value", 33: "section", 35: "taskTxt", 36: "taskData", 37: "click", 38: "callbackname", 39: "callbackargs", 40: "href" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [34, 2], [34, 3], [34, 3], [34, 4], [34, 3], [34, 4], [34, 2], [41, 2], [41, 3], [41, 3], [41, 4], [41, 3], [41, 4], [41, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.setWeekday("monday"); + break; + case 9: + yy.setWeekday("tuesday"); + break; + case 10: + yy.setWeekday("wednesday"); + break; + case 11: + yy.setWeekday("thursday"); + break; + case 12: + yy.setWeekday("friday"); + break; + case 13: + yy.setWeekday("saturday"); + break; + case 14: + yy.setWeekday("sunday"); + break; + case 15: + yy.setDateFormat($$[$0].substr(11)); + this.$ = $$[$0].substr(11); + break; + case 16: + yy.enableInclusiveEndDates(); + this.$ = $$[$0].substr(18); + break; + case 17: + yy.TopAxis(); + this.$ = $$[$0].substr(8); + break; + case 18: + yy.setAxisFormat($$[$0].substr(11)); + this.$ = $$[$0].substr(11); + break; + case 19: + yy.setTickInterval($$[$0].substr(13)); + this.$ = $$[$0].substr(13); + break; + case 20: + yy.setExcludes($$[$0].substr(9)); + this.$ = $$[$0].substr(9); + break; + case 21: + yy.setIncludes($$[$0].substr(9)); + this.$ = $$[$0].substr(9); + break; + case 22: + yy.setTodayMarker($$[$0].substr(12)); + this.$ = $$[$0].substr(12); + break; + case 24: + yy.setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 25: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 26: + case 27: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 28: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 30: + yy.addTask($$[$0 - 1], $$[$0]); + this.$ = "task"; + break; + case 31: + this.$ = $$[$0 - 1]; + yy.setClickEvent($$[$0 - 1], $$[$0], null); + break; + case 32: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 33: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null); + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 34: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]); + yy.setLink($$[$0 - 3], $$[$0]); + break; + case 35: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 2], $$[$0], null); + yy.setLink($$[$0 - 2], $$[$0 - 1]); + break; + case 36: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]); + yy.setLink($$[$0 - 3], $$[$0 - 2]); + break; + case 37: + this.$ = $$[$0 - 1]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 38: + case 44: + this.$ = $$[$0 - 1] + " " + $$[$0]; + break; + case 39: + case 40: + case 42: + this.$ = $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0]; + break; + case 41: + case 43: + this.$ = $$[$0 - 3] + " " + $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 33, 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: $V8, 20: $V9, 21: $Va, 22: $Vb, 23: $Vc, 24: $Vd, 25: $Ve, 26: $Vf, 27: $Vg, 28: $Vh, 30: $Vi, 32: $Vj, 33: $Vk, 34: 23, 35: $Vl, 37: $Vm }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), o($V0, [2, 18]), o($V0, [2, 19]), o($V0, [2, 20]), o($V0, [2, 21]), o($V0, [2, 22]), o($V0, [2, 23]), o($V0, [2, 24]), { 29: [1, 34] }, { 31: [1, 35] }, o($V0, [2, 27]), o($V0, [2, 28]), o($V0, [2, 29]), { 36: [1, 36] }, o($V0, [2, 8]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), { 38: [1, 37], 40: [1, 38] }, o($V0, [2, 4]), o($V0, [2, 25]), o($V0, [2, 26]), o($V0, [2, 30]), o($V0, [2, 31], { 39: [1, 39], 40: [1, 40] }), o($V0, [2, 37], { 38: [1, 41] }), o($V0, [2, 32], { 40: [1, 42] }), o($V0, [2, 33]), o($V0, [2, 35], { 39: [1, 43] }), o($V0, [2, 34]), o($V0, [2, 36])], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("open_directive"); + return "open_directive"; + case 1: + this.begin("acc_title"); + return 28; + case 2: + this.popState(); + return "acc_title_value"; + case 3: + this.begin("acc_descr"); + return 30; + case 4: + this.popState(); + return "acc_descr_value"; + case 5: + this.begin("acc_descr_multiline"); + break; + case 6: + this.popState(); + break; + case 7: + return "acc_descr_multiline_value"; + case 8: + break; + case 9: + break; + case 10: + break; + case 11: + return 10; + case 12: + break; + case 13: + break; + case 14: + this.begin("href"); + break; + case 15: + this.popState(); + break; + case 16: + return 40; + case 17: + this.begin("callbackname"); + break; + case 18: + this.popState(); + break; + case 19: + this.popState(); + this.begin("callbackargs"); + break; + case 20: + return 38; + case 21: + this.popState(); + break; + case 22: + return 39; + case 23: + this.begin("click"); + break; + case 24: + this.popState(); + break; + case 25: + return 37; + case 26: + return 4; + case 27: + return 19; + case 28: + return 20; + case 29: + return 21; + case 30: + return 22; + case 31: + return 23; + case 32: + return 25; + case 33: + return 24; + case 34: + return 26; + case 35: + return 12; + case 36: + return 13; + case 37: + return 14; + case 38: + return 15; + case 39: + return 16; + case 40: + return 17; + case 41: + return 18; + case 42: + return "date"; + case 43: + return 27; + case 44: + return "accDescription"; + case 45: + return 33; + case 46: + return 35; + case 47: + return 36; + case 48: + return ":"; + case 49: + return 6; + case 50: + return "INVALID"; + } + }, + rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^\n]+)/i, /^(?:[^:\n]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "callbackargs": { "rules": [21, 22], "inclusive": false }, "callbackname": { "rules": [18, 19, 20], "inclusive": false }, "href": { "rules": [15, 16], "inclusive": false }, "click": { "rules": [24, 25], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 17, 23, 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], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const ganttParser = parser; +dayjs__WEBPACK_IMPORTED_MODULE_1__.extend(dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_2__); +dayjs__WEBPACK_IMPORTED_MODULE_1__.extend(dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_3__); +dayjs__WEBPACK_IMPORTED_MODULE_1__.extend(dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_4__); +let dateFormat = ""; +let axisFormat = ""; +let tickInterval = void 0; +let todayMarker = ""; +let includes = []; +let excludes = []; +let links = {}; +let sections = []; +let tasks = []; +let currentSection = ""; +let displayMode = ""; +const tags = ["active", "done", "crit", "milestone"]; +let funs = []; +let inclusiveEndDates = false; +let topAxis = false; +let weekday = "sunday"; +let lastOrder = 0; +const clear = function() { + sections = []; + tasks = []; + currentSection = ""; + funs = []; + taskCnt = 0; + lastTask = void 0; + lastTaskID = void 0; + rawTasks = []; + dateFormat = ""; + axisFormat = ""; + displayMode = ""; + tickInterval = void 0; + todayMarker = ""; + includes = []; + excludes = []; + inclusiveEndDates = false; + topAxis = false; + lastOrder = 0; + links = {}; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.v)(); + weekday = "sunday"; +}; +const setAxisFormat = function(txt) { + axisFormat = txt; +}; +const getAxisFormat = function() { + return axisFormat; +}; +const setTickInterval = function(txt) { + tickInterval = txt; +}; +const getTickInterval = function() { + return tickInterval; +}; +const setTodayMarker = function(txt) { + todayMarker = txt; +}; +const getTodayMarker = function() { + return todayMarker; +}; +const setDateFormat = function(txt) { + dateFormat = txt; +}; +const enableInclusiveEndDates = function() { + inclusiveEndDates = true; +}; +const endDatesAreInclusive = function() { + return inclusiveEndDates; +}; +const enableTopAxis = function() { + topAxis = true; +}; +const topAxisEnabled = function() { + return topAxis; +}; +const setDisplayMode = function(txt) { + displayMode = txt; +}; +const getDisplayMode = function() { + return displayMode; +}; +const getDateFormat = function() { + return dateFormat; +}; +const setIncludes = function(txt) { + includes = txt.toLowerCase().split(/[\s,]+/); +}; +const getIncludes = function() { + return includes; +}; +const setExcludes = function(txt) { + excludes = txt.toLowerCase().split(/[\s,]+/); +}; +const getExcludes = function() { + return excludes; +}; +const getLinks = function() { + return links; +}; +const addSection = function(txt) { + currentSection = txt; + sections.push(txt); +}; +const getSections = function() { + return sections; +}; +const getTasks = function() { + let allItemsProcessed = compileTasks(); + const maxDepth = 10; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } + tasks = rawTasks; + return tasks; +}; +const isInvalidDate = function(date, dateFormat2, excludes2, includes2) { + if (includes2.includes(date.format(dateFormat2.trim()))) { + return false; + } + if (date.isoWeekday() >= 6 && excludes2.includes("weekends")) { + return true; + } + if (excludes2.includes(date.format("dddd").toLowerCase())) { + return true; + } + return excludes2.includes(date.format(dateFormat2.trim())); +}; +const setWeekday = function(txt) { + weekday = txt; +}; +const getWeekday = function() { + return weekday; +}; +const checkTaskDates = function(task, dateFormat2, excludes2, includes2) { + if (!excludes2.length || task.manualEndTime) { + return; + } + let startTime; + if (task.startTime instanceof Date) { + startTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(task.startTime); + } else { + startTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(task.startTime, dateFormat2, true); + } + startTime = startTime.add(1, "d"); + let originalEndTime; + if (task.endTime instanceof Date) { + originalEndTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(task.endTime); + } else { + originalEndTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(task.endTime, dateFormat2, true); + } + const [fixedEndTime, renderEndTime] = fixTaskDates( + startTime, + originalEndTime, + dateFormat2, + excludes2, + includes2 + ); + task.endTime = fixedEndTime.toDate(); + task.renderEndTime = renderEndTime; +}; +const fixTaskDates = function(startTime, endTime, dateFormat2, excludes2, includes2) { + let invalid = false; + let renderEndTime = null; + while (startTime <= endTime) { + if (!invalid) { + renderEndTime = endTime.toDate(); + } + invalid = isInvalidDate(startTime, dateFormat2, excludes2, includes2); + if (invalid) { + endTime = endTime.add(1, "d"); + } + startTime = startTime.add(1, "d"); + } + return [endTime, renderEndTime]; +}; +const getStartDate = function(prevTime, dateFormat2, str) { + str = str.trim(); + const afterRePattern = /^after\s+(?<ids>[\d\w- ]+)/; + const afterStatement = afterRePattern.exec(str); + if (afterStatement !== null) { + let latestTask = null; + for (const id of afterStatement.groups.ids.split(" ")) { + let task = findTaskById(id); + if (task !== void 0 && (!latestTask || task.endTime > latestTask.endTime)) { + latestTask = task; + } + } + if (latestTask) { + return latestTask.endTime; + } + const today = /* @__PURE__ */ new Date(); + today.setHours(0, 0, 0, 0); + return today; + } + let mDate = dayjs__WEBPACK_IMPORTED_MODULE_1__(str, dateFormat2.trim(), true); + if (mDate.isValid()) { + return mDate.toDate(); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.debug("Invalid date:" + str); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.debug("With date format:" + dateFormat2.trim()); + const d = new Date(str); + if (d === void 0 || isNaN(d.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously + // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304. + // This can cause virtually infinite loops while rendering, so for the + // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as + // invalid. + d.getFullYear() < -1e4 || d.getFullYear() > 1e4) { + throw new Error("Invalid date:" + str); + } + return d; + } +}; +const parseDuration = function(str) { + const statement = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(str.trim()); + if (statement !== null) { + return [Number.parseFloat(statement[1]), statement[2]]; + } + return [NaN, "ms"]; +}; +const getEndDate = function(prevTime, dateFormat2, str, inclusive = false) { + str = str.trim(); + const untilRePattern = /^until\s+(?<ids>[\d\w- ]+)/; + const untilStatement = untilRePattern.exec(str); + if (untilStatement !== null) { + let earliestTask = null; + for (const id of untilStatement.groups.ids.split(" ")) { + let task = findTaskById(id); + if (task !== void 0 && (!earliestTask || task.startTime < earliestTask.startTime)) { + earliestTask = task; + } + } + if (earliestTask) { + return earliestTask.startTime; + } + const today = /* @__PURE__ */ new Date(); + today.setHours(0, 0, 0, 0); + return today; + } + let parsedDate = dayjs__WEBPACK_IMPORTED_MODULE_1__(str, dateFormat2.trim(), true); + if (parsedDate.isValid()) { + if (inclusive) { + parsedDate = parsedDate.add(1, "d"); + } + return parsedDate.toDate(); + } + let endTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(prevTime); + const [durationValue, durationUnit] = parseDuration(str); + if (!Number.isNaN(durationValue)) { + const newEndTime = endTime.add(durationValue, durationUnit); + if (newEndTime.isValid()) { + endTime = newEndTime; + } + } + return endTime.toDate(); +}; +let taskCnt = 0; +const parseId = function(idStr) { + if (idStr === void 0) { + taskCnt = taskCnt + 1; + return "task" + taskCnt; + } + return idStr; +}; +const compileData = function(prevTask, dataStr) { + let ds; + if (dataStr.substr(0, 1) === ":") { + ds = dataStr.substr(1, dataStr.length); + } else { + ds = dataStr; + } + const data = ds.split(","); + const task = {}; + getTaskTags(data, task, tags); + for (let i = 0; i < data.length; i++) { + data[i] = data[i].trim(); + } + let endTimeData = ""; + switch (data.length) { + case 1: + task.id = parseId(); + task.startTime = prevTask.endTime; + endTimeData = data[0]; + break; + case 2: + task.id = parseId(); + task.startTime = getStartDate(void 0, dateFormat, data[0]); + endTimeData = data[1]; + break; + case 3: + task.id = parseId(data[0]); + task.startTime = getStartDate(void 0, dateFormat, data[1]); + endTimeData = data[2]; + break; + } + if (endTimeData) { + task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates); + task.manualEndTime = dayjs__WEBPACK_IMPORTED_MODULE_1__(endTimeData, "YYYY-MM-DD", true).isValid(); + checkTaskDates(task, dateFormat, excludes, includes); + } + return task; +}; +const parseData = function(prevTaskId, dataStr) { + let ds; + if (dataStr.substr(0, 1) === ":") { + ds = dataStr.substr(1, dataStr.length); + } else { + ds = dataStr; + } + const data = ds.split(","); + const task = {}; + getTaskTags(data, task, tags); + for (let i = 0; i < data.length; i++) { + data[i] = data[i].trim(); + } + switch (data.length) { + case 1: + task.id = parseId(); + task.startTime = { + type: "prevTaskEnd", + id: prevTaskId + }; + task.endTime = { + data: data[0] + }; + break; + case 2: + task.id = parseId(); + task.startTime = { + type: "getStartDate", + startData: data[0] + }; + task.endTime = { + data: data[1] + }; + break; + case 3: + task.id = parseId(data[0]); + task.startTime = { + type: "getStartDate", + startData: data[1] + }; + task.endTime = { + data: data[2] + }; + break; + } + return task; +}; +let lastTask; +let lastTaskID; +let rawTasks = []; +const taskDb = {}; +const addTask = function(descr, data) { + const rawTask = { + section: currentSection, + type: currentSection, + processed: false, + manualEndTime: false, + renderEndTime: null, + raw: { data }, + task: descr, + classes: [] + }; + const taskInfo = parseData(lastTaskID, data); + rawTask.raw.startTime = taskInfo.startTime; + rawTask.raw.endTime = taskInfo.endTime; + rawTask.id = taskInfo.id; + rawTask.prevTaskId = lastTaskID; + rawTask.active = taskInfo.active; + rawTask.done = taskInfo.done; + rawTask.crit = taskInfo.crit; + rawTask.milestone = taskInfo.milestone; + rawTask.order = lastOrder; + lastOrder++; + const pos = rawTasks.push(rawTask); + lastTaskID = rawTask.id; + taskDb[rawTask.id] = pos - 1; +}; +const findTaskById = function(id) { + const pos = taskDb[id]; + return rawTasks[pos]; +}; +const addTaskOrg = function(descr, data) { + const newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + const taskInfo = compileData(lastTask, data); + newTask.startTime = taskInfo.startTime; + newTask.endTime = taskInfo.endTime; + newTask.id = taskInfo.id; + newTask.active = taskInfo.active; + newTask.done = taskInfo.done; + newTask.crit = taskInfo.crit; + newTask.milestone = taskInfo.milestone; + lastTask = newTask; + tasks.push(newTask); +}; +const compileTasks = function() { + const compileTask = function(pos) { + const task = rawTasks[pos]; + let startTime = ""; + switch (rawTasks[pos].raw.startTime.type) { + case "prevTaskEnd": { + const prevTask = findTaskById(task.prevTaskId); + task.startTime = prevTask.endTime; + break; + } + case "getStartDate": + startTime = getStartDate(void 0, dateFormat, rawTasks[pos].raw.startTime.startData); + if (startTime) { + rawTasks[pos].startTime = startTime; + } + break; + } + if (rawTasks[pos].startTime) { + rawTasks[pos].endTime = getEndDate( + rawTasks[pos].startTime, + dateFormat, + rawTasks[pos].raw.endTime.data, + inclusiveEndDates + ); + if (rawTasks[pos].endTime) { + rawTasks[pos].processed = true; + rawTasks[pos].manualEndTime = dayjs__WEBPACK_IMPORTED_MODULE_1__( + rawTasks[pos].raw.endTime.data, + "YYYY-MM-DD", + true + ).isValid(); + checkTaskDates(rawTasks[pos], dateFormat, excludes, includes); + } + } + return rawTasks[pos].processed; + }; + let allProcessed = true; + for (const [i, rawTask] of rawTasks.entries()) { + compileTask(i); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; +}; +const setLink = function(ids, _linkStr) { + let linkStr = _linkStr; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel !== "loose") { + linkStr = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(_linkStr); + } + ids.split(",").forEach(function(id) { + let rawTask = findTaskById(id); + if (rawTask !== void 0) { + pushFun(id, () => { + window.open(linkStr, "_self"); + }); + links[id] = linkStr; + } + }); + setClass(ids, "clickable"); +}; +const setClass = function(ids, className) { + ids.split(",").forEach(function(id) { + let rawTask = findTaskById(id); + if (rawTask !== void 0) { + rawTask.classes.push(className); + } + }); +}; +const setClickFun = function(id, functionName, functionArgs) { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i = 0; i < argList.length; i++) { + let item = argList[i].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i] = item; + } + } + if (argList.length === 0) { + argList.push(id); + } + let rawTask = findTaskById(id); + if (rawTask !== void 0) { + pushFun(id, () => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.u.runFunc(functionName, ...argList); + }); + } +}; +const pushFun = function(id, callbackFunction) { + funs.push( + function() { + const elem = document.querySelector(`[id="${id}"]`); + if (elem !== null) { + elem.addEventListener("click", function() { + callbackFunction(); + }); + } + }, + function() { + const elem = document.querySelector(`[id="${id}-text"]`); + if (elem !== null) { + elem.addEventListener("click", function() { + callbackFunction(); + }); + } + } + ); +}; +const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id) { + setClickFun(id, functionName, functionArgs); + }); + setClass(ids, "clickable"); +}; +const bindFunctions = function(element) { + funs.forEach(function(fun) { + fun(element); + }); +}; +const ganttDb = { + getConfig: () => (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().gantt, + clear, + setDateFormat, + getDateFormat, + enableInclusiveEndDates, + endDatesAreInclusive, + enableTopAxis, + topAxisEnabled, + setAxisFormat, + getAxisFormat, + setTickInterval, + getTickInterval, + setTodayMarker, + getTodayMarker, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.g, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.t, + setDisplayMode, + getDisplayMode, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.b, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.a, + addSection, + getSections, + getTasks, + addTask, + findTaskById, + addTaskOrg, + setIncludes, + getIncludes, + setExcludes, + getExcludes, + setClickEvent, + setLink, + getLinks, + bindFunctions, + parseDuration, + isInvalidDate, + setWeekday, + getWeekday +}; +function getTaskTags(data, task, tags2) { + let matchFound = true; + while (matchFound) { + matchFound = false; + tags2.forEach(function(t) { + const pattern = "^\\s*" + t + "\\s*$"; + const regex = new RegExp(pattern); + if (data[0].match(regex)) { + task[t] = true; + data.shift(1); + matchFound = true; + } + }); + } +} +const setConf = function() { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.debug("Something is calling, setConf, remove the call"); +}; +const mapWeekdayToTimeFunction = { + monday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMonday */ .ABi, + tuesday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeTuesday */ .PGu, + wednesday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeWednesday */ .GuW, + thursday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeThursday */ .Mol, + friday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeFriday */ .TUC, + saturday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeSaturday */ .rGn, + sunday: d3__WEBPACK_IMPORTED_MODULE_5__/* .timeSunday */ .YPH +}; +const getMaxIntersections = (tasks2, orderOffset) => { + let timeline = [...tasks2].map(() => -Infinity); + let sorted = [...tasks2].sort((a, b) => a.startTime - b.startTime || a.order - b.order); + let maxIntersections = 0; + for (const element of sorted) { + for (let j = 0; j < timeline.length; j++) { + if (element.startTime >= timeline[j]) { + timeline[j] = element.endTime; + element.order = j + orderOffset; + if (j > maxIntersections) { + maxIntersections = j; + } + break; + } + } + } + return maxIntersections; +}; +let w; +const draw = function(text, id, version, diagObj) { + const conf = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().gantt; + const securityLevel = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .select */ .Ltv)("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const elem = doc.getElementById(id); + w = elem.parentElement.offsetWidth; + if (w === void 0) { + w = 1200; + } + if (conf.useWidth !== void 0) { + w = conf.useWidth; + } + const taskArray = diagObj.db.getTasks(); + let categories = []; + for (const element of taskArray) { + categories.push(element.type); + } + categories = checkUnique(categories); + const categoryHeights = {}; + let h = 2 * conf.topPadding; + if (diagObj.db.getDisplayMode() === "compact" || conf.displayMode === "compact") { + const categoryElements = {}; + for (const element of taskArray) { + if (categoryElements[element.section] === void 0) { + categoryElements[element.section] = [element]; + } else { + categoryElements[element.section].push(element); + } + } + let intersections = 0; + for (const category of Object.keys(categoryElements)) { + const categoryHeight = getMaxIntersections(categoryElements[category], intersections) + 1; + intersections += categoryHeight; + h += categoryHeight * (conf.barHeight + conf.barGap); + categoryHeights[category] = categoryHeight; + } + } else { + h += taskArray.length * (conf.barHeight + conf.barGap); + for (const category of categories) { + categoryHeights[category] = taskArray.filter((task) => task.type === category).length; + } + } + elem.setAttribute("viewBox", "0 0 " + w + " " + h); + const svg = root.select(`[id="${id}"]`); + const timeScale = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .scaleTime */ .w7C)().domain([ + (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .min */ .jkA)(taskArray, function(d) { + return d.startTime; + }), + (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .max */ .T9B)(taskArray, function(d) { + return d.endTime; + }) + ]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]); + function taskCompare(a, b) { + const taskA = a.startTime; + const taskB = b.startTime; + let result = 0; + if (taskA > taskB) { + result = 1; + } else if (taskA < taskB) { + result = -1; + } + return result; + } + taskArray.sort(taskCompare); + makeGantt(taskArray, w, h); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.i)(svg, h, w, conf.useMaxWidth); + svg.append("text").text(diagObj.db.getDiagramTitle()).attr("x", w / 2).attr("y", conf.titleTopMargin).attr("class", "titleText"); + function makeGantt(tasks2, pageWidth, pageHeight) { + const barHeight = conf.barHeight; + const gap = barHeight + conf.barGap; + const topPadding = conf.topPadding; + const leftPadding = conf.leftPadding; + const colorScale = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .scaleLinear */ .m4Y)().domain([0, categories.length]).range(["#00B9FA", "#F95002"]).interpolate(d3__WEBPACK_IMPORTED_MODULE_5__/* .interpolateHcl */ .bEH); + drawExcludeDays( + gap, + topPadding, + leftPadding, + pageWidth, + pageHeight, + tasks2, + diagObj.db.getExcludes(), + diagObj.db.getIncludes() + ); + makeGrid(leftPadding, topPadding, pageWidth, pageHeight); + drawRects(tasks2, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth); + vertLabels(gap, topPadding); + drawToday(leftPadding, topPadding, pageWidth, pageHeight); + } + function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w2) { + const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))]; + const uniqueTasks = uniqueTaskOrderIds.map((id2) => theArray.find((item) => item.order === id2)); + svg.append("g").selectAll("rect").data(uniqueTasks).enter().append("rect").attr("x", 0).attr("y", function(d, i) { + i = d.order; + return i * theGap + theTopPad - 2; + }).attr("width", function() { + return w2 - conf.rightPadding / 2; + }).attr("height", theGap).attr("class", function(d) { + for (const [i, category] of categories.entries()) { + if (d.type === category) { + return "section section" + i % conf.numberSectionStyles; + } + } + return "section section0"; + }); + const rectangles = svg.append("g").selectAll("rect").data(theArray).enter(); + const links2 = diagObj.db.getLinks(); + rectangles.append("rect").attr("id", function(d) { + return d.id; + }).attr("rx", 3).attr("ry", 3).attr("x", function(d) { + if (d.milestone) { + return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; + } + return timeScale(d.startTime) + theSidePad; + }).attr("y", function(d, i) { + i = d.order; + return i * theGap + theTopPad; + }).attr("width", function(d) { + if (d.milestone) { + return theBarHeight; + } + return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime); + }).attr("height", theBarHeight).attr("transform-origin", function(d, i) { + i = d.order; + return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + "px " + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + "px"; + }).attr("class", function(d) { + const res = "task"; + let classStr = ""; + if (d.classes.length > 0) { + classStr = d.classes.join(" "); + } + let secNum = 0; + for (const [i, category] of categories.entries()) { + if (d.type === category) { + secNum = i % conf.numberSectionStyles; + } + } + let taskClass = ""; + if (d.active) { + if (d.crit) { + taskClass += " activeCrit"; + } else { + taskClass = " active"; + } + } else if (d.done) { + if (d.crit) { + taskClass = " doneCrit"; + } else { + taskClass = " done"; + } + } else { + if (d.crit) { + taskClass += " crit"; + } + } + if (taskClass.length === 0) { + taskClass = " task"; + } + if (d.milestone) { + taskClass = " milestone " + taskClass; + } + taskClass += secNum; + taskClass += " " + classStr; + return res + taskClass; + }); + rectangles.append("text").attr("id", function(d) { + return d.id + "-text"; + }).text(function(d) { + return d.task; + }).attr("font-size", conf.fontSize).attr("x", function(d) { + let startX = timeScale(d.startTime); + let endX = timeScale(d.renderEndTime || d.endTime); + if (d.milestone) { + startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight; + } + if (d.milestone) { + endX = startX + theBarHeight; + } + const textWidth = this.getBBox().width; + if (textWidth > endX - startX) { + if (endX + textWidth + 1.5 * conf.leftPadding > w2) { + return startX + theSidePad - 5; + } else { + return endX + theSidePad + 5; + } + } else { + return (endX - startX) / 2 + startX + theSidePad; + } + }).attr("y", function(d, i) { + i = d.order; + return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad; + }).attr("text-height", theBarHeight).attr("class", function(d) { + const startX = timeScale(d.startTime); + let endX = timeScale(d.endTime); + if (d.milestone) { + endX = startX + theBarHeight; + } + const textWidth = this.getBBox().width; + let classStr = ""; + if (d.classes.length > 0) { + classStr = d.classes.join(" "); + } + let secNum = 0; + for (const [i, category] of categories.entries()) { + if (d.type === category) { + secNum = i % conf.numberSectionStyles; + } + } + let taskType = ""; + if (d.active) { + if (d.crit) { + taskType = "activeCritText" + secNum; + } else { + taskType = "activeText" + secNum; + } + } + if (d.done) { + if (d.crit) { + taskType = taskType + " doneCritText" + secNum; + } else { + taskType = taskType + " doneText" + secNum; + } + } else { + if (d.crit) { + taskType = taskType + " critText" + secNum; + } + } + if (d.milestone) { + taskType += " milestoneText"; + } + if (textWidth > endX - startX) { + if (endX + textWidth + 1.5 * conf.leftPadding > w2) { + return classStr + " taskTextOutsideLeft taskTextOutside" + secNum + " " + taskType; + } else { + return classStr + " taskTextOutsideRight taskTextOutside" + secNum + " " + taskType + " width-" + textWidth; + } + } else { + return classStr + " taskText taskText" + secNum + " " + taskType + " width-" + textWidth; + } + }); + const securityLevel2 = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.c)().securityLevel; + if (securityLevel2 === "sandbox") { + let sandboxElement2; + sandboxElement2 = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .select */ .Ltv)("#i" + id); + const doc2 = sandboxElement2.nodes()[0].contentDocument; + rectangles.filter(function(d) { + return links2[d.id] !== void 0; + }).each(function(o) { + var taskRect = doc2.querySelector("#" + o.id); + var taskText = doc2.querySelector("#" + o.id + "-text"); + const oldParent = taskRect.parentNode; + var Link = doc2.createElement("a"); + Link.setAttribute("xlink:href", links2[o.id]); + Link.setAttribute("target", "_top"); + oldParent.appendChild(Link); + Link.appendChild(taskRect); + Link.appendChild(taskText); + }); + } + } + function drawExcludeDays(theGap, theTopPad, theSidePad, w2, h2, tasks2, excludes2, includes2) { + if (excludes2.length === 0 && includes2.length === 0) { + return; + } + let minTime; + let maxTime; + for (const { startTime, endTime } of tasks2) { + if (minTime === void 0 || startTime < minTime) { + minTime = startTime; + } + if (maxTime === void 0 || endTime > maxTime) { + maxTime = endTime; + } + } + if (!minTime || !maxTime) { + return; + } + if (dayjs__WEBPACK_IMPORTED_MODULE_1__(maxTime).diff(dayjs__WEBPACK_IMPORTED_MODULE_1__(minTime), "year") > 5) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.l.warn( + "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days." + ); + return; + } + const dateFormat2 = diagObj.db.getDateFormat(); + const excludeRanges = []; + let range = null; + let d = dayjs__WEBPACK_IMPORTED_MODULE_1__(minTime); + while (d.valueOf() <= maxTime) { + if (diagObj.db.isInvalidDate(d, dateFormat2, excludes2, includes2)) { + if (!range) { + range = { + start: d, + end: d + }; + } else { + range.end = d; + } + } else { + if (range) { + excludeRanges.push(range); + range = null; + } + } + d = d.add(1, "d"); + } + const rectangles = svg.append("g").selectAll("rect").data(excludeRanges).enter(); + rectangles.append("rect").attr("id", function(d2) { + return "exclude-" + d2.start.format("YYYY-MM-DD"); + }).attr("x", function(d2) { + return timeScale(d2.start) + theSidePad; + }).attr("y", conf.gridLineStartPadding).attr("width", function(d2) { + const renderEnd = d2.end.add(1, "day"); + return timeScale(renderEnd) - timeScale(d2.start); + }).attr("height", h2 - theTopPad - conf.gridLineStartPadding).attr("transform-origin", function(d2, i) { + return (timeScale(d2.start) + theSidePad + 0.5 * (timeScale(d2.end) - timeScale(d2.start))).toString() + "px " + (i * theGap + 0.5 * h2).toString() + "px"; + }).attr("class", "exclude-range"); + } + function makeGrid(theSidePad, theTopPad, w2, h2) { + let bottomXAxis = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .axisBottom */ .l78)(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat((0,d3__WEBPACK_IMPORTED_MODULE_5__/* .timeFormat */ .DCK)(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d")); + const reTickInterval = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/; + const resultTickInterval = reTickInterval.exec( + diagObj.db.getTickInterval() || conf.tickInterval + ); + if (resultTickInterval !== null) { + const every = resultTickInterval[1]; + const interval = resultTickInterval[2]; + const weekday2 = diagObj.db.getWeekday() || conf.weekday; + switch (interval) { + case "millisecond": + bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMillisecond */ .t6C.every(every)); + break; + case "second": + bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeSecond */ .ucG.every(every)); + break; + case "minute": + bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMinute */ .wXd.every(every)); + break; + case "hour": + bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeHour */ .Agd.every(every)); + break; + case "day": + bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeDay */ .UAC.every(every)); + break; + case "week": + bottomXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every)); + break; + case "month": + bottomXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMonth */ .Ui6.every(every)); + break; + } + } + svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + (h2 - 50) + ")").call(bottomXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"); + if (diagObj.db.topAxisEnabled() || conf.topAxis) { + let topXAxis = (0,d3__WEBPACK_IMPORTED_MODULE_5__/* .axisTop */ .tlR)(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat((0,d3__WEBPACK_IMPORTED_MODULE_5__/* .timeFormat */ .DCK)(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d")); + if (resultTickInterval !== null) { + const every = resultTickInterval[1]; + const interval = resultTickInterval[2]; + const weekday2 = diagObj.db.getWeekday() || conf.weekday; + switch (interval) { + case "millisecond": + topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMillisecond */ .t6C.every(every)); + break; + case "second": + topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeSecond */ .ucG.every(every)); + break; + case "minute": + topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMinute */ .wXd.every(every)); + break; + case "hour": + topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeHour */ .Agd.every(every)); + break; + case "day": + topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeDay */ .UAC.every(every)); + break; + case "week": + topXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every)); + break; + case "month": + topXAxis.ticks(d3__WEBPACK_IMPORTED_MODULE_5__/* .timeMonth */ .Ui6.every(every)); + break; + } + } + svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + theTopPad + ")").call(topXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10); + } + } + function vertLabels(theGap, theTopPad) { + let prevGap = 0; + const numOccurrences = Object.keys(categoryHeights).map((d) => [d, categoryHeights[d]]); + svg.append("g").selectAll("text").data(numOccurrences).enter().append(function(d) { + const rows = d[0].split(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_7__.e.lineBreakRegex); + const dy = -(rows.length - 1) / 2; + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("dy", dy + "em"); + for (const [j, row] of rows.entries()) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttribute("alignment-baseline", "central"); + tspan.setAttribute("x", "10"); + if (j > 0) { + tspan.setAttribute("dy", "1em"); + } + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + return svgLabel; + }).attr("x", 10).attr("y", function(d, i) { + if (i > 0) { + for (let j = 0; j < i; j++) { + prevGap += numOccurrences[i - 1][1]; + return d[1] * theGap / 2 + prevGap * theGap + theTopPad; + } + } else { + return d[1] * theGap / 2 + theTopPad; + } + }).attr("font-size", conf.sectionFontSize).attr("class", function(d) { + for (const [i, category] of categories.entries()) { + if (d[0] === category) { + return "sectionTitle sectionTitle" + i % conf.numberSectionStyles; + } + } + return "sectionTitle"; + }); + } + function drawToday(theSidePad, theTopPad, w2, h2) { + const todayMarker2 = diagObj.db.getTodayMarker(); + if (todayMarker2 === "off") { + return; + } + const todayG = svg.append("g").attr("class", "today"); + const today = /* @__PURE__ */ new Date(); + const todayLine = todayG.append("line"); + todayLine.attr("x1", timeScale(today) + theSidePad).attr("x2", timeScale(today) + theSidePad).attr("y1", conf.titleTopMargin).attr("y2", h2 - conf.titleTopMargin).attr("class", "today"); + if (todayMarker2 !== "") { + todayLine.attr("style", todayMarker2.replace(/,/g, ";")); + } + } + function checkUnique(arr) { + const hash = {}; + const result = []; + for (let i = 0, l = arr.length; i < l; ++i) { + if (!Object.prototype.hasOwnProperty.call(hash, arr[i])) { + hash[arr[i]] = true; + result.push(arr[i]); + } + } + return result; + } +}; +const ganttRenderer = { + setConf, + draw +}; +const getStyles = (options) => ` + .mermaid-main-font { + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .exclude-range { + fill: ${options.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${options.sectionBkgColor}; + } + + .section2 { + fill: ${options.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${options.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${options.titleColor}; + } + + .sectionTitle1 { + fill: ${options.titleColor}; + } + + .sectionTitle2 { + fill: ${options.titleColor}; + } + + .sectionTitle3 { + fill: ${options.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${options.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${options.fontFamily}; + fill: ${options.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${options.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .taskTextOutsideRight { + fill: ${options.taskTextDarkColor}; + text-anchor: start; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .taskTextOutsideLeft { + fill: ${options.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${options.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${options.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${options.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${options.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${options.taskBkgColor}; + stroke: ${options.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${options.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${options.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${options.activeTaskBkgColor}; + stroke: ${options.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${options.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${options.doneTaskBorderColor}; + fill: ${options.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${options.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${options.critBorderColor}; + fill: ${options.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${options.critBorderColor}; + fill: ${options.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${options.critBorderColor}; + fill: ${options.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${options.taskTextDarkColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${options.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.titleColor || options.textColor}; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } +`; +const ganttStyles = getStyles; +const diagram = { + parser: ganttParser, + db: ganttDb, + renderer: ganttRenderer, + styles: ganttStyles +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/5642.92622fe6.js b/assets/js/5642.92622fe6.js new file mode 100644 index 00000000..7a28d862 --- /dev/null +++ b/assets/js/5642.92622fe6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[5642],{5642:(t,e,n)=>{n.d(e,{diagram:()=>O});var i=n(6257),s=n(6312),r=n(3219),a=n(8041),o=n(5263),l=(n(4353),n(6750),n(2838),function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[6,8,10,11,12,14,16,17,20,21],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,16],l=[1,17],c={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.getCommonDb().setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 15:i.addTask(r[o],0,""),this.$=r[o];break;case 16:i.addEvent(r[o].substr(2)),this.$=r[o]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:14,19:15,20:o,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:n,12:i,14:s,16:r,17:a,18:14,19:15,20:o,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,o="",l=0,c=0,h=r.slice.call(arguments,1),d=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);d.setInput(t,u.yy),u.yy.lexer=d,u.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;r.push(y);var g=d.options&&d.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,m,_,b,x,k,v,w,S,$={};;){if(m=n[n.length-1],this.defaultActions[m]?_=this.defaultActions[m]:(null==f&&(S=void 0,"number"!=typeof(S=i.pop()||d.lex()||1)&&(S instanceof Array&&(S=(i=S).pop()),S=e.symbols_[S]||S),f=S),_=a[m]&&a[m][f]),void 0===_||!_.length||!_[0]){var E="";for(x in w=[],a[m])this.terminals_[x]&&x>2&&w.push("'"+this.terminals_[x]+"'");E=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(E,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:y,expected:w})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(_[0]){case 1:n.push(f),s.push(d.yytext),r.push(d.yylloc),n.push(_[1]),f=null,c=d.yyleng,o=d.yytext,l=d.yylineno,y=d.yylloc;break;case 2:if(k=this.productions_[_[1]][1],$.$=s[s.length-k],$._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},g&&($._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply($,[o,c,l,u.yy,_[1],s,r].concat(h))))return b;k&&(n=n.slice(0,-1*k*2),s=s.slice(0,-1*k),r=r.slice(0,-1*k)),n.push(this.productions_[_[1]][0]),s.push($.$),r.push($._$),v=a[n[n.length-2]][n[n.length-1]],n.push(v);break;case 3:return!0}}return!0}},h={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?::\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};function d(){this.yy={}}return c.lexer=h,d.prototype=c,c.Parser=d,new d}());l.parser=l;const c=l;let h="",d=0;const u=[],p=[],y=[],g=()=>i.L,f=function(){u.length=0,p.length=0,h="",y.length=0,(0,i.v)()},m=function(t){h=t,u.push(t)},_=function(){return u},b=function(){let t=w();let e=0;for(;!t&&e<100;)t=w(),e++;return p.push(...y),p},x=function(t,e,n){const i={id:d++,section:h,type:h,task:t,score:e||0,events:n?[n]:[]};y.push(i)},k=function(t){y.find((t=>t.id===d-1)).events.push(t)},v=function(t){const e={section:h,type:h,description:t,task:t,classes:[]};p.push(e)},w=function(){let t=!0;for(const[e,n]of y.entries())y[e].processed,t=t&&n.processed;return t},S={clear:f,getCommonDb:g,addSection:m,getSections:_,getTasks:b,addTask:x,addTaskOrg:v,addEvent:k},$=Object.freeze(Object.defineProperty({__proto__:null,addEvent:k,addSection:m,addTask:x,addTaskOrg:v,clear:f,default:S,getCommonDb:g,getSections:_,getTasks:b},Symbol.toStringTag,{value:"Module"}));!function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:d}=l,u=t.split(/<br\s*\/?>/gi);for(let p=0;p<u.length;p++){const t=p*h-h*(u.length-1)/2,l=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",d);l.append("tspan").attr("x",n+r/2).attr("dy",t).text(u[p]),l.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(l,o)}}function n(t,n,s,r,a,o,l,c){const h=n.append("switch"),d=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,l,c),i(d,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}}();function E(t,e){t.each((function(){var t,n=(0,s.Ltv)(this),i=n.text().split(/(\s+|<br>)/).reverse(),r=[],a=n.attr("y"),o=parseFloat(n.attr("dy")),l=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",o+"em");for(let s=0;s<i.length;s++)t=i[i.length-1-s],r.push(t),l.text(r.join(" ").trim()),(l.node().getComputedTextLength()>e||"<br>"===t)&&(r.pop(),l.text(r.join(" ").trim()),r="<br>"===t?[""]:[t],l=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))}))}const I=function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},L=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},T=function(t,e,n,i){const s=n%12-1,r=t.append("g");e.section=s,r.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+s);const a=r.append("g"),o=r.append("g"),l=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(E,e.width).node().getBBox(),c=i.fontSize&&i.fontSize.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=l.height+1.1*c*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),I(a,e,s),e},A=function(t,e,n){const i=t.append("g"),s=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(E,e.width).node().getBBox(),r=n.fontSize&&n.fontSize.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),s.height+1.1*r*.5+e.padding},C=function(t,e,n,s,r,a,o,l,c,h,d){var u;for(const p of e){const e={descr:p.task,section:n,number:n,width:150,padding:20,maxHeight:a};i.l.debug("taskNode",e);const l=t.append("g").attr("class","taskWrapper"),y=T(l,e,n,o).height;if(i.l.debug("taskHeight after draw",y),l.attr("transform",`translate(${s}, ${r})`),a=Math.max(a,y),p.events){const e=t.append("g").attr("class","lineWrapper");let i=a;r+=100,i+=M(t,p.events,n,s,r,o),r-=100,e.append("line").attr("x1",s+95).attr("y1",r+a).attr("x2",s+95).attr("y2",r+a+(d?a:h)+c+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s+=200,d&&!(null==(u=o.timeline)?void 0:u.disableMulticolor)&&n++}r-=10},M=function(t,e,n,s,r,a){let o=0;const l=r;r+=100;for(const c of e){const e={descr:c,section:n,number:n,width:150,padding:20,maxHeight:50};i.l.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),h=T(l,e,n,a).height;o+=h,l.attr("transform",`translate(${s}, ${r})`),r=r+10+h}return r=l,o},O={db:$,renderer:{setConf:()=>{},draw:function(t,e,n,r){var a,o;const l=(0,i.c)(),c=l.leftMargin??50;i.l.debug("timeline",r.db);const h=l.securityLevel;let d;"sandbox"===h&&(d=(0,s.Ltv)("#i"+e));const u=("sandbox"===h?(0,s.Ltv)(d.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select("#"+e);u.append("g");const p=r.db.getTasks(),y=r.db.getCommonDb().getDiagramTitle();i.l.debug("task",p),L(u);const g=r.db.getSections();i.l.debug("sections",g);let f=0,m=0,_=0,b=0,x=50+c,k=50;b=50;let v=0,w=!0;g.forEach((function(t){const e=A(u,{number:v,descr:t,section:v,width:150,padding:20,maxHeight:f},l);i.l.debug("sectionHeight before draw",e),f=Math.max(f,e+20)}));let S=0,$=0;i.l.debug("tasks.length",p.length);for(const[s,I]of p.entries()){const t={number:s,descr:I,section:I.section,width:150,padding:20,maxHeight:m},e=A(u,t,l);i.l.debug("taskHeight before draw",e),m=Math.max(m,e+20),S=Math.max(S,I.events.length);let n=0;for(let i=0;i<I.events.length;i++){const t={descr:I.events[i],section:I.section,number:I.section,width:150,padding:20,maxHeight:50};n+=A(u,t,l)}$=Math.max($,n)}i.l.debug("maxSectionHeight before draw",f),i.l.debug("maxTaskHeight before draw",m),g&&g.length>0?g.forEach((t=>{const e=p.filter((e=>e.section===t)),n={number:v,descr:t,section:v,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:f};i.l.debug("sectionNode",n);const s=u.append("g"),r=T(s,n,v,l);i.l.debug("sectionNode output",r),s.attr("transform",`translate(${x}, 50)`),k+=f+50,e.length>0&&C(u,e,v,x,k,m,l,S,$,f,!1),x+=200*Math.max(e.length,1),k=50,v++})):(w=!1,C(u,p,v,x,k,m,l,S,$,f,!0));const E=u.node().getBBox();i.l.debug("bounds",E),y&&u.append("text").text(y).attr("x",E.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),_=w?f+m+150:m+100;u.append("g").attr("class","lineWrapper").append("line").attr("x1",c).attr("y1",_).attr("x2",E.width+3*c).attr("y2",_).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,i.o)(void 0,u,(null==(a=l.timeline)?void 0:a.padding)??50,(null==(o=l.timeline)?void 0:o.useMaxWidth)??!1)}},parser:c,styles:t=>`\n .edge {\n stroke-width: 3;\n }\n ${(t=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],(0,r.A)(t["lineColor"+n])?t["lineColor"+n]=(0,a.A)(t["lineColor"+n],20):t["lineColor"+n]=(0,o.A)(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const i=""+(17-3*n);e+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} path {\n fill: ${t["cScale"+n]};\n }\n .section-${n-1} text {\n fill: ${t["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${t["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${i};\n }\n .section-${n-1} line {\n stroke: ${t["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${t["cScaleLabel"+n]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e})(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`}}}]); \ No newline at end of file diff --git a/assets/js/5688.9d57ae43.js b/assets/js/5688.9d57ae43.js new file mode 100644 index 00000000..3f9e7d6b --- /dev/null +++ b/assets/js/5688.9d57ae43.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[5688],{5688:(e,t,s)=>{s.d(t,{diagram:()=>V});var o=s(6292),i=s(697),a=s(6312),n=s(6257),r=s(2746);s(4353),s(6750),s(2838),s(1176),s(4075);const d="rect",c="rectWithTitle",l="statediagram",p=`${l}-state`,b="transition",g=`${b} note-edge`,h=`${l}-note`,u=`${l}-cluster`,y=`${l}-cluster-alt`,f="parent",w="note",m="----",x=`${m}${w}`,$=`${m}${f}`,T="fill:none",S="fill: #333",k="text",v="normal";let D={},A=0;function B(e="",t=0,s="",o=m){return`state-${e}${null!==s&&s.length>0?`${o}${s}`:""}-${t}`}const L=(e,t,s,i,a,r)=>{const l=s.id,b=null==(m=i[l])?"":m.classes?m.classes.join(" "):"";var m;if("root"!==l){let t=d;!0===s.start&&(t="start"),!1===s.start&&(t="end"),s.type!==o.D&&(t=s.type),D[l]||(D[l]={id:l,shape:t,description:n.e.sanitizeText(l,(0,n.c)()),classes:`${b} ${p}`});const i=D[l];s.description&&(Array.isArray(i.description)?(i.shape=c,i.description.push(s.description)):i.description.length>0?(i.shape=c,i.description===l?i.description=[s.description]:i.description=[i.description,s.description]):(i.shape=d,i.description=s.description),i.description=n.e.sanitizeTextOrArray(i.description,(0,n.c)())),1===i.description.length&&i.shape===c&&(i.shape=d),!i.type&&s.doc&&(n.l.info("Setting cluster for ",l,E(s)),i.type="group",i.dir=E(s),i.shape=s.type===o.a?"divider":"roundedWithTitle",i.classes=i.classes+" "+u+" "+(r?y:""));const a={labelStyle:"",shape:i.shape,labelText:i.description,classes:i.classes,style:"",id:l,dir:i.dir,domId:B(l,A),type:i.type,padding:15,centerLabel:!0};if(s.note){const t={labelStyle:"",shape:"note",labelText:s.note.text,classes:h,style:"",id:l+x+"-"+A,domId:B(l,A,w),type:i.type,padding:15},o={labelStyle:"",shape:"noteGroup",labelText:s.note.text,classes:i.classes,style:"",id:l+$,domId:B(l,A,f),type:"group",padding:0};A++;const n=l+$;e.setNode(n,o),e.setNode(t.id,t),e.setNode(l,a),e.setParent(l,n),e.setParent(t.id,n);let r=l,d=t.id;"left of"===s.note.position&&(r=t.id,d=l),e.setEdge(r,d,{arrowhead:"none",arrowType:"",style:T,labelStyle:"",classes:g,arrowheadStyle:S,labelpos:"c",labelType:k,thickness:v})}else e.setNode(l,a)}t&&"root"!==t.id&&(n.l.trace("Setting node ",l," to be child of its parent ",t.id),e.setParent(l,t.id)),s.doc&&(n.l.trace("Adding nodes children "),C(e,s,s.doc,i,a,!r))},C=(e,t,s,i,a,r)=>{n.l.trace("items",s),s.forEach((s=>{switch(s.stmt){case o.b:case o.D:L(e,t,s,i,a,r);break;case o.S:{L(e,t,s.state1,i,a,r),L(e,t,s.state2,i,a,r);const o={id:"edge"+A,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:T,labelStyle:"",label:n.e.sanitizeText(s.description,(0,n.c)()),arrowheadStyle:S,labelpos:"c",labelType:k,thickness:v,classes:b};e.setEdge(s.state1.id,s.state2.id,o,A),A++}}}))},E=(e,t=o.c)=>{let s=t;if(e.doc)for(let o=0;o<e.doc.length;o++){const t=e.doc[o];"dir"===t.stmt&&(s=t.value)}return s},R={setConf:function(e){const t=Object.keys(e);for(const s of t)e[s]},getClasses:function(e,t){return t.db.extract(t.db.getRootDocV2()),t.db.getClasses()},draw:async function(e,t,s,o){n.l.info("Drawing state diagram (v2)",t),D={},o.db.getDirection();const{securityLevel:c,state:p}=(0,n.c)(),b=p.nodeSpacing||50,g=p.rankSpacing||50;n.l.info(o.db.getRootDocV2()),o.db.extract(o.db.getRootDocV2()),n.l.info(o.db.getRootDocV2());const h=o.db.getStates(),u=new i.T({multigraph:!0,compound:!0}).setGraph({rankdir:E(o.db.getRootDocV2()),nodesep:b,ranksep:g,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));let y;L(u,void 0,o.db.getRootDocV2(),h,o.db,!0),"sandbox"===c&&(y=(0,a.Ltv)("#i"+t));const f="sandbox"===c?(0,a.Ltv)(y.nodes()[0].contentDocument.body):(0,a.Ltv)("body"),w=f.select(`[id="${t}"]`),m=f.select("#"+t+" g");await(0,r.r)(m,u,["barb"],l,t);n.u.insertTitle(w,"statediagramTitleText",p.titleTopMargin,o.db.getDiagramTitle());const x=w.node().getBBox(),$=x.width+16,T=x.height+16;w.attr("class",l);const S=w.node().getBBox();(0,n.i)(w,T,$,p.useMaxWidth);const k=`${S.x-8} ${S.y-8} ${$} ${T}`;n.l.debug(`viewBox ${k}`),w.attr("viewBox",k);const v=document.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const i of v){const e=i.getBBox(),t=document.createElementNS("http://www.w3.org/2000/svg",d);t.setAttribute("rx",0),t.setAttribute("ry",0),t.setAttribute("width",e.width),t.setAttribute("height",e.height),i.insertBefore(t,i.firstChild)}}},V={parser:o.p,db:o.d,renderer:R,styles:o.s,init:e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,o.d.clear()}}}}]); \ No newline at end of file diff --git a/assets/js/59f922ef.d5e41fd4.js b/assets/js/59f922ef.d5e41fd4.js new file mode 100644 index 00000000..5fc8b932 --- /dev/null +++ b/assets/js/59f922ef.d5e41fd4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[3887],{9773:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>o,default:()=>p,frontMatter:()=>d,metadata:()=>a,toc:()=>c});var r=n(4848),i=n(8453);const d={},o="Upgrading",a={id:"contribute/development-guide/upgrading",title:"Upgrading",description:"TBD",source:"@site/docs/contribute/development-guide/upgrading.md",sourceDirName:"contribute/development-guide",slug:"/contribute/development-guide/upgrading",permalink:"/tagreader-python/docs/contribute/development-guide/upgrading",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/contribute/development-guide/upgrading.md",tags:[],version:"current",frontMatter:{},sidebar:"contribute",previous:{title:"Testing",permalink:"/tagreader-python/docs/contribute/development-guide/testing"},next:{title:"Documentation",permalink:"/tagreader-python/docs/contribute/documentation"}},u={},c=[];function s(e){const t={h1:"h1",header:"header",p:"p",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"upgrading",children:"Upgrading"})}),"\n",(0,r.jsx)(t.p,{children:"TBD"})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(s,{...e})}):s(e)}}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.ad8f2bde.js b/assets/js/5e95c892.ad8f2bde.js new file mode 100644 index 00000000..da976101 --- /dev/null +++ b/assets/js/5e95c892.ad8f2bde.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[9647],{7121:(e,s,n)=>{n.r(s),n.d(s,{default:()=>d});n(6540);var r=n(4164),t=n(1003),u=n(7559),a=n(2831),c=n(8244),o=n(4848);function d(e){return(0,o.jsx)(t.e3,{className:(0,r.A)(u.G.wrapper.docsPages),children:(0,o.jsx)(c.A,{children:(0,a.v)(e.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/6063.c242930b.js b/assets/js/6063.c242930b.js new file mode 100644 index 00000000..8680d651 --- /dev/null +++ b/assets/js/6063.c242930b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[6063],{6063:(t,e,i)=>{i.d(e,{diagram:()=>d});var n=i(6257),s=i(6312),r=(i(4353),i(6750),i(2838),function(){var t=function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},e=[1,3],i=[1,4],n=[1,5],s=[1,6],r=[1,10,12,14,16,18,19,20,21,22],l=[2,4],a=[1,5,10,12,14,16,18,19,20,21,22],c=[20,21,22],o=[2,7],h=[1,12],u=[1,13],y=[1,14],p=[1,15],d=[1,16],g=[1,17],f={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,PIE:5,document:6,showData:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,section:19,NEWLINE:20,";":21,EOF:22,$accept:0,$end:1},terminals_:{2:"error",5:"PIE",7:"showData",10:"txt",11:"value",12:"title",13:"title_value",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"section",20:"NEWLINE",21:";",22:"EOF"},productions_:[0,[3,2],[3,2],[3,3],[6,0],[6,2],[8,2],[9,0],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[4,1],[4,1],[4,1]],performAction:function(t,e,i,n,s,r,l){var a=r.length-1;switch(s){case 3:n.setShowData(!0);break;case 6:this.$=r[a-1];break;case 8:n.addSection(r[a-1],n.cleanupValue(r[a]));break;case 9:this.$=r[a].trim(),n.setDiagramTitle(this.$);break;case 10:this.$=r[a].trim(),n.setAccTitle(this.$);break;case 11:case 12:this.$=r[a].trim(),n.setAccDescription(this.$);break;case 13:n.addSection(r[a].substr(8)),this.$=r[a].substr(8)}},table:[{3:1,4:2,5:e,20:i,21:n,22:s},{1:[3]},{3:7,4:2,5:e,20:i,21:n,22:s},t(r,l,{6:8,7:[1,9]}),t(a,[2,14]),t(a,[2,15]),t(a,[2,16]),{1:[2,1]},t(c,o,{8:10,9:11,1:[2,2],10:h,12:u,14:y,16:p,18:d,19:g}),t(r,l,{6:18}),t(r,[2,5]),{4:19,20:i,21:n,22:s},{11:[1,20]},{13:[1,21]},{15:[1,22]},{17:[1,23]},t(c,[2,12]),t(c,[2,13]),t(c,o,{8:10,9:11,1:[2,3],10:h,12:u,14:y,16:p,18:d,19:g}),t(r,[2,6]),t(c,[2,8]),t(c,[2,9]),t(c,[2,10]),t(c,[2,11])],defaultActions:{7:[2,1]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],n=[],s=[null],r=[],l=this.table,a="",c=0,o=0,h=r.slice.call(arguments,1),u=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);u.setInput(t,y.yy),y.yy.lexer=u,y.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var d=u.yylloc;r.push(d);var g=u.options&&u.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,_,m,k,b,x,v,S,w,$={};;){if(_=i[i.length-1],this.defaultActions[_]?m=this.defaultActions[_]:(null==f&&(w=void 0,"number"!=typeof(w=n.pop()||u.lex()||1)&&(w instanceof Array&&(w=(n=w).pop()),w=e.symbols_[w]||w),f=w),m=l[_]&&l[_][f]),void 0===m||!m.length||!m[0]){var E="";for(b in S=[],l[_])this.terminals_[b]&&b>2&&S.push("'"+this.terminals_[b]+"'");E=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(E,{text:u.match,token:this.terminals_[f]||f,line:u.yylineno,loc:d,expected:S})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+f);switch(m[0]){case 1:i.push(f),s.push(u.yytext),r.push(u.yylloc),i.push(m[1]),f=null,o=u.yyleng,a=u.yytext,c=u.yylineno,d=u.yylloc;break;case 2:if(x=this.productions_[m[1]][1],$.$=s[s.length-x],$._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},g&&($._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply($,[a,o,c,y.yy,m[1],s,r].concat(h))))return k;x&&(i=i.slice(0,-1*x*2),s=s.slice(0,-1*x),r=r.slice(0,-1*x)),i.push(this.productions_[m[1]][0]),s.push($.$),r.push($._$),v=l[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0}},_={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((i=this._input.match(this.rules[s[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,n){switch(i){case 0:case 1:case 3:case 4:break;case 2:return 20;case 5:return this.begin("title"),12;case 6:return this.popState(),"title_value";case 7:return this.begin("acc_title"),14;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),16;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:case 15:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 16:return"txt";case 17:return 5;case 18:return 7;case 19:return"value";case 20:return 22}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[6],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,7,9,11,14,17,18,19,20],inclusive:!0}}};function m(){this.yy={}}return f.lexer=_,m.prototype=f,f.Parser=m,new m}());r.parser=r;const l=r,a=n.B.pie,c={},o=!1;let h=c,u=o;const y=structuredClone(a),p={getConfig:()=>structuredClone(y),clear:()=>{h=structuredClone(c),u=o,(0,n.v)()},setDiagramTitle:n.q,getDiagramTitle:n.t,setAccTitle:n.s,getAccTitle:n.g,setAccDescription:n.b,getAccDescription:n.a,addSection:(t,e)=>{t=(0,n.d)(t,(0,n.c)()),void 0===h[t]&&(h[t]=e,n.l.debug(`added new section: ${t}, with value: ${e}`))},getSections:()=>h,cleanupValue:t=>(":"===t.substring(0,1)&&(t=t.substring(1).trim()),Number(t.trim())),setShowData:t=>{u=t},getShowData:()=>u},d={parser:l,db:p,renderer:{draw:(t,e,i,r)=>{n.l.debug("rendering pie chart\n"+t);const l=r.db,a=(0,n.c)(),c=(0,n.C)(l.getConfig(),a.pie),o=18,h=450,u=h,y=(0,n.A)(e),p=y.append("g"),d=l.getSections();p.attr("transform","translate(225,225)");const{themeVariables:g}=a;let[f]=(0,n.D)(g.pieOuterStrokeWidth);f??(f=2);const _=c.textPosition,m=Math.min(u,h)/2-40,k=(0,s.JLW)().innerRadius(0).outerRadius(m),b=(0,s.JLW)().innerRadius(m*_).outerRadius(m*_);p.append("circle").attr("cx",0).attr("cy",0).attr("r",m+f/2).attr("class","pieOuterCircle");const x=(t=>{const e=Object.entries(t).map((t=>({label:t[0],value:t[1]}))).sort(((t,e)=>e.value-t.value));return(0,s.rLf)().value((t=>t.value))(e)})(d),v=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],S=(0,s.UMr)(v);p.selectAll("mySlices").data(x).enter().append("path").attr("d",k).attr("fill",(t=>S(t.data.label))).attr("class","pieCircle");let w=0;Object.keys(d).forEach((t=>{w+=d[t]})),p.selectAll("mySlices").data(x).enter().append("text").text((t=>(t.data.value/w*100).toFixed(0)+"%")).attr("transform",(t=>"translate("+b.centroid(t)+")")).style("text-anchor","middle").attr("class","slice"),p.append("text").text(l.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const $=p.selectAll(".legend").data(S.domain()).enter().append("g").attr("class","legend").attr("transform",((t,e)=>"translate(216,"+(22*e-22*S.domain().length/2)+")"));$.append("rect").attr("width",o).attr("height",o).style("fill",S).style("stroke",S),$.data(x).append("text").attr("x",22).attr("y",14).text((t=>{const{label:e,value:i}=t.data;return l.getShowData()?`${e} [${i}]`:e}));const E=512+Math.max(...$.selectAll("text").nodes().map((t=>(null==t?void 0:t.getBoundingClientRect().width)??0)));y.attr("viewBox",`0 0 ${E} 450`),(0,n.i)(y,h,E,c.useMaxWidth)}},styles:t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${t.pieOuterStrokeColor};\n stroke-width: ${t.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`}}}]); \ No newline at end of file diff --git a/assets/js/609.fc671e1c.js b/assets/js/609.fc671e1c.js new file mode 100644 index 00000000..e66600e6 --- /dev/null +++ b/assets/js/609.fc671e1c.js @@ -0,0 +1,10814 @@ +"use strict"; +exports.id = 609; +exports.ids = [609]; +exports.modules = { + +/***/ 1176: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + Zp: () => (/* reexport */ layout) +}); + +// UNUSED EXPORTS: acyclic, normalize, rank + +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js +var uniqueId = __webpack_require__(5664); +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/map.js +var map = __webpack_require__(4722); +// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules +var range = __webpack_require__(1395); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js +var graphlib = __webpack_require__(697); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js +/* + * Simple doubly linked list implementation derived from Cormen, et al., + * "Introduction to Algorithms". + */ + + + +class List { + constructor() { + var sentinel = {}; + sentinel._next = sentinel._prev = sentinel; + this._sentinel = sentinel; + } + dequeue() { + var sentinel = this._sentinel; + var entry = sentinel._prev; + if (entry !== sentinel) { + unlink(entry); + return entry; + } + } + enqueue(entry) { + var sentinel = this._sentinel; + if (entry._prev && entry._next) { + unlink(entry); + } + entry._next = sentinel._next; + sentinel._next._prev = entry; + sentinel._next = entry; + entry._prev = sentinel; + } + toString() { + var strs = []; + var sentinel = this._sentinel; + var curr = sentinel._prev; + while (curr !== sentinel) { + strs.push(JSON.stringify(curr, filterOutLinks)); + curr = curr._prev; + } + return '[' + strs.join(', ') + ']'; + } +} + +function unlink(entry) { + entry._prev._next = entry._next; + entry._next._prev = entry._prev; + delete entry._next; + delete entry._prev; +} + +function filterOutLinks(k, v) { + if (k !== '_next' && k !== '_prev') { + return v; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js + + + + +/* + * A greedy heuristic for finding a feedback arc set for a graph. A feedback + * arc set is a set of edges that can be removed to make a graph acyclic. + * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and + * effective heuristic for the feedback arc set problem." This implementation + * adjusts that from the paper to allow for weighted edges. + */ + + +var DEFAULT_WEIGHT_FN = constant/* default */.A(1); + +function greedyFAS(g, weightFn) { + if (g.nodeCount() <= 1) { + return []; + } + var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); + var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); + + // Expand multi-edges + return flatten/* default */.A( + map/* default */.A(results, function (e) { + return g.outEdges(e.v, e.w); + }) + ); +} + +function doGreedyFAS(g, buckets, zeroIdx) { + var results = []; + var sources = buckets[buckets.length - 1]; + var sinks = buckets[0]; + + var entry; + while (g.nodeCount()) { + while ((entry = sinks.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + while ((entry = sources.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + if (g.nodeCount()) { + for (var i = buckets.length - 2; i > 0; --i) { + entry = buckets[i].dequeue(); + if (entry) { + results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); + break; + } + } + } + } + + return results; +} + +function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { + var results = collectPredecessors ? [] : undefined; + + forEach/* default */.A(g.inEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var uEntry = g.node(edge.v); + + if (collectPredecessors) { + results.push({ v: edge.v, w: edge.w }); + } + + uEntry.out -= weight; + assignBucket(buckets, zeroIdx, uEntry); + }); + + forEach/* default */.A(g.outEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var w = edge.w; + var wEntry = g.node(w); + wEntry['in'] -= weight; + assignBucket(buckets, zeroIdx, wEntry); + }); + + g.removeNode(entry.v); + + return results; +} + +function buildState(g, weightFn) { + var fasGraph = new graphlib/* Graph */.T(); + var maxIn = 0; + var maxOut = 0; + + forEach/* default */.A(g.nodes(), function (v) { + fasGraph.setNode(v, { v: v, in: 0, out: 0 }); + }); + + // Aggregate weights on nodes, but also sum the weights across multi-edges + // into a single edge for the fasGraph. + forEach/* default */.A(g.edges(), function (e) { + var prevWeight = fasGraph.edge(e.v, e.w) || 0; + var weight = weightFn(e); + var edgeWeight = prevWeight + weight; + fasGraph.setEdge(e.v, e.w, edgeWeight); + maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); + maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); + }); + + var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { + return new List(); + }); + var zeroIdx = maxIn + 1; + + forEach/* default */.A(fasGraph.nodes(), function (v) { + assignBucket(buckets, zeroIdx, fasGraph.node(v)); + }); + + return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; +} + +function assignBucket(buckets, zeroIdx, entry) { + if (!entry.out) { + buckets[0].enqueue(entry); + } else if (!entry['in']) { + buckets[buckets.length - 1].enqueue(entry); + } else { + buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js + + + + + +function run(g) { + var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); + forEach/* default */.A(fas, function (e) { + var label = g.edge(e); + g.removeEdge(e); + label.forwardName = e.name; + label.reversed = true; + g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); + }); + + function weightFn(g) { + return function (e) { + return g.edge(e).weight; + }; + } +} + +function dfsFAS(g) { + var fas = []; + var stack = {}; + var visited = {}; + + function dfs(v) { + if (has/* default */.A(visited, v)) { + return; + } + visited[v] = true; + stack[v] = true; + forEach/* default */.A(g.outEdges(v), function (e) { + if (has/* default */.A(stack, e.w)) { + fas.push(e); + } else { + dfs(e.w); + } + }); + delete stack[v]; + } + + forEach/* default */.A(g.nodes(), dfs); + return fas; +} + +function undo(g) { + forEach/* default */.A(g.edges(), function (e) { + var label = g.edge(e); + if (label.reversed) { + g.removeEdge(e); + + var forwardName = label.forwardName; + delete label.reversed; + delete label.forwardName; + g.setEdge(e.w, e.v, label, forwardName); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules +var merge = __webpack_require__(8879); +// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules +var pick = __webpack_require__(1942); +// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js +var defaults = __webpack_require__(3068); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js + + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !(0,isSymbol/* default */.A)(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +/* harmony default export */ const _baseExtremum = (baseExtremum); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +/* harmony default export */ const _baseGt = (baseGt); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js + + + + +/** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ +function max(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseGt) + : undefined; +} + +/* harmony default export */ const lodash_es_max = (max); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +/* harmony default export */ const lodash_es_last = (last); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js +var _baseAssignValue = __webpack_require__(2528); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js + + + + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); + + (0,_baseForOwn/* default */.A)(object, function(value, key, object) { + (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ const lodash_es_mapValues = (mapValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +/* harmony default export */ const _baseLt = (baseLt); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js + + + + +/** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ +function min(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_min = (min); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js +var _root = __webpack_require__(1917); +;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js + + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return _root/* default */.A.Date.now(); +}; + +/* harmony default export */ const lodash_es_now = (now); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js + + + + + +/* + * Adds a dummy node to the graph and return v. + */ +function addDummyNode(g, type, attrs, name) { + var v; + do { + v = uniqueId/* default */.A(name); + } while (g.hasNode(v)); + + attrs.dummy = type; + g.setNode(v, attrs); + return v; +} + +/* + * Returns a new graph with only simple edges. Handles aggregation of data + * associated with multi-edges. + */ +function simplify(g) { + var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + simplified.setNode(v, g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; + var label = g.edge(e); + simplified.setEdge(e.v, e.w, { + weight: simpleLabel.weight + label.weight, + minlen: Math.max(simpleLabel.minlen, label.minlen), + }); + }); + return simplified; +} + +function asNonCompoundGraph(g) { + var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + if (!g.children(v).length) { + simplified.setNode(v, g.node(v)); + } + }); + forEach/* default */.A(g.edges(), function (e) { + simplified.setEdge(e, g.edge(e)); + }); + return simplified; +} + +function successorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var sucs = {}; + _.forEach(g.outEdges(v), function (e) { + sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; + }); + return sucs; + }); + return _.zipObject(g.nodes(), weightMap); +} + +function predecessorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var preds = {}; + _.forEach(g.inEdges(v), function (e) { + preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; + }); + return preds; + }); + return _.zipObject(g.nodes(), weightMap); +} + +/* + * Finds where a line starting at point ({x, y}) would intersect a rectangle + * ({x, y, width, height}) if it were pointing at the rectangle's center. + */ +function intersectRect(rect, point) { + var x = rect.x; + var y = rect.y; + + // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes + var dx = point.x - x; + var dy = point.y - y; + var w = rect.width / 2; + var h = rect.height / 2; + + if (!dx && !dy) { + throw new Error('Not possible to find intersection inside of the rectangle'); + } + + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } + sx = (h * dx) / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } + sx = w; + sy = (w * dy) / dx; + } + + return { x: x + sx, y: y + sy }; +} + +/* + * Given a DAG with each node assigned "rank" and "order" properties, this + * function will produce a matrix with the ids of each node. + */ +function buildLayerMatrix(g) { + var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { + return []; + }); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + var rank = node.rank; + if (!isUndefined/* default */.A(rank)) { + layering[rank][node.order] = v; + } + }); + return layering; +} + +/* + * Adjusts the ranks for all nodes in the graph such that all nodes v have + * rank(v) >= 0 and at least one node w has rank(w) = 0. + */ +function normalizeRanks(g) { + var min = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (has/* default */.A(node, 'rank')) { + node.rank -= min; + } + }); +} + +function removeEmptyRanks(g) { + // Ranks may not start at 0, so we need to offset them + var offset = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + + var layers = []; + forEach/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank - offset; + if (!layers[rank]) { + layers[rank] = []; + } + layers[rank].push(v); + }); + + var delta = 0; + var nodeRankFactor = g.graph().nodeRankFactor; + forEach/* default */.A(layers, function (vs, i) { + if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { + --delta; + } else if (delta) { + forEach/* default */.A(vs, function (v) { + g.node(v).rank += delta; + }); + } + }); +} + +function addBorderNode(g, prefix, rank, order) { + var node = { + width: 0, + height: 0, + }; + if (arguments.length >= 4) { + node.rank = rank; + node.order = order; + } + return addDummyNode(g, 'border', node, prefix); +} + +function util_maxRank(g) { + return lodash_es_max( + map/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank; + if (!isUndefined/* default */.A(rank)) { + return rank; + } + }) + ); +} + +/* + * Partition a collection into two groups: `lhs` and `rhs`. If the supplied + * function returns true for an entry it goes into `lhs`. Otherwise it goes + * into `rhs. + */ +function partition(collection, fn) { + var result = { lhs: [], rhs: [] }; + forEach/* default */.A(collection, function (value) { + if (fn(value)) { + result.lhs.push(value); + } else { + result.rhs.push(value); + } + }); + return result; +} + +/* + * Returns a new function that wraps `fn` with a timer. The wrapper logs the + * time it takes to execute the function. + */ +function util_time(name, fn) { + var start = lodash_es_now(); + try { + return fn(); + } finally { + console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); + } +} + +function notime(name, fn) { + return fn(); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js + + + + + +function addBorderSegments(g) { + function dfs(v) { + var children = g.children(v); + var node = g.node(v); + if (children.length) { + forEach/* default */.A(children, dfs); + } + + if (has/* default */.A(node, 'minRank')) { + node.borderLeft = []; + node.borderRight = []; + for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { + add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); + add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); + } + } + } + + forEach/* default */.A(g.children(), dfs); +} + +function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { + var label = { width: 0, height: 0, rank: rank, borderType: prop }; + var prev = sgNode[prop][rank - 1]; + var curr = addDummyNode(g, 'border', label, prefix); + sgNode[prop][rank] = curr; + g.setParent(curr, sg); + if (prev) { + g.setEdge(prev, curr, { weight: 1 }); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js + + + + +function adjust(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'lr' || rankDir === 'rl') { + swapWidthHeight(g); + } +} + +function coordinate_system_undo(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'bt' || rankDir === 'rl') { + reverseY(g); + } + + if (rankDir === 'lr' || rankDir === 'rl') { + swapXY(g); + swapWidthHeight(g); + } +} + +function swapWidthHeight(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapWidthHeightOne(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + swapWidthHeightOne(g.edge(e)); + }); +} + +function swapWidthHeightOne(attrs) { + var w = attrs.width; + attrs.width = attrs.height; + attrs.height = w; +} + +function reverseY(g) { + forEach/* default */.A(g.nodes(), function (v) { + reverseYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, reverseYOne); + if (has/* default */.A(edge, 'y')) { + reverseYOne(edge); + } + }); +} + +function reverseYOne(attrs) { + attrs.y = -attrs.y; +} + +function swapXY(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapXYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, swapXYOne); + if (has/* default */.A(edge, 'x')) { + swapXYOne(edge); + } + }); +} + +function swapXYOne(attrs) { + var x = attrs.x; + attrs.x = attrs.y; + attrs.y = x; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js + + + + + +/* + * Breaks any long edges in the graph into short segments that span 1 layer + * each. This operation is undoable with the denormalize function. + * + * Pre-conditions: + * + * 1. The input graph is a DAG. + * 2. Each node in the graph has a "rank" property. + * + * Post-condition: + * + * 1. All edges in the graph have a length of 1. + * 2. Dummy nodes are added where edges have been split into segments. + * 3. The graph is augmented with a "dummyChains" attribute which contains + * the first dummy in each chain of dummy nodes produced. + */ +function normalize_run(g) { + g.graph().dummyChains = []; + forEach/* default */.A(g.edges(), function (edge) { + normalizeEdge(g, edge); + }); +} + +function normalizeEdge(g, e) { + var v = e.v; + var vRank = g.node(v).rank; + var w = e.w; + var wRank = g.node(w).rank; + var name = e.name; + var edgeLabel = g.edge(e); + var labelRank = edgeLabel.labelRank; + + if (wRank === vRank + 1) return; + + g.removeEdge(e); + + var dummy, attrs, i; + for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { + edgeLabel.points = []; + attrs = { + width: 0, + height: 0, + edgeLabel: edgeLabel, + edgeObj: e, + rank: vRank, + }; + dummy = addDummyNode(g, 'edge', attrs, '_d'); + if (vRank === labelRank) { + attrs.width = edgeLabel.width; + attrs.height = edgeLabel.height; + // @ts-expect-error + attrs.dummy = 'edge-label'; + // @ts-expect-error + attrs.labelpos = edgeLabel.labelpos; + } + g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); + if (i === 0) { + g.graph().dummyChains.push(dummy); + } + v = dummy; + } + + g.setEdge(v, w, { weight: edgeLabel.weight }, name); +} + +function normalize_undo(g) { + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var origLabel = node.edgeLabel; + var w; + g.setEdge(node.edgeObj, origLabel); + while (node.dummy) { + w = g.successors(v)[0]; + g.removeNode(v); + origLabel.points.push({ x: node.x, y: node.y }); + if (node.dummy === 'edge-label') { + origLabel.x = node.x; + origLabel.y = node.y; + origLabel.width = node.width; + origLabel.height = node.height; + } + v = w; + node = g.node(v); + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js + + + + +/** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ +function minBy(array, iteratee) { + return (array && array.length) + ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_minBy = (minBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js + + + + +/* + * Initializes ranks for the input graph using the longest path algorithm. This + * algorithm scales well and is fast in practice, it yields rather poor + * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom + * ranks wide and leaving edges longer than necessary. However, due to its + * speed, this algorithm is good for getting an initial ranking that can be fed + * into other algorithms. + * + * This algorithm does not normalize layers because it will be used by other + * algorithms in most cases. If using this algorithm directly, be sure to + * run normalize at the end. + * + * Pre-conditions: + * + * 1. Input graph is a DAG. + * 2. Input graph node labels can be assigned properties. + * + * Post-conditions: + * + * 1. Each node will be assign an (unnormalized) "rank" property. + */ +function longestPath(g) { + var visited = {}; + + function dfs(v) { + var label = g.node(v); + if (has/* default */.A(visited, v)) { + return label.rank; + } + visited[v] = true; + + var rank = lodash_es_min( + map/* default */.A(g.outEdges(v), function (e) { + return dfs(e.w) - g.edge(e).minlen; + }) + ); + + if ( + rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + rank === undefined || // return value of _.map([]) for Lodash 4 + rank === null + ) { + // return value of _.map([null]) + rank = 0; + } + + return (label.rank = rank); + } + + forEach/* default */.A(g.sources(), dfs); +} + +/* + * Returns the amount of slack for the given edge. The slack is defined as the + * difference between the length of the edge and its minimum length. + */ +function slack(g, e) { + return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js + + + + + + +/* + * Constructs a spanning tree with tight edges and adjusted the input node's + * ranks to achieve this. A tight edge is one that is has a length that matches + * its "minlen" attribute. + * + * The basic structure for this function is derived from Gansner, et al., "A + * Technique for Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a DAG. + * 2. Graph must be connected. + * 3. Graph must have at least one node. + * 5. Graph nodes must have been previously assigned a "rank" property that + * respects the "minlen" property of incident edges. + * 6. Graph edges must have a "minlen" property. + * + * Post-conditions: + * + * - Graph nodes will have their rank adjusted to ensure that all edges are + * tight. + * + * Returns a tree (undirected graph) that is constructed using only "tight" + * edges. + */ +function feasibleTree(g) { + var t = new graphlib/* Graph */.T({ directed: false }); + + // Choose arbitrary node from which to start our tree + var start = g.nodes()[0]; + var size = g.nodeCount(); + t.setNode(start, {}); + + var edge, delta; + while (tightTree(t, g) < size) { + edge = findMinSlackEdge(t, g); + delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); + shiftRanks(t, g, delta); + } + + return t; +} + +/* + * Finds a maximal tree of tight edges and returns the number of nodes in the + * tree. + */ +function tightTree(t, g) { + function dfs(v) { + forEach/* default */.A(g.nodeEdges(v), function (e) { + var edgeV = e.v, + w = v === edgeV ? e.w : edgeV; + if (!t.hasNode(w) && !slack(g, e)) { + t.setNode(w, {}); + t.setEdge(v, w, {}); + dfs(w); + } + }); + } + + forEach/* default */.A(t.nodes(), dfs); + return t.nodeCount(); +} + +/* + * Finds the edge with the smallest slack that is incident on tree and returns + * it. + */ +function findMinSlackEdge(t, g) { + return lodash_es_minBy(g.edges(), function (e) { + if (t.hasNode(e.v) !== t.hasNode(e.w)) { + return slack(g, e); + } + }); +} + +function shiftRanks(t, g, delta) { + forEach/* default */.A(t.nodes(), function (v) { + g.node(v).rank += delta; + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js + + + + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!(0,isArrayLike/* default */.A)(collection)) { + var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); + collection = (0,keys/* default */.A)(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +/* harmony default export */ const _createFind = (createFind); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js + + +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = (0,toFinite/* default */.A)(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +/* harmony default export */ const lodash_es_toInteger = (toInteger); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); +} + +/* harmony default export */ const lodash_es_findIndex = (findIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js + + + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = _createFind(lodash_es_findIndex); + +/* harmony default export */ const lodash_es_find = (find); + +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js + + + + + +var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function dijkstra_dijkstra(g, source, weightFn, edgeFn) { + return runDijkstra( + g, + String(source), + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runDijkstra(g, source, weightFn, edgeFn) { + var results = {}; + var pq = new PriorityQueue(); + var v, vEntry; + + var updateNeighbors = function (edge) { + var w = edge.v !== v ? edge.v : edge.w; + var wEntry = results[w]; + var weight = weightFn(edge); + var distance = vEntry.distance + weight; + + if (weight < 0) { + throw new Error( + 'dijkstra does not allow negative edge weights. ' + + 'Bad edge: ' + + edge + + ' Weight: ' + + weight + ); + } + + if (distance < wEntry.distance) { + wEntry.distance = distance; + wEntry.predecessor = v; + pq.decrease(w, distance); + } + }; + + g.nodes().forEach(function (v) { + var distance = v === source ? 0 : Number.POSITIVE_INFINITY; + results[v] = { distance: distance }; + pq.add(v, distance); + }); + + while (pq.size() > 0) { + v = pq.removeMin(); + vEntry = results[v]; + if (vEntry.distance === Number.POSITIVE_INFINITY) { + break; + } + + edgeFn(v).forEach(updateNeighbors); + } + + return results; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js + + + + + +function dijkstraAll(g, weightFunc, edgeFunc) { + return _.transform( + g.nodes(), + function (acc, v) { + acc[v] = dijkstra(g, v, weightFunc, edgeFunc); + }, + {} + ); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js + + + + +var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function floydWarshall(g, weightFn, edgeFn) { + return runFloydWarshall( + g, + weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runFloydWarshall(g, weightFn, edgeFn) { + var results = {}; + var nodes = g.nodes(); + + nodes.forEach(function (v) { + results[v] = {}; + results[v][v] = { distance: 0 }; + nodes.forEach(function (w) { + if (v !== w) { + results[v][w] = { distance: Number.POSITIVE_INFINITY }; + } + }); + edgeFn(v).forEach(function (edge) { + var w = edge.v === v ? edge.w : edge.v; + var d = weightFn(edge); + results[v][w] = { distance: d, predecessor: v }; + }); + }); + + nodes.forEach(function (k) { + var rowK = results[k]; + nodes.forEach(function (i) { + var rowI = results[i]; + nodes.forEach(function (j) { + var ik = rowI[k]; + var kj = rowK[j]; + var ij = rowI[j]; + var altDistance = ik.distance + kj.distance; + if (altDistance < ij.distance) { + ij.distance = altDistance; + ij.predecessor = kj.predecessor; + } + }); + }); + }); + + return results; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules +var _baseKeys = __webpack_require__(1852); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules +var _baseGetTag = __webpack_require__(8496); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js + + + + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); +} + +/* harmony default export */ const lodash_es_isString = (isString); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js + + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = (0,_baseProperty/* default */.A)('length'); + +/* harmony default export */ const _asciiSize = (asciiSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/* harmony default export */ const _hasUnicode = (hasUnicode); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js +/** Used to compose unicode character classes. */ +var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', + _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', + _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', + _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', + _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, + _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', + rsCombo = '[' + _unicodeSize_rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + _unicodeSize_rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', + rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +/* harmony default export */ const _unicodeSize = (unicodeSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js + + + + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return _hasUnicode(string) + ? _unicodeSize(string) + : _asciiSize(string); +} + +/* harmony default export */ const _stringSize = (stringSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + if (collection == null) { + return 0; + } + if ((0,isArrayLike/* default */.A)(collection)) { + return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; + } + var tag = (0,_getTag/* default */.A)(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return (0,_baseKeys/* default */.A)(collection).length; +} + +/* harmony default export */ const lodash_es_size = (size); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js + + + + +topsort_topsort.CycleException = topsort_CycleException; + +function topsort_topsort(g) { + var visited = {}; + var stack = {}; + var results = []; + + function visit(node) { + if (has/* default */.A(stack, node)) { + throw new topsort_CycleException(); + } + + if (!has/* default */.A(visited, node)) { + stack[node] = true; + visited[node] = true; + forEach/* default */.A(g.predecessors(node), visit); + delete stack[node]; + results.push(node); + } + } + + forEach/* default */.A(g.sinks(), visit); + + if (lodash_es_size(visited) !== g.nodeCount()) { + throw new topsort_CycleException(); + } + + return results; +} + +function topsort_CycleException() {} +topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js + + + + +function isAcyclic(g) { + try { + topsort(g); + } catch (e) { + if (e instanceof CycleException) { + return false; + } + throw e; + } + return true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js + + + + +/* + * A helper that preforms a pre- or post-order traversal on the input graph + * and returns the nodes in the order they were visited. If the graph is + * undirected then this algorithm will navigate using neighbors. If the graph + * is directed then this algorithm will navigate using successors. + * + * Order must be one of "pre" or "post". + */ +function dfs(g, vs, order) { + if (!isArray/* default */.A(vs)) { + vs = [vs]; + } + + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); + + var acc = []; + var visited = {}; + forEach/* default */.A(vs, function (v) { + if (!g.hasNode(v)) { + throw new Error('Graph does not have node: ' + v); + } + + doDfs(g, v, order === 'post', visited, navigation, acc); + }); + return acc; +} + +function doDfs(g, v, postorder, visited, navigation, acc) { + if (!has/* default */.A(visited, v)) { + visited[v] = true; + + if (!postorder) { + acc.push(v); + } + forEach/* default */.A(navigation(v), function (w) { + doDfs(g, w, postorder, visited, navigation, acc); + }); + if (postorder) { + acc.push(v); + } + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js + + + + +function postorder(g, vs) { + return dfs(g, vs, 'post'); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js + + + + +function preorder(g, vs) { + return dfs(g, vs, 'pre'); +} + +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules +var graph = __webpack_require__(3046); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js + + + + + + +function prim(g, weightFunc) { + var result = new Graph(); + var parents = {}; + var pq = new PriorityQueue(); + var v; + + function updateNeighbors(edge) { + var w = edge.v === v ? edge.w : edge.v; + var pri = pq.priority(w); + if (pri !== undefined) { + var edgeWeight = weightFunc(edge); + if (edgeWeight < pri) { + parents[w] = v; + pq.decrease(w, edgeWeight); + } + } + } + + if (g.nodeCount() === 0) { + return result; + } + + _.each(g.nodes(), function (v) { + pq.add(v, Number.POSITIVE_INFINITY); + result.setNode(v); + }); + + // Start from an arbitrary node + pq.decrease(g.nodes()[0], 0); + + var init = false; + while (pq.size() > 0) { + v = pq.removeMin(); + if (_.has(parents, v)) { + result.setEdge(v, parents[v]); + } else if (init) { + throw new Error('Input graph is not connected: ' + g); + } else { + init = true; + } + + g.nodeEdges(v).forEach(updateNeighbors); + } + + return result; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js + + + + + + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js + + + + + + + + +// Expose some internals for testing purposes +networkSimplex.initLowLimValues = initLowLimValues; +networkSimplex.initCutValues = initCutValues; +networkSimplex.calcCutValue = calcCutValue; +networkSimplex.leaveEdge = leaveEdge; +networkSimplex.enterEdge = enterEdge; +networkSimplex.exchangeEdges = exchangeEdges; + +/* + * The network simplex algorithm assigns ranks to each node in the input graph + * and iteratively improves the ranking to reduce the length of edges. + * + * Preconditions: + * + * 1. The input graph must be a DAG. + * 2. All nodes in the graph must have an object value. + * 3. All edges in the graph must have "minlen" and "weight" attributes. + * + * Postconditions: + * + * 1. All nodes in the graph will have an assigned "rank" attribute that has + * been optimized by the network simplex algorithm. Ranks start at 0. + * + * + * A rough sketch of the algorithm is as follows: + * + * 1. Assign initial ranks to each node. We use the longest path algorithm, + * which assigns ranks to the lowest position possible. In general this + * leads to very wide bottom ranks and unnecessarily long edges. + * 2. Construct a feasible tight tree. A tight tree is one such that all + * edges in the tree have no slack (difference between length of edge + * and minlen for the edge). This by itself greatly improves the assigned + * rankings by shorting edges. + * 3. Iteratively find edges that have negative cut values. Generally a + * negative cut value indicates that the edge could be removed and a new + * tree edge could be added to produce a more compact graph. + * + * Much of the algorithms here are derived from Gansner, et al., "A Technique + * for Drawing Directed Graphs." The structure of the file roughly follows the + * structure of the overall algorithm. + */ +function networkSimplex(g) { + g = simplify(g); + longestPath(g); + var t = feasibleTree(g); + initLowLimValues(t); + initCutValues(t, g); + + var e, f; + while ((e = leaveEdge(t))) { + f = enterEdge(t, g, e); + exchangeEdges(t, g, e, f); + } +} + +/* + * Initializes cut values for all edges in the tree. + */ +function initCutValues(t, g) { + var vs = postorder(t, t.nodes()); + vs = vs.slice(0, vs.length - 1); + forEach/* default */.A(vs, function (v) { + assignCutValue(t, g, v); + }); +} + +function assignCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + t.edge(child, parent).cutvalue = calcCutValue(t, g, child); +} + +/* + * Given the tight tree, its graph, and a child in the graph calculate and + * return the cut value for the edge between the child and its parent. + */ +function calcCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + // True if the child is on the tail end of the edge in the directed graph + var childIsTail = true; + // The graph's view of the tree edge we're inspecting + var graphEdge = g.edge(child, parent); + // The accumulated cut value for the edge between this node and its parent + var cutValue = 0; + + if (!graphEdge) { + childIsTail = false; + graphEdge = g.edge(parent, child); + } + + cutValue = graphEdge.weight; + + forEach/* default */.A(g.nodeEdges(child), function (e) { + var isOutEdge = e.v === child, + other = isOutEdge ? e.w : e.v; + + if (other !== parent) { + var pointsToHead = isOutEdge === childIsTail, + otherWeight = g.edge(e).weight; + + cutValue += pointsToHead ? otherWeight : -otherWeight; + if (isTreeEdge(t, child, other)) { + var otherCutValue = t.edge(child, other).cutvalue; + cutValue += pointsToHead ? -otherCutValue : otherCutValue; + } + } + }); + + return cutValue; +} + +function initLowLimValues(tree, root) { + if (arguments.length < 2) { + root = tree.nodes()[0]; + } + dfsAssignLowLim(tree, {}, 1, root); +} + +function dfsAssignLowLim(tree, visited, nextLim, v, parent) { + var low = nextLim; + var label = tree.node(v); + + visited[v] = true; + forEach/* default */.A(tree.neighbors(v), function (w) { + if (!has/* default */.A(visited, w)) { + nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); + } + }); + + label.low = low; + label.lim = nextLim++; + if (parent) { + label.parent = parent; + } else { + // TODO should be able to remove this when we incrementally update low lim + delete label.parent; + } + + return nextLim; +} + +function leaveEdge(tree) { + return lodash_es_find(tree.edges(), function (e) { + return tree.edge(e).cutvalue < 0; + }); +} + +function enterEdge(t, g, edge) { + var v = edge.v; + var w = edge.w; + + // For the rest of this function we assume that v is the tail and w is the + // head, so if we don't have this edge in the graph we should flip it to + // match the correct orientation. + if (!g.hasEdge(v, w)) { + v = edge.w; + w = edge.v; + } + + var vLabel = t.node(v); + var wLabel = t.node(w); + var tailLabel = vLabel; + var flip = false; + + // If the root is in the tail of the edge then we need to flip the logic that + // checks for the head and tail nodes in the candidates function below. + if (vLabel.lim > wLabel.lim) { + tailLabel = wLabel; + flip = true; + } + + var candidates = filter/* default */.A(g.edges(), function (edge) { + return ( + flip === isDescendant(t, t.node(edge.v), tailLabel) && + flip !== isDescendant(t, t.node(edge.w), tailLabel) + ); + }); + + return lodash_es_minBy(candidates, function (edge) { + return slack(g, edge); + }); +} + +function exchangeEdges(t, g, e, f) { + var v = e.v; + var w = e.w; + t.removeEdge(v, w); + t.setEdge(f.v, f.w, {}); + initLowLimValues(t); + initCutValues(t, g); + updateRanks(t, g); +} + +function updateRanks(t, g) { + var root = lodash_es_find(t.nodes(), function (v) { + return !g.node(v).parent; + }); + var vs = preorder(t, root); + vs = vs.slice(1); + forEach/* default */.A(vs, function (v) { + var parent = t.node(v).parent, + edge = g.edge(v, parent), + flipped = false; + + if (!edge) { + edge = g.edge(parent, v); + flipped = true; + } + + g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); + }); +} + +/* + * Returns true if the edge is in the tree. + */ +function isTreeEdge(tree, u, v) { + return tree.hasEdge(u, v); +} + +/* + * Returns true if the specified node is descendant of the root node per the + * assigned low and lim attributes in the tree. + */ +function isDescendant(tree, vLabel, rootLabel) { + return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js + + + + + + +/* + * Assigns a rank to each node in the input graph that respects the "minlen" + * constraint specified on edges between nodes. + * + * This basic structure is derived from Gansner, et al., "A Technique for + * Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a connected DAG + * 2. Graph nodes must be objects + * 3. Graph edges must have "weight" and "minlen" attributes + * + * Post-conditions: + * + * 1. Graph nodes will have a "rank" attribute based on the results of the + * algorithm. Ranks can start at any index (including negative), we'll + * fix them up later. + */ +function rank(g) { + switch (g.graph().ranker) { + case 'network-simplex': + networkSimplexRanker(g); + break; + case 'tight-tree': + tightTreeRanker(g); + break; + case 'longest-path': + longestPathRanker(g); + break; + default: + networkSimplexRanker(g); + } +} + +// A fast and simple ranker, but results are far from optimal. +var longestPathRanker = longestPath; + +function tightTreeRanker(g) { + longestPath(g); + feasibleTree(g); +} + +function networkSimplexRanker(g) { + networkSimplex(g); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js + + + + + +/* + * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, + * adds appropriate edges to ensure that all cluster nodes are placed between + * these boundries, and ensures that the graph is connected. + * + * In addition we ensure, through the use of the minlen property, that nodes + * and subgraph border nodes to not end up on the same rank. + * + * Preconditions: + * + * 1. Input graph is a DAG + * 2. Nodes in the input graph has a minlen attribute + * + * Postconditions: + * + * 1. Input graph is connected. + * 2. Dummy nodes are added for the tops and bottoms of subgraphs. + * 3. The minlen attribute for nodes is adjusted to ensure nodes do not + * get placed on the same rank as subgraph border nodes. + * + * The nesting graph idea comes from Sander, "Layout of Compound Directed + * Graphs." + */ +function nesting_graph_run(g) { + var root = addDummyNode(g, 'root', {}, '_root'); + var depths = treeDepths(g); + var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array + var nodeSep = 2 * height + 1; + + g.graph().nestingRoot = root; + + // Multiply minlen by nodeSep to align nodes on non-border ranks. + forEach/* default */.A(g.edges(), function (e) { + g.edge(e).minlen *= nodeSep; + }); + + // Calculate a weight that is sufficient to keep subgraphs vertically compact + var weight = sumWeights(g) + 1; + + // Create border nodes and link them up + forEach/* default */.A(g.children(), function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + }); + + // Save the multiplier for node layers for later removal of empty border + // layers. + g.graph().nodeRankFactor = nodeSep; +} + +function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { + var children = g.children(v); + if (!children.length) { + if (v !== root) { + g.setEdge(root, v, { weight: 0, minlen: nodeSep }); + } + return; + } + + var top = addBorderNode(g, '_bt'); + var bottom = addBorderNode(g, '_bb'); + var label = g.node(v); + + g.setParent(top, v); + label.borderTop = top; + g.setParent(bottom, v); + label.borderBottom = bottom; + + forEach/* default */.A(children, function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + + var childNode = g.node(child); + var childTop = childNode.borderTop ? childNode.borderTop : child; + var childBottom = childNode.borderBottom ? childNode.borderBottom : child; + var thisWeight = childNode.borderTop ? weight : 2 * weight; + var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; + + g.setEdge(top, childTop, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + + g.setEdge(childBottom, bottom, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + }); + + if (!g.parent(v)) { + g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); + } +} + +function treeDepths(g) { + var depths = {}; + function dfs(v, depth) { + var children = g.children(v); + if (children && children.length) { + forEach/* default */.A(children, function (child) { + dfs(child, depth + 1); + }); + } + depths[v] = depth; + } + forEach/* default */.A(g.children(), function (v) { + dfs(v, 1); + }); + return depths; +} + +function sumWeights(g) { + return reduce/* default */.A( + g.edges(), + function (acc, e) { + return acc + g.edge(e).weight; + }, + 0 + ); +} + +function cleanup(g) { + var graphLabel = g.graph(); + g.removeNode(graphLabel.nestingRoot); + delete graphLabel.nestingRoot; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.nestingEdge) { + g.removeEdge(e); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules +var _baseClone = __webpack_require__(1641); +;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js + + + + +function addSubgraphConstraints(g, cg, vs) { + var prev = {}, + rootPrev; + + forEach/* default */.A(vs, function (v) { + var child = g.parent(v), + parent, + prevChild; + while (child) { + parent = g.parent(child); + if (parent) { + prevChild = prev[parent]; + prev[parent] = child; + } else { + prevChild = rootPrev; + rootPrev = child; + } + if (prevChild && prevChild !== child) { + cg.setEdge(prevChild, child); + return; + } + child = parent; + } + }); + + /* + function dfs(v) { + var children = v ? g.children(v) : g.children(); + if (children.length) { + var min = Number.POSITIVE_INFINITY, + subgraphs = []; + _.each(children, function(child) { + var childMin = dfs(child); + if (g.children(child).length) { + subgraphs.push({ v: child, order: childMin }); + } + min = Math.min(min, childMin); + }); + _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { + cg.setEdge(prev.v, curr.v); + return curr; + }); + return min; + } + return g.node(v).order; + } + dfs(undefined); + */ +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js + + + + + +/* + * Constructs a graph that can be used to sort a layer of nodes. The graph will + * contain all base and subgraph nodes from the request layer in their original + * hierarchy and any edges that are incident on these nodes and are of the type + * requested by the "relationship" parameter. + * + * Nodes from the requested rank that do not have parents are assigned a root + * node in the output graph, which is set in the root graph attribute. This + * makes it easy to walk the hierarchy of movable nodes during ordering. + * + * Pre-conditions: + * + * 1. Input graph is a DAG + * 2. Base nodes in the input graph have a rank attribute + * 3. Subgraph nodes in the input graph has minRank and maxRank attributes + * 4. Edges have an assigned weight + * + * Post-conditions: + * + * 1. Output graph has all nodes in the movable rank with preserved + * hierarchy. + * 2. Root nodes in the movable layer are made children of the node + * indicated by the root attribute of the graph. + * 3. Non-movable nodes incident on movable nodes, selected by the + * relationship parameter, are included in the graph (without hierarchy). + * 4. Edges incident on movable nodes, selected by the relationship + * parameter, are added to the output graph. + * 5. The weights for copied edges are aggregated as need, since the output + * graph is not a multi-graph. + */ +function buildLayerGraph(g, rank, relationship) { + var root = createRootNode(g), + result = new graphlib/* Graph */.T({ compound: true }) + .setGraph({ root: root }) + .setDefaultNodeLabel(function (v) { + return g.node(v); + }); + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v), + parent = g.parent(v); + + if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { + result.setNode(v); + result.setParent(v, parent || root); + + // This assumes we have only short edges! + forEach/* default */.A(g[relationship](v), function (e) { + var u = e.v === v ? e.w : e.v, + edge = result.edge(u, v), + weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; + result.setEdge(u, v, { weight: g.edge(e).weight + weight }); + }); + + if (has/* default */.A(node, 'minRank')) { + result.setNode(v, { + borderLeft: node.borderLeft[rank], + borderRight: node.borderRight[rank], + }); + } + } + }); + + return result; +} + +function createRootNode(g) { + var v; + while (g.hasNode((v = uniqueId/* default */.A('_root')))); + return v; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +/* harmony default export */ const _baseZipObject = (baseZipObject); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js + + + +/** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ +function zipObject(props, values) { + return _baseZipObject(props || [], values || [], _assignValue/* default */.A); +} + +/* harmony default export */ const lodash_es_zipObject = (zipObject); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js +var _baseMap = __webpack_require__(2568); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +/* harmony default export */ const _baseSortBy = (baseSortBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js + + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = (0,isSymbol/* default */.A)(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = (0,isSymbol/* default */.A)(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +/* harmony default export */ const _compareAscending = (compareAscending); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js + + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = _compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +/* harmony default export */ const _compareMultiple = (compareMultiple); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js + + + + + + + + + + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + if ((0,isArray/* default */.A)(iteratee)) { + return function(value) { + return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity/* default */.A]; + } + + var index = -1; + iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); + + var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { + var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return _baseSortBy(result, function(object, other) { + return _compareMultiple(object, other, orders); + }); +} + +/* harmony default export */ const _baseOrderBy = (baseOrderBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js + + + + + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ +var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); +}); + +/* harmony default export */ const lodash_es_sortBy = (sortBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js + + + + +/* + * A function that takes a layering (an array of layers, each with an array of + * ordererd nodes) and a graph and returns a weighted crossing count. + * + * Pre-conditions: + * + * 1. Input graph must be simple (not a multigraph), directed, and include + * only simple edges. + * 2. Edges in the input graph must have assigned weights. + * + * Post-conditions: + * + * 1. The graph and layering matrix are left unchanged. + * + * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." + */ +function crossCount(g, layering) { + var cc = 0; + for (var i = 1; i < layering.length; ++i) { + cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); + } + return cc; +} + +function twoLayerCrossCount(g, northLayer, southLayer) { + // Sort all of the edges between the north and south layers by their position + // in the north layer and then the south. Map these edges to the position of + // their head in the south layer. + var southPos = lodash_es_zipObject( + southLayer, + map/* default */.A(southLayer, function (v, i) { + return i; + }) + ); + var southEntries = flatten/* default */.A( + map/* default */.A(northLayer, function (v) { + return lodash_es_sortBy( + map/* default */.A(g.outEdges(v), function (e) { + return { pos: southPos[e.w], weight: g.edge(e).weight }; + }), + 'pos' + ); + }) + ); + + // Build the accumulator tree + var firstIndex = 1; + while (firstIndex < southLayer.length) firstIndex <<= 1; + var treeSize = 2 * firstIndex - 1; + firstIndex -= 1; + var tree = map/* default */.A(new Array(treeSize), function () { + return 0; + }); + + // Calculate the weighted crossings + var cc = 0; + forEach/* default */.A( + // @ts-expect-error + southEntries.forEach(function (entry) { + var index = entry.pos + firstIndex; + tree[index] += entry.weight; + var weightSum = 0; + // @ts-expect-error + while (index > 0) { + // @ts-expect-error + if (index % 2) { + weightSum += tree[index + 1]; + } + // @ts-expect-error + index = (index - 1) >> 1; + tree[index] += entry.weight; + } + cc += entry.weight * weightSum; + }) + ); + + return cc; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js + + + + +/* + * Assigns an initial order value for each node by performing a DFS search + * starting from nodes in the first rank. Nodes are assigned an order in their + * rank as they are first visited. + * + * This approach comes from Gansner, et al., "A Technique for Drawing Directed + * Graphs." + * + * Returns a layering matrix with an array per layer and each layer sorted by + * the order of its nodes. + */ +function initOrder(g) { + var visited = {}; + var simpleNodes = filter/* default */.A(g.nodes(), function (v) { + return !g.children(v).length; + }); + var maxRank = lodash_es_max( + map/* default */.A(simpleNodes, function (v) { + return g.node(v).rank; + }) + ); + var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { + return []; + }); + + function dfs(v) { + if (has/* default */.A(visited, v)) return; + visited[v] = true; + var node = g.node(v); + layers[node.rank].push(v); + forEach/* default */.A(g.successors(v), dfs); + } + + var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { + return g.node(v).rank; + }); + forEach/* default */.A(orderedVs, dfs); + + return layers; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js + + + + +function barycenter(g, movable) { + return map/* default */.A(movable, function (v) { + var inV = g.inEdges(v); + if (!inV.length) { + return { v: v }; + } else { + var result = reduce/* default */.A( + inV, + function (acc, e) { + var edge = g.edge(e), + nodeU = g.node(e.v); + return { + sum: acc.sum + edge.weight * nodeU.order, + weight: acc.weight + edge.weight, + }; + }, + { sum: 0, weight: 0 } + ); + + return { + v: v, + barycenter: result.sum / result.weight, + weight: result.weight, + }; + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js + + + + +/* + * Given a list of entries of the form {v, barycenter, weight} and a + * constraint graph this function will resolve any conflicts between the + * constraint graph and the barycenters for the entries. If the barycenters for + * an entry would violate a constraint in the constraint graph then we coalesce + * the nodes in the conflict into a new node that respects the contraint and + * aggregates barycenter and weight information. + * + * This implementation is based on the description in Forster, "A Fast and + * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it + * differs in some specific details. + * + * Pre-conditions: + * + * 1. Each entry has the form {v, barycenter, weight}, or if the node has + * no barycenter, then {v}. + * + * Returns: + * + * A new list of entries of the form {vs, i, barycenter, weight}. The list + * `vs` may either be a singleton or it may be an aggregation of nodes + * ordered such that they do not violate constraints from the constraint + * graph. The property `i` is the lowest original index of any of the + * elements in `vs`. + */ +function resolveConflicts(entries, cg) { + var mappedEntries = {}; + forEach/* default */.A(entries, function (entry, i) { + var tmp = (mappedEntries[entry.v] = { + indegree: 0, + in: [], + out: [], + vs: [entry.v], + i: i, + }); + if (!isUndefined/* default */.A(entry.barycenter)) { + // @ts-expect-error + tmp.barycenter = entry.barycenter; + // @ts-expect-error + tmp.weight = entry.weight; + } + }); + + forEach/* default */.A(cg.edges(), function (e) { + var entryV = mappedEntries[e.v]; + var entryW = mappedEntries[e.w]; + if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { + entryW.indegree++; + entryV.out.push(mappedEntries[e.w]); + } + }); + + var sourceSet = filter/* default */.A(mappedEntries, function (entry) { + // @ts-expect-error + return !entry.indegree; + }); + + return doResolveConflicts(sourceSet); +} + +function doResolveConflicts(sourceSet) { + var entries = []; + + function handleIn(vEntry) { + return function (uEntry) { + if (uEntry.merged) { + return; + } + if ( + isUndefined/* default */.A(uEntry.barycenter) || + isUndefined/* default */.A(vEntry.barycenter) || + uEntry.barycenter >= vEntry.barycenter + ) { + mergeEntries(vEntry, uEntry); + } + }; + } + + function handleOut(vEntry) { + return function (wEntry) { + wEntry['in'].push(vEntry); + if (--wEntry.indegree === 0) { + sourceSet.push(wEntry); + } + }; + } + + while (sourceSet.length) { + var entry = sourceSet.pop(); + entries.push(entry); + forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); + forEach/* default */.A(entry.out, handleOut(entry)); + } + + return map/* default */.A( + filter/* default */.A(entries, function (entry) { + return !entry.merged; + }), + function (entry) { + return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); + } + ); +} + +function mergeEntries(target, source) { + var sum = 0; + var weight = 0; + + if (target.weight) { + sum += target.barycenter * target.weight; + weight += target.weight; + } + + if (source.weight) { + sum += source.barycenter * source.weight; + weight += source.weight; + } + + target.vs = source.vs.concat(target.vs); + target.barycenter = sum / weight; + target.weight = weight; + target.i = Math.min(source.i, target.i); + source.merged = true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js + + + + + +function sort(entries, biasRight) { + var parts = partition(entries, function (entry) { + return has/* default */.A(entry, 'barycenter'); + }); + var sortable = parts.lhs, + unsortable = lodash_es_sortBy(parts.rhs, function (entry) { + return -entry.i; + }), + vs = [], + sum = 0, + weight = 0, + vsIndex = 0; + + sortable.sort(compareWithBias(!!biasRight)); + + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + + forEach/* default */.A(sortable, function (entry) { + vsIndex += entry.vs.length; + vs.push(entry.vs); + sum += entry.barycenter * entry.weight; + weight += entry.weight; + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + }); + + var result = { vs: flatten/* default */.A(vs) }; + if (weight) { + result.barycenter = sum / weight; + result.weight = weight; + } + return result; +} + +function consumeUnsortable(vs, unsortable, index) { + var last; + while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { + unsortable.pop(); + vs.push(last.vs); + index++; + } + return index; +} + +function compareWithBias(bias) { + return function (entryV, entryW) { + if (entryV.barycenter < entryW.barycenter) { + return -1; + } else if (entryV.barycenter > entryW.barycenter) { + return 1; + } + + return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; + }; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js + + + + + + + +function sortSubgraph(g, v, cg, biasRight) { + var movable = g.children(v); + var node = g.node(v); + var bl = node ? node.borderLeft : undefined; + var br = node ? node.borderRight : undefined; + var subgraphs = {}; + + if (bl) { + movable = filter/* default */.A(movable, function (w) { + return w !== bl && w !== br; + }); + } + + var barycenters = barycenter(g, movable); + forEach/* default */.A(barycenters, function (entry) { + if (g.children(entry.v).length) { + var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); + subgraphs[entry.v] = subgraphResult; + if (has/* default */.A(subgraphResult, 'barycenter')) { + mergeBarycenters(entry, subgraphResult); + } + } + }); + + var entries = resolveConflicts(barycenters, cg); + expandSubgraphs(entries, subgraphs); + + var result = sort(entries, biasRight); + + if (bl) { + result.vs = flatten/* default */.A([bl, result.vs, br]); + if (g.predecessors(bl).length) { + var blPred = g.node(g.predecessors(bl)[0]), + brPred = g.node(g.predecessors(br)[0]); + if (!has/* default */.A(result, 'barycenter')) { + result.barycenter = 0; + result.weight = 0; + } + result.barycenter = + (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); + result.weight += 2; + } + } + + return result; +} + +function expandSubgraphs(entries, subgraphs) { + forEach/* default */.A(entries, function (entry) { + entry.vs = flatten/* default */.A( + entry.vs.map(function (v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }) + ); + }); +} + +function mergeBarycenters(target, other) { + if (!isUndefined/* default */.A(target.barycenter)) { + target.barycenter = + (target.barycenter * target.weight + other.barycenter * other.weight) / + (target.weight + other.weight); + target.weight += other.weight; + } else { + target.barycenter = other.barycenter; + target.weight = other.weight; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js + + + + + + + + + + + +/* + * Applies heuristics to minimize edge crossings in the graph and sets the best + * order solution as an order attribute on each node. + * + * Pre-conditions: + * + * 1. Graph must be DAG + * 2. Graph nodes must be objects with a "rank" attribute + * 3. Graph edges must have the "weight" attribute + * + * Post-conditions: + * + * 1. Graph nodes will have an "order" attribute based on the results of the + * algorithm. + */ +function order(g) { + var maxRank = util_maxRank(g), + downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), + upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); + + var layering = initOrder(g); + assignOrder(g, layering); + + var bestCC = Number.POSITIVE_INFINITY, + best; + + for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { + sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); + + layering = buildLayerMatrix(g); + var cc = crossCount(g, layering); + if (cc < bestCC) { + lastBest = 0; + best = lodash_es_cloneDeep(layering); + bestCC = cc; + } + } + + assignOrder(g, best); +} + +function buildLayerGraphs(g, ranks, relationship) { + return map/* default */.A(ranks, function (rank) { + return buildLayerGraph(g, rank, relationship); + }); +} + +function sweepLayerGraphs(layerGraphs, biasRight) { + var cg = new graphlib/* Graph */.T(); + forEach/* default */.A(layerGraphs, function (lg) { + var root = lg.graph().root; + var sorted = sortSubgraph(lg, root, cg, biasRight); + forEach/* default */.A(sorted.vs, function (v, i) { + lg.node(v).order = i; + }); + addSubgraphConstraints(lg, cg, sorted.vs); + }); +} + +function assignOrder(g, layering) { + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, i) { + g.node(v).order = i; + }); + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js + + + + +function parentDummyChains(g) { + var postorderNums = parent_dummy_chains_postorder(g); + + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var edgeObj = node.edgeObj; + var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); + var path = pathData.path; + var lca = pathData.lca; + var pathIdx = 0; + var pathV = path[pathIdx]; + var ascending = true; + + while (v !== edgeObj.w) { + node = g.node(v); + + if (ascending) { + while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { + pathIdx++; + } + + if (pathV === lca) { + ascending = false; + } + } + + if (!ascending) { + while ( + pathIdx < path.length - 1 && + g.node((pathV = path[pathIdx + 1])).minRank <= node.rank + ) { + pathIdx++; + } + pathV = path[pathIdx]; + } + + g.setParent(v, pathV); + v = g.successors(v)[0]; + } + }); +} + +// Find a path from v to w through the lowest common ancestor (LCA). Return the +// full path and the LCA. +function findPath(g, postorderNums, v, w) { + var vPath = []; + var wPath = []; + var low = Math.min(postorderNums[v].low, postorderNums[w].low); + var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); + var parent; + var lca; + + // Traverse up from v to find the LCA + parent = v; + do { + parent = g.parent(parent); + vPath.push(parent); + } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); + lca = parent; + + // Traverse from w to LCA + parent = w; + while ((parent = g.parent(parent)) !== lca) { + wPath.push(parent); + } + + return { path: vPath.concat(wPath.reverse()), lca: lca }; +} + +function parent_dummy_chains_postorder(g) { + var result = {}; + var lim = 0; + + function dfs(v) { + var low = lim; + forEach/* default */.A(g.children(v), dfs); + result[v] = { low: low, lim: lim++ }; + } + forEach/* default */.A(g.children(), dfs); + + return result; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js +var _castFunction = __webpack_require__(9922); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js + + + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); +} + +/* harmony default export */ const lodash_es_forOwn = (forOwn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules +var _baseFor = __webpack_require__(4574); +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js + + + + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); +} + +/* harmony default export */ const lodash_es_forIn = (forIn); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js + + + + +/* + * This module provides coordinate assignment based on Brandes and Köpf, "Fast + * and Simple Horizontal Coordinate Assignment." + */ + + + +/* + * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" + * property. A type-1 conflict is one where a non-inner segment crosses an + * inner segment. An inner segment is an edge with both incident nodes marked + * with the "dummy" property. + * + * This algorithm scans layer by layer, starting with the second, for type-1 + * conflicts between the current layer and the previous layer. For each layer + * it scans the nodes from left to right until it reaches one that is incident + * on an inner segment. It then scans predecessors to determine if they have + * edges that cross that inner segment. At the end a final scan is done for all + * nodes on the current rank to see if they cross the last visited inner + * segment. + * + * This algorithm (safely) assumes that a dummy node will only be incident on a + * single node in the layers being scanned. + */ +function findType1Conflicts(g, layering) { + var conflicts = {}; + + function visitLayer(prevLayer, layer) { + var // last visited node in the previous layer that is incident on an inner + // segment. + k0 = 0, + // Tracks the last node in this layer scanned for crossings with a type-1 + // segment. + scanPos = 0, + prevLayerLength = prevLayer.length, + lastNode = lodash_es_last(layer); + + forEach/* default */.A(layer, function (v, i) { + var w = findOtherInnerSegmentNode(g, v), + k1 = w ? g.node(w).order : prevLayerLength; + + if (w || v === lastNode) { + forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { + forEach/* default */.A(g.predecessors(scanNode), function (u) { + var uLabel = g.node(u), + uPos = uLabel.order; + if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { + addConflict(conflicts, u, scanNode); + } + }); + }); + // @ts-expect-error + scanPos = i + 1; + k0 = k1; + } + }); + + return layer; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findType2Conflicts(g, layering) { + var conflicts = {}; + + function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { + var v; + forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { + v = south[i]; + if (g.node(v).dummy) { + forEach/* default */.A(g.predecessors(v), function (u) { + var uNode = g.node(u); + if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { + addConflict(conflicts, u, v); + } + }); + } + }); + } + + function visitLayer(north, south) { + var prevNorthPos = -1, + nextNorthPos, + southPos = 0; + + forEach/* default */.A(south, function (v, southLookahead) { + if (g.node(v).dummy === 'border') { + var predecessors = g.predecessors(v); + if (predecessors.length) { + nextNorthPos = g.node(predecessors[0]).order; + scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); + // @ts-expect-error + southPos = southLookahead; + prevNorthPos = nextNorthPos; + } + } + scan(south, southPos, south.length, nextNorthPos, north.length); + }); + + return south; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findOtherInnerSegmentNode(g, v) { + if (g.node(v).dummy) { + return lodash_es_find(g.predecessors(v), function (u) { + return g.node(u).dummy; + }); + } +} + +function addConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + + var conflictsV = conflicts[v]; + if (!conflictsV) { + conflicts[v] = conflictsV = {}; + } + conflictsV[w] = true; +} + +function hasConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + return has/* default */.A(conflicts[v], w); +} + +/* + * Try to align nodes into vertical "blocks" where possible. This algorithm + * attempts to align a node with one of its median neighbors. If the edge + * connecting a neighbor is a type-1 conflict then we ignore that possibility. + * If a previous node has already formed a block with a node after the node + * we're trying to form a block with, we also ignore that possibility - our + * blocks would be split in that scenario. + */ +function verticalAlignment(g, layering, conflicts, neighborFn) { + var root = {}, + align = {}, + pos = {}; + + // We cache the position here based on the layering because the graph and + // layering may be out of sync. The layering matrix is manipulated to + // generate different extreme alignments. + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, order) { + root[v] = v; + align[v] = v; + pos[v] = order; + }); + }); + + forEach/* default */.A(layering, function (layer) { + var prevIdx = -1; + forEach/* default */.A(layer, function (v) { + var ws = neighborFn(v); + if (ws.length) { + ws = lodash_es_sortBy(ws, function (w) { + return pos[w]; + }); + var mp = (ws.length - 1) / 2; + for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { + var w = ws[i]; + if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { + align[w] = v; + align[v] = root[v] = root[w]; + prevIdx = pos[w]; + } + } + } + }); + }); + + return { root: root, align: align }; +} + +function horizontalCompaction(g, layering, root, align, reverseSep) { + // This portion of the algorithm differs from BK due to a number of problems. + // Instead of their algorithm we construct a new block graph and do two + // sweeps. The first sweep places blocks with the smallest possible + // coordinates. The second sweep removes unused space by moving blocks to the + // greatest coordinates without violating separation. + var xs = {}, + blockG = buildBlockGraph(g, layering, root, reverseSep), + borderType = reverseSep ? 'borderLeft' : 'borderRight'; + + function iterate(setXsFunc, nextNodesFunc) { + var stack = blockG.nodes(); + var elem = stack.pop(); + var visited = {}; + while (elem) { + if (visited[elem]) { + setXsFunc(elem); + } else { + visited[elem] = true; + stack.push(elem); + stack = stack.concat(nextNodesFunc(elem)); + } + + elem = stack.pop(); + } + } + + // First pass, assign smallest coordinates + function pass1(elem) { + xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { + return Math.max(acc, xs[e.v] + blockG.edge(e)); + }, 0); + } + + // Second pass, assign greatest coordinates + function pass2(elem) { + var min = blockG.outEdges(elem).reduce(function (acc, e) { + return Math.min(acc, xs[e.w] - blockG.edge(e)); + }, Number.POSITIVE_INFINITY); + + var node = g.node(elem); + if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { + xs[elem] = Math.max(xs[elem], min); + } + } + + iterate(pass1, blockG.predecessors.bind(blockG)); + iterate(pass2, blockG.successors.bind(blockG)); + + // Assign x coordinates to all nodes + forEach/* default */.A(align, function (v) { + xs[v] = xs[root[v]]; + }); + + return xs; +} + +function buildBlockGraph(g, layering, root, reverseSep) { + var blockGraph = new graphlib/* Graph */.T(), + graphLabel = g.graph(), + sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); + + forEach/* default */.A(layering, function (layer) { + var u; + forEach/* default */.A(layer, function (v) { + var vRoot = root[v]; + blockGraph.setNode(vRoot); + if (u) { + var uRoot = root[u], + prevMax = blockGraph.edge(uRoot, vRoot); + blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); + } + u = v; + }); + }); + + return blockGraph; +} + +/* + * Returns the alignment that has the smallest width of the given alignments. + */ +function findSmallestWidthAlignment(g, xss) { + return lodash_es_minBy(values/* default */.A(xss), function (xs) { + var max = Number.NEGATIVE_INFINITY; + var min = Number.POSITIVE_INFINITY; + + lodash_es_forIn(xs, function (x, v) { + var halfWidth = width(g, v) / 2; + + max = Math.max(x + halfWidth, max); + min = Math.min(x - halfWidth, min); + }); + + return max - min; + }); +} + +/* + * Align the coordinates of each of the layout alignments such that + * left-biased alignments have their minimum coordinate at the same point as + * the minimum coordinate of the smallest width alignment and right-biased + * alignments have their maximum coordinate at the same point as the maximum + * coordinate of the smallest width alignment. + */ +function alignCoordinates(xss, alignTo) { + var alignToVals = values/* default */.A(alignTo), + alignToMin = lodash_es_min(alignToVals), + alignToMax = lodash_es_max(alignToVals); + + forEach/* default */.A(['u', 'd'], function (vert) { + forEach/* default */.A(['l', 'r'], function (horiz) { + var alignment = vert + horiz, + xs = xss[alignment], + delta; + if (xs === alignTo) return; + + var xsVals = values/* default */.A(xs); + delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); + + if (delta) { + xss[alignment] = lodash_es_mapValues(xs, function (x) { + return x + delta; + }); + } + }); + }); +} + +function balance(xss, align) { + return lodash_es_mapValues(xss.ul, function (ignore, v) { + if (align) { + return xss[align.toLowerCase()][v]; + } else { + var xs = lodash_es_sortBy(map/* default */.A(xss, v)); + return (xs[1] + xs[2]) / 2; + } + }); +} + +function positionX(g) { + var layering = buildLayerMatrix(g); + var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); + + var xss = {}; + var adjustedLayering; + forEach/* default */.A(['u', 'd'], function (vert) { + adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); + forEach/* default */.A(['l', 'r'], function (horiz) { + if (horiz === 'r') { + adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { + return values/* default */.A(inner).reverse(); + }); + } + + var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); + var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); + var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); + if (horiz === 'r') { + xs = lodash_es_mapValues(xs, function (x) { + return -x; + }); + } + xss[vert + horiz] = xs; + }); + }); + + var smallestWidth = findSmallestWidthAlignment(g, xss); + alignCoordinates(xss, smallestWidth); + return balance(xss, g.graph().align); +} + +function sep(nodeSep, edgeSep, reverseSep) { + return function (g, v, w) { + var vLabel = g.node(v); + var wLabel = g.node(w); + var sum = 0; + var delta; + + sum += vLabel.width / 2; + if (has/* default */.A(vLabel, 'labelpos')) { + switch (vLabel.labelpos.toLowerCase()) { + case 'l': + delta = -vLabel.width / 2; + break; + case 'r': + delta = vLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; + sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; + + sum += wLabel.width / 2; + if (has/* default */.A(wLabel, 'labelpos')) { + switch (wLabel.labelpos.toLowerCase()) { + case 'l': + delta = wLabel.width / 2; + break; + case 'r': + delta = -wLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + return sum; + }; +} + +function width(g, v) { + return g.node(v).width; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js + + + + + + +function position(g) { + g = asNonCompoundGraph(g); + + positionY(g); + lodash_es_forOwn(positionX(g), function (x, v) { + g.node(v).x = x; + }); +} + +function positionY(g) { + var layering = buildLayerMatrix(g); + var rankSep = g.graph().ranksep; + var prevY = 0; + forEach/* default */.A(layering, function (layer) { + var maxHeight = lodash_es_max( + map/* default */.A(layer, function (v) { + return g.node(v).height; + }) + ); + forEach/* default */.A(layer, function (v) { + g.node(v).y = prevY + maxHeight / 2; + }); + prevY += maxHeight + rankSep; + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js + + + + + + + + + + + + + + + +function layout(g, opts) { + var time = opts && opts.debugTiming ? util_time : notime; + time('layout', function () { + var layoutGraph = time(' buildLayoutGraph', function () { + return buildLayoutGraph(g); + }); + time(' runLayout', function () { + runLayout(layoutGraph, time); + }); + time(' updateInputGraph', function () { + updateInputGraph(g, layoutGraph); + }); + }); +} + +function runLayout(g, time) { + time(' makeSpaceForEdgeLabels', function () { + makeSpaceForEdgeLabels(g); + }); + time(' removeSelfEdges', function () { + removeSelfEdges(g); + }); + time(' acyclic', function () { + run(g); + }); + time(' nestingGraph.run', function () { + nesting_graph_run(g); + }); + time(' rank', function () { + rank(asNonCompoundGraph(g)); + }); + time(' injectEdgeLabelProxies', function () { + injectEdgeLabelProxies(g); + }); + time(' removeEmptyRanks', function () { + removeEmptyRanks(g); + }); + time(' nestingGraph.cleanup', function () { + cleanup(g); + }); + time(' normalizeRanks', function () { + normalizeRanks(g); + }); + time(' assignRankMinMax', function () { + assignRankMinMax(g); + }); + time(' removeEdgeLabelProxies', function () { + removeEdgeLabelProxies(g); + }); + time(' normalize.run', function () { + normalize_run(g); + }); + time(' parentDummyChains', function () { + parentDummyChains(g); + }); + time(' addBorderSegments', function () { + addBorderSegments(g); + }); + time(' order', function () { + order(g); + }); + time(' insertSelfEdges', function () { + insertSelfEdges(g); + }); + time(' adjustCoordinateSystem', function () { + adjust(g); + }); + time(' position', function () { + position(g); + }); + time(' positionSelfEdges', function () { + positionSelfEdges(g); + }); + time(' removeBorderNodes', function () { + removeBorderNodes(g); + }); + time(' normalize.undo', function () { + normalize_undo(g); + }); + time(' fixupEdgeLabelCoords', function () { + fixupEdgeLabelCoords(g); + }); + time(' undoCoordinateSystem', function () { + coordinate_system_undo(g); + }); + time(' translateGraph', function () { + translateGraph(g); + }); + time(' assignNodeIntersects', function () { + assignNodeIntersects(g); + }); + time(' reversePoints', function () { + reversePointsForReversedEdges(g); + }); + time(' acyclic.undo', function () { + undo(g); + }); +} + +/* + * Copies final layout information from the layout graph back to the input + * graph. This process only copies whitelisted attributes from the layout graph + * to the input graph, so it serves as a good place to determine what + * attributes can influence layout. + */ +function updateInputGraph(inputGraph, layoutGraph) { + forEach/* default */.A(inputGraph.nodes(), function (v) { + var inputLabel = inputGraph.node(v); + var layoutLabel = layoutGraph.node(v); + + if (inputLabel) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + + if (layoutGraph.children(v).length) { + inputLabel.width = layoutLabel.width; + inputLabel.height = layoutLabel.height; + } + } + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var inputLabel = inputGraph.edge(e); + var layoutLabel = layoutGraph.edge(e); + + inputLabel.points = layoutLabel.points; + if (has/* default */.A(layoutLabel, 'x')) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + } + }); + + inputGraph.graph().width = layoutGraph.graph().width; + inputGraph.graph().height = layoutGraph.graph().height; +} + +var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; +var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; +var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; +var nodeNumAttrs = ['width', 'height']; +var nodeDefaults = { width: 0, height: 0 }; +var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; +var edgeDefaults = { + minlen: 1, + weight: 1, + width: 0, + height: 0, + labeloffset: 10, + labelpos: 'r', +}; +var edgeAttrs = ['labelpos']; + +/* + * Constructs a new graph from the input graph, which can be used for layout. + * This process copies only whitelisted attributes from the input graph to the + * layout graph. Thus this function serves as a good place to determine what + * attributes can influence layout. + */ +function buildLayoutGraph(inputGraph) { + var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); + var graph = canonicalize(inputGraph.graph()); + + g.setGraph( + merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) + ); + + forEach/* default */.A(inputGraph.nodes(), function (v) { + var node = canonicalize(inputGraph.node(v)); + g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); + g.setParent(v, inputGraph.parent(v)); + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var edge = canonicalize(inputGraph.edge(e)); + g.setEdge( + e, + merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) + ); + }); + + return g; +} + +/* + * This idea comes from the Gansner paper: to account for edge labels in our + * layout we split each rank in half by doubling minlen and halving ranksep. + * Then we can place labels at these mid-points between nodes. + * + * We also add some minimal padding to the width to push the label for the edge + * away from the edge itself a bit. + */ +function makeSpaceForEdgeLabels(g) { + var graph = g.graph(); + graph.ranksep /= 2; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + edge.minlen *= 2; + if (edge.labelpos.toLowerCase() !== 'c') { + if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { + edge.width += edge.labeloffset; + } else { + edge.height += edge.labeloffset; + } + } + }); +} + +/* + * Creates temporary dummy nodes that capture the rank in which each edge's + * label is going to, if it has one of non-zero width and height. We do this + * so that we can safely remove empty ranks while preserving balance for the + * label's position. + */ +function injectEdgeLabelProxies(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.width && edge.height) { + var v = g.node(e.v); + var w = g.node(e.w); + var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; + addDummyNode(g, 'edge-proxy', label, '_ep'); + } + }); +} + +function assignRankMinMax(g) { + var maxRank = 0; + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.borderTop) { + node.minRank = g.node(node.borderTop).rank; + node.maxRank = g.node(node.borderBottom).rank; + // @ts-expect-error + maxRank = lodash_es_max(maxRank, node.maxRank); + } + }); + g.graph().maxRank = maxRank; +} + +function removeEdgeLabelProxies(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'edge-proxy') { + g.edge(node.e).labelRank = node.rank; + g.removeNode(v); + } + }); +} + +function translateGraph(g) { + var minX = Number.POSITIVE_INFINITY; + var maxX = 0; + var minY = Number.POSITIVE_INFINITY; + var maxY = 0; + var graphLabel = g.graph(); + var marginX = graphLabel.marginx || 0; + var marginY = graphLabel.marginy || 0; + + function getExtremes(attrs) { + var x = attrs.x; + var y = attrs.y; + var w = attrs.width; + var h = attrs.height; + minX = Math.min(minX, x - w / 2); + maxX = Math.max(maxX, x + w / 2); + minY = Math.min(minY, y - h / 2); + maxY = Math.max(maxY, y + h / 2); + } + + forEach/* default */.A(g.nodes(), function (v) { + getExtremes(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + getExtremes(edge); + } + }); + + minX -= marginX; + minY -= marginY; + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + node.x -= minX; + node.y -= minY; + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, function (p) { + p.x -= minX; + p.y -= minY; + }); + if (has/* default */.A(edge, 'x')) { + edge.x -= minX; + } + if (has/* default */.A(edge, 'y')) { + edge.y -= minY; + } + }); + + graphLabel.width = maxX - minX + marginX; + graphLabel.height = maxY - minY + marginY; +} + +function assignNodeIntersects(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + var nodeV = g.node(e.v); + var nodeW = g.node(e.w); + var p1, p2; + if (!edge.points) { + edge.points = []; + p1 = nodeW; + p2 = nodeV; + } else { + p1 = edge.points[0]; + p2 = edge.points[edge.points.length - 1]; + } + edge.points.unshift(intersectRect(nodeV, p1)); + edge.points.push(intersectRect(nodeW, p2)); + }); +} + +function fixupEdgeLabelCoords(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + if (edge.labelpos === 'l' || edge.labelpos === 'r') { + edge.width -= edge.labeloffset; + } + switch (edge.labelpos) { + case 'l': + edge.x -= edge.width / 2 + edge.labeloffset; + break; + case 'r': + edge.x += edge.width / 2 + edge.labeloffset; + break; + } + } + }); +} + +function reversePointsForReversedEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.reversed) { + edge.points.reverse(); + } + }); +} + +function removeBorderNodes(g) { + forEach/* default */.A(g.nodes(), function (v) { + if (g.children(v).length) { + var node = g.node(v); + var t = g.node(node.borderTop); + var b = g.node(node.borderBottom); + var l = g.node(lodash_es_last(node.borderLeft)); + var r = g.node(lodash_es_last(node.borderRight)); + + node.width = Math.abs(r.x - l.x); + node.height = Math.abs(b.y - t.y); + node.x = l.x + node.width / 2; + node.y = t.y + node.height / 2; + } + }); + + forEach/* default */.A(g.nodes(), function (v) { + if (g.node(v).dummy === 'border') { + g.removeNode(v); + } + }); +} + +function removeSelfEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + if (e.v === e.w) { + var node = g.node(e.v); + if (!node.selfEdges) { + node.selfEdges = []; + } + node.selfEdges.push({ e: e, label: g.edge(e) }); + g.removeEdge(e); + } + }); +} + +function insertSelfEdges(g) { + var layers = buildLayerMatrix(g); + forEach/* default */.A(layers, function (layer) { + var orderShift = 0; + forEach/* default */.A(layer, function (v, i) { + var node = g.node(v); + node.order = i + orderShift; + forEach/* default */.A(node.selfEdges, function (selfEdge) { + addDummyNode( + g, + 'selfedge', + { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node.rank, + order: i + ++orderShift, + e: selfEdge.e, + label: selfEdge.label, + }, + '_se' + ); + }); + delete node.selfEdges; + }); + }); +} + +function positionSelfEdges(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'selfedge') { + var selfNode = g.node(node.e.v); + var x = selfNode.x + selfNode.width / 2; + var y = selfNode.y; + var dx = node.x - x; + var dy = selfNode.height / 2; + g.setEdge(node.e, node.label); + g.removeNode(v); + node.label.points = [ + { x: x + (2 * dx) / 3, y: y - dy }, + { x: x + (5 * dx) / 6, y: y - dy }, + { x: x + dx, y: y }, + { x: x + (5 * dx) / 6, y: y + dy }, + { x: x + (2 * dx) / 3, y: y + dy }, + ]; + node.label.x = node.x; + node.label.y = node.y; + } + }); +} + +function selectNumberAttrs(obj, attrs) { + return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); +} + +function canonicalize(attrs) { + var newAttrs = {}; + forEach/* default */.A(attrs, function (v, k) { + newAttrs[k.toLowerCase()] = v; + }); + return newAttrs; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + + + + + + + + +/***/ }), + +/***/ 3046: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + T: () => (/* binding */ Graph) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js +var isFunction = __webpack_require__(9610); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js +var isEmpty = __webpack_require__(6401); +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/* harmony default export */ const _baseIsNaN = (baseIsNaN); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/* harmony default export */ const _strictIndexOf = (strictIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js + + + + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? _strictIndexOf(array, value, fromIndex) + : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); +} + +/* harmony default export */ const _baseIndexOf = (baseIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js + + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && _baseIndexOf(array, value, 0) > -1; +} + +/* harmony default export */ const _arrayIncludes = (arrayIncludes); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js +var _Set = __webpack_require__(9857); +;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +/* harmony default export */ const lodash_es_noop = (noop); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { + return new _Set/* default */.A(values); +}; + +/* harmony default export */ const _createSet = (createSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js + + + + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = _arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = _arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : _createSet(array); + if (set) { + return (0,_setToArray/* default */.A)(set); + } + isCommon = false; + includes = _cacheHas/* default */.A; + seen = new _SetCache/* default */.A; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/* harmony default export */ const _baseUniq = (baseUniq); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js +var isArrayLikeObject = __webpack_require__(3533); +;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js + + + + + +/** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ +var union = (0,_baseRest/* default */.A)(function(arrays) { + return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); +}); + +/* harmony default export */ const lodash_es_union = (union); + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + + +var DEFAULT_EDGE_NAME = '\x00'; +var GRAPH_NODE = '\x00'; +var EDGE_KEY_DELIM = '\x01'; + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. +class Graph { + constructor(opts = {}) { + this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; + this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; + this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; + + // Label for the graph itself + this._label = undefined; + + // Defaults to be set when creating a new node + this._defaultNodeLabelFn = constant/* default */.A(undefined); + + // Defaults to be set when creating a new edge + this._defaultEdgeLabelFn = constant/* default */.A(undefined); + + // v -> label + this._nodes = {}; + + if (this._isCompound) { + // v -> parent + this._parent = {}; + + // v -> children + this._children = {}; + this._children[GRAPH_NODE] = {}; + } + + // v -> edgeObj + this._in = {}; + + // u -> v -> Number + this._preds = {}; + + // v -> edgeObj + this._out = {}; + + // v -> w -> Number + this._sucs = {}; + + // e -> edgeObj + this._edgeObjs = {}; + + // e -> label + this._edgeLabels = {}; + } + /* === Graph functions ========= */ + isDirected() { + return this._isDirected; + } + isMultigraph() { + return this._isMultigraph; + } + isCompound() { + return this._isCompound; + } + setGraph(label) { + this._label = label; + return this; + } + graph() { + return this._label; + } + /* === Node functions ========== */ + setDefaultNodeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; + } + nodeCount() { + return this._nodeCount; + } + nodes() { + return keys/* default */.A(this._nodes); + } + sources() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._in[v]); + }); + } + sinks() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._out[v]); + }); + } + setNodes(vs, value) { + var args = arguments; + var self = this; + forEach/* default */.A(vs, function (v) { + if (args.length > 1) { + self.setNode(v, value); + } else { + self.setNode(v); + } + }); + return this; + } + setNode(v, value) { + if (has/* default */.A(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; + } + return this; + } + + // @ts-expect-error + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; + } + node(v) { + return this._nodes[v]; + } + hasNode(v) { + return has/* default */.A(this._nodes, v); + } + removeNode(v) { + var self = this; + if (has/* default */.A(this._nodes, v)) { + var removeEdge = function (e) { + self.removeEdge(self._edgeObjs[e]); + }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + forEach/* default */.A(this.children(v), function (child) { + self.setParent(child); + }); + delete this._children[v]; + } + forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; + } + setParent(v, parent) { + if (!this._isCompound) { + throw new Error('Cannot set parent in a non-compound graph'); + } + + if (isUndefined/* default */.A(parent)) { + parent = GRAPH_NODE; + } else { + // Coerce parent to string + parent += ''; + for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); + } + } + + this.setNode(parent); + } + + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; + } + _removeFromParentsChildList(v) { + delete this._children[this._parent[v]][v]; + } + parent(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } + } + children(v) { + if (isUndefined/* default */.A(v)) { + v = GRAPH_NODE; + } + + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return keys/* default */.A(children); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } + } + predecessors(v) { + var predsV = this._preds[v]; + if (predsV) { + return keys/* default */.A(predsV); + } + } + successors(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return keys/* default */.A(sucsV); + } + } + neighbors(v) { + var preds = this.predecessors(v); + if (preds) { + return lodash_es_union(preds, this.successors(v)); + } + } + isLeaf(v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; + } + filterNodes(filter) { + // @ts-expect-error + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound, + }); + + copy.setGraph(this.graph()); + + var self = this; + forEach/* default */.A(this._nodes, function (value, v) { + if (filter(v)) { + copy.setNode(v, value); + } + }); + + forEach/* default */.A(this._edgeObjs, function (e) { + // @ts-expect-error + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self.edge(e)); + } + }); + + var parents = {}; + function findParent(v) { + var parent = self.parent(v); + if (parent === undefined || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); + } + } + + if (this._isCompound) { + forEach/* default */.A(copy.nodes(), function (v) { + copy.setParent(v, findParent(v)); + }); + } + + return copy; + } + /* === Edge functions ========== */ + setDefaultEdgeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; + } + edgeCount() { + return this._edgeCount; + } + edges() { + return values/* default */.A(this._edgeObjs); + } + setPath(vs, value) { + var self = this; + var args = arguments; + reduce/* default */.A(vs, function (v, w) { + if (args.length > 1) { + self.setEdge(v, w, value); + } else { + self.setEdge(v, w); + } + return w; + }); + return this; + } + /* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ + setEdge() { + var v, w, name, value; + var valueSpecified = false; + var arg0 = arguments[0]; + + if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; + } + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; + } + } + + v = '' + v; + w = '' + w; + if (!isUndefined/* default */.A(name)) { + name = '' + name; + } + + var e = edgeArgsToId(this._isDirected, v, w, name); + if (has/* default */.A(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; + } + return this; + } + + if (!isUndefined/* default */.A(name) && !this._isMultigraph) { + throw new Error('Cannot set a named edge when isMultigraph = false'); + } + + // It didn't exist, so we need to create it. + // First ensure the nodes exist. + this.setNode(v); + this.setNode(w); + + // @ts-expect-error + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + // Ensure we add undirected edges in a consistent way. + v = edgeObj.v; + w = edgeObj.w; + + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; + } + edge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return this._edgeLabels[e]; + } + hasEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return has/* default */.A(this._edgeLabels, e); + } + removeEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; + } + inEdges(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = values/* default */.A(inV); + if (!u) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.v === u; + }); + } + } + outEdges(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = values/* default */.A(outV); + if (!w) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.w === w; + }); + } + } + nodeEdges(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } + } +} + +/* Number of nodes in the graph. Should only be changed by the implementation. */ +Graph.prototype._nodeCount = 0; + +/* Number of edges in the graph. Should only be changed by the implementation. */ +Graph.prototype._edgeCount = 0; + +function incrementOrInitEntry(map, k) { + if (map[k]) { + map[k]++; + } else { + map[k] = 1; + } +} + +function decrementOrRemoveEntry(map, k) { + if (!--map[k]) { + delete map[k]; + } +} + +function edgeArgsToId(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); +} + +function edgeArgsToObj(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v: v, w: w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; +} + +function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); +} + + +/***/ }), + +/***/ 697: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) +/* harmony export */ }); +/* unused harmony export version */ +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); +// Includes only the "core" of graphlib + + + +const version = '2.1.9-pre'; + + + + +/***/ }), + +/***/ 2062: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _SetCache) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules +var _MapCache = __webpack_require__(9471); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/* harmony default export */ const _setCacheAdd = (setCacheAdd); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ const _setCacheHas = (setCacheHas); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new _MapCache/* default */.A; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; +SetCache.prototype.has = _setCacheHas; + +/* harmony default export */ const _SetCache = (SetCache); + + +/***/ }), + +/***/ 2641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); + + +/***/ }), + +/***/ 2634: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); + + +/***/ }), + +/***/ 5572: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); + + +/***/ }), + +/***/ 6912: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); + + +/***/ }), + +/***/ 1641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseClone) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js +var _arrayEach = __webpack_require__(2641); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js +var _copyObject = __webpack_require__(2031); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js + + + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssign = (baseAssign); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js + + + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssignIn = (baseAssignIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js +var _cloneBuffer = __webpack_require__(154); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js +var _copyArray = __webpack_require__(9759); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js +var _getSymbols = __webpack_require__(4792); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js + + + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); +} + +/* harmony default export */ const _copySymbols = (copySymbols); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js +var _getPrototype = __webpack_require__(5647); +// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js +var stubArray = __webpack_require__(3153); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { + var result = []; + while (object) { + (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); + object = (0,_getPrototype/* default */.A)(object); + } + return result; +}; + +/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js + + + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); +} + +/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js +var _baseGetAllKeys = __webpack_require__(3831); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js + + + + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); +} + +/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/* harmony default export */ const _initCloneArray = (initCloneArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js +var _cloneArrayBuffer = __webpack_require__(565); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js + + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/* harmony default export */ const _cloneDataView = (cloneDataView); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/* harmony default export */ const _cloneRegExp = (cloneRegExp); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js + + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/* harmony default export */ const _cloneSymbol = (cloneSymbol); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js +var _cloneTypedArray = __webpack_require__(1801); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js + + + + + + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return (0,_cloneArrayBuffer/* default */.A)(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return _cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return (0,_cloneTypedArray/* default */.A)(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return _cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return _cloneSymbol(object); + } +} + +/* harmony default export */ const _initCloneByTag = (initCloneByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules +var _initCloneObject = __webpack_require__(8598); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js + + + +/** `Object#toString` result references. */ +var _baseIsMap_mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; +} + +/* harmony default export */ const _baseIsMap = (baseIsMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js +var _nodeUtil = __webpack_require__(4841); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js + + + + +/* Node.js helper references. */ +var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; + +/* harmony default export */ const lodash_es_isMap = (isMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js + + + +/** `Object#toString` result references. */ +var _baseIsSet_setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; +} + +/* harmony default export */ const _baseIsSet = (baseIsSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js + + + + +/* Node.js helper references. */ +var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; + +/* harmony default export */ const lodash_es_isSet = (isSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js + + + + + + + + + + + + + + + + + + + + + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + _baseClone_boolTag = '[object Boolean]', + _baseClone_dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + _baseClone_mapTag = '[object Map]', + _baseClone_numberTag = '[object Number]', + objectTag = '[object Object]', + _baseClone_regexpTag = '[object RegExp]', + _baseClone_setTag = '[object Set]', + _baseClone_stringTag = '[object String]', + _baseClone_symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var _baseClone_arrayBufferTag = '[object ArrayBuffer]', + _baseClone_dataViewTag = '[object DataView]', + _baseClone_float32Tag = '[object Float32Array]', + _baseClone_float64Tag = '[object Float64Array]', + _baseClone_int8Tag = '[object Int8Array]', + _baseClone_int16Tag = '[object Int16Array]', + _baseClone_int32Tag = '[object Int32Array]', + _baseClone_uint8Tag = '[object Uint8Array]', + _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', + _baseClone_uint16Tag = '[object Uint16Array]', + _baseClone_uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = +cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = +cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = +cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = +cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = +cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = +cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = +cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = +cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = +cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!(0,isObject/* default */.A)(value)) { + return value; + } + var isArr = (0,isArray/* default */.A)(value); + if (isArr) { + result = _initCloneArray(value); + if (!isDeep) { + return (0,_copyArray/* default */.A)(value, result); + } + } else { + var tag = (0,_getTag/* default */.A)(value), + isFunc = tag == funcTag || tag == genTag; + + if ((0,isBuffer/* default */.A)(value)) { + return (0,_cloneBuffer/* default */.A)(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); + if (!isDeep) { + return isFlat + ? _copySymbolsIn(value, _baseAssignIn(result, value)) + : _copySymbols(value, _baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = _initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new _Stack/* default */.A); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (lodash_es_isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (lodash_es_isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) + : (isFlat ? keysIn/* default */.A : keys/* default */.A); + + var props = isArr ? undefined : keysFunc(value); + (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +/* harmony default export */ const _baseClone = (baseClone); + + +/***/ }), + +/***/ 6240: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseEach) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js + + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!(0,isArrayLike/* default */.A)(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +/* harmony default export */ const _createBaseEach = (createBaseEach); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js + + + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = _createBaseEach(_baseForOwn/* default */.A); + +/* harmony default export */ const _baseEach = (baseEach); + + +/***/ }), + +/***/ 5707: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); + + +/***/ }), + +/***/ 3588: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseFlatten) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules +var isArguments = __webpack_require__(2274); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js + + + + +/** Built-in value references. */ +var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/* harmony default export */ const _isFlattenable = (isFlattenable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js + + + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = _isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + (0,_arrayPush/* default */.A)(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/* harmony default export */ const _baseFlatten = (baseFlatten); + + +/***/ }), + +/***/ 9841: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); + + +/***/ }), + +/***/ 6318: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); + + +/***/ }), + +/***/ 3831: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6912); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); + + +/***/ }), + +/***/ 9574: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseIteratee) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arraySome = (arraySome); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!_arraySome(other, function(othValue, othIndex) { + if (!(0,_cacheHas/* default */.A)(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalArrays = (equalArrays); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js +var _Uint8Array = __webpack_require__(3988); +// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js +var eq = __webpack_require__(6984); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ const _mapToArray = (mapToArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _equalByTag_COMPARE_PARTIAL_FLAG = 1, + _equalByTag_COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return (0,eq/* default */.A)(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = _mapToArray; + + case setTag: + var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; + convert || (convert = _setToArray/* default */.A); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ const _equalByTag = (equalByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js + + +/** Used to compose bitmasks for value comparisons. */ +var _equalObjects_COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, + objProps = (0,_getAllKeys/* default */.A)(object), + objLength = objProps.length, + othProps = (0,_getAllKeys/* default */.A)(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalObjects = (equalObjects); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules +var isTypedArray = __webpack_require__(3858); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var _baseIsEqualDeep_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = (0,isArray/* default */.A)(object), + othIsArr = (0,isArray/* default */.A)(other), + objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), + othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && (0,isBuffer/* default */.A)(object)) { + if (!(0,isBuffer/* default */.A)(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new _Stack/* default */.A); + return (objIsArr || (0,isTypedArray/* default */.A)(object)) + ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new _Stack/* default */.A); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new _Stack/* default */.A); + return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { + return value !== value && other !== other; + } + return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ const _baseIsEqual = (baseIsEqual); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, + _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new _Stack/* default */.A; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ const _baseIsMatch = (baseIsMatch); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !(0,isObject/* default */.A)(value); +} + +/* harmony default export */ const _isStrictComparable = (isStrictComparable); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = (0,keys/* default */.A)(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, _isStrictComparable(value)]; + } + return result; +} + +/* harmony default export */ const _getMatchData = (getMatchData); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = _getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return _matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || _baseIsMatch(object, source, matchData); + }; +} + +/* harmony default export */ const _baseMatches = (baseMatches); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ const lodash_es_get = (get); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, + _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { + return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); + } + return function(object) { + var objValue = lodash_es_get(object, path); + return (objValue === undefined && objValue === srcValue) + ? (0,hasIn/* default */.A)(object, path) + : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return (0,_baseGet/* default */.A)(object, path); + }; +} + +/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); +} + +/* harmony default export */ const lodash_es_property = (property); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity/* default */.A; + } + if (typeof value == 'object') { + return (0,isArray/* default */.A)(value) + ? _baseMatchesProperty(value[0], value[1]) + : _baseMatches(value); + } + return lodash_es_property(value); +} + +/* harmony default export */ const _baseIteratee = (baseIteratee); + + +/***/ }), + +/***/ 2568: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; + + (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); + + +/***/ }), + +/***/ 805: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); + + +/***/ }), + +/***/ 4099: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); + + +/***/ }), + +/***/ 9922: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9008); + + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); + + +/***/ }), + +/***/ 7819: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _castPath) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js +var memoize = __webpack_require__(6632); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = (0,memoize/* default */.A)(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ const _memoizeCapped = (memoizeCapped); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js + + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = _memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ const _stringToPath = (stringToPath); + +// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules +var lodash_es_toString = __webpack_require__(8894); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if ((0,isArray/* default */.A)(value)) { + return value; + } + return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); +} + +/* harmony default export */ const _castPath = (castPath); + + +/***/ }), + +/***/ 9042: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3831); +/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4792); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); + + +/***/ }), + +/***/ 4792: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); +/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3153); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); + + +/***/ }), + +/***/ 5054: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2274); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2049); +/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5353); +/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && + ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); + + +/***/ }), + +/***/ 6586: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1882); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); + + +/***/ }), + +/***/ 9959: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); + + +/***/ }), + +/***/ 3282: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1882); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); + + +/***/ }), + +/***/ 3068: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4326); +/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6984); +/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); +/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5615); + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); + + +/***/ }), + +/***/ 1662: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_filter) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js +var _arrayFilter = __webpack_require__(2634); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js + + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + (0,_baseEach/* default */.A)(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +/* harmony default export */ const _baseFilter = (baseFilter); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js + + + + + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ +function filter(collection, predicate) { + var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; + return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); +} + +/* harmony default export */ const lodash_es_filter = (filter); + + +/***/ }), + +/***/ 4098: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3588); + + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); + + +/***/ }), + +/***/ 8058: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2641); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); +/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9922); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); + + +/***/ }), + +/***/ 8585: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_has) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && _baseHas_hasOwnProperty.call(object, key); +} + +/* harmony default export */ const _baseHas = (baseHas); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js + + + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); +} + +/* harmony default export */ const lodash_es_has = (has); + + +/***/ }), + +/***/ 9188: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_hasIn) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ const _baseHasIn = (baseHasIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); +} + +/* harmony default export */ const lodash_es_hasIn = (hasIn); + + +/***/ }), + +/***/ 1882: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8496); +/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3098); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); + + +/***/ }), + +/***/ 9592: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); + + +/***/ }), + +/***/ 2184: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3607); +/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1852); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); + + +/***/ }), + +/***/ 4722: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5572); +/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9574); +/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2568); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); + + +/***/ }), + +/***/ 1942: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_pick) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules +var _castPath = __webpack_require__(7819); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js +var _isIndex = __webpack_require__(5353); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js + + + + + + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!(0,isObject/* default */.A)(object)) { + return object; + } + path = (0,_castPath/* default */.A)(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = (0,_toKey/* default */.A)(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = (0,isObject/* default */.A)(objValue) + ? objValue + : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); + } + } + (0,_assignValue/* default */.A)(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/* harmony default export */ const _baseSet = (baseSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js + + + + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = (0,_baseGet/* default */.A)(object, path); + + if (predicate(value, path)) { + _baseSet(result, (0,_castPath/* default */.A)(path, object), value); + } + } + return result; +} + +/* harmony default export */ const _basePickBy = (basePickBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js + + + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return _basePickBy(object, paths, function(value, path) { + return (0,hasIn/* default */.A)(object, path); + }); +} + +/* harmony default export */ const _basePick = (basePick); + +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules +var _overRest = __webpack_require__(6875); +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules +var _setToString = __webpack_require__(7525); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js + + + + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); +} + +/* harmony default export */ const _flatRest = (flatRest); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js + + + +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = _flatRest(function(object, paths) { + return object == null ? {} : _basePick(object, paths); +}); + +/* harmony default export */ const lodash_es_pick = (pick); + + +/***/ }), + +/***/ 1395: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_range) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +/* harmony default export */ const _baseRange = (baseRange); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js + + + + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = (0,toFinite/* default */.A)(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = (0,toFinite/* default */.A)(end); + } + step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); + return _baseRange(start, end, step, fromRight); + }; +} + +/* harmony default export */ const _createRange = (createRange); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js + + +/** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ +var range = _createRange(); + +/* harmony default export */ const lodash_es_range = (range); + + +/***/ }), + +/***/ 9463: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_reduce) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/* harmony default export */ const _arrayReduce = (arrayReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +/* harmony default export */ const _baseReduce = (baseReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js + + + + + + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ +function reduce(collection, iteratee, accumulator) { + var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, + initAccum = arguments.length < 3; + + return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); +} + +/* harmony default export */ const lodash_es_reduce = (reduce); + + +/***/ }), + +/***/ 3153: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); + + +/***/ }), + +/***/ 4342: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toFinite) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js +/** Used to match a single whitespace character. */ +var reWhitespace = /\s/; + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ +function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; +} + +/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js + + +/** Used to match leading whitespace. */ +var reTrimStart = /^\s+/; + +/** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ +function baseTrim(string) { + return string + ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; +} + +/* harmony default export */ const _baseTrim = (baseTrim); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js + + + + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if ((0,isSymbol/* default */.A)(value)) { + return NAN; + } + if ((0,isObject/* default */.A)(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = (0,isObject/* default */.A)(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = _baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +/* harmony default export */ const lodash_es_toNumber = (toNumber); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = lodash_es_toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +/* harmony default export */ const lodash_es_toFinite = (toFinite); + + +/***/ }), + +/***/ 8894: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toString) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if ((0,isArray/* default */.A)(value)) { + // Recursively convert values (susceptible to call stack limits). + return (0,_arrayMap/* default */.A)(value, baseToString) + ''; + } + if ((0,isSymbol/* default */.A)(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const _baseToString = (baseToString); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString_toString(value) { + return value == null ? '' : _baseToString(value); +} + +/* harmony default export */ const lodash_es_toString = (toString_toString); + + +/***/ }), + +/***/ 5664: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8894); + + +/** Used to generate unique IDs. */ +var idCounter = 0; + +/** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ +function uniqueId(prefix) { + var id = ++idCounter; + return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); + + +/***/ }), + +/***/ 8207: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_values) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js + + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return (0,_arrayMap/* default */.A)(props, function(key) { + return object[key]; + }); +} + +/* harmony default export */ const _baseValues = (baseValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js + + + +/** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ +function values(object) { + return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); +} + +/* harmony default export */ const lodash_es_values = (values); + + +/***/ }), + +/***/ 8609: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6292); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1176); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6257); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9418); + + + + + + + + + + + + + + +const idCache = {}; +const set = (key, val) => { + idCache[key] = val; +}; +const get = (k) => idCache[k]; +const keys = () => Object.keys(idCache); +const size = () => keys().length; +const idCache$1 = { + get, + set, + keys, + size +}; +const drawStartState = (g) => g.append("circle").attr("class", "start-state").attr("r", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit).attr("cx", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit).attr("cy", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit); +const drawDivider = (g) => g.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight).attr("class", "divider").attr("x2", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight * 2).attr("y1", 0).attr("y2", 0); +const drawSimpleState = (g, stateDef) => { + const state = g.append("text").attr("x", 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("y", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight + 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("font-size", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.fontSize).attr("class", "state-title").text(stateDef.id); + const classBox = state.node().getBBox(); + g.insert("rect", ":first-child").attr("x", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("y", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("width", classBox.width + 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("height", classBox.height + 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("rx", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.radius); + return state; +}; +const drawDescrState = (g, stateDef) => { + const addTspan = function(textEl, txt, isFirst2) { + const tSpan = textEl.append("tspan").attr("x", 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).text(txt); + if (!isFirst2) { + tSpan.attr("dy", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight); + } + }; + const title = g.append("text").attr("x", 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("y", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight + 1.3 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("font-size", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.fontSize).attr("class", "state-title").text(stateDef.descriptions[0]); + const titleBox = title.node().getBBox(); + const titleHeight = titleBox.height; + const description = g.append("text").attr("x", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr( + "y", + titleHeight + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding * 0.4 + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.dividerMargin + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight + ).attr("class", "state-description"); + let isFirst = true; + let isSecond = true; + stateDef.descriptions.forEach(function(descr) { + if (!isFirst) { + addTspan(description, descr, isSecond); + isSecond = false; + } + isFirst = false; + }); + const descrLine = g.append("line").attr("x1", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("y1", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + titleHeight + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.dividerMargin / 2).attr("y2", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + titleHeight + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.dividerMargin / 2).attr("class", "descr-divider"); + const descrBox = description.node().getBBox(); + const width = Math.max(descrBox.width, titleBox.width); + descrLine.attr("x2", width + 3 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding); + g.insert("rect", ":first-child").attr("x", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("y", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("width", width + 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("height", descrBox.height + titleHeight + 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("rx", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.radius); + return g; +}; +const addTitleAndBox = (g, stateDef, altBkg) => { + const pad = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding; + const dblPad = 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding; + const orgBox = g.node().getBBox(); + const orgWidth = orgBox.width; + const orgX = orgBox.x; + const title = g.append("text").attr("x", 0).attr("y", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.titleShift).attr("font-size", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.fontSize).attr("class", "state-title").text(stateDef.id); + const titleBox = title.node().getBBox(); + const titleWidth = titleBox.width + dblPad; + let width = Math.max(titleWidth, orgWidth); + if (width === orgWidth) { + width = width + dblPad; + } + let startX; + const graphBox = g.node().getBBox(); + if (stateDef.doc) + ; + startX = orgX - pad; + if (titleWidth > orgWidth) { + startX = (orgWidth - width) / 2 + pad; + } + if (Math.abs(orgX - graphBox.x) < pad && titleWidth > orgWidth) { + startX = orgX - (titleWidth - orgWidth) / 2; + } + const lineY = 1 - (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight; + g.insert("rect", ":first-child").attr("x", startX).attr("y", lineY).attr("class", altBkg ? "alt-composit" : "composit").attr("width", width).attr( + "height", + graphBox.height + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.titleShift + 1 + ).attr("rx", "0"); + title.attr("x", startX + pad); + if (titleWidth <= orgWidth) { + title.attr("x", orgX + (width - dblPad) / 2 - titleWidth / 2 + pad); + } + g.insert("rect", ":first-child").attr("x", startX).attr( + "y", + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.titleShift - (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight - (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + ).attr("width", width).attr("height", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight * 3).attr("rx", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.radius); + g.insert("rect", ":first-child").attr("x", startX).attr( + "y", + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.titleShift - (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight - (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + ).attr("width", width).attr("height", graphBox.height + 3 + 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.textHeight).attr("rx", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.radius); + return g; +}; +const drawEndState = (g) => { + g.append("circle").attr("class", "end-state-outer").attr("r", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.miniPadding).attr( + "cx", + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.miniPadding + ).attr( + "cy", + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.miniPadding + ); + return g.append("circle").attr("class", "end-state-inner").attr("r", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit).attr("cx", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit + 2).attr("cy", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.sizeUnit + 2); +}; +const drawForkJoinState = (g, stateDef) => { + let width = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.forkWidth; + let height = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.forkHeight; + if (stateDef.parentId) { + let tmp = width; + width = height; + height = tmp; + } + return g.append("rect").style("stroke", "black").style("fill", "black").attr("width", width).attr("height", height).attr("x", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("y", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding); +}; +const _drawLongText = (_text, x, y, g) => { + let textHeight = 0; + const textElem = g.append("text"); + textElem.style("text-anchor", "start"); + textElem.attr("class", "noteText"); + let text = _text.replace(/\r\n/g, "<br/>"); + text = text.replace(/\n/g, "<br/>"); + const lines = text.split(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.e.lineBreakRegex); + let tHeight = 1.25 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.noteMargin; + for (const line2 of lines) { + const txt = line2.trim(); + if (txt.length > 0) { + const span = textElem.append("tspan"); + span.text(txt); + if (tHeight === 0) { + const textBounds = span.node().getBBox(); + tHeight += textBounds.height; + } + textHeight += tHeight; + span.attr("x", x + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.noteMargin); + span.attr("y", y + textHeight + 1.25 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.noteMargin); + } + } + return { textWidth: textElem.node().getBBox().width, textHeight }; +}; +const drawNote = (text, g) => { + g.attr("class", "state-note"); + const note = g.append("rect").attr("x", 0).attr("y", (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding); + const rectElem = g.append("g"); + const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem); + note.attr("height", textHeight + 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.noteMargin); + note.attr("width", textWidth + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.noteMargin * 2); + return note; +}; +const drawState = function(elem, stateDef) { + const id = stateDef.id; + const stateInfo = { + id, + label: stateDef.id, + width: 0, + height: 0 + }; + const g = elem.append("g").attr("id", id).attr("class", "stateGroup"); + if (stateDef.type === "start") { + drawStartState(g); + } + if (stateDef.type === "end") { + drawEndState(g); + } + if (stateDef.type === "fork" || stateDef.type === "join") { + drawForkJoinState(g, stateDef); + } + if (stateDef.type === "note") { + drawNote(stateDef.note.text, g); + } + if (stateDef.type === "divider") { + drawDivider(g); + } + if (stateDef.type === "default" && stateDef.descriptions.length === 0) { + drawSimpleState(g, stateDef); + } + if (stateDef.type === "default" && stateDef.descriptions.length > 0) { + drawDescrState(g, stateDef); + } + const stateBox = g.node().getBBox(); + stateInfo.width = stateBox.width + 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding; + stateInfo.height = stateBox.height + 2 * (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding; + idCache$1.set(id, stateInfo); + return stateInfo; +}; +let edgeCount = 0; +const drawEdge = function(elem, path, relation) { + const getRelationType = function(type) { + switch (type) { + case _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.d.relationType.AGGREGATION: + return "aggregation"; + case _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.d.relationType.EXTENSION: + return "extension"; + case _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.d.relationType.COMPOSITION: + return "composition"; + case _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.d.relationType.DEPENDENCY: + return "dependency"; + } + }; + path.points = path.points.filter((p) => !Number.isNaN(p.y)); + const lineData = path.points; + const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }).curve(d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM); + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "transition"); + let url = ""; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + svgPath.attr( + "marker-end", + "url(" + url + "#" + getRelationType(_styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.d.relationType.DEPENDENCY) + "End)" + ); + if (relation.title !== void 0) { + const label = elem.append("g").attr("class", "stateLabel"); + const { x, y } = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.u.calcLabelPosition(path.points); + const rows = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.e.getRows(relation.title); + let titleHeight = 0; + const titleRows = []; + let maxWidth = 0; + let minX = 0; + for (let i = 0; i <= rows.length; i++) { + const title = label.append("text").attr("text-anchor", "middle").text(rows[i]).attr("x", x).attr("y", y + titleHeight); + const boundsTmp = title.node().getBBox(); + maxWidth = Math.max(maxWidth, boundsTmp.width); + minX = Math.min(minX, boundsTmp.x); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.info(boundsTmp.x, x, y + titleHeight); + if (titleHeight === 0) { + const titleBox = title.node().getBBox(); + titleHeight = titleBox.height; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Title height", titleHeight, y); + } + titleRows.push(title); + } + let boxHeight = titleHeight * rows.length; + if (rows.length > 1) { + const heightAdj = (rows.length - 1) * titleHeight * 0.5; + titleRows.forEach((title, i) => title.attr("y", y + i * titleHeight - heightAdj)); + boxHeight = titleHeight * rows.length; + } + const bounds = label.node().getBBox(); + label.insert("rect", ":first-child").attr("class", "box").attr("x", x - maxWidth / 2 - (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding / 2).attr("y", y - boxHeight / 2 - (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding / 2 - 3.5).attr("width", maxWidth + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding).attr("height", boxHeight + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.info(bounds); + } + edgeCount++; +}; +let conf; +const transformationLog = {}; +const setConf = function() { +}; +const insertMarkers = function(elem) { + elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z"); +}; +const draw = function(text, id, _version, diagObj) { + conf = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().state; + const securityLevel = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Rendering diagram " + text); + const diagram2 = root.select(`[id='${id}']`); + insertMarkers(diagram2); + const rootDoc = diagObj.db.getRootDoc(); + renderDoc(rootDoc, diagram2, void 0, false, root, doc, diagObj); + const padding = conf.padding; + const bounds = diagram2.node().getBBox(); + const width = bounds.width + padding * 2; + const height = bounds.height + padding * 2; + const svgWidth = width * 1.75; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.i)(diagram2, height, svgWidth, conf.useMaxWidth); + diagram2.attr( + "viewBox", + `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + " " + height + ); +}; +const getLabelWidth = (text) => { + return text ? text.length * conf.fontSizeFactor : 1; +}; +const renderDoc = (doc, diagram2, parentId, altBkg, root, domDocument, diagObj) => { + const graph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ + compound: true, + multigraph: true + }); + let i; + let edgeFreeDoc = true; + for (i = 0; i < doc.length; i++) { + if (doc[i].stmt === "relation") { + edgeFreeDoc = false; + break; + } + } + if (parentId) { + graph.setGraph({ + rankdir: "LR", + multigraph: true, + compound: true, + // acyclicer: 'greedy', + ranker: "tight-tree", + ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor, + nodeSep: edgeFreeDoc ? 1 : 50, + isMultiGraph: true + // ranksep: 5, + // nodesep: 1 + }); + } else { + graph.setGraph({ + rankdir: "TB", + multigraph: true, + compound: true, + // isCompound: true, + // acyclicer: 'greedy', + // ranker: 'longest-path' + ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor, + nodeSep: edgeFreeDoc ? 1 : 50, + ranker: "tight-tree", + // ranker: 'network-simplex' + isMultiGraph: true + }); + } + graph.setDefaultEdgeLabel(function() { + return {}; + }); + diagObj.db.extract(doc); + const states = diagObj.db.getStates(); + const relations = diagObj.db.getRelations(); + const keys2 = Object.keys(states); + for (const key of keys2) { + const stateDef = states[key]; + if (parentId) { + stateDef.parentId = parentId; + } + let node; + if (stateDef.doc) { + let sub = diagram2.append("g").attr("id", stateDef.id).attr("class", "stateGroup"); + node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj); + { + sub = addTitleAndBox(sub, stateDef, altBkg); + let boxBounds = sub.node().getBBox(); + node.width = boxBounds.width; + node.height = boxBounds.height + conf.padding / 2; + transformationLog[stateDef.id] = { y: conf.compositTitleSize }; + } + } else { + node = drawState(diagram2, stateDef); + } + if (stateDef.note) { + const noteDef = { + descriptions: [], + id: stateDef.id + "-note", + note: stateDef.note, + type: "note" + }; + const note = drawState(diagram2, noteDef); + if (stateDef.note.position === "left of") { + graph.setNode(node.id + "-note", note); + graph.setNode(node.id, node); + } else { + graph.setNode(node.id, node); + graph.setNode(node.id + "-note", note); + } + graph.setParent(node.id, node.id + "-group"); + graph.setParent(node.id + "-note", node.id + "-group"); + } else { + graph.setNode(node.id, node); + } + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Count=", graph.nodeCount(), graph); + let cnt = 0; + relations.forEach(function(relation) { + cnt++; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Setting edge", relation); + graph.setEdge( + relation.id1, + relation.id2, + { + relation, + width: getLabelWidth(relation.title), + height: conf.labelHeight * _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.e.getRows(relation.title).length, + labelpos: "c" + }, + "id" + cnt + ); + }); + (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__/* .layout */ .Zp)(graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Graph after layout", graph.nodes()); + const svgElem = diagram2.node(); + graph.nodes().forEach(function(v) { + if (v !== void 0 && graph.node(v) !== void 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.warn("Node " + v + ": " + JSON.stringify(graph.node(v))); + root.select("#" + svgElem.id + " #" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + " )" + ); + root.select("#" + svgElem.id + " #" + v).attr("data-x-shift", graph.node(v).x - graph.node(v).width / 2); + const dividers = domDocument.querySelectorAll("#" + svgElem.id + " #" + v + " .divider"); + dividers.forEach((divider) => { + const parent = divider.parentElement; + let pWidth = 0; + let pShift = 0; + if (parent) { + if (parent.parentElement) { + pWidth = parent.parentElement.getBBox().width; + } + pShift = parseInt(parent.getAttribute("data-x-shift"), 10); + if (Number.isNaN(pShift)) { + pShift = 0; + } + } + divider.setAttribute("x1", 0 - pShift + 8); + divider.setAttribute("x2", pWidth - pShift - 8); + }); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("No Node " + v + ": " + JSON.stringify(graph.node(v))); + } + }); + let stateBox = svgElem.getBBox(); + graph.edges().forEach(function(e) { + if (e !== void 0 && graph.edge(e) !== void 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); + drawEdge(diagram2, graph.edge(e), graph.edge(e).relation); + } + }); + stateBox = svgElem.getBBox(); + const stateInfo = { + id: parentId ? parentId : "root", + label: parentId ? parentId : "root", + width: 0, + height: 0 + }; + stateInfo.width = stateBox.width + 2 * conf.padding; + stateInfo.height = stateBox.height + 2 * conf.padding; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Doc rendered", stateInfo, graph); + return stateInfo; +}; +const renderer = { + setConf, + draw +}; +const diagram = { + parser: _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.p, + db: _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.d, + renderer, + styles: _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.s, + init: (cnf) => { + if (!cnf.state) { + cnf.state = {}; + } + cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.d.clear(); + } +}; + + + +/***/ }), + +/***/ 6292: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ D: () => (/* binding */ DEFAULT_STATE_TYPE), +/* harmony export */ S: () => (/* binding */ STMT_RELATION), +/* harmony export */ a: () => (/* binding */ DIVIDER_TYPE), +/* harmony export */ b: () => (/* binding */ STMT_STATE), +/* harmony export */ c: () => (/* binding */ DEFAULT_NESTED_DOC_DIR), +/* harmony export */ d: () => (/* binding */ db), +/* harmony export */ p: () => (/* binding */ parser$1), +/* harmony export */ s: () => (/* binding */ styles) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6257); + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 15], $V7 = [1, 16], $V8 = [1, 17], $V9 = [1, 18], $Va = [1, 30], $Vb = [1, 19], $Vc = [1, 20], $Vd = [1, 21], $Ve = [1, 22], $Vf = [1, 23], $Vg = [1, 25], $Vh = [1, 26], $Vi = [1, 27], $Vj = [1, 28], $Vk = [1, 29], $Vl = [1, 32], $Vm = [1, 33], $Vn = [1, 34], $Vo = [1, 35], $Vp = [1, 31], $Vq = [1, 4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vr = [1, 4, 5, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vs = [4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SPACE": 4, "NL": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "classDefStatement": 10, "cssClassStatement": 11, "idStatement": 12, "DESCR": 13, "-->": 14, "HIDE_EMPTY": 15, "scale": 16, "WIDTH": 17, "COMPOSIT_STATE": 18, "STRUCT_START": 19, "STRUCT_STOP": 20, "STATE_DESCR": 21, "AS": 22, "ID": 23, "FORK": 24, "JOIN": 25, "CHOICE": 26, "CONCURRENT": 27, "note": 28, "notePosition": 29, "NOTE_TEXT": 30, "direction": 31, "acc_title": 32, "acc_title_value": 33, "acc_descr": 34, "acc_descr_value": 35, "acc_descr_multiline_value": 36, "classDef": 37, "CLASSDEF_ID": 38, "CLASSDEF_STYLEOPTS": 39, "DEFAULT": 40, "class": 41, "CLASSENTITY_IDS": 42, "STYLECLASS": 43, "direction_tb": 44, "direction_bt": 45, "direction_rl": 46, "direction_lr": 47, "eol": 48, ";": 49, "EDGE_STATE": 50, "STYLE_SEPARATOR": 51, "left_of": 52, "right_of": 53, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 13: "DESCR", 14: "-->", 15: "HIDE_EMPTY", 16: "scale", 17: "WIDTH", 18: "COMPOSIT_STATE", 19: "STRUCT_START", 20: "STRUCT_STOP", 21: "STATE_DESCR", 22: "AS", 23: "ID", 24: "FORK", 25: "JOIN", 26: "CHOICE", 27: "CONCURRENT", 28: "note", 30: "NOTE_TEXT", 32: "acc_title", 33: "acc_title_value", 34: "acc_descr", 35: "acc_descr_value", 36: "acc_descr_multiline_value", 37: "classDef", 38: "CLASSDEF_ID", 39: "CLASSDEF_STYLEOPTS", 40: "DEFAULT", 41: "class", 42: "CLASSENTITY_IDS", 43: "STYLECLASS", 44: "direction_tb", 45: "direction_bt", 46: "direction_rl", 47: "direction_lr", 49: ";", 50: "EDGE_STATE", 51: "STYLE_SEPARATOR", 52: "left_of", 53: "right_of" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [10, 3], [10, 3], [11, 3], [31, 1], [31, 1], [31, 1], [31, 1], [48, 1], [48, 1], [12, 1], [12, 1], [12, 3], [12, 3], [29, 1], [29, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setRootDoc($$[$0]); + return $$[$0]; + case 4: + this.$ = []; + break; + case 5: + if ($$[$0] != "nl") { + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + } + break; + case 6: + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = "nl"; + break; + case 11: + this.$ = $$[$0]; + break; + case 12: + const stateStmt = $$[$0 - 1]; + stateStmt.description = yy.trimColon($$[$0]); + this.$ = stateStmt; + break; + case 13: + this.$ = { stmt: "relation", state1: $$[$0 - 2], state2: $$[$0] }; + break; + case 14: + const relDescription = yy.trimColon($$[$0]); + this.$ = { stmt: "relation", state1: $$[$0 - 3], state2: $$[$0 - 1], description: relDescription }; + break; + case 18: + this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: "", doc: $$[$0 - 1] }; + break; + case 19: + var id = $$[$0]; + var description = $$[$0 - 2].trim(); + if ($$[$0].match(":")) { + var parts = $$[$0].split(":"); + id = parts[0]; + description = [description, parts[1]]; + } + this.$ = { stmt: "state", id, type: "default", description }; + break; + case 20: + this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: $$[$0 - 5], doc: $$[$0 - 1] }; + break; + case 21: + this.$ = { stmt: "state", id: $$[$0], type: "fork" }; + break; + case 22: + this.$ = { stmt: "state", id: $$[$0], type: "join" }; + break; + case 23: + this.$ = { stmt: "state", id: $$[$0], type: "choice" }; + break; + case 24: + this.$ = { stmt: "state", id: yy.getDividerId(), type: "divider" }; + break; + case 25: + this.$ = { stmt: "state", id: $$[$0 - 1].trim(), note: { position: $$[$0 - 2].trim(), text: $$[$0].trim() } }; + break; + case 28: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 29: + case 30: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 31: + case 32: + this.$ = { stmt: "classDef", id: $$[$0 - 1].trim(), classes: $$[$0].trim() }; + break; + case 33: + this.$ = { stmt: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() }; + break; + case 34: + yy.setDirection("TB"); + this.$ = { stmt: "dir", value: "TB" }; + break; + case 35: + yy.setDirection("BT"); + this.$ = { stmt: "dir", value: "BT" }; + break; + case 36: + yy.setDirection("RL"); + this.$ = { stmt: "dir", value: "RL" }; + break; + case 37: + yy.setDirection("LR"); + this.$ = { stmt: "dir", value: "LR" }; + break; + case 40: + case 41: + this.$ = { stmt: "state", id: $$[$0].trim(), type: "default", description: "" }; + break; + case 42: + this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; + break; + case 43: + this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; + break; + } + }, + table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 15, 16, 18, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 5]), { 9: 36, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 7]), o($Vq, [2, 8]), o($Vq, [2, 9]), o($Vq, [2, 10]), o($Vq, [2, 11], { 13: [1, 37], 14: [1, 38] }), o($Vq, [2, 15]), { 17: [1, 39] }, o($Vq, [2, 17], { 19: [1, 40] }), { 22: [1, 41] }, o($Vq, [2, 21]), o($Vq, [2, 22]), o($Vq, [2, 23]), o($Vq, [2, 24]), { 29: 42, 30: [1, 43], 52: [1, 44], 53: [1, 45] }, o($Vq, [2, 27]), { 33: [1, 46] }, { 35: [1, 47] }, o($Vq, [2, 30]), { 38: [1, 48], 40: [1, 49] }, { 42: [1, 50] }, o($Vr, [2, 40], { 51: [1, 51] }), o($Vr, [2, 41], { 51: [1, 52] }), o($Vq, [2, 34]), o($Vq, [2, 35]), o($Vq, [2, 36]), o($Vq, [2, 37]), o($Vq, [2, 6]), o($Vq, [2, 12]), { 12: 53, 23: $Va, 50: $Vp }, o($Vq, [2, 16]), o($Vs, $V3, { 7: 54 }), { 23: [1, 55] }, { 23: [1, 56] }, { 22: [1, 57] }, { 23: [2, 44] }, { 23: [2, 45] }, o($Vq, [2, 28]), o($Vq, [2, 29]), { 39: [1, 58] }, { 39: [1, 59] }, { 43: [1, 60] }, { 23: [1, 61] }, { 23: [1, 62] }, o($Vq, [2, 13], { 13: [1, 63] }), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 64], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 19], { 19: [1, 65] }), { 30: [1, 66] }, { 23: [1, 67] }, o($Vq, [2, 31]), o($Vq, [2, 32]), o($Vq, [2, 33]), o($Vr, [2, 42]), o($Vr, [2, 43]), o($Vq, [2, 14]), o($Vq, [2, 18]), o($Vs, $V3, { 7: 68 }), o($Vq, [2, 25]), o($Vq, [2, 26]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 69], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 20])], + defaultActions: { 5: [2, 1], 6: [2, 2], 44: [2, 44], 45: [2, 45] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 40; + case 1: + return 44; + case 2: + return 45; + case 3: + return 46; + case 4: + return 47; + case 5: + break; + case 6: + break; + case 7: + return 5; + case 8: + break; + case 9: + break; + case 10: + break; + case 11: + break; + case 12: + this.pushState("SCALE"); + return 16; + case 13: + return 17; + case 14: + this.popState(); + break; + case 15: + this.begin("acc_title"); + return 32; + case 16: + this.popState(); + return "acc_title_value"; + case 17: + this.begin("acc_descr"); + return 34; + case 18: + this.popState(); + return "acc_descr_value"; + case 19: + this.begin("acc_descr_multiline"); + break; + case 20: + this.popState(); + break; + case 21: + return "acc_descr_multiline_value"; + case 22: + this.pushState("CLASSDEF"); + return 37; + case 23: + this.popState(); + this.pushState("CLASSDEFID"); + return "DEFAULT_CLASSDEF_ID"; + case 24: + this.popState(); + this.pushState("CLASSDEFID"); + return 38; + case 25: + this.popState(); + return 39; + case 26: + this.pushState("CLASS"); + return 41; + case 27: + this.popState(); + this.pushState("CLASS_STYLE"); + return 42; + case 28: + this.popState(); + return 43; + case 29: + this.pushState("SCALE"); + return 16; + case 30: + return 17; + case 31: + this.popState(); + break; + case 32: + this.pushState("STATE"); + break; + case 33: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 24; + case 34: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 25; + case 35: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -10).trim(); + return 26; + case 36: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 24; + case 37: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 25; + case 38: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -10).trim(); + return 26; + case 39: + return 44; + case 40: + return 45; + case 41: + return 46; + case 42: + return 47; + case 43: + this.pushState("STATE_STRING"); + break; + case 44: + this.pushState("STATE_ID"); + return "AS"; + case 45: + this.popState(); + return "ID"; + case 46: + this.popState(); + break; + case 47: + return "STATE_DESCR"; + case 48: + return 18; + case 49: + this.popState(); + break; + case 50: + this.popState(); + this.pushState("struct"); + return 19; + case 51: + break; + case 52: + this.popState(); + return 20; + case 53: + break; + case 54: + this.begin("NOTE"); + return 28; + case 55: + this.popState(); + this.pushState("NOTE_ID"); + return 52; + case 56: + this.popState(); + this.pushState("NOTE_ID"); + return 53; + case 57: + this.popState(); + this.pushState("FLOATING_NOTE"); + break; + case 58: + this.popState(); + this.pushState("FLOATING_NOTE_ID"); + return "AS"; + case 59: + break; + case 60: + return "NOTE_TEXT"; + case 61: + this.popState(); + return "ID"; + case 62: + this.popState(); + this.pushState("NOTE_TEXT"); + return 23; + case 63: + this.popState(); + yy_.yytext = yy_.yytext.substr(2).trim(); + return 30; + case 64: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 30; + case 65: + return 6; + case 66: + return 6; + case 67: + return 15; + case 68: + return 50; + case 69: + return 23; + case 70: + yy_.yytext = yy_.yytext.trim(); + return 13; + case 71: + return 14; + case 72: + return 27; + case 73: + return 51; + case 74: + return 5; + case 75: + return "INVALID"; + } + }, + rules: [/^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<<fork>>)/i, /^(?:.*<<join>>)/i, /^(?:.*<<choice>>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "LINE": { "rules": [9, 10], "inclusive": false }, "struct": { "rules": [9, 10, 22, 26, 32, 39, 40, 41, 42, 51, 52, 53, 54, 68, 69, 70, 71, 72], "inclusive": false }, "FLOATING_NOTE_ID": { "rules": [61], "inclusive": false }, "FLOATING_NOTE": { "rules": [58, 59, 60], "inclusive": false }, "NOTE_TEXT": { "rules": [63, 64], "inclusive": false }, "NOTE_ID": { "rules": [62], "inclusive": false }, "NOTE": { "rules": [55, 56, 57], "inclusive": false }, "CLASS_STYLE": { "rules": [28], "inclusive": false }, "CLASS": { "rules": [27], "inclusive": false }, "CLASSDEFID": { "rules": [25], "inclusive": false }, "CLASSDEF": { "rules": [23, 24], "inclusive": false }, "acc_descr_multiline": { "rules": [20, 21], "inclusive": false }, "acc_descr": { "rules": [18], "inclusive": false }, "acc_title": { "rules": [16], "inclusive": false }, "SCALE": { "rules": [13, 14, 30, 31], "inclusive": false }, "ALIAS": { "rules": [], "inclusive": false }, "STATE_ID": { "rules": [45], "inclusive": false }, "STATE_STRING": { "rules": [46, 47], "inclusive": false }, "FORK_STATE": { "rules": [], "inclusive": false }, "STATE": { "rules": [9, 10, 33, 34, 35, 36, 37, 38, 43, 44, 48, 49, 50], "inclusive": false }, "ID": { "rules": [9, 10], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 17, 19, 22, 26, 29, 32, 50, 54, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const DEFAULT_DIAGRAM_DIRECTION = "LR"; +const DEFAULT_NESTED_DOC_DIR = "TB"; +const STMT_STATE = "state"; +const STMT_RELATION = "relation"; +const STMT_CLASSDEF = "classDef"; +const STMT_APPLYCLASS = "applyClass"; +const DEFAULT_STATE_TYPE = "default"; +const DIVIDER_TYPE = "divider"; +const START_NODE = "[*]"; +const START_TYPE = "start"; +const END_NODE = START_NODE; +const END_TYPE = "end"; +const COLOR_KEYWORD = "color"; +const FILL_KEYWORD = "fill"; +const BG_FILL = "bgFill"; +const STYLECLASS_SEP = ","; +function newClassesList() { + return {}; +} +let direction = DEFAULT_DIAGRAM_DIRECTION; +let rootDoc = []; +let classes = newClassesList(); +const newDoc = () => { + return { + relations: [], + states: {}, + documents: {} + }; +}; +let documents = { + root: newDoc() +}; +let currentDocument = documents.root; +let startEndCount = 0; +let dividerCnt = 0; +const lineType = { + LINE: 0, + DOTTED_LINE: 1 +}; +const relationType = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3 +}; +const clone = (o) => JSON.parse(JSON.stringify(o)); +const setRootDoc = (o) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting root doc", o); + rootDoc = o; +}; +const getRootDoc = () => rootDoc; +const docTranslator = (parent, node, first) => { + if (node.stmt === STMT_RELATION) { + docTranslator(parent, node.state1, true); + docTranslator(parent, node.state2, false); + } else { + if (node.stmt === STMT_STATE) { + if (node.id === "[*]") { + node.id = first ? parent.id + "_start" : parent.id + "_end"; + node.start = first; + } else { + node.id = node.id.trim(); + } + } + if (node.doc) { + const doc = []; + let currentDoc = []; + let i; + for (i = 0; i < node.doc.length; i++) { + if (node.doc[i].type === DIVIDER_TYPE) { + const newNode = clone(node.doc[i]); + newNode.doc = clone(currentDoc); + doc.push(newNode); + currentDoc = []; + } else { + currentDoc.push(node.doc[i]); + } + } + if (doc.length > 0 && currentDoc.length > 0) { + const newNode = { + stmt: STMT_STATE, + id: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.I)(), + type: "divider", + doc: clone(currentDoc) + }; + doc.push(clone(newNode)); + node.doc = doc; + } + node.doc.forEach((docNode) => docTranslator(node, docNode, true)); + } + } +}; +const getRootDocV2 = () => { + docTranslator({ id: "root" }, { id: "root", doc: rootDoc }, true); + return { id: "root", doc: rootDoc }; +}; +const extract = (_doc) => { + let doc; + if (_doc.doc) { + doc = _doc.doc; + } else { + doc = _doc; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info(doc); + clear(true); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Extract", doc); + doc.forEach((item) => { + switch (item.stmt) { + case STMT_STATE: + addState( + item.id.trim(), + item.type, + item.doc, + item.description, + item.note, + item.classes, + item.styles, + item.textStyles + ); + break; + case STMT_RELATION: + addRelation(item.state1, item.state2, item.description); + break; + case STMT_CLASSDEF: + addStyleClass(item.id.trim(), item.classes); + break; + case STMT_APPLYCLASS: + setCssClass(item.id.trim(), item.styleClass); + break; + } + }); +}; +const addState = function(id, type = DEFAULT_STATE_TYPE, doc = null, descr = null, note = null, classes2 = null, styles2 = null, textStyles = null) { + const trimmedId = id == null ? void 0 : id.trim(); + if (currentDocument.states[trimmedId] === void 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Adding state ", trimmedId, descr); + currentDocument.states[trimmedId] = { + id: trimmedId, + descriptions: [], + type, + doc, + note, + classes: [], + styles: [], + textStyles: [] + }; + } else { + if (!currentDocument.states[trimmedId].doc) { + currentDocument.states[trimmedId].doc = doc; + } + if (!currentDocument.states[trimmedId].type) { + currentDocument.states[trimmedId].type = type; + } + } + if (descr) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state description", trimmedId, descr); + if (typeof descr === "string") { + addDescription(trimmedId, descr.trim()); + } + if (typeof descr === "object") { + descr.forEach((des) => addDescription(trimmedId, des.trim())); + } + } + if (note) { + currentDocument.states[trimmedId].note = note; + currentDocument.states[trimmedId].note.text = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText( + currentDocument.states[trimmedId].note.text, + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.c)() + ); + } + if (classes2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state classes", trimmedId, classes2); + const classesList = typeof classes2 === "string" ? [classes2] : classes2; + classesList.forEach((cssClass) => setCssClass(trimmedId, cssClass.trim())); + } + if (styles2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state styles", trimmedId, styles2); + const stylesList = typeof styles2 === "string" ? [styles2] : styles2; + stylesList.forEach((style) => setStyle(trimmedId, style.trim())); + } + if (textStyles) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state styles", trimmedId, styles2); + const textStylesList = typeof textStyles === "string" ? [textStyles] : textStyles; + textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim())); + } +}; +const clear = function(saveCommon) { + documents = { + root: newDoc() + }; + currentDocument = documents.root; + startEndCount = 0; + classes = newClassesList(); + if (!saveCommon) { + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.v)(); + } +}; +const getState = function(id) { + return currentDocument.states[id]; +}; +const getStates = function() { + return currentDocument.states; +}; +const logDocuments = function() { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Documents = ", documents); +}; +const getRelations = function() { + return currentDocument.relations; +}; +function startIdIfNeeded(id = "") { + let fixedId = id; + if (id === START_NODE) { + startEndCount++; + fixedId = `${START_TYPE}${startEndCount}`; + } + return fixedId; +} +function startTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) { + return id === START_NODE ? START_TYPE : type; +} +function endIdIfNeeded(id = "") { + let fixedId = id; + if (id === END_NODE) { + startEndCount++; + fixedId = `${END_TYPE}${startEndCount}`; + } + return fixedId; +} +function endTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) { + return id === END_NODE ? END_TYPE : type; +} +function addRelationObjs(item1, item2, relationTitle) { + let id1 = startIdIfNeeded(item1.id.trim()); + let type1 = startTypeIfNeeded(item1.id.trim(), item1.type); + let id2 = startIdIfNeeded(item2.id.trim()); + let type2 = startTypeIfNeeded(item2.id.trim(), item2.type); + addState( + id1, + type1, + item1.doc, + item1.description, + item1.note, + item1.classes, + item1.styles, + item1.textStyles + ); + addState( + id2, + type2, + item2.doc, + item2.description, + item2.note, + item2.classes, + item2.styles, + item2.textStyles + ); + currentDocument.relations.push({ + id1, + id2, + relationTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText(relationTitle, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.c)()) + }); +} +const addRelation = function(item1, item2, title) { + if (typeof item1 === "object") { + addRelationObjs(item1, item2, title); + } else { + const id1 = startIdIfNeeded(item1.trim()); + const type1 = startTypeIfNeeded(item1); + const id2 = endIdIfNeeded(item2.trim()); + const type2 = endTypeIfNeeded(item2); + addState(id1, type1); + addState(id2, type2); + currentDocument.relations.push({ + id1, + id2, + title: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText(title, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.c)()) + }); + } +}; +const addDescription = function(id, descr) { + const theState = currentDocument.states[id]; + const _descr = descr.startsWith(":") ? descr.replace(":", "").trim() : descr; + theState.descriptions.push(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText(_descr, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.c)())); +}; +const cleanupLabel = function(label) { + if (label.substring(0, 1) === ":") { + return label.substr(2).trim(); + } else { + return label.trim(); + } +}; +const getDividerId = () => { + dividerCnt++; + return "divider-id-" + dividerCnt; +}; +const addStyleClass = function(id, styleAttributes = "") { + if (classes[id] === void 0) { + classes[id] = { id, styles: [], textStyles: [] }; + } + const foundClass = classes[id]; + if (styleAttributes !== void 0 && styleAttributes !== null) { + styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => { + const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim(); + if (attrib.match(COLOR_KEYWORD)) { + const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL); + const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD); + foundClass.textStyles.push(newStyle2); + } + foundClass.styles.push(fixedAttrib); + }); + } +}; +const getClasses = function() { + return classes; +}; +const setCssClass = function(itemIds, cssClassName) { + itemIds.split(",").forEach(function(id) { + let foundState = getState(id); + if (foundState === void 0) { + const trimmedId = id.trim(); + addState(trimmedId); + foundState = getState(trimmedId); + } + foundState.classes.push(cssClassName); + }); +}; +const setStyle = function(itemId, styleText) { + const item = getState(itemId); + if (item !== void 0) { + item.textStyles.push(styleText); + } +}; +const setTextStyle = function(itemId, cssClassName) { + const item = getState(itemId); + if (item !== void 0) { + item.textStyles.push(cssClassName); + } +}; +const getDirection = () => direction; +const setDirection = (dir) => { + direction = dir; +}; +const trimColon = (str) => str && str[0] === ":" ? str.substr(1).trim() : str.trim(); +const db = { + getConfig: () => (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.c)().state, + addState, + clear, + getState, + getStates, + getRelations, + getClasses, + getDirection, + addRelation, + getDividerId, + setDirection, + cleanupLabel, + lineType, + relationType, + logDocuments, + getRootDoc, + setRootDoc, + getRootDocV2, + extract, + trimColon, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.g, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.s, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.a, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.b, + addStyleClass, + setCssClass, + addDescription, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.t +}; +const getStyles = (options) => ` +defs #statediagram-barbEnd { + fill: ${options.transitionColor}; + stroke: ${options.transitionColor}; + } +g.stateGroup text { + fill: ${options.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${options.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${options.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; +} + +g.stateGroup line { + stroke: ${options.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${options.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${options.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${options.noteBorderColor}; + fill: ${options.noteBkgColor}; + + text { + fill: ${options.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${options.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${options.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel .label text { + fill: ${options.transitionLabelColor || options.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${options.transitionLabelColor || options.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${options.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${options.specialStateColor}; + stroke: ${options.specialStateColor}; +} + +.node .fork-join { + fill: ${options.specialStateColor}; + stroke: ${options.specialStateColor}; +} + +.node circle.state-end { + fill: ${options.innerEndBackground}; + stroke: ${options.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${options.compositeBackground || options.background}; + // stroke: ${options.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${options.stateBkg || options.mainBkg}; + stroke: ${options.stateBorder || options.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${options.mainBkg}; + stroke: ${options.stateBorder || options.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${options.lineColor}; +} + +.statediagram-cluster rect { + fill: ${options.compositeTitleBackground}; + stroke: ${options.stateBorder || options.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${options.stateLabelColor}; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${options.stateBorder || options.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${options.compositeBackground || options.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${options.altBackground ? options.altBackground : "#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${options.altBackground ? options.altBackground : "#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${options.noteBkgColor}; + stroke: ${options.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${options.noteBkgColor}; + stroke: ${options.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${options.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${options.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${options.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${options.lineColor}; + stroke: ${options.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; +} +`; +const styles = getStyles; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/6216.9c87e670.js b/assets/js/6216.9c87e670.js new file mode 100644 index 00000000..b9381dcb --- /dev/null +++ b/assets/js/6216.9c87e670.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[6216],{6216:(t,e,s)=>{s.d(e,{d:()=>st,f:()=>et,p:()=>r});var u=s(6312),i=s(6257),n=function(){var t=function(t,e,s,u){for(s=s||{},u=t.length;u--;s[t[u]]=e);return s},e=[1,4],s=[1,3],u=[1,5],i=[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],n=[2,2],r=[1,13],a=[1,14],c=[1,15],o=[1,16],l=[1,23],h=[1,25],A=[1,26],d=[1,27],p=[1,49],y=[1,48],E=[1,29],f=[1,30],g=[1,31],k=[1,32],D=[1,33],b=[1,44],F=[1,46],T=[1,42],C=[1,47],_=[1,43],B=[1,50],S=[1,45],m=[1,51],x=[1,52],v=[1,34],L=[1,35],I=[1,36],R=[1,37],$=[1,57],N=[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],O=[1,61],w=[1,60],P=[1,62],U=[8,9,11,73,75],V=[1,88],G=[1,93],M=[1,92],K=[1,89],Y=[1,85],j=[1,91],X=[1,87],z=[1,94],H=[1,90],W=[1,95],Q=[1,86],q=[8,9,10,11,73,75],Z=[8,9,10,11,44,73,75],J=[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],tt=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],et=[42,58,86,99,102,103,106,108,111,112,113],st=[1,121],ut=[1,120],it=[1,128],nt=[1,142],rt=[1,143],at=[1,144],ct=[1,145],ot=[1,130],lt=[1,132],ht=[1,136],At=[1,137],dt=[1,138],pt=[1,139],yt=[1,140],Et=[1,141],ft=[1,146],gt=[1,147],kt=[1,126],Dt=[1,127],bt=[1,134],Ft=[1,129],Tt=[1,133],Ct=[1,131],_t=[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],Bt=[1,149],St=[8,9,11],mt=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],xt=[1,169],vt=[1,165],Lt=[1,166],It=[1,170],Rt=[1,167],$t=[1,168],Nt=[75,113,116],Ot=[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],wt=[10,103],Pt=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],Ut=[1,235],Vt=[1,233],Gt=[1,237],Mt=[1,231],Kt=[1,232],Yt=[1,234],jt=[1,236],Xt=[1,238],zt=[1,255],Ht=[8,9,11,103],Wt=[8,9,10,11,58,81,102,103,106,107,108,109],Qt={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(t,e,s,u,i,n,r){var a=n.length-1;switch(i){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(n[a])||n[a].length>0)&&n[a-1].push(n[a]),this.$=n[a-1];break;case 4:case 176:case 49:case 71:case 174:this.$=n[a];break;case 11:u.setDirection("TB"),this.$="TB";break;case 12:u.setDirection(n[a-1]),this.$=n[a-1];break;case 27:this.$=n[a-1].nodes;break;case 33:this.$=u.addSubGraph(n[a-6],n[a-1],n[a-4]);break;case 34:this.$=u.addSubGraph(n[a-3],n[a-1],n[a-3]);break;case 35:this.$=u.addSubGraph(void 0,n[a-1],void 0);break;case 37:this.$=n[a].trim(),u.setAccTitle(this.$);break;case 38:case 39:this.$=n[a].trim(),u.setAccDescription(this.$);break;case 43:u.addLink(n[a-2].stmt,n[a],n[a-1]),this.$={stmt:n[a],nodes:n[a].concat(n[a-2].nodes)};break;case 44:u.addLink(n[a-3].stmt,n[a-1],n[a-2]),this.$={stmt:n[a-1],nodes:n[a-1].concat(n[a-3].nodes)};break;case 45:this.$={stmt:n[a-1],nodes:n[a-1]};break;case 46:this.$={stmt:n[a],nodes:n[a]};break;case 47:case 121:case 123:this.$=[n[a]];break;case 48:this.$=n[a-4].concat(n[a]);break;case 50:this.$=n[a-2],u.setClass(n[a-2],n[a]);break;case 51:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"square");break;case 52:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"doublecircle");break;case 53:this.$=n[a-5],u.addVertex(n[a-5],n[a-2],"circle");break;case 54:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"ellipse");break;case 55:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"stadium");break;case 56:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"subroutine");break;case 57:this.$=n[a-7],u.addVertex(n[a-7],n[a-1],"rect",void 0,void 0,void 0,Object.fromEntries([[n[a-5],n[a-3]]]));break;case 58:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"cylinder");break;case 59:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"round");break;case 60:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"diamond");break;case 61:this.$=n[a-5],u.addVertex(n[a-5],n[a-2],"hexagon");break;case 62:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"odd");break;case 63:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"trapezoid");break;case 64:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"inv_trapezoid");break;case 65:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"lean_right");break;case 66:this.$=n[a-3],u.addVertex(n[a-3],n[a-1],"lean_left");break;case 67:this.$=n[a],u.addVertex(n[a]);break;case 68:n[a-1].text=n[a],this.$=n[a-1];break;case 69:case 70:n[a-2].text=n[a-1],this.$=n[a-2];break;case 72:var c=u.destructLink(n[a],n[a-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:n[a-1]};break;case 73:case 79:case 94:case 96:this.$={text:n[a],type:"text"};break;case 74:case 80:case 95:this.$={text:n[a-1].text+""+n[a],type:n[a-1].type};break;case 75:case 81:this.$={text:n[a],type:"string"};break;case 76:case 82:case 97:this.$={text:n[a],type:"markdown"};break;case 77:c=u.destructLink(n[a]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 78:this.$=n[a-1];break;case 98:this.$=n[a-4],u.addClass(n[a-2],n[a]);break;case 99:this.$=n[a-4],u.setClass(n[a-2],n[a]);break;case 100:case 108:this.$=n[a-1],u.setClickEvent(n[a-1],n[a]);break;case 101:case 109:this.$=n[a-3],u.setClickEvent(n[a-3],n[a-2]),u.setTooltip(n[a-3],n[a]);break;case 102:this.$=n[a-2],u.setClickEvent(n[a-2],n[a-1],n[a]);break;case 103:this.$=n[a-4],u.setClickEvent(n[a-4],n[a-3],n[a-2]),u.setTooltip(n[a-4],n[a]);break;case 104:this.$=n[a-2],u.setLink(n[a-2],n[a]);break;case 105:this.$=n[a-4],u.setLink(n[a-4],n[a-2]),u.setTooltip(n[a-4],n[a]);break;case 106:this.$=n[a-4],u.setLink(n[a-4],n[a-2],n[a]);break;case 107:this.$=n[a-6],u.setLink(n[a-6],n[a-4],n[a]),u.setTooltip(n[a-6],n[a-2]);break;case 110:this.$=n[a-1],u.setLink(n[a-1],n[a]);break;case 111:this.$=n[a-3],u.setLink(n[a-3],n[a-2]),u.setTooltip(n[a-3],n[a]);break;case 112:this.$=n[a-3],u.setLink(n[a-3],n[a-2],n[a]);break;case 113:this.$=n[a-5],u.setLink(n[a-5],n[a-4],n[a]),u.setTooltip(n[a-5],n[a-2]);break;case 114:this.$=n[a-4],u.addVertex(n[a-2],void 0,void 0,n[a]);break;case 115:this.$=n[a-4],u.updateLink([n[a-2]],n[a]);break;case 116:this.$=n[a-4],u.updateLink(n[a-2],n[a]);break;case 117:this.$=n[a-8],u.updateLinkInterpolate([n[a-6]],n[a-2]),u.updateLink([n[a-6]],n[a]);break;case 118:this.$=n[a-8],u.updateLinkInterpolate(n[a-6],n[a-2]),u.updateLink(n[a-6],n[a]);break;case 119:this.$=n[a-6],u.updateLinkInterpolate([n[a-4]],n[a]);break;case 120:this.$=n[a-6],u.updateLinkInterpolate(n[a-4],n[a]);break;case 122:case 124:n[a-2].push(n[a]),this.$=n[a-2];break;case 126:this.$=n[a-1]+n[a];break;case 175:case 177:this.$=n[a-1]+""+n[a];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"}}},table:[{3:1,4:2,9:e,10:s,12:u},{1:[3]},t(i,n,{5:6}),{4:7,9:e,10:s,12:u},{4:8,9:e,10:s,12:u},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:r,9:a,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:l,33:24,34:h,36:A,38:d,40:28,41:38,42:p,43:39,45:40,58:y,81:E,82:f,83:g,84:k,85:D,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x,118:v,119:L,120:I,121:R},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,54],9:[1,55],10:$,15:53,18:56},t(N,[2,3]),t(N,[2,4]),t(N,[2,5]),t(N,[2,6]),t(N,[2,7]),t(N,[2,8]),{8:O,9:w,11:P,21:58,39:59,70:63,73:[1,64],75:[1,65]},{8:O,9:w,11:P,21:66},{8:O,9:w,11:P,21:67},{8:O,9:w,11:P,21:68},{8:O,9:w,11:P,21:69},{8:O,9:w,11:P,21:70},{8:O,9:w,10:[1,71],11:P,21:72},t(N,[2,36]),{35:[1,73]},{37:[1,74]},t(N,[2,39]),t(U,[2,46],{18:75,10:$}),{10:[1,76]},{10:[1,77]},{10:[1,78]},{10:[1,79]},{14:V,42:G,58:M,77:[1,83],86:K,92:[1,80],94:[1,81],98:82,102:Y,103:j,106:X,108:z,111:H,112:W,113:Q,117:84},t(N,[2,178]),t(N,[2,179]),t(N,[2,180]),t(N,[2,181]),t(q,[2,47]),t(q,[2,49],{44:[1,96]}),t(Z,[2,67],{110:109,29:[1,97],42:p,46:[1,98],48:[1,99],50:[1,100],52:[1,101],54:[1,102],56:[1,103],58:y,61:[1,104],63:[1,105],65:[1,106],66:[1,107],68:[1,108],86:b,99:F,102:T,103:C,106:_,108:B,111:S,112:m,113:x}),t(J,[2,174]),t(J,[2,135]),t(J,[2,136]),t(J,[2,137]),t(J,[2,138]),t(J,[2,139]),t(J,[2,140]),t(J,[2,141]),t(J,[2,142]),t(J,[2,143]),t(J,[2,144]),t(J,[2,145]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,110]},t(tt,[2,26],{18:111,10:$}),t(N,[2,27]),{40:112,41:38,42:p,43:39,45:40,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},t(N,[2,40]),t(N,[2,41]),t(N,[2,42]),t(et,[2,71],{71:113,60:[1,115],72:[1,114]}),{74:116,76:117,77:[1,118],78:[1,119],113:st,116:ut},t([42,58,60,72,86,99,102,103,106,108,111,112,113],[2,77]),t(N,[2,28]),t(N,[2,29]),t(N,[2,30]),t(N,[2,31]),t(N,[2,32]),{10:it,12:nt,14:rt,27:at,28:122,32:ct,42:ot,58:lt,73:ht,77:[1,124],78:[1,125],80:135,81:At,82:dt,83:pt,84:yt,85:Et,86:ft,87:gt,88:123,102:kt,106:Dt,108:bt,111:Ft,112:Tt,113:Ct},t(_t,n,{5:148}),t(N,[2,37]),t(N,[2,38]),t(U,[2,45],{42:Bt}),{42:p,45:150,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},{99:[1,151],100:152,102:[1,153]},{42:p,45:154,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},{42:p,45:155,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},t(St,[2,100],{10:[1,156],93:[1,157]}),{77:[1,158]},t(St,[2,108],{117:160,10:[1,159],14:V,42:G,58:M,86:K,102:Y,103:j,106:X,108:z,111:H,112:W,113:Q}),t(St,[2,110],{10:[1,161]}),t(mt,[2,176]),t(mt,[2,163]),t(mt,[2,164]),t(mt,[2,165]),t(mt,[2,166]),t(mt,[2,167]),t(mt,[2,168]),t(mt,[2,169]),t(mt,[2,170]),t(mt,[2,171]),t(mt,[2,172]),t(mt,[2,173]),{42:p,45:162,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},{30:163,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:171,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:173,48:[1,172],65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:174,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:175,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:176,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{106:[1,177]},{30:178,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:179,63:[1,180],65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:181,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:182,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{30:183,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},t(J,[2,175]),t(i,[2,20]),t(tt,[2,25]),t(U,[2,43],{18:184,10:$}),t(et,[2,68],{10:[1,185]}),{10:[1,186]},{30:187,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{75:[1,188],76:189,113:st,116:ut},t(Nt,[2,73]),t(Nt,[2,75]),t(Nt,[2,76]),t(Nt,[2,161]),t(Nt,[2,162]),{8:O,9:w,10:it,11:P,12:nt,14:rt,21:191,27:at,29:[1,190],32:ct,42:ot,58:lt,73:ht,80:135,81:At,82:dt,83:pt,84:yt,85:Et,86:ft,87:gt,88:192,102:kt,106:Dt,108:bt,111:Ft,112:Tt,113:Ct},t(Ot,[2,94]),t(Ot,[2,96]),t(Ot,[2,97]),t(Ot,[2,150]),t(Ot,[2,151]),t(Ot,[2,152]),t(Ot,[2,153]),t(Ot,[2,154]),t(Ot,[2,155]),t(Ot,[2,156]),t(Ot,[2,157]),t(Ot,[2,158]),t(Ot,[2,159]),t(Ot,[2,160]),t(Ot,[2,83]),t(Ot,[2,84]),t(Ot,[2,85]),t(Ot,[2,86]),t(Ot,[2,87]),t(Ot,[2,88]),t(Ot,[2,89]),t(Ot,[2,90]),t(Ot,[2,91]),t(Ot,[2,92]),t(Ot,[2,93]),{6:11,7:12,8:r,9:a,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:l,32:[1,193],33:24,34:h,36:A,38:d,40:28,41:38,42:p,43:39,45:40,58:y,81:E,82:f,83:g,84:k,85:D,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x,118:v,119:L,120:I,121:R},{10:$,18:194},{10:[1,195],42:p,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:109,111:S,112:m,113:x},{10:[1,196]},{10:[1,197],103:[1,198]},t(wt,[2,121]),{10:[1,199],42:p,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:109,111:S,112:m,113:x},{10:[1,200],42:p,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:109,111:S,112:m,113:x},{77:[1,201]},t(St,[2,102],{10:[1,202]}),t(St,[2,104],{10:[1,203]}),{77:[1,204]},t(mt,[2,177]),{77:[1,205],95:[1,206]},t(q,[2,50],{110:109,42:p,58:y,86:b,99:F,102:T,103:C,106:_,108:B,111:S,112:m,113:x}),{31:[1,207],65:xt,79:208,113:It,114:Rt,115:$t},t(Pt,[2,79]),t(Pt,[2,81]),t(Pt,[2,82]),t(Pt,[2,146]),t(Pt,[2,147]),t(Pt,[2,148]),t(Pt,[2,149]),{47:[1,209],65:xt,79:208,113:It,114:Rt,115:$t},{30:210,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{49:[1,211],65:xt,79:208,113:It,114:Rt,115:$t},{51:[1,212],65:xt,79:208,113:It,114:Rt,115:$t},{53:[1,213],65:xt,79:208,113:It,114:Rt,115:$t},{55:[1,214],65:xt,79:208,113:It,114:Rt,115:$t},{58:[1,215]},{62:[1,216],65:xt,79:208,113:It,114:Rt,115:$t},{64:[1,217],65:xt,79:208,113:It,114:Rt,115:$t},{30:218,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},{31:[1,219],65:xt,79:208,113:It,114:Rt,115:$t},{65:xt,67:[1,220],69:[1,221],79:208,113:It,114:Rt,115:$t},{65:xt,67:[1,223],69:[1,222],79:208,113:It,114:Rt,115:$t},t(U,[2,44],{42:Bt}),t(et,[2,70]),t(et,[2,69]),{60:[1,224],65:xt,79:208,113:It,114:Rt,115:$t},t(et,[2,72]),t(Nt,[2,74]),{30:225,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},t(_t,n,{5:226}),t(Ot,[2,95]),t(N,[2,35]),{41:227,42:p,43:39,45:40,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},{10:Ut,58:Vt,81:Gt,89:228,102:Mt,104:229,105:230,106:Kt,107:Yt,108:jt,109:Xt},{10:Ut,58:Vt,81:Gt,89:239,101:[1,240],102:Mt,104:229,105:230,106:Kt,107:Yt,108:jt,109:Xt},{10:Ut,58:Vt,81:Gt,89:241,101:[1,242],102:Mt,104:229,105:230,106:Kt,107:Yt,108:jt,109:Xt},{102:[1,243]},{10:Ut,58:Vt,81:Gt,89:244,102:Mt,104:229,105:230,106:Kt,107:Yt,108:jt,109:Xt},{42:p,45:245,58:y,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x},t(St,[2,101]),{77:[1,246]},{77:[1,247],95:[1,248]},t(St,[2,109]),t(St,[2,111],{10:[1,249]}),t(St,[2,112]),t(Z,[2,51]),t(Pt,[2,80]),t(Z,[2,52]),{49:[1,250],65:xt,79:208,113:It,114:Rt,115:$t},t(Z,[2,59]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),{106:[1,251]},t(Z,[2,58]),t(Z,[2,60]),{64:[1,252],65:xt,79:208,113:It,114:Rt,115:$t},t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,65]),t(Z,[2,64]),t(Z,[2,66]),t([10,42,58,86,99,102,103,106,108,111,112,113],[2,78]),{31:[1,253],65:xt,79:208,113:It,114:Rt,115:$t},{6:11,7:12,8:r,9:a,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:l,32:[1,254],33:24,34:h,36:A,38:d,40:28,41:38,42:p,43:39,45:40,58:y,81:E,82:f,83:g,84:k,85:D,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x,118:v,119:L,120:I,121:R},t(q,[2,48]),t(St,[2,114],{103:zt}),t(Ht,[2,123],{105:256,10:Ut,58:Vt,81:Gt,102:Mt,106:Kt,107:Yt,108:jt,109:Xt}),t(Wt,[2,125]),t(Wt,[2,127]),t(Wt,[2,128]),t(Wt,[2,129]),t(Wt,[2,130]),t(Wt,[2,131]),t(Wt,[2,132]),t(Wt,[2,133]),t(Wt,[2,134]),t(St,[2,115],{103:zt}),{10:[1,257]},t(St,[2,116],{103:zt}),{10:[1,258]},t(wt,[2,122]),t(St,[2,98],{103:zt}),t(St,[2,99],{110:109,42:p,58:y,86:b,99:F,102:T,103:C,106:_,108:B,111:S,112:m,113:x}),t(St,[2,103]),t(St,[2,105],{10:[1,259]}),t(St,[2,106]),{95:[1,260]},{49:[1,261]},{60:[1,262]},{64:[1,263]},{8:O,9:w,11:P,21:264},t(N,[2,34]),{10:Ut,58:Vt,81:Gt,102:Mt,104:265,105:230,106:Kt,107:Yt,108:jt,109:Xt},t(Wt,[2,126]),{14:V,42:G,58:M,86:K,98:266,102:Y,103:j,106:X,108:z,111:H,112:W,113:Q,117:84},{14:V,42:G,58:M,86:K,98:267,102:Y,103:j,106:X,108:z,111:H,112:W,113:Q,117:84},{95:[1,268]},t(St,[2,113]),t(Z,[2,53]),{30:269,65:xt,77:vt,78:Lt,79:164,113:It,114:Rt,115:$t},t(Z,[2,61]),t(_t,n,{5:270}),t(Ht,[2,124],{105:256,10:Ut,58:Vt,81:Gt,102:Mt,106:Kt,107:Yt,108:jt,109:Xt}),t(St,[2,119],{117:160,10:[1,271],14:V,42:G,58:M,86:K,102:Y,103:j,106:X,108:z,111:H,112:W,113:Q}),t(St,[2,120],{117:160,10:[1,272],14:V,42:G,58:M,86:K,102:Y,103:j,106:X,108:z,111:H,112:W,113:Q}),t(St,[2,107]),{31:[1,273],65:xt,79:208,113:It,114:Rt,115:$t},{6:11,7:12,8:r,9:a,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:l,32:[1,274],33:24,34:h,36:A,38:d,40:28,41:38,42:p,43:39,45:40,58:y,81:E,82:f,83:g,84:k,85:D,86:b,99:F,102:T,103:C,106:_,108:B,110:41,111:S,112:m,113:x,118:v,119:L,120:I,121:R},{10:Ut,58:Vt,81:Gt,89:275,102:Mt,104:229,105:230,106:Kt,107:Yt,108:jt,109:Xt},{10:Ut,58:Vt,81:Gt,89:276,102:Mt,104:229,105:230,106:Kt,107:Yt,108:jt,109:Xt},t(Z,[2,57]),t(N,[2,33]),t(St,[2,117],{103:zt}),t(St,[2,118],{103:zt})],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},parse:function(t){var e=this,s=[0],u=[],i=[null],n=[],r=this.table,a="",c=0,o=0,l=n.slice.call(arguments,1),h=Object.create(this.lexer),A={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(A.yy[d]=this.yy[d]);h.setInput(t,A.yy),A.yy.lexer=h,A.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var p=h.yylloc;n.push(p);var y=h.options&&h.options.ranges;"function"==typeof A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var E,f,g,k,D,b,F,T,C,_={};;){if(f=s[s.length-1],this.defaultActions[f]?g=this.defaultActions[f]:(null==E&&(C=void 0,"number"!=typeof(C=u.pop()||h.lex()||1)&&(C instanceof Array&&(C=(u=C).pop()),C=e.symbols_[C]||C),E=C),g=r[f]&&r[f][E]),void 0===g||!g.length||!g[0]){var B="";for(D in T=[],r[f])this.terminals_[D]&&D>2&&T.push("'"+this.terminals_[D]+"'");B=h.showPosition?"Parse error on line "+(c+1)+":\n"+h.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[E]||E)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==E?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(B,{text:h.match,token:this.terminals_[E]||E,line:h.yylineno,loc:p,expected:T})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+E);switch(g[0]){case 1:s.push(E),i.push(h.yytext),n.push(h.yylloc),s.push(g[1]),E=null,o=h.yyleng,a=h.yytext,c=h.yylineno,p=h.yylloc;break;case 2:if(b=this.productions_[g[1]][1],_.$=i[i.length-b],_._$={first_line:n[n.length-(b||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(b||1)].first_column,last_column:n[n.length-1].last_column},y&&(_._$.range=[n[n.length-(b||1)].range[0],n[n.length-1].range[1]]),void 0!==(k=this.performAction.apply(_,[a,o,c,A.yy,g[1],i,n].concat(l))))return k;b&&(s=s.slice(0,-1*b*2),i=i.slice(0,-1*b),n=n.slice(0,-1*b)),s.push(this.productions_[g[1]][0]),i.push(_.$),n.push(_._$),F=r[s[s.length-2]][s[s.length-1]],s.push(F);break;case 3:return!0}}return!0}},qt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var u=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),s.length-1&&(this.yylineno-=s.length-1);var i=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:s?(s.length===u.length?this.yylloc.first_column:0)+u[u.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var s,u,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(u=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var n in i)this[n]=i[n];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,s,u;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),n=0;n<i.length;n++)if((s=this._input.match(this.rules[i[n]]))&&(!e||s[0].length>e[0].length)){if(e=s,u=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,i[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[u]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,s,u){switch(s){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:case 8:case 11:case 14:case 17:case 27:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:this.begin("callbackname");break;case 9:this.popState(),this.begin("callbackargs");break;case 10:return 92;case 12:return 93;case 13:return"MD_STR";case 15:this.begin("md_string");break;case 16:return"STR";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 28:return 85;case 29:case 30:case 31:return t.lex.firstGraph()&&this.begin("dir"),12;case 32:return 27;case 33:return 32;case 34:case 35:case 36:case 37:return 95;case 38:return this.popState(),13;case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47: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:case 95:return 108;case 55:return 44;case 56:return 58;case 57:case 96:return 42;case 58:return 8;case 59:return 103;case 60:case 94:return 112;case 61:case 64:case 67:return this.popState(),75;case 62:return this.pushState("edgeText"),73;case 63:case 66:case 69:return 116;case 65:return this.pushState("thickEdgeText"),73;case 68:return this.pushState("dottedEdgeText"),73;case 70:return 75;case 71:return this.popState(),51;case 72:case 108: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 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 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}}};function Zt(){this.yy={}}return Qt.lexer=qt,Zt.prototype=Qt,Qt.Parser=Zt,new Zt}();n.parser=n;const r=n;let a,c,o=0,l=(0,i.c)(),h={},A=[],d={},p=[],y={},E={},f=0,g=!0,k=[];const D=t=>i.e.sanitizeText(t,l),b=function(t){const e=Object.keys(h);for(const s of e)if(h[s].id===t)return h[s].domId;return t},F=function(t,e,s,u,n,r,a={}){let c,A=t;void 0!==A&&0!==A.trim().length&&(void 0===h[A]&&(h[A]={id:A,labelType:"text",domId:"flowchart-"+A+"-"+o,styles:[],classes:[]}),o++,void 0!==e?(l=(0,i.c)(),c=D(e.text.trim()),h[A].labelType=e.type,'"'===c[0]&&'"'===c[c.length-1]&&(c=c.substring(1,c.length-1)),h[A].text=c):void 0===h[A].text&&(h[A].text=t),void 0!==s&&(h[A].type=s),null!=u&&u.forEach((function(t){h[A].styles.push(t)})),null!=n&&n.forEach((function(t){h[A].classes.push(t)})),void 0!==r&&(h[A].dir=r),void 0===h[A].props?h[A].props=a:void 0!==a&&Object.assign(h[A].props,a))},T=function(t,e,s){const u={start:t,end:e,type:void 0,text:"",labelType:"text"};i.l.info("abc78 Got edge...",u);const n=s.text;if(void 0!==n&&(u.text=D(n.text.trim()),'"'===u.text[0]&&'"'===u.text[u.text.length-1]&&(u.text=u.text.substring(1,u.text.length-1)),u.labelType=n.type),void 0!==s&&(u.type=s.type,u.stroke=s.stroke,u.length=s.length),(null==u?void 0:u.length)>10&&(u.length=10),!(A.length<(l.maxEdges??500)))throw new Error(`Edge limit exceeded. ${A.length} edges found, but the limit is ${l.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);i.l.info("abc78 pushing edge..."),A.push(u)},C=function(t,e,s){let u,n;for(i.l.info("addLink (abc78)",t,e,s),u=0;u<t.length;u++)for(n=0;n<e.length;n++)T(t[u],e[n],s)},_=function(t,e){t.forEach((function(t){"default"===t?A.defaultInterpolate=e:A[t].interpolate=e}))},B=function(t,e){t.forEach((function(t){if(t>=A.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${A.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?A.defaultStyle=e:(-1===i.u.isSubstringInArray("fill",e)&&e.push("fill:none"),A[t].style=e)}))},S=function(t,e){t.split(",").forEach((function(t){void 0===d[t]&&(d[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){const s=e.replace("fill","bgFill").replace("color","fill");d[t].textStyles.push(s)}d[t].styles.push(e)}))}))},m=function(t){a=t,a.match(/.*</)&&(a="RL"),a.match(/.*\^/)&&(a="BT"),a.match(/.*>/)&&(a="LR"),a.match(/.*v/)&&(a="TB"),"TD"===a&&(a="TB")},x=function(t,e){t.split(",").forEach((function(t){let s=t;void 0!==h[s]&&h[s].classes.push(e),void 0!==y[s]&&y[s].classes.push(e)}))},v=function(t,e,s){t.split(",").forEach((function(t){void 0!==h[t]&&(h[t].link=i.u.formatUrl(e,l),h[t].linkTarget=s)})),x(t,"clickable")},L=function(t){if(E.hasOwnProperty(t))return E[t]},I=function(t,e,s){t.split(",").forEach((function(t){!function(t,e,s){let u=b(t);if("loose"!==(0,i.c)().securityLevel)return;if(void 0===e)return;let n=[];if("string"==typeof s){n=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<n.length;t++){let e=n[t].trim();'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substr(1,e.length-2)),n[t]=e}}0===n.length&&n.push(t),void 0!==h[t]&&(h[t].haveCallback=!0,k.push((function(){const t=document.querySelector(`[id="${u}"]`);null!==t&&t.addEventListener("click",(function(){i.u.runFunc(e,...n)}),!1)})))}(t,e,s)})),x(t,"clickable")},R=function(t){k.forEach((function(e){e(t)}))},$=function(){return a.trim()},N=function(){return h},O=function(){return A},w=function(){return d},P=function(t){let e=(0,u.Ltv)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=(0,u.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0));(0,u.Ltv)(t).select("svg").selectAll("g.node").on("mouseover",(function(){const t=(0,u.Ltv)(this);if(null===t.attr("title"))return;const s=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+s.left+(s.right-s.left)/2+"px").style("top",window.scrollY+s.bottom+"px"),e.html(e.html().replace(/<br\/>/g,"<br/>")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,u.Ltv)(this).classed("hover",!1)}))};k.push(P);const U=function(t="gen-1"){h={},d={},A=[],k=[P],p=[],y={},f=0,E={},g=!0,c=t,l=(0,i.c)(),(0,i.v)()},V=t=>{c=t||"gen-2"},G=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},M=function(t,e,s){let u=t.text.trim(),n=s.text;t===s&&s.text.match(/\s/)&&(u=void 0);let r=[];const{nodeList:a,dir:o}=function(t){const e={boolean:{},number:{},string:{}},s=[];let u;return{nodeList:t.filter((function(t){const i=typeof t;return t.stmt&&"dir"===t.stmt?(u=t.value,!1):""!==t.trim()&&(i in e?!e[i].hasOwnProperty(t)&&(e[i][t]=!0):!s.includes(t)&&s.push(t))})),dir:u}}(r.concat.apply(r,e));if(r=a,"gen-1"===c)for(let i=0;i<r.length;i++)r[i]=b(r[i]);u=u||"subGraph"+f,n=n||"",n=D(n),f+=1;const l={id:u,nodes:r,title:n.trim(),classes:[],dir:o,labelType:s.type};return i.l.info("Adding",l.id,l.nodes,l.dir),l.nodes=J(l,p).nodes,p.push(l),y[u]=l,u},K=function(t){for(const[e,s]of p.entries())if(s.id===t)return e;return-1};let Y=-1;const j=[],X=function(t,e){const s=p[e].nodes;if(Y+=1,Y>2e3)return;if(j[Y]=e,p[e].id===t)return{result:!0,count:0};let u=0,i=1;for(;u<s.length;){const e=K(s[u]);if(e>=0){const s=X(t,e);if(s.result)return{result:!0,count:i+s.count};i+=s.count}u+=1}return{result:!1,count:i}},z=function(t){return j[t]},H=function(){Y=-1,p.length>0&&X("none",p.length-1)},W=function(){return p},Q=()=>!!g&&(g=!1,!0),q=(t,e)=>{const s=(t=>{const e=t.trim();let s=e.slice(0,-1),u="arrow_open";switch(e.slice(-1)){case"x":u="arrow_cross","x"===e[0]&&(u="double_"+u,s=s.slice(1));break;case">":u="arrow_point","<"===e[0]&&(u="double_"+u,s=s.slice(1));break;case"o":u="arrow_circle","o"===e[0]&&(u="double_"+u,s=s.slice(1))}let i="normal",n=s.length-1;"="===s[0]&&(i="thick"),"~"===s[0]&&(i="invisible");let r=((t,e)=>{const s=e.length;let u=0;for(let i=0;i<s;++i)e[i]===t&&++u;return u})(".",s);return r&&(i="dotted",n=r),{type:u,stroke:i,length:n}})(t);let u;if(e){if(u=(t=>{let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let u="normal";return e.includes("=")&&(u="thick"),e.includes(".")&&(u="dotted"),{type:s,stroke:u}})(e),u.stroke!==s.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===u.type)u.type=s.type;else{if(u.type!==s.type)return{type:"INVALID",stroke:"INVALID"};u.type="double_"+u.type}return"double_arrow"===u.type&&(u.type="double_arrow_point"),u.length=s.length,u}return s},Z=(t,e)=>{let s=!1;return t.forEach((t=>{t.nodes.indexOf(e)>=0&&(s=!0)})),s},J=(t,e)=>{const s=[];return t.nodes.forEach(((u,i)=>{Z(e,u)||s.push(t.nodes[i])})),{nodes:s}},tt={firstGraph:Q},et={defaultConfig:()=>i.K.flowchart,setAccTitle:i.s,getAccTitle:i.g,getAccDescription:i.a,setAccDescription:i.b,addVertex:F,lookUpDomId:b,addLink:C,updateLinkInterpolate:_,updateLink:B,addClass:S,setDirection:m,setClass:x,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(E["gen-1"===c?b(t):t]=D(e))}))},getTooltip:L,setClickEvent:I,setLink:v,bindFunctions:R,getDirection:$,getVertices:N,getEdges:O,getClasses:w,clear:U,setGen:V,defaultStyle:G,addSubGraph:M,getDepthFirstPos:z,indexNodes:H,getSubGraphs:W,destructLink:q,lex:tt,exists:Z,makeUniq:J,setDiagramTitle:i.q,getDiagramTitle:i.t},st=Object.freeze(Object.defineProperty({__proto__:null,addClass:S,addLink:C,addSingleLink:T,addSubGraph:M,addVertex:F,bindFunctions:R,clear:U,default:et,defaultStyle:G,destructLink:q,firstGraph:Q,getClasses:w,getDepthFirstPos:z,getDirection:$,getEdges:O,getSubGraphs:W,getTooltip:L,getVertices:N,indexNodes:H,lex:tt,lookUpDomId:b,setClass:x,setClickEvent:I,setDirection:m,setGen:V,setLink:v,updateLink:B,updateLinkInterpolate:_},Symbol.toStringTag,{value:"Module"}))}}]); \ No newline at end of file diff --git a/assets/js/6292.4446f967.js b/assets/js/6292.4446f967.js new file mode 100644 index 00000000..105af0cb --- /dev/null +++ b/assets/js/6292.4446f967.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[6292],{6292:(t,e,s)=>{s.d(e,{D:()=>l,S:()=>c,a:()=>h,b:()=>a,c:()=>o,d:()=>B,p:()=>r,s:()=>P});var i=s(6257),n=function(){var t=function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},e=[1,2],s=[1,3],i=[1,4],n=[2,4],r=[1,9],o=[1,11],a=[1,15],c=[1,16],l=[1,17],h=[1,18],u=[1,30],d=[1,19],p=[1,20],y=[1,21],f=[1,22],m=[1,23],g=[1,25],S=[1,26],_=[1,27],k=[1,28],T=[1,29],b=[1,32],E=[1,33],x=[1,34],C=[1,35],$=[1,31],v=[1,4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],D=[1,4,5,13,14,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],A=[4,5,15,16,18,20,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],L={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,cssClassStatement:11,idStatement:12,DESCR:13,"--\x3e":14,HIDE_EMPTY:15,scale:16,WIDTH:17,COMPOSIT_STATE:18,STRUCT_START:19,STRUCT_STOP:20,STATE_DESCR:21,AS:22,ID:23,FORK:24,JOIN:25,CHOICE:26,CONCURRENT:27,note:28,notePosition:29,NOTE_TEXT:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,classDef:37,CLASSDEF_ID:38,CLASSDEF_STYLEOPTS:39,DEFAULT:40,class:41,CLASSENTITY_IDS:42,STYLECLASS:43,direction_tb:44,direction_bt:45,direction_rl:46,direction_lr:47,eol:48,";":49,EDGE_STATE:50,STYLE_SEPARATOR:51,left_of:52,right_of:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",13:"DESCR",14:"--\x3e",15:"HIDE_EMPTY",16:"scale",17:"WIDTH",18:"COMPOSIT_STATE",19:"STRUCT_START",20:"STRUCT_STOP",21:"STATE_DESCR",22:"AS",23:"ID",24:"FORK",25:"JOIN",26:"CHOICE",27:"CONCURRENT",28:"note",30:"NOTE_TEXT",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"classDef",38:"CLASSDEF_ID",39:"CLASSDEF_STYLEOPTS",40:"DEFAULT",41:"class",42:"CLASSENTITY_IDS",43:"STYLECLASS",44:"direction_tb",45:"direction_bt",46:"direction_rl",47:"direction_lr",49:";",50:"EDGE_STATE",51:"STYLE_SEPARATOR",52:"left_of",53:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[31,1],[31,1],[31,1],[31,1],[48,1],[48,1],[12,1],[12,1],[12,3],[12,3],[29,1],[29,1]],performAction:function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 11:this.$=r[a];break;case 8:this.$="nl";break;case 12:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 13:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 14:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 18:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 19:var c=r[a],l=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");c=h[0],l=[l,h[1]]}this.$={stmt:"state",id:c,type:"default",description:l};break;case 20:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 21:this.$={stmt:"state",id:r[a],type:"fork"};break;case 22:this.$={stmt:"state",id:r[a],type:"join"};break;case 23:this.$={stmt:"state",id:r[a],type:"choice"};break;case 24:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 25:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 28:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 31:case 32:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 33:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 34:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 35:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 36:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 37:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 40:case 41:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 42:case 43:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}},table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,15,16,18,21,23,24,25,26,27,28,32,34,36,37,41,44,45,46,47,50],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:r,5:o,8:8,9:10,10:12,11:13,12:14,15:a,16:c,18:l,21:h,23:u,24:d,25:p,26:y,27:f,28:m,31:24,32:g,34:S,36:_,37:k,41:T,44:b,45:E,46:x,47:C,50:$},t(v,[2,5]),{9:36,10:12,11:13,12:14,15:a,16:c,18:l,21:h,23:u,24:d,25:p,26:y,27:f,28:m,31:24,32:g,34:S,36:_,37:k,41:T,44:b,45:E,46:x,47:C,50:$},t(v,[2,7]),t(v,[2,8]),t(v,[2,9]),t(v,[2,10]),t(v,[2,11],{13:[1,37],14:[1,38]}),t(v,[2,15]),{17:[1,39]},t(v,[2,17],{19:[1,40]}),{22:[1,41]},t(v,[2,21]),t(v,[2,22]),t(v,[2,23]),t(v,[2,24]),{29:42,30:[1,43],52:[1,44],53:[1,45]},t(v,[2,27]),{33:[1,46]},{35:[1,47]},t(v,[2,30]),{38:[1,48],40:[1,49]},{42:[1,50]},t(D,[2,40],{51:[1,51]}),t(D,[2,41],{51:[1,52]}),t(v,[2,34]),t(v,[2,35]),t(v,[2,36]),t(v,[2,37]),t(v,[2,6]),t(v,[2,12]),{12:53,23:u,50:$},t(v,[2,16]),t(A,n,{7:54}),{23:[1,55]},{23:[1,56]},{22:[1,57]},{23:[2,44]},{23:[2,45]},t(v,[2,28]),t(v,[2,29]),{39:[1,58]},{39:[1,59]},{43:[1,60]},{23:[1,61]},{23:[1,62]},t(v,[2,13],{13:[1,63]}),{4:r,5:o,8:8,9:10,10:12,11:13,12:14,15:a,16:c,18:l,20:[1,64],21:h,23:u,24:d,25:p,26:y,27:f,28:m,31:24,32:g,34:S,36:_,37:k,41:T,44:b,45:E,46:x,47:C,50:$},t(v,[2,19],{19:[1,65]}),{30:[1,66]},{23:[1,67]},t(v,[2,31]),t(v,[2,32]),t(v,[2,33]),t(D,[2,42]),t(D,[2,43]),t(v,[2,14]),t(v,[2,18]),t(A,n,{7:68}),t(v,[2,25]),t(v,[2,26]),{4:r,5:o,8:8,9:10,10:12,11:13,12:14,15:a,16:c,18:l,20:[1,69],21:h,23:u,24:d,25:p,26:y,27:f,28:m,31:24,32:g,34:S,36:_,37:k,41:T,44:b,45:E,46:x,47:C,50:$},t(v,[2,20])],defaultActions:{5:[2,1],6:[2,2],44:[2,44],45:[2,45]},parseError:function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},parse:function(t){var e=this,s=[0],i=[],n=[null],r=[],o=this.table,a="",c=0,l=0,h=r.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);u.setInput(t,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var y=u.yylloc;r.push(y);var f=u.options&&u.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,g,S,_,k,T,b,E,x,C={};;){if(g=s[s.length-1],this.defaultActions[g]?S=this.defaultActions[g]:(null==m&&(x=void 0,"number"!=typeof(x=i.pop()||u.lex()||1)&&(x instanceof Array&&(x=(i=x).pop()),x=e.symbols_[x]||x),m=x),S=o[g]&&o[g][m]),void 0===S||!S.length||!S[0]){var $="";for(k in E=[],o[g])this.terminals_[k]&&k>2&&E.push("'"+this.terminals_[k]+"'");$=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError($,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:y,expected:E})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+m);switch(S[0]){case 1:s.push(m),n.push(u.yytext),r.push(u.yylloc),s.push(S[1]),m=null,l=u.yyleng,a=u.yytext,c=u.yylineno,y=u.yylloc;break;case 2:if(T=this.productions_[S[1]][1],C.$=n[n.length-T],C._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},f&&(C._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(_=this.performAction.apply(C,[a,l,c,d.yy,S[1],n,r].concat(h))))return _;T&&(s=s.slice(0,-1*T*2),n=n.slice(0,-1*T),r=r.slice(0,-1*T)),s.push(this.productions_[S[1]][0]),n.push(C.$),r.push(C._$),b=o[s[s.length-2]][s[s.length-1]],s.push(b);break;case 3:return!0}}return!0}},I={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,s,i){switch(s){case 0:return 40;case 1:case 39:return 44;case 2:case 40:return 45;case 3:case 41:return 46;case 4:case 42:return 47;case 5:case 6:case 8:case 9:case 10:case 11:case 51:case 53:case 59:break;case 7:case 74:return 5;case 12:case 29:return this.pushState("SCALE"),16;case 13:case 30:return 17;case 14:case 20:case 31:case 46:case 49:this.popState();break;case 15:return this.begin("acc_title"),32;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),34;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),37;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),38;case 25:return this.popState(),39;case 26:return this.pushState("CLASS"),41;case 27:return this.popState(),this.pushState("CLASS_STYLE"),42;case 28:return this.popState(),43;case 32:this.pushState("STATE");break;case 33:case 36:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 34:case 37:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 35:case 38:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),26;case 43:this.pushState("STATE_STRING");break;case 44:return this.pushState("STATE_ID"),"AS";case 45:case 61:return this.popState(),"ID";case 47:return"STATE_DESCR";case 48:return 18;case 50:return this.popState(),this.pushState("struct"),19;case 52:return this.popState(),20;case 54:return this.begin("NOTE"),28;case 55:return this.popState(),this.pushState("NOTE_ID"),52;case 56:return this.popState(),this.pushState("NOTE_ID"),53;case 57:this.popState(),this.pushState("FLOATING_NOTE");break;case 58:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 60:return"NOTE_TEXT";case 62:return this.popState(),this.pushState("NOTE_TEXT"),23;case 63:return this.popState(),e.yytext=e.yytext.substr(2).trim(),30;case 64:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),30;case 65:case 66:return 6;case 67:return 15;case 68:return 50;case 69:return 23;case 70:return e.yytext=e.yytext.trim(),13;case 71:return 14;case 72:return 27;case 73:return 51;case 75:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,32,39,40,41,42,51,52,53,54,68,69,70,71,72],inclusive:!1},FLOATING_NOTE_ID:{rules:[61],inclusive:!1},FLOATING_NOTE:{rules:[58,59,60],inclusive:!1},NOTE_TEXT:{rules:[63,64],inclusive:!1},NOTE_ID:{rules:[62],inclusive:!1},NOTE:{rules:[55,56,57],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,30,31],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[45],inclusive:!1},STATE_STRING:{rules:[46,47],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,33,34,35,36,37,38,43,44,48,49,50],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,50,54,65,66,67,68,69,70,71,73,74,75],inclusive:!0}}};function O(){this.yy={}}return L.lexer=I,O.prototype=L,L.Parser=O,new O}();n.parser=n;const r=n,o="TB",a="state",c="relation",l="default",h="divider",u="[*]",d="start",p=u,y="color",f="fill";let m="LR",g=[],S={};let _={root:{relations:[],states:{},documents:{}}},k=_.root,T=0,b=0;const E=t=>JSON.parse(JSON.stringify(t)),x=(t,e,s)=>{if(e.stmt===c)x(t,e.state1,!0),x(t,e.state2,!1);else if(e.stmt===a&&("[*]"===e.id?(e.id=s?t.id+"_start":t.id+"_end",e.start=s):e.id=e.id.trim()),e.doc){const t=[];let s,n=[];for(s=0;s<e.doc.length;s++)if(e.doc[s].type===h){const i=E(e.doc[s]);i.doc=E(n),t.push(i),n=[]}else n.push(e.doc[s]);if(t.length>0&&n.length>0){const s={stmt:a,id:(0,i.I)(),type:"divider",doc:E(n)};t.push(E(s)),e.doc=t}e.doc.forEach((t=>x(e,t,!0)))}},C=function(t,e=l,s=null,n=null,r=null,o=null,a=null,c=null){const h=null==t?void 0:t.trim();if(void 0===k.states[h]?(i.l.info("Adding state ",h,n),k.states[h]={id:h,descriptions:[],type:e,doc:s,note:r,classes:[],styles:[],textStyles:[]}):(k.states[h].doc||(k.states[h].doc=s),k.states[h].type||(k.states[h].type=e)),n&&(i.l.info("Setting state description",h,n),"string"==typeof n&&I(h,n.trim()),"object"==typeof n&&n.forEach((t=>I(h,t.trim())))),r&&(k.states[h].note=r,k.states[h].note.text=i.e.sanitizeText(k.states[h].note.text,(0,i.c)())),o){i.l.info("Setting state classes",h,o);("string"==typeof o?[o]:o).forEach((t=>N(h,t.trim())))}if(a){i.l.info("Setting state styles",h,a);("string"==typeof a?[a]:a).forEach((t=>R(h,t.trim())))}if(c){i.l.info("Setting state styles",h,a);("string"==typeof c?[c]:c).forEach((t=>w(h,t.trim())))}},$=function(t){_={root:{relations:[],states:{},documents:{}}},k=_.root,T=0,S={},t||(0,i.v)()},v=function(t){return k.states[t]};function D(t=""){let e=t;return t===u&&(T++,e=`${d}${T}`),e}function A(t="",e=l){return t===u?d:e}const L=function(t,e,s){if("object"==typeof t)!function(t,e,s){let n=D(t.id.trim()),r=A(t.id.trim(),t.type),o=D(e.id.trim()),a=A(e.id.trim(),e.type);C(n,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),C(o,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),k.relations.push({id1:n,id2:o,relationTitle:i.e.sanitizeText(s,(0,i.c)())})}(t,e,s);else{const n=D(t.trim()),r=A(t),o=function(t=""){let e=t;return t===p&&(T++,e=`end${T}`),e}(e.trim()),a=function(t="",e=l){return t===p?"end":e}(e);C(n,r),C(o,a),k.relations.push({id1:n,id2:o,title:i.e.sanitizeText(s,(0,i.c)())})}},I=function(t,e){const s=k.states[t],n=e.startsWith(":")?e.replace(":","").trim():e;s.descriptions.push(i.e.sanitizeText(n,(0,i.c)()))},O=function(t,e=""){void 0===S[t]&&(S[t]={id:t,styles:[],textStyles:[]});const s=S[t];null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(t.match(y)){const t=e.replace(f,"bgFill").replace(y,f);s.textStyles.push(t)}s.styles.push(e)}))},N=function(t,e){t.split(",").forEach((function(t){let s=v(t);if(void 0===s){const e=t.trim();C(e),s=v(e)}s.classes.push(e)}))},R=function(t,e){const s=v(t);void 0!==s&&s.textStyles.push(e)},w=function(t,e){const s=v(t);void 0!==s&&s.textStyles.push(e)},B={getConfig:()=>(0,i.c)().state,addState:C,clear:$,getState:v,getStates:function(){return k.states},getRelations:function(){return k.relations},getClasses:function(){return S},getDirection:()=>m,addRelation:L,getDividerId:()=>(b++,"divider-id-"+b),setDirection:t=>{m=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){i.l.info("Documents = ",_)},getRootDoc:()=>g,setRootDoc:t=>{i.l.info("Setting root doc",t),g=t},getRootDocV2:()=>(x({id:"root"},{id:"root",doc:g},!0),{id:"root",doc:g}),extract:t=>{let e;e=t.doc?t.doc:t,i.l.info(e),$(!0),i.l.info("Extract",e),e.forEach((t=>{switch(t.stmt){case a:C(t.id.trim(),t.type,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles);break;case c:L(t.state1,t.state2,t.description);break;case"classDef":O(t.id.trim(),t.classes);break;case"applyClass":N(t.id.trim(),t.styleClass)}}))},trimColon:t=>t&&":"===t[0]?t.substr(1).trim():t.trim(),getAccTitle:i.g,setAccTitle:i.s,getAccDescription:i.a,setAccDescription:i.b,addStyleClass:O,setCssClass:N,addDescription:I,setDiagramTitle:i.q,getDiagramTitle:i.t},P=t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`}}]); \ No newline at end of file diff --git a/assets/js/63.f064aa03.js b/assets/js/63.f064aa03.js new file mode 100644 index 00000000..4e7cccff --- /dev/null +++ b/assets/js/63.f064aa03.js @@ -0,0 +1,742 @@ +"use strict"; +exports.id = 63; +exports.ids = [63]; +exports.modules = { + +/***/ 6063: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9418); + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 10, 12, 14, 16, 18, 19, 20, 21, 22], $V5 = [2, 4], $V6 = [1, 5, 10, 12, 14, 16, 18, 19, 20, 21, 22], $V7 = [20, 21, 22], $V8 = [2, 7], $V9 = [1, 12], $Va = [1, 13], $Vb = [1, 14], $Vc = [1, 15], $Vd = [1, 16], $Ve = [1, 17]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "PIE": 5, "document": 6, "showData": 7, "line": 8, "statement": 9, "txt": 10, "value": 11, "title": 12, "title_value": 13, "acc_title": 14, "acc_title_value": 15, "acc_descr": 16, "acc_descr_value": 17, "acc_descr_multiline_value": 18, "section": 19, "NEWLINE": 20, ";": 21, "EOF": 22, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "PIE", 7: "showData", 10: "txt", 11: "value", 12: "title", 13: "title_value", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "section", 20: "NEWLINE", 21: ";", 22: "EOF" }, + productions_: [0, [3, 2], [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [9, 0], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [4, 1], [4, 1], [4, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setShowData(true); + break; + case 6: + this.$ = $$[$0 - 1]; + break; + case 8: + yy.addSection($$[$0 - 1], yy.cleanupValue($$[$0])); + break; + case 9: + this.$ = $$[$0].trim(); + yy.setDiagramTitle(this.$); + break; + case 10: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 11: + case 12: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 13: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: $V0, 20: $V1, 21: $V2, 22: $V3 }, { 1: [3] }, { 3: 7, 4: 2, 5: $V0, 20: $V1, 21: $V2, 22: $V3 }, o($V4, $V5, { 6: 8, 7: [1, 9] }), o($V6, [2, 14]), o($V6, [2, 15]), o($V6, [2, 16]), { 1: [2, 1] }, o($V7, $V8, { 8: 10, 9: 11, 1: [2, 2], 10: $V9, 12: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 19: $Ve }), o($V4, $V5, { 6: 18 }), o($V4, [2, 5]), { 4: 19, 20: $V1, 21: $V2, 22: $V3 }, { 11: [1, 20] }, { 13: [1, 21] }, { 15: [1, 22] }, { 17: [1, 23] }, o($V7, [2, 12]), o($V7, [2, 13]), o($V7, $V8, { 8: 10, 9: 11, 1: [2, 3], 10: $V9, 12: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 19: $Ve }), o($V4, [2, 6]), o($V7, [2, 8]), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11])], + defaultActions: { 7: [2, 1] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 20; + case 3: + break; + case 4: + break; + case 5: + this.begin("title"); + return 12; + case 6: + this.popState(); + return "title_value"; + case 7: + this.begin("acc_title"); + return 14; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.begin("acc_descr"); + return 16; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + this.begin("string"); + break; + case 15: + this.popState(); + break; + case 16: + return "txt"; + case 17: + return 5; + case 18: + return 7; + case 19: + return "value"; + case 20: + return 22; + } + }, + rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:[\s]+)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:pie\b)/i, /^(?:showData\b)/i, /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i, /^(?:$)/i], + conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "title": { "rules": [6], "inclusive": false }, "string": { "rules": [15, 16], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 7, 9, 11, 14, 17, 18, 19, 20], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const DEFAULT_PIE_CONFIG = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.B.pie; +const DEFAULT_PIE_DB = { + sections: {}, + showData: false, + config: DEFAULT_PIE_CONFIG +}; +let sections = DEFAULT_PIE_DB.sections; +let showData = DEFAULT_PIE_DB.showData; +const config = structuredClone(DEFAULT_PIE_CONFIG); +const getConfig = () => structuredClone(config); +const clear = () => { + sections = structuredClone(DEFAULT_PIE_DB.sections); + showData = DEFAULT_PIE_DB.showData; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.v)(); +}; +const addSection = (label, value) => { + label = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.d)(label, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + if (sections[label] === void 0) { + sections[label] = value; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`added new section: ${label}, with value: ${value}`); + } +}; +const getSections = () => sections; +const cleanupValue = (value) => { + if (value.substring(0, 1) === ":") { + value = value.substring(1).trim(); + } + return Number(value.trim()); +}; +const setShowData = (toggle) => { + showData = toggle; +}; +const getShowData = () => showData; +const db = { + getConfig, + clear, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.t, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.g, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.b, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.a, + addSection, + getSections, + cleanupValue, + setShowData, + getShowData +}; +const getStyles = (options) => ` + .pieCircle{ + stroke: ${options.pieStrokeColor}; + stroke-width : ${options.pieStrokeWidth}; + opacity : ${options.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${options.pieOuterStrokeColor}; + stroke-width: ${options.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${options.pieTitleTextSize}; + fill: ${options.pieTitleTextColor}; + font-family: ${options.fontFamily}; + } + .slice { + font-family: ${options.fontFamily}; + fill: ${options.pieSectionTextColor}; + font-size:${options.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${options.pieLegendTextColor}; + font-family: ${options.fontFamily}; + font-size: ${options.pieLegendTextSize}; + } +`; +const styles = getStyles; +const createPieArcs = (sections2) => { + const pieData = Object.entries(sections2).map((element) => { + return { + label: element[0], + value: element[1] + }; + }).sort((a, b) => { + return b.value - a.value; + }); + const pie$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .pie */ .rLf)().value( + (d3Section) => d3Section.value + ); + return pie$1(pieData); +}; +const draw = (text, id, _version, diagObj) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("rendering pie chart\n" + text); + const db2 = diagObj.db; + const globalConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + const pieConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.C)(db2.getConfig(), globalConfig.pie); + const MARGIN = 40; + const LEGEND_RECT_SIZE = 18; + const LEGEND_SPACING = 4; + const height = 450; + const pieWidth = height; + const svg = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.A)(id); + const group = svg.append("g"); + const sections2 = db2.getSections(); + group.attr("transform", "translate(" + pieWidth / 2 + "," + height / 2 + ")"); + const { themeVariables } = globalConfig; + let [outerStrokeWidth] = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.D)(themeVariables.pieOuterStrokeWidth); + outerStrokeWidth ?? (outerStrokeWidth = 2); + const textPosition = pieConfig.textPosition; + const radius = Math.min(pieWidth, height) / 2 - MARGIN; + const arcGenerator = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .JLW)().innerRadius(0).outerRadius(radius); + const labelArcGenerator = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .JLW)().innerRadius(radius * textPosition).outerRadius(radius * textPosition); + group.append("circle").attr("cx", 0).attr("cy", 0).attr("r", radius + outerStrokeWidth / 2).attr("class", "pieOuterCircle"); + const arcs = createPieArcs(sections2); + const myGeneratedColors = [ + themeVariables.pie1, + themeVariables.pie2, + themeVariables.pie3, + themeVariables.pie4, + themeVariables.pie5, + themeVariables.pie6, + themeVariables.pie7, + themeVariables.pie8, + themeVariables.pie9, + themeVariables.pie10, + themeVariables.pie11, + themeVariables.pie12 + ]; + const color = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleOrdinal */ .UMr)(myGeneratedColors); + group.selectAll("mySlices").data(arcs).enter().append("path").attr("d", arcGenerator).attr("fill", (datum) => { + return color(datum.data.label); + }).attr("class", "pieCircle"); + let sum = 0; + Object.keys(sections2).forEach((key) => { + sum += sections2[key]; + }); + group.selectAll("mySlices").data(arcs).enter().append("text").text((datum) => { + return (datum.data.value / sum * 100).toFixed(0) + "%"; + }).attr("transform", (datum) => { + return "translate(" + labelArcGenerator.centroid(datum) + ")"; + }).style("text-anchor", "middle").attr("class", "slice"); + group.append("text").text(db2.getDiagramTitle()).attr("x", 0).attr("y", -(height - 50) / 2).attr("class", "pieTitleText"); + const legend = group.selectAll(".legend").data(color.domain()).enter().append("g").attr("class", "legend").attr("transform", (_datum, index) => { + const height2 = LEGEND_RECT_SIZE + LEGEND_SPACING; + const offset = height2 * color.domain().length / 2; + const horizontal = 12 * LEGEND_RECT_SIZE; + const vertical = index * height2 - offset; + return "translate(" + horizontal + "," + vertical + ")"; + }); + legend.append("rect").attr("width", LEGEND_RECT_SIZE).attr("height", LEGEND_RECT_SIZE).style("fill", color).style("stroke", color); + legend.data(arcs).append("text").attr("x", LEGEND_RECT_SIZE + LEGEND_SPACING).attr("y", LEGEND_RECT_SIZE - LEGEND_SPACING).text((datum) => { + const { label, value } = datum.data; + if (db2.getShowData()) { + return `${label} [${value}]`; + } + return label; + }); + const longestTextWidth = Math.max( + ...legend.selectAll("text").nodes().map((node) => (node == null ? void 0 : node.getBoundingClientRect().width) ?? 0) + ); + const totalWidth = pieWidth + MARGIN + LEGEND_RECT_SIZE + LEGEND_SPACING + longestTextWidth; + svg.attr("viewBox", `0 0 ${totalWidth} ${height}`); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.i)(svg, height, totalWidth, pieConfig.useMaxWidth); +}; +const renderer = { draw }; +const diagram = { + parser: parser$1, + db, + renderer, + styles +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/642.72d21411.js b/assets/js/642.72d21411.js new file mode 100644 index 00000000..cc0c2539 --- /dev/null +++ b/assets/js/642.72d21411.js @@ -0,0 +1,1242 @@ +"use strict"; +exports.id = 642; +exports.ids = [642]; +exports.modules = { + +/***/ 5642: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3219); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8041); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5263); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9418); + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 16], $V7 = [1, 17]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "timeline": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "period_statement": 18, "event_statement": 19, "period": 20, "event": 21, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "timeline", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 20: "period", 21: "event" }, + productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [18, 1], [19, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 2: + this.$ = []; + break; + case 3: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 4: + case 5: + this.$ = $$[$0]; + break; + case 6: + case 7: + this.$ = []; + break; + case 8: + yy.getCommonDb().setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 9: + this.$ = $$[$0].trim(); + yy.getCommonDb().setAccTitle(this.$); + break; + case 10: + case 11: + this.$ = $$[$0].trim(); + yy.getCommonDb().setAccDescription(this.$); + break; + case 12: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 15: + yy.addTask($$[$0], 0, ""); + this.$ = $$[$0]; + break; + case 16: + yy.addEvent($$[$0].substr(2)); + this.$ = $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 18, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10])], + defaultActions: {}, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + return 10; + case 3: + break; + case 4: + break; + case 5: + return 4; + case 6: + return 11; + case 7: + this.begin("acc_title"); + return 12; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.begin("acc_descr"); + return 14; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.begin("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + return 17; + case 15: + return 21; + case 16: + return 20; + case 17: + return 6; + case 18: + return "INVALID"; + } + }, + rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?::\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let currentSection = ""; +let currentTaskId = 0; +const sections = []; +const tasks = []; +const rawTasks = []; +const getCommonDb = () => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.L; +const clear = function() { + sections.length = 0; + tasks.length = 0; + currentSection = ""; + rawTasks.length = 0; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.v)(); +}; +const addSection = function(txt) { + currentSection = txt; + sections.push(txt); +}; +const getSections = function() { + return sections; +}; +const getTasks = function() { + let allItemsProcessed = compileTasks(); + const maxDepth = 100; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } + tasks.push(...rawTasks); + return tasks; +}; +const addTask = function(period, length, event) { + const rawTask = { + id: currentTaskId++, + section: currentSection, + type: currentSection, + task: period, + score: length ? length : 0, + //if event is defined, then add it the events array + events: event ? [event] : [] + }; + rawTasks.push(rawTask); +}; +const addEvent = function(event) { + const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1); + currentTask.events.push(event); +}; +const addTaskOrg = function(descr) { + const newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + tasks.push(newTask); +}; +const compileTasks = function() { + const compileTask = function(pos) { + return rawTasks[pos].processed; + }; + let allProcessed = true; + for (const [i, rawTask] of rawTasks.entries()) { + compileTask(i); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; +}; +const timelineDb = { + clear, + getCommonDb, + addSection, + getSections, + getTasks, + addTask, + addTaskOrg, + addEvent +}; +const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addEvent, + addSection, + addTask, + addTaskOrg, + clear, + default: timelineDb, + getCommonDb, + getSections, + getTasks +}, Symbol.toStringTag, { value: "Module" })); +const MAX_SECTIONS = 12; +const drawRect = function(elem, rectData) { + const rectElem = elem.append("rect"); + rectElem.attr("x", rectData.x); + rectElem.attr("y", rectData.y); + rectElem.attr("fill", rectData.fill); + rectElem.attr("stroke", rectData.stroke); + rectElem.attr("width", rectData.width); + rectElem.attr("height", rectData.height); + rectElem.attr("rx", rectData.rx); + rectElem.attr("ry", rectData.ry); + if (rectData.class !== void 0) { + rectElem.attr("class", rectData.class); + } + return rectElem; +}; +const drawFace = function(element, faceData) { + const radius = 15; + const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible"); + const face = element.append("g"); + face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + function smile(face2) { + const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .JLW)().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")"); + } + function sad(face2) { + const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .JLW)().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")"); + } + function ambivalent(face2) { + face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); + } + if (faceData.score > 3) { + smile(face); + } else if (faceData.score < 3) { + sad(face); + } else { + ambivalent(face); + } + return circleElement; +}; +const drawCircle = function(element, circleData) { + const circleElement = element.append("circle"); + circleElement.attr("cx", circleData.cx); + circleElement.attr("cy", circleData.cy); + circleElement.attr("class", "actor-" + circleData.pos); + circleElement.attr("fill", circleData.fill); + circleElement.attr("stroke", circleData.stroke); + circleElement.attr("r", circleData.r); + if (circleElement.class !== void 0) { + circleElement.attr("class", circleElement.class); + } + if (circleData.title !== void 0) { + circleElement.append("title").text(circleData.title); + } + return circleElement; +}; +const drawText = function(elem, textData) { + const nText = textData.text.replace(/<br\s*\/?>/gi, " "); + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.attr("class", "legend"); + textElem.style("text-anchor", textData.anchor); + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + const span = textElem.append("tspan"); + span.attr("x", textData.x + textData.textMargin * 2); + span.text(nText); + return textElem; +}; +const drawLabel = function(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.labelMargin; + txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; + drawText(elem, txtObject); +}; +const drawSection = function(elem, section, conf) { + const g = elem.append("g"); + const rect = getNoteRect(); + rect.x = section.x; + rect.y = section.y; + rect.fill = section.fill; + rect.width = conf.width; + rect.height = conf.height; + rect.class = "journey-section section-type-" + section.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + _drawTextCandidateFunc(conf)( + section.text, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "journey-section section-type-" + section.num }, + conf, + section.colour + ); +}; +let taskCount = -1; +const drawTask = function(elem, task, conf) { + const center = task.x + conf.width / 2; + const g = elem.append("g"); + taskCount++; + const maxHeight = 300 + 5 * 30; + g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"); + drawFace(g, { + cx: center, + cy: 300 + (5 - task.score) * 30, + score: task.score + }); + const rect = getNoteRect(); + rect.x = task.x; + rect.y = task.y; + rect.fill = task.fill; + rect.width = conf.width; + rect.height = conf.height; + rect.class = "task task-type-" + task.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + task.x + 14; + _drawTextCandidateFunc(conf)( + task.task, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "task" }, + conf, + task.colour + ); +}; +const drawBackgroundRect = function(elem, bounds) { + const rectElem = drawRect(elem, { + x: bounds.startx, + y: bounds.starty, + width: bounds.stopx - bounds.startx, + height: bounds.stopy - bounds.starty, + fill: bounds.fill, + class: "rect" + }); + rectElem.lower(); +}; +const getTextObj = function() { + return { + x: 0, + y: 0, + fill: void 0, + "text-anchor": "start", + width: 100, + height: 100, + textMargin: 0, + rx: 0, + ry: 0 + }; +}; +const getNoteRect = function() { + return { + x: 0, + y: 0, + width: 100, + anchor: "start", + height: 100, + rx: 0, + ry: 0 + }; +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs, colour) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) { + const { taskFontSize, taskFontFamily } = conf; + const lines = content.split(/<br\s*\/?>/gi); + for (let i = 0; i < lines.length; i++) { + const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily); + text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf) { + const body = g.append("switch"); + const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed"); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, body, x, y, width, height, textAttrs, conf); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (key in fromTextAttrsDict) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf) { + return conf.textPlacement === "fo" ? byFo : conf.textPlacement === "old" ? byText : byTspan; + }; +}(); +const initGraphics = function(graphics) { + graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); +}; +function wrap(text, width) { + text.each(function() { + var text2 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this), words = text2.text().split(/(\s+|<br>)/).reverse(), word, line = [], lineHeight = 1.1, y = text2.attr("y"), dy = parseFloat(text2.attr("dy")), tspan = text2.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em"); + for (let j = 0; j < words.length; j++) { + word = words[words.length - 1 - j]; + line.push(word); + tspan.text(line.join(" ").trim()); + if (tspan.node().getComputedTextLength() > width || word === "<br>") { + line.pop(); + tspan.text(line.join(" ").trim()); + if (word === "<br>") { + line = [""]; + } else { + line = [word]; + } + tspan = text2.append("tspan").attr("x", 0).attr("y", y).attr("dy", lineHeight + "em").text(word); + } + } + }); +} +const drawNode = function(elem, node, fullSection, conf) { + const section = fullSection % MAX_SECTIONS - 1; + const nodeElem = elem.append("g"); + node.section = section; + nodeElem.attr( + "class", + (node.class ? node.class + " " : "") + "timeline-node " + ("section-" + section) + ); + const bkgElem = nodeElem.append("g"); + const textElem = nodeElem.append("g"); + const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); + const bbox = txt.node().getBBox(); + const fontSize = conf.fontSize && conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize; + node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding; + node.height = Math.max(node.height, node.maxHeight); + node.width = node.width + 2 * node.padding; + textElem.attr("transform", "translate(" + node.width / 2 + ", " + node.padding / 2 + ")"); + defaultBkg(bkgElem, node, section); + return node; +}; +const getVirtualNodeHeight = function(elem, node, conf) { + const textElem = elem.append("g"); + const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); + const bbox = txt.node().getBBox(); + const fontSize = conf.fontSize && conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize; + textElem.remove(); + return bbox.height + fontSize * 1.1 * 0.5 + node.padding; +}; +const defaultBkg = function(elem, node, section) { + const rd = 5; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + node.type).attr( + "d", + `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` + ); + elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); +}; +const svgDraw = { + drawRect, + drawCircle, + drawSection, + drawText, + drawLabel, + drawTask, + drawBackgroundRect, + getTextObj, + getNoteRect, + initGraphics, + drawNode, + getVirtualNodeHeight +}; +const draw = function(text, id, version, diagObj) { + var _a, _b; + const conf = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + const LEFT_MARGIN = conf.leftMargin ?? 50; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("timeline", diagObj.db); + const securityLevel = conf.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); + const svg = root.select("#" + id); + svg.append("g"); + const tasks2 = diagObj.db.getTasks(); + const title = diagObj.db.getCommonDb().getDiagramTitle(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("task", tasks2); + svgDraw.initGraphics(svg); + const sections2 = diagObj.db.getSections(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("sections", sections2); + let maxSectionHeight = 0; + let maxTaskHeight = 0; + let depthY = 0; + let sectionBeginY = 0; + let masterX = 50 + LEFT_MARGIN; + let masterY = 50; + sectionBeginY = 50; + let sectionNumber = 0; + let hasSections = true; + sections2.forEach(function(section) { + const sectionNode = { + number: sectionNumber, + descr: section, + section: sectionNumber, + width: 150, + padding: 20, + maxHeight: maxSectionHeight + }; + const sectionHeight = svgDraw.getVirtualNodeHeight(svg, sectionNode, conf); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("sectionHeight before draw", sectionHeight); + maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20); + }); + let maxEventCount = 0; + let maxEventLineLength = 0; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("tasks.length", tasks2.length); + for (const [i, task] of tasks2.entries()) { + const taskNode = { + number: i, + descr: task, + section: task.section, + width: 150, + padding: 20, + maxHeight: maxTaskHeight + }; + const taskHeight = svgDraw.getVirtualNodeHeight(svg, taskNode, conf); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("taskHeight before draw", taskHeight); + maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20); + maxEventCount = Math.max(maxEventCount, task.events.length); + let maxEventLineLengthTemp = 0; + for (let j = 0; j < task.events.length; j++) { + const event = task.events[j]; + const eventNode = { + descr: event, + section: task.section, + number: task.section, + width: 150, + padding: 20, + maxHeight: 50 + }; + maxEventLineLengthTemp += svgDraw.getVirtualNodeHeight(svg, eventNode, conf); + } + maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("maxSectionHeight before draw", maxSectionHeight); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("maxTaskHeight before draw", maxTaskHeight); + if (sections2 && sections2.length > 0) { + sections2.forEach((section) => { + const tasksForSection = tasks2.filter((task) => task.section === section); + const sectionNode = { + number: sectionNumber, + descr: section, + section: sectionNumber, + width: 200 * Math.max(tasksForSection.length, 1) - 50, + padding: 20, + maxHeight: maxSectionHeight + }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("sectionNode", sectionNode); + const sectionNodeWrapper = svg.append("g"); + const node = svgDraw.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("sectionNode output", node); + sectionNodeWrapper.attr("transform", `translate(${masterX}, ${sectionBeginY})`); + masterY += maxSectionHeight + 50; + if (tasksForSection.length > 0) { + drawTasks( + svg, + tasksForSection, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + false + ); + } + masterX += 200 * Math.max(tasksForSection.length, 1); + masterY = sectionBeginY; + sectionNumber++; + }); + } else { + hasSections = false; + drawTasks( + svg, + tasks2, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + true + ); + } + const box = svg.node().getBBox(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("bounds", box); + if (title) { + svg.append("text").text(title).attr("x", box.width / 2 - LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20); + } + depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100; + const lineWrapper = svg.append("g").attr("class", "lineWrapper"); + lineWrapper.append("line").attr("x1", LEFT_MARGIN).attr("y1", depthY).attr("x2", box.width + 3 * LEFT_MARGIN).attr("y2", depthY).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.o)( + void 0, + svg, + ((_a = conf.timeline) == null ? void 0 : _a.padding) ?? 50, + ((_b = conf.timeline) == null ? void 0 : _b.useMaxWidth) ?? false + ); +}; +const drawTasks = function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections) { + var _a; + for (const task of tasks2) { + const taskNode = { + descr: task.task, + section: sectionColor, + number: sectionColor, + width: 150, + padding: 20, + maxHeight: maxTaskHeight + }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("taskNode", taskNode); + const taskWrapper = diagram2.append("g").attr("class", "taskWrapper"); + const node = svgDraw.drawNode(taskWrapper, taskNode, sectionColor, conf); + const taskHeight = node.height; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("taskHeight after draw", taskHeight); + taskWrapper.attr("transform", `translate(${masterX}, ${masterY})`); + maxTaskHeight = Math.max(maxTaskHeight, taskHeight); + if (task.events) { + const lineWrapper = diagram2.append("g").attr("class", "lineWrapper"); + let lineLength = maxTaskHeight; + masterY += 100; + lineLength = lineLength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf); + masterY -= 100; + lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr( + "y2", + masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120 + ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"); + } + masterX = masterX + 200; + if (isWithoutSections && !((_a = conf.timeline) == null ? void 0 : _a.disableMulticolor)) { + sectionColor++; + } + } + masterY = masterY - 10; +}; +const drawEvents = function(diagram2, events, sectionColor, masterX, masterY, conf) { + let maxEventHeight = 0; + const eventBeginY = masterY; + masterY = masterY + 100; + for (const event of events) { + const eventNode = { + descr: event, + section: sectionColor, + number: sectionColor, + width: 150, + padding: 20, + maxHeight: 50 + }; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("eventNode", eventNode); + const eventWrapper = diagram2.append("g").attr("class", "eventWrapper"); + const node = svgDraw.drawNode(eventWrapper, eventNode, sectionColor, conf); + const eventHeight = node.height; + maxEventHeight = maxEventHeight + eventHeight; + eventWrapper.attr("transform", `translate(${masterX}, ${masterY})`); + masterY = masterY + 10 + eventHeight; + } + masterY = eventBeginY; + return maxEventHeight; +}; +const renderer = { + setConf: () => { + }, + draw +}; +const genSections = (options) => { + let sections2 = ""; + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i]; + if ((0,khroma__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(options["lineColor" + i])) { + options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)(options["lineColor" + i], 20); + } else { + options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)(options["lineColor" + i], 20); + } + } + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + const sw = "" + (17 - 3 * i); + sections2 += ` + .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} path { + fill: ${options["cScale" + i]}; + } + .section-${i - 1} text { + fill: ${options["cScaleLabel" + i]}; + } + .node-icon-${i - 1} { + font-size: 40px; + color: ${options["cScaleLabel" + i]}; + } + .section-edge-${i - 1}{ + stroke: ${options["cScale" + i]}; + } + .edge-depth-${i - 1}{ + stroke-width: ${sw}; + } + .section-${i - 1} line { + stroke: ${options["cScaleInv" + i]} ; + stroke-width: 3; + } + + .lineWrapper line{ + stroke: ${options["cScaleLabel" + i]} ; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections2; +}; +const getStyles = (options) => ` + .edge { + stroke-width: 3; + } + ${genSections(options)} + .section-root rect, .section-root path, .section-root circle { + fill: ${options.git0}; + } + .section-root text { + fill: ${options.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`; +const styles = getStyles; +const diagram = { + db, + renderer, + parser: parser$1, + styles +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/6506.9bc7806f.js b/assets/js/6506.9bc7806f.js new file mode 100644 index 00000000..8c12b0b6 --- /dev/null +++ b/assets/js/6506.9bc7806f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[6506],{6506:(t,e,r)=>{r.d(e,{diagram:()=>z});var i=r(6257),a=r(6312),n=(r(4353),r(6750),r(2838),function(){var t=function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},e=[1,3],r=[1,6],i=[1,4],a=[1,5],n=[2,5],c=[1,12],s=[5,7,13,19,21,23,24,26,28,31,37,40,47],o=[7,13,19,21,23,24,26,28,31,37,40],l=[7,12,13,19,21,23,24,26,28,31,37,40],h=[7,13,47],m=[1,42],y=[1,41],u=[7,13,29,32,35,38,47],p=[1,55],g=[1,56],b=[1,57],d=[7,13,32,35,42,47],f={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,GG:5,document:6,EOF:7,":":8,DIR:9,options:10,body:11,OPT:12,NL:13,line:14,statement:15,commitStatement:16,mergeStatement:17,cherryPickStatement:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,section:24,branchStatement:25,CHECKOUT:26,ref:27,BRANCH:28,ORDER:29,NUM:30,CHERRY_PICK:31,COMMIT_ID:32,STR:33,PARENT_COMMIT:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,ID:46,";":47,$accept:0,$end:1},terminals_:{2:"error",5:"GG",7:"EOF",8:":",9:"DIR",12:"OPT",13:"NL",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"section",26:"CHECKOUT",28:"BRANCH",29:"ORDER",30:"NUM",31:"CHERRY_PICK",32:"COMMIT_ID",33:"STR",34:"PARENT_COMMIT",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",46:"ID",47:";"},productions_:[0,[3,2],[3,3],[3,4],[3,5],[6,0],[6,2],[10,2],[10,1],[11,0],[11,2],[14,2],[14,1],[15,1],[15,1],[15,1],[15,2],[15,2],[15,1],[15,1],[15,1],[15,2],[25,2],[25,4],[18,3],[18,5],[18,5],[18,7],[18,7],[18,5],[18,5],[18,5],[18,7],[18,7],[18,7],[18,7],[17,2],[17,4],[17,4],[17,4],[17,6],[17,6],[17,6],[17,6],[17,6],[17,6],[17,8],[17,8],[17,8],[17,8],[17,8],[17,8],[16,2],[16,3],[16,3],[16,5],[16,5],[16,3],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,3],[16,5],[16,5],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[41,0],[41,1],[39,1],[39,1],[39,1],[27,1],[27,1],[4,1],[4,1],[4,1]],performAction:function(t,e,r,i,a,n,c){var s=n.length-1;switch(a){case 2:return n[s];case 3:return n[s-1];case 4:return i.setDirection(n[s-3]),n[s-1];case 6:i.setOptions(n[s-1]),this.$=n[s];break;case 7:n[s-1]+=n[s],this.$=n[s-1];break;case 9:this.$=[];break;case 10:n[s-1].push(n[s]),this.$=n[s-1];break;case 11:this.$=n[s-1];break;case 16:this.$=n[s].trim(),i.setAccTitle(this.$);break;case 17:case 18:this.$=n[s].trim(),i.setAccDescription(this.$);break;case 19:i.addSection(n[s].substr(8)),this.$=n[s].substr(8);break;case 21:i.checkout(n[s]);break;case 22:i.branch(n[s]);break;case 23:i.branch(n[s-2],n[s]);break;case 24:i.cherryPick(n[s],"",void 0);break;case 25:i.cherryPick(n[s-2],"",void 0,n[s]);break;case 26:i.cherryPick(n[s-2],"",n[s]);break;case 27:i.cherryPick(n[s-4],"",n[s],n[s-2]);break;case 28:i.cherryPick(n[s-4],"",n[s-2],n[s]);break;case 29:i.cherryPick(n[s],"",n[s-2]);break;case 30:i.cherryPick(n[s],"","");break;case 31:i.cherryPick(n[s-2],"","");break;case 32:i.cherryPick(n[s-4],"","",n[s-2]);break;case 33:i.cherryPick(n[s-4],"","",n[s]);break;case 34:i.cherryPick(n[s-2],"",n[s-4],n[s]);break;case 35:i.cherryPick(n[s-2],"","",n[s]);break;case 36:i.merge(n[s],"","","");break;case 37:i.merge(n[s-2],n[s],"","");break;case 38:i.merge(n[s-2],"",n[s],"");break;case 39:i.merge(n[s-2],"","",n[s]);break;case 40:i.merge(n[s-4],n[s],"",n[s-2]);break;case 41:i.merge(n[s-4],"",n[s],n[s-2]);break;case 42:i.merge(n[s-4],"",n[s-2],n[s]);break;case 43:i.merge(n[s-4],n[s-2],n[s],"");break;case 44:i.merge(n[s-4],n[s-2],"",n[s]);break;case 45:i.merge(n[s-4],n[s],n[s-2],"");break;case 46:i.merge(n[s-6],n[s-4],n[s-2],n[s]);break;case 47:i.merge(n[s-6],n[s],n[s-4],n[s-2]);break;case 48:i.merge(n[s-6],n[s-4],n[s],n[s-2]);break;case 49:i.merge(n[s-6],n[s-2],n[s-4],n[s]);break;case 50:i.merge(n[s-6],n[s],n[s-2],n[s-4]);break;case 51:i.merge(n[s-6],n[s-2],n[s],n[s-4]);break;case 52:i.commit(n[s]);break;case 53:i.commit("","",i.commitType.NORMAL,n[s]);break;case 54:i.commit("","",n[s],"");break;case 55:i.commit("","",n[s],n[s-2]);break;case 56:i.commit("","",n[s-2],n[s]);break;case 57:i.commit("",n[s],i.commitType.NORMAL,"");break;case 58:i.commit("",n[s-2],i.commitType.NORMAL,n[s]);break;case 59:i.commit("",n[s],i.commitType.NORMAL,n[s-2]);break;case 60:i.commit("",n[s-2],n[s],"");break;case 61:i.commit("",n[s],n[s-2],"");break;case 62:i.commit("",n[s-4],n[s-2],n[s]);break;case 63:i.commit("",n[s-4],n[s],n[s-2]);break;case 64:i.commit("",n[s-2],n[s-4],n[s]);break;case 65:i.commit("",n[s],n[s-4],n[s-2]);break;case 66:i.commit("",n[s],n[s-2],n[s-4]);break;case 67:i.commit("",n[s-2],n[s],n[s-4]);break;case 68:i.commit(n[s],"",i.commitType.NORMAL,"");break;case 69:i.commit(n[s],"",i.commitType.NORMAL,n[s-2]);break;case 70:i.commit(n[s-2],"",i.commitType.NORMAL,n[s]);break;case 71:i.commit(n[s-2],"",n[s],"");break;case 72:i.commit(n[s],"",n[s-2],"");break;case 73:i.commit(n[s],n[s-2],i.commitType.NORMAL,"");break;case 74:i.commit(n[s-2],n[s],i.commitType.NORMAL,"");break;case 75:i.commit(n[s-4],"",n[s-2],n[s]);break;case 76:i.commit(n[s-4],"",n[s],n[s-2]);break;case 77:i.commit(n[s-2],"",n[s-4],n[s]);break;case 78:i.commit(n[s],"",n[s-4],n[s-2]);break;case 79:i.commit(n[s],"",n[s-2],n[s-4]);break;case 80:i.commit(n[s-2],"",n[s],n[s-4]);break;case 81:i.commit(n[s-4],n[s],n[s-2],"");break;case 82:i.commit(n[s-4],n[s-2],n[s],"");break;case 83:i.commit(n[s-2],n[s],n[s-4],"");break;case 84:i.commit(n[s],n[s-2],n[s-4],"");break;case 85:i.commit(n[s],n[s-4],n[s-2],"");break;case 86:i.commit(n[s-2],n[s-4],n[s],"");break;case 87:i.commit(n[s-4],n[s],i.commitType.NORMAL,n[s-2]);break;case 88:i.commit(n[s-4],n[s-2],i.commitType.NORMAL,n[s]);break;case 89:i.commit(n[s-2],n[s],i.commitType.NORMAL,n[s-4]);break;case 90:i.commit(n[s],n[s-2],i.commitType.NORMAL,n[s-4]);break;case 91:i.commit(n[s],n[s-4],i.commitType.NORMAL,n[s-2]);break;case 92:i.commit(n[s-2],n[s-4],i.commitType.NORMAL,n[s]);break;case 93:i.commit(n[s-6],n[s-4],n[s-2],n[s]);break;case 94:i.commit(n[s-6],n[s-4],n[s],n[s-2]);break;case 95:i.commit(n[s-6],n[s-2],n[s-4],n[s]);break;case 96:i.commit(n[s-6],n[s],n[s-4],n[s-2]);break;case 97:i.commit(n[s-6],n[s-2],n[s],n[s-4]);break;case 98:i.commit(n[s-6],n[s],n[s-2],n[s-4]);break;case 99:i.commit(n[s-4],n[s-6],n[s-2],n[s]);break;case 100:i.commit(n[s-4],n[s-6],n[s],n[s-2]);break;case 101:i.commit(n[s-2],n[s-6],n[s-4],n[s]);break;case 102:i.commit(n[s],n[s-6],n[s-4],n[s-2]);break;case 103:i.commit(n[s-2],n[s-6],n[s],n[s-4]);break;case 104:i.commit(n[s],n[s-6],n[s-2],n[s-4]);break;case 105:i.commit(n[s],n[s-4],n[s-2],n[s-6]);break;case 106:i.commit(n[s-2],n[s-4],n[s],n[s-6]);break;case 107:i.commit(n[s],n[s-2],n[s-4],n[s-6]);break;case 108:i.commit(n[s-2],n[s],n[s-4],n[s-6]);break;case 109:i.commit(n[s-4],n[s-2],n[s],n[s-6]);break;case 110:i.commit(n[s-4],n[s],n[s-2],n[s-6]);break;case 111:i.commit(n[s-2],n[s-4],n[s-6],n[s]);break;case 112:i.commit(n[s],n[s-4],n[s-6],n[s-2]);break;case 113:i.commit(n[s-2],n[s],n[s-6],n[s-4]);break;case 114:i.commit(n[s],n[s-2],n[s-6],n[s-4]);break;case 115:i.commit(n[s-4],n[s-2],n[s-6],n[s]);break;case 116:i.commit(n[s-4],n[s],n[s-6],n[s-2]);break;case 117:this.$="";break;case 118:this.$=n[s];break;case 119:this.$=i.commitType.NORMAL;break;case 120:this.$=i.commitType.REVERSE;break;case 121:this.$=i.commitType.HIGHLIGHT}},table:[{3:1,4:2,5:e,7:r,13:i,47:a},{1:[3]},{3:7,4:2,5:e,7:r,13:i,47:a},{6:8,7:n,8:[1,9],9:[1,10],10:11,13:c},t(s,[2,124]),t(s,[2,125]),t(s,[2,126]),{1:[2,1]},{7:[1,13]},{6:14,7:n,10:11,13:c},{8:[1,15]},t(o,[2,9],{11:16,12:[1,17]}),t(l,[2,8]),{1:[2,2]},{7:[1,18]},{6:19,7:n,10:11,13:c},{7:[2,6],13:[1,22],14:20,15:21,16:23,17:24,18:25,19:[1,26],21:[1,27],23:[1,28],24:[1,29],25:30,26:[1,31],28:[1,35],31:[1,34],37:[1,33],40:[1,32]},t(l,[2,7]),{1:[2,3]},{7:[1,36]},t(o,[2,10]),{4:37,7:r,13:i,47:a},t(o,[2,12]),t(h,[2,13]),t(h,[2,14]),t(h,[2,15]),{20:[1,38]},{22:[1,39]},t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),{27:40,33:m,46:y},t(h,[2,117],{41:43,32:[1,46],33:[1,48],35:[1,44],38:[1,45],42:[1,47]}),{27:49,33:m,46:y},{32:[1,50],35:[1,51]},{27:52,33:m,46:y},{1:[2,4]},t(o,[2,11]),t(h,[2,16]),t(h,[2,17]),t(h,[2,21]),t(u,[2,122]),t(u,[2,123]),t(h,[2,52]),{33:[1,53]},{39:54,43:p,44:g,45:b},{33:[1,58]},{33:[1,59]},t(h,[2,118]),t(h,[2,36],{32:[1,60],35:[1,62],38:[1,61]}),{33:[1,63]},{33:[1,64],36:[1,65]},t(h,[2,22],{29:[1,66]}),t(h,[2,53],{32:[1,68],38:[1,67],42:[1,69]}),t(h,[2,54],{32:[1,71],35:[1,70],42:[1,72]}),t(d,[2,119]),t(d,[2,120]),t(d,[2,121]),t(h,[2,57],{35:[1,73],38:[1,74],42:[1,75]}),t(h,[2,68],{32:[1,78],35:[1,76],38:[1,77]}),{33:[1,79]},{39:80,43:p,44:g,45:b},{33:[1,81]},t(h,[2,24],{34:[1,82],35:[1,83]}),{32:[1,84]},{32:[1,85]},{30:[1,86]},{39:87,43:p,44:g,45:b},{33:[1,88]},{33:[1,89]},{33:[1,90]},{33:[1,91]},{33:[1,92]},{33:[1,93]},{39:94,43:p,44:g,45:b},{33:[1,95]},{33:[1,96]},{39:97,43:p,44:g,45:b},{33:[1,98]},t(h,[2,37],{35:[1,100],38:[1,99]}),t(h,[2,38],{32:[1,102],35:[1,101]}),t(h,[2,39],{32:[1,103],38:[1,104]}),{33:[1,105]},{33:[1,106],36:[1,107]},{33:[1,108]},{33:[1,109]},t(h,[2,23]),t(h,[2,55],{32:[1,110],42:[1,111]}),t(h,[2,59],{38:[1,112],42:[1,113]}),t(h,[2,69],{32:[1,115],38:[1,114]}),t(h,[2,56],{32:[1,116],42:[1,117]}),t(h,[2,61],{35:[1,118],42:[1,119]}),t(h,[2,72],{32:[1,121],35:[1,120]}),t(h,[2,58],{38:[1,122],42:[1,123]}),t(h,[2,60],{35:[1,124],42:[1,125]}),t(h,[2,73],{35:[1,127],38:[1,126]}),t(h,[2,70],{32:[1,129],38:[1,128]}),t(h,[2,71],{32:[1,131],35:[1,130]}),t(h,[2,74],{35:[1,133],38:[1,132]}),{39:134,43:p,44:g,45:b},{33:[1,135]},{33:[1,136]},{33:[1,137]},{33:[1,138]},{39:139,43:p,44:g,45:b},t(h,[2,25],{35:[1,140]}),t(h,[2,26],{34:[1,141]}),t(h,[2,31],{34:[1,142]}),t(h,[2,29],{34:[1,143]}),t(h,[2,30],{34:[1,144]}),{33:[1,145]},{33:[1,146]},{39:147,43:p,44:g,45:b},{33:[1,148]},{39:149,43:p,44:g,45:b},{33:[1,150]},{33:[1,151]},{33:[1,152]},{33:[1,153]},{33:[1,154]},{33:[1,155]},{33:[1,156]},{39:157,43:p,44:g,45:b},{33:[1,158]},{33:[1,159]},{33:[1,160]},{39:161,43:p,44:g,45:b},{33:[1,162]},{39:163,43:p,44:g,45:b},{33:[1,164]},{33:[1,165]},{33:[1,166]},{39:167,43:p,44:g,45:b},{33:[1,168]},t(h,[2,43],{35:[1,169]}),t(h,[2,44],{38:[1,170]}),t(h,[2,42],{32:[1,171]}),t(h,[2,45],{35:[1,172]}),t(h,[2,40],{38:[1,173]}),t(h,[2,41],{32:[1,174]}),{33:[1,175],36:[1,176]},{33:[1,177]},{33:[1,178]},{33:[1,179]},{33:[1,180]},t(h,[2,66],{42:[1,181]}),t(h,[2,79],{32:[1,182]}),t(h,[2,67],{42:[1,183]}),t(h,[2,90],{38:[1,184]}),t(h,[2,80],{32:[1,185]}),t(h,[2,89],{38:[1,186]}),t(h,[2,65],{42:[1,187]}),t(h,[2,78],{32:[1,188]}),t(h,[2,64],{42:[1,189]}),t(h,[2,84],{35:[1,190]}),t(h,[2,77],{32:[1,191]}),t(h,[2,83],{35:[1,192]}),t(h,[2,63],{42:[1,193]}),t(h,[2,91],{38:[1,194]}),t(h,[2,62],{42:[1,195]}),t(h,[2,85],{35:[1,196]}),t(h,[2,86],{35:[1,197]}),t(h,[2,92],{38:[1,198]}),t(h,[2,76],{32:[1,199]}),t(h,[2,87],{38:[1,200]}),t(h,[2,75],{32:[1,201]}),t(h,[2,81],{35:[1,202]}),t(h,[2,82],{35:[1,203]}),t(h,[2,88],{38:[1,204]}),{33:[1,205]},{39:206,43:p,44:g,45:b},{33:[1,207]},{33:[1,208]},{39:209,43:p,44:g,45:b},{33:[1,210]},t(h,[2,27]),t(h,[2,32]),t(h,[2,28]),t(h,[2,33]),t(h,[2,34]),t(h,[2,35]),{33:[1,211]},{33:[1,212]},{33:[1,213]},{39:214,43:p,44:g,45:b},{33:[1,215]},{39:216,43:p,44:g,45:b},{33:[1,217]},{33:[1,218]},{33:[1,219]},{33:[1,220]},{33:[1,221]},{33:[1,222]},{33:[1,223]},{39:224,43:p,44:g,45:b},{33:[1,225]},{33:[1,226]},{33:[1,227]},{39:228,43:p,44:g,45:b},{33:[1,229]},{39:230,43:p,44:g,45:b},{33:[1,231]},{33:[1,232]},{33:[1,233]},{39:234,43:p,44:g,45:b},t(h,[2,46]),t(h,[2,48]),t(h,[2,47]),t(h,[2,49]),t(h,[2,51]),t(h,[2,50]),t(h,[2,107]),t(h,[2,108]),t(h,[2,105]),t(h,[2,106]),t(h,[2,110]),t(h,[2,109]),t(h,[2,114]),t(h,[2,113]),t(h,[2,112]),t(h,[2,111]),t(h,[2,116]),t(h,[2,115]),t(h,[2,104]),t(h,[2,103]),t(h,[2,102]),t(h,[2,101]),t(h,[2,99]),t(h,[2,100]),t(h,[2,98]),t(h,[2,97]),t(h,[2,96]),t(h,[2,95]),t(h,[2,93]),t(h,[2,94])],defaultActions:{7:[2,1],13:[2,2],18:[2,3],36:[2,4]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],i=[],a=[null],n=[],c=this.table,s="",o=0,l=0,h=n.slice.call(arguments,1),m=Object.create(this.lexer),y={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(y.yy[u]=this.yy[u]);m.setInput(t,y.yy),y.yy.lexer=m,y.yy.parser=this,void 0===m.yylloc&&(m.yylloc={});var p=m.yylloc;n.push(p);var g=m.options&&m.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,d,f,$,k,x,_,T,w,E={};;){if(d=r[r.length-1],this.defaultActions[d]?f=this.defaultActions[d]:(null==b&&(w=void 0,"number"!=typeof(w=i.pop()||m.lex()||1)&&(w instanceof Array&&(w=(i=w).pop()),w=e.symbols_[w]||w),b=w),f=c[d]&&c[d][b]),void 0===f||!f.length||!f[0]){var L="";for(k in T=[],c[d])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");L=m.showPosition?"Parse error on line "+(o+1)+":\n"+m.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:m.match,token:this.terminals_[b]||b,line:m.yylineno,loc:p,expected:T})}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+d+", token: "+b);switch(f[0]){case 1:r.push(b),a.push(m.yytext),n.push(m.yylloc),r.push(f[1]),b=null,l=m.yyleng,s=m.yytext,o=m.yylineno,p=m.yylloc;break;case 2:if(x=this.productions_[f[1]][1],E.$=a[a.length-x],E._$={first_line:n[n.length-(x||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(x||1)].first_column,last_column:n[n.length-1].last_column},g&&(E._$.range=[n[n.length-(x||1)].range[0],n[n.length-1].range[1]]),void 0!==($=this.performAction.apply(E,[s,l,o,y.yy,f[1],a,n].concat(h))))return $;x&&(r=r.slice(0,-1*x*2),a=a.slice(0,-1*x),n=n.slice(0,-1*x)),r.push(this.productions_[f[1]][0]),a.push(E.$),n.push(E._$),_=c[r[r.length-2]][r[r.length-1]],r.push(_);break;case 3:return!0}}return!0}},$={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.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:r?(r.length===i.length?this.yylloc.first_column:0)+i[i.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,i,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))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if((r=this._input.match(this.rules[a[n]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,a[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,i){switch(r){case 0:return this.begin("acc_title"),19;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),21;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 30:case 34:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 13;case 8:case 9:break;case 10:return 5;case 11:return 40;case 12:return 32;case 13:return 38;case 14:return 42;case 15:return 43;case 16:return 44;case 17:return 45;case 18:return 35;case 19:return 28;case 20:return 29;case 21:return 37;case 22:return 31;case 23:return 34;case 24:return 26;case 25:case 26:return 9;case 27:return 8;case 28:return"CARET";case 29:this.begin("options");break;case 31:return 12;case 32:return 36;case 33:this.begin("string");break;case 35:return 33;case 36:return 30;case 37:return 46;case 38:return 7}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:parent:)/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:TB\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},options:{rules:[30,31],inclusive:!1},string:{rules:[34,35],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,32,33,36,37,38,39],inclusive:!0}}};function k(){this.yy={}}return f.lexer=$,k.prototype=f,f.Parser=k,new k}());n.parser=n;const c=n;let s=(0,i.c)().gitGraph.mainBranchName,o=(0,i.c)().gitGraph.mainBranchOrder,l={},h=null,m={};m[s]={name:s,order:o};let y={};y[s]=h;let u=s,p="LR",g=0;function b(){return(0,i.y)({length:7})}let d={};const f=function(t){if(t=i.e.sanitizeText(t,(0,i.c)()),void 0===y[t]){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}{u=t;const e=y[u];h=l[e]}};function $(t,e,r){const i=t.indexOf(e);-1===i?t.push(r):t.splice(i,1,r)}function k(t){const e=t.reduce(((t,e)=>t.seq>e.seq?t:e),t[0]);let r="";t.forEach((function(t){r+=t===e?"\t*":"\t|"}));const a=[r,e.id,e.seq];for(let i in y)y[i]===e.id&&a.push(i);if(i.l.debug(a.join(" ")),e.parents&&2==e.parents.length){const r=l[e.parents[0]];$(t,e,r),t.push(l[e.parents[1]])}else{if(0==e.parents.length)return;{const r=l[e.parents];$(t,e,r)}}k(t=function(t,e){const r=Object.create(null);return t.reduce(((t,i)=>{const a=e(i);return r[a]||(r[a]=!0,t.push(i)),t}),[])}(t,(t=>t.id)))}const x=function(){const t=Object.keys(l).map((function(t){return l[t]}));return t.forEach((function(t){i.l.debug(t.id)})),t.sort(((t,e)=>t.seq-e.seq)),t},_={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},T={getConfig:()=>(0,i.c)().gitGraph,setDirection:function(t){p=t},setOptions:function(t){i.l.debug("options str",t),t=(t=t&&t.trim())||"{}";try{d=JSON.parse(t)}catch(e){i.l.error("error while parsing gitGraph options",e.message)}},getOptions:function(){return d},commit:function(t,e,r,a){i.l.debug("Entering commit:",t,e,r,a),e=i.e.sanitizeText(e,(0,i.c)()),t=i.e.sanitizeText(t,(0,i.c)()),a=i.e.sanitizeText(a,(0,i.c)());const n={id:e||g+"-"+b(),message:t,seq:g++,type:r||_.NORMAL,tag:a||"",parents:null==h?[]:[h.id],branch:u};h=n,l[n.id]=n,y[u]=n.id,i.l.debug("in pushCommit "+n.id)},branch:function(t,e){if(t=i.e.sanitizeText(t,(0,i.c)()),void 0!==y[t]){let e=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw e.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},e}y[t]=null!=h?h.id:null,m[t]={name:t,order:e?parseInt(e,10):null},f(t),i.l.debug("in createBranch")},merge:function(t,e,r,a){t=i.e.sanitizeText(t,(0,i.c)()),e=i.e.sanitizeText(e,(0,i.c)());const n=l[y[u]],c=l[y[t]];if(u===t){let e=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(void 0===n||!n){let e=new Error('Incorrect usage of "merge". Current branch ('+u+")has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},e}if(void 0===y[t]){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},e}if(void 0===c||!c){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},e}if(n===c){let e=new Error('Incorrect usage of "merge". Both branches have same head');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(e&&void 0!==l[e]){let i=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw i.hash={text:"merge "+t+e+r+a,token:"merge "+t+e+r+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+r+" "+a]},i}const s={id:e||g+"-"+b(),message:"merged branch "+t+" into "+u,seq:g++,parents:[null==h?null:h.id,y[t]],branch:u,type:_.MERGE,customType:r,customId:!!e,tag:a||""};h=s,l[s.id]=s,y[u]=s.id,i.l.debug(y),i.l.debug("in mergeBranch")},cherryPick:function(t,e,r,a){if(i.l.debug("Entering cherryPick:",t,e,r),t=i.e.sanitizeText(t,(0,i.c)()),e=i.e.sanitizeText(e,(0,i.c)()),r=i.e.sanitizeText(r,(0,i.c)()),a=i.e.sanitizeText(a,(0,i.c)()),!t||void 0===l[t]){let r=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw r.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},r}let n=l[t],c=n.branch;if(a&&(!Array.isArray(n.parents)||!n.parents.includes(a))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}if(n.type===_.MERGE&&!a){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!e||void 0===l[e]){if(c===u){let r=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw r.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},r}const s=l[y[u]];if(void 0===s||!s){let r=new Error('Incorrect usage of "cherry-pick". Current branch ('+u+")has no commits");throw r.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},r}const o={id:g+"-"+b(),message:"cherry-picked "+n+" into "+u,seq:g++,parents:[null==h?null:h.id,n.id],branch:u,type:_.CHERRY_PICK,tag:r??`cherry-pick:${n.id}${n.type===_.MERGE?`|parent:${a}`:""}`};h=o,l[o.id]=o,y[u]=o.id,i.l.debug(y),i.l.debug("in cherryPick")}},checkout:f,prettyPrint:function(){i.l.debug(l);k([x()[0]])},clear:function(){l={},h=null;let t=(0,i.c)().gitGraph.mainBranchName,e=(0,i.c)().gitGraph.mainBranchOrder;y={},y[t]=null,m={},m[t]={name:t,order:e},u=t,g=0,(0,i.v)()},getBranchesAsObjArray:function(){return Object.values(m).map(((t,e)=>null!==t.order?t:{...t,order:parseFloat(`0.${e}`,10)})).sort(((t,e)=>t.order-e.order)).map((({name:t})=>({name:t})))},getBranches:function(){return y},getCommits:function(){return l},getCommitsArray:x,getCurrentBranch:function(){return u},getDirection:function(){return p},getHead:function(){return h},setAccTitle:i.s,getAccTitle:i.g,getAccDescription:i.a,setAccDescription:i.b,setDiagramTitle:i.q,getDiagramTitle:i.t,commitType:_};let w={};const E=0,L=1,M=2,v=3,I=4;let A={},R={},O=[],C=0,S="LR";const P=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let r=[];r="string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?t:[];for(const i of r){const t=document.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","0"),t.setAttribute("class","row"),t.textContent=i.trim(),e.appendChild(t)}return e},B=(t,e,r)=>{const a=(0,i.c)().gitGraph,n=t.append("g").attr("class","commit-bullets"),c=t.append("g").attr("class","commit-labels");let s=0;"TB"===S&&(s=30);const o=Object.keys(e).sort(((t,r)=>e[t].seq-e[r].seq)),l=a.parallelCommits,h=10;o.forEach((t=>{const i=e[t];if(l)if(i.parents.length){const t=(t=>{let e="",r=0;return t.forEach((t=>{const i="TB"===S?R[t].y:R[t].x;i>=r&&(e=t,r=i)})),e||void 0})(i.parents);s="TB"===S?R[t].y+40:R[t].x+40}else s=0,"TB"===S&&(s=30);const o=s+h,m="TB"===S?o:A[i.branch].pos,y="TB"===S?A[i.branch].pos:o;if(r){let t,e=void 0!==i.customType&&""!==i.customType?i.customType:i.type;switch(e){case E:t="commit-normal";break;case L:t="commit-reverse";break;case M:t="commit-highlight";break;case v:t="commit-merge";break;case I:t="commit-cherry-pick";break;default:t="commit-normal"}if(e===M){const e=n.append("rect");e.attr("x",y-10),e.attr("y",m-10),e.attr("height",20),e.attr("width",20),e.attr("class",`commit ${i.id} commit-highlight${A[i.branch].index%8} ${t}-outer`),n.append("rect").attr("x",y-6).attr("y",m-6).attr("height",12).attr("width",12).attr("class",`commit ${i.id} commit${A[i.branch].index%8} ${t}-inner`)}else if(e===I)n.append("circle").attr("cx",y).attr("cy",m).attr("r",10).attr("class",`commit ${i.id} ${t}`),n.append("circle").attr("cx",y-3).attr("cy",m+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${i.id} ${t}`),n.append("circle").attr("cx",y+3).attr("cy",m+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${i.id} ${t}`),n.append("line").attr("x1",y+3).attr("y1",m+1).attr("x2",y).attr("y2",m-5).attr("stroke","#fff").attr("class",`commit ${i.id} ${t}`),n.append("line").attr("x1",y-3).attr("y1",m+1).attr("x2",y).attr("y2",m-5).attr("stroke","#fff").attr("class",`commit ${i.id} ${t}`);else{const r=n.append("circle");if(r.attr("cx",y),r.attr("cy",m),r.attr("r",i.type===v?9:10),r.attr("class",`commit ${i.id} commit${A[i.branch].index%8}`),e===v){const e=n.append("circle");e.attr("cx",y),e.attr("cy",m),e.attr("r",6),e.attr("class",`commit ${t} ${i.id} commit${A[i.branch].index%8}`)}if(e===L){n.append("path").attr("d",`M ${y-5},${m-5}L${y+5},${m+5}M${y-5},${m+5}L${y+5},${m-5}`).attr("class",`commit ${t} ${i.id} commit${A[i.branch].index%8}`)}}}if(R[i.id]="TB"===S?{x:y,y:o}:{x:o,y:m},r){const t=4,e=2;if(i.type!==I&&(i.customId&&i.type===v||i.type!==v)&&a.showCommitLabel){const r=c.append("g"),n=r.insert("rect").attr("class","commit-label-bkg"),l=r.append("text").attr("x",s).attr("y",m+25).attr("class","commit-label").text(i.id);let h=l.node().getBBox();if(n.attr("x",o-h.width/2-e).attr("y",m+13.5).attr("width",h.width+2*e).attr("height",h.height+2*e),"TB"===S&&(n.attr("x",y-(h.width+4*t+5)).attr("y",m-12),l.attr("x",y-(h.width+4*t)).attr("y",m+h.height-12)),"TB"!==S&&l.attr("x",o-h.width/2),a.rotateCommitLabel)if("TB"===S)l.attr("transform","rotate(-45, "+y+", "+m+")"),n.attr("transform","rotate(-45, "+y+", "+m+")");else{let t=-7.5-(h.width+10)/25*9.5,e=10+h.width/25*8.5;r.attr("transform","translate("+t+", "+e+") rotate(-45, "+s+", "+m+")")}}if(i.tag){const r=c.insert("polygon"),a=c.append("circle"),n=c.append("text").attr("y",m-16).attr("class","tag-label").text(i.tag);let l=n.node().getBBox();n.attr("x",o-l.width/2);const u=l.height/2,p=m-19.2;r.attr("class","tag-label-bkg").attr("points",`\n ${s-l.width/2-t/2},${p+e}\n ${s-l.width/2-t/2},${p-e}\n ${o-l.width/2-t},${p-u-e}\n ${o+l.width/2+t},${p-u-e}\n ${o+l.width/2+t},${p+u+e}\n ${o-l.width/2-t},${p+u+e}`),a.attr("cx",s-l.width/2+t/2).attr("cy",p).attr("r",1.5).attr("class","tag-hole"),"TB"===S&&(r.attr("class","tag-label-bkg").attr("points",`\n ${y},${s+e}\n ${y},${s-e}\n ${y+h},${s-u-e}\n ${y+h+l.width+t},${s-u-e}\n ${y+h+l.width+t},${s+u+e}\n ${y+h},${s+u+e}`).attr("transform","translate(12,12) rotate(45, "+y+","+s+")"),a.attr("cx",y+t/2).attr("cy",s).attr("transform","translate(12,12) rotate(45, "+y+","+s+")"),n.attr("x",y+5).attr("y",s+3).attr("transform","translate(14,14) rotate(45, "+y+","+s+")"))}}s+=50,s>C&&(C=s)}))},N=(t,e,r,i,a)=>{const n=("TB"===S?r.x<i.x:r.y<i.y)?e.branch:t.branch;return Object.values(a).some((r=>{return(i=r).seq>t.seq&&i.seq<e.seq&&(t=>t.branch===n)(r);var i}))},G=(t,e,r=0)=>{const i=t+Math.abs(t-e)/2;if(r>5)return i;if(O.every((t=>Math.abs(t-i)>=10)))return O.push(i),i;const a=Math.abs(t-e);return G(t,e-a/5,r+1)},H=(t,e)=>{const r=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach((t=>{const i=e[t];i.parents&&i.parents.length>0&&i.parents.forEach((t=>{((t,e,r,i)=>{const a=R[e.id],n=R[r.id],c=N(e,r,a,n,i);let s,o="",l="",h=0,m=0,y=A[r.branch].index;if(r.type===v&&e.id!==r.parents[0]&&(y=A[e.branch].index),c){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,m=10;const t=a.y<n.y?G(a.y,n.y):G(n.y,a.y),r=a.x<n.x?G(a.x,n.x):G(n.x,a.x);"TB"===S?a.x<n.x?s=`M ${a.x} ${a.y} L ${r-h} ${a.y} ${l} ${r} ${a.y+m} L ${r} ${n.y-h} ${o} ${r+m} ${n.y} L ${n.x} ${n.y}`:(y=A[e.branch].index,s=`M ${a.x} ${a.y} L ${r+h} ${a.y} ${o} ${r} ${a.y+m} L ${r} ${n.y-h} ${l} ${r-m} ${n.y} L ${n.x} ${n.y}`):a.y<n.y?s=`M ${a.x} ${a.y} L ${a.x} ${t-h} ${o} ${a.x+m} ${t} L ${n.x-h} ${t} ${l} ${n.x} ${t+m} L ${n.x} ${n.y}`:(y=A[e.branch].index,s=`M ${a.x} ${a.y} L ${a.x} ${t+h} ${l} ${a.x+m} ${t} L ${n.x-h} ${t} ${o} ${n.x} ${t-m} L ${n.x} ${n.y}`)}else o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",h=20,m=20,"TB"===S?(a.x<n.x&&(s=r.type===v&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${n.y-h} ${o} ${a.x+m} ${n.y} L ${n.x} ${n.y}`:`M ${a.x} ${a.y} L ${n.x-h} ${a.y} ${l} ${n.x} ${a.y+m} L ${n.x} ${n.y}`),a.x>n.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",h=20,m=20,s=r.type===v&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${n.y-h} ${l} ${a.x-m} ${n.y} L ${n.x} ${n.y}`:`M ${a.x} ${a.y} L ${n.x+h} ${a.y} ${o} ${n.x} ${a.y+m} L ${n.x} ${n.y}`),a.x===n.x&&(s=`M ${a.x} ${a.y} L ${n.x} ${n.y}`)):(a.y<n.y&&(s=r.type===v&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${n.x-h} ${a.y} ${l} ${n.x} ${a.y+m} L ${n.x} ${n.y}`:`M ${a.x} ${a.y} L ${a.x} ${n.y-h} ${o} ${a.x+m} ${n.y} L ${n.x} ${n.y}`),a.y>n.y&&(s=r.type===v&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${n.x-h} ${a.y} ${o} ${n.x} ${a.y-m} L ${n.x} ${n.y}`:`M ${a.x} ${a.y} L ${a.x} ${n.y+h} ${l} ${a.x+m} ${n.y} L ${n.x} ${n.y}`),a.y===n.y&&(s=`M ${a.x} ${a.y} L ${n.x} ${n.y}`));t.append("path").attr("d",s).attr("class","arrow arrow"+y%8)})(r,e[t],i,e)}))}))},z={parser:c,db:T,renderer:{draw:function(t,e,r,n){A={},R={},w={},C=0,O=[],S="LR";const c=(0,i.c)(),s=c.gitGraph;i.l.debug("in gitgraph renderer",t+"\n","id:",e,r),w=n.db.getCommits();const o=n.db.getBranchesAsObjArray();S=n.db.getDirection();const l=(0,a.Ltv)(`[id="${e}"]`);let h=0;o.forEach(((t,e)=>{const r=P(t.name),i=l.append("g"),a=i.insert("g").attr("class","branchLabel"),n=a.insert("g").attr("class","label branch-label");n.node().appendChild(r);let c=r.getBBox();A[t.name]={pos:h,index:e},h+=50+(s.rotateCommitLabel?40:0)+("TB"===S?c.width/2:0),n.remove(),a.remove(),i.remove()})),B(l,w,!1),s.showBranches&&((t,e)=>{const r=(0,i.c)().gitGraph,a=t.append("g");e.forEach(((t,e)=>{const i=e%8,n=A[t.name].pos,c=a.append("line");c.attr("x1",0),c.attr("y1",n),c.attr("x2",C),c.attr("y2",n),c.attr("class","branch branch"+i),"TB"===S&&(c.attr("y1",30),c.attr("x1",n),c.attr("y2",C),c.attr("x2",n)),O.push(n);let s=t.name;const o=P(s),l=a.insert("rect"),h=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+i);h.node().appendChild(o);let m=o.getBBox();l.attr("class","branchLabelBkg label"+i).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(!0===r.rotateCommitLabel?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),h.attr("transform","translate("+(-m.width-14-(!0===r.rotateCommitLabel?30:0))+", "+(n-m.height/2-1)+")"),"TB"===S&&(l.attr("x",n-m.width/2-10).attr("y",0),h.attr("transform","translate("+(n-m.width/2-5)+", 0)")),"TB"!==S&&l.attr("transform","translate(-19, "+(n-m.height/2)+")")}))})(l,o),H(l,w),B(l,w,!0),i.u.insertTitle(l,"gitTitleText",s.titleTopMargin,n.db.getDiagramTitle()),(0,i.z)(void 0,l,s.diagramPadding,s.useMaxWidth??c.useMaxWidth)}},styles:t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((e=>`\n .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${e} { fill: ${t["git"+e]}; }\n .arrow${e} { stroke: ${t["git"+e]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`}}}]); \ No newline at end of file diff --git a/assets/js/67db73f0.e7ff6635.js b/assets/js/67db73f0.e7ff6635.js new file mode 100644 index 00000000..02aa8979 --- /dev/null +++ b/assets/js/67db73f0.e7ff6635.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[8356],{7729:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var t=i(4848),s=i(8453);i(6540);i(2303);const o={},r="Setup",l={id:"contribute/development-guide/setup",title:"Setup",description:"Prerequisites",source:"@site/docs/contribute/development-guide/setup.md",sourceDirName:"contribute/development-guide",slug:"/contribute/development-guide/setup",permalink:"/tagreader-python/docs/contribute/development-guide/setup",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/contribute/development-guide/setup.md",tags:[],version:"current",frontMatter:{},sidebar:"contribute",previous:{title:"Publishing",permalink:"/tagreader-python/docs/contribute/development-guide/publishing"},next:{title:"Testing",permalink:"/tagreader-python/docs/contribute/development-guide/testing"}},a={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Pre-commit",id:"pre-commit",level:2},{value:"Installation",id:"installation",level:3},{value:"Usage",id:"usage",level:3},{value:"Install Poetry",id:"install-poetry",level:3},{value:"Install packages",id:"install-packages",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"setup",children:"Setup"})}),"\n","\n",(0,t.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsx)(n.p,{children:"To work with the tagreader code you'll need to install:"}),"\n",(0,t.jsx)(n.p,{children:"Python >=3.8 with the following packages:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"pandas >= 1.0.0"}),"\n",(0,t.jsx)(n.li,{children:"requests"}),"\n",(0,t.jsx)(n.li,{children:"requests-kerberos"}),"\n",(0,t.jsx)(n.li,{children:"certifi >= 2023.5.7"}),"\n",(0,t.jsx)(n.li,{children:"diskcache"}),"\n",(0,t.jsx)(n.li,{children:"pyodbc (If using ODBC connection)"}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{title:"ODBC Connection",type:"info",children:(0,t.jsx)(n.p,{children:"If using ODBC connections, you must also install proprietary drivers for PI ODBC and/or Aspen IP.21 SQLPlus. These\ndrivers are only available for Microsoft Windows. Pyodbc will therefore not be installed for non-Windows systems."})}),"\n",(0,t.jsx)(n.h2,{id:"pre-commit",children:"Pre-commit"}),"\n",(0,t.jsx)(n.p,{children:"When contributing to this project, pre-commits are necessary, as they run certain tests, sanitisers, and formatters."}),"\n",(0,t.jsxs)(n.p,{children:["The project provides a ",(0,t.jsx)(n.code,{children:".pre-commit-config.yaml"})," file that is used to set up git ",(0,t.jsx)(n.em,{children:"pre-commit hooks"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"On commit locally, code is automatically formatted and checked for security vulnerabilities using pre-commit git hooks."}),"\n",(0,t.jsx)(n.h3,{id:"installation",children:"Installation"}),"\n",(0,t.jsx)(n.p,{children:"To initialize pre-commit in your local repository, run"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-shell",children:"pre-commit install\n"})}),"\n",(0,t.jsx)(n.p,{children:"This tells pre-commit to run for this repository on every commit."}),"\n",(0,t.jsx)(n.h3,{id:"usage",children:"Usage"}),"\n",(0,t.jsx)(n.p,{children:"Pre-commit will run on every commit, but can also be run manually on all files:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-shell",children:"pre-commit run --all-files\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Pre-commit tests can be skipped on commits with ",(0,t.jsx)(n.code,{children:"git commit --no-verify"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsx)(n.p,{children:"If you have to skip the pre-commit tests, you're probably doing something you're not supposed to, and whoever commits after you might have to fix your \"mistakes\". Consider updating the pre-commit hooks if your code is non-compliant."})}),"\n",(0,t.jsx)(n.h3,{id:"install-poetry",children:"Install Poetry"}),"\n",(0,t.jsx)(n.p,{children:"Poetry is used to manage Python package dependencies."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-shell",children:"$ pip install poetry\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The installation instructions can be found ",(0,t.jsx)(n.a,{href:"https://python-poetry.org/docs/#installation",children:"here"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"install-packages",children:"Install packages"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-shell",children:"$ poetry install\n"})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}}}]); \ No newline at end of file diff --git a/assets/js/688.b0db22c8.js b/assets/js/688.b0db22c8.js new file mode 100644 index 00000000..877410ee --- /dev/null +++ b/assets/js/688.b0db22c8.js @@ -0,0 +1,26176 @@ +"use strict"; +exports.id = 688; +exports.ids = [688]; +exports.modules = { + +/***/ 1176: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + Zp: () => (/* reexport */ layout) +}); + +// UNUSED EXPORTS: acyclic, normalize, rank + +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js +var uniqueId = __webpack_require__(5664); +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/map.js +var map = __webpack_require__(4722); +// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules +var range = __webpack_require__(1395); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js +var graphlib = __webpack_require__(697); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js +/* + * Simple doubly linked list implementation derived from Cormen, et al., + * "Introduction to Algorithms". + */ + + + +class List { + constructor() { + var sentinel = {}; + sentinel._next = sentinel._prev = sentinel; + this._sentinel = sentinel; + } + dequeue() { + var sentinel = this._sentinel; + var entry = sentinel._prev; + if (entry !== sentinel) { + unlink(entry); + return entry; + } + } + enqueue(entry) { + var sentinel = this._sentinel; + if (entry._prev && entry._next) { + unlink(entry); + } + entry._next = sentinel._next; + sentinel._next._prev = entry; + sentinel._next = entry; + entry._prev = sentinel; + } + toString() { + var strs = []; + var sentinel = this._sentinel; + var curr = sentinel._prev; + while (curr !== sentinel) { + strs.push(JSON.stringify(curr, filterOutLinks)); + curr = curr._prev; + } + return '[' + strs.join(', ') + ']'; + } +} + +function unlink(entry) { + entry._prev._next = entry._next; + entry._next._prev = entry._prev; + delete entry._next; + delete entry._prev; +} + +function filterOutLinks(k, v) { + if (k !== '_next' && k !== '_prev') { + return v; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js + + + + +/* + * A greedy heuristic for finding a feedback arc set for a graph. A feedback + * arc set is a set of edges that can be removed to make a graph acyclic. + * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and + * effective heuristic for the feedback arc set problem." This implementation + * adjusts that from the paper to allow for weighted edges. + */ + + +var DEFAULT_WEIGHT_FN = constant/* default */.A(1); + +function greedyFAS(g, weightFn) { + if (g.nodeCount() <= 1) { + return []; + } + var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); + var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); + + // Expand multi-edges + return flatten/* default */.A( + map/* default */.A(results, function (e) { + return g.outEdges(e.v, e.w); + }) + ); +} + +function doGreedyFAS(g, buckets, zeroIdx) { + var results = []; + var sources = buckets[buckets.length - 1]; + var sinks = buckets[0]; + + var entry; + while (g.nodeCount()) { + while ((entry = sinks.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + while ((entry = sources.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + if (g.nodeCount()) { + for (var i = buckets.length - 2; i > 0; --i) { + entry = buckets[i].dequeue(); + if (entry) { + results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); + break; + } + } + } + } + + return results; +} + +function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { + var results = collectPredecessors ? [] : undefined; + + forEach/* default */.A(g.inEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var uEntry = g.node(edge.v); + + if (collectPredecessors) { + results.push({ v: edge.v, w: edge.w }); + } + + uEntry.out -= weight; + assignBucket(buckets, zeroIdx, uEntry); + }); + + forEach/* default */.A(g.outEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var w = edge.w; + var wEntry = g.node(w); + wEntry['in'] -= weight; + assignBucket(buckets, zeroIdx, wEntry); + }); + + g.removeNode(entry.v); + + return results; +} + +function buildState(g, weightFn) { + var fasGraph = new graphlib/* Graph */.T(); + var maxIn = 0; + var maxOut = 0; + + forEach/* default */.A(g.nodes(), function (v) { + fasGraph.setNode(v, { v: v, in: 0, out: 0 }); + }); + + // Aggregate weights on nodes, but also sum the weights across multi-edges + // into a single edge for the fasGraph. + forEach/* default */.A(g.edges(), function (e) { + var prevWeight = fasGraph.edge(e.v, e.w) || 0; + var weight = weightFn(e); + var edgeWeight = prevWeight + weight; + fasGraph.setEdge(e.v, e.w, edgeWeight); + maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); + maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); + }); + + var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { + return new List(); + }); + var zeroIdx = maxIn + 1; + + forEach/* default */.A(fasGraph.nodes(), function (v) { + assignBucket(buckets, zeroIdx, fasGraph.node(v)); + }); + + return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; +} + +function assignBucket(buckets, zeroIdx, entry) { + if (!entry.out) { + buckets[0].enqueue(entry); + } else if (!entry['in']) { + buckets[buckets.length - 1].enqueue(entry); + } else { + buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js + + + + + +function run(g) { + var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); + forEach/* default */.A(fas, function (e) { + var label = g.edge(e); + g.removeEdge(e); + label.forwardName = e.name; + label.reversed = true; + g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); + }); + + function weightFn(g) { + return function (e) { + return g.edge(e).weight; + }; + } +} + +function dfsFAS(g) { + var fas = []; + var stack = {}; + var visited = {}; + + function dfs(v) { + if (has/* default */.A(visited, v)) { + return; + } + visited[v] = true; + stack[v] = true; + forEach/* default */.A(g.outEdges(v), function (e) { + if (has/* default */.A(stack, e.w)) { + fas.push(e); + } else { + dfs(e.w); + } + }); + delete stack[v]; + } + + forEach/* default */.A(g.nodes(), dfs); + return fas; +} + +function undo(g) { + forEach/* default */.A(g.edges(), function (e) { + var label = g.edge(e); + if (label.reversed) { + g.removeEdge(e); + + var forwardName = label.forwardName; + delete label.reversed; + delete label.forwardName; + g.setEdge(e.w, e.v, label, forwardName); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules +var merge = __webpack_require__(8879); +// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules +var pick = __webpack_require__(1942); +// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js +var defaults = __webpack_require__(3068); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js + + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !(0,isSymbol/* default */.A)(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +/* harmony default export */ const _baseExtremum = (baseExtremum); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +/* harmony default export */ const _baseGt = (baseGt); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js + + + + +/** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ +function max(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseGt) + : undefined; +} + +/* harmony default export */ const lodash_es_max = (max); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +/* harmony default export */ const lodash_es_last = (last); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js +var _baseAssignValue = __webpack_require__(2528); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js + + + + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); + + (0,_baseForOwn/* default */.A)(object, function(value, key, object) { + (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ const lodash_es_mapValues = (mapValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +/* harmony default export */ const _baseLt = (baseLt); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js + + + + +/** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ +function min(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_min = (min); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js +var _root = __webpack_require__(1917); +;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js + + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return _root/* default */.A.Date.now(); +}; + +/* harmony default export */ const lodash_es_now = (now); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js + + + + + +/* + * Adds a dummy node to the graph and return v. + */ +function addDummyNode(g, type, attrs, name) { + var v; + do { + v = uniqueId/* default */.A(name); + } while (g.hasNode(v)); + + attrs.dummy = type; + g.setNode(v, attrs); + return v; +} + +/* + * Returns a new graph with only simple edges. Handles aggregation of data + * associated with multi-edges. + */ +function simplify(g) { + var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + simplified.setNode(v, g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; + var label = g.edge(e); + simplified.setEdge(e.v, e.w, { + weight: simpleLabel.weight + label.weight, + minlen: Math.max(simpleLabel.minlen, label.minlen), + }); + }); + return simplified; +} + +function asNonCompoundGraph(g) { + var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + if (!g.children(v).length) { + simplified.setNode(v, g.node(v)); + } + }); + forEach/* default */.A(g.edges(), function (e) { + simplified.setEdge(e, g.edge(e)); + }); + return simplified; +} + +function successorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var sucs = {}; + _.forEach(g.outEdges(v), function (e) { + sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; + }); + return sucs; + }); + return _.zipObject(g.nodes(), weightMap); +} + +function predecessorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var preds = {}; + _.forEach(g.inEdges(v), function (e) { + preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; + }); + return preds; + }); + return _.zipObject(g.nodes(), weightMap); +} + +/* + * Finds where a line starting at point ({x, y}) would intersect a rectangle + * ({x, y, width, height}) if it were pointing at the rectangle's center. + */ +function intersectRect(rect, point) { + var x = rect.x; + var y = rect.y; + + // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes + var dx = point.x - x; + var dy = point.y - y; + var w = rect.width / 2; + var h = rect.height / 2; + + if (!dx && !dy) { + throw new Error('Not possible to find intersection inside of the rectangle'); + } + + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } + sx = (h * dx) / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } + sx = w; + sy = (w * dy) / dx; + } + + return { x: x + sx, y: y + sy }; +} + +/* + * Given a DAG with each node assigned "rank" and "order" properties, this + * function will produce a matrix with the ids of each node. + */ +function buildLayerMatrix(g) { + var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { + return []; + }); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + var rank = node.rank; + if (!isUndefined/* default */.A(rank)) { + layering[rank][node.order] = v; + } + }); + return layering; +} + +/* + * Adjusts the ranks for all nodes in the graph such that all nodes v have + * rank(v) >= 0 and at least one node w has rank(w) = 0. + */ +function normalizeRanks(g) { + var min = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (has/* default */.A(node, 'rank')) { + node.rank -= min; + } + }); +} + +function removeEmptyRanks(g) { + // Ranks may not start at 0, so we need to offset them + var offset = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + + var layers = []; + forEach/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank - offset; + if (!layers[rank]) { + layers[rank] = []; + } + layers[rank].push(v); + }); + + var delta = 0; + var nodeRankFactor = g.graph().nodeRankFactor; + forEach/* default */.A(layers, function (vs, i) { + if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { + --delta; + } else if (delta) { + forEach/* default */.A(vs, function (v) { + g.node(v).rank += delta; + }); + } + }); +} + +function addBorderNode(g, prefix, rank, order) { + var node = { + width: 0, + height: 0, + }; + if (arguments.length >= 4) { + node.rank = rank; + node.order = order; + } + return addDummyNode(g, 'border', node, prefix); +} + +function util_maxRank(g) { + return lodash_es_max( + map/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank; + if (!isUndefined/* default */.A(rank)) { + return rank; + } + }) + ); +} + +/* + * Partition a collection into two groups: `lhs` and `rhs`. If the supplied + * function returns true for an entry it goes into `lhs`. Otherwise it goes + * into `rhs. + */ +function partition(collection, fn) { + var result = { lhs: [], rhs: [] }; + forEach/* default */.A(collection, function (value) { + if (fn(value)) { + result.lhs.push(value); + } else { + result.rhs.push(value); + } + }); + return result; +} + +/* + * Returns a new function that wraps `fn` with a timer. The wrapper logs the + * time it takes to execute the function. + */ +function util_time(name, fn) { + var start = lodash_es_now(); + try { + return fn(); + } finally { + console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); + } +} + +function notime(name, fn) { + return fn(); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js + + + + + +function addBorderSegments(g) { + function dfs(v) { + var children = g.children(v); + var node = g.node(v); + if (children.length) { + forEach/* default */.A(children, dfs); + } + + if (has/* default */.A(node, 'minRank')) { + node.borderLeft = []; + node.borderRight = []; + for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { + add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); + add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); + } + } + } + + forEach/* default */.A(g.children(), dfs); +} + +function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { + var label = { width: 0, height: 0, rank: rank, borderType: prop }; + var prev = sgNode[prop][rank - 1]; + var curr = addDummyNode(g, 'border', label, prefix); + sgNode[prop][rank] = curr; + g.setParent(curr, sg); + if (prev) { + g.setEdge(prev, curr, { weight: 1 }); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js + + + + +function adjust(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'lr' || rankDir === 'rl') { + swapWidthHeight(g); + } +} + +function coordinate_system_undo(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'bt' || rankDir === 'rl') { + reverseY(g); + } + + if (rankDir === 'lr' || rankDir === 'rl') { + swapXY(g); + swapWidthHeight(g); + } +} + +function swapWidthHeight(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapWidthHeightOne(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + swapWidthHeightOne(g.edge(e)); + }); +} + +function swapWidthHeightOne(attrs) { + var w = attrs.width; + attrs.width = attrs.height; + attrs.height = w; +} + +function reverseY(g) { + forEach/* default */.A(g.nodes(), function (v) { + reverseYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, reverseYOne); + if (has/* default */.A(edge, 'y')) { + reverseYOne(edge); + } + }); +} + +function reverseYOne(attrs) { + attrs.y = -attrs.y; +} + +function swapXY(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapXYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, swapXYOne); + if (has/* default */.A(edge, 'x')) { + swapXYOne(edge); + } + }); +} + +function swapXYOne(attrs) { + var x = attrs.x; + attrs.x = attrs.y; + attrs.y = x; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js + + + + + +/* + * Breaks any long edges in the graph into short segments that span 1 layer + * each. This operation is undoable with the denormalize function. + * + * Pre-conditions: + * + * 1. The input graph is a DAG. + * 2. Each node in the graph has a "rank" property. + * + * Post-condition: + * + * 1. All edges in the graph have a length of 1. + * 2. Dummy nodes are added where edges have been split into segments. + * 3. The graph is augmented with a "dummyChains" attribute which contains + * the first dummy in each chain of dummy nodes produced. + */ +function normalize_run(g) { + g.graph().dummyChains = []; + forEach/* default */.A(g.edges(), function (edge) { + normalizeEdge(g, edge); + }); +} + +function normalizeEdge(g, e) { + var v = e.v; + var vRank = g.node(v).rank; + var w = e.w; + var wRank = g.node(w).rank; + var name = e.name; + var edgeLabel = g.edge(e); + var labelRank = edgeLabel.labelRank; + + if (wRank === vRank + 1) return; + + g.removeEdge(e); + + var dummy, attrs, i; + for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { + edgeLabel.points = []; + attrs = { + width: 0, + height: 0, + edgeLabel: edgeLabel, + edgeObj: e, + rank: vRank, + }; + dummy = addDummyNode(g, 'edge', attrs, '_d'); + if (vRank === labelRank) { + attrs.width = edgeLabel.width; + attrs.height = edgeLabel.height; + // @ts-expect-error + attrs.dummy = 'edge-label'; + // @ts-expect-error + attrs.labelpos = edgeLabel.labelpos; + } + g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); + if (i === 0) { + g.graph().dummyChains.push(dummy); + } + v = dummy; + } + + g.setEdge(v, w, { weight: edgeLabel.weight }, name); +} + +function normalize_undo(g) { + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var origLabel = node.edgeLabel; + var w; + g.setEdge(node.edgeObj, origLabel); + while (node.dummy) { + w = g.successors(v)[0]; + g.removeNode(v); + origLabel.points.push({ x: node.x, y: node.y }); + if (node.dummy === 'edge-label') { + origLabel.x = node.x; + origLabel.y = node.y; + origLabel.width = node.width; + origLabel.height = node.height; + } + v = w; + node = g.node(v); + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js + + + + +/** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ +function minBy(array, iteratee) { + return (array && array.length) + ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_minBy = (minBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js + + + + +/* + * Initializes ranks for the input graph using the longest path algorithm. This + * algorithm scales well and is fast in practice, it yields rather poor + * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom + * ranks wide and leaving edges longer than necessary. However, due to its + * speed, this algorithm is good for getting an initial ranking that can be fed + * into other algorithms. + * + * This algorithm does not normalize layers because it will be used by other + * algorithms in most cases. If using this algorithm directly, be sure to + * run normalize at the end. + * + * Pre-conditions: + * + * 1. Input graph is a DAG. + * 2. Input graph node labels can be assigned properties. + * + * Post-conditions: + * + * 1. Each node will be assign an (unnormalized) "rank" property. + */ +function longestPath(g) { + var visited = {}; + + function dfs(v) { + var label = g.node(v); + if (has/* default */.A(visited, v)) { + return label.rank; + } + visited[v] = true; + + var rank = lodash_es_min( + map/* default */.A(g.outEdges(v), function (e) { + return dfs(e.w) - g.edge(e).minlen; + }) + ); + + if ( + rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + rank === undefined || // return value of _.map([]) for Lodash 4 + rank === null + ) { + // return value of _.map([null]) + rank = 0; + } + + return (label.rank = rank); + } + + forEach/* default */.A(g.sources(), dfs); +} + +/* + * Returns the amount of slack for the given edge. The slack is defined as the + * difference between the length of the edge and its minimum length. + */ +function slack(g, e) { + return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js + + + + + + +/* + * Constructs a spanning tree with tight edges and adjusted the input node's + * ranks to achieve this. A tight edge is one that is has a length that matches + * its "minlen" attribute. + * + * The basic structure for this function is derived from Gansner, et al., "A + * Technique for Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a DAG. + * 2. Graph must be connected. + * 3. Graph must have at least one node. + * 5. Graph nodes must have been previously assigned a "rank" property that + * respects the "minlen" property of incident edges. + * 6. Graph edges must have a "minlen" property. + * + * Post-conditions: + * + * - Graph nodes will have their rank adjusted to ensure that all edges are + * tight. + * + * Returns a tree (undirected graph) that is constructed using only "tight" + * edges. + */ +function feasibleTree(g) { + var t = new graphlib/* Graph */.T({ directed: false }); + + // Choose arbitrary node from which to start our tree + var start = g.nodes()[0]; + var size = g.nodeCount(); + t.setNode(start, {}); + + var edge, delta; + while (tightTree(t, g) < size) { + edge = findMinSlackEdge(t, g); + delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); + shiftRanks(t, g, delta); + } + + return t; +} + +/* + * Finds a maximal tree of tight edges and returns the number of nodes in the + * tree. + */ +function tightTree(t, g) { + function dfs(v) { + forEach/* default */.A(g.nodeEdges(v), function (e) { + var edgeV = e.v, + w = v === edgeV ? e.w : edgeV; + if (!t.hasNode(w) && !slack(g, e)) { + t.setNode(w, {}); + t.setEdge(v, w, {}); + dfs(w); + } + }); + } + + forEach/* default */.A(t.nodes(), dfs); + return t.nodeCount(); +} + +/* + * Finds the edge with the smallest slack that is incident on tree and returns + * it. + */ +function findMinSlackEdge(t, g) { + return lodash_es_minBy(g.edges(), function (e) { + if (t.hasNode(e.v) !== t.hasNode(e.w)) { + return slack(g, e); + } + }); +} + +function shiftRanks(t, g, delta) { + forEach/* default */.A(t.nodes(), function (v) { + g.node(v).rank += delta; + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js + + + + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!(0,isArrayLike/* default */.A)(collection)) { + var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); + collection = (0,keys/* default */.A)(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +/* harmony default export */ const _createFind = (createFind); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js + + +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = (0,toFinite/* default */.A)(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +/* harmony default export */ const lodash_es_toInteger = (toInteger); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); +} + +/* harmony default export */ const lodash_es_findIndex = (findIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js + + + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = _createFind(lodash_es_findIndex); + +/* harmony default export */ const lodash_es_find = (find); + +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js + + + + + +var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function dijkstra_dijkstra(g, source, weightFn, edgeFn) { + return runDijkstra( + g, + String(source), + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runDijkstra(g, source, weightFn, edgeFn) { + var results = {}; + var pq = new PriorityQueue(); + var v, vEntry; + + var updateNeighbors = function (edge) { + var w = edge.v !== v ? edge.v : edge.w; + var wEntry = results[w]; + var weight = weightFn(edge); + var distance = vEntry.distance + weight; + + if (weight < 0) { + throw new Error( + 'dijkstra does not allow negative edge weights. ' + + 'Bad edge: ' + + edge + + ' Weight: ' + + weight + ); + } + + if (distance < wEntry.distance) { + wEntry.distance = distance; + wEntry.predecessor = v; + pq.decrease(w, distance); + } + }; + + g.nodes().forEach(function (v) { + var distance = v === source ? 0 : Number.POSITIVE_INFINITY; + results[v] = { distance: distance }; + pq.add(v, distance); + }); + + while (pq.size() > 0) { + v = pq.removeMin(); + vEntry = results[v]; + if (vEntry.distance === Number.POSITIVE_INFINITY) { + break; + } + + edgeFn(v).forEach(updateNeighbors); + } + + return results; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js + + + + + +function dijkstraAll(g, weightFunc, edgeFunc) { + return _.transform( + g.nodes(), + function (acc, v) { + acc[v] = dijkstra(g, v, weightFunc, edgeFunc); + }, + {} + ); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js + + + + +var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function floydWarshall(g, weightFn, edgeFn) { + return runFloydWarshall( + g, + weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runFloydWarshall(g, weightFn, edgeFn) { + var results = {}; + var nodes = g.nodes(); + + nodes.forEach(function (v) { + results[v] = {}; + results[v][v] = { distance: 0 }; + nodes.forEach(function (w) { + if (v !== w) { + results[v][w] = { distance: Number.POSITIVE_INFINITY }; + } + }); + edgeFn(v).forEach(function (edge) { + var w = edge.v === v ? edge.w : edge.v; + var d = weightFn(edge); + results[v][w] = { distance: d, predecessor: v }; + }); + }); + + nodes.forEach(function (k) { + var rowK = results[k]; + nodes.forEach(function (i) { + var rowI = results[i]; + nodes.forEach(function (j) { + var ik = rowI[k]; + var kj = rowK[j]; + var ij = rowI[j]; + var altDistance = ik.distance + kj.distance; + if (altDistance < ij.distance) { + ij.distance = altDistance; + ij.predecessor = kj.predecessor; + } + }); + }); + }); + + return results; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules +var _baseKeys = __webpack_require__(1852); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules +var _baseGetTag = __webpack_require__(8496); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js + + + + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); +} + +/* harmony default export */ const lodash_es_isString = (isString); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js + + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = (0,_baseProperty/* default */.A)('length'); + +/* harmony default export */ const _asciiSize = (asciiSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/* harmony default export */ const _hasUnicode = (hasUnicode); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js +/** Used to compose unicode character classes. */ +var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', + _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', + _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', + _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', + _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, + _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', + rsCombo = '[' + _unicodeSize_rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + _unicodeSize_rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', + rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +/* harmony default export */ const _unicodeSize = (unicodeSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js + + + + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return _hasUnicode(string) + ? _unicodeSize(string) + : _asciiSize(string); +} + +/* harmony default export */ const _stringSize = (stringSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + if (collection == null) { + return 0; + } + if ((0,isArrayLike/* default */.A)(collection)) { + return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; + } + var tag = (0,_getTag/* default */.A)(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return (0,_baseKeys/* default */.A)(collection).length; +} + +/* harmony default export */ const lodash_es_size = (size); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js + + + + +topsort_topsort.CycleException = topsort_CycleException; + +function topsort_topsort(g) { + var visited = {}; + var stack = {}; + var results = []; + + function visit(node) { + if (has/* default */.A(stack, node)) { + throw new topsort_CycleException(); + } + + if (!has/* default */.A(visited, node)) { + stack[node] = true; + visited[node] = true; + forEach/* default */.A(g.predecessors(node), visit); + delete stack[node]; + results.push(node); + } + } + + forEach/* default */.A(g.sinks(), visit); + + if (lodash_es_size(visited) !== g.nodeCount()) { + throw new topsort_CycleException(); + } + + return results; +} + +function topsort_CycleException() {} +topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js + + + + +function isAcyclic(g) { + try { + topsort(g); + } catch (e) { + if (e instanceof CycleException) { + return false; + } + throw e; + } + return true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js + + + + +/* + * A helper that preforms a pre- or post-order traversal on the input graph + * and returns the nodes in the order they were visited. If the graph is + * undirected then this algorithm will navigate using neighbors. If the graph + * is directed then this algorithm will navigate using successors. + * + * Order must be one of "pre" or "post". + */ +function dfs(g, vs, order) { + if (!isArray/* default */.A(vs)) { + vs = [vs]; + } + + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); + + var acc = []; + var visited = {}; + forEach/* default */.A(vs, function (v) { + if (!g.hasNode(v)) { + throw new Error('Graph does not have node: ' + v); + } + + doDfs(g, v, order === 'post', visited, navigation, acc); + }); + return acc; +} + +function doDfs(g, v, postorder, visited, navigation, acc) { + if (!has/* default */.A(visited, v)) { + visited[v] = true; + + if (!postorder) { + acc.push(v); + } + forEach/* default */.A(navigation(v), function (w) { + doDfs(g, w, postorder, visited, navigation, acc); + }); + if (postorder) { + acc.push(v); + } + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js + + + + +function postorder(g, vs) { + return dfs(g, vs, 'post'); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js + + + + +function preorder(g, vs) { + return dfs(g, vs, 'pre'); +} + +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules +var graph = __webpack_require__(3046); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js + + + + + + +function prim(g, weightFunc) { + var result = new Graph(); + var parents = {}; + var pq = new PriorityQueue(); + var v; + + function updateNeighbors(edge) { + var w = edge.v === v ? edge.w : edge.v; + var pri = pq.priority(w); + if (pri !== undefined) { + var edgeWeight = weightFunc(edge); + if (edgeWeight < pri) { + parents[w] = v; + pq.decrease(w, edgeWeight); + } + } + } + + if (g.nodeCount() === 0) { + return result; + } + + _.each(g.nodes(), function (v) { + pq.add(v, Number.POSITIVE_INFINITY); + result.setNode(v); + }); + + // Start from an arbitrary node + pq.decrease(g.nodes()[0], 0); + + var init = false; + while (pq.size() > 0) { + v = pq.removeMin(); + if (_.has(parents, v)) { + result.setEdge(v, parents[v]); + } else if (init) { + throw new Error('Input graph is not connected: ' + g); + } else { + init = true; + } + + g.nodeEdges(v).forEach(updateNeighbors); + } + + return result; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js + + + + + + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js + + + + + + + + +// Expose some internals for testing purposes +networkSimplex.initLowLimValues = initLowLimValues; +networkSimplex.initCutValues = initCutValues; +networkSimplex.calcCutValue = calcCutValue; +networkSimplex.leaveEdge = leaveEdge; +networkSimplex.enterEdge = enterEdge; +networkSimplex.exchangeEdges = exchangeEdges; + +/* + * The network simplex algorithm assigns ranks to each node in the input graph + * and iteratively improves the ranking to reduce the length of edges. + * + * Preconditions: + * + * 1. The input graph must be a DAG. + * 2. All nodes in the graph must have an object value. + * 3. All edges in the graph must have "minlen" and "weight" attributes. + * + * Postconditions: + * + * 1. All nodes in the graph will have an assigned "rank" attribute that has + * been optimized by the network simplex algorithm. Ranks start at 0. + * + * + * A rough sketch of the algorithm is as follows: + * + * 1. Assign initial ranks to each node. We use the longest path algorithm, + * which assigns ranks to the lowest position possible. In general this + * leads to very wide bottom ranks and unnecessarily long edges. + * 2. Construct a feasible tight tree. A tight tree is one such that all + * edges in the tree have no slack (difference between length of edge + * and minlen for the edge). This by itself greatly improves the assigned + * rankings by shorting edges. + * 3. Iteratively find edges that have negative cut values. Generally a + * negative cut value indicates that the edge could be removed and a new + * tree edge could be added to produce a more compact graph. + * + * Much of the algorithms here are derived from Gansner, et al., "A Technique + * for Drawing Directed Graphs." The structure of the file roughly follows the + * structure of the overall algorithm. + */ +function networkSimplex(g) { + g = simplify(g); + longestPath(g); + var t = feasibleTree(g); + initLowLimValues(t); + initCutValues(t, g); + + var e, f; + while ((e = leaveEdge(t))) { + f = enterEdge(t, g, e); + exchangeEdges(t, g, e, f); + } +} + +/* + * Initializes cut values for all edges in the tree. + */ +function initCutValues(t, g) { + var vs = postorder(t, t.nodes()); + vs = vs.slice(0, vs.length - 1); + forEach/* default */.A(vs, function (v) { + assignCutValue(t, g, v); + }); +} + +function assignCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + t.edge(child, parent).cutvalue = calcCutValue(t, g, child); +} + +/* + * Given the tight tree, its graph, and a child in the graph calculate and + * return the cut value for the edge between the child and its parent. + */ +function calcCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + // True if the child is on the tail end of the edge in the directed graph + var childIsTail = true; + // The graph's view of the tree edge we're inspecting + var graphEdge = g.edge(child, parent); + // The accumulated cut value for the edge between this node and its parent + var cutValue = 0; + + if (!graphEdge) { + childIsTail = false; + graphEdge = g.edge(parent, child); + } + + cutValue = graphEdge.weight; + + forEach/* default */.A(g.nodeEdges(child), function (e) { + var isOutEdge = e.v === child, + other = isOutEdge ? e.w : e.v; + + if (other !== parent) { + var pointsToHead = isOutEdge === childIsTail, + otherWeight = g.edge(e).weight; + + cutValue += pointsToHead ? otherWeight : -otherWeight; + if (isTreeEdge(t, child, other)) { + var otherCutValue = t.edge(child, other).cutvalue; + cutValue += pointsToHead ? -otherCutValue : otherCutValue; + } + } + }); + + return cutValue; +} + +function initLowLimValues(tree, root) { + if (arguments.length < 2) { + root = tree.nodes()[0]; + } + dfsAssignLowLim(tree, {}, 1, root); +} + +function dfsAssignLowLim(tree, visited, nextLim, v, parent) { + var low = nextLim; + var label = tree.node(v); + + visited[v] = true; + forEach/* default */.A(tree.neighbors(v), function (w) { + if (!has/* default */.A(visited, w)) { + nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); + } + }); + + label.low = low; + label.lim = nextLim++; + if (parent) { + label.parent = parent; + } else { + // TODO should be able to remove this when we incrementally update low lim + delete label.parent; + } + + return nextLim; +} + +function leaveEdge(tree) { + return lodash_es_find(tree.edges(), function (e) { + return tree.edge(e).cutvalue < 0; + }); +} + +function enterEdge(t, g, edge) { + var v = edge.v; + var w = edge.w; + + // For the rest of this function we assume that v is the tail and w is the + // head, so if we don't have this edge in the graph we should flip it to + // match the correct orientation. + if (!g.hasEdge(v, w)) { + v = edge.w; + w = edge.v; + } + + var vLabel = t.node(v); + var wLabel = t.node(w); + var tailLabel = vLabel; + var flip = false; + + // If the root is in the tail of the edge then we need to flip the logic that + // checks for the head and tail nodes in the candidates function below. + if (vLabel.lim > wLabel.lim) { + tailLabel = wLabel; + flip = true; + } + + var candidates = filter/* default */.A(g.edges(), function (edge) { + return ( + flip === isDescendant(t, t.node(edge.v), tailLabel) && + flip !== isDescendant(t, t.node(edge.w), tailLabel) + ); + }); + + return lodash_es_minBy(candidates, function (edge) { + return slack(g, edge); + }); +} + +function exchangeEdges(t, g, e, f) { + var v = e.v; + var w = e.w; + t.removeEdge(v, w); + t.setEdge(f.v, f.w, {}); + initLowLimValues(t); + initCutValues(t, g); + updateRanks(t, g); +} + +function updateRanks(t, g) { + var root = lodash_es_find(t.nodes(), function (v) { + return !g.node(v).parent; + }); + var vs = preorder(t, root); + vs = vs.slice(1); + forEach/* default */.A(vs, function (v) { + var parent = t.node(v).parent, + edge = g.edge(v, parent), + flipped = false; + + if (!edge) { + edge = g.edge(parent, v); + flipped = true; + } + + g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); + }); +} + +/* + * Returns true if the edge is in the tree. + */ +function isTreeEdge(tree, u, v) { + return tree.hasEdge(u, v); +} + +/* + * Returns true if the specified node is descendant of the root node per the + * assigned low and lim attributes in the tree. + */ +function isDescendant(tree, vLabel, rootLabel) { + return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js + + + + + + +/* + * Assigns a rank to each node in the input graph that respects the "minlen" + * constraint specified on edges between nodes. + * + * This basic structure is derived from Gansner, et al., "A Technique for + * Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a connected DAG + * 2. Graph nodes must be objects + * 3. Graph edges must have "weight" and "minlen" attributes + * + * Post-conditions: + * + * 1. Graph nodes will have a "rank" attribute based on the results of the + * algorithm. Ranks can start at any index (including negative), we'll + * fix them up later. + */ +function rank(g) { + switch (g.graph().ranker) { + case 'network-simplex': + networkSimplexRanker(g); + break; + case 'tight-tree': + tightTreeRanker(g); + break; + case 'longest-path': + longestPathRanker(g); + break; + default: + networkSimplexRanker(g); + } +} + +// A fast and simple ranker, but results are far from optimal. +var longestPathRanker = longestPath; + +function tightTreeRanker(g) { + longestPath(g); + feasibleTree(g); +} + +function networkSimplexRanker(g) { + networkSimplex(g); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js + + + + + +/* + * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, + * adds appropriate edges to ensure that all cluster nodes are placed between + * these boundries, and ensures that the graph is connected. + * + * In addition we ensure, through the use of the minlen property, that nodes + * and subgraph border nodes to not end up on the same rank. + * + * Preconditions: + * + * 1. Input graph is a DAG + * 2. Nodes in the input graph has a minlen attribute + * + * Postconditions: + * + * 1. Input graph is connected. + * 2. Dummy nodes are added for the tops and bottoms of subgraphs. + * 3. The minlen attribute for nodes is adjusted to ensure nodes do not + * get placed on the same rank as subgraph border nodes. + * + * The nesting graph idea comes from Sander, "Layout of Compound Directed + * Graphs." + */ +function nesting_graph_run(g) { + var root = addDummyNode(g, 'root', {}, '_root'); + var depths = treeDepths(g); + var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array + var nodeSep = 2 * height + 1; + + g.graph().nestingRoot = root; + + // Multiply minlen by nodeSep to align nodes on non-border ranks. + forEach/* default */.A(g.edges(), function (e) { + g.edge(e).minlen *= nodeSep; + }); + + // Calculate a weight that is sufficient to keep subgraphs vertically compact + var weight = sumWeights(g) + 1; + + // Create border nodes and link them up + forEach/* default */.A(g.children(), function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + }); + + // Save the multiplier for node layers for later removal of empty border + // layers. + g.graph().nodeRankFactor = nodeSep; +} + +function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { + var children = g.children(v); + if (!children.length) { + if (v !== root) { + g.setEdge(root, v, { weight: 0, minlen: nodeSep }); + } + return; + } + + var top = addBorderNode(g, '_bt'); + var bottom = addBorderNode(g, '_bb'); + var label = g.node(v); + + g.setParent(top, v); + label.borderTop = top; + g.setParent(bottom, v); + label.borderBottom = bottom; + + forEach/* default */.A(children, function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + + var childNode = g.node(child); + var childTop = childNode.borderTop ? childNode.borderTop : child; + var childBottom = childNode.borderBottom ? childNode.borderBottom : child; + var thisWeight = childNode.borderTop ? weight : 2 * weight; + var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; + + g.setEdge(top, childTop, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + + g.setEdge(childBottom, bottom, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + }); + + if (!g.parent(v)) { + g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); + } +} + +function treeDepths(g) { + var depths = {}; + function dfs(v, depth) { + var children = g.children(v); + if (children && children.length) { + forEach/* default */.A(children, function (child) { + dfs(child, depth + 1); + }); + } + depths[v] = depth; + } + forEach/* default */.A(g.children(), function (v) { + dfs(v, 1); + }); + return depths; +} + +function sumWeights(g) { + return reduce/* default */.A( + g.edges(), + function (acc, e) { + return acc + g.edge(e).weight; + }, + 0 + ); +} + +function cleanup(g) { + var graphLabel = g.graph(); + g.removeNode(graphLabel.nestingRoot); + delete graphLabel.nestingRoot; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.nestingEdge) { + g.removeEdge(e); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules +var _baseClone = __webpack_require__(1641); +;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js + + + + +function addSubgraphConstraints(g, cg, vs) { + var prev = {}, + rootPrev; + + forEach/* default */.A(vs, function (v) { + var child = g.parent(v), + parent, + prevChild; + while (child) { + parent = g.parent(child); + if (parent) { + prevChild = prev[parent]; + prev[parent] = child; + } else { + prevChild = rootPrev; + rootPrev = child; + } + if (prevChild && prevChild !== child) { + cg.setEdge(prevChild, child); + return; + } + child = parent; + } + }); + + /* + function dfs(v) { + var children = v ? g.children(v) : g.children(); + if (children.length) { + var min = Number.POSITIVE_INFINITY, + subgraphs = []; + _.each(children, function(child) { + var childMin = dfs(child); + if (g.children(child).length) { + subgraphs.push({ v: child, order: childMin }); + } + min = Math.min(min, childMin); + }); + _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { + cg.setEdge(prev.v, curr.v); + return curr; + }); + return min; + } + return g.node(v).order; + } + dfs(undefined); + */ +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js + + + + + +/* + * Constructs a graph that can be used to sort a layer of nodes. The graph will + * contain all base and subgraph nodes from the request layer in their original + * hierarchy and any edges that are incident on these nodes and are of the type + * requested by the "relationship" parameter. + * + * Nodes from the requested rank that do not have parents are assigned a root + * node in the output graph, which is set in the root graph attribute. This + * makes it easy to walk the hierarchy of movable nodes during ordering. + * + * Pre-conditions: + * + * 1. Input graph is a DAG + * 2. Base nodes in the input graph have a rank attribute + * 3. Subgraph nodes in the input graph has minRank and maxRank attributes + * 4. Edges have an assigned weight + * + * Post-conditions: + * + * 1. Output graph has all nodes in the movable rank with preserved + * hierarchy. + * 2. Root nodes in the movable layer are made children of the node + * indicated by the root attribute of the graph. + * 3. Non-movable nodes incident on movable nodes, selected by the + * relationship parameter, are included in the graph (without hierarchy). + * 4. Edges incident on movable nodes, selected by the relationship + * parameter, are added to the output graph. + * 5. The weights for copied edges are aggregated as need, since the output + * graph is not a multi-graph. + */ +function buildLayerGraph(g, rank, relationship) { + var root = createRootNode(g), + result = new graphlib/* Graph */.T({ compound: true }) + .setGraph({ root: root }) + .setDefaultNodeLabel(function (v) { + return g.node(v); + }); + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v), + parent = g.parent(v); + + if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { + result.setNode(v); + result.setParent(v, parent || root); + + // This assumes we have only short edges! + forEach/* default */.A(g[relationship](v), function (e) { + var u = e.v === v ? e.w : e.v, + edge = result.edge(u, v), + weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; + result.setEdge(u, v, { weight: g.edge(e).weight + weight }); + }); + + if (has/* default */.A(node, 'minRank')) { + result.setNode(v, { + borderLeft: node.borderLeft[rank], + borderRight: node.borderRight[rank], + }); + } + } + }); + + return result; +} + +function createRootNode(g) { + var v; + while (g.hasNode((v = uniqueId/* default */.A('_root')))); + return v; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +/* harmony default export */ const _baseZipObject = (baseZipObject); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js + + + +/** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ +function zipObject(props, values) { + return _baseZipObject(props || [], values || [], _assignValue/* default */.A); +} + +/* harmony default export */ const lodash_es_zipObject = (zipObject); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js +var _baseMap = __webpack_require__(2568); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +/* harmony default export */ const _baseSortBy = (baseSortBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js + + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = (0,isSymbol/* default */.A)(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = (0,isSymbol/* default */.A)(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +/* harmony default export */ const _compareAscending = (compareAscending); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js + + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = _compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +/* harmony default export */ const _compareMultiple = (compareMultiple); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js + + + + + + + + + + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + if ((0,isArray/* default */.A)(iteratee)) { + return function(value) { + return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity/* default */.A]; + } + + var index = -1; + iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); + + var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { + var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return _baseSortBy(result, function(object, other) { + return _compareMultiple(object, other, orders); + }); +} + +/* harmony default export */ const _baseOrderBy = (baseOrderBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js + + + + + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ +var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); +}); + +/* harmony default export */ const lodash_es_sortBy = (sortBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js + + + + +/* + * A function that takes a layering (an array of layers, each with an array of + * ordererd nodes) and a graph and returns a weighted crossing count. + * + * Pre-conditions: + * + * 1. Input graph must be simple (not a multigraph), directed, and include + * only simple edges. + * 2. Edges in the input graph must have assigned weights. + * + * Post-conditions: + * + * 1. The graph and layering matrix are left unchanged. + * + * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." + */ +function crossCount(g, layering) { + var cc = 0; + for (var i = 1; i < layering.length; ++i) { + cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); + } + return cc; +} + +function twoLayerCrossCount(g, northLayer, southLayer) { + // Sort all of the edges between the north and south layers by their position + // in the north layer and then the south. Map these edges to the position of + // their head in the south layer. + var southPos = lodash_es_zipObject( + southLayer, + map/* default */.A(southLayer, function (v, i) { + return i; + }) + ); + var southEntries = flatten/* default */.A( + map/* default */.A(northLayer, function (v) { + return lodash_es_sortBy( + map/* default */.A(g.outEdges(v), function (e) { + return { pos: southPos[e.w], weight: g.edge(e).weight }; + }), + 'pos' + ); + }) + ); + + // Build the accumulator tree + var firstIndex = 1; + while (firstIndex < southLayer.length) firstIndex <<= 1; + var treeSize = 2 * firstIndex - 1; + firstIndex -= 1; + var tree = map/* default */.A(new Array(treeSize), function () { + return 0; + }); + + // Calculate the weighted crossings + var cc = 0; + forEach/* default */.A( + // @ts-expect-error + southEntries.forEach(function (entry) { + var index = entry.pos + firstIndex; + tree[index] += entry.weight; + var weightSum = 0; + // @ts-expect-error + while (index > 0) { + // @ts-expect-error + if (index % 2) { + weightSum += tree[index + 1]; + } + // @ts-expect-error + index = (index - 1) >> 1; + tree[index] += entry.weight; + } + cc += entry.weight * weightSum; + }) + ); + + return cc; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js + + + + +/* + * Assigns an initial order value for each node by performing a DFS search + * starting from nodes in the first rank. Nodes are assigned an order in their + * rank as they are first visited. + * + * This approach comes from Gansner, et al., "A Technique for Drawing Directed + * Graphs." + * + * Returns a layering matrix with an array per layer and each layer sorted by + * the order of its nodes. + */ +function initOrder(g) { + var visited = {}; + var simpleNodes = filter/* default */.A(g.nodes(), function (v) { + return !g.children(v).length; + }); + var maxRank = lodash_es_max( + map/* default */.A(simpleNodes, function (v) { + return g.node(v).rank; + }) + ); + var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { + return []; + }); + + function dfs(v) { + if (has/* default */.A(visited, v)) return; + visited[v] = true; + var node = g.node(v); + layers[node.rank].push(v); + forEach/* default */.A(g.successors(v), dfs); + } + + var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { + return g.node(v).rank; + }); + forEach/* default */.A(orderedVs, dfs); + + return layers; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js + + + + +function barycenter(g, movable) { + return map/* default */.A(movable, function (v) { + var inV = g.inEdges(v); + if (!inV.length) { + return { v: v }; + } else { + var result = reduce/* default */.A( + inV, + function (acc, e) { + var edge = g.edge(e), + nodeU = g.node(e.v); + return { + sum: acc.sum + edge.weight * nodeU.order, + weight: acc.weight + edge.weight, + }; + }, + { sum: 0, weight: 0 } + ); + + return { + v: v, + barycenter: result.sum / result.weight, + weight: result.weight, + }; + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js + + + + +/* + * Given a list of entries of the form {v, barycenter, weight} and a + * constraint graph this function will resolve any conflicts between the + * constraint graph and the barycenters for the entries. If the barycenters for + * an entry would violate a constraint in the constraint graph then we coalesce + * the nodes in the conflict into a new node that respects the contraint and + * aggregates barycenter and weight information. + * + * This implementation is based on the description in Forster, "A Fast and + * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it + * differs in some specific details. + * + * Pre-conditions: + * + * 1. Each entry has the form {v, barycenter, weight}, or if the node has + * no barycenter, then {v}. + * + * Returns: + * + * A new list of entries of the form {vs, i, barycenter, weight}. The list + * `vs` may either be a singleton or it may be an aggregation of nodes + * ordered such that they do not violate constraints from the constraint + * graph. The property `i` is the lowest original index of any of the + * elements in `vs`. + */ +function resolveConflicts(entries, cg) { + var mappedEntries = {}; + forEach/* default */.A(entries, function (entry, i) { + var tmp = (mappedEntries[entry.v] = { + indegree: 0, + in: [], + out: [], + vs: [entry.v], + i: i, + }); + if (!isUndefined/* default */.A(entry.barycenter)) { + // @ts-expect-error + tmp.barycenter = entry.barycenter; + // @ts-expect-error + tmp.weight = entry.weight; + } + }); + + forEach/* default */.A(cg.edges(), function (e) { + var entryV = mappedEntries[e.v]; + var entryW = mappedEntries[e.w]; + if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { + entryW.indegree++; + entryV.out.push(mappedEntries[e.w]); + } + }); + + var sourceSet = filter/* default */.A(mappedEntries, function (entry) { + // @ts-expect-error + return !entry.indegree; + }); + + return doResolveConflicts(sourceSet); +} + +function doResolveConflicts(sourceSet) { + var entries = []; + + function handleIn(vEntry) { + return function (uEntry) { + if (uEntry.merged) { + return; + } + if ( + isUndefined/* default */.A(uEntry.barycenter) || + isUndefined/* default */.A(vEntry.barycenter) || + uEntry.barycenter >= vEntry.barycenter + ) { + mergeEntries(vEntry, uEntry); + } + }; + } + + function handleOut(vEntry) { + return function (wEntry) { + wEntry['in'].push(vEntry); + if (--wEntry.indegree === 0) { + sourceSet.push(wEntry); + } + }; + } + + while (sourceSet.length) { + var entry = sourceSet.pop(); + entries.push(entry); + forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); + forEach/* default */.A(entry.out, handleOut(entry)); + } + + return map/* default */.A( + filter/* default */.A(entries, function (entry) { + return !entry.merged; + }), + function (entry) { + return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); + } + ); +} + +function mergeEntries(target, source) { + var sum = 0; + var weight = 0; + + if (target.weight) { + sum += target.barycenter * target.weight; + weight += target.weight; + } + + if (source.weight) { + sum += source.barycenter * source.weight; + weight += source.weight; + } + + target.vs = source.vs.concat(target.vs); + target.barycenter = sum / weight; + target.weight = weight; + target.i = Math.min(source.i, target.i); + source.merged = true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js + + + + + +function sort(entries, biasRight) { + var parts = partition(entries, function (entry) { + return has/* default */.A(entry, 'barycenter'); + }); + var sortable = parts.lhs, + unsortable = lodash_es_sortBy(parts.rhs, function (entry) { + return -entry.i; + }), + vs = [], + sum = 0, + weight = 0, + vsIndex = 0; + + sortable.sort(compareWithBias(!!biasRight)); + + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + + forEach/* default */.A(sortable, function (entry) { + vsIndex += entry.vs.length; + vs.push(entry.vs); + sum += entry.barycenter * entry.weight; + weight += entry.weight; + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + }); + + var result = { vs: flatten/* default */.A(vs) }; + if (weight) { + result.barycenter = sum / weight; + result.weight = weight; + } + return result; +} + +function consumeUnsortable(vs, unsortable, index) { + var last; + while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { + unsortable.pop(); + vs.push(last.vs); + index++; + } + return index; +} + +function compareWithBias(bias) { + return function (entryV, entryW) { + if (entryV.barycenter < entryW.barycenter) { + return -1; + } else if (entryV.barycenter > entryW.barycenter) { + return 1; + } + + return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; + }; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js + + + + + + + +function sortSubgraph(g, v, cg, biasRight) { + var movable = g.children(v); + var node = g.node(v); + var bl = node ? node.borderLeft : undefined; + var br = node ? node.borderRight : undefined; + var subgraphs = {}; + + if (bl) { + movable = filter/* default */.A(movable, function (w) { + return w !== bl && w !== br; + }); + } + + var barycenters = barycenter(g, movable); + forEach/* default */.A(barycenters, function (entry) { + if (g.children(entry.v).length) { + var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); + subgraphs[entry.v] = subgraphResult; + if (has/* default */.A(subgraphResult, 'barycenter')) { + mergeBarycenters(entry, subgraphResult); + } + } + }); + + var entries = resolveConflicts(barycenters, cg); + expandSubgraphs(entries, subgraphs); + + var result = sort(entries, biasRight); + + if (bl) { + result.vs = flatten/* default */.A([bl, result.vs, br]); + if (g.predecessors(bl).length) { + var blPred = g.node(g.predecessors(bl)[0]), + brPred = g.node(g.predecessors(br)[0]); + if (!has/* default */.A(result, 'barycenter')) { + result.barycenter = 0; + result.weight = 0; + } + result.barycenter = + (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); + result.weight += 2; + } + } + + return result; +} + +function expandSubgraphs(entries, subgraphs) { + forEach/* default */.A(entries, function (entry) { + entry.vs = flatten/* default */.A( + entry.vs.map(function (v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }) + ); + }); +} + +function mergeBarycenters(target, other) { + if (!isUndefined/* default */.A(target.barycenter)) { + target.barycenter = + (target.barycenter * target.weight + other.barycenter * other.weight) / + (target.weight + other.weight); + target.weight += other.weight; + } else { + target.barycenter = other.barycenter; + target.weight = other.weight; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js + + + + + + + + + + + +/* + * Applies heuristics to minimize edge crossings in the graph and sets the best + * order solution as an order attribute on each node. + * + * Pre-conditions: + * + * 1. Graph must be DAG + * 2. Graph nodes must be objects with a "rank" attribute + * 3. Graph edges must have the "weight" attribute + * + * Post-conditions: + * + * 1. Graph nodes will have an "order" attribute based on the results of the + * algorithm. + */ +function order(g) { + var maxRank = util_maxRank(g), + downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), + upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); + + var layering = initOrder(g); + assignOrder(g, layering); + + var bestCC = Number.POSITIVE_INFINITY, + best; + + for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { + sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); + + layering = buildLayerMatrix(g); + var cc = crossCount(g, layering); + if (cc < bestCC) { + lastBest = 0; + best = lodash_es_cloneDeep(layering); + bestCC = cc; + } + } + + assignOrder(g, best); +} + +function buildLayerGraphs(g, ranks, relationship) { + return map/* default */.A(ranks, function (rank) { + return buildLayerGraph(g, rank, relationship); + }); +} + +function sweepLayerGraphs(layerGraphs, biasRight) { + var cg = new graphlib/* Graph */.T(); + forEach/* default */.A(layerGraphs, function (lg) { + var root = lg.graph().root; + var sorted = sortSubgraph(lg, root, cg, biasRight); + forEach/* default */.A(sorted.vs, function (v, i) { + lg.node(v).order = i; + }); + addSubgraphConstraints(lg, cg, sorted.vs); + }); +} + +function assignOrder(g, layering) { + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, i) { + g.node(v).order = i; + }); + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js + + + + +function parentDummyChains(g) { + var postorderNums = parent_dummy_chains_postorder(g); + + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var edgeObj = node.edgeObj; + var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); + var path = pathData.path; + var lca = pathData.lca; + var pathIdx = 0; + var pathV = path[pathIdx]; + var ascending = true; + + while (v !== edgeObj.w) { + node = g.node(v); + + if (ascending) { + while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { + pathIdx++; + } + + if (pathV === lca) { + ascending = false; + } + } + + if (!ascending) { + while ( + pathIdx < path.length - 1 && + g.node((pathV = path[pathIdx + 1])).minRank <= node.rank + ) { + pathIdx++; + } + pathV = path[pathIdx]; + } + + g.setParent(v, pathV); + v = g.successors(v)[0]; + } + }); +} + +// Find a path from v to w through the lowest common ancestor (LCA). Return the +// full path and the LCA. +function findPath(g, postorderNums, v, w) { + var vPath = []; + var wPath = []; + var low = Math.min(postorderNums[v].low, postorderNums[w].low); + var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); + var parent; + var lca; + + // Traverse up from v to find the LCA + parent = v; + do { + parent = g.parent(parent); + vPath.push(parent); + } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); + lca = parent; + + // Traverse from w to LCA + parent = w; + while ((parent = g.parent(parent)) !== lca) { + wPath.push(parent); + } + + return { path: vPath.concat(wPath.reverse()), lca: lca }; +} + +function parent_dummy_chains_postorder(g) { + var result = {}; + var lim = 0; + + function dfs(v) { + var low = lim; + forEach/* default */.A(g.children(v), dfs); + result[v] = { low: low, lim: lim++ }; + } + forEach/* default */.A(g.children(), dfs); + + return result; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js +var _castFunction = __webpack_require__(9922); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js + + + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); +} + +/* harmony default export */ const lodash_es_forOwn = (forOwn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules +var _baseFor = __webpack_require__(4574); +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js + + + + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); +} + +/* harmony default export */ const lodash_es_forIn = (forIn); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js + + + + +/* + * This module provides coordinate assignment based on Brandes and Köpf, "Fast + * and Simple Horizontal Coordinate Assignment." + */ + + + +/* + * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" + * property. A type-1 conflict is one where a non-inner segment crosses an + * inner segment. An inner segment is an edge with both incident nodes marked + * with the "dummy" property. + * + * This algorithm scans layer by layer, starting with the second, for type-1 + * conflicts between the current layer and the previous layer. For each layer + * it scans the nodes from left to right until it reaches one that is incident + * on an inner segment. It then scans predecessors to determine if they have + * edges that cross that inner segment. At the end a final scan is done for all + * nodes on the current rank to see if they cross the last visited inner + * segment. + * + * This algorithm (safely) assumes that a dummy node will only be incident on a + * single node in the layers being scanned. + */ +function findType1Conflicts(g, layering) { + var conflicts = {}; + + function visitLayer(prevLayer, layer) { + var // last visited node in the previous layer that is incident on an inner + // segment. + k0 = 0, + // Tracks the last node in this layer scanned for crossings with a type-1 + // segment. + scanPos = 0, + prevLayerLength = prevLayer.length, + lastNode = lodash_es_last(layer); + + forEach/* default */.A(layer, function (v, i) { + var w = findOtherInnerSegmentNode(g, v), + k1 = w ? g.node(w).order : prevLayerLength; + + if (w || v === lastNode) { + forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { + forEach/* default */.A(g.predecessors(scanNode), function (u) { + var uLabel = g.node(u), + uPos = uLabel.order; + if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { + addConflict(conflicts, u, scanNode); + } + }); + }); + // @ts-expect-error + scanPos = i + 1; + k0 = k1; + } + }); + + return layer; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findType2Conflicts(g, layering) { + var conflicts = {}; + + function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { + var v; + forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { + v = south[i]; + if (g.node(v).dummy) { + forEach/* default */.A(g.predecessors(v), function (u) { + var uNode = g.node(u); + if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { + addConflict(conflicts, u, v); + } + }); + } + }); + } + + function visitLayer(north, south) { + var prevNorthPos = -1, + nextNorthPos, + southPos = 0; + + forEach/* default */.A(south, function (v, southLookahead) { + if (g.node(v).dummy === 'border') { + var predecessors = g.predecessors(v); + if (predecessors.length) { + nextNorthPos = g.node(predecessors[0]).order; + scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); + // @ts-expect-error + southPos = southLookahead; + prevNorthPos = nextNorthPos; + } + } + scan(south, southPos, south.length, nextNorthPos, north.length); + }); + + return south; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findOtherInnerSegmentNode(g, v) { + if (g.node(v).dummy) { + return lodash_es_find(g.predecessors(v), function (u) { + return g.node(u).dummy; + }); + } +} + +function addConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + + var conflictsV = conflicts[v]; + if (!conflictsV) { + conflicts[v] = conflictsV = {}; + } + conflictsV[w] = true; +} + +function hasConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + return has/* default */.A(conflicts[v], w); +} + +/* + * Try to align nodes into vertical "blocks" where possible. This algorithm + * attempts to align a node with one of its median neighbors. If the edge + * connecting a neighbor is a type-1 conflict then we ignore that possibility. + * If a previous node has already formed a block with a node after the node + * we're trying to form a block with, we also ignore that possibility - our + * blocks would be split in that scenario. + */ +function verticalAlignment(g, layering, conflicts, neighborFn) { + var root = {}, + align = {}, + pos = {}; + + // We cache the position here based on the layering because the graph and + // layering may be out of sync. The layering matrix is manipulated to + // generate different extreme alignments. + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, order) { + root[v] = v; + align[v] = v; + pos[v] = order; + }); + }); + + forEach/* default */.A(layering, function (layer) { + var prevIdx = -1; + forEach/* default */.A(layer, function (v) { + var ws = neighborFn(v); + if (ws.length) { + ws = lodash_es_sortBy(ws, function (w) { + return pos[w]; + }); + var mp = (ws.length - 1) / 2; + for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { + var w = ws[i]; + if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { + align[w] = v; + align[v] = root[v] = root[w]; + prevIdx = pos[w]; + } + } + } + }); + }); + + return { root: root, align: align }; +} + +function horizontalCompaction(g, layering, root, align, reverseSep) { + // This portion of the algorithm differs from BK due to a number of problems. + // Instead of their algorithm we construct a new block graph and do two + // sweeps. The first sweep places blocks with the smallest possible + // coordinates. The second sweep removes unused space by moving blocks to the + // greatest coordinates without violating separation. + var xs = {}, + blockG = buildBlockGraph(g, layering, root, reverseSep), + borderType = reverseSep ? 'borderLeft' : 'borderRight'; + + function iterate(setXsFunc, nextNodesFunc) { + var stack = blockG.nodes(); + var elem = stack.pop(); + var visited = {}; + while (elem) { + if (visited[elem]) { + setXsFunc(elem); + } else { + visited[elem] = true; + stack.push(elem); + stack = stack.concat(nextNodesFunc(elem)); + } + + elem = stack.pop(); + } + } + + // First pass, assign smallest coordinates + function pass1(elem) { + xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { + return Math.max(acc, xs[e.v] + blockG.edge(e)); + }, 0); + } + + // Second pass, assign greatest coordinates + function pass2(elem) { + var min = blockG.outEdges(elem).reduce(function (acc, e) { + return Math.min(acc, xs[e.w] - blockG.edge(e)); + }, Number.POSITIVE_INFINITY); + + var node = g.node(elem); + if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { + xs[elem] = Math.max(xs[elem], min); + } + } + + iterate(pass1, blockG.predecessors.bind(blockG)); + iterate(pass2, blockG.successors.bind(blockG)); + + // Assign x coordinates to all nodes + forEach/* default */.A(align, function (v) { + xs[v] = xs[root[v]]; + }); + + return xs; +} + +function buildBlockGraph(g, layering, root, reverseSep) { + var blockGraph = new graphlib/* Graph */.T(), + graphLabel = g.graph(), + sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); + + forEach/* default */.A(layering, function (layer) { + var u; + forEach/* default */.A(layer, function (v) { + var vRoot = root[v]; + blockGraph.setNode(vRoot); + if (u) { + var uRoot = root[u], + prevMax = blockGraph.edge(uRoot, vRoot); + blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); + } + u = v; + }); + }); + + return blockGraph; +} + +/* + * Returns the alignment that has the smallest width of the given alignments. + */ +function findSmallestWidthAlignment(g, xss) { + return lodash_es_minBy(values/* default */.A(xss), function (xs) { + var max = Number.NEGATIVE_INFINITY; + var min = Number.POSITIVE_INFINITY; + + lodash_es_forIn(xs, function (x, v) { + var halfWidth = width(g, v) / 2; + + max = Math.max(x + halfWidth, max); + min = Math.min(x - halfWidth, min); + }); + + return max - min; + }); +} + +/* + * Align the coordinates of each of the layout alignments such that + * left-biased alignments have their minimum coordinate at the same point as + * the minimum coordinate of the smallest width alignment and right-biased + * alignments have their maximum coordinate at the same point as the maximum + * coordinate of the smallest width alignment. + */ +function alignCoordinates(xss, alignTo) { + var alignToVals = values/* default */.A(alignTo), + alignToMin = lodash_es_min(alignToVals), + alignToMax = lodash_es_max(alignToVals); + + forEach/* default */.A(['u', 'd'], function (vert) { + forEach/* default */.A(['l', 'r'], function (horiz) { + var alignment = vert + horiz, + xs = xss[alignment], + delta; + if (xs === alignTo) return; + + var xsVals = values/* default */.A(xs); + delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); + + if (delta) { + xss[alignment] = lodash_es_mapValues(xs, function (x) { + return x + delta; + }); + } + }); + }); +} + +function balance(xss, align) { + return lodash_es_mapValues(xss.ul, function (ignore, v) { + if (align) { + return xss[align.toLowerCase()][v]; + } else { + var xs = lodash_es_sortBy(map/* default */.A(xss, v)); + return (xs[1] + xs[2]) / 2; + } + }); +} + +function positionX(g) { + var layering = buildLayerMatrix(g); + var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); + + var xss = {}; + var adjustedLayering; + forEach/* default */.A(['u', 'd'], function (vert) { + adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); + forEach/* default */.A(['l', 'r'], function (horiz) { + if (horiz === 'r') { + adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { + return values/* default */.A(inner).reverse(); + }); + } + + var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); + var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); + var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); + if (horiz === 'r') { + xs = lodash_es_mapValues(xs, function (x) { + return -x; + }); + } + xss[vert + horiz] = xs; + }); + }); + + var smallestWidth = findSmallestWidthAlignment(g, xss); + alignCoordinates(xss, smallestWidth); + return balance(xss, g.graph().align); +} + +function sep(nodeSep, edgeSep, reverseSep) { + return function (g, v, w) { + var vLabel = g.node(v); + var wLabel = g.node(w); + var sum = 0; + var delta; + + sum += vLabel.width / 2; + if (has/* default */.A(vLabel, 'labelpos')) { + switch (vLabel.labelpos.toLowerCase()) { + case 'l': + delta = -vLabel.width / 2; + break; + case 'r': + delta = vLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; + sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; + + sum += wLabel.width / 2; + if (has/* default */.A(wLabel, 'labelpos')) { + switch (wLabel.labelpos.toLowerCase()) { + case 'l': + delta = wLabel.width / 2; + break; + case 'r': + delta = -wLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + return sum; + }; +} + +function width(g, v) { + return g.node(v).width; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js + + + + + + +function position(g) { + g = asNonCompoundGraph(g); + + positionY(g); + lodash_es_forOwn(positionX(g), function (x, v) { + g.node(v).x = x; + }); +} + +function positionY(g) { + var layering = buildLayerMatrix(g); + var rankSep = g.graph().ranksep; + var prevY = 0; + forEach/* default */.A(layering, function (layer) { + var maxHeight = lodash_es_max( + map/* default */.A(layer, function (v) { + return g.node(v).height; + }) + ); + forEach/* default */.A(layer, function (v) { + g.node(v).y = prevY + maxHeight / 2; + }); + prevY += maxHeight + rankSep; + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js + + + + + + + + + + + + + + + +function layout(g, opts) { + var time = opts && opts.debugTiming ? util_time : notime; + time('layout', function () { + var layoutGraph = time(' buildLayoutGraph', function () { + return buildLayoutGraph(g); + }); + time(' runLayout', function () { + runLayout(layoutGraph, time); + }); + time(' updateInputGraph', function () { + updateInputGraph(g, layoutGraph); + }); + }); +} + +function runLayout(g, time) { + time(' makeSpaceForEdgeLabels', function () { + makeSpaceForEdgeLabels(g); + }); + time(' removeSelfEdges', function () { + removeSelfEdges(g); + }); + time(' acyclic', function () { + run(g); + }); + time(' nestingGraph.run', function () { + nesting_graph_run(g); + }); + time(' rank', function () { + rank(asNonCompoundGraph(g)); + }); + time(' injectEdgeLabelProxies', function () { + injectEdgeLabelProxies(g); + }); + time(' removeEmptyRanks', function () { + removeEmptyRanks(g); + }); + time(' nestingGraph.cleanup', function () { + cleanup(g); + }); + time(' normalizeRanks', function () { + normalizeRanks(g); + }); + time(' assignRankMinMax', function () { + assignRankMinMax(g); + }); + time(' removeEdgeLabelProxies', function () { + removeEdgeLabelProxies(g); + }); + time(' normalize.run', function () { + normalize_run(g); + }); + time(' parentDummyChains', function () { + parentDummyChains(g); + }); + time(' addBorderSegments', function () { + addBorderSegments(g); + }); + time(' order', function () { + order(g); + }); + time(' insertSelfEdges', function () { + insertSelfEdges(g); + }); + time(' adjustCoordinateSystem', function () { + adjust(g); + }); + time(' position', function () { + position(g); + }); + time(' positionSelfEdges', function () { + positionSelfEdges(g); + }); + time(' removeBorderNodes', function () { + removeBorderNodes(g); + }); + time(' normalize.undo', function () { + normalize_undo(g); + }); + time(' fixupEdgeLabelCoords', function () { + fixupEdgeLabelCoords(g); + }); + time(' undoCoordinateSystem', function () { + coordinate_system_undo(g); + }); + time(' translateGraph', function () { + translateGraph(g); + }); + time(' assignNodeIntersects', function () { + assignNodeIntersects(g); + }); + time(' reversePoints', function () { + reversePointsForReversedEdges(g); + }); + time(' acyclic.undo', function () { + undo(g); + }); +} + +/* + * Copies final layout information from the layout graph back to the input + * graph. This process only copies whitelisted attributes from the layout graph + * to the input graph, so it serves as a good place to determine what + * attributes can influence layout. + */ +function updateInputGraph(inputGraph, layoutGraph) { + forEach/* default */.A(inputGraph.nodes(), function (v) { + var inputLabel = inputGraph.node(v); + var layoutLabel = layoutGraph.node(v); + + if (inputLabel) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + + if (layoutGraph.children(v).length) { + inputLabel.width = layoutLabel.width; + inputLabel.height = layoutLabel.height; + } + } + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var inputLabel = inputGraph.edge(e); + var layoutLabel = layoutGraph.edge(e); + + inputLabel.points = layoutLabel.points; + if (has/* default */.A(layoutLabel, 'x')) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + } + }); + + inputGraph.graph().width = layoutGraph.graph().width; + inputGraph.graph().height = layoutGraph.graph().height; +} + +var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; +var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; +var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; +var nodeNumAttrs = ['width', 'height']; +var nodeDefaults = { width: 0, height: 0 }; +var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; +var edgeDefaults = { + minlen: 1, + weight: 1, + width: 0, + height: 0, + labeloffset: 10, + labelpos: 'r', +}; +var edgeAttrs = ['labelpos']; + +/* + * Constructs a new graph from the input graph, which can be used for layout. + * This process copies only whitelisted attributes from the input graph to the + * layout graph. Thus this function serves as a good place to determine what + * attributes can influence layout. + */ +function buildLayoutGraph(inputGraph) { + var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); + var graph = canonicalize(inputGraph.graph()); + + g.setGraph( + merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) + ); + + forEach/* default */.A(inputGraph.nodes(), function (v) { + var node = canonicalize(inputGraph.node(v)); + g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); + g.setParent(v, inputGraph.parent(v)); + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var edge = canonicalize(inputGraph.edge(e)); + g.setEdge( + e, + merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) + ); + }); + + return g; +} + +/* + * This idea comes from the Gansner paper: to account for edge labels in our + * layout we split each rank in half by doubling minlen and halving ranksep. + * Then we can place labels at these mid-points between nodes. + * + * We also add some minimal padding to the width to push the label for the edge + * away from the edge itself a bit. + */ +function makeSpaceForEdgeLabels(g) { + var graph = g.graph(); + graph.ranksep /= 2; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + edge.minlen *= 2; + if (edge.labelpos.toLowerCase() !== 'c') { + if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { + edge.width += edge.labeloffset; + } else { + edge.height += edge.labeloffset; + } + } + }); +} + +/* + * Creates temporary dummy nodes that capture the rank in which each edge's + * label is going to, if it has one of non-zero width and height. We do this + * so that we can safely remove empty ranks while preserving balance for the + * label's position. + */ +function injectEdgeLabelProxies(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.width && edge.height) { + var v = g.node(e.v); + var w = g.node(e.w); + var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; + addDummyNode(g, 'edge-proxy', label, '_ep'); + } + }); +} + +function assignRankMinMax(g) { + var maxRank = 0; + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.borderTop) { + node.minRank = g.node(node.borderTop).rank; + node.maxRank = g.node(node.borderBottom).rank; + // @ts-expect-error + maxRank = lodash_es_max(maxRank, node.maxRank); + } + }); + g.graph().maxRank = maxRank; +} + +function removeEdgeLabelProxies(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'edge-proxy') { + g.edge(node.e).labelRank = node.rank; + g.removeNode(v); + } + }); +} + +function translateGraph(g) { + var minX = Number.POSITIVE_INFINITY; + var maxX = 0; + var minY = Number.POSITIVE_INFINITY; + var maxY = 0; + var graphLabel = g.graph(); + var marginX = graphLabel.marginx || 0; + var marginY = graphLabel.marginy || 0; + + function getExtremes(attrs) { + var x = attrs.x; + var y = attrs.y; + var w = attrs.width; + var h = attrs.height; + minX = Math.min(minX, x - w / 2); + maxX = Math.max(maxX, x + w / 2); + minY = Math.min(minY, y - h / 2); + maxY = Math.max(maxY, y + h / 2); + } + + forEach/* default */.A(g.nodes(), function (v) { + getExtremes(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + getExtremes(edge); + } + }); + + minX -= marginX; + minY -= marginY; + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + node.x -= minX; + node.y -= minY; + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, function (p) { + p.x -= minX; + p.y -= minY; + }); + if (has/* default */.A(edge, 'x')) { + edge.x -= minX; + } + if (has/* default */.A(edge, 'y')) { + edge.y -= minY; + } + }); + + graphLabel.width = maxX - minX + marginX; + graphLabel.height = maxY - minY + marginY; +} + +function assignNodeIntersects(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + var nodeV = g.node(e.v); + var nodeW = g.node(e.w); + var p1, p2; + if (!edge.points) { + edge.points = []; + p1 = nodeW; + p2 = nodeV; + } else { + p1 = edge.points[0]; + p2 = edge.points[edge.points.length - 1]; + } + edge.points.unshift(intersectRect(nodeV, p1)); + edge.points.push(intersectRect(nodeW, p2)); + }); +} + +function fixupEdgeLabelCoords(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + if (edge.labelpos === 'l' || edge.labelpos === 'r') { + edge.width -= edge.labeloffset; + } + switch (edge.labelpos) { + case 'l': + edge.x -= edge.width / 2 + edge.labeloffset; + break; + case 'r': + edge.x += edge.width / 2 + edge.labeloffset; + break; + } + } + }); +} + +function reversePointsForReversedEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.reversed) { + edge.points.reverse(); + } + }); +} + +function removeBorderNodes(g) { + forEach/* default */.A(g.nodes(), function (v) { + if (g.children(v).length) { + var node = g.node(v); + var t = g.node(node.borderTop); + var b = g.node(node.borderBottom); + var l = g.node(lodash_es_last(node.borderLeft)); + var r = g.node(lodash_es_last(node.borderRight)); + + node.width = Math.abs(r.x - l.x); + node.height = Math.abs(b.y - t.y); + node.x = l.x + node.width / 2; + node.y = t.y + node.height / 2; + } + }); + + forEach/* default */.A(g.nodes(), function (v) { + if (g.node(v).dummy === 'border') { + g.removeNode(v); + } + }); +} + +function removeSelfEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + if (e.v === e.w) { + var node = g.node(e.v); + if (!node.selfEdges) { + node.selfEdges = []; + } + node.selfEdges.push({ e: e, label: g.edge(e) }); + g.removeEdge(e); + } + }); +} + +function insertSelfEdges(g) { + var layers = buildLayerMatrix(g); + forEach/* default */.A(layers, function (layer) { + var orderShift = 0; + forEach/* default */.A(layer, function (v, i) { + var node = g.node(v); + node.order = i + orderShift; + forEach/* default */.A(node.selfEdges, function (selfEdge) { + addDummyNode( + g, + 'selfedge', + { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node.rank, + order: i + ++orderShift, + e: selfEdge.e, + label: selfEdge.label, + }, + '_se' + ); + }); + delete node.selfEdges; + }); + }); +} + +function positionSelfEdges(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'selfedge') { + var selfNode = g.node(node.e.v); + var x = selfNode.x + selfNode.width / 2; + var y = selfNode.y; + var dx = node.x - x; + var dy = selfNode.height / 2; + g.setEdge(node.e, node.label); + g.removeNode(v); + node.label.points = [ + { x: x + (2 * dx) / 3, y: y - dy }, + { x: x + (5 * dx) / 6, y: y - dy }, + { x: x + dx, y: y }, + { x: x + (5 * dx) / 6, y: y + dy }, + { x: x + (2 * dx) / 3, y: y + dy }, + ]; + node.label.x = node.x; + node.label.y = node.y; + } + }); +} + +function selectNumberAttrs(obj, attrs) { + return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); +} + +function canonicalize(attrs) { + var newAttrs = {}; + forEach/* default */.A(attrs, function (v, k) { + newAttrs[k.toLowerCase()] = v; + }); + return newAttrs; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + + + + + + + + +/***/ }), + +/***/ 3046: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + T: () => (/* binding */ Graph) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js +var isFunction = __webpack_require__(9610); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js +var isEmpty = __webpack_require__(6401); +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/* harmony default export */ const _baseIsNaN = (baseIsNaN); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/* harmony default export */ const _strictIndexOf = (strictIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js + + + + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? _strictIndexOf(array, value, fromIndex) + : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); +} + +/* harmony default export */ const _baseIndexOf = (baseIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js + + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && _baseIndexOf(array, value, 0) > -1; +} + +/* harmony default export */ const _arrayIncludes = (arrayIncludes); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js +var _Set = __webpack_require__(9857); +;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +/* harmony default export */ const lodash_es_noop = (noop); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { + return new _Set/* default */.A(values); +}; + +/* harmony default export */ const _createSet = (createSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js + + + + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = _arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = _arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : _createSet(array); + if (set) { + return (0,_setToArray/* default */.A)(set); + } + isCommon = false; + includes = _cacheHas/* default */.A; + seen = new _SetCache/* default */.A; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/* harmony default export */ const _baseUniq = (baseUniq); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js +var isArrayLikeObject = __webpack_require__(3533); +;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js + + + + + +/** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ +var union = (0,_baseRest/* default */.A)(function(arrays) { + return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); +}); + +/* harmony default export */ const lodash_es_union = (union); + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + + +var DEFAULT_EDGE_NAME = '\x00'; +var GRAPH_NODE = '\x00'; +var EDGE_KEY_DELIM = '\x01'; + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. +class Graph { + constructor(opts = {}) { + this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; + this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; + this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; + + // Label for the graph itself + this._label = undefined; + + // Defaults to be set when creating a new node + this._defaultNodeLabelFn = constant/* default */.A(undefined); + + // Defaults to be set when creating a new edge + this._defaultEdgeLabelFn = constant/* default */.A(undefined); + + // v -> label + this._nodes = {}; + + if (this._isCompound) { + // v -> parent + this._parent = {}; + + // v -> children + this._children = {}; + this._children[GRAPH_NODE] = {}; + } + + // v -> edgeObj + this._in = {}; + + // u -> v -> Number + this._preds = {}; + + // v -> edgeObj + this._out = {}; + + // v -> w -> Number + this._sucs = {}; + + // e -> edgeObj + this._edgeObjs = {}; + + // e -> label + this._edgeLabels = {}; + } + /* === Graph functions ========= */ + isDirected() { + return this._isDirected; + } + isMultigraph() { + return this._isMultigraph; + } + isCompound() { + return this._isCompound; + } + setGraph(label) { + this._label = label; + return this; + } + graph() { + return this._label; + } + /* === Node functions ========== */ + setDefaultNodeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; + } + nodeCount() { + return this._nodeCount; + } + nodes() { + return keys/* default */.A(this._nodes); + } + sources() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._in[v]); + }); + } + sinks() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._out[v]); + }); + } + setNodes(vs, value) { + var args = arguments; + var self = this; + forEach/* default */.A(vs, function (v) { + if (args.length > 1) { + self.setNode(v, value); + } else { + self.setNode(v); + } + }); + return this; + } + setNode(v, value) { + if (has/* default */.A(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; + } + return this; + } + + // @ts-expect-error + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; + } + node(v) { + return this._nodes[v]; + } + hasNode(v) { + return has/* default */.A(this._nodes, v); + } + removeNode(v) { + var self = this; + if (has/* default */.A(this._nodes, v)) { + var removeEdge = function (e) { + self.removeEdge(self._edgeObjs[e]); + }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + forEach/* default */.A(this.children(v), function (child) { + self.setParent(child); + }); + delete this._children[v]; + } + forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; + } + setParent(v, parent) { + if (!this._isCompound) { + throw new Error('Cannot set parent in a non-compound graph'); + } + + if (isUndefined/* default */.A(parent)) { + parent = GRAPH_NODE; + } else { + // Coerce parent to string + parent += ''; + for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); + } + } + + this.setNode(parent); + } + + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; + } + _removeFromParentsChildList(v) { + delete this._children[this._parent[v]][v]; + } + parent(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } + } + children(v) { + if (isUndefined/* default */.A(v)) { + v = GRAPH_NODE; + } + + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return keys/* default */.A(children); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } + } + predecessors(v) { + var predsV = this._preds[v]; + if (predsV) { + return keys/* default */.A(predsV); + } + } + successors(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return keys/* default */.A(sucsV); + } + } + neighbors(v) { + var preds = this.predecessors(v); + if (preds) { + return lodash_es_union(preds, this.successors(v)); + } + } + isLeaf(v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; + } + filterNodes(filter) { + // @ts-expect-error + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound, + }); + + copy.setGraph(this.graph()); + + var self = this; + forEach/* default */.A(this._nodes, function (value, v) { + if (filter(v)) { + copy.setNode(v, value); + } + }); + + forEach/* default */.A(this._edgeObjs, function (e) { + // @ts-expect-error + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self.edge(e)); + } + }); + + var parents = {}; + function findParent(v) { + var parent = self.parent(v); + if (parent === undefined || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); + } + } + + if (this._isCompound) { + forEach/* default */.A(copy.nodes(), function (v) { + copy.setParent(v, findParent(v)); + }); + } + + return copy; + } + /* === Edge functions ========== */ + setDefaultEdgeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; + } + edgeCount() { + return this._edgeCount; + } + edges() { + return values/* default */.A(this._edgeObjs); + } + setPath(vs, value) { + var self = this; + var args = arguments; + reduce/* default */.A(vs, function (v, w) { + if (args.length > 1) { + self.setEdge(v, w, value); + } else { + self.setEdge(v, w); + } + return w; + }); + return this; + } + /* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ + setEdge() { + var v, w, name, value; + var valueSpecified = false; + var arg0 = arguments[0]; + + if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; + } + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; + } + } + + v = '' + v; + w = '' + w; + if (!isUndefined/* default */.A(name)) { + name = '' + name; + } + + var e = edgeArgsToId(this._isDirected, v, w, name); + if (has/* default */.A(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; + } + return this; + } + + if (!isUndefined/* default */.A(name) && !this._isMultigraph) { + throw new Error('Cannot set a named edge when isMultigraph = false'); + } + + // It didn't exist, so we need to create it. + // First ensure the nodes exist. + this.setNode(v); + this.setNode(w); + + // @ts-expect-error + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + // Ensure we add undirected edges in a consistent way. + v = edgeObj.v; + w = edgeObj.w; + + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; + } + edge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return this._edgeLabels[e]; + } + hasEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return has/* default */.A(this._edgeLabels, e); + } + removeEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; + } + inEdges(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = values/* default */.A(inV); + if (!u) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.v === u; + }); + } + } + outEdges(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = values/* default */.A(outV); + if (!w) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.w === w; + }); + } + } + nodeEdges(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } + } +} + +/* Number of nodes in the graph. Should only be changed by the implementation. */ +Graph.prototype._nodeCount = 0; + +/* Number of edges in the graph. Should only be changed by the implementation. */ +Graph.prototype._edgeCount = 0; + +function incrementOrInitEntry(map, k) { + if (map[k]) { + map[k]++; + } else { + map[k] = 1; + } +} + +function decrementOrRemoveEntry(map, k) { + if (!--map[k]) { + delete map[k]; + } +} + +function edgeArgsToId(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); +} + +function edgeArgsToObj(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v: v, w: w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; +} + +function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); +} + + +/***/ }), + +/***/ 697: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) +/* harmony export */ }); +/* unused harmony export version */ +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); +// Includes only the "core" of graphlib + + + +const version = '2.1.9-pre'; + + + + +/***/ }), + +/***/ 4075: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ M: () => (/* binding */ write) +/* harmony export */ }); +/* unused harmony export read */ +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9592); +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53); +/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4722); +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); + + + + + +function write(g) { + var json = { + options: { + directed: g.isDirected(), + multigraph: g.isMultigraph(), + compound: g.isCompound(), + }, + nodes: writeNodes(g), + edges: writeEdges(g), + }; + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(g.graph())) { + json.value = lodash_es__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A(g.graph()); + } + return json; +} + +function writeNodes(g) { + return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.nodes(), function (v) { + var nodeValue = g.node(v); + var parent = g.parent(v); + var node = { v: v }; + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(nodeValue)) { + node.value = nodeValue; + } + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(parent)) { + node.parent = parent; + } + return node; + }); +} + +function writeEdges(g) { + return lodash_es__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A(g.edges(), function (e) { + var edgeValue = g.edge(e); + var edge = { v: e.v, w: e.w }; + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(e.name)) { + edge.name = e.name; + } + if (!lodash_es__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(edgeValue)) { + edge.value = edgeValue; + } + return edge; + }); +} + +function read(json) { + var g = new Graph(json.options).setGraph(json.value); + _.each(json.nodes, function (entry) { + g.setNode(entry.v, entry.value); + if (entry.parent) { + g.setParent(entry.v, entry.parent); + } + }); + _.each(json.edges, function (entry) { + g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); + }); + return g; +} + + +/***/ }), + +/***/ 2062: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _SetCache) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules +var _MapCache = __webpack_require__(9471); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/* harmony default export */ const _setCacheAdd = (setCacheAdd); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ const _setCacheHas = (setCacheHas); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new _MapCache/* default */.A; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; +SetCache.prototype.has = _setCacheHas; + +/* harmony default export */ const _SetCache = (SetCache); + + +/***/ }), + +/***/ 2641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); + + +/***/ }), + +/***/ 2634: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); + + +/***/ }), + +/***/ 5572: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); + + +/***/ }), + +/***/ 6912: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); + + +/***/ }), + +/***/ 1641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseClone) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js +var _arrayEach = __webpack_require__(2641); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js +var _copyObject = __webpack_require__(2031); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js + + + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssign = (baseAssign); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js + + + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssignIn = (baseAssignIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js +var _cloneBuffer = __webpack_require__(154); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js +var _copyArray = __webpack_require__(9759); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js +var _getSymbols = __webpack_require__(4792); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js + + + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); +} + +/* harmony default export */ const _copySymbols = (copySymbols); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js +var _getPrototype = __webpack_require__(5647); +// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js +var stubArray = __webpack_require__(3153); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { + var result = []; + while (object) { + (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); + object = (0,_getPrototype/* default */.A)(object); + } + return result; +}; + +/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js + + + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); +} + +/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js +var _baseGetAllKeys = __webpack_require__(3831); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js + + + + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); +} + +/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/* harmony default export */ const _initCloneArray = (initCloneArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js +var _cloneArrayBuffer = __webpack_require__(565); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js + + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/* harmony default export */ const _cloneDataView = (cloneDataView); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/* harmony default export */ const _cloneRegExp = (cloneRegExp); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js + + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/* harmony default export */ const _cloneSymbol = (cloneSymbol); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js +var _cloneTypedArray = __webpack_require__(1801); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js + + + + + + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return (0,_cloneArrayBuffer/* default */.A)(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return _cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return (0,_cloneTypedArray/* default */.A)(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return _cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return _cloneSymbol(object); + } +} + +/* harmony default export */ const _initCloneByTag = (initCloneByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules +var _initCloneObject = __webpack_require__(8598); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js + + + +/** `Object#toString` result references. */ +var _baseIsMap_mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; +} + +/* harmony default export */ const _baseIsMap = (baseIsMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js +var _nodeUtil = __webpack_require__(4841); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js + + + + +/* Node.js helper references. */ +var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; + +/* harmony default export */ const lodash_es_isMap = (isMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js + + + +/** `Object#toString` result references. */ +var _baseIsSet_setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; +} + +/* harmony default export */ const _baseIsSet = (baseIsSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js + + + + +/* Node.js helper references. */ +var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; + +/* harmony default export */ const lodash_es_isSet = (isSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js + + + + + + + + + + + + + + + + + + + + + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + _baseClone_boolTag = '[object Boolean]', + _baseClone_dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + _baseClone_mapTag = '[object Map]', + _baseClone_numberTag = '[object Number]', + objectTag = '[object Object]', + _baseClone_regexpTag = '[object RegExp]', + _baseClone_setTag = '[object Set]', + _baseClone_stringTag = '[object String]', + _baseClone_symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var _baseClone_arrayBufferTag = '[object ArrayBuffer]', + _baseClone_dataViewTag = '[object DataView]', + _baseClone_float32Tag = '[object Float32Array]', + _baseClone_float64Tag = '[object Float64Array]', + _baseClone_int8Tag = '[object Int8Array]', + _baseClone_int16Tag = '[object Int16Array]', + _baseClone_int32Tag = '[object Int32Array]', + _baseClone_uint8Tag = '[object Uint8Array]', + _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', + _baseClone_uint16Tag = '[object Uint16Array]', + _baseClone_uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = +cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = +cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = +cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = +cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = +cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = +cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = +cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = +cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = +cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!(0,isObject/* default */.A)(value)) { + return value; + } + var isArr = (0,isArray/* default */.A)(value); + if (isArr) { + result = _initCloneArray(value); + if (!isDeep) { + return (0,_copyArray/* default */.A)(value, result); + } + } else { + var tag = (0,_getTag/* default */.A)(value), + isFunc = tag == funcTag || tag == genTag; + + if ((0,isBuffer/* default */.A)(value)) { + return (0,_cloneBuffer/* default */.A)(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); + if (!isDeep) { + return isFlat + ? _copySymbolsIn(value, _baseAssignIn(result, value)) + : _copySymbols(value, _baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = _initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new _Stack/* default */.A); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (lodash_es_isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (lodash_es_isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) + : (isFlat ? keysIn/* default */.A : keys/* default */.A); + + var props = isArr ? undefined : keysFunc(value); + (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +/* harmony default export */ const _baseClone = (baseClone); + + +/***/ }), + +/***/ 6240: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseEach) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js + + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!(0,isArrayLike/* default */.A)(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +/* harmony default export */ const _createBaseEach = (createBaseEach); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js + + + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = _createBaseEach(_baseForOwn/* default */.A); + +/* harmony default export */ const _baseEach = (baseEach); + + +/***/ }), + +/***/ 5707: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); + + +/***/ }), + +/***/ 3588: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseFlatten) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules +var isArguments = __webpack_require__(2274); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js + + + + +/** Built-in value references. */ +var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/* harmony default export */ const _isFlattenable = (isFlattenable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js + + + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = _isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + (0,_arrayPush/* default */.A)(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/* harmony default export */ const _baseFlatten = (baseFlatten); + + +/***/ }), + +/***/ 9841: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); + + +/***/ }), + +/***/ 6318: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); + + +/***/ }), + +/***/ 3831: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6912); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); + + +/***/ }), + +/***/ 9574: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseIteratee) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arraySome = (arraySome); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!_arraySome(other, function(othValue, othIndex) { + if (!(0,_cacheHas/* default */.A)(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalArrays = (equalArrays); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js +var _Uint8Array = __webpack_require__(3988); +// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js +var eq = __webpack_require__(6984); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ const _mapToArray = (mapToArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _equalByTag_COMPARE_PARTIAL_FLAG = 1, + _equalByTag_COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return (0,eq/* default */.A)(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = _mapToArray; + + case setTag: + var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; + convert || (convert = _setToArray/* default */.A); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ const _equalByTag = (equalByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js + + +/** Used to compose bitmasks for value comparisons. */ +var _equalObjects_COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, + objProps = (0,_getAllKeys/* default */.A)(object), + objLength = objProps.length, + othProps = (0,_getAllKeys/* default */.A)(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalObjects = (equalObjects); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules +var isTypedArray = __webpack_require__(3858); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var _baseIsEqualDeep_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = (0,isArray/* default */.A)(object), + othIsArr = (0,isArray/* default */.A)(other), + objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), + othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && (0,isBuffer/* default */.A)(object)) { + if (!(0,isBuffer/* default */.A)(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new _Stack/* default */.A); + return (objIsArr || (0,isTypedArray/* default */.A)(object)) + ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new _Stack/* default */.A); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new _Stack/* default */.A); + return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { + return value !== value && other !== other; + } + return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ const _baseIsEqual = (baseIsEqual); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, + _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new _Stack/* default */.A; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ const _baseIsMatch = (baseIsMatch); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !(0,isObject/* default */.A)(value); +} + +/* harmony default export */ const _isStrictComparable = (isStrictComparable); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = (0,keys/* default */.A)(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, _isStrictComparable(value)]; + } + return result; +} + +/* harmony default export */ const _getMatchData = (getMatchData); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = _getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return _matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || _baseIsMatch(object, source, matchData); + }; +} + +/* harmony default export */ const _baseMatches = (baseMatches); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ const lodash_es_get = (get); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, + _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { + return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); + } + return function(object) { + var objValue = lodash_es_get(object, path); + return (objValue === undefined && objValue === srcValue) + ? (0,hasIn/* default */.A)(object, path) + : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return (0,_baseGet/* default */.A)(object, path); + }; +} + +/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); +} + +/* harmony default export */ const lodash_es_property = (property); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity/* default */.A; + } + if (typeof value == 'object') { + return (0,isArray/* default */.A)(value) + ? _baseMatchesProperty(value[0], value[1]) + : _baseMatches(value); + } + return lodash_es_property(value); +} + +/* harmony default export */ const _baseIteratee = (baseIteratee); + + +/***/ }), + +/***/ 2568: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; + + (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); + + +/***/ }), + +/***/ 805: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); + + +/***/ }), + +/***/ 4099: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); + + +/***/ }), + +/***/ 9922: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9008); + + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); + + +/***/ }), + +/***/ 7819: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _castPath) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js +var memoize = __webpack_require__(6632); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = (0,memoize/* default */.A)(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ const _memoizeCapped = (memoizeCapped); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js + + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = _memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ const _stringToPath = (stringToPath); + +// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules +var lodash_es_toString = __webpack_require__(8894); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if ((0,isArray/* default */.A)(value)) { + return value; + } + return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); +} + +/* harmony default export */ const _castPath = (castPath); + + +/***/ }), + +/***/ 9042: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3831); +/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4792); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); + + +/***/ }), + +/***/ 4792: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); +/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3153); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); + + +/***/ }), + +/***/ 5054: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2274); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2049); +/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5353); +/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && + ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); + + +/***/ }), + +/***/ 6586: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1882); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); + + +/***/ }), + +/***/ 9959: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); + + +/***/ }), + +/***/ 3282: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1882); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); + + +/***/ }), + +/***/ 53: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseClone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1641); + + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ +function clone(value) { + return (0,_baseClone_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value, CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clone); + + +/***/ }), + +/***/ 3068: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4326); +/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6984); +/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); +/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5615); + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); + + +/***/ }), + +/***/ 1662: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_filter) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js +var _arrayFilter = __webpack_require__(2634); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js + + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + (0,_baseEach/* default */.A)(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +/* harmony default export */ const _baseFilter = (baseFilter); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js + + + + + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ +function filter(collection, predicate) { + var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; + return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); +} + +/* harmony default export */ const lodash_es_filter = (filter); + + +/***/ }), + +/***/ 4098: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3588); + + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); + + +/***/ }), + +/***/ 8058: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2641); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); +/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9922); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); + + +/***/ }), + +/***/ 8585: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_has) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && _baseHas_hasOwnProperty.call(object, key); +} + +/* harmony default export */ const _baseHas = (baseHas); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js + + + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); +} + +/* harmony default export */ const lodash_es_has = (has); + + +/***/ }), + +/***/ 9188: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_hasIn) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ const _baseHasIn = (baseHasIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); +} + +/* harmony default export */ const lodash_es_hasIn = (hasIn); + + +/***/ }), + +/***/ 1882: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8496); +/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3098); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); + + +/***/ }), + +/***/ 9592: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); + + +/***/ }), + +/***/ 2184: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3607); +/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1852); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); + + +/***/ }), + +/***/ 4722: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5572); +/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9574); +/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2568); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); + + +/***/ }), + +/***/ 1942: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_pick) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules +var _castPath = __webpack_require__(7819); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js +var _isIndex = __webpack_require__(5353); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js + + + + + + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!(0,isObject/* default */.A)(object)) { + return object; + } + path = (0,_castPath/* default */.A)(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = (0,_toKey/* default */.A)(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = (0,isObject/* default */.A)(objValue) + ? objValue + : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); + } + } + (0,_assignValue/* default */.A)(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/* harmony default export */ const _baseSet = (baseSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js + + + + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = (0,_baseGet/* default */.A)(object, path); + + if (predicate(value, path)) { + _baseSet(result, (0,_castPath/* default */.A)(path, object), value); + } + } + return result; +} + +/* harmony default export */ const _basePickBy = (basePickBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js + + + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return _basePickBy(object, paths, function(value, path) { + return (0,hasIn/* default */.A)(object, path); + }); +} + +/* harmony default export */ const _basePick = (basePick); + +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules +var _overRest = __webpack_require__(6875); +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules +var _setToString = __webpack_require__(7525); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js + + + + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); +} + +/* harmony default export */ const _flatRest = (flatRest); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js + + + +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = _flatRest(function(object, paths) { + return object == null ? {} : _basePick(object, paths); +}); + +/* harmony default export */ const lodash_es_pick = (pick); + + +/***/ }), + +/***/ 1395: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_range) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +/* harmony default export */ const _baseRange = (baseRange); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js + + + + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = (0,toFinite/* default */.A)(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = (0,toFinite/* default */.A)(end); + } + step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); + return _baseRange(start, end, step, fromRight); + }; +} + +/* harmony default export */ const _createRange = (createRange); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js + + +/** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ +var range = _createRange(); + +/* harmony default export */ const lodash_es_range = (range); + + +/***/ }), + +/***/ 9463: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_reduce) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/* harmony default export */ const _arrayReduce = (arrayReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +/* harmony default export */ const _baseReduce = (baseReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js + + + + + + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ +function reduce(collection, iteratee, accumulator) { + var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, + initAccum = arguments.length < 3; + + return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); +} + +/* harmony default export */ const lodash_es_reduce = (reduce); + + +/***/ }), + +/***/ 3153: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); + + +/***/ }), + +/***/ 4342: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toFinite) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js +/** Used to match a single whitespace character. */ +var reWhitespace = /\s/; + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ +function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; +} + +/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js + + +/** Used to match leading whitespace. */ +var reTrimStart = /^\s+/; + +/** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ +function baseTrim(string) { + return string + ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; +} + +/* harmony default export */ const _baseTrim = (baseTrim); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js + + + + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if ((0,isSymbol/* default */.A)(value)) { + return NAN; + } + if ((0,isObject/* default */.A)(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = (0,isObject/* default */.A)(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = _baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +/* harmony default export */ const lodash_es_toNumber = (toNumber); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = lodash_es_toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +/* harmony default export */ const lodash_es_toFinite = (toFinite); + + +/***/ }), + +/***/ 8894: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toString) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if ((0,isArray/* default */.A)(value)) { + // Recursively convert values (susceptible to call stack limits). + return (0,_arrayMap/* default */.A)(value, baseToString) + ''; + } + if ((0,isSymbol/* default */.A)(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const _baseToString = (baseToString); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString_toString(value) { + return value == null ? '' : _baseToString(value); +} + +/* harmony default export */ const lodash_es_toString = (toString_toString); + + +/***/ }), + +/***/ 5664: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8894); + + +/** Used to generate unique IDs. */ +var idCounter = 0; + +/** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ +function uniqueId(prefix) { + var id = ++idCounter; + return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); + + +/***/ }), + +/***/ 8207: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_values) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js + + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return (0,_arrayMap/* default */.A)(props, function(key) { + return object[key]; + }); +} + +/* harmony default export */ const _baseValues = (baseValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js + + + +/** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ +function values(object) { + return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); +} + +/* harmony default export */ const lodash_es_values = (values); + + +/***/ }), + +/***/ 3791: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + a: () => (/* binding */ createText), + c: () => (/* binding */ computeDimensionOfText) +}); + +// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +var constructs_namespaceObject = {}; +__webpack_require__.r(constructs_namespaceObject); +__webpack_require__.d(constructs_namespaceObject, { + attentionMarkers: () => (attentionMarkers), + contentInitial: () => (contentInitial), + disable: () => (disable), + document: () => (constructs_document), + flow: () => (constructs_flow), + flowInitial: () => (flowInitial), + insideSpan: () => (insideSpan), + string: () => (constructs_string), + text: () => (constructs_text) +}); + +// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-f47111a7.js + 8 modules +var mermaid_f47111a7 = __webpack_require__(6257); +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js +/** + * @typedef {import('mdast').Root|import('mdast').Content} Node + * + * @typedef Options + * Configuration (optional). + * @property {boolean | null | undefined} [includeImageAlt=true] + * Whether to use `alt` for `image`s. + * @property {boolean | null | undefined} [includeHtml=true] + * Whether to use `value` of HTML. + */ + +/** @type {Options} */ +const emptyOptions = {} + +/** + * Get the text content of a node or list of nodes. + * + * Prefers the node’s plain-text fields, otherwise serializes its children, + * and if the given value is an array, serialize the nodes in it. + * + * @param {unknown} value + * Thing to serialize, typically `Node`. + * @param {Options | null | undefined} [options] + * Configuration (optional). + * @returns {string} + * Serialized `value`. + */ +function lib_toString(value, options) { + const settings = options || emptyOptions + const includeImageAlt = + typeof settings.includeImageAlt === 'boolean' + ? settings.includeImageAlt + : true + const includeHtml = + typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true + + return one(value, includeImageAlt, includeHtml) +} + +/** + * One node or several nodes. + * + * @param {unknown} value + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized node. + */ +function one(value, includeImageAlt, includeHtml) { + if (node(value)) { + if ('value' in value) { + return value.type === 'html' && !includeHtml ? '' : value.value + } + + if (includeImageAlt && 'alt' in value && value.alt) { + return value.alt + } + + if ('children' in value) { + return lib_all(value.children, includeImageAlt, includeHtml) + } + } + + if (Array.isArray(value)) { + return lib_all(value, includeImageAlt, includeHtml) + } + + return '' +} + +/** + * Serialize a list of nodes. + * + * @param {Array<unknown>} values + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized nodes. + */ +function lib_all(values, includeImageAlt, includeHtml) { + /** @type {Array<string>} */ + const result = [] + let index = -1 + + while (++index < values.length) { + result[index] = one(values[index], includeImageAlt, includeHtml) + } + + return result.join('') +} + +/** + * Check if `value` looks like a node. + * + * @param {unknown} value + * Thing. + * @returns {value is Node} + * Whether `value` is a node. + */ +function node(value) { + return Boolean(value && typeof value === 'object') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array<T>} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array<unknown>} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {Array<T>} items + * Items to add to `list`. + * @returns {Array<T>} + * Either `list` or `items`. + */ +function push(list, items) { + if (list.length > 0) { + splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + * @typedef {import('micromark-util-types').Handles} Handles + * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension + * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension + */ + + + +const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty + +/** + * Combine multiple syntax extensions into one. + * + * @param {Array<Extension>} extensions + * List of syntax extensions. + * @returns {NormalizedExtension} + * A single combined extension. + */ +function combineExtensions(extensions) { + /** @type {NormalizedExtension} */ + const all = {} + let index = -1 + + while (++index < extensions.length) { + syntaxExtension(all, extensions[index]) + } + + return all +} + +/** + * Merge `extension` into `all`. + * + * @param {NormalizedExtension} all + * Extension to merge into. + * @param {Extension} extension + * Extension to merge. + * @returns {void} + */ +function syntaxExtension(all, extension) { + /** @type {keyof Extension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + /** @type {Record<string, unknown>} */ + const left = maybe || (all[hook] = {}) + /** @type {Record<string, unknown> | undefined} */ + const right = extension[hook] + /** @type {string} */ + let code + + if (right) { + for (code in right) { + if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] + const value = right[code] + constructs( + // @ts-expect-error Looks like a list. + left[code], + Array.isArray(value) ? value : value ? [value] : [] + ) + } + } + } +} + +/** + * Merge `list` into `existing` (both lists of constructs). + * Mutates `existing`. + * + * @param {Array<unknown>} existing + * @param {Array<unknown>} list + * @returns {void} + */ +function constructs(existing, list) { + let index = -1 + /** @type {Array<unknown>} */ + const before = [] + + while (++index < list.length) { + // @ts-expect-error Looks like an object. + ;(list[index].add === 'after' ? existing : before).push(list[index]) + } + + splice(existing, 0, 0, before) +} + +/** + * Combine multiple HTML extensions into one. + * + * @param {Array<HtmlExtension>} htmlExtensions + * List of HTML extensions. + * @returns {HtmlExtension} + * A single combined HTML extension. + */ +function combineHtmlExtensions(htmlExtensions) { + /** @type {HtmlExtension} */ + const handlers = {} + let index = -1 + + while (++index < htmlExtensions.length) { + htmlExtension(handlers, htmlExtensions[index]) + } + + return handlers +} + +/** + * Merge `extension` into `all`. + * + * @param {HtmlExtension} all + * Extension to merge into. + * @param {HtmlExtension} extension + * Extension to merge. + * @returns {void} + */ +function htmlExtension(all, extension) { + /** @type {keyof HtmlExtension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + const left = maybe || (all[hook] = {}) + const right = extension[hook] + /** @type {keyof Handles} */ + let type + + if (right) { + for (type in right) { + // @ts-expect-error assume document vs regular handler are managed correctly. + left[type] = right[type] + } + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +// This module is generated by `script/`. +// +// CommonMark handles attention (emphasis, strong) markers based on what comes +// before or after them. +// One such difference is if those characters are Unicode punctuation. +// This script is generated from the Unicode data. + +/** + * Regular expression that matches a unicode punctuation character. + */ +const unicodePunctuationRegex = + /[!-\/:-@\[-`\{-~\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]/ + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + + +/** + * Check whether the character code represents an ASCII alpha (`a` through `z`, + * case insensitive). + * + * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. + * + * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) + * to U+005A (`Z`). + * + * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) + * to U+007A (`z`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlpha = regexCheck(/[A-Za-z]/) + +/** + * Check whether the character code represents an ASCII alphanumeric (`a` + * through `z`, case insensitive, or `0` through `9`). + * + * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha + * (see `asciiAlpha`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) + +/** + * Check whether the character code represents an ASCII atext. + * + * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in + * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), + * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F + * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E + * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE + * (`{`) to U+007E TILDE (`~`). + * + * See: + * **\[RFC5322]**: + * [Internet Message Format](https://tools.ietf.org/html/rfc5322). + * P. Resnick. + * IETF. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) + +/** + * Check whether a character code is an ASCII control character. + * + * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) + * to U+001F (US), or U+007F (DEL). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code !== null && (code < 32 || code === 127) + ) +} + +/** + * Check whether the character code represents an ASCII digit (`0` through `9`). + * + * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to + * U+0039 (`9`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiDigit = regexCheck(/\d/) + +/** + * Check whether the character code represents an ASCII hex digit (`a` through + * `f`, case insensitive, or `0` through `9`). + * + * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex + * digit, or an ASCII lower hex digit. + * + * An **ASCII upper hex digit** is a character in the inclusive range U+0041 + * (`A`) to U+0046 (`F`). + * + * An **ASCII lower hex digit** is a character in the inclusive range U+0061 + * (`a`) to U+0066 (`f`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) + +/** + * Check whether the character code represents ASCII punctuation. + * + * An **ASCII punctuation** is a character in the inclusive ranges U+0021 + * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT + * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT + * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) + +/** + * Check whether a character code is a markdown line ending. + * + * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN + * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). + * + * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE + * RETURN (CR) are replaced by these virtual characters depending on whether + * they occurred together. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEnding(code) { + return code !== null && code < -2 +} + +/** + * Check whether a character code is a markdown line ending (see + * `markdownLineEnding`) or markdown space (see `markdownSpace`). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEndingOrSpace(code) { + return code !== null && (code < 0 || code === 32) +} + +/** + * Check whether a character code is a markdown space. + * + * A **markdown space** is the concrete character U+0020 SPACE (SP) and the + * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). + * + * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is + * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL + * SPACE (VS) characters, depending on the column at which the tab occurred. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownSpace(code) { + return code === -2 || code === -1 || code === 32 +} + +// Size note: removing ASCII from the regex and using `asciiPunctuation` here +// In fact adds to the bundle size. +/** + * Check whether the character code represents Unicode punctuation. + * + * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, + * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` + * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` + * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII + * punctuation (see `asciiPunctuation`). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodePunctuation = regexCheck(unicodePunctuationRegex) + +/** + * Check whether the character code represents Unicode whitespace. + * + * Note that this does handle micromark specific markdown whitespace characters. + * See `markdownLineEndingOrSpace` to check that. + * + * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, + * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), + * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodeWhitespace = regexCheck(/\s/) + +/** + * Create a code check from a regex. + * + * @param {RegExp} regex + * @returns {(code: Code) => boolean} + */ +function regexCheck(regex) { + return check + + /** + * Check whether a code matches the bound regex. + * + * @param {Code} code + * Character code. + * @returns {boolean} + * Whether the character code matches the bound regex. + */ + function check(code) { + return code !== null && regex.test(String.fromCharCode(code)) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * spaces in markdown are often optional, in which case this factory can be + * used and `ok` will be switched to whether spaces were found or not + * * one line ending or space can be detected with `markdownSpace(code)` right + * before using `factorySpace` + * + * ###### Examples + * + * Where `␉` represents a tab (plus how much it expands) and `␠` represents a + * single space. + * + * ```markdown + * ␉ + * ␠␠␠␠ + * ␉␠ + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {TokenType} type + * Type (`' \t'`). + * @param {number | undefined} [max=Infinity] + * Max (exclusive). + * @returns + * Start state. + */ +function factorySpace(effects, ok, type, max) { + const limit = max ? max - 1 : Number.POSITIVE_INFINITY + let size = 0 + return start + + /** @type {State} */ + function start(code) { + if (markdownSpace(code)) { + effects.enter(type) + return prefix(code) + } + return ok(code) + } + + /** @type {State} */ + function prefix(code) { + if (markdownSpace(code) && size++ < limit) { + effects.consume(code) + return prefix + } + effects.exit(type) + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + +/** @type {InitialConstruct} */ +const content = { + tokenize: initializeContent +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeContent(effects) { + const contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ) + /** @type {Token} */ + let previous + return contentStart + + /** @type {State} */ + function afterContentStartConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, contentStart, 'linePrefix') + } + + /** @type {State} */ + function paragraphInitial(code) { + effects.enter('paragraph') + return lineStart(code) + } + + /** @type {State} */ + function lineStart(code) { + const token = effects.enter('chunkText', { + contentType: 'text', + previous + }) + if (previous) { + previous.next = token + } + previous = token + return data(code) + } + + /** @type {State} */ + function data(code) { + if (code === null) { + effects.exit('chunkText') + effects.exit('paragraph') + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + effects.exit('chunkText') + return lineStart + } + + // Data. + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + +/** + * @typedef {[Construct, ContainerState]} StackItem + */ + + + + +/** @type {InitialConstruct} */ +const document_document = { + tokenize: initializeDocument +} + +/** @type {Construct} */ +const containerConstruct = { + tokenize: tokenizeContainer +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeDocument(effects) { + const self = this + /** @type {Array<StackItem>} */ + const stack = [] + let continued = 0 + /** @type {TokenizeContext | undefined} */ + let childFlow + /** @type {Token | undefined} */ + let childToken + /** @type {number} */ + let lineStartOffset + return start + + /** @type {State} */ + function start(code) { + // First we iterate through the open blocks, starting with the root + // document, and descending through last children down to the last open + // block. + // Each block imposes a condition that the line must satisfy if the block is + // to remain open. + // For example, a block quote requires a `>` character. + // A paragraph requires a non-blank line. + // In this phase we may match all or just some of the open blocks. + // But we cannot close unmatched blocks yet, because we may have a lazy + // continuation line. + if (continued < stack.length) { + const item = stack[continued] + self.containerState = item[1] + return effects.attempt( + item[0].continuation, + documentContinue, + checkNewContainers + )(code) + } + + // Done. + return checkNewContainers(code) + } + + /** @type {State} */ + function documentContinue(code) { + continued++ + + // Note: this field is called `_closeFlow` but it also closes containers. + // Perhaps a good idea to rename it but it’s already used in the wild by + // extensions. + if (self.containerState._closeFlow) { + self.containerState._closeFlow = undefined + if (childFlow) { + closeFlow() + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when dealing with lazy lines in `writeToChild`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {Point | undefined} */ + let point + + // Find the flow chunk. + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + point = self.events[indexBeforeFlow][1].end + break + } + } + exitContainers(continued) + + // Fix positions. + let index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + return checkNewContainers(code) + } + return start(code) + } + + /** @type {State} */ + function checkNewContainers(code) { + // Next, after consuming the continuation markers for existing blocks, we + // look for new block starts (e.g. `>` for a block quote). + // If we encounter a new block start, we close any blocks unmatched in + // step 1 before creating the new block as a child of the last matched + // block. + if (continued === stack.length) { + // No need to `check` whether there’s a container, of `exitContainers` + // would be moot. + // We can instead immediately `attempt` to parse one. + if (!childFlow) { + return documentContinued(code) + } + + // If we have concrete content, such as block HTML or fenced code, + // we can’t have containers “pierce” into them, so we can immediately + // start. + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { + return flowStart(code) + } + + // If we do have flow, it could still be a blank line, + // but we’d be interrupting it w/ a new container if there’s a current + // construct. + // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer + // needed in micromark-extension-gfm-table@1.0.6). + self.interrupt = Boolean( + childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack + ) + } + + // Check if there is a new container. + self.containerState = {} + return effects.check( + containerConstruct, + thereIsANewContainer, + thereIsNoNewContainer + )(code) + } + + /** @type {State} */ + function thereIsANewContainer(code) { + if (childFlow) closeFlow() + exitContainers(continued) + return documentContinued(code) + } + + /** @type {State} */ + function thereIsNoNewContainer(code) { + self.parser.lazy[self.now().line] = continued !== stack.length + lineStartOffset = self.now().offset + return flowStart(code) + } + + /** @type {State} */ + function documentContinued(code) { + // Try new containers. + self.containerState = {} + return effects.attempt( + containerConstruct, + containerContinue, + flowStart + )(code) + } + + /** @type {State} */ + function containerContinue(code) { + continued++ + stack.push([self.currentConstruct, self.containerState]) + // Try another. + return documentContinued(code) + } + + /** @type {State} */ + function flowStart(code) { + if (code === null) { + if (childFlow) closeFlow() + exitContainers(0) + effects.consume(code) + return + } + childFlow = childFlow || self.parser.flow(self.now()) + effects.enter('chunkFlow', { + contentType: 'flow', + previous: childToken, + _tokenizer: childFlow + }) + return flowContinue(code) + } + + /** @type {State} */ + function flowContinue(code) { + if (code === null) { + writeToChild(effects.exit('chunkFlow'), true) + exitContainers(0) + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + writeToChild(effects.exit('chunkFlow')) + // Get ready for the next line. + continued = 0 + self.interrupt = undefined + return start + } + effects.consume(code) + return flowContinue + } + + /** + * @param {Token} token + * @param {boolean | undefined} [eof] + * @returns {void} + */ + function writeToChild(token, eof) { + const stream = self.sliceStream(token) + if (eof) stream.push(null) + token.previous = childToken + if (childToken) childToken.next = token + childToken = token + childFlow.defineSkip(token.start) + childFlow.write(stream) + + // Alright, so we just added a lazy line: + // + // ```markdown + // > a + // b. + // + // Or: + // + // > ~~~c + // d + // + // Or: + // + // > | e | + // f + // ``` + // + // The construct in the second example (fenced code) does not accept lazy + // lines, so it marked itself as done at the end of its first line, and + // then the content construct parses `d`. + // Most constructs in markdown match on the first line: if the first line + // forms a construct, a non-lazy line can’t “unmake” it. + // + // The construct in the third example is potentially a GFM table, and + // those are *weird*. + // It *could* be a table, from the first line, if the following line + // matches a condition. + // In this case, that second line is lazy, which “unmakes” the first line + // and turns the whole into one content block. + // + // We’ve now parsed the non-lazy and the lazy line, and can figure out + // whether the lazy line started a new flow block. + // If it did, we exit the current containers between the two flow blocks. + if (self.parser.lazy[token.start.line]) { + let index = childFlow.events.length + while (index--) { + if ( + // The token starts before the line ending… + childFlow.events[index][1].start.offset < lineStartOffset && + // …and either is not ended yet… + (!childFlow.events[index][1].end || + // …or ends after it. + childFlow.events[index][1].end.offset > lineStartOffset) + ) { + // Exit: there’s still something open, which means it’s a lazy line + // part of something. + return + } + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when closing flow in `documentContinue`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {boolean | undefined} */ + let seen + /** @type {Point | undefined} */ + let point + + // Find the previous chunk (the one before the lazy line). + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + if (seen) { + point = self.events[indexBeforeFlow][1].end + break + } + seen = true + } + } + exitContainers(continued) + + // Fix positions. + index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + } + } + + /** + * @param {number} size + * @returns {void} + */ + function exitContainers(size) { + let index = stack.length + + // Exit open containers. + while (index-- > size) { + const entry = stack[index] + self.containerState = entry[1] + entry[0].exit.call(self, effects) + } + stack.length = size + } + function closeFlow() { + childFlow.write([null]) + childToken = undefined + childFlow = undefined + self.containerState._closeFlow = undefined + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContainer(effects, ok, nok) { + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok, nok), + 'linePrefix', + this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blankLine = { + tokenize: tokenizeBlankLine, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLine(effects, ok, nok) { + return start + + /** + * Start of blank line. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + return markdownSpace(code) + ? factorySpace(effects, after, 'linePrefix')(code) + : after(code) + } + + /** + * At eof/eol, after optional whitespace. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array<T>} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function micromark_util_chunked_splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array<unknown>} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {Array<T>} items + * Items to add to `list`. + * @returns {Array<T>} + * Either `list` or `items`. + */ +function micromark_util_chunked_push(list, items) { + if (list.length > 0) { + micromark_util_chunked_splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Token} Token + */ + + +/** + * Tokenize subcontent. + * + * @param {Array<Event>} events + * List of events. + * @returns {boolean} + * Whether subtokens were found. + */ +function subtokenize(events) { + /** @type {Record<string, number>} */ + const jumps = {} + let index = -1 + /** @type {Event} */ + let event + /** @type {number | undefined} */ + let lineIndex + /** @type {number} */ + let otherIndex + /** @type {Event} */ + let otherEvent + /** @type {Array<Event>} */ + let parameters + /** @type {Array<Event>} */ + let subevents + /** @type {boolean | undefined} */ + let more + while (++index < events.length) { + while (index in jumps) { + index = jumps[index] + } + event = events[index] + + // Add a hook for the GFM tasklist extension, which needs to know if text + // is in the first content of a list item. + if ( + index && + event[1].type === 'chunkFlow' && + events[index - 1][1].type === 'listItemPrefix' + ) { + subevents = event[1]._tokenizer.events + otherIndex = 0 + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'lineEndingBlank' + ) { + otherIndex += 2 + } + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'content' + ) { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === 'content') { + break + } + if (subevents[otherIndex][1].type === 'chunkText') { + subevents[otherIndex][1]._isInFirstContentOfListItem = true + otherIndex++ + } + } + } + } + + // Enter. + if (event[0] === 'enter') { + if (event[1].contentType) { + Object.assign(jumps, subcontent(events, index)) + index = jumps[index] + more = true + } + } + // Exit. + else if (event[1]._container) { + otherIndex = index + lineIndex = undefined + while (otherIndex--) { + otherEvent = events[otherIndex] + if ( + otherEvent[1].type === 'lineEnding' || + otherEvent[1].type === 'lineEndingBlank' + ) { + if (otherEvent[0] === 'enter') { + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + } + otherEvent[1].type = 'lineEnding' + lineIndex = otherIndex + } + } else { + break + } + } + if (lineIndex) { + // Fix position. + event[1].end = Object.assign({}, events[lineIndex][1].start) + + // Switch container exit w/ line endings. + parameters = events.slice(lineIndex, index) + parameters.unshift(event) + micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) + } + } + } + return !more +} + +/** + * Tokenize embedded tokens. + * + * @param {Array<Event>} events + * @param {number} eventIndex + * @returns {Record<string, number>} + */ +function subcontent(events, eventIndex) { + const token = events[eventIndex][1] + const context = events[eventIndex][2] + let startPosition = eventIndex - 1 + /** @type {Array<number>} */ + const startPositions = [] + const tokenizer = + token._tokenizer || context.parser[token.contentType](token.start) + const childEvents = tokenizer.events + /** @type {Array<[number, number]>} */ + const jumps = [] + /** @type {Record<string, number>} */ + const gaps = {} + /** @type {Array<Chunk>} */ + let stream + /** @type {Token | undefined} */ + let previous + let index = -1 + /** @type {Token | undefined} */ + let current = token + let adjust = 0 + let start = 0 + const breaks = [start] + + // Loop forward through the linked tokens to pass them in order to the + // subtokenizer. + while (current) { + // Find the position of the event for this token. + while (events[++startPosition][1] !== current) { + // Empty. + } + startPositions.push(startPosition) + if (!current._tokenizer) { + stream = context.sliceStream(current) + if (!current.next) { + stream.push(null) + } + if (previous) { + tokenizer.defineSkip(current.start) + } + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true + } + tokenizer.write(stream) + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = undefined + } + } + + // Unravel the next token. + previous = current + current = current.next + } + + // Now, loop back through all events (and linked tokens), to figure out which + // parts belong where. + current = token + while (++index < childEvents.length) { + if ( + // Find a void token that includes a break. + childEvents[index][0] === 'exit' && + childEvents[index - 1][0] === 'enter' && + childEvents[index][1].type === childEvents[index - 1][1].type && + childEvents[index][1].start.line !== childEvents[index][1].end.line + ) { + start = index + 1 + breaks.push(start) + // Help GC. + current._tokenizer = undefined + current.previous = undefined + current = current.next + } + } + + // Help GC. + tokenizer.events = [] + + // If there’s one more token (which is the cases for lines that end in an + // EOF), that’s perfect: the last point we found starts it. + // If there isn’t then make sure any remaining content is added to it. + if (current) { + // Help GC. + current._tokenizer = undefined + current.previous = undefined + } else { + breaks.pop() + } + + // Now splice the events from the subtokenizer into the current events, + // moving back to front so that splice indices aren’t affected. + index = breaks.length + while (index--) { + const slice = childEvents.slice(breaks[index], breaks[index + 1]) + const start = startPositions.pop() + jumps.unshift([start, start + slice.length - 1]) + micromark_util_chunked_splice(events, start, 2, slice) + } + index = -1 + while (++index < jumps.length) { + gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] + adjust += jumps[index][1] - jumps[index][0] - 1 + } + return gaps +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** + * No name because it must not be turned off. + * @type {Construct} + */ +const content_content = { + tokenize: tokenizeContent, + resolve: resolveContent +} + +/** @type {Construct} */ +const continuationConstruct = { + tokenize: tokenizeContinuation, + partial: true +} + +/** + * Content is transparent: it’s parsed right now. That way, definitions are also + * parsed right now: before text in paragraphs (specifically, media) are parsed. + * + * @type {Resolver} + */ +function resolveContent(events) { + subtokenize(events) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContent(effects, ok) { + /** @type {Token | undefined} */ + let previous + return chunkStart + + /** + * Before a content chunk. + * + * ```markdown + * > | abc + * ^ + * ``` + * + * @type {State} + */ + function chunkStart(code) { + effects.enter('content') + previous = effects.enter('chunkContent', { + contentType: 'content' + }) + return chunkInside(code) + } + + /** + * In a content chunk. + * + * ```markdown + * > | abc + * ^^^ + * ``` + * + * @type {State} + */ + function chunkInside(code) { + if (code === null) { + return contentEnd(code) + } + + // To do: in `markdown-rs`, each line is parsed on its own, and everything + // is stitched together resolving. + if (markdownLineEnding(code)) { + return effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code) + } + + // Data. + effects.consume(code) + return chunkInside + } + + /** + * + * + * @type {State} + */ + function contentEnd(code) { + effects.exit('chunkContent') + effects.exit('content') + return ok(code) + } + + /** + * + * + * @type {State} + */ + function contentContinue(code) { + effects.consume(code) + effects.exit('chunkContent') + previous.next = effects.enter('chunkContent', { + contentType: 'content', + previous + }) + previous = previous.next + return chunkInside + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContinuation(effects, ok, nok) { + const self = this + return startLookahead + + /** + * + * + * @type {State} + */ + function startLookahead(code) { + effects.exit('chunkContent') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, prefixed, 'linePrefix') + } + + /** + * + * + * @type {State} + */ + function prefixed(code) { + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + + // Always populated by defaults. + + const tail = self.events[self.events.length - 1] + if ( + !self.parser.constructs.disable.null.includes('codeIndented') && + tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ) { + return ok(code) + } + return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + + +/** @type {InitialConstruct} */ +const flow = { + tokenize: initializeFlow +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeFlow(effects) { + const self = this + const initial = effects.attempt( + // Try to parse a blank line. + blankLine, + atBlankEnding, + // Try to parse initial flow (essentially, only code). + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content_content, afterConstruct) + ), + 'linePrefix' + ) + ) + ) + return initial + + /** @type {State} */ + function atBlankEnding(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEndingBlank') + effects.consume(code) + effects.exit('lineEndingBlank') + self.currentConstruct = undefined + return initial + } + + /** @type {State} */ + function afterConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + self.currentConstruct = undefined + return initial + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +const resolver = { + resolveAll: createResolver() +} +const string = initializeFactory('string') +const text_text = initializeFactory('text') + +/** + * @param {'string' | 'text'} field + * @returns {InitialConstruct} + */ +function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: createResolver( + field === 'text' ? resolveAllLineSuffixes : undefined + ) + } + + /** + * @this {TokenizeContext} + * @type {Initializer} + */ + function initializeText(effects) { + const self = this + const constructs = this.parser.constructs[field] + const text = effects.attempt(constructs, start, notText) + return start + + /** @type {State} */ + function start(code) { + return atBreak(code) ? text(code) : notText(code) + } + + /** @type {State} */ + function notText(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('data') + effects.consume(code) + return data + } + + /** @type {State} */ + function data(code) { + if (atBreak(code)) { + effects.exit('data') + return text(code) + } + + // Data. + effects.consume(code) + return data + } + + /** + * @param {Code} code + * @returns {boolean} + */ + function atBreak(code) { + if (code === null) { + return true + } + const list = constructs[code] + let index = -1 + if (list) { + // Always populated by defaults. + + while (++index < list.length) { + const item = list[index] + if (!item.previous || item.previous.call(self, self.previous)) { + return true + } + } + } + return false + } + } +} + +/** + * @param {Resolver | undefined} [extraResolver] + * @returns {Resolver} + */ +function createResolver(extraResolver) { + return resolveAllText + + /** @type {Resolver} */ + function resolveAllText(events, context) { + let index = -1 + /** @type {number | undefined} */ + let enter + + // A rather boring computation (to merge adjacent `data` events) which + // improves mm performance by 29%. + while (++index <= events.length) { + if (enter === undefined) { + if (events[index] && events[index][1].type === 'data') { + enter = index + index++ + } + } else if (!events[index] || events[index][1].type !== 'data') { + // Don’t do anything if there is one data token. + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + index = enter + 2 + } + enter = undefined + } + } + return extraResolver ? extraResolver(events, context) : events + } +} + +/** + * A rather ugly set of instructions which again looks at chunks in the input + * stream. + * The reason to do this here is that it is *much* faster to parse in reverse. + * And that we can’t hook into `null` to split the line suffix before an EOF. + * To do: figure out if we can make this into a clean utility, or even in core. + * As it will be useful for GFMs literal autolink extension (and maybe even + * tables?) + * + * @type {Resolver} + */ +function resolveAllLineSuffixes(events, context) { + let eventIndex = 0 // Skip first. + + while (++eventIndex <= events.length) { + if ( + (eventIndex === events.length || + events[eventIndex][1].type === 'lineEnding') && + events[eventIndex - 1][1].type === 'data' + ) { + const data = events[eventIndex - 1][1] + const chunks = context.sliceStream(data) + let index = chunks.length + let bufferIndex = -1 + let size = 0 + /** @type {boolean | undefined} */ + let tabs + while (index--) { + const chunk = chunks[index] + if (typeof chunk === 'string') { + bufferIndex = chunk.length + while (chunk.charCodeAt(bufferIndex - 1) === 32) { + size++ + bufferIndex-- + } + if (bufferIndex) break + bufferIndex = -1 + } + // Number + else if (chunk === -2) { + tabs = true + size++ + } else if (chunk === -1) { + // Empty + } else { + // Replacement character, exit. + index++ + break + } + } + if (size) { + const token = { + type: + eventIndex === events.length || tabs || size < 2 + ? 'lineSuffix' + : 'hardBreakTrailing', + start: { + line: data.end.line, + column: data.end.column - size, + offset: data.end.offset - size, + _index: data.start._index + index, + _bufferIndex: index + ? bufferIndex + : data.start._bufferIndex + bufferIndex + }, + end: Object.assign({}, data.end) + } + data.end = Object.assign({}, token.start) + if (data.start.offset === data.end.offset) { + Object.assign(data, token) + } else { + events.splice( + eventIndex, + 0, + ['enter', token, context], + ['exit', token, context] + ) + eventIndex += 2 + } + } + eventIndex++ + } + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js +/** + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * Call all `resolveAll`s. + * + * @param {Array<{resolveAll?: Resolver | undefined}>} constructs + * List of constructs, optionally with `resolveAll`s. + * @param {Array<Event>} events + * List of events. + * @param {TokenizeContext} context + * Context used by `tokenize`. + * @returns {Array<Event>} + * Changed events. + */ +function resolveAll(constructs, events, context) { + /** @type {Array<Resolver>} */ + const called = [] + let index = -1 + + while (++index < constructs.length) { + const resolve = constructs[index].resolveAll + + if (resolve && !called.includes(resolve)) { + events = resolve(events, context) + called.push(resolve) + } + } + + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenType} TokenType + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * @callback Restore + * @returns {void} + * + * @typedef Info + * @property {Restore} restore + * @property {number} from + * + * @callback ReturnHandle + * Handle a successful run. + * @param {Construct} construct + * @param {Info} info + * @returns {void} + */ + + + + +/** + * Create a tokenizer. + * Tokenizers deal with one type of data (e.g., containers, flow, text). + * The parser is the object dealing with it all. + * `initialize` works like other constructs, except that only its `tokenize` + * function is used, in which case it doesn’t receive an `ok` or `nok`. + * `from` can be given to set the point before the first character, although + * when further lines are indented, they must be set with `defineSkip`. + * + * @param {ParseContext} parser + * @param {InitialConstruct} initialize + * @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from] + * @returns {TokenizeContext} + */ +function createTokenizer(parser, initialize, from) { + /** @type {Point} */ + let point = Object.assign( + from + ? Object.assign({}, from) + : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ) + /** @type {Record<string, number>} */ + const columnStart = {} + /** @type {Array<Construct>} */ + const resolveAllConstructs = [] + /** @type {Array<Chunk>} */ + let chunks = [] + /** @type {Array<Token>} */ + let stack = [] + /** @type {boolean | undefined} */ + let consumed = true + + /** + * Tools used for tokenizing. + * + * @type {Effects} + */ + const effects = { + consume, + enter, + exit, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, { + interrupt: true + }) + } + + /** + * State and tools for resolving and serializing. + * + * @type {TokenizeContext} + */ + const context = { + previous: null, + code: null, + containerState: {}, + events: [], + parser, + sliceStream, + sliceSerialize, + now, + defineSkip, + write + } + + /** + * The state function. + * + * @type {State | void} + */ + let state = initialize.tokenize.call(context, effects) + + /** + * Track which character we expect to be consumed, to catch bugs. + * + * @type {Code} + */ + let expectedCode + if (initialize.resolveAll) { + resolveAllConstructs.push(initialize) + } + return context + + /** @type {TokenizeContext['write']} */ + function write(slice) { + chunks = push(chunks, slice) + main() + + // Exit if we’re not done, resolve might change stuff. + if (chunks[chunks.length - 1] !== null) { + return [] + } + addResult(initialize, 0) + + // Otherwise, resolve, and exit. + context.events = resolveAll(resolveAllConstructs, context.events, context) + return context.events + } + + // + // Tools. + // + + /** @type {TokenizeContext['sliceSerialize']} */ + function sliceSerialize(token, expandTabs) { + return serializeChunks(sliceStream(token), expandTabs) + } + + /** @type {TokenizeContext['sliceStream']} */ + function sliceStream(token) { + return sliceChunks(chunks, token) + } + + /** @type {TokenizeContext['now']} */ + function now() { + // This is a hot path, so we clone manually instead of `Object.assign({}, point)` + const {line, column, offset, _index, _bufferIndex} = point + return { + line, + column, + offset, + _index, + _bufferIndex + } + } + + /** @type {TokenizeContext['defineSkip']} */ + function defineSkip(value) { + columnStart[value.line] = value.column + accountForPotentialSkip() + } + + // + // State management. + // + + /** + * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by + * `consume`). + * Here is where we walk through the chunks, which either include strings of + * several characters, or numerical character codes. + * The reason to do this in a loop instead of a call is so the stack can + * drain. + * + * @returns {void} + */ + function main() { + /** @type {number} */ + let chunkIndex + while (point._index < chunks.length) { + const chunk = chunks[point._index] + + // If we’re in a buffer chunk, loop through it. + if (typeof chunk === 'string') { + chunkIndex = point._index + if (point._bufferIndex < 0) { + point._bufferIndex = 0 + } + while ( + point._index === chunkIndex && + point._bufferIndex < chunk.length + ) { + go(chunk.charCodeAt(point._bufferIndex)) + } + } else { + go(chunk) + } + } + } + + /** + * Deal with one code. + * + * @param {Code} code + * @returns {void} + */ + function go(code) { + consumed = undefined + expectedCode = code + state = state(code) + } + + /** @type {Effects['consume']} */ + function consume(code) { + if (markdownLineEnding(code)) { + point.line++ + point.column = 1 + point.offset += code === -3 ? 2 : 1 + accountForPotentialSkip() + } else if (code !== -1) { + point.column++ + point.offset++ + } + + // Not in a string chunk. + if (point._bufferIndex < 0) { + point._index++ + } else { + point._bufferIndex++ + + // At end of string chunk. + // @ts-expect-error Points w/ non-negative `_bufferIndex` reference + // strings. + if (point._bufferIndex === chunks[point._index].length) { + point._bufferIndex = -1 + point._index++ + } + } + + // Expose the previous character. + context.previous = code + + // Mark as consumed. + consumed = true + } + + /** @type {Effects['enter']} */ + function enter(type, fields) { + /** @type {Token} */ + // @ts-expect-error Patch instead of assign required fields to help GC. + const token = fields || {} + token.type = type + token.start = now() + context.events.push(['enter', token, context]) + stack.push(token) + return token + } + + /** @type {Effects['exit']} */ + function exit(type) { + const token = stack.pop() + token.end = now() + context.events.push(['exit', token, context]) + return token + } + + /** + * Use results. + * + * @type {ReturnHandle} + */ + function onsuccessfulconstruct(construct, info) { + addResult(construct, info.from) + } + + /** + * Discard results. + * + * @type {ReturnHandle} + */ + function onsuccessfulcheck(_, info) { + info.restore() + } + + /** + * Factory to attempt/check/interrupt. + * + * @param {ReturnHandle} onreturn + * @param {{interrupt?: boolean | undefined} | undefined} [fields] + */ + function constructFactory(onreturn, fields) { + return hook + + /** + * Handle either an object mapping codes to constructs, a list of + * constructs, or a single construct. + * + * @param {Array<Construct> | Construct | ConstructRecord} constructs + * @param {State} returnState + * @param {State | undefined} [bogusState] + * @returns {State} + */ + function hook(constructs, returnState, bogusState) { + /** @type {Array<Construct>} */ + let listOfConstructs + /** @type {number} */ + let constructIndex + /** @type {Construct} */ + let currentConstruct + /** @type {Info} */ + let info + return Array.isArray(constructs) /* c8 ignore next 1 */ + ? handleListOfConstructs(constructs) + : 'tokenize' in constructs + ? // @ts-expect-error Looks like a construct. + handleListOfConstructs([constructs]) + : handleMapOfConstructs(constructs) + + /** + * Handle a list of construct. + * + * @param {ConstructRecord} map + * @returns {State} + */ + function handleMapOfConstructs(map) { + return start + + /** @type {State} */ + function start(code) { + const def = code !== null && map[code] + const all = code !== null && map.null + const list = [ + // To do: add more extension tests. + /* c8 ignore next 2 */ + ...(Array.isArray(def) ? def : def ? [def] : []), + ...(Array.isArray(all) ? all : all ? [all] : []) + ] + return handleListOfConstructs(list)(code) + } + } + + /** + * Handle a list of construct. + * + * @param {Array<Construct>} list + * @returns {State} + */ + function handleListOfConstructs(list) { + listOfConstructs = list + constructIndex = 0 + if (list.length === 0) { + return bogusState + } + return handleConstruct(list[constructIndex]) + } + + /** + * Handle a single construct. + * + * @param {Construct} construct + * @returns {State} + */ + function handleConstruct(construct) { + return start + + /** @type {State} */ + function start(code) { + // To do: not needed to store if there is no bogus state, probably? + // Currently doesn’t work because `inspect` in document does a check + // w/o a bogus, which doesn’t make sense. But it does seem to help perf + // by not storing. + info = store() + currentConstruct = construct + if (!construct.partial) { + context.currentConstruct = construct + } + + // Always populated by defaults. + + if ( + construct.name && + context.parser.constructs.disable.null.includes(construct.name) + ) { + return nok(code) + } + return construct.tokenize.call( + // If we do have fields, create an object w/ `context` as its + // prototype. + // This allows a “live binding”, which is needed for `interrupt`. + fields ? Object.assign(Object.create(context), fields) : context, + effects, + ok, + nok + )(code) + } + } + + /** @type {State} */ + function ok(code) { + consumed = true + onreturn(currentConstruct, info) + return returnState + } + + /** @type {State} */ + function nok(code) { + consumed = true + info.restore() + if (++constructIndex < listOfConstructs.length) { + return handleConstruct(listOfConstructs[constructIndex]) + } + return bogusState + } + } + } + + /** + * @param {Construct} construct + * @param {number} from + * @returns {void} + */ + function addResult(construct, from) { + if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { + resolveAllConstructs.push(construct) + } + if (construct.resolve) { + splice( + context.events, + from, + context.events.length - from, + construct.resolve(context.events.slice(from), context) + ) + } + if (construct.resolveTo) { + context.events = construct.resolveTo(context.events, context) + } + } + + /** + * Store state. + * + * @returns {Info} + */ + function store() { + const startPoint = now() + const startPrevious = context.previous + const startCurrentConstruct = context.currentConstruct + const startEventsIndex = context.events.length + const startStack = Array.from(stack) + return { + restore, + from: startEventsIndex + } + + /** + * Restore state. + * + * @returns {void} + */ + function restore() { + point = startPoint + context.previous = startPrevious + context.currentConstruct = startCurrentConstruct + context.events.length = startEventsIndex + stack = startStack + accountForPotentialSkip() + } + } + + /** + * Move the current point a bit forward in the line when it’s on a column + * skip. + * + * @returns {void} + */ + function accountForPotentialSkip() { + if (point.line in columnStart && point.column < 2) { + point.column = columnStart[point.line] + point.offset += columnStart[point.line] - 1 + } + } +} + +/** + * Get the chunks from a slice of chunks in the range of a token. + * + * @param {Array<Chunk>} chunks + * @param {Pick<Token, 'end' | 'start'>} token + * @returns {Array<Chunk>} + */ +function sliceChunks(chunks, token) { + const startIndex = token.start._index + const startBufferIndex = token.start._bufferIndex + const endIndex = token.end._index + const endBufferIndex = token.end._bufferIndex + /** @type {Array<Chunk>} */ + let view + if (startIndex === endIndex) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] + } else { + view = chunks.slice(startIndex, endIndex) + if (startBufferIndex > -1) { + const head = view[0] + if (typeof head === 'string') { + view[0] = head.slice(startBufferIndex) + } else { + view.shift() + } + } + if (endBufferIndex > 0) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view.push(chunks[endIndex].slice(0, endBufferIndex)) + } + } + return view +} + +/** + * Get the string value of a slice of chunks. + * + * @param {Array<Chunk>} chunks + * @param {boolean | undefined} [expandTabs=false] + * @returns {string} + */ +function serializeChunks(chunks, expandTabs) { + let index = -1 + /** @type {Array<string>} */ + const result = [] + /** @type {boolean | undefined} */ + let atTab + while (++index < chunks.length) { + const chunk = chunks[index] + /** @type {string} */ + let value + if (typeof chunk === 'string') { + value = chunk + } else + switch (chunk) { + case -5: { + value = '\r' + break + } + case -4: { + value = '\n' + break + } + case -3: { + value = '\r' + '\n' + break + } + case -2: { + value = expandTabs ? ' ' : '\t' + break + } + case -1: { + if (!expandTabs && atTab) continue + value = ' ' + break + } + default: { + // Currently only replacement character. + value = String.fromCharCode(chunk) + } + } + atTab = chunk === -2 + result.push(value) + } + return result.join('') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const thematicBreak = { + name: 'thematicBreak', + tokenize: tokenizeThematicBreak +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeThematicBreak(effects, ok, nok) { + let size = 0 + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of thematic break. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('thematicBreak') + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * After optional whitespace, at marker. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + marker = code + return atBreak(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.enter('thematicBreakSequence') + return sequence(code) + } + if (size >= 3 && (code === null || markdownLineEnding(code))) { + effects.exit('thematicBreak') + return ok(code) + } + return nok(code) + } + + /** + * In sequence. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function sequence(code) { + if (code === marker) { + effects.consume(code) + size++ + return sequence + } + effects.exit('thematicBreakSequence') + return markdownSpace(code) + ? factorySpace(effects, atBreak, 'whitespace')(code) + : atBreak(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + +/** @type {Construct} */ +const list = { + name: 'list', + tokenize: tokenizeListStart, + continuation: { + tokenize: tokenizeListContinuation + }, + exit: tokenizeListEnd +} + +/** @type {Construct} */ +const listItemPrefixWhitespaceConstruct = { + tokenize: tokenizeListItemPrefixWhitespace, + partial: true +} + +/** @type {Construct} */ +const indentConstruct = { + tokenize: tokenizeIndent, + partial: true +} + +// To do: `markdown-rs` parses list items on their own and later stitches them +// together. + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListStart(effects, ok, nok) { + const self = this + const tail = self.events[self.events.length - 1] + let initialSize = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + let size = 0 + return start + + /** @type {State} */ + function start(code) { + const kind = + self.containerState.type || + (code === 42 || code === 43 || code === 45 + ? 'listUnordered' + : 'listOrdered') + if ( + kind === 'listUnordered' + ? !self.containerState.marker || code === self.containerState.marker + : asciiDigit(code) + ) { + if (!self.containerState.type) { + self.containerState.type = kind + effects.enter(kind, { + _container: true + }) + } + if (kind === 'listUnordered') { + effects.enter('listItemPrefix') + return code === 42 || code === 45 + ? effects.check(thematicBreak, nok, atMarker)(code) + : atMarker(code) + } + if (!self.interrupt || code === 49) { + effects.enter('listItemPrefix') + effects.enter('listItemValue') + return inside(code) + } + } + return nok(code) + } + + /** @type {State} */ + function inside(code) { + if (asciiDigit(code) && ++size < 10) { + effects.consume(code) + return inside + } + if ( + (!self.interrupt || size < 2) && + (self.containerState.marker + ? code === self.containerState.marker + : code === 41 || code === 46) + ) { + effects.exit('listItemValue') + return atMarker(code) + } + return nok(code) + } + + /** + * @type {State} + **/ + function atMarker(code) { + effects.enter('listItemMarker') + effects.consume(code) + effects.exit('listItemMarker') + self.containerState.marker = self.containerState.marker || code + return effects.check( + blankLine, + // Can’t be empty when interrupting. + self.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ) + } + + /** @type {State} */ + function onBlank(code) { + self.containerState.initialBlankLine = true + initialSize++ + return endOfPrefix(code) + } + + /** @type {State} */ + function otherPrefix(code) { + if (markdownSpace(code)) { + effects.enter('listItemPrefixWhitespace') + effects.consume(code) + effects.exit('listItemPrefixWhitespace') + return endOfPrefix + } + return nok(code) + } + + /** @type {State} */ + function endOfPrefix(code) { + self.containerState.size = + initialSize + + self.sliceSerialize(effects.exit('listItemPrefix'), true).length + return ok(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListContinuation(effects, ok, nok) { + const self = this + self.containerState._closeFlow = undefined + return effects.check(blankLine, onBlank, notBlank) + + /** @type {State} */ + function onBlank(code) { + self.containerState.furtherBlankLines = + self.containerState.furtherBlankLines || + self.containerState.initialBlankLine + + // We have a blank line. + // Still, try to consume at most the items size. + return factorySpace( + effects, + ok, + 'listItemIndent', + self.containerState.size + 1 + )(code) + } + + /** @type {State} */ + function notBlank(code) { + if (self.containerState.furtherBlankLines || !markdownSpace(code)) { + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return notInCurrentItem(code) + } + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) + } + + /** @type {State} */ + function notInCurrentItem(code) { + // While we do continue, we signal that the flow should be closed. + self.containerState._closeFlow = true + // As we’re closing flow, we’re no longer interrupting. + self.interrupt = undefined + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(list, ok, nok), + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeIndent(effects, ok, nok) { + const self = this + return factorySpace( + effects, + afterPrefix, + 'listItemIndent', + self.containerState.size + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'listItemIndent' && + tail[2].sliceSerialize(tail[1], true).length === self.containerState.size + ? ok(code) + : nok(code) + } +} + +/** + * @type {Exiter} + * @this {TokenizeContext} + */ +function tokenizeListEnd(effects) { + effects.exit(this.containerState.type) +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListItemPrefixWhitespace(effects, ok, nok) { + const self = this + + // Always populated by defaults. + + return factorySpace( + effects, + afterPrefix, + 'listItemPrefixWhitespace', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return !markdownSpace(code) && + tail && + tail[1].type === 'listItemPrefixWhitespace' + ? ok(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blockQuote = { + name: 'blockQuote', + tokenize: tokenizeBlockQuoteStart, + continuation: { + tokenize: tokenizeBlockQuoteContinuation + }, + exit +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteStart(effects, ok, nok) { + const self = this + return start + + /** + * Start of block quote. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 62) { + const state = self.containerState + if (!state.open) { + effects.enter('blockQuote', { + _container: true + }) + state.open = true + } + effects.enter('blockQuotePrefix') + effects.enter('blockQuoteMarker') + effects.consume(code) + effects.exit('blockQuoteMarker') + return after + } + return nok(code) + } + + /** + * After `>`, before optional whitespace. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownSpace(code)) { + effects.enter('blockQuotePrefixWhitespace') + effects.consume(code) + effects.exit('blockQuotePrefixWhitespace') + effects.exit('blockQuotePrefix') + return ok + } + effects.exit('blockQuotePrefix') + return ok(code) + } +} + +/** + * Start of block quote continuation. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteContinuation(effects, ok, nok) { + const self = this + return contStart + + /** + * Start of block quote continuation. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contStart(code) { + if (markdownSpace(code)) { + // Always populated by defaults. + + return factorySpace( + effects, + contBefore, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } + return contBefore(code) + } + + /** + * At `>`, after optional whitespace. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contBefore(code) { + return effects.attempt(blockQuote, ok, nok)(code) + } +} + +/** @type {Exiter} */ +function exit(effects) { + effects.exit('blockQuote') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse destinations. + * + * ###### Examples + * + * ```markdown + * <a> + * <a\>b> + * <a b> + * <a)> + * a + * a\)b + * a(b)c + * a(b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type for whole (`<a>` or `b`). + * @param {TokenType} literalType + * Type when enclosed (`<a>`). + * @param {TokenType} literalMarkerType + * Type for enclosing (`<` and `>`). + * @param {TokenType} rawType + * Type when not enclosed (`b`). + * @param {TokenType} stringType + * Type for the value (`a` or `b`). + * @param {number | undefined} [max=Infinity] + * Depth of nested parens (inclusive). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryDestination( + effects, + ok, + nok, + type, + literalType, + literalMarkerType, + rawType, + stringType, + max +) { + const limit = max || Number.POSITIVE_INFINITY + let balance = 0 + return start + + /** + * Start of destination. + * + * ```markdown + * > | <aa> + * ^ + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 60) { + effects.enter(type) + effects.enter(literalType) + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + return enclosedBefore + } + + // ASCII control, space, closing paren. + if (code === null || code === 32 || code === 41 || asciiControl(code)) { + return nok(code) + } + effects.enter(type) + effects.enter(rawType) + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return raw(code) + } + + /** + * After `<`, at an enclosed destination. + * + * ```markdown + * > | <aa> + * ^ + * ``` + * + * @type {State} + */ + function enclosedBefore(code) { + if (code === 62) { + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + effects.exit(literalType) + effects.exit(type) + return ok + } + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return enclosed(code) + } + + /** + * In enclosed destination. + * + * ```markdown + * > | <aa> + * ^ + * ``` + * + * @type {State} + */ + function enclosed(code) { + if (code === 62) { + effects.exit('chunkString') + effects.exit(stringType) + return enclosedBefore(code) + } + if (code === null || code === 60 || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? enclosedEscape : enclosed + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | <a\*a> + * ^ + * ``` + * + * @type {State} + */ + function enclosedEscape(code) { + if (code === 60 || code === 62 || code === 92) { + effects.consume(code) + return enclosed + } + return enclosed(code) + } + + /** + * In raw destination. + * + * ```markdown + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function raw(code) { + if ( + !balance && + (code === null || code === 41 || markdownLineEndingOrSpace(code)) + ) { + effects.exit('chunkString') + effects.exit(stringType) + effects.exit(rawType) + effects.exit(type) + return ok(code) + } + if (balance < limit && code === 40) { + effects.consume(code) + balance++ + return raw + } + if (code === 41) { + effects.consume(code) + balance-- + return raw + } + + // ASCII control (but *not* `\0`) and space and `(`. + // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it + // doesn’t. + if (code === null || code === 32 || code === 40 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? rawEscape : raw + } + + /** + * After `\`, at special character. + * + * ```markdown + * > | a\*a + * ^ + * ``` + * + * @type {State} + */ + function rawEscape(code) { + if (code === 40 || code === 41 || code === 92) { + effects.consume(code) + return raw + } + return raw(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse labels. + * + * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. + * + * ###### Examples + * + * ```markdown + * [a] + * [a + * b] + * [a\]b] + * ``` + * + * @this {TokenizeContext} + * Tokenize context. + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole label (`[a]`). + * @param {TokenType} markerType + * Type for the markers (`[` and `]`). + * @param {TokenType} stringType + * Type for the identifier (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryLabel(effects, ok, nok, type, markerType, stringType) { + const self = this + let size = 0 + /** @type {boolean} */ + let seen + return start + + /** + * Start of label. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.enter(stringType) + return atBreak + } + + /** + * In label, at something, before something else. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if ( + size > 999 || + code === null || + code === 91 || + (code === 93 && !seen) || + // To do: remove in the future once we’ve switched from + // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + // which doesn’t need this. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + (code === 94 && + !size && + '_hiddenFootnoteSupport' in self.parser.constructs) + ) { + return nok(code) + } + if (code === 93) { + effects.exit(stringType) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + + // To do: indent? Link chunks and EOLs together? + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return atBreak + } + effects.enter('chunkString', { + contentType: 'string' + }) + return labelInside(code) + } + + /** + * In label, in text. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function labelInside(code) { + if ( + code === null || + code === 91 || + code === 93 || + markdownLineEnding(code) || + size++ > 999 + ) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + if (!seen) seen = !markdownSpace(code) + return code === 92 ? labelEscape : labelInside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | [a\*a] + * ^ + * ``` + * + * @type {State} + */ + function labelEscape(code) { + if (code === 91 || code === 92 || code === 93) { + effects.consume(code) + size++ + return labelInside + } + return labelInside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +/** + * Parse titles. + * + * ###### Examples + * + * ```markdown + * "a" + * 'b' + * (c) + * "a + * b" + * 'a + * b' + * (a\)b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole title (`"a"`, `'b'`, `(c)`). + * @param {TokenType} markerType + * Type for the markers (`"`, `'`, `(`, and `)`). + * @param {TokenType} stringType + * Type for the value (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryTitle(effects, ok, nok, type, markerType, stringType) { + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of title. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 34 || code === 39 || code === 40) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + marker = code === 40 ? 41 : code + return begin + } + return nok(code) + } + + /** + * After opening marker. + * + * This is also used at the closing marker. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function begin(code) { + if (code === marker) { + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + effects.enter(stringType) + return atBreak(code) + } + + /** + * At something, before something else. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.exit(stringType) + return begin(marker) + } + if (code === null) { + return nok(code) + } + + // Note: blank lines can’t exist in content. + if (markdownLineEnding(code)) { + // To do: use `space_or_tab_eol_with_options`, connect. + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, atBreak, 'linePrefix') + } + effects.enter('chunkString', { + contentType: 'string' + }) + return inside(code) + } + + /** + * + * + * @type {State} + */ + function inside(code) { + if (code === marker || code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + return code === 92 ? escape : inside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | "a\*b" + * ^ + * ``` + * + * @type {State} + */ + function escape(code) { + if (code === marker || code === 92) { + effects.consume(code) + return inside + } + return inside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + */ + + + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * line endings or spaces in markdown are often optional, in which case this + * factory can be used and `ok` will be switched to whether spaces were found + * or not + * * one line ending or space can be detected with + * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @returns + * Start state. + */ +function factoryWhitespace(effects, ok) { + /** @type {boolean} */ + let seen + return start + + /** @type {State} */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + seen = true + return start + } + if (markdownSpace(code)) { + return factorySpace( + effects, + start, + seen ? 'linePrefix' : 'lineSuffix' + )(code) + } + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js +/** + * Normalize an identifier (as found in references, definitions). + * + * Collapses markdown whitespace, trim, and then lower- and uppercase. + * + * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their + * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different + * uppercase character (U+0398 (`Θ`)). + * So, to get a canonical form, we perform both lower- and uppercase. + * + * Using uppercase last makes sure keys will never interact with default + * prototypal values (such as `constructor`): nothing in the prototype of + * `Object` is uppercase. + * + * @param {string} value + * Identifier to normalize. + * @returns {string} + * Normalized identifier. + */ +function normalizeIdentifier(value) { + return ( + value + // Collapse markdown whitespace. + .replace(/[\t\n\r ]+/g, ' ') + // Trim. + .replace(/^ | $/g, '') + // Some characters are considered “uppercase”, but if their lowercase + // counterpart is uppercased will result in a different uppercase + // character. + // Hence, to get that form, we perform both lower- and uppercase. + // Upper case makes sure keys will not interact with default prototypal + // methods: no method is uppercase. + .toLowerCase() + .toUpperCase() + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + +/** @type {Construct} */ +const definition = { + name: 'definition', + tokenize: tokenizeDefinition +} + +/** @type {Construct} */ +const titleBefore = { + tokenize: tokenizeTitleBefore, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeDefinition(effects, ok, nok) { + const self = this + /** @type {string} */ + let identifier + return start + + /** + * At start of a definition. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Do not interrupt paragraphs (but do follow definitions). + // To do: do `interrupt` the way `markdown-rs` does. + // To do: parse whitespace the way `markdown-rs` does. + effects.enter('definition') + return before(code) + } + + /** + * After optional whitespace, at `[`. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + // To do: parse whitespace the way `markdown-rs` does. + + return factoryLabel.call( + self, + effects, + labelAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionLabel', + 'definitionLabelMarker', + 'definitionLabelString' + )(code) + } + + /** + * After label. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function labelAfter(code) { + identifier = normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + if (code === 58) { + effects.enter('definitionMarker') + effects.consume(code) + effects.exit('definitionMarker') + return markerAfter + } + return nok(code) + } + + /** + * After marker. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function markerAfter(code) { + // Note: whitespace is optional. + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, destinationBefore)(code) + : destinationBefore(code) + } + + /** + * Before destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationBefore(code) { + return factoryDestination( + effects, + destinationAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionDestination', + 'definitionDestinationLiteral', + 'definitionDestinationLiteralMarker', + 'definitionDestinationRaw', + 'definitionDestinationString' + )(code) + } + + /** + * After destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationAfter(code) { + return effects.attempt(titleBefore, after, after)(code) + } + + /** + * After definition. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return markdownSpace(code) + ? factorySpace(effects, afterWhitespace, 'whitespace')(code) + : afterWhitespace(code) + } + + /** + * After definition, after optional whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function afterWhitespace(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('definition') + + // Note: we don’t care about uniqueness. + // It’s likely that that doesn’t happen very frequently. + // It is more likely that it wastes precious time. + self.parser.defined.push(identifier) + + // To do: `markdown-rs` interrupt. + // // You’d be interrupting. + // tokenizer.interrupt = true + return ok(code) + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeTitleBefore(effects, ok, nok) { + return titleBefore + + /** + * After destination, at whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, beforeMarker)(code) + : nok(code) + } + + /** + * At title. + * + * ```markdown + * | [a]: b + * > | "c" + * ^ + * ``` + * + * @type {State} + */ + function beforeMarker(code) { + return factoryTitle( + effects, + titleAfter, + nok, + 'definitionTitle', + 'definitionTitleMarker', + 'definitionTitleString' + )(code) + } + + /** + * After title. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfter(code) { + return markdownSpace(code) + ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) + : titleAfterOptionalWhitespace(code) + } + + /** + * After title, after optional whitespace. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfterOptionalWhitespace(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const codeIndented = { + name: 'codeIndented', + tokenize: tokenizeCodeIndented +} + +/** @type {Construct} */ +const furtherStart = { + tokenize: tokenizeFurtherStart, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeIndented(effects, ok, nok) { + const self = this + return start + + /** + * Start of code (indented). + * + * > **Parsing note**: it is not needed to check if this first line is a + * > filled line (that it has a non-whitespace character), because blank lines + * > are parsed already, so we never run into that. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: manually check if interrupting like `markdown-rs`. + + effects.enter('codeIndented') + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? atBreak(code) + : nok(code) + } + + /** + * At a break. + * + * ```markdown + * > | aaa + * ^ ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === null) { + return after(code) + } + if (markdownLineEnding(code)) { + return effects.attempt(furtherStart, atBreak, after)(code) + } + effects.enter('codeFlowValue') + return inside(code) + } + + /** + * In code content. + * + * ```markdown + * > | aaa + * ^^^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return atBreak(code) + } + effects.consume(code) + return inside + } + + /** @type {State} */ + function after(code) { + effects.exit('codeIndented') + // To do: allow interrupting like `markdown-rs`. + // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeFurtherStart(effects, ok, nok) { + const self = this + return furtherStart + + /** + * At eol, trying to parse another indent. + * + * ```markdown + * > | aaa + * ^ + * | bbb + * ``` + * + * @type {State} + */ + function furtherStart(code) { + // To do: improve `lazy` / `pierce` handling. + // If this is a lazy line, it can’t be code. + if (self.parser.lazy[self.now().line]) { + return nok(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return furtherStart + } + + // To do: the code here in `micromark-js` is a bit different from + // `markdown-rs` because there it can attempt spaces. + // We can’t yet. + // + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? ok(code) + : markdownLineEnding(code) + ? furtherStart(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const headingAtx = { + name: 'headingAtx', + tokenize: tokenizeHeadingAtx, + resolve: resolveHeadingAtx +} + +/** @type {Resolver} */ +function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2 + let contentStart = 3 + /** @type {Token} */ + let content + /** @type {Token} */ + let text + + // Prefix whitespace, part of the opening. + if (events[contentStart][1].type === 'whitespace') { + contentStart += 2 + } + + // Suffix whitespace, part of the closing. + if ( + contentEnd - 2 > contentStart && + events[contentEnd][1].type === 'whitespace' + ) { + contentEnd -= 2 + } + if ( + events[contentEnd][1].type === 'atxHeadingSequence' && + (contentStart === contentEnd - 1 || + (contentEnd - 4 > contentStart && + events[contentEnd - 2][1].type === 'whitespace')) + ) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 + } + if (contentEnd > contentStart) { + content = { + type: 'atxHeadingText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end + } + text = { + type: 'chunkText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + contentType: 'text' + } + splice(events, contentStart, contentEnd - contentStart + 1, [ + ['enter', content, context], + ['enter', text, context], + ['exit', text, context], + ['exit', content, context] + ]) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHeadingAtx(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of a heading (atx). + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + effects.enter('atxHeading') + return before(code) + } + + /** + * After optional whitespace, at `#`. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('atxHeadingSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 35 && size++ < 6) { + effects.consume(code) + return sequenceOpen + } + + // Always at least one `#`. + if (code === null || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingSequence') + return atBreak(code) + } + return nok(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === 35) { + effects.enter('atxHeadingSequence') + return sequenceFurther(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('atxHeading') + // To do: interrupt like `markdown-rs`. + // // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } + if (markdownSpace(code)) { + return factorySpace(effects, atBreak, 'whitespace')(code) + } + + // To do: generate `data` tokens, add the `text` token later. + // Needs edit map, see: `markdown.rs`. + effects.enter('atxHeadingText') + return data(code) + } + + /** + * In further sequence (after whitespace). + * + * Could be normal “visible” hashes in the heading or a final sequence. + * + * ```markdown + * > | ## aa ## + * ^ + * ``` + * + * @type {State} + */ + function sequenceFurther(code) { + if (code === 35) { + effects.consume(code) + return sequenceFurther + } + effects.exit('atxHeadingSequence') + return atBreak(code) + } + + /** + * In text. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingText') + return atBreak(code) + } + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const setextUnderline = { + name: 'setextUnderline', + tokenize: tokenizeSetextUnderline, + resolveTo: resolveToSetextUnderline +} + +/** @type {Resolver} */ +function resolveToSetextUnderline(events, context) { + // To do: resolve like `markdown-rs`. + let index = events.length + /** @type {number | undefined} */ + let content + /** @type {number | undefined} */ + let text + /** @type {number | undefined} */ + let definition + + // Find the opening of the content. + // It’ll always exist: we don’t tokenize if it isn’t there. + while (index--) { + if (events[index][0] === 'enter') { + if (events[index][1].type === 'content') { + content = index + break + } + if (events[index][1].type === 'paragraph') { + text = index + } + } + // Exit + else { + if (events[index][1].type === 'content') { + // Remove the content end (if needed we’ll add it later) + events.splice(index, 1) + } + if (!definition && events[index][1].type === 'definition') { + definition = index + } + } + } + const heading = { + type: 'setextHeading', + start: Object.assign({}, events[text][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + + // Change the paragraph to setext heading text. + events[text][1].type = 'setextHeadingText' + + // If we have definitions in the content, we’ll keep on having content, + // but we need move it. + if (definition) { + events.splice(text, 0, ['enter', heading, context]) + events.splice(definition + 1, 0, ['exit', events[content][1], context]) + events[content][1].end = Object.assign({}, events[definition][1].end) + } else { + events[content][1] = heading + } + + // Add the heading exit at the end. + events.push(['exit', heading, context]) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeSetextUnderline(effects, ok, nok) { + const self = this + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * At start of heading (setext) underline. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + let index = self.events.length + /** @type {boolean | undefined} */ + let paragraph + // Find an opening. + while (index--) { + // Skip enter/exit of line ending, line prefix, and content. + // We can now either have a definition or a paragraph. + if ( + self.events[index][1].type !== 'lineEnding' && + self.events[index][1].type !== 'linePrefix' && + self.events[index][1].type !== 'content' + ) { + paragraph = self.events[index][1].type === 'paragraph' + break + } + } + + // To do: handle lazy/pierce like `markdown-rs`. + // To do: parse indent like `markdown-rs`. + if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { + effects.enter('setextHeadingLine') + marker = code + return before(code) + } + return nok(code) + } + + /** + * After optional whitespace, at `-` or `=`. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('setextHeadingLineSequence') + return inside(code) + } + + /** + * In sequence. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + effects.exit('setextHeadingLineSequence') + return markdownSpace(code) + ? factorySpace(effects, after, 'lineSuffix')(code) + : after(code) + } + + /** + * After sequence, after optional whitespace. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('setextHeadingLine') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js +/** + * List of lowercase HTML “block” tag names. + * + * The list, when parsing HTML (flow), results in more relaxed rules (condition + * 6). + * Because they are known blocks, the HTML-like syntax doesn’t have to be + * strictly parsed. + * For tag names not in this list, a more strict algorithm (condition 7) is used + * to detect whether the HTML-like syntax is seen as HTML (flow) or not. + * + * This is copied from: + * <https://spec.commonmark.org/0.30/#html-blocks>. + * + * > 👉 **Note**: `search` was added in `CommonMark@0.31`. + */ +const htmlBlockNames = [ + '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' +] + +/** + * List of lowercase HTML “raw” tag names. + * + * The list, when parsing HTML (flow), results in HTML that can include lines + * without exiting, until a closing tag also in this list is found (condition + * 1). + * + * This module is copied from: + * <https://spec.commonmark.org/0.30/#html-blocks>. + * + * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. + */ +const htmlRawNames = ['pre', 'script', 'style', 'textarea'] + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + +/** @type {Construct} */ +const htmlFlow = { + name: 'htmlFlow', + tokenize: tokenizeHtmlFlow, + resolveTo: resolveToHtmlFlow, + concrete: true +} + +/** @type {Construct} */ +const blankLineBefore = { + tokenize: tokenizeBlankLineBefore, + partial: true +} +const nonLazyContinuationStart = { + tokenize: tokenizeNonLazyContinuationStart, + partial: true +} + +/** @type {Resolver} */ +function resolveToHtmlFlow(events) { + let index = events.length + while (index--) { + if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { + break + } + } + if (index > 1 && events[index - 2][1].type === 'linePrefix') { + // Add the prefix start to the HTML token. + events[index][1].start = events[index - 2][1].start + // Add the prefix start to the HTML line token. + events[index + 1][1].start = events[index - 2][1].start + // Remove the line prefix. + events.splice(index - 2, 2) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlFlow(effects, ok, nok) { + const self = this + /** @type {number} */ + let marker + /** @type {boolean} */ + let closingTag + /** @type {string} */ + let buffer + /** @type {number} */ + let index + /** @type {Code} */ + let markerB + return start + + /** + * Start of HTML (flow). + * + * ```markdown + * > | <x /> + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * At `<`, after optional whitespace. + * + * ```markdown + * > | <x /> + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('htmlFlow') + effects.enter('htmlFlowData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | <x /> + * ^ + * > | <!doctype> + * ^ + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + closingTag = true + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + marker = 3 + // To do: + // tokenizer.concrete = true + // To do: use `markdown-rs` style interrupt. + // While we’re in an instruction instead of a declaration, we’re on a `?` + // right now, so we do need to search for `>`, similar to declarations. + return self.interrupt ? ok : continuationDeclarationInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After `<!`, at declaration, comment, or CDATA. + * + * ```markdown + * > | <!doctype> + * ^ + * > | <!--xxx--> + * ^ + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + marker = 2 + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + marker = 5 + index = 0 + return cdataOpenInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + marker = 4 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After `<!-`, inside a comment, at another `-`. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After `<![`, inside CDATA, expecting `CDATA[`. + * + * ```markdown + * > | <![CDATA[>&<]]> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + if (index === value.length) { + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return cdataOpenInside + } + return nok(code) + } + + /** + * After `</`, in closing tag, at tag name. + * + * ```markdown + * > | </x> + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * In tag name. + * + * ```markdown + * > | <ab> + * ^^ + * > | </ab> + * ^^ + * ``` + * + * @type {State} + */ + function tagName(code) { + if ( + code === null || + code === 47 || + code === 62 || + markdownLineEndingOrSpace(code) + ) { + const slash = code === 47 + const name = buffer.toLowerCase() + if (!slash && !closingTag && htmlRawNames.includes(name)) { + marker = 1 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + if (htmlBlockNames.includes(buffer.toLowerCase())) { + marker = 6 + if (slash) { + effects.consume(code) + return basicSelfClosing + } + + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + marker = 7 + // Do not support complete HTML when interrupting. + return self.interrupt && !self.parser.lazy[self.now().line] + ? nok(code) + : closingTag + ? completeClosingTagAfter(code) + : completeAttributeNameBefore(code) + } + + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + buffer += String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After closing slash of a basic tag name. + * + * ```markdown + * > | <div/> + * ^ + * ``` + * + * @type {State} + */ + function basicSelfClosing(code) { + if (code === 62) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return nok(code) + } + + /** + * After closing slash of a complete tag name. + * + * ```markdown + * > | <x/> + * ^ + * ``` + * + * @type {State} + */ + function completeClosingTagAfter(code) { + if (markdownSpace(code)) { + effects.consume(code) + return completeClosingTagAfter + } + return completeEnd(code) + } + + /** + * At an attribute name. + * + * At first, this state is used after a complete tag name, after whitespace, + * where it expects optional attributes or the end of the tag. + * It is also reused after attributes, when expecting more optional + * attributes. + * + * ```markdown + * > | <a /> + * ^ + * > | <a :b> + * ^ + * > | <a _b> + * ^ + * > | <a b> + * ^ + * > | <a > + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameBefore(code) { + if (code === 47) { + effects.consume(code) + return completeEnd + } + + // ASCII alphanumerical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return completeAttributeName + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameBefore + } + return completeEnd(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | <a :b> + * ^ + * > | <a _b> + * ^ + * > | <a b> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeName(code) { + // ASCII alphanumerical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return completeAttributeName + } + return completeAttributeNameAfter(code) + } + + /** + * After attribute name, at an optional initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | <a b> + * ^ + * > | <a b=c> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return completeAttributeValueBefore + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameAfter + } + return completeAttributeNameBefore(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | <a b=c> + * ^ + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + markerB = code + return completeAttributeValueQuoted + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeValueBefore + } + return completeAttributeValueUnquoted(code) + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | <a b="c"> + * ^ + * > | <a b='c'> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuoted(code) { + if (code === markerB) { + effects.consume(code) + markerB = null + return completeAttributeValueQuotedAfter + } + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return completeAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | <a b=c> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 47 || + code === 60 || + code === 61 || + code === 62 || + code === 96 || + markdownLineEndingOrSpace(code) + ) { + return completeAttributeNameAfter(code) + } + effects.consume(code) + return completeAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the + * end of the tag. + * + * ```markdown + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownSpace(code)) { + return completeAttributeNameBefore(code) + } + return nok(code) + } + + /** + * In certain circumstances of a complete tag where only an `>` is allowed. + * + * ```markdown + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeEnd(code) { + if (code === 62) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * After `>` in a complete tag. + * + * ```markdown + * > | <x> + * ^ + * ``` + * + * @type {State} + */ + function completeAfter(code) { + if (code === null || markdownLineEnding(code)) { + // // Do not form containers. + // tokenizer.concrete = true + return continuation(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * In continuation of any HTML kind. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function continuation(code) { + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationCommentInside + } + if (code === 60 && marker === 1) { + effects.consume(code) + return continuationRawTagOpen + } + if (code === 62 && marker === 4) { + effects.consume(code) + return continuationClose + } + if (code === 63 && marker === 3) { + effects.consume(code) + return continuationDeclarationInside + } + if (code === 93 && marker === 5) { + effects.consume(code) + return continuationCdataInside + } + if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { + effects.exit('htmlFlowData') + return effects.check( + blankLineBefore, + continuationAfter, + continuationStart + )(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationStart(code) + } + effects.consume(code) + return continuation + } + + /** + * In continuation, at eol. + * + * ```markdown + * > | <x> + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStart(code) { + return effects.check( + nonLazyContinuationStart, + continuationStartNonLazy, + continuationAfter + )(code) + } + + /** + * In continuation, at eol, before non-lazy content. + * + * ```markdown + * > | <x> + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStartNonLazy(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return continuationBefore + } + + /** + * In continuation, before non-lazy content. + * + * ```markdown + * | <x> + * > | asd + * ^ + * ``` + * + * @type {State} + */ + function continuationBefore(code) { + if (code === null || markdownLineEnding(code)) { + return continuationStart(code) + } + effects.enter('htmlFlowData') + return continuation(code) + } + + /** + * In comment continuation, after one `-`, expecting another. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function continuationCommentInside(code) { + if (code === 45) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In raw continuation, after `<`, at `/`. + * + * ```markdown + * > | <script>console.log(1)</script> + * ^ + * ``` + * + * @type {State} + */ + function continuationRawTagOpen(code) { + if (code === 47) { + effects.consume(code) + buffer = '' + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In raw continuation, after `</`, in a raw tag name. + * + * ```markdown + * > | <script>console.log(1)</script> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function continuationRawEndTag(code) { + if (code === 62) { + const name = buffer.toLowerCase() + if (htmlRawNames.includes(name)) { + effects.consume(code) + return continuationClose + } + return continuation(code) + } + if (asciiAlpha(code) && buffer.length < 8) { + effects.consume(code) + // @ts-expect-error: not null. + buffer += String.fromCharCode(code) + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In cdata continuation, after `]`, expecting `]>`. + * + * ```markdown + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationCdataInside(code) { + if (code === 93) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In declaration or instruction continuation, at `>`. + * + * ```markdown + * > | <!--> + * ^ + * > | <?> + * ^ + * > | <!q> + * ^ + * > | <!--ab--> + * ^ + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationDeclarationInside(code) { + if (code === 62) { + effects.consume(code) + return continuationClose + } + + // More dashes. + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In closed continuation: everything we get until the eol/eof is part of it. + * + * ```markdown + * > | <!doctype> + * ^ + * ``` + * + * @type {State} + */ + function continuationClose(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationAfter(code) + } + effects.consume(code) + return continuationClose + } + + /** + * Done. + * + * ```markdown + * > | <!doctype> + * ^ + * ``` + * + * @type {State} + */ + function continuationAfter(code) { + effects.exit('htmlFlow') + // // Feel free to interrupt. + // tokenizer.interrupt = false + // // No longer concrete. + // tokenizer.concrete = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuationStart(effects, ok, nok) { + const self = this + return start + + /** + * At eol, before continuation. + * + * ```markdown + * > | * ```js + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return after + } + return nok(code) + } + + /** + * A continuation. + * + * ```markdown + * | * ```js + * > | b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLineBefore(effects, ok, nok) { + return start + + /** + * Before eol, expecting blank line. + * + * ```markdown + * > | <div> + * ^ + * | + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return effects.attempt(blankLine, ok, nok) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const nonLazyContinuation = { + tokenize: tokenizeNonLazyContinuation, + partial: true +} + +/** @type {Construct} */ +const codeFenced = { + name: 'codeFenced', + tokenize: tokenizeCodeFenced, + concrete: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeFenced(effects, ok, nok) { + const self = this + /** @type {Construct} */ + const closeStart = { + tokenize: tokenizeCloseStart, + partial: true + } + let initialPrefix = 0 + let sizeOpen = 0 + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of code. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse whitespace like `markdown-rs`. + return beforeSequenceOpen(code) + } + + /** + * In opening fence, after prefix, at sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeSequenceOpen(code) { + const tail = self.events[self.events.length - 1] + initialPrefix = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + marker = code + effects.enter('codeFenced') + effects.enter('codeFencedFence') + effects.enter('codeFencedFenceSequence') + return sequenceOpen(code) + } + + /** + * In opening fence sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === marker) { + sizeOpen++ + effects.consume(code) + return sequenceOpen + } + if (sizeOpen < 3) { + return nok(code) + } + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, infoBefore, 'whitespace')(code) + : infoBefore(code) + } + + /** + * In opening fence, after the sequence (and optional whitespace), before info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function infoBefore(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return self.interrupt + ? ok(code) + : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFencedFenceInfo') + effects.enter('chunkString', { + contentType: 'string' + }) + return info(code) + } + + /** + * In info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function info(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return infoBefore(code) + } + if (markdownSpace(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return factorySpace(effects, metaBefore, 'whitespace')(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return info + } + + /** + * In opening fence, after info and whitespace, before meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function metaBefore(code) { + if (code === null || markdownLineEnding(code)) { + return infoBefore(code) + } + effects.enter('codeFencedFenceMeta') + effects.enter('chunkString', { + contentType: 'string' + }) + return meta(code) + } + + /** + * In meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function meta(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceMeta') + return infoBefore(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return meta + } + + /** + * At eol/eof in code, before a non-lazy closing fence or content. + * + * ```markdown + * > | ~~~js + * ^ + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function atNonLazyBreak(code) { + return effects.attempt(closeStart, after, contentBefore)(code) + } + + /** + * Before code content, not a closing fence, at eol. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return contentStart + } + + /** + * Before code content, not a closing fence. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentStart(code) { + return initialPrefix > 0 && markdownSpace(code) + ? factorySpace( + effects, + beforeContentChunk, + 'linePrefix', + initialPrefix + 1 + )(code) + : beforeContentChunk(code) + } + + /** + * Before code content, after optional prefix. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeContentChunk(code) { + if (code === null || markdownLineEnding(code)) { + return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFlowValue') + return contentChunk(code) + } + + /** + * In code content. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^^^^^^^^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentChunk(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return beforeContentChunk(code) + } + effects.consume(code) + return contentChunk + } + + /** + * After code. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + effects.exit('codeFenced') + return ok(code) + } + + /** + * @this {TokenizeContext} + * @type {Tokenizer} + */ + function tokenizeCloseStart(effects, ok, nok) { + let size = 0 + return startBefore + + /** + * + * + * @type {State} + */ + function startBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return start + } + + /** + * Before closing fence, at optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Always populated by defaults. + + // To do: `enter` here or in next state? + effects.enter('codeFencedFence') + return markdownSpace(code) + ? factorySpace( + effects, + beforeSequenceClose, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : beforeSequenceClose(code) + } + + /** + * In closing fence, after optional whitespace, at sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function beforeSequenceClose(code) { + if (code === marker) { + effects.enter('codeFencedFenceSequence') + return sequenceClose(code) + } + return nok(code) + } + + /** + * In closing fence sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + if (code === marker) { + size++ + effects.consume(code) + return sequenceClose + } + if (size >= sizeOpen) { + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) + : sequenceCloseAfter(code) + } + return nok(code) + } + + /** + * After closing fence sequence, after optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceCloseAfter(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return ok(code) + } + return nok(code) + } + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuation(effects, ok, nok) { + const self = this + return start + + /** + * + * + * @type {State} + */ + function start(code) { + if (code === null) { + return nok(code) + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineStart + } + + /** + * + * + * @type {State} + */ + function lineStart(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/character-entities/index.js +/** + * Map of named character references. + * + * @type {Record<string, string>} + */ +const characterEntities = { + AElig: 'Æ', + AMP: '&', + Aacute: 'Á', + Abreve: 'Ă', + Acirc: 'Â', + Acy: 'А', + Afr: '𝔄', + Agrave: 'À', + Alpha: 'Α', + Amacr: 'Ā', + And: '⩓', + Aogon: 'Ą', + Aopf: '𝔸', + ApplyFunction: '⁡', + Aring: 'Å', + Ascr: '𝒜', + Assign: '≔', + Atilde: 'Ã', + Auml: 'Ä', + Backslash: '∖', + Barv: '⫧', + Barwed: '⌆', + Bcy: 'Б', + Because: '∵', + Bernoullis: 'ℬ', + Beta: 'Β', + Bfr: '𝔅', + Bopf: '𝔹', + Breve: '˘', + Bscr: 'ℬ', + Bumpeq: '≎', + CHcy: 'Ч', + COPY: '©', + Cacute: 'Ć', + Cap: '⋒', + CapitalDifferentialD: 'ⅅ', + Cayleys: 'ℭ', + Ccaron: 'Č', + Ccedil: 'Ç', + Ccirc: 'Ĉ', + Cconint: '∰', + Cdot: 'Ċ', + Cedilla: '¸', + CenterDot: '·', + Cfr: 'ℭ', + Chi: 'Χ', + CircleDot: '⊙', + CircleMinus: '⊖', + CirclePlus: '⊕', + CircleTimes: '⊗', + ClockwiseContourIntegral: '∲', + CloseCurlyDoubleQuote: '”', + CloseCurlyQuote: '’', + Colon: '∷', + Colone: '⩴', + Congruent: '≡', + Conint: '∯', + ContourIntegral: '∮', + Copf: 'ℂ', + Coproduct: '∐', + CounterClockwiseContourIntegral: '∳', + Cross: '⨯', + Cscr: '𝒞', + Cup: '⋓', + CupCap: '≍', + DD: 'ⅅ', + DDotrahd: '⤑', + DJcy: 'Ђ', + DScy: 'Ѕ', + DZcy: 'Џ', + Dagger: '‡', + Darr: '↡', + Dashv: '⫤', + Dcaron: 'Ď', + Dcy: 'Д', + Del: '∇', + Delta: 'Δ', + Dfr: '𝔇', + DiacriticalAcute: '´', + DiacriticalDot: '˙', + DiacriticalDoubleAcute: '˝', + DiacriticalGrave: '`', + DiacriticalTilde: '˜', + Diamond: '⋄', + DifferentialD: 'ⅆ', + Dopf: '𝔻', + Dot: '¨', + DotDot: '⃜', + DotEqual: '≐', + DoubleContourIntegral: '∯', + DoubleDot: '¨', + DoubleDownArrow: '⇓', + DoubleLeftArrow: '⇐', + DoubleLeftRightArrow: '⇔', + DoubleLeftTee: '⫤', + DoubleLongLeftArrow: '⟸', + DoubleLongLeftRightArrow: '⟺', + DoubleLongRightArrow: '⟹', + DoubleRightArrow: '⇒', + DoubleRightTee: '⊨', + DoubleUpArrow: '⇑', + DoubleUpDownArrow: '⇕', + DoubleVerticalBar: '∥', + DownArrow: '↓', + DownArrowBar: '⤓', + DownArrowUpArrow: '⇵', + DownBreve: '̑', + DownLeftRightVector: '⥐', + DownLeftTeeVector: '⥞', + DownLeftVector: '↽', + DownLeftVectorBar: '⥖', + DownRightTeeVector: '⥟', + DownRightVector: '⇁', + DownRightVectorBar: '⥗', + DownTee: '⊤', + DownTeeArrow: '↧', + Downarrow: '⇓', + Dscr: '𝒟', + Dstrok: 'Đ', + ENG: 'Ŋ', + ETH: 'Ð', + Eacute: 'É', + Ecaron: 'Ě', + Ecirc: 'Ê', + Ecy: 'Э', + Edot: 'Ė', + Efr: '𝔈', + Egrave: 'È', + Element: '∈', + Emacr: 'Ē', + EmptySmallSquare: '◻', + EmptyVerySmallSquare: '▫', + Eogon: 'Ę', + Eopf: '𝔼', + Epsilon: 'Ε', + Equal: '⩵', + EqualTilde: '≂', + Equilibrium: '⇌', + Escr: 'ℰ', + Esim: '⩳', + Eta: 'Η', + Euml: 'Ë', + Exists: '∃', + ExponentialE: 'ⅇ', + Fcy: 'Ф', + Ffr: '𝔉', + FilledSmallSquare: '◼', + FilledVerySmallSquare: '▪', + Fopf: '𝔽', + ForAll: '∀', + Fouriertrf: 'ℱ', + Fscr: 'ℱ', + GJcy: 'Ѓ', + GT: '>', + Gamma: 'Γ', + Gammad: 'Ϝ', + Gbreve: 'Ğ', + Gcedil: 'Ģ', + Gcirc: 'Ĝ', + Gcy: 'Г', + Gdot: 'Ġ', + Gfr: '𝔊', + Gg: '⋙', + Gopf: '𝔾', + GreaterEqual: '≥', + GreaterEqualLess: '⋛', + GreaterFullEqual: '≧', + GreaterGreater: '⪢', + GreaterLess: '≷', + GreaterSlantEqual: '⩾', + GreaterTilde: '≳', + Gscr: '𝒢', + Gt: '≫', + HARDcy: 'Ъ', + Hacek: 'ˇ', + Hat: '^', + Hcirc: 'Ĥ', + Hfr: 'ℌ', + HilbertSpace: 'ℋ', + Hopf: 'ℍ', + HorizontalLine: '─', + Hscr: 'ℋ', + Hstrok: 'Ħ', + HumpDownHump: '≎', + HumpEqual: '≏', + IEcy: 'Е', + IJlig: 'IJ', + IOcy: 'Ё', + Iacute: 'Í', + Icirc: 'Î', + Icy: 'И', + Idot: 'İ', + Ifr: 'ℑ', + Igrave: 'Ì', + Im: 'ℑ', + Imacr: 'Ī', + ImaginaryI: 'ⅈ', + Implies: '⇒', + Int: '∬', + Integral: '∫', + Intersection: '⋂', + InvisibleComma: '⁣', + InvisibleTimes: '⁢', + Iogon: 'Į', + Iopf: '𝕀', + Iota: 'Ι', + Iscr: 'ℐ', + Itilde: 'Ĩ', + Iukcy: 'І', + Iuml: 'Ï', + Jcirc: 'Ĵ', + Jcy: 'Й', + Jfr: '𝔍', + Jopf: '𝕁', + Jscr: '𝒥', + Jsercy: 'Ј', + Jukcy: 'Є', + KHcy: 'Х', + KJcy: 'Ќ', + Kappa: 'Κ', + Kcedil: 'Ķ', + Kcy: 'К', + Kfr: '𝔎', + Kopf: '𝕂', + Kscr: '𝒦', + LJcy: 'Љ', + LT: '<', + Lacute: 'Ĺ', + Lambda: 'Λ', + Lang: '⟪', + Laplacetrf: 'ℒ', + Larr: '↞', + Lcaron: 'Ľ', + Lcedil: 'Ļ', + Lcy: 'Л', + LeftAngleBracket: '⟨', + LeftArrow: '←', + LeftArrowBar: '⇤', + LeftArrowRightArrow: '⇆', + LeftCeiling: '⌈', + LeftDoubleBracket: '⟦', + LeftDownTeeVector: '⥡', + LeftDownVector: '⇃', + LeftDownVectorBar: '⥙', + LeftFloor: '⌊', + LeftRightArrow: '↔', + LeftRightVector: '⥎', + LeftTee: '⊣', + LeftTeeArrow: '↤', + LeftTeeVector: '⥚', + LeftTriangle: '⊲', + LeftTriangleBar: '⧏', + LeftTriangleEqual: '⊴', + LeftUpDownVector: '⥑', + LeftUpTeeVector: '⥠', + LeftUpVector: '↿', + LeftUpVectorBar: '⥘', + LeftVector: '↼', + LeftVectorBar: '⥒', + Leftarrow: '⇐', + Leftrightarrow: '⇔', + LessEqualGreater: '⋚', + LessFullEqual: '≦', + LessGreater: '≶', + LessLess: '⪡', + LessSlantEqual: '⩽', + LessTilde: '≲', + Lfr: '𝔏', + Ll: '⋘', + Lleftarrow: '⇚', + Lmidot: 'Ŀ', + LongLeftArrow: '⟵', + LongLeftRightArrow: '⟷', + LongRightArrow: '⟶', + Longleftarrow: '⟸', + Longleftrightarrow: '⟺', + Longrightarrow: '⟹', + Lopf: '𝕃', + LowerLeftArrow: '↙', + LowerRightArrow: '↘', + Lscr: 'ℒ', + Lsh: '↰', + Lstrok: 'Ł', + Lt: '≪', + Map: '⤅', + Mcy: 'М', + MediumSpace: ' ', + Mellintrf: 'ℳ', + Mfr: '𝔐', + MinusPlus: '∓', + Mopf: '𝕄', + Mscr: 'ℳ', + Mu: 'Μ', + NJcy: 'Њ', + Nacute: 'Ń', + Ncaron: 'Ň', + Ncedil: 'Ņ', + Ncy: 'Н', + NegativeMediumSpace: '​', + NegativeThickSpace: '​', + NegativeThinSpace: '​', + NegativeVeryThinSpace: '​', + NestedGreaterGreater: '≫', + NestedLessLess: '≪', + NewLine: '\n', + Nfr: '𝔑', + NoBreak: '⁠', + NonBreakingSpace: ' ', + Nopf: 'ℕ', + Not: '⫬', + NotCongruent: '≢', + NotCupCap: '≭', + NotDoubleVerticalBar: '∦', + NotElement: '∉', + NotEqual: '≠', + NotEqualTilde: '≂̸', + NotExists: '∄', + NotGreater: '≯', + NotGreaterEqual: '≱', + NotGreaterFullEqual: '≧̸', + NotGreaterGreater: '≫̸', + NotGreaterLess: '≹', + NotGreaterSlantEqual: '⩾̸', + NotGreaterTilde: '≵', + NotHumpDownHump: '≎̸', + NotHumpEqual: '≏̸', + NotLeftTriangle: '⋪', + NotLeftTriangleBar: '⧏̸', + NotLeftTriangleEqual: '⋬', + NotLess: '≮', + NotLessEqual: '≰', + NotLessGreater: '≸', + NotLessLess: '≪̸', + NotLessSlantEqual: '⩽̸', + NotLessTilde: '≴', + NotNestedGreaterGreater: '⪢̸', + NotNestedLessLess: '⪡̸', + NotPrecedes: '⊀', + NotPrecedesEqual: '⪯̸', + NotPrecedesSlantEqual: '⋠', + NotReverseElement: '∌', + NotRightTriangle: '⋫', + NotRightTriangleBar: '⧐̸', + NotRightTriangleEqual: '⋭', + NotSquareSubset: '⊏̸', + NotSquareSubsetEqual: '⋢', + NotSquareSuperset: '⊐̸', + NotSquareSupersetEqual: '⋣', + NotSubset: '⊂⃒', + NotSubsetEqual: '⊈', + NotSucceeds: '⊁', + NotSucceedsEqual: '⪰̸', + NotSucceedsSlantEqual: '⋡', + NotSucceedsTilde: '≿̸', + NotSuperset: '⊃⃒', + NotSupersetEqual: '⊉', + NotTilde: '≁', + NotTildeEqual: '≄', + NotTildeFullEqual: '≇', + NotTildeTilde: '≉', + NotVerticalBar: '∤', + Nscr: '𝒩', + Ntilde: 'Ñ', + Nu: 'Ν', + OElig: 'Œ', + Oacute: 'Ó', + Ocirc: 'Ô', + Ocy: 'О', + Odblac: 'Ő', + Ofr: '𝔒', + Ograve: 'Ò', + Omacr: 'Ō', + Omega: 'Ω', + Omicron: 'Ο', + Oopf: '𝕆', + OpenCurlyDoubleQuote: '“', + OpenCurlyQuote: '‘', + Or: '⩔', + Oscr: '𝒪', + Oslash: 'Ø', + Otilde: 'Õ', + Otimes: '⨷', + Ouml: 'Ö', + OverBar: '‾', + OverBrace: '⏞', + OverBracket: '⎴', + OverParenthesis: '⏜', + PartialD: '∂', + Pcy: 'П', + Pfr: '𝔓', + Phi: 'Φ', + Pi: 'Π', + PlusMinus: '±', + Poincareplane: 'ℌ', + Popf: 'ℙ', + Pr: '⪻', + Precedes: '≺', + PrecedesEqual: '⪯', + PrecedesSlantEqual: '≼', + PrecedesTilde: '≾', + Prime: '″', + Product: '∏', + Proportion: '∷', + Proportional: '∝', + Pscr: '𝒫', + Psi: 'Ψ', + QUOT: '"', + Qfr: '𝔔', + Qopf: 'ℚ', + Qscr: '𝒬', + RBarr: '⤐', + REG: '®', + Racute: 'Ŕ', + Rang: '⟫', + Rarr: '↠', + Rarrtl: '⤖', + Rcaron: 'Ř', + Rcedil: 'Ŗ', + Rcy: 'Р', + Re: 'ℜ', + ReverseElement: '∋', + ReverseEquilibrium: '⇋', + ReverseUpEquilibrium: '⥯', + Rfr: 'ℜ', + Rho: 'Ρ', + RightAngleBracket: '⟩', + RightArrow: '→', + RightArrowBar: '⇥', + RightArrowLeftArrow: '⇄', + RightCeiling: '⌉', + RightDoubleBracket: '⟧', + RightDownTeeVector: '⥝', + RightDownVector: '⇂', + RightDownVectorBar: '⥕', + RightFloor: '⌋', + RightTee: '⊢', + RightTeeArrow: '↦', + RightTeeVector: '⥛', + RightTriangle: '⊳', + RightTriangleBar: '⧐', + RightTriangleEqual: '⊵', + RightUpDownVector: '⥏', + RightUpTeeVector: '⥜', + RightUpVector: '↾', + RightUpVectorBar: '⥔', + RightVector: '⇀', + RightVectorBar: '⥓', + Rightarrow: '⇒', + Ropf: 'ℝ', + RoundImplies: '⥰', + Rrightarrow: '⇛', + Rscr: 'ℛ', + Rsh: '↱', + RuleDelayed: '⧴', + SHCHcy: 'Щ', + SHcy: 'Ш', + SOFTcy: 'Ь', + Sacute: 'Ś', + Sc: '⪼', + Scaron: 'Š', + Scedil: 'Ş', + Scirc: 'Ŝ', + Scy: 'С', + Sfr: '𝔖', + ShortDownArrow: '↓', + ShortLeftArrow: '←', + ShortRightArrow: '→', + ShortUpArrow: '↑', + Sigma: 'Σ', + SmallCircle: '∘', + Sopf: '𝕊', + Sqrt: '√', + Square: '□', + SquareIntersection: '⊓', + SquareSubset: '⊏', + SquareSubsetEqual: '⊑', + SquareSuperset: '⊐', + SquareSupersetEqual: '⊒', + SquareUnion: '⊔', + Sscr: '𝒮', + Star: '⋆', + Sub: '⋐', + Subset: '⋐', + SubsetEqual: '⊆', + Succeeds: '≻', + SucceedsEqual: '⪰', + SucceedsSlantEqual: '≽', + SucceedsTilde: '≿', + SuchThat: '∋', + Sum: '∑', + Sup: '⋑', + Superset: '⊃', + SupersetEqual: '⊇', + Supset: '⋑', + THORN: 'Þ', + TRADE: '™', + TSHcy: 'Ћ', + TScy: 'Ц', + Tab: '\t', + Tau: 'Τ', + Tcaron: 'Ť', + Tcedil: 'Ţ', + Tcy: 'Т', + Tfr: '𝔗', + Therefore: '∴', + Theta: 'Θ', + ThickSpace: '  ', + ThinSpace: ' ', + Tilde: '∼', + TildeEqual: '≃', + TildeFullEqual: '≅', + TildeTilde: '≈', + Topf: '𝕋', + TripleDot: '⃛', + Tscr: '𝒯', + Tstrok: 'Ŧ', + Uacute: 'Ú', + Uarr: '↟', + Uarrocir: '⥉', + Ubrcy: 'Ў', + Ubreve: 'Ŭ', + Ucirc: 'Û', + Ucy: 'У', + Udblac: 'Ű', + Ufr: '𝔘', + Ugrave: 'Ù', + Umacr: 'Ū', + UnderBar: '_', + UnderBrace: '⏟', + UnderBracket: '⎵', + UnderParenthesis: '⏝', + Union: '⋃', + UnionPlus: '⊎', + Uogon: 'Ų', + Uopf: '𝕌', + UpArrow: '↑', + UpArrowBar: '⤒', + UpArrowDownArrow: '⇅', + UpDownArrow: '↕', + UpEquilibrium: '⥮', + UpTee: '⊥', + UpTeeArrow: '↥', + Uparrow: '⇑', + Updownarrow: '⇕', + UpperLeftArrow: '↖', + UpperRightArrow: '↗', + Upsi: 'ϒ', + Upsilon: 'Υ', + Uring: 'Ů', + Uscr: '𝒰', + Utilde: 'Ũ', + Uuml: 'Ü', + VDash: '⊫', + Vbar: '⫫', + Vcy: 'В', + Vdash: '⊩', + Vdashl: '⫦', + Vee: '⋁', + Verbar: '‖', + Vert: '‖', + VerticalBar: '∣', + VerticalLine: '|', + VerticalSeparator: '❘', + VerticalTilde: '≀', + VeryThinSpace: ' ', + Vfr: '𝔙', + Vopf: '𝕍', + Vscr: '𝒱', + Vvdash: '⊪', + Wcirc: 'Ŵ', + Wedge: '⋀', + Wfr: '𝔚', + Wopf: '𝕎', + Wscr: '𝒲', + Xfr: '𝔛', + Xi: 'Ξ', + Xopf: '𝕏', + Xscr: '𝒳', + YAcy: 'Я', + YIcy: 'Ї', + YUcy: 'Ю', + Yacute: 'Ý', + Ycirc: 'Ŷ', + Ycy: 'Ы', + Yfr: '𝔜', + Yopf: '𝕐', + Yscr: '𝒴', + Yuml: 'Ÿ', + ZHcy: 'Ж', + Zacute: 'Ź', + Zcaron: 'Ž', + Zcy: 'З', + Zdot: 'Ż', + ZeroWidthSpace: '​', + Zeta: 'Ζ', + Zfr: 'ℨ', + Zopf: 'ℤ', + Zscr: '𝒵', + aacute: 'á', + abreve: 'ă', + ac: '∾', + acE: '∾̳', + acd: '∿', + acirc: 'â', + acute: '´', + acy: 'а', + aelig: 'æ', + af: '⁡', + afr: '𝔞', + agrave: 'à', + alefsym: 'ℵ', + aleph: 'ℵ', + alpha: 'α', + amacr: 'ā', + amalg: '⨿', + amp: '&', + and: '∧', + andand: '⩕', + andd: '⩜', + andslope: '⩘', + andv: '⩚', + ang: '∠', + ange: '⦤', + angle: '∠', + angmsd: '∡', + angmsdaa: '⦨', + angmsdab: '⦩', + angmsdac: '⦪', + angmsdad: '⦫', + angmsdae: '⦬', + angmsdaf: '⦭', + angmsdag: '⦮', + angmsdah: '⦯', + angrt: '∟', + angrtvb: '⊾', + angrtvbd: '⦝', + angsph: '∢', + angst: 'Å', + angzarr: '⍼', + aogon: 'ą', + aopf: '𝕒', + ap: '≈', + apE: '⩰', + apacir: '⩯', + ape: '≊', + apid: '≋', + apos: "'", + approx: '≈', + approxeq: '≊', + aring: 'å', + ascr: '𝒶', + ast: '*', + asymp: '≈', + asympeq: '≍', + atilde: 'ã', + auml: 'ä', + awconint: '∳', + awint: '⨑', + bNot: '⫭', + backcong: '≌', + backepsilon: '϶', + backprime: '‵', + backsim: '∽', + backsimeq: '⋍', + barvee: '⊽', + barwed: '⌅', + barwedge: '⌅', + bbrk: '⎵', + bbrktbrk: '⎶', + bcong: '≌', + bcy: 'б', + bdquo: '„', + becaus: '∵', + because: '∵', + bemptyv: '⦰', + bepsi: '϶', + bernou: 'ℬ', + beta: 'β', + beth: 'ℶ', + between: '≬', + bfr: '𝔟', + bigcap: '⋂', + bigcirc: '◯', + bigcup: '⋃', + bigodot: '⨀', + bigoplus: '⨁', + bigotimes: '⨂', + bigsqcup: '⨆', + bigstar: '★', + bigtriangledown: '▽', + bigtriangleup: '△', + biguplus: '⨄', + bigvee: '⋁', + bigwedge: '⋀', + bkarow: '⤍', + blacklozenge: '⧫', + blacksquare: '▪', + blacktriangle: '▴', + blacktriangledown: '▾', + blacktriangleleft: '◂', + blacktriangleright: '▸', + blank: '␣', + blk12: '▒', + blk14: '░', + blk34: '▓', + block: '█', + bne: '=⃥', + bnequiv: '≡⃥', + bnot: '⌐', + bopf: '𝕓', + bot: '⊥', + bottom: '⊥', + bowtie: '⋈', + boxDL: '╗', + boxDR: '╔', + boxDl: '╖', + boxDr: '╓', + boxH: '═', + boxHD: '╦', + boxHU: '╩', + boxHd: '╤', + boxHu: '╧', + boxUL: '╝', + boxUR: '╚', + boxUl: '╜', + boxUr: '╙', + boxV: '║', + boxVH: '╬', + boxVL: '╣', + boxVR: '╠', + boxVh: '╫', + boxVl: '╢', + boxVr: '╟', + boxbox: '⧉', + boxdL: '╕', + boxdR: '╒', + boxdl: '┐', + boxdr: '┌', + boxh: '─', + boxhD: '╥', + boxhU: '╨', + boxhd: '┬', + boxhu: '┴', + boxminus: '⊟', + boxplus: '⊞', + boxtimes: '⊠', + boxuL: '╛', + boxuR: '╘', + boxul: '┘', + boxur: '└', + boxv: '│', + boxvH: '╪', + boxvL: '╡', + boxvR: '╞', + boxvh: '┼', + boxvl: '┤', + boxvr: '├', + bprime: '‵', + breve: '˘', + brvbar: '¦', + bscr: '𝒷', + bsemi: '⁏', + bsim: '∽', + bsime: '⋍', + bsol: '\\', + bsolb: '⧅', + bsolhsub: '⟈', + bull: '•', + bullet: '•', + bump: '≎', + bumpE: '⪮', + bumpe: '≏', + bumpeq: '≏', + cacute: 'ć', + cap: '∩', + capand: '⩄', + capbrcup: '⩉', + capcap: '⩋', + capcup: '⩇', + capdot: '⩀', + caps: '∩︀', + caret: '⁁', + caron: 'ˇ', + ccaps: '⩍', + ccaron: 'č', + ccedil: 'ç', + ccirc: 'ĉ', + ccups: '⩌', + ccupssm: '⩐', + cdot: 'ċ', + cedil: '¸', + cemptyv: '⦲', + cent: '¢', + centerdot: '·', + cfr: '𝔠', + chcy: 'ч', + check: '✓', + checkmark: '✓', + chi: 'χ', + cir: '○', + cirE: '⧃', + circ: 'ˆ', + circeq: '≗', + circlearrowleft: '↺', + circlearrowright: '↻', + circledR: '®', + circledS: 'Ⓢ', + circledast: '⊛', + circledcirc: '⊚', + circleddash: '⊝', + cire: '≗', + cirfnint: '⨐', + cirmid: '⫯', + cirscir: '⧂', + clubs: '♣', + clubsuit: '♣', + colon: ':', + colone: '≔', + coloneq: '≔', + comma: ',', + commat: '@', + comp: '∁', + compfn: '∘', + complement: '∁', + complexes: 'ℂ', + cong: '≅', + congdot: '⩭', + conint: '∮', + copf: '𝕔', + coprod: '∐', + copy: '©', + copysr: '℗', + crarr: '↵', + cross: '✗', + cscr: '𝒸', + csub: '⫏', + csube: '⫑', + csup: '⫐', + csupe: '⫒', + ctdot: '⋯', + cudarrl: '⤸', + cudarrr: '⤵', + cuepr: '⋞', + cuesc: '⋟', + cularr: '↶', + cularrp: '⤽', + cup: '∪', + cupbrcap: '⩈', + cupcap: '⩆', + cupcup: '⩊', + cupdot: '⊍', + cupor: '⩅', + cups: '∪︀', + curarr: '↷', + curarrm: '⤼', + curlyeqprec: '⋞', + curlyeqsucc: '⋟', + curlyvee: '⋎', + curlywedge: '⋏', + curren: '¤', + curvearrowleft: '↶', + curvearrowright: '↷', + cuvee: '⋎', + cuwed: '⋏', + cwconint: '∲', + cwint: '∱', + cylcty: '⌭', + dArr: '⇓', + dHar: '⥥', + dagger: '†', + daleth: 'ℸ', + darr: '↓', + dash: '‐', + dashv: '⊣', + dbkarow: '⤏', + dblac: '˝', + dcaron: 'ď', + dcy: 'д', + dd: 'ⅆ', + ddagger: '‡', + ddarr: '⇊', + ddotseq: '⩷', + deg: '°', + delta: 'δ', + demptyv: '⦱', + dfisht: '⥿', + dfr: '𝔡', + dharl: '⇃', + dharr: '⇂', + diam: '⋄', + diamond: '⋄', + diamondsuit: '♦', + diams: '♦', + die: '¨', + digamma: 'ϝ', + disin: '⋲', + div: '÷', + divide: '÷', + divideontimes: '⋇', + divonx: '⋇', + djcy: 'ђ', + dlcorn: '⌞', + dlcrop: '⌍', + dollar: '$', + dopf: '𝕕', + dot: '˙', + doteq: '≐', + doteqdot: '≑', + dotminus: '∸', + dotplus: '∔', + dotsquare: '⊡', + doublebarwedge: '⌆', + downarrow: '↓', + downdownarrows: '⇊', + downharpoonleft: '⇃', + downharpoonright: '⇂', + drbkarow: '⤐', + drcorn: '⌟', + drcrop: '⌌', + dscr: '𝒹', + dscy: 'ѕ', + dsol: '⧶', + dstrok: 'đ', + dtdot: '⋱', + dtri: '▿', + dtrif: '▾', + duarr: '⇵', + duhar: '⥯', + dwangle: '⦦', + dzcy: 'џ', + dzigrarr: '⟿', + eDDot: '⩷', + eDot: '≑', + eacute: 'é', + easter: '⩮', + ecaron: 'ě', + ecir: '≖', + ecirc: 'ê', + ecolon: '≕', + ecy: 'э', + edot: 'ė', + ee: 'ⅇ', + efDot: '≒', + efr: '𝔢', + eg: '⪚', + egrave: 'è', + egs: '⪖', + egsdot: '⪘', + el: '⪙', + elinters: '⏧', + ell: 'ℓ', + els: '⪕', + elsdot: '⪗', + emacr: 'ē', + empty: '∅', + emptyset: '∅', + emptyv: '∅', + emsp13: ' ', + emsp14: ' ', + emsp: ' ', + eng: 'ŋ', + ensp: ' ', + eogon: 'ę', + eopf: '𝕖', + epar: '⋕', + eparsl: '⧣', + eplus: '⩱', + epsi: 'ε', + epsilon: 'ε', + epsiv: 'ϵ', + eqcirc: '≖', + eqcolon: '≕', + eqsim: '≂', + eqslantgtr: '⪖', + eqslantless: '⪕', + equals: '=', + equest: '≟', + equiv: '≡', + equivDD: '⩸', + eqvparsl: '⧥', + erDot: '≓', + erarr: '⥱', + escr: 'ℯ', + esdot: '≐', + esim: '≂', + eta: 'η', + eth: 'ð', + euml: 'ë', + euro: '€', + excl: '!', + exist: '∃', + expectation: 'ℰ', + exponentiale: 'ⅇ', + fallingdotseq: '≒', + fcy: 'ф', + female: '♀', + ffilig: 'ffi', + fflig: 'ff', + ffllig: 'ffl', + ffr: '𝔣', + filig: 'fi', + fjlig: 'fj', + flat: '♭', + fllig: 'fl', + fltns: '▱', + fnof: 'ƒ', + fopf: '𝕗', + forall: '∀', + fork: '⋔', + forkv: '⫙', + fpartint: '⨍', + frac12: '½', + frac13: '⅓', + frac14: '¼', + frac15: '⅕', + frac16: '⅙', + frac18: '⅛', + frac23: '⅔', + frac25: '⅖', + frac34: '¾', + frac35: '⅗', + frac38: '⅜', + frac45: '⅘', + frac56: '⅚', + frac58: '⅝', + frac78: '⅞', + frasl: '⁄', + frown: '⌢', + fscr: '𝒻', + gE: '≧', + gEl: '⪌', + gacute: 'ǵ', + gamma: 'γ', + gammad: 'ϝ', + gap: '⪆', + gbreve: 'ğ', + gcirc: 'ĝ', + gcy: 'г', + gdot: 'ġ', + ge: '≥', + gel: '⋛', + geq: '≥', + geqq: '≧', + geqslant: '⩾', + ges: '⩾', + gescc: '⪩', + gesdot: '⪀', + gesdoto: '⪂', + gesdotol: '⪄', + gesl: '⋛︀', + gesles: '⪔', + gfr: '𝔤', + gg: '≫', + ggg: '⋙', + gimel: 'ℷ', + gjcy: 'ѓ', + gl: '≷', + glE: '⪒', + gla: '⪥', + glj: '⪤', + gnE: '≩', + gnap: '⪊', + gnapprox: '⪊', + gne: '⪈', + gneq: '⪈', + gneqq: '≩', + gnsim: '⋧', + gopf: '𝕘', + grave: '`', + gscr: 'ℊ', + gsim: '≳', + gsime: '⪎', + gsiml: '⪐', + gt: '>', + gtcc: '⪧', + gtcir: '⩺', + gtdot: '⋗', + gtlPar: '⦕', + gtquest: '⩼', + gtrapprox: '⪆', + gtrarr: '⥸', + gtrdot: '⋗', + gtreqless: '⋛', + gtreqqless: '⪌', + gtrless: '≷', + gtrsim: '≳', + gvertneqq: '≩︀', + gvnE: '≩︀', + hArr: '⇔', + hairsp: ' ', + half: '½', + hamilt: 'ℋ', + hardcy: 'ъ', + harr: '↔', + harrcir: '⥈', + harrw: '↭', + hbar: 'ℏ', + hcirc: 'ĥ', + hearts: '♥', + heartsuit: '♥', + hellip: '…', + hercon: '⊹', + hfr: '𝔥', + hksearow: '⤥', + hkswarow: '⤦', + hoarr: '⇿', + homtht: '∻', + hookleftarrow: '↩', + hookrightarrow: '↪', + hopf: '𝕙', + horbar: '―', + hscr: '𝒽', + hslash: 'ℏ', + hstrok: 'ħ', + hybull: '⁃', + hyphen: '‐', + iacute: 'í', + ic: '⁣', + icirc: 'î', + icy: 'и', + iecy: 'е', + iexcl: '¡', + iff: '⇔', + ifr: '𝔦', + igrave: 'ì', + ii: 'ⅈ', + iiiint: '⨌', + iiint: '∭', + iinfin: '⧜', + iiota: '℩', + ijlig: 'ij', + imacr: 'ī', + image: 'ℑ', + imagline: 'ℐ', + imagpart: 'ℑ', + imath: 'ı', + imof: '⊷', + imped: 'Ƶ', + in: '∈', + incare: '℅', + infin: '∞', + infintie: '⧝', + inodot: 'ı', + int: '∫', + intcal: '⊺', + integers: 'ℤ', + intercal: '⊺', + intlarhk: '⨗', + intprod: '⨼', + iocy: 'ё', + iogon: 'į', + iopf: '𝕚', + iota: 'ι', + iprod: '⨼', + iquest: '¿', + iscr: '𝒾', + isin: '∈', + isinE: '⋹', + isindot: '⋵', + isins: '⋴', + isinsv: '⋳', + isinv: '∈', + it: '⁢', + itilde: 'ĩ', + iukcy: 'і', + iuml: 'ï', + jcirc: 'ĵ', + jcy: 'й', + jfr: '𝔧', + jmath: 'ȷ', + jopf: '𝕛', + jscr: '𝒿', + jsercy: 'ј', + jukcy: 'є', + kappa: 'κ', + kappav: 'ϰ', + kcedil: 'ķ', + kcy: 'к', + kfr: '𝔨', + kgreen: 'ĸ', + khcy: 'х', + kjcy: 'ќ', + kopf: '𝕜', + kscr: '𝓀', + lAarr: '⇚', + lArr: '⇐', + lAtail: '⤛', + lBarr: '⤎', + lE: '≦', + lEg: '⪋', + lHar: '⥢', + lacute: 'ĺ', + laemptyv: '⦴', + lagran: 'ℒ', + lambda: 'λ', + lang: '⟨', + langd: '⦑', + langle: '⟨', + lap: '⪅', + laquo: '«', + larr: '←', + larrb: '⇤', + larrbfs: '⤟', + larrfs: '⤝', + larrhk: '↩', + larrlp: '↫', + larrpl: '⤹', + larrsim: '⥳', + larrtl: '↢', + lat: '⪫', + latail: '⤙', + late: '⪭', + lates: '⪭︀', + lbarr: '⤌', + lbbrk: '❲', + lbrace: '{', + lbrack: '[', + lbrke: '⦋', + lbrksld: '⦏', + lbrkslu: '⦍', + lcaron: 'ľ', + lcedil: 'ļ', + lceil: '⌈', + lcub: '{', + lcy: 'л', + ldca: '⤶', + ldquo: '“', + ldquor: '„', + ldrdhar: '⥧', + ldrushar: '⥋', + ldsh: '↲', + le: '≤', + leftarrow: '←', + leftarrowtail: '↢', + leftharpoondown: '↽', + leftharpoonup: '↼', + leftleftarrows: '⇇', + leftrightarrow: '↔', + leftrightarrows: '⇆', + leftrightharpoons: '⇋', + leftrightsquigarrow: '↭', + leftthreetimes: '⋋', + leg: '⋚', + leq: '≤', + leqq: '≦', + leqslant: '⩽', + les: '⩽', + lescc: '⪨', + lesdot: '⩿', + lesdoto: '⪁', + lesdotor: '⪃', + lesg: '⋚︀', + lesges: '⪓', + lessapprox: '⪅', + lessdot: '⋖', + lesseqgtr: '⋚', + lesseqqgtr: '⪋', + lessgtr: '≶', + lesssim: '≲', + lfisht: '⥼', + lfloor: '⌊', + lfr: '𝔩', + lg: '≶', + lgE: '⪑', + lhard: '↽', + lharu: '↼', + lharul: '⥪', + lhblk: '▄', + ljcy: 'љ', + ll: '≪', + llarr: '⇇', + llcorner: '⌞', + llhard: '⥫', + lltri: '◺', + lmidot: 'ŀ', + lmoust: '⎰', + lmoustache: '⎰', + lnE: '≨', + lnap: '⪉', + lnapprox: '⪉', + lne: '⪇', + lneq: '⪇', + lneqq: '≨', + lnsim: '⋦', + loang: '⟬', + loarr: '⇽', + lobrk: '⟦', + longleftarrow: '⟵', + longleftrightarrow: '⟷', + longmapsto: '⟼', + longrightarrow: '⟶', + looparrowleft: '↫', + looparrowright: '↬', + lopar: '⦅', + lopf: '𝕝', + loplus: '⨭', + lotimes: '⨴', + lowast: '∗', + lowbar: '_', + loz: '◊', + lozenge: '◊', + lozf: '⧫', + lpar: '(', + lparlt: '⦓', + lrarr: '⇆', + lrcorner: '⌟', + lrhar: '⇋', + lrhard: '⥭', + lrm: '‎', + lrtri: '⊿', + lsaquo: '‹', + lscr: '𝓁', + lsh: '↰', + lsim: '≲', + lsime: '⪍', + lsimg: '⪏', + lsqb: '[', + lsquo: '‘', + lsquor: '‚', + lstrok: 'ł', + lt: '<', + ltcc: '⪦', + ltcir: '⩹', + ltdot: '⋖', + lthree: '⋋', + ltimes: '⋉', + ltlarr: '⥶', + ltquest: '⩻', + ltrPar: '⦖', + ltri: '◃', + ltrie: '⊴', + ltrif: '◂', + lurdshar: '⥊', + luruhar: '⥦', + lvertneqq: '≨︀', + lvnE: '≨︀', + mDDot: '∺', + macr: '¯', + male: '♂', + malt: '✠', + maltese: '✠', + map: '↦', + mapsto: '↦', + mapstodown: '↧', + mapstoleft: '↤', + mapstoup: '↥', + marker: '▮', + mcomma: '⨩', + mcy: 'м', + mdash: '—', + measuredangle: '∡', + mfr: '𝔪', + mho: '℧', + micro: 'µ', + mid: '∣', + midast: '*', + midcir: '⫰', + middot: '·', + minus: '−', + minusb: '⊟', + minusd: '∸', + minusdu: '⨪', + mlcp: '⫛', + mldr: '…', + mnplus: '∓', + models: '⊧', + mopf: '𝕞', + mp: '∓', + mscr: '𝓂', + mstpos: '∾', + mu: 'μ', + multimap: '⊸', + mumap: '⊸', + nGg: '⋙̸', + nGt: '≫⃒', + nGtv: '≫̸', + nLeftarrow: '⇍', + nLeftrightarrow: '⇎', + nLl: '⋘̸', + nLt: '≪⃒', + nLtv: '≪̸', + nRightarrow: '⇏', + nVDash: '⊯', + nVdash: '⊮', + nabla: '∇', + nacute: 'ń', + nang: '∠⃒', + nap: '≉', + napE: '⩰̸', + napid: '≋̸', + napos: 'ʼn', + napprox: '≉', + natur: '♮', + natural: '♮', + naturals: 'ℕ', + nbsp: ' ', + nbump: '≎̸', + nbumpe: '≏̸', + ncap: '⩃', + ncaron: 'ň', + ncedil: 'ņ', + ncong: '≇', + ncongdot: '⩭̸', + ncup: '⩂', + ncy: 'н', + ndash: '–', + ne: '≠', + neArr: '⇗', + nearhk: '⤤', + nearr: '↗', + nearrow: '↗', + nedot: '≐̸', + nequiv: '≢', + nesear: '⤨', + nesim: '≂̸', + nexist: '∄', + nexists: '∄', + nfr: '𝔫', + ngE: '≧̸', + nge: '≱', + ngeq: '≱', + ngeqq: '≧̸', + ngeqslant: '⩾̸', + nges: '⩾̸', + ngsim: '≵', + ngt: '≯', + ngtr: '≯', + nhArr: '⇎', + nharr: '↮', + nhpar: '⫲', + ni: '∋', + nis: '⋼', + nisd: '⋺', + niv: '∋', + njcy: 'њ', + nlArr: '⇍', + nlE: '≦̸', + nlarr: '↚', + nldr: '‥', + nle: '≰', + nleftarrow: '↚', + nleftrightarrow: '↮', + nleq: '≰', + nleqq: '≦̸', + nleqslant: '⩽̸', + nles: '⩽̸', + nless: '≮', + nlsim: '≴', + nlt: '≮', + nltri: '⋪', + nltrie: '⋬', + nmid: '∤', + nopf: '𝕟', + not: '¬', + notin: '∉', + notinE: '⋹̸', + notindot: '⋵̸', + notinva: '∉', + notinvb: '⋷', + notinvc: '⋶', + notni: '∌', + notniva: '∌', + notnivb: '⋾', + notnivc: '⋽', + npar: '∦', + nparallel: '∦', + nparsl: '⫽⃥', + npart: '∂̸', + npolint: '⨔', + npr: '⊀', + nprcue: '⋠', + npre: '⪯̸', + nprec: '⊀', + npreceq: '⪯̸', + nrArr: '⇏', + nrarr: '↛', + nrarrc: '⤳̸', + nrarrw: '↝̸', + nrightarrow: '↛', + nrtri: '⋫', + nrtrie: '⋭', + nsc: '⊁', + nsccue: '⋡', + nsce: '⪰̸', + nscr: '𝓃', + nshortmid: '∤', + nshortparallel: '∦', + nsim: '≁', + nsime: '≄', + nsimeq: '≄', + nsmid: '∤', + nspar: '∦', + nsqsube: '⋢', + nsqsupe: '⋣', + nsub: '⊄', + nsubE: '⫅̸', + nsube: '⊈', + nsubset: '⊂⃒', + nsubseteq: '⊈', + nsubseteqq: '⫅̸', + nsucc: '⊁', + nsucceq: '⪰̸', + nsup: '⊅', + nsupE: '⫆̸', + nsupe: '⊉', + nsupset: '⊃⃒', + nsupseteq: '⊉', + nsupseteqq: '⫆̸', + ntgl: '≹', + ntilde: 'ñ', + ntlg: '≸', + ntriangleleft: '⋪', + ntrianglelefteq: '⋬', + ntriangleright: '⋫', + ntrianglerighteq: '⋭', + nu: 'ν', + num: '#', + numero: '№', + numsp: ' ', + nvDash: '⊭', + nvHarr: '⤄', + nvap: '≍⃒', + nvdash: '⊬', + nvge: '≥⃒', + nvgt: '>⃒', + nvinfin: '⧞', + nvlArr: '⤂', + nvle: '≤⃒', + nvlt: '<⃒', + nvltrie: '⊴⃒', + nvrArr: '⤃', + nvrtrie: '⊵⃒', + nvsim: '∼⃒', + nwArr: '⇖', + nwarhk: '⤣', + nwarr: '↖', + nwarrow: '↖', + nwnear: '⤧', + oS: 'Ⓢ', + oacute: 'ó', + oast: '⊛', + ocir: '⊚', + ocirc: 'ô', + ocy: 'о', + odash: '⊝', + odblac: 'ő', + odiv: '⨸', + odot: '⊙', + odsold: '⦼', + oelig: 'œ', + ofcir: '⦿', + ofr: '𝔬', + ogon: '˛', + ograve: 'ò', + ogt: '⧁', + ohbar: '⦵', + ohm: 'Ω', + oint: '∮', + olarr: '↺', + olcir: '⦾', + olcross: '⦻', + oline: '‾', + olt: '⧀', + omacr: 'ō', + omega: 'ω', + omicron: 'ο', + omid: '⦶', + ominus: '⊖', + oopf: '𝕠', + opar: '⦷', + operp: '⦹', + oplus: '⊕', + or: '∨', + orarr: '↻', + ord: '⩝', + order: 'ℴ', + orderof: 'ℴ', + ordf: 'ª', + ordm: 'º', + origof: '⊶', + oror: '⩖', + orslope: '⩗', + orv: '⩛', + oscr: 'ℴ', + oslash: 'ø', + osol: '⊘', + otilde: 'õ', + otimes: '⊗', + otimesas: '⨶', + ouml: 'ö', + ovbar: '⌽', + par: '∥', + para: '¶', + parallel: '∥', + parsim: '⫳', + parsl: '⫽', + part: '∂', + pcy: 'п', + percnt: '%', + period: '.', + permil: '‰', + perp: '⊥', + pertenk: '‱', + pfr: '𝔭', + phi: 'φ', + phiv: 'ϕ', + phmmat: 'ℳ', + phone: '☎', + pi: 'π', + pitchfork: '⋔', + piv: 'ϖ', + planck: 'ℏ', + planckh: 'ℎ', + plankv: 'ℏ', + plus: '+', + plusacir: '⨣', + plusb: '⊞', + pluscir: '⨢', + plusdo: '∔', + plusdu: '⨥', + pluse: '⩲', + plusmn: '±', + plussim: '⨦', + plustwo: '⨧', + pm: '±', + pointint: '⨕', + popf: '𝕡', + pound: '£', + pr: '≺', + prE: '⪳', + prap: '⪷', + prcue: '≼', + pre: '⪯', + prec: '≺', + precapprox: '⪷', + preccurlyeq: '≼', + preceq: '⪯', + precnapprox: '⪹', + precneqq: '⪵', + precnsim: '⋨', + precsim: '≾', + prime: '′', + primes: 'ℙ', + prnE: '⪵', + prnap: '⪹', + prnsim: '⋨', + prod: '∏', + profalar: '⌮', + profline: '⌒', + profsurf: '⌓', + prop: '∝', + propto: '∝', + prsim: '≾', + prurel: '⊰', + pscr: '𝓅', + psi: 'ψ', + puncsp: ' ', + qfr: '𝔮', + qint: '⨌', + qopf: '𝕢', + qprime: '⁗', + qscr: '𝓆', + quaternions: 'ℍ', + quatint: '⨖', + quest: '?', + questeq: '≟', + quot: '"', + rAarr: '⇛', + rArr: '⇒', + rAtail: '⤜', + rBarr: '⤏', + rHar: '⥤', + race: '∽̱', + racute: 'ŕ', + radic: '√', + raemptyv: '⦳', + rang: '⟩', + rangd: '⦒', + range: '⦥', + rangle: '⟩', + raquo: '»', + rarr: '→', + rarrap: '⥵', + rarrb: '⇥', + rarrbfs: '⤠', + rarrc: '⤳', + rarrfs: '⤞', + rarrhk: '↪', + rarrlp: '↬', + rarrpl: '⥅', + rarrsim: '⥴', + rarrtl: '↣', + rarrw: '↝', + ratail: '⤚', + ratio: '∶', + rationals: 'ℚ', + rbarr: '⤍', + rbbrk: '❳', + rbrace: '}', + rbrack: ']', + rbrke: '⦌', + rbrksld: '⦎', + rbrkslu: '⦐', + rcaron: 'ř', + rcedil: 'ŗ', + rceil: '⌉', + rcub: '}', + rcy: 'р', + rdca: '⤷', + rdldhar: '⥩', + rdquo: '”', + rdquor: '”', + rdsh: '↳', + real: 'ℜ', + realine: 'ℛ', + realpart: 'ℜ', + reals: 'ℝ', + rect: '▭', + reg: '®', + rfisht: '⥽', + rfloor: '⌋', + rfr: '𝔯', + rhard: '⇁', + rharu: '⇀', + rharul: '⥬', + rho: 'ρ', + rhov: 'ϱ', + rightarrow: '→', + rightarrowtail: '↣', + rightharpoondown: '⇁', + rightharpoonup: '⇀', + rightleftarrows: '⇄', + rightleftharpoons: '⇌', + rightrightarrows: '⇉', + rightsquigarrow: '↝', + rightthreetimes: '⋌', + ring: '˚', + risingdotseq: '≓', + rlarr: '⇄', + rlhar: '⇌', + rlm: '‏', + rmoust: '⎱', + rmoustache: '⎱', + rnmid: '⫮', + roang: '⟭', + roarr: '⇾', + robrk: '⟧', + ropar: '⦆', + ropf: '𝕣', + roplus: '⨮', + rotimes: '⨵', + rpar: ')', + rpargt: '⦔', + rppolint: '⨒', + rrarr: '⇉', + rsaquo: '›', + rscr: '𝓇', + rsh: '↱', + rsqb: ']', + rsquo: '’', + rsquor: '’', + rthree: '⋌', + rtimes: '⋊', + rtri: '▹', + rtrie: '⊵', + rtrif: '▸', + rtriltri: '⧎', + ruluhar: '⥨', + rx: '℞', + sacute: 'ś', + sbquo: '‚', + sc: '≻', + scE: '⪴', + scap: '⪸', + scaron: 'š', + sccue: '≽', + sce: '⪰', + scedil: 'ş', + scirc: 'ŝ', + scnE: '⪶', + scnap: '⪺', + scnsim: '⋩', + scpolint: '⨓', + scsim: '≿', + scy: 'с', + sdot: '⋅', + sdotb: '⊡', + sdote: '⩦', + seArr: '⇘', + searhk: '⤥', + searr: '↘', + searrow: '↘', + sect: '§', + semi: ';', + seswar: '⤩', + setminus: '∖', + setmn: '∖', + sext: '✶', + sfr: '𝔰', + sfrown: '⌢', + sharp: '♯', + shchcy: 'щ', + shcy: 'ш', + shortmid: '∣', + shortparallel: '∥', + shy: '­', + sigma: 'σ', + sigmaf: 'ς', + sigmav: 'ς', + sim: '∼', + simdot: '⩪', + sime: '≃', + simeq: '≃', + simg: '⪞', + simgE: '⪠', + siml: '⪝', + simlE: '⪟', + simne: '≆', + simplus: '⨤', + simrarr: '⥲', + slarr: '←', + smallsetminus: '∖', + smashp: '⨳', + smeparsl: '⧤', + smid: '∣', + smile: '⌣', + smt: '⪪', + smte: '⪬', + smtes: '⪬︀', + softcy: 'ь', + sol: '/', + solb: '⧄', + solbar: '⌿', + sopf: '𝕤', + spades: '♠', + spadesuit: '♠', + spar: '∥', + sqcap: '⊓', + sqcaps: '⊓︀', + sqcup: '⊔', + sqcups: '⊔︀', + sqsub: '⊏', + sqsube: '⊑', + sqsubset: '⊏', + sqsubseteq: '⊑', + sqsup: '⊐', + sqsupe: '⊒', + sqsupset: '⊐', + sqsupseteq: '⊒', + squ: '□', + square: '□', + squarf: '▪', + squf: '▪', + srarr: '→', + sscr: '𝓈', + ssetmn: '∖', + ssmile: '⌣', + sstarf: '⋆', + star: '☆', + starf: '★', + straightepsilon: 'ϵ', + straightphi: 'ϕ', + strns: '¯', + sub: '⊂', + subE: '⫅', + subdot: '⪽', + sube: '⊆', + subedot: '⫃', + submult: '⫁', + subnE: '⫋', + subne: '⊊', + subplus: '⪿', + subrarr: '⥹', + subset: '⊂', + subseteq: '⊆', + subseteqq: '⫅', + subsetneq: '⊊', + subsetneqq: '⫋', + subsim: '⫇', + subsub: '⫕', + subsup: '⫓', + succ: '≻', + succapprox: '⪸', + succcurlyeq: '≽', + succeq: '⪰', + succnapprox: '⪺', + succneqq: '⪶', + succnsim: '⋩', + succsim: '≿', + sum: '∑', + sung: '♪', + sup1: '¹', + sup2: '²', + sup3: '³', + sup: '⊃', + supE: '⫆', + supdot: '⪾', + supdsub: '⫘', + supe: '⊇', + supedot: '⫄', + suphsol: '⟉', + suphsub: '⫗', + suplarr: '⥻', + supmult: '⫂', + supnE: '⫌', + supne: '⊋', + supplus: '⫀', + supset: '⊃', + supseteq: '⊇', + supseteqq: '⫆', + supsetneq: '⊋', + supsetneqq: '⫌', + supsim: '⫈', + supsub: '⫔', + supsup: '⫖', + swArr: '⇙', + swarhk: '⤦', + swarr: '↙', + swarrow: '↙', + swnwar: '⤪', + szlig: 'ß', + target: '⌖', + tau: 'τ', + tbrk: '⎴', + tcaron: 'ť', + tcedil: 'ţ', + tcy: 'т', + tdot: '⃛', + telrec: '⌕', + tfr: '𝔱', + there4: '∴', + therefore: '∴', + theta: 'θ', + thetasym: 'ϑ', + thetav: 'ϑ', + thickapprox: '≈', + thicksim: '∼', + thinsp: ' ', + thkap: '≈', + thksim: '∼', + thorn: 'þ', + tilde: '˜', + times: '×', + timesb: '⊠', + timesbar: '⨱', + timesd: '⨰', + tint: '∭', + toea: '⤨', + top: '⊤', + topbot: '⌶', + topcir: '⫱', + topf: '𝕥', + topfork: '⫚', + tosa: '⤩', + tprime: '‴', + trade: '™', + triangle: '▵', + triangledown: '▿', + triangleleft: '◃', + trianglelefteq: '⊴', + triangleq: '≜', + triangleright: '▹', + trianglerighteq: '⊵', + tridot: '◬', + trie: '≜', + triminus: '⨺', + triplus: '⨹', + trisb: '⧍', + tritime: '⨻', + trpezium: '⏢', + tscr: '𝓉', + tscy: 'ц', + tshcy: 'ћ', + tstrok: 'ŧ', + twixt: '≬', + twoheadleftarrow: '↞', + twoheadrightarrow: '↠', + uArr: '⇑', + uHar: '⥣', + uacute: 'ú', + uarr: '↑', + ubrcy: 'ў', + ubreve: 'ŭ', + ucirc: 'û', + ucy: 'у', + udarr: '⇅', + udblac: 'ű', + udhar: '⥮', + ufisht: '⥾', + ufr: '𝔲', + ugrave: 'ù', + uharl: '↿', + uharr: '↾', + uhblk: '▀', + ulcorn: '⌜', + ulcorner: '⌜', + ulcrop: '⌏', + ultri: '◸', + umacr: 'ū', + uml: '¨', + uogon: 'ų', + uopf: '𝕦', + uparrow: '↑', + updownarrow: '↕', + upharpoonleft: '↿', + upharpoonright: '↾', + uplus: '⊎', + upsi: 'υ', + upsih: 'ϒ', + upsilon: 'υ', + upuparrows: '⇈', + urcorn: '⌝', + urcorner: '⌝', + urcrop: '⌎', + uring: 'ů', + urtri: '◹', + uscr: '𝓊', + utdot: '⋰', + utilde: 'ũ', + utri: '▵', + utrif: '▴', + uuarr: '⇈', + uuml: 'ü', + uwangle: '⦧', + vArr: '⇕', + vBar: '⫨', + vBarv: '⫩', + vDash: '⊨', + vangrt: '⦜', + varepsilon: 'ϵ', + varkappa: 'ϰ', + varnothing: '∅', + varphi: 'ϕ', + varpi: 'ϖ', + varpropto: '∝', + varr: '↕', + varrho: 'ϱ', + varsigma: 'ς', + varsubsetneq: '⊊︀', + varsubsetneqq: '⫋︀', + varsupsetneq: '⊋︀', + varsupsetneqq: '⫌︀', + vartheta: 'ϑ', + vartriangleleft: '⊲', + vartriangleright: '⊳', + vcy: 'в', + vdash: '⊢', + vee: '∨', + veebar: '⊻', + veeeq: '≚', + vellip: '⋮', + verbar: '|', + vert: '|', + vfr: '𝔳', + vltri: '⊲', + vnsub: '⊂⃒', + vnsup: '⊃⃒', + vopf: '𝕧', + vprop: '∝', + vrtri: '⊳', + vscr: '𝓋', + vsubnE: '⫋︀', + vsubne: '⊊︀', + vsupnE: '⫌︀', + vsupne: '⊋︀', + vzigzag: '⦚', + wcirc: 'ŵ', + wedbar: '⩟', + wedge: '∧', + wedgeq: '≙', + weierp: '℘', + wfr: '𝔴', + wopf: '𝕨', + wp: '℘', + wr: '≀', + wreath: '≀', + wscr: '𝓌', + xcap: '⋂', + xcirc: '◯', + xcup: '⋃', + xdtri: '▽', + xfr: '𝔵', + xhArr: '⟺', + xharr: '⟷', + xi: 'ξ', + xlArr: '⟸', + xlarr: '⟵', + xmap: '⟼', + xnis: '⋻', + xodot: '⨀', + xopf: '𝕩', + xoplus: '⨁', + xotime: '⨂', + xrArr: '⟹', + xrarr: '⟶', + xscr: '𝓍', + xsqcup: '⨆', + xuplus: '⨄', + xutri: '△', + xvee: '⋁', + xwedge: '⋀', + yacute: 'ý', + yacy: 'я', + ycirc: 'ŷ', + ycy: 'ы', + yen: '¥', + yfr: '𝔶', + yicy: 'ї', + yopf: '𝕪', + yscr: '𝓎', + yucy: 'ю', + yuml: 'ÿ', + zacute: 'ź', + zcaron: 'ž', + zcy: 'з', + zdot: 'ż', + zeetrf: 'ℨ', + zeta: 'ζ', + zfr: '𝔷', + zhcy: 'ж', + zigrarr: '⇝', + zopf: '𝕫', + zscr: '𝓏', + zwj: '‍', + zwnj: '‌' +} + +;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js + + +const own = {}.hasOwnProperty + +/** + * Decode a single character reference (without the `&` or `;`). + * You probably only need this when you’re building parsers yourself that follow + * different rules compared to HTML. + * This is optimized to be tiny in browsers. + * + * @param {string} value + * `notin` (named), `#123` (deci), `#x123` (hexa). + * @returns {string|false} + * Decoded reference. + */ +function decodeNamedCharacterReference(value) { + return own.call(characterEntities, value) ? characterEntities[value] : false +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const characterReference = { + name: 'characterReference', + tokenize: tokenizeCharacterReference +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterReference(effects, ok, nok) { + const self = this + let size = 0 + /** @type {number} */ + let max + /** @type {(code: Code) => boolean} */ + let test + return start + + /** + * Start of character reference. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterReference') + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + return open + } + + /** + * After `&`, at `#` for numeric references or alphanumeric for named + * references. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 35) { + effects.enter('characterReferenceMarkerNumeric') + effects.consume(code) + effects.exit('characterReferenceMarkerNumeric') + return numeric + } + effects.enter('characterReferenceValue') + max = 31 + test = asciiAlphanumeric + return value(code) + } + + /** + * After `#`, at `x` for hexadecimals or digit for decimals. + * + * ```markdown + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function numeric(code) { + if (code === 88 || code === 120) { + effects.enter('characterReferenceMarkerHexadecimal') + effects.consume(code) + effects.exit('characterReferenceMarkerHexadecimal') + effects.enter('characterReferenceValue') + max = 6 + test = asciiHexDigit + return value + } + effects.enter('characterReferenceValue') + max = 7 + test = asciiDigit + return value(code) + } + + /** + * After markers (`&#x`, `&#`, or `&`), in value, before `;`. + * + * The character reference kind defines what and how many characters are + * allowed. + * + * ```markdown + * > | a&b + * ^^^ + * > | a{b + * ^^^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function value(code) { + if (code === 59 && size) { + const token = effects.exit('characterReferenceValue') + if ( + test === asciiAlphanumeric && + !decodeNamedCharacterReference(self.sliceSerialize(token)) + ) { + return nok(code) + } + + // To do: `markdown-rs` uses a different name: + // `CharacterReferenceMarkerSemi`. + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + effects.exit('characterReference') + return ok + } + if (test(code) && size++ < max) { + effects.consume(code) + return value + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const characterEscape = { + name: 'characterEscape', + tokenize: tokenizeCharacterEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterEscape(effects, ok, nok) { + return start + + /** + * Start of character escape. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterEscape') + effects.enter('escapeMarker') + effects.consume(code) + effects.exit('escapeMarker') + return inside + } + + /** + * After `\`, at punctuation. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + // ASCII punctuation. + if (asciiPunctuation(code)) { + effects.enter('characterEscapeValue') + effects.consume(code) + effects.exit('characterEscapeValue') + effects.exit('characterEscape') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const lineEnding = { + name: 'lineEnding', + tokenize: tokenizeLineEnding +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLineEnding(effects, ok) { + return start + + /** @type {State} */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, ok, 'linePrefix') + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + + +/** @type {Construct} */ +const labelEnd = { + name: 'labelEnd', + tokenize: tokenizeLabelEnd, + resolveTo: resolveToLabelEnd, + resolveAll: resolveAllLabelEnd +} + +/** @type {Construct} */ +const resourceConstruct = { + tokenize: tokenizeResource +} +/** @type {Construct} */ +const referenceFullConstruct = { + tokenize: tokenizeReferenceFull +} +/** @type {Construct} */ +const referenceCollapsedConstruct = { + tokenize: tokenizeReferenceCollapsed +} + +/** @type {Resolver} */ +function resolveAllLabelEnd(events) { + let index = -1 + while (++index < events.length) { + const token = events[index][1] + if ( + token.type === 'labelImage' || + token.type === 'labelLink' || + token.type === 'labelEnd' + ) { + // Remove the marker. + events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) + token.type = 'data' + index++ + } + } + return events +} + +/** @type {Resolver} */ +function resolveToLabelEnd(events, context) { + let index = events.length + let offset = 0 + /** @type {Token} */ + let token + /** @type {number | undefined} */ + let open + /** @type {number | undefined} */ + let close + /** @type {Array<Event>} */ + let media + + // Find an opening. + while (index--) { + token = events[index][1] + if (open) { + // If we see another link, or inactive link label, we’ve been here before. + if ( + token.type === 'link' || + (token.type === 'labelLink' && token._inactive) + ) { + break + } + + // Mark other link openings as inactive, as we can’t have links in + // links. + if (events[index][0] === 'enter' && token.type === 'labelLink') { + token._inactive = true + } + } else if (close) { + if ( + events[index][0] === 'enter' && + (token.type === 'labelImage' || token.type === 'labelLink') && + !token._balanced + ) { + open = index + if (token.type !== 'labelLink') { + offset = 2 + break + } + } + } else if (token.type === 'labelEnd') { + close = index + } + } + const group = { + type: events[open][1].type === 'labelLink' ? 'link' : 'image', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + const label = { + type: 'label', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[close][1].end) + } + const text = { + type: 'labelText', + start: Object.assign({}, events[open + offset + 2][1].end), + end: Object.assign({}, events[close - 2][1].start) + } + media = [ + ['enter', group, context], + ['enter', label, context] + ] + + // Opening marker. + media = push(media, events.slice(open + 1, open + offset + 3)) + + // Text open. + media = push(media, [['enter', text, context]]) + + // Always populated by defaults. + + // Between. + media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ) + + // Text close, marker close, label close. + media = push(media, [ + ['exit', text, context], + events[close - 2], + events[close - 1], + ['exit', label, context] + ]) + + // Reference, resource, or so. + media = push(media, events.slice(close + 1)) + + // Media close. + media = push(media, [['exit', group, context]]) + splice(events, open, events.length, media) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelEnd(effects, ok, nok) { + const self = this + let index = self.events.length + /** @type {Token} */ + let labelStart + /** @type {boolean} */ + let defined + + // Find an opening. + while (index--) { + if ( + (self.events[index][1].type === 'labelImage' || + self.events[index][1].type === 'labelLink') && + !self.events[index][1]._balanced + ) { + labelStart = self.events[index][1] + break + } + } + return start + + /** + * Start of label end. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ``` + * + * @type {State} + */ + function start(code) { + // If there is not an okay opening. + if (!labelStart) { + return nok(code) + } + + // If the corresponding label (link) start is marked as inactive, + // it means we’d be wrapping a link, like this: + // + // ```markdown + // > | a [b [c](d) e](f) g. + // ^ + // ``` + // + // We can’t have that, so it’s just balanced brackets. + if (labelStart._inactive) { + return labelEndNok(code) + } + defined = self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize({ + start: labelStart.end, + end: self.now() + }) + ) + ) + effects.enter('labelEnd') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelEnd') + return after + } + + /** + * After `]`. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + // Note: `markdown-rs` also parses GFM footnotes here, which for us is in + // an extension. + + // Resource (`[asd](fgh)`)? + if (code === 40) { + return effects.attempt( + resourceConstruct, + labelEndOk, + defined ? labelEndOk : labelEndNok + )(code) + } + + // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? + if (code === 91) { + return effects.attempt( + referenceFullConstruct, + labelEndOk, + defined ? referenceNotFull : labelEndNok + )(code) + } + + // Shortcut (`[asd]`) reference? + return defined ? labelEndOk(code) : labelEndNok(code) + } + + /** + * After `]`, at `[`, but not at a full reference. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function referenceNotFull(code) { + return effects.attempt( + referenceCollapsedConstruct, + labelEndOk, + labelEndNok + )(code) + } + + /** + * Done, we found something. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndOk(code) { + // Note: `markdown-rs` does a bunch of stuff here. + return ok(code) + } + + /** + * Done, it’s nothing. + * + * There was an okay opening, but we didn’t match anything. + * + * ```markdown + * > | [a](b c + * ^ + * > | [a][b c + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndNok(code) { + labelStart._balanced = true + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeResource(effects, ok, nok) { + return resourceStart + + /** + * At a resource. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceStart(code) { + effects.enter('resource') + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + return resourceBefore + } + + /** + * In resource, after `(`, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceOpen)(code) + : resourceOpen(code) + } + + /** + * In resource, after optional whitespace, at `)` or a destination. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceOpen(code) { + if (code === 41) { + return resourceEnd(code) + } + return factoryDestination( + effects, + resourceDestinationAfter, + resourceDestinationMissing, + 'resourceDestination', + 'resourceDestinationLiteral', + 'resourceDestinationLiteralMarker', + 'resourceDestinationRaw', + 'resourceDestinationString', + 32 + )(code) + } + + /** + * In resource, after destination, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceBetween)(code) + : resourceEnd(code) + } + + /** + * At invalid destination. + * + * ```markdown + * > | [a](<<) b + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationMissing(code) { + return nok(code) + } + + /** + * In resource, after destination and whitespace, at `(` or title. + * + * ```markdown + * > | [a](b ) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBetween(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + resourceTitleAfter, + nok, + 'resourceTitle', + 'resourceTitleMarker', + 'resourceTitleString' + )(code) + } + return resourceEnd(code) + } + + /** + * In resource, after title, at optional whitespace. + * + * ```markdown + * > | [a](b "c") d + * ^ + * ``` + * + * @type {State} + */ + function resourceTitleAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceEnd)(code) + : resourceEnd(code) + } + + /** + * In resource, at `)`. + * + * ```markdown + * > | [a](b) d + * ^ + * ``` + * + * @type {State} + */ + function resourceEnd(code) { + if (code === 41) { + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + effects.exit('resource') + return ok + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceFull(effects, ok, nok) { + const self = this + return referenceFull + + /** + * In a reference (full), at the `[`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFull(code) { + return factoryLabel.call( + self, + effects, + referenceFullAfter, + referenceFullMissing, + 'reference', + 'referenceMarker', + 'referenceString' + )(code) + } + + /** + * In a reference (full), after `]`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullAfter(code) { + return self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + ) + ? ok(code) + : nok(code) + } + + /** + * In reference (full) that was missing. + * + * ```markdown + * > | [a][b d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullMissing(code) { + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceCollapsed(effects, ok, nok) { + return referenceCollapsedStart + + /** + * In reference (collapsed), at `[`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedStart(code) { + // We only attempt a collapsed label if there’s a `[`. + + effects.enter('reference') + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + return referenceCollapsedOpen + } + + /** + * In reference (collapsed), at `]`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedOpen(code) { + if (code === 93) { + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + effects.exit('reference') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartImage = { + name: 'labelStartImage', + tokenize: tokenizeLabelStartImage, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartImage(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (image) start. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelImage') + effects.enter('labelImageMarker') + effects.consume(code) + effects.exit('labelImageMarker') + return open + } + + /** + * After `!`, at `[`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 91) { + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelImage') + return after + } + return nok(code) + } + + /** + * After `![`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * This is needed in because, when GFM footnotes are enabled, images never + * form when started with a `^`. + * Instead, links form: + * + * ```markdown + * ![^a](b) + * + * ![^a][b] + * + * [b]: c + * ``` + * + * ```html + * <p>!<a href=\"b\">^a</a></p> + * <p>!<a href=\"c\">^a</a></p> + * ``` + * + * @type {State} + */ + function after(code) { + // To do: use a new field to do this, this is still needed for + // `micromark-extension-gfm-footnote`, but the `label-start-link` + // behavior isn’t. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + +/** + * Classify whether a code represents whitespace, punctuation, or something + * else. + * + * Used for attention (emphasis, strong), whose sequences can open or close + * based on the class of surrounding characters. + * + * > 👉 **Note**: eof (`null`) is seen as whitespace. + * + * @param {Code} code + * Code. + * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} + * Group. + */ +function classifyCharacter(code) { + if ( + code === null || + markdownLineEndingOrSpace(code) || + unicodeWhitespace(code) + ) { + return 1 + } + if (unicodePunctuation(code)) { + return 2 + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const attention = { + name: 'attention', + tokenize: tokenizeAttention, + resolveAll: resolveAllAttention +} + +/** + * Take all events and resolve attention to emphasis or strong. + * + * @type {Resolver} + */ +function resolveAllAttention(events, context) { + let index = -1 + /** @type {number} */ + let open + /** @type {Token} */ + let group + /** @type {Token} */ + let text + /** @type {Token} */ + let openingSequence + /** @type {Token} */ + let closingSequence + /** @type {number} */ + let use + /** @type {Array<Event>} */ + let nextEvents + /** @type {number} */ + let offset + + // Walk through all events. + // + // Note: performance of this is fine on an mb of normal markdown, but it’s + // a bottleneck for malicious stuff. + while (++index < events.length) { + // Find a token that can close. + if ( + events[index][0] === 'enter' && + events[index][1].type === 'attentionSequence' && + events[index][1]._close + ) { + open = index + + // Now walk back to find an opener. + while (open--) { + // Find a token that can open the closer. + if ( + events[open][0] === 'exit' && + events[open][1].type === 'attentionSequence' && + events[open][1]._open && + // If the markers are the same: + context.sliceSerialize(events[open][1]).charCodeAt(0) === + context.sliceSerialize(events[index][1]).charCodeAt(0) + ) { + // If the opening can close or the closing can open, + // and the close size *is not* a multiple of three, + // but the sum of the opening and closing size *is* multiple of three, + // then don’t match. + if ( + (events[open][1]._close || events[index][1]._open) && + (events[index][1].end.offset - events[index][1].start.offset) % 3 && + !( + (events[open][1].end.offset - + events[open][1].start.offset + + events[index][1].end.offset - + events[index][1].start.offset) % + 3 + ) + ) { + continue + } + + // Number of markers to use from the sequence. + use = + events[open][1].end.offset - events[open][1].start.offset > 1 && + events[index][1].end.offset - events[index][1].start.offset > 1 + ? 2 + : 1 + const start = Object.assign({}, events[open][1].end) + const end = Object.assign({}, events[index][1].start) + movePoint(start, -use) + movePoint(end, use) + openingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start, + end: Object.assign({}, events[open][1].end) + } + closingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start: Object.assign({}, events[index][1].start), + end + } + text = { + type: use > 1 ? 'strongText' : 'emphasisText', + start: Object.assign({}, events[open][1].end), + end: Object.assign({}, events[index][1].start) + } + group = { + type: use > 1 ? 'strong' : 'emphasis', + start: Object.assign({}, openingSequence.start), + end: Object.assign({}, closingSequence.end) + } + events[open][1].end = Object.assign({}, openingSequence.start) + events[index][1].start = Object.assign({}, closingSequence.end) + nextEvents = [] + + // If there are more markers in the opening, add them before. + if (events[open][1].end.offset - events[open][1].start.offset) { + nextEvents = push(nextEvents, [ + ['enter', events[open][1], context], + ['exit', events[open][1], context] + ]) + } + + // Opening. + nextEvents = push(nextEvents, [ + ['enter', group, context], + ['enter', openingSequence, context], + ['exit', openingSequence, context], + ['enter', text, context] + ]) + + // Always populated by defaults. + + // Between. + nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index), + context + ) + ) + + // Closing. + nextEvents = push(nextEvents, [ + ['exit', text, context], + ['enter', closingSequence, context], + ['exit', closingSequence, context], + ['exit', group, context] + ]) + + // If there are more markers in the closing, add them after. + if (events[index][1].end.offset - events[index][1].start.offset) { + offset = 2 + nextEvents = push(nextEvents, [ + ['enter', events[index][1], context], + ['exit', events[index][1], context] + ]) + } else { + offset = 0 + } + splice(events, open - 1, index - open + 3, nextEvents) + index = open + nextEvents.length - offset - 2 + break + } + } + } + } + + // Remove remaining sequences. + index = -1 + while (++index < events.length) { + if (events[index][1].type === 'attentionSequence') { + events[index][1].type = 'data' + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAttention(effects, ok) { + const attentionMarkers = this.parser.constructs.attentionMarkers.null + const previous = this.previous + const before = classifyCharacter(previous) + + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Before a sequence. + * + * ```markdown + * > | ** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + marker = code + effects.enter('attentionSequence') + return inside(code) + } + + /** + * In a sequence. + * + * ```markdown + * > | ** + * ^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + const token = effects.exit('attentionSequence') + + // To do: next major: move this to resolver, just like `markdown-rs`. + const after = classifyCharacter(code) + + // Always populated by defaults. + + const open = + !after || (after === 2 && before) || attentionMarkers.includes(code) + const close = + !before || (before === 2 && after) || attentionMarkers.includes(previous) + token._open = Boolean(marker === 42 ? open : open && (before || !close)) + token._close = Boolean(marker === 42 ? close : close && (after || !open)) + return ok(code) + } +} + +/** + * Move a point a bit. + * + * Note: `move` only works inside lines! It’s not possible to move past other + * chunks (replacement characters, tabs, or line endings). + * + * @param {Point} point + * @param {number} offset + * @returns {void} + */ +function movePoint(point, offset) { + point.column += offset + point.offset += offset + point._bufferIndex += offset +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const autolink = { + name: 'autolink', + tokenize: tokenizeAutolink +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAutolink(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of an autolink. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('autolink') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.enter('autolinkProtocol') + return open + } + + /** + * After `<`, at protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (asciiAlpha(code)) { + effects.consume(code) + return schemeOrEmailAtext + } + return emailAtext(code) + } + + /** + * At second byte of protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function schemeOrEmailAtext(code) { + // ASCII alphanumeric and `+`, `-`, and `.`. + if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { + // Count the previous alphabetical from `open` too. + size = 1 + return schemeInsideOrEmailAtext(code) + } + return emailAtext(code) + } + + /** + * In ambiguous protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function schemeInsideOrEmailAtext(code) { + if (code === 58) { + effects.consume(code) + size = 0 + return urlInside + } + + // ASCII alphanumeric and `+`, `-`, and `.`. + if ( + (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && + size++ < 32 + ) { + effects.consume(code) + return schemeInsideOrEmailAtext + } + size = 0 + return emailAtext(code) + } + + /** + * After protocol, in URL. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * ``` + * + * @type {State} + */ + function urlInside(code) { + if (code === 62) { + effects.exit('autolinkProtocol') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + + // ASCII control, space, or `<`. + if (code === null || code === 32 || code === 60 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return urlInside + } + + /** + * In email atext. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailAtext(code) { + if (code === 64) { + effects.consume(code) + return emailAtSignOrDot + } + if (asciiAtext(code)) { + effects.consume(code) + return emailAtext + } + return nok(code) + } + + /** + * In label, after at-sign or dot. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ ^ + * ``` + * + * @type {State} + */ + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) + } + + /** + * In label, where `.` and `>` are allowed. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailLabel(code) { + if (code === 46) { + effects.consume(code) + size = 0 + return emailAtSignOrDot + } + if (code === 62) { + // Exit, then change the token type. + effects.exit('autolinkProtocol').type = 'autolinkEmail' + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + return emailValue(code) + } + + /** + * In label, where `.` and `>` are *not* allowed. + * + * Though, this is also used in `emailLabel` to parse other values. + * + * ```markdown + * > | a<user.name@ex-ample.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailValue(code) { + // ASCII alphanumeric or `-`. + if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { + const next = code === 45 ? emailValue : emailLabel + effects.consume(code) + return next + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const htmlText = { + name: 'htmlText', + tokenize: tokenizeHtmlText +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlText(effects, ok, nok) { + const self = this + /** @type {NonNullable<Code> | undefined} */ + let marker + /** @type {number} */ + let index + /** @type {State} */ + let returnState + return start + + /** + * Start of HTML (text). + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('htmlText') + effects.enter('htmlTextData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | a <b> c + * ^ + * > | a <!doctype> c + * ^ + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + return instruction + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagOpen + } + return nok(code) + } + + /** + * After `<!`, at declaration, comment, or CDATA. + * + * ```markdown + * > | a <!doctype> c + * ^ + * > | a <!--b--> c + * ^ + * > | a <![CDATA[>&<]]> c + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + index = 0 + return cdataOpenInside + } + if (asciiAlpha(code)) { + effects.consume(code) + return declaration + } + return nok(code) + } + + /** + * In a comment, after `<!-`, at another `-`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return nok(code) + } + + /** + * In comment. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function comment(code) { + if (code === null) { + return nok(code) + } + if (code === 45) { + effects.consume(code) + return commentClose + } + if (markdownLineEnding(code)) { + returnState = comment + return lineEndingBefore(code) + } + effects.consume(code) + return comment + } + + /** + * In comment, after `-`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentClose(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return comment(code) + } + + /** + * In comment, after `--`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentEnd(code) { + return code === 62 + ? end(code) + : code === 45 + ? commentClose(code) + : comment(code) + } + + /** + * After `<![`, in CDATA, expecting `CDATA[`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + return index === value.length ? cdata : cdataOpenInside + } + return nok(code) + } + + /** + * In CDATA. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^^^ + * ``` + * + * @type {State} + */ + function cdata(code) { + if (code === null) { + return nok(code) + } + if (code === 93) { + effects.consume(code) + return cdataClose + } + if (markdownLineEnding(code)) { + returnState = cdata + return lineEndingBefore(code) + } + effects.consume(code) + return cdata + } + + /** + * In CDATA, after `]`, at another `]`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataClose(code) { + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In CDATA, after `]]`, at `>`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataEnd(code) { + if (code === 62) { + return end(code) + } + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In declaration. + * + * ```markdown + * > | a <!b> c + * ^ + * ``` + * + * @type {State} + */ + function declaration(code) { + if (code === null || code === 62) { + return end(code) + } + if (markdownLineEnding(code)) { + returnState = declaration + return lineEndingBefore(code) + } + effects.consume(code) + return declaration + } + + /** + * In instruction. + * + * ```markdown + * > | a <?b?> c + * ^ + * ``` + * + * @type {State} + */ + function instruction(code) { + if (code === null) { + return nok(code) + } + if (code === 63) { + effects.consume(code) + return instructionClose + } + if (markdownLineEnding(code)) { + returnState = instruction + return lineEndingBefore(code) + } + effects.consume(code) + return instruction + } + + /** + * In instruction, after `?`, at `>`. + * + * ```markdown + * > | a <?b?> c + * ^ + * ``` + * + * @type {State} + */ + function instructionClose(code) { + return code === 62 ? end(code) : instruction(code) + } + + /** + * After `</`, in closing tag, at tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagClose + } + return nok(code) + } + + /** + * After `</x`, in a tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagClose(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagClose + } + return tagCloseBetween(code) + } + + /** + * In closing tag, after tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseBetween(code) { + if (markdownLineEnding(code)) { + returnState = tagCloseBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagCloseBetween + } + return end(code) + } + + /** + * After `<x`, in opening tag name. + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function tagOpen(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagOpen + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In opening tag, after tag name. + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function tagOpenBetween(code) { + if (code === 47) { + effects.consume(code) + return end + } + + // ASCII alphabetical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return tagOpenAttributeName + } + if (markdownLineEnding(code)) { + returnState = tagOpenBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenBetween + } + return end(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | a <b c> d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeName(code) { + // ASCII alphabetical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return tagOpenAttributeName + } + return tagOpenAttributeNameAfter(code) + } + + /** + * After attribute name, before initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | a <b c> d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeNameAfter + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeNameAfter + } + return tagOpenBetween(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | a <b c=d> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + marker = code + return tagOpenAttributeValueQuoted + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueBefore + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code) + marker = undefined + return tagOpenAttributeValueQuotedAfter + } + if (code === null) { + return nok(code) + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueQuoted + return lineEndingBefore(code) + } + effects.consume(code) + return tagOpenAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | a <b c=d> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 60 || + code === 61 || + code === 96 + ) { + return nok(code) + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the end + * of the tag. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In certain circumstances of a tag where only an `>` is allowed. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function end(code) { + if (code === 62) { + effects.consume(code) + effects.exit('htmlTextData') + effects.exit('htmlText') + return ok + } + return nok(code) + } + + /** + * At eol. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * > | a <!--a + * ^ + * | b--> + * ``` + * + * @type {State} + */ + function lineEndingBefore(code) { + effects.exit('htmlTextData') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineEndingAfter + } + + /** + * After eol, at optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a <!--a + * > | b--> + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfter(code) { + // Always populated by defaults. + + return markdownSpace(code) + ? factorySpace( + effects, + lineEndingAfterPrefix, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : lineEndingAfterPrefix(code) + } + + /** + * After eol, after optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a <!--a + * > | b--> + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfterPrefix(code) { + effects.enter('htmlTextData') + return returnState(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartLink = { + name: 'labelStartLink', + tokenize: tokenizeLabelStartLink, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartLink(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (link) start. + * + * ```markdown + * > | a [b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelLink') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelLink') + return after + } + + /** @type {State} */ + function after(code) { + // To do: this isn’t needed in `micromark-extension-gfm-footnote`, + // remove. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const hardBreakEscape = { + name: 'hardBreakEscape', + tokenize: tokenizeHardBreakEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHardBreakEscape(effects, ok, nok) { + return start + + /** + * Start of a hard break (escape). + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('hardBreakEscape') + effects.consume(code) + return after + } + + /** + * After `\`, at eol. + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownLineEnding(code)) { + effects.exit('hardBreakEscape') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Previous} Previous + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const codeText = { + name: 'codeText', + tokenize: tokenizeCodeText, + resolve: resolveCodeText, + previous +} + +// To do: next major: don’t resolve, like `markdown-rs`. +/** @type {Resolver} */ +function resolveCodeText(events) { + let tailExitIndex = events.length - 4 + let headEnterIndex = 3 + /** @type {number} */ + let index + /** @type {number | undefined} */ + let enter + + // If we start and end with an EOL or a space. + if ( + (events[headEnterIndex][1].type === 'lineEnding' || + events[headEnterIndex][1].type === 'space') && + (events[tailExitIndex][1].type === 'lineEnding' || + events[tailExitIndex][1].type === 'space') + ) { + index = headEnterIndex + + // And we have data. + while (++index < tailExitIndex) { + if (events[index][1].type === 'codeTextData') { + // Then we have padding. + events[headEnterIndex][1].type = 'codeTextPadding' + events[tailExitIndex][1].type = 'codeTextPadding' + headEnterIndex += 2 + tailExitIndex -= 2 + break + } + } + } + + // Merge adjacent spaces and data. + index = headEnterIndex - 1 + tailExitIndex++ + while (++index <= tailExitIndex) { + if (enter === undefined) { + if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { + enter = index + } + } else if ( + index === tailExitIndex || + events[index][1].type === 'lineEnding' + ) { + events[enter][1].type = 'codeTextData' + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + tailExitIndex -= index - enter - 2 + index = enter + 2 + } + enter = undefined + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Previous} + */ +function previous(code) { + // If there is a previous code, there will always be a tail. + return ( + code !== 96 || + this.events[this.events.length - 1][1].type === 'characterEscape' + ) +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeText(effects, ok, nok) { + const self = this + let sizeOpen = 0 + /** @type {number} */ + let size + /** @type {Token} */ + let token + return start + + /** + * Start of code (text). + * + * ```markdown + * > | `a` + * ^ + * > | \`a` + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('codeText') + effects.enter('codeTextSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 96) { + effects.consume(code) + sizeOpen++ + return sequenceOpen + } + effects.exit('codeTextSequence') + return between(code) + } + + /** + * Between something and something else. + * + * ```markdown + * > | `a` + * ^^ + * ``` + * + * @type {State} + */ + function between(code) { + // EOF. + if (code === null) { + return nok(code) + } + + // To do: next major: don’t do spaces in resolve, but when compiling, + // like `markdown-rs`. + // Tabs don’t work, and virtual spaces don’t make sense. + if (code === 32) { + effects.enter('space') + effects.consume(code) + effects.exit('space') + return between + } + + // Closing fence? Could also be data. + if (code === 96) { + token = effects.enter('codeTextSequence') + size = 0 + return sequenceClose(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return between + } + + // Data. + effects.enter('codeTextData') + return data(code) + } + + /** + * In data. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if ( + code === null || + code === 32 || + code === 96 || + markdownLineEnding(code) + ) { + effects.exit('codeTextData') + return between(code) + } + effects.consume(code) + return data + } + + /** + * In closing sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + // More. + if (code === 96) { + effects.consume(code) + size++ + return sequenceClose + } + + // Done! + if (size === sizeOpen) { + effects.exit('codeTextSequence') + effects.exit('codeText') + return ok(code) + } + + // More or less accents: mark as data. + token.type = 'codeTextData' + return data(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + */ + + + + +/** @satisfies {Extension['document']} */ +const constructs_document = { + [42]: list, + [43]: list, + [45]: list, + [48]: list, + [49]: list, + [50]: list, + [51]: list, + [52]: list, + [53]: list, + [54]: list, + [55]: list, + [56]: list, + [57]: list, + [62]: blockQuote +} + +/** @satisfies {Extension['contentInitial']} */ +const contentInitial = { + [91]: definition +} + +/** @satisfies {Extension['flowInitial']} */ +const flowInitial = { + [-2]: codeIndented, + [-1]: codeIndented, + [32]: codeIndented +} + +/** @satisfies {Extension['flow']} */ +const constructs_flow = { + [35]: headingAtx, + [42]: thematicBreak, + [45]: [setextUnderline, thematicBreak], + [60]: htmlFlow, + [61]: setextUnderline, + [95]: thematicBreak, + [96]: codeFenced, + [126]: codeFenced +} + +/** @satisfies {Extension['string']} */ +const constructs_string = { + [38]: characterReference, + [92]: characterEscape +} + +/** @satisfies {Extension['text']} */ +const constructs_text = { + [-5]: lineEnding, + [-4]: lineEnding, + [-3]: lineEnding, + [33]: labelStartImage, + [38]: characterReference, + [42]: attention, + [60]: [autolink, htmlText], + [91]: labelStartLink, + [92]: [hardBreakEscape, characterEscape], + [93]: labelEnd, + [95]: attention, + [96]: codeText +} + +/** @satisfies {Extension['insideSpan']} */ +const insideSpan = { + null: [attention, resolver] +} + +/** @satisfies {Extension['attentionMarkers']} */ +const attentionMarkers = { + null: [42, 95] +} + +/** @satisfies {Extension['disable']} */ +const disable = { + null: [] +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js +/** + * @typedef {import('micromark-util-types').Create} Create + * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + */ + + + + + + + + + +/** + * @param {ParseOptions | null | undefined} [options] + * @returns {ParseContext} + */ +function parse(options) { + const settings = options || {} + const constructs = + /** @type {FullNormalizedExtension} */ + combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) + + /** @type {ParseContext} */ + const parser = { + defined: [], + lazy: {}, + constructs, + content: create(content), + document: create(document_document), + flow: create(flow), + string: create(string), + text: create(text_text) + } + return parser + + /** + * @param {InitialConstruct} initial + */ + function create(initial) { + return creator + /** @type {Create} */ + function creator(from) { + return createTokenizer(parser, initial, from) + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Value} Value + */ + +/** + * @callback Preprocessor + * @param {Value} value + * @param {Encoding | null | undefined} [encoding] + * @param {boolean | null | undefined} [end=false] + * @returns {Array<Chunk>} + */ + +const search = /[\0\t\n\r]/g + +/** + * @returns {Preprocessor} + */ +function preprocess() { + let column = 1 + let buffer = '' + /** @type {boolean | undefined} */ + let start = true + /** @type {boolean | undefined} */ + let atCarriageReturn + return preprocessor + + /** @type {Preprocessor} */ + function preprocessor(value, encoding, end) { + /** @type {Array<Chunk>} */ + const chunks = [] + /** @type {RegExpMatchArray | null} */ + let match + /** @type {number} */ + let next + /** @type {number} */ + let startPosition + /** @type {number} */ + let endPosition + /** @type {Code} */ + let code + + // @ts-expect-error `Buffer` does allow an encoding. + value = buffer + value.toString(encoding) + startPosition = 0 + buffer = '' + if (start) { + // To do: `markdown-rs` actually parses BOMs (byte order mark). + if (value.charCodeAt(0) === 65279) { + startPosition++ + } + start = undefined + } + while (startPosition < value.length) { + search.lastIndex = startPosition + match = search.exec(value) + endPosition = + match && match.index !== undefined ? match.index : value.length + code = value.charCodeAt(endPosition) + if (!match) { + buffer = value.slice(startPosition) + break + } + if (code === 10 && startPosition === endPosition && atCarriageReturn) { + chunks.push(-3) + atCarriageReturn = undefined + } else { + if (atCarriageReturn) { + chunks.push(-5) + atCarriageReturn = undefined + } + if (startPosition < endPosition) { + chunks.push(value.slice(startPosition, endPosition)) + column += endPosition - startPosition + } + switch (code) { + case 0: { + chunks.push(65533) + column++ + break + } + case 9: { + next = Math.ceil(column / 4) * 4 + chunks.push(-2) + while (column++ < next) chunks.push(-1) + break + } + case 10: { + chunks.push(-4) + column = 1 + break + } + default: { + atCarriageReturn = true + column = 1 + } + } + } + startPosition = endPosition + 1 + } + if (end) { + if (atCarriageReturn) chunks.push(-5) + if (buffer) chunks.push(buffer) + chunks.push(null) + } + return chunks + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js +/** + * @typedef {import('micromark-util-types').Event} Event + */ + + + +/** + * @param {Array<Event>} events + * @returns {Array<Event>} + */ +function postprocess(events) { + while (!subtokenize(events)) { + // Empty + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js +/** + * Turn the number (in string form as either hexa- or plain decimal) coming from + * a numeric character reference into a character. + * + * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes + * non-characters and control characters safe. + * + * @param {string} value + * Value to decode. + * @param {number} base + * Numeric base. + * @returns {string} + * Character. + */ +function decodeNumericCharacterReference(value, base) { + const code = Number.parseInt(value, base) + if ( + // C0 except for HT, LF, FF, CR, space. + code < 9 || + code === 11 || + (code > 13 && code < 32) || + // Control character (DEL) of C0, and C1 controls. + (code > 126 && code < 160) || + // Lone high surrogates and low surrogates. + (code > 55295 && code < 57344) || + // Noncharacters. + (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || + (code & 65535) === 65535 || + (code & 65535) === 65534 /* eslint-enable no-bitwise */ || + // Out of range + code > 1114111 + ) { + return '\uFFFD' + } + return String.fromCharCode(code) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js + + +const characterEscapeOrReference = + /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi + +/** + * Decode markdown strings (which occur in places such as fenced code info + * strings, destinations, labels, and titles). + * + * The “string” content type allows character escapes and -references. + * This decodes those. + * + * @param {string} value + * Value to decode. + * @returns {string} + * Decoded value. + */ +function decodeString(value) { + return value.replace(characterEscapeOrReference, decode) +} + +/** + * @param {string} $0 + * @param {string} $1 + * @param {string} $2 + * @returns {string} + */ +function decode($0, $1, $2) { + if ($1) { + // Escape. + return $1 + } + + // Reference. + const head = $2.charCodeAt(0) + if (head === 35) { + const head = $2.charCodeAt(1) + const hex = head === 120 || head === 88 + return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) + } + return decodeNamedCharacterReference($2) || $0 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js +/** + * @typedef {import('unist').Node} Node + * @typedef {import('unist').Point} Point + * @typedef {import('unist').Position} Position + */ + +/** + * @typedef NodeLike + * @property {string} type + * @property {PositionLike | null | undefined} [position] + * + * @typedef PositionLike + * @property {PointLike | null | undefined} [start] + * @property {PointLike | null | undefined} [end] + * + * @typedef PointLike + * @property {number | null | undefined} [line] + * @property {number | null | undefined} [column] + * @property {number | null | undefined} [offset] + */ + +/** + * Serialize the positional info of a point, position (start and end points), + * or node. + * + * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] + * Node, position, or point. + * @returns {string} + * Pretty printed positional info of a node (`string`). + * + * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) + * or a point `l:c` (when given `point`), where `l` stands for line, `c` for + * column, `s` for `start`, and `e` for end. + * An empty string (`''`) is returned if the given value is neither `node`, + * `position`, nor `point`. + */ +function stringifyPosition(value) { + // Nothing. + if (!value || typeof value !== 'object') { + return '' + } + + // Node. + if ('position' in value || 'type' in value) { + return position(value.position) + } + + // Position. + if ('start' in value || 'end' in value) { + return position(value) + } + + // Point. + if ('line' in value || 'column' in value) { + return point(value) + } + + // ? + return '' +} + +/** + * @param {Point | PointLike | null | undefined} point + * @returns {string} + */ +function point(point) { + return index(point && point.line) + ':' + index(point && point.column) +} + +/** + * @param {Position | PositionLike | null | undefined} pos + * @returns {string} + */ +function position(pos) { + return point(pos && pos.start) + '-' + point(pos && pos.end) +} + +/** + * @param {number | null | undefined} value + * @returns {number} + */ +function index(value) { + return value && typeof value === 'number' ? value : 1 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js +/** + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Value} Value + * + * @typedef {import('unist').Parent} UnistParent + * @typedef {import('unist').Point} Point + * + * @typedef {import('mdast').PhrasingContent} PhrasingContent + * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent + * @typedef {import('mdast').Content} Content + * @typedef {import('mdast').Break} Break + * @typedef {import('mdast').Blockquote} Blockquote + * @typedef {import('mdast').Code} Code + * @typedef {import('mdast').Definition} Definition + * @typedef {import('mdast').Emphasis} Emphasis + * @typedef {import('mdast').Heading} Heading + * @typedef {import('mdast').HTML} HTML + * @typedef {import('mdast').Image} Image + * @typedef {import('mdast').ImageReference} ImageReference + * @typedef {import('mdast').InlineCode} InlineCode + * @typedef {import('mdast').Link} Link + * @typedef {import('mdast').LinkReference} LinkReference + * @typedef {import('mdast').List} List + * @typedef {import('mdast').ListItem} ListItem + * @typedef {import('mdast').Paragraph} Paragraph + * @typedef {import('mdast').Root} Root + * @typedef {import('mdast').Strong} Strong + * @typedef {import('mdast').Text} Text + * @typedef {import('mdast').ThematicBreak} ThematicBreak + * @typedef {import('mdast').ReferenceType} ReferenceType + * @typedef {import('../index.js').CompileData} CompileData + */ + +/** + * @typedef {Root | Content} Node + * @typedef {Extract<Node, UnistParent>} Parent + * + * @typedef {Omit<UnistParent, 'type' | 'children'> & {type: 'fragment', children: Array<PhrasingContent>}} Fragment + */ + +/** + * @callback Transform + * Extra transform, to change the AST afterwards. + * @param {Root} tree + * Tree to transform. + * @returns {Root | undefined | null | void} + * New tree or nothing (in which case the current tree is used). + * + * @callback Handle + * Handle a token. + * @param {CompileContext} this + * Context. + * @param {Token} token + * Current token. + * @returns {void} + * Nothing. + * + * @typedef {Record<string, Handle>} Handles + * Token types mapping to handles + * + * @callback OnEnterError + * Handle the case where the `right` token is open, but it is closed (by the + * `left` token) or because we reached the end of the document. + * @param {Omit<CompileContext, 'sliceSerialize'>} this + * Context. + * @param {Token | undefined} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @callback OnExitError + * Handle the case where the `right` token is open but it is closed by + * exiting the `left` token. + * @param {Omit<CompileContext, 'sliceSerialize'>} this + * Context. + * @param {Token} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @typedef {[Token, OnEnterError | undefined]} TokenTuple + * Open token on the stack, with an optional error handler for when + * that token isn’t closed properly. + */ + +/** + * @typedef Config + * Configuration. + * + * We have our defaults, but extensions will add more. + * @property {Array<string>} canContainEols + * Token types where line endings are used. + * @property {Handles} enter + * Opening handles. + * @property {Handles} exit + * Closing handles. + * @property {Array<Transform>} transforms + * Tree transforms. + * + * @typedef {Partial<Config>} Extension + * Change how markdown tokens from micromark are turned into mdast. + * + * @typedef CompileContext + * mdast compiler context. + * @property {Array<Node | Fragment>} stack + * Stack of nodes. + * @property {Array<TokenTuple>} tokenStack + * Stack of tokens. + * @property {<Key extends keyof CompileData>(key: Key) => CompileData[Key]} getData + * Get data from the key/value store. + * @property {<Key extends keyof CompileData>(key: Key, value?: CompileData[Key]) => void} setData + * Set data into the key/value store. + * @property {(this: CompileContext) => void} buffer + * Capture some of the output data. + * @property {(this: CompileContext) => string} resume + * Stop capturing and access the output data. + * @property {<Kind extends Node>(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter + * Enter a token. + * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit + * Exit a token. + * @property {TokenizeContext['sliceSerialize']} sliceSerialize + * Get the string value of a token. + * @property {Config} config + * Configuration. + * + * @typedef FromMarkdownOptions + * Configuration for how to build mdast. + * @property {Array<Extension | Array<Extension>> | null | undefined} [mdastExtensions] + * Extensions for this utility to change how tokens are turned into a tree. + * + * @typedef {ParseOptions & FromMarkdownOptions} Options + * Configuration. + */ + +// To do: micromark: create a registry of tokens? +// To do: next major: don’t return given `Node` from `enter`. +// To do: next major: remove setter/getter. + + + + + + + + + + +const lib_own = {}.hasOwnProperty + +/** + * @param value + * Markdown to parse. + * @param encoding + * Character encoding for when `value` is `Buffer`. + * @param options + * Configuration. + * @returns + * mdast tree. + */ +const fromMarkdown = + /** + * @type {( + * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & + * ((value: Value, options?: Options | null | undefined) => Root) + * )} + */ + + /** + * @param {Value} value + * @param {Encoding | Options | null | undefined} [encoding] + * @param {Options | null | undefined} [options] + * @returns {Root} + */ + function (value, encoding, options) { + if (typeof encoding !== 'string') { + options = encoding + encoding = undefined + } + return compiler(options)( + postprocess( + parse(options).document().write(preprocess()(value, encoding, true)) + ) + ) + } + +/** + * Note this compiler only understand complete buffering, not streaming. + * + * @param {Options | null | undefined} [options] + */ +function compiler(options) { + /** @type {Config} */ + const config = { + transforms: [], + canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], + enter: { + autolink: opener(link), + autolinkProtocol: onenterdata, + autolinkEmail: onenterdata, + atxHeading: opener(heading), + blockQuote: opener(blockQuote), + characterEscape: onenterdata, + characterReference: onenterdata, + codeFenced: opener(codeFlow), + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: opener(codeFlow, buffer), + codeText: opener(codeText, buffer), + codeTextData: onenterdata, + data: onenterdata, + codeFlowValue: onenterdata, + definition: opener(definition), + definitionDestinationString: buffer, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: opener(emphasis), + hardBreakEscape: opener(hardBreak), + hardBreakTrailing: opener(hardBreak), + htmlFlow: opener(html, buffer), + htmlFlowData: onenterdata, + htmlText: opener(html, buffer), + htmlTextData: onenterdata, + image: opener(image), + label: buffer, + link: opener(link), + listItem: opener(listItem), + listItemValue: onenterlistitemvalue, + listOrdered: opener(list, onenterlistordered), + listUnordered: opener(list), + paragraph: opener(paragraph), + reference: onenterreference, + referenceString: buffer, + resourceDestinationString: buffer, + resourceTitleString: buffer, + setextHeading: opener(heading), + strong: opener(strong), + thematicBreak: opener(thematicBreak) + }, + exit: { + atxHeading: closer(), + atxHeadingSequence: onexitatxheadingsequence, + autolink: closer(), + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: closer(), + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: closer(onexitcodefenced), + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: onexitcodefencedfencemeta, + codeFlowValue: onexitdata, + codeIndented: closer(onexitcodeindented), + codeText: closer(onexitcodetext), + codeTextData: onexitdata, + data: onexitdata, + definition: closer(), + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: closer(), + hardBreakEscape: closer(onexithardbreak), + hardBreakTrailing: closer(onexithardbreak), + htmlFlow: closer(onexithtmlflow), + htmlFlowData: onexitdata, + htmlText: closer(onexithtmltext), + htmlTextData: onexitdata, + image: closer(onexitimage), + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: closer(onexitlink), + listItem: closer(), + listOrdered: closer(), + listUnordered: closer(), + paragraph: closer(), + referenceString: onexitreferencestring, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + resource: onexitresource, + setextHeading: closer(onexitsetextheading), + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: closer(), + thematicBreak: closer() + } + } + configure(config, (options || {}).mdastExtensions || []) + + /** @type {CompileData} */ + const data = {} + return compile + + /** + * Turn micromark events into an mdast tree. + * + * @param {Array<Event>} events + * Events. + * @returns {Root} + * mdast tree. + */ + function compile(events) { + /** @type {Root} */ + let tree = { + type: 'root', + children: [] + } + /** @type {Omit<CompileContext, 'sliceSerialize'>} */ + const context = { + stack: [tree], + tokenStack: [], + config, + enter, + exit, + buffer, + resume, + setData, + getData + } + /** @type {Array<number>} */ + const listStack = [] + let index = -1 + while (++index < events.length) { + // We preprocess lists to add `listItem` tokens, and to infer whether + // items the list itself are spread out. + if ( + events[index][1].type === 'listOrdered' || + events[index][1].type === 'listUnordered' + ) { + if (events[index][0] === 'enter') { + listStack.push(index) + } else { + const tail = listStack.pop() + index = prepareList(events, tail, index) + } + } + } + index = -1 + while (++index < events.length) { + const handler = config[events[index][0]] + if (lib_own.call(handler, events[index][1].type)) { + handler[events[index][1].type].call( + Object.assign( + { + sliceSerialize: events[index][2].sliceSerialize + }, + context + ), + events[index][1] + ) + } + } + + // Handle tokens still being open. + if (context.tokenStack.length > 0) { + const tail = context.tokenStack[context.tokenStack.length - 1] + const handler = tail[1] || defaultOnError + handler.call(context, undefined, tail[0]) + } + + // Figure out `root` position. + tree.position = { + start: lib_point( + events.length > 0 + ? events[0][1].start + : { + line: 1, + column: 1, + offset: 0 + } + ), + end: lib_point( + events.length > 0 + ? events[events.length - 2][1].end + : { + line: 1, + column: 1, + offset: 0 + } + ) + } + + // Call transforms. + index = -1 + while (++index < config.transforms.length) { + tree = config.transforms[index](tree) || tree + } + return tree + } + + /** + * @param {Array<Event>} events + * @param {number} start + * @param {number} length + * @returns {number} + */ + function prepareList(events, start, length) { + let index = start - 1 + let containerBalance = -1 + let listSpread = false + /** @type {Token | undefined} */ + let listItem + /** @type {number | undefined} */ + let lineIndex + /** @type {number | undefined} */ + let firstBlankLineIndex + /** @type {boolean | undefined} */ + let atMarker + while (++index <= length) { + const event = events[index] + if ( + event[1].type === 'listUnordered' || + event[1].type === 'listOrdered' || + event[1].type === 'blockQuote' + ) { + if (event[0] === 'enter') { + containerBalance++ + } else { + containerBalance-- + } + atMarker = undefined + } else if (event[1].type === 'lineEndingBlank') { + if (event[0] === 'enter') { + if ( + listItem && + !atMarker && + !containerBalance && + !firstBlankLineIndex + ) { + firstBlankLineIndex = index + } + atMarker = undefined + } + } else if ( + event[1].type === 'linePrefix' || + event[1].type === 'listItemValue' || + event[1].type === 'listItemMarker' || + event[1].type === 'listItemPrefix' || + event[1].type === 'listItemPrefixWhitespace' + ) { + // Empty. + } else { + atMarker = undefined + } + if ( + (!containerBalance && + event[0] === 'enter' && + event[1].type === 'listItemPrefix') || + (containerBalance === -1 && + event[0] === 'exit' && + (event[1].type === 'listUnordered' || + event[1].type === 'listOrdered')) + ) { + if (listItem) { + let tailIndex = index + lineIndex = undefined + while (tailIndex--) { + const tailEvent = events[tailIndex] + if ( + tailEvent[1].type === 'lineEnding' || + tailEvent[1].type === 'lineEndingBlank' + ) { + if (tailEvent[0] === 'exit') continue + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + listSpread = true + } + tailEvent[1].type = 'lineEnding' + lineIndex = tailIndex + } else if ( + tailEvent[1].type === 'linePrefix' || + tailEvent[1].type === 'blockQuotePrefix' || + tailEvent[1].type === 'blockQuotePrefixWhitespace' || + tailEvent[1].type === 'blockQuoteMarker' || + tailEvent[1].type === 'listItemIndent' + ) { + // Empty + } else { + break + } + } + if ( + firstBlankLineIndex && + (!lineIndex || firstBlankLineIndex < lineIndex) + ) { + listItem._spread = true + } + + // Fix position. + listItem.end = Object.assign( + {}, + lineIndex ? events[lineIndex][1].start : event[1].end + ) + events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) + index++ + length++ + } + + // Create a new list item. + if (event[1].type === 'listItemPrefix') { + listItem = { + type: 'listItem', + _spread: false, + start: Object.assign({}, event[1].start), + // @ts-expect-error: we’ll add `end` in a second. + end: undefined + } + // @ts-expect-error: `listItem` is most definitely defined, TS... + events.splice(index, 0, ['enter', listItem, event[2]]) + index++ + length++ + firstBlankLineIndex = undefined + atMarker = true + } + } + } + events[start][1]._spread = listSpread + return length + } + + /** + * Set data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @param {CompileData[Key]} [value] + * New value. + * @returns {void} + * Nothing. + */ + function setData(key, value) { + data[key] = value + } + + /** + * Get data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @returns {CompileData[Key]} + * Value. + */ + function getData(key) { + return data[key] + } + + /** + * Create an opener handle. + * + * @param {(token: Token) => Node} create + * Create a node. + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function opener(create, and) { + return open + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function open(token) { + enter.call(this, create(token), token) + if (and) and.call(this, token) + } + } + + /** + * @this {CompileContext} + * @returns {void} + */ + function buffer() { + this.stack.push({ + type: 'fragment', + children: [] + }) + } + + /** + * @template {Node} Kind + * Node type. + * @this {CompileContext} + * Context. + * @param {Kind} node + * Node to enter. + * @param {Token} token + * Corresponding token. + * @param {OnEnterError | undefined} [errorHandler] + * Handle the case where this token is open, but it is closed by something else. + * @returns {Kind} + * The given node. + */ + function enter(node, token, errorHandler) { + const parent = this.stack[this.stack.length - 1] + // @ts-expect-error: Assume `Node` can exist as a child of `parent`. + parent.children.push(node) + this.stack.push(node) + this.tokenStack.push([token, errorHandler]) + // @ts-expect-error: `end` will be patched later. + node.position = { + start: lib_point(token.start) + } + return node + } + + /** + * Create a closer handle. + * + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function closer(and) { + return close + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function close(token) { + if (and) and.call(this, token) + exit.call(this, token) + } + } + + /** + * @this {CompileContext} + * Context. + * @param {Token} token + * Corresponding token. + * @param {OnExitError | undefined} [onExitError] + * Handle the case where another token is open. + * @returns {Node} + * The closed node. + */ + function exit(token, onExitError) { + const node = this.stack.pop() + const open = this.tokenStack.pop() + if (!open) { + throw new Error( + 'Cannot close `' + + token.type + + '` (' + + stringifyPosition({ + start: token.start, + end: token.end + }) + + '): it’s not open' + ) + } else if (open[0].type !== token.type) { + if (onExitError) { + onExitError.call(this, token, open[0]) + } else { + const handler = open[1] || defaultOnError + handler.call(this, token, open[0]) + } + } + node.position.end = lib_point(token.end) + return node + } + + /** + * @this {CompileContext} + * @returns {string} + */ + function resume() { + return lib_toString(this.stack.pop()) + } + + // + // Handlers. + // + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistordered() { + setData('expectingFirstListItemValue', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistitemvalue(token) { + if (getData('expectingFirstListItemValue')) { + const ancestor = this.stack[this.stack.length - 2] + ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) + setData('expectingFirstListItemValue') + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfenceinfo() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.lang = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfencemeta() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.meta = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfence() { + // Exit if this is the closing fence. + if (getData('flowCodeInside')) return + this.buffer() + setData('flowCodeInside', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefenced() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') + setData('flowCodeInside') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodeindented() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/(\r?\n|\r)$/g, '') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitionlabelstring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + node.label = label + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiontitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiondestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitatxheadingsequence(token) { + const node = this.stack[this.stack.length - 1] + if (!node.depth) { + const depth = this.sliceSerialize(token).length + node.depth = depth + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadingtext() { + setData('setextHeadingSlurpLineEnding', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadinglinesequence(token) { + const node = this.stack[this.stack.length - 1] + node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheading() { + setData('setextHeadingSlurpLineEnding') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterdata(token) { + const node = this.stack[this.stack.length - 1] + let tail = node.children[node.children.length - 1] + if (!tail || tail.type !== 'text') { + // Add a new text node. + tail = text() + // @ts-expect-error: we’ll add `end` later. + tail.position = { + start: lib_point(token.start) + } + // @ts-expect-error: Assume `parent` accepts `text`. + node.children.push(tail) + } + this.stack.push(tail) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitdata(token) { + const tail = this.stack.pop() + tail.value += this.sliceSerialize(token) + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlineending(token) { + const context = this.stack[this.stack.length - 1] + // If we’re at a hard break, include the line ending in there. + if (getData('atHardBreak')) { + const tail = context.children[context.children.length - 1] + tail.position.end = lib_point(token.end) + setData('atHardBreak') + return + } + if ( + !getData('setextHeadingSlurpLineEnding') && + config.canContainEols.includes(context.type) + ) { + onenterdata.call(this, token) + onexitdata.call(this, token) + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithardbreak() { + setData('atHardBreak', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmlflow() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmltext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcodetext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlink() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitimage() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabeltext(token) { + const string = this.sliceSerialize(token) + const ancestor = this.stack[this.stack.length - 2] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + ancestor.label = decodeString(string) + // @ts-expect-error: same as above. + ancestor.identifier = normalizeIdentifier(string).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabel() { + const fragment = this.stack[this.stack.length - 1] + const value = this.resume() + const node = this.stack[this.stack.length - 1] + // Assume a reference. + setData('inReference', true) + if (node.type === 'link') { + /** @type {Array<StaticPhrasingContent>} */ + // @ts-expect-error: Assume static phrasing content. + const children = fragment.children + node.children = children + } else { + node.alt = value + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcedestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcetitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresource() { + setData('inReference') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterreference() { + setData('referenceType', 'collapsed') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitreferencestring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + node.label = label + // @ts-expect-error: same as above. + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + setData('referenceType', 'full') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcharacterreferencemarker(token) { + setData('characterReferenceType', token.type) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcharacterreferencevalue(token) { + const data = this.sliceSerialize(token) + const type = getData('characterReferenceType') + /** @type {string} */ + let value + if (type) { + value = decodeNumericCharacterReference( + data, + type === 'characterReferenceMarkerNumeric' ? 10 : 16 + ) + setData('characterReferenceType') + } else { + const result = decodeNamedCharacterReference(data) + value = result + } + const tail = this.stack.pop() + tail.value += value + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkprotocol(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = this.sliceSerialize(token) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkemail(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = 'mailto:' + this.sliceSerialize(token) + } + + // + // Creaters. + // + + /** @returns {Blockquote} */ + function blockQuote() { + return { + type: 'blockquote', + children: [] + } + } + + /** @returns {Code} */ + function codeFlow() { + return { + type: 'code', + lang: null, + meta: null, + value: '' + } + } + + /** @returns {InlineCode} */ + function codeText() { + return { + type: 'inlineCode', + value: '' + } + } + + /** @returns {Definition} */ + function definition() { + return { + type: 'definition', + identifier: '', + label: null, + title: null, + url: '' + } + } + + /** @returns {Emphasis} */ + function emphasis() { + return { + type: 'emphasis', + children: [] + } + } + + /** @returns {Heading} */ + function heading() { + // @ts-expect-error `depth` will be set later. + return { + type: 'heading', + depth: undefined, + children: [] + } + } + + /** @returns {Break} */ + function hardBreak() { + return { + type: 'break' + } + } + + /** @returns {HTML} */ + function html() { + return { + type: 'html', + value: '' + } + } + + /** @returns {Image} */ + function image() { + return { + type: 'image', + title: null, + url: '', + alt: null + } + } + + /** @returns {Link} */ + function link() { + return { + type: 'link', + title: null, + url: '', + children: [] + } + } + + /** + * @param {Token} token + * @returns {List} + */ + function list(token) { + return { + type: 'list', + ordered: token.type === 'listOrdered', + start: null, + spread: token._spread, + children: [] + } + } + + /** + * @param {Token} token + * @returns {ListItem} + */ + function listItem(token) { + return { + type: 'listItem', + spread: token._spread, + checked: null, + children: [] + } + } + + /** @returns {Paragraph} */ + function paragraph() { + return { + type: 'paragraph', + children: [] + } + } + + /** @returns {Strong} */ + function strong() { + return { + type: 'strong', + children: [] + } + } + + /** @returns {Text} */ + function text() { + return { + type: 'text', + value: '' + } + } + + /** @returns {ThematicBreak} */ + function thematicBreak() { + return { + type: 'thematicBreak' + } + } +} + +/** + * Copy a point-like value. + * + * @param {Point} d + * Point-like value. + * @returns {Point} + * unist point. + */ +function lib_point(d) { + return { + line: d.line, + column: d.column, + offset: d.offset + } +} + +/** + * @param {Config} combined + * @param {Array<Extension | Array<Extension>>} extensions + * @returns {void} + */ +function configure(combined, extensions) { + let index = -1 + while (++index < extensions.length) { + const value = extensions[index] + if (Array.isArray(value)) { + configure(combined, value) + } else { + extension(combined, value) + } + } +} + +/** + * @param {Config} combined + * @param {Extension} extension + * @returns {void} + */ +function extension(combined, extension) { + /** @type {keyof Extension} */ + let key + for (key in extension) { + if (lib_own.call(extension, key)) { + if (key === 'canContainEols') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'transforms') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'enter' || key === 'exit') { + const right = extension[key] + if (right) { + Object.assign(combined[key], right) + } + } + } + } +} + +/** @type {OnEnterError} */ +function defaultOnError(left, right) { + if (left) { + throw new Error( + 'Cannot close `' + + left.type + + '` (' + + stringifyPosition({ + start: left.start, + end: left.end + }) + + '): a different token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is open' + ) + } else { + throw new Error( + 'Cannot close document, a token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is still open' + ) + } +} + +// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js +var esm = __webpack_require__(513); +;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-6b48ae7d.js + + + +function preprocessMarkdown(markdown) { + const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); + const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); + return withoutExtraSpaces; +} +function markdownToLines(markdown) { + const preprocessedMarkdown = preprocessMarkdown(markdown); + const { children } = fromMarkdown(preprocessedMarkdown); + const lines = [[]]; + let currentLine = 0; + function processNode(node, parentType = "normal") { + if (node.type === "text") { + const textLines = node.value.split("\n"); + textLines.forEach((textLine, index) => { + if (index !== 0) { + currentLine++; + lines.push([]); + } + textLine.split(" ").forEach((word) => { + if (word) { + lines[currentLine].push({ content: word, type: parentType }); + } + }); + }); + } else if (node.type === "strong" || node.type === "emphasis") { + node.children.forEach((contentNode) => { + processNode(contentNode, node.type); + }); + } + } + children.forEach((treeNode) => { + if (treeNode.type === "paragraph") { + treeNode.children.forEach((contentNode) => { + processNode(contentNode); + }); + } + }); + return lines; +} +function markdownToHTML(markdown) { + const { children } = fromMarkdown(markdown); + function output(node) { + if (node.type === "text") { + return node.value.replace(/\n/g, "<br/>"); + } else if (node.type === "strong") { + return `<strong>${node.children.map(output).join("")}</strong>`; + } else if (node.type === "emphasis") { + return `<em>${node.children.map(output).join("")}</em>`; + } else if (node.type === "paragraph") { + return `<p>${node.children.map(output).join("")}</p>`; + } + return `Unsupported markdown: ${node.type}`; + } + return children.map(output).join(""); +} +function splitTextToChars(text) { + if (Intl.Segmenter) { + return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); + } + return [...text]; +} +function splitWordToFitWidth(checkFit, word) { + const characters = splitTextToChars(word.content); + return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); +} +function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { + if (remainingChars.length === 0) { + return [ + { content: usedChars.join(""), type }, + { content: "", type } + ]; + } + const [nextChar, ...rest] = remainingChars; + const newWord = [...usedChars, nextChar]; + if (checkFit([{ content: newWord.join(""), type }])) { + return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); + } + if (usedChars.length === 0 && nextChar) { + usedChars.push(nextChar); + remainingChars.shift(); + } + return [ + { content: usedChars.join(""), type }, + { content: remainingChars.join(""), type } + ]; +} +function splitLineToFitWidth(line, checkFit) { + if (line.some(({ content }) => content.includes("\n"))) { + throw new Error("splitLineToFitWidth does not support newlines in the line"); + } + return splitLineToFitWidthRecursion(line, checkFit); +} +function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { + if (words.length === 0) { + if (newLine.length > 0) { + lines.push(newLine); + } + return lines.length > 0 ? lines : []; + } + let joiner = ""; + if (words[0].content === " ") { + joiner = " "; + words.shift(); + } + const nextWord = words.shift() ?? { content: " ", type: "normal" }; + const lineWithNextWord = [...newLine]; + if (joiner !== "") { + lineWithNextWord.push({ content: joiner, type: "normal" }); + } + lineWithNextWord.push(nextWord); + if (checkFit(lineWithNextWord)) { + return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); + } + if (newLine.length > 0) { + lines.push(newLine); + words.unshift(nextWord); + } else if (nextWord.content) { + const [line, rest] = splitWordToFitWidth(checkFit, nextWord); + lines.push([line]); + if (rest.content) { + words.unshift(rest); + } + } + return splitLineToFitWidthRecursion(words, checkFit, lines); +} +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlSpan(element, node, width, classes, addBackground = false) { + const fo = element.append("foreignObject"); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + ` + <span class="${labelClass} ${classes}" ` + (node.labelStyle ? 'style="' + node.labelStyle + '"' : "") + ">" + label + "</span>" + ); + applyStyle(div, node.labelStyle); + div.style("display", "table-cell"); + div.style("white-space", "nowrap"); + div.style("max-width", width + "px"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + if (addBackground) { + div.attr("class", "labelBkg"); + } + let bbox = div.node().getBoundingClientRect(); + if (bbox.width === width) { + div.style("display", "table"); + div.style("white-space", "break-spaces"); + div.style("width", width + "px"); + bbox = div.node().getBoundingClientRect(); + } + fo.style("width", bbox.width); + fo.style("height", bbox.height); + return fo.node(); +} +function createTspan(textElement, lineIndex, lineHeight) { + return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); +} +function computeWidthOfText(parentNode, lineHeight, line) { + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, line); + const textLength = testSpan.node().getComputedTextLength(); + testElement.remove(); + return textLength; +} +function computeDimensionOfText(parentNode, lineHeight, text) { + var _a; + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); + const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); + if (textDimension) { + testElement.remove(); + } + return textDimension; +} +function createFormattedText(width, g, structuredText, addBackground = false) { + const lineHeight = 1.1; + const labelGroup = g.append("g"); + const bkg = labelGroup.insert("rect").attr("class", "background"); + const textElement = labelGroup.append("text").attr("y", "-10.1"); + let lineIndex = 0; + for (const line of structuredText) { + const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; + const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); + for (const preparedLine of linesUnderWidth) { + const tspan = createTspan(textElement, lineIndex, lineHeight); + updateTextContentAndStyles(tspan, preparedLine); + lineIndex++; + } + } + if (addBackground) { + const bbox = textElement.node().getBBox(); + const padding = 2; + bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); + return labelGroup.node(); + } else { + return textElement.node(); + } +} +function updateTextContentAndStyles(tspan, wrappedLine) { + tspan.text(""); + wrappedLine.forEach((word, index) => { + const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); + if (index === 0) { + innerTspan.text(word.content); + } else { + innerTspan.text(" " + word.content); + } + }); +} +const createText = (el, text = "", { + style = "", + isTitle = false, + classes = "", + useHtmlLabels = true, + isNode = true, + width = 200, + addSvgBackground = false +} = {}) => { + mermaid_f47111a7.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); + if (useHtmlLabels) { + const htmlText = markdownToHTML(text); + const node = { + isNode, + label: (0,mermaid_f47111a7.M)(htmlText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `<i class='${s.replace(":", " ")}'></i>` + ), + labelStyle: style.replace("fill:", "color:") + }; + const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); + return vertexNode; + } else { + const structuredText = markdownToLines(text); + const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); + return svgLabel; + } +}; + + + +/***/ }), + +/***/ 8747: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ a: () => (/* binding */ insertMarkers$1), +/* harmony export */ b: () => (/* binding */ clear$1), +/* harmony export */ c: () => (/* binding */ createLabel$1), +/* harmony export */ d: () => (/* binding */ clear), +/* harmony export */ e: () => (/* binding */ insertNode), +/* harmony export */ f: () => (/* binding */ insertEdgeLabel), +/* harmony export */ g: () => (/* binding */ getSubGraphTitleMargins), +/* harmony export */ h: () => (/* binding */ insertEdge), +/* harmony export */ i: () => (/* binding */ intersectRect$1), +/* harmony export */ j: () => (/* binding */ positionEdgeLabel), +/* harmony export */ k: () => (/* binding */ getLineFunctionsWithOffset), +/* harmony export */ l: () => (/* binding */ labelHelper), +/* harmony export */ m: () => (/* binding */ addEdgeMarkers), +/* harmony export */ p: () => (/* binding */ positionNode), +/* harmony export */ s: () => (/* binding */ setNodeElem), +/* harmony export */ u: () => (/* binding */ updateNodeBounds) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3791); + + + +const insertMarkers = (elem, markerArray, type, id) => { + markerArray.forEach((markerName) => { + markers[markerName](elem, type, id); + }); +}; +const extension = (elem, type, id) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).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"); +}; +const composition = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).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"); +}; +const aggregation = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).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"); +}; +const dependency = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).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"); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).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"); +}; +const lollipop = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).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); + elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).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); +}; +const point = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).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"); +}; +const circle$1 = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).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"); +}; +const cross = (elem, type, id) => { + elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).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"); + elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).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"); +}; +const barb = (elem, type, id) => { + elem.append("defs").append("marker").attr("id", id + "_" + type + "-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"); +}; +const markers = { + extension, + composition, + aggregation, + dependency, + lollipop, + point, + circle: circle$1, + cross, + barb +}; +const insertMarkers$1 = insertMarkers; +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlLabel(node) { + const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + '<span class="' + labelClass + '" ' + (node.labelStyle ? 'style="' + node.labelStyle + '"' : "") + ">" + label + "</span>" + ); + applyStyle(div, node.labelStyle); + div.style("display", "inline-block"); + div.style("white-space", "nowrap"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + return fo.node(); +} +const createLabel = (_vertexText, style, isTitle, isNode) => { + let vertexText = _vertexText || ""; + if (typeof vertexText === "object") { + vertexText = vertexText[0]; + } + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + vertexText = vertexText.replace(/\\n|\n/g, "<br />"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("vertexText" + vertexText); + const node = { + isNode, + label: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(vertexText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `<i class='${s.replace(":", " ")}'></i>` + ), + labelStyle: style.replace("fill:", "color:") + }; + let vertexNode = addHtmlLabel(node); + return vertexNode; + } else { + const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", style.replace("color:", "fill:")); + let rows = []; + if (typeof vertexText === "string") { + rows = vertexText.split(/\\n|\n|<br\s*\/?>/gi); + } else if (Array.isArray(vertexText)) { + rows = vertexText; + } else { + rows = []; + } + for (const row of rows) { + const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "0"); + if (isTitle) { + tspan.setAttribute("class", "title-row"); + } else { + tspan.setAttribute("class", "row"); + } + tspan.textContent = row.trim(); + svgLabel.appendChild(tspan); + } + return svgLabel; + } +}; +const createLabel$1 = createLabel; +const labelHelper = async (parent, node, _classes, isNode) => { + let classes; + const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); + if (!_classes) { + classes = "node default"; + } else { + classes = _classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle); + let labelText; + if (node.labelText === void 0) { + labelText = ""; + } else { + labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0]; + } + const textNode = label.node(); + let text; + if (node.labelType === "markdown") { + text = (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), { + useHtmlLabels, + width: node.width || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth, + classes: "markdown-node-label" + }); + } else { + text = textNode.appendChild( + createLabel$1( + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.M)(labelText), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()), + node.labelStyle, + false, + isNode + ) + ); + } + let bbox = text.getBBox(); + const halfPadding = node.padding / 2; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); + const images = div.getElementsByTagName("img"); + if (images) { + const noImgText = labelText.replace(/<img[^>]*>/g, "").trim() === ""; + await Promise.all( + [...images].map( + (img) => new Promise((res) => { + function setupImage() { + img.style.display = "flex"; + img.style.flexDirection = "column"; + if (noImgText) { + const bodyFontSize = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize; + const enlargingFactor = 5; + const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px"; + img.style.minWidth = width; + img.style.maxWidth = width; + } else { + img.style.width = "100%"; + } + res(img); + } + setTimeout(() => { + if (img.complete) { + setupImage(); + } + }); + img.addEventListener("error", setupImage); + img.addEventListener("load", setupImage); + }) + ) + ); + } + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (useHtmlLabels) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } else { + label.attr("transform", "translate(0, " + -bbox.height / 2 + ")"); + } + if (node.centerLabel) { + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + } + label.insert("rect", ":first-child"); + return { shapeSvg, bbox, halfPadding, label }; +}; +const updateNodeBounds = (node, element) => { + const bbox = element.node().getBBox(); + node.width = bbox.width; + node.height = bbox.height; +}; +function insertPolygonShape(parent, w, h, points) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); +} +function intersectNode(node, point2) { + return node.intersect(point2); +} +function intersectEllipse(node, rx, ry, point2) { + var cx = node.x; + var cy = node.y; + var px = cx - point2.x; + var py = cy - point2.y; + var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px); + var dx = Math.abs(rx * ry * px / det); + if (point2.x < cx) { + dx = -dx; + } + var dy = Math.abs(rx * ry * py / det); + if (point2.y < cy) { + dy = -dy; + } + return { x: cx + dx, y: cy + dy }; +} +function intersectCircle(node, rx, point2) { + return intersectEllipse(node, rx, rx, point2); +} +function intersectLine(p1, p2, q1, q2) { + var a1, a2, b1, b2, c1, c2; + var r1, r2, r3, r4; + var denom, offset, num; + var x, y; + a1 = p2.y - p1.y; + b1 = p1.x - p2.x; + c1 = p2.x * p1.y - p1.x * p2.y; + r3 = a1 * q1.x + b1 * q1.y + c1; + r4 = a1 * q2.x + b1 * q2.y + c1; + if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) { + return; + } + a2 = q2.y - q1.y; + b2 = q1.x - q2.x; + c2 = q2.x * q1.y - q1.x * q2.y; + r1 = a2 * p1.x + b2 * p1.y + c2; + r2 = a2 * p2.x + b2 * p2.y + c2; + if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) { + return; + } + denom = a1 * b2 - a2 * b1; + if (denom === 0) { + return; + } + offset = Math.abs(denom / 2); + num = b1 * c2 - b2 * c1; + x = num < 0 ? (num - offset) / denom : (num + offset) / denom; + num = a2 * c1 - a1 * c2; + y = num < 0 ? (num - offset) / denom : (num + offset) / denom; + return { x, y }; +} +function sameSign(r1, r2) { + return r1 * r2 > 0; +} +function intersectPolygon(node, polyPoints, point2) { + var x1 = node.x; + var y1 = node.y; + var intersections = []; + var minX = Number.POSITIVE_INFINITY; + var minY = Number.POSITIVE_INFINITY; + if (typeof polyPoints.forEach === "function") { + polyPoints.forEach(function(entry) { + minX = Math.min(minX, entry.x); + minY = Math.min(minY, entry.y); + }); + } else { + minX = Math.min(minX, polyPoints.x); + minY = Math.min(minY, polyPoints.y); + } + var left = x1 - node.width / 2 - minX; + var top = y1 - node.height / 2 - minY; + for (var i = 0; i < polyPoints.length; i++) { + var p1 = polyPoints[i]; + var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; + var intersect2 = intersectLine( + node, + point2, + { x: left + p1.x, y: top + p1.y }, + { x: left + p2.x, y: top + p2.y } + ); + if (intersect2) { + intersections.push(intersect2); + } + } + if (!intersections.length) { + return node; + } + if (intersections.length > 1) { + intersections.sort(function(p, q) { + var pdx = p.x - point2.x; + var pdy = p.y - point2.y; + var distp = Math.sqrt(pdx * pdx + pdy * pdy); + var qdx = q.x - point2.x; + var qdy = q.y - point2.y; + var distq = Math.sqrt(qdx * qdx + qdy * qdy); + return distp < distq ? -1 : distp === distq ? 0 : 1; + }); + } + return intersections[0]; +} +const intersectRect = (node, point2) => { + var x = node.x; + var y = node.y; + var dx = point2.x - x; + var dy = point2.y - y; + var w = node.width / 2; + var h = node.height / 2; + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + if (dy < 0) { + h = -h; + } + sx = dy === 0 ? 0 : h * dx / dy; + sy = h; + } else { + if (dx < 0) { + w = -w; + } + sx = w; + sy = dx === 0 ? 0 : w * dy / dx; + } + return { x: x + sx, y: y + sy }; +}; +const intersectRect$1 = intersectRect; +const intersect = { + node: intersectNode, + circle: intersectCircle, + ellipse: intersectEllipse, + polygon: intersectPolygon, + rect: intersectRect$1 +}; +const note = async (parent, node) => { + const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels; + if (!useHtmlLabels) { + node.centerLabel = true; + } + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes); + const rect2 = shapeSvg.insert("rect", ":first-child"); + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const note$1 = note; +const expandAndDeduplicateDirections = (directions) => { + const uniqueDirections = /* @__PURE__ */ new Set(); + for (const direction of directions) { + switch (direction) { + case "x": + uniqueDirections.add("right"); + uniqueDirections.add("left"); + break; + case "y": + uniqueDirections.add("up"); + uniqueDirections.add("down"); + break; + default: + uniqueDirections.add(direction); + break; + } + } + return uniqueDirections; +}; +const getArrowPoints = (duplicatedDirections, bbox, node) => { + const directions = expandAndDeduplicateDirections(duplicatedDirections); + const f = 2; + const height = bbox.height + 2 * node.padding; + const midpoint = height / f; + const width = bbox.width + 2 * midpoint + node.padding; + const padding = node.padding / 2; + if (directions.has("right") && directions.has("left") && directions.has("up") && directions.has("down")) { + return [ + // Bottom + { x: 0, y: 0 }, + { x: midpoint, y: 0 }, + { x: width / 2, y: 2 * padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: 0 }, + // Right + { x: width, y: -height / 3 }, + { x: width + 2 * padding, y: -height / 2 }, + { x: width, y: -2 * height / 3 }, + { x: width, y: -height }, + // Top + { x: width - midpoint, y: -height }, + { x: width / 2, y: -height - 2 * padding }, + { x: midpoint, y: -height }, + // Left + { x: 0, y: -height }, + { x: 0, y: -2 * height / 3 }, + { x: -2 * padding, y: -height / 2 }, + { x: 0, y: -height / 3 } + ]; + } + if (directions.has("right") && directions.has("left") && directions.has("up")) { + return [ + { x: midpoint, y: 0 }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("right") && directions.has("left") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: midpoint, y: -height }, + { x: width - midpoint, y: -height }, + { x: width, y: 0 } + ]; + } + if (directions.has("right") && directions.has("up") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: width, y: -midpoint }, + { x: width, y: -height + midpoint }, + { x: 0, y: -height } + ]; + } + if (directions.has("left") && directions.has("up") && directions.has("down")) { + return [ + { x: width, y: 0 }, + { x: 0, y: -midpoint }, + { x: 0, y: -height + midpoint }, + { x: width, y: -height } + ]; + } + if (directions.has("right") && directions.has("left")) { + return [ + { x: midpoint, y: 0 }, + { x: midpoint, y: -padding }, + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: width - midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("up") && directions.has("down")) { + return [ + // Bottom center + { x: width / 2, y: 0 }, + // Left pont of bottom arrow + { x: 0, y: -padding }, + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: 0, y: -height + padding }, + // Top of arrow + { x: width / 2, y: -height }, + { x: width, y: -height + padding }, + // Top of right vertical bar + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding }, + { x: width, y: -padding } + ]; + } + if (directions.has("right") && directions.has("up")) { + return [ + { x: 0, y: 0 }, + { x: width, y: -midpoint }, + { x: 0, y: -height } + ]; + } + if (directions.has("right") && directions.has("down")) { + return [ + { x: 0, y: 0 }, + { x: width, y: 0 }, + { x: 0, y: -height } + ]; + } + if (directions.has("left") && directions.has("up")) { + return [ + { x: width, y: 0 }, + { x: 0, y: -midpoint }, + { x: width, y: -height } + ]; + } + if (directions.has("left") && directions.has("down")) { + return [ + { x: width, y: 0 }, + { x: 0, y: 0 }, + { x: width, y: -height } + ]; + } + if (directions.has("right")) { + return [ + { x: midpoint, y: -padding }, + { x: midpoint, y: -padding }, + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: 0 }, + { x: width, y: -height / 2 }, + { x: width - midpoint, y: -height }, + { x: width - midpoint, y: -height + padding }, + // top left corner of arrow + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding } + ]; + } + if (directions.has("left")) { + return [ + { x: midpoint, y: 0 }, + { x: midpoint, y: -padding }, + // Two points, the right corners + { x: width - midpoint, y: -padding }, + { x: width - midpoint, y: -height + padding }, + { x: midpoint, y: -height + padding }, + { x: midpoint, y: -height }, + { x: 0, y: -height / 2 } + ]; + } + if (directions.has("up")) { + return [ + // Bottom center + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: 0, y: -height + padding }, + // Top of arrow + { x: width / 2, y: -height }, + { x: width, y: -height + padding }, + // Top of right vertical bar + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding } + ]; + } + if (directions.has("down")) { + return [ + // Bottom center + { x: width / 2, y: 0 }, + // Left pont of bottom arrow + { x: 0, y: -padding }, + { x: midpoint, y: -padding }, + // Left top over vertical section + { x: midpoint, y: -height + padding }, + { x: width - midpoint, y: -height + padding }, + { x: width - midpoint, y: -padding }, + { x: width, y: -padding } + ]; + } + return [{ x: 0, y: 0 }]; +}; +const formatClass = (str) => { + if (str) { + return " " + str; + } + return ""; +}; +const getClassesFromNode = (node, otherClasses) => { + return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass( + node.class + )}`; +}; +const question = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const s = w + h; + const points = [ + { x: s / 2, y: 0 }, + { x: s, y: -s / 2 }, + { x: s / 2, y: -s }, + { x: 0, y: -s / 2 } + ]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)"); + const questionElem = insertPolygonShape(shapeSvg, s, s, points); + questionElem.attr("style", node.style); + updateNodeBounds(node, questionElem); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called"); + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const choice = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const s = 28; + const points = [ + { x: 0, y: s / 2 }, + { x: s / 2, y: 0 }, + { x: 0, y: -s / 2 }, + { x: -s / 2, y: 0 } + ]; + const choice2 = shapeSvg.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ); + choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); + node.width = 28; + node.height = 28; + node.intersect = function(point2) { + return intersect.circle(node, 14, point2); + }; + return shapeSvg; +}; +const hexagon = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const f = 4; + const h = bbox.height + node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + const hex = insertPolygonShape(shapeSvg, w, h, points); + hex.attr("style", node.style); + updateNodeBounds(node, hex); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const block_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true); + const f = 2; + const h = bbox.height + 2 * node.padding; + const m = h / f; + const w = bbox.width + 2 * m + node.padding; + const points = getArrowPoints(node.directions, bbox, node); + const blockArrow = insertPolygonShape(shapeSvg, w, h, points); + blockArrow.attr("style", node.style); + updateNodeBounds(node, blockArrow); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_left_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -h / 2, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: -h / 2, y: -h }, + { x: 0, y: -h / 2 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + node.width = w + h; + node.height = h; + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_right = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const lean_left = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 2 * h / 6, y: 0 }, + { x: w + h / 6, y: 0 }, + { x: w - 2 * h / 6, y: -h }, + { x: -h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: -2 * h / 6, y: 0 }, + { x: w + 2 * h / 6, y: 0 }, + { x: w - h / 6, y: -h }, + { x: h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const inv_trapezoid = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: h / 6, y: 0 }, + { x: w - h / 6, y: 0 }, + { x: w + 2 * h / 6, y: -h }, + { x: -2 * h / 6, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const rect_right_inv_arrow = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w + h / 2, y: 0 }, + { x: w, y: -h / 2 }, + { x: w + h / 2, y: -h }, + { x: 0, y: -h } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const cylinder = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const rx = w / 2; + const ry = rx / (2.5 + w / 50); + const h = bbox.height + ry + node.padding; + const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h; + const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")"); + updateNodeBounds(node, el); + node.intersect = function(point2) { + const pos = intersect.rect(node, point2); + const x = pos.x - node.x; + if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) { + let y = ry * ry * (1 - x * x / (rx * rx)); + if (y != 0) { + y = Math.sqrt(y); + } + y = ry - y; + if (point2.y - node.y > 0) { + y = -y; + } + pos.y += y; + } + return pos; + }; + return shapeSvg; +}; +const rect = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes + " " + node.class, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = node.positioned ? node.width : bbox.width + node.padding; + const totalHeight = node.positioned ? node.height : bbox.height + node.padding; + const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; + const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; + rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const composite = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + "node " + node.classes, + true + ); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = node.positioned ? node.width : bbox.width + node.padding; + const totalHeight = node.positioned ? node.height : bbox.height + node.padding; + const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding; + const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding; + rect2.attr("class", "basic cluster composite label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", x).attr("y", y).attr("width", totalWidth).attr("height", totalHeight); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const labelRect = async (parent, node) => { + const { shapeSvg } = await labelHelper(parent, node, "label", true); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const totalWidth = 0; + const totalHeight = 0; + rect2.attr("width", totalWidth).attr("height", totalHeight); + shapeSvg.attr("class", "label edgeLabel"); + if (node.props) { + const propKeys = new Set(Object.keys(node.props)); + if (node.props.borders) { + applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight); + propKeys.delete("borders"); + } + propKeys.forEach((propKey) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`); + }); + } + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) { + const strokeDashArray = []; + const addBorder = (length) => { + strokeDashArray.push(length, 0); + }; + const skipBorder = (length) => { + strokeDashArray.push(0, length); + }; + if (borders.includes("t")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("r")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + if (borders.includes("b")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border"); + addBorder(totalWidth); + } else { + skipBorder(totalWidth); + } + if (borders.includes("l")) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border"); + addBorder(totalHeight); + } else { + skipBorder(totalHeight); + } + rect2.attr("stroke-dasharray", strokeDashArray.join(" ")); +} +const rectWithTitle = (parent, node) => { + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const innerLine = shapeSvg.insert("line"); + const label = shapeSvg.insert("g").attr("class", "label"); + const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText; + let title = ""; + if (typeof text2 === "object") { + title = text2[0]; + } else { + title = text2; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object"); + const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true)); + let bbox = { width: 0, height: 0 }; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2); + const textRows = text2.slice(1, text2.length); + let titleBox = text.getBBox(); + const descr = label.node().appendChild( + createLabel$1(textRows.join ? textRows.join("<br/>") : textRows, node.labelStyle, true, true) + ); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = descr.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const halfPadding = node.padding / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(descr).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" + ); + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(text).attr( + "transform", + "translate( " + // (titleBox.width - bbox.width) / 2 + + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)" + ); + bbox = label.node().getBBox(); + label.attr( + "transform", + "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" + ); + rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const stadium = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const h = bbox.height + node.padding; + const w = bbox.width + h / 4 + node.padding; + const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const circle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main"); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding, point2); + }; + return shapeSvg; +}; +const doublecircle = async (parent, node) => { + const { shapeSvg, bbox, halfPadding } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const gap = 5; + const circleGroup = shapeSvg.insert("g", ":first-child"); + const outerCircle = circleGroup.insert("circle"); + const innerCircle = circleGroup.insert("circle"); + circleGroup.attr("class", node.class); + outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2); + innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main"); + updateNodeBounds(node, outerCircle); + node.intersect = function(point2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2); + return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2); + }; + return shapeSvg; +}; +const subroutine = async (parent, node) => { + const { shapeSvg, bbox } = await labelHelper( + parent, + node, + getClassesFromNode(node, void 0), + true + ); + const w = bbox.width + node.padding; + const h = bbox.height + node.padding; + const points = [ + { x: 0, y: 0 }, + { x: w, y: 0 }, + { x: w, y: -h }, + { x: 0, y: -h }, + { x: 0, y: 0 }, + { x: -8, y: 0 }, + { x: w + 8, y: 0 }, + { x: w + 8, y: -h }, + { x: -8, y: -h }, + { x: -8, y: 0 } + ]; + const el = insertPolygonShape(shapeSvg, w, h, points); + el.attr("style", node.style); + updateNodeBounds(node, el); + node.intersect = function(point2) { + return intersect.polygon(node, points, point2); + }; + return shapeSvg; +}; +const start = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const forkJoin = (parent, node, dir) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + let width = 70; + let height = 10; + if (dir === "LR") { + width = 10; + height = 70; + } + const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join"); + updateNodeBounds(node, shape); + node.height = node.height + node.padding / 2; + node.width = node.width + node.padding / 2; + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const end = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id); + const innerCircle = shapeSvg.insert("circle", ":first-child"); + const circle2 = shapeSvg.insert("circle", ":first-child"); + circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14); + innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10); + updateNodeBounds(node, circle2); + node.intersect = function(point2) { + return intersect.circle(node, 7, point2); + }; + return shapeSvg; +}; +const class_box = (parent, node) => { + const halfPadding = node.padding / 2; + const rowPadding = 4; + const lineHeight = 8; + let classes; + if (!node.classes) { + classes = "node default"; + } else { + classes = "node " + node.classes; + } + const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const topLine = shapeSvg.insert("line"); + const bottomLine = shapeSvg.insert("line"); + let maxWidth = 0; + let maxHeight = rowPadding; + const labelContainer = shapeSvg.insert("g").attr("class", "label"); + let verticalPos = 0; + const hasInterface = node.classData.annotations && node.classData.annotations[0]; + const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : ""; + const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true)); + let interfaceBBox = interfaceLabel.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = interfaceLabel.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel); + interfaceBBox = div.getBoundingClientRect(); + dv.attr("width", interfaceBBox.width); + dv.attr("height", interfaceBBox.height); + } + if (node.classData.annotations[0]) { + maxHeight += interfaceBBox.height + rowPadding; + maxWidth += interfaceBBox.width; + } + let classTitleString = node.classData.label; + if (node.classData.type !== void 0 && node.classData.type !== "") { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + classTitleString += "<" + node.classData.type + ">"; + } else { + classTitleString += "<" + node.classData.type + ">"; + } + } + const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true)); + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr("class", "classTitle"); + let classTitleBBox = classTitleLabel.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = classTitleLabel.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel); + classTitleBBox = div.getBoundingClientRect(); + dv.attr("width", classTitleBBox.width); + dv.attr("height", classTitleBBox.height); + } + maxHeight += classTitleBBox.height + rowPadding; + if (classTitleBBox.width > maxWidth) { + maxWidth = classTitleBBox.width; + } + const classAttributes = []; + node.classData.members.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let parsedText = parsedInfo.displayText; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + parsedText = parsedText.replace(/</g, "<").replace(/>/g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + parsedText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classAttributes.push(lbl); + }); + maxHeight += lineHeight; + const classMethods = []; + node.classData.methods.forEach((member) => { + const parsedInfo = member.getDisplayDetails(); + let displayText = parsedInfo.displayText; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) { + displayText = displayText.replace(/</g, "<").replace(/>/g, ">"); + } + const lbl = labelContainer.node().appendChild( + createLabel$1( + displayText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); + let bbox = lbl.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) { + const div = lbl.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + if (bbox.width > maxWidth) { + maxWidth = bbox.width; + } + maxHeight += bbox.height + rowPadding; + classMethods.push(lbl); + }); + maxHeight += lineHeight; + if (hasInterface) { + let diffX2 = (maxWidth - interfaceBBox.width) / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(interfaceLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" + ); + verticalPos = interfaceBBox.height + rowPadding; + } + let diffX = (maxWidth - classTitleBBox.width) / 2; + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(classTitleLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + verticalPos += classTitleBBox.height + rowPadding; + topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classAttributes.forEach((lbl) => { + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + verticalPos += lineHeight; + bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); + verticalPos += lineHeight; + classMethods.forEach((lbl) => { + (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); + const memberBBox = lbl == null ? void 0 : lbl.getBBox(); + verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding; + }); + rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); + updateNodeBounds(node, rect2); + node.intersect = function(point2) { + return intersect.rect(node, point2); + }; + return shapeSvg; +}; +const shapes = { + rhombus: question, + composite, + question, + rect, + labelRect, + rectWithTitle, + choice, + circle, + doublecircle, + stadium, + hexagon, + block_arrow, + rect_left_inv_arrow, + lean_right, + lean_left, + trapezoid, + inv_trapezoid, + rect_right_inv_arrow, + cylinder, + start, + end, + note: note$1, + subroutine, + fork: forkJoin, + join: forkJoin, + class_box +}; +let nodeElems = {}; +const insertNode = async (elem, node, dir) => { + let newEl; + let el; + if (node.link) { + let target; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") { + target = "_top"; + } else if (node.linkTarget) { + target = node.linkTarget || "_blank"; + } + newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target); + el = await shapes[node.shape](newEl, node, dir); + } else { + el = await shapes[node.shape](elem, node, dir); + newEl = el; + } + if (node.tooltip) { + el.attr("title", node.tooltip); + } + if (node.class) { + el.attr("class", "node default " + node.class); + } + newEl.attr("data-node", "true"); + newEl.attr("data-id", node.id); + nodeElems[node.id] = newEl; + if (node.haveCallback) { + nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable"); + } + return newEl; +}; +const setNodeElem = (elem, node) => { + nodeElems[node.id] = elem; +}; +const clear$1 = () => { + nodeElems = {}; +}; +const positionNode = (node) => { + const el = nodeElems[node.id]; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.trace( + "Transforming node", + node.diff, + node, + "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" + ); + const padding = 8; + const diff = node.diff || 0; + if (node.clusterNode) { + el.attr( + "transform", + "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" + ); + } else { + el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); + } + return diff; +}; +const getSubGraphTitleMargins = ({ + flowchart +}) => { + var _a, _b; + const subGraphTitleTopMargin = ((_a = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _a.top) ?? 0; + const subGraphTitleBottomMargin = ((_b = flowchart == null ? void 0 : flowchart.subGraphTitleMargin) == null ? void 0 : _b.bottom) ?? 0; + const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin; + return { + subGraphTitleTopMargin, + subGraphTitleBottomMargin, + subGraphTitleTotalMargin + }; +}; +const markerOffsets = { + aggregation: 18, + extension: 18, + composition: 18, + dependency: 6, + lollipop: 13.5, + arrow_point: 5.3 +}; +function calculateDeltaAndAngle(point1, point2) { + if (point1 === void 0 || point2 === void 0) { + return { angle: 0, deltaX: 0, deltaY: 0 }; + } + point1 = pointTransformer(point1); + point2 = pointTransformer(point2); + const [x1, y1] = [point1.x, point1.y]; + const [x2, y2] = [point2.x, point2.y]; + const deltaX = x2 - x1; + const deltaY = y2 - y1; + return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY }; +} +const pointTransformer = (data) => { + if (Array.isArray(data)) { + return { x: data[0], y: data[1] }; + } + return data; +}; +const getLineFunctionsWithOffset = (edge) => { + return { + x: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaX } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1); + } + return pointTransformer(d).x + offset; + }, + y: function(d, i, data) { + let offset = 0; + if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) { + const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]); + offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) { + const { angle, deltaY } = calculateDeltaAndAngle( + data[data.length - 1], + data[data.length - 2] + ); + offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1); + } + return pointTransformer(d).y + offset; + } + }; +}; +const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => { + if (edge.arrowTypeStart) { + addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType); + } + if (edge.arrowTypeEnd) { + addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType); + } +}; +const arrowTypesMap = { + arrow_cross: "cross", + arrow_point: "point", + arrow_barb: "barb", + arrow_circle: "circle", + aggregation: "aggregation", + extension: "extension", + composition: "composition", + dependency: "dependency", + lollipop: "lollipop" +}; +const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => { + const endMarkerType = arrowTypesMap[arrowType]; + if (!endMarkerType) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`); + return; + } + const suffix = position === "start" ? "Start" : "End"; + svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`); +}; +let edgeLabels = {}; +let terminalLabels = {}; +const clear = () => { + edgeLabels = {}; + terminalLabels = {}; +}; +const insertEdgeLabel = (elem, edge) => { + const useHtmlLabels = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels); + const labelElement = edge.labelType === "markdown" ? (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, { + style: edge.labelStyle, + useHtmlLabels, + addSvgBackground: true + }) : createLabel$1(edge.label, edge.labelStyle); + const edgeLabel = elem.insert("g").attr("class", "edgeLabel"); + const label = edgeLabel.insert("g").attr("class", "label"); + label.node().appendChild(labelElement); + let bbox = labelElement.getBBox(); + if (useHtmlLabels) { + const div = labelElement.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(labelElement); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")"); + edgeLabels[edge.id] = edgeLabel; + edge.width = bbox.width; + edge.height = bbox.height; + let fo; + if (edge.startLabelLeft) { + const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle); + const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startLeft = startEdgeLabelLeft; + setTerminalWidth(fo, edge.startLabelLeft); + } + if (edge.startLabelRight) { + const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle); + const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = startEdgeLabelRight.insert("g").attr("class", "inner"); + fo = startEdgeLabelRight.node().appendChild(startLabelElement); + inner.node().appendChild(startLabelElement); + const slBox = startLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].startRight = startEdgeLabelRight; + setTerminalWidth(fo, edge.startLabelRight); + } + if (edge.endLabelLeft) { + const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle); + const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelLeft.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelLeft.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endLeft = endEdgeLabelLeft; + setTerminalWidth(fo, edge.endLabelLeft); + } + if (edge.endLabelRight) { + const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle); + const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals"); + const inner = endEdgeLabelRight.insert("g").attr("class", "inner"); + fo = inner.node().appendChild(endLabelElement); + const slBox = endLabelElement.getBBox(); + inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")"); + endEdgeLabelRight.node().appendChild(endLabelElement); + if (!terminalLabels[edge.id]) { + terminalLabels[edge.id] = {}; + } + terminalLabels[edge.id].endRight = endEdgeLabelRight; + setTerminalWidth(fo, edge.endLabelRight); + } + return labelElement; +}; +function setTerminalWidth(fo, value) { + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) { + fo.style.width = value.length * 9 + "px"; + fo.style.height = "12px"; + } +} +const positionEdgeLabel = (edge, paths) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels[edge.id], paths); + let path = paths.updatedPath ? paths.updatedPath : paths.originalPath; + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig); + if (edge.label) { + const el = edgeLabels[edge.id]; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug( + "Moving label " + edge.label + " from (", + x, + ",", + y, + ") to (", + pos.x, + ",", + pos.y, + ") abc88" + ); + if (paths.updatedPath) { + x = pos.x; + y = pos.y; + } + } + el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`); + } + if (edge.startLabelLeft) { + const el = terminalLabels[edge.id].startLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.startLabelRight) { + const el = terminalLabels[edge.id].startRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition( + edge.arrowTypeStart ? 10 : 0, + "start_right", + path + ); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.endLabelLeft) { + const el = terminalLabels[edge.id].endLeft; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } + if (edge.endLabelRight) { + const el = terminalLabels[edge.id].endRight; + let x = edge.x; + let y = edge.y; + if (path) { + const pos = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path); + x = pos.x; + y = pos.y; + } + el.attr("transform", `translate(${x}, ${y})`); + } +}; +const outsideNode = (node, point2) => { + const x = node.x; + const y = node.y; + const dx = Math.abs(point2.x - x); + const dy = Math.abs(point2.y - y); + const w = node.width / 2; + const h = node.height / 2; + if (dx >= w || dy >= h) { + return true; + } + return false; +}; +const intersection = (node, outsidePoint, insidePoint) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(outsidePoint)} + insidePoint : ${JSON.stringify(insidePoint)} + node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`); + const x = node.x; + const y = node.y; + const dx = Math.abs(x - insidePoint.x); + const w = node.width / 2; + let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx; + const h = node.height / 2; + const Q = Math.abs(outsidePoint.y - insidePoint.y); + const R = Math.abs(outsidePoint.x - insidePoint.x); + if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { + let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; + r = R * q / Q; + const res = { + x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r, + y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q + }; + if (r === 0) { + res.x = outsidePoint.x; + res.y = outsidePoint.y; + } + if (R === 0) { + res.x = outsidePoint.x; + } + if (Q === 0) { + res.y = outsidePoint.y; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); + return res; + } else { + if (insidePoint.x < outsidePoint.x) { + r = outsidePoint.x - w - x; + } else { + r = x - w - outsidePoint.x; + } + let q = Q * r / R; + let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r; + let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y }); + if (r === 0) { + _x = outsidePoint.x; + _y = outsidePoint.y; + } + if (R === 0) { + _x = outsidePoint.x; + } + if (Q === 0) { + _y = outsidePoint.y; + } + return { x: _x, y: _y }; + } +}; +const cutPathAtIntersect = (_points, boundaryNode) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 cutPathAtIntersect", _points, boundaryNode); + let points = []; + let lastPointOutside = _points[0]; + let isInside = false; + _points.forEach((point2) => { + if (!outsideNode(boundaryNode, point2) && !isInside) { + const inter = intersection(boundaryNode, lastPointOutside, point2); + let pointPresent = false; + points.forEach((p) => { + pointPresent = pointPresent || p.x === inter.x && p.y === inter.y; + }); + if (!points.some((e) => e.x === inter.x && e.y === inter.y)) { + points.push(inter); + } + isInside = true; + } else { + lastPointOutside = point2; + if (!isInside) { + points.push(point2); + } + } + }); + return points; +}; +const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) { + let points = edge.points; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("abc88 InsertEdge: edge=", edge, "e=", e); + let pointsHasChanged = false; + const tail = graph.node(e.v); + var head = graph.node(e.w); + if ((head == null ? void 0 : head.intersect) && (tail == null ? void 0 : tail.intersect)) { + points = points.slice(1, edge.points.length - 1); + points.unshift(tail.intersect(points[0])); + points.push(head.intersect(points[points.length - 1])); + } + if (edge.toCluster) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("to cluster abc88", clusterDb[edge.toCluster]); + points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node); + pointsHasChanged = true; + } + if (edge.fromCluster) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("from cluster abc88", clusterDb[edge.fromCluster]); + points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse(); + pointsHasChanged = true; + } + const lineData = points.filter((p) => !Number.isNaN(p.y)); + let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM; + if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) { + curve = edge.curve; + } + const { x, y } = getLineFunctionsWithOffset(edge); + const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(x).y(y).curve(curve); + let strokeClasses; + switch (edge.thickness) { + case "normal": + strokeClasses = "edge-thickness-normal"; + break; + case "thick": + strokeClasses = "edge-thickness-thick"; + break; + case "invisible": + strokeClasses = "edge-thickness-thick"; + break; + default: + strokeClasses = ""; + } + switch (edge.pattern) { + case "solid": + strokeClasses += " edge-pattern-solid"; + break; + case "dotted": + strokeClasses += " edge-pattern-dotted"; + break; + case "dashed": + strokeClasses += " edge-pattern-dashed"; + break; + } + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style); + let url = ""; + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + addEdgeMarkers(svgPath, edge, url, id, diagramType); + let paths = {}; + if (pointsHasChanged) { + paths.updatedPath = points; + } + paths.originalPath = edge.points; + return paths; +}; + + + +/***/ }), + +/***/ 2746: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ r: () => (/* binding */ render) +/* harmony export */ }); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1176); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4075); +/* harmony import */ var _edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8747); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); +/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3791); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6312); + + + + + + + +let clusterDb = {}; +let descendants = {}; +let parents = {}; +const clear$1 = () => { + descendants = {}; + parents = {}; + clusterDb = {}; +}; +const isDescendant = (id, ancestorId) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("In isDescendant", ancestorId, " ", id, " = ", descendants[ancestorId].includes(id)); + if (descendants[ancestorId].includes(id)) { + return true; + } + return false; +}; +const edgeInCluster = (edge, clusterId) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Descendants of ", clusterId, " is ", descendants[clusterId]); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge is ", edge); + if (edge.v === clusterId) { + return false; + } + if (edge.w === clusterId) { + return false; + } + if (!descendants[clusterId]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Tilt, ", clusterId, ",not in descendants"); + return false; + } + return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w); +}; +const copy = (clusterId, graph, newGraph, rootId) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Copying children of ", + clusterId, + "root", + rootId, + "data", + graph.node(clusterId), + rootId + ); + const nodes = graph.children(clusterId) || []; + if (clusterId !== rootId) { + nodes.push(clusterId); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes); + nodes.forEach((node) => { + if (graph.children(node).length > 0) { + copy(node, graph, newGraph, rootId); + } else { + const data = graph.node(node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("cp ", node, " to ", rootId, " with parent ", clusterId); + newGraph.setNode(node, data); + if (rootId !== graph.parent(node)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Setting parent", node, graph.parent(node)); + newGraph.setParent(node, graph.parent(node)); + } + if (clusterId !== rootId && node !== clusterId) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Setting parent", node, clusterId); + newGraph.setParent(node, clusterId); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( + "Not Setting parent for node=", + node, + "cluster!==rootId", + clusterId !== rootId, + "node!==clusterId", + node !== clusterId + ); + } + const edges = graph.edges(node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Copying Edges", edges); + edges.forEach((edge) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge", edge); + const data2 = graph.edge(edge.v, edge.w, edge.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge data", data2, rootId); + try { + if (edgeInCluster(edge, rootId)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Copying as ", edge.v, edge.w, data2, edge.name); + newGraph.setEdge(edge.v, edge.w, data2, edge.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0])); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info( + "Skipping copy of edge ", + edge.v, + "-->", + edge.w, + " rootId: ", + rootId, + " clusterId:", + clusterId + ); + } + } catch (e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error(e); + } + }); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Removing node", node); + graph.removeNode(node); + }); +}; +const extractDescendants = (id, graph) => { + const children = graph.children(id); + let res = [...children]; + for (const child of children) { + parents[child] = id; + res = [...res, ...extractDescendants(child, graph)]; + } + return res; +}; +const findNonClusterChild = (id, graph) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching", id); + const children = graph.children(id); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching children of id ", id, children); + if (children.length < 1) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("This is a valid node", id); + return id; + } + for (const child of children) { + const _id = findNonClusterChild(child, graph); + if (_id) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Found replacement for", id, " => ", _id); + return _id; + } + } +}; +const getAnchorId = (id) => { + if (!clusterDb[id]) { + return id; + } + if (!clusterDb[id].externalConnections) { + return id; + } + if (clusterDb[id]) { + return clusterDb[id].id; + } + return id; +}; +const adjustClustersAndEdges = (graph, depth) => { + if (!graph || depth > 10) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting out, no graph "); + return; + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting in, graph "); + } + graph.nodes().forEach(function(id) { + const children = graph.children(id); + if (children.length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Cluster identified", + id, + " Replacement id in edges: ", + findNonClusterChild(id, graph) + ); + descendants[id] = extractDescendants(id, graph); + clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) }; + } + }); + graph.nodes().forEach(function(id) { + const children = graph.children(id); + const edges = graph.edges(); + if (children.length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Cluster identified", id, descendants); + edges.forEach((edge) => { + if (edge.v !== id && edge.w !== id) { + const d1 = isDescendant(edge.v, id); + const d2 = isDescendant(edge.w, id); + if (d1 ^ d2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge: ", edge, " leaves cluster ", id); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Descendants of XXX ", id, ": ", descendants[id]); + clusterDb[id].externalConnections = true; + } + } + }); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster ", id, descendants); + } + }); + for (let id of Object.keys(clusterDb)) { + const nonClusterChild = clusterDb[id].id; + const parent = graph.parent(nonClusterChild); + if (parent !== id && clusterDb[parent] && !clusterDb[parent].externalConnections) { + clusterDb[id].id = parent; + } + } + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); + let v = e.v; + let w = e.w; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Fix XXX", + clusterDb, + "ids:", + e.v, + e.w, + "Translating: ", + clusterDb[e.v], + " --- ", + clusterDb[e.w] + ); + if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + const specialId = e.w + "---" + e.v; + graph.setNode(specialId, { + domId: specialId, + id: specialId, + labelStyle: "", + labelText: edge.label, + padding: 0, + shape: "labelRect", + style: "" + }); + const edge1 = structuredClone(edge); + const edge2 = structuredClone(edge); + edge1.label = ""; + edge1.arrowTypeEnd = "none"; + edge2.label = ""; + edge1.fromCluster = e.v; + edge2.toCluster = e.v; + graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special"); + graph.setEdge(specialId, w, edge2, e.name + "-cyclic-special"); + } else if (clusterDb[e.v] || clusterDb[e.w]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name); + v = getAnchorId(e.v); + w = getAnchorId(e.w); + graph.removeEdge(e.v, e.w, e.name); + if (v !== e.v) { + const parent = graph.parent(v); + clusterDb[parent].externalConnections = true; + edge.fromCluster = e.v; + } + if (w !== e.w) { + const parent = graph.parent(w); + clusterDb[parent].externalConnections = true; + edge.toCluster = e.w; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fix Replacing with XXX", v, w, e.name); + graph.setEdge(v, w, edge, e.name); + } + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Adjusted Graph", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + extractor(graph, 0); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace(clusterDb); +}; +const extractor = (graph, depth) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("extractor - ", depth, dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), graph.children("D")); + if (depth > 10) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.error("Bailing out"); + return; + } + let nodes = graph.nodes(); + let hasChildren = false; + for (const node of nodes) { + const children = graph.children(node); + hasChildren = hasChildren || children.length > 0; + } + if (!hasChildren) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Done, no node has children", graph.nodes()); + return; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Nodes = ", nodes, depth); + for (const node of nodes) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug( + "Extracting node", + node, + clusterDb, + clusterDb[node] && !clusterDb[node].externalConnections, + !graph.parent(node), + graph.node(node), + graph.children("D"), + " Depth ", + depth + ); + if (!clusterDb[node]) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster", node, depth); + } else if (!clusterDb[node].externalConnections && // !graph.parent(node) && + graph.children(node) && graph.children(node).length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Cluster without external connections, without a parent and with children", + node, + depth + ); + const graphSettings = graph.graph(); + let dir = graphSettings.rankdir === "TB" ? "LR" : "TB"; + if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) { + dir = clusterDb[node].clusterData.dir; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing dir", clusterDb[node].clusterData.dir, dir); + } + const clusterGraph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: dir, + // Todo: set proper spacing + nodesep: 50, + ranksep: 50, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Old graph before copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + copy(node, graph, clusterGraph, node); + graph.setNode(node, { + clusterNode: true, + id: node, + clusterData: clusterDb[node].clusterData, + labelText: clusterDb[node].labelText, + graph: clusterGraph + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New graph after copy node: (", node, ")", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(clusterGraph)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Old graph after copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn( + "Cluster ** ", + node, + " **not meeting the criteria !externalConnections:", + !clusterDb[node].externalConnections, + " no parent: ", + !graph.parent(node), + " children ", + graph.children(node) && graph.children(node).length > 0, + graph.children("D"), + depth + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(clusterDb); + } + } + nodes = graph.nodes(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New list of nodes", nodes); + for (const node of nodes) { + const data = graph.node(node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(" Now next level", node, data); + if (data.clusterNode) { + extractor(data.graph, depth + 1); + } + } +}; +const sorter = (graph, nodes) => { + if (nodes.length === 0) { + return []; + } + let result = Object.assign(nodes); + nodes.forEach((node) => { + const children = graph.children(node); + const sorted = sorter(graph, children); + result = [...result, ...sorted]; + }); + return result; +}; +const sortNodesByHierarchy = (graph) => sorter(graph, graph.children()); +const rect = (parent, node) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Creating subgraph rect for ", node.id, node); + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + const shapeSvg = parent.insert("g").attr("class", "cluster" + (node.class ? " " + node.class : "")).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const useHtmlLabels = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const text = node.labelType === "markdown" ? (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_5__.a)(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild((0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); + let bbox = text.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + const padding = 0 * node.padding; + const halfPadding = padding / 2; + const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width; + if (node.width <= bbox.width + padding) { + node.diff = (bbox.width - node.width) / 2 - node.padding / 2; + } else { + node.diff = -node.padding / 2; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Data ", node, JSON.stringify(node)); + rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding); + const { subGraphTitleTopMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); + if (useHtmlLabels) { + label.attr( + "transform", + // This puts the label on top of the box instead of inside it + `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` + ); + } else { + label.attr( + "transform", + // This puts the label on top of the box instead of inside it + `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})` + ); + } + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const noteGroup = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", node.width + padding).attr("height", node.height + padding).attr("fill", "none"); + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const roundedWithTitle = (parent, node) => { + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const label = shapeSvg.insert("g").attr("class", "cluster-label"); + const innerRect = shapeSvg.append("rect"); + const text = label.node().appendChild((0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true)); + let bbox = text.getBBox(); + if ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels)) { + const div = text.children[0]; + const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(text); + bbox = div.getBoundingClientRect(); + dv.attr("width", bbox.width); + dv.attr("height", bbox.height); + } + bbox = text.getBBox(); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width; + if (node.width <= bbox.width + node.padding) { + node.diff = (bbox.width + node.padding * 0 - node.width) / 2; + } else { + node.diff = -node.padding / 2; + } + rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding); + innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3); + const { subGraphTitleTopMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); + label.attr( + "transform", + `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 - node.padding / 3 + ((0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.m)(siteConfig.flowchart.htmlLabels) ? 5 : 3) + subGraphTitleTopMargin})` + ); + const rectBox = rect2.node().getBBox(); + node.height = rectBox.height; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const divider = (parent, node) => { + const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id); + const rect2 = shapeSvg.insert("rect", ":first-child"); + const padding = 0 * node.padding; + const halfPadding = padding / 2; + rect2.attr("class", "divider").attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2).attr("width", node.width + padding).attr("height", node.height + padding); + const rectBox = rect2.node().getBBox(); + node.width = rectBox.width; + node.height = rectBox.height; + node.diff = -node.padding / 2; + node.intersect = function(point) { + return (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point); + }; + return shapeSvg; +}; +const shapes = { rect, roundedWithTitle, noteGroup, divider }; +let clusterElems = {}; +const insertCluster = (elem, node) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Inserting cluster"); + const shape = node.shape || "rect"; + clusterElems[node.id] = shapes[shape](elem, node); +}; +const clear = () => { + clusterElems = {}; +}; +const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph in recursive render: XXX", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph), parentCluster); + const dir = graph.graph().rankdir; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Dir in recursive render - dir:", dir); + const elem = _elem.insert("g").attr("class", "root"); + if (!graph.nodes()) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("No nodes found for", graph); + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Recursive render XXX", graph.nodes()); + } + if (graph.edges().length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Recursive edges", graph.edge(graph.edges()[0])); + } + const clusters = elem.insert("g").attr("class", "clusters"); + const edgePaths = elem.insert("g").attr("class", "edgePaths"); + const edgeLabels = elem.insert("g").attr("class", "edgeLabels"); + const nodes = elem.insert("g").attr("class", "nodes"); + await Promise.all( + graph.nodes().map(async function(v) { + const node = graph.node(v); + if (parentCluster !== void 0) { + const data = JSON.parse(JSON.stringify(parentCluster.clusterData)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Setting data for cluster XXX (", v, ") ", data, parentCluster); + graph.setNode(parentCluster.id, data); + if (!graph.parent(v)) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Setting parent", v, parentCluster.id); + graph.setParent(v, parentCluster.id, data); + } + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v))); + if (node && node.clusterNode) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster identified", v, node.width, graph.node(v)); + const o = await recursiveRender( + nodes, + node.graph, + diagramType, + id, + graph.node(v), + siteConfig + ); + const newEl = o.elem; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.u)(node, newEl); + node.diff = o.diff || 0; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node bounds (abc123)", v, node, node.width, node.x, node.y); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.s)(newEl, node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Recursive render complete ", newEl, node); + } else { + if (graph.children(v).length > 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster - the non recursive path XXX", v, node.id, node, graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(findNonClusterChild(node.id, graph)); + clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node }; + } else { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node - the non recursive path", v, node.id, node); + await (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.e)(nodes, graph.node(v), dir); + } + } + }) + ); + graph.edges().forEach(function(e) { + const edge = graph.edge(e.v, e.w, e.name); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e))); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Fix", clusterDb, "ids:", e.v, e.w, "Translating: ", clusterDb[e.v], clusterDb[e.w]); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.f)(edgeLabels, edge); + }); + graph.edges().forEach(function(e) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)); + }); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("### Layout ###"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################"); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(graph); + (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__/* .layout */ .Zp)(graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph after layout:", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph)); + let diff = 0; + const { subGraphTitleTotalMargin } = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.g)(siteConfig); + sortNodesByHierarchy(graph).forEach(function(v) { + const node = graph.node(v); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Position " + v + ": " + JSON.stringify(graph.node(v))); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info( + "Position " + v + ": (" + node.x, + "," + node.y, + ") width: ", + node.width, + " height: ", + node.height + ); + if (node && node.clusterNode) { + node.y += subGraphTitleTotalMargin; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); + } else { + if (graph.children(v).length > 0) { + node.height += subGraphTitleTotalMargin; + insertCluster(clusters, node); + clusterDb[node.id].node = node; + } else { + node.y += subGraphTitleTotalMargin / 2; + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.p)(node); + } + } + }); + graph.edges().forEach(function(e) { + const edge = graph.edge(e); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge); + edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2); + const paths = (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.h)(edgePaths, e, edge, clusterDb, diagramType, graph, id); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.j)(edge, paths); + }); + graph.nodes().forEach(function(v) { + const n = graph.node(v); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.info(v, n.type, n.diff); + if (n.type === "group") { + diff = n.diff; + } + }); + return { elem, diff }; +}; +const render = async (elem, graph, markers, diagramType, id) => { + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.a)(elem, markers, diagramType, id); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.b)(); + (0,_edges_d32062c0_js__WEBPACK_IMPORTED_MODULE_6__.d)(); + clear(); + clear$1(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph at first:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); + adjustClustersAndEdges(graph); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph after:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .M(graph))); + const siteConfig = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)(); + await recursiveRender(elem, graph, diagramType, id, void 0, siteConfig); +}; + + + +/***/ }), + +/***/ 5688: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6292); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(697); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6312); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(6257); +/* harmony import */ var _index_fc10efb0_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2746); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9418); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1176); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4075); + + + + + + + + + + + + + + + + + + + +const SHAPE_STATE = "rect"; +const SHAPE_STATE_WITH_DESC = "rectWithTitle"; +const SHAPE_START = "start"; +const SHAPE_END = "end"; +const SHAPE_DIVIDER = "divider"; +const SHAPE_GROUP = "roundedWithTitle"; +const SHAPE_NOTE = "note"; +const SHAPE_NOTEGROUP = "noteGroup"; +const CSS_DIAGRAM = "statediagram"; +const CSS_STATE = "state"; +const CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`; +const CSS_EDGE = "transition"; +const CSS_NOTE = "note"; +const CSS_NOTE_EDGE = "note-edge"; +const CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`; +const CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`; +const CSS_CLUSTER = "cluster"; +const CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`; +const CSS_CLUSTER_ALT = "cluster-alt"; +const CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`; +const PARENT = "parent"; +const NOTE = "note"; +const DOMID_STATE = "state"; +const DOMID_TYPE_SPACER = "----"; +const NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`; +const PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`; +const G_EDGE_STYLE = "fill:none"; +const G_EDGE_ARROWHEADSTYLE = "fill: #333"; +const G_EDGE_LABELPOS = "c"; +const G_EDGE_LABELTYPE = "text"; +const G_EDGE_THICKNESS = "normal"; +let nodeDb = {}; +let graphItemCount = 0; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + for (const key of keys) { + cnf[key]; + } +}; +const getClasses = function(text, diagramObj) { + diagramObj.db.extract(diagramObj.db.getRootDocV2()); + return diagramObj.db.getClasses(); +}; +function getClassesFromDbInfo(dbInfoItem) { + if (dbInfoItem === void 0 || dbInfoItem === null) { + return ""; + } else { + if (dbInfoItem.classes) { + return dbInfoItem.classes.join(" "); + } else { + return ""; + } + } +} +function stateDomId(itemId = "", counter = 0, type = "", typeSpacer = DOMID_TYPE_SPACER) { + const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : ""; + return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`; +} +const setupNode = (g, parent, parsedItem, diagramStates, diagramDb, altFlag) => { + const itemId = parsedItem.id; + const classStr = getClassesFromDbInfo(diagramStates[itemId]); + if (itemId !== "root") { + let shape = SHAPE_STATE; + if (parsedItem.start === true) { + shape = SHAPE_START; + } + if (parsedItem.start === false) { + shape = SHAPE_END; + } + if (parsedItem.type !== _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.D) { + shape = parsedItem.type; + } + if (!nodeDb[itemId]) { + nodeDb[itemId] = { + id: itemId, + shape, + description: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.e.sanitizeText(itemId, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.c)()), + classes: `${classStr} ${CSS_DIAGRAM_STATE}` + }; + } + const newNode = nodeDb[itemId]; + if (parsedItem.description) { + if (Array.isArray(newNode.description)) { + newNode.shape = SHAPE_STATE_WITH_DESC; + newNode.description.push(parsedItem.description); + } else { + if (newNode.description.length > 0) { + newNode.shape = SHAPE_STATE_WITH_DESC; + if (newNode.description === itemId) { + newNode.description = [parsedItem.description]; + } else { + newNode.description = [newNode.description, parsedItem.description]; + } + } else { + newNode.shape = SHAPE_STATE; + newNode.description = parsedItem.description; + } + } + newNode.description = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.e.sanitizeTextOrArray(newNode.description, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.c)()); + } + if (newNode.description.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) { + newNode.shape = SHAPE_STATE; + } + if (!newNode.type && parsedItem.doc) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.l.info("Setting cluster for ", itemId, getDir(parsedItem)); + newNode.type = "group"; + newNode.dir = getDir(parsedItem); + newNode.shape = parsedItem.type === _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.a ? SHAPE_DIVIDER : SHAPE_GROUP; + newNode.classes = newNode.classes + " " + CSS_DIAGRAM_CLUSTER + " " + (altFlag ? CSS_DIAGRAM_CLUSTER_ALT : ""); + } + const nodeData = { + labelStyle: "", + shape: newNode.shape, + labelText: newNode.description, + // typeof newNode.description === 'object' + // ? newNode.description[0] + // : newNode.description, + classes: newNode.classes, + style: "", + //styles.style, + id: itemId, + dir: newNode.dir, + domId: stateDomId(itemId, graphItemCount), + type: newNode.type, + padding: 15 + //getConfig().flowchart.padding + }; + nodeData.centerLabel = true; + if (parsedItem.note) { + const noteData = { + labelStyle: "", + shape: SHAPE_NOTE, + labelText: parsedItem.note.text, + classes: CSS_DIAGRAM_NOTE, + // useHtmlLabels: false, + style: "", + // styles.style, + id: itemId + NOTE_ID + "-" + graphItemCount, + domId: stateDomId(itemId, graphItemCount, NOTE), + type: newNode.type, + padding: 15 + //getConfig().flowchart.padding + }; + const groupData = { + labelStyle: "", + shape: SHAPE_NOTEGROUP, + labelText: parsedItem.note.text, + classes: newNode.classes, + style: "", + // styles.style, + id: itemId + PARENT_ID, + domId: stateDomId(itemId, graphItemCount, PARENT), + type: "group", + padding: 0 + //getConfig().flowchart.padding + }; + graphItemCount++; + const parentNodeId = itemId + PARENT_ID; + g.setNode(parentNodeId, groupData); + g.setNode(noteData.id, noteData); + g.setNode(itemId, nodeData); + g.setParent(itemId, parentNodeId); + g.setParent(noteData.id, parentNodeId); + let from = itemId; + let to = noteData.id; + if (parsedItem.note.position === "left of") { + from = noteData.id; + to = itemId; + } + g.setEdge(from, to, { + arrowhead: "none", + arrowType: "", + style: G_EDGE_STYLE, + labelStyle: "", + classes: CSS_EDGE_NOTE_EDGE, + arrowheadStyle: G_EDGE_ARROWHEADSTYLE, + labelpos: G_EDGE_LABELPOS, + labelType: G_EDGE_LABELTYPE, + thickness: G_EDGE_THICKNESS + }); + } else { + g.setNode(itemId, nodeData); + } + } + if (parent && parent.id !== "root") { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.l.trace("Setting node ", itemId, " to be child of its parent ", parent.id); + g.setParent(itemId, parent.id); + } + if (parsedItem.doc) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.l.trace("Adding nodes children "); + setupDoc(g, parsedItem, parsedItem.doc, diagramStates, diagramDb, !altFlag); + } +}; +const setupDoc = (g, parentParsedItem, doc, diagramStates, diagramDb, altFlag) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.l.trace("items", doc); + doc.forEach((item) => { + switch (item.stmt) { + case _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.b: + setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag); + break; + case _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.D: + setupNode(g, parentParsedItem, item, diagramStates, diagramDb, altFlag); + break; + case _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.S: + { + setupNode(g, parentParsedItem, item.state1, diagramStates, diagramDb, altFlag); + setupNode(g, parentParsedItem, item.state2, diagramStates, diagramDb, altFlag); + const edgeData = { + id: "edge" + graphItemCount, + arrowhead: "normal", + arrowTypeEnd: "arrow_barb", + style: G_EDGE_STYLE, + labelStyle: "", + label: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.e.sanitizeText(item.description, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.c)()), + arrowheadStyle: G_EDGE_ARROWHEADSTYLE, + labelpos: G_EDGE_LABELPOS, + labelType: G_EDGE_LABELTYPE, + thickness: G_EDGE_THICKNESS, + classes: CSS_EDGE + }; + g.setEdge(item.state1.id, item.state2.id, edgeData, graphItemCount); + graphItemCount++; + } + break; + } + }); +}; +const getDir = (parsedItem, defaultDir = _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.c) => { + let dir = defaultDir; + if (parsedItem.doc) { + for (let i = 0; i < parsedItem.doc.length; i++) { + const parsedItemDoc = parsedItem.doc[i]; + if (parsedItemDoc.stmt === "dir") { + dir = parsedItemDoc.value; + } + } + } + return dir; +}; +const draw = async function(text, id, _version, diag) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.l.info("Drawing state diagram (v2)", id); + nodeDb = {}; + diag.db.getDirection(); + const { securityLevel, state: conf } = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.c)(); + const nodeSpacing = conf.nodeSpacing || 50; + const rankSpacing = conf.rankSpacing || 50; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.l.info(diag.db.getRootDocV2()); + diag.db.extract(diag.db.getRootDocV2()); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.l.info(diag.db.getRootDocV2()); + const diagramStates = diag.db.getStates(); + const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Graph */ .T({ + multigraph: true, + compound: true + }).setGraph({ + rankdir: getDir(diag.db.getRootDocV2()), + nodesep: nodeSpacing, + ranksep: rankSpacing, + marginx: 8, + marginy: 8 + }).setDefaultEdgeLabel(function() { + return {}; + }); + setupNode(g, void 0, diag.db.getRootDocV2(), diagramStates, diag.db, true); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body"); + const svg = root.select(`[id="${id}"]`); + const element = root.select("#" + id + " g"); + await (0,_index_fc10efb0_js__WEBPACK_IMPORTED_MODULE_9__.r)(element, g, ["barb"], CSS_DIAGRAM, id); + const padding = 8; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.u.insertTitle(svg, "statediagramTitleText", conf.titleTopMargin, diag.db.getDiagramTitle()); + const bounds = svg.node().getBBox(); + const width = bounds.width + padding * 2; + const height = bounds.height + padding * 2; + svg.attr("class", CSS_DIAGRAM); + const svgBounds = svg.node().getBBox(); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.i)(svg, height, width, conf.useMaxWidth); + const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_8__.l.debug(`viewBox ${vBox}`); + svg.attr("viewBox", vBox); + const labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label'); + for (const label of labels) { + const dim = label.getBBox(); + const rect = document.createElementNS("http://www.w3.org/2000/svg", SHAPE_STATE); + rect.setAttribute("rx", 0); + rect.setAttribute("ry", 0); + rect.setAttribute("width", dim.width); + rect.setAttribute("height", dim.height); + label.insertBefore(rect, label.firstChild); + } +}; +const renderer = { + setConf, + getClasses, + draw +}; +const diagram = { + parser: _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.p, + db: _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.d, + renderer, + styles: _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.s, + init: (cnf) => { + if (!cnf.state) { + cnf.state = {}; + } + cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + _styles_d20c7d72_js__WEBPACK_IMPORTED_MODULE_7__.d.clear(); + } +}; + + + +/***/ }), + +/***/ 6292: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ D: () => (/* binding */ DEFAULT_STATE_TYPE), +/* harmony export */ S: () => (/* binding */ STMT_RELATION), +/* harmony export */ a: () => (/* binding */ DIVIDER_TYPE), +/* harmony export */ b: () => (/* binding */ STMT_STATE), +/* harmony export */ c: () => (/* binding */ DEFAULT_NESTED_DOC_DIR), +/* harmony export */ d: () => (/* binding */ db), +/* harmony export */ p: () => (/* binding */ parser$1), +/* harmony export */ s: () => (/* binding */ styles) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6257); + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 15], $V7 = [1, 16], $V8 = [1, 17], $V9 = [1, 18], $Va = [1, 30], $Vb = [1, 19], $Vc = [1, 20], $Vd = [1, 21], $Ve = [1, 22], $Vf = [1, 23], $Vg = [1, 25], $Vh = [1, 26], $Vi = [1, 27], $Vj = [1, 28], $Vk = [1, 29], $Vl = [1, 32], $Vm = [1, 33], $Vn = [1, 34], $Vo = [1, 35], $Vp = [1, 31], $Vq = [1, 4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vr = [1, 4, 5, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $Vs = [4, 5, 15, 16, 18, 20, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "SPACE": 4, "NL": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "classDefStatement": 10, "cssClassStatement": 11, "idStatement": 12, "DESCR": 13, "-->": 14, "HIDE_EMPTY": 15, "scale": 16, "WIDTH": 17, "COMPOSIT_STATE": 18, "STRUCT_START": 19, "STRUCT_STOP": 20, "STATE_DESCR": 21, "AS": 22, "ID": 23, "FORK": 24, "JOIN": 25, "CHOICE": 26, "CONCURRENT": 27, "note": 28, "notePosition": 29, "NOTE_TEXT": 30, "direction": 31, "acc_title": 32, "acc_title_value": 33, "acc_descr": 34, "acc_descr_value": 35, "acc_descr_multiline_value": 36, "classDef": 37, "CLASSDEF_ID": 38, "CLASSDEF_STYLEOPTS": 39, "DEFAULT": 40, "class": 41, "CLASSENTITY_IDS": 42, "STYLECLASS": 43, "direction_tb": 44, "direction_bt": 45, "direction_rl": 46, "direction_lr": 47, "eol": 48, ";": 49, "EDGE_STATE": 50, "STYLE_SEPARATOR": 51, "left_of": 52, "right_of": 53, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 13: "DESCR", 14: "-->", 15: "HIDE_EMPTY", 16: "scale", 17: "WIDTH", 18: "COMPOSIT_STATE", 19: "STRUCT_START", 20: "STRUCT_STOP", 21: "STATE_DESCR", 22: "AS", 23: "ID", 24: "FORK", 25: "JOIN", 26: "CHOICE", 27: "CONCURRENT", 28: "note", 30: "NOTE_TEXT", 32: "acc_title", 33: "acc_title_value", 34: "acc_descr", 35: "acc_descr_value", 36: "acc_descr_multiline_value", 37: "classDef", 38: "CLASSDEF_ID", 39: "CLASSDEF_STYLEOPTS", 40: "DEFAULT", 41: "class", 42: "CLASSENTITY_IDS", 43: "STYLECLASS", 44: "direction_tb", 45: "direction_bt", 46: "direction_rl", 47: "direction_lr", 49: ";", 50: "EDGE_STATE", 51: "STYLE_SEPARATOR", 52: "left_of", 53: "right_of" }, + productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [10, 3], [10, 3], [11, 3], [31, 1], [31, 1], [31, 1], [31, 1], [48, 1], [48, 1], [12, 1], [12, 1], [12, 3], [12, 3], [29, 1], [29, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setRootDoc($$[$0]); + return $$[$0]; + case 4: + this.$ = []; + break; + case 5: + if ($$[$0] != "nl") { + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + } + break; + case 6: + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = "nl"; + break; + case 11: + this.$ = $$[$0]; + break; + case 12: + const stateStmt = $$[$0 - 1]; + stateStmt.description = yy.trimColon($$[$0]); + this.$ = stateStmt; + break; + case 13: + this.$ = { stmt: "relation", state1: $$[$0 - 2], state2: $$[$0] }; + break; + case 14: + const relDescription = yy.trimColon($$[$0]); + this.$ = { stmt: "relation", state1: $$[$0 - 3], state2: $$[$0 - 1], description: relDescription }; + break; + case 18: + this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: "", doc: $$[$0 - 1] }; + break; + case 19: + var id = $$[$0]; + var description = $$[$0 - 2].trim(); + if ($$[$0].match(":")) { + var parts = $$[$0].split(":"); + id = parts[0]; + description = [description, parts[1]]; + } + this.$ = { stmt: "state", id, type: "default", description }; + break; + case 20: + this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: $$[$0 - 5], doc: $$[$0 - 1] }; + break; + case 21: + this.$ = { stmt: "state", id: $$[$0], type: "fork" }; + break; + case 22: + this.$ = { stmt: "state", id: $$[$0], type: "join" }; + break; + case 23: + this.$ = { stmt: "state", id: $$[$0], type: "choice" }; + break; + case 24: + this.$ = { stmt: "state", id: yy.getDividerId(), type: "divider" }; + break; + case 25: + this.$ = { stmt: "state", id: $$[$0 - 1].trim(), note: { position: $$[$0 - 2].trim(), text: $$[$0].trim() } }; + break; + case 28: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 29: + case 30: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 31: + case 32: + this.$ = { stmt: "classDef", id: $$[$0 - 1].trim(), classes: $$[$0].trim() }; + break; + case 33: + this.$ = { stmt: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() }; + break; + case 34: + yy.setDirection("TB"); + this.$ = { stmt: "dir", value: "TB" }; + break; + case 35: + yy.setDirection("BT"); + this.$ = { stmt: "dir", value: "BT" }; + break; + case 36: + yy.setDirection("RL"); + this.$ = { stmt: "dir", value: "RL" }; + break; + case 37: + yy.setDirection("LR"); + this.$ = { stmt: "dir", value: "LR" }; + break; + case 40: + case 41: + this.$ = { stmt: "state", id: $$[$0].trim(), type: "default", description: "" }; + break; + case 42: + this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; + break; + case 43: + this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" }; + break; + } + }, + table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 15, 16, 18, 21, 23, 24, 25, 26, 27, 28, 32, 34, 36, 37, 41, 44, 45, 46, 47, 50], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 5]), { 9: 36, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 7]), o($Vq, [2, 8]), o($Vq, [2, 9]), o($Vq, [2, 10]), o($Vq, [2, 11], { 13: [1, 37], 14: [1, 38] }), o($Vq, [2, 15]), { 17: [1, 39] }, o($Vq, [2, 17], { 19: [1, 40] }), { 22: [1, 41] }, o($Vq, [2, 21]), o($Vq, [2, 22]), o($Vq, [2, 23]), o($Vq, [2, 24]), { 29: 42, 30: [1, 43], 52: [1, 44], 53: [1, 45] }, o($Vq, [2, 27]), { 33: [1, 46] }, { 35: [1, 47] }, o($Vq, [2, 30]), { 38: [1, 48], 40: [1, 49] }, { 42: [1, 50] }, o($Vr, [2, 40], { 51: [1, 51] }), o($Vr, [2, 41], { 51: [1, 52] }), o($Vq, [2, 34]), o($Vq, [2, 35]), o($Vq, [2, 36]), o($Vq, [2, 37]), o($Vq, [2, 6]), o($Vq, [2, 12]), { 12: 53, 23: $Va, 50: $Vp }, o($Vq, [2, 16]), o($Vs, $V3, { 7: 54 }), { 23: [1, 55] }, { 23: [1, 56] }, { 22: [1, 57] }, { 23: [2, 44] }, { 23: [2, 45] }, o($Vq, [2, 28]), o($Vq, [2, 29]), { 39: [1, 58] }, { 39: [1, 59] }, { 43: [1, 60] }, { 23: [1, 61] }, { 23: [1, 62] }, o($Vq, [2, 13], { 13: [1, 63] }), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 64], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 19], { 19: [1, 65] }), { 30: [1, 66] }, { 23: [1, 67] }, o($Vq, [2, 31]), o($Vq, [2, 32]), o($Vq, [2, 33]), o($Vr, [2, 42]), o($Vr, [2, 43]), o($Vq, [2, 14]), o($Vq, [2, 18]), o($Vs, $V3, { 7: 68 }), o($Vq, [2, 25]), o($Vq, [2, 26]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 15: $V6, 16: $V7, 18: $V8, 20: [1, 69], 21: $V9, 23: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 31: 24, 32: $Vg, 34: $Vh, 36: $Vi, 37: $Vj, 41: $Vk, 44: $Vl, 45: $Vm, 46: $Vn, 47: $Vo, 50: $Vp }, o($Vq, [2, 20])], + defaultActions: { 5: [2, 1], 6: [2, 2], 44: [2, 44], 45: [2, 45] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 40; + case 1: + return 44; + case 2: + return 45; + case 3: + return 46; + case 4: + return 47; + case 5: + break; + case 6: + break; + case 7: + return 5; + case 8: + break; + case 9: + break; + case 10: + break; + case 11: + break; + case 12: + this.pushState("SCALE"); + return 16; + case 13: + return 17; + case 14: + this.popState(); + break; + case 15: + this.begin("acc_title"); + return 32; + case 16: + this.popState(); + return "acc_title_value"; + case 17: + this.begin("acc_descr"); + return 34; + case 18: + this.popState(); + return "acc_descr_value"; + case 19: + this.begin("acc_descr_multiline"); + break; + case 20: + this.popState(); + break; + case 21: + return "acc_descr_multiline_value"; + case 22: + this.pushState("CLASSDEF"); + return 37; + case 23: + this.popState(); + this.pushState("CLASSDEFID"); + return "DEFAULT_CLASSDEF_ID"; + case 24: + this.popState(); + this.pushState("CLASSDEFID"); + return 38; + case 25: + this.popState(); + return 39; + case 26: + this.pushState("CLASS"); + return 41; + case 27: + this.popState(); + this.pushState("CLASS_STYLE"); + return 42; + case 28: + this.popState(); + return 43; + case 29: + this.pushState("SCALE"); + return 16; + case 30: + return 17; + case 31: + this.popState(); + break; + case 32: + this.pushState("STATE"); + break; + case 33: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 24; + case 34: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 25; + case 35: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -10).trim(); + return 26; + case 36: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 24; + case 37: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 25; + case 38: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -10).trim(); + return 26; + case 39: + return 44; + case 40: + return 45; + case 41: + return 46; + case 42: + return 47; + case 43: + this.pushState("STATE_STRING"); + break; + case 44: + this.pushState("STATE_ID"); + return "AS"; + case 45: + this.popState(); + return "ID"; + case 46: + this.popState(); + break; + case 47: + return "STATE_DESCR"; + case 48: + return 18; + case 49: + this.popState(); + break; + case 50: + this.popState(); + this.pushState("struct"); + return 19; + case 51: + break; + case 52: + this.popState(); + return 20; + case 53: + break; + case 54: + this.begin("NOTE"); + return 28; + case 55: + this.popState(); + this.pushState("NOTE_ID"); + return 52; + case 56: + this.popState(); + this.pushState("NOTE_ID"); + return 53; + case 57: + this.popState(); + this.pushState("FLOATING_NOTE"); + break; + case 58: + this.popState(); + this.pushState("FLOATING_NOTE_ID"); + return "AS"; + case 59: + break; + case 60: + return "NOTE_TEXT"; + case 61: + this.popState(); + return "ID"; + case 62: + this.popState(); + this.pushState("NOTE_TEXT"); + return 23; + case 63: + this.popState(); + yy_.yytext = yy_.yytext.substr(2).trim(); + return 30; + case 64: + this.popState(); + yy_.yytext = yy_.yytext.slice(0, -8).trim(); + return 30; + case 65: + return 6; + case 66: + return 6; + case 67: + return 15; + case 68: + return 50; + case 69: + return 23; + case 70: + yy_.yytext = yy_.yytext.trim(); + return 13; + case 71: + return 14; + case 72: + return 27; + case 73: + return 51; + case 74: + return 5; + case 75: + return "INVALID"; + } + }, + rules: [/^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<<fork>>)/i, /^(?:.*<<join>>)/i, /^(?:.*<<choice>>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "LINE": { "rules": [9, 10], "inclusive": false }, "struct": { "rules": [9, 10, 22, 26, 32, 39, 40, 41, 42, 51, 52, 53, 54, 68, 69, 70, 71, 72], "inclusive": false }, "FLOATING_NOTE_ID": { "rules": [61], "inclusive": false }, "FLOATING_NOTE": { "rules": [58, 59, 60], "inclusive": false }, "NOTE_TEXT": { "rules": [63, 64], "inclusive": false }, "NOTE_ID": { "rules": [62], "inclusive": false }, "NOTE": { "rules": [55, 56, 57], "inclusive": false }, "CLASS_STYLE": { "rules": [28], "inclusive": false }, "CLASS": { "rules": [27], "inclusive": false }, "CLASSDEFID": { "rules": [25], "inclusive": false }, "CLASSDEF": { "rules": [23, 24], "inclusive": false }, "acc_descr_multiline": { "rules": [20, 21], "inclusive": false }, "acc_descr": { "rules": [18], "inclusive": false }, "acc_title": { "rules": [16], "inclusive": false }, "SCALE": { "rules": [13, 14, 30, 31], "inclusive": false }, "ALIAS": { "rules": [], "inclusive": false }, "STATE_ID": { "rules": [45], "inclusive": false }, "STATE_STRING": { "rules": [46, 47], "inclusive": false }, "FORK_STATE": { "rules": [], "inclusive": false }, "STATE": { "rules": [9, 10, 33, 34, 35, 36, 37, 38, 43, 44, 48, 49, 50], "inclusive": false }, "ID": { "rules": [9, 10], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 17, 19, 22, 26, 29, 32, 50, 54, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const DEFAULT_DIAGRAM_DIRECTION = "LR"; +const DEFAULT_NESTED_DOC_DIR = "TB"; +const STMT_STATE = "state"; +const STMT_RELATION = "relation"; +const STMT_CLASSDEF = "classDef"; +const STMT_APPLYCLASS = "applyClass"; +const DEFAULT_STATE_TYPE = "default"; +const DIVIDER_TYPE = "divider"; +const START_NODE = "[*]"; +const START_TYPE = "start"; +const END_NODE = START_NODE; +const END_TYPE = "end"; +const COLOR_KEYWORD = "color"; +const FILL_KEYWORD = "fill"; +const BG_FILL = "bgFill"; +const STYLECLASS_SEP = ","; +function newClassesList() { + return {}; +} +let direction = DEFAULT_DIAGRAM_DIRECTION; +let rootDoc = []; +let classes = newClassesList(); +const newDoc = () => { + return { + relations: [], + states: {}, + documents: {} + }; +}; +let documents = { + root: newDoc() +}; +let currentDocument = documents.root; +let startEndCount = 0; +let dividerCnt = 0; +const lineType = { + LINE: 0, + DOTTED_LINE: 1 +}; +const relationType = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3 +}; +const clone = (o) => JSON.parse(JSON.stringify(o)); +const setRootDoc = (o) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting root doc", o); + rootDoc = o; +}; +const getRootDoc = () => rootDoc; +const docTranslator = (parent, node, first) => { + if (node.stmt === STMT_RELATION) { + docTranslator(parent, node.state1, true); + docTranslator(parent, node.state2, false); + } else { + if (node.stmt === STMT_STATE) { + if (node.id === "[*]") { + node.id = first ? parent.id + "_start" : parent.id + "_end"; + node.start = first; + } else { + node.id = node.id.trim(); + } + } + if (node.doc) { + const doc = []; + let currentDoc = []; + let i; + for (i = 0; i < node.doc.length; i++) { + if (node.doc[i].type === DIVIDER_TYPE) { + const newNode = clone(node.doc[i]); + newNode.doc = clone(currentDoc); + doc.push(newNode); + currentDoc = []; + } else { + currentDoc.push(node.doc[i]); + } + } + if (doc.length > 0 && currentDoc.length > 0) { + const newNode = { + stmt: STMT_STATE, + id: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.I)(), + type: "divider", + doc: clone(currentDoc) + }; + doc.push(clone(newNode)); + node.doc = doc; + } + node.doc.forEach((docNode) => docTranslator(node, docNode, true)); + } + } +}; +const getRootDocV2 = () => { + docTranslator({ id: "root" }, { id: "root", doc: rootDoc }, true); + return { id: "root", doc: rootDoc }; +}; +const extract = (_doc) => { + let doc; + if (_doc.doc) { + doc = _doc.doc; + } else { + doc = _doc; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info(doc); + clear(true); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Extract", doc); + doc.forEach((item) => { + switch (item.stmt) { + case STMT_STATE: + addState( + item.id.trim(), + item.type, + item.doc, + item.description, + item.note, + item.classes, + item.styles, + item.textStyles + ); + break; + case STMT_RELATION: + addRelation(item.state1, item.state2, item.description); + break; + case STMT_CLASSDEF: + addStyleClass(item.id.trim(), item.classes); + break; + case STMT_APPLYCLASS: + setCssClass(item.id.trim(), item.styleClass); + break; + } + }); +}; +const addState = function(id, type = DEFAULT_STATE_TYPE, doc = null, descr = null, note = null, classes2 = null, styles2 = null, textStyles = null) { + const trimmedId = id == null ? void 0 : id.trim(); + if (currentDocument.states[trimmedId] === void 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Adding state ", trimmedId, descr); + currentDocument.states[trimmedId] = { + id: trimmedId, + descriptions: [], + type, + doc, + note, + classes: [], + styles: [], + textStyles: [] + }; + } else { + if (!currentDocument.states[trimmedId].doc) { + currentDocument.states[trimmedId].doc = doc; + } + if (!currentDocument.states[trimmedId].type) { + currentDocument.states[trimmedId].type = type; + } + } + if (descr) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state description", trimmedId, descr); + if (typeof descr === "string") { + addDescription(trimmedId, descr.trim()); + } + if (typeof descr === "object") { + descr.forEach((des) => addDescription(trimmedId, des.trim())); + } + } + if (note) { + currentDocument.states[trimmedId].note = note; + currentDocument.states[trimmedId].note.text = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText( + currentDocument.states[trimmedId].note.text, + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.c)() + ); + } + if (classes2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state classes", trimmedId, classes2); + const classesList = typeof classes2 === "string" ? [classes2] : classes2; + classesList.forEach((cssClass) => setCssClass(trimmedId, cssClass.trim())); + } + if (styles2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state styles", trimmedId, styles2); + const stylesList = typeof styles2 === "string" ? [styles2] : styles2; + stylesList.forEach((style) => setStyle(trimmedId, style.trim())); + } + if (textStyles) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Setting state styles", trimmedId, styles2); + const textStylesList = typeof textStyles === "string" ? [textStyles] : textStyles; + textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim())); + } +}; +const clear = function(saveCommon) { + documents = { + root: newDoc() + }; + currentDocument = documents.root; + startEndCount = 0; + classes = newClassesList(); + if (!saveCommon) { + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.v)(); + } +}; +const getState = function(id) { + return currentDocument.states[id]; +}; +const getStates = function() { + return currentDocument.states; +}; +const logDocuments = function() { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.l.info("Documents = ", documents); +}; +const getRelations = function() { + return currentDocument.relations; +}; +function startIdIfNeeded(id = "") { + let fixedId = id; + if (id === START_NODE) { + startEndCount++; + fixedId = `${START_TYPE}${startEndCount}`; + } + return fixedId; +} +function startTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) { + return id === START_NODE ? START_TYPE : type; +} +function endIdIfNeeded(id = "") { + let fixedId = id; + if (id === END_NODE) { + startEndCount++; + fixedId = `${END_TYPE}${startEndCount}`; + } + return fixedId; +} +function endTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) { + return id === END_NODE ? END_TYPE : type; +} +function addRelationObjs(item1, item2, relationTitle) { + let id1 = startIdIfNeeded(item1.id.trim()); + let type1 = startTypeIfNeeded(item1.id.trim(), item1.type); + let id2 = startIdIfNeeded(item2.id.trim()); + let type2 = startTypeIfNeeded(item2.id.trim(), item2.type); + addState( + id1, + type1, + item1.doc, + item1.description, + item1.note, + item1.classes, + item1.styles, + item1.textStyles + ); + addState( + id2, + type2, + item2.doc, + item2.description, + item2.note, + item2.classes, + item2.styles, + item2.textStyles + ); + currentDocument.relations.push({ + id1, + id2, + relationTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText(relationTitle, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.c)()) + }); +} +const addRelation = function(item1, item2, title) { + if (typeof item1 === "object") { + addRelationObjs(item1, item2, title); + } else { + const id1 = startIdIfNeeded(item1.trim()); + const type1 = startTypeIfNeeded(item1); + const id2 = endIdIfNeeded(item2.trim()); + const type2 = endTypeIfNeeded(item2); + addState(id1, type1); + addState(id2, type2); + currentDocument.relations.push({ + id1, + id2, + title: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText(title, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.c)()) + }); + } +}; +const addDescription = function(id, descr) { + const theState = currentDocument.states[id]; + const _descr = descr.startsWith(":") ? descr.replace(":", "").trim() : descr; + theState.descriptions.push(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.e.sanitizeText(_descr, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.c)())); +}; +const cleanupLabel = function(label) { + if (label.substring(0, 1) === ":") { + return label.substr(2).trim(); + } else { + return label.trim(); + } +}; +const getDividerId = () => { + dividerCnt++; + return "divider-id-" + dividerCnt; +}; +const addStyleClass = function(id, styleAttributes = "") { + if (classes[id] === void 0) { + classes[id] = { id, styles: [], textStyles: [] }; + } + const foundClass = classes[id]; + if (styleAttributes !== void 0 && styleAttributes !== null) { + styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => { + const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim(); + if (attrib.match(COLOR_KEYWORD)) { + const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL); + const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD); + foundClass.textStyles.push(newStyle2); + } + foundClass.styles.push(fixedAttrib); + }); + } +}; +const getClasses = function() { + return classes; +}; +const setCssClass = function(itemIds, cssClassName) { + itemIds.split(",").forEach(function(id) { + let foundState = getState(id); + if (foundState === void 0) { + const trimmedId = id.trim(); + addState(trimmedId); + foundState = getState(trimmedId); + } + foundState.classes.push(cssClassName); + }); +}; +const setStyle = function(itemId, styleText) { + const item = getState(itemId); + if (item !== void 0) { + item.textStyles.push(styleText); + } +}; +const setTextStyle = function(itemId, cssClassName) { + const item = getState(itemId); + if (item !== void 0) { + item.textStyles.push(cssClassName); + } +}; +const getDirection = () => direction; +const setDirection = (dir) => { + direction = dir; +}; +const trimColon = (str) => str && str[0] === ":" ? str.substr(1).trim() : str.trim(); +const db = { + getConfig: () => (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.c)().state, + addState, + clear, + getState, + getStates, + getRelations, + getClasses, + getDirection, + addRelation, + getDividerId, + setDirection, + cleanupLabel, + lineType, + relationType, + logDocuments, + getRootDoc, + setRootDoc, + getRootDocV2, + extract, + trimColon, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.g, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.s, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.a, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.b, + addStyleClass, + setCssClass, + addDescription, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_0__.t +}; +const getStyles = (options) => ` +defs #statediagram-barbEnd { + fill: ${options.transitionColor}; + stroke: ${options.transitionColor}; + } +g.stateGroup text { + fill: ${options.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${options.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${options.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; +} + +g.stateGroup line { + stroke: ${options.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${options.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${options.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${options.noteBorderColor}; + fill: ${options.noteBkgColor}; + + text { + fill: ${options.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${options.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${options.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel .label text { + fill: ${options.transitionLabelColor || options.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${options.transitionLabelColor || options.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${options.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${options.specialStateColor}; + stroke: ${options.specialStateColor}; +} + +.node .fork-join { + fill: ${options.specialStateColor}; + stroke: ${options.specialStateColor}; +} + +.node circle.state-end { + fill: ${options.innerEndBackground}; + stroke: ${options.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${options.compositeBackground || options.background}; + // stroke: ${options.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${options.stateBkg || options.mainBkg}; + stroke: ${options.stateBorder || options.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${options.mainBkg}; + stroke: ${options.stateBorder || options.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${options.lineColor}; +} + +.statediagram-cluster rect { + fill: ${options.compositeTitleBackground}; + stroke: ${options.stateBorder || options.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${options.stateLabelColor}; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${options.stateBorder || options.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${options.compositeBackground || options.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${options.altBackground ? options.altBackground : "#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${options.altBackground ? options.altBackground : "#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${options.noteBkgColor}; + stroke: ${options.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${options.noteBkgColor}; + stroke: ${options.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${options.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${options.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${options.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${options.lineColor}; + stroke: ${options.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; +} +`; +const styles = getStyles; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/69795df0.ec00bcca.js b/assets/js/69795df0.ec00bcca.js new file mode 100644 index 00000000..210c5948 --- /dev/null +++ b/assets/js/69795df0.ec00bcca.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[785],{6048:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var n=r(4848),s=r(8453);const i={title:"Ground rules",sidebar_position:3},o="Ground rules",l={id:"contribute/ground-rules",title:"Ground rules",description:"* Always make sure that the main branch is ready to deploy. If something break, we fix it as soon as possible.",source:"@site/docs/contribute/ground-rules.md",sourceDirName:"contribute",slug:"/contribute/ground-rules",permalink:"/tagreader-python/docs/contribute/ground-rules",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/contribute/ground-rules.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"Ground rules",sidebar_position:3},sidebar:"contribute",previous:{title:"Get started",permalink:"/tagreader-python/docs/contribute/how-to-start-contributing"},next:{title:"Developer guide",permalink:"/tagreader-python/docs/category/developer-guide"}},a={},u=[{value:"Pull Requests",id:"pull-requests",level:2},{value:"Git commit format",id:"git-commit-format",level:2}];function d(e){const t={a:"a",admonition:"admonition",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"ground-rules",children:"Ground rules"})}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Always make sure that the main branch is ready to deploy. If something break, we fix it as soon as possible."}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"pull-requests",children:"Pull Requests"}),"\n",(0,n.jsx)(t.p,{children:"Please try to make your pull request easy to review for us."}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Make small pull requests. The smaller, the faster to review and the more likely it will be merged soon."}),"\n"]}),"\n",(0,n.jsx)(t.admonition,{title:"GitHub Tips",type:"tip",children:(0,n.jsx)(t.p,{children:"When creating a Pull Request on GitHub, you can add Closes #<Issue number>. When you merge the PR, the issue\nwill automatically be closed."})}),"\n",(0,n.jsx)(t.h2,{id:"git-commit-format",children:"Git commit format"}),"\n",(0,n.jsxs)(t.p,{children:["We use ",(0,n.jsx)(t.a,{href:"https://www.conventionalcommits.org/en/v1.0.0/#summary",children:"conventional commits"})]})]})}function c(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}}}]); \ No newline at end of file diff --git a/assets/js/7121.4973c936.js b/assets/js/7121.4973c936.js new file mode 100644 index 00000000..9a84daa4 --- /dev/null +++ b/assets/js/7121.4973c936.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[7121],{646:(e,t,n)=>{n.d(t,{H:()=>l});var r=n(2933);function l(e,t){var n=e.append("foreignObject").attr("width","100000"),l=n.append("xhtml:div");l.attr("xmlns","http://www.w3.org/1999/xhtml");var o=t.label;switch(typeof o){case"function":l.insert(o);break;case"object":l.insert((function(){return o}));break;default:l.html(o)}r.AV(l,t.labelStyle),l.style("display","inline-block"),l.style("white-space","nowrap");var a=l.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},2933:(e,t,n)=>{n.d(t,{AV:()=>c,De:()=>o,c$:()=>p,gh:()=>a,nh:()=>d});var r=n(4963),l=n(9610);function o(e,t){return!!e.children(t).length}function a(e){return s(e.v)+":"+s(e.w)+":"+s(e.name)}var i=/:/g;function s(e){return e?String(e).replace(i,"\\:"):""}function c(e,t){t&&e.attr("style",t)}function d(e,t,n){t&&e.attr("class",t).attr("class",n+" "+e.attr("class"))}function p(e,t){var n=t.graph();if(r.A(n)){var o=n.transition;if(l.A(o))return o(e)}return e}},5937:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(2453),l=n(4886);const o=(e,t)=>r.A.lang.round(l.A.parse(e)[t])},9502:(e,t,n)=>{n.d(t,{diagram:()=>s});var r=n(6216),l=(n(697),n(6312));n(6257),n(8585),n(3068),n(8058),n(1176),n(2933);n(646);n(5664),n(1395);n(1942);l.lUB;var o=n(8696);n(4353),n(6750),n(2838),n(4075);const a={},i=function(e){const t=Object.keys(e);for(const n of t)a[n]=e[n]},s={parser:r.p,db:r.f,renderer:o.f,styles:o.a,init:e=>{e.flowchart||(e.flowchart={}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,i(e.flowchart),r.f.clear(),r.f.setGen("gen-1")}}},8696:(e,t,n)=>{n.d(t,{a:()=>f,f:()=>w});var r=n(697),l=n(6312),o=n(6257),a=n(2746),i=n(646),s=n(5937),c=n(5582);const d={},p=async function(e,t,n,r,l,a){const s=r.select(`[id="${n}"]`),c=Object.keys(e);for(const d of c){const n=e[d];let r="default";n.classes.length>0&&(r=n.classes.join(" ")),r+=" flowchart-label";const c=(0,o.k)(n.styles);let p,b=void 0!==n.text?n.text:n.id;if(o.l.info("vertex",n,n.labelType),"markdown"===n.labelType)o.l.info("vertex",n,n.labelType);else if((0,o.m)((0,o.c)().flowchart.htmlLabels)){const e={label:b};p=(0,i.H)(s,e).node(),p.parentNode.removeChild(p)}else{const e=l.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("style",c.labelStyle.replace("color:","fill:"));const t=b.split(o.e.lineBreakRegex);for(const n of t){const t=l.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","1"),t.textContent=n,e.appendChild(t)}p=e}let w=0,f="";switch(n.type){case"round":w=5,f="rect";break;case"square":case"group":default:f="rect";break;case"diamond":f="question";break;case"hexagon":f="hexagon";break;case"odd":case"odd_right":f="rect_left_inv_arrow";break;case"lean_right":f="lean_right";break;case"lean_left":f="lean_left";break;case"trapezoid":f="trapezoid";break;case"inv_trapezoid":f="inv_trapezoid";break;case"circle":f="circle";break;case"ellipse":f="ellipse";break;case"stadium":f="stadium";break;case"subroutine":f="subroutine";break;case"cylinder":f="cylinder";break;case"doublecircle":f="doublecircle"}const u=await(0,o.r)(b,(0,o.c)());t.setNode(n.id,{labelStyle:c.labelStyle,shape:f,labelText:u,labelType:n.labelType,rx:w,ry:w,class:r,style:c.style,id:n.id,link:n.link,linkTarget:n.linkTarget,tooltip:a.db.getTooltip(n.id)||"",domId:a.db.lookUpDomId(n.id),haveCallback:n.haveCallback,width:"group"===n.type?500:void 0,dir:n.dir,type:n.type,props:n.props,padding:(0,o.c)().flowchart.padding}),o.l.info("setNode",{labelStyle:c.labelStyle,labelType:n.labelType,shape:f,labelText:u,rx:w,ry:w,class:r,style:c.style,id:n.id,domId:a.db.lookUpDomId(n.id),width:"group"===n.type?500:void 0,type:n.type,dir:n.dir,props:n.props,padding:(0,o.c)().flowchart.padding})}},b=async function(e,t,n){o.l.info("abc78 edges = ",e);let r,a,i=0,s={};if(void 0!==e.defaultStyle){const t=(0,o.k)(e.defaultStyle);r=t.style,a=t.labelStyle}for(const c of e){i++;const n="L-"+c.start+"-"+c.end;void 0===s[n]?(s[n]=0,o.l.info("abc78 new entry",n,s[n])):(s[n]++,o.l.info("abc78 new entry",n,s[n]));let p=n+"-"+s[n];o.l.info("abc78 new link id to be used is",n,p,s[n]);const b="LS-"+c.start,w="LE-"+c.end,f={style:"",labelStyle:""};switch(f.minlen=c.length||1,"arrow_open"===c.type?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",c.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle"}let u="",h="";switch(c.stroke){case"normal":u="fill:none;",void 0!==r&&(u=r),void 0!==a&&(h=a),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;";break;case"invisible":f.thickness="invisible",f.pattern="solid",f.style="stroke-width: 0;fill:none;"}if(void 0!==c.style){const e=(0,o.k)(c.style);u=e.style,h=e.labelStyle}f.style=f.style+=u,f.labelStyle=f.labelStyle+=h,void 0!==c.interpolate?f.curve=(0,o.n)(c.interpolate,l.lUB):void 0!==e.defaultInterpolate?f.curve=(0,o.n)(e.defaultInterpolate,l.lUB):f.curve=(0,o.n)(d.curve,l.lUB),void 0===c.text?void 0!==c.style&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType=c.labelType,f.label=await(0,o.r)(c.text.replace(o.e.lineBreakRegex,"\n"),(0,o.c)()),void 0===c.style&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=p,f.classes="flowchart-link "+b+" "+w,t.setEdge(c.start,c.end,f,i)}},w={setConf:function(e){const t=Object.keys(e);for(const n of t)d[n]=e[n]},addVertices:p,addEdges:b,getClasses:function(e,t){return t.db.getClasses()},draw:async function(e,t,n,i){o.l.info("Drawing flowchart");let s=i.db.getDirection();void 0===s&&(s="TD");const{securityLevel:c,flowchart:d}=(0,o.c)(),w=d.nodeSpacing||50,f=d.rankSpacing||50;let u;"sandbox"===c&&(u=(0,l.Ltv)("#i"+t));const h="sandbox"===c?(0,l.Ltv)(u.nodes()[0].contentDocument.body):(0,l.Ltv)("body"),g="sandbox"===c?u.nodes()[0].contentDocument:document,y=new r.T({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:w,ranksep:f,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let k;const x=i.db.getSubGraphs();o.l.info("Subgraphs - ",x);for(let r=x.length-1;r>=0;r--)k=x[r],o.l.info("Subgraph - ",k),i.db.addVertex(k.id,{text:k.title,type:k.labelType},"group",void 0,k.classes,k.dir);const v=i.db.getVertices(),m=i.db.getEdges();o.l.info("Edges",m);let S=0;for(S=x.length-1;S>=0;S--){k=x[S],(0,l.Ubm)("cluster").append("text");for(let e=0;e<k.nodes.length;e++)o.l.info("Setting up subgraphs",k.nodes[e],k.id),y.setParent(k.nodes[e],k.id)}await p(v,y,t,h,g,i),await b(m,y);const T=h.select(`[id="${t}"]`),_=h.select("#"+t+" g");if(await(0,a.r)(_,y,["point","circle","cross"],"flowchart",t),o.u.insertTitle(T,"flowchartTitleText",d.titleTopMargin,i.db.getDiagramTitle()),(0,o.o)(y,T,d.diagramPadding,d.useMaxWidth),i.db.indexNodes("subGraph"+S),!d.htmlLabels){const e=g.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const t of e){const e=t.getBBox(),n=g.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("rx",0),n.setAttribute("ry",0),n.setAttribute("width",e.width),n.setAttribute("height",e.height),t.insertBefore(n,t.firstChild)}}Object.keys(v).forEach((function(e){const n=v[e];if(n.link){const r=(0,l.Ltv)("#"+t+' [id="'+e+'"]');if(r){const e=g.createElementNS("http://www.w3.org/2000/svg","a");e.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),e.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),e.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===c?e.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&e.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);const t=r.insert((function(){return e}),":first-child"),l=r.select(".label-container");l&&t.append((function(){return l.node()}));const o=r.select(".label");o&&t.append((function(){return o.node()}))}}}))}},f=e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${((e,t)=>{const n=s.A,r=n(e,"r"),l=n(e,"g"),o=n(e,"b");return c.A(r,l,o,t)})(e.edgeLabelBackground,.5)};\n // background-color: \n }\n\n .cluster rect {\n fill: ${e.clusterBkg};\n stroke: ${e.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n`}}]); \ No newline at end of file diff --git a/assets/js/7147.4c64959b.js b/assets/js/7147.4c64959b.js new file mode 100644 index 00000000..07c14eea --- /dev/null +++ b/assets/js/7147.4c64959b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[7147],{5937:(e,t,i)=>{i.d(t,{A:()=>r});var s=i(2453),n=i(4886);const r=(e,t)=>s.A.lang.round(n.A.parse(e)[t])},53:(e,t,i)=>{i.d(t,{A:()=>n});var s=i(1641);const n=function(e){return(0,s.A)(e,4)}},7147:(e,t,i)=>{i.d(t,{diagram:()=>K});var s,n,r=i(6257),l=i(53),o=i(5937),a=i(5582),c=i(8747),h=i(697),u=i(6312),d=(i(4353),i(6750),i(2838),function(){var e=function(e,t,i,s){for(i=i||{},s=e.length;s--;i[e[s]]=t);return i},t=[1,7],i=[1,13],s=[1,14],n=[1,15],r=[1,19],l=[1,16],o=[1,17],a=[1,18],c=[8,30],h=[8,21,28,29,30,31,32,40,44,47],u=[1,23],d=[1,24],g=[8,15,16,21,28,29,30,31,32,40,44,47],y=[8,15,16,21,27,28,29,30,31,32,40,44,47],p=[1,49],b={trace:function(){},yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:function(e,t,i,s,n,r,l){var o=r.length-1;switch(n){case 4:s.getLogger().debug("Rule: separator (NL) ");break;case 5:s.getLogger().debug("Rule: separator (Space) ");break;case 6:s.getLogger().debug("Rule: separator (EOF) ");break;case 7:s.getLogger().debug("Rule: hierarchy: ",r[o-1]),s.setHierarchy(r[o-1]);break;case 8:s.getLogger().debug("Stop NL ");break;case 9:s.getLogger().debug("Stop EOF ");break;case 10:s.getLogger().debug("Stop NL2 ");break;case 11:s.getLogger().debug("Stop EOF2 ");break;case 12:s.getLogger().debug("Rule: statement: ",r[o]),"number"==typeof r[o].length?this.$=r[o]:this.$=[r[o]];break;case 13:s.getLogger().debug("Rule: statement #2: ",r[o-1]),this.$=[r[o-1]].concat(r[o]);break;case 14:s.getLogger().debug("Rule: link: ",r[o],e),this.$={edgeTypeStr:r[o],label:""};break;case 15:s.getLogger().debug("Rule: LABEL link: ",r[o-3],r[o-1],r[o]),this.$={edgeTypeStr:r[o],label:r[o-1]};break;case 18:const t=parseInt(r[o]),i=s.generateId();this.$={id:i,type:"space",label:"",width:t,children:[]};break;case 23:s.getLogger().debug("Rule: (nodeStatement link node) ",r[o-2],r[o-1],r[o]," typestr: ",r[o-1].edgeTypeStr);const n=s.edgeStrToEdgeData(r[o-1].edgeTypeStr);this.$=[{id:r[o-2].id,label:r[o-2].label,type:r[o-2].type,directions:r[o-2].directions},{id:r[o-2].id+"-"+r[o].id,start:r[o-2].id,end:r[o].id,label:r[o-1].label,type:"edge",directions:r[o].directions,arrowTypeEnd:n,arrowTypeStart:"arrow_open"},{id:r[o].id,label:r[o].label,type:s.typeStr2Type(r[o].typeStr),directions:r[o].directions}];break;case 24:s.getLogger().debug("Rule: nodeStatement (abc88 node size) ",r[o-1],r[o]),this.$={id:r[o-1].id,label:r[o-1].label,type:s.typeStr2Type(r[o-1].typeStr),directions:r[o-1].directions,widthInColumns:parseInt(r[o],10)};break;case 25:s.getLogger().debug("Rule: nodeStatement (node) ",r[o]),this.$={id:r[o].id,label:r[o].label,type:s.typeStr2Type(r[o].typeStr),directions:r[o].directions,widthInColumns:1};break;case 26:s.getLogger().debug("APA123",this?this:"na"),s.getLogger().debug("COLUMNS: ",r[o]),this.$={type:"column-setting",columns:"auto"===r[o]?-1:parseInt(r[o])};break;case 27:s.getLogger().debug("Rule: id-block statement : ",r[o-2],r[o-1]),s.generateId(),this.$={...r[o-2],type:"composite",children:r[o-1]};break;case 28:s.getLogger().debug("Rule: blockStatement : ",r[o-2],r[o-1],r[o]);const l=s.generateId();this.$={id:l,type:"composite",label:"",children:r[o-1]};break;case 29:s.getLogger().debug("Rule: node (NODE_ID separator): ",r[o]),this.$={id:r[o]};break;case 30:s.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",r[o-1],r[o]),this.$={id:r[o-1],label:r[o].label,typeStr:r[o].typeStr,directions:r[o].directions};break;case 31:s.getLogger().debug("Rule: dirList: ",r[o]),this.$=[r[o]];break;case 32:s.getLogger().debug("Rule: dirList: ",r[o-1],r[o]),this.$=[r[o-1]].concat(r[o]);break;case 33:s.getLogger().debug("Rule: nodeShapeNLabel: ",r[o-2],r[o-1],r[o]),this.$={typeStr:r[o-2]+r[o],label:r[o-1]};break;case 34:s.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",r[o-3],r[o-2]," #3:",r[o-1],r[o]),this.$={typeStr:r[o-3]+r[o],label:r[o-2],directions:r[o-1]};break;case 35:case 36:this.$={type:"classDef",id:r[o-1].trim(),css:r[o].trim()};break;case 37:this.$={type:"applyClass",id:r[o-1].trim(),styleClass:r[o].trim()};break;case 38:this.$={type:"applyStyles",id:r[o-1].trim(),stylesStr:r[o].trim()}}},table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:i,29:s,31:n,32:r,40:l,44:o,47:a},{8:[1,20]},e(c,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:i,29:s,31:n,32:r,40:l,44:o,47:a}),e(h,[2,16],{14:22,15:u,16:d}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(g,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,32:r},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:i,29:s,31:n,32:r,40:l,44:o,47:a},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(y,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(c,[2,13]),{26:35,32:r},{32:[2,14]},{17:[1,36]},e(g,[2,24]),{11:37,13:4,14:22,15:u,16:d,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:i,29:s,31:n,32:r,40:l,44:o,47:a},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(g,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{37:[1,47]},{34:48,35:p},{15:[1,50]},e(h,[2,27]),e(y,[2,33]),{39:[1,51]},{34:52,35:p,39:[2,31]},{32:[2,15]},e(y,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:function(e,t){if(!t.recoverable){var i=new Error(e);throw i.hash=t,i}this.trace(e)},parse:function(e){var t=this,i=[0],s=[],n=[null],r=[],l=this.table,o="",a=0,c=0,h=r.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(d.yy[g]=this.yy[g]);u.setInput(e,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var y=u.yylloc;r.push(y);var p=u.options&&u.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,x,L,S,f,m,_,k,E,w={};;){if(x=i[i.length-1],this.defaultActions[x]?L=this.defaultActions[x]:(null==b&&(E=void 0,"number"!=typeof(E=s.pop()||u.lex()||1)&&(E instanceof Array&&(E=(s=E).pop()),E=t.symbols_[E]||E),b=E),L=l[x]&&l[x][b]),void 0===L||!L.length||!L[0]){var v="";for(f in k=[],l[x])this.terminals_[f]&&f>2&&k.push("'"+this.terminals_[f]+"'");v=u.showPosition?"Parse error on line "+(a+1)+":\n"+u.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(v,{text:u.match,token:this.terminals_[b]||b,line:u.yylineno,loc:y,expected:k})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(L[0]){case 1:i.push(b),n.push(u.yytext),r.push(u.yylloc),i.push(L[1]),b=null,c=u.yyleng,o=u.yytext,a=u.yylineno,y=u.yylloc;break;case 2:if(m=this.productions_[L[1]][1],w.$=n[n.length-m],w._$={first_line:r[r.length-(m||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(m||1)].first_column,last_column:r[r.length-1].last_column},p&&(w._$.range=[r[r.length-(m||1)].range[0],r[r.length-1].range[1]]),void 0!==(S=this.performAction.apply(w,[o,c,a,d.yy,L[1],n,r].concat(h))))return S;m&&(i=i.slice(0,-1*m*2),n=n.slice(0,-1*m),r=r.slice(0,-1*m)),i.push(this.productions_[L[1]][0]),n.push(w.$),r.push(w._$),_=l[i[i.length-2]][i[i.length-1]],i.push(_);break;case 3:return!0}}return!0}},x={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var s=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),i.length-1&&(this.yylineno-=i.length-1);var n=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:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var i,s,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,i,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((i=this._input.match(this.rules[n[r]]))&&(!t||i[0].length>t[0].length)){if(t=i,s=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(i,n[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[s]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>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(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,i,s){switch(i){case 0:return 10;case 1:return e.getLogger().debug("Found space-block"),31;case 2:return e.getLogger().debug("Found nl-block"),31;case 3:return e.getLogger().debug("Found space-block"),29;case 4:e.getLogger().debug(".",t.yytext);break;case 5:e.getLogger().debug("_",t.yytext);break;case 6:return 5;case 7:return t.yytext=-1,28;case 8:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.yytext),28;case 9:case 77:case 78:case 100:this.pushState("md_string");break;case 10:return"MD_STR";case 11:case 35:case 80:this.popState();break;case 12:this.pushState("string");break;case 13:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 14:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 15:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 16:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:case 41:case 42:case 45:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:case 50:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:case 60:case 61:case 62:case 65:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 63:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),38;case 75:return e.getLogger().debug("Lex: NODE_ID",t.yytext),32;case 76:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 79:return"NODE_DESCR";case 81:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 84:e.getLogger().debug("LEX POPPING"),this.popState();break;case 85:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 91:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 92:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 94:case 95:case 96:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 97:case 98:case 99:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 101:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 103:case 104:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 105:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}},rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};function L(){this.yy={}}return b.lexer=x,L.prototype=b,b.Parser=L,new L}());d.parser=d;const g=d;let y={},p=[],b={};const x="color",L="fill";let S={};const f=function(e,t=""){void 0===S[e]&&(S[e]={id:e,styles:[],textStyles:[]});const i=S[e];null!=t&&t.split(",").forEach((e=>{const t=e.replace(/([^;]*);/,"$1").trim();if(e.match(x)){const e=t.replace(L,"bgFill").replace(x,L);i.textStyles.push(e)}i.styles.push(t)}))},m=function(e,t=""){const i=y[e];null!=t&&(i.styles=t.split(","))},_=function(e,t){e.split(",").forEach((function(e){let i=y[e];if(void 0===i){const t=e.trim();y[t]={id:t,type:"na",children:[]},i=y[t]}i.classes||(i.classes=[]),i.classes.push(t)}))},k=(e,t)=>{const i=e.flat(),s=[];for(const n of i)if("classDef"!==n.type)if("applyClass"!==n.type)if("applyStyles"!==n.type)if("column-setting"===n.type)t.columns=n.columns||-1;else if("edge"===n.type)b[n.id]?b[n.id]++:b[n.id]=1,n.id=b[n.id]+"-"+n.id,p.push(n);else{n.label||("composite"===n.type?n.label="":n.label=n.id);const e=!y[n.id];if(e?y[n.id]=n:("na"!==n.type&&(y[n.id].type=n.type),n.label!==n.id&&(y[n.id].label=n.label)),n.children&&k(n.children,n),"space"===n.type){const e=n.width||1;for(let t=0;t<e;t++){const e=(0,l.A)(n);e.id=e.id+"-"+t,y[e.id]=e,s.push(e)}}else e&&s.push(n)}else(null==n?void 0:n.stylesStr)&&m(n.id,null==n?void 0:n.stylesStr);else _(n.id,(null==n?void 0:n.styleClass)||"");else f(n.id,n.css);t.children=s};let E=[],w={id:"root",type:"composite",children:[],columns:-1};let v=0;const D={getConfig:()=>(0,r.F)().block,typeStr2Type:function(e){switch(r.l.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return r.l.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}},edgeTypeStr2Type:function(e){return r.l.debug("typeStr2Type",e),"=="===e?"thick":"normal"},edgeStrToEdgeData:function(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}},getLogger:()=>console,getBlocksFlat:()=>[...Object.values(y)],getBlocks:()=>E||[],getEdges:()=>p,setHierarchy:e=>{w.children=e,k(e,w),E=w.children},getBlock:e=>y[e],setBlock:e=>{y[e.id]=e},getColumns:e=>{const t=y[e];return t?t.columns?t.columns:t.children?t.children.length:-1:-1},getClasses:function(){return S},clear:()=>{r.l.debug("Clear called"),(0,r.v)(),w={id:"root",type:"composite",children:[],columns:-1},y={root:w},E=[],S={},p=[],b={}},generateId:()=>(v++,"id-"+Math.random().toString(36).substr(2,12)+"-"+v)},$=(e,t)=>{const i=o.A,s=i(e,"r"),n=i(e,"g"),r=i(e,"b");return a.A(s,n,r,t)},N=e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${$(e.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${$(e.mainBkg,.5)};\n fill: ${$(e.clusterBkg,.5)};\n stroke: ${$(e.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n`;function I(e,t,i=!1){var s,n,l;const o=e;let a="default";((null==(s=null==o?void 0:o.classes)?void 0:s.length)||0)>0&&(a=((null==o?void 0:o.classes)||[]).join(" ")),a+=" flowchart-label";let c,h=0,u="";switch(o.type){case"round":h=5,u="rect";break;case"composite":h=0,u="composite",c=0;break;case"square":case"group":default:u="rect";break;case"diamond":u="question";break;case"hexagon":u="hexagon";break;case"block_arrow":u="block_arrow";break;case"odd":case"rect_left_inv_arrow":u="rect_left_inv_arrow";break;case"lean_right":u="lean_right";break;case"lean_left":u="lean_left";break;case"trapezoid":u="trapezoid";break;case"inv_trapezoid":u="inv_trapezoid";break;case"circle":u="circle";break;case"ellipse":u="ellipse";break;case"stadium":u="stadium";break;case"subroutine":u="subroutine";break;case"cylinder":u="cylinder";break;case"doublecircle":u="doublecircle"}const d=(0,r.k)((null==o?void 0:o.styles)||[]),g=o.label,y=o.size||{width:0,height:0,x:0,y:0};return{labelStyle:d.labelStyle,shape:u,labelText:g,rx:h,ry:h,class:a,style:d.style,id:o.id,directions:o.directions,width:y.width,height:y.height,x:y.x,y:y.y,positioned:i,intersect:void 0,type:o.type,padding:c??((null==(l=null==(n=(0,r.F)())?void 0:n.block)?void 0:l.padding)||0)}}async function T(e,t,i){const s=I(t,0,!1);if("group"===s.type)return;const n=await(0,c.e)(e,s),r=n.node().getBBox(),l=i.getBlock(s.id);l.size={width:r.width,height:r.height,x:0,y:0,node:n},i.setBlock(l),n.remove()}async function z(e,t,i){const s=I(t,0,!0);"space"!==i.getBlock(s.id).type&&(await(0,c.e)(e,s),t.intersect=null==s?void 0:s.intersect,(0,c.p)(s))}async function A(e,t,i,s){for(const n of t)await s(e,n,i),n.children&&await A(e,n.children,i,s)}const C=(null==(n=null==(s=(0,r.c)())?void 0:s.block)?void 0:n.padding)||8;function O(e,t){if(0===e||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(1===e)return{px:0,py:t};return{px:t%e,py:Math.floor(t/e)}}const R=e=>{let t=0,i=0;for(const s of e.children){const{width:n,height:l,x:o,y:a}=s.size||{width:0,height:0,x:0,y:0};r.l.debug("getMaxChildSize abc95 child:",s.id,"width:",n,"height:",l,"x:",o,"y:",a,s.type),"space"!==s.type&&(n>t&&(t=n/(e.widthInColumns||1)),l>i&&(i=l))}return{width:t,height:i}};function B(e,t,i=0,s=0){var n,l,o,a,c,h,u,d,g,y,p;r.l.debug("setBlockSizes abc95 (start)",e.id,null==(n=null==e?void 0:e.size)?void 0:n.x,"block width =",null==e?void 0:e.size,"sieblingWidth",i),(null==(l=null==e?void 0:e.size)?void 0:l.width)||(e.size={width:i,height:s,x:0,y:0});let b=0,x=0;if((null==(o=e.children)?void 0:o.length)>0){for(const i of e.children)B(i,t);const n=R(e);b=n.width,x=n.height,r.l.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",b,x);for(const t of e.children)t.size&&(r.l.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${b} ${x} ${t.size}`),t.size.width=b*(t.widthInColumns||1)+C*((t.widthInColumns||1)-1),t.size.height=x,t.size.x=0,t.size.y=0,r.l.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${b} maxHeight:${x}`));for(const i of e.children)B(i,t,b,x);const l=e.columns||-1;let o=0;for(const t of e.children)o+=t.widthInColumns||1;let d=e.children.length;l>0&&l<o&&(d=l),e.widthInColumns;const g=Math.ceil(o/d);let y=d*(b+C)+C,p=g*(x+C)+C;if(y<i){r.l.debug(`Detected to small siebling: abc95 ${e.id} sieblingWidth ${i} sieblingHeight ${s} width ${y}`),y=i,p=s;const t=(i-d*C-C)/d,n=(s-g*C-C)/g;r.l.debug("Size indata abc88",e.id,"childWidth",t,"maxWidth",b),r.l.debug("Size indata abc88",e.id,"childHeight",n,"maxHeight",x),r.l.debug("Size indata abc88 xSize",d,"padding",C);for(const i of e.children)i.size&&(i.size.width=t,i.size.height=n,i.size.x=0,i.size.y=0)}if(r.l.debug(`abc95 (finale calc) ${e.id} xSize ${d} ySize ${g} columns ${l}${e.children.length} width=${Math.max(y,(null==(a=e.size)?void 0:a.width)||0)}`),y<((null==(c=null==e?void 0:e.size)?void 0:c.width)||0)){y=(null==(h=null==e?void 0:e.size)?void 0:h.width)||0;const t=l>0?Math.min(e.children.length,l):e.children.length;if(t>0){const i=(y-t*C-C)/t;r.l.debug("abc95 (growing to fit) width",e.id,y,null==(u=e.size)?void 0:u.width,i);for(const t of e.children)t.size&&(t.size.width=i)}}e.size={width:y,height:p,x:0,y:0}}r.l.debug("setBlockSizes abc94 (done)",e.id,null==(d=null==e?void 0:e.size)?void 0:d.x,null==(g=null==e?void 0:e.size)?void 0:g.width,null==(y=null==e?void 0:e.size)?void 0:y.y,null==(p=null==e?void 0:e.size)?void 0:p.height)}function F(e,t){var i,s,n,l,o,a,c,h,u,d,g,y,p,b,x,L,S;r.l.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${null==(i=null==e?void 0:e.size)?void 0:i.x} y: ${null==(s=null==e?void 0:e.size)?void 0:s.y} width: ${null==(n=null==e?void 0:e.size)?void 0:n.width}`);const f=e.columns||-1;if(r.l.debug("layoutBlocks columns abc95",e.id,"=>",f,e),e.children&&e.children.length>0){const t=(null==(o=null==(l=null==e?void 0:e.children[0])?void 0:l.size)?void 0:o.width)||0,i=e.children.length*t+(e.children.length-1)*C;r.l.debug("widthOfChildren 88",i,"posX");let s=0;r.l.debug("abc91 block?.size?.x",e.id,null==(a=null==e?void 0:e.size)?void 0:a.x);let n=(null==(c=null==e?void 0:e.size)?void 0:c.x)?(null==(h=null==e?void 0:e.size)?void 0:h.x)+(-(null==(u=null==e?void 0:e.size)?void 0:u.width)/2||0):-C,x=0;for(const l of e.children){const t=e;if(!l.size)continue;const{width:i,height:o}=l.size,{px:a,py:c}=O(f,s);if(c!=x&&(x=c,n=(null==(d=null==e?void 0:e.size)?void 0:d.x)?(null==(g=null==e?void 0:e.size)?void 0:g.x)+(-(null==(y=null==e?void 0:e.size)?void 0:y.width)/2||0):-C,r.l.debug("New row in layout for block",e.id," and child ",l.id,x)),r.l.debug(`abc89 layout blocks (child) id: ${l.id} Pos: ${s} (px, py) ${a},${c} (${null==(p=null==t?void 0:t.size)?void 0:p.x},${null==(b=null==t?void 0:t.size)?void 0:b.y}) parent: ${t.id} width: ${i}${C}`),t.size){const e=i/2;l.size.x=n+C+e,r.l.debug(`abc91 layout blocks (calc) px, pyid:${l.id} startingPos=X${n} new startingPosX${l.size.x} ${e} padding=${C} width=${i} halfWidth=${e} => x:${l.size.x} y:${l.size.y} ${l.widthInColumns} (width * (child?.w || 1)) / 2 ${i*((null==l?void 0:l.widthInColumns)||1)/2}`),n=l.size.x+e,l.size.y=t.size.y-t.size.height/2+c*(o+C)+o/2+C,r.l.debug(`abc88 layout blocks (calc) px, pyid:${l.id}startingPosX${n}${C}${e}=>x:${l.size.x}y:${l.size.y}${l.widthInColumns}(width * (child?.w || 1)) / 2${i*((null==l?void 0:l.widthInColumns)||1)/2}`)}l.children&&F(l),s+=(null==l?void 0:l.widthInColumns)||1,r.l.debug("abc88 columnsPos",l,s)}}r.l.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${null==(x=null==e?void 0:e.size)?void 0:x.x} y: ${null==(L=null==e?void 0:e.size)?void 0:L.y} width: ${null==(S=null==e?void 0:e.size)?void 0:S.width}`)}function P(e,{minX:t,minY:i,maxX:s,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&"root"!==e.id){const{x:r,y:l,width:o,height:a}=e.size;r-o/2<t&&(t=r-o/2),l-a/2<i&&(i=l-a/2),r+o/2>s&&(s=r+o/2),l+a/2>n&&(n=l+a/2)}if(e.children)for(const r of e.children)({minX:t,minY:i,maxX:s,maxY:n}=P(r,{minX:t,minY:i,maxX:s,maxY:n}));return{minX:t,minY:i,maxX:s,maxY:n}}function Y(e){const t=e.getBlock("root");if(!t)return;B(t,e,0,0),F(t),r.l.debug("getBlocks",JSON.stringify(t,null,2));const{minX:i,minY:s,maxX:n,maxY:l}=P(t);return{x:i,y:s,width:n-i,height:l-s}}const K={parser:g,db:D,renderer:{draw:async function(e,t,i,s){const{securityLevel:n,block:l}=(0,r.F)(),o=s.db;let a;"sandbox"===n&&(a=(0,u.Ltv)("#i"+t));const d="sandbox"===n?(0,u.Ltv)(a.nodes()[0].contentDocument.body):(0,u.Ltv)("body"),g="sandbox"===n?d.select(`[id="${t}"]`):(0,u.Ltv)(`[id="${t}"]`);(0,c.a)(g,["point","circle","cross"],s.type,t);const y=o.getBlocks(),p=o.getBlocksFlat(),b=o.getEdges(),x=g.insert("g").attr("class","block");await async function(e,t,i){await A(e,t,i,T)}(x,y,o);const L=Y(o);if(await async function(e,t,i){await A(e,t,i,z)}(x,y,o),await async function(e,t,i,s,n){const r=new h.T({multigraph:!0,compound:!0});r.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const l of i)l.size&&r.setNode(l.id,{width:l.size.width,height:l.size.height,intersect:l.intersect});for(const l of t)if(l.start&&l.end){const t=s.getBlock(l.start),i=s.getBlock(l.end);if((null==t?void 0:t.size)&&(null==i?void 0:i.size)){const s=t.size,o=i.size,a=[{x:s.x,y:s.y},{x:s.x+(o.x-s.x)/2,y:s.y+(o.y-s.y)/2},{x:o.x,y:o.y}];await(0,c.h)(e,{v:l.start,w:l.end,name:l.id},{...l,arrowTypeEnd:l.arrowTypeEnd,arrowTypeStart:l.arrowTypeStart,points:a,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",r,n),l.label&&(await(0,c.f)(e,{...l,label:l.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:l.arrowTypeEnd,arrowTypeStart:l.arrowTypeStart,points:a,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),await(0,c.j)({...l,x:a[1].x,y:a[1].y},{originalPath:a}))}}}(x,b,p,o,t),L){const e=L,t=Math.max(1,Math.round(e.width/e.height*.125)),i=e.height+t+10,s=e.width+10,{useMaxWidth:n}=l;(0,r.i)(g,i,s,!!n),r.l.debug("Here Bounds",L,e),g.attr("viewBox",`${e.x-5} ${e.y-5} ${e.width+10} ${e.height+10}`)}(0,u.UMr)(u.zt)},getClasses:function(e,t){return t.db.getClasses()}},styles:N}}}]); \ No newline at end of file diff --git a/assets/js/7200.a1f6288d.js b/assets/js/7200.a1f6288d.js new file mode 100644 index 00000000..e520c517 --- /dev/null +++ b/assets/js/7200.a1f6288d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[7200],{7200:(t,i,e)=>{e.d(i,{diagram:()=>d});var a=e(6257),n=e(6312),r=(e(4353),e(6750),e(2838),function(){var t=function(t,i,e,a){for(e=e||{},a=t.length;a--;e[t[a]]=i);return e},i=[1,3],e=[1,4],a=[1,5],n=[1,6],r=[1,7],s=[1,5,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],l=[1,5,6,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],o=[32,33,34],h=[2,7],c=[1,13],d=[1,17],u=[1,18],x=[1,19],g=[1,20],f=[1,21],y=[1,22],p=[1,23],q=[1,24],T=[1,25],m=[1,26],A=[1,27],_=[1,30],b=[1,31],S=[1,32],k=[1,33],F=[1,34],P=[1,35],v=[1,36],L=[1,37],C=[1,38],z=[1,39],B=[1,40],E=[1,41],D=[1,42],I=[1,57],w=[1,58],R=[5,22,26,32,33,34,40,41,42,43,44,45,46,47,48,49,50,51],W={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,SPACE:5,QUADRANT:6,document:7,line:8,statement:9,axisDetails:10,quadrantDetails:11,points:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,text:21,point_start:22,point_x:23,point_y:24,"X-AXIS":25,"AXIS-TEXT-DELIMITER":26,"Y-AXIS":27,QUADRANT_1:28,QUADRANT_2:29,QUADRANT_3:30,QUADRANT_4:31,NEWLINE:32,SEMI:33,EOF:34,alphaNumToken:35,textNoTagsToken:36,STR:37,MD_STR:38,alphaNum:39,PUNCTUATION:40,AMP:41,NUM:42,ALPHA:43,COMMA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,UNDERSCORE:50,MINUS:51,$accept:0,$end:1},terminals_:{2:"error",5:"SPACE",6:"QUADRANT",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",22:"point_start",23:"point_x",24:"point_y",25:"X-AXIS",26:"AXIS-TEXT-DELIMITER",27:"Y-AXIS",28:"QUADRANT_1",29:"QUADRANT_2",30:"QUADRANT_3",31:"QUADRANT_4",32:"NEWLINE",33:"SEMI",34:"EOF",37:"STR",38:"MD_STR",40:"PUNCTUATION",41:"AMP",42:"NUM",43:"ALPHA",44:"COMMA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"UNDERSCORE",51:"MINUS"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[9,0],[9,2],[9,1],[9,1],[9,1],[9,2],[9,2],[9,2],[9,1],[9,1],[12,4],[10,4],[10,3],[10,2],[10,4],[10,3],[10,2],[11,2],[11,2],[11,2],[11,2],[4,1],[4,1],[4,1],[21,1],[21,2],[21,1],[21,1],[39,1],[39,2],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[36,1],[36,1],[36,1]],performAction:function(t,i,e,a,n,r,s){var l=r.length-1;switch(n){case 12:this.$=r[l].trim(),a.setDiagramTitle(this.$);break;case 13:this.$=r[l].trim(),a.setAccTitle(this.$);break;case 14:case 15:this.$=r[l].trim(),a.setAccDescription(this.$);break;case 16:a.addSection(r[l].substr(8)),this.$=r[l].substr(8);break;case 17:a.addPoint(r[l-3],r[l-1],r[l]);break;case 18:a.setXAxisLeftText(r[l-2]),a.setXAxisRightText(r[l]);break;case 19:r[l-1].text+=" \u27f6 ",a.setXAxisLeftText(r[l-1]);break;case 20:a.setXAxisLeftText(r[l]);break;case 21:a.setYAxisBottomText(r[l-2]),a.setYAxisTopText(r[l]);break;case 22:r[l-1].text+=" \u27f6 ",a.setYAxisBottomText(r[l-1]);break;case 23:a.setYAxisBottomText(r[l]);break;case 24:a.setQuadrant1Text(r[l]);break;case 25:a.setQuadrant2Text(r[l]);break;case 26:a.setQuadrant3Text(r[l]);break;case 27:a.setQuadrant4Text(r[l]);break;case 31:case 33:this.$={text:r[l],type:"text"};break;case 32:this.$={text:r[l-1].text+""+r[l],type:r[l-1].type};break;case 34:this.$={text:r[l],type:"markdown"};break;case 35:this.$=r[l];break;case 36:this.$=r[l-1]+""+r[l]}},table:[{3:1,4:2,5:i,6:e,32:a,33:n,34:r},{1:[3]},{3:8,4:2,5:i,6:e,32:a,33:n,34:r},{3:9,4:2,5:i,6:e,32:a,33:n,34:r},t(s,[2,4],{7:10}),t(l,[2,28]),t(l,[2,29]),t(l,[2,30]),{1:[2,1]},{1:[2,2]},t(o,h,{8:11,9:12,10:14,11:15,12:16,21:28,35:29,1:[2,3],5:c,13:d,15:u,17:x,19:g,20:f,25:y,27:p,28:q,29:T,30:m,31:A,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D}),t(s,[2,5]),{4:43,32:a,33:n,34:r},t(o,h,{10:14,11:15,12:16,21:28,35:29,9:44,5:c,13:d,15:u,17:x,19:g,20:f,25:y,27:p,28:q,29:T,30:m,31:A,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D}),t(o,[2,9]),t(o,[2,10]),t(o,[2,11]),{14:[1,45]},{16:[1,46]},{18:[1,47]},t(o,[2,15]),t(o,[2,16]),{21:48,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D},{21:49,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D},{21:50,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D},{21:51,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D},{21:52,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D},{21:53,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D},{5:I,22:[1,54],35:56,36:55,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w},t(R,[2,31]),t(R,[2,33]),t(R,[2,34]),t(R,[2,37]),t(R,[2,38]),t(R,[2,39]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(s,[2,6]),t(o,[2,8]),t(o,[2,12]),t(o,[2,13]),t(o,[2,14]),t(o,[2,20],{36:55,35:56,5:I,26:[1,59],40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,23],{36:55,35:56,5:I,26:[1,60],40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,24],{36:55,35:56,5:I,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,25],{36:55,35:56,5:I,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,26],{36:55,35:56,5:I,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,27],{36:55,35:56,5:I,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),{23:[1,61]},t(R,[2,32]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(o,[2,19],{35:29,21:62,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D}),t(o,[2,22],{35:29,21:63,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D}),{24:[1,64]},t(o,[2,18],{36:55,35:56,5:I,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,21],{36:55,35:56,5:I,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:B,49:E,50:D,51:w}),t(o,[2,17])],defaultActions:{8:[2,1],9:[2,2]},parseError:function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},parse:function(t){var i=this,e=[0],a=[],n=[null],r=[],s=this.table,l="",o=0,h=0,c=r.slice.call(arguments,1),d=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);d.setInput(t,u.yy),u.yy.lexer=d,u.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var f=d.options&&d.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,p,q,T,m,A,_,b,S,k={};;){if(p=e[e.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(null==y&&(S=void 0,"number"!=typeof(S=a.pop()||d.lex()||1)&&(S instanceof Array&&(S=(a=S).pop()),S=i.symbols_[S]||S),y=S),q=s[p]&&s[p][y]),void 0===q||!q.length||!q[0]){var F="";for(m in b=[],s[p])this.terminals_[m]&&m>2&&b.push("'"+this.terminals_[m]+"'");F=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+b.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(F,{text:d.match,token:this.terminals_[y]||y,line:d.yylineno,loc:g,expected:b})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+y);switch(q[0]){case 1:e.push(y),n.push(d.yytext),r.push(d.yylloc),e.push(q[1]),y=null,h=d.yyleng,l=d.yytext,o=d.yylineno,g=d.yylloc;break;case 2:if(A=this.productions_[q[1]][1],k.$=n[n.length-A],k._$={first_line:r[r.length-(A||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(A||1)].first_column,last_column:r[r.length-1].last_column},f&&(k._$.range=[r[r.length-(A||1)].range[0],r[r.length-1].range[1]]),void 0!==(T=this.performAction.apply(k,[l,h,o,u.yy,q[1],n,r].concat(c))))return T;A&&(e=e.slice(0,-1*A*2),n=n.slice(0,-1*A),r=r.slice(0,-1*A)),e.push(this.productions_[q[1]][0]),n.push(k.$),r.push(k._$),_=s[e[e.length-2]][e[e.length-1]],e.push(_);break;case 3:return!0}}return!0}},N={EOF:1,parseError:function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var a=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),e.length-1&&(this.yylineno-=e.length-1);var n=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:e?(e.length===a.length?this.yylloc.first_column:0)+a[a.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},test_match:function(t,i){var e,a,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,i,e,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((e=this._input.match(this.rules[n[r]]))&&(!i||e[0].length>i[0].length)){if(i=e,a=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,n[r])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,n[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,i,e,a){switch(e){case 0:case 1:case 3:break;case 2:return 32;case 4:return this.begin("title"),13;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),15;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),17;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 22:case 24:case 28:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 25;case 14:return 27;case 15:return 26;case 16:return 28;case 17:return 29;case 18:return 30;case 19:return 31;case 20:this.begin("md_string");break;case 21:return"MD_STR";case 23:this.begin("string");break;case 25:return"STR";case 26:return this.begin("point_start"),22;case 27:return this.begin("point_x"),23;case 29:this.popState(),this.begin("point_y");break;case 30:return this.popState(),24;case 31:return 6;case 32:return 43;case 33:return"COLON";case 34:return 45;case 35:return 44;case 36:case 37:return 46;case 38:return 47;case 39:return 49;case 40:return 50;case 41:return 48;case 42:return 41;case 43:return 51;case 44:return 42;case 45:return 5;case 46:return 33;case 47:return 40;case 48:return 34}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{point_y:{rules:[30],inclusive:!1},point_x:{rules:[29],inclusive:!1},point_start:{rules:[27,28],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[21,22],inclusive:!1},string:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,23,26,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};function U(){this.yy={}}return W.lexer=N,U.prototype=W,W.Parser=U,new U}());r.parser=r;const s=r,l=(0,a.E)();const o=(0,a.c)();function h(t){return(0,a.d)(t.trim(),o)}const c=new class{constructor(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var t,i,e,n,r,s,l,o,h,c,d,u,x,g,f,y,p,q;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:(null==(t=a.B.quadrantChart)?void 0:t.chartWidth)||500,chartWidth:(null==(i=a.B.quadrantChart)?void 0:i.chartHeight)||500,titlePadding:(null==(e=a.B.quadrantChart)?void 0:e.titlePadding)||10,titleFontSize:(null==(n=a.B.quadrantChart)?void 0:n.titleFontSize)||20,quadrantPadding:(null==(r=a.B.quadrantChart)?void 0:r.quadrantPadding)||5,xAxisLabelPadding:(null==(s=a.B.quadrantChart)?void 0:s.xAxisLabelPadding)||5,yAxisLabelPadding:(null==(l=a.B.quadrantChart)?void 0:l.yAxisLabelPadding)||5,xAxisLabelFontSize:(null==(o=a.B.quadrantChart)?void 0:o.xAxisLabelFontSize)||16,yAxisLabelFontSize:(null==(h=a.B.quadrantChart)?void 0:h.yAxisLabelFontSize)||16,quadrantLabelFontSize:(null==(c=a.B.quadrantChart)?void 0:c.quadrantLabelFontSize)||16,quadrantTextTopPadding:(null==(d=a.B.quadrantChart)?void 0:d.quadrantTextTopPadding)||5,pointTextPadding:(null==(u=a.B.quadrantChart)?void 0:u.pointTextPadding)||5,pointLabelFontSize:(null==(x=a.B.quadrantChart)?void 0:x.pointLabelFontSize)||12,pointRadius:(null==(g=a.B.quadrantChart)?void 0:g.pointRadius)||5,xAxisPosition:(null==(f=a.B.quadrantChart)?void 0:f.xAxisPosition)||"top",yAxisPosition:(null==(y=a.B.quadrantChart)?void 0:y.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:(null==(p=a.B.quadrantChart)?void 0:p.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:(null==(q=a.B.quadrantChart)?void 0:q.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:l.quadrant1Fill,quadrant2Fill:l.quadrant2Fill,quadrant3Fill:l.quadrant3Fill,quadrant4Fill:l.quadrant4Fill,quadrant1TextFill:l.quadrant1TextFill,quadrant2TextFill:l.quadrant2TextFill,quadrant3TextFill:l.quadrant3TextFill,quadrant4TextFill:l.quadrant4TextFill,quadrantPointFill:l.quadrantPointFill,quadrantPointTextFill:l.quadrantPointTextFill,quadrantXAxisTextFill:l.quadrantXAxisTextFill,quadrantYAxisTextFill:l.quadrantYAxisTextFill,quadrantTitleFill:l.quadrantTitleFill,quadrantInternalBorderStrokeFill:l.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:l.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),a.l.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}setConfig(t){a.l.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){a.l.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,i,e,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,r={top:"top"===t&&i?n:0,bottom:"bottom"===t&&i?n:0},s=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,l={left:"left"===this.config.yAxisPosition&&e?s:0,right:"right"===this.config.yAxisPosition&&e?s:0},o=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?o:0},c=this.config.quadrantPadding+l.left,d=this.config.quadrantPadding+r.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-l.left-l.right,x=this.config.chartHeight-2*this.config.quadrantPadding-r.top-r.bottom-h.top;return{xAxisSpace:r,yAxisSpace:l,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,i,e,a){const{quadrantSpace:n,titleSpace:r}=a,{quadrantHalfHeight:s,quadrantHeight:l,quadrantLeft:o,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&i&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:o+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+r.top:this.config.xAxisLabelPadding+c+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&i&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:o+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+r.top:this.config.xAxisLabelPadding+c+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&e&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+o+d+this.config.quadrantPadding,y:c+l-(x?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&e&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+o+d+this.config.quadrantPadding,y:c+s-(x?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:i}=t,{quadrantHalfHeight:e,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:r}=i,s=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:r,width:n,height:e,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:r,width:n,height:e,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:r+e,width:n,height:e,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:r+e,width:n,height:e,fill:this.themeConfig.quadrant4Fill}];for(const l of s)l.text.x=l.x+l.width/2,0===this.data.points.length?(l.text.y=l.y+l.height/2,l.text.horizontalPos="middle"):(l.text.y=l.y+this.config.quadrantTextTopPadding,l.text.horizontalPos="top");return s}getQuadrantPoints(t){const{quadrantSpace:i}=t,{quadrantHeight:e,quadrantLeft:a,quadrantTop:r,quadrantWidth:s}=i,l=(0,n.m4Y)().domain([0,1]).range([a,s+a]),o=(0,n.m4Y)().domain([0,1]).range([e+r,r]);return this.data.points.map((t=>({x:l(t.x),y:o(t.y),fill:this.themeConfig.quadrantPointFill,radius:this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:l(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0}})))}getBorders(t){const i=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:e}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:r,quadrantHalfWidth:s,quadrantTop:l,quadrantWidth:o}=e;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r-i,y1:l,x2:r+o+i,y2:l},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r+o,y1:l+i,x2:r+o,y2:l+n-i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r-i,y1:l+n,x2:r+o+i,y2:l+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r,y1:l+i,x2:r,y2:l+n-i},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:r+s,y1:l+i,x2:r+s,y2:l+n-i},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:r+i,y1:l+a,x2:r+o-i,y2:l+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),i=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),e=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,i,e);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,i,n),borderLines:this.getBorders(n),title:this.getTitle(e)}}};const d={parser:s,db:{setWidth:function(t){c.setConfig({chartWidth:t})},setHeight:function(t){c.setConfig({chartHeight:t})},setQuadrant1Text:function(t){c.setData({quadrant1Text:h(t.text)})},setQuadrant2Text:function(t){c.setData({quadrant2Text:h(t.text)})},setQuadrant3Text:function(t){c.setData({quadrant3Text:h(t.text)})},setQuadrant4Text:function(t){c.setData({quadrant4Text:h(t.text)})},setXAxisLeftText:function(t){c.setData({xAxisLeftText:h(t.text)})},setXAxisRightText:function(t){c.setData({xAxisRightText:h(t.text)})},setYAxisTopText:function(t){c.setData({yAxisTopText:h(t.text)})},setYAxisBottomText:function(t){c.setData({yAxisBottomText:h(t.text)})},addPoint:function(t,i,e){c.addPoints([{x:i,y:e,text:h(t.text)}])},getQuadrantData:function(){const t=(0,a.c)(),{themeVariables:i,quadrantChart:e}=t;return e&&c.setConfig(e),c.setThemeConfig({quadrant1Fill:i.quadrant1Fill,quadrant2Fill:i.quadrant2Fill,quadrant3Fill:i.quadrant3Fill,quadrant4Fill:i.quadrant4Fill,quadrant1TextFill:i.quadrant1TextFill,quadrant2TextFill:i.quadrant2TextFill,quadrant3TextFill:i.quadrant3TextFill,quadrant4TextFill:i.quadrant4TextFill,quadrantPointFill:i.quadrantPointFill,quadrantPointTextFill:i.quadrantPointTextFill,quadrantXAxisTextFill:i.quadrantXAxisTextFill,quadrantYAxisTextFill:i.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:i.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:i.quadrantInternalBorderStrokeFill,quadrantTitleFill:i.quadrantTitleFill}),c.setData({titleText:(0,a.t)()}),c.build()},clear:function(){c.clear(),(0,a.v)()},setAccTitle:a.s,getAccTitle:a.g,setDiagramTitle:a.q,getDiagramTitle:a.t,getAccDescription:a.a,setAccDescription:a.b},renderer:{draw:(t,i,e,r)=>{var s,l,o;function h(t){return"top"===t?"hanging":"middle"}function c(t){return"left"===t?"start":"middle"}function d(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}const u=(0,a.c)();a.l.debug("Rendering quadrant chart\n"+t);const x=u.securityLevel;let g;"sandbox"===x&&(g=(0,n.Ltv)("#i"+i));const f=("sandbox"===x?(0,n.Ltv)(g.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${i}"]`),y=f.append("g").attr("class","main"),p=(null==(s=u.quadrantChart)?void 0:s.chartWidth)||500,q=(null==(l=u.quadrantChart)?void 0:l.chartHeight)||500;(0,a.i)(f,q,p,(null==(o=u.quadrantChart)?void 0:o.useMaxWidth)||!0),f.attr("viewBox","0 0 "+p+" "+q),r.db.setHeight(q),r.db.setWidth(p);const T=r.db.getQuadrantData(),m=y.append("g").attr("class","quadrants"),A=y.append("g").attr("class","border"),_=y.append("g").attr("class","data-points"),b=y.append("g").attr("class","labels"),S=y.append("g").attr("class","title");T.title&&S.append("text").attr("x",0).attr("y",0).attr("fill",T.title.fill).attr("font-size",T.title.fontSize).attr("dominant-baseline",h(T.title.horizontalPos)).attr("text-anchor",c(T.title.verticalPos)).attr("transform",d(T.title)).text(T.title.text),T.borderLines&&A.selectAll("line").data(T.borderLines).enter().append("line").attr("x1",(t=>t.x1)).attr("y1",(t=>t.y1)).attr("x2",(t=>t.x2)).attr("y2",(t=>t.y2)).style("stroke",(t=>t.strokeFill)).style("stroke-width",(t=>t.strokeWidth));const k=m.selectAll("g.quadrant").data(T.quadrants).enter().append("g").attr("class","quadrant");k.append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)),k.append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>h(t.text.horizontalPos))).attr("text-anchor",(t=>c(t.text.verticalPos))).attr("transform",(t=>d(t.text))).text((t=>t.text.text));b.selectAll("g.label").data(T.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text((t=>t.text)).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>h(t.horizontalPos))).attr("text-anchor",(t=>c(t.verticalPos))).attr("transform",(t=>d(t)));const F=_.selectAll("g.data-point").data(T.points).enter().append("g").attr("class","data-point");F.append("circle").attr("cx",(t=>t.x)).attr("cy",(t=>t.y)).attr("r",(t=>t.radius)).attr("fill",(t=>t.fill)),F.append("text").attr("x",0).attr("y",0).text((t=>t.text.text)).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>h(t.text.horizontalPos))).attr("text-anchor",(t=>c(t.text.verticalPos))).attr("transform",(t=>d(t.text)))}},styles:()=>""}}}]); \ No newline at end of file diff --git a/assets/js/7211.a0650c88.js b/assets/js/7211.a0650c88.js new file mode 100644 index 00000000..6f29379b --- /dev/null +++ b/assets/js/7211.a0650c88.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[7211],{7211:(t,e,a)=>{a.d(e,{diagram:()=>at});var r=a(6257),s=a(6312),i=a(8886),n=a(6750),o=(a(4353),a(2838),function(){var t=function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],n=[1,11],o=[1,13],c=[1,14],l=[1,16],d=[1,17],h=[1,18],p=[1,24],g=[1,25],u=[1,26],x=[1,27],y=[1,28],m=[1,29],b=[1,30],f=[1,31],T=[1,32],E=[1,33],w=[1,34],P=[1,35],v=[1,36],_=[1,37],L=[1,38],k=[1,39],I=[1,41],M=[1,42],N=[1,43],A=[1,44],O=[1,45],S=[1,46],D=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],R=[4,5,16,50,52,53],C=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],Y=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],V=[68,69,70],F=[1,120],q={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,DOTTED_ARROW:74,SOLID_CROSS:75,DOTTED_CROSS:76,SOLID_POINT:77,DOTTED_POINT:78,TXT:79,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"DOTTED_ARROW",75:"SOLID_CROSS",76:"DOTTED_CROSS",77:"SOLID_POINT",78:"DOTTED_POINT",79:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 62:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1]};break;case 23:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1]};break;case 29:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 53:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 54:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 55:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-2],i[o]];break;case 63:this.$=r.PLACEMENT.LEFTOF;break;case 64:this.$=r.PLACEMENT.RIGHTOF;break;case 65:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1]}];break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4]}];break;case 67:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 68:this.$={type:"addParticipant",actor:i[o]};break;case 69:this.$=r.LINETYPE.SOLID_OPEN;break;case 70:this.$=r.LINETYPE.DOTTED_OPEN;break;case 71:this.$=r.LINETYPE.SOLID;break;case 72:this.$=r.LINETYPE.DOTTED;break;case 73:this.$=r.LINETYPE.SOLID_CROSS;break;case 74:this.$=r.LINETYPE.DOTTED_CROSS;break;case 75:this.$=r.LINETYPE.SOLID_POINT;break;case 76:this.$=r.LINETYPE.DOTTED_POINT;break;case 77:this.$=r.parseMessage(i[o].trim().substring(1))}},table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,12:12,13:o,14:c,17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},t(D,[2,5]),{9:47,12:12,13:o,14:c,17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},t(D,[2,7]),t(D,[2,8]),t(D,[2,14]),{12:48,50:_,52:L,53:k},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(D,[2,29]),t(D,[2,30]),{32:[1,61]},{34:[1,62]},t(D,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82]},{55:83,57:[1,84],65:[1,85],66:[1,86]},{22:87,70:S},{22:88,70:S},{22:89,70:S},{22:90,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79],[2,68]),t(D,[2,6]),t(D,[2,15]),t(R,[2,9],{10:91}),t(D,[2,17]),{5:[1,93],19:[1,92]},{5:[1,94]},t(D,[2,21]),{5:[1,95]},{5:[1,96]},t(D,[2,24]),t(D,[2,25]),t(D,[2,26]),t(D,[2,27]),t(D,[2,28]),t(D,[2,31]),t(D,[2,32]),t(C,s,{7:97}),t(C,s,{7:98}),t(C,s,{7:99}),t($,s,{40:100,7:101}),t(Y,s,{42:102,7:103}),t(Y,s,{7:103,42:104}),t(B,s,{45:105,7:106}),t(C,s,{7:107}),{5:[1,109],51:[1,108]},{5:[1,111],51:[1,110]},{5:[1,112]},{22:115,68:[1,113],69:[1,114],70:S},t(V,[2,69]),t(V,[2,70]),t(V,[2,71]),t(V,[2,72]),t(V,[2,73]),t(V,[2,74]),t(V,[2,75]),t(V,[2,76]),{22:116,70:S},{22:118,58:117,70:S},{70:[2,63]},{70:[2,64]},{56:119,79:F},{56:121,79:F},{56:122,79:F},{56:123,79:F},{4:[1,126],5:[1,128],11:125,12:127,16:[1,124],50:_,52:L,53:k},{5:[1,129]},t(D,[2,19]),t(D,[2,20]),t(D,[2,22]),t(D,[2,23]),{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[1,130],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[1,131],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[1,132],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{16:[1,133]},{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[2,46],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,49:[1,134],50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{16:[1,135]},{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[2,44],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,48:[1,136],50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{16:[1,137]},{16:[1,138]},{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[2,42],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,47:[1,139],50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{4:i,5:n,8:8,9:10,12:12,13:o,14:c,16:[1,140],17:15,18:l,21:d,22:40,23:h,24:19,25:20,26:21,27:22,28:23,29:p,30:g,31:u,33:x,35:y,36:m,37:b,38:f,39:T,41:E,43:w,44:P,46:v,50:_,52:L,53:k,54:I,59:M,60:N,61:A,62:O,70:S},{15:[1,141]},t(D,[2,49]),{15:[1,142]},t(D,[2,51]),t(D,[2,52]),{22:143,70:S},{22:144,70:S},{56:145,79:F},{56:146,79:F},{56:147,79:F},{64:[1,148],79:[2,62]},{5:[2,55]},{5:[2,77]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(D,[2,16]),t(R,[2,10]),{12:149,50:_,52:L,53:k},t(R,[2,12]),t(R,[2,13]),t(D,[2,18]),t(D,[2,34]),t(D,[2,35]),t(D,[2,36]),t(D,[2,37]),{15:[1,150]},t(D,[2,38]),{15:[1,151]},t(D,[2,39]),t(D,[2,40]),{15:[1,152]},t(D,[2,41]),{5:[1,153]},{5:[1,154]},{56:155,79:F},{56:156,79:F},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:157,70:S},t(R,[2,11]),t($,s,{7:101,40:158}),t(Y,s,{7:103,42:159}),t(B,s,{7:106,45:160}),t(D,[2,48]),t(D,[2,50]),{5:[2,65]},{5:[2,66]},{79:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],85:[2,63],86:[2,64],119:[2,55],120:[2,77],121:[2,56],122:[2,57],123:[2,58],145:[2,67],146:[2,53],147:[2,54],155:[2,65],156:[2,66],157:[2,61],158:[2,47],159:[2,45],160:[2,43]},parseError:function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)},parse:function(t){var e=this,a=[0],r=[],s=[null],i=[],n=this.table,o="",c=0,l=0,d=i.slice.call(arguments,1),h=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);h.setInput(t,p.yy),p.yy.lexer=h,p.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var u=h.yylloc;i.push(u);var x=h.options&&h.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,m,b,f,T,E,w,P,v,_={};;){if(m=a[a.length-1],this.defaultActions[m]?b=this.defaultActions[m]:(null==y&&(v=void 0,"number"!=typeof(v=r.pop()||h.lex()||1)&&(v instanceof Array&&(v=(r=v).pop()),v=e.symbols_[v]||v),y=v),b=n[m]&&n[m][y]),void 0===b||!b.length||!b[0]){var L="";for(T in P=[],n[m])this.terminals_[T]&&T>2&&P.push("'"+this.terminals_[T]+"'");L=h.showPosition?"Parse error on line "+(c+1)+":\n"+h.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(L,{text:h.match,token:this.terminals_[y]||y,line:h.yylineno,loc:u,expected:P})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+y);switch(b[0]){case 1:a.push(y),s.push(h.yytext),i.push(h.yylloc),a.push(b[1]),y=null,l=h.yyleng,o=h.yytext,c=h.yylineno,u=h.yylloc;break;case 2:if(E=this.productions_[b[1]][1],_.$=s[s.length-E],_._$={first_line:i[i.length-(E||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(E||1)].first_column,last_column:i[i.length-1].last_column},x&&(_._$.range=[i[i.length-(E||1)].range[0],i[i.length-1].range[1]]),void 0!==(f=this.performAction.apply(_,[o,l,c,p.yy,b[1],s,i].concat(d))))return f;E&&(a=a.slice(0,-1*E*2),s=s.slice(0,-1*E),i=i.slice(0,-1*E)),a.push(this.productions_[b[1]][0]),s.push(_.$),i.push(_._$),w=n[a[a.length-2]][a[a.length-1]],a.push(w);break;case 3:return!0}}return!0}},W={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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),a.length-1&&(this.yylineno-=a.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in s)this[i]=s[i];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,a,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),i=0;i<s.length;i++)if((a=this._input.match(this.rules[s[i]]))&&(!e||a[0].length>e[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,a,r){switch(a){case 0:case 51:case 64:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 71;case 56:return 72;case 57:return 75;case 58:return 76;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 68;case 63:return 69;case 65:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65],inclusive:!0}}};function z(){this.yy={}}return q.lexer=W,z.prototype=q,q.Parser=z,new z}());o.parser=o;const c=o;const l=new class{constructor(t){this.init=t,this.records=this.init()}reset(){this.records=this.init()}}((()=>({prevActor:void 0,actors:{},createdActors:{},destroyedActors:{},boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0}))),d=function(t,e,a,r){let s=l.records.currentBox;const i=l.records.actors[t];if(i){if(l.records.currentBox&&i.box&&l.records.currentBox!==i.box)throw new Error("A same participant should only be defined in one Box: "+i.name+" can't be in '"+i.box.name+"' and in '"+l.records.currentBox.name+"' at the same time.");if(s=i.box?i.box:l.records.currentBox,i.box=s,i&&e===i.name&&null==a)return}null!=a&&null!=a.text||(a={text:e,wrap:null,type:r}),null!=r&&null!=a.text||(a={text:e,wrap:null,type:r}),l.records.actors[t]={box:s,name:e,description:a.text,wrap:void 0===a.wrap&&g()||!!a.wrap,prevActor:l.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r||"participant"},l.records.prevActor&&l.records.actors[l.records.prevActor]&&(l.records.actors[l.records.prevActor].nextActor=t),l.records.currentBox&&l.records.currentBox.actorKeys.push(t),l.records.prevActor=t},h=function(t,e,a={text:void 0,wrap:void 0},r,s=!1){if(r===u.ACTIVE_END){if((t=>{let e,a=0;for(e=0;e<l.records.messages.length;e++)l.records.messages[e].type===u.ACTIVE_START&&l.records.messages[e].from.actor===t&&a++,l.records.messages[e].type===u.ACTIVE_END&&l.records.messages[e].from.actor===t&&a--;return a})(t.actor)<1){let e=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return l.records.messages.push({from:t,to:e,message:a.text,wrap:void 0===a.wrap&&g()||!!a.wrap,type:r,activate:s}),!0},p=function(t){return l.records.actors[t]},g=()=>void 0!==l.records.wrapEnabled?l.records.wrapEnabled:(0,r.c)().sequence.wrap,u={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32},x=function(t,e,a){const r={actor:t,placement:e,message:a.text,wrap:void 0===a.wrap&&g()||!!a.wrap},s=[].concat(t,t);l.records.notes.push(r),l.records.messages.push({from:s[0],to:s[1],message:a.text,wrap:void 0===a.wrap&&g()||!!a.wrap,type:u.NOTE,placement:e})},y=function(t,e){const a=p(t);try{let t=(0,r.d)(e.text,(0,r.c)());t=t.replace(/&/g,"&"),t=t.replace(/=/g,"=");m(a,JSON.parse(t))}catch(s){r.l.error("error while parsing actor link text",s)}};function m(t,e){if(null==t.links)t.links=e;else for(let a in e)t.links[a]=e[a]}const b=function(t,e){const a=p(t);try{let t=(0,r.d)(e.text,(0,r.c)());f(a,JSON.parse(t))}catch(s){r.l.error("error while parsing actor properties text",s)}};function f(t,e){if(null==t.properties)t.properties=e;else for(let a in e)t.properties[a]=e[a]}const T=function(t,e){const a=p(t),s=document.getElementById(e.text);try{const t=s.innerHTML,e=JSON.parse(t);e.properties&&f(a,e.properties),e.links&&m(a,e.links)}catch(i){r.l.error("error while parsing actor details text",i)}},E=function(t){if(Array.isArray(t))t.forEach((function(t){E(t)}));else switch(t.type){case"sequenceIndex":l.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":d(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(l.records.actors[t.actor])throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");l.records.lastCreated=t.actor,d(t.actor,t.actor,t.description,t.draw),l.records.createdActors[t.actor]=l.records.messages.length;break;case"destroyParticipant":l.records.lastDestroyed=t.actor,l.records.destroyedActors[t.actor]=l.records.messages.length;break;case"activeStart":case"activeEnd":h(t.actor,void 0,void 0,t.signalType);break;case"addNote":x(t.actor,t.placement,t.text);break;case"addLinks":y(t.actor,t.text);break;case"addALink":!function(t,e){const a=p(t);try{const t={};let o=(0,r.d)(e.text,(0,r.c)());var s=o.indexOf("@");o=o.replace(/&/g,"&"),o=o.replace(/=/g,"=");var i=o.slice(0,s-1).trim(),n=o.slice(s+1).trim();t[i]=n,m(a,t)}catch(o){r.l.error("error while parsing actor link text",o)}}(t.actor,t.text);break;case"addProperties":b(t.actor,t.text);break;case"addDetails":T(t.actor,t.text);break;case"addMessage":if(l.records.lastCreated){if(t.to!==l.records.lastCreated)throw new Error("The created participant "+l.records.lastCreated+" does not have an associated creating message after its declaration. Please check the sequence diagram.");l.records.lastCreated=void 0}else if(l.records.lastDestroyed){if(t.to!==l.records.lastDestroyed&&t.from!==l.records.lastDestroyed)throw new Error("The destroyed participant "+l.records.lastDestroyed+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");l.records.lastDestroyed=void 0}h(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":e=t.boxData,l.records.boxes.push({name:e.text,wrap:void 0===e.wrap&&g()||!!e.wrap,fill:e.color,actorKeys:[]}),l.records.currentBox=l.records.boxes.slice(-1)[0];break;case"boxEnd":l.records.currentBox=void 0;break;case"loopStart":h(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":h(void 0,void 0,void 0,t.signalType);break;case"rectStart":h(void 0,void 0,t.color,t.signalType);break;case"optStart":h(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":h(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,r.s)(t.text);break;case"parStart":case"and":h(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":h(void 0,void 0,t.criticalText,t.signalType);break;case"option":h(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":h(void 0,void 0,t.breakText,t.signalType)}var e},w={addActor:d,addMessage:function(t,e,a,r){l.records.messages.push({from:t,to:e,message:a.text,wrap:void 0===a.wrap&&g()||!!a.wrap,answer:r})},addSignal:h,addLinks:y,addDetails:T,addProperties:b,autoWrap:g,setWrap:function(t){l.records.wrapEnabled=t},enableSequenceNumbers:function(){l.records.sequenceNumbersEnabled=!0},disableSequenceNumbers:function(){l.records.sequenceNumbersEnabled=!1},showSequenceNumbers:()=>l.records.sequenceNumbersEnabled,getMessages:function(){return l.records.messages},getActors:function(){return l.records.actors},getCreatedActors:function(){return l.records.createdActors},getDestroyedActors:function(){return l.records.destroyedActors},getActor:p,getActorKeys:function(){return Object.keys(l.records.actors)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getAccTitle:r.g,getBoxes:function(){return l.records.boxes},getDiagramTitle:r.t,setDiagramTitle:r.q,getConfig:()=>(0,r.c)().sequence,clear:function(){l.reset(),(0,r.v)()},parseMessage:function(t){const e=t.trim(),a={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^:?wrap:/)||null===e.match(/^:?nowrap:/)&&void 0};return r.l.debug("parseMessage:",a),a},parseBoxData:function(t){const e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let a=null!=e&&e[1]?e[1].trim():"transparent",s=null!=e&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",a)||(a="transparent",s=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",s=t.trim())}return{color:a,text:void 0!==s?(0,r.d)(s.replace(/^:?(?:no)?wrap:/,""),(0,r.c)()):void 0,wrap:void 0!==s?null!==s.match(/^:?wrap:/)||null===s.match(/^:?nowrap:/)&&void 0:void 0}},LINETYPE:u,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:x,setAccTitle:r.s,apply:E,setAccDescription:r.b,getAccDescription:r.a,hasAtLeastOneBox:function(){return l.records.boxes.length>0},hasAtLeastOneBoxWithTitle:function(){return l.records.boxes.some((t=>t.name))}},P=t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`,v="actor-top",_="actor-bottom",L=function(t,e){return(0,i.d)(t,e)},k=async function(t,e,a=null){let s=t.append("foreignObject");const i=await(0,r.r)(e.text,(0,r.F)()),n=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(s.attr("height",Math.round(n.height)).attr("width",Math.round(n.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",n.height+2*e.textMargin);const r=a.getBBox();s.attr("x",Math.round(r.x+r.width/2-n.width/2)).attr("y",Math.round(r.y+r.height/2-n.height/2))}else if(a){let{startx:t,stopx:r,starty:i}=a;if(t>r){const e=t;t=r,r=e}s.attr("x",Math.round(t+Math.abs(t-r)/2-n.width/2)),"loopText"===e.class?s.attr("y",Math.round(i)):s.attr("y",Math.round(i-n.height))}return[s]},I=function(t,e){let a=0,s=0;const i=e.text.split(r.e.lineBreakRegex),[n,o]=(0,r.D)(e.fontSize);let c=[],l=0,d=()=>e.y;if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":d=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":d=()=>Math.round(e.y+(a+s+e.textMargin)/2);break;case"bottom":case"end":d=()=>Math.round(e.y+(a+s+2*e.textMargin)-e.textMargin)}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[h,p]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==n&&(l=h*n);const i=t.append("text");i.attr("x",e.x),i.attr("y",d()),void 0!==e.anchor&&i.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&i.style("font-family",e.fontFamily),void 0!==o&&i.style("font-size",o),void 0!==e.fontWeight&&i.style("font-weight",e.fontWeight),void 0!==e.fill&&i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class),void 0!==e.dy?i.attr("dy",e.dy):0!==l&&i.attr("dy",l);const g=p||r.Z;if(e.tspan){const t=i.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(g)}else i.text(g);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(s+=(i._groups||i)[0][0].getBBox().height,a=s),c.push(i)}return c},M=function(t,e){const a=t.append("polygon");var r,s,i,n,o;return a.attr("points",(r=e.x,s=e.y,i=e.width,n=e.height,r+","+s+" "+(r+i)+","+s+" "+(r+i)+","+(s+n-(o=7))+" "+(r+i-1.2*o)+","+(s+n)+" "+r+","+(s+n))),a.attr("class","labelBox"),e.y=e.y+e.height/2,I(t,e),a};let N=-1;const A=(t,e,a,r)=>{t.select&&a.forEach((a=>{const s=e[a],i=t.select("#actor"+s.actorCnt);!r.mirrorActors&&s.stopy?i.attr("y2",s.stopy+s.height/2):r.mirrorActors&&i.attr("y2",s.stopy)}))},O=function(t,e){(0,i.a)(t,e)},S=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},D=function(){function t(t,e,a,r,s,n,o){i(e.append("text").attr("x",a+s/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,s,n,o,c,l){const{actorFontSize:d,actorFontFamily:h,actorFontWeight:p}=l,[g,u]=(0,r.D)(d),x=t.split(r.e.lineBreakRegex);for(let r=0;r<x.length;r++){const t=r*g-g*(x.length-1)/2,l=e.append("text").attr("x",a+n/2).attr("y",s).style("text-anchor","middle").style("font-size",u).style("font-weight",p).style("font-family",h);l.append("tspan").attr("x",a+n/2).attr("dy",t).text(x[r]),l.attr("y",s+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(l,c)}}function a(t,a,r,s,n,o,c,l){const d=a.append("switch"),h=d.append("foreignObject").attr("x",r).attr("y",s).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,r,s,n,o,c,l),i(h,c)}async function s(t,a,s,n,o,c,l,d){const h=await(0,r.H)(t,(0,r.F)()),p=a.append("switch"),g=p.append("foreignObject").attr("x",s+o/2-h.width/2).attr("y",n+c/2-h.height/2).attr("width",h.width).attr("height",h.height).append("xhtml:div").style("height","100%").style("width","100%");g.append("div").style("text-align","center").style("vertical-align","middle").html(await(0,r.r)(t,(0,r.F)())),e(t,p,s,n,o,c,l,d),i(g,l)}function i(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return function(r,i=!1){return i?s:"fo"===r.textPlacement?a:"old"===r.textPlacement?t:e}}(),R=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a).attr("y",r).style("text-anchor","start").text(t),o)}function e(t,e,a,i,n,o,c,l){const{actorFontSize:d,actorFontFamily:h,actorFontWeight:p}=l,g=t.split(r.e.lineBreakRegex);for(let r=0;r<g.length;r++){const t=r*d-d*(g.length-1)/2,n=e.append("text").attr("x",a).attr("y",i).style("text-anchor","start").style("font-size",d).style("font-weight",p).style("font-family",h);n.append("tspan").attr("x",a).attr("dy",t).text(g[r]),n.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(n,c)}}function a(t,a,r,i,n,o,c,l){const d=a.append("switch"),h=d.append("foreignObject").attr("x",r).attr("y",i).attr("width",n).attr("height",o).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,r,i,0,o,c,l),s(h,c)}function s(t,e){for(const a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return function(r){return"fo"===r.textPlacement?a:"old"===r.textPlacement?t:e}}(),C={drawRect:L,drawText:I,drawLabel:M,drawActor:async function(t,e,a,s){switch(e.type){case"actor":return await async function(t,e,a,s){const n=s?e.stopy:e.starty,o=e.x+e.width/2,c=n+80;t.lower(),s||(N++,t.append("line").attr("id","actor"+N).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),e.actorCnt=N);const l=t.append("g");let d="actor-man";d+=s?` ${_}`:` ${v}`,l.attr("class",d),l.attr("name",e.name);const h=(0,i.g)();h.x=e.x,h.y=n,h.fill="#eaeaea",h.width=e.width,h.height=e.height,h.class="actor",h.rx=3,h.ry=3,l.append("line").attr("id","actor-man-torso"+N).attr("x1",o).attr("y1",n+25).attr("x2",o).attr("y2",n+45),l.append("line").attr("id","actor-man-arms"+N).attr("x1",o-18).attr("y1",n+33).attr("x2",o+18).attr("y2",n+33),l.append("line").attr("x1",o-18).attr("y1",n+60).attr("x2",o).attr("y2",n+45),l.append("line").attr("x1",o).attr("y1",n+45).attr("x2",o+18-2).attr("y2",n+60);const p=l.append("circle");p.attr("cx",e.x+e.width/2),p.attr("cy",n+10),p.attr("r",15),p.attr("width",e.width),p.attr("height",e.height);const g=l.node().getBBox();return e.height=g.height,await D(a,(0,r.G)(e.description))(e.description,l,h.x,h.y+35,h.width,h.height,{class:"actor"},a),e.height}(t,e,a,s);case"participant":return await async function(t,e,a,s){const n=s?e.stopy:e.starty,o=e.x+e.width/2,c=n+5,l=t.append("g").lower();var d,h=l;s||(N++,Object.keys(e.links||{}).length&&!a.forceMenus&&h.attr("onclick",(d=`actor${N}_popup`,"var pu = document.getElementById('"+d+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }")).attr("cursor","pointer"),h.append("line").attr("id","actor"+N).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),h=l.append("g"),e.actorCnt=N,null!=e.links&&h.attr("id","root-"+N));const p=(0,i.g)();var g="actor";null!=e.properties&&e.properties.class?g=e.properties.class:p.fill="#eaeaea",g+=s?` ${_}`:` ${v}`,p.x=e.x,p.y=n,p.width=e.width,p.height=e.height,p.class=g,p.rx=3,p.ry=3,p.name=e.name;const u=L(h,p);if(e.rectData=p,null!=e.properties&&e.properties.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,i.b)(h,p.x+p.width-20,p.y+10,t.substr(1)):(0,i.c)(h,p.x+p.width-20,p.y+10,t)}await D(a,(0,r.G)(e.description))(e.description,h,p.x,p.y,p.width,p.height,{class:"actor"},a);let x=e.height;if(u.node){const t=u.node().getBBox();e.height=t.height,x=t.height}return x}(t,e,a,s)}},drawBox:async function(t,e,a){const r=t.append("g");O(r,e),e.name&&await D(a)(e.name,r,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),r.lower()},drawPopup:function(t,e,a,r,s){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const i=e.links,o=e.actorCnt,c=e.rectData;var l="none";s&&(l="block !important");const d=t.append("g");d.attr("id","actor"+o+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",l);var h="";void 0!==c.class&&(h=" "+c.class);let p=c.width>a?c.width:a;const g=d.append("rect");if(g.attr("class","actorPopupMenuPanel"+h),g.attr("x",c.x),g.attr("y",c.height),g.attr("fill",c.fill),g.attr("stroke",c.stroke),g.attr("width",p),g.attr("height",c.height),g.attr("rx",c.rx),g.attr("ry",c.ry),null!=i){var u=20;for(let t in i){var x=d.append("a"),y=(0,n.Jf)(i[t]);x.attr("xlink:href",y),x.attr("target","_blank"),R(r)(t,x,c.x+10,c.height+u,p,20,{class:"actor"},r),u+=30}}return g.attr("height",u),{height:c.height+u,width:p}},anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,a,r,s){const n=(0,i.g)(),o=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+s%3,n.width=e.stopx-e.startx,n.height=a-e.starty,L(o,n)},drawLoop:async function(t,e,a,s){const{boxMargin:n,boxTextMargin:o,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:d,messageFontSize:h,messageFontWeight:p}=s,g=t.append("g"),u=function(t,e,a,r){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")};u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let x=(0,i.e)();x.text=a,x.x=e.startx,x.y=e.starty,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=l||50,x.height=c||20,x.textMargin=o,x.class="labelText",M(g,x),x=S(),x.text=e.title,x.x=e.startx+l/2+(e.stopx-e.startx)/2,x.y=e.starty+n+o,x.anchor="middle",x.valign="middle",x.textMargin=o,x.class="loopText",x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=!0;let y=(0,r.G)(x.text)?await k(g,x,e):I(g,x);if(void 0!==e.sectionTitles)for(const[i,m]of Object.entries(e.sectionTitles))if(m.message){x.text=m.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[i].y+n+o,x.class="loopText",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=e.wrap,(0,r.G)(x.text)?(e.starty=e.sections[i].y,await k(g,x,e)):I(g,x);let t=Math.round(y.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[i].height+=t-(n+o)}return e.height=Math.round(e.stopy-e.starty),g},drawBackgroundRect:O,insertArrowHead:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).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")},insertArrowFilledHead:function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).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")},insertSequenceNumber:function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead:function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},insertDatabaseIcon:function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},insertComputerIcon:function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},insertClockIcon:function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},getTextObj:S,getNoteRect:function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},fixLifeLineHeights:A,sanitizeUrl:n.Jf};let $={};const Y={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((t=>t.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,j((0,r.c)())},updateVal:function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])},updateBounds:function(t,e,a,r){const s=this;let i=0;function n(n){return function(o){i++;const c=s.sequenceItems.length-i+1;s.updateVal(o,"starty",e-c*$.boxMargin,Math.min),s.updateVal(o,"stopy",r+c*$.boxMargin,Math.max),s.updateVal(Y.data,"startx",t-c*$.boxMargin,Math.min),s.updateVal(Y.data,"stopx",a+c*$.boxMargin,Math.max),"activation"!==n&&(s.updateVal(o,"startx",t-c*$.boxMargin,Math.min),s.updateVal(o,"stopx",a+c*$.boxMargin,Math.max),s.updateVal(Y.data,"starty",e-c*$.boxMargin,Math.min),s.updateVal(Y.data,"stopy",r+c*$.boxMargin,Math.max))}}this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))},insert:function(t,e,a,s){const i=r.e.getMin(t,a),n=r.e.getMax(t,a),o=r.e.getMin(e,s),c=r.e.getMax(e,s);this.updateVal(Y.data,"startx",i,Math.min),this.updateVal(Y.data,"starty",o,Math.min),this.updateVal(Y.data,"stopx",n,Math.max),this.updateVal(Y.data,"stopy",c,Math.max),this.updateBounds(i,o,n,c)},newActivation:function(t,e,a){const r=a[t.from.actor],s=G(t.from.actor).length||0,i=r.x+r.width/2+(s-1)*$.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+$.activationWidth,stopy:void 0,actor:t.from.actor,anchored:C.anchorElement(e)})},endActivation:function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},isLoopOverlap:function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Y.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},saveVerticalPos:function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},resetVerticalPos:function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=r.e.getMax(this.data.stopy,this.verticalPos)},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},B=async function(t,e){Y.bumpVerticalPos($.boxMargin),e.height=$.boxMargin,e.starty=Y.getVerticalPos();const a=(0,i.g)();a.x=e.startx,a.y=e.starty,a.width=e.width||$.width,a.class="note";const s=t.append("g"),n=C.drawRect(s,a),o=(0,i.e)();o.x=e.startx,o.y=e.starty,o.width=a.width,o.dy="1em",o.text=e.message,o.class="noteText",o.fontFamily=$.noteFontFamily,o.fontSize=$.noteFontSize,o.fontWeight=$.noteFontWeight,o.anchor=$.noteAlign,o.textMargin=$.noteMargin,o.valign="center";const c=(0,r.G)(o.text)?await k(s,o):I(s,o),l=Math.round(c.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));n.attr("height",l+2*$.noteMargin),e.height+=l+2*$.noteMargin,Y.bumpVerticalPos(l+2*$.noteMargin),e.stopy=e.starty+l+2*$.noteMargin,e.stopx=e.startx+a.width,Y.insert(e.startx,e.starty,e.stopx,e.stopy),Y.models.addNote(e)},V=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),F=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),q=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});async function W(t,e){Y.bumpVerticalPos(10);const{startx:a,stopx:s,message:i}=e,n=r.e.splitBreaks(i).length,o=(0,r.G)(i),c=o?await(0,r.H)(i,(0,r.c)()):r.u.calculateTextDimensions(i,V($));if(!o){const t=c.height/n;e.height+=t,Y.bumpVerticalPos(t)}let l,d=c.height-10;const h=c.width;if(a===s){l=Y.getVerticalPos()+d,$.rightAngles||(d+=$.boxMargin,l=Y.getVerticalPos()+d),d+=30;const t=r.e.getMax(h/2,$.width/2);Y.insert(a-t,Y.getVerticalPos()-10+d,s+t,Y.getVerticalPos()+30+d)}else d+=$.boxMargin,l=Y.getVerticalPos()+d,Y.insert(a,l-10,s,l);return Y.bumpVerticalPos(d),e.height+=d,e.stopy=e.starty+e.height,Y.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}const z=async function(t,e,a,s){const{startx:n,stopx:o,starty:c,message:l,type:d,sequenceIndex:h,sequenceVisible:p}=e,g=r.u.calculateTextDimensions(l,V($)),u=(0,i.e)();u.x=n,u.y=c+10,u.width=o-n,u.class="messageText",u.dy="1em",u.text=l,u.fontFamily=$.messageFontFamily,u.fontSize=$.messageFontSize,u.fontWeight=$.messageFontWeight,u.anchor=$.messageAlign,u.valign="center",u.textMargin=$.wrapPadding,u.tspan=!1,(0,r.G)(u.text)?await k(t,u,{startx:n,stopx:o,starty:a}):I(t,u);const x=g.width;let y;n===o?y=$.rightAngles?t.append("path").attr("d",`M ${n},${a} H ${n+r.e.getMax($.width/2,x/2)} V ${a+25} H ${n}`):t.append("path").attr("d","M "+n+","+a+" C "+(n+60)+","+(a-10)+" "+(n+60)+","+(a+30)+" "+n+","+(a+20)):(y=t.append("line"),y.attr("x1",n),y.attr("y1",a),y.attr("x2",o),y.attr("y2",a)),d===s.db.LINETYPE.DOTTED||d===s.db.LINETYPE.DOTTED_CROSS||d===s.db.LINETYPE.DOTTED_POINT||d===s.db.LINETYPE.DOTTED_OPEN?(y.style("stroke-dasharray","3, 3"),y.attr("class","messageLine1")):y.attr("class","messageLine0");let m="";$.arrowMarkerAbsolute&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\(/g,"\\("),m=m.replace(/\)/g,"\\)")),y.attr("stroke-width",2),y.attr("stroke","none"),y.style("fill","none"),d!==s.db.LINETYPE.SOLID&&d!==s.db.LINETYPE.DOTTED||y.attr("marker-end","url("+m+"#arrowhead)"),d!==s.db.LINETYPE.SOLID_POINT&&d!==s.db.LINETYPE.DOTTED_POINT||y.attr("marker-end","url("+m+"#filled-head)"),d!==s.db.LINETYPE.SOLID_CROSS&&d!==s.db.LINETYPE.DOTTED_CROSS||y.attr("marker-end","url("+m+"#crosshead)"),(p||$.showSequenceNumbers)&&(y.attr("marker-start","url("+m+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},H=async function(t,e,a,s){if(s){let s=0;Y.bumpVerticalPos(2*$.boxMargin);for(const i of a){const a=e[i];a.stopy||(a.stopy=Y.getVerticalPos());const n=await C.drawActor(t,a,$,!0);s=r.e.getMax(s,n)}Y.bumpVerticalPos(s+$.boxMargin)}else for(const r of a){const a=e[r];await C.drawActor(t,a,$,!1)}},U=function(t,e,a,r){let s=0,i=0;for(const n of a){const a=e[n],o=Z(a),c=C.drawPopup(t,a,o,$,$.forceMenus,r);c.height>s&&(s=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:s,maxWidth:i}},j=function(t){(0,r.f)($,t),t.fontFamily&&($.actorFontFamily=$.noteFontFamily=$.messageFontFamily=t.fontFamily),t.fontSize&&($.actorFontSize=$.noteFontSize=$.messageFontSize=t.fontSize),t.fontWeight&&($.actorFontWeight=$.noteFontWeight=$.messageFontWeight=t.fontWeight)},G=function(t){return Y.activations.filter((function(e){return e.actor===t}))},K=function(t,e){const a=e[t],s=G(t);return[s.reduce((function(t,e){return r.e.getMin(t,e.startx)}),a.x+a.width/2-1),s.reduce((function(t,e){return r.e.getMax(t,e.stopx)}),a.x+a.width/2+1)]};function X(t,e,a,s,i){Y.bumpVerticalPos(a);let n=s;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,i=V($);e.message=r.u.wrapLabel(`[${e.message}]`,a-2*$.wrapPadding,i),e.width=a,e.wrap=!0;const o=r.u.calculateTextDimensions(e.message,i),c=r.e.getMax(o.height,$.labelBoxHeight);n=s+c,r.l.debug(`${c} - ${e.message}`)}i(e),Y.bumpVerticalPos(n)}function J(t,e,a,r,s,i,n){function o(a,r){a.x<s[t.from].x?(Y.insert(e.stopx-r,e.starty,e.startx,e.stopy+a.height/2+$.noteMargin),e.stopx=e.stopx+r):(Y.insert(e.startx,e.starty,e.stopx+r,e.stopy+a.height/2+$.noteMargin),e.stopx=e.stopx-r)}if(i[t.to]==r){const e=s[t.to];o(e,"actor"==e.type?21:e.width/2+3),e.starty=a-e.height/2,Y.bumpVerticalPos(e.height/2)}else if(n[t.from]==r){const r=s[t.from];if($.mirrorActors){!function(a,r){a.x<s[t.to].x?(Y.insert(e.startx-r,e.starty,e.stopx,e.stopy+a.height/2+$.noteMargin),e.startx=e.startx+r):(Y.insert(e.stopx,e.starty,e.startx+r,e.stopy+a.height/2+$.noteMargin),e.startx=e.startx-r)}(r,"actor"==r.type?18:r.width/2)}r.stopy=a-r.height/2,Y.bumpVerticalPos(r.height/2)}else if(n[t.to]==r){const e=s[t.to];if($.mirrorActors){o(e,"actor"==e.type?21:e.width/2+3)}e.stopy=a-e.height/2,Y.bumpVerticalPos(e.height/2)}}const Z=function(t){let e=0;const a=q($);for(const s in t.links){const t=r.u.calculateTextDimensions(s,a).width+2*$.wrapPadding+2*$.boxMargin;e<t&&(e=t)}return e};const Q=async function(t,e,a){const s=e[t.from].x,i=e[t.to].x,n=t.wrap&&t.message;let o=(0,r.G)(t.message)?await(0,r.H)(t.message,(0,r.c)()):r.u.calculateTextDimensions(n?r.u.wrapLabel(t.message,$.width,F($)):t.message,F($));const c={width:n?$.width:r.e.getMax($.width,o.width+2*$.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(c.width=n?r.e.getMax($.width,o.width):r.e.getMax(e[t.from].width/2+e[t.to].width/2,o.width+2*$.noteMargin),c.startx=s+(e[t.from].width+$.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(c.width=n?r.e.getMax($.width,o.width+2*$.noteMargin):r.e.getMax(e[t.from].width/2+e[t.to].width/2,o.width+2*$.noteMargin),c.startx=s-c.width+(e[t.from].width-$.actorMargin)/2):t.to===t.from?(o=r.u.calculateTextDimensions(n?r.u.wrapLabel(t.message,r.e.getMax($.width,e[t.from].width),F($)):t.message,F($)),c.width=n?r.e.getMax($.width,e[t.from].width):r.e.getMax(e[t.from].width,$.width,o.width+2*$.noteMargin),c.startx=s+(e[t.from].width-c.width)/2):(c.width=Math.abs(s+e[t.from].width/2-(i+e[t.to].width/2))+$.actorMargin,c.startx=s<i?s+e[t.from].width/2-$.actorMargin/2:i+e[t.to].width/2-$.actorMargin/2),n&&(c.message=r.u.wrapLabel(t.message,c.width-2*$.wrapPadding,F($))),r.l.debug(`NM:[${c.startx},${c.stopx},${c.starty},${c.stopy}:${c.width},${c.height}=${t.message}]`),c},tt=function(t,e,a){if(![a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.SOLID,a.db.LINETYPE.DOTTED,a.db.LINETYPE.SOLID_CROSS,a.db.LINETYPE.DOTTED_CROSS,a.db.LINETYPE.SOLID_POINT,a.db.LINETYPE.DOTTED_POINT].includes(t.type))return{};const[s,i]=K(t.from,e),[n,o]=K(t.to,e),c=s<=n,l=c?i:s;let d=c?n:o;const h=Math.abs(n-o)>2,p=t=>c?-t:t;t.from===t.to?d=l:(t.activate&&!h&&(d+=p($.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(d+=p(3)));const g=[s,i,n,o],u=Math.abs(l-d);t.wrap&&t.message&&(t.message=r.u.wrapLabel(t.message,r.e.getMax(u+2*$.wrapPadding,$.width),V($)));const x=r.u.calculateTextDimensions(t.message,V($));return{width:r.e.getMax(t.wrap?0:x.width+2*$.wrapPadding,u+2*$.wrapPadding,$.width),height:0,startx:l,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},et=async function(t,e,a,s){const i={},n=[];let o,c,l;for(const d of t){switch(d.id=r.u.random({length:10}),d.type){case s.db.LINETYPE.LOOP_START:case s.db.LINETYPE.ALT_START:case s.db.LINETYPE.OPT_START:case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:case s.db.LINETYPE.CRITICAL_START:case s.db.LINETYPE.BREAK_START:n.push({id:d.id,msg:d.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case s.db.LINETYPE.ALT_ELSE:case s.db.LINETYPE.PAR_AND:case s.db.LINETYPE.CRITICAL_OPTION:d.message&&(o=n.pop(),i[o.id]=o,i[d.id]=o,n.push(o));break;case s.db.LINETYPE.LOOP_END:case s.db.LINETYPE.ALT_END:case s.db.LINETYPE.OPT_END:case s.db.LINETYPE.PAR_END:case s.db.LINETYPE.CRITICAL_END:case s.db.LINETYPE.BREAK_END:o=n.pop(),i[o.id]=o;break;case s.db.LINETYPE.ACTIVE_START:{const t=e[d.from?d.from.actor:d.to.actor],a=G(d.from?d.from.actor:d.to.actor).length,r=t.x+t.width/2+(a-1)*$.activationWidth/2,s={startx:r,stopx:r+$.activationWidth,actor:d.from.actor,enabled:!0};Y.activations.push(s)}break;case s.db.LINETYPE.ACTIVE_END:{const t=Y.activations.map((t=>t.actor)).lastIndexOf(d.from.actor);delete Y.activations.splice(t,1)[0]}}void 0!==d.placement?(c=await Q(d,e,s),d.noteModel=c,n.forEach((t=>{o=t,o.from=r.e.getMin(o.from,c.startx),o.to=r.e.getMax(o.to,c.startx+c.width),o.width=r.e.getMax(o.width,Math.abs(o.from-o.to))-$.labelBoxWidth}))):(l=tt(d,e,s),d.msgModel=l,l.startx&&l.stopx&&n.length>0&&n.forEach((t=>{if(o=t,l.startx===l.stopx){const t=e[d.from],a=e[d.to];o.from=r.e.getMin(t.x-l.width/2,t.x-t.width/2,o.from),o.to=r.e.getMax(a.x+l.width/2,a.x+t.width/2,o.to),o.width=r.e.getMax(o.width,Math.abs(o.to-o.from))-$.labelBoxWidth}else o.from=r.e.getMin(l.startx,o.from),o.to=r.e.getMax(l.stopx,o.to),o.width=r.e.getMax(o.width,l.width)-$.labelBoxWidth})))}return Y.activations=[],r.l.debug("Loop type widths:",i),i},at={parser:c,db:w,renderer:{bounds:Y,drawActors:H,drawActorsPopup:U,setConf:j,draw:async function(t,e,a,i){const{securityLevel:n,sequence:o}=(0,r.c)();let c;$=o,"sandbox"===n&&(c=(0,s.Ltv)("#i"+e));const l="sandbox"===n?(0,s.Ltv)(c.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),d="sandbox"===n?c.nodes()[0].contentDocument:document;Y.init(),r.l.debug(i.db);const h="sandbox"===n?l.select(`[id="${e}"]`):(0,s.Ltv)(`[id="${e}"]`),p=i.db.getActors(),g=i.db.getCreatedActors(),u=i.db.getDestroyedActors(),x=i.db.getBoxes();let y=i.db.getActorKeys();const m=i.db.getMessages(),b=i.db.getDiagramTitle(),f=i.db.hasAtLeastOneBox(),T=i.db.hasAtLeastOneBoxWithTitle(),E=await async function(t,e,a){const s={};for(const i of e)if(t[i.to]&&t[i.from]){const e=t[i.to];if(i.placement===a.db.PLACEMENT.LEFTOF&&!e.prevActor)continue;if(i.placement===a.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;const n=void 0!==i.placement,o=!n,c=n?F($):V($),l=i.wrap?r.u.wrapLabel(i.message,$.width-2*$.wrapPadding,c):i.message,d=((0,r.G)(l)?await(0,r.H)(i.message,(0,r.c)()):r.u.calculateTextDimensions(l,c)).width+2*$.wrapPadding;o&&i.from===e.nextActor?s[i.to]=r.e.getMax(s[i.to]||0,d):o&&i.from===e.prevActor?s[i.from]=r.e.getMax(s[i.from]||0,d):o&&i.from===i.to?(s[i.from]=r.e.getMax(s[i.from]||0,d/2),s[i.to]=r.e.getMax(s[i.to]||0,d/2)):i.placement===a.db.PLACEMENT.RIGHTOF?s[i.from]=r.e.getMax(s[i.from]||0,d):i.placement===a.db.PLACEMENT.LEFTOF?s[e.prevActor]=r.e.getMax(s[e.prevActor]||0,d):i.placement===a.db.PLACEMENT.OVER&&(e.prevActor&&(s[e.prevActor]=r.e.getMax(s[e.prevActor]||0,d/2)),e.nextActor&&(s[i.from]=r.e.getMax(s[i.from]||0,d/2)))}return r.l.debug("maxMessageWidthPerActor:",s),s}(p,m,i);if($.height=await async function(t,e,a){let s=0;for(const n of Object.keys(t)){const e=t[n];e.wrap&&(e.description=r.u.wrapLabel(e.description,$.width-2*$.wrapPadding,q($)));const a=(0,r.G)(e.description)?await(0,r.H)(e.description,(0,r.c)()):r.u.calculateTextDimensions(e.description,q($));e.width=e.wrap?$.width:r.e.getMax($.width,a.width+2*$.wrapPadding),e.height=e.wrap?r.e.getMax(a.height,$.height):$.height,s=r.e.getMax(s,e.height)}for(const n in e){const a=t[n];if(!a)continue;const s=t[a.nextActor];if(!s){const t=e[n]+$.actorMargin-a.width/2;a.margin=r.e.getMax(t,$.actorMargin);continue}const i=e[n]+$.actorMargin-a.width/2-s.width/2;a.margin=r.e.getMax(i,$.actorMargin)}let i=0;return a.forEach((e=>{const a=V($);let s=e.actorKeys.reduce(((e,a)=>e+(t[a].width+(t[a].margin||0))),0);s-=2*$.boxTextMargin,e.wrap&&(e.name=r.u.wrapLabel(e.name,s-2*$.wrapPadding,a));const n=r.u.calculateTextDimensions(e.name,a);i=r.e.getMax(n.height,i);const o=r.e.getMax(s,n.width+2*$.wrapPadding);if(e.margin=$.boxTextMargin,s<o){const t=(o-s)/2;e.margin+=t}})),a.forEach((t=>t.textMaxHeight=i)),r.e.getMax(s,$.height)}(p,E,x),C.insertComputerIcon(h),C.insertDatabaseIcon(h),C.insertClockIcon(h),f&&(Y.bumpVerticalPos($.boxMargin),T&&Y.bumpVerticalPos(x[0].textMaxHeight)),!0===$.hideUnusedParticipants){const t=new Set;m.forEach((e=>{t.add(e.from),t.add(e.to)})),y=y.filter((e=>t.has(e)))}await async function(t,e,a,s,i,n,o){let c,l=0,d=0,h=0;for(const p of s){const t=e[p],s=t.box;c&&c!=s&&(o||Y.models.addBox(c),d+=$.boxMargin+c.margin),s&&s!=c&&(o||(s.x=l+d,s.y=i),d+=s.margin),t.width=t.width||$.width,t.height=r.e.getMax(t.height||$.height,$.height),t.margin=t.margin||$.actorMargin,h=r.e.getMax(h,t.height),a[t.name]&&(d+=t.width/2),t.x=l+d,t.starty=Y.getVerticalPos(),Y.insert(t.x,i,t.x+t.width,t.height),l+=t.width+d,t.box&&(t.box.width=l+s.margin-t.box.x),d=t.margin,c=t.box,Y.models.addActor(t)}c&&!o&&Y.models.addBox(c),Y.bumpVerticalPos(h)}(0,p,g,y,0,0,!1);const w=await et(m,p,E,i);function P(t,e){const a=Y.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),C.drawActivation(h,a,e,$,G(t.from.actor).length),Y.insert(a.startx,e-10,a.stopx,e)}C.insertArrowHead(h),C.insertArrowCrossHead(h),C.insertArrowFilledHead(h),C.insertSequenceNumber(h);let v=1,_=1;const L=[],k=[];let I=0;for(const s of m){let t,e,a;switch(s.type){case i.db.LINETYPE.NOTE:Y.resetVerticalPos(),e=s.noteModel,await B(h,e);break;case i.db.LINETYPE.ACTIVE_START:Y.newActivation(s,h,p);break;case i.db.LINETYPE.ACTIVE_END:P(s,Y.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:X(w,s,$.boxMargin,$.boxMargin+$.boxTextMargin,(t=>Y.newLoop(t)));break;case i.db.LINETYPE.LOOP_END:t=Y.endLoop(),await C.drawLoop(h,t,"loop",$),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos()),Y.models.addLoop(t);break;case i.db.LINETYPE.RECT_START:X(w,s,$.boxMargin,$.boxMargin,(t=>Y.newLoop(void 0,t.message)));break;case i.db.LINETYPE.RECT_END:t=Y.endLoop(),k.push(t),Y.models.addLoop(t),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos());break;case i.db.LINETYPE.OPT_START:X(w,s,$.boxMargin,$.boxMargin+$.boxTextMargin,(t=>Y.newLoop(t)));break;case i.db.LINETYPE.OPT_END:t=Y.endLoop(),await C.drawLoop(h,t,"opt",$),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos()),Y.models.addLoop(t);break;case i.db.LINETYPE.ALT_START:X(w,s,$.boxMargin,$.boxMargin+$.boxTextMargin,(t=>Y.newLoop(t)));break;case i.db.LINETYPE.ALT_ELSE:X(w,s,$.boxMargin+$.boxTextMargin,$.boxMargin,(t=>Y.addSectionToLoop(t)));break;case i.db.LINETYPE.ALT_END:t=Y.endLoop(),await C.drawLoop(h,t,"alt",$),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos()),Y.models.addLoop(t);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:X(w,s,$.boxMargin,$.boxMargin+$.boxTextMargin,(t=>Y.newLoop(t))),Y.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:X(w,s,$.boxMargin+$.boxTextMargin,$.boxMargin,(t=>Y.addSectionToLoop(t)));break;case i.db.LINETYPE.PAR_END:t=Y.endLoop(),await C.drawLoop(h,t,"par",$),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos()),Y.models.addLoop(t);break;case i.db.LINETYPE.AUTONUMBER:v=s.message.start||v,_=s.message.step||_,s.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:X(w,s,$.boxMargin,$.boxMargin+$.boxTextMargin,(t=>Y.newLoop(t)));break;case i.db.LINETYPE.CRITICAL_OPTION:X(w,s,$.boxMargin+$.boxTextMargin,$.boxMargin,(t=>Y.addSectionToLoop(t)));break;case i.db.LINETYPE.CRITICAL_END:t=Y.endLoop(),await C.drawLoop(h,t,"critical",$),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos()),Y.models.addLoop(t);break;case i.db.LINETYPE.BREAK_START:X(w,s,$.boxMargin,$.boxMargin+$.boxTextMargin,(t=>Y.newLoop(t)));break;case i.db.LINETYPE.BREAK_END:t=Y.endLoop(),await C.drawLoop(h,t,"break",$),Y.bumpVerticalPos(t.stopy-Y.getVerticalPos()),Y.models.addLoop(t);break;default:try{a=s.msgModel,a.starty=Y.getVerticalPos(),a.sequenceIndex=v,a.sequenceVisible=i.db.showSequenceNumbers();const t=await W(0,a);J(s,a,t,I,p,g,u),L.push({messageModel:a,lineStartY:t}),Y.models.addMessage(a)}catch(K){r.l.error("error while drawing message",K)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT].includes(s.type)&&(v+=_),I++}r.l.debug("createdActors",g),r.l.debug("destroyedActors",u),await H(h,p,y,!1);for(const r of L)await z(h,r.messageModel,r.lineStartY,i);$.mirrorActors&&await H(h,p,y,!0),k.forEach((t=>C.drawBackgroundRect(h,t))),A(h,p,y,$);for(const r of Y.models.boxes)r.height=Y.getVerticalPos()-r.y,Y.insert(r.x,r.y,r.x+r.width,r.height),r.startx=r.x,r.starty=r.y,r.stopx=r.startx+r.width,r.stopy=r.starty+r.height,r.stroke="rgb(0,0,0, 0.5)",await C.drawBox(h,r,$);f&&Y.bumpVerticalPos($.boxMargin);const M=U(h,p,y,d),{bounds:N}=Y.getBounds();let O=N.stopy-N.starty;O<M.maxHeight&&(O=M.maxHeight);let S=O+2*$.diagramMarginY;$.mirrorActors&&(S=S-$.boxMargin+$.bottomMarginAdj);let D=N.stopx-N.startx;D<M.maxWidth&&(D=M.maxWidth);const R=D+2*$.diagramMarginX;b&&h.append("text").text(b).attr("x",(N.stopx-N.startx)/2-2*$.diagramMarginX).attr("y",-25),(0,r.i)(h,S,R,$.useMaxWidth);const j=b?40:0;h.attr("viewBox",N.startx-$.diagramMarginX+" -"+($.diagramMarginY+j)+" "+R+" "+(S+j)),r.l.debug("models:",Y.models)}},styles:P,init:({wrap:t})=>{w.setWrap(t)}}},8886:(t,e,a)=>{a.d(e,{a:()=>n,b:()=>l,c:()=>c,d:()=>i,e:()=>h,f:()=>o,g:()=>d});var r=a(6750),s=a(6257);const i=(t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),void 0!==e.rx&&a.attr("rx",e.rx),void 0!==e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const r in e.attrs)a.attr(r,e.attrs[r]);return void 0!==e.class&&a.attr("class",e.class),a},n=(t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};i(t,a).lower()},o=(t,e)=>{const a=e.text.replace(s.J," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);const i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(a),r},c=(t,e,a,s)=>{const i=t.append("image");i.attr("x",e),i.attr("y",a);const n=(0,r.Jf)(s);i.attr("xlink:href",n)},l=(t,e,a,s)=>{const i=t.append("use");i.attr("x",e),i.attr("y",a);const n=(0,r.Jf)(s);i.attr("xlink:href",`#${n}`)},d=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),h=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})}}]); \ No newline at end of file diff --git a/assets/js/7308.998b0e41.js b/assets/js/7308.998b0e41.js new file mode 100644 index 00000000..13be78ae --- /dev/null +++ b/assets/js/7308.998b0e41.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[7308],{7308:(t,e,s)=>{s.d(e,{d:()=>D,p:()=>r,s:()=>_});var n=s(6312),i=s(6257),u=function(){var t=function(t,e,s,n){for(s=s||{},n=t.length;n--;s[t[n]]=e);return s},e=[1,17],s=[1,18],n=[1,19],i=[1,39],u=[1,40],r=[1,25],a=[1,23],c=[1,24],o=[1,31],l=[1,32],h=[1,33],A=[1,34],p=[1,35],d=[1,36],y=[1,26],E=[1,27],C=[1,28],m=[1,29],f=[1,43],b=[1,30],F=[1,42],g=[1,44],k=[1,41],T=[1,45],B=[1,9],D=[1,8,9],_=[1,56],S=[1,57],N=[1,58],L=[1,59],$=[1,60],v=[1,61],O=[1,62],x=[1,8,9,39],I=[1,74],R=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],w=[1,8,9,12,13,19,21,37,39,42,46,59,60,61,62,63,64,65,70,72,74,80,95,97,98],P=[13,74,80,95,97,98],M=[13,64,65,74,80,95,97,98],G=[13,59,60,61,62,63,74,80,95,97,98],U=[1,93],z=[1,110],K=[1,108],Y=[1,102],j=[1,103],Q=[1,104],X=[1,105],W=[1,106],q=[1,107],H=[1,109],J=[1,8,9,37,39,42],V=[1,8,9,21],Z=[1,8,9,78],tt=[1,8,9,21,73,74,78,80,81,82,83,84,85],et={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,styleStatement:27,cssClassStatement:28,noteStatement:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,namespaceIdentifier:36,STRUCT_START:37,classStatements:38,STRUCT_STOP:39,NAMESPACE:40,classIdentifier:41,STYLE_SEPARATOR:42,members:43,CLASS:44,ANNOTATION_START:45,ANNOTATION_END:46,MEMBER:47,SEPARATOR:48,relation:49,NOTE_FOR:50,noteText:51,NOTE:52,direction_tb:53,direction_bt:54,direction_rl:55,direction_lr:56,relationType:57,lineType:58,AGGREGATION:59,EXTENSION:60,COMPOSITION:61,DEPENDENCY:62,LOLLIPOP:63,LINE:64,DOTTED_LINE:65,CALLBACK:66,LINK:67,LINK_TARGET:68,CLICK:69,CALLBACK_NAME:70,CALLBACK_ARGS:71,HREF:72,STYLE:73,ALPHA:74,stylesOpt:75,CSSCLASS:76,style:77,COMMA:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,commentToken:86,textToken:87,graphCodeTokens:88,textNoTagsToken:89,TAGSTART:90,TAGEND:91,"==":92,"--":93,DEFAULT:94,MINUS:95,keywords:96,UNICODE_TEXT:97,BQUOTE_STR:98,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",37:"STRUCT_START",39:"STRUCT_STOP",40:"NAMESPACE",42:"STYLE_SEPARATOR",44:"CLASS",45:"ANNOTATION_START",46:"ANNOTATION_END",47:"MEMBER",48:"SEPARATOR",50:"NOTE_FOR",52:"NOTE",53:"direction_tb",54:"direction_bt",55:"direction_rl",56:"direction_lr",59:"AGGREGATION",60:"EXTENSION",61:"COMPOSITION",62:"DEPENDENCY",63:"LOLLIPOP",64:"LINE",65:"DOTTED_LINE",66:"CALLBACK",67:"LINK",68:"LINK_TARGET",69:"CLICK",70:"CALLBACK_NAME",71:"CALLBACK_ARGS",72:"HREF",73:"STYLE",74:"ALPHA",76:"CSSCLASS",78:"COMMA",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",88:"graphCodeTokens",90:"TAGSTART",91:"TAGEND",92:"==",93:"--",94:"DEFAULT",95:"MINUS",96:"keywords",97:"UNICODE_TEXT",98:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[36,2],[38,1],[38,2],[38,3],[23,1],[23,3],[23,4],[23,6],[41,2],[41,3],[25,4],[43,1],[43,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[29,3],[29,2],[30,1],[30,1],[30,1],[30,1],[49,3],[49,2],[49,2],[49,1],[57,1],[57,1],[57,1],[57,1],[57,1],[58,1],[58,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[28,3],[75,1],[75,3],[77,1],[77,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[86,1],[86,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[89,1],[89,1],[89,1],[89,1],[16,1],[16,1],[16,1],[16,1],[18,1],[51,1]],performAction:function(t,e,s,n,i,u,r){var a=u.length-1;switch(i){case 8:this.$=u[a-1];break;case 9:case 11:case 12:this.$=u[a];break;case 10:case 13:case 89:this.$=u[a-1]+u[a];break;case 14:case 15:this.$=u[a-1]+"~"+u[a]+"~";break;case 16:n.addRelation(u[a]);break;case 17:u[a-1].title=n.cleanupLabel(u[a]),n.addRelation(u[a-1]);break;case 27:this.$=u[a].trim(),n.setAccTitle(this.$);break;case 28:case 29:this.$=u[a].trim(),n.setAccDescription(this.$);break;case 30:n.addClassesToNamespace(u[a-3],u[a-1]);break;case 31:n.addClassesToNamespace(u[a-4],u[a-1]);break;case 32:this.$=u[a],n.addNamespace(u[a]);break;case 33:case 43:case 86:this.$=[u[a]];break;case 34:this.$=[u[a-1]];break;case 35:u[a].unshift(u[a-2]),this.$=u[a];break;case 37:n.setCssClass(u[a-2],u[a]);break;case 38:n.addMembers(u[a-3],u[a-1]);break;case 39:n.setCssClass(u[a-5],u[a-3]),n.addMembers(u[a-5],u[a-1]);break;case 40:this.$=u[a],n.addClass(u[a]);break;case 41:this.$=u[a-1],n.addClass(u[a-1]),n.setClassLabel(u[a-1],u[a]);break;case 42:n.addAnnotation(u[a],u[a-2]);break;case 44:u[a].push(u[a-1]),this.$=u[a];break;case 45:case 47:case 48:break;case 46:n.addMember(u[a-1],n.cleanupLabel(u[a]));break;case 49:this.$={id1:u[a-2],id2:u[a],relation:u[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:u[a-3],id2:u[a],relation:u[a-1],relationTitle1:u[a-2],relationTitle2:"none"};break;case 51:this.$={id1:u[a-3],id2:u[a],relation:u[a-2],relationTitle1:"none",relationTitle2:u[a-1]};break;case 52:this.$={id1:u[a-4],id2:u[a],relation:u[a-2],relationTitle1:u[a-3],relationTitle2:u[a-1]};break;case 53:n.addNote(u[a],u[a-1]);break;case 54:n.addNote(u[a]);break;case 55:n.setDirection("TB");break;case 56:n.setDirection("BT");break;case 57:n.setDirection("RL");break;case 58:n.setDirection("LR");break;case 59:this.$={type1:u[a-2],type2:u[a],lineType:u[a-1]};break;case 60:this.$={type1:"none",type2:u[a],lineType:u[a-1]};break;case 61:this.$={type1:u[a-1],type2:"none",lineType:u[a]};break;case 62:this.$={type1:"none",type2:"none",lineType:u[a]};break;case 63:this.$=n.relationType.AGGREGATION;break;case 64:this.$=n.relationType.EXTENSION;break;case 65:this.$=n.relationType.COMPOSITION;break;case 66:this.$=n.relationType.DEPENDENCY;break;case 67:this.$=n.relationType.LOLLIPOP;break;case 68:this.$=n.lineType.LINE;break;case 69:this.$=n.lineType.DOTTED_LINE;break;case 70:case 76:this.$=u[a-2],n.setClickEvent(u[a-1],u[a]);break;case 71:case 77:this.$=u[a-3],n.setClickEvent(u[a-2],u[a-1]),n.setTooltip(u[a-2],u[a]);break;case 72:this.$=u[a-2],n.setLink(u[a-1],u[a]);break;case 73:this.$=u[a-3],n.setLink(u[a-2],u[a-1],u[a]);break;case 74:this.$=u[a-3],n.setLink(u[a-2],u[a-1]),n.setTooltip(u[a-2],u[a]);break;case 75:this.$=u[a-4],n.setLink(u[a-3],u[a-2],u[a]),n.setTooltip(u[a-3],u[a-1]);break;case 78:this.$=u[a-3],n.setClickEvent(u[a-2],u[a-1],u[a]);break;case 79:this.$=u[a-4],n.setClickEvent(u[a-3],u[a-2],u[a-1]),n.setTooltip(u[a-3],u[a]);break;case 80:this.$=u[a-3],n.setLink(u[a-2],u[a]);break;case 81:this.$=u[a-4],n.setLink(u[a-3],u[a-1],u[a]);break;case 82:this.$=u[a-4],n.setLink(u[a-3],u[a-1]),n.setTooltip(u[a-3],u[a]);break;case 83:this.$=u[a-5],n.setLink(u[a-4],u[a-2],u[a]),n.setTooltip(u[a-4],u[a-1]);break;case 84:this.$=u[a-2],n.setCssStyle(u[a-1],u[a]);break;case 85:n.setCssClass(u[a-1],u[a]);break;case 87:u[a-2].push(u[a]),this.$=u[a-2]}},table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:e,33:s,35:n,36:21,40:i,41:22,44:u,45:r,47:a,48:c,50:o,52:l,53:h,54:A,55:p,56:d,66:y,67:E,69:C,73:m,74:f,76:b,80:F,95:g,97:k,98:T},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(B,[2,5],{8:[1,46]}),{8:[1,47]},t(D,[2,16],{21:[1,48]}),t(D,[2,18]),t(D,[2,19]),t(D,[2,20]),t(D,[2,21]),t(D,[2,22]),t(D,[2,23]),t(D,[2,24]),t(D,[2,25]),t(D,[2,26]),{32:[1,49]},{34:[1,50]},t(D,[2,29]),t(D,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:_,60:S,61:N,62:L,63:$,64:v,65:O}),{37:[1,63]},t(x,[2,36],{37:[1,65],42:[1,64]}),t(D,[2,47]),t(D,[2,48]),{16:66,74:f,80:F,95:g,97:k},{16:37,17:67,18:38,74:f,80:F,95:g,97:k,98:T},{16:37,17:68,18:38,74:f,80:F,95:g,97:k,98:T},{16:37,17:69,18:38,74:f,80:F,95:g,97:k,98:T},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:f,80:F,95:g,97:k,98:T},{13:I,51:73},t(D,[2,55]),t(D,[2,56]),t(D,[2,57]),t(D,[2,58]),t(R,[2,11],{16:37,18:38,17:75,19:[1,76],74:f,80:F,95:g,97:k,98:T}),t(R,[2,12],{19:[1,77]}),{15:78,16:79,74:f,80:F,95:g,97:k},{16:37,17:80,18:38,74:f,80:F,95:g,97:k,98:T},t(w,[2,112]),t(w,[2,113]),t(w,[2,114]),t(w,[2,115]),t([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),t(B,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,17:20,36:21,41:22,16:37,18:38,5:81,31:e,33:s,35:n,40:i,44:u,45:r,47:a,48:c,50:o,52:l,53:h,54:A,55:p,56:d,66:y,67:E,69:C,73:m,74:f,76:b,80:F,95:g,97:k,98:T}),{5:82,10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:e,33:s,35:n,36:21,40:i,41:22,44:u,45:r,47:a,48:c,50:o,52:l,53:h,54:A,55:p,56:d,66:y,67:E,69:C,73:m,74:f,76:b,80:F,95:g,97:k,98:T},t(D,[2,17]),t(D,[2,27]),t(D,[2,28]),{13:[1,84],16:37,17:83,18:38,74:f,80:F,95:g,97:k,98:T},{49:85,57:54,58:55,59:_,60:S,61:N,62:L,63:$,64:v,65:O},t(D,[2,46]),{58:86,64:v,65:O},t(P,[2,62],{57:87,59:_,60:S,61:N,62:L,63:$}),t(M,[2,63]),t(M,[2,64]),t(M,[2,65]),t(M,[2,66]),t(M,[2,67]),t(G,[2,68]),t(G,[2,69]),{8:[1,89],23:90,38:88,41:22,44:u},{16:91,74:f,80:F,95:g,97:k},{43:92,47:U},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:z,73:K,74:Y,75:99,77:100,79:101,80:j,81:Q,82:X,83:W,84:q,85:H},{74:[1,111]},{13:I,51:112},t(D,[2,54]),t(D,[2,117]),t(R,[2,13]),t(R,[2,14]),t(R,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:f,80:F,95:g,97:k},t(J,[2,40],{11:114,12:[1,115]}),t(B,[2,7]),{9:[1,116]},t(V,[2,49]),{16:37,17:117,18:38,74:f,80:F,95:g,97:k,98:T},{13:[1,119],16:37,17:118,18:38,74:f,80:F,95:g,97:k,98:T},t(P,[2,61],{57:120,59:_,60:S,61:N,62:L,63:$}),t(P,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:u},{8:[1,123],39:[2,33]},t(x,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:U},{16:37,17:127,18:38,74:f,80:F,95:g,97:k,98:T},t(D,[2,70],{13:[1,128]}),t(D,[2,72],{13:[1,130],68:[1,129]}),t(D,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},t(D,[2,84],{78:[1,134]}),t(Z,[2,86],{79:135,21:z,73:K,74:Y,80:j,81:Q,82:X,83:W,84:q,85:H}),t(tt,[2,88]),t(tt,[2,90]),t(tt,[2,91]),t(tt,[2,92]),t(tt,[2,93]),t(tt,[2,94]),t(tt,[2,95]),t(tt,[2,96]),t(tt,[2,97]),t(tt,[2,98]),t(D,[2,85]),t(D,[2,53]),{37:[2,10]},t(J,[2,41]),{13:[1,136]},{1:[2,4]},t(V,[2,51]),t(V,[2,50]),{16:37,17:137,18:38,74:f,80:F,95:g,97:k,98:T},t(P,[2,59]),t(D,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:u},{43:140,47:U},t(x,[2,38]),{39:[2,44]},t(D,[2,42]),t(D,[2,71]),t(D,[2,73]),t(D,[2,74],{68:[1,141]}),t(D,[2,77]),t(D,[2,78],{13:[1,142]}),t(D,[2,80],{13:[1,144],68:[1,143]}),{21:z,73:K,74:Y,77:145,79:101,80:j,81:Q,82:X,83:W,84:q,85:H},t(tt,[2,89]),{14:[1,146]},t(V,[2,52]),t(D,[2,31]),{39:[2,35]},{39:[1,147]},t(D,[2,75]),t(D,[2,79]),t(D,[2,81]),t(D,[2,82],{68:[1,148]}),t(Z,[2,87],{79:135,21:z,73:K,74:Y,80:j,81:Q,82:X,83:W,84:q,85:H}),t(J,[2,8]),t(x,[2,39]),t(D,[2,83])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],78:[2,32],113:[2,10],116:[2,4],126:[2,44],139:[2,35]},parseError:function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},parse:function(t){var e=this,s=[0],n=[],i=[null],u=[],r=this.table,a="",c=0,o=0,l=u.slice.call(arguments,1),h=Object.create(this.lexer),A={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(A.yy[p]=this.yy[p]);h.setInput(t,A.yy),A.yy.lexer=h,A.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var d=h.yylloc;u.push(d);var y=h.options&&h.options.ranges;"function"==typeof A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var E,C,m,f,b,F,g,k,T,B={};;){if(C=s[s.length-1],this.defaultActions[C]?m=this.defaultActions[C]:(null==E&&(T=void 0,"number"!=typeof(T=n.pop()||h.lex()||1)&&(T instanceof Array&&(T=(n=T).pop()),T=e.symbols_[T]||T),E=T),m=r[C]&&r[C][E]),void 0===m||!m.length||!m[0]){var D="";for(b in k=[],r[C])this.terminals_[b]&&b>2&&k.push("'"+this.terminals_[b]+"'");D=h.showPosition?"Parse error on line "+(c+1)+":\n"+h.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[E]||E)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==E?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(D,{text:h.match,token:this.terminals_[E]||E,line:h.yylineno,loc:d,expected:k})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+E);switch(m[0]){case 1:s.push(E),i.push(h.yytext),u.push(h.yylloc),s.push(m[1]),E=null,o=h.yyleng,a=h.yytext,c=h.yylineno,d=h.yylloc;break;case 2:if(F=this.productions_[m[1]][1],B.$=i[i.length-F],B._$={first_line:u[u.length-(F||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(F||1)].first_column,last_column:u[u.length-1].last_column},y&&(B._$.range=[u[u.length-(F||1)].range[0],u[u.length-1].range[1]]),void 0!==(f=this.performAction.apply(B,[a,o,c,A.yy,m[1],i,u].concat(l))))return f;F&&(s=s.slice(0,-1*F*2),i=i.slice(0,-1*F),u=u.slice(0,-1*F)),s.push(this.productions_[m[1]][0]),i.push(B.$),u.push(B._$),g=r[s[s.length-2]][s[s.length-1]],s.push(g);break;case 3:return!0}}return!0}},st={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),s.length-1&&(this.yylineno-=s.length-1);var i=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:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var s,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var u in i)this[u]=i[u];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),u=0;u<i.length;u++)if((s=this._input.match(this.rules[i[u]]))&&(!e||s[0].length>e[0].length)){if(e=s,n=u,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,i[u])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,s,n){switch(s){case 0:return 53;case 1:return 54;case 2:return 55;case 3:return 56;case 4:case 5:case 14:case 30:case 35:case 39:case 46:break;case 6:return this.begin("acc_title"),31;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),33;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 57:case 60:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 34:return 8;case 15:case 16:return 7;case 17:case 36:case 44:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 70;case 23:return 71;case 25:return"STR";case 26:this.begin("string");break;case 27:return 73;case 28:return this.begin("namespace"),40;case 29:case 38:return this.popState(),8;case 31:return this.begin("namespace-body"),37;case 32:case 42:return this.popState(),39;case 33:case 43:return"EOF_IN_STRUCT";case 37:return this.begin("class"),44;case 40:return this.popState(),this.popState(),39;case 41:return this.begin("class-body"),37;case 45:return"OPEN_IN_STRUCT";case 47:return"MEMBER";case 48:return 76;case 49:return 66;case 50:return 67;case 51:return 69;case 52:return 50;case 53:return 52;case 54:return 45;case 55:return 46;case 56:return 72;case 58:return"GENERICTYPE";case 59:this.begin("generic");break;case 61:return"BQUOTE_STR";case 62:this.begin("bqstring");break;case 63:case 64:case 65:case 66:return 68;case 67:case 68:return 60;case 69:case 70:return 62;case 71:return 61;case 72:return 59;case 73:return 63;case 74:return 64;case 75:return 65;case 76:return 21;case 77:return 42;case 78:return 95;case 79:return"DOT";case 80:return"PLUS";case 81:return 81;case 82:return 78;case 83:case 84:return 84;case 85:return 85;case 86:case 87:return"EQUALS";case 88:return 74;case 89:return 12;case 90:return 14;case 91:return"PUNCTUATION";case 92:return 80;case 93:return 97;case 94:case 95:return 83;case 96:return 9}},rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-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])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,32,33,34,35,36,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},namespace:{rules:[26,28,29,30,31,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},"class-body":{rules:[26,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},class:{rules:[26,38,39,40,41,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr:{rules:[9,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_title:{rules:[7,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_args:{rules:[22,23,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_name:{rules:[19,20,21,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},href:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},struct:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},generic:{rules:[26,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},bqstring:{rules:[26,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},string:{rules:[24,25,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],inclusive:!0}}};function nt(){this.yy={}}return et.lexer=st,nt.prototype=et,et.Parser=nt,new nt}();u.parser=u;const r=u,a=["#","+","~","-",""];class c{constructor(t,e){this.memberType=e,this.visibility="",this.classifier="";const s=(0,i.d)(t,(0,i.c)());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+(0,i.x)(this.id);"method"===this.memberType&&(t+=`(${(0,i.x)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,i.x)(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/,n=t.match(s);if(n){const t=n[1]?n[1].trim():"";if(a.includes(t)&&(this.visibility=t),this.id=n[2].trim(),this.parameters=n[3]?n[3].trim():"",e=n[4]?n[4].trim():"",this.returnType=n[5]?n[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);t.match(/[$*]/)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const s=t.length,n=t.substring(0,1),i=t.substring(s-1);a.includes(n)&&(this.visibility=n),i.match(/[$*]/)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}const o="classId-";let l=[],h={},A=[],p=0,d={},y=0,E=[];const C=t=>i.e.sanitizeText(t,(0,i.c)()),m=function(t){const e=i.e.sanitizeText(t,(0,i.c)());let s="",n=e;if(e.indexOf("~")>0){const t=e.split("~");n=C(t[0]),s=C(t[1])}return{className:n,type:s}},f=function(t){const e=i.e.sanitizeText(t,(0,i.c)()),{className:s,type:n}=m(e);if(Object.hasOwn(h,s))return;const u=i.e.sanitizeText(s,(0,i.c)());h[u]={id:u,type:n,label:u,cssClasses:[],methods:[],members:[],annotations:[],styles:[],domId:o+u+"-"+p},p++},b=function(t){const e=i.e.sanitizeText(t,(0,i.c)());if(e in h)return h[e].domId;throw new Error("Class not found: "+e)},F=function(t,e){f(t);const s=m(t).className,n=h[s];if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?n.annotations.push(C(t.substring(2,t.length-2))):t.indexOf(")")>0?n.methods.push(new c(t,"method")):t&&n.members.push(new c(t,"attribute"))}},g=function(t,e){t.split(",").forEach((function(t){let s=t;t[0].match(/\d/)&&(s=o+s),void 0!==h[s]&&h[s].cssClasses.push(e)}))},k=function(t,e,s){const n=i.e.sanitizeText(t,(0,i.c)());if("loose"!==(0,i.c)().securityLevel)return;if(void 0===e)return;const u=n;if(void 0!==h[u]){const t=b(u);let n=[];if("string"==typeof s){n=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<n.length;t++){let e=n[t].trim();'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substr(1,e.length-2)),n[t]=e}}0===n.length&&n.push(t),E.push((function(){const s=document.querySelector(`[id="${t}"]`);null!==s&&s.addEventListener("click",(function(){i.u.runFunc(e,...n)}),!1)}))}},T=function(t){let e=(0,n.Ltv)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=(0,n.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0));(0,n.Ltv)(t).select("svg").selectAll("g.node").on("mouseover",(function(){const t=(0,n.Ltv)(this);if(null===t.attr("title"))return;const s=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+s.left+(s.right-s.left)/2+"px").style("top",window.scrollY+s.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"<br/>")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,n.Ltv)(this).classed("hover",!1)}))};E.push(T);let B="TB";const D={setAccTitle:i.s,getAccTitle:i.g,getAccDescription:i.a,setAccDescription:i.b,getConfig:()=>(0,i.c)().class,addClass:f,bindFunctions:function(t){E.forEach((function(e){e(t)}))},clear:function(){l=[],h={},A=[],E=[],E.push(T),d={},y=0,(0,i.v)()},getClass:function(t){return h[t]},getClasses:function(){return h},getNotes:function(){return A},addAnnotation:function(t,e){const s=m(t).className;h[s].annotations.push(e)},addNote:function(t,e){const s={id:`note${A.length}`,class:e,text:t};A.push(s)},getRelations:function(){return l},addRelation:function(t){i.l.debug("Adding relation: "+JSON.stringify(t)),f(t.id1),f(t.id2),t.id1=m(t.id1).className,t.id2=m(t.id2).className,t.relationTitle1=i.e.sanitizeText(t.relationTitle1.trim(),(0,i.c)()),t.relationTitle2=i.e.sanitizeText(t.relationTitle2.trim(),(0,i.c)()),l.push(t)},getDirection:()=>B,setDirection:t=>{B=t},addMember:F,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>F(t,e))))},cleanupLabel:function(t){return t.startsWith(":")&&(t=t.substring(1)),C(t.trim())},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},setClickEvent:function(t,e,s){t.split(",").forEach((function(t){k(t,e,s),h[t].haveCallback=!0})),g(t,"clickable")},setCssClass:g,setLink:function(t,e,s){const n=(0,i.c)();t.split(",").forEach((function(t){let u=t;t[0].match(/\d/)&&(u=o+u),void 0!==h[u]&&(h[u].link=i.u.formatUrl(e,n),"sandbox"===n.securityLevel?h[u].linkTarget="_top":h[u].linkTarget="string"==typeof s?C(s):"_blank")})),g(t,"clickable")},getTooltip:function(t,e){return e?d[e].classes[t].tooltip:h[t].tooltip},setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(h[t].tooltip=C(e))}))},lookUpDomId:b,setDiagramTitle:i.q,getDiagramTitle:i.t,setClassLabel:function(t,e){const s=i.e.sanitizeText(t,(0,i.c)());e&&(e=C(e));const{className:n}=m(s);h[n].label=e},addNamespace:function(t){void 0===d[t]&&(d[t]={id:t,classes:{},children:{},domId:o+t+"-"+y},y++)},addClassesToNamespace:function(t,e){if(void 0!==d[t])for(const s of e){const{className:e}=m(s);h[e].parent=t,d[t].classes[e]=h[e]}},getNamespace:function(t){return d[t]},getNamespaces:function(){return d},setCssStyle:function(t,e){const s=h[t];if(e&&s)for(const n of e)n.includes(",")?s.styles.push(...n.split(",")):s.styles.push(n)}},_=t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`}}]); \ No newline at end of file diff --git a/assets/js/7438851d.1e66115a.js b/assets/js/7438851d.1e66115a.js new file mode 100644 index 00000000..57980ad1 --- /dev/null +++ b/assets/js/7438851d.1e66115a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[6233],{2958:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>o,contentTitle:()=>s,default:()=>l,frontMatter:()=>i,metadata:()=>r,toc:()=>d});var n=t(4848),c=t(8453);const i={sidebar_position:4},s="Caching results",r={id:"about/usage/caching",title:"Caching results",description:"It is possible to cache data locally using SQLite-files that will be attached to the client upon client creation. Whenever",source:"@site/docs/about/usage/caching.md",sourceDirName:"about/usage",slug:"/about/usage/caching",permalink:"/tagreader-python/docs/about/usage/caching",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/about/usage/caching.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"about",previous:{title:"Fetching metadata",permalink:"/tagreader-python/docs/about/usage/fetching-metadata"},next:{title:"Time zones",permalink:"/tagreader-python/docs/about/usage/time-zone"}},o={},d=[];function h(e){const a={code:"code",h1:"h1",header:"header",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.header,{children:(0,n.jsx)(a.h1,{id:"caching-results",children:"Caching results"})}),"\n",(0,n.jsxs)(a.p,{children:["It is possible to cache data locally using SQLite-files that will be attached to the client upon client creation. Whenever\n",(0,n.jsx)(a.code,{children:"IMSClient.read()"})," is called, the cache is queried for existing data. Any data that is not already in the cache will be\nqueried from the data source. The cache can significantly speed up queries, and it is therefore recommended to always\nhave it enabled. The cache file will be created on use."]}),"\n",(0,n.jsx)(a.p,{children:"Data in the cache never expires. If the data for some reason becomes invalid, then the cache and data source will no\nlonger produce the same data set. An existing cache file can safely be deleted at any time, at least as long as there\nis no ongoing query."}),"\n",(0,n.jsxs)(a.p,{children:["If, for any reason, you want to disable the cache, simply set it to the default value ",(0,n.jsx)(a.code,{children:"None"}),"."]}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{className:"language-python",children:'c = tagreader.IMSClient("PINO", "pi", cache=None)\nc.connect()\n'})}),"\n",(0,n.jsx)(a.p,{children:"If you want to cache data, we recommend using the provided SmartCache like this:"}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{className:"language-python",children:'from pathlib import Path\nfrom tagreader.cache import SmartCache\n\nc = tagreader.IMSClient("PINO", "pi", cache=SmartCache(path=Path(".cache"))\nc.connect()\n'})}),"\n",(0,n.jsxs)(a.p,{children:["Snapshots ( ",(0,n.jsx)(a.code,{children:"read_type = ReaderType.SNAPSHOT"})," ) are of course never cached."]}),"\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(a.strong,{children:"Note"}),": Raw ",(0,n.jsx)(a.code,{children:"read_type = ReaderType.RAW"})," data values are currently not cached pending a rewrite of the caching\nmechanisms."]})]})}function l(e={}){const{wrapper:a}={...(0,c.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/7440.6f324626.js b/assets/js/7440.6f324626.js new file mode 100644 index 00000000..1cef009f --- /dev/null +++ b/assets/js/7440.6f324626.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[7440],{7440:(t,n,e)=>{e.d(n,{diagram:()=>H});var i=e(6257),s=e(6312);function r(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e>i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e>s||void 0===e&&s>=s)&&(e=s)}return e}function o(t){return t.target.depth}function c(t,n){return t.sourceLinks.length?t.depth:n-1}function l(t,n){let e=0;if(void 0===n)for(let i of t)(i=+i)&&(e+=i);else{let i=-1;for(let s of t)(s=+n(s,++i,t))&&(e+=s)}return e}function h(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e<i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e<s||void 0===e&&s>=s)&&(e=s)}return e}function a(t){return function(){return t}}function u(t,n){return y(t.source,n.source)||t.index-n.index}function f(t,n){return y(t.target,n.target)||t.index-n.index}function y(t,n){return t.y0-n.y0}function d(t){return t.value}function p(t){return t.index}function g(t){return t.nodes}function _(t){return t.links}function x(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function k({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function m(){let t,n,e,i=0,s=0,o=1,m=1,v=24,b=8,w=p,L=c,E=g,A=_,S=6;function M(){const c={nodes:E.apply(null,arguments),links:A.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,s]of t.entries())s.index=e,s.sourceLinks=[],s.targetLinks=[];const i=new Map(t.map(((n,e)=>[w(n,e,t),n])));for(const[e,s]of n.entries()){s.index=e;let{source:t,target:n}=s;"object"!=typeof t&&(t=s.source=x(i,t)),"object"!=typeof n&&(n=s.target=x(i,n)),t.sourceLinks.push(s),n.targetLinks.push(s)}if(null!=e)for(const{sourceLinks:s,targetLinks:r}of t)s.sort(e),r.sort(e)}(c),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(l(n.sourceLinks,d),l(n.targetLinks,d)):n.fixedValue}(c),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.depth=s;for(const{target:n}of t.sourceLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(c),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.height=s;for(const{source:n}of t.targetLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(c),function(e){const c=function({nodes:t}){const e=h(t,(t=>t.depth))+1,s=(o-i-v)/(e-1),r=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(L.call(null,n,e))));n.layer=t,n.x0=i+t*s,n.x1=n.x0+v,r[t]?r[t].push(n):r[t]=[n]}if(n)for(const i of r)i.sort(n);return r}(e);t=Math.min(b,(m-s)/(h(c,(t=>t.length))-1)),function(n){const e=r(n,(n=>(m-s-(n.length-1)*t)/l(n,d)));for(const i of n){let n=s;for(const s of i){s.y0=n,s.y1=n+s.value*e,n=s.y1+t;for(const t of s.sourceLinks)t.width=t.value*e}n=(m-n+t)/(i.length+1);for(let t=0;t<i.length;++t){const e=i[t];e.y0+=n*(t+1),e.y1+=n*(t+1)}N(i)}}(c);for(let t=0;t<S;++t){const n=Math.pow(.99,t),e=Math.max(1-n,(t+1)/S);T(c,n,e),I(c,n,e)}}(c),k(c),c}function I(t,e,i){for(let s=1,r=t.length;s<r;++s){const r=t[s];for(const t of r){let n=0,i=0;for(const{source:e,value:r}of t.targetLinks){let s=r*(t.layer-e.layer);n+=$(e,t)*s,i+=s}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(y),O(r,i)}}function T(t,e,i){for(let s=t.length-2;s>=0;--s){const r=t[s];for(const t of r){let n=0,i=0;for(const{target:e,value:r}of t.sourceLinks){let s=r*(e.layer-t.layer);n+=j(t,e)*s,i+=s}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(y),O(r,i)}}function O(n,e){const i=n.length>>1,r=n[i];D(n,r.y0-t,i-1,e),C(n,r.y1+t,i+1,e),D(n,m,n.length-1,e),C(n,s,0,e)}function C(n,e,i,s){for(;i<n.length;++i){const r=n[i],o=(e-r.y0)*s;o>1e-6&&(r.y0+=o,r.y1+=o),e=r.y1+t}}function D(n,e,i,s){for(;i>=0;--i){const r=n[i],o=(r.y1-e)*s;o>1e-6&&(r.y0-=o,r.y1-=o),e=r.y0-t}}function P({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(f);for(const{target:{targetLinks:n}}of t)n.sort(u)}}function N(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(f),e.sort(u)}function $(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:s,width:r}of n.sourceLinks){if(s===e)break;i+=r+t}for(const{source:t,width:s}of e.targetLinks){if(t===n)break;i-=s}return i}function j(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:s,width:r}of e.targetLinks){if(s===n)break;i+=r+t}for(const{target:t,width:s}of n.sourceLinks){if(t===e)break;i-=s}return i}return M.update=function(t){return k(t),t},M.nodeId=function(t){return arguments.length?(w="function"==typeof t?t:a(t),M):w},M.nodeAlign=function(t){return arguments.length?(L="function"==typeof t?t:a(t),M):L},M.nodeSort=function(t){return arguments.length?(n=t,M):n},M.nodeWidth=function(t){return arguments.length?(v=+t,M):v},M.nodePadding=function(n){return arguments.length?(b=t=+n,M):b},M.nodes=function(t){return arguments.length?(E="function"==typeof t?t:a(t),M):E},M.links=function(t){return arguments.length?(A="function"==typeof t?t:a(t),M):A},M.linkSort=function(t){return arguments.length?(e=t,M):e},M.size=function(t){return arguments.length?(i=s=0,o=+t[0],m=+t[1],M):[o-i,m-s]},M.extent=function(t){return arguments.length?(i=+t[0][0],o=+t[1][0],s=+t[0][1],m=+t[1][1],M):[[i,s],[o,m]]},M.iterations=function(t){return arguments.length?(S=+t,M):S},M}var v=Math.PI,b=2*v,w=1e-6,L=b-w;function E(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function A(){return new E}E.prototype=A.prototype={constructor:E,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,s,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+s)+","+(this._y1=+r)},arcTo:function(t,n,e,i,s){t=+t,n=+n,e=+e,i=+i,s=+s;var r=this._x1,o=this._y1,c=e-t,l=i-n,h=r-t,a=o-n,u=h*h+a*a;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>w)if(Math.abs(a*c-l*h)>w&&s){var f=e-r,y=i-o,d=c*c+l*l,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),x=s*Math.tan((v-Math.acos((d+u-p)/(2*g*_)))/2),k=x/_,m=x/g;Math.abs(k-1)>w&&(this._+="L"+(t+k*h)+","+(n+k*a)),this._+="A"+s+","+s+",0,0,"+ +(a*f>h*y)+","+(this._x1=t+m*c)+","+(this._y1=n+m*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,s,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),c=e*Math.sin(i),l=t+o,h=n+c,a=1^r,u=r?i-s:s-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+h:(Math.abs(this._x1-l)>w||Math.abs(this._y1-h)>w)&&(this._+="L"+l+","+h),e&&(u<0&&(u=u%b+b),u>L?this._+="A"+e+","+e+",0,1,"+a+","+(t-o)+","+(n-c)+"A"+e+","+e+",0,1,"+a+","+(this._x1=l)+","+(this._y1=h):u>w&&(this._+="A"+e+","+e+",0,"+ +(u>=v)+","+a+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=n+e*Math.sin(s))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const S=A;var M=Array.prototype.slice;function I(t){return function(){return t}}function T(t){return t[0]}function O(t){return t[1]}function C(t){return t.source}function D(t){return t.target}function P(t){var n=C,e=D,i=T,s=O,r=null;function o(){var o,c=M.call(arguments),l=n.apply(this,c),h=e.apply(this,c);if(r||(r=o=S()),t(r,+i.apply(this,(c[0]=l,c)),+s.apply(this,c),+i.apply(this,(c[0]=h,c)),+s.apply(this,c)),o)return r=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:I(+t),o):i},o.y=function(t){return arguments.length?(s="function"==typeof t?t:I(+t),o):s},o.context=function(t){return arguments.length?(r=null==t?null:t,o):r},o}function N(t,n,e,i,s){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,s,i,s)}function $(t){return[t.source.x1,t.y0]}function j(t){return[t.target.x0,t.y1]}function z(){return P(N).source($).target(j)}e(4353),e(6750),e(2838);var U=function(){var t=function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e},n=[1,9],e=[1,10],i=[1,5,10,12],s={trace:function(){},yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:function(t,n,e,i,s,r,o){var c=r.length-1;switch(s){case 7:const t=i.findOrCreateNode(r[c-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(r[c-2].trim().replaceAll('""','"')),e=parseFloat(r[c].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=r[c];break;case 10:this.$=r[c-1]}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)},parse:function(t){var n=this,e=[0],i=[],s=[null],r=[],o=this.table,c="",l=0,h=0,a=r.slice.call(arguments,1),u=Object.create(this.lexer),f={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(f.yy[y]=this.yy[y]);u.setInput(t,f.yy),f.yy.lexer=u,f.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var d=u.yylloc;r.push(d);var p=u.options&&u.options.ranges;"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,_,x,k,m,v,b,w,L,E={};;){if(_=e[e.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==g&&(L=void 0,"number"!=typeof(L=i.pop()||u.lex()||1)&&(L instanceof Array&&(L=(i=L).pop()),L=n.symbols_[L]||L),g=L),x=o[_]&&o[_][g]),void 0===x||!x.length||!x[0]){var A="";for(m in w=[],o[_])this.terminals_[m]&&m>2&&w.push("'"+this.terminals_[m]+"'");A=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(A,{text:u.match,token:this.terminals_[g]||g,line:u.yylineno,loc:d,expected:w})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+g);switch(x[0]){case 1:e.push(g),s.push(u.yytext),r.push(u.yylloc),e.push(x[1]),g=null,h=u.yyleng,c=u.yytext,l=u.yylineno,d=u.yylloc;break;case 2:if(v=this.productions_[x[1]][1],E.$=s[s.length-v],E._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},p&&(E._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(E,[c,h,l,f.yy,x[1],s,r].concat(a))))return k;v&&(e=e.slice(0,-1*v*2),s=s.slice(0,-1*v),r=r.slice(0,-1*v)),e.push(this.productions_[x[1]][0]),s.push(E.$),r.push(E._$),b=o[e[e.length-2]][e[e.length-1]],e.push(b);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((e=this._input.match(this.rules[s[r]]))&&(!n||e[0].length>n[0].length)){if(n=e,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[r])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,n,e,i){switch(e){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};function o(){this.yy={}}return s.lexer=r,o.prototype=s,s.Parser=o,new o}();U.parser=U;const F=U;let W=[],q=[],G={};class V{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}}class X{constructor(t){this.ID=t}}const K={nodesMap:G,getConfig:()=>(0,i.c)().sankey,getNodes:()=>q,getLinks:()=>W,getGraph:()=>({nodes:q.map((t=>({id:t.ID}))),links:W.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))}),addLink:(t,n,e)=>{W.push(new V(t,n,e))},findOrCreateNode:t=>(t=i.e.sanitizeText(t,(0,i.c)()),G[t]||(G[t]=new X(t),q.push(G[t])),G[t]),getAccTitle:i.g,setAccTitle:i.s,getAccDescription:i.a,setAccDescription:i.b,getDiagramTitle:i.t,setDiagramTitle:i.q,clear:()=>{W=[],q=[],G={},(0,i.v)()}},Q=class t{static next(n){return new t(n+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}};Q.count=0;let Y=Q;const B={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?r(t.sourceLinks,o)-1:0},justify:c},R={draw:function(t,n,e,r){const{securityLevel:o,sankey:c}=(0,i.c)(),l=i.K.sankey;let h;"sandbox"===o&&(h=(0,s.Ltv)("#i"+n));const a="sandbox"===o?(0,s.Ltv)(h.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),u="sandbox"===o?a.select(`[id="${n}"]`):(0,s.Ltv)(`[id="${n}"]`),f=(null==c?void 0:c.width)??l.width,y=(null==c?void 0:c.height)??l.width,d=(null==c?void 0:c.useMaxWidth)??l.useMaxWidth,p=(null==c?void 0:c.nodeAlignment)??l.nodeAlignment,g=(null==c?void 0:c.prefix)??l.prefix,_=(null==c?void 0:c.suffix)??l.suffix,x=(null==c?void 0:c.showValues)??l.showValues,k=r.db.getGraph(),v=B[p];m().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(x?15:0)).nodeAlign(v).extent([[0,0],[f,y]])(k);const b=(0,s.UMr)(s.zt);u.append("g").attr("class","nodes").selectAll(".node").data(k.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=Y.next("node-")).id)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"})).attr("x",(t=>t.x0)).attr("y",(t=>t.y0)).append("rect").attr("height",(t=>t.y1-t.y0)).attr("width",(t=>t.x1-t.x0)).attr("fill",(t=>b(t.id)));u.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(k.nodes).join("text").attr("x",(t=>t.x0<f/2?t.x1+6:t.x0-6)).attr("y",(t=>(t.y1+t.y0)/2)).attr("dy",(x?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0<f/2?"start":"end")).text((({id:t,value:n})=>x?`${t}\n${g}${Math.round(100*n)/100}${_}`:t));const w=u.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(k.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),L=(null==c?void 0:c.linkColor)||"gradient";if("gradient"===L){const t=w.append("linearGradient").attr("id",(t=>(t.uid=Y.next("linearGradient-")).id)).attr("gradientUnits","userSpaceOnUse").attr("x1",(t=>t.source.x1)).attr("x2",(t=>t.target.x0));t.append("stop").attr("offset","0%").attr("stop-color",(t=>b(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>b(t.target.id)))}let E;switch(L){case"gradient":E=t=>t.uid;break;case"source":E=t=>b(t.source.id);break;case"target":E=t=>b(t.target.id);break;default:E=L}w.append("path").attr("d",z()).attr("stroke",E).attr("stroke-width",(t=>Math.max(1,t.width))),(0,i.o)(void 0,u,0,d)}},Z=F.parse.bind(F);F.parse=t=>Z((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim())(t));const H={parser:F,db:K,renderer:R}}}]); \ No newline at end of file diff --git a/assets/js/751.56e1e341.js b/assets/js/751.56e1e341.js new file mode 100644 index 00000000..5de3e97d --- /dev/null +++ b/assets/js/751.56e1e341.js @@ -0,0 +1,10825 @@ +"use strict"; +exports.id = 751; +exports.ids = [751]; +exports.modules = { + +/***/ 1176: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + Zp: () => (/* reexport */ layout) +}); + +// UNUSED EXPORTS: acyclic, normalize, rank + +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/uniqueId.js +var uniqueId = __webpack_require__(5664); +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/map.js +var map = __webpack_require__(4722); +// EXTERNAL MODULE: ./node_modules/lodash-es/range.js + 2 modules +var range = __webpack_require__(1395); +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js +var graphlib = __webpack_require__(697); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/data/list.js +/* + * Simple doubly linked list implementation derived from Cormen, et al., + * "Introduction to Algorithms". + */ + + + +class List { + constructor() { + var sentinel = {}; + sentinel._next = sentinel._prev = sentinel; + this._sentinel = sentinel; + } + dequeue() { + var sentinel = this._sentinel; + var entry = sentinel._prev; + if (entry !== sentinel) { + unlink(entry); + return entry; + } + } + enqueue(entry) { + var sentinel = this._sentinel; + if (entry._prev && entry._next) { + unlink(entry); + } + entry._next = sentinel._next; + sentinel._next._prev = entry; + sentinel._next = entry; + entry._prev = sentinel; + } + toString() { + var strs = []; + var sentinel = this._sentinel; + var curr = sentinel._prev; + while (curr !== sentinel) { + strs.push(JSON.stringify(curr, filterOutLinks)); + curr = curr._prev; + } + return '[' + strs.join(', ') + ']'; + } +} + +function unlink(entry) { + entry._prev._next = entry._next; + entry._next._prev = entry._prev; + delete entry._next; + delete entry._prev; +} + +function filterOutLinks(k, v) { + if (k !== '_next' && k !== '_prev') { + return v; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/greedy-fas.js + + + + +/* + * A greedy heuristic for finding a feedback arc set for a graph. A feedback + * arc set is a set of edges that can be removed to make a graph acyclic. + * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and + * effective heuristic for the feedback arc set problem." This implementation + * adjusts that from the paper to allow for weighted edges. + */ + + +var DEFAULT_WEIGHT_FN = constant/* default */.A(1); + +function greedyFAS(g, weightFn) { + if (g.nodeCount() <= 1) { + return []; + } + var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); + var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); + + // Expand multi-edges + return flatten/* default */.A( + map/* default */.A(results, function (e) { + return g.outEdges(e.v, e.w); + }) + ); +} + +function doGreedyFAS(g, buckets, zeroIdx) { + var results = []; + var sources = buckets[buckets.length - 1]; + var sinks = buckets[0]; + + var entry; + while (g.nodeCount()) { + while ((entry = sinks.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + while ((entry = sources.dequeue())) { + removeNode(g, buckets, zeroIdx, entry); + } + if (g.nodeCount()) { + for (var i = buckets.length - 2; i > 0; --i) { + entry = buckets[i].dequeue(); + if (entry) { + results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); + break; + } + } + } + } + + return results; +} + +function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { + var results = collectPredecessors ? [] : undefined; + + forEach/* default */.A(g.inEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var uEntry = g.node(edge.v); + + if (collectPredecessors) { + results.push({ v: edge.v, w: edge.w }); + } + + uEntry.out -= weight; + assignBucket(buckets, zeroIdx, uEntry); + }); + + forEach/* default */.A(g.outEdges(entry.v), function (edge) { + var weight = g.edge(edge); + var w = edge.w; + var wEntry = g.node(w); + wEntry['in'] -= weight; + assignBucket(buckets, zeroIdx, wEntry); + }); + + g.removeNode(entry.v); + + return results; +} + +function buildState(g, weightFn) { + var fasGraph = new graphlib/* Graph */.T(); + var maxIn = 0; + var maxOut = 0; + + forEach/* default */.A(g.nodes(), function (v) { + fasGraph.setNode(v, { v: v, in: 0, out: 0 }); + }); + + // Aggregate weights on nodes, but also sum the weights across multi-edges + // into a single edge for the fasGraph. + forEach/* default */.A(g.edges(), function (e) { + var prevWeight = fasGraph.edge(e.v, e.w) || 0; + var weight = weightFn(e); + var edgeWeight = prevWeight + weight; + fasGraph.setEdge(e.v, e.w, edgeWeight); + maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight)); + maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight)); + }); + + var buckets = range/* default */.A(maxOut + maxIn + 3).map(function () { + return new List(); + }); + var zeroIdx = maxIn + 1; + + forEach/* default */.A(fasGraph.nodes(), function (v) { + assignBucket(buckets, zeroIdx, fasGraph.node(v)); + }); + + return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; +} + +function assignBucket(buckets, zeroIdx, entry) { + if (!entry.out) { + buckets[0].enqueue(entry); + } else if (!entry['in']) { + buckets[buckets.length - 1].enqueue(entry); + } else { + buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/acyclic.js + + + + + +function run(g) { + var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g); + forEach/* default */.A(fas, function (e) { + var label = g.edge(e); + g.removeEdge(e); + label.forwardName = e.name; + label.reversed = true; + g.setEdge(e.w, e.v, label, uniqueId/* default */.A('rev')); + }); + + function weightFn(g) { + return function (e) { + return g.edge(e).weight; + }; + } +} + +function dfsFAS(g) { + var fas = []; + var stack = {}; + var visited = {}; + + function dfs(v) { + if (has/* default */.A(visited, v)) { + return; + } + visited[v] = true; + stack[v] = true; + forEach/* default */.A(g.outEdges(v), function (e) { + if (has/* default */.A(stack, e.w)) { + fas.push(e); + } else { + dfs(e.w); + } + }); + delete stack[v]; + } + + forEach/* default */.A(g.nodes(), dfs); + return fas; +} + +function undo(g) { + forEach/* default */.A(g.edges(), function (e) { + var label = g.edge(e); + if (label.reversed) { + g.removeEdge(e); + + var forwardName = label.forwardName; + delete label.reversed; + delete label.forwardName; + g.setEdge(e.w, e.v, label, forwardName); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/merge.js + 6 modules +var merge = __webpack_require__(8879); +// EXTERNAL MODULE: ./node_modules/lodash-es/pick.js + 4 modules +var pick = __webpack_require__(1942); +// EXTERNAL MODULE: ./node_modules/lodash-es/defaults.js +var defaults = __webpack_require__(3068); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseExtremum.js + + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !(0,isSymbol/* default */.A)(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +/* harmony default export */ const _baseExtremum = (baseExtremum); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseGt.js +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +/* harmony default export */ const _baseGt = (baseGt); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +;// CONCATENATED MODULE: ./node_modules/lodash-es/max.js + + + + +/** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ +function max(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseGt) + : undefined; +} + +/* harmony default export */ const lodash_es_max = (max); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/last.js +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +/* harmony default export */ const lodash_es_last = (last); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseAssignValue.js +var _baseAssignValue = __webpack_require__(2528); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/mapValues.js + + + + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = (0,_baseIteratee/* default */.A)(iteratee, 3); + + (0,_baseForOwn/* default */.A)(object, function(value, key, object) { + (0,_baseAssignValue/* default */.A)(result, key, iteratee(value, key, object)); + }); + return result; +} + +/* harmony default export */ const lodash_es_mapValues = (mapValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseLt.js +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +/* harmony default export */ const _baseLt = (baseLt); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/min.js + + + + +/** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ +function min(array) { + return (array && array.length) + ? _baseExtremum(array, identity/* default */.A, _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_min = (min); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_root.js +var _root = __webpack_require__(1917); +;// CONCATENATED MODULE: ./node_modules/lodash-es/now.js + + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return _root/* default */.A.Date.now(); +}; + +/* harmony default export */ const lodash_es_now = (now); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/util.js + + + + + +/* + * Adds a dummy node to the graph and return v. + */ +function addDummyNode(g, type, attrs, name) { + var v; + do { + v = uniqueId/* default */.A(name); + } while (g.hasNode(v)); + + attrs.dummy = type; + g.setNode(v, attrs); + return v; +} + +/* + * Returns a new graph with only simple edges. Handles aggregation of data + * associated with multi-edges. + */ +function simplify(g) { + var simplified = new graphlib/* Graph */.T().setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + simplified.setNode(v, g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; + var label = g.edge(e); + simplified.setEdge(e.v, e.w, { + weight: simpleLabel.weight + label.weight, + minlen: Math.max(simpleLabel.minlen, label.minlen), + }); + }); + return simplified; +} + +function asNonCompoundGraph(g) { + var simplified = new graphlib/* Graph */.T({ multigraph: g.isMultigraph() }).setGraph(g.graph()); + forEach/* default */.A(g.nodes(), function (v) { + if (!g.children(v).length) { + simplified.setNode(v, g.node(v)); + } + }); + forEach/* default */.A(g.edges(), function (e) { + simplified.setEdge(e, g.edge(e)); + }); + return simplified; +} + +function successorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var sucs = {}; + _.forEach(g.outEdges(v), function (e) { + sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; + }); + return sucs; + }); + return _.zipObject(g.nodes(), weightMap); +} + +function predecessorWeights(g) { + var weightMap = _.map(g.nodes(), function (v) { + var preds = {}; + _.forEach(g.inEdges(v), function (e) { + preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; + }); + return preds; + }); + return _.zipObject(g.nodes(), weightMap); +} + +/* + * Finds where a line starting at point ({x, y}) would intersect a rectangle + * ({x, y, width, height}) if it were pointing at the rectangle's center. + */ +function intersectRect(rect, point) { + var x = rect.x; + var y = rect.y; + + // Rectangle intersection algorithm from: + // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes + var dx = point.x - x; + var dy = point.y - y; + var w = rect.width / 2; + var h = rect.height / 2; + + if (!dx && !dy) { + throw new Error('Not possible to find intersection inside of the rectangle'); + } + + var sx, sy; + if (Math.abs(dy) * w > Math.abs(dx) * h) { + // Intersection is top or bottom of rect. + if (dy < 0) { + h = -h; + } + sx = (h * dx) / dy; + sy = h; + } else { + // Intersection is left or right of rect. + if (dx < 0) { + w = -w; + } + sx = w; + sy = (w * dy) / dx; + } + + return { x: x + sx, y: y + sy }; +} + +/* + * Given a DAG with each node assigned "rank" and "order" properties, this + * function will produce a matrix with the ids of each node. + */ +function buildLayerMatrix(g) { + var layering = map/* default */.A(range/* default */.A(util_maxRank(g) + 1), function () { + return []; + }); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + var rank = node.rank; + if (!isUndefined/* default */.A(rank)) { + layering[rank][node.order] = v; + } + }); + return layering; +} + +/* + * Adjusts the ranks for all nodes in the graph such that all nodes v have + * rank(v) >= 0 and at least one node w has rank(w) = 0. + */ +function normalizeRanks(g) { + var min = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (has/* default */.A(node, 'rank')) { + node.rank -= min; + } + }); +} + +function removeEmptyRanks(g) { + // Ranks may not start at 0, so we need to offset them + var offset = lodash_es_min( + map/* default */.A(g.nodes(), function (v) { + return g.node(v).rank; + }) + ); + + var layers = []; + forEach/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank - offset; + if (!layers[rank]) { + layers[rank] = []; + } + layers[rank].push(v); + }); + + var delta = 0; + var nodeRankFactor = g.graph().nodeRankFactor; + forEach/* default */.A(layers, function (vs, i) { + if (isUndefined/* default */.A(vs) && i % nodeRankFactor !== 0) { + --delta; + } else if (delta) { + forEach/* default */.A(vs, function (v) { + g.node(v).rank += delta; + }); + } + }); +} + +function addBorderNode(g, prefix, rank, order) { + var node = { + width: 0, + height: 0, + }; + if (arguments.length >= 4) { + node.rank = rank; + node.order = order; + } + return addDummyNode(g, 'border', node, prefix); +} + +function util_maxRank(g) { + return lodash_es_max( + map/* default */.A(g.nodes(), function (v) { + var rank = g.node(v).rank; + if (!isUndefined/* default */.A(rank)) { + return rank; + } + }) + ); +} + +/* + * Partition a collection into two groups: `lhs` and `rhs`. If the supplied + * function returns true for an entry it goes into `lhs`. Otherwise it goes + * into `rhs. + */ +function partition(collection, fn) { + var result = { lhs: [], rhs: [] }; + forEach/* default */.A(collection, function (value) { + if (fn(value)) { + result.lhs.push(value); + } else { + result.rhs.push(value); + } + }); + return result; +} + +/* + * Returns a new function that wraps `fn` with a timer. The wrapper logs the + * time it takes to execute the function. + */ +function util_time(name, fn) { + var start = lodash_es_now(); + try { + return fn(); + } finally { + console.log(name + ' time: ' + (lodash_es_now() - start) + 'ms'); + } +} + +function notime(name, fn) { + return fn(); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/add-border-segments.js + + + + + +function addBorderSegments(g) { + function dfs(v) { + var children = g.children(v); + var node = g.node(v); + if (children.length) { + forEach/* default */.A(children, dfs); + } + + if (has/* default */.A(node, 'minRank')) { + node.borderLeft = []; + node.borderRight = []; + for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { + add_border_segments_addBorderNode(g, 'borderLeft', '_bl', v, node, rank); + add_border_segments_addBorderNode(g, 'borderRight', '_br', v, node, rank); + } + } + } + + forEach/* default */.A(g.children(), dfs); +} + +function add_border_segments_addBorderNode(g, prop, prefix, sg, sgNode, rank) { + var label = { width: 0, height: 0, rank: rank, borderType: prop }; + var prev = sgNode[prop][rank - 1]; + var curr = addDummyNode(g, 'border', label, prefix); + sgNode[prop][rank] = curr; + g.setParent(curr, sg); + if (prev) { + g.setEdge(prev, curr, { weight: 1 }); + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/coordinate-system.js + + + + +function adjust(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'lr' || rankDir === 'rl') { + swapWidthHeight(g); + } +} + +function coordinate_system_undo(g) { + var rankDir = g.graph().rankdir.toLowerCase(); + if (rankDir === 'bt' || rankDir === 'rl') { + reverseY(g); + } + + if (rankDir === 'lr' || rankDir === 'rl') { + swapXY(g); + swapWidthHeight(g); + } +} + +function swapWidthHeight(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapWidthHeightOne(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + swapWidthHeightOne(g.edge(e)); + }); +} + +function swapWidthHeightOne(attrs) { + var w = attrs.width; + attrs.width = attrs.height; + attrs.height = w; +} + +function reverseY(g) { + forEach/* default */.A(g.nodes(), function (v) { + reverseYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, reverseYOne); + if (has/* default */.A(edge, 'y')) { + reverseYOne(edge); + } + }); +} + +function reverseYOne(attrs) { + attrs.y = -attrs.y; +} + +function swapXY(g) { + forEach/* default */.A(g.nodes(), function (v) { + swapXYOne(g.node(v)); + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, swapXYOne); + if (has/* default */.A(edge, 'x')) { + swapXYOne(edge); + } + }); +} + +function swapXYOne(attrs) { + var x = attrs.x; + attrs.x = attrs.y; + attrs.y = x; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/normalize.js + + + + + +/* + * Breaks any long edges in the graph into short segments that span 1 layer + * each. This operation is undoable with the denormalize function. + * + * Pre-conditions: + * + * 1. The input graph is a DAG. + * 2. Each node in the graph has a "rank" property. + * + * Post-condition: + * + * 1. All edges in the graph have a length of 1. + * 2. Dummy nodes are added where edges have been split into segments. + * 3. The graph is augmented with a "dummyChains" attribute which contains + * the first dummy in each chain of dummy nodes produced. + */ +function normalize_run(g) { + g.graph().dummyChains = []; + forEach/* default */.A(g.edges(), function (edge) { + normalizeEdge(g, edge); + }); +} + +function normalizeEdge(g, e) { + var v = e.v; + var vRank = g.node(v).rank; + var w = e.w; + var wRank = g.node(w).rank; + var name = e.name; + var edgeLabel = g.edge(e); + var labelRank = edgeLabel.labelRank; + + if (wRank === vRank + 1) return; + + g.removeEdge(e); + + var dummy, attrs, i; + for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { + edgeLabel.points = []; + attrs = { + width: 0, + height: 0, + edgeLabel: edgeLabel, + edgeObj: e, + rank: vRank, + }; + dummy = addDummyNode(g, 'edge', attrs, '_d'); + if (vRank === labelRank) { + attrs.width = edgeLabel.width; + attrs.height = edgeLabel.height; + // @ts-expect-error + attrs.dummy = 'edge-label'; + // @ts-expect-error + attrs.labelpos = edgeLabel.labelpos; + } + g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); + if (i === 0) { + g.graph().dummyChains.push(dummy); + } + v = dummy; + } + + g.setEdge(v, w, { weight: edgeLabel.weight }, name); +} + +function normalize_undo(g) { + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var origLabel = node.edgeLabel; + var w; + g.setEdge(node.edgeObj, origLabel); + while (node.dummy) { + w = g.successors(v)[0]; + g.removeNode(v); + origLabel.points.push({ x: node.x, y: node.y }); + if (node.dummy === 'edge-label') { + origLabel.x = node.x; + origLabel.y = node.y; + origLabel.width = node.width; + origLabel.height = node.height; + } + v = w; + node = g.node(v); + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/lodash-es/minBy.js + + + + +/** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ +function minBy(array, iteratee) { + return (array && array.length) + ? _baseExtremum(array, (0,_baseIteratee/* default */.A)(iteratee, 2), _baseLt) + : undefined; +} + +/* harmony default export */ const lodash_es_minBy = (minBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/util.js + + + + +/* + * Initializes ranks for the input graph using the longest path algorithm. This + * algorithm scales well and is fast in practice, it yields rather poor + * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom + * ranks wide and leaving edges longer than necessary. However, due to its + * speed, this algorithm is good for getting an initial ranking that can be fed + * into other algorithms. + * + * This algorithm does not normalize layers because it will be used by other + * algorithms in most cases. If using this algorithm directly, be sure to + * run normalize at the end. + * + * Pre-conditions: + * + * 1. Input graph is a DAG. + * 2. Input graph node labels can be assigned properties. + * + * Post-conditions: + * + * 1. Each node will be assign an (unnormalized) "rank" property. + */ +function longestPath(g) { + var visited = {}; + + function dfs(v) { + var label = g.node(v); + if (has/* default */.A(visited, v)) { + return label.rank; + } + visited[v] = true; + + var rank = lodash_es_min( + map/* default */.A(g.outEdges(v), function (e) { + return dfs(e.w) - g.edge(e).minlen; + }) + ); + + if ( + rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 + rank === undefined || // return value of _.map([]) for Lodash 4 + rank === null + ) { + // return value of _.map([null]) + rank = 0; + } + + return (label.rank = rank); + } + + forEach/* default */.A(g.sources(), dfs); +} + +/* + * Returns the amount of slack for the given edge. The slack is defined as the + * difference between the length of the edge and its minimum length. + */ +function slack(g, e) { + return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js + + + + + + +/* + * Constructs a spanning tree with tight edges and adjusted the input node's + * ranks to achieve this. A tight edge is one that is has a length that matches + * its "minlen" attribute. + * + * The basic structure for this function is derived from Gansner, et al., "A + * Technique for Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a DAG. + * 2. Graph must be connected. + * 3. Graph must have at least one node. + * 5. Graph nodes must have been previously assigned a "rank" property that + * respects the "minlen" property of incident edges. + * 6. Graph edges must have a "minlen" property. + * + * Post-conditions: + * + * - Graph nodes will have their rank adjusted to ensure that all edges are + * tight. + * + * Returns a tree (undirected graph) that is constructed using only "tight" + * edges. + */ +function feasibleTree(g) { + var t = new graphlib/* Graph */.T({ directed: false }); + + // Choose arbitrary node from which to start our tree + var start = g.nodes()[0]; + var size = g.nodeCount(); + t.setNode(start, {}); + + var edge, delta; + while (tightTree(t, g) < size) { + edge = findMinSlackEdge(t, g); + delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); + shiftRanks(t, g, delta); + } + + return t; +} + +/* + * Finds a maximal tree of tight edges and returns the number of nodes in the + * tree. + */ +function tightTree(t, g) { + function dfs(v) { + forEach/* default */.A(g.nodeEdges(v), function (e) { + var edgeV = e.v, + w = v === edgeV ? e.w : edgeV; + if (!t.hasNode(w) && !slack(g, e)) { + t.setNode(w, {}); + t.setEdge(v, w, {}); + dfs(w); + } + }); + } + + forEach/* default */.A(t.nodes(), dfs); + return t.nodeCount(); +} + +/* + * Finds the edge with the smallest slack that is incident on tree and returns + * it. + */ +function findMinSlackEdge(t, g) { + return lodash_es_minBy(g.edges(), function (e) { + if (t.hasNode(e.v) !== t.hasNode(e.w)) { + return slack(g, e); + } + }); +} + +function shiftRanks(t, g, delta) { + forEach/* default */.A(t.nodes(), function (v) { + g.node(v).rank += delta; + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createFind.js + + + + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!(0,isArrayLike/* default */.A)(collection)) { + var iteratee = (0,_baseIteratee/* default */.A)(predicate, 3); + collection = (0,keys/* default */.A)(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +/* harmony default export */ const _createFind = (createFind); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toInteger.js + + +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = (0,toFinite/* default */.A)(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +/* harmony default export */ const lodash_es_toInteger = (toInteger); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/findIndex.js + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : lodash_es_toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return (0,_baseFindIndex/* default */.A)(array, (0,_baseIteratee/* default */.A)(predicate, 3), index); +} + +/* harmony default export */ const lodash_es_findIndex = (findIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/find.js + + + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = _createFind(lodash_es_findIndex); + +/* harmony default export */ const lodash_es_find = (find); + +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js + + + + + +var DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function dijkstra_dijkstra(g, source, weightFn, edgeFn) { + return runDijkstra( + g, + String(source), + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runDijkstra(g, source, weightFn, edgeFn) { + var results = {}; + var pq = new PriorityQueue(); + var v, vEntry; + + var updateNeighbors = function (edge) { + var w = edge.v !== v ? edge.v : edge.w; + var wEntry = results[w]; + var weight = weightFn(edge); + var distance = vEntry.distance + weight; + + if (weight < 0) { + throw new Error( + 'dijkstra does not allow negative edge weights. ' + + 'Bad edge: ' + + edge + + ' Weight: ' + + weight + ); + } + + if (distance < wEntry.distance) { + wEntry.distance = distance; + wEntry.predecessor = v; + pq.decrease(w, distance); + } + }; + + g.nodes().forEach(function (v) { + var distance = v === source ? 0 : Number.POSITIVE_INFINITY; + results[v] = { distance: distance }; + pq.add(v, distance); + }); + + while (pq.size() > 0) { + v = pq.removeMin(); + vEntry = results[v]; + if (vEntry.distance === Number.POSITIVE_INFINITY) { + break; + } + + edgeFn(v).forEach(updateNeighbors); + } + + return results; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js + + + + + +function dijkstraAll(g, weightFunc, edgeFunc) { + return _.transform( + g.nodes(), + function (acc, v) { + acc[v] = dijkstra(g, v, weightFunc, edgeFunc); + }, + {} + ); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js + + + + +var floyd_warshall_DEFAULT_WEIGHT_FUNC = constant/* default */.A(1); + +function floydWarshall(g, weightFn, edgeFn) { + return runFloydWarshall( + g, + weightFn || floyd_warshall_DEFAULT_WEIGHT_FUNC, + edgeFn || + function (v) { + return g.outEdges(v); + } + ); +} + +function runFloydWarshall(g, weightFn, edgeFn) { + var results = {}; + var nodes = g.nodes(); + + nodes.forEach(function (v) { + results[v] = {}; + results[v][v] = { distance: 0 }; + nodes.forEach(function (w) { + if (v !== w) { + results[v][w] = { distance: Number.POSITIVE_INFINITY }; + } + }); + edgeFn(v).forEach(function (edge) { + var w = edge.v === v ? edge.w : edge.v; + var d = weightFn(edge); + results[v][w] = { distance: d, predecessor: v }; + }); + }); + + nodes.forEach(function (k) { + var rowK = results[k]; + nodes.forEach(function (i) { + var rowI = results[i]; + nodes.forEach(function (j) { + var ik = rowI[k]; + var kj = rowK[j]; + var ij = rowI[j]; + var altDistance = ik.distance + kj.distance; + if (altDistance < ij.distance) { + ij.distance = altDistance; + ij.predecessor = kj.predecessor; + } + }); + }); + }); + + return results; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseKeys.js + 1 modules +var _baseKeys = __webpack_require__(1852); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetTag.js + 2 modules +var _baseGetTag = __webpack_require__(8496); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isString.js + + + + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!(0,isArray/* default */.A)(value) && (0,isObjectLike/* default */.A)(value) && (0,_baseGetTag/* default */.A)(value) == stringTag); +} + +/* harmony default export */ const lodash_es_isString = (isString); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_asciiSize.js + + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = (0,_baseProperty/* default */.A)('length'); + +/* harmony default export */ const _asciiSize = (asciiSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_hasUnicode.js +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/* harmony default export */ const _hasUnicode = (hasUnicode); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_unicodeSize.js +/** Used to compose unicode character classes. */ +var _unicodeSize_rsAstralRange = '\\ud800-\\udfff', + _unicodeSize_rsComboMarksRange = '\\u0300-\\u036f', + _unicodeSize_reComboHalfMarksRange = '\\ufe20-\\ufe2f', + _unicodeSize_rsComboSymbolsRange = '\\u20d0-\\u20ff', + _unicodeSize_rsComboRange = _unicodeSize_rsComboMarksRange + _unicodeSize_reComboHalfMarksRange + _unicodeSize_rsComboSymbolsRange, + _unicodeSize_rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + _unicodeSize_rsAstralRange + ']', + rsCombo = '[' + _unicodeSize_rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + _unicodeSize_rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + _unicodeSize_rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + _unicodeSize_rsVarRange + ']?', + rsOptJoin = '(?:' + _unicodeSize_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +/* harmony default export */ const _unicodeSize = (unicodeSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringSize.js + + + + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return _hasUnicode(string) + ? _unicodeSize(string) + : _asciiSize(string); +} + +/* harmony default export */ const _stringSize = (stringSize); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/size.js + + + + + + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + if (collection == null) { + return 0; + } + if ((0,isArrayLike/* default */.A)(collection)) { + return lodash_es_isString(collection) ? _stringSize(collection) : collection.length; + } + var tag = (0,_getTag/* default */.A)(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return (0,_baseKeys/* default */.A)(collection).length; +} + +/* harmony default export */ const lodash_es_size = (size); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/topsort.js + + + + +topsort_topsort.CycleException = topsort_CycleException; + +function topsort_topsort(g) { + var visited = {}; + var stack = {}; + var results = []; + + function visit(node) { + if (has/* default */.A(stack, node)) { + throw new topsort_CycleException(); + } + + if (!has/* default */.A(visited, node)) { + stack[node] = true; + visited[node] = true; + forEach/* default */.A(g.predecessors(node), visit); + delete stack[node]; + results.push(node); + } + } + + forEach/* default */.A(g.sinks(), visit); + + if (lodash_es_size(visited) !== g.nodeCount()) { + throw new topsort_CycleException(); + } + + return results; +} + +function topsort_CycleException() {} +topsort_CycleException.prototype = new Error(); // must be an instance of Error to pass testing + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js + + + + +function isAcyclic(g) { + try { + topsort(g); + } catch (e) { + if (e instanceof CycleException) { + return false; + } + throw e; + } + return true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/dfs.js + + + + +/* + * A helper that preforms a pre- or post-order traversal on the input graph + * and returns the nodes in the order they were visited. If the graph is + * undirected then this algorithm will navigate using neighbors. If the graph + * is directed then this algorithm will navigate using successors. + * + * Order must be one of "pre" or "post". + */ +function dfs(g, vs, order) { + if (!isArray/* default */.A(vs)) { + vs = [vs]; + } + + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); + + var acc = []; + var visited = {}; + forEach/* default */.A(vs, function (v) { + if (!g.hasNode(v)) { + throw new Error('Graph does not have node: ' + v); + } + + doDfs(g, v, order === 'post', visited, navigation, acc); + }); + return acc; +} + +function doDfs(g, v, postorder, visited, navigation, acc) { + if (!has/* default */.A(visited, v)) { + visited[v] = true; + + if (!postorder) { + acc.push(v); + } + forEach/* default */.A(navigation(v), function (w) { + doDfs(g, w, postorder, visited, navigation, acc); + }); + if (postorder) { + acc.push(v); + } + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/postorder.js + + + + +function postorder(g, vs) { + return dfs(g, vs, 'post'); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/preorder.js + + + + +function preorder(g, vs) { + return dfs(g, vs, 'pre'); +} + +// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + 9 modules +var graph = __webpack_require__(3046); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/prim.js + + + + + + +function prim(g, weightFunc) { + var result = new Graph(); + var parents = {}; + var pq = new PriorityQueue(); + var v; + + function updateNeighbors(edge) { + var w = edge.v === v ? edge.w : edge.v; + var pri = pq.priority(w); + if (pri !== undefined) { + var edgeWeight = weightFunc(edge); + if (edgeWeight < pri) { + parents[w] = v; + pq.decrease(w, edgeWeight); + } + } + } + + if (g.nodeCount() === 0) { + return result; + } + + _.each(g.nodes(), function (v) { + pq.add(v, Number.POSITIVE_INFINITY); + result.setNode(v); + }); + + // Start from an arbitrary node + pq.decrease(g.nodes()[0], 0); + + var init = false; + while (pq.size() > 0) { + v = pq.removeMin(); + if (_.has(parents, v)) { + result.setEdge(v, parents[v]); + } else if (init) { + throw new Error('Input graph is not connected: ' + g); + } else { + init = true; + } + + g.nodeEdges(v).forEach(updateNeighbors); + } + + return result; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/alg/index.js + + + + + + + + + + + + + + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js + + + + + + + + +// Expose some internals for testing purposes +networkSimplex.initLowLimValues = initLowLimValues; +networkSimplex.initCutValues = initCutValues; +networkSimplex.calcCutValue = calcCutValue; +networkSimplex.leaveEdge = leaveEdge; +networkSimplex.enterEdge = enterEdge; +networkSimplex.exchangeEdges = exchangeEdges; + +/* + * The network simplex algorithm assigns ranks to each node in the input graph + * and iteratively improves the ranking to reduce the length of edges. + * + * Preconditions: + * + * 1. The input graph must be a DAG. + * 2. All nodes in the graph must have an object value. + * 3. All edges in the graph must have "minlen" and "weight" attributes. + * + * Postconditions: + * + * 1. All nodes in the graph will have an assigned "rank" attribute that has + * been optimized by the network simplex algorithm. Ranks start at 0. + * + * + * A rough sketch of the algorithm is as follows: + * + * 1. Assign initial ranks to each node. We use the longest path algorithm, + * which assigns ranks to the lowest position possible. In general this + * leads to very wide bottom ranks and unnecessarily long edges. + * 2. Construct a feasible tight tree. A tight tree is one such that all + * edges in the tree have no slack (difference between length of edge + * and minlen for the edge). This by itself greatly improves the assigned + * rankings by shorting edges. + * 3. Iteratively find edges that have negative cut values. Generally a + * negative cut value indicates that the edge could be removed and a new + * tree edge could be added to produce a more compact graph. + * + * Much of the algorithms here are derived from Gansner, et al., "A Technique + * for Drawing Directed Graphs." The structure of the file roughly follows the + * structure of the overall algorithm. + */ +function networkSimplex(g) { + g = simplify(g); + longestPath(g); + var t = feasibleTree(g); + initLowLimValues(t); + initCutValues(t, g); + + var e, f; + while ((e = leaveEdge(t))) { + f = enterEdge(t, g, e); + exchangeEdges(t, g, e, f); + } +} + +/* + * Initializes cut values for all edges in the tree. + */ +function initCutValues(t, g) { + var vs = postorder(t, t.nodes()); + vs = vs.slice(0, vs.length - 1); + forEach/* default */.A(vs, function (v) { + assignCutValue(t, g, v); + }); +} + +function assignCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + t.edge(child, parent).cutvalue = calcCutValue(t, g, child); +} + +/* + * Given the tight tree, its graph, and a child in the graph calculate and + * return the cut value for the edge between the child and its parent. + */ +function calcCutValue(t, g, child) { + var childLab = t.node(child); + var parent = childLab.parent; + // True if the child is on the tail end of the edge in the directed graph + var childIsTail = true; + // The graph's view of the tree edge we're inspecting + var graphEdge = g.edge(child, parent); + // The accumulated cut value for the edge between this node and its parent + var cutValue = 0; + + if (!graphEdge) { + childIsTail = false; + graphEdge = g.edge(parent, child); + } + + cutValue = graphEdge.weight; + + forEach/* default */.A(g.nodeEdges(child), function (e) { + var isOutEdge = e.v === child, + other = isOutEdge ? e.w : e.v; + + if (other !== parent) { + var pointsToHead = isOutEdge === childIsTail, + otherWeight = g.edge(e).weight; + + cutValue += pointsToHead ? otherWeight : -otherWeight; + if (isTreeEdge(t, child, other)) { + var otherCutValue = t.edge(child, other).cutvalue; + cutValue += pointsToHead ? -otherCutValue : otherCutValue; + } + } + }); + + return cutValue; +} + +function initLowLimValues(tree, root) { + if (arguments.length < 2) { + root = tree.nodes()[0]; + } + dfsAssignLowLim(tree, {}, 1, root); +} + +function dfsAssignLowLim(tree, visited, nextLim, v, parent) { + var low = nextLim; + var label = tree.node(v); + + visited[v] = true; + forEach/* default */.A(tree.neighbors(v), function (w) { + if (!has/* default */.A(visited, w)) { + nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); + } + }); + + label.low = low; + label.lim = nextLim++; + if (parent) { + label.parent = parent; + } else { + // TODO should be able to remove this when we incrementally update low lim + delete label.parent; + } + + return nextLim; +} + +function leaveEdge(tree) { + return lodash_es_find(tree.edges(), function (e) { + return tree.edge(e).cutvalue < 0; + }); +} + +function enterEdge(t, g, edge) { + var v = edge.v; + var w = edge.w; + + // For the rest of this function we assume that v is the tail and w is the + // head, so if we don't have this edge in the graph we should flip it to + // match the correct orientation. + if (!g.hasEdge(v, w)) { + v = edge.w; + w = edge.v; + } + + var vLabel = t.node(v); + var wLabel = t.node(w); + var tailLabel = vLabel; + var flip = false; + + // If the root is in the tail of the edge then we need to flip the logic that + // checks for the head and tail nodes in the candidates function below. + if (vLabel.lim > wLabel.lim) { + tailLabel = wLabel; + flip = true; + } + + var candidates = filter/* default */.A(g.edges(), function (edge) { + return ( + flip === isDescendant(t, t.node(edge.v), tailLabel) && + flip !== isDescendant(t, t.node(edge.w), tailLabel) + ); + }); + + return lodash_es_minBy(candidates, function (edge) { + return slack(g, edge); + }); +} + +function exchangeEdges(t, g, e, f) { + var v = e.v; + var w = e.w; + t.removeEdge(v, w); + t.setEdge(f.v, f.w, {}); + initLowLimValues(t); + initCutValues(t, g); + updateRanks(t, g); +} + +function updateRanks(t, g) { + var root = lodash_es_find(t.nodes(), function (v) { + return !g.node(v).parent; + }); + var vs = preorder(t, root); + vs = vs.slice(1); + forEach/* default */.A(vs, function (v) { + var parent = t.node(v).parent, + edge = g.edge(v, parent), + flipped = false; + + if (!edge) { + edge = g.edge(parent, v); + flipped = true; + } + + g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); + }); +} + +/* + * Returns true if the edge is in the tree. + */ +function isTreeEdge(tree, u, v) { + return tree.hasEdge(u, v); +} + +/* + * Returns true if the specified node is descendant of the root node per the + * assigned low and lim attributes in the tree. + */ +function isDescendant(tree, vLabel, rootLabel) { + return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/rank/index.js + + + + + + +/* + * Assigns a rank to each node in the input graph that respects the "minlen" + * constraint specified on edges between nodes. + * + * This basic structure is derived from Gansner, et al., "A Technique for + * Drawing Directed Graphs." + * + * Pre-conditions: + * + * 1. Graph must be a connected DAG + * 2. Graph nodes must be objects + * 3. Graph edges must have "weight" and "minlen" attributes + * + * Post-conditions: + * + * 1. Graph nodes will have a "rank" attribute based on the results of the + * algorithm. Ranks can start at any index (including negative), we'll + * fix them up later. + */ +function rank(g) { + switch (g.graph().ranker) { + case 'network-simplex': + networkSimplexRanker(g); + break; + case 'tight-tree': + tightTreeRanker(g); + break; + case 'longest-path': + longestPathRanker(g); + break; + default: + networkSimplexRanker(g); + } +} + +// A fast and simple ranker, but results are far from optimal. +var longestPathRanker = longestPath; + +function tightTreeRanker(g) { + longestPath(g); + feasibleTree(g); +} + +function networkSimplexRanker(g) { + networkSimplex(g); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/nesting-graph.js + + + + + +/* + * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, + * adds appropriate edges to ensure that all cluster nodes are placed between + * these boundries, and ensures that the graph is connected. + * + * In addition we ensure, through the use of the minlen property, that nodes + * and subgraph border nodes to not end up on the same rank. + * + * Preconditions: + * + * 1. Input graph is a DAG + * 2. Nodes in the input graph has a minlen attribute + * + * Postconditions: + * + * 1. Input graph is connected. + * 2. Dummy nodes are added for the tops and bottoms of subgraphs. + * 3. The minlen attribute for nodes is adjusted to ensure nodes do not + * get placed on the same rank as subgraph border nodes. + * + * The nesting graph idea comes from Sander, "Layout of Compound Directed + * Graphs." + */ +function nesting_graph_run(g) { + var root = addDummyNode(g, 'root', {}, '_root'); + var depths = treeDepths(g); + var height = lodash_es_max(values/* default */.A(depths)) - 1; // Note: depths is an Object not an array + var nodeSep = 2 * height + 1; + + g.graph().nestingRoot = root; + + // Multiply minlen by nodeSep to align nodes on non-border ranks. + forEach/* default */.A(g.edges(), function (e) { + g.edge(e).minlen *= nodeSep; + }); + + // Calculate a weight that is sufficient to keep subgraphs vertically compact + var weight = sumWeights(g) + 1; + + // Create border nodes and link them up + forEach/* default */.A(g.children(), function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + }); + + // Save the multiplier for node layers for later removal of empty border + // layers. + g.graph().nodeRankFactor = nodeSep; +} + +function nesting_graph_dfs(g, root, nodeSep, weight, height, depths, v) { + var children = g.children(v); + if (!children.length) { + if (v !== root) { + g.setEdge(root, v, { weight: 0, minlen: nodeSep }); + } + return; + } + + var top = addBorderNode(g, '_bt'); + var bottom = addBorderNode(g, '_bb'); + var label = g.node(v); + + g.setParent(top, v); + label.borderTop = top; + g.setParent(bottom, v); + label.borderBottom = bottom; + + forEach/* default */.A(children, function (child) { + nesting_graph_dfs(g, root, nodeSep, weight, height, depths, child); + + var childNode = g.node(child); + var childTop = childNode.borderTop ? childNode.borderTop : child; + var childBottom = childNode.borderBottom ? childNode.borderBottom : child; + var thisWeight = childNode.borderTop ? weight : 2 * weight; + var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; + + g.setEdge(top, childTop, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + + g.setEdge(childBottom, bottom, { + weight: thisWeight, + minlen: minlen, + nestingEdge: true, + }); + }); + + if (!g.parent(v)) { + g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); + } +} + +function treeDepths(g) { + var depths = {}; + function dfs(v, depth) { + var children = g.children(v); + if (children && children.length) { + forEach/* default */.A(children, function (child) { + dfs(child, depth + 1); + }); + } + depths[v] = depth; + } + forEach/* default */.A(g.children(), function (v) { + dfs(v, 1); + }); + return depths; +} + +function sumWeights(g) { + return reduce/* default */.A( + g.edges(), + function (acc, e) { + return acc + g.edge(e).weight; + }, + 0 + ); +} + +function cleanup(g) { + var graphLabel = g.graph(); + g.removeNode(graphLabel.nestingRoot); + delete graphLabel.nestingRoot; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.nestingEdge) { + g.removeEdge(e); + } + }); +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseClone.js + 15 modules +var _baseClone = __webpack_require__(1641); +;// CONCATENATED MODULE: ./node_modules/lodash-es/cloneDeep.js + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return (0,_baseClone/* default */.A)(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +/* harmony default export */ const lodash_es_cloneDeep = (cloneDeep); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js + + + + +function addSubgraphConstraints(g, cg, vs) { + var prev = {}, + rootPrev; + + forEach/* default */.A(vs, function (v) { + var child = g.parent(v), + parent, + prevChild; + while (child) { + parent = g.parent(child); + if (parent) { + prevChild = prev[parent]; + prev[parent] = child; + } else { + prevChild = rootPrev; + rootPrev = child; + } + if (prevChild && prevChild !== child) { + cg.setEdge(prevChild, child); + return; + } + child = parent; + } + }); + + /* + function dfs(v) { + var children = v ? g.children(v) : g.children(); + if (children.length) { + var min = Number.POSITIVE_INFINITY, + subgraphs = []; + _.each(children, function(child) { + var childMin = dfs(child); + if (g.children(child).length) { + subgraphs.push({ v: child, order: childMin }); + } + min = Math.min(min, childMin); + }); + _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { + cg.setEdge(prev.v, curr.v); + return curr; + }); + return min; + } + return g.node(v).order; + } + dfs(undefined); + */ +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js + + + + + +/* + * Constructs a graph that can be used to sort a layer of nodes. The graph will + * contain all base and subgraph nodes from the request layer in their original + * hierarchy and any edges that are incident on these nodes and are of the type + * requested by the "relationship" parameter. + * + * Nodes from the requested rank that do not have parents are assigned a root + * node in the output graph, which is set in the root graph attribute. This + * makes it easy to walk the hierarchy of movable nodes during ordering. + * + * Pre-conditions: + * + * 1. Input graph is a DAG + * 2. Base nodes in the input graph have a rank attribute + * 3. Subgraph nodes in the input graph has minRank and maxRank attributes + * 4. Edges have an assigned weight + * + * Post-conditions: + * + * 1. Output graph has all nodes in the movable rank with preserved + * hierarchy. + * 2. Root nodes in the movable layer are made children of the node + * indicated by the root attribute of the graph. + * 3. Non-movable nodes incident on movable nodes, selected by the + * relationship parameter, are included in the graph (without hierarchy). + * 4. Edges incident on movable nodes, selected by the relationship + * parameter, are added to the output graph. + * 5. The weights for copied edges are aggregated as need, since the output + * graph is not a multi-graph. + */ +function buildLayerGraph(g, rank, relationship) { + var root = createRootNode(g), + result = new graphlib/* Graph */.T({ compound: true }) + .setGraph({ root: root }) + .setDefaultNodeLabel(function (v) { + return g.node(v); + }); + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v), + parent = g.parent(v); + + if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) { + result.setNode(v); + result.setParent(v, parent || root); + + // This assumes we have only short edges! + forEach/* default */.A(g[relationship](v), function (e) { + var u = e.v === v ? e.w : e.v, + edge = result.edge(u, v), + weight = !isUndefined/* default */.A(edge) ? edge.weight : 0; + result.setEdge(u, v, { weight: g.edge(e).weight + weight }); + }); + + if (has/* default */.A(node, 'minRank')) { + result.setNode(v, { + borderLeft: node.borderLeft[rank], + borderRight: node.borderRight[rank], + }); + } + } + }); + + return result; +} + +function createRootNode(g) { + var v; + while (g.hasNode((v = uniqueId/* default */.A('_root')))); + return v; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseZipObject.js +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +/* harmony default export */ const _baseZipObject = (baseZipObject); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/zipObject.js + + + +/** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ +function zipObject(props, values) { + return _baseZipObject(props || [], values || [], _assignValue/* default */.A); +} + +/* harmony default export */ const lodash_es_zipObject = (zipObject); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseMap.js +var _baseMap = __webpack_require__(2568); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSortBy.js +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +/* harmony default export */ const _baseSortBy = (baseSortBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareAscending.js + + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = (0,isSymbol/* default */.A)(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = (0,isSymbol/* default */.A)(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +/* harmony default export */ const _compareAscending = (compareAscending); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_compareMultiple.js + + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = _compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +/* harmony default export */ const _compareMultiple = (compareMultiple); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseOrderBy.js + + + + + + + + + + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + if ((0,isArray/* default */.A)(iteratee)) { + return function(value) { + return (0,_baseGet/* default */.A)(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity/* default */.A]; + } + + var index = -1; + iteratees = (0,_arrayMap/* default */.A)(iteratees, (0,_baseUnary/* default */.A)(_baseIteratee/* default */.A)); + + var result = (0,_baseMap/* default */.A)(collection, function(value, key, collection) { + var criteria = (0,_arrayMap/* default */.A)(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return _baseSortBy(result, function(object, other) { + return _compareMultiple(object, other, orders); + }); +} + +/* harmony default export */ const _baseOrderBy = (baseOrderBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +;// CONCATENATED MODULE: ./node_modules/lodash-es/sortBy.js + + + + + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ +var sortBy = (0,_baseRest/* default */.A)(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && (0,_isIterateeCall/* default */.A)(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && (0,_isIterateeCall/* default */.A)(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return _baseOrderBy(collection, (0,_baseFlatten/* default */.A)(iteratees, 1), []); +}); + +/* harmony default export */ const lodash_es_sortBy = (sortBy); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/cross-count.js + + + + +/* + * A function that takes a layering (an array of layers, each with an array of + * ordererd nodes) and a graph and returns a weighted crossing count. + * + * Pre-conditions: + * + * 1. Input graph must be simple (not a multigraph), directed, and include + * only simple edges. + * 2. Edges in the input graph must have assigned weights. + * + * Post-conditions: + * + * 1. The graph and layering matrix are left unchanged. + * + * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." + */ +function crossCount(g, layering) { + var cc = 0; + for (var i = 1; i < layering.length; ++i) { + cc += twoLayerCrossCount(g, layering[i - 1], layering[i]); + } + return cc; +} + +function twoLayerCrossCount(g, northLayer, southLayer) { + // Sort all of the edges between the north and south layers by their position + // in the north layer and then the south. Map these edges to the position of + // their head in the south layer. + var southPos = lodash_es_zipObject( + southLayer, + map/* default */.A(southLayer, function (v, i) { + return i; + }) + ); + var southEntries = flatten/* default */.A( + map/* default */.A(northLayer, function (v) { + return lodash_es_sortBy( + map/* default */.A(g.outEdges(v), function (e) { + return { pos: southPos[e.w], weight: g.edge(e).weight }; + }), + 'pos' + ); + }) + ); + + // Build the accumulator tree + var firstIndex = 1; + while (firstIndex < southLayer.length) firstIndex <<= 1; + var treeSize = 2 * firstIndex - 1; + firstIndex -= 1; + var tree = map/* default */.A(new Array(treeSize), function () { + return 0; + }); + + // Calculate the weighted crossings + var cc = 0; + forEach/* default */.A( + // @ts-expect-error + southEntries.forEach(function (entry) { + var index = entry.pos + firstIndex; + tree[index] += entry.weight; + var weightSum = 0; + // @ts-expect-error + while (index > 0) { + // @ts-expect-error + if (index % 2) { + weightSum += tree[index + 1]; + } + // @ts-expect-error + index = (index - 1) >> 1; + tree[index] += entry.weight; + } + cc += entry.weight * weightSum; + }) + ); + + return cc; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/init-order.js + + + + +/* + * Assigns an initial order value for each node by performing a DFS search + * starting from nodes in the first rank. Nodes are assigned an order in their + * rank as they are first visited. + * + * This approach comes from Gansner, et al., "A Technique for Drawing Directed + * Graphs." + * + * Returns a layering matrix with an array per layer and each layer sorted by + * the order of its nodes. + */ +function initOrder(g) { + var visited = {}; + var simpleNodes = filter/* default */.A(g.nodes(), function (v) { + return !g.children(v).length; + }); + var maxRank = lodash_es_max( + map/* default */.A(simpleNodes, function (v) { + return g.node(v).rank; + }) + ); + var layers = map/* default */.A(range/* default */.A(maxRank + 1), function () { + return []; + }); + + function dfs(v) { + if (has/* default */.A(visited, v)) return; + visited[v] = true; + var node = g.node(v); + layers[node.rank].push(v); + forEach/* default */.A(g.successors(v), dfs); + } + + var orderedVs = lodash_es_sortBy(simpleNodes, function (v) { + return g.node(v).rank; + }); + forEach/* default */.A(orderedVs, dfs); + + return layers; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/barycenter.js + + + + +function barycenter(g, movable) { + return map/* default */.A(movable, function (v) { + var inV = g.inEdges(v); + if (!inV.length) { + return { v: v }; + } else { + var result = reduce/* default */.A( + inV, + function (acc, e) { + var edge = g.edge(e), + nodeU = g.node(e.v); + return { + sum: acc.sum + edge.weight * nodeU.order, + weight: acc.weight + edge.weight, + }; + }, + { sum: 0, weight: 0 } + ); + + return { + v: v, + barycenter: result.sum / result.weight, + weight: result.weight, + }; + } + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js + + + + +/* + * Given a list of entries of the form {v, barycenter, weight} and a + * constraint graph this function will resolve any conflicts between the + * constraint graph and the barycenters for the entries. If the barycenters for + * an entry would violate a constraint in the constraint graph then we coalesce + * the nodes in the conflict into a new node that respects the contraint and + * aggregates barycenter and weight information. + * + * This implementation is based on the description in Forster, "A Fast and + * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it + * differs in some specific details. + * + * Pre-conditions: + * + * 1. Each entry has the form {v, barycenter, weight}, or if the node has + * no barycenter, then {v}. + * + * Returns: + * + * A new list of entries of the form {vs, i, barycenter, weight}. The list + * `vs` may either be a singleton or it may be an aggregation of nodes + * ordered such that they do not violate constraints from the constraint + * graph. The property `i` is the lowest original index of any of the + * elements in `vs`. + */ +function resolveConflicts(entries, cg) { + var mappedEntries = {}; + forEach/* default */.A(entries, function (entry, i) { + var tmp = (mappedEntries[entry.v] = { + indegree: 0, + in: [], + out: [], + vs: [entry.v], + i: i, + }); + if (!isUndefined/* default */.A(entry.barycenter)) { + // @ts-expect-error + tmp.barycenter = entry.barycenter; + // @ts-expect-error + tmp.weight = entry.weight; + } + }); + + forEach/* default */.A(cg.edges(), function (e) { + var entryV = mappedEntries[e.v]; + var entryW = mappedEntries[e.w]; + if (!isUndefined/* default */.A(entryV) && !isUndefined/* default */.A(entryW)) { + entryW.indegree++; + entryV.out.push(mappedEntries[e.w]); + } + }); + + var sourceSet = filter/* default */.A(mappedEntries, function (entry) { + // @ts-expect-error + return !entry.indegree; + }); + + return doResolveConflicts(sourceSet); +} + +function doResolveConflicts(sourceSet) { + var entries = []; + + function handleIn(vEntry) { + return function (uEntry) { + if (uEntry.merged) { + return; + } + if ( + isUndefined/* default */.A(uEntry.barycenter) || + isUndefined/* default */.A(vEntry.barycenter) || + uEntry.barycenter >= vEntry.barycenter + ) { + mergeEntries(vEntry, uEntry); + } + }; + } + + function handleOut(vEntry) { + return function (wEntry) { + wEntry['in'].push(vEntry); + if (--wEntry.indegree === 0) { + sourceSet.push(wEntry); + } + }; + } + + while (sourceSet.length) { + var entry = sourceSet.pop(); + entries.push(entry); + forEach/* default */.A(entry['in'].reverse(), handleIn(entry)); + forEach/* default */.A(entry.out, handleOut(entry)); + } + + return map/* default */.A( + filter/* default */.A(entries, function (entry) { + return !entry.merged; + }), + function (entry) { + return pick/* default */.A(entry, ['vs', 'i', 'barycenter', 'weight']); + } + ); +} + +function mergeEntries(target, source) { + var sum = 0; + var weight = 0; + + if (target.weight) { + sum += target.barycenter * target.weight; + weight += target.weight; + } + + if (source.weight) { + sum += source.barycenter * source.weight; + weight += source.weight; + } + + target.vs = source.vs.concat(target.vs); + target.barycenter = sum / weight; + target.weight = weight; + target.i = Math.min(source.i, target.i); + source.merged = true; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort.js + + + + + +function sort(entries, biasRight) { + var parts = partition(entries, function (entry) { + return has/* default */.A(entry, 'barycenter'); + }); + var sortable = parts.lhs, + unsortable = lodash_es_sortBy(parts.rhs, function (entry) { + return -entry.i; + }), + vs = [], + sum = 0, + weight = 0, + vsIndex = 0; + + sortable.sort(compareWithBias(!!biasRight)); + + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + + forEach/* default */.A(sortable, function (entry) { + vsIndex += entry.vs.length; + vs.push(entry.vs); + sum += entry.barycenter * entry.weight; + weight += entry.weight; + vsIndex = consumeUnsortable(vs, unsortable, vsIndex); + }); + + var result = { vs: flatten/* default */.A(vs) }; + if (weight) { + result.barycenter = sum / weight; + result.weight = weight; + } + return result; +} + +function consumeUnsortable(vs, unsortable, index) { + var last; + while (unsortable.length && (last = lodash_es_last(unsortable)).i <= index) { + unsortable.pop(); + vs.push(last.vs); + index++; + } + return index; +} + +function compareWithBias(bias) { + return function (entryV, entryW) { + if (entryV.barycenter < entryW.barycenter) { + return -1; + } else if (entryV.barycenter > entryW.barycenter) { + return 1; + } + + return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; + }; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js + + + + + + + +function sortSubgraph(g, v, cg, biasRight) { + var movable = g.children(v); + var node = g.node(v); + var bl = node ? node.borderLeft : undefined; + var br = node ? node.borderRight : undefined; + var subgraphs = {}; + + if (bl) { + movable = filter/* default */.A(movable, function (w) { + return w !== bl && w !== br; + }); + } + + var barycenters = barycenter(g, movable); + forEach/* default */.A(barycenters, function (entry) { + if (g.children(entry.v).length) { + var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); + subgraphs[entry.v] = subgraphResult; + if (has/* default */.A(subgraphResult, 'barycenter')) { + mergeBarycenters(entry, subgraphResult); + } + } + }); + + var entries = resolveConflicts(barycenters, cg); + expandSubgraphs(entries, subgraphs); + + var result = sort(entries, biasRight); + + if (bl) { + result.vs = flatten/* default */.A([bl, result.vs, br]); + if (g.predecessors(bl).length) { + var blPred = g.node(g.predecessors(bl)[0]), + brPred = g.node(g.predecessors(br)[0]); + if (!has/* default */.A(result, 'barycenter')) { + result.barycenter = 0; + result.weight = 0; + } + result.barycenter = + (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); + result.weight += 2; + } + } + + return result; +} + +function expandSubgraphs(entries, subgraphs) { + forEach/* default */.A(entries, function (entry) { + entry.vs = flatten/* default */.A( + entry.vs.map(function (v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }) + ); + }); +} + +function mergeBarycenters(target, other) { + if (!isUndefined/* default */.A(target.barycenter)) { + target.barycenter = + (target.barycenter * target.weight + other.barycenter * other.weight) / + (target.weight + other.weight); + target.weight += other.weight; + } else { + target.barycenter = other.barycenter; + target.weight = other.weight; + } +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/order/index.js + + + + + + + + + + + +/* + * Applies heuristics to minimize edge crossings in the graph and sets the best + * order solution as an order attribute on each node. + * + * Pre-conditions: + * + * 1. Graph must be DAG + * 2. Graph nodes must be objects with a "rank" attribute + * 3. Graph edges must have the "weight" attribute + * + * Post-conditions: + * + * 1. Graph nodes will have an "order" attribute based on the results of the + * algorithm. + */ +function order(g) { + var maxRank = util_maxRank(g), + downLayerGraphs = buildLayerGraphs(g, range/* default */.A(1, maxRank + 1), 'inEdges'), + upLayerGraphs = buildLayerGraphs(g, range/* default */.A(maxRank - 1, -1, -1), 'outEdges'); + + var layering = initOrder(g); + assignOrder(g, layering); + + var bestCC = Number.POSITIVE_INFINITY, + best; + + for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { + sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); + + layering = buildLayerMatrix(g); + var cc = crossCount(g, layering); + if (cc < bestCC) { + lastBest = 0; + best = lodash_es_cloneDeep(layering); + bestCC = cc; + } + } + + assignOrder(g, best); +} + +function buildLayerGraphs(g, ranks, relationship) { + return map/* default */.A(ranks, function (rank) { + return buildLayerGraph(g, rank, relationship); + }); +} + +function sweepLayerGraphs(layerGraphs, biasRight) { + var cg = new graphlib/* Graph */.T(); + forEach/* default */.A(layerGraphs, function (lg) { + var root = lg.graph().root; + var sorted = sortSubgraph(lg, root, cg, biasRight); + forEach/* default */.A(sorted.vs, function (v, i) { + lg.node(v).order = i; + }); + addSubgraphConstraints(lg, cg, sorted.vs); + }); +} + +function assignOrder(g, layering) { + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, i) { + g.node(v).order = i; + }); + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js + + + + +function parentDummyChains(g) { + var postorderNums = parent_dummy_chains_postorder(g); + + forEach/* default */.A(g.graph().dummyChains, function (v) { + var node = g.node(v); + var edgeObj = node.edgeObj; + var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); + var path = pathData.path; + var lca = pathData.lca; + var pathIdx = 0; + var pathV = path[pathIdx]; + var ascending = true; + + while (v !== edgeObj.w) { + node = g.node(v); + + if (ascending) { + while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { + pathIdx++; + } + + if (pathV === lca) { + ascending = false; + } + } + + if (!ascending) { + while ( + pathIdx < path.length - 1 && + g.node((pathV = path[pathIdx + 1])).minRank <= node.rank + ) { + pathIdx++; + } + pathV = path[pathIdx]; + } + + g.setParent(v, pathV); + v = g.successors(v)[0]; + } + }); +} + +// Find a path from v to w through the lowest common ancestor (LCA). Return the +// full path and the LCA. +function findPath(g, postorderNums, v, w) { + var vPath = []; + var wPath = []; + var low = Math.min(postorderNums[v].low, postorderNums[w].low); + var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); + var parent; + var lca; + + // Traverse up from v to find the LCA + parent = v; + do { + parent = g.parent(parent); + vPath.push(parent); + } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); + lca = parent; + + // Traverse from w to LCA + parent = w; + while ((parent = g.parent(parent)) !== lca) { + wPath.push(parent); + } + + return { path: vPath.concat(wPath.reverse()), lca: lca }; +} + +function parent_dummy_chains_postorder(g) { + var result = {}; + var lim = 0; + + function dfs(v) { + var low = lim; + forEach/* default */.A(g.children(v), dfs); + result[v] = { low: low, lim: lim++ }; + } + forEach/* default */.A(g.children(), dfs); + + return result; +} + +// EXTERNAL MODULE: ./node_modules/lodash-es/_castFunction.js +var _castFunction = __webpack_require__(9922); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forOwn.js + + + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && (0,_baseForOwn/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee)); +} + +/* harmony default export */ const lodash_es_forOwn = (forOwn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFor.js + 1 modules +var _baseFor = __webpack_require__(4574); +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/forIn.js + + + + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : (0,_baseFor/* default */.A)(object, (0,_castFunction/* default */.A)(iteratee), keysIn/* default */.A); +} + +/* harmony default export */ const lodash_es_forIn = (forIn); + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/bk.js + + + + +/* + * This module provides coordinate assignment based on Brandes and Köpf, "Fast + * and Simple Horizontal Coordinate Assignment." + */ + + + +/* + * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" + * property. A type-1 conflict is one where a non-inner segment crosses an + * inner segment. An inner segment is an edge with both incident nodes marked + * with the "dummy" property. + * + * This algorithm scans layer by layer, starting with the second, for type-1 + * conflicts between the current layer and the previous layer. For each layer + * it scans the nodes from left to right until it reaches one that is incident + * on an inner segment. It then scans predecessors to determine if they have + * edges that cross that inner segment. At the end a final scan is done for all + * nodes on the current rank to see if they cross the last visited inner + * segment. + * + * This algorithm (safely) assumes that a dummy node will only be incident on a + * single node in the layers being scanned. + */ +function findType1Conflicts(g, layering) { + var conflicts = {}; + + function visitLayer(prevLayer, layer) { + var // last visited node in the previous layer that is incident on an inner + // segment. + k0 = 0, + // Tracks the last node in this layer scanned for crossings with a type-1 + // segment. + scanPos = 0, + prevLayerLength = prevLayer.length, + lastNode = lodash_es_last(layer); + + forEach/* default */.A(layer, function (v, i) { + var w = findOtherInnerSegmentNode(g, v), + k1 = w ? g.node(w).order : prevLayerLength; + + if (w || v === lastNode) { + forEach/* default */.A(layer.slice(scanPos, i + 1), function (scanNode) { + forEach/* default */.A(g.predecessors(scanNode), function (u) { + var uLabel = g.node(u), + uPos = uLabel.order; + if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { + addConflict(conflicts, u, scanNode); + } + }); + }); + // @ts-expect-error + scanPos = i + 1; + k0 = k1; + } + }); + + return layer; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findType2Conflicts(g, layering) { + var conflicts = {}; + + function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { + var v; + forEach/* default */.A(range/* default */.A(southPos, southEnd), function (i) { + v = south[i]; + if (g.node(v).dummy) { + forEach/* default */.A(g.predecessors(v), function (u) { + var uNode = g.node(u); + if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { + addConflict(conflicts, u, v); + } + }); + } + }); + } + + function visitLayer(north, south) { + var prevNorthPos = -1, + nextNorthPos, + southPos = 0; + + forEach/* default */.A(south, function (v, southLookahead) { + if (g.node(v).dummy === 'border') { + var predecessors = g.predecessors(v); + if (predecessors.length) { + nextNorthPos = g.node(predecessors[0]).order; + scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); + // @ts-expect-error + southPos = southLookahead; + prevNorthPos = nextNorthPos; + } + } + scan(south, southPos, south.length, nextNorthPos, north.length); + }); + + return south; + } + + reduce/* default */.A(layering, visitLayer); + return conflicts; +} + +function findOtherInnerSegmentNode(g, v) { + if (g.node(v).dummy) { + return lodash_es_find(g.predecessors(v), function (u) { + return g.node(u).dummy; + }); + } +} + +function addConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + + var conflictsV = conflicts[v]; + if (!conflictsV) { + conflicts[v] = conflictsV = {}; + } + conflictsV[w] = true; +} + +function hasConflict(conflicts, v, w) { + if (v > w) { + var tmp = v; + v = w; + w = tmp; + } + return has/* default */.A(conflicts[v], w); +} + +/* + * Try to align nodes into vertical "blocks" where possible. This algorithm + * attempts to align a node with one of its median neighbors. If the edge + * connecting a neighbor is a type-1 conflict then we ignore that possibility. + * If a previous node has already formed a block with a node after the node + * we're trying to form a block with, we also ignore that possibility - our + * blocks would be split in that scenario. + */ +function verticalAlignment(g, layering, conflicts, neighborFn) { + var root = {}, + align = {}, + pos = {}; + + // We cache the position here based on the layering because the graph and + // layering may be out of sync. The layering matrix is manipulated to + // generate different extreme alignments. + forEach/* default */.A(layering, function (layer) { + forEach/* default */.A(layer, function (v, order) { + root[v] = v; + align[v] = v; + pos[v] = order; + }); + }); + + forEach/* default */.A(layering, function (layer) { + var prevIdx = -1; + forEach/* default */.A(layer, function (v) { + var ws = neighborFn(v); + if (ws.length) { + ws = lodash_es_sortBy(ws, function (w) { + return pos[w]; + }); + var mp = (ws.length - 1) / 2; + for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { + var w = ws[i]; + if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { + align[w] = v; + align[v] = root[v] = root[w]; + prevIdx = pos[w]; + } + } + } + }); + }); + + return { root: root, align: align }; +} + +function horizontalCompaction(g, layering, root, align, reverseSep) { + // This portion of the algorithm differs from BK due to a number of problems. + // Instead of their algorithm we construct a new block graph and do two + // sweeps. The first sweep places blocks with the smallest possible + // coordinates. The second sweep removes unused space by moving blocks to the + // greatest coordinates without violating separation. + var xs = {}, + blockG = buildBlockGraph(g, layering, root, reverseSep), + borderType = reverseSep ? 'borderLeft' : 'borderRight'; + + function iterate(setXsFunc, nextNodesFunc) { + var stack = blockG.nodes(); + var elem = stack.pop(); + var visited = {}; + while (elem) { + if (visited[elem]) { + setXsFunc(elem); + } else { + visited[elem] = true; + stack.push(elem); + stack = stack.concat(nextNodesFunc(elem)); + } + + elem = stack.pop(); + } + } + + // First pass, assign smallest coordinates + function pass1(elem) { + xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) { + return Math.max(acc, xs[e.v] + blockG.edge(e)); + }, 0); + } + + // Second pass, assign greatest coordinates + function pass2(elem) { + var min = blockG.outEdges(elem).reduce(function (acc, e) { + return Math.min(acc, xs[e.w] - blockG.edge(e)); + }, Number.POSITIVE_INFINITY); + + var node = g.node(elem); + if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { + xs[elem] = Math.max(xs[elem], min); + } + } + + iterate(pass1, blockG.predecessors.bind(blockG)); + iterate(pass2, blockG.successors.bind(blockG)); + + // Assign x coordinates to all nodes + forEach/* default */.A(align, function (v) { + xs[v] = xs[root[v]]; + }); + + return xs; +} + +function buildBlockGraph(g, layering, root, reverseSep) { + var blockGraph = new graphlib/* Graph */.T(), + graphLabel = g.graph(), + sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); + + forEach/* default */.A(layering, function (layer) { + var u; + forEach/* default */.A(layer, function (v) { + var vRoot = root[v]; + blockGraph.setNode(vRoot); + if (u) { + var uRoot = root[u], + prevMax = blockGraph.edge(uRoot, vRoot); + blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); + } + u = v; + }); + }); + + return blockGraph; +} + +/* + * Returns the alignment that has the smallest width of the given alignments. + */ +function findSmallestWidthAlignment(g, xss) { + return lodash_es_minBy(values/* default */.A(xss), function (xs) { + var max = Number.NEGATIVE_INFINITY; + var min = Number.POSITIVE_INFINITY; + + lodash_es_forIn(xs, function (x, v) { + var halfWidth = width(g, v) / 2; + + max = Math.max(x + halfWidth, max); + min = Math.min(x - halfWidth, min); + }); + + return max - min; + }); +} + +/* + * Align the coordinates of each of the layout alignments such that + * left-biased alignments have their minimum coordinate at the same point as + * the minimum coordinate of the smallest width alignment and right-biased + * alignments have their maximum coordinate at the same point as the maximum + * coordinate of the smallest width alignment. + */ +function alignCoordinates(xss, alignTo) { + var alignToVals = values/* default */.A(alignTo), + alignToMin = lodash_es_min(alignToVals), + alignToMax = lodash_es_max(alignToVals); + + forEach/* default */.A(['u', 'd'], function (vert) { + forEach/* default */.A(['l', 'r'], function (horiz) { + var alignment = vert + horiz, + xs = xss[alignment], + delta; + if (xs === alignTo) return; + + var xsVals = values/* default */.A(xs); + delta = horiz === 'l' ? alignToMin - lodash_es_min(xsVals) : alignToMax - lodash_es_max(xsVals); + + if (delta) { + xss[alignment] = lodash_es_mapValues(xs, function (x) { + return x + delta; + }); + } + }); + }); +} + +function balance(xss, align) { + return lodash_es_mapValues(xss.ul, function (ignore, v) { + if (align) { + return xss[align.toLowerCase()][v]; + } else { + var xs = lodash_es_sortBy(map/* default */.A(xss, v)); + return (xs[1] + xs[2]) / 2; + } + }); +} + +function positionX(g) { + var layering = buildLayerMatrix(g); + var conflicts = merge/* default */.A(findType1Conflicts(g, layering), findType2Conflicts(g, layering)); + + var xss = {}; + var adjustedLayering; + forEach/* default */.A(['u', 'd'], function (vert) { + adjustedLayering = vert === 'u' ? layering : values/* default */.A(layering).reverse(); + forEach/* default */.A(['l', 'r'], function (horiz) { + if (horiz === 'r') { + adjustedLayering = map/* default */.A(adjustedLayering, function (inner) { + return values/* default */.A(inner).reverse(); + }); + } + + var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); + var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); + var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r'); + if (horiz === 'r') { + xs = lodash_es_mapValues(xs, function (x) { + return -x; + }); + } + xss[vert + horiz] = xs; + }); + }); + + var smallestWidth = findSmallestWidthAlignment(g, xss); + alignCoordinates(xss, smallestWidth); + return balance(xss, g.graph().align); +} + +function sep(nodeSep, edgeSep, reverseSep) { + return function (g, v, w) { + var vLabel = g.node(v); + var wLabel = g.node(w); + var sum = 0; + var delta; + + sum += vLabel.width / 2; + if (has/* default */.A(vLabel, 'labelpos')) { + switch (vLabel.labelpos.toLowerCase()) { + case 'l': + delta = -vLabel.width / 2; + break; + case 'r': + delta = vLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; + sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; + + sum += wLabel.width / 2; + if (has/* default */.A(wLabel, 'labelpos')) { + switch (wLabel.labelpos.toLowerCase()) { + case 'l': + delta = wLabel.width / 2; + break; + case 'r': + delta = -wLabel.width / 2; + break; + } + } + if (delta) { + sum += reverseSep ? delta : -delta; + } + delta = 0; + + return sum; + }; +} + +function width(g, v) { + return g.node(v).width; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/position/index.js + + + + + + +function position(g) { + g = asNonCompoundGraph(g); + + positionY(g); + lodash_es_forOwn(positionX(g), function (x, v) { + g.node(v).x = x; + }); +} + +function positionY(g) { + var layering = buildLayerMatrix(g); + var rankSep = g.graph().ranksep; + var prevY = 0; + forEach/* default */.A(layering, function (layer) { + var maxHeight = lodash_es_max( + map/* default */.A(layer, function (v) { + return g.node(v).height; + }) + ); + forEach/* default */.A(layer, function (v) { + g.node(v).y = prevY + maxHeight / 2; + }); + prevY += maxHeight + rankSep; + }); +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/layout.js + + + + + + + + + + + + + + + +function layout(g, opts) { + var time = opts && opts.debugTiming ? util_time : notime; + time('layout', function () { + var layoutGraph = time(' buildLayoutGraph', function () { + return buildLayoutGraph(g); + }); + time(' runLayout', function () { + runLayout(layoutGraph, time); + }); + time(' updateInputGraph', function () { + updateInputGraph(g, layoutGraph); + }); + }); +} + +function runLayout(g, time) { + time(' makeSpaceForEdgeLabels', function () { + makeSpaceForEdgeLabels(g); + }); + time(' removeSelfEdges', function () { + removeSelfEdges(g); + }); + time(' acyclic', function () { + run(g); + }); + time(' nestingGraph.run', function () { + nesting_graph_run(g); + }); + time(' rank', function () { + rank(asNonCompoundGraph(g)); + }); + time(' injectEdgeLabelProxies', function () { + injectEdgeLabelProxies(g); + }); + time(' removeEmptyRanks', function () { + removeEmptyRanks(g); + }); + time(' nestingGraph.cleanup', function () { + cleanup(g); + }); + time(' normalizeRanks', function () { + normalizeRanks(g); + }); + time(' assignRankMinMax', function () { + assignRankMinMax(g); + }); + time(' removeEdgeLabelProxies', function () { + removeEdgeLabelProxies(g); + }); + time(' normalize.run', function () { + normalize_run(g); + }); + time(' parentDummyChains', function () { + parentDummyChains(g); + }); + time(' addBorderSegments', function () { + addBorderSegments(g); + }); + time(' order', function () { + order(g); + }); + time(' insertSelfEdges', function () { + insertSelfEdges(g); + }); + time(' adjustCoordinateSystem', function () { + adjust(g); + }); + time(' position', function () { + position(g); + }); + time(' positionSelfEdges', function () { + positionSelfEdges(g); + }); + time(' removeBorderNodes', function () { + removeBorderNodes(g); + }); + time(' normalize.undo', function () { + normalize_undo(g); + }); + time(' fixupEdgeLabelCoords', function () { + fixupEdgeLabelCoords(g); + }); + time(' undoCoordinateSystem', function () { + coordinate_system_undo(g); + }); + time(' translateGraph', function () { + translateGraph(g); + }); + time(' assignNodeIntersects', function () { + assignNodeIntersects(g); + }); + time(' reversePoints', function () { + reversePointsForReversedEdges(g); + }); + time(' acyclic.undo', function () { + undo(g); + }); +} + +/* + * Copies final layout information from the layout graph back to the input + * graph. This process only copies whitelisted attributes from the layout graph + * to the input graph, so it serves as a good place to determine what + * attributes can influence layout. + */ +function updateInputGraph(inputGraph, layoutGraph) { + forEach/* default */.A(inputGraph.nodes(), function (v) { + var inputLabel = inputGraph.node(v); + var layoutLabel = layoutGraph.node(v); + + if (inputLabel) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + + if (layoutGraph.children(v).length) { + inputLabel.width = layoutLabel.width; + inputLabel.height = layoutLabel.height; + } + } + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var inputLabel = inputGraph.edge(e); + var layoutLabel = layoutGraph.edge(e); + + inputLabel.points = layoutLabel.points; + if (has/* default */.A(layoutLabel, 'x')) { + inputLabel.x = layoutLabel.x; + inputLabel.y = layoutLabel.y; + } + }); + + inputGraph.graph().width = layoutGraph.graph().width; + inputGraph.graph().height = layoutGraph.graph().height; +} + +var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy']; +var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }; +var graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align']; +var nodeNumAttrs = ['width', 'height']; +var nodeDefaults = { width: 0, height: 0 }; +var edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset']; +var edgeDefaults = { + minlen: 1, + weight: 1, + width: 0, + height: 0, + labeloffset: 10, + labelpos: 'r', +}; +var edgeAttrs = ['labelpos']; + +/* + * Constructs a new graph from the input graph, which can be used for layout. + * This process copies only whitelisted attributes from the input graph to the + * layout graph. Thus this function serves as a good place to determine what + * attributes can influence layout. + */ +function buildLayoutGraph(inputGraph) { + var g = new graphlib/* Graph */.T({ multigraph: true, compound: true }); + var graph = canonicalize(inputGraph.graph()); + + g.setGraph( + merge/* default */.A({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick/* default */.A(graph, graphAttrs)) + ); + + forEach/* default */.A(inputGraph.nodes(), function (v) { + var node = canonicalize(inputGraph.node(v)); + g.setNode(v, defaults/* default */.A(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); + g.setParent(v, inputGraph.parent(v)); + }); + + forEach/* default */.A(inputGraph.edges(), function (e) { + var edge = canonicalize(inputGraph.edge(e)); + g.setEdge( + e, + merge/* default */.A({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick/* default */.A(edge, edgeAttrs)) + ); + }); + + return g; +} + +/* + * This idea comes from the Gansner paper: to account for edge labels in our + * layout we split each rank in half by doubling minlen and halving ranksep. + * Then we can place labels at these mid-points between nodes. + * + * We also add some minimal padding to the width to push the label for the edge + * away from the edge itself a bit. + */ +function makeSpaceForEdgeLabels(g) { + var graph = g.graph(); + graph.ranksep /= 2; + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + edge.minlen *= 2; + if (edge.labelpos.toLowerCase() !== 'c') { + if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { + edge.width += edge.labeloffset; + } else { + edge.height += edge.labeloffset; + } + } + }); +} + +/* + * Creates temporary dummy nodes that capture the rank in which each edge's + * label is going to, if it has one of non-zero width and height. We do this + * so that we can safely remove empty ranks while preserving balance for the + * label's position. + */ +function injectEdgeLabelProxies(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.width && edge.height) { + var v = g.node(e.v); + var w = g.node(e.w); + var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; + addDummyNode(g, 'edge-proxy', label, '_ep'); + } + }); +} + +function assignRankMinMax(g) { + var maxRank = 0; + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.borderTop) { + node.minRank = g.node(node.borderTop).rank; + node.maxRank = g.node(node.borderBottom).rank; + // @ts-expect-error + maxRank = lodash_es_max(maxRank, node.maxRank); + } + }); + g.graph().maxRank = maxRank; +} + +function removeEdgeLabelProxies(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'edge-proxy') { + g.edge(node.e).labelRank = node.rank; + g.removeNode(v); + } + }); +} + +function translateGraph(g) { + var minX = Number.POSITIVE_INFINITY; + var maxX = 0; + var minY = Number.POSITIVE_INFINITY; + var maxY = 0; + var graphLabel = g.graph(); + var marginX = graphLabel.marginx || 0; + var marginY = graphLabel.marginy || 0; + + function getExtremes(attrs) { + var x = attrs.x; + var y = attrs.y; + var w = attrs.width; + var h = attrs.height; + minX = Math.min(minX, x - w / 2); + maxX = Math.max(maxX, x + w / 2); + minY = Math.min(minY, y - h / 2); + maxY = Math.max(maxY, y + h / 2); + } + + forEach/* default */.A(g.nodes(), function (v) { + getExtremes(g.node(v)); + }); + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + getExtremes(edge); + } + }); + + minX -= marginX; + minY -= marginY; + + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + node.x -= minX; + node.y -= minY; + }); + + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + forEach/* default */.A(edge.points, function (p) { + p.x -= minX; + p.y -= minY; + }); + if (has/* default */.A(edge, 'x')) { + edge.x -= minX; + } + if (has/* default */.A(edge, 'y')) { + edge.y -= minY; + } + }); + + graphLabel.width = maxX - minX + marginX; + graphLabel.height = maxY - minY + marginY; +} + +function assignNodeIntersects(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + var nodeV = g.node(e.v); + var nodeW = g.node(e.w); + var p1, p2; + if (!edge.points) { + edge.points = []; + p1 = nodeW; + p2 = nodeV; + } else { + p1 = edge.points[0]; + p2 = edge.points[edge.points.length - 1]; + } + edge.points.unshift(intersectRect(nodeV, p1)); + edge.points.push(intersectRect(nodeW, p2)); + }); +} + +function fixupEdgeLabelCoords(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (has/* default */.A(edge, 'x')) { + if (edge.labelpos === 'l' || edge.labelpos === 'r') { + edge.width -= edge.labeloffset; + } + switch (edge.labelpos) { + case 'l': + edge.x -= edge.width / 2 + edge.labeloffset; + break; + case 'r': + edge.x += edge.width / 2 + edge.labeloffset; + break; + } + } + }); +} + +function reversePointsForReversedEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + var edge = g.edge(e); + if (edge.reversed) { + edge.points.reverse(); + } + }); +} + +function removeBorderNodes(g) { + forEach/* default */.A(g.nodes(), function (v) { + if (g.children(v).length) { + var node = g.node(v); + var t = g.node(node.borderTop); + var b = g.node(node.borderBottom); + var l = g.node(lodash_es_last(node.borderLeft)); + var r = g.node(lodash_es_last(node.borderRight)); + + node.width = Math.abs(r.x - l.x); + node.height = Math.abs(b.y - t.y); + node.x = l.x + node.width / 2; + node.y = t.y + node.height / 2; + } + }); + + forEach/* default */.A(g.nodes(), function (v) { + if (g.node(v).dummy === 'border') { + g.removeNode(v); + } + }); +} + +function removeSelfEdges(g) { + forEach/* default */.A(g.edges(), function (e) { + if (e.v === e.w) { + var node = g.node(e.v); + if (!node.selfEdges) { + node.selfEdges = []; + } + node.selfEdges.push({ e: e, label: g.edge(e) }); + g.removeEdge(e); + } + }); +} + +function insertSelfEdges(g) { + var layers = buildLayerMatrix(g); + forEach/* default */.A(layers, function (layer) { + var orderShift = 0; + forEach/* default */.A(layer, function (v, i) { + var node = g.node(v); + node.order = i + orderShift; + forEach/* default */.A(node.selfEdges, function (selfEdge) { + addDummyNode( + g, + 'selfedge', + { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node.rank, + order: i + ++orderShift, + e: selfEdge.e, + label: selfEdge.label, + }, + '_se' + ); + }); + delete node.selfEdges; + }); + }); +} + +function positionSelfEdges(g) { + forEach/* default */.A(g.nodes(), function (v) { + var node = g.node(v); + if (node.dummy === 'selfedge') { + var selfNode = g.node(node.e.v); + var x = selfNode.x + selfNode.width / 2; + var y = selfNode.y; + var dx = node.x - x; + var dy = selfNode.height / 2; + g.setEdge(node.e, node.label); + g.removeNode(v); + node.label.points = [ + { x: x + (2 * dx) / 3, y: y - dy }, + { x: x + (5 * dx) / 6, y: y - dy }, + { x: x + dx, y: y }, + { x: x + (5 * dx) / 6, y: y + dy }, + { x: x + (2 * dx) / 3, y: y + dy }, + ]; + node.label.x = node.x; + node.label.y = node.y; + } + }); +} + +function selectNumberAttrs(obj, attrs) { + return lodash_es_mapValues(pick/* default */.A(obj, attrs), Number); +} + +function canonicalize(attrs) { + var newAttrs = {}; + forEach/* default */.A(attrs, function (v, k) { + newAttrs[k.toLowerCase()] = v; + }); + return newAttrs; +} + +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + + + + + + + + +/***/ }), + +/***/ 3046: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + T: () => (/* binding */ Graph) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/has.js + 1 modules +var has = __webpack_require__(8585); +// EXTERNAL MODULE: ./node_modules/lodash-es/constant.js +var constant = __webpack_require__(9142); +// EXTERNAL MODULE: ./node_modules/lodash-es/isFunction.js +var isFunction = __webpack_require__(9610); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +// EXTERNAL MODULE: ./node_modules/lodash-es/filter.js + 1 modules +var filter = __webpack_require__(1662); +// EXTERNAL MODULE: ./node_modules/lodash-es/isEmpty.js +var isEmpty = __webpack_require__(6401); +// EXTERNAL MODULE: ./node_modules/lodash-es/forEach.js +var forEach = __webpack_require__(8058); +// EXTERNAL MODULE: ./node_modules/lodash-es/isUndefined.js +var isUndefined = __webpack_require__(9592); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFlatten.js + 1 modules +var _baseFlatten = __webpack_require__(3588); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseRest.js +var _baseRest = __webpack_require__(4326); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseFindIndex.js +var _baseFindIndex = __webpack_require__(5707); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsNaN.js +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/* harmony default export */ const _baseIsNaN = (baseIsNaN); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_strictIndexOf.js +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/* harmony default export */ const _strictIndexOf = (strictIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIndexOf.js + + + + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? _strictIndexOf(array, value, fromIndex) + : (0,_baseFindIndex/* default */.A)(array, _baseIsNaN, fromIndex); +} + +/* harmony default export */ const _baseIndexOf = (baseIndexOf); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludes.js + + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && _baseIndexOf(array, value, 0) > -1; +} + +/* harmony default export */ const _arrayIncludes = (arrayIncludes); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayIncludesWith.js +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arrayIncludesWith = (arrayIncludesWith); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Set.js +var _Set = __webpack_require__(9857); +;// CONCATENATED MODULE: ./node_modules/lodash-es/noop.js +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +/* harmony default export */ const lodash_es_noop = (noop); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createSet.js + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(_Set/* default */.A && (1 / (0,_setToArray/* default */.A)(new _Set/* default */.A([,-0]))[1]) == INFINITY) ? lodash_es_noop : function(values) { + return new _Set/* default */.A(values); +}; + +/* harmony default export */ const _createSet = (createSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseUniq.js + + + + + + + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = _arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = _arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : _createSet(array); + if (set) { + return (0,_setToArray/* default */.A)(set); + } + isCommon = false; + includes = _cacheHas/* default */.A; + seen = new _SetCache/* default */.A; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/* harmony default export */ const _baseUniq = (baseUniq); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLikeObject.js +var isArrayLikeObject = __webpack_require__(3533); +;// CONCATENATED MODULE: ./node_modules/lodash-es/union.js + + + + + +/** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ +var union = (0,_baseRest/* default */.A)(function(arrays) { + return _baseUniq((0,_baseFlatten/* default */.A)(arrays, 1, isArrayLikeObject/* default */.A, true)); +}); + +/* harmony default export */ const lodash_es_union = (union); + +// EXTERNAL MODULE: ./node_modules/lodash-es/values.js + 1 modules +var values = __webpack_require__(8207); +// EXTERNAL MODULE: ./node_modules/lodash-es/reduce.js + 2 modules +var reduce = __webpack_require__(9463); +;// CONCATENATED MODULE: ./node_modules/dagre-d3-es/src/graphlib/graph.js + + +var DEFAULT_EDGE_NAME = '\x00'; +var GRAPH_NODE = '\x00'; +var EDGE_KEY_DELIM = '\x01'; + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. + +// Implementation notes: +// +// * Node id query functions should return string ids for the nodes +// * Edge id query functions should return an "edgeObj", edge object, that is +// composed of enough information to uniquely identify an edge: {v, w, name}. +// * Internally we use an "edgeId", a stringified form of the edgeObj, to +// reference edges. This is because we need a performant way to look these +// edges up and, object properties, which have string keys, are the closest +// we're going to get to a performant hashtable in JavaScript. +class Graph { + constructor(opts = {}) { + this._isDirected = has/* default */.A(opts, 'directed') ? opts.directed : true; + this._isMultigraph = has/* default */.A(opts, 'multigraph') ? opts.multigraph : false; + this._isCompound = has/* default */.A(opts, 'compound') ? opts.compound : false; + + // Label for the graph itself + this._label = undefined; + + // Defaults to be set when creating a new node + this._defaultNodeLabelFn = constant/* default */.A(undefined); + + // Defaults to be set when creating a new edge + this._defaultEdgeLabelFn = constant/* default */.A(undefined); + + // v -> label + this._nodes = {}; + + if (this._isCompound) { + // v -> parent + this._parent = {}; + + // v -> children + this._children = {}; + this._children[GRAPH_NODE] = {}; + } + + // v -> edgeObj + this._in = {}; + + // u -> v -> Number + this._preds = {}; + + // v -> edgeObj + this._out = {}; + + // v -> w -> Number + this._sucs = {}; + + // e -> edgeObj + this._edgeObjs = {}; + + // e -> label + this._edgeLabels = {}; + } + /* === Graph functions ========= */ + isDirected() { + return this._isDirected; + } + isMultigraph() { + return this._isMultigraph; + } + isCompound() { + return this._isCompound; + } + setGraph(label) { + this._label = label; + return this; + } + graph() { + return this._label; + } + /* === Node functions ========== */ + setDefaultNodeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; + } + nodeCount() { + return this._nodeCount; + } + nodes() { + return keys/* default */.A(this._nodes); + } + sources() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._in[v]); + }); + } + sinks() { + var self = this; + return filter/* default */.A(this.nodes(), function (v) { + return isEmpty/* default */.A(self._out[v]); + }); + } + setNodes(vs, value) { + var args = arguments; + var self = this; + forEach/* default */.A(vs, function (v) { + if (args.length > 1) { + self.setNode(v, value); + } else { + self.setNode(v); + } + }); + return this; + } + setNode(v, value) { + if (has/* default */.A(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; + } + return this; + } + + // @ts-expect-error + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; + } + node(v) { + return this._nodes[v]; + } + hasNode(v) { + return has/* default */.A(this._nodes, v); + } + removeNode(v) { + var self = this; + if (has/* default */.A(this._nodes, v)) { + var removeEdge = function (e) { + self.removeEdge(self._edgeObjs[e]); + }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + forEach/* default */.A(this.children(v), function (child) { + self.setParent(child); + }); + delete this._children[v]; + } + forEach/* default */.A(keys/* default */.A(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + forEach/* default */.A(keys/* default */.A(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; + } + setParent(v, parent) { + if (!this._isCompound) { + throw new Error('Cannot set parent in a non-compound graph'); + } + + if (isUndefined/* default */.A(parent)) { + parent = GRAPH_NODE; + } else { + // Coerce parent to string + parent += ''; + for (var ancestor = parent; !isUndefined/* default */.A(ancestor); ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle'); + } + } + + this.setNode(parent); + } + + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; + } + _removeFromParentsChildList(v) { + delete this._children[this._parent[v]][v]; + } + parent(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } + } + children(v) { + if (isUndefined/* default */.A(v)) { + v = GRAPH_NODE; + } + + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return keys/* default */.A(children); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } + } + predecessors(v) { + var predsV = this._preds[v]; + if (predsV) { + return keys/* default */.A(predsV); + } + } + successors(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return keys/* default */.A(sucsV); + } + } + neighbors(v) { + var preds = this.predecessors(v); + if (preds) { + return lodash_es_union(preds, this.successors(v)); + } + } + isLeaf(v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; + } + filterNodes(filter) { + // @ts-expect-error + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound, + }); + + copy.setGraph(this.graph()); + + var self = this; + forEach/* default */.A(this._nodes, function (value, v) { + if (filter(v)) { + copy.setNode(v, value); + } + }); + + forEach/* default */.A(this._edgeObjs, function (e) { + // @ts-expect-error + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self.edge(e)); + } + }); + + var parents = {}; + function findParent(v) { + var parent = self.parent(v); + if (parent === undefined || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); + } + } + + if (this._isCompound) { + forEach/* default */.A(copy.nodes(), function (v) { + copy.setParent(v, findParent(v)); + }); + } + + return copy; + } + /* === Edge functions ========== */ + setDefaultEdgeLabel(newDefault) { + if (!isFunction/* default */.A(newDefault)) { + newDefault = constant/* default */.A(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; + } + edgeCount() { + return this._edgeCount; + } + edges() { + return values/* default */.A(this._edgeObjs); + } + setPath(vs, value) { + var self = this; + var args = arguments; + reduce/* default */.A(vs, function (v, w) { + if (args.length > 1) { + self.setEdge(v, w, value); + } else { + self.setEdge(v, w); + } + return w; + }); + return this; + } + /* + * setEdge(v, w, [value, [name]]) + * setEdge({ v, w, [name] }, [value]) + */ + setEdge() { + var v, w, name, value; + var valueSpecified = false; + var arg0 = arguments[0]; + + if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; + } + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; + } + } + + v = '' + v; + w = '' + w; + if (!isUndefined/* default */.A(name)) { + name = '' + name; + } + + var e = edgeArgsToId(this._isDirected, v, w, name); + if (has/* default */.A(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; + } + return this; + } + + if (!isUndefined/* default */.A(name) && !this._isMultigraph) { + throw new Error('Cannot set a named edge when isMultigraph = false'); + } + + // It didn't exist, so we need to create it. + // First ensure the nodes exist. + this.setNode(v); + this.setNode(w); + + // @ts-expect-error + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + // Ensure we add undirected edges in a consistent way. + v = edgeObj.v; + w = edgeObj.w; + + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; + } + edge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return this._edgeLabels[e]; + } + hasEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + return has/* default */.A(this._edgeLabels, e); + } + removeEdge(v, w, name) { + var e = + arguments.length === 1 + ? edgeObjToId(this._isDirected, arguments[0]) + : edgeArgsToId(this._isDirected, v, w, name); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; + } + inEdges(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = values/* default */.A(inV); + if (!u) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.v === u; + }); + } + } + outEdges(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = values/* default */.A(outV); + if (!w) { + return edges; + } + return filter/* default */.A(edges, function (edge) { + return edge.w === w; + }); + } + } + nodeEdges(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } + } +} + +/* Number of nodes in the graph. Should only be changed by the implementation. */ +Graph.prototype._nodeCount = 0; + +/* Number of edges in the graph. Should only be changed by the implementation. */ +Graph.prototype._edgeCount = 0; + +function incrementOrInitEntry(map, k) { + if (map[k]) { + map[k]++; + } else { + map[k] = 1; + } +} + +function decrementOrRemoveEntry(map, k) { + if (!--map[k]) { + delete map[k]; + } +} + +function edgeArgsToId(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (isUndefined/* default */.A(name) ? DEFAULT_EDGE_NAME : name); +} + +function edgeArgsToObj(isDirected, v_, w_, name) { + var v = '' + v_; + var w = '' + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v: v, w: w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; +} + +function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); +} + + +/***/ }), + +/***/ 697: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ T: () => (/* reexport safe */ _graph_js__WEBPACK_IMPORTED_MODULE_0__.T) +/* harmony export */ }); +/* unused harmony export version */ +/* harmony import */ var _graph_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3046); +// Includes only the "core" of graphlib + + + +const version = '2.1.9-pre'; + + + + +/***/ }), + +/***/ 2062: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _SetCache) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_MapCache.js + 14 modules +var _MapCache = __webpack_require__(9471); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheAdd.js +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/* harmony default export */ const _setCacheAdd = (setCacheAdd); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_setCacheHas.js +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +/* harmony default export */ const _setCacheHas = (setCacheHas); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_SetCache.js + + + + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new _MapCache/* default */.A; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; +SetCache.prototype.has = _setCacheHas; + +/* harmony default export */ const _SetCache = (SetCache); + + +/***/ }), + +/***/ 2641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayEach); + + +/***/ }), + +/***/ 2634: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayFilter); + + +/***/ }), + +/***/ 5572: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayMap); + + +/***/ }), + +/***/ 6912: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrayPush); + + +/***/ }), + +/***/ 1641: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseClone) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayEach.js +var _arrayEach = __webpack_require__(2641); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyObject.js +var _copyObject = __webpack_require__(2031); +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssign.js + + + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keys/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssign = (baseAssign); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keysIn.js + 2 modules +var keysIn = __webpack_require__(5615); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseAssignIn.js + + + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && (0,_copyObject/* default */.A)(source, (0,keysIn/* default */.A)(source), object); +} + +/* harmony default export */ const _baseAssignIn = (baseAssignIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneBuffer.js +var _cloneBuffer = __webpack_require__(154); +// EXTERNAL MODULE: ./node_modules/lodash-es/_copyArray.js +var _copyArray = __webpack_require__(9759); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getSymbols.js +var _getSymbols = __webpack_require__(4792); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbols.js + + + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return (0,_copyObject/* default */.A)(source, (0,_getSymbols/* default */.A)(source), object); +} + +/* harmony default export */ const _copySymbols = (copySymbols); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_getPrototype.js +var _getPrototype = __webpack_require__(5647); +// EXTERNAL MODULE: ./node_modules/lodash-es/stubArray.js +var stubArray = __webpack_require__(3153); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getSymbolsIn.js + + + + + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray/* default */.A : function(object) { + var result = []; + while (object) { + (0,_arrayPush/* default */.A)(result, (0,_getSymbols/* default */.A)(object)); + object = (0,_getPrototype/* default */.A)(object); + } + return result; +}; + +/* harmony default export */ const _getSymbolsIn = (getSymbolsIn); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_copySymbolsIn.js + + + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return (0,_copyObject/* default */.A)(source, _getSymbolsIn(source), object); +} + +/* harmony default export */ const _copySymbolsIn = (copySymbolsIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGetAllKeys.js +var _baseGetAllKeys = __webpack_require__(3831); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getAllKeysIn.js + + + + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return (0,_baseGetAllKeys/* default */.A)(object, keysIn/* default */.A, _getSymbolsIn); +} + +/* harmony default export */ const _getAllKeysIn = (getAllKeysIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneArray.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _initCloneArray_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && _initCloneArray_hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +/* harmony default export */ const _initCloneArray = (initCloneArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneArrayBuffer.js +var _cloneArrayBuffer = __webpack_require__(565); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneDataView.js + + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? (0,_cloneArrayBuffer/* default */.A)(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +/* harmony default export */ const _cloneDataView = (cloneDataView); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneRegExp.js +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +/* harmony default export */ const _cloneRegExp = (cloneRegExp); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_cloneSymbol.js + + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +/* harmony default export */ const _cloneSymbol = (cloneSymbol); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cloneTypedArray.js +var _cloneTypedArray = __webpack_require__(1801); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_initCloneByTag.js + + + + + + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return (0,_cloneArrayBuffer/* default */.A)(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return _cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return (0,_cloneTypedArray/* default */.A)(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return _cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return _cloneSymbol(object); + } +} + +/* harmony default export */ const _initCloneByTag = (initCloneByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_initCloneObject.js + 1 modules +var _initCloneObject = __webpack_require__(8598); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMap.js + + + +/** `Object#toString` result references. */ +var _baseIsMap_mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsMap_mapTag; +} + +/* harmony default export */ const _baseIsMap = (baseIsMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseUnary.js +var _baseUnary = __webpack_require__(2789); +// EXTERNAL MODULE: ./node_modules/lodash-es/_nodeUtil.js +var _nodeUtil = __webpack_require__(4841); +;// CONCATENATED MODULE: ./node_modules/lodash-es/isMap.js + + + + +/* Node.js helper references. */ +var nodeIsMap = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? (0,_baseUnary/* default */.A)(nodeIsMap) : _baseIsMap; + +/* harmony default export */ const lodash_es_isMap = (isMap); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsSet.js + + + +/** `Object#toString` result references. */ +var _baseIsSet_setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return (0,isObjectLike/* default */.A)(value) && (0,_getTag/* default */.A)(value) == _baseIsSet_setTag; +} + +/* harmony default export */ const _baseIsSet = (baseIsSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/isSet.js + + + + +/* Node.js helper references. */ +var nodeIsSet = _nodeUtil/* default */.A && _nodeUtil/* default */.A.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? (0,_baseUnary/* default */.A)(nodeIsSet) : _baseIsSet; + +/* harmony default export */ const lodash_es_isSet = (isSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseClone.js + + + + + + + + + + + + + + + + + + + + + + + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + _baseClone_boolTag = '[object Boolean]', + _baseClone_dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + _baseClone_mapTag = '[object Map]', + _baseClone_numberTag = '[object Number]', + objectTag = '[object Object]', + _baseClone_regexpTag = '[object RegExp]', + _baseClone_setTag = '[object Set]', + _baseClone_stringTag = '[object String]', + _baseClone_symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var _baseClone_arrayBufferTag = '[object ArrayBuffer]', + _baseClone_dataViewTag = '[object DataView]', + _baseClone_float32Tag = '[object Float32Array]', + _baseClone_float64Tag = '[object Float64Array]', + _baseClone_int8Tag = '[object Int8Array]', + _baseClone_int16Tag = '[object Int16Array]', + _baseClone_int32Tag = '[object Int32Array]', + _baseClone_uint8Tag = '[object Uint8Array]', + _baseClone_uint8ClampedTag = '[object Uint8ClampedArray]', + _baseClone_uint16Tag = '[object Uint16Array]', + _baseClone_uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[_baseClone_arrayBufferTag] = cloneableTags[_baseClone_dataViewTag] = +cloneableTags[_baseClone_boolTag] = cloneableTags[_baseClone_dateTag] = +cloneableTags[_baseClone_float32Tag] = cloneableTags[_baseClone_float64Tag] = +cloneableTags[_baseClone_int8Tag] = cloneableTags[_baseClone_int16Tag] = +cloneableTags[_baseClone_int32Tag] = cloneableTags[_baseClone_mapTag] = +cloneableTags[_baseClone_numberTag] = cloneableTags[objectTag] = +cloneableTags[_baseClone_regexpTag] = cloneableTags[_baseClone_setTag] = +cloneableTags[_baseClone_stringTag] = cloneableTags[_baseClone_symbolTag] = +cloneableTags[_baseClone_uint8Tag] = cloneableTags[_baseClone_uint8ClampedTag] = +cloneableTags[_baseClone_uint16Tag] = cloneableTags[_baseClone_uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!(0,isObject/* default */.A)(value)) { + return value; + } + var isArr = (0,isArray/* default */.A)(value); + if (isArr) { + result = _initCloneArray(value); + if (!isDeep) { + return (0,_copyArray/* default */.A)(value, result); + } + } else { + var tag = (0,_getTag/* default */.A)(value), + isFunc = tag == funcTag || tag == genTag; + + if ((0,isBuffer/* default */.A)(value)) { + return (0,_cloneBuffer/* default */.A)(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : (0,_initCloneObject/* default */.A)(value); + if (!isDeep) { + return isFlat + ? _copySymbolsIn(value, _baseAssignIn(result, value)) + : _copySymbols(value, _baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = _initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new _Stack/* default */.A); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (lodash_es_isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (lodash_es_isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? _getAllKeysIn : _getAllKeys/* default */.A) + : (isFlat ? keysIn/* default */.A : keys/* default */.A); + + var props = isArr ? undefined : keysFunc(value); + (0,_arrayEach/* default */.A)(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + (0,_assignValue/* default */.A)(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +/* harmony default export */ const _baseClone = (baseClone); + + +/***/ }), + +/***/ 6240: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseEach) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseForOwn.js +var _baseForOwn = __webpack_require__(9841); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArrayLike.js +var isArrayLike = __webpack_require__(8446); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createBaseEach.js + + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!(0,isArrayLike/* default */.A)(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +/* harmony default export */ const _createBaseEach = (createBaseEach); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseEach.js + + + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = _createBaseEach(_baseForOwn/* default */.A); + +/* harmony default export */ const _baseEach = (baseEach); + + +/***/ }), + +/***/ 5707: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseFindIndex); + + +/***/ }), + +/***/ 3588: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseFlatten) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayPush.js +var _arrayPush = __webpack_require__(6912); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArguments.js + 1 modules +var isArguments = __webpack_require__(2274); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isFlattenable.js + + + + +/** Built-in value references. */ +var spreadableSymbol = _Symbol/* default */.A ? _Symbol/* default */.A.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return (0,isArray/* default */.A)(value) || (0,isArguments/* default */.A)(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/* harmony default export */ const _isFlattenable = (isFlattenable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFlatten.js + + + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = _isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + (0,_arrayPush/* default */.A)(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/* harmony default export */ const _baseFlatten = (baseFlatten); + + +/***/ }), + +/***/ 9841: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4574); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && (0,_baseFor_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, iteratee, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseForOwn); + + +/***/ }), + +/***/ 6318: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[(0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGet); + + +/***/ }), + +/***/ 3831: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayPush_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6912); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? result : (0,_arrayPush_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(result, symbolsFunc(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseGetAllKeys); + + +/***/ }), + +/***/ 9574: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _baseIteratee) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Stack.js + 5 modules +var _Stack = __webpack_require__(1754); +// EXTERNAL MODULE: ./node_modules/lodash-es/_SetCache.js + 2 modules +var _SetCache = __webpack_require__(2062); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arraySome.js +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +/* harmony default export */ const _arraySome = (arraySome); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_cacheHas.js +var _cacheHas = __webpack_require__(4099); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalArrays.js + + + + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache/* default */.A : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!_arraySome(other, function(othValue, othIndex) { + if (!(0,_cacheHas/* default */.A)(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalArrays = (equalArrays); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_Uint8Array.js +var _Uint8Array = __webpack_require__(3988); +// EXTERNAL MODULE: ./node_modules/lodash-es/eq.js +var eq = __webpack_require__(6984); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_mapToArray.js +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +/* harmony default export */ const _mapToArray = (mapToArray); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToArray.js +var _setToArray = __webpack_require__(9959); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalByTag.js + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _equalByTag_COMPARE_PARTIAL_FLAG = 1, + _equalByTag_COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new _Uint8Array/* default */.A(object), new _Uint8Array/* default */.A(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return (0,eq/* default */.A)(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = _mapToArray; + + case setTag: + var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; + convert || (convert = _setToArray/* default */.A); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +/* harmony default export */ const _equalByTag = (equalByTag); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getAllKeys.js +var _getAllKeys = __webpack_require__(9042); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_equalObjects.js + + +/** Used to compose bitmasks for value comparisons. */ +var _equalObjects_COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _equalObjects_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, + objProps = (0,_getAllKeys/* default */.A)(object), + objLength = objProps.length, + othProps = (0,_getAllKeys/* default */.A)(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +/* harmony default export */ const _equalObjects = (equalObjects); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_getTag.js + 3 modules +var _getTag = __webpack_require__(9779); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isBuffer.js + 1 modules +var isBuffer = __webpack_require__(9912); +// EXTERNAL MODULE: ./node_modules/lodash-es/isTypedArray.js + 1 modules +var isTypedArray = __webpack_require__(3858); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqualDeep.js + + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var _baseIsEqualDeep_objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = (0,isArray/* default */.A)(object), + othIsArr = (0,isArray/* default */.A)(other), + objTag = objIsArr ? arrayTag : (0,_getTag/* default */.A)(object), + othTag = othIsArr ? arrayTag : (0,_getTag/* default */.A)(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && (0,isBuffer/* default */.A)(object)) { + if (!(0,isBuffer/* default */.A)(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new _Stack/* default */.A); + return (objIsArr || (0,isTypedArray/* default */.A)(object)) + ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new _Stack/* default */.A); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new _Stack/* default */.A); + return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +/* harmony default export */ const _baseIsEqualDeep = (baseIsEqualDeep); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObjectLike.js +var isObjectLike = __webpack_require__(3098); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsEqual.js + + + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!(0,isObjectLike/* default */.A)(value) && !(0,isObjectLike/* default */.A)(other))) { + return value !== value && other !== other; + } + return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +/* harmony default export */ const _baseIsEqual = (baseIsEqual); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIsMatch.js + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, + _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new _Stack/* default */.A; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +/* harmony default export */ const _baseIsMatch = (baseIsMatch); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_isStrictComparable.js + + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !(0,isObject/* default */.A)(value); +} + +/* harmony default export */ const _isStrictComparable = (isStrictComparable); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_getMatchData.js + + + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = (0,keys/* default */.A)(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, _isStrictComparable(value)]; + } + return result; +} + +/* harmony default export */ const _getMatchData = (getMatchData); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_matchesStrictComparable.js +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +/* harmony default export */ const _matchesStrictComparable = (matchesStrictComparable); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatches.js + + + + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = _getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return _matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || _baseIsMatch(object, source, matchData); + }; +} + +/* harmony default export */ const _baseMatches = (baseMatches); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +;// CONCATENATED MODULE: ./node_modules/lodash-es/get.js + + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : (0,_baseGet/* default */.A)(object, path); + return result === undefined ? defaultValue : result; +} + +/* harmony default export */ const lodash_es_get = (get); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseMatchesProperty.js + + + + + + + + +/** Used to compose bitmasks for value comparisons. */ +var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, + _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if ((0,_isKey/* default */.A)(path) && _isStrictComparable(srcValue)) { + return _matchesStrictComparable((0,_toKey/* default */.A)(path), srcValue); + } + return function(object) { + var objValue = lodash_es_get(object, path); + return (objValue === undefined && objValue === srcValue) + ? (0,hasIn/* default */.A)(object, path) + : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); + }; +} + +/* harmony default export */ const _baseMatchesProperty = (baseMatchesProperty); + +// EXTERNAL MODULE: ./node_modules/lodash-es/identity.js +var identity = __webpack_require__(9008); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseProperty.js +var _baseProperty = __webpack_require__(805); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePropertyDeep.js + + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return (0,_baseGet/* default */.A)(object, path); + }; +} + +/* harmony default export */ const _basePropertyDeep = (basePropertyDeep); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/property.js + + + + + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return (0,_isKey/* default */.A)(path) ? (0,_baseProperty/* default */.A)((0,_toKey/* default */.A)(path)) : _basePropertyDeep(path); +} + +/* harmony default export */ const lodash_es_property = (property); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseIteratee.js + + + + + + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity/* default */.A; + } + if (typeof value == 'object') { + return (0,isArray/* default */.A)(value) + ? _baseMatchesProperty(value[0], value[1]) + : _baseMatches(value); + } + return lodash_es_property(value); +} + +/* harmony default export */ const _baseIteratee = (baseIteratee); + + +/***/ }), + +/***/ 2568: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6240); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? Array(collection.length) : []; + + (0,_baseEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseMap); + + +/***/ }), + +/***/ 805: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (baseProperty); + + +/***/ }), + +/***/ 4099: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cacheHas); + + +/***/ }), + +/***/ 9922: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9008); + + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : _identity_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (castFunction); + + +/***/ }), + +/***/ 7819: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ _castPath) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isKey.js +var _isKey = __webpack_require__(6586); +// EXTERNAL MODULE: ./node_modules/lodash-es/memoize.js +var memoize = __webpack_require__(6632); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_memoizeCapped.js + + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = (0,memoize/* default */.A)(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +/* harmony default export */ const _memoizeCapped = (memoizeCapped); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_stringToPath.js + + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = _memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/* harmony default export */ const _stringToPath = (stringToPath); + +// EXTERNAL MODULE: ./node_modules/lodash-es/toString.js + 1 modules +var lodash_es_toString = __webpack_require__(8894); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_castPath.js + + + + + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if ((0,isArray/* default */.A)(value)) { + return value; + } + return (0,_isKey/* default */.A)(value, object) ? [value] : _stringToPath((0,lodash_es_toString/* default */.A)(value)); +} + +/* harmony default export */ const _castPath = (castPath); + + +/***/ }), + +/***/ 9042: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3831); +/* harmony import */ var _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4792); +/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2184); + + + + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return (0,_baseGetAllKeys_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object, _keys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, _getSymbols_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAllKeys); + + +/***/ }), + +/***/ 4792: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634); +/* harmony import */ var _stubArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3153); + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? _stubArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return (0,_arrayFilter_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSymbols); + + +/***/ }), + +/***/ 5054: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _castPath_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7819); +/* harmony import */ var _isArguments_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2274); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2049); +/* harmony import */ var _isIndex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5353); +/* harmony import */ var _isLength_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5254); +/* harmony import */ var _toKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3282); + + + + + + + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = (0,_castPath_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = (0,_toKey_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && (0,_isLength_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(length) && (0,_isIndex_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(key, length) && + ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(object) || (0,_isArguments_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hasPath); + + +/***/ }), + +/***/ 6586: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1882); + + + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isKey); + + +/***/ }), + +/***/ 9959: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (setToArray); + + +/***/ }), + +/***/ 3282: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _isSymbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1882); + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || (0,_isSymbol_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toKey); + + +/***/ }), + +/***/ 3068: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseRest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4326); +/* harmony import */ var _eq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6984); +/* harmony import */ var _isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6832); +/* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5615); + + + + + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = (0,_baseRest_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && (0,_isIterateeCall_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = (0,_keysIn_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + ((0,_eq_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); + + +/***/ }), + +/***/ 1662: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_filter) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayFilter.js +var _arrayFilter = __webpack_require__(2634); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseFilter.js + + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + (0,_baseEach/* default */.A)(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +/* harmony default export */ const _baseFilter = (baseFilter); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/filter.js + + + + + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ +function filter(collection, predicate) { + var func = (0,isArray/* default */.A)(collection) ? _arrayFilter/* default */.A : _baseFilter; + return func(collection, (0,_baseIteratee/* default */.A)(predicate, 3)); +} + +/* harmony default export */ const lodash_es_filter = (filter); + + +/***/ }), + +/***/ 4098: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3588); + + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? (0,_baseFlatten_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(array, 1) : []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (flatten); + + +/***/ }), + +/***/ 8058: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2641); +/* harmony import */ var _baseEach_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6240); +/* harmony import */ var _castFunction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9922); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayEach_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseEach_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_castFunction_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (forEach); + + +/***/ }), + +/***/ 8585: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_has) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHas.js +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var _baseHas_hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && _baseHas_hasOwnProperty.call(object, key); +} + +/* harmony default export */ const _baseHas = (baseHas); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/has.js + + + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHas); +} + +/* harmony default export */ const lodash_es_has = (has); + + +/***/ }), + +/***/ 9188: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_hasIn) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseHasIn.js +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +/* harmony default export */ const _baseHasIn = (baseHasIn); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_hasPath.js +var _hasPath = __webpack_require__(5054); +;// CONCATENATED MODULE: ./node_modules/lodash-es/hasIn.js + + + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && (0,_hasPath/* default */.A)(object, path, _baseHasIn); +} + +/* harmony default export */ const lodash_es_hasIn = (hasIn); + + +/***/ }), + +/***/ 1882: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8496); +/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3098); + + + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + ((0,_isObjectLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(value) && (0,_baseGetTag_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(value) == symbolTag); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isSymbol); + + +/***/ }), + +/***/ 9592: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isUndefined); + + +/***/ }), + +/***/ 2184: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3607); +/* harmony import */ var _baseKeys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1852); +/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8446); + + + + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(object) ? (0,_arrayLikeKeys_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(object) : (0,_baseKeys_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(object); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys); + + +/***/ }), + +/***/ 4722: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5572); +/* harmony import */ var _baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9574); +/* harmony import */ var _baseMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2568); +/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2049); + + + + + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(collection) ? _arrayMap_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A : _baseMap_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A; + return func(collection, (0,_baseIteratee_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(iteratee, 3)); +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map); + + +/***/ }), + +/***/ 1942: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_pick) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseGet.js +var _baseGet = __webpack_require__(6318); +// EXTERNAL MODULE: ./node_modules/lodash-es/_assignValue.js +var _assignValue = __webpack_require__(2851); +// EXTERNAL MODULE: ./node_modules/lodash-es/_castPath.js + 2 modules +var _castPath = __webpack_require__(7819); +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIndex.js +var _isIndex = __webpack_require__(5353); +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/_toKey.js +var _toKey = __webpack_require__(3282); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseSet.js + + + + + + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!(0,isObject/* default */.A)(object)) { + return object; + } + path = (0,_castPath/* default */.A)(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = (0,_toKey/* default */.A)(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = (0,isObject/* default */.A)(objValue) + ? objValue + : ((0,_isIndex/* default */.A)(path[index + 1]) ? [] : {}); + } + } + (0,_assignValue/* default */.A)(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/* harmony default export */ const _baseSet = (baseSet); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePickBy.js + + + + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = (0,_baseGet/* default */.A)(object, path); + + if (predicate(value, path)) { + _baseSet(result, (0,_castPath/* default */.A)(path, object), value); + } + } + return result; +} + +/* harmony default export */ const _basePickBy = (basePickBy); + +// EXTERNAL MODULE: ./node_modules/lodash-es/hasIn.js + 1 modules +var hasIn = __webpack_require__(9188); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_basePick.js + + + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return _basePickBy(object, paths, function(value, path) { + return (0,hasIn/* default */.A)(object, path); + }); +} + +/* harmony default export */ const _basePick = (basePick); + +// EXTERNAL MODULE: ./node_modules/lodash-es/flatten.js +var flatten = __webpack_require__(4098); +// EXTERNAL MODULE: ./node_modules/lodash-es/_overRest.js + 1 modules +var _overRest = __webpack_require__(6875); +// EXTERNAL MODULE: ./node_modules/lodash-es/_setToString.js + 2 modules +var _setToString = __webpack_require__(7525); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_flatRest.js + + + + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return (0,_setToString/* default */.A)((0,_overRest/* default */.A)(func, undefined, flatten/* default */.A), func + ''); +} + +/* harmony default export */ const _flatRest = (flatRest); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/pick.js + + + +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = _flatRest(function(object, paths) { + return object == null ? {} : _basePick(object, paths); +}); + +/* harmony default export */ const lodash_es_pick = (pick); + + +/***/ }), + +/***/ 1395: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_range) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseRange.js +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +/* harmony default export */ const _baseRange = (baseRange); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_isIterateeCall.js +var _isIterateeCall = __webpack_require__(6832); +// EXTERNAL MODULE: ./node_modules/lodash-es/toFinite.js + 3 modules +var toFinite = __webpack_require__(4342); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_createRange.js + + + + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && (0,_isIterateeCall/* default */.A)(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = (0,toFinite/* default */.A)(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = (0,toFinite/* default */.A)(end); + } + step = step === undefined ? (start < end ? 1 : -1) : (0,toFinite/* default */.A)(step); + return _baseRange(start, end, step, fromRight); + }; +} + +/* harmony default export */ const _createRange = (createRange); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/range.js + + +/** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ +var range = _createRange(); + +/* harmony default export */ const lodash_es_range = (range); + + +/***/ }), + +/***/ 9463: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_reduce) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayReduce.js +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +/* harmony default export */ const _arrayReduce = (arrayReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseEach.js + 1 modules +var _baseEach = __webpack_require__(6240); +// EXTERNAL MODULE: ./node_modules/lodash-es/_baseIteratee.js + 16 modules +var _baseIteratee = __webpack_require__(9574); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseReduce.js +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +/* harmony default export */ const _baseReduce = (baseReduce); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +;// CONCATENATED MODULE: ./node_modules/lodash-es/reduce.js + + + + + + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ +function reduce(collection, iteratee, accumulator) { + var func = (0,isArray/* default */.A)(collection) ? _arrayReduce : _baseReduce, + initAccum = arguments.length < 3; + + return func(collection, (0,_baseIteratee/* default */.A)(iteratee, 4), accumulator, initAccum, _baseEach/* default */.A); +} + +/* harmony default export */ const lodash_es_reduce = (reduce); + + +/***/ }), + +/***/ 3153: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stubArray); + + +/***/ }), + +/***/ 4342: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toFinite) +}); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_trimmedEndIndex.js +/** Used to match a single whitespace character. */ +var reWhitespace = /\s/; + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ +function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; +} + +/* harmony default export */ const _trimmedEndIndex = (trimmedEndIndex); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseTrim.js + + +/** Used to match leading whitespace. */ +var reTrimStart = /^\s+/; + +/** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ +function baseTrim(string) { + return string + ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; +} + +/* harmony default export */ const _baseTrim = (baseTrim); + +// EXTERNAL MODULE: ./node_modules/lodash-es/isObject.js +var isObject = __webpack_require__(3149); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/toNumber.js + + + + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if ((0,isSymbol/* default */.A)(value)) { + return NAN; + } + if ((0,isObject/* default */.A)(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = (0,isObject/* default */.A)(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = _baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +/* harmony default export */ const lodash_es_toNumber = (toNumber); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toFinite.js + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = lodash_es_toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +/* harmony default export */ const lodash_es_toFinite = (toFinite); + + +/***/ }), + +/***/ 8894: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_toString) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_Symbol.js +var _Symbol = __webpack_require__(241); +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +// EXTERNAL MODULE: ./node_modules/lodash-es/isArray.js +var isArray = __webpack_require__(2049); +// EXTERNAL MODULE: ./node_modules/lodash-es/isSymbol.js +var isSymbol = __webpack_require__(1882); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseToString.js + + + + + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = _Symbol/* default */.A ? _Symbol/* default */.A.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if ((0,isArray/* default */.A)(value)) { + // Recursively convert values (susceptible to call stack limits). + return (0,_arrayMap/* default */.A)(value, baseToString) + ''; + } + if ((0,isSymbol/* default */.A)(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/* harmony default export */ const _baseToString = (baseToString); + +;// CONCATENATED MODULE: ./node_modules/lodash-es/toString.js + + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString_toString(value) { + return value == null ? '' : _baseToString(value); +} + +/* harmony default export */ const lodash_es_toString = (toString_toString); + + +/***/ }), + +/***/ 5664: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8894); + + +/** Used to generate unique IDs. */ +var idCounter = 0; + +/** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ +function uniqueId(prefix) { + var id = ++idCounter; + return (0,_toString_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(prefix) + id; +} + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqueId); + + +/***/ }), + +/***/ 8207: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + A: () => (/* binding */ lodash_es_values) +}); + +// EXTERNAL MODULE: ./node_modules/lodash-es/_arrayMap.js +var _arrayMap = __webpack_require__(5572); +;// CONCATENATED MODULE: ./node_modules/lodash-es/_baseValues.js + + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return (0,_arrayMap/* default */.A)(props, function(key) { + return object[key]; + }); +} + +/* harmony default export */ const _baseValues = (baseValues); + +// EXTERNAL MODULE: ./node_modules/lodash-es/keys.js +var keys = __webpack_require__(2184); +;// CONCATENATED MODULE: ./node_modules/lodash-es/values.js + + + +/** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ +function values(object) { + return object == null ? [] : _baseValues(object, (0,keys/* default */.A)(object)); +} + +/* harmony default export */ const lodash_es_values = (values); + + +/***/ }), + +/***/ 751: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _styles_991ebdfc_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7308); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1176); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(697); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6257); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9418); + + + + + + + + + + + + + + +let edgeCount = 0; +const drawEdge = function(elem, path, relation, conf, diagObj) { + const getRelationType = function(type) { + switch (type) { + case diagObj.db.relationType.AGGREGATION: + return "aggregation"; + case diagObj.db.relationType.EXTENSION: + return "extension"; + case diagObj.db.relationType.COMPOSITION: + return "composition"; + case diagObj.db.relationType.DEPENDENCY: + return "dependency"; + case diagObj.db.relationType.LOLLIPOP: + return "lollipop"; + } + }; + path.points = path.points.filter((p) => !Number.isNaN(p.y)); + const lineData = path.points; + const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x(function(d) { + return d.x; + }).y(function(d) { + return d.y; + }).curve(d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .qrM); + const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "relation"); + let url = ""; + if (conf.arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + if (relation.relation.lineType == 1) { + svgPath.attr("class", "relation dashed-line"); + } + if (relation.relation.lineType == 10) { + svgPath.attr("class", "relation dotted-line"); + } + if (relation.relation.type1 !== "none") { + svgPath.attr( + "marker-start", + "url(" + url + "#" + getRelationType(relation.relation.type1) + "Start)" + ); + } + if (relation.relation.type2 !== "none") { + svgPath.attr( + "marker-end", + "url(" + url + "#" + getRelationType(relation.relation.type2) + "End)" + ); + } + let x, y; + const l = path.points.length; + let labelPosition = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.u.calcLabelPosition(path.points); + x = labelPosition.x; + y = labelPosition.y; + let p1_card_x, p1_card_y; + let p2_card_x, p2_card_y; + if (l % 2 !== 0 && l > 1) { + let cardinality_1_point = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.u.calcCardinalityPosition( + relation.relation.type1 !== "none", + path.points, + path.points[0] + ); + let cardinality_2_point = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.u.calcCardinalityPosition( + relation.relation.type2 !== "none", + path.points, + path.points[l - 1] + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("cardinality_1_point " + JSON.stringify(cardinality_1_point)); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("cardinality_2_point " + JSON.stringify(cardinality_2_point)); + p1_card_x = cardinality_1_point.x; + p1_card_y = cardinality_1_point.y; + p2_card_x = cardinality_2_point.x; + p2_card_y = cardinality_2_point.y; + } + if (relation.title !== void 0) { + const g = elem.append("g").attr("class", "classLabel"); + const label = g.append("text").attr("class", "label").attr("x", x).attr("y", y).attr("fill", "red").attr("text-anchor", "middle").text(relation.title); + window.label = label; + const bounds = label.node().getBBox(); + g.insert("rect", ":first-child").attr("class", "box").attr("x", bounds.x - conf.padding / 2).attr("y", bounds.y - conf.padding / 2).attr("width", bounds.width + conf.padding).attr("height", bounds.height + conf.padding); + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Rendering relation " + JSON.stringify(relation)); + if (relation.relationTitle1 !== void 0 && relation.relationTitle1 !== "none") { + const g = elem.append("g").attr("class", "cardinality"); + g.append("text").attr("class", "type1").attr("x", p1_card_x).attr("y", p1_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle1); + } + if (relation.relationTitle2 !== void 0 && relation.relationTitle2 !== "none") { + const g = elem.append("g").attr("class", "cardinality"); + g.append("text").attr("class", "type2").attr("x", p2_card_x).attr("y", p2_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle2); + } + edgeCount++; +}; +const drawClass = function(elem, classDef, conf, diagObj) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Rendering class ", classDef, conf); + const id = classDef.id; + const classInfo = { + id, + label: classDef.id, + width: 0, + height: 0 + }; + const g = elem.append("g").attr("id", diagObj.db.lookUpDomId(id)).attr("class", "classGroup"); + let title; + if (classDef.link) { + title = g.append("svg:a").attr("xlink:href", classDef.link).attr("target", classDef.linkTarget).append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0); + } else { + title = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0); + } + let isFirst = true; + classDef.annotations.forEach(function(member) { + const titleText2 = title.append("tspan").text("«" + member + "»"); + if (!isFirst) { + titleText2.attr("dy", conf.textHeight); + } + isFirst = false; + }); + let classTitleString = getClassTitleString(classDef); + const classTitle = title.append("tspan").text(classTitleString).attr("class", "title"); + if (!isFirst) { + classTitle.attr("dy", conf.textHeight); + } + const titleHeight = title.node().getBBox().height; + let membersLine; + let membersBox; + let methodsLine; + if (classDef.members.length > 0) { + membersLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin / 2).attr("y2", conf.padding + titleHeight + conf.dividerMargin / 2); + const members = g.append("text").attr("x", conf.padding).attr("y", titleHeight + conf.dividerMargin + conf.textHeight).attr("fill", "white").attr("class", "classText"); + isFirst = true; + classDef.members.forEach(function(member) { + addTspan(members, member, isFirst, conf); + isFirst = false; + }); + membersBox = members.node().getBBox(); + } + if (classDef.methods.length > 0) { + methodsLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr("y2", conf.padding + titleHeight + conf.dividerMargin + membersBox.height); + const methods = g.append("text").attr("x", conf.padding).attr("y", titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr("fill", "white").attr("class", "classText"); + isFirst = true; + classDef.methods.forEach(function(method) { + addTspan(methods, method, isFirst, conf); + isFirst = false; + }); + } + const classBox = g.node().getBBox(); + var cssClassStr = " "; + if (classDef.cssClasses.length > 0) { + cssClassStr = cssClassStr + classDef.cssClasses.join(" "); + } + const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", classBox.width + 2 * conf.padding).attr("height", classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr("class", cssClassStr); + const rectWidth = rect.node().getBBox().width; + title.node().childNodes.forEach(function(x) { + x.setAttribute("x", (rectWidth - x.getBBox().width) / 2); + }); + if (classDef.tooltip) { + title.insert("title").text(classDef.tooltip); + } + if (membersLine) { + membersLine.attr("x2", rectWidth); + } + if (methodsLine) { + methodsLine.attr("x2", rectWidth); + } + classInfo.width = rectWidth; + classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin; + return classInfo; +}; +const getClassTitleString = function(classDef) { + let classTitleString = classDef.id; + if (classDef.type) { + classTitleString += "<" + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.x)(classDef.type) + ">"; + } + return classTitleString; +}; +const drawNote = function(elem, note, conf, diagObj) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Rendering note ", note, conf); + const id = note.id; + const noteInfo = { + id, + text: note.text, + width: 0, + height: 0 + }; + const g = elem.append("g").attr("id", id).attr("class", "classGroup"); + let text = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0); + const lines = JSON.parse(`"${note.text}"`).split("\n"); + lines.forEach(function(line2) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug(`Adding line: ${line2}`); + text.append("tspan").text(line2).attr("class", "title").attr("dy", conf.textHeight); + }); + const noteBox = g.node().getBBox(); + const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", noteBox.width + 2 * conf.padding).attr( + "height", + noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin + ); + const rectWidth = rect.node().getBBox().width; + text.node().childNodes.forEach(function(x) { + x.setAttribute("x", (rectWidth - x.getBBox().width) / 2); + }); + noteInfo.width = rectWidth; + noteInfo.height = noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin; + return noteInfo; +}; +const addTspan = function(textEl, member, isFirst, conf) { + const { displayText, cssStyle } = member.getDisplayDetails(); + const tSpan = textEl.append("tspan").attr("x", conf.padding).text(displayText); + if (cssStyle !== "") { + tSpan.attr("style", member.cssStyle); + } + if (!isFirst) { + tSpan.attr("dy", conf.textHeight); + } +}; +const svgDraw = { + getClassTitleString, + drawClass, + drawEdge, + drawNote +}; +let idCache = {}; +const padding = 20; +const getGraphId = function(label) { + const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label); + if (foundEntry) { + return foundEntry[0]; + } +}; +const insertMarkers = function(elem) { + elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"); + elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"); + elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").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"); + elem.append("defs").append("marker").attr("id", "compositionEnd").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"); + elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").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"); + elem.append("defs").append("marker").attr("id", "aggregationEnd").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"); + elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).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"); + elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).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"); +}; +const draw = function(text, id, _version, diagObj) { + const conf = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().class; + idCache = {}; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Rendering diagram " + text); + const securityLevel = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); + const diagram2 = root.select(`[id='${id}']`); + insertMarkers(diagram2); + const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .T({ + multigraph: true + }); + g.setGraph({ + isMultiGraph: true + }); + g.setDefaultEdgeLabel(function() { + return {}; + }); + const classes = diagObj.db.getClasses(); + const keys = Object.keys(classes); + for (const key of keys) { + const classDef = classes[key]; + const node = svgDraw.drawClass(diagram2, classDef, conf, diagObj); + idCache[node.id] = node; + g.setNode(node.id, node); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Org height: " + node.height); + } + const relations = diagObj.db.getRelations(); + relations.forEach(function(relation) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.info( + // cspell:ignore tjoho + "tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation) + ); + g.setEdge( + getGraphId(relation.id1), + getGraphId(relation.id2), + { + relation + }, + relation.title || "DEFAULT" + ); + }); + const notes = diagObj.db.getNotes(); + notes.forEach(function(note) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug(`Adding note: ${JSON.stringify(note)}`); + const node = svgDraw.drawNote(diagram2, note, conf, diagObj); + idCache[node.id] = node; + g.setNode(node.id, node); + if (note.class && note.class in classes) { + g.setEdge( + note.id, + getGraphId(note.class), + { + relation: { + id1: note.id, + id2: note.class, + relation: { + type1: "none", + type2: "none", + lineType: 10 + } + } + }, + "DEFAULT" + ); + } + }); + (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__/* .layout */ .Zp)(g); + g.nodes().forEach(function(v) { + if (v !== void 0 && g.node(v) !== void 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Node " + v + ": " + JSON.stringify(g.node(v))); + root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr( + "transform", + "translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )" + ); + } + }); + g.edges().forEach(function(e) { + if (e !== void 0 && g.edge(e) !== void 0) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e))); + svgDraw.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj); + } + }); + const svgBounds = diagram2.node().getBBox(); + const width = svgBounds.width + padding * 2; + const height = svgBounds.height + padding * 2; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.i)(diagram2, height, width, conf.useMaxWidth); + const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug(`viewBox ${vBox}`); + diagram2.attr("viewBox", vBox); +}; +const renderer = { + draw +}; +const diagram = { + parser: _styles_991ebdfc_js__WEBPACK_IMPORTED_MODULE_7__.p, + db: _styles_991ebdfc_js__WEBPACK_IMPORTED_MODULE_7__.d, + renderer, + styles: _styles_991ebdfc_js__WEBPACK_IMPORTED_MODULE_7__.s, + init: (cnf) => { + if (!cnf.class) { + cnf.class = {}; + } + cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute; + _styles_991ebdfc_js__WEBPACK_IMPORTED_MODULE_7__.d.clear(); + } +}; + + + +/***/ }), + +/***/ 7308: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ d: () => (/* binding */ db), +/* harmony export */ p: () => (/* binding */ parser$1), +/* harmony export */ s: () => (/* binding */ styles) +/* harmony export */ }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 17], $V1 = [1, 18], $V2 = [1, 19], $V3 = [1, 39], $V4 = [1, 40], $V5 = [1, 25], $V6 = [1, 23], $V7 = [1, 24], $V8 = [1, 31], $V9 = [1, 32], $Va = [1, 33], $Vb = [1, 34], $Vc = [1, 35], $Vd = [1, 36], $Ve = [1, 26], $Vf = [1, 27], $Vg = [1, 28], $Vh = [1, 29], $Vi = [1, 43], $Vj = [1, 30], $Vk = [1, 42], $Vl = [1, 44], $Vm = [1, 41], $Vn = [1, 45], $Vo = [1, 9], $Vp = [1, 8, 9], $Vq = [1, 56], $Vr = [1, 57], $Vs = [1, 58], $Vt = [1, 59], $Vu = [1, 60], $Vv = [1, 61], $Vw = [1, 62], $Vx = [1, 8, 9, 39], $Vy = [1, 74], $Vz = [1, 8, 9, 12, 13, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], $VA = [1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 46, 59, 60, 61, 62, 63, 64, 65, 70, 72, 74, 80, 95, 97, 98], $VB = [13, 74, 80, 95, 97, 98], $VC = [13, 64, 65, 74, 80, 95, 97, 98], $VD = [13, 59, 60, 61, 62, 63, 74, 80, 95, 97, 98], $VE = [1, 93], $VF = [1, 110], $VG = [1, 108], $VH = [1, 102], $VI = [1, 103], $VJ = [1, 104], $VK = [1, 105], $VL = [1, 106], $VM = [1, 107], $VN = [1, 109], $VO = [1, 8, 9, 37, 39, 42], $VP = [1, 8, 9, 21], $VQ = [1, 8, 9, 78], $VR = [1, 8, 9, 21, 73, 74, 78, 80, 81, 82, 83, 84, 85]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "statements": 5, "graphConfig": 6, "CLASS_DIAGRAM": 7, "NEWLINE": 8, "EOF": 9, "statement": 10, "classLabel": 11, "SQS": 12, "STR": 13, "SQE": 14, "namespaceName": 15, "alphaNumToken": 16, "className": 17, "classLiteralName": 18, "GENERICTYPE": 19, "relationStatement": 20, "LABEL": 21, "namespaceStatement": 22, "classStatement": 23, "memberStatement": 24, "annotationStatement": 25, "clickStatement": 26, "styleStatement": 27, "cssClassStatement": 28, "noteStatement": 29, "direction": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "namespaceIdentifier": 36, "STRUCT_START": 37, "classStatements": 38, "STRUCT_STOP": 39, "NAMESPACE": 40, "classIdentifier": 41, "STYLE_SEPARATOR": 42, "members": 43, "CLASS": 44, "ANNOTATION_START": 45, "ANNOTATION_END": 46, "MEMBER": 47, "SEPARATOR": 48, "relation": 49, "NOTE_FOR": 50, "noteText": 51, "NOTE": 52, "direction_tb": 53, "direction_bt": 54, "direction_rl": 55, "direction_lr": 56, "relationType": 57, "lineType": 58, "AGGREGATION": 59, "EXTENSION": 60, "COMPOSITION": 61, "DEPENDENCY": 62, "LOLLIPOP": 63, "LINE": 64, "DOTTED_LINE": 65, "CALLBACK": 66, "LINK": 67, "LINK_TARGET": 68, "CLICK": 69, "CALLBACK_NAME": 70, "CALLBACK_ARGS": 71, "HREF": 72, "STYLE": 73, "ALPHA": 74, "stylesOpt": 75, "CSSCLASS": 76, "style": 77, "COMMA": 78, "styleComponent": 79, "NUM": 80, "COLON": 81, "UNIT": 82, "SPACE": 83, "BRKT": 84, "PCT": 85, "commentToken": 86, "textToken": 87, "graphCodeTokens": 88, "textNoTagsToken": 89, "TAGSTART": 90, "TAGEND": 91, "==": 92, "--": 93, "DEFAULT": 94, "MINUS": 95, "keywords": 96, "UNICODE_TEXT": 97, "BQUOTE_STR": 98, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 19: "GENERICTYPE", 21: "LABEL", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 37: "STRUCT_START", 39: "STRUCT_STOP", 40: "NAMESPACE", 42: "STYLE_SEPARATOR", 44: "CLASS", 45: "ANNOTATION_START", 46: "ANNOTATION_END", 47: "MEMBER", 48: "SEPARATOR", 50: "NOTE_FOR", 52: "NOTE", 53: "direction_tb", 54: "direction_bt", 55: "direction_rl", 56: "direction_lr", 59: "AGGREGATION", 60: "EXTENSION", 61: "COMPOSITION", 62: "DEPENDENCY", 63: "LOLLIPOP", 64: "LINE", 65: "DOTTED_LINE", 66: "CALLBACK", 67: "LINK", 68: "LINK_TARGET", 69: "CLICK", 70: "CALLBACK_NAME", 71: "CALLBACK_ARGS", 72: "HREF", 73: "STYLE", 74: "ALPHA", 76: "CSSCLASS", 78: "COMMA", 80: "NUM", 81: "COLON", 82: "UNIT", 83: "SPACE", 84: "BRKT", 85: "PCT", 88: "graphCodeTokens", 90: "TAGSTART", 91: "TAGEND", 92: "==", 93: "--", 94: "DEFAULT", 95: "MINUS", 96: "keywords", 97: "UNICODE_TEXT", 98: "BQUOTE_STR" }, + productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 2], [17, 1], [17, 1], [17, 2], [17, 2], [17, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [22, 4], [22, 5], [36, 2], [38, 1], [38, 2], [38, 3], [23, 1], [23, 3], [23, 4], [23, 6], [41, 2], [41, 3], [25, 4], [43, 1], [43, 2], [24, 1], [24, 2], [24, 1], [24, 1], [20, 3], [20, 4], [20, 4], [20, 5], [29, 3], [29, 2], [30, 1], [30, 1], [30, 1], [30, 1], [49, 3], [49, 2], [49, 2], [49, 1], [57, 1], [57, 1], [57, 1], [57, 1], [57, 1], [58, 1], [58, 1], [26, 3], [26, 4], [26, 3], [26, 4], [26, 4], [26, 5], [26, 3], [26, 4], [26, 4], [26, 5], [26, 4], [26, 5], [26, 5], [26, 6], [27, 3], [28, 3], [75, 1], [75, 3], [77, 1], [77, 2], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [86, 1], [86, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [89, 1], [89, 1], [89, 1], [89, 1], [16, 1], [16, 1], [16, 1], [16, 1], [18, 1], [51, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 8: + this.$ = $$[$0 - 1]; + break; + case 9: + case 11: + case 12: + this.$ = $$[$0]; + break; + case 10: + case 13: + this.$ = $$[$0 - 1] + $$[$0]; + break; + case 14: + case 15: + this.$ = $$[$0 - 1] + "~" + $$[$0] + "~"; + break; + case 16: + yy.addRelation($$[$0]); + break; + case 17: + $$[$0 - 1].title = yy.cleanupLabel($$[$0]); + yy.addRelation($$[$0 - 1]); + break; + case 27: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 28: + case 29: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 30: + yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]); + break; + case 31: + yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]); + break; + case 32: + this.$ = $$[$0]; + yy.addNamespace($$[$0]); + break; + case 33: + this.$ = [$$[$0]]; + break; + case 34: + this.$ = [$$[$0 - 1]]; + break; + case 35: + $$[$0].unshift($$[$0 - 2]); + this.$ = $$[$0]; + break; + case 37: + yy.setCssClass($$[$0 - 2], $$[$0]); + break; + case 38: + yy.addMembers($$[$0 - 3], $$[$0 - 1]); + break; + case 39: + yy.setCssClass($$[$0 - 5], $$[$0 - 3]); + yy.addMembers($$[$0 - 5], $$[$0 - 1]); + break; + case 40: + this.$ = $$[$0]; + yy.addClass($$[$0]); + break; + case 41: + this.$ = $$[$0 - 1]; + yy.addClass($$[$0 - 1]); + yy.setClassLabel($$[$0 - 1], $$[$0]); + break; + case 42: + yy.addAnnotation($$[$0], $$[$0 - 2]); + break; + case 43: + this.$ = [$$[$0]]; + break; + case 44: + $$[$0].push($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 45: + break; + case 46: + yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0])); + break; + case 47: + break; + case 48: + break; + case 49: + this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" }; + break; + case 50: + this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" }; + break; + case 51: + this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] }; + break; + case 52: + this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] }; + break; + case 53: + yy.addNote($$[$0], $$[$0 - 1]); + break; + case 54: + yy.addNote($$[$0]); + break; + case 55: + yy.setDirection("TB"); + break; + case 56: + yy.setDirection("BT"); + break; + case 57: + yy.setDirection("RL"); + break; + case 58: + yy.setDirection("LR"); + break; + case 59: + this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] }; + break; + case 60: + this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] }; + break; + case 61: + this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] }; + break; + case 62: + this.$ = { type1: "none", type2: "none", lineType: $$[$0] }; + break; + case 63: + this.$ = yy.relationType.AGGREGATION; + break; + case 64: + this.$ = yy.relationType.EXTENSION; + break; + case 65: + this.$ = yy.relationType.COMPOSITION; + break; + case 66: + this.$ = yy.relationType.DEPENDENCY; + break; + case 67: + this.$ = yy.relationType.LOLLIPOP; + break; + case 68: + this.$ = yy.lineType.LINE; + break; + case 69: + this.$ = yy.lineType.DOTTED_LINE; + break; + case 70: + case 76: + this.$ = $$[$0 - 2]; + yy.setClickEvent($$[$0 - 1], $$[$0]); + break; + case 71: + case 77: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 2], $$[$0]); + break; + case 72: + this.$ = $$[$0 - 2]; + yy.setLink($$[$0 - 1], $$[$0]); + break; + case 73: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 74: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 2], $$[$0]); + break; + case 75: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]); + yy.setTooltip($$[$0 - 3], $$[$0 - 1]); + break; + case 78: + this.$ = $$[$0 - 3]; + yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]); + break; + case 79: + this.$ = $$[$0 - 4]; + yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 80: + this.$ = $$[$0 - 3]; + yy.setLink($$[$0 - 2], $$[$0]); + break; + case 81: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]); + break; + case 82: + this.$ = $$[$0 - 4]; + yy.setLink($$[$0 - 3], $$[$0 - 1]); + yy.setTooltip($$[$0 - 3], $$[$0]); + break; + case 83: + this.$ = $$[$0 - 5]; + yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]); + yy.setTooltip($$[$0 - 4], $$[$0 - 1]); + break; + case 84: + this.$ = $$[$0 - 2]; + yy.setCssStyle($$[$0 - 1], $$[$0]); + break; + case 85: + yy.setCssClass($$[$0 - 1], $$[$0]); + break; + case 86: + this.$ = [$$[$0]]; + break; + case 87: + $$[$0 - 2].push($$[$0]); + this.$ = $$[$0 - 2]; + break; + case 89: + this.$ = $$[$0 - 1] + $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vo, [2, 5], { 8: [1, 46] }), { 8: [1, 47] }, o($Vp, [2, 16], { 21: [1, 48] }), o($Vp, [2, 18]), o($Vp, [2, 19]), o($Vp, [2, 20]), o($Vp, [2, 21]), o($Vp, [2, 22]), o($Vp, [2, 23]), o($Vp, [2, 24]), o($Vp, [2, 25]), o($Vp, [2, 26]), { 32: [1, 49] }, { 34: [1, 50] }, o($Vp, [2, 29]), o($Vp, [2, 45], { 49: 51, 57: 54, 58: 55, 13: [1, 52], 21: [1, 53], 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }), { 37: [1, 63] }, o($Vx, [2, 36], { 37: [1, 65], 42: [1, 64] }), o($Vp, [2, 47]), o($Vp, [2, 48]), { 16: 66, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 67, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 68, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 69, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 74: [1, 70] }, { 13: [1, 71] }, { 16: 37, 17: 72, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: $Vy, 51: 73 }, o($Vp, [2, 55]), o($Vp, [2, 56]), o($Vp, [2, 57]), o($Vp, [2, 58]), o($Vz, [2, 11], { 16: 37, 18: 38, 17: 75, 19: [1, 76], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), o($Vz, [2, 12], { 19: [1, 77] }), { 15: 78, 16: 79, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 80, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VA, [2, 112]), o($VA, [2, 113]), o($VA, [2, 114]), o($VA, [2, 115]), o([1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], [2, 116]), o($Vo, [2, 6], { 10: 5, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 17: 20, 36: 21, 41: 22, 16: 37, 18: 38, 5: 81, 31: $V0, 33: $V1, 35: $V2, 40: $V3, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), { 5: 82, 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 17]), o($Vp, [2, 27]), o($Vp, [2, 28]), { 13: [1, 84], 16: 37, 17: 83, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 49: 85, 57: 54, 58: 55, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }, o($Vp, [2, 46]), { 58: 86, 64: $Vv, 65: $Vw }, o($VB, [2, 62], { 57: 87, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VC, [2, 63]), o($VC, [2, 64]), o($VC, [2, 65]), o($VC, [2, 66]), o($VC, [2, 67]), o($VD, [2, 68]), o($VD, [2, 69]), { 8: [1, 89], 23: 90, 38: 88, 41: 22, 44: $V4 }, { 16: 91, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 43: 92, 47: $VE }, { 46: [1, 94] }, { 13: [1, 95] }, { 13: [1, 96] }, { 70: [1, 97], 72: [1, 98] }, { 21: $VF, 73: $VG, 74: $VH, 75: 99, 77: 100, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, { 74: [1, 111] }, { 13: $Vy, 51: 112 }, o($Vp, [2, 54]), o($Vp, [2, 117]), o($Vz, [2, 13]), o($Vz, [2, 14]), o($Vz, [2, 15]), { 37: [2, 32] }, { 15: 113, 16: 79, 37: [2, 9], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, o($VO, [2, 40], { 11: 114, 12: [1, 115] }), o($Vo, [2, 7]), { 9: [1, 116] }, o($VP, [2, 49]), { 16: 37, 17: 117, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: [1, 119], 16: 37, 17: 118, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 61], { 57: 120, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VB, [2, 60]), { 39: [1, 121] }, { 23: 90, 38: 122, 41: 22, 44: $V4 }, { 8: [1, 123], 39: [2, 33] }, o($Vx, [2, 37], { 37: [1, 124] }), { 39: [1, 125] }, { 39: [2, 43], 43: 126, 47: $VE }, { 16: 37, 17: 127, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 70], { 13: [1, 128] }), o($Vp, [2, 72], { 13: [1, 130], 68: [1, 129] }), o($Vp, [2, 76], { 13: [1, 131], 71: [1, 132] }), { 13: [1, 133] }, o($Vp, [2, 84], { 78: [1, 134] }), o($VQ, [2, 86], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VR, [2, 88]), o($VR, [2, 90]), o($VR, [2, 91]), o($VR, [2, 92]), o($VR, [2, 93]), o($VR, [2, 94]), o($VR, [2, 95]), o($VR, [2, 96]), o($VR, [2, 97]), o($VR, [2, 98]), o($Vp, [2, 85]), o($Vp, [2, 53]), { 37: [2, 10] }, o($VO, [2, 41]), { 13: [1, 136] }, { 1: [2, 4] }, o($VP, [2, 51]), o($VP, [2, 50]), { 16: 37, 17: 137, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 59]), o($Vp, [2, 30]), { 39: [1, 138] }, { 23: 90, 38: 139, 39: [2, 34], 41: 22, 44: $V4 }, { 43: 140, 47: $VE }, o($Vx, [2, 38]), { 39: [2, 44] }, o($Vp, [2, 42]), o($Vp, [2, 71]), o($Vp, [2, 73]), o($Vp, [2, 74], { 68: [1, 141] }), o($Vp, [2, 77]), o($Vp, [2, 78], { 13: [1, 142] }), o($Vp, [2, 80], { 13: [1, 144], 68: [1, 143] }), { 21: $VF, 73: $VG, 74: $VH, 77: 145, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, o($VR, [2, 89]), { 14: [1, 146] }, o($VP, [2, 52]), o($Vp, [2, 31]), { 39: [2, 35] }, { 39: [1, 147] }, o($Vp, [2, 75]), o($Vp, [2, 79]), o($Vp, [2, 81]), o($Vp, [2, 82], { 68: [1, 148] }), o($VQ, [2, 87], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VO, [2, 8]), o($Vx, [2, 39]), o($Vp, [2, 83])], + defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 78: [2, 32], 113: [2, 10], 116: [2, 4], 126: [2, 44], 139: [2, 35] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 53; + case 1: + return 54; + case 2: + return 55; + case 3: + return 56; + case 4: + break; + case 5: + break; + case 6: + this.begin("acc_title"); + return 31; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 33; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + return 8; + case 14: + break; + case 15: + return 7; + case 16: + return 7; + case 17: + return "EDGE_STATE"; + case 18: + this.begin("callback_name"); + break; + case 19: + this.popState(); + break; + case 20: + this.popState(); + this.begin("callback_args"); + break; + case 21: + return 70; + case 22: + this.popState(); + break; + case 23: + return 71; + case 24: + this.popState(); + break; + case 25: + return "STR"; + case 26: + this.begin("string"); + break; + case 27: + return 73; + case 28: + this.begin("namespace"); + return 40; + case 29: + this.popState(); + return 8; + case 30: + break; + case 31: + this.begin("namespace-body"); + return 37; + case 32: + this.popState(); + return 39; + case 33: + return "EOF_IN_STRUCT"; + case 34: + return 8; + case 35: + break; + case 36: + return "EDGE_STATE"; + case 37: + this.begin("class"); + return 44; + case 38: + this.popState(); + return 8; + case 39: + break; + case 40: + this.popState(); + this.popState(); + return 39; + case 41: + this.begin("class-body"); + return 37; + case 42: + this.popState(); + return 39; + case 43: + return "EOF_IN_STRUCT"; + case 44: + return "EDGE_STATE"; + case 45: + return "OPEN_IN_STRUCT"; + case 46: + break; + case 47: + return "MEMBER"; + case 48: + return 76; + case 49: + return 66; + case 50: + return 67; + case 51: + return 69; + case 52: + return 50; + case 53: + return 52; + case 54: + return 45; + case 55: + return 46; + case 56: + return 72; + case 57: + this.popState(); + break; + case 58: + return "GENERICTYPE"; + case 59: + this.begin("generic"); + break; + case 60: + this.popState(); + break; + case 61: + return "BQUOTE_STR"; + case 62: + this.begin("bqstring"); + break; + case 63: + return 68; + case 64: + return 68; + case 65: + return 68; + case 66: + return 68; + case 67: + return 60; + case 68: + return 60; + case 69: + return 62; + case 70: + return 62; + case 71: + return 61; + case 72: + return 59; + case 73: + return 63; + case 74: + return 64; + case 75: + return 65; + case 76: + return 21; + case 77: + return 42; + case 78: + return 95; + case 79: + return "DOT"; + case 80: + return "PLUS"; + case 81: + return 81; + case 82: + return 78; + case 83: + return 84; + case 84: + return 84; + case 85: + return 85; + case 86: + return "EQUALS"; + case 87: + return "EQUALS"; + case 88: + return 74; + case 89: + return 12; + case 90: + return 14; + case 91: + return "PUNCTUATION"; + case 92: + return 80; + case 93: + return 97; + case 94: + return 83; + case 95: + return 83; + case 96: + return 9; + } + }, + rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:style\b)/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?::)/, /^(?:,)/, /^(?:#)/, /^(?:#)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-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])/, /^(?:\s)/, /^(?:\s)/, /^(?:$)/], + conditions: { "namespace-body": { "rules": [26, 32, 33, 34, 35, 36, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "namespace": { "rules": [26, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class-body": { "rules": [26, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class": { "rules": [26, 38, 39, 40, 41, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr": { "rules": [9, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_title": { "rules": [7, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_args": { "rules": [22, 23, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_name": { "rules": [19, 20, 21, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "href": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "struct": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "generic": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "bqstring": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "string": { "rules": [24, 25, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 28, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +const visibilityValues = ["#", "+", "~", "-", ""]; +class ClassMember { + constructor(input, memberType) { + this.memberType = memberType; + this.visibility = ""; + this.classifier = ""; + const sanitizedInput = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.d)(input, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + this.parseMember(sanitizedInput); + } + getDisplayDetails() { + let displayText = this.visibility + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.x)(this.id); + if (this.memberType === "method") { + displayText += `(${(0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.x)(this.parameters.trim())})`; + if (this.returnType) { + displayText += " : " + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.x)(this.returnType); + } + } + displayText = displayText.trim(); + const cssStyle = this.parseClassifier(); + return { + displayText, + cssStyle + }; + } + parseMember(input) { + let potentialClassifier = ""; + if (this.memberType === "method") { + const methodRegEx = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/; + const match = input.match(methodRegEx); + if (match) { + const detectedVisibility = match[1] ? match[1].trim() : ""; + if (visibilityValues.includes(detectedVisibility)) { + this.visibility = detectedVisibility; + } + this.id = match[2].trim(); + this.parameters = match[3] ? match[3].trim() : ""; + potentialClassifier = match[4] ? match[4].trim() : ""; + this.returnType = match[5] ? match[5].trim() : ""; + if (potentialClassifier === "") { + const lastChar = this.returnType.substring(this.returnType.length - 1); + if (lastChar.match(/[$*]/)) { + potentialClassifier = lastChar; + this.returnType = this.returnType.substring(0, this.returnType.length - 1); + } + } + } + } else { + const length = input.length; + const firstChar = input.substring(0, 1); + const lastChar = input.substring(length - 1); + if (visibilityValues.includes(firstChar)) { + this.visibility = firstChar; + } + if (lastChar.match(/[$*]/)) { + potentialClassifier = lastChar; + } + this.id = input.substring( + this.visibility === "" ? 0 : 1, + potentialClassifier === "" ? length : length - 1 + ); + } + this.classifier = potentialClassifier; + } + parseClassifier() { + switch (this.classifier) { + case "*": + return "font-style:italic;"; + case "$": + return "text-decoration:underline;"; + default: + return ""; + } + } +} +const MERMAID_DOM_ID_PREFIX = "classId-"; +let relations = []; +let classes = {}; +let notes = []; +let classCounter = 0; +let namespaces = {}; +let namespaceCounter = 0; +let functions = []; +const sanitizeText = (txt) => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); +const splitClassNameAndType = function(_id) { + const id = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + let genericType = ""; + let className = id; + if (id.indexOf("~") > 0) { + const split = id.split("~"); + className = sanitizeText(split[0]); + genericType = sanitizeText(split[1]); + } + return { className, type: genericType }; +}; +const setClassLabel = function(_id, label) { + const id = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + if (label) { + label = sanitizeText(label); + } + const { className } = splitClassNameAndType(id); + classes[className].label = label; +}; +const addClass = function(_id) { + const id = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + const { className, type } = splitClassNameAndType(id); + if (Object.hasOwn(classes, className)) { + return; + } + const name = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(className, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + classes[name] = { + id: name, + type, + label: name, + cssClasses: [], + methods: [], + members: [], + annotations: [], + styles: [], + domId: MERMAID_DOM_ID_PREFIX + name + "-" + classCounter + }; + classCounter++; +}; +const lookUpDomId = function(_id) { + const id = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + if (id in classes) { + return classes[id].domId; + } + throw new Error("Class not found: " + id); +}; +const clear = function() { + relations = []; + classes = {}; + notes = []; + functions = []; + functions.push(setupToolTips); + namespaces = {}; + namespaceCounter = 0; + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.v)(); +}; +const getClass = function(id) { + return classes[id]; +}; +const getClasses = function() { + return classes; +}; +const getRelations = function() { + return relations; +}; +const getNotes = function() { + return notes; +}; +const addRelation = function(relation) { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Adding relation: " + JSON.stringify(relation)); + addClass(relation.id1); + addClass(relation.id2); + relation.id1 = splitClassNameAndType(relation.id1).className; + relation.id2 = splitClassNameAndType(relation.id2).className; + relation.relationTitle1 = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(relation.relationTitle1.trim(), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + relation.relationTitle2 = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(relation.relationTitle2.trim(), (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + relations.push(relation); +}; +const addAnnotation = function(className, annotation) { + const validatedClassName = splitClassNameAndType(className).className; + classes[validatedClassName].annotations.push(annotation); +}; +const addMember = function(className, member) { + addClass(className); + const validatedClassName = splitClassNameAndType(className).className; + const theClass = classes[validatedClassName]; + if (typeof member === "string") { + const memberString = member.trim(); + if (memberString.startsWith("<<") && memberString.endsWith(">>")) { + theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2))); + } else if (memberString.indexOf(")") > 0) { + theClass.methods.push(new ClassMember(memberString, "method")); + } else if (memberString) { + theClass.members.push(new ClassMember(memberString, "attribute")); + } + } +}; +const addMembers = function(className, members) { + if (Array.isArray(members)) { + members.reverse(); + members.forEach((member) => addMember(className, member)); + } +}; +const addNote = function(text, className) { + const note = { + id: `note${notes.length}`, + class: className, + text + }; + notes.push(note); +}; +const cleanupLabel = function(label) { + if (label.startsWith(":")) { + label = label.substring(1); + } + return sanitizeText(label.trim()); +}; +const setCssClass = function(ids, className) { + ids.split(",").forEach(function(_id) { + let id = _id; + if (_id[0].match(/\d/)) { + id = MERMAID_DOM_ID_PREFIX + id; + } + if (classes[id] !== void 0) { + classes[id].cssClasses.push(className); + } + }); +}; +const setTooltip = function(ids, tooltip) { + ids.split(",").forEach(function(id) { + if (tooltip !== void 0) { + classes[id].tooltip = sanitizeText(tooltip); + } + }); +}; +const getTooltip = function(id, namespace) { + if (namespace) { + return namespaces[namespace].classes[id].tooltip; + } + return classes[id].tooltip; +}; +const setLink = function(ids, linkStr, target) { + const config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + ids.split(",").forEach(function(_id) { + let id = _id; + if (_id[0].match(/\d/)) { + id = MERMAID_DOM_ID_PREFIX + id; + } + if (classes[id] !== void 0) { + classes[id].link = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config); + if (config.securityLevel === "sandbox") { + classes[id].linkTarget = "_top"; + } else if (typeof target === "string") { + classes[id].linkTarget = sanitizeText(target); + } else { + classes[id].linkTarget = "_blank"; + } + } + }); + setCssClass(ids, "clickable"); +}; +const setClickEvent = function(ids, functionName, functionArgs) { + ids.split(",").forEach(function(id) { + setClickFunc(id, functionName, functionArgs); + classes[id].haveCallback = true; + }); + setCssClass(ids, "clickable"); +}; +const setClickFunc = function(_domId, functionName, functionArgs) { + const domId = _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_domId, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)()); + const config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)(); + if (config.securityLevel !== "loose") { + return; + } + if (functionName === void 0) { + return; + } + const id = domId; + if (classes[id] !== void 0) { + const elemId = lookUpDomId(id); + let argList = []; + if (typeof functionArgs === "string") { + argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); + for (let i = 0; i < argList.length; i++) { + let item = argList[i].trim(); + if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') { + item = item.substr(1, item.length - 2); + } + argList[i] = item; + } + } + if (argList.length === 0) { + argList.push(elemId); + } + functions.push(function() { + const elem = document.querySelector(`[id="${elemId}"]`); + if (elem !== null) { + elem.addEventListener( + "click", + function() { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList); + }, + false + ); + } + }); + } +}; +const bindFunctions = function(element) { + functions.forEach(function(fun) { + fun(element); + }); +}; +const lineType = { + LINE: 0, + DOTTED_LINE: 1 +}; +const relationType = { + AGGREGATION: 0, + EXTENSION: 1, + COMPOSITION: 2, + DEPENDENCY: 3, + LOLLIPOP: 4 +}; +const setupToolTips = function(element) { + let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(".mermaidTooltip"); + if ((tooltipElem._groups || tooltipElem)[0][0] === null) { + tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0); + } + const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(element).select("svg"); + const nodes = svg.selectAll("g.node"); + nodes.on("mouseover", function() { + const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); + const title = el.attr("title"); + if (title === null) { + return; + } + const rect = this.getBoundingClientRect(); + tooltipElem.transition().duration(200).style("opacity", ".9"); + tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.top - 14 + document.body.scrollTop + "px"); + tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "<br/>")); + el.classed("hover", true); + }).on("mouseout", function() { + tooltipElem.transition().duration(500).style("opacity", 0); + const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(this); + el.classed("hover", false); + }); +}; +functions.push(setupToolTips); +let direction = "TB"; +const getDirection = () => direction; +const setDirection = (dir) => { + direction = dir; +}; +const addNamespace = function(id) { + if (namespaces[id] !== void 0) { + return; + } + namespaces[id] = { + id, + classes: {}, + children: {}, + domId: MERMAID_DOM_ID_PREFIX + id + "-" + namespaceCounter + }; + namespaceCounter++; +}; +const getNamespace = function(name) { + return namespaces[name]; +}; +const getNamespaces = function() { + return namespaces; +}; +const addClassesToNamespace = function(id, classNames) { + if (namespaces[id] === void 0) { + return; + } + for (const name of classNames) { + const { className } = splitClassNameAndType(name); + classes[className].parent = id; + namespaces[id].classes[className] = classes[className]; + } +}; +const setCssStyle = function(id, styles2) { + const thisClass = classes[id]; + if (!styles2 || !thisClass) { + return; + } + for (const s of styles2) { + if (s.includes(",")) { + thisClass.styles.push(...s.split(",")); + } else { + thisClass.styles.push(s); + } + } +}; +const db = { + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.g, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.a, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.b, + getConfig: () => (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.c)().class, + addClass, + bindFunctions, + clear, + getClass, + getClasses, + getNotes, + addAnnotation, + addNote, + getRelations, + addRelation, + getDirection, + setDirection, + addMember, + addMembers, + cleanupLabel, + lineType, + relationType, + setClickEvent, + setCssClass, + setLink, + getTooltip, + setTooltip, + lookUpDomId, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.t, + setClassLabel, + addNamespace, + addClassesToNamespace, + getNamespace, + getNamespaces, + setCssStyle +}; +const getStyles = (options) => `g.classGroup text { + fill: ${options.nodeBorder || options.classText}; + stroke: none; + font-family: ${options.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${options.classText}; +} +.edgeLabel .label rect { + fill: ${options.mainBkg}; +} +.label text { + fill: ${options.classText}; +} +.edgeLabel .label span { + background: ${options.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${options.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; +} + +g.classGroup line { + stroke: ${options.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${options.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${options.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${options.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${options.lineColor} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${options.mainBkg} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${options.mainBkg} !important; + stroke: ${options.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; +} +`; +const styles = getStyles; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/751.ef6780cb.js b/assets/js/751.ef6780cb.js new file mode 100644 index 00000000..909f7db3 --- /dev/null +++ b/assets/js/751.ef6780cb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[751],{751:(t,e,a)=>{a.d(e,{diagram:()=>y});var r=a(7308),i=a(6312),n=a(1176),d=a(697),o=a(6257);a(4353),a(6750),a(2838);let s=0;const l=function(t){let e=t.id;return t.type&&(e+="<"+(0,o.x)(t.type)+">"),e},p=function(t,e,a,r){const{displayText:i,cssStyle:n}=e.getDisplayDetails(),d=t.append("tspan").attr("x",r.padding).text(i);""!==n&&d.attr("style",e.cssStyle),a||d.attr("dy",r.textHeight)},c=function(t,e,a,r){o.l.debug("Rendering class ",e,a);const i=e.id,n={id:i,label:e.id,width:0,height:0},d=t.append("g").attr("id",r.db.lookUpDomId(i)).attr("class","classGroup");let s;s=e.link?d.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",a.textHeight+a.padding).attr("x",0):d.append("text").attr("y",a.textHeight+a.padding).attr("x",0);let c=!0;e.annotations.forEach((function(t){const e=s.append("tspan").text("\xab"+t+"\xbb");c||e.attr("dy",a.textHeight),c=!1}));let g=l(e);const h=s.append("tspan").text(g).attr("class","title");c||h.attr("dy",a.textHeight);const f=s.node().getBBox().height;let x,u,y;if(e.members.length>0){x=d.append("line").attr("x1",0).attr("y1",a.padding+f+a.dividerMargin/2).attr("y2",a.padding+f+a.dividerMargin/2);const t=d.append("text").attr("x",a.padding).attr("y",f+a.dividerMargin+a.textHeight).attr("fill","white").attr("class","classText");c=!0,e.members.forEach((function(e){p(t,e,c,a),c=!1})),u=t.node().getBBox()}if(e.methods.length>0){y=d.append("line").attr("x1",0).attr("y1",a.padding+f+a.dividerMargin+u.height).attr("y2",a.padding+f+a.dividerMargin+u.height);const t=d.append("text").attr("x",a.padding).attr("y",f+2*a.dividerMargin+u.height+a.textHeight).attr("fill","white").attr("class","classText");c=!0,e.methods.forEach((function(e){p(t,e,c,a),c=!1}))}const m=d.node().getBBox();var b=" ";e.cssClasses.length>0&&(b+=e.cssClasses.join(" "));const k=d.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*a.padding).attr("height",m.height+a.padding+.5*a.dividerMargin).attr("class",b).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(k-t.getBBox().width)/2)})),e.tooltip&&s.insert("title").text(e.tooltip),x&&x.attr("x2",k),y&&y.attr("x2",k),n.width=k,n.height=m.height+a.padding+.5*a.dividerMargin,n},g=function(t,e,a,r,n){const d=function(t){switch(t){case n.db.relationType.AGGREGATION:return"aggregation";case n.db.relationType.EXTENSION:return"extension";case n.db.relationType.COMPOSITION:return"composition";case n.db.relationType.DEPENDENCY:return"dependency";case n.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter((t=>!Number.isNaN(t.y)));const l=e.points,p=(0,i.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(i.qrM),c=t.append("path").attr("d",p(l)).attr("id","edge"+s).attr("class","relation");let g,h,f="";r.arrowMarkerAbsolute&&(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,f=f.replace(/\(/g,"\\("),f=f.replace(/\)/g,"\\)")),1==a.relation.lineType&&c.attr("class","relation dashed-line"),10==a.relation.lineType&&c.attr("class","relation dotted-line"),"none"!==a.relation.type1&&c.attr("marker-start","url("+f+"#"+d(a.relation.type1)+"Start)"),"none"!==a.relation.type2&&c.attr("marker-end","url("+f+"#"+d(a.relation.type2)+"End)");const x=e.points.length;let u,y,m,b,k=o.u.calcLabelPosition(e.points);if(g=k.x,h=k.y,x%2!=0&&x>1){let t=o.u.calcCardinalityPosition("none"!==a.relation.type1,e.points,e.points[0]),r=o.u.calcCardinalityPosition("none"!==a.relation.type2,e.points,e.points[x-1]);o.l.debug("cardinality_1_point "+JSON.stringify(t)),o.l.debug("cardinality_2_point "+JSON.stringify(r)),u=t.x,y=t.y,m=r.x,b=r.y}if(void 0!==a.title){const e=t.append("g").attr("class","classLabel"),i=e.append("text").attr("class","label").attr("x",g).attr("y",h).attr("fill","red").attr("text-anchor","middle").text(a.title);window.label=i;const n=i.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",n.x-r.padding/2).attr("y",n.y-r.padding/2).attr("width",n.width+r.padding).attr("height",n.height+r.padding)}if(o.l.info("Rendering relation "+JSON.stringify(a)),void 0!==a.relationTitle1&&"none"!==a.relationTitle1){t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",u).attr("y",y).attr("fill","black").attr("font-size","6").text(a.relationTitle1)}if(void 0!==a.relationTitle2&&"none"!==a.relationTitle2){t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",m).attr("y",b).attr("fill","black").attr("font-size","6").text(a.relationTitle2)}s++},h=function(t,e,a,r){o.l.debug("Rendering note ",e,a);const i=e.id,n={id:i,text:e.text,width:0,height:0},d=t.append("g").attr("id",i).attr("class","classGroup");let s=d.append("text").attr("y",a.textHeight+a.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split("\n");l.forEach((function(t){o.l.debug(`Adding line: ${t}`),s.append("tspan").text(t).attr("class","title").attr("dy",a.textHeight)}));const p=d.node().getBBox(),c=d.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",p.width+2*a.padding).attr("height",p.height+l.length*a.textHeight+a.padding+.5*a.dividerMargin).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(c-t.getBBox().width)/2)})),n.width=c,n.height=p.height+l.length*a.textHeight+a.padding+.5*a.dividerMargin,n};let f={};const x=function(t){const e=Object.entries(f).find((e=>e[1].label===t));if(e)return e[0]},u={draw:function(t,e,a,r){const s=(0,o.c)().class;f={},o.l.info("Rendering diagram "+t);const l=(0,o.c)().securityLevel;let p;"sandbox"===l&&(p=(0,i.Ltv)("#i"+e));const u="sandbox"===l?(0,i.Ltv)(p.nodes()[0].contentDocument.body):(0,i.Ltv)("body"),y=u.select(`[id='${e}']`);var m;(m=y).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),m.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),m.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").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"),m.append("defs").append("marker").attr("id","compositionEnd").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"),m.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").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"),m.append("defs").append("marker").attr("id","aggregationEnd").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"),m.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).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"),m.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).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");const b=new d.T({multigraph:!0});b.setGraph({isMultiGraph:!0}),b.setDefaultEdgeLabel((function(){return{}}));const k=r.db.getClasses(),w=Object.keys(k);for(const i of w){const t=k[i],e=c(y,t,s,r);f[e.id]=e,b.setNode(e.id,e),o.l.info("Org height: "+e.height)}r.db.getRelations().forEach((function(t){o.l.info("tjoho"+x(t.id1)+x(t.id2)+JSON.stringify(t)),b.setEdge(x(t.id1),x(t.id2),{relation:t},t.title||"DEFAULT")}));r.db.getNotes().forEach((function(t){o.l.debug(`Adding note: ${JSON.stringify(t)}`);const e=h(y,t,s,r);f[e.id]=e,b.setNode(e.id,e),t.class&&t.class in k&&b.setEdge(t.id,x(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")})),(0,n.Zp)(b),b.nodes().forEach((function(t){void 0!==t&&void 0!==b.node(t)&&(o.l.debug("Node "+t+": "+JSON.stringify(b.node(t))),u.select("#"+(r.db.lookUpDomId(t)||t)).attr("transform","translate("+(b.node(t).x-b.node(t).width/2)+","+(b.node(t).y-b.node(t).height/2)+" )"))})),b.edges().forEach((function(t){void 0!==t&&void 0!==b.edge(t)&&(o.l.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(b.edge(t))),g(y,b.edge(t),b.edge(t).relation,s,r))}));const L=y.node().getBBox(),v=L.width+40,E=L.height+40;(0,o.i)(y,E,v,s.useMaxWidth);const M=`${L.x-20} ${L.y-20} ${v} ${E}`;o.l.debug(`viewBox ${M}`),y.attr("viewBox",M)}},y={parser:r.p,db:r.d,renderer:u,styles:r.s,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,r.d.clear()}}}}]); \ No newline at end of file diff --git a/assets/js/771.648de544.js b/assets/js/771.648de544.js new file mode 100644 index 00000000..c54450a4 --- /dev/null +++ b/assets/js/771.648de544.js @@ -0,0 +1,51832 @@ +exports.id = 771; +exports.ids = [771]; +exports.modules = { + +/***/ 7799: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +(function webpackUniversalModuleDefinition(root, factory) { + if(true) + module.exports = factory(__webpack_require__(3143)); + else {} +})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __nested_webpack_require_643__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_643__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __nested_webpack_require_643__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __nested_webpack_require_643__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __nested_webpack_require_643__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __nested_webpack_require_643__.d = function(exports, name, getter) { +/******/ if(!__nested_webpack_require_643__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nested_webpack_require_643__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __nested_webpack_require_643__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __nested_webpack_require_643__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __nested_webpack_require_643__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __nested_webpack_require_643__(__nested_webpack_require_643__.s = 7); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_0__; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __nested_webpack_require_3185__) { + +"use strict"; + + +var FDLayoutConstants = __nested_webpack_require_3185__(0).FDLayoutConstants; + +function CoSEConstants() {} + +//CoSEConstants inherits static props in FDLayoutConstants +for (var prop in FDLayoutConstants) { + CoSEConstants[prop] = FDLayoutConstants[prop]; +} + +CoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false; +CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH; +CoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60; +CoSEConstants.TILE = true; +CoSEConstants.TILING_PADDING_VERTICAL = 10; +CoSEConstants.TILING_PADDING_HORIZONTAL = 10; +CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false; // make this true when cose is used incrementally as a part of other non-incremental layout + +module.exports = CoSEConstants; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __nested_webpack_require_4002__) { + +"use strict"; + + +var FDLayoutEdge = __nested_webpack_require_4002__(0).FDLayoutEdge; + +function CoSEEdge(source, target, vEdge) { + FDLayoutEdge.call(this, source, target, vEdge); +} + +CoSEEdge.prototype = Object.create(FDLayoutEdge.prototype); +for (var prop in FDLayoutEdge) { + CoSEEdge[prop] = FDLayoutEdge[prop]; +} + +module.exports = CoSEEdge; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __nested_webpack_require_4409__) { + +"use strict"; + + +var LGraph = __nested_webpack_require_4409__(0).LGraph; + +function CoSEGraph(parent, graphMgr, vGraph) { + LGraph.call(this, parent, graphMgr, vGraph); +} + +CoSEGraph.prototype = Object.create(LGraph.prototype); +for (var prop in LGraph) { + CoSEGraph[prop] = LGraph[prop]; +} + +module.exports = CoSEGraph; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __nested_webpack_require_4790__) { + +"use strict"; + + +var LGraphManager = __nested_webpack_require_4790__(0).LGraphManager; + +function CoSEGraphManager(layout) { + LGraphManager.call(this, layout); +} + +CoSEGraphManager.prototype = Object.create(LGraphManager.prototype); +for (var prop in LGraphManager) { + CoSEGraphManager[prop] = LGraphManager[prop]; +} + +module.exports = CoSEGraphManager; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __nested_webpack_require_5205__) { + +"use strict"; + + +var FDLayoutNode = __nested_webpack_require_5205__(0).FDLayoutNode; +var IMath = __nested_webpack_require_5205__(0).IMath; + +function CoSENode(gm, loc, size, vNode) { + FDLayoutNode.call(this, gm, loc, size, vNode); +} + +CoSENode.prototype = Object.create(FDLayoutNode.prototype); +for (var prop in FDLayoutNode) { + CoSENode[prop] = FDLayoutNode[prop]; +} + +CoSENode.prototype.move = function () { + var layout = this.graphManager.getLayout(); + this.displacementX = layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren; + this.displacementY = layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren; + + if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) { + this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX); + } + + if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) { + this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY); + } + + // a simple node, just move it + if (this.child == null) { + this.moveBy(this.displacementX, this.displacementY); + } + // an empty compound node, again just move it + else if (this.child.getNodes().length == 0) { + this.moveBy(this.displacementX, this.displacementY); + } + // non-empty compound node, propogate movement to children as well + else { + this.propogateDisplacementToChildren(this.displacementX, this.displacementY); + } + + layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY); + + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + this.displacementX = 0; + this.displacementY = 0; +}; + +CoSENode.prototype.propogateDisplacementToChildren = function (dX, dY) { + var nodes = this.getChild().getNodes(); + var node; + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + if (node.getChild() == null) { + node.moveBy(dX, dY); + node.displacementX += dX; + node.displacementY += dY; + } else { + node.propogateDisplacementToChildren(dX, dY); + } + } +}; + +CoSENode.prototype.setPred1 = function (pred1) { + this.pred1 = pred1; +}; + +CoSENode.prototype.getPred1 = function () { + return pred1; +}; + +CoSENode.prototype.getPred2 = function () { + return pred2; +}; + +CoSENode.prototype.setNext = function (next) { + this.next = next; +}; + +CoSENode.prototype.getNext = function () { + return next; +}; + +CoSENode.prototype.setProcessed = function (processed) { + this.processed = processed; +}; + +CoSENode.prototype.isProcessed = function () { + return processed; +}; + +module.exports = CoSENode; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __nested_webpack_require_8085__) { + +"use strict"; + + +var FDLayout = __nested_webpack_require_8085__(0).FDLayout; +var CoSEGraphManager = __nested_webpack_require_8085__(4); +var CoSEGraph = __nested_webpack_require_8085__(3); +var CoSENode = __nested_webpack_require_8085__(5); +var CoSEEdge = __nested_webpack_require_8085__(2); +var CoSEConstants = __nested_webpack_require_8085__(1); +var FDLayoutConstants = __nested_webpack_require_8085__(0).FDLayoutConstants; +var LayoutConstants = __nested_webpack_require_8085__(0).LayoutConstants; +var Point = __nested_webpack_require_8085__(0).Point; +var PointD = __nested_webpack_require_8085__(0).PointD; +var Layout = __nested_webpack_require_8085__(0).Layout; +var Integer = __nested_webpack_require_8085__(0).Integer; +var IGeometry = __nested_webpack_require_8085__(0).IGeometry; +var LGraph = __nested_webpack_require_8085__(0).LGraph; +var Transform = __nested_webpack_require_8085__(0).Transform; + +function CoSELayout() { + FDLayout.call(this); + + this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled +} + +CoSELayout.prototype = Object.create(FDLayout.prototype); + +for (var prop in FDLayout) { + CoSELayout[prop] = FDLayout[prop]; +} + +CoSELayout.prototype.newGraphManager = function () { + var gm = new CoSEGraphManager(this); + this.graphManager = gm; + return gm; +}; + +CoSELayout.prototype.newGraph = function (vGraph) { + return new CoSEGraph(null, this.graphManager, vGraph); +}; + +CoSELayout.prototype.newNode = function (vNode) { + return new CoSENode(this.graphManager, vNode); +}; + +CoSELayout.prototype.newEdge = function (vEdge) { + return new CoSEEdge(null, null, vEdge); +}; + +CoSELayout.prototype.initParameters = function () { + FDLayout.prototype.initParameters.call(this, arguments); + if (!this.isSubLayout) { + if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) { + this.idealEdgeLength = 10; + } else { + this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH; + } + + this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; + this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + + // variables for tree reduction support + this.prunedNodesAll = []; + this.growTreeIterations = 0; + this.afterGrowthIterations = 0; + this.isTreeGrowing = false; + this.isGrowthFinished = false; + + // variables for cooling + this.coolingCycle = 0; + this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD; + this.finalTemperature = FDLayoutConstants.CONVERGENCE_CHECK_PERIOD / this.maxIterations; + this.coolingAdjuster = 1; + } +}; + +CoSELayout.prototype.layout = function () { + var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + if (createBendsAsNeeded) { + this.createBendpoints(); + this.graphManager.resetAllEdges(); + } + + this.level = 0; + return this.classicLayout(); +}; + +CoSELayout.prototype.classicLayout = function () { + this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(); + this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity); + this.calcNoOfChildrenForAllNodes(); + this.graphManager.calcLowestCommonAncestors(); + this.graphManager.calcInclusionTreeDepths(); + this.graphManager.getRoot().calcEstimatedSize(); + this.calcIdealEdgeLengths(); + + if (!this.incremental) { + var forest = this.getFlatForest(); + + // The graph associated with this layout is flat and a forest + if (forest.length > 0) { + this.positionNodesRadially(forest); + } + // The graph associated with this layout is not flat or a forest + else { + // Reduce the trees when incremental mode is not enabled and graph is not a forest + this.reduceTrees(); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function (x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + + this.positionNodesRandomly(); + } + } else { + if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) { + // Reduce the trees in incremental mode if only this constant is set to true + this.reduceTrees(); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function (x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + } + } + + this.initSpringEmbedder(); + this.runSpringEmbedder(); + + return true; +}; + +CoSELayout.prototype.tick = function () { + this.totalIterations++; + + if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.prunedNodesAll.length > 0) { + this.isTreeGrowing = true; + } else { + return true; + } + } + + if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.isConverged()) { + if (this.prunedNodesAll.length > 0) { + this.isTreeGrowing = true; + } else { + return true; + } + } + + this.coolingCycle++; + + if (this.layoutQuality == 0) { + // quality - "draft" + this.coolingAdjuster = this.coolingCycle; + } else if (this.layoutQuality == 1) { + // quality - "default" + this.coolingAdjuster = this.coolingCycle / 3; + } + + // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 3 + this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature); + this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor)); + } + // Operations while tree is growing again + if (this.isTreeGrowing) { + if (this.growTreeIterations % 10 == 0) { + if (this.prunedNodesAll.length > 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + this.growTree(this.prunedNodesAll); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function (x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + + this.graphManager.updateBounds(); + this.updateGrid(); + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + } else { + this.isTreeGrowing = false; + this.isGrowthFinished = true; + } + } + this.growTreeIterations++; + } + // Operations after growth is finished + if (this.isGrowthFinished) { + if (this.isConverged()) { + return true; + } + if (this.afterGrowthIterations % 10 == 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + } + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100); + this.afterGrowthIterations++; + } + + var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished; + var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished; + + this.totalDisplacement = 0; + this.graphManager.updateBounds(); + this.calcSpringForces(); + this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate); + this.calcGravitationalForces(); + this.moveNodes(); + this.animate(); + + return false; // Layout is not ended yet return false +}; + +CoSELayout.prototype.getPositionsData = function () { + var allNodes = this.graphManager.getAllNodes(); + var pData = {}; + for (var i = 0; i < allNodes.length; i++) { + var rect = allNodes[i].rect; + var id = allNodes[i].id; + pData[id] = { + id: id, + x: rect.getCenterX(), + y: rect.getCenterY(), + w: rect.width, + h: rect.height + }; + } + + return pData; +}; + +CoSELayout.prototype.runSpringEmbedder = function () { + this.initialAnimationPeriod = 25; + this.animationPeriod = this.initialAnimationPeriod; + var layoutEnded = false; + + // If aminate option is 'during' signal that layout is supposed to start iterating + if (FDLayoutConstants.ANIMATE === 'during') { + this.emit('layoutstarted'); + } else { + // If aminate option is 'during' tick() function will be called on index.js + while (!layoutEnded) { + layoutEnded = this.tick(); + } + + this.graphManager.updateBounds(); + } +}; + +CoSELayout.prototype.calculateNodesToApplyGravitationTo = function () { + var nodeList = []; + var graph; + + var graphs = this.graphManager.getGraphs(); + var size = graphs.length; + var i; + for (i = 0; i < size; i++) { + graph = graphs[i]; + + graph.updateConnected(); + + if (!graph.isConnected) { + nodeList = nodeList.concat(graph.getNodes()); + } + } + + return nodeList; +}; + +CoSELayout.prototype.createBendpoints = function () { + var edges = []; + edges = edges.concat(this.graphManager.getAllEdges()); + var visited = new Set(); + var i; + for (i = 0; i < edges.length; i++) { + var edge = edges[i]; + + if (!visited.has(edge)) { + var source = edge.getSource(); + var target = edge.getTarget(); + + if (source == target) { + edge.getBendpoints().push(new PointD()); + edge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(edge); + visited.add(edge); + } else { + var edgeList = []; + + edgeList = edgeList.concat(source.getEdgeListToNode(target)); + edgeList = edgeList.concat(target.getEdgeListToNode(source)); + + if (!visited.has(edgeList[0])) { + if (edgeList.length > 1) { + var k; + for (k = 0; k < edgeList.length; k++) { + var multiEdge = edgeList[k]; + multiEdge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(multiEdge); + } + } + edgeList.forEach(function (edge) { + visited.add(edge); + }); + } + } + } + + if (visited.size == edges.length) { + break; + } + } +}; + +CoSELayout.prototype.positionNodesRadially = function (forest) { + // We tile the trees to a grid row by row; first tree starts at (0,0) + var currentStartingPoint = new Point(0, 0); + var numberOfColumns = Math.ceil(Math.sqrt(forest.length)); + var height = 0; + var currentY = 0; + var currentX = 0; + var point = new PointD(0, 0); + + for (var i = 0; i < forest.length; i++) { + if (i % numberOfColumns == 0) { + // Start of a new row, make the x coordinate 0, increment the + // y coordinate with the max height of the previous row + currentX = 0; + currentY = height; + + if (i != 0) { + currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION; + } + + height = 0; + } + + var tree = forest[i]; + + // Find the center of the tree + var centerNode = Layout.findCenterOfTree(tree); + + // Set the staring point of the next tree + currentStartingPoint.x = currentX; + currentStartingPoint.y = currentY; + + // Do a radial layout starting with the center + point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint); + + if (point.y > height) { + height = Math.floor(point.y); + } + + currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION); + } + + this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2)); +}; + +CoSELayout.radialLayout = function (tree, centerNode, startingPoint) { + var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION); + CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep); + var bounds = LGraph.calculateBounds(tree); + + var transform = new Transform(); + transform.setDeviceOrgX(bounds.getMinX()); + transform.setDeviceOrgY(bounds.getMinY()); + transform.setWorldOrgX(startingPoint.x); + transform.setWorldOrgY(startingPoint.y); + + for (var i = 0; i < tree.length; i++) { + var node = tree[i]; + node.transform(transform); + } + + var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY()); + + return transform.inverseTransformPoint(bottomRight); +}; + +CoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) { + // First, position this node by finding its angle. + var halfInterval = (endAngle - startAngle + 1) / 2; + + if (halfInterval < 0) { + halfInterval += 180; + } + + var nodeAngle = (halfInterval + startAngle) % 360; + var teta = nodeAngle * IGeometry.TWO_PI / 360; + + // Make polar to java cordinate conversion. + var cos_teta = Math.cos(teta); + var x_ = distance * Math.cos(teta); + var y_ = distance * Math.sin(teta); + + node.setCenter(x_, y_); + + // Traverse all neighbors of this node and recursively call this + // function. + var neighborEdges = []; + neighborEdges = neighborEdges.concat(node.getEdges()); + var childCount = neighborEdges.length; + + if (parentOfNode != null) { + childCount--; + } + + var branchCount = 0; + + var incEdgesCount = neighborEdges.length; + var startIndex; + + var edges = node.getEdgesBetween(parentOfNode); + + // If there are multiple edges, prune them until there remains only one + // edge. + while (edges.length > 1) { + //neighborEdges.remove(edges.remove(0)); + var temp = edges[0]; + edges.splice(0, 1); + var index = neighborEdges.indexOf(temp); + if (index >= 0) { + neighborEdges.splice(index, 1); + } + incEdgesCount--; + childCount--; + } + + if (parentOfNode != null) { + //assert edges.length == 1; + startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount; + } else { + startIndex = 0; + } + + var stepAngle = Math.abs(endAngle - startAngle) / childCount; + + for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) { + var currentNeighbor = neighborEdges[i].getOtherEnd(node); + + // Don't back traverse to root node in current tree. + if (currentNeighbor == parentOfNode) { + continue; + } + + var childStartAngle = (startAngle + branchCount * stepAngle) % 360; + var childEndAngle = (childStartAngle + stepAngle) % 360; + + CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation); + + branchCount++; + } +}; + +CoSELayout.maxDiagonalInTree = function (tree) { + var maxDiagonal = Integer.MIN_VALUE; + + for (var i = 0; i < tree.length; i++) { + var node = tree[i]; + var diagonal = node.getDiagonal(); + + if (diagonal > maxDiagonal) { + maxDiagonal = diagonal; + } + } + + return maxDiagonal; +}; + +CoSELayout.prototype.calcRepulsionRange = function () { + // formula is 2 x (level + 1) x idealEdgeLength + return 2 * (this.level + 1) * this.idealEdgeLength; +}; + +// Tiling methods + +// Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's +CoSELayout.prototype.groupZeroDegreeMembers = function () { + var self = this; + // array of [parent_id x oneDegreeNode_id] + var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members + this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled + this.idToDummyNode = {}; // A map of id to dummy node + + var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled + var allNodes = this.graphManager.getAllNodes(); + + // Fill zero degree list + for (var i = 0; i < allNodes.length; i++) { + var node = allNodes[i]; + var parent = node.getParent(); + // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list + if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == undefined || !this.getToBeTiled(parent))) { + zeroDegree.push(node); + } + } + + // Create a map of parent node and its zero degree members + for (var i = 0; i < zeroDegree.length; i++) { + var node = zeroDegree[i]; // Zero degree node itself + var p_id = node.getParent().id; // Parent id + + if (typeof tempMemberGroups[p_id] === "undefined") tempMemberGroups[p_id] = []; + + tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups + } + + // If there are at least two nodes at a level, create a dummy compound for them + Object.keys(tempMemberGroups).forEach(function (p_id) { + if (tempMemberGroups[p_id].length > 1) { + var dummyCompoundId = "DummyCompound_" + p_id; // The id of dummy compound which will be created soon + self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups + + var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound + + // Create a dummy compound with calculated id + var dummyCompound = new CoSENode(self.graphManager); + dummyCompound.id = dummyCompoundId; + dummyCompound.paddingLeft = parent.paddingLeft || 0; + dummyCompound.paddingRight = parent.paddingRight || 0; + dummyCompound.paddingBottom = parent.paddingBottom || 0; + dummyCompound.paddingTop = parent.paddingTop || 0; + + self.idToDummyNode[dummyCompoundId] = dummyCompound; + + var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound); + var parentGraph = parent.getChild(); + + // Add dummy compound to parent the graph + parentGraph.add(dummyCompound); + + // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent + for (var i = 0; i < tempMemberGroups[p_id].length; i++) { + var node = tempMemberGroups[p_id][i]; + + parentGraph.remove(node); + dummyParentGraph.add(node); + } + } + }); +}; + +CoSELayout.prototype.clearCompounds = function () { + var childGraphMap = {}; + var idToNode = {}; + + // Get compound ordering by finding the inner one first + this.performDFSOnCompounds(); + + for (var i = 0; i < this.compoundOrder.length; i++) { + + idToNode[this.compoundOrder[i].id] = this.compoundOrder[i]; + childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes()); + + // Remove children of compounds + this.graphManager.remove(this.compoundOrder[i].getChild()); + this.compoundOrder[i].child = null; + } + + this.graphManager.resetAllNodes(); + + // Tile the removed children + this.tileCompoundMembers(childGraphMap, idToNode); +}; + +CoSELayout.prototype.clearZeroDegreeMembers = function () { + var self = this; + var tiledZeroDegreePack = this.tiledZeroDegreePack = []; + + Object.keys(this.memberGroups).forEach(function (id) { + var compoundNode = self.idToDummyNode[id]; // Get the dummy compound + + tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight); + + // Set the width and height of the dummy compound as calculated + compoundNode.rect.width = tiledZeroDegreePack[id].width; + compoundNode.rect.height = tiledZeroDegreePack[id].height; + }); +}; + +CoSELayout.prototype.repopulateCompounds = function () { + for (var i = this.compoundOrder.length - 1; i >= 0; i--) { + var lCompoundNode = this.compoundOrder[i]; + var id = lCompoundNode.id; + var horizontalMargin = lCompoundNode.paddingLeft; + var verticalMargin = lCompoundNode.paddingTop; + + this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin); + } +}; + +CoSELayout.prototype.repopulateZeroDegreeMembers = function () { + var self = this; + var tiledPack = this.tiledZeroDegreePack; + + Object.keys(tiledPack).forEach(function (id) { + var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id + var horizontalMargin = compoundNode.paddingLeft; + var verticalMargin = compoundNode.paddingTop; + + // Adjust the positions of nodes wrt its compound + self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin); + }); +}; + +CoSELayout.prototype.getToBeTiled = function (node) { + var id = node.id; + //firstly check the previous results + if (this.toBeTiled[id] != null) { + return this.toBeTiled[id]; + } + + //only compound nodes are to be tiled + var childGraph = node.getChild(); + if (childGraph == null) { + this.toBeTiled[id] = false; + return false; + } + + var children = childGraph.getNodes(); // Get the children nodes + + //a compound node is not to be tiled if all of its compound children are not to be tiled + for (var i = 0; i < children.length; i++) { + var theChild = children[i]; + + if (this.getNodeDegree(theChild) > 0) { + this.toBeTiled[id] = false; + return false; + } + + //pass the children not having the compound structure + if (theChild.getChild() == null) { + this.toBeTiled[theChild.id] = false; + continue; + } + + if (!this.getToBeTiled(theChild)) { + this.toBeTiled[id] = false; + return false; + } + } + this.toBeTiled[id] = true; + return true; +}; + +// Get degree of a node depending of its edges and independent of its children +CoSELayout.prototype.getNodeDegree = function (node) { + var id = node.id; + var edges = node.getEdges(); + var degree = 0; + + // For the edges connected + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + if (edge.getSource().id !== edge.getTarget().id) { + degree = degree + 1; + } + } + return degree; +}; + +// Get degree of a node with its children +CoSELayout.prototype.getNodeDegreeWithChildren = function (node) { + var degree = this.getNodeDegree(node); + if (node.getChild() == null) { + return degree; + } + var children = node.getChild().getNodes(); + for (var i = 0; i < children.length; i++) { + var child = children[i]; + degree += this.getNodeDegreeWithChildren(child); + } + return degree; +}; + +CoSELayout.prototype.performDFSOnCompounds = function () { + this.compoundOrder = []; + this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes()); +}; + +CoSELayout.prototype.fillCompexOrderByDFS = function (children) { + for (var i = 0; i < children.length; i++) { + var child = children[i]; + if (child.getChild() != null) { + this.fillCompexOrderByDFS(child.getChild().getNodes()); + } + if (this.getToBeTiled(child)) { + this.compoundOrder.push(child); + } + } +}; + +/** +* This method places each zero degree member wrt given (x,y) coordinates (top left). +*/ +CoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin) { + x += compoundHorizontalMargin; + y += compoundVerticalMargin; + + var left = x; + + for (var i = 0; i < organization.rows.length; i++) { + var row = organization.rows[i]; + x = left; + var maxHeight = 0; + + for (var j = 0; j < row.length; j++) { + var lnode = row[j]; + + lnode.rect.x = x; // + lnode.rect.width / 2; + lnode.rect.y = y; // + lnode.rect.height / 2; + + x += lnode.rect.width + organization.horizontalPadding; + + if (lnode.rect.height > maxHeight) maxHeight = lnode.rect.height; + } + + y += maxHeight + organization.verticalPadding; + } +}; + +CoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) { + var self = this; + this.tiledMemberPack = []; + + Object.keys(childGraphMap).forEach(function (id) { + // Get the compound node + var compoundNode = idToNode[id]; + + self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight); + + compoundNode.rect.width = self.tiledMemberPack[id].width; + compoundNode.rect.height = self.tiledMemberPack[id].height; + }); +}; + +CoSELayout.prototype.tileNodes = function (nodes, minWidth) { + var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL; + var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL; + var organization = { + rows: [], + rowWidth: [], + rowHeight: [], + width: 0, + height: minWidth, // assume minHeight equals to minWidth + verticalPadding: verticalPadding, + horizontalPadding: horizontalPadding + }; + + // Sort the nodes in ascending order of their areas + nodes.sort(function (n1, n2) { + if (n1.rect.width * n1.rect.height > n2.rect.width * n2.rect.height) return -1; + if (n1.rect.width * n1.rect.height < n2.rect.width * n2.rect.height) return 1; + return 0; + }); + + // Create the organization -> tile members + for (var i = 0; i < nodes.length; i++) { + var lNode = nodes[i]; + + if (organization.rows.length == 0) { + this.insertNodeToRow(organization, lNode, 0, minWidth); + } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) { + this.insertNodeToRow(organization, lNode, this.getShortestRowIndex(organization), minWidth); + } else { + this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth); + } + + this.shiftToLastRow(organization); + } + + return organization; +}; + +CoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) { + var minCompoundSize = minWidth; + + // Add new row if needed + if (rowIndex == organization.rows.length) { + var secondDimension = []; + + organization.rows.push(secondDimension); + organization.rowWidth.push(minCompoundSize); + organization.rowHeight.push(0); + } + + // Update row width + var w = organization.rowWidth[rowIndex] + node.rect.width; + + if (organization.rows[rowIndex].length > 0) { + w += organization.horizontalPadding; + } + + organization.rowWidth[rowIndex] = w; + // Update compound width + if (organization.width < w) { + organization.width = w; + } + + // Update height + var h = node.rect.height; + if (rowIndex > 0) h += organization.verticalPadding; + + var extraHeight = 0; + if (h > organization.rowHeight[rowIndex]) { + extraHeight = organization.rowHeight[rowIndex]; + organization.rowHeight[rowIndex] = h; + extraHeight = organization.rowHeight[rowIndex] - extraHeight; + } + + organization.height += extraHeight; + + // Insert node + organization.rows[rowIndex].push(node); +}; + +//Scans the rows of an organization and returns the one with the min width +CoSELayout.prototype.getShortestRowIndex = function (organization) { + var r = -1; + var min = Number.MAX_VALUE; + + for (var i = 0; i < organization.rows.length; i++) { + if (organization.rowWidth[i] < min) { + r = i; + min = organization.rowWidth[i]; + } + } + return r; +}; + +//Scans the rows of an organization and returns the one with the max width +CoSELayout.prototype.getLongestRowIndex = function (organization) { + var r = -1; + var max = Number.MIN_VALUE; + + for (var i = 0; i < organization.rows.length; i++) { + + if (organization.rowWidth[i] > max) { + r = i; + max = organization.rowWidth[i]; + } + } + + return r; +}; + +/** +* This method checks whether adding extra width to the organization violates +* the aspect ratio(1) or not. +*/ +CoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) { + + var sri = this.getShortestRowIndex(organization); + + if (sri < 0) { + return true; + } + + var min = organization.rowWidth[sri]; + + if (min + organization.horizontalPadding + extraWidth <= organization.width) return true; + + var hDiff = 0; + + // Adding to an existing row + if (organization.rowHeight[sri] < extraHeight) { + if (sri > 0) hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri]; + } + + var add_to_row_ratio; + if (organization.width - min >= extraWidth + organization.horizontalPadding) { + add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding); + } else { + add_to_row_ratio = (organization.height + hDiff) / organization.width; + } + + // Adding a new row for this node + hDiff = extraHeight + organization.verticalPadding; + var add_new_row_ratio; + if (organization.width < extraWidth) { + add_new_row_ratio = (organization.height + hDiff) / extraWidth; + } else { + add_new_row_ratio = (organization.height + hDiff) / organization.width; + } + + if (add_new_row_ratio < 1) add_new_row_ratio = 1 / add_new_row_ratio; + + if (add_to_row_ratio < 1) add_to_row_ratio = 1 / add_to_row_ratio; + + return add_to_row_ratio < add_new_row_ratio; +}; + +//If moving the last node from the longest row and adding it to the last +//row makes the bounding box smaller, do it. +CoSELayout.prototype.shiftToLastRow = function (organization) { + var longest = this.getLongestRowIndex(organization); + var last = organization.rowWidth.length - 1; + var row = organization.rows[longest]; + var node = row[row.length - 1]; + + var diff = node.width + organization.horizontalPadding; + + // Check if there is enough space on the last row + if (organization.width - organization.rowWidth[last] > diff && longest != last) { + // Remove the last element of the longest row + row.splice(-1, 1); + + // Push it to the last row + organization.rows[last].push(node); + + organization.rowWidth[longest] = organization.rowWidth[longest] - diff; + organization.rowWidth[last] = organization.rowWidth[last] + diff; + organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)]; + + // Update heights of the organization + var maxHeight = Number.MIN_VALUE; + for (var i = 0; i < row.length; i++) { + if (row[i].height > maxHeight) maxHeight = row[i].height; + } + if (longest > 0) maxHeight += organization.verticalPadding; + + var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last]; + + organization.rowHeight[longest] = maxHeight; + if (organization.rowHeight[last] < node.height + organization.verticalPadding) organization.rowHeight[last] = node.height + organization.verticalPadding; + + var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last]; + organization.height += finalTotal - prevTotal; + + this.shiftToLastRow(organization); + } +}; + +CoSELayout.prototype.tilingPreLayout = function () { + if (CoSEConstants.TILE) { + // Find zero degree nodes and create a compound for each level + this.groupZeroDegreeMembers(); + // Tile and clear children of each compound + this.clearCompounds(); + // Separately tile and clear zero degree nodes for each level + this.clearZeroDegreeMembers(); + } +}; + +CoSELayout.prototype.tilingPostLayout = function () { + if (CoSEConstants.TILE) { + this.repopulateZeroDegreeMembers(); + this.repopulateCompounds(); + } +}; + +// ----------------------------------------------------------------------------- +// Section: Tree Reduction methods +// ----------------------------------------------------------------------------- +// Reduce trees +CoSELayout.prototype.reduceTrees = function () { + var prunedNodesAll = []; + var containsLeaf = true; + var node; + + while (containsLeaf) { + var allNodes = this.graphManager.getAllNodes(); + var prunedNodesInStepTemp = []; + containsLeaf = false; + + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) { + prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]); + containsLeaf = true; + } + } + if (containsLeaf == true) { + var prunedNodesInStep = []; + for (var j = 0; j < prunedNodesInStepTemp.length; j++) { + if (prunedNodesInStepTemp[j][0].getEdges().length == 1) { + prunedNodesInStep.push(prunedNodesInStepTemp[j]); + prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]); + } + } + prunedNodesAll.push(prunedNodesInStep); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); + } + } + this.prunedNodesAll = prunedNodesAll; +}; + +// Grow tree one step +CoSELayout.prototype.growTree = function (prunedNodesAll) { + var lengthOfPrunedNodesInStep = prunedNodesAll.length; + var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1]; + + var nodeData; + for (var i = 0; i < prunedNodesInStep.length; i++) { + nodeData = prunedNodesInStep[i]; + + this.findPlaceforPrunedNode(nodeData); + + nodeData[2].add(nodeData[0]); + nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target); + } + + prunedNodesAll.splice(prunedNodesAll.length - 1, 1); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); +}; + +// Find an appropriate position to replace pruned node, this method can be improved +CoSELayout.prototype.findPlaceforPrunedNode = function (nodeData) { + + var gridForPrunedNode; + var nodeToConnect; + var prunedNode = nodeData[0]; + if (prunedNode == nodeData[1].source) { + nodeToConnect = nodeData[1].target; + } else { + nodeToConnect = nodeData[1].source; + } + var startGridX = nodeToConnect.startX; + var finishGridX = nodeToConnect.finishX; + var startGridY = nodeToConnect.startY; + var finishGridY = nodeToConnect.finishY; + + var upNodeCount = 0; + var downNodeCount = 0; + var rightNodeCount = 0; + var leftNodeCount = 0; + var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount]; + + if (startGridY > 0) { + for (var i = startGridX; i <= finishGridX; i++) { + controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1; + } + } + if (finishGridX < this.grid.length - 1) { + for (var i = startGridY; i <= finishGridY; i++) { + controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1; + } + } + if (finishGridY < this.grid[0].length - 1) { + for (var i = startGridX; i <= finishGridX; i++) { + controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1; + } + } + if (startGridX > 0) { + for (var i = startGridY; i <= finishGridY; i++) { + controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1; + } + } + var min = Integer.MAX_VALUE; + var minCount; + var minIndex; + for (var j = 0; j < controlRegions.length; j++) { + if (controlRegions[j] < min) { + min = controlRegions[j]; + minCount = 1; + minIndex = j; + } else if (controlRegions[j] == min) { + minCount++; + } + } + + if (minCount == 3 && min == 0) { + if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) { + gridForPrunedNode = 1; + } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 0; + } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 3; + } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 2; + } + } else if (minCount == 2 && min == 0) { + var random = Math.floor(Math.random() * 2); + if (controlRegions[0] == 0 && controlRegions[1] == 0) { + ; + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 1; + } + } else if (controlRegions[0] == 0 && controlRegions[2] == 0) { + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 2; + } + } else if (controlRegions[0] == 0 && controlRegions[3] == 0) { + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 3; + } + } else if (controlRegions[1] == 0 && controlRegions[2] == 0) { + if (random == 0) { + gridForPrunedNode = 1; + } else { + gridForPrunedNode = 2; + } + } else if (controlRegions[1] == 0 && controlRegions[3] == 0) { + if (random == 0) { + gridForPrunedNode = 1; + } else { + gridForPrunedNode = 3; + } + } else { + if (random == 0) { + gridForPrunedNode = 2; + } else { + gridForPrunedNode = 3; + } + } + } else if (minCount == 4 && min == 0) { + var random = Math.floor(Math.random() * 4); + gridForPrunedNode = random; + } else { + gridForPrunedNode = minIndex; + } + + if (gridForPrunedNode == 0) { + prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2); + } else if (gridForPrunedNode == 1) { + prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); + } else if (gridForPrunedNode == 2) { + prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2); + } else { + prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); + } +}; + +module.exports = CoSELayout; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __nested_webpack_require_45620__) { + +"use strict"; + + +var coseBase = {}; + +coseBase.layoutBase = __nested_webpack_require_45620__(0); +coseBase.CoSEConstants = __nested_webpack_require_45620__(1); +coseBase.CoSEEdge = __nested_webpack_require_45620__(2); +coseBase.CoSEGraph = __nested_webpack_require_45620__(3); +coseBase.CoSEGraphManager = __nested_webpack_require_45620__(4); +coseBase.CoSELayout = __nested_webpack_require_45620__(6); +coseBase.CoSENode = __nested_webpack_require_45620__(5); + +module.exports = coseBase; + +/***/ }) +/******/ ]); +}); + +/***/ }), + +/***/ 3457: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +(function webpackUniversalModuleDefinition(root, factory) { + if(true) + module.exports = factory(__webpack_require__(7799)); + else {} +})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __nested_webpack_require_659__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_659__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __nested_webpack_require_659__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __nested_webpack_require_659__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __nested_webpack_require_659__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __nested_webpack_require_659__.d = function(exports, name, getter) { +/******/ if(!__nested_webpack_require_659__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nested_webpack_require_659__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __nested_webpack_require_659__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __nested_webpack_require_659__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __nested_webpack_require_659__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __nested_webpack_require_659__(__nested_webpack_require_659__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_0__; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __nested_webpack_require_3201__) { + +"use strict"; + + +var LayoutConstants = __nested_webpack_require_3201__(0).layoutBase.LayoutConstants; +var FDLayoutConstants = __nested_webpack_require_3201__(0).layoutBase.FDLayoutConstants; +var CoSEConstants = __nested_webpack_require_3201__(0).CoSEConstants; +var CoSELayout = __nested_webpack_require_3201__(0).CoSELayout; +var CoSENode = __nested_webpack_require_3201__(0).CoSENode; +var PointD = __nested_webpack_require_3201__(0).layoutBase.PointD; +var DimensionD = __nested_webpack_require_3201__(0).layoutBase.DimensionD; + +var defaults = { + // Called on `layoutready` + ready: function ready() {}, + // Called on `layoutstop` + stop: function stop() {}, + // 'draft', 'default' or 'proof" + // - 'draft' fast cooling rate + // - 'default' moderate cooling rate + // - "proof" slow cooling rate + quality: 'default', + // include labels in node dimensions + nodeDimensionsIncludeLabels: false, + // number of ticks per frame; higher is faster but more jerky + refresh: 30, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 10, + // Whether to enable incremental mode + randomize: true, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: 4500, + // Ideal edge (non nested) length + idealEdgeLength: 50, + // Divisor to compute edge forces + edgeElasticity: 0.45, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 0.1, + // Gravity force (constant) + gravity: 0.25, + // Maximum number of iterations to perform + numIter: 2500, + // For enabling tiling + tile: true, + // Type of layout animation. The option set is {'during', 'end', false} + animate: 'end', + // Duration for animate:end + animationDuration: 500, + // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingVertical: 10, + // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingHorizontal: 10, + // Gravity range (constant) for compounds + gravityRangeCompound: 1.5, + // Gravity force (constant) for compounds + gravityCompound: 1.0, + // Gravity range (constant) + gravityRange: 3.8, + // Initial cooling factor for incremental layout + initialEnergyOnIncremental: 0.5 +}; + +function extend(defaults, options) { + var obj = {}; + + for (var i in defaults) { + obj[i] = defaults[i]; + } + + for (var i in options) { + obj[i] = options[i]; + } + + return obj; +}; + +function _CoSELayout(_options) { + this.options = extend(defaults, _options); + getUserOptions(this.options); +} + +var getUserOptions = function getUserOptions(options) { + if (options.nodeRepulsion != null) CoSEConstants.DEFAULT_REPULSION_STRENGTH = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = options.nodeRepulsion; + if (options.idealEdgeLength != null) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength; + if (options.edgeElasticity != null) CoSEConstants.DEFAULT_SPRING_STRENGTH = FDLayoutConstants.DEFAULT_SPRING_STRENGTH = options.edgeElasticity; + if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor; + if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity; + if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter; + if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange; + if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound; + if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound; + if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental; + + if (options.quality == 'draft') LayoutConstants.QUALITY = 0;else if (options.quality == 'proof') LayoutConstants.QUALITY = 2;else LayoutConstants.QUALITY = 1; + + CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels; + CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize; + CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate; + CoSEConstants.TILE = options.tile; + CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical; + CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal; +}; + +_CoSELayout.prototype.run = function () { + var ready; + var frameId; + var options = this.options; + var idToLNode = this.idToLNode = {}; + var layout = this.layout = new CoSELayout(); + var self = this; + + self.stopped = false; + + this.cy = this.options.cy; + + this.cy.trigger({ type: 'layoutstart', layout: this }); + + var gm = layout.newGraphManager(); + this.gm = gm; + + var nodes = this.options.eles.nodes(); + var edges = this.options.eles.edges(); + + this.root = gm.addRoot(); + this.processChildrenList(this.root, this.getTopMostNodes(nodes), layout); + + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var sourceNode = this.idToLNode[edge.data("source")]; + var targetNode = this.idToLNode[edge.data("target")]; + if (sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) { + var e1 = gm.add(layout.newEdge(), sourceNode, targetNode); + e1.id = edge.id(); + } + } + + var getPositions = function getPositions(ele, i) { + if (typeof ele === "number") { + ele = i; + } + var theId = ele.data('id'); + var lNode = self.idToLNode[theId]; + + return { + x: lNode.getRect().getCenterX(), + y: lNode.getRect().getCenterY() + }; + }; + + /* + * Reposition nodes in iterations animatedly + */ + var iterateAnimated = function iterateAnimated() { + // Thigs to perform after nodes are repositioned on screen + var afterReposition = function afterReposition() { + if (options.fit) { + options.cy.fit(options.eles, options.padding); + } + + if (!ready) { + ready = true; + self.cy.one('layoutready', options.ready); + self.cy.trigger({ type: 'layoutready', layout: self }); + } + }; + + var ticksPerFrame = self.options.refresh; + var isDone; + + for (var i = 0; i < ticksPerFrame && !isDone; i++) { + isDone = self.stopped || self.layout.tick(); + } + + // If layout is done + if (isDone) { + // If the layout is not a sublayout and it is successful perform post layout. + if (layout.checkLayoutSuccess() && !layout.isSubLayout) { + layout.doPostLayout(); + } + + // If layout has a tilingPostLayout function property call it. + if (layout.tilingPostLayout) { + layout.tilingPostLayout(); + } + + layout.isLayoutFinished = true; + + self.options.eles.nodes().positions(getPositions); + + afterReposition(); + + // trigger layoutstop when the layout stops (e.g. finishes) + self.cy.one('layoutstop', self.options.stop); + self.cy.trigger({ type: 'layoutstop', layout: self }); + + if (frameId) { + cancelAnimationFrame(frameId); + } + + ready = false; + return; + } + + var animationData = self.layout.getPositionsData(); // Get positions of layout nodes note that all nodes may not be layout nodes because of tiling + + // Position nodes, for the nodes whose id does not included in data (because they are removed from their parents and included in dummy compounds) + // use position of their ancestors or dummy ancestors + options.eles.nodes().positions(function (ele, i) { + if (typeof ele === "number") { + ele = i; + } + // If ele is a compound node, then its position will be defined by its children + if (!ele.isParent()) { + var theId = ele.id(); + var pNode = animationData[theId]; + var temp = ele; + // If pNode is undefined search until finding position data of its first ancestor (It may be dummy as well) + while (pNode == null) { + pNode = animationData[temp.data('parent')] || animationData['DummyCompound_' + temp.data('parent')]; + animationData[theId] = pNode; + temp = temp.parent()[0]; + if (temp == undefined) { + break; + } + } + if (pNode != null) { + return { + x: pNode.x, + y: pNode.y + }; + } else { + return { + x: ele.position('x'), + y: ele.position('y') + }; + } + } + }); + + afterReposition(); + + frameId = requestAnimationFrame(iterateAnimated); + }; + + /* + * Listen 'layoutstarted' event and start animated iteration if animate option is 'during' + */ + layout.addListener('layoutstarted', function () { + if (self.options.animate === 'during') { + frameId = requestAnimationFrame(iterateAnimated); + } + }); + + layout.runLayout(); // Run cose layout + + /* + * If animate option is not 'during' ('end' or false) perform these here (If it is 'during' similar things are already performed) + */ + if (this.options.animate !== "during") { + self.options.eles.nodes().not(":parent").layoutPositions(self, self.options, getPositions); // Use layout positions to reposition the nodes it considers the options parameter + ready = false; + } + + return this; // chaining +}; + +//Get the top most ones of a list of nodes +_CoSELayout.prototype.getTopMostNodes = function (nodes) { + var nodesMap = {}; + for (var i = 0; i < nodes.length; i++) { + nodesMap[nodes[i].id()] = true; + } + var roots = nodes.filter(function (ele, i) { + if (typeof ele === "number") { + ele = i; + } + var parent = ele.parent()[0]; + while (parent != null) { + if (nodesMap[parent.id()]) { + return false; + } + parent = parent.parent()[0]; + } + return true; + }); + + return roots; +}; + +_CoSELayout.prototype.processChildrenList = function (parent, children, layout) { + var size = children.length; + for (var i = 0; i < size; i++) { + var theChild = children[i]; + var children_of_children = theChild.children(); + var theNode; + + var dimensions = theChild.layoutDimensions({ + nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels + }); + + if (theChild.outerWidth() != null && theChild.outerHeight() != null) { + theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } else { + theNode = parent.add(new CoSENode(this.graphManager)); + } + // Attach id to the layout node + theNode.id = theChild.data("id"); + // Attach the paddings of cy node to layout node + theNode.paddingLeft = parseInt(theChild.css('padding')); + theNode.paddingTop = parseInt(theChild.css('padding')); + theNode.paddingRight = parseInt(theChild.css('padding')); + theNode.paddingBottom = parseInt(theChild.css('padding')); + + //Attach the label properties to compound if labels will be included in node dimensions + if (this.options.nodeDimensionsIncludeLabels) { + if (theChild.isParent()) { + var labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false }).w; + var labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false }).h; + var labelPos = theChild.css("text-halign"); + theNode.labelWidth = labelWidth; + theNode.labelHeight = labelHeight; + theNode.labelPos = labelPos; + } + } + + // Map the layout node + this.idToLNode[theChild.data("id")] = theNode; + + if (isNaN(theNode.rect.x)) { + theNode.rect.x = 0; + } + + if (isNaN(theNode.rect.y)) { + theNode.rect.y = 0; + } + + if (children_of_children != null && children_of_children.length > 0) { + var theNewGraph; + theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode); + this.processChildrenList(theNewGraph, children_of_children, layout); + } + } +}; + +/** + * @brief : called on continuous layouts to stop them before they finish + */ +_CoSELayout.prototype.stop = function () { + this.stopped = true; + + return this; // chaining +}; + +var register = function register(cytoscape) { + // var Layout = getLayout( cytoscape ); + + cytoscape('layout', 'cose-bilkent', _CoSELayout); +}; + +// auto reg for globals +if (typeof cytoscape !== 'undefined') { + register(cytoscape); +} + +module.exports = register; + +/***/ }) +/******/ ]); +}); + +/***/ }), + +/***/ 4726: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; +/** + * Copyright (c) 2016-2023, The Cytoscape Consortium. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the “Software”), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + + +var debounce = __webpack_require__(8221); +var Heap = __webpack_require__(5731); +var get = __webpack_require__(8156); +var set = __webpack_require__(3560); +var toPath = __webpack_require__(2072); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce); +var Heap__default = /*#__PURE__*/_interopDefaultLegacy(Heap); +var get__default = /*#__PURE__*/_interopDefaultLegacy(get); +var set__default = /*#__PURE__*/_interopDefaultLegacy(set); +var toPath__default = /*#__PURE__*/_interopDefaultLegacy(toPath); + +function _typeof(obj) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); +} +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { + writable: false + }); + return Constructor; +} +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} +function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +function _iterableToArrayLimit(arr, i) { + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + if (_i == null) return; + var _arr = []; + var _n = true; + var _d = false; + var _s, _e; + try { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +var _window = typeof window === 'undefined' ? null : window; // eslint-disable-line no-undef + +var navigator = _window ? _window.navigator : null; +_window ? _window.document : null; +var typeofstr = _typeof(''); +var typeofobj = _typeof({}); +var typeoffn = _typeof(function () {}); +var typeofhtmlele = typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement); +var instanceStr = function instanceStr(obj) { + return obj && obj.instanceString && fn$6(obj.instanceString) ? obj.instanceString() : null; +}; + +var string = function string(obj) { + return obj != null && _typeof(obj) == typeofstr; +}; +var fn$6 = function fn(obj) { + return obj != null && _typeof(obj) === typeoffn; +}; +var array = function array(obj) { + return !elementOrCollection(obj) && (Array.isArray ? Array.isArray(obj) : obj != null && obj instanceof Array); +}; +var plainObject = function plainObject(obj) { + return obj != null && _typeof(obj) === typeofobj && !array(obj) && obj.constructor === Object; +}; +var object = function object(obj) { + return obj != null && _typeof(obj) === typeofobj; +}; +var number$1 = function number(obj) { + return obj != null && _typeof(obj) === _typeof(1) && !isNaN(obj); +}; +var integer = function integer(obj) { + return number$1(obj) && Math.floor(obj) === obj; +}; +var htmlElement = function htmlElement(obj) { + if ('undefined' === typeofhtmlele) { + return undefined; + } else { + return null != obj && obj instanceof HTMLElement; + } +}; +var elementOrCollection = function elementOrCollection(obj) { + return element(obj) || collection(obj); +}; +var element = function element(obj) { + return instanceStr(obj) === 'collection' && obj._private.single; +}; +var collection = function collection(obj) { + return instanceStr(obj) === 'collection' && !obj._private.single; +}; +var core = function core(obj) { + return instanceStr(obj) === 'core'; +}; +var stylesheet = function stylesheet(obj) { + return instanceStr(obj) === 'stylesheet'; +}; +var event = function event(obj) { + return instanceStr(obj) === 'event'; +}; +var emptyString = function emptyString(obj) { + if (obj === undefined || obj === null) { + // null is empty + return true; + } else if (obj === '' || obj.match(/^\s+$/)) { + return true; // empty string is empty + } + + return false; // otherwise, we don't know what we've got +}; +var domElement = function domElement(obj) { + if (typeof HTMLElement === 'undefined') { + return false; // we're not in a browser so it doesn't matter + } else { + return obj instanceof HTMLElement; + } +}; +var boundingBox = function boundingBox(obj) { + return plainObject(obj) && number$1(obj.x1) && number$1(obj.x2) && number$1(obj.y1) && number$1(obj.y2); +}; +var promise = function promise(obj) { + return object(obj) && fn$6(obj.then); +}; +var ms = function ms() { + return navigator && navigator.userAgent.match(/msie|trident|edge/i); +}; // probably a better way to detect this... + +var memoize = function memoize(fn, keyFn) { + if (!keyFn) { + keyFn = function keyFn() { + if (arguments.length === 1) { + return arguments[0]; + } else if (arguments.length === 0) { + return 'undefined'; + } + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + return args.join('$'); + }; + } + var memoizedFn = function memoizedFn() { + var self = this; + var args = arguments; + var ret; + var k = keyFn.apply(self, args); + var cache = memoizedFn.cache; + if (!(ret = cache[k])) { + ret = cache[k] = fn.apply(self, args); + } + return ret; + }; + memoizedFn.cache = {}; + return memoizedFn; +}; + +var camel2dash = memoize(function (str) { + return str.replace(/([A-Z])/g, function (v) { + return '-' + v.toLowerCase(); + }); +}); +var dash2camel = memoize(function (str) { + return str.replace(/(-\w)/g, function (v) { + return v[1].toUpperCase(); + }); +}); +var prependCamel = memoize(function (prefix, str) { + return prefix + str[0].toUpperCase() + str.substring(1); +}, function (prefix, str) { + return prefix + '$' + str; +}); +var capitalize = function capitalize(str) { + if (emptyString(str)) { + return str; + } + return str.charAt(0).toUpperCase() + str.substring(1); +}; + +var number = '(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))'; +var rgba = 'rgb[a]?\\((' + number + '[%]?)\\s*,\\s*(' + number + '[%]?)\\s*,\\s*(' + number + '[%]?)(?:\\s*,\\s*(' + number + '))?\\)'; +var rgbaNoBackRefs = 'rgb[a]?\\((?:' + number + '[%]?)\\s*,\\s*(?:' + number + '[%]?)\\s*,\\s*(?:' + number + '[%]?)(?:\\s*,\\s*(?:' + number + '))?\\)'; +var hsla = 'hsl[a]?\\((' + number + ')\\s*,\\s*(' + number + '[%])\\s*,\\s*(' + number + '[%])(?:\\s*,\\s*(' + number + '))?\\)'; +var hslaNoBackRefs = 'hsl[a]?\\((?:' + number + ')\\s*,\\s*(?:' + number + '[%])\\s*,\\s*(?:' + number + '[%])(?:\\s*,\\s*(?:' + number + '))?\\)'; +var hex3 = '\\#[0-9a-fA-F]{3}'; +var hex6 = '\\#[0-9a-fA-F]{6}'; + +var ascending = function ascending(a, b) { + if (a < b) { + return -1; + } else if (a > b) { + return 1; + } else { + return 0; + } +}; +var descending = function descending(a, b) { + return -1 * ascending(a, b); +}; + +var extend = Object.assign != null ? Object.assign.bind(Object) : function (tgt) { + var args = arguments; + for (var i = 1; i < args.length; i++) { + var obj = args[i]; + if (obj == null) { + continue; + } + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; j++) { + var k = keys[j]; + tgt[k] = obj[k]; + } + } + return tgt; +}; + +// get [r, g, b] from #abc or #aabbcc +var hex2tuple = function hex2tuple(hex) { + if (!(hex.length === 4 || hex.length === 7) || hex[0] !== '#') { + return; + } + var shortHex = hex.length === 4; + var r, g, b; + var base = 16; + if (shortHex) { + r = parseInt(hex[1] + hex[1], base); + g = parseInt(hex[2] + hex[2], base); + b = parseInt(hex[3] + hex[3], base); + } else { + r = parseInt(hex[1] + hex[2], base); + g = parseInt(hex[3] + hex[4], base); + b = parseInt(hex[5] + hex[6], base); + } + return [r, g, b]; +}; + +// get [r, g, b, a] from hsl(0, 0, 0) or hsla(0, 0, 0, 0) +var hsl2tuple = function hsl2tuple(hsl) { + var ret; + var h, s, l, a, r, g, b; + function hue2rgb(p, q, t) { + if (t < 0) t += 1; + if (t > 1) t -= 1; + if (t < 1 / 6) return p + (q - p) * 6 * t; + if (t < 1 / 2) return q; + if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; + return p; + } + var m = new RegExp('^' + hsla + '$').exec(hsl); + if (m) { + // get hue + h = parseInt(m[1]); + if (h < 0) { + h = (360 - -1 * h % 360) % 360; + } else if (h > 360) { + h = h % 360; + } + h /= 360; // normalise on [0, 1] + + s = parseFloat(m[2]); + if (s < 0 || s > 100) { + return; + } // saturation is [0, 100] + s = s / 100; // normalise on [0, 1] + + l = parseFloat(m[3]); + if (l < 0 || l > 100) { + return; + } // lightness is [0, 100] + l = l / 100; // normalise on [0, 1] + + a = m[4]; + if (a !== undefined) { + a = parseFloat(a); + if (a < 0 || a > 1) { + return; + } // alpha is [0, 1] + } + + // now, convert to rgb + // code from http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript + if (s === 0) { + r = g = b = Math.round(l * 255); // achromatic + } else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = Math.round(255 * hue2rgb(p, q, h + 1 / 3)); + g = Math.round(255 * hue2rgb(p, q, h)); + b = Math.round(255 * hue2rgb(p, q, h - 1 / 3)); + } + ret = [r, g, b, a]; + } + return ret; +}; + +// get [r, g, b, a] from rgb(0, 0, 0) or rgba(0, 0, 0, 0) +var rgb2tuple = function rgb2tuple(rgb) { + var ret; + var m = new RegExp('^' + rgba + '$').exec(rgb); + if (m) { + ret = []; + var isPct = []; + for (var i = 1; i <= 3; i++) { + var channel = m[i]; + if (channel[channel.length - 1] === '%') { + isPct[i] = true; + } + channel = parseFloat(channel); + if (isPct[i]) { + channel = channel / 100 * 255; // normalise to [0, 255] + } + + if (channel < 0 || channel > 255) { + return; + } // invalid channel value + + ret.push(Math.floor(channel)); + } + var atLeastOneIsPct = isPct[1] || isPct[2] || isPct[3]; + var allArePct = isPct[1] && isPct[2] && isPct[3]; + if (atLeastOneIsPct && !allArePct) { + return; + } // must all be percent values if one is + + var alpha = m[4]; + if (alpha !== undefined) { + alpha = parseFloat(alpha); + if (alpha < 0 || alpha > 1) { + return; + } // invalid alpha value + + ret.push(alpha); + } + } + return ret; +}; +var colorname2tuple = function colorname2tuple(color) { + return colors[color.toLowerCase()]; +}; +var color2tuple = function color2tuple(color) { + return (array(color) ? color : null) || colorname2tuple(color) || hex2tuple(color) || rgb2tuple(color) || hsl2tuple(color); +}; +var colors = { + // special colour names + transparent: [0, 0, 0, 0], + // NB alpha === 0 + + // regular colours + aliceblue: [240, 248, 255], + antiquewhite: [250, 235, 215], + aqua: [0, 255, 255], + aquamarine: [127, 255, 212], + azure: [240, 255, 255], + beige: [245, 245, 220], + bisque: [255, 228, 196], + black: [0, 0, 0], + blanchedalmond: [255, 235, 205], + blue: [0, 0, 255], + blueviolet: [138, 43, 226], + brown: [165, 42, 42], + burlywood: [222, 184, 135], + cadetblue: [95, 158, 160], + chartreuse: [127, 255, 0], + chocolate: [210, 105, 30], + coral: [255, 127, 80], + cornflowerblue: [100, 149, 237], + cornsilk: [255, 248, 220], + crimson: [220, 20, 60], + cyan: [0, 255, 255], + darkblue: [0, 0, 139], + darkcyan: [0, 139, 139], + darkgoldenrod: [184, 134, 11], + darkgray: [169, 169, 169], + darkgreen: [0, 100, 0], + darkgrey: [169, 169, 169], + darkkhaki: [189, 183, 107], + darkmagenta: [139, 0, 139], + darkolivegreen: [85, 107, 47], + darkorange: [255, 140, 0], + darkorchid: [153, 50, 204], + darkred: [139, 0, 0], + darksalmon: [233, 150, 122], + darkseagreen: [143, 188, 143], + darkslateblue: [72, 61, 139], + darkslategray: [47, 79, 79], + darkslategrey: [47, 79, 79], + darkturquoise: [0, 206, 209], + darkviolet: [148, 0, 211], + deeppink: [255, 20, 147], + deepskyblue: [0, 191, 255], + dimgray: [105, 105, 105], + dimgrey: [105, 105, 105], + dodgerblue: [30, 144, 255], + firebrick: [178, 34, 34], + floralwhite: [255, 250, 240], + forestgreen: [34, 139, 34], + fuchsia: [255, 0, 255], + gainsboro: [220, 220, 220], + ghostwhite: [248, 248, 255], + gold: [255, 215, 0], + goldenrod: [218, 165, 32], + gray: [128, 128, 128], + grey: [128, 128, 128], + green: [0, 128, 0], + greenyellow: [173, 255, 47], + honeydew: [240, 255, 240], + hotpink: [255, 105, 180], + indianred: [205, 92, 92], + indigo: [75, 0, 130], + ivory: [255, 255, 240], + khaki: [240, 230, 140], + lavender: [230, 230, 250], + lavenderblush: [255, 240, 245], + lawngreen: [124, 252, 0], + lemonchiffon: [255, 250, 205], + lightblue: [173, 216, 230], + lightcoral: [240, 128, 128], + lightcyan: [224, 255, 255], + lightgoldenrodyellow: [250, 250, 210], + lightgray: [211, 211, 211], + lightgreen: [144, 238, 144], + lightgrey: [211, 211, 211], + lightpink: [255, 182, 193], + lightsalmon: [255, 160, 122], + lightseagreen: [32, 178, 170], + lightskyblue: [135, 206, 250], + lightslategray: [119, 136, 153], + lightslategrey: [119, 136, 153], + lightsteelblue: [176, 196, 222], + lightyellow: [255, 255, 224], + lime: [0, 255, 0], + limegreen: [50, 205, 50], + linen: [250, 240, 230], + magenta: [255, 0, 255], + maroon: [128, 0, 0], + mediumaquamarine: [102, 205, 170], + mediumblue: [0, 0, 205], + mediumorchid: [186, 85, 211], + mediumpurple: [147, 112, 219], + mediumseagreen: [60, 179, 113], + mediumslateblue: [123, 104, 238], + mediumspringgreen: [0, 250, 154], + mediumturquoise: [72, 209, 204], + mediumvioletred: [199, 21, 133], + midnightblue: [25, 25, 112], + mintcream: [245, 255, 250], + mistyrose: [255, 228, 225], + moccasin: [255, 228, 181], + navajowhite: [255, 222, 173], + navy: [0, 0, 128], + oldlace: [253, 245, 230], + olive: [128, 128, 0], + olivedrab: [107, 142, 35], + orange: [255, 165, 0], + orangered: [255, 69, 0], + orchid: [218, 112, 214], + palegoldenrod: [238, 232, 170], + palegreen: [152, 251, 152], + paleturquoise: [175, 238, 238], + palevioletred: [219, 112, 147], + papayawhip: [255, 239, 213], + peachpuff: [255, 218, 185], + peru: [205, 133, 63], + pink: [255, 192, 203], + plum: [221, 160, 221], + powderblue: [176, 224, 230], + purple: [128, 0, 128], + red: [255, 0, 0], + rosybrown: [188, 143, 143], + royalblue: [65, 105, 225], + saddlebrown: [139, 69, 19], + salmon: [250, 128, 114], + sandybrown: [244, 164, 96], + seagreen: [46, 139, 87], + seashell: [255, 245, 238], + sienna: [160, 82, 45], + silver: [192, 192, 192], + skyblue: [135, 206, 235], + slateblue: [106, 90, 205], + slategray: [112, 128, 144], + slategrey: [112, 128, 144], + snow: [255, 250, 250], + springgreen: [0, 255, 127], + steelblue: [70, 130, 180], + tan: [210, 180, 140], + teal: [0, 128, 128], + thistle: [216, 191, 216], + tomato: [255, 99, 71], + turquoise: [64, 224, 208], + violet: [238, 130, 238], + wheat: [245, 222, 179], + white: [255, 255, 255], + whitesmoke: [245, 245, 245], + yellow: [255, 255, 0], + yellowgreen: [154, 205, 50] +}; + +// sets the value in a map (map may not be built) +var setMap = function setMap(options) { + var obj = options.map; + var keys = options.keys; + var l = keys.length; + for (var i = 0; i < l; i++) { + var key = keys[i]; + if (plainObject(key)) { + throw Error('Tried to set map with object key'); + } + if (i < keys.length - 1) { + // extend the map if necessary + if (obj[key] == null) { + obj[key] = {}; + } + obj = obj[key]; + } else { + // set the value + obj[key] = options.value; + } + } +}; + +// gets the value in a map even if it's not built in places +var getMap = function getMap(options) { + var obj = options.map; + var keys = options.keys; + var l = keys.length; + for (var i = 0; i < l; i++) { + var key = keys[i]; + if (plainObject(key)) { + throw Error('Tried to get map with object key'); + } + obj = obj[key]; + if (obj == null) { + return obj; + } + } + return obj; +}; + +var performance = _window ? _window.performance : null; +var pnow = performance && performance.now ? function () { + return performance.now(); +} : function () { + return Date.now(); +}; +var raf = function () { + if (_window) { + if (_window.requestAnimationFrame) { + return function (fn) { + _window.requestAnimationFrame(fn); + }; + } else if (_window.mozRequestAnimationFrame) { + return function (fn) { + _window.mozRequestAnimationFrame(fn); + }; + } else if (_window.webkitRequestAnimationFrame) { + return function (fn) { + _window.webkitRequestAnimationFrame(fn); + }; + } else if (_window.msRequestAnimationFrame) { + return function (fn) { + _window.msRequestAnimationFrame(fn); + }; + } + } + return function (fn) { + if (fn) { + setTimeout(function () { + fn(pnow()); + }, 1000 / 60); + } + }; +}(); +var requestAnimationFrame = function requestAnimationFrame(fn) { + return raf(fn); +}; +var performanceNow = pnow; + +var DEFAULT_HASH_SEED = 9261; +var K = 65599; // 37 also works pretty well +var DEFAULT_HASH_SEED_ALT = 5381; +var hashIterableInts = function hashIterableInts(iterator) { + var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED; + // sdbm/string-hash + var hash = seed; + var entry; + for (;;) { + entry = iterator.next(); + if (entry.done) { + break; + } + hash = hash * K + entry.value | 0; + } + return hash; +}; +var hashInt = function hashInt(num) { + var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED; + // sdbm/string-hash + return seed * K + num | 0; +}; +var hashIntAlt = function hashIntAlt(num) { + var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED_ALT; + // djb2/string-hash + return (seed << 5) + seed + num | 0; +}; +var combineHashes = function combineHashes(hash1, hash2) { + return hash1 * 0x200000 + hash2; +}; +var combineHashesArray = function combineHashesArray(hashes) { + return hashes[0] * 0x200000 + hashes[1]; +}; +var hashArrays = function hashArrays(hashes1, hashes2) { + return [hashInt(hashes1[0], hashes2[0]), hashIntAlt(hashes1[1], hashes2[1])]; +}; +var hashIntsArray = function hashIntsArray(ints, seed) { + var entry = { + value: 0, + done: false + }; + var i = 0; + var length = ints.length; + var iterator = { + next: function next() { + if (i < length) { + entry.value = ints[i++]; + } else { + entry.done = true; + } + return entry; + } + }; + return hashIterableInts(iterator, seed); +}; +var hashString = function hashString(str, seed) { + var entry = { + value: 0, + done: false + }; + var i = 0; + var length = str.length; + var iterator = { + next: function next() { + if (i < length) { + entry.value = str.charCodeAt(i++); + } else { + entry.done = true; + } + return entry; + } + }; + return hashIterableInts(iterator, seed); +}; +var hashStrings = function hashStrings() { + return hashStringsArray(arguments); +}; +var hashStringsArray = function hashStringsArray(strs) { + var hash; + for (var i = 0; i < strs.length; i++) { + var str = strs[i]; + if (i === 0) { + hash = hashString(str); + } else { + hash = hashString(str, hash); + } + } + return hash; +}; + +/*global console */ +var warningsEnabled = true; +var warnSupported = console.warn != null; // eslint-disable-line no-console +var traceSupported = console.trace != null; // eslint-disable-line no-console + +var MAX_INT$1 = Number.MAX_SAFE_INTEGER || 9007199254740991; +var trueify = function trueify() { + return true; +}; +var falsify = function falsify() { + return false; +}; +var zeroify = function zeroify() { + return 0; +}; +var noop$1 = function noop() {}; +var error = function error(msg) { + throw new Error(msg); +}; +var warnings = function warnings(enabled) { + if (enabled !== undefined) { + warningsEnabled = !!enabled; + } else { + return warningsEnabled; + } +}; +var warn = function warn(msg) { + /* eslint-disable no-console */ + if (!warnings()) { + return; + } + if (warnSupported) { + console.warn(msg); + } else { + console.log(msg); + if (traceSupported) { + console.trace(); + } + } +}; /* eslint-enable */ + +var clone = function clone(obj) { + return extend({}, obj); +}; + +// gets a shallow copy of the argument +var copy = function copy(obj) { + if (obj == null) { + return obj; + } + if (array(obj)) { + return obj.slice(); + } else if (plainObject(obj)) { + return clone(obj); + } else { + return obj; + } +}; +var copyArray = function copyArray(arr) { + return arr.slice(); +}; +var uuid = function uuid(a, b /* placeholders */) { + for ( + // loop :) + b = a = ''; + // b - result , a - numeric letiable + a++ < 36; + // + b += a * 51 & 52 // if "a" is not 9 or 14 or 19 or 24 + ? + // return a random number or 4 + (a ^ 15 // if "a" is not 15 + ? + // generate a random number from 0 to 15 + 8 ^ Math.random() * (a ^ 20 ? 16 : 4) // unless "a" is 20, in which case a random number from 8 to 11 + : 4 // otherwise 4 + ).toString(16) : '-' // in other cases (if "a" is 9,14,19,24) insert "-" + ) { + } + return b; +}; +var _staticEmptyObject = {}; +var staticEmptyObject = function staticEmptyObject() { + return _staticEmptyObject; +}; +var defaults$g = function defaults(_defaults) { + var keys = Object.keys(_defaults); + return function (opts) { + var filledOpts = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var optVal = opts == null ? undefined : opts[key]; + filledOpts[key] = optVal === undefined ? _defaults[key] : optVal; + } + return filledOpts; + }; +}; +var removeFromArray = function removeFromArray(arr, ele, oneCopy) { + for (var i = arr.length - 1; i >= 0; i--) { + if (arr[i] === ele) { + arr.splice(i, 1); + if (oneCopy) { + break; + } + } + } +}; +var clearArray = function clearArray(arr) { + arr.splice(0, arr.length); +}; +var push = function push(arr, otherArr) { + for (var i = 0; i < otherArr.length; i++) { + var el = otherArr[i]; + arr.push(el); + } +}; +var getPrefixedProperty = function getPrefixedProperty(obj, propName, prefix) { + if (prefix) { + propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth + } + + return obj[propName]; +}; +var setPrefixedProperty = function setPrefixedProperty(obj, propName, prefix, value) { + if (prefix) { + propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth + } + + obj[propName] = value; +}; + +/* global Map */ +var ObjectMap = /*#__PURE__*/function () { + function ObjectMap() { + _classCallCheck(this, ObjectMap); + this._obj = {}; + } + _createClass(ObjectMap, [{ + key: "set", + value: function set(key, val) { + this._obj[key] = val; + return this; + } + }, { + key: "delete", + value: function _delete(key) { + this._obj[key] = undefined; + return this; + } + }, { + key: "clear", + value: function clear() { + this._obj = {}; + } + }, { + key: "has", + value: function has(key) { + return this._obj[key] !== undefined; + } + }, { + key: "get", + value: function get(key) { + return this._obj[key]; + } + }]); + return ObjectMap; +}(); +var Map$1 = typeof Map !== 'undefined' ? Map : ObjectMap; + +/* global Set */ + +var undef = "undefined" ; +var ObjectSet = /*#__PURE__*/function () { + function ObjectSet(arrayOrObjectSet) { + _classCallCheck(this, ObjectSet); + this._obj = Object.create(null); + this.size = 0; + if (arrayOrObjectSet != null) { + var arr; + if (arrayOrObjectSet.instanceString != null && arrayOrObjectSet.instanceString() === this.instanceString()) { + arr = arrayOrObjectSet.toArray(); + } else { + arr = arrayOrObjectSet; + } + for (var i = 0; i < arr.length; i++) { + this.add(arr[i]); + } + } + } + _createClass(ObjectSet, [{ + key: "instanceString", + value: function instanceString() { + return 'set'; + } + }, { + key: "add", + value: function add(val) { + var o = this._obj; + if (o[val] !== 1) { + o[val] = 1; + this.size++; + } + } + }, { + key: "delete", + value: function _delete(val) { + var o = this._obj; + if (o[val] === 1) { + o[val] = 0; + this.size--; + } + } + }, { + key: "clear", + value: function clear() { + this._obj = Object.create(null); + } + }, { + key: "has", + value: function has(val) { + return this._obj[val] === 1; + } + }, { + key: "toArray", + value: function toArray() { + var _this = this; + return Object.keys(this._obj).filter(function (key) { + return _this.has(key); + }); + } + }, { + key: "forEach", + value: function forEach(callback, thisArg) { + return this.toArray().forEach(callback, thisArg); + } + }]); + return ObjectSet; +}(); +var Set$1 = (typeof Set === "undefined" ? "undefined" : _typeof(Set)) !== undef ? Set : ObjectSet; + +// represents a node or an edge +var Element = function Element(cy, params) { + var restore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + if (cy === undefined || params === undefined || !core(cy)) { + error('An element must have a core reference and parameters set'); + return; + } + var group = params.group; + + // try to automatically infer the group if unspecified + if (group == null) { + if (params.data && params.data.source != null && params.data.target != null) { + group = 'edges'; + } else { + group = 'nodes'; + } + } + + // validate group + if (group !== 'nodes' && group !== 'edges') { + error('An element must be of type `nodes` or `edges`; you specified `' + group + '`'); + return; + } + + // make the element array-like, just like a collection + this.length = 1; + this[0] = this; + + // NOTE: when something is added here, add also to ele.json() + var _p = this._private = { + cy: cy, + single: true, + // indicates this is an element + data: params.data || {}, + // data object + position: params.position || { + x: 0, + y: 0 + }, + // (x, y) position pair + autoWidth: undefined, + // width and height of nodes calculated by the renderer when set to special 'auto' value + autoHeight: undefined, + autoPadding: undefined, + compoundBoundsClean: false, + // whether the compound dimensions need to be recalculated the next time dimensions are read + listeners: [], + // array of bound listeners + group: group, + // string; 'nodes' or 'edges' + style: {}, + // properties as set by the style + rstyle: {}, + // properties for style sent from the renderer to the core + styleCxts: [], + // applied style contexts from the styler + styleKeys: {}, + // per-group keys of style property values + removed: true, + // whether it's inside the vis; true if removed (set true here since we call restore) + selected: params.selected ? true : false, + // whether it's selected + selectable: params.selectable === undefined ? true : params.selectable ? true : false, + // whether it's selectable + locked: params.locked ? true : false, + // whether the element is locked (cannot be moved) + grabbed: false, + // whether the element is grabbed by the mouse; renderer sets this privately + grabbable: params.grabbable === undefined ? true : params.grabbable ? true : false, + // whether the element can be grabbed + pannable: params.pannable === undefined ? group === 'edges' ? true : false : params.pannable ? true : false, + // whether the element has passthrough panning enabled + active: false, + // whether the element is active from user interaction + classes: new Set$1(), + // map ( className => true ) + animation: { + // object for currently-running animations + current: [], + queue: [] + }, + rscratch: {}, + // object in which the renderer can store information + scratch: params.scratch || {}, + // scratch objects + edges: [], + // array of connected edges + children: [], + // array of children + parent: params.parent && params.parent.isNode() ? params.parent : null, + // parent ref + traversalCache: {}, + // cache of output of traversal functions + backgrounding: false, + // whether background images are loading + bbCache: null, + // cache of the current bounding box + bbCacheShift: { + x: 0, + y: 0 + }, + // shift applied to cached bb to be applied on next get + bodyBounds: null, + // bounds cache of element body, w/o overlay + overlayBounds: null, + // bounds cache of element body, including overlay + labelBounds: { + // bounds cache of labels + all: null, + source: null, + target: null, + main: null + }, + arrowBounds: { + // bounds cache of edge arrows + source: null, + target: null, + 'mid-source': null, + 'mid-target': null + } + }; + if (_p.position.x == null) { + _p.position.x = 0; + } + if (_p.position.y == null) { + _p.position.y = 0; + } + + // renderedPosition overrides if specified + if (params.renderedPosition) { + var rpos = params.renderedPosition; + var pan = cy.pan(); + var zoom = cy.zoom(); + _p.position = { + x: (rpos.x - pan.x) / zoom, + y: (rpos.y - pan.y) / zoom + }; + } + var classes = []; + if (array(params.classes)) { + classes = params.classes; + } else if (string(params.classes)) { + classes = params.classes.split(/\s+/); + } + for (var i = 0, l = classes.length; i < l; i++) { + var cls = classes[i]; + if (!cls || cls === '') { + continue; + } + _p.classes.add(cls); + } + this.createEmitter(); + var bypass = params.style || params.css; + if (bypass) { + warn('Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead.'); + this.style(bypass); + } + if (restore === undefined || restore) { + this.restore(); + } +}; + +var defineSearch = function defineSearch(params) { + params = { + bfs: params.bfs || !params.dfs, + dfs: params.dfs || !params.bfs + }; + + // from pseudocode on wikipedia + return function searchFn(roots, fn, directed) { + var options; + if (plainObject(roots) && !elementOrCollection(roots)) { + options = roots; + roots = options.roots || options.root; + fn = options.visit; + directed = options.directed; + } + directed = arguments.length === 2 && !fn$6(fn) ? fn : directed; + fn = fn$6(fn) ? fn : function () {}; + var cy = this._private.cy; + var v = roots = string(roots) ? this.filter(roots) : roots; + var Q = []; + var connectedNodes = []; + var connectedBy = {}; + var id2depth = {}; + var V = {}; + var j = 0; + var found; + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + + // enqueue v + for (var i = 0; i < v.length; i++) { + var vi = v[i]; + var viId = vi.id(); + if (vi.isNode()) { + Q.unshift(vi); + if (params.bfs) { + V[viId] = true; + connectedNodes.push(vi); + } + id2depth[viId] = 0; + } + } + var _loop = function _loop() { + var v = params.bfs ? Q.shift() : Q.pop(); + var vId = v.id(); + if (params.dfs) { + if (V[vId]) { + return "continue"; + } + V[vId] = true; + connectedNodes.push(v); + } + var depth = id2depth[vId]; + var prevEdge = connectedBy[vId]; + var src = prevEdge != null ? prevEdge.source() : null; + var tgt = prevEdge != null ? prevEdge.target() : null; + var prevNode = prevEdge == null ? undefined : v.same(src) ? tgt[0] : src[0]; + var ret = void 0; + ret = fn(v, prevEdge, prevNode, j++, depth); + if (ret === true) { + found = v; + return "break"; + } + if (ret === false) { + return "break"; + } + var vwEdges = v.connectedEdges().filter(function (e) { + return (!directed || e.source().same(v)) && edges.has(e); + }); + for (var _i2 = 0; _i2 < vwEdges.length; _i2++) { + var e = vwEdges[_i2]; + var w = e.connectedNodes().filter(function (n) { + return !n.same(v) && nodes.has(n); + }); + var wId = w.id(); + if (w.length !== 0 && !V[wId]) { + w = w[0]; + Q.push(w); + if (params.bfs) { + V[wId] = true; + connectedNodes.push(w); + } + connectedBy[wId] = e; + id2depth[wId] = id2depth[vId] + 1; + } + } + }; + while (Q.length !== 0) { + var _ret = _loop(); + if (_ret === "continue") continue; + if (_ret === "break") break; + } + var connectedEles = cy.collection(); + for (var _i = 0; _i < connectedNodes.length; _i++) { + var node = connectedNodes[_i]; + var edge = connectedBy[node.id()]; + if (edge != null) { + connectedEles.push(edge); + } + connectedEles.push(node); + } + return { + path: cy.collection(connectedEles), + found: cy.collection(found) + }; + }; +}; + +// search, spanning trees, etc +var elesfn$v = { + breadthFirstSearch: defineSearch({ + bfs: true + }), + depthFirstSearch: defineSearch({ + dfs: true + }) +}; + +// nice, short mathematical alias +elesfn$v.bfs = elesfn$v.breadthFirstSearch; +elesfn$v.dfs = elesfn$v.depthFirstSearch; + +var dijkstraDefaults = defaults$g({ + root: null, + weight: function weight(edge) { + return 1; + }, + directed: false +}); +var elesfn$u = { + dijkstra: function dijkstra(options) { + if (!plainObject(options)) { + var args = arguments; + options = { + root: args[0], + weight: args[1], + directed: args[2] + }; + } + var _dijkstraDefaults = dijkstraDefaults(options), + root = _dijkstraDefaults.root, + weight = _dijkstraDefaults.weight, + directed = _dijkstraDefaults.directed; + var eles = this; + var weightFn = weight; + var source = string(root) ? this.filter(root)[0] : root[0]; + var dist = {}; + var prev = {}; + var knownDist = {}; + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + edges.unmergeBy(function (ele) { + return ele.isLoop(); + }); + var getDist = function getDist(node) { + return dist[node.id()]; + }; + var setDist = function setDist(node, d) { + dist[node.id()] = d; + Q.updateItem(node); + }; + var Q = new Heap__default["default"](function (a, b) { + return getDist(a) - getDist(b); + }); + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + dist[node.id()] = node.same(source) ? 0 : Infinity; + Q.push(node); + } + var distBetween = function distBetween(u, v) { + var uvs = (directed ? u.edgesTo(v) : u.edgesWith(v)).intersect(edges); + var smallestDistance = Infinity; + var smallestEdge; + for (var _i = 0; _i < uvs.length; _i++) { + var edge = uvs[_i]; + var _weight = weightFn(edge); + if (_weight < smallestDistance || !smallestEdge) { + smallestDistance = _weight; + smallestEdge = edge; + } + } + return { + edge: smallestEdge, + dist: smallestDistance + }; + }; + while (Q.size() > 0) { + var u = Q.pop(); + var smalletsDist = getDist(u); + var uid = u.id(); + knownDist[uid] = smalletsDist; + if (smalletsDist === Infinity) { + continue; + } + var neighbors = u.neighborhood().intersect(nodes); + for (var _i2 = 0; _i2 < neighbors.length; _i2++) { + var v = neighbors[_i2]; + var vid = v.id(); + var vDist = distBetween(u, v); + var alt = smalletsDist + vDist.dist; + if (alt < getDist(v)) { + setDist(v, alt); + prev[vid] = { + node: u, + edge: vDist.edge + }; + } + } // for + } // while + + return { + distanceTo: function distanceTo(node) { + var target = string(node) ? nodes.filter(node)[0] : node[0]; + return knownDist[target.id()]; + }, + pathTo: function pathTo(node) { + var target = string(node) ? nodes.filter(node)[0] : node[0]; + var S = []; + var u = target; + var uid = u.id(); + if (target.length > 0) { + S.unshift(target); + while (prev[uid]) { + var p = prev[uid]; + S.unshift(p.edge); + S.unshift(p.node); + u = p.node; + uid = u.id(); + } + } + return eles.spawn(S); + } + }; + } +}; + +var elesfn$t = { + // kruskal's algorithm (finds min spanning tree, assuming undirected graph) + // implemented from pseudocode from wikipedia + kruskal: function kruskal(weightFn) { + weightFn = weightFn || function (edge) { + return 1; + }; + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + var numNodes = nodes.length; + var forest = new Array(numNodes); + var A = nodes; // assumes byGroup() creates new collections that can be safely mutated + + var findSetIndex = function findSetIndex(ele) { + for (var i = 0; i < forest.length; i++) { + var eles = forest[i]; + if (eles.has(ele)) { + return i; + } + } + }; + + // start with one forest per node + for (var i = 0; i < numNodes; i++) { + forest[i] = this.spawn(nodes[i]); + } + var S = edges.sort(function (a, b) { + return weightFn(a) - weightFn(b); + }); + for (var _i = 0; _i < S.length; _i++) { + var edge = S[_i]; + var u = edge.source()[0]; + var v = edge.target()[0]; + var setUIndex = findSetIndex(u); + var setVIndex = findSetIndex(v); + var setU = forest[setUIndex]; + var setV = forest[setVIndex]; + if (setUIndex !== setVIndex) { + A.merge(edge); + + // combine forests for u and v + setU.merge(setV); + forest.splice(setVIndex, 1); + } + } + return A; + } +}; + +var aStarDefaults = defaults$g({ + root: null, + goal: null, + weight: function weight(edge) { + return 1; + }, + heuristic: function heuristic(edge) { + return 0; + }, + directed: false +}); +var elesfn$s = { + // Implemented from pseudocode from wikipedia + aStar: function aStar(options) { + var cy = this.cy(); + var _aStarDefaults = aStarDefaults(options), + root = _aStarDefaults.root, + goal = _aStarDefaults.goal, + heuristic = _aStarDefaults.heuristic, + directed = _aStarDefaults.directed, + weight = _aStarDefaults.weight; + root = cy.collection(root)[0]; + goal = cy.collection(goal)[0]; + var sid = root.id(); + var tid = goal.id(); + var gScore = {}; + var fScore = {}; + var closedSetIds = {}; + var openSet = new Heap__default["default"](function (a, b) { + return fScore[a.id()] - fScore[b.id()]; + }); + var openSetIds = new Set$1(); + var cameFrom = {}; + var cameFromEdge = {}; + var addToOpenSet = function addToOpenSet(ele, id) { + openSet.push(ele); + openSetIds.add(id); + }; + var cMin, cMinId; + var popFromOpenSet = function popFromOpenSet() { + cMin = openSet.pop(); + cMinId = cMin.id(); + openSetIds["delete"](cMinId); + }; + var isInOpenSet = function isInOpenSet(id) { + return openSetIds.has(id); + }; + addToOpenSet(root, sid); + gScore[sid] = 0; + fScore[sid] = heuristic(root); + + // Counter + var steps = 0; + + // Main loop + while (openSet.size() > 0) { + popFromOpenSet(); + steps++; + + // If we've found our goal, then we are done + if (cMinId === tid) { + var path = []; + var pathNode = goal; + var pathNodeId = tid; + var pathEdge = cameFromEdge[pathNodeId]; + for (;;) { + path.unshift(pathNode); + if (pathEdge != null) { + path.unshift(pathEdge); + } + pathNode = cameFrom[pathNodeId]; + if (pathNode == null) { + break; + } + pathNodeId = pathNode.id(); + pathEdge = cameFromEdge[pathNodeId]; + } + return { + found: true, + distance: gScore[cMinId], + path: this.spawn(path), + steps: steps + }; + } + + // Add cMin to processed nodes + closedSetIds[cMinId] = true; + + // Update scores for neighbors of cMin + // Take into account if graph is directed or not + var vwEdges = cMin._private.edges; + for (var i = 0; i < vwEdges.length; i++) { + var e = vwEdges[i]; + + // edge must be in set of calling eles + if (!this.hasElementWithId(e.id())) { + continue; + } + + // cMin must be the source of edge if directed + if (directed && e.data('source') !== cMinId) { + continue; + } + var wSrc = e.source(); + var wTgt = e.target(); + var w = wSrc.id() !== cMinId ? wSrc : wTgt; + var wid = w.id(); + + // node must be in set of calling eles + if (!this.hasElementWithId(wid)) { + continue; + } + + // if node is in closedSet, ignore it + if (closedSetIds[wid]) { + continue; + } + + // New tentative score for node w + var tempScore = gScore[cMinId] + weight(e); + + // Update gScore for node w if: + // w not present in openSet + // OR + // tentative gScore is less than previous value + + // w not in openSet + if (!isInOpenSet(wid)) { + gScore[wid] = tempScore; + fScore[wid] = tempScore + heuristic(w); + addToOpenSet(w, wid); + cameFrom[wid] = cMin; + cameFromEdge[wid] = e; + continue; + } + + // w already in openSet, but with greater gScore + if (tempScore < gScore[wid]) { + gScore[wid] = tempScore; + fScore[wid] = tempScore + heuristic(w); + cameFrom[wid] = cMin; + cameFromEdge[wid] = e; + } + } // End of neighbors update + } // End of main loop + + // If we've reached here, then we've not reached our goal + return { + found: false, + distance: undefined, + path: undefined, + steps: steps + }; + } +}; // elesfn + +var floydWarshallDefaults = defaults$g({ + weight: function weight(edge) { + return 1; + }, + directed: false +}); +var elesfn$r = { + // Implemented from pseudocode from wikipedia + floydWarshall: function floydWarshall(options) { + var cy = this.cy(); + var _floydWarshallDefault = floydWarshallDefaults(options), + weight = _floydWarshallDefault.weight, + directed = _floydWarshallDefault.directed; + var weightFn = weight; + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + var N = nodes.length; + var Nsq = N * N; + var indexOf = function indexOf(node) { + return nodes.indexOf(node); + }; + var atIndex = function atIndex(i) { + return nodes[i]; + }; + + // Initialize distance matrix + var dist = new Array(Nsq); + for (var n = 0; n < Nsq; n++) { + var j = n % N; + var i = (n - j) / N; + if (i === j) { + dist[n] = 0; + } else { + dist[n] = Infinity; + } + } + + // Initialize matrix used for path reconstruction + // Initialize distance matrix + var next = new Array(Nsq); + var edgeNext = new Array(Nsq); + + // Process edges + for (var _i = 0; _i < edges.length; _i++) { + var edge = edges[_i]; + var src = edge.source()[0]; + var tgt = edge.target()[0]; + if (src === tgt) { + continue; + } // exclude loops + + var s = indexOf(src); + var t = indexOf(tgt); + var st = s * N + t; // source to target index + var _weight = weightFn(edge); + + // Check if already process another edge between same 2 nodes + if (dist[st] > _weight) { + dist[st] = _weight; + next[st] = t; + edgeNext[st] = edge; + } + + // If undirected graph, process 'reversed' edge + if (!directed) { + var ts = t * N + s; // target to source index + + if (!directed && dist[ts] > _weight) { + dist[ts] = _weight; + next[ts] = s; + edgeNext[ts] = edge; + } + } + } + + // Main loop + for (var k = 0; k < N; k++) { + for (var _i2 = 0; _i2 < N; _i2++) { + var ik = _i2 * N + k; + for (var _j = 0; _j < N; _j++) { + var ij = _i2 * N + _j; + var kj = k * N + _j; + if (dist[ik] + dist[kj] < dist[ij]) { + dist[ij] = dist[ik] + dist[kj]; + next[ij] = next[ik]; + } + } + } + } + var getArgEle = function getArgEle(ele) { + return (string(ele) ? cy.filter(ele) : ele)[0]; + }; + var indexOfArgEle = function indexOfArgEle(ele) { + return indexOf(getArgEle(ele)); + }; + var res = { + distance: function distance(from, to) { + var i = indexOfArgEle(from); + var j = indexOfArgEle(to); + return dist[i * N + j]; + }, + path: function path(from, to) { + var i = indexOfArgEle(from); + var j = indexOfArgEle(to); + var fromNode = atIndex(i); + if (i === j) { + return fromNode.collection(); + } + if (next[i * N + j] == null) { + return cy.collection(); + } + var path = cy.collection(); + var prev = i; + var edge; + path.merge(fromNode); + while (i !== j) { + prev = i; + i = next[i * N + j]; + edge = edgeNext[prev * N + i]; + path.merge(edge); + path.merge(atIndex(i)); + } + return path; + } + }; + return res; + } // floydWarshall +}; // elesfn + +var bellmanFordDefaults = defaults$g({ + weight: function weight(edge) { + return 1; + }, + directed: false, + root: null +}); +var elesfn$q = { + // Implemented from pseudocode from wikipedia + bellmanFord: function bellmanFord(options) { + var _this = this; + var _bellmanFordDefaults = bellmanFordDefaults(options), + weight = _bellmanFordDefaults.weight, + directed = _bellmanFordDefaults.directed, + root = _bellmanFordDefaults.root; + var weightFn = weight; + var eles = this; + var cy = this.cy(); + var _this$byGroup = this.byGroup(), + edges = _this$byGroup.edges, + nodes = _this$byGroup.nodes; + var numNodes = nodes.length; + var infoMap = new Map$1(); + var hasNegativeWeightCycle = false; + var negativeWeightCycles = []; + root = cy.collection(root)[0]; // in case selector passed + + edges.unmergeBy(function (edge) { + return edge.isLoop(); + }); + var numEdges = edges.length; + var getInfo = function getInfo(node) { + var obj = infoMap.get(node.id()); + if (!obj) { + obj = {}; + infoMap.set(node.id(), obj); + } + return obj; + }; + var getNodeFromTo = function getNodeFromTo(to) { + return (string(to) ? cy.$(to) : to)[0]; + }; + var distanceTo = function distanceTo(to) { + return getInfo(getNodeFromTo(to)).dist; + }; + var pathTo = function pathTo(to) { + var thisStart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : root; + var end = getNodeFromTo(to); + var path = []; + var node = end; + for (;;) { + if (node == null) { + return _this.spawn(); + } + var _getInfo = getInfo(node), + edge = _getInfo.edge, + pred = _getInfo.pred; + path.unshift(node[0]); + if (node.same(thisStart) && path.length > 0) { + break; + } + if (edge != null) { + path.unshift(edge); + } + node = pred; + } + return eles.spawn(path); + }; + + // Initializations { dist, pred, edge } + for (var i = 0; i < numNodes; i++) { + var node = nodes[i]; + var info = getInfo(node); + if (node.same(root)) { + info.dist = 0; + } else { + info.dist = Infinity; + } + info.pred = null; + info.edge = null; + } + + // Edges relaxation + var replacedEdge = false; + var checkForEdgeReplacement = function checkForEdgeReplacement(node1, node2, edge, info1, info2, weight) { + var dist = info1.dist + weight; + if (dist < info2.dist && !edge.same(info1.edge)) { + info2.dist = dist; + info2.pred = node1; + info2.edge = edge; + replacedEdge = true; + } + }; + for (var _i = 1; _i < numNodes; _i++) { + replacedEdge = false; + for (var e = 0; e < numEdges; e++) { + var edge = edges[e]; + var src = edge.source(); + var tgt = edge.target(); + var _weight = weightFn(edge); + var srcInfo = getInfo(src); + var tgtInfo = getInfo(tgt); + checkForEdgeReplacement(src, tgt, edge, srcInfo, tgtInfo, _weight); + + // If undirected graph, we need to take into account the 'reverse' edge + if (!directed) { + checkForEdgeReplacement(tgt, src, edge, tgtInfo, srcInfo, _weight); + } + } + if (!replacedEdge) { + break; + } + } + if (replacedEdge) { + // Check for negative weight cycles + var negativeWeightCycleIds = []; + for (var _e = 0; _e < numEdges; _e++) { + var _edge = edges[_e]; + var _src = _edge.source(); + var _tgt = _edge.target(); + var _weight2 = weightFn(_edge); + var srcDist = getInfo(_src).dist; + var tgtDist = getInfo(_tgt).dist; + if (srcDist + _weight2 < tgtDist || !directed && tgtDist + _weight2 < srcDist) { + if (!hasNegativeWeightCycle) { + warn('Graph contains a negative weight cycle for Bellman-Ford'); + hasNegativeWeightCycle = true; + } + if (options.findNegativeWeightCycles !== false) { + var negativeNodes = []; + if (srcDist + _weight2 < tgtDist) { + negativeNodes.push(_src); + } + if (!directed && tgtDist + _weight2 < srcDist) { + negativeNodes.push(_tgt); + } + var numNegativeNodes = negativeNodes.length; + for (var n = 0; n < numNegativeNodes; n++) { + var start = negativeNodes[n]; + var cycle = [start]; + cycle.push(getInfo(start).edge); + var _node = getInfo(start).pred; + while (cycle.indexOf(_node) === -1) { + cycle.push(_node); + cycle.push(getInfo(_node).edge); + _node = getInfo(_node).pred; + } + cycle = cycle.slice(cycle.indexOf(_node)); + var smallestId = cycle[0].id(); + var smallestIndex = 0; + for (var c = 2; c < cycle.length; c += 2) { + if (cycle[c].id() < smallestId) { + smallestId = cycle[c].id(); + smallestIndex = c; + } + } + cycle = cycle.slice(smallestIndex).concat(cycle.slice(0, smallestIndex)); + cycle.push(cycle[0]); + var cycleId = cycle.map(function (el) { + return el.id(); + }).join(","); + if (negativeWeightCycleIds.indexOf(cycleId) === -1) { + negativeWeightCycles.push(eles.spawn(cycle)); + negativeWeightCycleIds.push(cycleId); + } + } + } else { + break; + } + } + } + } + return { + distanceTo: distanceTo, + pathTo: pathTo, + hasNegativeWeightCycle: hasNegativeWeightCycle, + negativeWeightCycles: negativeWeightCycles + }; + } // bellmanFord +}; // elesfn + +var sqrt2 = Math.sqrt(2); + +// Function which colapses 2 (meta) nodes into one +// Updates the remaining edge lists +// Receives as a paramater the edge which causes the collapse +var collapse = function collapse(edgeIndex, nodeMap, remainingEdges) { + if (remainingEdges.length === 0) { + error("Karger-Stein must be run on a connected (sub)graph"); + } + var edgeInfo = remainingEdges[edgeIndex]; + var sourceIn = edgeInfo[1]; + var targetIn = edgeInfo[2]; + var partition1 = nodeMap[sourceIn]; + var partition2 = nodeMap[targetIn]; + var newEdges = remainingEdges; // re-use array + + // Delete all edges between partition1 and partition2 + for (var i = newEdges.length - 1; i >= 0; i--) { + var edge = newEdges[i]; + var src = edge[1]; + var tgt = edge[2]; + if (nodeMap[src] === partition1 && nodeMap[tgt] === partition2 || nodeMap[src] === partition2 && nodeMap[tgt] === partition1) { + newEdges.splice(i, 1); + } + } + + // All edges pointing to partition2 should now point to partition1 + for (var _i = 0; _i < newEdges.length; _i++) { + var _edge = newEdges[_i]; + if (_edge[1] === partition2) { + // Check source + newEdges[_i] = _edge.slice(); // copy + newEdges[_i][1] = partition1; + } else if (_edge[2] === partition2) { + // Check target + newEdges[_i] = _edge.slice(); // copy + newEdges[_i][2] = partition1; + } + } + + // Move all nodes from partition2 to partition1 + for (var _i2 = 0; _i2 < nodeMap.length; _i2++) { + if (nodeMap[_i2] === partition2) { + nodeMap[_i2] = partition1; + } + } + return newEdges; +}; + +// Contracts a graph until we reach a certain number of meta nodes +var contractUntil = function contractUntil(metaNodeMap, remainingEdges, size, sizeLimit) { + while (size > sizeLimit) { + // Choose an edge randomly + var edgeIndex = Math.floor(Math.random() * remainingEdges.length); + + // Collapse graph based on edge + remainingEdges = collapse(edgeIndex, metaNodeMap, remainingEdges); + size--; + } + return remainingEdges; +}; +var elesfn$p = { + // Computes the minimum cut of an undirected graph + // Returns the correct answer with high probability + kargerStein: function kargerStein() { + var _this = this; + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + edges.unmergeBy(function (edge) { + return edge.isLoop(); + }); + var numNodes = nodes.length; + var numEdges = edges.length; + var numIter = Math.ceil(Math.pow(Math.log(numNodes) / Math.LN2, 2)); + var stopSize = Math.floor(numNodes / sqrt2); + if (numNodes < 2) { + error('At least 2 nodes are required for Karger-Stein algorithm'); + return undefined; + } + + // Now store edge destination as indexes + // Format for each edge (edge index, source node index, target node index) + var edgeIndexes = []; + for (var i = 0; i < numEdges; i++) { + var e = edges[i]; + edgeIndexes.push([i, nodes.indexOf(e.source()), nodes.indexOf(e.target())]); + } + + // We will store the best cut found here + var minCutSize = Infinity; + var minCutEdgeIndexes = []; + var minCutNodeMap = new Array(numNodes); + + // Initial meta node partition + var metaNodeMap = new Array(numNodes); + var metaNodeMap2 = new Array(numNodes); + var copyNodesMap = function copyNodesMap(from, to) { + for (var _i3 = 0; _i3 < numNodes; _i3++) { + to[_i3] = from[_i3]; + } + }; + + // Main loop + for (var iter = 0; iter <= numIter; iter++) { + // Reset meta node partition + for (var _i4 = 0; _i4 < numNodes; _i4++) { + metaNodeMap[_i4] = _i4; + } + + // Contract until stop point (stopSize nodes) + var edgesState = contractUntil(metaNodeMap, edgeIndexes.slice(), numNodes, stopSize); + var edgesState2 = edgesState.slice(); // copy + + // Create a copy of the colapsed nodes state + copyNodesMap(metaNodeMap, metaNodeMap2); + + // Run 2 iterations starting in the stop state + var res1 = contractUntil(metaNodeMap, edgesState, stopSize, 2); + var res2 = contractUntil(metaNodeMap2, edgesState2, stopSize, 2); + + // Is any of the 2 results the best cut so far? + if (res1.length <= res2.length && res1.length < minCutSize) { + minCutSize = res1.length; + minCutEdgeIndexes = res1; + copyNodesMap(metaNodeMap, minCutNodeMap); + } else if (res2.length <= res1.length && res2.length < minCutSize) { + minCutSize = res2.length; + minCutEdgeIndexes = res2; + copyNodesMap(metaNodeMap2, minCutNodeMap); + } + } // end of main loop + + // Construct result + var cut = this.spawn(minCutEdgeIndexes.map(function (e) { + return edges[e[0]]; + })); + var partition1 = this.spawn(); + var partition2 = this.spawn(); + + // traverse metaNodeMap for best cut + var witnessNodePartition = minCutNodeMap[0]; + for (var _i5 = 0; _i5 < minCutNodeMap.length; _i5++) { + var partitionId = minCutNodeMap[_i5]; + var node = nodes[_i5]; + if (partitionId === witnessNodePartition) { + partition1.merge(node); + } else { + partition2.merge(node); + } + } + + // construct components corresponding to each disjoint subset of nodes + var constructComponent = function constructComponent(subset) { + var component = _this.spawn(); + subset.forEach(function (node) { + component.merge(node); + node.connectedEdges().forEach(function (edge) { + // ensure edge is within calling collection and edge is not in cut + if (_this.contains(edge) && !cut.contains(edge)) { + component.merge(edge); + } + }); + }); + return component; + }; + var components = [constructComponent(partition1), constructComponent(partition2)]; + var ret = { + cut: cut, + components: components, + // n.b. partitions are included to be compatible with the old api spec + // (could be removed in a future major version) + partition1: partition1, + partition2: partition2 + }; + return ret; + } +}; // elesfn + +var copyPosition = function copyPosition(p) { + return { + x: p.x, + y: p.y + }; +}; +var modelToRenderedPosition = function modelToRenderedPosition(p, zoom, pan) { + return { + x: p.x * zoom + pan.x, + y: p.y * zoom + pan.y + }; +}; +var renderedToModelPosition = function renderedToModelPosition(p, zoom, pan) { + return { + x: (p.x - pan.x) / zoom, + y: (p.y - pan.y) / zoom + }; +}; +var array2point = function array2point(arr) { + return { + x: arr[0], + y: arr[1] + }; +}; +var min = function min(arr) { + var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; + var min = Infinity; + for (var i = begin; i < end; i++) { + var val = arr[i]; + if (isFinite(val)) { + min = Math.min(val, min); + } + } + return min; +}; +var max = function max(arr) { + var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; + var max = -Infinity; + for (var i = begin; i < end; i++) { + var val = arr[i]; + if (isFinite(val)) { + max = Math.max(val, max); + } + } + return max; +}; +var mean = function mean(arr) { + var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; + var total = 0; + var n = 0; + for (var i = begin; i < end; i++) { + var val = arr[i]; + if (isFinite(val)) { + total += val; + n++; + } + } + return total / n; +}; +var median = function median(arr) { + var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; + var copy = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var sort = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var includeHoles = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + if (copy) { + arr = arr.slice(begin, end); + } else { + if (end < arr.length) { + arr.splice(end, arr.length - end); + } + if (begin > 0) { + arr.splice(0, begin); + } + } + + // all non finite (e.g. Infinity, NaN) elements must be -Infinity so they go to the start + var off = 0; // offset from non-finite values + for (var i = arr.length - 1; i >= 0; i--) { + var v = arr[i]; + if (includeHoles) { + if (!isFinite(v)) { + arr[i] = -Infinity; + off++; + } + } else { + // just remove it if we don't want to consider holes + arr.splice(i, 1); + } + } + if (sort) { + arr.sort(function (a, b) { + return a - b; + }); // requires copy = true if you don't want to change the orig + } + + var len = arr.length; + var mid = Math.floor(len / 2); + if (len % 2 !== 0) { + return arr[mid + 1 + off]; + } else { + return (arr[mid - 1 + off] + arr[mid + off]) / 2; + } +}; +var deg2rad = function deg2rad(deg) { + return Math.PI * deg / 180; +}; +var getAngleFromDisp = function getAngleFromDisp(dispX, dispY) { + return Math.atan2(dispY, dispX) - Math.PI / 2; +}; +var log2 = Math.log2 || function (n) { + return Math.log(n) / Math.log(2); +}; +var signum = function signum(x) { + if (x > 0) { + return 1; + } else if (x < 0) { + return -1; + } else { + return 0; + } +}; +var dist = function dist(p1, p2) { + return Math.sqrt(sqdist(p1, p2)); +}; +var sqdist = function sqdist(p1, p2) { + var dx = p2.x - p1.x; + var dy = p2.y - p1.y; + return dx * dx + dy * dy; +}; +var inPlaceSumNormalize = function inPlaceSumNormalize(v) { + var length = v.length; + + // First, get sum of all elements + var total = 0; + for (var i = 0; i < length; i++) { + total += v[i]; + } + + // Now, divide each by the sum of all elements + for (var _i = 0; _i < length; _i++) { + v[_i] = v[_i] / total; + } + return v; +}; + +// from http://en.wikipedia.org/wiki/Bézier_curve#Quadratic_curves +var qbezierAt = function qbezierAt(p0, p1, p2, t) { + return (1 - t) * (1 - t) * p0 + 2 * (1 - t) * t * p1 + t * t * p2; +}; +var qbezierPtAt = function qbezierPtAt(p0, p1, p2, t) { + return { + x: qbezierAt(p0.x, p1.x, p2.x, t), + y: qbezierAt(p0.y, p1.y, p2.y, t) + }; +}; +var lineAt = function lineAt(p0, p1, t, d) { + var vec = { + x: p1.x - p0.x, + y: p1.y - p0.y + }; + var vecDist = dist(p0, p1); + var normVec = { + x: vec.x / vecDist, + y: vec.y / vecDist + }; + t = t == null ? 0 : t; + d = d != null ? d : t * vecDist; + return { + x: p0.x + normVec.x * d, + y: p0.y + normVec.y * d + }; +}; +var bound = function bound(min, val, max) { + return Math.max(min, Math.min(max, val)); +}; + +// makes a full bb (x1, y1, x2, y2, w, h) from implicit params +var makeBoundingBox = function makeBoundingBox(bb) { + if (bb == null) { + return { + x1: Infinity, + y1: Infinity, + x2: -Infinity, + y2: -Infinity, + w: 0, + h: 0 + }; + } else if (bb.x1 != null && bb.y1 != null) { + if (bb.x2 != null && bb.y2 != null && bb.x2 >= bb.x1 && bb.y2 >= bb.y1) { + return { + x1: bb.x1, + y1: bb.y1, + x2: bb.x2, + y2: bb.y2, + w: bb.x2 - bb.x1, + h: bb.y2 - bb.y1 + }; + } else if (bb.w != null && bb.h != null && bb.w >= 0 && bb.h >= 0) { + return { + x1: bb.x1, + y1: bb.y1, + x2: bb.x1 + bb.w, + y2: bb.y1 + bb.h, + w: bb.w, + h: bb.h + }; + } + } +}; +var copyBoundingBox = function copyBoundingBox(bb) { + return { + x1: bb.x1, + x2: bb.x2, + w: bb.w, + y1: bb.y1, + y2: bb.y2, + h: bb.h + }; +}; +var clearBoundingBox = function clearBoundingBox(bb) { + bb.x1 = Infinity; + bb.y1 = Infinity; + bb.x2 = -Infinity; + bb.y2 = -Infinity; + bb.w = 0; + bb.h = 0; +}; +var shiftBoundingBox = function shiftBoundingBox(bb, dx, dy) { + return { + x1: bb.x1 + dx, + x2: bb.x2 + dx, + y1: bb.y1 + dy, + y2: bb.y2 + dy, + w: bb.w, + h: bb.h + }; +}; +var updateBoundingBox = function updateBoundingBox(bb1, bb2) { + // update bb1 with bb2 bounds + + bb1.x1 = Math.min(bb1.x1, bb2.x1); + bb1.x2 = Math.max(bb1.x2, bb2.x2); + bb1.w = bb1.x2 - bb1.x1; + bb1.y1 = Math.min(bb1.y1, bb2.y1); + bb1.y2 = Math.max(bb1.y2, bb2.y2); + bb1.h = bb1.y2 - bb1.y1; +}; +var expandBoundingBoxByPoint = function expandBoundingBoxByPoint(bb, x, y) { + bb.x1 = Math.min(bb.x1, x); + bb.x2 = Math.max(bb.x2, x); + bb.w = bb.x2 - bb.x1; + bb.y1 = Math.min(bb.y1, y); + bb.y2 = Math.max(bb.y2, y); + bb.h = bb.y2 - bb.y1; +}; +var expandBoundingBox = function expandBoundingBox(bb) { + var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + bb.x1 -= padding; + bb.x2 += padding; + bb.y1 -= padding; + bb.y2 += padding; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + return bb; +}; +var expandBoundingBoxSides = function expandBoundingBoxSides(bb) { + var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0]; + var top, right, bottom, left; + if (padding.length === 1) { + top = right = bottom = left = padding[0]; + } else if (padding.length === 2) { + top = bottom = padding[0]; + left = right = padding[1]; + } else if (padding.length === 4) { + var _padding = _slicedToArray(padding, 4); + top = _padding[0]; + right = _padding[1]; + bottom = _padding[2]; + left = _padding[3]; + } + bb.x1 -= left; + bb.x2 += right; + bb.y1 -= top; + bb.y2 += bottom; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + return bb; +}; + +// assign the values of bb2 into bb1 +var assignBoundingBox = function assignBoundingBox(bb1, bb2) { + bb1.x1 = bb2.x1; + bb1.y1 = bb2.y1; + bb1.x2 = bb2.x2; + bb1.y2 = bb2.y2; + bb1.w = bb1.x2 - bb1.x1; + bb1.h = bb1.y2 - bb1.y1; +}; +var boundingBoxesIntersect = function boundingBoxesIntersect(bb1, bb2) { + // case: one bb to right of other + if (bb1.x1 > bb2.x2) { + return false; + } + if (bb2.x1 > bb1.x2) { + return false; + } + + // case: one bb to left of other + if (bb1.x2 < bb2.x1) { + return false; + } + if (bb2.x2 < bb1.x1) { + return false; + } + + // case: one bb above other + if (bb1.y2 < bb2.y1) { + return false; + } + if (bb2.y2 < bb1.y1) { + return false; + } + + // case: one bb below other + if (bb1.y1 > bb2.y2) { + return false; + } + if (bb2.y1 > bb1.y2) { + return false; + } + + // otherwise, must have some overlap + return true; +}; +var inBoundingBox = function inBoundingBox(bb, x, y) { + return bb.x1 <= x && x <= bb.x2 && bb.y1 <= y && y <= bb.y2; +}; +var pointInBoundingBox = function pointInBoundingBox(bb, pt) { + return inBoundingBox(bb, pt.x, pt.y); +}; +var boundingBoxInBoundingBox = function boundingBoxInBoundingBox(bb1, bb2) { + return inBoundingBox(bb1, bb2.x1, bb2.y1) && inBoundingBox(bb1, bb2.x2, bb2.y2); +}; +var roundRectangleIntersectLine = function roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding) { + var cornerRadius = getRoundRectangleRadius(width, height); + var halfWidth = width / 2; + var halfHeight = height / 2; + + // Check intersections with straight line segments + var straightLineIntersections; + + // Top segment, left to right + { + var topStartX = nodeX - halfWidth + cornerRadius - padding; + var topStartY = nodeY - halfHeight - padding; + var topEndX = nodeX + halfWidth - cornerRadius + padding; + var topEndY = topStartY; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + + // Right segment, top to bottom + { + var rightStartX = nodeX + halfWidth + padding; + var rightStartY = nodeY - halfHeight + cornerRadius - padding; + var rightEndX = rightStartX; + var rightEndY = nodeY + halfHeight - cornerRadius + padding; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, rightStartX, rightStartY, rightEndX, rightEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + + // Bottom segment, left to right + { + var bottomStartX = nodeX - halfWidth + cornerRadius - padding; + var bottomStartY = nodeY + halfHeight + padding; + var bottomEndX = nodeX + halfWidth - cornerRadius + padding; + var bottomEndY = bottomStartY; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, bottomStartX, bottomStartY, bottomEndX, bottomEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + + // Left segment, top to bottom + { + var leftStartX = nodeX - halfWidth - padding; + var leftStartY = nodeY - halfHeight + cornerRadius - padding; + var leftEndX = leftStartX; + var leftEndY = nodeY + halfHeight - cornerRadius + padding; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, leftStartX, leftStartY, leftEndX, leftEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + + // Check intersections with arc segments + var arcIntersections; + + // Top Left + { + var topLeftCenterX = nodeX - halfWidth + cornerRadius; + var topLeftCenterY = nodeY - halfHeight + cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topLeftCenterX, topLeftCenterY, cornerRadius + padding); + + // Ensure the intersection is on the desired quarter of the circle + if (arcIntersections.length > 0 && arcIntersections[0] <= topLeftCenterX && arcIntersections[1] <= topLeftCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + + // Top Right + { + var topRightCenterX = nodeX + halfWidth - cornerRadius; + var topRightCenterY = nodeY - halfHeight + cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topRightCenterX, topRightCenterY, cornerRadius + padding); + + // Ensure the intersection is on the desired quarter of the circle + if (arcIntersections.length > 0 && arcIntersections[0] >= topRightCenterX && arcIntersections[1] <= topRightCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + + // Bottom Right + { + var bottomRightCenterX = nodeX + halfWidth - cornerRadius; + var bottomRightCenterY = nodeY + halfHeight - cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomRightCenterX, bottomRightCenterY, cornerRadius + padding); + + // Ensure the intersection is on the desired quarter of the circle + if (arcIntersections.length > 0 && arcIntersections[0] >= bottomRightCenterX && arcIntersections[1] >= bottomRightCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + + // Bottom Left + { + var bottomLeftCenterX = nodeX - halfWidth + cornerRadius; + var bottomLeftCenterY = nodeY + halfHeight - cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomLeftCenterX, bottomLeftCenterY, cornerRadius + padding); + + // Ensure the intersection is on the desired quarter of the circle + if (arcIntersections.length > 0 && arcIntersections[0] <= bottomLeftCenterX && arcIntersections[1] >= bottomLeftCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + return []; // if nothing +}; + +var inLineVicinity = function inLineVicinity(x, y, lx1, ly1, lx2, ly2, tolerance) { + var t = tolerance; + var x1 = Math.min(lx1, lx2); + var x2 = Math.max(lx1, lx2); + var y1 = Math.min(ly1, ly2); + var y2 = Math.max(ly1, ly2); + return x1 - t <= x && x <= x2 + t && y1 - t <= y && y <= y2 + t; +}; +var inBezierVicinity = function inBezierVicinity(x, y, x1, y1, x2, y2, x3, y3, tolerance) { + var bb = { + x1: Math.min(x1, x3, x2) - tolerance, + x2: Math.max(x1, x3, x2) + tolerance, + y1: Math.min(y1, y3, y2) - tolerance, + y2: Math.max(y1, y3, y2) + tolerance + }; + + // if outside the rough bounding box for the bezier, then it can't be a hit + if (x < bb.x1 || x > bb.x2 || y < bb.y1 || y > bb.y2) { + // console.log('bezier out of rough bb') + return false; + } else { + // console.log('do more expensive check'); + return true; + } +}; +var solveQuadratic = function solveQuadratic(a, b, c, val) { + c -= val; + var r = b * b - 4 * a * c; + if (r < 0) { + return []; + } + var sqrtR = Math.sqrt(r); + var denom = 2 * a; + var root1 = (-b + sqrtR) / denom; + var root2 = (-b - sqrtR) / denom; + return [root1, root2]; +}; +var solveCubic = function solveCubic(a, b, c, d, result) { + // Solves a cubic function, returns root in form [r1, i1, r2, i2, r3, i3], where + // r is the real component, i is the imaginary component + + // An implementation of the Cardano method from the year 1545 + // http://en.wikipedia.org/wiki/Cubic_function#The_nature_of_the_roots + + var epsilon = 0.00001; + + // avoid division by zero while keeping the overall expression close in value + if (a === 0) { + a = epsilon; + } + b /= a; + c /= a; + d /= a; + var discriminant, q, r, dum1, s, t, term1, r13; + q = (3.0 * c - b * b) / 9.0; + r = -(27.0 * d) + b * (9.0 * c - 2.0 * (b * b)); + r /= 54.0; + discriminant = q * q * q + r * r; + result[1] = 0; + term1 = b / 3.0; + if (discriminant > 0) { + s = r + Math.sqrt(discriminant); + s = s < 0 ? -Math.pow(-s, 1.0 / 3.0) : Math.pow(s, 1.0 / 3.0); + t = r - Math.sqrt(discriminant); + t = t < 0 ? -Math.pow(-t, 1.0 / 3.0) : Math.pow(t, 1.0 / 3.0); + result[0] = -term1 + s + t; + term1 += (s + t) / 2.0; + result[4] = result[2] = -term1; + term1 = Math.sqrt(3.0) * (-t + s) / 2; + result[3] = term1; + result[5] = -term1; + return; + } + result[5] = result[3] = 0; + if (discriminant === 0) { + r13 = r < 0 ? -Math.pow(-r, 1.0 / 3.0) : Math.pow(r, 1.0 / 3.0); + result[0] = -term1 + 2.0 * r13; + result[4] = result[2] = -(r13 + term1); + return; + } + q = -q; + dum1 = q * q * q; + dum1 = Math.acos(r / Math.sqrt(dum1)); + r13 = 2.0 * Math.sqrt(q); + result[0] = -term1 + r13 * Math.cos(dum1 / 3.0); + result[2] = -term1 + r13 * Math.cos((dum1 + 2.0 * Math.PI) / 3.0); + result[4] = -term1 + r13 * Math.cos((dum1 + 4.0 * Math.PI) / 3.0); + return; +}; +var sqdistToQuadraticBezier = function sqdistToQuadraticBezier(x, y, x1, y1, x2, y2, x3, y3) { + // Find minimum distance by using the minimum of the distance + // function between the given point and the curve + + // This gives the coefficients of the resulting cubic equation + // whose roots tell us where a possible minimum is + // (Coefficients are divided by 4) + + var a = 1.0 * x1 * x1 - 4 * x1 * x2 + 2 * x1 * x3 + 4 * x2 * x2 - 4 * x2 * x3 + x3 * x3 + y1 * y1 - 4 * y1 * y2 + 2 * y1 * y3 + 4 * y2 * y2 - 4 * y2 * y3 + y3 * y3; + var b = 1.0 * 9 * x1 * x2 - 3 * x1 * x1 - 3 * x1 * x3 - 6 * x2 * x2 + 3 * x2 * x3 + 9 * y1 * y2 - 3 * y1 * y1 - 3 * y1 * y3 - 6 * y2 * y2 + 3 * y2 * y3; + var c = 1.0 * 3 * x1 * x1 - 6 * x1 * x2 + x1 * x3 - x1 * x + 2 * x2 * x2 + 2 * x2 * x - x3 * x + 3 * y1 * y1 - 6 * y1 * y2 + y1 * y3 - y1 * y + 2 * y2 * y2 + 2 * y2 * y - y3 * y; + var d = 1.0 * x1 * x2 - x1 * x1 + x1 * x - x2 * x + y1 * y2 - y1 * y1 + y1 * y - y2 * y; + + // debug("coefficients: " + a / a + ", " + b / a + ", " + c / a + ", " + d / a); + + var roots = []; + + // Use the cubic solving algorithm + solveCubic(a, b, c, d, roots); + var zeroThreshold = 0.0000001; + var params = []; + for (var index = 0; index < 6; index += 2) { + if (Math.abs(roots[index + 1]) < zeroThreshold && roots[index] >= 0 && roots[index] <= 1.0) { + params.push(roots[index]); + } + } + params.push(1.0); + params.push(0.0); + var minDistanceSquared = -1; + var curX, curY, distSquared; + for (var i = 0; i < params.length; i++) { + curX = Math.pow(1.0 - params[i], 2.0) * x1 + 2.0 * (1 - params[i]) * params[i] * x2 + params[i] * params[i] * x3; + curY = Math.pow(1 - params[i], 2.0) * y1 + 2 * (1.0 - params[i]) * params[i] * y2 + params[i] * params[i] * y3; + distSquared = Math.pow(curX - x, 2) + Math.pow(curY - y, 2); + // debug('distance for param ' + params[i] + ": " + Math.sqrt(distSquared)); + if (minDistanceSquared >= 0) { + if (distSquared < minDistanceSquared) { + minDistanceSquared = distSquared; + } + } else { + minDistanceSquared = distSquared; + } + } + return minDistanceSquared; +}; +var sqdistToFiniteLine = function sqdistToFiniteLine(x, y, x1, y1, x2, y2) { + var offset = [x - x1, y - y1]; + var line = [x2 - x1, y2 - y1]; + var lineSq = line[0] * line[0] + line[1] * line[1]; + var hypSq = offset[0] * offset[0] + offset[1] * offset[1]; + var dotProduct = offset[0] * line[0] + offset[1] * line[1]; + var adjSq = dotProduct * dotProduct / lineSq; + if (dotProduct < 0) { + return hypSq; + } + if (adjSq > lineSq) { + return (x - x2) * (x - x2) + (y - y2) * (y - y2); + } + return hypSq - adjSq; +}; +var pointInsidePolygonPoints = function pointInsidePolygonPoints(x, y, points) { + var x1, y1, x2, y2; + var y3; + + // Intersect with vertical line through (x, y) + var up = 0; + // let down = 0; + for (var i = 0; i < points.length / 2; i++) { + x1 = points[i * 2]; + y1 = points[i * 2 + 1]; + if (i + 1 < points.length / 2) { + x2 = points[(i + 1) * 2]; + y2 = points[(i + 1) * 2 + 1]; + } else { + x2 = points[(i + 1 - points.length / 2) * 2]; + y2 = points[(i + 1 - points.length / 2) * 2 + 1]; + } + if (x1 == x && x2 == x) ; else if (x1 >= x && x >= x2 || x1 <= x && x <= x2) { + y3 = (x - x1) / (x2 - x1) * (y2 - y1) + y1; + if (y3 > y) { + up++; + } + + // if( y3 < y ){ + // down++; + // } + } else { + continue; + } + } + if (up % 2 === 0) { + return false; + } else { + return true; + } +}; +var pointInsidePolygon = function pointInsidePolygon(x, y, basePoints, centerX, centerY, width, height, direction, padding) { + var transformedPoints = new Array(basePoints.length); + + // Gives negative angle + var angle; + if (direction[0] != null) { + angle = Math.atan(direction[1] / direction[0]); + if (direction[0] < 0) { + angle = angle + Math.PI / 2; + } else { + angle = -angle - Math.PI / 2; + } + } else { + angle = direction; + } + var cos = Math.cos(-angle); + var sin = Math.sin(-angle); + + // console.log("base: " + basePoints); + for (var i = 0; i < transformedPoints.length / 2; i++) { + transformedPoints[i * 2] = width / 2 * (basePoints[i * 2] * cos - basePoints[i * 2 + 1] * sin); + transformedPoints[i * 2 + 1] = height / 2 * (basePoints[i * 2 + 1] * cos + basePoints[i * 2] * sin); + transformedPoints[i * 2] += centerX; + transformedPoints[i * 2 + 1] += centerY; + } + var points; + if (padding > 0) { + var expandedLineSet = expandPolygon(transformedPoints, -padding); + points = joinLines(expandedLineSet); + } else { + points = transformedPoints; + } + return pointInsidePolygonPoints(x, y, points); +}; +var pointInsideRoundPolygon = function pointInsideRoundPolygon(x, y, basePoints, centerX, centerY, width, height) { + var cutPolygonPoints = new Array(basePoints.length); + var halfW = width / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width, height); + var squaredCornerRadius = cornerRadius * cornerRadius; + for (var i = 0; i < basePoints.length / 4; i++) { + var sourceUv = void 0, + destUv = void 0; + if (i === 0) { + sourceUv = basePoints.length - 2; + } else { + sourceUv = i * 4 - 2; + } + destUv = i * 4 + 2; + var px = centerX + halfW * basePoints[i * 4]; + var py = centerY + halfH * basePoints[i * 4 + 1]; + var cosTheta = -basePoints[sourceUv] * basePoints[destUv] - basePoints[sourceUv + 1] * basePoints[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * basePoints[sourceUv]; + var cp0y = py - offset * basePoints[sourceUv + 1]; + var cp1x = px + offset * basePoints[destUv]; + var cp1y = py + offset * basePoints[destUv + 1]; + cutPolygonPoints[i * 4] = cp0x; + cutPolygonPoints[i * 4 + 1] = cp0y; + cutPolygonPoints[i * 4 + 2] = cp1x; + cutPolygonPoints[i * 4 + 3] = cp1y; + var orthx = basePoints[sourceUv + 1]; + var orthy = -basePoints[sourceUv]; + var cosAlpha = orthx * basePoints[destUv] + orthy * basePoints[destUv + 1]; + if (cosAlpha < 0) { + orthx *= -1; + orthy *= -1; + } + var cx = cp0x + orthx * cornerRadius; + var cy = cp0y + orthy * cornerRadius; + var squaredDistance = Math.pow(cx - x, 2) + Math.pow(cy - y, 2); + if (squaredDistance <= squaredCornerRadius) { + return true; + } + } + return pointInsidePolygonPoints(x, y, cutPolygonPoints); +}; +var joinLines = function joinLines(lineSet) { + var vertices = new Array(lineSet.length / 2); + var currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY; + var nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY; + for (var i = 0; i < lineSet.length / 4; i++) { + currentLineStartX = lineSet[i * 4]; + currentLineStartY = lineSet[i * 4 + 1]; + currentLineEndX = lineSet[i * 4 + 2]; + currentLineEndY = lineSet[i * 4 + 3]; + if (i < lineSet.length / 4 - 1) { + nextLineStartX = lineSet[(i + 1) * 4]; + nextLineStartY = lineSet[(i + 1) * 4 + 1]; + nextLineEndX = lineSet[(i + 1) * 4 + 2]; + nextLineEndY = lineSet[(i + 1) * 4 + 3]; + } else { + nextLineStartX = lineSet[0]; + nextLineStartY = lineSet[1]; + nextLineEndX = lineSet[2]; + nextLineEndY = lineSet[3]; + } + var intersection = finiteLinesIntersect(currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY, nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY, true); + vertices[i * 2] = intersection[0]; + vertices[i * 2 + 1] = intersection[1]; + } + return vertices; +}; +var expandPolygon = function expandPolygon(points, pad) { + var expandedLineSet = new Array(points.length * 2); + var currentPointX, currentPointY, nextPointX, nextPointY; + for (var i = 0; i < points.length / 2; i++) { + currentPointX = points[i * 2]; + currentPointY = points[i * 2 + 1]; + if (i < points.length / 2 - 1) { + nextPointX = points[(i + 1) * 2]; + nextPointY = points[(i + 1) * 2 + 1]; + } else { + nextPointX = points[0]; + nextPointY = points[1]; + } + + // Current line: [currentPointX, currentPointY] to [nextPointX, nextPointY] + + // Assume CCW polygon winding + + var offsetX = nextPointY - currentPointY; + var offsetY = -(nextPointX - currentPointX); + + // Normalize + var offsetLength = Math.sqrt(offsetX * offsetX + offsetY * offsetY); + var normalizedOffsetX = offsetX / offsetLength; + var normalizedOffsetY = offsetY / offsetLength; + expandedLineSet[i * 4] = currentPointX + normalizedOffsetX * pad; + expandedLineSet[i * 4 + 1] = currentPointY + normalizedOffsetY * pad; + expandedLineSet[i * 4 + 2] = nextPointX + normalizedOffsetX * pad; + expandedLineSet[i * 4 + 3] = nextPointY + normalizedOffsetY * pad; + } + return expandedLineSet; +}; +var intersectLineEllipse = function intersectLineEllipse(x, y, centerX, centerY, ellipseWradius, ellipseHradius) { + var dispX = centerX - x; + var dispY = centerY - y; + dispX /= ellipseWradius; + dispY /= ellipseHradius; + var len = Math.sqrt(dispX * dispX + dispY * dispY); + var newLength = len - 1; + if (newLength < 0) { + return []; + } + var lenProportion = newLength / len; + return [(centerX - x) * lenProportion + x, (centerY - y) * lenProportion + y]; +}; +var checkInEllipse = function checkInEllipse(x, y, width, height, centerX, centerY, padding) { + x -= centerX; + y -= centerY; + x /= width / 2 + padding; + y /= height / 2 + padding; + return x * x + y * y <= 1; +}; + +// Returns intersections of increasing distance from line's start point +var intersectLineCircle = function intersectLineCircle(x1, y1, x2, y2, centerX, centerY, radius) { + // Calculate d, direction vector of line + var d = [x2 - x1, y2 - y1]; // Direction vector of line + var f = [x1 - centerX, y1 - centerY]; + var a = d[0] * d[0] + d[1] * d[1]; + var b = 2 * (f[0] * d[0] + f[1] * d[1]); + var c = f[0] * f[0] + f[1] * f[1] - radius * radius; + var discriminant = b * b - 4 * a * c; + if (discriminant < 0) { + return []; + } + var t1 = (-b + Math.sqrt(discriminant)) / (2 * a); + var t2 = (-b - Math.sqrt(discriminant)) / (2 * a); + var tMin = Math.min(t1, t2); + var tMax = Math.max(t1, t2); + var inRangeParams = []; + if (tMin >= 0 && tMin <= 1) { + inRangeParams.push(tMin); + } + if (tMax >= 0 && tMax <= 1) { + inRangeParams.push(tMax); + } + if (inRangeParams.length === 0) { + return []; + } + var nearIntersectionX = inRangeParams[0] * d[0] + x1; + var nearIntersectionY = inRangeParams[0] * d[1] + y1; + if (inRangeParams.length > 1) { + if (inRangeParams[0] == inRangeParams[1]) { + return [nearIntersectionX, nearIntersectionY]; + } else { + var farIntersectionX = inRangeParams[1] * d[0] + x1; + var farIntersectionY = inRangeParams[1] * d[1] + y1; + return [nearIntersectionX, nearIntersectionY, farIntersectionX, farIntersectionY]; + } + } else { + return [nearIntersectionX, nearIntersectionY]; + } +}; +var midOfThree = function midOfThree(a, b, c) { + if (b <= a && a <= c || c <= a && a <= b) { + return a; + } else if (a <= b && b <= c || c <= b && b <= a) { + return b; + } else { + return c; + } +}; + +// (x1,y1)=>(x2,y2) intersect with (x3,y3)=>(x4,y4) +var finiteLinesIntersect = function finiteLinesIntersect(x1, y1, x2, y2, x3, y3, x4, y4, infiniteLines) { + var dx13 = x1 - x3; + var dx21 = x2 - x1; + var dx43 = x4 - x3; + var dy13 = y1 - y3; + var dy21 = y2 - y1; + var dy43 = y4 - y3; + var ua_t = dx43 * dy13 - dy43 * dx13; + var ub_t = dx21 * dy13 - dy21 * dx13; + var u_b = dy43 * dx21 - dx43 * dy21; + if (u_b !== 0) { + var ua = ua_t / u_b; + var ub = ub_t / u_b; + var flptThreshold = 0.001; + var _min = 0 - flptThreshold; + var _max = 1 + flptThreshold; + if (_min <= ua && ua <= _max && _min <= ub && ub <= _max) { + return [x1 + ua * dx21, y1 + ua * dy21]; + } else { + if (!infiniteLines) { + return []; + } else { + return [x1 + ua * dx21, y1 + ua * dy21]; + } + } + } else { + if (ua_t === 0 || ub_t === 0) { + // Parallel, coincident lines. Check if overlap + + // Check endpoint of second line + if (midOfThree(x1, x2, x4) === x4) { + return [x4, y4]; + } + + // Check start point of second line + if (midOfThree(x1, x2, x3) === x3) { + return [x3, y3]; + } + + // Endpoint of first line + if (midOfThree(x3, x4, x2) === x2) { + return [x2, y2]; + } + return []; + } else { + // Parallel, non-coincident + return []; + } + } +}; + +// math.polygonIntersectLine( x, y, basePoints, centerX, centerY, width, height, padding ) +// intersect a node polygon (pts transformed) +// +// math.polygonIntersectLine( x, y, basePoints, centerX, centerY ) +// intersect the points (no transform) +var polygonIntersectLine = function polygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding) { + var intersections = []; + var intersection; + var transformedPoints = new Array(basePoints.length); + var doTransform = true; + if (width == null) { + doTransform = false; + } + var points; + if (doTransform) { + for (var i = 0; i < transformedPoints.length / 2; i++) { + transformedPoints[i * 2] = basePoints[i * 2] * width + centerX; + transformedPoints[i * 2 + 1] = basePoints[i * 2 + 1] * height + centerY; + } + if (padding > 0) { + var expandedLineSet = expandPolygon(transformedPoints, -padding); + points = joinLines(expandedLineSet); + } else { + points = transformedPoints; + } + } else { + points = basePoints; + } + var currentX, currentY, nextX, nextY; + for (var _i2 = 0; _i2 < points.length / 2; _i2++) { + currentX = points[_i2 * 2]; + currentY = points[_i2 * 2 + 1]; + if (_i2 < points.length / 2 - 1) { + nextX = points[(_i2 + 1) * 2]; + nextY = points[(_i2 + 1) * 2 + 1]; + } else { + nextX = points[0]; + nextY = points[1]; + } + intersection = finiteLinesIntersect(x, y, centerX, centerY, currentX, currentY, nextX, nextY); + if (intersection.length !== 0) { + intersections.push(intersection[0], intersection[1]); + } + } + return intersections; +}; +var roundPolygonIntersectLine = function roundPolygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding) { + var intersections = []; + var intersection; + var lines = new Array(basePoints.length); + var halfW = width / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width, height); + for (var i = 0; i < basePoints.length / 4; i++) { + var sourceUv = void 0, + destUv = void 0; + if (i === 0) { + sourceUv = basePoints.length - 2; + } else { + sourceUv = i * 4 - 2; + } + destUv = i * 4 + 2; + var px = centerX + halfW * basePoints[i * 4]; + var py = centerY + halfH * basePoints[i * 4 + 1]; + var cosTheta = -basePoints[sourceUv] * basePoints[destUv] - basePoints[sourceUv + 1] * basePoints[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * basePoints[sourceUv]; + var cp0y = py - offset * basePoints[sourceUv + 1]; + var cp1x = px + offset * basePoints[destUv]; + var cp1y = py + offset * basePoints[destUv + 1]; + if (i === 0) { + lines[basePoints.length - 2] = cp0x; + lines[basePoints.length - 1] = cp0y; + } else { + lines[i * 4 - 2] = cp0x; + lines[i * 4 - 1] = cp0y; + } + lines[i * 4] = cp1x; + lines[i * 4 + 1] = cp1y; + var orthx = basePoints[sourceUv + 1]; + var orthy = -basePoints[sourceUv]; + var cosAlpha = orthx * basePoints[destUv] + orthy * basePoints[destUv + 1]; + if (cosAlpha < 0) { + orthx *= -1; + orthy *= -1; + } + var cx = cp0x + orthx * cornerRadius; + var cy = cp0y + orthy * cornerRadius; + intersection = intersectLineCircle(x, y, centerX, centerY, cx, cy, cornerRadius); + if (intersection.length !== 0) { + intersections.push(intersection[0], intersection[1]); + } + } + for (var _i3 = 0; _i3 < lines.length / 4; _i3++) { + intersection = finiteLinesIntersect(x, y, centerX, centerY, lines[_i3 * 4], lines[_i3 * 4 + 1], lines[_i3 * 4 + 2], lines[_i3 * 4 + 3], false); + if (intersection.length !== 0) { + intersections.push(intersection[0], intersection[1]); + } + } + if (intersections.length > 2) { + var lowestIntersection = [intersections[0], intersections[1]]; + var lowestSquaredDistance = Math.pow(lowestIntersection[0] - x, 2) + Math.pow(lowestIntersection[1] - y, 2); + for (var _i4 = 1; _i4 < intersections.length / 2; _i4++) { + var squaredDistance = Math.pow(intersections[_i4 * 2] - x, 2) + Math.pow(intersections[_i4 * 2 + 1] - y, 2); + if (squaredDistance <= lowestSquaredDistance) { + lowestIntersection[0] = intersections[_i4 * 2]; + lowestIntersection[1] = intersections[_i4 * 2 + 1]; + lowestSquaredDistance = squaredDistance; + } + } + return lowestIntersection; + } + return intersections; +}; +var shortenIntersection = function shortenIntersection(intersection, offset, amount) { + var disp = [intersection[0] - offset[0], intersection[1] - offset[1]]; + var length = Math.sqrt(disp[0] * disp[0] + disp[1] * disp[1]); + var lenRatio = (length - amount) / length; + if (lenRatio < 0) { + lenRatio = 0.00001; + } + return [offset[0] + lenRatio * disp[0], offset[1] + lenRatio * disp[1]]; +}; +var generateUnitNgonPointsFitToSquare = function generateUnitNgonPointsFitToSquare(sides, rotationRadians) { + var points = generateUnitNgonPoints(sides, rotationRadians); + points = fitPolygonToSquare(points); + return points; +}; +var fitPolygonToSquare = function fitPolygonToSquare(points) { + var x, y; + var sides = points.length / 2; + var minX = Infinity, + minY = Infinity, + maxX = -Infinity, + maxY = -Infinity; + for (var i = 0; i < sides; i++) { + x = points[2 * i]; + y = points[2 * i + 1]; + minX = Math.min(minX, x); + maxX = Math.max(maxX, x); + minY = Math.min(minY, y); + maxY = Math.max(maxY, y); + } + + // stretch factors + var sx = 2 / (maxX - minX); + var sy = 2 / (maxY - minY); + for (var _i5 = 0; _i5 < sides; _i5++) { + x = points[2 * _i5] = points[2 * _i5] * sx; + y = points[2 * _i5 + 1] = points[2 * _i5 + 1] * sy; + minX = Math.min(minX, x); + maxX = Math.max(maxX, x); + minY = Math.min(minY, y); + maxY = Math.max(maxY, y); + } + if (minY < -1) { + for (var _i6 = 0; _i6 < sides; _i6++) { + y = points[2 * _i6 + 1] = points[2 * _i6 + 1] + (-1 - minY); + } + } + return points; +}; +var generateUnitNgonPoints = function generateUnitNgonPoints(sides, rotationRadians) { + var increment = 1.0 / sides * 2 * Math.PI; + var startAngle = sides % 2 === 0 ? Math.PI / 2.0 + increment / 2.0 : Math.PI / 2.0; + startAngle += rotationRadians; + var points = new Array(sides * 2); + var currentAngle; + for (var i = 0; i < sides; i++) { + currentAngle = i * increment + startAngle; + points[2 * i] = Math.cos(currentAngle); // x + points[2 * i + 1] = Math.sin(-currentAngle); // y + } + + return points; +}; + +// Set the default radius, unless half of width or height is smaller than default +var getRoundRectangleRadius = function getRoundRectangleRadius(width, height) { + return Math.min(width / 4, height / 4, 8); +}; + +// Set the default radius +var getRoundPolygonRadius = function getRoundPolygonRadius(width, height) { + return Math.min(width / 10, height / 10, 8); +}; +var getCutRectangleCornerLength = function getCutRectangleCornerLength() { + return 8; +}; +var bezierPtsToQuadCoeff = function bezierPtsToQuadCoeff(p0, p1, p2) { + return [p0 - 2 * p1 + p2, 2 * (p1 - p0), p0]; +}; + +// get curve width, height, and control point position offsets as a percentage of node height / width +var getBarrelCurveConstants = function getBarrelCurveConstants(width, height) { + return { + heightOffset: Math.min(15, 0.05 * height), + widthOffset: Math.min(100, 0.25 * width), + ctrlPtOffsetPct: 0.05 + }; +}; + +var pageRankDefaults = defaults$g({ + dampingFactor: 0.8, + precision: 0.000001, + iterations: 200, + weight: function weight(edge) { + return 1; + } +}); +var elesfn$o = { + pageRank: function pageRank(options) { + var _pageRankDefaults = pageRankDefaults(options), + dampingFactor = _pageRankDefaults.dampingFactor, + precision = _pageRankDefaults.precision, + iterations = _pageRankDefaults.iterations, + weight = _pageRankDefaults.weight; + var cy = this._private.cy; + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + var numNodes = nodes.length; + var numNodesSqd = numNodes * numNodes; + var numEdges = edges.length; + + // Construct transposed adjacency matrix + // First lets have a zeroed matrix of the right size + // We'll also keep track of the sum of each column + var matrix = new Array(numNodesSqd); + var columnSum = new Array(numNodes); + var additionalProb = (1 - dampingFactor) / numNodes; + + // Create null matrix + for (var i = 0; i < numNodes; i++) { + for (var j = 0; j < numNodes; j++) { + var n = i * numNodes + j; + matrix[n] = 0; + } + columnSum[i] = 0; + } + + // Now, process edges + for (var _i = 0; _i < numEdges; _i++) { + var edge = edges[_i]; + var srcId = edge.data('source'); + var tgtId = edge.data('target'); + + // Don't include loops in the matrix + if (srcId === tgtId) { + continue; + } + var s = nodes.indexOfId(srcId); + var t = nodes.indexOfId(tgtId); + var w = weight(edge); + var _n = t * numNodes + s; + + // Update matrix + matrix[_n] += w; + + // Update column sum + columnSum[s] += w; + } + + // Add additional probability based on damping factor + // Also, take into account columns that have sum = 0 + var p = 1.0 / numNodes + additionalProb; // Shorthand + + // Traverse matrix, column by column + for (var _j = 0; _j < numNodes; _j++) { + if (columnSum[_j] === 0) { + // No 'links' out from node jth, assume equal probability for each possible node + for (var _i2 = 0; _i2 < numNodes; _i2++) { + var _n2 = _i2 * numNodes + _j; + matrix[_n2] = p; + } + } else { + // Node jth has outgoing link, compute normalized probabilities + for (var _i3 = 0; _i3 < numNodes; _i3++) { + var _n3 = _i3 * numNodes + _j; + matrix[_n3] = matrix[_n3] / columnSum[_j] + additionalProb; + } + } + } + + // Compute dominant eigenvector using power method + var eigenvector = new Array(numNodes); + var temp = new Array(numNodes); + var previous; + + // Start with a vector of all 1's + // Also, initialize a null vector which will be used as shorthand + for (var _i4 = 0; _i4 < numNodes; _i4++) { + eigenvector[_i4] = 1; + } + for (var iter = 0; iter < iterations; iter++) { + // Temp array with all 0's + for (var _i5 = 0; _i5 < numNodes; _i5++) { + temp[_i5] = 0; + } + + // Multiply matrix with previous result + for (var _i6 = 0; _i6 < numNodes; _i6++) { + for (var _j2 = 0; _j2 < numNodes; _j2++) { + var _n4 = _i6 * numNodes + _j2; + temp[_i6] += matrix[_n4] * eigenvector[_j2]; + } + } + inPlaceSumNormalize(temp); + previous = eigenvector; + eigenvector = temp; + temp = previous; + var diff = 0; + // Compute difference (squared module) of both vectors + for (var _i7 = 0; _i7 < numNodes; _i7++) { + var delta = previous[_i7] - eigenvector[_i7]; + diff += delta * delta; + } + + // If difference is less than the desired threshold, stop iterating + if (diff < precision) { + break; + } + } + + // Construct result + var res = { + rank: function rank(node) { + node = cy.collection(node)[0]; + return eigenvector[nodes.indexOf(node)]; + } + }; + return res; + } // pageRank +}; // elesfn + +var defaults$f = defaults$g({ + root: null, + weight: function weight(edge) { + return 1; + }, + directed: false, + alpha: 0 +}); +var elesfn$n = { + degreeCentralityNormalized: function degreeCentralityNormalized(options) { + options = defaults$f(options); + var cy = this.cy(); + var nodes = this.nodes(); + var numNodes = nodes.length; + if (!options.directed) { + var degrees = {}; + var maxDegree = 0; + for (var i = 0; i < numNodes; i++) { + var node = nodes[i]; + + // add current node to the current options object and call degreeCentrality + options.root = node; + var currDegree = this.degreeCentrality(options); + if (maxDegree < currDegree.degree) { + maxDegree = currDegree.degree; + } + degrees[node.id()] = currDegree.degree; + } + return { + degree: function degree(node) { + if (maxDegree === 0) { + return 0; + } + if (string(node)) { + // from is a selector string + node = cy.filter(node); + } + return degrees[node.id()] / maxDegree; + } + }; + } else { + var indegrees = {}; + var outdegrees = {}; + var maxIndegree = 0; + var maxOutdegree = 0; + for (var _i = 0; _i < numNodes; _i++) { + var _node = nodes[_i]; + var id = _node.id(); + + // add current node to the current options object and call degreeCentrality + options.root = _node; + var _currDegree = this.degreeCentrality(options); + if (maxIndegree < _currDegree.indegree) maxIndegree = _currDegree.indegree; + if (maxOutdegree < _currDegree.outdegree) maxOutdegree = _currDegree.outdegree; + indegrees[id] = _currDegree.indegree; + outdegrees[id] = _currDegree.outdegree; + } + return { + indegree: function indegree(node) { + if (maxIndegree == 0) { + return 0; + } + if (string(node)) { + // from is a selector string + node = cy.filter(node); + } + return indegrees[node.id()] / maxIndegree; + }, + outdegree: function outdegree(node) { + if (maxOutdegree === 0) { + return 0; + } + if (string(node)) { + // from is a selector string + node = cy.filter(node); + } + return outdegrees[node.id()] / maxOutdegree; + } + }; + } + }, + // degreeCentralityNormalized + + // Implemented from the algorithm in Opsahl's paper + // "Node centrality in weighted networks: Generalizing degree and shortest paths" + // check the heading 2 "Degree" + degreeCentrality: function degreeCentrality(options) { + options = defaults$f(options); + var cy = this.cy(); + var callingEles = this; + var _options = options, + root = _options.root, + weight = _options.weight, + directed = _options.directed, + alpha = _options.alpha; + root = cy.collection(root)[0]; + if (!directed) { + var connEdges = root.connectedEdges().intersection(callingEles); + var k = connEdges.length; + var s = 0; + + // Now, sum edge weights + for (var i = 0; i < connEdges.length; i++) { + s += weight(connEdges[i]); + } + return { + degree: Math.pow(k, 1 - alpha) * Math.pow(s, alpha) + }; + } else { + var edges = root.connectedEdges(); + var incoming = edges.filter(function (edge) { + return edge.target().same(root) && callingEles.has(edge); + }); + var outgoing = edges.filter(function (edge) { + return edge.source().same(root) && callingEles.has(edge); + }); + var k_in = incoming.length; + var k_out = outgoing.length; + var s_in = 0; + var s_out = 0; + + // Now, sum incoming edge weights + for (var _i2 = 0; _i2 < incoming.length; _i2++) { + s_in += weight(incoming[_i2]); + } + + // Now, sum outgoing edge weights + for (var _i3 = 0; _i3 < outgoing.length; _i3++) { + s_out += weight(outgoing[_i3]); + } + return { + indegree: Math.pow(k_in, 1 - alpha) * Math.pow(s_in, alpha), + outdegree: Math.pow(k_out, 1 - alpha) * Math.pow(s_out, alpha) + }; + } + } // degreeCentrality +}; // elesfn + +// nice, short mathematical alias +elesfn$n.dc = elesfn$n.degreeCentrality; +elesfn$n.dcn = elesfn$n.degreeCentralityNormalised = elesfn$n.degreeCentralityNormalized; + +var defaults$e = defaults$g({ + harmonic: true, + weight: function weight() { + return 1; + }, + directed: false, + root: null +}); +var elesfn$m = { + closenessCentralityNormalized: function closenessCentralityNormalized(options) { + var _defaults = defaults$e(options), + harmonic = _defaults.harmonic, + weight = _defaults.weight, + directed = _defaults.directed; + var cy = this.cy(); + var closenesses = {}; + var maxCloseness = 0; + var nodes = this.nodes(); + var fw = this.floydWarshall({ + weight: weight, + directed: directed + }); + + // Compute closeness for every node and find the maximum closeness + for (var i = 0; i < nodes.length; i++) { + var currCloseness = 0; + var node_i = nodes[i]; + for (var j = 0; j < nodes.length; j++) { + if (i !== j) { + var d = fw.distance(node_i, nodes[j]); + if (harmonic) { + currCloseness += 1 / d; + } else { + currCloseness += d; + } + } + } + if (!harmonic) { + currCloseness = 1 / currCloseness; + } + if (maxCloseness < currCloseness) { + maxCloseness = currCloseness; + } + closenesses[node_i.id()] = currCloseness; + } + return { + closeness: function closeness(node) { + if (maxCloseness == 0) { + return 0; + } + if (string(node)) { + // from is a selector string + node = cy.filter(node)[0].id(); + } else { + // from is a node + node = node.id(); + } + return closenesses[node] / maxCloseness; + } + }; + }, + // Implemented from pseudocode from wikipedia + closenessCentrality: function closenessCentrality(options) { + var _defaults2 = defaults$e(options), + root = _defaults2.root, + weight = _defaults2.weight, + directed = _defaults2.directed, + harmonic = _defaults2.harmonic; + root = this.filter(root)[0]; + + // we need distance from this node to every other node + var dijkstra = this.dijkstra({ + root: root, + weight: weight, + directed: directed + }); + var totalDistance = 0; + var nodes = this.nodes(); + for (var i = 0; i < nodes.length; i++) { + var n = nodes[i]; + if (!n.same(root)) { + var d = dijkstra.distanceTo(n); + if (harmonic) { + totalDistance += 1 / d; + } else { + totalDistance += d; + } + } + } + return harmonic ? totalDistance : 1 / totalDistance; + } // closenessCentrality +}; // elesfn + +// nice, short mathematical alias +elesfn$m.cc = elesfn$m.closenessCentrality; +elesfn$m.ccn = elesfn$m.closenessCentralityNormalised = elesfn$m.closenessCentralityNormalized; + +var defaults$d = defaults$g({ + weight: null, + directed: false +}); +var elesfn$l = { + // Implemented from the algorithm in the paper "On Variants of Shortest-Path Betweenness Centrality and their Generic Computation" by Ulrik Brandes + betweennessCentrality: function betweennessCentrality(options) { + var _defaults = defaults$d(options), + directed = _defaults.directed, + weight = _defaults.weight; + var weighted = weight != null; + var cy = this.cy(); + + // starting + var V = this.nodes(); + var A = {}; + var _C = {}; + var max = 0; + var C = { + set: function set(key, val) { + _C[key] = val; + if (val > max) { + max = val; + } + }, + get: function get(key) { + return _C[key]; + } + }; + + // A contains the neighborhoods of every node + for (var i = 0; i < V.length; i++) { + var v = V[i]; + var vid = v.id(); + if (directed) { + A[vid] = v.outgoers().nodes(); // get outgoers of every node + } else { + A[vid] = v.openNeighborhood().nodes(); // get neighbors of every node + } + + C.set(vid, 0); + } + var _loop = function _loop(s) { + var sid = V[s].id(); + var S = []; // stack + var P = {}; + var g = {}; + var d = {}; + var Q = new Heap__default["default"](function (a, b) { + return d[a] - d[b]; + }); // queue + + // init dictionaries + for (var _i = 0; _i < V.length; _i++) { + var _vid = V[_i].id(); + P[_vid] = []; + g[_vid] = 0; + d[_vid] = Infinity; + } + g[sid] = 1; // sigma + d[sid] = 0; // distance to s + + Q.push(sid); + while (!Q.empty()) { + var _v = Q.pop(); + S.push(_v); + if (weighted) { + for (var j = 0; j < A[_v].length; j++) { + var w = A[_v][j]; + var vEle = cy.getElementById(_v); + var edge = void 0; + if (vEle.edgesTo(w).length > 0) { + edge = vEle.edgesTo(w)[0]; + } else { + edge = w.edgesTo(vEle)[0]; + } + var edgeWeight = weight(edge); + w = w.id(); + if (d[w] > d[_v] + edgeWeight) { + d[w] = d[_v] + edgeWeight; + if (Q.nodes.indexOf(w) < 0) { + //if w is not in Q + Q.push(w); + } else { + // update position if w is in Q + Q.updateItem(w); + } + g[w] = 0; + P[w] = []; + } + if (d[w] == d[_v] + edgeWeight) { + g[w] = g[w] + g[_v]; + P[w].push(_v); + } + } + } else { + for (var _j = 0; _j < A[_v].length; _j++) { + var _w = A[_v][_j].id(); + if (d[_w] == Infinity) { + Q.push(_w); + d[_w] = d[_v] + 1; + } + if (d[_w] == d[_v] + 1) { + g[_w] = g[_w] + g[_v]; + P[_w].push(_v); + } + } + } + } + var e = {}; + for (var _i2 = 0; _i2 < V.length; _i2++) { + e[V[_i2].id()] = 0; + } + while (S.length > 0) { + var _w2 = S.pop(); + for (var _j2 = 0; _j2 < P[_w2].length; _j2++) { + var _v2 = P[_w2][_j2]; + e[_v2] = e[_v2] + g[_v2] / g[_w2] * (1 + e[_w2]); + } + if (_w2 != V[s].id()) { + C.set(_w2, C.get(_w2) + e[_w2]); + } + } + }; + for (var s = 0; s < V.length; s++) { + _loop(s); + } + var ret = { + betweenness: function betweenness(node) { + var id = cy.collection(node).id(); + return C.get(id); + }, + betweennessNormalized: function betweennessNormalized(node) { + if (max == 0) { + return 0; + } + var id = cy.collection(node).id(); + return C.get(id) / max; + } + }; + + // alias + ret.betweennessNormalised = ret.betweennessNormalized; + return ret; + } // betweennessCentrality +}; // elesfn + +// nice, short mathematical alias +elesfn$l.bc = elesfn$l.betweennessCentrality; + +// Implemented by Zoe Xi @zoexi for GSOC 2016 + +/* eslint-disable no-unused-vars */ +var defaults$c = defaults$g({ + expandFactor: 2, + // affects time of computation and cluster granularity to some extent: M * M + inflateFactor: 2, + // affects cluster granularity (the greater the value, the more clusters): M(i,j) / E(j) + multFactor: 1, + // optional self loops for each node. Use a neutral value to improve cluster computations. + maxIterations: 20, + // maximum number of iterations of the MCL algorithm in a single run + attributes: [ + // attributes/features used to group nodes, ie. similarity values between nodes + function (edge) { + return 1; + }] +}); +/* eslint-enable */ + +var setOptions$3 = function setOptions(options) { + return defaults$c(options); +}; +/* eslint-enable */ + +var getSimilarity$1 = function getSimilarity(edge, attributes) { + var total = 0; + for (var i = 0; i < attributes.length; i++) { + total += attributes[i](edge); + } + return total; +}; +var addLoops = function addLoops(M, n, val) { + for (var i = 0; i < n; i++) { + M[i * n + i] = val; + } +}; +var normalize = function normalize(M, n) { + var sum; + for (var col = 0; col < n; col++) { + sum = 0; + for (var row = 0; row < n; row++) { + sum += M[row * n + col]; + } + for (var _row = 0; _row < n; _row++) { + M[_row * n + col] = M[_row * n + col] / sum; + } + } +}; + +// TODO: blocked matrix multiplication? +var mmult = function mmult(A, B, n) { + var C = new Array(n * n); + for (var i = 0; i < n; i++) { + for (var j = 0; j < n; j++) { + C[i * n + j] = 0; + } + for (var k = 0; k < n; k++) { + for (var _j = 0; _j < n; _j++) { + C[i * n + _j] += A[i * n + k] * B[k * n + _j]; + } + } + } + return C; +}; +var expand = function expand(M, n, expandFactor /** power **/) { + var _M = M.slice(0); + for (var p = 1; p < expandFactor; p++) { + M = mmult(M, _M, n); + } + return M; +}; +var inflate = function inflate(M, n, inflateFactor /** r **/) { + var _M = new Array(n * n); + + // M(i,j) ^ inflatePower + for (var i = 0; i < n * n; i++) { + _M[i] = Math.pow(M[i], inflateFactor); + } + normalize(_M, n); + return _M; +}; +var hasConverged = function hasConverged(M, _M, n2, roundFactor) { + // Check that both matrices have the same elements (i,j) + for (var i = 0; i < n2; i++) { + var v1 = Math.round(M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); // truncate to 'roundFactor' decimal places + var v2 = Math.round(_M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); + if (v1 !== v2) { + return false; + } + } + return true; +}; +var assign$2 = function assign(M, n, nodes, cy) { + var clusters = []; + for (var i = 0; i < n; i++) { + var cluster = []; + for (var j = 0; j < n; j++) { + // Row-wise attractors and elements that they attract belong in same cluster + if (Math.round(M[i * n + j] * 1000) / 1000 > 0) { + cluster.push(nodes[j]); + } + } + if (cluster.length !== 0) { + clusters.push(cy.collection(cluster)); + } + } + return clusters; +}; +var isDuplicate = function isDuplicate(c1, c2) { + for (var i = 0; i < c1.length; i++) { + if (!c2[i] || c1[i].id() !== c2[i].id()) { + return false; + } + } + return true; +}; +var removeDuplicates = function removeDuplicates(clusters) { + for (var i = 0; i < clusters.length; i++) { + for (var j = 0; j < clusters.length; j++) { + if (i != j && isDuplicate(clusters[i], clusters[j])) { + clusters.splice(j, 1); + } + } + } + return clusters; +}; +var markovClustering = function markovClustering(options) { + var nodes = this.nodes(); + var edges = this.edges(); + var cy = this.cy(); + + // Set parameters of algorithm: + var opts = setOptions$3(options); + + // Map each node to its position in node array + var id2position = {}; + for (var i = 0; i < nodes.length; i++) { + id2position[nodes[i].id()] = i; + } + + // Generate stochastic matrix M from input graph G (should be symmetric/undirected) + var n = nodes.length, + n2 = n * n; + var M = new Array(n2), + _M; + for (var _i = 0; _i < n2; _i++) { + M[_i] = 0; + } + for (var e = 0; e < edges.length; e++) { + var edge = edges[e]; + var _i2 = id2position[edge.source().id()]; + var j = id2position[edge.target().id()]; + var sim = getSimilarity$1(edge, opts.attributes); + M[_i2 * n + j] += sim; // G should be symmetric and undirected + M[j * n + _i2] += sim; + } + + // Begin Markov cluster algorithm + + // Step 1: Add self loops to each node, ie. add multFactor to matrix diagonal + addLoops(M, n, opts.multFactor); + + // Step 2: M = normalize( M ); + normalize(M, n); + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + isStillMoving = false; + + // Step 3: + _M = expand(M, n, opts.expandFactor); + + // Step 4: + M = inflate(_M, n, opts.inflateFactor); + + // Step 5: check to see if ~steady state has been reached + if (!hasConverged(M, _M, n2, 4)) { + isStillMoving = true; + } + iterations++; + } + + // Build clusters from matrix + var clusters = assign$2(M, n, nodes, cy); + + // Remove duplicate clusters due to symmetry of graph and M matrix + clusters = removeDuplicates(clusters); + return clusters; +}; +var markovClustering$1 = { + markovClustering: markovClustering, + mcl: markovClustering +}; + +// Common distance metrics for clustering algorithms +var identity = function identity(x) { + return x; +}; +var absDiff = function absDiff(p, q) { + return Math.abs(q - p); +}; +var addAbsDiff = function addAbsDiff(total, p, q) { + return total + absDiff(p, q); +}; +var addSquaredDiff = function addSquaredDiff(total, p, q) { + return total + Math.pow(q - p, 2); +}; +var sqrt = function sqrt(x) { + return Math.sqrt(x); +}; +var maxAbsDiff = function maxAbsDiff(currentMax, p, q) { + return Math.max(currentMax, absDiff(p, q)); +}; +var getDistance = function getDistance(length, getP, getQ, init, visit) { + var post = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : identity; + var ret = init; + var p, q; + for (var dim = 0; dim < length; dim++) { + p = getP(dim); + q = getQ(dim); + ret = visit(ret, p, q); + } + return post(ret); +}; +var distances = { + euclidean: function euclidean(length, getP, getQ) { + if (length >= 2) { + return getDistance(length, getP, getQ, 0, addSquaredDiff, sqrt); + } else { + // for single attr case, more efficient to avoid sqrt + return getDistance(length, getP, getQ, 0, addAbsDiff); + } + }, + squaredEuclidean: function squaredEuclidean(length, getP, getQ) { + return getDistance(length, getP, getQ, 0, addSquaredDiff); + }, + manhattan: function manhattan(length, getP, getQ) { + return getDistance(length, getP, getQ, 0, addAbsDiff); + }, + max: function max(length, getP, getQ) { + return getDistance(length, getP, getQ, -Infinity, maxAbsDiff); + } +}; + +// in case the user accidentally doesn't use camel case +distances['squared-euclidean'] = distances['squaredEuclidean']; +distances['squaredeuclidean'] = distances['squaredEuclidean']; +function clusteringDistance (method, length, getP, getQ, nodeP, nodeQ) { + var impl; + if (fn$6(method)) { + impl = method; + } else { + impl = distances[method] || distances.euclidean; + } + if (length === 0 && fn$6(method)) { + return impl(nodeP, nodeQ); + } else { + return impl(length, getP, getQ, nodeP, nodeQ); + } +} + +var defaults$b = defaults$g({ + k: 2, + m: 2, + sensitivityThreshold: 0.0001, + distance: 'euclidean', + maxIterations: 10, + attributes: [], + testMode: false, + testCentroids: null +}); +var setOptions$2 = function setOptions(options) { + return defaults$b(options); +}; + +var getDist = function getDist(type, node, centroid, attributes, mode) { + var noNodeP = mode !== 'kMedoids'; + var getP = noNodeP ? function (i) { + return centroid[i]; + } : function (i) { + return attributes[i](centroid); + }; + var getQ = function getQ(i) { + return attributes[i](node); + }; + var nodeP = centroid; + var nodeQ = node; + return clusteringDistance(type, attributes.length, getP, getQ, nodeP, nodeQ); +}; +var randomCentroids = function randomCentroids(nodes, k, attributes) { + var ndim = attributes.length; + var min = new Array(ndim); + var max = new Array(ndim); + var centroids = new Array(k); + var centroid = null; + + // Find min, max values for each attribute dimension + for (var i = 0; i < ndim; i++) { + min[i] = nodes.min(attributes[i]).value; + max[i] = nodes.max(attributes[i]).value; + } + + // Build k centroids, each represented as an n-dim feature vector + for (var c = 0; c < k; c++) { + centroid = []; + for (var _i = 0; _i < ndim; _i++) { + centroid[_i] = Math.random() * (max[_i] - min[_i]) + min[_i]; // random initial value + } + + centroids[c] = centroid; + } + return centroids; +}; +var classify = function classify(node, centroids, distance, attributes, type) { + var min = Infinity; + var index = 0; + for (var i = 0; i < centroids.length; i++) { + var dist = getDist(distance, node, centroids[i], attributes, type); + if (dist < min) { + min = dist; + index = i; + } + } + return index; +}; +var buildCluster = function buildCluster(centroid, nodes, assignment) { + var cluster = []; + var node = null; + for (var n = 0; n < nodes.length; n++) { + node = nodes[n]; + if (assignment[node.id()] === centroid) { + //console.log("Node " + node.id() + " is associated with medoid #: " + m); + cluster.push(node); + } + } + return cluster; +}; +var haveValuesConverged = function haveValuesConverged(v1, v2, sensitivityThreshold) { + return Math.abs(v2 - v1) <= sensitivityThreshold; +}; +var haveMatricesConverged = function haveMatricesConverged(v1, v2, sensitivityThreshold) { + for (var i = 0; i < v1.length; i++) { + for (var j = 0; j < v1[i].length; j++) { + var diff = Math.abs(v1[i][j] - v2[i][j]); + if (diff > sensitivityThreshold) { + return false; + } + } + } + return true; +}; +var seenBefore = function seenBefore(node, medoids, n) { + for (var i = 0; i < n; i++) { + if (node === medoids[i]) return true; + } + return false; +}; +var randomMedoids = function randomMedoids(nodes, k) { + var medoids = new Array(k); + + // For small data sets, the probability of medoid conflict is greater, + // so we need to check to see if we've already seen or chose this node before. + if (nodes.length < 50) { + // Randomly select k medoids from the n nodes + for (var i = 0; i < k; i++) { + var node = nodes[Math.floor(Math.random() * nodes.length)]; + + // If we've already chosen this node to be a medoid, don't choose it again (for small data sets). + // Instead choose a different random node. + while (seenBefore(node, medoids, i)) { + node = nodes[Math.floor(Math.random() * nodes.length)]; + } + medoids[i] = node; + } + } else { + // Relatively large data set, so pretty safe to not check and just select random nodes + for (var _i2 = 0; _i2 < k; _i2++) { + medoids[_i2] = nodes[Math.floor(Math.random() * nodes.length)]; + } + } + return medoids; +}; +var findCost = function findCost(potentialNewMedoid, cluster, attributes) { + var cost = 0; + for (var n = 0; n < cluster.length; n++) { + cost += getDist('manhattan', cluster[n], potentialNewMedoid, attributes, 'kMedoids'); + } + return cost; +}; +var kMeans = function kMeans(options) { + var cy = this.cy(); + var nodes = this.nodes(); + var node = null; + + // Set parameters of algorithm: # of clusters, distance metric, etc. + var opts = setOptions$2(options); + + // Begin k-means algorithm + var clusters = new Array(opts.k); + var assignment = {}; + var centroids; + + // Step 1: Initialize centroid positions + if (opts.testMode) { + if (typeof opts.testCentroids === 'number') { + // TODO: implement a seeded random number generator. + opts.testCentroids; + centroids = randomCentroids(nodes, opts.k, opts.attributes); + } else if (_typeof(opts.testCentroids) === 'object') { + centroids = opts.testCentroids; + } else { + centroids = randomCentroids(nodes, opts.k, opts.attributes); + } + } else { + centroids = randomCentroids(nodes, opts.k, opts.attributes); + } + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + // Step 2: Assign nodes to the nearest centroid + for (var n = 0; n < nodes.length; n++) { + node = nodes[n]; + // Determine which cluster this node belongs to: node id => cluster # + assignment[node.id()] = classify(node, centroids, opts.distance, opts.attributes, 'kMeans'); + } + + // Step 3: For each of the k clusters, update its centroid + isStillMoving = false; + for (var c = 0; c < opts.k; c++) { + // Get all nodes that belong to this cluster + var cluster = buildCluster(c, nodes, assignment); + if (cluster.length === 0) { + // If cluster is empty, break out early & move to next cluster + continue; + } + + // Update centroids by calculating avg of all nodes within the cluster. + var ndim = opts.attributes.length; + var centroid = centroids[c]; // [ dim_1, dim_2, dim_3, ... , dim_n ] + var newCentroid = new Array(ndim); + var sum = new Array(ndim); + for (var d = 0; d < ndim; d++) { + sum[d] = 0.0; + for (var i = 0; i < cluster.length; i++) { + node = cluster[i]; + sum[d] += opts.attributes[d](node); + } + newCentroid[d] = sum[d] / cluster.length; + + // Check to see if algorithm has converged, i.e. when centroids no longer change + if (!haveValuesConverged(newCentroid[d], centroid[d], opts.sensitivityThreshold)) { + isStillMoving = true; + } + } + centroids[c] = newCentroid; + clusters[c] = cy.collection(cluster); + } + iterations++; + } + return clusters; +}; +var kMedoids = function kMedoids(options) { + var cy = this.cy(); + var nodes = this.nodes(); + var node = null; + var opts = setOptions$2(options); + + // Begin k-medoids algorithm + var clusters = new Array(opts.k); + var medoids; + var assignment = {}; + var curCost; + var minCosts = new Array(opts.k); // minimum cost configuration for each cluster + + // Step 1: Initialize k medoids + if (opts.testMode) { + if (typeof opts.testCentroids === 'number') ; else if (_typeof(opts.testCentroids) === 'object') { + medoids = opts.testCentroids; + } else { + medoids = randomMedoids(nodes, opts.k); + } + } else { + medoids = randomMedoids(nodes, opts.k); + } + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + // Step 2: Assign nodes to the nearest medoid + for (var n = 0; n < nodes.length; n++) { + node = nodes[n]; + // Determine which cluster this node belongs to: node id => cluster # + assignment[node.id()] = classify(node, medoids, opts.distance, opts.attributes, 'kMedoids'); + } + isStillMoving = false; + // Step 3: For each medoid m, and for each node associated with mediod m, + // select the node with the lowest configuration cost as new medoid. + for (var m = 0; m < medoids.length; m++) { + // Get all nodes that belong to this medoid + var cluster = buildCluster(m, nodes, assignment); + if (cluster.length === 0) { + // If cluster is empty, break out early & move to next cluster + continue; + } + minCosts[m] = findCost(medoids[m], cluster, opts.attributes); // original cost + + // Select different medoid if its configuration has the lowest cost + for (var _n = 0; _n < cluster.length; _n++) { + curCost = findCost(cluster[_n], cluster, opts.attributes); + if (curCost < minCosts[m]) { + minCosts[m] = curCost; + medoids[m] = cluster[_n]; + isStillMoving = true; + } + } + clusters[m] = cy.collection(cluster); + } + iterations++; + } + return clusters; +}; +var updateCentroids = function updateCentroids(centroids, nodes, U, weight, opts) { + var numerator, denominator; + for (var n = 0; n < nodes.length; n++) { + for (var c = 0; c < centroids.length; c++) { + weight[n][c] = Math.pow(U[n][c], opts.m); + } + } + for (var _c = 0; _c < centroids.length; _c++) { + for (var dim = 0; dim < opts.attributes.length; dim++) { + numerator = 0; + denominator = 0; + for (var _n2 = 0; _n2 < nodes.length; _n2++) { + numerator += weight[_n2][_c] * opts.attributes[dim](nodes[_n2]); + denominator += weight[_n2][_c]; + } + centroids[_c][dim] = numerator / denominator; + } + } +}; +var updateMembership = function updateMembership(U, _U, centroids, nodes, opts) { + // Save previous step + for (var i = 0; i < U.length; i++) { + _U[i] = U[i].slice(); + } + var sum, numerator, denominator; + var pow = 2 / (opts.m - 1); + for (var c = 0; c < centroids.length; c++) { + for (var n = 0; n < nodes.length; n++) { + sum = 0; + for (var k = 0; k < centroids.length; k++) { + // against all other centroids + numerator = getDist(opts.distance, nodes[n], centroids[c], opts.attributes, 'cmeans'); + denominator = getDist(opts.distance, nodes[n], centroids[k], opts.attributes, 'cmeans'); + sum += Math.pow(numerator / denominator, pow); + } + U[n][c] = 1 / sum; + } + } +}; +var assign$1 = function assign(nodes, U, opts, cy) { + var clusters = new Array(opts.k); + for (var c = 0; c < clusters.length; c++) { + clusters[c] = []; + } + var max; + var index; + for (var n = 0; n < U.length; n++) { + // for each node (U is N x C matrix) + max = -Infinity; + index = -1; + // Determine which cluster the node is most likely to belong in + for (var _c2 = 0; _c2 < U[0].length; _c2++) { + if (U[n][_c2] > max) { + max = U[n][_c2]; + index = _c2; + } + } + clusters[index].push(nodes[n]); + } + + // Turn every array into a collection of nodes + for (var _c3 = 0; _c3 < clusters.length; _c3++) { + clusters[_c3] = cy.collection(clusters[_c3]); + } + return clusters; +}; +var fuzzyCMeans = function fuzzyCMeans(options) { + var cy = this.cy(); + var nodes = this.nodes(); + var opts = setOptions$2(options); + + // Begin fuzzy c-means algorithm + var clusters; + var centroids; + var U; + var _U; + var weight; + + // Step 1: Initialize letiables. + _U = new Array(nodes.length); + for (var i = 0; i < nodes.length; i++) { + // N x C matrix + _U[i] = new Array(opts.k); + } + U = new Array(nodes.length); + for (var _i3 = 0; _i3 < nodes.length; _i3++) { + // N x C matrix + U[_i3] = new Array(opts.k); + } + for (var _i4 = 0; _i4 < nodes.length; _i4++) { + var total = 0; + for (var j = 0; j < opts.k; j++) { + U[_i4][j] = Math.random(); + total += U[_i4][j]; + } + for (var _j = 0; _j < opts.k; _j++) { + U[_i4][_j] = U[_i4][_j] / total; + } + } + centroids = new Array(opts.k); + for (var _i5 = 0; _i5 < opts.k; _i5++) { + centroids[_i5] = new Array(opts.attributes.length); + } + weight = new Array(nodes.length); + for (var _i6 = 0; _i6 < nodes.length; _i6++) { + // N x C matrix + weight[_i6] = new Array(opts.k); + } + // end init FCM + + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + isStillMoving = false; + + // Step 2: Calculate the centroids for each step. + updateCentroids(centroids, nodes, U, weight, opts); + + // Step 3: Update the partition matrix U. + updateMembership(U, _U, centroids, nodes, opts); + + // Step 4: Check for convergence. + if (!haveMatricesConverged(U, _U, opts.sensitivityThreshold)) { + isStillMoving = true; + } + iterations++; + } + + // Assign nodes to clusters with highest probability. + clusters = assign$1(nodes, U, opts, cy); + return { + clusters: clusters, + degreeOfMembership: U + }; +}; +var kClustering = { + kMeans: kMeans, + kMedoids: kMedoids, + fuzzyCMeans: fuzzyCMeans, + fcm: fuzzyCMeans +}; + +// Implemented by Zoe Xi @zoexi for GSOC 2016 +var defaults$a = defaults$g({ + distance: 'euclidean', + // distance metric to compare nodes + linkage: 'min', + // linkage criterion : how to determine the distance between clusters of nodes + mode: 'threshold', + // mode:'threshold' => clusters must be threshold distance apart + threshold: Infinity, + // the distance threshold + // mode:'dendrogram' => the nodes are organised as leaves in a tree (siblings are close), merging makes clusters + addDendrogram: false, + // whether to add the dendrogram to the graph for viz + dendrogramDepth: 0, + // depth at which dendrogram branches are merged into the returned clusters + attributes: [] // array of attr functions +}); + +var linkageAliases = { + 'single': 'min', + 'complete': 'max' +}; +var setOptions$1 = function setOptions(options) { + var opts = defaults$a(options); + var preferredAlias = linkageAliases[opts.linkage]; + if (preferredAlias != null) { + opts.linkage = preferredAlias; + } + return opts; +}; +var mergeClosest = function mergeClosest(clusters, index, dists, mins, opts) { + // Find two closest clusters from cached mins + var minKey = 0; + var min = Infinity; + var dist; + var attrs = opts.attributes; + var getDist = function getDist(n1, n2) { + return clusteringDistance(opts.distance, attrs.length, function (i) { + return attrs[i](n1); + }, function (i) { + return attrs[i](n2); + }, n1, n2); + }; + for (var i = 0; i < clusters.length; i++) { + var key = clusters[i].key; + var _dist = dists[key][mins[key]]; + if (_dist < min) { + minKey = key; + min = _dist; + } + } + if (opts.mode === 'threshold' && min >= opts.threshold || opts.mode === 'dendrogram' && clusters.length === 1) { + return false; + } + var c1 = index[minKey]; + var c2 = index[mins[minKey]]; + var merged; + + // Merge two closest clusters + if (opts.mode === 'dendrogram') { + merged = { + left: c1, + right: c2, + key: c1.key + }; + } else { + merged = { + value: c1.value.concat(c2.value), + key: c1.key + }; + } + clusters[c1.index] = merged; + clusters.splice(c2.index, 1); + index[c1.key] = merged; + + // Update distances with new merged cluster + for (var _i = 0; _i < clusters.length; _i++) { + var cur = clusters[_i]; + if (c1.key === cur.key) { + dist = Infinity; + } else if (opts.linkage === 'min') { + dist = dists[c1.key][cur.key]; + if (dists[c1.key][cur.key] > dists[c2.key][cur.key]) { + dist = dists[c2.key][cur.key]; + } + } else if (opts.linkage === 'max') { + dist = dists[c1.key][cur.key]; + if (dists[c1.key][cur.key] < dists[c2.key][cur.key]) { + dist = dists[c2.key][cur.key]; + } + } else if (opts.linkage === 'mean') { + dist = (dists[c1.key][cur.key] * c1.size + dists[c2.key][cur.key] * c2.size) / (c1.size + c2.size); + } else { + if (opts.mode === 'dendrogram') dist = getDist(cur.value, c1.value);else dist = getDist(cur.value[0], c1.value[0]); + } + dists[c1.key][cur.key] = dists[cur.key][c1.key] = dist; // distance matrix is symmetric + } + + // Update cached mins + for (var _i2 = 0; _i2 < clusters.length; _i2++) { + var key1 = clusters[_i2].key; + if (mins[key1] === c1.key || mins[key1] === c2.key) { + var _min = key1; + for (var j = 0; j < clusters.length; j++) { + var key2 = clusters[j].key; + if (dists[key1][key2] < dists[key1][_min]) { + _min = key2; + } + } + mins[key1] = _min; + } + clusters[_i2].index = _i2; + } + + // Clean up meta data used for clustering + c1.key = c2.key = c1.index = c2.index = null; + return true; +}; +var getAllChildren = function getAllChildren(root, arr, cy) { + if (!root) return; + if (root.value) { + arr.push(root.value); + } else { + if (root.left) getAllChildren(root.left, arr); + if (root.right) getAllChildren(root.right, arr); + } +}; +var buildDendrogram = function buildDendrogram(root, cy) { + if (!root) return ''; + if (root.left && root.right) { + var leftStr = buildDendrogram(root.left, cy); + var rightStr = buildDendrogram(root.right, cy); + var node = cy.add({ + group: 'nodes', + data: { + id: leftStr + ',' + rightStr + } + }); + cy.add({ + group: 'edges', + data: { + source: leftStr, + target: node.id() + } + }); + cy.add({ + group: 'edges', + data: { + source: rightStr, + target: node.id() + } + }); + return node.id(); + } else if (root.value) { + return root.value.id(); + } +}; +var buildClustersFromTree = function buildClustersFromTree(root, k, cy) { + if (!root) return []; + var left = [], + right = [], + leaves = []; + if (k === 0) { + // don't cut tree, simply return all nodes as 1 single cluster + if (root.left) getAllChildren(root.left, left); + if (root.right) getAllChildren(root.right, right); + leaves = left.concat(right); + return [cy.collection(leaves)]; + } else if (k === 1) { + // cut at root + + if (root.value) { + // leaf node + return [cy.collection(root.value)]; + } else { + if (root.left) getAllChildren(root.left, left); + if (root.right) getAllChildren(root.right, right); + return [cy.collection(left), cy.collection(right)]; + } + } else { + if (root.value) { + return [cy.collection(root.value)]; + } else { + if (root.left) left = buildClustersFromTree(root.left, k - 1, cy); + if (root.right) right = buildClustersFromTree(root.right, k - 1, cy); + return left.concat(right); + } + } +}; + +var hierarchicalClustering = function hierarchicalClustering(options) { + var cy = this.cy(); + var nodes = this.nodes(); + + // Set parameters of algorithm: linkage type, distance metric, etc. + var opts = setOptions$1(options); + var attrs = opts.attributes; + var getDist = function getDist(n1, n2) { + return clusteringDistance(opts.distance, attrs.length, function (i) { + return attrs[i](n1); + }, function (i) { + return attrs[i](n2); + }, n1, n2); + }; + + // Begin hierarchical algorithm + var clusters = []; + var dists = []; // distances between each pair of clusters + var mins = []; // closest cluster for each cluster + var index = []; // hash of all clusters by key + + // In agglomerative (bottom-up) clustering, each node starts as its own cluster + for (var n = 0; n < nodes.length; n++) { + var cluster = { + value: opts.mode === 'dendrogram' ? nodes[n] : [nodes[n]], + key: n, + index: n + }; + clusters[n] = cluster; + index[n] = cluster; + dists[n] = []; + mins[n] = 0; + } + + // Calculate the distance between each pair of clusters + for (var i = 0; i < clusters.length; i++) { + for (var j = 0; j <= i; j++) { + var dist = void 0; + if (opts.mode === 'dendrogram') { + // modes store cluster values differently + dist = i === j ? Infinity : getDist(clusters[i].value, clusters[j].value); + } else { + dist = i === j ? Infinity : getDist(clusters[i].value[0], clusters[j].value[0]); + } + dists[i][j] = dist; + dists[j][i] = dist; + if (dist < dists[i][mins[i]]) { + mins[i] = j; // Cache mins: closest cluster to cluster i is cluster j + } + } + } + + // Find the closest pair of clusters and merge them into a single cluster. + // Update distances between new cluster and each of the old clusters, and loop until threshold reached. + var merged = mergeClosest(clusters, index, dists, mins, opts); + while (merged) { + merged = mergeClosest(clusters, index, dists, mins, opts); + } + var retClusters; + + // Dendrogram mode builds the hierarchy and adds intermediary nodes + edges + // in addition to returning the clusters. + if (opts.mode === 'dendrogram') { + retClusters = buildClustersFromTree(clusters[0], opts.dendrogramDepth, cy); + if (opts.addDendrogram) buildDendrogram(clusters[0], cy); + } else { + // Regular mode simply returns the clusters + + retClusters = new Array(clusters.length); + clusters.forEach(function (cluster, i) { + // Clean up meta data used for clustering + cluster.key = cluster.index = null; + retClusters[i] = cy.collection(cluster.value); + }); + } + return retClusters; +}; +var hierarchicalClustering$1 = { + hierarchicalClustering: hierarchicalClustering, + hca: hierarchicalClustering +}; + +// Implemented by Zoe Xi @zoexi for GSOC 2016 +var defaults$9 = defaults$g({ + distance: 'euclidean', + // distance metric to compare attributes between two nodes + preference: 'median', + // suitability of a data point to serve as an exemplar + damping: 0.8, + // damping factor between [0.5, 1) + maxIterations: 1000, + // max number of iterations to run + minIterations: 100, + // min number of iterations to run in order for clustering to stop + attributes: [// functions to quantify the similarity between any two points + // e.g. node => node.data('weight') + ] +}); +var setOptions = function setOptions(options) { + var dmp = options.damping; + var pref = options.preference; + if (!(0.5 <= dmp && dmp < 1)) { + error("Damping must range on [0.5, 1). Got: ".concat(dmp)); + } + var validPrefs = ['median', 'mean', 'min', 'max']; + if (!(validPrefs.some(function (v) { + return v === pref; + }) || number$1(pref))) { + error("Preference must be one of [".concat(validPrefs.map(function (p) { + return "'".concat(p, "'"); + }).join(', '), "] or a number. Got: ").concat(pref)); + } + return defaults$9(options); +}; + +var getSimilarity = function getSimilarity(type, n1, n2, attributes) { + var attr = function attr(n, i) { + return attributes[i](n); + }; + + // nb negative because similarity should have an inverse relationship to distance + return -clusteringDistance(type, attributes.length, function (i) { + return attr(n1, i); + }, function (i) { + return attr(n2, i); + }, n1, n2); +}; +var getPreference = function getPreference(S, preference) { + // larger preference = greater # of clusters + var p = null; + if (preference === 'median') { + p = median(S); + } else if (preference === 'mean') { + p = mean(S); + } else if (preference === 'min') { + p = min(S); + } else if (preference === 'max') { + p = max(S); + } else { + // Custom preference number, as set by user + p = preference; + } + return p; +}; +var findExemplars = function findExemplars(n, R, A) { + var indices = []; + for (var i = 0; i < n; i++) { + if (R[i * n + i] + A[i * n + i] > 0) { + indices.push(i); + } + } + return indices; +}; +var assignClusters = function assignClusters(n, S, exemplars) { + var clusters = []; + for (var i = 0; i < n; i++) { + var index = -1; + var max = -Infinity; + for (var ei = 0; ei < exemplars.length; ei++) { + var e = exemplars[ei]; + if (S[i * n + e] > max) { + index = e; + max = S[i * n + e]; + } + } + if (index > 0) { + clusters.push(index); + } + } + for (var _ei = 0; _ei < exemplars.length; _ei++) { + clusters[exemplars[_ei]] = exemplars[_ei]; + } + return clusters; +}; +var assign = function assign(n, S, exemplars) { + var clusters = assignClusters(n, S, exemplars); + for (var ei = 0; ei < exemplars.length; ei++) { + var ii = []; + for (var c = 0; c < clusters.length; c++) { + if (clusters[c] === exemplars[ei]) { + ii.push(c); + } + } + var maxI = -1; + var maxSum = -Infinity; + for (var i = 0; i < ii.length; i++) { + var sum = 0; + for (var j = 0; j < ii.length; j++) { + sum += S[ii[j] * n + ii[i]]; + } + if (sum > maxSum) { + maxI = i; + maxSum = sum; + } + } + exemplars[ei] = ii[maxI]; + } + clusters = assignClusters(n, S, exemplars); + return clusters; +}; +var affinityPropagation = function affinityPropagation(options) { + var cy = this.cy(); + var nodes = this.nodes(); + var opts = setOptions(options); + + // Map each node to its position in node array + var id2position = {}; + for (var i = 0; i < nodes.length; i++) { + id2position[nodes[i].id()] = i; + } + + // Begin affinity propagation algorithm + + var n; // number of data points + var n2; // size of matrices + var S; // similarity matrix (1D array) + var p; // preference/suitability of a data point to serve as an exemplar + var R; // responsibility matrix (1D array) + var A; // availability matrix (1D array) + + n = nodes.length; + n2 = n * n; + + // Initialize and build S similarity matrix + S = new Array(n2); + for (var _i = 0; _i < n2; _i++) { + S[_i] = -Infinity; // for cases where two data points shouldn't be linked together + } + + for (var _i2 = 0; _i2 < n; _i2++) { + for (var j = 0; j < n; j++) { + if (_i2 !== j) { + S[_i2 * n + j] = getSimilarity(opts.distance, nodes[_i2], nodes[j], opts.attributes); + } + } + } + + // Place preferences on the diagonal of S + p = getPreference(S, opts.preference); + for (var _i3 = 0; _i3 < n; _i3++) { + S[_i3 * n + _i3] = p; + } + + // Initialize R responsibility matrix + R = new Array(n2); + for (var _i4 = 0; _i4 < n2; _i4++) { + R[_i4] = 0.0; + } + + // Initialize A availability matrix + A = new Array(n2); + for (var _i5 = 0; _i5 < n2; _i5++) { + A[_i5] = 0.0; + } + var old = new Array(n); + var Rp = new Array(n); + var se = new Array(n); + for (var _i6 = 0; _i6 < n; _i6++) { + old[_i6] = 0.0; + Rp[_i6] = 0.0; + se[_i6] = 0; + } + var e = new Array(n * opts.minIterations); + for (var _i7 = 0; _i7 < e.length; _i7++) { + e[_i7] = 0; + } + var iter; + for (iter = 0; iter < opts.maxIterations; iter++) { + // main algorithmic loop + + // Update R responsibility matrix + for (var _i8 = 0; _i8 < n; _i8++) { + var max = -Infinity, + max2 = -Infinity, + maxI = -1, + AS = 0.0; + for (var _j = 0; _j < n; _j++) { + old[_j] = R[_i8 * n + _j]; + AS = A[_i8 * n + _j] + S[_i8 * n + _j]; + if (AS >= max) { + max2 = max; + max = AS; + maxI = _j; + } else if (AS > max2) { + max2 = AS; + } + } + for (var _j2 = 0; _j2 < n; _j2++) { + R[_i8 * n + _j2] = (1 - opts.damping) * (S[_i8 * n + _j2] - max) + opts.damping * old[_j2]; + } + R[_i8 * n + maxI] = (1 - opts.damping) * (S[_i8 * n + maxI] - max2) + opts.damping * old[maxI]; + } + + // Update A availability matrix + for (var _i9 = 0; _i9 < n; _i9++) { + var sum = 0; + for (var _j3 = 0; _j3 < n; _j3++) { + old[_j3] = A[_j3 * n + _i9]; + Rp[_j3] = Math.max(0, R[_j3 * n + _i9]); + sum += Rp[_j3]; + } + sum -= Rp[_i9]; + Rp[_i9] = R[_i9 * n + _i9]; + sum += Rp[_i9]; + for (var _j4 = 0; _j4 < n; _j4++) { + A[_j4 * n + _i9] = (1 - opts.damping) * Math.min(0, sum - Rp[_j4]) + opts.damping * old[_j4]; + } + A[_i9 * n + _i9] = (1 - opts.damping) * (sum - Rp[_i9]) + opts.damping * old[_i9]; + } + + // Check for convergence + var K = 0; + for (var _i10 = 0; _i10 < n; _i10++) { + var E = A[_i10 * n + _i10] + R[_i10 * n + _i10] > 0 ? 1 : 0; + e[iter % opts.minIterations * n + _i10] = E; + K += E; + } + if (K > 0 && (iter >= opts.minIterations - 1 || iter == opts.maxIterations - 1)) { + var _sum = 0; + for (var _i11 = 0; _i11 < n; _i11++) { + se[_i11] = 0; + for (var _j5 = 0; _j5 < opts.minIterations; _j5++) { + se[_i11] += e[_j5 * n + _i11]; + } + if (se[_i11] === 0 || se[_i11] === opts.minIterations) { + _sum++; + } + } + if (_sum === n) { + // then we have convergence + break; + } + } + } + + // Identify exemplars (cluster centers) + var exemplarsIndices = findExemplars(n, R, A); + + // Assign nodes to clusters + var clusterIndices = assign(n, S, exemplarsIndices); + var clusters = {}; + for (var c = 0; c < exemplarsIndices.length; c++) { + clusters[exemplarsIndices[c]] = []; + } + for (var _i12 = 0; _i12 < nodes.length; _i12++) { + var pos = id2position[nodes[_i12].id()]; + var clusterIndex = clusterIndices[pos]; + if (clusterIndex != null) { + // the node may have not been assigned a cluster if no valid attributes were specified + clusters[clusterIndex].push(nodes[_i12]); + } + } + var retClusters = new Array(exemplarsIndices.length); + for (var _c = 0; _c < exemplarsIndices.length; _c++) { + retClusters[_c] = cy.collection(clusters[exemplarsIndices[_c]]); + } + return retClusters; +}; +var affinityPropagation$1 = { + affinityPropagation: affinityPropagation, + ap: affinityPropagation +}; + +var hierholzerDefaults = defaults$g({ + root: undefined, + directed: false +}); +var elesfn$k = { + hierholzer: function hierholzer(options) { + if (!plainObject(options)) { + var args = arguments; + options = { + root: args[0], + directed: args[1] + }; + } + var _hierholzerDefaults = hierholzerDefaults(options), + root = _hierholzerDefaults.root, + directed = _hierholzerDefaults.directed; + var eles = this; + var dflag = false; + var oddIn; + var oddOut; + var startVertex; + if (root) startVertex = string(root) ? this.filter(root)[0].id() : root[0].id(); + var nodes = {}; + var edges = {}; + if (directed) { + eles.forEach(function (ele) { + var id = ele.id(); + if (ele.isNode()) { + var ind = ele.indegree(true); + var outd = ele.outdegree(true); + var d1 = ind - outd; + var d2 = outd - ind; + if (d1 == 1) { + if (oddIn) dflag = true;else oddIn = id; + } else if (d2 == 1) { + if (oddOut) dflag = true;else oddOut = id; + } else if (d2 > 1 || d1 > 1) { + dflag = true; + } + nodes[id] = []; + ele.outgoers().forEach(function (e) { + if (e.isEdge()) nodes[id].push(e.id()); + }); + } else { + edges[id] = [undefined, ele.target().id()]; + } + }); + } else { + eles.forEach(function (ele) { + var id = ele.id(); + if (ele.isNode()) { + var d = ele.degree(true); + if (d % 2) { + if (!oddIn) oddIn = id;else if (!oddOut) oddOut = id;else dflag = true; + } + nodes[id] = []; + ele.connectedEdges().forEach(function (e) { + return nodes[id].push(e.id()); + }); + } else { + edges[id] = [ele.source().id(), ele.target().id()]; + } + }); + } + var result = { + found: false, + trail: undefined + }; + if (dflag) return result;else if (oddOut && oddIn) { + if (directed) { + if (startVertex && oddOut != startVertex) { + return result; + } + startVertex = oddOut; + } else { + if (startVertex && oddOut != startVertex && oddIn != startVertex) { + return result; + } else if (!startVertex) { + startVertex = oddOut; + } + } + } else { + if (!startVertex) startVertex = eles[0].id(); + } + var walk = function walk(v) { + var currentNode = v; + var subtour = [v]; + var adj, adjTail, adjHead; + while (nodes[currentNode].length) { + adj = nodes[currentNode].shift(); + adjTail = edges[adj][0]; + adjHead = edges[adj][1]; + if (currentNode != adjHead) { + nodes[adjHead] = nodes[adjHead].filter(function (e) { + return e != adj; + }); + currentNode = adjHead; + } else if (!directed && currentNode != adjTail) { + nodes[adjTail] = nodes[adjTail].filter(function (e) { + return e != adj; + }); + currentNode = adjTail; + } + subtour.unshift(adj); + subtour.unshift(currentNode); + } + return subtour; + }; + var trail = []; + var subtour = []; + subtour = walk(startVertex); + while (subtour.length != 1) { + if (nodes[subtour[0]].length == 0) { + trail.unshift(eles.getElementById(subtour.shift())); + trail.unshift(eles.getElementById(subtour.shift())); + } else { + subtour = walk(subtour.shift()).concat(subtour); + } + } + trail.unshift(eles.getElementById(subtour.shift())); // final node + + for (var d in nodes) { + if (nodes[d].length) { + return result; + } + } + result.found = true; + result.trail = this.spawn(trail, true); + return result; + } +}; + +var hopcroftTarjanBiconnected = function hopcroftTarjanBiconnected() { + var eles = this; + var nodes = {}; + var id = 0; + var edgeCount = 0; + var components = []; + var stack = []; + var visitedEdges = {}; + var buildComponent = function buildComponent(x, y) { + var i = stack.length - 1; + var cutset = []; + var component = eles.spawn(); + while (stack[i].x != x || stack[i].y != y) { + cutset.push(stack.pop().edge); + i--; + } + cutset.push(stack.pop().edge); + cutset.forEach(function (edge) { + var connectedNodes = edge.connectedNodes().intersection(eles); + component.merge(edge); + connectedNodes.forEach(function (node) { + var nodeId = node.id(); + var connectedEdges = node.connectedEdges().intersection(eles); + component.merge(node); + if (!nodes[nodeId].cutVertex) { + component.merge(connectedEdges); + } else { + component.merge(connectedEdges.filter(function (edge) { + return edge.isLoop(); + })); + } + }); + }); + components.push(component); + }; + var biconnectedSearch = function biconnectedSearch(root, currentNode, parent) { + if (root === parent) edgeCount += 1; + nodes[currentNode] = { + id: id, + low: id++, + cutVertex: false + }; + var edges = eles.getElementById(currentNode).connectedEdges().intersection(eles); + if (edges.size() === 0) { + components.push(eles.spawn(eles.getElementById(currentNode))); + } else { + var sourceId, targetId, otherNodeId, edgeId; + edges.forEach(function (edge) { + sourceId = edge.source().id(); + targetId = edge.target().id(); + otherNodeId = sourceId === currentNode ? targetId : sourceId; + if (otherNodeId !== parent) { + edgeId = edge.id(); + if (!visitedEdges[edgeId]) { + visitedEdges[edgeId] = true; + stack.push({ + x: currentNode, + y: otherNodeId, + edge: edge + }); + } + if (!(otherNodeId in nodes)) { + biconnectedSearch(root, otherNodeId, currentNode); + nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].low); + if (nodes[currentNode].id <= nodes[otherNodeId].low) { + nodes[currentNode].cutVertex = true; + buildComponent(currentNode, otherNodeId); + } + } else { + nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].id); + } + } + }); + } + }; + eles.forEach(function (ele) { + if (ele.isNode()) { + var nodeId = ele.id(); + if (!(nodeId in nodes)) { + edgeCount = 0; + biconnectedSearch(nodeId, nodeId); + nodes[nodeId].cutVertex = edgeCount > 1; + } + } + }); + var cutVertices = Object.keys(nodes).filter(function (id) { + return nodes[id].cutVertex; + }).map(function (id) { + return eles.getElementById(id); + }); + return { + cut: eles.spawn(cutVertices), + components: components + }; +}; +var hopcroftTarjanBiconnected$1 = { + hopcroftTarjanBiconnected: hopcroftTarjanBiconnected, + htbc: hopcroftTarjanBiconnected, + htb: hopcroftTarjanBiconnected, + hopcroftTarjanBiconnectedComponents: hopcroftTarjanBiconnected +}; + +var tarjanStronglyConnected = function tarjanStronglyConnected() { + var eles = this; + var nodes = {}; + var index = 0; + var components = []; + var stack = []; + var cut = eles.spawn(eles); + var stronglyConnectedSearch = function stronglyConnectedSearch(sourceNodeId) { + stack.push(sourceNodeId); + nodes[sourceNodeId] = { + index: index, + low: index++, + explored: false + }; + var connectedEdges = eles.getElementById(sourceNodeId).connectedEdges().intersection(eles); + connectedEdges.forEach(function (edge) { + var targetNodeId = edge.target().id(); + if (targetNodeId !== sourceNodeId) { + if (!(targetNodeId in nodes)) { + stronglyConnectedSearch(targetNodeId); + } + if (!nodes[targetNodeId].explored) { + nodes[sourceNodeId].low = Math.min(nodes[sourceNodeId].low, nodes[targetNodeId].low); + } + } + }); + if (nodes[sourceNodeId].index === nodes[sourceNodeId].low) { + var componentNodes = eles.spawn(); + for (;;) { + var nodeId = stack.pop(); + componentNodes.merge(eles.getElementById(nodeId)); + nodes[nodeId].low = nodes[sourceNodeId].index; + nodes[nodeId].explored = true; + if (nodeId === sourceNodeId) { + break; + } + } + var componentEdges = componentNodes.edgesWith(componentNodes); + var component = componentNodes.merge(componentEdges); + components.push(component); + cut = cut.difference(component); + } + }; + eles.forEach(function (ele) { + if (ele.isNode()) { + var nodeId = ele.id(); + if (!(nodeId in nodes)) { + stronglyConnectedSearch(nodeId); + } + } + }); + return { + cut: cut, + components: components + }; +}; +var tarjanStronglyConnected$1 = { + tarjanStronglyConnected: tarjanStronglyConnected, + tsc: tarjanStronglyConnected, + tscc: tarjanStronglyConnected, + tarjanStronglyConnectedComponents: tarjanStronglyConnected +}; + +var elesfn$j = {}; +[elesfn$v, elesfn$u, elesfn$t, elesfn$s, elesfn$r, elesfn$q, elesfn$p, elesfn$o, elesfn$n, elesfn$m, elesfn$l, markovClustering$1, kClustering, hierarchicalClustering$1, affinityPropagation$1, elesfn$k, hopcroftTarjanBiconnected$1, tarjanStronglyConnected$1].forEach(function (props) { + extend(elesfn$j, props); +}); + +/*! +Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable +Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) +Licensed under The MIT License (http://opensource.org/licenses/MIT) +*/ + +/* promise states [Promises/A+ 2.1] */ +var STATE_PENDING = 0; /* [Promises/A+ 2.1.1] */ +var STATE_FULFILLED = 1; /* [Promises/A+ 2.1.2] */ +var STATE_REJECTED = 2; /* [Promises/A+ 2.1.3] */ + +/* promise object constructor */ +var api = function api(executor) { + /* optionally support non-constructor/plain-function call */ + if (!(this instanceof api)) return new api(executor); + + /* initialize object */ + this.id = 'Thenable/1.0.7'; + this.state = STATE_PENDING; /* initial state */ + this.fulfillValue = undefined; /* initial value */ /* [Promises/A+ 1.3, 2.1.2.2] */ + this.rejectReason = undefined; /* initial reason */ /* [Promises/A+ 1.5, 2.1.3.2] */ + this.onFulfilled = []; /* initial handlers */ + this.onRejected = []; /* initial handlers */ + + /* provide optional information-hiding proxy */ + this.proxy = { + then: this.then.bind(this) + }; + + /* support optional executor function */ + if (typeof executor === 'function') executor.call(this, this.fulfill.bind(this), this.reject.bind(this)); +}; + +/* promise API methods */ +api.prototype = { + /* promise resolving methods */ + fulfill: function fulfill(value) { + return deliver(this, STATE_FULFILLED, 'fulfillValue', value); + }, + reject: function reject(value) { + return deliver(this, STATE_REJECTED, 'rejectReason', value); + }, + /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ + then: function then(onFulfilled, onRejected) { + var curr = this; + var next = new api(); /* [Promises/A+ 2.2.7] */ + curr.onFulfilled.push(resolver(onFulfilled, next, 'fulfill')); /* [Promises/A+ 2.2.2/2.2.6] */ + curr.onRejected.push(resolver(onRejected, next, 'reject')); /* [Promises/A+ 2.2.3/2.2.6] */ + execute(curr); + return next.proxy; /* [Promises/A+ 2.2.7, 3.3] */ + } +}; + +/* deliver an action */ +var deliver = function deliver(curr, state, name, value) { + if (curr.state === STATE_PENDING) { + curr.state = state; /* [Promises/A+ 2.1.2.1, 2.1.3.1] */ + curr[name] = value; /* [Promises/A+ 2.1.2.2, 2.1.3.2] */ + execute(curr); + } + return curr; +}; + +/* execute all handlers */ +var execute = function execute(curr) { + if (curr.state === STATE_FULFILLED) execute_handlers(curr, 'onFulfilled', curr.fulfillValue);else if (curr.state === STATE_REJECTED) execute_handlers(curr, 'onRejected', curr.rejectReason); +}; + +/* execute particular set of handlers */ +var execute_handlers = function execute_handlers(curr, name, value) { + /* global setImmediate: true */ + /* global setTimeout: true */ + + /* short-circuit processing */ + if (curr[name].length === 0) return; + + /* iterate over all handlers, exactly once */ + var handlers = curr[name]; + curr[name] = []; /* [Promises/A+ 2.2.2.3, 2.2.3.3] */ + var func = function func() { + for (var i = 0; i < handlers.length; i++) { + handlers[i](value); + } /* [Promises/A+ 2.2.5] */ + }; + + /* execute procedure asynchronously */ /* [Promises/A+ 2.2.4, 3.1] */ + if (typeof setImmediate === 'function') setImmediate(func);else setTimeout(func, 0); +}; + +/* generate a resolver function */ +var resolver = function resolver(cb, next, method) { + return function (value) { + if (typeof cb !== 'function') /* [Promises/A+ 2.2.1, 2.2.7.3, 2.2.7.4] */ + next[method].call(next, value); /* [Promises/A+ 2.2.7.3, 2.2.7.4] */else { + var result; + try { + result = cb(value); + } /* [Promises/A+ 2.2.2.1, 2.2.3.1, 2.2.5, 3.2] */ catch (e) { + next.reject(e); /* [Promises/A+ 2.2.7.2] */ + return; + } + resolve(next, result); /* [Promises/A+ 2.2.7.1] */ + } + }; +}; + +/* "Promise Resolution Procedure" */ /* [Promises/A+ 2.3] */ +var resolve = function resolve(promise, x) { + /* sanity check arguments */ /* [Promises/A+ 2.3.1] */ + if (promise === x || promise.proxy === x) { + promise.reject(new TypeError('cannot resolve promise with itself')); + return; + } + + /* surgically check for a "then" method + (mainly to just call the "getter" of "then" only once) */ + var then; + if (_typeof(x) === 'object' && x !== null || typeof x === 'function') { + try { + then = x.then; + } /* [Promises/A+ 2.3.3.1, 3.5] */ catch (e) { + promise.reject(e); /* [Promises/A+ 2.3.3.2] */ + return; + } + } + + /* handle own Thenables [Promises/A+ 2.3.2] + and similar "thenables" [Promises/A+ 2.3.3] */ + if (typeof then === 'function') { + var resolved = false; + try { + /* call retrieved "then" method */ /* [Promises/A+ 2.3.3.3] */ + then.call(x, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */ + function (y) { + if (resolved) return; + resolved = true; /* [Promises/A+ 2.3.3.3.3] */ + if (y === x) /* [Promises/A+ 3.6] */ + promise.reject(new TypeError('circular thenable chain'));else resolve(promise, y); + }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */ + function (r) { + if (resolved) return; + resolved = true; /* [Promises/A+ 2.3.3.3.3] */ + promise.reject(r); + }); + } catch (e) { + if (!resolved) /* [Promises/A+ 2.3.3.3.3] */ + promise.reject(e); /* [Promises/A+ 2.3.3.3.4] */ + } + + return; + } + + /* handle other values */ + promise.fulfill(x); /* [Promises/A+ 2.3.4, 2.3.3.4] */ +}; + +// so we always have Promise.all() +api.all = function (ps) { + return new api(function (resolveAll, rejectAll) { + var vals = new Array(ps.length); + var doneCount = 0; + var fulfill = function fulfill(i, val) { + vals[i] = val; + doneCount++; + if (doneCount === ps.length) { + resolveAll(vals); + } + }; + for (var i = 0; i < ps.length; i++) { + (function (i) { + var p = ps[i]; + var isPromise = p != null && p.then != null; + if (isPromise) { + p.then(function (val) { + fulfill(i, val); + }, function (err) { + rejectAll(err); + }); + } else { + var val = p; + fulfill(i, val); + } + })(i); + } + }); +}; +api.resolve = function (val) { + return new api(function (resolve, reject) { + resolve(val); + }); +}; +api.reject = function (val) { + return new api(function (resolve, reject) { + reject(val); + }); +}; +var Promise$1 = typeof Promise !== 'undefined' ? Promise : api; // eslint-disable-line no-undef + +var Animation = function Animation(target, opts, opts2) { + var isCore = core(target); + var isEle = !isCore; + var _p = this._private = extend({ + duration: 1000 + }, opts, opts2); + _p.target = target; + _p.style = _p.style || _p.css; + _p.started = false; + _p.playing = false; + _p.hooked = false; + _p.applying = false; + _p.progress = 0; + _p.completes = []; + _p.frames = []; + if (_p.complete && fn$6(_p.complete)) { + _p.completes.push(_p.complete); + } + if (isEle) { + var pos = target.position(); + _p.startPosition = _p.startPosition || { + x: pos.x, + y: pos.y + }; + _p.startStyle = _p.startStyle || target.cy().style().getAnimationStartStyle(target, _p.style); + } + if (isCore) { + var pan = target.pan(); + _p.startPan = { + x: pan.x, + y: pan.y + }; + _p.startZoom = target.zoom(); + } + + // for future timeline/animations impl + this.length = 1; + this[0] = this; +}; +var anifn = Animation.prototype; +extend(anifn, { + instanceString: function instanceString() { + return 'animation'; + }, + hook: function hook() { + var _p = this._private; + if (!_p.hooked) { + // add to target's animation queue + var q; + var tAni = _p.target._private.animation; + if (_p.queue) { + q = tAni.queue; + } else { + q = tAni.current; + } + q.push(this); + + // add to the animation loop pool + if (elementOrCollection(_p.target)) { + _p.target.cy().addToAnimationPool(_p.target); + } + _p.hooked = true; + } + return this; + }, + play: function play() { + var _p = this._private; + + // autorewind + if (_p.progress === 1) { + _p.progress = 0; + } + _p.playing = true; + _p.started = false; // needs to be started by animation loop + _p.stopped = false; + this.hook(); + + // the animation loop will start the animation... + + return this; + }, + playing: function playing() { + return this._private.playing; + }, + apply: function apply() { + var _p = this._private; + _p.applying = true; + _p.started = false; // needs to be started by animation loop + _p.stopped = false; + this.hook(); + + // the animation loop will apply the animation at this progress + + return this; + }, + applying: function applying() { + return this._private.applying; + }, + pause: function pause() { + var _p = this._private; + _p.playing = false; + _p.started = false; + return this; + }, + stop: function stop() { + var _p = this._private; + _p.playing = false; + _p.started = false; + _p.stopped = true; // to be removed from animation queues + + return this; + }, + rewind: function rewind() { + return this.progress(0); + }, + fastforward: function fastforward() { + return this.progress(1); + }, + time: function time(t) { + var _p = this._private; + if (t === undefined) { + return _p.progress * _p.duration; + } else { + return this.progress(t / _p.duration); + } + }, + progress: function progress(p) { + var _p = this._private; + var wasPlaying = _p.playing; + if (p === undefined) { + return _p.progress; + } else { + if (wasPlaying) { + this.pause(); + } + _p.progress = p; + _p.started = false; + if (wasPlaying) { + this.play(); + } + } + return this; + }, + completed: function completed() { + return this._private.progress === 1; + }, + reverse: function reverse() { + var _p = this._private; + var wasPlaying = _p.playing; + if (wasPlaying) { + this.pause(); + } + _p.progress = 1 - _p.progress; + _p.started = false; + var swap = function swap(a, b) { + var _pa = _p[a]; + if (_pa == null) { + return; + } + _p[a] = _p[b]; + _p[b] = _pa; + }; + swap('zoom', 'startZoom'); + swap('pan', 'startPan'); + swap('position', 'startPosition'); + + // swap styles + if (_p.style) { + for (var i = 0; i < _p.style.length; i++) { + var prop = _p.style[i]; + var name = prop.name; + var startStyleProp = _p.startStyle[name]; + _p.startStyle[name] = prop; + _p.style[i] = startStyleProp; + } + } + if (wasPlaying) { + this.play(); + } + return this; + }, + promise: function promise(type) { + var _p = this._private; + var arr; + switch (type) { + case 'frame': + arr = _p.frames; + break; + default: + case 'complete': + case 'completed': + arr = _p.completes; + } + return new Promise$1(function (resolve, reject) { + arr.push(function () { + resolve(); + }); + }); + } +}); +anifn.complete = anifn.completed; +anifn.run = anifn.play; +anifn.running = anifn.playing; + +var define$3 = { + animated: function animated() { + return function animatedImpl() { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return false; + } + var ele = all[0]; + if (ele) { + return ele._private.animation.current.length > 0; + } + }; + }, + // animated + + clearQueue: function clearQueue() { + return function clearQueueImpl() { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + for (var i = 0; i < all.length; i++) { + var ele = all[i]; + ele._private.animation.queue = []; + } + return this; + }; + }, + // clearQueue + + delay: function delay() { + return function delayImpl(time, complete) { + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + return this.animate({ + delay: time, + duration: time, + complete: complete + }); + }; + }, + // delay + + delayAnimation: function delayAnimation() { + return function delayAnimationImpl(time, complete) { + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + return this.animation({ + delay: time, + duration: time, + complete: complete + }); + }; + }, + // delay + + animation: function animation() { + return function animationImpl(properties, params) { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + var cy = this._private.cy || this; + var isCore = !selfIsArrayLike; + var isEles = !isCore; + if (!cy.styleEnabled()) { + return this; + } + var style = cy.style(); + properties = extend({}, properties, params); + var propertiesEmpty = Object.keys(properties).length === 0; + if (propertiesEmpty) { + return new Animation(all[0], properties); // nothing to animate + } + + if (properties.duration === undefined) { + properties.duration = 400; + } + switch (properties.duration) { + case 'slow': + properties.duration = 600; + break; + case 'fast': + properties.duration = 200; + break; + } + if (isEles) { + properties.style = style.getPropsList(properties.style || properties.css); + properties.css = undefined; + } + if (isEles && properties.renderedPosition != null) { + var rpos = properties.renderedPosition; + var pan = cy.pan(); + var zoom = cy.zoom(); + properties.position = renderedToModelPosition(rpos, zoom, pan); + } + + // override pan w/ panBy if set + if (isCore && properties.panBy != null) { + var panBy = properties.panBy; + var cyPan = cy.pan(); + properties.pan = { + x: cyPan.x + panBy.x, + y: cyPan.y + panBy.y + }; + } + + // override pan w/ center if set + var center = properties.center || properties.centre; + if (isCore && center != null) { + var centerPan = cy.getCenterPan(center.eles, properties.zoom); + if (centerPan != null) { + properties.pan = centerPan; + } + } + + // override pan & zoom w/ fit if set + if (isCore && properties.fit != null) { + var fit = properties.fit; + var fitVp = cy.getFitViewport(fit.eles || fit.boundingBox, fit.padding); + if (fitVp != null) { + properties.pan = fitVp.pan; + properties.zoom = fitVp.zoom; + } + } + + // override zoom (& potentially pan) w/ zoom obj if set + if (isCore && plainObject(properties.zoom)) { + var vp = cy.getZoomedViewport(properties.zoom); + if (vp != null) { + if (vp.zoomed) { + properties.zoom = vp.zoom; + } + if (vp.panned) { + properties.pan = vp.pan; + } + } else { + properties.zoom = null; // an inavalid zoom (e.g. no delta) gets automatically destroyed + } + } + + return new Animation(all[0], properties); + }; + }, + // animate + + animate: function animate() { + return function animateImpl(properties, params) { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + if (params) { + properties = extend({}, properties, params); + } + + // manually hook and run the animation + for (var i = 0; i < all.length; i++) { + var ele = all[i]; + var queue = ele.animated() && (properties.queue === undefined || properties.queue); + var ani = ele.animation(properties, queue ? { + queue: true + } : undefined); + ani.play(); + } + return this; // chaining + }; + }, + + // animate + + stop: function stop() { + return function stopImpl(clearQueue, jumpToEnd) { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + for (var i = 0; i < all.length; i++) { + var ele = all[i]; + var _p = ele._private; + var anis = _p.animation.current; + for (var j = 0; j < anis.length; j++) { + var ani = anis[j]; + var ani_p = ani._private; + if (jumpToEnd) { + // next iteration of the animation loop, the animation + // will go straight to the end and be removed + ani_p.duration = 0; + } + } + + // clear the queue of future animations + if (clearQueue) { + _p.animation.queue = []; + } + if (!jumpToEnd) { + _p.animation.current = []; + } + } + + // we have to notify (the animation loop doesn't do it for us on `stop`) + cy.notify('draw'); + return this; + }; + } // stop +}; // define + +var define$2 = { + // access data field + data: function data(params) { + var defaults = { + field: 'data', + bindingEvent: 'data', + allowBinding: false, + allowSetting: false, + allowGetting: false, + settingEvent: 'data', + settingTriggersEvent: false, + triggerFnName: 'trigger', + immutableKeys: {}, + // key => true if immutable + updateStyle: false, + beforeGet: function beforeGet(self) {}, + beforeSet: function beforeSet(self, obj) {}, + onSet: function onSet(self) {}, + canSet: function canSet(self) { + return true; + } + }; + params = extend({}, defaults, params); + return function dataImpl(name, value) { + var p = params; + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + var single = selfIsArrayLike ? self[0] : self; + + // .data('foo', ...) + if (string(name)) { + // set or get property + var isPathLike = name.indexOf('.') !== -1; // there might be a normal field with a dot + var path = isPathLike && toPath__default["default"](name); + + // .data('foo') + if (p.allowGetting && value === undefined) { + // get + + var ret; + if (single) { + p.beforeGet(single); + + // check if it's path and a field with the same name doesn't exist + if (path && single._private[p.field][name] === undefined) { + ret = get__default["default"](single._private[p.field], path); + } else { + ret = single._private[p.field][name]; + } + } + return ret; + + // .data('foo', 'bar') + } else if (p.allowSetting && value !== undefined) { + // set + var valid = !p.immutableKeys[name]; + if (valid) { + var change = _defineProperty({}, name, value); + p.beforeSet(self, change); + for (var i = 0, l = all.length; i < l; i++) { + var ele = all[i]; + if (p.canSet(ele)) { + if (path && single._private[p.field][name] === undefined) { + set__default["default"](ele._private[p.field], path, value); + } else { + ele._private[p.field][name] = value; + } + } + } + + // update mappers if asked + if (p.updateStyle) { + self.updateStyle(); + } + + // call onSet callback + p.onSet(self); + if (p.settingTriggersEvent) { + self[p.triggerFnName](p.settingEvent); + } + } + } + + // .data({ 'foo': 'bar' }) + } else if (p.allowSetting && plainObject(name)) { + // extend + var obj = name; + var k, v; + var keys = Object.keys(obj); + p.beforeSet(self, obj); + for (var _i = 0; _i < keys.length; _i++) { + k = keys[_i]; + v = obj[k]; + var _valid = !p.immutableKeys[k]; + if (_valid) { + for (var j = 0; j < all.length; j++) { + var _ele = all[j]; + if (p.canSet(_ele)) { + _ele._private[p.field][k] = v; + } + } + } + } + + // update mappers if asked + if (p.updateStyle) { + self.updateStyle(); + } + + // call onSet callback + p.onSet(self); + if (p.settingTriggersEvent) { + self[p.triggerFnName](p.settingEvent); + } + + // .data(function(){ ... }) + } else if (p.allowBinding && fn$6(name)) { + // bind to event + var fn = name; + self.on(p.bindingEvent, fn); + + // .data() + } else if (p.allowGetting && name === undefined) { + // get whole object + var _ret; + if (single) { + p.beforeGet(single); + _ret = single._private[p.field]; + } + return _ret; + } + return self; // maintain chainability + }; // function + }, + + // data + + // remove data field + removeData: function removeData(params) { + var defaults = { + field: 'data', + event: 'data', + triggerFnName: 'trigger', + triggerEvent: false, + immutableKeys: {} // key => true if immutable + }; + + params = extend({}, defaults, params); + return function removeDataImpl(names) { + var p = params; + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + + // .removeData('foo bar') + if (string(names)) { + // then get the list of keys, and delete them + var keys = names.split(/\s+/); + var l = keys.length; + for (var i = 0; i < l; i++) { + // delete each non-empty key + var key = keys[i]; + if (emptyString(key)) { + continue; + } + var valid = !p.immutableKeys[key]; // not valid if immutable + if (valid) { + for (var i_a = 0, l_a = all.length; i_a < l_a; i_a++) { + all[i_a]._private[p.field][key] = undefined; + } + } + } + if (p.triggerEvent) { + self[p.triggerFnName](p.event); + } + + // .removeData() + } else if (names === undefined) { + // then delete all keys + + for (var _i_a = 0, _l_a = all.length; _i_a < _l_a; _i_a++) { + var _privateFields = all[_i_a]._private[p.field]; + var _keys = Object.keys(_privateFields); + for (var _i2 = 0; _i2 < _keys.length; _i2++) { + var _key = _keys[_i2]; + var validKeyToDelete = !p.immutableKeys[_key]; + if (validKeyToDelete) { + _privateFields[_key] = undefined; + } + } + } + if (p.triggerEvent) { + self[p.triggerFnName](p.event); + } + } + return self; // maintain chaining + }; // function + } // removeData +}; // define + +var define$1 = { + eventAliasesOn: function eventAliasesOn(proto) { + var p = proto; + p.addListener = p.listen = p.bind = p.on; + p.unlisten = p.unbind = p.off = p.removeListener; + p.trigger = p.emit; + + // this is just a wrapper alias of .on() + p.pon = p.promiseOn = function (events, selector) { + var self = this; + var args = Array.prototype.slice.call(arguments, 0); + return new Promise$1(function (resolve, reject) { + var callback = function callback(e) { + self.off.apply(self, offArgs); + resolve(e); + }; + var onArgs = args.concat([callback]); + var offArgs = onArgs.concat([]); + self.on.apply(self, onArgs); + }); + }; + } +}; // define + +// use this module to cherry pick functions into your prototype +var define = {}; +[define$3, define$2, define$1].forEach(function (m) { + extend(define, m); +}); + +var elesfn$i = { + animate: define.animate(), + animation: define.animation(), + animated: define.animated(), + clearQueue: define.clearQueue(), + delay: define.delay(), + delayAnimation: define.delayAnimation(), + stop: define.stop() +}; + +var elesfn$h = { + classes: function classes(_classes) { + var self = this; + if (_classes === undefined) { + var ret = []; + self[0]._private.classes.forEach(function (cls) { + return ret.push(cls); + }); + return ret; + } else if (!array(_classes)) { + // extract classes from string + _classes = (_classes || '').match(/\S+/g) || []; + } + var changed = []; + var classesSet = new Set$1(_classes); + + // check and update each ele + for (var j = 0; j < self.length; j++) { + var ele = self[j]; + var _p = ele._private; + var eleClasses = _p.classes; + var changedEle = false; + + // check if ele has all of the passed classes + for (var i = 0; i < _classes.length; i++) { + var cls = _classes[i]; + var eleHasClass = eleClasses.has(cls); + if (!eleHasClass) { + changedEle = true; + break; + } + } + + // check if ele has classes outside of those passed + if (!changedEle) { + changedEle = eleClasses.size !== _classes.length; + } + if (changedEle) { + _p.classes = classesSet; + changed.push(ele); + } + } + + // trigger update style on those eles that had class changes + if (changed.length > 0) { + this.spawn(changed).updateStyle().emit('class'); + } + return self; + }, + addClass: function addClass(classes) { + return this.toggleClass(classes, true); + }, + hasClass: function hasClass(className) { + var ele = this[0]; + return ele != null && ele._private.classes.has(className); + }, + toggleClass: function toggleClass(classes, toggle) { + if (!array(classes)) { + // extract classes from string + classes = classes.match(/\S+/g) || []; + } + var self = this; + var toggleUndefd = toggle === undefined; + var changed = []; // eles who had classes changed + + for (var i = 0, il = self.length; i < il; i++) { + var ele = self[i]; + var eleClasses = ele._private.classes; + var changedEle = false; + for (var j = 0; j < classes.length; j++) { + var cls = classes[j]; + var hasClass = eleClasses.has(cls); + var changedNow = false; + if (toggle || toggleUndefd && !hasClass) { + eleClasses.add(cls); + changedNow = true; + } else if (!toggle || toggleUndefd && hasClass) { + eleClasses["delete"](cls); + changedNow = true; + } + if (!changedEle && changedNow) { + changed.push(ele); + changedEle = true; + } + } // for j classes + } // for i eles + + // trigger update style on those eles that had class changes + if (changed.length > 0) { + this.spawn(changed).updateStyle().emit('class'); + } + return self; + }, + removeClass: function removeClass(classes) { + return this.toggleClass(classes, false); + }, + flashClass: function flashClass(classes, duration) { + var self = this; + if (duration == null) { + duration = 250; + } else if (duration === 0) { + return self; // nothing to do really + } + + self.addClass(classes); + setTimeout(function () { + self.removeClass(classes); + }, duration); + return self; + } +}; +elesfn$h.className = elesfn$h.classNames = elesfn$h.classes; + +// tokens in the query language +var tokens = { + metaChar: '[\\!\\"\\#\\$\\%\\&\\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]', + // chars we need to escape in let names, etc + comparatorOp: '=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=', + // binary comparison op (used in data selectors) + boolOp: '\\?|\\!|\\^', + // boolean (unary) operators (used in data selectors) + string: '"(?:\\\\"|[^"])*"' + '|' + "'(?:\\\\'|[^'])*'", + // string literals (used in data selectors) -- doublequotes | singlequotes + number: number, + // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123 + meta: 'degree|indegree|outdegree', + // allowed metadata fields (i.e. allowed functions to use from Collection) + separator: '\\s*,\\s*', + // queries are separated by commas, e.g. edge[foo = 'bar'], node.someClass + descendant: '\\s+', + child: '\\s+>\\s+', + subject: '\\$', + group: 'node|edge|\\*', + directedEdge: '\\s+->\\s+', + undirectedEdge: '\\s+<->\\s+' +}; +tokens.variable = '(?:[\\w-.]|(?:\\\\' + tokens.metaChar + '))+'; // a variable name can have letters, numbers, dashes, and periods +tokens.className = '(?:[\\w-]|(?:\\\\' + tokens.metaChar + '))+'; // a class name has the same rules as a variable except it can't have a '.' in the name +tokens.value = tokens.string + '|' + tokens.number; // a value literal, either a string or number +tokens.id = tokens.variable; // an element id (follows variable conventions) + +(function () { + var ops, op, i; + + // add @ variants to comparatorOp + ops = tokens.comparatorOp.split('|'); + for (i = 0; i < ops.length; i++) { + op = ops[i]; + tokens.comparatorOp += '|@' + op; + } + + // add ! variants to comparatorOp + ops = tokens.comparatorOp.split('|'); + for (i = 0; i < ops.length; i++) { + op = ops[i]; + if (op.indexOf('!') >= 0) { + continue; + } // skip ops that explicitly contain ! + if (op === '=') { + continue; + } // skip = b/c != is explicitly defined + + tokens.comparatorOp += '|\\!' + op; + } +})(); + +/** + * Make a new query object + * + * @prop type {Type} The type enum (int) of the query + * @prop checks List of checks to make against an ele to test for a match + */ +var newQuery = function newQuery() { + return { + checks: [] + }; +}; + +/** + * A check type enum-like object. Uses integer values for fast match() lookup. + * The ordering does not matter as long as the ints are unique. + */ +var Type = { + /** E.g. node */ + GROUP: 0, + /** A collection of elements */ + COLLECTION: 1, + /** A filter(ele) function */ + FILTER: 2, + /** E.g. [foo > 1] */ + DATA_COMPARE: 3, + /** E.g. [foo] */ + DATA_EXIST: 4, + /** E.g. [?foo] */ + DATA_BOOL: 5, + /** E.g. [[degree > 2]] */ + META_COMPARE: 6, + /** E.g. :selected */ + STATE: 7, + /** E.g. #foo */ + ID: 8, + /** E.g. .foo */ + CLASS: 9, + /** E.g. #foo <-> #bar */ + UNDIRECTED_EDGE: 10, + /** E.g. #foo -> #bar */ + DIRECTED_EDGE: 11, + /** E.g. $#foo -> #bar */ + NODE_SOURCE: 12, + /** E.g. #foo -> $#bar */ + NODE_TARGET: 13, + /** E.g. $#foo <-> #bar */ + NODE_NEIGHBOR: 14, + /** E.g. #foo > #bar */ + CHILD: 15, + /** E.g. #foo #bar */ + DESCENDANT: 16, + /** E.g. $#foo > #bar */ + PARENT: 17, + /** E.g. $#foo #bar */ + ANCESTOR: 18, + /** E.g. #foo > $bar > #baz */ + COMPOUND_SPLIT: 19, + /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */ + TRUE: 20 +}; + +var stateSelectors = [{ + selector: ':selected', + matches: function matches(ele) { + return ele.selected(); + } +}, { + selector: ':unselected', + matches: function matches(ele) { + return !ele.selected(); + } +}, { + selector: ':selectable', + matches: function matches(ele) { + return ele.selectable(); + } +}, { + selector: ':unselectable', + matches: function matches(ele) { + return !ele.selectable(); + } +}, { + selector: ':locked', + matches: function matches(ele) { + return ele.locked(); + } +}, { + selector: ':unlocked', + matches: function matches(ele) { + return !ele.locked(); + } +}, { + selector: ':visible', + matches: function matches(ele) { + return ele.visible(); + } +}, { + selector: ':hidden', + matches: function matches(ele) { + return !ele.visible(); + } +}, { + selector: ':transparent', + matches: function matches(ele) { + return ele.transparent(); + } +}, { + selector: ':grabbed', + matches: function matches(ele) { + return ele.grabbed(); + } +}, { + selector: ':free', + matches: function matches(ele) { + return !ele.grabbed(); + } +}, { + selector: ':removed', + matches: function matches(ele) { + return ele.removed(); + } +}, { + selector: ':inside', + matches: function matches(ele) { + return !ele.removed(); + } +}, { + selector: ':grabbable', + matches: function matches(ele) { + return ele.grabbable(); + } +}, { + selector: ':ungrabbable', + matches: function matches(ele) { + return !ele.grabbable(); + } +}, { + selector: ':animated', + matches: function matches(ele) { + return ele.animated(); + } +}, { + selector: ':unanimated', + matches: function matches(ele) { + return !ele.animated(); + } +}, { + selector: ':parent', + matches: function matches(ele) { + return ele.isParent(); + } +}, { + selector: ':childless', + matches: function matches(ele) { + return ele.isChildless(); + } +}, { + selector: ':child', + matches: function matches(ele) { + return ele.isChild(); + } +}, { + selector: ':orphan', + matches: function matches(ele) { + return ele.isOrphan(); + } +}, { + selector: ':nonorphan', + matches: function matches(ele) { + return ele.isChild(); + } +}, { + selector: ':compound', + matches: function matches(ele) { + if (ele.isNode()) { + return ele.isParent(); + } else { + return ele.source().isParent() || ele.target().isParent(); + } + } +}, { + selector: ':loop', + matches: function matches(ele) { + return ele.isLoop(); + } +}, { + selector: ':simple', + matches: function matches(ele) { + return ele.isSimple(); + } +}, { + selector: ':active', + matches: function matches(ele) { + return ele.active(); + } +}, { + selector: ':inactive', + matches: function matches(ele) { + return !ele.active(); + } +}, { + selector: ':backgrounding', + matches: function matches(ele) { + return ele.backgrounding(); + } +}, { + selector: ':nonbackgrounding', + matches: function matches(ele) { + return !ele.backgrounding(); + } +}].sort(function (a, b) { + // n.b. selectors that are starting substrings of others must have the longer ones first + return descending(a.selector, b.selector); +}); +var lookup = function () { + var selToFn = {}; + var s; + for (var i = 0; i < stateSelectors.length; i++) { + s = stateSelectors[i]; + selToFn[s.selector] = s.matches; + } + return selToFn; +}(); +var stateSelectorMatches = function stateSelectorMatches(sel, ele) { + return lookup[sel](ele); +}; +var stateSelectorRegex = '(' + stateSelectors.map(function (s) { + return s.selector; +}).join('|') + ')'; + +// when a token like a variable has escaped meta characters, we need to clean the backslashes out +// so that values get compared properly in Selector.filter() +var cleanMetaChars = function cleanMetaChars(str) { + return str.replace(new RegExp('\\\\(' + tokens.metaChar + ')', 'g'), function (match, $1) { + return $1; + }); +}; +var replaceLastQuery = function replaceLastQuery(selector, examiningQuery, replacementQuery) { + selector[selector.length - 1] = replacementQuery; +}; + +// NOTE: add new expression syntax here to have it recognised by the parser; +// - a query contains all adjacent (i.e. no separator in between) expressions; +// - the current query is stored in selector[i] +// - you need to check the query objects in match() for it actually filter properly, but that's pretty straight forward +var exprs = [{ + name: 'group', + // just used for identifying when debugging + query: true, + regex: '(' + tokens.group + ')', + populate: function populate(selector, query, _ref) { + var _ref2 = _slicedToArray(_ref, 1), + group = _ref2[0]; + query.checks.push({ + type: Type.GROUP, + value: group === '*' ? group : group + 's' + }); + } +}, { + name: 'state', + query: true, + regex: stateSelectorRegex, + populate: function populate(selector, query, _ref3) { + var _ref4 = _slicedToArray(_ref3, 1), + state = _ref4[0]; + query.checks.push({ + type: Type.STATE, + value: state + }); + } +}, { + name: 'id', + query: true, + regex: '\\#(' + tokens.id + ')', + populate: function populate(selector, query, _ref5) { + var _ref6 = _slicedToArray(_ref5, 1), + id = _ref6[0]; + query.checks.push({ + type: Type.ID, + value: cleanMetaChars(id) + }); + } +}, { + name: 'className', + query: true, + regex: '\\.(' + tokens.className + ')', + populate: function populate(selector, query, _ref7) { + var _ref8 = _slicedToArray(_ref7, 1), + className = _ref8[0]; + query.checks.push({ + type: Type.CLASS, + value: cleanMetaChars(className) + }); + } +}, { + name: 'dataExists', + query: true, + regex: '\\[\\s*(' + tokens.variable + ')\\s*\\]', + populate: function populate(selector, query, _ref9) { + var _ref10 = _slicedToArray(_ref9, 1), + variable = _ref10[0]; + query.checks.push({ + type: Type.DATA_EXIST, + field: cleanMetaChars(variable) + }); + } +}, { + name: 'dataCompare', + query: true, + regex: '\\[\\s*(' + tokens.variable + ')\\s*(' + tokens.comparatorOp + ')\\s*(' + tokens.value + ')\\s*\\]', + populate: function populate(selector, query, _ref11) { + var _ref12 = _slicedToArray(_ref11, 3), + variable = _ref12[0], + comparatorOp = _ref12[1], + value = _ref12[2]; + var valueIsString = new RegExp('^' + tokens.string + '$').exec(value) != null; + if (valueIsString) { + value = value.substring(1, value.length - 1); + } else { + value = parseFloat(value); + } + query.checks.push({ + type: Type.DATA_COMPARE, + field: cleanMetaChars(variable), + operator: comparatorOp, + value: value + }); + } +}, { + name: 'dataBool', + query: true, + regex: '\\[\\s*(' + tokens.boolOp + ')\\s*(' + tokens.variable + ')\\s*\\]', + populate: function populate(selector, query, _ref13) { + var _ref14 = _slicedToArray(_ref13, 2), + boolOp = _ref14[0], + variable = _ref14[1]; + query.checks.push({ + type: Type.DATA_BOOL, + field: cleanMetaChars(variable), + operator: boolOp + }); + } +}, { + name: 'metaCompare', + query: true, + regex: '\\[\\[\\s*(' + tokens.meta + ')\\s*(' + tokens.comparatorOp + ')\\s*(' + tokens.number + ')\\s*\\]\\]', + populate: function populate(selector, query, _ref15) { + var _ref16 = _slicedToArray(_ref15, 3), + meta = _ref16[0], + comparatorOp = _ref16[1], + number = _ref16[2]; + query.checks.push({ + type: Type.META_COMPARE, + field: cleanMetaChars(meta), + operator: comparatorOp, + value: parseFloat(number) + }); + } +}, { + name: 'nextQuery', + separator: true, + regex: tokens.separator, + populate: function populate(selector, query) { + var currentSubject = selector.currentSubject; + var edgeCount = selector.edgeCount; + var compoundCount = selector.compoundCount; + var lastQ = selector[selector.length - 1]; + if (currentSubject != null) { + lastQ.subject = currentSubject; + selector.currentSubject = null; + } + lastQ.edgeCount = edgeCount; + lastQ.compoundCount = compoundCount; + selector.edgeCount = 0; + selector.compoundCount = 0; + + // go on to next query + var nextQuery = selector[selector.length++] = newQuery(); + return nextQuery; // this is the new query to be filled by the following exprs + } +}, { + name: 'directedEdge', + separator: true, + regex: tokens.directedEdge, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + // undirected edge + var edgeQuery = newQuery(); + var source = query; + var target = newQuery(); + edgeQuery.checks.push({ + type: Type.DIRECTED_EDGE, + source: source, + target: target + }); + + // the query in the selector should be the edge rather than the source + replaceLastQuery(selector, query, edgeQuery); + selector.edgeCount++; + + // we're now populating the target query with expressions that follow + return target; + } else { + // source/target + var srcTgtQ = newQuery(); + var _source = query; + var _target = newQuery(); + srcTgtQ.checks.push({ + type: Type.NODE_SOURCE, + source: _source, + target: _target + }); + + // the query in the selector should be the neighbourhood rather than the node + replaceLastQuery(selector, query, srcTgtQ); + selector.edgeCount++; + return _target; // now populating the target with the following expressions + } + } +}, { + name: 'undirectedEdge', + separator: true, + regex: tokens.undirectedEdge, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + // undirected edge + var edgeQuery = newQuery(); + var source = query; + var target = newQuery(); + edgeQuery.checks.push({ + type: Type.UNDIRECTED_EDGE, + nodes: [source, target] + }); + + // the query in the selector should be the edge rather than the source + replaceLastQuery(selector, query, edgeQuery); + selector.edgeCount++; + + // we're now populating the target query with expressions that follow + return target; + } else { + // neighbourhood + var nhoodQ = newQuery(); + var node = query; + var neighbor = newQuery(); + nhoodQ.checks.push({ + type: Type.NODE_NEIGHBOR, + node: node, + neighbor: neighbor + }); + + // the query in the selector should be the neighbourhood rather than the node + replaceLastQuery(selector, query, nhoodQ); + return neighbor; // now populating the neighbor with following expressions + } + } +}, { + name: 'child', + separator: true, + regex: tokens.child, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + // default: child query + var parentChildQuery = newQuery(); + var child = newQuery(); + var parent = selector[selector.length - 1]; + parentChildQuery.checks.push({ + type: Type.CHILD, + parent: parent, + child: child + }); + + // the query in the selector should be the '>' itself + replaceLastQuery(selector, query, parentChildQuery); + selector.compoundCount++; + + // we're now populating the child query with expressions that follow + return child; + } else if (selector.currentSubject === query) { + // compound split query + var compound = newQuery(); + var left = selector[selector.length - 1]; + var right = newQuery(); + var subject = newQuery(); + var _child = newQuery(); + var _parent = newQuery(); + + // set up the root compound q + compound.checks.push({ + type: Type.COMPOUND_SPLIT, + left: left, + right: right, + subject: subject + }); + + // populate the subject and replace the q at the old spot (within left) with TRUE + subject.checks = query.checks; // take the checks from the left + query.checks = [{ + type: Type.TRUE + }]; // checks under left refs the subject implicitly + + // set up the right q + _parent.checks.push({ + type: Type.TRUE + }); // parent implicitly refs the subject + right.checks.push({ + type: Type.PARENT, + // type is swapped on right side queries + parent: _parent, + child: _child // empty for now + }); + + replaceLastQuery(selector, left, compound); + + // update the ref since we moved things around for `query` + selector.currentSubject = subject; + selector.compoundCount++; + return _child; // now populating the right side's child + } else { + // parent query + // info for parent query + var _parent2 = newQuery(); + var _child2 = newQuery(); + var pcQChecks = [{ + type: Type.PARENT, + parent: _parent2, + child: _child2 + }]; + + // the parent-child query takes the place of the query previously being populated + _parent2.checks = query.checks; // the previous query contains the checks for the parent + query.checks = pcQChecks; // pc query takes over + + selector.compoundCount++; + return _child2; // we're now populating the child + } + } +}, { + name: 'descendant', + separator: true, + regex: tokens.descendant, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + // default: descendant query + var ancChQuery = newQuery(); + var descendant = newQuery(); + var ancestor = selector[selector.length - 1]; + ancChQuery.checks.push({ + type: Type.DESCENDANT, + ancestor: ancestor, + descendant: descendant + }); + + // the query in the selector should be the '>' itself + replaceLastQuery(selector, query, ancChQuery); + selector.compoundCount++; + + // we're now populating the descendant query with expressions that follow + return descendant; + } else if (selector.currentSubject === query) { + // compound split query + var compound = newQuery(); + var left = selector[selector.length - 1]; + var right = newQuery(); + var subject = newQuery(); + var _descendant = newQuery(); + var _ancestor = newQuery(); + + // set up the root compound q + compound.checks.push({ + type: Type.COMPOUND_SPLIT, + left: left, + right: right, + subject: subject + }); + + // populate the subject and replace the q at the old spot (within left) with TRUE + subject.checks = query.checks; // take the checks from the left + query.checks = [{ + type: Type.TRUE + }]; // checks under left refs the subject implicitly + + // set up the right q + _ancestor.checks.push({ + type: Type.TRUE + }); // ancestor implicitly refs the subject + right.checks.push({ + type: Type.ANCESTOR, + // type is swapped on right side queries + ancestor: _ancestor, + descendant: _descendant // empty for now + }); + + replaceLastQuery(selector, left, compound); + + // update the ref since we moved things around for `query` + selector.currentSubject = subject; + selector.compoundCount++; + return _descendant; // now populating the right side's descendant + } else { + // ancestor query + // info for parent query + var _ancestor2 = newQuery(); + var _descendant2 = newQuery(); + var adQChecks = [{ + type: Type.ANCESTOR, + ancestor: _ancestor2, + descendant: _descendant2 + }]; + + // the parent-child query takes the place of the query previously being populated + _ancestor2.checks = query.checks; // the previous query contains the checks for the parent + query.checks = adQChecks; // pc query takes over + + selector.compoundCount++; + return _descendant2; // we're now populating the child + } + } +}, { + name: 'subject', + modifier: true, + regex: tokens.subject, + populate: function populate(selector, query) { + if (selector.currentSubject != null && selector.currentSubject !== query) { + warn('Redefinition of subject in selector `' + selector.toString() + '`'); + return false; + } + selector.currentSubject = query; + var topQ = selector[selector.length - 1]; + var topChk = topQ.checks[0]; + var topType = topChk == null ? null : topChk.type; + if (topType === Type.DIRECTED_EDGE) { + // directed edge with subject on the target + + // change to target node check + topChk.type = Type.NODE_TARGET; + } else if (topType === Type.UNDIRECTED_EDGE) { + // undirected edge with subject on the second node + + // change to neighbor check + topChk.type = Type.NODE_NEIGHBOR; + topChk.node = topChk.nodes[1]; // second node is subject + topChk.neighbor = topChk.nodes[0]; + + // clean up unused fields for new type + topChk.nodes = null; + } + } +}]; +exprs.forEach(function (e) { + return e.regexObj = new RegExp('^' + e.regex); +}); + +/** + * Of all the expressions, find the first match in the remaining text. + * @param {string} remaining The remaining text to parse + * @returns The matched expression and the newly remaining text `{ expr, match, name, remaining }` + */ +var consumeExpr = function consumeExpr(remaining) { + var expr; + var match; + var name; + for (var j = 0; j < exprs.length; j++) { + var e = exprs[j]; + var n = e.name; + var m = remaining.match(e.regexObj); + if (m != null) { + match = m; + expr = e; + name = n; + var consumed = m[0]; + remaining = remaining.substring(consumed.length); + break; // we've consumed one expr, so we can return now + } + } + + return { + expr: expr, + match: match, + name: name, + remaining: remaining + }; +}; + +/** + * Consume all the leading whitespace + * @param {string} remaining The text to consume + * @returns The text with the leading whitespace removed + */ +var consumeWhitespace = function consumeWhitespace(remaining) { + var match = remaining.match(/^\s+/); + if (match) { + var consumed = match[0]; + remaining = remaining.substring(consumed.length); + } + return remaining; +}; + +/** + * Parse the string and store the parsed representation in the Selector. + * @param {string} selector The selector string + * @returns `true` if the selector was successfully parsed, `false` otherwise + */ +var parse = function parse(selector) { + var self = this; + var remaining = self.inputText = selector; + var currentQuery = self[0] = newQuery(); + self.length = 1; + remaining = consumeWhitespace(remaining); // get rid of leading whitespace + + for (;;) { + var exprInfo = consumeExpr(remaining); + if (exprInfo.expr == null) { + warn('The selector `' + selector + '`is invalid'); + return false; + } else { + var args = exprInfo.match.slice(1); + + // let the token populate the selector object in currentQuery + var ret = exprInfo.expr.populate(self, currentQuery, args); + if (ret === false) { + return false; // exit if population failed + } else if (ret != null) { + currentQuery = ret; // change the current query to be filled if the expr specifies + } + } + + remaining = exprInfo.remaining; + + // we're done when there's nothing left to parse + if (remaining.match(/^\s*$/)) { + break; + } + } + var lastQ = self[self.length - 1]; + if (self.currentSubject != null) { + lastQ.subject = self.currentSubject; + } + lastQ.edgeCount = self.edgeCount; + lastQ.compoundCount = self.compoundCount; + for (var i = 0; i < self.length; i++) { + var q = self[i]; + + // in future, this could potentially be allowed if there were operator precedence and detection of invalid combinations + if (q.compoundCount > 0 && q.edgeCount > 0) { + warn('The selector `' + selector + '` is invalid because it uses both a compound selector and an edge selector'); + return false; + } + if (q.edgeCount > 1) { + warn('The selector `' + selector + '` is invalid because it uses multiple edge selectors'); + return false; + } else if (q.edgeCount === 1) { + warn('The selector `' + selector + '` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.'); + } + } + return true; // success +}; + +/** + * Get the selector represented as a string. This value uses default formatting, + * so things like spacing may differ from the input text passed to the constructor. + * @returns {string} The selector string + */ +var toString = function toString() { + if (this.toStringCache != null) { + return this.toStringCache; + } + var clean = function clean(obj) { + if (obj == null) { + return ''; + } else { + return obj; + } + }; + var cleanVal = function cleanVal(val) { + if (string(val)) { + return '"' + val + '"'; + } else { + return clean(val); + } + }; + var space = function space(val) { + return ' ' + val + ' '; + }; + var checkToString = function checkToString(check, subject) { + var type = check.type, + value = check.value; + switch (type) { + case Type.GROUP: + { + var group = clean(value); + return group.substring(0, group.length - 1); + } + case Type.DATA_COMPARE: + { + var field = check.field, + operator = check.operator; + return '[' + field + space(clean(operator)) + cleanVal(value) + ']'; + } + case Type.DATA_BOOL: + { + var _operator = check.operator, + _field = check.field; + return '[' + clean(_operator) + _field + ']'; + } + case Type.DATA_EXIST: + { + var _field2 = check.field; + return '[' + _field2 + ']'; + } + case Type.META_COMPARE: + { + var _operator2 = check.operator, + _field3 = check.field; + return '[[' + _field3 + space(clean(_operator2)) + cleanVal(value) + ']]'; + } + case Type.STATE: + { + return value; + } + case Type.ID: + { + return '#' + value; + } + case Type.CLASS: + { + return '.' + value; + } + case Type.PARENT: + case Type.CHILD: + { + return queryToString(check.parent, subject) + space('>') + queryToString(check.child, subject); + } + case Type.ANCESTOR: + case Type.DESCENDANT: + { + return queryToString(check.ancestor, subject) + ' ' + queryToString(check.descendant, subject); + } + case Type.COMPOUND_SPLIT: + { + var lhs = queryToString(check.left, subject); + var sub = queryToString(check.subject, subject); + var rhs = queryToString(check.right, subject); + return lhs + (lhs.length > 0 ? ' ' : '') + sub + rhs; + } + case Type.TRUE: + { + return ''; + } + } + }; + var queryToString = function queryToString(query, subject) { + return query.checks.reduce(function (str, chk, i) { + return str + (subject === query && i === 0 ? '$' : '') + checkToString(chk, subject); + }, ''); + }; + var str = ''; + for (var i = 0; i < this.length; i++) { + var query = this[i]; + str += queryToString(query, query.subject); + if (this.length > 1 && i < this.length - 1) { + str += ', '; + } + } + this.toStringCache = str; + return str; +}; +var parse$1 = { + parse: parse, + toString: toString +}; + +var valCmp = function valCmp(fieldVal, operator, value) { + var matches; + var isFieldStr = string(fieldVal); + var isFieldNum = number$1(fieldVal); + var isValStr = string(value); + var fieldStr, valStr; + var caseInsensitive = false; + var notExpr = false; + var isIneqCmp = false; + if (operator.indexOf('!') >= 0) { + operator = operator.replace('!', ''); + notExpr = true; + } + if (operator.indexOf('@') >= 0) { + operator = operator.replace('@', ''); + caseInsensitive = true; + } + if (isFieldStr || isValStr || caseInsensitive) { + fieldStr = !isFieldStr && !isFieldNum ? '' : '' + fieldVal; + valStr = '' + value; + } + + // if we're doing a case insensitive comparison, then we're using a STRING comparison + // even if we're comparing numbers + if (caseInsensitive) { + fieldVal = fieldStr = fieldStr.toLowerCase(); + value = valStr = valStr.toLowerCase(); + } + switch (operator) { + case '*=': + matches = fieldStr.indexOf(valStr) >= 0; + break; + case '$=': + matches = fieldStr.indexOf(valStr, fieldStr.length - valStr.length) >= 0; + break; + case '^=': + matches = fieldStr.indexOf(valStr) === 0; + break; + case '=': + matches = fieldVal === value; + break; + case '>': + isIneqCmp = true; + matches = fieldVal > value; + break; + case '>=': + isIneqCmp = true; + matches = fieldVal >= value; + break; + case '<': + isIneqCmp = true; + matches = fieldVal < value; + break; + case '<=': + isIneqCmp = true; + matches = fieldVal <= value; + break; + default: + matches = false; + break; + } + + // apply the not op, but null vals for inequalities should always stay non-matching + if (notExpr && (fieldVal != null || !isIneqCmp)) { + matches = !matches; + } + return matches; +}; +var boolCmp = function boolCmp(fieldVal, operator) { + switch (operator) { + case '?': + return fieldVal ? true : false; + case '!': + return fieldVal ? false : true; + case '^': + return fieldVal === undefined; + } +}; +var existCmp = function existCmp(fieldVal) { + return fieldVal !== undefined; +}; +var data$1 = function data(ele, field) { + return ele.data(field); +}; +var meta = function meta(ele, field) { + return ele[field](); +}; + +/** A lookup of `match(check, ele)` functions by `Type` int */ +var match = []; + +/** + * Returns whether the query matches for the element + * @param query The `{ type, value, ... }` query object + * @param ele The element to compare against +*/ +var matches$1 = function matches(query, ele) { + return query.checks.every(function (chk) { + return match[chk.type](chk, ele); + }); +}; +match[Type.GROUP] = function (check, ele) { + var group = check.value; + return group === '*' || group === ele.group(); +}; +match[Type.STATE] = function (check, ele) { + var stateSelector = check.value; + return stateSelectorMatches(stateSelector, ele); +}; +match[Type.ID] = function (check, ele) { + var id = check.value; + return ele.id() === id; +}; +match[Type.CLASS] = function (check, ele) { + var cls = check.value; + return ele.hasClass(cls); +}; +match[Type.META_COMPARE] = function (check, ele) { + var field = check.field, + operator = check.operator, + value = check.value; + return valCmp(meta(ele, field), operator, value); +}; +match[Type.DATA_COMPARE] = function (check, ele) { + var field = check.field, + operator = check.operator, + value = check.value; + return valCmp(data$1(ele, field), operator, value); +}; +match[Type.DATA_BOOL] = function (check, ele) { + var field = check.field, + operator = check.operator; + return boolCmp(data$1(ele, field), operator); +}; +match[Type.DATA_EXIST] = function (check, ele) { + var field = check.field; + check.operator; + return existCmp(data$1(ele, field)); +}; +match[Type.UNDIRECTED_EDGE] = function (check, ele) { + var qA = check.nodes[0]; + var qB = check.nodes[1]; + var src = ele.source(); + var tgt = ele.target(); + return matches$1(qA, src) && matches$1(qB, tgt) || matches$1(qB, src) && matches$1(qA, tgt); +}; +match[Type.NODE_NEIGHBOR] = function (check, ele) { + return matches$1(check.node, ele) && ele.neighborhood().some(function (n) { + return n.isNode() && matches$1(check.neighbor, n); + }); +}; +match[Type.DIRECTED_EDGE] = function (check, ele) { + return matches$1(check.source, ele.source()) && matches$1(check.target, ele.target()); +}; +match[Type.NODE_SOURCE] = function (check, ele) { + return matches$1(check.source, ele) && ele.outgoers().some(function (n) { + return n.isNode() && matches$1(check.target, n); + }); +}; +match[Type.NODE_TARGET] = function (check, ele) { + return matches$1(check.target, ele) && ele.incomers().some(function (n) { + return n.isNode() && matches$1(check.source, n); + }); +}; +match[Type.CHILD] = function (check, ele) { + return matches$1(check.child, ele) && matches$1(check.parent, ele.parent()); +}; +match[Type.PARENT] = function (check, ele) { + return matches$1(check.parent, ele) && ele.children().some(function (c) { + return matches$1(check.child, c); + }); +}; +match[Type.DESCENDANT] = function (check, ele) { + return matches$1(check.descendant, ele) && ele.ancestors().some(function (a) { + return matches$1(check.ancestor, a); + }); +}; +match[Type.ANCESTOR] = function (check, ele) { + return matches$1(check.ancestor, ele) && ele.descendants().some(function (d) { + return matches$1(check.descendant, d); + }); +}; +match[Type.COMPOUND_SPLIT] = function (check, ele) { + return matches$1(check.subject, ele) && matches$1(check.left, ele) && matches$1(check.right, ele); +}; +match[Type.TRUE] = function () { + return true; +}; +match[Type.COLLECTION] = function (check, ele) { + var collection = check.value; + return collection.has(ele); +}; +match[Type.FILTER] = function (check, ele) { + var filter = check.value; + return filter(ele); +}; + +// filter an existing collection +var filter = function filter(collection) { + var self = this; + + // for 1 id #foo queries, just get the element + if (self.length === 1 && self[0].checks.length === 1 && self[0].checks[0].type === Type.ID) { + return collection.getElementById(self[0].checks[0].value).collection(); + } + var selectorFunction = function selectorFunction(element) { + for (var j = 0; j < self.length; j++) { + var query = self[j]; + if (matches$1(query, element)) { + return true; + } + } + return false; + }; + if (self.text() == null) { + selectorFunction = function selectorFunction() { + return true; + }; + } + return collection.filter(selectorFunction); +}; // filter + +// does selector match a single element? +var matches = function matches(ele) { + var self = this; + for (var j = 0; j < self.length; j++) { + var query = self[j]; + if (matches$1(query, ele)) { + return true; + } + } + return false; +}; // matches + +var matching = { + matches: matches, + filter: filter +}; + +var Selector = function Selector(selector) { + this.inputText = selector; + this.currentSubject = null; + this.compoundCount = 0; + this.edgeCount = 0; + this.length = 0; + if (selector == null || string(selector) && selector.match(/^\s*$/)) ; else if (elementOrCollection(selector)) { + this.addQuery({ + checks: [{ + type: Type.COLLECTION, + value: selector.collection() + }] + }); + } else if (fn$6(selector)) { + this.addQuery({ + checks: [{ + type: Type.FILTER, + value: selector + }] + }); + } else if (string(selector)) { + if (!this.parse(selector)) { + this.invalid = true; + } + } else { + error('A selector must be created from a string; found '); + } +}; +var selfn = Selector.prototype; +[parse$1, matching].forEach(function (p) { + return extend(selfn, p); +}); +selfn.text = function () { + return this.inputText; +}; +selfn.size = function () { + return this.length; +}; +selfn.eq = function (i) { + return this[i]; +}; +selfn.sameText = function (otherSel) { + return !this.invalid && !otherSel.invalid && this.text() === otherSel.text(); +}; +selfn.addQuery = function (q) { + this[this.length++] = q; +}; +selfn.selector = selfn.toString; + +var elesfn$g = { + allAre: function allAre(selector) { + var selObj = new Selector(selector); + return this.every(function (ele) { + return selObj.matches(ele); + }); + }, + is: function is(selector) { + var selObj = new Selector(selector); + return this.some(function (ele) { + return selObj.matches(ele); + }); + }, + some: function some(fn, thisArg) { + for (var i = 0; i < this.length; i++) { + var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]); + if (ret) { + return true; + } + } + return false; + }, + every: function every(fn, thisArg) { + for (var i = 0; i < this.length; i++) { + var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]); + if (!ret) { + return false; + } + } + return true; + }, + same: function same(collection) { + // cheap collection ref check + if (this === collection) { + return true; + } + collection = this.cy().collection(collection); + var thisLength = this.length; + var collectionLength = collection.length; + + // cheap length check + if (thisLength !== collectionLength) { + return false; + } + + // cheap element ref check + if (thisLength === 1) { + return this[0] === collection[0]; + } + return this.every(function (ele) { + return collection.hasElementWithId(ele.id()); + }); + }, + anySame: function anySame(collection) { + collection = this.cy().collection(collection); + return this.some(function (ele) { + return collection.hasElementWithId(ele.id()); + }); + }, + allAreNeighbors: function allAreNeighbors(collection) { + collection = this.cy().collection(collection); + var nhood = this.neighborhood(); + return collection.every(function (ele) { + return nhood.hasElementWithId(ele.id()); + }); + }, + contains: function contains(collection) { + collection = this.cy().collection(collection); + var self = this; + return collection.every(function (ele) { + return self.hasElementWithId(ele.id()); + }); + } +}; +elesfn$g.allAreNeighbours = elesfn$g.allAreNeighbors; +elesfn$g.has = elesfn$g.contains; +elesfn$g.equal = elesfn$g.equals = elesfn$g.same; + +var cache = function cache(fn, name) { + return function traversalCache(arg1, arg2, arg3, arg4) { + var selectorOrEles = arg1; + var eles = this; + var key; + if (selectorOrEles == null) { + key = ''; + } else if (elementOrCollection(selectorOrEles) && selectorOrEles.length === 1) { + key = selectorOrEles.id(); + } + if (eles.length === 1 && key) { + var _p = eles[0]._private; + var tch = _p.traversalCache = _p.traversalCache || {}; + var ch = tch[name] = tch[name] || []; + var hash = hashString(key); + var cacheHit = ch[hash]; + if (cacheHit) { + return cacheHit; + } else { + return ch[hash] = fn.call(eles, arg1, arg2, arg3, arg4); + } + } else { + return fn.call(eles, arg1, arg2, arg3, arg4); + } + }; +}; + +var elesfn$f = { + parent: function parent(selector) { + var parents = []; + + // optimisation for single ele call + if (this.length === 1) { + var parent = this[0]._private.parent; + if (parent) { + return parent; + } + } + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var _parent = ele._private.parent; + if (_parent) { + parents.push(_parent); + } + } + return this.spawn(parents, true).filter(selector); + }, + parents: function parents(selector) { + var parents = []; + var eles = this.parent(); + while (eles.nonempty()) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + parents.push(ele); + } + eles = eles.parent(); + } + return this.spawn(parents, true).filter(selector); + }, + commonAncestors: function commonAncestors(selector) { + var ancestors; + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var parents = ele.parents(); + ancestors = ancestors || parents; + ancestors = ancestors.intersect(parents); // current list must be common with current ele parents set + } + + return ancestors.filter(selector); + }, + orphans: function orphans(selector) { + return this.stdFilter(function (ele) { + return ele.isOrphan(); + }).filter(selector); + }, + nonorphans: function nonorphans(selector) { + return this.stdFilter(function (ele) { + return ele.isChild(); + }).filter(selector); + }, + children: cache(function (selector) { + var children = []; + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var eleChildren = ele._private.children; + for (var j = 0; j < eleChildren.length; j++) { + children.push(eleChildren[j]); + } + } + return this.spawn(children, true).filter(selector); + }, 'children'), + siblings: function siblings(selector) { + return this.parent().children().not(this).filter(selector); + }, + isParent: function isParent() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.children.length !== 0; + } + }, + isChildless: function isChildless() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.children.length === 0; + } + }, + isChild: function isChild() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.parent != null; + } + }, + isOrphan: function isOrphan() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.parent == null; + } + }, + descendants: function descendants(selector) { + var elements = []; + function add(eles) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + elements.push(ele); + if (ele.children().nonempty()) { + add(ele.children()); + } + } + } + add(this.children()); + return this.spawn(elements, true).filter(selector); + } +}; +function forEachCompound(eles, fn, includeSelf, recursiveStep) { + var q = []; + var did = new Set$1(); + var cy = eles.cy(); + var hasCompounds = cy.hasCompoundNodes(); + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + if (includeSelf) { + q.push(ele); + } else if (hasCompounds) { + recursiveStep(q, did, ele); + } + } + while (q.length > 0) { + var _ele = q.shift(); + fn(_ele); + did.add(_ele.id()); + if (hasCompounds) { + recursiveStep(q, did, _ele); + } + } + return eles; +} +function addChildren(q, did, ele) { + if (ele.isParent()) { + var children = ele._private.children; + for (var i = 0; i < children.length; i++) { + var child = children[i]; + if (!did.has(child.id())) { + q.push(child); + } + } + } +} + +// very efficient version of eles.add( eles.descendants() ).forEach() +// for internal use +elesfn$f.forEachDown = function (fn) { + var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return forEachCompound(this, fn, includeSelf, addChildren); +}; +function addParent(q, did, ele) { + if (ele.isChild()) { + var parent = ele._private.parent; + if (!did.has(parent.id())) { + q.push(parent); + } + } +} +elesfn$f.forEachUp = function (fn) { + var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return forEachCompound(this, fn, includeSelf, addParent); +}; +function addParentAndChildren(q, did, ele) { + addParent(q, did, ele); + addChildren(q, did, ele); +} +elesfn$f.forEachUpAndDown = function (fn) { + var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return forEachCompound(this, fn, includeSelf, addParentAndChildren); +}; + +// aliases +elesfn$f.ancestors = elesfn$f.parents; + +var fn$5, elesfn$e; +fn$5 = elesfn$e = { + data: define.data({ + field: 'data', + bindingEvent: 'data', + allowBinding: true, + allowSetting: true, + settingEvent: 'data', + settingTriggersEvent: true, + triggerFnName: 'trigger', + allowGetting: true, + immutableKeys: { + 'id': true, + 'source': true, + 'target': true, + 'parent': true + }, + updateStyle: true + }), + removeData: define.removeData({ + field: 'data', + event: 'data', + triggerFnName: 'trigger', + triggerEvent: true, + immutableKeys: { + 'id': true, + 'source': true, + 'target': true, + 'parent': true + }, + updateStyle: true + }), + scratch: define.data({ + field: 'scratch', + bindingEvent: 'scratch', + allowBinding: true, + allowSetting: true, + settingEvent: 'scratch', + settingTriggersEvent: true, + triggerFnName: 'trigger', + allowGetting: true, + updateStyle: true + }), + removeScratch: define.removeData({ + field: 'scratch', + event: 'scratch', + triggerFnName: 'trigger', + triggerEvent: true, + updateStyle: true + }), + rscratch: define.data({ + field: 'rscratch', + allowBinding: false, + allowSetting: true, + settingTriggersEvent: false, + allowGetting: true + }), + removeRscratch: define.removeData({ + field: 'rscratch', + triggerEvent: false + }), + id: function id() { + var ele = this[0]; + if (ele) { + return ele._private.data.id; + } + } +}; + +// aliases +fn$5.attr = fn$5.data; +fn$5.removeAttr = fn$5.removeData; +var data = elesfn$e; + +var elesfn$d = {}; +function defineDegreeFunction(callback) { + return function (includeLoops) { + var self = this; + if (includeLoops === undefined) { + includeLoops = true; + } + if (self.length === 0) { + return; + } + if (self.isNode() && !self.removed()) { + var degree = 0; + var node = self[0]; + var connectedEdges = node._private.edges; + for (var i = 0; i < connectedEdges.length; i++) { + var edge = connectedEdges[i]; + if (!includeLoops && edge.isLoop()) { + continue; + } + degree += callback(node, edge); + } + return degree; + } else { + return; + } + }; +} +extend(elesfn$d, { + degree: defineDegreeFunction(function (node, edge) { + if (edge.source().same(edge.target())) { + return 2; + } else { + return 1; + } + }), + indegree: defineDegreeFunction(function (node, edge) { + if (edge.target().same(node)) { + return 1; + } else { + return 0; + } + }), + outdegree: defineDegreeFunction(function (node, edge) { + if (edge.source().same(node)) { + return 1; + } else { + return 0; + } + }) +}); +function defineDegreeBoundsFunction(degreeFn, callback) { + return function (includeLoops) { + var ret; + var nodes = this.nodes(); + for (var i = 0; i < nodes.length; i++) { + var ele = nodes[i]; + var degree = ele[degreeFn](includeLoops); + if (degree !== undefined && (ret === undefined || callback(degree, ret))) { + ret = degree; + } + } + return ret; + }; +} +extend(elesfn$d, { + minDegree: defineDegreeBoundsFunction('degree', function (degree, min) { + return degree < min; + }), + maxDegree: defineDegreeBoundsFunction('degree', function (degree, max) { + return degree > max; + }), + minIndegree: defineDegreeBoundsFunction('indegree', function (degree, min) { + return degree < min; + }), + maxIndegree: defineDegreeBoundsFunction('indegree', function (degree, max) { + return degree > max; + }), + minOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, min) { + return degree < min; + }), + maxOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, max) { + return degree > max; + }) +}); +extend(elesfn$d, { + totalDegree: function totalDegree(includeLoops) { + var total = 0; + var nodes = this.nodes(); + for (var i = 0; i < nodes.length; i++) { + total += nodes[i].degree(includeLoops); + } + return total; + } +}); + +var fn$4, elesfn$c; +var beforePositionSet = function beforePositionSet(eles, newPos, silent) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + if (!ele.locked()) { + var oldPos = ele._private.position; + var delta = { + x: newPos.x != null ? newPos.x - oldPos.x : 0, + y: newPos.y != null ? newPos.y - oldPos.y : 0 + }; + if (ele.isParent() && !(delta.x === 0 && delta.y === 0)) { + ele.children().shift(delta, silent); + } + ele.dirtyBoundingBoxCache(); + } + } +}; +var positionDef = { + field: 'position', + bindingEvent: 'position', + allowBinding: true, + allowSetting: true, + settingEvent: 'position', + settingTriggersEvent: true, + triggerFnName: 'emitAndNotify', + allowGetting: true, + validKeys: ['x', 'y'], + beforeGet: function beforeGet(ele) { + ele.updateCompoundBounds(); + }, + beforeSet: function beforeSet(eles, newPos) { + beforePositionSet(eles, newPos, false); + }, + onSet: function onSet(eles) { + eles.dirtyCompoundBoundsCache(); + }, + canSet: function canSet(ele) { + return !ele.locked(); + } +}; +fn$4 = elesfn$c = { + position: define.data(positionDef), + // position but no notification to renderer + silentPosition: define.data(extend({}, positionDef, { + allowBinding: false, + allowSetting: true, + settingTriggersEvent: false, + allowGetting: false, + beforeSet: function beforeSet(eles, newPos) { + beforePositionSet(eles, newPos, true); + }, + onSet: function onSet(eles) { + eles.dirtyCompoundBoundsCache(); + } + })), + positions: function positions(pos, silent) { + if (plainObject(pos)) { + if (silent) { + this.silentPosition(pos); + } else { + this.position(pos); + } + } else if (fn$6(pos)) { + var _fn = pos; + var cy = this.cy(); + cy.startBatch(); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var _pos = void 0; + if (_pos = _fn(ele, i)) { + if (silent) { + ele.silentPosition(_pos); + } else { + ele.position(_pos); + } + } + } + cy.endBatch(); + } + return this; // chaining + }, + + silentPositions: function silentPositions(pos) { + return this.positions(pos, true); + }, + shift: function shift(dim, val, silent) { + var delta; + if (plainObject(dim)) { + delta = { + x: number$1(dim.x) ? dim.x : 0, + y: number$1(dim.y) ? dim.y : 0 + }; + silent = val; + } else if (string(dim) && number$1(val)) { + delta = { + x: 0, + y: 0 + }; + delta[dim] = val; + } + if (delta != null) { + var cy = this.cy(); + cy.startBatch(); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + + // exclude any node that is a descendant of the calling collection + if (cy.hasCompoundNodes() && ele.isChild() && ele.ancestors().anySame(this)) { + continue; + } + var pos = ele.position(); + var newPos = { + x: pos.x + delta.x, + y: pos.y + delta.y + }; + if (silent) { + ele.silentPosition(newPos); + } else { + ele.position(newPos); + } + } + cy.endBatch(); + } + return this; + }, + silentShift: function silentShift(dim, val) { + if (plainObject(dim)) { + this.shift(dim, true); + } else if (string(dim) && number$1(val)) { + this.shift(dim, val, true); + } + return this; + }, + // get/set the rendered (i.e. on screen) positon of the element + renderedPosition: function renderedPosition(dim, val) { + var ele = this[0]; + var cy = this.cy(); + var zoom = cy.zoom(); + var pan = cy.pan(); + var rpos = plainObject(dim) ? dim : undefined; + var setting = rpos !== undefined || val !== undefined && string(dim); + if (ele && ele.isNode()) { + // must have an element and must be a node to return position + if (setting) { + for (var i = 0; i < this.length; i++) { + var _ele = this[i]; + if (val !== undefined) { + // set one dimension + _ele.position(dim, (val - pan[dim]) / zoom); + } else if (rpos !== undefined) { + // set whole position + _ele.position(renderedToModelPosition(rpos, zoom, pan)); + } + } + } else { + // getting + var pos = ele.position(); + rpos = modelToRenderedPosition(pos, zoom, pan); + if (dim === undefined) { + // then return the whole rendered position + return rpos; + } else { + // then return the specified dimension + return rpos[dim]; + } + } + } else if (!setting) { + return undefined; // for empty collection case + } + + return this; // chaining + }, + + // get/set the position relative to the parent + relativePosition: function relativePosition(dim, val) { + var ele = this[0]; + var cy = this.cy(); + var ppos = plainObject(dim) ? dim : undefined; + var setting = ppos !== undefined || val !== undefined && string(dim); + var hasCompoundNodes = cy.hasCompoundNodes(); + if (ele && ele.isNode()) { + // must have an element and must be a node to return position + if (setting) { + for (var i = 0; i < this.length; i++) { + var _ele2 = this[i]; + var parent = hasCompoundNodes ? _ele2.parent() : null; + var hasParent = parent && parent.length > 0; + var relativeToParent = hasParent; + if (hasParent) { + parent = parent[0]; + } + var origin = relativeToParent ? parent.position() : { + x: 0, + y: 0 + }; + if (val !== undefined) { + // set one dimension + _ele2.position(dim, val + origin[dim]); + } else if (ppos !== undefined) { + // set whole position + _ele2.position({ + x: ppos.x + origin.x, + y: ppos.y + origin.y + }); + } + } + } else { + // getting + var pos = ele.position(); + var _parent = hasCompoundNodes ? ele.parent() : null; + var _hasParent = _parent && _parent.length > 0; + var _relativeToParent = _hasParent; + if (_hasParent) { + _parent = _parent[0]; + } + var _origin = _relativeToParent ? _parent.position() : { + x: 0, + y: 0 + }; + ppos = { + x: pos.x - _origin.x, + y: pos.y - _origin.y + }; + if (dim === undefined) { + // then return the whole rendered position + return ppos; + } else { + // then return the specified dimension + return ppos[dim]; + } + } + } else if (!setting) { + return undefined; // for empty collection case + } + + return this; // chaining + } +}; + +// aliases +fn$4.modelPosition = fn$4.point = fn$4.position; +fn$4.modelPositions = fn$4.points = fn$4.positions; +fn$4.renderedPoint = fn$4.renderedPosition; +fn$4.relativePoint = fn$4.relativePosition; +var position = elesfn$c; + +var fn$3, elesfn$b; +fn$3 = elesfn$b = {}; +elesfn$b.renderedBoundingBox = function (options) { + var bb = this.boundingBox(options); + var cy = this.cy(); + var zoom = cy.zoom(); + var pan = cy.pan(); + var x1 = bb.x1 * zoom + pan.x; + var x2 = bb.x2 * zoom + pan.x; + var y1 = bb.y1 * zoom + pan.y; + var y2 = bb.y2 * zoom + pan.y; + return { + x1: x1, + x2: x2, + y1: y1, + y2: y2, + w: x2 - x1, + h: y2 - y1 + }; +}; +elesfn$b.dirtyCompoundBoundsCache = function () { + var silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var cy = this.cy(); + if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { + return this; + } + this.forEachUp(function (ele) { + if (ele.isParent()) { + var _p = ele._private; + _p.compoundBoundsClean = false; + _p.bbCache = null; + if (!silent) { + ele.emitAndNotify('bounds'); + } + } + }); + return this; +}; +elesfn$b.updateCompoundBounds = function () { + var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var cy = this.cy(); + + // not possible to do on non-compound graphs or with the style disabled + if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { + return this; + } + + // save cycles when batching -- but bounds will be stale (or not exist yet) + if (!force && cy.batching()) { + return this; + } + function update(parent) { + if (!parent.isParent()) { + return; + } + var _p = parent._private; + var children = parent.children(); + var includeLabels = parent.pstyle('compound-sizing-wrt-labels').value === 'include'; + var min = { + width: { + val: parent.pstyle('min-width').pfValue, + left: parent.pstyle('min-width-bias-left'), + right: parent.pstyle('min-width-bias-right') + }, + height: { + val: parent.pstyle('min-height').pfValue, + top: parent.pstyle('min-height-bias-top'), + bottom: parent.pstyle('min-height-bias-bottom') + } + }; + var bb = children.boundingBox({ + includeLabels: includeLabels, + includeOverlays: false, + // updating the compound bounds happens outside of the regular + // cache cycle (i.e. before fired events) + useCache: false + }); + var pos = _p.position; + + // if children take up zero area then keep position and fall back on stylesheet w/h + if (bb.w === 0 || bb.h === 0) { + bb = { + w: parent.pstyle('width').pfValue, + h: parent.pstyle('height').pfValue + }; + bb.x1 = pos.x - bb.w / 2; + bb.x2 = pos.x + bb.w / 2; + bb.y1 = pos.y - bb.h / 2; + bb.y2 = pos.y + bb.h / 2; + } + function computeBiasValues(propDiff, propBias, propBiasComplement) { + var biasDiff = 0; + var biasComplementDiff = 0; + var biasTotal = propBias + propBiasComplement; + if (propDiff > 0 && biasTotal > 0) { + biasDiff = propBias / biasTotal * propDiff; + biasComplementDiff = propBiasComplement / biasTotal * propDiff; + } + return { + biasDiff: biasDiff, + biasComplementDiff: biasComplementDiff + }; + } + function computePaddingValues(width, height, paddingObject, relativeTo) { + // Assuming percentage is number from 0 to 1 + if (paddingObject.units === '%') { + switch (relativeTo) { + case 'width': + return width > 0 ? paddingObject.pfValue * width : 0; + case 'height': + return height > 0 ? paddingObject.pfValue * height : 0; + case 'average': + return width > 0 && height > 0 ? paddingObject.pfValue * (width + height) / 2 : 0; + case 'min': + return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * height : paddingObject.pfValue * width : 0; + case 'max': + return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * width : paddingObject.pfValue * height : 0; + default: + return 0; + } + } else if (paddingObject.units === 'px') { + return paddingObject.pfValue; + } else { + return 0; + } + } + var leftVal = min.width.left.value; + if (min.width.left.units === 'px' && min.width.val > 0) { + leftVal = leftVal * 100 / min.width.val; + } + var rightVal = min.width.right.value; + if (min.width.right.units === 'px' && min.width.val > 0) { + rightVal = rightVal * 100 / min.width.val; + } + var topVal = min.height.top.value; + if (min.height.top.units === 'px' && min.height.val > 0) { + topVal = topVal * 100 / min.height.val; + } + var bottomVal = min.height.bottom.value; + if (min.height.bottom.units === 'px' && min.height.val > 0) { + bottomVal = bottomVal * 100 / min.height.val; + } + var widthBiasDiffs = computeBiasValues(min.width.val - bb.w, leftVal, rightVal); + var diffLeft = widthBiasDiffs.biasDiff; + var diffRight = widthBiasDiffs.biasComplementDiff; + var heightBiasDiffs = computeBiasValues(min.height.val - bb.h, topVal, bottomVal); + var diffTop = heightBiasDiffs.biasDiff; + var diffBottom = heightBiasDiffs.biasComplementDiff; + _p.autoPadding = computePaddingValues(bb.w, bb.h, parent.pstyle('padding'), parent.pstyle('padding-relative-to').value); + _p.autoWidth = Math.max(bb.w, min.width.val); + pos.x = (-diffLeft + bb.x1 + bb.x2 + diffRight) / 2; + _p.autoHeight = Math.max(bb.h, min.height.val); + pos.y = (-diffTop + bb.y1 + bb.y2 + diffBottom) / 2; + } + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var _p = ele._private; + if (!_p.compoundBoundsClean || force) { + update(ele); + if (!cy.batching()) { + _p.compoundBoundsClean = true; + } + } + } + return this; +}; +var noninf = function noninf(x) { + if (x === Infinity || x === -Infinity) { + return 0; + } + return x; +}; +var updateBounds = function updateBounds(b, x1, y1, x2, y2) { + // don't update with zero area boxes + if (x2 - x1 === 0 || y2 - y1 === 0) { + return; + } + + // don't update with null dim + if (x1 == null || y1 == null || x2 == null || y2 == null) { + return; + } + b.x1 = x1 < b.x1 ? x1 : b.x1; + b.x2 = x2 > b.x2 ? x2 : b.x2; + b.y1 = y1 < b.y1 ? y1 : b.y1; + b.y2 = y2 > b.y2 ? y2 : b.y2; + b.w = b.x2 - b.x1; + b.h = b.y2 - b.y1; +}; +var updateBoundsFromBox = function updateBoundsFromBox(b, b2) { + if (b2 == null) { + return b; + } + return updateBounds(b, b2.x1, b2.y1, b2.x2, b2.y2); +}; +var prefixedProperty = function prefixedProperty(obj, field, prefix) { + return getPrefixedProperty(obj, field, prefix); +}; +var updateBoundsFromArrow = function updateBoundsFromArrow(bounds, ele, prefix) { + if (ele.cy().headless()) { + return; + } + var _p = ele._private; + var rstyle = _p.rstyle; + var halfArW = rstyle.arrowWidth / 2; + var arrowType = ele.pstyle(prefix + '-arrow-shape').value; + var x; + var y; + if (arrowType !== 'none') { + if (prefix === 'source') { + x = rstyle.srcX; + y = rstyle.srcY; + } else if (prefix === 'target') { + x = rstyle.tgtX; + y = rstyle.tgtY; + } else { + x = rstyle.midX; + y = rstyle.midY; + } + + // always store the individual arrow bounds + var bbs = _p.arrowBounds = _p.arrowBounds || {}; + var bb = bbs[prefix] = bbs[prefix] || {}; + bb.x1 = x - halfArW; + bb.y1 = y - halfArW; + bb.x2 = x + halfArW; + bb.y2 = y + halfArW; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + expandBoundingBox(bb, 1); + updateBounds(bounds, bb.x1, bb.y1, bb.x2, bb.y2); + } +}; +var updateBoundsFromLabel = function updateBoundsFromLabel(bounds, ele, prefix) { + if (ele.cy().headless()) { + return; + } + var prefixDash; + if (prefix) { + prefixDash = prefix + '-'; + } else { + prefixDash = ''; + } + var _p = ele._private; + var rstyle = _p.rstyle; + var label = ele.pstyle(prefixDash + 'label').strValue; + if (label) { + var halign = ele.pstyle('text-halign'); + var valign = ele.pstyle('text-valign'); + var labelWidth = prefixedProperty(rstyle, 'labelWidth', prefix); + var labelHeight = prefixedProperty(rstyle, 'labelHeight', prefix); + var labelX = prefixedProperty(rstyle, 'labelX', prefix); + var labelY = prefixedProperty(rstyle, 'labelY', prefix); + var marginX = ele.pstyle(prefixDash + 'text-margin-x').pfValue; + var marginY = ele.pstyle(prefixDash + 'text-margin-y').pfValue; + var isEdge = ele.isEdge(); + var rotation = ele.pstyle(prefixDash + 'text-rotation'); + var outlineWidth = ele.pstyle('text-outline-width').pfValue; + var borderWidth = ele.pstyle('text-border-width').pfValue; + var halfBorderWidth = borderWidth / 2; + var padding = ele.pstyle('text-background-padding').pfValue; + var marginOfError = 2; // expand to work around browser dimension inaccuracies + + var lh = labelHeight; + var lw = labelWidth; + var lw_2 = lw / 2; + var lh_2 = lh / 2; + var lx1, lx2, ly1, ly2; + if (isEdge) { + lx1 = labelX - lw_2; + lx2 = labelX + lw_2; + ly1 = labelY - lh_2; + ly2 = labelY + lh_2; + } else { + switch (halign.value) { + case 'left': + lx1 = labelX - lw; + lx2 = labelX; + break; + case 'center': + lx1 = labelX - lw_2; + lx2 = labelX + lw_2; + break; + case 'right': + lx1 = labelX; + lx2 = labelX + lw; + break; + } + switch (valign.value) { + case 'top': + ly1 = labelY - lh; + ly2 = labelY; + break; + case 'center': + ly1 = labelY - lh_2; + ly2 = labelY + lh_2; + break; + case 'bottom': + ly1 = labelY; + ly2 = labelY + lh; + break; + } + } + + // shift by margin and expand by outline and border + lx1 += marginX - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError; + lx2 += marginX + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError; + ly1 += marginY - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError; + ly2 += marginY + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError; + + // always store the unrotated label bounds separately + var bbPrefix = prefix || 'main'; + var bbs = _p.labelBounds; + var bb = bbs[bbPrefix] = bbs[bbPrefix] || {}; + bb.x1 = lx1; + bb.y1 = ly1; + bb.x2 = lx2; + bb.y2 = ly2; + bb.w = lx2 - lx1; + bb.h = ly2 - ly1; + var isAutorotate = isEdge && rotation.strValue === 'autorotate'; + var isPfValue = rotation.pfValue != null && rotation.pfValue !== 0; + if (isAutorotate || isPfValue) { + var theta = isAutorotate ? prefixedProperty(_p.rstyle, 'labelAngle', prefix) : rotation.pfValue; + var cos = Math.cos(theta); + var sin = Math.sin(theta); + + // rotation point (default value for center-center) + var xo = (lx1 + lx2) / 2; + var yo = (ly1 + ly2) / 2; + if (!isEdge) { + switch (halign.value) { + case 'left': + xo = lx2; + break; + case 'right': + xo = lx1; + break; + } + switch (valign.value) { + case 'top': + yo = ly2; + break; + case 'bottom': + yo = ly1; + break; + } + } + var rotate = function rotate(x, y) { + x = x - xo; + y = y - yo; + return { + x: x * cos - y * sin + xo, + y: x * sin + y * cos + yo + }; + }; + var px1y1 = rotate(lx1, ly1); + var px1y2 = rotate(lx1, ly2); + var px2y1 = rotate(lx2, ly1); + var px2y2 = rotate(lx2, ly2); + lx1 = Math.min(px1y1.x, px1y2.x, px2y1.x, px2y2.x); + lx2 = Math.max(px1y1.x, px1y2.x, px2y1.x, px2y2.x); + ly1 = Math.min(px1y1.y, px1y2.y, px2y1.y, px2y2.y); + ly2 = Math.max(px1y1.y, px1y2.y, px2y1.y, px2y2.y); + } + var bbPrefixRot = bbPrefix + 'Rot'; + var bbRot = bbs[bbPrefixRot] = bbs[bbPrefixRot] || {}; + bbRot.x1 = lx1; + bbRot.y1 = ly1; + bbRot.x2 = lx2; + bbRot.y2 = ly2; + bbRot.w = lx2 - lx1; + bbRot.h = ly2 - ly1; + updateBounds(bounds, lx1, ly1, lx2, ly2); + updateBounds(_p.labelBounds.all, lx1, ly1, lx2, ly2); + } + return bounds; +}; +var updateBoundsFromOutline = function updateBoundsFromOutline(bounds, ele) { + if (ele.cy().headless()) { + return; + } + var outlineOpacity = ele.pstyle('outline-opacity').value; + var outlineWidth = ele.pstyle('outline-width').value; + if (outlineOpacity > 0 && outlineWidth > 0) { + var outlineOffset = ele.pstyle('outline-offset').value; + var nodeShape = ele.pstyle('shape').value; + var outlineSize = outlineWidth + outlineOffset; + var scaleX = (bounds.w + outlineSize * 2) / bounds.w; + var scaleY = (bounds.h + outlineSize * 2) / bounds.h; + var xOffset = 0; + var yOffset = 0; + if (["diamond", "pentagon", "round-triangle"].includes(nodeShape)) { + scaleX = (bounds.w + outlineSize * 2.4) / bounds.w; + yOffset = -outlineSize / 3.6; + } else if (["concave-hexagon", "rhomboid", "right-rhomboid"].includes(nodeShape)) { + scaleX = (bounds.w + outlineSize * 2.4) / bounds.w; + } else if (nodeShape === "star") { + scaleX = (bounds.w + outlineSize * 2.8) / bounds.w; + scaleY = (bounds.h + outlineSize * 2.6) / bounds.h; + yOffset = -outlineSize / 3.8; + } else if (nodeShape === "triangle") { + scaleX = (bounds.w + outlineSize * 2.8) / bounds.w; + scaleY = (bounds.h + outlineSize * 2.4) / bounds.h; + yOffset = -outlineSize / 1.4; + } else if (nodeShape === "vee") { + scaleX = (bounds.w + outlineSize * 4.4) / bounds.w; + scaleY = (bounds.h + outlineSize * 3.8) / bounds.h; + yOffset = -outlineSize * .5; + } + var hDelta = bounds.h * scaleY - bounds.h; + var wDelta = bounds.w * scaleX - bounds.w; + expandBoundingBoxSides(bounds, [Math.ceil(hDelta / 2), Math.ceil(wDelta / 2)]); + if (xOffset != 0 || yOffset !== 0) { + var oBounds = shiftBoundingBox(bounds, xOffset, yOffset); + updateBoundingBox(bounds, oBounds); + } + } +}; + +// get the bounding box of the elements (in raw model position) +var boundingBoxImpl = function boundingBoxImpl(ele, options) { + var cy = ele._private.cy; + var styleEnabled = cy.styleEnabled(); + var headless = cy.headless(); + var bounds = makeBoundingBox(); + var _p = ele._private; + var isNode = ele.isNode(); + var isEdge = ele.isEdge(); + var ex1, ex2, ey1, ey2; // extrema of body / lines + var x, y; // node pos + var rstyle = _p.rstyle; + var manualExpansion = isNode && styleEnabled ? ele.pstyle('bounds-expansion').pfValue : [0]; + + // must use `display` prop only, as reading `compound.width()` causes recursion + // (other factors like width values will be considered later in this function anyway) + var isDisplayed = function isDisplayed(ele) { + return ele.pstyle('display').value !== 'none'; + }; + var displayed = !styleEnabled || isDisplayed(ele) + + // must take into account connected nodes b/c of implicit edge hiding on display:none node + && (!isEdge || isDisplayed(ele.source()) && isDisplayed(ele.target())); + if (displayed) { + // displayed suffices, since we will find zero area eles anyway + var overlayOpacity = 0; + var overlayPadding = 0; + if (styleEnabled && options.includeOverlays) { + overlayOpacity = ele.pstyle('overlay-opacity').value; + if (overlayOpacity !== 0) { + overlayPadding = ele.pstyle('overlay-padding').value; + } + } + var underlayOpacity = 0; + var underlayPadding = 0; + if (styleEnabled && options.includeUnderlays) { + underlayOpacity = ele.pstyle('underlay-opacity').value; + if (underlayOpacity !== 0) { + underlayPadding = ele.pstyle('underlay-padding').value; + } + } + var padding = Math.max(overlayPadding, underlayPadding); + var w = 0; + var wHalf = 0; + if (styleEnabled) { + w = ele.pstyle('width').pfValue; + wHalf = w / 2; + } + if (isNode && options.includeNodes) { + var pos = ele.position(); + x = pos.x; + y = pos.y; + var _w = ele.outerWidth(); + var halfW = _w / 2; + var h = ele.outerHeight(); + var halfH = h / 2; + + // handle node dimensions + ///////////////////////// + + ex1 = x - halfW; + ex2 = x + halfW; + ey1 = y - halfH; + ey2 = y + halfH; + updateBounds(bounds, ex1, ey1, ex2, ey2); + if (styleEnabled && options.includeOutlines) { + updateBoundsFromOutline(bounds, ele); + } + } else if (isEdge && options.includeEdges) { + if (styleEnabled && !headless) { + var curveStyle = ele.pstyle('curve-style').strValue; + + // handle edge dimensions (rough box estimate) + ////////////////////////////////////////////// + + ex1 = Math.min(rstyle.srcX, rstyle.midX, rstyle.tgtX); + ex2 = Math.max(rstyle.srcX, rstyle.midX, rstyle.tgtX); + ey1 = Math.min(rstyle.srcY, rstyle.midY, rstyle.tgtY); + ey2 = Math.max(rstyle.srcY, rstyle.midY, rstyle.tgtY); + + // take into account edge width + ex1 -= wHalf; + ex2 += wHalf; + ey1 -= wHalf; + ey2 += wHalf; + updateBounds(bounds, ex1, ey1, ex2, ey2); + + // precise edges + //////////////// + + if (curveStyle === 'haystack') { + var hpts = rstyle.haystackPts; + if (hpts && hpts.length === 2) { + ex1 = hpts[0].x; + ey1 = hpts[0].y; + ex2 = hpts[1].x; + ey2 = hpts[1].y; + if (ex1 > ex2) { + var temp = ex1; + ex1 = ex2; + ex2 = temp; + } + if (ey1 > ey2) { + var _temp = ey1; + ey1 = ey2; + ey2 = _temp; + } + updateBounds(bounds, ex1 - wHalf, ey1 - wHalf, ex2 + wHalf, ey2 + wHalf); + } + } else if (curveStyle === 'bezier' || curveStyle === 'unbundled-bezier' || curveStyle === 'segments' || curveStyle === 'taxi') { + var pts; + switch (curveStyle) { + case 'bezier': + case 'unbundled-bezier': + pts = rstyle.bezierPts; + break; + case 'segments': + case 'taxi': + pts = rstyle.linePts; + break; + } + if (pts != null) { + for (var j = 0; j < pts.length; j++) { + var pt = pts[j]; + ex1 = pt.x - wHalf; + ex2 = pt.x + wHalf; + ey1 = pt.y - wHalf; + ey2 = pt.y + wHalf; + updateBounds(bounds, ex1, ey1, ex2, ey2); + } + } + } // bezier-like or segment-like edge + } else { + // headless or style disabled + + // fallback on source and target positions + ////////////////////////////////////////// + + var n1 = ele.source(); + var n1pos = n1.position(); + var n2 = ele.target(); + var n2pos = n2.position(); + ex1 = n1pos.x; + ex2 = n2pos.x; + ey1 = n1pos.y; + ey2 = n2pos.y; + if (ex1 > ex2) { + var _temp2 = ex1; + ex1 = ex2; + ex2 = _temp2; + } + if (ey1 > ey2) { + var _temp3 = ey1; + ey1 = ey2; + ey2 = _temp3; + } + + // take into account edge width + ex1 -= wHalf; + ex2 += wHalf; + ey1 -= wHalf; + ey2 += wHalf; + updateBounds(bounds, ex1, ey1, ex2, ey2); + } // headless or style disabled + } // edges + + // handle edge arrow size + ///////////////////////// + + if (styleEnabled && options.includeEdges && isEdge) { + updateBoundsFromArrow(bounds, ele, 'mid-source'); + updateBoundsFromArrow(bounds, ele, 'mid-target'); + updateBoundsFromArrow(bounds, ele, 'source'); + updateBoundsFromArrow(bounds, ele, 'target'); + } + + // ghost + //////// + + if (styleEnabled) { + var ghost = ele.pstyle('ghost').value === 'yes'; + if (ghost) { + var gx = ele.pstyle('ghost-offset-x').pfValue; + var gy = ele.pstyle('ghost-offset-y').pfValue; + updateBounds(bounds, bounds.x1 + gx, bounds.y1 + gy, bounds.x2 + gx, bounds.y2 + gy); + } + } + + // always store the body bounds separately from the labels + var bbBody = _p.bodyBounds = _p.bodyBounds || {}; + assignBoundingBox(bbBody, bounds); + expandBoundingBoxSides(bbBody, manualExpansion); + expandBoundingBox(bbBody, 1); // expand to work around browser dimension inaccuracies + + // overlay + ////////// + + if (styleEnabled) { + ex1 = bounds.x1; + ex2 = bounds.x2; + ey1 = bounds.y1; + ey2 = bounds.y2; + updateBounds(bounds, ex1 - padding, ey1 - padding, ex2 + padding, ey2 + padding); + } + + // always store the body bounds separately from the labels + var bbOverlay = _p.overlayBounds = _p.overlayBounds || {}; + assignBoundingBox(bbOverlay, bounds); + expandBoundingBoxSides(bbOverlay, manualExpansion); + expandBoundingBox(bbOverlay, 1); // expand to work around browser dimension inaccuracies + + // handle label dimensions + ////////////////////////// + + var bbLabels = _p.labelBounds = _p.labelBounds || {}; + if (bbLabels.all != null) { + clearBoundingBox(bbLabels.all); + } else { + bbLabels.all = makeBoundingBox(); + } + if (styleEnabled && options.includeLabels) { + if (options.includeMainLabels) { + updateBoundsFromLabel(bounds, ele, null); + } + if (isEdge) { + if (options.includeSourceLabels) { + updateBoundsFromLabel(bounds, ele, 'source'); + } + if (options.includeTargetLabels) { + updateBoundsFromLabel(bounds, ele, 'target'); + } + } + } // style enabled for labels + } // if displayed + + bounds.x1 = noninf(bounds.x1); + bounds.y1 = noninf(bounds.y1); + bounds.x2 = noninf(bounds.x2); + bounds.y2 = noninf(bounds.y2); + bounds.w = noninf(bounds.x2 - bounds.x1); + bounds.h = noninf(bounds.y2 - bounds.y1); + if (bounds.w > 0 && bounds.h > 0 && displayed) { + expandBoundingBoxSides(bounds, manualExpansion); + + // expand bounds by 1 because antialiasing can increase the visual/effective size by 1 on all sides + expandBoundingBox(bounds, 1); + } + return bounds; +}; +var getKey = function getKey(opts) { + var i = 0; + var tf = function tf(val) { + return (val ? 1 : 0) << i++; + }; + var key = 0; + key += tf(opts.incudeNodes); + key += tf(opts.includeEdges); + key += tf(opts.includeLabels); + key += tf(opts.includeMainLabels); + key += tf(opts.includeSourceLabels); + key += tf(opts.includeTargetLabels); + key += tf(opts.includeOverlays); + key += tf(opts.includeOutlines); + return key; +}; +var getBoundingBoxPosKey = function getBoundingBoxPosKey(ele) { + if (ele.isEdge()) { + var p1 = ele.source().position(); + var p2 = ele.target().position(); + var r = function r(x) { + return Math.round(x); + }; + return hashIntsArray([r(p1.x), r(p1.y), r(p2.x), r(p2.y)]); + } else { + return 0; + } +}; +var cachedBoundingBoxImpl = function cachedBoundingBoxImpl(ele, opts) { + var _p = ele._private; + var bb; + var isEdge = ele.isEdge(); + var key = opts == null ? defBbOptsKey : getKey(opts); + var usingDefOpts = key === defBbOptsKey; + var currPosKey = getBoundingBoxPosKey(ele); + var isPosKeySame = _p.bbCachePosKey === currPosKey; + var useCache = opts.useCache && isPosKeySame; + var isDirty = function isDirty(ele) { + return ele._private.bbCache == null || ele._private.styleDirty; + }; + var needRecalc = !useCache || isDirty(ele) || isEdge && isDirty(ele.source()) || isDirty(ele.target()); + if (needRecalc) { + if (!isPosKeySame) { + ele.recalculateRenderedStyle(useCache); + } + bb = boundingBoxImpl(ele, defBbOpts); + _p.bbCache = bb; + _p.bbCachePosKey = currPosKey; + } else { + bb = _p.bbCache; + } + + // not using def opts => need to build up bb from combination of sub bbs + if (!usingDefOpts) { + var isNode = ele.isNode(); + bb = makeBoundingBox(); + if (opts.includeNodes && isNode || opts.includeEdges && !isNode) { + if (opts.includeOverlays) { + updateBoundsFromBox(bb, _p.overlayBounds); + } else { + updateBoundsFromBox(bb, _p.bodyBounds); + } + } + if (opts.includeLabels) { + if (opts.includeMainLabels && (!isEdge || opts.includeSourceLabels && opts.includeTargetLabels)) { + updateBoundsFromBox(bb, _p.labelBounds.all); + } else { + if (opts.includeMainLabels) { + updateBoundsFromBox(bb, _p.labelBounds.mainRot); + } + if (opts.includeSourceLabels) { + updateBoundsFromBox(bb, _p.labelBounds.sourceRot); + } + if (opts.includeTargetLabels) { + updateBoundsFromBox(bb, _p.labelBounds.targetRot); + } + } + } + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + } + return bb; +}; +var defBbOpts = { + includeNodes: true, + includeEdges: true, + includeLabels: true, + includeMainLabels: true, + includeSourceLabels: true, + includeTargetLabels: true, + includeOverlays: true, + includeUnderlays: true, + includeOutlines: true, + useCache: true +}; +var defBbOptsKey = getKey(defBbOpts); +var filledBbOpts = defaults$g(defBbOpts); +elesfn$b.boundingBox = function (options) { + var bounds; + + // the main usecase is ele.boundingBox() for a single element with no/def options + // specified s.t. the cache is used, so check for this case to make it faster by + // avoiding the overhead of the rest of the function + if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (options === undefined || options.useCache === undefined || options.useCache === true)) { + if (options === undefined) { + options = defBbOpts; + } else { + options = filledBbOpts(options); + } + bounds = cachedBoundingBoxImpl(this[0], options); + } else { + bounds = makeBoundingBox(); + options = options || defBbOpts; + var opts = filledBbOpts(options); + var eles = this; + var cy = eles.cy(); + var styleEnabled = cy.styleEnabled(); + if (styleEnabled) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _p = ele._private; + var currPosKey = getBoundingBoxPosKey(ele); + var isPosKeySame = _p.bbCachePosKey === currPosKey; + var useCache = opts.useCache && isPosKeySame && !_p.styleDirty; + ele.recalculateRenderedStyle(useCache); + } + } + this.updateCompoundBounds(!options.useCache); + for (var _i = 0; _i < eles.length; _i++) { + var _ele = eles[_i]; + updateBoundsFromBox(bounds, cachedBoundingBoxImpl(_ele, opts)); + } + } + bounds.x1 = noninf(bounds.x1); + bounds.y1 = noninf(bounds.y1); + bounds.x2 = noninf(bounds.x2); + bounds.y2 = noninf(bounds.y2); + bounds.w = noninf(bounds.x2 - bounds.x1); + bounds.h = noninf(bounds.y2 - bounds.y1); + return bounds; +}; +elesfn$b.dirtyBoundingBoxCache = function () { + for (var i = 0; i < this.length; i++) { + var _p = this[i]._private; + _p.bbCache = null; + _p.bbCachePosKey = null; + _p.bodyBounds = null; + _p.overlayBounds = null; + _p.labelBounds.all = null; + _p.labelBounds.source = null; + _p.labelBounds.target = null; + _p.labelBounds.main = null; + _p.labelBounds.sourceRot = null; + _p.labelBounds.targetRot = null; + _p.labelBounds.mainRot = null; + _p.arrowBounds.source = null; + _p.arrowBounds.target = null; + _p.arrowBounds['mid-source'] = null; + _p.arrowBounds['mid-target'] = null; + } + this.emitAndNotify('bounds'); + return this; +}; + +// private helper to get bounding box for custom node positions +// - good for perf in certain cases but currently requires dirtying the rendered style +// - would be better to not modify the nodes but the nodes are read directly everywhere in the renderer... +// - try to use for only things like discrete layouts where the node position would change anyway +elesfn$b.boundingBoxAt = function (fn) { + var nodes = this.nodes(); + var cy = this.cy(); + var hasCompoundNodes = cy.hasCompoundNodes(); + var parents = cy.collection(); + if (hasCompoundNodes) { + parents = nodes.filter(function (node) { + return node.isParent(); + }); + nodes = nodes.not(parents); + } + if (plainObject(fn)) { + var obj = fn; + fn = function fn() { + return obj; + }; + } + var storeOldPos = function storeOldPos(node, i) { + return node._private.bbAtOldPos = fn(node, i); + }; + var getOldPos = function getOldPos(node) { + return node._private.bbAtOldPos; + }; + cy.startBatch(); + nodes.forEach(storeOldPos).silentPositions(fn); + if (hasCompoundNodes) { + parents.dirtyCompoundBoundsCache(); + parents.dirtyBoundingBoxCache(); + parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle + } + + var bb = copyBoundingBox(this.boundingBox({ + useCache: false + })); + nodes.silentPositions(getOldPos); + if (hasCompoundNodes) { + parents.dirtyCompoundBoundsCache(); + parents.dirtyBoundingBoxCache(); + parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle + } + + cy.endBatch(); + return bb; +}; +fn$3.boundingbox = fn$3.bb = fn$3.boundingBox; +fn$3.renderedBoundingbox = fn$3.renderedBoundingBox; +var bounds = elesfn$b; + +var fn$2, elesfn$a; +fn$2 = elesfn$a = {}; +var defineDimFns = function defineDimFns(opts) { + opts.uppercaseName = capitalize(opts.name); + opts.autoName = 'auto' + opts.uppercaseName; + opts.labelName = 'label' + opts.uppercaseName; + opts.outerName = 'outer' + opts.uppercaseName; + opts.uppercaseOuterName = capitalize(opts.outerName); + fn$2[opts.name] = function dimImpl() { + var ele = this[0]; + var _p = ele._private; + var cy = _p.cy; + var styleEnabled = cy._private.styleEnabled; + if (ele) { + if (styleEnabled) { + if (ele.isParent()) { + ele.updateCompoundBounds(); + return _p[opts.autoName] || 0; + } + var d = ele.pstyle(opts.name); + switch (d.strValue) { + case 'label': + ele.recalculateRenderedStyle(); + return _p.rstyle[opts.labelName] || 0; + default: + return d.pfValue; + } + } else { + return 1; + } + } + }; + fn$2['outer' + opts.uppercaseName] = function outerDimImpl() { + var ele = this[0]; + var _p = ele._private; + var cy = _p.cy; + var styleEnabled = cy._private.styleEnabled; + if (ele) { + if (styleEnabled) { + var dim = ele[opts.name](); + var border = ele.pstyle('border-width').pfValue; // n.b. 1/2 each side + var padding = 2 * ele.padding(); + return dim + border + padding; + } else { + return 1; + } + } + }; + fn$2['rendered' + opts.uppercaseName] = function renderedDimImpl() { + var ele = this[0]; + if (ele) { + var d = ele[opts.name](); + return d * this.cy().zoom(); + } + }; + fn$2['rendered' + opts.uppercaseOuterName] = function renderedOuterDimImpl() { + var ele = this[0]; + if (ele) { + var od = ele[opts.outerName](); + return od * this.cy().zoom(); + } + }; +}; +defineDimFns({ + name: 'width' +}); +defineDimFns({ + name: 'height' +}); +elesfn$a.padding = function () { + var ele = this[0]; + var _p = ele._private; + if (ele.isParent()) { + ele.updateCompoundBounds(); + if (_p.autoPadding !== undefined) { + return _p.autoPadding; + } else { + return ele.pstyle('padding').pfValue; + } + } else { + return ele.pstyle('padding').pfValue; + } +}; +elesfn$a.paddedHeight = function () { + var ele = this[0]; + return ele.height() + 2 * ele.padding(); +}; +elesfn$a.paddedWidth = function () { + var ele = this[0]; + return ele.width() + 2 * ele.padding(); +}; +var widthHeight = elesfn$a; + +var ifEdge = function ifEdge(ele, getValue) { + if (ele.isEdge()) { + return getValue(ele); + } +}; +var ifEdgeRenderedPosition = function ifEdgeRenderedPosition(ele, getPoint) { + if (ele.isEdge()) { + var cy = ele.cy(); + return modelToRenderedPosition(getPoint(ele), cy.zoom(), cy.pan()); + } +}; +var ifEdgeRenderedPositions = function ifEdgeRenderedPositions(ele, getPoints) { + if (ele.isEdge()) { + var cy = ele.cy(); + var pan = cy.pan(); + var zoom = cy.zoom(); + return getPoints(ele).map(function (p) { + return modelToRenderedPosition(p, zoom, pan); + }); + } +}; +var controlPoints = function controlPoints(ele) { + return ele.renderer().getControlPoints(ele); +}; +var segmentPoints = function segmentPoints(ele) { + return ele.renderer().getSegmentPoints(ele); +}; +var sourceEndpoint = function sourceEndpoint(ele) { + return ele.renderer().getSourceEndpoint(ele); +}; +var targetEndpoint = function targetEndpoint(ele) { + return ele.renderer().getTargetEndpoint(ele); +}; +var midpoint = function midpoint(ele) { + return ele.renderer().getEdgeMidpoint(ele); +}; +var pts = { + controlPoints: { + get: controlPoints, + mult: true + }, + segmentPoints: { + get: segmentPoints, + mult: true + }, + sourceEndpoint: { + get: sourceEndpoint + }, + targetEndpoint: { + get: targetEndpoint + }, + midpoint: { + get: midpoint + } +}; +var renderedName = function renderedName(name) { + return 'rendered' + name[0].toUpperCase() + name.substr(1); +}; +var edgePoints = Object.keys(pts).reduce(function (obj, name) { + var spec = pts[name]; + var rName = renderedName(name); + obj[name] = function () { + return ifEdge(this, spec.get); + }; + if (spec.mult) { + obj[rName] = function () { + return ifEdgeRenderedPositions(this, spec.get); + }; + } else { + obj[rName] = function () { + return ifEdgeRenderedPosition(this, spec.get); + }; + } + return obj; +}, {}); + +var dimensions = extend({}, position, bounds, widthHeight, edgePoints); + +/*! +Event object based on jQuery events, MIT license + +https://jquery.org/license/ +https://tldrlegal.com/license/mit-license +https://github.com/jquery/jquery/blob/master/src/event.js +*/ + +var Event = function Event(src, props) { + this.recycle(src, props); +}; +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +Event.prototype = { + instanceString: function instanceString() { + return 'event'; + }, + recycle: function recycle(src, props) { + this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = returnFalse; + if (src != null && src.preventDefault) { + // Browser Event object + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented ? returnTrue : returnFalse; + } else if (src != null && src.type) { + // Plain object containing all event details + props = src; + } else { + // Event string + this.type = src; + } + + // Put explicitly provided properties onto the event object + if (props != null) { + // more efficient to manually copy fields we use + this.originalEvent = props.originalEvent; + this.type = props.type != null ? props.type : this.type; + this.cy = props.cy; + this.target = props.target; + this.position = props.position; + this.renderedPosition = props.renderedPosition; + this.namespace = props.namespace; + this.layout = props.layout; + } + if (this.cy != null && this.position != null && this.renderedPosition == null) { + // create a rendered position based on the passed position + var pos = this.position; + var zoom = this.cy.zoom(); + var pan = this.cy.pan(); + this.renderedPosition = { + x: pos.x * zoom + pan.x, + y: pos.y * zoom + pan.y + }; + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now(); + }, + preventDefault: function preventDefault() { + this.isDefaultPrevented = returnTrue; + var e = this.originalEvent; + if (!e) { + return; + } + + // if preventDefault exists run it on the original event + if (e.preventDefault) { + e.preventDefault(); + } + }, + stopPropagation: function stopPropagation() { + this.isPropagationStopped = returnTrue; + var e = this.originalEvent; + if (!e) { + return; + } + + // if stopPropagation exists run it on the original event + if (e.stopPropagation) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function stopImmediatePropagation() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +var eventRegex = /^([^.]+)(\.(?:[^.]+))?$/; // regex for matching event strings (e.g. "click.namespace") +var universalNamespace = '.*'; // matches as if no namespace specified and prevents users from unbinding accidentally + +var defaults$8 = { + qualifierCompare: function qualifierCompare(q1, q2) { + return q1 === q2; + }, + eventMatches: function eventMatches( /*context, listener, eventObj*/ + ) { + return true; + }, + addEventFields: function addEventFields( /*context, evt*/ + ) {}, + callbackContext: function callbackContext(context /*, listener, eventObj*/) { + return context; + }, + beforeEmit: function beforeEmit( /* context, listener, eventObj */ + ) {}, + afterEmit: function afterEmit( /* context, listener, eventObj */ + ) {}, + bubble: function bubble( /*context*/ + ) { + return false; + }, + parent: function parent( /*context*/ + ) { + return null; + }, + context: null +}; +var defaultsKeys = Object.keys(defaults$8); +var emptyOpts = {}; +function Emitter() { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyOpts; + var context = arguments.length > 1 ? arguments[1] : undefined; + // micro-optimisation vs Object.assign() -- reduces Element instantiation time + for (var i = 0; i < defaultsKeys.length; i++) { + var key = defaultsKeys[i]; + this[key] = opts[key] || defaults$8[key]; + } + this.context = context || this.context; + this.listeners = []; + this.emitting = 0; +} +var p = Emitter.prototype; +var forEachEvent = function forEachEvent(self, handler, events, qualifier, callback, conf, confOverrides) { + if (fn$6(qualifier)) { + callback = qualifier; + qualifier = null; + } + if (confOverrides) { + if (conf == null) { + conf = confOverrides; + } else { + conf = extend({}, conf, confOverrides); + } + } + var eventList = array(events) ? events : events.split(/\s+/); + for (var i = 0; i < eventList.length; i++) { + var evt = eventList[i]; + if (emptyString(evt)) { + continue; + } + var match = evt.match(eventRegex); // type[.namespace] + + if (match) { + var type = match[1]; + var namespace = match[2] ? match[2] : null; + var ret = handler(self, evt, type, namespace, qualifier, callback, conf); + if (ret === false) { + break; + } // allow exiting early + } + } +}; + +var makeEventObj = function makeEventObj(self, obj) { + self.addEventFields(self.context, obj); + return new Event(obj.type, obj); +}; +var forEachEventObj = function forEachEventObj(self, handler, events) { + if (event(events)) { + handler(self, events); + return; + } else if (plainObject(events)) { + handler(self, makeEventObj(self, events)); + return; + } + var eventList = array(events) ? events : events.split(/\s+/); + for (var i = 0; i < eventList.length; i++) { + var evt = eventList[i]; + if (emptyString(evt)) { + continue; + } + var match = evt.match(eventRegex); // type[.namespace] + + if (match) { + var type = match[1]; + var namespace = match[2] ? match[2] : null; + var eventObj = makeEventObj(self, { + type: type, + namespace: namespace, + target: self.context + }); + handler(self, eventObj); + } + } +}; +p.on = p.addListener = function (events, qualifier, callback, conf, confOverrides) { + forEachEvent(this, function (self, event, type, namespace, qualifier, callback, conf) { + if (fn$6(callback)) { + self.listeners.push({ + event: event, + // full event string + callback: callback, + // callback to run + type: type, + // the event type (e.g. 'click') + namespace: namespace, + // the event namespace (e.g. ".foo") + qualifier: qualifier, + // a restriction on whether to match this emitter + conf: conf // additional configuration + }); + } + }, events, qualifier, callback, conf, confOverrides); + return this; +}; +p.one = function (events, qualifier, callback, conf) { + return this.on(events, qualifier, callback, conf, { + one: true + }); +}; +p.removeListener = p.off = function (events, qualifier, callback, conf) { + var _this = this; + if (this.emitting !== 0) { + this.listeners = copyArray(this.listeners); + } + var listeners = this.listeners; + var _loop = function _loop(i) { + var listener = listeners[i]; + forEachEvent(_this, function (self, event, type, namespace, qualifier, callback /*, conf*/) { + if ((listener.type === type || events === '*') && (!namespace && listener.namespace !== '.*' || listener.namespace === namespace) && (!qualifier || self.qualifierCompare(listener.qualifier, qualifier)) && (!callback || listener.callback === callback)) { + listeners.splice(i, 1); + return false; + } + }, events, qualifier, callback, conf); + }; + for (var i = listeners.length - 1; i >= 0; i--) { + _loop(i); + } + return this; +}; +p.removeAllListeners = function () { + return this.removeListener('*'); +}; +p.emit = p.trigger = function (events, extraParams, manualCallback) { + var listeners = this.listeners; + var numListenersBeforeEmit = listeners.length; + this.emitting++; + if (!array(extraParams)) { + extraParams = [extraParams]; + } + forEachEventObj(this, function (self, eventObj) { + if (manualCallback != null) { + listeners = [{ + event: eventObj.event, + type: eventObj.type, + namespace: eventObj.namespace, + callback: manualCallback + }]; + numListenersBeforeEmit = listeners.length; + } + var _loop2 = function _loop2(i) { + var listener = listeners[i]; + if (listener.type === eventObj.type && (!listener.namespace || listener.namespace === eventObj.namespace || listener.namespace === universalNamespace) && self.eventMatches(self.context, listener, eventObj)) { + var args = [eventObj]; + if (extraParams != null) { + push(args, extraParams); + } + self.beforeEmit(self.context, listener, eventObj); + if (listener.conf && listener.conf.one) { + self.listeners = self.listeners.filter(function (l) { + return l !== listener; + }); + } + var context = self.callbackContext(self.context, listener, eventObj); + var ret = listener.callback.apply(context, args); + self.afterEmit(self.context, listener, eventObj); + if (ret === false) { + eventObj.stopPropagation(); + eventObj.preventDefault(); + } + } // if listener matches + }; + for (var i = 0; i < numListenersBeforeEmit; i++) { + _loop2(i); + } // for listener + + if (self.bubble(self.context) && !eventObj.isPropagationStopped()) { + self.parent(self.context).emit(eventObj, extraParams); + } + }, events); + this.emitting--; + return this; +}; + +var emitterOptions$1 = { + qualifierCompare: function qualifierCompare(selector1, selector2) { + if (selector1 == null || selector2 == null) { + return selector1 == null && selector2 == null; + } else { + return selector1.sameText(selector2); + } + }, + eventMatches: function eventMatches(ele, listener, eventObj) { + var selector = listener.qualifier; + if (selector != null) { + return ele !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target); + } + return true; + }, + addEventFields: function addEventFields(ele, evt) { + evt.cy = ele.cy(); + evt.target = ele; + }, + callbackContext: function callbackContext(ele, listener, eventObj) { + return listener.qualifier != null ? eventObj.target : ele; + }, + beforeEmit: function beforeEmit(context, listener /*, eventObj*/) { + if (listener.conf && listener.conf.once) { + listener.conf.onceCollection.removeListener(listener.event, listener.qualifier, listener.callback); + } + }, + bubble: function bubble() { + return true; + }, + parent: function parent(ele) { + return ele.isChild() ? ele.parent() : ele.cy(); + } +}; +var argSelector$1 = function argSelector(arg) { + if (string(arg)) { + return new Selector(arg); + } else { + return arg; + } +}; +var elesfn$9 = { + createEmitter: function createEmitter() { + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var _p = ele._private; + if (!_p.emitter) { + _p.emitter = new Emitter(emitterOptions$1, ele); + } + } + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(events, selector, callback) { + var argSel = argSelector$1(selector); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().on(events, argSel, callback); + } + return this; + }, + removeListener: function removeListener(events, selector, callback) { + var argSel = argSelector$1(selector); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().removeListener(events, argSel, callback); + } + return this; + }, + removeAllListeners: function removeAllListeners() { + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().removeAllListeners(); + } + return this; + }, + one: function one(events, selector, callback) { + var argSel = argSelector$1(selector); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().one(events, argSel, callback); + } + return this; + }, + once: function once(events, selector, callback) { + var argSel = argSelector$1(selector); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().on(events, argSel, callback, { + once: true, + onceCollection: this + }); + } + }, + emit: function emit(events, extraParams) { + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().emit(events, extraParams); + } + return this; + }, + emitAndNotify: function emitAndNotify(event, extraParams) { + // for internal use only + if (this.length === 0) { + return; + } // empty collections don't need to notify anything + + // notify renderer + this.cy().notify(event, this); + this.emit(event, extraParams); + return this; + } +}; +define.eventAliasesOn(elesfn$9); + +var elesfn$8 = { + nodes: function nodes(selector) { + return this.filter(function (ele) { + return ele.isNode(); + }).filter(selector); + }, + edges: function edges(selector) { + return this.filter(function (ele) { + return ele.isEdge(); + }).filter(selector); + }, + // internal helper to get nodes and edges as separate collections with single iteration over elements + byGroup: function byGroup() { + var nodes = this.spawn(); + var edges = this.spawn(); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + if (ele.isNode()) { + nodes.push(ele); + } else { + edges.push(ele); + } + } + return { + nodes: nodes, + edges: edges + }; + }, + filter: function filter(_filter, thisArg) { + if (_filter === undefined) { + // check this first b/c it's the most common/performant case + return this; + } else if (string(_filter) || elementOrCollection(_filter)) { + return new Selector(_filter).filter(this); + } else if (fn$6(_filter)) { + var filterEles = this.spawn(); + var eles = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var include = thisArg ? _filter.apply(thisArg, [ele, i, eles]) : _filter(ele, i, eles); + if (include) { + filterEles.push(ele); + } + } + return filterEles; + } + return this.spawn(); // if not handled by above, give 'em an empty collection + }, + + not: function not(toRemove) { + if (!toRemove) { + return this; + } else { + if (string(toRemove)) { + toRemove = this.filter(toRemove); + } + var elements = this.spawn(); + for (var i = 0; i < this.length; i++) { + var element = this[i]; + var remove = toRemove.has(element); + if (!remove) { + elements.push(element); + } + } + return elements; + } + }, + absoluteComplement: function absoluteComplement() { + var cy = this.cy(); + return cy.mutableElements().not(this); + }, + intersect: function intersect(other) { + // if a selector is specified, then filter by it instead + if (string(other)) { + var selector = other; + return this.filter(selector); + } + var elements = this.spawn(); + var col1 = this; + var col2 = other; + var col1Smaller = this.length < other.length; + var colS = col1Smaller ? col1 : col2; + var colL = col1Smaller ? col2 : col1; + for (var i = 0; i < colS.length; i++) { + var ele = colS[i]; + if (colL.has(ele)) { + elements.push(ele); + } + } + return elements; + }, + xor: function xor(other) { + var cy = this._private.cy; + if (string(other)) { + other = cy.$(other); + } + var elements = this.spawn(); + var col1 = this; + var col2 = other; + var add = function add(col, other) { + for (var i = 0; i < col.length; i++) { + var ele = col[i]; + var id = ele._private.data.id; + var inOther = other.hasElementWithId(id); + if (!inOther) { + elements.push(ele); + } + } + }; + add(col1, col2); + add(col2, col1); + return elements; + }, + diff: function diff(other) { + var cy = this._private.cy; + if (string(other)) { + other = cy.$(other); + } + var left = this.spawn(); + var right = this.spawn(); + var both = this.spawn(); + var col1 = this; + var col2 = other; + var add = function add(col, other, retEles) { + for (var i = 0; i < col.length; i++) { + var ele = col[i]; + var id = ele._private.data.id; + var inOther = other.hasElementWithId(id); + if (inOther) { + both.merge(ele); + } else { + retEles.push(ele); + } + } + }; + add(col1, col2, left); + add(col2, col1, right); + return { + left: left, + right: right, + both: both + }; + }, + add: function add(toAdd) { + var cy = this._private.cy; + if (!toAdd) { + return this; + } + if (string(toAdd)) { + var selector = toAdd; + toAdd = cy.mutableElements().filter(selector); + } + var elements = this.spawnSelf(); + for (var i = 0; i < toAdd.length; i++) { + var ele = toAdd[i]; + var add = !this.has(ele); + if (add) { + elements.push(ele); + } + } + return elements; + }, + // in place merge on calling collection + merge: function merge(toAdd) { + var _p = this._private; + var cy = _p.cy; + if (!toAdd) { + return this; + } + if (toAdd && string(toAdd)) { + var selector = toAdd; + toAdd = cy.mutableElements().filter(selector); + } + var map = _p.map; + for (var i = 0; i < toAdd.length; i++) { + var toAddEle = toAdd[i]; + var id = toAddEle._private.data.id; + var add = !map.has(id); + if (add) { + var index = this.length++; + this[index] = toAddEle; + map.set(id, { + ele: toAddEle, + index: index + }); + } + } + return this; // chaining + }, + + unmergeAt: function unmergeAt(i) { + var ele = this[i]; + var id = ele.id(); + var _p = this._private; + var map = _p.map; + + // remove ele + this[i] = undefined; + map["delete"](id); + var unmergedLastEle = i === this.length - 1; + + // replace empty spot with last ele in collection + if (this.length > 1 && !unmergedLastEle) { + var lastEleI = this.length - 1; + var lastEle = this[lastEleI]; + var lastEleId = lastEle._private.data.id; + this[lastEleI] = undefined; + this[i] = lastEle; + map.set(lastEleId, { + ele: lastEle, + index: i + }); + } + + // the collection is now 1 ele smaller + this.length--; + return this; + }, + // remove single ele in place in calling collection + unmergeOne: function unmergeOne(ele) { + ele = ele[0]; + var _p = this._private; + var id = ele._private.data.id; + var map = _p.map; + var entry = map.get(id); + if (!entry) { + return this; // no need to remove + } + + var i = entry.index; + this.unmergeAt(i); + return this; + }, + // remove eles in place on calling collection + unmerge: function unmerge(toRemove) { + var cy = this._private.cy; + if (!toRemove) { + return this; + } + if (toRemove && string(toRemove)) { + var selector = toRemove; + toRemove = cy.mutableElements().filter(selector); + } + for (var i = 0; i < toRemove.length; i++) { + this.unmergeOne(toRemove[i]); + } + return this; // chaining + }, + + unmergeBy: function unmergeBy(toRmFn) { + for (var i = this.length - 1; i >= 0; i--) { + var ele = this[i]; + if (toRmFn(ele)) { + this.unmergeAt(i); + } + } + return this; + }, + map: function map(mapFn, thisArg) { + var arr = []; + var eles = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var ret = thisArg ? mapFn.apply(thisArg, [ele, i, eles]) : mapFn(ele, i, eles); + arr.push(ret); + } + return arr; + }, + reduce: function reduce(fn, initialValue) { + var val = initialValue; + var eles = this; + for (var i = 0; i < eles.length; i++) { + val = fn(val, eles[i], i, eles); + } + return val; + }, + max: function max(valFn, thisArg) { + var max = -Infinity; + var maxEle; + var eles = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles); + if (val > max) { + max = val; + maxEle = ele; + } + } + return { + value: max, + ele: maxEle + }; + }, + min: function min(valFn, thisArg) { + var min = Infinity; + var minEle; + var eles = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles); + if (val < min) { + min = val; + minEle = ele; + } + } + return { + value: min, + ele: minEle + }; + } +}; + +// aliases +var fn$1 = elesfn$8; +fn$1['u'] = fn$1['|'] = fn$1['+'] = fn$1.union = fn$1.or = fn$1.add; +fn$1['\\'] = fn$1['!'] = fn$1['-'] = fn$1.difference = fn$1.relativeComplement = fn$1.subtract = fn$1.not; +fn$1['n'] = fn$1['&'] = fn$1['.'] = fn$1.and = fn$1.intersection = fn$1.intersect; +fn$1['^'] = fn$1['(+)'] = fn$1['(-)'] = fn$1.symmetricDifference = fn$1.symdiff = fn$1.xor; +fn$1.fnFilter = fn$1.filterFn = fn$1.stdFilter = fn$1.filter; +fn$1.complement = fn$1.abscomp = fn$1.absoluteComplement; + +var elesfn$7 = { + isNode: function isNode() { + return this.group() === 'nodes'; + }, + isEdge: function isEdge() { + return this.group() === 'edges'; + }, + isLoop: function isLoop() { + return this.isEdge() && this.source()[0] === this.target()[0]; + }, + isSimple: function isSimple() { + return this.isEdge() && this.source()[0] !== this.target()[0]; + }, + group: function group() { + var ele = this[0]; + if (ele) { + return ele._private.group; + } + } +}; + +/** + * Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), + * and z-index (low to high). These styles affect how this applies: + * + * z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the + * same depth as the root of the compound graph, followed by the default value `auto` which draws in order from + * root to leaves of the compound graph. The last drawn is `top`. + * z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. + * `manual` ignores this convention and draws based on the `z-index` value setting. + * z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher + * `z-index` will be drawn on top of an element with a lower `z-index`. + */ +var zIndexSort = function zIndexSort(a, b) { + var cy = a.cy(); + var hasCompoundNodes = cy.hasCompoundNodes(); + function getDepth(ele) { + var style = ele.pstyle('z-compound-depth'); + if (style.value === 'auto') { + return hasCompoundNodes ? ele.zDepth() : 0; + } else if (style.value === 'bottom') { + return -1; + } else if (style.value === 'top') { + return MAX_INT$1; + } + // 'orphan' + return 0; + } + var depthDiff = getDepth(a) - getDepth(b); + if (depthDiff !== 0) { + return depthDiff; + } + function getEleDepth(ele) { + var style = ele.pstyle('z-index-compare'); + if (style.value === 'auto') { + return ele.isNode() ? 1 : 0; + } + // 'manual' + return 0; + } + var eleDiff = getEleDepth(a) - getEleDepth(b); + if (eleDiff !== 0) { + return eleDiff; + } + var zDiff = a.pstyle('z-index').value - b.pstyle('z-index').value; + if (zDiff !== 0) { + return zDiff; + } + // compare indices in the core (order added to graph w/ last on top) + return a.poolIndex() - b.poolIndex(); +}; + +var elesfn$6 = { + forEach: function forEach(fn, thisArg) { + if (fn$6(fn)) { + var N = this.length; + for (var i = 0; i < N; i++) { + var ele = this[i]; + var ret = thisArg ? fn.apply(thisArg, [ele, i, this]) : fn(ele, i, this); + if (ret === false) { + break; + } // exit each early on return false + } + } + + return this; + }, + toArray: function toArray() { + var array = []; + for (var i = 0; i < this.length; i++) { + array.push(this[i]); + } + return array; + }, + slice: function slice(start, end) { + var array = []; + var thisSize = this.length; + if (end == null) { + end = thisSize; + } + if (start == null) { + start = 0; + } + if (start < 0) { + start = thisSize + start; + } + if (end < 0) { + end = thisSize + end; + } + for (var i = start; i >= 0 && i < end && i < thisSize; i++) { + array.push(this[i]); + } + return this.spawn(array); + }, + size: function size() { + return this.length; + }, + eq: function eq(i) { + return this[i] || this.spawn(); + }, + first: function first() { + return this[0] || this.spawn(); + }, + last: function last() { + return this[this.length - 1] || this.spawn(); + }, + empty: function empty() { + return this.length === 0; + }, + nonempty: function nonempty() { + return !this.empty(); + }, + sort: function sort(sortFn) { + if (!fn$6(sortFn)) { + return this; + } + var sorted = this.toArray().sort(sortFn); + return this.spawn(sorted); + }, + sortByZIndex: function sortByZIndex() { + return this.sort(zIndexSort); + }, + zDepth: function zDepth() { + var ele = this[0]; + if (!ele) { + return undefined; + } + + // let cy = ele.cy(); + var _p = ele._private; + var group = _p.group; + if (group === 'nodes') { + var depth = _p.data.parent ? ele.parents().size() : 0; + if (!ele.isParent()) { + return MAX_INT$1 - 1; // childless nodes always on top + } + + return depth; + } else { + var src = _p.source; + var tgt = _p.target; + var srcDepth = src.zDepth(); + var tgtDepth = tgt.zDepth(); + return Math.max(srcDepth, tgtDepth, 0); // depth of deepest parent + } + } +}; + +elesfn$6.each = elesfn$6.forEach; +var defineSymbolIterator = function defineSymbolIterator() { + var typeofUndef = "undefined" ; + var isIteratorSupported = (typeof Symbol === "undefined" ? "undefined" : _typeof(Symbol)) != typeofUndef && _typeof(Symbol.iterator) != typeofUndef; // eslint-disable-line no-undef + + if (isIteratorSupported) { + elesfn$6[Symbol.iterator] = function () { + var _this = this; + // eslint-disable-line no-undef + var entry = { + value: undefined, + done: false + }; + var i = 0; + var length = this.length; + return _defineProperty({ + next: function next() { + if (i < length) { + entry.value = _this[i++]; + } else { + entry.value = undefined; + entry.done = true; + } + return entry; + } + }, Symbol.iterator, function () { + // eslint-disable-line no-undef + return this; + }); + }; + } +}; +defineSymbolIterator(); + +var getLayoutDimensionOptions = defaults$g({ + nodeDimensionsIncludeLabels: false +}); +var elesfn$5 = { + // Calculates and returns node dimensions { x, y } based on options given + layoutDimensions: function layoutDimensions(options) { + options = getLayoutDimensionOptions(options); + var dims; + if (!this.takesUpSpace()) { + dims = { + w: 0, + h: 0 + }; + } else if (options.nodeDimensionsIncludeLabels) { + var bbDim = this.boundingBox(); + dims = { + w: bbDim.w, + h: bbDim.h + }; + } else { + dims = { + w: this.outerWidth(), + h: this.outerHeight() + }; + } + + // sanitise the dimensions for external layouts (avoid division by zero) + if (dims.w === 0 || dims.h === 0) { + dims.w = dims.h = 1; + } + return dims; + }, + // using standard layout options, apply position function (w/ or w/o animation) + layoutPositions: function layoutPositions(layout, options, fn) { + var nodes = this.nodes().filter(function (n) { + return !n.isParent(); + }); + var cy = this.cy(); + var layoutEles = options.eles; // nodes & edges + var getMemoizeKey = function getMemoizeKey(node) { + return node.id(); + }; + var fnMem = memoize(fn, getMemoizeKey); // memoized version of position function + + layout.emit({ + type: 'layoutstart', + layout: layout + }); + layout.animations = []; + var calculateSpacing = function calculateSpacing(spacing, nodesBb, pos) { + var center = { + x: nodesBb.x1 + nodesBb.w / 2, + y: nodesBb.y1 + nodesBb.h / 2 + }; + var spacingVector = { + // scale from center of bounding box (not necessarily 0,0) + x: (pos.x - center.x) * spacing, + y: (pos.y - center.y) * spacing + }; + return { + x: center.x + spacingVector.x, + y: center.y + spacingVector.y + }; + }; + var useSpacingFactor = options.spacingFactor && options.spacingFactor !== 1; + var spacingBb = function spacingBb() { + if (!useSpacingFactor) { + return null; + } + var bb = makeBoundingBox(); + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var pos = fnMem(node, i); + expandBoundingBoxByPoint(bb, pos.x, pos.y); + } + return bb; + }; + var bb = spacingBb(); + var getFinalPos = memoize(function (node, i) { + var newPos = fnMem(node, i); + if (useSpacingFactor) { + var spacing = Math.abs(options.spacingFactor); + newPos = calculateSpacing(spacing, bb, newPos); + } + if (options.transform != null) { + newPos = options.transform(node, newPos); + } + return newPos; + }, getMemoizeKey); + if (options.animate) { + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var newPos = getFinalPos(node, i); + var animateNode = options.animateFilter == null || options.animateFilter(node, i); + if (animateNode) { + var ani = node.animation({ + position: newPos, + duration: options.animationDuration, + easing: options.animationEasing + }); + layout.animations.push(ani); + } else { + node.position(newPos); + } + } + if (options.fit) { + var fitAni = cy.animation({ + fit: { + boundingBox: layoutEles.boundingBoxAt(getFinalPos), + padding: options.padding + }, + duration: options.animationDuration, + easing: options.animationEasing + }); + layout.animations.push(fitAni); + } else if (options.zoom !== undefined && options.pan !== undefined) { + var zoomPanAni = cy.animation({ + zoom: options.zoom, + pan: options.pan, + duration: options.animationDuration, + easing: options.animationEasing + }); + layout.animations.push(zoomPanAni); + } + layout.animations.forEach(function (ani) { + return ani.play(); + }); + layout.one('layoutready', options.ready); + layout.emit({ + type: 'layoutready', + layout: layout + }); + Promise$1.all(layout.animations.map(function (ani) { + return ani.promise(); + })).then(function () { + layout.one('layoutstop', options.stop); + layout.emit({ + type: 'layoutstop', + layout: layout + }); + }); + } else { + nodes.positions(getFinalPos); + if (options.fit) { + cy.fit(options.eles, options.padding); + } + if (options.zoom != null) { + cy.zoom(options.zoom); + } + if (options.pan) { + cy.pan(options.pan); + } + layout.one('layoutready', options.ready); + layout.emit({ + type: 'layoutready', + layout: layout + }); + layout.one('layoutstop', options.stop); + layout.emit({ + type: 'layoutstop', + layout: layout + }); + } + return this; // chaining + }, + + layout: function layout(options) { + var cy = this.cy(); + return cy.makeLayout(extend({}, options, { + eles: this + })); + } +}; + +// aliases: +elesfn$5.createLayout = elesfn$5.makeLayout = elesfn$5.layout; + +function styleCache(key, fn, ele) { + var _p = ele._private; + var cache = _p.styleCache = _p.styleCache || []; + var val; + if ((val = cache[key]) != null) { + return val; + } else { + val = cache[key] = fn(ele); + return val; + } +} +function cacheStyleFunction(key, fn) { + key = hashString(key); + return function cachedStyleFunction(ele) { + return styleCache(key, fn, ele); + }; +} +function cachePrototypeStyleFunction(key, fn) { + key = hashString(key); + var selfFn = function selfFn(ele) { + return fn.call(ele); + }; + return function cachedPrototypeStyleFunction() { + var ele = this[0]; + if (ele) { + return styleCache(key, selfFn, ele); + } + }; +} +var elesfn$4 = { + recalculateRenderedStyle: function recalculateRenderedStyle(useCache) { + var cy = this.cy(); + var renderer = cy.renderer(); + var styleEnabled = cy.styleEnabled(); + if (renderer && styleEnabled) { + renderer.recalculateRenderedStyle(this, useCache); + } + return this; + }, + dirtyStyleCache: function dirtyStyleCache() { + var cy = this.cy(); + var dirty = function dirty(ele) { + return ele._private.styleCache = null; + }; + if (cy.hasCompoundNodes()) { + var eles; + eles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); + eles.merge(eles.connectedEdges()); + eles.forEach(dirty); + } else { + this.forEach(function (ele) { + dirty(ele); + ele.connectedEdges().forEach(dirty); + }); + } + return this; + }, + // fully updates (recalculates) the style for the elements + updateStyle: function updateStyle(notifyRenderer) { + var cy = this._private.cy; + if (!cy.styleEnabled()) { + return this; + } + if (cy.batching()) { + var bEles = cy._private.batchStyleEles; + bEles.merge(this); + return this; // chaining and exit early when batching + } + + var hasCompounds = cy.hasCompoundNodes(); + var updatedEles = this; + notifyRenderer = notifyRenderer || notifyRenderer === undefined ? true : false; + if (hasCompounds) { + // then add everything up and down for compound selector checks + updatedEles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); + } + + // let changedEles = style.apply( updatedEles ); + var changedEles = updatedEles; + if (notifyRenderer) { + changedEles.emitAndNotify('style'); // let renderer know we changed style + } else { + changedEles.emit('style'); // just fire the event + } + + updatedEles.forEach(function (ele) { + return ele._private.styleDirty = true; + }); + return this; // chaining + }, + + // private: clears dirty flag and recalculates style + cleanStyle: function cleanStyle() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return; + } + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + if (ele._private.styleDirty) { + // n.b. this flag should be set before apply() to avoid potential infinite recursion + ele._private.styleDirty = false; + cy.style().apply(ele); + } + } + }, + // get the internal parsed style object for the specified property + parsedStyle: function parsedStyle(property) { + var includeNonDefault = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var ele = this[0]; + var cy = ele.cy(); + if (!cy.styleEnabled()) { + return; + } + if (ele) { + this.cleanStyle(); + var overriddenStyle = ele._private.style[property]; + if (overriddenStyle != null) { + return overriddenStyle; + } else if (includeNonDefault) { + return cy.style().getDefaultProperty(property); + } else { + return null; + } + } + }, + numericStyle: function numericStyle(property) { + var ele = this[0]; + if (!ele.cy().styleEnabled()) { + return; + } + if (ele) { + var pstyle = ele.pstyle(property); + return pstyle.pfValue !== undefined ? pstyle.pfValue : pstyle.value; + } + }, + numericStyleUnits: function numericStyleUnits(property) { + var ele = this[0]; + if (!ele.cy().styleEnabled()) { + return; + } + if (ele) { + return ele.pstyle(property).units; + } + }, + // get the specified css property as a rendered value (i.e. on-screen value) + // or get the whole rendered style if no property specified (NB doesn't allow setting) + renderedStyle: function renderedStyle(property) { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return this; + } + var ele = this[0]; + if (ele) { + return cy.style().getRenderedStyle(ele, property); + } + }, + // read the calculated css style of the element or override the style (via a bypass) + style: function style(name, value) { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return this; + } + var updateTransitions = false; + var style = cy.style(); + if (plainObject(name)) { + // then extend the bypass + var props = name; + style.applyBypass(this, props, updateTransitions); + this.emitAndNotify('style'); // let the renderer know we've updated style + } else if (string(name)) { + if (value === undefined) { + // then get the property from the style + var ele = this[0]; + if (ele) { + return style.getStylePropertyValue(ele, name); + } else { + // empty collection => can't get any value + return; + } + } else { + // then set the bypass with the property value + style.applyBypass(this, name, value, updateTransitions); + this.emitAndNotify('style'); // let the renderer know we've updated style + } + } else if (name === undefined) { + var _ele = this[0]; + if (_ele) { + return style.getRawStyle(_ele); + } else { + // empty collection => can't get any value + return; + } + } + return this; // chaining + }, + + removeStyle: function removeStyle(names) { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return this; + } + var updateTransitions = false; + var style = cy.style(); + var eles = this; + if (names === undefined) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + style.removeAllBypasses(ele, updateTransitions); + } + } else { + names = names.split(/\s+/); + for (var _i = 0; _i < eles.length; _i++) { + var _ele2 = eles[_i]; + style.removeBypasses(_ele2, names, updateTransitions); + } + } + this.emitAndNotify('style'); // let the renderer know we've updated style + + return this; // chaining + }, + + show: function show() { + this.css('display', 'element'); + return this; // chaining + }, + + hide: function hide() { + this.css('display', 'none'); + return this; // chaining + }, + + effectiveOpacity: function effectiveOpacity() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return 1; + } + var hasCompoundNodes = cy.hasCompoundNodes(); + var ele = this[0]; + if (ele) { + var _p = ele._private; + var parentOpacity = ele.pstyle('opacity').value; + if (!hasCompoundNodes) { + return parentOpacity; + } + var parents = !_p.data.parent ? null : ele.parents(); + if (parents) { + for (var i = 0; i < parents.length; i++) { + var parent = parents[i]; + var opacity = parent.pstyle('opacity').value; + parentOpacity = opacity * parentOpacity; + } + } + return parentOpacity; + } + }, + transparent: function transparent() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return false; + } + var ele = this[0]; + var hasCompoundNodes = ele.cy().hasCompoundNodes(); + if (ele) { + if (!hasCompoundNodes) { + return ele.pstyle('opacity').value === 0; + } else { + return ele.effectiveOpacity() === 0; + } + } + }, + backgrounding: function backgrounding() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return false; + } + var ele = this[0]; + return ele._private.backgrounding ? true : false; + } +}; +function checkCompound(ele, parentOk) { + var _p = ele._private; + var parents = _p.data.parent ? ele.parents() : null; + if (parents) { + for (var i = 0; i < parents.length; i++) { + var parent = parents[i]; + if (!parentOk(parent)) { + return false; + } + } + } + return true; +} +function defineDerivedStateFunction(specs) { + var ok = specs.ok; + var edgeOkViaNode = specs.edgeOkViaNode || specs.ok; + var parentOk = specs.parentOk || specs.ok; + return function () { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return true; + } + var ele = this[0]; + var hasCompoundNodes = cy.hasCompoundNodes(); + if (ele) { + var _p = ele._private; + if (!ok(ele)) { + return false; + } + if (ele.isNode()) { + return !hasCompoundNodes || checkCompound(ele, parentOk); + } else { + var src = _p.source; + var tgt = _p.target; + return edgeOkViaNode(src) && (!hasCompoundNodes || checkCompound(src, edgeOkViaNode)) && (src === tgt || edgeOkViaNode(tgt) && (!hasCompoundNodes || checkCompound(tgt, edgeOkViaNode))); + } + } + }; +} +var eleTakesUpSpace = cacheStyleFunction('eleTakesUpSpace', function (ele) { + return ele.pstyle('display').value === 'element' && ele.width() !== 0 && (ele.isNode() ? ele.height() !== 0 : true); +}); +elesfn$4.takesUpSpace = cachePrototypeStyleFunction('takesUpSpace', defineDerivedStateFunction({ + ok: eleTakesUpSpace +})); +var eleInteractive = cacheStyleFunction('eleInteractive', function (ele) { + return ele.pstyle('events').value === 'yes' && ele.pstyle('visibility').value === 'visible' && eleTakesUpSpace(ele); +}); +var parentInteractive = cacheStyleFunction('parentInteractive', function (parent) { + return parent.pstyle('visibility').value === 'visible' && eleTakesUpSpace(parent); +}); +elesfn$4.interactive = cachePrototypeStyleFunction('interactive', defineDerivedStateFunction({ + ok: eleInteractive, + parentOk: parentInteractive, + edgeOkViaNode: eleTakesUpSpace +})); +elesfn$4.noninteractive = function () { + var ele = this[0]; + if (ele) { + return !ele.interactive(); + } +}; +var eleVisible = cacheStyleFunction('eleVisible', function (ele) { + return ele.pstyle('visibility').value === 'visible' && ele.pstyle('opacity').pfValue !== 0 && eleTakesUpSpace(ele); +}); +var edgeVisibleViaNode = eleTakesUpSpace; +elesfn$4.visible = cachePrototypeStyleFunction('visible', defineDerivedStateFunction({ + ok: eleVisible, + edgeOkViaNode: edgeVisibleViaNode +})); +elesfn$4.hidden = function () { + var ele = this[0]; + if (ele) { + return !ele.visible(); + } +}; +elesfn$4.isBundledBezier = cachePrototypeStyleFunction('isBundledBezier', function () { + if (!this.cy().styleEnabled()) { + return false; + } + return !this.removed() && this.pstyle('curve-style').value === 'bezier' && this.takesUpSpace(); +}); +elesfn$4.bypass = elesfn$4.css = elesfn$4.style; +elesfn$4.renderedCss = elesfn$4.renderedStyle; +elesfn$4.removeBypass = elesfn$4.removeCss = elesfn$4.removeStyle; +elesfn$4.pstyle = elesfn$4.parsedStyle; + +var elesfn$3 = {}; +function defineSwitchFunction(params) { + return function () { + var args = arguments; + var changedEles = []; + + // e.g. cy.nodes().select( data, handler ) + if (args.length === 2) { + var data = args[0]; + var handler = args[1]; + this.on(params.event, data, handler); + } + + // e.g. cy.nodes().select( handler ) + else if (args.length === 1 && fn$6(args[0])) { + var _handler = args[0]; + this.on(params.event, _handler); + } + + // e.g. cy.nodes().select() + // e.g. (private) cy.nodes().select(['tapselect']) + else if (args.length === 0 || args.length === 1 && array(args[0])) { + var addlEvents = args.length === 1 ? args[0] : null; + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var able = !params.ableField || ele._private[params.ableField]; + var changed = ele._private[params.field] != params.value; + if (params.overrideAble) { + var overrideAble = params.overrideAble(ele); + if (overrideAble !== undefined) { + able = overrideAble; + if (!overrideAble) { + return this; + } // to save cycles assume not able for all on override + } + } + + if (able) { + ele._private[params.field] = params.value; + if (changed) { + changedEles.push(ele); + } + } + } + var changedColl = this.spawn(changedEles); + changedColl.updateStyle(); // change of state => possible change of style + changedColl.emit(params.event); + if (addlEvents) { + changedColl.emit(addlEvents); + } + } + return this; + }; +} +function defineSwitchSet(params) { + elesfn$3[params.field] = function () { + var ele = this[0]; + if (ele) { + if (params.overrideField) { + var val = params.overrideField(ele); + if (val !== undefined) { + return val; + } + } + return ele._private[params.field]; + } + }; + elesfn$3[params.on] = defineSwitchFunction({ + event: params.on, + field: params.field, + ableField: params.ableField, + overrideAble: params.overrideAble, + value: true + }); + elesfn$3[params.off] = defineSwitchFunction({ + event: params.off, + field: params.field, + ableField: params.ableField, + overrideAble: params.overrideAble, + value: false + }); +} +defineSwitchSet({ + field: 'locked', + overrideField: function overrideField(ele) { + return ele.cy().autolock() ? true : undefined; + }, + on: 'lock', + off: 'unlock' +}); +defineSwitchSet({ + field: 'grabbable', + overrideField: function overrideField(ele) { + return ele.cy().autoungrabify() || ele.pannable() ? false : undefined; + }, + on: 'grabify', + off: 'ungrabify' +}); +defineSwitchSet({ + field: 'selected', + ableField: 'selectable', + overrideAble: function overrideAble(ele) { + return ele.cy().autounselectify() ? false : undefined; + }, + on: 'select', + off: 'unselect' +}); +defineSwitchSet({ + field: 'selectable', + overrideField: function overrideField(ele) { + return ele.cy().autounselectify() ? false : undefined; + }, + on: 'selectify', + off: 'unselectify' +}); +elesfn$3.deselect = elesfn$3.unselect; +elesfn$3.grabbed = function () { + var ele = this[0]; + if (ele) { + return ele._private.grabbed; + } +}; +defineSwitchSet({ + field: 'active', + on: 'activate', + off: 'unactivate' +}); +defineSwitchSet({ + field: 'pannable', + on: 'panify', + off: 'unpanify' +}); +elesfn$3.inactive = function () { + var ele = this[0]; + if (ele) { + return !ele._private.active; + } +}; + +var elesfn$2 = {}; + +// DAG functions +//////////////// + +var defineDagExtremity = function defineDagExtremity(params) { + return function dagExtremityImpl(selector) { + var eles = this; + var ret = []; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + if (!ele.isNode()) { + continue; + } + var disqualified = false; + var edges = ele.connectedEdges(); + for (var j = 0; j < edges.length; j++) { + var edge = edges[j]; + var src = edge.source(); + var tgt = edge.target(); + if (params.noIncomingEdges && tgt === ele && src !== ele || params.noOutgoingEdges && src === ele && tgt !== ele) { + disqualified = true; + break; + } + } + if (!disqualified) { + ret.push(ele); + } + } + return this.spawn(ret, true).filter(selector); + }; +}; +var defineDagOneHop = function defineDagOneHop(params) { + return function (selector) { + var eles = this; + var oEles = []; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + if (!ele.isNode()) { + continue; + } + var edges = ele.connectedEdges(); + for (var j = 0; j < edges.length; j++) { + var edge = edges[j]; + var src = edge.source(); + var tgt = edge.target(); + if (params.outgoing && src === ele) { + oEles.push(edge); + oEles.push(tgt); + } else if (params.incoming && tgt === ele) { + oEles.push(edge); + oEles.push(src); + } + } + } + return this.spawn(oEles, true).filter(selector); + }; +}; +var defineDagAllHops = function defineDagAllHops(params) { + return function (selector) { + var eles = this; + var sEles = []; + var sElesIds = {}; + for (;;) { + var next = params.outgoing ? eles.outgoers() : eles.incomers(); + if (next.length === 0) { + break; + } // done if none left + + var newNext = false; + for (var i = 0; i < next.length; i++) { + var n = next[i]; + var nid = n.id(); + if (!sElesIds[nid]) { + sElesIds[nid] = true; + sEles.push(n); + newNext = true; + } + } + if (!newNext) { + break; + } // done if touched all outgoers already + + eles = next; + } + return this.spawn(sEles, true).filter(selector); + }; +}; +elesfn$2.clearTraversalCache = function () { + for (var i = 0; i < this.length; i++) { + this[i]._private.traversalCache = null; + } +}; +extend(elesfn$2, { + // get the root nodes in the DAG + roots: defineDagExtremity({ + noIncomingEdges: true + }), + // get the leaf nodes in the DAG + leaves: defineDagExtremity({ + noOutgoingEdges: true + }), + // normally called children in graph theory + // these nodes =edges=> outgoing nodes + outgoers: cache(defineDagOneHop({ + outgoing: true + }), 'outgoers'), + // aka DAG descendants + successors: defineDagAllHops({ + outgoing: true + }), + // normally called parents in graph theory + // these nodes <=edges= incoming nodes + incomers: cache(defineDagOneHop({ + incoming: true + }), 'incomers'), + // aka DAG ancestors + predecessors: defineDagAllHops({ + incoming: true + }) +}); + +// Neighbourhood functions +////////////////////////// + +extend(elesfn$2, { + neighborhood: cache(function (selector) { + var elements = []; + var nodes = this.nodes(); + for (var i = 0; i < nodes.length; i++) { + // for all nodes + var node = nodes[i]; + var connectedEdges = node.connectedEdges(); + + // for each connected edge, add the edge and the other node + for (var j = 0; j < connectedEdges.length; j++) { + var edge = connectedEdges[j]; + var src = edge.source(); + var tgt = edge.target(); + var otherNode = node === src ? tgt : src; + + // need check in case of loop + if (otherNode.length > 0) { + elements.push(otherNode[0]); // add node 1 hop away + } + + // add connected edge + elements.push(edge[0]); + } + } + return this.spawn(elements, true).filter(selector); + }, 'neighborhood'), + closedNeighborhood: function closedNeighborhood(selector) { + return this.neighborhood().add(this).filter(selector); + }, + openNeighborhood: function openNeighborhood(selector) { + return this.neighborhood(selector); + } +}); + +// aliases +elesfn$2.neighbourhood = elesfn$2.neighborhood; +elesfn$2.closedNeighbourhood = elesfn$2.closedNeighborhood; +elesfn$2.openNeighbourhood = elesfn$2.openNeighborhood; + +// Edge functions +///////////////// + +extend(elesfn$2, { + source: cache(function sourceImpl(selector) { + var ele = this[0]; + var src; + if (ele) { + src = ele._private.source || ele.cy().collection(); + } + return src && selector ? src.filter(selector) : src; + }, 'source'), + target: cache(function targetImpl(selector) { + var ele = this[0]; + var tgt; + if (ele) { + tgt = ele._private.target || ele.cy().collection(); + } + return tgt && selector ? tgt.filter(selector) : tgt; + }, 'target'), + sources: defineSourceFunction({ + attr: 'source' + }), + targets: defineSourceFunction({ + attr: 'target' + }) +}); +function defineSourceFunction(params) { + return function sourceImpl(selector) { + var sources = []; + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var src = ele._private[params.attr]; + if (src) { + sources.push(src); + } + } + return this.spawn(sources, true).filter(selector); + }; +} +extend(elesfn$2, { + edgesWith: cache(defineEdgesWithFunction(), 'edgesWith'), + edgesTo: cache(defineEdgesWithFunction({ + thisIsSrc: true + }), 'edgesTo') +}); +function defineEdgesWithFunction(params) { + return function edgesWithImpl(otherNodes) { + var elements = []; + var cy = this._private.cy; + var p = params || {}; + + // get elements if a selector is specified + if (string(otherNodes)) { + otherNodes = cy.$(otherNodes); + } + for (var h = 0; h < otherNodes.length; h++) { + var edges = otherNodes[h]._private.edges; + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var edgeData = edge._private.data; + var thisToOther = this.hasElementWithId(edgeData.source) && otherNodes.hasElementWithId(edgeData.target); + var otherToThis = otherNodes.hasElementWithId(edgeData.source) && this.hasElementWithId(edgeData.target); + var edgeConnectsThisAndOther = thisToOther || otherToThis; + if (!edgeConnectsThisAndOther) { + continue; + } + if (p.thisIsSrc || p.thisIsTgt) { + if (p.thisIsSrc && !thisToOther) { + continue; + } + if (p.thisIsTgt && !otherToThis) { + continue; + } + } + elements.push(edge); + } + } + return this.spawn(elements, true); + }; +} +extend(elesfn$2, { + connectedEdges: cache(function (selector) { + var retEles = []; + var eles = this; + for (var i = 0; i < eles.length; i++) { + var node = eles[i]; + if (!node.isNode()) { + continue; + } + var edges = node._private.edges; + for (var j = 0; j < edges.length; j++) { + var edge = edges[j]; + retEles.push(edge); + } + } + return this.spawn(retEles, true).filter(selector); + }, 'connectedEdges'), + connectedNodes: cache(function (selector) { + var retEles = []; + var eles = this; + for (var i = 0; i < eles.length; i++) { + var edge = eles[i]; + if (!edge.isEdge()) { + continue; + } + retEles.push(edge.source()[0]); + retEles.push(edge.target()[0]); + } + return this.spawn(retEles, true).filter(selector); + }, 'connectedNodes'), + parallelEdges: cache(defineParallelEdgesFunction(), 'parallelEdges'), + codirectedEdges: cache(defineParallelEdgesFunction({ + codirected: true + }), 'codirectedEdges') +}); +function defineParallelEdgesFunction(params) { + var defaults = { + codirected: false + }; + params = extend({}, defaults, params); + return function parallelEdgesImpl(selector) { + // micro-optimised for renderer + var elements = []; + var edges = this.edges(); + var p = params; + + // look at all the edges in the collection + for (var i = 0; i < edges.length; i++) { + var edge1 = edges[i]; + var edge1_p = edge1._private; + var src1 = edge1_p.source; + var srcid1 = src1._private.data.id; + var tgtid1 = edge1_p.data.target; + var srcEdges1 = src1._private.edges; + + // look at edges connected to the src node of this edge + for (var j = 0; j < srcEdges1.length; j++) { + var edge2 = srcEdges1[j]; + var edge2data = edge2._private.data; + var tgtid2 = edge2data.target; + var srcid2 = edge2data.source; + var codirected = tgtid2 === tgtid1 && srcid2 === srcid1; + var oppdirected = srcid1 === tgtid2 && tgtid1 === srcid2; + if (p.codirected && codirected || !p.codirected && (codirected || oppdirected)) { + elements.push(edge2); + } + } + } + return this.spawn(elements, true).filter(selector); + }; +} + +// Misc functions +///////////////// + +extend(elesfn$2, { + components: function components(root) { + var self = this; + var cy = self.cy(); + var visited = cy.collection(); + var unvisited = root == null ? self.nodes() : root.nodes(); + var components = []; + if (root != null && unvisited.empty()) { + // root may contain only edges + unvisited = root.sources(); // doesn't matter which node to use (undirected), so just use the source sides + } + + var visitInComponent = function visitInComponent(node, component) { + visited.merge(node); + unvisited.unmerge(node); + component.merge(node); + }; + if (unvisited.empty()) { + return self.spawn(); + } + var _loop = function _loop() { + // each iteration yields a component + var cmpt = cy.collection(); + components.push(cmpt); + var root = unvisited[0]; + visitInComponent(root, cmpt); + self.bfs({ + directed: false, + roots: root, + visit: function visit(v) { + return visitInComponent(v, cmpt); + } + }); + cmpt.forEach(function (node) { + node.connectedEdges().forEach(function (e) { + // connectedEdges() usually cached + if (self.has(e) && cmpt.has(e.source()) && cmpt.has(e.target())) { + // has() is cheap + cmpt.merge(e); // forEach() only considers nodes -- sets N at call time + } + }); + }); + }; + do { + _loop(); + } while (unvisited.length > 0); + return components; + }, + component: function component() { + var ele = this[0]; + return ele.cy().mutableElements().components(ele)[0]; + } +}); +elesfn$2.componentsOf = elesfn$2.components; + +// represents a set of nodes, edges, or both together +var Collection = function Collection(cy, elements) { + var unique = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var removed = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + if (cy === undefined) { + error('A collection must have a reference to the core'); + return; + } + var map = new Map$1(); + var createdElements = false; + if (!elements) { + elements = []; + } else if (elements.length > 0 && plainObject(elements[0]) && !element(elements[0])) { + createdElements = true; + + // make elements from json and restore all at once later + var eles = []; + var elesIds = new Set$1(); + for (var i = 0, l = elements.length; i < l; i++) { + var json = elements[i]; + if (json.data == null) { + json.data = {}; + } + var _data = json.data; + + // make sure newly created elements have valid ids + if (_data.id == null) { + _data.id = uuid(); + } else if (cy.hasElementWithId(_data.id) || elesIds.has(_data.id)) { + continue; // can't create element if prior id already exists + } + + var ele = new Element(cy, json, false); + eles.push(ele); + elesIds.add(_data.id); + } + elements = eles; + } + this.length = 0; + for (var _i = 0, _l = elements.length; _i < _l; _i++) { + var element$1 = elements[_i][0]; // [0] in case elements is an array of collections, rather than array of elements + if (element$1 == null) { + continue; + } + var id = element$1._private.data.id; + if (!unique || !map.has(id)) { + if (unique) { + map.set(id, { + index: this.length, + ele: element$1 + }); + } + this[this.length] = element$1; + this.length++; + } + } + this._private = { + eles: this, + cy: cy, + get map() { + if (this.lazyMap == null) { + this.rebuildMap(); + } + return this.lazyMap; + }, + set map(m) { + this.lazyMap = m; + }, + rebuildMap: function rebuildMap() { + var m = this.lazyMap = new Map$1(); + var eles = this.eles; + for (var _i2 = 0; _i2 < eles.length; _i2++) { + var _ele = eles[_i2]; + m.set(_ele.id(), { + index: _i2, + ele: _ele + }); + } + } + }; + if (unique) { + this._private.map = map; + } + + // restore the elements if we created them from json + if (createdElements && !removed) { + this.restore(); + } +}; + +// Functions +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// keep the prototypes in sync (an element has the same functions as a collection) +// and use elefn and elesfn as shorthands to the prototypes +var elesfn$1 = Element.prototype = Collection.prototype = Object.create(Array.prototype); +elesfn$1.instanceString = function () { + return 'collection'; +}; +elesfn$1.spawn = function (eles, unique) { + return new Collection(this.cy(), eles, unique); +}; +elesfn$1.spawnSelf = function () { + return this.spawn(this); +}; +elesfn$1.cy = function () { + return this._private.cy; +}; +elesfn$1.renderer = function () { + return this._private.cy.renderer(); +}; +elesfn$1.element = function () { + return this[0]; +}; +elesfn$1.collection = function () { + if (collection(this)) { + return this; + } else { + // an element + return new Collection(this._private.cy, [this]); + } +}; +elesfn$1.unique = function () { + return new Collection(this._private.cy, this, true); +}; +elesfn$1.hasElementWithId = function (id) { + id = '' + id; // id must be string + + return this._private.map.has(id); +}; +elesfn$1.getElementById = function (id) { + id = '' + id; // id must be string + + var cy = this._private.cy; + var entry = this._private.map.get(id); + return entry ? entry.ele : new Collection(cy); // get ele or empty collection +}; + +elesfn$1.$id = elesfn$1.getElementById; +elesfn$1.poolIndex = function () { + var cy = this._private.cy; + var eles = cy._private.elements; + var id = this[0]._private.data.id; + return eles._private.map.get(id).index; +}; +elesfn$1.indexOf = function (ele) { + var id = ele[0]._private.data.id; + return this._private.map.get(id).index; +}; +elesfn$1.indexOfId = function (id) { + id = '' + id; // id must be string + + return this._private.map.get(id).index; +}; +elesfn$1.json = function (obj) { + var ele = this.element(); + var cy = this.cy(); + if (ele == null && obj) { + return this; + } // can't set to no eles + + if (ele == null) { + return undefined; + } // can't get from no eles + + var p = ele._private; + if (plainObject(obj)) { + // set + + cy.startBatch(); + if (obj.data) { + ele.data(obj.data); + var _data2 = p.data; + if (ele.isEdge()) { + // source and target are immutable via data() + var move = false; + var spec = {}; + var src = obj.data.source; + var tgt = obj.data.target; + if (src != null && src != _data2.source) { + spec.source = '' + src; // id must be string + move = true; + } + if (tgt != null && tgt != _data2.target) { + spec.target = '' + tgt; // id must be string + move = true; + } + if (move) { + ele = ele.move(spec); + } + } else { + // parent is immutable via data() + var newParentValSpecd = ('parent' in obj.data); + var parent = obj.data.parent; + if (newParentValSpecd && (parent != null || _data2.parent != null) && parent != _data2.parent) { + if (parent === undefined) { + // can't set undefined imperatively, so use null + parent = null; + } + if (parent != null) { + parent = '' + parent; // id must be string + } + + ele = ele.move({ + parent: parent + }); + } + } + } + if (obj.position) { + ele.position(obj.position); + } + + // ignore group -- immutable + + var checkSwitch = function checkSwitch(k, trueFnName, falseFnName) { + var obj_k = obj[k]; + if (obj_k != null && obj_k !== p[k]) { + if (obj_k) { + ele[trueFnName](); + } else { + ele[falseFnName](); + } + } + }; + checkSwitch('removed', 'remove', 'restore'); + checkSwitch('selected', 'select', 'unselect'); + checkSwitch('selectable', 'selectify', 'unselectify'); + checkSwitch('locked', 'lock', 'unlock'); + checkSwitch('grabbable', 'grabify', 'ungrabify'); + checkSwitch('pannable', 'panify', 'unpanify'); + if (obj.classes != null) { + ele.classes(obj.classes); + } + cy.endBatch(); + return this; + } else if (obj === undefined) { + // get + + var json = { + data: copy(p.data), + position: copy(p.position), + group: p.group, + removed: p.removed, + selected: p.selected, + selectable: p.selectable, + locked: p.locked, + grabbable: p.grabbable, + pannable: p.pannable, + classes: null + }; + json.classes = ''; + var i = 0; + p.classes.forEach(function (cls) { + return json.classes += i++ === 0 ? cls : ' ' + cls; + }); + return json; + } +}; +elesfn$1.jsons = function () { + var jsons = []; + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var json = ele.json(); + jsons.push(json); + } + return jsons; +}; +elesfn$1.clone = function () { + var cy = this.cy(); + var elesArr = []; + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var json = ele.json(); + var clone = new Element(cy, json, false); // NB no restore + + elesArr.push(clone); + } + return new Collection(cy, elesArr); +}; +elesfn$1.copy = elesfn$1.clone; +elesfn$1.restore = function () { + var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var addToPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var self = this; + var cy = self.cy(); + var cy_p = cy._private; + + // create arrays of nodes and edges, since we need to + // restore the nodes first + var nodes = []; + var edges = []; + var elements; + for (var _i3 = 0, l = self.length; _i3 < l; _i3++) { + var ele = self[_i3]; + if (addToPool && !ele.removed()) { + // don't need to handle this ele + continue; + } + + // keep nodes first in the array and edges after + if (ele.isNode()) { + // put to front of array if node + nodes.push(ele); + } else { + // put to end of array if edge + edges.push(ele); + } + } + elements = nodes.concat(edges); + var i; + var removeFromElements = function removeFromElements() { + elements.splice(i, 1); + i--; + }; + + // now, restore each element + for (i = 0; i < elements.length; i++) { + var _ele2 = elements[i]; + var _private = _ele2._private; + var _data3 = _private.data; + + // the traversal cache should start fresh when ele is added + _ele2.clearTraversalCache(); + + // set id and validate + if (!addToPool && !_private.removed) ; else if (_data3.id === undefined) { + _data3.id = uuid(); + } else if (number$1(_data3.id)) { + _data3.id = '' + _data3.id; // now it's a string + } else if (emptyString(_data3.id) || !string(_data3.id)) { + error('Can not create element with invalid string ID `' + _data3.id + '`'); + + // can't create element if it has empty string as id or non-string id + removeFromElements(); + continue; + } else if (cy.hasElementWithId(_data3.id)) { + error('Can not create second element with ID `' + _data3.id + '`'); + + // can't create element if one already has that id + removeFromElements(); + continue; + } + var id = _data3.id; // id is finalised, now let's keep a ref + + if (_ele2.isNode()) { + // extra checks for nodes + var pos = _private.position; + + // make sure the nodes have a defined position + + if (pos.x == null) { + pos.x = 0; + } + if (pos.y == null) { + pos.y = 0; + } + } + if (_ele2.isEdge()) { + // extra checks for edges + + var edge = _ele2; + var fields = ['source', 'target']; + var fieldsLength = fields.length; + var badSourceOrTarget = false; + for (var j = 0; j < fieldsLength; j++) { + var field = fields[j]; + var val = _data3[field]; + if (number$1(val)) { + val = _data3[field] = '' + _data3[field]; // now string + } + + if (val == null || val === '') { + // can't create if source or target is not defined properly + error('Can not create edge `' + id + '` with unspecified ' + field); + badSourceOrTarget = true; + } else if (!cy.hasElementWithId(val)) { + // can't create edge if one of its nodes doesn't exist + error('Can not create edge `' + id + '` with nonexistant ' + field + ' `' + val + '`'); + badSourceOrTarget = true; + } + } + if (badSourceOrTarget) { + removeFromElements(); + continue; + } // can't create this + + var src = cy.getElementById(_data3.source); + var tgt = cy.getElementById(_data3.target); + + // only one edge in node if loop + if (src.same(tgt)) { + src._private.edges.push(edge); + } else { + src._private.edges.push(edge); + tgt._private.edges.push(edge); + } + edge._private.source = src; + edge._private.target = tgt; + } // if is edge + + // create mock ids / indexes maps for element so it can be used like collections + _private.map = new Map$1(); + _private.map.set(id, { + ele: _ele2, + index: 0 + }); + _private.removed = false; + if (addToPool) { + cy.addToPool(_ele2); + } + } // for each element + + // do compound node sanity checks + for (var _i4 = 0; _i4 < nodes.length; _i4++) { + // each node + var node = nodes[_i4]; + var _data4 = node._private.data; + if (number$1(_data4.parent)) { + // then automake string + _data4.parent = '' + _data4.parent; + } + var parentId = _data4.parent; + var specifiedParent = parentId != null; + if (specifiedParent || node._private.parent) { + var parent = node._private.parent ? cy.collection().merge(node._private.parent) : cy.getElementById(parentId); + if (parent.empty()) { + // non-existant parent; just remove it + _data4.parent = undefined; + } else if (parent[0].removed()) { + warn('Node added with missing parent, reference to parent removed'); + _data4.parent = undefined; + node._private.parent = null; + } else { + var selfAsParent = false; + var ancestor = parent; + while (!ancestor.empty()) { + if (node.same(ancestor)) { + // mark self as parent and remove from data + selfAsParent = true; + _data4.parent = undefined; // remove parent reference + + // exit or we loop forever + break; + } + ancestor = ancestor.parent(); + } + if (!selfAsParent) { + // connect with children + parent[0]._private.children.push(node); + node._private.parent = parent[0]; + + // let the core know we have a compound graph + cy_p.hasCompoundNodes = true; + } + } // else + } // if specified parent + } // for each node + + if (elements.length > 0) { + var restored = elements.length === self.length ? self : new Collection(cy, elements); + for (var _i5 = 0; _i5 < restored.length; _i5++) { + var _ele3 = restored[_i5]; + if (_ele3.isNode()) { + continue; + } + + // adding an edge invalidates the traversal caches for the parallel edges + _ele3.parallelEdges().clearTraversalCache(); + + // adding an edge invalidates the traversal cache for the connected nodes + _ele3.source().clearTraversalCache(); + _ele3.target().clearTraversalCache(); + } + var toUpdateStyle; + if (cy_p.hasCompoundNodes) { + toUpdateStyle = cy.collection().merge(restored).merge(restored.connectedNodes()).merge(restored.parent()); + } else { + toUpdateStyle = restored; + } + toUpdateStyle.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(notifyRenderer); + if (notifyRenderer) { + restored.emitAndNotify('add'); + } else if (addToPool) { + restored.emit('add'); + } + } + return self; // chainability +}; + +elesfn$1.removed = function () { + var ele = this[0]; + return ele && ele._private.removed; +}; +elesfn$1.inside = function () { + var ele = this[0]; + return ele && !ele._private.removed; +}; +elesfn$1.remove = function () { + var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var removeFromPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var self = this; + var elesToRemove = []; + var elesToRemoveIds = {}; + var cy = self._private.cy; + + // add connected edges + function addConnectedEdges(node) { + var edges = node._private.edges; + for (var i = 0; i < edges.length; i++) { + add(edges[i]); + } + } + + // add descendant nodes + function addChildren(node) { + var children = node._private.children; + for (var i = 0; i < children.length; i++) { + add(children[i]); + } + } + function add(ele) { + var alreadyAdded = elesToRemoveIds[ele.id()]; + if (removeFromPool && ele.removed() || alreadyAdded) { + return; + } else { + elesToRemoveIds[ele.id()] = true; + } + if (ele.isNode()) { + elesToRemove.push(ele); // nodes are removed last + + addConnectedEdges(ele); + addChildren(ele); + } else { + elesToRemove.unshift(ele); // edges are removed first + } + } + + // make the list of elements to remove + // (may be removing more than specified due to connected edges etc) + + for (var i = 0, l = self.length; i < l; i++) { + var ele = self[i]; + add(ele); + } + function removeEdgeRef(node, edge) { + var connectedEdges = node._private.edges; + removeFromArray(connectedEdges, edge); + + // removing an edges invalidates the traversal cache for its nodes + node.clearTraversalCache(); + } + function removeParallelRef(pllEdge) { + // removing an edge invalidates the traversal caches for the parallel edges + pllEdge.clearTraversalCache(); + } + var alteredParents = []; + alteredParents.ids = {}; + function removeChildRef(parent, ele) { + ele = ele[0]; + parent = parent[0]; + var children = parent._private.children; + var pid = parent.id(); + removeFromArray(children, ele); // remove parent => child ref + + ele._private.parent = null; // remove child => parent ref + + if (!alteredParents.ids[pid]) { + alteredParents.ids[pid] = true; + alteredParents.push(parent); + } + } + self.dirtyCompoundBoundsCache(); + if (removeFromPool) { + cy.removeFromPool(elesToRemove); // remove from core pool + } + + for (var _i6 = 0; _i6 < elesToRemove.length; _i6++) { + var _ele4 = elesToRemove[_i6]; + if (_ele4.isEdge()) { + // remove references to this edge in its connected nodes + var src = _ele4.source()[0]; + var tgt = _ele4.target()[0]; + removeEdgeRef(src, _ele4); + removeEdgeRef(tgt, _ele4); + var pllEdges = _ele4.parallelEdges(); + for (var j = 0; j < pllEdges.length; j++) { + var pllEdge = pllEdges[j]; + removeParallelRef(pllEdge); + if (pllEdge.isBundledBezier()) { + pllEdge.dirtyBoundingBoxCache(); + } + } + } else { + // remove reference to parent + var parent = _ele4.parent(); + if (parent.length !== 0) { + removeChildRef(parent, _ele4); + } + } + if (removeFromPool) { + // mark as removed + _ele4._private.removed = true; + } + } + + // check to see if we have a compound graph or not + var elesStillInside = cy._private.elements; + cy._private.hasCompoundNodes = false; + for (var _i7 = 0; _i7 < elesStillInside.length; _i7++) { + var _ele5 = elesStillInside[_i7]; + if (_ele5.isParent()) { + cy._private.hasCompoundNodes = true; + break; + } + } + var removedElements = new Collection(this.cy(), elesToRemove); + if (removedElements.size() > 0) { + // must manually notify since trigger won't do this automatically once removed + + if (notifyRenderer) { + removedElements.emitAndNotify('remove'); + } else if (removeFromPool) { + removedElements.emit('remove'); + } + } + + // the parents who were modified by the removal need their style updated + for (var _i8 = 0; _i8 < alteredParents.length; _i8++) { + var _ele6 = alteredParents[_i8]; + if (!removeFromPool || !_ele6.removed()) { + _ele6.updateStyle(); + } + } + return removedElements; +}; +elesfn$1.move = function (struct) { + var cy = this._private.cy; + var eles = this; + + // just clean up refs, caches, etc. in the same way as when removing and then restoring + // (our calls to remove/restore do not remove from the graph or make events) + var notifyRenderer = false; + var modifyPool = false; + var toString = function toString(id) { + return id == null ? id : '' + id; + }; // id must be string + + if (struct.source !== undefined || struct.target !== undefined) { + var srcId = toString(struct.source); + var tgtId = toString(struct.target); + var srcExists = srcId != null && cy.hasElementWithId(srcId); + var tgtExists = tgtId != null && cy.hasElementWithId(tgtId); + if (srcExists || tgtExists) { + cy.batch(function () { + // avoid duplicate style updates + eles.remove(notifyRenderer, modifyPool); // clean up refs etc. + eles.emitAndNotify('moveout'); + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _data5 = ele._private.data; + if (ele.isEdge()) { + if (srcExists) { + _data5.source = srcId; + } + if (tgtExists) { + _data5.target = tgtId; + } + } + } + eles.restore(notifyRenderer, modifyPool); // make new refs, style, etc. + }); + + eles.emitAndNotify('move'); + } + } else if (struct.parent !== undefined) { + // move node to new parent + var parentId = toString(struct.parent); + var parentExists = parentId === null || cy.hasElementWithId(parentId); + if (parentExists) { + var pidToAssign = parentId === null ? undefined : parentId; + cy.batch(function () { + // avoid duplicate style updates + var updated = eles.remove(notifyRenderer, modifyPool); // clean up refs etc. + updated.emitAndNotify('moveout'); + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _data6 = ele._private.data; + if (ele.isNode()) { + _data6.parent = pidToAssign; + } + } + updated.restore(notifyRenderer, modifyPool); // make new refs, style, etc. + }); + + eles.emitAndNotify('move'); + } + } + return this; +}; +[elesfn$j, elesfn$i, elesfn$h, elesfn$g, elesfn$f, data, elesfn$d, dimensions, elesfn$9, elesfn$8, elesfn$7, elesfn$6, elesfn$5, elesfn$4, elesfn$3, elesfn$2].forEach(function (props) { + extend(elesfn$1, props); +}); + +var corefn$9 = { + add: function add(opts) { + var elements; + var cy = this; + + // add the elements + if (elementOrCollection(opts)) { + var eles = opts; + if (eles._private.cy === cy) { + // same instance => just restore + elements = eles.restore(); + } else { + // otherwise, copy from json + var jsons = []; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + jsons.push(ele.json()); + } + elements = new Collection(cy, jsons); + } + } + + // specify an array of options + else if (array(opts)) { + var _jsons = opts; + elements = new Collection(cy, _jsons); + } + + // specify via opts.nodes and opts.edges + else if (plainObject(opts) && (array(opts.nodes) || array(opts.edges))) { + var elesByGroup = opts; + var _jsons2 = []; + var grs = ['nodes', 'edges']; + for (var _i = 0, il = grs.length; _i < il; _i++) { + var group = grs[_i]; + var elesArray = elesByGroup[group]; + if (array(elesArray)) { + for (var j = 0, jl = elesArray.length; j < jl; j++) { + var json = extend({ + group: group + }, elesArray[j]); + _jsons2.push(json); + } + } + } + elements = new Collection(cy, _jsons2); + } + + // specify options for one element + else { + var _json = opts; + elements = new Element(cy, _json).collection(); + } + return elements; + }, + remove: function remove(collection) { + if (elementOrCollection(collection)) ; else if (string(collection)) { + var selector = collection; + collection = this.$(selector); + } + return collection.remove(); + } +}; + +/* global Float32Array */ + +/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ +function generateCubicBezier(mX1, mY1, mX2, mY2) { + var NEWTON_ITERATIONS = 4, + NEWTON_MIN_SLOPE = 0.001, + SUBDIVISION_PRECISION = 0.0000001, + SUBDIVISION_MAX_ITERATIONS = 10, + kSplineTableSize = 11, + kSampleStepSize = 1.0 / (kSplineTableSize - 1.0), + float32ArraySupported = typeof Float32Array !== 'undefined'; + + /* Must contain four arguments. */ + if (arguments.length !== 4) { + return false; + } + + /* Arguments must be numbers. */ + for (var i = 0; i < 4; ++i) { + if (typeof arguments[i] !== "number" || isNaN(arguments[i]) || !isFinite(arguments[i])) { + return false; + } + } + + /* X values must be in the [0, 1] range. */ + mX1 = Math.min(mX1, 1); + mX2 = Math.min(mX2, 1); + mX1 = Math.max(mX1, 0); + mX2 = Math.max(mX2, 0); + var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); + function A(aA1, aA2) { + return 1.0 - 3.0 * aA2 + 3.0 * aA1; + } + function B(aA1, aA2) { + return 3.0 * aA2 - 6.0 * aA1; + } + function C(aA1) { + return 3.0 * aA1; + } + function calcBezier(aT, aA1, aA2) { + return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; + } + function getSlope(aT, aA1, aA2) { + return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); + } + function newtonRaphsonIterate(aX, aGuessT) { + for (var _i = 0; _i < NEWTON_ITERATIONS; ++_i) { + var currentSlope = getSlope(aGuessT, mX1, mX2); + if (currentSlope === 0.0) { + return aGuessT; + } + var currentX = calcBezier(aGuessT, mX1, mX2) - aX; + aGuessT -= currentX / currentSlope; + } + return aGuessT; + } + function calcSampleValues() { + for (var _i2 = 0; _i2 < kSplineTableSize; ++_i2) { + mSampleValues[_i2] = calcBezier(_i2 * kSampleStepSize, mX1, mX2); + } + } + function binarySubdivide(aX, aA, aB) { + var currentX, + currentT, + i = 0; + do { + currentT = aA + (aB - aA) / 2.0; + currentX = calcBezier(currentT, mX1, mX2) - aX; + if (currentX > 0.0) { + aB = currentT; + } else { + aA = currentT; + } + } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); + return currentT; + } + function getTForX(aX) { + var intervalStart = 0.0, + currentSample = 1, + lastSample = kSplineTableSize - 1; + for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { + intervalStart += kSampleStepSize; + } + --currentSample; + var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]), + guessForT = intervalStart + dist * kSampleStepSize, + initialSlope = getSlope(guessForT, mX1, mX2); + if (initialSlope >= NEWTON_MIN_SLOPE) { + return newtonRaphsonIterate(aX, guessForT); + } else if (initialSlope === 0.0) { + return guessForT; + } else { + return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize); + } + } + var _precomputed = false; + function precompute() { + _precomputed = true; + if (mX1 !== mY1 || mX2 !== mY2) { + calcSampleValues(); + } + } + var f = function f(aX) { + if (!_precomputed) { + precompute(); + } + if (mX1 === mY1 && mX2 === mY2) { + return aX; + } + if (aX === 0) { + return 0; + } + if (aX === 1) { + return 1; + } + return calcBezier(getTForX(aX), mY1, mY2); + }; + f.getControlPoints = function () { + return [{ + x: mX1, + y: mY1 + }, { + x: mX2, + y: mY2 + }]; + }; + var str = "generateBezier(" + [mX1, mY1, mX2, mY2] + ")"; + f.toString = function () { + return str; + }; + return f; +} + +/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ +/* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass + then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */ +var generateSpringRK4 = function () { + function springAccelerationForState(state) { + return -state.tension * state.x - state.friction * state.v; + } + function springEvaluateStateWithDerivative(initialState, dt, derivative) { + var state = { + x: initialState.x + derivative.dx * dt, + v: initialState.v + derivative.dv * dt, + tension: initialState.tension, + friction: initialState.friction + }; + return { + dx: state.v, + dv: springAccelerationForState(state) + }; + } + function springIntegrateState(state, dt) { + var a = { + dx: state.v, + dv: springAccelerationForState(state) + }, + b = springEvaluateStateWithDerivative(state, dt * 0.5, a), + c = springEvaluateStateWithDerivative(state, dt * 0.5, b), + d = springEvaluateStateWithDerivative(state, dt, c), + dxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx), + dvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv); + state.x = state.x + dxdt * dt; + state.v = state.v + dvdt * dt; + return state; + } + return function springRK4Factory(tension, friction, duration) { + var initState = { + x: -1, + v: 0, + tension: null, + friction: null + }, + path = [0], + time_lapsed = 0, + tolerance = 1 / 10000, + DT = 16 / 1000, + have_duration, + dt, + last_state; + tension = parseFloat(tension) || 500; + friction = parseFloat(friction) || 20; + duration = duration || null; + initState.tension = tension; + initState.friction = friction; + have_duration = duration !== null; + + /* Calculate the actual time it takes for this animation to complete with the provided conditions. */ + if (have_duration) { + /* Run the simulation without a duration. */ + time_lapsed = springRK4Factory(tension, friction); + /* Compute the adjusted time delta. */ + dt = time_lapsed / duration * DT; + } else { + dt = DT; + } + for (;;) { + /* Next/step function .*/ + last_state = springIntegrateState(last_state || initState, dt); + /* Store the position. */ + path.push(1 + last_state.x); + time_lapsed += 16; + /* If the change threshold is reached, break. */ + if (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) { + break; + } + } + + /* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the + computed path and returns a snapshot of the position according to a given percentComplete. */ + return !have_duration ? time_lapsed : function (percentComplete) { + return path[percentComplete * (path.length - 1) | 0]; + }; + }; +}(); + +var cubicBezier = function cubicBezier(t1, p1, t2, p2) { + var bezier = generateCubicBezier(t1, p1, t2, p2); + return function (start, end, percent) { + return start + (end - start) * bezier(percent); + }; +}; +var easings = { + 'linear': function linear(start, end, percent) { + return start + (end - start) * percent; + }, + // default easings + 'ease': cubicBezier(0.25, 0.1, 0.25, 1), + 'ease-in': cubicBezier(0.42, 0, 1, 1), + 'ease-out': cubicBezier(0, 0, 0.58, 1), + 'ease-in-out': cubicBezier(0.42, 0, 0.58, 1), + // sine + 'ease-in-sine': cubicBezier(0.47, 0, 0.745, 0.715), + 'ease-out-sine': cubicBezier(0.39, 0.575, 0.565, 1), + 'ease-in-out-sine': cubicBezier(0.445, 0.05, 0.55, 0.95), + // quad + 'ease-in-quad': cubicBezier(0.55, 0.085, 0.68, 0.53), + 'ease-out-quad': cubicBezier(0.25, 0.46, 0.45, 0.94), + 'ease-in-out-quad': cubicBezier(0.455, 0.03, 0.515, 0.955), + // cubic + 'ease-in-cubic': cubicBezier(0.55, 0.055, 0.675, 0.19), + 'ease-out-cubic': cubicBezier(0.215, 0.61, 0.355, 1), + 'ease-in-out-cubic': cubicBezier(0.645, 0.045, 0.355, 1), + // quart + 'ease-in-quart': cubicBezier(0.895, 0.03, 0.685, 0.22), + 'ease-out-quart': cubicBezier(0.165, 0.84, 0.44, 1), + 'ease-in-out-quart': cubicBezier(0.77, 0, 0.175, 1), + // quint + 'ease-in-quint': cubicBezier(0.755, 0.05, 0.855, 0.06), + 'ease-out-quint': cubicBezier(0.23, 1, 0.32, 1), + 'ease-in-out-quint': cubicBezier(0.86, 0, 0.07, 1), + // expo + 'ease-in-expo': cubicBezier(0.95, 0.05, 0.795, 0.035), + 'ease-out-expo': cubicBezier(0.19, 1, 0.22, 1), + 'ease-in-out-expo': cubicBezier(1, 0, 0, 1), + // circ + 'ease-in-circ': cubicBezier(0.6, 0.04, 0.98, 0.335), + 'ease-out-circ': cubicBezier(0.075, 0.82, 0.165, 1), + 'ease-in-out-circ': cubicBezier(0.785, 0.135, 0.15, 0.86), + // user param easings... + + 'spring': function spring(tension, friction, duration) { + if (duration === 0) { + // can't get a spring w/ duration 0 + return easings.linear; // duration 0 => jump to end so impl doesn't matter + } + + var spring = generateSpringRK4(tension, friction, duration); + return function (start, end, percent) { + return start + (end - start) * spring(percent); + }; + }, + 'cubic-bezier': cubicBezier +}; + +function getEasedValue(type, start, end, percent, easingFn) { + if (percent === 1) { + return end; + } + if (start === end) { + return end; + } + var val = easingFn(start, end, percent); + if (type == null) { + return val; + } + if (type.roundValue || type.color) { + val = Math.round(val); + } + if (type.min !== undefined) { + val = Math.max(val, type.min); + } + if (type.max !== undefined) { + val = Math.min(val, type.max); + } + return val; +} +function getValue(prop, spec) { + if (prop.pfValue != null || prop.value != null) { + if (prop.pfValue != null && (spec == null || spec.type.units !== '%')) { + return prop.pfValue; + } else { + return prop.value; + } + } else { + return prop; + } +} +function ease(startProp, endProp, percent, easingFn, propSpec) { + var type = propSpec != null ? propSpec.type : null; + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + var start = getValue(startProp, propSpec); + var end = getValue(endProp, propSpec); + if (number$1(start) && number$1(end)) { + return getEasedValue(type, start, end, percent, easingFn); + } else if (array(start) && array(end)) { + var easedArr = []; + for (var i = 0; i < end.length; i++) { + var si = start[i]; + var ei = end[i]; + if (si != null && ei != null) { + var val = getEasedValue(type, si, ei, percent, easingFn); + easedArr.push(val); + } else { + easedArr.push(ei); + } + } + return easedArr; + } + return undefined; +} + +function step$1(self, ani, now, isCore) { + var isEles = !isCore; + var _p = self._private; + var ani_p = ani._private; + var pEasing = ani_p.easing; + var startTime = ani_p.startTime; + var cy = isCore ? self : self.cy(); + var style = cy.style(); + if (!ani_p.easingImpl) { + if (pEasing == null) { + // use default + ani_p.easingImpl = easings['linear']; + } else { + // then define w/ name + var easingVals; + if (string(pEasing)) { + var easingProp = style.parse('transition-timing-function', pEasing); + easingVals = easingProp.value; + } else { + // then assume preparsed array + easingVals = pEasing; + } + var name, args; + if (string(easingVals)) { + name = easingVals; + args = []; + } else { + name = easingVals[1]; + args = easingVals.slice(2).map(function (n) { + return +n; + }); + } + if (args.length > 0) { + // create with args + if (name === 'spring') { + args.push(ani_p.duration); // need duration to generate spring + } + + ani_p.easingImpl = easings[name].apply(null, args); + } else { + // static impl by name + ani_p.easingImpl = easings[name]; + } + } + } + var easing = ani_p.easingImpl; + var percent; + if (ani_p.duration === 0) { + percent = 1; + } else { + percent = (now - startTime) / ani_p.duration; + } + if (ani_p.applying) { + percent = ani_p.progress; + } + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + if (ani_p.delay == null) { + // then update + + var startPos = ani_p.startPosition; + var endPos = ani_p.position; + if (endPos && isEles && !self.locked()) { + var newPos = {}; + if (valid(startPos.x, endPos.x)) { + newPos.x = ease(startPos.x, endPos.x, percent, easing); + } + if (valid(startPos.y, endPos.y)) { + newPos.y = ease(startPos.y, endPos.y, percent, easing); + } + self.position(newPos); + } + var startPan = ani_p.startPan; + var endPan = ani_p.pan; + var pan = _p.pan; + var animatingPan = endPan != null && isCore; + if (animatingPan) { + if (valid(startPan.x, endPan.x)) { + pan.x = ease(startPan.x, endPan.x, percent, easing); + } + if (valid(startPan.y, endPan.y)) { + pan.y = ease(startPan.y, endPan.y, percent, easing); + } + self.emit('pan'); + } + var startZoom = ani_p.startZoom; + var endZoom = ani_p.zoom; + var animatingZoom = endZoom != null && isCore; + if (animatingZoom) { + if (valid(startZoom, endZoom)) { + _p.zoom = bound(_p.minZoom, ease(startZoom, endZoom, percent, easing), _p.maxZoom); + } + self.emit('zoom'); + } + if (animatingPan || animatingZoom) { + self.emit('viewport'); + } + var props = ani_p.style; + if (props && props.length > 0 && isEles) { + for (var i = 0; i < props.length; i++) { + var prop = props[i]; + var _name = prop.name; + var end = prop; + var start = ani_p.startStyle[_name]; + var propSpec = style.properties[start.name]; + var easedVal = ease(start, end, percent, easing, propSpec); + style.overrideBypass(self, _name, easedVal); + } // for props + + self.emit('style'); + } // if + } + + ani_p.progress = percent; + return percent; +} +function valid(start, end) { + if (start == null || end == null) { + return false; + } + if (number$1(start) && number$1(end)) { + return true; + } else if (start && end) { + return true; + } + return false; +} + +function startAnimation(self, ani, now, isCore) { + var ani_p = ani._private; + ani_p.started = true; + ani_p.startTime = now - ani_p.progress * ani_p.duration; +} + +function stepAll(now, cy) { + var eles = cy._private.aniEles; + var doneEles = []; + function stepOne(ele, isCore) { + var _p = ele._private; + var current = _p.animation.current; + var queue = _p.animation.queue; + var ranAnis = false; + + // if nothing currently animating, get something from the queue + if (current.length === 0) { + var next = queue.shift(); + if (next) { + current.push(next); + } + } + var callbacks = function callbacks(_callbacks) { + for (var j = _callbacks.length - 1; j >= 0; j--) { + var cb = _callbacks[j]; + cb(); + } + _callbacks.splice(0, _callbacks.length); + }; + + // step and remove if done + for (var i = current.length - 1; i >= 0; i--) { + var ani = current[i]; + var ani_p = ani._private; + if (ani_p.stopped) { + current.splice(i, 1); + ani_p.hooked = false; + ani_p.playing = false; + ani_p.started = false; + callbacks(ani_p.frames); + continue; + } + if (!ani_p.playing && !ani_p.applying) { + continue; + } + + // an apply() while playing shouldn't do anything + if (ani_p.playing && ani_p.applying) { + ani_p.applying = false; + } + if (!ani_p.started) { + startAnimation(ele, ani, now); + } + step$1(ele, ani, now, isCore); + if (ani_p.applying) { + ani_p.applying = false; + } + callbacks(ani_p.frames); + if (ani_p.step != null) { + ani_p.step(now); + } + if (ani.completed()) { + current.splice(i, 1); + ani_p.hooked = false; + ani_p.playing = false; + ani_p.started = false; + callbacks(ani_p.completes); + } + ranAnis = true; + } + if (!isCore && current.length === 0 && queue.length === 0) { + doneEles.push(ele); + } + return ranAnis; + } // stepElement + + // handle all eles + var ranEleAni = false; + for (var e = 0; e < eles.length; e++) { + var ele = eles[e]; + var handledThisEle = stepOne(ele); + ranEleAni = ranEleAni || handledThisEle; + } // each element + + var ranCoreAni = stepOne(cy, true); + + // notify renderer + if (ranEleAni || ranCoreAni) { + if (eles.length > 0) { + cy.notify('draw', eles); + } else { + cy.notify('draw'); + } + } + + // remove elements from list of currently animating if its queues are empty + eles.unmerge(doneEles); + cy.emit('step'); +} // stepAll + +var corefn$8 = { + // pull in animation functions + animate: define.animate(), + animation: define.animation(), + animated: define.animated(), + clearQueue: define.clearQueue(), + delay: define.delay(), + delayAnimation: define.delayAnimation(), + stop: define.stop(), + addToAnimationPool: function addToAnimationPool(eles) { + var cy = this; + if (!cy.styleEnabled()) { + return; + } // save cycles when no style used + + cy._private.aniEles.merge(eles); + }, + stopAnimationLoop: function stopAnimationLoop() { + this._private.animationsRunning = false; + }, + startAnimationLoop: function startAnimationLoop() { + var cy = this; + cy._private.animationsRunning = true; + if (!cy.styleEnabled()) { + return; + } // save cycles when no style used + + // NB the animation loop will exec in headless environments if style enabled + // and explicit cy.destroy() is necessary to stop the loop + + function headlessStep() { + if (!cy._private.animationsRunning) { + return; + } + requestAnimationFrame(function animationStep(now) { + stepAll(now, cy); + headlessStep(); + }); + } + var renderer = cy.renderer(); + if (renderer && renderer.beforeRender) { + // let the renderer schedule animations + renderer.beforeRender(function rendererAnimationStep(willDraw, now) { + stepAll(now, cy); + }, renderer.beforeRenderPriorities.animations); + } else { + // manage the animation loop ourselves + headlessStep(); // first call + } + } +}; + +var emitterOptions = { + qualifierCompare: function qualifierCompare(selector1, selector2) { + if (selector1 == null || selector2 == null) { + return selector1 == null && selector2 == null; + } else { + return selector1.sameText(selector2); + } + }, + eventMatches: function eventMatches(cy, listener, eventObj) { + var selector = listener.qualifier; + if (selector != null) { + return cy !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target); + } + return true; + }, + addEventFields: function addEventFields(cy, evt) { + evt.cy = cy; + evt.target = cy; + }, + callbackContext: function callbackContext(cy, listener, eventObj) { + return listener.qualifier != null ? eventObj.target : cy; + } +}; +var argSelector = function argSelector(arg) { + if (string(arg)) { + return new Selector(arg); + } else { + return arg; + } +}; +var elesfn = { + createEmitter: function createEmitter() { + var _p = this._private; + if (!_p.emitter) { + _p.emitter = new Emitter(emitterOptions, this); + } + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(events, selector, callback) { + this.emitter().on(events, argSelector(selector), callback); + return this; + }, + removeListener: function removeListener(events, selector, callback) { + this.emitter().removeListener(events, argSelector(selector), callback); + return this; + }, + removeAllListeners: function removeAllListeners() { + this.emitter().removeAllListeners(); + return this; + }, + one: function one(events, selector, callback) { + this.emitter().one(events, argSelector(selector), callback); + return this; + }, + once: function once(events, selector, callback) { + this.emitter().one(events, argSelector(selector), callback); + return this; + }, + emit: function emit(events, extraParams) { + this.emitter().emit(events, extraParams); + return this; + }, + emitAndNotify: function emitAndNotify(event, eles) { + this.emit(event); + this.notify(event, eles); + return this; + } +}; +define.eventAliasesOn(elesfn); + +var corefn$7 = { + png: function png(options) { + var renderer = this._private.renderer; + options = options || {}; + return renderer.png(options); + }, + jpg: function jpg(options) { + var renderer = this._private.renderer; + options = options || {}; + options.bg = options.bg || '#fff'; + return renderer.jpg(options); + } +}; +corefn$7.jpeg = corefn$7.jpg; + +var corefn$6 = { + layout: function layout(options) { + var cy = this; + if (options == null) { + error('Layout options must be specified to make a layout'); + return; + } + if (options.name == null) { + error('A `name` must be specified to make a layout'); + return; + } + var name = options.name; + var Layout = cy.extension('layout', name); + if (Layout == null) { + error('No such layout `' + name + '` found. Did you forget to import it and `cytoscape.use()` it?'); + return; + } + var eles; + if (string(options.eles)) { + eles = cy.$(options.eles); + } else { + eles = options.eles != null ? options.eles : cy.$(); + } + var layout = new Layout(extend({}, options, { + cy: cy, + eles: eles + })); + return layout; + } +}; +corefn$6.createLayout = corefn$6.makeLayout = corefn$6.layout; + +var corefn$5 = { + notify: function notify(eventName, eventEles) { + var _p = this._private; + if (this.batching()) { + _p.batchNotifications = _p.batchNotifications || {}; + var eles = _p.batchNotifications[eventName] = _p.batchNotifications[eventName] || this.collection(); + if (eventEles != null) { + eles.merge(eventEles); + } + return; // notifications are disabled during batching + } + + if (!_p.notificationsEnabled) { + return; + } // exit on disabled + + var renderer = this.renderer(); + + // exit if destroy() called on core or renderer in between frames #1499 #1528 + if (this.destroyed() || !renderer) { + return; + } + renderer.notify(eventName, eventEles); + }, + notifications: function notifications(bool) { + var p = this._private; + if (bool === undefined) { + return p.notificationsEnabled; + } else { + p.notificationsEnabled = bool ? true : false; + } + return this; + }, + noNotifications: function noNotifications(callback) { + this.notifications(false); + callback(); + this.notifications(true); + }, + batching: function batching() { + return this._private.batchCount > 0; + }, + startBatch: function startBatch() { + var _p = this._private; + if (_p.batchCount == null) { + _p.batchCount = 0; + } + if (_p.batchCount === 0) { + _p.batchStyleEles = this.collection(); + _p.batchNotifications = {}; + } + _p.batchCount++; + return this; + }, + endBatch: function endBatch() { + var _p = this._private; + if (_p.batchCount === 0) { + return this; + } + _p.batchCount--; + if (_p.batchCount === 0) { + // update style for dirty eles + _p.batchStyleEles.updateStyle(); + var renderer = this.renderer(); + + // notify the renderer of queued eles and event types + Object.keys(_p.batchNotifications).forEach(function (eventName) { + var eles = _p.batchNotifications[eventName]; + if (eles.empty()) { + renderer.notify(eventName); + } else { + renderer.notify(eventName, eles); + } + }); + } + return this; + }, + batch: function batch(callback) { + this.startBatch(); + callback(); + this.endBatch(); + return this; + }, + // for backwards compatibility + batchData: function batchData(map) { + var cy = this; + return this.batch(function () { + var ids = Object.keys(map); + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var data = map[id]; + var ele = cy.getElementById(id); + ele.data(data); + } + }); + } +}; + +var rendererDefaults = defaults$g({ + hideEdgesOnViewport: false, + textureOnViewport: false, + motionBlur: false, + motionBlurOpacity: 0.05, + pixelRatio: undefined, + desktopTapThreshold: 4, + touchTapThreshold: 8, + wheelSensitivity: 1, + debug: false, + showFps: false +}); +var corefn$4 = { + renderTo: function renderTo(context, zoom, pan, pxRatio) { + var r = this._private.renderer; + r.renderTo(context, zoom, pan, pxRatio); + return this; + }, + renderer: function renderer() { + return this._private.renderer; + }, + forceRender: function forceRender() { + this.notify('draw'); + return this; + }, + resize: function resize() { + this.invalidateSize(); + this.emitAndNotify('resize'); + return this; + }, + initRenderer: function initRenderer(options) { + var cy = this; + var RendererProto = cy.extension('renderer', options.name); + if (RendererProto == null) { + error("Can not initialise: No such renderer `".concat(options.name, "` found. Did you forget to import it and `cytoscape.use()` it?")); + return; + } + if (options.wheelSensitivity !== undefined) { + warn("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."); + } + var rOpts = rendererDefaults(options); + rOpts.cy = cy; + cy._private.renderer = new RendererProto(rOpts); + this.notify('init'); + }, + destroyRenderer: function destroyRenderer() { + var cy = this; + cy.notify('destroy'); // destroy the renderer + + var domEle = cy.container(); + if (domEle) { + domEle._cyreg = null; + while (domEle.childNodes.length > 0) { + domEle.removeChild(domEle.childNodes[0]); + } + } + cy._private.renderer = null; // to be extra safe, remove the ref + cy.mutableElements().forEach(function (ele) { + var _p = ele._private; + _p.rscratch = {}; + _p.rstyle = {}; + _p.animation.current = []; + _p.animation.queue = []; + }); + }, + onRender: function onRender(fn) { + return this.on('render', fn); + }, + offRender: function offRender(fn) { + return this.off('render', fn); + } +}; +corefn$4.invalidateDimensions = corefn$4.resize; + +var corefn$3 = { + // get a collection + // - empty collection on no args + // - collection of elements in the graph on selector arg + // - guarantee a returned collection when elements or collection specified + collection: function collection(eles, opts) { + if (string(eles)) { + return this.$(eles); + } else if (elementOrCollection(eles)) { + return eles.collection(); + } else if (array(eles)) { + if (!opts) { + opts = {}; + } + return new Collection(this, eles, opts.unique, opts.removed); + } + return new Collection(this); + }, + nodes: function nodes(selector) { + var nodes = this.$(function (ele) { + return ele.isNode(); + }); + if (selector) { + return nodes.filter(selector); + } + return nodes; + }, + edges: function edges(selector) { + var edges = this.$(function (ele) { + return ele.isEdge(); + }); + if (selector) { + return edges.filter(selector); + } + return edges; + }, + // search the graph like jQuery + $: function $(selector) { + var eles = this._private.elements; + if (selector) { + return eles.filter(selector); + } else { + return eles.spawnSelf(); + } + }, + mutableElements: function mutableElements() { + return this._private.elements; + } +}; + +// aliases +corefn$3.elements = corefn$3.filter = corefn$3.$; + +var styfn$8 = {}; + +// keys for style blocks, e.g. ttfftt +var TRUE = 't'; +var FALSE = 'f'; + +// (potentially expensive calculation) +// apply the style to the element based on +// - its bypass +// - what selectors match it +styfn$8.apply = function (eles) { + var self = this; + var _p = self._private; + var cy = _p.cy; + var updatedEles = cy.collection(); + for (var ie = 0; ie < eles.length; ie++) { + var ele = eles[ie]; + var cxtMeta = self.getContextMeta(ele); + if (cxtMeta.empty) { + continue; + } + var cxtStyle = self.getContextStyle(cxtMeta); + var app = self.applyContextStyle(cxtMeta, cxtStyle, ele); + if (ele._private.appliedInitStyle) { + self.updateTransitions(ele, app.diffProps); + } else { + ele._private.appliedInitStyle = true; + } + var hintsDiff = self.updateStyleHints(ele); + if (hintsDiff) { + updatedEles.push(ele); + } + } // for elements + + return updatedEles; +}; +styfn$8.getPropertiesDiff = function (oldCxtKey, newCxtKey) { + var self = this; + var cache = self._private.propDiffs = self._private.propDiffs || {}; + var dualCxtKey = oldCxtKey + '-' + newCxtKey; + var cachedVal = cache[dualCxtKey]; + if (cachedVal) { + return cachedVal; + } + var diffProps = []; + var addedProp = {}; + for (var i = 0; i < self.length; i++) { + var cxt = self[i]; + var oldHasCxt = oldCxtKey[i] === TRUE; + var newHasCxt = newCxtKey[i] === TRUE; + var cxtHasDiffed = oldHasCxt !== newHasCxt; + var cxtHasMappedProps = cxt.mappedProperties.length > 0; + if (cxtHasDiffed || newHasCxt && cxtHasMappedProps) { + var props = void 0; + if (cxtHasDiffed && cxtHasMappedProps) { + props = cxt.properties; // suffices b/c mappedProperties is a subset of properties + } else if (cxtHasDiffed) { + props = cxt.properties; // need to check them all + } else if (cxtHasMappedProps) { + props = cxt.mappedProperties; // only need to check mapped + } + + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + var name = prop.name; + + // if a later context overrides this property, then the fact that this context has switched/diffed doesn't matter + // (semi expensive check since it makes this function O(n^2) on context length, but worth it since overall result + // is cached) + var laterCxtOverrides = false; + for (var k = i + 1; k < self.length; k++) { + var laterCxt = self[k]; + var hasLaterCxt = newCxtKey[k] === TRUE; + if (!hasLaterCxt) { + continue; + } // can't override unless the context is active + + laterCxtOverrides = laterCxt.properties[prop.name] != null; + if (laterCxtOverrides) { + break; + } // exit early as long as one later context overrides + } + + if (!addedProp[name] && !laterCxtOverrides) { + addedProp[name] = true; + diffProps.push(name); + } + } // for props + } // if + } // for contexts + + cache[dualCxtKey] = diffProps; + return diffProps; +}; +styfn$8.getContextMeta = function (ele) { + var self = this; + var cxtKey = ''; + var diffProps; + var prevKey = ele._private.styleCxtKey || ''; + + // get the cxt key + for (var i = 0; i < self.length; i++) { + var context = self[i]; + var contextSelectorMatches = context.selector && context.selector.matches(ele); // NB: context.selector may be null for 'core' + + if (contextSelectorMatches) { + cxtKey += TRUE; + } else { + cxtKey += FALSE; + } + } // for context + + diffProps = self.getPropertiesDiff(prevKey, cxtKey); + ele._private.styleCxtKey = cxtKey; + return { + key: cxtKey, + diffPropNames: diffProps, + empty: diffProps.length === 0 + }; +}; + +// gets a computed ele style object based on matched contexts +styfn$8.getContextStyle = function (cxtMeta) { + var cxtKey = cxtMeta.key; + var self = this; + var cxtStyles = this._private.contextStyles = this._private.contextStyles || {}; + + // if already computed style, returned cached copy + if (cxtStyles[cxtKey]) { + return cxtStyles[cxtKey]; + } + var style = { + _private: { + key: cxtKey + } + }; + for (var i = 0; i < self.length; i++) { + var cxt = self[i]; + var hasCxt = cxtKey[i] === TRUE; + if (!hasCxt) { + continue; + } + for (var j = 0; j < cxt.properties.length; j++) { + var prop = cxt.properties[j]; + style[prop.name] = prop; + } + } + cxtStyles[cxtKey] = style; + return style; +}; +styfn$8.applyContextStyle = function (cxtMeta, cxtStyle, ele) { + var self = this; + var diffProps = cxtMeta.diffPropNames; + var retDiffProps = {}; + var types = self.types; + for (var i = 0; i < diffProps.length; i++) { + var diffPropName = diffProps[i]; + var cxtProp = cxtStyle[diffPropName]; + var eleProp = ele.pstyle(diffPropName); + if (!cxtProp) { + // no context prop means delete + if (!eleProp) { + continue; // no existing prop means nothing needs to be removed + // nb affects initial application on mapped values like control-point-distances + } else if (eleProp.bypass) { + cxtProp = { + name: diffPropName, + deleteBypassed: true + }; + } else { + cxtProp = { + name: diffPropName, + "delete": true + }; + } + } + + // save cycles when the context prop doesn't need to be applied + if (eleProp === cxtProp) { + continue; + } + + // save cycles when a mapped context prop doesn't need to be applied + if (cxtProp.mapped === types.fn // context prop is function mapper + && eleProp != null // some props can be null even by default (e.g. a prop that overrides another one) + && eleProp.mapping != null // ele prop is a concrete value from from a mapper + && eleProp.mapping.value === cxtProp.value // the current prop on the ele is a flat prop value for the function mapper + ) { + // NB don't write to cxtProp, as it's shared among eles (stored in stylesheet) + var mapping = eleProp.mapping; // can write to mapping, as it's a per-ele copy + var fnValue = mapping.fnValue = cxtProp.value(ele); // temporarily cache the value in case of a miss + + if (fnValue === mapping.prevFnValue) { + continue; + } + } + var retDiffProp = retDiffProps[diffPropName] = { + prev: eleProp + }; + self.applyParsedProperty(ele, cxtProp); + retDiffProp.next = ele.pstyle(diffPropName); + if (retDiffProp.next && retDiffProp.next.bypass) { + retDiffProp.next = retDiffProp.next.bypassed; + } + } + return { + diffProps: retDiffProps + }; +}; +styfn$8.updateStyleHints = function (ele) { + var _p = ele._private; + var self = this; + var propNames = self.propertyGroupNames; + var propGrKeys = self.propertyGroupKeys; + var propHash = function propHash(ele, propNames, seedKey) { + return self.getPropertiesHash(ele, propNames, seedKey); + }; + var oldStyleKey = _p.styleKey; + if (ele.removed()) { + return false; + } + var isNode = _p.group === 'nodes'; + + // get the style key hashes per prop group + // but lazily -- only use non-default prop values to reduce the number of hashes + // + + var overriddenStyles = ele._private.style; + propNames = Object.keys(overriddenStyles); + for (var i = 0; i < propGrKeys.length; i++) { + var grKey = propGrKeys[i]; + _p.styleKeys[grKey] = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; + } + var updateGrKey1 = function updateGrKey1(val, grKey) { + return _p.styleKeys[grKey][0] = hashInt(val, _p.styleKeys[grKey][0]); + }; + var updateGrKey2 = function updateGrKey2(val, grKey) { + return _p.styleKeys[grKey][1] = hashIntAlt(val, _p.styleKeys[grKey][1]); + }; + var updateGrKey = function updateGrKey(val, grKey) { + updateGrKey1(val, grKey); + updateGrKey2(val, grKey); + }; + var updateGrKeyWStr = function updateGrKeyWStr(strVal, grKey) { + for (var j = 0; j < strVal.length; j++) { + var ch = strVal.charCodeAt(j); + updateGrKey1(ch, grKey); + updateGrKey2(ch, grKey); + } + }; + + // - hashing works on 32 bit ints b/c we use bitwise ops + // - small numbers get cut off (e.g. 0.123 is seen as 0 by the hashing function) + // - raise up small numbers so more significant digits are seen by hashing + // - make small numbers larger than a normal value to avoid collisions + // - works in practice and it's relatively cheap + var N = 2000000000; + var cleanNum = function cleanNum(val) { + return -128 < val && val < 128 && Math.floor(val) !== val ? N - (val * 1024 | 0) : val; + }; + for (var _i = 0; _i < propNames.length; _i++) { + var name = propNames[_i]; + var parsedProp = overriddenStyles[name]; + if (parsedProp == null) { + continue; + } + var propInfo = this.properties[name]; + var type = propInfo.type; + var _grKey = propInfo.groupKey; + var normalizedNumberVal = void 0; + if (propInfo.hashOverride != null) { + normalizedNumberVal = propInfo.hashOverride(ele, parsedProp); + } else if (parsedProp.pfValue != null) { + normalizedNumberVal = parsedProp.pfValue; + } + + // might not be a number if it allows enums + var numberVal = propInfo.enums == null ? parsedProp.value : null; + var haveNormNum = normalizedNumberVal != null; + var haveUnitedNum = numberVal != null; + var haveNum = haveNormNum || haveUnitedNum; + var units = parsedProp.units; + + // numbers are cheaper to hash than strings + // 1 hash op vs n hash ops (for length n string) + if (type.number && haveNum && !type.multiple) { + var v = haveNormNum ? normalizedNumberVal : numberVal; + updateGrKey(cleanNum(v), _grKey); + if (!haveNormNum && units != null) { + updateGrKeyWStr(units, _grKey); + } + } else { + updateGrKeyWStr(parsedProp.strValue, _grKey); + } + } + + // overall style key + // + + var hash = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; + for (var _i2 = 0; _i2 < propGrKeys.length; _i2++) { + var _grKey2 = propGrKeys[_i2]; + var grHash = _p.styleKeys[_grKey2]; + hash[0] = hashInt(grHash[0], hash[0]); + hash[1] = hashIntAlt(grHash[1], hash[1]); + } + _p.styleKey = combineHashes(hash[0], hash[1]); + + // label dims + // + + var sk = _p.styleKeys; + _p.labelDimsKey = combineHashesArray(sk.labelDimensions); + var labelKeys = propHash(ele, ['label'], sk.labelDimensions); + _p.labelKey = combineHashesArray(labelKeys); + _p.labelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, labelKeys)); + if (!isNode) { + var sourceLabelKeys = propHash(ele, ['source-label'], sk.labelDimensions); + _p.sourceLabelKey = combineHashesArray(sourceLabelKeys); + _p.sourceLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, sourceLabelKeys)); + var targetLabelKeys = propHash(ele, ['target-label'], sk.labelDimensions); + _p.targetLabelKey = combineHashesArray(targetLabelKeys); + _p.targetLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, targetLabelKeys)); + } + + // node + // + + if (isNode) { + var _p$styleKeys = _p.styleKeys, + nodeBody = _p$styleKeys.nodeBody, + nodeBorder = _p$styleKeys.nodeBorder, + nodeOutline = _p$styleKeys.nodeOutline, + backgroundImage = _p$styleKeys.backgroundImage, + compound = _p$styleKeys.compound, + pie = _p$styleKeys.pie; + var nodeKeys = [nodeBody, nodeBorder, nodeOutline, backgroundImage, compound, pie].filter(function (k) { + return k != null; + }).reduce(hashArrays, [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]); + _p.nodeKey = combineHashesArray(nodeKeys); + _p.hasPie = pie != null && pie[0] !== DEFAULT_HASH_SEED && pie[1] !== DEFAULT_HASH_SEED_ALT; + } + return oldStyleKey !== _p.styleKey; +}; +styfn$8.clearStyleHints = function (ele) { + var _p = ele._private; + _p.styleCxtKey = ''; + _p.styleKeys = {}; + _p.styleKey = null; + _p.labelKey = null; + _p.labelStyleKey = null; + _p.sourceLabelKey = null; + _p.sourceLabelStyleKey = null; + _p.targetLabelKey = null; + _p.targetLabelStyleKey = null; + _p.nodeKey = null; + _p.hasPie = null; +}; + +// apply a property to the style (for internal use) +// returns whether application was successful +// +// now, this function flattens the property, and here's how: +// +// for parsedProp:{ bypass: true, deleteBypass: true } +// no property is generated, instead the bypass property in the +// element's style is replaced by what's pointed to by the `bypassed` +// field in the bypass property (i.e. restoring the property the +// bypass was overriding) +// +// for parsedProp:{ mapped: truthy } +// the generated flattenedProp:{ mapping: prop } +// +// for parsedProp:{ bypass: true } +// the generated flattenedProp:{ bypassed: parsedProp } +styfn$8.applyParsedProperty = function (ele, parsedProp) { + var self = this; + var prop = parsedProp; + var style = ele._private.style; + var flatProp; + var types = self.types; + var type = self.properties[prop.name].type; + var propIsBypass = prop.bypass; + var origProp = style[prop.name]; + var origPropIsBypass = origProp && origProp.bypass; + var _p = ele._private; + var flatPropMapping = 'mapping'; + var getVal = function getVal(p) { + if (p == null) { + return null; + } else if (p.pfValue != null) { + return p.pfValue; + } else { + return p.value; + } + }; + var checkTriggers = function checkTriggers() { + var fromVal = getVal(origProp); + var toVal = getVal(prop); + self.checkTriggers(ele, prop.name, fromVal, toVal); + }; + + // edge sanity checks to prevent the client from making serious mistakes + if (parsedProp.name === 'curve-style' && ele.isEdge() && ( + // loops must be bundled beziers + parsedProp.value !== 'bezier' && ele.isLoop() || + // edges connected to compound nodes can not be haystacks + parsedProp.value === 'haystack' && (ele.source().isParent() || ele.target().isParent()))) { + prop = parsedProp = this.parse(parsedProp.name, 'bezier', propIsBypass); + } + if (prop["delete"]) { + // delete the property and use the default value on falsey value + style[prop.name] = undefined; + checkTriggers(); + return true; + } + if (prop.deleteBypassed) { + // delete the property that the + if (!origProp) { + checkTriggers(); + return true; // can't delete if no prop + } else if (origProp.bypass) { + // delete bypassed + origProp.bypassed = undefined; + checkTriggers(); + return true; + } else { + return false; // we're unsuccessful deleting the bypassed + } + } + + // check if we need to delete the current bypass + if (prop.deleteBypass) { + // then this property is just here to indicate we need to delete + if (!origProp) { + checkTriggers(); + return true; // property is already not defined + } else if (origProp.bypass) { + // then replace the bypass property with the original + // because the bypassed property was already applied (and therefore parsed), we can just replace it (no reapplying necessary) + style[prop.name] = origProp.bypassed; + checkTriggers(); + return true; + } else { + return false; // we're unsuccessful deleting the bypass + } + } + + var printMappingErr = function printMappingErr() { + warn('Do not assign mappings to elements without corresponding data (i.e. ele `' + ele.id() + '` has no mapping for property `' + prop.name + '` with data field `' + prop.field + '`); try a `[' + prop.field + ']` selector to limit scope to elements with `' + prop.field + '` defined'); + }; + + // put the property in the style objects + switch (prop.mapped) { + // flatten the property if mapped + case types.mapData: + { + // flatten the field (e.g. data.foo.bar) + var fields = prop.field.split('.'); + var fieldVal = _p.data; + for (var i = 0; i < fields.length && fieldVal; i++) { + var field = fields[i]; + fieldVal = fieldVal[field]; + } + if (fieldVal == null) { + printMappingErr(); + return false; + } + var percent; + if (!number$1(fieldVal)) { + // then don't apply and fall back on the existing style + warn('Do not use continuous mappers without specifying numeric data (i.e. `' + prop.field + ': ' + fieldVal + '` for `' + ele.id() + '` is non-numeric)'); + return false; + } else { + var fieldWidth = prop.fieldMax - prop.fieldMin; + if (fieldWidth === 0) { + // safety check -- not strictly necessary as no props of zero range should be passed here + percent = 0; + } else { + percent = (fieldVal - prop.fieldMin) / fieldWidth; + } + } + + // make sure to bound percent value + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + if (type.color) { + var r1 = prop.valueMin[0]; + var r2 = prop.valueMax[0]; + var g1 = prop.valueMin[1]; + var g2 = prop.valueMax[1]; + var b1 = prop.valueMin[2]; + var b2 = prop.valueMax[2]; + var a1 = prop.valueMin[3] == null ? 1 : prop.valueMin[3]; + var a2 = prop.valueMax[3] == null ? 1 : prop.valueMax[3]; + var clr = [Math.round(r1 + (r2 - r1) * percent), Math.round(g1 + (g2 - g1) * percent), Math.round(b1 + (b2 - b1) * percent), Math.round(a1 + (a2 - a1) * percent)]; + flatProp = { + // colours are simple, so just create the flat property instead of expensive string parsing + bypass: prop.bypass, + // we're a bypass if the mapping property is a bypass + name: prop.name, + value: clr, + strValue: 'rgb(' + clr[0] + ', ' + clr[1] + ', ' + clr[2] + ')' + }; + } else if (type.number) { + var calcValue = prop.valueMin + (prop.valueMax - prop.valueMin) * percent; + flatProp = this.parse(prop.name, calcValue, prop.bypass, flatPropMapping); + } else { + return false; // can only map to colours and numbers + } + + if (!flatProp) { + // if we can't flatten the property, then don't apply the property and fall back on the existing style + printMappingErr(); + return false; + } + flatProp.mapping = prop; // keep a reference to the mapping + prop = flatProp; // the flattened (mapped) property is the one we want + + break; + } + + // direct mapping + case types.data: + { + // flatten the field (e.g. data.foo.bar) + var _fields = prop.field.split('.'); + var _fieldVal = _p.data; + for (var _i3 = 0; _i3 < _fields.length && _fieldVal; _i3++) { + var _field = _fields[_i3]; + _fieldVal = _fieldVal[_field]; + } + if (_fieldVal != null) { + flatProp = this.parse(prop.name, _fieldVal, prop.bypass, flatPropMapping); + } + if (!flatProp) { + // if we can't flatten the property, then don't apply and fall back on the existing style + printMappingErr(); + return false; + } + flatProp.mapping = prop; // keep a reference to the mapping + prop = flatProp; // the flattened (mapped) property is the one we want + + break; + } + case types.fn: + { + var fn = prop.value; + var fnRetVal = prop.fnValue != null ? prop.fnValue : fn(ele); // check for cached value before calling function + + prop.prevFnValue = fnRetVal; + if (fnRetVal == null) { + warn('Custom function mappers may not return null (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is null)'); + return false; + } + flatProp = this.parse(prop.name, fnRetVal, prop.bypass, flatPropMapping); + if (!flatProp) { + warn('Custom function mappers may not return invalid values for the property type (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is invalid)'); + return false; + } + flatProp.mapping = copy(prop); // keep a reference to the mapping + prop = flatProp; // the flattened (mapped) property is the one we want + + break; + } + case undefined: + break; + // just set the property + + default: + return false; + // not a valid mapping + } + + // if the property is a bypass property, then link the resultant property to the original one + if (propIsBypass) { + if (origPropIsBypass) { + // then this bypass overrides the existing one + prop.bypassed = origProp.bypassed; // steal bypassed prop from old bypass + } else { + // then link the orig prop to the new bypass + prop.bypassed = origProp; + } + style[prop.name] = prop; // and set + } else { + // prop is not bypass + if (origPropIsBypass) { + // then keep the orig prop (since it's a bypass) and link to the new prop + origProp.bypassed = prop; + } else { + // then just replace the old prop with the new one + style[prop.name] = prop; + } + } + checkTriggers(); + return true; +}; +styfn$8.cleanElements = function (eles, keepBypasses) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + this.clearStyleHints(ele); + ele.dirtyCompoundBoundsCache(); + ele.dirtyBoundingBoxCache(); + if (!keepBypasses) { + ele._private.style = {}; + } else { + var style = ele._private.style; + var propNames = Object.keys(style); + for (var j = 0; j < propNames.length; j++) { + var propName = propNames[j]; + var eleProp = style[propName]; + if (eleProp != null) { + if (eleProp.bypass) { + eleProp.bypassed = null; + } else { + style[propName] = null; + } + } + } + } + } +}; + +// updates the visual style for all elements (useful for manual style modification after init) +styfn$8.update = function () { + var cy = this._private.cy; + var eles = cy.mutableElements(); + eles.updateStyle(); +}; + +// diffProps : { name => { prev, next } } +styfn$8.updateTransitions = function (ele, diffProps) { + var self = this; + var _p = ele._private; + var props = ele.pstyle('transition-property').value; + var duration = ele.pstyle('transition-duration').pfValue; + var delay = ele.pstyle('transition-delay').pfValue; + if (props.length > 0 && duration > 0) { + var style = {}; + + // build up the style to animate towards + var anyPrev = false; + for (var i = 0; i < props.length; i++) { + var prop = props[i]; + var styProp = ele.pstyle(prop); + var diffProp = diffProps[prop]; + if (!diffProp) { + continue; + } + var prevProp = diffProp.prev; + var fromProp = prevProp; + var toProp = diffProp.next != null ? diffProp.next : styProp; + var diff = false; + var initVal = void 0; + var initDt = 0.000001; // delta time % value for initVal (allows animating out of init zero opacity) + + if (!fromProp) { + continue; + } + + // consider px values + if (number$1(fromProp.pfValue) && number$1(toProp.pfValue)) { + diff = toProp.pfValue - fromProp.pfValue; // nonzero is truthy + initVal = fromProp.pfValue + initDt * diff; + + // consider numerical values + } else if (number$1(fromProp.value) && number$1(toProp.value)) { + diff = toProp.value - fromProp.value; // nonzero is truthy + initVal = fromProp.value + initDt * diff; + + // consider colour values + } else if (array(fromProp.value) && array(toProp.value)) { + diff = fromProp.value[0] !== toProp.value[0] || fromProp.value[1] !== toProp.value[1] || fromProp.value[2] !== toProp.value[2]; + initVal = fromProp.strValue; + } + + // the previous value is good for an animation only if it's different + if (diff) { + style[prop] = toProp.strValue; // to val + this.applyBypass(ele, prop, initVal); // from val + anyPrev = true; + } + } // end if props allow ani + + // can't transition if there's nothing previous to transition from + if (!anyPrev) { + return; + } + _p.transitioning = true; + new Promise$1(function (resolve) { + if (delay > 0) { + ele.delayAnimation(delay).play().promise().then(resolve); + } else { + resolve(); + } + }).then(function () { + return ele.animation({ + style: style, + duration: duration, + easing: ele.pstyle('transition-timing-function').value, + queue: false + }).play().promise(); + }).then(function () { + // if( !isBypass ){ + self.removeBypasses(ele, props); + ele.emitAndNotify('style'); + // } + + _p.transitioning = false; + }); + } else if (_p.transitioning) { + this.removeBypasses(ele, props); + ele.emitAndNotify('style'); + _p.transitioning = false; + } +}; +styfn$8.checkTrigger = function (ele, name, fromValue, toValue, getTrigger, onTrigger) { + var prop = this.properties[name]; + var triggerCheck = getTrigger(prop); + if (triggerCheck != null && triggerCheck(fromValue, toValue)) { + onTrigger(prop); + } +}; +styfn$8.checkZOrderTrigger = function (ele, name, fromValue, toValue) { + var _this = this; + this.checkTrigger(ele, name, fromValue, toValue, function (prop) { + return prop.triggersZOrder; + }, function () { + _this._private.cy.notify('zorder', ele); + }); +}; +styfn$8.checkBoundsTrigger = function (ele, name, fromValue, toValue) { + this.checkTrigger(ele, name, fromValue, toValue, function (prop) { + return prop.triggersBounds; + }, function (prop) { + ele.dirtyCompoundBoundsCache(); + ele.dirtyBoundingBoxCache(); + + // if the prop change makes the bb of pll bezier edges invalid, + // then dirty the pll edge bb cache as well + if ( + // only for beziers -- so performance of other edges isn't affected + prop.triggersBoundsOfParallelBeziers && name === 'curve-style' && (fromValue === 'bezier' || toValue === 'bezier')) { + ele.parallelEdges().forEach(function (pllEdge) { + if (pllEdge.isBundledBezier()) { + pllEdge.dirtyBoundingBoxCache(); + } + }); + } + if (prop.triggersBoundsOfConnectedEdges && name === 'display' && (fromValue === 'none' || toValue === 'none')) { + ele.connectedEdges().forEach(function (edge) { + edge.dirtyBoundingBoxCache(); + }); + } + }); +}; +styfn$8.checkTriggers = function (ele, name, fromValue, toValue) { + ele.dirtyStyleCache(); + this.checkZOrderTrigger(ele, name, fromValue, toValue); + this.checkBoundsTrigger(ele, name, fromValue, toValue); +}; + +var styfn$7 = {}; + +// bypasses are applied to an existing style on an element, and just tacked on temporarily +// returns true iff application was successful for at least 1 specified property +styfn$7.applyBypass = function (eles, name, value, updateTransitions) { + var self = this; + var props = []; + var isBypass = true; + + // put all the properties (can specify one or many) in an array after parsing them + if (name === '*' || name === '**') { + // apply to all property names + + if (value !== undefined) { + for (var i = 0; i < self.properties.length; i++) { + var prop = self.properties[i]; + var _name = prop.name; + var parsedProp = this.parse(_name, value, true); + if (parsedProp) { + props.push(parsedProp); + } + } + } + } else if (string(name)) { + // then parse the single property + var _parsedProp = this.parse(name, value, true); + if (_parsedProp) { + props.push(_parsedProp); + } + } else if (plainObject(name)) { + // then parse each property + var specifiedProps = name; + updateTransitions = value; + var names = Object.keys(specifiedProps); + for (var _i = 0; _i < names.length; _i++) { + var _name2 = names[_i]; + var _value = specifiedProps[_name2]; + if (_value === undefined) { + // try camel case name too + _value = specifiedProps[dash2camel(_name2)]; + } + if (_value !== undefined) { + var _parsedProp2 = this.parse(_name2, _value, true); + if (_parsedProp2) { + props.push(_parsedProp2); + } + } + } + } else { + // can't do anything without well defined properties + return false; + } + + // we've failed if there are no valid properties + if (props.length === 0) { + return false; + } + + // now, apply the bypass properties on the elements + var ret = false; // return true if at least one succesful bypass applied + for (var _i2 = 0; _i2 < eles.length; _i2++) { + // for each ele + var ele = eles[_i2]; + var diffProps = {}; + var diffProp = void 0; + for (var j = 0; j < props.length; j++) { + // for each prop + var _prop = props[j]; + if (updateTransitions) { + var prevProp = ele.pstyle(_prop.name); + diffProp = diffProps[_prop.name] = { + prev: prevProp + }; + } + ret = this.applyParsedProperty(ele, copy(_prop)) || ret; + if (updateTransitions) { + diffProp.next = ele.pstyle(_prop.name); + } + } // for props + + if (ret) { + this.updateStyleHints(ele); + } + if (updateTransitions) { + this.updateTransitions(ele, diffProps, isBypass); + } + } // for eles + + return ret; +}; + +// only useful in specific cases like animation +styfn$7.overrideBypass = function (eles, name, value) { + name = camel2dash(name); + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var prop = ele._private.style[name]; + var type = this.properties[name].type; + var isColor = type.color; + var isMulti = type.mutiple; + var oldValue = !prop ? null : prop.pfValue != null ? prop.pfValue : prop.value; + if (!prop || !prop.bypass) { + // need a bypass if one doesn't exist + this.applyBypass(ele, name, value); + } else { + prop.value = value; + if (prop.pfValue != null) { + prop.pfValue = value; + } + if (isColor) { + prop.strValue = 'rgb(' + value.join(',') + ')'; + } else if (isMulti) { + prop.strValue = value.join(' '); + } else { + prop.strValue = '' + value; + } + this.updateStyleHints(ele); + } + this.checkTriggers(ele, name, oldValue, value); + } +}; +styfn$7.removeAllBypasses = function (eles, updateTransitions) { + return this.removeBypasses(eles, this.propertyNames, updateTransitions); +}; +styfn$7.removeBypasses = function (eles, props, updateTransitions) { + var isBypass = true; + for (var j = 0; j < eles.length; j++) { + var ele = eles[j]; + var diffProps = {}; + for (var i = 0; i < props.length; i++) { + var name = props[i]; + var prop = this.properties[name]; + var prevProp = ele.pstyle(prop.name); + if (!prevProp || !prevProp.bypass) { + // if a bypass doesn't exist for the prop, nothing needs to be removed + continue; + } + var value = ''; // empty => remove bypass + var parsedProp = this.parse(name, value, true); + var diffProp = diffProps[prop.name] = { + prev: prevProp + }; + this.applyParsedProperty(ele, parsedProp); + diffProp.next = ele.pstyle(prop.name); + } // for props + + this.updateStyleHints(ele); + if (updateTransitions) { + this.updateTransitions(ele, diffProps, isBypass); + } + } // for eles +}; + +var styfn$6 = {}; + +// gets what an em size corresponds to in pixels relative to a dom element +styfn$6.getEmSizeInPixels = function () { + var px = this.containerCss('font-size'); + if (px != null) { + return parseFloat(px); + } else { + return 1; // for headless + } +}; + +// gets css property from the core container +styfn$6.containerCss = function (propName) { + var cy = this._private.cy; + var domElement = cy.container(); + var containerWindow = cy.window(); + if (containerWindow && domElement && containerWindow.getComputedStyle) { + return containerWindow.getComputedStyle(domElement).getPropertyValue(propName); + } +}; + +var styfn$5 = {}; + +// gets the rendered style for an element +styfn$5.getRenderedStyle = function (ele, prop) { + if (prop) { + return this.getStylePropertyValue(ele, prop, true); + } else { + return this.getRawStyle(ele, true); + } +}; + +// gets the raw style for an element +styfn$5.getRawStyle = function (ele, isRenderedVal) { + var self = this; + ele = ele[0]; // insure it's an element + + if (ele) { + var rstyle = {}; + for (var i = 0; i < self.properties.length; i++) { + var prop = self.properties[i]; + var val = self.getStylePropertyValue(ele, prop.name, isRenderedVal); + if (val != null) { + rstyle[prop.name] = val; + rstyle[dash2camel(prop.name)] = val; + } + } + return rstyle; + } +}; +styfn$5.getIndexedStyle = function (ele, property, subproperty, index) { + var pstyle = ele.pstyle(property)[subproperty][index]; + return pstyle != null ? pstyle : ele.cy().style().getDefaultProperty(property)[subproperty][0]; +}; +styfn$5.getStylePropertyValue = function (ele, propName, isRenderedVal) { + var self = this; + ele = ele[0]; // insure it's an element + + if (ele) { + var prop = self.properties[propName]; + if (prop.alias) { + prop = prop.pointsTo; + } + var type = prop.type; + var styleProp = ele.pstyle(prop.name); + if (styleProp) { + var value = styleProp.value, + units = styleProp.units, + strValue = styleProp.strValue; + if (isRenderedVal && type.number && value != null && number$1(value)) { + var zoom = ele.cy().zoom(); + var getRenderedValue = function getRenderedValue(val) { + return val * zoom; + }; + var getValueStringWithUnits = function getValueStringWithUnits(val, units) { + return getRenderedValue(val) + units; + }; + var isArrayValue = array(value); + var haveUnits = isArrayValue ? units.every(function (u) { + return u != null; + }) : units != null; + if (haveUnits) { + if (isArrayValue) { + return value.map(function (v, i) { + return getValueStringWithUnits(v, units[i]); + }).join(' '); + } else { + return getValueStringWithUnits(value, units); + } + } else { + if (isArrayValue) { + return value.map(function (v) { + return string(v) ? v : '' + getRenderedValue(v); + }).join(' '); + } else { + return '' + getRenderedValue(value); + } + } + } else if (strValue != null) { + return strValue; + } + } + return null; + } +}; +styfn$5.getAnimationStartStyle = function (ele, aniProps) { + var rstyle = {}; + for (var i = 0; i < aniProps.length; i++) { + var aniProp = aniProps[i]; + var name = aniProp.name; + var styleProp = ele.pstyle(name); + if (styleProp !== undefined) { + // then make a prop of it + if (plainObject(styleProp)) { + styleProp = this.parse(name, styleProp.strValue); + } else { + styleProp = this.parse(name, styleProp); + } + } + if (styleProp) { + rstyle[name] = styleProp; + } + } + return rstyle; +}; +styfn$5.getPropsList = function (propsObj) { + var self = this; + var rstyle = []; + var style = propsObj; + var props = self.properties; + if (style) { + var names = Object.keys(style); + for (var i = 0; i < names.length; i++) { + var name = names[i]; + var val = style[name]; + var prop = props[name] || props[camel2dash(name)]; + var styleProp = this.parse(prop.name, val); + if (styleProp) { + rstyle.push(styleProp); + } + } + } + return rstyle; +}; +styfn$5.getNonDefaultPropertiesHash = function (ele, propNames, seed) { + var hash = seed.slice(); + var name, val, strVal, chVal; + var i, j; + for (i = 0; i < propNames.length; i++) { + name = propNames[i]; + val = ele.pstyle(name, false); + if (val == null) { + continue; + } else if (val.pfValue != null) { + hash[0] = hashInt(chVal, hash[0]); + hash[1] = hashIntAlt(chVal, hash[1]); + } else { + strVal = val.strValue; + for (j = 0; j < strVal.length; j++) { + chVal = strVal.charCodeAt(j); + hash[0] = hashInt(chVal, hash[0]); + hash[1] = hashIntAlt(chVal, hash[1]); + } + } + } + return hash; +}; +styfn$5.getPropertiesHash = styfn$5.getNonDefaultPropertiesHash; + +var styfn$4 = {}; +styfn$4.appendFromJson = function (json) { + var style = this; + for (var i = 0; i < json.length; i++) { + var context = json[i]; + var selector = context.selector; + var props = context.style || context.css; + var names = Object.keys(props); + style.selector(selector); // apply selector + + for (var j = 0; j < names.length; j++) { + var name = names[j]; + var value = props[name]; + style.css(name, value); // apply property + } + } + + return style; +}; + +// accessible cy.style() function +styfn$4.fromJson = function (json) { + var style = this; + style.resetToDefault(); + style.appendFromJson(json); + return style; +}; + +// get json from cy.style() api +styfn$4.json = function () { + var json = []; + for (var i = this.defaultLength; i < this.length; i++) { + var cxt = this[i]; + var selector = cxt.selector; + var props = cxt.properties; + var css = {}; + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + css[prop.name] = prop.strValue; + } + json.push({ + selector: !selector ? 'core' : selector.toString(), + style: css + }); + } + return json; +}; + +var styfn$3 = {}; +styfn$3.appendFromString = function (string) { + var self = this; + var style = this; + var remaining = '' + string; + var selAndBlockStr; + var blockRem; + var propAndValStr; + + // remove comments from the style string + remaining = remaining.replace(/[/][*](\s|.)+?[*][/]/g, ''); + function removeSelAndBlockFromRemaining() { + // remove the parsed selector and block from the remaining text to parse + if (remaining.length > selAndBlockStr.length) { + remaining = remaining.substr(selAndBlockStr.length); + } else { + remaining = ''; + } + } + function removePropAndValFromRem() { + // remove the parsed property and value from the remaining block text to parse + if (blockRem.length > propAndValStr.length) { + blockRem = blockRem.substr(propAndValStr.length); + } else { + blockRem = ''; + } + } + for (;;) { + var nothingLeftToParse = remaining.match(/^\s*$/); + if (nothingLeftToParse) { + break; + } + var selAndBlock = remaining.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); + if (!selAndBlock) { + warn('Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: ' + remaining); + break; + } + selAndBlockStr = selAndBlock[0]; + + // parse the selector + var selectorStr = selAndBlock[1]; + if (selectorStr !== 'core') { + var selector = new Selector(selectorStr); + if (selector.invalid) { + warn('Skipping parsing of block: Invalid selector found in string stylesheet: ' + selectorStr); + + // skip this selector and block + removeSelAndBlockFromRemaining(); + continue; + } + } + + // parse the block of properties and values + var blockStr = selAndBlock[2]; + var invalidBlock = false; + blockRem = blockStr; + var props = []; + for (;;) { + var _nothingLeftToParse = blockRem.match(/^\s*$/); + if (_nothingLeftToParse) { + break; + } + var propAndVal = blockRem.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); + if (!propAndVal) { + warn('Skipping parsing of block: Invalid formatting of style property and value definitions found in:' + blockStr); + invalidBlock = true; + break; + } + propAndValStr = propAndVal[0]; + var propStr = propAndVal[1]; + var valStr = propAndVal[2]; + var prop = self.properties[propStr]; + if (!prop) { + warn('Skipping property: Invalid property name in: ' + propAndValStr); + + // skip this property in the block + removePropAndValFromRem(); + continue; + } + var parsedProp = style.parse(propStr, valStr); + if (!parsedProp) { + warn('Skipping property: Invalid property definition in: ' + propAndValStr); + + // skip this property in the block + removePropAndValFromRem(); + continue; + } + props.push({ + name: propStr, + val: valStr + }); + removePropAndValFromRem(); + } + if (invalidBlock) { + removeSelAndBlockFromRemaining(); + break; + } + + // put the parsed block in the style + style.selector(selectorStr); + for (var i = 0; i < props.length; i++) { + var _prop = props[i]; + style.css(_prop.name, _prop.val); + } + removeSelAndBlockFromRemaining(); + } + return style; +}; +styfn$3.fromString = function (string) { + var style = this; + style.resetToDefault(); + style.appendFromString(string); + return style; +}; + +var styfn$2 = {}; +(function () { + var number$1 = number; + var rgba = rgbaNoBackRefs; + var hsla = hslaNoBackRefs; + var hex3$1 = hex3; + var hex6$1 = hex6; + var data = function data(prefix) { + return '^' + prefix + '\\s*\\(\\s*([\\w\\.]+)\\s*\\)$'; + }; + var mapData = function mapData(prefix) { + var mapArg = number$1 + '|\\w+|' + rgba + '|' + hsla + '|' + hex3$1 + '|' + hex6$1; + return '^' + prefix + '\\s*\\(([\\w\\.]+)\\s*\\,\\s*(' + number$1 + ')\\s*\\,\\s*(' + number$1 + ')\\s*,\\s*(' + mapArg + ')\\s*\\,\\s*(' + mapArg + ')\\)$'; + }; + var urlRegexes = ['^url\\s*\\(\\s*[\'"]?(.+?)[\'"]?\\s*\\)$', '^(none)$', '^(.+)$']; + + // each visual style property has a type and needs to be validated according to it + styfn$2.types = { + time: { + number: true, + min: 0, + units: 's|ms', + implicitUnits: 'ms' + }, + percent: { + number: true, + min: 0, + max: 100, + units: '%', + implicitUnits: '%' + }, + percentages: { + number: true, + min: 0, + max: 100, + units: '%', + implicitUnits: '%', + multiple: true + }, + zeroOneNumber: { + number: true, + min: 0, + max: 1, + unitless: true + }, + zeroOneNumbers: { + number: true, + min: 0, + max: 1, + unitless: true, + multiple: true + }, + nOneOneNumber: { + number: true, + min: -1, + max: 1, + unitless: true + }, + nonNegativeInt: { + number: true, + min: 0, + integer: true, + unitless: true + }, + nonNegativeNumber: { + number: true, + min: 0, + unitless: true + }, + position: { + enums: ['parent', 'origin'] + }, + nodeSize: { + number: true, + min: 0, + enums: ['label'] + }, + number: { + number: true, + unitless: true + }, + numbers: { + number: true, + unitless: true, + multiple: true + }, + positiveNumber: { + number: true, + unitless: true, + min: 0, + strictMin: true + }, + size: { + number: true, + min: 0 + }, + bidirectionalSize: { + number: true + }, + // allows negative + bidirectionalSizeMaybePercent: { + number: true, + allowPercent: true + }, + // allows negative + bidirectionalSizes: { + number: true, + multiple: true + }, + // allows negative + sizeMaybePercent: { + number: true, + min: 0, + allowPercent: true + }, + axisDirection: { + enums: ['horizontal', 'leftward', 'rightward', 'vertical', 'upward', 'downward', 'auto'] + }, + paddingRelativeTo: { + enums: ['width', 'height', 'average', 'min', 'max'] + }, + bgWH: { + number: true, + min: 0, + allowPercent: true, + enums: ['auto'], + multiple: true + }, + bgPos: { + number: true, + allowPercent: true, + multiple: true + }, + bgRelativeTo: { + enums: ['inner', 'include-padding'], + multiple: true + }, + bgRepeat: { + enums: ['repeat', 'repeat-x', 'repeat-y', 'no-repeat'], + multiple: true + }, + bgFit: { + enums: ['none', 'contain', 'cover'], + multiple: true + }, + bgCrossOrigin: { + enums: ['anonymous', 'use-credentials', 'null'], + multiple: true + }, + bgClip: { + enums: ['none', 'node'], + multiple: true + }, + bgContainment: { + enums: ['inside', 'over'], + multiple: true + }, + color: { + color: true + }, + colors: { + color: true, + multiple: true + }, + fill: { + enums: ['solid', 'linear-gradient', 'radial-gradient'] + }, + bool: { + enums: ['yes', 'no'] + }, + bools: { + enums: ['yes', 'no'], + multiple: true + }, + lineStyle: { + enums: ['solid', 'dotted', 'dashed'] + }, + lineCap: { + enums: ['butt', 'round', 'square'] + }, + borderStyle: { + enums: ['solid', 'dotted', 'dashed', 'double'] + }, + curveStyle: { + enums: ['bezier', 'unbundled-bezier', 'haystack', 'segments', 'straight', 'straight-triangle', 'taxi'] + }, + fontFamily: { + regex: '^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$' + }, + fontStyle: { + enums: ['italic', 'normal', 'oblique'] + }, + fontWeight: { + enums: ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '800', '900', 100, 200, 300, 400, 500, 600, 700, 800, 900] + }, + textDecoration: { + enums: ['none', 'underline', 'overline', 'line-through'] + }, + textTransform: { + enums: ['none', 'uppercase', 'lowercase'] + }, + textWrap: { + enums: ['none', 'wrap', 'ellipsis'] + }, + textOverflowWrap: { + enums: ['whitespace', 'anywhere'] + }, + textBackgroundShape: { + enums: ['rectangle', 'roundrectangle', 'round-rectangle'] + }, + nodeShape: { + enums: ['rectangle', 'roundrectangle', 'round-rectangle', 'cutrectangle', 'cut-rectangle', 'bottomroundrectangle', 'bottom-round-rectangle', 'barrel', 'ellipse', 'triangle', 'round-triangle', 'square', 'pentagon', 'round-pentagon', 'hexagon', 'round-hexagon', 'concavehexagon', 'concave-hexagon', 'heptagon', 'round-heptagon', 'octagon', 'round-octagon', 'tag', 'round-tag', 'star', 'diamond', 'round-diamond', 'vee', 'rhomboid', 'right-rhomboid', 'polygon'] + }, + overlayShape: { + enums: ['roundrectangle', 'round-rectangle', 'ellipse'] + }, + compoundIncludeLabels: { + enums: ['include', 'exclude'] + }, + arrowShape: { + enums: ['tee', 'triangle', 'triangle-tee', 'circle-triangle', 'triangle-cross', 'triangle-backcurve', 'vee', 'square', 'circle', 'diamond', 'chevron', 'none'] + }, + arrowFill: { + enums: ['filled', 'hollow'] + }, + arrowWidth: { + number: true, + units: '%|px|em', + implicitUnits: 'px', + enums: ['match-line'] + }, + display: { + enums: ['element', 'none'] + }, + visibility: { + enums: ['hidden', 'visible'] + }, + zCompoundDepth: { + enums: ['bottom', 'orphan', 'auto', 'top'] + }, + zIndexCompare: { + enums: ['auto', 'manual'] + }, + valign: { + enums: ['top', 'center', 'bottom'] + }, + halign: { + enums: ['left', 'center', 'right'] + }, + justification: { + enums: ['left', 'center', 'right', 'auto'] + }, + text: { + string: true + }, + data: { + mapping: true, + regex: data('data') + }, + layoutData: { + mapping: true, + regex: data('layoutData') + }, + scratch: { + mapping: true, + regex: data('scratch') + }, + mapData: { + mapping: true, + regex: mapData('mapData') + }, + mapLayoutData: { + mapping: true, + regex: mapData('mapLayoutData') + }, + mapScratch: { + mapping: true, + regex: mapData('mapScratch') + }, + fn: { + mapping: true, + fn: true + }, + url: { + regexes: urlRegexes, + singleRegexMatchValue: true + }, + urls: { + regexes: urlRegexes, + singleRegexMatchValue: true, + multiple: true + }, + propList: { + propList: true + }, + angle: { + number: true, + units: 'deg|rad', + implicitUnits: 'rad' + }, + textRotation: { + number: true, + units: 'deg|rad', + implicitUnits: 'rad', + enums: ['none', 'autorotate'] + }, + polygonPointList: { + number: true, + multiple: true, + evenMultiple: true, + min: -1, + max: 1, + unitless: true + }, + edgeDistances: { + enums: ['intersection', 'node-position', 'endpoints'] + }, + edgeEndpoint: { + number: true, + multiple: true, + units: '%|px|em|deg|rad', + implicitUnits: 'px', + enums: ['inside-to-node', 'outside-to-node', 'outside-to-node-or-label', 'outside-to-line', 'outside-to-line-or-label'], + singleEnum: true, + validate: function validate(valArr, unitsArr) { + switch (valArr.length) { + case 2: + // can be % or px only + return unitsArr[0] !== 'deg' && unitsArr[0] !== 'rad' && unitsArr[1] !== 'deg' && unitsArr[1] !== 'rad'; + case 1: + // can be enum, deg, or rad only + return string(valArr[0]) || unitsArr[0] === 'deg' || unitsArr[0] === 'rad'; + default: + return false; + } + } + }, + easing: { + regexes: ['^(spring)\\s*\\(\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*\\)$', '^(cubic-bezier)\\s*\\(\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*\\)$'], + enums: ['linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'ease-in-sine', 'ease-out-sine', 'ease-in-out-sine', 'ease-in-quad', 'ease-out-quad', 'ease-in-out-quad', 'ease-in-cubic', 'ease-out-cubic', 'ease-in-out-cubic', 'ease-in-quart', 'ease-out-quart', 'ease-in-out-quart', 'ease-in-quint', 'ease-out-quint', 'ease-in-out-quint', 'ease-in-expo', 'ease-out-expo', 'ease-in-out-expo', 'ease-in-circ', 'ease-out-circ', 'ease-in-out-circ'] + }, + gradientDirection: { + enums: ['to-bottom', 'to-top', 'to-left', 'to-right', 'to-bottom-right', 'to-bottom-left', 'to-top-right', 'to-top-left', 'to-right-bottom', 'to-left-bottom', 'to-right-top', 'to-left-top' // different order + ] + }, + + boundsExpansion: { + number: true, + multiple: true, + min: 0, + validate: function validate(valArr) { + var length = valArr.length; + return length === 1 || length === 2 || length === 4; + } + } + }; + var diff = { + zeroNonZero: function zeroNonZero(val1, val2) { + if ((val1 == null || val2 == null) && val1 !== val2) { + return true; // null cases could represent any value + } + if (val1 == 0 && val2 != 0) { + return true; + } else if (val1 != 0 && val2 == 0) { + return true; + } else { + return false; + } + }, + any: function any(val1, val2) { + return val1 != val2; + }, + emptyNonEmpty: function emptyNonEmpty(str1, str2) { + var empty1 = emptyString(str1); + var empty2 = emptyString(str2); + return empty1 && !empty2 || !empty1 && empty2; + } + }; + + // define visual style properties + // + // - n.b. adding a new group of props may require updates to updateStyleHints() + // - adding new props to an existing group gets handled automatically + + var t = styfn$2.types; + var mainLabel = [{ + name: 'label', + type: t.text, + triggersBounds: diff.any, + triggersZOrder: diff.emptyNonEmpty + }, { + name: 'text-rotation', + type: t.textRotation, + triggersBounds: diff.any + }, { + name: 'text-margin-x', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'text-margin-y', + type: t.bidirectionalSize, + triggersBounds: diff.any + }]; + var sourceLabel = [{ + name: 'source-label', + type: t.text, + triggersBounds: diff.any + }, { + name: 'source-text-rotation', + type: t.textRotation, + triggersBounds: diff.any + }, { + name: 'source-text-margin-x', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'source-text-margin-y', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'source-text-offset', + type: t.size, + triggersBounds: diff.any + }]; + var targetLabel = [{ + name: 'target-label', + type: t.text, + triggersBounds: diff.any + }, { + name: 'target-text-rotation', + type: t.textRotation, + triggersBounds: diff.any + }, { + name: 'target-text-margin-x', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'target-text-margin-y', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'target-text-offset', + type: t.size, + triggersBounds: diff.any + }]; + var labelDimensions = [{ + name: 'font-family', + type: t.fontFamily, + triggersBounds: diff.any + }, { + name: 'font-style', + type: t.fontStyle, + triggersBounds: diff.any + }, { + name: 'font-weight', + type: t.fontWeight, + triggersBounds: diff.any + }, { + name: 'font-size', + type: t.size, + triggersBounds: diff.any + }, { + name: 'text-transform', + type: t.textTransform, + triggersBounds: diff.any + }, { + name: 'text-wrap', + type: t.textWrap, + triggersBounds: diff.any + }, { + name: 'text-overflow-wrap', + type: t.textOverflowWrap, + triggersBounds: diff.any + }, { + name: 'text-max-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'text-outline-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'line-height', + type: t.positiveNumber, + triggersBounds: diff.any + }]; + var commonLabel = [{ + name: 'text-valign', + type: t.valign, + triggersBounds: diff.any + }, { + name: 'text-halign', + type: t.halign, + triggersBounds: diff.any + }, { + name: 'color', + type: t.color + }, { + name: 'text-outline-color', + type: t.color + }, { + name: 'text-outline-opacity', + type: t.zeroOneNumber + }, { + name: 'text-background-color', + type: t.color + }, { + name: 'text-background-opacity', + type: t.zeroOneNumber + }, { + name: 'text-background-padding', + type: t.size, + triggersBounds: diff.any + }, { + name: 'text-border-opacity', + type: t.zeroOneNumber + }, { + name: 'text-border-color', + type: t.color + }, { + name: 'text-border-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'text-border-style', + type: t.borderStyle, + triggersBounds: diff.any + }, { + name: 'text-background-shape', + type: t.textBackgroundShape, + triggersBounds: diff.any + }, { + name: 'text-justification', + type: t.justification + }]; + var behavior = [{ + name: 'events', + type: t.bool, + triggersZOrder: diff.any + }, { + name: 'text-events', + type: t.bool, + triggersZOrder: diff.any + }]; + var visibility = [{ + name: 'display', + type: t.display, + triggersZOrder: diff.any, + triggersBounds: diff.any, + triggersBoundsOfConnectedEdges: true + }, { + name: 'visibility', + type: t.visibility, + triggersZOrder: diff.any + }, { + name: 'opacity', + type: t.zeroOneNumber, + triggersZOrder: diff.zeroNonZero + }, { + name: 'text-opacity', + type: t.zeroOneNumber + }, { + name: 'min-zoomed-font-size', + type: t.size + }, { + name: 'z-compound-depth', + type: t.zCompoundDepth, + triggersZOrder: diff.any + }, { + name: 'z-index-compare', + type: t.zIndexCompare, + triggersZOrder: diff.any + }, { + name: 'z-index', + type: t.number, + triggersZOrder: diff.any + }]; + var overlay = [{ + name: 'overlay-padding', + type: t.size, + triggersBounds: diff.any + }, { + name: 'overlay-color', + type: t.color + }, { + name: 'overlay-opacity', + type: t.zeroOneNumber, + triggersBounds: diff.zeroNonZero + }, { + name: 'overlay-shape', + type: t.overlayShape, + triggersBounds: diff.any + }]; + var underlay = [{ + name: 'underlay-padding', + type: t.size, + triggersBounds: diff.any + }, { + name: 'underlay-color', + type: t.color + }, { + name: 'underlay-opacity', + type: t.zeroOneNumber, + triggersBounds: diff.zeroNonZero + }, { + name: 'underlay-shape', + type: t.overlayShape, + triggersBounds: diff.any + }]; + var transition = [{ + name: 'transition-property', + type: t.propList + }, { + name: 'transition-duration', + type: t.time + }, { + name: 'transition-delay', + type: t.time + }, { + name: 'transition-timing-function', + type: t.easing + }]; + var nodeSizeHashOverride = function nodeSizeHashOverride(ele, parsedProp) { + if (parsedProp.value === 'label') { + return -ele.poolIndex(); // no hash key hits is using label size (hitrate for perf probably low anyway) + } else { + return parsedProp.pfValue; + } + }; + var nodeBody = [{ + name: 'height', + type: t.nodeSize, + triggersBounds: diff.any, + hashOverride: nodeSizeHashOverride + }, { + name: 'width', + type: t.nodeSize, + triggersBounds: diff.any, + hashOverride: nodeSizeHashOverride + }, { + name: 'shape', + type: t.nodeShape, + triggersBounds: diff.any + }, { + name: 'shape-polygon-points', + type: t.polygonPointList, + triggersBounds: diff.any + }, { + name: 'background-color', + type: t.color + }, { + name: 'background-fill', + type: t.fill + }, { + name: 'background-opacity', + type: t.zeroOneNumber + }, { + name: 'background-blacken', + type: t.nOneOneNumber + }, { + name: 'background-gradient-stop-colors', + type: t.colors + }, { + name: 'background-gradient-stop-positions', + type: t.percentages + }, { + name: 'background-gradient-direction', + type: t.gradientDirection + }, { + name: 'padding', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'padding-relative-to', + type: t.paddingRelativeTo, + triggersBounds: diff.any + }, { + name: 'bounds-expansion', + type: t.boundsExpansion, + triggersBounds: diff.any + }]; + var nodeBorder = [{ + name: 'border-color', + type: t.color + }, { + name: 'border-opacity', + type: t.zeroOneNumber + }, { + name: 'border-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'border-style', + type: t.borderStyle + }]; + var nodeOutline = [{ + name: 'outline-color', + type: t.color + }, { + name: 'outline-opacity', + type: t.zeroOneNumber + }, { + name: 'outline-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'outline-style', + type: t.borderStyle + }, { + name: 'outline-offset', + type: t.size, + triggersBounds: diff.any + }]; + var backgroundImage = [{ + name: 'background-image', + type: t.urls + }, { + name: 'background-image-crossorigin', + type: t.bgCrossOrigin + }, { + name: 'background-image-opacity', + type: t.zeroOneNumbers + }, { + name: 'background-image-containment', + type: t.bgContainment + }, { + name: 'background-image-smoothing', + type: t.bools + }, { + name: 'background-position-x', + type: t.bgPos + }, { + name: 'background-position-y', + type: t.bgPos + }, { + name: 'background-width-relative-to', + type: t.bgRelativeTo + }, { + name: 'background-height-relative-to', + type: t.bgRelativeTo + }, { + name: 'background-repeat', + type: t.bgRepeat + }, { + name: 'background-fit', + type: t.bgFit + }, { + name: 'background-clip', + type: t.bgClip + }, { + name: 'background-width', + type: t.bgWH + }, { + name: 'background-height', + type: t.bgWH + }, { + name: 'background-offset-x', + type: t.bgPos + }, { + name: 'background-offset-y', + type: t.bgPos + }]; + var compound = [{ + name: 'position', + type: t.position, + triggersBounds: diff.any + }, { + name: 'compound-sizing-wrt-labels', + type: t.compoundIncludeLabels, + triggersBounds: diff.any + }, { + name: 'min-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'min-width-bias-left', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'min-width-bias-right', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'min-height', + type: t.size, + triggersBounds: diff.any + }, { + name: 'min-height-bias-top', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'min-height-bias-bottom', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }]; + var edgeLine = [{ + name: 'line-style', + type: t.lineStyle + }, { + name: 'line-color', + type: t.color + }, { + name: 'line-fill', + type: t.fill + }, { + name: 'line-cap', + type: t.lineCap + }, { + name: 'line-opacity', + type: t.zeroOneNumber + }, { + name: 'line-dash-pattern', + type: t.numbers + }, { + name: 'line-dash-offset', + type: t.number + }, { + name: 'line-gradient-stop-colors', + type: t.colors + }, { + name: 'line-gradient-stop-positions', + type: t.percentages + }, { + name: 'curve-style', + type: t.curveStyle, + triggersBounds: diff.any, + triggersBoundsOfParallelBeziers: true + }, { + name: 'haystack-radius', + type: t.zeroOneNumber, + triggersBounds: diff.any + }, { + name: 'source-endpoint', + type: t.edgeEndpoint, + triggersBounds: diff.any + }, { + name: 'target-endpoint', + type: t.edgeEndpoint, + triggersBounds: diff.any + }, { + name: 'control-point-step-size', + type: t.size, + triggersBounds: diff.any + }, { + name: 'control-point-distances', + type: t.bidirectionalSizes, + triggersBounds: diff.any + }, { + name: 'control-point-weights', + type: t.numbers, + triggersBounds: diff.any + }, { + name: 'segment-distances', + type: t.bidirectionalSizes, + triggersBounds: diff.any + }, { + name: 'segment-weights', + type: t.numbers, + triggersBounds: diff.any + }, { + name: 'taxi-turn', + type: t.bidirectionalSizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'taxi-turn-min-distance', + type: t.size, + triggersBounds: diff.any + }, { + name: 'taxi-direction', + type: t.axisDirection, + triggersBounds: diff.any + }, { + name: 'edge-distances', + type: t.edgeDistances, + triggersBounds: diff.any + }, { + name: 'arrow-scale', + type: t.positiveNumber, + triggersBounds: diff.any + }, { + name: 'loop-direction', + type: t.angle, + triggersBounds: diff.any + }, { + name: 'loop-sweep', + type: t.angle, + triggersBounds: diff.any + }, { + name: 'source-distance-from-node', + type: t.size, + triggersBounds: diff.any + }, { + name: 'target-distance-from-node', + type: t.size, + triggersBounds: diff.any + }]; + var ghost = [{ + name: 'ghost', + type: t.bool, + triggersBounds: diff.any + }, { + name: 'ghost-offset-x', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'ghost-offset-y', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'ghost-opacity', + type: t.zeroOneNumber + }]; + var core = [{ + name: 'selection-box-color', + type: t.color + }, { + name: 'selection-box-opacity', + type: t.zeroOneNumber + }, { + name: 'selection-box-border-color', + type: t.color + }, { + name: 'selection-box-border-width', + type: t.size + }, { + name: 'active-bg-color', + type: t.color + }, { + name: 'active-bg-opacity', + type: t.zeroOneNumber + }, { + name: 'active-bg-size', + type: t.size + }, { + name: 'outside-texture-bg-color', + type: t.color + }, { + name: 'outside-texture-bg-opacity', + type: t.zeroOneNumber + }]; + + // pie backgrounds for nodes + var pie = []; + styfn$2.pieBackgroundN = 16; // because the pie properties are numbered, give access to a constant N (for renderer use) + pie.push({ + name: 'pie-size', + type: t.sizeMaybePercent + }); + for (var i = 1; i <= styfn$2.pieBackgroundN; i++) { + pie.push({ + name: 'pie-' + i + '-background-color', + type: t.color + }); + pie.push({ + name: 'pie-' + i + '-background-size', + type: t.percent + }); + pie.push({ + name: 'pie-' + i + '-background-opacity', + type: t.zeroOneNumber + }); + } + + // edge arrows + var edgeArrow = []; + var arrowPrefixes = styfn$2.arrowPrefixes = ['source', 'mid-source', 'target', 'mid-target']; + [{ + name: 'arrow-shape', + type: t.arrowShape, + triggersBounds: diff.any + }, { + name: 'arrow-color', + type: t.color + }, { + name: 'arrow-fill', + type: t.arrowFill + }, { + name: 'arrow-width', + type: t.arrowWidth + }].forEach(function (prop) { + arrowPrefixes.forEach(function (prefix) { + var name = prefix + '-' + prop.name; + var type = prop.type, + triggersBounds = prop.triggersBounds; + edgeArrow.push({ + name: name, + type: type, + triggersBounds: triggersBounds + }); + }); + }, {}); + var props = styfn$2.properties = [].concat(behavior, transition, visibility, overlay, underlay, ghost, commonLabel, labelDimensions, mainLabel, sourceLabel, targetLabel, nodeBody, nodeBorder, nodeOutline, backgroundImage, pie, compound, edgeLine, edgeArrow, core); + var propGroups = styfn$2.propertyGroups = { + // common to all eles + behavior: behavior, + transition: transition, + visibility: visibility, + overlay: overlay, + underlay: underlay, + ghost: ghost, + // labels + commonLabel: commonLabel, + labelDimensions: labelDimensions, + mainLabel: mainLabel, + sourceLabel: sourceLabel, + targetLabel: targetLabel, + // node props + nodeBody: nodeBody, + nodeBorder: nodeBorder, + nodeOutline: nodeOutline, + backgroundImage: backgroundImage, + pie: pie, + compound: compound, + // edge props + edgeLine: edgeLine, + edgeArrow: edgeArrow, + core: core + }; + var propGroupNames = styfn$2.propertyGroupNames = {}; + var propGroupKeys = styfn$2.propertyGroupKeys = Object.keys(propGroups); + propGroupKeys.forEach(function (key) { + propGroupNames[key] = propGroups[key].map(function (prop) { + return prop.name; + }); + propGroups[key].forEach(function (prop) { + return prop.groupKey = key; + }); + }); + + // define aliases + var aliases = styfn$2.aliases = [{ + name: 'content', + pointsTo: 'label' + }, { + name: 'control-point-distance', + pointsTo: 'control-point-distances' + }, { + name: 'control-point-weight', + pointsTo: 'control-point-weights' + }, { + name: 'edge-text-rotation', + pointsTo: 'text-rotation' + }, { + name: 'padding-left', + pointsTo: 'padding' + }, { + name: 'padding-right', + pointsTo: 'padding' + }, { + name: 'padding-top', + pointsTo: 'padding' + }, { + name: 'padding-bottom', + pointsTo: 'padding' + }]; + + // list of property names + styfn$2.propertyNames = props.map(function (p) { + return p.name; + }); + + // allow access of properties by name ( e.g. style.properties.height ) + for (var _i = 0; _i < props.length; _i++) { + var prop = props[_i]; + props[prop.name] = prop; // allow lookup by name + } + + // map aliases + for (var _i2 = 0; _i2 < aliases.length; _i2++) { + var alias = aliases[_i2]; + var pointsToProp = props[alias.pointsTo]; + var aliasProp = { + name: alias.name, + alias: true, + pointsTo: pointsToProp + }; + + // add alias prop for parsing + props.push(aliasProp); + props[alias.name] = aliasProp; // allow lookup by name + } +})(); + +styfn$2.getDefaultProperty = function (name) { + return this.getDefaultProperties()[name]; +}; +styfn$2.getDefaultProperties = function () { + var _p = this._private; + if (_p.defaultProperties != null) { + return _p.defaultProperties; + } + var rawProps = extend({ + // core props + 'selection-box-color': '#ddd', + 'selection-box-opacity': 0.65, + 'selection-box-border-color': '#aaa', + 'selection-box-border-width': 1, + 'active-bg-color': 'black', + 'active-bg-opacity': 0.15, + 'active-bg-size': 30, + 'outside-texture-bg-color': '#000', + 'outside-texture-bg-opacity': 0.125, + // common node/edge props + 'events': 'yes', + 'text-events': 'no', + 'text-valign': 'top', + 'text-halign': 'center', + 'text-justification': 'auto', + 'line-height': 1, + 'color': '#000', + 'text-outline-color': '#000', + 'text-outline-width': 0, + 'text-outline-opacity': 1, + 'text-opacity': 1, + 'text-decoration': 'none', + 'text-transform': 'none', + 'text-wrap': 'none', + 'text-overflow-wrap': 'whitespace', + 'text-max-width': 9999, + 'text-background-color': '#000', + 'text-background-opacity': 0, + 'text-background-shape': 'rectangle', + 'text-background-padding': 0, + 'text-border-opacity': 0, + 'text-border-width': 0, + 'text-border-style': 'solid', + 'text-border-color': '#000', + 'font-family': 'Helvetica Neue, Helvetica, sans-serif', + 'font-style': 'normal', + 'font-weight': 'normal', + 'font-size': 16, + 'min-zoomed-font-size': 0, + 'text-rotation': 'none', + 'source-text-rotation': 'none', + 'target-text-rotation': 'none', + 'visibility': 'visible', + 'display': 'element', + 'opacity': 1, + 'z-compound-depth': 'auto', + 'z-index-compare': 'auto', + 'z-index': 0, + 'label': '', + 'text-margin-x': 0, + 'text-margin-y': 0, + 'source-label': '', + 'source-text-offset': 0, + 'source-text-margin-x': 0, + 'source-text-margin-y': 0, + 'target-label': '', + 'target-text-offset': 0, + 'target-text-margin-x': 0, + 'target-text-margin-y': 0, + 'overlay-opacity': 0, + 'overlay-color': '#000', + 'overlay-padding': 10, + 'overlay-shape': 'round-rectangle', + 'underlay-opacity': 0, + 'underlay-color': '#000', + 'underlay-padding': 10, + 'underlay-shape': 'round-rectangle', + 'transition-property': 'none', + 'transition-duration': 0, + 'transition-delay': 0, + 'transition-timing-function': 'linear', + // node props + 'background-blacken': 0, + 'background-color': '#999', + 'background-fill': 'solid', + 'background-opacity': 1, + 'background-image': 'none', + 'background-image-crossorigin': 'anonymous', + 'background-image-opacity': 1, + 'background-image-containment': 'inside', + 'background-image-smoothing': 'yes', + 'background-position-x': '50%', + 'background-position-y': '50%', + 'background-offset-x': 0, + 'background-offset-y': 0, + 'background-width-relative-to': 'include-padding', + 'background-height-relative-to': 'include-padding', + 'background-repeat': 'no-repeat', + 'background-fit': 'none', + 'background-clip': 'node', + 'background-width': 'auto', + 'background-height': 'auto', + 'border-color': '#000', + 'border-opacity': 1, + 'border-width': 0, + 'border-style': 'solid', + 'outline-color': '#999', + 'outline-opacity': 1, + 'outline-width': 0, + 'outline-offset': 0, + 'outline-style': 'solid', + 'height': 30, + 'width': 30, + 'shape': 'ellipse', + 'shape-polygon-points': '-1, -1, 1, -1, 1, 1, -1, 1', + 'bounds-expansion': 0, + // node gradient + 'background-gradient-direction': 'to-bottom', + 'background-gradient-stop-colors': '#999', + 'background-gradient-stop-positions': '0%', + // ghost props + 'ghost': 'no', + 'ghost-offset-y': 0, + 'ghost-offset-x': 0, + 'ghost-opacity': 0, + // compound props + 'padding': 0, + 'padding-relative-to': 'width', + 'position': 'origin', + 'compound-sizing-wrt-labels': 'include', + 'min-width': 0, + 'min-width-bias-left': 0, + 'min-width-bias-right': 0, + 'min-height': 0, + 'min-height-bias-top': 0, + 'min-height-bias-bottom': 0 + }, { + // node pie bg + 'pie-size': '100%' + }, [{ + name: 'pie-{{i}}-background-color', + value: 'black' + }, { + name: 'pie-{{i}}-background-size', + value: '0%' + }, { + name: 'pie-{{i}}-background-opacity', + value: 1 + }].reduce(function (css, prop) { + for (var i = 1; i <= styfn$2.pieBackgroundN; i++) { + var name = prop.name.replace('{{i}}', i); + var val = prop.value; + css[name] = val; + } + return css; + }, {}), { + // edge props + 'line-style': 'solid', + 'line-color': '#999', + 'line-fill': 'solid', + 'line-cap': 'butt', + 'line-opacity': 1, + 'line-gradient-stop-colors': '#999', + 'line-gradient-stop-positions': '0%', + 'control-point-step-size': 40, + 'control-point-weights': 0.5, + 'segment-weights': 0.5, + 'segment-distances': 20, + 'taxi-turn': '50%', + 'taxi-turn-min-distance': 10, + 'taxi-direction': 'auto', + 'edge-distances': 'intersection', + 'curve-style': 'haystack', + 'haystack-radius': 0, + 'arrow-scale': 1, + 'loop-direction': '-45deg', + 'loop-sweep': '-90deg', + 'source-distance-from-node': 0, + 'target-distance-from-node': 0, + 'source-endpoint': 'outside-to-node', + 'target-endpoint': 'outside-to-node', + 'line-dash-pattern': [6, 3], + 'line-dash-offset': 0 + }, [{ + name: 'arrow-shape', + value: 'none' + }, { + name: 'arrow-color', + value: '#999' + }, { + name: 'arrow-fill', + value: 'filled' + }, { + name: 'arrow-width', + value: 1 + }].reduce(function (css, prop) { + styfn$2.arrowPrefixes.forEach(function (prefix) { + var name = prefix + '-' + prop.name; + var val = prop.value; + css[name] = val; + }); + return css; + }, {})); + var parsedProps = {}; + for (var i = 0; i < this.properties.length; i++) { + var prop = this.properties[i]; + if (prop.pointsTo) { + continue; + } + var name = prop.name; + var val = rawProps[name]; + var parsedProp = this.parse(name, val); + parsedProps[name] = parsedProp; + } + _p.defaultProperties = parsedProps; + return _p.defaultProperties; +}; +styfn$2.addDefaultStylesheet = function () { + this.selector(':parent').css({ + 'shape': 'rectangle', + 'padding': 10, + 'background-color': '#eee', + 'border-color': '#ccc', + 'border-width': 1 + }).selector('edge').css({ + 'width': 3 + }).selector(':loop').css({ + 'curve-style': 'bezier' + }).selector('edge:compound').css({ + 'curve-style': 'bezier', + 'source-endpoint': 'outside-to-line', + 'target-endpoint': 'outside-to-line' + }).selector(':selected').css({ + 'background-color': '#0169D9', + 'line-color': '#0169D9', + 'source-arrow-color': '#0169D9', + 'target-arrow-color': '#0169D9', + 'mid-source-arrow-color': '#0169D9', + 'mid-target-arrow-color': '#0169D9' + }).selector(':parent:selected').css({ + 'background-color': '#CCE1F9', + 'border-color': '#aec8e5' + }).selector(':active').css({ + 'overlay-color': 'black', + 'overlay-padding': 10, + 'overlay-opacity': 0.25 + }); + this.defaultLength = this.length; +}; + +var styfn$1 = {}; + +// a caching layer for property parsing +styfn$1.parse = function (name, value, propIsBypass, propIsFlat) { + var self = this; + + // function values can't be cached in all cases, and there isn't much benefit of caching them anyway + if (fn$6(value)) { + return self.parseImplWarn(name, value, propIsBypass, propIsFlat); + } + var flatKey = propIsFlat === 'mapping' || propIsFlat === true || propIsFlat === false || propIsFlat == null ? 'dontcare' : propIsFlat; + var bypassKey = propIsBypass ? 't' : 'f'; + var valueKey = '' + value; + var argHash = hashStrings(name, valueKey, bypassKey, flatKey); + var propCache = self.propCache = self.propCache || []; + var ret; + if (!(ret = propCache[argHash])) { + ret = propCache[argHash] = self.parseImplWarn(name, value, propIsBypass, propIsFlat); + } + + // - bypasses can't be shared b/c the value can be changed by animations or otherwise overridden + // - mappings can't be shared b/c mappings are per-element + if (propIsBypass || propIsFlat === 'mapping') { + // need a copy since props are mutated later in their lifecycles + ret = copy(ret); + if (ret) { + ret.value = copy(ret.value); // because it could be an array, e.g. colour + } + } + + return ret; +}; +styfn$1.parseImplWarn = function (name, value, propIsBypass, propIsFlat) { + var prop = this.parseImpl(name, value, propIsBypass, propIsFlat); + if (!prop && value != null) { + warn("The style property `".concat(name, ": ").concat(value, "` is invalid")); + } + if (prop && (prop.name === 'width' || prop.name === 'height') && value === 'label') { + warn('The style value of `label` is deprecated for `' + prop.name + '`'); + } + return prop; +}; + +// parse a property; return null on invalid; return parsed property otherwise +// fields : +// - name : the name of the property +// - value : the parsed, native-typed value of the property +// - strValue : a string value that represents the property value in valid css +// - bypass : true iff the property is a bypass property +styfn$1.parseImpl = function (name, value, propIsBypass, propIsFlat) { + var self = this; + name = camel2dash(name); // make sure the property name is in dash form (e.g. 'property-name' not 'propertyName') + + var property = self.properties[name]; + var passedValue = value; + var types = self.types; + if (!property) { + return null; + } // return null on property of unknown name + if (value === undefined) { + return null; + } // can't assign undefined + + // the property may be an alias + if (property.alias) { + property = property.pointsTo; + name = property.name; + } + var valueIsString = string(value); + if (valueIsString) { + // trim the value to make parsing easier + value = value.trim(); + } + var type = property.type; + if (!type) { + return null; + } // no type, no luck + + // check if bypass is null or empty string (i.e. indication to delete bypass property) + if (propIsBypass && (value === '' || value === null)) { + return { + name: name, + value: value, + bypass: true, + deleteBypass: true + }; + } + + // check if value is a function used as a mapper + if (fn$6(value)) { + return { + name: name, + value: value, + strValue: 'fn', + mapped: types.fn, + bypass: propIsBypass + }; + } + + // check if value is mapped + var data, mapData; + if (!valueIsString || propIsFlat || value.length < 7 || value[1] !== 'a') ; else if (value.length >= 7 && value[0] === 'd' && (data = new RegExp(types.data.regex).exec(value))) { + if (propIsBypass) { + return false; + } // mappers not allowed in bypass + + var mapped = types.data; + return { + name: name, + value: data, + strValue: '' + value, + mapped: mapped, + field: data[1], + bypass: propIsBypass + }; + } else if (value.length >= 10 && value[0] === 'm' && (mapData = new RegExp(types.mapData.regex).exec(value))) { + if (propIsBypass) { + return false; + } // mappers not allowed in bypass + if (type.multiple) { + return false; + } // impossible to map to num + + var _mapped = types.mapData; + + // we can map only if the type is a colour or a number + if (!(type.color || type.number)) { + return false; + } + var valueMin = this.parse(name, mapData[4]); // parse to validate + if (!valueMin || valueMin.mapped) { + return false; + } // can't be invalid or mapped + + var valueMax = this.parse(name, mapData[5]); // parse to validate + if (!valueMax || valueMax.mapped) { + return false; + } // can't be invalid or mapped + + // check if valueMin and valueMax are the same + if (valueMin.pfValue === valueMax.pfValue || valueMin.strValue === valueMax.strValue) { + warn('`' + name + ': ' + value + '` is not a valid mapper because the output range is zero; converting to `' + name + ': ' + valueMin.strValue + '`'); + return this.parse(name, valueMin.strValue); // can't make much of a mapper without a range + } else if (type.color) { + var c1 = valueMin.value; + var c2 = valueMax.value; + var same = c1[0] === c2[0] // red + && c1[1] === c2[1] // green + && c1[2] === c2[2] // blue + && ( + // optional alpha + c1[3] === c2[3] // same alpha outright + || (c1[3] == null || c1[3] === 1 // full opacity for colour 1? + ) && (c2[3] == null || c2[3] === 1) // full opacity for colour 2? + ); + + if (same) { + return false; + } // can't make a mapper without a range + } + + return { + name: name, + value: mapData, + strValue: '' + value, + mapped: _mapped, + field: mapData[1], + fieldMin: parseFloat(mapData[2]), + // min & max are numeric + fieldMax: parseFloat(mapData[3]), + valueMin: valueMin.value, + valueMax: valueMax.value, + bypass: propIsBypass + }; + } + if (type.multiple && propIsFlat !== 'multiple') { + var vals; + if (valueIsString) { + vals = value.split(/\s+/); + } else if (array(value)) { + vals = value; + } else { + vals = [value]; + } + if (type.evenMultiple && vals.length % 2 !== 0) { + return null; + } + var valArr = []; + var unitsArr = []; + var pfValArr = []; + var strVal = ''; + var hasEnum = false; + for (var i = 0; i < vals.length; i++) { + var p = self.parse(name, vals[i], propIsBypass, 'multiple'); + hasEnum = hasEnum || string(p.value); + valArr.push(p.value); + pfValArr.push(p.pfValue != null ? p.pfValue : p.value); + unitsArr.push(p.units); + strVal += (i > 0 ? ' ' : '') + p.strValue; + } + if (type.validate && !type.validate(valArr, unitsArr)) { + return null; + } + if (type.singleEnum && hasEnum) { + if (valArr.length === 1 && string(valArr[0])) { + return { + name: name, + value: valArr[0], + strValue: valArr[0], + bypass: propIsBypass + }; + } else { + return null; + } + } + return { + name: name, + value: valArr, + pfValue: pfValArr, + strValue: strVal, + bypass: propIsBypass, + units: unitsArr + }; + } + + // several types also allow enums + var checkEnums = function checkEnums() { + for (var _i = 0; _i < type.enums.length; _i++) { + var en = type.enums[_i]; + if (en === value) { + return { + name: name, + value: value, + strValue: '' + value, + bypass: propIsBypass + }; + } + } + return null; + }; + + // check the type and return the appropriate object + if (type.number) { + var units; + var implicitUnits = 'px'; // not set => px + + if (type.units) { + // use specified units if set + units = type.units; + } + if (type.implicitUnits) { + implicitUnits = type.implicitUnits; + } + if (!type.unitless) { + if (valueIsString) { + var unitsRegex = 'px|em' + (type.allowPercent ? '|\\%' : ''); + if (units) { + unitsRegex = units; + } // only allow explicit units if so set + var match = value.match('^(' + number + ')(' + unitsRegex + ')?' + '$'); + if (match) { + value = match[1]; + units = match[2] || implicitUnits; + } + } else if (!units || type.implicitUnits) { + units = implicitUnits; // implicitly px if unspecified + } + } + + value = parseFloat(value); + + // if not a number and enums not allowed, then the value is invalid + if (isNaN(value) && type.enums === undefined) { + return null; + } + + // check if this number type also accepts special keywords in place of numbers + // (i.e. `left`, `auto`, etc) + if (isNaN(value) && type.enums !== undefined) { + value = passedValue; + return checkEnums(); + } + + // check if value must be an integer + if (type.integer && !integer(value)) { + return null; + } + + // check value is within range + if (type.min !== undefined && (value < type.min || type.strictMin && value === type.min) || type.max !== undefined && (value > type.max || type.strictMax && value === type.max)) { + return null; + } + var ret = { + name: name, + value: value, + strValue: '' + value + (units ? units : ''), + units: units, + bypass: propIsBypass + }; + + // normalise value in pixels + if (type.unitless || units !== 'px' && units !== 'em') { + ret.pfValue = value; + } else { + ret.pfValue = units === 'px' || !units ? value : this.getEmSizeInPixels() * value; + } + + // normalise value in ms + if (units === 'ms' || units === 's') { + ret.pfValue = units === 'ms' ? value : 1000 * value; + } + + // normalise value in rad + if (units === 'deg' || units === 'rad') { + ret.pfValue = units === 'rad' ? value : deg2rad(value); + } + + // normalize value in % + if (units === '%') { + ret.pfValue = value / 100; + } + return ret; + } else if (type.propList) { + var props = []; + var propsStr = '' + value; + if (propsStr === 'none') ; else { + // go over each prop + + var propsSplit = propsStr.split(/\s*,\s*|\s+/); + for (var _i2 = 0; _i2 < propsSplit.length; _i2++) { + var propName = propsSplit[_i2].trim(); + if (self.properties[propName]) { + props.push(propName); + } else { + warn('`' + propName + '` is not a valid property name'); + } + } + if (props.length === 0) { + return null; + } + } + return { + name: name, + value: props, + strValue: props.length === 0 ? 'none' : props.join(' '), + bypass: propIsBypass + }; + } else if (type.color) { + var tuple = color2tuple(value); + if (!tuple) { + return null; + } + return { + name: name, + value: tuple, + pfValue: tuple, + strValue: 'rgb(' + tuple[0] + ',' + tuple[1] + ',' + tuple[2] + ')', + // n.b. no spaces b/c of multiple support + bypass: propIsBypass + }; + } else if (type.regex || type.regexes) { + // first check enums + if (type.enums) { + var enumProp = checkEnums(); + if (enumProp) { + return enumProp; + } + } + var regexes = type.regexes ? type.regexes : [type.regex]; + for (var _i3 = 0; _i3 < regexes.length; _i3++) { + var regex = new RegExp(regexes[_i3]); // make a regex from the type string + var m = regex.exec(value); + if (m) { + // regex matches + return { + name: name, + value: type.singleRegexMatchValue ? m[1] : m, + strValue: '' + value, + bypass: propIsBypass + }; + } + } + return null; // didn't match any + } else if (type.string) { + // just return + return { + name: name, + value: '' + value, + strValue: '' + value, + bypass: propIsBypass + }; + } else if (type.enums) { + // check enums last because it's a combo type in others + return checkEnums(); + } else { + return null; // not a type we can handle + } +}; + +var Style = function Style(cy) { + if (!(this instanceof Style)) { + return new Style(cy); + } + if (!core(cy)) { + error('A style must have a core reference'); + return; + } + this._private = { + cy: cy, + coreStyle: {} + }; + this.length = 0; + this.resetToDefault(); +}; +var styfn = Style.prototype; +styfn.instanceString = function () { + return 'style'; +}; + +// remove all contexts +styfn.clear = function () { + var _p = this._private; + var cy = _p.cy; + var eles = cy.elements(); + for (var i = 0; i < this.length; i++) { + this[i] = undefined; + } + this.length = 0; + _p.contextStyles = {}; + _p.propDiffs = {}; + this.cleanElements(eles, true); + eles.forEach(function (ele) { + var ele_p = ele[0]._private; + ele_p.styleDirty = true; + ele_p.appliedInitStyle = false; + }); + return this; // chaining +}; + +styfn.resetToDefault = function () { + this.clear(); + this.addDefaultStylesheet(); + return this; +}; + +// builds a style object for the 'core' selector +styfn.core = function (propName) { + return this._private.coreStyle[propName] || this.getDefaultProperty(propName); +}; + +// create a new context from the specified selector string and switch to that context +styfn.selector = function (selectorStr) { + // 'core' is a special case and does not need a selector + var selector = selectorStr === 'core' ? null : new Selector(selectorStr); + var i = this.length++; // new context means new index + this[i] = { + selector: selector, + properties: [], + mappedProperties: [], + index: i + }; + return this; // chaining +}; + +// add one or many css rules to the current context +styfn.css = function () { + var self = this; + var args = arguments; + if (args.length === 1) { + var map = args[0]; + for (var i = 0; i < self.properties.length; i++) { + var prop = self.properties[i]; + var mapVal = map[prop.name]; + if (mapVal === undefined) { + mapVal = map[dash2camel(prop.name)]; + } + if (mapVal !== undefined) { + this.cssRule(prop.name, mapVal); + } + } + } else if (args.length === 2) { + this.cssRule(args[0], args[1]); + } + + // do nothing if args are invalid + + return this; // chaining +}; + +styfn.style = styfn.css; + +// add a single css rule to the current context +styfn.cssRule = function (name, value) { + // name-value pair + var property = this.parse(name, value); + + // add property to current context if valid + if (property) { + var i = this.length - 1; + this[i].properties.push(property); + this[i].properties[property.name] = property; // allow access by name as well + + if (property.name.match(/pie-(\d+)-background-size/) && property.value) { + this._private.hasPie = true; + } + if (property.mapped) { + this[i].mappedProperties.push(property); + } + + // add to core style if necessary + var currentSelectorIsCore = !this[i].selector; + if (currentSelectorIsCore) { + this._private.coreStyle[property.name] = property; + } + } + return this; // chaining +}; + +styfn.append = function (style) { + if (stylesheet(style)) { + style.appendToStyle(this); + } else if (array(style)) { + this.appendFromJson(style); + } else if (string(style)) { + this.appendFromString(style); + } // you probably wouldn't want to append a Style, since you'd duplicate the default parts + + return this; +}; + +// static function +Style.fromJson = function (cy, json) { + var style = new Style(cy); + style.fromJson(json); + return style; +}; +Style.fromString = function (cy, string) { + return new Style(cy).fromString(string); +}; +[styfn$8, styfn$7, styfn$6, styfn$5, styfn$4, styfn$3, styfn$2, styfn$1].forEach(function (props) { + extend(styfn, props); +}); +Style.types = styfn.types; +Style.properties = styfn.properties; +Style.propertyGroups = styfn.propertyGroups; +Style.propertyGroupNames = styfn.propertyGroupNames; +Style.propertyGroupKeys = styfn.propertyGroupKeys; + +var corefn$2 = { + style: function style(newStyle) { + if (newStyle) { + var s = this.setStyle(newStyle); + s.update(); + } + return this._private.style; + }, + setStyle: function setStyle(style) { + var _p = this._private; + if (stylesheet(style)) { + _p.style = style.generateStyle(this); + } else if (array(style)) { + _p.style = Style.fromJson(this, style); + } else if (string(style)) { + _p.style = Style.fromString(this, style); + } else { + _p.style = Style(this); + } + return _p.style; + }, + // e.g. cy.data() changed => recalc ele mappers + updateStyle: function updateStyle() { + this.mutableElements().updateStyle(); // just send to all eles + } +}; + +var defaultSelectionType = 'single'; +var corefn$1 = { + autolock: function autolock(bool) { + if (bool !== undefined) { + this._private.autolock = bool ? true : false; + } else { + return this._private.autolock; + } + return this; // chaining + }, + + autoungrabify: function autoungrabify(bool) { + if (bool !== undefined) { + this._private.autoungrabify = bool ? true : false; + } else { + return this._private.autoungrabify; + } + return this; // chaining + }, + + autounselectify: function autounselectify(bool) { + if (bool !== undefined) { + this._private.autounselectify = bool ? true : false; + } else { + return this._private.autounselectify; + } + return this; // chaining + }, + + selectionType: function selectionType(selType) { + var _p = this._private; + if (_p.selectionType == null) { + _p.selectionType = defaultSelectionType; + } + if (selType !== undefined) { + if (selType === 'additive' || selType === 'single') { + _p.selectionType = selType; + } + } else { + return _p.selectionType; + } + return this; + }, + panningEnabled: function panningEnabled(bool) { + if (bool !== undefined) { + this._private.panningEnabled = bool ? true : false; + } else { + return this._private.panningEnabled; + } + return this; // chaining + }, + + userPanningEnabled: function userPanningEnabled(bool) { + if (bool !== undefined) { + this._private.userPanningEnabled = bool ? true : false; + } else { + return this._private.userPanningEnabled; + } + return this; // chaining + }, + + zoomingEnabled: function zoomingEnabled(bool) { + if (bool !== undefined) { + this._private.zoomingEnabled = bool ? true : false; + } else { + return this._private.zoomingEnabled; + } + return this; // chaining + }, + + userZoomingEnabled: function userZoomingEnabled(bool) { + if (bool !== undefined) { + this._private.userZoomingEnabled = bool ? true : false; + } else { + return this._private.userZoomingEnabled; + } + return this; // chaining + }, + + boxSelectionEnabled: function boxSelectionEnabled(bool) { + if (bool !== undefined) { + this._private.boxSelectionEnabled = bool ? true : false; + } else { + return this._private.boxSelectionEnabled; + } + return this; // chaining + }, + + pan: function pan() { + var args = arguments; + var pan = this._private.pan; + var dim, val, dims, x, y; + switch (args.length) { + case 0: + // .pan() + return pan; + case 1: + if (string(args[0])) { + // .pan('x') + dim = args[0]; + return pan[dim]; + } else if (plainObject(args[0])) { + // .pan({ x: 0, y: 100 }) + if (!this._private.panningEnabled) { + return this; + } + dims = args[0]; + x = dims.x; + y = dims.y; + if (number$1(x)) { + pan.x = x; + } + if (number$1(y)) { + pan.y = y; + } + this.emit('pan viewport'); + } + break; + case 2: + // .pan('x', 100) + if (!this._private.panningEnabled) { + return this; + } + dim = args[0]; + val = args[1]; + if ((dim === 'x' || dim === 'y') && number$1(val)) { + pan[dim] = val; + } + this.emit('pan viewport'); + break; + // invalid + } + + this.notify('viewport'); + return this; // chaining + }, + + panBy: function panBy(arg0, arg1) { + var args = arguments; + var pan = this._private.pan; + var dim, val, dims, x, y; + if (!this._private.panningEnabled) { + return this; + } + switch (args.length) { + case 1: + if (plainObject(arg0)) { + // .panBy({ x: 0, y: 100 }) + dims = args[0]; + x = dims.x; + y = dims.y; + if (number$1(x)) { + pan.x += x; + } + if (number$1(y)) { + pan.y += y; + } + this.emit('pan viewport'); + } + break; + case 2: + // .panBy('x', 100) + dim = arg0; + val = arg1; + if ((dim === 'x' || dim === 'y') && number$1(val)) { + pan[dim] += val; + } + this.emit('pan viewport'); + break; + // invalid + } + + this.notify('viewport'); + return this; // chaining + }, + + fit: function fit(elements, padding) { + var viewportState = this.getFitViewport(elements, padding); + if (viewportState) { + var _p = this._private; + _p.zoom = viewportState.zoom; + _p.pan = viewportState.pan; + this.emit('pan zoom viewport'); + this.notify('viewport'); + } + return this; // chaining + }, + + getFitViewport: function getFitViewport(elements, padding) { + if (number$1(elements) && padding === undefined) { + // elements is optional + padding = elements; + elements = undefined; + } + if (!this._private.panningEnabled || !this._private.zoomingEnabled) { + return; + } + var bb; + if (string(elements)) { + var sel = elements; + elements = this.$(sel); + } else if (boundingBox(elements)) { + // assume bb + var bbe = elements; + bb = { + x1: bbe.x1, + y1: bbe.y1, + x2: bbe.x2, + y2: bbe.y2 + }; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + } else if (!elementOrCollection(elements)) { + elements = this.mutableElements(); + } + if (elementOrCollection(elements) && elements.empty()) { + return; + } // can't fit to nothing + + bb = bb || elements.boundingBox(); + var w = this.width(); + var h = this.height(); + var zoom; + padding = number$1(padding) ? padding : 0; + if (!isNaN(w) && !isNaN(h) && w > 0 && h > 0 && !isNaN(bb.w) && !isNaN(bb.h) && bb.w > 0 && bb.h > 0) { + zoom = Math.min((w - 2 * padding) / bb.w, (h - 2 * padding) / bb.h); + + // crop zoom + zoom = zoom > this._private.maxZoom ? this._private.maxZoom : zoom; + zoom = zoom < this._private.minZoom ? this._private.minZoom : zoom; + var pan = { + // now pan to middle + x: (w - zoom * (bb.x1 + bb.x2)) / 2, + y: (h - zoom * (bb.y1 + bb.y2)) / 2 + }; + return { + zoom: zoom, + pan: pan + }; + } + return; + }, + zoomRange: function zoomRange(min, max) { + var _p = this._private; + if (max == null) { + var opts = min; + min = opts.min; + max = opts.max; + } + if (number$1(min) && number$1(max) && min <= max) { + _p.minZoom = min; + _p.maxZoom = max; + } else if (number$1(min) && max === undefined && min <= _p.maxZoom) { + _p.minZoom = min; + } else if (number$1(max) && min === undefined && max >= _p.minZoom) { + _p.maxZoom = max; + } + return this; + }, + minZoom: function minZoom(zoom) { + if (zoom === undefined) { + return this._private.minZoom; + } else { + return this.zoomRange({ + min: zoom + }); + } + }, + maxZoom: function maxZoom(zoom) { + if (zoom === undefined) { + return this._private.maxZoom; + } else { + return this.zoomRange({ + max: zoom + }); + } + }, + getZoomedViewport: function getZoomedViewport(params) { + var _p = this._private; + var currentPan = _p.pan; + var currentZoom = _p.zoom; + var pos; // in rendered px + var zoom; + var bail = false; + if (!_p.zoomingEnabled) { + // zooming disabled + bail = true; + } + if (number$1(params)) { + // then set the zoom + zoom = params; + } else if (plainObject(params)) { + // then zoom about a point + zoom = params.level; + if (params.position != null) { + pos = modelToRenderedPosition(params.position, currentZoom, currentPan); + } else if (params.renderedPosition != null) { + pos = params.renderedPosition; + } + if (pos != null && !_p.panningEnabled) { + // panning disabled + bail = true; + } + } + + // crop zoom + zoom = zoom > _p.maxZoom ? _p.maxZoom : zoom; + zoom = zoom < _p.minZoom ? _p.minZoom : zoom; + + // can't zoom with invalid params + if (bail || !number$1(zoom) || zoom === currentZoom || pos != null && (!number$1(pos.x) || !number$1(pos.y))) { + return null; + } + if (pos != null) { + // set zoom about position + var pan1 = currentPan; + var zoom1 = currentZoom; + var zoom2 = zoom; + var pan2 = { + x: -zoom2 / zoom1 * (pos.x - pan1.x) + pos.x, + y: -zoom2 / zoom1 * (pos.y - pan1.y) + pos.y + }; + return { + zoomed: true, + panned: true, + zoom: zoom2, + pan: pan2 + }; + } else { + // just set the zoom + return { + zoomed: true, + panned: false, + zoom: zoom, + pan: currentPan + }; + } + }, + zoom: function zoom(params) { + if (params === undefined) { + // get + return this._private.zoom; + } else { + // set + var vp = this.getZoomedViewport(params); + var _p = this._private; + if (vp == null || !vp.zoomed) { + return this; + } + _p.zoom = vp.zoom; + if (vp.panned) { + _p.pan.x = vp.pan.x; + _p.pan.y = vp.pan.y; + } + this.emit('zoom' + (vp.panned ? ' pan' : '') + ' viewport'); + this.notify('viewport'); + return this; // chaining + } + }, + + viewport: function viewport(opts) { + var _p = this._private; + var zoomDefd = true; + var panDefd = true; + var events = []; // to trigger + var zoomFailed = false; + var panFailed = false; + if (!opts) { + return this; + } + if (!number$1(opts.zoom)) { + zoomDefd = false; + } + if (!plainObject(opts.pan)) { + panDefd = false; + } + if (!zoomDefd && !panDefd) { + return this; + } + if (zoomDefd) { + var z = opts.zoom; + if (z < _p.minZoom || z > _p.maxZoom || !_p.zoomingEnabled) { + zoomFailed = true; + } else { + _p.zoom = z; + events.push('zoom'); + } + } + if (panDefd && (!zoomFailed || !opts.cancelOnFailedZoom) && _p.panningEnabled) { + var p = opts.pan; + if (number$1(p.x)) { + _p.pan.x = p.x; + panFailed = false; + } + if (number$1(p.y)) { + _p.pan.y = p.y; + panFailed = false; + } + if (!panFailed) { + events.push('pan'); + } + } + if (events.length > 0) { + events.push('viewport'); + this.emit(events.join(' ')); + this.notify('viewport'); + } + return this; // chaining + }, + + center: function center(elements) { + var pan = this.getCenterPan(elements); + if (pan) { + this._private.pan = pan; + this.emit('pan viewport'); + this.notify('viewport'); + } + return this; // chaining + }, + + getCenterPan: function getCenterPan(elements, zoom) { + if (!this._private.panningEnabled) { + return; + } + if (string(elements)) { + var selector = elements; + elements = this.mutableElements().filter(selector); + } else if (!elementOrCollection(elements)) { + elements = this.mutableElements(); + } + if (elements.length === 0) { + return; + } // can't centre pan to nothing + + var bb = elements.boundingBox(); + var w = this.width(); + var h = this.height(); + zoom = zoom === undefined ? this._private.zoom : zoom; + var pan = { + // middle + x: (w - zoom * (bb.x1 + bb.x2)) / 2, + y: (h - zoom * (bb.y1 + bb.y2)) / 2 + }; + return pan; + }, + reset: function reset() { + if (!this._private.panningEnabled || !this._private.zoomingEnabled) { + return this; + } + this.viewport({ + pan: { + x: 0, + y: 0 + }, + zoom: 1 + }); + return this; // chaining + }, + + invalidateSize: function invalidateSize() { + this._private.sizeCache = null; + }, + size: function size() { + var _p = this._private; + var container = _p.container; + var cy = this; + return _p.sizeCache = _p.sizeCache || (container ? function () { + var style = cy.window().getComputedStyle(container); + var val = function val(name) { + return parseFloat(style.getPropertyValue(name)); + }; + return { + width: container.clientWidth - val('padding-left') - val('padding-right'), + height: container.clientHeight - val('padding-top') - val('padding-bottom') + }; + }() : { + // fallback if no container (not 0 b/c can be used for dividing etc) + width: 1, + height: 1 + }); + }, + width: function width() { + return this.size().width; + }, + height: function height() { + return this.size().height; + }, + extent: function extent() { + var pan = this._private.pan; + var zoom = this._private.zoom; + var rb = this.renderedExtent(); + var b = { + x1: (rb.x1 - pan.x) / zoom, + x2: (rb.x2 - pan.x) / zoom, + y1: (rb.y1 - pan.y) / zoom, + y2: (rb.y2 - pan.y) / zoom + }; + b.w = b.x2 - b.x1; + b.h = b.y2 - b.y1; + return b; + }, + renderedExtent: function renderedExtent() { + var width = this.width(); + var height = this.height(); + return { + x1: 0, + y1: 0, + x2: width, + y2: height, + w: width, + h: height + }; + }, + multiClickDebounceTime: function multiClickDebounceTime(_int) { + if (_int) this._private.multiClickDebounceTime = _int;else return this._private.multiClickDebounceTime; + return this; // chaining + } +}; + +// aliases +corefn$1.centre = corefn$1.center; + +// backwards compatibility +corefn$1.autolockNodes = corefn$1.autolock; +corefn$1.autoungrabifyNodes = corefn$1.autoungrabify; + +var fn = { + data: define.data({ + field: 'data', + bindingEvent: 'data', + allowBinding: true, + allowSetting: true, + settingEvent: 'data', + settingTriggersEvent: true, + triggerFnName: 'trigger', + allowGetting: true, + updateStyle: true + }), + removeData: define.removeData({ + field: 'data', + event: 'data', + triggerFnName: 'trigger', + triggerEvent: true, + updateStyle: true + }), + scratch: define.data({ + field: 'scratch', + bindingEvent: 'scratch', + allowBinding: true, + allowSetting: true, + settingEvent: 'scratch', + settingTriggersEvent: true, + triggerFnName: 'trigger', + allowGetting: true, + updateStyle: true + }), + removeScratch: define.removeData({ + field: 'scratch', + event: 'scratch', + triggerFnName: 'trigger', + triggerEvent: true, + updateStyle: true + }) +}; + +// aliases +fn.attr = fn.data; +fn.removeAttr = fn.removeData; + +var Core = function Core(opts) { + var cy = this; + opts = extend({}, opts); + var container = opts.container; + + // allow for passing a wrapped jquery object + // e.g. cytoscape({ container: $('#cy') }) + if (container && !htmlElement(container) && htmlElement(container[0])) { + container = container[0]; + } + var reg = container ? container._cyreg : null; // e.g. already registered some info (e.g. readies) via jquery + reg = reg || {}; + if (reg && reg.cy) { + reg.cy.destroy(); + reg = {}; // old instance => replace reg completely + } + + var readies = reg.readies = reg.readies || []; + if (container) { + container._cyreg = reg; + } // make sure container assoc'd reg points to this cy + reg.cy = cy; + var head = _window !== undefined && container !== undefined && !opts.headless; + var options = opts; + options.layout = extend({ + name: head ? 'grid' : 'null' + }, options.layout); + options.renderer = extend({ + name: head ? 'canvas' : 'null' + }, options.renderer); + var defVal = function defVal(def, val, altVal) { + if (val !== undefined) { + return val; + } else if (altVal !== undefined) { + return altVal; + } else { + return def; + } + }; + var _p = this._private = { + container: container, + // html dom ele container + ready: false, + // whether ready has been triggered + options: options, + // cached options + elements: new Collection(this), + // elements in the graph + listeners: [], + // list of listeners + aniEles: new Collection(this), + // elements being animated + data: options.data || {}, + // data for the core + scratch: {}, + // scratch object for core + layout: null, + renderer: null, + destroyed: false, + // whether destroy was called + notificationsEnabled: true, + // whether notifications are sent to the renderer + minZoom: 1e-50, + maxZoom: 1e50, + zoomingEnabled: defVal(true, options.zoomingEnabled), + userZoomingEnabled: defVal(true, options.userZoomingEnabled), + panningEnabled: defVal(true, options.panningEnabled), + userPanningEnabled: defVal(true, options.userPanningEnabled), + boxSelectionEnabled: defVal(true, options.boxSelectionEnabled), + autolock: defVal(false, options.autolock, options.autolockNodes), + autoungrabify: defVal(false, options.autoungrabify, options.autoungrabifyNodes), + autounselectify: defVal(false, options.autounselectify), + styleEnabled: options.styleEnabled === undefined ? head : options.styleEnabled, + zoom: number$1(options.zoom) ? options.zoom : 1, + pan: { + x: plainObject(options.pan) && number$1(options.pan.x) ? options.pan.x : 0, + y: plainObject(options.pan) && number$1(options.pan.y) ? options.pan.y : 0 + }, + animation: { + // object for currently-running animations + current: [], + queue: [] + }, + hasCompoundNodes: false, + multiClickDebounceTime: defVal(250, options.multiClickDebounceTime) + }; + this.createEmitter(); + + // set selection type + this.selectionType(options.selectionType); + + // init zoom bounds + this.zoomRange({ + min: options.minZoom, + max: options.maxZoom + }); + var loadExtData = function loadExtData(extData, next) { + var anyIsPromise = extData.some(promise); + if (anyIsPromise) { + return Promise$1.all(extData).then(next); // load all data asynchronously, then exec rest of init + } else { + next(extData); // exec synchronously for convenience + } + }; + + // start with the default stylesheet so we have something before loading an external stylesheet + if (_p.styleEnabled) { + cy.setStyle([]); + } + + // create the renderer + var rendererOptions = extend({}, options, options.renderer); // allow rendering hints in top level options + cy.initRenderer(rendererOptions); + var setElesAndLayout = function setElesAndLayout(elements, onload, ondone) { + cy.notifications(false); + + // remove old elements + var oldEles = cy.mutableElements(); + if (oldEles.length > 0) { + oldEles.remove(); + } + if (elements != null) { + if (plainObject(elements) || array(elements)) { + cy.add(elements); + } + } + cy.one('layoutready', function (e) { + cy.notifications(true); + cy.emit(e); // we missed this event by turning notifications off, so pass it on + + cy.one('load', onload); + cy.emitAndNotify('load'); + }).one('layoutstop', function () { + cy.one('done', ondone); + cy.emit('done'); + }); + var layoutOpts = extend({}, cy._private.options.layout); + layoutOpts.eles = cy.elements(); + cy.layout(layoutOpts).run(); + }; + loadExtData([options.style, options.elements], function (thens) { + var initStyle = thens[0]; + var initEles = thens[1]; + + // init style + if (_p.styleEnabled) { + cy.style().append(initStyle); + } + + // initial load + setElesAndLayout(initEles, function () { + // onready + cy.startAnimationLoop(); + _p.ready = true; + + // if a ready callback is specified as an option, the bind it + if (fn$6(options.ready)) { + cy.on('ready', options.ready); + } + + // bind all the ready handlers registered before creating this instance + for (var i = 0; i < readies.length; i++) { + var fn = readies[i]; + cy.on('ready', fn); + } + if (reg) { + reg.readies = []; + } // clear b/c we've bound them all and don't want to keep it around in case a new core uses the same div etc + + cy.emit('ready'); + }, options.done); + }); +}; +var corefn = Core.prototype; // short alias + +extend(corefn, { + instanceString: function instanceString() { + return 'core'; + }, + isReady: function isReady() { + return this._private.ready; + }, + destroyed: function destroyed() { + return this._private.destroyed; + }, + ready: function ready(fn) { + if (this.isReady()) { + this.emitter().emit('ready', [], fn); // just calls fn as though triggered via ready event + } else { + this.on('ready', fn); + } + return this; + }, + destroy: function destroy() { + var cy = this; + if (cy.destroyed()) return; + cy.stopAnimationLoop(); + cy.destroyRenderer(); + this.emit('destroy'); + cy._private.destroyed = true; + return cy; + }, + hasElementWithId: function hasElementWithId(id) { + return this._private.elements.hasElementWithId(id); + }, + getElementById: function getElementById(id) { + return this._private.elements.getElementById(id); + }, + hasCompoundNodes: function hasCompoundNodes() { + return this._private.hasCompoundNodes; + }, + headless: function headless() { + return this._private.renderer.isHeadless(); + }, + styleEnabled: function styleEnabled() { + return this._private.styleEnabled; + }, + addToPool: function addToPool(eles) { + this._private.elements.merge(eles); + return this; // chaining + }, + + removeFromPool: function removeFromPool(eles) { + this._private.elements.unmerge(eles); + return this; + }, + container: function container() { + return this._private.container || null; + }, + window: function window() { + var container = this._private.container; + if (container == null) return _window; + var ownerDocument = this._private.container.ownerDocument; + if (ownerDocument === undefined || ownerDocument == null) { + return _window; + } + return ownerDocument.defaultView || _window; + }, + mount: function mount(container) { + if (container == null) { + return; + } + var cy = this; + var _p = cy._private; + var options = _p.options; + if (!htmlElement(container) && htmlElement(container[0])) { + container = container[0]; + } + cy.stopAnimationLoop(); + cy.destroyRenderer(); + _p.container = container; + _p.styleEnabled = true; + cy.invalidateSize(); + cy.initRenderer(extend({}, options, options.renderer, { + // allow custom renderer name to be re-used, otherwise use canvas + name: options.renderer.name === 'null' ? 'canvas' : options.renderer.name + })); + cy.startAnimationLoop(); + cy.style(options.style); + cy.emit('mount'); + return cy; + }, + unmount: function unmount() { + var cy = this; + cy.stopAnimationLoop(); + cy.destroyRenderer(); + cy.initRenderer({ + name: 'null' + }); + cy.emit('unmount'); + return cy; + }, + options: function options() { + return copy(this._private.options); + }, + json: function json(obj) { + var cy = this; + var _p = cy._private; + var eles = cy.mutableElements(); + var getFreshRef = function getFreshRef(ele) { + return cy.getElementById(ele.id()); + }; + if (plainObject(obj)) { + // set + + cy.startBatch(); + if (obj.elements) { + var idInJson = {}; + var updateEles = function updateEles(jsons, gr) { + var toAdd = []; + var toMod = []; + for (var i = 0; i < jsons.length; i++) { + var json = jsons[i]; + if (!json.data.id) { + warn('cy.json() cannot handle elements without an ID attribute'); + continue; + } + var id = '' + json.data.id; // id must be string + var ele = cy.getElementById(id); + idInJson[id] = true; + if (ele.length !== 0) { + // existing element should be updated + toMod.push({ + ele: ele, + json: json + }); + } else { + // otherwise should be added + if (gr) { + json.group = gr; + toAdd.push(json); + } else { + toAdd.push(json); + } + } + } + cy.add(toAdd); + for (var _i = 0; _i < toMod.length; _i++) { + var _toMod$_i = toMod[_i], + _ele = _toMod$_i.ele, + _json = _toMod$_i.json; + _ele.json(_json); + } + }; + if (array(obj.elements)) { + // elements: [] + updateEles(obj.elements); + } else { + // elements: { nodes: [], edges: [] } + var grs = ['nodes', 'edges']; + for (var i = 0; i < grs.length; i++) { + var gr = grs[i]; + var elements = obj.elements[gr]; + if (array(elements)) { + updateEles(elements, gr); + } + } + } + var parentsToRemove = cy.collection(); + eles.filter(function (ele) { + return !idInJson[ele.id()]; + }).forEach(function (ele) { + if (ele.isParent()) { + parentsToRemove.merge(ele); + } else { + ele.remove(); + } + }); + + // so that children are not removed w/parent + parentsToRemove.forEach(function (ele) { + return ele.children().move({ + parent: null + }); + }); + + // intermediate parents may be moved by prior line, so make sure we remove by fresh refs + parentsToRemove.forEach(function (ele) { + return getFreshRef(ele).remove(); + }); + } + if (obj.style) { + cy.style(obj.style); + } + if (obj.zoom != null && obj.zoom !== _p.zoom) { + cy.zoom(obj.zoom); + } + if (obj.pan) { + if (obj.pan.x !== _p.pan.x || obj.pan.y !== _p.pan.y) { + cy.pan(obj.pan); + } + } + if (obj.data) { + cy.data(obj.data); + } + var fields = ['minZoom', 'maxZoom', 'zoomingEnabled', 'userZoomingEnabled', 'panningEnabled', 'userPanningEnabled', 'boxSelectionEnabled', 'autolock', 'autoungrabify', 'autounselectify', 'multiClickDebounceTime']; + for (var _i2 = 0; _i2 < fields.length; _i2++) { + var f = fields[_i2]; + if (obj[f] != null) { + cy[f](obj[f]); + } + } + cy.endBatch(); + return this; // chaining + } else { + // get + var flat = !!obj; + var json = {}; + if (flat) { + json.elements = this.elements().map(function (ele) { + return ele.json(); + }); + } else { + json.elements = {}; + eles.forEach(function (ele) { + var group = ele.group(); + if (!json.elements[group]) { + json.elements[group] = []; + } + json.elements[group].push(ele.json()); + }); + } + if (this._private.styleEnabled) { + json.style = cy.style().json(); + } + json.data = copy(cy.data()); + var options = _p.options; + json.zoomingEnabled = _p.zoomingEnabled; + json.userZoomingEnabled = _p.userZoomingEnabled; + json.zoom = _p.zoom; + json.minZoom = _p.minZoom; + json.maxZoom = _p.maxZoom; + json.panningEnabled = _p.panningEnabled; + json.userPanningEnabled = _p.userPanningEnabled; + json.pan = copy(_p.pan); + json.boxSelectionEnabled = _p.boxSelectionEnabled; + json.renderer = copy(options.renderer); + json.hideEdgesOnViewport = options.hideEdgesOnViewport; + json.textureOnViewport = options.textureOnViewport; + json.wheelSensitivity = options.wheelSensitivity; + json.motionBlur = options.motionBlur; + json.multiClickDebounceTime = options.multiClickDebounceTime; + return json; + } + } +}); +corefn.$id = corefn.getElementById; +[corefn$9, corefn$8, elesfn, corefn$7, corefn$6, corefn$5, corefn$4, corefn$3, corefn$2, corefn$1, fn].forEach(function (props) { + extend(corefn, props); +}); + +/* eslint-disable no-unused-vars */ +var defaults$7 = { + fit: true, + // whether to fit the viewport to the graph + directed: false, + // whether the tree is directed downwards (or edges can point in any direction if false) + padding: 30, + // padding on fit + circle: false, + // put depths in concentric circles if true, put depths top down if false + grid: false, + // whether to create an even grid into which the DAG is placed (circle:false only) + spacingFactor: 1.75, + // positive spacing factor, larger => more space between nodes (N.B. n/a if causes overlap) + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + roots: undefined, + // the roots of the trees + depthSort: undefined, + // a sorting function to order nodes at equal depth. e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled, + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts +}; + +var deprecatedOptionDefaults = { + maximal: false, + // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only); setting acyclic to true sets maximal to true also + acyclic: false // whether the tree is acyclic and thus a node could be shifted (due to the maximal option) multiple times without causing an infinite loop; setting to true sets maximal to true also; if you are uncertain whether a tree is acyclic, set to false to avoid potential infinite loops +}; + +/* eslint-enable */ + +var getInfo = function getInfo(ele) { + return ele.scratch('breadthfirst'); +}; +var setInfo = function setInfo(ele, obj) { + return ele.scratch('breadthfirst', obj); +}; +function BreadthFirstLayout(options) { + this.options = extend({}, defaults$7, deprecatedOptionDefaults, options); +} +BreadthFirstLayout.prototype.run = function () { + var params = this.options; + var options = params; + var cy = params.cy; + var eles = options.eles; + var nodes = eles.nodes().filter(function (n) { + return !n.isParent(); + }); + var graph = eles; + var directed = options.directed; + var maximal = options.acyclic || options.maximal || options.maximalAdjustments > 0; // maximalAdjustments for compat. w/ old code; also, setting acyclic to true sets maximal to true + + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var roots; + if (elementOrCollection(options.roots)) { + roots = options.roots; + } else if (array(options.roots)) { + var rootsArray = []; + for (var i = 0; i < options.roots.length; i++) { + var id = options.roots[i]; + var ele = cy.getElementById(id); + rootsArray.push(ele); + } + roots = cy.collection(rootsArray); + } else if (string(options.roots)) { + roots = cy.$(options.roots); + } else { + if (directed) { + roots = nodes.roots(); + } else { + var components = eles.components(); + roots = cy.collection(); + var _loop = function _loop(_i) { + var comp = components[_i]; + var maxDegree = comp.maxDegree(false); + var compRoots = comp.filter(function (ele) { + return ele.degree(false) === maxDegree; + }); + roots = roots.add(compRoots); + }; + for (var _i = 0; _i < components.length; _i++) { + _loop(_i); + } + } + } + var depths = []; + var foundByBfs = {}; + var addToDepth = function addToDepth(ele, d) { + if (depths[d] == null) { + depths[d] = []; + } + var i = depths[d].length; + depths[d].push(ele); + setInfo(ele, { + index: i, + depth: d + }); + }; + var changeDepth = function changeDepth(ele, newDepth) { + var _getInfo = getInfo(ele), + depth = _getInfo.depth, + index = _getInfo.index; + depths[depth][index] = null; + addToDepth(ele, newDepth); + }; + + // find the depths of the nodes + graph.bfs({ + roots: roots, + directed: options.directed, + visit: function visit(node, edge, pNode, i, depth) { + var ele = node[0]; + var id = ele.id(); + addToDepth(ele, depth); + foundByBfs[id] = true; + } + }); + + // check for nodes not found by bfs + var orphanNodes = []; + for (var _i2 = 0; _i2 < nodes.length; _i2++) { + var _ele = nodes[_i2]; + if (foundByBfs[_ele.id()]) { + continue; + } else { + orphanNodes.push(_ele); + } + } + + // assign the nodes a depth and index + + var assignDepthsAt = function assignDepthsAt(i) { + var eles = depths[i]; + for (var j = 0; j < eles.length; j++) { + var _ele2 = eles[j]; + if (_ele2 == null) { + eles.splice(j, 1); + j--; + continue; + } + setInfo(_ele2, { + depth: i, + index: j + }); + } + }; + var assignDepths = function assignDepths() { + for (var _i3 = 0; _i3 < depths.length; _i3++) { + assignDepthsAt(_i3); + } + }; + var adjustMaximally = function adjustMaximally(ele, shifted) { + var eInfo = getInfo(ele); + var incomers = ele.incomers().filter(function (el) { + return el.isNode() && eles.has(el); + }); + var maxDepth = -1; + var id = ele.id(); + for (var k = 0; k < incomers.length; k++) { + var incmr = incomers[k]; + var iInfo = getInfo(incmr); + maxDepth = Math.max(maxDepth, iInfo.depth); + } + if (eInfo.depth <= maxDepth) { + if (!options.acyclic && shifted[id]) { + return null; + } + var newDepth = maxDepth + 1; + changeDepth(ele, newDepth); + shifted[id] = newDepth; + return true; + } + return false; + }; + + // for the directed case, try to make the edges all go down (i.e. depth i => depth i + 1) + if (directed && maximal) { + var Q = []; + var shifted = {}; + var enqueue = function enqueue(n) { + return Q.push(n); + }; + var dequeue = function dequeue() { + return Q.shift(); + }; + nodes.forEach(function (n) { + return Q.push(n); + }); + while (Q.length > 0) { + var _ele3 = dequeue(); + var didShift = adjustMaximally(_ele3, shifted); + if (didShift) { + _ele3.outgoers().filter(function (el) { + return el.isNode() && eles.has(el); + }).forEach(enqueue); + } else if (didShift === null) { + warn('Detected double maximal shift for node `' + _ele3.id() + '`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.'); + break; // exit on failure + } + } + } + + assignDepths(); // clear holes + + // find min distance we need to leave between nodes + var minDistance = 0; + if (options.avoidOverlap) { + for (var _i4 = 0; _i4 < nodes.length; _i4++) { + var n = nodes[_i4]; + var nbb = n.layoutDimensions(options); + var w = nbb.w; + var h = nbb.h; + minDistance = Math.max(minDistance, w, h); + } + } + + // get the weighted percent for an element based on its connectivity to other levels + var cachedWeightedPercent = {}; + var getWeightedPercent = function getWeightedPercent(ele) { + if (cachedWeightedPercent[ele.id()]) { + return cachedWeightedPercent[ele.id()]; + } + var eleDepth = getInfo(ele).depth; + var neighbors = ele.neighborhood(); + var percent = 0; + var samples = 0; + for (var _i5 = 0; _i5 < neighbors.length; _i5++) { + var neighbor = neighbors[_i5]; + if (neighbor.isEdge() || neighbor.isParent() || !nodes.has(neighbor)) { + continue; + } + var bf = getInfo(neighbor); + if (bf == null) { + continue; + } + var index = bf.index; + var depth = bf.depth; + + // unassigned neighbours shouldn't affect the ordering + if (index == null || depth == null) { + continue; + } + var nDepth = depths[depth].length; + if (depth < eleDepth) { + // only get influenced by elements above + percent += index / nDepth; + samples++; + } + } + samples = Math.max(1, samples); + percent = percent / samples; + if (samples === 0) { + // put lone nodes at the start + percent = 0; + } + cachedWeightedPercent[ele.id()] = percent; + return percent; + }; + + // rearrange the indices in each depth level based on connectivity + + var sortFn = function sortFn(a, b) { + var apct = getWeightedPercent(a); + var bpct = getWeightedPercent(b); + var diff = apct - bpct; + if (diff === 0) { + return ascending(a.id(), b.id()); // make sure sort doesn't have don't-care comparisons + } else { + return diff; + } + }; + if (options.depthSort !== undefined) { + sortFn = options.depthSort; + } + + // sort each level to make connected nodes closer + for (var _i6 = 0; _i6 < depths.length; _i6++) { + depths[_i6].sort(sortFn); + assignDepthsAt(_i6); + } + + // assign orphan nodes to a new top-level depth + var orphanDepth = []; + for (var _i7 = 0; _i7 < orphanNodes.length; _i7++) { + orphanDepth.push(orphanNodes[_i7]); + } + depths.unshift(orphanDepth); + assignDepths(); + var biggestDepthSize = 0; + for (var _i8 = 0; _i8 < depths.length; _i8++) { + biggestDepthSize = Math.max(depths[_i8].length, biggestDepthSize); + } + var center = { + x: bb.x1 + bb.w / 2, + y: bb.x1 + bb.h / 2 + }; + var maxDepthSize = depths.reduce(function (max, eles) { + return Math.max(max, eles.length); + }, 0); + var getPosition = function getPosition(ele) { + var _getInfo2 = getInfo(ele), + depth = _getInfo2.depth, + index = _getInfo2.index; + var depthSize = depths[depth].length; + var distanceX = Math.max(bb.w / ((options.grid ? maxDepthSize : depthSize) + 1), minDistance); + var distanceY = Math.max(bb.h / (depths.length + 1), minDistance); + var radiusStepSize = Math.min(bb.w / 2 / depths.length, bb.h / 2 / depths.length); + radiusStepSize = Math.max(radiusStepSize, minDistance); + if (!options.circle) { + var epos = { + x: center.x + (index + 1 - (depthSize + 1) / 2) * distanceX, + y: (depth + 1) * distanceY + }; + return epos; + } else { + var radius = radiusStepSize * depth + radiusStepSize - (depths.length > 0 && depths[0].length <= 3 ? radiusStepSize / 2 : 0); + var theta = 2 * Math.PI / depths[depth].length * index; + if (depth === 0 && depths[0].length === 1) { + radius = 1; + } + return { + x: center.x + radius * Math.cos(theta), + y: center.y + radius * Math.sin(theta) + }; + } + }; + eles.nodes().layoutPositions(this, options, getPosition); + return this; // chaining +}; + +var defaults$6 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // the padding on fit + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox and radius if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + spacingFactor: undefined, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + radius: undefined, + // the radius of the circle + startAngle: 3 / 2 * Math.PI, + // where nodes start in radians + sweep: undefined, + // how many radians should be between the first and last node (defaults to full circle) + clockwise: true, + // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) + sort: undefined, + // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts +}; + +function CircleLayout(options) { + this.options = extend({}, defaults$6, options); +} +CircleLayout.prototype.run = function () { + var params = this.options; + var options = params; + var cy = params.cy; + var eles = options.eles; + var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise; + var nodes = eles.nodes().not(':parent'); + if (options.sort) { + nodes = nodes.sort(options.sort); + } + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var center = { + x: bb.x1 + bb.w / 2, + y: bb.y1 + bb.h / 2 + }; + var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / nodes.length : options.sweep; + var dTheta = sweep / Math.max(1, nodes.length - 1); + var r; + var minDistance = 0; + for (var i = 0; i < nodes.length; i++) { + var n = nodes[i]; + var nbb = n.layoutDimensions(options); + var w = nbb.w; + var h = nbb.h; + minDistance = Math.max(minDistance, w, h); + } + if (number$1(options.radius)) { + r = options.radius; + } else if (nodes.length <= 1) { + r = 0; + } else { + r = Math.min(bb.h, bb.w) / 2 - minDistance; + } + + // calculate the radius + if (nodes.length > 1 && options.avoidOverlap) { + // but only if more than one node (can't overlap) + minDistance *= 1.75; // just to have some nice spacing + + var dcos = Math.cos(dTheta) - Math.cos(0); + var dsin = Math.sin(dTheta) - Math.sin(0); + var rMin = Math.sqrt(minDistance * minDistance / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping + r = Math.max(rMin, r); + } + var getPos = function getPos(ele, i) { + var theta = options.startAngle + i * dTheta * (clockwise ? 1 : -1); + var rx = r * Math.cos(theta); + var ry = r * Math.sin(theta); + var pos = { + x: center.x + rx, + y: center.y + ry + }; + return pos; + }; + eles.nodes().layoutPositions(this, options, getPos); + return this; // chaining +}; + +var defaults$5 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // the padding on fit + startAngle: 3 / 2 * Math.PI, + // where nodes start in radians + sweep: undefined, + // how many radians should be between the first and last node (defaults to full circle) + clockwise: true, + // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) + equidistant: false, + // whether levels have an equal radial distance betwen them, may cause bounding box overflow + minNodeSpacing: 10, + // min spacing between outside of nodes (used for radius adjustment) + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + height: undefined, + // height of layout area (overrides container height) + width: undefined, + // width of layout area (overrides container width) + spacingFactor: undefined, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + concentric: function concentric(node) { + // returns numeric value for each node, placing higher nodes in levels towards the centre + return node.degree(); + }, + levelWidth: function levelWidth(nodes) { + // the variation of concentric values in each level + return nodes.maxDegree() / 4; + }, + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts +}; + +function ConcentricLayout(options) { + this.options = extend({}, defaults$5, options); +} +ConcentricLayout.prototype.run = function () { + var params = this.options; + var options = params; + var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise; + var cy = params.cy; + var eles = options.eles; + var nodes = eles.nodes().not(':parent'); + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var center = { + x: bb.x1 + bb.w / 2, + y: bb.y1 + bb.h / 2 + }; + var nodeValues = []; // { node, value } + var maxNodeSize = 0; + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var value = void 0; + + // calculate the node value + value = options.concentric(node); + nodeValues.push({ + value: value, + node: node + }); + + // for style mapping + node._private.scratch.concentric = value; + } + + // in case we used the `concentric` in style + nodes.updateStyle(); + + // calculate max size now based on potentially updated mappers + for (var _i = 0; _i < nodes.length; _i++) { + var _node = nodes[_i]; + var nbb = _node.layoutDimensions(options); + maxNodeSize = Math.max(maxNodeSize, nbb.w, nbb.h); + } + + // sort node values in descreasing order + nodeValues.sort(function (a, b) { + return b.value - a.value; + }); + var levelWidth = options.levelWidth(nodes); + + // put the values into levels + var levels = [[]]; + var currentLevel = levels[0]; + for (var _i2 = 0; _i2 < nodeValues.length; _i2++) { + var val = nodeValues[_i2]; + if (currentLevel.length > 0) { + var diff = Math.abs(currentLevel[0].value - val.value); + if (diff >= levelWidth) { + currentLevel = []; + levels.push(currentLevel); + } + } + currentLevel.push(val); + } + + // create positions from levels + + var minDist = maxNodeSize + options.minNodeSpacing; // min dist between nodes + + if (!options.avoidOverlap) { + // then strictly constrain to bb + var firstLvlHasMulti = levels.length > 0 && levels[0].length > 1; + var maxR = Math.min(bb.w, bb.h) / 2 - minDist; + var rStep = maxR / (levels.length + firstLvlHasMulti ? 1 : 0); + minDist = Math.min(minDist, rStep); + } + + // find the metrics for each level + var r = 0; + for (var _i3 = 0; _i3 < levels.length; _i3++) { + var level = levels[_i3]; + var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / level.length : options.sweep; + var dTheta = level.dTheta = sweep / Math.max(1, level.length - 1); + + // calculate the radius + if (level.length > 1 && options.avoidOverlap) { + // but only if more than one node (can't overlap) + var dcos = Math.cos(dTheta) - Math.cos(0); + var dsin = Math.sin(dTheta) - Math.sin(0); + var rMin = Math.sqrt(minDist * minDist / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping + + r = Math.max(rMin, r); + } + level.r = r; + r += minDist; + } + if (options.equidistant) { + var rDeltaMax = 0; + var _r = 0; + for (var _i4 = 0; _i4 < levels.length; _i4++) { + var _level = levels[_i4]; + var rDelta = _level.r - _r; + rDeltaMax = Math.max(rDeltaMax, rDelta); + } + _r = 0; + for (var _i5 = 0; _i5 < levels.length; _i5++) { + var _level2 = levels[_i5]; + if (_i5 === 0) { + _r = _level2.r; + } + _level2.r = _r; + _r += rDeltaMax; + } + } + + // calculate the node positions + var pos = {}; // id => position + for (var _i6 = 0; _i6 < levels.length; _i6++) { + var _level3 = levels[_i6]; + var _dTheta = _level3.dTheta; + var _r2 = _level3.r; + for (var j = 0; j < _level3.length; j++) { + var _val = _level3[j]; + var theta = options.startAngle + (clockwise ? 1 : -1) * _dTheta * j; + var p = { + x: center.x + _r2 * Math.cos(theta), + y: center.y + _r2 * Math.sin(theta) + }; + pos[_val.node.id()] = p; + } + } + + // position the nodes + eles.nodes().layoutPositions(this, options, function (ele) { + var id = ele.id(); + return pos[id]; + }); + return this; // chaining +}; + +/* +The CoSE layout was written by Gerardo Huck. +https://www.linkedin.com/in/gerardohuck/ + +Based on the following article: +http://dl.acm.org/citation.cfm?id=1498047 + +Modifications tracked on Github. +*/ +var DEBUG; + +/** + * @brief : default layout options + */ +var defaults$4 = { + // Called on `layoutready` + ready: function ready() {}, + // Called on `layoutstop` + stop: function stop() {}, + // Whether to animate while running the layout + // true : Animate continuously as the layout is running + // false : Just show the end result + // 'end' : Animate with the end result, from the initial positions to the end positions + animate: true, + // Easing of the animation for animate:'end' + animationEasing: undefined, + // The duration of the animation for animate:'end' + animationDuration: undefined, + // A function that determines whether the node should be animated + // All nodes animated by default on animate enabled + // Non-animated nodes are positioned immediately when the layout starts + animateFilter: function animateFilter(node, i) { + return true; + }, + // The layout animates only after this many milliseconds for animate:true + // (prevents flashing on fast runs) + animationThreshold: 250, + // Number of iterations between consecutive screen positions update + refresh: 20, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 30, + // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + boundingBox: undefined, + // Excludes the label when calculating node bounding boxes for the layout algorithm + nodeDimensionsIncludeLabels: false, + // Randomize the initial positions of the nodes (true) or use existing positions (false) + randomize: false, + // Extra spacing between components in non-compound graphs + componentSpacing: 40, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: function nodeRepulsion(node) { + return 2048; + }, + // Node repulsion (overlapping) multiplier + nodeOverlap: 4, + // Ideal edge (non nested) length + idealEdgeLength: function idealEdgeLength(edge) { + return 32; + }, + // Divisor to compute edge forces + edgeElasticity: function edgeElasticity(edge) { + return 32; + }, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 1.2, + // Gravity force (constant) + gravity: 1, + // Maximum number of iterations to perform + numIter: 1000, + // Initial temperature (maximum node displacement) + initialTemp: 1000, + // Cooling factor (how the temperature is reduced between consecutive iterations + coolingFactor: 0.99, + // Lower temperature threshold (below this point the layout will end) + minTemp: 1.0 +}; + +/** + * @brief : constructor + * @arg options : object containing layout options + */ +function CoseLayout(options) { + this.options = extend({}, defaults$4, options); + this.options.layout = this; + + // Exclude any edge that has a source or target node that is not in the set of passed-in nodes + var nodes = this.options.eles.nodes(); + var edges = this.options.eles.edges(); + var notEdges = edges.filter(function (e) { + var sourceId = e.source().data('id'); + var targetId = e.target().data('id'); + var hasSource = nodes.some(function (n) { + return n.data('id') === sourceId; + }); + var hasTarget = nodes.some(function (n) { + return n.data('id') === targetId; + }); + return !hasSource || !hasTarget; + }); + this.options.eles = this.options.eles.not(notEdges); +} + +/** + * @brief : runs the layout + */ +CoseLayout.prototype.run = function () { + var options = this.options; + var cy = options.cy; + var layout = this; + layout.stopped = false; + if (options.animate === true || options.animate === false) { + layout.emit({ + type: 'layoutstart', + layout: layout + }); + } + + // Set DEBUG - Global variable + if (true === options.debug) { + DEBUG = true; + } else { + DEBUG = false; + } + + // Initialize layout info + var layoutInfo = createLayoutInfo(cy, layout, options); + + // Show LayoutInfo contents if debugging + if (DEBUG) { + printLayoutInfo(layoutInfo); + } + + // If required, randomize node positions + if (options.randomize) { + randomizePositions(layoutInfo); + } + var startTime = performanceNow(); + var refresh = function refresh() { + refreshPositions(layoutInfo, cy, options); + + // Fit the graph if necessary + if (true === options.fit) { + cy.fit(options.padding); + } + }; + var mainLoop = function mainLoop(i) { + if (layout.stopped || i >= options.numIter) { + // logDebug("Layout manually stopped. Stopping computation in step " + i); + return false; + } + + // Do one step in the phisical simulation + step(layoutInfo, options); + + // Update temperature + layoutInfo.temperature = layoutInfo.temperature * options.coolingFactor; + // logDebug("New temperature: " + layoutInfo.temperature); + + if (layoutInfo.temperature < options.minTemp) { + // logDebug("Temperature drop below minimum threshold. Stopping computation in step " + i); + return false; + } + return true; + }; + var done = function done() { + if (options.animate === true || options.animate === false) { + refresh(); + + // Layout has finished + layout.one('layoutstop', options.stop); + layout.emit({ + type: 'layoutstop', + layout: layout + }); + } else { + var nodes = options.eles.nodes(); + var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes); + nodes.layoutPositions(layout, options, getScaledPos); + } + }; + var i = 0; + var loopRet = true; + if (options.animate === true) { + var frame = function frame() { + var f = 0; + while (loopRet && f < options.refresh) { + loopRet = mainLoop(i); + i++; + f++; + } + if (!loopRet) { + // it's done + separateComponents(layoutInfo, options); + done(); + } else { + var now = performanceNow(); + if (now - startTime >= options.animationThreshold) { + refresh(); + } + requestAnimationFrame(frame); + } + }; + frame(); + } else { + while (loopRet) { + loopRet = mainLoop(i); + i++; + } + separateComponents(layoutInfo, options); + done(); + } + return this; // chaining +}; + +/** + * @brief : called on continuous layouts to stop them before they finish + */ +CoseLayout.prototype.stop = function () { + this.stopped = true; + if (this.thread) { + this.thread.stop(); + } + this.emit('layoutstop'); + return this; // chaining +}; + +CoseLayout.prototype.destroy = function () { + if (this.thread) { + this.thread.stop(); + } + return this; // chaining +}; + +/** + * @brief : Creates an object which is contains all the data + * used in the layout process + * @arg cy : cytoscape.js object + * @return : layoutInfo object initialized + */ +var createLayoutInfo = function createLayoutInfo(cy, layout, options) { + // Shortcut + var edges = options.eles.edges(); + var nodes = options.eles.nodes(); + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var layoutInfo = { + isCompound: cy.hasCompoundNodes(), + layoutNodes: [], + idToIndex: {}, + nodeSize: nodes.size(), + graphSet: [], + indexToGraph: [], + layoutEdges: [], + edgeSize: edges.size(), + temperature: options.initialTemp, + clientWidth: bb.w, + clientHeight: bb.h, + boundingBox: bb + }; + var components = options.eles.components(); + var id2cmptId = {}; + for (var i = 0; i < components.length; i++) { + var component = components[i]; + for (var j = 0; j < component.length; j++) { + var node = component[j]; + id2cmptId[node.id()] = i; + } + } + + // Iterate over all nodes, creating layout nodes + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = nodes[i]; + var nbb = n.layoutDimensions(options); + var tempNode = {}; + tempNode.isLocked = n.locked(); + tempNode.id = n.data('id'); + tempNode.parentId = n.data('parent'); + tempNode.cmptId = id2cmptId[n.id()]; + tempNode.children = []; + tempNode.positionX = n.position('x'); + tempNode.positionY = n.position('y'); + tempNode.offsetX = 0; + tempNode.offsetY = 0; + tempNode.height = nbb.w; + tempNode.width = nbb.h; + tempNode.maxX = tempNode.positionX + tempNode.width / 2; + tempNode.minX = tempNode.positionX - tempNode.width / 2; + tempNode.maxY = tempNode.positionY + tempNode.height / 2; + tempNode.minY = tempNode.positionY - tempNode.height / 2; + tempNode.padLeft = parseFloat(n.style('padding')); + tempNode.padRight = parseFloat(n.style('padding')); + tempNode.padTop = parseFloat(n.style('padding')); + tempNode.padBottom = parseFloat(n.style('padding')); + + // forces + tempNode.nodeRepulsion = fn$6(options.nodeRepulsion) ? options.nodeRepulsion(n) : options.nodeRepulsion; + + // Add new node + layoutInfo.layoutNodes.push(tempNode); + // Add entry to id-index map + layoutInfo.idToIndex[tempNode.id] = i; + } + + // Inline implementation of a queue, used for traversing the graph in BFS order + var queue = []; + var start = 0; // Points to the start the queue + var end = -1; // Points to the end of the queue + + var tempGraph = []; + + // Second pass to add child information and + // initialize queue for hierarchical traversal + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + var p_id = n.parentId; + // Check if node n has a parent node + if (null != p_id) { + // Add node Id to parent's list of children + layoutInfo.layoutNodes[layoutInfo.idToIndex[p_id]].children.push(n.id); + } else { + // If a node doesn't have a parent, then it's in the root graph + queue[++end] = n.id; + tempGraph.push(n.id); + } + } + + // Add root graph to graphSet + layoutInfo.graphSet.push(tempGraph); + + // Traverse the graph, level by level, + while (start <= end) { + // Get the node to visit and remove it from queue + var node_id = queue[start++]; + var node_ix = layoutInfo.idToIndex[node_id]; + var node = layoutInfo.layoutNodes[node_ix]; + var children = node.children; + if (children.length > 0) { + // Add children nodes as a new graph to graph set + layoutInfo.graphSet.push(children); + // Add children to que queue to be visited + for (var i = 0; i < children.length; i++) { + queue[++end] = children[i]; + } + } + } + + // Create indexToGraph map + for (var i = 0; i < layoutInfo.graphSet.length; i++) { + var graph = layoutInfo.graphSet[i]; + for (var j = 0; j < graph.length; j++) { + var index = layoutInfo.idToIndex[graph[j]]; + layoutInfo.indexToGraph[index] = i; + } + } + + // Iterate over all edges, creating Layout Edges + for (var i = 0; i < layoutInfo.edgeSize; i++) { + var e = edges[i]; + var tempEdge = {}; + tempEdge.id = e.data('id'); + tempEdge.sourceId = e.data('source'); + tempEdge.targetId = e.data('target'); + + // Compute ideal length + var idealLength = fn$6(options.idealEdgeLength) ? options.idealEdgeLength(e) : options.idealEdgeLength; + var elasticity = fn$6(options.edgeElasticity) ? options.edgeElasticity(e) : options.edgeElasticity; + + // Check if it's an inter graph edge + var sourceIx = layoutInfo.idToIndex[tempEdge.sourceId]; + var targetIx = layoutInfo.idToIndex[tempEdge.targetId]; + var sourceGraph = layoutInfo.indexToGraph[sourceIx]; + var targetGraph = layoutInfo.indexToGraph[targetIx]; + if (sourceGraph != targetGraph) { + // Find lowest common graph ancestor + var lca = findLCA(tempEdge.sourceId, tempEdge.targetId, layoutInfo); + + // Compute sum of node depths, relative to lca graph + var lcaGraph = layoutInfo.graphSet[lca]; + var depth = 0; + + // Source depth + var tempNode = layoutInfo.layoutNodes[sourceIx]; + while (-1 === lcaGraph.indexOf(tempNode.id)) { + tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; + depth++; + } + + // Target depth + tempNode = layoutInfo.layoutNodes[targetIx]; + while (-1 === lcaGraph.indexOf(tempNode.id)) { + tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; + depth++; + } + + // logDebug('LCA of nodes ' + tempEdge.sourceId + ' and ' + tempEdge.targetId + + // ". Index: " + lca + " Contents: " + lcaGraph.toString() + + // ". Depth: " + depth); + + // Update idealLength + idealLength *= depth * options.nestingFactor; + } + tempEdge.idealLength = idealLength; + tempEdge.elasticity = elasticity; + layoutInfo.layoutEdges.push(tempEdge); + } + + // Finally, return layoutInfo object + return layoutInfo; +}; + +/** + * @brief : This function finds the index of the lowest common + * graph ancestor between 2 nodes in the subtree + * (from the graph hierarchy induced tree) whose + * root is graphIx + * + * @arg node1: node1's ID + * @arg node2: node2's ID + * @arg layoutInfo: layoutInfo object + * + */ +var findLCA = function findLCA(node1, node2, layoutInfo) { + // Find their common ancester, starting from the root graph + var res = findLCA_aux(node1, node2, 0, layoutInfo); + if (2 > res.count) { + // If aux function couldn't find the common ancester, + // then it is the root graph + return 0; + } else { + return res.graph; + } +}; + +/** + * @brief : Auxiliary function used for LCA computation + * + * @arg node1 : node1's ID + * @arg node2 : node2's ID + * @arg graphIx : subgraph index + * @arg layoutInfo : layoutInfo object + * + * @return : object of the form {count: X, graph: Y}, where: + * X is the number of ancestors (max: 2) found in + * graphIx (and it's subgraphs), + * Y is the graph index of the lowest graph containing + * all X nodes + */ +var findLCA_aux = function findLCA_aux(node1, node2, graphIx, layoutInfo) { + var graph = layoutInfo.graphSet[graphIx]; + // If both nodes belongs to graphIx + if (-1 < graph.indexOf(node1) && -1 < graph.indexOf(node2)) { + return { + count: 2, + graph: graphIx + }; + } + + // Make recursive calls for all subgraphs + var c = 0; + for (var i = 0; i < graph.length; i++) { + var nodeId = graph[i]; + var nodeIx = layoutInfo.idToIndex[nodeId]; + var children = layoutInfo.layoutNodes[nodeIx].children; + + // If the node has no child, skip it + if (0 === children.length) { + continue; + } + var childGraphIx = layoutInfo.indexToGraph[layoutInfo.idToIndex[children[0]]]; + var result = findLCA_aux(node1, node2, childGraphIx, layoutInfo); + if (0 === result.count) { + // Neither node1 nor node2 are present in this subgraph + continue; + } else if (1 === result.count) { + // One of (node1, node2) is present in this subgraph + c++; + if (2 === c) { + // We've already found both nodes, no need to keep searching + break; + } + } else { + // Both nodes are present in this subgraph + return result; + } + } + return { + count: c, + graph: graphIx + }; +}; + +/** + * @brief: printsLayoutInfo into js console + * Only used for debbuging + */ +var printLayoutInfo; + +/** + * @brief : Randomizes the position of all nodes + */ +var randomizePositions = function randomizePositions(layoutInfo, cy) { + var width = layoutInfo.clientWidth; + var height = layoutInfo.clientHeight; + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + + // No need to randomize compound nodes or locked nodes + if (0 === n.children.length && !n.isLocked) { + n.positionX = Math.random() * width; + n.positionY = Math.random() * height; + } + } +}; +var getScaleInBoundsFn = function getScaleInBoundsFn(layoutInfo, options, nodes) { + var bb = layoutInfo.boundingBox; + var coseBB = { + x1: Infinity, + x2: -Infinity, + y1: Infinity, + y2: -Infinity + }; + if (options.boundingBox) { + nodes.forEach(function (node) { + var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[node.data('id')]]; + coseBB.x1 = Math.min(coseBB.x1, lnode.positionX); + coseBB.x2 = Math.max(coseBB.x2, lnode.positionX); + coseBB.y1 = Math.min(coseBB.y1, lnode.positionY); + coseBB.y2 = Math.max(coseBB.y2, lnode.positionY); + }); + coseBB.w = coseBB.x2 - coseBB.x1; + coseBB.h = coseBB.y2 - coseBB.y1; + } + return function (ele, i) { + var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[ele.data('id')]]; + if (options.boundingBox) { + // then add extra bounding box constraint + var pctX = (lnode.positionX - coseBB.x1) / coseBB.w; + var pctY = (lnode.positionY - coseBB.y1) / coseBB.h; + return { + x: bb.x1 + pctX * bb.w, + y: bb.y1 + pctY * bb.h + }; + } else { + return { + x: lnode.positionX, + y: lnode.positionY + }; + } + }; +}; + +/** + * @brief : Updates the positions of nodes in the network + * @arg layoutInfo : LayoutInfo object + * @arg cy : Cytoscape object + * @arg options : Layout options + */ +var refreshPositions = function refreshPositions(layoutInfo, cy, options) { + // var s = 'Refreshing positions'; + // logDebug(s); + + var layout = options.layout; + var nodes = options.eles.nodes(); + var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes); + nodes.positions(getScaledPos); + + // Trigger layoutReady only on first call + if (true !== layoutInfo.ready) { + // s = 'Triggering layoutready'; + // logDebug(s); + layoutInfo.ready = true; + layout.one('layoutready', options.ready); + layout.emit({ + type: 'layoutready', + layout: this + }); + } +}; + +/** + * @brief : Logs a debug message in JS console, if DEBUG is ON + */ +// var logDebug = function(text) { +// if (DEBUG) { +// console.debug(text); +// } +// }; + +/** + * @brief : Performs one iteration of the physical simulation + * @arg layoutInfo : LayoutInfo object already initialized + * @arg cy : Cytoscape object + * @arg options : Layout options + */ +var step = function step(layoutInfo, options, _step) { + // var s = "\n\n###############################"; + // s += "\nSTEP: " + step; + // s += "\n###############################\n"; + // logDebug(s); + + // Calculate node repulsions + calculateNodeForces(layoutInfo, options); + // Calculate edge forces + calculateEdgeForces(layoutInfo); + // Calculate gravity forces + calculateGravityForces(layoutInfo, options); + // Propagate forces from parent to child + propagateForces(layoutInfo); + // Update positions based on calculated forces + updatePositions(layoutInfo); +}; + +/** + * @brief : Computes the node repulsion forces + */ +var calculateNodeForces = function calculateNodeForces(layoutInfo, options) { + // Go through each of the graphs in graphSet + // Nodes only repel each other if they belong to the same graph + // var s = 'calculateNodeForces'; + // logDebug(s); + for (var i = 0; i < layoutInfo.graphSet.length; i++) { + var graph = layoutInfo.graphSet[i]; + var numNodes = graph.length; + + // s = "Set: " + graph.toString(); + // logDebug(s); + + // Now get all the pairs of nodes + // Only get each pair once, (A, B) = (B, A) + for (var j = 0; j < numNodes; j++) { + var node1 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; + for (var k = j + 1; k < numNodes; k++) { + var node2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[k]]]; + nodeRepulsion(node1, node2, layoutInfo, options); + } + } + } +}; +var randomDistance = function randomDistance(max) { + return -max + 2 * max * Math.random(); +}; + +/** + * @brief : Compute the node repulsion forces between a pair of nodes + */ +var nodeRepulsion = function nodeRepulsion(node1, node2, layoutInfo, options) { + // var s = "Node repulsion. Node1: " + node1.id + " Node2: " + node2.id; + + var cmptId1 = node1.cmptId; + var cmptId2 = node2.cmptId; + if (cmptId1 !== cmptId2 && !layoutInfo.isCompound) { + return; + } + + // Get direction of line connecting both node centers + var directionX = node2.positionX - node1.positionX; + var directionY = node2.positionY - node1.positionY; + var maxRandDist = 1; + // s += "\ndirectionX: " + directionX + ", directionY: " + directionY; + + // If both centers are the same, apply a random force + if (0 === directionX && 0 === directionY) { + directionX = randomDistance(maxRandDist); + directionY = randomDistance(maxRandDist); + } + var overlap = nodesOverlap(node1, node2, directionX, directionY); + if (overlap > 0) { + // s += "\nNodes DO overlap."; + // s += "\nOverlap: " + overlap; + // If nodes overlap, repulsion force is proportional + // to the overlap + var force = options.nodeOverlap * overlap; + + // Compute the module and components of the force vector + var distance = Math.sqrt(directionX * directionX + directionY * directionY); + // s += "\nDistance: " + distance; + var forceX = force * directionX / distance; + var forceY = force * directionY / distance; + } else { + // s += "\nNodes do NOT overlap."; + // If there's no overlap, force is inversely proportional + // to squared distance + + // Get clipping points for both nodes + var point1 = findClippingPoint(node1, directionX, directionY); + var point2 = findClippingPoint(node2, -1 * directionX, -1 * directionY); + + // Use clipping points to compute distance + var distanceX = point2.x - point1.x; + var distanceY = point2.y - point1.y; + var distanceSqr = distanceX * distanceX + distanceY * distanceY; + var distance = Math.sqrt(distanceSqr); + // s += "\nDistance: " + distance; + + // Compute the module and components of the force vector + var force = (node1.nodeRepulsion + node2.nodeRepulsion) / distanceSqr; + var forceX = force * distanceX / distance; + var forceY = force * distanceY / distance; + } + + // Apply force + if (!node1.isLocked) { + node1.offsetX -= forceX; + node1.offsetY -= forceY; + } + if (!node2.isLocked) { + node2.offsetX += forceX; + node2.offsetY += forceY; + } + + // s += "\nForceX: " + forceX + " ForceY: " + forceY; + // logDebug(s); + + return; +}; + +/** + * @brief : Determines whether two nodes overlap or not + * @return : Amount of overlapping (0 => no overlap) + */ +var nodesOverlap = function nodesOverlap(node1, node2, dX, dY) { + if (dX > 0) { + var overlapX = node1.maxX - node2.minX; + } else { + var overlapX = node2.maxX - node1.minX; + } + if (dY > 0) { + var overlapY = node1.maxY - node2.minY; + } else { + var overlapY = node2.maxY - node1.minY; + } + if (overlapX >= 0 && overlapY >= 0) { + return Math.sqrt(overlapX * overlapX + overlapY * overlapY); + } else { + return 0; + } +}; + +/** + * @brief : Finds the point in which an edge (direction dX, dY) intersects + * the rectangular bounding box of it's source/target node + */ +var findClippingPoint = function findClippingPoint(node, dX, dY) { + // Shorcuts + var X = node.positionX; + var Y = node.positionY; + var H = node.height || 1; + var W = node.width || 1; + var dirSlope = dY / dX; + var nodeSlope = H / W; + + // var s = 'Computing clipping point of node ' + node.id + + // " . Height: " + H + ", Width: " + W + + // "\nDirection " + dX + ", " + dY; + // + // Compute intersection + var res = {}; + + // Case: Vertical direction (up) + if (0 === dX && 0 < dY) { + res.x = X; + // s += "\nUp direction"; + res.y = Y + H / 2; + return res; + } + + // Case: Vertical direction (down) + if (0 === dX && 0 > dY) { + res.x = X; + res.y = Y + H / 2; + // s += "\nDown direction"; + + return res; + } + + // Case: Intersects the right border + if (0 < dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { + res.x = X + W / 2; + res.y = Y + W * dY / 2 / dX; + // s += "\nRightborder"; + + return res; + } + + // Case: Intersects the left border + if (0 > dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { + res.x = X - W / 2; + res.y = Y - W * dY / 2 / dX; + // s += "\nLeftborder"; + + return res; + } + + // Case: Intersects the top border + if (0 < dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { + res.x = X + H * dX / 2 / dY; + res.y = Y + H / 2; + // s += "\nTop border"; + + return res; + } + + // Case: Intersects the bottom border + if (0 > dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { + res.x = X - H * dX / 2 / dY; + res.y = Y - H / 2; + // s += "\nBottom border"; + + return res; + } + + // s += "\nClipping point found at " + res.x + ", " + res.y; + // logDebug(s); + return res; +}; + +/** + * @brief : Calculates all edge forces + */ +var calculateEdgeForces = function calculateEdgeForces(layoutInfo, options) { + // Iterate over all edges + for (var i = 0; i < layoutInfo.edgeSize; i++) { + // Get edge, source & target nodes + var edge = layoutInfo.layoutEdges[i]; + var sourceIx = layoutInfo.idToIndex[edge.sourceId]; + var source = layoutInfo.layoutNodes[sourceIx]; + var targetIx = layoutInfo.idToIndex[edge.targetId]; + var target = layoutInfo.layoutNodes[targetIx]; + + // Get direction of line connecting both node centers + var directionX = target.positionX - source.positionX; + var directionY = target.positionY - source.positionY; + + // If both centers are the same, do nothing. + // A random force has already been applied as node repulsion + if (0 === directionX && 0 === directionY) { + continue; + } + + // Get clipping points for both nodes + var point1 = findClippingPoint(source, directionX, directionY); + var point2 = findClippingPoint(target, -1 * directionX, -1 * directionY); + var lx = point2.x - point1.x; + var ly = point2.y - point1.y; + var l = Math.sqrt(lx * lx + ly * ly); + var force = Math.pow(edge.idealLength - l, 2) / edge.elasticity; + if (0 !== l) { + var forceX = force * lx / l; + var forceY = force * ly / l; + } else { + var forceX = 0; + var forceY = 0; + } + + // Add this force to target and source nodes + if (!source.isLocked) { + source.offsetX += forceX; + source.offsetY += forceY; + } + if (!target.isLocked) { + target.offsetX -= forceX; + target.offsetY -= forceY; + } + + // var s = 'Edge force between nodes ' + source.id + ' and ' + target.id; + // s += "\nDistance: " + l + " Force: (" + forceX + ", " + forceY + ")"; + // logDebug(s); + } +}; + +/** + * @brief : Computes gravity forces for all nodes + */ +var calculateGravityForces = function calculateGravityForces(layoutInfo, options) { + if (options.gravity === 0) { + return; + } + var distThreshold = 1; + + // var s = 'calculateGravityForces'; + // logDebug(s); + for (var i = 0; i < layoutInfo.graphSet.length; i++) { + var graph = layoutInfo.graphSet[i]; + var numNodes = graph.length; + + // s = "Set: " + graph.toString(); + // logDebug(s); + + // Compute graph center + if (0 === i) { + var centerX = layoutInfo.clientHeight / 2; + var centerY = layoutInfo.clientWidth / 2; + } else { + // Get Parent node for this graph, and use its position as center + var temp = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[0]]]; + var parent = layoutInfo.layoutNodes[layoutInfo.idToIndex[temp.parentId]]; + var centerX = parent.positionX; + var centerY = parent.positionY; + } + // s = "Center found at: " + centerX + ", " + centerY; + // logDebug(s); + + // Apply force to all nodes in graph + for (var j = 0; j < numNodes; j++) { + var node = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; + // s = "Node: " + node.id; + + if (node.isLocked) { + continue; + } + var dx = centerX - node.positionX; + var dy = centerY - node.positionY; + var d = Math.sqrt(dx * dx + dy * dy); + if (d > distThreshold) { + var fx = options.gravity * dx / d; + var fy = options.gravity * dy / d; + node.offsetX += fx; + node.offsetY += fy; + // s += ": Applied force: " + fx + ", " + fy; + } + // logDebug(s); + } + } +}; + +/** + * @brief : This function propagates the existing offsets from + * parent nodes to its descendents. + * @arg layoutInfo : layoutInfo Object + * @arg cy : cytoscape Object + * @arg options : Layout options + */ +var propagateForces = function propagateForces(layoutInfo, options) { + // Inline implementation of a queue, used for traversing the graph in BFS order + var queue = []; + var start = 0; // Points to the start the queue + var end = -1; // Points to the end of the queue + + // logDebug('propagateForces'); + + // Start by visiting the nodes in the root graph + queue.push.apply(queue, layoutInfo.graphSet[0]); + end += layoutInfo.graphSet[0].length; + + // Traverse the graph, level by level, + while (start <= end) { + // Get the node to visit and remove it from queue + var nodeId = queue[start++]; + var nodeIndex = layoutInfo.idToIndex[nodeId]; + var node = layoutInfo.layoutNodes[nodeIndex]; + var children = node.children; + + // We only need to process the node if it's compound + if (0 < children.length && !node.isLocked) { + var offX = node.offsetX; + var offY = node.offsetY; + + // var s = "Propagating offset from parent node : " + node.id + + // ". OffsetX: " + offX + ". OffsetY: " + offY; + // s += "\n Children: " + children.toString(); + // logDebug(s); + + for (var i = 0; i < children.length; i++) { + var childNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[children[i]]]; + // Propagate offset + childNode.offsetX += offX; + childNode.offsetY += offY; + // Add children to queue to be visited + queue[++end] = children[i]; + } + + // Reset parent offsets + node.offsetX = 0; + node.offsetY = 0; + } + } +}; + +/** + * @brief : Updates the layout model positions, based on + * the accumulated forces + */ +var updatePositions = function updatePositions(layoutInfo, options) { + // var s = 'Updating positions'; + // logDebug(s); + + // Reset boundaries for compound nodes + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + if (0 < n.children.length) { + // logDebug("Resetting boundaries of compound node: " + n.id); + n.maxX = undefined; + n.minX = undefined; + n.maxY = undefined; + n.minY = undefined; + } + } + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + if (0 < n.children.length || n.isLocked) { + // No need to set compound or locked node position + // logDebug("Skipping position update of node: " + n.id); + continue; + } + // s = "Node: " + n.id + " Previous position: (" + + // n.positionX + ", " + n.positionY + ")."; + + // Limit displacement in order to improve stability + var tempForce = limitForce(n.offsetX, n.offsetY, layoutInfo.temperature); + n.positionX += tempForce.x; + n.positionY += tempForce.y; + n.offsetX = 0; + n.offsetY = 0; + n.minX = n.positionX - n.width; + n.maxX = n.positionX + n.width; + n.minY = n.positionY - n.height; + n.maxY = n.positionY + n.height; + // s += " New Position: (" + n.positionX + ", " + n.positionY + ")."; + // logDebug(s); + + // Update ancestry boudaries + updateAncestryBoundaries(n, layoutInfo); + } + + // Update size, position of compund nodes + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + if (0 < n.children.length && !n.isLocked) { + n.positionX = (n.maxX + n.minX) / 2; + n.positionY = (n.maxY + n.minY) / 2; + n.width = n.maxX - n.minX; + n.height = n.maxY - n.minY; + // s = "Updating position, size of compound node " + n.id; + // s += "\nPositionX: " + n.positionX + ", PositionY: " + n.positionY; + // s += "\nWidth: " + n.width + ", Height: " + n.height; + // logDebug(s); + } + } +}; + +/** + * @brief : Limits a force (forceX, forceY) to be not + * greater (in modulo) than max. + 8 Preserves force direction. + */ +var limitForce = function limitForce(forceX, forceY, max) { + // var s = "Limiting force: (" + forceX + ", " + forceY + "). Max: " + max; + var force = Math.sqrt(forceX * forceX + forceY * forceY); + if (force > max) { + var res = { + x: max * forceX / force, + y: max * forceY / force + }; + } else { + var res = { + x: forceX, + y: forceY + }; + } + + // s += ".\nResult: (" + res.x + ", " + res.y + ")"; + // logDebug(s); + + return res; +}; + +/** + * @brief : Function used for keeping track of compound node + * sizes, since they should bound all their subnodes. + */ +var updateAncestryBoundaries = function updateAncestryBoundaries(node, layoutInfo) { + // var s = "Propagating new position/size of node " + node.id; + var parentId = node.parentId; + if (null == parentId) { + // If there's no parent, we are done + // s += ". No parent node."; + // logDebug(s); + return; + } + + // Get Parent Node + var p = layoutInfo.layoutNodes[layoutInfo.idToIndex[parentId]]; + var flag = false; + + // MaxX + if (null == p.maxX || node.maxX + p.padRight > p.maxX) { + p.maxX = node.maxX + p.padRight; + flag = true; + // s += "\nNew maxX for parent node " + p.id + ": " + p.maxX; + } + + // MinX + if (null == p.minX || node.minX - p.padLeft < p.minX) { + p.minX = node.minX - p.padLeft; + flag = true; + // s += "\nNew minX for parent node " + p.id + ": " + p.minX; + } + + // MaxY + if (null == p.maxY || node.maxY + p.padBottom > p.maxY) { + p.maxY = node.maxY + p.padBottom; + flag = true; + // s += "\nNew maxY for parent node " + p.id + ": " + p.maxY; + } + + // MinY + if (null == p.minY || node.minY - p.padTop < p.minY) { + p.minY = node.minY - p.padTop; + flag = true; + // s += "\nNew minY for parent node " + p.id + ": " + p.minY; + } + + // If updated boundaries, propagate changes upward + if (flag) { + // logDebug(s); + return updateAncestryBoundaries(p, layoutInfo); + } + + // s += ". No changes in boundaries/position of parent node " + p.id; + // logDebug(s); + return; +}; +var separateComponents = function separateComponents(layoutInfo, options) { + var nodes = layoutInfo.layoutNodes; + var components = []; + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var cid = node.cmptId; + var component = components[cid] = components[cid] || []; + component.push(node); + } + var totalA = 0; + for (var i = 0; i < components.length; i++) { + var c = components[i]; + if (!c) { + continue; + } + c.x1 = Infinity; + c.x2 = -Infinity; + c.y1 = Infinity; + c.y2 = -Infinity; + for (var j = 0; j < c.length; j++) { + var n = c[j]; + c.x1 = Math.min(c.x1, n.positionX - n.width / 2); + c.x2 = Math.max(c.x2, n.positionX + n.width / 2); + c.y1 = Math.min(c.y1, n.positionY - n.height / 2); + c.y2 = Math.max(c.y2, n.positionY + n.height / 2); + } + c.w = c.x2 - c.x1; + c.h = c.y2 - c.y1; + totalA += c.w * c.h; + } + components.sort(function (c1, c2) { + return c2.w * c2.h - c1.w * c1.h; + }); + var x = 0; + var y = 0; + var usedW = 0; + var rowH = 0; + var maxRowW = Math.sqrt(totalA) * layoutInfo.clientWidth / layoutInfo.clientHeight; + for (var i = 0; i < components.length; i++) { + var c = components[i]; + if (!c) { + continue; + } + for (var j = 0; j < c.length; j++) { + var n = c[j]; + if (!n.isLocked) { + n.positionX += x - c.x1; + n.positionY += y - c.y1; + } + } + x += c.w + options.componentSpacing; + usedW += c.w + options.componentSpacing; + rowH = Math.max(rowH, c.h); + if (usedW > maxRowW) { + y += rowH + options.componentSpacing; + x = 0; + usedW = 0; + rowH = 0; + } + } +}; + +var defaults$3 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // padding used on fit + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + avoidOverlapPadding: 10, + // extra spacing around nodes when avoidOverlap: true + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + spacingFactor: undefined, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + condense: false, + // uses all available space on false, uses minimal space on true + rows: undefined, + // force num of rows in the grid + cols: undefined, + // force num of columns in the grid + position: function position(node) {}, + // returns { row, col } for element + sort: undefined, + // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts +}; + +function GridLayout(options) { + this.options = extend({}, defaults$3, options); +} +GridLayout.prototype.run = function () { + var params = this.options; + var options = params; + var cy = params.cy; + var eles = options.eles; + var nodes = eles.nodes().not(':parent'); + if (options.sort) { + nodes = nodes.sort(options.sort); + } + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + if (bb.h === 0 || bb.w === 0) { + eles.nodes().layoutPositions(this, options, function (ele) { + return { + x: bb.x1, + y: bb.y1 + }; + }); + } else { + // width/height * splits^2 = cells where splits is number of times to split width + var cells = nodes.size(); + var splits = Math.sqrt(cells * bb.h / bb.w); + var rows = Math.round(splits); + var cols = Math.round(bb.w / bb.h * splits); + var small = function small(val) { + if (val == null) { + return Math.min(rows, cols); + } else { + var min = Math.min(rows, cols); + if (min == rows) { + rows = val; + } else { + cols = val; + } + } + }; + var large = function large(val) { + if (val == null) { + return Math.max(rows, cols); + } else { + var max = Math.max(rows, cols); + if (max == rows) { + rows = val; + } else { + cols = val; + } + } + }; + var oRows = options.rows; + var oCols = options.cols != null ? options.cols : options.columns; + + // if rows or columns were set in options, use those values + if (oRows != null && oCols != null) { + rows = oRows; + cols = oCols; + } else if (oRows != null && oCols == null) { + rows = oRows; + cols = Math.ceil(cells / rows); + } else if (oRows == null && oCols != null) { + cols = oCols; + rows = Math.ceil(cells / cols); + } + + // otherwise use the automatic values and adjust accordingly + + // if rounding was up, see if we can reduce rows or columns + else if (cols * rows > cells) { + var sm = small(); + var lg = large(); + + // reducing the small side takes away the most cells, so try it first + if ((sm - 1) * lg >= cells) { + small(sm - 1); + } else if ((lg - 1) * sm >= cells) { + large(lg - 1); + } + } else { + // if rounding was too low, add rows or columns + while (cols * rows < cells) { + var _sm = small(); + var _lg = large(); + + // try to add to larger side first (adds less in multiplication) + if ((_lg + 1) * _sm >= cells) { + large(_lg + 1); + } else { + small(_sm + 1); + } + } + } + var cellWidth = bb.w / cols; + var cellHeight = bb.h / rows; + if (options.condense) { + cellWidth = 0; + cellHeight = 0; + } + if (options.avoidOverlap) { + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var pos = node._private.position; + if (pos.x == null || pos.y == null) { + // for bb + pos.x = 0; + pos.y = 0; + } + var nbb = node.layoutDimensions(options); + var p = options.avoidOverlapPadding; + var w = nbb.w + p; + var h = nbb.h + p; + cellWidth = Math.max(cellWidth, w); + cellHeight = Math.max(cellHeight, h); + } + } + var cellUsed = {}; // e.g. 'c-0-2' => true + + var used = function used(row, col) { + return cellUsed['c-' + row + '-' + col] ? true : false; + }; + var use = function use(row, col) { + cellUsed['c-' + row + '-' + col] = true; + }; + + // to keep track of current cell position + var row = 0; + var col = 0; + var moveToNextCell = function moveToNextCell() { + col++; + if (col >= cols) { + col = 0; + row++; + } + }; + + // get a cache of all the manual positions + var id2manPos = {}; + for (var _i = 0; _i < nodes.length; _i++) { + var _node = nodes[_i]; + var rcPos = options.position(_node); + if (rcPos && (rcPos.row !== undefined || rcPos.col !== undefined)) { + // must have at least row or col def'd + var _pos = { + row: rcPos.row, + col: rcPos.col + }; + if (_pos.col === undefined) { + // find unused col + _pos.col = 0; + while (used(_pos.row, _pos.col)) { + _pos.col++; + } + } else if (_pos.row === undefined) { + // find unused row + _pos.row = 0; + while (used(_pos.row, _pos.col)) { + _pos.row++; + } + } + id2manPos[_node.id()] = _pos; + use(_pos.row, _pos.col); + } + } + var getPos = function getPos(element, i) { + var x, y; + if (element.locked() || element.isParent()) { + return false; + } + + // see if we have a manual position set + var rcPos = id2manPos[element.id()]; + if (rcPos) { + x = rcPos.col * cellWidth + cellWidth / 2 + bb.x1; + y = rcPos.row * cellHeight + cellHeight / 2 + bb.y1; + } else { + // otherwise set automatically + + while (used(row, col)) { + moveToNextCell(); + } + x = col * cellWidth + cellWidth / 2 + bb.x1; + y = row * cellHeight + cellHeight / 2 + bb.y1; + use(row, col); + moveToNextCell(); + } + return { + x: x, + y: y + }; + }; + nodes.layoutPositions(this, options, getPos); + } + return this; // chaining +}; + +// default layout options +var defaults$2 = { + ready: function ready() {}, + // on layoutready + stop: function stop() {} // on layoutstop +}; + +// constructor +// options : object containing layout options +function NullLayout(options) { + this.options = extend({}, defaults$2, options); +} + +// runs the layout +NullLayout.prototype.run = function () { + var options = this.options; + var eles = options.eles; // elements to consider in the layout + var layout = this; + + // cy is automatically populated for us in the constructor + // (disable eslint for next line as this serves as example layout code to external developers) + // eslint-disable-next-line no-unused-vars + options.cy; + layout.emit('layoutstart'); + + // puts all nodes at (0, 0) + // n.b. most layouts would use layoutPositions(), instead of positions() and manual events + eles.nodes().positions(function () { + return { + x: 0, + y: 0 + }; + }); + + // trigger layoutready when each node has had its position set at least once + layout.one('layoutready', options.ready); + layout.emit('layoutready'); + + // trigger layoutstop when the layout stops (e.g. finishes) + layout.one('layoutstop', options.stop); + layout.emit('layoutstop'); + return this; // chaining +}; + +// called on continuous layouts to stop them before they finish +NullLayout.prototype.stop = function () { + return this; // chaining +}; + +var defaults$1 = { + positions: undefined, + // map of (node id) => (position obj); or function(node){ return somPos; } + zoom: undefined, + // the zoom level to set (prob want fit = false if set) + pan: undefined, + // the pan level to set (prob want fit = false if set) + fit: true, + // whether to fit to viewport + padding: 30, + // padding on fit + spacingFactor: undefined, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts +}; + +function PresetLayout(options) { + this.options = extend({}, defaults$1, options); +} +PresetLayout.prototype.run = function () { + var options = this.options; + var eles = options.eles; + var nodes = eles.nodes(); + var posIsFn = fn$6(options.positions); + function getPosition(node) { + if (options.positions == null) { + return copyPosition(node.position()); + } + if (posIsFn) { + return options.positions(node); + } + var pos = options.positions[node._private.data.id]; + if (pos == null) { + return null; + } + return pos; + } + nodes.layoutPositions(this, options, function (node, i) { + var position = getPosition(node); + if (node.locked() || position == null) { + return false; + } + return position; + }); + return this; // chaining +}; + +var defaults = { + fit: true, + // whether to fit to viewport + padding: 30, + // fit padding + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts +}; + +function RandomLayout(options) { + this.options = extend({}, defaults, options); +} +RandomLayout.prototype.run = function () { + var options = this.options; + var cy = options.cy; + var eles = options.eles; + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var getPos = function getPos(node, i) { + return { + x: bb.x1 + Math.round(Math.random() * bb.w), + y: bb.y1 + Math.round(Math.random() * bb.h) + }; + }; + eles.nodes().layoutPositions(this, options, getPos); + return this; // chaining +}; + +var layout = [{ + name: 'breadthfirst', + impl: BreadthFirstLayout +}, { + name: 'circle', + impl: CircleLayout +}, { + name: 'concentric', + impl: ConcentricLayout +}, { + name: 'cose', + impl: CoseLayout +}, { + name: 'grid', + impl: GridLayout +}, { + name: 'null', + impl: NullLayout +}, { + name: 'preset', + impl: PresetLayout +}, { + name: 'random', + impl: RandomLayout +}]; + +function NullRenderer(options) { + this.options = options; + this.notifications = 0; // for testing +} + +var noop = function noop() {}; +var throwImgErr = function throwImgErr() { + throw new Error('A headless instance can not render images'); +}; +NullRenderer.prototype = { + recalculateRenderedStyle: noop, + notify: function notify() { + this.notifications++; + }, + init: noop, + isHeadless: function isHeadless() { + return true; + }, + png: throwImgErr, + jpg: throwImgErr +}; + +var BRp$f = {}; +BRp$f.arrowShapeWidth = 0.3; +BRp$f.registerArrowShapes = function () { + var arrowShapes = this.arrowShapes = {}; + var renderer = this; + + // Contract for arrow shapes: + // 0, 0 is arrow tip + // (0, 1) is direction towards node + // (1, 0) is right + // + // functional api: + // collide: check x, y in shape + // roughCollide: called before collide, no false negatives + // draw: draw + // spacing: dist(arrowTip, nodeBoundary) + // gap: dist(edgeTip, nodeBoundary), edgeTip may != arrowTip + + var bbCollide = function bbCollide(x, y, size, angle, translation, edgeWidth, padding) { + var x1 = translation.x - size / 2 - padding; + var x2 = translation.x + size / 2 + padding; + var y1 = translation.y - size / 2 - padding; + var y2 = translation.y + size / 2 + padding; + var inside = x1 <= x && x <= x2 && y1 <= y && y <= y2; + return inside; + }; + var transform = function transform(x, y, size, angle, translation) { + var xRotated = x * Math.cos(angle) - y * Math.sin(angle); + var yRotated = x * Math.sin(angle) + y * Math.cos(angle); + var xScaled = xRotated * size; + var yScaled = yRotated * size; + var xTranslated = xScaled + translation.x; + var yTranslated = yScaled + translation.y; + return { + x: xTranslated, + y: yTranslated + }; + }; + var transformPoints = function transformPoints(pts, size, angle, translation) { + var retPts = []; + for (var i = 0; i < pts.length; i += 2) { + var x = pts[i]; + var y = pts[i + 1]; + retPts.push(transform(x, y, size, angle, translation)); + } + return retPts; + }; + var pointsToArr = function pointsToArr(pts) { + var ret = []; + for (var i = 0; i < pts.length; i++) { + var p = pts[i]; + ret.push(p.x, p.y); + } + return ret; + }; + var standardGap = function standardGap(edge) { + return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').pfValue * 2; + }; + var defineArrowShape = function defineArrowShape(name, defn) { + if (string(defn)) { + defn = arrowShapes[defn]; + } + arrowShapes[name] = extend({ + name: name, + points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3], + collide: function collide(x, y, size, angle, translation, padding) { + var points = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + var inside = pointInsidePolygonPoints(x, y, points); + return inside; + }, + roughCollide: bbCollide, + draw: function draw(context, size, angle, translation) { + var points = transformPoints(this.points, size, angle, translation); + renderer.arrowShapeImpl('polygon')(context, points); + }, + spacing: function spacing(edge) { + return 0; + }, + gap: standardGap + }, defn); + }; + defineArrowShape('none', { + collide: falsify, + roughCollide: falsify, + draw: noop$1, + spacing: zeroify, + gap: zeroify + }); + defineArrowShape('triangle', { + points: [-0.15, -0.3, 0, 0, 0.15, -0.3] + }); + defineArrowShape('arrow', 'triangle'); + defineArrowShape('triangle-backcurve', { + points: arrowShapes['triangle'].points, + controlPoint: [0, -0.15], + roughCollide: bbCollide, + draw: function draw(context, size, angle, translation, edgeWidth) { + var ptsTrans = transformPoints(this.points, size, angle, translation); + var ctrlPt = this.controlPoint; + var ctrlPtTrans = transform(ctrlPt[0], ctrlPt[1], size, angle, translation); + renderer.arrowShapeImpl(this.name)(context, ptsTrans, ctrlPtTrans); + }, + gap: function gap(edge) { + return standardGap(edge) * 0.8; + } + }); + defineArrowShape('triangle-tee', { + points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], + pointsTee: [-0.15, -0.4, -0.15, -0.5, 0.15, -0.5, 0.15, -0.4], + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + var teePts = pointsToArr(transformPoints(this.pointsTee, size + 2 * padding, angle, translation)); + var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts); + return inside; + }, + draw: function draw(context, size, angle, translation, edgeWidth) { + var triPts = transformPoints(this.points, size, angle, translation); + var teePts = transformPoints(this.pointsTee, size, angle, translation); + renderer.arrowShapeImpl(this.name)(context, triPts, teePts); + } + }); + defineArrowShape('circle-triangle', { + radius: 0.15, + pointsTr: [0, -0.15, 0.15, -0.45, -0.15, -0.45, 0, -0.15], + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var t = translation; + var circleInside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2); + var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + return pointInsidePolygonPoints(x, y, triPts) || circleInside; + }, + draw: function draw(context, size, angle, translation, edgeWidth) { + var triPts = transformPoints(this.pointsTr, size, angle, translation); + renderer.arrowShapeImpl(this.name)(context, triPts, translation.x, translation.y, this.radius * size); + }, + spacing: function spacing(edge) { + return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius; + } + }); + defineArrowShape('triangle-cross', { + points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], + baseCrossLinePts: [-0.15, -0.4, + // first half of the rectangle + -0.15, -0.4, 0.15, -0.4, + // second half of the rectangle + 0.15, -0.4], + crossLinePts: function crossLinePts(size, edgeWidth) { + // shift points so that the distance between the cross points matches edge width + var p = this.baseCrossLinePts.slice(); + var shiftFactor = edgeWidth / size; + var y0 = 3; + var y1 = 5; + p[y0] = p[y0] - shiftFactor; + p[y1] = p[y1] - shiftFactor; + return p; + }, + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + var teePts = pointsToArr(transformPoints(this.crossLinePts(size, edgeWidth), size + 2 * padding, angle, translation)); + var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts); + return inside; + }, + draw: function draw(context, size, angle, translation, edgeWidth) { + var triPts = transformPoints(this.points, size, angle, translation); + var crossLinePts = transformPoints(this.crossLinePts(size, edgeWidth), size, angle, translation); + renderer.arrowShapeImpl(this.name)(context, triPts, crossLinePts); + } + }); + defineArrowShape('vee', { + points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15], + gap: function gap(edge) { + return standardGap(edge) * 0.525; + } + }); + defineArrowShape('circle', { + radius: 0.15, + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var t = translation; + var inside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2); + return inside; + }, + draw: function draw(context, size, angle, translation, edgeWidth) { + renderer.arrowShapeImpl(this.name)(context, translation.x, translation.y, this.radius * size); + }, + spacing: function spacing(edge) { + return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius; + } + }); + defineArrowShape('tee', { + points: [-0.15, 0, -0.15, -0.1, 0.15, -0.1, 0.15, 0], + spacing: function spacing(edge) { + return 1; + }, + gap: function gap(edge) { + return 1; + } + }); + defineArrowShape('square', { + points: [-0.15, 0.00, 0.15, 0.00, 0.15, -0.3, -0.15, -0.3] + }); + defineArrowShape('diamond', { + points: [-0.15, -0.15, 0, -0.3, 0.15, -0.15, 0, 0], + gap: function gap(edge) { + return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value; + } + }); + defineArrowShape('chevron', { + points: [0, 0, -0.15, -0.15, -0.1, -0.2, 0, -0.1, 0.1, -0.2, 0.15, -0.15], + gap: function gap(edge) { + return 0.95 * edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value; + } + }); +}; + +var BRp$e = {}; + +// Project mouse +BRp$e.projectIntoViewport = function (clientX, clientY) { + var cy = this.cy; + var offsets = this.findContainerClientCoords(); + var offsetLeft = offsets[0]; + var offsetTop = offsets[1]; + var scale = offsets[4]; + var pan = cy.pan(); + var zoom = cy.zoom(); + var x = ((clientX - offsetLeft) / scale - pan.x) / zoom; + var y = ((clientY - offsetTop) / scale - pan.y) / zoom; + return [x, y]; +}; +BRp$e.findContainerClientCoords = function () { + if (this.containerBB) { + return this.containerBB; + } + var container = this.container; + var rect = container.getBoundingClientRect(); + var style = this.cy.window().getComputedStyle(container); + var styleValue = function styleValue(name) { + return parseFloat(style.getPropertyValue(name)); + }; + var padding = { + left: styleValue('padding-left'), + right: styleValue('padding-right'), + top: styleValue('padding-top'), + bottom: styleValue('padding-bottom') + }; + var border = { + left: styleValue('border-left-width'), + right: styleValue('border-right-width'), + top: styleValue('border-top-width'), + bottom: styleValue('border-bottom-width') + }; + var clientWidth = container.clientWidth; + var clientHeight = container.clientHeight; + var paddingHor = padding.left + padding.right; + var paddingVer = padding.top + padding.bottom; + var borderHor = border.left + border.right; + var scale = rect.width / (clientWidth + borderHor); + var unscaledW = clientWidth - paddingHor; + var unscaledH = clientHeight - paddingVer; + var left = rect.left + padding.left + border.left; + var top = rect.top + padding.top + border.top; + return this.containerBB = [left, top, unscaledW, unscaledH, scale]; +}; +BRp$e.invalidateContainerClientCoordsCache = function () { + this.containerBB = null; +}; +BRp$e.findNearestElement = function (x, y, interactiveElementsOnly, isTouch) { + return this.findNearestElements(x, y, interactiveElementsOnly, isTouch)[0]; +}; +BRp$e.findNearestElements = function (x, y, interactiveElementsOnly, isTouch) { + var self = this; + var r = this; + var eles = r.getCachedZSortedEles(); + var near = []; // 1 node max, 1 edge max + var zoom = r.cy.zoom(); + var hasCompounds = r.cy.hasCompoundNodes(); + var edgeThreshold = (isTouch ? 24 : 8) / zoom; + var nodeThreshold = (isTouch ? 8 : 2) / zoom; + var labelThreshold = (isTouch ? 8 : 2) / zoom; + var minSqDist = Infinity; + var nearEdge; + var nearNode; + if (interactiveElementsOnly) { + eles = eles.interactive; + } + function addEle(ele, sqDist) { + if (ele.isNode()) { + if (nearNode) { + return; // can't replace node + } else { + nearNode = ele; + near.push(ele); + } + } + if (ele.isEdge() && (sqDist == null || sqDist < minSqDist)) { + if (nearEdge) { + // then replace existing edge + // can replace only if same z-index + if (nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value && nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value) { + for (var i = 0; i < near.length; i++) { + if (near[i].isEdge()) { + near[i] = ele; + nearEdge = ele; + minSqDist = sqDist != null ? sqDist : minSqDist; + break; + } + } + } + } else { + near.push(ele); + nearEdge = ele; + minSqDist = sqDist != null ? sqDist : minSqDist; + } + } + } + function checkNode(node) { + var width = node.outerWidth() + 2 * nodeThreshold; + var height = node.outerHeight() + 2 * nodeThreshold; + var hw = width / 2; + var hh = height / 2; + var pos = node.position(); + if (pos.x - hw <= x && x <= pos.x + hw // bb check x + && pos.y - hh <= y && y <= pos.y + hh // bb check y + ) { + var shape = r.nodeShapes[self.getNodeShape(node)]; + if (shape.checkPoint(x, y, 0, width, height, pos.x, pos.y)) { + addEle(node, 0); + return true; + } + } + } + function checkEdge(edge) { + var _p = edge._private; + var rs = _p.rscratch; + var styleWidth = edge.pstyle('width').pfValue; + var scale = edge.pstyle('arrow-scale').value; + var width = styleWidth / 2 + edgeThreshold; // more like a distance radius from centre + var widthSq = width * width; + var width2 = width * 2; + var src = _p.source; + var tgt = _p.target; + var sqDist; + if (rs.edgeType === 'segments' || rs.edgeType === 'straight' || rs.edgeType === 'haystack') { + var pts = rs.allpts; + for (var i = 0; i + 3 < pts.length; i += 2) { + if (inLineVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], width2) && widthSq > (sqDist = sqdistToFiniteLine(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3]))) { + addEle(edge, sqDist); + return true; + } + } + } else if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') { + var pts = rs.allpts; + for (var i = 0; i + 5 < rs.allpts.length; i += 4) { + if (inBezierVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5], width2) && widthSq > (sqDist = sqdistToQuadraticBezier(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5]))) { + addEle(edge, sqDist); + return true; + } + } + } + + // if we're close to the edge but didn't hit it, maybe we hit its arrows + + var src = src || _p.source; + var tgt = tgt || _p.target; + var arSize = self.getArrowWidth(styleWidth, scale); + var arrows = [{ + name: 'source', + x: rs.arrowStartX, + y: rs.arrowStartY, + angle: rs.srcArrowAngle + }, { + name: 'target', + x: rs.arrowEndX, + y: rs.arrowEndY, + angle: rs.tgtArrowAngle + }, { + name: 'mid-source', + x: rs.midX, + y: rs.midY, + angle: rs.midsrcArrowAngle + }, { + name: 'mid-target', + x: rs.midX, + y: rs.midY, + angle: rs.midtgtArrowAngle + }]; + for (var i = 0; i < arrows.length; i++) { + var ar = arrows[i]; + var shape = r.arrowShapes[edge.pstyle(ar.name + '-arrow-shape').value]; + var edgeWidth = edge.pstyle('width').pfValue; + if (shape.roughCollide(x, y, arSize, ar.angle, { + x: ar.x, + y: ar.y + }, edgeWidth, edgeThreshold) && shape.collide(x, y, arSize, ar.angle, { + x: ar.x, + y: ar.y + }, edgeWidth, edgeThreshold)) { + addEle(edge); + return true; + } + } + + // for compound graphs, hitting edge may actually want a connected node instead (b/c edge may have greater z-index precedence) + if (hasCompounds && near.length > 0) { + checkNode(src); + checkNode(tgt); + } + } + function preprop(obj, name, pre) { + return getPrefixedProperty(obj, name, pre); + } + function checkLabel(ele, prefix) { + var _p = ele._private; + var th = labelThreshold; + var prefixDash; + if (prefix) { + prefixDash = prefix + '-'; + } else { + prefixDash = ''; + } + ele.boundingBox(); + var bb = _p.labelBounds[prefix || 'main']; + var text = ele.pstyle(prefixDash + 'label').value; + var eventsEnabled = ele.pstyle('text-events').strValue === 'yes'; + if (!eventsEnabled || !text) { + return; + } + var lx = preprop(_p.rscratch, 'labelX', prefix); + var ly = preprop(_p.rscratch, 'labelY', prefix); + var theta = preprop(_p.rscratch, 'labelAngle', prefix); + var ox = ele.pstyle(prefixDash + 'text-margin-x').pfValue; + var oy = ele.pstyle(prefixDash + 'text-margin-y').pfValue; + var lx1 = bb.x1 - th - ox; // (-ox, -oy) as bb already includes margin + var lx2 = bb.x2 + th - ox; // and rotation is about (lx, ly) + var ly1 = bb.y1 - th - oy; + var ly2 = bb.y2 + th - oy; + if (theta) { + var cos = Math.cos(theta); + var sin = Math.sin(theta); + var rotate = function rotate(x, y) { + x = x - lx; + y = y - ly; + return { + x: x * cos - y * sin + lx, + y: x * sin + y * cos + ly + }; + }; + var px1y1 = rotate(lx1, ly1); + var px1y2 = rotate(lx1, ly2); + var px2y1 = rotate(lx2, ly1); + var px2y2 = rotate(lx2, ly2); + var points = [ + // with the margin added after the rotation is applied + px1y1.x + ox, px1y1.y + oy, px2y1.x + ox, px2y1.y + oy, px2y2.x + ox, px2y2.y + oy, px1y2.x + ox, px1y2.y + oy]; + if (pointInsidePolygonPoints(x, y, points)) { + addEle(ele); + return true; + } + } else { + // do a cheaper bb check + if (inBoundingBox(bb, x, y)) { + addEle(ele); + return true; + } + } + } + for (var i = eles.length - 1; i >= 0; i--) { + // reverse order for precedence + var ele = eles[i]; + if (ele.isNode()) { + checkNode(ele) || checkLabel(ele); + } else { + // then edge + checkEdge(ele) || checkLabel(ele) || checkLabel(ele, 'source') || checkLabel(ele, 'target'); + } + } + return near; +}; + +// 'Give me everything from this box' +BRp$e.getAllInBox = function (x1, y1, x2, y2) { + var eles = this.getCachedZSortedEles().interactive; + var box = []; + var x1c = Math.min(x1, x2); + var x2c = Math.max(x1, x2); + var y1c = Math.min(y1, y2); + var y2c = Math.max(y1, y2); + x1 = x1c; + x2 = x2c; + y1 = y1c; + y2 = y2c; + var boxBb = makeBoundingBox({ + x1: x1, + y1: y1, + x2: x2, + y2: y2 + }); + for (var e = 0; e < eles.length; e++) { + var ele = eles[e]; + if (ele.isNode()) { + var node = ele; + var nodeBb = node.boundingBox({ + includeNodes: true, + includeEdges: false, + includeLabels: false + }); + if (boundingBoxesIntersect(boxBb, nodeBb) && !boundingBoxInBoundingBox(nodeBb, boxBb)) { + box.push(node); + } + } else { + var edge = ele; + var _p = edge._private; + var rs = _p.rscratch; + if (rs.startX != null && rs.startY != null && !inBoundingBox(boxBb, rs.startX, rs.startY)) { + continue; + } + if (rs.endX != null && rs.endY != null && !inBoundingBox(boxBb, rs.endX, rs.endY)) { + continue; + } + if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound' || rs.edgeType === 'segments' || rs.edgeType === 'haystack') { + var pts = _p.rstyle.bezierPts || _p.rstyle.linePts || _p.rstyle.haystackPts; + var allInside = true; + for (var i = 0; i < pts.length; i++) { + if (!pointInBoundingBox(boxBb, pts[i])) { + allInside = false; + break; + } + } + if (allInside) { + box.push(edge); + } + } else if (rs.edgeType === 'haystack' || rs.edgeType === 'straight') { + box.push(edge); + } + } + } + return box; +}; + +var BRp$d = {}; +BRp$d.calculateArrowAngles = function (edge) { + var rs = edge._private.rscratch; + var isHaystack = rs.edgeType === 'haystack'; + var isBezier = rs.edgeType === 'bezier'; + var isMultibezier = rs.edgeType === 'multibezier'; + var isSegments = rs.edgeType === 'segments'; + var isCompound = rs.edgeType === 'compound'; + var isSelf = rs.edgeType === 'self'; + + // Displacement gives direction for arrowhead orientation + var dispX, dispY; + var startX, startY, endX, endY, midX, midY; + if (isHaystack) { + startX = rs.haystackPts[0]; + startY = rs.haystackPts[1]; + endX = rs.haystackPts[2]; + endY = rs.haystackPts[3]; + } else { + startX = rs.arrowStartX; + startY = rs.arrowStartY; + endX = rs.arrowEndX; + endY = rs.arrowEndY; + } + midX = rs.midX; + midY = rs.midY; + + // source + // + + if (isSegments) { + dispX = startX - rs.segpts[0]; + dispY = startY - rs.segpts[1]; + } else if (isMultibezier || isCompound || isSelf || isBezier) { + var pts = rs.allpts; + var bX = qbezierAt(pts[0], pts[2], pts[4], 0.1); + var bY = qbezierAt(pts[1], pts[3], pts[5], 0.1); + dispX = startX - bX; + dispY = startY - bY; + } else { + dispX = startX - midX; + dispY = startY - midY; + } + rs.srcArrowAngle = getAngleFromDisp(dispX, dispY); + + // mid target + // + + var midX = rs.midX; + var midY = rs.midY; + if (isHaystack) { + midX = (startX + endX) / 2; + midY = (startY + endY) / 2; + } + dispX = endX - startX; + dispY = endY - startY; + if (isSegments) { + var pts = rs.allpts; + if (pts.length / 2 % 2 === 0) { + var i2 = pts.length / 2; + var i1 = i2 - 2; + dispX = pts[i2] - pts[i1]; + dispY = pts[i2 + 1] - pts[i1 + 1]; + } else { + var i2 = pts.length / 2 - 1; + var i1 = i2 - 2; + var i3 = i2 + 2; + dispX = pts[i2] - pts[i1]; + dispY = pts[i2 + 1] - pts[i1 + 1]; + } + } else if (isMultibezier || isCompound || isSelf) { + var pts = rs.allpts; + var cpts = rs.ctrlpts; + var bp0x, bp0y; + var bp1x, bp1y; + if (cpts.length / 2 % 2 === 0) { + var p0 = pts.length / 2 - 1; // startpt + var ic = p0 + 2; + var p1 = ic + 2; + bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0); + bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0); + bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0001); + bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0001); + } else { + var ic = pts.length / 2 - 1; // ctrpt + var p0 = ic - 2; // startpt + var p1 = ic + 2; // endpt + + bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.4999); + bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.4999); + bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.5); + bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.5); + } + dispX = bp1x - bp0x; + dispY = bp1y - bp0y; + } + rs.midtgtArrowAngle = getAngleFromDisp(dispX, dispY); + rs.midDispX = dispX; + rs.midDispY = dispY; + + // mid source + // + + dispX *= -1; + dispY *= -1; + if (isSegments) { + var pts = rs.allpts; + if (pts.length / 2 % 2 === 0) ; else { + var i2 = pts.length / 2 - 1; + var i3 = i2 + 2; + dispX = -(pts[i3] - pts[i2]); + dispY = -(pts[i3 + 1] - pts[i2 + 1]); + } + } + rs.midsrcArrowAngle = getAngleFromDisp(dispX, dispY); + + // target + // + + if (isSegments) { + dispX = endX - rs.segpts[rs.segpts.length - 2]; + dispY = endY - rs.segpts[rs.segpts.length - 1]; + } else if (isMultibezier || isCompound || isSelf || isBezier) { + var pts = rs.allpts; + var l = pts.length; + var bX = qbezierAt(pts[l - 6], pts[l - 4], pts[l - 2], 0.9); + var bY = qbezierAt(pts[l - 5], pts[l - 3], pts[l - 1], 0.9); + dispX = endX - bX; + dispY = endY - bY; + } else { + dispX = endX - midX; + dispY = endY - midY; + } + rs.tgtArrowAngle = getAngleFromDisp(dispX, dispY); +}; +BRp$d.getArrowWidth = BRp$d.getArrowHeight = function (edgeWidth, scale) { + var cache = this.arrowWidthCache = this.arrowWidthCache || {}; + var cachedVal = cache[edgeWidth + ', ' + scale]; + if (cachedVal) { + return cachedVal; + } + cachedVal = Math.max(Math.pow(edgeWidth * 13.37, 0.9), 29) * scale; + cache[edgeWidth + ', ' + scale] = cachedVal; + return cachedVal; +}; + +var BRp$c = {}; +BRp$c.findMidptPtsEtc = function (edge, pairInfo) { + var posPts = pairInfo.posPts, + intersectionPts = pairInfo.intersectionPts, + vectorNormInverse = pairInfo.vectorNormInverse; + var midptPts; + + // n.b. assumes all edges in bezier bundle have same endpoints specified + var srcManEndpt = edge.pstyle('source-endpoint'); + var tgtManEndpt = edge.pstyle('target-endpoint'); + var haveManualEndPts = srcManEndpt.units != null && tgtManEndpt.units != null; + var recalcVectorNormInverse = function recalcVectorNormInverse(x1, y1, x2, y2) { + var dy = y2 - y1; + var dx = x2 - x1; + var l = Math.sqrt(dx * dx + dy * dy); + return { + x: -dy / l, + y: dx / l + }; + }; + var edgeDistances = edge.pstyle('edge-distances').value; + switch (edgeDistances) { + case 'node-position': + midptPts = posPts; + break; + case 'intersection': + midptPts = intersectionPts; + break; + case 'endpoints': + { + if (haveManualEndPts) { + var _this$manualEndptToPx = this.manualEndptToPx(edge.source()[0], srcManEndpt), + _this$manualEndptToPx2 = _slicedToArray(_this$manualEndptToPx, 2), + x1 = _this$manualEndptToPx2[0], + y1 = _this$manualEndptToPx2[1]; + var _this$manualEndptToPx3 = this.manualEndptToPx(edge.target()[0], tgtManEndpt), + _this$manualEndptToPx4 = _slicedToArray(_this$manualEndptToPx3, 2), + x2 = _this$manualEndptToPx4[0], + y2 = _this$manualEndptToPx4[1]; + var endPts = { + x1: x1, + y1: y1, + x2: x2, + y2: y2 + }; + vectorNormInverse = recalcVectorNormInverse(x1, y1, x2, y2); + midptPts = endPts; + } else { + warn("Edge ".concat(edge.id(), " has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")); + midptPts = intersectionPts; // back to default + } + + break; + } + } + return { + midptPts: midptPts, + vectorNormInverse: vectorNormInverse + }; +}; +BRp$c.findHaystackPoints = function (edges) { + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var _p = edge._private; + var rs = _p.rscratch; + if (!rs.haystack) { + var angle = Math.random() * 2 * Math.PI; + rs.source = { + x: Math.cos(angle), + y: Math.sin(angle) + }; + angle = Math.random() * 2 * Math.PI; + rs.target = { + x: Math.cos(angle), + y: Math.sin(angle) + }; + } + var src = _p.source; + var tgt = _p.target; + var srcPos = src.position(); + var tgtPos = tgt.position(); + var srcW = src.width(); + var tgtW = tgt.width(); + var srcH = src.height(); + var tgtH = tgt.height(); + var radius = edge.pstyle('haystack-radius').value; + var halfRadius = radius / 2; // b/c have to half width/height + + rs.haystackPts = rs.allpts = [rs.source.x * srcW * halfRadius + srcPos.x, rs.source.y * srcH * halfRadius + srcPos.y, rs.target.x * tgtW * halfRadius + tgtPos.x, rs.target.y * tgtH * halfRadius + tgtPos.y]; + rs.midX = (rs.allpts[0] + rs.allpts[2]) / 2; + rs.midY = (rs.allpts[1] + rs.allpts[3]) / 2; + + // always override as haystack in case set to different type previously + rs.edgeType = 'haystack'; + rs.haystack = true; + this.storeEdgeProjections(edge); + this.calculateArrowAngles(edge); + this.recalculateEdgeLabelProjections(edge); + this.calculateLabelAngles(edge); + } +}; +BRp$c.findSegmentsPoints = function (edge, pairInfo) { + // Segments (multiple straight lines) + + var rs = edge._private.rscratch; + var segmentWs = edge.pstyle('segment-weights'); + var segmentDs = edge.pstyle('segment-distances'); + var segmentsN = Math.min(segmentWs.pfValue.length, segmentDs.pfValue.length); + rs.edgeType = 'segments'; + rs.segpts = []; + for (var s = 0; s < segmentsN; s++) { + var w = segmentWs.pfValue[s]; + var d = segmentDs.pfValue[s]; + var w1 = 1 - w; + var w2 = w; + var _this$findMidptPtsEtc = this.findMidptPtsEtc(edge, pairInfo), + midptPts = _this$findMidptPtsEtc.midptPts, + vectorNormInverse = _this$findMidptPtsEtc.vectorNormInverse; + var adjustedMidpt = { + x: midptPts.x1 * w1 + midptPts.x2 * w2, + y: midptPts.y1 * w1 + midptPts.y2 * w2 + }; + rs.segpts.push(adjustedMidpt.x + vectorNormInverse.x * d, adjustedMidpt.y + vectorNormInverse.y * d); + } +}; +BRp$c.findLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) { + // Self-edge + + var rs = edge._private.rscratch; + var dirCounts = pairInfo.dirCounts, + srcPos = pairInfo.srcPos; + var ctrlptDists = edge.pstyle('control-point-distances'); + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; + var loopDir = edge.pstyle('loop-direction').pfValue; + var loopSwp = edge.pstyle('loop-sweep').pfValue; + var stepSize = edge.pstyle('control-point-step-size').pfValue; + rs.edgeType = 'self'; + var j = i; + var loopDist = stepSize; + if (edgeIsUnbundled) { + j = 0; + loopDist = ctrlptDist; + } + var loopAngle = loopDir - Math.PI / 2; + var outAngle = loopAngle - loopSwp / 2; + var inAngle = loopAngle + loopSwp / 2; + + // increase by step size for overlapping loops, keyed on direction and sweep values + var dc = String(loopDir + '_' + loopSwp); + j = dirCounts[dc] === undefined ? dirCounts[dc] = 0 : ++dirCounts[dc]; + rs.ctrlpts = [srcPos.x + Math.cos(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.x + Math.cos(inAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(inAngle) * 1.4 * loopDist * (j / 3 + 1)]; +}; +BRp$c.findCompoundLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) { + // Compound edge + + var rs = edge._private.rscratch; + rs.edgeType = 'compound'; + var srcPos = pairInfo.srcPos, + tgtPos = pairInfo.tgtPos, + srcW = pairInfo.srcW, + srcH = pairInfo.srcH, + tgtW = pairInfo.tgtW, + tgtH = pairInfo.tgtH; + var stepSize = edge.pstyle('control-point-step-size').pfValue; + var ctrlptDists = edge.pstyle('control-point-distances'); + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; + var j = i; + var loopDist = stepSize; + if (edgeIsUnbundled) { + j = 0; + loopDist = ctrlptDist; + } + var loopW = 50; + var loopaPos = { + x: srcPos.x - srcW / 2, + y: srcPos.y - srcH / 2 + }; + var loopbPos = { + x: tgtPos.x - tgtW / 2, + y: tgtPos.y - tgtH / 2 + }; + var loopPos = { + x: Math.min(loopaPos.x, loopbPos.x), + y: Math.min(loopaPos.y, loopbPos.y) + }; + + // avoids cases with impossible beziers + var minCompoundStretch = 0.5; + var compoundStretchA = Math.max(minCompoundStretch, Math.log(srcW * 0.01)); + var compoundStretchB = Math.max(minCompoundStretch, Math.log(tgtW * 0.01)); + rs.ctrlpts = [loopPos.x, loopPos.y - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchA, loopPos.x - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchB, loopPos.y]; +}; +BRp$c.findStraightEdgePoints = function (edge) { + // Straight edge within bundle + + edge._private.rscratch.edgeType = 'straight'; +}; +BRp$c.findBezierPoints = function (edge, pairInfo, i, edgeIsUnbundled, edgeIsSwapped) { + var rs = edge._private.rscratch; + var stepSize = edge.pstyle('control-point-step-size').pfValue; + var ctrlptDists = edge.pstyle('control-point-distances'); + var ctrlptWs = edge.pstyle('control-point-weights'); + var bezierN = ctrlptDists && ctrlptWs ? Math.min(ctrlptDists.value.length, ctrlptWs.value.length) : 1; + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; + var ctrlptWeight = ctrlptWs.value[0]; + + // (Multi)bezier + + var multi = edgeIsUnbundled; + rs.edgeType = multi ? 'multibezier' : 'bezier'; + rs.ctrlpts = []; + for (var b = 0; b < bezierN; b++) { + var normctrlptDist = (0.5 - pairInfo.eles.length / 2 + i) * stepSize * (edgeIsSwapped ? -1 : 1); + var manctrlptDist = void 0; + var sign = signum(normctrlptDist); + if (multi) { + ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[b] : stepSize; // fall back on step size + ctrlptWeight = ctrlptWs.value[b]; + } + if (edgeIsUnbundled) { + // multi or single unbundled + manctrlptDist = ctrlptDist; + } else { + manctrlptDist = ctrlptDist !== undefined ? sign * ctrlptDist : undefined; + } + var distanceFromMidpoint = manctrlptDist !== undefined ? manctrlptDist : normctrlptDist; + var w1 = 1 - ctrlptWeight; + var w2 = ctrlptWeight; + var _this$findMidptPtsEtc2 = this.findMidptPtsEtc(edge, pairInfo), + midptPts = _this$findMidptPtsEtc2.midptPts, + vectorNormInverse = _this$findMidptPtsEtc2.vectorNormInverse; + var adjustedMidpt = { + x: midptPts.x1 * w1 + midptPts.x2 * w2, + y: midptPts.y1 * w1 + midptPts.y2 * w2 + }; + rs.ctrlpts.push(adjustedMidpt.x + vectorNormInverse.x * distanceFromMidpoint, adjustedMidpt.y + vectorNormInverse.y * distanceFromMidpoint); + } +}; +BRp$c.findTaxiPoints = function (edge, pairInfo) { + // Taxicab geometry with two turns maximum + + var rs = edge._private.rscratch; + rs.edgeType = 'segments'; + var VERTICAL = 'vertical'; + var HORIZONTAL = 'horizontal'; + var LEFTWARD = 'leftward'; + var RIGHTWARD = 'rightward'; + var DOWNWARD = 'downward'; + var UPWARD = 'upward'; + var AUTO = 'auto'; + var posPts = pairInfo.posPts, + srcW = pairInfo.srcW, + srcH = pairInfo.srcH, + tgtW = pairInfo.tgtW, + tgtH = pairInfo.tgtH; + var edgeDistances = edge.pstyle('edge-distances').value; + var dIncludesNodeBody = edgeDistances !== 'node-position'; + var taxiDir = edge.pstyle('taxi-direction').value; + var rawTaxiDir = taxiDir; // unprocessed value + var taxiTurn = edge.pstyle('taxi-turn'); + var turnIsPercent = taxiTurn.units === '%'; + var taxiTurnPfVal = taxiTurn.pfValue; + var turnIsNegative = taxiTurnPfVal < 0; // i.e. from target side + var minD = edge.pstyle('taxi-turn-min-distance').pfValue; + var dw = dIncludesNodeBody ? (srcW + tgtW) / 2 : 0; + var dh = dIncludesNodeBody ? (srcH + tgtH) / 2 : 0; + var pdx = posPts.x2 - posPts.x1; + var pdy = posPts.y2 - posPts.y1; + + // take away the effective w/h from the magnitude of the delta value + var subDWH = function subDWH(dxy, dwh) { + if (dxy > 0) { + return Math.max(dxy - dwh, 0); + } else { + return Math.min(dxy + dwh, 0); + } + }; + var dx = subDWH(pdx, dw); + var dy = subDWH(pdy, dh); + var isExplicitDir = false; + if (rawTaxiDir === AUTO) { + taxiDir = Math.abs(dx) > Math.abs(dy) ? HORIZONTAL : VERTICAL; + } else if (rawTaxiDir === UPWARD || rawTaxiDir === DOWNWARD) { + taxiDir = VERTICAL; + isExplicitDir = true; + } else if (rawTaxiDir === LEFTWARD || rawTaxiDir === RIGHTWARD) { + taxiDir = HORIZONTAL; + isExplicitDir = true; + } + var isVert = taxiDir === VERTICAL; + var l = isVert ? dy : dx; + var pl = isVert ? pdy : pdx; + var sgnL = signum(pl); + var forcedDir = false; + if (!(isExplicitDir && (turnIsPercent || turnIsNegative)) // forcing in this case would cause weird growing in the opposite direction + && (rawTaxiDir === DOWNWARD && pl < 0 || rawTaxiDir === UPWARD && pl > 0 || rawTaxiDir === LEFTWARD && pl > 0 || rawTaxiDir === RIGHTWARD && pl < 0)) { + sgnL *= -1; + l = sgnL * Math.abs(l); + forcedDir = true; + } + var d; + if (turnIsPercent) { + var p = taxiTurnPfVal < 0 ? 1 + taxiTurnPfVal : taxiTurnPfVal; + d = p * l; + } else { + var k = taxiTurnPfVal < 0 ? l : 0; + d = k + taxiTurnPfVal * sgnL; + } + var getIsTooClose = function getIsTooClose(d) { + return Math.abs(d) < minD || Math.abs(d) >= Math.abs(l); + }; + var isTooCloseSrc = getIsTooClose(d); + var isTooCloseTgt = getIsTooClose(Math.abs(l) - Math.abs(d)); + var isTooClose = isTooCloseSrc || isTooCloseTgt; + if (isTooClose && !forcedDir) { + // non-ideal routing + if (isVert) { + // vertical fallbacks + var lShapeInsideSrc = Math.abs(pl) <= srcH / 2; + var lShapeInsideTgt = Math.abs(pdx) <= tgtW / 2; + if (lShapeInsideSrc) { + // horizontal Z-shape (direction not respected) + var x = (posPts.x1 + posPts.x2) / 2; + var y1 = posPts.y1, + y2 = posPts.y2; + rs.segpts = [x, y1, x, y2]; + } else if (lShapeInsideTgt) { + // vertical Z-shape (distance not respected) + var y = (posPts.y1 + posPts.y2) / 2; + var x1 = posPts.x1, + x2 = posPts.x2; + rs.segpts = [x1, y, x2, y]; + } else { + // L-shape fallback (turn distance not respected, but works well with tree siblings) + rs.segpts = [posPts.x1, posPts.y2]; + } + } else { + // horizontal fallbacks + var _lShapeInsideSrc = Math.abs(pl) <= srcW / 2; + var _lShapeInsideTgt = Math.abs(pdy) <= tgtH / 2; + if (_lShapeInsideSrc) { + // vertical Z-shape (direction not respected) + var _y = (posPts.y1 + posPts.y2) / 2; + var _x = posPts.x1, + _x2 = posPts.x2; + rs.segpts = [_x, _y, _x2, _y]; + } else if (_lShapeInsideTgt) { + // horizontal Z-shape (turn distance not respected) + var _x3 = (posPts.x1 + posPts.x2) / 2; + var _y2 = posPts.y1, + _y3 = posPts.y2; + rs.segpts = [_x3, _y2, _x3, _y3]; + } else { + // L-shape (turn distance not respected, but works well for tree siblings) + rs.segpts = [posPts.x2, posPts.y1]; + } + } + } else { + // ideal routing + if (isVert) { + var _y4 = posPts.y1 + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0); + var _x4 = posPts.x1, + _x5 = posPts.x2; + rs.segpts = [_x4, _y4, _x5, _y4]; + } else { + // horizontal + var _x6 = posPts.x1 + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0); + var _y5 = posPts.y1, + _y6 = posPts.y2; + rs.segpts = [_x6, _y5, _x6, _y6]; + } + } +}; +BRp$c.tryToCorrectInvalidPoints = function (edge, pairInfo) { + var rs = edge._private.rscratch; + + // can only correct beziers for now... + if (rs.edgeType === 'bezier') { + var srcPos = pairInfo.srcPos, + tgtPos = pairInfo.tgtPos, + srcW = pairInfo.srcW, + srcH = pairInfo.srcH, + tgtW = pairInfo.tgtW, + tgtH = pairInfo.tgtH, + srcShape = pairInfo.srcShape, + tgtShape = pairInfo.tgtShape; + var badStart = !number$1(rs.startX) || !number$1(rs.startY); + var badAStart = !number$1(rs.arrowStartX) || !number$1(rs.arrowStartY); + var badEnd = !number$1(rs.endX) || !number$1(rs.endY); + var badAEnd = !number$1(rs.arrowEndX) || !number$1(rs.arrowEndY); + var minCpADistFactor = 3; + var arrowW = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth; + var minCpADist = minCpADistFactor * arrowW; + var startACpDist = dist({ + x: rs.ctrlpts[0], + y: rs.ctrlpts[1] + }, { + x: rs.startX, + y: rs.startY + }); + var closeStartACp = startACpDist < minCpADist; + var endACpDist = dist({ + x: rs.ctrlpts[0], + y: rs.ctrlpts[1] + }, { + x: rs.endX, + y: rs.endY + }); + var closeEndACp = endACpDist < minCpADist; + var overlapping = false; + if (badStart || badAStart || closeStartACp) { + overlapping = true; + + // project control point along line from src centre to outside the src shape + // (otherwise intersection will yield nothing) + var cpD = { + // delta + x: rs.ctrlpts[0] - srcPos.x, + y: rs.ctrlpts[1] - srcPos.y + }; + var cpL = Math.sqrt(cpD.x * cpD.x + cpD.y * cpD.y); // length of line + var cpM = { + // normalised delta + x: cpD.x / cpL, + y: cpD.y / cpL + }; + var radius = Math.max(srcW, srcH); + var cpProj = { + // *2 radius guarantees outside shape + x: rs.ctrlpts[0] + cpM.x * 2 * radius, + y: rs.ctrlpts[1] + cpM.y * 2 * radius + }; + var srcCtrlPtIntn = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, cpProj.x, cpProj.y, 0); + if (closeStartACp) { + rs.ctrlpts[0] = rs.ctrlpts[0] + cpM.x * (minCpADist - startACpDist); + rs.ctrlpts[1] = rs.ctrlpts[1] + cpM.y * (minCpADist - startACpDist); + } else { + rs.ctrlpts[0] = srcCtrlPtIntn[0] + cpM.x * minCpADist; + rs.ctrlpts[1] = srcCtrlPtIntn[1] + cpM.y * minCpADist; + } + } + if (badEnd || badAEnd || closeEndACp) { + overlapping = true; + + // project control point along line from tgt centre to outside the tgt shape + // (otherwise intersection will yield nothing) + var _cpD = { + // delta + x: rs.ctrlpts[0] - tgtPos.x, + y: rs.ctrlpts[1] - tgtPos.y + }; + var _cpL = Math.sqrt(_cpD.x * _cpD.x + _cpD.y * _cpD.y); // length of line + var _cpM = { + // normalised delta + x: _cpD.x / _cpL, + y: _cpD.y / _cpL + }; + var _radius = Math.max(srcW, srcH); + var _cpProj = { + // *2 radius guarantees outside shape + x: rs.ctrlpts[0] + _cpM.x * 2 * _radius, + y: rs.ctrlpts[1] + _cpM.y * 2 * _radius + }; + var tgtCtrlPtIntn = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, _cpProj.x, _cpProj.y, 0); + if (closeEndACp) { + rs.ctrlpts[0] = rs.ctrlpts[0] + _cpM.x * (minCpADist - endACpDist); + rs.ctrlpts[1] = rs.ctrlpts[1] + _cpM.y * (minCpADist - endACpDist); + } else { + rs.ctrlpts[0] = tgtCtrlPtIntn[0] + _cpM.x * minCpADist; + rs.ctrlpts[1] = tgtCtrlPtIntn[1] + _cpM.y * minCpADist; + } + } + if (overlapping) { + // recalc endpts + this.findEndpoints(edge); + } + } +}; +BRp$c.storeAllpts = function (edge) { + var rs = edge._private.rscratch; + if (rs.edgeType === 'multibezier' || rs.edgeType === 'bezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') { + rs.allpts = []; + rs.allpts.push(rs.startX, rs.startY); + for (var b = 0; b + 1 < rs.ctrlpts.length; b += 2) { + // ctrl pt itself + rs.allpts.push(rs.ctrlpts[b], rs.ctrlpts[b + 1]); + + // the midpt between ctrlpts as intermediate destination pts + if (b + 3 < rs.ctrlpts.length) { + rs.allpts.push((rs.ctrlpts[b] + rs.ctrlpts[b + 2]) / 2, (rs.ctrlpts[b + 1] + rs.ctrlpts[b + 3]) / 2); + } + } + rs.allpts.push(rs.endX, rs.endY); + var m, mt; + if (rs.ctrlpts.length / 2 % 2 === 0) { + m = rs.allpts.length / 2 - 1; + rs.midX = rs.allpts[m]; + rs.midY = rs.allpts[m + 1]; + } else { + m = rs.allpts.length / 2 - 3; + mt = 0.5; + rs.midX = qbezierAt(rs.allpts[m], rs.allpts[m + 2], rs.allpts[m + 4], mt); + rs.midY = qbezierAt(rs.allpts[m + 1], rs.allpts[m + 3], rs.allpts[m + 5], mt); + } + } else if (rs.edgeType === 'straight') { + // need to calc these after endpts + rs.allpts = [rs.startX, rs.startY, rs.endX, rs.endY]; + + // default midpt for labels etc + rs.midX = (rs.startX + rs.endX + rs.arrowStartX + rs.arrowEndX) / 4; + rs.midY = (rs.startY + rs.endY + rs.arrowStartY + rs.arrowEndY) / 4; + } else if (rs.edgeType === 'segments') { + rs.allpts = []; + rs.allpts.push(rs.startX, rs.startY); + rs.allpts.push.apply(rs.allpts, rs.segpts); + rs.allpts.push(rs.endX, rs.endY); + if (rs.segpts.length % 4 === 0) { + var i2 = rs.segpts.length / 2; + var i1 = i2 - 2; + rs.midX = (rs.segpts[i1] + rs.segpts[i2]) / 2; + rs.midY = (rs.segpts[i1 + 1] + rs.segpts[i2 + 1]) / 2; + } else { + var _i = rs.segpts.length / 2 - 1; + rs.midX = rs.segpts[_i]; + rs.midY = rs.segpts[_i + 1]; + } + } +}; +BRp$c.checkForInvalidEdgeWarning = function (edge) { + var rs = edge[0]._private.rscratch; + if (rs.nodesOverlap || number$1(rs.startX) && number$1(rs.startY) && number$1(rs.endX) && number$1(rs.endY)) { + rs.loggedErr = false; + } else { + if (!rs.loggedErr) { + rs.loggedErr = true; + warn('Edge `' + edge.id() + '` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap.'); + } + } +}; +BRp$c.findEdgeControlPoints = function (edges) { + var _this = this; + if (!edges || edges.length === 0) { + return; + } + var r = this; + var cy = r.cy; + var hasCompounds = cy.hasCompoundNodes(); + var hashTable = { + map: new Map$1(), + get: function get(pairId) { + var map2 = this.map.get(pairId[0]); + if (map2 != null) { + return map2.get(pairId[1]); + } else { + return null; + } + }, + set: function set(pairId, val) { + var map2 = this.map.get(pairId[0]); + if (map2 == null) { + map2 = new Map$1(); + this.map.set(pairId[0], map2); + } + map2.set(pairId[1], val); + } + }; + var pairIds = []; + var haystackEdges = []; + + // create a table of edge (src, tgt) => list of edges between them + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var _p = edge._private; + var curveStyle = edge.pstyle('curve-style').value; + + // ignore edges who are not to be displayed + // they shouldn't take up space + if (edge.removed() || !edge.takesUpSpace()) { + continue; + } + if (curveStyle === 'haystack') { + haystackEdges.push(edge); + continue; + } + var edgeIsUnbundled = curveStyle === 'unbundled-bezier' || curveStyle === 'segments' || curveStyle === 'straight' || curveStyle === 'straight-triangle' || curveStyle === 'taxi'; + var edgeIsBezier = curveStyle === 'unbundled-bezier' || curveStyle === 'bezier'; + var src = _p.source; + var tgt = _p.target; + var srcIndex = src.poolIndex(); + var tgtIndex = tgt.poolIndex(); + var pairId = [srcIndex, tgtIndex].sort(); + var tableEntry = hashTable.get(pairId); + if (tableEntry == null) { + tableEntry = { + eles: [] + }; + hashTable.set(pairId, tableEntry); + pairIds.push(pairId); + } + tableEntry.eles.push(edge); + if (edgeIsUnbundled) { + tableEntry.hasUnbundled = true; + } + if (edgeIsBezier) { + tableEntry.hasBezier = true; + } + } + + // for each pair (src, tgt), create the ctrl pts + // Nested for loop is OK; total number of iterations for both loops = edgeCount + var _loop = function _loop(p) { + var pairId = pairIds[p]; + var pairInfo = hashTable.get(pairId); + var swappedpairInfo = void 0; + if (!pairInfo.hasUnbundled) { + var pllEdges = pairInfo.eles[0].parallelEdges().filter(function (e) { + return e.isBundledBezier(); + }); + clearArray(pairInfo.eles); + pllEdges.forEach(function (edge) { + return pairInfo.eles.push(edge); + }); + + // for each pair id, the edges should be sorted by index + pairInfo.eles.sort(function (edge1, edge2) { + return edge1.poolIndex() - edge2.poolIndex(); + }); + } + var firstEdge = pairInfo.eles[0]; + var src = firstEdge.source(); + var tgt = firstEdge.target(); + + // make sure src/tgt distinction is consistent w.r.t. pairId + if (src.poolIndex() > tgt.poolIndex()) { + var temp = src; + src = tgt; + tgt = temp; + } + var srcPos = pairInfo.srcPos = src.position(); + var tgtPos = pairInfo.tgtPos = tgt.position(); + var srcW = pairInfo.srcW = src.outerWidth(); + var srcH = pairInfo.srcH = src.outerHeight(); + var tgtW = pairInfo.tgtW = tgt.outerWidth(); + var tgtH = pairInfo.tgtH = tgt.outerHeight(); + var srcShape = pairInfo.srcShape = r.nodeShapes[_this.getNodeShape(src)]; + var tgtShape = pairInfo.tgtShape = r.nodeShapes[_this.getNodeShape(tgt)]; + pairInfo.dirCounts = { + 'north': 0, + 'west': 0, + 'south': 0, + 'east': 0, + 'northwest': 0, + 'southwest': 0, + 'northeast': 0, + 'southeast': 0 + }; + for (var _i2 = 0; _i2 < pairInfo.eles.length; _i2++) { + var _edge = pairInfo.eles[_i2]; + var rs = _edge[0]._private.rscratch; + var _curveStyle = _edge.pstyle('curve-style').value; + var _edgeIsUnbundled = _curveStyle === 'unbundled-bezier' || _curveStyle === 'segments' || _curveStyle === 'taxi'; + + // whether the normalised pair order is the reverse of the edge's src-tgt order + var edgeIsSwapped = !src.same(_edge.source()); + if (!pairInfo.calculatedIntersection && src !== tgt && (pairInfo.hasBezier || pairInfo.hasUnbundled)) { + pairInfo.calculatedIntersection = true; + + // pt outside src shape to calc distance/displacement from src to tgt + var srcOutside = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, tgtPos.x, tgtPos.y, 0); + var srcIntn = pairInfo.srcIntn = srcOutside; + + // pt outside tgt shape to calc distance/displacement from src to tgt + var tgtOutside = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, srcPos.x, srcPos.y, 0); + var tgtIntn = pairInfo.tgtIntn = tgtOutside; + var intersectionPts = pairInfo.intersectionPts = { + x1: srcOutside[0], + x2: tgtOutside[0], + y1: srcOutside[1], + y2: tgtOutside[1] + }; + var posPts = pairInfo.posPts = { + x1: srcPos.x, + x2: tgtPos.x, + y1: srcPos.y, + y2: tgtPos.y + }; + var dy = tgtOutside[1] - srcOutside[1]; + var dx = tgtOutside[0] - srcOutside[0]; + var l = Math.sqrt(dx * dx + dy * dy); + var vector = pairInfo.vector = { + x: dx, + y: dy + }; + var vectorNorm = pairInfo.vectorNorm = { + x: vector.x / l, + y: vector.y / l + }; + var vectorNormInverse = { + x: -vectorNorm.y, + y: vectorNorm.x + }; + + // if node shapes overlap, then no ctrl pts to draw + pairInfo.nodesOverlap = !number$1(l) || tgtShape.checkPoint(srcOutside[0], srcOutside[1], 0, tgtW, tgtH, tgtPos.x, tgtPos.y) || srcShape.checkPoint(tgtOutside[0], tgtOutside[1], 0, srcW, srcH, srcPos.x, srcPos.y); + pairInfo.vectorNormInverse = vectorNormInverse; + swappedpairInfo = { + nodesOverlap: pairInfo.nodesOverlap, + dirCounts: pairInfo.dirCounts, + calculatedIntersection: true, + hasBezier: pairInfo.hasBezier, + hasUnbundled: pairInfo.hasUnbundled, + eles: pairInfo.eles, + srcPos: tgtPos, + tgtPos: srcPos, + srcW: tgtW, + srcH: tgtH, + tgtW: srcW, + tgtH: srcH, + srcIntn: tgtIntn, + tgtIntn: srcIntn, + srcShape: tgtShape, + tgtShape: srcShape, + posPts: { + x1: posPts.x2, + y1: posPts.y2, + x2: posPts.x1, + y2: posPts.y1 + }, + intersectionPts: { + x1: intersectionPts.x2, + y1: intersectionPts.y2, + x2: intersectionPts.x1, + y2: intersectionPts.y1 + }, + vector: { + x: -vector.x, + y: -vector.y + }, + vectorNorm: { + x: -vectorNorm.x, + y: -vectorNorm.y + }, + vectorNormInverse: { + x: -vectorNormInverse.x, + y: -vectorNormInverse.y + } + }; + } + var passedPairInfo = edgeIsSwapped ? swappedpairInfo : pairInfo; + rs.nodesOverlap = passedPairInfo.nodesOverlap; + rs.srcIntn = passedPairInfo.srcIntn; + rs.tgtIntn = passedPairInfo.tgtIntn; + if (hasCompounds && (src.isParent() || src.isChild() || tgt.isParent() || tgt.isChild()) && (src.parents().anySame(tgt) || tgt.parents().anySame(src) || src.same(tgt) && src.isParent())) { + _this.findCompoundLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); + } else if (src === tgt) { + _this.findLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); + } else if (_curveStyle === 'segments') { + _this.findSegmentsPoints(_edge, passedPairInfo); + } else if (_curveStyle === 'taxi') { + _this.findTaxiPoints(_edge, passedPairInfo); + } else if (_curveStyle === 'straight' || !_edgeIsUnbundled && pairInfo.eles.length % 2 === 1 && _i2 === Math.floor(pairInfo.eles.length / 2)) { + _this.findStraightEdgePoints(_edge); + } else { + _this.findBezierPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled, edgeIsSwapped); + } + _this.findEndpoints(_edge); + _this.tryToCorrectInvalidPoints(_edge, passedPairInfo); + _this.checkForInvalidEdgeWarning(_edge); + _this.storeAllpts(_edge); + _this.storeEdgeProjections(_edge); + _this.calculateArrowAngles(_edge); + _this.recalculateEdgeLabelProjections(_edge); + _this.calculateLabelAngles(_edge); + } // for pair edges + }; + for (var p = 0; p < pairIds.length; p++) { + _loop(p); + } // for pair ids + + // haystacks avoid the expense of pairInfo stuff (intersections etc.) + this.findHaystackPoints(haystackEdges); +}; +function getPts(pts) { + var retPts = []; + if (pts == null) { + return; + } + for (var i = 0; i < pts.length; i += 2) { + var x = pts[i]; + var y = pts[i + 1]; + retPts.push({ + x: x, + y: y + }); + } + return retPts; +} +BRp$c.getSegmentPoints = function (edge) { + var rs = edge[0]._private.rscratch; + var type = rs.edgeType; + if (type === 'segments') { + this.recalculateRenderedStyle(edge); + return getPts(rs.segpts); + } +}; +BRp$c.getControlPoints = function (edge) { + var rs = edge[0]._private.rscratch; + var type = rs.edgeType; + if (type === 'bezier' || type === 'multibezier' || type === 'self' || type === 'compound') { + this.recalculateRenderedStyle(edge); + return getPts(rs.ctrlpts); + } +}; +BRp$c.getEdgeMidpoint = function (edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + return { + x: rs.midX, + y: rs.midY + }; +}; + +var BRp$b = {}; +BRp$b.manualEndptToPx = function (node, prop) { + var r = this; + var npos = node.position(); + var w = node.outerWidth(); + var h = node.outerHeight(); + if (prop.value.length === 2) { + var p = [prop.pfValue[0], prop.pfValue[1]]; + if (prop.units[0] === '%') { + p[0] = p[0] * w; + } + if (prop.units[1] === '%') { + p[1] = p[1] * h; + } + p[0] += npos.x; + p[1] += npos.y; + return p; + } else { + var angle = prop.pfValue[0]; + angle = -Math.PI / 2 + angle; // start at 12 o'clock + + var l = 2 * Math.max(w, h); + var _p = [npos.x + Math.cos(angle) * l, npos.y + Math.sin(angle) * l]; + return r.nodeShapes[this.getNodeShape(node)].intersectLine(npos.x, npos.y, w, h, _p[0], _p[1], 0); + } +}; +BRp$b.findEndpoints = function (edge) { + var r = this; + var intersect; + var source = edge.source()[0]; + var target = edge.target()[0]; + var srcPos = source.position(); + var tgtPos = target.position(); + var tgtArShape = edge.pstyle('target-arrow-shape').value; + var srcArShape = edge.pstyle('source-arrow-shape').value; + var tgtDist = edge.pstyle('target-distance-from-node').pfValue; + var srcDist = edge.pstyle('source-distance-from-node').pfValue; + var curveStyle = edge.pstyle('curve-style').value; + var rs = edge._private.rscratch; + var et = rs.edgeType; + var taxi = curveStyle === 'taxi'; + var self = et === 'self' || et === 'compound'; + var bezier = et === 'bezier' || et === 'multibezier' || self; + var multi = et !== 'bezier'; + var lines = et === 'straight' || et === 'segments'; + var segments = et === 'segments'; + var hasEndpts = bezier || multi || lines; + var overrideEndpts = self || taxi; + var srcManEndpt = edge.pstyle('source-endpoint'); + var srcManEndptVal = overrideEndpts ? 'outside-to-node' : srcManEndpt.value; + var tgtManEndpt = edge.pstyle('target-endpoint'); + var tgtManEndptVal = overrideEndpts ? 'outside-to-node' : tgtManEndpt.value; + rs.srcManEndpt = srcManEndpt; + rs.tgtManEndpt = tgtManEndpt; + var p1; // last known point of edge on target side + var p2; // last known point of edge on source side + + var p1_i; // point to intersect with target shape + var p2_i; // point to intersect with source shape + + if (bezier) { + var cpStart = [rs.ctrlpts[0], rs.ctrlpts[1]]; + var cpEnd = multi ? [rs.ctrlpts[rs.ctrlpts.length - 2], rs.ctrlpts[rs.ctrlpts.length - 1]] : cpStart; + p1 = cpEnd; + p2 = cpStart; + } else if (lines) { + var srcArrowFromPt = !segments ? [tgtPos.x, tgtPos.y] : rs.segpts.slice(0, 2); + var tgtArrowFromPt = !segments ? [srcPos.x, srcPos.y] : rs.segpts.slice(rs.segpts.length - 2); + p1 = tgtArrowFromPt; + p2 = srcArrowFromPt; + } + if (tgtManEndptVal === 'inside-to-node') { + intersect = [tgtPos.x, tgtPos.y]; + } else if (tgtManEndpt.units) { + intersect = this.manualEndptToPx(target, tgtManEndpt); + } else if (tgtManEndptVal === 'outside-to-line') { + intersect = rs.tgtIntn; // use cached value from ctrlpt calc + } else { + if (tgtManEndptVal === 'outside-to-node' || tgtManEndptVal === 'outside-to-node-or-label') { + p1_i = p1; + } else if (tgtManEndptVal === 'outside-to-line' || tgtManEndptVal === 'outside-to-line-or-label') { + p1_i = [srcPos.x, srcPos.y]; + } + intersect = r.nodeShapes[this.getNodeShape(target)].intersectLine(tgtPos.x, tgtPos.y, target.outerWidth(), target.outerHeight(), p1_i[0], p1_i[1], 0); + if (tgtManEndptVal === 'outside-to-node-or-label' || tgtManEndptVal === 'outside-to-line-or-label') { + var trs = target._private.rscratch; + var lw = trs.labelWidth; + var lh = trs.labelHeight; + var lx = trs.labelX; + var ly = trs.labelY; + var lw2 = lw / 2; + var lh2 = lh / 2; + var va = target.pstyle('text-valign').value; + if (va === 'top') { + ly -= lh2; + } else if (va === 'bottom') { + ly += lh2; + } + var ha = target.pstyle('text-halign').value; + if (ha === 'left') { + lx -= lw2; + } else if (ha === 'right') { + lx += lw2; + } + var labelIntersect = polygonIntersectLine(p1_i[0], p1_i[1], [lx - lw2, ly - lh2, lx + lw2, ly - lh2, lx + lw2, ly + lh2, lx - lw2, ly + lh2], tgtPos.x, tgtPos.y); + if (labelIntersect.length > 0) { + var refPt = srcPos; + var intSqdist = sqdist(refPt, array2point(intersect)); + var labIntSqdist = sqdist(refPt, array2point(labelIntersect)); + var minSqDist = intSqdist; + if (labIntSqdist < intSqdist) { + intersect = labelIntersect; + minSqDist = labIntSqdist; + } + if (labelIntersect.length > 2) { + var labInt2SqDist = sqdist(refPt, { + x: labelIntersect[2], + y: labelIntersect[3] + }); + if (labInt2SqDist < minSqDist) { + intersect = [labelIntersect[2], labelIntersect[3]]; + } + } + } + } + } + var arrowEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].spacing(edge) + tgtDist); + var edgeEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].gap(edge) + tgtDist); + rs.endX = edgeEnd[0]; + rs.endY = edgeEnd[1]; + rs.arrowEndX = arrowEnd[0]; + rs.arrowEndY = arrowEnd[1]; + if (srcManEndptVal === 'inside-to-node') { + intersect = [srcPos.x, srcPos.y]; + } else if (srcManEndpt.units) { + intersect = this.manualEndptToPx(source, srcManEndpt); + } else if (srcManEndptVal === 'outside-to-line') { + intersect = rs.srcIntn; // use cached value from ctrlpt calc + } else { + if (srcManEndptVal === 'outside-to-node' || srcManEndptVal === 'outside-to-node-or-label') { + p2_i = p2; + } else if (srcManEndptVal === 'outside-to-line' || srcManEndptVal === 'outside-to-line-or-label') { + p2_i = [tgtPos.x, tgtPos.y]; + } + intersect = r.nodeShapes[this.getNodeShape(source)].intersectLine(srcPos.x, srcPos.y, source.outerWidth(), source.outerHeight(), p2_i[0], p2_i[1], 0); + if (srcManEndptVal === 'outside-to-node-or-label' || srcManEndptVal === 'outside-to-line-or-label') { + var srs = source._private.rscratch; + var _lw = srs.labelWidth; + var _lh = srs.labelHeight; + var _lx = srs.labelX; + var _ly = srs.labelY; + var _lw2 = _lw / 2; + var _lh2 = _lh / 2; + var _va = source.pstyle('text-valign').value; + if (_va === 'top') { + _ly -= _lh2; + } else if (_va === 'bottom') { + _ly += _lh2; + } + var _ha = source.pstyle('text-halign').value; + if (_ha === 'left') { + _lx -= _lw2; + } else if (_ha === 'right') { + _lx += _lw2; + } + var _labelIntersect = polygonIntersectLine(p2_i[0], p2_i[1], [_lx - _lw2, _ly - _lh2, _lx + _lw2, _ly - _lh2, _lx + _lw2, _ly + _lh2, _lx - _lw2, _ly + _lh2], srcPos.x, srcPos.y); + if (_labelIntersect.length > 0) { + var _refPt = tgtPos; + var _intSqdist = sqdist(_refPt, array2point(intersect)); + var _labIntSqdist = sqdist(_refPt, array2point(_labelIntersect)); + var _minSqDist = _intSqdist; + if (_labIntSqdist < _intSqdist) { + intersect = [_labelIntersect[0], _labelIntersect[1]]; + _minSqDist = _labIntSqdist; + } + if (_labelIntersect.length > 2) { + var _labInt2SqDist = sqdist(_refPt, { + x: _labelIntersect[2], + y: _labelIntersect[3] + }); + if (_labInt2SqDist < _minSqDist) { + intersect = [_labelIntersect[2], _labelIntersect[3]]; + } + } + } + } + } + var arrowStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].spacing(edge) + srcDist); + var edgeStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].gap(edge) + srcDist); + rs.startX = edgeStart[0]; + rs.startY = edgeStart[1]; + rs.arrowStartX = arrowStart[0]; + rs.arrowStartY = arrowStart[1]; + if (hasEndpts) { + if (!number$1(rs.startX) || !number$1(rs.startY) || !number$1(rs.endX) || !number$1(rs.endY)) { + rs.badLine = true; + } else { + rs.badLine = false; + } + } +}; +BRp$b.getSourceEndpoint = function (edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + switch (rs.edgeType) { + case 'haystack': + return { + x: rs.haystackPts[0], + y: rs.haystackPts[1] + }; + default: + return { + x: rs.arrowStartX, + y: rs.arrowStartY + }; + } +}; +BRp$b.getTargetEndpoint = function (edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + switch (rs.edgeType) { + case 'haystack': + return { + x: rs.haystackPts[2], + y: rs.haystackPts[3] + }; + default: + return { + x: rs.arrowEndX, + y: rs.arrowEndY + }; + } +}; + +var BRp$a = {}; +function pushBezierPts(r, edge, pts) { + var qbezierAt$1 = function qbezierAt$1(p1, p2, p3, t) { + return qbezierAt(p1, p2, p3, t); + }; + var _p = edge._private; + var bpts = _p.rstyle.bezierPts; + for (var i = 0; i < r.bezierProjPcts.length; i++) { + var p = r.bezierProjPcts[i]; + bpts.push({ + x: qbezierAt$1(pts[0], pts[2], pts[4], p), + y: qbezierAt$1(pts[1], pts[3], pts[5], p) + }); + } +} +BRp$a.storeEdgeProjections = function (edge) { + var _p = edge._private; + var rs = _p.rscratch; + var et = rs.edgeType; + + // clear the cached points state + _p.rstyle.bezierPts = null; + _p.rstyle.linePts = null; + _p.rstyle.haystackPts = null; + if (et === 'multibezier' || et === 'bezier' || et === 'self' || et === 'compound') { + _p.rstyle.bezierPts = []; + for (var i = 0; i + 5 < rs.allpts.length; i += 4) { + pushBezierPts(this, edge, rs.allpts.slice(i, i + 6)); + } + } else if (et === 'segments') { + var lpts = _p.rstyle.linePts = []; + for (var i = 0; i + 1 < rs.allpts.length; i += 2) { + lpts.push({ + x: rs.allpts[i], + y: rs.allpts[i + 1] + }); + } + } else if (et === 'haystack') { + var hpts = rs.haystackPts; + _p.rstyle.haystackPts = [{ + x: hpts[0], + y: hpts[1] + }, { + x: hpts[2], + y: hpts[3] + }]; + } + _p.rstyle.arrowWidth = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth; +}; +BRp$a.recalculateEdgeProjections = function (edges) { + this.findEdgeControlPoints(edges); +}; + +/* global document */ + +var BRp$9 = {}; +BRp$9.recalculateNodeLabelProjection = function (node) { + var content = node.pstyle('label').strValue; + if (emptyString(content)) { + return; + } + var textX, textY; + var _p = node._private; + var nodeWidth = node.width(); + var nodeHeight = node.height(); + var padding = node.padding(); + var nodePos = node.position(); + var textHalign = node.pstyle('text-halign').strValue; + var textValign = node.pstyle('text-valign').strValue; + var rs = _p.rscratch; + var rstyle = _p.rstyle; + switch (textHalign) { + case 'left': + textX = nodePos.x - nodeWidth / 2 - padding; + break; + case 'right': + textX = nodePos.x + nodeWidth / 2 + padding; + break; + default: + // e.g. center + textX = nodePos.x; + } + switch (textValign) { + case 'top': + textY = nodePos.y - nodeHeight / 2 - padding; + break; + case 'bottom': + textY = nodePos.y + nodeHeight / 2 + padding; + break; + default: + // e.g. middle + textY = nodePos.y; + } + rs.labelX = textX; + rs.labelY = textY; + rstyle.labelX = textX; + rstyle.labelY = textY; + this.calculateLabelAngles(node); + this.applyLabelDimensions(node); +}; +var lineAngleFromDelta = function lineAngleFromDelta(dx, dy) { + var angle = Math.atan(dy / dx); + if (dx === 0 && angle < 0) { + angle = angle * -1; + } + return angle; +}; +var lineAngle = function lineAngle(p0, p1) { + var dx = p1.x - p0.x; + var dy = p1.y - p0.y; + return lineAngleFromDelta(dx, dy); +}; +var bezierAngle = function bezierAngle(p0, p1, p2, t) { + var t0 = bound(0, t - 0.001, 1); + var t1 = bound(0, t + 0.001, 1); + var lp0 = qbezierPtAt(p0, p1, p2, t0); + var lp1 = qbezierPtAt(p0, p1, p2, t1); + return lineAngle(lp0, lp1); +}; +BRp$9.recalculateEdgeLabelProjections = function (edge) { + var p; + var _p = edge._private; + var rs = _p.rscratch; + var r = this; + var content = { + mid: edge.pstyle('label').strValue, + source: edge.pstyle('source-label').strValue, + target: edge.pstyle('target-label').strValue + }; + if (content.mid || content.source || content.target) ; else { + return; // no labels => no calcs + } + + // add center point to style so bounding box calculations can use it + // + p = { + x: rs.midX, + y: rs.midY + }; + var setRs = function setRs(propName, prefix, value) { + setPrefixedProperty(_p.rscratch, propName, prefix, value); + setPrefixedProperty(_p.rstyle, propName, prefix, value); + }; + setRs('labelX', null, p.x); + setRs('labelY', null, p.y); + var midAngle = lineAngleFromDelta(rs.midDispX, rs.midDispY); + setRs('labelAutoAngle', null, midAngle); + var createControlPointInfo = function createControlPointInfo() { + if (createControlPointInfo.cache) { + return createControlPointInfo.cache; + } // use cache so only 1x per edge + + var ctrlpts = []; + + // store each ctrlpt info init + for (var i = 0; i + 5 < rs.allpts.length; i += 4) { + var p0 = { + x: rs.allpts[i], + y: rs.allpts[i + 1] + }; + var p1 = { + x: rs.allpts[i + 2], + y: rs.allpts[i + 3] + }; // ctrlpt + var p2 = { + x: rs.allpts[i + 4], + y: rs.allpts[i + 5] + }; + ctrlpts.push({ + p0: p0, + p1: p1, + p2: p2, + startDist: 0, + length: 0, + segments: [] + }); + } + var bpts = _p.rstyle.bezierPts; + var nProjs = r.bezierProjPcts.length; + function addSegment(cp, p0, p1, t0, t1) { + var length = dist(p0, p1); + var prevSegment = cp.segments[cp.segments.length - 1]; + var segment = { + p0: p0, + p1: p1, + t0: t0, + t1: t1, + startDist: prevSegment ? prevSegment.startDist + prevSegment.length : 0, + length: length + }; + cp.segments.push(segment); + cp.length += length; + } + + // update each ctrlpt with segment info + for (var _i = 0; _i < ctrlpts.length; _i++) { + var cp = ctrlpts[_i]; + var prevCp = ctrlpts[_i - 1]; + if (prevCp) { + cp.startDist = prevCp.startDist + prevCp.length; + } + addSegment(cp, cp.p0, bpts[_i * nProjs], 0, r.bezierProjPcts[0]); // first + + for (var j = 0; j < nProjs - 1; j++) { + addSegment(cp, bpts[_i * nProjs + j], bpts[_i * nProjs + j + 1], r.bezierProjPcts[j], r.bezierProjPcts[j + 1]); + } + addSegment(cp, bpts[_i * nProjs + nProjs - 1], cp.p2, r.bezierProjPcts[nProjs - 1], 1); // last + } + + return createControlPointInfo.cache = ctrlpts; + }; + var calculateEndProjection = function calculateEndProjection(prefix) { + var angle; + var isSrc = prefix === 'source'; + if (!content[prefix]) { + return; + } + var offset = edge.pstyle(prefix + '-text-offset').pfValue; + switch (rs.edgeType) { + case 'self': + case 'compound': + case 'bezier': + case 'multibezier': + { + var cps = createControlPointInfo(); + var selected; + var startDist = 0; + var totalDist = 0; + + // find the segment we're on + for (var i = 0; i < cps.length; i++) { + var _cp = cps[isSrc ? i : cps.length - 1 - i]; + for (var j = 0; j < _cp.segments.length; j++) { + var _seg = _cp.segments[isSrc ? j : _cp.segments.length - 1 - j]; + var lastSeg = i === cps.length - 1 && j === _cp.segments.length - 1; + startDist = totalDist; + totalDist += _seg.length; + if (totalDist >= offset || lastSeg) { + selected = { + cp: _cp, + segment: _seg + }; + break; + } + } + if (selected) { + break; + } + } + var cp = selected.cp; + var seg = selected.segment; + var tSegment = (offset - startDist) / seg.length; + var segDt = seg.t1 - seg.t0; + var t = isSrc ? seg.t0 + segDt * tSegment : seg.t1 - segDt * tSegment; + t = bound(0, t, 1); + p = qbezierPtAt(cp.p0, cp.p1, cp.p2, t); + angle = bezierAngle(cp.p0, cp.p1, cp.p2, t); + break; + } + case 'straight': + case 'segments': + case 'haystack': + { + var d = 0, + di, + d0; + var p0, p1; + var l = rs.allpts.length; + for (var _i2 = 0; _i2 + 3 < l; _i2 += 2) { + if (isSrc) { + p0 = { + x: rs.allpts[_i2], + y: rs.allpts[_i2 + 1] + }; + p1 = { + x: rs.allpts[_i2 + 2], + y: rs.allpts[_i2 + 3] + }; + } else { + p0 = { + x: rs.allpts[l - 2 - _i2], + y: rs.allpts[l - 1 - _i2] + }; + p1 = { + x: rs.allpts[l - 4 - _i2], + y: rs.allpts[l - 3 - _i2] + }; + } + di = dist(p0, p1); + d0 = d; + d += di; + if (d >= offset) { + break; + } + } + var pD = offset - d0; + var _t = pD / di; + _t = bound(0, _t, 1); + p = lineAt(p0, p1, _t); + angle = lineAngle(p0, p1); + break; + } + } + setRs('labelX', prefix, p.x); + setRs('labelY', prefix, p.y); + setRs('labelAutoAngle', prefix, angle); + }; + calculateEndProjection('source'); + calculateEndProjection('target'); + this.applyLabelDimensions(edge); +}; +BRp$9.applyLabelDimensions = function (ele) { + this.applyPrefixedLabelDimensions(ele); + if (ele.isEdge()) { + this.applyPrefixedLabelDimensions(ele, 'source'); + this.applyPrefixedLabelDimensions(ele, 'target'); + } +}; +BRp$9.applyPrefixedLabelDimensions = function (ele, prefix) { + var _p = ele._private; + var text = this.getLabelText(ele, prefix); + var labelDims = this.calculateLabelDimensions(ele, text); + var lineHeight = ele.pstyle('line-height').pfValue; + var textWrap = ele.pstyle('text-wrap').strValue; + var lines = getPrefixedProperty(_p.rscratch, 'labelWrapCachedLines', prefix) || []; + var numLines = textWrap !== 'wrap' ? 1 : Math.max(lines.length, 1); + var normPerLineHeight = labelDims.height / numLines; + var labelLineHeight = normPerLineHeight * lineHeight; + var width = labelDims.width; + var height = labelDims.height + (numLines - 1) * (lineHeight - 1) * normPerLineHeight; + setPrefixedProperty(_p.rstyle, 'labelWidth', prefix, width); + setPrefixedProperty(_p.rscratch, 'labelWidth', prefix, width); + setPrefixedProperty(_p.rstyle, 'labelHeight', prefix, height); + setPrefixedProperty(_p.rscratch, 'labelHeight', prefix, height); + setPrefixedProperty(_p.rscratch, 'labelLineHeight', prefix, labelLineHeight); +}; +BRp$9.getLabelText = function (ele, prefix) { + var _p = ele._private; + var pfd = prefix ? prefix + '-' : ''; + var text = ele.pstyle(pfd + 'label').strValue; + var textTransform = ele.pstyle('text-transform').value; + var rscratch = function rscratch(propName, value) { + if (value) { + setPrefixedProperty(_p.rscratch, propName, prefix, value); + return value; + } else { + return getPrefixedProperty(_p.rscratch, propName, prefix); + } + }; + + // for empty text, skip all processing + if (!text) { + return ''; + } + if (textTransform == 'none') ; else if (textTransform == 'uppercase') { + text = text.toUpperCase(); + } else if (textTransform == 'lowercase') { + text = text.toLowerCase(); + } + var wrapStyle = ele.pstyle('text-wrap').value; + if (wrapStyle === 'wrap') { + var labelKey = rscratch('labelKey'); + + // save recalc if the label is the same as before + if (labelKey != null && rscratch('labelWrapKey') === labelKey) { + return rscratch('labelWrapCachedText'); + } + var zwsp = "\u200B"; + var lines = text.split('\n'); + var maxW = ele.pstyle('text-max-width').pfValue; + var overflow = ele.pstyle('text-overflow-wrap').value; + var overflowAny = overflow === 'anywhere'; + var wrappedLines = []; + var wordsRegex = /[\s\u200b]+/; + var wordSeparator = overflowAny ? '' : ' '; + for (var l = 0; l < lines.length; l++) { + var line = lines[l]; + var lineDims = this.calculateLabelDimensions(ele, line); + var lineW = lineDims.width; + if (overflowAny) { + var processedLine = line.split('').join(zwsp); + line = processedLine; + } + if (lineW > maxW) { + // line is too long + var words = line.split(wordsRegex); + var subline = ''; + for (var w = 0; w < words.length; w++) { + var word = words[w]; + var testLine = subline.length === 0 ? word : subline + wordSeparator + word; + var testDims = this.calculateLabelDimensions(ele, testLine); + var testW = testDims.width; + if (testW <= maxW) { + // word fits on current line + subline += word + wordSeparator; + } else { + // word starts new line + if (subline) { + wrappedLines.push(subline); + } + subline = word + wordSeparator; + } + } + + // if there's remaining text, put it in a wrapped line + if (!subline.match(/^[\s\u200b]+$/)) { + wrappedLines.push(subline); + } + } else { + // line is already short enough + wrappedLines.push(line); + } + } // for + + rscratch('labelWrapCachedLines', wrappedLines); + text = rscratch('labelWrapCachedText', wrappedLines.join('\n')); + rscratch('labelWrapKey', labelKey); + } else if (wrapStyle === 'ellipsis') { + var _maxW = ele.pstyle('text-max-width').pfValue; + var ellipsized = ''; + var ellipsis = "\u2026"; + var incLastCh = false; + if (this.calculateLabelDimensions(ele, text).width < _maxW) { + // the label already fits + return text; + } + for (var i = 0; i < text.length; i++) { + var widthWithNextCh = this.calculateLabelDimensions(ele, ellipsized + text[i] + ellipsis).width; + if (widthWithNextCh > _maxW) { + break; + } + ellipsized += text[i]; + if (i === text.length - 1) { + incLastCh = true; + } + } + if (!incLastCh) { + ellipsized += ellipsis; + } + return ellipsized; + } // if ellipsize + + return text; +}; +BRp$9.getLabelJustification = function (ele) { + var justification = ele.pstyle('text-justification').strValue; + var textHalign = ele.pstyle('text-halign').strValue; + if (justification === 'auto') { + if (ele.isNode()) { + switch (textHalign) { + case 'left': + return 'right'; + case 'right': + return 'left'; + default: + return 'center'; + } + } else { + return 'center'; + } + } else { + return justification; + } +}; +BRp$9.calculateLabelDimensions = function (ele, text) { + var r = this; + var cacheKey = hashString(text, ele._private.labelDimsKey); + var cache = r.labelDimCache || (r.labelDimCache = []); + var existingVal = cache[cacheKey]; + if (existingVal != null) { + return existingVal; + } + var padding = 0; // add padding around text dims, as the measurement isn't that accurate + var fStyle = ele.pstyle('font-style').strValue; + var size = ele.pstyle('font-size').pfValue; + var family = ele.pstyle('font-family').strValue; + var weight = ele.pstyle('font-weight').strValue; + var canvas = this.labelCalcCanvas; + var c2d = this.labelCalcCanvasContext; + if (!canvas) { + canvas = this.labelCalcCanvas = document.createElement('canvas'); + c2d = this.labelCalcCanvasContext = canvas.getContext('2d'); + var ds = canvas.style; + ds.position = 'absolute'; + ds.left = '-9999px'; + ds.top = '-9999px'; + ds.zIndex = '-1'; + ds.visibility = 'hidden'; + ds.pointerEvents = 'none'; + } + c2d.font = "".concat(fStyle, " ").concat(weight, " ").concat(size, "px ").concat(family); + var width = 0; + var height = 0; + var lines = text.split('\n'); + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + var metrics = c2d.measureText(line); + var w = Math.ceil(metrics.width); + var h = size; + width = Math.max(w, width); + height += h; + } + width += padding; + height += padding; + return cache[cacheKey] = { + width: width, + height: height + }; +}; +BRp$9.calculateLabelAngle = function (ele, prefix) { + var _p = ele._private; + var rs = _p.rscratch; + var isEdge = ele.isEdge(); + var prefixDash = prefix ? prefix + '-' : ''; + var rot = ele.pstyle(prefixDash + 'text-rotation'); + var rotStr = rot.strValue; + if (rotStr === 'none') { + return 0; + } else if (isEdge && rotStr === 'autorotate') { + return rs.labelAutoAngle; + } else if (rotStr === 'autorotate') { + return 0; + } else { + return rot.pfValue; + } +}; +BRp$9.calculateLabelAngles = function (ele) { + var r = this; + var isEdge = ele.isEdge(); + var _p = ele._private; + var rs = _p.rscratch; + rs.labelAngle = r.calculateLabelAngle(ele); + if (isEdge) { + rs.sourceLabelAngle = r.calculateLabelAngle(ele, 'source'); + rs.targetLabelAngle = r.calculateLabelAngle(ele, 'target'); + } +}; + +var BRp$8 = {}; +var TOO_SMALL_CUT_RECT = 28; +var warnedCutRect = false; +BRp$8.getNodeShape = function (node) { + var r = this; + var shape = node.pstyle('shape').value; + if (shape === 'cutrectangle' && (node.width() < TOO_SMALL_CUT_RECT || node.height() < TOO_SMALL_CUT_RECT)) { + if (!warnedCutRect) { + warn('The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead'); + warnedCutRect = true; + } + return 'rectangle'; + } + if (node.isParent()) { + if (shape === 'rectangle' || shape === 'roundrectangle' || shape === 'round-rectangle' || shape === 'cutrectangle' || shape === 'cut-rectangle' || shape === 'barrel') { + return shape; + } else { + return 'rectangle'; + } + } + if (shape === 'polygon') { + var points = node.pstyle('shape-polygon-points').value; + return r.nodeShapes.makePolygon(points).name; + } + return shape; +}; + +var BRp$7 = {}; +BRp$7.registerCalculationListeners = function () { + var cy = this.cy; + var elesToUpdate = cy.collection(); + var r = this; + var enqueue = function enqueue(eles) { + var dirtyStyleCaches = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + elesToUpdate.merge(eles); + if (dirtyStyleCaches) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _p = ele._private; + var rstyle = _p.rstyle; + rstyle.clean = false; + rstyle.cleanConnected = false; + } + } + }; + r.binder(cy).on('bounds.* dirty.*', function onDirtyBounds(e) { + var ele = e.target; + enqueue(ele); + }).on('style.* background.*', function onDirtyStyle(e) { + var ele = e.target; + enqueue(ele, false); + }); + var updateEleCalcs = function updateEleCalcs(willDraw) { + if (willDraw) { + var fns = r.onUpdateEleCalcsFns; + + // because we need to have up-to-date style (e.g. stylesheet mappers) + // before calculating rendered style (and pstyle might not be called yet) + elesToUpdate.cleanStyle(); + for (var i = 0; i < elesToUpdate.length; i++) { + var ele = elesToUpdate[i]; + var rstyle = ele._private.rstyle; + if (ele.isNode() && !rstyle.cleanConnected) { + enqueue(ele.connectedEdges()); + rstyle.cleanConnected = true; + } + } + if (fns) { + for (var _i = 0; _i < fns.length; _i++) { + var fn = fns[_i]; + fn(willDraw, elesToUpdate); + } + } + r.recalculateRenderedStyle(elesToUpdate); + elesToUpdate = cy.collection(); + } + }; + r.flushRenderedStyleQueue = function () { + updateEleCalcs(true); + }; + r.beforeRender(updateEleCalcs, r.beforeRenderPriorities.eleCalcs); +}; +BRp$7.onUpdateEleCalcs = function (fn) { + var fns = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; + fns.push(fn); +}; +BRp$7.recalculateRenderedStyle = function (eles, useCache) { + var isCleanConnected = function isCleanConnected(ele) { + return ele._private.rstyle.cleanConnected; + }; + var edges = []; + var nodes = []; + + // the renderer can't be used for calcs when destroyed, e.g. ele.boundingBox() + if (this.destroyed) { + return; + } + + // use cache by default for perf + if (useCache === undefined) { + useCache = true; + } + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _p = ele._private; + var rstyle = _p.rstyle; + + // an edge may be implicitly dirty b/c of one of its connected nodes + // (and a request for recalc may come in between frames) + if (ele.isEdge() && (!isCleanConnected(ele.source()) || !isCleanConnected(ele.target()))) { + rstyle.clean = false; + } + + // only update if dirty and in graph + if (useCache && rstyle.clean || ele.removed()) { + continue; + } + + // only update if not display: none + if (ele.pstyle('display').value === 'none') { + continue; + } + if (_p.group === 'nodes') { + nodes.push(ele); + } else { + // edges + edges.push(ele); + } + rstyle.clean = true; + } + + // update node data from projections + for (var _i2 = 0; _i2 < nodes.length; _i2++) { + var _ele = nodes[_i2]; + var _p2 = _ele._private; + var _rstyle = _p2.rstyle; + var pos = _ele.position(); + this.recalculateNodeLabelProjection(_ele); + _rstyle.nodeX = pos.x; + _rstyle.nodeY = pos.y; + _rstyle.nodeW = _ele.pstyle('width').pfValue; + _rstyle.nodeH = _ele.pstyle('height').pfValue; + } + this.recalculateEdgeProjections(edges); + + // update edge data from projections + for (var _i3 = 0; _i3 < edges.length; _i3++) { + var _ele2 = edges[_i3]; + var _p3 = _ele2._private; + var _rstyle2 = _p3.rstyle; + var rs = _p3.rscratch; + + // update rstyle positions + _rstyle2.srcX = rs.arrowStartX; + _rstyle2.srcY = rs.arrowStartY; + _rstyle2.tgtX = rs.arrowEndX; + _rstyle2.tgtY = rs.arrowEndY; + _rstyle2.midX = rs.midX; + _rstyle2.midY = rs.midY; + _rstyle2.labelAngle = rs.labelAngle; + _rstyle2.sourceLabelAngle = rs.sourceLabelAngle; + _rstyle2.targetLabelAngle = rs.targetLabelAngle; + } +}; + +var BRp$6 = {}; +BRp$6.updateCachedGrabbedEles = function () { + var eles = this.cachedZSortedEles; + if (!eles) { + // just let this be recalculated on the next z sort tick + return; + } + eles.drag = []; + eles.nondrag = []; + var grabTargets = []; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var rs = ele._private.rscratch; + if (ele.grabbed() && !ele.isParent()) { + grabTargets.push(ele); + } else if (rs.inDragLayer) { + eles.drag.push(ele); + } else { + eles.nondrag.push(ele); + } + } + + // put the grab target nodes last so it's on top of its neighbourhood + for (var i = 0; i < grabTargets.length; i++) { + var ele = grabTargets[i]; + eles.drag.push(ele); + } +}; +BRp$6.invalidateCachedZSortedEles = function () { + this.cachedZSortedEles = null; +}; +BRp$6.getCachedZSortedEles = function (forceRecalc) { + if (forceRecalc || !this.cachedZSortedEles) { + var eles = this.cy.mutableElements().toArray(); + eles.sort(zIndexSort); + eles.interactive = eles.filter(function (ele) { + return ele.interactive(); + }); + this.cachedZSortedEles = eles; + this.updateCachedGrabbedEles(); + } else { + eles = this.cachedZSortedEles; + } + return eles; +}; + +var BRp$5 = {}; +[BRp$e, BRp$d, BRp$c, BRp$b, BRp$a, BRp$9, BRp$8, BRp$7, BRp$6].forEach(function (props) { + extend(BRp$5, props); +}); + +var BRp$4 = {}; +BRp$4.getCachedImage = function (url, crossOrigin, onLoad) { + var r = this; + var imageCache = r.imageCache = r.imageCache || {}; + var cache = imageCache[url]; + if (cache) { + if (!cache.image.complete) { + cache.image.addEventListener('load', onLoad); + } + return cache.image; + } else { + cache = imageCache[url] = imageCache[url] || {}; + var image = cache.image = new Image(); // eslint-disable-line no-undef + + image.addEventListener('load', onLoad); + image.addEventListener('error', function () { + image.error = true; + }); + + // #1582 safari doesn't load data uris with crossOrigin properly + // https://bugs.webkit.org/show_bug.cgi?id=123978 + var dataUriPrefix = 'data:'; + var isDataUri = url.substring(0, dataUriPrefix.length).toLowerCase() === dataUriPrefix; + if (!isDataUri) { + // if crossorigin is 'null'(stringified), then manually set it to null + crossOrigin = crossOrigin === 'null' ? null : crossOrigin; + image.crossOrigin = crossOrigin; // prevent tainted canvas + } + + image.src = url; + return image; + } +}; + +var BRp$3 = {}; + +/* global document, window, ResizeObserver, MutationObserver */ + +BRp$3.registerBinding = function (target, event, handler, useCapture) { + // eslint-disable-line no-unused-vars + var args = Array.prototype.slice.apply(arguments, [1]); // copy + var b = this.binder(target); + return b.on.apply(b, args); +}; +BRp$3.binder = function (tgt) { + var r = this; + var containerWindow = r.cy.window(); + var tgtIsDom = tgt === containerWindow || tgt === containerWindow.document || tgt === containerWindow.document.body || domElement(tgt); + if (r.supportsPassiveEvents == null) { + // from https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection + var supportsPassive = false; + try { + var opts = Object.defineProperty({}, 'passive', { + get: function get() { + supportsPassive = true; + return true; + } + }); + containerWindow.addEventListener('test', null, opts); + } catch (err) { + // not supported + } + r.supportsPassiveEvents = supportsPassive; + } + var on = function on(event, handler, useCapture) { + var args = Array.prototype.slice.call(arguments); + if (tgtIsDom && r.supportsPassiveEvents) { + // replace useCapture w/ opts obj + args[2] = { + capture: useCapture != null ? useCapture : false, + passive: false, + once: false + }; + } + r.bindings.push({ + target: tgt, + args: args + }); + (tgt.addEventListener || tgt.on).apply(tgt, args); + return this; + }; + return { + on: on, + addEventListener: on, + addListener: on, + bind: on + }; +}; +BRp$3.nodeIsDraggable = function (node) { + return node && node.isNode() && !node.locked() && node.grabbable(); +}; +BRp$3.nodeIsGrabbable = function (node) { + return this.nodeIsDraggable(node) && node.interactive(); +}; +BRp$3.load = function () { + var r = this; + var containerWindow = r.cy.window(); + var isSelected = function isSelected(ele) { + return ele.selected(); + }; + var triggerEvents = function triggerEvents(target, names, e, position) { + if (target == null) { + target = r.cy; + } + for (var i = 0; i < names.length; i++) { + var name = names[i]; + target.emit({ + originalEvent: e, + type: name, + position: position + }); + } + }; + var isMultSelKeyDown = function isMultSelKeyDown(e) { + return e.shiftKey || e.metaKey || e.ctrlKey; // maybe e.altKey + }; + + var allowPanningPassthrough = function allowPanningPassthrough(down, downs) { + var allowPassthrough = true; + if (r.cy.hasCompoundNodes() && down && down.pannable()) { + // a grabbable compound node below the ele => no passthrough panning + for (var i = 0; downs && i < downs.length; i++) { + var down = downs[i]; + + //if any parent node in event hierarchy isn't pannable, reject passthrough + if (down.isNode() && down.isParent() && !down.pannable()) { + allowPassthrough = false; + break; + } + } + } else { + allowPassthrough = true; + } + return allowPassthrough; + }; + var setGrabbed = function setGrabbed(ele) { + ele[0]._private.grabbed = true; + }; + var setFreed = function setFreed(ele) { + ele[0]._private.grabbed = false; + }; + var setInDragLayer = function setInDragLayer(ele) { + ele[0]._private.rscratch.inDragLayer = true; + }; + var setOutDragLayer = function setOutDragLayer(ele) { + ele[0]._private.rscratch.inDragLayer = false; + }; + var setGrabTarget = function setGrabTarget(ele) { + ele[0]._private.rscratch.isGrabTarget = true; + }; + var removeGrabTarget = function removeGrabTarget(ele) { + ele[0]._private.rscratch.isGrabTarget = false; + }; + var addToDragList = function addToDragList(ele, opts) { + var list = opts.addToList; + var listHasEle = list.has(ele); + if (!listHasEle && ele.grabbable() && !ele.locked()) { + list.merge(ele); + setGrabbed(ele); + } + }; + + // helper function to determine which child nodes and inner edges + // of a compound node to be dragged as well as the grabbed and selected nodes + var addDescendantsToDrag = function addDescendantsToDrag(node, opts) { + if (!node.cy().hasCompoundNodes()) { + return; + } + if (opts.inDragLayer == null && opts.addToList == null) { + return; + } // nothing to do + + var innerNodes = node.descendants(); + if (opts.inDragLayer) { + innerNodes.forEach(setInDragLayer); + innerNodes.connectedEdges().forEach(setInDragLayer); + } + if (opts.addToList) { + addToDragList(innerNodes, opts); + } + }; + + // adds the given nodes and its neighbourhood to the drag layer + var addNodesToDrag = function addNodesToDrag(nodes, opts) { + opts = opts || {}; + var hasCompoundNodes = nodes.cy().hasCompoundNodes(); + if (opts.inDragLayer) { + nodes.forEach(setInDragLayer); + nodes.neighborhood().stdFilter(function (ele) { + return !hasCompoundNodes || ele.isEdge(); + }).forEach(setInDragLayer); + } + if (opts.addToList) { + nodes.forEach(function (ele) { + addToDragList(ele, opts); + }); + } + addDescendantsToDrag(nodes, opts); // always add to drag + + // also add nodes and edges related to the topmost ancestor + updateAncestorsInDragLayer(nodes, { + inDragLayer: opts.inDragLayer + }); + r.updateCachedGrabbedEles(); + }; + var addNodeToDrag = addNodesToDrag; + var freeDraggedElements = function freeDraggedElements(grabbedEles) { + if (!grabbedEles) { + return; + } + + // just go over all elements rather than doing a bunch of (possibly expensive) traversals + r.getCachedZSortedEles().forEach(function (ele) { + setFreed(ele); + setOutDragLayer(ele); + removeGrabTarget(ele); + }); + r.updateCachedGrabbedEles(); + }; + + // helper function to determine which ancestor nodes and edges should go + // to the drag layer (or should be removed from drag layer). + var updateAncestorsInDragLayer = function updateAncestorsInDragLayer(node, opts) { + if (opts.inDragLayer == null && opts.addToList == null) { + return; + } // nothing to do + + if (!node.cy().hasCompoundNodes()) { + return; + } + + // find top-level parent + var parent = node.ancestors().orphans(); + + // no parent node: no nodes to add to the drag layer + if (parent.same(node)) { + return; + } + var nodes = parent.descendants().spawnSelf().merge(parent).unmerge(node).unmerge(node.descendants()); + var edges = nodes.connectedEdges(); + if (opts.inDragLayer) { + edges.forEach(setInDragLayer); + nodes.forEach(setInDragLayer); + } + if (opts.addToList) { + nodes.forEach(function (ele) { + addToDragList(ele, opts); + }); + } + }; + var blurActiveDomElement = function blurActiveDomElement() { + if (document.activeElement != null && document.activeElement.blur != null) { + document.activeElement.blur(); + } + }; + var haveMutationsApi = typeof MutationObserver !== 'undefined'; + var haveResizeObserverApi = typeof ResizeObserver !== 'undefined'; + + // watch for when the cy container is removed from the dom + if (haveMutationsApi) { + r.removeObserver = new MutationObserver(function (mutns) { + // eslint-disable-line no-undef + for (var i = 0; i < mutns.length; i++) { + var mutn = mutns[i]; + var rNodes = mutn.removedNodes; + if (rNodes) { + for (var j = 0; j < rNodes.length; j++) { + var rNode = rNodes[j]; + if (rNode === r.container) { + r.destroy(); + break; + } + } + } + } + }); + if (r.container.parentNode) { + r.removeObserver.observe(r.container.parentNode, { + childList: true + }); + } + } else { + r.registerBinding(r.container, 'DOMNodeRemoved', function (e) { + // eslint-disable-line no-unused-vars + r.destroy(); + }); + } + var onResize = debounce__default["default"](function () { + r.cy.resize(); + }, 100); + if (haveMutationsApi) { + r.styleObserver = new MutationObserver(onResize); // eslint-disable-line no-undef + + r.styleObserver.observe(r.container, { + attributes: true + }); + } + + // auto resize + r.registerBinding(containerWindow, 'resize', onResize); // eslint-disable-line no-undef + + if (haveResizeObserverApi) { + r.resizeObserver = new ResizeObserver(onResize); // eslint-disable-line no-undef + + r.resizeObserver.observe(r.container); + } + var forEachUp = function forEachUp(domEle, fn) { + while (domEle != null) { + fn(domEle); + domEle = domEle.parentNode; + } + }; + var invalidateCoords = function invalidateCoords() { + r.invalidateContainerClientCoordsCache(); + }; + forEachUp(r.container, function (domEle) { + r.registerBinding(domEle, 'transitionend', invalidateCoords); + r.registerBinding(domEle, 'animationend', invalidateCoords); + r.registerBinding(domEle, 'scroll', invalidateCoords); + }); + + // stop right click menu from appearing on cy + r.registerBinding(r.container, 'contextmenu', function (e) { + e.preventDefault(); + }); + var inBoxSelection = function inBoxSelection() { + return r.selection[4] !== 0; + }; + var eventInContainer = function eventInContainer(e) { + // save cycles if mouse events aren't to be captured + var containerPageCoords = r.findContainerClientCoords(); + var x = containerPageCoords[0]; + var y = containerPageCoords[1]; + var width = containerPageCoords[2]; + var height = containerPageCoords[3]; + var positions = e.touches ? e.touches : [e]; + var atLeastOnePosInside = false; + for (var i = 0; i < positions.length; i++) { + var p = positions[i]; + if (x <= p.clientX && p.clientX <= x + width && y <= p.clientY && p.clientY <= y + height) { + atLeastOnePosInside = true; + break; + } + } + if (!atLeastOnePosInside) { + return false; + } + var container = r.container; + var target = e.target; + var tParent = target.parentNode; + var containerIsTarget = false; + while (tParent) { + if (tParent === container) { + containerIsTarget = true; + break; + } + tParent = tParent.parentNode; + } + if (!containerIsTarget) { + return false; + } // if target is outisde cy container, then this event is not for us + + return true; + }; + + // Primary key + r.registerBinding(r.container, 'mousedown', function mousedownHandler(e) { + if (!eventInContainer(e)) { + return; + } + e.preventDefault(); + blurActiveDomElement(); + r.hoverData.capture = true; + r.hoverData.which = e.which; + var cy = r.cy; + var gpos = [e.clientX, e.clientY]; + var pos = r.projectIntoViewport(gpos[0], gpos[1]); + var select = r.selection; + var nears = r.findNearestElements(pos[0], pos[1], true, false); + var near = nears[0]; + var draggedElements = r.dragData.possibleDragElements; + r.hoverData.mdownPos = pos; + r.hoverData.mdownGPos = gpos; + var checkForTaphold = function checkForTaphold() { + r.hoverData.tapholdCancelled = false; + clearTimeout(r.hoverData.tapholdTimeout); + r.hoverData.tapholdTimeout = setTimeout(function () { + if (r.hoverData.tapholdCancelled) { + return; + } else { + var ele = r.hoverData.down; + if (ele) { + ele.emit({ + originalEvent: e, + type: 'taphold', + position: { + x: pos[0], + y: pos[1] + } + }); + } else { + cy.emit({ + originalEvent: e, + type: 'taphold', + position: { + x: pos[0], + y: pos[1] + } + }); + } + } + }, r.tapholdDuration); + }; + + // Right click button + if (e.which == 3) { + r.hoverData.cxtStarted = true; + var cxtEvt = { + originalEvent: e, + type: 'cxttapstart', + position: { + x: pos[0], + y: pos[1] + } + }; + if (near) { + near.activate(); + near.emit(cxtEvt); + r.hoverData.down = near; + } else { + cy.emit(cxtEvt); + } + r.hoverData.downTime = new Date().getTime(); + r.hoverData.cxtDragged = false; + + // Primary button + } else if (e.which == 1) { + if (near) { + near.activate(); + } + + // Element dragging + { + // If something is under the cursor and it is draggable, prepare to grab it + if (near != null) { + if (r.nodeIsGrabbable(near)) { + var makeEvent = function makeEvent(type) { + return { + originalEvent: e, + type: type, + position: { + x: pos[0], + y: pos[1] + } + }; + }; + var triggerGrab = function triggerGrab(ele) { + ele.emit(makeEvent('grab')); + }; + setGrabTarget(near); + if (!near.selected()) { + draggedElements = r.dragData.possibleDragElements = cy.collection(); + addNodeToDrag(near, { + addToList: draggedElements + }); + near.emit(makeEvent('grabon')).emit(makeEvent('grab')); + } else { + draggedElements = r.dragData.possibleDragElements = cy.collection(); + var selectedNodes = cy.$(function (ele) { + return ele.isNode() && ele.selected() && r.nodeIsGrabbable(ele); + }); + addNodesToDrag(selectedNodes, { + addToList: draggedElements + }); + near.emit(makeEvent('grabon')); + selectedNodes.forEach(triggerGrab); + } + r.redrawHint('eles', true); + r.redrawHint('drag', true); + } + } + r.hoverData.down = near; + r.hoverData.downs = nears; + r.hoverData.downTime = new Date().getTime(); + } + triggerEvents(near, ['mousedown', 'tapstart', 'vmousedown'], e, { + x: pos[0], + y: pos[1] + }); + if (near == null) { + select[4] = 1; + r.data.bgActivePosistion = { + x: pos[0], + y: pos[1] + }; + r.redrawHint('select', true); + r.redraw(); + } else if (near.pannable()) { + select[4] = 1; // for future pan + } + + checkForTaphold(); + } + + // Initialize selection box coordinates + select[0] = select[2] = pos[0]; + select[1] = select[3] = pos[1]; + }, false); + r.registerBinding(containerWindow, 'mousemove', function mousemoveHandler(e) { + // eslint-disable-line no-undef + var capture = r.hoverData.capture; + if (!capture && !eventInContainer(e)) { + return; + } + var preventDefault = false; + var cy = r.cy; + var zoom = cy.zoom(); + var gpos = [e.clientX, e.clientY]; + var pos = r.projectIntoViewport(gpos[0], gpos[1]); + var mdownPos = r.hoverData.mdownPos; + var mdownGPos = r.hoverData.mdownGPos; + var select = r.selection; + var near = null; + if (!r.hoverData.draggingEles && !r.hoverData.dragging && !r.hoverData.selecting) { + near = r.findNearestElement(pos[0], pos[1], true, false); + } + var last = r.hoverData.last; + var down = r.hoverData.down; + var disp = [pos[0] - select[2], pos[1] - select[3]]; + var draggedElements = r.dragData.possibleDragElements; + var isOverThresholdDrag; + if (mdownGPos) { + var dx = gpos[0] - mdownGPos[0]; + var dx2 = dx * dx; + var dy = gpos[1] - mdownGPos[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + r.hoverData.isOverThresholdDrag = isOverThresholdDrag = dist2 >= r.desktopTapThreshold2; + } + var multSelKeyDown = isMultSelKeyDown(e); + if (isOverThresholdDrag) { + r.hoverData.tapholdCancelled = true; + } + var updateDragDelta = function updateDragDelta() { + var dragDelta = r.hoverData.dragDelta = r.hoverData.dragDelta || []; + if (dragDelta.length === 0) { + dragDelta.push(disp[0]); + dragDelta.push(disp[1]); + } else { + dragDelta[0] += disp[0]; + dragDelta[1] += disp[1]; + } + }; + preventDefault = true; + triggerEvents(near, ['mousemove', 'vmousemove', 'tapdrag'], e, { + x: pos[0], + y: pos[1] + }); + var goIntoBoxMode = function goIntoBoxMode() { + r.data.bgActivePosistion = undefined; + if (!r.hoverData.selecting) { + cy.emit({ + originalEvent: e, + type: 'boxstart', + position: { + x: pos[0], + y: pos[1] + } + }); + } + select[4] = 1; + r.hoverData.selecting = true; + r.redrawHint('select', true); + r.redraw(); + }; + + // trigger context drag if rmouse down + if (r.hoverData.which === 3) { + // but only if over threshold + if (isOverThresholdDrag) { + var cxtEvt = { + originalEvent: e, + type: 'cxtdrag', + position: { + x: pos[0], + y: pos[1] + } + }; + if (down) { + down.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + r.hoverData.cxtDragged = true; + if (!r.hoverData.cxtOver || near !== r.hoverData.cxtOver) { + if (r.hoverData.cxtOver) { + r.hoverData.cxtOver.emit({ + originalEvent: e, + type: 'cxtdragout', + position: { + x: pos[0], + y: pos[1] + } + }); + } + r.hoverData.cxtOver = near; + if (near) { + near.emit({ + originalEvent: e, + type: 'cxtdragover', + position: { + x: pos[0], + y: pos[1] + } + }); + } + } + } + + // Check if we are drag panning the entire graph + } else if (r.hoverData.dragging) { + preventDefault = true; + if (cy.panningEnabled() && cy.userPanningEnabled()) { + var deltaP; + if (r.hoverData.justStartedPan) { + var mdPos = r.hoverData.mdownPos; + deltaP = { + x: (pos[0] - mdPos[0]) * zoom, + y: (pos[1] - mdPos[1]) * zoom + }; + r.hoverData.justStartedPan = false; + } else { + deltaP = { + x: disp[0] * zoom, + y: disp[1] * zoom + }; + } + cy.panBy(deltaP); + cy.emit('dragpan'); + r.hoverData.dragged = true; + } + + // Needs reproject due to pan changing viewport + pos = r.projectIntoViewport(e.clientX, e.clientY); + + // Checks primary button down & out of time & mouse not moved much + } else if (select[4] == 1 && (down == null || down.pannable())) { + if (isOverThresholdDrag) { + if (!r.hoverData.dragging && cy.boxSelectionEnabled() && (multSelKeyDown || !cy.panningEnabled() || !cy.userPanningEnabled())) { + goIntoBoxMode(); + } else if (!r.hoverData.selecting && cy.panningEnabled() && cy.userPanningEnabled()) { + var allowPassthrough = allowPanningPassthrough(down, r.hoverData.downs); + if (allowPassthrough) { + r.hoverData.dragging = true; + r.hoverData.justStartedPan = true; + select[4] = 0; + r.data.bgActivePosistion = array2point(mdownPos); + r.redrawHint('select', true); + r.redraw(); + } + } + if (down && down.pannable() && down.active()) { + down.unactivate(); + } + } + } else { + if (down && down.pannable() && down.active()) { + down.unactivate(); + } + if ((!down || !down.grabbed()) && near != last) { + if (last) { + triggerEvents(last, ['mouseout', 'tapdragout'], e, { + x: pos[0], + y: pos[1] + }); + } + if (near) { + triggerEvents(near, ['mouseover', 'tapdragover'], e, { + x: pos[0], + y: pos[1] + }); + } + r.hoverData.last = near; + } + if (down) { + if (isOverThresholdDrag) { + // then we can take action + + if (cy.boxSelectionEnabled() && multSelKeyDown) { + // then selection overrides + if (down && down.grabbed()) { + freeDraggedElements(draggedElements); + down.emit('freeon'); + draggedElements.emit('free'); + if (r.dragData.didDrag) { + down.emit('dragfreeon'); + draggedElements.emit('dragfree'); + } + } + goIntoBoxMode(); + } else if (down && down.grabbed() && r.nodeIsDraggable(down)) { + // drag node + var justStartedDrag = !r.dragData.didDrag; + if (justStartedDrag) { + r.redrawHint('eles', true); + } + r.dragData.didDrag = true; // indicate that we actually did drag the node + + // now, add the elements to the drag layer if not done already + if (!r.hoverData.draggingEles) { + addNodesToDrag(draggedElements, { + inDragLayer: true + }); + } + var totalShift = { + x: 0, + y: 0 + }; + if (number$1(disp[0]) && number$1(disp[1])) { + totalShift.x += disp[0]; + totalShift.y += disp[1]; + if (justStartedDrag) { + var dragDelta = r.hoverData.dragDelta; + if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) { + totalShift.x += dragDelta[0]; + totalShift.y += dragDelta[1]; + } + } + } + r.hoverData.draggingEles = true; + draggedElements.silentShift(totalShift).emit('position drag'); + r.redrawHint('drag', true); + r.redraw(); + } + } else { + // otherwise save drag delta for when we actually start dragging so the relative grab pos is constant + updateDragDelta(); + } + } + + // prevent the dragging from triggering text selection on the page + preventDefault = true; + } + select[2] = pos[0]; + select[3] = pos[1]; + if (preventDefault) { + if (e.stopPropagation) e.stopPropagation(); + if (e.preventDefault) e.preventDefault(); + return false; + } + }, false); + var clickTimeout, didDoubleClick, prevClickTimeStamp; + r.registerBinding(containerWindow, 'mouseup', function mouseupHandler(e) { + // eslint-disable-line no-undef + var capture = r.hoverData.capture; + if (!capture) { + return; + } + r.hoverData.capture = false; + var cy = r.cy; + var pos = r.projectIntoViewport(e.clientX, e.clientY); + var select = r.selection; + var near = r.findNearestElement(pos[0], pos[1], true, false); + var draggedElements = r.dragData.possibleDragElements; + var down = r.hoverData.down; + var multSelKeyDown = isMultSelKeyDown(e); + if (r.data.bgActivePosistion) { + r.redrawHint('select', true); + r.redraw(); + } + r.hoverData.tapholdCancelled = true; + r.data.bgActivePosistion = undefined; // not active bg now + + if (down) { + down.unactivate(); + } + if (r.hoverData.which === 3) { + var cxtEvt = { + originalEvent: e, + type: 'cxttapend', + position: { + x: pos[0], + y: pos[1] + } + }; + if (down) { + down.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + if (!r.hoverData.cxtDragged) { + var cxtTap = { + originalEvent: e, + type: 'cxttap', + position: { + x: pos[0], + y: pos[1] + } + }; + if (down) { + down.emit(cxtTap); + } else { + cy.emit(cxtTap); + } + } + r.hoverData.cxtDragged = false; + r.hoverData.which = null; + } else if (r.hoverData.which === 1) { + triggerEvents(near, ['mouseup', 'tapend', 'vmouseup'], e, { + x: pos[0], + y: pos[1] + }); + if (!r.dragData.didDrag && + // didn't move a node around + !r.hoverData.dragged && + // didn't pan + !r.hoverData.selecting && + // not box selection + !r.hoverData.isOverThresholdDrag // didn't move too much + ) { + triggerEvents(down, ["click", "tap", "vclick"], e, { + x: pos[0], + y: pos[1] + }); + didDoubleClick = false; + if (e.timeStamp - prevClickTimeStamp <= cy.multiClickDebounceTime()) { + clickTimeout && clearTimeout(clickTimeout); + didDoubleClick = true; + prevClickTimeStamp = null; + triggerEvents(down, ["dblclick", "dbltap", "vdblclick"], e, { + x: pos[0], + y: pos[1] + }); + } else { + clickTimeout = setTimeout(function () { + if (didDoubleClick) return; + triggerEvents(down, ["oneclick", "onetap", "voneclick"], e, { + x: pos[0], + y: pos[1] + }); + }, cy.multiClickDebounceTime()); + prevClickTimeStamp = e.timeStamp; + } + } + + // Deselect all elements if nothing is currently under the mouse cursor and we aren't dragging something + if (down == null // not mousedown on node + && !r.dragData.didDrag // didn't move the node around + && !r.hoverData.selecting // not box selection + && !r.hoverData.dragged // didn't pan + && !isMultSelKeyDown(e)) { + cy.$(isSelected).unselect(['tapunselect']); + if (draggedElements.length > 0) { + r.redrawHint('eles', true); + } + r.dragData.possibleDragElements = draggedElements = cy.collection(); + } + + // Single selection + if (near == down && !r.dragData.didDrag && !r.hoverData.selecting) { + if (near != null && near._private.selectable) { + if (r.hoverData.dragging) ; else if (cy.selectionType() === 'additive' || multSelKeyDown) { + if (near.selected()) { + near.unselect(['tapunselect']); + } else { + near.select(['tapselect']); + } + } else { + if (!multSelKeyDown) { + cy.$(isSelected).unmerge(near).unselect(['tapunselect']); + near.select(['tapselect']); + } + } + r.redrawHint('eles', true); + } + } + if (r.hoverData.selecting) { + var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); + r.redrawHint('select', true); + if (box.length > 0) { + r.redrawHint('eles', true); + } + cy.emit({ + type: 'boxend', + originalEvent: e, + position: { + x: pos[0], + y: pos[1] + } + }); + var eleWouldBeSelected = function eleWouldBeSelected(ele) { + return ele.selectable() && !ele.selected(); + }; + if (cy.selectionType() === 'additive') { + box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); + } else { + if (!multSelKeyDown) { + cy.$(isSelected).unmerge(box).unselect(); + } + box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); + } + + // always need redraw in case eles unselectable + r.redraw(); + } + + // Cancel drag pan + if (r.hoverData.dragging) { + r.hoverData.dragging = false; + r.redrawHint('select', true); + r.redrawHint('eles', true); + r.redraw(); + } + if (!select[4]) { + r.redrawHint('drag', true); + r.redrawHint('eles', true); + var downWasGrabbed = down && down.grabbed(); + freeDraggedElements(draggedElements); + if (downWasGrabbed) { + down.emit('freeon'); + draggedElements.emit('free'); + if (r.dragData.didDrag) { + down.emit('dragfreeon'); + draggedElements.emit('dragfree'); + } + } + } + } // else not right mouse + + select[4] = 0; + r.hoverData.down = null; + r.hoverData.cxtStarted = false; + r.hoverData.draggingEles = false; + r.hoverData.selecting = false; + r.hoverData.isOverThresholdDrag = false; + r.dragData.didDrag = false; + r.hoverData.dragged = false; + r.hoverData.dragDelta = []; + r.hoverData.mdownPos = null; + r.hoverData.mdownGPos = null; + }, false); + var wheelHandler = function wheelHandler(e) { + if (r.scrollingPage) { + return; + } // while scrolling, ignore wheel-to-zoom + + var cy = r.cy; + var zoom = cy.zoom(); + var pan = cy.pan(); + var pos = r.projectIntoViewport(e.clientX, e.clientY); + var rpos = [pos[0] * zoom + pan.x, pos[1] * zoom + pan.y]; + if (r.hoverData.draggingEles || r.hoverData.dragging || r.hoverData.cxtStarted || inBoxSelection()) { + // if pan dragging or cxt dragging, wheel movements make no zoom + e.preventDefault(); + return; + } + if (cy.panningEnabled() && cy.userPanningEnabled() && cy.zoomingEnabled() && cy.userZoomingEnabled()) { + e.preventDefault(); + r.data.wheelZooming = true; + clearTimeout(r.data.wheelTimeout); + r.data.wheelTimeout = setTimeout(function () { + r.data.wheelZooming = false; + r.redrawHint('eles', true); + r.redraw(); + }, 150); + var diff; + if (e.deltaY != null) { + diff = e.deltaY / -250; + } else if (e.wheelDeltaY != null) { + diff = e.wheelDeltaY / 1000; + } else { + diff = e.wheelDelta / 1000; + } + diff = diff * r.wheelSensitivity; + var needsWheelFix = e.deltaMode === 1; + if (needsWheelFix) { + // fixes slow wheel events on ff/linux and ff/windows + diff *= 33; + } + var newZoom = cy.zoom() * Math.pow(10, diff); + if (e.type === 'gesturechange') { + newZoom = r.gestureStartZoom * e.scale; + } + cy.zoom({ + level: newZoom, + renderedPosition: { + x: rpos[0], + y: rpos[1] + } + }); + cy.emit(e.type === 'gesturechange' ? 'pinchzoom' : 'scrollzoom'); + } + }; + + // Functions to help with whether mouse wheel should trigger zooming + // -- + r.registerBinding(r.container, 'wheel', wheelHandler, true); + + // disable nonstandard wheel events + // r.registerBinding(r.container, 'mousewheel', wheelHandler, true); + // r.registerBinding(r.container, 'DOMMouseScroll', wheelHandler, true); + // r.registerBinding(r.container, 'MozMousePixelScroll', wheelHandler, true); // older firefox + + r.registerBinding(containerWindow, 'scroll', function scrollHandler(e) { + // eslint-disable-line no-unused-vars + r.scrollingPage = true; + clearTimeout(r.scrollingPageTimeout); + r.scrollingPageTimeout = setTimeout(function () { + r.scrollingPage = false; + }, 250); + }, true); + + // desktop safari pinch to zoom start + r.registerBinding(r.container, 'gesturestart', function gestureStartHandler(e) { + r.gestureStartZoom = r.cy.zoom(); + if (!r.hasTouchStarted) { + // don't affect touch devices like iphone + e.preventDefault(); + } + }, true); + r.registerBinding(r.container, 'gesturechange', function (e) { + if (!r.hasTouchStarted) { + // don't affect touch devices like iphone + wheelHandler(e); + } + }, true); + + // Functions to help with handling mouseout/mouseover on the Cytoscape container + // Handle mouseout on Cytoscape container + r.registerBinding(r.container, 'mouseout', function mouseOutHandler(e) { + var pos = r.projectIntoViewport(e.clientX, e.clientY); + r.cy.emit({ + originalEvent: e, + type: 'mouseout', + position: { + x: pos[0], + y: pos[1] + } + }); + }, false); + r.registerBinding(r.container, 'mouseover', function mouseOverHandler(e) { + var pos = r.projectIntoViewport(e.clientX, e.clientY); + r.cy.emit({ + originalEvent: e, + type: 'mouseover', + position: { + x: pos[0], + y: pos[1] + } + }); + }, false); + var f1x1, f1y1, f2x1, f2y1; // starting points for pinch-to-zoom + var distance1, distance1Sq; // initial distance between finger 1 and finger 2 for pinch-to-zoom + var center1, modelCenter1; // center point on start pinch to zoom + var offsetLeft, offsetTop; + var containerWidth, containerHeight; + var twoFingersStartInside; + var distance = function distance(x1, y1, x2, y2) { + return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); + }; + var distanceSq = function distanceSq(x1, y1, x2, y2) { + return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); + }; + var touchstartHandler; + r.registerBinding(r.container, 'touchstart', touchstartHandler = function touchstartHandler(e) { + r.hasTouchStarted = true; + if (!eventInContainer(e)) { + return; + } + blurActiveDomElement(); + r.touchData.capture = true; + r.data.bgActivePosistion = undefined; + var cy = r.cy; + var now = r.touchData.now; + var earlier = r.touchData.earlier; + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now[2] = pos[0]; + now[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now[4] = pos[0]; + now[5] = pos[1]; + } + + // record starting points for pinch-to-zoom + if (e.touches[1]) { + r.touchData.singleTouchMoved = true; + freeDraggedElements(r.dragData.touchDragEles); + var offsets = r.findContainerClientCoords(); + offsetLeft = offsets[0]; + offsetTop = offsets[1]; + containerWidth = offsets[2]; + containerHeight = offsets[3]; + f1x1 = e.touches[0].clientX - offsetLeft; + f1y1 = e.touches[0].clientY - offsetTop; + f2x1 = e.touches[1].clientX - offsetLeft; + f2y1 = e.touches[1].clientY - offsetTop; + twoFingersStartInside = 0 <= f1x1 && f1x1 <= containerWidth && 0 <= f2x1 && f2x1 <= containerWidth && 0 <= f1y1 && f1y1 <= containerHeight && 0 <= f2y1 && f2y1 <= containerHeight; + var pan = cy.pan(); + var zoom = cy.zoom(); + distance1 = distance(f1x1, f1y1, f2x1, f2y1); + distance1Sq = distanceSq(f1x1, f1y1, f2x1, f2y1); + center1 = [(f1x1 + f2x1) / 2, (f1y1 + f2y1) / 2]; + modelCenter1 = [(center1[0] - pan.x) / zoom, (center1[1] - pan.y) / zoom]; + + // consider context tap + var cxtDistThreshold = 200; + var cxtDistThresholdSq = cxtDistThreshold * cxtDistThreshold; + if (distance1Sq < cxtDistThresholdSq && !e.touches[2]) { + var near1 = r.findNearestElement(now[0], now[1], true, true); + var near2 = r.findNearestElement(now[2], now[3], true, true); + if (near1 && near1.isNode()) { + near1.activate().emit({ + originalEvent: e, + type: 'cxttapstart', + position: { + x: now[0], + y: now[1] + } + }); + r.touchData.start = near1; + } else if (near2 && near2.isNode()) { + near2.activate().emit({ + originalEvent: e, + type: 'cxttapstart', + position: { + x: now[0], + y: now[1] + } + }); + r.touchData.start = near2; + } else { + cy.emit({ + originalEvent: e, + type: 'cxttapstart', + position: { + x: now[0], + y: now[1] + } + }); + } + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + r.touchData.cxt = true; + r.touchData.cxtDragged = false; + r.data.bgActivePosistion = undefined; + r.redraw(); + return; + } + } + if (e.touches[2]) { + // ignore + + // safari on ios pans the page otherwise (normally you should be able to preventdefault on touchmove...) + if (cy.boxSelectionEnabled()) { + e.preventDefault(); + } + } else if (e.touches[1]) ; else if (e.touches[0]) { + var nears = r.findNearestElements(now[0], now[1], true, true); + var near = nears[0]; + if (near != null) { + near.activate(); + r.touchData.start = near; + r.touchData.starts = nears; + if (r.nodeIsGrabbable(near)) { + var draggedEles = r.dragData.touchDragEles = cy.collection(); + var selectedNodes = null; + r.redrawHint('eles', true); + r.redrawHint('drag', true); + if (near.selected()) { + // reset drag elements, since near will be added again + + selectedNodes = cy.$(function (ele) { + return ele.selected() && r.nodeIsGrabbable(ele); + }); + addNodesToDrag(selectedNodes, { + addToList: draggedEles + }); + } else { + addNodeToDrag(near, { + addToList: draggedEles + }); + } + setGrabTarget(near); + var makeEvent = function makeEvent(type) { + return { + originalEvent: e, + type: type, + position: { + x: now[0], + y: now[1] + } + }; + }; + near.emit(makeEvent('grabon')); + if (selectedNodes) { + selectedNodes.forEach(function (n) { + n.emit(makeEvent('grab')); + }); + } else { + near.emit(makeEvent('grab')); + } + } + } + triggerEvents(near, ['touchstart', 'tapstart', 'vmousedown'], e, { + x: now[0], + y: now[1] + }); + if (near == null) { + r.data.bgActivePosistion = { + x: pos[0], + y: pos[1] + }; + r.redrawHint('select', true); + r.redraw(); + } + + // Tap, taphold + // ----- + + r.touchData.singleTouchMoved = false; + r.touchData.singleTouchStartTime = +new Date(); + clearTimeout(r.touchData.tapholdTimeout); + r.touchData.tapholdTimeout = setTimeout(function () { + if (r.touchData.singleTouchMoved === false && !r.pinching // if pinching, then taphold unselect shouldn't take effect + && !r.touchData.selecting // box selection shouldn't allow taphold through + ) { + triggerEvents(r.touchData.start, ['taphold'], e, { + x: now[0], + y: now[1] + }); + } + }, r.tapholdDuration); + } + if (e.touches.length >= 1) { + var sPos = r.touchData.startPosition = [null, null, null, null, null, null]; + for (var i = 0; i < now.length; i++) { + sPos[i] = earlier[i] = now[i]; + } + var touch0 = e.touches[0]; + r.touchData.startGPosition = [touch0.clientX, touch0.clientY]; + } + }, false); + var touchmoveHandler; + r.registerBinding(window, 'touchmove', touchmoveHandler = function touchmoveHandler(e) { + // eslint-disable-line no-undef + var capture = r.touchData.capture; + if (!capture && !eventInContainer(e)) { + return; + } + var select = r.selection; + var cy = r.cy; + var now = r.touchData.now; + var earlier = r.touchData.earlier; + var zoom = cy.zoom(); + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now[2] = pos[0]; + now[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now[4] = pos[0]; + now[5] = pos[1]; + } + var startGPos = r.touchData.startGPosition; + var isOverThresholdDrag; + if (capture && e.touches[0] && startGPos) { + var disp = []; + for (var j = 0; j < now.length; j++) { + disp[j] = now[j] - earlier[j]; + } + var dx = e.touches[0].clientX - startGPos[0]; + var dx2 = dx * dx; + var dy = e.touches[0].clientY - startGPos[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + isOverThresholdDrag = dist2 >= r.touchTapThreshold2; + } + + // context swipe cancelling + if (capture && r.touchData.cxt) { + e.preventDefault(); + var f1x2 = e.touches[0].clientX - offsetLeft, + f1y2 = e.touches[0].clientY - offsetTop; + var f2x2 = e.touches[1].clientX - offsetLeft, + f2y2 = e.touches[1].clientY - offsetTop; + // var distance2 = distance( f1x2, f1y2, f2x2, f2y2 ); + var distance2Sq = distanceSq(f1x2, f1y2, f2x2, f2y2); + var factorSq = distance2Sq / distance1Sq; + var distThreshold = 150; + var distThresholdSq = distThreshold * distThreshold; + var factorThreshold = 1.5; + var factorThresholdSq = factorThreshold * factorThreshold; + + // cancel ctx gestures if the distance b/t the fingers increases + if (factorSq >= factorThresholdSq || distance2Sq >= distThresholdSq) { + r.touchData.cxt = false; + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + var cxtEvt = { + originalEvent: e, + type: 'cxttapend', + position: { + x: now[0], + y: now[1] + } + }; + if (r.touchData.start) { + r.touchData.start.unactivate().emit(cxtEvt); + r.touchData.start = null; + } else { + cy.emit(cxtEvt); + } + } + } + + // context swipe + if (capture && r.touchData.cxt) { + var cxtEvt = { + originalEvent: e, + type: 'cxtdrag', + position: { + x: now[0], + y: now[1] + } + }; + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + if (r.touchData.start) { + r.touchData.start.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + r.touchData.cxtDragged = true; + var near = r.findNearestElement(now[0], now[1], true, true); + if (!r.touchData.cxtOver || near !== r.touchData.cxtOver) { + if (r.touchData.cxtOver) { + r.touchData.cxtOver.emit({ + originalEvent: e, + type: 'cxtdragout', + position: { + x: now[0], + y: now[1] + } + }); + } + r.touchData.cxtOver = near; + if (near) { + near.emit({ + originalEvent: e, + type: 'cxtdragover', + position: { + x: now[0], + y: now[1] + } + }); + } + } + + // box selection + } else if (capture && e.touches[2] && cy.boxSelectionEnabled()) { + e.preventDefault(); + r.data.bgActivePosistion = undefined; + this.lastThreeTouch = +new Date(); + if (!r.touchData.selecting) { + cy.emit({ + originalEvent: e, + type: 'boxstart', + position: { + x: now[0], + y: now[1] + } + }); + } + r.touchData.selecting = true; + r.touchData.didSelect = true; + select[4] = 1; + if (!select || select.length === 0 || select[0] === undefined) { + select[0] = (now[0] + now[2] + now[4]) / 3; + select[1] = (now[1] + now[3] + now[5]) / 3; + select[2] = (now[0] + now[2] + now[4]) / 3 + 1; + select[3] = (now[1] + now[3] + now[5]) / 3 + 1; + } else { + select[2] = (now[0] + now[2] + now[4]) / 3; + select[3] = (now[1] + now[3] + now[5]) / 3; + } + r.redrawHint('select', true); + r.redraw(); + + // pinch to zoom + } else if (capture && e.touches[1] && !r.touchData.didSelect // don't allow box selection to degrade to pinch-to-zoom + && cy.zoomingEnabled() && cy.panningEnabled() && cy.userZoomingEnabled() && cy.userPanningEnabled()) { + // two fingers => pinch to zoom + e.preventDefault(); + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + var draggedEles = r.dragData.touchDragEles; + if (draggedEles) { + r.redrawHint('drag', true); + for (var i = 0; i < draggedEles.length; i++) { + var de_p = draggedEles[i]._private; + de_p.grabbed = false; + de_p.rscratch.inDragLayer = false; + } + } + var _start = r.touchData.start; + + // (x2, y2) for fingers 1 and 2 + var f1x2 = e.touches[0].clientX - offsetLeft, + f1y2 = e.touches[0].clientY - offsetTop; + var f2x2 = e.touches[1].clientX - offsetLeft, + f2y2 = e.touches[1].clientY - offsetTop; + var distance2 = distance(f1x2, f1y2, f2x2, f2y2); + // var distance2Sq = distanceSq( f1x2, f1y2, f2x2, f2y2 ); + // var factor = Math.sqrt( distance2Sq ) / Math.sqrt( distance1Sq ); + var factor = distance2 / distance1; + if (twoFingersStartInside) { + // delta finger1 + var df1x = f1x2 - f1x1; + var df1y = f1y2 - f1y1; + + // delta finger 2 + var df2x = f2x2 - f2x1; + var df2y = f2y2 - f2y1; + + // translation is the normalised vector of the two fingers movement + // i.e. so pinching cancels out and moving together pans + var tx = (df1x + df2x) / 2; + var ty = (df1y + df2y) / 2; + + // now calculate the zoom + var zoom1 = cy.zoom(); + var zoom2 = zoom1 * factor; + var pan1 = cy.pan(); + + // the model center point converted to the current rendered pos + var ctrx = modelCenter1[0] * zoom1 + pan1.x; + var ctry = modelCenter1[1] * zoom1 + pan1.y; + var pan2 = { + x: -zoom2 / zoom1 * (ctrx - pan1.x - tx) + ctrx, + y: -zoom2 / zoom1 * (ctry - pan1.y - ty) + ctry + }; + + // remove dragged eles + if (_start && _start.active()) { + var draggedEles = r.dragData.touchDragEles; + freeDraggedElements(draggedEles); + r.redrawHint('drag', true); + r.redrawHint('eles', true); + _start.unactivate().emit('freeon'); + draggedEles.emit('free'); + if (r.dragData.didDrag) { + _start.emit('dragfreeon'); + draggedEles.emit('dragfree'); + } + } + cy.viewport({ + zoom: zoom2, + pan: pan2, + cancelOnFailedZoom: true + }); + cy.emit('pinchzoom'); + distance1 = distance2; + f1x1 = f1x2; + f1y1 = f1y2; + f2x1 = f2x2; + f2y1 = f2y2; + r.pinching = true; + } + + // Re-project + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now[2] = pos[0]; + now[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now[4] = pos[0]; + now[5] = pos[1]; + } + } else if (e.touches[0] && !r.touchData.didSelect // don't allow box selection to degrade to single finger events like panning + ) { + var start = r.touchData.start; + var last = r.touchData.last; + var near; + if (!r.hoverData.draggingEles && !r.swipePanning) { + near = r.findNearestElement(now[0], now[1], true, true); + } + if (capture && start != null) { + e.preventDefault(); + } + + // dragging nodes + if (capture && start != null && r.nodeIsDraggable(start)) { + if (isOverThresholdDrag) { + // then dragging can happen + var draggedEles = r.dragData.touchDragEles; + var justStartedDrag = !r.dragData.didDrag; + if (justStartedDrag) { + addNodesToDrag(draggedEles, { + inDragLayer: true + }); + } + r.dragData.didDrag = true; + var totalShift = { + x: 0, + y: 0 + }; + if (number$1(disp[0]) && number$1(disp[1])) { + totalShift.x += disp[0]; + totalShift.y += disp[1]; + if (justStartedDrag) { + r.redrawHint('eles', true); + var dragDelta = r.touchData.dragDelta; + if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) { + totalShift.x += dragDelta[0]; + totalShift.y += dragDelta[1]; + } + } + } + r.hoverData.draggingEles = true; + draggedEles.silentShift(totalShift).emit('position drag'); + r.redrawHint('drag', true); + if (r.touchData.startPosition[0] == earlier[0] && r.touchData.startPosition[1] == earlier[1]) { + r.redrawHint('eles', true); + } + r.redraw(); + } else { + // otherwise keep track of drag delta for later + var dragDelta = r.touchData.dragDelta = r.touchData.dragDelta || []; + if (dragDelta.length === 0) { + dragDelta.push(disp[0]); + dragDelta.push(disp[1]); + } else { + dragDelta[0] += disp[0]; + dragDelta[1] += disp[1]; + } + } + } + + // touchmove + { + triggerEvents(start || near, ['touchmove', 'tapdrag', 'vmousemove'], e, { + x: now[0], + y: now[1] + }); + if ((!start || !start.grabbed()) && near != last) { + if (last) { + last.emit({ + originalEvent: e, + type: 'tapdragout', + position: { + x: now[0], + y: now[1] + } + }); + } + if (near) { + near.emit({ + originalEvent: e, + type: 'tapdragover', + position: { + x: now[0], + y: now[1] + } + }); + } + } + r.touchData.last = near; + } + + // check to cancel taphold + if (capture) { + for (var i = 0; i < now.length; i++) { + if (now[i] && r.touchData.startPosition[i] && isOverThresholdDrag) { + r.touchData.singleTouchMoved = true; + } + } + } + + // panning + if (capture && (start == null || start.pannable()) && cy.panningEnabled() && cy.userPanningEnabled()) { + var allowPassthrough = allowPanningPassthrough(start, r.touchData.starts); + if (allowPassthrough) { + e.preventDefault(); + if (!r.data.bgActivePosistion) { + r.data.bgActivePosistion = array2point(r.touchData.startPosition); + } + if (r.swipePanning) { + cy.panBy({ + x: disp[0] * zoom, + y: disp[1] * zoom + }); + cy.emit('dragpan'); + } else if (isOverThresholdDrag) { + r.swipePanning = true; + cy.panBy({ + x: dx * zoom, + y: dy * zoom + }); + cy.emit('dragpan'); + if (start) { + start.unactivate(); + r.redrawHint('select', true); + r.touchData.start = null; + } + } + } + + // Re-project + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + } + for (var j = 0; j < now.length; j++) { + earlier[j] = now[j]; + } + + // the active bg indicator should be removed when making a swipe that is neither for dragging nodes or panning + if (capture && e.touches.length > 0 && !r.hoverData.draggingEles && !r.swipePanning && r.data.bgActivePosistion != null) { + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + r.redraw(); + } + }, false); + var touchcancelHandler; + r.registerBinding(containerWindow, 'touchcancel', touchcancelHandler = function touchcancelHandler(e) { + // eslint-disable-line no-unused-vars + var start = r.touchData.start; + r.touchData.capture = false; + if (start) { + start.unactivate(); + } + }); + var touchendHandler, didDoubleTouch, touchTimeout, prevTouchTimeStamp; + r.registerBinding(containerWindow, 'touchend', touchendHandler = function touchendHandler(e) { + // eslint-disable-line no-unused-vars + var start = r.touchData.start; + var capture = r.touchData.capture; + if (capture) { + if (e.touches.length === 0) { + r.touchData.capture = false; + } + e.preventDefault(); + } else { + return; + } + var select = r.selection; + r.swipePanning = false; + r.hoverData.draggingEles = false; + var cy = r.cy; + var zoom = cy.zoom(); + var now = r.touchData.now; + var earlier = r.touchData.earlier; + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now[2] = pos[0]; + now[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now[4] = pos[0]; + now[5] = pos[1]; + } + if (start) { + start.unactivate(); + } + var ctxTapend; + if (r.touchData.cxt) { + ctxTapend = { + originalEvent: e, + type: 'cxttapend', + position: { + x: now[0], + y: now[1] + } + }; + if (start) { + start.emit(ctxTapend); + } else { + cy.emit(ctxTapend); + } + if (!r.touchData.cxtDragged) { + var ctxTap = { + originalEvent: e, + type: 'cxttap', + position: { + x: now[0], + y: now[1] + } + }; + if (start) { + start.emit(ctxTap); + } else { + cy.emit(ctxTap); + } + } + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + r.touchData.cxt = false; + r.touchData.start = null; + r.redraw(); + return; + } + + // no more box selection if we don't have three fingers + if (!e.touches[2] && cy.boxSelectionEnabled() && r.touchData.selecting) { + r.touchData.selecting = false; + var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); + select[0] = undefined; + select[1] = undefined; + select[2] = undefined; + select[3] = undefined; + select[4] = 0; + r.redrawHint('select', true); + cy.emit({ + type: 'boxend', + originalEvent: e, + position: { + x: now[0], + y: now[1] + } + }); + var eleWouldBeSelected = function eleWouldBeSelected(ele) { + return ele.selectable() && !ele.selected(); + }; + box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); + if (box.nonempty()) { + r.redrawHint('eles', true); + } + r.redraw(); + } + if (start != null) { + start.unactivate(); + } + if (e.touches[2]) { + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + } else if (e.touches[1]) ; else if (e.touches[0]) ; else if (!e.touches[0]) { + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + var draggedEles = r.dragData.touchDragEles; + if (start != null) { + var startWasGrabbed = start._private.grabbed; + freeDraggedElements(draggedEles); + r.redrawHint('drag', true); + r.redrawHint('eles', true); + if (startWasGrabbed) { + start.emit('freeon'); + draggedEles.emit('free'); + if (r.dragData.didDrag) { + start.emit('dragfreeon'); + draggedEles.emit('dragfree'); + } + } + triggerEvents(start, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, { + x: now[0], + y: now[1] + }); + start.unactivate(); + r.touchData.start = null; + } else { + var near = r.findNearestElement(now[0], now[1], true, true); + triggerEvents(near, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, { + x: now[0], + y: now[1] + }); + } + var dx = r.touchData.startPosition[0] - now[0]; + var dx2 = dx * dx; + var dy = r.touchData.startPosition[1] - now[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + var rdist2 = dist2 * zoom * zoom; + + // Tap event, roughly same as mouse click event for touch + if (!r.touchData.singleTouchMoved) { + if (!start) { + cy.$(':selected').unselect(['tapunselect']); + } + triggerEvents(start, ['tap', 'vclick'], e, { + x: now[0], + y: now[1] + }); + didDoubleTouch = false; + if (e.timeStamp - prevTouchTimeStamp <= cy.multiClickDebounceTime()) { + touchTimeout && clearTimeout(touchTimeout); + didDoubleTouch = true; + prevTouchTimeStamp = null; + triggerEvents(start, ['dbltap', 'vdblclick'], e, { + x: now[0], + y: now[1] + }); + } else { + touchTimeout = setTimeout(function () { + if (didDoubleTouch) return; + triggerEvents(start, ['onetap', 'voneclick'], e, { + x: now[0], + y: now[1] + }); + }, cy.multiClickDebounceTime()); + prevTouchTimeStamp = e.timeStamp; + } + } + + // Prepare to select the currently touched node, only if it hasn't been dragged past a certain distance + if (start != null && !r.dragData.didDrag // didn't drag nodes around + && start._private.selectable && rdist2 < r.touchTapThreshold2 && !r.pinching // pinch to zoom should not affect selection + ) { + if (cy.selectionType() === 'single') { + cy.$(isSelected).unmerge(start).unselect(['tapunselect']); + start.select(['tapselect']); + } else { + if (start.selected()) { + start.unselect(['tapunselect']); + } else { + start.select(['tapselect']); + } + } + r.redrawHint('eles', true); + } + r.touchData.singleTouchMoved = true; + } + for (var j = 0; j < now.length; j++) { + earlier[j] = now[j]; + } + r.dragData.didDrag = false; // reset for next touchstart + + if (e.touches.length === 0) { + r.touchData.dragDelta = []; + r.touchData.startPosition = [null, null, null, null, null, null]; + r.touchData.startGPosition = null; + r.touchData.didSelect = false; + } + if (e.touches.length < 2) { + if (e.touches.length === 1) { + // the old start global pos'n may not be the same finger that remains + r.touchData.startGPosition = [e.touches[0].clientX, e.touches[0].clientY]; + } + r.pinching = false; + r.redrawHint('eles', true); + r.redraw(); + } + + //r.redraw(); + }, false); + + // fallback compatibility layer for ms pointer events + if (typeof TouchEvent === 'undefined') { + var pointers = []; + var makeTouch = function makeTouch(e) { + return { + clientX: e.clientX, + clientY: e.clientY, + force: 1, + identifier: e.pointerId, + pageX: e.pageX, + pageY: e.pageY, + radiusX: e.width / 2, + radiusY: e.height / 2, + screenX: e.screenX, + screenY: e.screenY, + target: e.target + }; + }; + var makePointer = function makePointer(e) { + return { + event: e, + touch: makeTouch(e) + }; + }; + var addPointer = function addPointer(e) { + pointers.push(makePointer(e)); + }; + var removePointer = function removePointer(e) { + for (var i = 0; i < pointers.length; i++) { + var p = pointers[i]; + if (p.event.pointerId === e.pointerId) { + pointers.splice(i, 1); + return; + } + } + }; + var updatePointer = function updatePointer(e) { + var p = pointers.filter(function (p) { + return p.event.pointerId === e.pointerId; + })[0]; + p.event = e; + p.touch = makeTouch(e); + }; + var addTouchesToEvent = function addTouchesToEvent(e) { + e.touches = pointers.map(function (p) { + return p.touch; + }); + }; + var pointerIsMouse = function pointerIsMouse(e) { + return e.pointerType === 'mouse' || e.pointerType === 4; + }; + r.registerBinding(r.container, 'pointerdown', function (e) { + if (pointerIsMouse(e)) { + return; + } // mouse already handled + + e.preventDefault(); + addPointer(e); + addTouchesToEvent(e); + touchstartHandler(e); + }); + r.registerBinding(r.container, 'pointerup', function (e) { + if (pointerIsMouse(e)) { + return; + } // mouse already handled + + removePointer(e); + addTouchesToEvent(e); + touchendHandler(e); + }); + r.registerBinding(r.container, 'pointercancel', function (e) { + if (pointerIsMouse(e)) { + return; + } // mouse already handled + + removePointer(e); + addTouchesToEvent(e); + touchcancelHandler(e); + }); + r.registerBinding(r.container, 'pointermove', function (e) { + if (pointerIsMouse(e)) { + return; + } // mouse already handled + + e.preventDefault(); + updatePointer(e); + addTouchesToEvent(e); + touchmoveHandler(e); + }); + } +}; + +var BRp$2 = {}; +BRp$2.generatePolygon = function (name, points) { + return this.nodeShapes[name] = { + renderer: this, + name: name, + points: points, + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl('polygon', context, centerX, centerY, width, height, this.points); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return polygonIntersectLine(x, y, this.points, nodeX, nodeY, width / 2, height / 2, padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + return pointInsidePolygon(x, y, this.points, centerX, centerY, width, height, [0, -1], padding); + } + }; +}; +BRp$2.generateEllipse = function () { + return this.nodeShapes['ellipse'] = { + renderer: this, + name: 'ellipse', + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return intersectLineEllipse(x, y, nodeX, nodeY, width / 2 + padding, height / 2 + padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + return checkInEllipse(x, y, width, height, centerX, centerY, padding); + } + }; +}; +BRp$2.generateRoundPolygon = function (name, points) { + // Pre-compute control points + // Since these points depend on the radius length (which in turns depend on the width/height of the node) we will only pre-compute + // the unit vectors. + // For simplicity the layout will be: + // [ p0, UnitVectorP0P1, p1, UniVectorP1P2, ..., pn, UnitVectorPnP0 ] + var allPoints = new Array(points.length * 2); + for (var i = 0; i < points.length / 2; i++) { + var sourceIndex = i * 2; + var destIndex = void 0; + if (i < points.length / 2 - 1) { + destIndex = (i + 1) * 2; + } else { + destIndex = 0; + } + allPoints[i * 4] = points[sourceIndex]; + allPoints[i * 4 + 1] = points[sourceIndex + 1]; + var xDest = points[destIndex] - points[sourceIndex]; + var yDest = points[destIndex + 1] - points[sourceIndex + 1]; + var norm = Math.sqrt(xDest * xDest + yDest * yDest); + allPoints[i * 4 + 2] = xDest / norm; + allPoints[i * 4 + 3] = yDest / norm; + } + return this.nodeShapes[name] = { + renderer: this, + name: name, + points: allPoints, + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl('round-polygon', context, centerX, centerY, width, height, this.points); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return roundPolygonIntersectLine(x, y, this.points, nodeX, nodeY, width, height); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + return pointInsideRoundPolygon(x, y, this.points, centerX, centerY, width, height); + } + }; +}; +BRp$2.generateRoundRectangle = function () { + return this.nodeShapes['round-rectangle'] = this.nodeShapes['roundrectangle'] = { + renderer: this, + name: 'round-rectangle', + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + var cornerRadius = getRoundRectangleRadius(width, height); + var diam = cornerRadius * 2; + + // Check hBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) { + return true; + } + + // Check vBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) { + return true; + } + + // Check top left quarter circle + if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY - height / 2 + cornerRadius, padding)) { + return true; + } + + // Check top right quarter circle + if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY - height / 2 + cornerRadius, padding)) { + return true; + } + + // Check bottom right quarter circle + if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + + // Check bottom left quarter circle + if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + return false; + } + }; +}; +BRp$2.generateCutRectangle = function () { + return this.nodeShapes['cut-rectangle'] = this.nodeShapes['cutrectangle'] = { + renderer: this, + name: 'cut-rectangle', + cornerLength: getCutRectangleCornerLength(), + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + generateCutTrianglePts: function generateCutTrianglePts(width, height, centerX, centerY) { + var cl = this.cornerLength; + var hh = height / 2; + var hw = width / 2; + var xBegin = centerX - hw; + var xEnd = centerX + hw; + var yBegin = centerY - hh; + var yEnd = centerY + hh; + + // points are in clockwise order, inner (imaginary) triangle pt on [4, 5] + return { + topLeft: [xBegin, yBegin + cl, xBegin + cl, yBegin, xBegin + cl, yBegin + cl], + topRight: [xEnd - cl, yBegin, xEnd, yBegin + cl, xEnd - cl, yBegin + cl], + bottomRight: [xEnd, yEnd - cl, xEnd - cl, yEnd, xEnd - cl, yEnd - cl], + bottomLeft: [xBegin + cl, yEnd, xBegin, yEnd - cl, xBegin + cl, yEnd - cl] + }; + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + var cPts = this.generateCutTrianglePts(width + 2 * padding, height + 2 * padding, nodeX, nodeY); + var pts = [].concat.apply([], [cPts.topLeft.splice(0, 4), cPts.topRight.splice(0, 4), cPts.bottomRight.splice(0, 4), cPts.bottomLeft.splice(0, 4)]); + return polygonIntersectLine(x, y, pts, nodeX, nodeY); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + // Check hBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * this.cornerLength, [0, -1], padding)) { + return true; + } + + // Check vBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * this.cornerLength, height, [0, -1], padding)) { + return true; + } + var cutTrianglePts = this.generateCutTrianglePts(width, height, centerX, centerY); + return pointInsidePolygonPoints(x, y, cutTrianglePts.topLeft) || pointInsidePolygonPoints(x, y, cutTrianglePts.topRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomLeft); + } + }; +}; +BRp$2.generateBarrel = function () { + return this.nodeShapes['barrel'] = { + renderer: this, + name: 'barrel', + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + // use two fixed t values for the bezier curve approximation + + var t0 = 0.15; + var t1 = 0.5; + var t2 = 0.85; + var bPts = this.generateBarrelBezierPts(width + 2 * padding, height + 2 * padding, nodeX, nodeY); + var approximateBarrelCurvePts = function approximateBarrelCurvePts(pts) { + // approximate curve pts based on the two t values + var m0 = qbezierPtAt({ + x: pts[0], + y: pts[1] + }, { + x: pts[2], + y: pts[3] + }, { + x: pts[4], + y: pts[5] + }, t0); + var m1 = qbezierPtAt({ + x: pts[0], + y: pts[1] + }, { + x: pts[2], + y: pts[3] + }, { + x: pts[4], + y: pts[5] + }, t1); + var m2 = qbezierPtAt({ + x: pts[0], + y: pts[1] + }, { + x: pts[2], + y: pts[3] + }, { + x: pts[4], + y: pts[5] + }, t2); + return [pts[0], pts[1], m0.x, m0.y, m1.x, m1.y, m2.x, m2.y, pts[4], pts[5]]; + }; + var pts = [].concat(approximateBarrelCurvePts(bPts.topLeft), approximateBarrelCurvePts(bPts.topRight), approximateBarrelCurvePts(bPts.bottomRight), approximateBarrelCurvePts(bPts.bottomLeft)); + return polygonIntersectLine(x, y, pts, nodeX, nodeY); + }, + generateBarrelBezierPts: function generateBarrelBezierPts(width, height, centerX, centerY) { + var hh = height / 2; + var hw = width / 2; + var xBegin = centerX - hw; + var xEnd = centerX + hw; + var yBegin = centerY - hh; + var yEnd = centerY + hh; + var curveConstants = getBarrelCurveConstants(width, height); + var hOffset = curveConstants.heightOffset; + var wOffset = curveConstants.widthOffset; + var ctrlPtXOffset = curveConstants.ctrlPtOffsetPct * width; + + // points are in clockwise order, inner (imaginary) control pt on [4, 5] + var pts = { + topLeft: [xBegin, yBegin + hOffset, xBegin + ctrlPtXOffset, yBegin, xBegin + wOffset, yBegin], + topRight: [xEnd - wOffset, yBegin, xEnd - ctrlPtXOffset, yBegin, xEnd, yBegin + hOffset], + bottomRight: [xEnd, yEnd - hOffset, xEnd - ctrlPtXOffset, yEnd, xEnd - wOffset, yEnd], + bottomLeft: [xBegin + wOffset, yEnd, xBegin + ctrlPtXOffset, yEnd, xBegin, yEnd - hOffset] + }; + pts.topLeft.isTop = true; + pts.topRight.isTop = true; + pts.bottomLeft.isBottom = true; + pts.bottomRight.isBottom = true; + return pts; + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + var curveConstants = getBarrelCurveConstants(width, height); + var hOffset = curveConstants.heightOffset; + var wOffset = curveConstants.widthOffset; + + // Check hBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * hOffset, [0, -1], padding)) { + return true; + } + + // Check vBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * wOffset, height, [0, -1], padding)) { + return true; + } + var barrelCurvePts = this.generateBarrelBezierPts(width, height, centerX, centerY); + var getCurveT = function getCurveT(x, y, curvePts) { + var x0 = curvePts[4]; + var x1 = curvePts[2]; + var x2 = curvePts[0]; + var y0 = curvePts[5]; + // var y1 = curvePts[ 3 ]; + var y2 = curvePts[1]; + var xMin = Math.min(x0, x2); + var xMax = Math.max(x0, x2); + var yMin = Math.min(y0, y2); + var yMax = Math.max(y0, y2); + if (xMin <= x && x <= xMax && yMin <= y && y <= yMax) { + var coeff = bezierPtsToQuadCoeff(x0, x1, x2); + var roots = solveQuadratic(coeff[0], coeff[1], coeff[2], x); + var validRoots = roots.filter(function (r) { + return 0 <= r && r <= 1; + }); + if (validRoots.length > 0) { + return validRoots[0]; + } + } + return null; + }; + var curveRegions = Object.keys(barrelCurvePts); + for (var i = 0; i < curveRegions.length; i++) { + var corner = curveRegions[i]; + var cornerPts = barrelCurvePts[corner]; + var t = getCurveT(x, y, cornerPts); + if (t == null) { + continue; + } + var y0 = cornerPts[5]; + var y1 = cornerPts[3]; + var y2 = cornerPts[1]; + var bezY = qbezierAt(y0, y1, y2, t); + if (cornerPts.isTop && bezY <= y) { + return true; + } + if (cornerPts.isBottom && y <= bezY) { + return true; + } + } + return false; + } + }; +}; +BRp$2.generateBottomRoundrectangle = function () { + return this.nodeShapes['bottom-round-rectangle'] = this.nodeShapes['bottomroundrectangle'] = { + renderer: this, + name: 'bottom-round-rectangle', + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + var topStartX = nodeX - (width / 2 + padding); + var topStartY = nodeY - (height / 2 + padding); + var topEndY = topStartY; + var topEndX = nodeX + (width / 2 + padding); + var topIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); + if (topIntersections.length > 0) { + return topIntersections; + } + return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + var cornerRadius = getRoundRectangleRadius(width, height); + var diam = 2 * cornerRadius; + + // Check hBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) { + return true; + } + + // Check vBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) { + return true; + } + + // check non-rounded top side + var outerWidth = width / 2 + 2 * padding; + var outerHeight = height / 2 + 2 * padding; + var points = [centerX - outerWidth, centerY - outerHeight, centerX - outerWidth, centerY, centerX + outerWidth, centerY, centerX + outerWidth, centerY - outerHeight]; + if (pointInsidePolygonPoints(x, y, points)) { + return true; + } + + // Check bottom right quarter circle + if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + + // Check bottom left quarter circle + if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + return false; + } + }; +}; +BRp$2.registerNodeShapes = function () { + var nodeShapes = this.nodeShapes = {}; + var renderer = this; + this.generateEllipse(); + this.generatePolygon('triangle', generateUnitNgonPointsFitToSquare(3, 0)); + this.generateRoundPolygon('round-triangle', generateUnitNgonPointsFitToSquare(3, 0)); + this.generatePolygon('rectangle', generateUnitNgonPointsFitToSquare(4, 0)); + nodeShapes['square'] = nodeShapes['rectangle']; + this.generateRoundRectangle(); + this.generateCutRectangle(); + this.generateBarrel(); + this.generateBottomRoundrectangle(); + { + var diamondPoints = [0, 1, 1, 0, 0, -1, -1, 0]; + this.generatePolygon('diamond', diamondPoints); + this.generateRoundPolygon('round-diamond', diamondPoints); + } + this.generatePolygon('pentagon', generateUnitNgonPointsFitToSquare(5, 0)); + this.generateRoundPolygon('round-pentagon', generateUnitNgonPointsFitToSquare(5, 0)); + this.generatePolygon('hexagon', generateUnitNgonPointsFitToSquare(6, 0)); + this.generateRoundPolygon('round-hexagon', generateUnitNgonPointsFitToSquare(6, 0)); + this.generatePolygon('heptagon', generateUnitNgonPointsFitToSquare(7, 0)); + this.generateRoundPolygon('round-heptagon', generateUnitNgonPointsFitToSquare(7, 0)); + this.generatePolygon('octagon', generateUnitNgonPointsFitToSquare(8, 0)); + this.generateRoundPolygon('round-octagon', generateUnitNgonPointsFitToSquare(8, 0)); + var star5Points = new Array(20); + { + var outerPoints = generateUnitNgonPoints(5, 0); + var innerPoints = generateUnitNgonPoints(5, Math.PI / 5); + + // Outer radius is 1; inner radius of star is smaller + var innerRadius = 0.5 * (3 - Math.sqrt(5)); + innerRadius *= 1.57; + for (var i = 0; i < innerPoints.length / 2; i++) { + innerPoints[i * 2] *= innerRadius; + innerPoints[i * 2 + 1] *= innerRadius; + } + for (var i = 0; i < 20 / 4; i++) { + star5Points[i * 4] = outerPoints[i * 2]; + star5Points[i * 4 + 1] = outerPoints[i * 2 + 1]; + star5Points[i * 4 + 2] = innerPoints[i * 2]; + star5Points[i * 4 + 3] = innerPoints[i * 2 + 1]; + } + } + star5Points = fitPolygonToSquare(star5Points); + this.generatePolygon('star', star5Points); + this.generatePolygon('vee', [-1, -1, 0, -0.333, 1, -1, 0, 1]); + this.generatePolygon('rhomboid', [-1, -1, 0.333, -1, 1, 1, -0.333, 1]); + this.generatePolygon('right-rhomboid', [-0.333, -1, 1, -1, 0.333, 1, -1, 1]); + this.nodeShapes['concavehexagon'] = this.generatePolygon('concave-hexagon', [-1, -0.95, -0.75, 0, -1, 0.95, 1, 0.95, 0.75, 0, 1, -0.95]); + { + var tagPoints = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1]; + this.generatePolygon('tag', tagPoints); + this.generateRoundPolygon('round-tag', tagPoints); + } + nodeShapes.makePolygon = function (points) { + // use caching on user-specified polygons so they are as fast as native shapes + + var key = points.join('$'); + var name = 'polygon-' + key; + var shape; + if (shape = this[name]) { + // got cached shape + return shape; + } + + // create and cache new shape + return renderer.generatePolygon(name, points); + }; +}; + +var BRp$1 = {}; +BRp$1.timeToRender = function () { + return this.redrawTotalTime / this.redrawCount; +}; +BRp$1.redraw = function (options) { + options = options || staticEmptyObject(); + var r = this; + if (r.averageRedrawTime === undefined) { + r.averageRedrawTime = 0; + } + if (r.lastRedrawTime === undefined) { + r.lastRedrawTime = 0; + } + if (r.lastDrawTime === undefined) { + r.lastDrawTime = 0; + } + r.requestedFrame = true; + r.renderOptions = options; +}; +BRp$1.beforeRender = function (fn, priority) { + // the renderer can't add tick callbacks when destroyed + if (this.destroyed) { + return; + } + if (priority == null) { + error('Priority is not optional for beforeRender'); + } + var cbs = this.beforeRenderCallbacks; + cbs.push({ + fn: fn, + priority: priority + }); + + // higher priority callbacks executed first + cbs.sort(function (a, b) { + return b.priority - a.priority; + }); +}; +var beforeRenderCallbacks = function beforeRenderCallbacks(r, willDraw, startTime) { + var cbs = r.beforeRenderCallbacks; + for (var i = 0; i < cbs.length; i++) { + cbs[i].fn(willDraw, startTime); + } +}; +BRp$1.startRenderLoop = function () { + var r = this; + var cy = r.cy; + if (r.renderLoopStarted) { + return; + } else { + r.renderLoopStarted = true; + } + var renderFn = function renderFn(requestTime) { + if (r.destroyed) { + return; + } + if (cy.batching()) ; else if (r.requestedFrame && !r.skipFrame) { + beforeRenderCallbacks(r, true, requestTime); + var startTime = performanceNow(); + r.render(r.renderOptions); + var endTime = r.lastDrawTime = performanceNow(); + if (r.averageRedrawTime === undefined) { + r.averageRedrawTime = endTime - startTime; + } + if (r.redrawCount === undefined) { + r.redrawCount = 0; + } + r.redrawCount++; + if (r.redrawTotalTime === undefined) { + r.redrawTotalTime = 0; + } + var duration = endTime - startTime; + r.redrawTotalTime += duration; + r.lastRedrawTime = duration; + + // use a weighted average with a bias from the previous average so we don't spike so easily + r.averageRedrawTime = r.averageRedrawTime / 2 + duration / 2; + r.requestedFrame = false; + } else { + beforeRenderCallbacks(r, false, requestTime); + } + r.skipFrame = false; + requestAnimationFrame(renderFn); + }; + requestAnimationFrame(renderFn); +}; + +var BaseRenderer = function BaseRenderer(options) { + this.init(options); +}; +var BR = BaseRenderer; +var BRp = BR.prototype; +BRp.clientFunctions = ['redrawHint', 'render', 'renderTo', 'matchCanvasSize', 'nodeShapeImpl', 'arrowShapeImpl']; +BRp.init = function (options) { + var r = this; + r.options = options; + r.cy = options.cy; + var ctr = r.container = options.cy.container(); + var containerWindow = r.cy.window(); + + // prepend a stylesheet in the head such that + if (containerWindow) { + var document = containerWindow.document; + var head = document.head; + var stylesheetId = '__________cytoscape_stylesheet'; + var className = '__________cytoscape_container'; + var stylesheetAlreadyExists = document.getElementById(stylesheetId) != null; + if (ctr.className.indexOf(className) < 0) { + ctr.className = (ctr.className || '') + ' ' + className; + } + if (!stylesheetAlreadyExists) { + var stylesheet = document.createElement('style'); + stylesheet.id = stylesheetId; + stylesheet.textContent = '.' + className + ' { position: relative; }'; + head.insertBefore(stylesheet, head.children[0]); // first so lowest priority + } + + var computedStyle = containerWindow.getComputedStyle(ctr); + var position = computedStyle.getPropertyValue('position'); + if (position === 'static') { + warn('A Cytoscape container has style position:static and so can not use UI extensions properly'); + } + } + r.selection = [undefined, undefined, undefined, undefined, 0]; // Coordinates for selection box, plus enabled flag + + r.bezierProjPcts = [0.05, 0.225, 0.4, 0.5, 0.6, 0.775, 0.95]; + + //--Pointer-related data + r.hoverData = { + down: null, + last: null, + downTime: null, + triggerMode: null, + dragging: false, + initialPan: [null, null], + capture: false + }; + r.dragData = { + possibleDragElements: [] + }; + r.touchData = { + start: null, + capture: false, + // These 3 fields related to tap, taphold events + startPosition: [null, null, null, null, null, null], + singleTouchStartTime: null, + singleTouchMoved: true, + now: [null, null, null, null, null, null], + earlier: [null, null, null, null, null, null] + }; + r.redraws = 0; + r.showFps = options.showFps; + r.debug = options.debug; + r.hideEdgesOnViewport = options.hideEdgesOnViewport; + r.textureOnViewport = options.textureOnViewport; + r.wheelSensitivity = options.wheelSensitivity; + r.motionBlurEnabled = options.motionBlur; // on by default + r.forcedPixelRatio = number$1(options.pixelRatio) ? options.pixelRatio : null; + r.motionBlur = options.motionBlur; // for initial kick off + r.motionBlurOpacity = options.motionBlurOpacity; + r.motionBlurTransparency = 1 - r.motionBlurOpacity; + r.motionBlurPxRatio = 1; + r.mbPxRBlurry = 1; //0.8; + r.minMbLowQualFrames = 4; + r.fullQualityMb = false; + r.clearedForMotionBlur = []; + r.desktopTapThreshold = options.desktopTapThreshold; + r.desktopTapThreshold2 = options.desktopTapThreshold * options.desktopTapThreshold; + r.touchTapThreshold = options.touchTapThreshold; + r.touchTapThreshold2 = options.touchTapThreshold * options.touchTapThreshold; + r.tapholdDuration = 500; + r.bindings = []; + r.beforeRenderCallbacks = []; + r.beforeRenderPriorities = { + // higher priority execs before lower one + animations: 400, + eleCalcs: 300, + eleTxrDeq: 200, + lyrTxrDeq: 150, + lyrTxrSkip: 100 + }; + r.registerNodeShapes(); + r.registerArrowShapes(); + r.registerCalculationListeners(); +}; +BRp.notify = function (eventName, eles) { + var r = this; + var cy = r.cy; + + // the renderer can't be notified after it's destroyed + if (this.destroyed) { + return; + } + if (eventName === 'init') { + r.load(); + return; + } + if (eventName === 'destroy') { + r.destroy(); + return; + } + if (eventName === 'add' || eventName === 'remove' || eventName === 'move' && cy.hasCompoundNodes() || eventName === 'load' || eventName === 'zorder' || eventName === 'mount') { + r.invalidateCachedZSortedEles(); + } + if (eventName === 'viewport') { + r.redrawHint('select', true); + } + if (eventName === 'load' || eventName === 'resize' || eventName === 'mount') { + r.invalidateContainerClientCoordsCache(); + r.matchCanvasSize(r.container); + } + r.redrawHint('eles', true); + r.redrawHint('drag', true); + this.startRenderLoop(); + this.redraw(); +}; +BRp.destroy = function () { + var r = this; + r.destroyed = true; + r.cy.stopAnimationLoop(); + for (var i = 0; i < r.bindings.length; i++) { + var binding = r.bindings[i]; + var b = binding; + var tgt = b.target; + (tgt.off || tgt.removeEventListener).apply(tgt, b.args); + } + r.bindings = []; + r.beforeRenderCallbacks = []; + r.onUpdateEleCalcsFns = []; + if (r.removeObserver) { + r.removeObserver.disconnect(); + } + if (r.styleObserver) { + r.styleObserver.disconnect(); + } + if (r.resizeObserver) { + r.resizeObserver.disconnect(); + } + if (r.labelCalcDiv) { + try { + document.body.removeChild(r.labelCalcDiv); // eslint-disable-line no-undef + } catch (e) { + // ie10 issue #1014 + } + } +}; +BRp.isHeadless = function () { + return false; +}; +[BRp$f, BRp$5, BRp$4, BRp$3, BRp$2, BRp$1].forEach(function (props) { + extend(BRp, props); +}); + +var fullFpsTime = 1000 / 60; // assume 60 frames per second + +var defs = { + setupDequeueing: function setupDequeueing(opts) { + return function setupDequeueingImpl() { + var self = this; + var r = this.renderer; + if (self.dequeueingSetup) { + return; + } else { + self.dequeueingSetup = true; + } + var queueRedraw = debounce__default["default"](function () { + r.redrawHint('eles', true); + r.redrawHint('drag', true); + r.redraw(); + }, opts.deqRedrawThreshold); + var dequeue = function dequeue(willDraw, frameStartTime) { + var startTime = performanceNow(); + var avgRenderTime = r.averageRedrawTime; + var renderTime = r.lastRedrawTime; + var deqd = []; + var extent = r.cy.extent(); + var pixelRatio = r.getPixelRatio(); + + // if we aren't in a tick that causes a draw, then the rendered style + // queue won't automatically be flushed before dequeueing starts + if (!willDraw) { + r.flushRenderedStyleQueue(); + } + while (true) { + // eslint-disable-line no-constant-condition + var now = performanceNow(); + var duration = now - startTime; + var frameDuration = now - frameStartTime; + if (renderTime < fullFpsTime) { + // if we're rendering faster than the ideal fps, then do dequeueing + // during all of the remaining frame time + + var timeAvailable = fullFpsTime - (willDraw ? avgRenderTime : 0); + if (frameDuration >= opts.deqFastCost * timeAvailable) { + break; + } + } else { + if (willDraw) { + if (duration >= opts.deqCost * renderTime || duration >= opts.deqAvgCost * avgRenderTime) { + break; + } + } else if (frameDuration >= opts.deqNoDrawCost * fullFpsTime) { + break; + } + } + var thisDeqd = opts.deq(self, pixelRatio, extent); + if (thisDeqd.length > 0) { + for (var i = 0; i < thisDeqd.length; i++) { + deqd.push(thisDeqd[i]); + } + } else { + break; + } + } + + // callbacks on dequeue + if (deqd.length > 0) { + opts.onDeqd(self, deqd); + if (!willDraw && opts.shouldRedraw(self, deqd, pixelRatio, extent)) { + queueRedraw(); + } + } + }; + var priority = opts.priority || noop$1; + r.beforeRender(dequeue, priority(self)); + }; + } +}; + +// Allows lookups for (ele, lvl) => cache. +// Uses keys so elements may share the same cache. +var ElementTextureCacheLookup = /*#__PURE__*/function () { + function ElementTextureCacheLookup(getKey) { + var doesEleInvalidateKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : falsify; + _classCallCheck(this, ElementTextureCacheLookup); + this.idsByKey = new Map$1(); + this.keyForId = new Map$1(); + this.cachesByLvl = new Map$1(); + this.lvls = []; + this.getKey = getKey; + this.doesEleInvalidateKey = doesEleInvalidateKey; + } + _createClass(ElementTextureCacheLookup, [{ + key: "getIdsFor", + value: function getIdsFor(key) { + if (key == null) { + error("Can not get id list for null key"); + } + var idsByKey = this.idsByKey; + var ids = this.idsByKey.get(key); + if (!ids) { + ids = new Set$1(); + idsByKey.set(key, ids); + } + return ids; + } + }, { + key: "addIdForKey", + value: function addIdForKey(key, id) { + if (key != null) { + this.getIdsFor(key).add(id); + } + } + }, { + key: "deleteIdForKey", + value: function deleteIdForKey(key, id) { + if (key != null) { + this.getIdsFor(key)["delete"](id); + } + } + }, { + key: "getNumberOfIdsForKey", + value: function getNumberOfIdsForKey(key) { + if (key == null) { + return 0; + } else { + return this.getIdsFor(key).size; + } + } + }, { + key: "updateKeyMappingFor", + value: function updateKeyMappingFor(ele) { + var id = ele.id(); + var prevKey = this.keyForId.get(id); + var currKey = this.getKey(ele); + this.deleteIdForKey(prevKey, id); + this.addIdForKey(currKey, id); + this.keyForId.set(id, currKey); + } + }, { + key: "deleteKeyMappingFor", + value: function deleteKeyMappingFor(ele) { + var id = ele.id(); + var prevKey = this.keyForId.get(id); + this.deleteIdForKey(prevKey, id); + this.keyForId["delete"](id); + } + }, { + key: "keyHasChangedFor", + value: function keyHasChangedFor(ele) { + var id = ele.id(); + var prevKey = this.keyForId.get(id); + var newKey = this.getKey(ele); + return prevKey !== newKey; + } + }, { + key: "isInvalid", + value: function isInvalid(ele) { + return this.keyHasChangedFor(ele) || this.doesEleInvalidateKey(ele); + } + }, { + key: "getCachesAt", + value: function getCachesAt(lvl) { + var cachesByLvl = this.cachesByLvl, + lvls = this.lvls; + var caches = cachesByLvl.get(lvl); + if (!caches) { + caches = new Map$1(); + cachesByLvl.set(lvl, caches); + lvls.push(lvl); + } + return caches; + } + }, { + key: "getCache", + value: function getCache(key, lvl) { + return this.getCachesAt(lvl).get(key); + } + }, { + key: "get", + value: function get(ele, lvl) { + var key = this.getKey(ele); + var cache = this.getCache(key, lvl); + + // getting for an element may need to add to the id list b/c eles can share keys + if (cache != null) { + this.updateKeyMappingFor(ele); + } + return cache; + } + }, { + key: "getForCachedKey", + value: function getForCachedKey(ele, lvl) { + var key = this.keyForId.get(ele.id()); // n.b. use cached key, not newly computed key + var cache = this.getCache(key, lvl); + return cache; + } + }, { + key: "hasCache", + value: function hasCache(key, lvl) { + return this.getCachesAt(lvl).has(key); + } + }, { + key: "has", + value: function has(ele, lvl) { + var key = this.getKey(ele); + return this.hasCache(key, lvl); + } + }, { + key: "setCache", + value: function setCache(key, lvl, cache) { + cache.key = key; + this.getCachesAt(lvl).set(key, cache); + } + }, { + key: "set", + value: function set(ele, lvl, cache) { + var key = this.getKey(ele); + this.setCache(key, lvl, cache); + this.updateKeyMappingFor(ele); + } + }, { + key: "deleteCache", + value: function deleteCache(key, lvl) { + this.getCachesAt(lvl)["delete"](key); + } + }, { + key: "delete", + value: function _delete(ele, lvl) { + var key = this.getKey(ele); + this.deleteCache(key, lvl); + } + }, { + key: "invalidateKey", + value: function invalidateKey(key) { + var _this = this; + this.lvls.forEach(function (lvl) { + return _this.deleteCache(key, lvl); + }); + } + + // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key) + }, { + key: "invalidate", + value: function invalidate(ele) { + var id = ele.id(); + var key = this.keyForId.get(id); // n.b. use stored key rather than current (potential key) + + this.deleteKeyMappingFor(ele); + var entireKeyInvalidated = this.doesEleInvalidateKey(ele); + if (entireKeyInvalidated) { + // clear mapping for current key + this.invalidateKey(key); + } + return entireKeyInvalidated || this.getNumberOfIdsForKey(key) === 0; + } + }]); + return ElementTextureCacheLookup; +}(); + +var minTxrH = 25; // the size of the texture cache for small height eles (special case) +var txrStepH = 50; // the min size of the regular cache, and the size it increases with each step up +var minLvl$1 = -4; // when scaling smaller than that we don't need to re-render +var maxLvl$1 = 3; // when larger than this scale just render directly (caching is not helpful) +var maxZoom$1 = 7.99; // beyond this zoom level, layered textures are not used +var eleTxrSpacing = 8; // spacing between elements on textures to avoid blitting overlaps +var defTxrWidth = 1024; // default/minimum texture width +var maxTxrW = 1024; // the maximum width of a texture +var maxTxrH = 1024; // the maximum height of a texture +var minUtility = 0.2; // if usage of texture is less than this, it is retired +var maxFullness = 0.8; // fullness of texture after which queue removal is checked +var maxFullnessChecks = 10; // dequeued after this many checks +var deqCost$1 = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame +var deqAvgCost$1 = 0.1; // % of add'l rendering cost compared to average overall redraw time +var deqNoDrawCost$1 = 0.9; // % of avg frame time that can be used for dequeueing when not drawing +var deqFastCost$1 = 0.9; // % of frame time to be used when >60fps +var deqRedrawThreshold$1 = 100; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile +var maxDeqSize$1 = 1; // number of eles to dequeue and render at higher texture in each batch + +var getTxrReasons = { + dequeue: 'dequeue', + downscale: 'downscale', + highQuality: 'highQuality' +}; +var initDefaults = defaults$g({ + getKey: null, + doesEleInvalidateKey: falsify, + drawElement: null, + getBoundingBox: null, + getRotationPoint: null, + getRotationOffset: null, + isVisible: trueify, + allowEdgeTxrCaching: true, + allowParentTxrCaching: true +}); +var ElementTextureCache = function ElementTextureCache(renderer, initOptions) { + var self = this; + self.renderer = renderer; + self.onDequeues = []; + var opts = initDefaults(initOptions); + extend(self, opts); + self.lookup = new ElementTextureCacheLookup(opts.getKey, opts.doesEleInvalidateKey); + self.setupDequeueing(); +}; +var ETCp = ElementTextureCache.prototype; +ETCp.reasons = getTxrReasons; + +// the list of textures in which new subtextures for elements can be placed +ETCp.getTextureQueue = function (txrH) { + var self = this; + self.eleImgCaches = self.eleImgCaches || {}; + return self.eleImgCaches[txrH] = self.eleImgCaches[txrH] || []; +}; + +// the list of usused textures which can be recycled (in use in texture queue) +ETCp.getRetiredTextureQueue = function (txrH) { + var self = this; + var rtxtrQs = self.eleImgCaches.retired = self.eleImgCaches.retired || {}; + var rtxtrQ = rtxtrQs[txrH] = rtxtrQs[txrH] || []; + return rtxtrQ; +}; + +// queue of element draw requests at different scale levels +ETCp.getElementQueue = function () { + var self = this; + var q = self.eleCacheQueue = self.eleCacheQueue || new Heap__default["default"](function (a, b) { + return b.reqs - a.reqs; + }); + return q; +}; + +// queue of element draw requests at different scale levels (element id lookup) +ETCp.getElementKeyToQueue = function () { + var self = this; + var k2q = self.eleKeyToCacheQueue = self.eleKeyToCacheQueue || {}; + return k2q; +}; +ETCp.getElement = function (ele, bb, pxRatio, lvl, reason) { + var self = this; + var r = this.renderer; + var zoom = r.cy.zoom(); + var lookup = this.lookup; + if (!bb || bb.w === 0 || bb.h === 0 || isNaN(bb.w) || isNaN(bb.h) || !ele.visible() || ele.removed()) { + return null; + } + if (!self.allowEdgeTxrCaching && ele.isEdge() || !self.allowParentTxrCaching && ele.isParent()) { + return null; + } + if (lvl == null) { + lvl = Math.ceil(log2(zoom * pxRatio)); + } + if (lvl < minLvl$1) { + lvl = minLvl$1; + } else if (zoom >= maxZoom$1 || lvl > maxLvl$1) { + return null; + } + var scale = Math.pow(2, lvl); + var eleScaledH = bb.h * scale; + var eleScaledW = bb.w * scale; + var scaledLabelShown = r.eleTextBiggerThanMin(ele, scale); + if (!this.isVisible(ele, scaledLabelShown)) { + return null; + } + var eleCache = lookup.get(ele, lvl); + + // if this get was on an unused/invalidated cache, then restore the texture usage metric + if (eleCache && eleCache.invalidated) { + eleCache.invalidated = false; + eleCache.texture.invalidatedWidth -= eleCache.width; + } + if (eleCache) { + return eleCache; + } + var txrH; // which texture height this ele belongs to + + if (eleScaledH <= minTxrH) { + txrH = minTxrH; + } else if (eleScaledH <= txrStepH) { + txrH = txrStepH; + } else { + txrH = Math.ceil(eleScaledH / txrStepH) * txrStepH; + } + if (eleScaledH > maxTxrH || eleScaledW > maxTxrW) { + return null; // caching large elements is not efficient + } + + var txrQ = self.getTextureQueue(txrH); + + // first try the second last one in case it has space at the end + var txr = txrQ[txrQ.length - 2]; + var addNewTxr = function addNewTxr() { + return self.recycleTexture(txrH, eleScaledW) || self.addTexture(txrH, eleScaledW); + }; + + // try the last one if there is no second last one + if (!txr) { + txr = txrQ[txrQ.length - 1]; + } + + // if the last one doesn't exist, we need a first one + if (!txr) { + txr = addNewTxr(); + } + + // if there's no room in the current texture, we need a new one + if (txr.width - txr.usedWidth < eleScaledW) { + txr = addNewTxr(); + } + var scalableFrom = function scalableFrom(otherCache) { + return otherCache && otherCache.scaledLabelShown === scaledLabelShown; + }; + var deqing = reason && reason === getTxrReasons.dequeue; + var highQualityReq = reason && reason === getTxrReasons.highQuality; + var downscaleReq = reason && reason === getTxrReasons.downscale; + var higherCache; // the nearest cache with a higher level + for (var l = lvl + 1; l <= maxLvl$1; l++) { + var c = lookup.get(ele, l); + if (c) { + higherCache = c; + break; + } + } + var oneUpCache = higherCache && higherCache.level === lvl + 1 ? higherCache : null; + var downscale = function downscale() { + txr.context.drawImage(oneUpCache.texture.canvas, oneUpCache.x, 0, oneUpCache.width, oneUpCache.height, txr.usedWidth, 0, eleScaledW, eleScaledH); + }; + + // reset ele area in texture + txr.context.setTransform(1, 0, 0, 1, 0, 0); + txr.context.clearRect(txr.usedWidth, 0, eleScaledW, txrH); + if (scalableFrom(oneUpCache)) { + // then we can relatively cheaply rescale the existing image w/o rerendering + downscale(); + } else if (scalableFrom(higherCache)) { + // then use the higher cache for now and queue the next level down + // to cheaply scale towards the smaller level + + if (highQualityReq) { + for (var _l = higherCache.level; _l > lvl; _l--) { + oneUpCache = self.getElement(ele, bb, pxRatio, _l, getTxrReasons.downscale); + } + downscale(); + } else { + self.queueElement(ele, higherCache.level - 1); + return higherCache; + } + } else { + var lowerCache; // the nearest cache with a lower level + if (!deqing && !highQualityReq && !downscaleReq) { + for (var _l2 = lvl - 1; _l2 >= minLvl$1; _l2--) { + var _c = lookup.get(ele, _l2); + if (_c) { + lowerCache = _c; + break; + } + } + } + if (scalableFrom(lowerCache)) { + // then use the lower quality cache for now and queue the better one for later + + self.queueElement(ele, lvl); + return lowerCache; + } + txr.context.translate(txr.usedWidth, 0); + txr.context.scale(scale, scale); + this.drawElement(txr.context, ele, bb, scaledLabelShown, false); + txr.context.scale(1 / scale, 1 / scale); + txr.context.translate(-txr.usedWidth, 0); + } + eleCache = { + x: txr.usedWidth, + texture: txr, + level: lvl, + scale: scale, + width: eleScaledW, + height: eleScaledH, + scaledLabelShown: scaledLabelShown + }; + txr.usedWidth += Math.ceil(eleScaledW + eleTxrSpacing); + txr.eleCaches.push(eleCache); + lookup.set(ele, lvl, eleCache); + self.checkTextureFullness(txr); + return eleCache; +}; +ETCp.invalidateElements = function (eles) { + for (var i = 0; i < eles.length; i++) { + this.invalidateElement(eles[i]); + } +}; +ETCp.invalidateElement = function (ele) { + var self = this; + var lookup = self.lookup; + var caches = []; + var invalid = lookup.isInvalid(ele); + if (!invalid) { + return; // override the invalidation request if the element key has not changed + } + + for (var lvl = minLvl$1; lvl <= maxLvl$1; lvl++) { + var cache = lookup.getForCachedKey(ele, lvl); + if (cache) { + caches.push(cache); + } + } + var noOtherElesUseCache = lookup.invalidate(ele); + if (noOtherElesUseCache) { + for (var i = 0; i < caches.length; i++) { + var _cache = caches[i]; + var txr = _cache.texture; + + // remove space from the texture it belongs to + txr.invalidatedWidth += _cache.width; + + // mark the cache as invalidated + _cache.invalidated = true; + + // retire the texture if its utility is low + self.checkTextureUtility(txr); + } + } + + // remove from queue since the old req was for the old state + self.removeFromQueue(ele); +}; +ETCp.checkTextureUtility = function (txr) { + // invalidate all entries in the cache if the cache size is small + if (txr.invalidatedWidth >= minUtility * txr.width) { + this.retireTexture(txr); + } +}; +ETCp.checkTextureFullness = function (txr) { + // if texture has been mostly filled and passed over several times, remove + // it from the queue so we don't need to waste time looking at it to put new things + + var self = this; + var txrQ = self.getTextureQueue(txr.height); + if (txr.usedWidth / txr.width > maxFullness && txr.fullnessChecks >= maxFullnessChecks) { + removeFromArray(txrQ, txr); + } else { + txr.fullnessChecks++; + } +}; +ETCp.retireTexture = function (txr) { + var self = this; + var txrH = txr.height; + var txrQ = self.getTextureQueue(txrH); + var lookup = this.lookup; + + // retire the texture from the active / searchable queue: + + removeFromArray(txrQ, txr); + txr.retired = true; + + // remove the refs from the eles to the caches: + + var eleCaches = txr.eleCaches; + for (var i = 0; i < eleCaches.length; i++) { + var eleCache = eleCaches[i]; + lookup.deleteCache(eleCache.key, eleCache.level); + } + clearArray(eleCaches); + + // add the texture to a retired queue so it can be recycled in future: + + var rtxtrQ = self.getRetiredTextureQueue(txrH); + rtxtrQ.push(txr); +}; +ETCp.addTexture = function (txrH, minW) { + var self = this; + var txrQ = self.getTextureQueue(txrH); + var txr = {}; + txrQ.push(txr); + txr.eleCaches = []; + txr.height = txrH; + txr.width = Math.max(defTxrWidth, minW); + txr.usedWidth = 0; + txr.invalidatedWidth = 0; + txr.fullnessChecks = 0; + txr.canvas = self.renderer.makeOffscreenCanvas(txr.width, txr.height); + txr.context = txr.canvas.getContext('2d'); + return txr; +}; +ETCp.recycleTexture = function (txrH, minW) { + var self = this; + var txrQ = self.getTextureQueue(txrH); + var rtxtrQ = self.getRetiredTextureQueue(txrH); + for (var i = 0; i < rtxtrQ.length; i++) { + var txr = rtxtrQ[i]; + if (txr.width >= minW) { + txr.retired = false; + txr.usedWidth = 0; + txr.invalidatedWidth = 0; + txr.fullnessChecks = 0; + clearArray(txr.eleCaches); + txr.context.setTransform(1, 0, 0, 1, 0, 0); + txr.context.clearRect(0, 0, txr.width, txr.height); + removeFromArray(rtxtrQ, txr); + txrQ.push(txr); + return txr; + } + } +}; +ETCp.queueElement = function (ele, lvl) { + var self = this; + var q = self.getElementQueue(); + var k2q = self.getElementKeyToQueue(); + var key = this.getKey(ele); + var existingReq = k2q[key]; + if (existingReq) { + // use the max lvl b/c in between lvls are cheap to make + existingReq.level = Math.max(existingReq.level, lvl); + existingReq.eles.merge(ele); + existingReq.reqs++; + q.updateItem(existingReq); + } else { + var req = { + eles: ele.spawn().merge(ele), + level: lvl, + reqs: 1, + key: key + }; + q.push(req); + k2q[key] = req; + } +}; +ETCp.dequeue = function (pxRatio /*, extent*/) { + var self = this; + var q = self.getElementQueue(); + var k2q = self.getElementKeyToQueue(); + var dequeued = []; + var lookup = self.lookup; + for (var i = 0; i < maxDeqSize$1; i++) { + if (q.size() > 0) { + var req = q.pop(); + var key = req.key; + var ele = req.eles[0]; // all eles have the same key + var cacheExists = lookup.hasCache(ele, req.level); + + // clear out the key to req lookup + k2q[key] = null; + + // dequeueing isn't necessary with an existing cache + if (cacheExists) { + continue; + } + dequeued.push(req); + var bb = self.getBoundingBox(ele); + self.getElement(ele, bb, pxRatio, req.level, getTxrReasons.dequeue); + } else { + break; + } + } + return dequeued; +}; +ETCp.removeFromQueue = function (ele) { + var self = this; + var q = self.getElementQueue(); + var k2q = self.getElementKeyToQueue(); + var key = this.getKey(ele); + var req = k2q[key]; + if (req != null) { + if (req.eles.length === 1) { + // remove if last ele in the req + // bring to front of queue + req.reqs = MAX_INT$1; + q.updateItem(req); + q.pop(); // remove from queue + + k2q[key] = null; // remove from lookup map + } else { + // otherwise just remove ele from req + req.eles.unmerge(ele); + } + } +}; +ETCp.onDequeue = function (fn) { + this.onDequeues.push(fn); +}; +ETCp.offDequeue = function (fn) { + removeFromArray(this.onDequeues, fn); +}; +ETCp.setupDequeueing = defs.setupDequeueing({ + deqRedrawThreshold: deqRedrawThreshold$1, + deqCost: deqCost$1, + deqAvgCost: deqAvgCost$1, + deqNoDrawCost: deqNoDrawCost$1, + deqFastCost: deqFastCost$1, + deq: function deq(self, pxRatio, extent) { + return self.dequeue(pxRatio, extent); + }, + onDeqd: function onDeqd(self, deqd) { + for (var i = 0; i < self.onDequeues.length; i++) { + var fn = self.onDequeues[i]; + fn(deqd); + } + }, + shouldRedraw: function shouldRedraw(self, deqd, pxRatio, extent) { + for (var i = 0; i < deqd.length; i++) { + var eles = deqd[i].eles; + for (var j = 0; j < eles.length; j++) { + var bb = eles[j].boundingBox(); + if (boundingBoxesIntersect(bb, extent)) { + return true; + } + } + } + return false; + }, + priority: function priority(self) { + return self.renderer.beforeRenderPriorities.eleTxrDeq; + } +}); + +var defNumLayers = 1; // default number of layers to use +var minLvl = -4; // when scaling smaller than that we don't need to re-render +var maxLvl = 2; // when larger than this scale just render directly (caching is not helpful) +var maxZoom = 3.99; // beyond this zoom level, layered textures are not used +var deqRedrawThreshold = 50; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile +var refineEleDebounceTime = 50; // time to debounce sharper ele texture updates +var deqCost = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame +var deqAvgCost = 0.1; // % of add'l rendering cost compared to average overall redraw time +var deqNoDrawCost = 0.9; // % of avg frame time that can be used for dequeueing when not drawing +var deqFastCost = 0.9; // % of frame time to be used when >60fps +var maxDeqSize = 1; // number of eles to dequeue and render at higher texture in each batch +var invalidThreshold = 250; // time threshold for disabling b/c of invalidations +var maxLayerArea = 4000 * 4000; // layers can't be bigger than this +var useHighQualityEleTxrReqs = true; // whether to use high quality ele txr requests (generally faster and cheaper in the longterm) + +// var log = function(){ console.log.apply( console, arguments ); }; + +var LayeredTextureCache = function LayeredTextureCache(renderer) { + var self = this; + var r = self.renderer = renderer; + var cy = r.cy; + self.layersByLevel = {}; // e.g. 2 => [ layer1, layer2, ..., layerN ] + + self.firstGet = true; + self.lastInvalidationTime = performanceNow() - 2 * invalidThreshold; + self.skipping = false; + self.eleTxrDeqs = cy.collection(); + self.scheduleElementRefinement = debounce__default["default"](function () { + self.refineElementTextures(self.eleTxrDeqs); + self.eleTxrDeqs.unmerge(self.eleTxrDeqs); + }, refineEleDebounceTime); + r.beforeRender(function (willDraw, now) { + if (now - self.lastInvalidationTime <= invalidThreshold) { + self.skipping = true; + } else { + self.skipping = false; + } + }, r.beforeRenderPriorities.lyrTxrSkip); + var qSort = function qSort(a, b) { + return b.reqs - a.reqs; + }; + self.layersQueue = new Heap__default["default"](qSort); + self.setupDequeueing(); +}; +var LTCp = LayeredTextureCache.prototype; +var layerIdPool = 0; +var MAX_INT = Math.pow(2, 53) - 1; +LTCp.makeLayer = function (bb, lvl) { + var scale = Math.pow(2, lvl); + var w = Math.ceil(bb.w * scale); + var h = Math.ceil(bb.h * scale); + var canvas = this.renderer.makeOffscreenCanvas(w, h); + var layer = { + id: layerIdPool = ++layerIdPool % MAX_INT, + bb: bb, + level: lvl, + width: w, + height: h, + canvas: canvas, + context: canvas.getContext('2d'), + eles: [], + elesQueue: [], + reqs: 0 + }; + + // log('make layer %s with w %s and h %s and lvl %s', layer.id, layer.width, layer.height, layer.level); + + var cxt = layer.context; + var dx = -layer.bb.x1; + var dy = -layer.bb.y1; + + // do the transform on creation to save cycles (it's the same for all eles) + cxt.scale(scale, scale); + cxt.translate(dx, dy); + return layer; +}; +LTCp.getLayers = function (eles, pxRatio, lvl) { + var self = this; + var r = self.renderer; + var cy = r.cy; + var zoom = cy.zoom(); + var firstGet = self.firstGet; + self.firstGet = false; + + // log('--\nget layers with %s eles', eles.length); + //log eles.map(function(ele){ return ele.id() }) ); + + if (lvl == null) { + lvl = Math.ceil(log2(zoom * pxRatio)); + if (lvl < minLvl) { + lvl = minLvl; + } else if (zoom >= maxZoom || lvl > maxLvl) { + return null; + } + } + self.validateLayersElesOrdering(lvl, eles); + var layersByLvl = self.layersByLevel; + var scale = Math.pow(2, lvl); + var layers = layersByLvl[lvl] = layersByLvl[lvl] || []; + var bb; + var lvlComplete = self.levelIsComplete(lvl, eles); + var tmpLayers; + var checkTempLevels = function checkTempLevels() { + var canUseAsTmpLvl = function canUseAsTmpLvl(l) { + self.validateLayersElesOrdering(l, eles); + if (self.levelIsComplete(l, eles)) { + tmpLayers = layersByLvl[l]; + return true; + } + }; + var checkLvls = function checkLvls(dir) { + if (tmpLayers) { + return; + } + for (var l = lvl + dir; minLvl <= l && l <= maxLvl; l += dir) { + if (canUseAsTmpLvl(l)) { + break; + } + } + }; + checkLvls(+1); + checkLvls(-1); + + // remove the invalid layers; they will be replaced as needed later in this function + for (var i = layers.length - 1; i >= 0; i--) { + var layer = layers[i]; + if (layer.invalid) { + removeFromArray(layers, layer); + } + } + }; + if (!lvlComplete) { + // if the current level is incomplete, then use the closest, best quality layerset temporarily + // and later queue the current layerset so we can get the proper quality level soon + + checkTempLevels(); + } else { + // log('level complete, using existing layers\n--'); + return layers; + } + var getBb = function getBb() { + if (!bb) { + bb = makeBoundingBox(); + for (var i = 0; i < eles.length; i++) { + updateBoundingBox(bb, eles[i].boundingBox()); + } + } + return bb; + }; + var makeLayer = function makeLayer(opts) { + opts = opts || {}; + var after = opts.after; + getBb(); + var area = bb.w * scale * (bb.h * scale); + if (area > maxLayerArea) { + return null; + } + var layer = self.makeLayer(bb, lvl); + if (after != null) { + var index = layers.indexOf(after) + 1; + layers.splice(index, 0, layer); + } else if (opts.insert === undefined || opts.insert) { + // no after specified => first layer made so put at start + layers.unshift(layer); + } + + // if( tmpLayers ){ + //self.queueLayer( layer ); + // } + + return layer; + }; + if (self.skipping && !firstGet) { + // log('skip layers'); + return null; + } + + // log('do layers'); + + var layer = null; + var maxElesPerLayer = eles.length / defNumLayers; + var allowLazyQueueing = !firstGet; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var rs = ele._private.rscratch; + var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; + + // log('look at ele', ele.id()); + + var existingLayer = caches[lvl]; + if (existingLayer) { + // reuse layer for later eles + // log('reuse layer for', ele.id()); + layer = existingLayer; + continue; + } + if (!layer || layer.eles.length >= maxElesPerLayer || !boundingBoxInBoundingBox(layer.bb, ele.boundingBox())) { + // log('make new layer for ele %s', ele.id()); + + layer = makeLayer({ + insert: true, + after: layer + }); + + // if now layer can be built then we can't use layers at this level + if (!layer) { + return null; + } + + // log('new layer with id %s', layer.id); + } + + if (tmpLayers || allowLazyQueueing) { + // log('queue ele %s in layer %s', ele.id(), layer.id); + self.queueLayer(layer, ele); + } else { + // log('draw ele %s in layer %s', ele.id(), layer.id); + self.drawEleInLayer(layer, ele, lvl, pxRatio); + } + layer.eles.push(ele); + caches[lvl] = layer; + } + + // log('--'); + + if (tmpLayers) { + // then we only queued the current layerset and can't draw it yet + return tmpLayers; + } + if (allowLazyQueueing) { + // log('lazy queue level', lvl); + return null; + } + return layers; +}; + +// a layer may want to use an ele cache of a higher level to avoid blurriness +// so the layer level might not equal the ele level +LTCp.getEleLevelForLayerLevel = function (lvl, pxRatio) { + return lvl; +}; +LTCp.drawEleInLayer = function (layer, ele, lvl, pxRatio) { + var self = this; + var r = this.renderer; + var context = layer.context; + var bb = ele.boundingBox(); + if (bb.w === 0 || bb.h === 0 || !ele.visible()) { + return; + } + lvl = self.getEleLevelForLayerLevel(lvl, pxRatio); + { + r.setImgSmoothing(context, false); + } + { + r.drawCachedElement(context, ele, null, null, lvl, useHighQualityEleTxrReqs); + } + { + r.setImgSmoothing(context, true); + } +}; +LTCp.levelIsComplete = function (lvl, eles) { + var self = this; + var layers = self.layersByLevel[lvl]; + if (!layers || layers.length === 0) { + return false; + } + var numElesInLayers = 0; + for (var i = 0; i < layers.length; i++) { + var layer = layers[i]; + + // if there are any eles needed to be drawn yet, the level is not complete + if (layer.reqs > 0) { + return false; + } + + // if the layer is invalid, the level is not complete + if (layer.invalid) { + return false; + } + numElesInLayers += layer.eles.length; + } + + // we should have exactly the number of eles passed in to be complete + if (numElesInLayers !== eles.length) { + return false; + } + return true; +}; +LTCp.validateLayersElesOrdering = function (lvl, eles) { + var layers = this.layersByLevel[lvl]; + if (!layers) { + return; + } + + // if in a layer the eles are not in the same order, then the layer is invalid + // (i.e. there is an ele in between the eles in the layer) + + for (var i = 0; i < layers.length; i++) { + var layer = layers[i]; + var offset = -1; + + // find the offset + for (var j = 0; j < eles.length; j++) { + if (layer.eles[0] === eles[j]) { + offset = j; + break; + } + } + if (offset < 0) { + // then the layer has nonexistent elements and is invalid + this.invalidateLayer(layer); + continue; + } + + // the eles in the layer must be in the same continuous order, else the layer is invalid + + var o = offset; + for (var j = 0; j < layer.eles.length; j++) { + if (layer.eles[j] !== eles[o + j]) { + // log('invalidate based on ordering', layer.id); + + this.invalidateLayer(layer); + break; + } + } + } +}; +LTCp.updateElementsInLayers = function (eles, update) { + var self = this; + var isEles = element(eles[0]); + + // collect udpated elements (cascaded from the layers) and update each + // layer itself along the way + for (var i = 0; i < eles.length; i++) { + var req = isEles ? null : eles[i]; + var ele = isEles ? eles[i] : eles[i].ele; + var rs = ele._private.rscratch; + var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; + for (var l = minLvl; l <= maxLvl; l++) { + var layer = caches[l]; + if (!layer) { + continue; + } + + // if update is a request from the ele cache, then it affects only + // the matching level + if (req && self.getEleLevelForLayerLevel(layer.level) !== req.level) { + continue; + } + update(layer, ele, req); + } + } +}; +LTCp.haveLayers = function () { + var self = this; + var haveLayers = false; + for (var l = minLvl; l <= maxLvl; l++) { + var layers = self.layersByLevel[l]; + if (layers && layers.length > 0) { + haveLayers = true; + break; + } + } + return haveLayers; +}; +LTCp.invalidateElements = function (eles) { + var self = this; + if (eles.length === 0) { + return; + } + self.lastInvalidationTime = performanceNow(); + + // log('update invalidate layer time from eles'); + + if (eles.length === 0 || !self.haveLayers()) { + return; + } + self.updateElementsInLayers(eles, function invalAssocLayers(layer, ele, req) { + self.invalidateLayer(layer); + }); +}; +LTCp.invalidateLayer = function (layer) { + // log('update invalidate layer time'); + + this.lastInvalidationTime = performanceNow(); + if (layer.invalid) { + return; + } // save cycles + + var lvl = layer.level; + var eles = layer.eles; + var layers = this.layersByLevel[lvl]; + + // log('invalidate layer', layer.id ); + + removeFromArray(layers, layer); + // layer.eles = []; + + layer.elesQueue = []; + layer.invalid = true; + if (layer.replacement) { + layer.replacement.invalid = true; + } + for (var i = 0; i < eles.length; i++) { + var caches = eles[i]._private.rscratch.imgLayerCaches; + if (caches) { + caches[lvl] = null; + } + } +}; +LTCp.refineElementTextures = function (eles) { + var self = this; + + // log('refine', eles.length); + + self.updateElementsInLayers(eles, function refineEachEle(layer, ele, req) { + var rLyr = layer.replacement; + if (!rLyr) { + rLyr = layer.replacement = self.makeLayer(layer.bb, layer.level); + rLyr.replaces = layer; + rLyr.eles = layer.eles; + + // log('make replacement layer %s for %s with level %s', rLyr.id, layer.id, rLyr.level); + } + + if (!rLyr.reqs) { + for (var i = 0; i < rLyr.eles.length; i++) { + self.queueLayer(rLyr, rLyr.eles[i]); + } + + // log('queue replacement layer refinement', rLyr.id); + } + }); +}; + +LTCp.enqueueElementRefinement = function (ele) { + this.eleTxrDeqs.merge(ele); + this.scheduleElementRefinement(); +}; +LTCp.queueLayer = function (layer, ele) { + var self = this; + var q = self.layersQueue; + var elesQ = layer.elesQueue; + var hasId = elesQ.hasId = elesQ.hasId || {}; + + // if a layer is going to be replaced, queuing is a waste of time + if (layer.replacement) { + return; + } + if (ele) { + if (hasId[ele.id()]) { + return; + } + elesQ.push(ele); + hasId[ele.id()] = true; + } + if (layer.reqs) { + layer.reqs++; + q.updateItem(layer); + } else { + layer.reqs = 1; + q.push(layer); + } +}; +LTCp.dequeue = function (pxRatio) { + var self = this; + var q = self.layersQueue; + var deqd = []; + var eleDeqs = 0; + while (eleDeqs < maxDeqSize) { + if (q.size() === 0) { + break; + } + var layer = q.peek(); + + // if a layer has been or will be replaced, then don't waste time with it + if (layer.replacement) { + // log('layer %s in queue skipped b/c it already has a replacement', layer.id); + q.pop(); + continue; + } + + // if this is a replacement layer that has been superceded, then forget it + if (layer.replaces && layer !== layer.replaces.replacement) { + // log('layer is no longer the most uptodate replacement; dequeued', layer.id) + q.pop(); + continue; + } + if (layer.invalid) { + // log('replacement layer %s is invalid; dequeued', layer.id); + q.pop(); + continue; + } + var ele = layer.elesQueue.shift(); + if (ele) { + // log('dequeue layer %s', layer.id); + + self.drawEleInLayer(layer, ele, layer.level, pxRatio); + eleDeqs++; + } + if (deqd.length === 0) { + // we need only one entry in deqd to queue redrawing etc + deqd.push(true); + } + + // if the layer has all its eles done, then remove from the queue + if (layer.elesQueue.length === 0) { + q.pop(); + layer.reqs = 0; + + // log('dequeue of layer %s complete', layer.id); + + // when a replacement layer is dequeued, it replaces the old layer in the level + if (layer.replaces) { + self.applyLayerReplacement(layer); + } + self.requestRedraw(); + } + } + return deqd; +}; +LTCp.applyLayerReplacement = function (layer) { + var self = this; + var layersInLevel = self.layersByLevel[layer.level]; + var replaced = layer.replaces; + var index = layersInLevel.indexOf(replaced); + + // if the replaced layer is not in the active list for the level, then replacing + // refs would be a mistake (i.e. overwriting the true active layer) + if (index < 0 || replaced.invalid) { + // log('replacement layer would have no effect', layer.id); + return; + } + layersInLevel[index] = layer; // replace level ref + + // replace refs in eles + for (var i = 0; i < layer.eles.length; i++) { + var _p = layer.eles[i]._private; + var cache = _p.imgLayerCaches = _p.imgLayerCaches || {}; + if (cache) { + cache[layer.level] = layer; + } + } + + // log('apply replacement layer %s over %s', layer.id, replaced.id); + + self.requestRedraw(); +}; +LTCp.requestRedraw = debounce__default["default"](function () { + var r = this.renderer; + r.redrawHint('eles', true); + r.redrawHint('drag', true); + r.redraw(); +}, 100); +LTCp.setupDequeueing = defs.setupDequeueing({ + deqRedrawThreshold: deqRedrawThreshold, + deqCost: deqCost, + deqAvgCost: deqAvgCost, + deqNoDrawCost: deqNoDrawCost, + deqFastCost: deqFastCost, + deq: function deq(self, pxRatio) { + return self.dequeue(pxRatio); + }, + onDeqd: noop$1, + shouldRedraw: trueify, + priority: function priority(self) { + return self.renderer.beforeRenderPriorities.lyrTxrDeq; + } +}); + +var CRp$a = {}; +var impl; +function polygon(context, points) { + for (var i = 0; i < points.length; i++) { + var pt = points[i]; + context.lineTo(pt.x, pt.y); + } +} +function triangleBackcurve(context, points, controlPoint) { + var firstPt; + for (var i = 0; i < points.length; i++) { + var pt = points[i]; + if (i === 0) { + firstPt = pt; + } + context.lineTo(pt.x, pt.y); + } + context.quadraticCurveTo(controlPoint.x, controlPoint.y, firstPt.x, firstPt.y); +} +function triangleTee(context, trianglePoints, teePoints) { + if (context.beginPath) { + context.beginPath(); + } + var triPts = trianglePoints; + for (var i = 0; i < triPts.length; i++) { + var pt = triPts[i]; + context.lineTo(pt.x, pt.y); + } + var teePts = teePoints; + var firstTeePt = teePoints[0]; + context.moveTo(firstTeePt.x, firstTeePt.y); + for (var i = 1; i < teePts.length; i++) { + var pt = teePts[i]; + context.lineTo(pt.x, pt.y); + } + if (context.closePath) { + context.closePath(); + } +} +function circleTriangle(context, trianglePoints, rx, ry, r) { + if (context.beginPath) { + context.beginPath(); + } + context.arc(rx, ry, r, 0, Math.PI * 2, false); + var triPts = trianglePoints; + var firstTrPt = triPts[0]; + context.moveTo(firstTrPt.x, firstTrPt.y); + for (var i = 0; i < triPts.length; i++) { + var pt = triPts[i]; + context.lineTo(pt.x, pt.y); + } + if (context.closePath) { + context.closePath(); + } +} +function circle(context, rx, ry, r) { + context.arc(rx, ry, r, 0, Math.PI * 2, false); +} +CRp$a.arrowShapeImpl = function (name) { + return (impl || (impl = { + 'polygon': polygon, + 'triangle-backcurve': triangleBackcurve, + 'triangle-tee': triangleTee, + 'circle-triangle': circleTriangle, + 'triangle-cross': triangleTee, + 'circle': circle + }))[name]; +}; + +var CRp$9 = {}; +CRp$9.drawElement = function (context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity) { + var r = this; + if (ele.isNode()) { + r.drawNode(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); + } else { + r.drawEdge(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); + } +}; +CRp$9.drawElementOverlay = function (context, ele) { + var r = this; + if (ele.isNode()) { + r.drawNodeOverlay(context, ele); + } else { + r.drawEdgeOverlay(context, ele); + } +}; +CRp$9.drawElementUnderlay = function (context, ele) { + var r = this; + if (ele.isNode()) { + r.drawNodeUnderlay(context, ele); + } else { + r.drawEdgeUnderlay(context, ele); + } +}; +CRp$9.drawCachedElementPortion = function (context, ele, eleTxrCache, pxRatio, lvl, reason, getRotation, getOpacity) { + var r = this; + var bb = eleTxrCache.getBoundingBox(ele); + if (bb.w === 0 || bb.h === 0) { + return; + } // ignore zero size case + + var eleCache = eleTxrCache.getElement(ele, bb, pxRatio, lvl, reason); + if (eleCache != null) { + var opacity = getOpacity(r, ele); + if (opacity === 0) { + return; + } + var theta = getRotation(r, ele); + var x1 = bb.x1, + y1 = bb.y1, + w = bb.w, + h = bb.h; + var x, y, sx, sy, smooth; + if (theta !== 0) { + var rotPt = eleTxrCache.getRotationPoint(ele); + sx = rotPt.x; + sy = rotPt.y; + context.translate(sx, sy); + context.rotate(theta); + smooth = r.getImgSmoothing(context); + if (!smooth) { + r.setImgSmoothing(context, true); + } + var off = eleTxrCache.getRotationOffset(ele); + x = off.x; + y = off.y; + } else { + x = x1; + y = y1; + } + var oldGlobalAlpha; + if (opacity !== 1) { + oldGlobalAlpha = context.globalAlpha; + context.globalAlpha = oldGlobalAlpha * opacity; + } + context.drawImage(eleCache.texture.canvas, eleCache.x, 0, eleCache.width, eleCache.height, x, y, w, h); + if (opacity !== 1) { + context.globalAlpha = oldGlobalAlpha; + } + if (theta !== 0) { + context.rotate(-theta); + context.translate(-sx, -sy); + if (!smooth) { + r.setImgSmoothing(context, false); + } + } + } else { + eleTxrCache.drawElement(context, ele); // direct draw fallback + } +}; + +var getZeroRotation = function getZeroRotation() { + return 0; +}; +var getLabelRotation = function getLabelRotation(r, ele) { + return r.getTextAngle(ele, null); +}; +var getSourceLabelRotation = function getSourceLabelRotation(r, ele) { + return r.getTextAngle(ele, 'source'); +}; +var getTargetLabelRotation = function getTargetLabelRotation(r, ele) { + return r.getTextAngle(ele, 'target'); +}; +var getOpacity = function getOpacity(r, ele) { + return ele.effectiveOpacity(); +}; +var getTextOpacity = function getTextOpacity(e, ele) { + return ele.pstyle('text-opacity').pfValue * ele.effectiveOpacity(); +}; +CRp$9.drawCachedElement = function (context, ele, pxRatio, extent, lvl, requestHighQuality) { + var r = this; + var _r$data = r.data, + eleTxrCache = _r$data.eleTxrCache, + lblTxrCache = _r$data.lblTxrCache, + slbTxrCache = _r$data.slbTxrCache, + tlbTxrCache = _r$data.tlbTxrCache; + var bb = ele.boundingBox(); + var reason = requestHighQuality === true ? eleTxrCache.reasons.highQuality : null; + if (bb.w === 0 || bb.h === 0 || !ele.visible()) { + return; + } + if (!extent || boundingBoxesIntersect(bb, extent)) { + var isEdge = ele.isEdge(); + var badLine = ele.element()._private.rscratch.badLine; + r.drawElementUnderlay(context, ele); + r.drawCachedElementPortion(context, ele, eleTxrCache, pxRatio, lvl, reason, getZeroRotation, getOpacity); + if (!isEdge || !badLine) { + r.drawCachedElementPortion(context, ele, lblTxrCache, pxRatio, lvl, reason, getLabelRotation, getTextOpacity); + } + if (isEdge && !badLine) { + r.drawCachedElementPortion(context, ele, slbTxrCache, pxRatio, lvl, reason, getSourceLabelRotation, getTextOpacity); + r.drawCachedElementPortion(context, ele, tlbTxrCache, pxRatio, lvl, reason, getTargetLabelRotation, getTextOpacity); + } + r.drawElementOverlay(context, ele); + } +}; +CRp$9.drawElements = function (context, eles) { + var r = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + r.drawElement(context, ele); + } +}; +CRp$9.drawCachedElements = function (context, eles, pxRatio, extent) { + var r = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + r.drawCachedElement(context, ele, pxRatio, extent); + } +}; +CRp$9.drawCachedNodes = function (context, eles, pxRatio, extent) { + var r = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + if (!ele.isNode()) { + continue; + } + r.drawCachedElement(context, ele, pxRatio, extent); + } +}; +CRp$9.drawLayeredElements = function (context, eles, pxRatio, extent) { + var r = this; + var layers = r.data.lyrTxrCache.getLayers(eles, pxRatio); + if (layers) { + for (var i = 0; i < layers.length; i++) { + var layer = layers[i]; + var bb = layer.bb; + if (bb.w === 0 || bb.h === 0) { + continue; + } + context.drawImage(layer.canvas, bb.x1, bb.y1, bb.w, bb.h); + } + } else { + // fall back on plain caching if no layers + r.drawCachedElements(context, eles, pxRatio, extent); + } +}; + +/* global Path2D */ +var CRp$8 = {}; +CRp$8.drawEdge = function (context, edge, shiftToOriginWithBb) { + var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + var r = this; + var rs = edge._private.rscratch; + if (shouldDrawOpacity && !edge.visible()) { + return; + } + + // if bezier ctrl pts can not be calculated, then die + if (rs.badLine || rs.allpts == null || isNaN(rs.allpts[0])) { + // isNaN in case edge is impossible and browser bugs (e.g. safari) + return; + } + var bb; + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + var opacity = shouldDrawOpacity ? edge.pstyle('opacity').value : 1; + var lineOpacity = shouldDrawOpacity ? edge.pstyle('line-opacity').value : 1; + var curveStyle = edge.pstyle('curve-style').value; + var lineStyle = edge.pstyle('line-style').value; + var edgeWidth = edge.pstyle('width').pfValue; + var lineCap = edge.pstyle('line-cap').value; + var effectiveLineOpacity = opacity * lineOpacity; + // separate arrow opacity would require arrow-opacity property + var effectiveArrowOpacity = opacity * lineOpacity; + var drawLine = function drawLine() { + var strokeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveLineOpacity; + if (curveStyle === 'straight-triangle') { + r.eleStrokeStyle(context, edge, strokeOpacity); + r.drawEdgeTrianglePath(edge, context, rs.allpts); + } else { + context.lineWidth = edgeWidth; + context.lineCap = lineCap; + r.eleStrokeStyle(context, edge, strokeOpacity); + r.drawEdgePath(edge, context, rs.allpts, lineStyle); + context.lineCap = 'butt'; // reset for other drawing functions + } + }; + + var drawOverlay = function drawOverlay() { + if (!shouldDrawOverlay) { + return; + } + r.drawEdgeOverlay(context, edge); + }; + var drawUnderlay = function drawUnderlay() { + if (!shouldDrawOverlay) { + return; + } + r.drawEdgeUnderlay(context, edge); + }; + var drawArrows = function drawArrows() { + var arrowOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveArrowOpacity; + r.drawArrowheads(context, edge, arrowOpacity); + }; + var drawText = function drawText() { + r.drawElementText(context, edge, null, drawLabel); + }; + context.lineJoin = 'round'; + var ghost = edge.pstyle('ghost').value === 'yes'; + if (ghost) { + var gx = edge.pstyle('ghost-offset-x').pfValue; + var gy = edge.pstyle('ghost-offset-y').pfValue; + var ghostOpacity = edge.pstyle('ghost-opacity').value; + var effectiveGhostOpacity = effectiveLineOpacity * ghostOpacity; + context.translate(gx, gy); + drawLine(effectiveGhostOpacity); + drawArrows(effectiveGhostOpacity); + context.translate(-gx, -gy); + } + drawUnderlay(); + drawLine(); + drawArrows(); + drawOverlay(); + drawText(); + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } +}; +var drawEdgeOverlayUnderlay = function drawEdgeOverlayUnderlay(overlayOrUnderlay) { + if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) { + throw new Error('Invalid state'); + } + return function (context, edge) { + if (!edge.visible()) { + return; + } + var opacity = edge.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; + if (opacity === 0) { + return; + } + var r = this; + var usePaths = r.usePaths(); + var rs = edge._private.rscratch; + var padding = edge.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; + var width = 2 * padding; + var color = edge.pstyle("".concat(overlayOrUnderlay, "-color")).value; + context.lineWidth = width; + if (rs.edgeType === 'self' && !usePaths) { + context.lineCap = 'butt'; + } else { + context.lineCap = 'round'; + } + r.colorStrokeStyle(context, color[0], color[1], color[2], opacity); + r.drawEdgePath(edge, context, rs.allpts, 'solid'); + }; +}; +CRp$8.drawEdgeOverlay = drawEdgeOverlayUnderlay('overlay'); +CRp$8.drawEdgeUnderlay = drawEdgeOverlayUnderlay('underlay'); +CRp$8.drawEdgePath = function (edge, context, pts, type) { + var rs = edge._private.rscratch; + var canvasCxt = context; + var path; + var pathCacheHit = false; + var usePaths = this.usePaths(); + var lineDashPattern = edge.pstyle('line-dash-pattern').pfValue; + var lineDashOffset = edge.pstyle('line-dash-offset').pfValue; + if (usePaths) { + var pathCacheKey = pts.join('$'); + var keyMatches = rs.pathCacheKey && rs.pathCacheKey === pathCacheKey; + if (keyMatches) { + path = context = rs.pathCache; + pathCacheHit = true; + } else { + path = context = new Path2D(); + rs.pathCacheKey = pathCacheKey; + rs.pathCache = path; + } + } + if (canvasCxt.setLineDash) { + // for very outofdate browsers + switch (type) { + case 'dotted': + canvasCxt.setLineDash([1, 1]); + break; + case 'dashed': + canvasCxt.setLineDash(lineDashPattern); + canvasCxt.lineDashOffset = lineDashOffset; + break; + case 'solid': + canvasCxt.setLineDash([]); + break; + } + } + if (!pathCacheHit && !rs.badLine) { + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(pts[0], pts[1]); + switch (rs.edgeType) { + case 'bezier': + case 'self': + case 'compound': + case 'multibezier': + for (var i = 2; i + 3 < pts.length; i += 4) { + context.quadraticCurveTo(pts[i], pts[i + 1], pts[i + 2], pts[i + 3]); + } + break; + case 'straight': + case 'segments': + case 'haystack': + for (var _i = 2; _i + 1 < pts.length; _i += 2) { + context.lineTo(pts[_i], pts[_i + 1]); + } + break; + } + } + context = canvasCxt; + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + + // reset any line dashes + if (context.setLineDash) { + // for very outofdate browsers + context.setLineDash([]); + } +}; +CRp$8.drawEdgeTrianglePath = function (edge, context, pts) { + // use line stroke style for triangle fill style + context.fillStyle = context.strokeStyle; + var edgeWidth = edge.pstyle('width').pfValue; + for (var i = 0; i + 1 < pts.length; i += 2) { + var vector = [pts[i + 2] - pts[i], pts[i + 3] - pts[i + 1]]; + var length = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]); + var normal = [vector[1] / length, -vector[0] / length]; + var triangleHead = [normal[0] * edgeWidth / 2, normal[1] * edgeWidth / 2]; + context.beginPath(); + context.moveTo(pts[i] - triangleHead[0], pts[i + 1] - triangleHead[1]); + context.lineTo(pts[i] + triangleHead[0], pts[i + 1] + triangleHead[1]); + context.lineTo(pts[i + 2], pts[i + 3]); + context.closePath(); + context.fill(); + } +}; +CRp$8.drawArrowheads = function (context, edge, opacity) { + var rs = edge._private.rscratch; + var isHaystack = rs.edgeType === 'haystack'; + if (!isHaystack) { + this.drawArrowhead(context, edge, 'source', rs.arrowStartX, rs.arrowStartY, rs.srcArrowAngle, opacity); + } + this.drawArrowhead(context, edge, 'mid-target', rs.midX, rs.midY, rs.midtgtArrowAngle, opacity); + this.drawArrowhead(context, edge, 'mid-source', rs.midX, rs.midY, rs.midsrcArrowAngle, opacity); + if (!isHaystack) { + this.drawArrowhead(context, edge, 'target', rs.arrowEndX, rs.arrowEndY, rs.tgtArrowAngle, opacity); + } +}; +CRp$8.drawArrowhead = function (context, edge, prefix, x, y, angle, opacity) { + if (isNaN(x) || x == null || isNaN(y) || y == null || isNaN(angle) || angle == null) { + return; + } + var self = this; + var arrowShape = edge.pstyle(prefix + '-arrow-shape').value; + if (arrowShape === 'none') { + return; + } + var arrowClearFill = edge.pstyle(prefix + '-arrow-fill').value === 'hollow' ? 'both' : 'filled'; + var arrowFill = edge.pstyle(prefix + '-arrow-fill').value; + var edgeWidth = edge.pstyle('width').pfValue; + var pArrowWidth = edge.pstyle(prefix + '-arrow-width'); + var arrowWidth = pArrowWidth.value === 'match-line' ? edgeWidth : pArrowWidth.pfValue; + if (pArrowWidth.units === '%') arrowWidth *= edgeWidth; + var edgeOpacity = edge.pstyle('opacity').value; + if (opacity === undefined) { + opacity = edgeOpacity; + } + var gco = context.globalCompositeOperation; + if (opacity !== 1 || arrowFill === 'hollow') { + // then extra clear is needed + context.globalCompositeOperation = 'destination-out'; + self.colorFillStyle(context, 255, 255, 255, 1); + self.colorStrokeStyle(context, 255, 255, 255, 1); + self.drawArrowShape(edge, context, arrowClearFill, edgeWidth, arrowShape, arrowWidth, x, y, angle); + context.globalCompositeOperation = gco; + } // otherwise, the opaque arrow clears it for free :) + + var color = edge.pstyle(prefix + '-arrow-color').value; + self.colorFillStyle(context, color[0], color[1], color[2], opacity); + self.colorStrokeStyle(context, color[0], color[1], color[2], opacity); + self.drawArrowShape(edge, context, arrowFill, edgeWidth, arrowShape, arrowWidth, x, y, angle); +}; +CRp$8.drawArrowShape = function (edge, context, fill, edgeWidth, shape, shapeWidth, x, y, angle) { + var r = this; + var usePaths = this.usePaths() && shape !== 'triangle-cross'; + var pathCacheHit = false; + var path; + var canvasContext = context; + var translation = { + x: x, + y: y + }; + var scale = edge.pstyle('arrow-scale').value; + var size = this.getArrowWidth(edgeWidth, scale); + var shapeImpl = r.arrowShapes[shape]; + if (usePaths) { + var cache = r.arrowPathCache = r.arrowPathCache || []; + var key = hashString(shape); + var cachedPath = cache[key]; + if (cachedPath != null) { + path = context = cachedPath; + pathCacheHit = true; + } else { + path = context = new Path2D(); + cache[key] = path; + } + } + if (!pathCacheHit) { + if (context.beginPath) { + context.beginPath(); + } + if (usePaths) { + // store in the path cache with values easily manipulated later + shapeImpl.draw(context, 1, 0, { + x: 0, + y: 0 + }, 1); + } else { + shapeImpl.draw(context, size, angle, translation, edgeWidth); + } + if (context.closePath) { + context.closePath(); + } + } + context = canvasContext; + if (usePaths) { + // set transform to arrow position/orientation + context.translate(x, y); + context.rotate(angle); + context.scale(size, size); + } + if (fill === 'filled' || fill === 'both') { + if (usePaths) { + context.fill(path); + } else { + context.fill(); + } + } + if (fill === 'hollow' || fill === 'both') { + context.lineWidth = shapeWidth / (usePaths ? size : 1); + context.lineJoin = 'miter'; + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + } + if (usePaths) { + // reset transform by applying inverse + context.scale(1 / size, 1 / size); + context.rotate(-angle); + context.translate(-x, -y); + } +}; + +var CRp$7 = {}; +CRp$7.safeDrawImage = function (context, img, ix, iy, iw, ih, x, y, w, h) { + // detect problematic cases for old browsers with bad images (cheaper than try-catch) + if (iw <= 0 || ih <= 0 || w <= 0 || h <= 0) { + return; + } + try { + context.drawImage(img, ix, iy, iw, ih, x, y, w, h); + } catch (e) { + warn(e); + } +}; +CRp$7.drawInscribedImage = function (context, img, node, index, nodeOpacity) { + var r = this; + var pos = node.position(); + var nodeX = pos.x; + var nodeY = pos.y; + var styleObj = node.cy().style(); + var getIndexedStyle = styleObj.getIndexedStyle.bind(styleObj); + var fit = getIndexedStyle(node, 'background-fit', 'value', index); + var repeat = getIndexedStyle(node, 'background-repeat', 'value', index); + var nodeW = node.width(); + var nodeH = node.height(); + var paddingX2 = node.padding() * 2; + var nodeTW = nodeW + (getIndexedStyle(node, 'background-width-relative-to', 'value', index) === 'inner' ? 0 : paddingX2); + var nodeTH = nodeH + (getIndexedStyle(node, 'background-height-relative-to', 'value', index) === 'inner' ? 0 : paddingX2); + var rs = node._private.rscratch; + var clip = getIndexedStyle(node, 'background-clip', 'value', index); + var shouldClip = clip === 'node'; + var imgOpacity = getIndexedStyle(node, 'background-image-opacity', 'value', index) * nodeOpacity; + var smooth = getIndexedStyle(node, 'background-image-smoothing', 'value', index); + var imgW = img.width || img.cachedW; + var imgH = img.height || img.cachedH; + + // workaround for broken browsers like ie + if (null == imgW || null == imgH) { + document.body.appendChild(img); // eslint-disable-line no-undef + + imgW = img.cachedW = img.width || img.offsetWidth; + imgH = img.cachedH = img.height || img.offsetHeight; + document.body.removeChild(img); // eslint-disable-line no-undef + } + + var w = imgW; + var h = imgH; + if (getIndexedStyle(node, 'background-width', 'value', index) !== 'auto') { + if (getIndexedStyle(node, 'background-width', 'units', index) === '%') { + w = getIndexedStyle(node, 'background-width', 'pfValue', index) * nodeTW; + } else { + w = getIndexedStyle(node, 'background-width', 'pfValue', index); + } + } + if (getIndexedStyle(node, 'background-height', 'value', index) !== 'auto') { + if (getIndexedStyle(node, 'background-height', 'units', index) === '%') { + h = getIndexedStyle(node, 'background-height', 'pfValue', index) * nodeTH; + } else { + h = getIndexedStyle(node, 'background-height', 'pfValue', index); + } + } + if (w === 0 || h === 0) { + return; // no point in drawing empty image (and chrome is broken in this case) + } + + if (fit === 'contain') { + var scale = Math.min(nodeTW / w, nodeTH / h); + w *= scale; + h *= scale; + } else if (fit === 'cover') { + var scale = Math.max(nodeTW / w, nodeTH / h); + w *= scale; + h *= scale; + } + var x = nodeX - nodeTW / 2; // left + var posXUnits = getIndexedStyle(node, 'background-position-x', 'units', index); + var posXPfVal = getIndexedStyle(node, 'background-position-x', 'pfValue', index); + if (posXUnits === '%') { + x += (nodeTW - w) * posXPfVal; + } else { + x += posXPfVal; + } + var offXUnits = getIndexedStyle(node, 'background-offset-x', 'units', index); + var offXPfVal = getIndexedStyle(node, 'background-offset-x', 'pfValue', index); + if (offXUnits === '%') { + x += (nodeTW - w) * offXPfVal; + } else { + x += offXPfVal; + } + var y = nodeY - nodeTH / 2; // top + var posYUnits = getIndexedStyle(node, 'background-position-y', 'units', index); + var posYPfVal = getIndexedStyle(node, 'background-position-y', 'pfValue', index); + if (posYUnits === '%') { + y += (nodeTH - h) * posYPfVal; + } else { + y += posYPfVal; + } + var offYUnits = getIndexedStyle(node, 'background-offset-y', 'units', index); + var offYPfVal = getIndexedStyle(node, 'background-offset-y', 'pfValue', index); + if (offYUnits === '%') { + y += (nodeTH - h) * offYPfVal; + } else { + y += offYPfVal; + } + if (rs.pathCache) { + x -= nodeX; + y -= nodeY; + nodeX = 0; + nodeY = 0; + } + var gAlpha = context.globalAlpha; + context.globalAlpha = imgOpacity; + var smoothingEnabled = r.getImgSmoothing(context); + var isSmoothingSwitched = false; + if (smooth === 'no' && smoothingEnabled) { + r.setImgSmoothing(context, false); + isSmoothingSwitched = true; + } else if (smooth === 'yes' && !smoothingEnabled) { + r.setImgSmoothing(context, true); + isSmoothingSwitched = true; + } + if (repeat === 'no-repeat') { + if (shouldClip) { + context.save(); + if (rs.pathCache) { + context.clip(rs.pathCache); + } else { + r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH); + context.clip(); + } + } + r.safeDrawImage(context, img, 0, 0, imgW, imgH, x, y, w, h); + if (shouldClip) { + context.restore(); + } + } else { + var pattern = context.createPattern(img, repeat); + context.fillStyle = pattern; + r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH); + context.translate(x, y); + context.fill(); + context.translate(-x, -y); + } + context.globalAlpha = gAlpha; + if (isSmoothingSwitched) { + r.setImgSmoothing(context, smoothingEnabled); + } +}; + +var CRp$6 = {}; +CRp$6.eleTextBiggerThanMin = function (ele, scale) { + if (!scale) { + var zoom = ele.cy().zoom(); + var pxRatio = this.getPixelRatio(); + var lvl = Math.ceil(log2(zoom * pxRatio)); // the effective texture level + + scale = Math.pow(2, lvl); + } + var computedSize = ele.pstyle('font-size').pfValue * scale; + var minSize = ele.pstyle('min-zoomed-font-size').pfValue; + if (computedSize < minSize) { + return false; + } + return true; +}; +CRp$6.drawElementText = function (context, ele, shiftToOriginWithBb, force, prefix) { + var useEleOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + var r = this; + if (force == null) { + if (useEleOpacity && !r.eleTextBiggerThanMin(ele)) { + return; + } + } else if (force === false) { + return; + } + if (ele.isNode()) { + var label = ele.pstyle('label'); + if (!label || !label.value) { + return; + } + var justification = r.getLabelJustification(ele); + context.textAlign = justification; + context.textBaseline = 'bottom'; + } else { + var badLine = ele.element()._private.rscratch.badLine; + var _label = ele.pstyle('label'); + var srcLabel = ele.pstyle('source-label'); + var tgtLabel = ele.pstyle('target-label'); + if (badLine || (!_label || !_label.value) && (!srcLabel || !srcLabel.value) && (!tgtLabel || !tgtLabel.value)) { + return; + } + context.textAlign = 'center'; + context.textBaseline = 'bottom'; + } + var applyRotation = !shiftToOriginWithBb; + var bb; + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + if (prefix == null) { + r.drawText(context, ele, null, applyRotation, useEleOpacity); + if (ele.isEdge()) { + r.drawText(context, ele, 'source', applyRotation, useEleOpacity); + r.drawText(context, ele, 'target', applyRotation, useEleOpacity); + } + } else { + r.drawText(context, ele, prefix, applyRotation, useEleOpacity); + } + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } +}; +CRp$6.getFontCache = function (context) { + var cache; + this.fontCaches = this.fontCaches || []; + for (var i = 0; i < this.fontCaches.length; i++) { + cache = this.fontCaches[i]; + if (cache.context === context) { + return cache; + } + } + cache = { + context: context + }; + this.fontCaches.push(cache); + return cache; +}; + +// set up canvas context with font +// returns transformed text string +CRp$6.setupTextStyle = function (context, ele) { + var useEleOpacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + // Font style + var labelStyle = ele.pstyle('font-style').strValue; + var labelSize = ele.pstyle('font-size').pfValue + 'px'; + var labelFamily = ele.pstyle('font-family').strValue; + var labelWeight = ele.pstyle('font-weight').strValue; + var opacity = useEleOpacity ? ele.effectiveOpacity() * ele.pstyle('text-opacity').value : 1; + var outlineOpacity = ele.pstyle('text-outline-opacity').value * opacity; + var color = ele.pstyle('color').value; + var outlineColor = ele.pstyle('text-outline-color').value; + context.font = labelStyle + ' ' + labelWeight + ' ' + labelSize + ' ' + labelFamily; + context.lineJoin = 'round'; // so text outlines aren't jagged + + this.colorFillStyle(context, color[0], color[1], color[2], opacity); + this.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], outlineOpacity); +}; + +// TODO ensure re-used +function roundRect(ctx, x, y, width, height) { + var radius = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 5; + var stroke = arguments.length > 6 ? arguments[6] : undefined; + ctx.beginPath(); + ctx.moveTo(x + radius, y); + ctx.lineTo(x + width - radius, y); + ctx.quadraticCurveTo(x + width, y, x + width, y + radius); + ctx.lineTo(x + width, y + height - radius); + ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height); + ctx.lineTo(x + radius, y + height); + ctx.quadraticCurveTo(x, y + height, x, y + height - radius); + ctx.lineTo(x, y + radius); + ctx.quadraticCurveTo(x, y, x + radius, y); + ctx.closePath(); + if (stroke) ctx.stroke();else ctx.fill(); +} +CRp$6.getTextAngle = function (ele, prefix) { + var theta; + var _p = ele._private; + var rscratch = _p.rscratch; + var pdash = prefix ? prefix + '-' : ''; + var rotation = ele.pstyle(pdash + 'text-rotation'); + var textAngle = getPrefixedProperty(rscratch, 'labelAngle', prefix); + if (rotation.strValue === 'autorotate') { + theta = ele.isEdge() ? textAngle : 0; + } else if (rotation.strValue === 'none') { + theta = 0; + } else { + theta = rotation.pfValue; + } + return theta; +}; +CRp$6.drawText = function (context, ele, prefix) { + var applyRotation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var useEleOpacity = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var _p = ele._private; + var rscratch = _p.rscratch; + var parentOpacity = useEleOpacity ? ele.effectiveOpacity() : 1; + if (useEleOpacity && (parentOpacity === 0 || ele.pstyle('text-opacity').value === 0)) { + return; + } + + // use 'main' as an alias for the main label (i.e. null prefix) + if (prefix === 'main') { + prefix = null; + } + var textX = getPrefixedProperty(rscratch, 'labelX', prefix); + var textY = getPrefixedProperty(rscratch, 'labelY', prefix); + var orgTextX, orgTextY; // used for rotation + var text = this.getLabelText(ele, prefix); + if (text != null && text !== '' && !isNaN(textX) && !isNaN(textY)) { + this.setupTextStyle(context, ele, useEleOpacity); + var pdash = prefix ? prefix + '-' : ''; + var textW = getPrefixedProperty(rscratch, 'labelWidth', prefix); + var textH = getPrefixedProperty(rscratch, 'labelHeight', prefix); + var marginX = ele.pstyle(pdash + 'text-margin-x').pfValue; + var marginY = ele.pstyle(pdash + 'text-margin-y').pfValue; + var isEdge = ele.isEdge(); + var halign = ele.pstyle('text-halign').value; + var valign = ele.pstyle('text-valign').value; + if (isEdge) { + halign = 'center'; + valign = 'center'; + } + textX += marginX; + textY += marginY; + var theta; + if (!applyRotation) { + theta = 0; + } else { + theta = this.getTextAngle(ele, prefix); + } + if (theta !== 0) { + orgTextX = textX; + orgTextY = textY; + context.translate(orgTextX, orgTextY); + context.rotate(theta); + textX = 0; + textY = 0; + } + switch (valign) { + case 'top': + break; + case 'center': + textY += textH / 2; + break; + case 'bottom': + textY += textH; + break; + } + var backgroundOpacity = ele.pstyle('text-background-opacity').value; + var borderOpacity = ele.pstyle('text-border-opacity').value; + var textBorderWidth = ele.pstyle('text-border-width').pfValue; + var backgroundPadding = ele.pstyle('text-background-padding').pfValue; + var styleShape = ele.pstyle('text-background-shape').strValue; + var rounded = styleShape.indexOf('round') === 0; + var roundRadius = 2; + if (backgroundOpacity > 0 || textBorderWidth > 0 && borderOpacity > 0) { + var bgX = textX - backgroundPadding; + switch (halign) { + case 'left': + bgX -= textW; + break; + case 'center': + bgX -= textW / 2; + break; + } + var bgY = textY - textH - backgroundPadding; + var bgW = textW + 2 * backgroundPadding; + var bgH = textH + 2 * backgroundPadding; + if (backgroundOpacity > 0) { + var textFill = context.fillStyle; + var textBackgroundColor = ele.pstyle('text-background-color').value; + context.fillStyle = 'rgba(' + textBackgroundColor[0] + ',' + textBackgroundColor[1] + ',' + textBackgroundColor[2] + ',' + backgroundOpacity * parentOpacity + ')'; + if (rounded) { + roundRect(context, bgX, bgY, bgW, bgH, roundRadius); + } else { + context.fillRect(bgX, bgY, bgW, bgH); + } + context.fillStyle = textFill; + } + if (textBorderWidth > 0 && borderOpacity > 0) { + var textStroke = context.strokeStyle; + var textLineWidth = context.lineWidth; + var textBorderColor = ele.pstyle('text-border-color').value; + var textBorderStyle = ele.pstyle('text-border-style').value; + context.strokeStyle = 'rgba(' + textBorderColor[0] + ',' + textBorderColor[1] + ',' + textBorderColor[2] + ',' + borderOpacity * parentOpacity + ')'; + context.lineWidth = textBorderWidth; + if (context.setLineDash) { + // for very outofdate browsers + switch (textBorderStyle) { + case 'dotted': + context.setLineDash([1, 1]); + break; + case 'dashed': + context.setLineDash([4, 2]); + break; + case 'double': + context.lineWidth = textBorderWidth / 4; // 50% reserved for white between the two borders + context.setLineDash([]); + break; + case 'solid': + context.setLineDash([]); + break; + } + } + if (rounded) { + roundRect(context, bgX, bgY, bgW, bgH, roundRadius, 'stroke'); + } else { + context.strokeRect(bgX, bgY, bgW, bgH); + } + if (textBorderStyle === 'double') { + var whiteWidth = textBorderWidth / 2; + if (rounded) { + roundRect(context, bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2, roundRadius, 'stroke'); + } else { + context.strokeRect(bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2); + } + } + if (context.setLineDash) { + // for very outofdate browsers + context.setLineDash([]); + } + context.lineWidth = textLineWidth; + context.strokeStyle = textStroke; + } + } + var lineWidth = 2 * ele.pstyle('text-outline-width').pfValue; // *2 b/c the stroke is drawn centred on the middle + + if (lineWidth > 0) { + context.lineWidth = lineWidth; + } + if (ele.pstyle('text-wrap').value === 'wrap') { + var lines = getPrefixedProperty(rscratch, 'labelWrapCachedLines', prefix); + var lineHeight = getPrefixedProperty(rscratch, 'labelLineHeight', prefix); + var halfTextW = textW / 2; + var justification = this.getLabelJustification(ele); + if (justification === 'auto') ; else if (halign === 'left') { + // auto justification : right + if (justification === 'left') { + textX += -textW; + } else if (justification === 'center') { + textX += -halfTextW; + } // else same as auto + } else if (halign === 'center') { + // auto justfication : center + if (justification === 'left') { + textX += -halfTextW; + } else if (justification === 'right') { + textX += halfTextW; + } // else same as auto + } else if (halign === 'right') { + // auto justification : left + if (justification === 'center') { + textX += halfTextW; + } else if (justification === 'right') { + textX += textW; + } // else same as auto + } + + switch (valign) { + case 'top': + textY -= (lines.length - 1) * lineHeight; + break; + case 'center': + case 'bottom': + textY -= (lines.length - 1) * lineHeight; + break; + } + for (var l = 0; l < lines.length; l++) { + if (lineWidth > 0) { + context.strokeText(lines[l], textX, textY); + } + context.fillText(lines[l], textX, textY); + textY += lineHeight; + } + } else { + if (lineWidth > 0) { + context.strokeText(text, textX, textY); + } + context.fillText(text, textX, textY); + } + if (theta !== 0) { + context.rotate(-theta); + context.translate(-orgTextX, -orgTextY); + } + } +}; + +/* global Path2D */ +var CRp$5 = {}; +CRp$5.drawNode = function (context, node, shiftToOriginWithBb) { + var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + var r = this; + var nodeWidth, nodeHeight; + var _p = node._private; + var rs = _p.rscratch; + var pos = node.position(); + if (!number$1(pos.x) || !number$1(pos.y)) { + return; // can't draw node with undefined position + } + + if (shouldDrawOpacity && !node.visible()) { + return; + } + var eleOpacity = shouldDrawOpacity ? node.effectiveOpacity() : 1; + var usePaths = r.usePaths(); + var path; + var pathCacheHit = false; + var padding = node.padding(); + nodeWidth = node.width() + 2 * padding; + nodeHeight = node.height() + 2 * padding; + + // + // setup shift + + var bb; + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + + // + // load bg image + + var bgImgProp = node.pstyle('background-image'); + var urls = bgImgProp.value; + var urlDefined = new Array(urls.length); + var image = new Array(urls.length); + var numImages = 0; + for (var i = 0; i < urls.length; i++) { + var url = urls[i]; + var defd = urlDefined[i] = url != null && url !== 'none'; + if (defd) { + var bgImgCrossOrigin = node.cy().style().getIndexedStyle(node, 'background-image-crossorigin', 'value', i); + numImages++; + + // get image, and if not loaded then ask to redraw when later loaded + image[i] = r.getCachedImage(url, bgImgCrossOrigin, function () { + _p.backgroundTimestamp = Date.now(); + node.emitAndNotify('background'); + }); + } + } + + // + // setup styles + + var darkness = node.pstyle('background-blacken').value; + var borderWidth = node.pstyle('border-width').pfValue; + var bgOpacity = node.pstyle('background-opacity').value * eleOpacity; + var borderColor = node.pstyle('border-color').value; + var borderStyle = node.pstyle('border-style').value; + var borderOpacity = node.pstyle('border-opacity').value * eleOpacity; + var outlineWidth = node.pstyle('outline-width').pfValue; + var outlineColor = node.pstyle('outline-color').value; + var outlineStyle = node.pstyle('outline-style').value; + var outlineOpacity = node.pstyle('outline-opacity').value * eleOpacity; + var outlineOffset = node.pstyle('outline-offset').value; + context.lineJoin = 'miter'; // so borders are square with the node shape + + var setupShapeColor = function setupShapeColor() { + var bgOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : bgOpacity; + r.eleFillStyle(context, node, bgOpy); + }; + var setupBorderColor = function setupBorderColor() { + var bdrOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : borderOpacity; + r.colorStrokeStyle(context, borderColor[0], borderColor[1], borderColor[2], bdrOpy); + }; + var setupOutlineColor = function setupOutlineColor() { + var otlnOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : outlineOpacity; + r.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], otlnOpy); + }; + + // + // setup shape + + var getPath = function getPath(width, height, shape, points) { + var pathCache = r.nodePathCache = r.nodePathCache || []; + var key = hashStrings(shape === 'polygon' ? shape + ',' + points.join(',') : shape, '' + height, '' + width); + var cachedPath = pathCache[key]; + var path; + var cacheHit = false; + if (cachedPath != null) { + path = cachedPath; + cacheHit = true; + rs.pathCache = path; + } else { + path = new Path2D(); + pathCache[key] = rs.pathCache = path; + } + return { + path: path, + cacheHit: cacheHit + }; + }; + var styleShape = node.pstyle('shape').strValue; + var shapePts = node.pstyle('shape-polygon-points').pfValue; + if (usePaths) { + context.translate(pos.x, pos.y); + var shapePath = getPath(nodeWidth, nodeHeight, styleShape, shapePts); + path = shapePath.path; + pathCacheHit = shapePath.cacheHit; + } + var drawShape = function drawShape() { + if (!pathCacheHit) { + var npos = pos; + if (usePaths) { + npos = { + x: 0, + y: 0 + }; + } + r.nodeShapes[r.getNodeShape(node)].draw(path || context, npos.x, npos.y, nodeWidth, nodeHeight); + } + if (usePaths) { + context.fill(path); + } else { + context.fill(); + } + }; + var drawImages = function drawImages() { + var nodeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity; + var inside = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var prevBging = _p.backgrounding; + var totalCompleted = 0; + for (var _i = 0; _i < image.length; _i++) { + var bgContainment = node.cy().style().getIndexedStyle(node, 'background-image-containment', 'value', _i); + if (inside && bgContainment === 'over' || !inside && bgContainment === 'inside') { + totalCompleted++; + continue; + } + if (urlDefined[_i] && image[_i].complete && !image[_i].error) { + totalCompleted++; + r.drawInscribedImage(context, image[_i], node, _i, nodeOpacity); + } + } + _p.backgrounding = !(totalCompleted === numImages); + if (prevBging !== _p.backgrounding) { + // update style b/c :backgrounding state changed + node.updateStyle(false); + } + }; + var drawPie = function drawPie() { + var redrawShape = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var pieOpacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : eleOpacity; + if (r.hasPie(node)) { + r.drawPie(context, node, pieOpacity); + + // redraw/restore path if steps after pie need it + if (redrawShape) { + if (!usePaths) { + r.nodeShapes[r.getNodeShape(node)].draw(context, pos.x, pos.y, nodeWidth, nodeHeight); + } + } + } + }; + var darken = function darken() { + var darkenOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity; + var opacity = (darkness > 0 ? darkness : -darkness) * darkenOpacity; + var c = darkness > 0 ? 0 : 255; + if (darkness !== 0) { + r.colorFillStyle(context, c, c, c, opacity); + if (usePaths) { + context.fill(path); + } else { + context.fill(); + } + } + }; + var drawBorder = function drawBorder() { + if (borderWidth > 0) { + context.lineWidth = borderWidth; + context.lineCap = 'butt'; + if (context.setLineDash) { + // for very outofdate browsers + switch (borderStyle) { + case 'dotted': + context.setLineDash([1, 1]); + break; + case 'dashed': + context.setLineDash([4, 2]); + break; + case 'solid': + case 'double': + context.setLineDash([]); + break; + } + } + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + if (borderStyle === 'double') { + context.lineWidth = borderWidth / 3; + var gco = context.globalCompositeOperation; + context.globalCompositeOperation = 'destination-out'; + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + context.globalCompositeOperation = gco; + } + + // reset in case we changed the border style + if (context.setLineDash) { + // for very outofdate browsers + context.setLineDash([]); + } + } + }; + var drawOutline = function drawOutline() { + if (outlineWidth > 0) { + context.lineWidth = outlineWidth; + context.lineCap = 'butt'; + if (context.setLineDash) { + // for very outofdate browsers + switch (outlineStyle) { + case 'dotted': + context.setLineDash([1, 1]); + break; + case 'dashed': + context.setLineDash([4, 2]); + break; + case 'solid': + case 'double': + context.setLineDash([]); + break; + } + } + var npos = pos; + if (usePaths) { + npos = { + x: 0, + y: 0 + }; + } + var shape = r.getNodeShape(node); + var scaleX = (nodeWidth + borderWidth + (outlineWidth + outlineOffset)) / nodeWidth; + var scaleY = (nodeHeight + borderWidth + (outlineWidth + outlineOffset)) / nodeHeight; + var sWidth = nodeWidth * scaleX; + var sHeight = nodeHeight * scaleY; + var points = r.nodeShapes[shape].points; + var _path; + if (usePaths) { + var outlinePath = getPath(sWidth, sHeight, shape, points); + _path = outlinePath.path; + } + + // draw the outline path, either by using expanded points or by scaling + // the dimensions, depending on shape + if (shape === "ellipse") { + r.drawEllipsePath(_path || context, npos.x, npos.y, sWidth, sHeight); + } else if (['round-diamond', 'round-heptagon', 'round-hexagon', 'round-octagon', 'round-pentagon', 'round-polygon', 'round-triangle', 'round-tag'].includes(shape)) { + var sMult = 0; + var offsetX = 0; + var offsetY = 0; + if (shape === 'round-diamond') { + sMult = (borderWidth + outlineOffset + outlineWidth) * 1.4; + } else if (shape === 'round-heptagon') { + sMult = (borderWidth + outlineOffset + outlineWidth) * 1.075; + offsetY = -(borderWidth / 2 + outlineOffset + outlineWidth) / 35; + } else if (shape === 'round-hexagon') { + sMult = (borderWidth + outlineOffset + outlineWidth) * 1.12; + } else if (shape === 'round-pentagon') { + sMult = (borderWidth + outlineOffset + outlineWidth) * 1.13; + offsetY = -(borderWidth / 2 + outlineOffset + outlineWidth) / 15; + } else if (shape === 'round-tag') { + sMult = (borderWidth + outlineOffset + outlineWidth) * 1.12; + offsetX = (borderWidth / 2 + outlineWidth + outlineOffset) * .07; + } else if (shape === 'round-triangle') { + sMult = (borderWidth + outlineOffset + outlineWidth) * (Math.PI / 2); + offsetY = -(borderWidth + outlineOffset / 2 + outlineWidth) / Math.PI; + } + if (sMult !== 0) { + scaleX = (nodeWidth + sMult) / nodeWidth; + scaleY = (nodeHeight + sMult) / nodeHeight; + } + r.drawRoundPolygonPath(_path || context, npos.x + offsetX, npos.y + offsetY, nodeWidth * scaleX, nodeHeight * scaleY, points); + } else if (['roundrectangle', 'round-rectangle'].includes(shape)) { + r.drawRoundRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight); + } else if (['cutrectangle', 'cut-rectangle'].includes(shape)) { + r.drawCutRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight); + } else if (['bottomroundrectangle', 'bottom-round-rectangle'].includes(shape)) { + r.drawBottomRoundRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight); + } else if (shape === "barrel") { + r.drawBarrelPath(_path || context, npos.x, npos.y, sWidth, sHeight); + } else if (shape.startsWith("polygon") || ['rhomboid', 'right-rhomboid', 'round-tag', 'tag', 'vee'].includes(shape)) { + var pad = (borderWidth + outlineWidth + outlineOffset) / nodeWidth; + points = joinLines(expandPolygon(points, pad)); + r.drawPolygonPath(_path || context, npos.x, npos.y, nodeWidth, nodeHeight, points); + } else { + var _pad = (borderWidth + outlineWidth + outlineOffset) / nodeWidth; + points = joinLines(expandPolygon(points, -_pad)); + r.drawPolygonPath(_path || context, npos.x, npos.y, nodeWidth, nodeHeight, points); + } + if (usePaths) { + context.stroke(_path); + } else { + context.stroke(); + } + if (outlineStyle === 'double') { + context.lineWidth = borderWidth / 3; + var gco = context.globalCompositeOperation; + context.globalCompositeOperation = 'destination-out'; + if (usePaths) { + context.stroke(_path); + } else { + context.stroke(); + } + context.globalCompositeOperation = gco; + } + + // reset in case we changed the border style + if (context.setLineDash) { + // for very outofdate browsers + context.setLineDash([]); + } + } + }; + var drawOverlay = function drawOverlay() { + if (shouldDrawOverlay) { + r.drawNodeOverlay(context, node, pos, nodeWidth, nodeHeight); + } + }; + var drawUnderlay = function drawUnderlay() { + if (shouldDrawOverlay) { + r.drawNodeUnderlay(context, node, pos, nodeWidth, nodeHeight); + } + }; + var drawText = function drawText() { + r.drawElementText(context, node, null, drawLabel); + }; + var ghost = node.pstyle('ghost').value === 'yes'; + if (ghost) { + var gx = node.pstyle('ghost-offset-x').pfValue; + var gy = node.pstyle('ghost-offset-y').pfValue; + var ghostOpacity = node.pstyle('ghost-opacity').value; + var effGhostOpacity = ghostOpacity * eleOpacity; + context.translate(gx, gy); + setupOutlineColor(); + drawOutline(); + setupShapeColor(ghostOpacity * bgOpacity); + drawShape(); + drawImages(effGhostOpacity, true); + setupBorderColor(ghostOpacity * borderOpacity); + drawBorder(); + drawPie(darkness !== 0 || borderWidth !== 0); + drawImages(effGhostOpacity, false); + darken(effGhostOpacity); + context.translate(-gx, -gy); + } + if (usePaths) { + context.translate(-pos.x, -pos.y); + } + drawUnderlay(); + if (usePaths) { + context.translate(pos.x, pos.y); + } + setupOutlineColor(); + drawOutline(); + setupShapeColor(); + drawShape(); + drawImages(eleOpacity, true); + setupBorderColor(); + drawBorder(); + drawPie(darkness !== 0 || borderWidth !== 0); + drawImages(eleOpacity, false); + darken(); + if (usePaths) { + context.translate(-pos.x, -pos.y); + } + drawText(); + drawOverlay(); + + // + // clean up shift + + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } +}; +var drawNodeOverlayUnderlay = function drawNodeOverlayUnderlay(overlayOrUnderlay) { + if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) { + throw new Error('Invalid state'); + } + return function (context, node, pos, nodeWidth, nodeHeight) { + var r = this; + if (!node.visible()) { + return; + } + var padding = node.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; + var opacity = node.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; + var color = node.pstyle("".concat(overlayOrUnderlay, "-color")).value; + var shape = node.pstyle("".concat(overlayOrUnderlay, "-shape")).value; + if (opacity > 0) { + pos = pos || node.position(); + if (nodeWidth == null || nodeHeight == null) { + var _padding = node.padding(); + nodeWidth = node.width() + 2 * _padding; + nodeHeight = node.height() + 2 * _padding; + } + r.colorFillStyle(context, color[0], color[1], color[2], opacity); + r.nodeShapes[shape].draw(context, pos.x, pos.y, nodeWidth + padding * 2, nodeHeight + padding * 2); + context.fill(); + } + }; +}; +CRp$5.drawNodeOverlay = drawNodeOverlayUnderlay('overlay'); +CRp$5.drawNodeUnderlay = drawNodeOverlayUnderlay('underlay'); + +// does the node have at least one pie piece? +CRp$5.hasPie = function (node) { + node = node[0]; // ensure ele ref + + return node._private.hasPie; +}; +CRp$5.drawPie = function (context, node, nodeOpacity, pos) { + node = node[0]; // ensure ele ref + pos = pos || node.position(); + var cyStyle = node.cy().style(); + var pieSize = node.pstyle('pie-size'); + var x = pos.x; + var y = pos.y; + var nodeW = node.width(); + var nodeH = node.height(); + var radius = Math.min(nodeW, nodeH) / 2; // must fit in node + var lastPercent = 0; // what % to continue drawing pie slices from on [0, 1] + var usePaths = this.usePaths(); + if (usePaths) { + x = 0; + y = 0; + } + if (pieSize.units === '%') { + radius = radius * pieSize.pfValue; + } else if (pieSize.pfValue !== undefined) { + radius = pieSize.pfValue / 2; + } + for (var i = 1; i <= cyStyle.pieBackgroundN; i++) { + // 1..N + var size = node.pstyle('pie-' + i + '-background-size').value; + var color = node.pstyle('pie-' + i + '-background-color').value; + var opacity = node.pstyle('pie-' + i + '-background-opacity').value * nodeOpacity; + var percent = size / 100; // map integer range [0, 100] to [0, 1] + + // percent can't push beyond 1 + if (percent + lastPercent > 1) { + percent = 1 - lastPercent; + } + var angleStart = 1.5 * Math.PI + 2 * Math.PI * lastPercent; // start at 12 o'clock and go clockwise + var angleDelta = 2 * Math.PI * percent; + var angleEnd = angleStart + angleDelta; + + // ignore if + // - zero size + // - we're already beyond the full circle + // - adding the current slice would go beyond the full circle + if (size === 0 || lastPercent >= 1 || lastPercent + percent > 1) { + continue; + } + context.beginPath(); + context.moveTo(x, y); + context.arc(x, y, radius, angleStart, angleEnd); + context.closePath(); + this.colorFillStyle(context, color[0], color[1], color[2], opacity); + context.fill(); + lastPercent += percent; + } +}; + +var CRp$4 = {}; +var motionBlurDelay = 100; + +// var isFirefox = typeof InstallTrigger !== 'undefined'; + +CRp$4.getPixelRatio = function () { + var context = this.data.contexts[0]; + if (this.forcedPixelRatio != null) { + return this.forcedPixelRatio; + } + var backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1; + return (window.devicePixelRatio || 1) / backingStore; // eslint-disable-line no-undef +}; + +CRp$4.paintCache = function (context) { + var caches = this.paintCaches = this.paintCaches || []; + var needToCreateCache = true; + var cache; + for (var i = 0; i < caches.length; i++) { + cache = caches[i]; + if (cache.context === context) { + needToCreateCache = false; + break; + } + } + if (needToCreateCache) { + cache = { + context: context + }; + caches.push(cache); + } + return cache; +}; +CRp$4.createGradientStyleFor = function (context, shapeStyleName, ele, fill, opacity) { + var gradientStyle; + var usePaths = this.usePaths(); + var colors = ele.pstyle(shapeStyleName + '-gradient-stop-colors').value, + positions = ele.pstyle(shapeStyleName + '-gradient-stop-positions').pfValue; + if (fill === 'radial-gradient') { + if (ele.isEdge()) { + var start = ele.sourceEndpoint(), + end = ele.targetEndpoint(), + mid = ele.midpoint(); + var d1 = dist(start, mid); + var d2 = dist(end, mid); + gradientStyle = context.createRadialGradient(mid.x, mid.y, 0, mid.x, mid.y, Math.max(d1, d2)); + } else { + var pos = usePaths ? { + x: 0, + y: 0 + } : ele.position(), + width = ele.paddedWidth(), + height = ele.paddedHeight(); + gradientStyle = context.createRadialGradient(pos.x, pos.y, 0, pos.x, pos.y, Math.max(width, height)); + } + } else { + if (ele.isEdge()) { + var _start = ele.sourceEndpoint(), + _end = ele.targetEndpoint(); + gradientStyle = context.createLinearGradient(_start.x, _start.y, _end.x, _end.y); + } else { + var _pos = usePaths ? { + x: 0, + y: 0 + } : ele.position(), + _width = ele.paddedWidth(), + _height = ele.paddedHeight(), + halfWidth = _width / 2, + halfHeight = _height / 2; + var direction = ele.pstyle('background-gradient-direction').value; + switch (direction) { + case 'to-bottom': + gradientStyle = context.createLinearGradient(_pos.x, _pos.y - halfHeight, _pos.x, _pos.y + halfHeight); + break; + case 'to-top': + gradientStyle = context.createLinearGradient(_pos.x, _pos.y + halfHeight, _pos.x, _pos.y - halfHeight); + break; + case 'to-left': + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y, _pos.x - halfWidth, _pos.y); + break; + case 'to-right': + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y, _pos.x + halfWidth, _pos.y); + break; + case 'to-bottom-right': + case 'to-right-bottom': + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y - halfHeight, _pos.x + halfWidth, _pos.y + halfHeight); + break; + case 'to-top-right': + case 'to-right-top': + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y + halfHeight, _pos.x + halfWidth, _pos.y - halfHeight); + break; + case 'to-bottom-left': + case 'to-left-bottom': + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y - halfHeight, _pos.x - halfWidth, _pos.y + halfHeight); + break; + case 'to-top-left': + case 'to-left-top': + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y + halfHeight, _pos.x - halfWidth, _pos.y - halfHeight); + break; + } + } + } + if (!gradientStyle) return null; // invalid gradient style + + var hasPositions = positions.length === colors.length; + var length = colors.length; + for (var i = 0; i < length; i++) { + gradientStyle.addColorStop(hasPositions ? positions[i] : i / (length - 1), 'rgba(' + colors[i][0] + ',' + colors[i][1] + ',' + colors[i][2] + ',' + opacity + ')'); + } + return gradientStyle; +}; +CRp$4.gradientFillStyle = function (context, ele, fill, opacity) { + var gradientStyle = this.createGradientStyleFor(context, 'background', ele, fill, opacity); + if (!gradientStyle) return null; // error + context.fillStyle = gradientStyle; +}; +CRp$4.colorFillStyle = function (context, r, g, b, a) { + context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + // turn off for now, seems context does its own caching + + // var cache = this.paintCache(context); + + // var fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + + // if( cache.fillStyle !== fillStyle ){ + // context.fillStyle = cache.fillStyle = fillStyle; + // } +}; + +CRp$4.eleFillStyle = function (context, ele, opacity) { + var backgroundFill = ele.pstyle('background-fill').value; + if (backgroundFill === 'linear-gradient' || backgroundFill === 'radial-gradient') { + this.gradientFillStyle(context, ele, backgroundFill, opacity); + } else { + var backgroundColor = ele.pstyle('background-color').value; + this.colorFillStyle(context, backgroundColor[0], backgroundColor[1], backgroundColor[2], opacity); + } +}; +CRp$4.gradientStrokeStyle = function (context, ele, fill, opacity) { + var gradientStyle = this.createGradientStyleFor(context, 'line', ele, fill, opacity); + if (!gradientStyle) return null; // error + context.strokeStyle = gradientStyle; +}; +CRp$4.colorStrokeStyle = function (context, r, g, b, a) { + context.strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + // turn off for now, seems context does its own caching + + // var cache = this.paintCache(context); + + // var strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + + // if( cache.strokeStyle !== strokeStyle ){ + // context.strokeStyle = cache.strokeStyle = strokeStyle; + // } +}; + +CRp$4.eleStrokeStyle = function (context, ele, opacity) { + var lineFill = ele.pstyle('line-fill').value; + if (lineFill === 'linear-gradient' || lineFill === 'radial-gradient') { + this.gradientStrokeStyle(context, ele, lineFill, opacity); + } else { + var lineColor = ele.pstyle('line-color').value; + this.colorStrokeStyle(context, lineColor[0], lineColor[1], lineColor[2], opacity); + } +}; + +// Resize canvas +CRp$4.matchCanvasSize = function (container) { + var r = this; + var data = r.data; + var bb = r.findContainerClientCoords(); + var width = bb[2]; + var height = bb[3]; + var pixelRatio = r.getPixelRatio(); + var mbPxRatio = r.motionBlurPxRatio; + if (container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE] || container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]) { + pixelRatio = mbPxRatio; + } + var canvasWidth = width * pixelRatio; + var canvasHeight = height * pixelRatio; + var canvas; + if (canvasWidth === r.canvasWidth && canvasHeight === r.canvasHeight) { + return; // save cycles if same + } + + r.fontCaches = null; // resizing resets the style + + var canvasContainer = data.canvasContainer; + canvasContainer.style.width = width + 'px'; + canvasContainer.style.height = height + 'px'; + for (var i = 0; i < r.CANVAS_LAYERS; i++) { + canvas = data.canvases[i]; + canvas.width = canvasWidth; + canvas.height = canvasHeight; + canvas.style.width = width + 'px'; + canvas.style.height = height + 'px'; + } + for (var i = 0; i < r.BUFFER_COUNT; i++) { + canvas = data.bufferCanvases[i]; + canvas.width = canvasWidth; + canvas.height = canvasHeight; + canvas.style.width = width + 'px'; + canvas.style.height = height + 'px'; + } + r.textureMult = 1; + if (pixelRatio <= 1) { + canvas = data.bufferCanvases[r.TEXTURE_BUFFER]; + r.textureMult = 2; + canvas.width = canvasWidth * r.textureMult; + canvas.height = canvasHeight * r.textureMult; + } + r.canvasWidth = canvasWidth; + r.canvasHeight = canvasHeight; +}; +CRp$4.renderTo = function (cxt, zoom, pan, pxRatio) { + this.render({ + forcedContext: cxt, + forcedZoom: zoom, + forcedPan: pan, + drawAllLayers: true, + forcedPxRatio: pxRatio + }); +}; +CRp$4.render = function (options) { + options = options || staticEmptyObject(); + var forcedContext = options.forcedContext; + var drawAllLayers = options.drawAllLayers; + var drawOnlyNodeLayer = options.drawOnlyNodeLayer; + var forcedZoom = options.forcedZoom; + var forcedPan = options.forcedPan; + var r = this; + var pixelRatio = options.forcedPxRatio === undefined ? this.getPixelRatio() : options.forcedPxRatio; + var cy = r.cy; + var data = r.data; + var needDraw = data.canvasNeedsRedraw; + var textureDraw = r.textureOnViewport && !forcedContext && (r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming); + var motionBlur = options.motionBlur !== undefined ? options.motionBlur : r.motionBlur; + var mbPxRatio = r.motionBlurPxRatio; + var hasCompoundNodes = cy.hasCompoundNodes(); + var inNodeDragGesture = r.hoverData.draggingEles; + var inBoxSelection = r.hoverData.selecting || r.touchData.selecting ? true : false; + motionBlur = motionBlur && !forcedContext && r.motionBlurEnabled && !inBoxSelection; + var motionBlurFadeEffect = motionBlur; + if (!forcedContext) { + if (r.prevPxRatio !== pixelRatio) { + r.invalidateContainerClientCoordsCache(); + r.matchCanvasSize(r.container); + r.redrawHint('eles', true); + r.redrawHint('drag', true); + } + r.prevPxRatio = pixelRatio; + } + if (!forcedContext && r.motionBlurTimeout) { + clearTimeout(r.motionBlurTimeout); + } + if (motionBlur) { + if (r.mbFrames == null) { + r.mbFrames = 0; + } + r.mbFrames++; + if (r.mbFrames < 3) { + // need several frames before even high quality motionblur + motionBlurFadeEffect = false; + } + + // go to lower quality blurry frames when several m/b frames have been rendered (avoids flashing) + if (r.mbFrames > r.minMbLowQualFrames) { + //r.fullQualityMb = false; + r.motionBlurPxRatio = r.mbPxRBlurry; + } + } + if (r.clearingMotionBlur) { + r.motionBlurPxRatio = 1; + } + + // b/c drawToContext() may be async w.r.t. redraw(), keep track of last texture frame + // because a rogue async texture frame would clear needDraw + if (r.textureDrawLastFrame && !textureDraw) { + needDraw[r.NODE] = true; + needDraw[r.SELECT_BOX] = true; + } + var style = cy.style(); + var zoom = cy.zoom(); + var effectiveZoom = forcedZoom !== undefined ? forcedZoom : zoom; + var pan = cy.pan(); + var effectivePan = { + x: pan.x, + y: pan.y + }; + var vp = { + zoom: zoom, + pan: { + x: pan.x, + y: pan.y + } + }; + var prevVp = r.prevViewport; + var viewportIsDiff = prevVp === undefined || vp.zoom !== prevVp.zoom || vp.pan.x !== prevVp.pan.x || vp.pan.y !== prevVp.pan.y; + + // we want the low quality motionblur only when the viewport is being manipulated etc (where it's not noticed) + if (!viewportIsDiff && !(inNodeDragGesture && !hasCompoundNodes)) { + r.motionBlurPxRatio = 1; + } + if (forcedPan) { + effectivePan = forcedPan; + } + + // apply pixel ratio + + effectiveZoom *= pixelRatio; + effectivePan.x *= pixelRatio; + effectivePan.y *= pixelRatio; + var eles = r.getCachedZSortedEles(); + function mbclear(context, x, y, w, h) { + var gco = context.globalCompositeOperation; + context.globalCompositeOperation = 'destination-out'; + r.colorFillStyle(context, 255, 255, 255, r.motionBlurTransparency); + context.fillRect(x, y, w, h); + context.globalCompositeOperation = gco; + } + function setContextTransform(context, clear) { + var ePan, eZoom, w, h; + if (!r.clearingMotionBlur && (context === data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] || context === data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG])) { + ePan = { + x: pan.x * mbPxRatio, + y: pan.y * mbPxRatio + }; + eZoom = zoom * mbPxRatio; + w = r.canvasWidth * mbPxRatio; + h = r.canvasHeight * mbPxRatio; + } else { + ePan = effectivePan; + eZoom = effectiveZoom; + w = r.canvasWidth; + h = r.canvasHeight; + } + context.setTransform(1, 0, 0, 1, 0, 0); + if (clear === 'motionBlur') { + mbclear(context, 0, 0, w, h); + } else if (!forcedContext && (clear === undefined || clear)) { + context.clearRect(0, 0, w, h); + } + if (!drawAllLayers) { + context.translate(ePan.x, ePan.y); + context.scale(eZoom, eZoom); + } + if (forcedPan) { + context.translate(forcedPan.x, forcedPan.y); + } + if (forcedZoom) { + context.scale(forcedZoom, forcedZoom); + } + } + if (!textureDraw) { + r.textureDrawLastFrame = false; + } + if (textureDraw) { + r.textureDrawLastFrame = true; + if (!r.textureCache) { + r.textureCache = {}; + r.textureCache.bb = cy.mutableElements().boundingBox(); + r.textureCache.texture = r.data.bufferCanvases[r.TEXTURE_BUFFER]; + var cxt = r.data.bufferContexts[r.TEXTURE_BUFFER]; + cxt.setTransform(1, 0, 0, 1, 0, 0); + cxt.clearRect(0, 0, r.canvasWidth * r.textureMult, r.canvasHeight * r.textureMult); + r.render({ + forcedContext: cxt, + drawOnlyNodeLayer: true, + forcedPxRatio: pixelRatio * r.textureMult + }); + var vp = r.textureCache.viewport = { + zoom: cy.zoom(), + pan: cy.pan(), + width: r.canvasWidth, + height: r.canvasHeight + }; + vp.mpan = { + x: (0 - vp.pan.x) / vp.zoom, + y: (0 - vp.pan.y) / vp.zoom + }; + } + needDraw[r.DRAG] = false; + needDraw[r.NODE] = false; + var context = data.contexts[r.NODE]; + var texture = r.textureCache.texture; + var vp = r.textureCache.viewport; + context.setTransform(1, 0, 0, 1, 0, 0); + if (motionBlur) { + mbclear(context, 0, 0, vp.width, vp.height); + } else { + context.clearRect(0, 0, vp.width, vp.height); + } + var outsideBgColor = style.core('outside-texture-bg-color').value; + var outsideBgOpacity = style.core('outside-texture-bg-opacity').value; + r.colorFillStyle(context, outsideBgColor[0], outsideBgColor[1], outsideBgColor[2], outsideBgOpacity); + context.fillRect(0, 0, vp.width, vp.height); + var zoom = cy.zoom(); + setContextTransform(context, false); + context.clearRect(vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); + context.drawImage(texture, vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); + } else if (r.textureOnViewport && !forcedContext) { + // clear the cache since we don't need it + r.textureCache = null; + } + var extent = cy.extent(); + var vpManip = r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming || r.hoverData.draggingEles || r.cy.animated(); + var hideEdges = r.hideEdgesOnViewport && vpManip; + var needMbClear = []; + needMbClear[r.NODE] = !needDraw[r.NODE] && motionBlur && !r.clearedForMotionBlur[r.NODE] || r.clearingMotionBlur; + if (needMbClear[r.NODE]) { + r.clearedForMotionBlur[r.NODE] = true; + } + needMbClear[r.DRAG] = !needDraw[r.DRAG] && motionBlur && !r.clearedForMotionBlur[r.DRAG] || r.clearingMotionBlur; + if (needMbClear[r.DRAG]) { + r.clearedForMotionBlur[r.DRAG] = true; + } + if (needDraw[r.NODE] || drawAllLayers || drawOnlyNodeLayer || needMbClear[r.NODE]) { + var useBuffer = motionBlur && !needMbClear[r.NODE] && mbPxRatio !== 1; + var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] : data.contexts[r.NODE]); + var clear = motionBlur && !useBuffer ? 'motionBlur' : undefined; + setContextTransform(context, clear); + if (hideEdges) { + r.drawCachedNodes(context, eles.nondrag, pixelRatio, extent); + } else { + r.drawLayeredElements(context, eles.nondrag, pixelRatio, extent); + } + if (r.debug) { + r.drawDebugPoints(context, eles.nondrag); + } + if (!drawAllLayers && !motionBlur) { + needDraw[r.NODE] = false; + } + } + if (!drawOnlyNodeLayer && (needDraw[r.DRAG] || drawAllLayers || needMbClear[r.DRAG])) { + var useBuffer = motionBlur && !needMbClear[r.DRAG] && mbPxRatio !== 1; + var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG] : data.contexts[r.DRAG]); + setContextTransform(context, motionBlur && !useBuffer ? 'motionBlur' : undefined); + if (hideEdges) { + r.drawCachedNodes(context, eles.drag, pixelRatio, extent); + } else { + r.drawCachedElements(context, eles.drag, pixelRatio, extent); + } + if (r.debug) { + r.drawDebugPoints(context, eles.drag); + } + if (!drawAllLayers && !motionBlur) { + needDraw[r.DRAG] = false; + } + } + if (r.showFps || !drawOnlyNodeLayer && needDraw[r.SELECT_BOX] && !drawAllLayers) { + var context = forcedContext || data.contexts[r.SELECT_BOX]; + setContextTransform(context); + if (r.selection[4] == 1 && (r.hoverData.selecting || r.touchData.selecting)) { + var zoom = r.cy.zoom(); + var borderWidth = style.core('selection-box-border-width').value / zoom; + context.lineWidth = borderWidth; + context.fillStyle = 'rgba(' + style.core('selection-box-color').value[0] + ',' + style.core('selection-box-color').value[1] + ',' + style.core('selection-box-color').value[2] + ',' + style.core('selection-box-opacity').value + ')'; + context.fillRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); + if (borderWidth > 0) { + context.strokeStyle = 'rgba(' + style.core('selection-box-border-color').value[0] + ',' + style.core('selection-box-border-color').value[1] + ',' + style.core('selection-box-border-color').value[2] + ',' + style.core('selection-box-opacity').value + ')'; + context.strokeRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); + } + } + if (data.bgActivePosistion && !r.hoverData.selecting) { + var zoom = r.cy.zoom(); + var pos = data.bgActivePosistion; + context.fillStyle = 'rgba(' + style.core('active-bg-color').value[0] + ',' + style.core('active-bg-color').value[1] + ',' + style.core('active-bg-color').value[2] + ',' + style.core('active-bg-opacity').value + ')'; + context.beginPath(); + context.arc(pos.x, pos.y, style.core('active-bg-size').pfValue / zoom, 0, 2 * Math.PI); + context.fill(); + } + var timeToRender = r.lastRedrawTime; + if (r.showFps && timeToRender) { + timeToRender = Math.round(timeToRender); + var fps = Math.round(1000 / timeToRender); + context.setTransform(1, 0, 0, 1, 0, 0); + context.fillStyle = 'rgba(255, 0, 0, 0.75)'; + context.strokeStyle = 'rgba(255, 0, 0, 0.75)'; + context.lineWidth = 1; + context.fillText('1 frame = ' + timeToRender + ' ms = ' + fps + ' fps', 0, 20); + var maxFps = 60; + context.strokeRect(0, 30, 250, 20); + context.fillRect(0, 30, 250 * Math.min(fps / maxFps, 1), 20); + } + if (!drawAllLayers) { + needDraw[r.SELECT_BOX] = false; + } + } + + // motionblur: blit rendered blurry frames + if (motionBlur && mbPxRatio !== 1) { + var cxtNode = data.contexts[r.NODE]; + var txtNode = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]; + var cxtDrag = data.contexts[r.DRAG]; + var txtDrag = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]; + var drawMotionBlur = function drawMotionBlur(cxt, txt, needClear) { + cxt.setTransform(1, 0, 0, 1, 0, 0); + if (needClear || !motionBlurFadeEffect) { + cxt.clearRect(0, 0, r.canvasWidth, r.canvasHeight); + } else { + mbclear(cxt, 0, 0, r.canvasWidth, r.canvasHeight); + } + var pxr = mbPxRatio; + cxt.drawImage(txt, + // img + 0, 0, + // sx, sy + r.canvasWidth * pxr, r.canvasHeight * pxr, + // sw, sh + 0, 0, + // x, y + r.canvasWidth, r.canvasHeight // w, h + ); + }; + + if (needDraw[r.NODE] || needMbClear[r.NODE]) { + drawMotionBlur(cxtNode, txtNode, needMbClear[r.NODE]); + needDraw[r.NODE] = false; + } + if (needDraw[r.DRAG] || needMbClear[r.DRAG]) { + drawMotionBlur(cxtDrag, txtDrag, needMbClear[r.DRAG]); + needDraw[r.DRAG] = false; + } + } + r.prevViewport = vp; + if (r.clearingMotionBlur) { + r.clearingMotionBlur = false; + r.motionBlurCleared = true; + r.motionBlur = true; + } + if (motionBlur) { + r.motionBlurTimeout = setTimeout(function () { + r.motionBlurTimeout = null; + r.clearedForMotionBlur[r.NODE] = false; + r.clearedForMotionBlur[r.DRAG] = false; + r.motionBlur = false; + r.clearingMotionBlur = !textureDraw; + r.mbFrames = 0; + needDraw[r.NODE] = true; + needDraw[r.DRAG] = true; + r.redraw(); + }, motionBlurDelay); + } + if (!forcedContext) { + cy.emit('render'); + } +}; + +var CRp$3 = {}; + +// @O Polygon drawing +CRp$3.drawPolygonPath = function (context, x, y, width, height, points) { + var halfW = width / 2; + var halfH = height / 2; + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(x + halfW * points[0], y + halfH * points[1]); + for (var i = 1; i < points.length / 2; i++) { + context.lineTo(x + halfW * points[i * 2], y + halfH * points[i * 2 + 1]); + } + context.closePath(); +}; +CRp$3.drawRoundPolygonPath = function (context, x, y, width, height, points) { + var halfW = width / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width, height); + if (context.beginPath) { + context.beginPath(); + } + for (var _i = 0; _i < points.length / 4; _i++) { + var sourceUv = void 0, + destUv = void 0; + if (_i === 0) { + sourceUv = points.length - 2; + } else { + sourceUv = _i * 4 - 2; + } + destUv = _i * 4 + 2; + var px = x + halfW * points[_i * 4]; + var py = y + halfH * points[_i * 4 + 1]; + var cosTheta = -points[sourceUv] * points[destUv] - points[sourceUv + 1] * points[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * points[sourceUv]; + var cp0y = py - offset * points[sourceUv + 1]; + var cp1x = px + offset * points[destUv]; + var cp1y = py + offset * points[destUv + 1]; + if (_i === 0) { + context.moveTo(cp0x, cp0y); + } else { + context.lineTo(cp0x, cp0y); + } + context.arcTo(px, py, cp1x, cp1y, cornerRadius); + } + context.closePath(); +}; + +// Round rectangle drawing +CRp$3.drawRoundRectanglePath = function (context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerRadius = getRoundRectangleRadius(width, height); + if (context.beginPath) { + context.beginPath(); + } + + // Start at top middle + context.moveTo(x, y - halfHeight); + // Arc from middle top to right side + context.arcTo(x + halfWidth, y - halfHeight, x + halfWidth, y, cornerRadius); + // Arc from right side to bottom + context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); + // Arc from bottom to left side + context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius); + // Arc from left side to topBorder + context.arcTo(x - halfWidth, y - halfHeight, x, y - halfHeight, cornerRadius); + // Join line + context.lineTo(x, y - halfHeight); + context.closePath(); +}; +CRp$3.drawBottomRoundRectanglePath = function (context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerRadius = getRoundRectangleRadius(width, height); + if (context.beginPath) { + context.beginPath(); + } + + // Start at top middle + context.moveTo(x, y - halfHeight); + context.lineTo(x + halfWidth, y - halfHeight); + context.lineTo(x + halfWidth, y); + context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); + context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius); + context.lineTo(x - halfWidth, y - halfHeight); + context.lineTo(x, y - halfHeight); + context.closePath(); +}; +CRp$3.drawCutRectanglePath = function (context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerLength = getCutRectangleCornerLength(); + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(x - halfWidth + cornerLength, y - halfHeight); + context.lineTo(x + halfWidth - cornerLength, y - halfHeight); + context.lineTo(x + halfWidth, y - halfHeight + cornerLength); + context.lineTo(x + halfWidth, y + halfHeight - cornerLength); + context.lineTo(x + halfWidth - cornerLength, y + halfHeight); + context.lineTo(x - halfWidth + cornerLength, y + halfHeight); + context.lineTo(x - halfWidth, y + halfHeight - cornerLength); + context.lineTo(x - halfWidth, y - halfHeight + cornerLength); + context.closePath(); +}; +CRp$3.drawBarrelPath = function (context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var xBegin = x - halfWidth; + var xEnd = x + halfWidth; + var yBegin = y - halfHeight; + var yEnd = y + halfHeight; + var barrelCurveConstants = getBarrelCurveConstants(width, height); + var wOffset = barrelCurveConstants.widthOffset; + var hOffset = barrelCurveConstants.heightOffset; + var ctrlPtXOffset = barrelCurveConstants.ctrlPtOffsetPct * wOffset; + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(xBegin, yBegin + hOffset); + context.lineTo(xBegin, yEnd - hOffset); + context.quadraticCurveTo(xBegin + ctrlPtXOffset, yEnd, xBegin + wOffset, yEnd); + context.lineTo(xEnd - wOffset, yEnd); + context.quadraticCurveTo(xEnd - ctrlPtXOffset, yEnd, xEnd, yEnd - hOffset); + context.lineTo(xEnd, yBegin + hOffset); + context.quadraticCurveTo(xEnd - ctrlPtXOffset, yBegin, xEnd - wOffset, yBegin); + context.lineTo(xBegin + wOffset, yBegin); + context.quadraticCurveTo(xBegin + ctrlPtXOffset, yBegin, xBegin, yBegin + hOffset); + context.closePath(); +}; +var sin0 = Math.sin(0); +var cos0 = Math.cos(0); +var sin = {}; +var cos = {}; +var ellipseStepSize = Math.PI / 40; +for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) { + sin[i] = Math.sin(i); + cos[i] = Math.cos(i); +} +CRp$3.drawEllipsePath = function (context, centerX, centerY, width, height) { + if (context.beginPath) { + context.beginPath(); + } + if (context.ellipse) { + context.ellipse(centerX, centerY, width / 2, height / 2, 0, 0, 2 * Math.PI); + } else { + var xPos, yPos; + var rw = width / 2; + var rh = height / 2; + for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) { + xPos = centerX - rw * sin[i] * sin0 + rw * cos[i] * cos0; + yPos = centerY + rh * cos[i] * sin0 + rh * sin[i] * cos0; + if (i === 0) { + context.moveTo(xPos, yPos); + } else { + context.lineTo(xPos, yPos); + } + } + } + context.closePath(); +}; + +/* global atob, ArrayBuffer, Uint8Array, Blob */ +var CRp$2 = {}; +CRp$2.createBuffer = function (w, h) { + var buffer = document.createElement('canvas'); // eslint-disable-line no-undef + buffer.width = w; + buffer.height = h; + return [buffer, buffer.getContext('2d')]; +}; +CRp$2.bufferCanvasImage = function (options) { + var cy = this.cy; + var eles = cy.mutableElements(); + var bb = eles.boundingBox(); + var ctrRect = this.findContainerClientCoords(); + var width = options.full ? Math.ceil(bb.w) : ctrRect[2]; + var height = options.full ? Math.ceil(bb.h) : ctrRect[3]; + var specdMaxDims = number$1(options.maxWidth) || number$1(options.maxHeight); + var pxRatio = this.getPixelRatio(); + var scale = 1; + if (options.scale !== undefined) { + width *= options.scale; + height *= options.scale; + scale = options.scale; + } else if (specdMaxDims) { + var maxScaleW = Infinity; + var maxScaleH = Infinity; + if (number$1(options.maxWidth)) { + maxScaleW = scale * options.maxWidth / width; + } + if (number$1(options.maxHeight)) { + maxScaleH = scale * options.maxHeight / height; + } + scale = Math.min(maxScaleW, maxScaleH); + width *= scale; + height *= scale; + } + if (!specdMaxDims) { + width *= pxRatio; + height *= pxRatio; + scale *= pxRatio; + } + var buffCanvas = document.createElement('canvas'); // eslint-disable-line no-undef + + buffCanvas.width = width; + buffCanvas.height = height; + buffCanvas.style.width = width + 'px'; + buffCanvas.style.height = height + 'px'; + var buffCxt = buffCanvas.getContext('2d'); + + // Rasterize the layers, but only if container has nonzero size + if (width > 0 && height > 0) { + buffCxt.clearRect(0, 0, width, height); + buffCxt.globalCompositeOperation = 'source-over'; + var zsortedEles = this.getCachedZSortedEles(); + if (options.full) { + // draw the full bounds of the graph + buffCxt.translate(-bb.x1 * scale, -bb.y1 * scale); + buffCxt.scale(scale, scale); + this.drawElements(buffCxt, zsortedEles); + buffCxt.scale(1 / scale, 1 / scale); + buffCxt.translate(bb.x1 * scale, bb.y1 * scale); + } else { + // draw the current view + var pan = cy.pan(); + var translation = { + x: pan.x * scale, + y: pan.y * scale + }; + scale *= cy.zoom(); + buffCxt.translate(translation.x, translation.y); + buffCxt.scale(scale, scale); + this.drawElements(buffCxt, zsortedEles); + buffCxt.scale(1 / scale, 1 / scale); + buffCxt.translate(-translation.x, -translation.y); + } + + // need to fill bg at end like this in order to fill cleared transparent pixels in jpgs + if (options.bg) { + buffCxt.globalCompositeOperation = 'destination-over'; + buffCxt.fillStyle = options.bg; + buffCxt.rect(0, 0, width, height); + buffCxt.fill(); + } + } + return buffCanvas; +}; +function b64ToBlob(b64, mimeType) { + var bytes = atob(b64); + var buff = new ArrayBuffer(bytes.length); + var buffUint8 = new Uint8Array(buff); + for (var i = 0; i < bytes.length; i++) { + buffUint8[i] = bytes.charCodeAt(i); + } + return new Blob([buff], { + type: mimeType + }); +} +function b64UriToB64(b64uri) { + var i = b64uri.indexOf(','); + return b64uri.substr(i + 1); +} +function output(options, canvas, mimeType) { + var getB64Uri = function getB64Uri() { + return canvas.toDataURL(mimeType, options.quality); + }; + switch (options.output) { + case 'blob-promise': + return new Promise$1(function (resolve, reject) { + try { + canvas.toBlob(function (blob) { + if (blob != null) { + resolve(blob); + } else { + reject(new Error('`canvas.toBlob()` sent a null value in its callback')); + } + }, mimeType, options.quality); + } catch (err) { + reject(err); + } + }); + case 'blob': + return b64ToBlob(b64UriToB64(getB64Uri()), mimeType); + case 'base64': + return b64UriToB64(getB64Uri()); + case 'base64uri': + default: + return getB64Uri(); + } +} +CRp$2.png = function (options) { + return output(options, this.bufferCanvasImage(options), 'image/png'); +}; +CRp$2.jpg = function (options) { + return output(options, this.bufferCanvasImage(options), 'image/jpeg'); +}; + +var CRp$1 = {}; +CRp$1.nodeShapeImpl = function (name, context, centerX, centerY, width, height, points) { + switch (name) { + case 'ellipse': + return this.drawEllipsePath(context, centerX, centerY, width, height); + case 'polygon': + return this.drawPolygonPath(context, centerX, centerY, width, height, points); + case 'round-polygon': + return this.drawRoundPolygonPath(context, centerX, centerY, width, height, points); + case 'roundrectangle': + case 'round-rectangle': + return this.drawRoundRectanglePath(context, centerX, centerY, width, height); + case 'cutrectangle': + case 'cut-rectangle': + return this.drawCutRectanglePath(context, centerX, centerY, width, height); + case 'bottomroundrectangle': + case 'bottom-round-rectangle': + return this.drawBottomRoundRectanglePath(context, centerX, centerY, width, height); + case 'barrel': + return this.drawBarrelPath(context, centerX, centerY, width, height); + } +}; + +var CR = CanvasRenderer; +var CRp = CanvasRenderer.prototype; +CRp.CANVAS_LAYERS = 3; +// +CRp.SELECT_BOX = 0; +CRp.DRAG = 1; +CRp.NODE = 2; +CRp.BUFFER_COUNT = 3; +// +CRp.TEXTURE_BUFFER = 0; +CRp.MOTIONBLUR_BUFFER_NODE = 1; +CRp.MOTIONBLUR_BUFFER_DRAG = 2; +function CanvasRenderer(options) { + var r = this; + r.data = { + canvases: new Array(CRp.CANVAS_LAYERS), + contexts: new Array(CRp.CANVAS_LAYERS), + canvasNeedsRedraw: new Array(CRp.CANVAS_LAYERS), + bufferCanvases: new Array(CRp.BUFFER_COUNT), + bufferContexts: new Array(CRp.CANVAS_LAYERS) + }; + var tapHlOffAttr = '-webkit-tap-highlight-color'; + var tapHlOffStyle = 'rgba(0,0,0,0)'; + r.data.canvasContainer = document.createElement('div'); // eslint-disable-line no-undef + var containerStyle = r.data.canvasContainer.style; + r.data.canvasContainer.style[tapHlOffAttr] = tapHlOffStyle; + containerStyle.position = 'relative'; + containerStyle.zIndex = '0'; + containerStyle.overflow = 'hidden'; + var container = options.cy.container(); + container.appendChild(r.data.canvasContainer); + container.style[tapHlOffAttr] = tapHlOffStyle; + var styleMap = { + '-webkit-user-select': 'none', + '-moz-user-select': '-moz-none', + 'user-select': 'none', + '-webkit-tap-highlight-color': 'rgba(0,0,0,0)', + 'outline-style': 'none' + }; + if (ms()) { + styleMap['-ms-touch-action'] = 'none'; + styleMap['touch-action'] = 'none'; + } + for (var i = 0; i < CRp.CANVAS_LAYERS; i++) { + var canvas = r.data.canvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef + r.data.contexts[i] = canvas.getContext('2d'); + Object.keys(styleMap).forEach(function (k) { + canvas.style[k] = styleMap[k]; + }); + canvas.style.position = 'absolute'; + canvas.setAttribute('data-id', 'layer' + i); + canvas.style.zIndex = String(CRp.CANVAS_LAYERS - i); + r.data.canvasContainer.appendChild(canvas); + r.data.canvasNeedsRedraw[i] = false; + } + r.data.topCanvas = r.data.canvases[0]; + r.data.canvases[CRp.NODE].setAttribute('data-id', 'layer' + CRp.NODE + '-node'); + r.data.canvases[CRp.SELECT_BOX].setAttribute('data-id', 'layer' + CRp.SELECT_BOX + '-selectbox'); + r.data.canvases[CRp.DRAG].setAttribute('data-id', 'layer' + CRp.DRAG + '-drag'); + for (var i = 0; i < CRp.BUFFER_COUNT; i++) { + r.data.bufferCanvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef + r.data.bufferContexts[i] = r.data.bufferCanvases[i].getContext('2d'); + r.data.bufferCanvases[i].style.position = 'absolute'; + r.data.bufferCanvases[i].setAttribute('data-id', 'buffer' + i); + r.data.bufferCanvases[i].style.zIndex = String(-i - 1); + r.data.bufferCanvases[i].style.visibility = 'hidden'; + //r.data.canvasContainer.appendChild(r.data.bufferCanvases[i]); + } + + r.pathsEnabled = true; + var emptyBb = makeBoundingBox(); + var getBoxCenter = function getBoxCenter(bb) { + return { + x: (bb.x1 + bb.x2) / 2, + y: (bb.y1 + bb.y2) / 2 + }; + }; + var getCenterOffset = function getCenterOffset(bb) { + return { + x: -bb.w / 2, + y: -bb.h / 2 + }; + }; + var backgroundTimestampHasChanged = function backgroundTimestampHasChanged(ele) { + var _p = ele[0]._private; + var same = _p.oldBackgroundTimestamp === _p.backgroundTimestamp; + return !same; + }; + var getStyleKey = function getStyleKey(ele) { + return ele[0]._private.nodeKey; + }; + var getLabelKey = function getLabelKey(ele) { + return ele[0]._private.labelStyleKey; + }; + var getSourceLabelKey = function getSourceLabelKey(ele) { + return ele[0]._private.sourceLabelStyleKey; + }; + var getTargetLabelKey = function getTargetLabelKey(ele) { + return ele[0]._private.targetLabelStyleKey; + }; + var drawElement = function drawElement(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElement(context, ele, bb, false, false, useEleOpacity); + }; + var drawLabel = function drawLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, 'main', useEleOpacity); + }; + var drawSourceLabel = function drawSourceLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, 'source', useEleOpacity); + }; + var drawTargetLabel = function drawTargetLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, 'target', useEleOpacity); + }; + var getElementBox = function getElementBox(ele) { + ele.boundingBox(); + return ele[0]._private.bodyBounds; + }; + var getLabelBox = function getLabelBox(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.main || emptyBb; + }; + var getSourceLabelBox = function getSourceLabelBox(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.source || emptyBb; + }; + var getTargetLabelBox = function getTargetLabelBox(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.target || emptyBb; + }; + var isLabelVisibleAtScale = function isLabelVisibleAtScale(ele, scaledLabelShown) { + return scaledLabelShown; + }; + var getElementRotationPoint = function getElementRotationPoint(ele) { + return getBoxCenter(getElementBox(ele)); + }; + var addTextMargin = function addTextMargin(prefix, pt, ele) { + var pre = prefix ? prefix + '-' : ''; + return { + x: pt.x + ele.pstyle(pre + 'text-margin-x').pfValue, + y: pt.y + ele.pstyle(pre + 'text-margin-y').pfValue + }; + }; + var getRsPt = function getRsPt(ele, x, y) { + var rs = ele[0]._private.rscratch; + return { + x: rs[x], + y: rs[y] + }; + }; + var getLabelRotationPoint = function getLabelRotationPoint(ele) { + return addTextMargin('', getRsPt(ele, 'labelX', 'labelY'), ele); + }; + var getSourceLabelRotationPoint = function getSourceLabelRotationPoint(ele) { + return addTextMargin('source', getRsPt(ele, 'sourceLabelX', 'sourceLabelY'), ele); + }; + var getTargetLabelRotationPoint = function getTargetLabelRotationPoint(ele) { + return addTextMargin('target', getRsPt(ele, 'targetLabelX', 'targetLabelY'), ele); + }; + var getElementRotationOffset = function getElementRotationOffset(ele) { + return getCenterOffset(getElementBox(ele)); + }; + var getSourceLabelRotationOffset = function getSourceLabelRotationOffset(ele) { + return getCenterOffset(getSourceLabelBox(ele)); + }; + var getTargetLabelRotationOffset = function getTargetLabelRotationOffset(ele) { + return getCenterOffset(getTargetLabelBox(ele)); + }; + var getLabelRotationOffset = function getLabelRotationOffset(ele) { + var bb = getLabelBox(ele); + var p = getCenterOffset(getLabelBox(ele)); + if (ele.isNode()) { + switch (ele.pstyle('text-halign').value) { + case 'left': + p.x = -bb.w; + break; + case 'right': + p.x = 0; + break; + } + switch (ele.pstyle('text-valign').value) { + case 'top': + p.y = -bb.h; + break; + case 'bottom': + p.y = 0; + break; + } + } + return p; + }; + var eleTxrCache = r.data.eleTxrCache = new ElementTextureCache(r, { + getKey: getStyleKey, + doesEleInvalidateKey: backgroundTimestampHasChanged, + drawElement: drawElement, + getBoundingBox: getElementBox, + getRotationPoint: getElementRotationPoint, + getRotationOffset: getElementRotationOffset, + allowEdgeTxrCaching: false, + allowParentTxrCaching: false + }); + var lblTxrCache = r.data.lblTxrCache = new ElementTextureCache(r, { + getKey: getLabelKey, + drawElement: drawLabel, + getBoundingBox: getLabelBox, + getRotationPoint: getLabelRotationPoint, + getRotationOffset: getLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var slbTxrCache = r.data.slbTxrCache = new ElementTextureCache(r, { + getKey: getSourceLabelKey, + drawElement: drawSourceLabel, + getBoundingBox: getSourceLabelBox, + getRotationPoint: getSourceLabelRotationPoint, + getRotationOffset: getSourceLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var tlbTxrCache = r.data.tlbTxrCache = new ElementTextureCache(r, { + getKey: getTargetLabelKey, + drawElement: drawTargetLabel, + getBoundingBox: getTargetLabelBox, + getRotationPoint: getTargetLabelRotationPoint, + getRotationOffset: getTargetLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var lyrTxrCache = r.data.lyrTxrCache = new LayeredTextureCache(r); + r.onUpdateEleCalcs(function invalidateTextureCaches(willDraw, eles) { + // each cache should check for sub-key diff to see that the update affects that cache particularly + eleTxrCache.invalidateElements(eles); + lblTxrCache.invalidateElements(eles); + slbTxrCache.invalidateElements(eles); + tlbTxrCache.invalidateElements(eles); + + // any change invalidates the layers + lyrTxrCache.invalidateElements(eles); + + // update the old bg timestamp so diffs can be done in the ele txr caches + for (var _i = 0; _i < eles.length; _i++) { + var _p = eles[_i]._private; + _p.oldBackgroundTimestamp = _p.backgroundTimestamp; + } + }); + var refineInLayers = function refineInLayers(reqs) { + for (var i = 0; i < reqs.length; i++) { + lyrTxrCache.enqueueElementRefinement(reqs[i].ele); + } + }; + eleTxrCache.onDequeue(refineInLayers); + lblTxrCache.onDequeue(refineInLayers); + slbTxrCache.onDequeue(refineInLayers); + tlbTxrCache.onDequeue(refineInLayers); +} +CRp.redrawHint = function (group, bool) { + var r = this; + switch (group) { + case 'eles': + r.data.canvasNeedsRedraw[CRp.NODE] = bool; + break; + case 'drag': + r.data.canvasNeedsRedraw[CRp.DRAG] = bool; + break; + case 'select': + r.data.canvasNeedsRedraw[CRp.SELECT_BOX] = bool; + break; + } +}; + +// whether to use Path2D caching for drawing +var pathsImpld = typeof Path2D !== 'undefined'; +CRp.path2dEnabled = function (on) { + if (on === undefined) { + return this.pathsEnabled; + } + this.pathsEnabled = on ? true : false; +}; +CRp.usePaths = function () { + return pathsImpld && this.pathsEnabled; +}; +CRp.setImgSmoothing = function (context, bool) { + if (context.imageSmoothingEnabled != null) { + context.imageSmoothingEnabled = bool; + } else { + context.webkitImageSmoothingEnabled = bool; + context.mozImageSmoothingEnabled = bool; + context.msImageSmoothingEnabled = bool; + } +}; +CRp.getImgSmoothing = function (context) { + if (context.imageSmoothingEnabled != null) { + return context.imageSmoothingEnabled; + } else { + return context.webkitImageSmoothingEnabled || context.mozImageSmoothingEnabled || context.msImageSmoothingEnabled; + } +}; +CRp.makeOffscreenCanvas = function (width, height) { + var canvas; + if ((typeof OffscreenCanvas === "undefined" ? "undefined" : _typeof(OffscreenCanvas)) !== ("undefined" )) { + canvas = new OffscreenCanvas(width, height); + } else { + canvas = document.createElement('canvas'); // eslint-disable-line no-undef + canvas.width = width; + canvas.height = height; + } + return canvas; +}; +[CRp$a, CRp$9, CRp$8, CRp$7, CRp$6, CRp$5, CRp$4, CRp$3, CRp$2, CRp$1].forEach(function (props) { + extend(CRp, props); +}); + +var renderer = [{ + name: 'null', + impl: NullRenderer +}, { + name: 'base', + impl: BR +}, { + name: 'canvas', + impl: CR +}]; + +var incExts = [{ + type: 'layout', + extensions: layout +}, { + type: 'renderer', + extensions: renderer +}]; + +// registered extensions to cytoscape, indexed by name +var extensions = {}; + +// registered modules for extensions, indexed by name +var modules = {}; +function setExtension(type, name, registrant) { + var ext = registrant; + var overrideErr = function overrideErr(field) { + warn('Can not register `' + name + '` for `' + type + '` since `' + field + '` already exists in the prototype and can not be overridden'); + }; + if (type === 'core') { + if (Core.prototype[name]) { + return overrideErr(name); + } else { + Core.prototype[name] = registrant; + } + } else if (type === 'collection') { + if (Collection.prototype[name]) { + return overrideErr(name); + } else { + Collection.prototype[name] = registrant; + } + } else if (type === 'layout') { + // fill in missing layout functions in the prototype + + var Layout = function Layout(options) { + this.options = options; + registrant.call(this, options); + + // make sure layout has _private for use w/ std apis like .on() + if (!plainObject(this._private)) { + this._private = {}; + } + this._private.cy = options.cy; + this._private.listeners = []; + this.createEmitter(); + }; + var layoutProto = Layout.prototype = Object.create(registrant.prototype); + var optLayoutFns = []; + for (var i = 0; i < optLayoutFns.length; i++) { + var fnName = optLayoutFns[i]; + layoutProto[fnName] = layoutProto[fnName] || function () { + return this; + }; + } + + // either .start() or .run() is defined, so autogen the other + if (layoutProto.start && !layoutProto.run) { + layoutProto.run = function () { + this.start(); + return this; + }; + } else if (!layoutProto.start && layoutProto.run) { + layoutProto.start = function () { + this.run(); + return this; + }; + } + var regStop = registrant.prototype.stop; + layoutProto.stop = function () { + var opts = this.options; + if (opts && opts.animate) { + var anis = this.animations; + if (anis) { + for (var _i = 0; _i < anis.length; _i++) { + anis[_i].stop(); + } + } + } + if (regStop) { + regStop.call(this); + } else { + this.emit('layoutstop'); + } + return this; + }; + if (!layoutProto.destroy) { + layoutProto.destroy = function () { + return this; + }; + } + layoutProto.cy = function () { + return this._private.cy; + }; + var getCy = function getCy(layout) { + return layout._private.cy; + }; + var emitterOpts = { + addEventFields: function addEventFields(layout, evt) { + evt.layout = layout; + evt.cy = getCy(layout); + evt.target = layout; + }, + bubble: function bubble() { + return true; + }, + parent: function parent(layout) { + return getCy(layout); + } + }; + extend(layoutProto, { + createEmitter: function createEmitter() { + this._private.emitter = new Emitter(emitterOpts, this); + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(evt, cb) { + this.emitter().on(evt, cb); + return this; + }, + one: function one(evt, cb) { + this.emitter().one(evt, cb); + return this; + }, + once: function once(evt, cb) { + this.emitter().one(evt, cb); + return this; + }, + removeListener: function removeListener(evt, cb) { + this.emitter().removeListener(evt, cb); + return this; + }, + removeAllListeners: function removeAllListeners() { + this.emitter().removeAllListeners(); + return this; + }, + emit: function emit(evt, params) { + this.emitter().emit(evt, params); + return this; + } + }); + define.eventAliasesOn(layoutProto); + ext = Layout; // replace with our wrapped layout + } else if (type === 'renderer' && name !== 'null' && name !== 'base') { + // user registered renderers inherit from base + + var BaseRenderer = getExtension('renderer', 'base'); + var bProto = BaseRenderer.prototype; + var RegistrantRenderer = registrant; + var rProto = registrant.prototype; + var Renderer = function Renderer() { + BaseRenderer.apply(this, arguments); + RegistrantRenderer.apply(this, arguments); + }; + var proto = Renderer.prototype; + for (var pName in bProto) { + var pVal = bProto[pName]; + var existsInR = rProto[pName] != null; + if (existsInR) { + return overrideErr(pName); + } + proto[pName] = pVal; // take impl from base + } + + for (var _pName in rProto) { + proto[_pName] = rProto[_pName]; // take impl from registrant + } + + bProto.clientFunctions.forEach(function (name) { + proto[name] = proto[name] || function () { + error('Renderer does not implement `renderer.' + name + '()` on its prototype'); + }; + }); + ext = Renderer; + } else if (type === '__proto__' || type === 'constructor' || type === 'prototype') { + // to avoid potential prototype pollution + return error(type + ' is an illegal type to be registered, possibly lead to prototype pollutions'); + } + return setMap({ + map: extensions, + keys: [type, name], + value: ext + }); +} +function getExtension(type, name) { + return getMap({ + map: extensions, + keys: [type, name] + }); +} +function setModule(type, name, moduleType, moduleName, registrant) { + return setMap({ + map: modules, + keys: [type, name, moduleType, moduleName], + value: registrant + }); +} +function getModule(type, name, moduleType, moduleName) { + return getMap({ + map: modules, + keys: [type, name, moduleType, moduleName] + }); +} +var extension = function extension() { + // e.g. extension('renderer', 'svg') + if (arguments.length === 2) { + return getExtension.apply(null, arguments); + } + + // e.g. extension('renderer', 'svg', { ... }) + else if (arguments.length === 3) { + return setExtension.apply(null, arguments); + } + + // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse') + else if (arguments.length === 4) { + return getModule.apply(null, arguments); + } + + // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse', { ... }) + else if (arguments.length === 5) { + return setModule.apply(null, arguments); + } else { + error('Invalid extension access syntax'); + } +}; + +// allows a core instance to access extensions internally +Core.prototype.extension = extension; + +// included extensions +incExts.forEach(function (group) { + group.extensions.forEach(function (ext) { + setExtension(group.type, ext.name, ext.impl); + }); +}); + +// a dummy stylesheet object that doesn't need a reference to the core +// (useful for init) +var Stylesheet = function Stylesheet() { + if (!(this instanceof Stylesheet)) { + return new Stylesheet(); + } + this.length = 0; +}; +var sheetfn = Stylesheet.prototype; +sheetfn.instanceString = function () { + return 'stylesheet'; +}; + +// just store the selector to be parsed later +sheetfn.selector = function (selector) { + var i = this.length++; + this[i] = { + selector: selector, + properties: [] + }; + return this; // chaining +}; + +// just store the property to be parsed later +sheetfn.css = function (name, value) { + var i = this.length - 1; + if (string(name)) { + this[i].properties.push({ + name: name, + value: value + }); + } else if (plainObject(name)) { + var map = name; + var propNames = Object.keys(map); + for (var j = 0; j < propNames.length; j++) { + var key = propNames[j]; + var mapVal = map[key]; + if (mapVal == null) { + continue; + } + var prop = Style.properties[key] || Style.properties[dash2camel(key)]; + if (prop == null) { + continue; + } + var _name = prop.name; + var _value = mapVal; + this[i].properties.push({ + name: _name, + value: _value + }); + } + } + return this; // chaining +}; + +sheetfn.style = sheetfn.css; + +// generate a real style object from the dummy stylesheet +sheetfn.generateStyle = function (cy) { + var style = new Style(cy); + return this.appendToStyle(style); +}; + +// append a dummy stylesheet object on a real style object +sheetfn.appendToStyle = function (style) { + for (var i = 0; i < this.length; i++) { + var context = this[i]; + var selector = context.selector; + var props = context.properties; + style.selector(selector); // apply selector + + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + style.css(prop.name, prop.value); // apply property + } + } + + return style; +}; + +var version = "3.28.1"; + +var cytoscape = function cytoscape(options) { + // if no options specified, use default + if (options === undefined) { + options = {}; + } + + // create instance + if (plainObject(options)) { + return new Core(options); + } + + // allow for registration of extensions + else if (string(options)) { + return extension.apply(extension, arguments); + } +}; + +// e.g. cytoscape.use( require('cytoscape-foo'), bar ) +cytoscape.use = function (ext) { + var args = Array.prototype.slice.call(arguments, 1); // args to pass to ext + + args.unshift(cytoscape); // cytoscape is first arg to ext + + ext.apply(null, args); + return this; +}; +cytoscape.warnings = function (bool) { + return warnings(bool); +}; + +// replaced by build system +cytoscape.version = version; + +// expose public apis (mostly for extensions) +cytoscape.stylesheet = cytoscape.Stylesheet = Stylesheet; + +module.exports = cytoscape; + + +/***/ }), + +/***/ 5731: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +module.exports = __webpack_require__(4297); + + +/***/ }), + +/***/ 4297: +/***/ (function(module, exports) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Generated by CoffeeScript 1.8.0 +(function() { + var Heap, defaultCmp, floor, heapify, heappop, heappush, heappushpop, heapreplace, insort, min, nlargest, nsmallest, updateItem, _siftdown, _siftup; + + floor = Math.floor, min = Math.min; + + + /* + Default comparison function to be used + */ + + defaultCmp = function(x, y) { + if (x < y) { + return -1; + } + if (x > y) { + return 1; + } + return 0; + }; + + + /* + Insert item x in list a, and keep it sorted assuming a is sorted. + + If x is already in a, insert it to the right of the rightmost x. + + Optional args lo (default 0) and hi (default a.length) bound the slice + of a to be searched. + */ + + insort = function(a, x, lo, hi, cmp) { + var mid; + if (lo == null) { + lo = 0; + } + if (cmp == null) { + cmp = defaultCmp; + } + if (lo < 0) { + throw new Error('lo must be non-negative'); + } + if (hi == null) { + hi = a.length; + } + while (lo < hi) { + mid = floor((lo + hi) / 2); + if (cmp(x, a[mid]) < 0) { + hi = mid; + } else { + lo = mid + 1; + } + } + return ([].splice.apply(a, [lo, lo - lo].concat(x)), x); + }; + + + /* + Push item onto heap, maintaining the heap invariant. + */ + + heappush = function(array, item, cmp) { + if (cmp == null) { + cmp = defaultCmp; + } + array.push(item); + return _siftdown(array, 0, array.length - 1, cmp); + }; + + + /* + Pop the smallest item off the heap, maintaining the heap invariant. + */ + + heappop = function(array, cmp) { + var lastelt, returnitem; + if (cmp == null) { + cmp = defaultCmp; + } + lastelt = array.pop(); + if (array.length) { + returnitem = array[0]; + array[0] = lastelt; + _siftup(array, 0, cmp); + } else { + returnitem = lastelt; + } + return returnitem; + }; + + + /* + Pop and return the current smallest value, and add the new item. + + This is more efficient than heappop() followed by heappush(), and can be + more appropriate when using a fixed size heap. Note that the value + returned may be larger than item! That constrains reasonable use of + this routine unless written as part of a conditional replacement: + if item > array[0] + item = heapreplace(array, item) + */ + + heapreplace = function(array, item, cmp) { + var returnitem; + if (cmp == null) { + cmp = defaultCmp; + } + returnitem = array[0]; + array[0] = item; + _siftup(array, 0, cmp); + return returnitem; + }; + + + /* + Fast version of a heappush followed by a heappop. + */ + + heappushpop = function(array, item, cmp) { + var _ref; + if (cmp == null) { + cmp = defaultCmp; + } + if (array.length && cmp(array[0], item) < 0) { + _ref = [array[0], item], item = _ref[0], array[0] = _ref[1]; + _siftup(array, 0, cmp); + } + return item; + }; + + + /* + Transform list into a heap, in-place, in O(array.length) time. + */ + + heapify = function(array, cmp) { + var i, _i, _j, _len, _ref, _ref1, _results, _results1; + if (cmp == null) { + cmp = defaultCmp; + } + _ref1 = (function() { + _results1 = []; + for (var _j = 0, _ref = floor(array.length / 2); 0 <= _ref ? _j < _ref : _j > _ref; 0 <= _ref ? _j++ : _j--){ _results1.push(_j); } + return _results1; + }).apply(this).reverse(); + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + i = _ref1[_i]; + _results.push(_siftup(array, i, cmp)); + } + return _results; + }; + + + /* + Update the position of the given item in the heap. + This function should be called every time the item is being modified. + */ + + updateItem = function(array, item, cmp) { + var pos; + if (cmp == null) { + cmp = defaultCmp; + } + pos = array.indexOf(item); + if (pos === -1) { + return; + } + _siftdown(array, 0, pos, cmp); + return _siftup(array, pos, cmp); + }; + + + /* + Find the n largest elements in a dataset. + */ + + nlargest = function(array, n, cmp) { + var elem, result, _i, _len, _ref; + if (cmp == null) { + cmp = defaultCmp; + } + result = array.slice(0, n); + if (!result.length) { + return result; + } + heapify(result, cmp); + _ref = array.slice(n); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elem = _ref[_i]; + heappushpop(result, elem, cmp); + } + return result.sort(cmp).reverse(); + }; + + + /* + Find the n smallest elements in a dataset. + */ + + nsmallest = function(array, n, cmp) { + var elem, i, los, result, _i, _j, _len, _ref, _ref1, _results; + if (cmp == null) { + cmp = defaultCmp; + } + if (n * 10 <= array.length) { + result = array.slice(0, n).sort(cmp); + if (!result.length) { + return result; + } + los = result[result.length - 1]; + _ref = array.slice(n); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elem = _ref[_i]; + if (cmp(elem, los) < 0) { + insort(result, elem, 0, null, cmp); + result.pop(); + los = result[result.length - 1]; + } + } + return result; + } + heapify(array, cmp); + _results = []; + for (i = _j = 0, _ref1 = min(n, array.length); 0 <= _ref1 ? _j < _ref1 : _j > _ref1; i = 0 <= _ref1 ? ++_j : --_j) { + _results.push(heappop(array, cmp)); + } + return _results; + }; + + _siftdown = function(array, startpos, pos, cmp) { + var newitem, parent, parentpos; + if (cmp == null) { + cmp = defaultCmp; + } + newitem = array[pos]; + while (pos > startpos) { + parentpos = (pos - 1) >> 1; + parent = array[parentpos]; + if (cmp(newitem, parent) < 0) { + array[pos] = parent; + pos = parentpos; + continue; + } + break; + } + return array[pos] = newitem; + }; + + _siftup = function(array, pos, cmp) { + var childpos, endpos, newitem, rightpos, startpos; + if (cmp == null) { + cmp = defaultCmp; + } + endpos = array.length; + startpos = pos; + newitem = array[pos]; + childpos = 2 * pos + 1; + while (childpos < endpos) { + rightpos = childpos + 1; + if (rightpos < endpos && !(cmp(array[childpos], array[rightpos]) < 0)) { + childpos = rightpos; + } + array[pos] = array[childpos]; + pos = childpos; + childpos = 2 * pos + 1; + } + array[pos] = newitem; + return _siftdown(array, startpos, pos, cmp); + }; + + Heap = (function() { + Heap.push = heappush; + + Heap.pop = heappop; + + Heap.replace = heapreplace; + + Heap.pushpop = heappushpop; + + Heap.heapify = heapify; + + Heap.updateItem = updateItem; + + Heap.nlargest = nlargest; + + Heap.nsmallest = nsmallest; + + function Heap(cmp) { + this.cmp = cmp != null ? cmp : defaultCmp; + this.nodes = []; + } + + Heap.prototype.push = function(x) { + return heappush(this.nodes, x, this.cmp); + }; + + Heap.prototype.pop = function() { + return heappop(this.nodes, this.cmp); + }; + + Heap.prototype.peek = function() { + return this.nodes[0]; + }; + + Heap.prototype.contains = function(x) { + return this.nodes.indexOf(x) !== -1; + }; + + Heap.prototype.replace = function(x) { + return heapreplace(this.nodes, x, this.cmp); + }; + + Heap.prototype.pushpop = function(x) { + return heappushpop(this.nodes, x, this.cmp); + }; + + Heap.prototype.heapify = function() { + return heapify(this.nodes, this.cmp); + }; + + Heap.prototype.updateItem = function(x) { + return updateItem(this.nodes, x, this.cmp); + }; + + Heap.prototype.clear = function() { + return this.nodes = []; + }; + + Heap.prototype.empty = function() { + return this.nodes.length === 0; + }; + + Heap.prototype.size = function() { + return this.nodes.length; + }; + + Heap.prototype.clone = function() { + var heap; + heap = new Heap(); + heap.nodes = this.nodes.slice(0); + return heap; + }; + + Heap.prototype.toArray = function() { + return this.nodes.slice(0); + }; + + Heap.prototype.insert = Heap.prototype.push; + + Heap.prototype.top = Heap.prototype.peek; + + Heap.prototype.front = Heap.prototype.peek; + + Heap.prototype.has = Heap.prototype.contains; + + Heap.prototype.copy = Heap.prototype.clone; + + return Heap; + + })(); + + (function(root, factory) { + if (true) { + return !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} + })(this, function() { + return Heap; + }); + +}).call(this); + + +/***/ }), + +/***/ 3143: +/***/ (function(module) { + +(function webpackUniversalModuleDefinition(root, factory) { + if(true) + module.exports = factory(); + else {} +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __nested_webpack_require_543__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_543__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __nested_webpack_require_543__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __nested_webpack_require_543__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __nested_webpack_require_543__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __nested_webpack_require_543__.d = function(exports, name, getter) { +/******/ if(!__nested_webpack_require_543__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nested_webpack_require_543__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __nested_webpack_require_543__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __nested_webpack_require_543__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __nested_webpack_require_543__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __nested_webpack_require_543__(__nested_webpack_require_543__.s = 26); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function LayoutConstants() {} + +/** + * Layout Quality: 0:draft, 1:default, 2:proof + */ +LayoutConstants.QUALITY = 1; + +/** + * Default parameters + */ +LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false; +LayoutConstants.DEFAULT_INCREMENTAL = false; +LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true; +LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false; +LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50; +LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false; + +// ----------------------------------------------------------------------------- +// Section: General other constants +// ----------------------------------------------------------------------------- +/* + * Margins of a graph to be applied on bouding rectangle of its contents. We + * assume margins on all four sides to be uniform. + */ +LayoutConstants.DEFAULT_GRAPH_MARGIN = 15; + +/* + * Whether to consider labels in node dimensions or not + */ +LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false; + +/* + * Default dimension of a non-compound node. + */ +LayoutConstants.SIMPLE_NODE_SIZE = 40; + +/* + * Default dimension of a non-compound node. + */ +LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2; + +/* + * Empty compound node size. When a compound node is empty, its both + * dimensions should be of this value. + */ +LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40; + +/* + * Minimum length that an edge should take during layout + */ +LayoutConstants.MIN_EDGE_LENGTH = 1; + +/* + * World boundaries that layout operates on + */ +LayoutConstants.WORLD_BOUNDARY = 1000000; + +/* + * World boundaries that random positioning can be performed with + */ +LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000; + +/* + * Coordinates of the world center + */ +LayoutConstants.WORLD_CENTER_X = 1200; +LayoutConstants.WORLD_CENTER_Y = 900; + +module.exports = LayoutConstants; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __nested_webpack_require_4947__) { + +"use strict"; + + +var LGraphObject = __nested_webpack_require_4947__(2); +var IGeometry = __nested_webpack_require_4947__(8); +var IMath = __nested_webpack_require_4947__(9); + +function LEdge(source, target, vEdge) { + LGraphObject.call(this, vEdge); + + this.isOverlapingSourceAndTarget = false; + this.vGraphObject = vEdge; + this.bendpoints = []; + this.source = source; + this.target = target; +} + +LEdge.prototype = Object.create(LGraphObject.prototype); + +for (var prop in LGraphObject) { + LEdge[prop] = LGraphObject[prop]; +} + +LEdge.prototype.getSource = function () { + return this.source; +}; + +LEdge.prototype.getTarget = function () { + return this.target; +}; + +LEdge.prototype.isInterGraph = function () { + return this.isInterGraph; +}; + +LEdge.prototype.getLength = function () { + return this.length; +}; + +LEdge.prototype.isOverlapingSourceAndTarget = function () { + return this.isOverlapingSourceAndTarget; +}; + +LEdge.prototype.getBendpoints = function () { + return this.bendpoints; +}; + +LEdge.prototype.getLca = function () { + return this.lca; +}; + +LEdge.prototype.getSourceInLca = function () { + return this.sourceInLca; +}; + +LEdge.prototype.getTargetInLca = function () { + return this.targetInLca; +}; + +LEdge.prototype.getOtherEnd = function (node) { + if (this.source === node) { + return this.target; + } else if (this.target === node) { + return this.source; + } else { + throw "Node is not incident with this edge"; + } +}; + +LEdge.prototype.getOtherEndInGraph = function (node, graph) { + var otherEnd = this.getOtherEnd(node); + var root = graph.getGraphManager().getRoot(); + + while (true) { + if (otherEnd.getOwner() == graph) { + return otherEnd; + } + + if (otherEnd.getOwner() == root) { + break; + } + + otherEnd = otherEnd.getOwner().getParent(); + } + + return null; +}; + +LEdge.prototype.updateLength = function () { + var clipPointCoordinates = new Array(4); + + this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates); + + if (!this.isOverlapingSourceAndTarget) { + this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2]; + this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3]; + + if (Math.abs(this.lengthX) < 1.0) { + this.lengthX = IMath.sign(this.lengthX); + } + + if (Math.abs(this.lengthY) < 1.0) { + this.lengthY = IMath.sign(this.lengthY); + } + + this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); + } +}; + +LEdge.prototype.updateLengthSimple = function () { + this.lengthX = this.target.getCenterX() - this.source.getCenterX(); + this.lengthY = this.target.getCenterY() - this.source.getCenterY(); + + if (Math.abs(this.lengthX) < 1.0) { + this.lengthX = IMath.sign(this.lengthX); + } + + if (Math.abs(this.lengthY) < 1.0) { + this.lengthY = IMath.sign(this.lengthY); + } + + this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); +}; + +module.exports = LEdge; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function LGraphObject(vGraphObject) { + this.vGraphObject = vGraphObject; +} + +module.exports = LGraphObject; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __nested_webpack_require_8167__) { + +"use strict"; + + +var LGraphObject = __nested_webpack_require_8167__(2); +var Integer = __nested_webpack_require_8167__(10); +var RectangleD = __nested_webpack_require_8167__(13); +var LayoutConstants = __nested_webpack_require_8167__(0); +var RandomSeed = __nested_webpack_require_8167__(16); +var PointD = __nested_webpack_require_8167__(4); + +function LNode(gm, loc, size, vNode) { + //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode) + if (size == null && vNode == null) { + vNode = loc; + } + + LGraphObject.call(this, vNode); + + //Alternative constructor 2 : LNode(Layout layout, Object vNode) + if (gm.graphManager != null) gm = gm.graphManager; + + this.estimatedSize = Integer.MIN_VALUE; + this.inclusionTreeDepth = Integer.MAX_VALUE; + this.vGraphObject = vNode; + this.edges = []; + this.graphManager = gm; + + if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);else this.rect = new RectangleD(); +} + +LNode.prototype = Object.create(LGraphObject.prototype); +for (var prop in LGraphObject) { + LNode[prop] = LGraphObject[prop]; +} + +LNode.prototype.getEdges = function () { + return this.edges; +}; + +LNode.prototype.getChild = function () { + return this.child; +}; + +LNode.prototype.getOwner = function () { + // if (this.owner != null) { + // if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) { + // throw "assert failed"; + // } + // } + + return this.owner; +}; + +LNode.prototype.getWidth = function () { + return this.rect.width; +}; + +LNode.prototype.setWidth = function (width) { + this.rect.width = width; +}; + +LNode.prototype.getHeight = function () { + return this.rect.height; +}; + +LNode.prototype.setHeight = function (height) { + this.rect.height = height; +}; + +LNode.prototype.getCenterX = function () { + return this.rect.x + this.rect.width / 2; +}; + +LNode.prototype.getCenterY = function () { + return this.rect.y + this.rect.height / 2; +}; + +LNode.prototype.getCenter = function () { + return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2); +}; + +LNode.prototype.getLocation = function () { + return new PointD(this.rect.x, this.rect.y); +}; + +LNode.prototype.getRect = function () { + return this.rect; +}; + +LNode.prototype.getDiagonal = function () { + return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height); +}; + +/** + * This method returns half the diagonal length of this node. + */ +LNode.prototype.getHalfTheDiagonal = function () { + return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2; +}; + +LNode.prototype.setRect = function (upperLeft, dimension) { + this.rect.x = upperLeft.x; + this.rect.y = upperLeft.y; + this.rect.width = dimension.width; + this.rect.height = dimension.height; +}; + +LNode.prototype.setCenter = function (cx, cy) { + this.rect.x = cx - this.rect.width / 2; + this.rect.y = cy - this.rect.height / 2; +}; + +LNode.prototype.setLocation = function (x, y) { + this.rect.x = x; + this.rect.y = y; +}; + +LNode.prototype.moveBy = function (dx, dy) { + this.rect.x += dx; + this.rect.y += dy; +}; + +LNode.prototype.getEdgeListToNode = function (to) { + var edgeList = []; + var edge; + var self = this; + + self.edges.forEach(function (edge) { + + if (edge.target == to) { + if (edge.source != self) throw "Incorrect edge source!"; + + edgeList.push(edge); + } + }); + + return edgeList; +}; + +LNode.prototype.getEdgesBetween = function (other) { + var edgeList = []; + var edge; + + var self = this; + self.edges.forEach(function (edge) { + + if (!(edge.source == self || edge.target == self)) throw "Incorrect edge source and/or target"; + + if (edge.target == other || edge.source == other) { + edgeList.push(edge); + } + }); + + return edgeList; +}; + +LNode.prototype.getNeighborsList = function () { + var neighbors = new Set(); + + var self = this; + self.edges.forEach(function (edge) { + + if (edge.source == self) { + neighbors.add(edge.target); + } else { + if (edge.target != self) { + throw "Incorrect incidency!"; + } + + neighbors.add(edge.source); + } + }); + + return neighbors; +}; + +LNode.prototype.withChildren = function () { + var withNeighborsList = new Set(); + var childNode; + var children; + + withNeighborsList.add(this); + + if (this.child != null) { + var nodes = this.child.getNodes(); + for (var i = 0; i < nodes.length; i++) { + childNode = nodes[i]; + children = childNode.withChildren(); + children.forEach(function (node) { + withNeighborsList.add(node); + }); + } + } + + return withNeighborsList; +}; + +LNode.prototype.getNoOfChildren = function () { + var noOfChildren = 0; + var childNode; + + if (this.child == null) { + noOfChildren = 1; + } else { + var nodes = this.child.getNodes(); + for (var i = 0; i < nodes.length; i++) { + childNode = nodes[i]; + + noOfChildren += childNode.getNoOfChildren(); + } + } + + if (noOfChildren == 0) { + noOfChildren = 1; + } + return noOfChildren; +}; + +LNode.prototype.getEstimatedSize = function () { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; +}; + +LNode.prototype.calcEstimatedSize = function () { + if (this.child == null) { + return this.estimatedSize = (this.rect.width + this.rect.height) / 2; + } else { + this.estimatedSize = this.child.calcEstimatedSize(); + this.rect.width = this.estimatedSize; + this.rect.height = this.estimatedSize; + + return this.estimatedSize; + } +}; + +LNode.prototype.scatter = function () { + var randomCenterX; + var randomCenterY; + + var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX; + + var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY; + + this.rect.x = randomCenterX; + this.rect.y = randomCenterY; +}; + +LNode.prototype.updateBounds = function () { + if (this.getChild() == null) { + throw "assert failed"; + } + if (this.getChild().getNodes().length != 0) { + // wrap the children nodes by re-arranging the boundaries + var childGraph = this.getChild(); + childGraph.updateBounds(true); + + this.rect.x = childGraph.getLeft(); + this.rect.y = childGraph.getTop(); + + this.setWidth(childGraph.getRight() - childGraph.getLeft()); + this.setHeight(childGraph.getBottom() - childGraph.getTop()); + + // Update compound bounds considering its label properties + if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) { + + var width = childGraph.getRight() - childGraph.getLeft(); + var height = childGraph.getBottom() - childGraph.getTop(); + + if (this.labelWidth > width) { + this.rect.x -= (this.labelWidth - width) / 2; + this.setWidth(this.labelWidth); + } + + if (this.labelHeight > height) { + if (this.labelPos == "center") { + this.rect.y -= (this.labelHeight - height) / 2; + } else if (this.labelPos == "top") { + this.rect.y -= this.labelHeight - height; + } + this.setHeight(this.labelHeight); + } + } + } +}; + +LNode.prototype.getInclusionTreeDepth = function () { + if (this.inclusionTreeDepth == Integer.MAX_VALUE) { + throw "assert failed"; + } + return this.inclusionTreeDepth; +}; + +LNode.prototype.transform = function (trans) { + var left = this.rect.x; + + if (left > LayoutConstants.WORLD_BOUNDARY) { + left = LayoutConstants.WORLD_BOUNDARY; + } else if (left < -LayoutConstants.WORLD_BOUNDARY) { + left = -LayoutConstants.WORLD_BOUNDARY; + } + + var top = this.rect.y; + + if (top > LayoutConstants.WORLD_BOUNDARY) { + top = LayoutConstants.WORLD_BOUNDARY; + } else if (top < -LayoutConstants.WORLD_BOUNDARY) { + top = -LayoutConstants.WORLD_BOUNDARY; + } + + var leftTop = new PointD(left, top); + var vLeftTop = trans.inverseTransformPoint(leftTop); + + this.setLocation(vLeftTop.x, vLeftTop.y); +}; + +LNode.prototype.getLeft = function () { + return this.rect.x; +}; + +LNode.prototype.getRight = function () { + return this.rect.x + this.rect.width; +}; + +LNode.prototype.getTop = function () { + return this.rect.y; +}; + +LNode.prototype.getBottom = function () { + return this.rect.y + this.rect.height; +}; + +LNode.prototype.getParent = function () { + if (this.owner == null) { + return null; + } + + return this.owner.getParent(); +}; + +module.exports = LNode; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function PointD(x, y) { + if (x == null && y == null) { + this.x = 0; + this.y = 0; + } else { + this.x = x; + this.y = y; + } +} + +PointD.prototype.getX = function () { + return this.x; +}; + +PointD.prototype.getY = function () { + return this.y; +}; + +PointD.prototype.setX = function (x) { + this.x = x; +}; + +PointD.prototype.setY = function (y) { + this.y = y; +}; + +PointD.prototype.getDifference = function (pt) { + return new DimensionD(this.x - pt.x, this.y - pt.y); +}; + +PointD.prototype.getCopy = function () { + return new PointD(this.x, this.y); +}; + +PointD.prototype.translate = function (dim) { + this.x += dim.width; + this.y += dim.height; + return this; +}; + +module.exports = PointD; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __nested_webpack_require_17549__) { + +"use strict"; + + +var LGraphObject = __nested_webpack_require_17549__(2); +var Integer = __nested_webpack_require_17549__(10); +var LayoutConstants = __nested_webpack_require_17549__(0); +var LGraphManager = __nested_webpack_require_17549__(6); +var LNode = __nested_webpack_require_17549__(3); +var LEdge = __nested_webpack_require_17549__(1); +var RectangleD = __nested_webpack_require_17549__(13); +var Point = __nested_webpack_require_17549__(12); +var LinkedList = __nested_webpack_require_17549__(11); + +function LGraph(parent, obj2, vGraph) { + LGraphObject.call(this, vGraph); + this.estimatedSize = Integer.MIN_VALUE; + this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN; + this.edges = []; + this.nodes = []; + this.isConnected = false; + this.parent = parent; + + if (obj2 != null && obj2 instanceof LGraphManager) { + this.graphManager = obj2; + } else if (obj2 != null && obj2 instanceof Layout) { + this.graphManager = obj2.graphManager; + } +} + +LGraph.prototype = Object.create(LGraphObject.prototype); +for (var prop in LGraphObject) { + LGraph[prop] = LGraphObject[prop]; +} + +LGraph.prototype.getNodes = function () { + return this.nodes; +}; + +LGraph.prototype.getEdges = function () { + return this.edges; +}; + +LGraph.prototype.getGraphManager = function () { + return this.graphManager; +}; + +LGraph.prototype.getParent = function () { + return this.parent; +}; + +LGraph.prototype.getLeft = function () { + return this.left; +}; + +LGraph.prototype.getRight = function () { + return this.right; +}; + +LGraph.prototype.getTop = function () { + return this.top; +}; + +LGraph.prototype.getBottom = function () { + return this.bottom; +}; + +LGraph.prototype.isConnected = function () { + return this.isConnected; +}; + +LGraph.prototype.add = function (obj1, sourceNode, targetNode) { + if (sourceNode == null && targetNode == null) { + var newNode = obj1; + if (this.graphManager == null) { + throw "Graph has no graph mgr!"; + } + if (this.getNodes().indexOf(newNode) > -1) { + throw "Node already in graph!"; + } + newNode.owner = this; + this.getNodes().push(newNode); + + return newNode; + } else { + var newEdge = obj1; + if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) { + throw "Source or target not in graph!"; + } + + if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) { + throw "Both owners must be this graph!"; + } + + if (sourceNode.owner != targetNode.owner) { + return null; + } + + // set source and target + newEdge.source = sourceNode; + newEdge.target = targetNode; + + // set as intra-graph edge + newEdge.isInterGraph = false; + + // add to graph edge list + this.getEdges().push(newEdge); + + // add to incidency lists + sourceNode.edges.push(newEdge); + + if (targetNode != sourceNode) { + targetNode.edges.push(newEdge); + } + + return newEdge; + } +}; + +LGraph.prototype.remove = function (obj) { + var node = obj; + if (obj instanceof LNode) { + if (node == null) { + throw "Node is null!"; + } + if (!(node.owner != null && node.owner == this)) { + throw "Owner graph is invalid!"; + } + if (this.graphManager == null) { + throw "Owner graph manager is invalid!"; + } + // remove incident edges first (make a copy to do it safely) + var edgesToBeRemoved = node.edges.slice(); + var edge; + var s = edgesToBeRemoved.length; + for (var i = 0; i < s; i++) { + edge = edgesToBeRemoved[i]; + + if (edge.isInterGraph) { + this.graphManager.remove(edge); + } else { + edge.source.owner.remove(edge); + } + } + + // now the node itself + var index = this.nodes.indexOf(node); + if (index == -1) { + throw "Node not in owner node list!"; + } + + this.nodes.splice(index, 1); + } else if (obj instanceof LEdge) { + var edge = obj; + if (edge == null) { + throw "Edge is null!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) { + throw "Source and/or target owner is invalid!"; + } + + var sourceIndex = edge.source.edges.indexOf(edge); + var targetIndex = edge.target.edges.indexOf(edge); + if (!(sourceIndex > -1 && targetIndex > -1)) { + throw "Source and/or target doesn't know this edge!"; + } + + edge.source.edges.splice(sourceIndex, 1); + + if (edge.target != edge.source) { + edge.target.edges.splice(targetIndex, 1); + } + + var index = edge.source.owner.getEdges().indexOf(edge); + if (index == -1) { + throw "Not in owner's edge list!"; + } + + edge.source.owner.getEdges().splice(index, 1); + } +}; + +LGraph.prototype.updateLeftTop = function () { + var top = Integer.MAX_VALUE; + var left = Integer.MAX_VALUE; + var nodeTop; + var nodeLeft; + var margin; + + var nodes = this.getNodes(); + var s = nodes.length; + + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + nodeTop = lNode.getTop(); + nodeLeft = lNode.getLeft(); + + if (top > nodeTop) { + top = nodeTop; + } + + if (left > nodeLeft) { + left = nodeLeft; + } + } + + // Do we have any nodes in this graph? + if (top == Integer.MAX_VALUE) { + return null; + } + + if (nodes[0].getParent().paddingLeft != undefined) { + margin = nodes[0].getParent().paddingLeft; + } else { + margin = this.margin; + } + + this.left = left - margin; + this.top = top - margin; + + // Apply the margins and return the result + return new Point(this.left, this.top); +}; + +LGraph.prototype.updateBounds = function (recursive) { + // calculate bounds + var left = Integer.MAX_VALUE; + var right = -Integer.MAX_VALUE; + var top = Integer.MAX_VALUE; + var bottom = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + var margin; + + var nodes = this.nodes; + var s = nodes.length; + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + + if (recursive && lNode.child != null) { + lNode.updateBounds(); + } + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + + if (left > nodeLeft) { + left = nodeLeft; + } + + if (right < nodeRight) { + right = nodeRight; + } + + if (top > nodeTop) { + top = nodeTop; + } + + if (bottom < nodeBottom) { + bottom = nodeBottom; + } + } + + var boundingRect = new RectangleD(left, top, right - left, bottom - top); + if (left == Integer.MAX_VALUE) { + this.left = this.parent.getLeft(); + this.right = this.parent.getRight(); + this.top = this.parent.getTop(); + this.bottom = this.parent.getBottom(); + } + + if (nodes[0].getParent().paddingLeft != undefined) { + margin = nodes[0].getParent().paddingLeft; + } else { + margin = this.margin; + } + + this.left = boundingRect.x - margin; + this.right = boundingRect.x + boundingRect.width + margin; + this.top = boundingRect.y - margin; + this.bottom = boundingRect.y + boundingRect.height + margin; +}; + +LGraph.calculateBounds = function (nodes) { + var left = Integer.MAX_VALUE; + var right = -Integer.MAX_VALUE; + var top = Integer.MAX_VALUE; + var bottom = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + + var s = nodes.length; + + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + + if (left > nodeLeft) { + left = nodeLeft; + } + + if (right < nodeRight) { + right = nodeRight; + } + + if (top > nodeTop) { + top = nodeTop; + } + + if (bottom < nodeBottom) { + bottom = nodeBottom; + } + } + + var boundingRect = new RectangleD(left, top, right - left, bottom - top); + + return boundingRect; +}; + +LGraph.prototype.getInclusionTreeDepth = function () { + if (this == this.graphManager.getRoot()) { + return 1; + } else { + return this.parent.getInclusionTreeDepth(); + } +}; + +LGraph.prototype.getEstimatedSize = function () { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; +}; + +LGraph.prototype.calcEstimatedSize = function () { + var size = 0; + var nodes = this.nodes; + var s = nodes.length; + + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + size += lNode.calcEstimatedSize(); + } + + if (size == 0) { + this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE; + } else { + this.estimatedSize = size / Math.sqrt(this.nodes.length); + } + + return this.estimatedSize; +}; + +LGraph.prototype.updateConnected = function () { + var self = this; + if (this.nodes.length == 0) { + this.isConnected = true; + return; + } + + var queue = new LinkedList(); + var visited = new Set(); + var currentNode = this.nodes[0]; + var neighborEdges; + var currentNeighbor; + var childrenOfNode = currentNode.withChildren(); + childrenOfNode.forEach(function (node) { + queue.push(node); + visited.add(node); + }); + + while (queue.length !== 0) { + currentNode = queue.shift(); + + // Traverse all neighbors of this node + neighborEdges = currentNode.getEdges(); + var size = neighborEdges.length; + for (var i = 0; i < size; i++) { + var neighborEdge = neighborEdges[i]; + currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this); + + // Add unvisited neighbors to the list to visit + if (currentNeighbor != null && !visited.has(currentNeighbor)) { + var childrenOfNeighbor = currentNeighbor.withChildren(); + + childrenOfNeighbor.forEach(function (node) { + queue.push(node); + visited.add(node); + }); + } + } + } + + this.isConnected = false; + + if (visited.size >= this.nodes.length) { + var noOfVisitedInThisGraph = 0; + + visited.forEach(function (visitedNode) { + if (visitedNode.owner == self) { + noOfVisitedInThisGraph++; + } + }); + + if (noOfVisitedInThisGraph == this.nodes.length) { + this.isConnected = true; + } + } +}; + +module.exports = LGraph; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __nested_webpack_require_27617__) { + +"use strict"; + + +var LGraph; +var LEdge = __nested_webpack_require_27617__(1); + +function LGraphManager(layout) { + LGraph = __nested_webpack_require_27617__(5); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now. + this.layout = layout; + + this.graphs = []; + this.edges = []; +} + +LGraphManager.prototype.addRoot = function () { + var ngraph = this.layout.newGraph(); + var nnode = this.layout.newNode(null); + var root = this.add(ngraph, nnode); + this.setRootGraph(root); + return this.rootGraph; +}; + +LGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode) { + //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge + if (newEdge == null && sourceNode == null && targetNode == null) { + if (newGraph == null) { + throw "Graph is null!"; + } + if (parentNode == null) { + throw "Parent node is null!"; + } + if (this.graphs.indexOf(newGraph) > -1) { + throw "Graph already in this graph mgr!"; + } + + this.graphs.push(newGraph); + + if (newGraph.parent != null) { + throw "Already has a parent!"; + } + if (parentNode.child != null) { + throw "Already has a child!"; + } + + newGraph.parent = parentNode; + parentNode.child = newGraph; + + return newGraph; + } else { + //change the order of the parameters + targetNode = newEdge; + sourceNode = parentNode; + newEdge = newGraph; + var sourceGraph = sourceNode.getOwner(); + var targetGraph = targetNode.getOwner(); + + if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) { + throw "Source not in this graph mgr!"; + } + if (!(targetGraph != null && targetGraph.getGraphManager() == this)) { + throw "Target not in this graph mgr!"; + } + + if (sourceGraph == targetGraph) { + newEdge.isInterGraph = false; + return sourceGraph.add(newEdge, sourceNode, targetNode); + } else { + newEdge.isInterGraph = true; + + // set source and target + newEdge.source = sourceNode; + newEdge.target = targetNode; + + // add edge to inter-graph edge list + if (this.edges.indexOf(newEdge) > -1) { + throw "Edge already in inter-graph edge list!"; + } + + this.edges.push(newEdge); + + // add edge to source and target incidency lists + if (!(newEdge.source != null && newEdge.target != null)) { + throw "Edge source and/or target is null!"; + } + + if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) { + throw "Edge already in source and/or target incidency list!"; + } + + newEdge.source.edges.push(newEdge); + newEdge.target.edges.push(newEdge); + + return newEdge; + } + } +}; + +LGraphManager.prototype.remove = function (lObj) { + if (lObj instanceof LGraph) { + var graph = lObj; + if (graph.getGraphManager() != this) { + throw "Graph not in this graph mgr"; + } + if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) { + throw "Invalid parent node!"; + } + + // first the edges (make a copy to do it safely) + var edgesToBeRemoved = []; + + edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges()); + + var edge; + var s = edgesToBeRemoved.length; + for (var i = 0; i < s; i++) { + edge = edgesToBeRemoved[i]; + graph.remove(edge); + } + + // then the nodes (make a copy to do it safely) + var nodesToBeRemoved = []; + + nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes()); + + var node; + s = nodesToBeRemoved.length; + for (var i = 0; i < s; i++) { + node = nodesToBeRemoved[i]; + graph.remove(node); + } + + // check if graph is the root + if (graph == this.rootGraph) { + this.setRootGraph(null); + } + + // now remove the graph itself + var index = this.graphs.indexOf(graph); + this.graphs.splice(index, 1); + + // also reset the parent of the graph + graph.parent = null; + } else if (lObj instanceof LEdge) { + edge = lObj; + if (edge == null) { + throw "Edge is null!"; + } + if (!edge.isInterGraph) { + throw "Not an inter-graph edge!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + + // remove edge from source and target nodes' incidency lists + + if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) { + throw "Source and/or target doesn't know this edge!"; + } + + var index = edge.source.edges.indexOf(edge); + edge.source.edges.splice(index, 1); + index = edge.target.edges.indexOf(edge); + edge.target.edges.splice(index, 1); + + // remove edge from owner graph manager's inter-graph edge list + + if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) { + throw "Edge owner graph or owner graph manager is null!"; + } + if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) { + throw "Not in owner graph manager's edge list!"; + } + + var index = edge.source.owner.getGraphManager().edges.indexOf(edge); + edge.source.owner.getGraphManager().edges.splice(index, 1); + } +}; + +LGraphManager.prototype.updateBounds = function () { + this.rootGraph.updateBounds(true); +}; + +LGraphManager.prototype.getGraphs = function () { + return this.graphs; +}; + +LGraphManager.prototype.getAllNodes = function () { + if (this.allNodes == null) { + var nodeList = []; + var graphs = this.getGraphs(); + var s = graphs.length; + for (var i = 0; i < s; i++) { + nodeList = nodeList.concat(graphs[i].getNodes()); + } + this.allNodes = nodeList; + } + return this.allNodes; +}; + +LGraphManager.prototype.resetAllNodes = function () { + this.allNodes = null; +}; + +LGraphManager.prototype.resetAllEdges = function () { + this.allEdges = null; +}; + +LGraphManager.prototype.resetAllNodesToApplyGravitation = function () { + this.allNodesToApplyGravitation = null; +}; + +LGraphManager.prototype.getAllEdges = function () { + if (this.allEdges == null) { + var edgeList = []; + var graphs = this.getGraphs(); + var s = graphs.length; + for (var i = 0; i < graphs.length; i++) { + edgeList = edgeList.concat(graphs[i].getEdges()); + } + + edgeList = edgeList.concat(this.edges); + + this.allEdges = edgeList; + } + return this.allEdges; +}; + +LGraphManager.prototype.getAllNodesToApplyGravitation = function () { + return this.allNodesToApplyGravitation; +}; + +LGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList) { + if (this.allNodesToApplyGravitation != null) { + throw "assert failed"; + } + + this.allNodesToApplyGravitation = nodeList; +}; + +LGraphManager.prototype.getRoot = function () { + return this.rootGraph; +}; + +LGraphManager.prototype.setRootGraph = function (graph) { + if (graph.getGraphManager() != this) { + throw "Root not in this graph mgr!"; + } + + this.rootGraph = graph; + // root graph must have a root node associated with it for convenience + if (graph.parent == null) { + graph.parent = this.layout.newNode("Root node"); + } +}; + +LGraphManager.prototype.getLayout = function () { + return this.layout; +}; + +LGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode) { + if (!(firstNode != null && secondNode != null)) { + throw "assert failed"; + } + + if (firstNode == secondNode) { + return true; + } + // Is second node an ancestor of the first one? + var ownerGraph = firstNode.getOwner(); + var parentNode; + + do { + parentNode = ownerGraph.getParent(); + + if (parentNode == null) { + break; + } + + if (parentNode == secondNode) { + return true; + } + + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) { + break; + } + } while (true); + // Is first node an ancestor of the second one? + ownerGraph = secondNode.getOwner(); + + do { + parentNode = ownerGraph.getParent(); + + if (parentNode == null) { + break; + } + + if (parentNode == firstNode) { + return true; + } + + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) { + break; + } + } while (true); + + return false; +}; + +LGraphManager.prototype.calcLowestCommonAncestors = function () { + var edge; + var sourceNode; + var targetNode; + var sourceAncestorGraph; + var targetAncestorGraph; + + var edges = this.getAllEdges(); + var s = edges.length; + for (var i = 0; i < s; i++) { + edge = edges[i]; + + sourceNode = edge.source; + targetNode = edge.target; + edge.lca = null; + edge.sourceInLca = sourceNode; + edge.targetInLca = targetNode; + + if (sourceNode == targetNode) { + edge.lca = sourceNode.getOwner(); + continue; + } + + sourceAncestorGraph = sourceNode.getOwner(); + + while (edge.lca == null) { + edge.targetInLca = targetNode; + targetAncestorGraph = targetNode.getOwner(); + + while (edge.lca == null) { + if (targetAncestorGraph == sourceAncestorGraph) { + edge.lca = targetAncestorGraph; + break; + } + + if (targetAncestorGraph == this.rootGraph) { + break; + } + + if (edge.lca != null) { + throw "assert failed"; + } + edge.targetInLca = targetAncestorGraph.getParent(); + targetAncestorGraph = edge.targetInLca.getOwner(); + } + + if (sourceAncestorGraph == this.rootGraph) { + break; + } + + if (edge.lca == null) { + edge.sourceInLca = sourceAncestorGraph.getParent(); + sourceAncestorGraph = edge.sourceInLca.getOwner(); + } + } + + if (edge.lca == null) { + throw "assert failed"; + } + } +}; + +LGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode) { + if (firstNode == secondNode) { + return firstNode.getOwner(); + } + var firstOwnerGraph = firstNode.getOwner(); + + do { + if (firstOwnerGraph == null) { + break; + } + var secondOwnerGraph = secondNode.getOwner(); + + do { + if (secondOwnerGraph == null) { + break; + } + + if (secondOwnerGraph == firstOwnerGraph) { + return secondOwnerGraph; + } + secondOwnerGraph = secondOwnerGraph.getParent().getOwner(); + } while (true); + + firstOwnerGraph = firstOwnerGraph.getParent().getOwner(); + } while (true); + + return firstOwnerGraph; +}; + +LGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) { + if (graph == null && depth == null) { + graph = this.rootGraph; + depth = 1; + } + var node; + + var nodes = graph.getNodes(); + var s = nodes.length; + for (var i = 0; i < s; i++) { + node = nodes[i]; + node.inclusionTreeDepth = depth; + + if (node.child != null) { + this.calcInclusionTreeDepths(node.child, depth + 1); + } + } +}; + +LGraphManager.prototype.includesInvalidEdge = function () { + var edge; + + var s = this.edges.length; + for (var i = 0; i < s; i++) { + edge = this.edges[i]; + + if (this.isOneAncestorOfOther(edge.source, edge.target)) { + return true; + } + } + return false; +}; + +module.exports = LGraphManager; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __nested_webpack_require_38707__) { + +"use strict"; + + +var LayoutConstants = __nested_webpack_require_38707__(0); + +function FDLayoutConstants() {} + +//FDLayoutConstants inherits static props in LayoutConstants +for (var prop in LayoutConstants) { + FDLayoutConstants[prop] = LayoutConstants[prop]; +} + +FDLayoutConstants.MAX_ITERATIONS = 2500; + +FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50; +FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45; +FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0; +FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4; +FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0; +FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8; +FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5; +FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true; +FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true; +FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3; +FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33; +FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000; +FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000; +FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0; +FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3; +FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0; +FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100; +FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1; +FDLayoutConstants.MIN_EDGE_LENGTH = 1; +FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10; + +module.exports = FDLayoutConstants; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __nested_webpack_require_40298__) { + +"use strict"; + + +/** + * This class maintains a list of static geometry related utility methods. + * + * + * Copyright: i-Vis Research Group, Bilkent University, 2007 - present + */ + +var Point = __nested_webpack_require_40298__(12); + +function IGeometry() {} + +/** + * This method calculates *half* the amount in x and y directions of the two + * input rectangles needed to separate them keeping their respective + * positioning, and returns the result in the input array. An input + * separation buffer added to the amount in both directions. We assume that + * the two rectangles do intersect. + */ +IGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer) { + if (!rectA.intersects(rectB)) { + throw "assert failed"; + } + + var directions = new Array(2); + + this.decideDirectionsForOverlappingNodes(rectA, rectB, directions); + + overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x); + overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y); + + // update the overlapping amounts for the following cases: + if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) { + /* Case x.1: + * + * rectA + * | | + * | _________ | + * | | | | + * |________|_______|______| + * | | + * | | + * rectB + */ + overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight()); + } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) { + /* Case x.2: + * + * rectB + * | | + * | _________ | + * | | | | + * |________|_______|______| + * | | + * | | + * rectA + */ + overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight()); + } + if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) { + /* Case y.1: + * ________ rectA + * | + * | + * ______|____ rectB + * | | + * | | + * ______|____| + * | + * | + * |________ + * + */ + overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom()); + } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) { + /* Case y.2: + * ________ rectB + * | + * | + * ______|____ rectA + * | | + * | | + * ______|____| + * | + * | + * |________ + * + */ + overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom()); + } + + // find slope of the line passes two centers + var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX())); + // if centers are overlapped + if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) { + // assume the slope is 1 (45 degree) + slope = 1.0; + } + + var moveByY = slope * overlapAmount[0]; + var moveByX = overlapAmount[1] / slope; + if (overlapAmount[0] < moveByX) { + moveByX = overlapAmount[0]; + } else { + moveByY = overlapAmount[1]; + } + // return half the amount so that if each rectangle is moved by these + // amounts in opposite directions, overlap will be resolved + overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer); + overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer); +}; + +/** + * This method decides the separation direction of overlapping nodes + * + * if directions[0] = -1, then rectA goes left + * if directions[0] = 1, then rectA goes right + * if directions[1] = -1, then rectA goes up + * if directions[1] = 1, then rectA goes down + */ +IGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions) { + if (rectA.getCenterX() < rectB.getCenterX()) { + directions[0] = -1; + } else { + directions[0] = 1; + } + + if (rectA.getCenterY() < rectB.getCenterY()) { + directions[1] = -1; + } else { + directions[1] = 1; + } +}; + +/** + * This method calculates the intersection (clipping) points of the two + * input rectangles with line segment defined by the centers of these two + * rectangles. The clipping points are saved in the input double array and + * whether or not the two rectangles overlap is returned. + */ +IGeometry.getIntersection2 = function (rectA, rectB, result) { + //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB + var p1x = rectA.getCenterX(); + var p1y = rectA.getCenterY(); + var p2x = rectB.getCenterX(); + var p2y = rectB.getCenterY(); + + //if two rectangles intersect, then clipping points are centers + if (rectA.intersects(rectB)) { + result[0] = p1x; + result[1] = p1y; + result[2] = p2x; + result[3] = p2y; + return true; + } + //variables for rectA + var topLeftAx = rectA.getX(); + var topLeftAy = rectA.getY(); + var topRightAx = rectA.getRight(); + var bottomLeftAx = rectA.getX(); + var bottomLeftAy = rectA.getBottom(); + var bottomRightAx = rectA.getRight(); + var halfWidthA = rectA.getWidthHalf(); + var halfHeightA = rectA.getHeightHalf(); + //variables for rectB + var topLeftBx = rectB.getX(); + var topLeftBy = rectB.getY(); + var topRightBx = rectB.getRight(); + var bottomLeftBx = rectB.getX(); + var bottomLeftBy = rectB.getBottom(); + var bottomRightBx = rectB.getRight(); + var halfWidthB = rectB.getWidthHalf(); + var halfHeightB = rectB.getHeightHalf(); + + //flag whether clipping points are found + var clipPointAFound = false; + var clipPointBFound = false; + + // line is vertical + if (p1x === p2x) { + if (p1y > p2y) { + result[0] = p1x; + result[1] = topLeftAy; + result[2] = p2x; + result[3] = bottomLeftBy; + return false; + } else if (p1y < p2y) { + result[0] = p1x; + result[1] = bottomLeftAy; + result[2] = p2x; + result[3] = topLeftBy; + return false; + } else { + //not line, return null; + } + } + // line is horizontal + else if (p1y === p2y) { + if (p1x > p2x) { + result[0] = topLeftAx; + result[1] = p1y; + result[2] = topRightBx; + result[3] = p2y; + return false; + } else if (p1x < p2x) { + result[0] = topRightAx; + result[1] = p1y; + result[2] = topLeftBx; + result[3] = p2y; + return false; + } else { + //not valid line, return null; + } + } else { + //slopes of rectA's and rectB's diagonals + var slopeA = rectA.height / rectA.width; + var slopeB = rectB.height / rectB.width; + + //slope of line between center of rectA and center of rectB + var slopePrime = (p2y - p1y) / (p2x - p1x); + var cardinalDirectionA = void 0; + var cardinalDirectionB = void 0; + var tempPointAx = void 0; + var tempPointAy = void 0; + var tempPointBx = void 0; + var tempPointBy = void 0; + + //determine whether clipping point is the corner of nodeA + if (-slopeA === slopePrime) { + if (p1x > p2x) { + result[0] = bottomLeftAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } else { + result[0] = topRightAx; + result[1] = topLeftAy; + clipPointAFound = true; + } + } else if (slopeA === slopePrime) { + if (p1x > p2x) { + result[0] = topLeftAx; + result[1] = topLeftAy; + clipPointAFound = true; + } else { + result[0] = bottomRightAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } + } + + //determine whether clipping point is the corner of nodeB + if (-slopeB === slopePrime) { + if (p2x > p1x) { + result[2] = bottomLeftBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } else { + result[2] = topRightBx; + result[3] = topLeftBy; + clipPointBFound = true; + } + } else if (slopeB === slopePrime) { + if (p2x > p1x) { + result[2] = topLeftBx; + result[3] = topLeftBy; + clipPointBFound = true; + } else { + result[2] = bottomRightBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } + } + + //if both clipping points are corners + if (clipPointAFound && clipPointBFound) { + return false; + } + + //determine Cardinal Direction of rectangles + if (p1x > p2x) { + if (p1y > p2y) { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2); + } else { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1); + } + } else { + if (p1y > p2y) { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3); + } else { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4); + } + } + //calculate clipping Point if it is not found before + if (!clipPointAFound) { + switch (cardinalDirectionA) { + case 1: + tempPointAy = topLeftAy; + tempPointAx = p1x + -halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 2: + tempPointAx = bottomRightAx; + tempPointAy = p1y + halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 3: + tempPointAy = bottomLeftAy; + tempPointAx = p1x + halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 4: + tempPointAx = bottomLeftAx; + tempPointAy = p1y + -halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + } + } + if (!clipPointBFound) { + switch (cardinalDirectionB) { + case 1: + tempPointBy = topLeftBy; + tempPointBx = p2x + -halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 2: + tempPointBx = bottomRightBx; + tempPointBy = p2y + halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 3: + tempPointBy = bottomLeftBy; + tempPointBx = p2x + halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 4: + tempPointBx = bottomLeftBx; + tempPointBy = p2y + -halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + } + } + } + return false; +}; + +/** + * This method returns in which cardinal direction does input point stays + * 1: North + * 2: East + * 3: South + * 4: West + */ +IGeometry.getCardinalDirection = function (slope, slopePrime, line) { + if (slope > slopePrime) { + return line; + } else { + return 1 + line % 4; + } +}; + +/** + * This method calculates the intersection of the two lines defined by + * point pairs (s1,s2) and (f1,f2). + */ +IGeometry.getIntersection = function (s1, s2, f1, f2) { + if (f2 == null) { + return this.getIntersection2(s1, s2, f1); + } + + var x1 = s1.x; + var y1 = s1.y; + var x2 = s2.x; + var y2 = s2.y; + var x3 = f1.x; + var y3 = f1.y; + var x4 = f2.x; + var y4 = f2.y; + var x = void 0, + y = void 0; // intersection point + var a1 = void 0, + a2 = void 0, + b1 = void 0, + b2 = void 0, + c1 = void 0, + c2 = void 0; // coefficients of line eqns. + var denom = void 0; + + a1 = y2 - y1; + b1 = x1 - x2; + c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 } + + a2 = y4 - y3; + b2 = x3 - x4; + c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 } + + denom = a1 * b2 - a2 * b1; + + if (denom === 0) { + return null; + } + + x = (b1 * c2 - b2 * c1) / denom; + y = (a2 * c1 - a1 * c2) / denom; + + return new Point(x, y); +}; + +/** + * This method finds and returns the angle of the vector from the + x-axis + * in clockwise direction (compatible w/ Java coordinate system!). + */ +IGeometry.angleOfVector = function (Cx, Cy, Nx, Ny) { + var C_angle = void 0; + + if (Cx !== Nx) { + C_angle = Math.atan((Ny - Cy) / (Nx - Cx)); + + if (Nx < Cx) { + C_angle += Math.PI; + } else if (Ny < Cy) { + C_angle += this.TWO_PI; + } + } else if (Ny < Cy) { + C_angle = this.ONE_AND_HALF_PI; // 270 degrees + } else { + C_angle = this.HALF_PI; // 90 degrees + } + + return C_angle; +}; + +/** + * This method checks whether the given two line segments (one with point + * p1 and p2, the other with point p3 and p4) intersect at a point other + * than these points. + */ +IGeometry.doIntersect = function (p1, p2, p3, p4) { + var a = p1.x; + var b = p1.y; + var c = p2.x; + var d = p2.y; + var p = p3.x; + var q = p3.y; + var r = p4.x; + var s = p4.y; + var det = (c - a) * (s - q) - (r - p) * (d - b); + + if (det === 0) { + return false; + } else { + var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det; + var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det; + return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1; + } +}; + +// ----------------------------------------------------------------------------- +// Section: Class Constants +// ----------------------------------------------------------------------------- +/** + * Some useful pre-calculated constants + */ +IGeometry.HALF_PI = 0.5 * Math.PI; +IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI; +IGeometry.TWO_PI = 2.0 * Math.PI; +IGeometry.THREE_PI = 3.0 * Math.PI; + +module.exports = IGeometry; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function IMath() {} + +/** + * This method returns the sign of the input value. + */ +IMath.sign = function (value) { + if (value > 0) { + return 1; + } else if (value < 0) { + return -1; + } else { + return 0; + } +}; + +IMath.floor = function (value) { + return value < 0 ? Math.ceil(value) : Math.floor(value); +}; + +IMath.ceil = function (value) { + return value < 0 ? Math.floor(value) : Math.ceil(value); +}; + +module.exports = IMath; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function Integer() {} + +Integer.MAX_VALUE = 2147483647; +Integer.MIN_VALUE = -2147483648; + +module.exports = Integer; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var nodeFrom = function nodeFrom(value) { + return { value: value, next: null, prev: null }; +}; + +var add = function add(prev, node, next, list) { + if (prev !== null) { + prev.next = node; + } else { + list.head = node; + } + + if (next !== null) { + next.prev = node; + } else { + list.tail = node; + } + + node.prev = prev; + node.next = next; + + list.length++; + + return node; +}; + +var _remove = function _remove(node, list) { + var prev = node.prev, + next = node.next; + + + if (prev !== null) { + prev.next = next; + } else { + list.head = next; + } + + if (next !== null) { + next.prev = prev; + } else { + list.tail = prev; + } + + node.prev = node.next = null; + + list.length--; + + return node; +}; + +var LinkedList = function () { + function LinkedList(vals) { + var _this = this; + + _classCallCheck(this, LinkedList); + + this.length = 0; + this.head = null; + this.tail = null; + + if (vals != null) { + vals.forEach(function (v) { + return _this.push(v); + }); + } + } + + _createClass(LinkedList, [{ + key: "size", + value: function size() { + return this.length; + } + }, { + key: "insertBefore", + value: function insertBefore(val, otherNode) { + return add(otherNode.prev, nodeFrom(val), otherNode, this); + } + }, { + key: "insertAfter", + value: function insertAfter(val, otherNode) { + return add(otherNode, nodeFrom(val), otherNode.next, this); + } + }, { + key: "insertNodeBefore", + value: function insertNodeBefore(newNode, otherNode) { + return add(otherNode.prev, newNode, otherNode, this); + } + }, { + key: "insertNodeAfter", + value: function insertNodeAfter(newNode, otherNode) { + return add(otherNode, newNode, otherNode.next, this); + } + }, { + key: "push", + value: function push(val) { + return add(this.tail, nodeFrom(val), null, this); + } + }, { + key: "unshift", + value: function unshift(val) { + return add(null, nodeFrom(val), this.head, this); + } + }, { + key: "remove", + value: function remove(node) { + return _remove(node, this); + } + }, { + key: "pop", + value: function pop() { + return _remove(this.tail, this).value; + } + }, { + key: "popNode", + value: function popNode() { + return _remove(this.tail, this); + } + }, { + key: "shift", + value: function shift() { + return _remove(this.head, this).value; + } + }, { + key: "shiftNode", + value: function shiftNode() { + return _remove(this.head, this); + } + }, { + key: "get_object_at", + value: function get_object_at(index) { + if (index <= this.length()) { + var i = 1; + var current = this.head; + while (i < index) { + current = current.next; + i++; + } + return current.value; + } + } + }, { + key: "set_object_at", + value: function set_object_at(index, value) { + if (index <= this.length()) { + var i = 1; + var current = this.head; + while (i < index) { + current = current.next; + i++; + } + current.value = value; + } + } + }]); + + return LinkedList; +}(); + +module.exports = LinkedList; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/* + *This class is the javascript implementation of the Point.java class in jdk + */ +function Point(x, y, p) { + this.x = null; + this.y = null; + if (x == null && y == null && p == null) { + this.x = 0; + this.y = 0; + } else if (typeof x == 'number' && typeof y == 'number' && p == null) { + this.x = x; + this.y = y; + } else if (x.constructor.name == 'Point' && y == null && p == null) { + p = x; + this.x = p.x; + this.y = p.y; + } +} + +Point.prototype.getX = function () { + return this.x; +}; + +Point.prototype.getY = function () { + return this.y; +}; + +Point.prototype.getLocation = function () { + return new Point(this.x, this.y); +}; + +Point.prototype.setLocation = function (x, y, p) { + if (x.constructor.name == 'Point' && y == null && p == null) { + p = x; + this.setLocation(p.x, p.y); + } else if (typeof x == 'number' && typeof y == 'number' && p == null) { + //if both parameters are integer just move (x,y) location + if (parseInt(x) == x && parseInt(y) == y) { + this.move(x, y); + } else { + this.x = Math.floor(x + 0.5); + this.y = Math.floor(y + 0.5); + } + } +}; + +Point.prototype.move = function (x, y) { + this.x = x; + this.y = y; +}; + +Point.prototype.translate = function (dx, dy) { + this.x += dx; + this.y += dy; +}; + +Point.prototype.equals = function (obj) { + if (obj.constructor.name == "Point") { + var pt = obj; + return this.x == pt.x && this.y == pt.y; + } + return this == obj; +}; + +Point.prototype.toString = function () { + return new Point().constructor.name + "[x=" + this.x + ",y=" + this.y + "]"; +}; + +module.exports = Point; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function RectangleD(x, y, width, height) { + this.x = 0; + this.y = 0; + this.width = 0; + this.height = 0; + + if (x != null && y != null && width != null && height != null) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + } +} + +RectangleD.prototype.getX = function () { + return this.x; +}; + +RectangleD.prototype.setX = function (x) { + this.x = x; +}; + +RectangleD.prototype.getY = function () { + return this.y; +}; + +RectangleD.prototype.setY = function (y) { + this.y = y; +}; + +RectangleD.prototype.getWidth = function () { + return this.width; +}; + +RectangleD.prototype.setWidth = function (width) { + this.width = width; +}; + +RectangleD.prototype.getHeight = function () { + return this.height; +}; + +RectangleD.prototype.setHeight = function (height) { + this.height = height; +}; + +RectangleD.prototype.getRight = function () { + return this.x + this.width; +}; + +RectangleD.prototype.getBottom = function () { + return this.y + this.height; +}; + +RectangleD.prototype.intersects = function (a) { + if (this.getRight() < a.x) { + return false; + } + + if (this.getBottom() < a.y) { + return false; + } + + if (a.getRight() < this.x) { + return false; + } + + if (a.getBottom() < this.y) { + return false; + } + + return true; +}; + +RectangleD.prototype.getCenterX = function () { + return this.x + this.width / 2; +}; + +RectangleD.prototype.getMinX = function () { + return this.getX(); +}; + +RectangleD.prototype.getMaxX = function () { + return this.getX() + this.width; +}; + +RectangleD.prototype.getCenterY = function () { + return this.y + this.height / 2; +}; + +RectangleD.prototype.getMinY = function () { + return this.getY(); +}; + +RectangleD.prototype.getMaxY = function () { + return this.getY() + this.height; +}; + +RectangleD.prototype.getWidthHalf = function () { + return this.width / 2; +}; + +RectangleD.prototype.getHeightHalf = function () { + return this.height / 2; +}; + +module.exports = RectangleD; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function UniqueIDGeneretor() {} + +UniqueIDGeneretor.lastID = 0; + +UniqueIDGeneretor.createID = function (obj) { + if (UniqueIDGeneretor.isPrimitive(obj)) { + return obj; + } + if (obj.uniqueID != null) { + return obj.uniqueID; + } + obj.uniqueID = UniqueIDGeneretor.getString(); + UniqueIDGeneretor.lastID++; + return obj.uniqueID; +}; + +UniqueIDGeneretor.getString = function (id) { + if (id == null) id = UniqueIDGeneretor.lastID; + return "Object#" + id + ""; +}; + +UniqueIDGeneretor.isPrimitive = function (arg) { + var type = typeof arg === "undefined" ? "undefined" : _typeof(arg); + return arg == null || type != "object" && type != "function"; +}; + +module.exports = UniqueIDGeneretor; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __nested_webpack_require_64072__) { + +"use strict"; + + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var LayoutConstants = __nested_webpack_require_64072__(0); +var LGraphManager = __nested_webpack_require_64072__(6); +var LNode = __nested_webpack_require_64072__(3); +var LEdge = __nested_webpack_require_64072__(1); +var LGraph = __nested_webpack_require_64072__(5); +var PointD = __nested_webpack_require_64072__(4); +var Transform = __nested_webpack_require_64072__(17); +var Emitter = __nested_webpack_require_64072__(27); + +function Layout(isRemoteUse) { + Emitter.call(this); + + //Layout Quality: 0:draft, 1:default, 2:proof + this.layoutQuality = LayoutConstants.QUALITY; + //Whether layout should create bendpoints as needed or not + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + //Whether layout should be incremental or not + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + //Whether we animate from before to after layout node positions + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + //Whether we animate the layout process or not + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + //Number iterations that should be done between two successive animations + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + /** + * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When + * they are, both spring and repulsion forces between two leaf nodes can be + * calculated without the expensive clipping point calculations, resulting + * in major speed-up. + */ + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + /** + * This is used for creation of bendpoints by using dummy nodes and edges. + * Maps an LEdge to its dummy bendpoint path. + */ + this.edgeToDummyNodes = new Map(); + this.graphManager = new LGraphManager(this); + this.isLayoutFinished = false; + this.isSubLayout = false; + this.isRemoteUse = false; + + if (isRemoteUse != null) { + this.isRemoteUse = isRemoteUse; + } +} + +Layout.RANDOM_SEED = 1; + +Layout.prototype = Object.create(Emitter.prototype); + +Layout.prototype.getGraphManager = function () { + return this.graphManager; +}; + +Layout.prototype.getAllNodes = function () { + return this.graphManager.getAllNodes(); +}; + +Layout.prototype.getAllEdges = function () { + return this.graphManager.getAllEdges(); +}; + +Layout.prototype.getAllNodesToApplyGravitation = function () { + return this.graphManager.getAllNodesToApplyGravitation(); +}; + +Layout.prototype.newGraphManager = function () { + var gm = new LGraphManager(this); + this.graphManager = gm; + return gm; +}; + +Layout.prototype.newGraph = function (vGraph) { + return new LGraph(null, this.graphManager, vGraph); +}; + +Layout.prototype.newNode = function (vNode) { + return new LNode(this.graphManager, vNode); +}; + +Layout.prototype.newEdge = function (vEdge) { + return new LEdge(null, null, vEdge); +}; + +Layout.prototype.checkLayoutSuccess = function () { + return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge(); +}; + +Layout.prototype.runLayout = function () { + this.isLayoutFinished = false; + + if (this.tilingPreLayout) { + this.tilingPreLayout(); + } + + this.initParameters(); + var isLayoutSuccessfull; + + if (this.checkLayoutSuccess()) { + isLayoutSuccessfull = false; + } else { + isLayoutSuccessfull = this.layout(); + } + + if (LayoutConstants.ANIMATE === 'during') { + // If this is a 'during' layout animation. Layout is not finished yet. + // We need to perform these in index.js when layout is really finished. + return false; + } + + if (isLayoutSuccessfull) { + if (!this.isSubLayout) { + this.doPostLayout(); + } + } + + if (this.tilingPostLayout) { + this.tilingPostLayout(); + } + + this.isLayoutFinished = true; + + return isLayoutSuccessfull; +}; + +/** + * This method performs the operations required after layout. + */ +Layout.prototype.doPostLayout = function () { + //assert !isSubLayout : "Should not be called on sub-layout!"; + // Propagate geometric changes to v-level objects + if (!this.incremental) { + this.transform(); + } + this.update(); +}; + +/** + * This method updates the geometry of the target graph according to + * calculated layout. + */ +Layout.prototype.update2 = function () { + // update bend points + if (this.createBendsAsNeeded) { + this.createBendpointsFromDummyNodes(); + + // reset all edges, since the topology has changed + this.graphManager.resetAllEdges(); + } + + // perform edge, node and root updates if layout is not called + // remotely + if (!this.isRemoteUse) { + // update all edges + var edge; + var allEdges = this.graphManager.getAllEdges(); + for (var i = 0; i < allEdges.length; i++) { + edge = allEdges[i]; + // this.update(edge); + } + + // recursively update nodes + var node; + var nodes = this.graphManager.getRoot().getNodes(); + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + // this.update(node); + } + + // update root graph + this.update(this.graphManager.getRoot()); + } +}; + +Layout.prototype.update = function (obj) { + if (obj == null) { + this.update2(); + } else if (obj instanceof LNode) { + var node = obj; + if (node.getChild() != null) { + // since node is compound, recursively update child nodes + var nodes = node.getChild().getNodes(); + for (var i = 0; i < nodes.length; i++) { + update(nodes[i]); + } + } + + // if the l-level node is associated with a v-level graph object, + // then it is assumed that the v-level node implements the + // interface Updatable. + if (node.vGraphObject != null) { + // cast to Updatable without any type check + var vNode = node.vGraphObject; + + // call the update method of the interface + vNode.update(node); + } + } else if (obj instanceof LEdge) { + var edge = obj; + // if the l-level edge is associated with a v-level graph object, + // then it is assumed that the v-level edge implements the + // interface Updatable. + + if (edge.vGraphObject != null) { + // cast to Updatable without any type check + var vEdge = edge.vGraphObject; + + // call the update method of the interface + vEdge.update(edge); + } + } else if (obj instanceof LGraph) { + var graph = obj; + // if the l-level graph is associated with a v-level graph object, + // then it is assumed that the v-level object implements the + // interface Updatable. + + if (graph.vGraphObject != null) { + // cast to Updatable without any type check + var vGraph = graph.vGraphObject; + + // call the update method of the interface + vGraph.update(graph); + } + } +}; + +/** + * This method is used to set all layout parameters to default values + * determined at compile time. + */ +Layout.prototype.initParameters = function () { + if (!this.isSubLayout) { + this.layoutQuality = LayoutConstants.QUALITY; + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + } + + if (this.animationDuringLayout) { + this.animationOnLayout = false; + } +}; + +Layout.prototype.transform = function (newLeftTop) { + if (newLeftTop == undefined) { + this.transform(new PointD(0, 0)); + } else { + // create a transformation object (from Eclipse to layout). When an + // inverse transform is applied, we get upper-left coordinate of the + // drawing or the root graph at given input coordinate (some margins + // already included in calculation of left-top). + + var trans = new Transform(); + var leftTop = this.graphManager.getRoot().updateLeftTop(); + + if (leftTop != null) { + trans.setWorldOrgX(newLeftTop.x); + trans.setWorldOrgY(newLeftTop.y); + + trans.setDeviceOrgX(leftTop.x); + trans.setDeviceOrgY(leftTop.y); + + var nodes = this.getAllNodes(); + var node; + + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + node.transform(trans); + } + } + } +}; + +Layout.prototype.positionNodesRandomly = function (graph) { + + if (graph == undefined) { + //assert !this.incremental; + this.positionNodesRandomly(this.getGraphManager().getRoot()); + this.getGraphManager().getRoot().updateBounds(true); + } else { + var lNode; + var childGraph; + + var nodes = graph.getNodes(); + for (var i = 0; i < nodes.length; i++) { + lNode = nodes[i]; + childGraph = lNode.getChild(); + + if (childGraph == null) { + lNode.scatter(); + } else if (childGraph.getNodes().length == 0) { + lNode.scatter(); + } else { + this.positionNodesRandomly(childGraph); + lNode.updateBounds(); + } + } + } +}; + +/** + * This method returns a list of trees where each tree is represented as a + * list of l-nodes. The method returns a list of size 0 when: + * - The graph is not flat or + * - One of the component(s) of the graph is not a tree. + */ +Layout.prototype.getFlatForest = function () { + var flatForest = []; + var isForest = true; + + // Quick reference for all nodes in the graph manager associated with + // this layout. The list should not be changed. + var allNodes = this.graphManager.getRoot().getNodes(); + + // First be sure that the graph is flat + var isFlat = true; + + for (var i = 0; i < allNodes.length; i++) { + if (allNodes[i].getChild() != null) { + isFlat = false; + } + } + + // Return empty forest if the graph is not flat. + if (!isFlat) { + return flatForest; + } + + // Run BFS for each component of the graph. + + var visited = new Set(); + var toBeVisited = []; + var parents = new Map(); + var unProcessedNodes = []; + + unProcessedNodes = unProcessedNodes.concat(allNodes); + + // Each iteration of this loop finds a component of the graph and + // decides whether it is a tree or not. If it is a tree, adds it to the + // forest and continued with the next component. + + while (unProcessedNodes.length > 0 && isForest) { + toBeVisited.push(unProcessedNodes[0]); + + // Start the BFS. Each iteration of this loop visits a node in a + // BFS manner. + while (toBeVisited.length > 0 && isForest) { + //pool operation + var currentNode = toBeVisited[0]; + toBeVisited.splice(0, 1); + visited.add(currentNode); + + // Traverse all neighbors of this node + var neighborEdges = currentNode.getEdges(); + + for (var i = 0; i < neighborEdges.length; i++) { + var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode); + + // If BFS is not growing from this neighbor. + if (parents.get(currentNode) != currentNeighbor) { + // We haven't previously visited this neighbor. + if (!visited.has(currentNeighbor)) { + toBeVisited.push(currentNeighbor); + parents.set(currentNeighbor, currentNode); + } + // Since we have previously visited this neighbor and + // this neighbor is not parent of currentNode, given + // graph contains a component that is not tree, hence + // it is not a forest. + else { + isForest = false; + break; + } + } + } + } + + // The graph contains a component that is not a tree. Empty + // previously found trees. The method will end. + if (!isForest) { + flatForest = []; + } + // Save currently visited nodes as a tree in our forest. Reset + // visited and parents lists. Continue with the next component of + // the graph, if any. + else { + var temp = [].concat(_toConsumableArray(visited)); + flatForest.push(temp); + //flatForest = flatForest.concat(temp); + //unProcessedNodes.removeAll(visited); + for (var i = 0; i < temp.length; i++) { + var value = temp[i]; + var index = unProcessedNodes.indexOf(value); + if (index > -1) { + unProcessedNodes.splice(index, 1); + } + } + visited = new Set(); + parents = new Map(); + } + } + + return flatForest; +}; + +/** + * This method creates dummy nodes (an l-level node with minimal dimensions) + * for the given edge (one per bendpoint). The existing l-level structure + * is updated accordingly. + */ +Layout.prototype.createDummyNodesForBendpoints = function (edge) { + var dummyNodes = []; + var prev = edge.source; + + var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target); + + for (var i = 0; i < edge.bendpoints.length; i++) { + // create new dummy node + var dummyNode = this.newNode(null); + dummyNode.setRect(new Point(0, 0), new Dimension(1, 1)); + + graph.add(dummyNode); + + // create new dummy edge between prev and dummy node + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev, dummyNode); + + dummyNodes.add(dummyNode); + prev = dummyNode; + } + + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev, edge.target); + + this.edgeToDummyNodes.set(edge, dummyNodes); + + // remove real edge from graph manager if it is inter-graph + if (edge.isInterGraph()) { + this.graphManager.remove(edge); + } + // else, remove the edge from the current graph + else { + graph.remove(edge); + } + + return dummyNodes; +}; + +/** + * This method creates bendpoints for edges from the dummy nodes + * at l-level. + */ +Layout.prototype.createBendpointsFromDummyNodes = function () { + var edges = []; + edges = edges.concat(this.graphManager.getAllEdges()); + edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges); + + for (var k = 0; k < edges.length; k++) { + var lEdge = edges[k]; + + if (lEdge.bendpoints.length > 0) { + var path = this.edgeToDummyNodes.get(lEdge); + + for (var i = 0; i < path.length; i++) { + var dummyNode = path[i]; + var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY()); + + // update bendpoint's location according to dummy node + var ebp = lEdge.bendpoints.get(i); + ebp.x = p.x; + ebp.y = p.y; + + // remove the dummy node, dummy edges incident with this + // dummy node is also removed (within the remove method) + dummyNode.getOwner().remove(dummyNode); + } + + // add the real edge to graph + this.graphManager.add(lEdge, lEdge.source, lEdge.target); + } + } +}; + +Layout.transform = function (sliderValue, defaultValue, minDiv, maxMul) { + if (minDiv != undefined && maxMul != undefined) { + var value = defaultValue; + + if (sliderValue <= 50) { + var minValue = defaultValue / minDiv; + value -= (defaultValue - minValue) / 50 * (50 - sliderValue); + } else { + var maxValue = defaultValue * maxMul; + value += (maxValue - defaultValue) / 50 * (sliderValue - 50); + } + + return value; + } else { + var a, b; + + if (sliderValue <= 50) { + a = 9.0 * defaultValue / 500.0; + b = defaultValue / 10.0; + } else { + a = 9.0 * defaultValue / 50.0; + b = -8 * defaultValue; + } + + return a * sliderValue + b; + } +}; + +/** + * This method finds and returns the center of the given nodes, assuming + * that the given nodes form a tree in themselves. + */ +Layout.findCenterOfTree = function (nodes) { + var list = []; + list = list.concat(nodes); + + var removedNodes = []; + var remainingDegrees = new Map(); + var foundCenter = false; + var centerNode = null; + + if (list.length == 1 || list.length == 2) { + foundCenter = true; + centerNode = list[0]; + } + + for (var i = 0; i < list.length; i++) { + var node = list[i]; + var degree = node.getNeighborsList().size; + remainingDegrees.set(node, node.getNeighborsList().size); + + if (degree == 1) { + removedNodes.push(node); + } + } + + var tempList = []; + tempList = tempList.concat(removedNodes); + + while (!foundCenter) { + var tempList2 = []; + tempList2 = tempList2.concat(tempList); + tempList = []; + + for (var i = 0; i < list.length; i++) { + var node = list[i]; + + var index = list.indexOf(node); + if (index >= 0) { + list.splice(index, 1); + } + + var neighbours = node.getNeighborsList(); + + neighbours.forEach(function (neighbour) { + if (removedNodes.indexOf(neighbour) < 0) { + var otherDegree = remainingDegrees.get(neighbour); + var newDegree = otherDegree - 1; + + if (newDegree == 1) { + tempList.push(neighbour); + } + + remainingDegrees.set(neighbour, newDegree); + } + }); + } + + removedNodes = removedNodes.concat(tempList); + + if (list.length == 1 || list.length == 2) { + foundCenter = true; + centerNode = list[0]; + } + } + + return centerNode; +}; + +/** + * During the coarsening process, this layout may be referenced by two graph managers + * this setter function grants access to change the currently being used graph manager + */ +Layout.prototype.setGraphManager = function (gm) { + this.graphManager = gm; +}; + +module.exports = Layout; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function RandomSeed() {} +// adapted from: https://stackoverflow.com/a/19303725 +RandomSeed.seed = 1; +RandomSeed.x = 0; + +RandomSeed.nextDouble = function () { + RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000; + return RandomSeed.x - Math.floor(RandomSeed.x); +}; + +module.exports = RandomSeed; + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __nested_webpack_require_81860__) { + +"use strict"; + + +var PointD = __nested_webpack_require_81860__(4); + +function Transform(x, y) { + this.lworldOrgX = 0.0; + this.lworldOrgY = 0.0; + this.ldeviceOrgX = 0.0; + this.ldeviceOrgY = 0.0; + this.lworldExtX = 1.0; + this.lworldExtY = 1.0; + this.ldeviceExtX = 1.0; + this.ldeviceExtY = 1.0; +} + +Transform.prototype.getWorldOrgX = function () { + return this.lworldOrgX; +}; + +Transform.prototype.setWorldOrgX = function (wox) { + this.lworldOrgX = wox; +}; + +Transform.prototype.getWorldOrgY = function () { + return this.lworldOrgY; +}; + +Transform.prototype.setWorldOrgY = function (woy) { + this.lworldOrgY = woy; +}; + +Transform.prototype.getWorldExtX = function () { + return this.lworldExtX; +}; + +Transform.prototype.setWorldExtX = function (wex) { + this.lworldExtX = wex; +}; + +Transform.prototype.getWorldExtY = function () { + return this.lworldExtY; +}; + +Transform.prototype.setWorldExtY = function (wey) { + this.lworldExtY = wey; +}; + +/* Device related */ + +Transform.prototype.getDeviceOrgX = function () { + return this.ldeviceOrgX; +}; + +Transform.prototype.setDeviceOrgX = function (dox) { + this.ldeviceOrgX = dox; +}; + +Transform.prototype.getDeviceOrgY = function () { + return this.ldeviceOrgY; +}; + +Transform.prototype.setDeviceOrgY = function (doy) { + this.ldeviceOrgY = doy; +}; + +Transform.prototype.getDeviceExtX = function () { + return this.ldeviceExtX; +}; + +Transform.prototype.setDeviceExtX = function (dex) { + this.ldeviceExtX = dex; +}; + +Transform.prototype.getDeviceExtY = function () { + return this.ldeviceExtY; +}; + +Transform.prototype.setDeviceExtY = function (dey) { + this.ldeviceExtY = dey; +}; + +Transform.prototype.transformX = function (x) { + var xDevice = 0.0; + var worldExtX = this.lworldExtX; + if (worldExtX != 0.0) { + xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX; + } + + return xDevice; +}; + +Transform.prototype.transformY = function (y) { + var yDevice = 0.0; + var worldExtY = this.lworldExtY; + if (worldExtY != 0.0) { + yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY; + } + + return yDevice; +}; + +Transform.prototype.inverseTransformX = function (x) { + var xWorld = 0.0; + var deviceExtX = this.ldeviceExtX; + if (deviceExtX != 0.0) { + xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX; + } + + return xWorld; +}; + +Transform.prototype.inverseTransformY = function (y) { + var yWorld = 0.0; + var deviceExtY = this.ldeviceExtY; + if (deviceExtY != 0.0) { + yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY; + } + return yWorld; +}; + +Transform.prototype.inverseTransformPoint = function (inPoint) { + var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y)); + return outPoint; +}; + +module.exports = Transform; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __nested_webpack_require_84747__) { + +"use strict"; + + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var Layout = __nested_webpack_require_84747__(15); +var FDLayoutConstants = __nested_webpack_require_84747__(7); +var LayoutConstants = __nested_webpack_require_84747__(0); +var IGeometry = __nested_webpack_require_84747__(8); +var IMath = __nested_webpack_require_84747__(9); + +function FDLayout() { + Layout.call(this); + + this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.idealEdgeLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; + this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100; + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.totalDisplacement = 0.0; + this.oldTotalDisplacement = 0.0; + this.maxIterations = FDLayoutConstants.MAX_ITERATIONS; +} + +FDLayout.prototype = Object.create(Layout.prototype); + +for (var prop in Layout) { + FDLayout[prop] = Layout[prop]; +} + +FDLayout.prototype.initParameters = function () { + Layout.prototype.initParameters.call(this, arguments); + + this.totalIterations = 0; + this.notAnimatedIterations = 0; + + this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION; + + this.grid = []; +}; + +FDLayout.prototype.calcIdealEdgeLengths = function () { + var edge; + var lcaDepth; + var source; + var target; + var sizeOfSourceInLca; + var sizeOfTargetInLca; + + var allEdges = this.getGraphManager().getAllEdges(); + for (var i = 0; i < allEdges.length; i++) { + edge = allEdges[i]; + + edge.idealLength = this.idealEdgeLength; + + if (edge.isInterGraph) { + source = edge.getSource(); + target = edge.getTarget(); + + sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize(); + sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize(); + + if (this.useSmartIdealEdgeLengthCalculation) { + edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE; + } + + lcaDepth = edge.getLca().getInclusionTreeDepth(); + + edge.idealLength += FDLayoutConstants.DEFAULT_EDGE_LENGTH * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth); + } + } +}; + +FDLayout.prototype.initSpringEmbedder = function () { + + var s = this.getAllNodes().length; + if (this.incremental) { + if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { + this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL; + } else { + if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { + this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } else { + this.coolingFactor = 1.0; + } + this.initialCoolingFactor = this.coolingFactor; + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT; + } + + this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations); + + this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length; + + this.repulsionRange = this.calcRepulsionRange(); +}; + +FDLayout.prototype.calcSpringForces = function () { + var lEdges = this.getAllEdges(); + var edge; + + for (var i = 0; i < lEdges.length; i++) { + edge = lEdges[i]; + + this.calcSpringForce(edge, edge.idealLength); + } +}; + +FDLayout.prototype.calcRepulsionForces = function () { + var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var i, j; + var nodeA, nodeB; + var lNodes = this.getAllNodes(); + var processedNodeSet; + + if (this.useFRGridVariant) { + if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) { + this.updateGrid(); + } + + processedNodeSet = new Set(); + + // calculate repulsion forces between each nodes and its surrounding + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate); + processedNodeSet.add(nodeA); + } + } else { + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + + for (j = i + 1; j < lNodes.length; j++) { + nodeB = lNodes[j]; + + // If both nodes are not members of the same graph, skip. + if (nodeA.getOwner() != nodeB.getOwner()) { + continue; + } + + this.calcRepulsionForce(nodeA, nodeB); + } + } + } +}; + +FDLayout.prototype.calcGravitationalForces = function () { + var node; + var lNodes = this.getAllNodesToApplyGravitation(); + + for (var i = 0; i < lNodes.length; i++) { + node = lNodes[i]; + this.calcGravitationalForce(node); + } +}; + +FDLayout.prototype.moveNodes = function () { + var lNodes = this.getAllNodes(); + var node; + + for (var i = 0; i < lNodes.length; i++) { + node = lNodes[i]; + node.move(); + } +}; + +FDLayout.prototype.calcSpringForce = function (edge, idealLength) { + var sourceNode = edge.getSource(); + var targetNode = edge.getTarget(); + + var length; + var springForce; + var springForceX; + var springForceY; + + // Update edge length + if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) { + edge.updateLengthSimple(); + } else { + edge.updateLength(); + + if (edge.isOverlapingSourceAndTarget) { + return; + } + } + + length = edge.getLength(); + + if (length == 0) return; + + // Calculate spring forces + springForce = this.springConstant * (length - idealLength); + + // Project force onto x and y axes + springForceX = springForce * (edge.lengthX / length); + springForceY = springForce * (edge.lengthY / length); + + // Apply forces on the end nodes + sourceNode.springForceX += springForceX; + sourceNode.springForceY += springForceY; + targetNode.springForceX -= springForceX; + targetNode.springForceY -= springForceY; +}; + +FDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) { + var rectA = nodeA.getRect(); + var rectB = nodeB.getRect(); + var overlapAmount = new Array(2); + var clipPoints = new Array(4); + var distanceX; + var distanceY; + var distanceSquared; + var distance; + var repulsionForce; + var repulsionForceX; + var repulsionForceY; + + if (rectA.intersects(rectB)) // two nodes overlap + { + // calculate separation amount in x and y directions + IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0); + + repulsionForceX = 2 * overlapAmount[0]; + repulsionForceY = 2 * overlapAmount[1]; + + var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren); + + // Apply forces on the two nodes + nodeA.repulsionForceX -= childrenConstant * repulsionForceX; + nodeA.repulsionForceY -= childrenConstant * repulsionForceY; + nodeB.repulsionForceX += childrenConstant * repulsionForceX; + nodeB.repulsionForceY += childrenConstant * repulsionForceY; + } else // no overlap + { + // calculate distance + + if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) // simply base repulsion on distance of node centers + { + distanceX = rectB.getCenterX() - rectA.getCenterX(); + distanceY = rectB.getCenterY() - rectA.getCenterY(); + } else // use clipping points + { + IGeometry.getIntersection(rectA, rectB, clipPoints); + + distanceX = clipPoints[2] - clipPoints[0]; + distanceY = clipPoints[3] - clipPoints[1]; + } + + // No repulsion range. FR grid variant should take care of this. + if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) { + distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST; + } + + if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) { + distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST; + } + + distanceSquared = distanceX * distanceX + distanceY * distanceY; + distance = Math.sqrt(distanceSquared); + + repulsionForce = this.repulsionConstant * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared; + + // Project force onto x and y axes + repulsionForceX = repulsionForce * distanceX / distance; + repulsionForceY = repulsionForce * distanceY / distance; + + // Apply forces on the two nodes + nodeA.repulsionForceX -= repulsionForceX; + nodeA.repulsionForceY -= repulsionForceY; + nodeB.repulsionForceX += repulsionForceX; + nodeB.repulsionForceY += repulsionForceY; + } +}; + +FDLayout.prototype.calcGravitationalForce = function (node) { + var ownerGraph; + var ownerCenterX; + var ownerCenterY; + var distanceX; + var distanceY; + var absDistanceX; + var absDistanceY; + var estimatedSize; + ownerGraph = node.getOwner(); + + ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2; + ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2; + distanceX = node.getCenterX() - ownerCenterX; + distanceY = node.getCenterY() - ownerCenterY; + absDistanceX = Math.abs(distanceX) + node.getWidth() / 2; + absDistanceY = Math.abs(distanceY) + node.getHeight() / 2; + + if (node.getOwner() == this.graphManager.getRoot()) // in the root graph + { + estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor; + + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { + node.gravitationForceX = -this.gravityConstant * distanceX; + node.gravitationForceY = -this.gravityConstant * distanceY; + } + } else // inside a compound + { + estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor; + + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { + node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant; + node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant; + } + } +}; + +FDLayout.prototype.isConverged = function () { + var converged; + var oscilating = false; + + if (this.totalIterations > this.maxIterations / 3) { + oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2; + } + + converged = this.totalDisplacement < this.totalDisplacementThreshold; + + this.oldTotalDisplacement = this.totalDisplacement; + + return converged || oscilating; +}; + +FDLayout.prototype.animate = function () { + if (this.animationDuringLayout && !this.isSubLayout) { + if (this.notAnimatedIterations == this.animationPeriod) { + this.update(); + this.notAnimatedIterations = 0; + } else { + this.notAnimatedIterations++; + } + } +}; + +//This method calculates the number of children (weight) for all nodes +FDLayout.prototype.calcNoOfChildrenForAllNodes = function () { + var node; + var allNodes = this.graphManager.getAllNodes(); + + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + node.noOfChildren = node.getNoOfChildren(); + } +}; + +// ----------------------------------------------------------------------------- +// Section: FR-Grid Variant Repulsion Force Calculation +// ----------------------------------------------------------------------------- + +FDLayout.prototype.calcGrid = function (graph) { + + var sizeX = 0; + var sizeY = 0; + + sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange)); + sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange)); + + var grid = new Array(sizeX); + + for (var i = 0; i < sizeX; i++) { + grid[i] = new Array(sizeY); + } + + for (var i = 0; i < sizeX; i++) { + for (var j = 0; j < sizeY; j++) { + grid[i][j] = new Array(); + } + } + + return grid; +}; + +FDLayout.prototype.addNodeToGrid = function (v, left, top) { + + var startX = 0; + var finishX = 0; + var startY = 0; + var finishY = 0; + + startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange)); + finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange)); + startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange)); + finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange)); + + for (var i = startX; i <= finishX; i++) { + for (var j = startY; j <= finishY; j++) { + this.grid[i][j].push(v); + v.setGridCoordinates(startX, finishX, startY, finishY); + } + } +}; + +FDLayout.prototype.updateGrid = function () { + var i; + var nodeA; + var lNodes = this.getAllNodes(); + + this.grid = this.calcGrid(this.graphManager.getRoot()); + + // put all nodes to proper grid cells + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop()); + } +}; + +FDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) { + + if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) { + var surrounding = new Set(); + nodeA.surrounding = new Array(); + var nodeB; + var grid = this.grid; + + for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) { + for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) { + if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) { + for (var k = 0; k < grid[i][j].length; k++) { + nodeB = grid[i][j][k]; + + // If both nodes are not members of the same graph, + // or both nodes are the same, skip. + if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) { + continue; + } + + // check if the repulsion force between + // nodeA and nodeB has already been calculated + if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) { + var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2); + var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2); + + // if the distance between nodeA and nodeB + // is less then calculation range + if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) { + //then add nodeB to surrounding of nodeA + surrounding.add(nodeB); + } + } + } + } + } + } + + nodeA.surrounding = [].concat(_toConsumableArray(surrounding)); + } + for (i = 0; i < nodeA.surrounding.length; i++) { + this.calcRepulsionForce(nodeA, nodeA.surrounding[i]); + } +}; + +FDLayout.prototype.calcRepulsionRange = function () { + return 0.0; +}; + +module.exports = FDLayout; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __nested_webpack_require_100902__) { + +"use strict"; + + +var LEdge = __nested_webpack_require_100902__(1); +var FDLayoutConstants = __nested_webpack_require_100902__(7); + +function FDLayoutEdge(source, target, vEdge) { + LEdge.call(this, source, target, vEdge); + this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; +} + +FDLayoutEdge.prototype = Object.create(LEdge.prototype); + +for (var prop in LEdge) { + FDLayoutEdge[prop] = LEdge[prop]; +} + +module.exports = FDLayoutEdge; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __nested_webpack_require_101387__) { + +"use strict"; + + +var LNode = __nested_webpack_require_101387__(3); + +function FDLayoutNode(gm, loc, size, vNode) { + // alternative constructor is handled inside LNode + LNode.call(this, gm, loc, size, vNode); + //Spring, repulsion and gravitational forces acting on this node + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + //Amount by which this node is to be moved in this iteration + this.displacementX = 0; + this.displacementY = 0; + + //Start and finish grid coordinates that this node is fallen into + this.startX = 0; + this.finishX = 0; + this.startY = 0; + this.finishY = 0; + + //Geometric neighbors of this node + this.surrounding = []; +} + +FDLayoutNode.prototype = Object.create(LNode.prototype); + +for (var prop in LNode) { + FDLayoutNode[prop] = LNode[prop]; +} + +FDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY) { + this.startX = _startX; + this.finishX = _finishX; + this.startY = _startY; + this.finishY = _finishY; +}; + +module.exports = FDLayoutNode; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function DimensionD(width, height) { + this.width = 0; + this.height = 0; + if (width !== null && height !== null) { + this.height = height; + this.width = width; + } +} + +DimensionD.prototype.getWidth = function () { + return this.width; +}; + +DimensionD.prototype.setWidth = function (width) { + this.width = width; +}; + +DimensionD.prototype.getHeight = function () { + return this.height; +}; + +DimensionD.prototype.setHeight = function (height) { + this.height = height; +}; + +module.exports = DimensionD; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __nested_webpack_require_103173__) { + +"use strict"; + + +var UniqueIDGeneretor = __nested_webpack_require_103173__(14); + +function HashMap() { + this.map = {}; + this.keys = []; +} + +HashMap.prototype.put = function (key, value) { + var theId = UniqueIDGeneretor.createID(key); + if (!this.contains(theId)) { + this.map[theId] = value; + this.keys.push(key); + } +}; + +HashMap.prototype.contains = function (key) { + var theId = UniqueIDGeneretor.createID(key); + return this.map[key] != null; +}; + +HashMap.prototype.get = function (key) { + var theId = UniqueIDGeneretor.createID(key); + return this.map[theId]; +}; + +HashMap.prototype.keySet = function () { + return this.keys; +}; + +module.exports = HashMap; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __nested_webpack_require_103901__) { + +"use strict"; + + +var UniqueIDGeneretor = __nested_webpack_require_103901__(14); + +function HashSet() { + this.set = {}; +} +; + +HashSet.prototype.add = function (obj) { + var theId = UniqueIDGeneretor.createID(obj); + if (!this.contains(theId)) this.set[theId] = obj; +}; + +HashSet.prototype.remove = function (obj) { + delete this.set[UniqueIDGeneretor.createID(obj)]; +}; + +HashSet.prototype.clear = function () { + this.set = {}; +}; + +HashSet.prototype.contains = function (obj) { + return this.set[UniqueIDGeneretor.createID(obj)] == obj; +}; + +HashSet.prototype.isEmpty = function () { + return this.size() === 0; +}; + +HashSet.prototype.size = function () { + return Object.keys(this.set).length; +}; + +//concats this.set to the given list +HashSet.prototype.addAllTo = function (list) { + var keys = Object.keys(this.set); + var length = keys.length; + for (var i = 0; i < length; i++) { + list.push(this.set[keys[i]]); + } +}; + +HashSet.prototype.size = function () { + return Object.keys(this.set).length; +}; + +HashSet.prototype.addAll = function (list) { + var s = list.length; + for (var i = 0; i < s; i++) { + var v = list[i]; + this.add(v); + } +}; + +module.exports = HashSet; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __nested_webpack_require_105138__) { + +"use strict"; + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * A classic Quicksort algorithm with Hoare's partition + * - Works also on LinkedList objects + * + * Copyright: i-Vis Research Group, Bilkent University, 2007 - present + */ + +var LinkedList = __nested_webpack_require_105138__(11); + +var Quicksort = function () { + function Quicksort(A, compareFunction) { + _classCallCheck(this, Quicksort); + + if (compareFunction !== null || compareFunction !== undefined) this.compareFunction = this._defaultCompareFunction; + + var length = void 0; + if (A instanceof LinkedList) length = A.size();else length = A.length; + + this._quicksort(A, 0, length - 1); + } + + _createClass(Quicksort, [{ + key: '_quicksort', + value: function _quicksort(A, p, r) { + if (p < r) { + var q = this._partition(A, p, r); + this._quicksort(A, p, q); + this._quicksort(A, q + 1, r); + } + } + }, { + key: '_partition', + value: function _partition(A, p, r) { + var x = this._get(A, p); + var i = p; + var j = r; + while (true) { + while (this.compareFunction(x, this._get(A, j))) { + j--; + }while (this.compareFunction(this._get(A, i), x)) { + i++; + }if (i < j) { + this._swap(A, i, j); + i++; + j--; + } else return j; + } + } + }, { + key: '_get', + value: function _get(object, index) { + if (object instanceof LinkedList) return object.get_object_at(index);else return object[index]; + } + }, { + key: '_set', + value: function _set(object, index, value) { + if (object instanceof LinkedList) object.set_object_at(index, value);else object[index] = value; + } + }, { + key: '_swap', + value: function _swap(A, i, j) { + var temp = this._get(A, i); + this._set(A, i, this._get(A, j)); + this._set(A, j, temp); + } + }, { + key: '_defaultCompareFunction', + value: function _defaultCompareFunction(a, b) { + return b > a; + } + }]); + + return Quicksort; +}(); + +module.exports = Quicksort; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string + * sequences by S.B.Needleman and C.D.Wunsch (1970). + * + * Aside from the inputs, you can assign the scores for, + * - Match: The two characters at the current index are same. + * - Mismatch: The two characters at the current index are different. + * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string. + */ + +var NeedlemanWunsch = function () { + function NeedlemanWunsch(sequence1, sequence2) { + var match_score = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + var mismatch_penalty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1; + var gap_penalty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1; + + _classCallCheck(this, NeedlemanWunsch); + + this.sequence1 = sequence1; + this.sequence2 = sequence2; + this.match_score = match_score; + this.mismatch_penalty = mismatch_penalty; + this.gap_penalty = gap_penalty; + + // Just the remove redundancy + this.iMax = sequence1.length + 1; + this.jMax = sequence2.length + 1; + + // Grid matrix of scores + this.grid = new Array(this.iMax); + for (var i = 0; i < this.iMax; i++) { + this.grid[i] = new Array(this.jMax); + + for (var j = 0; j < this.jMax; j++) { + this.grid[i][j] = 0; + } + } + + // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions) + this.tracebackGrid = new Array(this.iMax); + for (var _i = 0; _i < this.iMax; _i++) { + this.tracebackGrid[_i] = new Array(this.jMax); + + for (var _j = 0; _j < this.jMax; _j++) { + this.tracebackGrid[_i][_j] = [null, null, null]; + } + } + + // The aligned sequences (return multiple possibilities) + this.alignments = []; + + // Final alignment score + this.score = -1; + + // Calculate scores and tracebacks + this.computeGrids(); + } + + _createClass(NeedlemanWunsch, [{ + key: "getScore", + value: function getScore() { + return this.score; + } + }, { + key: "getAlignments", + value: function getAlignments() { + return this.alignments; + } + + // Main dynamic programming procedure + + }, { + key: "computeGrids", + value: function computeGrids() { + // Fill in the first row + for (var j = 1; j < this.jMax; j++) { + this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty; + this.tracebackGrid[0][j] = [false, false, true]; + } + + // Fill in the first column + for (var i = 1; i < this.iMax; i++) { + this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty; + this.tracebackGrid[i][0] = [false, true, false]; + } + + // Fill the rest of the grid + for (var _i2 = 1; _i2 < this.iMax; _i2++) { + for (var _j2 = 1; _j2 < this.jMax; _j2++) { + // Find the max score(s) among [`Diag`, `Up`, `Left`] + var diag = void 0; + if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty; + + var up = this.grid[_i2 - 1][_j2] + this.gap_penalty; + var left = this.grid[_i2][_j2 - 1] + this.gap_penalty; + + // If there exists multiple max values, capture them for multiple paths + var maxOf = [diag, up, left]; + var indices = this.arrayAllMaxIndexes(maxOf); + + // Update Grids + this.grid[_i2][_j2] = maxOf[indices[0]]; + this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)]; + } + } + + // Update alignment score + this.score = this.grid[this.iMax - 1][this.jMax - 1]; + } + + // Gets all possible valid sequence combinations + + }, { + key: "alignmentTraceback", + value: function alignmentTraceback() { + var inProcessAlignments = []; + + inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length], + seq1: "", + seq2: "" + }); + + while (inProcessAlignments[0]) { + var current = inProcessAlignments[0]; + var directions = this.tracebackGrid[current.pos[0]][current.pos[1]]; + + if (directions[0]) { + inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1] - 1], + seq1: this.sequence1[current.pos[0] - 1] + current.seq1, + seq2: this.sequence2[current.pos[1] - 1] + current.seq2 + }); + } + if (directions[1]) { + inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1]], + seq1: this.sequence1[current.pos[0] - 1] + current.seq1, + seq2: '-' + current.seq2 + }); + } + if (directions[2]) { + inProcessAlignments.push({ pos: [current.pos[0], current.pos[1] - 1], + seq1: '-' + current.seq1, + seq2: this.sequence2[current.pos[1] - 1] + current.seq2 + }); + } + + if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({ sequence1: current.seq1, + sequence2: current.seq2 + }); + + inProcessAlignments.shift(); + } + + return this.alignments; + } + + // Helper Functions + + }, { + key: "getAllIndexes", + value: function getAllIndexes(arr, val) { + var indexes = [], + i = -1; + while ((i = arr.indexOf(val, i + 1)) !== -1) { + indexes.push(i); + } + return indexes; + } + }, { + key: "arrayAllMaxIndexes", + value: function arrayAllMaxIndexes(array) { + return this.getAllIndexes(array, Math.max.apply(null, array)); + } + }]); + + return NeedlemanWunsch; +}(); + +module.exports = NeedlemanWunsch; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __nested_webpack_require_115611__) { + +"use strict"; + + +var layoutBase = function layoutBase() { + return; +}; + +layoutBase.FDLayout = __nested_webpack_require_115611__(18); +layoutBase.FDLayoutConstants = __nested_webpack_require_115611__(7); +layoutBase.FDLayoutEdge = __nested_webpack_require_115611__(19); +layoutBase.FDLayoutNode = __nested_webpack_require_115611__(20); +layoutBase.DimensionD = __nested_webpack_require_115611__(21); +layoutBase.HashMap = __nested_webpack_require_115611__(22); +layoutBase.HashSet = __nested_webpack_require_115611__(23); +layoutBase.IGeometry = __nested_webpack_require_115611__(8); +layoutBase.IMath = __nested_webpack_require_115611__(9); +layoutBase.Integer = __nested_webpack_require_115611__(10); +layoutBase.Point = __nested_webpack_require_115611__(12); +layoutBase.PointD = __nested_webpack_require_115611__(4); +layoutBase.RandomSeed = __nested_webpack_require_115611__(16); +layoutBase.RectangleD = __nested_webpack_require_115611__(13); +layoutBase.Transform = __nested_webpack_require_115611__(17); +layoutBase.UniqueIDGeneretor = __nested_webpack_require_115611__(14); +layoutBase.Quicksort = __nested_webpack_require_115611__(24); +layoutBase.LinkedList = __nested_webpack_require_115611__(11); +layoutBase.LGraphObject = __nested_webpack_require_115611__(2); +layoutBase.LGraph = __nested_webpack_require_115611__(5); +layoutBase.LEdge = __nested_webpack_require_115611__(1); +layoutBase.LGraphManager = __nested_webpack_require_115611__(6); +layoutBase.LNode = __nested_webpack_require_115611__(3); +layoutBase.Layout = __nested_webpack_require_115611__(15); +layoutBase.LayoutConstants = __nested_webpack_require_115611__(0); +layoutBase.NeedlemanWunsch = __nested_webpack_require_115611__(25); + +module.exports = layoutBase; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function Emitter() { + this.listeners = []; +} + +var p = Emitter.prototype; + +p.addListener = function (event, callback) { + this.listeners.push({ + event: event, + callback: callback + }); +}; + +p.removeListener = function (event, callback) { + for (var i = this.listeners.length; i >= 0; i--) { + var l = this.listeners[i]; + + if (l.event === event && l.callback === callback) { + this.listeners.splice(i, 1); + } + } +}; + +p.emit = function (event, data) { + for (var i = 0; i < this.listeners.length; i++) { + var l = this.listeners[i]; + + if (event === l.event) { + l.callback(data); + } + } +}; + +module.exports = Emitter; + +/***/ }) +/******/ ]); +}); + +/***/ }), + +/***/ 1549: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var hashClear = __webpack_require__(2032), + hashDelete = __webpack_require__(3862), + hashGet = __webpack_require__(6721), + hashHas = __webpack_require__(2749), + hashSet = __webpack_require__(5749); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +module.exports = Hash; + + +/***/ }), + +/***/ 79: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var listCacheClear = __webpack_require__(3702), + listCacheDelete = __webpack_require__(80), + listCacheGet = __webpack_require__(4739), + listCacheHas = __webpack_require__(8655), + listCacheSet = __webpack_require__(1175); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; + + +/***/ }), + +/***/ 8223: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var getNative = __webpack_require__(6110), + root = __webpack_require__(9325); + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'); + +module.exports = Map; + + +/***/ }), + +/***/ 3661: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var mapCacheClear = __webpack_require__(3040), + mapCacheDelete = __webpack_require__(7670), + mapCacheGet = __webpack_require__(289), + mapCacheHas = __webpack_require__(4509), + mapCacheSet = __webpack_require__(2949); + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +module.exports = MapCache; + + +/***/ }), + +/***/ 1873: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var root = __webpack_require__(9325); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; + + +/***/ }), + +/***/ 4932: +/***/ ((module) => { + +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +module.exports = arrayMap; + + +/***/ }), + +/***/ 6547: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var baseAssignValue = __webpack_require__(3360), + eq = __webpack_require__(5288); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignValue; + + +/***/ }), + +/***/ 8406: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var eq = __webpack_require__(5288); + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +module.exports = assocIndexOf; + + +/***/ }), + +/***/ 3360: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var defineProperty = __webpack_require__(3243); + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; + + +/***/ }), + +/***/ 9803: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var castPath = __webpack_require__(1769), + toKey = __webpack_require__(7797); + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; + + +/***/ }), + +/***/ 2552: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var Symbol = __webpack_require__(1873), + getRawTag = __webpack_require__(659), + objectToString = __webpack_require__(9350); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; + + +/***/ }), + +/***/ 5083: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var isFunction = __webpack_require__(6644), + isMasked = __webpack_require__(7296), + isObject = __webpack_require__(3805), + toSource = __webpack_require__(7473); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +module.exports = baseIsNative; + + +/***/ }), + +/***/ 3170: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var assignValue = __webpack_require__(6547), + castPath = __webpack_require__(1769), + isIndex = __webpack_require__(361), + isObject = __webpack_require__(3805), + toKey = __webpack_require__(7797); + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +module.exports = baseSet; + + +/***/ }), + +/***/ 7556: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var Symbol = __webpack_require__(1873), + arrayMap = __webpack_require__(4932), + isArray = __webpack_require__(6449), + isSymbol = __webpack_require__(4394); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = baseToString; + + +/***/ }), + +/***/ 4128: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var trimmedEndIndex = __webpack_require__(1800); + +/** Used to match leading whitespace. */ +var reTrimStart = /^\s+/; + +/** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ +function baseTrim(string) { + return string + ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; +} + +module.exports = baseTrim; + + +/***/ }), + +/***/ 1769: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var isArray = __webpack_require__(6449), + isKey = __webpack_require__(8586), + stringToPath = __webpack_require__(1802), + toString = __webpack_require__(3222); + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); +} + +module.exports = castPath; + + +/***/ }), + +/***/ 3007: +/***/ ((module) => { + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +module.exports = copyArray; + + +/***/ }), + +/***/ 5481: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var root = __webpack_require__(9325); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; + + +/***/ }), + +/***/ 3243: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var getNative = __webpack_require__(6110); + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +module.exports = defineProperty; + + +/***/ }), + +/***/ 4840: +/***/ ((module) => { + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; + + +/***/ }), + +/***/ 2651: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var isKeyable = __webpack_require__(4218); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; + + +/***/ }), + +/***/ 6110: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var baseIsNative = __webpack_require__(5083), + getValue = __webpack_require__(392); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +module.exports = getNative; + + +/***/ }), + +/***/ 659: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var Symbol = __webpack_require__(1873); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; + + +/***/ }), + +/***/ 392: +/***/ ((module) => { + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +module.exports = getValue; + + +/***/ }), + +/***/ 2032: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var nativeCreate = __webpack_require__(1042); + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +module.exports = hashClear; + + +/***/ }), + +/***/ 3862: +/***/ ((module) => { + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +module.exports = hashDelete; + + +/***/ }), + +/***/ 6721: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var nativeCreate = __webpack_require__(1042); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +module.exports = hashGet; + + +/***/ }), + +/***/ 2749: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var nativeCreate = __webpack_require__(1042); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +module.exports = hashHas; + + +/***/ }), + +/***/ 5749: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var nativeCreate = __webpack_require__(1042); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +module.exports = hashSet; + + +/***/ }), + +/***/ 361: +/***/ ((module) => { + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +module.exports = isIndex; + + +/***/ }), + +/***/ 8586: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var isArray = __webpack_require__(6449), + isSymbol = __webpack_require__(4394); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +module.exports = isKey; + + +/***/ }), + +/***/ 4218: +/***/ ((module) => { + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +module.exports = isKeyable; + + +/***/ }), + +/***/ 7296: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var coreJsData = __webpack_require__(5481); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +module.exports = isMasked; + + +/***/ }), + +/***/ 3702: +/***/ ((module) => { + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; + + +/***/ }), + +/***/ 80: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var assocIndexOf = __webpack_require__(8406); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +module.exports = listCacheDelete; + + +/***/ }), + +/***/ 4739: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var assocIndexOf = __webpack_require__(8406); + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; + + +/***/ }), + +/***/ 8655: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var assocIndexOf = __webpack_require__(8406); + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +module.exports = listCacheHas; + + +/***/ }), + +/***/ 1175: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var assocIndexOf = __webpack_require__(8406); + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +module.exports = listCacheSet; + + +/***/ }), + +/***/ 3040: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var Hash = __webpack_require__(1549), + ListCache = __webpack_require__(79), + Map = __webpack_require__(8223); + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +module.exports = mapCacheClear; + + +/***/ }), + +/***/ 7670: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var getMapData = __webpack_require__(2651); + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +module.exports = mapCacheDelete; + + +/***/ }), + +/***/ 289: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var getMapData = __webpack_require__(2651); + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; + + +/***/ }), + +/***/ 4509: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var getMapData = __webpack_require__(2651); + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; + + +/***/ }), + +/***/ 2949: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var getMapData = __webpack_require__(2651); + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; + + +/***/ }), + +/***/ 2224: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var memoize = __webpack_require__(104); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +module.exports = memoizeCapped; + + +/***/ }), + +/***/ 1042: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var getNative = __webpack_require__(6110); + +/* Built-in method references that are verified to be native. */ +var nativeCreate = getNative(Object, 'create'); + +module.exports = nativeCreate; + + +/***/ }), + +/***/ 9350: +/***/ ((module) => { + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; + + +/***/ }), + +/***/ 9325: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var freeGlobal = __webpack_require__(4840); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + + +/***/ }), + +/***/ 1802: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var memoizeCapped = __webpack_require__(2224); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +module.exports = stringToPath; + + +/***/ }), + +/***/ 7797: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var isSymbol = __webpack_require__(4394); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = toKey; + + +/***/ }), + +/***/ 7473: +/***/ ((module) => { + +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +module.exports = toSource; + + +/***/ }), + +/***/ 1800: +/***/ ((module) => { + +/** Used to match a single whitespace character. */ +var reWhitespace = /\s/; + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ +function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; +} + +module.exports = trimmedEndIndex; + + +/***/ }), + +/***/ 8221: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var isObject = __webpack_require__(3805), + now = __webpack_require__(124), + toNumber = __webpack_require__(9374); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +module.exports = debounce; + + +/***/ }), + +/***/ 5288: +/***/ ((module) => { + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +module.exports = eq; + + +/***/ }), + +/***/ 8156: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var baseGet = __webpack_require__(9803); + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +module.exports = get; + + +/***/ }), + +/***/ 6449: +/***/ ((module) => { + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = isArray; + + +/***/ }), + +/***/ 6644: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var baseGetTag = __webpack_require__(2552), + isObject = __webpack_require__(3805); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +module.exports = isFunction; + + +/***/ }), + +/***/ 3805: +/***/ ((module) => { + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + + +/***/ }), + +/***/ 346: +/***/ ((module) => { + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; + + +/***/ }), + +/***/ 4394: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var baseGetTag = __webpack_require__(2552), + isObjectLike = __webpack_require__(346); + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; + + +/***/ }), + +/***/ 104: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var MapCache = __webpack_require__(3661); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Expose `MapCache`. +memoize.Cache = MapCache; + +module.exports = memoize; + + +/***/ }), + +/***/ 124: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var root = __webpack_require__(9325); + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; + +module.exports = now; + + +/***/ }), + +/***/ 3560: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var baseSet = __webpack_require__(3170); + +/** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ +function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); +} + +module.exports = set; + + +/***/ }), + +/***/ 9374: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var baseTrim = __webpack_require__(4128), + isObject = __webpack_require__(3805), + isSymbol = __webpack_require__(4394); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +module.exports = toNumber; + + +/***/ }), + +/***/ 2072: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var arrayMap = __webpack_require__(4932), + copyArray = __webpack_require__(3007), + isArray = __webpack_require__(6449), + isSymbol = __webpack_require__(4394), + stringToPath = __webpack_require__(1802), + toKey = __webpack_require__(7797), + toString = __webpack_require__(3222); + +/** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ +function toPath(value) { + if (isArray(value)) { + return arrayMap(value, toKey); + } + return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); +} + +module.exports = toPath; + + +/***/ }), + +/***/ 3222: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var baseToString = __webpack_require__(7556); + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +module.exports = toString; + + +/***/ }), + +/***/ 3791: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + a: () => (/* binding */ createText), + c: () => (/* binding */ computeDimensionOfText) +}); + +// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +var constructs_namespaceObject = {}; +__webpack_require__.r(constructs_namespaceObject); +__webpack_require__.d(constructs_namespaceObject, { + attentionMarkers: () => (attentionMarkers), + contentInitial: () => (contentInitial), + disable: () => (disable), + document: () => (constructs_document), + flow: () => (constructs_flow), + flowInitial: () => (flowInitial), + insideSpan: () => (insideSpan), + string: () => (constructs_string), + text: () => (constructs_text) +}); + +// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-f47111a7.js + 8 modules +var mermaid_f47111a7 = __webpack_require__(6257); +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js +/** + * @typedef {import('mdast').Root|import('mdast').Content} Node + * + * @typedef Options + * Configuration (optional). + * @property {boolean | null | undefined} [includeImageAlt=true] + * Whether to use `alt` for `image`s. + * @property {boolean | null | undefined} [includeHtml=true] + * Whether to use `value` of HTML. + */ + +/** @type {Options} */ +const emptyOptions = {} + +/** + * Get the text content of a node or list of nodes. + * + * Prefers the node’s plain-text fields, otherwise serializes its children, + * and if the given value is an array, serialize the nodes in it. + * + * @param {unknown} value + * Thing to serialize, typically `Node`. + * @param {Options | null | undefined} [options] + * Configuration (optional). + * @returns {string} + * Serialized `value`. + */ +function lib_toString(value, options) { + const settings = options || emptyOptions + const includeImageAlt = + typeof settings.includeImageAlt === 'boolean' + ? settings.includeImageAlt + : true + const includeHtml = + typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true + + return one(value, includeImageAlt, includeHtml) +} + +/** + * One node or several nodes. + * + * @param {unknown} value + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized node. + */ +function one(value, includeImageAlt, includeHtml) { + if (node(value)) { + if ('value' in value) { + return value.type === 'html' && !includeHtml ? '' : value.value + } + + if (includeImageAlt && 'alt' in value && value.alt) { + return value.alt + } + + if ('children' in value) { + return lib_all(value.children, includeImageAlt, includeHtml) + } + } + + if (Array.isArray(value)) { + return lib_all(value, includeImageAlt, includeHtml) + } + + return '' +} + +/** + * Serialize a list of nodes. + * + * @param {Array<unknown>} values + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized nodes. + */ +function lib_all(values, includeImageAlt, includeHtml) { + /** @type {Array<string>} */ + const result = [] + let index = -1 + + while (++index < values.length) { + result[index] = one(values[index], includeImageAlt, includeHtml) + } + + return result.join('') +} + +/** + * Check if `value` looks like a node. + * + * @param {unknown} value + * Thing. + * @returns {value is Node} + * Whether `value` is a node. + */ +function node(value) { + return Boolean(value && typeof value === 'object') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array<T>} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array<unknown>} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {Array<T>} items + * Items to add to `list`. + * @returns {Array<T>} + * Either `list` or `items`. + */ +function push(list, items) { + if (list.length > 0) { + splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + * @typedef {import('micromark-util-types').Handles} Handles + * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension + * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension + */ + + + +const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty + +/** + * Combine multiple syntax extensions into one. + * + * @param {Array<Extension>} extensions + * List of syntax extensions. + * @returns {NormalizedExtension} + * A single combined extension. + */ +function combineExtensions(extensions) { + /** @type {NormalizedExtension} */ + const all = {} + let index = -1 + + while (++index < extensions.length) { + syntaxExtension(all, extensions[index]) + } + + return all +} + +/** + * Merge `extension` into `all`. + * + * @param {NormalizedExtension} all + * Extension to merge into. + * @param {Extension} extension + * Extension to merge. + * @returns {void} + */ +function syntaxExtension(all, extension) { + /** @type {keyof Extension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + /** @type {Record<string, unknown>} */ + const left = maybe || (all[hook] = {}) + /** @type {Record<string, unknown> | undefined} */ + const right = extension[hook] + /** @type {string} */ + let code + + if (right) { + for (code in right) { + if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] + const value = right[code] + constructs( + // @ts-expect-error Looks like a list. + left[code], + Array.isArray(value) ? value : value ? [value] : [] + ) + } + } + } +} + +/** + * Merge `list` into `existing` (both lists of constructs). + * Mutates `existing`. + * + * @param {Array<unknown>} existing + * @param {Array<unknown>} list + * @returns {void} + */ +function constructs(existing, list) { + let index = -1 + /** @type {Array<unknown>} */ + const before = [] + + while (++index < list.length) { + // @ts-expect-error Looks like an object. + ;(list[index].add === 'after' ? existing : before).push(list[index]) + } + + splice(existing, 0, 0, before) +} + +/** + * Combine multiple HTML extensions into one. + * + * @param {Array<HtmlExtension>} htmlExtensions + * List of HTML extensions. + * @returns {HtmlExtension} + * A single combined HTML extension. + */ +function combineHtmlExtensions(htmlExtensions) { + /** @type {HtmlExtension} */ + const handlers = {} + let index = -1 + + while (++index < htmlExtensions.length) { + htmlExtension(handlers, htmlExtensions[index]) + } + + return handlers +} + +/** + * Merge `extension` into `all`. + * + * @param {HtmlExtension} all + * Extension to merge into. + * @param {HtmlExtension} extension + * Extension to merge. + * @returns {void} + */ +function htmlExtension(all, extension) { + /** @type {keyof HtmlExtension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + const left = maybe || (all[hook] = {}) + const right = extension[hook] + /** @type {keyof Handles} */ + let type + + if (right) { + for (type in right) { + // @ts-expect-error assume document vs regular handler are managed correctly. + left[type] = right[type] + } + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +// This module is generated by `script/`. +// +// CommonMark handles attention (emphasis, strong) markers based on what comes +// before or after them. +// One such difference is if those characters are Unicode punctuation. +// This script is generated from the Unicode data. + +/** + * Regular expression that matches a unicode punctuation character. + */ +const unicodePunctuationRegex = + /[!-\/:-@\[-`\{-~\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]/ + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + + +/** + * Check whether the character code represents an ASCII alpha (`a` through `z`, + * case insensitive). + * + * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. + * + * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) + * to U+005A (`Z`). + * + * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) + * to U+007A (`z`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlpha = regexCheck(/[A-Za-z]/) + +/** + * Check whether the character code represents an ASCII alphanumeric (`a` + * through `z`, case insensitive, or `0` through `9`). + * + * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha + * (see `asciiAlpha`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) + +/** + * Check whether the character code represents an ASCII atext. + * + * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in + * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), + * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F + * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E + * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE + * (`{`) to U+007E TILDE (`~`). + * + * See: + * **\[RFC5322]**: + * [Internet Message Format](https://tools.ietf.org/html/rfc5322). + * P. Resnick. + * IETF. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) + +/** + * Check whether a character code is an ASCII control character. + * + * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) + * to U+001F (US), or U+007F (DEL). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code !== null && (code < 32 || code === 127) + ) +} + +/** + * Check whether the character code represents an ASCII digit (`0` through `9`). + * + * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to + * U+0039 (`9`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiDigit = regexCheck(/\d/) + +/** + * Check whether the character code represents an ASCII hex digit (`a` through + * `f`, case insensitive, or `0` through `9`). + * + * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex + * digit, or an ASCII lower hex digit. + * + * An **ASCII upper hex digit** is a character in the inclusive range U+0041 + * (`A`) to U+0046 (`F`). + * + * An **ASCII lower hex digit** is a character in the inclusive range U+0061 + * (`a`) to U+0066 (`f`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) + +/** + * Check whether the character code represents ASCII punctuation. + * + * An **ASCII punctuation** is a character in the inclusive ranges U+0021 + * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT + * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT + * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) + +/** + * Check whether a character code is a markdown line ending. + * + * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN + * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). + * + * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE + * RETURN (CR) are replaced by these virtual characters depending on whether + * they occurred together. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEnding(code) { + return code !== null && code < -2 +} + +/** + * Check whether a character code is a markdown line ending (see + * `markdownLineEnding`) or markdown space (see `markdownSpace`). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEndingOrSpace(code) { + return code !== null && (code < 0 || code === 32) +} + +/** + * Check whether a character code is a markdown space. + * + * A **markdown space** is the concrete character U+0020 SPACE (SP) and the + * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). + * + * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is + * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL + * SPACE (VS) characters, depending on the column at which the tab occurred. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownSpace(code) { + return code === -2 || code === -1 || code === 32 +} + +// Size note: removing ASCII from the regex and using `asciiPunctuation` here +// In fact adds to the bundle size. +/** + * Check whether the character code represents Unicode punctuation. + * + * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, + * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` + * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` + * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII + * punctuation (see `asciiPunctuation`). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodePunctuation = regexCheck(unicodePunctuationRegex) + +/** + * Check whether the character code represents Unicode whitespace. + * + * Note that this does handle micromark specific markdown whitespace characters. + * See `markdownLineEndingOrSpace` to check that. + * + * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, + * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), + * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodeWhitespace = regexCheck(/\s/) + +/** + * Create a code check from a regex. + * + * @param {RegExp} regex + * @returns {(code: Code) => boolean} + */ +function regexCheck(regex) { + return check + + /** + * Check whether a code matches the bound regex. + * + * @param {Code} code + * Character code. + * @returns {boolean} + * Whether the character code matches the bound regex. + */ + function check(code) { + return code !== null && regex.test(String.fromCharCode(code)) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * spaces in markdown are often optional, in which case this factory can be + * used and `ok` will be switched to whether spaces were found or not + * * one line ending or space can be detected with `markdownSpace(code)` right + * before using `factorySpace` + * + * ###### Examples + * + * Where `␉` represents a tab (plus how much it expands) and `␠` represents a + * single space. + * + * ```markdown + * ␉ + * ␠␠␠␠ + * ␉␠ + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {TokenType} type + * Type (`' \t'`). + * @param {number | undefined} [max=Infinity] + * Max (exclusive). + * @returns + * Start state. + */ +function factorySpace(effects, ok, type, max) { + const limit = max ? max - 1 : Number.POSITIVE_INFINITY + let size = 0 + return start + + /** @type {State} */ + function start(code) { + if (markdownSpace(code)) { + effects.enter(type) + return prefix(code) + } + return ok(code) + } + + /** @type {State} */ + function prefix(code) { + if (markdownSpace(code) && size++ < limit) { + effects.consume(code) + return prefix + } + effects.exit(type) + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + +/** @type {InitialConstruct} */ +const content = { + tokenize: initializeContent +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeContent(effects) { + const contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ) + /** @type {Token} */ + let previous + return contentStart + + /** @type {State} */ + function afterContentStartConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, contentStart, 'linePrefix') + } + + /** @type {State} */ + function paragraphInitial(code) { + effects.enter('paragraph') + return lineStart(code) + } + + /** @type {State} */ + function lineStart(code) { + const token = effects.enter('chunkText', { + contentType: 'text', + previous + }) + if (previous) { + previous.next = token + } + previous = token + return data(code) + } + + /** @type {State} */ + function data(code) { + if (code === null) { + effects.exit('chunkText') + effects.exit('paragraph') + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + effects.exit('chunkText') + return lineStart + } + + // Data. + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + +/** + * @typedef {[Construct, ContainerState]} StackItem + */ + + + + +/** @type {InitialConstruct} */ +const document_document = { + tokenize: initializeDocument +} + +/** @type {Construct} */ +const containerConstruct = { + tokenize: tokenizeContainer +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeDocument(effects) { + const self = this + /** @type {Array<StackItem>} */ + const stack = [] + let continued = 0 + /** @type {TokenizeContext | undefined} */ + let childFlow + /** @type {Token | undefined} */ + let childToken + /** @type {number} */ + let lineStartOffset + return start + + /** @type {State} */ + function start(code) { + // First we iterate through the open blocks, starting with the root + // document, and descending through last children down to the last open + // block. + // Each block imposes a condition that the line must satisfy if the block is + // to remain open. + // For example, a block quote requires a `>` character. + // A paragraph requires a non-blank line. + // In this phase we may match all or just some of the open blocks. + // But we cannot close unmatched blocks yet, because we may have a lazy + // continuation line. + if (continued < stack.length) { + const item = stack[continued] + self.containerState = item[1] + return effects.attempt( + item[0].continuation, + documentContinue, + checkNewContainers + )(code) + } + + // Done. + return checkNewContainers(code) + } + + /** @type {State} */ + function documentContinue(code) { + continued++ + + // Note: this field is called `_closeFlow` but it also closes containers. + // Perhaps a good idea to rename it but it’s already used in the wild by + // extensions. + if (self.containerState._closeFlow) { + self.containerState._closeFlow = undefined + if (childFlow) { + closeFlow() + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when dealing with lazy lines in `writeToChild`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {Point | undefined} */ + let point + + // Find the flow chunk. + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + point = self.events[indexBeforeFlow][1].end + break + } + } + exitContainers(continued) + + // Fix positions. + let index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + return checkNewContainers(code) + } + return start(code) + } + + /** @type {State} */ + function checkNewContainers(code) { + // Next, after consuming the continuation markers for existing blocks, we + // look for new block starts (e.g. `>` for a block quote). + // If we encounter a new block start, we close any blocks unmatched in + // step 1 before creating the new block as a child of the last matched + // block. + if (continued === stack.length) { + // No need to `check` whether there’s a container, of `exitContainers` + // would be moot. + // We can instead immediately `attempt` to parse one. + if (!childFlow) { + return documentContinued(code) + } + + // If we have concrete content, such as block HTML or fenced code, + // we can’t have containers “pierce” into them, so we can immediately + // start. + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { + return flowStart(code) + } + + // If we do have flow, it could still be a blank line, + // but we’d be interrupting it w/ a new container if there’s a current + // construct. + // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer + // needed in micromark-extension-gfm-table@1.0.6). + self.interrupt = Boolean( + childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack + ) + } + + // Check if there is a new container. + self.containerState = {} + return effects.check( + containerConstruct, + thereIsANewContainer, + thereIsNoNewContainer + )(code) + } + + /** @type {State} */ + function thereIsANewContainer(code) { + if (childFlow) closeFlow() + exitContainers(continued) + return documentContinued(code) + } + + /** @type {State} */ + function thereIsNoNewContainer(code) { + self.parser.lazy[self.now().line] = continued !== stack.length + lineStartOffset = self.now().offset + return flowStart(code) + } + + /** @type {State} */ + function documentContinued(code) { + // Try new containers. + self.containerState = {} + return effects.attempt( + containerConstruct, + containerContinue, + flowStart + )(code) + } + + /** @type {State} */ + function containerContinue(code) { + continued++ + stack.push([self.currentConstruct, self.containerState]) + // Try another. + return documentContinued(code) + } + + /** @type {State} */ + function flowStart(code) { + if (code === null) { + if (childFlow) closeFlow() + exitContainers(0) + effects.consume(code) + return + } + childFlow = childFlow || self.parser.flow(self.now()) + effects.enter('chunkFlow', { + contentType: 'flow', + previous: childToken, + _tokenizer: childFlow + }) + return flowContinue(code) + } + + /** @type {State} */ + function flowContinue(code) { + if (code === null) { + writeToChild(effects.exit('chunkFlow'), true) + exitContainers(0) + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + writeToChild(effects.exit('chunkFlow')) + // Get ready for the next line. + continued = 0 + self.interrupt = undefined + return start + } + effects.consume(code) + return flowContinue + } + + /** + * @param {Token} token + * @param {boolean | undefined} [eof] + * @returns {void} + */ + function writeToChild(token, eof) { + const stream = self.sliceStream(token) + if (eof) stream.push(null) + token.previous = childToken + if (childToken) childToken.next = token + childToken = token + childFlow.defineSkip(token.start) + childFlow.write(stream) + + // Alright, so we just added a lazy line: + // + // ```markdown + // > a + // b. + // + // Or: + // + // > ~~~c + // d + // + // Or: + // + // > | e | + // f + // ``` + // + // The construct in the second example (fenced code) does not accept lazy + // lines, so it marked itself as done at the end of its first line, and + // then the content construct parses `d`. + // Most constructs in markdown match on the first line: if the first line + // forms a construct, a non-lazy line can’t “unmake” it. + // + // The construct in the third example is potentially a GFM table, and + // those are *weird*. + // It *could* be a table, from the first line, if the following line + // matches a condition. + // In this case, that second line is lazy, which “unmakes” the first line + // and turns the whole into one content block. + // + // We’ve now parsed the non-lazy and the lazy line, and can figure out + // whether the lazy line started a new flow block. + // If it did, we exit the current containers between the two flow blocks. + if (self.parser.lazy[token.start.line]) { + let index = childFlow.events.length + while (index--) { + if ( + // The token starts before the line ending… + childFlow.events[index][1].start.offset < lineStartOffset && + // …and either is not ended yet… + (!childFlow.events[index][1].end || + // …or ends after it. + childFlow.events[index][1].end.offset > lineStartOffset) + ) { + // Exit: there’s still something open, which means it’s a lazy line + // part of something. + return + } + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when closing flow in `documentContinue`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {boolean | undefined} */ + let seen + /** @type {Point | undefined} */ + let point + + // Find the previous chunk (the one before the lazy line). + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + if (seen) { + point = self.events[indexBeforeFlow][1].end + break + } + seen = true + } + } + exitContainers(continued) + + // Fix positions. + index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + } + } + + /** + * @param {number} size + * @returns {void} + */ + function exitContainers(size) { + let index = stack.length + + // Exit open containers. + while (index-- > size) { + const entry = stack[index] + self.containerState = entry[1] + entry[0].exit.call(self, effects) + } + stack.length = size + } + function closeFlow() { + childFlow.write([null]) + childToken = undefined + childFlow = undefined + self.containerState._closeFlow = undefined + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContainer(effects, ok, nok) { + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok, nok), + 'linePrefix', + this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blankLine = { + tokenize: tokenizeBlankLine, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLine(effects, ok, nok) { + return start + + /** + * Start of blank line. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + return markdownSpace(code) + ? factorySpace(effects, after, 'linePrefix')(code) + : after(code) + } + + /** + * At eof/eol, after optional whitespace. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array<T>} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function micromark_util_chunked_splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array<unknown>} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {Array<T>} items + * Items to add to `list`. + * @returns {Array<T>} + * Either `list` or `items`. + */ +function micromark_util_chunked_push(list, items) { + if (list.length > 0) { + micromark_util_chunked_splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Token} Token + */ + + +/** + * Tokenize subcontent. + * + * @param {Array<Event>} events + * List of events. + * @returns {boolean} + * Whether subtokens were found. + */ +function subtokenize(events) { + /** @type {Record<string, number>} */ + const jumps = {} + let index = -1 + /** @type {Event} */ + let event + /** @type {number | undefined} */ + let lineIndex + /** @type {number} */ + let otherIndex + /** @type {Event} */ + let otherEvent + /** @type {Array<Event>} */ + let parameters + /** @type {Array<Event>} */ + let subevents + /** @type {boolean | undefined} */ + let more + while (++index < events.length) { + while (index in jumps) { + index = jumps[index] + } + event = events[index] + + // Add a hook for the GFM tasklist extension, which needs to know if text + // is in the first content of a list item. + if ( + index && + event[1].type === 'chunkFlow' && + events[index - 1][1].type === 'listItemPrefix' + ) { + subevents = event[1]._tokenizer.events + otherIndex = 0 + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'lineEndingBlank' + ) { + otherIndex += 2 + } + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'content' + ) { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === 'content') { + break + } + if (subevents[otherIndex][1].type === 'chunkText') { + subevents[otherIndex][1]._isInFirstContentOfListItem = true + otherIndex++ + } + } + } + } + + // Enter. + if (event[0] === 'enter') { + if (event[1].contentType) { + Object.assign(jumps, subcontent(events, index)) + index = jumps[index] + more = true + } + } + // Exit. + else if (event[1]._container) { + otherIndex = index + lineIndex = undefined + while (otherIndex--) { + otherEvent = events[otherIndex] + if ( + otherEvent[1].type === 'lineEnding' || + otherEvent[1].type === 'lineEndingBlank' + ) { + if (otherEvent[0] === 'enter') { + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + } + otherEvent[1].type = 'lineEnding' + lineIndex = otherIndex + } + } else { + break + } + } + if (lineIndex) { + // Fix position. + event[1].end = Object.assign({}, events[lineIndex][1].start) + + // Switch container exit w/ line endings. + parameters = events.slice(lineIndex, index) + parameters.unshift(event) + micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) + } + } + } + return !more +} + +/** + * Tokenize embedded tokens. + * + * @param {Array<Event>} events + * @param {number} eventIndex + * @returns {Record<string, number>} + */ +function subcontent(events, eventIndex) { + const token = events[eventIndex][1] + const context = events[eventIndex][2] + let startPosition = eventIndex - 1 + /** @type {Array<number>} */ + const startPositions = [] + const tokenizer = + token._tokenizer || context.parser[token.contentType](token.start) + const childEvents = tokenizer.events + /** @type {Array<[number, number]>} */ + const jumps = [] + /** @type {Record<string, number>} */ + const gaps = {} + /** @type {Array<Chunk>} */ + let stream + /** @type {Token | undefined} */ + let previous + let index = -1 + /** @type {Token | undefined} */ + let current = token + let adjust = 0 + let start = 0 + const breaks = [start] + + // Loop forward through the linked tokens to pass them in order to the + // subtokenizer. + while (current) { + // Find the position of the event for this token. + while (events[++startPosition][1] !== current) { + // Empty. + } + startPositions.push(startPosition) + if (!current._tokenizer) { + stream = context.sliceStream(current) + if (!current.next) { + stream.push(null) + } + if (previous) { + tokenizer.defineSkip(current.start) + } + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true + } + tokenizer.write(stream) + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = undefined + } + } + + // Unravel the next token. + previous = current + current = current.next + } + + // Now, loop back through all events (and linked tokens), to figure out which + // parts belong where. + current = token + while (++index < childEvents.length) { + if ( + // Find a void token that includes a break. + childEvents[index][0] === 'exit' && + childEvents[index - 1][0] === 'enter' && + childEvents[index][1].type === childEvents[index - 1][1].type && + childEvents[index][1].start.line !== childEvents[index][1].end.line + ) { + start = index + 1 + breaks.push(start) + // Help GC. + current._tokenizer = undefined + current.previous = undefined + current = current.next + } + } + + // Help GC. + tokenizer.events = [] + + // If there’s one more token (which is the cases for lines that end in an + // EOF), that’s perfect: the last point we found starts it. + // If there isn’t then make sure any remaining content is added to it. + if (current) { + // Help GC. + current._tokenizer = undefined + current.previous = undefined + } else { + breaks.pop() + } + + // Now splice the events from the subtokenizer into the current events, + // moving back to front so that splice indices aren’t affected. + index = breaks.length + while (index--) { + const slice = childEvents.slice(breaks[index], breaks[index + 1]) + const start = startPositions.pop() + jumps.unshift([start, start + slice.length - 1]) + micromark_util_chunked_splice(events, start, 2, slice) + } + index = -1 + while (++index < jumps.length) { + gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] + adjust += jumps[index][1] - jumps[index][0] - 1 + } + return gaps +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** + * No name because it must not be turned off. + * @type {Construct} + */ +const content_content = { + tokenize: tokenizeContent, + resolve: resolveContent +} + +/** @type {Construct} */ +const continuationConstruct = { + tokenize: tokenizeContinuation, + partial: true +} + +/** + * Content is transparent: it’s parsed right now. That way, definitions are also + * parsed right now: before text in paragraphs (specifically, media) are parsed. + * + * @type {Resolver} + */ +function resolveContent(events) { + subtokenize(events) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContent(effects, ok) { + /** @type {Token | undefined} */ + let previous + return chunkStart + + /** + * Before a content chunk. + * + * ```markdown + * > | abc + * ^ + * ``` + * + * @type {State} + */ + function chunkStart(code) { + effects.enter('content') + previous = effects.enter('chunkContent', { + contentType: 'content' + }) + return chunkInside(code) + } + + /** + * In a content chunk. + * + * ```markdown + * > | abc + * ^^^ + * ``` + * + * @type {State} + */ + function chunkInside(code) { + if (code === null) { + return contentEnd(code) + } + + // To do: in `markdown-rs`, each line is parsed on its own, and everything + // is stitched together resolving. + if (markdownLineEnding(code)) { + return effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code) + } + + // Data. + effects.consume(code) + return chunkInside + } + + /** + * + * + * @type {State} + */ + function contentEnd(code) { + effects.exit('chunkContent') + effects.exit('content') + return ok(code) + } + + /** + * + * + * @type {State} + */ + function contentContinue(code) { + effects.consume(code) + effects.exit('chunkContent') + previous.next = effects.enter('chunkContent', { + contentType: 'content', + previous + }) + previous = previous.next + return chunkInside + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContinuation(effects, ok, nok) { + const self = this + return startLookahead + + /** + * + * + * @type {State} + */ + function startLookahead(code) { + effects.exit('chunkContent') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, prefixed, 'linePrefix') + } + + /** + * + * + * @type {State} + */ + function prefixed(code) { + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + + // Always populated by defaults. + + const tail = self.events[self.events.length - 1] + if ( + !self.parser.constructs.disable.null.includes('codeIndented') && + tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ) { + return ok(code) + } + return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + + +/** @type {InitialConstruct} */ +const flow = { + tokenize: initializeFlow +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeFlow(effects) { + const self = this + const initial = effects.attempt( + // Try to parse a blank line. + blankLine, + atBlankEnding, + // Try to parse initial flow (essentially, only code). + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content_content, afterConstruct) + ), + 'linePrefix' + ) + ) + ) + return initial + + /** @type {State} */ + function atBlankEnding(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEndingBlank') + effects.consume(code) + effects.exit('lineEndingBlank') + self.currentConstruct = undefined + return initial + } + + /** @type {State} */ + function afterConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + self.currentConstruct = undefined + return initial + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +const resolver = { + resolveAll: createResolver() +} +const string = initializeFactory('string') +const text_text = initializeFactory('text') + +/** + * @param {'string' | 'text'} field + * @returns {InitialConstruct} + */ +function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: createResolver( + field === 'text' ? resolveAllLineSuffixes : undefined + ) + } + + /** + * @this {TokenizeContext} + * @type {Initializer} + */ + function initializeText(effects) { + const self = this + const constructs = this.parser.constructs[field] + const text = effects.attempt(constructs, start, notText) + return start + + /** @type {State} */ + function start(code) { + return atBreak(code) ? text(code) : notText(code) + } + + /** @type {State} */ + function notText(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('data') + effects.consume(code) + return data + } + + /** @type {State} */ + function data(code) { + if (atBreak(code)) { + effects.exit('data') + return text(code) + } + + // Data. + effects.consume(code) + return data + } + + /** + * @param {Code} code + * @returns {boolean} + */ + function atBreak(code) { + if (code === null) { + return true + } + const list = constructs[code] + let index = -1 + if (list) { + // Always populated by defaults. + + while (++index < list.length) { + const item = list[index] + if (!item.previous || item.previous.call(self, self.previous)) { + return true + } + } + } + return false + } + } +} + +/** + * @param {Resolver | undefined} [extraResolver] + * @returns {Resolver} + */ +function createResolver(extraResolver) { + return resolveAllText + + /** @type {Resolver} */ + function resolveAllText(events, context) { + let index = -1 + /** @type {number | undefined} */ + let enter + + // A rather boring computation (to merge adjacent `data` events) which + // improves mm performance by 29%. + while (++index <= events.length) { + if (enter === undefined) { + if (events[index] && events[index][1].type === 'data') { + enter = index + index++ + } + } else if (!events[index] || events[index][1].type !== 'data') { + // Don’t do anything if there is one data token. + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + index = enter + 2 + } + enter = undefined + } + } + return extraResolver ? extraResolver(events, context) : events + } +} + +/** + * A rather ugly set of instructions which again looks at chunks in the input + * stream. + * The reason to do this here is that it is *much* faster to parse in reverse. + * And that we can’t hook into `null` to split the line suffix before an EOF. + * To do: figure out if we can make this into a clean utility, or even in core. + * As it will be useful for GFMs literal autolink extension (and maybe even + * tables?) + * + * @type {Resolver} + */ +function resolveAllLineSuffixes(events, context) { + let eventIndex = 0 // Skip first. + + while (++eventIndex <= events.length) { + if ( + (eventIndex === events.length || + events[eventIndex][1].type === 'lineEnding') && + events[eventIndex - 1][1].type === 'data' + ) { + const data = events[eventIndex - 1][1] + const chunks = context.sliceStream(data) + let index = chunks.length + let bufferIndex = -1 + let size = 0 + /** @type {boolean | undefined} */ + let tabs + while (index--) { + const chunk = chunks[index] + if (typeof chunk === 'string') { + bufferIndex = chunk.length + while (chunk.charCodeAt(bufferIndex - 1) === 32) { + size++ + bufferIndex-- + } + if (bufferIndex) break + bufferIndex = -1 + } + // Number + else if (chunk === -2) { + tabs = true + size++ + } else if (chunk === -1) { + // Empty + } else { + // Replacement character, exit. + index++ + break + } + } + if (size) { + const token = { + type: + eventIndex === events.length || tabs || size < 2 + ? 'lineSuffix' + : 'hardBreakTrailing', + start: { + line: data.end.line, + column: data.end.column - size, + offset: data.end.offset - size, + _index: data.start._index + index, + _bufferIndex: index + ? bufferIndex + : data.start._bufferIndex + bufferIndex + }, + end: Object.assign({}, data.end) + } + data.end = Object.assign({}, token.start) + if (data.start.offset === data.end.offset) { + Object.assign(data, token) + } else { + events.splice( + eventIndex, + 0, + ['enter', token, context], + ['exit', token, context] + ) + eventIndex += 2 + } + } + eventIndex++ + } + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js +/** + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * Call all `resolveAll`s. + * + * @param {Array<{resolveAll?: Resolver | undefined}>} constructs + * List of constructs, optionally with `resolveAll`s. + * @param {Array<Event>} events + * List of events. + * @param {TokenizeContext} context + * Context used by `tokenize`. + * @returns {Array<Event>} + * Changed events. + */ +function resolveAll(constructs, events, context) { + /** @type {Array<Resolver>} */ + const called = [] + let index = -1 + + while (++index < constructs.length) { + const resolve = constructs[index].resolveAll + + if (resolve && !called.includes(resolve)) { + events = resolve(events, context) + called.push(resolve) + } + } + + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenType} TokenType + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * @callback Restore + * @returns {void} + * + * @typedef Info + * @property {Restore} restore + * @property {number} from + * + * @callback ReturnHandle + * Handle a successful run. + * @param {Construct} construct + * @param {Info} info + * @returns {void} + */ + + + + +/** + * Create a tokenizer. + * Tokenizers deal with one type of data (e.g., containers, flow, text). + * The parser is the object dealing with it all. + * `initialize` works like other constructs, except that only its `tokenize` + * function is used, in which case it doesn’t receive an `ok` or `nok`. + * `from` can be given to set the point before the first character, although + * when further lines are indented, they must be set with `defineSkip`. + * + * @param {ParseContext} parser + * @param {InitialConstruct} initialize + * @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from] + * @returns {TokenizeContext} + */ +function createTokenizer(parser, initialize, from) { + /** @type {Point} */ + let point = Object.assign( + from + ? Object.assign({}, from) + : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ) + /** @type {Record<string, number>} */ + const columnStart = {} + /** @type {Array<Construct>} */ + const resolveAllConstructs = [] + /** @type {Array<Chunk>} */ + let chunks = [] + /** @type {Array<Token>} */ + let stack = [] + /** @type {boolean | undefined} */ + let consumed = true + + /** + * Tools used for tokenizing. + * + * @type {Effects} + */ + const effects = { + consume, + enter, + exit, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, { + interrupt: true + }) + } + + /** + * State and tools for resolving and serializing. + * + * @type {TokenizeContext} + */ + const context = { + previous: null, + code: null, + containerState: {}, + events: [], + parser, + sliceStream, + sliceSerialize, + now, + defineSkip, + write + } + + /** + * The state function. + * + * @type {State | void} + */ + let state = initialize.tokenize.call(context, effects) + + /** + * Track which character we expect to be consumed, to catch bugs. + * + * @type {Code} + */ + let expectedCode + if (initialize.resolveAll) { + resolveAllConstructs.push(initialize) + } + return context + + /** @type {TokenizeContext['write']} */ + function write(slice) { + chunks = push(chunks, slice) + main() + + // Exit if we’re not done, resolve might change stuff. + if (chunks[chunks.length - 1] !== null) { + return [] + } + addResult(initialize, 0) + + // Otherwise, resolve, and exit. + context.events = resolveAll(resolveAllConstructs, context.events, context) + return context.events + } + + // + // Tools. + // + + /** @type {TokenizeContext['sliceSerialize']} */ + function sliceSerialize(token, expandTabs) { + return serializeChunks(sliceStream(token), expandTabs) + } + + /** @type {TokenizeContext['sliceStream']} */ + function sliceStream(token) { + return sliceChunks(chunks, token) + } + + /** @type {TokenizeContext['now']} */ + function now() { + // This is a hot path, so we clone manually instead of `Object.assign({}, point)` + const {line, column, offset, _index, _bufferIndex} = point + return { + line, + column, + offset, + _index, + _bufferIndex + } + } + + /** @type {TokenizeContext['defineSkip']} */ + function defineSkip(value) { + columnStart[value.line] = value.column + accountForPotentialSkip() + } + + // + // State management. + // + + /** + * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by + * `consume`). + * Here is where we walk through the chunks, which either include strings of + * several characters, or numerical character codes. + * The reason to do this in a loop instead of a call is so the stack can + * drain. + * + * @returns {void} + */ + function main() { + /** @type {number} */ + let chunkIndex + while (point._index < chunks.length) { + const chunk = chunks[point._index] + + // If we’re in a buffer chunk, loop through it. + if (typeof chunk === 'string') { + chunkIndex = point._index + if (point._bufferIndex < 0) { + point._bufferIndex = 0 + } + while ( + point._index === chunkIndex && + point._bufferIndex < chunk.length + ) { + go(chunk.charCodeAt(point._bufferIndex)) + } + } else { + go(chunk) + } + } + } + + /** + * Deal with one code. + * + * @param {Code} code + * @returns {void} + */ + function go(code) { + consumed = undefined + expectedCode = code + state = state(code) + } + + /** @type {Effects['consume']} */ + function consume(code) { + if (markdownLineEnding(code)) { + point.line++ + point.column = 1 + point.offset += code === -3 ? 2 : 1 + accountForPotentialSkip() + } else if (code !== -1) { + point.column++ + point.offset++ + } + + // Not in a string chunk. + if (point._bufferIndex < 0) { + point._index++ + } else { + point._bufferIndex++ + + // At end of string chunk. + // @ts-expect-error Points w/ non-negative `_bufferIndex` reference + // strings. + if (point._bufferIndex === chunks[point._index].length) { + point._bufferIndex = -1 + point._index++ + } + } + + // Expose the previous character. + context.previous = code + + // Mark as consumed. + consumed = true + } + + /** @type {Effects['enter']} */ + function enter(type, fields) { + /** @type {Token} */ + // @ts-expect-error Patch instead of assign required fields to help GC. + const token = fields || {} + token.type = type + token.start = now() + context.events.push(['enter', token, context]) + stack.push(token) + return token + } + + /** @type {Effects['exit']} */ + function exit(type) { + const token = stack.pop() + token.end = now() + context.events.push(['exit', token, context]) + return token + } + + /** + * Use results. + * + * @type {ReturnHandle} + */ + function onsuccessfulconstruct(construct, info) { + addResult(construct, info.from) + } + + /** + * Discard results. + * + * @type {ReturnHandle} + */ + function onsuccessfulcheck(_, info) { + info.restore() + } + + /** + * Factory to attempt/check/interrupt. + * + * @param {ReturnHandle} onreturn + * @param {{interrupt?: boolean | undefined} | undefined} [fields] + */ + function constructFactory(onreturn, fields) { + return hook + + /** + * Handle either an object mapping codes to constructs, a list of + * constructs, or a single construct. + * + * @param {Array<Construct> | Construct | ConstructRecord} constructs + * @param {State} returnState + * @param {State | undefined} [bogusState] + * @returns {State} + */ + function hook(constructs, returnState, bogusState) { + /** @type {Array<Construct>} */ + let listOfConstructs + /** @type {number} */ + let constructIndex + /** @type {Construct} */ + let currentConstruct + /** @type {Info} */ + let info + return Array.isArray(constructs) /* c8 ignore next 1 */ + ? handleListOfConstructs(constructs) + : 'tokenize' in constructs + ? // @ts-expect-error Looks like a construct. + handleListOfConstructs([constructs]) + : handleMapOfConstructs(constructs) + + /** + * Handle a list of construct. + * + * @param {ConstructRecord} map + * @returns {State} + */ + function handleMapOfConstructs(map) { + return start + + /** @type {State} */ + function start(code) { + const def = code !== null && map[code] + const all = code !== null && map.null + const list = [ + // To do: add more extension tests. + /* c8 ignore next 2 */ + ...(Array.isArray(def) ? def : def ? [def] : []), + ...(Array.isArray(all) ? all : all ? [all] : []) + ] + return handleListOfConstructs(list)(code) + } + } + + /** + * Handle a list of construct. + * + * @param {Array<Construct>} list + * @returns {State} + */ + function handleListOfConstructs(list) { + listOfConstructs = list + constructIndex = 0 + if (list.length === 0) { + return bogusState + } + return handleConstruct(list[constructIndex]) + } + + /** + * Handle a single construct. + * + * @param {Construct} construct + * @returns {State} + */ + function handleConstruct(construct) { + return start + + /** @type {State} */ + function start(code) { + // To do: not needed to store if there is no bogus state, probably? + // Currently doesn’t work because `inspect` in document does a check + // w/o a bogus, which doesn’t make sense. But it does seem to help perf + // by not storing. + info = store() + currentConstruct = construct + if (!construct.partial) { + context.currentConstruct = construct + } + + // Always populated by defaults. + + if ( + construct.name && + context.parser.constructs.disable.null.includes(construct.name) + ) { + return nok(code) + } + return construct.tokenize.call( + // If we do have fields, create an object w/ `context` as its + // prototype. + // This allows a “live binding”, which is needed for `interrupt`. + fields ? Object.assign(Object.create(context), fields) : context, + effects, + ok, + nok + )(code) + } + } + + /** @type {State} */ + function ok(code) { + consumed = true + onreturn(currentConstruct, info) + return returnState + } + + /** @type {State} */ + function nok(code) { + consumed = true + info.restore() + if (++constructIndex < listOfConstructs.length) { + return handleConstruct(listOfConstructs[constructIndex]) + } + return bogusState + } + } + } + + /** + * @param {Construct} construct + * @param {number} from + * @returns {void} + */ + function addResult(construct, from) { + if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { + resolveAllConstructs.push(construct) + } + if (construct.resolve) { + splice( + context.events, + from, + context.events.length - from, + construct.resolve(context.events.slice(from), context) + ) + } + if (construct.resolveTo) { + context.events = construct.resolveTo(context.events, context) + } + } + + /** + * Store state. + * + * @returns {Info} + */ + function store() { + const startPoint = now() + const startPrevious = context.previous + const startCurrentConstruct = context.currentConstruct + const startEventsIndex = context.events.length + const startStack = Array.from(stack) + return { + restore, + from: startEventsIndex + } + + /** + * Restore state. + * + * @returns {void} + */ + function restore() { + point = startPoint + context.previous = startPrevious + context.currentConstruct = startCurrentConstruct + context.events.length = startEventsIndex + stack = startStack + accountForPotentialSkip() + } + } + + /** + * Move the current point a bit forward in the line when it’s on a column + * skip. + * + * @returns {void} + */ + function accountForPotentialSkip() { + if (point.line in columnStart && point.column < 2) { + point.column = columnStart[point.line] + point.offset += columnStart[point.line] - 1 + } + } +} + +/** + * Get the chunks from a slice of chunks in the range of a token. + * + * @param {Array<Chunk>} chunks + * @param {Pick<Token, 'end' | 'start'>} token + * @returns {Array<Chunk>} + */ +function sliceChunks(chunks, token) { + const startIndex = token.start._index + const startBufferIndex = token.start._bufferIndex + const endIndex = token.end._index + const endBufferIndex = token.end._bufferIndex + /** @type {Array<Chunk>} */ + let view + if (startIndex === endIndex) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] + } else { + view = chunks.slice(startIndex, endIndex) + if (startBufferIndex > -1) { + const head = view[0] + if (typeof head === 'string') { + view[0] = head.slice(startBufferIndex) + } else { + view.shift() + } + } + if (endBufferIndex > 0) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view.push(chunks[endIndex].slice(0, endBufferIndex)) + } + } + return view +} + +/** + * Get the string value of a slice of chunks. + * + * @param {Array<Chunk>} chunks + * @param {boolean | undefined} [expandTabs=false] + * @returns {string} + */ +function serializeChunks(chunks, expandTabs) { + let index = -1 + /** @type {Array<string>} */ + const result = [] + /** @type {boolean | undefined} */ + let atTab + while (++index < chunks.length) { + const chunk = chunks[index] + /** @type {string} */ + let value + if (typeof chunk === 'string') { + value = chunk + } else + switch (chunk) { + case -5: { + value = '\r' + break + } + case -4: { + value = '\n' + break + } + case -3: { + value = '\r' + '\n' + break + } + case -2: { + value = expandTabs ? ' ' : '\t' + break + } + case -1: { + if (!expandTabs && atTab) continue + value = ' ' + break + } + default: { + // Currently only replacement character. + value = String.fromCharCode(chunk) + } + } + atTab = chunk === -2 + result.push(value) + } + return result.join('') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const thematicBreak = { + name: 'thematicBreak', + tokenize: tokenizeThematicBreak +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeThematicBreak(effects, ok, nok) { + let size = 0 + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of thematic break. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('thematicBreak') + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * After optional whitespace, at marker. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + marker = code + return atBreak(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.enter('thematicBreakSequence') + return sequence(code) + } + if (size >= 3 && (code === null || markdownLineEnding(code))) { + effects.exit('thematicBreak') + return ok(code) + } + return nok(code) + } + + /** + * In sequence. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function sequence(code) { + if (code === marker) { + effects.consume(code) + size++ + return sequence + } + effects.exit('thematicBreakSequence') + return markdownSpace(code) + ? factorySpace(effects, atBreak, 'whitespace')(code) + : atBreak(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + +/** @type {Construct} */ +const list = { + name: 'list', + tokenize: tokenizeListStart, + continuation: { + tokenize: tokenizeListContinuation + }, + exit: tokenizeListEnd +} + +/** @type {Construct} */ +const listItemPrefixWhitespaceConstruct = { + tokenize: tokenizeListItemPrefixWhitespace, + partial: true +} + +/** @type {Construct} */ +const indentConstruct = { + tokenize: tokenizeIndent, + partial: true +} + +// To do: `markdown-rs` parses list items on their own and later stitches them +// together. + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListStart(effects, ok, nok) { + const self = this + const tail = self.events[self.events.length - 1] + let initialSize = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + let size = 0 + return start + + /** @type {State} */ + function start(code) { + const kind = + self.containerState.type || + (code === 42 || code === 43 || code === 45 + ? 'listUnordered' + : 'listOrdered') + if ( + kind === 'listUnordered' + ? !self.containerState.marker || code === self.containerState.marker + : asciiDigit(code) + ) { + if (!self.containerState.type) { + self.containerState.type = kind + effects.enter(kind, { + _container: true + }) + } + if (kind === 'listUnordered') { + effects.enter('listItemPrefix') + return code === 42 || code === 45 + ? effects.check(thematicBreak, nok, atMarker)(code) + : atMarker(code) + } + if (!self.interrupt || code === 49) { + effects.enter('listItemPrefix') + effects.enter('listItemValue') + return inside(code) + } + } + return nok(code) + } + + /** @type {State} */ + function inside(code) { + if (asciiDigit(code) && ++size < 10) { + effects.consume(code) + return inside + } + if ( + (!self.interrupt || size < 2) && + (self.containerState.marker + ? code === self.containerState.marker + : code === 41 || code === 46) + ) { + effects.exit('listItemValue') + return atMarker(code) + } + return nok(code) + } + + /** + * @type {State} + **/ + function atMarker(code) { + effects.enter('listItemMarker') + effects.consume(code) + effects.exit('listItemMarker') + self.containerState.marker = self.containerState.marker || code + return effects.check( + blankLine, + // Can’t be empty when interrupting. + self.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ) + } + + /** @type {State} */ + function onBlank(code) { + self.containerState.initialBlankLine = true + initialSize++ + return endOfPrefix(code) + } + + /** @type {State} */ + function otherPrefix(code) { + if (markdownSpace(code)) { + effects.enter('listItemPrefixWhitespace') + effects.consume(code) + effects.exit('listItemPrefixWhitespace') + return endOfPrefix + } + return nok(code) + } + + /** @type {State} */ + function endOfPrefix(code) { + self.containerState.size = + initialSize + + self.sliceSerialize(effects.exit('listItemPrefix'), true).length + return ok(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListContinuation(effects, ok, nok) { + const self = this + self.containerState._closeFlow = undefined + return effects.check(blankLine, onBlank, notBlank) + + /** @type {State} */ + function onBlank(code) { + self.containerState.furtherBlankLines = + self.containerState.furtherBlankLines || + self.containerState.initialBlankLine + + // We have a blank line. + // Still, try to consume at most the items size. + return factorySpace( + effects, + ok, + 'listItemIndent', + self.containerState.size + 1 + )(code) + } + + /** @type {State} */ + function notBlank(code) { + if (self.containerState.furtherBlankLines || !markdownSpace(code)) { + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return notInCurrentItem(code) + } + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) + } + + /** @type {State} */ + function notInCurrentItem(code) { + // While we do continue, we signal that the flow should be closed. + self.containerState._closeFlow = true + // As we’re closing flow, we’re no longer interrupting. + self.interrupt = undefined + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(list, ok, nok), + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeIndent(effects, ok, nok) { + const self = this + return factorySpace( + effects, + afterPrefix, + 'listItemIndent', + self.containerState.size + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'listItemIndent' && + tail[2].sliceSerialize(tail[1], true).length === self.containerState.size + ? ok(code) + : nok(code) + } +} + +/** + * @type {Exiter} + * @this {TokenizeContext} + */ +function tokenizeListEnd(effects) { + effects.exit(this.containerState.type) +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListItemPrefixWhitespace(effects, ok, nok) { + const self = this + + // Always populated by defaults. + + return factorySpace( + effects, + afterPrefix, + 'listItemPrefixWhitespace', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return !markdownSpace(code) && + tail && + tail[1].type === 'listItemPrefixWhitespace' + ? ok(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blockQuote = { + name: 'blockQuote', + tokenize: tokenizeBlockQuoteStart, + continuation: { + tokenize: tokenizeBlockQuoteContinuation + }, + exit +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteStart(effects, ok, nok) { + const self = this + return start + + /** + * Start of block quote. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 62) { + const state = self.containerState + if (!state.open) { + effects.enter('blockQuote', { + _container: true + }) + state.open = true + } + effects.enter('blockQuotePrefix') + effects.enter('blockQuoteMarker') + effects.consume(code) + effects.exit('blockQuoteMarker') + return after + } + return nok(code) + } + + /** + * After `>`, before optional whitespace. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownSpace(code)) { + effects.enter('blockQuotePrefixWhitespace') + effects.consume(code) + effects.exit('blockQuotePrefixWhitespace') + effects.exit('blockQuotePrefix') + return ok + } + effects.exit('blockQuotePrefix') + return ok(code) + } +} + +/** + * Start of block quote continuation. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteContinuation(effects, ok, nok) { + const self = this + return contStart + + /** + * Start of block quote continuation. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contStart(code) { + if (markdownSpace(code)) { + // Always populated by defaults. + + return factorySpace( + effects, + contBefore, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } + return contBefore(code) + } + + /** + * At `>`, after optional whitespace. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contBefore(code) { + return effects.attempt(blockQuote, ok, nok)(code) + } +} + +/** @type {Exiter} */ +function exit(effects) { + effects.exit('blockQuote') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse destinations. + * + * ###### Examples + * + * ```markdown + * <a> + * <a\>b> + * <a b> + * <a)> + * a + * a\)b + * a(b)c + * a(b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type for whole (`<a>` or `b`). + * @param {TokenType} literalType + * Type when enclosed (`<a>`). + * @param {TokenType} literalMarkerType + * Type for enclosing (`<` and `>`). + * @param {TokenType} rawType + * Type when not enclosed (`b`). + * @param {TokenType} stringType + * Type for the value (`a` or `b`). + * @param {number | undefined} [max=Infinity] + * Depth of nested parens (inclusive). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryDestination( + effects, + ok, + nok, + type, + literalType, + literalMarkerType, + rawType, + stringType, + max +) { + const limit = max || Number.POSITIVE_INFINITY + let balance = 0 + return start + + /** + * Start of destination. + * + * ```markdown + * > | <aa> + * ^ + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 60) { + effects.enter(type) + effects.enter(literalType) + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + return enclosedBefore + } + + // ASCII control, space, closing paren. + if (code === null || code === 32 || code === 41 || asciiControl(code)) { + return nok(code) + } + effects.enter(type) + effects.enter(rawType) + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return raw(code) + } + + /** + * After `<`, at an enclosed destination. + * + * ```markdown + * > | <aa> + * ^ + * ``` + * + * @type {State} + */ + function enclosedBefore(code) { + if (code === 62) { + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + effects.exit(literalType) + effects.exit(type) + return ok + } + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return enclosed(code) + } + + /** + * In enclosed destination. + * + * ```markdown + * > | <aa> + * ^ + * ``` + * + * @type {State} + */ + function enclosed(code) { + if (code === 62) { + effects.exit('chunkString') + effects.exit(stringType) + return enclosedBefore(code) + } + if (code === null || code === 60 || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? enclosedEscape : enclosed + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | <a\*a> + * ^ + * ``` + * + * @type {State} + */ + function enclosedEscape(code) { + if (code === 60 || code === 62 || code === 92) { + effects.consume(code) + return enclosed + } + return enclosed(code) + } + + /** + * In raw destination. + * + * ```markdown + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function raw(code) { + if ( + !balance && + (code === null || code === 41 || markdownLineEndingOrSpace(code)) + ) { + effects.exit('chunkString') + effects.exit(stringType) + effects.exit(rawType) + effects.exit(type) + return ok(code) + } + if (balance < limit && code === 40) { + effects.consume(code) + balance++ + return raw + } + if (code === 41) { + effects.consume(code) + balance-- + return raw + } + + // ASCII control (but *not* `\0`) and space and `(`. + // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it + // doesn’t. + if (code === null || code === 32 || code === 40 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? rawEscape : raw + } + + /** + * After `\`, at special character. + * + * ```markdown + * > | a\*a + * ^ + * ``` + * + * @type {State} + */ + function rawEscape(code) { + if (code === 40 || code === 41 || code === 92) { + effects.consume(code) + return raw + } + return raw(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse labels. + * + * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. + * + * ###### Examples + * + * ```markdown + * [a] + * [a + * b] + * [a\]b] + * ``` + * + * @this {TokenizeContext} + * Tokenize context. + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole label (`[a]`). + * @param {TokenType} markerType + * Type for the markers (`[` and `]`). + * @param {TokenType} stringType + * Type for the identifier (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryLabel(effects, ok, nok, type, markerType, stringType) { + const self = this + let size = 0 + /** @type {boolean} */ + let seen + return start + + /** + * Start of label. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.enter(stringType) + return atBreak + } + + /** + * In label, at something, before something else. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if ( + size > 999 || + code === null || + code === 91 || + (code === 93 && !seen) || + // To do: remove in the future once we’ve switched from + // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + // which doesn’t need this. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + (code === 94 && + !size && + '_hiddenFootnoteSupport' in self.parser.constructs) + ) { + return nok(code) + } + if (code === 93) { + effects.exit(stringType) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + + // To do: indent? Link chunks and EOLs together? + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return atBreak + } + effects.enter('chunkString', { + contentType: 'string' + }) + return labelInside(code) + } + + /** + * In label, in text. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function labelInside(code) { + if ( + code === null || + code === 91 || + code === 93 || + markdownLineEnding(code) || + size++ > 999 + ) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + if (!seen) seen = !markdownSpace(code) + return code === 92 ? labelEscape : labelInside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | [a\*a] + * ^ + * ``` + * + * @type {State} + */ + function labelEscape(code) { + if (code === 91 || code === 92 || code === 93) { + effects.consume(code) + size++ + return labelInside + } + return labelInside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +/** + * Parse titles. + * + * ###### Examples + * + * ```markdown + * "a" + * 'b' + * (c) + * "a + * b" + * 'a + * b' + * (a\)b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole title (`"a"`, `'b'`, `(c)`). + * @param {TokenType} markerType + * Type for the markers (`"`, `'`, `(`, and `)`). + * @param {TokenType} stringType + * Type for the value (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryTitle(effects, ok, nok, type, markerType, stringType) { + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of title. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 34 || code === 39 || code === 40) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + marker = code === 40 ? 41 : code + return begin + } + return nok(code) + } + + /** + * After opening marker. + * + * This is also used at the closing marker. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function begin(code) { + if (code === marker) { + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + effects.enter(stringType) + return atBreak(code) + } + + /** + * At something, before something else. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.exit(stringType) + return begin(marker) + } + if (code === null) { + return nok(code) + } + + // Note: blank lines can’t exist in content. + if (markdownLineEnding(code)) { + // To do: use `space_or_tab_eol_with_options`, connect. + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, atBreak, 'linePrefix') + } + effects.enter('chunkString', { + contentType: 'string' + }) + return inside(code) + } + + /** + * + * + * @type {State} + */ + function inside(code) { + if (code === marker || code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + return code === 92 ? escape : inside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | "a\*b" + * ^ + * ``` + * + * @type {State} + */ + function escape(code) { + if (code === marker || code === 92) { + effects.consume(code) + return inside + } + return inside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + */ + + + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * line endings or spaces in markdown are often optional, in which case this + * factory can be used and `ok` will be switched to whether spaces were found + * or not + * * one line ending or space can be detected with + * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @returns + * Start state. + */ +function factoryWhitespace(effects, ok) { + /** @type {boolean} */ + let seen + return start + + /** @type {State} */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + seen = true + return start + } + if (markdownSpace(code)) { + return factorySpace( + effects, + start, + seen ? 'linePrefix' : 'lineSuffix' + )(code) + } + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js +/** + * Normalize an identifier (as found in references, definitions). + * + * Collapses markdown whitespace, trim, and then lower- and uppercase. + * + * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their + * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different + * uppercase character (U+0398 (`Θ`)). + * So, to get a canonical form, we perform both lower- and uppercase. + * + * Using uppercase last makes sure keys will never interact with default + * prototypal values (such as `constructor`): nothing in the prototype of + * `Object` is uppercase. + * + * @param {string} value + * Identifier to normalize. + * @returns {string} + * Normalized identifier. + */ +function normalizeIdentifier(value) { + return ( + value + // Collapse markdown whitespace. + .replace(/[\t\n\r ]+/g, ' ') + // Trim. + .replace(/^ | $/g, '') + // Some characters are considered “uppercase”, but if their lowercase + // counterpart is uppercased will result in a different uppercase + // character. + // Hence, to get that form, we perform both lower- and uppercase. + // Upper case makes sure keys will not interact with default prototypal + // methods: no method is uppercase. + .toLowerCase() + .toUpperCase() + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + +/** @type {Construct} */ +const definition = { + name: 'definition', + tokenize: tokenizeDefinition +} + +/** @type {Construct} */ +const titleBefore = { + tokenize: tokenizeTitleBefore, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeDefinition(effects, ok, nok) { + const self = this + /** @type {string} */ + let identifier + return start + + /** + * At start of a definition. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Do not interrupt paragraphs (but do follow definitions). + // To do: do `interrupt` the way `markdown-rs` does. + // To do: parse whitespace the way `markdown-rs` does. + effects.enter('definition') + return before(code) + } + + /** + * After optional whitespace, at `[`. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + // To do: parse whitespace the way `markdown-rs` does. + + return factoryLabel.call( + self, + effects, + labelAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionLabel', + 'definitionLabelMarker', + 'definitionLabelString' + )(code) + } + + /** + * After label. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function labelAfter(code) { + identifier = normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + if (code === 58) { + effects.enter('definitionMarker') + effects.consume(code) + effects.exit('definitionMarker') + return markerAfter + } + return nok(code) + } + + /** + * After marker. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function markerAfter(code) { + // Note: whitespace is optional. + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, destinationBefore)(code) + : destinationBefore(code) + } + + /** + * Before destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationBefore(code) { + return factoryDestination( + effects, + destinationAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionDestination', + 'definitionDestinationLiteral', + 'definitionDestinationLiteralMarker', + 'definitionDestinationRaw', + 'definitionDestinationString' + )(code) + } + + /** + * After destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationAfter(code) { + return effects.attempt(titleBefore, after, after)(code) + } + + /** + * After definition. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return markdownSpace(code) + ? factorySpace(effects, afterWhitespace, 'whitespace')(code) + : afterWhitespace(code) + } + + /** + * After definition, after optional whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function afterWhitespace(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('definition') + + // Note: we don’t care about uniqueness. + // It’s likely that that doesn’t happen very frequently. + // It is more likely that it wastes precious time. + self.parser.defined.push(identifier) + + // To do: `markdown-rs` interrupt. + // // You’d be interrupting. + // tokenizer.interrupt = true + return ok(code) + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeTitleBefore(effects, ok, nok) { + return titleBefore + + /** + * After destination, at whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, beforeMarker)(code) + : nok(code) + } + + /** + * At title. + * + * ```markdown + * | [a]: b + * > | "c" + * ^ + * ``` + * + * @type {State} + */ + function beforeMarker(code) { + return factoryTitle( + effects, + titleAfter, + nok, + 'definitionTitle', + 'definitionTitleMarker', + 'definitionTitleString' + )(code) + } + + /** + * After title. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfter(code) { + return markdownSpace(code) + ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) + : titleAfterOptionalWhitespace(code) + } + + /** + * After title, after optional whitespace. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfterOptionalWhitespace(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const codeIndented = { + name: 'codeIndented', + tokenize: tokenizeCodeIndented +} + +/** @type {Construct} */ +const furtherStart = { + tokenize: tokenizeFurtherStart, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeIndented(effects, ok, nok) { + const self = this + return start + + /** + * Start of code (indented). + * + * > **Parsing note**: it is not needed to check if this first line is a + * > filled line (that it has a non-whitespace character), because blank lines + * > are parsed already, so we never run into that. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: manually check if interrupting like `markdown-rs`. + + effects.enter('codeIndented') + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? atBreak(code) + : nok(code) + } + + /** + * At a break. + * + * ```markdown + * > | aaa + * ^ ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === null) { + return after(code) + } + if (markdownLineEnding(code)) { + return effects.attempt(furtherStart, atBreak, after)(code) + } + effects.enter('codeFlowValue') + return inside(code) + } + + /** + * In code content. + * + * ```markdown + * > | aaa + * ^^^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return atBreak(code) + } + effects.consume(code) + return inside + } + + /** @type {State} */ + function after(code) { + effects.exit('codeIndented') + // To do: allow interrupting like `markdown-rs`. + // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeFurtherStart(effects, ok, nok) { + const self = this + return furtherStart + + /** + * At eol, trying to parse another indent. + * + * ```markdown + * > | aaa + * ^ + * | bbb + * ``` + * + * @type {State} + */ + function furtherStart(code) { + // To do: improve `lazy` / `pierce` handling. + // If this is a lazy line, it can’t be code. + if (self.parser.lazy[self.now().line]) { + return nok(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return furtherStart + } + + // To do: the code here in `micromark-js` is a bit different from + // `markdown-rs` because there it can attempt spaces. + // We can’t yet. + // + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? ok(code) + : markdownLineEnding(code) + ? furtherStart(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const headingAtx = { + name: 'headingAtx', + tokenize: tokenizeHeadingAtx, + resolve: resolveHeadingAtx +} + +/** @type {Resolver} */ +function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2 + let contentStart = 3 + /** @type {Token} */ + let content + /** @type {Token} */ + let text + + // Prefix whitespace, part of the opening. + if (events[contentStart][1].type === 'whitespace') { + contentStart += 2 + } + + // Suffix whitespace, part of the closing. + if ( + contentEnd - 2 > contentStart && + events[contentEnd][1].type === 'whitespace' + ) { + contentEnd -= 2 + } + if ( + events[contentEnd][1].type === 'atxHeadingSequence' && + (contentStart === contentEnd - 1 || + (contentEnd - 4 > contentStart && + events[contentEnd - 2][1].type === 'whitespace')) + ) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 + } + if (contentEnd > contentStart) { + content = { + type: 'atxHeadingText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end + } + text = { + type: 'chunkText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + contentType: 'text' + } + splice(events, contentStart, contentEnd - contentStart + 1, [ + ['enter', content, context], + ['enter', text, context], + ['exit', text, context], + ['exit', content, context] + ]) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHeadingAtx(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of a heading (atx). + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + effects.enter('atxHeading') + return before(code) + } + + /** + * After optional whitespace, at `#`. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('atxHeadingSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 35 && size++ < 6) { + effects.consume(code) + return sequenceOpen + } + + // Always at least one `#`. + if (code === null || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingSequence') + return atBreak(code) + } + return nok(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === 35) { + effects.enter('atxHeadingSequence') + return sequenceFurther(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('atxHeading') + // To do: interrupt like `markdown-rs`. + // // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } + if (markdownSpace(code)) { + return factorySpace(effects, atBreak, 'whitespace')(code) + } + + // To do: generate `data` tokens, add the `text` token later. + // Needs edit map, see: `markdown.rs`. + effects.enter('atxHeadingText') + return data(code) + } + + /** + * In further sequence (after whitespace). + * + * Could be normal “visible” hashes in the heading or a final sequence. + * + * ```markdown + * > | ## aa ## + * ^ + * ``` + * + * @type {State} + */ + function sequenceFurther(code) { + if (code === 35) { + effects.consume(code) + return sequenceFurther + } + effects.exit('atxHeadingSequence') + return atBreak(code) + } + + /** + * In text. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingText') + return atBreak(code) + } + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const setextUnderline = { + name: 'setextUnderline', + tokenize: tokenizeSetextUnderline, + resolveTo: resolveToSetextUnderline +} + +/** @type {Resolver} */ +function resolveToSetextUnderline(events, context) { + // To do: resolve like `markdown-rs`. + let index = events.length + /** @type {number | undefined} */ + let content + /** @type {number | undefined} */ + let text + /** @type {number | undefined} */ + let definition + + // Find the opening of the content. + // It’ll always exist: we don’t tokenize if it isn’t there. + while (index--) { + if (events[index][0] === 'enter') { + if (events[index][1].type === 'content') { + content = index + break + } + if (events[index][1].type === 'paragraph') { + text = index + } + } + // Exit + else { + if (events[index][1].type === 'content') { + // Remove the content end (if needed we’ll add it later) + events.splice(index, 1) + } + if (!definition && events[index][1].type === 'definition') { + definition = index + } + } + } + const heading = { + type: 'setextHeading', + start: Object.assign({}, events[text][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + + // Change the paragraph to setext heading text. + events[text][1].type = 'setextHeadingText' + + // If we have definitions in the content, we’ll keep on having content, + // but we need move it. + if (definition) { + events.splice(text, 0, ['enter', heading, context]) + events.splice(definition + 1, 0, ['exit', events[content][1], context]) + events[content][1].end = Object.assign({}, events[definition][1].end) + } else { + events[content][1] = heading + } + + // Add the heading exit at the end. + events.push(['exit', heading, context]) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeSetextUnderline(effects, ok, nok) { + const self = this + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * At start of heading (setext) underline. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + let index = self.events.length + /** @type {boolean | undefined} */ + let paragraph + // Find an opening. + while (index--) { + // Skip enter/exit of line ending, line prefix, and content. + // We can now either have a definition or a paragraph. + if ( + self.events[index][1].type !== 'lineEnding' && + self.events[index][1].type !== 'linePrefix' && + self.events[index][1].type !== 'content' + ) { + paragraph = self.events[index][1].type === 'paragraph' + break + } + } + + // To do: handle lazy/pierce like `markdown-rs`. + // To do: parse indent like `markdown-rs`. + if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { + effects.enter('setextHeadingLine') + marker = code + return before(code) + } + return nok(code) + } + + /** + * After optional whitespace, at `-` or `=`. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('setextHeadingLineSequence') + return inside(code) + } + + /** + * In sequence. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + effects.exit('setextHeadingLineSequence') + return markdownSpace(code) + ? factorySpace(effects, after, 'lineSuffix')(code) + : after(code) + } + + /** + * After sequence, after optional whitespace. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('setextHeadingLine') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js +/** + * List of lowercase HTML “block” tag names. + * + * The list, when parsing HTML (flow), results in more relaxed rules (condition + * 6). + * Because they are known blocks, the HTML-like syntax doesn’t have to be + * strictly parsed. + * For tag names not in this list, a more strict algorithm (condition 7) is used + * to detect whether the HTML-like syntax is seen as HTML (flow) or not. + * + * This is copied from: + * <https://spec.commonmark.org/0.30/#html-blocks>. + * + * > 👉 **Note**: `search` was added in `CommonMark@0.31`. + */ +const htmlBlockNames = [ + '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' +] + +/** + * List of lowercase HTML “raw” tag names. + * + * The list, when parsing HTML (flow), results in HTML that can include lines + * without exiting, until a closing tag also in this list is found (condition + * 1). + * + * This module is copied from: + * <https://spec.commonmark.org/0.30/#html-blocks>. + * + * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. + */ +const htmlRawNames = ['pre', 'script', 'style', 'textarea'] + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + +/** @type {Construct} */ +const htmlFlow = { + name: 'htmlFlow', + tokenize: tokenizeHtmlFlow, + resolveTo: resolveToHtmlFlow, + concrete: true +} + +/** @type {Construct} */ +const blankLineBefore = { + tokenize: tokenizeBlankLineBefore, + partial: true +} +const nonLazyContinuationStart = { + tokenize: tokenizeNonLazyContinuationStart, + partial: true +} + +/** @type {Resolver} */ +function resolveToHtmlFlow(events) { + let index = events.length + while (index--) { + if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { + break + } + } + if (index > 1 && events[index - 2][1].type === 'linePrefix') { + // Add the prefix start to the HTML token. + events[index][1].start = events[index - 2][1].start + // Add the prefix start to the HTML line token. + events[index + 1][1].start = events[index - 2][1].start + // Remove the line prefix. + events.splice(index - 2, 2) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlFlow(effects, ok, nok) { + const self = this + /** @type {number} */ + let marker + /** @type {boolean} */ + let closingTag + /** @type {string} */ + let buffer + /** @type {number} */ + let index + /** @type {Code} */ + let markerB + return start + + /** + * Start of HTML (flow). + * + * ```markdown + * > | <x /> + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * At `<`, after optional whitespace. + * + * ```markdown + * > | <x /> + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('htmlFlow') + effects.enter('htmlFlowData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | <x /> + * ^ + * > | <!doctype> + * ^ + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + closingTag = true + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + marker = 3 + // To do: + // tokenizer.concrete = true + // To do: use `markdown-rs` style interrupt. + // While we’re in an instruction instead of a declaration, we’re on a `?` + // right now, so we do need to search for `>`, similar to declarations. + return self.interrupt ? ok : continuationDeclarationInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After `<!`, at declaration, comment, or CDATA. + * + * ```markdown + * > | <!doctype> + * ^ + * > | <!--xxx--> + * ^ + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + marker = 2 + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + marker = 5 + index = 0 + return cdataOpenInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + marker = 4 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After `<!-`, inside a comment, at another `-`. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After `<![`, inside CDATA, expecting `CDATA[`. + * + * ```markdown + * > | <![CDATA[>&<]]> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + if (index === value.length) { + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return cdataOpenInside + } + return nok(code) + } + + /** + * After `</`, in closing tag, at tag name. + * + * ```markdown + * > | </x> + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * In tag name. + * + * ```markdown + * > | <ab> + * ^^ + * > | </ab> + * ^^ + * ``` + * + * @type {State} + */ + function tagName(code) { + if ( + code === null || + code === 47 || + code === 62 || + markdownLineEndingOrSpace(code) + ) { + const slash = code === 47 + const name = buffer.toLowerCase() + if (!slash && !closingTag && htmlRawNames.includes(name)) { + marker = 1 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + if (htmlBlockNames.includes(buffer.toLowerCase())) { + marker = 6 + if (slash) { + effects.consume(code) + return basicSelfClosing + } + + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + marker = 7 + // Do not support complete HTML when interrupting. + return self.interrupt && !self.parser.lazy[self.now().line] + ? nok(code) + : closingTag + ? completeClosingTagAfter(code) + : completeAttributeNameBefore(code) + } + + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + buffer += String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After closing slash of a basic tag name. + * + * ```markdown + * > | <div/> + * ^ + * ``` + * + * @type {State} + */ + function basicSelfClosing(code) { + if (code === 62) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return nok(code) + } + + /** + * After closing slash of a complete tag name. + * + * ```markdown + * > | <x/> + * ^ + * ``` + * + * @type {State} + */ + function completeClosingTagAfter(code) { + if (markdownSpace(code)) { + effects.consume(code) + return completeClosingTagAfter + } + return completeEnd(code) + } + + /** + * At an attribute name. + * + * At first, this state is used after a complete tag name, after whitespace, + * where it expects optional attributes or the end of the tag. + * It is also reused after attributes, when expecting more optional + * attributes. + * + * ```markdown + * > | <a /> + * ^ + * > | <a :b> + * ^ + * > | <a _b> + * ^ + * > | <a b> + * ^ + * > | <a > + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameBefore(code) { + if (code === 47) { + effects.consume(code) + return completeEnd + } + + // ASCII alphanumerical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return completeAttributeName + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameBefore + } + return completeEnd(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | <a :b> + * ^ + * > | <a _b> + * ^ + * > | <a b> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeName(code) { + // ASCII alphanumerical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return completeAttributeName + } + return completeAttributeNameAfter(code) + } + + /** + * After attribute name, at an optional initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | <a b> + * ^ + * > | <a b=c> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return completeAttributeValueBefore + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameAfter + } + return completeAttributeNameBefore(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | <a b=c> + * ^ + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + markerB = code + return completeAttributeValueQuoted + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeValueBefore + } + return completeAttributeValueUnquoted(code) + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | <a b="c"> + * ^ + * > | <a b='c'> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuoted(code) { + if (code === markerB) { + effects.consume(code) + markerB = null + return completeAttributeValueQuotedAfter + } + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return completeAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | <a b=c> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 47 || + code === 60 || + code === 61 || + code === 62 || + code === 96 || + markdownLineEndingOrSpace(code) + ) { + return completeAttributeNameAfter(code) + } + effects.consume(code) + return completeAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the + * end of the tag. + * + * ```markdown + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownSpace(code)) { + return completeAttributeNameBefore(code) + } + return nok(code) + } + + /** + * In certain circumstances of a complete tag where only an `>` is allowed. + * + * ```markdown + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeEnd(code) { + if (code === 62) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * After `>` in a complete tag. + * + * ```markdown + * > | <x> + * ^ + * ``` + * + * @type {State} + */ + function completeAfter(code) { + if (code === null || markdownLineEnding(code)) { + // // Do not form containers. + // tokenizer.concrete = true + return continuation(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * In continuation of any HTML kind. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function continuation(code) { + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationCommentInside + } + if (code === 60 && marker === 1) { + effects.consume(code) + return continuationRawTagOpen + } + if (code === 62 && marker === 4) { + effects.consume(code) + return continuationClose + } + if (code === 63 && marker === 3) { + effects.consume(code) + return continuationDeclarationInside + } + if (code === 93 && marker === 5) { + effects.consume(code) + return continuationCdataInside + } + if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { + effects.exit('htmlFlowData') + return effects.check( + blankLineBefore, + continuationAfter, + continuationStart + )(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationStart(code) + } + effects.consume(code) + return continuation + } + + /** + * In continuation, at eol. + * + * ```markdown + * > | <x> + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStart(code) { + return effects.check( + nonLazyContinuationStart, + continuationStartNonLazy, + continuationAfter + )(code) + } + + /** + * In continuation, at eol, before non-lazy content. + * + * ```markdown + * > | <x> + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStartNonLazy(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return continuationBefore + } + + /** + * In continuation, before non-lazy content. + * + * ```markdown + * | <x> + * > | asd + * ^ + * ``` + * + * @type {State} + */ + function continuationBefore(code) { + if (code === null || markdownLineEnding(code)) { + return continuationStart(code) + } + effects.enter('htmlFlowData') + return continuation(code) + } + + /** + * In comment continuation, after one `-`, expecting another. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function continuationCommentInside(code) { + if (code === 45) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In raw continuation, after `<`, at `/`. + * + * ```markdown + * > | <script>console.log(1)</script> + * ^ + * ``` + * + * @type {State} + */ + function continuationRawTagOpen(code) { + if (code === 47) { + effects.consume(code) + buffer = '' + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In raw continuation, after `</`, in a raw tag name. + * + * ```markdown + * > | <script>console.log(1)</script> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function continuationRawEndTag(code) { + if (code === 62) { + const name = buffer.toLowerCase() + if (htmlRawNames.includes(name)) { + effects.consume(code) + return continuationClose + } + return continuation(code) + } + if (asciiAlpha(code) && buffer.length < 8) { + effects.consume(code) + // @ts-expect-error: not null. + buffer += String.fromCharCode(code) + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In cdata continuation, after `]`, expecting `]>`. + * + * ```markdown + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationCdataInside(code) { + if (code === 93) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In declaration or instruction continuation, at `>`. + * + * ```markdown + * > | <!--> + * ^ + * > | <?> + * ^ + * > | <!q> + * ^ + * > | <!--ab--> + * ^ + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationDeclarationInside(code) { + if (code === 62) { + effects.consume(code) + return continuationClose + } + + // More dashes. + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In closed continuation: everything we get until the eol/eof is part of it. + * + * ```markdown + * > | <!doctype> + * ^ + * ``` + * + * @type {State} + */ + function continuationClose(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationAfter(code) + } + effects.consume(code) + return continuationClose + } + + /** + * Done. + * + * ```markdown + * > | <!doctype> + * ^ + * ``` + * + * @type {State} + */ + function continuationAfter(code) { + effects.exit('htmlFlow') + // // Feel free to interrupt. + // tokenizer.interrupt = false + // // No longer concrete. + // tokenizer.concrete = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuationStart(effects, ok, nok) { + const self = this + return start + + /** + * At eol, before continuation. + * + * ```markdown + * > | * ```js + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return after + } + return nok(code) + } + + /** + * A continuation. + * + * ```markdown + * | * ```js + * > | b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLineBefore(effects, ok, nok) { + return start + + /** + * Before eol, expecting blank line. + * + * ```markdown + * > | <div> + * ^ + * | + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return effects.attempt(blankLine, ok, nok) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const nonLazyContinuation = { + tokenize: tokenizeNonLazyContinuation, + partial: true +} + +/** @type {Construct} */ +const codeFenced = { + name: 'codeFenced', + tokenize: tokenizeCodeFenced, + concrete: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeFenced(effects, ok, nok) { + const self = this + /** @type {Construct} */ + const closeStart = { + tokenize: tokenizeCloseStart, + partial: true + } + let initialPrefix = 0 + let sizeOpen = 0 + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of code. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse whitespace like `markdown-rs`. + return beforeSequenceOpen(code) + } + + /** + * In opening fence, after prefix, at sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeSequenceOpen(code) { + const tail = self.events[self.events.length - 1] + initialPrefix = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + marker = code + effects.enter('codeFenced') + effects.enter('codeFencedFence') + effects.enter('codeFencedFenceSequence') + return sequenceOpen(code) + } + + /** + * In opening fence sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === marker) { + sizeOpen++ + effects.consume(code) + return sequenceOpen + } + if (sizeOpen < 3) { + return nok(code) + } + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, infoBefore, 'whitespace')(code) + : infoBefore(code) + } + + /** + * In opening fence, after the sequence (and optional whitespace), before info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function infoBefore(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return self.interrupt + ? ok(code) + : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFencedFenceInfo') + effects.enter('chunkString', { + contentType: 'string' + }) + return info(code) + } + + /** + * In info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function info(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return infoBefore(code) + } + if (markdownSpace(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return factorySpace(effects, metaBefore, 'whitespace')(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return info + } + + /** + * In opening fence, after info and whitespace, before meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function metaBefore(code) { + if (code === null || markdownLineEnding(code)) { + return infoBefore(code) + } + effects.enter('codeFencedFenceMeta') + effects.enter('chunkString', { + contentType: 'string' + }) + return meta(code) + } + + /** + * In meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function meta(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceMeta') + return infoBefore(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return meta + } + + /** + * At eol/eof in code, before a non-lazy closing fence or content. + * + * ```markdown + * > | ~~~js + * ^ + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function atNonLazyBreak(code) { + return effects.attempt(closeStart, after, contentBefore)(code) + } + + /** + * Before code content, not a closing fence, at eol. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return contentStart + } + + /** + * Before code content, not a closing fence. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentStart(code) { + return initialPrefix > 0 && markdownSpace(code) + ? factorySpace( + effects, + beforeContentChunk, + 'linePrefix', + initialPrefix + 1 + )(code) + : beforeContentChunk(code) + } + + /** + * Before code content, after optional prefix. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeContentChunk(code) { + if (code === null || markdownLineEnding(code)) { + return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFlowValue') + return contentChunk(code) + } + + /** + * In code content. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^^^^^^^^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentChunk(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return beforeContentChunk(code) + } + effects.consume(code) + return contentChunk + } + + /** + * After code. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + effects.exit('codeFenced') + return ok(code) + } + + /** + * @this {TokenizeContext} + * @type {Tokenizer} + */ + function tokenizeCloseStart(effects, ok, nok) { + let size = 0 + return startBefore + + /** + * + * + * @type {State} + */ + function startBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return start + } + + /** + * Before closing fence, at optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Always populated by defaults. + + // To do: `enter` here or in next state? + effects.enter('codeFencedFence') + return markdownSpace(code) + ? factorySpace( + effects, + beforeSequenceClose, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : beforeSequenceClose(code) + } + + /** + * In closing fence, after optional whitespace, at sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function beforeSequenceClose(code) { + if (code === marker) { + effects.enter('codeFencedFenceSequence') + return sequenceClose(code) + } + return nok(code) + } + + /** + * In closing fence sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + if (code === marker) { + size++ + effects.consume(code) + return sequenceClose + } + if (size >= sizeOpen) { + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) + : sequenceCloseAfter(code) + } + return nok(code) + } + + /** + * After closing fence sequence, after optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceCloseAfter(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return ok(code) + } + return nok(code) + } + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuation(effects, ok, nok) { + const self = this + return start + + /** + * + * + * @type {State} + */ + function start(code) { + if (code === null) { + return nok(code) + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineStart + } + + /** + * + * + * @type {State} + */ + function lineStart(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/character-entities/index.js +/** + * Map of named character references. + * + * @type {Record<string, string>} + */ +const characterEntities = { + AElig: 'Æ', + AMP: '&', + Aacute: 'Á', + Abreve: 'Ă', + Acirc: 'Â', + Acy: 'А', + Afr: '𝔄', + Agrave: 'À', + Alpha: 'Α', + Amacr: 'Ā', + And: '⩓', + Aogon: 'Ą', + Aopf: '𝔸', + ApplyFunction: '⁡', + Aring: 'Å', + Ascr: '𝒜', + Assign: '≔', + Atilde: 'Ã', + Auml: 'Ä', + Backslash: '∖', + Barv: '⫧', + Barwed: '⌆', + Bcy: 'Б', + Because: '∵', + Bernoullis: 'ℬ', + Beta: 'Β', + Bfr: '𝔅', + Bopf: '𝔹', + Breve: '˘', + Bscr: 'ℬ', + Bumpeq: '≎', + CHcy: 'Ч', + COPY: '©', + Cacute: 'Ć', + Cap: '⋒', + CapitalDifferentialD: 'ⅅ', + Cayleys: 'ℭ', + Ccaron: 'Č', + Ccedil: 'Ç', + Ccirc: 'Ĉ', + Cconint: '∰', + Cdot: 'Ċ', + Cedilla: '¸', + CenterDot: '·', + Cfr: 'ℭ', + Chi: 'Χ', + CircleDot: '⊙', + CircleMinus: '⊖', + CirclePlus: '⊕', + CircleTimes: '⊗', + ClockwiseContourIntegral: '∲', + CloseCurlyDoubleQuote: '”', + CloseCurlyQuote: '’', + Colon: '∷', + Colone: '⩴', + Congruent: '≡', + Conint: '∯', + ContourIntegral: '∮', + Copf: 'ℂ', + Coproduct: '∐', + CounterClockwiseContourIntegral: '∳', + Cross: '⨯', + Cscr: '𝒞', + Cup: '⋓', + CupCap: '≍', + DD: 'ⅅ', + DDotrahd: '⤑', + DJcy: 'Ђ', + DScy: 'Ѕ', + DZcy: 'Џ', + Dagger: '‡', + Darr: '↡', + Dashv: '⫤', + Dcaron: 'Ď', + Dcy: 'Д', + Del: '∇', + Delta: 'Δ', + Dfr: '𝔇', + DiacriticalAcute: '´', + DiacriticalDot: '˙', + DiacriticalDoubleAcute: '˝', + DiacriticalGrave: '`', + DiacriticalTilde: '˜', + Diamond: '⋄', + DifferentialD: 'ⅆ', + Dopf: '𝔻', + Dot: '¨', + DotDot: '⃜', + DotEqual: '≐', + DoubleContourIntegral: '∯', + DoubleDot: '¨', + DoubleDownArrow: '⇓', + DoubleLeftArrow: '⇐', + DoubleLeftRightArrow: '⇔', + DoubleLeftTee: '⫤', + DoubleLongLeftArrow: '⟸', + DoubleLongLeftRightArrow: '⟺', + DoubleLongRightArrow: '⟹', + DoubleRightArrow: '⇒', + DoubleRightTee: '⊨', + DoubleUpArrow: '⇑', + DoubleUpDownArrow: '⇕', + DoubleVerticalBar: '∥', + DownArrow: '↓', + DownArrowBar: '⤓', + DownArrowUpArrow: '⇵', + DownBreve: '̑', + DownLeftRightVector: '⥐', + DownLeftTeeVector: '⥞', + DownLeftVector: '↽', + DownLeftVectorBar: '⥖', + DownRightTeeVector: '⥟', + DownRightVector: '⇁', + DownRightVectorBar: '⥗', + DownTee: '⊤', + DownTeeArrow: '↧', + Downarrow: '⇓', + Dscr: '𝒟', + Dstrok: 'Đ', + ENG: 'Ŋ', + ETH: 'Ð', + Eacute: 'É', + Ecaron: 'Ě', + Ecirc: 'Ê', + Ecy: 'Э', + Edot: 'Ė', + Efr: '𝔈', + Egrave: 'È', + Element: '∈', + Emacr: 'Ē', + EmptySmallSquare: '◻', + EmptyVerySmallSquare: '▫', + Eogon: 'Ę', + Eopf: '𝔼', + Epsilon: 'Ε', + Equal: '⩵', + EqualTilde: '≂', + Equilibrium: '⇌', + Escr: 'ℰ', + Esim: '⩳', + Eta: 'Η', + Euml: 'Ë', + Exists: '∃', + ExponentialE: 'ⅇ', + Fcy: 'Ф', + Ffr: '𝔉', + FilledSmallSquare: '◼', + FilledVerySmallSquare: '▪', + Fopf: '𝔽', + ForAll: '∀', + Fouriertrf: 'ℱ', + Fscr: 'ℱ', + GJcy: 'Ѓ', + GT: '>', + Gamma: 'Γ', + Gammad: 'Ϝ', + Gbreve: 'Ğ', + Gcedil: 'Ģ', + Gcirc: 'Ĝ', + Gcy: 'Г', + Gdot: 'Ġ', + Gfr: '𝔊', + Gg: '⋙', + Gopf: '𝔾', + GreaterEqual: '≥', + GreaterEqualLess: '⋛', + GreaterFullEqual: '≧', + GreaterGreater: '⪢', + GreaterLess: '≷', + GreaterSlantEqual: '⩾', + GreaterTilde: '≳', + Gscr: '𝒢', + Gt: '≫', + HARDcy: 'Ъ', + Hacek: 'ˇ', + Hat: '^', + Hcirc: 'Ĥ', + Hfr: 'ℌ', + HilbertSpace: 'ℋ', + Hopf: 'ℍ', + HorizontalLine: '─', + Hscr: 'ℋ', + Hstrok: 'Ħ', + HumpDownHump: '≎', + HumpEqual: '≏', + IEcy: 'Е', + IJlig: 'IJ', + IOcy: 'Ё', + Iacute: 'Í', + Icirc: 'Î', + Icy: 'И', + Idot: 'İ', + Ifr: 'ℑ', + Igrave: 'Ì', + Im: 'ℑ', + Imacr: 'Ī', + ImaginaryI: 'ⅈ', + Implies: '⇒', + Int: '∬', + Integral: '∫', + Intersection: '⋂', + InvisibleComma: '⁣', + InvisibleTimes: '⁢', + Iogon: 'Į', + Iopf: '𝕀', + Iota: 'Ι', + Iscr: 'ℐ', + Itilde: 'Ĩ', + Iukcy: 'І', + Iuml: 'Ï', + Jcirc: 'Ĵ', + Jcy: 'Й', + Jfr: '𝔍', + Jopf: '𝕁', + Jscr: '𝒥', + Jsercy: 'Ј', + Jukcy: 'Є', + KHcy: 'Х', + KJcy: 'Ќ', + Kappa: 'Κ', + Kcedil: 'Ķ', + Kcy: 'К', + Kfr: '𝔎', + Kopf: '𝕂', + Kscr: '𝒦', + LJcy: 'Љ', + LT: '<', + Lacute: 'Ĺ', + Lambda: 'Λ', + Lang: '⟪', + Laplacetrf: 'ℒ', + Larr: '↞', + Lcaron: 'Ľ', + Lcedil: 'Ļ', + Lcy: 'Л', + LeftAngleBracket: '⟨', + LeftArrow: '←', + LeftArrowBar: '⇤', + LeftArrowRightArrow: '⇆', + LeftCeiling: '⌈', + LeftDoubleBracket: '⟦', + LeftDownTeeVector: '⥡', + LeftDownVector: '⇃', + LeftDownVectorBar: '⥙', + LeftFloor: '⌊', + LeftRightArrow: '↔', + LeftRightVector: '⥎', + LeftTee: '⊣', + LeftTeeArrow: '↤', + LeftTeeVector: '⥚', + LeftTriangle: '⊲', + LeftTriangleBar: '⧏', + LeftTriangleEqual: '⊴', + LeftUpDownVector: '⥑', + LeftUpTeeVector: '⥠', + LeftUpVector: '↿', + LeftUpVectorBar: '⥘', + LeftVector: '↼', + LeftVectorBar: '⥒', + Leftarrow: '⇐', + Leftrightarrow: '⇔', + LessEqualGreater: '⋚', + LessFullEqual: '≦', + LessGreater: '≶', + LessLess: '⪡', + LessSlantEqual: '⩽', + LessTilde: '≲', + Lfr: '𝔏', + Ll: '⋘', + Lleftarrow: '⇚', + Lmidot: 'Ŀ', + LongLeftArrow: '⟵', + LongLeftRightArrow: '⟷', + LongRightArrow: '⟶', + Longleftarrow: '⟸', + Longleftrightarrow: '⟺', + Longrightarrow: '⟹', + Lopf: '𝕃', + LowerLeftArrow: '↙', + LowerRightArrow: '↘', + Lscr: 'ℒ', + Lsh: '↰', + Lstrok: 'Ł', + Lt: '≪', + Map: '⤅', + Mcy: 'М', + MediumSpace: ' ', + Mellintrf: 'ℳ', + Mfr: '𝔐', + MinusPlus: '∓', + Mopf: '𝕄', + Mscr: 'ℳ', + Mu: 'Μ', + NJcy: 'Њ', + Nacute: 'Ń', + Ncaron: 'Ň', + Ncedil: 'Ņ', + Ncy: 'Н', + NegativeMediumSpace: '​', + NegativeThickSpace: '​', + NegativeThinSpace: '​', + NegativeVeryThinSpace: '​', + NestedGreaterGreater: '≫', + NestedLessLess: '≪', + NewLine: '\n', + Nfr: '𝔑', + NoBreak: '⁠', + NonBreakingSpace: ' ', + Nopf: 'ℕ', + Not: '⫬', + NotCongruent: '≢', + NotCupCap: '≭', + NotDoubleVerticalBar: '∦', + NotElement: '∉', + NotEqual: '≠', + NotEqualTilde: '≂̸', + NotExists: '∄', + NotGreater: '≯', + NotGreaterEqual: '≱', + NotGreaterFullEqual: '≧̸', + NotGreaterGreater: '≫̸', + NotGreaterLess: '≹', + NotGreaterSlantEqual: '⩾̸', + NotGreaterTilde: '≵', + NotHumpDownHump: '≎̸', + NotHumpEqual: '≏̸', + NotLeftTriangle: '⋪', + NotLeftTriangleBar: '⧏̸', + NotLeftTriangleEqual: '⋬', + NotLess: '≮', + NotLessEqual: '≰', + NotLessGreater: '≸', + NotLessLess: '≪̸', + NotLessSlantEqual: '⩽̸', + NotLessTilde: '≴', + NotNestedGreaterGreater: '⪢̸', + NotNestedLessLess: '⪡̸', + NotPrecedes: '⊀', + NotPrecedesEqual: '⪯̸', + NotPrecedesSlantEqual: '⋠', + NotReverseElement: '∌', + NotRightTriangle: '⋫', + NotRightTriangleBar: '⧐̸', + NotRightTriangleEqual: '⋭', + NotSquareSubset: '⊏̸', + NotSquareSubsetEqual: '⋢', + NotSquareSuperset: '⊐̸', + NotSquareSupersetEqual: '⋣', + NotSubset: '⊂⃒', + NotSubsetEqual: '⊈', + NotSucceeds: '⊁', + NotSucceedsEqual: '⪰̸', + NotSucceedsSlantEqual: '⋡', + NotSucceedsTilde: '≿̸', + NotSuperset: '⊃⃒', + NotSupersetEqual: '⊉', + NotTilde: '≁', + NotTildeEqual: '≄', + NotTildeFullEqual: '≇', + NotTildeTilde: '≉', + NotVerticalBar: '∤', + Nscr: '𝒩', + Ntilde: 'Ñ', + Nu: 'Ν', + OElig: 'Œ', + Oacute: 'Ó', + Ocirc: 'Ô', + Ocy: 'О', + Odblac: 'Ő', + Ofr: '𝔒', + Ograve: 'Ò', + Omacr: 'Ō', + Omega: 'Ω', + Omicron: 'Ο', + Oopf: '𝕆', + OpenCurlyDoubleQuote: '“', + OpenCurlyQuote: '‘', + Or: '⩔', + Oscr: '𝒪', + Oslash: 'Ø', + Otilde: 'Õ', + Otimes: '⨷', + Ouml: 'Ö', + OverBar: '‾', + OverBrace: '⏞', + OverBracket: '⎴', + OverParenthesis: '⏜', + PartialD: '∂', + Pcy: 'П', + Pfr: '𝔓', + Phi: 'Φ', + Pi: 'Π', + PlusMinus: '±', + Poincareplane: 'ℌ', + Popf: 'ℙ', + Pr: '⪻', + Precedes: '≺', + PrecedesEqual: '⪯', + PrecedesSlantEqual: '≼', + PrecedesTilde: '≾', + Prime: '″', + Product: '∏', + Proportion: '∷', + Proportional: '∝', + Pscr: '𝒫', + Psi: 'Ψ', + QUOT: '"', + Qfr: '𝔔', + Qopf: 'ℚ', + Qscr: '𝒬', + RBarr: '⤐', + REG: '®', + Racute: 'Ŕ', + Rang: '⟫', + Rarr: '↠', + Rarrtl: '⤖', + Rcaron: 'Ř', + Rcedil: 'Ŗ', + Rcy: 'Р', + Re: 'ℜ', + ReverseElement: '∋', + ReverseEquilibrium: '⇋', + ReverseUpEquilibrium: '⥯', + Rfr: 'ℜ', + Rho: 'Ρ', + RightAngleBracket: '⟩', + RightArrow: '→', + RightArrowBar: '⇥', + RightArrowLeftArrow: '⇄', + RightCeiling: '⌉', + RightDoubleBracket: '⟧', + RightDownTeeVector: '⥝', + RightDownVector: '⇂', + RightDownVectorBar: '⥕', + RightFloor: '⌋', + RightTee: '⊢', + RightTeeArrow: '↦', + RightTeeVector: '⥛', + RightTriangle: '⊳', + RightTriangleBar: '⧐', + RightTriangleEqual: '⊵', + RightUpDownVector: '⥏', + RightUpTeeVector: '⥜', + RightUpVector: '↾', + RightUpVectorBar: '⥔', + RightVector: '⇀', + RightVectorBar: '⥓', + Rightarrow: '⇒', + Ropf: 'ℝ', + RoundImplies: '⥰', + Rrightarrow: '⇛', + Rscr: 'ℛ', + Rsh: '↱', + RuleDelayed: '⧴', + SHCHcy: 'Щ', + SHcy: 'Ш', + SOFTcy: 'Ь', + Sacute: 'Ś', + Sc: '⪼', + Scaron: 'Š', + Scedil: 'Ş', + Scirc: 'Ŝ', + Scy: 'С', + Sfr: '𝔖', + ShortDownArrow: '↓', + ShortLeftArrow: '←', + ShortRightArrow: '→', + ShortUpArrow: '↑', + Sigma: 'Σ', + SmallCircle: '∘', + Sopf: '𝕊', + Sqrt: '√', + Square: '□', + SquareIntersection: '⊓', + SquareSubset: '⊏', + SquareSubsetEqual: '⊑', + SquareSuperset: '⊐', + SquareSupersetEqual: '⊒', + SquareUnion: '⊔', + Sscr: '𝒮', + Star: '⋆', + Sub: '⋐', + Subset: '⋐', + SubsetEqual: '⊆', + Succeeds: '≻', + SucceedsEqual: '⪰', + SucceedsSlantEqual: '≽', + SucceedsTilde: '≿', + SuchThat: '∋', + Sum: '∑', + Sup: '⋑', + Superset: '⊃', + SupersetEqual: '⊇', + Supset: '⋑', + THORN: 'Þ', + TRADE: '™', + TSHcy: 'Ћ', + TScy: 'Ц', + Tab: '\t', + Tau: 'Τ', + Tcaron: 'Ť', + Tcedil: 'Ţ', + Tcy: 'Т', + Tfr: '𝔗', + Therefore: '∴', + Theta: 'Θ', + ThickSpace: '  ', + ThinSpace: ' ', + Tilde: '∼', + TildeEqual: '≃', + TildeFullEqual: '≅', + TildeTilde: '≈', + Topf: '𝕋', + TripleDot: '⃛', + Tscr: '𝒯', + Tstrok: 'Ŧ', + Uacute: 'Ú', + Uarr: '↟', + Uarrocir: '⥉', + Ubrcy: 'Ў', + Ubreve: 'Ŭ', + Ucirc: 'Û', + Ucy: 'У', + Udblac: 'Ű', + Ufr: '𝔘', + Ugrave: 'Ù', + Umacr: 'Ū', + UnderBar: '_', + UnderBrace: '⏟', + UnderBracket: '⎵', + UnderParenthesis: '⏝', + Union: '⋃', + UnionPlus: '⊎', + Uogon: 'Ų', + Uopf: '𝕌', + UpArrow: '↑', + UpArrowBar: '⤒', + UpArrowDownArrow: '⇅', + UpDownArrow: '↕', + UpEquilibrium: '⥮', + UpTee: '⊥', + UpTeeArrow: '↥', + Uparrow: '⇑', + Updownarrow: '⇕', + UpperLeftArrow: '↖', + UpperRightArrow: '↗', + Upsi: 'ϒ', + Upsilon: 'Υ', + Uring: 'Ů', + Uscr: '𝒰', + Utilde: 'Ũ', + Uuml: 'Ü', + VDash: '⊫', + Vbar: '⫫', + Vcy: 'В', + Vdash: '⊩', + Vdashl: '⫦', + Vee: '⋁', + Verbar: '‖', + Vert: '‖', + VerticalBar: '∣', + VerticalLine: '|', + VerticalSeparator: '❘', + VerticalTilde: '≀', + VeryThinSpace: ' ', + Vfr: '𝔙', + Vopf: '𝕍', + Vscr: '𝒱', + Vvdash: '⊪', + Wcirc: 'Ŵ', + Wedge: '⋀', + Wfr: '𝔚', + Wopf: '𝕎', + Wscr: '𝒲', + Xfr: '𝔛', + Xi: 'Ξ', + Xopf: '𝕏', + Xscr: '𝒳', + YAcy: 'Я', + YIcy: 'Ї', + YUcy: 'Ю', + Yacute: 'Ý', + Ycirc: 'Ŷ', + Ycy: 'Ы', + Yfr: '𝔜', + Yopf: '𝕐', + Yscr: '𝒴', + Yuml: 'Ÿ', + ZHcy: 'Ж', + Zacute: 'Ź', + Zcaron: 'Ž', + Zcy: 'З', + Zdot: 'Ż', + ZeroWidthSpace: '​', + Zeta: 'Ζ', + Zfr: 'ℨ', + Zopf: 'ℤ', + Zscr: '𝒵', + aacute: 'á', + abreve: 'ă', + ac: '∾', + acE: '∾̳', + acd: '∿', + acirc: 'â', + acute: '´', + acy: 'а', + aelig: 'æ', + af: '⁡', + afr: '𝔞', + agrave: 'à', + alefsym: 'ℵ', + aleph: 'ℵ', + alpha: 'α', + amacr: 'ā', + amalg: '⨿', + amp: '&', + and: '∧', + andand: '⩕', + andd: '⩜', + andslope: '⩘', + andv: '⩚', + ang: '∠', + ange: '⦤', + angle: '∠', + angmsd: '∡', + angmsdaa: '⦨', + angmsdab: '⦩', + angmsdac: '⦪', + angmsdad: '⦫', + angmsdae: '⦬', + angmsdaf: '⦭', + angmsdag: '⦮', + angmsdah: '⦯', + angrt: '∟', + angrtvb: '⊾', + angrtvbd: '⦝', + angsph: '∢', + angst: 'Å', + angzarr: '⍼', + aogon: 'ą', + aopf: '𝕒', + ap: '≈', + apE: '⩰', + apacir: '⩯', + ape: '≊', + apid: '≋', + apos: "'", + approx: '≈', + approxeq: '≊', + aring: 'å', + ascr: '𝒶', + ast: '*', + asymp: '≈', + asympeq: '≍', + atilde: 'ã', + auml: 'ä', + awconint: '∳', + awint: '⨑', + bNot: '⫭', + backcong: '≌', + backepsilon: '϶', + backprime: '‵', + backsim: '∽', + backsimeq: '⋍', + barvee: '⊽', + barwed: '⌅', + barwedge: '⌅', + bbrk: '⎵', + bbrktbrk: '⎶', + bcong: '≌', + bcy: 'б', + bdquo: '„', + becaus: '∵', + because: '∵', + bemptyv: '⦰', + bepsi: '϶', + bernou: 'ℬ', + beta: 'β', + beth: 'ℶ', + between: '≬', + bfr: '𝔟', + bigcap: '⋂', + bigcirc: '◯', + bigcup: '⋃', + bigodot: '⨀', + bigoplus: '⨁', + bigotimes: '⨂', + bigsqcup: '⨆', + bigstar: '★', + bigtriangledown: '▽', + bigtriangleup: '△', + biguplus: '⨄', + bigvee: '⋁', + bigwedge: '⋀', + bkarow: '⤍', + blacklozenge: '⧫', + blacksquare: '▪', + blacktriangle: '▴', + blacktriangledown: '▾', + blacktriangleleft: '◂', + blacktriangleright: '▸', + blank: '␣', + blk12: '▒', + blk14: '░', + blk34: '▓', + block: '█', + bne: '=⃥', + bnequiv: '≡⃥', + bnot: '⌐', + bopf: '𝕓', + bot: '⊥', + bottom: '⊥', + bowtie: '⋈', + boxDL: '╗', + boxDR: '╔', + boxDl: '╖', + boxDr: '╓', + boxH: '═', + boxHD: '╦', + boxHU: '╩', + boxHd: '╤', + boxHu: '╧', + boxUL: '╝', + boxUR: '╚', + boxUl: '╜', + boxUr: '╙', + boxV: '║', + boxVH: '╬', + boxVL: '╣', + boxVR: '╠', + boxVh: '╫', + boxVl: '╢', + boxVr: '╟', + boxbox: '⧉', + boxdL: '╕', + boxdR: '╒', + boxdl: '┐', + boxdr: '┌', + boxh: '─', + boxhD: '╥', + boxhU: '╨', + boxhd: '┬', + boxhu: '┴', + boxminus: '⊟', + boxplus: '⊞', + boxtimes: '⊠', + boxuL: '╛', + boxuR: '╘', + boxul: '┘', + boxur: '└', + boxv: '│', + boxvH: '╪', + boxvL: '╡', + boxvR: '╞', + boxvh: '┼', + boxvl: '┤', + boxvr: '├', + bprime: '‵', + breve: '˘', + brvbar: '¦', + bscr: '𝒷', + bsemi: '⁏', + bsim: '∽', + bsime: '⋍', + bsol: '\\', + bsolb: '⧅', + bsolhsub: '⟈', + bull: '•', + bullet: '•', + bump: '≎', + bumpE: '⪮', + bumpe: '≏', + bumpeq: '≏', + cacute: 'ć', + cap: '∩', + capand: '⩄', + capbrcup: '⩉', + capcap: '⩋', + capcup: '⩇', + capdot: '⩀', + caps: '∩︀', + caret: '⁁', + caron: 'ˇ', + ccaps: '⩍', + ccaron: 'č', + ccedil: 'ç', + ccirc: 'ĉ', + ccups: '⩌', + ccupssm: '⩐', + cdot: 'ċ', + cedil: '¸', + cemptyv: '⦲', + cent: '¢', + centerdot: '·', + cfr: '𝔠', + chcy: 'ч', + check: '✓', + checkmark: '✓', + chi: 'χ', + cir: '○', + cirE: '⧃', + circ: 'ˆ', + circeq: '≗', + circlearrowleft: '↺', + circlearrowright: '↻', + circledR: '®', + circledS: 'Ⓢ', + circledast: '⊛', + circledcirc: '⊚', + circleddash: '⊝', + cire: '≗', + cirfnint: '⨐', + cirmid: '⫯', + cirscir: '⧂', + clubs: '♣', + clubsuit: '♣', + colon: ':', + colone: '≔', + coloneq: '≔', + comma: ',', + commat: '@', + comp: '∁', + compfn: '∘', + complement: '∁', + complexes: 'ℂ', + cong: '≅', + congdot: '⩭', + conint: '∮', + copf: '𝕔', + coprod: '∐', + copy: '©', + copysr: '℗', + crarr: '↵', + cross: '✗', + cscr: '𝒸', + csub: '⫏', + csube: '⫑', + csup: '⫐', + csupe: '⫒', + ctdot: '⋯', + cudarrl: '⤸', + cudarrr: '⤵', + cuepr: '⋞', + cuesc: '⋟', + cularr: '↶', + cularrp: '⤽', + cup: '∪', + cupbrcap: '⩈', + cupcap: '⩆', + cupcup: '⩊', + cupdot: '⊍', + cupor: '⩅', + cups: '∪︀', + curarr: '↷', + curarrm: '⤼', + curlyeqprec: '⋞', + curlyeqsucc: '⋟', + curlyvee: '⋎', + curlywedge: '⋏', + curren: '¤', + curvearrowleft: '↶', + curvearrowright: '↷', + cuvee: '⋎', + cuwed: '⋏', + cwconint: '∲', + cwint: '∱', + cylcty: '⌭', + dArr: '⇓', + dHar: '⥥', + dagger: '†', + daleth: 'ℸ', + darr: '↓', + dash: '‐', + dashv: '⊣', + dbkarow: '⤏', + dblac: '˝', + dcaron: 'ď', + dcy: 'д', + dd: 'ⅆ', + ddagger: '‡', + ddarr: '⇊', + ddotseq: '⩷', + deg: '°', + delta: 'δ', + demptyv: '⦱', + dfisht: '⥿', + dfr: '𝔡', + dharl: '⇃', + dharr: '⇂', + diam: '⋄', + diamond: '⋄', + diamondsuit: '♦', + diams: '♦', + die: '¨', + digamma: 'ϝ', + disin: '⋲', + div: '÷', + divide: '÷', + divideontimes: '⋇', + divonx: '⋇', + djcy: 'ђ', + dlcorn: '⌞', + dlcrop: '⌍', + dollar: '$', + dopf: '𝕕', + dot: '˙', + doteq: '≐', + doteqdot: '≑', + dotminus: '∸', + dotplus: '∔', + dotsquare: '⊡', + doublebarwedge: '⌆', + downarrow: '↓', + downdownarrows: '⇊', + downharpoonleft: '⇃', + downharpoonright: '⇂', + drbkarow: '⤐', + drcorn: '⌟', + drcrop: '⌌', + dscr: '𝒹', + dscy: 'ѕ', + dsol: '⧶', + dstrok: 'đ', + dtdot: '⋱', + dtri: '▿', + dtrif: '▾', + duarr: '⇵', + duhar: '⥯', + dwangle: '⦦', + dzcy: 'џ', + dzigrarr: '⟿', + eDDot: '⩷', + eDot: '≑', + eacute: 'é', + easter: '⩮', + ecaron: 'ě', + ecir: '≖', + ecirc: 'ê', + ecolon: '≕', + ecy: 'э', + edot: 'ė', + ee: 'ⅇ', + efDot: '≒', + efr: '𝔢', + eg: '⪚', + egrave: 'è', + egs: '⪖', + egsdot: '⪘', + el: '⪙', + elinters: '⏧', + ell: 'ℓ', + els: '⪕', + elsdot: '⪗', + emacr: 'ē', + empty: '∅', + emptyset: '∅', + emptyv: '∅', + emsp13: ' ', + emsp14: ' ', + emsp: ' ', + eng: 'ŋ', + ensp: ' ', + eogon: 'ę', + eopf: '𝕖', + epar: '⋕', + eparsl: '⧣', + eplus: '⩱', + epsi: 'ε', + epsilon: 'ε', + epsiv: 'ϵ', + eqcirc: '≖', + eqcolon: '≕', + eqsim: '≂', + eqslantgtr: '⪖', + eqslantless: '⪕', + equals: '=', + equest: '≟', + equiv: '≡', + equivDD: '⩸', + eqvparsl: '⧥', + erDot: '≓', + erarr: '⥱', + escr: 'ℯ', + esdot: '≐', + esim: '≂', + eta: 'η', + eth: 'ð', + euml: 'ë', + euro: '€', + excl: '!', + exist: '∃', + expectation: 'ℰ', + exponentiale: 'ⅇ', + fallingdotseq: '≒', + fcy: 'ф', + female: '♀', + ffilig: 'ffi', + fflig: 'ff', + ffllig: 'ffl', + ffr: '𝔣', + filig: 'fi', + fjlig: 'fj', + flat: '♭', + fllig: 'fl', + fltns: '▱', + fnof: 'ƒ', + fopf: '𝕗', + forall: '∀', + fork: '⋔', + forkv: '⫙', + fpartint: '⨍', + frac12: '½', + frac13: '⅓', + frac14: '¼', + frac15: '⅕', + frac16: '⅙', + frac18: '⅛', + frac23: '⅔', + frac25: '⅖', + frac34: '¾', + frac35: '⅗', + frac38: '⅜', + frac45: '⅘', + frac56: '⅚', + frac58: '⅝', + frac78: '⅞', + frasl: '⁄', + frown: '⌢', + fscr: '𝒻', + gE: '≧', + gEl: '⪌', + gacute: 'ǵ', + gamma: 'γ', + gammad: 'ϝ', + gap: '⪆', + gbreve: 'ğ', + gcirc: 'ĝ', + gcy: 'г', + gdot: 'ġ', + ge: '≥', + gel: '⋛', + geq: '≥', + geqq: '≧', + geqslant: '⩾', + ges: '⩾', + gescc: '⪩', + gesdot: '⪀', + gesdoto: '⪂', + gesdotol: '⪄', + gesl: '⋛︀', + gesles: '⪔', + gfr: '𝔤', + gg: '≫', + ggg: '⋙', + gimel: 'ℷ', + gjcy: 'ѓ', + gl: '≷', + glE: '⪒', + gla: '⪥', + glj: '⪤', + gnE: '≩', + gnap: '⪊', + gnapprox: '⪊', + gne: '⪈', + gneq: '⪈', + gneqq: '≩', + gnsim: '⋧', + gopf: '𝕘', + grave: '`', + gscr: 'ℊ', + gsim: '≳', + gsime: '⪎', + gsiml: '⪐', + gt: '>', + gtcc: '⪧', + gtcir: '⩺', + gtdot: '⋗', + gtlPar: '⦕', + gtquest: '⩼', + gtrapprox: '⪆', + gtrarr: '⥸', + gtrdot: '⋗', + gtreqless: '⋛', + gtreqqless: '⪌', + gtrless: '≷', + gtrsim: '≳', + gvertneqq: '≩︀', + gvnE: '≩︀', + hArr: '⇔', + hairsp: ' ', + half: '½', + hamilt: 'ℋ', + hardcy: 'ъ', + harr: '↔', + harrcir: '⥈', + harrw: '↭', + hbar: 'ℏ', + hcirc: 'ĥ', + hearts: '♥', + heartsuit: '♥', + hellip: '…', + hercon: '⊹', + hfr: '𝔥', + hksearow: '⤥', + hkswarow: '⤦', + hoarr: '⇿', + homtht: '∻', + hookleftarrow: '↩', + hookrightarrow: '↪', + hopf: '𝕙', + horbar: '―', + hscr: '𝒽', + hslash: 'ℏ', + hstrok: 'ħ', + hybull: '⁃', + hyphen: '‐', + iacute: 'í', + ic: '⁣', + icirc: 'î', + icy: 'и', + iecy: 'е', + iexcl: '¡', + iff: '⇔', + ifr: '𝔦', + igrave: 'ì', + ii: 'ⅈ', + iiiint: '⨌', + iiint: '∭', + iinfin: '⧜', + iiota: '℩', + ijlig: 'ij', + imacr: 'ī', + image: 'ℑ', + imagline: 'ℐ', + imagpart: 'ℑ', + imath: 'ı', + imof: '⊷', + imped: 'Ƶ', + in: '∈', + incare: '℅', + infin: '∞', + infintie: '⧝', + inodot: 'ı', + int: '∫', + intcal: '⊺', + integers: 'ℤ', + intercal: '⊺', + intlarhk: '⨗', + intprod: '⨼', + iocy: 'ё', + iogon: 'į', + iopf: '𝕚', + iota: 'ι', + iprod: '⨼', + iquest: '¿', + iscr: '𝒾', + isin: '∈', + isinE: '⋹', + isindot: '⋵', + isins: '⋴', + isinsv: '⋳', + isinv: '∈', + it: '⁢', + itilde: 'ĩ', + iukcy: 'і', + iuml: 'ï', + jcirc: 'ĵ', + jcy: 'й', + jfr: '𝔧', + jmath: 'ȷ', + jopf: '𝕛', + jscr: '𝒿', + jsercy: 'ј', + jukcy: 'є', + kappa: 'κ', + kappav: 'ϰ', + kcedil: 'ķ', + kcy: 'к', + kfr: '𝔨', + kgreen: 'ĸ', + khcy: 'х', + kjcy: 'ќ', + kopf: '𝕜', + kscr: '𝓀', + lAarr: '⇚', + lArr: '⇐', + lAtail: '⤛', + lBarr: '⤎', + lE: '≦', + lEg: '⪋', + lHar: '⥢', + lacute: 'ĺ', + laemptyv: '⦴', + lagran: 'ℒ', + lambda: 'λ', + lang: '⟨', + langd: '⦑', + langle: '⟨', + lap: '⪅', + laquo: '«', + larr: '←', + larrb: '⇤', + larrbfs: '⤟', + larrfs: '⤝', + larrhk: '↩', + larrlp: '↫', + larrpl: '⤹', + larrsim: '⥳', + larrtl: '↢', + lat: '⪫', + latail: '⤙', + late: '⪭', + lates: '⪭︀', + lbarr: '⤌', + lbbrk: '❲', + lbrace: '{', + lbrack: '[', + lbrke: '⦋', + lbrksld: '⦏', + lbrkslu: '⦍', + lcaron: 'ľ', + lcedil: 'ļ', + lceil: '⌈', + lcub: '{', + lcy: 'л', + ldca: '⤶', + ldquo: '“', + ldquor: '„', + ldrdhar: '⥧', + ldrushar: '⥋', + ldsh: '↲', + le: '≤', + leftarrow: '←', + leftarrowtail: '↢', + leftharpoondown: '↽', + leftharpoonup: '↼', + leftleftarrows: '⇇', + leftrightarrow: '↔', + leftrightarrows: '⇆', + leftrightharpoons: '⇋', + leftrightsquigarrow: '↭', + leftthreetimes: '⋋', + leg: '⋚', + leq: '≤', + leqq: '≦', + leqslant: '⩽', + les: '⩽', + lescc: '⪨', + lesdot: '⩿', + lesdoto: '⪁', + lesdotor: '⪃', + lesg: '⋚︀', + lesges: '⪓', + lessapprox: '⪅', + lessdot: '⋖', + lesseqgtr: '⋚', + lesseqqgtr: '⪋', + lessgtr: '≶', + lesssim: '≲', + lfisht: '⥼', + lfloor: '⌊', + lfr: '𝔩', + lg: '≶', + lgE: '⪑', + lhard: '↽', + lharu: '↼', + lharul: '⥪', + lhblk: '▄', + ljcy: 'љ', + ll: '≪', + llarr: '⇇', + llcorner: '⌞', + llhard: '⥫', + lltri: '◺', + lmidot: 'ŀ', + lmoust: '⎰', + lmoustache: '⎰', + lnE: '≨', + lnap: '⪉', + lnapprox: '⪉', + lne: '⪇', + lneq: '⪇', + lneqq: '≨', + lnsim: '⋦', + loang: '⟬', + loarr: '⇽', + lobrk: '⟦', + longleftarrow: '⟵', + longleftrightarrow: '⟷', + longmapsto: '⟼', + longrightarrow: '⟶', + looparrowleft: '↫', + looparrowright: '↬', + lopar: '⦅', + lopf: '𝕝', + loplus: '⨭', + lotimes: '⨴', + lowast: '∗', + lowbar: '_', + loz: '◊', + lozenge: '◊', + lozf: '⧫', + lpar: '(', + lparlt: '⦓', + lrarr: '⇆', + lrcorner: '⌟', + lrhar: '⇋', + lrhard: '⥭', + lrm: '‎', + lrtri: '⊿', + lsaquo: '‹', + lscr: '𝓁', + lsh: '↰', + lsim: '≲', + lsime: '⪍', + lsimg: '⪏', + lsqb: '[', + lsquo: '‘', + lsquor: '‚', + lstrok: 'ł', + lt: '<', + ltcc: '⪦', + ltcir: '⩹', + ltdot: '⋖', + lthree: '⋋', + ltimes: '⋉', + ltlarr: '⥶', + ltquest: '⩻', + ltrPar: '⦖', + ltri: '◃', + ltrie: '⊴', + ltrif: '◂', + lurdshar: '⥊', + luruhar: '⥦', + lvertneqq: '≨︀', + lvnE: '≨︀', + mDDot: '∺', + macr: '¯', + male: '♂', + malt: '✠', + maltese: '✠', + map: '↦', + mapsto: '↦', + mapstodown: '↧', + mapstoleft: '↤', + mapstoup: '↥', + marker: '▮', + mcomma: '⨩', + mcy: 'м', + mdash: '—', + measuredangle: '∡', + mfr: '𝔪', + mho: '℧', + micro: 'µ', + mid: '∣', + midast: '*', + midcir: '⫰', + middot: '·', + minus: '−', + minusb: '⊟', + minusd: '∸', + minusdu: '⨪', + mlcp: '⫛', + mldr: '…', + mnplus: '∓', + models: '⊧', + mopf: '𝕞', + mp: '∓', + mscr: '𝓂', + mstpos: '∾', + mu: 'μ', + multimap: '⊸', + mumap: '⊸', + nGg: '⋙̸', + nGt: '≫⃒', + nGtv: '≫̸', + nLeftarrow: '⇍', + nLeftrightarrow: '⇎', + nLl: '⋘̸', + nLt: '≪⃒', + nLtv: '≪̸', + nRightarrow: '⇏', + nVDash: '⊯', + nVdash: '⊮', + nabla: '∇', + nacute: 'ń', + nang: '∠⃒', + nap: '≉', + napE: '⩰̸', + napid: '≋̸', + napos: 'ʼn', + napprox: '≉', + natur: '♮', + natural: '♮', + naturals: 'ℕ', + nbsp: ' ', + nbump: '≎̸', + nbumpe: '≏̸', + ncap: '⩃', + ncaron: 'ň', + ncedil: 'ņ', + ncong: '≇', + ncongdot: '⩭̸', + ncup: '⩂', + ncy: 'н', + ndash: '–', + ne: '≠', + neArr: '⇗', + nearhk: '⤤', + nearr: '↗', + nearrow: '↗', + nedot: '≐̸', + nequiv: '≢', + nesear: '⤨', + nesim: '≂̸', + nexist: '∄', + nexists: '∄', + nfr: '𝔫', + ngE: '≧̸', + nge: '≱', + ngeq: '≱', + ngeqq: '≧̸', + ngeqslant: '⩾̸', + nges: '⩾̸', + ngsim: '≵', + ngt: '≯', + ngtr: '≯', + nhArr: '⇎', + nharr: '↮', + nhpar: '⫲', + ni: '∋', + nis: '⋼', + nisd: '⋺', + niv: '∋', + njcy: 'њ', + nlArr: '⇍', + nlE: '≦̸', + nlarr: '↚', + nldr: '‥', + nle: '≰', + nleftarrow: '↚', + nleftrightarrow: '↮', + nleq: '≰', + nleqq: '≦̸', + nleqslant: '⩽̸', + nles: '⩽̸', + nless: '≮', + nlsim: '≴', + nlt: '≮', + nltri: '⋪', + nltrie: '⋬', + nmid: '∤', + nopf: '𝕟', + not: '¬', + notin: '∉', + notinE: '⋹̸', + notindot: '⋵̸', + notinva: '∉', + notinvb: '⋷', + notinvc: '⋶', + notni: '∌', + notniva: '∌', + notnivb: '⋾', + notnivc: '⋽', + npar: '∦', + nparallel: '∦', + nparsl: '⫽⃥', + npart: '∂̸', + npolint: '⨔', + npr: '⊀', + nprcue: '⋠', + npre: '⪯̸', + nprec: '⊀', + npreceq: '⪯̸', + nrArr: '⇏', + nrarr: '↛', + nrarrc: '⤳̸', + nrarrw: '↝̸', + nrightarrow: '↛', + nrtri: '⋫', + nrtrie: '⋭', + nsc: '⊁', + nsccue: '⋡', + nsce: '⪰̸', + nscr: '𝓃', + nshortmid: '∤', + nshortparallel: '∦', + nsim: '≁', + nsime: '≄', + nsimeq: '≄', + nsmid: '∤', + nspar: '∦', + nsqsube: '⋢', + nsqsupe: '⋣', + nsub: '⊄', + nsubE: '⫅̸', + nsube: '⊈', + nsubset: '⊂⃒', + nsubseteq: '⊈', + nsubseteqq: '⫅̸', + nsucc: '⊁', + nsucceq: '⪰̸', + nsup: '⊅', + nsupE: '⫆̸', + nsupe: '⊉', + nsupset: '⊃⃒', + nsupseteq: '⊉', + nsupseteqq: '⫆̸', + ntgl: '≹', + ntilde: 'ñ', + ntlg: '≸', + ntriangleleft: '⋪', + ntrianglelefteq: '⋬', + ntriangleright: '⋫', + ntrianglerighteq: '⋭', + nu: 'ν', + num: '#', + numero: '№', + numsp: ' ', + nvDash: '⊭', + nvHarr: '⤄', + nvap: '≍⃒', + nvdash: '⊬', + nvge: '≥⃒', + nvgt: '>⃒', + nvinfin: '⧞', + nvlArr: '⤂', + nvle: '≤⃒', + nvlt: '<⃒', + nvltrie: '⊴⃒', + nvrArr: '⤃', + nvrtrie: '⊵⃒', + nvsim: '∼⃒', + nwArr: '⇖', + nwarhk: '⤣', + nwarr: '↖', + nwarrow: '↖', + nwnear: '⤧', + oS: 'Ⓢ', + oacute: 'ó', + oast: '⊛', + ocir: '⊚', + ocirc: 'ô', + ocy: 'о', + odash: '⊝', + odblac: 'ő', + odiv: '⨸', + odot: '⊙', + odsold: '⦼', + oelig: 'œ', + ofcir: '⦿', + ofr: '𝔬', + ogon: '˛', + ograve: 'ò', + ogt: '⧁', + ohbar: '⦵', + ohm: 'Ω', + oint: '∮', + olarr: '↺', + olcir: '⦾', + olcross: '⦻', + oline: '‾', + olt: '⧀', + omacr: 'ō', + omega: 'ω', + omicron: 'ο', + omid: '⦶', + ominus: '⊖', + oopf: '𝕠', + opar: '⦷', + operp: '⦹', + oplus: '⊕', + or: '∨', + orarr: '↻', + ord: '⩝', + order: 'ℴ', + orderof: 'ℴ', + ordf: 'ª', + ordm: 'º', + origof: '⊶', + oror: '⩖', + orslope: '⩗', + orv: '⩛', + oscr: 'ℴ', + oslash: 'ø', + osol: '⊘', + otilde: 'õ', + otimes: '⊗', + otimesas: '⨶', + ouml: 'ö', + ovbar: '⌽', + par: '∥', + para: '¶', + parallel: '∥', + parsim: '⫳', + parsl: '⫽', + part: '∂', + pcy: 'п', + percnt: '%', + period: '.', + permil: '‰', + perp: '⊥', + pertenk: '‱', + pfr: '𝔭', + phi: 'φ', + phiv: 'ϕ', + phmmat: 'ℳ', + phone: '☎', + pi: 'π', + pitchfork: '⋔', + piv: 'ϖ', + planck: 'ℏ', + planckh: 'ℎ', + plankv: 'ℏ', + plus: '+', + plusacir: '⨣', + plusb: '⊞', + pluscir: '⨢', + plusdo: '∔', + plusdu: '⨥', + pluse: '⩲', + plusmn: '±', + plussim: '⨦', + plustwo: '⨧', + pm: '±', + pointint: '⨕', + popf: '𝕡', + pound: '£', + pr: '≺', + prE: '⪳', + prap: '⪷', + prcue: '≼', + pre: '⪯', + prec: '≺', + precapprox: '⪷', + preccurlyeq: '≼', + preceq: '⪯', + precnapprox: '⪹', + precneqq: '⪵', + precnsim: '⋨', + precsim: '≾', + prime: '′', + primes: 'ℙ', + prnE: '⪵', + prnap: '⪹', + prnsim: '⋨', + prod: '∏', + profalar: '⌮', + profline: '⌒', + profsurf: '⌓', + prop: '∝', + propto: '∝', + prsim: '≾', + prurel: '⊰', + pscr: '𝓅', + psi: 'ψ', + puncsp: ' ', + qfr: '𝔮', + qint: '⨌', + qopf: '𝕢', + qprime: '⁗', + qscr: '𝓆', + quaternions: 'ℍ', + quatint: '⨖', + quest: '?', + questeq: '≟', + quot: '"', + rAarr: '⇛', + rArr: '⇒', + rAtail: '⤜', + rBarr: '⤏', + rHar: '⥤', + race: '∽̱', + racute: 'ŕ', + radic: '√', + raemptyv: '⦳', + rang: '⟩', + rangd: '⦒', + range: '⦥', + rangle: '⟩', + raquo: '»', + rarr: '→', + rarrap: '⥵', + rarrb: '⇥', + rarrbfs: '⤠', + rarrc: '⤳', + rarrfs: '⤞', + rarrhk: '↪', + rarrlp: '↬', + rarrpl: '⥅', + rarrsim: '⥴', + rarrtl: '↣', + rarrw: '↝', + ratail: '⤚', + ratio: '∶', + rationals: 'ℚ', + rbarr: '⤍', + rbbrk: '❳', + rbrace: '}', + rbrack: ']', + rbrke: '⦌', + rbrksld: '⦎', + rbrkslu: '⦐', + rcaron: 'ř', + rcedil: 'ŗ', + rceil: '⌉', + rcub: '}', + rcy: 'р', + rdca: '⤷', + rdldhar: '⥩', + rdquo: '”', + rdquor: '”', + rdsh: '↳', + real: 'ℜ', + realine: 'ℛ', + realpart: 'ℜ', + reals: 'ℝ', + rect: '▭', + reg: '®', + rfisht: '⥽', + rfloor: '⌋', + rfr: '𝔯', + rhard: '⇁', + rharu: '⇀', + rharul: '⥬', + rho: 'ρ', + rhov: 'ϱ', + rightarrow: '→', + rightarrowtail: '↣', + rightharpoondown: '⇁', + rightharpoonup: '⇀', + rightleftarrows: '⇄', + rightleftharpoons: '⇌', + rightrightarrows: '⇉', + rightsquigarrow: '↝', + rightthreetimes: '⋌', + ring: '˚', + risingdotseq: '≓', + rlarr: '⇄', + rlhar: '⇌', + rlm: '‏', + rmoust: '⎱', + rmoustache: '⎱', + rnmid: '⫮', + roang: '⟭', + roarr: '⇾', + robrk: '⟧', + ropar: '⦆', + ropf: '𝕣', + roplus: '⨮', + rotimes: '⨵', + rpar: ')', + rpargt: '⦔', + rppolint: '⨒', + rrarr: '⇉', + rsaquo: '›', + rscr: '𝓇', + rsh: '↱', + rsqb: ']', + rsquo: '’', + rsquor: '’', + rthree: '⋌', + rtimes: '⋊', + rtri: '▹', + rtrie: '⊵', + rtrif: '▸', + rtriltri: '⧎', + ruluhar: '⥨', + rx: '℞', + sacute: 'ś', + sbquo: '‚', + sc: '≻', + scE: '⪴', + scap: '⪸', + scaron: 'š', + sccue: '≽', + sce: '⪰', + scedil: 'ş', + scirc: 'ŝ', + scnE: '⪶', + scnap: '⪺', + scnsim: '⋩', + scpolint: '⨓', + scsim: '≿', + scy: 'с', + sdot: '⋅', + sdotb: '⊡', + sdote: '⩦', + seArr: '⇘', + searhk: '⤥', + searr: '↘', + searrow: '↘', + sect: '§', + semi: ';', + seswar: '⤩', + setminus: '∖', + setmn: '∖', + sext: '✶', + sfr: '𝔰', + sfrown: '⌢', + sharp: '♯', + shchcy: 'щ', + shcy: 'ш', + shortmid: '∣', + shortparallel: '∥', + shy: '­', + sigma: 'σ', + sigmaf: 'ς', + sigmav: 'ς', + sim: '∼', + simdot: '⩪', + sime: '≃', + simeq: '≃', + simg: '⪞', + simgE: '⪠', + siml: '⪝', + simlE: '⪟', + simne: '≆', + simplus: '⨤', + simrarr: '⥲', + slarr: '←', + smallsetminus: '∖', + smashp: '⨳', + smeparsl: '⧤', + smid: '∣', + smile: '⌣', + smt: '⪪', + smte: '⪬', + smtes: '⪬︀', + softcy: 'ь', + sol: '/', + solb: '⧄', + solbar: '⌿', + sopf: '𝕤', + spades: '♠', + spadesuit: '♠', + spar: '∥', + sqcap: '⊓', + sqcaps: '⊓︀', + sqcup: '⊔', + sqcups: '⊔︀', + sqsub: '⊏', + sqsube: '⊑', + sqsubset: '⊏', + sqsubseteq: '⊑', + sqsup: '⊐', + sqsupe: '⊒', + sqsupset: '⊐', + sqsupseteq: '⊒', + squ: '□', + square: '□', + squarf: '▪', + squf: '▪', + srarr: '→', + sscr: '𝓈', + ssetmn: '∖', + ssmile: '⌣', + sstarf: '⋆', + star: '☆', + starf: '★', + straightepsilon: 'ϵ', + straightphi: 'ϕ', + strns: '¯', + sub: '⊂', + subE: '⫅', + subdot: '⪽', + sube: '⊆', + subedot: '⫃', + submult: '⫁', + subnE: '⫋', + subne: '⊊', + subplus: '⪿', + subrarr: '⥹', + subset: '⊂', + subseteq: '⊆', + subseteqq: '⫅', + subsetneq: '⊊', + subsetneqq: '⫋', + subsim: '⫇', + subsub: '⫕', + subsup: '⫓', + succ: '≻', + succapprox: '⪸', + succcurlyeq: '≽', + succeq: '⪰', + succnapprox: '⪺', + succneqq: '⪶', + succnsim: '⋩', + succsim: '≿', + sum: '∑', + sung: '♪', + sup1: '¹', + sup2: '²', + sup3: '³', + sup: '⊃', + supE: '⫆', + supdot: '⪾', + supdsub: '⫘', + supe: '⊇', + supedot: '⫄', + suphsol: '⟉', + suphsub: '⫗', + suplarr: '⥻', + supmult: '⫂', + supnE: '⫌', + supne: '⊋', + supplus: '⫀', + supset: '⊃', + supseteq: '⊇', + supseteqq: '⫆', + supsetneq: '⊋', + supsetneqq: '⫌', + supsim: '⫈', + supsub: '⫔', + supsup: '⫖', + swArr: '⇙', + swarhk: '⤦', + swarr: '↙', + swarrow: '↙', + swnwar: '⤪', + szlig: 'ß', + target: '⌖', + tau: 'τ', + tbrk: '⎴', + tcaron: 'ť', + tcedil: 'ţ', + tcy: 'т', + tdot: '⃛', + telrec: '⌕', + tfr: '𝔱', + there4: '∴', + therefore: '∴', + theta: 'θ', + thetasym: 'ϑ', + thetav: 'ϑ', + thickapprox: '≈', + thicksim: '∼', + thinsp: ' ', + thkap: '≈', + thksim: '∼', + thorn: 'þ', + tilde: '˜', + times: '×', + timesb: '⊠', + timesbar: '⨱', + timesd: '⨰', + tint: '∭', + toea: '⤨', + top: '⊤', + topbot: '⌶', + topcir: '⫱', + topf: '𝕥', + topfork: '⫚', + tosa: '⤩', + tprime: '‴', + trade: '™', + triangle: '▵', + triangledown: '▿', + triangleleft: '◃', + trianglelefteq: '⊴', + triangleq: '≜', + triangleright: '▹', + trianglerighteq: '⊵', + tridot: '◬', + trie: '≜', + triminus: '⨺', + triplus: '⨹', + trisb: '⧍', + tritime: '⨻', + trpezium: '⏢', + tscr: '𝓉', + tscy: 'ц', + tshcy: 'ћ', + tstrok: 'ŧ', + twixt: '≬', + twoheadleftarrow: '↞', + twoheadrightarrow: '↠', + uArr: '⇑', + uHar: '⥣', + uacute: 'ú', + uarr: '↑', + ubrcy: 'ў', + ubreve: 'ŭ', + ucirc: 'û', + ucy: 'у', + udarr: '⇅', + udblac: 'ű', + udhar: '⥮', + ufisht: '⥾', + ufr: '𝔲', + ugrave: 'ù', + uharl: '↿', + uharr: '↾', + uhblk: '▀', + ulcorn: '⌜', + ulcorner: '⌜', + ulcrop: '⌏', + ultri: '◸', + umacr: 'ū', + uml: '¨', + uogon: 'ų', + uopf: '𝕦', + uparrow: '↑', + updownarrow: '↕', + upharpoonleft: '↿', + upharpoonright: '↾', + uplus: '⊎', + upsi: 'υ', + upsih: 'ϒ', + upsilon: 'υ', + upuparrows: '⇈', + urcorn: '⌝', + urcorner: '⌝', + urcrop: '⌎', + uring: 'ů', + urtri: '◹', + uscr: '𝓊', + utdot: '⋰', + utilde: 'ũ', + utri: '▵', + utrif: '▴', + uuarr: '⇈', + uuml: 'ü', + uwangle: '⦧', + vArr: '⇕', + vBar: '⫨', + vBarv: '⫩', + vDash: '⊨', + vangrt: '⦜', + varepsilon: 'ϵ', + varkappa: 'ϰ', + varnothing: '∅', + varphi: 'ϕ', + varpi: 'ϖ', + varpropto: '∝', + varr: '↕', + varrho: 'ϱ', + varsigma: 'ς', + varsubsetneq: '⊊︀', + varsubsetneqq: '⫋︀', + varsupsetneq: '⊋︀', + varsupsetneqq: '⫌︀', + vartheta: 'ϑ', + vartriangleleft: '⊲', + vartriangleright: '⊳', + vcy: 'в', + vdash: '⊢', + vee: '∨', + veebar: '⊻', + veeeq: '≚', + vellip: '⋮', + verbar: '|', + vert: '|', + vfr: '𝔳', + vltri: '⊲', + vnsub: '⊂⃒', + vnsup: '⊃⃒', + vopf: '𝕧', + vprop: '∝', + vrtri: '⊳', + vscr: '𝓋', + vsubnE: '⫋︀', + vsubne: '⊊︀', + vsupnE: '⫌︀', + vsupne: '⊋︀', + vzigzag: '⦚', + wcirc: 'ŵ', + wedbar: '⩟', + wedge: '∧', + wedgeq: '≙', + weierp: '℘', + wfr: '𝔴', + wopf: '𝕨', + wp: '℘', + wr: '≀', + wreath: '≀', + wscr: '𝓌', + xcap: '⋂', + xcirc: '◯', + xcup: '⋃', + xdtri: '▽', + xfr: '𝔵', + xhArr: '⟺', + xharr: '⟷', + xi: 'ξ', + xlArr: '⟸', + xlarr: '⟵', + xmap: '⟼', + xnis: '⋻', + xodot: '⨀', + xopf: '𝕩', + xoplus: '⨁', + xotime: '⨂', + xrArr: '⟹', + xrarr: '⟶', + xscr: '𝓍', + xsqcup: '⨆', + xuplus: '⨄', + xutri: '△', + xvee: '⋁', + xwedge: '⋀', + yacute: 'ý', + yacy: 'я', + ycirc: 'ŷ', + ycy: 'ы', + yen: '¥', + yfr: '𝔶', + yicy: 'ї', + yopf: '𝕪', + yscr: '𝓎', + yucy: 'ю', + yuml: 'ÿ', + zacute: 'ź', + zcaron: 'ž', + zcy: 'з', + zdot: 'ż', + zeetrf: 'ℨ', + zeta: 'ζ', + zfr: '𝔷', + zhcy: 'ж', + zigrarr: '⇝', + zopf: '𝕫', + zscr: '𝓏', + zwj: '‍', + zwnj: '‌' +} + +;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js + + +const own = {}.hasOwnProperty + +/** + * Decode a single character reference (without the `&` or `;`). + * You probably only need this when you’re building parsers yourself that follow + * different rules compared to HTML. + * This is optimized to be tiny in browsers. + * + * @param {string} value + * `notin` (named), `#123` (deci), `#x123` (hexa). + * @returns {string|false} + * Decoded reference. + */ +function decodeNamedCharacterReference(value) { + return own.call(characterEntities, value) ? characterEntities[value] : false +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const characterReference = { + name: 'characterReference', + tokenize: tokenizeCharacterReference +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterReference(effects, ok, nok) { + const self = this + let size = 0 + /** @type {number} */ + let max + /** @type {(code: Code) => boolean} */ + let test + return start + + /** + * Start of character reference. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterReference') + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + return open + } + + /** + * After `&`, at `#` for numeric references or alphanumeric for named + * references. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 35) { + effects.enter('characterReferenceMarkerNumeric') + effects.consume(code) + effects.exit('characterReferenceMarkerNumeric') + return numeric + } + effects.enter('characterReferenceValue') + max = 31 + test = asciiAlphanumeric + return value(code) + } + + /** + * After `#`, at `x` for hexadecimals or digit for decimals. + * + * ```markdown + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function numeric(code) { + if (code === 88 || code === 120) { + effects.enter('characterReferenceMarkerHexadecimal') + effects.consume(code) + effects.exit('characterReferenceMarkerHexadecimal') + effects.enter('characterReferenceValue') + max = 6 + test = asciiHexDigit + return value + } + effects.enter('characterReferenceValue') + max = 7 + test = asciiDigit + return value(code) + } + + /** + * After markers (`&#x`, `&#`, or `&`), in value, before `;`. + * + * The character reference kind defines what and how many characters are + * allowed. + * + * ```markdown + * > | a&b + * ^^^ + * > | a{b + * ^^^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function value(code) { + if (code === 59 && size) { + const token = effects.exit('characterReferenceValue') + if ( + test === asciiAlphanumeric && + !decodeNamedCharacterReference(self.sliceSerialize(token)) + ) { + return nok(code) + } + + // To do: `markdown-rs` uses a different name: + // `CharacterReferenceMarkerSemi`. + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + effects.exit('characterReference') + return ok + } + if (test(code) && size++ < max) { + effects.consume(code) + return value + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const characterEscape = { + name: 'characterEscape', + tokenize: tokenizeCharacterEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterEscape(effects, ok, nok) { + return start + + /** + * Start of character escape. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterEscape') + effects.enter('escapeMarker') + effects.consume(code) + effects.exit('escapeMarker') + return inside + } + + /** + * After `\`, at punctuation. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + // ASCII punctuation. + if (asciiPunctuation(code)) { + effects.enter('characterEscapeValue') + effects.consume(code) + effects.exit('characterEscapeValue') + effects.exit('characterEscape') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const lineEnding = { + name: 'lineEnding', + tokenize: tokenizeLineEnding +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLineEnding(effects, ok) { + return start + + /** @type {State} */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, ok, 'linePrefix') + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + + +/** @type {Construct} */ +const labelEnd = { + name: 'labelEnd', + tokenize: tokenizeLabelEnd, + resolveTo: resolveToLabelEnd, + resolveAll: resolveAllLabelEnd +} + +/** @type {Construct} */ +const resourceConstruct = { + tokenize: tokenizeResource +} +/** @type {Construct} */ +const referenceFullConstruct = { + tokenize: tokenizeReferenceFull +} +/** @type {Construct} */ +const referenceCollapsedConstruct = { + tokenize: tokenizeReferenceCollapsed +} + +/** @type {Resolver} */ +function resolveAllLabelEnd(events) { + let index = -1 + while (++index < events.length) { + const token = events[index][1] + if ( + token.type === 'labelImage' || + token.type === 'labelLink' || + token.type === 'labelEnd' + ) { + // Remove the marker. + events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) + token.type = 'data' + index++ + } + } + return events +} + +/** @type {Resolver} */ +function resolveToLabelEnd(events, context) { + let index = events.length + let offset = 0 + /** @type {Token} */ + let token + /** @type {number | undefined} */ + let open + /** @type {number | undefined} */ + let close + /** @type {Array<Event>} */ + let media + + // Find an opening. + while (index--) { + token = events[index][1] + if (open) { + // If we see another link, or inactive link label, we’ve been here before. + if ( + token.type === 'link' || + (token.type === 'labelLink' && token._inactive) + ) { + break + } + + // Mark other link openings as inactive, as we can’t have links in + // links. + if (events[index][0] === 'enter' && token.type === 'labelLink') { + token._inactive = true + } + } else if (close) { + if ( + events[index][0] === 'enter' && + (token.type === 'labelImage' || token.type === 'labelLink') && + !token._balanced + ) { + open = index + if (token.type !== 'labelLink') { + offset = 2 + break + } + } + } else if (token.type === 'labelEnd') { + close = index + } + } + const group = { + type: events[open][1].type === 'labelLink' ? 'link' : 'image', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + const label = { + type: 'label', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[close][1].end) + } + const text = { + type: 'labelText', + start: Object.assign({}, events[open + offset + 2][1].end), + end: Object.assign({}, events[close - 2][1].start) + } + media = [ + ['enter', group, context], + ['enter', label, context] + ] + + // Opening marker. + media = push(media, events.slice(open + 1, open + offset + 3)) + + // Text open. + media = push(media, [['enter', text, context]]) + + // Always populated by defaults. + + // Between. + media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ) + + // Text close, marker close, label close. + media = push(media, [ + ['exit', text, context], + events[close - 2], + events[close - 1], + ['exit', label, context] + ]) + + // Reference, resource, or so. + media = push(media, events.slice(close + 1)) + + // Media close. + media = push(media, [['exit', group, context]]) + splice(events, open, events.length, media) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelEnd(effects, ok, nok) { + const self = this + let index = self.events.length + /** @type {Token} */ + let labelStart + /** @type {boolean} */ + let defined + + // Find an opening. + while (index--) { + if ( + (self.events[index][1].type === 'labelImage' || + self.events[index][1].type === 'labelLink') && + !self.events[index][1]._balanced + ) { + labelStart = self.events[index][1] + break + } + } + return start + + /** + * Start of label end. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ``` + * + * @type {State} + */ + function start(code) { + // If there is not an okay opening. + if (!labelStart) { + return nok(code) + } + + // If the corresponding label (link) start is marked as inactive, + // it means we’d be wrapping a link, like this: + // + // ```markdown + // > | a [b [c](d) e](f) g. + // ^ + // ``` + // + // We can’t have that, so it’s just balanced brackets. + if (labelStart._inactive) { + return labelEndNok(code) + } + defined = self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize({ + start: labelStart.end, + end: self.now() + }) + ) + ) + effects.enter('labelEnd') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelEnd') + return after + } + + /** + * After `]`. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + // Note: `markdown-rs` also parses GFM footnotes here, which for us is in + // an extension. + + // Resource (`[asd](fgh)`)? + if (code === 40) { + return effects.attempt( + resourceConstruct, + labelEndOk, + defined ? labelEndOk : labelEndNok + )(code) + } + + // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? + if (code === 91) { + return effects.attempt( + referenceFullConstruct, + labelEndOk, + defined ? referenceNotFull : labelEndNok + )(code) + } + + // Shortcut (`[asd]`) reference? + return defined ? labelEndOk(code) : labelEndNok(code) + } + + /** + * After `]`, at `[`, but not at a full reference. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function referenceNotFull(code) { + return effects.attempt( + referenceCollapsedConstruct, + labelEndOk, + labelEndNok + )(code) + } + + /** + * Done, we found something. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndOk(code) { + // Note: `markdown-rs` does a bunch of stuff here. + return ok(code) + } + + /** + * Done, it’s nothing. + * + * There was an okay opening, but we didn’t match anything. + * + * ```markdown + * > | [a](b c + * ^ + * > | [a][b c + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndNok(code) { + labelStart._balanced = true + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeResource(effects, ok, nok) { + return resourceStart + + /** + * At a resource. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceStart(code) { + effects.enter('resource') + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + return resourceBefore + } + + /** + * In resource, after `(`, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceOpen)(code) + : resourceOpen(code) + } + + /** + * In resource, after optional whitespace, at `)` or a destination. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceOpen(code) { + if (code === 41) { + return resourceEnd(code) + } + return factoryDestination( + effects, + resourceDestinationAfter, + resourceDestinationMissing, + 'resourceDestination', + 'resourceDestinationLiteral', + 'resourceDestinationLiteralMarker', + 'resourceDestinationRaw', + 'resourceDestinationString', + 32 + )(code) + } + + /** + * In resource, after destination, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceBetween)(code) + : resourceEnd(code) + } + + /** + * At invalid destination. + * + * ```markdown + * > | [a](<<) b + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationMissing(code) { + return nok(code) + } + + /** + * In resource, after destination and whitespace, at `(` or title. + * + * ```markdown + * > | [a](b ) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBetween(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + resourceTitleAfter, + nok, + 'resourceTitle', + 'resourceTitleMarker', + 'resourceTitleString' + )(code) + } + return resourceEnd(code) + } + + /** + * In resource, after title, at optional whitespace. + * + * ```markdown + * > | [a](b "c") d + * ^ + * ``` + * + * @type {State} + */ + function resourceTitleAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceEnd)(code) + : resourceEnd(code) + } + + /** + * In resource, at `)`. + * + * ```markdown + * > | [a](b) d + * ^ + * ``` + * + * @type {State} + */ + function resourceEnd(code) { + if (code === 41) { + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + effects.exit('resource') + return ok + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceFull(effects, ok, nok) { + const self = this + return referenceFull + + /** + * In a reference (full), at the `[`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFull(code) { + return factoryLabel.call( + self, + effects, + referenceFullAfter, + referenceFullMissing, + 'reference', + 'referenceMarker', + 'referenceString' + )(code) + } + + /** + * In a reference (full), after `]`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullAfter(code) { + return self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + ) + ? ok(code) + : nok(code) + } + + /** + * In reference (full) that was missing. + * + * ```markdown + * > | [a][b d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullMissing(code) { + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceCollapsed(effects, ok, nok) { + return referenceCollapsedStart + + /** + * In reference (collapsed), at `[`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedStart(code) { + // We only attempt a collapsed label if there’s a `[`. + + effects.enter('reference') + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + return referenceCollapsedOpen + } + + /** + * In reference (collapsed), at `]`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedOpen(code) { + if (code === 93) { + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + effects.exit('reference') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartImage = { + name: 'labelStartImage', + tokenize: tokenizeLabelStartImage, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartImage(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (image) start. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelImage') + effects.enter('labelImageMarker') + effects.consume(code) + effects.exit('labelImageMarker') + return open + } + + /** + * After `!`, at `[`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 91) { + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelImage') + return after + } + return nok(code) + } + + /** + * After `![`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * This is needed in because, when GFM footnotes are enabled, images never + * form when started with a `^`. + * Instead, links form: + * + * ```markdown + * ![^a](b) + * + * ![^a][b] + * + * [b]: c + * ``` + * + * ```html + * <p>!<a href=\"b\">^a</a></p> + * <p>!<a href=\"c\">^a</a></p> + * ``` + * + * @type {State} + */ + function after(code) { + // To do: use a new field to do this, this is still needed for + // `micromark-extension-gfm-footnote`, but the `label-start-link` + // behavior isn’t. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + +/** + * Classify whether a code represents whitespace, punctuation, or something + * else. + * + * Used for attention (emphasis, strong), whose sequences can open or close + * based on the class of surrounding characters. + * + * > 👉 **Note**: eof (`null`) is seen as whitespace. + * + * @param {Code} code + * Code. + * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} + * Group. + */ +function classifyCharacter(code) { + if ( + code === null || + markdownLineEndingOrSpace(code) || + unicodeWhitespace(code) + ) { + return 1 + } + if (unicodePunctuation(code)) { + return 2 + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const attention = { + name: 'attention', + tokenize: tokenizeAttention, + resolveAll: resolveAllAttention +} + +/** + * Take all events and resolve attention to emphasis or strong. + * + * @type {Resolver} + */ +function resolveAllAttention(events, context) { + let index = -1 + /** @type {number} */ + let open + /** @type {Token} */ + let group + /** @type {Token} */ + let text + /** @type {Token} */ + let openingSequence + /** @type {Token} */ + let closingSequence + /** @type {number} */ + let use + /** @type {Array<Event>} */ + let nextEvents + /** @type {number} */ + let offset + + // Walk through all events. + // + // Note: performance of this is fine on an mb of normal markdown, but it’s + // a bottleneck for malicious stuff. + while (++index < events.length) { + // Find a token that can close. + if ( + events[index][0] === 'enter' && + events[index][1].type === 'attentionSequence' && + events[index][1]._close + ) { + open = index + + // Now walk back to find an opener. + while (open--) { + // Find a token that can open the closer. + if ( + events[open][0] === 'exit' && + events[open][1].type === 'attentionSequence' && + events[open][1]._open && + // If the markers are the same: + context.sliceSerialize(events[open][1]).charCodeAt(0) === + context.sliceSerialize(events[index][1]).charCodeAt(0) + ) { + // If the opening can close or the closing can open, + // and the close size *is not* a multiple of three, + // but the sum of the opening and closing size *is* multiple of three, + // then don’t match. + if ( + (events[open][1]._close || events[index][1]._open) && + (events[index][1].end.offset - events[index][1].start.offset) % 3 && + !( + (events[open][1].end.offset - + events[open][1].start.offset + + events[index][1].end.offset - + events[index][1].start.offset) % + 3 + ) + ) { + continue + } + + // Number of markers to use from the sequence. + use = + events[open][1].end.offset - events[open][1].start.offset > 1 && + events[index][1].end.offset - events[index][1].start.offset > 1 + ? 2 + : 1 + const start = Object.assign({}, events[open][1].end) + const end = Object.assign({}, events[index][1].start) + movePoint(start, -use) + movePoint(end, use) + openingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start, + end: Object.assign({}, events[open][1].end) + } + closingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start: Object.assign({}, events[index][1].start), + end + } + text = { + type: use > 1 ? 'strongText' : 'emphasisText', + start: Object.assign({}, events[open][1].end), + end: Object.assign({}, events[index][1].start) + } + group = { + type: use > 1 ? 'strong' : 'emphasis', + start: Object.assign({}, openingSequence.start), + end: Object.assign({}, closingSequence.end) + } + events[open][1].end = Object.assign({}, openingSequence.start) + events[index][1].start = Object.assign({}, closingSequence.end) + nextEvents = [] + + // If there are more markers in the opening, add them before. + if (events[open][1].end.offset - events[open][1].start.offset) { + nextEvents = push(nextEvents, [ + ['enter', events[open][1], context], + ['exit', events[open][1], context] + ]) + } + + // Opening. + nextEvents = push(nextEvents, [ + ['enter', group, context], + ['enter', openingSequence, context], + ['exit', openingSequence, context], + ['enter', text, context] + ]) + + // Always populated by defaults. + + // Between. + nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index), + context + ) + ) + + // Closing. + nextEvents = push(nextEvents, [ + ['exit', text, context], + ['enter', closingSequence, context], + ['exit', closingSequence, context], + ['exit', group, context] + ]) + + // If there are more markers in the closing, add them after. + if (events[index][1].end.offset - events[index][1].start.offset) { + offset = 2 + nextEvents = push(nextEvents, [ + ['enter', events[index][1], context], + ['exit', events[index][1], context] + ]) + } else { + offset = 0 + } + splice(events, open - 1, index - open + 3, nextEvents) + index = open + nextEvents.length - offset - 2 + break + } + } + } + } + + // Remove remaining sequences. + index = -1 + while (++index < events.length) { + if (events[index][1].type === 'attentionSequence') { + events[index][1].type = 'data' + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAttention(effects, ok) { + const attentionMarkers = this.parser.constructs.attentionMarkers.null + const previous = this.previous + const before = classifyCharacter(previous) + + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Before a sequence. + * + * ```markdown + * > | ** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + marker = code + effects.enter('attentionSequence') + return inside(code) + } + + /** + * In a sequence. + * + * ```markdown + * > | ** + * ^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + const token = effects.exit('attentionSequence') + + // To do: next major: move this to resolver, just like `markdown-rs`. + const after = classifyCharacter(code) + + // Always populated by defaults. + + const open = + !after || (after === 2 && before) || attentionMarkers.includes(code) + const close = + !before || (before === 2 && after) || attentionMarkers.includes(previous) + token._open = Boolean(marker === 42 ? open : open && (before || !close)) + token._close = Boolean(marker === 42 ? close : close && (after || !open)) + return ok(code) + } +} + +/** + * Move a point a bit. + * + * Note: `move` only works inside lines! It’s not possible to move past other + * chunks (replacement characters, tabs, or line endings). + * + * @param {Point} point + * @param {number} offset + * @returns {void} + */ +function movePoint(point, offset) { + point.column += offset + point.offset += offset + point._bufferIndex += offset +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const autolink = { + name: 'autolink', + tokenize: tokenizeAutolink +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAutolink(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of an autolink. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('autolink') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.enter('autolinkProtocol') + return open + } + + /** + * After `<`, at protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (asciiAlpha(code)) { + effects.consume(code) + return schemeOrEmailAtext + } + return emailAtext(code) + } + + /** + * At second byte of protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function schemeOrEmailAtext(code) { + // ASCII alphanumeric and `+`, `-`, and `.`. + if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { + // Count the previous alphabetical from `open` too. + size = 1 + return schemeInsideOrEmailAtext(code) + } + return emailAtext(code) + } + + /** + * In ambiguous protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function schemeInsideOrEmailAtext(code) { + if (code === 58) { + effects.consume(code) + size = 0 + return urlInside + } + + // ASCII alphanumeric and `+`, `-`, and `.`. + if ( + (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && + size++ < 32 + ) { + effects.consume(code) + return schemeInsideOrEmailAtext + } + size = 0 + return emailAtext(code) + } + + /** + * After protocol, in URL. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * ``` + * + * @type {State} + */ + function urlInside(code) { + if (code === 62) { + effects.exit('autolinkProtocol') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + + // ASCII control, space, or `<`. + if (code === null || code === 32 || code === 60 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return urlInside + } + + /** + * In email atext. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailAtext(code) { + if (code === 64) { + effects.consume(code) + return emailAtSignOrDot + } + if (asciiAtext(code)) { + effects.consume(code) + return emailAtext + } + return nok(code) + } + + /** + * In label, after at-sign or dot. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ ^ + * ``` + * + * @type {State} + */ + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) + } + + /** + * In label, where `.` and `>` are allowed. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailLabel(code) { + if (code === 46) { + effects.consume(code) + size = 0 + return emailAtSignOrDot + } + if (code === 62) { + // Exit, then change the token type. + effects.exit('autolinkProtocol').type = 'autolinkEmail' + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + return emailValue(code) + } + + /** + * In label, where `.` and `>` are *not* allowed. + * + * Though, this is also used in `emailLabel` to parse other values. + * + * ```markdown + * > | a<user.name@ex-ample.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailValue(code) { + // ASCII alphanumeric or `-`. + if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { + const next = code === 45 ? emailValue : emailLabel + effects.consume(code) + return next + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const htmlText = { + name: 'htmlText', + tokenize: tokenizeHtmlText +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlText(effects, ok, nok) { + const self = this + /** @type {NonNullable<Code> | undefined} */ + let marker + /** @type {number} */ + let index + /** @type {State} */ + let returnState + return start + + /** + * Start of HTML (text). + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('htmlText') + effects.enter('htmlTextData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | a <b> c + * ^ + * > | a <!doctype> c + * ^ + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + return instruction + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagOpen + } + return nok(code) + } + + /** + * After `<!`, at declaration, comment, or CDATA. + * + * ```markdown + * > | a <!doctype> c + * ^ + * > | a <!--b--> c + * ^ + * > | a <![CDATA[>&<]]> c + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + index = 0 + return cdataOpenInside + } + if (asciiAlpha(code)) { + effects.consume(code) + return declaration + } + return nok(code) + } + + /** + * In a comment, after `<!-`, at another `-`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return nok(code) + } + + /** + * In comment. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function comment(code) { + if (code === null) { + return nok(code) + } + if (code === 45) { + effects.consume(code) + return commentClose + } + if (markdownLineEnding(code)) { + returnState = comment + return lineEndingBefore(code) + } + effects.consume(code) + return comment + } + + /** + * In comment, after `-`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentClose(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return comment(code) + } + + /** + * In comment, after `--`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentEnd(code) { + return code === 62 + ? end(code) + : code === 45 + ? commentClose(code) + : comment(code) + } + + /** + * After `<![`, in CDATA, expecting `CDATA[`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + return index === value.length ? cdata : cdataOpenInside + } + return nok(code) + } + + /** + * In CDATA. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^^^ + * ``` + * + * @type {State} + */ + function cdata(code) { + if (code === null) { + return nok(code) + } + if (code === 93) { + effects.consume(code) + return cdataClose + } + if (markdownLineEnding(code)) { + returnState = cdata + return lineEndingBefore(code) + } + effects.consume(code) + return cdata + } + + /** + * In CDATA, after `]`, at another `]`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataClose(code) { + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In CDATA, after `]]`, at `>`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataEnd(code) { + if (code === 62) { + return end(code) + } + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In declaration. + * + * ```markdown + * > | a <!b> c + * ^ + * ``` + * + * @type {State} + */ + function declaration(code) { + if (code === null || code === 62) { + return end(code) + } + if (markdownLineEnding(code)) { + returnState = declaration + return lineEndingBefore(code) + } + effects.consume(code) + return declaration + } + + /** + * In instruction. + * + * ```markdown + * > | a <?b?> c + * ^ + * ``` + * + * @type {State} + */ + function instruction(code) { + if (code === null) { + return nok(code) + } + if (code === 63) { + effects.consume(code) + return instructionClose + } + if (markdownLineEnding(code)) { + returnState = instruction + return lineEndingBefore(code) + } + effects.consume(code) + return instruction + } + + /** + * In instruction, after `?`, at `>`. + * + * ```markdown + * > | a <?b?> c + * ^ + * ``` + * + * @type {State} + */ + function instructionClose(code) { + return code === 62 ? end(code) : instruction(code) + } + + /** + * After `</`, in closing tag, at tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagClose + } + return nok(code) + } + + /** + * After `</x`, in a tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagClose(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagClose + } + return tagCloseBetween(code) + } + + /** + * In closing tag, after tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseBetween(code) { + if (markdownLineEnding(code)) { + returnState = tagCloseBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagCloseBetween + } + return end(code) + } + + /** + * After `<x`, in opening tag name. + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function tagOpen(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagOpen + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In opening tag, after tag name. + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function tagOpenBetween(code) { + if (code === 47) { + effects.consume(code) + return end + } + + // ASCII alphabetical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return tagOpenAttributeName + } + if (markdownLineEnding(code)) { + returnState = tagOpenBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenBetween + } + return end(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | a <b c> d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeName(code) { + // ASCII alphabetical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return tagOpenAttributeName + } + return tagOpenAttributeNameAfter(code) + } + + /** + * After attribute name, before initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | a <b c> d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeNameAfter + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeNameAfter + } + return tagOpenBetween(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | a <b c=d> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + marker = code + return tagOpenAttributeValueQuoted + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueBefore + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code) + marker = undefined + return tagOpenAttributeValueQuotedAfter + } + if (code === null) { + return nok(code) + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueQuoted + return lineEndingBefore(code) + } + effects.consume(code) + return tagOpenAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | a <b c=d> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 60 || + code === 61 || + code === 96 + ) { + return nok(code) + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the end + * of the tag. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In certain circumstances of a tag where only an `>` is allowed. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function end(code) { + if (code === 62) { + effects.consume(code) + effects.exit('htmlTextData') + effects.exit('htmlText') + return ok + } + return nok(code) + } + + /** + * At eol. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * > | a <!--a + * ^ + * | b--> + * ``` + * + * @type {State} + */ + function lineEndingBefore(code) { + effects.exit('htmlTextData') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineEndingAfter + } + + /** + * After eol, at optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a <!--a + * > | b--> + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfter(code) { + // Always populated by defaults. + + return markdownSpace(code) + ? factorySpace( + effects, + lineEndingAfterPrefix, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : lineEndingAfterPrefix(code) + } + + /** + * After eol, after optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a <!--a + * > | b--> + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfterPrefix(code) { + effects.enter('htmlTextData') + return returnState(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartLink = { + name: 'labelStartLink', + tokenize: tokenizeLabelStartLink, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartLink(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (link) start. + * + * ```markdown + * > | a [b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelLink') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelLink') + return after + } + + /** @type {State} */ + function after(code) { + // To do: this isn’t needed in `micromark-extension-gfm-footnote`, + // remove. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const hardBreakEscape = { + name: 'hardBreakEscape', + tokenize: tokenizeHardBreakEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHardBreakEscape(effects, ok, nok) { + return start + + /** + * Start of a hard break (escape). + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('hardBreakEscape') + effects.consume(code) + return after + } + + /** + * After `\`, at eol. + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownLineEnding(code)) { + effects.exit('hardBreakEscape') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Previous} Previous + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const codeText = { + name: 'codeText', + tokenize: tokenizeCodeText, + resolve: resolveCodeText, + previous +} + +// To do: next major: don’t resolve, like `markdown-rs`. +/** @type {Resolver} */ +function resolveCodeText(events) { + let tailExitIndex = events.length - 4 + let headEnterIndex = 3 + /** @type {number} */ + let index + /** @type {number | undefined} */ + let enter + + // If we start and end with an EOL or a space. + if ( + (events[headEnterIndex][1].type === 'lineEnding' || + events[headEnterIndex][1].type === 'space') && + (events[tailExitIndex][1].type === 'lineEnding' || + events[tailExitIndex][1].type === 'space') + ) { + index = headEnterIndex + + // And we have data. + while (++index < tailExitIndex) { + if (events[index][1].type === 'codeTextData') { + // Then we have padding. + events[headEnterIndex][1].type = 'codeTextPadding' + events[tailExitIndex][1].type = 'codeTextPadding' + headEnterIndex += 2 + tailExitIndex -= 2 + break + } + } + } + + // Merge adjacent spaces and data. + index = headEnterIndex - 1 + tailExitIndex++ + while (++index <= tailExitIndex) { + if (enter === undefined) { + if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { + enter = index + } + } else if ( + index === tailExitIndex || + events[index][1].type === 'lineEnding' + ) { + events[enter][1].type = 'codeTextData' + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + tailExitIndex -= index - enter - 2 + index = enter + 2 + } + enter = undefined + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Previous} + */ +function previous(code) { + // If there is a previous code, there will always be a tail. + return ( + code !== 96 || + this.events[this.events.length - 1][1].type === 'characterEscape' + ) +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeText(effects, ok, nok) { + const self = this + let sizeOpen = 0 + /** @type {number} */ + let size + /** @type {Token} */ + let token + return start + + /** + * Start of code (text). + * + * ```markdown + * > | `a` + * ^ + * > | \`a` + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('codeText') + effects.enter('codeTextSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 96) { + effects.consume(code) + sizeOpen++ + return sequenceOpen + } + effects.exit('codeTextSequence') + return between(code) + } + + /** + * Between something and something else. + * + * ```markdown + * > | `a` + * ^^ + * ``` + * + * @type {State} + */ + function between(code) { + // EOF. + if (code === null) { + return nok(code) + } + + // To do: next major: don’t do spaces in resolve, but when compiling, + // like `markdown-rs`. + // Tabs don’t work, and virtual spaces don’t make sense. + if (code === 32) { + effects.enter('space') + effects.consume(code) + effects.exit('space') + return between + } + + // Closing fence? Could also be data. + if (code === 96) { + token = effects.enter('codeTextSequence') + size = 0 + return sequenceClose(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return between + } + + // Data. + effects.enter('codeTextData') + return data(code) + } + + /** + * In data. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if ( + code === null || + code === 32 || + code === 96 || + markdownLineEnding(code) + ) { + effects.exit('codeTextData') + return between(code) + } + effects.consume(code) + return data + } + + /** + * In closing sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + // More. + if (code === 96) { + effects.consume(code) + size++ + return sequenceClose + } + + // Done! + if (size === sizeOpen) { + effects.exit('codeTextSequence') + effects.exit('codeText') + return ok(code) + } + + // More or less accents: mark as data. + token.type = 'codeTextData' + return data(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + */ + + + + +/** @satisfies {Extension['document']} */ +const constructs_document = { + [42]: list, + [43]: list, + [45]: list, + [48]: list, + [49]: list, + [50]: list, + [51]: list, + [52]: list, + [53]: list, + [54]: list, + [55]: list, + [56]: list, + [57]: list, + [62]: blockQuote +} + +/** @satisfies {Extension['contentInitial']} */ +const contentInitial = { + [91]: definition +} + +/** @satisfies {Extension['flowInitial']} */ +const flowInitial = { + [-2]: codeIndented, + [-1]: codeIndented, + [32]: codeIndented +} + +/** @satisfies {Extension['flow']} */ +const constructs_flow = { + [35]: headingAtx, + [42]: thematicBreak, + [45]: [setextUnderline, thematicBreak], + [60]: htmlFlow, + [61]: setextUnderline, + [95]: thematicBreak, + [96]: codeFenced, + [126]: codeFenced +} + +/** @satisfies {Extension['string']} */ +const constructs_string = { + [38]: characterReference, + [92]: characterEscape +} + +/** @satisfies {Extension['text']} */ +const constructs_text = { + [-5]: lineEnding, + [-4]: lineEnding, + [-3]: lineEnding, + [33]: labelStartImage, + [38]: characterReference, + [42]: attention, + [60]: [autolink, htmlText], + [91]: labelStartLink, + [92]: [hardBreakEscape, characterEscape], + [93]: labelEnd, + [95]: attention, + [96]: codeText +} + +/** @satisfies {Extension['insideSpan']} */ +const insideSpan = { + null: [attention, resolver] +} + +/** @satisfies {Extension['attentionMarkers']} */ +const attentionMarkers = { + null: [42, 95] +} + +/** @satisfies {Extension['disable']} */ +const disable = { + null: [] +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js +/** + * @typedef {import('micromark-util-types').Create} Create + * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + */ + + + + + + + + + +/** + * @param {ParseOptions | null | undefined} [options] + * @returns {ParseContext} + */ +function parse(options) { + const settings = options || {} + const constructs = + /** @type {FullNormalizedExtension} */ + combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) + + /** @type {ParseContext} */ + const parser = { + defined: [], + lazy: {}, + constructs, + content: create(content), + document: create(document_document), + flow: create(flow), + string: create(string), + text: create(text_text) + } + return parser + + /** + * @param {InitialConstruct} initial + */ + function create(initial) { + return creator + /** @type {Create} */ + function creator(from) { + return createTokenizer(parser, initial, from) + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Value} Value + */ + +/** + * @callback Preprocessor + * @param {Value} value + * @param {Encoding | null | undefined} [encoding] + * @param {boolean | null | undefined} [end=false] + * @returns {Array<Chunk>} + */ + +const search = /[\0\t\n\r]/g + +/** + * @returns {Preprocessor} + */ +function preprocess() { + let column = 1 + let buffer = '' + /** @type {boolean | undefined} */ + let start = true + /** @type {boolean | undefined} */ + let atCarriageReturn + return preprocessor + + /** @type {Preprocessor} */ + function preprocessor(value, encoding, end) { + /** @type {Array<Chunk>} */ + const chunks = [] + /** @type {RegExpMatchArray | null} */ + let match + /** @type {number} */ + let next + /** @type {number} */ + let startPosition + /** @type {number} */ + let endPosition + /** @type {Code} */ + let code + + // @ts-expect-error `Buffer` does allow an encoding. + value = buffer + value.toString(encoding) + startPosition = 0 + buffer = '' + if (start) { + // To do: `markdown-rs` actually parses BOMs (byte order mark). + if (value.charCodeAt(0) === 65279) { + startPosition++ + } + start = undefined + } + while (startPosition < value.length) { + search.lastIndex = startPosition + match = search.exec(value) + endPosition = + match && match.index !== undefined ? match.index : value.length + code = value.charCodeAt(endPosition) + if (!match) { + buffer = value.slice(startPosition) + break + } + if (code === 10 && startPosition === endPosition && atCarriageReturn) { + chunks.push(-3) + atCarriageReturn = undefined + } else { + if (atCarriageReturn) { + chunks.push(-5) + atCarriageReturn = undefined + } + if (startPosition < endPosition) { + chunks.push(value.slice(startPosition, endPosition)) + column += endPosition - startPosition + } + switch (code) { + case 0: { + chunks.push(65533) + column++ + break + } + case 9: { + next = Math.ceil(column / 4) * 4 + chunks.push(-2) + while (column++ < next) chunks.push(-1) + break + } + case 10: { + chunks.push(-4) + column = 1 + break + } + default: { + atCarriageReturn = true + column = 1 + } + } + } + startPosition = endPosition + 1 + } + if (end) { + if (atCarriageReturn) chunks.push(-5) + if (buffer) chunks.push(buffer) + chunks.push(null) + } + return chunks + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js +/** + * @typedef {import('micromark-util-types').Event} Event + */ + + + +/** + * @param {Array<Event>} events + * @returns {Array<Event>} + */ +function postprocess(events) { + while (!subtokenize(events)) { + // Empty + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js +/** + * Turn the number (in string form as either hexa- or plain decimal) coming from + * a numeric character reference into a character. + * + * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes + * non-characters and control characters safe. + * + * @param {string} value + * Value to decode. + * @param {number} base + * Numeric base. + * @returns {string} + * Character. + */ +function decodeNumericCharacterReference(value, base) { + const code = Number.parseInt(value, base) + if ( + // C0 except for HT, LF, FF, CR, space. + code < 9 || + code === 11 || + (code > 13 && code < 32) || + // Control character (DEL) of C0, and C1 controls. + (code > 126 && code < 160) || + // Lone high surrogates and low surrogates. + (code > 55295 && code < 57344) || + // Noncharacters. + (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || + (code & 65535) === 65535 || + (code & 65535) === 65534 /* eslint-enable no-bitwise */ || + // Out of range + code > 1114111 + ) { + return '\uFFFD' + } + return String.fromCharCode(code) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js + + +const characterEscapeOrReference = + /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi + +/** + * Decode markdown strings (which occur in places such as fenced code info + * strings, destinations, labels, and titles). + * + * The “string” content type allows character escapes and -references. + * This decodes those. + * + * @param {string} value + * Value to decode. + * @returns {string} + * Decoded value. + */ +function decodeString(value) { + return value.replace(characterEscapeOrReference, decode) +} + +/** + * @param {string} $0 + * @param {string} $1 + * @param {string} $2 + * @returns {string} + */ +function decode($0, $1, $2) { + if ($1) { + // Escape. + return $1 + } + + // Reference. + const head = $2.charCodeAt(0) + if (head === 35) { + const head = $2.charCodeAt(1) + const hex = head === 120 || head === 88 + return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) + } + return decodeNamedCharacterReference($2) || $0 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js +/** + * @typedef {import('unist').Node} Node + * @typedef {import('unist').Point} Point + * @typedef {import('unist').Position} Position + */ + +/** + * @typedef NodeLike + * @property {string} type + * @property {PositionLike | null | undefined} [position] + * + * @typedef PositionLike + * @property {PointLike | null | undefined} [start] + * @property {PointLike | null | undefined} [end] + * + * @typedef PointLike + * @property {number | null | undefined} [line] + * @property {number | null | undefined} [column] + * @property {number | null | undefined} [offset] + */ + +/** + * Serialize the positional info of a point, position (start and end points), + * or node. + * + * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] + * Node, position, or point. + * @returns {string} + * Pretty printed positional info of a node (`string`). + * + * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) + * or a point `l:c` (when given `point`), where `l` stands for line, `c` for + * column, `s` for `start`, and `e` for end. + * An empty string (`''`) is returned if the given value is neither `node`, + * `position`, nor `point`. + */ +function stringifyPosition(value) { + // Nothing. + if (!value || typeof value !== 'object') { + return '' + } + + // Node. + if ('position' in value || 'type' in value) { + return position(value.position) + } + + // Position. + if ('start' in value || 'end' in value) { + return position(value) + } + + // Point. + if ('line' in value || 'column' in value) { + return point(value) + } + + // ? + return '' +} + +/** + * @param {Point | PointLike | null | undefined} point + * @returns {string} + */ +function point(point) { + return index(point && point.line) + ':' + index(point && point.column) +} + +/** + * @param {Position | PositionLike | null | undefined} pos + * @returns {string} + */ +function position(pos) { + return point(pos && pos.start) + '-' + point(pos && pos.end) +} + +/** + * @param {number | null | undefined} value + * @returns {number} + */ +function index(value) { + return value && typeof value === 'number' ? value : 1 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js +/** + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Value} Value + * + * @typedef {import('unist').Parent} UnistParent + * @typedef {import('unist').Point} Point + * + * @typedef {import('mdast').PhrasingContent} PhrasingContent + * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent + * @typedef {import('mdast').Content} Content + * @typedef {import('mdast').Break} Break + * @typedef {import('mdast').Blockquote} Blockquote + * @typedef {import('mdast').Code} Code + * @typedef {import('mdast').Definition} Definition + * @typedef {import('mdast').Emphasis} Emphasis + * @typedef {import('mdast').Heading} Heading + * @typedef {import('mdast').HTML} HTML + * @typedef {import('mdast').Image} Image + * @typedef {import('mdast').ImageReference} ImageReference + * @typedef {import('mdast').InlineCode} InlineCode + * @typedef {import('mdast').Link} Link + * @typedef {import('mdast').LinkReference} LinkReference + * @typedef {import('mdast').List} List + * @typedef {import('mdast').ListItem} ListItem + * @typedef {import('mdast').Paragraph} Paragraph + * @typedef {import('mdast').Root} Root + * @typedef {import('mdast').Strong} Strong + * @typedef {import('mdast').Text} Text + * @typedef {import('mdast').ThematicBreak} ThematicBreak + * @typedef {import('mdast').ReferenceType} ReferenceType + * @typedef {import('../index.js').CompileData} CompileData + */ + +/** + * @typedef {Root | Content} Node + * @typedef {Extract<Node, UnistParent>} Parent + * + * @typedef {Omit<UnistParent, 'type' | 'children'> & {type: 'fragment', children: Array<PhrasingContent>}} Fragment + */ + +/** + * @callback Transform + * Extra transform, to change the AST afterwards. + * @param {Root} tree + * Tree to transform. + * @returns {Root | undefined | null | void} + * New tree or nothing (in which case the current tree is used). + * + * @callback Handle + * Handle a token. + * @param {CompileContext} this + * Context. + * @param {Token} token + * Current token. + * @returns {void} + * Nothing. + * + * @typedef {Record<string, Handle>} Handles + * Token types mapping to handles + * + * @callback OnEnterError + * Handle the case where the `right` token is open, but it is closed (by the + * `left` token) or because we reached the end of the document. + * @param {Omit<CompileContext, 'sliceSerialize'>} this + * Context. + * @param {Token | undefined} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @callback OnExitError + * Handle the case where the `right` token is open but it is closed by + * exiting the `left` token. + * @param {Omit<CompileContext, 'sliceSerialize'>} this + * Context. + * @param {Token} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @typedef {[Token, OnEnterError | undefined]} TokenTuple + * Open token on the stack, with an optional error handler for when + * that token isn’t closed properly. + */ + +/** + * @typedef Config + * Configuration. + * + * We have our defaults, but extensions will add more. + * @property {Array<string>} canContainEols + * Token types where line endings are used. + * @property {Handles} enter + * Opening handles. + * @property {Handles} exit + * Closing handles. + * @property {Array<Transform>} transforms + * Tree transforms. + * + * @typedef {Partial<Config>} Extension + * Change how markdown tokens from micromark are turned into mdast. + * + * @typedef CompileContext + * mdast compiler context. + * @property {Array<Node | Fragment>} stack + * Stack of nodes. + * @property {Array<TokenTuple>} tokenStack + * Stack of tokens. + * @property {<Key extends keyof CompileData>(key: Key) => CompileData[Key]} getData + * Get data from the key/value store. + * @property {<Key extends keyof CompileData>(key: Key, value?: CompileData[Key]) => void} setData + * Set data into the key/value store. + * @property {(this: CompileContext) => void} buffer + * Capture some of the output data. + * @property {(this: CompileContext) => string} resume + * Stop capturing and access the output data. + * @property {<Kind extends Node>(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter + * Enter a token. + * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit + * Exit a token. + * @property {TokenizeContext['sliceSerialize']} sliceSerialize + * Get the string value of a token. + * @property {Config} config + * Configuration. + * + * @typedef FromMarkdownOptions + * Configuration for how to build mdast. + * @property {Array<Extension | Array<Extension>> | null | undefined} [mdastExtensions] + * Extensions for this utility to change how tokens are turned into a tree. + * + * @typedef {ParseOptions & FromMarkdownOptions} Options + * Configuration. + */ + +// To do: micromark: create a registry of tokens? +// To do: next major: don’t return given `Node` from `enter`. +// To do: next major: remove setter/getter. + + + + + + + + + + +const lib_own = {}.hasOwnProperty + +/** + * @param value + * Markdown to parse. + * @param encoding + * Character encoding for when `value` is `Buffer`. + * @param options + * Configuration. + * @returns + * mdast tree. + */ +const fromMarkdown = + /** + * @type {( + * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & + * ((value: Value, options?: Options | null | undefined) => Root) + * )} + */ + + /** + * @param {Value} value + * @param {Encoding | Options | null | undefined} [encoding] + * @param {Options | null | undefined} [options] + * @returns {Root} + */ + function (value, encoding, options) { + if (typeof encoding !== 'string') { + options = encoding + encoding = undefined + } + return compiler(options)( + postprocess( + parse(options).document().write(preprocess()(value, encoding, true)) + ) + ) + } + +/** + * Note this compiler only understand complete buffering, not streaming. + * + * @param {Options | null | undefined} [options] + */ +function compiler(options) { + /** @type {Config} */ + const config = { + transforms: [], + canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], + enter: { + autolink: opener(link), + autolinkProtocol: onenterdata, + autolinkEmail: onenterdata, + atxHeading: opener(heading), + blockQuote: opener(blockQuote), + characterEscape: onenterdata, + characterReference: onenterdata, + codeFenced: opener(codeFlow), + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: opener(codeFlow, buffer), + codeText: opener(codeText, buffer), + codeTextData: onenterdata, + data: onenterdata, + codeFlowValue: onenterdata, + definition: opener(definition), + definitionDestinationString: buffer, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: opener(emphasis), + hardBreakEscape: opener(hardBreak), + hardBreakTrailing: opener(hardBreak), + htmlFlow: opener(html, buffer), + htmlFlowData: onenterdata, + htmlText: opener(html, buffer), + htmlTextData: onenterdata, + image: opener(image), + label: buffer, + link: opener(link), + listItem: opener(listItem), + listItemValue: onenterlistitemvalue, + listOrdered: opener(list, onenterlistordered), + listUnordered: opener(list), + paragraph: opener(paragraph), + reference: onenterreference, + referenceString: buffer, + resourceDestinationString: buffer, + resourceTitleString: buffer, + setextHeading: opener(heading), + strong: opener(strong), + thematicBreak: opener(thematicBreak) + }, + exit: { + atxHeading: closer(), + atxHeadingSequence: onexitatxheadingsequence, + autolink: closer(), + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: closer(), + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: closer(onexitcodefenced), + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: onexitcodefencedfencemeta, + codeFlowValue: onexitdata, + codeIndented: closer(onexitcodeindented), + codeText: closer(onexitcodetext), + codeTextData: onexitdata, + data: onexitdata, + definition: closer(), + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: closer(), + hardBreakEscape: closer(onexithardbreak), + hardBreakTrailing: closer(onexithardbreak), + htmlFlow: closer(onexithtmlflow), + htmlFlowData: onexitdata, + htmlText: closer(onexithtmltext), + htmlTextData: onexitdata, + image: closer(onexitimage), + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: closer(onexitlink), + listItem: closer(), + listOrdered: closer(), + listUnordered: closer(), + paragraph: closer(), + referenceString: onexitreferencestring, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + resource: onexitresource, + setextHeading: closer(onexitsetextheading), + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: closer(), + thematicBreak: closer() + } + } + configure(config, (options || {}).mdastExtensions || []) + + /** @type {CompileData} */ + const data = {} + return compile + + /** + * Turn micromark events into an mdast tree. + * + * @param {Array<Event>} events + * Events. + * @returns {Root} + * mdast tree. + */ + function compile(events) { + /** @type {Root} */ + let tree = { + type: 'root', + children: [] + } + /** @type {Omit<CompileContext, 'sliceSerialize'>} */ + const context = { + stack: [tree], + tokenStack: [], + config, + enter, + exit, + buffer, + resume, + setData, + getData + } + /** @type {Array<number>} */ + const listStack = [] + let index = -1 + while (++index < events.length) { + // We preprocess lists to add `listItem` tokens, and to infer whether + // items the list itself are spread out. + if ( + events[index][1].type === 'listOrdered' || + events[index][1].type === 'listUnordered' + ) { + if (events[index][0] === 'enter') { + listStack.push(index) + } else { + const tail = listStack.pop() + index = prepareList(events, tail, index) + } + } + } + index = -1 + while (++index < events.length) { + const handler = config[events[index][0]] + if (lib_own.call(handler, events[index][1].type)) { + handler[events[index][1].type].call( + Object.assign( + { + sliceSerialize: events[index][2].sliceSerialize + }, + context + ), + events[index][1] + ) + } + } + + // Handle tokens still being open. + if (context.tokenStack.length > 0) { + const tail = context.tokenStack[context.tokenStack.length - 1] + const handler = tail[1] || defaultOnError + handler.call(context, undefined, tail[0]) + } + + // Figure out `root` position. + tree.position = { + start: lib_point( + events.length > 0 + ? events[0][1].start + : { + line: 1, + column: 1, + offset: 0 + } + ), + end: lib_point( + events.length > 0 + ? events[events.length - 2][1].end + : { + line: 1, + column: 1, + offset: 0 + } + ) + } + + // Call transforms. + index = -1 + while (++index < config.transforms.length) { + tree = config.transforms[index](tree) || tree + } + return tree + } + + /** + * @param {Array<Event>} events + * @param {number} start + * @param {number} length + * @returns {number} + */ + function prepareList(events, start, length) { + let index = start - 1 + let containerBalance = -1 + let listSpread = false + /** @type {Token | undefined} */ + let listItem + /** @type {number | undefined} */ + let lineIndex + /** @type {number | undefined} */ + let firstBlankLineIndex + /** @type {boolean | undefined} */ + let atMarker + while (++index <= length) { + const event = events[index] + if ( + event[1].type === 'listUnordered' || + event[1].type === 'listOrdered' || + event[1].type === 'blockQuote' + ) { + if (event[0] === 'enter') { + containerBalance++ + } else { + containerBalance-- + } + atMarker = undefined + } else if (event[1].type === 'lineEndingBlank') { + if (event[0] === 'enter') { + if ( + listItem && + !atMarker && + !containerBalance && + !firstBlankLineIndex + ) { + firstBlankLineIndex = index + } + atMarker = undefined + } + } else if ( + event[1].type === 'linePrefix' || + event[1].type === 'listItemValue' || + event[1].type === 'listItemMarker' || + event[1].type === 'listItemPrefix' || + event[1].type === 'listItemPrefixWhitespace' + ) { + // Empty. + } else { + atMarker = undefined + } + if ( + (!containerBalance && + event[0] === 'enter' && + event[1].type === 'listItemPrefix') || + (containerBalance === -1 && + event[0] === 'exit' && + (event[1].type === 'listUnordered' || + event[1].type === 'listOrdered')) + ) { + if (listItem) { + let tailIndex = index + lineIndex = undefined + while (tailIndex--) { + const tailEvent = events[tailIndex] + if ( + tailEvent[1].type === 'lineEnding' || + tailEvent[1].type === 'lineEndingBlank' + ) { + if (tailEvent[0] === 'exit') continue + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + listSpread = true + } + tailEvent[1].type = 'lineEnding' + lineIndex = tailIndex + } else if ( + tailEvent[1].type === 'linePrefix' || + tailEvent[1].type === 'blockQuotePrefix' || + tailEvent[1].type === 'blockQuotePrefixWhitespace' || + tailEvent[1].type === 'blockQuoteMarker' || + tailEvent[1].type === 'listItemIndent' + ) { + // Empty + } else { + break + } + } + if ( + firstBlankLineIndex && + (!lineIndex || firstBlankLineIndex < lineIndex) + ) { + listItem._spread = true + } + + // Fix position. + listItem.end = Object.assign( + {}, + lineIndex ? events[lineIndex][1].start : event[1].end + ) + events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) + index++ + length++ + } + + // Create a new list item. + if (event[1].type === 'listItemPrefix') { + listItem = { + type: 'listItem', + _spread: false, + start: Object.assign({}, event[1].start), + // @ts-expect-error: we’ll add `end` in a second. + end: undefined + } + // @ts-expect-error: `listItem` is most definitely defined, TS... + events.splice(index, 0, ['enter', listItem, event[2]]) + index++ + length++ + firstBlankLineIndex = undefined + atMarker = true + } + } + } + events[start][1]._spread = listSpread + return length + } + + /** + * Set data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @param {CompileData[Key]} [value] + * New value. + * @returns {void} + * Nothing. + */ + function setData(key, value) { + data[key] = value + } + + /** + * Get data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @returns {CompileData[Key]} + * Value. + */ + function getData(key) { + return data[key] + } + + /** + * Create an opener handle. + * + * @param {(token: Token) => Node} create + * Create a node. + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function opener(create, and) { + return open + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function open(token) { + enter.call(this, create(token), token) + if (and) and.call(this, token) + } + } + + /** + * @this {CompileContext} + * @returns {void} + */ + function buffer() { + this.stack.push({ + type: 'fragment', + children: [] + }) + } + + /** + * @template {Node} Kind + * Node type. + * @this {CompileContext} + * Context. + * @param {Kind} node + * Node to enter. + * @param {Token} token + * Corresponding token. + * @param {OnEnterError | undefined} [errorHandler] + * Handle the case where this token is open, but it is closed by something else. + * @returns {Kind} + * The given node. + */ + function enter(node, token, errorHandler) { + const parent = this.stack[this.stack.length - 1] + // @ts-expect-error: Assume `Node` can exist as a child of `parent`. + parent.children.push(node) + this.stack.push(node) + this.tokenStack.push([token, errorHandler]) + // @ts-expect-error: `end` will be patched later. + node.position = { + start: lib_point(token.start) + } + return node + } + + /** + * Create a closer handle. + * + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function closer(and) { + return close + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function close(token) { + if (and) and.call(this, token) + exit.call(this, token) + } + } + + /** + * @this {CompileContext} + * Context. + * @param {Token} token + * Corresponding token. + * @param {OnExitError | undefined} [onExitError] + * Handle the case where another token is open. + * @returns {Node} + * The closed node. + */ + function exit(token, onExitError) { + const node = this.stack.pop() + const open = this.tokenStack.pop() + if (!open) { + throw new Error( + 'Cannot close `' + + token.type + + '` (' + + stringifyPosition({ + start: token.start, + end: token.end + }) + + '): it’s not open' + ) + } else if (open[0].type !== token.type) { + if (onExitError) { + onExitError.call(this, token, open[0]) + } else { + const handler = open[1] || defaultOnError + handler.call(this, token, open[0]) + } + } + node.position.end = lib_point(token.end) + return node + } + + /** + * @this {CompileContext} + * @returns {string} + */ + function resume() { + return lib_toString(this.stack.pop()) + } + + // + // Handlers. + // + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistordered() { + setData('expectingFirstListItemValue', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistitemvalue(token) { + if (getData('expectingFirstListItemValue')) { + const ancestor = this.stack[this.stack.length - 2] + ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) + setData('expectingFirstListItemValue') + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfenceinfo() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.lang = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfencemeta() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.meta = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfence() { + // Exit if this is the closing fence. + if (getData('flowCodeInside')) return + this.buffer() + setData('flowCodeInside', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefenced() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') + setData('flowCodeInside') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodeindented() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/(\r?\n|\r)$/g, '') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitionlabelstring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + node.label = label + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiontitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiondestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitatxheadingsequence(token) { + const node = this.stack[this.stack.length - 1] + if (!node.depth) { + const depth = this.sliceSerialize(token).length + node.depth = depth + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadingtext() { + setData('setextHeadingSlurpLineEnding', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadinglinesequence(token) { + const node = this.stack[this.stack.length - 1] + node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheading() { + setData('setextHeadingSlurpLineEnding') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterdata(token) { + const node = this.stack[this.stack.length - 1] + let tail = node.children[node.children.length - 1] + if (!tail || tail.type !== 'text') { + // Add a new text node. + tail = text() + // @ts-expect-error: we’ll add `end` later. + tail.position = { + start: lib_point(token.start) + } + // @ts-expect-error: Assume `parent` accepts `text`. + node.children.push(tail) + } + this.stack.push(tail) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitdata(token) { + const tail = this.stack.pop() + tail.value += this.sliceSerialize(token) + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlineending(token) { + const context = this.stack[this.stack.length - 1] + // If we’re at a hard break, include the line ending in there. + if (getData('atHardBreak')) { + const tail = context.children[context.children.length - 1] + tail.position.end = lib_point(token.end) + setData('atHardBreak') + return + } + if ( + !getData('setextHeadingSlurpLineEnding') && + config.canContainEols.includes(context.type) + ) { + onenterdata.call(this, token) + onexitdata.call(this, token) + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithardbreak() { + setData('atHardBreak', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmlflow() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmltext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcodetext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlink() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitimage() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabeltext(token) { + const string = this.sliceSerialize(token) + const ancestor = this.stack[this.stack.length - 2] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + ancestor.label = decodeString(string) + // @ts-expect-error: same as above. + ancestor.identifier = normalizeIdentifier(string).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabel() { + const fragment = this.stack[this.stack.length - 1] + const value = this.resume() + const node = this.stack[this.stack.length - 1] + // Assume a reference. + setData('inReference', true) + if (node.type === 'link') { + /** @type {Array<StaticPhrasingContent>} */ + // @ts-expect-error: Assume static phrasing content. + const children = fragment.children + node.children = children + } else { + node.alt = value + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcedestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcetitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresource() { + setData('inReference') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterreference() { + setData('referenceType', 'collapsed') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitreferencestring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + node.label = label + // @ts-expect-error: same as above. + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + setData('referenceType', 'full') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcharacterreferencemarker(token) { + setData('characterReferenceType', token.type) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcharacterreferencevalue(token) { + const data = this.sliceSerialize(token) + const type = getData('characterReferenceType') + /** @type {string} */ + let value + if (type) { + value = decodeNumericCharacterReference( + data, + type === 'characterReferenceMarkerNumeric' ? 10 : 16 + ) + setData('characterReferenceType') + } else { + const result = decodeNamedCharacterReference(data) + value = result + } + const tail = this.stack.pop() + tail.value += value + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkprotocol(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = this.sliceSerialize(token) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkemail(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = 'mailto:' + this.sliceSerialize(token) + } + + // + // Creaters. + // + + /** @returns {Blockquote} */ + function blockQuote() { + return { + type: 'blockquote', + children: [] + } + } + + /** @returns {Code} */ + function codeFlow() { + return { + type: 'code', + lang: null, + meta: null, + value: '' + } + } + + /** @returns {InlineCode} */ + function codeText() { + return { + type: 'inlineCode', + value: '' + } + } + + /** @returns {Definition} */ + function definition() { + return { + type: 'definition', + identifier: '', + label: null, + title: null, + url: '' + } + } + + /** @returns {Emphasis} */ + function emphasis() { + return { + type: 'emphasis', + children: [] + } + } + + /** @returns {Heading} */ + function heading() { + // @ts-expect-error `depth` will be set later. + return { + type: 'heading', + depth: undefined, + children: [] + } + } + + /** @returns {Break} */ + function hardBreak() { + return { + type: 'break' + } + } + + /** @returns {HTML} */ + function html() { + return { + type: 'html', + value: '' + } + } + + /** @returns {Image} */ + function image() { + return { + type: 'image', + title: null, + url: '', + alt: null + } + } + + /** @returns {Link} */ + function link() { + return { + type: 'link', + title: null, + url: '', + children: [] + } + } + + /** + * @param {Token} token + * @returns {List} + */ + function list(token) { + return { + type: 'list', + ordered: token.type === 'listOrdered', + start: null, + spread: token._spread, + children: [] + } + } + + /** + * @param {Token} token + * @returns {ListItem} + */ + function listItem(token) { + return { + type: 'listItem', + spread: token._spread, + checked: null, + children: [] + } + } + + /** @returns {Paragraph} */ + function paragraph() { + return { + type: 'paragraph', + children: [] + } + } + + /** @returns {Strong} */ + function strong() { + return { + type: 'strong', + children: [] + } + } + + /** @returns {Text} */ + function text() { + return { + type: 'text', + value: '' + } + } + + /** @returns {ThematicBreak} */ + function thematicBreak() { + return { + type: 'thematicBreak' + } + } +} + +/** + * Copy a point-like value. + * + * @param {Point} d + * Point-like value. + * @returns {Point} + * unist point. + */ +function lib_point(d) { + return { + line: d.line, + column: d.column, + offset: d.offset + } +} + +/** + * @param {Config} combined + * @param {Array<Extension | Array<Extension>>} extensions + * @returns {void} + */ +function configure(combined, extensions) { + let index = -1 + while (++index < extensions.length) { + const value = extensions[index] + if (Array.isArray(value)) { + configure(combined, value) + } else { + extension(combined, value) + } + } +} + +/** + * @param {Config} combined + * @param {Extension} extension + * @returns {void} + */ +function extension(combined, extension) { + /** @type {keyof Extension} */ + let key + for (key in extension) { + if (lib_own.call(extension, key)) { + if (key === 'canContainEols') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'transforms') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'enter' || key === 'exit') { + const right = extension[key] + if (right) { + Object.assign(combined[key], right) + } + } + } + } +} + +/** @type {OnEnterError} */ +function defaultOnError(left, right) { + if (left) { + throw new Error( + 'Cannot close `' + + left.type + + '` (' + + stringifyPosition({ + start: left.start, + end: left.end + }) + + '): a different token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is open' + ) + } else { + throw new Error( + 'Cannot close document, a token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is still open' + ) + } +} + +// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js +var esm = __webpack_require__(513); +;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-6b48ae7d.js + + + +function preprocessMarkdown(markdown) { + const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); + const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); + return withoutExtraSpaces; +} +function markdownToLines(markdown) { + const preprocessedMarkdown = preprocessMarkdown(markdown); + const { children } = fromMarkdown(preprocessedMarkdown); + const lines = [[]]; + let currentLine = 0; + function processNode(node, parentType = "normal") { + if (node.type === "text") { + const textLines = node.value.split("\n"); + textLines.forEach((textLine, index) => { + if (index !== 0) { + currentLine++; + lines.push([]); + } + textLine.split(" ").forEach((word) => { + if (word) { + lines[currentLine].push({ content: word, type: parentType }); + } + }); + }); + } else if (node.type === "strong" || node.type === "emphasis") { + node.children.forEach((contentNode) => { + processNode(contentNode, node.type); + }); + } + } + children.forEach((treeNode) => { + if (treeNode.type === "paragraph") { + treeNode.children.forEach((contentNode) => { + processNode(contentNode); + }); + } + }); + return lines; +} +function markdownToHTML(markdown) { + const { children } = fromMarkdown(markdown); + function output(node) { + if (node.type === "text") { + return node.value.replace(/\n/g, "<br/>"); + } else if (node.type === "strong") { + return `<strong>${node.children.map(output).join("")}</strong>`; + } else if (node.type === "emphasis") { + return `<em>${node.children.map(output).join("")}</em>`; + } else if (node.type === "paragraph") { + return `<p>${node.children.map(output).join("")}</p>`; + } + return `Unsupported markdown: ${node.type}`; + } + return children.map(output).join(""); +} +function splitTextToChars(text) { + if (Intl.Segmenter) { + return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); + } + return [...text]; +} +function splitWordToFitWidth(checkFit, word) { + const characters = splitTextToChars(word.content); + return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); +} +function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { + if (remainingChars.length === 0) { + return [ + { content: usedChars.join(""), type }, + { content: "", type } + ]; + } + const [nextChar, ...rest] = remainingChars; + const newWord = [...usedChars, nextChar]; + if (checkFit([{ content: newWord.join(""), type }])) { + return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); + } + if (usedChars.length === 0 && nextChar) { + usedChars.push(nextChar); + remainingChars.shift(); + } + return [ + { content: usedChars.join(""), type }, + { content: remainingChars.join(""), type } + ]; +} +function splitLineToFitWidth(line, checkFit) { + if (line.some(({ content }) => content.includes("\n"))) { + throw new Error("splitLineToFitWidth does not support newlines in the line"); + } + return splitLineToFitWidthRecursion(line, checkFit); +} +function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { + if (words.length === 0) { + if (newLine.length > 0) { + lines.push(newLine); + } + return lines.length > 0 ? lines : []; + } + let joiner = ""; + if (words[0].content === " ") { + joiner = " "; + words.shift(); + } + const nextWord = words.shift() ?? { content: " ", type: "normal" }; + const lineWithNextWord = [...newLine]; + if (joiner !== "") { + lineWithNextWord.push({ content: joiner, type: "normal" }); + } + lineWithNextWord.push(nextWord); + if (checkFit(lineWithNextWord)) { + return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); + } + if (newLine.length > 0) { + lines.push(newLine); + words.unshift(nextWord); + } else if (nextWord.content) { + const [line, rest] = splitWordToFitWidth(checkFit, nextWord); + lines.push([line]); + if (rest.content) { + words.unshift(rest); + } + } + return splitLineToFitWidthRecursion(words, checkFit, lines); +} +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlSpan(element, node, width, classes, addBackground = false) { + const fo = element.append("foreignObject"); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + ` + <span class="${labelClass} ${classes}" ` + (node.labelStyle ? 'style="' + node.labelStyle + '"' : "") + ">" + label + "</span>" + ); + applyStyle(div, node.labelStyle); + div.style("display", "table-cell"); + div.style("white-space", "nowrap"); + div.style("max-width", width + "px"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + if (addBackground) { + div.attr("class", "labelBkg"); + } + let bbox = div.node().getBoundingClientRect(); + if (bbox.width === width) { + div.style("display", "table"); + div.style("white-space", "break-spaces"); + div.style("width", width + "px"); + bbox = div.node().getBoundingClientRect(); + } + fo.style("width", bbox.width); + fo.style("height", bbox.height); + return fo.node(); +} +function createTspan(textElement, lineIndex, lineHeight) { + return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); +} +function computeWidthOfText(parentNode, lineHeight, line) { + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, line); + const textLength = testSpan.node().getComputedTextLength(); + testElement.remove(); + return textLength; +} +function computeDimensionOfText(parentNode, lineHeight, text) { + var _a; + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); + const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); + if (textDimension) { + testElement.remove(); + } + return textDimension; +} +function createFormattedText(width, g, structuredText, addBackground = false) { + const lineHeight = 1.1; + const labelGroup = g.append("g"); + const bkg = labelGroup.insert("rect").attr("class", "background"); + const textElement = labelGroup.append("text").attr("y", "-10.1"); + let lineIndex = 0; + for (const line of structuredText) { + const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; + const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); + for (const preparedLine of linesUnderWidth) { + const tspan = createTspan(textElement, lineIndex, lineHeight); + updateTextContentAndStyles(tspan, preparedLine); + lineIndex++; + } + } + if (addBackground) { + const bbox = textElement.node().getBBox(); + const padding = 2; + bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); + return labelGroup.node(); + } else { + return textElement.node(); + } +} +function updateTextContentAndStyles(tspan, wrappedLine) { + tspan.text(""); + wrappedLine.forEach((word, index) => { + const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); + if (index === 0) { + innerTspan.text(word.content); + } else { + innerTspan.text(" " + word.content); + } + }); +} +const createText = (el, text = "", { + style = "", + isTitle = false, + classes = "", + useHtmlLabels = true, + isNode = true, + width = 200, + addSvgBackground = false +} = {}) => { + mermaid_f47111a7.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); + if (useHtmlLabels) { + const htmlText = markdownToHTML(text); + const node = { + isNode, + label: (0,mermaid_f47111a7.M)(htmlText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `<i class='${s.replace(":", " ")}'></i>` + ), + labelStyle: style.replace("fill:", "color:") + }; + const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); + return vertexNode; + } else { + const structuredText = markdownToLines(text); + const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); + return svgLabel; + } +}; + + + +/***/ }), + +/***/ 3771: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6257); +/* harmony import */ var cytoscape__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4726); +/* harmony import */ var cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3457); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6312); +/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3791); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3219); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(8041); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(5263); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9418); + + + + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 4], $V1 = [1, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [6, 7, 8], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [6, 7, 11], $Vc = [1, 6, 13, 15, 16, 19, 22], $Vd = [1, 33], $Ve = [1, 34], $Vf = [1, 6, 7, 11, 13, 15, 16, 19, 22]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mindMap": 4, "spaceLines": 5, "SPACELINE": 6, "NL": 7, "MINDMAP": 8, "document": 9, "stop": 10, "EOF": 11, "statement": 12, "SPACELIST": 13, "node": 14, "ICON": 15, "CLASS": 16, "nodeWithId": 17, "nodeWithoutId": 18, "NODE_DSTART": 19, "NODE_DESCR": 20, "NODE_DEND": 21, "NODE_ID": 22, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" }, + productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 6: + case 7: + return yy; + case 8: + yy.getLogger().trace("Stop NL "); + break; + case 9: + yy.getLogger().trace("Stop EOF "); + break; + case 11: + yy.getLogger().trace("Stop NL2 "); + break; + case 12: + yy.getLogger().trace("Stop EOF2 "); + break; + case 15: + yy.getLogger().info("Node: ", $$[$0].id); + yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type); + break; + case 16: + yy.getLogger().trace("Icon: ", $$[$0]); + yy.decorateNode({ icon: $$[$0] }); + break; + case 17: + case 21: + yy.decorateNode({ class: $$[$0] }); + break; + case 18: + yy.getLogger().trace("SPACELIST"); + break; + case 19: + yy.getLogger().trace("Node: ", $$[$0].id); + yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type); + break; + case 20: + yy.decorateNode({ icon: $$[$0] }); + break; + case 25: + yy.getLogger().trace("node found ..", $$[$0 - 2]); + this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; + break; + case 26: + this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT }; + break; + case 27: + yy.getLogger().trace("node found ..", $$[$0 - 3]); + this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: $V5, 22: $V6 }), o($Vb, [2, 18]), o($Vb, [2, 19]), o($Vb, [2, 20]), o($Vb, [2, 21]), o($Vb, [2, 23]), o($Vb, [2, 24]), o($Vb, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: $V8, 7: $V9, 10: 32, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($Vc, [2, 14], { 7: $Vd, 11: $Ve }), o($Vf, [2, 8]), o($Vf, [2, 9]), o($Vf, [2, 10]), o($Vb, [2, 15]), o($Vb, [2, 16]), o($Vb, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, o($Vc, [2, 13], { 7: $Vd, 11: $Ve }), o($Vf, [2, 11]), o($Vf, [2, 12]), { 21: [1, 37] }, o($Vb, [2, 25]), o($Vb, [2, 27])], + defaultActions: { 2: [2, 1], 6: [2, 2] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + yy.getLogger().trace("Found comment", yy_.yytext); + return 6; + case 1: + return 8; + case 2: + this.begin("CLASS"); + break; + case 3: + this.popState(); + return 16; + case 4: + this.popState(); + break; + case 5: + yy.getLogger().trace("Begin icon"); + this.begin("ICON"); + break; + case 6: + yy.getLogger().trace("SPACELINE"); + return 6; + case 7: + return 7; + case 8: + return 15; + case 9: + yy.getLogger().trace("end icon"); + this.popState(); + break; + case 10: + yy.getLogger().trace("Exploding node"); + this.begin("NODE"); + return 19; + case 11: + yy.getLogger().trace("Cloud"); + this.begin("NODE"); + return 19; + case 12: + yy.getLogger().trace("Explosion Bang"); + this.begin("NODE"); + return 19; + case 13: + yy.getLogger().trace("Cloud Bang"); + this.begin("NODE"); + return 19; + case 14: + this.begin("NODE"); + return 19; + case 15: + this.begin("NODE"); + return 19; + case 16: + this.begin("NODE"); + return 19; + case 17: + this.begin("NODE"); + return 19; + case 18: + return 13; + case 19: + return 22; + case 20: + return 11; + case 21: + this.begin("NSTR2"); + break; + case 22: + return "NODE_DESCR"; + case 23: + this.popState(); + break; + case 24: + yy.getLogger().trace("Starting NSTR"); + this.begin("NSTR"); + break; + case 25: + yy.getLogger().trace("description:", yy_.yytext); + return "NODE_DESCR"; + case 26: + this.popState(); + break; + case 27: + this.popState(); + yy.getLogger().trace("node end ))"); + return "NODE_DEND"; + case 28: + this.popState(); + yy.getLogger().trace("node end )"); + return "NODE_DEND"; + case 29: + this.popState(); + yy.getLogger().trace("node end ...", yy_.yytext); + return "NODE_DEND"; + case 30: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 31: + this.popState(); + yy.getLogger().trace("node end (-"); + return "NODE_DEND"; + case 32: + this.popState(); + yy.getLogger().trace("node end (-"); + return "NODE_DEND"; + case 33: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 34: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 35: + yy.getLogger().trace("Long description:", yy_.yytext); + return 20; + case 36: + yy.getLogger().trace("Long description:", yy_.yytext); + return 20; + } + }, + rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i], + conditions: { "CLASS": { "rules": [3, 4], "inclusive": false }, "ICON": { "rules": [8, 9], "inclusive": false }, "NSTR2": { "rules": [22, 23], "inclusive": false }, "NSTR": { "rules": [25, 26], "inclusive": false }, "NODE": { "rules": [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let nodes = []; +let cnt = 0; +let elements = {}; +const clear = () => { + nodes = []; + cnt = 0; + elements = {}; +}; +const getParent = function(level) { + for (let i = nodes.length - 1; i >= 0; i--) { + if (nodes[i].level < level) { + return nodes[i]; + } + } + return null; +}; +const getMindmap = () => { + return nodes.length > 0 ? nodes[0] : null; +}; +const addNode = (level, id, descr, type) => { + var _a, _b; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.info("addNode", level, id, descr, type); + const conf = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)(); + let padding = ((_a = conf.mindmap) == null ? void 0 : _a.padding) ?? _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.B.mindmap.padding; + switch (type) { + case nodeType.ROUNDED_RECT: + case nodeType.RECT: + case nodeType.HEXAGON: + padding *= 2; + } + const node = { + id: cnt++, + nodeId: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.d)(id, conf), + level, + descr: (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.d)(descr, conf), + type, + children: [], + width: ((_b = conf.mindmap) == null ? void 0 : _b.maxNodeWidth) ?? _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.B.mindmap.maxNodeWidth, + padding + }; + const parent = getParent(level); + if (parent) { + parent.children.push(node); + nodes.push(node); + } else { + if (nodes.length === 0) { + nodes.push(node); + } else { + throw new Error( + 'There can be only one root. No parent could be found for ("' + node.descr + '")' + ); + } + } +}; +const nodeType = { + DEFAULT: 0, + NO_BORDER: 0, + ROUNDED_RECT: 1, + RECT: 2, + CIRCLE: 3, + CLOUD: 4, + BANG: 5, + HEXAGON: 6 +}; +const getType = (startStr, endStr) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("In get type", startStr, endStr); + switch (startStr) { + case "[": + return nodeType.RECT; + case "(": + return endStr === ")" ? nodeType.ROUNDED_RECT : nodeType.CLOUD; + case "((": + return nodeType.CIRCLE; + case ")": + return nodeType.CLOUD; + case "))": + return nodeType.BANG; + case "{{": + return nodeType.HEXAGON; + default: + return nodeType.DEFAULT; + } +}; +const setElementForId = (id, element) => { + elements[id] = element; +}; +const decorateNode = (decoration) => { + if (!decoration) { + return; + } + const config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)(); + const node = nodes[nodes.length - 1]; + if (decoration.icon) { + node.icon = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.d)(decoration.icon, config); + } + if (decoration.class) { + node.class = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.d)(decoration.class, config); + } +}; +const type2Str = (type) => { + switch (type) { + case nodeType.DEFAULT: + return "no-border"; + case nodeType.RECT: + return "rect"; + case nodeType.ROUNDED_RECT: + return "rounded-rect"; + case nodeType.CIRCLE: + return "circle"; + case nodeType.CLOUD: + return "cloud"; + case nodeType.BANG: + return "bang"; + case nodeType.HEXAGON: + return "hexgon"; + default: + return "no-border"; + } +}; +const getLogger = () => _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l; +const getElementById = (id) => elements[id]; +const db = { + clear, + addNode, + getMindmap, + nodeType, + getType, + setElementForId, + decorateNode, + type2Str, + getLogger, + getElementById +}; +const db$1 = db; +const MAX_SECTIONS = 12; +const defaultBkg = function(db2, elem, node, section) { + const rd = 5; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr( + "d", + `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` + ); + elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); +}; +const rectBkg = function(db2, elem, node) { + elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr("height", node.height).attr("width", node.width); +}; +const cloudBkg = function(db2, elem, node) { + const w = node.width; + const h = node.height; + const r1 = 0.15 * w; + const r2 = 0.25 * w; + const r3 = 0.35 * w; + const r4 = 0.2 * w; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr( + "d", + `M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1} + a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1} + a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2} + + a${r1},${r1} 1 0,1 ${w * 0.15},${1 * h * 0.35} + a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${1 * h * 0.65} + + a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15} + a${r3},${r3} 1 0,1 ${-1 * w * 0.5},${0} + a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15} + + a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35} + a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65} + + H0 V0 Z` + ); +}; +const bangBkg = function(db2, elem, node) { + const w = node.width; + const h = node.height; + const r = 0.15 * w; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr( + "d", + `M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1} + a${r},${r} 1 0,0 ${w * 0.25},${0} + a${r},${r} 1 0,0 ${w * 0.25},${0} + a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1} + + a${r},${r} 1 0,0 ${w * 0.15},${1 * h * 0.33} + a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34} + a${r},${r} 1 0,0 ${-1 * w * 0.15},${1 * h * 0.33} + + a${r},${r} 1 0,0 ${-1 * w * 0.25},${h * 0.15} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${0} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${0} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${-1 * h * 0.15} + + a${r},${r} 1 0,0 ${-1 * w * 0.1},${-1 * h * 0.33} + a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34} + a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33} + + H0 V0 Z` + ); +}; +const circleBkg = function(db2, elem, node) { + elem.append("circle").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr("r", node.width / 2); +}; +function insertPolygonShape(parent, w, h, points, node) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("transform", "translate(" + (node.width - w) / 2 + ", " + h + ")"); +} +const hexagonBkg = function(_db, elem, node) { + const h = node.height; + const f = 4; + const m = h / f; + const w = node.width - node.padding + 2 * m; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + insertPolygonShape(elem, w, h, points, node); +}; +const roundedRectBkg = function(db2, elem, node) { + elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + db2.type2Str(node.type)).attr("height", node.height).attr("rx", node.padding).attr("ry", node.padding).attr("width", node.width); +}; +const drawNode = function(db2, elem, node, fullSection, conf) { + const htmlLabels = conf.htmlLabels; + const section = fullSection % (MAX_SECTIONS - 1); + const nodeElem = elem.append("g"); + node.section = section; + let sectionClass = "section-" + section; + if (section < 0) { + sectionClass += " section-root"; + } + nodeElem.attr("class", (node.class ? node.class + " " : "") + "mindmap-node " + sectionClass); + const bkgElem = nodeElem.append("g"); + const textElem = nodeElem.append("g"); + const description = node.descr.replace(/(<br\/*>)/g, "\n"); + (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_7__.a)(textElem, description, { + useHtmlLabels: htmlLabels, + width: node.width, + classes: "mindmap-node-label" + }); + if (!htmlLabels) { + textElem.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"); + } + const bbox = textElem.node().getBBox(); + const [fontSize] = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.D)(conf.fontSize); + node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding; + node.width = bbox.width + 2 * node.padding; + if (node.icon) { + if (node.type === db2.nodeType.CIRCLE) { + node.height += 50; + node.width += 50; + const icon = nodeElem.append("foreignObject").attr("height", "50px").attr("width", node.width).attr("style", "text-align: center;"); + icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); + textElem.attr( + "transform", + "translate(" + node.width / 2 + ", " + (node.height / 2 - 1.5 * node.padding) + ")" + ); + } else { + node.width += 50; + const orgHeight = node.height; + node.height = Math.max(orgHeight, 60); + const heightDiff = Math.abs(node.height - orgHeight); + const icon = nodeElem.append("foreignObject").attr("width", "60px").attr("height", node.height).attr("style", "text-align: center;margin-top:" + heightDiff / 2 + "px;"); + icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); + textElem.attr( + "transform", + "translate(" + (25 + node.width / 2) + ", " + (heightDiff / 2 + node.padding / 2) + ")" + ); + } + } else { + if (!htmlLabels) { + const dx = node.width / 2; + const dy = node.padding / 2; + textElem.attr("transform", "translate(" + dx + ", " + dy + ")"); + } else { + const dx = (node.width - bbox.width) / 2; + const dy = (node.height - bbox.height) / 2; + textElem.attr("transform", "translate(" + dx + ", " + dy + ")"); + } + } + switch (node.type) { + case db2.nodeType.DEFAULT: + defaultBkg(db2, bkgElem, node, section); + break; + case db2.nodeType.ROUNDED_RECT: + roundedRectBkg(db2, bkgElem, node); + break; + case db2.nodeType.RECT: + rectBkg(db2, bkgElem, node); + break; + case db2.nodeType.CIRCLE: + bkgElem.attr("transform", "translate(" + node.width / 2 + ", " + +node.height / 2 + ")"); + circleBkg(db2, bkgElem, node); + break; + case db2.nodeType.CLOUD: + cloudBkg(db2, bkgElem, node); + break; + case db2.nodeType.BANG: + bangBkg(db2, bkgElem, node); + break; + case db2.nodeType.HEXAGON: + hexagonBkg(db2, bkgElem, node); + break; + } + db2.setElementForId(node.id, nodeElem); + return node.height; +}; +const positionNode = function(db2, node) { + const nodeElem = db2.getElementById(node.id); + const x = node.x || 0; + const y = node.y || 0; + nodeElem.attr("transform", "translate(" + x + "," + y + ")"); +}; +cytoscape__WEBPACK_IMPORTED_MODULE_0__.use(cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_1__); +function drawNodes(db2, svg, mindmap, section, conf) { + drawNode(db2, svg, mindmap, section, conf); + if (mindmap.children) { + mindmap.children.forEach((child, index) => { + drawNodes(db2, svg, child, section < 0 ? index : section, conf); + }); + } +} +function drawEdges(edgesEl, cy) { + cy.edges().map((edge, id) => { + const data = edge.data(); + if (edge[0]._private.bodyBounds) { + const bounds = edge[0]._private.rscratch; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.trace("Edge: ", id, data); + edgesEl.insert("path").attr( + "d", + `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} ` + ).attr("class", "edge section-edge-" + data.section + " edge-depth-" + data.depth); + } + }); +} +function addNodes(mindmap, cy, conf, level) { + cy.add({ + group: "nodes", + data: { + id: mindmap.id.toString(), + labelText: mindmap.descr, + height: mindmap.height, + width: mindmap.width, + level, + nodeId: mindmap.id, + padding: mindmap.padding, + type: mindmap.type + }, + position: { + x: mindmap.x, + y: mindmap.y + } + }); + if (mindmap.children) { + mindmap.children.forEach((child) => { + addNodes(child, cy, conf, level + 1); + cy.add({ + group: "edges", + data: { + id: `${mindmap.id}_${child.id}`, + source: mindmap.id, + target: child.id, + depth: level, + section: child.section + } + }); + }); + } +} +function layoutMindmap(node, conf) { + return new Promise((resolve) => { + const renderEl = (0,d3__WEBPACK_IMPORTED_MODULE_2__/* .select */ .Ltv)("body").append("div").attr("id", "cy").attr("style", "display:none"); + const cy = cytoscape__WEBPACK_IMPORTED_MODULE_0__({ + container: document.getElementById("cy"), + // container to render in + style: [ + { + selector: "edge", + style: { + "curve-style": "bezier" + } + } + ] + }); + renderEl.remove(); + addNodes(node, cy, conf, 0); + cy.nodes().forEach(function(n) { + n.layoutDimensions = () => { + const data = n.data(); + return { w: data.width, h: data.height }; + }; + }); + cy.layout({ + name: "cose-bilkent", + // @ts-ignore Types for cose-bilkent are not correct? + quality: "proof", + styleEnabled: false, + animate: false + }).run(); + cy.ready((e) => { + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Ready", e); + resolve(cy); + }); + }); +} +function positionNodes(db2, cy) { + cy.nodes().map((node, id) => { + const data = node.data(); + data.x = node.position().x; + data.y = node.position().y; + positionNode(db2, data); + const el = db2.getElementById(data.nodeId); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.info("Id:", id, "Position: (", node.position().x, ", ", node.position().y, ")", data); + el.attr( + "transform", + `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})` + ); + el.attr("attr", `apa-${id})`); + }); +} +const draw = async (text, id, _version, diagObj) => { + var _a, _b; + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.l.debug("Rendering mindmap diagram\n" + text); + const db2 = diagObj.db; + const mm = db2.getMindmap(); + if (!mm) { + return; + } + const conf = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.c)(); + conf.htmlLabels = false; + const svg = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.A)(id); + const edgesElem = svg.append("g"); + edgesElem.attr("class", "mindmap-edges"); + const nodesElem = svg.append("g"); + nodesElem.attr("class", "mindmap-nodes"); + drawNodes(db2, nodesElem, mm, -1, conf); + const cy = await layoutMindmap(mm, conf); + drawEdges(edgesElem, cy); + positionNodes(db2, cy); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.o)( + void 0, + svg, + ((_a = conf.mindmap) == null ? void 0 : _a.padding) ?? _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.B.mindmap.padding, + ((_b = conf.mindmap) == null ? void 0 : _b.useMaxWidth) ?? _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_6__.B.mindmap.useMaxWidth + ); +}; +const renderer = { + draw +}; +const genSections = (options) => { + let sections = ""; + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i]; + if ((0,khroma__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(options["lineColor" + i])) { + options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)(options["lineColor" + i], 20); + } else { + options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A)(options["lineColor" + i], 20); + } + } + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + const sw = "" + (17 - 3 * i); + sections += ` + .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path { + fill: ${options["cScale" + i]}; + } + .section-${i - 1} text { + fill: ${options["cScaleLabel" + i]}; + } + .node-icon-${i - 1} { + font-size: 40px; + color: ${options["cScaleLabel" + i]}; + } + .section-edge-${i - 1}{ + stroke: ${options["cScale" + i]}; + } + .edge-depth-${i - 1}{ + stroke-width: ${sw}; + } + .section-${i - 1} line { + stroke: ${options["cScaleInv" + i]} ; + stroke-width: 3; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections; +}; +const getStyles = (options) => ` + .edge { + stroke-width: 3; + } + ${genSections(options)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${options.git0}; + } + .section-root text { + fill: ${options.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`; +const styles = getStyles; +const diagram = { + db: db$1, + renderer, + parser: parser$1, + styles +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/7dbb84ad.de990a0e.js b/assets/js/7dbb84ad.de990a0e.js new file mode 100644 index 00000000..03569078 --- /dev/null +++ b/assets/js/7dbb84ad.de990a0e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[4825],{4006:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>d,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var i=n(4848),r=n(8453);const o={},d="Testing",s={id:"contribute/development-guide/testing",title:"Testing",description:"TBD",source:"@site/docs/contribute/development-guide/testing.md",sourceDirName:"contribute/development-guide",slug:"/contribute/development-guide/testing",permalink:"/tagreader-python/docs/contribute/development-guide/testing",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/contribute/development-guide/testing.md",tags:[],version:"current",frontMatter:{},sidebar:"contribute",previous:{title:"Setup",permalink:"/tagreader-python/docs/contribute/development-guide/setup"},next:{title:"Upgrading",permalink:"/tagreader-python/docs/contribute/development-guide/upgrading"}},u={},c=[];function a(e){const t={h1:"h1",header:"header",p:"p",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"testing",children:"Testing"})}),"\n",(0,i.jsx)(t.p,{children:"TBD"})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}}}]); \ No newline at end of file diff --git a/assets/js/8159.f171b590.js b/assets/js/8159.f171b590.js new file mode 100644 index 00000000..9f7338b0 --- /dev/null +++ b/assets/js/8159.f171b590.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[8159],{8159:(t,e,r)=>{r.d(e,{diagram:()=>D});var i=r(6257),a=r(697),n=r(6312),s=r(1176);const o=[];for(let S=0;S<256;++S)o.push((S+256).toString(16).slice(1));function c(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}const l=/^(?:[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;const h=function(t){return"string"==typeof t&&l.test(t)};const d=function(t){if(!h(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]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,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]=255&e,r};function y(t,e,r,i){switch(t){case 0:return e&r^~e&i;case 1:case 3:return e^r^i;case 2:return e&r^e&i^r&i}}function u(t,e){return t<<e|t>>>32-e}const p=function(t,e,r){function i(t,i,a,n){var s;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}(t)),"string"==typeof i&&(i=d(i)),16!==(null===(s=i)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let o=new Uint8Array(16+t.length);if(o.set(i),o.set(t,i.length),o=r(o),o[6]=15&o[6]|e,o[8]=63&o[8]|128,a){n=n||0;for(let t=0;t<16;++t)a[n+t]=o[t];return a}return c(o)}try{i.name=t}catch(a){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i}("v5",80,(function(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const i=t.length/4+2,a=Math.ceil(i/16),n=new Array(a);for(let s=0;s<a;++s){const e=new Uint32Array(16);for(let r=0;r<16;++r)e[r]=t[64*s+4*r]<<24|t[64*s+4*r+1]<<16|t[64*s+4*r+2]<<8|t[64*s+4*r+3];n[s]=e}n[a-1][14]=8*(t.length-1)/Math.pow(2,32),n[a-1][14]=Math.floor(n[a-1][14]),n[a-1][15]=8*(t.length-1)&4294967295;for(let s=0;s<a;++s){const t=new Uint32Array(80);for(let e=0;e<16;++e)t[e]=n[s][e];for(let e=16;e<80;++e)t[e]=u(t[e-3]^t[e-8]^t[e-14]^t[e-16],1);let i=r[0],a=r[1],o=r[2],c=r[3],l=r[4];for(let r=0;r<80;++r){const n=Math.floor(r/20),s=u(i,5)+y(n,a,o,c)+l+e[n]+t[r]>>>0;l=c,c=o,o=u(a,30)>>>0,a=i,i=s}r[0]=r[0]+i>>>0,r[1]=r[1]+a>>>0,r[2]=r[2]+o>>>0,r[3]=r[3]+c>>>0,r[4]=r[4]+l>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}));r(4353),r(6750),r(2838);var _=function(){var t=function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},e=[6,8,10,20,22,24,26,27,28],r=[1,10],i=[1,11],a=[1,12],n=[1,13],s=[1,14],o=[1,15],c=[1,21],l=[1,22],h=[1,23],d=[1,24],y=[1,25],u=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],p=[1,34],_=[27,28,46,47],f=[41,42,43,44,45],m=[17,34],E=[1,54],g=[1,53],O=[17,34,36,38],b={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(t,e,r,i,a,n,s){var o=n.length-1;switch(a){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:case 19:case 43:case 27:case 28:case 31:this.$=n[o];break;case 8:i.addEntity(n[o-4]),i.addEntity(n[o-2]),i.addRelationship(n[o-4],n[o],n[o-2],n[o-3]);break;case 9:i.addEntity(n[o-3]),i.addAttributes(n[o-3],n[o-1]);break;case 10:i.addEntity(n[o-2]);break;case 11:i.addEntity(n[o]);break;case 12:i.addEntity(n[o-6],n[o-4]),i.addAttributes(n[o-6],n[o-1]);break;case 13:i.addEntity(n[o-5],n[o-3]);break;case 14:i.addEntity(n[o-3],n[o-1]);break;case 15:case 16:this.$=n[o].trim(),i.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),i.setAccDescription(this.$);break;case 20:case 41:case 42:case 32:this.$=n[o].replace(/"/g,"");break;case 21:case 29:this.$=[n[o]];break;case 22:n[o].push(n[o-1]),this.$=n[o];break;case 23:this.$={attributeType:n[o-1],attributeName:n[o]};break;case 24:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeKeyTypeList:n[o]};break;case 25:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeComment:n[o]};break;case 26:this.$={attributeType:n[o-3],attributeName:n[o-2],attributeKeyTypeList:n[o-1],attributeComment:n[o]};break;case 30:n[o-2].push(n[o]),this.$=n[o-2];break;case 33:this.$={cardA:n[o],relType:n[o-1],cardB:n[o-2]};break;case 34:this.$=i.Cardinality.ZERO_OR_ONE;break;case 35:this.$=i.Cardinality.ZERO_OR_MORE;break;case 36:this.$=i.Cardinality.ONE_OR_MORE;break;case 37:this.$=i.Cardinality.ONLY_ONE;break;case 38:this.$=i.Cardinality.MD_PARENT;break;case 39:this.$=i.Identification.NON_IDENTIFYING;break;case 40:this.$=i.Identification.IDENTIFYING}},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:i,24:a,26:n,27:s,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:i,24:a,26:n,27:s,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:c,42:l,43:h,44:d,45:y}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(u,[2,19]),t(u,[2,20]),t(e,[2,4]),{11:29,27:s,28:o},{16:30,17:[1,31],29:32,30:33,34:p},{11:35,27:s,28:o},{40:36,46:[1,37],47:[1,38]},t(_,[2,34]),t(_,[2,35]),t(_,[2,36]),t(_,[2,37]),t(_,[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:p},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:c,42:l,43:h,44:d,45:y},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(m,[2,23],{32:50,33:51,35:52,37:E,38:g}),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(m,[2,24],{33:56,36:[1,57],38:g}),t(m,[2,25]),t(O,[2,29]),t(m,[2,32]),t(O,[2,31]),{16:58,17:[1,59],29:32,30:33,34:p},t(m,[2,26]),{35:60,37:E},{17:[1,61]},t(e,[2,13]),t(O,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],i=[],a=[null],n=[],s=this.table,o="",c=0,l=0,h=n.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(y.yy[u]=this.yy[u]);d.setInput(t,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var p=d.yylloc;n.push(p);var _=d.options&&d.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,m,E,g,O,b,k,R,N,T={};;){if(m=r[r.length-1],this.defaultActions[m]?E=this.defaultActions[m]:(null==f&&(N=void 0,"number"!=typeof(N=i.pop()||d.lex()||1)&&(N instanceof Array&&(N=(i=N).pop()),N=e.symbols_[N]||N),f=N),E=s[m]&&s[m][f]),void 0===E||!E.length||!E[0]){var x="";for(O in R=[],s[m])this.terminals_[O]&&O>2&&R.push("'"+this.terminals_[O]+"'");x=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(x,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:p,expected:R})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(E[0]){case 1:r.push(f),a.push(d.yytext),n.push(d.yylloc),r.push(E[1]),f=null,l=d.yyleng,o=d.yytext,c=d.yylineno,p=d.yylloc;break;case 2:if(b=this.productions_[E[1]][1],T.$=a[a.length-b],T._$={first_line:n[n.length-(b||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(b||1)].first_column,last_column:n[n.length-1].last_column},_&&(T._$.range=[n[n.length-(b||1)].range[0],n[n.length-1].range[1]]),void 0!==(g=this.performAction.apply(T,[o,l,c,y.yy,E[1],a,n].concat(h))))return g;b&&(r=r.slice(0,-1*b*2),a=a.slice(0,-1*b),n=n.slice(0,-1*b)),r.push(this.productions_[E[1]][0]),a.push(T.$),n.push(T._$),k=s[r[r.length-2]][r[r.length-1]],r.push(k);break;case 3:return!0}}return!0}},k={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.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:r?(r.length===i.length?this.yylloc.first_column:0)+i[i.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,i,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))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if((r=this._input.match(this.rules[a[n]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,a[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,i){switch(r){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:case 15:case 20: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 16:return 37;case 17:case 18:return 34;case 19:return 38;case 21:return this.popState(),17;case 22:case 54:return e.yytext[0];case 23:return 18;case 24:return 19;case 25:case 29:case 30:case 43:return 41;case 26:case 27:case 28:case 36:case 38:case 45:return 43;case 31:case 32:case 33:case 34:case 35:case 37:case 44:return 42;case 39:case 40:case 41:case 42:return 44;case 46:return 45;case 47:case 50:case 51:case 52:return 46;case 48:case 49:return 47;case 53:return 27;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}}};function R(){this.yy={}}return b.lexer=k,R.prototype=b,b.Parser=R,new R}();_.parser=_;const f=_;let m={},E=[];const g=function(t,e=void 0){return void 0===m[t]?(m[t]={attributes:[],alias:e},i.l.info("Added new entity :",t)):m[t]&&!m[t].alias&&e&&(m[t].alias=e,i.l.info(`Add alias '${e}' to entity '${t}'`)),m[t]},O={Cardinality:{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"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},getConfig:()=>(0,i.c)().er,addEntity:g,addAttributes:function(t,e){let r,a=g(t);for(r=e.length-1;r>=0;r--)a.attributes.push(e[r]),i.l.debug("Added attribute ",e[r].attributeName)},getEntities:()=>m,addRelationship:function(t,e,r,a){let n={entityA:t,roleA:e,entityB:r,relSpec:a};E.push(n),i.l.debug("Added new relationship :",n)},getRelationships:()=>E,clear:function(){m={},E=[],(0,i.v)()},setAccTitle:i.s,getAccTitle:i.g,setAccDescription:i.b,getAccDescription:i.a,setDiagramTitle:i.q,getDiagramTitle:i.t},b={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"},k=b,R=function(t,e){let r;t.append("defs").append("marker").attr("id",b.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",b.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",b.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",b.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",b.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",b.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",b.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",b.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",b.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",b.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")},N=/[^\dA-Za-z](\W)*/g;let T={},x=new Map;const A=function(t,e,r){let a;return Object.keys(e).forEach((function(n){const s=function(t="",e=""){const r=t.replace(N,"");return`${v(e)}${v(r)}${p(t,I)}`}(n,"entity");x.set(n,s);const o=t.append("g").attr("id",s);a=void 0===a?s:a;const c="text-"+s,l=o.append("text").classed("er entityLabel",!0).attr("id",c).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",(0,i.c)().fontFamily).style("font-size",T.fontSize+"px").text(e[n].alias??n),{width:h,height:d}=((t,e,r)=>{const a=T.entityPadding/3,n=T.entityPadding/3,s=.85*T.fontSize,o=e.node().getBBox(),c=[];let l=!1,h=!1,d=0,y=0,u=0,p=0,_=o.height+2*a,f=1;r.forEach((t=>{void 0!==t.attributeKeyTypeList&&t.attributeKeyTypeList.length>0&&(l=!0),void 0!==t.attributeComment&&(h=!0)})),r.forEach((r=>{const n=`${e.node().id}-attr-${f}`;let o=0;const m=(0,i.x)(r.attributeType),E=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(m),g=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(r.attributeName),O={};O.tn=E,O.nn=g;const b=E.node().getBBox(),k=g.node().getBBox();if(d=Math.max(d,b.width),y=Math.max(y,k.width),o=Math.max(b.height,k.height),l){const e=void 0!==r.attributeKeyTypeList?r.attributeKeyTypeList.join(","):"",a=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(e);O.kn=a;const c=a.node().getBBox();u=Math.max(u,c.width),o=Math.max(o,c.height)}if(h){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(r.attributeComment||"");O.cn=e;const a=e.node().getBBox();p=Math.max(p,a.width),o=Math.max(o,a.height)}O.height=o,c.push(O),_+=o+2*a,f+=1}));let m=4;l&&(m+=2),h&&(m+=2);const E=d+y+u+p,g={width:Math.max(T.minEntityWidth,Math.max(o.width+2*T.entityPadding,E+n*m)),height:r.length>0?_:Math.max(T.minEntityHeight,o.height+2*T.entityPadding)};if(r.length>0){const r=Math.max(0,(g.width-E-n*m)/(m/2));e.attr("transform","translate("+g.width/2+","+(a+o.height/2)+")");let i=o.height+2*a,s="attributeBoxOdd";c.forEach((e=>{const o=i+a+e.height/2;e.tn.attr("transform","translate("+n+","+o+")");const c=t.insert("rect","#"+e.tn.node().id).classed(`er ${s}`,!0).attr("x",0).attr("y",i).attr("width",d+2*n+r).attr("height",e.height+2*a),_=parseFloat(c.attr("x"))+parseFloat(c.attr("width"));e.nn.attr("transform","translate("+(_+n)+","+o+")");const f=t.insert("rect","#"+e.nn.node().id).classed(`er ${s}`,!0).attr("x",_).attr("y",i).attr("width",y+2*n+r).attr("height",e.height+2*a);let m=parseFloat(f.attr("x"))+parseFloat(f.attr("width"));if(l){e.kn.attr("transform","translate("+(m+n)+","+o+")");const c=t.insert("rect","#"+e.kn.node().id).classed(`er ${s}`,!0).attr("x",m).attr("y",i).attr("width",u+2*n+r).attr("height",e.height+2*a);m=parseFloat(c.attr("x"))+parseFloat(c.attr("width"))}h&&(e.cn.attr("transform","translate("+(m+n)+","+o+")"),t.insert("rect","#"+e.cn.node().id).classed(`er ${s}`,"true").attr("x",m).attr("y",i).attr("width",p+2*n+r).attr("height",e.height+2*a)),i+=e.height+2*a,s="attributeBoxOdd"===s?"attributeBoxEven":"attributeBoxOdd"}))}else g.height=Math.max(T.minEntityHeight,_),e.attr("transform","translate("+g.width/2+","+g.height/2+")");return g})(o,l,e[n].attributes),y=o.insert("rect","#"+c).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",h).attr("height",d).node().getBBox();r.setNode(s,{width:y.width,height:y.height,shape:"rect",id:s})})),a},M=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")};let w=0;const I="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function v(t=""){return t.length>0?`${t}-`:""}const D={parser:f,db:O,renderer:{setConf:function(t){const e=Object.keys(t);for(const r of e)T[r]=t[r]},draw:function(t,e,r,o){T=(0,i.c)().er,i.l.info("Drawing ER diagram");const c=(0,i.c)().securityLevel;let l;"sandbox"===c&&(l=(0,n.Ltv)("#i"+e));const h=("sandbox"===c?(0,n.Ltv)(l.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id='${e}']`);let d;R(h,T),d=new a.T({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:T.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const y=A(h,o.db.getEntities(),d),u=function(t,e){return t.forEach((function(t){e.setEdge(x.get(t.entityA),x.get(t.entityB),{relationship:t},M(t))})),t}(o.db.getRelationships(),d);var p,_;(0,s.Zp)(d),p=h,(_=d).nodes().forEach((function(t){void 0!==t&&void 0!==_.node(t)&&p.select("#"+t).attr("transform","translate("+(_.node(t).x-_.node(t).width/2)+","+(_.node(t).y-_.node(t).height/2)+" )")})),u.forEach((function(t){!function(t,e,r,a,s){w++;const o=r.edge(x.get(e.entityA),x.get(e.entityB),M(e)),c=(0,n.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(n.qrM),l=t.insert("path","#"+a).classed("er relationshipLine",!0).attr("d",c(o.points)).style("stroke",T.stroke).style("fill","none");e.relSpec.relType===s.db.Identification.NON_IDENTIFYING&&l.attr("stroke-dasharray","8,8");let h="";switch(T.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),e.relSpec.cardA){case s.db.Cardinality.ZERO_OR_ONE:l.attr("marker-end","url("+h+"#"+k.ZERO_OR_ONE_END+")");break;case s.db.Cardinality.ZERO_OR_MORE:l.attr("marker-end","url("+h+"#"+k.ZERO_OR_MORE_END+")");break;case s.db.Cardinality.ONE_OR_MORE:l.attr("marker-end","url("+h+"#"+k.ONE_OR_MORE_END+")");break;case s.db.Cardinality.ONLY_ONE:l.attr("marker-end","url("+h+"#"+k.ONLY_ONE_END+")");break;case s.db.Cardinality.MD_PARENT:l.attr("marker-end","url("+h+"#"+k.MD_PARENT_END+")")}switch(e.relSpec.cardB){case s.db.Cardinality.ZERO_OR_ONE:l.attr("marker-start","url("+h+"#"+k.ZERO_OR_ONE_START+")");break;case s.db.Cardinality.ZERO_OR_MORE:l.attr("marker-start","url("+h+"#"+k.ZERO_OR_MORE_START+")");break;case s.db.Cardinality.ONE_OR_MORE:l.attr("marker-start","url("+h+"#"+k.ONE_OR_MORE_START+")");break;case s.db.Cardinality.ONLY_ONE:l.attr("marker-start","url("+h+"#"+k.ONLY_ONE_START+")");break;case s.db.Cardinality.MD_PARENT:l.attr("marker-start","url("+h+"#"+k.MD_PARENT_START+")")}const d=l.node().getTotalLength(),y=l.node().getPointAtLength(.5*d),u="rel"+w,p=t.append("text").classed("er relationshipLabel",!0).attr("id",u).attr("x",y.x).attr("y",y.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",(0,i.c)().fontFamily).style("font-size",T.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+u).classed("er relationshipLabelBox",!0).attr("x",y.x-p.width/2).attr("y",y.y-p.height/2).attr("width",p.width).attr("height",p.height)}(h,t,d,y,o)}));const f=T.diagramPadding;i.u.insertTitle(h,"entityTitleText",T.titleTopMargin,o.db.getDiagramTitle());const m=h.node().getBBox(),E=m.width+2*f,g=m.height+2*f;(0,i.i)(h,g,E,T.useMaxWidth),h.attr("viewBox",`${m.x-f} ${m.y-f} ${E} ${g}`)}},styles:t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n #MD_PARENT_START {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n #MD_PARENT_END {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n \n`}}}]); \ No newline at end of file diff --git a/assets/js/8327.dda91e63.js b/assets/js/8327.dda91e63.js new file mode 100644 index 00000000..26ad8f9f --- /dev/null +++ b/assets/js/8327.dda91e63.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[8327],{8327:(t,e,n)=>{n.d(e,{diagram:()=>j});var i=n(6257),s=n(6312),r=n(8886),a=(n(4353),n(6750),n(2838),function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,14],c={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,o="",c=0,l=0,h=r.slice.call(arguments,1),y=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);y.setInput(t,u.yy),u.yy.lexer=y,u.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var d=y.yylloc;r.push(d);var f=y.options&&y.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,x,m,k,_,b,v,$,w,M={};;){if(x=n[n.length-1],this.defaultActions[x]?m=this.defaultActions[x]:(null==g&&(w=void 0,"number"!=typeof(w=i.pop()||y.lex()||1)&&(w instanceof Array&&(w=(i=w).pop()),w=e.symbols_[w]||w),g=w),m=a[x]&&a[x][g]),void 0===m||!m.length||!m[0]){var E="";for(_ in $=[],a[x])this.terminals_[_]&&_>2&&$.push("'"+this.terminals_[_]+"'");E=y.showPosition?"Parse error on line "+(c+1)+":\n"+y.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(E,{text:y.match,token:this.terminals_[g]||g,line:y.yylineno,loc:d,expected:$})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+g);switch(m[0]){case 1:n.push(g),s.push(y.yytext),r.push(y.yylloc),n.push(m[1]),g=null,l=y.yyleng,o=y.yytext,c=y.yylineno,d=y.yylloc;break;case 2:if(b=this.productions_[m[1]][1],M.$=s[s.length-b],M._$={first_line:r[r.length-(b||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(b||1)].first_column,last_column:r[r.length-1].last_column},f&&(M._$.range=[r[r.length-(b||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(M,[o,l,c,u.yy,m[1],s,r].concat(h))))return k;b&&(n=n.slice(0,-1*b*2),s=s.slice(0,-1*b),r=r.slice(0,-1*b)),n.push(this.productions_[m[1]][0]),s.push(M.$),r.push(M._$),v=a[n[n.length-2]][n[n.length-1]],n.push(v);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};function h(){this.yy={}}return c.lexer=l,h.prototype=c,c.Parser=h,new h}());a.parser=a;const o=a;let c="";const l=[],h=[],y=[],u=function(){let t=!0;for(const[e,n]of y.entries())y[e].processed,t=t&&n.processed;return t},p={getConfig:()=>(0,i.c)().journey,clear:function(){l.length=0,h.length=0,c="",y.length=0,(0,i.v)()},setDiagramTitle:i.q,getDiagramTitle:i.t,setAccTitle:i.s,getAccTitle:i.g,setAccDescription:i.b,getAccDescription:i.a,addSection:function(t){c=t,l.push(t)},getSections:function(){return l},getTasks:function(){let t=u();let e=0;for(;!t&&e<100;)t=u(),e++;return h.push(...y),h},addTask:function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map((t=>t.trim())),a={section:c,type:c,people:r,task:t,score:i};y.push(a)},addTaskOrg:function(t){const e={section:c,type:c,description:t,task:t,classes:[]};h.push(e)},getActors:function(){return function(){const t=[];return h.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}()}},d=t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`,f=function(t,e){return(0,r.d)(t,e)},g=function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},x=function(t,e){return(0,r.f)(t,e)};let m=-1;const k=function(){function t(t,e,n,s,r,a,o,c){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:y}=c,u=t.split(/<br\s*\/?>/gi);for(let p=0;p<u.length;p++){const t=p*h-h*(u.length-1)/2,c=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",l).style("text-anchor","middle").style("font-size",h).style("font-family",y);c.append("tspan").attr("x",n+r/2).attr("dy",t).text(u[p]),c.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(c,o)}}function n(t,n,s,r,a,o,c,l){const h=n.append("switch"),y=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,c,l),i(y,c)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),_=g,b=function(t,e,n){const i=t.append("g"),s=(0,r.g)();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,f(i,s),k(n)(e.text,i,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)},v=x,$=function(t,e,n){const i=e.x+n.width/2,a=t.append("g");m++;a.append("line").attr("id","task"+m).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.score>3?function(t){const i=(0,s.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}(r):e.score<3?function(t){const i=(0,s.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}(r):r.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(a,{cx:i,cy:300+30*(5-e.score),score:e.score});const o=(0,r.g)();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=n.width,o.height=n.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,f(a,o);let c=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,i={cx:c,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};g(a,i),c+=10})),k(n)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},n,e.colour)},w=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},M={};const E=(0,i.c)().journey,T=E.leftMargin,S={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},updateBounds:function(t,e,n,s){const r=(0,i.c)().journey,a=this;let o=0;var c;this.sequenceItems.forEach((function(i){o++;const l=a.sequenceItems.length-o+1;a.updateVal(i,"starty",e-l*r.boxMargin,Math.min),a.updateVal(i,"stopy",s+l*r.boxMargin,Math.max),a.updateVal(S.data,"startx",t-l*r.boxMargin,Math.min),a.updateVal(S.data,"stopx",n+l*r.boxMargin,Math.max),"activation"!==c&&(a.updateVal(i,"startx",t-l*r.boxMargin,Math.min),a.updateVal(i,"stopx",n+l*r.boxMargin,Math.max),a.updateVal(S.data,"starty",e-l*r.boxMargin,Math.min),a.updateVal(S.data,"stopy",s+l*r.boxMargin,Math.max))}))},insert:function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(S.data,"startx",s,Math.min),this.updateVal(S.data,"starty",a,Math.min),this.updateVal(S.data,"stopx",r,Math.max),this.updateVal(S.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},A=E.sectionFills,I=E.sectionColours,P=function(t,e,n){const s=(0,i.c)().journey;let r="";const a=n+(2*s.height+s.diagramMarginY);let o=0,c="#CCC",l="black",h=0;for(const[i,y]of e.entries()){if(r!==y.section){c=A[o%A.length],h=o%A.length,l=I[o%I.length];let n=0;const a=y.section;for(let t=i;t<e.length&&e[t].section==a;t++)n+=1;const u={x:i*s.taskMargin+i*s.width+T,y:50,text:y.section,fill:c,num:h,colour:l,taskCount:n};b(t,u,s),r=y.section,o++}const n=y.people.reduce(((t,e)=>(M[e]&&(t[e]=M[e]),t)),{});y.x=i*s.taskMargin+i*s.width+T,y.y=a,y.width=s.diagramMarginX,y.height=s.diagramMarginY,y.colour=l,y.fill=c,y.num=h,y.actors=n,$(t,y,s),S.insert(y.x,y.y,y.x+y.width+s.taskMargin,450)}},C={setConf:function(t){Object.keys(t).forEach((function(e){E[e]=t[e]}))},draw:function(t,e,n,r){const a=(0,i.c)().journey,o=(0,i.c)().securityLevel;let c;"sandbox"===o&&(c=(0,s.Ltv)("#i"+e));const l="sandbox"===o?(0,s.Ltv)(c.nodes()[0].contentDocument.body):(0,s.Ltv)("body");S.init();const h=l.select("#"+e);w(h);const y=r.db.getTasks(),u=r.db.getDiagramTitle(),p=r.db.getActors();for(const i in M)delete M[i];let d=0;p.forEach((t=>{M[t]={color:a.actorColours[d%a.actorColours.length],position:d},d++})),function(t){const e=(0,i.c)().journey;let n=60;Object.keys(M).forEach((i=>{const s=M[i].color,r={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:M[i].position};_(t,r);const a={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};v(t,a),n+=20}))}(h),S.insert(0,0,T,50*Object.keys(M).length),P(h,y,0);const f=S.getBounds();u&&h.append("text").text(u).attr("x",T).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const g=f.stopy-f.starty+2*a.diagramMarginY,x=T+f.stopx+2*a.diagramMarginX;(0,i.i)(h,g,x,a.useMaxWidth),h.append("line").attr("x1",T).attr("y1",4*a.height).attr("x2",x-T-4).attr("y2",4*a.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const m=u?70:0;h.attr("viewBox",`${f.startx} -25 ${x} ${g+m}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",g+m+25)}},j={parser:o,db:p,renderer:C,styles:d,init:t=>{C.setConf(t.journey),p.clear()}}},8886:(t,e,n)=>{n.d(e,{a:()=>a,b:()=>l,c:()=>c,d:()=>r,e:()=>y,f:()=>o,g:()=>h});var i=n(6750),s=n(6257);const r=(t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),void 0!==e.rx&&n.attr("rx",e.rx),void 0!==e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const i in e.attrs)n.attr(i,e.attrs[i]);return void 0!==e.class&&n.attr("class",e.class),n},a=(t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};r(t,n).lower()},o=(t,e)=>{const n=e.text.replace(s.J," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),i},c=(t,e,n,s)=>{const r=t.append("image");r.attr("x",e),r.attr("y",n);const a=(0,i.Jf)(s);r.attr("xlink:href",a)},l=(t,e,n,s)=>{const r=t.append("use");r.attr("x",e),r.attr("y",n);const a=(0,i.Jf)(s);r.attr("xlink:href",`#${a}`)},h=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),y=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})}}]); \ No newline at end of file diff --git a/assets/js/8609.f71bdfb8.js b/assets/js/8609.f71bdfb8.js new file mode 100644 index 00000000..03a0a4fb --- /dev/null +++ b/assets/js/8609.f71bdfb8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[8609],{8609:(t,e,a)=>{a.d(e,{diagram:()=>b});var i=a(6292),n=a(6312),d=a(1176),r=a(697),s=a(6257);a(4353),a(6750),a(2838);const o={},c=(t,e)=>{o[t]=e},g=(t,e)=>{const a=t.append("text").attr("x",2*(0,s.c)().state.padding).attr("y",(0,s.c)().state.textHeight+1.3*(0,s.c)().state.padding).attr("font-size",(0,s.c)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=a.height,n=t.append("text").attr("x",(0,s.c)().state.padding).attr("y",i+.4*(0,s.c)().state.padding+(0,s.c)().state.dividerMargin+(0,s.c)().state.textHeight).attr("class","state-description");let d=!0,r=!0;e.descriptions.forEach((function(t){d||(!function(t,e,a){const i=t.append("tspan").attr("x",2*(0,s.c)().state.padding).text(e);a||i.attr("dy",(0,s.c)().state.textHeight)}(n,t,r),r=!1),d=!1}));const o=t.append("line").attr("x1",(0,s.c)().state.padding).attr("y1",(0,s.c)().state.padding+i+(0,s.c)().state.dividerMargin/2).attr("y2",(0,s.c)().state.padding+i+(0,s.c)().state.dividerMargin/2).attr("class","descr-divider"),c=n.node().getBBox(),g=Math.max(c.width,a.width);return o.attr("x2",g+3*(0,s.c)().state.padding),t.insert("rect",":first-child").attr("x",(0,s.c)().state.padding).attr("y",(0,s.c)().state.padding).attr("width",g+2*(0,s.c)().state.padding).attr("height",c.height+i+2*(0,s.c)().state.padding).attr("rx",(0,s.c)().state.radius),t},p=(t,e,a)=>{const i=(0,s.c)().state.padding,n=2*(0,s.c)().state.padding,d=t.node().getBBox(),r=d.width,o=d.x,c=t.append("text").attr("x",0).attr("y",(0,s.c)().state.titleShift).attr("font-size",(0,s.c)().state.fontSize).attr("class","state-title").text(e.id),g=c.node().getBBox().width+n;let p,h=Math.max(g,r);h===r&&(h+=n);const l=t.node().getBBox();e.doc,p=o-i,g>r&&(p=(r-h)/2+i),Math.abs(o-l.x)<i&&g>r&&(p=o-(g-r)/2);const x=1-(0,s.c)().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",l.height+(0,s.c)().state.textHeight+(0,s.c)().state.titleShift+1).attr("rx","0"),c.attr("x",p+i),g<=r&&c.attr("x",o+(h-n)/2-g/2+i),t.insert("rect",":first-child").attr("x",p).attr("y",(0,s.c)().state.titleShift-(0,s.c)().state.textHeight-(0,s.c)().state.padding).attr("width",h).attr("height",3*(0,s.c)().state.textHeight).attr("rx",(0,s.c)().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",(0,s.c)().state.titleShift-(0,s.c)().state.textHeight-(0,s.c)().state.padding).attr("width",h).attr("height",l.height+3+2*(0,s.c)().state.textHeight).attr("rx",(0,s.c)().state.radius),t},h=(t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",(0,s.c)().state.padding),i=e.append("g"),{textWidth:n,textHeight:d}=((t,e,a,i)=>{let n=0;const d=i.append("text");d.style("text-anchor","start"),d.attr("class","noteText");let r=t.replace(/\r\n/g,"<br/>");r=r.replace(/\n/g,"<br/>");const o=r.split(s.e.lineBreakRegex);let c=1.25*(0,s.c)().state.noteMargin;for(const g of o){const t=g.trim();if(t.length>0){const i=d.append("tspan");i.text(t),0===c&&(c+=i.node().getBBox().height),n+=c,i.attr("x",e+(0,s.c)().state.noteMargin),i.attr("y",a+n+1.25*(0,s.c)().state.noteMargin)}}return{textWidth:d.node().getBBox().width,textHeight:n}})(t,0,0,i);return a.attr("height",d+2*(0,s.c)().state.noteMargin),a.attr("width",n+2*(0,s.c)().state.noteMargin),a},l=function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&(t=>{t.append("circle").attr("class","start-state").attr("r",(0,s.c)().state.sizeUnit).attr("cx",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit).attr("cy",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit)})(n),"end"===e.type&&(t=>{t.append("circle").attr("class","end-state-outer").attr("r",(0,s.c)().state.sizeUnit+(0,s.c)().state.miniPadding).attr("cx",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit+(0,s.c)().state.miniPadding).attr("cy",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit+(0,s.c)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,s.c)().state.sizeUnit).attr("cx",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit+2).attr("cy",(0,s.c)().state.padding+(0,s.c)().state.sizeUnit+2)})(n),"fork"!==e.type&&"join"!==e.type||((t,e)=>{let a=(0,s.c)().state.forkWidth,i=(0,s.c)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,s.c)().state.padding).attr("y",(0,s.c)().state.padding)})(n,e),"note"===e.type&&h(e.note.text,n),"divider"===e.type&&(t=>{t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,s.c)().state.textHeight).attr("class","divider").attr("x2",2*(0,s.c)().state.textHeight).attr("y1",0).attr("y2",0)})(n),"default"===e.type&&0===e.descriptions.length&&((t,e)=>{const a=t.append("text").attr("x",2*(0,s.c)().state.padding).attr("y",(0,s.c)().state.textHeight+2*(0,s.c)().state.padding).attr("font-size",(0,s.c)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();t.insert("rect",":first-child").attr("x",(0,s.c)().state.padding).attr("y",(0,s.c)().state.padding).attr("width",i.width+2*(0,s.c)().state.padding).attr("height",i.height+2*(0,s.c)().state.padding).attr("rx",(0,s.c)().state.radius)})(n,e),"default"===e.type&&e.descriptions.length>0&&g(n,e);const d=n.node().getBBox();return i.width=d.width+2*(0,s.c)().state.padding,i.height=d.height+2*(0,s.c)().state.padding,c(a,i),i};let x=0;let u;const f={},y=(t,e,a,o,c,g,h)=>{const w=new r.T({compound:!0,multigraph:!0});let b,m=!0;for(b=0;b<t.length;b++)if("relation"===t[b].stmt){m=!1;break}a?w.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:u.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):w.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:u.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),w.setDefaultEdgeLabel((function(){return{}})),h.db.extract(t);const B=h.db.getStates(),k=h.db.getRelations(),N=Object.keys(B);for(const i of N){const t=B[i];let n;if(a&&(t.parentId=a),t.doc){let a=e.append("g").attr("id",t.id).attr("class","stateGroup");n=y(t.doc,a,t.id,!o,c,g,h);{a=p(a,t,o);let e=a.node().getBBox();n.width=e.width,n.height=e.height+u.padding/2,f[t.id]={y:u.compositTitleSize}}}else n=l(e,t);if(t.note){const a={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},i=l(e,a);"left of"===t.note.position?(w.setNode(n.id+"-note",i),w.setNode(n.id,n)):(w.setNode(n.id,n),w.setNode(n.id+"-note",i)),w.setParent(n.id,n.id+"-group"),w.setParent(n.id+"-note",n.id+"-group")}else w.setNode(n.id,n)}s.l.debug("Count=",w.nodeCount(),w);let E=0;k.forEach((function(t){var e;E++,s.l.debug("Setting edge",t),w.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*u.fontSizeFactor:1),height:u.labelHeight*s.e.getRows(t.title).length,labelpos:"c"},"id"+E)})),(0,d.Zp)(w),s.l.debug("Graph after layout",w.nodes());const v=e.node();w.nodes().forEach((function(t){if(void 0!==t&&void 0!==w.node(t)){s.l.warn("Node "+t+": "+JSON.stringify(w.node(t))),c.select("#"+v.id+" #"+t).attr("transform","translate("+(w.node(t).x-w.node(t).width/2)+","+(w.node(t).y+(f[t]?f[t].y:0)-w.node(t).height/2)+" )"),c.select("#"+v.id+" #"+t).attr("data-x-shift",w.node(t).x-w.node(t).width/2);g.querySelectorAll("#"+v.id+" #"+t+" .divider").forEach((t=>{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)}))}else s.l.debug("No Node "+t+": "+JSON.stringify(w.node(t)))}));let M=v.getBBox();w.edges().forEach((function(t){void 0!==t&&void 0!==w.edge(t)&&(s.l.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(w.edge(t))),function(t,e,a){e.points=e.points.filter((t=>!Number.isNaN(t.y)));const d=e.points,r=(0,n.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(n.qrM),o=t.append("path").attr("d",r(d)).attr("id","edge"+x).attr("class","transition");let c="";if((0,s.c)().state.arrowMarkerAbsolute&&(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,c=c.replace(/\(/g,"\\("),c=c.replace(/\)/g,"\\)")),o.attr("marker-end","url("+c+"#"+function(t){switch(t){case i.d.relationType.AGGREGATION:return"aggregation";case i.d.relationType.EXTENSION:return"extension";case i.d.relationType.COMPOSITION:return"composition";case i.d.relationType.DEPENDENCY:return"dependency"}}(i.d.relationType.DEPENDENCY)+"End)"),void 0!==a.title){const i=t.append("g").attr("class","stateLabel"),{x:n,y:d}=s.u.calcLabelPosition(e.points),r=s.e.getRows(a.title);let o=0;const c=[];let g=0,p=0;for(let t=0;t<=r.length;t++){const e=i.append("text").attr("text-anchor","middle").text(r[t]).attr("x",n).attr("y",d+o),a=e.node().getBBox();if(g=Math.max(g,a.width),p=Math.min(p,a.x),s.l.info(a.x,n,d+o),0===o){const t=e.node().getBBox();o=t.height,s.l.info("Title height",o,d)}c.push(e)}let h=o*r.length;if(r.length>1){const t=(r.length-1)*o*.5;c.forEach(((e,a)=>e.attr("y",d+a*o-t))),h=o*r.length}const l=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",n-g/2-(0,s.c)().state.padding/2).attr("y",d-h/2-(0,s.c)().state.padding/2-3.5).attr("width",g+(0,s.c)().state.padding).attr("height",h+(0,s.c)().state.padding),s.l.info(l)}x++}(e,w.edge(t),w.edge(t).relation))})),M=v.getBBox();const S={id:a||"root",label:a||"root",width:0,height:0};return S.width=M.width+2*u.padding,S.height=M.height+2*u.padding,s.l.debug("Doc rendered",S,w),S},w={setConf:function(){},draw:function(t,e,a,i){u=(0,s.c)().state;const d=(0,s.c)().securityLevel;let r;"sandbox"===d&&(r=(0,n.Ltv)("#i"+e));const o="sandbox"===d?(0,n.Ltv)(r.nodes()[0].contentDocument.body):(0,n.Ltv)("body"),c="sandbox"===d?r.nodes()[0].contentDocument:document;s.l.debug("Rendering diagram "+t);const g=o.select(`[id='${e}']`);g.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z");const p=i.db.getRootDoc();y(p,g,void 0,!1,o,c,i);const h=u.padding,l=g.node().getBBox(),x=l.width+2*h,f=l.height+2*h,w=1.75*x;(0,s.i)(g,f,w,u.useMaxWidth),g.attr("viewBox",`${l.x-u.padding} ${l.y-u.padding} `+x+" "+f)}},b={parser:i.p,db:i.d,renderer:w,styles:i.s,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,i.d.clear()}}}}]); \ No newline at end of file diff --git a/assets/js/863.1b5358f2.js b/assets/js/863.1b5358f2.js new file mode 100644 index 00000000..f4471235 --- /dev/null +++ b/assets/js/863.1b5358f2.js @@ -0,0 +1,2605 @@ +"use strict"; +exports.id = 863; +exports.ids = [863]; +exports.modules = { + +/***/ 3863: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6257); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var _svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8886); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6750); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4353); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9418); + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 24], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 63], $V6 = [1, 64], $V7 = [1, 65], $V8 = [1, 66], $V9 = [1, 67], $Va = [1, 68], $Vb = [1, 69], $Vc = [1, 29], $Vd = [1, 30], $Ve = [1, 31], $Vf = [1, 32], $Vg = [1, 33], $Vh = [1, 34], $Vi = [1, 35], $Vj = [1, 36], $Vk = [1, 37], $Vl = [1, 38], $Vm = [1, 39], $Vn = [1, 40], $Vo = [1, 41], $Vp = [1, 42], $Vq = [1, 43], $Vr = [1, 44], $Vs = [1, 45], $Vt = [1, 46], $Vu = [1, 47], $Vv = [1, 48], $Vw = [1, 50], $Vx = [1, 51], $Vy = [1, 52], $Vz = [1, 53], $VA = [1, 54], $VB = [1, 55], $VC = [1, 56], $VD = [1, 57], $VE = [1, 58], $VF = [1, 59], $VG = [1, 60], $VH = [14, 42], $VI = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VJ = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VK = [1, 82], $VL = [1, 83], $VM = [1, 84], $VN = [1, 85], $VO = [12, 14, 42], $VP = [12, 14, 33, 42], $VQ = [12, 14, 33, 42, 76, 77, 79, 80], $VR = [12, 33], $VS = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "direction": 5, "direction_tb": 6, "direction_bt": 7, "direction_rl": 8, "direction_lr": 9, "graphConfig": 10, "C4_CONTEXT": 11, "NEWLINE": 12, "statements": 13, "EOF": 14, "C4_CONTAINER": 15, "C4_COMPONENT": 16, "C4_DYNAMIC": 17, "C4_DEPLOYMENT": 18, "otherStatements": 19, "diagramStatements": 20, "otherStatement": 21, "title": 22, "accDescription": 23, "acc_title": 24, "acc_title_value": 25, "acc_descr": 26, "acc_descr_value": 27, "acc_descr_multiline_value": 28, "boundaryStatement": 29, "boundaryStartStatement": 30, "boundaryStopStatement": 31, "boundaryStart": 32, "LBRACE": 33, "ENTERPRISE_BOUNDARY": 34, "attributes": 35, "SYSTEM_BOUNDARY": 36, "BOUNDARY": 37, "CONTAINER_BOUNDARY": 38, "NODE": 39, "NODE_L": 40, "NODE_R": 41, "RBRACE": 42, "diagramStatement": 43, "PERSON": 44, "PERSON_EXT": 45, "SYSTEM": 46, "SYSTEM_DB": 47, "SYSTEM_QUEUE": 48, "SYSTEM_EXT": 49, "SYSTEM_EXT_DB": 50, "SYSTEM_EXT_QUEUE": 51, "CONTAINER": 52, "CONTAINER_DB": 53, "CONTAINER_QUEUE": 54, "CONTAINER_EXT": 55, "CONTAINER_EXT_DB": 56, "CONTAINER_EXT_QUEUE": 57, "COMPONENT": 58, "COMPONENT_DB": 59, "COMPONENT_QUEUE": 60, "COMPONENT_EXT": 61, "COMPONENT_EXT_DB": 62, "COMPONENT_EXT_QUEUE": 63, "REL": 64, "BIREL": 65, "REL_U": 66, "REL_D": 67, "REL_L": 68, "REL_R": 69, "REL_B": 70, "REL_INDEX": 71, "UPDATE_EL_STYLE": 72, "UPDATE_REL_STYLE": 73, "UPDATE_LAYOUT_CONFIG": 74, "attribute": 75, "STR": 76, "STR_KEY": 77, "STR_VALUE": 78, "ATTRIBUTE": 79, "ATTRIBUTE_EMPTY": 80, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 6: "direction_tb", 7: "direction_bt", 8: "direction_rl", 9: "direction_lr", 11: "C4_CONTEXT", 12: "NEWLINE", 14: "EOF", 15: "C4_CONTAINER", 16: "C4_COMPONENT", 17: "C4_DYNAMIC", 18: "C4_DEPLOYMENT", 22: "title", 23: "accDescription", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "LBRACE", 34: "ENTERPRISE_BOUNDARY", 36: "SYSTEM_BOUNDARY", 37: "BOUNDARY", 38: "CONTAINER_BOUNDARY", 39: "NODE", 40: "NODE_L", 41: "NODE_R", 42: "RBRACE", 44: "PERSON", 45: "PERSON_EXT", 46: "SYSTEM", 47: "SYSTEM_DB", 48: "SYSTEM_QUEUE", 49: "SYSTEM_EXT", 50: "SYSTEM_EXT_DB", 51: "SYSTEM_EXT_QUEUE", 52: "CONTAINER", 53: "CONTAINER_DB", 54: "CONTAINER_QUEUE", 55: "CONTAINER_EXT", 56: "CONTAINER_EXT_DB", 57: "CONTAINER_EXT_QUEUE", 58: "COMPONENT", 59: "COMPONENT_DB", 60: "COMPONENT_QUEUE", 61: "COMPONENT_EXT", 62: "COMPONENT_EXT_DB", 63: "COMPONENT_EXT_QUEUE", 64: "REL", 65: "BIREL", 66: "REL_U", 67: "REL_D", 68: "REL_L", 69: "REL_R", 70: "REL_B", 71: "REL_INDEX", 72: "UPDATE_EL_STYLE", 73: "UPDATE_REL_STYLE", 74: "UPDATE_LAYOUT_CONFIG", 76: "STR", 77: "STR_KEY", 78: "STR_VALUE", 79: "ATTRIBUTE", 80: "ATTRIBUTE_EMPTY" }, + productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 3: + yy.setDirection("TB"); + break; + case 4: + yy.setDirection("BT"); + break; + case 5: + yy.setDirection("RL"); + break; + case 6: + yy.setDirection("LR"); + break; + case 8: + case 9: + case 10: + case 11: + case 12: + yy.setC4Type($$[$0 - 3]); + break; + case 19: + yy.setTitle($$[$0].substring(6)); + this.$ = $$[$0].substring(6); + break; + case 20: + yy.setAccDescription($$[$0].substring(15)); + this.$ = $$[$0].substring(15); + break; + case 21: + this.$ = $$[$0].trim(); + yy.setTitle(this.$); + break; + case 22: + case 23: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 28: + case 29: + $$[$0].splice(2, 0, "ENTERPRISE"); + yy.addPersonOrSystemBoundary(...$$[$0]); + this.$ = $$[$0]; + break; + case 30: + yy.addPersonOrSystemBoundary(...$$[$0]); + this.$ = $$[$0]; + break; + case 31: + $$[$0].splice(2, 0, "CONTAINER"); + yy.addContainerBoundary(...$$[$0]); + this.$ = $$[$0]; + break; + case 32: + yy.addDeploymentNode("node", ...$$[$0]); + this.$ = $$[$0]; + break; + case 33: + yy.addDeploymentNode("nodeL", ...$$[$0]); + this.$ = $$[$0]; + break; + case 34: + yy.addDeploymentNode("nodeR", ...$$[$0]); + this.$ = $$[$0]; + break; + case 35: + yy.popBoundaryParseStack(); + break; + case 39: + yy.addPersonOrSystem("person", ...$$[$0]); + this.$ = $$[$0]; + break; + case 40: + yy.addPersonOrSystem("external_person", ...$$[$0]); + this.$ = $$[$0]; + break; + case 41: + yy.addPersonOrSystem("system", ...$$[$0]); + this.$ = $$[$0]; + break; + case 42: + yy.addPersonOrSystem("system_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 43: + yy.addPersonOrSystem("system_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 44: + yy.addPersonOrSystem("external_system", ...$$[$0]); + this.$ = $$[$0]; + break; + case 45: + yy.addPersonOrSystem("external_system_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 46: + yy.addPersonOrSystem("external_system_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 47: + yy.addContainer("container", ...$$[$0]); + this.$ = $$[$0]; + break; + case 48: + yy.addContainer("container_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 49: + yy.addContainer("container_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 50: + yy.addContainer("external_container", ...$$[$0]); + this.$ = $$[$0]; + break; + case 51: + yy.addContainer("external_container_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 52: + yy.addContainer("external_container_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 53: + yy.addComponent("component", ...$$[$0]); + this.$ = $$[$0]; + break; + case 54: + yy.addComponent("component_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 55: + yy.addComponent("component_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 56: + yy.addComponent("external_component", ...$$[$0]); + this.$ = $$[$0]; + break; + case 57: + yy.addComponent("external_component_db", ...$$[$0]); + this.$ = $$[$0]; + break; + case 58: + yy.addComponent("external_component_queue", ...$$[$0]); + this.$ = $$[$0]; + break; + case 60: + yy.addRel("rel", ...$$[$0]); + this.$ = $$[$0]; + break; + case 61: + yy.addRel("birel", ...$$[$0]); + this.$ = $$[$0]; + break; + case 62: + yy.addRel("rel_u", ...$$[$0]); + this.$ = $$[$0]; + break; + case 63: + yy.addRel("rel_d", ...$$[$0]); + this.$ = $$[$0]; + break; + case 64: + yy.addRel("rel_l", ...$$[$0]); + this.$ = $$[$0]; + break; + case 65: + yy.addRel("rel_r", ...$$[$0]); + this.$ = $$[$0]; + break; + case 66: + yy.addRel("rel_b", ...$$[$0]); + this.$ = $$[$0]; + break; + case 67: + $$[$0].splice(0, 1); + yy.addRel("rel", ...$$[$0]); + this.$ = $$[$0]; + break; + case 68: + yy.updateElStyle("update_el_style", ...$$[$0]); + this.$ = $$[$0]; + break; + case 69: + yy.updateRelStyle("update_rel_style", ...$$[$0]); + this.$ = $$[$0]; + break; + case 70: + yy.updateLayoutConfig("update_layout_config", ...$$[$0]); + this.$ = $$[$0]; + break; + case 71: + this.$ = [$$[$0]]; + break; + case 72: + $$[$0].unshift($$[$0 - 1]); + this.$ = $$[$0]; + break; + case 73: + case 75: + this.$ = $$[$0].trim(); + break; + case 74: + let kv = {}; + kv[$$[$0 - 1].trim()] = $$[$0].trim(); + this.$ = kv; + break; + case 76: + this.$ = ""; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 14: [1, 74] }, o($VH, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VH, [2, 14]), o($VI, [2, 16], { 12: [1, 76] }), o($VH, [2, 36], { 12: [1, 77] }), o($VJ, [2, 19]), o($VJ, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, o($VJ, [2, 23]), { 35: 80, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 86, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 87, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 88, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 89, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 90, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 91, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 92, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 93, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 94, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 95, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 96, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 97, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 98, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 99, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 100, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 101, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 102, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 103, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 104, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, o($VO, [2, 59]), { 35: 105, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 106, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 107, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 108, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 109, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 110, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 111, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 112, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 113, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 114, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 115, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 120, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 121, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 122, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 123, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 124, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 125, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, o($VH, [2, 15]), o($VI, [2, 17], { 21: 22, 19: 130, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4 }), o($VH, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VJ, [2, 21]), o($VJ, [2, 22]), o($VO, [2, 39]), o($VP, [2, 71], { 75: 81, 35: 132, 76: $VK, 77: $VL, 79: $VM, 80: $VN }), o($VQ, [2, 73]), { 78: [1, 133] }, o($VQ, [2, 75]), o($VQ, [2, 76]), o($VO, [2, 40]), o($VO, [2, 41]), o($VO, [2, 42]), o($VO, [2, 43]), o($VO, [2, 44]), o($VO, [2, 45]), o($VO, [2, 46]), o($VO, [2, 47]), o($VO, [2, 48]), o($VO, [2, 49]), o($VO, [2, 50]), o($VO, [2, 51]), o($VO, [2, 52]), o($VO, [2, 53]), o($VO, [2, 54]), o($VO, [2, 55]), o($VO, [2, 56]), o($VO, [2, 57]), o($VO, [2, 58]), o($VO, [2, 60]), o($VO, [2, 61]), o($VO, [2, 62]), o($VO, [2, 63]), o($VO, [2, 64]), o($VO, [2, 65]), o($VO, [2, 66]), o($VO, [2, 67]), o($VO, [2, 68]), o($VO, [2, 69]), o($VO, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, o($VR, [2, 28]), o($VR, [2, 29]), o($VR, [2, 30]), o($VR, [2, 31]), o($VR, [2, 32]), o($VR, [2, 33]), o($VR, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, o($VI, [2, 18]), o($VH, [2, 38]), o($VP, [2, 72]), o($VQ, [2, 74]), o($VO, [2, 24]), o($VO, [2, 35]), o($VS, [2, 25]), o($VS, [2, 26], { 12: [1, 138] }), o($VS, [2, 27])], + defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c2 = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c2 + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 6; + case 1: + return 7; + case 2: + return 8; + case 3: + return 9; + case 4: + return 22; + case 5: + return 23; + case 6: + this.begin("acc_title"); + return 24; + case 7: + this.popState(); + return "acc_title_value"; + case 8: + this.begin("acc_descr"); + return 26; + case 9: + this.popState(); + return "acc_descr_value"; + case 10: + this.begin("acc_descr_multiline"); + break; + case 11: + this.popState(); + break; + case 12: + return "acc_descr_multiline_value"; + case 13: + break; + case 14: + c; + break; + case 15: + return 12; + case 16: + break; + case 17: + return 11; + case 18: + return 15; + case 19: + return 16; + case 20: + return 17; + case 21: + return 18; + case 22: + this.begin("person_ext"); + return 45; + case 23: + this.begin("person"); + return 44; + case 24: + this.begin("system_ext_queue"); + return 51; + case 25: + this.begin("system_ext_db"); + return 50; + case 26: + this.begin("system_ext"); + return 49; + case 27: + this.begin("system_queue"); + return 48; + case 28: + this.begin("system_db"); + return 47; + case 29: + this.begin("system"); + return 46; + case 30: + this.begin("boundary"); + return 37; + case 31: + this.begin("enterprise_boundary"); + return 34; + case 32: + this.begin("system_boundary"); + return 36; + case 33: + this.begin("container_ext_queue"); + return 57; + case 34: + this.begin("container_ext_db"); + return 56; + case 35: + this.begin("container_ext"); + return 55; + case 36: + this.begin("container_queue"); + return 54; + case 37: + this.begin("container_db"); + return 53; + case 38: + this.begin("container"); + return 52; + case 39: + this.begin("container_boundary"); + return 38; + case 40: + this.begin("component_ext_queue"); + return 63; + case 41: + this.begin("component_ext_db"); + return 62; + case 42: + this.begin("component_ext"); + return 61; + case 43: + this.begin("component_queue"); + return 60; + case 44: + this.begin("component_db"); + return 59; + case 45: + this.begin("component"); + return 58; + case 46: + this.begin("node"); + return 39; + case 47: + this.begin("node"); + return 39; + case 48: + this.begin("node_l"); + return 40; + case 49: + this.begin("node_r"); + return 41; + case 50: + this.begin("rel"); + return 64; + case 51: + this.begin("birel"); + return 65; + case 52: + this.begin("rel_u"); + return 66; + case 53: + this.begin("rel_u"); + return 66; + case 54: + this.begin("rel_d"); + return 67; + case 55: + this.begin("rel_d"); + return 67; + case 56: + this.begin("rel_l"); + return 68; + case 57: + this.begin("rel_l"); + return 68; + case 58: + this.begin("rel_r"); + return 69; + case 59: + this.begin("rel_r"); + return 69; + case 60: + this.begin("rel_b"); + return 70; + case 61: + this.begin("rel_index"); + return 71; + case 62: + this.begin("update_el_style"); + return 72; + case 63: + this.begin("update_rel_style"); + return 73; + case 64: + this.begin("update_layout_config"); + return 74; + case 65: + return "EOF_IN_STRUCT"; + case 66: + this.begin("attribute"); + return "ATTRIBUTE_EMPTY"; + case 67: + this.begin("attribute"); + break; + case 68: + this.popState(); + this.popState(); + break; + case 69: + return 80; + case 70: + break; + case 71: + return 80; + case 72: + this.begin("string"); + break; + case 73: + this.popState(); + break; + case 74: + return "STR"; + case 75: + this.begin("string_kv"); + break; + case 76: + this.begin("string_kv_key"); + return "STR_KEY"; + case 77: + this.popState(); + this.begin("string_kv_value"); + break; + case 78: + return "STR_VALUE"; + case 79: + this.popState(); + this.popState(); + break; + case 80: + return "STR"; + case 81: + return "LBRACE"; + case 82: + return "RBRACE"; + case 83: + return "SPACE"; + case 84: + return "EOL"; + case 85: + return 14; + } + }, + rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/], + conditions: { "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "string_kv_value": { "rules": [78, 79], "inclusive": false }, "string_kv_key": { "rules": [77], "inclusive": false }, "string_kv": { "rules": [76], "inclusive": false }, "string": { "rules": [73, 74], "inclusive": false }, "attribute": { "rules": [68, 69, 70, 71, 72, 75, 80], "inclusive": false }, "update_layout_config": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_rel_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_el_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_b": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_d": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_u": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_bi": { "rules": [], "inclusive": false }, "rel": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "node": { "rules": [65, 66, 67, 68], "inclusive": false }, "index": { "rules": [], "inclusive": false }, "rel_index": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext_queue": { "rules": [], "inclusive": false }, "component_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container": { "rules": [65, 66, 67, 68], "inclusive": false }, "birel": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "enterprise_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system": { "rules": [65, 66, 67, 68], "inclusive": false }, "person_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "person": { "rules": [65, 66, 67, 68], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 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, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let c4ShapeArray = []; +let boundaryParseStack = [""]; +let currentBoundaryParse = "global"; +let parentBoundaryParse = ""; +let boundaries = [ + { + alias: "global", + label: { text: "global" }, + type: { text: "global" }, + tags: null, + link: null, + parentBoundary: "" + } +]; +let rels = []; +let title = ""; +let wrapEnabled = false; +let c4ShapeInRow$1 = 4; +let c4BoundaryInRow$1 = 2; +var c4Type; +const getC4Type = function() { + return c4Type; +}; +const setC4Type = function(c4TypeParam) { + let sanitizedText = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.d)(c4TypeParam, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + c4Type = sanitizedText; +}; +const addRel = function(type, from, to, label, techn, descr, sprite, tags, link) { + if (type === void 0 || type === null || from === void 0 || from === null || to === void 0 || to === null || label === void 0 || label === null) { + return; + } + let rel = {}; + const old = rels.find((rel2) => rel2.from === from && rel2.to === to); + if (old) { + rel = old; + } else { + rels.push(rel); + } + rel.type = type; + rel.from = from; + rel.to = to; + rel.label = { text: label }; + if (techn === void 0 || techn === null) { + rel.techn = { text: "" }; + } else { + if (typeof techn === "object") { + let [key, value] = Object.entries(techn)[0]; + rel[key] = { text: value }; + } else { + rel.techn = { text: techn }; + } + } + if (descr === void 0 || descr === null) { + rel.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + rel[key] = { text: value }; + } else { + rel.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + rel[key] = value; + } else { + rel.sprite = sprite; + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + rel[key] = value; + } else { + rel.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + rel[key] = value; + } else { + rel.link = link; + } + rel.wrap = autoWrap(); +}; +const addPersonOrSystem = function(typeC4Shape, alias, label, descr, sprite, tags, link) { + if (alias === null || label === null) { + return; + } + let personOrSystem = {}; + const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias); + if (old && alias === old.alias) { + personOrSystem = old; + } else { + personOrSystem.alias = alias; + c4ShapeArray.push(personOrSystem); + } + if (label === void 0 || label === null) { + personOrSystem.label = { text: "" }; + } else { + personOrSystem.label = { text: label }; + } + if (descr === void 0 || descr === null) { + personOrSystem.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + personOrSystem[key] = { text: value }; + } else { + personOrSystem.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + personOrSystem[key] = value; + } else { + personOrSystem.sprite = sprite; + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + personOrSystem[key] = value; + } else { + personOrSystem.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + personOrSystem[key] = value; + } else { + personOrSystem.link = link; + } + personOrSystem.typeC4Shape = { text: typeC4Shape }; + personOrSystem.parentBoundary = currentBoundaryParse; + personOrSystem.wrap = autoWrap(); +}; +const addContainer = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) { + if (alias === null || label === null) { + return; + } + let container = {}; + const old = c4ShapeArray.find((container2) => container2.alias === alias); + if (old && alias === old.alias) { + container = old; + } else { + container.alias = alias; + c4ShapeArray.push(container); + } + if (label === void 0 || label === null) { + container.label = { text: "" }; + } else { + container.label = { text: label }; + } + if (techn === void 0 || techn === null) { + container.techn = { text: "" }; + } else { + if (typeof techn === "object") { + let [key, value] = Object.entries(techn)[0]; + container[key] = { text: value }; + } else { + container.techn = { text: techn }; + } + } + if (descr === void 0 || descr === null) { + container.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + container[key] = { text: value }; + } else { + container.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + container[key] = value; + } else { + container.sprite = sprite; + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + container[key] = value; + } else { + container.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + container[key] = value; + } else { + container.link = link; + } + container.wrap = autoWrap(); + container.typeC4Shape = { text: typeC4Shape }; + container.parentBoundary = currentBoundaryParse; +}; +const addComponent = function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) { + if (alias === null || label === null) { + return; + } + let component = {}; + const old = c4ShapeArray.find((component2) => component2.alias === alias); + if (old && alias === old.alias) { + component = old; + } else { + component.alias = alias; + c4ShapeArray.push(component); + } + if (label === void 0 || label === null) { + component.label = { text: "" }; + } else { + component.label = { text: label }; + } + if (techn === void 0 || techn === null) { + component.techn = { text: "" }; + } else { + if (typeof techn === "object") { + let [key, value] = Object.entries(techn)[0]; + component[key] = { text: value }; + } else { + component.techn = { text: techn }; + } + } + if (descr === void 0 || descr === null) { + component.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + component[key] = { text: value }; + } else { + component.descr = { text: descr }; + } + } + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + component[key] = value; + } else { + component.sprite = sprite; + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + component[key] = value; + } else { + component.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + component[key] = value; + } else { + component.link = link; + } + component.wrap = autoWrap(); + component.typeC4Shape = { text: typeC4Shape }; + component.parentBoundary = currentBoundaryParse; +}; +const addPersonOrSystemBoundary = function(alias, label, type, tags, link) { + if (alias === null || label === null) { + return; + } + let boundary = {}; + const old = boundaries.find((boundary2) => boundary2.alias === alias); + if (old && alias === old.alias) { + boundary = old; + } else { + boundary.alias = alias; + boundaries.push(boundary); + } + if (label === void 0 || label === null) { + boundary.label = { text: "" }; + } else { + boundary.label = { text: label }; + } + if (type === void 0 || type === null) { + boundary.type = { text: "system" }; + } else { + if (typeof type === "object") { + let [key, value] = Object.entries(type)[0]; + boundary[key] = { text: value }; + } else { + boundary.type = { text: type }; + } + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + boundary[key] = value; + } else { + boundary.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + boundary[key] = value; + } else { + boundary.link = link; + } + boundary.parentBoundary = currentBoundaryParse; + boundary.wrap = autoWrap(); + parentBoundaryParse = currentBoundaryParse; + currentBoundaryParse = alias; + boundaryParseStack.push(parentBoundaryParse); +}; +const addContainerBoundary = function(alias, label, type, tags, link) { + if (alias === null || label === null) { + return; + } + let boundary = {}; + const old = boundaries.find((boundary2) => boundary2.alias === alias); + if (old && alias === old.alias) { + boundary = old; + } else { + boundary.alias = alias; + boundaries.push(boundary); + } + if (label === void 0 || label === null) { + boundary.label = { text: "" }; + } else { + boundary.label = { text: label }; + } + if (type === void 0 || type === null) { + boundary.type = { text: "container" }; + } else { + if (typeof type === "object") { + let [key, value] = Object.entries(type)[0]; + boundary[key] = { text: value }; + } else { + boundary.type = { text: type }; + } + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + boundary[key] = value; + } else { + boundary.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + boundary[key] = value; + } else { + boundary.link = link; + } + boundary.parentBoundary = currentBoundaryParse; + boundary.wrap = autoWrap(); + parentBoundaryParse = currentBoundaryParse; + currentBoundaryParse = alias; + boundaryParseStack.push(parentBoundaryParse); +}; +const addDeploymentNode = function(nodeType, alias, label, type, descr, sprite, tags, link) { + if (alias === null || label === null) { + return; + } + let boundary = {}; + const old = boundaries.find((boundary2) => boundary2.alias === alias); + if (old && alias === old.alias) { + boundary = old; + } else { + boundary.alias = alias; + boundaries.push(boundary); + } + if (label === void 0 || label === null) { + boundary.label = { text: "" }; + } else { + boundary.label = { text: label }; + } + if (type === void 0 || type === null) { + boundary.type = { text: "node" }; + } else { + if (typeof type === "object") { + let [key, value] = Object.entries(type)[0]; + boundary[key] = { text: value }; + } else { + boundary.type = { text: type }; + } + } + if (descr === void 0 || descr === null) { + boundary.descr = { text: "" }; + } else { + if (typeof descr === "object") { + let [key, value] = Object.entries(descr)[0]; + boundary[key] = { text: value }; + } else { + boundary.descr = { text: descr }; + } + } + if (typeof tags === "object") { + let [key, value] = Object.entries(tags)[0]; + boundary[key] = value; + } else { + boundary.tags = tags; + } + if (typeof link === "object") { + let [key, value] = Object.entries(link)[0]; + boundary[key] = value; + } else { + boundary.link = link; + } + boundary.nodeType = nodeType; + boundary.parentBoundary = currentBoundaryParse; + boundary.wrap = autoWrap(); + parentBoundaryParse = currentBoundaryParse; + currentBoundaryParse = alias; + boundaryParseStack.push(parentBoundaryParse); +}; +const popBoundaryParseStack = function() { + currentBoundaryParse = parentBoundaryParse; + boundaryParseStack.pop(); + parentBoundaryParse = boundaryParseStack.pop(); + boundaryParseStack.push(parentBoundaryParse); +}; +const updateElStyle = function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) { + let old = c4ShapeArray.find((element) => element.alias === elementName); + if (old === void 0) { + old = boundaries.find((element) => element.alias === elementName); + if (old === void 0) { + return; + } + } + if (bgColor !== void 0 && bgColor !== null) { + if (typeof bgColor === "object") { + let [key, value] = Object.entries(bgColor)[0]; + old[key] = value; + } else { + old.bgColor = bgColor; + } + } + if (fontColor !== void 0 && fontColor !== null) { + if (typeof fontColor === "object") { + let [key, value] = Object.entries(fontColor)[0]; + old[key] = value; + } else { + old.fontColor = fontColor; + } + } + if (borderColor !== void 0 && borderColor !== null) { + if (typeof borderColor === "object") { + let [key, value] = Object.entries(borderColor)[0]; + old[key] = value; + } else { + old.borderColor = borderColor; + } + } + if (shadowing !== void 0 && shadowing !== null) { + if (typeof shadowing === "object") { + let [key, value] = Object.entries(shadowing)[0]; + old[key] = value; + } else { + old.shadowing = shadowing; + } + } + if (shape !== void 0 && shape !== null) { + if (typeof shape === "object") { + let [key, value] = Object.entries(shape)[0]; + old[key] = value; + } else { + old.shape = shape; + } + } + if (sprite !== void 0 && sprite !== null) { + if (typeof sprite === "object") { + let [key, value] = Object.entries(sprite)[0]; + old[key] = value; + } else { + old.sprite = sprite; + } + } + if (techn !== void 0 && techn !== null) { + if (typeof techn === "object") { + let [key, value] = Object.entries(techn)[0]; + old[key] = value; + } else { + old.techn = techn; + } + } + if (legendText !== void 0 && legendText !== null) { + if (typeof legendText === "object") { + let [key, value] = Object.entries(legendText)[0]; + old[key] = value; + } else { + old.legendText = legendText; + } + } + if (legendSprite !== void 0 && legendSprite !== null) { + if (typeof legendSprite === "object") { + let [key, value] = Object.entries(legendSprite)[0]; + old[key] = value; + } else { + old.legendSprite = legendSprite; + } + } +}; +const updateRelStyle = function(typeC4Shape, from, to, textColor, lineColor, offsetX, offsetY) { + const old = rels.find((rel) => rel.from === from && rel.to === to); + if (old === void 0) { + return; + } + if (textColor !== void 0 && textColor !== null) { + if (typeof textColor === "object") { + let [key, value] = Object.entries(textColor)[0]; + old[key] = value; + } else { + old.textColor = textColor; + } + } + if (lineColor !== void 0 && lineColor !== null) { + if (typeof lineColor === "object") { + let [key, value] = Object.entries(lineColor)[0]; + old[key] = value; + } else { + old.lineColor = lineColor; + } + } + if (offsetX !== void 0 && offsetX !== null) { + if (typeof offsetX === "object") { + let [key, value] = Object.entries(offsetX)[0]; + old[key] = parseInt(value); + } else { + old.offsetX = parseInt(offsetX); + } + } + if (offsetY !== void 0 && offsetY !== null) { + if (typeof offsetY === "object") { + let [key, value] = Object.entries(offsetY)[0]; + old[key] = parseInt(value); + } else { + old.offsetY = parseInt(offsetY); + } + } +}; +const updateLayoutConfig = function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) { + let c4ShapeInRowValue = c4ShapeInRow$1; + let c4BoundaryInRowValue = c4BoundaryInRow$1; + if (typeof c4ShapeInRowParam === "object") { + const value = Object.values(c4ShapeInRowParam)[0]; + c4ShapeInRowValue = parseInt(value); + } else { + c4ShapeInRowValue = parseInt(c4ShapeInRowParam); + } + if (typeof c4BoundaryInRowParam === "object") { + const value = Object.values(c4BoundaryInRowParam)[0]; + c4BoundaryInRowValue = parseInt(value); + } else { + c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam); + } + if (c4ShapeInRowValue >= 1) { + c4ShapeInRow$1 = c4ShapeInRowValue; + } + if (c4BoundaryInRowValue >= 1) { + c4BoundaryInRow$1 = c4BoundaryInRowValue; + } +}; +const getC4ShapeInRow = function() { + return c4ShapeInRow$1; +}; +const getC4BoundaryInRow = function() { + return c4BoundaryInRow$1; +}; +const getCurrentBoundaryParse = function() { + return currentBoundaryParse; +}; +const getParentBoundaryParse = function() { + return parentBoundaryParse; +}; +const getC4ShapeArray = function(parentBoundary) { + if (parentBoundary === void 0 || parentBoundary === null) { + return c4ShapeArray; + } else { + return c4ShapeArray.filter((personOrSystem) => { + return personOrSystem.parentBoundary === parentBoundary; + }); + } +}; +const getC4Shape = function(alias) { + return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias); +}; +const getC4ShapeKeys = function(parentBoundary) { + return Object.keys(getC4ShapeArray(parentBoundary)); +}; +const getBoundaries = function(parentBoundary) { + if (parentBoundary === void 0 || parentBoundary === null) { + return boundaries; + } else { + return boundaries.filter((boundary) => boundary.parentBoundary === parentBoundary); + } +}; +const getBoundarys = getBoundaries; +const getRels = function() { + return rels; +}; +const getTitle = function() { + return title; +}; +const setWrap = function(wrapSetting) { + wrapEnabled = wrapSetting; +}; +const autoWrap = function() { + return wrapEnabled; +}; +const clear = function() { + c4ShapeArray = []; + boundaries = [ + { + alias: "global", + label: { text: "global" }, + type: { text: "global" }, + tags: null, + link: null, + parentBoundary: "" + } + ]; + parentBoundaryParse = ""; + currentBoundaryParse = "global"; + boundaryParseStack = [""]; + rels = []; + boundaryParseStack = [""]; + title = ""; + wrapEnabled = false; + c4ShapeInRow$1 = 4; + c4BoundaryInRow$1 = 2; +}; +const LINETYPE = { + SOLID: 0, + DOTTED: 1, + NOTE: 2, + SOLID_CROSS: 3, + DOTTED_CROSS: 4, + SOLID_OPEN: 5, + DOTTED_OPEN: 6, + LOOP_START: 10, + LOOP_END: 11, + ALT_START: 12, + ALT_ELSE: 13, + ALT_END: 14, + OPT_START: 15, + OPT_END: 16, + ACTIVE_START: 17, + ACTIVE_END: 18, + PAR_START: 19, + PAR_AND: 20, + PAR_END: 21, + RECT_START: 22, + RECT_END: 23, + SOLID_POINT: 24, + DOTTED_POINT: 25 +}; +const ARROWTYPE = { + FILLED: 0, + OPEN: 1 +}; +const PLACEMENT = { + LEFTOF: 0, + RIGHTOF: 1, + OVER: 2 +}; +const setTitle = function(txt) { + let sanitizedText = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.d)(txt, (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)()); + title = sanitizedText; +}; +const db = { + addPersonOrSystem, + addPersonOrSystemBoundary, + addContainer, + addContainerBoundary, + addComponent, + addDeploymentNode, + popBoundaryParseStack, + addRel, + updateElStyle, + updateRelStyle, + updateLayoutConfig, + autoWrap, + setWrap, + getC4ShapeArray, + getC4Shape, + getC4ShapeKeys, + getBoundaries, + getBoundarys, + getCurrentBoundaryParse, + getParentBoundaryParse, + getRels, + getTitle, + getC4Type, + getC4ShapeInRow, + getC4BoundaryInRow, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.g, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.a, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.b, + getConfig: () => (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().c4, + clear, + LINETYPE, + ARROWTYPE, + PLACEMENT, + setTitle, + setC4Type + // apply, +}; +const drawRect = function(elem, rectData) { + return (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.d)(elem, rectData); +}; +const drawImage = function(elem, width, height, x, y, link) { + const imageElem = elem.append("image"); + imageElem.attr("width", width); + imageElem.attr("height", height); + imageElem.attr("x", x); + imageElem.attr("y", y); + let sanitizedLink = link.startsWith("data:image/png;base64") ? link : (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .Jf)(link); + imageElem.attr("xlink:href", sanitizedLink); +}; +const drawRels$1 = (elem, rels2, conf2) => { + const relsElem = elem.append("g"); + let i = 0; + for (let rel of rels2) { + let textColor = rel.textColor ? rel.textColor : "#444444"; + let strokeColor = rel.lineColor ? rel.lineColor : "#444444"; + let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0; + let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0; + let url = ""; + if (i === 0) { + let line = relsElem.append("line"); + line.attr("x1", rel.startPoint.x); + line.attr("y1", rel.startPoint.y); + line.attr("x2", rel.endPoint.x); + line.attr("y2", rel.endPoint.y); + line.attr("stroke-width", "1"); + line.attr("stroke", strokeColor); + line.style("fill", "none"); + if (rel.type !== "rel_b") { + line.attr("marker-end", "url(" + url + "#arrowhead)"); + } + if (rel.type === "birel" || rel.type === "rel_b") { + line.attr("marker-start", "url(" + url + "#arrowend)"); + } + i = -1; + } else { + let line = relsElem.append("path"); + line.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr( + "d", + "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll( + "controlx", + rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4 + ).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y) + ); + if (rel.type !== "rel_b") { + line.attr("marker-end", "url(" + url + "#arrowhead)"); + } + if (rel.type === "birel" || rel.type === "rel_b") { + line.attr("marker-start", "url(" + url + "#arrowend)"); + } + } + let messageConf = conf2.messageFont(); + _drawTextCandidateFunc(conf2)( + rel.label.text, + relsElem, + Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX, + Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY, + rel.label.width, + rel.label.height, + { fill: textColor }, + messageConf + ); + if (rel.techn && rel.techn.text !== "") { + messageConf = conf2.messageFont(); + _drawTextCandidateFunc(conf2)( + "[" + rel.techn.text + "]", + relsElem, + Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX, + Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY, + Math.max(rel.label.width, rel.techn.width), + rel.techn.height, + { fill: textColor, "font-style": "italic" }, + messageConf + ); + } + } +}; +const drawBoundary$1 = function(elem, boundary, conf2) { + const boundaryElem = elem.append("g"); + let fillColor = boundary.bgColor ? boundary.bgColor : "none"; + let strokeColor = boundary.borderColor ? boundary.borderColor : "#444444"; + let fontColor = boundary.fontColor ? boundary.fontColor : "black"; + let attrsValue = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" }; + if (boundary.nodeType) { + attrsValue = { "stroke-width": 1 }; + } + let rectData = { + x: boundary.x, + y: boundary.y, + fill: fillColor, + stroke: strokeColor, + width: boundary.width, + height: boundary.height, + rx: 2.5, + ry: 2.5, + attrs: attrsValue + }; + drawRect(boundaryElem, rectData); + let boundaryConf = conf2.boundaryFont(); + boundaryConf.fontWeight = "bold"; + boundaryConf.fontSize = boundaryConf.fontSize + 2; + boundaryConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + boundary.label.text, + boundaryElem, + boundary.x, + boundary.y + boundary.label.Y, + boundary.width, + boundary.height, + { fill: "#444444" }, + boundaryConf + ); + if (boundary.type && boundary.type.text !== "") { + boundaryConf = conf2.boundaryFont(); + boundaryConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + boundary.type.text, + boundaryElem, + boundary.x, + boundary.y + boundary.type.Y, + boundary.width, + boundary.height, + { fill: "#444444" }, + boundaryConf + ); + } + if (boundary.descr && boundary.descr.text !== "") { + boundaryConf = conf2.boundaryFont(); + boundaryConf.fontSize = boundaryConf.fontSize - 2; + boundaryConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + boundary.descr.text, + boundaryElem, + boundary.x, + boundary.y + boundary.descr.Y, + boundary.width, + boundary.height, + { fill: "#444444" }, + boundaryConf + ); + } +}; +const drawC4Shape = function(elem, c4Shape, conf2) { + var _a; + let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf2[c4Shape.typeC4Shape.text + "_bg_color"]; + let strokeColor = c4Shape.borderColor ? c4Shape.borderColor : conf2[c4Shape.typeC4Shape.text + "_border_color"]; + let fontColor = c4Shape.fontColor ? c4Shape.fontColor : "#FFFFFF"; + let personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII="; + switch (c4Shape.typeC4Shape.text) { + case "person": + personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII="; + break; + case "external_person": + personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="; + break; + } + const c4ShapeElem = elem.append("g"); + c4ShapeElem.attr("class", "person-man"); + const rect = (0,_svgDrawCommon_5ccd53ef_js__WEBPACK_IMPORTED_MODULE_5__.g)(); + switch (c4Shape.typeC4Shape.text) { + case "person": + case "external_person": + case "system": + case "external_system": + case "container": + case "external_container": + case "component": + case "external_component": + rect.x = c4Shape.x; + rect.y = c4Shape.y; + rect.fill = fillColor; + rect.width = c4Shape.width; + rect.height = c4Shape.height; + rect.stroke = strokeColor; + rect.rx = 2.5; + rect.ry = 2.5; + rect.attrs = { "stroke-width": 0.5 }; + drawRect(c4ShapeElem, rect); + break; + case "system_db": + case "external_system_db": + case "container_db": + case "external_container_db": + case "component_db": + case "external_component_db": + c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2).replaceAll("height", c4Shape.height) + ); + c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2) + ); + break; + case "system_queue": + case "external_system_queue": + case "container_queue": + case "external_container_queue": + case "component_queue": + case "external_component_queue": + c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("width", c4Shape.width).replaceAll("half", c4Shape.height / 2) + ); + c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr( + "d", + "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", c4Shape.x + c4Shape.width).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.height / 2) + ); + break; + } + let c4ShapeFontConf = getC4ShapeFont(conf2, c4Shape.typeC4Shape.text); + c4ShapeElem.append("text").attr("fill", fontColor).attr("font-family", c4ShapeFontConf.fontFamily).attr("font-size", c4ShapeFontConf.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", c4Shape.typeC4Shape.width).attr("x", c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2).attr("y", c4Shape.y + c4Shape.typeC4Shape.Y).text("<<" + c4Shape.typeC4Shape.text + ">>"); + switch (c4Shape.typeC4Shape.text) { + case "person": + case "external_person": + drawImage( + c4ShapeElem, + 48, + 48, + c4Shape.x + c4Shape.width / 2 - 24, + c4Shape.y + c4Shape.image.Y, + personImg + ); + break; + } + let textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"](); + textFontConf.fontWeight = "bold"; + textFontConf.fontSize = textFontConf.fontSize + 2; + textFontConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + c4Shape.label.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.label.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor }, + textFontConf + ); + textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"](); + textFontConf.fontColor = fontColor; + if (c4Shape.techn && ((_a = c4Shape.techn) == null ? void 0 : _a.text) !== "") { + _drawTextCandidateFunc(conf2)( + c4Shape.techn.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.techn.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor, "font-style": "italic" }, + textFontConf + ); + } else if (c4Shape.type && c4Shape.type.text !== "") { + _drawTextCandidateFunc(conf2)( + c4Shape.type.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.type.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor, "font-style": "italic" }, + textFontConf + ); + } + if (c4Shape.descr && c4Shape.descr.text !== "") { + textFontConf = conf2.personFont(); + textFontConf.fontColor = fontColor; + _drawTextCandidateFunc(conf2)( + c4Shape.descr.text, + c4ShapeElem, + c4Shape.x, + c4Shape.y + c4Shape.descr.Y, + c4Shape.width, + c4Shape.height, + { fill: fontColor }, + textFontConf + ); + } + return c4Shape.height; +}; +const insertDatabaseIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z" + ); +}; +const insertComputerIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z" + ); +}; +const insertClockIcon = function(elem) { + elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr( + "d", + "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z" + ); +}; +const insertArrowHead = function(elem) { + elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).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"); +}; +const insertArrowEnd = function(elem) { + elem.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z"); +}; +const insertArrowFilledHead = function(elem) { + elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).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"); +}; +const insertDynamicNumber = function(elem) { + elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6); +}; +const insertArrowCrossHead = function(elem) { + const defs = elem.append("defs"); + const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4); + marker.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"); + marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7"); +}; +const getC4ShapeFont = (cnf, typeC4Shape) => { + return { + fontFamily: cnf[typeC4Shape + "FontFamily"], + fontSize: cnf[typeC4Shape + "FontSize"], + fontWeight: cnf[typeC4Shape + "FontWeight"] + }; +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2) { + const { fontSize, fontFamily, fontWeight } = conf2; + const lines = content.split(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex); + for (let i = 0; i < lines.length; i++) { + const dy = i * fontSize - fontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", fontSize).style("font-weight", fontWeight).style("font-family", fontFamily); + text.append("tspan").attr("dy", dy).text(lines[i]).attr("alignment-baseline", "mathematical"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const s = g.append("switch"); + const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, s, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (fromTextAttrsDict.hasOwnProperty(key)) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const svgDraw = { + drawRect, + drawBoundary: drawBoundary$1, + drawC4Shape, + drawRels: drawRels$1, + drawImage, + insertArrowHead, + insertArrowEnd, + insertArrowFilledHead, + insertDynamicNumber, + insertArrowCrossHead, + insertDatabaseIcon, + insertComputerIcon, + insertClockIcon +}; +let globalBoundaryMaxX = 0, globalBoundaryMaxY = 0; +let c4ShapeInRow = 4; +let c4BoundaryInRow = 2; +parser.yy = db; +let conf = {}; +class Bounds { + constructor(diagObj) { + this.name = ""; + this.data = {}; + this.data.startx = void 0; + this.data.stopx = void 0; + this.data.starty = void 0; + this.data.stopy = void 0; + this.data.widthLimit = void 0; + this.nextData = {}; + this.nextData.startx = void 0; + this.nextData.stopx = void 0; + this.nextData.starty = void 0; + this.nextData.stopy = void 0; + this.nextData.cnt = 0; + setConf(diagObj.db.getConfig()); + } + setData(startx, stopx, starty, stopy) { + this.nextData.startx = this.data.startx = startx; + this.nextData.stopx = this.data.stopx = stopx; + this.nextData.starty = this.data.starty = starty; + this.nextData.stopy = this.data.stopy = stopy; + } + updateVal(obj, key, val, fun) { + if (obj[key] === void 0) { + obj[key] = val; + } else { + obj[key] = fun(val, obj[key]); + } + } + insert(c4Shape) { + this.nextData.cnt = this.nextData.cnt + 1; + let _startx = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + c4Shape.margin : this.nextData.stopx + c4Shape.margin * 2; + let _stopx = _startx + c4Shape.width; + let _starty = this.nextData.starty + c4Shape.margin * 2; + let _stopy = _starty + c4Shape.height; + if (_startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow) { + _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX; + _starty = this.nextData.stopy + c4Shape.margin * 2; + this.nextData.stopx = _stopx = _startx + c4Shape.width; + this.nextData.starty = this.nextData.stopy; + this.nextData.stopy = _stopy = _starty + c4Shape.height; + this.nextData.cnt = 1; + } + c4Shape.x = _startx; + c4Shape.y = _starty; + this.updateVal(this.data, "startx", _startx, Math.min); + this.updateVal(this.data, "starty", _starty, Math.min); + this.updateVal(this.data, "stopx", _stopx, Math.max); + this.updateVal(this.data, "stopy", _stopy, Math.max); + this.updateVal(this.nextData, "startx", _startx, Math.min); + this.updateVal(this.nextData, "starty", _starty, Math.min); + this.updateVal(this.nextData, "stopx", _stopx, Math.max); + this.updateVal(this.nextData, "stopy", _stopy, Math.max); + } + init(diagObj) { + this.name = ""; + this.data = { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0, + widthLimit: void 0 + }; + this.nextData = { + startx: void 0, + stopx: void 0, + starty: void 0, + stopy: void 0, + cnt: 0 + }; + setConf(diagObj.db.getConfig()); + } + bumpLastMargin(margin) { + this.data.stopx += margin; + this.data.stopy += margin; + } +} +const setConf = function(cnf) { + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.f)(conf, cnf); + if (cnf.fontFamily) { + conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily; + } + if (cnf.fontSize) { + conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize; + } + if (cnf.fontWeight) { + conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight; + } +}; +const c4ShapeFont = (cnf, typeC4Shape) => { + return { + fontFamily: cnf[typeC4Shape + "FontFamily"], + fontSize: cnf[typeC4Shape + "FontSize"], + fontWeight: cnf[typeC4Shape + "FontWeight"] + }; +}; +const boundaryFont = (cnf) => { + return { + fontFamily: cnf.boundaryFontFamily, + fontSize: cnf.boundaryFontSize, + fontWeight: cnf.boundaryFontWeight + }; +}; +const messageFont = (cnf) => { + return { + fontFamily: cnf.messageFontFamily, + fontSize: cnf.messageFontSize, + fontWeight: cnf.messageFontWeight + }; +}; +function calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) { + if (!c4Shape[textType].width) { + if (c4ShapeTextWrap) { + c4Shape[textType].text = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.w)(c4Shape[textType].text, textLimitWidth, textConf); + c4Shape[textType].textLines = c4Shape[textType].text.split(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex).length; + c4Shape[textType].width = textLimitWidth; + c4Shape[textType].height = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.j)(c4Shape[textType].text, textConf); + } else { + let lines = c4Shape[textType].text.split(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex); + c4Shape[textType].textLines = lines.length; + let lineHeight = 0; + c4Shape[textType].height = 0; + c4Shape[textType].width = 0; + for (const line of lines) { + c4Shape[textType].width = Math.max( + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.h)(line, textConf), + c4Shape[textType].width + ); + lineHeight = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.j)(line, textConf); + c4Shape[textType].height = c4Shape[textType].height + lineHeight; + } + } + } +} +const drawBoundary = function(diagram2, boundary, bounds) { + boundary.x = bounds.data.startx; + boundary.y = bounds.data.starty; + boundary.width = bounds.data.stopx - bounds.data.startx; + boundary.height = bounds.data.stopy - bounds.data.starty; + boundary.label.y = conf.c4ShapeMargin - 35; + let boundaryTextWrap = boundary.wrap && conf.wrap; + let boundaryLabelConf = boundaryFont(conf); + boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2; + boundaryLabelConf.fontWeight = "bold"; + let textLimitWidth = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.h)(boundary.label.text, boundaryLabelConf); + calcC4ShapeTextWH("label", boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth); + svgDraw.drawBoundary(diagram2, boundary, conf); +}; +const drawC4ShapeArray = function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) { + let Y = 0; + for (const c4ShapeKey of c4ShapeKeys) { + Y = 0; + const c4Shape = c4ShapeArray2[c4ShapeKey]; + let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text); + c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2; + c4Shape.typeC4Shape.width = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.h)( + "«" + c4Shape.typeC4Shape.text + "»", + c4ShapeTypeConf + ); + c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2; + c4Shape.typeC4Shape.Y = conf.c4ShapePadding; + Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4; + c4Shape.image = { width: 0, height: 0, Y: 0 }; + switch (c4Shape.typeC4Shape.text) { + case "person": + case "external_person": + c4Shape.image.width = 48; + c4Shape.image.height = 48; + c4Shape.image.Y = Y; + Y = c4Shape.image.Y + c4Shape.image.height; + break; + } + if (c4Shape.sprite) { + c4Shape.image.width = 48; + c4Shape.image.height = 48; + c4Shape.image.Y = Y; + Y = c4Shape.image.Y + c4Shape.image.height; + } + let c4ShapeTextWrap = c4Shape.wrap && conf.wrap; + let textLimitWidth = conf.width - conf.c4ShapePadding * 2; + let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text); + c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2; + c4ShapeLabelConf.fontWeight = "bold"; + calcC4ShapeTextWH("label", c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth); + c4Shape["label"].Y = Y + 8; + Y = c4Shape["label"].Y + c4Shape["label"].height; + if (c4Shape.type && c4Shape.type.text !== "") { + c4Shape.type.text = "[" + c4Shape.type.text + "]"; + let c4ShapeTypeConf2 = c4ShapeFont(conf, c4Shape.typeC4Shape.text); + calcC4ShapeTextWH("type", c4Shape, c4ShapeTextWrap, c4ShapeTypeConf2, textLimitWidth); + c4Shape["type"].Y = Y + 5; + Y = c4Shape["type"].Y + c4Shape["type"].height; + } else if (c4Shape.techn && c4Shape.techn.text !== "") { + c4Shape.techn.text = "[" + c4Shape.techn.text + "]"; + let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text); + calcC4ShapeTextWH("techn", c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth); + c4Shape["techn"].Y = Y + 5; + Y = c4Shape["techn"].Y + c4Shape["techn"].height; + } + let rectHeight = Y; + let rectWidth = c4Shape.label.width; + if (c4Shape.descr && c4Shape.descr.text !== "") { + let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text); + calcC4ShapeTextWH("descr", c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth); + c4Shape["descr"].Y = Y + 20; + Y = c4Shape["descr"].Y + c4Shape["descr"].height; + rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width); + rectHeight = Y - c4Shape["descr"].textLines * 5; + } + rectWidth = rectWidth + conf.c4ShapePadding; + c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width); + c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height); + c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin; + currentBounds.insert(c4Shape); + svgDraw.drawC4Shape(diagram2, c4Shape, conf); + } + currentBounds.bumpLastMargin(conf.c4ShapeMargin); +}; +class Point { + constructor(x, y) { + this.x = x; + this.y = y; + } +} +let getIntersectPoint = function(fromNode, endPoint) { + let x1 = fromNode.x; + let y1 = fromNode.y; + let x2 = endPoint.x; + let y2 = endPoint.y; + let fromCenterX = x1 + fromNode.width / 2; + let fromCenterY = y1 + fromNode.height / 2; + let dx = Math.abs(x1 - x2); + let dy = Math.abs(y1 - y2); + let tanDYX = dy / dx; + let fromDYX = fromNode.height / fromNode.width; + let returnPoint = null; + if (y1 == y2 && x1 < x2) { + returnPoint = new Point(x1 + fromNode.width, fromCenterY); + } else if (y1 == y2 && x1 > x2) { + returnPoint = new Point(x1, fromCenterY); + } else if (x1 == x2 && y1 < y2) { + returnPoint = new Point(fromCenterX, y1 + fromNode.height); + } else if (x1 == x2 && y1 > y2) { + returnPoint = new Point(fromCenterX, y1); + } + if (x1 > x2 && y1 < y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point(x1, fromCenterY + tanDYX * fromNode.width / 2); + } else { + returnPoint = new Point( + fromCenterX - dx / dy * fromNode.height / 2, + y1 + fromNode.height + ); + } + } else if (x1 < x2 && y1 < y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point(x1 + fromNode.width, fromCenterY + tanDYX * fromNode.width / 2); + } else { + returnPoint = new Point( + fromCenterX + dx / dy * fromNode.height / 2, + y1 + fromNode.height + ); + } + } else if (x1 < x2 && y1 > y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point(x1 + fromNode.width, fromCenterY - tanDYX * fromNode.width / 2); + } else { + returnPoint = new Point(fromCenterX + fromNode.height / 2 * dx / dy, y1); + } + } else if (x1 > x2 && y1 > y2) { + if (fromDYX >= tanDYX) { + returnPoint = new Point(x1, fromCenterY - fromNode.width / 2 * tanDYX); + } else { + returnPoint = new Point(fromCenterX - fromNode.height / 2 * dx / dy, y1); + } + } + return returnPoint; +}; +let getIntersectPoints = function(fromNode, endNode) { + let endIntersectPoint = { x: 0, y: 0 }; + endIntersectPoint.x = endNode.x + endNode.width / 2; + endIntersectPoint.y = endNode.y + endNode.height / 2; + let startPoint = getIntersectPoint(fromNode, endIntersectPoint); + endIntersectPoint.x = fromNode.x + fromNode.width / 2; + endIntersectPoint.y = fromNode.y + fromNode.height / 2; + let endPoint = getIntersectPoint(endNode, endIntersectPoint); + return { startPoint, endPoint }; +}; +const drawRels = function(diagram2, rels2, getC4ShapeObj, diagObj) { + let i = 0; + for (let rel of rels2) { + i = i + 1; + let relTextWrap = rel.wrap && conf.wrap; + let relConf = messageFont(conf); + let diagramType = diagObj.db.getC4Type(); + if (diagramType === "C4Dynamic") { + rel.label.text = i + ": " + rel.label.text; + } + let textLimitWidth = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.h)(rel.label.text, relConf); + calcC4ShapeTextWH("label", rel, relTextWrap, relConf, textLimitWidth); + if (rel.techn && rel.techn.text !== "") { + textLimitWidth = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.h)(rel.techn.text, relConf); + calcC4ShapeTextWH("techn", rel, relTextWrap, relConf, textLimitWidth); + } + if (rel.descr && rel.descr.text !== "") { + textLimitWidth = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.h)(rel.descr.text, relConf); + calcC4ShapeTextWH("descr", rel, relTextWrap, relConf, textLimitWidth); + } + let fromNode = getC4ShapeObj(rel.from); + let endNode = getC4ShapeObj(rel.to); + let points = getIntersectPoints(fromNode, endNode); + rel.startPoint = points.startPoint; + rel.endPoint = points.endPoint; + } + svgDraw.drawRels(diagram2, rels2, conf); +}; +function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) { + let currentBounds = new Bounds(diagObj); + currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundaries.length); + for (let [i, currentBoundary] of currentBoundaries.entries()) { + let Y = 0; + currentBoundary.image = { width: 0, height: 0, Y: 0 }; + if (currentBoundary.sprite) { + currentBoundary.image.width = 48; + currentBoundary.image.height = 48; + currentBoundary.image.Y = Y; + Y = currentBoundary.image.Y + currentBoundary.image.height; + } + let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap; + let currentBoundaryLabelConf = boundaryFont(conf); + currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2; + currentBoundaryLabelConf.fontWeight = "bold"; + calcC4ShapeTextWH( + "label", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryLabelConf, + currentBounds.data.widthLimit + ); + currentBoundary["label"].Y = Y + 8; + Y = currentBoundary["label"].Y + currentBoundary["label"].height; + if (currentBoundary.type && currentBoundary.type.text !== "") { + currentBoundary.type.text = "[" + currentBoundary.type.text + "]"; + let currentBoundaryTypeConf = boundaryFont(conf); + calcC4ShapeTextWH( + "type", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryTypeConf, + currentBounds.data.widthLimit + ); + currentBoundary["type"].Y = Y + 5; + Y = currentBoundary["type"].Y + currentBoundary["type"].height; + } + if (currentBoundary.descr && currentBoundary.descr.text !== "") { + let currentBoundaryDescrConf = boundaryFont(conf); + currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2; + calcC4ShapeTextWH( + "descr", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryDescrConf, + currentBounds.data.widthLimit + ); + currentBoundary["descr"].Y = Y + 20; + Y = currentBoundary["descr"].Y + currentBoundary["descr"].height; + } + if (i == 0 || i % c4BoundaryInRow === 0) { + let _x = parentBounds.data.startx + conf.diagramMarginX; + let _y = parentBounds.data.stopy + conf.diagramMarginY + Y; + currentBounds.setData(_x, _x, _y, _y); + } else { + let _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf.diagramMarginX : currentBounds.data.startx; + let _y = currentBounds.data.starty; + currentBounds.setData(_x, _x, _y, _y); + } + currentBounds.name = currentBoundary.alias; + let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias); + let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias); + if (currentPersonOrSystemKeys.length > 0) { + drawC4ShapeArray( + currentBounds, + diagram2, + currentPersonOrSystemArray, + currentPersonOrSystemKeys + ); + } + parentBoundaryAlias = currentBoundary.alias; + let nextCurrentBoundaries = diagObj.db.getBoundarys(parentBoundaryAlias); + if (nextCurrentBoundaries.length > 0) { + drawInsideBoundary( + diagram2, + parentBoundaryAlias, + currentBounds, + nextCurrentBoundaries, + diagObj + ); + } + if (currentBoundary.alias !== "global") { + drawBoundary(diagram2, currentBoundary, currentBounds); + } + parentBounds.data.stopy = Math.max( + currentBounds.data.stopy + conf.c4ShapeMargin, + parentBounds.data.stopy + ); + parentBounds.data.stopx = Math.max( + currentBounds.data.stopx + conf.c4ShapeMargin, + parentBounds.data.stopx + ); + globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx); + globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy); + } +} +const draw = function(_text, id, _version, diagObj) { + conf = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().c4; + const securityLevel = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.c)().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)("body"); + let db2 = diagObj.db; + diagObj.db.setWrap(conf.wrap); + c4ShapeInRow = db2.getC4ShapeInRow(); + c4BoundaryInRow = db2.getC4BoundaryInRow(); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`C:${JSON.stringify(conf, null, 2)}`); + const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ltv)(`[id="${id}"]`); + svgDraw.insertComputerIcon(diagram2); + svgDraw.insertDatabaseIcon(diagram2); + svgDraw.insertClockIcon(diagram2); + let screenBounds = new Bounds(diagObj); + screenBounds.setData( + conf.diagramMarginX, + conf.diagramMarginX, + conf.diagramMarginY, + conf.diagramMarginY + ); + screenBounds.data.widthLimit = screen.availWidth; + globalBoundaryMaxX = conf.diagramMarginX; + globalBoundaryMaxY = conf.diagramMarginY; + const title2 = diagObj.db.getTitle(); + let currentBoundaries = diagObj.db.getBoundarys(""); + drawInsideBoundary(diagram2, "", screenBounds, currentBoundaries, diagObj); + svgDraw.insertArrowHead(diagram2); + svgDraw.insertArrowEnd(diagram2); + svgDraw.insertArrowCrossHead(diagram2); + svgDraw.insertArrowFilledHead(diagram2); + drawRels(diagram2, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj); + screenBounds.data.stopx = globalBoundaryMaxX; + screenBounds.data.stopy = globalBoundaryMaxY; + const box = screenBounds.data; + let boxHeight = box.stopy - box.starty; + let height = boxHeight + 2 * conf.diagramMarginY; + let boxWidth = box.stopx - box.startx; + const width = boxWidth + 2 * conf.diagramMarginX; + if (title2) { + diagram2.append("text").text(title2).attr("x", (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX).attr("y", box.starty + conf.diagramMarginY); + } + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.i)(diagram2, height, width, conf.useMaxWidth); + const extraVertForTitle = title2 ? 60 : 0; + diagram2.attr( + "viewBox", + box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle) + ); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`models:`, box); +}; +const renderer = { + drawPersonOrSystemArray: drawC4ShapeArray, + drawBoundary, + setConf, + draw +}; +const getStyles = (options) => `.person { + stroke: ${options.personBorder}; + fill: ${options.personBkg}; + } +`; +const styles = getStyles; +const diagram = { + parser: parser$1, + db, + renderer, + styles, + init: ({ c4, wrap }) => { + renderer.setConf(c4); + db.setWrap(wrap); + } +}; + + + +/***/ }), + +/***/ 8886: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ a: () => (/* binding */ drawBackgroundRect), +/* harmony export */ b: () => (/* binding */ drawEmbeddedImage), +/* harmony export */ c: () => (/* binding */ drawImage), +/* harmony export */ d: () => (/* binding */ drawRect), +/* harmony export */ e: () => (/* binding */ getTextObj), +/* harmony export */ f: () => (/* binding */ drawText), +/* harmony export */ g: () => (/* binding */ getNoteRect) +/* harmony export */ }); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6750); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6257); + + +const drawRect = (element, rectData) => { + const rectElement = element.append("rect"); + rectElement.attr("x", rectData.x); + rectElement.attr("y", rectData.y); + rectElement.attr("fill", rectData.fill); + rectElement.attr("stroke", rectData.stroke); + rectElement.attr("width", rectData.width); + rectElement.attr("height", rectData.height); + if (rectData.name) { + rectElement.attr("name", rectData.name); + } + rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx); + rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry); + if (rectData.attrs !== void 0) { + for (const attrKey in rectData.attrs) { + rectElement.attr(attrKey, rectData.attrs[attrKey]); + } + } + rectData.class !== void 0 && rectElement.attr("class", rectData.class); + return rectElement; +}; +const drawBackgroundRect = (element, bounds) => { + const rectData = { + x: bounds.startx, + y: bounds.starty, + width: bounds.stopx - bounds.startx, + height: bounds.stopy - bounds.starty, + fill: bounds.fill, + stroke: bounds.stroke, + class: "rect" + }; + const rectElement = drawRect(element, rectData); + rectElement.lower(); +}; +const drawText = (element, textData) => { + const nText = textData.text.replace(_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_1__.J, " "); + const textElem = element.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.attr("class", "legend"); + textElem.style("text-anchor", textData.anchor); + textData.class !== void 0 && textElem.attr("class", textData.class); + const tspan = textElem.append("tspan"); + tspan.attr("x", textData.x + textData.textMargin * 2); + tspan.text(nText); + return textElem; +}; +const drawImage = (elem, x, y, link) => { + const imageElement = elem.append("image"); + imageElement.attr("x", x); + imageElement.attr("y", y); + const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(link); + imageElement.attr("xlink:href", sanitizedLink); +}; +const drawEmbeddedImage = (element, x, y, link) => { + const imageElement = element.append("use"); + imageElement.attr("x", x); + imageElement.attr("y", y); + const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Jf)(link); + imageElement.attr("xlink:href", `#${sanitizedLink}`); +}; +const getNoteRect = () => { + const noteRectData = { + x: 0, + y: 0, + width: 100, + height: 100, + fill: "#EDF2AE", + stroke: "#666", + anchor: "start", + rx: 0, + ry: 0 + }; + return noteRectData; +}; +const getTextObj = () => { + const testObject = { + x: 0, + y: 0, + width: 100, + height: 100, + "text-anchor": "start", + style: "#666", + textMargin: 0, + rx: 0, + ry: 0, + tspan: true + }; + return testObject; +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/8747.7d832047.js b/assets/js/8747.7d832047.js new file mode 100644 index 00000000..25dd9563 --- /dev/null +++ b/assets/js/8747.7d832047.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[8747],{8747:(t,e,a)=>{a.d(e,{a:()=>l,b:()=>B,c:()=>o,d:()=>I,e:()=>M,f:()=>j,g:()=>C,h:()=>A,i:()=>x,j:()=>N,k:()=>R,l:()=>d,m:()=>Y,p:()=>_,s:()=>T,u:()=>h});var r=a(6257),n=a(6312),i=a(358);const s={extension:(t,e,a)=>{r.l.trace("Making markers for ",a),t.append("defs").append("marker").attr("id",a+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",a+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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")},composition:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",a+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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")},aggregation:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",a+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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")},dependency:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",a+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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")},lollipop:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",a+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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)},point:(t,e,a)=>{t.append("marker").attr("id",a+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",a+"_"+e+"-pointStart").attr("class","marker "+e).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")},circle:(t,e,a)=>{t.append("marker").attr("id",a+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",a+"_"+e+"-circleStart").attr("class","marker "+e).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")},cross:(t,e,a)=>{t.append("marker").attr("id",a+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",a+"_"+e+"-crossStart").attr("class","marker cross "+e).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")},barb:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-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")}},l=(t,e,a,r)=>{e.forEach((e=>{s[e](t,a,r)}))};const o=(t,e,a,i)=>{let s=t||"";if("object"==typeof s&&(s=s[0]),(0,r.m)((0,r.c)().flowchart.htmlLabels)){s=s.replace(/\\n|\n/g,"<br />"),r.l.debug("vertexText"+s);let t=function(t){const e=(0,n.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),r=t.label,i=t.isNode?"nodeLabel":"edgeLabel";var s,l;return a.html('<span class="'+i+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>"),s=a,(l=t.labelStyle)&&s.attr("style",l),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}({isNode:i,label:(0,r.M)(s).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>`<i class='${t.replace(":"," ")}'></i>`)),labelStyle:e.replace("fill:","color:")});return t}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let r=[];r="string"==typeof s?s.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(s)?s:[];for(const e of r){const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),a?r.setAttribute("class","title-row"):r.setAttribute("class","row"),r.textContent=e.trim(),t.appendChild(r)}return t}},d=async(t,e,a,s)=>{let l;const d=e.useHtmlLabels||(0,r.m)((0,r.c)().flowchart.htmlLabels);l=a||"node default";const h=t.insert("g").attr("class",l).attr("id",e.domId||e.id),c=h.insert("g").attr("class","label").attr("style",e.labelStyle);let y;y=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const p=c.node();let g;g="markdown"===e.labelType?(0,i.a)(c,(0,r.d)((0,r.M)(y),(0,r.c)()),{useHtmlLabels:d,width:e.width||(0,r.c)().flowchart.wrappingWidth,classes:"markdown-node-label"}):p.appendChild(o((0,r.d)((0,r.M)(y),(0,r.c)()),e.labelStyle,!1,s));let x=g.getBBox();const f=e.padding/2;if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=g.children[0],e=(0,n.Ltv)(g),a=t.getElementsByTagName("img");if(a){const t=""===y.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map((e=>new Promise((a=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=(0,r.c)().fontSize?(0,r.c)().fontSize:window.getComputedStyle(document.body).fontSize,a=5,n=parseInt(t,10)*a+"px";e.style.minWidth=n,e.style.maxWidth=n}else e.style.width="100%";a(e)}setTimeout((()=>{e.complete&&n()})),e.addEventListener("error",n),e.addEventListener("load",n)})))))}x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}return d?c.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"):c.attr("transform","translate(0, "+-x.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:h,bbox:x,halfPadding:f,label:c}},h=(t,e)=>{const a=e.node().getBBox();t.width=a.width,t.height=a.height};function c(t,e,a,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}function y(t,e,a,r){var n=t.x,i=t.y,s=n-r.x,l=i-r.y,o=Math.sqrt(e*e*l*l+a*a*s*s),d=Math.abs(e*a*s/o);r.x<n&&(d=-d);var h=Math.abs(e*a*l/o);return r.y<i&&(h=-h),{x:n+d,y:i+h}}function p(t,e,a,r){var n,i,s,l,o,d,h,c,y,p,x,f,u;if(n=e.y-t.y,s=t.x-e.x,o=e.x*t.y-t.x*e.y,y=n*a.x+s*a.y+o,p=n*r.x+s*r.y+o,!(0!==y&&0!==p&&g(y,p)||(i=r.y-a.y,l=a.x-r.x,d=r.x*a.y-a.x*r.y,h=i*t.x+l*t.y+d,c=i*e.x+l*e.y+d,0!==h&&0!==c&&g(h,c)||0==(x=n*l-i*s))))return f=Math.abs(x/2),{x:(u=s*d-l*o)<0?(u-f)/x:(u+f)/x,y:(u=i*o-n*d)<0?(u-f)/x:(u+f)/x}}function g(t,e){return t*e>0}const x=(t,e)=>{var a,r,n=t.x,i=t.y,s=e.x-n,l=e.y-i,o=t.width/2,d=t.height/2;return Math.abs(l)*o>Math.abs(s)*d?(l<0&&(d=-d),a=0===l?0:d*s/l,r=d):(s<0&&(o=-o),a=o,r=0===s?0:o*l/s),{x:n+a,y:i+r}},f={node:function(t,e){return t.intersect(e)},circle:function(t,e,a){return y(t,e,e,a)},ellipse:y,polygon:function(t,e,a){var r=t.x,n=t.y,i=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),l=Math.min(l,t.y)})):(s=Math.min(s,e.x),l=Math.min(l,e.y));for(var o=r-t.width/2-s,d=n-t.height/2-l,h=0;h<e.length;h++){var c=e[h],y=e[h<e.length-1?h+1:0],g=p(t,a,{x:o+c.x,y:d+c.y},{x:o+y.x,y:d+y.y});g&&i.push(g)}return i.length?(i.length>1&&i.sort((function(t,e){var r=t.x-a.x,n=t.y-a.y,i=Math.sqrt(r*r+n*n),s=e.x-a.x,l=e.y-a.y,o=Math.sqrt(s*s+l*l);return i<o?-1:i===o?0:1})),i[0]):t},rect:x},u=(t,e,a)=>{const r=(t=>{const e=new Set;for(const a of t)switch(a){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(a)}return e})(t),n=e.height+2*a.padding,i=n/2,s=e.width+2*i+a.padding,l=a.padding/2;return r.has("right")&&r.has("left")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:i,y:0},{x:s/2,y:2*l},{x:s-i,y:0},{x:s,y:0},{x:s,y:-n/3},{x:s+2*l,y:-n/2},{x:s,y:-2*n/3},{x:s,y:-n},{x:s-i,y:-n},{x:s/2,y:-n-2*l},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*l,y:-n/2},{x:0,y:-n/3}]:r.has("right")&&r.has("left")&&r.has("up")?[{x:i,y:0},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:r.has("right")&&r.has("left")&&r.has("down")?[{x:0,y:0},{x:i,y:-n},{x:s-i,y:-n},{x:s,y:0}]:r.has("right")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:s,y:-i},{x:s,y:-n+i},{x:0,y:-n}]:r.has("left")&&r.has("up")&&r.has("down")?[{x:s,y:0},{x:0,y:-i},{x:0,y:-n+i},{x:s,y:-n}]:r.has("right")&&r.has("left")?[{x:i,y:0},{x:i,y:-l},{x:s-i,y:-l},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:s-i,y:-n+l},{x:i,y:-n+l},{x:i,y:-n},{x:0,y:-n/2}]:r.has("up")&&r.has("down")?[{x:s/2,y:0},{x:0,y:-l},{x:i,y:-l},{x:i,y:-n+l},{x:0,y:-n+l},{x:s/2,y:-n},{x:s,y:-n+l},{x:s-i,y:-n+l},{x:s-i,y:-l},{x:s,y:-l}]:r.has("right")&&r.has("up")?[{x:0,y:0},{x:s,y:-i},{x:0,y:-n}]:r.has("right")&&r.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-n}]:r.has("left")&&r.has("up")?[{x:s,y:0},{x:0,y:-i},{x:s,y:-n}]:r.has("left")&&r.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-n}]:r.has("right")?[{x:i,y:-l},{x:i,y:-l},{x:s-i,y:-l},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:s-i,y:-n+l},{x:i,y:-n+l},{x:i,y:-n+l}]:r.has("left")?[{x:i,y:0},{x:i,y:-l},{x:s-i,y:-l},{x:s-i,y:-n+l},{x:i,y:-n+l},{x:i,y:-n},{x:0,y:-n/2}]:r.has("up")?[{x:i,y:-l},{x:i,y:-n+l},{x:0,y:-n+l},{x:s/2,y:-n},{x:s,y:-n+l},{x:s-i,y:-n+l},{x:s-i,y:-l}]:r.has("down")?[{x:s/2,y:0},{x:0,y:-l},{x:i,y:-l},{x:i,y:-n+l},{x:s-i,y:-n+l},{x:s-i,y:-l},{x:s,y:-l}]:[{x:0,y:0}]},w=t=>t?" "+t:"",b=(t,e)=>`${e||"node default"}${w(t.classes)} ${w(t.class)}`,m=async(t,e)=>{const{shapeSvg:a,bbox:n}=await d(t,e,b(e,void 0),!0),i=n.width+e.padding+(n.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];r.l.info("Question main (Circle)");const l=c(a,i,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return r.l.warn("Intersect called"),f.polygon(e,s,t)},a};function k(t,e,a,n){const i=[],s=t=>{i.push(t,0)},l=t=>{i.push(0,t)};e.includes("t")?(r.l.debug("add top border"),s(a)):l(a),e.includes("r")?(r.l.debug("add right border"),s(n)):l(n),e.includes("b")?(r.l.debug("add bottom border"),s(a)):l(a),e.includes("l")?(r.l.debug("add left border"),s(n)):l(n),t.attr("stroke-dasharray",i.join(" "))}const v=(t,e,a)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n=70,i=10;"LR"===a&&(n=10,i=70);const s=r.append("rect").attr("x",-1*n/2).attr("y",-1*i/2).attr("width",n).attr("height",i).attr("class","fork-join");return h(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return f.rect(e,t)},r},L={rhombus:m,composite:async(t,e)=>{const{shapeSvg:a,bbox:n,halfPadding:i}=await d(t,e,"node "+e.classes,!0),s=a.insert("rect",":first-child"),l=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,c=e.positioned?-l/2:-n.width/2-i,y=e.positioned?-o/2:-n.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",y).attr("width",l).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(k(s,e.props.borders,l,o),t.delete("borders")),t.forEach((t=>{r.l.warn(`Unknown node property ${t}`)}))}return h(e,s),e.intersect=function(t){return f.rect(e,t)},a},question:m,rect:async(t,e)=>{const{shapeSvg:a,bbox:n,halfPadding:i}=await d(t,e,"node "+e.classes+" "+e.class,!0),s=a.insert("rect",":first-child"),l=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,c=e.positioned?-l/2:-n.width/2-i,y=e.positioned?-o/2:-n.height/2-i;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",y).attr("width",l).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(k(s,e.props.borders,l,o),t.delete("borders")),t.forEach((t=>{r.l.warn(`Unknown node property ${t}`)}))}return h(e,s),e.intersect=function(t){return f.rect(e,t)},a},labelRect:async(t,e)=>{const{shapeSvg:a}=await d(t,e,"label",!0);r.l.trace("Classes = ",e.class);const n=a.insert("rect",":first-child");if(n.attr("width",0).attr("height",0),a.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(k(n,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{r.l.warn(`Unknown node property ${t}`)}))}return h(e,n),e.intersect=function(t){return f.rect(e,t)},a},rectWithTitle:(t,e)=>{let a;a=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=i.insert("rect",":first-child"),l=i.insert("line"),d=i.insert("g").attr("class","label"),c=e.labelText.flat?e.labelText.flat():e.labelText;let y="";y="object"==typeof c?c[0]:c,r.l.info("Label text abc79",y,c,"object"==typeof c);const p=d.node().appendChild(o(y,e.labelStyle,!0,!0));let g={width:0,height:0};if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=p.children[0],e=(0,n.Ltv)(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}r.l.info("Text 2",c);const x=c.slice(1,c.length);let u=p.getBBox();const w=d.node().appendChild(o(x.join?x.join("<br/>"):x,e.labelStyle,!0,!0));if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=w.children[0],e=(0,n.Ltv)(w);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const b=e.padding/2;return(0,n.Ltv)(w).attr("transform","translate( "+(g.width>u.width?0:(u.width-g.width)/2)+", "+(u.height+b+5)+")"),(0,n.Ltv)(p).attr("transform","translate( "+(g.width<u.width?0:-(u.width-g.width)/2)+", 0)"),g=d.node().getBBox(),d.attr("transform","translate("+-g.width/2+", "+(-g.height/2-b+3)+")"),s.attr("class","outer title-state").attr("x",-g.width/2-b).attr("y",-g.height/2-b).attr("width",g.width+e.padding).attr("height",g.height+e.padding),l.attr("class","divider").attr("x1",-g.width/2-b).attr("x2",g.width/2+b).attr("y1",-g.height/2-b+u.height+b).attr("y2",-g.height/2-b+u.height+b),h(e,s),e.intersect=function(t){return f.rect(e,t)},i},choice:(t,e)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return a.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return f.circle(e,14,t)},a},circle:async(t,e)=>{const{shapeSvg:a,bbox:n,halfPadding:i}=await d(t,e,b(e,void 0),!0),s=a.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),r.l.info("Circle main"),h(e,s),e.intersect=function(t){return r.l.info("Circle intersect",e,n.width/2+i,t),f.circle(e,n.width/2+i,t)},a},doublecircle:async(t,e)=>{const{shapeSvg:a,bbox:n,halfPadding:i}=await d(t,e,b(e,void 0),!0),s=a.insert("g",":first-child"),l=s.insert("circle"),o=s.insert("circle");return s.attr("class",e.class),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),r.l.info("DoubleCircle main"),h(e,l),e.intersect=function(t){return r.l.info("DoubleCircle intersect",e,n.width/2+i+5,t),f.circle(e,n.width/2+i+5,t)},a},stadium:async(t,e)=>{const{shapeSvg:a,bbox:r}=await d(t,e,b(e,void 0),!0),n=r.height+e.padding,i=r.width+n/4+e.padding,s=a.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-i/2).attr("y",-n/2).attr("width",i).attr("height",n);return h(e,s),e.intersect=function(t){return f.rect(e,t)},a},hexagon:async(t,e)=>{const{shapeSvg:a,bbox:r}=await d(t,e,b(e,void 0),!0),n=r.height+e.padding,i=n/4,s=r.width+2*i+e.padding,l=[{x:i,y:0},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}],o=c(a,s,n,l);return o.attr("style",e.style),h(e,o),e.intersect=function(t){return f.polygon(e,l,t)},a},block_arrow:async(t,e)=>{const{shapeSvg:a,bbox:r}=await d(t,e,void 0,!0),n=r.height+2*e.padding,i=n/2,s=r.width+2*i+e.padding,l=u(e.directions,r,e),o=c(a,s,n,l);return o.attr("style",e.style),h(e,o),e.intersect=function(t){return f.polygon(e,l,t)},a},rect_left_inv_arrow:async(t,e)=>{const{shapeSvg:a,bbox:r}=await d(t,e,b(e,void 0),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return c(a,n,i,s).attr("style",e.style),e.width=n+i,e.height=i,e.intersect=function(t){return f.polygon(e,s,t)},a},lean_right:async(t,e)=>{const{shapeSvg:a,bbox:r}=await d(t,e,b(e),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:-2*i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:i/6,y:-i}],l=c(a,n,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return f.polygon(e,s,t)},a},lean_left:async(t,e)=>{const{shapeSvg:a,bbox:r}=await d(t,e,b(e,void 0),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:2*i/6,y:0},{x:n+i/6,y:0},{x:n-2*i/6,y:-i},{x:-i/6,y:-i}],l=c(a,n,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return f.polygon(e,s,t)},a},trapezoid:async(t,e)=>{const{shapeSvg:a,bbox:r}=await d(t,e,b(e,void 0),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:-2*i/6,y:0},{x:n+2*i/6,y:0},{x:n-i/6,y:-i},{x:i/6,y:-i}],l=c(a,n,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return f.polygon(e,s,t)},a},inv_trapezoid:async(t,e)=>{const{shapeSvg:a,bbox:r}=await d(t,e,b(e,void 0),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:-2*i/6,y:-i}],l=c(a,n,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return f.polygon(e,s,t)},a},rect_right_inv_arrow:async(t,e)=>{const{shapeSvg:a,bbox:r}=await d(t,e,b(e,void 0),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],l=c(a,n,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return f.polygon(e,s,t)},a},cylinder:async(t,e)=>{const{shapeSvg:a,bbox:r}=await d(t,e,b(e,void 0),!0),n=r.width+e.padding,i=n/2,s=i/(2.5+n/50),l=r.height+s+e.padding,o="M 0,"+s+" a "+i+","+s+" 0,0,0 "+n+" 0 a "+i+","+s+" 0,0,0 "+-n+" 0 l 0,"+l+" a "+i+","+s+" 0,0,0 "+n+" 0 l 0,"+-l,c=a.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",o).attr("transform","translate("+-n/2+","+-(l/2+s)+")");return h(e,c),e.intersect=function(t){const a=f.rect(e,t),r=a.x-e.x;if(0!=i&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(a.y-e.y)>e.height/2-s)){let n=s*s*(1-r*r/(i*i));0!=n&&(n=Math.sqrt(n)),n=s-n,t.y-e.y>0&&(n=-n),a.y+=n}return a},a},start:(t,e)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=a.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),h(e,r),e.intersect=function(t){return f.circle(e,7,t)},a},end:(t,e)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=a.insert("circle",":first-child"),n=a.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),h(e,n),e.intersect=function(t){return f.circle(e,7,t)},a},note:async(t,e)=>{e.useHtmlLabels||(0,r.c)().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:a,bbox:n,halfPadding:i}=await d(t,e,"node "+e.classes,!0);r.l.info("Classes = ",e.classes);const s=a.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),h(e,s),e.intersect=function(t){return f.rect(e,t)},a},subroutine:async(t,e)=>{const{shapeSvg:a,bbox:r}=await d(t,e,b(e,void 0),!0),n=r.width+e.padding,i=r.height+e.padding,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],l=c(a,n,i,s);return l.attr("style",e.style),h(e,l),e.intersect=function(t){return f.polygon(e,s,t)},a},fork:v,join:v,class_box:(t,e)=>{const a=e.padding/2;let i;i=e.classes?"node "+e.classes:"node default";const s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),l=s.insert("rect",":first-child"),d=s.insert("line"),c=s.insert("line");let y=0,p=4;const g=s.insert("g").attr("class","label");let x=0;const u=e.classData.annotations&&e.classData.annotations[0],w=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",b=g.node().appendChild(o(w,e.labelStyle,!0,!0));let m=b.getBBox();if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=b.children[0],e=(0,n.Ltv)(b);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}e.classData.annotations[0]&&(p+=m.height+4,y+=m.width);let k=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,r.c)().flowchart.htmlLabels?k+="<"+e.classData.type+">":k+="<"+e.classData.type+">");const v=g.node().appendChild(o(k,e.labelStyle,!0,!0));(0,n.Ltv)(v).attr("class","classTitle");let L=v.getBBox();if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=v.children[0],e=(0,n.Ltv)(v);L=t.getBoundingClientRect(),e.attr("width",L.width),e.attr("height",L.height)}p+=L.height+4,L.width>y&&(y=L.width);const S=[];e.classData.members.forEach((t=>{const a=t.getDisplayDetails();let i=a.displayText;(0,r.c)().flowchart.htmlLabels&&(i=i.replace(/</g,"<").replace(/>/g,">"));const s=g.node().appendChild(o(i,a.cssStyle?a.cssStyle:e.labelStyle,!0,!0));let l=s.getBBox();if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=s.children[0],e=(0,n.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}l.width>y&&(y=l.width),p+=l.height+4,S.push(s)})),p+=8;const M=[];if(e.classData.methods.forEach((t=>{const a=t.getDisplayDetails();let i=a.displayText;(0,r.c)().flowchart.htmlLabels&&(i=i.replace(/</g,"<").replace(/>/g,">"));const s=g.node().appendChild(o(i,a.cssStyle?a.cssStyle:e.labelStyle,!0,!0));let l=s.getBBox();if((0,r.m)((0,r.c)().flowchart.htmlLabels)){const t=s.children[0],e=(0,n.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}l.width>y&&(y=l.width),p+=l.height+4,M.push(s)})),p+=8,u){let t=(y-m.width)/2;(0,n.Ltv)(b).attr("transform","translate( "+(-1*y/2+t)+", "+-1*p/2+")"),x=m.height+4}let T=(y-L.width)/2;return(0,n.Ltv)(v).attr("transform","translate( "+(-1*y/2+T)+", "+(-1*p/2+x)+")"),x+=L.height+4,d.attr("class","divider").attr("x1",-y/2-a).attr("x2",y/2+a).attr("y1",-p/2-a+8+x).attr("y2",-p/2-a+8+x),x+=8,S.forEach((t=>{(0,n.Ltv)(t).attr("transform","translate( "+-y/2+", "+(-1*p/2+x+4)+")");const e=null==t?void 0:t.getBBox();x+=((null==e?void 0:e.height)??0)+4})),x+=8,c.attr("class","divider").attr("x1",-y/2-a).attr("x2",y/2+a).attr("y1",-p/2-a+8+x).attr("y2",-p/2-a+8+x),x+=8,M.forEach((t=>{(0,n.Ltv)(t).attr("transform","translate( "+-y/2+", "+(-1*p/2+x)+")");const e=null==t?void 0:t.getBBox();x+=((null==e?void 0:e.height)??0)+4})),l.attr("style",e.style).attr("class","outer title-state").attr("x",-y/2-a).attr("y",-p/2-a).attr("width",y+e.padding).attr("height",p+e.padding),h(e,l),e.intersect=function(t){return f.rect(e,t)},s}};let S={};const M=async(t,e,a)=>{let n,i;if(e.link){let s;"sandbox"===(0,r.c)().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await L[e.shape](n,e,a)}else i=await L[e.shape](t,e,a),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),n.attr("data-node","true"),n.attr("data-id",e.id),S[e.id]=n,e.haveCallback&&S[e.id].attr("class",S[e.id].attr("class")+" clickable"),n},T=(t,e)=>{S[e.id]=t},B=()=>{S={}},_=t=>{const e=S[t.id];r.l.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},C=({flowchart:t})=>{var e,a;const r=(null==(e=null==t?void 0:t.subGraphTitleMargin)?void 0:e.top)??0,n=(null==(a=null==t?void 0:t.subGraphTitleMargin)?void 0:a.bottom)??0;return{subGraphTitleTopMargin:r,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:r+n}},E={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function $(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=P(t),e=P(e);const[a,r]=[t.x,t.y],[n,i]=[e.x,e.y],s=n-a,l=i-r;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}const P=t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,R=t=>({x:function(e,a,r){let n=0;if(0===a&&Object.hasOwn(E,t.arrowTypeStart)){const{angle:e,deltaX:a}=$(r[0],r[1]);n=E[t.arrowTypeStart]*Math.cos(e)*(a>=0?1:-1)}else if(a===r.length-1&&Object.hasOwn(E,t.arrowTypeEnd)){const{angle:e,deltaX:a}=$(r[r.length-1],r[r.length-2]);n=E[t.arrowTypeEnd]*Math.cos(e)*(a>=0?1:-1)}return P(e).x+n},y:function(e,a,r){let n=0;if(0===a&&Object.hasOwn(E,t.arrowTypeStart)){const{angle:e,deltaY:a}=$(r[0],r[1]);n=E[t.arrowTypeStart]*Math.abs(Math.sin(e))*(a>=0?1:-1)}else if(a===r.length-1&&Object.hasOwn(E,t.arrowTypeEnd)){const{angle:e,deltaY:a}=$(r[r.length-1],r[r.length-2]);n=E[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(a>=0?1:-1)}return P(e).y+n}}),Y=(t,e,a,r,n)=>{e.arrowTypeStart&&W(t,"start",e.arrowTypeStart,a,r,n),e.arrowTypeEnd&&W(t,"end",e.arrowTypeEnd,a,r,n)},O={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},W=(t,e,a,n,i,s)=>{const l=O[a];if(!l)return void r.l.warn(`Unknown arrow type: ${a}`);const o="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${s}-${l}${o})`)};let X={},H={};const I=()=>{X={},H={}},j=(t,e)=>{const a=(0,r.m)((0,r.c)().flowchart.htmlLabels),s="markdown"===e.labelType?(0,i.a)(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackground:!0}):o(e.label,e.labelStyle),l=t.insert("g").attr("class","edgeLabel"),d=l.insert("g").attr("class","label");d.node().appendChild(s);let h,c=s.getBBox();if(a){const t=s.children[0],e=(0,n.Ltv)(s);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}if(d.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),X[e.id]=l,e.width=c.width,e.height=c.height,e.startLabelLeft){const a=o(e.startLabelLeft,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner");h=n.node().appendChild(a);const i=a.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),H[e.id]||(H[e.id]={}),H[e.id].startLeft=r,D(h,e.startLabelLeft)}if(e.startLabelRight){const a=o(e.startLabelRight,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner");h=r.node().appendChild(a),n.node().appendChild(a);const i=a.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),H[e.id]||(H[e.id]={}),H[e.id].startRight=r,D(h,e.startLabelRight)}if(e.endLabelLeft){const a=o(e.endLabelLeft,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner");h=n.node().appendChild(a);const i=a.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),r.node().appendChild(a),H[e.id]||(H[e.id]={}),H[e.id].endLeft=r,D(h,e.endLabelLeft)}if(e.endLabelRight){const a=o(e.endLabelRight,e.labelStyle),r=t.insert("g").attr("class","edgeTerminals"),n=r.insert("g").attr("class","inner");h=n.node().appendChild(a);const i=a.getBBox();n.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),r.node().appendChild(a),H[e.id]||(H[e.id]={}),H[e.id].endRight=r,D(h,e.endLabelRight)}return s};function D(t,e){(0,r.c)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}const N=(t,e)=>{r.l.debug("Moving label abc88 ",t.id,t.label,X[t.id],e);let a=e.updatedPath?e.updatedPath:e.originalPath;const n=(0,r.c)(),{subGraphTitleTotalMargin:i}=C(n);if(t.label){const n=X[t.id];let s=t.x,l=t.y;if(a){const n=r.u.calcLabelPosition(a);r.l.debug("Moving label "+t.label+" from (",s,",",l,") to (",n.x,",",n.y,") abc88"),e.updatedPath&&(s=n.x,l=n.y)}n.attr("transform",`translate(${s}, ${l+i/2})`)}if(t.startLabelLeft){const e=H[t.id].startLeft;let n=t.x,i=t.y;if(a){const e=r.u.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",a);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.startLabelRight){const e=H[t.id].startRight;let n=t.x,i=t.y;if(a){const e=r.u.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",a);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelLeft){const e=H[t.id].endLeft;let n=t.x,i=t.y;if(a){const e=r.u.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",a);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelRight){const e=H[t.id].endRight;let n=t.x,i=t.y;if(a){const e=r.u.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",a);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}},U=(t,e)=>{r.l.debug("abc88 cutPathAtIntersect",t,e);let a=[],n=t[0],i=!1;return t.forEach((t=>{if(((t,e)=>{const a=t.x,r=t.y,n=Math.abs(e.x-a),i=Math.abs(e.y-r),s=t.width/2,l=t.height/2;return n>=s||i>=l})(e,t)||i)n=t,i||a.push(t);else{const s=((t,e,a)=>{r.l.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(a)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,s=Math.abs(n-a.x),l=t.width/2;let o=a.x<e.x?l-s:l+s;const d=t.height/2,h=Math.abs(e.y-a.y),c=Math.abs(e.x-a.x);if(Math.abs(i-e.y)*l>Math.abs(n-e.x)*d){let t=a.y<e.y?e.y-d-i:i-d-e.y;o=c*t/h;const n={x:a.x<e.x?a.x+o:a.x-c+o,y:a.y<e.y?a.y+h-t:a.y-h+t};return 0===o&&(n.x=e.x,n.y=e.y),0===c&&(n.x=e.x),0===h&&(n.y=e.y),r.l.debug(`abc89 topp/bott calc, Q ${h}, q ${t}, R ${c}, r ${o}`,n),n}{o=a.x<e.x?e.x-l-n:n-l-e.x;let t=h*o/c,i=a.x<e.x?a.x+c-o:a.x-c+o,s=a.y<e.y?a.y+t:a.y-t;return r.l.debug(`sides calc abc89, Q ${h}, q ${t}, R ${c}, r ${o}`,{_x:i,_y:s}),0===o&&(i=e.x,s=e.y),0===c&&(i=e.x),0===h&&(s=e.y),{x:i,y:s}}})(e,n,t);let l=!1;a.forEach((t=>{l=l||t.x===s.x&&t.y===s.y})),a.some((t=>t.x===s.x&&t.y===s.y))||a.push(s),i=!0}})),a},A=function(t,e,a,i,s,l,o){let d=a.points;r.l.debug("abc88 InsertEdge: edge=",a,"e=",e);let h=!1;const c=l.node(e.v);var y=l.node(e.w);(null==y?void 0:y.intersect)&&(null==c?void 0:c.intersect)&&(d=d.slice(1,a.points.length-1),d.unshift(c.intersect(d[0])),d.push(y.intersect(d[d.length-1]))),a.toCluster&&(r.l.debug("to cluster abc88",i[a.toCluster]),d=U(a.points,i[a.toCluster].node),h=!0),a.fromCluster&&(r.l.debug("from cluster abc88",i[a.fromCluster]),d=U(d.reverse(),i[a.fromCluster].node).reverse(),h=!0);const p=d.filter((t=>!Number.isNaN(t.y)));let g=n.qrM;!a.curve||"graph"!==s&&"flowchart"!==s||(g=a.curve);const{x:x,y:f}=R(a),u=(0,n.n8j)().x(x).y(f).curve(g);let w;switch(a.thickness){case"normal":w="edge-thickness-normal";break;case"thick":case"invisible":w="edge-thickness-thick";break;default:w=""}switch(a.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed"}const b=t.append("path").attr("d",u(p)).attr("id",a.id).attr("class"," "+w+(a.classes?" "+a.classes:"")).attr("style",a.style);let m="";((0,r.c)().flowchart.arrowMarkerAbsolute||(0,r.c)().state.arrowMarkerAbsolute)&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\(/g,"\\("),m=m.replace(/\)/g,"\\)")),Y(b,a,m,o,s);let k={};return h&&(k.updatedPath=d),k.originalPath=a.points,k}}}]); \ No newline at end of file diff --git a/assets/js/8947.2ac7d40e.js b/assets/js/8947.2ac7d40e.js new file mode 100644 index 00000000..8ab8adfb --- /dev/null +++ b/assets/js/8947.2ac7d40e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[8947],{8947:(t,i,e)=>{e.d(i,{diagram:()=>F});var s=e(6257),n=e(358),a=e(6312),h=(e(4353),e(6750),e(2838),function(){var t=function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],a=[1,6],h=[1,7],o=[1,5,10,12,14,16,18,19,21,23,34,35,36],r=[1,25],l=[1,26],c=[1,28],g=[1,29],u=[1,30],x=[1,31],d=[1,32],p=[1,33],f=[1,34],y=[1,35],m=[1,36],b=[1,37],A=[1,43],w=[1,42],S=[1,47],C=[1,50],k=[1,10,12,14,16,18,19,21,23,34,35,36],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],T=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],R=[1,64],D={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:function(t,i,e,s,n,a,h){var o=a.length-1;switch(n){case 5:s.setOrientation(a[o]);break;case 9:s.setDiagramTitle(a[o].text.trim());break;case 12:s.setLineData({text:"",type:"text"},a[o]);break;case 13:s.setLineData(a[o-1],a[o]);break;case 14:s.setBarData({text:"",type:"text"},a[o]);break;case 15:s.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),s.setAccDescription(this.$);break;case 19:case 27:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:s.setXAxisTitle(a[o]);break;case 23:s.setXAxisTitle(a[o-1]);break;case 24:s.setXAxisTitle({type:"text",text:""});break;case 25:s.setXAxisBand(a[o]);break;case 26:s.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:s.setYAxisTitle(a[o]);break;case 31:s.setYAxisTitle(a[o-1]);break;case 32:s.setYAxisTitle({type:"text",text:""});break;case 33:s.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}},table:[t(i,e,{3:1,4:2,7:4,5:s,34:n,35:a,36:h}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:n,35:a,36:h}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:a,36:h}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(o,[2,34]),t(o,[2,35]),t(o,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:n,35:a,36:h}),{1:[2,3]},t(o,[2,5]),t(i,[2,7],{4:22,34:n,35:a,36:h}),{11:23,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},{11:39,13:38,24:A,27:w,29:40,30:41,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},{11:45,15:44,27:S,33:46,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},{11:49,17:48,24:C,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},{11:52,17:51,24:C,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},{20:[1,53]},{22:[1,54]},t(k,[2,18]),{1:[2,2]},t(k,[2,8]),t(k,[2,9]),t(_,[2,37],{40:55,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b}),t(_,[2,38]),t(_,[2,39]),t(T,[2,40]),t(T,[2,42]),t(T,[2,43]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),t(T,[2,50]),t(T,[2,51]),t(k,[2,10]),t(k,[2,22],{30:41,29:56,24:A,27:w}),t(k,[2,24]),t(k,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},t(k,[2,11]),t(k,[2,30],{33:60,27:S}),t(k,[2,32]),{31:[1,61]},t(k,[2,12]),{17:62,24:C},{25:63,27:R},t(k,[2,14]),{17:65,24:C},t(k,[2,16]),t(k,[2,17]),t(T,[2,41]),t(k,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(k,[2,31]),{27:[1,69]},t(k,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(k,[2,15]),t(k,[2,26]),t(k,[2,27]),{11:59,32:72,37:24,38:r,39:l,40:27,41:c,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b},t(k,[2,33]),t(k,[2,19]),{25:73,27:R},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},parse:function(t){var i=this,e=[0],s=[],n=[null],a=[],h=this.table,o="",r=0,l=0,c=a.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var d=g.yylloc;a.push(d);var p=g.options&&g.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,y,m,b,A,w,S,C,k,_={};;){if(y=e[e.length-1],this.defaultActions[y]?m=this.defaultActions[y]:(null==f&&(k=void 0,"number"!=typeof(k=s.pop()||g.lex()||1)&&(k instanceof Array&&(k=(s=k).pop()),k=i.symbols_[k]||k),f=k),m=h[y]&&h[y][f]),void 0===m||!m.length||!m[0]){var T="";for(A in C=[],h[y])this.terminals_[A]&&A>2&&C.push("'"+this.terminals_[A]+"'");T=g.showPosition?"Parse error on line "+(r+1)+":\n"+g.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(r+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(T,{text:g.match,token:this.terminals_[f]||f,line:g.yylineno,loc:d,expected:C})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+f);switch(m[0]){case 1:e.push(f),n.push(g.yytext),a.push(g.yylloc),e.push(m[1]),f=null,l=g.yyleng,o=g.yytext,r=g.yylineno,d=g.yylloc;break;case 2:if(w=this.productions_[m[1]][1],_.$=n[n.length-w],_._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},p&&(_._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),void 0!==(b=this.performAction.apply(_,[o,l,r,u.yy,m[1],n,a].concat(c))))return b;w&&(e=e.slice(0,-1*w*2),n=n.slice(0,-1*w),a=a.slice(0,-1*w)),e.push(this.productions_[m[1]][0]),n.push(_.$),a.push(_._$),S=h[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0}},L={EOF:1,parseError:function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=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),e.length-1&&(this.yylineno-=e.length-1);var n=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},test_match:function(t,i){var e,s,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((e=this._input.match(this.rules[n[a]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,n[a])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,i,e,s){switch(e){case 0:case 1:case 5:case 43:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 25:case 27:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 26:this.pushState("string");break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 44:return 35;case 45:return 36}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};function P(){this.yy={}}return D.lexer=L,P.prototype=D,D.Parser=P,new P}());h.parser=h;const o=h;function r(t){return"bar"===t.type}function l(t){return"band"===t.type}function c(t){return"linear"===t.type}class g{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce(((t,i)=>Math.max(i.length,t)),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const a of t){const t=(0,n.c)(s,1,a),h=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,h),e.height=Math.max(e.height,o)}return s.remove(),e}}class u{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((t=>t.toString())),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);const n=e.height+2*this.axisConfig.labelPadding;this.labelTextHeight=e.height,n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const n=e.width+2*this.axisConfig.labelPadding;n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"})))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}}class x extends u{constructor(t,i,e,s,n){super(t,s,n,i),this.categories=e,this.scale=(0,a.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,a.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),s.l.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)||this.getRange()[0]}}class d extends u{constructor(t,i,e,s,n){super(t,s,n,i),this.domain=e,this.scale=(0,a.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,a.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}function p(t,i,e,s){const n=new g(s);return l(t)?new x(i,e,t.categories,t.title,n):new d(i,e,[t.min,t.max],t.title,n)}class f{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}}function y(t,i,e,s){const n=new g(s);return new f(n,t,i,e)}class m{constructor(t,i,e,s,n){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=n}getDrawableElement(){const t=this.plotData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]));let i;return i="horizontal"===this.orientation?(0,a.n8j)().y((t=>t[0])).x((t=>t[1]))(t):(0,a.n8j)().x((t=>t[0])).y((t=>t[1]))(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}class b{constructor(t,i,e,s,n,a){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=n,this.plotIndex=a}getDrawableElement(){const t=this.barData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])])),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]}}class A{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new m(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new b(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}}function w(t,i,e){return new A(t,i,e)}class S{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:y(t,i,e,s),plot:w(t,i,e),xAxis:p(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:p(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:a});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=h.height,this.componentStore.yAxis.setAxisPosition("left"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=h.width,t-=h.width,t>0&&(n+=t,t=0),i>0&&(a+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:a}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+a}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some((t=>r(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:h});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=o.width,s=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=o.height,n=e+o.height,t>0&&(a+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:h}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([n,n+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((t=>r(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}}class C{static build(t,i,e,s){return new S(t,i,e,s).getDrawableElement()}}let k,_=0,T=I(),R=v(),D=M(),L=R.plotColorPalette.split(",").map((t=>t.trim())),P=!1,E=!1;function v(){const t=(0,s.E)(),i=(0,s.F)();return(0,s.C)(t.xyChart,i.themeVariables.xyChart)}function I(){const t=(0,s.F)();return(0,s.C)(s.B.xyChart,t.xyChart)}function M(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function $(t){const i=(0,s.F)();return(0,s.d)(t.trim(),i)}function z(t,i){D.xAxis={type:"linear",title:D.xAxis.title,min:t,max:i},P=!0}function B(t){let i=[];if(0===t.length)return i;if(!P){const i=c(D.xAxis)?D.xAxis.min:1/0,e=c(D.xAxis)?D.xAxis.max:-1/0;z(Math.min(i,1),Math.max(e,t.length))}if(E||function(t){const i=Math.min(...t),e=Math.max(...t),s=c(D.yAxis)?D.yAxis.min:1/0,n=c(D.yAxis)?D.yAxis.max:-1/0;D.yAxis={type:"linear",title:D.yAxis.title,min:Math.min(s,i),max:Math.max(n,e)}}(t),l(D.xAxis)&&(i=D.xAxis.categories.map(((i,e)=>[i,t[e]]))),c(D.xAxis)){const e=D.xAxis.min,s=D.xAxis.max,n=(s-e+1)/t.length,a=[];for(let t=e;t<=s;t+=n)a.push(`${t}`);i=a.map(((i,e)=>[i,t[e]]))}return i}function W(t){return L[0===t?0:t%L.length]}const F={parser:o,db:{getDrawableElem:function(){if(0===D.plots.length)throw Error("No Plot to render, please provide a plot with some data");return D.title=(0,s.t)(),C.build(T,D,R,k)},clear:function(){(0,s.v)(),_=0,T=I(),D={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},R=v(),L=R.plotColorPalette.split(",").map((t=>t.trim())),P=!1,E=!1},setAccTitle:s.s,getAccTitle:s.g,setDiagramTitle:s.q,getDiagramTitle:s.t,getAccDescription:s.a,setAccDescription:s.b,setOrientation:function(t){T.chartOrientation="horizontal"===t?"horizontal":"vertical"},setXAxisTitle:function(t){D.xAxis.title=$(t.text)},setXAxisRangeData:z,setXAxisBand:function(t){D.xAxis={type:"band",title:D.xAxis.title,categories:t.map((t=>$(t.text)))},P=!0},setYAxisTitle:function(t){D.yAxis.title=$(t.text)},setYAxisRangeData:function(t,i){D.yAxis={type:"linear",title:D.yAxis.title,min:t,max:i},E=!0},setLineData:function(t,i){const e=B(i);D.plots.push({type:"line",strokeFill:W(_),strokeWidth:2,data:e}),_++},setBarData:function(t,i){const e=B(i);D.plots.push({type:"bar",fill:W(_),data:e}),_++},setTmpSVGG:function(t){k=t},getChartThemeConfig:function(){return R},getChartConfig:function(){return T}},renderer:{draw:(t,i,e,n)=>{const a=n.db,h=a.getChartThemeConfig(),o=a.getChartConfig();function r(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}s.l.debug("Rendering xychart chart\n"+t);const l=(0,s.A)(i),c=l.append("g").attr("class","main"),g=c.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");(0,s.i)(l,o.height,o.width,!0),l.attr("viewBox",`0 0 ${o.width} ${o.height}`),g.attr("fill",h.backgroundColor),a.setTmpSVGG(l.append("g").attr("class","mermaid-tmp-group"));const u=a.getDrawableElem(),x={};function d(t){let i=c,e="";for(const[s]of t.entries()){let n=c;s>0&&x[e]&&(n=x[e]),e+=t[s],i=x[e],i||(i=x[e]=n.append("g").attr("class",t[s]))}return i}for(const s of u){if(0===s.data.length)continue;const t=d(s.groupTexts);switch(s.type){case"rect":t.selectAll("rect").data(s.data).enter().append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth));break;case"text":t.selectAll("text").data(s.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>"top"===t.verticalPos?"text-before-edge":"middle")).attr("text-anchor",(t=>{return"left"===(i=t.horizontalPos)?"start":"right"===i?"end":"middle";var i})).attr("transform",(t=>r(t))).text((t=>t.text));break;case"path":t.selectAll("path").data(s.data).enter().append("path").attr("d",(t=>t.path)).attr("fill",(t=>t.fill?t.fill:"none")).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth))}}}}}}}]); \ No newline at end of file diff --git a/assets/js/9469.d0368221.js b/assets/js/9469.d0368221.js new file mode 100644 index 00000000..bd5049ba --- /dev/null +++ b/assets/js/9469.d0368221.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[9469],{9469:(t,i,n)=>{n.d(i,{diagram:()=>o});var s=n(6257),e=(n(4353),n(6750),n(6312),n(2838),function(){var t=function(t,i,n,s){for(n=n||{},s=t.length;s--;n[t[s]]=i);return n},i=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,i,n,s,e,r,h){switch(r.length,e){case 1:return s;case 4:break;case 6:s.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(i,[2,3]),t(i,[2,4]),t(i,[2,5]),t(i,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,i){if(!i.recoverable){var n=new Error(t);throw n.hash=i,n}this.trace(t)},parse:function(t){var i=this,n=[0],s=[],e=[null],r=[],h=this.table,o="",l=0,c=0,a=r.slice.call(arguments,1),y=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);y.setInput(t,u.yy),u.yy.lexer=y,u.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc;r.push(f);var g=y.options&&y.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,m,d,k,x,b,v,w,I,S={};;){if(m=n[n.length-1],this.defaultActions[m]?d=this.defaultActions[m]:(null==_&&(I=void 0,"number"!=typeof(I=s.pop()||y.lex()||1)&&(I instanceof Array&&(I=(s=I).pop()),I=i.symbols_[I]||I),_=I),d=h[m]&&h[m][_]),void 0===d||!d.length||!d[0]){var E="";for(x in w=[],h[m])this.terminals_[x]&&x>2&&w.push("'"+this.terminals_[x]+"'");E=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(E,{text:y.match,token:this.terminals_[_]||_,line:y.yylineno,loc:f,expected:w})}if(d[0]instanceof Array&&d.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+_);switch(d[0]){case 1:n.push(_),e.push(y.yytext),r.push(y.yylloc),n.push(d[1]),_=null,c=y.yyleng,o=y.yytext,l=y.yylineno,f=y.yylloc;break;case 2:if(b=this.productions_[d[1]][1],S.$=e[e.length-b],S._$={first_line:r[r.length-(b||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(b||1)].first_column,last_column:r[r.length-1].last_column},g&&(S._$.range=[r[r.length-(b||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(S,[o,c,l,u.yy,d[1],e,r].concat(a))))return k;b&&(n=n.slice(0,-1*b*2),e=e.slice(0,-1*b),r=r.slice(0,-1*b)),n.push(this.productions_[d[1]][0]),e.push(S.$),r.push(S._$),v=h[n[n.length-2]][n[n.length-1]],n.push(v);break;case 3:return!0}}return!0}},s={EOF:1,parseError:function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=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===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},test_match:function(t,i){var n,s,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))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in e)this[r]=e[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,i,n,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e=this._currentRules(),r=0;r<e.length;r++)if((n=this._input.match(this.rules[e[r]]))&&(!i||n[0].length>i[0].length)){if(i=n,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,e[r])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,e[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,i,n,s){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function e(){this.yy={}}return n.lexer=s,e.prototype=n,n.Parser=e,new e}());e.parser=e;const r=!1;let h=r;const o={parser:e,db:{clear:()=>{h=r},setInfo:t=>{h=t},getInfo:()=>h},renderer:{draw:(t,i,n)=>{s.l.debug("rendering info diagram\n"+t);const e=(0,s.A)(i);(0,s.i)(e,100,400,!0);e.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)}}}}}]); \ No newline at end of file diff --git a/assets/js/947.6a173dc7.js b/assets/js/947.6a173dc7.js new file mode 100644 index 00000000..0aebb1e8 --- /dev/null +++ b/assets/js/947.6a173dc7.js @@ -0,0 +1,14654 @@ +"use strict"; +exports.id = 947; +exports.ids = [947]; +exports.modules = { + +/***/ 3791: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + a: () => (/* binding */ createText), + c: () => (/* binding */ computeDimensionOfText) +}); + +// NAMESPACE OBJECT: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +var constructs_namespaceObject = {}; +__webpack_require__.r(constructs_namespaceObject); +__webpack_require__.d(constructs_namespaceObject, { + attentionMarkers: () => (attentionMarkers), + contentInitial: () => (contentInitial), + disable: () => (disable), + document: () => (constructs_document), + flow: () => (constructs_flow), + flowInitial: () => (flowInitial), + insideSpan: () => (insideSpan), + string: () => (constructs_string), + text: () => (constructs_text) +}); + +// EXTERNAL MODULE: ./node_modules/mermaid/dist/mermaid-f47111a7.js + 8 modules +var mermaid_f47111a7 = __webpack_require__(6257); +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-to-string/lib/index.js +/** + * @typedef {import('mdast').Root|import('mdast').Content} Node + * + * @typedef Options + * Configuration (optional). + * @property {boolean | null | undefined} [includeImageAlt=true] + * Whether to use `alt` for `image`s. + * @property {boolean | null | undefined} [includeHtml=true] + * Whether to use `value` of HTML. + */ + +/** @type {Options} */ +const emptyOptions = {} + +/** + * Get the text content of a node or list of nodes. + * + * Prefers the node’s plain-text fields, otherwise serializes its children, + * and if the given value is an array, serialize the nodes in it. + * + * @param {unknown} value + * Thing to serialize, typically `Node`. + * @param {Options | null | undefined} [options] + * Configuration (optional). + * @returns {string} + * Serialized `value`. + */ +function lib_toString(value, options) { + const settings = options || emptyOptions + const includeImageAlt = + typeof settings.includeImageAlt === 'boolean' + ? settings.includeImageAlt + : true + const includeHtml = + typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true + + return one(value, includeImageAlt, includeHtml) +} + +/** + * One node or several nodes. + * + * @param {unknown} value + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized node. + */ +function one(value, includeImageAlt, includeHtml) { + if (node(value)) { + if ('value' in value) { + return value.type === 'html' && !includeHtml ? '' : value.value + } + + if (includeImageAlt && 'alt' in value && value.alt) { + return value.alt + } + + if ('children' in value) { + return lib_all(value.children, includeImageAlt, includeHtml) + } + } + + if (Array.isArray(value)) { + return lib_all(value, includeImageAlt, includeHtml) + } + + return '' +} + +/** + * Serialize a list of nodes. + * + * @param {Array<unknown>} values + * Thing to serialize. + * @param {boolean} includeImageAlt + * Include image `alt`s. + * @param {boolean} includeHtml + * Include HTML. + * @returns {string} + * Serialized nodes. + */ +function lib_all(values, includeImageAlt, includeHtml) { + /** @type {Array<string>} */ + const result = [] + let index = -1 + + while (++index < values.length) { + result[index] = one(values[index], includeImageAlt, includeHtml) + } + + return result.join('') +} + +/** + * Check if `value` looks like a node. + * + * @param {unknown} value + * Thing. + * @returns {value is Node} + * Whether `value` is a node. + */ +function node(value) { + return Boolean(value && typeof value === 'object') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array<T>} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array<unknown>} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {Array<T>} items + * Items to add to `list`. + * @returns {Array<T>} + * Either `list` or `items`. + */ +function push(list, items) { + if (list.length > 0) { + splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-combine-extensions/index.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + * @typedef {import('micromark-util-types').Handles} Handles + * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension + * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension + */ + + + +const micromark_util_combine_extensions_hasOwnProperty = {}.hasOwnProperty + +/** + * Combine multiple syntax extensions into one. + * + * @param {Array<Extension>} extensions + * List of syntax extensions. + * @returns {NormalizedExtension} + * A single combined extension. + */ +function combineExtensions(extensions) { + /** @type {NormalizedExtension} */ + const all = {} + let index = -1 + + while (++index < extensions.length) { + syntaxExtension(all, extensions[index]) + } + + return all +} + +/** + * Merge `extension` into `all`. + * + * @param {NormalizedExtension} all + * Extension to merge into. + * @param {Extension} extension + * Extension to merge. + * @returns {void} + */ +function syntaxExtension(all, extension) { + /** @type {keyof Extension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + /** @type {Record<string, unknown>} */ + const left = maybe || (all[hook] = {}) + /** @type {Record<string, unknown> | undefined} */ + const right = extension[hook] + /** @type {string} */ + let code + + if (right) { + for (code in right) { + if (!micromark_util_combine_extensions_hasOwnProperty.call(left, code)) left[code] = [] + const value = right[code] + constructs( + // @ts-expect-error Looks like a list. + left[code], + Array.isArray(value) ? value : value ? [value] : [] + ) + } + } + } +} + +/** + * Merge `list` into `existing` (both lists of constructs). + * Mutates `existing`. + * + * @param {Array<unknown>} existing + * @param {Array<unknown>} list + * @returns {void} + */ +function constructs(existing, list) { + let index = -1 + /** @type {Array<unknown>} */ + const before = [] + + while (++index < list.length) { + // @ts-expect-error Looks like an object. + ;(list[index].add === 'after' ? existing : before).push(list[index]) + } + + splice(existing, 0, 0, before) +} + +/** + * Combine multiple HTML extensions into one. + * + * @param {Array<HtmlExtension>} htmlExtensions + * List of HTML extensions. + * @returns {HtmlExtension} + * A single combined HTML extension. + */ +function combineHtmlExtensions(htmlExtensions) { + /** @type {HtmlExtension} */ + const handlers = {} + let index = -1 + + while (++index < htmlExtensions.length) { + htmlExtension(handlers, htmlExtensions[index]) + } + + return handlers +} + +/** + * Merge `extension` into `all`. + * + * @param {HtmlExtension} all + * Extension to merge into. + * @param {HtmlExtension} extension + * Extension to merge. + * @returns {void} + */ +function htmlExtension(all, extension) { + /** @type {keyof HtmlExtension} */ + let hook + + for (hook in extension) { + const maybe = micromark_util_combine_extensions_hasOwnProperty.call(all, hook) ? all[hook] : undefined + const left = maybe || (all[hook] = {}) + const right = extension[hook] + /** @type {keyof Handles} */ + let type + + if (right) { + for (type in right) { + // @ts-expect-error assume document vs regular handler are managed correctly. + left[type] = right[type] + } + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +// This module is generated by `script/`. +// +// CommonMark handles attention (emphasis, strong) markers based on what comes +// before or after them. +// One such difference is if those characters are Unicode punctuation. +// This script is generated from the Unicode data. + +/** + * Regular expression that matches a unicode punctuation character. + */ +const unicodePunctuationRegex = + /[!-\/:-@\[-`\{-~\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]/ + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + + +/** + * Check whether the character code represents an ASCII alpha (`a` through `z`, + * case insensitive). + * + * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha. + * + * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`) + * to U+005A (`Z`). + * + * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`) + * to U+007A (`z`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlpha = regexCheck(/[A-Za-z]/) + +/** + * Check whether the character code represents an ASCII alphanumeric (`a` + * through `z`, case insensitive, or `0` through `9`). + * + * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha + * (see `asciiAlpha`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/) + +/** + * Check whether the character code represents an ASCII atext. + * + * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in + * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`), + * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F + * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E + * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE + * (`{`) to U+007E TILDE (`~`). + * + * See: + * **\[RFC5322]**: + * [Internet Message Format](https://tools.ietf.org/html/rfc5322). + * P. Resnick. + * IETF. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/) + +/** + * Check whether a character code is an ASCII control character. + * + * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL) + * to U+001F (US), or U+007F (DEL). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function asciiControl(code) { + return ( + // Special whitespace codes (which have negative values), C0 and Control + // character DEL + code !== null && (code < 32 || code === 127) + ) +} + +/** + * Check whether the character code represents an ASCII digit (`0` through `9`). + * + * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to + * U+0039 (`9`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiDigit = regexCheck(/\d/) + +/** + * Check whether the character code represents an ASCII hex digit (`a` through + * `f`, case insensitive, or `0` through `9`). + * + * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex + * digit, or an ASCII lower hex digit. + * + * An **ASCII upper hex digit** is a character in the inclusive range U+0041 + * (`A`) to U+0046 (`F`). + * + * An **ASCII lower hex digit** is a character in the inclusive range U+0061 + * (`a`) to U+0066 (`f`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiHexDigit = regexCheck(/[\dA-Fa-f]/) + +/** + * Check whether the character code represents ASCII punctuation. + * + * An **ASCII punctuation** is a character in the inclusive ranges U+0021 + * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT + * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT + * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`). + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/) + +/** + * Check whether a character code is a markdown line ending. + * + * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN + * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR). + * + * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE + * RETURN (CR) are replaced by these virtual characters depending on whether + * they occurred together. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEnding(code) { + return code !== null && code < -2 +} + +/** + * Check whether a character code is a markdown line ending (see + * `markdownLineEnding`) or markdown space (see `markdownSpace`). + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownLineEndingOrSpace(code) { + return code !== null && (code < 0 || code === 32) +} + +/** + * Check whether a character code is a markdown space. + * + * A **markdown space** is the concrete character U+0020 SPACE (SP) and the + * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT). + * + * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is + * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL + * SPACE (VS) characters, depending on the column at which the tab occurred. + * + * @param {Code} code + * Code. + * @returns {boolean} + * Whether it matches. + */ +function markdownSpace(code) { + return code === -2 || code === -1 || code === 32 +} + +// Size note: removing ASCII from the regex and using `asciiPunctuation` here +// In fact adds to the bundle size. +/** + * Check whether the character code represents Unicode punctuation. + * + * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation, + * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf` + * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po` + * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII + * punctuation (see `asciiPunctuation`). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodePunctuation = regexCheck(unicodePunctuationRegex) + +/** + * Check whether the character code represents Unicode whitespace. + * + * Note that this does handle micromark specific markdown whitespace characters. + * See `markdownLineEndingOrSpace` to check that. + * + * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator, + * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), + * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**). + * + * See: + * **\[UNICODE]**: + * [The Unicode Standard](https://www.unicode.org/versions/). + * Unicode Consortium. + * + * @param code + * Code. + * @returns + * Whether it matches. + */ +const unicodeWhitespace = regexCheck(/\s/) + +/** + * Create a code check from a regex. + * + * @param {RegExp} regex + * @returns {(code: Code) => boolean} + */ +function regexCheck(regex) { + return check + + /** + * Check whether a code matches the bound regex. + * + * @param {Code} code + * Character code. + * @returns {boolean} + * Whether the character code matches the bound regex. + */ + function check(code) { + return code !== null && regex.test(String.fromCharCode(code)) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-space/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`. + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * spaces in markdown are often optional, in which case this factory can be + * used and `ok` will be switched to whether spaces were found or not + * * one line ending or space can be detected with `markdownSpace(code)` right + * before using `factorySpace` + * + * ###### Examples + * + * Where `␉` represents a tab (plus how much it expands) and `␠` represents a + * single space. + * + * ```markdown + * ␉ + * ␠␠␠␠ + * ␉␠ + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {TokenType} type + * Type (`' \t'`). + * @param {number | undefined} [max=Infinity] + * Max (exclusive). + * @returns + * Start state. + */ +function factorySpace(effects, ok, type, max) { + const limit = max ? max - 1 : Number.POSITIVE_INFINITY + let size = 0 + return start + + /** @type {State} */ + function start(code) { + if (markdownSpace(code)) { + effects.enter(type) + return prefix(code) + } + return ok(code) + } + + /** @type {State} */ + function prefix(code) { + if (markdownSpace(code) && size++ < limit) { + effects.consume(code) + return prefix + } + effects.exit(type) + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/content.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + +/** @type {InitialConstruct} */ +const content = { + tokenize: initializeContent +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeContent(effects) { + const contentStart = effects.attempt( + this.parser.constructs.contentInitial, + afterContentStartConstruct, + paragraphInitial + ) + /** @type {Token} */ + let previous + return contentStart + + /** @type {State} */ + function afterContentStartConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, contentStart, 'linePrefix') + } + + /** @type {State} */ + function paragraphInitial(code) { + effects.enter('paragraph') + return lineStart(code) + } + + /** @type {State} */ + function lineStart(code) { + const token = effects.enter('chunkText', { + contentType: 'text', + previous + }) + if (previous) { + previous.next = token + } + previous = token + return data(code) + } + + /** @type {State} */ + function data(code) { + if (code === null) { + effects.exit('chunkText') + effects.exit('paragraph') + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + effects.exit('chunkText') + return lineStart + } + + // Data. + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/document.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + +/** + * @typedef {[Construct, ContainerState]} StackItem + */ + + + + +/** @type {InitialConstruct} */ +const document_document = { + tokenize: initializeDocument +} + +/** @type {Construct} */ +const containerConstruct = { + tokenize: tokenizeContainer +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeDocument(effects) { + const self = this + /** @type {Array<StackItem>} */ + const stack = [] + let continued = 0 + /** @type {TokenizeContext | undefined} */ + let childFlow + /** @type {Token | undefined} */ + let childToken + /** @type {number} */ + let lineStartOffset + return start + + /** @type {State} */ + function start(code) { + // First we iterate through the open blocks, starting with the root + // document, and descending through last children down to the last open + // block. + // Each block imposes a condition that the line must satisfy if the block is + // to remain open. + // For example, a block quote requires a `>` character. + // A paragraph requires a non-blank line. + // In this phase we may match all or just some of the open blocks. + // But we cannot close unmatched blocks yet, because we may have a lazy + // continuation line. + if (continued < stack.length) { + const item = stack[continued] + self.containerState = item[1] + return effects.attempt( + item[0].continuation, + documentContinue, + checkNewContainers + )(code) + } + + // Done. + return checkNewContainers(code) + } + + /** @type {State} */ + function documentContinue(code) { + continued++ + + // Note: this field is called `_closeFlow` but it also closes containers. + // Perhaps a good idea to rename it but it’s already used in the wild by + // extensions. + if (self.containerState._closeFlow) { + self.containerState._closeFlow = undefined + if (childFlow) { + closeFlow() + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when dealing with lazy lines in `writeToChild`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {Point | undefined} */ + let point + + // Find the flow chunk. + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + point = self.events[indexBeforeFlow][1].end + break + } + } + exitContainers(continued) + + // Fix positions. + let index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + return checkNewContainers(code) + } + return start(code) + } + + /** @type {State} */ + function checkNewContainers(code) { + // Next, after consuming the continuation markers for existing blocks, we + // look for new block starts (e.g. `>` for a block quote). + // If we encounter a new block start, we close any blocks unmatched in + // step 1 before creating the new block as a child of the last matched + // block. + if (continued === stack.length) { + // No need to `check` whether there’s a container, of `exitContainers` + // would be moot. + // We can instead immediately `attempt` to parse one. + if (!childFlow) { + return documentContinued(code) + } + + // If we have concrete content, such as block HTML or fenced code, + // we can’t have containers “pierce” into them, so we can immediately + // start. + if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { + return flowStart(code) + } + + // If we do have flow, it could still be a blank line, + // but we’d be interrupting it w/ a new container if there’s a current + // construct. + // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer + // needed in micromark-extension-gfm-table@1.0.6). + self.interrupt = Boolean( + childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack + ) + } + + // Check if there is a new container. + self.containerState = {} + return effects.check( + containerConstruct, + thereIsANewContainer, + thereIsNoNewContainer + )(code) + } + + /** @type {State} */ + function thereIsANewContainer(code) { + if (childFlow) closeFlow() + exitContainers(continued) + return documentContinued(code) + } + + /** @type {State} */ + function thereIsNoNewContainer(code) { + self.parser.lazy[self.now().line] = continued !== stack.length + lineStartOffset = self.now().offset + return flowStart(code) + } + + /** @type {State} */ + function documentContinued(code) { + // Try new containers. + self.containerState = {} + return effects.attempt( + containerConstruct, + containerContinue, + flowStart + )(code) + } + + /** @type {State} */ + function containerContinue(code) { + continued++ + stack.push([self.currentConstruct, self.containerState]) + // Try another. + return documentContinued(code) + } + + /** @type {State} */ + function flowStart(code) { + if (code === null) { + if (childFlow) closeFlow() + exitContainers(0) + effects.consume(code) + return + } + childFlow = childFlow || self.parser.flow(self.now()) + effects.enter('chunkFlow', { + contentType: 'flow', + previous: childToken, + _tokenizer: childFlow + }) + return flowContinue(code) + } + + /** @type {State} */ + function flowContinue(code) { + if (code === null) { + writeToChild(effects.exit('chunkFlow'), true) + exitContainers(0) + effects.consume(code) + return + } + if (markdownLineEnding(code)) { + effects.consume(code) + writeToChild(effects.exit('chunkFlow')) + // Get ready for the next line. + continued = 0 + self.interrupt = undefined + return start + } + effects.consume(code) + return flowContinue + } + + /** + * @param {Token} token + * @param {boolean | undefined} [eof] + * @returns {void} + */ + function writeToChild(token, eof) { + const stream = self.sliceStream(token) + if (eof) stream.push(null) + token.previous = childToken + if (childToken) childToken.next = token + childToken = token + childFlow.defineSkip(token.start) + childFlow.write(stream) + + // Alright, so we just added a lazy line: + // + // ```markdown + // > a + // b. + // + // Or: + // + // > ~~~c + // d + // + // Or: + // + // > | e | + // f + // ``` + // + // The construct in the second example (fenced code) does not accept lazy + // lines, so it marked itself as done at the end of its first line, and + // then the content construct parses `d`. + // Most constructs in markdown match on the first line: if the first line + // forms a construct, a non-lazy line can’t “unmake” it. + // + // The construct in the third example is potentially a GFM table, and + // those are *weird*. + // It *could* be a table, from the first line, if the following line + // matches a condition. + // In this case, that second line is lazy, which “unmakes” the first line + // and turns the whole into one content block. + // + // We’ve now parsed the non-lazy and the lazy line, and can figure out + // whether the lazy line started a new flow block. + // If it did, we exit the current containers between the two flow blocks. + if (self.parser.lazy[token.start.line]) { + let index = childFlow.events.length + while (index--) { + if ( + // The token starts before the line ending… + childFlow.events[index][1].start.offset < lineStartOffset && + // …and either is not ended yet… + (!childFlow.events[index][1].end || + // …or ends after it. + childFlow.events[index][1].end.offset > lineStartOffset) + ) { + // Exit: there’s still something open, which means it’s a lazy line + // part of something. + return + } + } + + // Note: this algorithm for moving events around is similar to the + // algorithm when closing flow in `documentContinue`. + const indexBeforeExits = self.events.length + let indexBeforeFlow = indexBeforeExits + /** @type {boolean | undefined} */ + let seen + /** @type {Point | undefined} */ + let point + + // Find the previous chunk (the one before the lazy line). + while (indexBeforeFlow--) { + if ( + self.events[indexBeforeFlow][0] === 'exit' && + self.events[indexBeforeFlow][1].type === 'chunkFlow' + ) { + if (seen) { + point = self.events[indexBeforeFlow][1].end + break + } + seen = true + } + } + exitContainers(continued) + + // Fix positions. + index = indexBeforeExits + while (index < self.events.length) { + self.events[index][1].end = Object.assign({}, point) + index++ + } + + // Inject the exits earlier (they’re still also at the end). + splice( + self.events, + indexBeforeFlow + 1, + 0, + self.events.slice(indexBeforeExits) + ) + + // Discard the duplicate exits. + self.events.length = index + } + } + + /** + * @param {number} size + * @returns {void} + */ + function exitContainers(size) { + let index = stack.length + + // Exit open containers. + while (index-- > size) { + const entry = stack[index] + self.containerState = entry[1] + entry[0].exit.call(self, effects) + } + stack.length = size + } + function closeFlow() { + childFlow.write([null]) + childToken = undefined + childFlow = undefined + self.containerState._closeFlow = undefined + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContainer(effects, ok, nok) { + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(this.parser.constructs.document, ok, nok), + 'linePrefix', + this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/blank-line.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blankLine = { + tokenize: tokenizeBlankLine, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLine(effects, ok, nok) { + return start + + /** + * Start of blank line. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + return markdownSpace(code) + ? factorySpace(effects, after, 'linePrefix')(code) + : after(code) + } + + /** + * At eof/eol, after optional whitespace. + * + * > 👉 **Note**: `␠` represents a space character. + * + * ```markdown + * > | ␠␠␊ + * ^ + * > | ␊ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/node_modules/micromark-util-chunked/index.js +/** + * Like `Array#splice`, but smarter for giant arrays. + * + * `Array#splice` takes all items to be inserted as individual argument which + * causes a stack overflow in V8 when trying to insert 100k items for instance. + * + * Otherwise, this does not return the removed items, and takes `items` as an + * array instead of rest parameters. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {number} start + * Index to remove/insert at (can be negative). + * @param {number} remove + * Number of items to remove. + * @param {Array<T>} items + * Items to inject into `list`. + * @returns {void} + * Nothing. + */ +function micromark_util_chunked_splice(list, start, remove, items) { + const end = list.length + let chunkStart = 0 + /** @type {Array<unknown>} */ + let parameters + + // Make start between zero and `end` (included). + if (start < 0) { + start = -start > end ? 0 : end + start + } else { + start = start > end ? end : start + } + remove = remove > 0 ? remove : 0 + + // No need to chunk the items if there’s only a couple (10k) items. + if (items.length < 10000) { + parameters = Array.from(items) + parameters.unshift(start, remove) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + } else { + // Delete `remove` items starting from `start` + if (remove) list.splice(start, remove) + + // Insert the items in chunks to not cause stack overflows. + while (chunkStart < items.length) { + parameters = items.slice(chunkStart, chunkStart + 10000) + parameters.unshift(start, 0) + // @ts-expect-error Hush, it’s fine. + list.splice(...parameters) + chunkStart += 10000 + start += 10000 + } + } +} + +/** + * Append `items` (an array) at the end of `list` (another array). + * When `list` was empty, returns `items` instead. + * + * This prevents a potentially expensive operation when `list` is empty, + * and adds items in batches to prevent V8 from hanging. + * + * @template {unknown} T + * Item type. + * @param {Array<T>} list + * List to operate on. + * @param {Array<T>} items + * Items to add to `list`. + * @returns {Array<T>} + * Either `list` or `items`. + */ +function micromark_util_chunked_push(list, items) { + if (list.length > 0) { + micromark_util_chunked_splice(list, list.length, 0, items) + return list + } + return items +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-subtokenize/index.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Token} Token + */ + + +/** + * Tokenize subcontent. + * + * @param {Array<Event>} events + * List of events. + * @returns {boolean} + * Whether subtokens were found. + */ +function subtokenize(events) { + /** @type {Record<string, number>} */ + const jumps = {} + let index = -1 + /** @type {Event} */ + let event + /** @type {number | undefined} */ + let lineIndex + /** @type {number} */ + let otherIndex + /** @type {Event} */ + let otherEvent + /** @type {Array<Event>} */ + let parameters + /** @type {Array<Event>} */ + let subevents + /** @type {boolean | undefined} */ + let more + while (++index < events.length) { + while (index in jumps) { + index = jumps[index] + } + event = events[index] + + // Add a hook for the GFM tasklist extension, which needs to know if text + // is in the first content of a list item. + if ( + index && + event[1].type === 'chunkFlow' && + events[index - 1][1].type === 'listItemPrefix' + ) { + subevents = event[1]._tokenizer.events + otherIndex = 0 + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'lineEndingBlank' + ) { + otherIndex += 2 + } + if ( + otherIndex < subevents.length && + subevents[otherIndex][1].type === 'content' + ) { + while (++otherIndex < subevents.length) { + if (subevents[otherIndex][1].type === 'content') { + break + } + if (subevents[otherIndex][1].type === 'chunkText') { + subevents[otherIndex][1]._isInFirstContentOfListItem = true + otherIndex++ + } + } + } + } + + // Enter. + if (event[0] === 'enter') { + if (event[1].contentType) { + Object.assign(jumps, subcontent(events, index)) + index = jumps[index] + more = true + } + } + // Exit. + else if (event[1]._container) { + otherIndex = index + lineIndex = undefined + while (otherIndex--) { + otherEvent = events[otherIndex] + if ( + otherEvent[1].type === 'lineEnding' || + otherEvent[1].type === 'lineEndingBlank' + ) { + if (otherEvent[0] === 'enter') { + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + } + otherEvent[1].type = 'lineEnding' + lineIndex = otherIndex + } + } else { + break + } + } + if (lineIndex) { + // Fix position. + event[1].end = Object.assign({}, events[lineIndex][1].start) + + // Switch container exit w/ line endings. + parameters = events.slice(lineIndex, index) + parameters.unshift(event) + micromark_util_chunked_splice(events, lineIndex, index - lineIndex + 1, parameters) + } + } + } + return !more +} + +/** + * Tokenize embedded tokens. + * + * @param {Array<Event>} events + * @param {number} eventIndex + * @returns {Record<string, number>} + */ +function subcontent(events, eventIndex) { + const token = events[eventIndex][1] + const context = events[eventIndex][2] + let startPosition = eventIndex - 1 + /** @type {Array<number>} */ + const startPositions = [] + const tokenizer = + token._tokenizer || context.parser[token.contentType](token.start) + const childEvents = tokenizer.events + /** @type {Array<[number, number]>} */ + const jumps = [] + /** @type {Record<string, number>} */ + const gaps = {} + /** @type {Array<Chunk>} */ + let stream + /** @type {Token | undefined} */ + let previous + let index = -1 + /** @type {Token | undefined} */ + let current = token + let adjust = 0 + let start = 0 + const breaks = [start] + + // Loop forward through the linked tokens to pass them in order to the + // subtokenizer. + while (current) { + // Find the position of the event for this token. + while (events[++startPosition][1] !== current) { + // Empty. + } + startPositions.push(startPosition) + if (!current._tokenizer) { + stream = context.sliceStream(current) + if (!current.next) { + stream.push(null) + } + if (previous) { + tokenizer.defineSkip(current.start) + } + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = true + } + tokenizer.write(stream) + if (current._isInFirstContentOfListItem) { + tokenizer._gfmTasklistFirstContentOfListItem = undefined + } + } + + // Unravel the next token. + previous = current + current = current.next + } + + // Now, loop back through all events (and linked tokens), to figure out which + // parts belong where. + current = token + while (++index < childEvents.length) { + if ( + // Find a void token that includes a break. + childEvents[index][0] === 'exit' && + childEvents[index - 1][0] === 'enter' && + childEvents[index][1].type === childEvents[index - 1][1].type && + childEvents[index][1].start.line !== childEvents[index][1].end.line + ) { + start = index + 1 + breaks.push(start) + // Help GC. + current._tokenizer = undefined + current.previous = undefined + current = current.next + } + } + + // Help GC. + tokenizer.events = [] + + // If there’s one more token (which is the cases for lines that end in an + // EOF), that’s perfect: the last point we found starts it. + // If there isn’t then make sure any remaining content is added to it. + if (current) { + // Help GC. + current._tokenizer = undefined + current.previous = undefined + } else { + breaks.pop() + } + + // Now splice the events from the subtokenizer into the current events, + // moving back to front so that splice indices aren’t affected. + index = breaks.length + while (index--) { + const slice = childEvents.slice(breaks[index], breaks[index + 1]) + const start = startPositions.pop() + jumps.unshift([start, start + slice.length - 1]) + micromark_util_chunked_splice(events, start, 2, slice) + } + index = -1 + while (++index < jumps.length) { + gaps[adjust + jumps[index][0]] = adjust + jumps[index][1] + adjust += jumps[index][1] - jumps[index][0] - 1 + } + return gaps +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/content.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** + * No name because it must not be turned off. + * @type {Construct} + */ +const content_content = { + tokenize: tokenizeContent, + resolve: resolveContent +} + +/** @type {Construct} */ +const continuationConstruct = { + tokenize: tokenizeContinuation, + partial: true +} + +/** + * Content is transparent: it’s parsed right now. That way, definitions are also + * parsed right now: before text in paragraphs (specifically, media) are parsed. + * + * @type {Resolver} + */ +function resolveContent(events) { + subtokenize(events) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContent(effects, ok) { + /** @type {Token | undefined} */ + let previous + return chunkStart + + /** + * Before a content chunk. + * + * ```markdown + * > | abc + * ^ + * ``` + * + * @type {State} + */ + function chunkStart(code) { + effects.enter('content') + previous = effects.enter('chunkContent', { + contentType: 'content' + }) + return chunkInside(code) + } + + /** + * In a content chunk. + * + * ```markdown + * > | abc + * ^^^ + * ``` + * + * @type {State} + */ + function chunkInside(code) { + if (code === null) { + return contentEnd(code) + } + + // To do: in `markdown-rs`, each line is parsed on its own, and everything + // is stitched together resolving. + if (markdownLineEnding(code)) { + return effects.check( + continuationConstruct, + contentContinue, + contentEnd + )(code) + } + + // Data. + effects.consume(code) + return chunkInside + } + + /** + * + * + * @type {State} + */ + function contentEnd(code) { + effects.exit('chunkContent') + effects.exit('content') + return ok(code) + } + + /** + * + * + * @type {State} + */ + function contentContinue(code) { + effects.consume(code) + effects.exit('chunkContent') + previous.next = effects.enter('chunkContent', { + contentType: 'content', + previous + }) + previous = previous.next + return chunkInside + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeContinuation(effects, ok, nok) { + const self = this + return startLookahead + + /** + * + * + * @type {State} + */ + function startLookahead(code) { + effects.exit('chunkContent') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, prefixed, 'linePrefix') + } + + /** + * + * + * @type {State} + */ + function prefixed(code) { + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + + // Always populated by defaults. + + const tail = self.events[self.events.length - 1] + if ( + !self.parser.constructs.disable.null.includes('codeIndented') && + tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ) { + return ok(code) + } + return effects.interrupt(self.parser.constructs.flow, nok, ok)(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/flow.js +/** + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + + + + +/** @type {InitialConstruct} */ +const flow = { + tokenize: initializeFlow +} + +/** + * @this {TokenizeContext} + * @type {Initializer} + */ +function initializeFlow(effects) { + const self = this + const initial = effects.attempt( + // Try to parse a blank line. + blankLine, + atBlankEnding, + // Try to parse initial flow (essentially, only code). + effects.attempt( + this.parser.constructs.flowInitial, + afterConstruct, + factorySpace( + effects, + effects.attempt( + this.parser.constructs.flow, + afterConstruct, + effects.attempt(content_content, afterConstruct) + ), + 'linePrefix' + ) + ) + ) + return initial + + /** @type {State} */ + function atBlankEnding(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEndingBlank') + effects.consume(code) + effects.exit('lineEndingBlank') + self.currentConstruct = undefined + return initial + } + + /** @type {State} */ + function afterConstruct(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + self.currentConstruct = undefined + return initial + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/initialize/text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').Initializer} Initializer + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +const resolver = { + resolveAll: createResolver() +} +const string = initializeFactory('string') +const text_text = initializeFactory('text') + +/** + * @param {'string' | 'text'} field + * @returns {InitialConstruct} + */ +function initializeFactory(field) { + return { + tokenize: initializeText, + resolveAll: createResolver( + field === 'text' ? resolveAllLineSuffixes : undefined + ) + } + + /** + * @this {TokenizeContext} + * @type {Initializer} + */ + function initializeText(effects) { + const self = this + const constructs = this.parser.constructs[field] + const text = effects.attempt(constructs, start, notText) + return start + + /** @type {State} */ + function start(code) { + return atBreak(code) ? text(code) : notText(code) + } + + /** @type {State} */ + function notText(code) { + if (code === null) { + effects.consume(code) + return + } + effects.enter('data') + effects.consume(code) + return data + } + + /** @type {State} */ + function data(code) { + if (atBreak(code)) { + effects.exit('data') + return text(code) + } + + // Data. + effects.consume(code) + return data + } + + /** + * @param {Code} code + * @returns {boolean} + */ + function atBreak(code) { + if (code === null) { + return true + } + const list = constructs[code] + let index = -1 + if (list) { + // Always populated by defaults. + + while (++index < list.length) { + const item = list[index] + if (!item.previous || item.previous.call(self, self.previous)) { + return true + } + } + } + return false + } + } +} + +/** + * @param {Resolver | undefined} [extraResolver] + * @returns {Resolver} + */ +function createResolver(extraResolver) { + return resolveAllText + + /** @type {Resolver} */ + function resolveAllText(events, context) { + let index = -1 + /** @type {number | undefined} */ + let enter + + // A rather boring computation (to merge adjacent `data` events) which + // improves mm performance by 29%. + while (++index <= events.length) { + if (enter === undefined) { + if (events[index] && events[index][1].type === 'data') { + enter = index + index++ + } + } else if (!events[index] || events[index][1].type !== 'data') { + // Don’t do anything if there is one data token. + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + index = enter + 2 + } + enter = undefined + } + } + return extraResolver ? extraResolver(events, context) : events + } +} + +/** + * A rather ugly set of instructions which again looks at chunks in the input + * stream. + * The reason to do this here is that it is *much* faster to parse in reverse. + * And that we can’t hook into `null` to split the line suffix before an EOF. + * To do: figure out if we can make this into a clean utility, or even in core. + * As it will be useful for GFMs literal autolink extension (and maybe even + * tables?) + * + * @type {Resolver} + */ +function resolveAllLineSuffixes(events, context) { + let eventIndex = 0 // Skip first. + + while (++eventIndex <= events.length) { + if ( + (eventIndex === events.length || + events[eventIndex][1].type === 'lineEnding') && + events[eventIndex - 1][1].type === 'data' + ) { + const data = events[eventIndex - 1][1] + const chunks = context.sliceStream(data) + let index = chunks.length + let bufferIndex = -1 + let size = 0 + /** @type {boolean | undefined} */ + let tabs + while (index--) { + const chunk = chunks[index] + if (typeof chunk === 'string') { + bufferIndex = chunk.length + while (chunk.charCodeAt(bufferIndex - 1) === 32) { + size++ + bufferIndex-- + } + if (bufferIndex) break + bufferIndex = -1 + } + // Number + else if (chunk === -2) { + tabs = true + size++ + } else if (chunk === -1) { + // Empty + } else { + // Replacement character, exit. + index++ + break + } + } + if (size) { + const token = { + type: + eventIndex === events.length || tabs || size < 2 + ? 'lineSuffix' + : 'hardBreakTrailing', + start: { + line: data.end.line, + column: data.end.column - size, + offset: data.end.offset - size, + _index: data.start._index + index, + _bufferIndex: index + ? bufferIndex + : data.start._bufferIndex + bufferIndex + }, + end: Object.assign({}, data.end) + } + data.end = Object.assign({}, token.start) + if (data.start.offset === data.end.offset) { + Object.assign(data, token) + } else { + events.splice( + eventIndex, + 0, + ['enter', token, context], + ['exit', token, context] + ) + eventIndex += 2 + } + } + eventIndex++ + } + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-resolve-all/index.js +/** + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * Call all `resolveAll`s. + * + * @param {Array<{resolveAll?: Resolver | undefined}>} constructs + * List of constructs, optionally with `resolveAll`s. + * @param {Array<Event>} events + * List of events. + * @param {TokenizeContext} context + * Context used by `tokenize`. + * @returns {Array<Event>} + * Changed events. + */ +function resolveAll(constructs, events, context) { + /** @type {Array<Resolver>} */ + const called = [] + let index = -1 + + while (++index < constructs.length) { + const resolve = constructs[index].resolveAll + + if (resolve && !called.includes(resolve)) { + events = resolve(events, context) + called.push(resolve) + } + } + + return events +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/create-tokenizer.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenType} TokenType + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + */ + +/** + * @callback Restore + * @returns {void} + * + * @typedef Info + * @property {Restore} restore + * @property {number} from + * + * @callback ReturnHandle + * Handle a successful run. + * @param {Construct} construct + * @param {Info} info + * @returns {void} + */ + + + + +/** + * Create a tokenizer. + * Tokenizers deal with one type of data (e.g., containers, flow, text). + * The parser is the object dealing with it all. + * `initialize` works like other constructs, except that only its `tokenize` + * function is used, in which case it doesn’t receive an `ok` or `nok`. + * `from` can be given to set the point before the first character, although + * when further lines are indented, they must be set with `defineSkip`. + * + * @param {ParseContext} parser + * @param {InitialConstruct} initialize + * @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from] + * @returns {TokenizeContext} + */ +function createTokenizer(parser, initialize, from) { + /** @type {Point} */ + let point = Object.assign( + from + ? Object.assign({}, from) + : { + line: 1, + column: 1, + offset: 0 + }, + { + _index: 0, + _bufferIndex: -1 + } + ) + /** @type {Record<string, number>} */ + const columnStart = {} + /** @type {Array<Construct>} */ + const resolveAllConstructs = [] + /** @type {Array<Chunk>} */ + let chunks = [] + /** @type {Array<Token>} */ + let stack = [] + /** @type {boolean | undefined} */ + let consumed = true + + /** + * Tools used for tokenizing. + * + * @type {Effects} + */ + const effects = { + consume, + enter, + exit, + attempt: constructFactory(onsuccessfulconstruct), + check: constructFactory(onsuccessfulcheck), + interrupt: constructFactory(onsuccessfulcheck, { + interrupt: true + }) + } + + /** + * State and tools for resolving and serializing. + * + * @type {TokenizeContext} + */ + const context = { + previous: null, + code: null, + containerState: {}, + events: [], + parser, + sliceStream, + sliceSerialize, + now, + defineSkip, + write + } + + /** + * The state function. + * + * @type {State | void} + */ + let state = initialize.tokenize.call(context, effects) + + /** + * Track which character we expect to be consumed, to catch bugs. + * + * @type {Code} + */ + let expectedCode + if (initialize.resolveAll) { + resolveAllConstructs.push(initialize) + } + return context + + /** @type {TokenizeContext['write']} */ + function write(slice) { + chunks = push(chunks, slice) + main() + + // Exit if we’re not done, resolve might change stuff. + if (chunks[chunks.length - 1] !== null) { + return [] + } + addResult(initialize, 0) + + // Otherwise, resolve, and exit. + context.events = resolveAll(resolveAllConstructs, context.events, context) + return context.events + } + + // + // Tools. + // + + /** @type {TokenizeContext['sliceSerialize']} */ + function sliceSerialize(token, expandTabs) { + return serializeChunks(sliceStream(token), expandTabs) + } + + /** @type {TokenizeContext['sliceStream']} */ + function sliceStream(token) { + return sliceChunks(chunks, token) + } + + /** @type {TokenizeContext['now']} */ + function now() { + // This is a hot path, so we clone manually instead of `Object.assign({}, point)` + const {line, column, offset, _index, _bufferIndex} = point + return { + line, + column, + offset, + _index, + _bufferIndex + } + } + + /** @type {TokenizeContext['defineSkip']} */ + function defineSkip(value) { + columnStart[value.line] = value.column + accountForPotentialSkip() + } + + // + // State management. + // + + /** + * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by + * `consume`). + * Here is where we walk through the chunks, which either include strings of + * several characters, or numerical character codes. + * The reason to do this in a loop instead of a call is so the stack can + * drain. + * + * @returns {void} + */ + function main() { + /** @type {number} */ + let chunkIndex + while (point._index < chunks.length) { + const chunk = chunks[point._index] + + // If we’re in a buffer chunk, loop through it. + if (typeof chunk === 'string') { + chunkIndex = point._index + if (point._bufferIndex < 0) { + point._bufferIndex = 0 + } + while ( + point._index === chunkIndex && + point._bufferIndex < chunk.length + ) { + go(chunk.charCodeAt(point._bufferIndex)) + } + } else { + go(chunk) + } + } + } + + /** + * Deal with one code. + * + * @param {Code} code + * @returns {void} + */ + function go(code) { + consumed = undefined + expectedCode = code + state = state(code) + } + + /** @type {Effects['consume']} */ + function consume(code) { + if (markdownLineEnding(code)) { + point.line++ + point.column = 1 + point.offset += code === -3 ? 2 : 1 + accountForPotentialSkip() + } else if (code !== -1) { + point.column++ + point.offset++ + } + + // Not in a string chunk. + if (point._bufferIndex < 0) { + point._index++ + } else { + point._bufferIndex++ + + // At end of string chunk. + // @ts-expect-error Points w/ non-negative `_bufferIndex` reference + // strings. + if (point._bufferIndex === chunks[point._index].length) { + point._bufferIndex = -1 + point._index++ + } + } + + // Expose the previous character. + context.previous = code + + // Mark as consumed. + consumed = true + } + + /** @type {Effects['enter']} */ + function enter(type, fields) { + /** @type {Token} */ + // @ts-expect-error Patch instead of assign required fields to help GC. + const token = fields || {} + token.type = type + token.start = now() + context.events.push(['enter', token, context]) + stack.push(token) + return token + } + + /** @type {Effects['exit']} */ + function exit(type) { + const token = stack.pop() + token.end = now() + context.events.push(['exit', token, context]) + return token + } + + /** + * Use results. + * + * @type {ReturnHandle} + */ + function onsuccessfulconstruct(construct, info) { + addResult(construct, info.from) + } + + /** + * Discard results. + * + * @type {ReturnHandle} + */ + function onsuccessfulcheck(_, info) { + info.restore() + } + + /** + * Factory to attempt/check/interrupt. + * + * @param {ReturnHandle} onreturn + * @param {{interrupt?: boolean | undefined} | undefined} [fields] + */ + function constructFactory(onreturn, fields) { + return hook + + /** + * Handle either an object mapping codes to constructs, a list of + * constructs, or a single construct. + * + * @param {Array<Construct> | Construct | ConstructRecord} constructs + * @param {State} returnState + * @param {State | undefined} [bogusState] + * @returns {State} + */ + function hook(constructs, returnState, bogusState) { + /** @type {Array<Construct>} */ + let listOfConstructs + /** @type {number} */ + let constructIndex + /** @type {Construct} */ + let currentConstruct + /** @type {Info} */ + let info + return Array.isArray(constructs) /* c8 ignore next 1 */ + ? handleListOfConstructs(constructs) + : 'tokenize' in constructs + ? // @ts-expect-error Looks like a construct. + handleListOfConstructs([constructs]) + : handleMapOfConstructs(constructs) + + /** + * Handle a list of construct. + * + * @param {ConstructRecord} map + * @returns {State} + */ + function handleMapOfConstructs(map) { + return start + + /** @type {State} */ + function start(code) { + const def = code !== null && map[code] + const all = code !== null && map.null + const list = [ + // To do: add more extension tests. + /* c8 ignore next 2 */ + ...(Array.isArray(def) ? def : def ? [def] : []), + ...(Array.isArray(all) ? all : all ? [all] : []) + ] + return handleListOfConstructs(list)(code) + } + } + + /** + * Handle a list of construct. + * + * @param {Array<Construct>} list + * @returns {State} + */ + function handleListOfConstructs(list) { + listOfConstructs = list + constructIndex = 0 + if (list.length === 0) { + return bogusState + } + return handleConstruct(list[constructIndex]) + } + + /** + * Handle a single construct. + * + * @param {Construct} construct + * @returns {State} + */ + function handleConstruct(construct) { + return start + + /** @type {State} */ + function start(code) { + // To do: not needed to store if there is no bogus state, probably? + // Currently doesn’t work because `inspect` in document does a check + // w/o a bogus, which doesn’t make sense. But it does seem to help perf + // by not storing. + info = store() + currentConstruct = construct + if (!construct.partial) { + context.currentConstruct = construct + } + + // Always populated by defaults. + + if ( + construct.name && + context.parser.constructs.disable.null.includes(construct.name) + ) { + return nok(code) + } + return construct.tokenize.call( + // If we do have fields, create an object w/ `context` as its + // prototype. + // This allows a “live binding”, which is needed for `interrupt`. + fields ? Object.assign(Object.create(context), fields) : context, + effects, + ok, + nok + )(code) + } + } + + /** @type {State} */ + function ok(code) { + consumed = true + onreturn(currentConstruct, info) + return returnState + } + + /** @type {State} */ + function nok(code) { + consumed = true + info.restore() + if (++constructIndex < listOfConstructs.length) { + return handleConstruct(listOfConstructs[constructIndex]) + } + return bogusState + } + } + } + + /** + * @param {Construct} construct + * @param {number} from + * @returns {void} + */ + function addResult(construct, from) { + if (construct.resolveAll && !resolveAllConstructs.includes(construct)) { + resolveAllConstructs.push(construct) + } + if (construct.resolve) { + splice( + context.events, + from, + context.events.length - from, + construct.resolve(context.events.slice(from), context) + ) + } + if (construct.resolveTo) { + context.events = construct.resolveTo(context.events, context) + } + } + + /** + * Store state. + * + * @returns {Info} + */ + function store() { + const startPoint = now() + const startPrevious = context.previous + const startCurrentConstruct = context.currentConstruct + const startEventsIndex = context.events.length + const startStack = Array.from(stack) + return { + restore, + from: startEventsIndex + } + + /** + * Restore state. + * + * @returns {void} + */ + function restore() { + point = startPoint + context.previous = startPrevious + context.currentConstruct = startCurrentConstruct + context.events.length = startEventsIndex + stack = startStack + accountForPotentialSkip() + } + } + + /** + * Move the current point a bit forward in the line when it’s on a column + * skip. + * + * @returns {void} + */ + function accountForPotentialSkip() { + if (point.line in columnStart && point.column < 2) { + point.column = columnStart[point.line] + point.offset += columnStart[point.line] - 1 + } + } +} + +/** + * Get the chunks from a slice of chunks in the range of a token. + * + * @param {Array<Chunk>} chunks + * @param {Pick<Token, 'end' | 'start'>} token + * @returns {Array<Chunk>} + */ +function sliceChunks(chunks, token) { + const startIndex = token.start._index + const startBufferIndex = token.start._bufferIndex + const endIndex = token.end._index + const endBufferIndex = token.end._bufferIndex + /** @type {Array<Chunk>} */ + let view + if (startIndex === endIndex) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)] + } else { + view = chunks.slice(startIndex, endIndex) + if (startBufferIndex > -1) { + const head = view[0] + if (typeof head === 'string') { + view[0] = head.slice(startBufferIndex) + } else { + view.shift() + } + } + if (endBufferIndex > 0) { + // @ts-expect-error `_bufferIndex` is used on string chunks. + view.push(chunks[endIndex].slice(0, endBufferIndex)) + } + } + return view +} + +/** + * Get the string value of a slice of chunks. + * + * @param {Array<Chunk>} chunks + * @param {boolean | undefined} [expandTabs=false] + * @returns {string} + */ +function serializeChunks(chunks, expandTabs) { + let index = -1 + /** @type {Array<string>} */ + const result = [] + /** @type {boolean | undefined} */ + let atTab + while (++index < chunks.length) { + const chunk = chunks[index] + /** @type {string} */ + let value + if (typeof chunk === 'string') { + value = chunk + } else + switch (chunk) { + case -5: { + value = '\r' + break + } + case -4: { + value = '\n' + break + } + case -3: { + value = '\r' + '\n' + break + } + case -2: { + value = expandTabs ? ' ' : '\t' + break + } + case -1: { + if (!expandTabs && atTab) continue + value = ' ' + break + } + default: { + // Currently only replacement character. + value = String.fromCharCode(chunk) + } + } + atTab = chunk === -2 + result.push(value) + } + return result.join('') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/thematic-break.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const thematicBreak = { + name: 'thematicBreak', + tokenize: tokenizeThematicBreak +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeThematicBreak(effects, ok, nok) { + let size = 0 + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of thematic break. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('thematicBreak') + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * After optional whitespace, at marker. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + marker = code + return atBreak(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.enter('thematicBreakSequence') + return sequence(code) + } + if (size >= 3 && (code === null || markdownLineEnding(code))) { + effects.exit('thematicBreak') + return ok(code) + } + return nok(code) + } + + /** + * In sequence. + * + * ```markdown + * > | *** + * ^ + * ``` + * + * @type {State} + */ + function sequence(code) { + if (code === marker) { + effects.consume(code) + size++ + return sequence + } + effects.exit('thematicBreakSequence') + return markdownSpace(code) + ? factorySpace(effects, atBreak, 'whitespace')(code) + : atBreak(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/list.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').ContainerState} ContainerState + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + +/** @type {Construct} */ +const list = { + name: 'list', + tokenize: tokenizeListStart, + continuation: { + tokenize: tokenizeListContinuation + }, + exit: tokenizeListEnd +} + +/** @type {Construct} */ +const listItemPrefixWhitespaceConstruct = { + tokenize: tokenizeListItemPrefixWhitespace, + partial: true +} + +/** @type {Construct} */ +const indentConstruct = { + tokenize: tokenizeIndent, + partial: true +} + +// To do: `markdown-rs` parses list items on their own and later stitches them +// together. + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListStart(effects, ok, nok) { + const self = this + const tail = self.events[self.events.length - 1] + let initialSize = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + let size = 0 + return start + + /** @type {State} */ + function start(code) { + const kind = + self.containerState.type || + (code === 42 || code === 43 || code === 45 + ? 'listUnordered' + : 'listOrdered') + if ( + kind === 'listUnordered' + ? !self.containerState.marker || code === self.containerState.marker + : asciiDigit(code) + ) { + if (!self.containerState.type) { + self.containerState.type = kind + effects.enter(kind, { + _container: true + }) + } + if (kind === 'listUnordered') { + effects.enter('listItemPrefix') + return code === 42 || code === 45 + ? effects.check(thematicBreak, nok, atMarker)(code) + : atMarker(code) + } + if (!self.interrupt || code === 49) { + effects.enter('listItemPrefix') + effects.enter('listItemValue') + return inside(code) + } + } + return nok(code) + } + + /** @type {State} */ + function inside(code) { + if (asciiDigit(code) && ++size < 10) { + effects.consume(code) + return inside + } + if ( + (!self.interrupt || size < 2) && + (self.containerState.marker + ? code === self.containerState.marker + : code === 41 || code === 46) + ) { + effects.exit('listItemValue') + return atMarker(code) + } + return nok(code) + } + + /** + * @type {State} + **/ + function atMarker(code) { + effects.enter('listItemMarker') + effects.consume(code) + effects.exit('listItemMarker') + self.containerState.marker = self.containerState.marker || code + return effects.check( + blankLine, + // Can’t be empty when interrupting. + self.interrupt ? nok : onBlank, + effects.attempt( + listItemPrefixWhitespaceConstruct, + endOfPrefix, + otherPrefix + ) + ) + } + + /** @type {State} */ + function onBlank(code) { + self.containerState.initialBlankLine = true + initialSize++ + return endOfPrefix(code) + } + + /** @type {State} */ + function otherPrefix(code) { + if (markdownSpace(code)) { + effects.enter('listItemPrefixWhitespace') + effects.consume(code) + effects.exit('listItemPrefixWhitespace') + return endOfPrefix + } + return nok(code) + } + + /** @type {State} */ + function endOfPrefix(code) { + self.containerState.size = + initialSize + + self.sliceSerialize(effects.exit('listItemPrefix'), true).length + return ok(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListContinuation(effects, ok, nok) { + const self = this + self.containerState._closeFlow = undefined + return effects.check(blankLine, onBlank, notBlank) + + /** @type {State} */ + function onBlank(code) { + self.containerState.furtherBlankLines = + self.containerState.furtherBlankLines || + self.containerState.initialBlankLine + + // We have a blank line. + // Still, try to consume at most the items size. + return factorySpace( + effects, + ok, + 'listItemIndent', + self.containerState.size + 1 + )(code) + } + + /** @type {State} */ + function notBlank(code) { + if (self.containerState.furtherBlankLines || !markdownSpace(code)) { + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return notInCurrentItem(code) + } + self.containerState.furtherBlankLines = undefined + self.containerState.initialBlankLine = undefined + return effects.attempt(indentConstruct, ok, notInCurrentItem)(code) + } + + /** @type {State} */ + function notInCurrentItem(code) { + // While we do continue, we signal that the flow should be closed. + self.containerState._closeFlow = true + // As we’re closing flow, we’re no longer interrupting. + self.interrupt = undefined + // Always populated by defaults. + + return factorySpace( + effects, + effects.attempt(list, ok, nok), + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeIndent(effects, ok, nok) { + const self = this + return factorySpace( + effects, + afterPrefix, + 'listItemIndent', + self.containerState.size + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'listItemIndent' && + tail[2].sliceSerialize(tail[1], true).length === self.containerState.size + ? ok(code) + : nok(code) + } +} + +/** + * @type {Exiter} + * @this {TokenizeContext} + */ +function tokenizeListEnd(effects) { + effects.exit(this.containerState.type) +} + +/** + * @type {Tokenizer} + * @this {TokenizeContext} + */ +function tokenizeListItemPrefixWhitespace(effects, ok, nok) { + const self = this + + // Always populated by defaults. + + return factorySpace( + effects, + afterPrefix, + 'listItemPrefixWhitespace', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + 1 + ) + + /** @type {State} */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return !markdownSpace(code) && + tail && + tail[1].type === 'listItemPrefixWhitespace' + ? ok(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/block-quote.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Exiter} Exiter + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const blockQuote = { + name: 'blockQuote', + tokenize: tokenizeBlockQuoteStart, + continuation: { + tokenize: tokenizeBlockQuoteContinuation + }, + exit +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteStart(effects, ok, nok) { + const self = this + return start + + /** + * Start of block quote. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 62) { + const state = self.containerState + if (!state.open) { + effects.enter('blockQuote', { + _container: true + }) + state.open = true + } + effects.enter('blockQuotePrefix') + effects.enter('blockQuoteMarker') + effects.consume(code) + effects.exit('blockQuoteMarker') + return after + } + return nok(code) + } + + /** + * After `>`, before optional whitespace. + * + * ```markdown + * > | > a + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownSpace(code)) { + effects.enter('blockQuotePrefixWhitespace') + effects.consume(code) + effects.exit('blockQuotePrefixWhitespace') + effects.exit('blockQuotePrefix') + return ok + } + effects.exit('blockQuotePrefix') + return ok(code) + } +} + +/** + * Start of block quote continuation. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlockQuoteContinuation(effects, ok, nok) { + const self = this + return contStart + + /** + * Start of block quote continuation. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contStart(code) { + if (markdownSpace(code)) { + // Always populated by defaults. + + return factorySpace( + effects, + contBefore, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + } + return contBefore(code) + } + + /** + * At `>`, after optional whitespace. + * + * Also used to parse the first block quote opening. + * + * ```markdown + * | > a + * > | > b + * ^ + * ``` + * + * @type {State} + */ + function contBefore(code) { + return effects.attempt(blockQuote, ok, nok)(code) + } +} + +/** @type {Exiter} */ +function exit(effects) { + effects.exit('blockQuote') +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-destination/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse destinations. + * + * ###### Examples + * + * ```markdown + * <a> + * <a\>b> + * <a b> + * <a)> + * a + * a\)b + * a(b)c + * a(b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type for whole (`<a>` or `b`). + * @param {TokenType} literalType + * Type when enclosed (`<a>`). + * @param {TokenType} literalMarkerType + * Type for enclosing (`<` and `>`). + * @param {TokenType} rawType + * Type when not enclosed (`b`). + * @param {TokenType} stringType + * Type for the value (`a` or `b`). + * @param {number | undefined} [max=Infinity] + * Depth of nested parens (inclusive). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryDestination( + effects, + ok, + nok, + type, + literalType, + literalMarkerType, + rawType, + stringType, + max +) { + const limit = max || Number.POSITIVE_INFINITY + let balance = 0 + return start + + /** + * Start of destination. + * + * ```markdown + * > | <aa> + * ^ + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 60) { + effects.enter(type) + effects.enter(literalType) + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + return enclosedBefore + } + + // ASCII control, space, closing paren. + if (code === null || code === 32 || code === 41 || asciiControl(code)) { + return nok(code) + } + effects.enter(type) + effects.enter(rawType) + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return raw(code) + } + + /** + * After `<`, at an enclosed destination. + * + * ```markdown + * > | <aa> + * ^ + * ``` + * + * @type {State} + */ + function enclosedBefore(code) { + if (code === 62) { + effects.enter(literalMarkerType) + effects.consume(code) + effects.exit(literalMarkerType) + effects.exit(literalType) + effects.exit(type) + return ok + } + effects.enter(stringType) + effects.enter('chunkString', { + contentType: 'string' + }) + return enclosed(code) + } + + /** + * In enclosed destination. + * + * ```markdown + * > | <aa> + * ^ + * ``` + * + * @type {State} + */ + function enclosed(code) { + if (code === 62) { + effects.exit('chunkString') + effects.exit(stringType) + return enclosedBefore(code) + } + if (code === null || code === 60 || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? enclosedEscape : enclosed + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | <a\*a> + * ^ + * ``` + * + * @type {State} + */ + function enclosedEscape(code) { + if (code === 60 || code === 62 || code === 92) { + effects.consume(code) + return enclosed + } + return enclosed(code) + } + + /** + * In raw destination. + * + * ```markdown + * > | aa + * ^ + * ``` + * + * @type {State} + */ + function raw(code) { + if ( + !balance && + (code === null || code === 41 || markdownLineEndingOrSpace(code)) + ) { + effects.exit('chunkString') + effects.exit(stringType) + effects.exit(rawType) + effects.exit(type) + return ok(code) + } + if (balance < limit && code === 40) { + effects.consume(code) + balance++ + return raw + } + if (code === 41) { + effects.consume(code) + balance-- + return raw + } + + // ASCII control (but *not* `\0`) and space and `(`. + // Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it + // doesn’t. + if (code === null || code === 32 || code === 40 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return code === 92 ? rawEscape : raw + } + + /** + * After `\`, at special character. + * + * ```markdown + * > | a\*a + * ^ + * ``` + * + * @type {State} + */ + function rawEscape(code) { + if (code === 40 || code === 41 || code === 92) { + effects.consume(code) + return raw + } + return raw(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-label/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + +/** + * Parse labels. + * + * > 👉 **Note**: labels in markdown are capped at 999 characters in the string. + * + * ###### Examples + * + * ```markdown + * [a] + * [a + * b] + * [a\]b] + * ``` + * + * @this {TokenizeContext} + * Tokenize context. + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole label (`[a]`). + * @param {TokenType} markerType + * Type for the markers (`[` and `]`). + * @param {TokenType} stringType + * Type for the identifier (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryLabel(effects, ok, nok, type, markerType, stringType) { + const self = this + let size = 0 + /** @type {boolean} */ + let seen + return start + + /** + * Start of label. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.enter(stringType) + return atBreak + } + + /** + * In label, at something, before something else. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if ( + size > 999 || + code === null || + code === 91 || + (code === 93 && !seen) || + // To do: remove in the future once we’ve switched from + // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, + // which doesn’t need this. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + (code === 94 && + !size && + '_hiddenFootnoteSupport' in self.parser.constructs) + ) { + return nok(code) + } + if (code === 93) { + effects.exit(stringType) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + + // To do: indent? Link chunks and EOLs together? + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return atBreak + } + effects.enter('chunkString', { + contentType: 'string' + }) + return labelInside(code) + } + + /** + * In label, in text. + * + * ```markdown + * > | [a] + * ^ + * ``` + * + * @type {State} + */ + function labelInside(code) { + if ( + code === null || + code === 91 || + code === 93 || + markdownLineEnding(code) || + size++ > 999 + ) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + if (!seen) seen = !markdownSpace(code) + return code === 92 ? labelEscape : labelInside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | [a\*a] + * ^ + * ``` + * + * @type {State} + */ + function labelEscape(code) { + if (code === 91 || code === 92 || code === 93) { + effects.consume(code) + size++ + return labelInside + } + return labelInside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-title/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenType} TokenType + */ + + + +/** + * Parse titles. + * + * ###### Examples + * + * ```markdown + * "a" + * 'b' + * (c) + * "a + * b" + * 'a + * b' + * (a\)b) + * ``` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @param {State} nok + * State switched to when unsuccessful. + * @param {TokenType} type + * Type of the whole title (`"a"`, `'b'`, `(c)`). + * @param {TokenType} markerType + * Type for the markers (`"`, `'`, `(`, and `)`). + * @param {TokenType} stringType + * Type for the value (`a`). + * @returns {State} + * Start state. + */ // eslint-disable-next-line max-params +function factoryTitle(effects, ok, nok, type, markerType, stringType) { + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of title. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + if (code === 34 || code === 39 || code === 40) { + effects.enter(type) + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + marker = code === 40 ? 41 : code + return begin + } + return nok(code) + } + + /** + * After opening marker. + * + * This is also used at the closing marker. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function begin(code) { + if (code === marker) { + effects.enter(markerType) + effects.consume(code) + effects.exit(markerType) + effects.exit(type) + return ok + } + effects.enter(stringType) + return atBreak(code) + } + + /** + * At something, before something else. + * + * ```markdown + * > | "a" + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === marker) { + effects.exit(stringType) + return begin(marker) + } + if (code === null) { + return nok(code) + } + + // Note: blank lines can’t exist in content. + if (markdownLineEnding(code)) { + // To do: use `space_or_tab_eol_with_options`, connect. + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, atBreak, 'linePrefix') + } + effects.enter('chunkString', { + contentType: 'string' + }) + return inside(code) + } + + /** + * + * + * @type {State} + */ + function inside(code) { + if (code === marker || code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + return atBreak(code) + } + effects.consume(code) + return code === 92 ? escape : inside + } + + /** + * After `\`, at a special character. + * + * ```markdown + * > | "a\*b" + * ^ + * ``` + * + * @type {State} + */ + function escape(code) { + if (code === marker || code === 92) { + effects.consume(code) + return inside + } + return inside(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-factory-whitespace/index.js +/** + * @typedef {import('micromark-util-types').Effects} Effects + * @typedef {import('micromark-util-types').State} State + */ + + + +/** + * Parse spaces and tabs. + * + * There is no `nok` parameter: + * + * * line endings or spaces in markdown are often optional, in which case this + * factory can be used and `ok` will be switched to whether spaces were found + * or not + * * one line ending or space can be detected with + * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace` + * + * @param {Effects} effects + * Context. + * @param {State} ok + * State switched to when successful. + * @returns + * Start state. + */ +function factoryWhitespace(effects, ok) { + /** @type {boolean} */ + let seen + return start + + /** @type {State} */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + seen = true + return start + } + if (markdownSpace(code)) { + return factorySpace( + effects, + start, + seen ? 'linePrefix' : 'lineSuffix' + )(code) + } + return ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-normalize-identifier/index.js +/** + * Normalize an identifier (as found in references, definitions). + * + * Collapses markdown whitespace, trim, and then lower- and uppercase. + * + * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their + * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different + * uppercase character (U+0398 (`Θ`)). + * So, to get a canonical form, we perform both lower- and uppercase. + * + * Using uppercase last makes sure keys will never interact with default + * prototypal values (such as `constructor`): nothing in the prototype of + * `Object` is uppercase. + * + * @param {string} value + * Identifier to normalize. + * @returns {string} + * Normalized identifier. + */ +function normalizeIdentifier(value) { + return ( + value + // Collapse markdown whitespace. + .replace(/[\t\n\r ]+/g, ' ') + // Trim. + .replace(/^ | $/g, '') + // Some characters are considered “uppercase”, but if their lowercase + // counterpart is uppercased will result in a different uppercase + // character. + // Hence, to get that form, we perform both lower- and uppercase. + // Upper case makes sure keys will not interact with default prototypal + // methods: no method is uppercase. + .toLowerCase() + .toUpperCase() + ) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/definition.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + +/** @type {Construct} */ +const definition = { + name: 'definition', + tokenize: tokenizeDefinition +} + +/** @type {Construct} */ +const titleBefore = { + tokenize: tokenizeTitleBefore, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeDefinition(effects, ok, nok) { + const self = this + /** @type {string} */ + let identifier + return start + + /** + * At start of a definition. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Do not interrupt paragraphs (but do follow definitions). + // To do: do `interrupt` the way `markdown-rs` does. + // To do: parse whitespace the way `markdown-rs` does. + effects.enter('definition') + return before(code) + } + + /** + * After optional whitespace, at `[`. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + // To do: parse whitespace the way `markdown-rs` does. + + return factoryLabel.call( + self, + effects, + labelAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionLabel', + 'definitionLabelMarker', + 'definitionLabelString' + )(code) + } + + /** + * After label. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function labelAfter(code) { + identifier = normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + if (code === 58) { + effects.enter('definitionMarker') + effects.consume(code) + effects.exit('definitionMarker') + return markerAfter + } + return nok(code) + } + + /** + * After marker. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function markerAfter(code) { + // Note: whitespace is optional. + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, destinationBefore)(code) + : destinationBefore(code) + } + + /** + * Before destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationBefore(code) { + return factoryDestination( + effects, + destinationAfter, + // Note: we don’t need to reset the way `markdown-rs` does. + nok, + 'definitionDestination', + 'definitionDestinationLiteral', + 'definitionDestinationLiteralMarker', + 'definitionDestinationRaw', + 'definitionDestinationString' + )(code) + } + + /** + * After destination. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function destinationAfter(code) { + return effects.attempt(titleBefore, after, after)(code) + } + + /** + * After definition. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return markdownSpace(code) + ? factorySpace(effects, afterWhitespace, 'whitespace')(code) + : afterWhitespace(code) + } + + /** + * After definition, after optional whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function afterWhitespace(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('definition') + + // Note: we don’t care about uniqueness. + // It’s likely that that doesn’t happen very frequently. + // It is more likely that it wastes precious time. + self.parser.defined.push(identifier) + + // To do: `markdown-rs` interrupt. + // // You’d be interrupting. + // tokenizer.interrupt = true + return ok(code) + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeTitleBefore(effects, ok, nok) { + return titleBefore + + /** + * After destination, at whitespace. + * + * ```markdown + * > | [a]: b + * ^ + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, beforeMarker)(code) + : nok(code) + } + + /** + * At title. + * + * ```markdown + * | [a]: b + * > | "c" + * ^ + * ``` + * + * @type {State} + */ + function beforeMarker(code) { + return factoryTitle( + effects, + titleAfter, + nok, + 'definitionTitle', + 'definitionTitleMarker', + 'definitionTitleString' + )(code) + } + + /** + * After title. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfter(code) { + return markdownSpace(code) + ? factorySpace(effects, titleAfterOptionalWhitespace, 'whitespace')(code) + : titleAfterOptionalWhitespace(code) + } + + /** + * After title, after optional whitespace. + * + * ```markdown + * > | [a]: b "c" + * ^ + * ``` + * + * @type {State} + */ + function titleAfterOptionalWhitespace(code) { + return code === null || markdownLineEnding(code) ? ok(code) : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-indented.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const codeIndented = { + name: 'codeIndented', + tokenize: tokenizeCodeIndented +} + +/** @type {Construct} */ +const furtherStart = { + tokenize: tokenizeFurtherStart, + partial: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeIndented(effects, ok, nok) { + const self = this + return start + + /** + * Start of code (indented). + * + * > **Parsing note**: it is not needed to check if this first line is a + * > filled line (that it has a non-whitespace character), because blank lines + * > are parsed already, so we never run into that. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: manually check if interrupting like `markdown-rs`. + + effects.enter('codeIndented') + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? atBreak(code) + : nok(code) + } + + /** + * At a break. + * + * ```markdown + * > | aaa + * ^ ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === null) { + return after(code) + } + if (markdownLineEnding(code)) { + return effects.attempt(furtherStart, atBreak, after)(code) + } + effects.enter('codeFlowValue') + return inside(code) + } + + /** + * In code content. + * + * ```markdown + * > | aaa + * ^^^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return atBreak(code) + } + effects.consume(code) + return inside + } + + /** @type {State} */ + function after(code) { + effects.exit('codeIndented') + // To do: allow interrupting like `markdown-rs`. + // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeFurtherStart(effects, ok, nok) { + const self = this + return furtherStart + + /** + * At eol, trying to parse another indent. + * + * ```markdown + * > | aaa + * ^ + * | bbb + * ``` + * + * @type {State} + */ + function furtherStart(code) { + // To do: improve `lazy` / `pierce` handling. + // If this is a lazy line, it can’t be code. + if (self.parser.lazy[self.now().line]) { + return nok(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return furtherStart + } + + // To do: the code here in `micromark-js` is a bit different from + // `markdown-rs` because there it can attempt spaces. + // We can’t yet. + // + // To do: use an improved `space_or_tab` function like `markdown-rs`, + // so that we can drop the next state. + return factorySpace(effects, afterPrefix, 'linePrefix', 4 + 1)(code) + } + + /** + * At start, after 1 or 4 spaces. + * + * ```markdown + * > | aaa + * ^ + * ``` + * + * @type {State} + */ + function afterPrefix(code) { + const tail = self.events[self.events.length - 1] + return tail && + tail[1].type === 'linePrefix' && + tail[2].sliceSerialize(tail[1], true).length >= 4 + ? ok(code) + : markdownLineEnding(code) + ? furtherStart(code) + : nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/heading-atx.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const headingAtx = { + name: 'headingAtx', + tokenize: tokenizeHeadingAtx, + resolve: resolveHeadingAtx +} + +/** @type {Resolver} */ +function resolveHeadingAtx(events, context) { + let contentEnd = events.length - 2 + let contentStart = 3 + /** @type {Token} */ + let content + /** @type {Token} */ + let text + + // Prefix whitespace, part of the opening. + if (events[contentStart][1].type === 'whitespace') { + contentStart += 2 + } + + // Suffix whitespace, part of the closing. + if ( + contentEnd - 2 > contentStart && + events[contentEnd][1].type === 'whitespace' + ) { + contentEnd -= 2 + } + if ( + events[contentEnd][1].type === 'atxHeadingSequence' && + (contentStart === contentEnd - 1 || + (contentEnd - 4 > contentStart && + events[contentEnd - 2][1].type === 'whitespace')) + ) { + contentEnd -= contentStart + 1 === contentEnd ? 2 : 4 + } + if (contentEnd > contentStart) { + content = { + type: 'atxHeadingText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end + } + text = { + type: 'chunkText', + start: events[contentStart][1].start, + end: events[contentEnd][1].end, + contentType: 'text' + } + splice(events, contentStart, contentEnd - contentStart + 1, [ + ['enter', content, context], + ['enter', text, context], + ['exit', text, context], + ['exit', content, context] + ]) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHeadingAtx(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of a heading (atx). + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + effects.enter('atxHeading') + return before(code) + } + + /** + * After optional whitespace, at `#`. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('atxHeadingSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 35 && size++ < 6) { + effects.consume(code) + return sequenceOpen + } + + // Always at least one `#`. + if (code === null || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingSequence') + return atBreak(code) + } + return nok(code) + } + + /** + * After something, before something else. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function atBreak(code) { + if (code === 35) { + effects.enter('atxHeadingSequence') + return sequenceFurther(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('atxHeading') + // To do: interrupt like `markdown-rs`. + // // Feel free to interrupt. + // tokenizer.interrupt = false + return ok(code) + } + if (markdownSpace(code)) { + return factorySpace(effects, atBreak, 'whitespace')(code) + } + + // To do: generate `data` tokens, add the `text` token later. + // Needs edit map, see: `markdown.rs`. + effects.enter('atxHeadingText') + return data(code) + } + + /** + * In further sequence (after whitespace). + * + * Could be normal “visible” hashes in the heading or a final sequence. + * + * ```markdown + * > | ## aa ## + * ^ + * ``` + * + * @type {State} + */ + function sequenceFurther(code) { + if (code === 35) { + effects.consume(code) + return sequenceFurther + } + effects.exit('atxHeadingSequence') + return atBreak(code) + } + + /** + * In text. + * + * ```markdown + * > | ## aa + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if (code === null || code === 35 || markdownLineEndingOrSpace(code)) { + effects.exit('atxHeadingText') + return atBreak(code) + } + effects.consume(code) + return data + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/setext-underline.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const setextUnderline = { + name: 'setextUnderline', + tokenize: tokenizeSetextUnderline, + resolveTo: resolveToSetextUnderline +} + +/** @type {Resolver} */ +function resolveToSetextUnderline(events, context) { + // To do: resolve like `markdown-rs`. + let index = events.length + /** @type {number | undefined} */ + let content + /** @type {number | undefined} */ + let text + /** @type {number | undefined} */ + let definition + + // Find the opening of the content. + // It’ll always exist: we don’t tokenize if it isn’t there. + while (index--) { + if (events[index][0] === 'enter') { + if (events[index][1].type === 'content') { + content = index + break + } + if (events[index][1].type === 'paragraph') { + text = index + } + } + // Exit + else { + if (events[index][1].type === 'content') { + // Remove the content end (if needed we’ll add it later) + events.splice(index, 1) + } + if (!definition && events[index][1].type === 'definition') { + definition = index + } + } + } + const heading = { + type: 'setextHeading', + start: Object.assign({}, events[text][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + + // Change the paragraph to setext heading text. + events[text][1].type = 'setextHeadingText' + + // If we have definitions in the content, we’ll keep on having content, + // but we need move it. + if (definition) { + events.splice(text, 0, ['enter', heading, context]) + events.splice(definition + 1, 0, ['exit', events[content][1], context]) + events[content][1].end = Object.assign({}, events[definition][1].end) + } else { + events[content][1] = heading + } + + // Add the heading exit at the end. + events.push(['exit', heading, context]) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeSetextUnderline(effects, ok, nok) { + const self = this + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * At start of heading (setext) underline. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + let index = self.events.length + /** @type {boolean | undefined} */ + let paragraph + // Find an opening. + while (index--) { + // Skip enter/exit of line ending, line prefix, and content. + // We can now either have a definition or a paragraph. + if ( + self.events[index][1].type !== 'lineEnding' && + self.events[index][1].type !== 'linePrefix' && + self.events[index][1].type !== 'content' + ) { + paragraph = self.events[index][1].type === 'paragraph' + break + } + } + + // To do: handle lazy/pierce like `markdown-rs`. + // To do: parse indent like `markdown-rs`. + if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) { + effects.enter('setextHeadingLine') + marker = code + return before(code) + } + return nok(code) + } + + /** + * After optional whitespace, at `-` or `=`. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('setextHeadingLineSequence') + return inside(code) + } + + /** + * In sequence. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + effects.exit('setextHeadingLineSequence') + return markdownSpace(code) + ? factorySpace(effects, after, 'lineSuffix')(code) + : after(code) + } + + /** + * After sequence, after optional whitespace. + * + * ```markdown + * | aa + * > | == + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('setextHeadingLine') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-html-tag-name/index.js +/** + * List of lowercase HTML “block” tag names. + * + * The list, when parsing HTML (flow), results in more relaxed rules (condition + * 6). + * Because they are known blocks, the HTML-like syntax doesn’t have to be + * strictly parsed. + * For tag names not in this list, a more strict algorithm (condition 7) is used + * to detect whether the HTML-like syntax is seen as HTML (flow) or not. + * + * This is copied from: + * <https://spec.commonmark.org/0.30/#html-blocks>. + * + * > 👉 **Note**: `search` was added in `CommonMark@0.31`. + */ +const htmlBlockNames = [ + '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' +] + +/** + * List of lowercase HTML “raw” tag names. + * + * The list, when parsing HTML (flow), results in HTML that can include lines + * without exiting, until a closing tag also in this list is found (condition + * 1). + * + * This module is copied from: + * <https://spec.commonmark.org/0.30/#html-blocks>. + * + * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`. + */ +const htmlRawNames = ['pre', 'script', 'style', 'textarea'] + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-flow.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + +/** @type {Construct} */ +const htmlFlow = { + name: 'htmlFlow', + tokenize: tokenizeHtmlFlow, + resolveTo: resolveToHtmlFlow, + concrete: true +} + +/** @type {Construct} */ +const blankLineBefore = { + tokenize: tokenizeBlankLineBefore, + partial: true +} +const nonLazyContinuationStart = { + tokenize: tokenizeNonLazyContinuationStart, + partial: true +} + +/** @type {Resolver} */ +function resolveToHtmlFlow(events) { + let index = events.length + while (index--) { + if (events[index][0] === 'enter' && events[index][1].type === 'htmlFlow') { + break + } + } + if (index > 1 && events[index - 2][1].type === 'linePrefix') { + // Add the prefix start to the HTML token. + events[index][1].start = events[index - 2][1].start + // Add the prefix start to the HTML line token. + events[index + 1][1].start = events[index - 2][1].start + // Remove the line prefix. + events.splice(index - 2, 2) + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlFlow(effects, ok, nok) { + const self = this + /** @type {number} */ + let marker + /** @type {boolean} */ + let closingTag + /** @type {string} */ + let buffer + /** @type {number} */ + let index + /** @type {Code} */ + let markerB + return start + + /** + * Start of HTML (flow). + * + * ```markdown + * > | <x /> + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse indent like `markdown-rs`. + return before(code) + } + + /** + * At `<`, after optional whitespace. + * + * ```markdown + * > | <x /> + * ^ + * ``` + * + * @type {State} + */ + function before(code) { + effects.enter('htmlFlow') + effects.enter('htmlFlowData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | <x /> + * ^ + * > | <!doctype> + * ^ + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + closingTag = true + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + marker = 3 + // To do: + // tokenizer.concrete = true + // To do: use `markdown-rs` style interrupt. + // While we’re in an instruction instead of a declaration, we’re on a `?` + // right now, so we do need to search for `>`, similar to declarations. + return self.interrupt ? ok : continuationDeclarationInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After `<!`, at declaration, comment, or CDATA. + * + * ```markdown + * > | <!doctype> + * ^ + * > | <!--xxx--> + * ^ + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + marker = 2 + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + marker = 5 + index = 0 + return cdataOpenInside + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + marker = 4 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After `<!-`, inside a comment, at another `-`. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuationDeclarationInside + } + return nok(code) + } + + /** + * After `<![`, inside CDATA, expecting `CDATA[`. + * + * ```markdown + * > | <![CDATA[>&<]]> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + if (index === value.length) { + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return cdataOpenInside + } + return nok(code) + } + + /** + * After `</`, in closing tag, at tag name. + * + * ```markdown + * > | </x> + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + if (asciiAlpha(code)) { + effects.consume(code) + // @ts-expect-error: not null. + buffer = String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * In tag name. + * + * ```markdown + * > | <ab> + * ^^ + * > | </ab> + * ^^ + * ``` + * + * @type {State} + */ + function tagName(code) { + if ( + code === null || + code === 47 || + code === 62 || + markdownLineEndingOrSpace(code) + ) { + const slash = code === 47 + const name = buffer.toLowerCase() + if (!slash && !closingTag && htmlRawNames.includes(name)) { + marker = 1 + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + if (htmlBlockNames.includes(buffer.toLowerCase())) { + marker = 6 + if (slash) { + effects.consume(code) + return basicSelfClosing + } + + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok(code) : continuation(code) + } + marker = 7 + // Do not support complete HTML when interrupting. + return self.interrupt && !self.parser.lazy[self.now().line] + ? nok(code) + : closingTag + ? completeClosingTagAfter(code) + : completeAttributeNameBefore(code) + } + + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + buffer += String.fromCharCode(code) + return tagName + } + return nok(code) + } + + /** + * After closing slash of a basic tag name. + * + * ```markdown + * > | <div/> + * ^ + * ``` + * + * @type {State} + */ + function basicSelfClosing(code) { + if (code === 62) { + effects.consume(code) + // // Do not form containers. + // tokenizer.concrete = true + return self.interrupt ? ok : continuation + } + return nok(code) + } + + /** + * After closing slash of a complete tag name. + * + * ```markdown + * > | <x/> + * ^ + * ``` + * + * @type {State} + */ + function completeClosingTagAfter(code) { + if (markdownSpace(code)) { + effects.consume(code) + return completeClosingTagAfter + } + return completeEnd(code) + } + + /** + * At an attribute name. + * + * At first, this state is used after a complete tag name, after whitespace, + * where it expects optional attributes or the end of the tag. + * It is also reused after attributes, when expecting more optional + * attributes. + * + * ```markdown + * > | <a /> + * ^ + * > | <a :b> + * ^ + * > | <a _b> + * ^ + * > | <a b> + * ^ + * > | <a > + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameBefore(code) { + if (code === 47) { + effects.consume(code) + return completeEnd + } + + // ASCII alphanumerical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return completeAttributeName + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameBefore + } + return completeEnd(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | <a :b> + * ^ + * > | <a _b> + * ^ + * > | <a b> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeName(code) { + // ASCII alphanumerical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return completeAttributeName + } + return completeAttributeNameAfter(code) + } + + /** + * After attribute name, at an optional initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | <a b> + * ^ + * > | <a b=c> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return completeAttributeValueBefore + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeNameAfter + } + return completeAttributeNameBefore(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | <a b=c> + * ^ + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + markerB = code + return completeAttributeValueQuoted + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAttributeValueBefore + } + return completeAttributeValueUnquoted(code) + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | <a b="c"> + * ^ + * > | <a b='c'> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuoted(code) { + if (code === markerB) { + effects.consume(code) + markerB = null + return completeAttributeValueQuotedAfter + } + if (code === null || markdownLineEnding(code)) { + return nok(code) + } + effects.consume(code) + return completeAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | <a b=c> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 47 || + code === 60 || + code === 61 || + code === 62 || + code === 96 || + markdownLineEndingOrSpace(code) + ) { + return completeAttributeNameAfter(code) + } + effects.consume(code) + return completeAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the + * end of the tag. + * + * ```markdown + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownSpace(code)) { + return completeAttributeNameBefore(code) + } + return nok(code) + } + + /** + * In certain circumstances of a complete tag where only an `>` is allowed. + * + * ```markdown + * > | <a b="c"> + * ^ + * ``` + * + * @type {State} + */ + function completeEnd(code) { + if (code === 62) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * After `>` in a complete tag. + * + * ```markdown + * > | <x> + * ^ + * ``` + * + * @type {State} + */ + function completeAfter(code) { + if (code === null || markdownLineEnding(code)) { + // // Do not form containers. + // tokenizer.concrete = true + return continuation(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return completeAfter + } + return nok(code) + } + + /** + * In continuation of any HTML kind. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function continuation(code) { + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationCommentInside + } + if (code === 60 && marker === 1) { + effects.consume(code) + return continuationRawTagOpen + } + if (code === 62 && marker === 4) { + effects.consume(code) + return continuationClose + } + if (code === 63 && marker === 3) { + effects.consume(code) + return continuationDeclarationInside + } + if (code === 93 && marker === 5) { + effects.consume(code) + return continuationCdataInside + } + if (markdownLineEnding(code) && (marker === 6 || marker === 7)) { + effects.exit('htmlFlowData') + return effects.check( + blankLineBefore, + continuationAfter, + continuationStart + )(code) + } + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationStart(code) + } + effects.consume(code) + return continuation + } + + /** + * In continuation, at eol. + * + * ```markdown + * > | <x> + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStart(code) { + return effects.check( + nonLazyContinuationStart, + continuationStartNonLazy, + continuationAfter + )(code) + } + + /** + * In continuation, at eol, before non-lazy content. + * + * ```markdown + * > | <x> + * ^ + * | asd + * ``` + * + * @type {State} + */ + function continuationStartNonLazy(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return continuationBefore + } + + /** + * In continuation, before non-lazy content. + * + * ```markdown + * | <x> + * > | asd + * ^ + * ``` + * + * @type {State} + */ + function continuationBefore(code) { + if (code === null || markdownLineEnding(code)) { + return continuationStart(code) + } + effects.enter('htmlFlowData') + return continuation(code) + } + + /** + * In comment continuation, after one `-`, expecting another. + * + * ```markdown + * > | <!--xxx--> + * ^ + * ``` + * + * @type {State} + */ + function continuationCommentInside(code) { + if (code === 45) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In raw continuation, after `<`, at `/`. + * + * ```markdown + * > | <script>console.log(1)</script> + * ^ + * ``` + * + * @type {State} + */ + function continuationRawTagOpen(code) { + if (code === 47) { + effects.consume(code) + buffer = '' + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In raw continuation, after `</`, in a raw tag name. + * + * ```markdown + * > | <script>console.log(1)</script> + * ^^^^^^ + * ``` + * + * @type {State} + */ + function continuationRawEndTag(code) { + if (code === 62) { + const name = buffer.toLowerCase() + if (htmlRawNames.includes(name)) { + effects.consume(code) + return continuationClose + } + return continuation(code) + } + if (asciiAlpha(code) && buffer.length < 8) { + effects.consume(code) + // @ts-expect-error: not null. + buffer += String.fromCharCode(code) + return continuationRawEndTag + } + return continuation(code) + } + + /** + * In cdata continuation, after `]`, expecting `]>`. + * + * ```markdown + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationCdataInside(code) { + if (code === 93) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In declaration or instruction continuation, at `>`. + * + * ```markdown + * > | <!--> + * ^ + * > | <?> + * ^ + * > | <!q> + * ^ + * > | <!--ab--> + * ^ + * > | <![CDATA[>&<]]> + * ^ + * ``` + * + * @type {State} + */ + function continuationDeclarationInside(code) { + if (code === 62) { + effects.consume(code) + return continuationClose + } + + // More dashes. + if (code === 45 && marker === 2) { + effects.consume(code) + return continuationDeclarationInside + } + return continuation(code) + } + + /** + * In closed continuation: everything we get until the eol/eof is part of it. + * + * ```markdown + * > | <!doctype> + * ^ + * ``` + * + * @type {State} + */ + function continuationClose(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('htmlFlowData') + return continuationAfter(code) + } + effects.consume(code) + return continuationClose + } + + /** + * Done. + * + * ```markdown + * > | <!doctype> + * ^ + * ``` + * + * @type {State} + */ + function continuationAfter(code) { + effects.exit('htmlFlow') + // // Feel free to interrupt. + // tokenizer.interrupt = false + // // No longer concrete. + // tokenizer.concrete = false + return ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuationStart(effects, ok, nok) { + const self = this + return start + + /** + * At eol, before continuation. + * + * ```markdown + * > | * ```js + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return after + } + return nok(code) + } + + /** + * A continuation. + * + * ```markdown + * | * ```js + * > | b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeBlankLineBefore(effects, ok, nok) { + return start + + /** + * Before eol, expecting blank line. + * + * ```markdown + * > | <div> + * ^ + * | + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return effects.attempt(blankLine, ok, nok) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-fenced.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const nonLazyContinuation = { + tokenize: tokenizeNonLazyContinuation, + partial: true +} + +/** @type {Construct} */ +const codeFenced = { + name: 'codeFenced', + tokenize: tokenizeCodeFenced, + concrete: true +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeFenced(effects, ok, nok) { + const self = this + /** @type {Construct} */ + const closeStart = { + tokenize: tokenizeCloseStart, + partial: true + } + let initialPrefix = 0 + let sizeOpen = 0 + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Start of code. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function start(code) { + // To do: parse whitespace like `markdown-rs`. + return beforeSequenceOpen(code) + } + + /** + * In opening fence, after prefix, at sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeSequenceOpen(code) { + const tail = self.events[self.events.length - 1] + initialPrefix = + tail && tail[1].type === 'linePrefix' + ? tail[2].sliceSerialize(tail[1], true).length + : 0 + marker = code + effects.enter('codeFenced') + effects.enter('codeFencedFence') + effects.enter('codeFencedFenceSequence') + return sequenceOpen(code) + } + + /** + * In opening fence sequence. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === marker) { + sizeOpen++ + effects.consume(code) + return sequenceOpen + } + if (sizeOpen < 3) { + return nok(code) + } + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, infoBefore, 'whitespace')(code) + : infoBefore(code) + } + + /** + * In opening fence, after the sequence (and optional whitespace), before info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function infoBefore(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return self.interrupt + ? ok(code) + : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFencedFenceInfo') + effects.enter('chunkString', { + contentType: 'string' + }) + return info(code) + } + + /** + * In info. + * + * ```markdown + * > | ~~~js + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function info(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return infoBefore(code) + } + if (markdownSpace(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceInfo') + return factorySpace(effects, metaBefore, 'whitespace')(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return info + } + + /** + * In opening fence, after info and whitespace, before meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function metaBefore(code) { + if (code === null || markdownLineEnding(code)) { + return infoBefore(code) + } + effects.enter('codeFencedFenceMeta') + effects.enter('chunkString', { + contentType: 'string' + }) + return meta(code) + } + + /** + * In meta. + * + * ```markdown + * > | ~~~js eval + * ^ + * | alert(1) + * | ~~~ + * ``` + * + * @type {State} + */ + function meta(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('chunkString') + effects.exit('codeFencedFenceMeta') + return infoBefore(code) + } + if (code === 96 && code === marker) { + return nok(code) + } + effects.consume(code) + return meta + } + + /** + * At eol/eof in code, before a non-lazy closing fence or content. + * + * ```markdown + * > | ~~~js + * ^ + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function atNonLazyBreak(code) { + return effects.attempt(closeStart, after, contentBefore)(code) + } + + /** + * Before code content, not a closing fence, at eol. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return contentStart + } + + /** + * Before code content, not a closing fence. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentStart(code) { + return initialPrefix > 0 && markdownSpace(code) + ? factorySpace( + effects, + beforeContentChunk, + 'linePrefix', + initialPrefix + 1 + )(code) + : beforeContentChunk(code) + } + + /** + * Before code content, after optional prefix. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^ + * | ~~~ + * ``` + * + * @type {State} + */ + function beforeContentChunk(code) { + if (code === null || markdownLineEnding(code)) { + return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code) + } + effects.enter('codeFlowValue') + return contentChunk(code) + } + + /** + * In code content. + * + * ```markdown + * | ~~~js + * > | alert(1) + * ^^^^^^^^ + * | ~~~ + * ``` + * + * @type {State} + */ + function contentChunk(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFlowValue') + return beforeContentChunk(code) + } + effects.consume(code) + return contentChunk + } + + /** + * After code. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + effects.exit('codeFenced') + return ok(code) + } + + /** + * @this {TokenizeContext} + * @type {Tokenizer} + */ + function tokenizeCloseStart(effects, ok, nok) { + let size = 0 + return startBefore + + /** + * + * + * @type {State} + */ + function startBefore(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return start + } + + /** + * Before closing fence, at optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + // Always populated by defaults. + + // To do: `enter` here or in next state? + effects.enter('codeFencedFence') + return markdownSpace(code) + ? factorySpace( + effects, + beforeSequenceClose, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : beforeSequenceClose(code) + } + + /** + * In closing fence, after optional whitespace, at sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function beforeSequenceClose(code) { + if (code === marker) { + effects.enter('codeFencedFenceSequence') + return sequenceClose(code) + } + return nok(code) + } + + /** + * In closing fence sequence. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + if (code === marker) { + size++ + effects.consume(code) + return sequenceClose + } + if (size >= sizeOpen) { + effects.exit('codeFencedFenceSequence') + return markdownSpace(code) + ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code) + : sequenceCloseAfter(code) + } + return nok(code) + } + + /** + * After closing fence sequence, after optional whitespace. + * + * ```markdown + * | ~~~js + * | alert(1) + * > | ~~~ + * ^ + * ``` + * + * @type {State} + */ + function sequenceCloseAfter(code) { + if (code === null || markdownLineEnding(code)) { + effects.exit('codeFencedFence') + return ok(code) + } + return nok(code) + } + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeNonLazyContinuation(effects, ok, nok) { + const self = this + return start + + /** + * + * + * @type {State} + */ + function start(code) { + if (code === null) { + return nok(code) + } + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineStart + } + + /** + * + * + * @type {State} + */ + function lineStart(code) { + return self.parser.lazy[self.now().line] ? nok(code) : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/character-entities/index.js +/** + * Map of named character references. + * + * @type {Record<string, string>} + */ +const characterEntities = { + AElig: 'Æ', + AMP: '&', + Aacute: 'Á', + Abreve: 'Ă', + Acirc: 'Â', + Acy: 'А', + Afr: '𝔄', + Agrave: 'À', + Alpha: 'Α', + Amacr: 'Ā', + And: '⩓', + Aogon: 'Ą', + Aopf: '𝔸', + ApplyFunction: '⁡', + Aring: 'Å', + Ascr: '𝒜', + Assign: '≔', + Atilde: 'Ã', + Auml: 'Ä', + Backslash: '∖', + Barv: '⫧', + Barwed: '⌆', + Bcy: 'Б', + Because: '∵', + Bernoullis: 'ℬ', + Beta: 'Β', + Bfr: '𝔅', + Bopf: '𝔹', + Breve: '˘', + Bscr: 'ℬ', + Bumpeq: '≎', + CHcy: 'Ч', + COPY: '©', + Cacute: 'Ć', + Cap: '⋒', + CapitalDifferentialD: 'ⅅ', + Cayleys: 'ℭ', + Ccaron: 'Č', + Ccedil: 'Ç', + Ccirc: 'Ĉ', + Cconint: '∰', + Cdot: 'Ċ', + Cedilla: '¸', + CenterDot: '·', + Cfr: 'ℭ', + Chi: 'Χ', + CircleDot: '⊙', + CircleMinus: '⊖', + CirclePlus: '⊕', + CircleTimes: '⊗', + ClockwiseContourIntegral: '∲', + CloseCurlyDoubleQuote: '”', + CloseCurlyQuote: '’', + Colon: '∷', + Colone: '⩴', + Congruent: '≡', + Conint: '∯', + ContourIntegral: '∮', + Copf: 'ℂ', + Coproduct: '∐', + CounterClockwiseContourIntegral: '∳', + Cross: '⨯', + Cscr: '𝒞', + Cup: '⋓', + CupCap: '≍', + DD: 'ⅅ', + DDotrahd: '⤑', + DJcy: 'Ђ', + DScy: 'Ѕ', + DZcy: 'Џ', + Dagger: '‡', + Darr: '↡', + Dashv: '⫤', + Dcaron: 'Ď', + Dcy: 'Д', + Del: '∇', + Delta: 'Δ', + Dfr: '𝔇', + DiacriticalAcute: '´', + DiacriticalDot: '˙', + DiacriticalDoubleAcute: '˝', + DiacriticalGrave: '`', + DiacriticalTilde: '˜', + Diamond: '⋄', + DifferentialD: 'ⅆ', + Dopf: '𝔻', + Dot: '¨', + DotDot: '⃜', + DotEqual: '≐', + DoubleContourIntegral: '∯', + DoubleDot: '¨', + DoubleDownArrow: '⇓', + DoubleLeftArrow: '⇐', + DoubleLeftRightArrow: '⇔', + DoubleLeftTee: '⫤', + DoubleLongLeftArrow: '⟸', + DoubleLongLeftRightArrow: '⟺', + DoubleLongRightArrow: '⟹', + DoubleRightArrow: '⇒', + DoubleRightTee: '⊨', + DoubleUpArrow: '⇑', + DoubleUpDownArrow: '⇕', + DoubleVerticalBar: '∥', + DownArrow: '↓', + DownArrowBar: '⤓', + DownArrowUpArrow: '⇵', + DownBreve: '̑', + DownLeftRightVector: '⥐', + DownLeftTeeVector: '⥞', + DownLeftVector: '↽', + DownLeftVectorBar: '⥖', + DownRightTeeVector: '⥟', + DownRightVector: '⇁', + DownRightVectorBar: '⥗', + DownTee: '⊤', + DownTeeArrow: '↧', + Downarrow: '⇓', + Dscr: '𝒟', + Dstrok: 'Đ', + ENG: 'Ŋ', + ETH: 'Ð', + Eacute: 'É', + Ecaron: 'Ě', + Ecirc: 'Ê', + Ecy: 'Э', + Edot: 'Ė', + Efr: '𝔈', + Egrave: 'È', + Element: '∈', + Emacr: 'Ē', + EmptySmallSquare: '◻', + EmptyVerySmallSquare: '▫', + Eogon: 'Ę', + Eopf: '𝔼', + Epsilon: 'Ε', + Equal: '⩵', + EqualTilde: '≂', + Equilibrium: '⇌', + Escr: 'ℰ', + Esim: '⩳', + Eta: 'Η', + Euml: 'Ë', + Exists: '∃', + ExponentialE: 'ⅇ', + Fcy: 'Ф', + Ffr: '𝔉', + FilledSmallSquare: '◼', + FilledVerySmallSquare: '▪', + Fopf: '𝔽', + ForAll: '∀', + Fouriertrf: 'ℱ', + Fscr: 'ℱ', + GJcy: 'Ѓ', + GT: '>', + Gamma: 'Γ', + Gammad: 'Ϝ', + Gbreve: 'Ğ', + Gcedil: 'Ģ', + Gcirc: 'Ĝ', + Gcy: 'Г', + Gdot: 'Ġ', + Gfr: '𝔊', + Gg: '⋙', + Gopf: '𝔾', + GreaterEqual: '≥', + GreaterEqualLess: '⋛', + GreaterFullEqual: '≧', + GreaterGreater: '⪢', + GreaterLess: '≷', + GreaterSlantEqual: '⩾', + GreaterTilde: '≳', + Gscr: '𝒢', + Gt: '≫', + HARDcy: 'Ъ', + Hacek: 'ˇ', + Hat: '^', + Hcirc: 'Ĥ', + Hfr: 'ℌ', + HilbertSpace: 'ℋ', + Hopf: 'ℍ', + HorizontalLine: '─', + Hscr: 'ℋ', + Hstrok: 'Ħ', + HumpDownHump: '≎', + HumpEqual: '≏', + IEcy: 'Е', + IJlig: 'IJ', + IOcy: 'Ё', + Iacute: 'Í', + Icirc: 'Î', + Icy: 'И', + Idot: 'İ', + Ifr: 'ℑ', + Igrave: 'Ì', + Im: 'ℑ', + Imacr: 'Ī', + ImaginaryI: 'ⅈ', + Implies: '⇒', + Int: '∬', + Integral: '∫', + Intersection: '⋂', + InvisibleComma: '⁣', + InvisibleTimes: '⁢', + Iogon: 'Į', + Iopf: '𝕀', + Iota: 'Ι', + Iscr: 'ℐ', + Itilde: 'Ĩ', + Iukcy: 'І', + Iuml: 'Ï', + Jcirc: 'Ĵ', + Jcy: 'Й', + Jfr: '𝔍', + Jopf: '𝕁', + Jscr: '𝒥', + Jsercy: 'Ј', + Jukcy: 'Є', + KHcy: 'Х', + KJcy: 'Ќ', + Kappa: 'Κ', + Kcedil: 'Ķ', + Kcy: 'К', + Kfr: '𝔎', + Kopf: '𝕂', + Kscr: '𝒦', + LJcy: 'Љ', + LT: '<', + Lacute: 'Ĺ', + Lambda: 'Λ', + Lang: '⟪', + Laplacetrf: 'ℒ', + Larr: '↞', + Lcaron: 'Ľ', + Lcedil: 'Ļ', + Lcy: 'Л', + LeftAngleBracket: '⟨', + LeftArrow: '←', + LeftArrowBar: '⇤', + LeftArrowRightArrow: '⇆', + LeftCeiling: '⌈', + LeftDoubleBracket: '⟦', + LeftDownTeeVector: '⥡', + LeftDownVector: '⇃', + LeftDownVectorBar: '⥙', + LeftFloor: '⌊', + LeftRightArrow: '↔', + LeftRightVector: '⥎', + LeftTee: '⊣', + LeftTeeArrow: '↤', + LeftTeeVector: '⥚', + LeftTriangle: '⊲', + LeftTriangleBar: '⧏', + LeftTriangleEqual: '⊴', + LeftUpDownVector: '⥑', + LeftUpTeeVector: '⥠', + LeftUpVector: '↿', + LeftUpVectorBar: '⥘', + LeftVector: '↼', + LeftVectorBar: '⥒', + Leftarrow: '⇐', + Leftrightarrow: '⇔', + LessEqualGreater: '⋚', + LessFullEqual: '≦', + LessGreater: '≶', + LessLess: '⪡', + LessSlantEqual: '⩽', + LessTilde: '≲', + Lfr: '𝔏', + Ll: '⋘', + Lleftarrow: '⇚', + Lmidot: 'Ŀ', + LongLeftArrow: '⟵', + LongLeftRightArrow: '⟷', + LongRightArrow: '⟶', + Longleftarrow: '⟸', + Longleftrightarrow: '⟺', + Longrightarrow: '⟹', + Lopf: '𝕃', + LowerLeftArrow: '↙', + LowerRightArrow: '↘', + Lscr: 'ℒ', + Lsh: '↰', + Lstrok: 'Ł', + Lt: '≪', + Map: '⤅', + Mcy: 'М', + MediumSpace: ' ', + Mellintrf: 'ℳ', + Mfr: '𝔐', + MinusPlus: '∓', + Mopf: '𝕄', + Mscr: 'ℳ', + Mu: 'Μ', + NJcy: 'Њ', + Nacute: 'Ń', + Ncaron: 'Ň', + Ncedil: 'Ņ', + Ncy: 'Н', + NegativeMediumSpace: '​', + NegativeThickSpace: '​', + NegativeThinSpace: '​', + NegativeVeryThinSpace: '​', + NestedGreaterGreater: '≫', + NestedLessLess: '≪', + NewLine: '\n', + Nfr: '𝔑', + NoBreak: '⁠', + NonBreakingSpace: ' ', + Nopf: 'ℕ', + Not: '⫬', + NotCongruent: '≢', + NotCupCap: '≭', + NotDoubleVerticalBar: '∦', + NotElement: '∉', + NotEqual: '≠', + NotEqualTilde: '≂̸', + NotExists: '∄', + NotGreater: '≯', + NotGreaterEqual: '≱', + NotGreaterFullEqual: '≧̸', + NotGreaterGreater: '≫̸', + NotGreaterLess: '≹', + NotGreaterSlantEqual: '⩾̸', + NotGreaterTilde: '≵', + NotHumpDownHump: '≎̸', + NotHumpEqual: '≏̸', + NotLeftTriangle: '⋪', + NotLeftTriangleBar: '⧏̸', + NotLeftTriangleEqual: '⋬', + NotLess: '≮', + NotLessEqual: '≰', + NotLessGreater: '≸', + NotLessLess: '≪̸', + NotLessSlantEqual: '⩽̸', + NotLessTilde: '≴', + NotNestedGreaterGreater: '⪢̸', + NotNestedLessLess: '⪡̸', + NotPrecedes: '⊀', + NotPrecedesEqual: '⪯̸', + NotPrecedesSlantEqual: '⋠', + NotReverseElement: '∌', + NotRightTriangle: '⋫', + NotRightTriangleBar: '⧐̸', + NotRightTriangleEqual: '⋭', + NotSquareSubset: '⊏̸', + NotSquareSubsetEqual: '⋢', + NotSquareSuperset: '⊐̸', + NotSquareSupersetEqual: '⋣', + NotSubset: '⊂⃒', + NotSubsetEqual: '⊈', + NotSucceeds: '⊁', + NotSucceedsEqual: '⪰̸', + NotSucceedsSlantEqual: '⋡', + NotSucceedsTilde: '≿̸', + NotSuperset: '⊃⃒', + NotSupersetEqual: '⊉', + NotTilde: '≁', + NotTildeEqual: '≄', + NotTildeFullEqual: '≇', + NotTildeTilde: '≉', + NotVerticalBar: '∤', + Nscr: '𝒩', + Ntilde: 'Ñ', + Nu: 'Ν', + OElig: 'Œ', + Oacute: 'Ó', + Ocirc: 'Ô', + Ocy: 'О', + Odblac: 'Ő', + Ofr: '𝔒', + Ograve: 'Ò', + Omacr: 'Ō', + Omega: 'Ω', + Omicron: 'Ο', + Oopf: '𝕆', + OpenCurlyDoubleQuote: '“', + OpenCurlyQuote: '‘', + Or: '⩔', + Oscr: '𝒪', + Oslash: 'Ø', + Otilde: 'Õ', + Otimes: '⨷', + Ouml: 'Ö', + OverBar: '‾', + OverBrace: '⏞', + OverBracket: '⎴', + OverParenthesis: '⏜', + PartialD: '∂', + Pcy: 'П', + Pfr: '𝔓', + Phi: 'Φ', + Pi: 'Π', + PlusMinus: '±', + Poincareplane: 'ℌ', + Popf: 'ℙ', + Pr: '⪻', + Precedes: '≺', + PrecedesEqual: '⪯', + PrecedesSlantEqual: '≼', + PrecedesTilde: '≾', + Prime: '″', + Product: '∏', + Proportion: '∷', + Proportional: '∝', + Pscr: '𝒫', + Psi: 'Ψ', + QUOT: '"', + Qfr: '𝔔', + Qopf: 'ℚ', + Qscr: '𝒬', + RBarr: '⤐', + REG: '®', + Racute: 'Ŕ', + Rang: '⟫', + Rarr: '↠', + Rarrtl: '⤖', + Rcaron: 'Ř', + Rcedil: 'Ŗ', + Rcy: 'Р', + Re: 'ℜ', + ReverseElement: '∋', + ReverseEquilibrium: '⇋', + ReverseUpEquilibrium: '⥯', + Rfr: 'ℜ', + Rho: 'Ρ', + RightAngleBracket: '⟩', + RightArrow: '→', + RightArrowBar: '⇥', + RightArrowLeftArrow: '⇄', + RightCeiling: '⌉', + RightDoubleBracket: '⟧', + RightDownTeeVector: '⥝', + RightDownVector: '⇂', + RightDownVectorBar: '⥕', + RightFloor: '⌋', + RightTee: '⊢', + RightTeeArrow: '↦', + RightTeeVector: '⥛', + RightTriangle: '⊳', + RightTriangleBar: '⧐', + RightTriangleEqual: '⊵', + RightUpDownVector: '⥏', + RightUpTeeVector: '⥜', + RightUpVector: '↾', + RightUpVectorBar: '⥔', + RightVector: '⇀', + RightVectorBar: '⥓', + Rightarrow: '⇒', + Ropf: 'ℝ', + RoundImplies: '⥰', + Rrightarrow: '⇛', + Rscr: 'ℛ', + Rsh: '↱', + RuleDelayed: '⧴', + SHCHcy: 'Щ', + SHcy: 'Ш', + SOFTcy: 'Ь', + Sacute: 'Ś', + Sc: '⪼', + Scaron: 'Š', + Scedil: 'Ş', + Scirc: 'Ŝ', + Scy: 'С', + Sfr: '𝔖', + ShortDownArrow: '↓', + ShortLeftArrow: '←', + ShortRightArrow: '→', + ShortUpArrow: '↑', + Sigma: 'Σ', + SmallCircle: '∘', + Sopf: '𝕊', + Sqrt: '√', + Square: '□', + SquareIntersection: '⊓', + SquareSubset: '⊏', + SquareSubsetEqual: '⊑', + SquareSuperset: '⊐', + SquareSupersetEqual: '⊒', + SquareUnion: '⊔', + Sscr: '𝒮', + Star: '⋆', + Sub: '⋐', + Subset: '⋐', + SubsetEqual: '⊆', + Succeeds: '≻', + SucceedsEqual: '⪰', + SucceedsSlantEqual: '≽', + SucceedsTilde: '≿', + SuchThat: '∋', + Sum: '∑', + Sup: '⋑', + Superset: '⊃', + SupersetEqual: '⊇', + Supset: '⋑', + THORN: 'Þ', + TRADE: '™', + TSHcy: 'Ћ', + TScy: 'Ц', + Tab: '\t', + Tau: 'Τ', + Tcaron: 'Ť', + Tcedil: 'Ţ', + Tcy: 'Т', + Tfr: '𝔗', + Therefore: '∴', + Theta: 'Θ', + ThickSpace: '  ', + ThinSpace: ' ', + Tilde: '∼', + TildeEqual: '≃', + TildeFullEqual: '≅', + TildeTilde: '≈', + Topf: '𝕋', + TripleDot: '⃛', + Tscr: '𝒯', + Tstrok: 'Ŧ', + Uacute: 'Ú', + Uarr: '↟', + Uarrocir: '⥉', + Ubrcy: 'Ў', + Ubreve: 'Ŭ', + Ucirc: 'Û', + Ucy: 'У', + Udblac: 'Ű', + Ufr: '𝔘', + Ugrave: 'Ù', + Umacr: 'Ū', + UnderBar: '_', + UnderBrace: '⏟', + UnderBracket: '⎵', + UnderParenthesis: '⏝', + Union: '⋃', + UnionPlus: '⊎', + Uogon: 'Ų', + Uopf: '𝕌', + UpArrow: '↑', + UpArrowBar: '⤒', + UpArrowDownArrow: '⇅', + UpDownArrow: '↕', + UpEquilibrium: '⥮', + UpTee: '⊥', + UpTeeArrow: '↥', + Uparrow: '⇑', + Updownarrow: '⇕', + UpperLeftArrow: '↖', + UpperRightArrow: '↗', + Upsi: 'ϒ', + Upsilon: 'Υ', + Uring: 'Ů', + Uscr: '𝒰', + Utilde: 'Ũ', + Uuml: 'Ü', + VDash: '⊫', + Vbar: '⫫', + Vcy: 'В', + Vdash: '⊩', + Vdashl: '⫦', + Vee: '⋁', + Verbar: '‖', + Vert: '‖', + VerticalBar: '∣', + VerticalLine: '|', + VerticalSeparator: '❘', + VerticalTilde: '≀', + VeryThinSpace: ' ', + Vfr: '𝔙', + Vopf: '𝕍', + Vscr: '𝒱', + Vvdash: '⊪', + Wcirc: 'Ŵ', + Wedge: '⋀', + Wfr: '𝔚', + Wopf: '𝕎', + Wscr: '𝒲', + Xfr: '𝔛', + Xi: 'Ξ', + Xopf: '𝕏', + Xscr: '𝒳', + YAcy: 'Я', + YIcy: 'Ї', + YUcy: 'Ю', + Yacute: 'Ý', + Ycirc: 'Ŷ', + Ycy: 'Ы', + Yfr: '𝔜', + Yopf: '𝕐', + Yscr: '𝒴', + Yuml: 'Ÿ', + ZHcy: 'Ж', + Zacute: 'Ź', + Zcaron: 'Ž', + Zcy: 'З', + Zdot: 'Ż', + ZeroWidthSpace: '​', + Zeta: 'Ζ', + Zfr: 'ℨ', + Zopf: 'ℤ', + Zscr: '𝒵', + aacute: 'á', + abreve: 'ă', + ac: '∾', + acE: '∾̳', + acd: '∿', + acirc: 'â', + acute: '´', + acy: 'а', + aelig: 'æ', + af: '⁡', + afr: '𝔞', + agrave: 'à', + alefsym: 'ℵ', + aleph: 'ℵ', + alpha: 'α', + amacr: 'ā', + amalg: '⨿', + amp: '&', + and: '∧', + andand: '⩕', + andd: '⩜', + andslope: '⩘', + andv: '⩚', + ang: '∠', + ange: '⦤', + angle: '∠', + angmsd: '∡', + angmsdaa: '⦨', + angmsdab: '⦩', + angmsdac: '⦪', + angmsdad: '⦫', + angmsdae: '⦬', + angmsdaf: '⦭', + angmsdag: '⦮', + angmsdah: '⦯', + angrt: '∟', + angrtvb: '⊾', + angrtvbd: '⦝', + angsph: '∢', + angst: 'Å', + angzarr: '⍼', + aogon: 'ą', + aopf: '𝕒', + ap: '≈', + apE: '⩰', + apacir: '⩯', + ape: '≊', + apid: '≋', + apos: "'", + approx: '≈', + approxeq: '≊', + aring: 'å', + ascr: '𝒶', + ast: '*', + asymp: '≈', + asympeq: '≍', + atilde: 'ã', + auml: 'ä', + awconint: '∳', + awint: '⨑', + bNot: '⫭', + backcong: '≌', + backepsilon: '϶', + backprime: '‵', + backsim: '∽', + backsimeq: '⋍', + barvee: '⊽', + barwed: '⌅', + barwedge: '⌅', + bbrk: '⎵', + bbrktbrk: '⎶', + bcong: '≌', + bcy: 'б', + bdquo: '„', + becaus: '∵', + because: '∵', + bemptyv: '⦰', + bepsi: '϶', + bernou: 'ℬ', + beta: 'β', + beth: 'ℶ', + between: '≬', + bfr: '𝔟', + bigcap: '⋂', + bigcirc: '◯', + bigcup: '⋃', + bigodot: '⨀', + bigoplus: '⨁', + bigotimes: '⨂', + bigsqcup: '⨆', + bigstar: '★', + bigtriangledown: '▽', + bigtriangleup: '△', + biguplus: '⨄', + bigvee: '⋁', + bigwedge: '⋀', + bkarow: '⤍', + blacklozenge: '⧫', + blacksquare: '▪', + blacktriangle: '▴', + blacktriangledown: '▾', + blacktriangleleft: '◂', + blacktriangleright: '▸', + blank: '␣', + blk12: '▒', + blk14: '░', + blk34: '▓', + block: '█', + bne: '=⃥', + bnequiv: '≡⃥', + bnot: '⌐', + bopf: '𝕓', + bot: '⊥', + bottom: '⊥', + bowtie: '⋈', + boxDL: '╗', + boxDR: '╔', + boxDl: '╖', + boxDr: '╓', + boxH: '═', + boxHD: '╦', + boxHU: '╩', + boxHd: '╤', + boxHu: '╧', + boxUL: '╝', + boxUR: '╚', + boxUl: '╜', + boxUr: '╙', + boxV: '║', + boxVH: '╬', + boxVL: '╣', + boxVR: '╠', + boxVh: '╫', + boxVl: '╢', + boxVr: '╟', + boxbox: '⧉', + boxdL: '╕', + boxdR: '╒', + boxdl: '┐', + boxdr: '┌', + boxh: '─', + boxhD: '╥', + boxhU: '╨', + boxhd: '┬', + boxhu: '┴', + boxminus: '⊟', + boxplus: '⊞', + boxtimes: '⊠', + boxuL: '╛', + boxuR: '╘', + boxul: '┘', + boxur: '└', + boxv: '│', + boxvH: '╪', + boxvL: '╡', + boxvR: '╞', + boxvh: '┼', + boxvl: '┤', + boxvr: '├', + bprime: '‵', + breve: '˘', + brvbar: '¦', + bscr: '𝒷', + bsemi: '⁏', + bsim: '∽', + bsime: '⋍', + bsol: '\\', + bsolb: '⧅', + bsolhsub: '⟈', + bull: '•', + bullet: '•', + bump: '≎', + bumpE: '⪮', + bumpe: '≏', + bumpeq: '≏', + cacute: 'ć', + cap: '∩', + capand: '⩄', + capbrcup: '⩉', + capcap: '⩋', + capcup: '⩇', + capdot: '⩀', + caps: '∩︀', + caret: '⁁', + caron: 'ˇ', + ccaps: '⩍', + ccaron: 'č', + ccedil: 'ç', + ccirc: 'ĉ', + ccups: '⩌', + ccupssm: '⩐', + cdot: 'ċ', + cedil: '¸', + cemptyv: '⦲', + cent: '¢', + centerdot: '·', + cfr: '𝔠', + chcy: 'ч', + check: '✓', + checkmark: '✓', + chi: 'χ', + cir: '○', + cirE: '⧃', + circ: 'ˆ', + circeq: '≗', + circlearrowleft: '↺', + circlearrowright: '↻', + circledR: '®', + circledS: 'Ⓢ', + circledast: '⊛', + circledcirc: '⊚', + circleddash: '⊝', + cire: '≗', + cirfnint: '⨐', + cirmid: '⫯', + cirscir: '⧂', + clubs: '♣', + clubsuit: '♣', + colon: ':', + colone: '≔', + coloneq: '≔', + comma: ',', + commat: '@', + comp: '∁', + compfn: '∘', + complement: '∁', + complexes: 'ℂ', + cong: '≅', + congdot: '⩭', + conint: '∮', + copf: '𝕔', + coprod: '∐', + copy: '©', + copysr: '℗', + crarr: '↵', + cross: '✗', + cscr: '𝒸', + csub: '⫏', + csube: '⫑', + csup: '⫐', + csupe: '⫒', + ctdot: '⋯', + cudarrl: '⤸', + cudarrr: '⤵', + cuepr: '⋞', + cuesc: '⋟', + cularr: '↶', + cularrp: '⤽', + cup: '∪', + cupbrcap: '⩈', + cupcap: '⩆', + cupcup: '⩊', + cupdot: '⊍', + cupor: '⩅', + cups: '∪︀', + curarr: '↷', + curarrm: '⤼', + curlyeqprec: '⋞', + curlyeqsucc: '⋟', + curlyvee: '⋎', + curlywedge: '⋏', + curren: '¤', + curvearrowleft: '↶', + curvearrowright: '↷', + cuvee: '⋎', + cuwed: '⋏', + cwconint: '∲', + cwint: '∱', + cylcty: '⌭', + dArr: '⇓', + dHar: '⥥', + dagger: '†', + daleth: 'ℸ', + darr: '↓', + dash: '‐', + dashv: '⊣', + dbkarow: '⤏', + dblac: '˝', + dcaron: 'ď', + dcy: 'д', + dd: 'ⅆ', + ddagger: '‡', + ddarr: '⇊', + ddotseq: '⩷', + deg: '°', + delta: 'δ', + demptyv: '⦱', + dfisht: '⥿', + dfr: '𝔡', + dharl: '⇃', + dharr: '⇂', + diam: '⋄', + diamond: '⋄', + diamondsuit: '♦', + diams: '♦', + die: '¨', + digamma: 'ϝ', + disin: '⋲', + div: '÷', + divide: '÷', + divideontimes: '⋇', + divonx: '⋇', + djcy: 'ђ', + dlcorn: '⌞', + dlcrop: '⌍', + dollar: '$', + dopf: '𝕕', + dot: '˙', + doteq: '≐', + doteqdot: '≑', + dotminus: '∸', + dotplus: '∔', + dotsquare: '⊡', + doublebarwedge: '⌆', + downarrow: '↓', + downdownarrows: '⇊', + downharpoonleft: '⇃', + downharpoonright: '⇂', + drbkarow: '⤐', + drcorn: '⌟', + drcrop: '⌌', + dscr: '𝒹', + dscy: 'ѕ', + dsol: '⧶', + dstrok: 'đ', + dtdot: '⋱', + dtri: '▿', + dtrif: '▾', + duarr: '⇵', + duhar: '⥯', + dwangle: '⦦', + dzcy: 'џ', + dzigrarr: '⟿', + eDDot: '⩷', + eDot: '≑', + eacute: 'é', + easter: '⩮', + ecaron: 'ě', + ecir: '≖', + ecirc: 'ê', + ecolon: '≕', + ecy: 'э', + edot: 'ė', + ee: 'ⅇ', + efDot: '≒', + efr: '𝔢', + eg: '⪚', + egrave: 'è', + egs: '⪖', + egsdot: '⪘', + el: '⪙', + elinters: '⏧', + ell: 'ℓ', + els: '⪕', + elsdot: '⪗', + emacr: 'ē', + empty: '∅', + emptyset: '∅', + emptyv: '∅', + emsp13: ' ', + emsp14: ' ', + emsp: ' ', + eng: 'ŋ', + ensp: ' ', + eogon: 'ę', + eopf: '𝕖', + epar: '⋕', + eparsl: '⧣', + eplus: '⩱', + epsi: 'ε', + epsilon: 'ε', + epsiv: 'ϵ', + eqcirc: '≖', + eqcolon: '≕', + eqsim: '≂', + eqslantgtr: '⪖', + eqslantless: '⪕', + equals: '=', + equest: '≟', + equiv: '≡', + equivDD: '⩸', + eqvparsl: '⧥', + erDot: '≓', + erarr: '⥱', + escr: 'ℯ', + esdot: '≐', + esim: '≂', + eta: 'η', + eth: 'ð', + euml: 'ë', + euro: '€', + excl: '!', + exist: '∃', + expectation: 'ℰ', + exponentiale: 'ⅇ', + fallingdotseq: '≒', + fcy: 'ф', + female: '♀', + ffilig: 'ffi', + fflig: 'ff', + ffllig: 'ffl', + ffr: '𝔣', + filig: 'fi', + fjlig: 'fj', + flat: '♭', + fllig: 'fl', + fltns: '▱', + fnof: 'ƒ', + fopf: '𝕗', + forall: '∀', + fork: '⋔', + forkv: '⫙', + fpartint: '⨍', + frac12: '½', + frac13: '⅓', + frac14: '¼', + frac15: '⅕', + frac16: '⅙', + frac18: '⅛', + frac23: '⅔', + frac25: '⅖', + frac34: '¾', + frac35: '⅗', + frac38: '⅜', + frac45: '⅘', + frac56: '⅚', + frac58: '⅝', + frac78: '⅞', + frasl: '⁄', + frown: '⌢', + fscr: '𝒻', + gE: '≧', + gEl: '⪌', + gacute: 'ǵ', + gamma: 'γ', + gammad: 'ϝ', + gap: '⪆', + gbreve: 'ğ', + gcirc: 'ĝ', + gcy: 'г', + gdot: 'ġ', + ge: '≥', + gel: '⋛', + geq: '≥', + geqq: '≧', + geqslant: '⩾', + ges: '⩾', + gescc: '⪩', + gesdot: '⪀', + gesdoto: '⪂', + gesdotol: '⪄', + gesl: '⋛︀', + gesles: '⪔', + gfr: '𝔤', + gg: '≫', + ggg: '⋙', + gimel: 'ℷ', + gjcy: 'ѓ', + gl: '≷', + glE: '⪒', + gla: '⪥', + glj: '⪤', + gnE: '≩', + gnap: '⪊', + gnapprox: '⪊', + gne: '⪈', + gneq: '⪈', + gneqq: '≩', + gnsim: '⋧', + gopf: '𝕘', + grave: '`', + gscr: 'ℊ', + gsim: '≳', + gsime: '⪎', + gsiml: '⪐', + gt: '>', + gtcc: '⪧', + gtcir: '⩺', + gtdot: '⋗', + gtlPar: '⦕', + gtquest: '⩼', + gtrapprox: '⪆', + gtrarr: '⥸', + gtrdot: '⋗', + gtreqless: '⋛', + gtreqqless: '⪌', + gtrless: '≷', + gtrsim: '≳', + gvertneqq: '≩︀', + gvnE: '≩︀', + hArr: '⇔', + hairsp: ' ', + half: '½', + hamilt: 'ℋ', + hardcy: 'ъ', + harr: '↔', + harrcir: '⥈', + harrw: '↭', + hbar: 'ℏ', + hcirc: 'ĥ', + hearts: '♥', + heartsuit: '♥', + hellip: '…', + hercon: '⊹', + hfr: '𝔥', + hksearow: '⤥', + hkswarow: '⤦', + hoarr: '⇿', + homtht: '∻', + hookleftarrow: '↩', + hookrightarrow: '↪', + hopf: '𝕙', + horbar: '―', + hscr: '𝒽', + hslash: 'ℏ', + hstrok: 'ħ', + hybull: '⁃', + hyphen: '‐', + iacute: 'í', + ic: '⁣', + icirc: 'î', + icy: 'и', + iecy: 'е', + iexcl: '¡', + iff: '⇔', + ifr: '𝔦', + igrave: 'ì', + ii: 'ⅈ', + iiiint: '⨌', + iiint: '∭', + iinfin: '⧜', + iiota: '℩', + ijlig: 'ij', + imacr: 'ī', + image: 'ℑ', + imagline: 'ℐ', + imagpart: 'ℑ', + imath: 'ı', + imof: '⊷', + imped: 'Ƶ', + in: '∈', + incare: '℅', + infin: '∞', + infintie: '⧝', + inodot: 'ı', + int: '∫', + intcal: '⊺', + integers: 'ℤ', + intercal: '⊺', + intlarhk: '⨗', + intprod: '⨼', + iocy: 'ё', + iogon: 'į', + iopf: '𝕚', + iota: 'ι', + iprod: '⨼', + iquest: '¿', + iscr: '𝒾', + isin: '∈', + isinE: '⋹', + isindot: '⋵', + isins: '⋴', + isinsv: '⋳', + isinv: '∈', + it: '⁢', + itilde: 'ĩ', + iukcy: 'і', + iuml: 'ï', + jcirc: 'ĵ', + jcy: 'й', + jfr: '𝔧', + jmath: 'ȷ', + jopf: '𝕛', + jscr: '𝒿', + jsercy: 'ј', + jukcy: 'є', + kappa: 'κ', + kappav: 'ϰ', + kcedil: 'ķ', + kcy: 'к', + kfr: '𝔨', + kgreen: 'ĸ', + khcy: 'х', + kjcy: 'ќ', + kopf: '𝕜', + kscr: '𝓀', + lAarr: '⇚', + lArr: '⇐', + lAtail: '⤛', + lBarr: '⤎', + lE: '≦', + lEg: '⪋', + lHar: '⥢', + lacute: 'ĺ', + laemptyv: '⦴', + lagran: 'ℒ', + lambda: 'λ', + lang: '⟨', + langd: '⦑', + langle: '⟨', + lap: '⪅', + laquo: '«', + larr: '←', + larrb: '⇤', + larrbfs: '⤟', + larrfs: '⤝', + larrhk: '↩', + larrlp: '↫', + larrpl: '⤹', + larrsim: '⥳', + larrtl: '↢', + lat: '⪫', + latail: '⤙', + late: '⪭', + lates: '⪭︀', + lbarr: '⤌', + lbbrk: '❲', + lbrace: '{', + lbrack: '[', + lbrke: '⦋', + lbrksld: '⦏', + lbrkslu: '⦍', + lcaron: 'ľ', + lcedil: 'ļ', + lceil: '⌈', + lcub: '{', + lcy: 'л', + ldca: '⤶', + ldquo: '“', + ldquor: '„', + ldrdhar: '⥧', + ldrushar: '⥋', + ldsh: '↲', + le: '≤', + leftarrow: '←', + leftarrowtail: '↢', + leftharpoondown: '↽', + leftharpoonup: '↼', + leftleftarrows: '⇇', + leftrightarrow: '↔', + leftrightarrows: '⇆', + leftrightharpoons: '⇋', + leftrightsquigarrow: '↭', + leftthreetimes: '⋋', + leg: '⋚', + leq: '≤', + leqq: '≦', + leqslant: '⩽', + les: '⩽', + lescc: '⪨', + lesdot: '⩿', + lesdoto: '⪁', + lesdotor: '⪃', + lesg: '⋚︀', + lesges: '⪓', + lessapprox: '⪅', + lessdot: '⋖', + lesseqgtr: '⋚', + lesseqqgtr: '⪋', + lessgtr: '≶', + lesssim: '≲', + lfisht: '⥼', + lfloor: '⌊', + lfr: '𝔩', + lg: '≶', + lgE: '⪑', + lhard: '↽', + lharu: '↼', + lharul: '⥪', + lhblk: '▄', + ljcy: 'љ', + ll: '≪', + llarr: '⇇', + llcorner: '⌞', + llhard: '⥫', + lltri: '◺', + lmidot: 'ŀ', + lmoust: '⎰', + lmoustache: '⎰', + lnE: '≨', + lnap: '⪉', + lnapprox: '⪉', + lne: '⪇', + lneq: '⪇', + lneqq: '≨', + lnsim: '⋦', + loang: '⟬', + loarr: '⇽', + lobrk: '⟦', + longleftarrow: '⟵', + longleftrightarrow: '⟷', + longmapsto: '⟼', + longrightarrow: '⟶', + looparrowleft: '↫', + looparrowright: '↬', + lopar: '⦅', + lopf: '𝕝', + loplus: '⨭', + lotimes: '⨴', + lowast: '∗', + lowbar: '_', + loz: '◊', + lozenge: '◊', + lozf: '⧫', + lpar: '(', + lparlt: '⦓', + lrarr: '⇆', + lrcorner: '⌟', + lrhar: '⇋', + lrhard: '⥭', + lrm: '‎', + lrtri: '⊿', + lsaquo: '‹', + lscr: '𝓁', + lsh: '↰', + lsim: '≲', + lsime: '⪍', + lsimg: '⪏', + lsqb: '[', + lsquo: '‘', + lsquor: '‚', + lstrok: 'ł', + lt: '<', + ltcc: '⪦', + ltcir: '⩹', + ltdot: '⋖', + lthree: '⋋', + ltimes: '⋉', + ltlarr: '⥶', + ltquest: '⩻', + ltrPar: '⦖', + ltri: '◃', + ltrie: '⊴', + ltrif: '◂', + lurdshar: '⥊', + luruhar: '⥦', + lvertneqq: '≨︀', + lvnE: '≨︀', + mDDot: '∺', + macr: '¯', + male: '♂', + malt: '✠', + maltese: '✠', + map: '↦', + mapsto: '↦', + mapstodown: '↧', + mapstoleft: '↤', + mapstoup: '↥', + marker: '▮', + mcomma: '⨩', + mcy: 'м', + mdash: '—', + measuredangle: '∡', + mfr: '𝔪', + mho: '℧', + micro: 'µ', + mid: '∣', + midast: '*', + midcir: '⫰', + middot: '·', + minus: '−', + minusb: '⊟', + minusd: '∸', + minusdu: '⨪', + mlcp: '⫛', + mldr: '…', + mnplus: '∓', + models: '⊧', + mopf: '𝕞', + mp: '∓', + mscr: '𝓂', + mstpos: '∾', + mu: 'μ', + multimap: '⊸', + mumap: '⊸', + nGg: '⋙̸', + nGt: '≫⃒', + nGtv: '≫̸', + nLeftarrow: '⇍', + nLeftrightarrow: '⇎', + nLl: '⋘̸', + nLt: '≪⃒', + nLtv: '≪̸', + nRightarrow: '⇏', + nVDash: '⊯', + nVdash: '⊮', + nabla: '∇', + nacute: 'ń', + nang: '∠⃒', + nap: '≉', + napE: '⩰̸', + napid: '≋̸', + napos: 'ʼn', + napprox: '≉', + natur: '♮', + natural: '♮', + naturals: 'ℕ', + nbsp: ' ', + nbump: '≎̸', + nbumpe: '≏̸', + ncap: '⩃', + ncaron: 'ň', + ncedil: 'ņ', + ncong: '≇', + ncongdot: '⩭̸', + ncup: '⩂', + ncy: 'н', + ndash: '–', + ne: '≠', + neArr: '⇗', + nearhk: '⤤', + nearr: '↗', + nearrow: '↗', + nedot: '≐̸', + nequiv: '≢', + nesear: '⤨', + nesim: '≂̸', + nexist: '∄', + nexists: '∄', + nfr: '𝔫', + ngE: '≧̸', + nge: '≱', + ngeq: '≱', + ngeqq: '≧̸', + ngeqslant: '⩾̸', + nges: '⩾̸', + ngsim: '≵', + ngt: '≯', + ngtr: '≯', + nhArr: '⇎', + nharr: '↮', + nhpar: '⫲', + ni: '∋', + nis: '⋼', + nisd: '⋺', + niv: '∋', + njcy: 'њ', + nlArr: '⇍', + nlE: '≦̸', + nlarr: '↚', + nldr: '‥', + nle: '≰', + nleftarrow: '↚', + nleftrightarrow: '↮', + nleq: '≰', + nleqq: '≦̸', + nleqslant: '⩽̸', + nles: '⩽̸', + nless: '≮', + nlsim: '≴', + nlt: '≮', + nltri: '⋪', + nltrie: '⋬', + nmid: '∤', + nopf: '𝕟', + not: '¬', + notin: '∉', + notinE: '⋹̸', + notindot: '⋵̸', + notinva: '∉', + notinvb: '⋷', + notinvc: '⋶', + notni: '∌', + notniva: '∌', + notnivb: '⋾', + notnivc: '⋽', + npar: '∦', + nparallel: '∦', + nparsl: '⫽⃥', + npart: '∂̸', + npolint: '⨔', + npr: '⊀', + nprcue: '⋠', + npre: '⪯̸', + nprec: '⊀', + npreceq: '⪯̸', + nrArr: '⇏', + nrarr: '↛', + nrarrc: '⤳̸', + nrarrw: '↝̸', + nrightarrow: '↛', + nrtri: '⋫', + nrtrie: '⋭', + nsc: '⊁', + nsccue: '⋡', + nsce: '⪰̸', + nscr: '𝓃', + nshortmid: '∤', + nshortparallel: '∦', + nsim: '≁', + nsime: '≄', + nsimeq: '≄', + nsmid: '∤', + nspar: '∦', + nsqsube: '⋢', + nsqsupe: '⋣', + nsub: '⊄', + nsubE: '⫅̸', + nsube: '⊈', + nsubset: '⊂⃒', + nsubseteq: '⊈', + nsubseteqq: '⫅̸', + nsucc: '⊁', + nsucceq: '⪰̸', + nsup: '⊅', + nsupE: '⫆̸', + nsupe: '⊉', + nsupset: '⊃⃒', + nsupseteq: '⊉', + nsupseteqq: '⫆̸', + ntgl: '≹', + ntilde: 'ñ', + ntlg: '≸', + ntriangleleft: '⋪', + ntrianglelefteq: '⋬', + ntriangleright: '⋫', + ntrianglerighteq: '⋭', + nu: 'ν', + num: '#', + numero: '№', + numsp: ' ', + nvDash: '⊭', + nvHarr: '⤄', + nvap: '≍⃒', + nvdash: '⊬', + nvge: '≥⃒', + nvgt: '>⃒', + nvinfin: '⧞', + nvlArr: '⤂', + nvle: '≤⃒', + nvlt: '<⃒', + nvltrie: '⊴⃒', + nvrArr: '⤃', + nvrtrie: '⊵⃒', + nvsim: '∼⃒', + nwArr: '⇖', + nwarhk: '⤣', + nwarr: '↖', + nwarrow: '↖', + nwnear: '⤧', + oS: 'Ⓢ', + oacute: 'ó', + oast: '⊛', + ocir: '⊚', + ocirc: 'ô', + ocy: 'о', + odash: '⊝', + odblac: 'ő', + odiv: '⨸', + odot: '⊙', + odsold: '⦼', + oelig: 'œ', + ofcir: '⦿', + ofr: '𝔬', + ogon: '˛', + ograve: 'ò', + ogt: '⧁', + ohbar: '⦵', + ohm: 'Ω', + oint: '∮', + olarr: '↺', + olcir: '⦾', + olcross: '⦻', + oline: '‾', + olt: '⧀', + omacr: 'ō', + omega: 'ω', + omicron: 'ο', + omid: '⦶', + ominus: '⊖', + oopf: '𝕠', + opar: '⦷', + operp: '⦹', + oplus: '⊕', + or: '∨', + orarr: '↻', + ord: '⩝', + order: 'ℴ', + orderof: 'ℴ', + ordf: 'ª', + ordm: 'º', + origof: '⊶', + oror: '⩖', + orslope: '⩗', + orv: '⩛', + oscr: 'ℴ', + oslash: 'ø', + osol: '⊘', + otilde: 'õ', + otimes: '⊗', + otimesas: '⨶', + ouml: 'ö', + ovbar: '⌽', + par: '∥', + para: '¶', + parallel: '∥', + parsim: '⫳', + parsl: '⫽', + part: '∂', + pcy: 'п', + percnt: '%', + period: '.', + permil: '‰', + perp: '⊥', + pertenk: '‱', + pfr: '𝔭', + phi: 'φ', + phiv: 'ϕ', + phmmat: 'ℳ', + phone: '☎', + pi: 'π', + pitchfork: '⋔', + piv: 'ϖ', + planck: 'ℏ', + planckh: 'ℎ', + plankv: 'ℏ', + plus: '+', + plusacir: '⨣', + plusb: '⊞', + pluscir: '⨢', + plusdo: '∔', + plusdu: '⨥', + pluse: '⩲', + plusmn: '±', + plussim: '⨦', + plustwo: '⨧', + pm: '±', + pointint: '⨕', + popf: '𝕡', + pound: '£', + pr: '≺', + prE: '⪳', + prap: '⪷', + prcue: '≼', + pre: '⪯', + prec: '≺', + precapprox: '⪷', + preccurlyeq: '≼', + preceq: '⪯', + precnapprox: '⪹', + precneqq: '⪵', + precnsim: '⋨', + precsim: '≾', + prime: '′', + primes: 'ℙ', + prnE: '⪵', + prnap: '⪹', + prnsim: '⋨', + prod: '∏', + profalar: '⌮', + profline: '⌒', + profsurf: '⌓', + prop: '∝', + propto: '∝', + prsim: '≾', + prurel: '⊰', + pscr: '𝓅', + psi: 'ψ', + puncsp: ' ', + qfr: '𝔮', + qint: '⨌', + qopf: '𝕢', + qprime: '⁗', + qscr: '𝓆', + quaternions: 'ℍ', + quatint: '⨖', + quest: '?', + questeq: '≟', + quot: '"', + rAarr: '⇛', + rArr: '⇒', + rAtail: '⤜', + rBarr: '⤏', + rHar: '⥤', + race: '∽̱', + racute: 'ŕ', + radic: '√', + raemptyv: '⦳', + rang: '⟩', + rangd: '⦒', + range: '⦥', + rangle: '⟩', + raquo: '»', + rarr: '→', + rarrap: '⥵', + rarrb: '⇥', + rarrbfs: '⤠', + rarrc: '⤳', + rarrfs: '⤞', + rarrhk: '↪', + rarrlp: '↬', + rarrpl: '⥅', + rarrsim: '⥴', + rarrtl: '↣', + rarrw: '↝', + ratail: '⤚', + ratio: '∶', + rationals: 'ℚ', + rbarr: '⤍', + rbbrk: '❳', + rbrace: '}', + rbrack: ']', + rbrke: '⦌', + rbrksld: '⦎', + rbrkslu: '⦐', + rcaron: 'ř', + rcedil: 'ŗ', + rceil: '⌉', + rcub: '}', + rcy: 'р', + rdca: '⤷', + rdldhar: '⥩', + rdquo: '”', + rdquor: '”', + rdsh: '↳', + real: 'ℜ', + realine: 'ℛ', + realpart: 'ℜ', + reals: 'ℝ', + rect: '▭', + reg: '®', + rfisht: '⥽', + rfloor: '⌋', + rfr: '𝔯', + rhard: '⇁', + rharu: '⇀', + rharul: '⥬', + rho: 'ρ', + rhov: 'ϱ', + rightarrow: '→', + rightarrowtail: '↣', + rightharpoondown: '⇁', + rightharpoonup: '⇀', + rightleftarrows: '⇄', + rightleftharpoons: '⇌', + rightrightarrows: '⇉', + rightsquigarrow: '↝', + rightthreetimes: '⋌', + ring: '˚', + risingdotseq: '≓', + rlarr: '⇄', + rlhar: '⇌', + rlm: '‏', + rmoust: '⎱', + rmoustache: '⎱', + rnmid: '⫮', + roang: '⟭', + roarr: '⇾', + robrk: '⟧', + ropar: '⦆', + ropf: '𝕣', + roplus: '⨮', + rotimes: '⨵', + rpar: ')', + rpargt: '⦔', + rppolint: '⨒', + rrarr: '⇉', + rsaquo: '›', + rscr: '𝓇', + rsh: '↱', + rsqb: ']', + rsquo: '’', + rsquor: '’', + rthree: '⋌', + rtimes: '⋊', + rtri: '▹', + rtrie: '⊵', + rtrif: '▸', + rtriltri: '⧎', + ruluhar: '⥨', + rx: '℞', + sacute: 'ś', + sbquo: '‚', + sc: '≻', + scE: '⪴', + scap: '⪸', + scaron: 'š', + sccue: '≽', + sce: '⪰', + scedil: 'ş', + scirc: 'ŝ', + scnE: '⪶', + scnap: '⪺', + scnsim: '⋩', + scpolint: '⨓', + scsim: '≿', + scy: 'с', + sdot: '⋅', + sdotb: '⊡', + sdote: '⩦', + seArr: '⇘', + searhk: '⤥', + searr: '↘', + searrow: '↘', + sect: '§', + semi: ';', + seswar: '⤩', + setminus: '∖', + setmn: '∖', + sext: '✶', + sfr: '𝔰', + sfrown: '⌢', + sharp: '♯', + shchcy: 'щ', + shcy: 'ш', + shortmid: '∣', + shortparallel: '∥', + shy: '­', + sigma: 'σ', + sigmaf: 'ς', + sigmav: 'ς', + sim: '∼', + simdot: '⩪', + sime: '≃', + simeq: '≃', + simg: '⪞', + simgE: '⪠', + siml: '⪝', + simlE: '⪟', + simne: '≆', + simplus: '⨤', + simrarr: '⥲', + slarr: '←', + smallsetminus: '∖', + smashp: '⨳', + smeparsl: '⧤', + smid: '∣', + smile: '⌣', + smt: '⪪', + smte: '⪬', + smtes: '⪬︀', + softcy: 'ь', + sol: '/', + solb: '⧄', + solbar: '⌿', + sopf: '𝕤', + spades: '♠', + spadesuit: '♠', + spar: '∥', + sqcap: '⊓', + sqcaps: '⊓︀', + sqcup: '⊔', + sqcups: '⊔︀', + sqsub: '⊏', + sqsube: '⊑', + sqsubset: '⊏', + sqsubseteq: '⊑', + sqsup: '⊐', + sqsupe: '⊒', + sqsupset: '⊐', + sqsupseteq: '⊒', + squ: '□', + square: '□', + squarf: '▪', + squf: '▪', + srarr: '→', + sscr: '𝓈', + ssetmn: '∖', + ssmile: '⌣', + sstarf: '⋆', + star: '☆', + starf: '★', + straightepsilon: 'ϵ', + straightphi: 'ϕ', + strns: '¯', + sub: '⊂', + subE: '⫅', + subdot: '⪽', + sube: '⊆', + subedot: '⫃', + submult: '⫁', + subnE: '⫋', + subne: '⊊', + subplus: '⪿', + subrarr: '⥹', + subset: '⊂', + subseteq: '⊆', + subseteqq: '⫅', + subsetneq: '⊊', + subsetneqq: '⫋', + subsim: '⫇', + subsub: '⫕', + subsup: '⫓', + succ: '≻', + succapprox: '⪸', + succcurlyeq: '≽', + succeq: '⪰', + succnapprox: '⪺', + succneqq: '⪶', + succnsim: '⋩', + succsim: '≿', + sum: '∑', + sung: '♪', + sup1: '¹', + sup2: '²', + sup3: '³', + sup: '⊃', + supE: '⫆', + supdot: '⪾', + supdsub: '⫘', + supe: '⊇', + supedot: '⫄', + suphsol: '⟉', + suphsub: '⫗', + suplarr: '⥻', + supmult: '⫂', + supnE: '⫌', + supne: '⊋', + supplus: '⫀', + supset: '⊃', + supseteq: '⊇', + supseteqq: '⫆', + supsetneq: '⊋', + supsetneqq: '⫌', + supsim: '⫈', + supsub: '⫔', + supsup: '⫖', + swArr: '⇙', + swarhk: '⤦', + swarr: '↙', + swarrow: '↙', + swnwar: '⤪', + szlig: 'ß', + target: '⌖', + tau: 'τ', + tbrk: '⎴', + tcaron: 'ť', + tcedil: 'ţ', + tcy: 'т', + tdot: '⃛', + telrec: '⌕', + tfr: '𝔱', + there4: '∴', + therefore: '∴', + theta: 'θ', + thetasym: 'ϑ', + thetav: 'ϑ', + thickapprox: '≈', + thicksim: '∼', + thinsp: ' ', + thkap: '≈', + thksim: '∼', + thorn: 'þ', + tilde: '˜', + times: '×', + timesb: '⊠', + timesbar: '⨱', + timesd: '⨰', + tint: '∭', + toea: '⤨', + top: '⊤', + topbot: '⌶', + topcir: '⫱', + topf: '𝕥', + topfork: '⫚', + tosa: '⤩', + tprime: '‴', + trade: '™', + triangle: '▵', + triangledown: '▿', + triangleleft: '◃', + trianglelefteq: '⊴', + triangleq: '≜', + triangleright: '▹', + trianglerighteq: '⊵', + tridot: '◬', + trie: '≜', + triminus: '⨺', + triplus: '⨹', + trisb: '⧍', + tritime: '⨻', + trpezium: '⏢', + tscr: '𝓉', + tscy: 'ц', + tshcy: 'ћ', + tstrok: 'ŧ', + twixt: '≬', + twoheadleftarrow: '↞', + twoheadrightarrow: '↠', + uArr: '⇑', + uHar: '⥣', + uacute: 'ú', + uarr: '↑', + ubrcy: 'ў', + ubreve: 'ŭ', + ucirc: 'û', + ucy: 'у', + udarr: '⇅', + udblac: 'ű', + udhar: '⥮', + ufisht: '⥾', + ufr: '𝔲', + ugrave: 'ù', + uharl: '↿', + uharr: '↾', + uhblk: '▀', + ulcorn: '⌜', + ulcorner: '⌜', + ulcrop: '⌏', + ultri: '◸', + umacr: 'ū', + uml: '¨', + uogon: 'ų', + uopf: '𝕦', + uparrow: '↑', + updownarrow: '↕', + upharpoonleft: '↿', + upharpoonright: '↾', + uplus: '⊎', + upsi: 'υ', + upsih: 'ϒ', + upsilon: 'υ', + upuparrows: '⇈', + urcorn: '⌝', + urcorner: '⌝', + urcrop: '⌎', + uring: 'ů', + urtri: '◹', + uscr: '𝓊', + utdot: '⋰', + utilde: 'ũ', + utri: '▵', + utrif: '▴', + uuarr: '⇈', + uuml: 'ü', + uwangle: '⦧', + vArr: '⇕', + vBar: '⫨', + vBarv: '⫩', + vDash: '⊨', + vangrt: '⦜', + varepsilon: 'ϵ', + varkappa: 'ϰ', + varnothing: '∅', + varphi: 'ϕ', + varpi: 'ϖ', + varpropto: '∝', + varr: '↕', + varrho: 'ϱ', + varsigma: 'ς', + varsubsetneq: '⊊︀', + varsubsetneqq: '⫋︀', + varsupsetneq: '⊋︀', + varsupsetneqq: '⫌︀', + vartheta: 'ϑ', + vartriangleleft: '⊲', + vartriangleright: '⊳', + vcy: 'в', + vdash: '⊢', + vee: '∨', + veebar: '⊻', + veeeq: '≚', + vellip: '⋮', + verbar: '|', + vert: '|', + vfr: '𝔳', + vltri: '⊲', + vnsub: '⊂⃒', + vnsup: '⊃⃒', + vopf: '𝕧', + vprop: '∝', + vrtri: '⊳', + vscr: '𝓋', + vsubnE: '⫋︀', + vsubne: '⊊︀', + vsupnE: '⫌︀', + vsupne: '⊋︀', + vzigzag: '⦚', + wcirc: 'ŵ', + wedbar: '⩟', + wedge: '∧', + wedgeq: '≙', + weierp: '℘', + wfr: '𝔴', + wopf: '𝕨', + wp: '℘', + wr: '≀', + wreath: '≀', + wscr: '𝓌', + xcap: '⋂', + xcirc: '◯', + xcup: '⋃', + xdtri: '▽', + xfr: '𝔵', + xhArr: '⟺', + xharr: '⟷', + xi: 'ξ', + xlArr: '⟸', + xlarr: '⟵', + xmap: '⟼', + xnis: '⋻', + xodot: '⨀', + xopf: '𝕩', + xoplus: '⨁', + xotime: '⨂', + xrArr: '⟹', + xrarr: '⟶', + xscr: '𝓍', + xsqcup: '⨆', + xuplus: '⨄', + xutri: '△', + xvee: '⋁', + xwedge: '⋀', + yacute: 'ý', + yacy: 'я', + ycirc: 'ŷ', + ycy: 'ы', + yen: '¥', + yfr: '𝔶', + yicy: 'ї', + yopf: '𝕪', + yscr: '𝓎', + yucy: 'ю', + yuml: 'ÿ', + zacute: 'ź', + zcaron: 'ž', + zcy: 'з', + zdot: 'ż', + zeetrf: 'ℨ', + zeta: 'ζ', + zfr: '𝔷', + zhcy: 'ж', + zigrarr: '⇝', + zopf: '𝕫', + zscr: '𝓏', + zwj: '‍', + zwnj: '‌' +} + +;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js + + +const own = {}.hasOwnProperty + +/** + * Decode a single character reference (without the `&` or `;`). + * You probably only need this when you’re building parsers yourself that follow + * different rules compared to HTML. + * This is optimized to be tiny in browsers. + * + * @param {string} value + * `notin` (named), `#123` (deci), `#x123` (hexa). + * @returns {string|false} + * Decoded reference. + */ +function decodeNamedCharacterReference(value) { + return own.call(characterEntities, value) ? characterEntities[value] : false +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const characterReference = { + name: 'characterReference', + tokenize: tokenizeCharacterReference +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterReference(effects, ok, nok) { + const self = this + let size = 0 + /** @type {number} */ + let max + /** @type {(code: Code) => boolean} */ + let test + return start + + /** + * Start of character reference. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterReference') + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + return open + } + + /** + * After `&`, at `#` for numeric references or alphanumeric for named + * references. + * + * ```markdown + * > | a&b + * ^ + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 35) { + effects.enter('characterReferenceMarkerNumeric') + effects.consume(code) + effects.exit('characterReferenceMarkerNumeric') + return numeric + } + effects.enter('characterReferenceValue') + max = 31 + test = asciiAlphanumeric + return value(code) + } + + /** + * After `#`, at `x` for hexadecimals or digit for decimals. + * + * ```markdown + * > | a{b + * ^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function numeric(code) { + if (code === 88 || code === 120) { + effects.enter('characterReferenceMarkerHexadecimal') + effects.consume(code) + effects.exit('characterReferenceMarkerHexadecimal') + effects.enter('characterReferenceValue') + max = 6 + test = asciiHexDigit + return value + } + effects.enter('characterReferenceValue') + max = 7 + test = asciiDigit + return value(code) + } + + /** + * After markers (`&#x`, `&#`, or `&`), in value, before `;`. + * + * The character reference kind defines what and how many characters are + * allowed. + * + * ```markdown + * > | a&b + * ^^^ + * > | a{b + * ^^^ + * > | a b + * ^ + * ``` + * + * @type {State} + */ + function value(code) { + if (code === 59 && size) { + const token = effects.exit('characterReferenceValue') + if ( + test === asciiAlphanumeric && + !decodeNamedCharacterReference(self.sliceSerialize(token)) + ) { + return nok(code) + } + + // To do: `markdown-rs` uses a different name: + // `CharacterReferenceMarkerSemi`. + effects.enter('characterReferenceMarker') + effects.consume(code) + effects.exit('characterReferenceMarker') + effects.exit('characterReference') + return ok + } + if (test(code) && size++ < max) { + effects.consume(code) + return value + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const characterEscape = { + name: 'characterEscape', + tokenize: tokenizeCharacterEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCharacterEscape(effects, ok, nok) { + return start + + /** + * Start of character escape. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('characterEscape') + effects.enter('escapeMarker') + effects.consume(code) + effects.exit('escapeMarker') + return inside + } + + /** + * After `\`, at punctuation. + * + * ```markdown + * > | a\*b + * ^ + * ``` + * + * @type {State} + */ + function inside(code) { + // ASCII punctuation. + if (asciiPunctuation(code)) { + effects.enter('characterEscapeValue') + effects.consume(code) + effects.exit('characterEscapeValue') + effects.exit('characterEscape') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const lineEnding = { + name: 'lineEnding', + tokenize: tokenizeLineEnding +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLineEnding(effects, ok) { + return start + + /** @type {State} */ + function start(code) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return factorySpace(effects, ok, 'linePrefix') + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + + + + + + +/** @type {Construct} */ +const labelEnd = { + name: 'labelEnd', + tokenize: tokenizeLabelEnd, + resolveTo: resolveToLabelEnd, + resolveAll: resolveAllLabelEnd +} + +/** @type {Construct} */ +const resourceConstruct = { + tokenize: tokenizeResource +} +/** @type {Construct} */ +const referenceFullConstruct = { + tokenize: tokenizeReferenceFull +} +/** @type {Construct} */ +const referenceCollapsedConstruct = { + tokenize: tokenizeReferenceCollapsed +} + +/** @type {Resolver} */ +function resolveAllLabelEnd(events) { + let index = -1 + while (++index < events.length) { + const token = events[index][1] + if ( + token.type === 'labelImage' || + token.type === 'labelLink' || + token.type === 'labelEnd' + ) { + // Remove the marker. + events.splice(index + 1, token.type === 'labelImage' ? 4 : 2) + token.type = 'data' + index++ + } + } + return events +} + +/** @type {Resolver} */ +function resolveToLabelEnd(events, context) { + let index = events.length + let offset = 0 + /** @type {Token} */ + let token + /** @type {number | undefined} */ + let open + /** @type {number | undefined} */ + let close + /** @type {Array<Event>} */ + let media + + // Find an opening. + while (index--) { + token = events[index][1] + if (open) { + // If we see another link, or inactive link label, we’ve been here before. + if ( + token.type === 'link' || + (token.type === 'labelLink' && token._inactive) + ) { + break + } + + // Mark other link openings as inactive, as we can’t have links in + // links. + if (events[index][0] === 'enter' && token.type === 'labelLink') { + token._inactive = true + } + } else if (close) { + if ( + events[index][0] === 'enter' && + (token.type === 'labelImage' || token.type === 'labelLink') && + !token._balanced + ) { + open = index + if (token.type !== 'labelLink') { + offset = 2 + break + } + } + } else if (token.type === 'labelEnd') { + close = index + } + } + const group = { + type: events[open][1].type === 'labelLink' ? 'link' : 'image', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[events.length - 1][1].end) + } + const label = { + type: 'label', + start: Object.assign({}, events[open][1].start), + end: Object.assign({}, events[close][1].end) + } + const text = { + type: 'labelText', + start: Object.assign({}, events[open + offset + 2][1].end), + end: Object.assign({}, events[close - 2][1].start) + } + media = [ + ['enter', group, context], + ['enter', label, context] + ] + + // Opening marker. + media = push(media, events.slice(open + 1, open + offset + 3)) + + // Text open. + media = push(media, [['enter', text, context]]) + + // Always populated by defaults. + + // Between. + media = push( + media, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + offset + 4, close - 3), + context + ) + ) + + // Text close, marker close, label close. + media = push(media, [ + ['exit', text, context], + events[close - 2], + events[close - 1], + ['exit', label, context] + ]) + + // Reference, resource, or so. + media = push(media, events.slice(close + 1)) + + // Media close. + media = push(media, [['exit', group, context]]) + splice(events, open, events.length, media) + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelEnd(effects, ok, nok) { + const self = this + let index = self.events.length + /** @type {Token} */ + let labelStart + /** @type {boolean} */ + let defined + + // Find an opening. + while (index--) { + if ( + (self.events[index][1].type === 'labelImage' || + self.events[index][1].type === 'labelLink') && + !self.events[index][1]._balanced + ) { + labelStart = self.events[index][1] + break + } + } + return start + + /** + * Start of label end. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ``` + * + * @type {State} + */ + function start(code) { + // If there is not an okay opening. + if (!labelStart) { + return nok(code) + } + + // If the corresponding label (link) start is marked as inactive, + // it means we’d be wrapping a link, like this: + // + // ```markdown + // > | a [b [c](d) e](f) g. + // ^ + // ``` + // + // We can’t have that, so it’s just balanced brackets. + if (labelStart._inactive) { + return labelEndNok(code) + } + defined = self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize({ + start: labelStart.end, + end: self.now() + }) + ) + ) + effects.enter('labelEnd') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelEnd') + return after + } + + /** + * After `]`. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function after(code) { + // Note: `markdown-rs` also parses GFM footnotes here, which for us is in + // an extension. + + // Resource (`[asd](fgh)`)? + if (code === 40) { + return effects.attempt( + resourceConstruct, + labelEndOk, + defined ? labelEndOk : labelEndNok + )(code) + } + + // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference? + if (code === 91) { + return effects.attempt( + referenceFullConstruct, + labelEndOk, + defined ? referenceNotFull : labelEndNok + )(code) + } + + // Shortcut (`[asd]`) reference? + return defined ? labelEndOk(code) : labelEndNok(code) + } + + /** + * After `]`, at `[`, but not at a full reference. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function referenceNotFull(code) { + return effects.attempt( + referenceCollapsedConstruct, + labelEndOk, + labelEndNok + )(code) + } + + /** + * Done, we found something. + * + * ```markdown + * > | [a](b) c + * ^ + * > | [a][b] c + * ^ + * > | [a][] b + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndOk(code) { + // Note: `markdown-rs` does a bunch of stuff here. + return ok(code) + } + + /** + * Done, it’s nothing. + * + * There was an okay opening, but we didn’t match anything. + * + * ```markdown + * > | [a](b c + * ^ + * > | [a][b c + * ^ + * > | [a] b + * ^ + * ``` + * + * @type {State} + */ + function labelEndNok(code) { + labelStart._balanced = true + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeResource(effects, ok, nok) { + return resourceStart + + /** + * At a resource. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceStart(code) { + effects.enter('resource') + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + return resourceBefore + } + + /** + * In resource, after `(`, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBefore(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceOpen)(code) + : resourceOpen(code) + } + + /** + * In resource, after optional whitespace, at `)` or a destination. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceOpen(code) { + if (code === 41) { + return resourceEnd(code) + } + return factoryDestination( + effects, + resourceDestinationAfter, + resourceDestinationMissing, + 'resourceDestination', + 'resourceDestinationLiteral', + 'resourceDestinationLiteralMarker', + 'resourceDestinationRaw', + 'resourceDestinationString', + 32 + )(code) + } + + /** + * In resource, after destination, at optional whitespace. + * + * ```markdown + * > | [a](b) c + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceBetween)(code) + : resourceEnd(code) + } + + /** + * At invalid destination. + * + * ```markdown + * > | [a](<<) b + * ^ + * ``` + * + * @type {State} + */ + function resourceDestinationMissing(code) { + return nok(code) + } + + /** + * In resource, after destination and whitespace, at `(` or title. + * + * ```markdown + * > | [a](b ) c + * ^ + * ``` + * + * @type {State} + */ + function resourceBetween(code) { + if (code === 34 || code === 39 || code === 40) { + return factoryTitle( + effects, + resourceTitleAfter, + nok, + 'resourceTitle', + 'resourceTitleMarker', + 'resourceTitleString' + )(code) + } + return resourceEnd(code) + } + + /** + * In resource, after title, at optional whitespace. + * + * ```markdown + * > | [a](b "c") d + * ^ + * ``` + * + * @type {State} + */ + function resourceTitleAfter(code) { + return markdownLineEndingOrSpace(code) + ? factoryWhitespace(effects, resourceEnd)(code) + : resourceEnd(code) + } + + /** + * In resource, at `)`. + * + * ```markdown + * > | [a](b) d + * ^ + * ``` + * + * @type {State} + */ + function resourceEnd(code) { + if (code === 41) { + effects.enter('resourceMarker') + effects.consume(code) + effects.exit('resourceMarker') + effects.exit('resource') + return ok + } + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceFull(effects, ok, nok) { + const self = this + return referenceFull + + /** + * In a reference (full), at the `[`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFull(code) { + return factoryLabel.call( + self, + effects, + referenceFullAfter, + referenceFullMissing, + 'reference', + 'referenceMarker', + 'referenceString' + )(code) + } + + /** + * In a reference (full), after `]`. + * + * ```markdown + * > | [a][b] d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullAfter(code) { + return self.parser.defined.includes( + normalizeIdentifier( + self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1) + ) + ) + ? ok(code) + : nok(code) + } + + /** + * In reference (full) that was missing. + * + * ```markdown + * > | [a][b d + * ^ + * ``` + * + * @type {State} + */ + function referenceFullMissing(code) { + return nok(code) + } +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeReferenceCollapsed(effects, ok, nok) { + return referenceCollapsedStart + + /** + * In reference (collapsed), at `[`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedStart(code) { + // We only attempt a collapsed label if there’s a `[`. + + effects.enter('reference') + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + return referenceCollapsedOpen + } + + /** + * In reference (collapsed), at `]`. + * + * > 👉 **Note**: we only get here if the label is defined. + * + * ```markdown + * > | [a][] d + * ^ + * ``` + * + * @type {State} + */ + function referenceCollapsedOpen(code) { + if (code === 93) { + effects.enter('referenceMarker') + effects.consume(code) + effects.exit('referenceMarker') + effects.exit('reference') + return ok + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartImage = { + name: 'labelStartImage', + tokenize: tokenizeLabelStartImage, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartImage(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (image) start. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelImage') + effects.enter('labelImageMarker') + effects.consume(code) + effects.exit('labelImageMarker') + return open + } + + /** + * After `!`, at `[`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 91) { + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelImage') + return after + } + return nok(code) + } + + /** + * After `![`. + * + * ```markdown + * > | a ![b] c + * ^ + * ``` + * + * This is needed in because, when GFM footnotes are enabled, images never + * form when started with a `^`. + * Instead, links form: + * + * ```markdown + * ![^a](b) + * + * ![^a][b] + * + * [b]: c + * ``` + * + * ```html + * <p>!<a href=\"b\">^a</a></p> + * <p>!<a href=\"c\">^a</a></p> + * ``` + * + * @type {State} + */ + function after(code) { + // To do: use a new field to do this, this is still needed for + // `micromark-extension-gfm-footnote`, but the `label-start-link` + // behavior isn’t. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js +/** + * @typedef {import('micromark-util-types').Code} Code + */ + + +/** + * Classify whether a code represents whitespace, punctuation, or something + * else. + * + * Used for attention (emphasis, strong), whose sequences can open or close + * based on the class of surrounding characters. + * + * > 👉 **Note**: eof (`null`) is seen as whitespace. + * + * @param {Code} code + * Code. + * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined} + * Group. + */ +function classifyCharacter(code) { + if ( + code === null || + markdownLineEndingOrSpace(code) || + unicodeWhitespace(code) + ) { + return 1 + } + if (unicodePunctuation(code)) { + return 2 + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').Point} Point + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + + +/** @type {Construct} */ +const attention = { + name: 'attention', + tokenize: tokenizeAttention, + resolveAll: resolveAllAttention +} + +/** + * Take all events and resolve attention to emphasis or strong. + * + * @type {Resolver} + */ +function resolveAllAttention(events, context) { + let index = -1 + /** @type {number} */ + let open + /** @type {Token} */ + let group + /** @type {Token} */ + let text + /** @type {Token} */ + let openingSequence + /** @type {Token} */ + let closingSequence + /** @type {number} */ + let use + /** @type {Array<Event>} */ + let nextEvents + /** @type {number} */ + let offset + + // Walk through all events. + // + // Note: performance of this is fine on an mb of normal markdown, but it’s + // a bottleneck for malicious stuff. + while (++index < events.length) { + // Find a token that can close. + if ( + events[index][0] === 'enter' && + events[index][1].type === 'attentionSequence' && + events[index][1]._close + ) { + open = index + + // Now walk back to find an opener. + while (open--) { + // Find a token that can open the closer. + if ( + events[open][0] === 'exit' && + events[open][1].type === 'attentionSequence' && + events[open][1]._open && + // If the markers are the same: + context.sliceSerialize(events[open][1]).charCodeAt(0) === + context.sliceSerialize(events[index][1]).charCodeAt(0) + ) { + // If the opening can close or the closing can open, + // and the close size *is not* a multiple of three, + // but the sum of the opening and closing size *is* multiple of three, + // then don’t match. + if ( + (events[open][1]._close || events[index][1]._open) && + (events[index][1].end.offset - events[index][1].start.offset) % 3 && + !( + (events[open][1].end.offset - + events[open][1].start.offset + + events[index][1].end.offset - + events[index][1].start.offset) % + 3 + ) + ) { + continue + } + + // Number of markers to use from the sequence. + use = + events[open][1].end.offset - events[open][1].start.offset > 1 && + events[index][1].end.offset - events[index][1].start.offset > 1 + ? 2 + : 1 + const start = Object.assign({}, events[open][1].end) + const end = Object.assign({}, events[index][1].start) + movePoint(start, -use) + movePoint(end, use) + openingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start, + end: Object.assign({}, events[open][1].end) + } + closingSequence = { + type: use > 1 ? 'strongSequence' : 'emphasisSequence', + start: Object.assign({}, events[index][1].start), + end + } + text = { + type: use > 1 ? 'strongText' : 'emphasisText', + start: Object.assign({}, events[open][1].end), + end: Object.assign({}, events[index][1].start) + } + group = { + type: use > 1 ? 'strong' : 'emphasis', + start: Object.assign({}, openingSequence.start), + end: Object.assign({}, closingSequence.end) + } + events[open][1].end = Object.assign({}, openingSequence.start) + events[index][1].start = Object.assign({}, closingSequence.end) + nextEvents = [] + + // If there are more markers in the opening, add them before. + if (events[open][1].end.offset - events[open][1].start.offset) { + nextEvents = push(nextEvents, [ + ['enter', events[open][1], context], + ['exit', events[open][1], context] + ]) + } + + // Opening. + nextEvents = push(nextEvents, [ + ['enter', group, context], + ['enter', openingSequence, context], + ['exit', openingSequence, context], + ['enter', text, context] + ]) + + // Always populated by defaults. + + // Between. + nextEvents = push( + nextEvents, + resolveAll( + context.parser.constructs.insideSpan.null, + events.slice(open + 1, index), + context + ) + ) + + // Closing. + nextEvents = push(nextEvents, [ + ['exit', text, context], + ['enter', closingSequence, context], + ['exit', closingSequence, context], + ['exit', group, context] + ]) + + // If there are more markers in the closing, add them after. + if (events[index][1].end.offset - events[index][1].start.offset) { + offset = 2 + nextEvents = push(nextEvents, [ + ['enter', events[index][1], context], + ['exit', events[index][1], context] + ]) + } else { + offset = 0 + } + splice(events, open - 1, index - open + 3, nextEvents) + index = open + nextEvents.length - offset - 2 + break + } + } + } + } + + // Remove remaining sequences. + index = -1 + while (++index < events.length) { + if (events[index][1].type === 'attentionSequence') { + events[index][1].type = 'data' + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAttention(effects, ok) { + const attentionMarkers = this.parser.constructs.attentionMarkers.null + const previous = this.previous + const before = classifyCharacter(previous) + + /** @type {NonNullable<Code>} */ + let marker + return start + + /** + * Before a sequence. + * + * ```markdown + * > | ** + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + marker = code + effects.enter('attentionSequence') + return inside(code) + } + + /** + * In a sequence. + * + * ```markdown + * > | ** + * ^^ + * ``` + * + * @type {State} + */ + function inside(code) { + if (code === marker) { + effects.consume(code) + return inside + } + const token = effects.exit('attentionSequence') + + // To do: next major: move this to resolver, just like `markdown-rs`. + const after = classifyCharacter(code) + + // Always populated by defaults. + + const open = + !after || (after === 2 && before) || attentionMarkers.includes(code) + const close = + !before || (before === 2 && after) || attentionMarkers.includes(previous) + token._open = Boolean(marker === 42 ? open : open && (before || !close)) + token._close = Boolean(marker === 42 ? close : close && (after || !open)) + return ok(code) + } +} + +/** + * Move a point a bit. + * + * Note: `move` only works inside lines! It’s not possible to move past other + * chunks (replacement characters, tabs, or line endings). + * + * @param {Point} point + * @param {number} offset + * @returns {void} + */ +function movePoint(point, offset) { + point.column += offset + point.offset += offset + point._bufferIndex += offset +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const autolink = { + name: 'autolink', + tokenize: tokenizeAutolink +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeAutolink(effects, ok, nok) { + let size = 0 + return start + + /** + * Start of an autolink. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('autolink') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.enter('autolinkProtocol') + return open + } + + /** + * After `<`, at protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (asciiAlpha(code)) { + effects.consume(code) + return schemeOrEmailAtext + } + return emailAtext(code) + } + + /** + * At second byte of protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function schemeOrEmailAtext(code) { + // ASCII alphanumeric and `+`, `-`, and `.`. + if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) { + // Count the previous alphabetical from `open` too. + size = 1 + return schemeInsideOrEmailAtext(code) + } + return emailAtext(code) + } + + /** + * In ambiguous protocol or atext. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * > | a<user@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function schemeInsideOrEmailAtext(code) { + if (code === 58) { + effects.consume(code) + size = 0 + return urlInside + } + + // ASCII alphanumeric and `+`, `-`, and `.`. + if ( + (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && + size++ < 32 + ) { + effects.consume(code) + return schemeInsideOrEmailAtext + } + size = 0 + return emailAtext(code) + } + + /** + * After protocol, in URL. + * + * ```markdown + * > | a<https://example.com>b + * ^ + * ``` + * + * @type {State} + */ + function urlInside(code) { + if (code === 62) { + effects.exit('autolinkProtocol') + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + + // ASCII control, space, or `<`. + if (code === null || code === 32 || code === 60 || asciiControl(code)) { + return nok(code) + } + effects.consume(code) + return urlInside + } + + /** + * In email atext. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailAtext(code) { + if (code === 64) { + effects.consume(code) + return emailAtSignOrDot + } + if (asciiAtext(code)) { + effects.consume(code) + return emailAtext + } + return nok(code) + } + + /** + * In label, after at-sign or dot. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ ^ + * ``` + * + * @type {State} + */ + function emailAtSignOrDot(code) { + return asciiAlphanumeric(code) ? emailLabel(code) : nok(code) + } + + /** + * In label, where `.` and `>` are allowed. + * + * ```markdown + * > | a<user.name@example.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailLabel(code) { + if (code === 46) { + effects.consume(code) + size = 0 + return emailAtSignOrDot + } + if (code === 62) { + // Exit, then change the token type. + effects.exit('autolinkProtocol').type = 'autolinkEmail' + effects.enter('autolinkMarker') + effects.consume(code) + effects.exit('autolinkMarker') + effects.exit('autolink') + return ok + } + return emailValue(code) + } + + /** + * In label, where `.` and `>` are *not* allowed. + * + * Though, this is also used in `emailLabel` to parse other values. + * + * ```markdown + * > | a<user.name@ex-ample.com>b + * ^ + * ``` + * + * @type {State} + */ + function emailValue(code) { + // ASCII alphanumeric or `-`. + if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) { + const next = code === 45 ? emailValue : emailLabel + effects.consume(code) + return next + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js +/** + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const htmlText = { + name: 'htmlText', + tokenize: tokenizeHtmlText +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHtmlText(effects, ok, nok) { + const self = this + /** @type {NonNullable<Code> | undefined} */ + let marker + /** @type {number} */ + let index + /** @type {State} */ + let returnState + return start + + /** + * Start of HTML (text). + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('htmlText') + effects.enter('htmlTextData') + effects.consume(code) + return open + } + + /** + * After `<`, at tag name or other stuff. + * + * ```markdown + * > | a <b> c + * ^ + * > | a <!doctype> c + * ^ + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function open(code) { + if (code === 33) { + effects.consume(code) + return declarationOpen + } + if (code === 47) { + effects.consume(code) + return tagCloseStart + } + if (code === 63) { + effects.consume(code) + return instruction + } + + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagOpen + } + return nok(code) + } + + /** + * After `<!`, at declaration, comment, or CDATA. + * + * ```markdown + * > | a <!doctype> c + * ^ + * > | a <!--b--> c + * ^ + * > | a <![CDATA[>&<]]> c + * ^ + * ``` + * + * @type {State} + */ + function declarationOpen(code) { + if (code === 45) { + effects.consume(code) + return commentOpenInside + } + if (code === 91) { + effects.consume(code) + index = 0 + return cdataOpenInside + } + if (asciiAlpha(code)) { + effects.consume(code) + return declaration + } + return nok(code) + } + + /** + * In a comment, after `<!-`, at another `-`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentOpenInside(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return nok(code) + } + + /** + * In comment. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function comment(code) { + if (code === null) { + return nok(code) + } + if (code === 45) { + effects.consume(code) + return commentClose + } + if (markdownLineEnding(code)) { + returnState = comment + return lineEndingBefore(code) + } + effects.consume(code) + return comment + } + + /** + * In comment, after `-`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentClose(code) { + if (code === 45) { + effects.consume(code) + return commentEnd + } + return comment(code) + } + + /** + * In comment, after `--`. + * + * ```markdown + * > | a <!--b--> c + * ^ + * ``` + * + * @type {State} + */ + function commentEnd(code) { + return code === 62 + ? end(code) + : code === 45 + ? commentClose(code) + : comment(code) + } + + /** + * After `<![`, in CDATA, expecting `CDATA[`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^^^^^^ + * ``` + * + * @type {State} + */ + function cdataOpenInside(code) { + const value = 'CDATA[' + if (code === value.charCodeAt(index++)) { + effects.consume(code) + return index === value.length ? cdata : cdataOpenInside + } + return nok(code) + } + + /** + * In CDATA. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^^^ + * ``` + * + * @type {State} + */ + function cdata(code) { + if (code === null) { + return nok(code) + } + if (code === 93) { + effects.consume(code) + return cdataClose + } + if (markdownLineEnding(code)) { + returnState = cdata + return lineEndingBefore(code) + } + effects.consume(code) + return cdata + } + + /** + * In CDATA, after `]`, at another `]`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataClose(code) { + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In CDATA, after `]]`, at `>`. + * + * ```markdown + * > | a <![CDATA[>&<]]> b + * ^ + * ``` + * + * @type {State} + */ + function cdataEnd(code) { + if (code === 62) { + return end(code) + } + if (code === 93) { + effects.consume(code) + return cdataEnd + } + return cdata(code) + } + + /** + * In declaration. + * + * ```markdown + * > | a <!b> c + * ^ + * ``` + * + * @type {State} + */ + function declaration(code) { + if (code === null || code === 62) { + return end(code) + } + if (markdownLineEnding(code)) { + returnState = declaration + return lineEndingBefore(code) + } + effects.consume(code) + return declaration + } + + /** + * In instruction. + * + * ```markdown + * > | a <?b?> c + * ^ + * ``` + * + * @type {State} + */ + function instruction(code) { + if (code === null) { + return nok(code) + } + if (code === 63) { + effects.consume(code) + return instructionClose + } + if (markdownLineEnding(code)) { + returnState = instruction + return lineEndingBefore(code) + } + effects.consume(code) + return instruction + } + + /** + * In instruction, after `?`, at `>`. + * + * ```markdown + * > | a <?b?> c + * ^ + * ``` + * + * @type {State} + */ + function instructionClose(code) { + return code === 62 ? end(code) : instruction(code) + } + + /** + * After `</`, in closing tag, at tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseStart(code) { + // ASCII alphabetical. + if (asciiAlpha(code)) { + effects.consume(code) + return tagClose + } + return nok(code) + } + + /** + * After `</x`, in a tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagClose(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagClose + } + return tagCloseBetween(code) + } + + /** + * In closing tag, after tag name. + * + * ```markdown + * > | a </b> c + * ^ + * ``` + * + * @type {State} + */ + function tagCloseBetween(code) { + if (markdownLineEnding(code)) { + returnState = tagCloseBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagCloseBetween + } + return end(code) + } + + /** + * After `<x`, in opening tag name. + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function tagOpen(code) { + // ASCII alphanumerical and `-`. + if (code === 45 || asciiAlphanumeric(code)) { + effects.consume(code) + return tagOpen + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In opening tag, after tag name. + * + * ```markdown + * > | a <b> c + * ^ + * ``` + * + * @type {State} + */ + function tagOpenBetween(code) { + if (code === 47) { + effects.consume(code) + return end + } + + // ASCII alphabetical and `:` and `_`. + if (code === 58 || code === 95 || asciiAlpha(code)) { + effects.consume(code) + return tagOpenAttributeName + } + if (markdownLineEnding(code)) { + returnState = tagOpenBetween + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenBetween + } + return end(code) + } + + /** + * In attribute name. + * + * ```markdown + * > | a <b c> d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeName(code) { + // ASCII alphabetical and `-`, `.`, `:`, and `_`. + if ( + code === 45 || + code === 46 || + code === 58 || + code === 95 || + asciiAlphanumeric(code) + ) { + effects.consume(code) + return tagOpenAttributeName + } + return tagOpenAttributeNameAfter(code) + } + + /** + * After attribute name, before initializer, the end of the tag, or + * whitespace. + * + * ```markdown + * > | a <b c> d + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeNameAfter(code) { + if (code === 61) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeNameAfter + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeNameAfter + } + return tagOpenBetween(code) + } + + /** + * Before unquoted, double quoted, or single quoted attribute value, allowing + * whitespace. + * + * ```markdown + * > | a <b c=d> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueBefore(code) { + if ( + code === null || + code === 60 || + code === 61 || + code === 62 || + code === 96 + ) { + return nok(code) + } + if (code === 34 || code === 39) { + effects.consume(code) + marker = code + return tagOpenAttributeValueQuoted + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueBefore + return lineEndingBefore(code) + } + if (markdownSpace(code)) { + effects.consume(code) + return tagOpenAttributeValueBefore + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * In double or single quoted attribute value. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuoted(code) { + if (code === marker) { + effects.consume(code) + marker = undefined + return tagOpenAttributeValueQuotedAfter + } + if (code === null) { + return nok(code) + } + if (markdownLineEnding(code)) { + returnState = tagOpenAttributeValueQuoted + return lineEndingBefore(code) + } + effects.consume(code) + return tagOpenAttributeValueQuoted + } + + /** + * In unquoted attribute value. + * + * ```markdown + * > | a <b c=d> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueUnquoted(code) { + if ( + code === null || + code === 34 || + code === 39 || + code === 60 || + code === 61 || + code === 96 + ) { + return nok(code) + } + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + effects.consume(code) + return tagOpenAttributeValueUnquoted + } + + /** + * After double or single quoted attribute value, before whitespace or the end + * of the tag. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function tagOpenAttributeValueQuotedAfter(code) { + if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) { + return tagOpenBetween(code) + } + return nok(code) + } + + /** + * In certain circumstances of a tag where only an `>` is allowed. + * + * ```markdown + * > | a <b c="d"> e + * ^ + * ``` + * + * @type {State} + */ + function end(code) { + if (code === 62) { + effects.consume(code) + effects.exit('htmlTextData') + effects.exit('htmlText') + return ok + } + return nok(code) + } + + /** + * At eol. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * > | a <!--a + * ^ + * | b--> + * ``` + * + * @type {State} + */ + function lineEndingBefore(code) { + effects.exit('htmlTextData') + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return lineEndingAfter + } + + /** + * After eol, at optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a <!--a + * > | b--> + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfter(code) { + // Always populated by defaults. + + return markdownSpace(code) + ? factorySpace( + effects, + lineEndingAfterPrefix, + 'linePrefix', + self.parser.constructs.disable.null.includes('codeIndented') + ? undefined + : 4 + )(code) + : lineEndingAfterPrefix(code) + } + + /** + * After eol, after optional whitespace. + * + * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about + * > empty tokens. + * + * ```markdown + * | a <!--a + * > | b--> + * ^ + * ``` + * + * @type {State} + */ + function lineEndingAfterPrefix(code) { + effects.enter('htmlTextData') + return returnState(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + + +/** @type {Construct} */ +const labelStartLink = { + name: 'labelStartLink', + tokenize: tokenizeLabelStartLink, + resolveAll: labelEnd.resolveAll +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeLabelStartLink(effects, ok, nok) { + const self = this + return start + + /** + * Start of label (link) start. + * + * ```markdown + * > | a [b] c + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('labelLink') + effects.enter('labelMarker') + effects.consume(code) + effects.exit('labelMarker') + effects.exit('labelLink') + return after + } + + /** @type {State} */ + function after(code) { + // To do: this isn’t needed in `micromark-extension-gfm-footnote`, + // remove. + // Hidden footnotes hook. + /* c8 ignore next 3 */ + return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs + ? nok(code) + : ok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const hardBreakEscape = { + name: 'hardBreakEscape', + tokenize: tokenizeHardBreakEscape +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeHardBreakEscape(effects, ok, nok) { + return start + + /** + * Start of a hard break (escape). + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('hardBreakEscape') + effects.consume(code) + return after + } + + /** + * After `\`, at eol. + * + * ```markdown + * > | a\ + * ^ + * | b + * ``` + * + * @type {State} + */ + function after(code) { + if (markdownLineEnding(code)) { + effects.exit('hardBreakEscape') + return ok(code) + } + return nok(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js +/** + * @typedef {import('micromark-util-types').Construct} Construct + * @typedef {import('micromark-util-types').Previous} Previous + * @typedef {import('micromark-util-types').Resolver} Resolver + * @typedef {import('micromark-util-types').State} State + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Tokenizer} Tokenizer + */ + + +/** @type {Construct} */ +const codeText = { + name: 'codeText', + tokenize: tokenizeCodeText, + resolve: resolveCodeText, + previous +} + +// To do: next major: don’t resolve, like `markdown-rs`. +/** @type {Resolver} */ +function resolveCodeText(events) { + let tailExitIndex = events.length - 4 + let headEnterIndex = 3 + /** @type {number} */ + let index + /** @type {number | undefined} */ + let enter + + // If we start and end with an EOL or a space. + if ( + (events[headEnterIndex][1].type === 'lineEnding' || + events[headEnterIndex][1].type === 'space') && + (events[tailExitIndex][1].type === 'lineEnding' || + events[tailExitIndex][1].type === 'space') + ) { + index = headEnterIndex + + // And we have data. + while (++index < tailExitIndex) { + if (events[index][1].type === 'codeTextData') { + // Then we have padding. + events[headEnterIndex][1].type = 'codeTextPadding' + events[tailExitIndex][1].type = 'codeTextPadding' + headEnterIndex += 2 + tailExitIndex -= 2 + break + } + } + } + + // Merge adjacent spaces and data. + index = headEnterIndex - 1 + tailExitIndex++ + while (++index <= tailExitIndex) { + if (enter === undefined) { + if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') { + enter = index + } + } else if ( + index === tailExitIndex || + events[index][1].type === 'lineEnding' + ) { + events[enter][1].type = 'codeTextData' + if (index !== enter + 2) { + events[enter][1].end = events[index - 1][1].end + events.splice(enter + 2, index - enter - 2) + tailExitIndex -= index - enter - 2 + index = enter + 2 + } + enter = undefined + } + } + return events +} + +/** + * @this {TokenizeContext} + * @type {Previous} + */ +function previous(code) { + // If there is a previous code, there will always be a tail. + return ( + code !== 96 || + this.events[this.events.length - 1][1].type === 'characterEscape' + ) +} + +/** + * @this {TokenizeContext} + * @type {Tokenizer} + */ +function tokenizeCodeText(effects, ok, nok) { + const self = this + let sizeOpen = 0 + /** @type {number} */ + let size + /** @type {Token} */ + let token + return start + + /** + * Start of code (text). + * + * ```markdown + * > | `a` + * ^ + * > | \`a` + * ^ + * ``` + * + * @type {State} + */ + function start(code) { + effects.enter('codeText') + effects.enter('codeTextSequence') + return sequenceOpen(code) + } + + /** + * In opening sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceOpen(code) { + if (code === 96) { + effects.consume(code) + sizeOpen++ + return sequenceOpen + } + effects.exit('codeTextSequence') + return between(code) + } + + /** + * Between something and something else. + * + * ```markdown + * > | `a` + * ^^ + * ``` + * + * @type {State} + */ + function between(code) { + // EOF. + if (code === null) { + return nok(code) + } + + // To do: next major: don’t do spaces in resolve, but when compiling, + // like `markdown-rs`. + // Tabs don’t work, and virtual spaces don’t make sense. + if (code === 32) { + effects.enter('space') + effects.consume(code) + effects.exit('space') + return between + } + + // Closing fence? Could also be data. + if (code === 96) { + token = effects.enter('codeTextSequence') + size = 0 + return sequenceClose(code) + } + if (markdownLineEnding(code)) { + effects.enter('lineEnding') + effects.consume(code) + effects.exit('lineEnding') + return between + } + + // Data. + effects.enter('codeTextData') + return data(code) + } + + /** + * In data. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function data(code) { + if ( + code === null || + code === 32 || + code === 96 || + markdownLineEnding(code) + ) { + effects.exit('codeTextData') + return between(code) + } + effects.consume(code) + return data + } + + /** + * In closing sequence. + * + * ```markdown + * > | `a` + * ^ + * ``` + * + * @type {State} + */ + function sequenceClose(code) { + // More. + if (code === 96) { + effects.consume(code) + size++ + return sequenceClose + } + + // Done! + if (size === sizeOpen) { + effects.exit('codeTextSequence') + effects.exit('codeText') + return ok(code) + } + + // More or less accents: mark as data. + token.type = 'codeTextData' + return data(code) + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js +/** + * @typedef {import('micromark-util-types').Extension} Extension + */ + + + + +/** @satisfies {Extension['document']} */ +const constructs_document = { + [42]: list, + [43]: list, + [45]: list, + [48]: list, + [49]: list, + [50]: list, + [51]: list, + [52]: list, + [53]: list, + [54]: list, + [55]: list, + [56]: list, + [57]: list, + [62]: blockQuote +} + +/** @satisfies {Extension['contentInitial']} */ +const contentInitial = { + [91]: definition +} + +/** @satisfies {Extension['flowInitial']} */ +const flowInitial = { + [-2]: codeIndented, + [-1]: codeIndented, + [32]: codeIndented +} + +/** @satisfies {Extension['flow']} */ +const constructs_flow = { + [35]: headingAtx, + [42]: thematicBreak, + [45]: [setextUnderline, thematicBreak], + [60]: htmlFlow, + [61]: setextUnderline, + [95]: thematicBreak, + [96]: codeFenced, + [126]: codeFenced +} + +/** @satisfies {Extension['string']} */ +const constructs_string = { + [38]: characterReference, + [92]: characterEscape +} + +/** @satisfies {Extension['text']} */ +const constructs_text = { + [-5]: lineEnding, + [-4]: lineEnding, + [-3]: lineEnding, + [33]: labelStartImage, + [38]: characterReference, + [42]: attention, + [60]: [autolink, htmlText], + [91]: labelStartLink, + [92]: [hardBreakEscape, characterEscape], + [93]: labelEnd, + [95]: attention, + [96]: codeText +} + +/** @satisfies {Extension['insideSpan']} */ +const insideSpan = { + null: [attention, resolver] +} + +/** @satisfies {Extension['attentionMarkers']} */ +const attentionMarkers = { + null: [42, 95] +} + +/** @satisfies {Extension['disable']} */ +const disable = { + null: [] +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js +/** + * @typedef {import('micromark-util-types').Create} Create + * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension + * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct + * @typedef {import('micromark-util-types').ParseContext} ParseContext + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + */ + + + + + + + + + +/** + * @param {ParseOptions | null | undefined} [options] + * @returns {ParseContext} + */ +function parse(options) { + const settings = options || {} + const constructs = + /** @type {FullNormalizedExtension} */ + combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])]) + + /** @type {ParseContext} */ + const parser = { + defined: [], + lazy: {}, + constructs, + content: create(content), + document: create(document_document), + flow: create(flow), + string: create(string), + text: create(text_text) + } + return parser + + /** + * @param {InitialConstruct} initial + */ + function create(initial) { + return creator + /** @type {Create} */ + function creator(from) { + return createTokenizer(parser, initial, from) + } + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js +/** + * @typedef {import('micromark-util-types').Chunk} Chunk + * @typedef {import('micromark-util-types').Code} Code + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Value} Value + */ + +/** + * @callback Preprocessor + * @param {Value} value + * @param {Encoding | null | undefined} [encoding] + * @param {boolean | null | undefined} [end=false] + * @returns {Array<Chunk>} + */ + +const search = /[\0\t\n\r]/g + +/** + * @returns {Preprocessor} + */ +function preprocess() { + let column = 1 + let buffer = '' + /** @type {boolean | undefined} */ + let start = true + /** @type {boolean | undefined} */ + let atCarriageReturn + return preprocessor + + /** @type {Preprocessor} */ + function preprocessor(value, encoding, end) { + /** @type {Array<Chunk>} */ + const chunks = [] + /** @type {RegExpMatchArray | null} */ + let match + /** @type {number} */ + let next + /** @type {number} */ + let startPosition + /** @type {number} */ + let endPosition + /** @type {Code} */ + let code + + // @ts-expect-error `Buffer` does allow an encoding. + value = buffer + value.toString(encoding) + startPosition = 0 + buffer = '' + if (start) { + // To do: `markdown-rs` actually parses BOMs (byte order mark). + if (value.charCodeAt(0) === 65279) { + startPosition++ + } + start = undefined + } + while (startPosition < value.length) { + search.lastIndex = startPosition + match = search.exec(value) + endPosition = + match && match.index !== undefined ? match.index : value.length + code = value.charCodeAt(endPosition) + if (!match) { + buffer = value.slice(startPosition) + break + } + if (code === 10 && startPosition === endPosition && atCarriageReturn) { + chunks.push(-3) + atCarriageReturn = undefined + } else { + if (atCarriageReturn) { + chunks.push(-5) + atCarriageReturn = undefined + } + if (startPosition < endPosition) { + chunks.push(value.slice(startPosition, endPosition)) + column += endPosition - startPosition + } + switch (code) { + case 0: { + chunks.push(65533) + column++ + break + } + case 9: { + next = Math.ceil(column / 4) * 4 + chunks.push(-2) + while (column++ < next) chunks.push(-1) + break + } + case 10: { + chunks.push(-4) + column = 1 + break + } + default: { + atCarriageReturn = true + column = 1 + } + } + } + startPosition = endPosition + 1 + } + if (end) { + if (atCarriageReturn) chunks.push(-5) + if (buffer) chunks.push(buffer) + chunks.push(null) + } + return chunks + } +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js +/** + * @typedef {import('micromark-util-types').Event} Event + */ + + + +/** + * @param {Array<Event>} events + * @returns {Array<Event>} + */ +function postprocess(events) { + while (!subtokenize(events)) { + // Empty + } + return events +} + +;// CONCATENATED MODULE: ./node_modules/micromark-util-decode-numeric-character-reference/index.js +/** + * Turn the number (in string form as either hexa- or plain decimal) coming from + * a numeric character reference into a character. + * + * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes + * non-characters and control characters safe. + * + * @param {string} value + * Value to decode. + * @param {number} base + * Numeric base. + * @returns {string} + * Character. + */ +function decodeNumericCharacterReference(value, base) { + const code = Number.parseInt(value, base) + if ( + // C0 except for HT, LF, FF, CR, space. + code < 9 || + code === 11 || + (code > 13 && code < 32) || + // Control character (DEL) of C0, and C1 controls. + (code > 126 && code < 160) || + // Lone high surrogates and low surrogates. + (code > 55295 && code < 57344) || + // Noncharacters. + (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ || + (code & 65535) === 65535 || + (code & 65535) === 65534 /* eslint-enable no-bitwise */ || + // Out of range + code > 1114111 + ) { + return '\uFFFD' + } + return String.fromCharCode(code) +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js + + +const characterEscapeOrReference = + /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi + +/** + * Decode markdown strings (which occur in places such as fenced code info + * strings, destinations, labels, and titles). + * + * The “string” content type allows character escapes and -references. + * This decodes those. + * + * @param {string} value + * Value to decode. + * @returns {string} + * Decoded value. + */ +function decodeString(value) { + return value.replace(characterEscapeOrReference, decode) +} + +/** + * @param {string} $0 + * @param {string} $1 + * @param {string} $2 + * @returns {string} + */ +function decode($0, $1, $2) { + if ($1) { + // Escape. + return $1 + } + + // Reference. + const head = $2.charCodeAt(0) + if (head === 35) { + const head = $2.charCodeAt(1) + const hex = head === 120 || head === 88 + return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10) + } + return decodeNamedCharacterReference($2) || $0 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js +/** + * @typedef {import('unist').Node} Node + * @typedef {import('unist').Point} Point + * @typedef {import('unist').Position} Position + */ + +/** + * @typedef NodeLike + * @property {string} type + * @property {PositionLike | null | undefined} [position] + * + * @typedef PositionLike + * @property {PointLike | null | undefined} [start] + * @property {PointLike | null | undefined} [end] + * + * @typedef PointLike + * @property {number | null | undefined} [line] + * @property {number | null | undefined} [column] + * @property {number | null | undefined} [offset] + */ + +/** + * Serialize the positional info of a point, position (start and end points), + * or node. + * + * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value] + * Node, position, or point. + * @returns {string} + * Pretty printed positional info of a node (`string`). + * + * In the format of a range `ls:cs-le:ce` (when given `node` or `position`) + * or a point `l:c` (when given `point`), where `l` stands for line, `c` for + * column, `s` for `start`, and `e` for end. + * An empty string (`''`) is returned if the given value is neither `node`, + * `position`, nor `point`. + */ +function stringifyPosition(value) { + // Nothing. + if (!value || typeof value !== 'object') { + return '' + } + + // Node. + if ('position' in value || 'type' in value) { + return position(value.position) + } + + // Position. + if ('start' in value || 'end' in value) { + return position(value) + } + + // Point. + if ('line' in value || 'column' in value) { + return point(value) + } + + // ? + return '' +} + +/** + * @param {Point | PointLike | null | undefined} point + * @returns {string} + */ +function point(point) { + return index(point && point.line) + ':' + index(point && point.column) +} + +/** + * @param {Position | PositionLike | null | undefined} pos + * @returns {string} + */ +function position(pos) { + return point(pos && pos.start) + '-' + point(pos && pos.end) +} + +/** + * @param {number | null | undefined} value + * @returns {number} + */ +function index(value) { + return value && typeof value === 'number' ? value : 1 +} + +;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js +/** + * @typedef {import('micromark-util-types').Encoding} Encoding + * @typedef {import('micromark-util-types').Event} Event + * @typedef {import('micromark-util-types').ParseOptions} ParseOptions + * @typedef {import('micromark-util-types').Token} Token + * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext + * @typedef {import('micromark-util-types').Value} Value + * + * @typedef {import('unist').Parent} UnistParent + * @typedef {import('unist').Point} Point + * + * @typedef {import('mdast').PhrasingContent} PhrasingContent + * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent + * @typedef {import('mdast').Content} Content + * @typedef {import('mdast').Break} Break + * @typedef {import('mdast').Blockquote} Blockquote + * @typedef {import('mdast').Code} Code + * @typedef {import('mdast').Definition} Definition + * @typedef {import('mdast').Emphasis} Emphasis + * @typedef {import('mdast').Heading} Heading + * @typedef {import('mdast').HTML} HTML + * @typedef {import('mdast').Image} Image + * @typedef {import('mdast').ImageReference} ImageReference + * @typedef {import('mdast').InlineCode} InlineCode + * @typedef {import('mdast').Link} Link + * @typedef {import('mdast').LinkReference} LinkReference + * @typedef {import('mdast').List} List + * @typedef {import('mdast').ListItem} ListItem + * @typedef {import('mdast').Paragraph} Paragraph + * @typedef {import('mdast').Root} Root + * @typedef {import('mdast').Strong} Strong + * @typedef {import('mdast').Text} Text + * @typedef {import('mdast').ThematicBreak} ThematicBreak + * @typedef {import('mdast').ReferenceType} ReferenceType + * @typedef {import('../index.js').CompileData} CompileData + */ + +/** + * @typedef {Root | Content} Node + * @typedef {Extract<Node, UnistParent>} Parent + * + * @typedef {Omit<UnistParent, 'type' | 'children'> & {type: 'fragment', children: Array<PhrasingContent>}} Fragment + */ + +/** + * @callback Transform + * Extra transform, to change the AST afterwards. + * @param {Root} tree + * Tree to transform. + * @returns {Root | undefined | null | void} + * New tree or nothing (in which case the current tree is used). + * + * @callback Handle + * Handle a token. + * @param {CompileContext} this + * Context. + * @param {Token} token + * Current token. + * @returns {void} + * Nothing. + * + * @typedef {Record<string, Handle>} Handles + * Token types mapping to handles + * + * @callback OnEnterError + * Handle the case where the `right` token is open, but it is closed (by the + * `left` token) or because we reached the end of the document. + * @param {Omit<CompileContext, 'sliceSerialize'>} this + * Context. + * @param {Token | undefined} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @callback OnExitError + * Handle the case where the `right` token is open but it is closed by + * exiting the `left` token. + * @param {Omit<CompileContext, 'sliceSerialize'>} this + * Context. + * @param {Token} left + * Left token. + * @param {Token} right + * Right token. + * @returns {void} + * Nothing. + * + * @typedef {[Token, OnEnterError | undefined]} TokenTuple + * Open token on the stack, with an optional error handler for when + * that token isn’t closed properly. + */ + +/** + * @typedef Config + * Configuration. + * + * We have our defaults, but extensions will add more. + * @property {Array<string>} canContainEols + * Token types where line endings are used. + * @property {Handles} enter + * Opening handles. + * @property {Handles} exit + * Closing handles. + * @property {Array<Transform>} transforms + * Tree transforms. + * + * @typedef {Partial<Config>} Extension + * Change how markdown tokens from micromark are turned into mdast. + * + * @typedef CompileContext + * mdast compiler context. + * @property {Array<Node | Fragment>} stack + * Stack of nodes. + * @property {Array<TokenTuple>} tokenStack + * Stack of tokens. + * @property {<Key extends keyof CompileData>(key: Key) => CompileData[Key]} getData + * Get data from the key/value store. + * @property {<Key extends keyof CompileData>(key: Key, value?: CompileData[Key]) => void} setData + * Set data into the key/value store. + * @property {(this: CompileContext) => void} buffer + * Capture some of the output data. + * @property {(this: CompileContext) => string} resume + * Stop capturing and access the output data. + * @property {<Kind extends Node>(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter + * Enter a token. + * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit + * Exit a token. + * @property {TokenizeContext['sliceSerialize']} sliceSerialize + * Get the string value of a token. + * @property {Config} config + * Configuration. + * + * @typedef FromMarkdownOptions + * Configuration for how to build mdast. + * @property {Array<Extension | Array<Extension>> | null | undefined} [mdastExtensions] + * Extensions for this utility to change how tokens are turned into a tree. + * + * @typedef {ParseOptions & FromMarkdownOptions} Options + * Configuration. + */ + +// To do: micromark: create a registry of tokens? +// To do: next major: don’t return given `Node` from `enter`. +// To do: next major: remove setter/getter. + + + + + + + + + + +const lib_own = {}.hasOwnProperty + +/** + * @param value + * Markdown to parse. + * @param encoding + * Character encoding for when `value` is `Buffer`. + * @param options + * Configuration. + * @returns + * mdast tree. + */ +const fromMarkdown = + /** + * @type {( + * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & + * ((value: Value, options?: Options | null | undefined) => Root) + * )} + */ + + /** + * @param {Value} value + * @param {Encoding | Options | null | undefined} [encoding] + * @param {Options | null | undefined} [options] + * @returns {Root} + */ + function (value, encoding, options) { + if (typeof encoding !== 'string') { + options = encoding + encoding = undefined + } + return compiler(options)( + postprocess( + parse(options).document().write(preprocess()(value, encoding, true)) + ) + ) + } + +/** + * Note this compiler only understand complete buffering, not streaming. + * + * @param {Options | null | undefined} [options] + */ +function compiler(options) { + /** @type {Config} */ + const config = { + transforms: [], + canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'], + enter: { + autolink: opener(link), + autolinkProtocol: onenterdata, + autolinkEmail: onenterdata, + atxHeading: opener(heading), + blockQuote: opener(blockQuote), + characterEscape: onenterdata, + characterReference: onenterdata, + codeFenced: opener(codeFlow), + codeFencedFenceInfo: buffer, + codeFencedFenceMeta: buffer, + codeIndented: opener(codeFlow, buffer), + codeText: opener(codeText, buffer), + codeTextData: onenterdata, + data: onenterdata, + codeFlowValue: onenterdata, + definition: opener(definition), + definitionDestinationString: buffer, + definitionLabelString: buffer, + definitionTitleString: buffer, + emphasis: opener(emphasis), + hardBreakEscape: opener(hardBreak), + hardBreakTrailing: opener(hardBreak), + htmlFlow: opener(html, buffer), + htmlFlowData: onenterdata, + htmlText: opener(html, buffer), + htmlTextData: onenterdata, + image: opener(image), + label: buffer, + link: opener(link), + listItem: opener(listItem), + listItemValue: onenterlistitemvalue, + listOrdered: opener(list, onenterlistordered), + listUnordered: opener(list), + paragraph: opener(paragraph), + reference: onenterreference, + referenceString: buffer, + resourceDestinationString: buffer, + resourceTitleString: buffer, + setextHeading: opener(heading), + strong: opener(strong), + thematicBreak: opener(thematicBreak) + }, + exit: { + atxHeading: closer(), + atxHeadingSequence: onexitatxheadingsequence, + autolink: closer(), + autolinkEmail: onexitautolinkemail, + autolinkProtocol: onexitautolinkprotocol, + blockQuote: closer(), + characterEscapeValue: onexitdata, + characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, + characterReferenceMarkerNumeric: onexitcharacterreferencemarker, + characterReferenceValue: onexitcharacterreferencevalue, + codeFenced: closer(onexitcodefenced), + codeFencedFence: onexitcodefencedfence, + codeFencedFenceInfo: onexitcodefencedfenceinfo, + codeFencedFenceMeta: onexitcodefencedfencemeta, + codeFlowValue: onexitdata, + codeIndented: closer(onexitcodeindented), + codeText: closer(onexitcodetext), + codeTextData: onexitdata, + data: onexitdata, + definition: closer(), + definitionDestinationString: onexitdefinitiondestinationstring, + definitionLabelString: onexitdefinitionlabelstring, + definitionTitleString: onexitdefinitiontitlestring, + emphasis: closer(), + hardBreakEscape: closer(onexithardbreak), + hardBreakTrailing: closer(onexithardbreak), + htmlFlow: closer(onexithtmlflow), + htmlFlowData: onexitdata, + htmlText: closer(onexithtmltext), + htmlTextData: onexitdata, + image: closer(onexitimage), + label: onexitlabel, + labelText: onexitlabeltext, + lineEnding: onexitlineending, + link: closer(onexitlink), + listItem: closer(), + listOrdered: closer(), + listUnordered: closer(), + paragraph: closer(), + referenceString: onexitreferencestring, + resourceDestinationString: onexitresourcedestinationstring, + resourceTitleString: onexitresourcetitlestring, + resource: onexitresource, + setextHeading: closer(onexitsetextheading), + setextHeadingLineSequence: onexitsetextheadinglinesequence, + setextHeadingText: onexitsetextheadingtext, + strong: closer(), + thematicBreak: closer() + } + } + configure(config, (options || {}).mdastExtensions || []) + + /** @type {CompileData} */ + const data = {} + return compile + + /** + * Turn micromark events into an mdast tree. + * + * @param {Array<Event>} events + * Events. + * @returns {Root} + * mdast tree. + */ + function compile(events) { + /** @type {Root} */ + let tree = { + type: 'root', + children: [] + } + /** @type {Omit<CompileContext, 'sliceSerialize'>} */ + const context = { + stack: [tree], + tokenStack: [], + config, + enter, + exit, + buffer, + resume, + setData, + getData + } + /** @type {Array<number>} */ + const listStack = [] + let index = -1 + while (++index < events.length) { + // We preprocess lists to add `listItem` tokens, and to infer whether + // items the list itself are spread out. + if ( + events[index][1].type === 'listOrdered' || + events[index][1].type === 'listUnordered' + ) { + if (events[index][0] === 'enter') { + listStack.push(index) + } else { + const tail = listStack.pop() + index = prepareList(events, tail, index) + } + } + } + index = -1 + while (++index < events.length) { + const handler = config[events[index][0]] + if (lib_own.call(handler, events[index][1].type)) { + handler[events[index][1].type].call( + Object.assign( + { + sliceSerialize: events[index][2].sliceSerialize + }, + context + ), + events[index][1] + ) + } + } + + // Handle tokens still being open. + if (context.tokenStack.length > 0) { + const tail = context.tokenStack[context.tokenStack.length - 1] + const handler = tail[1] || defaultOnError + handler.call(context, undefined, tail[0]) + } + + // Figure out `root` position. + tree.position = { + start: lib_point( + events.length > 0 + ? events[0][1].start + : { + line: 1, + column: 1, + offset: 0 + } + ), + end: lib_point( + events.length > 0 + ? events[events.length - 2][1].end + : { + line: 1, + column: 1, + offset: 0 + } + ) + } + + // Call transforms. + index = -1 + while (++index < config.transforms.length) { + tree = config.transforms[index](tree) || tree + } + return tree + } + + /** + * @param {Array<Event>} events + * @param {number} start + * @param {number} length + * @returns {number} + */ + function prepareList(events, start, length) { + let index = start - 1 + let containerBalance = -1 + let listSpread = false + /** @type {Token | undefined} */ + let listItem + /** @type {number | undefined} */ + let lineIndex + /** @type {number | undefined} */ + let firstBlankLineIndex + /** @type {boolean | undefined} */ + let atMarker + while (++index <= length) { + const event = events[index] + if ( + event[1].type === 'listUnordered' || + event[1].type === 'listOrdered' || + event[1].type === 'blockQuote' + ) { + if (event[0] === 'enter') { + containerBalance++ + } else { + containerBalance-- + } + atMarker = undefined + } else if (event[1].type === 'lineEndingBlank') { + if (event[0] === 'enter') { + if ( + listItem && + !atMarker && + !containerBalance && + !firstBlankLineIndex + ) { + firstBlankLineIndex = index + } + atMarker = undefined + } + } else if ( + event[1].type === 'linePrefix' || + event[1].type === 'listItemValue' || + event[1].type === 'listItemMarker' || + event[1].type === 'listItemPrefix' || + event[1].type === 'listItemPrefixWhitespace' + ) { + // Empty. + } else { + atMarker = undefined + } + if ( + (!containerBalance && + event[0] === 'enter' && + event[1].type === 'listItemPrefix') || + (containerBalance === -1 && + event[0] === 'exit' && + (event[1].type === 'listUnordered' || + event[1].type === 'listOrdered')) + ) { + if (listItem) { + let tailIndex = index + lineIndex = undefined + while (tailIndex--) { + const tailEvent = events[tailIndex] + if ( + tailEvent[1].type === 'lineEnding' || + tailEvent[1].type === 'lineEndingBlank' + ) { + if (tailEvent[0] === 'exit') continue + if (lineIndex) { + events[lineIndex][1].type = 'lineEndingBlank' + listSpread = true + } + tailEvent[1].type = 'lineEnding' + lineIndex = tailIndex + } else if ( + tailEvent[1].type === 'linePrefix' || + tailEvent[1].type === 'blockQuotePrefix' || + tailEvent[1].type === 'blockQuotePrefixWhitespace' || + tailEvent[1].type === 'blockQuoteMarker' || + tailEvent[1].type === 'listItemIndent' + ) { + // Empty + } else { + break + } + } + if ( + firstBlankLineIndex && + (!lineIndex || firstBlankLineIndex < lineIndex) + ) { + listItem._spread = true + } + + // Fix position. + listItem.end = Object.assign( + {}, + lineIndex ? events[lineIndex][1].start : event[1].end + ) + events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]) + index++ + length++ + } + + // Create a new list item. + if (event[1].type === 'listItemPrefix') { + listItem = { + type: 'listItem', + _spread: false, + start: Object.assign({}, event[1].start), + // @ts-expect-error: we’ll add `end` in a second. + end: undefined + } + // @ts-expect-error: `listItem` is most definitely defined, TS... + events.splice(index, 0, ['enter', listItem, event[2]]) + index++ + length++ + firstBlankLineIndex = undefined + atMarker = true + } + } + } + events[start][1]._spread = listSpread + return length + } + + /** + * Set data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @param {CompileData[Key]} [value] + * New value. + * @returns {void} + * Nothing. + */ + function setData(key, value) { + data[key] = value + } + + /** + * Get data. + * + * @template {keyof CompileData} Key + * Field type. + * @param {Key} key + * Key of field. + * @returns {CompileData[Key]} + * Value. + */ + function getData(key) { + return data[key] + } + + /** + * Create an opener handle. + * + * @param {(token: Token) => Node} create + * Create a node. + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function opener(create, and) { + return open + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function open(token) { + enter.call(this, create(token), token) + if (and) and.call(this, token) + } + } + + /** + * @this {CompileContext} + * @returns {void} + */ + function buffer() { + this.stack.push({ + type: 'fragment', + children: [] + }) + } + + /** + * @template {Node} Kind + * Node type. + * @this {CompileContext} + * Context. + * @param {Kind} node + * Node to enter. + * @param {Token} token + * Corresponding token. + * @param {OnEnterError | undefined} [errorHandler] + * Handle the case where this token is open, but it is closed by something else. + * @returns {Kind} + * The given node. + */ + function enter(node, token, errorHandler) { + const parent = this.stack[this.stack.length - 1] + // @ts-expect-error: Assume `Node` can exist as a child of `parent`. + parent.children.push(node) + this.stack.push(node) + this.tokenStack.push([token, errorHandler]) + // @ts-expect-error: `end` will be patched later. + node.position = { + start: lib_point(token.start) + } + return node + } + + /** + * Create a closer handle. + * + * @param {Handle} [and] + * Optional function to also run. + * @returns {Handle} + * Handle. + */ + function closer(and) { + return close + + /** + * @this {CompileContext} + * @param {Token} token + * @returns {void} + */ + function close(token) { + if (and) and.call(this, token) + exit.call(this, token) + } + } + + /** + * @this {CompileContext} + * Context. + * @param {Token} token + * Corresponding token. + * @param {OnExitError | undefined} [onExitError] + * Handle the case where another token is open. + * @returns {Node} + * The closed node. + */ + function exit(token, onExitError) { + const node = this.stack.pop() + const open = this.tokenStack.pop() + if (!open) { + throw new Error( + 'Cannot close `' + + token.type + + '` (' + + stringifyPosition({ + start: token.start, + end: token.end + }) + + '): it’s not open' + ) + } else if (open[0].type !== token.type) { + if (onExitError) { + onExitError.call(this, token, open[0]) + } else { + const handler = open[1] || defaultOnError + handler.call(this, token, open[0]) + } + } + node.position.end = lib_point(token.end) + return node + } + + /** + * @this {CompileContext} + * @returns {string} + */ + function resume() { + return lib_toString(this.stack.pop()) + } + + // + // Handlers. + // + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistordered() { + setData('expectingFirstListItemValue', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onenterlistitemvalue(token) { + if (getData('expectingFirstListItemValue')) { + const ancestor = this.stack[this.stack.length - 2] + ancestor.start = Number.parseInt(this.sliceSerialize(token), 10) + setData('expectingFirstListItemValue') + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfenceinfo() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.lang = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfencemeta() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.meta = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefencedfence() { + // Exit if this is the closing fence. + if (getData('flowCodeInside')) return + this.buffer() + setData('flowCodeInside', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodefenced() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '') + setData('flowCodeInside') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcodeindented() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data.replace(/(\r?\n|\r)$/g, '') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitionlabelstring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + node.label = label + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiontitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitdefinitiondestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitatxheadingsequence(token) { + const node = this.stack[this.stack.length - 1] + if (!node.depth) { + const depth = this.sliceSerialize(token).length + node.depth = depth + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadingtext() { + setData('setextHeadingSlurpLineEnding', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheadinglinesequence(token) { + const node = this.stack[this.stack.length - 1] + node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2 + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitsetextheading() { + setData('setextHeadingSlurpLineEnding') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterdata(token) { + const node = this.stack[this.stack.length - 1] + let tail = node.children[node.children.length - 1] + if (!tail || tail.type !== 'text') { + // Add a new text node. + tail = text() + // @ts-expect-error: we’ll add `end` later. + tail.position = { + start: lib_point(token.start) + } + // @ts-expect-error: Assume `parent` accepts `text`. + node.children.push(tail) + } + this.stack.push(tail) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitdata(token) { + const tail = this.stack.pop() + tail.value += this.sliceSerialize(token) + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlineending(token) { + const context = this.stack[this.stack.length - 1] + // If we’re at a hard break, include the line ending in there. + if (getData('atHardBreak')) { + const tail = context.children[context.children.length - 1] + tail.position.end = lib_point(token.end) + setData('atHardBreak') + return + } + if ( + !getData('setextHeadingSlurpLineEnding') && + config.canContainEols.includes(context.type) + ) { + onenterdata.call(this, token) + onexitdata.call(this, token) + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithardbreak() { + setData('atHardBreak', true) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmlflow() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexithtmltext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcodetext() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.value = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlink() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitimage() { + const node = this.stack[this.stack.length - 1] + // Note: there are also `identifier` and `label` fields on this link node! + // These are used / cleaned here. + // To do: clean. + if (getData('inReference')) { + /** @type {ReferenceType} */ + const referenceType = getData('referenceType') || 'shortcut' + node.type += 'Reference' + // @ts-expect-error: mutate. + node.referenceType = referenceType + // @ts-expect-error: mutate. + delete node.url + delete node.title + } else { + // @ts-expect-error: mutate. + delete node.identifier + // @ts-expect-error: mutate. + delete node.label + } + setData('referenceType') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabeltext(token) { + const string = this.sliceSerialize(token) + const ancestor = this.stack[this.stack.length - 2] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + ancestor.label = decodeString(string) + // @ts-expect-error: same as above. + ancestor.identifier = normalizeIdentifier(string).toLowerCase() + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitlabel() { + const fragment = this.stack[this.stack.length - 1] + const value = this.resume() + const node = this.stack[this.stack.length - 1] + // Assume a reference. + setData('inReference', true) + if (node.type === 'link') { + /** @type {Array<StaticPhrasingContent>} */ + // @ts-expect-error: Assume static phrasing content. + const children = fragment.children + node.children = children + } else { + node.alt = value + } + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcedestinationstring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.url = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresourcetitlestring() { + const data = this.resume() + const node = this.stack[this.stack.length - 1] + node.title = data + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitresource() { + setData('inReference') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onenterreference() { + setData('referenceType', 'collapsed') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitreferencestring(token) { + const label = this.resume() + const node = this.stack[this.stack.length - 1] + // @ts-expect-error: stash this on the node, as it might become a reference + // later. + node.label = label + // @ts-expect-error: same as above. + node.identifier = normalizeIdentifier( + this.sliceSerialize(token) + ).toLowerCase() + setData('referenceType', 'full') + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + + function onexitcharacterreferencemarker(token) { + setData('characterReferenceType', token.type) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitcharacterreferencevalue(token) { + const data = this.sliceSerialize(token) + const type = getData('characterReferenceType') + /** @type {string} */ + let value + if (type) { + value = decodeNumericCharacterReference( + data, + type === 'characterReferenceMarkerNumeric' ? 10 : 16 + ) + setData('characterReferenceType') + } else { + const result = decodeNamedCharacterReference(data) + value = result + } + const tail = this.stack.pop() + tail.value += value + tail.position.end = lib_point(token.end) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkprotocol(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = this.sliceSerialize(token) + } + + /** + * @this {CompileContext} + * @type {Handle} + */ + function onexitautolinkemail(token) { + onexitdata.call(this, token) + const node = this.stack[this.stack.length - 1] + node.url = 'mailto:' + this.sliceSerialize(token) + } + + // + // Creaters. + // + + /** @returns {Blockquote} */ + function blockQuote() { + return { + type: 'blockquote', + children: [] + } + } + + /** @returns {Code} */ + function codeFlow() { + return { + type: 'code', + lang: null, + meta: null, + value: '' + } + } + + /** @returns {InlineCode} */ + function codeText() { + return { + type: 'inlineCode', + value: '' + } + } + + /** @returns {Definition} */ + function definition() { + return { + type: 'definition', + identifier: '', + label: null, + title: null, + url: '' + } + } + + /** @returns {Emphasis} */ + function emphasis() { + return { + type: 'emphasis', + children: [] + } + } + + /** @returns {Heading} */ + function heading() { + // @ts-expect-error `depth` will be set later. + return { + type: 'heading', + depth: undefined, + children: [] + } + } + + /** @returns {Break} */ + function hardBreak() { + return { + type: 'break' + } + } + + /** @returns {HTML} */ + function html() { + return { + type: 'html', + value: '' + } + } + + /** @returns {Image} */ + function image() { + return { + type: 'image', + title: null, + url: '', + alt: null + } + } + + /** @returns {Link} */ + function link() { + return { + type: 'link', + title: null, + url: '', + children: [] + } + } + + /** + * @param {Token} token + * @returns {List} + */ + function list(token) { + return { + type: 'list', + ordered: token.type === 'listOrdered', + start: null, + spread: token._spread, + children: [] + } + } + + /** + * @param {Token} token + * @returns {ListItem} + */ + function listItem(token) { + return { + type: 'listItem', + spread: token._spread, + checked: null, + children: [] + } + } + + /** @returns {Paragraph} */ + function paragraph() { + return { + type: 'paragraph', + children: [] + } + } + + /** @returns {Strong} */ + function strong() { + return { + type: 'strong', + children: [] + } + } + + /** @returns {Text} */ + function text() { + return { + type: 'text', + value: '' + } + } + + /** @returns {ThematicBreak} */ + function thematicBreak() { + return { + type: 'thematicBreak' + } + } +} + +/** + * Copy a point-like value. + * + * @param {Point} d + * Point-like value. + * @returns {Point} + * unist point. + */ +function lib_point(d) { + return { + line: d.line, + column: d.column, + offset: d.offset + } +} + +/** + * @param {Config} combined + * @param {Array<Extension | Array<Extension>>} extensions + * @returns {void} + */ +function configure(combined, extensions) { + let index = -1 + while (++index < extensions.length) { + const value = extensions[index] + if (Array.isArray(value)) { + configure(combined, value) + } else { + extension(combined, value) + } + } +} + +/** + * @param {Config} combined + * @param {Extension} extension + * @returns {void} + */ +function extension(combined, extension) { + /** @type {keyof Extension} */ + let key + for (key in extension) { + if (lib_own.call(extension, key)) { + if (key === 'canContainEols') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'transforms') { + const right = extension[key] + if (right) { + combined[key].push(...right) + } + } else if (key === 'enter' || key === 'exit') { + const right = extension[key] + if (right) { + Object.assign(combined[key], right) + } + } + } + } +} + +/** @type {OnEnterError} */ +function defaultOnError(left, right) { + if (left) { + throw new Error( + 'Cannot close `' + + left.type + + '` (' + + stringifyPosition({ + start: left.start, + end: left.end + }) + + '): a different token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is open' + ) + } else { + throw new Error( + 'Cannot close document, a token (`' + + right.type + + '`, ' + + stringifyPosition({ + start: right.start, + end: right.end + }) + + ') is still open' + ) + } +} + +// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js +var esm = __webpack_require__(513); +;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-6b48ae7d.js + + + +function preprocessMarkdown(markdown) { + const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n"); + const withoutExtraSpaces = (0,esm/* dedent */.T)(withoutMultipleNewlines); + return withoutExtraSpaces; +} +function markdownToLines(markdown) { + const preprocessedMarkdown = preprocessMarkdown(markdown); + const { children } = fromMarkdown(preprocessedMarkdown); + const lines = [[]]; + let currentLine = 0; + function processNode(node, parentType = "normal") { + if (node.type === "text") { + const textLines = node.value.split("\n"); + textLines.forEach((textLine, index) => { + if (index !== 0) { + currentLine++; + lines.push([]); + } + textLine.split(" ").forEach((word) => { + if (word) { + lines[currentLine].push({ content: word, type: parentType }); + } + }); + }); + } else if (node.type === "strong" || node.type === "emphasis") { + node.children.forEach((contentNode) => { + processNode(contentNode, node.type); + }); + } + } + children.forEach((treeNode) => { + if (treeNode.type === "paragraph") { + treeNode.children.forEach((contentNode) => { + processNode(contentNode); + }); + } + }); + return lines; +} +function markdownToHTML(markdown) { + const { children } = fromMarkdown(markdown); + function output(node) { + if (node.type === "text") { + return node.value.replace(/\n/g, "<br/>"); + } else if (node.type === "strong") { + return `<strong>${node.children.map(output).join("")}</strong>`; + } else if (node.type === "emphasis") { + return `<em>${node.children.map(output).join("")}</em>`; + } else if (node.type === "paragraph") { + return `<p>${node.children.map(output).join("")}</p>`; + } + return `Unsupported markdown: ${node.type}`; + } + return children.map(output).join(""); +} +function splitTextToChars(text) { + if (Intl.Segmenter) { + return [...new Intl.Segmenter().segment(text)].map((s) => s.segment); + } + return [...text]; +} +function splitWordToFitWidth(checkFit, word) { + const characters = splitTextToChars(word.content); + return splitWordToFitWidthRecursion(checkFit, [], characters, word.type); +} +function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) { + if (remainingChars.length === 0) { + return [ + { content: usedChars.join(""), type }, + { content: "", type } + ]; + } + const [nextChar, ...rest] = remainingChars; + const newWord = [...usedChars, nextChar]; + if (checkFit([{ content: newWord.join(""), type }])) { + return splitWordToFitWidthRecursion(checkFit, newWord, rest, type); + } + if (usedChars.length === 0 && nextChar) { + usedChars.push(nextChar); + remainingChars.shift(); + } + return [ + { content: usedChars.join(""), type }, + { content: remainingChars.join(""), type } + ]; +} +function splitLineToFitWidth(line, checkFit) { + if (line.some(({ content }) => content.includes("\n"))) { + throw new Error("splitLineToFitWidth does not support newlines in the line"); + } + return splitLineToFitWidthRecursion(line, checkFit); +} +function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) { + if (words.length === 0) { + if (newLine.length > 0) { + lines.push(newLine); + } + return lines.length > 0 ? lines : []; + } + let joiner = ""; + if (words[0].content === " ") { + joiner = " "; + words.shift(); + } + const nextWord = words.shift() ?? { content: " ", type: "normal" }; + const lineWithNextWord = [...newLine]; + if (joiner !== "") { + lineWithNextWord.push({ content: joiner, type: "normal" }); + } + lineWithNextWord.push(nextWord); + if (checkFit(lineWithNextWord)) { + return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord); + } + if (newLine.length > 0) { + lines.push(newLine); + words.unshift(nextWord); + } else if (nextWord.content) { + const [line, rest] = splitWordToFitWidth(checkFit, nextWord); + lines.push([line]); + if (rest.content) { + words.unshift(rest); + } + } + return splitLineToFitWidthRecursion(words, checkFit, lines); +} +function applyStyle(dom, styleFn) { + if (styleFn) { + dom.attr("style", styleFn); + } +} +function addHtmlSpan(element, node, width, classes, addBackground = false) { + const fo = element.append("foreignObject"); + const div = fo.append("xhtml:div"); + const label = node.label; + const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; + div.html( + ` + <span class="${labelClass} ${classes}" ` + (node.labelStyle ? 'style="' + node.labelStyle + '"' : "") + ">" + label + "</span>" + ); + applyStyle(div, node.labelStyle); + div.style("display", "table-cell"); + div.style("white-space", "nowrap"); + div.style("max-width", width + "px"); + div.attr("xmlns", "http://www.w3.org/1999/xhtml"); + if (addBackground) { + div.attr("class", "labelBkg"); + } + let bbox = div.node().getBoundingClientRect(); + if (bbox.width === width) { + div.style("display", "table"); + div.style("white-space", "break-spaces"); + div.style("width", width + "px"); + bbox = div.node().getBoundingClientRect(); + } + fo.style("width", bbox.width); + fo.style("height", bbox.height); + return fo.node(); +} +function createTspan(textElement, lineIndex, lineHeight) { + return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em"); +} +function computeWidthOfText(parentNode, lineHeight, line) { + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, line); + const textLength = testSpan.node().getComputedTextLength(); + testElement.remove(); + return textLength; +} +function computeDimensionOfText(parentNode, lineHeight, text) { + var _a; + const testElement = parentNode.append("text"); + const testSpan = createTspan(testElement, 1, lineHeight); + updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]); + const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect(); + if (textDimension) { + testElement.remove(); + } + return textDimension; +} +function createFormattedText(width, g, structuredText, addBackground = false) { + const lineHeight = 1.1; + const labelGroup = g.append("g"); + const bkg = labelGroup.insert("rect").attr("class", "background"); + const textElement = labelGroup.append("text").attr("y", "-10.1"); + let lineIndex = 0; + for (const line of structuredText) { + const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width; + const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth); + for (const preparedLine of linesUnderWidth) { + const tspan = createTspan(textElement, lineIndex, lineHeight); + updateTextContentAndStyles(tspan, preparedLine); + lineIndex++; + } + } + if (addBackground) { + const bbox = textElement.node().getBBox(); + const padding = 2; + bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding); + return labelGroup.node(); + } else { + return textElement.node(); + } +} +function updateTextContentAndStyles(tspan, wrappedLine) { + tspan.text(""); + wrappedLine.forEach((word, index) => { + const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal"); + if (index === 0) { + innerTspan.text(word.content); + } else { + innerTspan.text(" " + word.content); + } + }); +} +const createText = (el, text = "", { + style = "", + isTitle = false, + classes = "", + useHtmlLabels = true, + isNode = true, + width = 200, + addSvgBackground = false +} = {}) => { + mermaid_f47111a7.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground); + if (useHtmlLabels) { + const htmlText = markdownToHTML(text); + const node = { + isNode, + label: (0,mermaid_f47111a7.M)(htmlText).replace( + /fa[blrs]?:fa-[\w-]+/g, + // cspell: disable-line + (s) => `<i class='${s.replace(":", " ")}'></i>` + ), + labelStyle: style.replace("fill:", "color:") + }; + const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground); + return vertexNode; + } else { + const structuredText = markdownToLines(text); + const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground); + return svgLabel; + } +}; + + + +/***/ }), + +/***/ 8947: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6257); +/* harmony import */ var _createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3791); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6312); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4353); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6750); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9418); + + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 10, 12, 14, 16, 18, 19, 21, 23], $V1 = [2, 6], $V2 = [1, 3], $V3 = [1, 5], $V4 = [1, 6], $V5 = [1, 7], $V6 = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], $V7 = [1, 25], $V8 = [1, 26], $V9 = [1, 28], $Va = [1, 29], $Vb = [1, 30], $Vc = [1, 31], $Vd = [1, 32], $Ve = [1, 33], $Vf = [1, 34], $Vg = [1, 35], $Vh = [1, 36], $Vi = [1, 37], $Vj = [1, 43], $Vk = [1, 42], $Vl = [1, 47], $Vm = [1, 50], $Vn = [1, 10, 12, 14, 16, 18, 19, 21, 23, 34, 35, 36], $Vo = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36], $Vp = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 27, 28, 34, 35, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $Vq = [1, 64]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "eol": 4, "XYCHART": 5, "chartConfig": 6, "document": 7, "CHART_ORIENTATION": 8, "statement": 9, "title": 10, "text": 11, "X_AXIS": 12, "parseXAxis": 13, "Y_AXIS": 14, "parseYAxis": 15, "LINE": 16, "plotData": 17, "BAR": 18, "acc_title": 19, "acc_title_value": 20, "acc_descr": 21, "acc_descr_value": 22, "acc_descr_multiline_value": 23, "SQUARE_BRACES_START": 24, "commaSeparatedNumbers": 25, "SQUARE_BRACES_END": 26, "NUMBER_WITH_DECIMAL": 27, "COMMA": 28, "xAxisData": 29, "bandData": 30, "ARROW_DELIMITER": 31, "commaSeparatedTexts": 32, "yAxisData": 33, "NEWLINE": 34, "SEMI": 35, "EOF": 36, "alphaNum": 37, "STR": 38, "MD_STR": 39, "alphaNumToken": 40, "AMP": 41, "NUM": 42, "ALPHA": 43, "PLUS": 44, "EQUALS": 45, "MULT": 46, "DOT": 47, "BRKT": 48, "MINUS": 49, "UNDERSCORE": 50, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "XYCHART", 8: "CHART_ORIENTATION", 10: "title", 12: "X_AXIS", 14: "Y_AXIS", 16: "LINE", 18: "BAR", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "SQUARE_BRACES_START", 26: "SQUARE_BRACES_END", 27: "NUMBER_WITH_DECIMAL", 28: "COMMA", 31: "ARROW_DELIMITER", 34: "NEWLINE", 35: "SEMI", 36: "EOF", 38: "STR", 39: "MD_STR", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "PLUS", 45: "EQUALS", 46: "MULT", 47: "DOT", 48: "BRKT", 49: "MINUS", 50: "UNDERSCORE" }, + productions_: [0, [3, 2], [3, 3], [3, 2], [3, 1], [6, 1], [7, 0], [7, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 3], [9, 2], [9, 3], [9, 2], [9, 2], [9, 1], [17, 3], [25, 3], [25, 1], [13, 1], [13, 2], [13, 1], [29, 1], [29, 3], [30, 3], [32, 3], [32, 1], [15, 1], [15, 2], [15, 1], [33, 3], [4, 1], [4, 1], [4, 1], [11, 1], [11, 1], [11, 1], [37, 1], [37, 2], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1], [40, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 5: + yy.setOrientation($$[$0]); + break; + case 9: + yy.setDiagramTitle($$[$0].text.trim()); + break; + case 12: + yy.setLineData({ text: "", type: "text" }, $$[$0]); + break; + case 13: + yy.setLineData($$[$0 - 1], $$[$0]); + break; + case 14: + yy.setBarData({ text: "", type: "text" }, $$[$0]); + break; + case 15: + yy.setBarData($$[$0 - 1], $$[$0]); + break; + case 16: + this.$ = $$[$0].trim(); + yy.setAccTitle(this.$); + break; + case 17: + case 18: + this.$ = $$[$0].trim(); + yy.setAccDescription(this.$); + break; + case 19: + this.$ = $$[$0 - 1]; + break; + case 20: + this.$ = [Number($$[$0 - 2]), ...$$[$0]]; + break; + case 21: + this.$ = [Number($$[$0])]; + break; + case 22: + yy.setXAxisTitle($$[$0]); + break; + case 23: + yy.setXAxisTitle($$[$0 - 1]); + break; + case 24: + yy.setXAxisTitle({ type: "text", text: "" }); + break; + case 25: + yy.setXAxisBand($$[$0]); + break; + case 26: + yy.setXAxisRangeData(Number($$[$0 - 2]), Number($$[$0])); + break; + case 27: + this.$ = $$[$0 - 1]; + break; + case 28: + this.$ = [$$[$0 - 2], ...$$[$0]]; + break; + case 29: + this.$ = [$$[$0]]; + break; + case 30: + yy.setYAxisTitle($$[$0]); + break; + case 31: + yy.setYAxisTitle($$[$0 - 1]); + break; + case 32: + yy.setYAxisTitle({ type: "text", text: "" }); + break; + case 33: + yy.setYAxisRangeData(Number($$[$0 - 2]), Number($$[$0])); + break; + case 37: + this.$ = { text: $$[$0], type: "text" }; + break; + case 38: + this.$ = { text: $$[$0], type: "text" }; + break; + case 39: + this.$ = { text: $$[$0], type: "markdown" }; + break; + case 40: + this.$ = $$[$0]; + break; + case 41: + this.$ = $$[$0 - 1] + "" + $$[$0]; + break; + } + }, + table: [o($V0, $V1, { 3: 1, 4: 2, 7: 4, 5: $V2, 34: $V3, 35: $V4, 36: $V5 }), { 1: [3] }, o($V0, $V1, { 4: 2, 7: 4, 3: 8, 5: $V2, 34: $V3, 35: $V4, 36: $V5 }), o($V0, $V1, { 4: 2, 7: 4, 6: 9, 3: 10, 5: $V2, 8: [1, 11], 34: $V3, 35: $V4, 36: $V5 }), { 1: [2, 4], 9: 12, 10: [1, 13], 12: [1, 14], 14: [1, 15], 16: [1, 16], 18: [1, 17], 19: [1, 18], 21: [1, 19], 23: [1, 20] }, o($V6, [2, 34]), o($V6, [2, 35]), o($V6, [2, 36]), { 1: [2, 1] }, o($V0, $V1, { 4: 2, 7: 4, 3: 21, 5: $V2, 34: $V3, 35: $V4, 36: $V5 }), { 1: [2, 3] }, o($V6, [2, 5]), o($V0, [2, 7], { 4: 22, 34: $V3, 35: $V4, 36: $V5 }), { 11: 23, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 11: 39, 13: 38, 24: $Vj, 27: $Vk, 29: 40, 30: 41, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 11: 45, 15: 44, 27: $Vl, 33: 46, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 11: 49, 17: 48, 24: $Vm, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 11: 52, 17: 51, 24: $Vm, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, { 20: [1, 53] }, { 22: [1, 54] }, o($Vn, [2, 18]), { 1: [2, 2] }, o($Vn, [2, 8]), o($Vn, [2, 9]), o($Vo, [2, 37], { 40: 55, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }), o($Vo, [2, 38]), o($Vo, [2, 39]), o($Vp, [2, 40]), o($Vp, [2, 42]), o($Vp, [2, 43]), o($Vp, [2, 44]), o($Vp, [2, 45]), o($Vp, [2, 46]), o($Vp, [2, 47]), o($Vp, [2, 48]), o($Vp, [2, 49]), o($Vp, [2, 50]), o($Vp, [2, 51]), o($Vn, [2, 10]), o($Vn, [2, 22], { 30: 41, 29: 56, 24: $Vj, 27: $Vk }), o($Vn, [2, 24]), o($Vn, [2, 25]), { 31: [1, 57] }, { 11: 59, 32: 58, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, o($Vn, [2, 11]), o($Vn, [2, 30], { 33: 60, 27: $Vl }), o($Vn, [2, 32]), { 31: [1, 61] }, o($Vn, [2, 12]), { 17: 62, 24: $Vm }, { 25: 63, 27: $Vq }, o($Vn, [2, 14]), { 17: 65, 24: $Vm }, o($Vn, [2, 16]), o($Vn, [2, 17]), o($Vp, [2, 41]), o($Vn, [2, 23]), { 27: [1, 66] }, { 26: [1, 67] }, { 26: [2, 29], 28: [1, 68] }, o($Vn, [2, 31]), { 27: [1, 69] }, o($Vn, [2, 13]), { 26: [1, 70] }, { 26: [2, 21], 28: [1, 71] }, o($Vn, [2, 15]), o($Vn, [2, 26]), o($Vn, [2, 27]), { 11: 59, 32: 72, 37: 24, 38: $V7, 39: $V8, 40: 27, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi }, o($Vn, [2, 33]), o($Vn, [2, 19]), { 25: 73, 27: $Vq }, { 26: [2, 28] }, { 26: [2, 20] }], + defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 72: [2, 28], 73: [2, 20] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = 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); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + break; + case 1: + break; + case 2: + this.popState(); + return 34; + case 3: + this.popState(); + return 34; + case 4: + return 34; + case 5: + break; + case 6: + return 10; + case 7: + this.pushState("acc_title"); + return 19; + case 8: + this.popState(); + return "acc_title_value"; + case 9: + this.pushState("acc_descr"); + return 21; + case 10: + this.popState(); + return "acc_descr_value"; + case 11: + this.pushState("acc_descr_multiline"); + break; + case 12: + this.popState(); + break; + case 13: + return "acc_descr_multiline_value"; + case 14: + return 5; + case 15: + return 8; + case 16: + this.pushState("axis_data"); + return "X_AXIS"; + case 17: + this.pushState("axis_data"); + return "Y_AXIS"; + case 18: + this.pushState("axis_band_data"); + return 24; + case 19: + return 31; + case 20: + this.pushState("data"); + return 16; + case 21: + this.pushState("data"); + return 18; + case 22: + this.pushState("data_inner"); + return 24; + case 23: + return 27; + case 24: + this.popState(); + return 26; + case 25: + this.popState(); + break; + case 26: + this.pushState("string"); + break; + case 27: + this.popState(); + break; + case 28: + return "STR"; + case 29: + return 24; + case 30: + return 26; + case 31: + return 43; + case 32: + return "COLON"; + case 33: + return 44; + case 34: + return 28; + case 35: + return 45; + case 36: + return 46; + case 37: + return 48; + case 38: + return 50; + case 39: + return 47; + case 40: + return 41; + case 41: + return 49; + case 42: + return 42; + case 43: + break; + case 44: + return 35; + case 45: + return 36; + } + }, + rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:(\r?\n))/i, /^(?:(\r?\n))/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:\{)/i, /^(?:[^\}]*)/i, /^(?:xychart-beta\b)/i, /^(?:(?:vertical|horizontal))/i, /^(?:x-axis\b)/i, /^(?:y-axis\b)/i, /^(?:\[)/i, /^(?:-->)/i, /^(?:line\b)/i, /^(?:bar\b)/i, /^(?:\[)/i, /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i, /^(?:\])/i, /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s+)/i, /^(?:;)/i, /^(?:$)/i], + conditions: { "data_inner": { "rules": [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true }, "data": { "rules": [0, 1, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 22, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true }, "axis_band_data": { "rules": [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 24, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true }, "axis_data": { "rules": [0, 1, 2, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19, 20, 21, 23, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true }, "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "title": { "rules": [], "inclusive": false }, "md_string": { "rules": [], "inclusive": false }, "string": { "rules": [27, 28], "inclusive": false }, "INITIAL": { "rules": [0, 1, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 20, 21, 25, 26, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +function isBarPlot(data) { + return data.type === "bar"; +} +function isBandAxisData(data) { + return data.type === "band"; +} +function isLinearAxisData(data) { + return data.type === "linear"; +} +class TextDimensionCalculatorWithFont { + constructor(parentGroup) { + this.parentGroup = parentGroup; + } + getMaxDimension(texts, fontSize) { + if (!this.parentGroup) { + return { + width: texts.reduce((acc, cur) => Math.max(cur.length, acc), 0) * fontSize, + height: fontSize + }; + } + const dimension = { + width: 0, + height: 0 + }; + const elem = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", fontSize); + for (const t of texts) { + const bbox = (0,_createText_6b48ae7d_js__WEBPACK_IMPORTED_MODULE_4__.c)(elem, 1, t); + const width = bbox ? bbox.width : t.length * fontSize; + const height = bbox ? bbox.height : fontSize; + dimension.width = Math.max(dimension.width, width); + dimension.height = Math.max(dimension.height, height); + } + elem.remove(); + return dimension; + } +} +const BAR_WIDTH_TO_TICK_WIDTH_RATIO = 0.7; +const MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL = 0.2; +class BaseAxis { + constructor(axisConfig, title, textDimensionCalculator, axisThemeConfig) { + this.axisConfig = axisConfig; + this.title = title; + this.textDimensionCalculator = textDimensionCalculator; + this.axisThemeConfig = axisThemeConfig; + this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }; + this.axisPosition = "left"; + this.showTitle = false; + this.showLabel = false; + this.showTick = false; + this.showAxisLine = false; + this.outerPadding = 0; + this.titleTextHeight = 0; + this.labelTextHeight = 0; + this.range = [0, 10]; + this.boundingRect = { x: 0, y: 0, width: 0, height: 0 }; + this.axisPosition = "left"; + } + setRange(range) { + this.range = range; + if (this.axisPosition === "left" || this.axisPosition === "right") { + this.boundingRect.height = range[1] - range[0]; + } else { + this.boundingRect.width = range[1] - range[0]; + } + this.recalculateScale(); + } + getRange() { + return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding]; + } + setAxisPosition(axisPosition) { + this.axisPosition = axisPosition; + this.setRange(this.range); + } + getTickDistance() { + const range = this.getRange(); + return Math.abs(range[0] - range[1]) / this.getTickValues().length; + } + getAxisOuterPadding() { + return this.outerPadding; + } + getLabelDimension() { + return this.textDimensionCalculator.getMaxDimension( + this.getTickValues().map((tick) => tick.toString()), + this.axisConfig.labelFontSize + ); + } + recalculateOuterPaddingToDrawBar() { + if (BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance() > this.outerPadding * 2) { + this.outerPadding = Math.floor(BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance() / 2); + } + this.recalculateScale(); + } + calculateSpaceIfDrawnHorizontally(availableSpace) { + let availableHeight = availableSpace.height; + if (this.axisConfig.showAxisLine && availableHeight > this.axisConfig.axisLineWidth) { + availableHeight -= this.axisConfig.axisLineWidth; + this.showAxisLine = true; + } + if (this.axisConfig.showLabel) { + const spaceRequired = this.getLabelDimension(); + const maxPadding = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * availableSpace.width; + this.outerPadding = Math.min(spaceRequired.width / 2, maxPadding); + const heightRequired = spaceRequired.height + this.axisConfig.labelPadding * 2; + this.labelTextHeight = spaceRequired.height; + if (heightRequired <= availableHeight) { + availableHeight -= heightRequired; + this.showLabel = true; + } + } + if (this.axisConfig.showTick && availableHeight >= this.axisConfig.tickLength) { + this.showTick = true; + availableHeight -= this.axisConfig.tickLength; + } + if (this.axisConfig.showTitle && this.title) { + const spaceRequired = this.textDimensionCalculator.getMaxDimension( + [this.title], + this.axisConfig.titleFontSize + ); + const heightRequired = spaceRequired.height + this.axisConfig.titlePadding * 2; + this.titleTextHeight = spaceRequired.height; + if (heightRequired <= availableHeight) { + availableHeight -= heightRequired; + this.showTitle = true; + } + } + this.boundingRect.width = availableSpace.width; + this.boundingRect.height = availableSpace.height - availableHeight; + } + calculateSpaceIfDrawnVertical(availableSpace) { + let availableWidth = availableSpace.width; + if (this.axisConfig.showAxisLine && availableWidth > this.axisConfig.axisLineWidth) { + availableWidth -= this.axisConfig.axisLineWidth; + this.showAxisLine = true; + } + if (this.axisConfig.showLabel) { + const spaceRequired = this.getLabelDimension(); + const maxPadding = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * availableSpace.height; + this.outerPadding = Math.min(spaceRequired.height / 2, maxPadding); + const widthRequired = spaceRequired.width + this.axisConfig.labelPadding * 2; + if (widthRequired <= availableWidth) { + availableWidth -= widthRequired; + this.showLabel = true; + } + } + if (this.axisConfig.showTick && availableWidth >= this.axisConfig.tickLength) { + this.showTick = true; + availableWidth -= this.axisConfig.tickLength; + } + if (this.axisConfig.showTitle && this.title) { + const spaceRequired = this.textDimensionCalculator.getMaxDimension( + [this.title], + this.axisConfig.titleFontSize + ); + const widthRequired = spaceRequired.height + this.axisConfig.titlePadding * 2; + this.titleTextHeight = spaceRequired.height; + if (widthRequired <= availableWidth) { + availableWidth -= widthRequired; + this.showTitle = true; + } + } + this.boundingRect.width = availableSpace.width - availableWidth; + this.boundingRect.height = availableSpace.height; + } + calculateSpace(availableSpace) { + if (this.axisPosition === "left" || this.axisPosition === "right") { + this.calculateSpaceIfDrawnVertical(availableSpace); + } else { + this.calculateSpaceIfDrawnHorizontally(availableSpace); + } + this.recalculateScale(); + return { + width: this.boundingRect.width, + height: this.boundingRect.height + }; + } + setBoundingBoxXY(point) { + this.boundingRect.x = point.x; + this.boundingRect.y = point.y; + } + getDrawableElementsForLeftAxis() { + const drawableElement = []; + if (this.showAxisLine) { + const x = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2; + drawableElement.push({ + type: "path", + groupTexts: ["left-axis", "axisl-line"], + data: [ + { + path: `M ${x},${this.boundingRect.y} L ${x},${this.boundingRect.y + this.boundingRect.height} `, + strokeFill: this.axisThemeConfig.axisLineColor, + strokeWidth: this.axisConfig.axisLineWidth + } + ] + }); + } + if (this.showLabel) { + drawableElement.push({ + type: "text", + groupTexts: ["left-axis", "label"], + data: this.getTickValues().map((tick) => ({ + text: tick.toString(), + x: this.boundingRect.x + this.boundingRect.width - (this.showLabel ? this.axisConfig.labelPadding : 0) - (this.showTick ? this.axisConfig.tickLength : 0) - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0), + y: this.getScaleValue(tick), + fill: this.axisThemeConfig.labelColor, + fontSize: this.axisConfig.labelFontSize, + rotation: 0, + verticalPos: "middle", + horizontalPos: "right" + })) + }); + } + if (this.showTick) { + const x = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0); + drawableElement.push({ + type: "path", + groupTexts: ["left-axis", "ticks"], + data: this.getTickValues().map((tick) => ({ + path: `M ${x},${this.getScaleValue(tick)} L ${x - this.axisConfig.tickLength},${this.getScaleValue(tick)}`, + strokeFill: this.axisThemeConfig.tickColor, + strokeWidth: this.axisConfig.tickWidth + })) + }); + } + if (this.showTitle) { + drawableElement.push({ + type: "text", + groupTexts: ["left-axis", "title"], + data: [ + { + text: this.title, + x: this.boundingRect.x + this.axisConfig.titlePadding, + y: this.boundingRect.y + this.boundingRect.height / 2, + fill: this.axisThemeConfig.titleColor, + fontSize: this.axisConfig.titleFontSize, + rotation: 270, + verticalPos: "top", + horizontalPos: "center" + } + ] + }); + } + return drawableElement; + } + getDrawableElementsForBottomAxis() { + const drawableElement = []; + if (this.showAxisLine) { + const y = this.boundingRect.y + this.axisConfig.axisLineWidth / 2; + drawableElement.push({ + type: "path", + groupTexts: ["bottom-axis", "axis-line"], + data: [ + { + path: `M ${this.boundingRect.x},${y} L ${this.boundingRect.x + this.boundingRect.width},${y}`, + strokeFill: this.axisThemeConfig.axisLineColor, + strokeWidth: this.axisConfig.axisLineWidth + } + ] + }); + } + if (this.showLabel) { + drawableElement.push({ + type: "text", + groupTexts: ["bottom-axis", "label"], + data: this.getTickValues().map((tick) => ({ + text: tick.toString(), + x: this.getScaleValue(tick), + y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0), + fill: this.axisThemeConfig.labelColor, + fontSize: this.axisConfig.labelFontSize, + rotation: 0, + verticalPos: "top", + horizontalPos: "center" + })) + }); + } + if (this.showTick) { + const y = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0); + drawableElement.push({ + type: "path", + groupTexts: ["bottom-axis", "ticks"], + data: this.getTickValues().map((tick) => ({ + path: `M ${this.getScaleValue(tick)},${y} L ${this.getScaleValue(tick)},${y + this.axisConfig.tickLength}`, + strokeFill: this.axisThemeConfig.tickColor, + strokeWidth: this.axisConfig.tickWidth + })) + }); + } + if (this.showTitle) { + drawableElement.push({ + type: "text", + groupTexts: ["bottom-axis", "title"], + data: [ + { + text: this.title, + x: this.range[0] + (this.range[1] - this.range[0]) / 2, + y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight, + fill: this.axisThemeConfig.titleColor, + fontSize: this.axisConfig.titleFontSize, + rotation: 0, + verticalPos: "top", + horizontalPos: "center" + } + ] + }); + } + return drawableElement; + } + getDrawableElementsForTopAxis() { + const drawableElement = []; + if (this.showAxisLine) { + const y = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2; + drawableElement.push({ + type: "path", + groupTexts: ["top-axis", "axis-line"], + data: [ + { + path: `M ${this.boundingRect.x},${y} L ${this.boundingRect.x + this.boundingRect.width},${y}`, + strokeFill: this.axisThemeConfig.axisLineColor, + strokeWidth: this.axisConfig.axisLineWidth + } + ] + }); + } + if (this.showLabel) { + drawableElement.push({ + type: "text", + groupTexts: ["top-axis", "label"], + data: this.getTickValues().map((tick) => ({ + text: tick.toString(), + x: this.getScaleValue(tick), + y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding, + fill: this.axisThemeConfig.labelColor, + fontSize: this.axisConfig.labelFontSize, + rotation: 0, + verticalPos: "top", + horizontalPos: "center" + })) + }); + } + if (this.showTick) { + const y = this.boundingRect.y; + drawableElement.push({ + type: "path", + groupTexts: ["top-axis", "ticks"], + data: this.getTickValues().map((tick) => ({ + path: `M ${this.getScaleValue(tick)},${y + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(tick)},${y + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`, + strokeFill: this.axisThemeConfig.tickColor, + strokeWidth: this.axisConfig.tickWidth + })) + }); + } + if (this.showTitle) { + drawableElement.push({ + type: "text", + groupTexts: ["top-axis", "title"], + data: [ + { + text: this.title, + x: this.boundingRect.x + this.boundingRect.width / 2, + y: this.boundingRect.y + this.axisConfig.titlePadding, + fill: this.axisThemeConfig.titleColor, + fontSize: this.axisConfig.titleFontSize, + rotation: 0, + verticalPos: "top", + horizontalPos: "center" + } + ] + }); + } + return drawableElement; + } + getDrawableElements() { + if (this.axisPosition === "left") { + return this.getDrawableElementsForLeftAxis(); + } + if (this.axisPosition === "right") { + throw Error("Drawing of right axis is not implemented"); + } + if (this.axisPosition === "bottom") { + return this.getDrawableElementsForBottomAxis(); + } + if (this.axisPosition === "top") { + return this.getDrawableElementsForTopAxis(); + } + return []; + } +} +class BandAxis extends BaseAxis { + constructor(axisConfig, axisThemeConfig, categories, title, textDimensionCalculator) { + super(axisConfig, title, textDimensionCalculator, axisThemeConfig); + this.categories = categories; + this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleBand */ .WH)().domain(this.categories).range(this.getRange()); + } + setRange(range) { + super.setRange(range); + } + recalculateScale() { + this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleBand */ .WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5); + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.trace("BandAxis axis final categories, range: ", this.categories, this.getRange()); + } + getTickValues() { + return this.categories; + } + getScaleValue(value) { + return this.scale(value) || this.getRange()[0]; + } +} +class LinearAxis extends BaseAxis { + constructor(axisConfig, axisThemeConfig, domain, title, textDimensionCalculator) { + super(axisConfig, title, textDimensionCalculator, axisThemeConfig); + this.domain = domain; + this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleLinear */ .m4Y)().domain(this.domain).range(this.getRange()); + } + getTickValues() { + return this.scale.ticks(); + } + recalculateScale() { + const domain = [...this.domain]; + if (this.axisPosition === "left") { + domain.reverse(); + } + this.scale = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .scaleLinear */ .m4Y)().domain(domain).range(this.getRange()); + } + getScaleValue(value) { + return this.scale(value); + } +} +function getAxis(data, axisConfig, axisThemeConfig, tmpSVGGroup2) { + const textDimensionCalculator = new TextDimensionCalculatorWithFont(tmpSVGGroup2); + if (isBandAxisData(data)) { + return new BandAxis( + axisConfig, + axisThemeConfig, + data.categories, + data.title, + textDimensionCalculator + ); + } + return new LinearAxis( + axisConfig, + axisThemeConfig, + [data.min, data.max], + data.title, + textDimensionCalculator + ); +} +class ChartTitle { + constructor(textDimensionCalculator, chartConfig, chartData, chartThemeConfig) { + this.textDimensionCalculator = textDimensionCalculator; + this.chartConfig = chartConfig; + this.chartData = chartData; + this.chartThemeConfig = chartThemeConfig; + this.boundingRect = { + x: 0, + y: 0, + width: 0, + height: 0 + }; + this.showChartTitle = false; + } + setBoundingBoxXY(point) { + this.boundingRect.x = point.x; + this.boundingRect.y = point.y; + } + calculateSpace(availableSpace) { + const titleDimension = this.textDimensionCalculator.getMaxDimension( + [this.chartData.title], + this.chartConfig.titleFontSize + ); + const widthRequired = Math.max(titleDimension.width, availableSpace.width); + const heightRequired = titleDimension.height + 2 * this.chartConfig.titlePadding; + if (titleDimension.width <= widthRequired && titleDimension.height <= heightRequired && this.chartConfig.showTitle && this.chartData.title) { + this.boundingRect.width = widthRequired; + this.boundingRect.height = heightRequired; + this.showChartTitle = true; + } + return { + width: this.boundingRect.width, + height: this.boundingRect.height + }; + } + getDrawableElements() { + const drawableElem = []; + if (this.showChartTitle) { + drawableElem.push({ + groupTexts: ["chart-title"], + type: "text", + data: [ + { + fontSize: this.chartConfig.titleFontSize, + text: this.chartData.title, + verticalPos: "middle", + horizontalPos: "center", + x: this.boundingRect.x + this.boundingRect.width / 2, + y: this.boundingRect.y + this.boundingRect.height / 2, + fill: this.chartThemeConfig.titleColor, + rotation: 0 + } + ] + }); + } + return drawableElem; + } +} +function getChartTitleComponent(chartConfig, chartData, chartThemeConfig, tmpSVGGroup2) { + const textDimensionCalculator = new TextDimensionCalculatorWithFont(tmpSVGGroup2); + return new ChartTitle(textDimensionCalculator, chartConfig, chartData, chartThemeConfig); +} +class LinePlot { + constructor(plotData, xAxis, yAxis, orientation, plotIndex2) { + this.plotData = plotData; + this.xAxis = xAxis; + this.yAxis = yAxis; + this.orientation = orientation; + this.plotIndex = plotIndex2; + } + getDrawableElement() { + const finalData = this.plotData.data.map((d) => [ + this.xAxis.getScaleValue(d[0]), + this.yAxis.getScaleValue(d[1]) + ]); + let path; + if (this.orientation === "horizontal") { + path = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().y((d) => d[0]).x((d) => d[1])(finalData); + } else { + path = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .n8j)().x((d) => d[0]).y((d) => d[1])(finalData); + } + if (!path) { + return []; + } + return [ + { + groupTexts: ["plot", `line-plot-${this.plotIndex}`], + type: "path", + data: [ + { + path, + strokeFill: this.plotData.strokeFill, + strokeWidth: this.plotData.strokeWidth + } + ] + } + ]; + } +} +class BarPlot { + constructor(barData, boundingRect, xAxis, yAxis, orientation, plotIndex2) { + this.barData = barData; + this.boundingRect = boundingRect; + this.xAxis = xAxis; + this.yAxis = yAxis; + this.orientation = orientation; + this.plotIndex = plotIndex2; + } + getDrawableElement() { + const finalData = this.barData.data.map((d) => [ + this.xAxis.getScaleValue(d[0]), + this.yAxis.getScaleValue(d[1]) + ]); + const barPaddingPercent = 0.05; + const barWidth = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * (1 - barPaddingPercent); + const barWidthHalf = barWidth / 2; + if (this.orientation === "horizontal") { + return [ + { + groupTexts: ["plot", `bar-plot-${this.plotIndex}`], + type: "rect", + data: finalData.map((data) => ({ + x: this.boundingRect.x, + y: data[0] - barWidthHalf, + height: barWidth, + width: data[1] - this.boundingRect.x, + fill: this.barData.fill, + strokeWidth: 0, + strokeFill: this.barData.fill + })) + } + ]; + } + return [ + { + groupTexts: ["plot", `bar-plot-${this.plotIndex}`], + type: "rect", + data: finalData.map((data) => ({ + x: data[0] - barWidthHalf, + y: data[1], + width: barWidth, + height: this.boundingRect.y + this.boundingRect.height - data[1], + fill: this.barData.fill, + strokeWidth: 0, + strokeFill: this.barData.fill + })) + } + ]; + } +} +class BasePlot { + constructor(chartConfig, chartData, chartThemeConfig) { + this.chartConfig = chartConfig; + this.chartData = chartData; + this.chartThemeConfig = chartThemeConfig; + this.boundingRect = { + x: 0, + y: 0, + width: 0, + height: 0 + }; + } + setAxes(xAxis, yAxis) { + this.xAxis = xAxis; + this.yAxis = yAxis; + } + setBoundingBoxXY(point) { + this.boundingRect.x = point.x; + this.boundingRect.y = point.y; + } + calculateSpace(availableSpace) { + this.boundingRect.width = availableSpace.width; + this.boundingRect.height = availableSpace.height; + return { + width: this.boundingRect.width, + height: this.boundingRect.height + }; + } + getDrawableElements() { + if (!(this.xAxis && this.yAxis)) { + throw Error("Axes must be passed to render Plots"); + } + const drawableElem = []; + for (const [i, plot] of this.chartData.plots.entries()) { + switch (plot.type) { + case "line": + { + const linePlot = new LinePlot( + plot, + this.xAxis, + this.yAxis, + this.chartConfig.chartOrientation, + i + ); + drawableElem.push(...linePlot.getDrawableElement()); + } + break; + case "bar": + { + const barPlot = new BarPlot( + plot, + this.boundingRect, + this.xAxis, + this.yAxis, + this.chartConfig.chartOrientation, + i + ); + drawableElem.push(...barPlot.getDrawableElement()); + } + break; + } + } + return drawableElem; + } +} +function getPlotComponent(chartConfig, chartData, chartThemeConfig) { + return new BasePlot(chartConfig, chartData, chartThemeConfig); +} +class Orchestrator { + constructor(chartConfig, chartData, chartThemeConfig, tmpSVGGroup2) { + this.chartConfig = chartConfig; + this.chartData = chartData; + this.componentStore = { + title: getChartTitleComponent(chartConfig, chartData, chartThemeConfig, tmpSVGGroup2), + plot: getPlotComponent(chartConfig, chartData, chartThemeConfig), + xAxis: getAxis( + chartData.xAxis, + chartConfig.xAxis, + { + titleColor: chartThemeConfig.xAxisTitleColor, + labelColor: chartThemeConfig.xAxisLabelColor, + tickColor: chartThemeConfig.xAxisTickColor, + axisLineColor: chartThemeConfig.xAxisLineColor + }, + tmpSVGGroup2 + ), + yAxis: getAxis( + chartData.yAxis, + chartConfig.yAxis, + { + titleColor: chartThemeConfig.yAxisTitleColor, + labelColor: chartThemeConfig.yAxisLabelColor, + tickColor: chartThemeConfig.yAxisTickColor, + axisLineColor: chartThemeConfig.yAxisLineColor + }, + tmpSVGGroup2 + ) + }; + } + calculateVerticalSpace() { + let availableWidth = this.chartConfig.width; + let availableHeight = this.chartConfig.height; + let plotX = 0; + let plotY = 0; + let chartWidth = Math.floor(availableWidth * this.chartConfig.plotReservedSpacePercent / 100); + let chartHeight = Math.floor( + availableHeight * this.chartConfig.plotReservedSpacePercent / 100 + ); + let spaceUsed = this.componentStore.plot.calculateSpace({ + width: chartWidth, + height: chartHeight + }); + availableWidth -= spaceUsed.width; + availableHeight -= spaceUsed.height; + spaceUsed = this.componentStore.title.calculateSpace({ + width: this.chartConfig.width, + height: availableHeight + }); + plotY = spaceUsed.height; + availableHeight -= spaceUsed.height; + this.componentStore.xAxis.setAxisPosition("bottom"); + spaceUsed = this.componentStore.xAxis.calculateSpace({ + width: availableWidth, + height: availableHeight + }); + availableHeight -= spaceUsed.height; + this.componentStore.yAxis.setAxisPosition("left"); + spaceUsed = this.componentStore.yAxis.calculateSpace({ + width: availableWidth, + height: availableHeight + }); + plotX = spaceUsed.width; + availableWidth -= spaceUsed.width; + if (availableWidth > 0) { + chartWidth += availableWidth; + availableWidth = 0; + } + if (availableHeight > 0) { + chartHeight += availableHeight; + availableHeight = 0; + } + this.componentStore.plot.calculateSpace({ + width: chartWidth, + height: chartHeight + }); + this.componentStore.plot.setBoundingBoxXY({ x: plotX, y: plotY }); + this.componentStore.xAxis.setRange([plotX, plotX + chartWidth]); + this.componentStore.xAxis.setBoundingBoxXY({ x: plotX, y: plotY + chartHeight }); + this.componentStore.yAxis.setRange([plotY, plotY + chartHeight]); + this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: plotY }); + if (this.chartData.plots.some((p) => isBarPlot(p))) { + this.componentStore.xAxis.recalculateOuterPaddingToDrawBar(); + } + } + calculateHorizontalSpace() { + let availableWidth = this.chartConfig.width; + let availableHeight = this.chartConfig.height; + let titleYEnd = 0; + let plotX = 0; + let plotY = 0; + let chartWidth = Math.floor(availableWidth * this.chartConfig.plotReservedSpacePercent / 100); + let chartHeight = Math.floor( + availableHeight * this.chartConfig.plotReservedSpacePercent / 100 + ); + let spaceUsed = this.componentStore.plot.calculateSpace({ + width: chartWidth, + height: chartHeight + }); + availableWidth -= spaceUsed.width; + availableHeight -= spaceUsed.height; + spaceUsed = this.componentStore.title.calculateSpace({ + width: this.chartConfig.width, + height: availableHeight + }); + titleYEnd = spaceUsed.height; + availableHeight -= spaceUsed.height; + this.componentStore.xAxis.setAxisPosition("left"); + spaceUsed = this.componentStore.xAxis.calculateSpace({ + width: availableWidth, + height: availableHeight + }); + availableWidth -= spaceUsed.width; + plotX = spaceUsed.width; + this.componentStore.yAxis.setAxisPosition("top"); + spaceUsed = this.componentStore.yAxis.calculateSpace({ + width: availableWidth, + height: availableHeight + }); + availableHeight -= spaceUsed.height; + plotY = titleYEnd + spaceUsed.height; + if (availableWidth > 0) { + chartWidth += availableWidth; + availableWidth = 0; + } + if (availableHeight > 0) { + chartHeight += availableHeight; + availableHeight = 0; + } + this.componentStore.plot.calculateSpace({ + width: chartWidth, + height: chartHeight + }); + this.componentStore.plot.setBoundingBoxXY({ x: plotX, y: plotY }); + this.componentStore.yAxis.setRange([plotX, plotX + chartWidth]); + this.componentStore.yAxis.setBoundingBoxXY({ x: plotX, y: titleYEnd }); + this.componentStore.xAxis.setRange([plotY, plotY + chartHeight]); + this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: plotY }); + if (this.chartData.plots.some((p) => isBarPlot(p))) { + this.componentStore.xAxis.recalculateOuterPaddingToDrawBar(); + } + } + calculateSpace() { + if (this.chartConfig.chartOrientation === "horizontal") { + this.calculateHorizontalSpace(); + } else { + this.calculateVerticalSpace(); + } + } + getDrawableElement() { + this.calculateSpace(); + const drawableElem = []; + this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis); + for (const component of Object.values(this.componentStore)) { + drawableElem.push(...component.getDrawableElements()); + } + return drawableElem; + } +} +class XYChartBuilder { + static build(config, chartData, chartThemeConfig, tmpSVGGroup2) { + const orchestrator = new Orchestrator(config, chartData, chartThemeConfig, tmpSVGGroup2); + return orchestrator.getDrawableElement(); + } +} +let plotIndex = 0; +let tmpSVGGroup; +let xyChartConfig = getChartDefaultConfig(); +let xyChartThemeConfig = getChartDefaultThemeConfig(); +let xyChartData = getChartDefaultData(); +let plotColorPalette = xyChartThemeConfig.plotColorPalette.split(",").map((color) => color.trim()); +let hasSetXAxis = false; +let hasSetYAxis = false; +function getChartDefaultThemeConfig() { + const defaultThemeVariables = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.E)(); + const config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.F)(); + return (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.C)(defaultThemeVariables.xyChart, config.themeVariables.xyChart); +} +function getChartDefaultConfig() { + const config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.F)(); + return (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.C)( + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.B.xyChart, + config.xyChart + ); +} +function getChartDefaultData() { + return { + yAxis: { + type: "linear", + title: "", + min: Infinity, + max: -Infinity + }, + xAxis: { + type: "band", + title: "", + categories: [] + }, + title: "", + plots: [] + }; +} +function textSanitizer(text) { + const config = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.F)(); + return (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.d)(text.trim(), config); +} +function setTmpSVGG(SVGG) { + tmpSVGGroup = SVGG; +} +function setOrientation(orientation) { + if (orientation === "horizontal") { + xyChartConfig.chartOrientation = "horizontal"; + } else { + xyChartConfig.chartOrientation = "vertical"; + } +} +function setXAxisTitle(title) { + xyChartData.xAxis.title = textSanitizer(title.text); +} +function setXAxisRangeData(min, max) { + xyChartData.xAxis = { type: "linear", title: xyChartData.xAxis.title, min, max }; + hasSetXAxis = true; +} +function setXAxisBand(categories) { + xyChartData.xAxis = { + type: "band", + title: xyChartData.xAxis.title, + categories: categories.map((c) => textSanitizer(c.text)) + }; + hasSetXAxis = true; +} +function setYAxisTitle(title) { + xyChartData.yAxis.title = textSanitizer(title.text); +} +function setYAxisRangeData(min, max) { + xyChartData.yAxis = { type: "linear", title: xyChartData.yAxis.title, min, max }; + hasSetYAxis = true; +} +function setYAxisRangeFromPlotData(data) { + const minValue = Math.min(...data); + const maxValue = Math.max(...data); + const prevMinValue = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.min : Infinity; + const prevMaxValue = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.max : -Infinity; + xyChartData.yAxis = { + type: "linear", + title: xyChartData.yAxis.title, + min: Math.min(prevMinValue, minValue), + max: Math.max(prevMaxValue, maxValue) + }; +} +function transformDataWithoutCategory(data) { + let retData = []; + if (data.length === 0) { + return retData; + } + if (!hasSetXAxis) { + const prevMinValue = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.min : Infinity; + const prevMaxValue = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.max : -Infinity; + setXAxisRangeData(Math.min(prevMinValue, 1), Math.max(prevMaxValue, data.length)); + } + if (!hasSetYAxis) { + setYAxisRangeFromPlotData(data); + } + if (isBandAxisData(xyChartData.xAxis)) { + retData = xyChartData.xAxis.categories.map((c, i) => [c, data[i]]); + } + if (isLinearAxisData(xyChartData.xAxis)) { + const min = xyChartData.xAxis.min; + const max = xyChartData.xAxis.max; + const step = (max - min + 1) / data.length; + const categories = []; + for (let i = min; i <= max; i += step) { + categories.push(`${i}`); + } + retData = categories.map((c, i) => [c, data[i]]); + } + return retData; +} +function getPlotColorFromPalette(plotIndex2) { + return plotColorPalette[plotIndex2 === 0 ? 0 : plotIndex2 % plotColorPalette.length]; +} +function setLineData(title, data) { + const plotData = transformDataWithoutCategory(data); + xyChartData.plots.push({ + type: "line", + strokeFill: getPlotColorFromPalette(plotIndex), + strokeWidth: 2, + data: plotData + }); + plotIndex++; +} +function setBarData(title, data) { + const plotData = transformDataWithoutCategory(data); + xyChartData.plots.push({ + type: "bar", + fill: getPlotColorFromPalette(plotIndex), + data: plotData + }); + plotIndex++; +} +function getDrawableElem() { + if (xyChartData.plots.length === 0) { + throw Error("No Plot to render, please provide a plot with some data"); + } + xyChartData.title = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.t)(); + return XYChartBuilder.build(xyChartConfig, xyChartData, xyChartThemeConfig, tmpSVGGroup); +} +function getChartThemeConfig() { + return xyChartThemeConfig; +} +function getChartConfig() { + return xyChartConfig; +} +const clear = function() { + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.v)(); + plotIndex = 0; + xyChartConfig = getChartDefaultConfig(); + xyChartData = getChartDefaultData(); + xyChartThemeConfig = getChartDefaultThemeConfig(); + plotColorPalette = xyChartThemeConfig.plotColorPalette.split(",").map((color) => color.trim()); + hasSetXAxis = false; + hasSetYAxis = false; +}; +const db = { + getDrawableElem, + clear, + setAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.s, + getAccTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.g, + setDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.q, + getDiagramTitle: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.t, + getAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.a, + setAccDescription: _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.b, + setOrientation, + setXAxisTitle, + setXAxisRangeData, + setXAxisBand, + setYAxisTitle, + setYAxisRangeData, + setLineData, + setBarData, + setTmpSVGG, + getChartThemeConfig, + getChartConfig +}; +const draw = (txt, id, _version, diagObj) => { + const db2 = diagObj.db; + const themeConfig = db2.getChartThemeConfig(); + const chartConfig = db2.getChartConfig(); + function getDominantBaseLine(horizontalPos) { + return horizontalPos === "top" ? "text-before-edge" : "middle"; + } + function getTextAnchor(verticalPos) { + return verticalPos === "left" ? "start" : verticalPos === "right" ? "end" : "middle"; + } + function getTextTransformation(data) { + return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`; + } + _mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.l.debug("Rendering xychart chart\n" + txt); + const svg = (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.A)(id); + const group = svg.append("g").attr("class", "main"); + const background = group.append("rect").attr("width", chartConfig.width).attr("height", chartConfig.height).attr("class", "background"); + (0,_mermaid_f47111a7_js__WEBPACK_IMPORTED_MODULE_5__.i)(svg, chartConfig.height, chartConfig.width, true); + svg.attr("viewBox", `0 0 ${chartConfig.width} ${chartConfig.height}`); + background.attr("fill", themeConfig.backgroundColor); + db2.setTmpSVGG(svg.append("g").attr("class", "mermaid-tmp-group")); + const shapes = db2.getDrawableElem(); + const groups = {}; + function getGroup(gList) { + let elem = group; + let prefix = ""; + for (const [i] of gList.entries()) { + let parent = group; + if (i > 0 && groups[prefix]) { + parent = groups[prefix]; + } + prefix += gList[i]; + elem = groups[prefix]; + if (!elem) { + elem = groups[prefix] = parent.append("g").attr("class", gList[i]); + } + } + return elem; + } + for (const shape of shapes) { + if (shape.data.length === 0) { + continue; + } + const shapeGroup = getGroup(shape.groupTexts); + switch (shape.type) { + case "rect": + shapeGroup.selectAll("rect").data(shape.data).enter().append("rect").attr("x", (data) => data.x).attr("y", (data) => data.y).attr("width", (data) => data.width).attr("height", (data) => data.height).attr("fill", (data) => data.fill).attr("stroke", (data) => data.strokeFill).attr("stroke-width", (data) => data.strokeWidth); + break; + case "text": + shapeGroup.selectAll("text").data(shape.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (data) => data.fill).attr("font-size", (data) => data.fontSize).attr("dominant-baseline", (data) => getDominantBaseLine(data.verticalPos)).attr("text-anchor", (data) => getTextAnchor(data.horizontalPos)).attr("transform", (data) => getTextTransformation(data)).text((data) => data.text); + break; + case "path": + shapeGroup.selectAll("path").data(shape.data).enter().append("path").attr("d", (data) => data.path).attr("fill", (data) => data.fill ? data.fill : "none").attr("stroke", (data) => data.strokeFill).attr("stroke-width", (data) => data.strokeWidth); + break; + } + } +}; +const renderer = { + draw +}; +const diagram = { + parser: parser$1, + db, + renderer +}; + + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/9688.ee807478.js b/assets/js/9688.ee807478.js new file mode 100644 index 00000000..799780e7 --- /dev/null +++ b/assets/js/9688.ee807478.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[9688],{9688:(t,e,i)=>{i.d(e,{diagram:()=>T});var n=i(6257),r=i(6312),s=i(1176),a=i(697),l=(i(4353),i(6750),i(2838),function(){var t=function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},e=[1,3],i=[1,4],n=[1,5],r=[1,6],s=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],a=[1,18],l=[2,7],c=[1,22],o=[1,23],h=[1,24],u=[1,25],y=[1,26],d=[1,27],p=[1,20],_=[1,28],E=[1,29],g=[62,63],R=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],m=[1,47],f=[1,48],I=[1,49],b=[1,50],k=[1,51],S=[1,52],T=[1,53],N=[53,54],x=[1,64],A=[1,60],v=[1,61],q=[1,62],$=[1,63],O=[1,65],w=[1,69],C=[1,70],L=[1,67],F=[1,68],M=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],D={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:function(t,e,i,n,r,s,a){var l=s.length-1;switch(r){case 4:this.$=s[l].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[l].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[l-3],s[l-4]);break;case 14:n.setNewReqId(s[l-2]);break;case 15:n.setNewReqText(s[l-2]);break;case 16:n.setNewReqRisk(s[l-2]);break;case 17:n.setNewReqVerifyMethod(s[l-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[l-3]);break;case 34:n.setNewElementType(s[l-2]);break;case 35:n.setNewElementDocRef(s[l-2]);break;case 38:n.addRelationship(s[l-2],s[l],s[l-4]);break;case 39:n.addRelationship(s[l-2],s[l-4],s[l]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES}},table:[{3:1,4:2,6:e,9:i,11:n,13:r},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:i,11:n,13:r},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(s,[2,6]),{3:12,4:2,6:e,9:i,11:n,13:r},{1:[2,2]},{4:17,5:a,7:13,8:l,9:i,11:n,13:r,14:14,15:15,16:16,17:19,23:21,31:c,32:o,33:h,34:u,35:y,36:d,44:p,62:_,63:E},t(s,[2,4]),t(s,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:a,7:31,8:l,9:i,11:n,13:r,14:14,15:15,16:16,17:19,23:21,31:c,32:o,33:h,34:u,35:y,36:d,44:p,62:_,63:E},{4:17,5:a,7:32,8:l,9:i,11:n,13:r,14:14,15:15,16:16,17:19,23:21,31:c,32:o,33:h,34:u,35:y,36:d,44:p,62:_,63:E},{4:17,5:a,7:33,8:l,9:i,11:n,13:r,14:14,15:15,16:16,17:19,23:21,31:c,32:o,33:h,34:u,35:y,36:d,44:p,62:_,63:E},{4:17,5:a,7:34,8:l,9:i,11:n,13:r,14:14,15:15,16:16,17:19,23:21,31:c,32:o,33:h,34:u,35:y,36:d,44:p,62:_,63:E},{4:17,5:a,7:35,8:l,9:i,11:n,13:r,14:14,15:15,16:16,17:19,23:21,31:c,32:o,33:h,34:u,35:y,36:d,44:p,62:_,63:E},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},t(g,[2,20]),t(g,[2,21]),t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(R,[2,49]),t(R,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:m,56:f,57:I,58:b,59:k,60:S,61:T},{52:54,55:m,56:f,57:I,58:b,59:k,60:S,61:T},{5:[1,55]},{5:[1,56]},{53:[1,57]},t(N,[2,40]),t(N,[2,41]),t(N,[2,42]),t(N,[2,43]),t(N,[2,44]),t(N,[2,45]),t(N,[2,46]),{54:[1,58]},{5:x,20:59,21:A,24:v,26:q,28:$,30:O},{5:w,30:C,46:66,47:L,49:F},{23:71,62:_,63:E},{23:72,62:_,63:E},t(M,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:x,20:77,21:A,24:v,26:q,28:$,30:O},t(M,[2,19]),t(M,[2,33]),{22:[1,78]},{22:[1,79]},{5:w,30:C,46:80,47:L,49:F},t(M,[2,37]),t(M,[2,38]),t(M,[2,39]),{23:81,62:_,63:E},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},t(M,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},t(M,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:x,20:106,21:A,24:v,26:q,28:$,30:O},{5:x,20:107,21:A,24:v,26:q,28:$,30:O},{5:x,20:108,21:A,24:v,26:q,28:$,30:O},{5:x,20:109,21:A,24:v,26:q,28:$,30:O},{5:w,30:C,46:110,47:L,49:F},{5:w,30:C,46:111,47:L,49:F},t(M,[2,14]),t(M,[2,15]),t(M,[2,16]),t(M,[2,17]),t(M,[2,34]),t(M,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],n=[],r=[null],s=[],a=this.table,l="",c=0,o=0,h=s.slice.call(arguments,1),u=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);u.setInput(t,y.yy),y.yy.lexer=u,y.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var p=u.yylloc;s.push(p);var _=u.options&&u.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var E,g,R,m,f,I,b,k,S,T={};;){if(g=i[i.length-1],this.defaultActions[g]?R=this.defaultActions[g]:(null==E&&(S=void 0,"number"!=typeof(S=n.pop()||u.lex()||1)&&(S instanceof Array&&(S=(n=S).pop()),S=e.symbols_[S]||S),E=S),R=a[g]&&a[g][E]),void 0===R||!R.length||!R[0]){var N="";for(f in k=[],a[g])this.terminals_[f]&&f>2&&k.push("'"+this.terminals_[f]+"'");N=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[E]||E)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==E?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(N,{text:u.match,token:this.terminals_[E]||E,line:u.yylineno,loc:p,expected:k})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+E);switch(R[0]){case 1:i.push(E),r.push(u.yytext),s.push(u.yylloc),i.push(R[1]),E=null,o=u.yyleng,l=u.yytext,c=u.yylineno,p=u.yylloc;break;case 2:if(I=this.productions_[R[1]][1],T.$=r[r.length-I],T._$={first_line:s[s.length-(I||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(I||1)].first_column,last_column:s[s.length-1].last_column},_&&(T._$.range=[s[s.length-(I||1)].range[0],s[s.length-1].range[1]]),void 0!==(m=this.performAction.apply(T,[l,o,c,y.yy,R[1],r,s].concat(h))))return m;I&&(i=i.slice(0,-1*I*2),r=r.slice(0,-1*I),s=s.slice(0,-1*I)),i.push(this.productions_[R[1]][0]),r.push(T.$),s.push(T._$),b=a[i[i.length-2]][i[i.length-1]],i.push(b);break;case 3:return!0}}return!0}},P={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),i.length-1&&(this.yylineno-=i.length-1);var r=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:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,n,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length;s++)if((i=this._input.match(this.rules[r[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,n){switch(i){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 48:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:case 10:case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 49:return"qString";case 50:return e.yytext=e.yytext.trim(),62}},rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,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,50],inclusive:!0}}};function V(){this.yy={}}return D.lexer=P,V.prototype=D,D.Parser=V,new V}());l.parser=l;const c=l;let o=[],h={},u={},y={},d={};const p={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},getConfig:()=>(0,n.c)().req,addRequirement:(t,e)=>(void 0===u[t]&&(u[t]={name:t,type:e,id:h.id,text:h.text,risk:h.risk,verifyMethod:h.verifyMethod}),h={},u[t]),getRequirements:()=>u,setNewReqId:t=>{void 0!==h&&(h.id=t)},setNewReqText:t=>{void 0!==h&&(h.text=t)},setNewReqRisk:t=>{void 0!==h&&(h.risk=t)},setNewReqVerifyMethod:t=>{void 0!==h&&(h.verifyMethod=t)},setAccTitle:n.s,getAccTitle:n.g,setAccDescription:n.b,getAccDescription:n.a,addElement:t=>(void 0===d[t]&&(d[t]={name:t,type:y.type,docRef:y.docRef},n.l.info("Added new requirement: ",t)),y={},d[t]),getElements:()=>d,setNewElementType:t=>{void 0!==y&&(y.type=t)},setNewElementDocRef:t=>{void 0!==y&&(y.docRef=t)},addRelationship:(t,e,i)=>{o.push({type:t,src:e,dst:i})},getRelationships:()=>o,clear:()=>{o=[],h={},u={},y={},d={},(0,n.v)()}},_={CONTAINS:"contains",ARROW:"arrow"},E=_,g=(t,e)=>{let i=t.append("defs").append("marker").attr("id",_.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");i.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),i.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),i.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",_.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${e.line_height},${e.line_height/2}\n M${e.line_height},${e.line_height/2}\n L0,${e.line_height}`).attr("stroke-width",1)};let R={},m=0;const f=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",R.rect_min_width+"px").attr("height",R.rect_min_height+"px"),I=(t,e,i)=>{let n=R.rect_min_width/2,r=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",R.rect_padding).attr("dominant-baseline","hanging"),s=0;i.forEach((t=>{0==s?r.append("tspan").attr("text-anchor","middle").attr("x",R.rect_min_width/2).attr("dy",0).text(t):r.append("tspan").attr("text-anchor","middle").attr("x",R.rect_min_width/2).attr("dy",.75*R.line_height).text(t),s++}));let a=1.5*R.rect_padding+s*R.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",R.rect_min_width).attr("y1",a).attr("y2",a),{titleNode:r,y:a}},b=(t,e,i,n)=>{let r=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",R.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),s=0;let a=[];return i.forEach((t=>{let e=t.length;for(;e>30&&s<3;){let i=t.substring(0,30);e=(t=t.substring(30,t.length)).length,a[a.length]=i,s++}if(3==s){let t=a[a.length-1];a[a.length-1]=t.substring(0,t.length-4)+"..."}else a[a.length]=t;s=0})),a.forEach((t=>{r.append("tspan").attr("x",R.rect_padding).attr("dy",R.line_height).text(t)})),r},k=function(t,e,i,s,a){const l=i.edge(S(e.src),S(e.dst)),c=(0,r.n8j)().x((function(t){return t.x})).y((function(t){return t.y})),o=t.insert("path","#"+s).attr("class","er relationshipLine").attr("d",c(l.points)).attr("fill","none");e.type==a.db.Relationships.CONTAINS?o.attr("marker-start","url("+n.e.getUrl(R.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+n.e.getUrl(R.arrowMarkerAbsolute)+"#"+E.ARROW+"_line_ending)")),((t,e,i,n)=>{const r=e.node().getTotalLength(),s=e.node().getPointAtLength(.5*r),a="rel"+m;m++;const l=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-l.width/2).attr("y",s.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")})(t,o,0,`<<${e.type}>>`)},S=t=>t.replace(/\s/g,"").replace(/\./g,"_"),T={parser:c,db:p,renderer:{draw:(t,e,i,l)=>{R=(0,n.c)().requirement;const c=R.securityLevel;let o;"sandbox"===c&&(o=(0,r.Ltv)("#i"+e));const h=("sandbox"===c?(0,r.Ltv)(o.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id='${e}']`);g(h,R);const u=new a.T({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:R.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let y=l.db.getRequirements(),d=l.db.getElements(),p=l.db.getRelationships();var _,E,m;_=y,E=u,m=h,Object.keys(_).forEach((t=>{let e=_[t];t=S(t),n.l.info("Added new requirement: ",t);const i=m.append("g").attr("id",t),r=f(i,"req-"+t);let s=I(i,t+"_title",[`<<${e.type}>>`,`${e.name}`]);b(i,t+"_body",[`Id: ${e.id}`,`Text: ${e.text}`,`Risk: ${e.risk}`,`Verification: ${e.verifyMethod}`],s.y);const a=r.node().getBBox();E.setNode(t,{width:a.width,height:a.height,shape:"rect",id:t})})),((t,e,i)=>{Object.keys(t).forEach((n=>{let r=t[n];const s=S(n),a=i.append("g").attr("id",s),l="element-"+s,c=f(a,l);let o=I(a,l+"_title",["<<Element>>",`${n}`]);b(a,l+"_body",[`Type: ${r.type||"Not Specified"}`,`Doc Ref: ${r.docRef||"None"}`],o.y);const h=c.node().getBBox();e.setNode(s,{width:h.width,height:h.height,shape:"rect",id:s})}))})(d,u,h),((t,e)=>{t.forEach((function(t){let i=S(t.src),n=S(t.dst);e.setEdge(i,n,{relationship:t})}))})(p,u),(0,s.Zp)(u),function(t,e){e.nodes().forEach((function(i){void 0!==i&&void 0!==e.node(i)&&(t.select("#"+i),t.select("#"+i).attr("transform","translate("+(e.node(i).x-e.node(i).width/2)+","+(e.node(i).y-e.node(i).height/2)+" )"))}))}(h,u),p.forEach((function(t){k(h,t,u,e,l)}));const T=R.rect_padding,N=h.node().getBBox(),x=N.width+2*T,A=N.height+2*T;(0,n.i)(h,A,x,R.useMaxWidth),h.attr("viewBox",`${N.x-T} ${N.y-T} ${x} ${A}`)}},styles:t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n\n`}}}]); \ No newline at end of file diff --git a/assets/js/980a27ad.1e6de9b3.js b/assets/js/980a27ad.1e6de9b3.js new file mode 100644 index 00000000..9374e2c4 --- /dev/null +++ b/assets/js/980a27ad.1e6de9b3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[9303],{4309:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var n=r(4848),s=r(8453);const i={title:"Get started",sidebar_position:2},o="How to start contributing",a={id:"contribute/how-to-start-contributing",title:"Get started",description:"Welcome! We are glad that you want to contribute to our project! \ud83d\udc96",source:"@site/docs/contribute/how-to-start-contributing.md",sourceDirName:"contribute",slug:"/contribute/how-to-start-contributing",permalink:"/tagreader-python/docs/contribute/how-to-start-contributing",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/contribute/how-to-start-contributing.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"Get started",sidebar_position:2},sidebar:"contribute",previous:{title:"Overview",permalink:"/tagreader-python/docs/contribute/overview"},next:{title:"Ground rules",permalink:"/tagreader-python/docs/contribute/ground-rules"}},c={},l=[{value:"Workflow",id:"workflow",level:2},{value:"Code review process",id:"code-review-process",level:2}];function u(e){const t={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"how-to-start-contributing",children:"How to start contributing"})}),"\n",(0,n.jsx)(t.p,{children:"Welcome! We are glad that you want to contribute to our project! \ud83d\udc96"}),"\n",(0,n.jsx)(t.p,{children:"This project accepts contributions via Github pull requests."}),"\n",(0,n.jsx)(t.p,{children:"This document outlines the process to help get your contribution accepted."}),"\n",(0,n.jsx)(t.p,{children:"There are many ways to contribute:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Suggest ",(0,n.jsx)(t.a,{href:"https://github.com/equinor/awt/issues/new?assignees=&labels=type%3A+%3Abulb%3A+feature+request&template=feature-request.md&title=",children:"Features"})]}),"\n",(0,n.jsxs)(t.li,{children:["Suggest ",(0,n.jsx)(t.a,{href:"https://github.com/equinor/awt/issues/new?assignees=&labels=type%3A+%3Awrench%3A+maintenance&template=code-maintenance.md&title=",children:"Changes"})]}),"\n",(0,n.jsxs)(t.li,{children:["Report ",(0,n.jsx)(t.a,{href:"https://github.com/equinor/awt/issues/new?assignees=&labels=type%3A+%3Abug+bug&template=bug-report.md&title=",children:"Bugs"})]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["You can start by looking through the current ",(0,n.jsx)(t.a,{href:"https://github.com/equinor/awt/issues",children:"Issues"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"workflow",children:"Workflow"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsx)(t.li,{children:"Create a new branch"}),"\n",(0,n.jsx)(t.li,{children:"Do work"}),"\n",(0,n.jsx)(t.li,{children:"Create a Pull Request"}),"\n",(0,n.jsx)(t.li,{children:"Review Pull Request until accepted"}),"\n",(0,n.jsx)(t.li,{children:"Rebase and merge on main"}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"code-review-process",children:"Code review process"}),"\n",(0,n.jsx)(t.p,{children:"The core team looks at pull requests on a regular basis. After feedback has been given we expect responses within three weeks. After three weeks we may close the pull request if it isn't showing any activity."})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(u,{...e})}):u(e)}}}]); \ No newline at end of file diff --git a/assets/js/a7456010.51a4a774.js b/assets/js/a7456010.51a4a774.js new file mode 100644 index 00000000..037342c4 --- /dev/null +++ b/assets/js/a7456010.51a4a774.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[1235],{8552:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/a7bd4aaa.3b66ce73.js b/assets/js/a7bd4aaa.3b66ce73.js new file mode 100644 index 00000000..2a897322 --- /dev/null +++ b/assets/js/a7bd4aaa.3b66ce73.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[7098],{1723:(n,e,s)=>{s.r(e),s.d(e,{default:()=>l});s(6540);var r=s(1003);function o(n,e){return`docs-${n}-${e}`}var t=s(3025),c=s(2831),i=s(1463),u=s(4848);function a(n){const{version:e}=n;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(i.A,{version:e.version,tag:o(e.pluginId,e.version)}),(0,u.jsx)(r.be,{children:e.noIndex&&(0,u.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function d(n){const{version:e,route:s}=n;return(0,u.jsx)(r.e3,{className:e.className,children:(0,u.jsx)(t.n,{version:e,children:(0,c.v)(s.routes)})})}function l(n){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a,{...n}),(0,u.jsx)(d,{...n})]})}}}]); \ No newline at end of file diff --git a/assets/js/a94703ab.52311314.js b/assets/js/a94703ab.52311314.js new file mode 100644 index 00000000..f049acb2 --- /dev/null +++ b/assets/js/a94703ab.52311314.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[9048],{1377:(e,t,n)=>{n.r(t),n.d(t,{default:()=>be});var a=n(6540),o=n(4164),i=n(1003),s=n(7559),l=n(4718),r=n(609),c=n(1312),d=n(3104),u=n(5062);const m={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};var b=n(4848);function h(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(!1),{startScroll:s,cancelScroll:l}=(0,d.gk)();return(0,d.Mq)(((e,n)=>{let{scrollY:a}=e;const s=n?.scrollY;s&&(i.current?i.current=!1:a>=s?(l(),o(!1)):a<t?o(!1):a+window.innerHeight<document.documentElement.scrollHeight&&o(!0))})),(0,u.$)((e=>{e.location.hash&&(i.current=!0,o(!1))})),{shown:n,scrollToTop:()=>s(0)}}({threshold:300});return(0,b.jsx)("button",{"aria-label":(0,c.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.A)("clean-btn",s.G.common.backToTopButton,m.backToTopButton,e&&m.backToTopButtonShow),type:"button",onClick:t})}var p=n(3109),x=n(6347),f=n(4581),j=n(6342),v=n(3465);function _(e){return(0,b.jsx)("svg",{width:"20",height:"20","aria-hidden":"true",...e,children:(0,b.jsxs)("g",{fill:"#7a7a7a",children:[(0,b.jsx)("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),(0,b.jsx)("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})]})})}const A={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function g(e){let{onClick:t}=e;return(0,b.jsx)("button",{type:"button",title:(0,c.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,c.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.A)("button button--secondary button--outline",A.collapseSidebarButton),onClick:t,children:(0,b.jsx)(_,{className:A.collapseSidebarButtonIcon})})}var k=n(5041),C=n(9532);const S=Symbol("EmptyContext"),T=a.createContext(S);function N(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),i=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return(0,b.jsx)(T.Provider,{value:i,children:t})}var I=n(1422),B=n(9169),y=n(8774),w=n(2303);function L(e){let{collapsed:t,categoryLabel:n,onClick:a}=e;return(0,b.jsx)("button",{"aria-label":t?(0,c.T)({id:"theme.DocSidebarItem.expandCategoryAriaLabel",message:"Expand sidebar category '{label}'",description:"The ARIA label to expand the sidebar category"},{label:n}):(0,c.T)({id:"theme.DocSidebarItem.collapseCategoryAriaLabel",message:"Collapse sidebar category '{label}'",description:"The ARIA label to collapse the sidebar category"},{label:n}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:a})}function E(e){let{item:t,onItemClick:n,activePath:i,level:r,index:c,...d}=e;const{items:u,label:m,collapsible:h,className:p,href:x}=t,{docs:{sidebar:{autoCollapseCategories:f}}}=(0,j.p)(),v=function(e){const t=(0,w.A)();return(0,a.useMemo)((()=>e.href&&!e.linkUnlisted?e.href:!t&&e.collapsible?(0,l.Nr)(e):void 0),[e,t])}(t),_=(0,l.w8)(t,i),A=(0,B.ys)(x,i),{collapsed:g,setCollapsed:k}=(0,I.u)({initialState:()=>!!h&&(!_&&t.collapsed)}),{expandedItem:N,setExpandedItem:E}=function(){const e=(0,a.useContext)(T);if(e===S)throw new C.dV("DocSidebarItemsExpandedStateProvider");return e}(),M=function(e){void 0===e&&(e=!g),E(e?null:c),k(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const i=(0,C.ZC)(t);(0,a.useEffect)((()=>{t&&!i&&n&&o(!1)}),[t,i,n,o])}({isActive:_,collapsed:g,updateCollapsed:M}),(0,a.useEffect)((()=>{h&&null!=N&&N!==c&&f&&k(!0)}),[h,N,c,k,f]),(0,b.jsxs)("li",{className:(0,o.A)(s.G.docs.docSidebarItemCategory,s.G.docs.docSidebarItemCategoryLevel(r),"menu__list-item",{"menu__list-item--collapsed":g},p),children:[(0,b.jsxs)("div",{className:(0,o.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":A}),children:[(0,b.jsx)(y.A,{className:(0,o.A)("menu__link",{"menu__link--sublist":h,"menu__link--sublist-caret":!x&&h,"menu__link--active":_}),onClick:h?e=>{n?.(t),x?M(!1):(e.preventDefault(),M())}:()=>{n?.(t)},"aria-current":A?"page":void 0,role:h&&!x?"button":void 0,"aria-expanded":h&&!x?!g:void 0,href:h?v??"#":v,...d,children:m}),x&&h&&(0,b.jsx)(L,{collapsed:g,categoryLabel:m,onClick:e=>{e.preventDefault(),M()}})]}),(0,b.jsx)(I.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:g,children:(0,b.jsx)(U,{items:u,tabIndex:g?-1:0,onItemClick:n,activePath:i,level:r+1})})]})}var M=n(6654),H=n(3186);const G={menuExternalLink:"menuExternalLink_NmtK"};function W(e){let{item:t,onItemClick:n,activePath:a,level:i,index:r,...c}=e;const{href:d,label:u,className:m,autoAddBaseUrl:h}=t,p=(0,l.w8)(t,a),x=(0,M.A)(d);return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(i),"menu__list-item",m),children:(0,b.jsxs)(y.A,{className:(0,o.A)("menu__link",!x&&G.menuExternalLink,{"menu__link--active":p}),autoAddBaseUrl:h,"aria-current":p?"page":void 0,to:d,...x&&{onClick:n?()=>n(t):void 0},...c,children:[u,!x&&(0,b.jsx)(H.A,{})]})},u)}const P={menuHtmlItem:"menuHtmlItem_M9Kj"};function R(e){let{item:t,level:n,index:a}=e;const{value:i,defaultStyle:l,className:r}=t;return(0,b.jsx)("li",{className:(0,o.A)(s.G.docs.docSidebarItemLink,s.G.docs.docSidebarItemLinkLevel(n),l&&[P.menuHtmlItem,"menu__list-item"],r),dangerouslySetInnerHTML:{__html:i}},a)}function D(e){let{item:t,...n}=e;switch(t.type){case"category":return(0,b.jsx)(E,{item:t,...n});case"html":return(0,b.jsx)(R,{item:t,...n});default:return(0,b.jsx)(W,{item:t,...n})}}function F(e){let{items:t,...n}=e;const a=(0,l.Y)(t,n.activePath);return(0,b.jsx)(N,{children:a.map(((e,t)=>(0,b.jsx)(D,{item:e,index:t,...n},t)))})}const U=(0,a.memo)(F),V={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function Y(e){let{path:t,sidebar:n,className:i}=e;const l=function(){const{isActive:e}=(0,k.M)(),[t,n]=(0,a.useState)(e);return(0,d.Mq)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return(0,b.jsx)("nav",{"aria-label":(0,c.T)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.A)("menu thin-scrollbar",V.menu,l&&V.menuWithAnnouncementBar,i),children:(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(U,{items:n,activePath:t,level:1})})})}const K="sidebar_njMd",z="sidebarWithHideableNavbar_wUlq",q="sidebarHidden_VK0M",O="sidebarLogo_isFc";function J(e){let{path:t,sidebar:n,onCollapse:a,isHidden:i}=e;const{navbar:{hideOnScroll:s},docs:{sidebar:{hideable:l}}}=(0,j.p)();return(0,b.jsxs)("div",{className:(0,o.A)(K,s&&z,i&&q),children:[s&&(0,b.jsx)(v.A,{tabIndex:-1,className:O}),(0,b.jsx)(Y,{path:t,sidebar:n}),l&&(0,b.jsx)(g,{onClick:a})]})}const Q=a.memo(J);var X=n(5600),Z=n(9876);const $=e=>{let{sidebar:t,path:n}=e;const a=(0,Z.M)();return(0,b.jsx)("ul",{className:(0,o.A)(s.G.docs.docSidebarMenu,"menu__list"),children:(0,b.jsx)(U,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&a.toggle(),"link"===e.type&&a.toggle()},level:1})})};function ee(e){return(0,b.jsx)(X.GX,{component:$,props:e})}const te=a.memo(ee);function ne(e){const t=(0,f.l)(),n="desktop"===t||"ssr"===t,a="mobile"===t;return(0,b.jsxs)(b.Fragment,{children:[n&&(0,b.jsx)(Q,{...e}),a&&(0,b.jsx)(te,{...e})]})}const ae={expandButton:"expandButton_TmdG",expandButtonIcon:"expandButtonIcon_i1dp"};function oe(e){let{toggleSidebar:t}=e;return(0,b.jsx)("div",{className:ae.expandButton,title:(0,c.T)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,c.T)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t,children:(0,b.jsx)(_,{className:ae.expandButtonIcon})})}const ie={docSidebarContainer:"docSidebarContainer_YfHR",docSidebarContainerHidden:"docSidebarContainerHidden_DPk8",sidebarViewport:"sidebarViewport_aRkj"};function se(e){let{children:t}=e;const n=(0,r.t)();return(0,b.jsx)(a.Fragment,{children:t},n?.name??"noSidebar")}function le(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:i}=e;const{pathname:l}=(0,x.zy)(),[r,c]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{r&&c(!1),!r&&(0,p.O)()&&c(!0),i((e=>!e))}),[i,r]);return(0,b.jsx)("aside",{className:(0,o.A)(s.G.docs.docSidebarContainer,ie.docSidebarContainer,n&&ie.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ie.docSidebarContainer)&&n&&c(!0)},children:(0,b.jsx)(se,{children:(0,b.jsxs)("div",{className:(0,o.A)(ie.sidebarViewport,r&&ie.sidebarViewportHidden),children:[(0,b.jsx)(ne,{sidebar:t,path:l,onCollapse:d,isHidden:r}),r&&(0,b.jsx)(oe,{toggleSidebar:d})]})})})}const re={docMainContainer:"docMainContainer_TBSr",docMainContainerEnhanced:"docMainContainerEnhanced_lQrH",docItemWrapperEnhanced:"docItemWrapperEnhanced_JWYK"};function ce(e){let{hiddenSidebarContainer:t,children:n}=e;const a=(0,r.t)();return(0,b.jsx)("main",{className:(0,o.A)(re.docMainContainer,(t||!a)&&re.docMainContainerEnhanced),children:(0,b.jsx)("div",{className:(0,o.A)("container padding-top--md padding-bottom--lg",re.docItemWrapper,t&&re.docItemWrapperEnhanced),children:n})})}const de={docRoot:"docRoot_UBD9",docsWrapper:"docsWrapper_hBAB"};function ue(e){let{children:t}=e;const n=(0,r.t)(),[o,i]=(0,a.useState)(!1);return(0,b.jsxs)("div",{className:de.docsWrapper,children:[(0,b.jsx)(h,{}),(0,b.jsxs)("div",{className:de.docRoot,children:[n&&(0,b.jsx)(le,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:i}),(0,b.jsx)(ce,{hiddenSidebarContainer:o,children:t})]})]})}var me=n(3363);function be(e){const t=(0,l.B5)(e);if(!t)return(0,b.jsx)(me.A,{});const{docElement:n,sidebarName:a,sidebarItems:c}=t;return(0,b.jsx)(i.e3,{className:(0,o.A)(s.G.page.docsDocPage),children:(0,b.jsx)(r.V,{name:a,items:c,children:(0,b.jsx)(ue,{children:n})})})}},3363:(e,t,n)=>{n.d(t,{A:()=>l});n(6540);var a=n(4164),o=n(1312),i=n(1107),s=n(4848);function l(e){let{className:t}=e;return(0,s.jsx)("main",{className:(0,a.A)("container margin-vert--xl",t),children:(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,s.jsx)(i.A,{as:"h1",className:"hero__title",children:(0,s.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,s.jsx)("p",{children:(0,s.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]); \ No newline at end of file diff --git a/assets/js/aba21aa0.49179dbc.js b/assets/js/aba21aa0.49179dbc.js new file mode 100644 index 00000000..f28a7fc9 --- /dev/null +++ b/assets/js/aba21aa0.49179dbc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[5742],{7093:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/b0ef962e.4c4597cd.js b/assets/js/b0ef962e.4c4597cd.js new file mode 100644 index 00000000..3844452e --- /dev/null +++ b/assets/js/b0ef962e.4c4597cd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[4930],{4617:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>r,toc:()=>l});var i=n(4848),a=n(8453);const o={sidebar_position:6},s="Time zones",r={id:"about/usage/time-zone",title:"Time zones",description:"It is important to understand how Tagreader uses and interprets time zones. Queries to the backend servers are always",source:"@site/docs/about/usage/time-zone.md",sourceDirName:"about/usage",slug:"/about/usage/time-zone",permalink:"/tagreader-python/docs/about/usage/time-zone",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/about/usage/time-zone.md",tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"about",previous:{title:"Caching results",permalink:"/tagreader-python/docs/about/usage/caching"}},d={},l=[];function c(e){const t={code:"code",em:"em",h1:"h1",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"time-zones",children:"Time zones"})}),"\n",(0,i.jsx)(t.p,{children:"It is important to understand how Tagreader uses and interprets time zones. Queries to the backend servers are always\nperformed in UTC time, and return data is also always in UTC. However, it is usually not convenient to ensure all time\nstamps are in UTC time. The client and handlers therefore have functionality for converting between UTC and\nuser-specified time zones."}),"\n",(0,i.jsx)(t.p,{children:"There are two levels of determining which time zone input arguments should be interpreted as, and which time zone\nreturn data should be converted to:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"Time zone aware input arguments will use their corresponding time zone."}),"\n",(0,i.jsx)(t.li,{children:"Time zone naive input arguments are assumed to have time zone as provided by the client."}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["The client-provided time zone can be specified with the optional ",(0,i.jsx)(t.code,{children:"tz"}),' argument (string, e.g. "',(0,i.jsx)(t.em,{children:"US/Central"}),'") during\nclient creation. If it is not specified, then the default value ',(0,i.jsx)(t.em,{children:"Europe/Oslo"})," is used. Note that for the most common\nuse case where Equinor employees want to fetch data from Norwegian assets and display them with Norwegian time stamps,\nnothing needs to be done."]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.em,{children:"Note:"})," It is a good idea to update the ",(0,i.jsx)(t.code,{children:"pytz"})," package rather frequently (at least twice per year) to ensure that time\nzone information is up-to-date. ",(0,i.jsx)(t.code,{children:"pip install --upgrade pytz"})," ."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Example (advanced usage)"})}),"\n",(0,i.jsx)(t.p,{children:"An employee in Houston is contacted by her colleague in Brazil about an event that she needs to investigate.\nThe colleague identified the time of the event at July 20th 2020 at 15:05:00 Rio time. The Houston employee wishes to\nextract interpolated data with 60-second intervals and display the data in her local time zone. She also wishes to send\nthe data to her Norwegian colleague with datestamps in Norwegian time. One way of doing this is :"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-python",children:'import tagreader\nfrom datetime import datetime, timedelta\nfrom dateutil import tz\nc = tagreader.IMSClient("PINO", "pi", tz="US/Central") # Force output data to Houston time\nc.connect()\ntzinfo = tz.gettz("Brazil/East") # Generate timezone object for Rio local time\nevent_time = datetime(2020, 7, 20, 15, 5, 0, tzinfo=tzinfo)\nstart_time = event_time - timedelta(minutes=30)\nend_time = event_time + timedelta(minutes=10)\ndf = c.read(["BA:CONC.1"], start_time, end_time, ts=60)\ndf_to_Norway = df.tz_convert("Europe/Oslo") # Create a copy of the dataframe with Norwegian time stamps\n'})})]})}function m(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}}}]); \ No newline at end of file diff --git a/assets/js/common.020bfe42.js b/assets/js/common.020bfe42.js new file mode 100644 index 00000000..40708aa6 --- /dev/null +++ b/assets/js/common.020bfe42.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[2076],{8453:(t,e,n)=>{n.d(e,{R:()=>s,x:()=>u});var r=n(6540);const o={},i=r.createContext(o);function s(t){const e=r.useContext(i);return r.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function u(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:s(t.components),r.createElement(i.Provider,{value:e},t.children)}},3046:(t,e,n)=>{n.d(e,{T:()=>M});var r=n(8585),o=n(9142),i=n(9610),s=n(7422),u=n(1662),c=n(6401),a=n(8058),f=n(9592),h=n(3588),d=n(4326),A=n(2062),l=n(5707);const v=function(t){return t!=t};const b=function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1};const _=function(t,e,n){return e==e?b(t,e,n):(0,l.A)(t,v,n)};const p=function(t,e){return!!(null==t?0:t.length)&&_(t,e,0)>-1};const g=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1};var j=n(4099),y=n(9857);const m=function(){};var w=n(9959),C=y.A&&1/(0,w.A)(new y.A([,-0]))[1]==1/0?function(t){return new y.A(t)}:m;const O=C;const E=function(t,e,n){var r=-1,o=p,i=t.length,s=!0,u=[],c=u;if(n)s=!1,o=g;else if(i>=200){var a=e?null:O(t);if(a)return(0,w.A)(a);s=!1,o=j.A,c=new A.A}else c=e?[]:u;t:for(;++r<i;){var f=t[r],h=e?e(f):f;if(f=n||0!==f?f:0,s&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue t;e&&c.push(h),u.push(f)}else o(c,h,n)||(c!==u&&c.push(h),u.push(f))}return u};var L=n(3533);const N=(0,d.A)((function(t){return E((0,h.A)(t,1,L.A,!0))}));var D=n(8207),S=n(9463),F="\0",P="\0",x="\x01";class M{constructor(t={}){this._isDirected=!r.A(t,"directed")||t.directed,this._isMultigraph=!!r.A(t,"multigraph")&&t.multigraph,this._isCompound=!!r.A(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=o.A(void 0),this._defaultEdgeLabelFn=o.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[P]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return i.A(t)||(t=o.A(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return s.A(this._nodes)}sources(){var t=this;return u.A(this.nodes(),(function(e){return c.A(t._in[e])}))}sinks(){var t=this;return u.A(this.nodes(),(function(e){return c.A(t._out[e])}))}setNodes(t,e){var n=arguments,r=this;return a.A(t,(function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this}setNode(t,e){return r.A(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=P,this._children[t]={},this._children[P][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return r.A(this._nodes,t)}removeNode(t){var e=this;if(r.A(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],a.A(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),a.A(s.A(this._in[t]),n),delete this._in[t],delete this._preds[t],a.A(s.A(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(f.A(e))e=P;else{for(var n=e+="";!f.A(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==P)return e}}children(t){if(f.A(t)&&(t=P),this._isCompound){var e=this._children[t];if(e)return s.A(e)}else{if(t===P)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return s.A(e)}successors(t){var e=this._sucs[t];if(e)return s.A(e)}neighbors(t){var e=this.predecessors(t);if(e)return N(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;a.A(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),a.A(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function o(t){var i=n.parent(t);return void 0===i||e.hasNode(i)?(r[t]=i,i):i in r?r[i]:o(i)}return this._isCompound&&a.A(e.nodes(),(function(t){e.setParent(t,o(t))})),e}setDefaultEdgeLabel(t){return i.A(t)||(t=o.A(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return D.A(this._edgeObjs)}setPath(t,e){var n=this,r=arguments;return S.A(t,(function(t,o){return r.length>1?n.setEdge(t,o,e):n.setEdge(t,o),o})),this}setEdge(){var t,e,n,o,i=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(o=arguments[1],i=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),t=""+t,e=""+e,f.A(n)||(n=""+n);var u=U(this._isDirected,t,e,n);if(r.A(this._edgeLabels,u))return i&&(this._edgeLabels[u]=o),this;if(!f.A(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[u]=i?o:this._defaultEdgeLabelFn(t,e,n);var c=function(t,e,n,r){var o=""+e,i=""+n;if(!t&&o>i){var s=o;o=i,i=s}var u={v:o,w:i};r&&(u.name=r);return u}(this._isDirected,t,e,n);return t=c.v,e=c.w,Object.freeze(c),this._edgeObjs[u]=c,k(this._preds[e],t),k(this._sucs[t],e),this._in[e][u]=c,this._out[t][u]=c,this._edgeCount++,this}edge(t,e,n){var r=1===arguments.length?z(this._isDirected,arguments[0]):U(this._isDirected,t,e,n);return this._edgeLabels[r]}hasEdge(t,e,n){var o=1===arguments.length?z(this._isDirected,arguments[0]):U(this._isDirected,t,e,n);return r.A(this._edgeLabels,o)}removeEdge(t,e,n){var r=1===arguments.length?z(this._isDirected,arguments[0]):U(this._isDirected,t,e,n),o=this._edgeObjs[r];return o&&(t=o.v,e=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],I(this._preds[e],t),I(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this}inEdges(t,e){var n=this._in[t];if(n){var r=D.A(n);return e?u.A(r,(function(t){return t.v===e})):r}}outEdges(t,e){var n=this._out[t];if(n){var r=D.A(n);return e?u.A(r,(function(t){return t.w===e})):r}}nodeEdges(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}}function k(t,e){t[e]?t[e]++:t[e]=1}function I(t,e){--t[e]||delete t[e]}function U(t,e,n,r){var o=""+e,i=""+n;if(!t&&o>i){var s=o;o=i,i=s}return o+x+i+x+(f.A(r)?F:r)}function z(t,e){return U(t,e.v,e.w,e.name)}M.prototype._nodeCount=0,M.prototype._edgeCount=0},697:(t,e,n)=>{n.d(e,{T:()=>r.T});var r=n(3046)},2062:(t,e,n)=>{n.d(e,{A:()=>u});var r=n(9471);const o=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const i=function(t){return this.__data__.has(t)};function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r.A;++e<n;)this.add(t[e])}s.prototype.add=s.prototype.push=o,s.prototype.has=i;const u=s},2641:(t,e,n)=>{n.d(e,{A:()=>r});const r=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},2634:(t,e,n)=>{n.d(e,{A:()=>r});const r=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}},5572:(t,e,n)=>{n.d(e,{A:()=>r});const r=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},6912:(t,e,n)=>{n.d(e,{A:()=>r});const r=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},1641:(t,e,n)=>{n.d(e,{A:()=>Z});var r=n(1754),o=n(2641),i=n(2851),s=n(2031),u=n(7422);const c=function(t,e){return t&&(0,s.A)(e,(0,u.A)(e),t)};var a=n(5615);const f=function(t,e){return t&&(0,s.A)(e,(0,a.A)(e),t)};var h=n(154),d=n(9759),A=n(4792);const l=function(t,e){return(0,s.A)(t,(0,A.A)(t),e)};var v=n(6912),b=n(5647),_=n(3153);const p=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,v.A)(e,(0,A.A)(t)),t=(0,b.A)(t);return e}:_.A;const g=function(t,e){return(0,s.A)(t,p(t),e)};var j=n(9042),y=n(3831);const m=function(t){return(0,y.A)(t,a.A,p)};var w=n(9779),C=Object.prototype.hasOwnProperty;const O=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&C.call(t,"index")&&(n.index=t.index,n.input=t.input),n};var E=n(565);const L=function(t,e){var n=e?(0,E.A)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)};var N=/\w*$/;const D=function(t){var e=new t.constructor(t.source,N.exec(t));return e.lastIndex=t.lastIndex,e};var S=n(241),F=S.A?S.A.prototype:void 0,P=F?F.valueOf:void 0;const x=function(t){return P?Object(P.call(t)):{}};var M=n(1801);const k=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return(0,E.A)(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return L(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,M.A)(t,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return D(t);case"[object Symbol]":return x(t)}};var I=n(8598),U=n(2049),z=n(9912),B=n(3098);const R=function(t){return(0,B.A)(t)&&"[object Map]"==(0,w.A)(t)};var $=n(2789),G=n(4841),T=G.A&&G.A.isMap;const V=T?(0,$.A)(T):R;var W=n(3149);const q=function(t){return(0,B.A)(t)&&"[object Set]"==(0,w.A)(t)};var H=G.A&&G.A.isSet;const J=H?(0,$.A)(H):q;var K="[object Arguments]",Q="[object Function]",X="[object Object]",Y={};Y[K]=Y["[object Array]"]=Y["[object ArrayBuffer]"]=Y["[object DataView]"]=Y["[object Boolean]"]=Y["[object Date]"]=Y["[object Float32Array]"]=Y["[object Float64Array]"]=Y["[object Int8Array]"]=Y["[object Int16Array]"]=Y["[object Int32Array]"]=Y["[object Map]"]=Y["[object Number]"]=Y[X]=Y["[object RegExp]"]=Y["[object Set]"]=Y["[object String]"]=Y["[object Symbol]"]=Y["[object Uint8Array]"]=Y["[object Uint8ClampedArray]"]=Y["[object Uint16Array]"]=Y["[object Uint32Array]"]=!0,Y["[object Error]"]=Y[Q]=Y["[object WeakMap]"]=!1;const Z=function t(e,n,s,A,v,b){var _,p=1&n,y=2&n,C=4&n;if(s&&(_=v?s(e,A,v,b):s(e)),void 0!==_)return _;if(!(0,W.A)(e))return e;var E=(0,U.A)(e);if(E){if(_=O(e),!p)return(0,d.A)(e,_)}else{var L=(0,w.A)(e),N=L==Q||"[object GeneratorFunction]"==L;if((0,z.A)(e))return(0,h.A)(e,p);if(L==X||L==K||N&&!v){if(_=y||N?{}:(0,I.A)(e),!p)return y?g(e,f(_,e)):l(e,c(_,e))}else{if(!Y[L])return v?e:{};_=k(e,L,p)}}b||(b=new r.A);var D=b.get(e);if(D)return D;b.set(e,_),J(e)?e.forEach((function(r){_.add(t(r,n,s,r,e,b))})):V(e)&&e.forEach((function(r,o){_.set(o,t(r,n,s,o,e,b))}));var S=C?y?m:j.A:y?a.A:u.A,F=E?void 0:S(e);return(0,o.A)(F||e,(function(r,o){F&&(r=e[o=r]),(0,i.A)(_,o,t(r,n,s,o,e,b))})),_}},6240:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(9841),o=n(8446);const i=function(t,e){return function(n,r){if(null==n)return n;if(!(0,o.A)(n))return t(n,r);for(var i=n.length,s=e?i:-1,u=Object(n);(e?s--:++s<i)&&!1!==r(u[s],s,u););return n}}(r.A)},5707:(t,e,n)=>{n.d(e,{A:()=>r});const r=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}},3588:(t,e,n)=>{n.d(e,{A:()=>a});var r=n(6912),o=n(241),i=n(2274),s=n(2049),u=o.A?o.A.isConcatSpreadable:void 0;const c=function(t){return(0,s.A)(t)||(0,i.A)(t)||!!(u&&t&&t[u])};const a=function t(e,n,o,i,s){var u=-1,a=e.length;for(o||(o=c),s||(s=[]);++u<a;){var f=e[u];n>0&&o(f)?n>1?t(f,n-1,o,i,s):(0,r.A)(s,f):i||(s[s.length]=f)}return s}},9841:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(4574),o=n(7422);const i=function(t,e){return t&&(0,r.A)(t,e,o.A)}},6318:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(7819),o=n(901);const i=function(t,e){for(var n=0,i=(e=(0,r.A)(e,t)).length;null!=t&&n<i;)t=t[(0,o.A)(e[n++])];return n&&n==i?t:void 0}},3831:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(6912),o=n(2049);const i=function(t,e,n){var i=e(t);return(0,o.A)(t)?i:(0,r.A)(i,n(t))}},9574:(t,e,n)=>{n.d(e,{A:()=>H});var r=n(1754),o=n(2062);const i=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1};var s=n(4099);const u=function(t,e,n,r,u,c){var a=1&n,f=t.length,h=e.length;if(f!=h&&!(a&&h>f))return!1;var d=c.get(t),A=c.get(e);if(d&&A)return d==e&&A==t;var l=-1,v=!0,b=2&n?new o.A:void 0;for(c.set(t,e),c.set(e,t);++l<f;){var _=t[l],p=e[l];if(r)var g=a?r(p,_,l,e,t,c):r(_,p,l,t,e,c);if(void 0!==g){if(g)continue;v=!1;break}if(b){if(!i(e,(function(t,e){if(!(0,s.A)(b,e)&&(_===t||u(_,t,n,r,c)))return b.push(e)}))){v=!1;break}}else if(_!==p&&!u(_,p,n,r,c)){v=!1;break}}return c.delete(t),c.delete(e),v};var c=n(241),a=n(3988),f=n(6984);const h=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n};var d=n(9959),A=c.A?c.A.prototype:void 0,l=A?A.valueOf:void 0;const v=function(t,e,n,r,o,i,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new a.A(t),new a.A(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,f.A)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var c=h;case"[object Set]":var A=1&r;if(c||(c=d.A),t.size!=e.size&&!A)return!1;var v=s.get(t);if(v)return v==e;r|=2,s.set(t,e);var b=u(c(t),c(e),r,o,i,s);return s.delete(t),b;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1};var b=n(9042),_=Object.prototype.hasOwnProperty;const p=function(t,e,n,r,o,i){var s=1&n,u=(0,b.A)(t),c=u.length;if(c!=(0,b.A)(e).length&&!s)return!1;for(var a=c;a--;){var f=u[a];if(!(s?f in e:_.call(e,f)))return!1}var h=i.get(t),d=i.get(e);if(h&&d)return h==e&&d==t;var A=!0;i.set(t,e),i.set(e,t);for(var l=s;++a<c;){var v=t[f=u[a]],p=e[f];if(r)var g=s?r(p,v,f,e,t,i):r(v,p,f,t,e,i);if(!(void 0===g?v===p||o(v,p,n,r,i):g)){A=!1;break}l||(l="constructor"==f)}if(A&&!l){var j=t.constructor,y=e.constructor;j==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof j&&j instanceof j&&"function"==typeof y&&y instanceof y||(A=!1)}return i.delete(t),i.delete(e),A};var g=n(9779),j=n(2049),y=n(9912),m=n(3858),w="[object Arguments]",C="[object Array]",O="[object Object]",E=Object.prototype.hasOwnProperty;const L=function(t,e,n,o,i,s){var c=(0,j.A)(t),a=(0,j.A)(e),f=c?C:(0,g.A)(t),h=a?C:(0,g.A)(e),d=(f=f==w?O:f)==O,A=(h=h==w?O:h)==O,l=f==h;if(l&&(0,y.A)(t)){if(!(0,y.A)(e))return!1;c=!0,d=!1}if(l&&!d)return s||(s=new r.A),c||(0,m.A)(t)?u(t,e,n,o,i,s):v(t,e,f,n,o,i,s);if(!(1&n)){var b=d&&E.call(t,"__wrapped__"),_=A&&E.call(e,"__wrapped__");if(b||_){var L=b?t.value():t,N=_?e.value():e;return s||(s=new r.A),i(L,N,n,o,s)}}return!!l&&(s||(s=new r.A),p(t,e,n,o,i,s))};var N=n(3098);const D=function t(e,n,r,o,i){return e===n||(null==e||null==n||!(0,N.A)(e)&&!(0,N.A)(n)?e!=e&&n!=n:L(e,n,r,o,t,i))};const S=function(t,e,n,o){var i=n.length,s=i,u=!o;if(null==t)return!s;for(t=Object(t);i--;){var c=n[i];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<s;){var a=(c=n[i])[0],f=t[a],h=c[1];if(u&&c[2]){if(void 0===f&&!(a in t))return!1}else{var d=new r.A;if(o)var A=o(f,h,a,t,e,d);if(!(void 0===A?D(h,f,3,o,d):A))return!1}}return!0};var F=n(3149);const P=function(t){return t==t&&!(0,F.A)(t)};var x=n(7422);const M=function(t){for(var e=(0,x.A)(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,P(o)]}return e};const k=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}};const I=function(t){var e=M(t);return 1==e.length&&e[0][2]?k(e[0][0],e[0][1]):function(n){return n===t||S(n,t,e)}};var U=n(6318);const z=function(t,e,n){var r=null==t?void 0:(0,U.A)(t,e);return void 0===r?n:r};var B=n(9188),R=n(6586),$=n(901);const G=function(t,e){return(0,R.A)(t)&&P(e)?k((0,$.A)(t),e):function(n){var r=z(n,t);return void 0===r&&r===e?(0,B.A)(n,t):D(e,r,3)}};var T=n(9008),V=n(805);const W=function(t){return function(e){return(0,U.A)(e,t)}};const q=function(t){return(0,R.A)(t)?(0,V.A)((0,$.A)(t)):W(t)};const H=function(t){return"function"==typeof t?t:null==t?T.A:"object"==typeof t?(0,j.A)(t)?G(t[0],t[1]):I(t):q(t)}},805:(t,e,n)=>{n.d(e,{A:()=>r});const r=function(t){return function(e){return null==e?void 0:e[t]}}},4099:(t,e,n)=>{n.d(e,{A:()=>r});const r=function(t,e){return t.has(e)}},9922:(t,e,n)=>{n.d(e,{A:()=>o});var r=n(9008);const o=function(t){return"function"==typeof t?t:r.A}},7819:(t,e,n)=>{n.d(e,{A:()=>f});var r=n(2049),o=n(6586),i=n(6632);var s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g;const c=function(t){var e=(0,i.A)(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(s,(function(t,n,r,o){e.push(r?o.replace(u,"$1"):n||t)})),e}));var a=n(8894);const f=function(t,e){return(0,r.A)(t)?t:(0,o.A)(t,e)?[t]:c((0,a.A)(t))}},9042:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(3831),o=n(4792),i=n(7422);const s=function(t){return(0,r.A)(t,i.A,o.A)}},4792:(t,e,n)=>{n.d(e,{A:()=>u});var r=n(2634),o=n(3153),i=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;const u=s?function(t){return null==t?[]:(t=Object(t),(0,r.A)(s(t),(function(e){return i.call(t,e)})))}:o.A},5054:(t,e,n)=>{n.d(e,{A:()=>a});var r=n(7819),o=n(2274),i=n(2049),s=n(5353),u=n(5254),c=n(901);const a=function(t,e,n){for(var a=-1,f=(e=(0,r.A)(e,t)).length,h=!1;++a<f;){var d=(0,c.A)(e[a]);if(!(h=null!=t&&n(t,d)))break;t=t[d]}return h||++a!=f?h:!!(f=null==t?0:t.length)&&(0,u.A)(f)&&(0,s.A)(d,f)&&((0,i.A)(t)||(0,o.A)(t))}},6586:(t,e,n)=>{n.d(e,{A:()=>u});var r=n(2049),o=n(1882),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;const u=function(t,e){if((0,r.A)(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!(0,o.A)(t))||(s.test(t)||!i.test(t)||null!=e&&t in Object(e))}},9959:(t,e,n)=>{n.d(e,{A:()=>r});const r=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},901:(t,e,n)=>{n.d(e,{A:()=>o});var r=n(1882);const o=function(t){if("string"==typeof t||(0,r.A)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},1662:(t,e,n)=>{n.d(e,{A:()=>c});var r=n(2634),o=n(6240);const i=function(t,e){var n=[];return(0,o.A)(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n};var s=n(9574),u=n(2049);const c=function(t,e){return((0,u.A)(t)?r.A:i)(t,(0,s.A)(e,3))}},8058:(t,e,n)=>{n.d(e,{A:()=>u});var r=n(2641),o=n(6240),i=n(9922),s=n(2049);const u=function(t,e){return((0,s.A)(t)?r.A:o.A)(t,(0,i.A)(e))}},8585:(t,e,n)=>{n.d(e,{A:()=>s});var r=Object.prototype.hasOwnProperty;const o=function(t,e){return null!=t&&r.call(t,e)};var i=n(5054);const s=function(t,e){return null!=t&&(0,i.A)(t,e,o)}},9188:(t,e,n)=>{n.d(e,{A:()=>i});const r=function(t,e){return null!=t&&e in Object(t)};var o=n(5054);const i=function(t,e){return null!=t&&(0,o.A)(t,e,r)}},1882:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(8496),o=n(3098);const i=function(t){return"symbol"==typeof t||(0,o.A)(t)&&"[object Symbol]"==(0,r.A)(t)}},9592:(t,e,n)=>{n.d(e,{A:()=>r});const r=function(t){return void 0===t}},7422:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(3607),o=n(1852),i=n(8446);const s=function(t){return(0,i.A)(t)?(0,r.A)(t):(0,o.A)(t)}},9463:(t,e,n)=>{n.d(e,{A:()=>c});const r=function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n};var o=n(6240),i=n(9574);const s=function(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n};var u=n(2049);const c=function(t,e,n){var c=(0,u.A)(t)?r:s,a=arguments.length<3;return c(t,(0,i.A)(e,4),n,a,o.A)}},3153:(t,e,n)=>{n.d(e,{A:()=>r});const r=function(){return[]}},8894:(t,e,n)=>{n.d(e,{A:()=>f});var r=n(241),o=n(5572),i=n(2049),s=n(1882),u=r.A?r.A.prototype:void 0,c=u?u.toString:void 0;const a=function t(e){if("string"==typeof e)return e;if((0,i.A)(e))return(0,o.A)(e,t)+"";if((0,s.A)(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n};const f=function(t){return null==t?"":a(t)}},8207:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(5572);const o=function(t,e){return(0,r.A)(e,(function(e){return t[e]}))};var i=n(7422);const s=function(t){return null==t?[]:o(t,(0,i.A)(t))}}}]); \ No newline at end of file diff --git a/assets/js/df9ca9a0.40b4d145.js b/assets/js/df9ca9a0.40b4d145.js new file mode 100644 index 00000000..0c8cf363 --- /dev/null +++ b/assets/js/df9ca9a0.40b4d145.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[1252],{9765:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>o,toc:()=>d});var r=n(4848),i=n(8453);const t={sidebar_position:2},a="Data sources",o={id:"about/usage/data-source",title:"Data sources",description:"Tagreader supports connecting to PI and IP.21 servers using a Web API interfaces. When calling certain",source:"@site/docs/about/usage/data-source.md",sourceDirName:"about/usage",slug:"/about/usage/data-source",permalink:"/tagreader-python/docs/about/usage/data-source",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/about/usage/data-source.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"about",previous:{title:"Basic usage",permalink:"/tagreader-python/docs/about/usage/basic-usage"},next:{title:"Fetching metadata",permalink:"/tagreader-python/docs/about/usage/fetching-metadata"}},c={},d=[{value:"Listing available data sources",id:"listing-available-data-sources",level:2}];function l(e){const s={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"data-sources",children:"Data sources"})}),"\n",(0,r.jsxs)(s.p,{children:["Tagreader supports connecting to PI and IP.21 servers using a Web API interfaces. When calling certain\nmethods, the user will need to tell tagreader which system and which connection method to use. This input argument is\ncalled ",(0,r.jsx)(s.code,{children:"imstype"})," , and can be one of the following case-insensitive strings:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"piwebapi"})," : For connecting to OSISoft PI Web API"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"aspenone"})," : For connecting to AspenTech Process Data REST Web API"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"listing-available-data-sources",children:"Listing available data sources"}),"\n",(0,r.jsxs)(s.p,{children:["The method ",(0,r.jsx)(s.code,{children:"tagreader.list_sources()"})," can query for available PI and IP.21 servers available. Input arguments:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"imstype"})," : The name of the IMS type to query. Valid values: ",(0,r.jsx)(s.code,{children:"piwebapi"})," and ",(0,r.jsx)(s.code,{children:"aspenone"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["The following input arguments are only relevant when calling ",(0,r.jsx)(s.code,{children:"list_sources()"})," with a Web API ",(0,r.jsx)(s.code,{children:"imstype"})," ( ",(0,r.jsx)(s.code,{children:"piwebapi"})," or\n",(0,r.jsx)(s.code,{children:"aspenone"})," ):"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"url"})," (optional): Path to server root, e.g. ",(0,r.jsxs)(s.em,{children:['"',(0,r.jsx)(s.a,{href:"https://aspenone/ProcessData/AtProcessDataREST.dll",children:"https://aspenone/ProcessData/AtProcessDataREST.dll"}),'"']})," or\n",(0,r.jsxs)(s.em,{children:['"',(0,r.jsx)(s.a,{href:"https://piwebapi/piwebapi",children:"https://piwebapi/piwebapi"}),'"']}),". ",(0,r.jsx)(s.strong,{children:"Default"}),": Path to Equinor server corresponding to selected ",(0,r.jsx)(s.code,{children:"imstype"})," if"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"imstype"})," is ",(0,r.jsx)(s.code,{children:"piwebapi"})," or ",(0,r.jsx)(s.code,{children:"aspenone"})," ."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"verifySSL"})," (optional): Whether to verify SSL certificate sent from server. ",(0,r.jsx)(s.strong,{children:"Default"}),": ",(0,r.jsx)(s.code,{children:"True"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"auth"})," (optional): Auth object to pass to the server for authentication. ",(0,r.jsx)(s.strong,{children:"Default"}),": Kerberos-based auth objects\nthat work with Equinor servers. If not connecting to an Equinor server, you may have to create your own auth."]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["When called with ",(0,r.jsx)(s.code,{children:"imstype"})," set to ",(0,r.jsx)(s.code,{children:"pi"})," , ",(0,r.jsx)(s.code,{children:"list_sources()"})," will search the registry at\n",(0,r.jsx)(s.em,{children:"HKEY_CURRENT_USER\\Software\\AspenTech\\ADSA\\Caches\\AspenADSA{username}"})," for available PI servers. Similarly,\nif called with ",(0,r.jsx)(s.code,{children:"imstype"})," set to ",(0,r.jsx)(s.code,{children:"ip21"})," , ",(0,r.jsx)(s.em,{children:"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\PISystem\\PI-SDK"})," will be searched\nfor available IP.21 servers. Servers found through the registry are normally servers to which the user is authorized,\nand does not necessarily include all available data sources in the organization."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Example:"})}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:'from tagreader import list_sources\nlist_sources("ip21")\nlist_sources("piwebapi")\n'})}),"\n",(0,r.jsxs)(s.p,{children:["When called with ",(0,r.jsx)(s.code,{children:"imstype"})," set to ",(0,r.jsx)(s.code,{children:"piwebapi"})," or ",(0,r.jsx)(s.code,{children:"aspenone"})," , ",(0,r.jsx)(s.code,{children:"list_sources()"})," will connect to the web server URL and\nquery for the available list of data sources. This list is normally the complete set of data sources available on the\nserver, and does not indicate whether the user is authorized to query the source or not."]}),"\n",(0,r.jsxs)(s.p,{children:["When querying Equinor Web API for data sources, ",(0,r.jsx)(s.code,{children:"list_sources()"})," should require no input argument except\n",(0,r.jsx)(s.code,{children:'imstype="piwebapi"'})," or ",(0,r.jsx)(s.code,{children:'imstype="aspenone"'}),". For non-Equinor servers, ",(0,r.jsx)(s.code,{children:"url"})," will need to be specified, as may ",(0,r.jsx)(s.code,{children:"auth"}),"\nand ",(0,r.jsx)(s.code,{children:"verifySSL"})," ."]})]})}function h(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}}}]); \ No newline at end of file diff --git a/assets/js/ebd56198.35101d17.js b/assets/js/ebd56198.35101d17.js new file mode 100644 index 00000000..c0bcb5f8 --- /dev/null +++ b/assets/js/ebd56198.35101d17.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[2567],{3993:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Usage","description":"Examples of tagreader usage.","slug":"/category/usage","permalink":"/tagreader-python/docs/category/usage","sidebar":"about","navigation":{"previous":{"title":"Introduction","permalink":"/tagreader-python/docs/about/introduction"},"next":{"title":"Basic usage","permalink":"/tagreader-python/docs/about/usage/basic-usage"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/f146017a.4804e705.js b/assets/js/f146017a.4804e705.js new file mode 100644 index 00000000..6bee46aa --- /dev/null +++ b/assets/js/f146017a.4804e705.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[3347],{2279:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var i=n(4848),o=n(8453);const s={title:"Documentation",sidebar_position:5},a="Documentation",r={id:"contribute/documentation",title:"Documentation",description:"This site was generated from the contents of your documentation folder using Docusaurus, and we host it on GitHub Pages.",source:"@site/docs/contribute/documentation.md",sourceDirName:"contribute",slug:"/contribute/documentation",permalink:"/tagreader-python/docs/contribute/documentation",draft:!1,unlisted:!1,editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/docs/contribute/documentation.md",tags:[],version:"current",sidebarPosition:5,frontMatter:{title:"Documentation",sidebar_position:5},sidebar:"contribute",previous:{title:"Upgrading",permalink:"/tagreader-python/docs/contribute/development-guide/upgrading"}},c={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Publishing",id:"publishing",level:2},{value:"Initial settings",id:"initial-settings",level:2},{value:"Assets",id:"assets",level:2}];function u(e){const t={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"documentation",children:"Documentation"})}),"\n",(0,i.jsxs)(t.p,{children:["This site was generated from the contents of your ",(0,i.jsx)(t.code,{children:"documentation"})," folder using ",(0,i.jsx)(t.a,{href:"https://docusaurus.io/",children:"Docusaurus,"})," and we host it on GitHub Pages."]}),"\n",(0,i.jsx)(t.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,i.jsx)(t.p,{children:"From Docusaurus own documentation:"}),"\n",(0,i.jsxs)(t.blockquote,{children:["\n",(0,i.jsx)(t.p,{children:"Docusaurus is a static-site generator. It builds a single-page application with fast client-side navigation, leveraging the full power of React to make your site interactive. It provides out-of-the-box documentation features but can be used to create any kind of site (personal website, product, blog, marketing landing pages, etc)."}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["While Docusaurus is rich on features, we use it mostly to host markdown pages. The main bulk of the documentation is located in ",(0,i.jsx)(t.code,{children:"documentation/docs"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"publishing",children:"Publishing"}),"\n",(0,i.jsxs)(t.p,{children:["We are using the GitHub Action ",(0,i.jsx)(t.a,{href:"https://github.com/equinor/awt/blob/main/.github/workflows/publish-docs.yaml",children:(0,i.jsx)(t.code,{children:"publish-docs.yaml"})})," to build and publish the documentation website. This action is run every time someone pushes to the ",(0,i.jsx)(t.code,{children:"main"})," branch."]}),"\n",(0,i.jsxs)(t.p,{children:["This will check out the code, download the changelog from the ",(0,i.jsx)(t.code,{children:"generate-changelog.yaml"})," action, and build the documentation. Then it will deploy the documentation (placed in the documentation/build/ folder) to GitHub Pages."]}),"\n",(0,i.jsx)(t.h2,{id:"initial-settings",children:"Initial settings"}),"\n",(0,i.jsx)(t.p,{children:"When deployed to GitHub Pages, you do need to configure your site under the settings. Pick the gh-pages branch and select either a private url or a public one. It will show you the site\u2019s url, which should now contain your generated documentation site."}),"\n",(0,i.jsx)(t.h2,{id:"assets",children:"Assets"}),"\n",(0,i.jsxs)(t.p,{children:["All assets files are places under ",(0,i.jsx)(t.code,{children:"documentation/static"})]})]})}function l(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}}}]); \ No newline at end of file diff --git a/assets/js/main.099aabdf.js b/assets/js/main.099aabdf.js new file mode 100644 index 00000000..687f4437 --- /dev/null +++ b/assets/js/main.099aabdf.js @@ -0,0 +1,2 @@ +/*! For license information please see main.099aabdf.js.LICENSE.txt */ +(self.webpackChunkdocumentation=self.webpackChunkdocumentation||[]).push([[8792],{8328:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});n(6540);var r=n(3259),o=n.n(r),a=n(4054);const i={"0bdfdd3e":[()=>n.e(6631).then(n.t.bind(n,6859,19)),"@generated/docusaurus-plugin-content-docs/default/p/tagreader-python-docs-category-developer-guide-fd8.json",6859],"11859ee7":[()=>Promise.all([n.e(2076),n.e(9538)]).then(n.bind(n,6477)),"@site/docs/contribute/development-guide/publishing.md",6477],"14eb3368":[()=>Promise.all([n.e(1869),n.e(6969)]).then(n.bind(n,7247)),"@theme/DocCategoryGeneratedIndexPage",7247],17896441:[()=>Promise.all([n.e(1869),n.e(2076),n.e(8401)]).then(n.bind(n,8038)),"@theme/DocItem",8038],"1df93b7f":[()=>n.e(4583).then(n.bind(n,6866)),"@site/src/pages/index.tsx",6866],"2662fbc1":[()=>n.e(1847).then(n.t.bind(n,9543,19)),"@generated/docusaurus-plugin-content-docs/default/p/tagreader-python-docs-83f.json",9543],"3a55b9ff":[()=>Promise.all([n.e(2076),n.e(9742)]).then(n.bind(n,4477)),"@site/docs/about/usage/fetching-metadata.md",4477],"3b435a04":[()=>Promise.all([n.e(2076),n.e(7405)]).then(n.bind(n,5226)),"@site/docs/contribute/overview.md",5226],"4f9ad5cc":[()=>Promise.all([n.e(2076),n.e(4828)]).then(n.bind(n,2519)),"@site/docs/about/usage/basic-usage.md",2519],"51515e66":[()=>Promise.all([n.e(2076),n.e(7505)]).then(n.bind(n,3491)),"@site/docs/about/introduction.md",3491],"59f922ef":[()=>Promise.all([n.e(2076),n.e(3887)]).then(n.bind(n,9773)),"@site/docs/contribute/development-guide/upgrading.md",9773],"5e95c892":[()=>n.e(9647).then(n.bind(n,7121)),"@theme/DocsRoot",7121],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"67db73f0":[()=>Promise.all([n.e(1869),n.e(2076),n.e(8356)]).then(n.bind(n,7729)),"@site/docs/contribute/development-guide/setup.md",7729],"69795df0":[()=>Promise.all([n.e(2076),n.e(785)]).then(n.bind(n,6048)),"@site/docs/contribute/ground-rules.md",6048],"7438851d":[()=>Promise.all([n.e(2076),n.e(6233)]).then(n.bind(n,2958)),"@site/docs/about/usage/caching.md",2958],"7dbb84ad":[()=>Promise.all([n.e(2076),n.e(4825)]).then(n.bind(n,4006)),"@site/docs/contribute/development-guide/testing.md",4006],"980a27ad":[()=>Promise.all([n.e(2076),n.e(9303)]).then(n.bind(n,4309)),"@site/docs/contribute/how-to-start-contributing.md",4309],a7456010:[()=>n.e(1235).then(n.t.bind(n,8552,19)),"@generated/docusaurus-plugin-content-pages/default/__plugin.json",8552],a7bd4aaa:[()=>n.e(7098).then(n.bind(n,1723)),"@theme/DocVersionRoot",1723],a94703ab:[()=>Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,1377)),"@theme/DocRoot",1377],aba21aa0:[()=>n.e(5742).then(n.t.bind(n,7093,19)),"@generated/docusaurus-plugin-content-docs/default/__plugin.json",7093],b0ef962e:[()=>Promise.all([n.e(2076),n.e(4930)]).then(n.bind(n,4617)),"@site/docs/about/usage/time-zone.md",4617],df9ca9a0:[()=>Promise.all([n.e(2076),n.e(1252)]).then(n.bind(n,9765)),"@site/docs/about/usage/data-source.md",9765],ebd56198:[()=>n.e(2567).then(n.t.bind(n,3993,19)),"@generated/docusaurus-plugin-content-docs/default/p/tagreader-python-docs-category-usage-1c0.json",3993],f146017a:[()=>Promise.all([n.e(2076),n.e(3347)]).then(n.bind(n,2279)),"@site/docs/contribute/documentation.md",2279]};var l=n(4848);function s(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,l.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,l.jsx)("p",{children:String(t)}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,l.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,l.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,l.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var u=n(6921),c=n(3102);function d(e,t){if("*"===e)return o()({loading:s,loader:()=>n.e(2237).then(n.bind(n,2237)),modules:["@theme/NotFound"],webpack:()=>[2237],render(e,t){const n=e.default;return(0,l.jsx)(c.W,{value:{plugin:{name:"native",id:"default"}},children:(0,l.jsx)(n,{...t})})}});const r=a[`${e}-${t}`],d={},p=[],f=[],m=(0,u.A)(r);return Object.entries(m).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],p.push(r[1]),f.push(r[2]))})),o().Map({loading:s,loader:d,modules:p,webpack:()=>f,render(t,n){const o=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let i=o;const l=n.split(".");l.slice(0,-1).forEach((e=>{i=i[e]})),i[l[l.length-1]]=a}));const a=o.__comp;delete o.__comp;const i=o.__context;delete o.__context;const s=o.__props;return delete o.__props,(0,l.jsx)(c.W,{value:i,children:(0,l.jsx)(a,{...o,...s,...n})})}})}const p=[{path:"/tagreader-python/docs",component:d("/tagreader-python/docs","7f5"),routes:[{path:"/tagreader-python/docs",component:d("/tagreader-python/docs","30d"),routes:[{path:"/tagreader-python/docs",component:d("/tagreader-python/docs","697"),routes:[{path:"/tagreader-python/docs/about/introduction",component:d("/tagreader-python/docs/about/introduction","141"),exact:!0,sidebar:"about"},{path:"/tagreader-python/docs/about/usage/basic-usage",component:d("/tagreader-python/docs/about/usage/basic-usage","f74"),exact:!0,sidebar:"about"},{path:"/tagreader-python/docs/about/usage/caching",component:d("/tagreader-python/docs/about/usage/caching","577"),exact:!0,sidebar:"about"},{path:"/tagreader-python/docs/about/usage/data-source",component:d("/tagreader-python/docs/about/usage/data-source","f77"),exact:!0,sidebar:"about"},{path:"/tagreader-python/docs/about/usage/fetching-metadata",component:d("/tagreader-python/docs/about/usage/fetching-metadata","eaf"),exact:!0,sidebar:"about"},{path:"/tagreader-python/docs/about/usage/time-zone",component:d("/tagreader-python/docs/about/usage/time-zone","04b"),exact:!0,sidebar:"about"},{path:"/tagreader-python/docs/category/developer-guide",component:d("/tagreader-python/docs/category/developer-guide","101"),exact:!0,sidebar:"contribute"},{path:"/tagreader-python/docs/category/usage",component:d("/tagreader-python/docs/category/usage","a67"),exact:!0,sidebar:"about"},{path:"/tagreader-python/docs/contribute/development-guide/publishing",component:d("/tagreader-python/docs/contribute/development-guide/publishing","567"),exact:!0,sidebar:"contribute"},{path:"/tagreader-python/docs/contribute/development-guide/setup",component:d("/tagreader-python/docs/contribute/development-guide/setup","71f"),exact:!0,sidebar:"contribute"},{path:"/tagreader-python/docs/contribute/development-guide/testing",component:d("/tagreader-python/docs/contribute/development-guide/testing","e80"),exact:!0,sidebar:"contribute"},{path:"/tagreader-python/docs/contribute/development-guide/upgrading",component:d("/tagreader-python/docs/contribute/development-guide/upgrading","9b9"),exact:!0,sidebar:"contribute"},{path:"/tagreader-python/docs/contribute/documentation",component:d("/tagreader-python/docs/contribute/documentation","f6c"),exact:!0,sidebar:"contribute"},{path:"/tagreader-python/docs/contribute/ground-rules",component:d("/tagreader-python/docs/contribute/ground-rules","30b"),exact:!0,sidebar:"contribute"},{path:"/tagreader-python/docs/contribute/how-to-start-contributing",component:d("/tagreader-python/docs/contribute/how-to-start-contributing","6b1"),exact:!0,sidebar:"contribute"},{path:"/tagreader-python/docs/contribute/overview",component:d("/tagreader-python/docs/contribute/overview","e02"),exact:!0,sidebar:"contribute"}]}]}]},{path:"/tagreader-python/",component:d("/tagreader-python/","19d"),exact:!0},{path:"*",component:d("*")}]},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>a,x:()=>i});var r=n(6540),o=n(4848);const a=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,o.jsx)(a.Provider,{value:n,children:t})}},7815:(e,t,n)=>{"use strict";var r=n(6540),o=n(5338),a=n(545),i=n(4625),l=n(4784),s=n(8193);const u=[n(119),n(6134),n(6294),n(1043)];var c=n(8328),d=n(6347),p=n(2831),f=n(4848);function m(e){let{children:t}=e;return(0,f.jsx)(f.Fragment,{children:t})}var g=n(5260),h=n(4586),y=n(6025),b=n(6342),v=n(1003),w=n(2131),k=n(4090);const x="default";var S=n(440),E=n(1463);function _(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,h.A)(),r=(0,w.o)(),o=n[e].htmlLang,a=e=>e.replace("-","_");return(0,f.jsxs)(g.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:a(o)}),Object.values(n).filter((e=>o!==e.htmlLang)).map((e=>(0,f.jsx)("meta",{property:"og:locale:alternate",content:a(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function C(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,h.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,h.A)(),{pathname:r}=(0,d.zy)();return e+(0,S.Ks)((0,y.Ay)(r),{trailingSlash:n,baseUrl:t})}(),o=t?`${n}${t}`:r;return(0,f.jsxs)(g.A,{children:[(0,f.jsx)("meta",{property:"og:url",content:o}),(0,f.jsx)("link",{rel:"canonical",href:o})]})}function A(){const{i18n:{currentLocale:e}}=(0,h.A)(),{metadata:t,image:n}=(0,b.p)();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(g.A,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{className:k.w})]}),n&&(0,f.jsx)(v.be,{image:n}),(0,f.jsx)(C,{}),(0,f.jsx)(_,{}),(0,f.jsx)(E.A,{tag:x,locale:e}),(0,f.jsx)(g.A,{children:t.map(((e,t)=>(0,f.jsx)("meta",{...e},t)))})]})}const T=new Map;var j=n(6125),P=n(6988),N=n(205);function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const o=u.map((t=>{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>o.forEach((e=>e?.()))}const L=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,N.A)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,o=t.hash===n.hash,a=t.search===n.search;if(r&&o&&!a)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),R("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function O(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,p.u)(c.A,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class D extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=s.A.canUseDOM?R("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=R("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),O(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,f.jsx)(L,{previousLocation:this.previousLocation,location:t,children:(0,f.jsx)(d.qh,{location:t,render:()=>e})})}}const I=D,F="__docusaurus-base-url-issue-banner-container",M="__docusaurus-base-url-issue-banner",z="__docusaurus-base-url-issue-banner-suggestion-container";function B(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '${F}';\n var bannerHtml = ${JSON.stringify(function(e){return`\n<div id="${M}" style="border: thick solid red; background-color: rgb(255, 230, 179); margin: 20px; padding: 20px; font-size: 20px;">\n <p style="font-weight: bold; font-size: 30px;">Your Docusaurus site did not load properly.</p>\n <p>A very common reason is a wrong site <a href="https://docusaurus.io/docs/docusaurus.config.js/#baseUrl" style="font-weight: bold;">baseUrl configuration</a>.</p>\n <p>Current configured baseUrl = <span style="font-weight: bold; color: red;">${e}</span> ${"/"===e?" (default value)":""}</p>\n <p>We suggest trying baseUrl = <span id="${z}" style="font-weight: bold; color: green;"></span></p>\n</div>\n`}(e)).replace(/</g,"\\<")};\n bannerContainer.innerHTML = bannerHtml;\n document.body.prepend(bannerContainer);\n var suggestionContainer = document.getElementById('${z}');\n var actualHomePagePath = window.location.pathname;\n var suggestedBaseUrl = actualHomePagePath.substr(-1) === '/'\n ? actualHomePagePath\n : actualHomePagePath + '/';\n suggestionContainer.innerHTML = suggestedBaseUrl;\n}\n`}function $(){const{siteConfig:{baseUrl:e}}=(0,h.A)();return(0,f.jsx)(f.Fragment,{children:!s.A.canUseDOM&&(0,f.jsx)(g.A,{children:(0,f.jsx)("script",{children:B(e)})})})}function U(){const{siteConfig:{baseUrl:e,baseUrlIssueBanner:t}}=(0,h.A)(),{pathname:n}=(0,d.zy)();return t&&n===e?(0,f.jsx)($,{}):null}function q(){const{siteConfig:{favicon:e,title:t,noIndex:n},i18n:{currentLocale:r,localeConfigs:o}}=(0,h.A)(),a=(0,y.Ay)(e),{htmlLang:i,direction:l}=o[r];return(0,f.jsxs)(g.A,{children:[(0,f.jsx)("html",{lang:i,dir:l}),(0,f.jsx)("title",{children:t}),(0,f.jsx)("meta",{property:"og:title",content:t}),(0,f.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),n&&(0,f.jsx)("meta",{name:"robots",content:"noindex, nofollow"}),e&&(0,f.jsx)("link",{rel:"icon",href:a})]})}var H=n(7489),G=n(2303);function V(){const e=(0,G.A)();return(0,f.jsx)(g.A,{children:(0,f.jsx)("html",{"data-has-hydrated":e})})}const W=(0,p.v)(c.A);function Q(){const e=function(e){if(T.has(e.pathname))return{...e,pathname:T.get(e.pathname)};if((0,p.u)(c.A,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return T.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return T.set(e.pathname,t),{...e,pathname:t}}((0,d.zy)());return(0,f.jsx)(I,{location:e,children:W})}function K(){return(0,f.jsx)(H.A,{children:(0,f.jsx)(P.l,{children:(0,f.jsxs)(j.x,{children:[(0,f.jsxs)(m,{children:[(0,f.jsx)(q,{}),(0,f.jsx)(A,{}),(0,f.jsx)(U,{}),(0,f.jsx)(Q,{})]}),(0,f.jsx)(V,{})]})})})}var Y=n(4054);const Z=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const o=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;o?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var X=n(6921);const J=new Set,ee=new Set,te=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ne={prefetch:e=>{if(!(e=>!te()&&!ee.has(e)&&!J.has(e))(e))return!1;J.add(e);const t=(0,p.u)(c.A,e).flatMap((e=>{return t=e.route.path,Object.entries(Y).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,X.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?Z(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!te()&&!ee.has(e))(e)&&(ee.add(e),O(e))},re=Object.freeze(ne);function oe(e){let{children:t}=e;return"hash"===l.default.future.experimental_router?(0,f.jsx)(i.I9,{children:t}):(0,f.jsx)(i.Kd,{children:t})}const ae=Boolean(!0);if(s.A.canUseDOM){window.docusaurus=re;const e=document.getElementById("__docusaurus"),t=(0,f.jsx)(a.vd,{children:(0,f.jsx)(oe,{children:(0,f.jsx)(K,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},i=()=>{if(window.docusaurusRoot)window.docusaurusRoot.render(t);else if(ae)window.docusaurusRoot=o.hydrateRoot(e,t,{onRecoverableError:n});else{const r=o.createRoot(e,{onRecoverableError:n});r.render(t),window.docusaurusRoot=r}};O(window.location.pathname).then((()=>{(0,r.startTransition)(i)}))}},6988:(e,t,n)=>{"use strict";n.d(t,{o:()=>d,l:()=>p});var r=n(6540),o=n(4784);const a=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/tagreader-python/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/tagreader-python/docs","mainDocId":"about/introduction","docs":[{"id":"about/introduction","path":"/tagreader-python/docs/about/introduction","sidebar":"about"},{"id":"about/usage/basic-usage","path":"/tagreader-python/docs/about/usage/basic-usage","sidebar":"about"},{"id":"about/usage/caching","path":"/tagreader-python/docs/about/usage/caching","sidebar":"about"},{"id":"about/usage/data-source","path":"/tagreader-python/docs/about/usage/data-source","sidebar":"about"},{"id":"about/usage/fetching-metadata","path":"/tagreader-python/docs/about/usage/fetching-metadata","sidebar":"about"},{"id":"about/usage/time-zone","path":"/tagreader-python/docs/about/usage/time-zone","sidebar":"about"},{"id":"contribute/development-guide/publishing","path":"/tagreader-python/docs/contribute/development-guide/publishing","sidebar":"contribute"},{"id":"contribute/development-guide/setup","path":"/tagreader-python/docs/contribute/development-guide/setup","sidebar":"contribute"},{"id":"contribute/development-guide/testing","path":"/tagreader-python/docs/contribute/development-guide/testing","sidebar":"contribute"},{"id":"contribute/development-guide/upgrading","path":"/tagreader-python/docs/contribute/development-guide/upgrading","sidebar":"contribute"},{"id":"contribute/documentation","path":"/tagreader-python/docs/contribute/documentation","sidebar":"contribute"},{"id":"contribute/ground-rules","path":"/tagreader-python/docs/contribute/ground-rules","sidebar":"contribute"},{"id":"contribute/how-to-start-contributing","path":"/tagreader-python/docs/contribute/how-to-start-contributing","sidebar":"contribute"},{"id":"contribute/overview","path":"/tagreader-python/docs/contribute/overview","sidebar":"contribute"},{"id":"/category/usage","path":"/tagreader-python/docs/category/usage","sidebar":"about"},{"id":"/category/developer-guide","path":"/tagreader-python/docs/category/developer-guide","sidebar":"contribute"}],"draftIds":[],"sidebars":{"about":{"link":{"path":"/tagreader-python/docs/about/introduction","label":"about/introduction"}},"contribute":{"link":{"path":"/tagreader-python/docs/contribute/overview","label":"contribute/overview"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"3.5.2","siteVersion":"0.1.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.5.2"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.5.2"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.5.2"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.5.2"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"3.5.2"}}}');var u=n(4848);const c={siteConfig:o.default,siteMetadata:s,globalData:a,i18n:i,codeTranslations:l},d=r.createContext(c);function p(e){let{children:t}=e;return(0,u.jsx)(d.Provider,{value:c,children:t})}},7489:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(6540),o=n(8193),a=n(5260),i=n(440),l=n(8244),s=n(3102),u=n(4848);function c(e){let{error:t,tryAgain:n}=e;return(0,u.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,u.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,u.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,u.jsx)(d,{error:t})]})}function d(e){let{error:t}=e;const n=(0,i.rA)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,u.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function p(e){let{children:t}=e;return(0,u.jsx)(s.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function f(e){let{error:t,tryAgain:n}=e;return(0,u.jsx)(p,{children:(0,u.jsxs)(g,{fallback:()=>(0,u.jsx)(c,{error:t,tryAgain:n}),children:[(0,u.jsx)(a.A,{children:(0,u.jsx)("title",{children:"Page Error"})}),(0,u.jsx)(l.A,{children:(0,u.jsx)(c,{error:t,tryAgain:n})})]})})}const m=e=>(0,u.jsx)(f,{...e});class g extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){o.A.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??m)(e)}return e??null}}},8193:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,o={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);var r=n(545),o=n(4848);function a(e){return(0,o.jsx)(r.mg,{...e})}},8774:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(6540),o=n(4625),a=n(440),i=n(4586),l=n(6654),s=n(8193),u=n(3427),c=n(6025),d=n(4848);function p(e,t){let{isNavLink:n,to:p,href:f,activeClassName:m,isActive:g,"data-noBrokenLinkCheck":h,autoAddBaseUrl:y=!0,...b}=e;const{siteConfig:v}=(0,i.A)(),{trailingSlash:w,baseUrl:k}=v,x=v.future.experimental_router,{withBaseUrl:S}=(0,c.hH)(),E=(0,u.A)(),_=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>_.current));const C=p||f;const A=(0,l.A)(C),T=C?.replace("pathname://","");let j=void 0!==T?(P=T,y&&(e=>e.startsWith("/"))(P)?S(P):P):void 0;var P;"hash"===x&&j?.startsWith("./")&&(j=j?.slice(1)),j&&A&&(j=(0,a.Ks)(j,{trailingSlash:w,baseUrl:k}));const N=(0,r.useRef)(!1),R=n?o.k2:o.N_,L=s.A.canUseIntersectionObserver,O=(0,r.useRef)(),D=()=>{N.current||null==j||(window.docusaurus.preload(j),N.current=!0)};(0,r.useEffect)((()=>(!L&&A&&s.A.canUseDOM&&null!=j&&window.docusaurus.prefetch(j),()=>{L&&O.current&&O.current.disconnect()})),[O,j,L,A]);const I=j?.startsWith("#")??!1,F=!b.target||"_self"===b.target,M=!j||!A||!F||I&&"hash"!==x;h||!I&&M||E.collectLink(j),b.id&&E.collectAnchor(b.id);const z={};return M?(0,d.jsx)("a",{ref:_,href:j,...C&&!A&&{target:"_blank",rel:"noopener noreferrer"},...b,...z}):(0,d.jsx)(R,{...b,onMouseEnter:D,onTouchStart:D,innerRef:e=>{_.current=e,L&&e&&A&&(O.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(O.current.unobserve(e),O.current.disconnect(),null!=j&&window.docusaurus.prefetch(j))}))})),O.current.observe(e))},to:j,...n&&{isActive:g,activeClassName:m},...z})}const f=r.forwardRef(p)},1312:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,T:()=>s});var r=n(6540),o=n(4848);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(2654);function l(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function s(e,t){let{message:n,id:r}=e;return a(l({message:n,id:r}),t)}function u(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal <Translate> children",t),new Error("The Docusaurus <Translate> component only accept simple string values");const i=l({message:t,id:n});return(0,o.jsx)(o.Fragment,{children:a(i,r)})}},7065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},6654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>o,z:()=>r})},6025:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>l,hH:()=>i});var r=n(6540),o=n(4586),a=n(6654);function i(){const{siteConfig:e}=(0,o.A)(),{baseUrl:t,url:n}=e,i=e.future.experimental_router,l=(0,r.useCallback)(((e,r)=>function(e){let{siteUrl:t,baseUrl:n,url:r,options:{forcePrependBaseUrl:o=!1,absolute:i=!1}={},router:l}=e;if(!r||r.startsWith("#")||(0,a.z)(r))return r;if("hash"===l)return r.startsWith("/")?`.${r}`:`./${r}`;if(o)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;const s=r.startsWith(n)?r:n+r.replace(/^\//,"");return i?t+s:s}({siteUrl:n,baseUrl:t,url:e,options:r,router:i})),[n,t,i]);return{withBaseUrl:l}}function l(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},3427:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);n(4848);const o=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),a=()=>(0,r.useContext)(o);function i(){return a()}},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540),o=n(6988);function a(){return(0,r.useContext)(o.o)}},2303:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540),o=n(6125);function a(){return(0,r.useContext)(o.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540);const o=n(8193).A.canUseDOM?r.useLayoutEffect:r.useEffect},6921:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function o(e){const t={};return function e(n,o){Object.entries(n).forEach((n=>{let[a,i]=n;const l=o?`${o}.${a}`:a;r(i)?e(i,l):t[l]=i}))}(e),t}},3102:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>a});var r=n(6540),o=n(4848);const a=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(a),l=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,o.jsx)(a.Provider,{value:l,children:t})}},3886:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>h,g1:()=>b});var r=n(6540),o=n(4070),a=n(7065),i=n(6342),l=n(679),s=n(9532),u=n(4848);const c=e=>`docs-preferred-version-${e}`,d={save:(e,t,n)=>{(0,l.Wf)(c(e),{persistence:t}).set(n)},read:(e,t)=>(0,l.Wf)(c(e),{persistence:t}).get(),clear:(e,t)=>{(0,l.Wf)(c(e),{persistence:t}).del()}},p=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const f=r.createContext(null);function m(){const e=(0,o.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[a,l]=(0,r.useState)((()=>p(n)));(0,r.useEffect)((()=>{l(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function o(e){const t=d.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(d.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,o(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[a,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d.save(e,t,n),l((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function g(e){let{children:t}=e;const n=m();return(0,u.jsx)(f.Provider,{value:n,children:t})}function h(e){let{children:t}=e;return(0,u.jsx)(g,{children:t})}function y(){const e=(0,r.useContext)(f);if(!e)throw new s.dV("DocsPreferredVersionContextProvider");return e}function b(e){void 0===e&&(e=a.W);const t=(0,o.ht)(e),[n,i]=y(),{preferredVersionName:l}=n[e];return{preferredVersion:t.versions.find((e=>e.name===l))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}},609:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,t:()=>u});var r=n(6540),o=n(9532),a=n(4848);const i=Symbol("EmptyContext"),l=r.createContext(i);function s(e){let{children:t,name:n,items:o}=e;const i=(0,r.useMemo)((()=>n&&o?{name:n,items:o}:null),[n,o]);return(0,a.jsx)(l.Provider,{value:i,children:t})}function u(){const e=(0,r.useContext)(l);if(e===i)throw new o.dV("DocsSidebarProvider");return e}},4718:(e,t,n)=>{"use strict";n.d(t,{d1:()=>C,Nr:()=>f,w8:()=>y,$S:()=>m,cC:()=>p,B5:()=>_,Vd:()=>x,QB:()=>E,fW:()=>S,OF:()=>k,Y:()=>v});var r=n(6540),o=n(6347),a=n(2831),i=n(4070),l=n(9169);function s(e){return Array.from(new Set(e))}var u=n(3886),c=n(3025),d=n(609);function p(e){const t=(0,c.r)();if(!e)return;const n=t.docs[e];if(!n)throw new Error(`no version doc found by id=${e}`);return n}function f(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=f(t);if(e)return e}}(e):void 0:e.href}function m(){const{pathname:e}=(0,o.zy)(),t=(0,d.t)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=w({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(`${e} is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.`);return n}const g=(e,t)=>void 0!==e&&(0,l.ys)(e,t),h=(e,t)=>e.some((e=>y(e,t)));function y(e,t){return"link"===e.type?g(e.href,t):"category"===e.type&&(g(e.href,t)||h(e.items,t))}function b(e,t){switch(e.type){case"category":return y(e,t)||e.items.some((e=>b(e,t)));case"link":return!e.unlisted||y(e,t);default:return!0}}function v(e,t){return(0,r.useMemo)((()=>e.filter((e=>b(e,t)))),[e,t])}function w(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const o=[];return function e(t){for(const a of t)if("category"===a.type&&((0,l.ys)(a.href,n)||e(a.items))||"link"===a.type&&(0,l.ys)(a.href,n)){return r&&"category"!==a.type||o.unshift(a),!0}return!1}(t),o}function k(){const e=(0,d.t)(),{pathname:t}=(0,o.zy)(),n=(0,i.vT)()?.pluginData.breadcrumbs;return!1!==n&&e?w({sidebarItems:e.items,pathname:t}):null}function x(e){const{activeVersion:t}=(0,i.zK)(e),{preferredVersion:n}=(0,u.g1)(e),o=(0,i.r7)(e);return(0,r.useMemo)((()=>s([t,n,o].filter(Boolean))),[t,n,o])}function S(e,t){const n=x(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function E(e,t){const n=x(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${s(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function _(e){let{route:t}=e;const n=(0,o.zy)(),r=(0,c.r)(),i=t.routes,l=i.find((e=>(0,o.B6)(n.pathname,e)));if(!l)return null;const s=l.sidebar,u=s?r.docsSidebars[s]:void 0;return{docElement:(0,a.v)(i),sidebarName:s,sidebarItems:u}}function C(e){return e.filter((e=>!("category"===e.type||"link"===e.type)||!!f(e)))}},3025:(e,t,n)=>{"use strict";n.d(t,{n:()=>l,r:()=>s});var r=n(6540),o=n(9532),a=n(4848);const i=r.createContext(null);function l(e){let{children:t,version:n}=e;return(0,a.jsx)(i.Provider,{value:n,children:t})}function s(){const e=(0,r.useContext)(i);if(null===e)throw new o.dV("DocsVersionProvider");return e}},4070:(e,t,n)=>{"use strict";n.d(t,{zK:()=>g,vT:()=>p,Gy:()=>c,HW:()=>h,ht:()=>d,r7:()=>m,jh:()=>f});var r=n(6347),o=n(4586),a=n(7065);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,o.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const l=e=>e.versions.find((e=>e.isLast));function s(e,t){const n=function(e,t){return[...e.versions].sort(((e,t)=>e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0)).find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}(e,t),o=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:o,alternateDocVersions:o?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(o.id):{}}}const u={},c=()=>i("docusaurus-plugin-content-docs")??u,d=e=>{try{return function(e,t,n){void 0===t&&(t=a.W),void 0===n&&(n={});const r=i(e),o=r?.[t];if(!o&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return o}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":` (pluginId=${e}`),{cause:t})}};function p(e){void 0===e&&(e={});const t=c(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const o=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return a}(t,n,e)}function f(e){return d(e).versions}function m(e){const t=d(e);return l(t)}function g(e){const t=d(e),{pathname:n}=(0,r.zy)();return s(t,n)}function h(e){const t=d(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=l(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},6294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(5947),o=n.n(r);o().configure({showSpinner:!1});const a={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{o().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){o().done()}}},6134:(e,t,n)=>{"use strict";n.r(t);var r=n(1765),o=n(4784);!function(e){const{themeConfig:{prism:t}}=o.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(9700),n(8692)(`./prism-${e}`)})),delete globalThis.Prism}(r.My)},1107:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});n(6540);var r=n(4164),o=n(1312),a=n(6342),i=n(8774),l=n(3427);const s={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var u=n(4848);function c(e){let{as:t,id:n,...c}=e;const d=(0,l.A)(),{navbar:{hideOnScroll:p}}=(0,a.p)();if("h1"===t||!n)return(0,u.jsx)(t,{...c,id:void 0});d.collectAnchor(n);const f=(0,o.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof c.children?c.children:n});return(0,u.jsxs)(t,{...c,className:(0,r.A)("anchor",p?s.anchorWithHideOnScrollNavbar:s.anchorWithStickyNavbar,c.className),id:n,children:[c.children,(0,u.jsx)(i.A,{className:"hash-link",to:`#${n}`,"aria-label":f,title:f,children:"\u200b"})]})}},3186:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);const r={iconExternalLink:"iconExternalLink_nPIU"};var o=n(4848);function a(e){let{width:t=13.5,height:n=13.5}=e;return(0,o.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,o.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},8244:(e,t,n)=>{"use strict";n.d(t,{A:()=>ut});var r=n(6540),o=n(4164),a=n(7489),i=n(1003),l=n(6347),s=n(1312),u=n(5062),c=n(4848);const d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){const e=(0,r.useRef)(null),{action:t}=(0,l.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&p(t)}),[]);return(0,u.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}const m=(0,s.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){const t=e.children??m,{containerRef:n,onClick:r}=f();return(0,c.jsx)("div",{ref:n,role:"region","aria-label":m,children:(0,c.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var h=n(7559),y=n(4090);const b={skipToContent:"skipToContent_fXgn"};function v(){return(0,c.jsx)(g,{className:b.skipToContent})}var w=n(6342),k=n(5041);function x(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:o=1.2,className:a,...i}=e;return(0,c.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,c.jsx)("g",{stroke:r,strokeWidth:o,children:(0,c.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const S={closeButton:"closeButton_CVFx"};function E(e){return(0,c.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,o.A)("clean-btn close",S.closeButton,e.className),children:(0,c.jsx)(x,{width:14,height:14,strokeWidth:3.1})})}const _={content:"content_knG7"};function C(e){const{announcementBar:t}=(0,w.p)(),{content:n}=t;return(0,c.jsx)("div",{...e,className:(0,o.A)(_.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const A={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function T(){const{announcementBar:e}=(0,w.p)(),{isActive:t,close:n}=(0,k.M)();if(!t)return null;const{backgroundColor:r,textColor:o,isCloseable:a}=e;return(0,c.jsxs)("div",{className:A.announcementBar,style:{backgroundColor:r,color:o},role:"banner",children:[a&&(0,c.jsx)("div",{className:A.announcementBarPlaceholder}),(0,c.jsx)(C,{className:A.announcementBarContent}),a&&(0,c.jsx)(E,{onClick:n,className:A.announcementBarClose})]})}var j=n(9876),P=n(3104);var N=n(9532),R=n(5600);const L=r.createContext(null);function O(e){let{children:t}=e;const n=function(){const e=(0,j.M)(),t=(0,R.YL)(),[n,o]=(0,r.useState)(!1),a=null!==t.component,i=(0,N.ZC)(a);return(0,r.useEffect)((()=>{a&&!i&&o(!0)}),[a,i]),(0,r.useEffect)((()=>{a?e.shown||o(!0):o(!1)}),[e.shown,a]),(0,r.useMemo)((()=>[n,o]),[n])}();return(0,c.jsx)(L.Provider,{value:n,children:t})}function D(e){if(e.component){const t=e.component;return(0,c.jsx)(t,{...e.props})}}function I(){const e=(0,r.useContext)(L);if(!e)throw new N.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,o=(0,r.useCallback)((()=>n(!1)),[n]),a=(0,R.YL)();return(0,r.useMemo)((()=>({shown:t,hide:o,content:D(a)})),[o,a,t])}function F(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:a}=I();return(0,c.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,c.jsxs)("div",{className:(0,o.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":a}),children:[(0,c.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,c.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var M=n(5293),z=n(2303);function B(e){return(0,c.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,c.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function $(e){return(0,c.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,c.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const U={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function q(e){let{className:t,buttonClassName:n,value:r,onChange:a}=e;const i=(0,z.A)(),l=(0,s.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,s.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,s.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,c.jsx)("div",{className:(0,o.A)(U.toggle,t),children:(0,c.jsxs)("button",{className:(0,o.A)("clean-btn",U.toggleButton,!i&&U.toggleButtonDisabled,n),type:"button",onClick:()=>a("dark"===r?"light":"dark"),disabled:!i,title:l,"aria-label":l,"aria-live":"polite",children:[(0,c.jsx)(B,{className:(0,o.A)(U.toggleIcon,U.lightToggleIcon)}),(0,c.jsx)($,{className:(0,o.A)(U.toggleIcon,U.darkToggleIcon)})]})})}const H=r.memo(q),G={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function V(e){let{className:t}=e;const n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode.disableSwitch,{colorMode:o,setColorMode:a}=(0,M.G)();return r?null:(0,c.jsx)(H,{className:t,buttonClassName:"dark"===n?G.darkNavbarColorModeToggle:void 0,value:o,onChange:a})}var W=n(3465);function Q(){return(0,c.jsx)(W.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function K(){const e=(0,j.M)();return(0,c.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,c.jsx)(x,{color:"var(--ifm-color-emphasis-600)"})})}function Y(){return(0,c.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,c.jsx)(Q,{}),(0,c.jsx)(V,{className:"margin-right--md"}),(0,c.jsx)(K,{})]})}var Z=n(8774),X=n(6025),J=n(6654);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(3186);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:o,label:a,html:i,isDropdownLink:l,prependBaseUrlToHref:s,...u}=e;const d=(0,X.Ay)(r),p=(0,X.Ay)(t),f=(0,X.Ay)(o,{forcePrependBaseUrl:!0}),m=a&&o&&!(0,J.A)(o),g=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,c.jsxs)(c.Fragment,{children:[a,m&&(0,c.jsx)(te.A,{...l&&{width:12,height:12}})]})};return o?(0,c.jsx)(Z.A,{href:s?f:o,...u,...g}):(0,c.jsx)(Z.A,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?ee(n,t.pathname):t.pathname.startsWith(p)},...u,...g})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const a=(0,c.jsx)(ne,{className:(0,o.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,c.jsx)("li",{children:a}):a}function oe(e){let{className:t,isDropdownItem:n,...r}=e;return(0,c.jsx)("li",{className:"menu__list-item",children:(0,c.jsx)(ne,{className:(0,o.A)("menu__link",t),...r})})}function ae(e){let{mobile:t=!1,position:n,...r}=e;const o=t?oe:re;return(0,c.jsx)(o,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(1422),le=n(9169),se=n(4586);const ue={dropdownNavbarItemMobile:"dropdownNavbarItemMobile_S0Fm"};function ce(e,t){return e.some((e=>function(e,t){return!!(0,le.ys)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:a,onClick:i,...l}=e;const s=(0,r.useRef)(null),[u,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[s]),(0,c.jsxs)("div",{ref:s,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":u}),children:[(0,c.jsx)(ne,{"aria-haspopup":"true","aria-expanded":u,role:"button",href:l.to?void 0:"#",className:(0,o.A)("navbar__link",a),...l,onClick:l.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!u))},children:l.children??l.label}),(0,c.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(_e,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function pe(e){let{items:t,className:n,position:a,onClick:i,...s}=e;const u=function(){const{siteConfig:{baseUrl:e}}=(0,se.A)(),{pathname:t}=(0,l.zy)();return t.replace(e,"/")}(),d=ce(t,u),{collapsed:p,toggleCollapsed:f,setCollapsed:m}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[u,d,m]),(0,c.jsxs)("li",{className:(0,o.A)("menu__list-item",{"menu__list-item--collapsed":p}),children:[(0,c.jsx)(ne,{role:"button",className:(0,o.A)(ue.dropdownNavbarItemMobile,"menu__link menu__link--sublist menu__link--sublist-caret",n),...s,onClick:e=>{e.preventDefault(),f()},children:s.children??s.label}),(0,c.jsx)(ie.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:p,children:t.map(((e,t)=>(0,r.createElement)(_e,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function fe(e){let{mobile:t=!1,...n}=e;const r=t?pe:de;return(0,c.jsx)(r,{...n})}var me=n(2131);function ge(e){let{width:t=20,height:n=20,...r}=e;return(0,c.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,c.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const he="iconLanguage_nlXk";const ye=()=>null,be={navbarSearchContainer:"navbarSearchContainer_Bca1"};function ve(e){let{children:t,className:n}=e;return(0,c.jsx)("div",{className:(0,o.A)(n,be.navbarSearchContainer),children:t})}var we=n(4070),ke=n(4718);var xe=n(3886);function Se(e,t){return t.alternateDocVersions[e.name]??function(e){return e.docs.find((t=>t.id===e.mainDocId))}(e)}const Ee={default:ae,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:o="",...a}=e;const{i18n:{currentLocale:i,locales:u,localeConfigs:d}}=(0,se.A)(),p=(0,me.o)(),{search:f,hash:m}=(0,l.zy)(),g=[...n,...u.map((e=>{const n=`${`pathname://${p.createUrl({locale:e,fullyQualified:!1})}`}${f}${m}${o}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],h=t?(0,s.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,c.jsx)(fe,{...a,mobile:t,label:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(ge,{className:he}),h]}),items:g})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,c.jsx)(ve,{className:n,children:(0,c.jsx)(ye,{})})},dropdown:fe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:a=!1}=e;const i=a?"li":"div";return(0,c.jsx)(i,{className:(0,o.A)({navbar__item:!r&&!a,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,we.zK)(r),i=(0,ke.QB)(t,r),l=a?.path===i?.path;return null===i||i.unlisted&&!l?null:(0,c.jsx)(ae,{exact:!0,...o,isActive:()=>l||!!a?.sidebar&&a.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,we.zK)(r),i=(0,ke.fW)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,c.jsx)(ae,{exact:!0,...o,isActive:()=>a?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...o}=e;const a=(0,ke.Vd)(r)[0],i=t??a.label,l=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(a).path;return(0,c.jsx)(ae,{...o,label:i,to:l})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:o,dropdownItemsAfter:a,...i}=e;const{search:u,hash:d}=(0,l.zy)(),p=(0,we.zK)(n),f=(0,we.jh)(n),{savePreferredVersionName:m}=(0,xe.g1)(n),g=[...o,...f.map((function(e){const t=Se(e,p);return{label:e.label,to:`${t.path}${u}${d}`,isActive:()=>e===p.activeVersion,onClick:()=>m(e.name)}})),...a],h=(0,ke.Vd)(n)[0],y=t&&g.length>1?(0,s.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):h.label,b=t&&g.length>1?void 0:Se(h,p).path;return g.length<=1?(0,c.jsx)(ae,{...i,mobile:t,label:y,to:b,isActive:r?()=>!1:void 0}):(0,c.jsx)(fe,{...i,mobile:t,label:y,to:b,items:g,isActive:r?()=>!1:void 0})}};function _e(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=Ee[r];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,c.jsx)(o,{...n})}function Ce(){const e=(0,j.M)(),t=(0,w.p)().navbar.items;return(0,c.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(_e,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function Ae(e){return(0,c.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,c.jsx)(s.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function Te(){const e=0===(0,w.p)().navbar.items.length,t=I();return(0,c.jsxs)(c.Fragment,{children:[!e&&(0,c.jsx)(Ae,{onClick:()=>t.hide()}),t.content]})}function je(){const e=(0,j.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,c.jsx)(F,{header:(0,c.jsx)(Y,{}),primaryMenu:(0,c.jsx)(Ce,{}),secondaryMenu:(0,c.jsx)(Te,{})}):null}const Pe={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Ne(e){return(0,c.jsx)("div",{role:"presentation",...e,className:(0,o.A)("navbar-sidebar__backdrop",e.className)})}function Re(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:a}}=(0,w.p)(),i=(0,j.M)(),{navbarRef:l,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),o=(0,r.useRef)(!1),a=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(a.current=e.getBoundingClientRect().height)}),[]);return(0,P.Mq)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i<a.current)return void n(!0);if(o.current)return void(o.current=!1);const l=r?.scrollY,s=document.documentElement.scrollHeight-a.current,u=window.innerHeight;l&&i>=l?n(!1):i+u<s&&n(!0)})),(0,u.$)((t=>{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return o.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,c.jsxs)("nav",{ref:l,"aria-label":(0,s.T)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,o.A)("navbar","navbar--fixed-top",n&&[Pe.navbarHideable,!d&&Pe.navbarHidden],{"navbar--dark":"dark"===a,"navbar--primary":"primary"===a,"navbar-sidebar--show":i.shown}),children:[t,(0,c.jsx)(Ne,{onClick:i.toggle}),(0,c.jsx)(je,{})]})}var Le=n(2181);const Oe="right";function De(e){let{width:t=30,height:n=30,className:r,...o}=e;return(0,c.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...o,children:(0,c.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function Ie(){const{toggle:e,shown:t}=(0,j.M)();return(0,c.jsx)("button",{onClick:e,"aria-label":(0,s.T)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,c.jsx)(De,{})})}const Fe={colorModeToggle:"colorModeToggle_DEke"};function Me(e){let{items:t}=e;return(0,c.jsx)(c.Fragment,{children:t.map(((e,t)=>(0,c.jsx)(Le.k2,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,c.jsx)(_e,{...e})},t)))})}function ze(e){let{left:t,right:n}=e;return(0,c.jsxs)("div",{className:"navbar__inner",children:[(0,c.jsx)("div",{className:"navbar__items",children:t}),(0,c.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function Be(){const e=(0,j.M)(),t=(0,w.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??Oe)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return(0,c.jsx)(ze,{left:(0,c.jsxs)(c.Fragment,{children:[!e.disabled&&(0,c.jsx)(Ie,{}),(0,c.jsx)(Q,{}),(0,c.jsx)(Me,{items:n})]}),right:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Me,{items:r}),(0,c.jsx)(V,{className:Fe.colorModeToggle}),!o&&(0,c.jsx)(ve,{children:(0,c.jsx)(ye,{})})]})})}function $e(){return(0,c.jsx)(Re,{children:(0,c.jsx)(Be,{})})}function Ue(e){let{item:t}=e;const{to:n,href:r,label:o,prependBaseUrlToHref:a,...i}=t,l=(0,X.Ay)(n),s=(0,X.Ay)(r,{forcePrependBaseUrl:!0});return(0,c.jsxs)(Z.A,{className:"footer__link-item",...r?{href:a?s:r}:{to:l},...i,children:[o,r&&!(0,J.A)(r)&&(0,c.jsx)(te.A,{})]})}function qe(e){let{item:t}=e;return t.html?(0,c.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):(0,c.jsx)("li",{className:"footer__item",children:(0,c.jsx)(Ue,{item:t})},t.href??t.to)}function He(e){let{column:t}=e;return(0,c.jsxs)("div",{className:"col footer__col",children:[(0,c.jsx)("div",{className:"footer__title",children:t.title}),(0,c.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,c.jsx)(qe,{item:e},t)))})]})}function Ge(e){let{columns:t}=e;return(0,c.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,c.jsx)(He,{column:e},t)))})}function Ve(){return(0,c.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function We(e){let{item:t}=e;return t.html?(0,c.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):(0,c.jsx)(Ue,{item:t})}function Qe(e){let{links:t}=e;return(0,c.jsx)("div",{className:"footer__links text--center",children:(0,c.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(We,{item:e}),t.length!==n+1&&(0,c.jsx)(Ve,{})]},n)))})})}function Ke(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,c.jsx)(Ge,{columns:t}):(0,c.jsx)(Qe,{links:t})}var Ye=n(1122);const Ze={footerLogoLink:"footerLogoLink_BH7S"};function Xe(e){let{logo:t}=e;const{withBaseUrl:n}=(0,X.hH)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,c.jsx)(Ye.A,{className:(0,o.A)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function Je(e){let{logo:t}=e;return t.href?(0,c.jsx)(Z.A,{href:t.href,className:Ze.footerLogoLink,target:t.target,children:(0,c.jsx)(Xe,{logo:t})}):(0,c.jsx)(Xe,{logo:t})}function et(e){let{copyright:t}=e;return(0,c.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function tt(e){let{style:t,links:n,logo:r,copyright:a}=e;return(0,c.jsx)("footer",{className:(0,o.A)("footer",{"footer--dark":"dark"===t}),children:(0,c.jsxs)("div",{className:"container container-fluid",children:[n,(r||a)&&(0,c.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,c.jsx)("div",{className:"margin-bottom--sm",children:r}),a]})]})})}function nt(){const{footer:e}=(0,w.p)();if(!e)return null;const{copyright:t,links:n,logo:r,style:o}=e;return(0,c.jsx)(tt,{style:o,links:n&&n.length>0&&(0,c.jsx)(Ke,{links:n}),logo:r&&(0,c.jsx)(Je,{logo:r}),copyright:t&&(0,c.jsx)(et,{copyright:t})})}const rt=r.memo(nt),ot=(0,N.fM)([M.a,k.o,P.Tv,xe.VQ,i.Jx,function(e){let{children:t}=e;return(0,c.jsx)(R.y_,{children:(0,c.jsx)(j.e,{children:(0,c.jsx)(O,{children:t})})})}]);function at(e){let{children:t}=e;return(0,c.jsx)(ot,{children:t})}var it=n(1107);function lt(e){let{error:t,tryAgain:n}=e;return(0,c.jsx)("main",{className:"container margin-vert--xl",children:(0,c.jsx)("div",{className:"row",children:(0,c.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,c.jsx)(it.A,{as:"h1",className:"hero__title",children:(0,c.jsx)(s.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,c.jsx)("div",{className:"margin-vert--lg",children:(0,c.jsx)(Le.a2,{onClick:n,className:"button button--primary shadow--lw"})}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"margin-vert--md",children:(0,c.jsx)(Le.bq,{error:t})})]})})})}const st={mainWrapper:"mainWrapper_z2l0"};function ut(e){const{children:t,noFooter:n,wrapperClassName:r,title:l,description:s}=e;return(0,y.J)(),(0,c.jsxs)(at,{children:[(0,c.jsx)(i.be,{title:l,description:s}),(0,c.jsx)(v,{}),(0,c.jsx)(T,{}),(0,c.jsx)($e,{}),(0,c.jsx)("div",{id:d,className:(0,o.A)(h.G.wrapper.main,st.mainWrapper,r),children:(0,c.jsx)(a.A,{fallback:e=>(0,c.jsx)(lt,{...e}),children:t})}),!n&&(0,c.jsx)(rt,{})]})}},3465:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});n(6540);var r=n(8774),o=n(6025),a=n(4586),i=n(6342),l=n(1122),s=n(4848);function u(e){let{logo:t,alt:n,imageClassName:r}=e;const a={light:(0,o.Ay)(t.src),dark:(0,o.Ay)(t.srcDark||t.src)},i=(0,s.jsx)(l.A,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,s.jsx)("div",{className:r,children:i}):i}function c(e){const{siteConfig:{title:t}}=(0,a.A)(),{navbar:{title:n,logo:l}}=(0,i.p)(),{imageClassName:c,titleClassName:d,...p}=e,f=(0,o.Ay)(l?.href||"/"),m=n?"":t,g=l?.alt??m;return(0,s.jsxs)(r.A,{to:f,...p,...l?.target&&{target:l.target},children:[l&&(0,s.jsx)(u,{logo:l,alt:g,imageClassName:c}),null!=n&&(0,s.jsx)("b",{className:d,children:n})]})}},1463:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);var r=n(5260),o=n(4848);function a(e){let{locale:t,version:n,tag:a}=e;const i=t;return(0,o.jsxs)(r.A,{children:[t&&(0,o.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,o.jsx)("meta",{name:"docusaurus_version",content:n}),a&&(0,o.jsx)("meta",{name:"docusaurus_tag",content:a}),i&&(0,o.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,o.jsx)("meta",{name:"docsearch:version",content:n}),a&&(0,o.jsx)("meta",{name:"docsearch:docusaurus_tag",content:a})]})}},1122:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(6540),o=n(4164),a=n(2303),i=n(5293);const l={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var s=n(4848);function u(e){let{className:t,children:n}=e;const u=(0,a.A)(),{colorMode:c}=(0,i.G)();return(0,s.jsx)(s.Fragment,{children:(u?"dark"===c?["dark"]:["light"]:["light","dark"]).map((e=>{const a=n({theme:e,className:(0,o.A)(t,l.themedComponent,l[`themedComponent--${e}`])});return(0,s.jsx)(r.Fragment,{children:a},e)}))})}function c(e){const{sources:t,className:n,alt:r,...o}=e;return(0,s.jsx)(u,{className:n,children:e=>{let{theme:n,className:a}=e;return(0,s.jsx)("img",{src:t[n],alt:r,className:a,...o})}})}},1422:(e,t,n)=>{"use strict";n.d(t,{N:()=>y,u:()=>u});var r=n(6540),o=n(8193),a=n(205),i=n(3109),l=n(4848);const s="ease-in-out";function u(e){let{initialState:t}=e;const[n,o]=(0,r.useState)(t??!1),a=(0,r.useCallback)((()=>{o((e=>!e))}),[]);return{collapsed:n,setCollapsed:o,toggleCollapsed:a}}const c={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function p(e,t){const n=t?c:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){let{collapsibleRef:t,collapsed:n,animation:o}=e;const a=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=o?.duration??function(e){if((0,i.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${o?.easing??s}`,height:`${t}px`}}function l(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!a.current)return p(e,n),void(a.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(l(),requestAnimationFrame((()=>{e.style.height=c.height,e.style.overflow=c.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{l()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,o])}function m(e){if(!o.A.canUseDOM)return e?c:d}function g(e){let{as:t="div",collapsed:n,children:o,animation:a,onCollapseTransitionEnd:i,className:s,disableSSRStyle:u}=e;const c=(0,r.useRef)(null);return f({collapsibleRef:c,collapsed:n,animation:a}),(0,l.jsx)(t,{ref:c,style:u?void 0:m(n),onTransitionEnd:e=>{"height"===e.propertyName&&(p(c.current,n),i?.(n))},className:s,children:o})}function h(e){let{collapsed:t,...n}=e;const[o,i]=(0,r.useState)(!t),[s,u]=(0,r.useState)(t);return(0,a.A)((()=>{t||i(!0)}),[t]),(0,a.A)((()=>{o&&u(t)}),[o,t]),o?(0,l.jsx)(g,{...n,collapsed:s}):null}function y(e){let{lazy:t,...n}=e;const r=t?h:g;return(0,l.jsx)(r,{...n})}},5041:(e,t,n)=>{"use strict";n.d(t,{M:()=>g,o:()=>m});var r=n(6540),o=n(2303),a=n(679),i=n(9532),l=n(6342),s=n(4848);const u=(0,a.Wf)("docusaurus.announcement.dismiss"),c=(0,a.Wf)("docusaurus.announcement.id"),d=()=>"true"===u.get(),p=e=>u.set(String(e)),f=r.createContext(null);function m(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,l.p)(),t=(0,o.A)(),[n,a]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{a(d())}),[]);const i=(0,r.useCallback)((()=>{p(!0),a(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=c.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;c.set(t),r&&p(!1),!r&&d()||a(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,s.jsx)(f.Provider,{value:n,children:t})}function g(){const e=(0,r.useContext)(f);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},5293:(e,t,n)=>{"use strict";n.d(t,{G:()=>y,a:()=>h});var r=n(6540),o=n(8193),a=n(9532),i=n(679),l=n(6342),s=n(4848);const u=r.createContext(void 0),c="theme",d=(0,i.Wf)(c),p={light:"light",dark:"dark"},f=e=>e===p.dark?p.dark:p.light,m=e=>o.A.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e),g=e=>{d.set(f(e))};function h(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,l.p)(),[o,a]=(0,r.useState)(m(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:o=!0}=r;t?(a(t),o&&g(t)):(a(n?window.matchMedia("(prefers-color-scheme: dark)").matches?p.dark:p.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",f(o))}),[o]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==c)return;const t=d.get();null!==t&&i(f(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const s=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||s.current?s.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:o,setColorMode:i,get isDarkTheme(){return o===p.dark},setLightTheme(){i(p.light)},setDarkTheme(){i(p.dark)}})),[o,i])}();return(0,s.jsx)(u.Provider,{value:n,children:t})}function y(){const e=(0,r.useContext)(u);if(null==e)throw new a.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},9876:(e,t,n)=>{"use strict";n.d(t,{e:()=>f,M:()=>m});var r=n(6540),o=n(5600),a=n(4581),i=n(6347),l=n(9532);function s(e){!function(e){const t=(0,i.W6)(),n=(0,l._q)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}var u=n(6342),c=n(4848);const d=r.createContext(void 0);function p(){const e=function(){const e=(0,o.YL)(),{items:t}=(0,u.p)().navbar;return 0===t.length&&!e.component}(),t=(0,a.l)(),n=!e&&"mobile"===t,[i,l]=(0,r.useState)(!1);s((()=>{if(i)return l(!1),!1}));const c=(0,r.useCallback)((()=>{l((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&l(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:c,shown:i})),[e,n,c,i])}function f(e){let{children:t}=e;const n=p();return(0,c.jsx)(d.Provider,{value:n,children:t})}function m(){const e=r.useContext(d);if(void 0===e)throw new l.dV("NavbarMobileSidebarProvider");return e}},5600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>u,YL:()=>s,y_:()=>l});var r=n(6540),o=n(9532),a=n(4848);const i=r.createContext(null);function l(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,a.jsx)(i.Provider,{value:n,children:t})}function s(){const e=(0,r.useContext)(i);if(!e)throw new o.dV("NavbarSecondaryMenuContentProvider");return e[0]}function u(e){let{component:t,props:n}=e;const a=(0,r.useContext)(i);if(!a)throw new o.dV("NavbarSecondaryMenuContentProvider");const[,l]=a,s=(0,o.Be)(n);return(0,r.useEffect)((()=>{l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((()=>()=>l({component:null,props:null})),[l]),null}},4090:(e,t,n)=>{"use strict";n.d(t,{w:()=>o,J:()=>a});var r=n(6540);const o="navigation-with-keyboard";function a(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},4581:(e,t,n)=>{"use strict";n.d(t,{l:()=>l});var r=n(6540),o=n(8193);const a={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(e){let{desktopBreakpoint:t=i}=void 0===e?{}:e;const[n,l]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){l(function(e){if(!o.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?a.desktop:a.mobile}(t))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),n}},7559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},3109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},2181:(e,t,n)=>{"use strict";n.d(t,{bq:()=>c,MN:()=>u,a2:()=>s,k2:()=>d});var r=n(6540),o=n(1312),a=n(440);const i={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};var l=n(4848);function s(e){return(0,l.jsx)("button",{type:"button",...e,children:(0,l.jsx)(o.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function u(e){let{error:t,tryAgain:n}=e;return(0,l.jsxs)("div",{className:i.errorBoundaryFallback,children:[(0,l.jsx)("p",{children:t.message}),(0,l.jsx)(s,{onClick:n})]})}function c(e){let{error:t}=e;const n=(0,a.rA)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,l.jsx)("p",{className:i.errorBoundaryError,children:n})}class d extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}},1003:(e,t,n)=>{"use strict";n.d(t,{e3:()=>f,be:()=>d,Jx:()=>m});var r=n(6540),o=n(4164),a=n(5260),i=n(3102);function l(){const e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(6025),u=n(4586);var c=n(4848);function d(e){let{title:t,description:n,keywords:r,image:o,children:i}=e;const l=function(e){const{siteConfig:t}=(0,u.A)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,s.hH)(),p=o?d(o,{absolute:!0}):void 0;return(0,c.jsxs)(a.A,{children:[t&&(0,c.jsx)("title",{children:l}),t&&(0,c.jsx)("meta",{property:"og:title",content:l}),n&&(0,c.jsx)("meta",{name:"description",content:n}),n&&(0,c.jsx)("meta",{property:"og:description",content:n}),r&&(0,c.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),p&&(0,c.jsx)("meta",{property:"og:image",content:p}),p&&(0,c.jsx)("meta",{name:"twitter:image",content:p}),i]})}const p=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(p),l=(0,o.A)(i,t);return(0,c.jsxs)(p.Provider,{value:l,children:[(0,c.jsx)(a.A,{children:(0,c.jsx)("html",{className:l})}),n]})}function m(e){let{children:t}=e;const n=l(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const a=`plugin-id-${n.plugin.id}`;return(0,c.jsx)(f,{className:(0,o.A)(r,a),children:t})}},9532:(e,t,n)=>{"use strict";n.d(t,{Be:()=>u,ZC:()=>l,_q:()=>i,dV:()=>s,fM:()=>c});var r=n(6540),o=n(205),a=n(4848);function i(e){const t=(0,r.useRef)(e);return(0,o.A)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function l(e){const t=(0,r.useRef)();return(0,o.A)((()=>{t.current=e})),t.current}class s extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?<name>\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function u(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function c(e){return t=>{let{children:n}=t;return(0,a.jsx)(a.Fragment,{children:e.reduceRight(((e,t)=>(0,a.jsx)(t,{children:e})),n)})}}},9169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>l,ys:()=>i});var r=n(6540),o=n(8328),a=n(4586);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function l(){const{baseUrl:e}=(0,a.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function o(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(o).flatMap((e=>e.routes??[])))}(n)}({routes:o.A,baseUrl:e})),[e])}},3104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>p,Tv:()=>u,gk:()=>f});var r=n(6540),o=n(8193),a=n(2303),i=(n(205),n(9532)),l=n(4848);const s=r.createContext(void 0);function u(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,l.jsx)(s.Provider,{value:n,children:t})}function c(){const e=(0,r.useContext)(s);if(null==e)throw new i.dV("ScrollControllerProvider");return e}const d=()=>o.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function p(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=c(),o=(0,r.useRef)(d()),a=(0,i._q)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=d();a(e,o.current),o.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[a,n,...t])}function f(){const e=(0,r.useRef)(null),t=(0,a.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const o=document.documentElement.scrollTop;(n&&o>e||!n&&o<e)&&(t=requestAnimationFrame(r),window.scrollTo(0,Math.floor(.85*(o-e))+e))}(),()=>t&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},679:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>u});n(6540);const r=JSON.parse('{"N":"localStorage","M":""}'),o=r.N;function a(e){let{key:t,oldValue:n,newValue:r,storage:o}=e;if(n===r)return;const a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,o),window.dispatchEvent(a)}function i(e){if(void 0===e&&(e=o),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}let l=!1;const s={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function u(e,t){const n=`${e}${r.M}`;if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(n);const o=i(t?.persistence);return null===o?s:{get:()=>{try{return o.getItem(n)}catch(e){return console.error(`Docusaurus storage error, can't get key=${n}`,e),null}},set:e=>{try{const t=o.getItem(n);o.setItem(n,e),a({key:n,oldValue:t,newValue:e,storage:o})}catch(t){console.error(`Docusaurus storage error, can't set ${n}=${e}`,t)}},del:()=>{try{const e=o.getItem(n);o.removeItem(n),a({key:n,oldValue:e,newValue:null,storage:o})}catch(e){console.error(`Docusaurus storage error, can't delete key=${n}`,e)}},listen:e=>{try{const t=t=>{t.storageArea===o&&t.key===n&&e(t)};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}catch(t){return console.error(`Docusaurus storage error, can't listen for changes of key=${n}`,t),()=>{}}}}}},2131:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(4586),o=n(6347),a=n(440);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:l}}=(0,r.A)(),{pathname:s}=(0,o.zy)(),u=(0,a.Ks)(s,{trailingSlash:n,baseUrl:e}),c=l===i?e:e.replace(`/${l}/`,"/"),d=u.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${c}`:`${c}${e}/`}(n)}${d}`}}}},5062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(6540),o=n(6347),a=n(9532);function i(e){const t=(0,o.zy)(),n=(0,a.ZC)(t),i=(0,a._q)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var r=n(4586);function o(){return(0,r.A)().siteConfig.themeConfig}},2983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=o,t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[i]=e.split(/[#?]/),l="/"===i||i===r?i:(s=i,u=n,u?o(s):a(s));var s,u;return e.replace(i,l)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=a;const r=n(2566);function o(e){return e.endsWith("/")?e:`${e}/`}function a(e){return(0,r.removeSuffix)(e,"/")}},253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t,...e(t.cause)];return[t]}},440:(e,t,n)=>{"use strict";t.rA=t.Ks=void 0;const r=n(1635);var o=n(2983);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(o).default}});var a=n(2566);var i=n(253);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},2566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:`${t}${e}`},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:`${e}${t}`},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},9231:(e,t,n)=>{"use strict";n.d(t,{zR:()=>S,TM:()=>j,yJ:()=>g,sC:()=>N,AO:()=>m,Fu:()=>h});var r=n(8168);function o(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}const i=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],i=t&&t.split("/")||[],l=e&&o(e),s=t&&o(t),u=l||s;if(e&&o(e)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";if(i.length){var c=i[i.length-1];n="."===c||".."===c||""===c}else n=!1;for(var d=0,p=i.length;p>=0;p--){var f=i[p];"."===f?a(i,p):".."===f?(a(i,p),d++):d&&(a(i,p),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&o(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}const s=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=l(t),o=l(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1};var u=n(1561);function c(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function p(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function f(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function g(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.A)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function h(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(e.state,t.state)}function y(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var b=!("undefined"==typeof window||!window.document||!window.document.createElement);function v(e,t){t(window.confirm(e))}var w="popstate",k="hashchange";function x(){try{return window.history.state||{}}catch(e){return{}}}function S(e){void 0===e&&(e={}),b||(0,u.A)(!1);var t,n=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,l=i.forceRefresh,s=void 0!==l&&l,d=i.getUserConfirmation,h=void 0===d?v:d,S=i.keyLength,E=void 0===S?6:S,_=e.basename?f(c(e.basename)):"";function C(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname+o.search+o.hash;return _&&(a=p(a,_)),g(a,r,n)}function A(){return Math.random().toString(36).substr(2,E)}var T=y();function j(e){(0,r.A)($,e),$.length=n.length,T.notifyListeners($.location,$.action)}function P(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||L(C(e.state))}function N(){L(C(x()))}var R=!1;function L(e){if(R)R=!1,j();else{T.confirmTransitionTo(e,"POP",h,(function(t){t?j({action:"POP",location:e}):function(e){var t=$.location,n=D.indexOf(t.key);-1===n&&(n=0);var r=D.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(R=!0,F(o))}(e)}))}}var O=C(x()),D=[O.key];function I(e){return _+m(e)}function F(e){n.go(e)}var M=0;function z(e){1===(M+=e)&&1===e?(window.addEventListener(w,P),a&&window.addEventListener(k,N)):0===M&&(window.removeEventListener(w,P),a&&window.removeEventListener(k,N))}var B=!1;var $={length:n.length,action:"POP",location:O,createHref:I,push:function(e,t){var r="PUSH",a=g(e,t,A(),$.location);T.confirmTransitionTo(a,r,h,(function(e){if(e){var t=I(a),i=a.key,l=a.state;if(o)if(n.pushState({key:i,state:l},null,t),s)window.location.href=t;else{var u=D.indexOf($.location.key),c=D.slice(0,u+1);c.push(a.key),D=c,j({action:r,location:a})}else window.location.href=t}}))},replace:function(e,t){var r="REPLACE",a=g(e,t,A(),$.location);T.confirmTransitionTo(a,r,h,(function(e){if(e){var t=I(a),i=a.key,l=a.state;if(o)if(n.replaceState({key:i,state:l},null,t),s)window.location.replace(t);else{var u=D.indexOf($.location.key);-1!==u&&(D[u]=a.key),j({action:r,location:a})}else window.location.replace(t)}}))},go:F,goBack:function(){F(-1)},goForward:function(){F(1)},block:function(e){void 0===e&&(e=!1);var t=T.setPrompt(e);return B||(z(1),B=!0),function(){return B&&(B=!1,z(-1)),t()}},listen:function(e){var t=T.appendListener(e);return z(1),function(){z(-1),t()}}};return $}var E="hashchange",_={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+d(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:d,decodePath:c},slash:{encodePath:c,decodePath:c}};function C(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function A(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function T(e){window.location.replace(C(window.location.href)+"#"+e)}function j(e){void 0===e&&(e={}),b||(0,u.A)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),o=n.getUserConfirmation,a=void 0===o?v:o,i=n.hashType,l=void 0===i?"slash":i,s=e.basename?f(c(e.basename)):"",d=_[l],h=d.encodePath,w=d.decodePath;function k(){var e=w(A());return s&&(e=p(e,s)),g(e)}var x=y();function S(e){(0,r.A)(B,e),B.length=t.length,x.notifyListeners(B.location,B.action)}var j=!1,P=null;function N(){var e,t,n=A(),r=h(n);if(n!==r)T(r);else{var o=k(),i=B.location;if(!j&&(t=o,(e=i).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(P===m(o))return;P=null,function(e){if(j)j=!1,S();else{var t="POP";x.confirmTransitionTo(e,t,a,(function(n){n?S({action:t,location:e}):function(e){var t=B.location,n=D.lastIndexOf(m(t));-1===n&&(n=0);var r=D.lastIndexOf(m(e));-1===r&&(r=0);var o=n-r;o&&(j=!0,I(o))}(e)}))}}(o)}}var R=A(),L=h(R);R!==L&&T(L);var O=k(),D=[m(O)];function I(e){t.go(e)}var F=0;function M(e){1===(F+=e)&&1===e?window.addEventListener(E,N):0===F&&window.removeEventListener(E,N)}var z=!1;var B={length:t.length,action:"POP",location:O,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=C(window.location.href)),n+"#"+h(s+m(e))},push:function(e,t){var n="PUSH",r=g(e,void 0,void 0,B.location);x.confirmTransitionTo(r,n,a,(function(e){if(e){var t=m(r),o=h(s+t);if(A()!==o){P=t,function(e){window.location.hash=e}(o);var a=D.lastIndexOf(m(B.location)),i=D.slice(0,a+1);i.push(t),D=i,S({action:n,location:r})}else S()}}))},replace:function(e,t){var n="REPLACE",r=g(e,void 0,void 0,B.location);x.confirmTransitionTo(r,n,a,(function(e){if(e){var t=m(r),o=h(s+t);A()!==o&&(P=t,T(o));var a=D.indexOf(m(B.location));-1!==a&&(D[a]=t),S({action:n,location:r})}}))},go:I,goBack:function(){I(-1)},goForward:function(){I(1)},block:function(e){void 0===e&&(e=!1);var t=x.setPrompt(e);return z||(M(1),z=!0),function(){return z&&(z=!1,M(-1)),t()}},listen:function(e){var t=x.appendListener(e);return M(1),function(){M(-1),t()}}};return B}function P(e,t,n){return Math.min(Math.max(e,t),n)}function N(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,o=t.initialEntries,a=void 0===o?["/"]:o,i=t.initialIndex,l=void 0===i?0:i,s=t.keyLength,u=void 0===s?6:s,c=y();function d(e){(0,r.A)(w,e),w.length=w.entries.length,c.notifyListeners(w.location,w.action)}function p(){return Math.random().toString(36).substr(2,u)}var f=P(l,0,a.length-1),h=a.map((function(e){return g(e,void 0,"string"==typeof e?p():e.key||p())})),b=m;function v(e){var t=P(w.index+e,0,w.entries.length-1),r=w.entries[t];c.confirmTransitionTo(r,"POP",n,(function(e){e?d({action:"POP",location:r,index:t}):d()}))}var w={length:h.length,action:"POP",location:h[f],index:f,entries:h,createHref:b,push:function(e,t){var r="PUSH",o=g(e,t,p(),w.location);c.confirmTransitionTo(o,r,n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=g(e,t,p(),w.location);c.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return w}},4146:(e,t,n)=>{"use strict";var r=n(4363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=f(n);o&&o!==m&&e(t,o,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=s(t),g=s(n),h=0;h<i.length;++h){var y=i[h];if(!(a[y]||r&&r[y]||g&&g[y]||l&&l[y])){var b=p(n,y);try{u(t,y,b)}catch(v){}}}}return t}},311:e=>{"use strict";e.exports=function(e,t,n,r,o,a,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,i,l],c=0;(s=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},4634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},119:(e,t,n)=>{"use strict";n.r(t)},1043:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,o;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function o(e,t,n){return e<t?t:e>n?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),u=a.querySelector(r.barSelector),c=r.speed,d=r.easing;return a.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,i(e,c,d)),1===e?(s(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){s(a,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),l=e?"-100":a(n.status||0),u=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&f(o),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function u(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=p(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},6969:e=>{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to <a href="https://webplatform.github.io/docs/">WebPlatform.org documentation</a>. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (<code>.comment</code> can become <code>.namespace--comment</code>) or replace them with your defined ones (like <code>.editor__comment</code>). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the <code>highlightAll</code> and <code>highlightAllUnder</code> methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},8722:(e,t,n)=>{const r=n(6969),o=n(8380),a=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...a,...Object.keys(Prism.languages)];o(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(3157).resolve(t)],delete Prism.languages[e],n(3157)(t),a.add(e)}))}i.silent=!1,e.exports=i},9700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,l=i.length;-1!==n.code.indexOf(o=t(r,l));)++l;return i[l]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(l){for(var s=0;s<l.length&&!(o>=a.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=a[o],d=n.tokenStack[c],p="string"==typeof u?u:u.content,f=t(r,c),m=p.indexOf(f);if(m>-1){++o;var g=p.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=p.substring(m+f.length),b=[];g&&b.push.apply(b,i([g])),b.push(h),y&&b.push.apply(b,i([y])),"string"==typeof u?l.splice.apply(l,[s,1].concat(b)):u.content=b}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(Prism)},8692:(e,t,n)=>{var r={"./":8722};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=8692},3157:(e,t,n)=>{var r={"./":8722};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=3157},8380:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t}function r(e){var n={},r=[];function o(r,a){if(!(r in n)){a.push(r);var i=a.indexOf(r);if(i<a.length-1)throw new Error("Circular dependency: "+a.slice(i).join(" -> "));var l={},s=e[r];if(s){function u(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in l))for(var i in o(t,a),l[t]=!0,n[t])l[i]=!0}t(s.require,u),t(s.optional,u),t(s.modify,u)}n[r]=l,a.pop()}}return function(e){var t=n[e];return t||(o(e,r),t=n[e]),t}}function o(e){for(var t in e)return!0;return!1}return function(a,i,l){var s=function(e){var t={};for(var n in e){var r=e[n];for(var o in r)if("meta"!=o){var a=r[o];t[o]="string"==typeof a?{title:a}:a}}return t}(a),u=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var o in n={},e){var a=e[o];t(a&&a.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+o+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+o+" because it is a component.");n[t]=o}))}return n[r]||r}}(s);i=i.map(u),l=(l||[]).map(u);var c=n(i),d=n(l);i.forEach((function e(n){var r=s[n];t(r&&r.require,(function(t){t in d||(c[t]=!0,e(t))}))}));for(var p,f=r(s),m=c;o(m);){for(var g in p={},m){var h=s[g];t(h&&h.modify,(function(e){e in d&&(p[e]=!0)}))}for(var y in d)if(!(y in c))for(var b in f(y))if(b in c){p[y]=!0;break}for(var v in m=p)c[v]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,o){var a=o?o.series:void 0,i=o?o.parallel:e,l={},s={};function u(e){if(e in l)return l[e];s[e]=!0;var o,c=[];for(var d in t(e))d in n&&c.push(d);if(0===c.length)o=r(e);else{var p=i(c.map((function(e){var t=u(e);return delete s[e],t})));a?o=a(p,(function(){return r(e)})):r(e)}return l[e]=o}for(var c in n)u(c);var d=[];for(var p in s)d.push(l[p]);return i(d)}(f,c,t,n)}};return w}}();e.exports=t},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),o=n(9982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,l={};function s(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(l[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},m={};function g(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var h={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){h[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];h[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){h[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){h[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){h[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){h[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){h[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){h[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){h[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function v(e,t,n,r){var o=h.hasOwnProperty(t)?h[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!d.call(m,e)||!d.call(f,e)&&(p.test(e)?m[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);h[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);h[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);h[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){h[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),h.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){h[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),A=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var L=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var O=Symbol.iterator;function D(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=O&&e[O]||e["@@iterator"])?e:null}var I,F=Object.assign;function M(e){if(void 0===I)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);I=t&&t[1]||""}return"\n"+I+e}var z=!1;function B(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"==typeof u.stack){for(var o=u.stack.split("\n"),a=r.stack.split("\n"),i=o.length-1,l=a.length-1;1<=i&&0<=l&&o[i]!==a[l];)l--;for(;1<=i&&0<=l;i--,l--)if(o[i]!==a[l]){if(1!==i||1!==l)do{if(i--,0>--l||o[i]!==a[l]){var s="\n"+o[i].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}}while(1<=i&&0<=l);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?M(e):""}function $(e){switch(e.tag){case 5:return M(e.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case x:return"Portal";case _:return"Profiler";case E:return"StrictMode";case j:return"Suspense";case P:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return U(e(t))}catch(n){}}return null}function q(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===E?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function G(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function V(e){e._valueTracker||(e._valueTracker=function(e){var t=G(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function W(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=G(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Q(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function K(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Z(e,t){null!=(t=t.checked)&&v(e,"checked",t,!1)}function X(e,t){Z(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return F({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function ae(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function se(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?le(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,de=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function he(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(fe).forEach((function(e){me.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ye=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function be(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function ve(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function ke(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,Se=null,Ee=null;function _e(e){if(e=wo(e)){if("function"!=typeof xe)throw Error(a(280));var t=e.stateNode;t&&(t=xo(t),xe(e.stateNode,e.type,t))}}function Ce(e){Se?Ee?Ee.push(e):Ee=[e]:Se=e}function Ae(){if(Se){var e=Se,t=Ee;if(Ee=Se=null,_e(e),t)for(e=0;e<t.length;e++)_e(t[e])}}function Te(e,t){return e(t)}function je(){}var Pe=!1;function Ne(e,t,n){if(Pe)return e(t,n);Pe=!0;try{return Te(e,t,n)}finally{Pe=!1,(null!==Se||null!==Ee)&&(je(),Ae())}}function Re(e,t){var n=e.stateNode;if(null===n)return null;var r=xo(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Le=!1;if(c)try{var Oe={};Object.defineProperty(Oe,"passive",{get:function(){Le=!0}}),window.addEventListener("test",Oe,Oe),window.removeEventListener("test",Oe,Oe)}catch(ce){Le=!1}function De(e,t,n,r,o,a,i,l,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Ie=!1,Fe=null,Me=!1,ze=null,Be={onError:function(e){Ie=!0,Fe=e}};function $e(e,t,n,r,o,a,i,l,s){Ie=!1,Fe=null,De.apply(Be,arguments)}function Ue(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function He(e){if(Ue(e)!==e)throw Error(a(188))}function Ge(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ue(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return He(o),e;if(i===r)return He(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var l=!1,s=o.child;s;){if(s===n){l=!0,n=o,r=i;break}if(s===r){l=!0,r=o,n=i;break}s=s.sibling}if(!l){for(s=i.child;s;){if(s===n){l=!0,n=i,r=o;break}if(s===r){l=!0,r=i,n=o;break}s=s.sibling}if(!l)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?Ve(e):null}function Ve(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ve(e);if(null!==t)return t;e=e.sibling}return null}var We=o.unstable_scheduleCallback,Qe=o.unstable_cancelCallback,Ke=o.unstable_shouldYield,Ye=o.unstable_requestPaint,Ze=o.unstable_now,Xe=o.unstable_getCurrentPriorityLevel,Je=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,at=null;var it=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(lt(e)/st|0)|0},lt=Math.log,st=Math.LN2;var ut=64,ct=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=268435455&n;if(0!==i){var l=i&~o;0!==l?r=dt(l):0!==(a&=i)&&(r=dt(a))}else 0!==(i=n&~o)?r=dt(i):0!==a&&(r=dt(a));if(0===r)return 0;if(0!==t&&t!==r&&!(t&o)&&((o=r&-r)>=(a=t&-t)||16===o&&4194240&a))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-it(t)),r|=e[n],t&=~o;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function mt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ut;return!(4194240&(ut<<=1))&&(ut=64),e}function ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-it(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var vt=0;function wt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var kt,xt,St,Et,_t,Ct=!1,At=[],Tt=null,jt=null,Pt=null,Nt=new Map,Rt=new Map,Lt=[],Ot="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Dt(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":jt=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":Nt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rt.delete(t.pointerId)}}function It(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&(null!==(t=wo(t))&&xt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Ft(e){var t=vo(e.target);if(null!==t){var n=Ue(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=qe(n)))return e.blockedOn=t,void _t(e.priority,(function(){St(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Mt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=wo(n))&&xt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function zt(e,t,n){Mt(e)&&n.delete(t)}function Bt(){Ct=!1,null!==Tt&&Mt(Tt)&&(Tt=null),null!==jt&&Mt(jt)&&(jt=null),null!==Pt&&Mt(Pt)&&(Pt=null),Nt.forEach(zt),Rt.forEach(zt)}function $t(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Bt)))}function Ut(e){function t(t){return $t(t,e)}if(0<At.length){$t(At[0],e);for(var n=1;n<At.length;n++){var r=At[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tt&&$t(Tt,e),null!==jt&&$t(jt,e),null!==Pt&&$t(Pt,e),Nt.forEach(t),Rt.forEach(t),n=0;n<Lt.length;n++)(r=Lt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Lt.length&&null===(n=Lt[0]).blockedOn;)Ft(n),null===n.blockedOn&&Lt.shift()}var qt=w.ReactCurrentBatchConfig,Ht=!0;function Gt(e,t,n,r){var o=vt,a=qt.transition;qt.transition=null;try{vt=1,Wt(e,t,n,r)}finally{vt=o,qt.transition=a}}function Vt(e,t,n,r){var o=vt,a=qt.transition;qt.transition=null;try{vt=4,Wt(e,t,n,r)}finally{vt=o,qt.transition=a}}function Wt(e,t,n,r){if(Ht){var o=Kt(e,t,n,r);if(null===o)Hr(e,t,r,Qt,n),Dt(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Tt=It(Tt,e,t,n,r,o),!0;case"dragenter":return jt=It(jt,e,t,n,r,o),!0;case"mouseover":return Pt=It(Pt,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return Nt.set(a,It(Nt.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,Rt.set(a,It(Rt.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Dt(e,r),4&t&&-1<Ot.indexOf(e)){for(;null!==o;){var a=wo(o);if(null!==a&&kt(a),null===(a=Kt(e,t,n,r))&&Hr(e,t,r,Qt,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Qt=null;function Kt(e,t,n,r){if(Qt=null,null!==(e=vo(e=ke(r))))if(null===(t=Ue(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=qe(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Qt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Zt=null,Xt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Xt,r=n.length,o="value"in Zt?Zt.value:Zt.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return Jt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return F(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,ln,sn,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=on(un),dn=F({},un,{view:0,detail:0}),pn=on(dn),fn=F({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sn&&(sn&&"mousemove"===e.type?(an=e.screenX-sn.screenX,ln=e.screenY-sn.screenY):ln=an=0,sn=e),an)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),mn=on(fn),gn=on(F({},fn,{dataTransfer:0})),hn=on(F({},dn,{relatedTarget:0})),yn=on(F({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=F({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vn=on(bn),wn=on(F({},un,{data:0})),kn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function En(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function _n(){return En}var Cn=F({},dn,{key:function(e){if(e.key){var t=kn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),An=on(Cn),Tn=on(F({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),jn=on(F({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),Pn=on(F({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=F({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=on(Nn),Ln=[9,13,27,32],On=c&&"CompositionEvent"in window,Dn=null;c&&"documentMode"in document&&(Dn=document.documentMode);var In=c&&"TextEvent"in window&&!Dn,Fn=c&&(!On||Dn&&8<Dn&&11>=Dn),Mn=String.fromCharCode(32),zn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Ln.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $n(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qn[e.type]:"textarea"===t}function Gn(e,t,n,r){Ce(r),0<(t=Vr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,Wn=null;function Qn(e){Mr(e,0)}function Kn(e){if(W(ko(e)))return e}function Yn(e,t){if("change"===e)return t}var Zn=!1;if(c){var Xn;if(c){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"==typeof er.oninput}Xn=Jn}else Xn=!1;Zn=Xn&&(!document.documentMode||9<document.documentMode)}function tr(){Vn&&(Vn.detachEvent("onpropertychange",nr),Wn=Vn=null)}function nr(e){if("value"===e.propertyName&&Kn(Wn)){var t=[];Gn(t,Wn,e,ke(e)),Ne(Qn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Wn=n,(Vn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Wn)}function ar(e,t){if("click"===e)return Kn(t)}function ir(e,t){if("input"===e||"change"===e)return Kn(t)}var lr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function sr(e,t){if(lr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!d.call(t,o)||!lr(e[o],t[o]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=Q();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Q((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mr(e){var t=pr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=cr(n,a);var i=cr(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=c&&"documentMode"in document&&11>=document.documentMode,hr=null,yr=null,br=null,vr=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vr||null==hr||hr!==Q(r)||("selectionStart"in(r=hr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},br&&sr(br,r)||(br=r,0<(r=Vr(yr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=hr)))}function kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xr={animationend:kr("Animation","AnimationEnd"),animationiteration:kr("Animation","AnimationIteration"),animationstart:kr("Animation","AnimationStart"),transitionend:kr("Transition","TransitionEnd")},Sr={},Er={};function _r(e){if(Sr[e])return Sr[e];if(!xr[e])return e;var t,n=xr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Er)return Sr[e]=n[t];return e}c&&(Er=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);var Cr=_r("animationend"),Ar=_r("animationiteration"),Tr=_r("animationstart"),jr=_r("transitionend"),Pr=new Map,Nr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rr(e,t){Pr.set(e,t),s(t,[e])}for(var Lr=0;Lr<Nr.length;Lr++){var Or=Nr[Lr];Rr(Or.toLowerCase(),"on"+(Or[0].toUpperCase()+Or.slice(1)))}Rr(Cr,"onAnimationEnd"),Rr(Ar,"onAnimationIteration"),Rr(Tr,"onAnimationStart"),Rr("dblclick","onDoubleClick"),Rr("focusin","onFocus"),Rr("focusout","onBlur"),Rr(jr,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ir=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dr));function Fr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,l,s,u){if($e.apply(this,arguments),Ie){if(!Ie)throw Error(a(198));var c=Fe;Ie=!1,Fe=null,Me||(Me=!0,ze=c)}}(r,t,void 0,e),e.currentTarget=null}function Mr(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==a&&o.isPropagationStopped())break e;Fr(o,l,u),a=s}else for(i=0;i<r.length;i++){if(s=(l=r[i]).instance,u=l.currentTarget,l=l.listener,s!==a&&o.isPropagationStopped())break e;Fr(o,l,u),a=s}}}if(Me)throw e=ze,Me=!1,ze=null,e}function zr(e,t){var n=t[ho];void 0===n&&(n=t[ho]=new Set);var r=e+"__bubble";n.has(r)||(qr(t,e,2,!1),n.add(r))}function Br(e,t,n){var r=0;t&&(r|=4),qr(n,e,r,t)}var $r="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[$r]){e[$r]=!0,i.forEach((function(t){"selectionchange"!==t&&(Ir.has(t)||Br(t,!1,e),Br(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[$r]||(t[$r]=!0,Br("selectionchange",!1,t))}}function qr(e,t,n,r){switch(Yt(t)){case 1:var o=Gt;break;case 4:o=Vt;break;default:o=Wt}n=o.bind(null,t,n,e),o=void 0,!Le||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,o){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var l=r.stateNode.containerInfo;if(l===o||8===l.nodeType&&l.parentNode===o)break;if(4===i)for(i=r.return;null!==i;){var s=i.tag;if((3===s||4===s)&&((s=i.stateNode.containerInfo)===o||8===s.nodeType&&s.parentNode===o))return;i=i.return}for(;null!==l;){if(null===(i=vo(l)))return;if(5===(s=i.tag)||6===s){r=a=i;continue e}l=l.parentNode}}r=r.return}Ne((function(){var r=a,o=ke(n),i=[];e:{var l=Pr.get(e);if(void 0!==l){var s=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":s=An;break;case"focusin":u="focus",s=hn;break;case"focusout":u="blur",s=hn;break;case"beforeblur":case"afterblur":s=hn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=jn;break;case Cr:case Ar:case Tr:s=yn;break;case jr:s=Pn;break;case"scroll":s=pn;break;case"wheel":s=Rn;break;case"copy":case"cut":case"paste":s=vn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=Tn}var c=!!(4&t),d=!c&&"scroll"===e,p=c?null!==l?l+"Capture":null:l;c=[];for(var f,m=r;null!==m;){var g=(f=m).stateNode;if(5===f.tag&&null!==g&&(f=g,null!==p&&(null!=(g=Re(m,p))&&c.push(Gr(m,g,f)))),d)break;m=m.return}0<c.length&&(l=new s(l,u,null,n,o),i.push({event:l,listeners:c}))}}if(!(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===we||!(u=n.relatedTarget||n.fromElement)||!vo(u)&&!u[go])&&(s||l)&&(l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window,s?(s=r,null!==(u=(u=n.relatedTarget||n.toElement)?vo(u):null)&&(u!==(d=Ue(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(s=null,u=r),s!==u)){if(c=mn,g="onMouseLeave",p="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(c=Tn,g="onPointerLeave",p="onPointerEnter",m="pointer"),d=null==s?l:ko(s),f=null==u?l:ko(u),(l=new c(g,m+"leave",s,n,o)).target=d,l.relatedTarget=f,g=null,vo(o)===r&&((c=new c(p,m+"enter",u,n,o)).target=f,c.relatedTarget=d,g=c),d=g,s&&u)e:{for(p=u,m=0,f=c=s;f;f=Wr(f))m++;for(f=0,g=p;g;g=Wr(g))f++;for(;0<m-f;)c=Wr(c),m--;for(;0<f-m;)p=Wr(p),f--;for(;m--;){if(c===p||null!==p&&c===p.alternate)break e;c=Wr(c),p=Wr(p)}c=null}else c=null;null!==s&&Qr(i,l,s,c,!1),null!==u&&null!==d&&Qr(i,d,u,c,!0)}if("select"===(s=(l=r?ko(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var h=Yn;else if(Hn(l))if(Zn)h=ir;else{h=or;var y=rr}else(s=l.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(h=ar);switch(h&&(h=h(e,r))?Gn(i,h,n,o):(y&&y(e,l,r),"focusout"===e&&(y=l._wrapperState)&&y.controlled&&"number"===l.type&&ee(l,"number",l.value)),y=r?ko(r):window,e){case"focusin":(Hn(y)||"true"===y.contentEditable)&&(hr=y,yr=r,br=null);break;case"focusout":br=yr=hr=null;break;case"mousedown":vr=!0;break;case"contextmenu":case"mouseup":case"dragend":vr=!1,wr(i,n,o);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":wr(i,n,o)}var b;if(On)e:{switch(e){case"compositionstart":var v="onCompositionStart";break e;case"compositionend":v="onCompositionEnd";break e;case"compositionupdate":v="onCompositionUpdate";break e}v=void 0}else Un?Bn(e,n)&&(v="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(v="onCompositionStart");v&&(Fn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==v?"onCompositionEnd"===v&&Un&&(b=en()):(Xt="value"in(Zt=o)?Zt.value:Zt.textContent,Un=!0)),0<(y=Vr(r,v)).length&&(v=new wn(v,e,null,n,o),i.push({event:v,listeners:y}),b?v.data=b:null!==(b=$n(n))&&(v.data=b))),(b=In?function(e,t){switch(e){case"compositionend":return $n(t);case"keypress":return 32!==t.which?null:(zn=!0,Mn);case"textInput":return(e=t.data)===Mn&&zn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!On&&Bn(e,t)?(e=en(),Jt=Xt=Zt=null,Un=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Fn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Vr(r,"onBeforeInput")).length&&(o=new wn("onBeforeInput","beforeinput",null,n,o),i.push({event:o,listeners:r}),o.data=b))}Mr(i,t)}))}function Gr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;5===o.tag&&null!==a&&(o=a,null!=(a=Re(e,n))&&r.unshift(Gr(e,a,o)),null!=(a=Re(e,t))&&r.push(Gr(e,a,o))),e=e.return}return r}function Wr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Qr(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(null!==s&&s===r)break;5===l.tag&&null!==u&&(l=u,o?null!=(s=Re(n,a))&&i.unshift(Gr(n,s,l)):o||null!=(s=Re(n,a))&&i.push(Gr(n,s,l))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var Kr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Zr(e){return("string"==typeof e?e:""+e).replace(Kr,"\n").replace(Yr,"")}function Xr(e,t,n){if(t=Zr(t),Zr(e)!==t&&n)throw Error(a(425))}function Jr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"==typeof setTimeout?setTimeout:void 0,oo="function"==typeof clearTimeout?clearTimeout:void 0,ao="function"==typeof Promise?Promise:void 0,io="function"==typeof queueMicrotask?queueMicrotask:void 0!==ao?function(e){return ao.resolve(null).then(e).catch(lo)}:ro;function lo(e){setTimeout((function(){throw e}))}function so(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Ut(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Ut(t)}function uo(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function co(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var po=Math.random().toString(36).slice(2),fo="__reactFiber$"+po,mo="__reactProps$"+po,go="__reactContainer$"+po,ho="__reactEvents$"+po,yo="__reactListeners$"+po,bo="__reactHandles$"+po;function vo(e){var t=e[fo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[go]||n[fo]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=co(e);null!==e;){if(n=e[fo])return n;e=co(e)}return t}n=(e=n).parentNode}return null}function wo(e){return!(e=e[fo]||e[go])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ko(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function xo(e){return e[mo]||null}var So=[],Eo=-1;function _o(e){return{current:e}}function Co(e){0>Eo||(e.current=So[Eo],So[Eo]=null,Eo--)}function Ao(e,t){Eo++,So[Eo]=e.current,e.current=t}var To={},jo=_o(To),Po=_o(!1),No=To;function Ro(e,t){var n=e.type.contextTypes;if(!n)return To;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Lo(e){return null!=(e=e.childContextTypes)}function Oo(){Co(Po),Co(jo)}function Do(e,t,n){if(jo.current!==To)throw Error(a(168));Ao(jo,t),Ao(Po,n)}function Io(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,q(e)||"Unknown",o));return F({},n,r)}function Fo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||To,No=jo.current,Ao(jo,e),Ao(Po,Po.current),!0}function Mo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Io(e,t,No),r.__reactInternalMemoizedMergedChildContext=e,Co(Po),Co(jo),Ao(jo,e)):Co(Po),Ao(Po,n)}var zo=null,Bo=!1,$o=!1;function Uo(e){null===zo?zo=[e]:zo.push(e)}function qo(){if(!$o&&null!==zo){$o=!0;var e=0,t=vt;try{var n=zo;for(vt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}zo=null,Bo=!1}catch(o){throw null!==zo&&(zo=zo.slice(e+1)),We(Je,qo),o}finally{vt=t,$o=!1}}return null}var Ho=[],Go=0,Vo=null,Wo=0,Qo=[],Ko=0,Yo=null,Zo=1,Xo="";function Jo(e,t){Ho[Go++]=Wo,Ho[Go++]=Vo,Vo=e,Wo=t}function ea(e,t,n){Qo[Ko++]=Zo,Qo[Ko++]=Xo,Qo[Ko++]=Yo,Yo=e;var r=Zo;e=Xo;var o=32-it(r)-1;r&=~(1<<o),n+=1;var a=32-it(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Zo=1<<32-it(t)+o|n<<o|r,Xo=a+e}else Zo=1<<a|n<<o|r,Xo=e}function ta(e){null!==e.return&&(Jo(e,1),ea(e,1,0))}function na(e){for(;e===Vo;)Vo=Ho[--Go],Ho[Go]=null,Wo=Ho[--Go],Ho[Go]=null;for(;e===Yo;)Yo=Qo[--Ko],Qo[Ko]=null,Xo=Qo[--Ko],Qo[Ko]=null,Zo=Qo[--Ko],Qo[Ko]=null}var ra=null,oa=null,aa=!1,ia=null;function la(e,t){var n=Ru(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function sa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ra=e,oa=uo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ra=e,oa=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yo?{id:Zo,overflow:Xo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ru(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ra=e,oa=null,!0);default:return!1}}function ua(e){return!(!(1&e.mode)||128&e.flags)}function ca(e){if(aa){var t=oa;if(t){var n=t;if(!sa(e,t)){if(ua(e))throw Error(a(418));t=uo(n.nextSibling);var r=ra;t&&sa(e,t)?la(r,n):(e.flags=-4097&e.flags|2,aa=!1,ra=e)}}else{if(ua(e))throw Error(a(418));e.flags=-4097&e.flags|2,aa=!1,ra=e}}}function da(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ra=e}function pa(e){if(e!==ra)return!1;if(!aa)return da(e),aa=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=oa)){if(ua(e))throw fa(),Error(a(418));for(;t;)la(e,t),t=uo(t.nextSibling)}if(da(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oa=uo(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oa=null}}else oa=ra?uo(e.stateNode.nextSibling):null;return!0}function fa(){for(var e=oa;e;)e=uo(e.nextSibling)}function ma(){oa=ra=null,aa=!1}function ga(e){null===ia?ia=[e]:ia.push(e)}var ha=w.ReactCurrentBatchConfig;function ya(e,t){if(e&&e.defaultProps){for(var n in t=F({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var ba=_o(null),va=null,wa=null,ka=null;function xa(){ka=wa=va=null}function Sa(e){var t=ba.current;Co(ba),e._currentValue=t}function Ea(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _a(e,t){va=e,ka=wa=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(wl=!0),e.firstContext=null)}function Ca(e){var t=e._currentValue;if(ka!==e)if(e={context:e,memoizedValue:t,next:null},null===wa){if(null===va)throw Error(a(308));wa=e,va.dependencies={lanes:0,firstContext:e}}else wa=wa.next=e;return t}var Aa=null;function Ta(e){null===Aa?Aa=[e]:Aa.push(e)}function ja(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Ta(t)):(n.next=o.next,o.next=n),t.interleaved=n,Pa(e,r)}function Pa(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Na=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function La(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Oa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Da(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&js){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Pa(e,n)}return null===(o=r.interleaved)?(t.next=t,Ta(r)):(t.next=o.next,o.next=t),r.interleaved=t,Pa(e,n)}function Ia(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}function Fa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ma(e,t,n,r){var o=e.updateQueue;Na=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var s=l,u=s.next;s.next=null,null===i?a=u:i.next=u,i=s;var c=e.alternate;null!==c&&((l=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s))}if(null!==a){var d=o.baseState;for(i=0,c=u=s=null,l=a;;){var p=l.lane,f=l.eventTime;if((r&p)===p){null!==c&&(c=c.next={eventTime:f,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,g=l;switch(p=t,f=n,g.tag){case 1:if("function"==typeof(m=g.payload)){d=m.call(f,d,p);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(p="function"==typeof(m=g.payload)?m.call(f,d,p):m))break e;d=F({},d,p);break e;case 2:Na=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(p=o.effects)?o.effects=[l]:p.push(l))}else f={eventTime:f,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(u=c=f,s=d):c=c.next=f,i|=p;if(null===(l=l.next)){if(null===(l=o.shared.pending))break;l=(p=l).next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}if(null===c&&(s=d),o.baseState=s,o.firstBaseUpdate=u,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{i|=o.lane,o=o.next}while(o!==t)}else null===a&&(o.shared.lanes=0);Fs|=i,e.lanes=i,e.memoizedState=d}}function za(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(a(191,o));o.call(r)}}}var Ba=(new r.Component).refs;function $a(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:F({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Ua={isMounted:function(e){return!!(e=e._reactInternals)&&Ue(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tu(),o=nu(e),a=Oa(r,o);a.payload=t,null!=n&&(a.callback=n),null!==(t=Da(e,a,o))&&(ru(t,e,o,r),Ia(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tu(),o=nu(e),a=Oa(r,o);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=Da(e,a,o))&&(ru(t,e,o,r),Ia(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tu(),r=nu(e),o=Oa(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Da(e,o,r))&&(ru(t,e,r,n),Ia(t,e,r))}};function qa(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!sr(n,r)||!sr(o,a))}function Ha(e,t,n){var r=!1,o=To,a=t.contextType;return"object"==typeof a&&null!==a?a=Ca(a):(o=Lo(t)?No:jo.current,a=(r=null!=(r=t.contextTypes))?Ro(e,o):To),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ua,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ga(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ua.enqueueReplaceState(t,t.state,null)}function Va(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Ba,Ra(e);var a=t.contextType;"object"==typeof a&&null!==a?o.context=Ca(a):(a=Lo(t)?No:jo.current,o.context=Ro(e,a)),o.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&($a(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Ua.enqueueReplaceState(o,o.state,null),Ma(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function Wa(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs;t===Ba&&(t=o.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Qa(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ka(e){return(0,e._init)(e._payload)}function Ya(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ou(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function l(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Mu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function u(e,t,n,r){var a=n.type;return a===S?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===R&&Ka(a)===t.type)?((r=o(t,n.props)).ref=Wa(e,t,n),r.return=e,r):((r=Du(n.type,n.key,n.props,null,e.mode,r)).ref=Wa(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=zu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=Iu(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Mu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case k:return(n=Du(t.type,t.key,t.props,null,e.mode,n)).ref=Wa(e,null,t),n.return=e,n;case x:return(t=zu(t,e.mode,n)).return=e,t;case R:return p(e,(0,t._init)(t._payload),n)}if(te(t)||D(t))return(t=Iu(t,e.mode,n,null)).return=e,t;Qa(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case k:return n.key===o?u(e,t,n,r):null;case x:return n.key===o?c(e,t,n,r):null;case R:return f(e,t,(o=n._init)(n._payload),r)}if(te(n)||D(n))return null!==o?null:d(e,t,n,r,null);Qa(e,n)}return null}function m(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case k:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case x:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case R:return m(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||D(r))return d(t,e=e.get(n)||null,r,o,null);Qa(t,r)}return null}function g(o,a,l,s){for(var u=null,c=null,d=a,g=a=0,h=null;null!==d&&g<l.length;g++){d.index>g?(h=d,d=null):h=d.sibling;var y=f(o,d,l[g],s);if(null===y){null===d&&(d=h);break}e&&d&&null===y.alternate&&t(o,d),a=i(y,a,g),null===c?u=y:c.sibling=y,c=y,d=h}if(g===l.length)return n(o,d),aa&&Jo(o,g),u;if(null===d){for(;g<l.length;g++)null!==(d=p(o,l[g],s))&&(a=i(d,a,g),null===c?u=d:c.sibling=d,c=d);return aa&&Jo(o,g),u}for(d=r(o,d);g<l.length;g++)null!==(h=m(d,o,g,l[g],s))&&(e&&null!==h.alternate&&d.delete(null===h.key?g:h.key),a=i(h,a,g),null===c?u=h:c.sibling=h,c=h);return e&&d.forEach((function(e){return t(o,e)})),aa&&Jo(o,g),u}function h(o,l,s,u){var c=D(s);if("function"!=typeof c)throw Error(a(150));if(null==(s=c.call(s)))throw Error(a(151));for(var d=c=null,g=l,h=l=0,y=null,b=s.next();null!==g&&!b.done;h++,b=s.next()){g.index>h?(y=g,g=null):y=g.sibling;var v=f(o,g,b.value,u);if(null===v){null===g&&(g=y);break}e&&g&&null===v.alternate&&t(o,g),l=i(v,l,h),null===d?c=v:d.sibling=v,d=v,g=y}if(b.done)return n(o,g),aa&&Jo(o,h),c;if(null===g){for(;!b.done;h++,b=s.next())null!==(b=p(o,b.value,u))&&(l=i(b,l,h),null===d?c=b:d.sibling=b,d=b);return aa&&Jo(o,h),c}for(g=r(o,g);!b.done;h++,b=s.next())null!==(b=m(g,o,h,b.value,u))&&(e&&null!==b.alternate&&g.delete(null===b.key?h:b.key),l=i(b,l,h),null===d?c=b:d.sibling=b,d=b);return e&&g.forEach((function(e){return t(o,e)})),aa&&Jo(o,h),c}return function e(r,a,i,s){if("object"==typeof i&&null!==i&&i.type===S&&null===i.key&&(i=i.props.children),"object"==typeof i&&null!==i){switch(i.$$typeof){case k:e:{for(var u=i.key,c=a;null!==c;){if(c.key===u){if((u=i.type)===S){if(7===c.tag){n(r,c.sibling),(a=o(c,i.props.children)).return=r,r=a;break e}}else if(c.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===R&&Ka(u)===c.type){n(r,c.sibling),(a=o(c,i.props)).ref=Wa(r,c,i),a.return=r,r=a;break e}n(r,c);break}t(r,c),c=c.sibling}i.type===S?((a=Iu(i.props.children,r.mode,s,i.key)).return=r,r=a):((s=Du(i.type,i.key,i.props,null,r.mode,s)).ref=Wa(r,a,i),s.return=r,r=s)}return l(r);case x:e:{for(c=i.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===i.containerInfo&&a.stateNode.implementation===i.implementation){n(r,a.sibling),(a=o(a,i.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=zu(i,r.mode,s)).return=r,r=a}return l(r);case R:return e(r,a,(c=i._init)(i._payload),s)}if(te(i))return g(r,a,i,s);if(D(i))return h(r,a,i,s);Qa(r,i)}return"string"==typeof i&&""!==i||"number"==typeof i?(i=""+i,null!==a&&6===a.tag?(n(r,a.sibling),(a=o(a,i)).return=r,r=a):(n(r,a),(a=Mu(i,r.mode,s)).return=r,r=a),l(r)):n(r,a)}}var Za=Ya(!0),Xa=Ya(!1),Ja={},ei=_o(Ja),ti=_o(Ja),ni=_o(Ja);function ri(e){if(e===Ja)throw Error(a(174));return e}function oi(e,t){switch(Ao(ni,t),Ao(ti,e),Ao(ei,Ja),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Co(ei),Ao(ei,t)}function ai(){Co(ei),Co(ti),Co(ni)}function ii(e){ri(ni.current);var t=ri(ei.current),n=se(t,e.type);t!==n&&(Ao(ti,e),Ao(ei,n))}function li(e){ti.current===e&&(Co(ei),Co(ti))}var si=_o(0);function ui(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ci=[];function di(){for(var e=0;e<ci.length;e++)ci[e]._workInProgressVersionPrimary=null;ci.length=0}var pi=w.ReactCurrentDispatcher,fi=w.ReactCurrentBatchConfig,mi=0,gi=null,hi=null,yi=null,bi=!1,vi=!1,wi=0,ki=0;function xi(){throw Error(a(321))}function Si(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function Ei(e,t,n,r,o,i){if(mi=i,gi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,pi.current=null===e||null===e.memoizedState?ll:sl,e=n(r,o),vi){i=0;do{if(vi=!1,wi=0,25<=i)throw Error(a(301));i+=1,yi=hi=null,t.updateQueue=null,pi.current=ul,e=n(r,o)}while(vi)}if(pi.current=il,t=null!==hi&&null!==hi.next,mi=0,yi=hi=gi=null,bi=!1,t)throw Error(a(300));return e}function _i(){var e=0!==wi;return wi=0,e}function Ci(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===yi?gi.memoizedState=yi=e:yi=yi.next=e,yi}function Ai(){if(null===hi){var e=gi.alternate;e=null!==e?e.memoizedState:null}else e=hi.next;var t=null===yi?gi.memoizedState:yi.next;if(null!==t)yi=t,hi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(hi=e).memoizedState,baseState:hi.baseState,baseQueue:hi.baseQueue,queue:hi.queue,next:null},null===yi?gi.memoizedState=yi=e:yi=yi.next=e}return yi}function Ti(e,t){return"function"==typeof t?t(e):t}function ji(e){var t=Ai(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=hi,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var s=l=null,u=null,c=i;do{var d=c.lane;if((mi&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var p={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(s=u=p,l=r):u=u.next=p,gi.lanes|=d,Fs|=d}c=c.next}while(null!==c&&c!==i);null===u?l=r:u.next=s,lr(r,t.memoizedState)||(wl=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,gi.lanes|=i,Fs|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Pi(e){var t=Ai(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var l=o=o.next;do{i=e(i,l.action),l=l.next}while(l!==o);lr(i,t.memoizedState)||(wl=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Ni(){}function Ri(e,t){var n=gi,r=Ai(),o=t(),i=!lr(r.memoizedState,o);if(i&&(r.memoizedState=o,wl=!0),r=r.queue,Hi(Di.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==yi&&1&yi.memoizedState.tag){if(n.flags|=2048,zi(9,Oi.bind(null,n,r,o,t),void 0,null),null===Ps)throw Error(a(349));30&mi||Li(n,t,o)}return o}function Li(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=gi.updateQueue)?(t={lastEffect:null,stores:null},gi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Oi(e,t,n,r){t.value=n,t.getSnapshot=r,Ii(t)&&Fi(e)}function Di(e,t,n){return n((function(){Ii(t)&&Fi(e)}))}function Ii(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lr(e,n)}catch(r){return!0}}function Fi(e){var t=Pa(e,1);null!==t&&ru(t,e,1,-1)}function Mi(e){var t=Ci();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:e},t.queue=e,e=e.dispatch=nl.bind(null,gi,e),[t.memoizedState,e]}function zi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=gi.updateQueue)?(t={lastEffect:null,stores:null},gi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Bi(){return Ai().memoizedState}function $i(e,t,n,r){var o=Ci();gi.flags|=e,o.memoizedState=zi(1|t,n,void 0,void 0===r?null:r)}function Ui(e,t,n,r){var o=Ai();r=void 0===r?null:r;var a=void 0;if(null!==hi){var i=hi.memoizedState;if(a=i.destroy,null!==r&&Si(r,i.deps))return void(o.memoizedState=zi(t,n,a,r))}gi.flags|=e,o.memoizedState=zi(1|t,n,a,r)}function qi(e,t){return $i(8390656,8,e,t)}function Hi(e,t){return Ui(2048,8,e,t)}function Gi(e,t){return Ui(4,2,e,t)}function Vi(e,t){return Ui(4,4,e,t)}function Wi(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Qi(e,t,n){return n=null!=n?n.concat([e]):null,Ui(4,4,Wi.bind(null,t,e),n)}function Ki(){}function Yi(e,t){var n=Ai();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Si(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Zi(e,t){var n=Ai();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Si(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Xi(e,t,n){return 21&mi?(lr(n,t)||(n=gt(),gi.lanes|=n,Fs|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,wl=!0),e.memoizedState=n)}function Ji(e,t){var n=vt;vt=0!==n&&4>n?n:4,e(!0);var r=fi.transition;fi.transition={};try{e(!1),t()}finally{vt=n,fi.transition=r}}function el(){return Ai().memoizedState}function tl(e,t,n){var r=nu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rl(e))ol(t,n);else if(null!==(n=ja(e,t,n,r))){ru(n,e,r,tu()),al(n,t,r)}}function nl(e,t,n){var r=nu(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rl(e))ol(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,l=a(i,n);if(o.hasEagerState=!0,o.eagerState=l,lr(l,i)){var s=t.interleaved;return null===s?(o.next=o,Ta(t)):(o.next=s.next,s.next=o),void(t.interleaved=o)}}catch(u){}null!==(n=ja(e,t,o,r))&&(ru(n,e,r,o=tu()),al(n,t,r))}}function rl(e){var t=e.alternate;return e===gi||null!==t&&t===gi}function ol(e,t){vi=bi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function al(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}var il={readContext:Ca,useCallback:xi,useContext:xi,useEffect:xi,useImperativeHandle:xi,useInsertionEffect:xi,useLayoutEffect:xi,useMemo:xi,useReducer:xi,useRef:xi,useState:xi,useDebugValue:xi,useDeferredValue:xi,useTransition:xi,useMutableSource:xi,useSyncExternalStore:xi,useId:xi,unstable_isNewReconciler:!1},ll={readContext:Ca,useCallback:function(e,t){return Ci().memoizedState=[e,void 0===t?null:t],e},useContext:Ca,useEffect:qi,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,$i(4194308,4,Wi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $i(4194308,4,e,t)},useInsertionEffect:function(e,t){return $i(4,2,e,t)},useMemo:function(e,t){var n=Ci();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ci();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=tl.bind(null,gi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ci().memoizedState=e},useState:Mi,useDebugValue:Ki,useDeferredValue:function(e){return Ci().memoizedState=e},useTransition:function(){var e=Mi(!1),t=e[0];return e=Ji.bind(null,e[1]),Ci().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=gi,o=Ci();if(aa){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Ps)throw Error(a(349));30&mi||Li(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,qi(Di.bind(null,r,i,e),[e]),r.flags|=2048,zi(9,Oi.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ci(),t=Ps.identifierPrefix;if(aa){var n=Xo;t=":"+t+"R"+(n=(Zo&~(1<<32-it(Zo)-1)).toString(32)+n),0<(n=wi++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ki++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sl={readContext:Ca,useCallback:Yi,useContext:Ca,useEffect:Hi,useImperativeHandle:Qi,useInsertionEffect:Gi,useLayoutEffect:Vi,useMemo:Zi,useReducer:ji,useRef:Bi,useState:function(){return ji(Ti)},useDebugValue:Ki,useDeferredValue:function(e){return Xi(Ai(),hi.memoizedState,e)},useTransition:function(){return[ji(Ti)[0],Ai().memoizedState]},useMutableSource:Ni,useSyncExternalStore:Ri,useId:el,unstable_isNewReconciler:!1},ul={readContext:Ca,useCallback:Yi,useContext:Ca,useEffect:Hi,useImperativeHandle:Qi,useInsertionEffect:Gi,useLayoutEffect:Vi,useMemo:Zi,useReducer:Pi,useRef:Bi,useState:function(){return Pi(Ti)},useDebugValue:Ki,useDeferredValue:function(e){var t=Ai();return null===hi?t.memoizedState=e:Xi(t,hi.memoizedState,e)},useTransition:function(){return[Pi(Ti)[0],Ai().memoizedState]},useMutableSource:Ni,useSyncExternalStore:Ri,useId:el,unstable_isNewReconciler:!1};function cl(e,t){try{var n="",r=t;do{n+=$(r),r=r.return}while(r);var o=n}catch(a){o="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:o,digest:null}}function dl(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function pl(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var fl="function"==typeof WeakMap?WeakMap:Map;function ml(e,t,n){(n=Oa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gs||(Gs=!0,Vs=r),pl(0,t)},n}function gl(e,t,n){(n=Oa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){pl(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){pl(0,t),"function"!=typeof r&&(null===Ws?Ws=new Set([this]):Ws.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function hl(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fl;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Cu.bind(null,e,t,n),t.then(e,e))}function yl(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function bl(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Oa(-1,1)).tag=2,Da(n,t,1))),n.lanes|=1),e)}var vl=w.ReactCurrentOwner,wl=!1;function kl(e,t,n,r){t.child=null===e?Xa(t,null,n,r):Za(t,e.child,n,r)}function xl(e,t,n,r,o){n=n.render;var a=t.ref;return _a(t,o),r=Ei(e,t,n,r,a,o),n=_i(),null===e||wl?(aa&&n&&ta(t),t.flags|=1,kl(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Gl(e,t,o))}function Sl(e,t,n,r,o){if(null===e){var a=n.type;return"function"!=typeof a||Lu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Du(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,El(e,t,a,r,o))}if(a=e.child,!(e.lanes&o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:sr)(i,r)&&e.ref===t.ref)return Gl(e,t,o)}return t.flags|=1,(e=Ou(a,r)).ref=t.ref,e.return=t,t.child=e}function El(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(sr(a,r)&&e.ref===t.ref){if(wl=!1,t.pendingProps=r=a,!(e.lanes&o))return t.lanes=e.lanes,Gl(e,t,o);131072&e.flags&&(wl=!0)}}return Al(e,t,n,r,o)}function _l(e,t,n){var r=t.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ao(Os,Ls),Ls|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ao(Os,Ls),Ls|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ao(Os,Ls),Ls|=n;else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ao(Os,Ls),Ls|=r;return kl(e,t,o,n),t.child}function Cl(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Al(e,t,n,r,o){var a=Lo(n)?No:jo.current;return a=Ro(t,a),_a(t,o),n=Ei(e,t,n,r,a,o),r=_i(),null===e||wl?(aa&&r&&ta(t),t.flags|=1,kl(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Gl(e,t,o))}function Tl(e,t,n,r,o){if(Lo(n)){var a=!0;Fo(t)}else a=!1;if(_a(t,o),null===t.stateNode)Hl(e,t),Ha(t,n,r),Va(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,l=t.memoizedProps;i.props=l;var s=i.context,u=n.contextType;"object"==typeof u&&null!==u?u=Ca(u):u=Ro(t,u=Lo(n)?No:jo.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==r||s!==u)&&Ga(t,i,r,u),Na=!1;var p=t.memoizedState;i.state=p,Ma(t,r,i,o),s=t.memoizedState,l!==r||p!==s||Po.current||Na?("function"==typeof c&&($a(t,n,c,r),s=t.memoizedState),(l=Na||qa(t,n,l,r,p,s,u))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),i.props=r,i.state=s,i.context=u,r=l):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,La(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:ya(t.type,l),i.props=u,d=t.pendingProps,p=i.context,"object"==typeof(s=n.contextType)&&null!==s?s=Ca(s):s=Ro(t,s=Lo(n)?No:jo.current);var f=n.getDerivedStateFromProps;(c="function"==typeof f||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(l!==d||p!==s)&&Ga(t,i,r,s),Na=!1,p=t.memoizedState,i.state=p,Ma(t,r,i,o);var m=t.memoizedState;l!==d||p!==m||Po.current||Na?("function"==typeof f&&($a(t,n,f,r),m=t.memoizedState),(u=Na||qa(t,n,u,r,p,m,s)||!1)?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,m,s),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,m,s)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=s,r=u):("function"!=typeof i.componentDidUpdate||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return jl(e,t,n,r,a,o)}function jl(e,t,n,r,o,a){Cl(e,t);var i=!!(128&t.flags);if(!r&&!i)return o&&Mo(t,n,!1),Gl(e,t,a);r=t.stateNode,vl.current=t;var l=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=Za(t,e.child,null,a),t.child=Za(t,null,l,a)):kl(e,t,l,a),t.memoizedState=r.state,o&&Mo(t,n,!0),t.child}function Pl(e){var t=e.stateNode;t.pendingContext?Do(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Do(0,t.context,!1),oi(e,t.containerInfo)}function Nl(e,t,n,r,o){return ma(),ga(o),t.flags|=256,kl(e,t,n,r),t.child}var Rl,Ll,Ol,Dl,Il={dehydrated:null,treeContext:null,retryLane:0};function Fl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ml(e,t,n){var r,o=t.pendingProps,i=si.current,l=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&i)),r?(l=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Ao(si,1&i),null===e)return ca(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=o.children,e=o.fallback,l?(o=t.mode,l=t.child,s={mode:"hidden",children:s},1&o||null===l?l=Fu(s,o,0,null):(l.childLanes=0,l.pendingProps=s),e=Iu(e,o,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Fl(n),t.memoizedState=Il,e):zl(t,s));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,l){if(n)return 256&t.flags?(t.flags&=-257,Bl(e,t,l,r=dl(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Fu({mode:"visible",children:r.children},o,0,null),(i=Iu(i,o,l,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,1&t.mode&&Za(t,e.child,null,l),t.child.memoizedState=Fl(l),t.memoizedState=Il,i);if(!(1&t.mode))return Bl(e,t,l,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var s=r.dgst;return r=s,Bl(e,t,l,r=dl(i=Error(a(419)),r,void 0))}if(s=!!(l&e.childLanes),wl||s){if(null!==(r=Ps)){switch(l&-l){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=o&(r.suspendedLanes|l)?0:o)&&o!==i.retryLane&&(i.retryLane=o,Pa(e,o),ru(r,e,o,-1))}return hu(),Bl(e,t,l,r=dl(Error(a(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Tu.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,oa=uo(o.nextSibling),ra=t,aa=!0,ia=null,null!==e&&(Qo[Ko++]=Zo,Qo[Ko++]=Xo,Qo[Ko++]=Yo,Zo=e.id,Xo=e.overflow,Yo=t),t=zl(t,r.children),t.flags|=4096,t)}(e,t,s,o,r,i,n);if(l){l=o.fallback,s=t.mode,r=(i=e.child).sibling;var u={mode:"hidden",children:o.children};return 1&s||t.child===i?(o=Ou(i,u)).subtreeFlags=14680064&i.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=u,t.deletions=null),null!==r?l=Ou(r,l):(l=Iu(l,s,n,null)).flags|=2,l.return=t,o.return=t,o.sibling=l,t.child=o,o=l,l=t.child,s=null===(s=e.child.memoizedState)?Fl(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=Il,o}return e=(l=e.child).sibling,o=Ou(l,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function zl(e,t){return(t=Fu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bl(e,t,n,r){return null!==r&&ga(r),Za(t,e.child,null,n),(e=zl(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function $l(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ea(e.return,t,n)}function Ul(e,t,n,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function ql(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(kl(e,t,r.children,n),2&(r=si.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&$l(e,n,t);else if(19===e.tag)$l(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ao(si,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===ui(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ul(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ui(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ul(t,!0,n,null,a);break;case"together":Ul(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Hl(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Fs|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ou(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ou(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Vl(e,t){if(!aa)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Wl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ql(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wl(t),null;case 1:case 17:return Lo(t.type)&&Oo(),Wl(t),null;case 3:return r=t.stateNode,ai(),Co(Po),Co(jo),di(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(pa(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ia&&(lu(ia),ia=null))),Ll(e,t),Wl(t),null;case 5:li(t);var o=ri(ni.current);if(n=t.type,null!==e&&null!=t.stateNode)Ol(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Wl(t),null}if(e=ri(ei.current),pa(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[fo]=t,r[mo]=i,e=!!(1&t.mode),n){case"dialog":zr("cancel",r),zr("close",r);break;case"iframe":case"object":case"embed":zr("load",r);break;case"video":case"audio":for(o=0;o<Dr.length;o++)zr(Dr[o],r);break;case"source":zr("error",r);break;case"img":case"image":case"link":zr("error",r),zr("load",r);break;case"details":zr("toggle",r);break;case"input":Y(r,i),zr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},zr("invalid",r);break;case"textarea":oe(r,i),zr("invalid",r)}for(var s in be(n,i),o=null,i)if(i.hasOwnProperty(s)){var u=i[s];"children"===s?"string"==typeof u?r.textContent!==u&&(!0!==i.suppressHydrationWarning&&Xr(r.textContent,u,e),o=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(!0!==i.suppressHydrationWarning&&Xr(r.textContent,u,e),o=["children",""+u]):l.hasOwnProperty(s)&&null!=u&&"onScroll"===s&&zr("scroll",r)}switch(n){case"input":V(r),J(r,i,!0);break;case"textarea":V(r),ie(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=Jr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{s=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=le(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[fo]=t,e[mo]=r,Rl(e,t,!1,!1),t.stateNode=e;e:{switch(s=ve(n,r),n){case"dialog":zr("cancel",e),zr("close",e),o=r;break;case"iframe":case"object":case"embed":zr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Dr.length;o++)zr(Dr[o],e);o=r;break;case"source":zr("error",e),o=r;break;case"img":case"image":case"link":zr("error",e),zr("load",e),o=r;break;case"details":zr("toggle",e),o=r;break;case"input":Y(e,r),o=K(e,r),zr("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=F({},r,{value:void 0}),zr("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),zr("invalid",e)}for(i in be(n,o),u=o)if(u.hasOwnProperty(i)){var c=u[i];"style"===i?he(e,c):"dangerouslySetInnerHTML"===i?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===i?"string"==typeof c?("textarea"!==n||""!==c)&&pe(e,c):"number"==typeof c&&pe(e,""+c):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(l.hasOwnProperty(i)?null!=c&&"onScroll"===i&&zr("scroll",e):null!=c&&v(e,i,c,s))}switch(n){case"input":V(e),J(e,r,!1);break;case"textarea":V(e),ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?ne(e,!!r.multiple,i,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Wl(t),null;case 6:if(e&&null!=t.stateNode)Dl(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(n=ri(ni.current),ri(ei.current),pa(t)){if(r=t.stateNode,n=t.memoizedProps,r[fo]=t,(i=r.nodeValue!==n)&&null!==(e=ra))switch(e.tag){case 3:Xr(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xr(r.nodeValue,n,!!(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[fo]=t,t.stateNode=r}return Wl(t),null;case 13:if(Co(si),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(aa&&null!==oa&&1&t.mode&&!(128&t.flags))fa(),ma(),t.flags|=98560,i=!1;else if(i=pa(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(a(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(a(317));i[fo]=t}else ma(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Wl(t),i=!1}else null!==ia&&(lu(ia),ia=null),i=!0;if(!i)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&si.current?0===Ds&&(Ds=3):hu())),null!==t.updateQueue&&(t.flags|=4),Wl(t),null);case 4:return ai(),Ll(e,t),null===e&&Ur(t.stateNode.containerInfo),Wl(t),null;case 10:return Sa(t.type._context),Wl(t),null;case 19:if(Co(si),null===(i=t.memoizedState))return Wl(t),null;if(r=!!(128&t.flags),null===(s=i.rendering))if(r)Vl(i,!1);else{if(0!==Ds||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(s=ui(e))){for(t.flags|=128,Vl(i,!1),null!==(r=s.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(s=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ao(si,1&si.current|2),t.child}e=e.sibling}null!==i.tail&&Ze()>qs&&(t.flags|=128,r=!0,Vl(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ui(s))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Vl(i,!0),null===i.tail&&"hidden"===i.tailMode&&!s.alternate&&!aa)return Wl(t),null}else 2*Ze()-i.renderingStartTime>qs&&1073741824!==n&&(t.flags|=128,r=!0,Vl(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=i.last)?n.sibling=s:t.child=s,i.last=s)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ze(),t.sibling=null,n=si.current,Ao(si,r?1&n|2:1&n),t):(Wl(t),null);case 22:case 23:return pu(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Ls)&&(Wl(t),6&t.subtreeFlags&&(t.flags|=8192)):Wl(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Kl(e,t){switch(na(t),t.tag){case 1:return Lo(t.type)&&Oo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ai(),Co(Po),Co(jo),di(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return li(t),null;case 13:if(Co(si),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));ma()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Co(si),null;case 4:return ai(),null;case 10:return Sa(t.type._context),null;case 22:case 23:return pu(),null;default:return null}}Rl=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ll=function(){},Ol=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ri(ei.current);var a,i=null;switch(n){case"input":o=K(e,o),r=K(e,r),i=[];break;case"select":o=F({},o,{value:void 0}),r=F({},r,{value:void 0}),i=[];break;case"textarea":o=re(e,o),r=re(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(c in be(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var s=o[c];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(l.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var u=r[c];if(s=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&u!==s&&(null!=u||null!=s))if("style"===c)if(s){for(a in s)!s.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&s[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(i||(i=[]),i.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,s=s?s.__html:void 0,null!=u&&s!==u&&(i=i||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(i=i||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(l.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&zr("scroll",e),i||s===u||(i=[])):(i=i||[]).push(c,u))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}},Dl=function(e,t,n,r){n!==r&&(t.flags|=4)};var Yl=!1,Zl=!1,Xl="function"==typeof WeakSet?WeakSet:Set,Jl=null;function es(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){_u(e,t,r)}else n.current=null}function ts(e,t,n){try{n()}catch(r){_u(e,t,r)}}var ns=!1;function rs(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&ts(t,n,a)}o=o.next}while(o!==r)}}function os(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function as(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function is(e){var t=e.alternate;null!==t&&(e.alternate=null,is(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fo],delete t[mo],delete t[ho],delete t[yo],delete t[bo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ls(e){return 5===e.tag||3===e.tag||4===e.tag}function ss(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ls(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function us(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(us(e,t,n),e=e.sibling;null!==e;)us(e,t,n),e=e.sibling}function cs(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cs(e,t,n),e=e.sibling;null!==e;)cs(e,t,n),e=e.sibling}var ds=null,ps=!1;function fs(e,t,n){for(n=n.child;null!==n;)ms(e,t,n),n=n.sibling}function ms(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(ot,n)}catch(l){}switch(n.tag){case 5:Zl||es(n,t);case 6:var r=ds,o=ps;ds=null,fs(e,t,n),ps=o,null!==(ds=r)&&(ps?(e=ds,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ds.removeChild(n.stateNode));break;case 18:null!==ds&&(ps?(e=ds,n=n.stateNode,8===e.nodeType?so(e.parentNode,n):1===e.nodeType&&so(e,n),Ut(e)):so(ds,n.stateNode));break;case 4:r=ds,o=ps,ds=n.stateNode.containerInfo,ps=!0,fs(e,t,n),ds=r,ps=o;break;case 0:case 11:case 14:case 15:if(!Zl&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,void 0!==i&&(2&a||4&a)&&ts(n,t,i),o=o.next}while(o!==r)}fs(e,t,n);break;case 1:if(!Zl&&(es(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){_u(n,t,l)}fs(e,t,n);break;case 21:fs(e,t,n);break;case 22:1&n.mode?(Zl=(r=Zl)||null!==n.memoizedState,fs(e,t,n),Zl=r):fs(e,t,n);break;default:fs(e,t,n)}}function gs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xl),t.forEach((function(t){var r=ju.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function hs(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,l=t,s=l;e:for(;null!==s;){switch(s.tag){case 5:ds=s.stateNode,ps=!1;break e;case 3:case 4:ds=s.stateNode.containerInfo,ps=!0;break e}s=s.return}if(null===ds)throw Error(a(160));ms(i,l,o),ds=null,ps=!1;var u=o.alternate;null!==u&&(u.return=null),o.return=null}catch(c){_u(o,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ys(t,e),t=t.sibling}function ys(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hs(t,e),bs(e),4&r){try{rs(3,e,e.return),os(3,e)}catch(h){_u(e,e.return,h)}try{rs(5,e,e.return)}catch(h){_u(e,e.return,h)}}break;case 1:hs(t,e),bs(e),512&r&&null!==n&&es(n,n.return);break;case 5:if(hs(t,e),bs(e),512&r&&null!==n&&es(n,n.return),32&e.flags){var o=e.stateNode;try{pe(o,"")}catch(h){_u(e,e.return,h)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps,l=null!==n?n.memoizedProps:i,s=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===s&&"radio"===i.type&&null!=i.name&&Z(o,i),ve(s,l);var c=ve(s,i);for(l=0;l<u.length;l+=2){var d=u[l],p=u[l+1];"style"===d?he(o,p):"dangerouslySetInnerHTML"===d?de(o,p):"children"===d?pe(o,p):v(o,d,p,c)}switch(s){case"input":X(o,i);break;case"textarea":ae(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var m=i.value;null!=m?ne(o,!!i.multiple,m,!1):f!==!!i.multiple&&(null!=i.defaultValue?ne(o,!!i.multiple,i.defaultValue,!0):ne(o,!!i.multiple,i.multiple?[]:"",!1))}o[mo]=i}catch(h){_u(e,e.return,h)}}break;case 6:if(hs(t,e),bs(e),4&r){if(null===e.stateNode)throw Error(a(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(h){_u(e,e.return,h)}}break;case 3:if(hs(t,e),bs(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ut(t.containerInfo)}catch(h){_u(e,e.return,h)}break;case 4:default:hs(t,e),bs(e);break;case 13:hs(t,e),bs(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(Us=Ze())),4&r&&gs(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Zl=(c=Zl)||d,hs(t,e),Zl=c):hs(t,e),bs(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&1&e.mode)for(Jl=e,d=e.child;null!==d;){for(p=Jl=d;null!==Jl;){switch(m=(f=Jl).child,f.tag){case 0:case 11:case 14:case 15:rs(4,f,f.return);break;case 1:es(f,f.return);var g=f.stateNode;if("function"==typeof g.componentWillUnmount){r=f,n=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(h){_u(r,n,h)}}break;case 5:es(f,f.return);break;case 22:if(null!==f.memoizedState){xs(p);continue}}null!==m?(m.return=f,Jl=m):xs(p)}d=d.sibling}e:for(d=null,p=e;;){if(5===p.tag){if(null===d){d=p;try{o=p.stateNode,c?"function"==typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(s=p.stateNode,l=null!=(u=p.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,s.style.display=ge("display",l))}catch(h){_u(e,e.return,h)}}}else if(6===p.tag){if(null===d)try{p.stateNode.nodeValue=c?"":p.memoizedProps}catch(h){_u(e,e.return,h)}}else if((22!==p.tag&&23!==p.tag||null===p.memoizedState||p===e)&&null!==p.child){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;null===p.sibling;){if(null===p.return||p.return===e)break e;d===p&&(d=null),p=p.return}d===p&&(d=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:hs(t,e),bs(e),4&r&&gs(e);case 21:}}function bs(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ls(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(pe(o,""),r.flags&=-33),cs(e,ss(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;us(e,ss(e),i);break;default:throw Error(a(161))}}catch(l){_u(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vs(e,t,n){Jl=e,ws(e,t,n)}function ws(e,t,n){for(var r=!!(1&e.mode);null!==Jl;){var o=Jl,a=o.child;if(22===o.tag&&r){var i=null!==o.memoizedState||Yl;if(!i){var l=o.alternate,s=null!==l&&null!==l.memoizedState||Zl;l=Yl;var u=Zl;if(Yl=i,(Zl=s)&&!u)for(Jl=o;null!==Jl;)s=(i=Jl).child,22===i.tag&&null!==i.memoizedState?Ss(o):null!==s?(s.return=i,Jl=s):Ss(o);for(;null!==a;)Jl=a,ws(a,t,n),a=a.sibling;Jl=o,Yl=l,Zl=u}ks(e)}else 8772&o.subtreeFlags&&null!==a?(a.return=o,Jl=a):ks(e)}}function ks(e){for(;null!==Jl;){var t=Jl;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Zl||os(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Zl)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ya(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&za(t,i,r);break;case 3:var l=t.updateQueue;if(null!==l){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}za(t,l,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var p=d.dehydrated;null!==p&&Ut(p)}}}break;default:throw Error(a(163))}Zl||512&t.flags&&as(t)}catch(f){_u(t,t.return,f)}}if(t===e){Jl=null;break}if(null!==(n=t.sibling)){n.return=t.return,Jl=n;break}Jl=t.return}}function xs(e){for(;null!==Jl;){var t=Jl;if(t===e){Jl=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Jl=n;break}Jl=t.return}}function Ss(e){for(;null!==Jl;){var t=Jl;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{os(4,t)}catch(s){_u(t,n,s)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(s){_u(t,o,s)}}var a=t.return;try{as(t)}catch(s){_u(t,a,s)}break;case 5:var i=t.return;try{as(t)}catch(s){_u(t,i,s)}}}catch(s){_u(t,t.return,s)}if(t===e){Jl=null;break}var l=t.sibling;if(null!==l){l.return=t.return,Jl=l;break}Jl=t.return}}var Es,_s=Math.ceil,Cs=w.ReactCurrentDispatcher,As=w.ReactCurrentOwner,Ts=w.ReactCurrentBatchConfig,js=0,Ps=null,Ns=null,Rs=0,Ls=0,Os=_o(0),Ds=0,Is=null,Fs=0,Ms=0,zs=0,Bs=null,$s=null,Us=0,qs=1/0,Hs=null,Gs=!1,Vs=null,Ws=null,Qs=!1,Ks=null,Ys=0,Zs=0,Xs=null,Js=-1,eu=0;function tu(){return 6&js?Ze():-1!==Js?Js:Js=Ze()}function nu(e){return 1&e.mode?2&js&&0!==Rs?Rs&-Rs:null!==ha.transition?(0===eu&&(eu=gt()),eu):0!==(e=vt)?e:e=void 0===(e=window.event)?16:Yt(e.type):1}function ru(e,t,n,r){if(50<Zs)throw Zs=0,Xs=null,Error(a(185));yt(e,n,r),2&js&&e===Ps||(e===Ps&&(!(2&js)&&(Ms|=n),4===Ds&&su(e,Rs)),ou(e,r),1===n&&0===js&&!(1&t.mode)&&(qs=Ze()+500,Bo&&qo()))}function ou(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-it(a),l=1<<i,s=o[i];-1===s?l&n&&!(l&r)||(o[i]=ft(l,t)):s<=t&&(e.expiredLanes|=l),a&=~l}}(e,t);var r=pt(e,e===Ps?Rs:0);if(0===r)null!==n&&Qe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Qe(n),1===t)0===e.tag?function(e){Bo=!0,Uo(e)}(uu.bind(null,e)):Uo(uu.bind(null,e)),io((function(){!(6&js)&&qo()})),n=null;else{switch(wt(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Pu(n,au.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function au(e,t){if(Js=-1,eu=0,6&js)throw Error(a(327));var n=e.callbackNode;if(Su()&&e.callbackNode!==n)return null;var r=pt(e,e===Ps?Rs:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=yu(e,r);else{t=r;var o=js;js|=2;var i=gu();for(Ps===e&&Rs===t||(Hs=null,qs=Ze()+500,fu(e,t));;)try{vu();break}catch(s){mu(e,s)}xa(),Cs.current=i,js=o,null!==Ns?t=0:(Ps=null,Rs=0,t=Ds)}if(0!==t){if(2===t&&(0!==(o=mt(e))&&(r=o,t=iu(e,o))),1===t)throw n=Is,fu(e,0),su(e,r),ou(e,Ze()),n;if(6===t)su(e,r);else{if(o=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!lr(a(),o))return!1}catch(l){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=yu(e,r),2===t&&(i=mt(e),0!==i&&(r=i,t=iu(e,i))),1!==t)))throw n=Is,fu(e,0),su(e,r),ou(e,Ze()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:xu(e,$s,Hs);break;case 3:if(su(e,r),(130023424&r)===r&&10<(t=Us+500-Ze())){if(0!==pt(e,0))break;if(((o=e.suspendedLanes)&r)!==r){tu(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(xu.bind(null,e,$s,Hs),t);break}xu(e,$s,Hs);break;case 4:if(su(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var l=31-it(r);i=1<<l,(l=t[l])>o&&(o=l),r&=~i}if(r=o,10<(r=(120>(r=Ze()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_s(r/1960))-r)){e.timeoutHandle=ro(xu.bind(null,e,$s,Hs),r);break}xu(e,$s,Hs);break;default:throw Error(a(329))}}}return ou(e,Ze()),e.callbackNode===n?au.bind(null,e):null}function iu(e,t){var n=Bs;return e.current.memoizedState.isDehydrated&&(fu(e,t).flags|=256),2!==(e=yu(e,t))&&(t=$s,$s=n,null!==t&&lu(t)),e}function lu(e){null===$s?$s=e:$s.push.apply($s,e)}function su(e,t){for(t&=~zs,t&=~Ms,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-it(t),r=1<<n;e[n]=-1,t&=~r}}function uu(e){if(6&js)throw Error(a(327));Su();var t=pt(e,0);if(!(1&t))return ou(e,Ze()),null;var n=yu(e,t);if(0!==e.tag&&2===n){var r=mt(e);0!==r&&(t=r,n=iu(e,r))}if(1===n)throw n=Is,fu(e,0),su(e,t),ou(e,Ze()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xu(e,$s,Hs),ou(e,Ze()),null}function cu(e,t){var n=js;js|=1;try{return e(t)}finally{0===(js=n)&&(qs=Ze()+500,Bo&&qo())}}function du(e){null!==Ks&&0===Ks.tag&&!(6&js)&&Su();var t=js;js|=1;var n=Ts.transition,r=vt;try{if(Ts.transition=null,vt=1,e)return e()}finally{vt=r,Ts.transition=n,!(6&(js=t))&&qo()}}function pu(){Ls=Os.current,Co(Os)}function fu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Ns)for(n=Ns.return;null!==n;){var r=n;switch(na(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Oo();break;case 3:ai(),Co(Po),Co(jo),di();break;case 5:li(r);break;case 4:ai();break;case 13:case 19:Co(si);break;case 10:Sa(r.type._context);break;case 22:case 23:pu()}n=n.return}if(Ps=e,Ns=e=Ou(e.current,null),Rs=Ls=t,Ds=0,Is=null,zs=Ms=Fs=0,$s=Bs=null,null!==Aa){for(t=0;t<Aa.length;t++)if(null!==(r=(n=Aa[t]).interleaved)){n.interleaved=null;var o=r.next,a=n.pending;if(null!==a){var i=a.next;a.next=o,r.next=i}n.pending=r}Aa=null}return e}function mu(e,t){for(;;){var n=Ns;try{if(xa(),pi.current=il,bi){for(var r=gi.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}bi=!1}if(mi=0,yi=hi=gi=null,vi=!1,wi=0,As.current=null,null===n||null===n.return){Ds=1,Is=t,Ns=null;break}e:{var i=e,l=n.return,s=n,u=t;if(t=Rs,s.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,d=s,p=d.tag;if(!(1&d.mode||0!==p&&11!==p&&15!==p)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=yl(l);if(null!==m){m.flags&=-257,bl(m,l,s,0,t),1&m.mode&&hl(i,c,t),u=c;var g=(t=m).updateQueue;if(null===g){var h=new Set;h.add(u),t.updateQueue=h}else g.add(u);break e}if(!(1&t)){hl(i,c,t),hu();break e}u=Error(a(426))}else if(aa&&1&s.mode){var y=yl(l);if(null!==y){!(65536&y.flags)&&(y.flags|=256),bl(y,l,s,0,t),ga(cl(u,s));break e}}i=u=cl(u,s),4!==Ds&&(Ds=2),null===Bs?Bs=[i]:Bs.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,Fa(i,ml(0,u,t));break e;case 1:s=u;var b=i.type,v=i.stateNode;if(!(128&i.flags||"function"!=typeof b.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==Ws&&Ws.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t,Fa(i,gl(i,s,t));break e}}i=i.return}while(null!==i)}ku(n)}catch(w){t=w,Ns===n&&null!==n&&(Ns=n=n.return);continue}break}}function gu(){var e=Cs.current;return Cs.current=il,null===e?il:e}function hu(){0!==Ds&&3!==Ds&&2!==Ds||(Ds=4),null===Ps||!(268435455&Fs)&&!(268435455&Ms)||su(Ps,Rs)}function yu(e,t){var n=js;js|=2;var r=gu();for(Ps===e&&Rs===t||(Hs=null,fu(e,t));;)try{bu();break}catch(o){mu(e,o)}if(xa(),js=n,Cs.current=r,null!==Ns)throw Error(a(261));return Ps=null,Rs=0,Ds}function bu(){for(;null!==Ns;)wu(Ns)}function vu(){for(;null!==Ns&&!Ke();)wu(Ns)}function wu(e){var t=Es(e.alternate,e,Ls);e.memoizedProps=e.pendingProps,null===t?ku(e):Ns=t,As.current=null}function ku(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Kl(n,t)))return n.flags&=32767,void(Ns=n);if(null===e)return Ds=6,void(Ns=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ql(n,t,Ls)))return void(Ns=n);if(null!==(t=t.sibling))return void(Ns=t);Ns=t=e}while(null!==t);0===Ds&&(Ds=5)}function xu(e,t,n){var r=vt,o=Ts.transition;try{Ts.transition=null,vt=1,function(e,t,n,r){do{Su()}while(null!==Ks);if(6&js)throw Error(a(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-it(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}(e,i),e===Ps&&(Ns=Ps=null,Rs=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Qs||(Qs=!0,Pu(tt,(function(){return Su(),null}))),i=!!(15990&n.flags),!!(15990&n.subtreeFlags)||i){i=Ts.transition,Ts.transition=null;var l=vt;vt=1;var s=js;js|=4,As.current=null,function(e,t){if(eo=Ht,fr(e=pr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(k){n=null;break e}var l=0,s=-1,u=-1,c=0,d=0,p=e,f=null;t:for(;;){for(var m;p!==n||0!==o&&3!==p.nodeType||(s=l+o),p!==i||0!==r&&3!==p.nodeType||(u=l+r),3===p.nodeType&&(l+=p.nodeValue.length),null!==(m=p.firstChild);)f=p,p=m;for(;;){if(p===e)break t;if(f===n&&++c===o&&(s=l),f===i&&++d===r&&(u=l),null!==(m=p.nextSibling))break;f=(p=f).parentNode}p=m}n=-1===s||-1===u?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},Ht=!1,Jl=t;null!==Jl;)if(e=(t=Jl).child,1028&t.subtreeFlags&&null!==e)e.return=t,Jl=e;else for(;null!==Jl;){t=Jl;try{var g=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var h=g.memoizedProps,y=g.memoizedState,b=t.stateNode,v=b.getSnapshotBeforeUpdate(t.elementType===t.type?h:ya(t.type,h),y);b.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(a(163))}}catch(k){_u(t,t.return,k)}if(null!==(e=t.sibling)){e.return=t.return,Jl=e;break}Jl=t.return}g=ns,ns=!1}(e,n),ys(n,e),mr(to),Ht=!!eo,to=eo=null,e.current=n,vs(n,e,o),Ye(),js=s,vt=l,Ts.transition=i}else e.current=n;if(Qs&&(Qs=!1,Ks=e,Ys=o),i=e.pendingLanes,0===i&&(Ws=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(ot,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),ou(e,Ze()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Gs)throw Gs=!1,e=Vs,Vs=null,e;!!(1&Ys)&&0!==e.tag&&Su(),i=e.pendingLanes,1&i?e===Xs?Zs++:(Zs=0,Xs=e):Zs=0,qo()}(e,t,n,r)}finally{Ts.transition=o,vt=r}return null}function Su(){if(null!==Ks){var e=wt(Ys),t=Ts.transition,n=vt;try{if(Ts.transition=null,vt=16>e?16:e,null===Ks)var r=!1;else{if(e=Ks,Ks=null,Ys=0,6&js)throw Error(a(331));var o=js;for(js|=4,Jl=e.current;null!==Jl;){var i=Jl,l=i.child;if(16&Jl.flags){var s=i.deletions;if(null!==s){for(var u=0;u<s.length;u++){var c=s[u];for(Jl=c;null!==Jl;){var d=Jl;switch(d.tag){case 0:case 11:case 15:rs(8,d,i)}var p=d.child;if(null!==p)p.return=d,Jl=p;else for(;null!==Jl;){var f=(d=Jl).sibling,m=d.return;if(is(d),d===c){Jl=null;break}if(null!==f){f.return=m,Jl=f;break}Jl=m}}}var g=i.alternate;if(null!==g){var h=g.child;if(null!==h){g.child=null;do{var y=h.sibling;h.sibling=null,h=y}while(null!==h)}}Jl=i}}if(2064&i.subtreeFlags&&null!==l)l.return=i,Jl=l;else e:for(;null!==Jl;){if(2048&(i=Jl).flags)switch(i.tag){case 0:case 11:case 15:rs(9,i,i.return)}var b=i.sibling;if(null!==b){b.return=i.return,Jl=b;break e}Jl=i.return}}var v=e.current;for(Jl=v;null!==Jl;){var w=(l=Jl).child;if(2064&l.subtreeFlags&&null!==w)w.return=l,Jl=w;else e:for(l=v;null!==Jl;){if(2048&(s=Jl).flags)try{switch(s.tag){case 0:case 11:case 15:os(9,s)}}catch(x){_u(s,s.return,x)}if(s===l){Jl=null;break e}var k=s.sibling;if(null!==k){k.return=s.return,Jl=k;break e}Jl=s.return}}if(js=o,qo(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(ot,e)}catch(x){}r=!0}return r}finally{vt=n,Ts.transition=t}}return!1}function Eu(e,t,n){e=Da(e,t=ml(0,t=cl(n,t),1),1),t=tu(),null!==e&&(yt(e,1,t),ou(e,t))}function _u(e,t,n){if(3===e.tag)Eu(e,e,n);else for(;null!==t;){if(3===t.tag){Eu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Ws||!Ws.has(r))){t=Da(t,e=gl(t,e=cl(n,e),1),1),e=tu(),null!==t&&(yt(t,1,e),ou(t,e));break}}t=t.return}}function Cu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tu(),e.pingedLanes|=e.suspendedLanes&n,Ps===e&&(Rs&n)===n&&(4===Ds||3===Ds&&(130023424&Rs)===Rs&&500>Ze()-Us?fu(e,0):zs|=n),ou(e,t)}function Au(e,t){0===t&&(1&e.mode?(t=ct,!(130023424&(ct<<=1))&&(ct=4194304)):t=1);var n=tu();null!==(e=Pa(e,t))&&(yt(e,t,n),ou(e,n))}function Tu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Au(e,n)}function ju(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Au(e,n)}function Pu(e,t){return We(e,t)}function Nu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ru(e,t,n,r){return new Nu(e,t,n,r)}function Lu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ou(e,t){var n=e.alternate;return null===n?((n=Ru(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Du(e,t,n,r,o,i){var l=2;if(r=e,"function"==typeof e)Lu(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case S:return Iu(n.children,o,i,t);case E:l=8,o|=8;break;case _:return(e=Ru(12,n,t,2|o)).elementType=_,e.lanes=i,e;case j:return(e=Ru(13,n,t,o)).elementType=j,e.lanes=i,e;case P:return(e=Ru(19,n,t,o)).elementType=P,e.lanes=i,e;case L:return Fu(n,o,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case C:l=10;break e;case A:l=9;break e;case T:l=11;break e;case N:l=14;break e;case R:l=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Ru(l,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Iu(e,t,n,r){return(e=Ru(7,e,r,t)).lanes=n,e}function Fu(e,t,n,r){return(e=Ru(22,e,r,t)).elementType=L,e.lanes=n,e.stateNode={isHidden:!1},e}function Mu(e,t,n){return(e=Ru(6,e,null,t)).lanes=n,e}function zu(e,t,n){return(t=Ru(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bu(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ht(0),this.expirationTimes=ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function $u(e,t,n,r,o,a,i,l,s){return e=new Bu(e,t,n,l,s),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Ru(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ra(a),e}function Uu(e){if(!e)return To;e:{if(Ue(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Lo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Lo(n))return Io(e,n,t)}return t}function qu(e,t,n,r,o,a,i,l,s){return(e=$u(n,r,!0,e,0,a,0,l,s)).context=Uu(null),n=e.current,(a=Oa(r=tu(),o=nu(n))).callback=null!=t?t:null,Da(n,a,o),e.current.lanes=o,yt(e,o,r),ou(e,r),e}function Hu(e,t,n,r){var o=t.current,a=tu(),i=nu(o);return n=Uu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Oa(a,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Da(o,t,i))&&(ru(e,o,i,a),Ia(e,o,i)),i}function Gu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Wu(e,t){Vu(e,t),(e=e.alternate)&&Vu(e,t)}Es=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Po.current)wl=!0;else{if(!(e.lanes&n||128&t.flags))return wl=!1,function(e,t,n){switch(t.tag){case 3:Pl(t),ma();break;case 5:ii(t);break;case 1:Lo(t.type)&&Fo(t);break;case 4:oi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ao(ba,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ao(si,1&si.current),t.flags|=128,null):n&t.child.childLanes?Ml(e,t,n):(Ao(si,1&si.current),null!==(e=Gl(e,t,n))?e.sibling:null);Ao(si,1&si.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return ql(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ao(si,si.current),r)break;return null;case 22:case 23:return t.lanes=0,_l(e,t,n)}return Gl(e,t,n)}(e,t,n);wl=!!(131072&e.flags)}else wl=!1,aa&&1048576&t.flags&&ea(t,Wo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hl(e,t),e=t.pendingProps;var o=Ro(t,jo.current);_a(t,n),o=Ei(null,t,r,e,o,n);var i=_i();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lo(r)?(i=!0,Fo(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ra(t),o.updater=Ua,t.stateNode=o,o._reactInternals=t,Va(t,r,e,n),t=jl(null,t,r,!0,i,n)):(t.tag=0,aa&&i&&ta(t),kl(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hl(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Lu(e)?1:0;if(null!=e){if((e=e.$$typeof)===T)return 11;if(e===N)return 14}return 2}(r),e=ya(r,e),o){case 0:t=Al(null,t,r,e,n);break e;case 1:t=Tl(null,t,r,e,n);break e;case 11:t=xl(null,t,r,e,n);break e;case 14:t=Sl(null,t,r,ya(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Al(e,t,r,o=t.elementType===r?o:ya(r,o),n);case 1:return r=t.type,o=t.pendingProps,Tl(e,t,r,o=t.elementType===r?o:ya(r,o),n);case 3:e:{if(Pl(t),null===e)throw Error(a(387));r=t.pendingProps,o=(i=t.memoizedState).element,La(e,t),Ma(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Nl(e,t,r,n,o=cl(Error(a(423)),t));break e}if(r!==o){t=Nl(e,t,r,n,o=cl(Error(a(424)),t));break e}for(oa=uo(t.stateNode.containerInfo.firstChild),ra=t,aa=!0,ia=null,n=Xa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ma(),r===o){t=Gl(e,t,n);break e}kl(e,t,r,n)}t=t.child}return t;case 5:return ii(t),null===e&&ca(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,l=o.children,no(r,o)?l=null:null!==i&&no(r,i)&&(t.flags|=32),Cl(e,t),kl(e,t,l,n),t.child;case 6:return null===e&&ca(t),null;case 13:return Ml(e,t,n);case 4:return oi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Za(t,null,r,n):kl(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,xl(e,t,r,o=t.elementType===r?o:ya(r,o),n);case 7:return kl(e,t,t.pendingProps,n),t.child;case 8:case 12:return kl(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Ao(ba,r._currentValue),r._currentValue=l,null!==i)if(lr(i.value,l)){if(i.children===o.children&&!Po.current){t=Gl(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var s=i.dependencies;if(null!==s){l=i.child;for(var u=s.firstContext;null!==u;){if(u.context===r){if(1===i.tag){(u=Oa(-1,n&-n)).tag=2;var c=i.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}i.lanes|=n,null!==(u=i.alternate)&&(u.lanes|=n),Ea(i.return,n,t),s.lanes|=n;break}u=u.next}}else if(10===i.tag)l=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(l=i.return))throw Error(a(341));l.lanes|=n,null!==(s=l.alternate)&&(s.lanes|=n),Ea(l,n,t),l=i.sibling}else l=i.child;if(null!==l)l.return=i;else for(l=i;null!==l;){if(l===t){l=null;break}if(null!==(i=l.sibling)){i.return=l.return,l=i;break}l=l.return}i=l}kl(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,_a(t,n),r=r(o=Ca(o)),t.flags|=1,kl(e,t,r,n),t.child;case 14:return o=ya(r=t.type,t.pendingProps),Sl(e,t,r,o=ya(r.type,o),n);case 15:return El(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ya(r,o),Hl(e,t),t.tag=1,Lo(r)?(e=!0,Fo(t)):e=!1,_a(t,n),Ha(t,r,o),Va(t,r,o,n),jl(null,t,r,!0,e,n);case 19:return ql(e,t,n);case 22:return _l(e,t,n)}throw Error(a(156,t.tag))};var Qu="function"==typeof reportError?reportError:function(e){console.error(e)};function Ku(e){this._internalRoot=e}function Yu(e){this._internalRoot=e}function Zu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Ju(){}function ec(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if("function"==typeof o){var l=o;o=function(){var e=Gu(i);l.call(e)}}Hu(t,i,e,o)}else i=function(e,t,n,r,o){if(o){if("function"==typeof r){var a=r;r=function(){var e=Gu(i);a.call(e)}}var i=qu(t,r,e,0,null,!1,0,"",Ju);return e._reactRootContainer=i,e[go]=i.current,Ur(8===e.nodeType?e.parentNode:e),du(),i}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var l=r;r=function(){var e=Gu(s);l.call(e)}}var s=$u(e,0,!1,null,0,!1,0,"",Ju);return e._reactRootContainer=s,e[go]=s.current,Ur(8===e.nodeType?e.parentNode:e),du((function(){Hu(t,s,n,r)})),s}(n,t,e,o,r);return Gu(i)}Yu.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Hu(e,t,null,null)},Yu.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;du((function(){Hu(null,e,null,null)})),t[go]=null}},Yu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Et();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lt.length&&0!==t&&t<Lt[n].priority;n++);Lt.splice(n,0,e),0===n&&Ft(e)}},kt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(bt(t,1|n),ou(t,Ze()),!(6&js)&&(qs=Ze()+500,qo()))}break;case 13:du((function(){var t=Pa(e,1);if(null!==t){var n=tu();ru(t,e,1,n)}})),Wu(e,1)}},xt=function(e){if(13===e.tag){var t=Pa(e,134217728);if(null!==t)ru(t,e,134217728,tu());Wu(e,134217728)}},St=function(e){if(13===e.tag){var t=nu(e),n=Pa(e,t);if(null!==n)ru(n,e,t,tu());Wu(e,t)}},Et=function(){return vt},_t=function(e,t){var n=vt;try{return vt=e,t()}finally{vt=n}},xe=function(e,t,n){switch(t){case"input":if(X(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=xo(r);if(!o)throw Error(a(90));W(r),X(r,o)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Te=cu,je=du;var tc={usingClientEntryPoint:!1,Events:[wo,ko,xo,Ce,Ae,cu]},nc={findFiberByHostInstance:vo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ge(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var oc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oc.isDisabled&&oc.supportsFiber)try{ot=oc.inject(rc),at=oc}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Zu(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Zu(e))throw Error(a(299));var n=!1,r="",o=Qu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=$u(e,1,!1,null,0,n,0,r,o),e[go]=t.current,Ur(8===e.nodeType?e.parentNode:e),new Ku(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=null===(e=Ge(t))?null:e.stateNode},t.flushSync=function(e){return du(e)},t.hydrate=function(e,t,n){if(!Xu(t))throw Error(a(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Zu(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,o=!1,i="",l=Qu;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(l=n.onRecoverableError)),t=qu(t,null,e,1,null!=n?n:null,o,0,i,l),e[go]=t.current,Ur(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Yu(t)},t.render=function(e,t,n){if(!Xu(t))throw Error(a(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xu(e))throw Error(a(40));return!!e._reactRootContainer&&(du((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[go]=null}))})),!0)},t.unstable_batchedUpdates=cu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xu(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ec(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},5338:(e,t,n)=>{"use strict";var r=n(961);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},961:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(2551)},115:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var l,s,u,c;if(Array.isArray(e)){if((l=e.length)!=i.length)return!1;for(s=l;0!=s--;)if(!a(e[s],i[s]))return!1;return!0}if(n&&e instanceof Map&&i instanceof Map){if(e.size!==i.size)return!1;for(c=e.entries();!(s=c.next()).done;)if(!i.has(s.value[0]))return!1;for(c=e.entries();!(s=c.next()).done;)if(!a(s.value[1],i.get(s.value[0])))return!1;return!0}if(r&&e instanceof Set&&i instanceof Set){if(e.size!==i.size)return!1;for(c=e.entries();!(s=c.next()).done;)if(!i.has(s.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(i)){if((l=e.length)!=i.length)return!1;for(s=l;0!=s--;)if(e[s]!==i[s])return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof i.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof i.toString)return e.toString()===i.toString();if((l=(u=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(s=l;0!=s--;)if(!Object.prototype.hasOwnProperty.call(i,u[s]))return!1;if(t&&e instanceof Element)return!1;for(s=l;0!=s--;)if(("_owner"!==u[s]&&"__v"!==u[s]&&"__o"!==u[s]||!e.$$typeof)&&!a(e[u[s]],i[u[s]]))return!1;return!0}return e!=e&&i!=i}e.exports=function(e,t){try{return a(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},545:(e,t,n)=>{"use strict";n.d(t,{mg:()=>J,vd:()=>G});var r=n(6540),o=n(5556),a=n.n(o),i=n(115),l=n.n(i),s=n(311),u=n.n(s),c=n(2833),d=n.n(c);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function f(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,m(e,t)}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function g(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(o[n]=e[n]);return o}var h={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},y={rel:["amphtml","canonical","alternate"]},b={type:["application/ld+json"]},v={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},w=Object.keys(h).map((function(e){return h[e]})),k={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},x=Object.keys(k).reduce((function(e,t){return e[k[t]]=t,e}),{}),S=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},E=function(e){var t=S(e,h.TITLE),n=S(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,(function(){return t}));var r=S(e,"defaultTitle");return t||r||void 0},_=function(e){return S(e,"onChangeClientState")||function(){}},C=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return p({},e,t)}),{})},A=function(e,t){return t.filter((function(e){return void 0!==e[h.BASE]})).map((function(e){return e[h.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),o=0;o<r.length;o+=1){var a=r[o].toLowerCase();if(-1!==e.indexOf(a)&&n[a])return t.concat(n)}return t}),[])},T=function(e,t,n){var r={};return n.filter((function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&console&&"function"==typeof console.warn&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof t[e]+'"'),!1)})).map((function(t){return t[e]})).reverse().reduce((function(e,n){var o={};n.filter((function(e){for(var n,a=Object.keys(e),i=0;i<a.length;i+=1){var l=a[i],s=l.toLowerCase();-1===t.indexOf(s)||"rel"===n&&"canonical"===e[n].toLowerCase()||"rel"===s&&"stylesheet"===e[s].toLowerCase()||(n=s),-1===t.indexOf(l)||"innerHTML"!==l&&"cssText"!==l&&"itemprop"!==l||(n=l)}if(!n||!e[n])return!1;var u=e[n].toLowerCase();return r[n]||(r[n]={}),o[n]||(o[n]={}),!r[n][u]&&(o[n][u]=!0,!0)})).reverse().forEach((function(t){return e.push(t)}));for(var a=Object.keys(o),i=0;i<a.length;i+=1){var l=a[i],s=p({},r[l],o[l]);r[l]=s}return e}),[]).reverse()},j=function(e,t){if(Array.isArray(e)&&e.length)for(var n=0;n<e.length;n+=1)if(e[n][t])return!0;return!1},P=function(e){return Array.isArray(e)?e.join(""):e},N=function(e,t){return Array.isArray(e)?e.reduce((function(e,n){return function(e,t){for(var n=Object.keys(e),r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1}(n,t)?e.priority.push(n):e.default.push(n),e}),{priority:[],default:[]}):{default:e}},R=function(e,t){var n;return p({},e,((n={})[t]=void 0,n))},L=[h.NOSCRIPT,h.SCRIPT,h.STYLE],O=function(e,t){return void 0===t&&(t=!0),!1===t?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},D=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},I=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce((function(t,n){return t[k[n]||n]=e[n],t}),t)},F=function(e,t){return t.map((function(t,n){var o,a=((o={key:n})["data-rh"]=!0,o);return Object.keys(t).forEach((function(e){var n=k[e]||e;"innerHTML"===n||"cssText"===n?a.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:a[n]=t[e]})),r.createElement(e,a)}))},M=function(e,t,n){switch(e){case h.TITLE:return{toComponent:function(){return n=t.titleAttributes,(o={key:e=t.title})["data-rh"]=!0,a=I(n,o),[r.createElement(h.TITLE,a,e)];var e,n,o,a},toString:function(){return function(e,t,n,r){var o=D(n),a=P(t);return o?"<"+e+' data-rh="true" '+o+">"+O(a,r)+"</"+e+">":"<"+e+' data-rh="true">'+O(a,r)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return I(t)},toString:function(){return D(t)}};default:return{toComponent:function(){return F(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var o=Object.keys(r).filter((function(e){return!("innerHTML"===e||"cssText"===e)})).reduce((function(e,t){var o=void 0===r[t]?t:t+'="'+O(r[t],n)+'"';return e?e+" "+o:o}),""),a=r.innerHTML||r.cssText||"",i=-1===L.indexOf(e);return t+"<"+e+' data-rh="true" '+o+(i?"/>":">"+a+"</"+e+">")}),"")}(e,t,n)}}}},z=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,o=e.htmlAttributes,a=e.noscriptTags,i=e.styleTags,l=e.title,s=void 0===l?"":l,u=e.titleAttributes,c=e.linkTags,d=e.metaTags,p=e.scriptTags,f={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var m=function(e){var t=e.linkTags,n=e.scriptTags,r=e.encode,o=N(e.metaTags,v),a=N(t,y),i=N(n,b);return{priorityMethods:{toComponent:function(){return[].concat(F(h.META,o.priority),F(h.LINK,a.priority),F(h.SCRIPT,i.priority))},toString:function(){return M(h.META,o.priority,r)+" "+M(h.LINK,a.priority,r)+" "+M(h.SCRIPT,i.priority,r)}},metaTags:o.default,linkTags:a.default,scriptTags:i.default}}(e);f=m.priorityMethods,c=m.linkTags,d=m.metaTags,p=m.scriptTags}return{priority:f,base:M(h.BASE,t,r),bodyAttributes:M("bodyAttributes",n,r),htmlAttributes:M("htmlAttributes",o,r),link:M(h.LINK,c,r),meta:M(h.META,d,r),noscript:M(h.NOSCRIPT,a,r),script:M(h.SCRIPT,p,r),style:M(h.STYLE,i,r),title:M(h.TITLE,{title:s,titleAttributes:u},r)}},B=[],$=function(e,t){var n=this;void 0===t&&(t="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){n.context.helmet=e},helmetInstances:{get:function(){return n.canUseDOM?B:n.instances},add:function(e){(n.canUseDOM?B:n.instances).push(e)},remove:function(e){var t=(n.canUseDOM?B:n.instances).indexOf(e);(n.canUseDOM?B:n.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=z({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},U=r.createContext({}),q=a().shape({setHelmet:a().func,helmetInstances:a().shape({get:a().func,add:a().func,remove:a().func})}),H="undefined"!=typeof document,G=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new $(r.props.context,t.canUseDOM),r}return f(t,e),t.prototype.render=function(){return r.createElement(U.Provider,{value:this.helmetData.value},this.props.children)},t}(r.Component);G.canUseDOM=H,G.propTypes={context:a().shape({helmet:a().shape()}),children:a().node.isRequired},G.defaultProps={context:{}},G.displayName="HelmetProvider";var V=function(e,t){var n,r=document.head||document.querySelector(h.HEAD),o=r.querySelectorAll(e+"[data-rh]"),a=[].slice.call(o),i=[];return t&&t.length&&t.forEach((function(t){var r=document.createElement(e);for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&("innerHTML"===o?r.innerHTML=t.innerHTML:"cssText"===o?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(o,void 0===t[o]?"":t[o]));r.setAttribute("data-rh","true"),a.some((function(e,t){return n=t,r.isEqualNode(e)}))?a.splice(n,1):i.push(r)})),a.forEach((function(e){return e.parentNode.removeChild(e)})),i.forEach((function(e){return r.appendChild(e)})),{oldTags:a,newTags:i}},W=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),o=r?r.split(","):[],a=[].concat(o),i=Object.keys(t),l=0;l<i.length;l+=1){var s=i[l],u=t[s]||"";n.getAttribute(s)!==u&&n.setAttribute(s,u),-1===o.indexOf(s)&&o.push(s);var c=a.indexOf(s);-1!==c&&a.splice(c,1)}for(var d=a.length-1;d>=0;d-=1)n.removeAttribute(a[d]);o.length===a.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==i.join(",")&&n.setAttribute("data-rh",i.join(","))}},Q=function(e,t){var n=e.baseTag,r=e.htmlAttributes,o=e.linkTags,a=e.metaTags,i=e.noscriptTags,l=e.onChangeClientState,s=e.scriptTags,u=e.styleTags,c=e.title,d=e.titleAttributes;W(h.BODY,e.bodyAttributes),W(h.HTML,r),function(e,t){void 0!==e&&document.title!==e&&(document.title=P(e)),W(h.TITLE,t)}(c,d);var p={baseTag:V(h.BASE,n),linkTags:V(h.LINK,o),metaTags:V(h.META,a),noscriptTags:V(h.NOSCRIPT,i),scriptTags:V(h.SCRIPT,s),styleTags:V(h.STYLE,u)},f={},m={};Object.keys(p).forEach((function(e){var t=p[e],n=t.newTags,r=t.oldTags;n.length&&(f[e]=n),r.length&&(m[e]=p[e].oldTags)})),t&&t(),l(e,f,m)},K=null,Y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).rendered=!1,t}f(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!d()(e,this.props)},n.componentDidUpdate=function(){this.emitChange()},n.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},n.emitChange=function(){var e,t,n=this.props.context,r=n.setHelmet,o=null,a=(e=n.helmetInstances.get().map((function(e){var t=p({},e.props);return delete t.context,t})),{baseTag:A(["href"],e),bodyAttributes:C("bodyAttributes",e),defer:S(e,"defer"),encode:S(e,"encodeSpecialCharacters"),htmlAttributes:C("htmlAttributes",e),linkTags:T(h.LINK,["rel","href"],e),metaTags:T(h.META,["name","charset","http-equiv","property","itemprop"],e),noscriptTags:T(h.NOSCRIPT,["innerHTML"],e),onChangeClientState:_(e),scriptTags:T(h.SCRIPT,["src","innerHTML"],e),styleTags:T(h.STYLE,["cssText"],e),title:E(e),titleAttributes:C("titleAttributes",e),prioritizeSeoTags:j(e,"prioritizeSeoTags")});G.canUseDOM?(t=a,K&&cancelAnimationFrame(K),t.defer?K=requestAnimationFrame((function(){Q(t,(function(){K=null}))})):(Q(t),K=null)):z&&(o=z(a)),r(o)},n.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},n.render=function(){return this.init(),null},t}(r.Component);Y.propTypes={context:q.isRequired},Y.displayName="HelmetDispatcher";var Z=["children"],X=["children"],J=function(e){function t(){return e.apply(this,arguments)||this}f(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return!l()(R(this.props,"helmetData"),R(e,"helmetData"))},n.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case h.SCRIPT:case h.NOSCRIPT:return{innerHTML:t};case h.STYLE:return{cssText:t};default:throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return p({},r,((t={})[n.type]=[].concat(r[n.type]||[],[p({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,n,r=e.child,o=e.newProps,a=e.newChildProps,i=e.nestedChildren;switch(r.type){case h.TITLE:return p({},o,((t={})[r.type]=i,t.titleAttributes=p({},a),t));case h.BODY:return p({},o,{bodyAttributes:p({},a)});case h.HTML:return p({},o,{htmlAttributes:p({},a)});default:return p({},o,((n={})[r.type]=p({},a),n))}},n.mapArrayTypeChildrenToProps=function(e,t){var n=p({},t);return Object.keys(e).forEach((function(t){var r;n=p({},n,((r={})[t]=e[t],r))})),n},n.warnOnInvalidChildren=function(e,t){return u()(w.some((function(t){return e.type===t})),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+w.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),u()(!t||"string"==typeof t||Array.isArray(t)&&!t.some((function(e){return"string"!=typeof e})),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``}</"+e.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(e,t){var n=this,o={};return r.Children.forEach(e,(function(e){if(e&&e.props){var r=e.props,a=r.children,i=g(r,Z),l=Object.keys(i).reduce((function(e,t){return e[x[t]||t]=i[t],e}),{}),s=e.type;switch("symbol"==typeof s?s=s.toString():n.warnOnInvalidChildren(e,a),s){case h.FRAGMENT:t=n.mapChildrenToProps(a,t);break;case h.LINK:case h.META:case h.NOSCRIPT:case h.SCRIPT:case h.STYLE:o=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:o,newChildProps:l,nestedChildren:a});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:l,nestedChildren:a})}}})),this.mapArrayTypeChildrenToProps(o,t)},n.render=function(){var e=this.props,t=e.children,n=g(e,X),o=p({},n),a=n.helmetData;return t&&(o=this.mapChildrenToProps(t,o)),!a||a instanceof $||(a=new $(a.context,a.instances)),a?r.createElement(Y,p({},o,{context:a.value,helmetData:void 0})):r.createElement(U.Consumer,null,(function(e){return r.createElement(Y,p({},o,{context:e}))}))},t}(r.Component);J.propTypes={base:a().object,bodyAttributes:a().object,children:a().oneOfType([a().arrayOf(a().node),a().node]),defaultTitle:a().string,defer:a().bool,encodeSpecialCharacters:a().bool,htmlAttributes:a().object,link:a().arrayOf(a().object),meta:a().arrayOf(a().object),noscript:a().arrayOf(a().object),onChangeClientState:a().func,script:a().arrayOf(a().object),style:a().arrayOf(a().object),title:a().string,titleAttributes:a().object,titleTemplate:a().string,prioritizeSeoTags:a().bool,helmetData:a().object},J.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},J.displayName="Helmet"},2799:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case a:case l:case i:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case h:case g:case s:return e;default:return t}}case o:return t}}}function x(e){return k(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=h,t.Memo=g,t.Portal=o,t.Profiler=l,t.StrictMode=i,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||k(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return k(e)===u},t.isContextProvider=function(e){return k(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===p},t.isFragment=function(e){return k(e)===a},t.isLazy=function(e){return k(e)===h},t.isMemo=function(e){return k(e)===g},t.isPortal=function(e){return k(e)===o},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===l||e===i||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===s||e.$$typeof===u||e.$$typeof===p||e.$$typeof===b||e.$$typeof===v||e.$$typeof===w||e.$$typeof===y)},t.typeOf=k},4363:(e,t,n)=>{"use strict";e.exports=n(2799)},3259:(e,t,n)=>{"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}var l=n(6540),s=[],u=[];var c=l.createContext(null);function d(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function p(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var o=d(e[r]);o.loading?t.loading=!0:(t.loaded[r]=o.loaded,t.error=o.error),n.push(o.promise),o.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(r){t.error=r}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function f(e,t){return l.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function m(e,t){var d,p;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var m=i({loader:null,loading:null,delay:200,timeout:null,render:f,webpack:null,modules:null},t),g=null;function h(){return g||(g=e(m.loader)),g.promise}return s.push(h),"function"==typeof m.webpack&&u.push((function(){if((0,m.webpack)().every((function(e){return void 0!==e&&void 0!==n.m[e]})))return h()})),p=d=function(t){function n(n){var r;return a(o(o(r=t.call(this,n)||this)),"retry",(function(){r.setState({error:null,loading:!0,timedOut:!1}),g=e(m.loader),r._loadModule()})),h(),r.state={error:g.error,pastDelay:!1,timedOut:!1,loading:g.loading,loaded:g.loaded},r}r(n,t),n.preload=function(){return h()};var i=n.prototype;return i.UNSAFE_componentWillMount=function(){this._loadModule()},i.componentDidMount=function(){this._mounted=!0},i._loadModule=function(){var e=this;if(this.context&&Array.isArray(m.modules)&&m.modules.forEach((function(t){e.context.report(t)})),g.loading){var t=function(t){e._mounted&&e.setState(t)};"number"==typeof m.delay&&(0===m.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){t({pastDelay:!0})}),m.delay)),"number"==typeof m.timeout&&(this._timeout=setTimeout((function(){t({timedOut:!0})}),m.timeout));var n=function(){t({error:g.error,loaded:g.loaded,loading:g.loading}),e._clearTimeouts()};g.promise.then((function(){return n(),null})).catch((function(e){return n(),null}))}},i.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},i._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},i.render=function(){return this.state.loading||this.state.error?l.createElement(m.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?m.render(this.state.loaded,this.props):null},n}(l.Component),a(d,"contextType",c),p}function g(e){return m(d,e)}g.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return m(p,e)};var h=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){return l.createElement(c.Provider,{value:{report:this.props.report}},l.Children.only(this.props.children))},t}(l.Component);function y(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return y(e)}))}g.Capture=h,g.preloadAll=function(){return new Promise((function(e,t){y(s).then(e,t)}))},g.preloadReady=function(){return new Promise((function(e,t){y(u).then(e,e)}))},e.exports=g},2831:(e,t,n)=>{"use strict";n.d(t,{u:()=>i,v:()=>l});var r=n(6347),o=n(8168),a=n(6540);function i(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var o=e.path?(0,r.B6)(t,e):n.length?n[n.length-1].match:r.Ix.computeRootMatch(t);return o&&(n.push({route:e,match:o}),e.routes&&i(e.routes,t,n)),o})),n}function l(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?a.createElement(r.dO,n,e.map((function(e,n){return a.createElement(r.qh,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,o.A)({},n,{},t,{route:e})):a.createElement(e.component,(0,o.A)({},n,t,{route:e}))}})}))):null}},4625:(e,t,n)=>{"use strict";n.d(t,{I9:()=>d,Kd:()=>c,N_:()=>y,k2:()=>w});var r=n(6347),o=n(2892),a=n(6540),i=n(9231),l=n(8168),s=n(8587),u=n(1561),c=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,i.zR)(t.props),t}return(0,o.A)(t,e),t.prototype.render=function(){return a.createElement(r.Ix,{history:this.history,children:this.props.children})},t}(a.Component);var d=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,i.TM)(t.props),t}return(0,o.A)(t,e),t.prototype.render=function(){return a.createElement(r.Ix,{history:this.history,children:this.props.children})},t}(a.Component);var p=function(e,t){return"function"==typeof e?e(t):e},f=function(e,t){return"string"==typeof e?(0,i.yJ)(e,null,null,t):e},m=function(e){return e},g=a.forwardRef;void 0===g&&(g=m);var h=g((function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,i=(0,s.A)(e,["innerRef","navigate","onClick"]),u=i.target,c=(0,l.A)({},i,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||u&&"_self"!==u||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return c.ref=m!==g&&t||n,a.createElement("a",c)}));var y=g((function(e,t){var n=e.component,o=void 0===n?h:n,c=e.replace,d=e.to,y=e.innerRef,b=(0,s.A)(e,["component","replace","to","innerRef"]);return a.createElement(r.XZ.Consumer,null,(function(e){e||(0,u.A)(!1);var n=e.history,r=f(p(d,e.location),e.location),s=r?n.createHref(r):"",h=(0,l.A)({},b,{href:s,navigate:function(){var t=p(d,e.location),r=(0,i.AO)(e.location)===(0,i.AO)(f(t));(c||r?n.replace:n.push)(t)}});return m!==g?h.ref=t||y:h.innerRef=y,a.createElement(o,h)}))})),b=function(e){return e},v=a.forwardRef;void 0===v&&(v=b);var w=v((function(e,t){var n=e["aria-current"],o=void 0===n?"page":n,i=e.activeClassName,c=void 0===i?"active":i,d=e.activeStyle,m=e.className,g=e.exact,h=e.isActive,w=e.location,k=e.sensitive,x=e.strict,S=e.style,E=e.to,_=e.innerRef,C=(0,s.A)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.createElement(r.XZ.Consumer,null,(function(e){e||(0,u.A)(!1);var n=w||e.location,i=f(p(E,n),n),s=i.pathname,A=s&&s.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),T=A?(0,r.B6)(n.pathname,{path:A,exact:g,sensitive:k,strict:x}):null,j=!!(h?h(T,n):T),P="function"==typeof m?m(j):m,N="function"==typeof S?S(j):S;j&&(P=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(P,c),N=(0,l.A)({},N,d));var R=(0,l.A)({"aria-current":j&&o||null,className:P,style:N,to:i},C);return b!==v?R.ref=t||_:R.innerRef=_,a.createElement(y,R)}))}))},6347:(e,t,n)=>{"use strict";n.d(t,{B6:()=>j,Ix:()=>v,W6:()=>M,XZ:()=>b,dO:()=>I,qh:()=>P,rd:()=>_,zy:()=>z});var r=n(2892),o=n(6540),a=n(5556),i=n.n(a),l=n(9231),s=n(1561),u=n(8168),c=n(8505),d=n.n(c),p=(n(4363),n(8587)),f=(n(4146),1073741823),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};var g=o.createContext||function(e,t){var n,a,l="__create-react-context-"+function(){var e="__global_unique_id__";return m[e]=(m[e]||0)+1}()+"__",s=function(e){function n(){for(var t,n,r,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(t=e.call.apply(e,[this].concat(a))||this).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(e){r=r.filter((function(t){return t!==e}))},get:function(){return n},set:function(e,t){n=e,r.forEach((function(e){return e(n,t)}))}}),t}(0,r.A)(n,e);var o=n.prototype;return o.getChildContext=function(){var e;return(e={})[l]=this.emitter,e},o.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((a=r)===(i=o)?0!==a||1/a==1/i:a!=a&&i!=i)?n=0:(n="function"==typeof t?t(r,o):f,0!==(n|=0)&&this.emitter.set(e.value,n))}var a,i},o.render=function(){return this.props.children},n}(o.Component);s.childContextTypes=((n={})[l]=i().object.isRequired,n);var u=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){(0|e.observedBits)&n&&e.setState({value:e.getValue()})},e}(0,r.A)(n,t);var o=n.prototype;return o.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?f:t},o.componentDidMount=function(){this.context[l]&&this.context[l].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?f:e},o.componentWillUnmount=function(){this.context[l]&&this.context[l].off(this.onUpdate)},o.getValue=function(){return this.context[l]?this.context[l].get():e},o.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(o.Component);return u.contextTypes=((a={})[l]=i().object,a),{Provider:s,Consumer:u}},h=function(e){var t=g();return t.displayName=e,t},y=h("Router-History"),b=h("Router"),v=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._pendingLocation=e}))),n}(0,r.A)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(t){e._isMounted&&e.setState({location:t})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return o.createElement(b.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.createElement(y.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.Component);o.Component;var w=function(e){function t(){return e.apply(this,arguments)||this}(0,r.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(o.Component);var k={},x=1e4,S=0;function E(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(k[e])return k[e];var t=d().compile(e);return S<x&&(k[e]=t,S++),t}(e)(t,{pretty:!0})}function _(e){var t=e.computedMatch,n=e.to,r=e.push,a=void 0!==r&&r;return o.createElement(b.Consumer,null,(function(e){e||(0,s.A)(!1);var r=e.history,i=e.staticContext,c=a?r.push:r.replace,d=(0,l.yJ)(t?"string"==typeof n?E(n,t.params):(0,u.A)({},n,{pathname:E(n.pathname,t.params)}):n);return i?(c(d),null):o.createElement(w,{onMount:function(){c(d)},onUpdate:function(e,t){var n=(0,l.yJ)(t.to);(0,l.Fu)(n,(0,u.A)({},d,{key:n.key}))||c(d)},to:n})}))}var C={},A=1e4,T=0;function j(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,a=void 0!==o&&o,i=n.strict,l=void 0!==i&&i,s=n.sensitive,u=void 0!==s&&s;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=C[n]||(C[n]={});if(r[e])return r[e];var o=[],a={regexp:d()(e,o,t),keys:o};return T<A&&(r[e]=a,T++),a}(n,{end:a,strict:l,sensitive:u}),o=r.regexp,i=r.keys,s=o.exec(e);if(!s)return null;var c=s[0],p=s.slice(1),f=e===c;return a&&!f?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:f,params:i.reduce((function(e,t,n){return e[t.name]=p[n],e}),{})}}),null)}var P=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return o.createElement(b.Consumer,null,(function(t){t||(0,s.A)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?j(n.pathname,e.props):t.match,a=(0,u.A)({},t,{location:n,match:r}),i=e.props,l=i.children,c=i.component,d=i.render;return Array.isArray(l)&&function(e){return 0===o.Children.count(e)}(l)&&(l=null),o.createElement(b.Provider,{value:a},a.match?l?"function"==typeof l?l(a):l:c?o.createElement(c,a):d?d(a):null:"function"==typeof l?l(a):null)}))},t}(o.Component);function N(e){return"/"===e.charAt(0)?e:"/"+e}function R(e,t){if(!e)return t;var n=N(e);return 0!==t.pathname.indexOf(n)?t:(0,u.A)({},t,{pathname:t.pathname.substr(n.length)})}function L(e){return"string"==typeof e?e:(0,l.AO)(e)}function O(e){return function(){(0,s.A)(!1)}}function D(){}o.Component;var I=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return o.createElement(b.Consumer,null,(function(t){t||(0,s.A)(!1);var n,r,a=e.props.location||t.location;return o.Children.forEach(e.props.children,(function(e){if(null==r&&o.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?j(a.pathname,(0,u.A)({},e.props,{path:i})):t.match}})),r?o.cloneElement(n,{location:a,computedMatch:r}):null}))},t}(o.Component);var F=o.useContext;function M(){return F(y)}function z(){return F(b).location}},8505:(e,t,n)=>{var r=n(4634);e.exports=f,e.exports.parse=a,e.exports.compile=function(e,t){return l(a(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,i=0,l="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var d=n[0],p=n[1],f=n.index;if(l+=e.slice(i,f),i=f+d.length,p)l+=p[1];else{var m=e[i],g=n[2],h=n[3],y=n[4],b=n[5],v=n[6],w=n[7];l&&(r.push(l),l="");var k=null!=g&&null!=m&&m!==g,x="+"===v||"*"===v,S="?"===v||"*"===v,E=n[2]||c,_=y||b;r.push({name:h||a++,prefix:g||"",delimiter:E,optional:S,repeat:x,partial:k,asterisk:!!w,pattern:_?u(_):w?".*":"[^"+s(E)+"]+?"})}}return i<e.length&&(l+=e.substr(i)),l&&r.push(l),r}function i(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",d(t)));return function(t,o){for(var a="",l=t||{},s=(o||{}).pretty?i:encodeURIComponent,u=0;u<e.length;u++){var c=e[u];if("string"!=typeof c){var d,p=l[c.name];if(null==p){if(c.optional){c.partial&&(a+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(r(p)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var f=0;f<p.length;f++){if(d=s(p[f]),!n[u].test(d))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(d)+"`");a+=(0===f?c.prefix:c.delimiter)+d}}else{if(d=c.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):s(p),!n[u].test(d))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+d+'"');a+=c.prefix+d}}else a+=c}return a}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function u(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function c(e,t){return e.keys=t,e}function d(e){return e&&e.sensitive?"":"i"}function p(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,a=!1!==n.end,i="",l=0;l<e.length;l++){var u=e[l];if("string"==typeof u)i+=s(u);else{var p=s(u.prefix),f="(?:"+u.pattern+")";t.push(u),u.repeat&&(f+="(?:"+p+f+")*"),i+=f=u.optional?u.partial?p+"("+f+")?":"(?:"+p+"("+f+"))?":p+"("+f+")"}}var m=s(n.delimiter||"/"),g=i.slice(-m.length)===m;return o||(i=(g?i.slice(0,-m.length):i)+"(?:"+m+"(?=$))?"),i+=a?"$":o&&g?"":"(?="+m+"|$)",c(new RegExp("^"+i,d(n)),t)}function f(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return c(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(f(e[o],t,n).source);return c(new RegExp("(?:"+r.join("|")+")",d(n)),t)}(e,t,n):function(e,t,n){return p(a(e,n),t,n)}(e,t,n)}},1020:(e,t,n)=>{"use strict";var r=n(6540),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,a={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)i.call(t,r)&&!s.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:u,ref:c,props:a,_owner:l.current}}t.Fragment=a,t.jsx=u,t.jsxs=u},5287:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,h={};function y(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}function b(){}function v(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var w=v.prototype=new b;w.constructor=v,g(w,y.prototype),w.isPureReactComponent=!0;var k=Array.isArray,x=Object.prototype.hasOwnProperty,S={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,r){var o,a={},i=null,l=null;if(null!=t)for(o in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(i=""+t.key),t)x.call(t,o)&&!E.hasOwnProperty(o)&&(a[o]=t[o]);var s=arguments.length-2;if(1===s)a.children=r;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(o in s=e.defaultProps)void 0===a[o]&&(a[o]=s[o]);return{$$typeof:n,type:e,key:i,ref:l,props:a,_owner:S.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var A=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function j(e,t,o,a,i){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var s=!1;if(null===e)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case n:case r:s=!0}}if(s)return i=i(s=e),e=""===a?"."+T(s,0):a,k(i)?(o="",null!=e&&(o=e.replace(A,"$&/")+"/"),j(i,t,o,"",(function(e){return e}))):null!=i&&(C(i)&&(i=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,o+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(A,"$&/")+"/")+e)),t.push(i)),1;if(s=0,a=""===a?".":a+":",k(e))for(var u=0;u<e.length;u++){var c=a+T(l=e[u],u);s+=j(l,t,o,c,i)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),u=0;!(l=e.next()).done;)s+=j(l=l.value,t,o,c=a+T(l,u++),i);else if("object"===l)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function P(e,t,n){if(null==e)return e;var r=[],o=0;return j(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function N(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R={current:null},L={transition:null},O={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:L,ReactCurrentOwner:S};t.Children={map:P,forEach:function(e,t,n){P(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=o,t.Profiler=i,t.PureComponent=v,t.StrictMode=a,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=g({},e.props),a=e.key,i=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,l=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)x.call(t,u)&&!E.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==s?s[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){s=Array(u);for(var c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}return{$$typeof:n,type:e.type,key:a,ref:i,props:o,_owner:l}},t.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=_,t.createFactory=function(e){var t=_.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:N}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return R.current.useCallback(e,t)},t.useContext=function(e){return R.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return R.current.useDeferredValue(e)},t.useEffect=function(e,t){return R.current.useEffect(e,t)},t.useId=function(){return R.current.useId()},t.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return R.current.useMemo(e,t)},t.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},t.useRef=function(e){return R.current.useRef(e)},t.useState=function(e){return R.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return R.current.useTransition()},t.version="18.2.0"},6540:(e,t,n)=>{"use strict";e.exports=n(5287)},4848:(e,t,n)=>{"use strict";e.exports=n(1020)},7463:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<a(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var l=2*(r+1)-1,s=e[l],u=l+1,c=e[u];if(0>a(s,n))u<o&&0>a(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else{if(!(u<o&&0>a(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var u=[],c=[],d=1,p=null,f=3,m=!1,g=!1,h=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(c);null!==t;){if(null===t.callback)o(c);else{if(!(t.startTime<=e))break;o(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function k(e){if(h=!1,w(e),!g)if(null!==r(u))g=!0,L(x);else{var t=r(c);null!==t&&O(k,t.startTime-e)}}function x(e,n){g=!1,h&&(h=!1,b(C),C=-1),m=!0;var a=f;try{for(w(n),p=r(u);null!==p&&(!(p.expirationTime>n)||e&&!j());){var i=p.callback;if("function"==typeof i){p.callback=null,f=p.priorityLevel;var l=i(p.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?p.callback=l:p===r(u)&&o(u),w(n)}else o(u);p=r(u)}if(null!==p)var s=!0;else{var d=r(c);null!==d&&O(k,d.startTime-n),s=!1}return s}finally{p=null,f=a,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,E=!1,_=null,C=-1,A=5,T=-1;function j(){return!(t.unstable_now()-T<A)}function P(){if(null!==_){var e=t.unstable_now();T=e;var n=!0;try{n=_(!0,e)}finally{n?S():(E=!1,_=null)}}else E=!1}if("function"==typeof v)S=function(){v(P)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,R=N.port2;N.port1.onmessage=P,S=function(){R.postMessage(null)}}else S=function(){y(P,0)};function L(e){_=e,E||(E=!0,S())}function O(e,n){C=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||m||(g=!0,L(x))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,o,a){var i=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?i+a:i:a=i,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>i?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(h?(b(C),C=-1):h=!0,O(k,a-i))):(e.sortIndex=l,n(u,e),g||m||(g=!0,L(x))),e},t.unstable_shouldYield=j,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},9982:(e,t,n)=>{"use strict";e.exports=n(7463)},2833:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(t),s=0;s<a.length;s++){var u=a[s];if(!l(u))return!1;var c=e[u],d=t[u];if(!1===(o=n?n.call(r,c,d,u):void 0)||void 0===o&&c!==d)return!1}return!0}},4784:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={title:"Tagreader",tagline:"Tagreader.",url:"https://awt.app.radix.equinor.com",baseUrl:"/tagreader-python/",onBrokenLinks:"throw",onBrokenMarkdownLinks:"warn",favicon:"img/favicon.png",markdown:{mermaid:!0,format:"mdx",mdx1Compat:{comments:!0,admonitions:!0,headingIds:!0},anchors:{maintainCase:!1}},themes:["@docusaurus/theme-mermaid"],organizationName:"equinor",projectName:"tagreader",deploymentBranch:"gh-pages",i18n:{defaultLocale:"en",locales:["en"],path:"i18n",localeConfigs:{}},plugins:[],presets:[["classic",{docs:{sidebarPath:"/home/runner/work/tagreader-python/tagreader-python/documentation/sidebars.js",editUrl:"https://github.com/equinor/tagreader-python/tree/main/documentation/",remarkPlugins:[null,null],rehypePlugins:[null]},blog:!1,theme:{customCss:"/home/runner/work/tagreader-python/tagreader-python/documentation/src/css/custom.css"}}]],themeConfig:{navbar:{title:"Tagreader",logo:{alt:"Equinor Logo",src:"img/logo.svg"},items:[{type:"docSidebar",sidebarId:"about",position:"left",label:"Docs"},{type:"docSidebar",sidebarId:"contribute",position:"left",label:"Contribute"},{href:"https://github.com/equinor/tagreader-python",label:"GitHub",position:"right"}],hideOnScroll:!1},footer:{style:"dark",links:[{title:"Docs",items:[{label:"Docs",to:"/docs/about/introduction"},{label:"Contribute",to:"/docs/contribute/how-to-start-contributing"}]},{title:"More",items:[{label:"GitHub",href:"https://github.com/equinor/tagreader"},{label:"PyPi",href:"https://pypi.org/project/tagreader/"}]}],copyright:"Built with Docusaurus."},prism:{theme:{plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},darkTheme:{plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},additionalLanguages:[],magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},colorMode:{defaultMode:"dark",disableSwitch:!1,respectPrefersColorScheme:!0},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},blog:{sidebar:{groupByYear:!0}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3},mermaid:{theme:{dark:"dark",light:"default"},options:{}}},stylesheets:[{href:"https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css",type:"text/css",integrity:"sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM",crossorigin:"anonymous"}],baseUrlIssueBanner:!0,future:{experimental_storage:{type:"localStorage",namespace:!1},experimental_router:"browser"},onBrokenAnchors:"warn",onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},scripts:[],headTags:[],clientModules:[],titleDelimiter:"|",noIndex:!1}},8168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},2892:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>o})},8587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,{A:()=>r})},4164:(e,t,n)=>{"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}n.d(t,{A:()=>o});const o=function(){for(var e,t,n=0,o="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}},1765:(e,t,n)=>{"use strict";n.d(t,{My:()=>A,f4:()=>ee});var r,o,a,i,l,s,u,c=n(6540),d=n(4164),p=Object.create,f=Object.defineProperty,m=Object.defineProperties,g=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,v=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,x=(e,t,n)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))w.call(t,n)&&x(e,n,t[n]);if(b)for(var n of b(t))k.call(t,n)&&x(e,n,t[n]);return e},E=(e,t)=>m(e,h(t)),_=(e,t)=>{var n={};for(var r in e)w.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&b)for(var r of b(e))t.indexOf(r)<0&&k.call(e,r)&&(n[r]=e[r]);return n},C=(r={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var o,a;switch(n=n||{},r.util.type(t)){case"Object":if(a=r.util.objId(t),n[a])return n[a];for(var i in o={},n[a]=o,t)t.hasOwnProperty(i)&&(o[i]=e(t[i],n));return o;case"Array":return a=r.util.objId(t),n[a]?n[a]:(o=[],n[a]=o,t.forEach((function(t,r){o[r]=e(t,n)})),o);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var o in t)n[o]=t[o];return n},insertBefore:function(e,t,n,o){var a=(o=o||r.languages)[e],i={};for(var l in a)if(a.hasOwnProperty(l)){if(l==t)for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);n.hasOwnProperty(l)||(i[l]=a[l])}var u=o[e];return o[e]=i,r.languages.DFS(r.languages,(function(t,n){n===u&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,o,a){a=a||{};var i=r.util.objId;for(var l in t)if(t.hasOwnProperty(l)){n.call(t,l,t[l],o||l);var s=t[l],u=r.util.type(s);"Object"!==u||a[i(s)]?"Array"!==u||a[i(s)]||(a[i(s)]=!0,e(s,n,l,a)):(a[i(s)]=!0,e(s,n,null,a))}}},plugins:{},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};if(r.hooks.run("before-tokenize",a),!a.grammar)throw new Error('The language "'+a.language+'" has no grammar.');return a.tokens=r.tokenize(a.code,a.grammar),r.hooks.run("after-tokenize",a),o.stringify(r.util.encode(a.tokens),a.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new l;return s(o,o.head,e),i(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var o,a=0;o=n[a++];)o(t)}},Token:o};function o(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var a=o[1].length;o.index+=a,o[0]=o[0].slice(a)}return o}function i(e,t,n,l,c,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var m=0;m<f.length;++m){if(d&&d.cause==p+","+m)return;var g=f[m],h=g.inside,y=!!g.lookbehind,b=!!g.greedy,v=g.alias;if(b&&!g.pattern.global){var w=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,w+"g")}for(var k=g.pattern||g,x=l.next,S=c;x!==t.tail&&!(d&&S>=d.reach);S+=x.value.length,x=x.next){var E=x.value;if(t.length>e.length)return;if(!(E instanceof o)){var _,C=1;if(b){if(!(_=a(k,S,e,y))||_.index>=e.length)break;var A=_.index,T=_.index+_[0].length,j=S;for(j+=x.value.length;A>=j;)j+=(x=x.next).value.length;if(S=j-=x.value.length,x.value instanceof o)continue;for(var P=x;P!==t.tail&&(j<T||"string"==typeof P.value);P=P.next)C++,j+=P.value.length;C--,E=e.slice(S,j),_.index-=S}else if(!(_=a(k,0,E,y)))continue;A=_.index;var N=_[0],R=E.slice(0,A),L=E.slice(A+N.length),O=S+E.length;d&&O>d.reach&&(d.reach=O);var D=x.prev;if(R&&(D=s(t,D,R),S+=R.length),u(t,D,C),x=s(t,D,new o(p,h?r.tokenize(N,h):N,v,N)),L&&s(t,x,L),C>1){var I={cause:p+","+m,reach:O};i(e,t,n,x.prev,S,I),d&&I.reach>d.reach&&(d.reach=I.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}return o.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var o="";return t.forEach((function(t){o+=e(t,n)})),o}var a={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(a.classes,i):a.classes.push(i)),r.hooks.run("wrap",a);var l="";for(var s in a.attributes)l+=" "+s+'="'+(a.attributes[s]||"").replace(/"/g,""")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+l+">"+a.content+"</"+a.tag+">"},r}();t.exports=n,n.default=n}},function(){return o||(0,r[y(r)[0]])((o={exports:{}}).exports,o),o.exports}),A=((e,t,n)=>(n=null!=e?p(v(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of y(t))w.call(e,o)||o===n||f(e,o,{get:()=>t[o],enumerable:!(r=g(t,o))||r.enumerable});return e})(!t&&e&&e.__esModule?n:f(n,"default",{value:e,enumerable:!0}),e)))(C());A.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},A.languages.markup.tag.inside["attr-value"].inside.entity=A.languages.markup.entity,A.languages.markup.doctype.inside["internal-subset"].inside=A.languages.markup,A.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(A.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:A.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:A.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},A.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(A.languages.markup.tag,"addAttribute",{value:function(e,t){A.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:A.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),A.languages.html=A.languages.markup,A.languages.mathml=A.languages.markup,A.languages.svg=A.languages.markup,A.languages.xml=A.languages.extend("markup",{}),A.languages.ssml=A.languages.xml,A.languages.atom=A.languages.xml,A.languages.rss=A.languages.xml,a=A,i={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},s="(?:[^\\\\-]|"+(l=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",s=RegExp(s+"-"+s),u={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},a.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:l,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":i,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:l}},"special-escape":i,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":u}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:l,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":u}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},A.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},A.languages.javascript=A.languages.extend("clike",{"class-name":[A.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),A.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,A.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:A.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:A.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:A.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:A.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:A.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),A.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:A.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),A.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),A.languages.markup&&(A.languages.markup.tag.addInlined("script","javascript"),A.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),A.languages.js=A.languages.javascript,A.languages.actionscript=A.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),A.languages.actionscript["class-name"].alias="function",delete A.languages.actionscript.parameter,delete A.languages.actionscript["literal-property"],A.languages.markup&&A.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:A.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(A),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach((function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},o="doc-comment";if(a=e.languages[t]){var a,i=a[o];if((i=i||(a=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[o])instanceof RegExp&&(i=a[o]={pattern:i}),Array.isArray(i))for(var l=0,s=i.length;l<s;l++)i[l]instanceof RegExp&&(i[l]={pattern:i[l]}),r(i[l]);else r(i)}}))}}),t.addSupport(["java","javascript","php"],t)}(A),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;(t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup))&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(A),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=(t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(A),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+o+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(A),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o,a=t[n];"code"!==a.type?e(a.content):(o=a.content[1],a=a.content[3],o&&a&&"code-language"===o.type&&"code-block"===a.type&&"string"==typeof o.content&&(o=o.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),o="language-"+(o=(/[a-z][\w-]*/i.exec(o)||[""])[0].toLowerCase()),a.alias?"string"==typeof a.alias?a.alias=[a.alias,o]:a.alias.push(o):a.alias=[o]))}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var a=t.classes[r];if(a=/language-(.+)/.exec(a)){n=a[1];break}}var u,c=e.languages[n];c?t.content=e.highlight(t.content.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;return"#"===(t=t.toLowerCase())[0]?(n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),s(n)):l[t]||e})),c,n):n&&"none"!==n&&e.plugins.autoloader&&(u="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random()),t.attributes.id=u,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(u);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})))}})),RegExp(e.languages.markup.tag.pattern.source,"gi")),l={amp:"&",lt:"<",gt:">",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(A),A.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:A.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},A.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var o=[];if(d(["definition-mutation","punctuation"])&&"("===c(1).content){n+=2;var a=p(/^\($/,/^\)$/);if(-1===a)continue;for(;n<a;n++){var i=c(0);"variable"===i.type&&(f(i,"variable-input"),o.push(i.content))}n=a+1}if(d(["punctuation","property-query"])&&"{"===c(0).content&&(n++,f(c(0),"property-mutation"),0<o.length)){var l=p(/^\{$/,/^\}$/);if(-1!==l)for(var s=n;s<l;s++){var u=t[s];"variable"===u.type&&0<=o.indexOf(u.content)&&f(u,"variable-input")}}}}function c(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=c(n+t);if(!r||r.type!==e[n])return}return 1}function p(e,r){for(var o=1,a=n;a<t.length;a++){var i=t[a],l=i.content;if("punctuation"===i.type&&"string"==typeof l)if(e.test(l))o++;else if(r.test(l)&&0==--o)return a}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),A.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,o=r.inside["interpolation-punctuation"],a=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function s(t,n,i){var s=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),u=0,c={},d=(s=l(s.map((function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=u++,n="___"+i.toUpperCase()+"_"+r+"___")););return c[n]=e,n})).join(""),n,i),Object.keys(c));return u=0,function t(n){for(var a=0;a<n.length;a++){if(u>=d.length)return;var i,s,p,f,m,g,h,y=n[a];"string"==typeof y||"string"==typeof y.content?(i=d[u],-1!==(h=(g="string"==typeof y?y:y.content).indexOf(i))&&(++u,s=g.substring(0,h),m=c[i],p=void 0,(f={})["interpolation-punctuation"]=o,3===(f=e.tokenize(m,f)).length&&((p=[1,1]).push.apply(p,l(f[1],e.languages.javascript,"javascript")),f.splice.apply(f,p)),p=new e.Token("interpolation",f,r.alias,m),f=g.substring(h+i.length),m=[],s&&m.push(s),m.push(p),f&&(t(g=[f]),m.push.apply(m,g)),"string"==typeof y?(n.splice.apply(n,[a,1].concat(m)),a+=m.length-1):y.content=m)):(h=y.content,Array.isArray(h)?t(h):t([h]))}}(s),new e.Token(i,s,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var u={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function c(e){return"string"==typeof e?e:Array.isArray(e)?e.map(c).join(""):c(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in u&&function t(n){for(var r=0,o=n.length;r<o;r++){var a,i,l,u=n[r];"string"!=typeof u&&(a=u.content,Array.isArray(a)?"template-string"===u.type?(u=a[1],3===a.length&&"string"!=typeof u&&"embedded-code"===u.type&&(i=c(u),u=u.alias,u=Array.isArray(u)?u[0]:u,l=e.languages[u])&&(a[1]=s(i,l,u))):t(a):"string"!=typeof a&&t([a]))}}(t.tokens)}))}(A),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(A),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,(function(){return n}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(A),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(A),A.languages.n4js=A.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),A.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),A.languages.n4jsd=A.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var o=n[r],a=e.languages.javascript[o];o=(a="RegExp"===e.util.type(a)?e.languages.javascript[o]={pattern:a}:a).inside||{};(a.inside=o)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(A),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return o})),RegExp(e,t)}function i(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],a=!1;"string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?0<n.length&&n[n.length-1].tagName===l(o.content[0].content[1])&&n.pop():"/>"!==o.content[o.content.length-1].content&&n.push({tagName:l(o.content[0].content[1]),openedBraces:0}):0<n.length&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof o)&&0<n.length&&0===n[n.length-1].openedBraces&&(a=l(o),r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(a+=l(t[r+1]),t.splice(r+1,1)),0<r&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(a=l(t[r-1])+a,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",a,null,a)),o.content&&"string"!=typeof o.content&&i(o.content)}}o=a(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var l=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(l).join(""):""};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)}))}(A),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(A),A.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},A.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=A.languages.swift})),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(A),A.languages.c=A.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),A.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),A.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},A.languages.c.string],char:A.languages.c.char,comment:A.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:A.languages.c}}}}),A.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete A.languages.c.boolean,A.languages.objectivec=A.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete A.languages.objectivec["class-name"],A.languages.objc=A.languages.objectivec,A.languages.reason=A.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),A.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete A.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(A),A.languages.go=A.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),A.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete A.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(A),A.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},A.languages.python["string-interpolation"].inside.interpolation.inside.rest=A.languages.python,A.languages.py=A.languages.python;((e,t)=>{for(var n in t)f(e,n,{get:t[n],enumerable:!0})})({},{dracula:()=>T,duotoneDark:()=>j,duotoneLight:()=>P,github:()=>N,jettwaveDark:()=>H,jettwaveLight:()=>G,nightOwl:()=>R,nightOwlLight:()=>L,oceanicNext:()=>I,okaidia:()=>F,oneDark:()=>V,oneLight:()=>W,palenight:()=>M,shadesOfPurple:()=>z,synthwave84:()=>B,ultramin:()=>$,vsDark:()=>U,vsLight:()=>q});var T={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},j={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},P={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},N={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},R={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},L={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},O="#c5a5c5",D="#8dc891",I={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:O}},{types:["attr-value"],style:{color:D}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:D}},{types:["punctuation"],style:{color:D}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:O}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},F={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},M={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},z={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},B={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},$={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},U={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},q={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},H={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},G={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},V={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},W={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},Q=(e,t)=>{const{plain:n}=e,r=e.styles.reduce(((e,n)=>{const{languages:r,style:o}=n;return r&&!r.includes(t)||n.types.forEach((t=>{const n=S(S({},e[t]),o);e[t]=n})),e}),{});return r.root=n,r.plain=E(S({},n),{backgroundColor:void 0}),r},K=/\r\n|\r|\n/,Y=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},Z=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},X=e=>{const t=[[]],n=[e],r=[0],o=[e.length];let a=0,i=0,l=[];const s=[l];for(;i>-1;){for(;(a=r[i]++)<o[i];){let e,u=t[i];const c=n[i][a];if("string"==typeof c?(u=i>0?u:["plain"],e=c):(u=Z(u,c.type),c.alias&&(u=Z(u,c.alias)),e=c.content),"string"!=typeof e){i++,t.push(u),n.push(e),r.push(0),o.push(e.length);continue}const d=e.split(K),p=d.length;l.push({types:u,content:d[0]});for(let t=1;t<p;t++)Y(l),s.push(l=[]),l.push({types:u,content:d[t]})}i--,t.pop(),n.pop(),r.pop(),o.pop()}return Y(l),s},J=({children:e,language:t,code:n,theme:r,prism:o})=>{const a=t.toLowerCase(),i=((e,t)=>{const[n,r]=(0,c.useState)(Q(t,e)),o=(0,c.useRef)(),a=(0,c.useRef)();return(0,c.useEffect)((()=>{t===o.current&&e===a.current||(o.current=t,a.current=e,r(Q(t,e)))}),[e,t]),n})(a,r),l=(e=>(0,c.useCallback)((t=>{var n=t,{className:r,style:o,line:a}=n,i=_(n,["className","style","line"]);const l=E(S({},i),{className:(0,d.A)("token-line",r)});return"object"==typeof e&&"plain"in e&&(l.style=e.plain),"object"==typeof o&&(l.style=S(S({},l.style||{}),o)),l}),[e]))(i),s=(e=>{const t=(0,c.useCallback)((({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map((t=>e[t])))}),[e]);return(0,c.useCallback)((e=>{var n=e,{token:r,className:o,style:a}=n,i=_(n,["token","className","style"]);const l=E(S({},i),{className:(0,d.A)("token",...r.types,o),children:r.content,style:t(r)});return null!=a&&(l.style=S(S({},l.style||{}),a)),l}),[t])})(i),u=(({prism:e,code:t,grammar:n,language:r})=>{const o=(0,c.useRef)(e);return(0,c.useMemo)((()=>{if(null==n)return X([t]);const e={code:t,grammar:n,language:r,tokens:[]};return o.current.hooks.run("before-tokenize",e),e.tokens=o.current.tokenize(t,n),o.current.hooks.run("after-tokenize",e),X(e.tokens)}),[t,n,r])})({prism:o,language:a,code:n,grammar:o.languages[a]});return e({tokens:u,className:`prism-code language-${a}`,style:null!=i?i.root:{},getLineProps:l,getTokenProps:s})},ee=e=>(0,c.createElement)(J,E(S({},e),{prism:e.prism||A,theme:e.theme||U,code:e.code,language:e.language}))},1561:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=!0,o="Invariant failed";function a(e,t){if(!e){if(r)throw new Error(o);var n="function"==typeof t?t():t,a=n?"".concat(o,": ").concat(n):o;throw new Error(a)}}},1635:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>O,__assign:()=>a,__asyncDelegator:()=>_,__asyncGenerator:()=>E,__asyncValues:()=>C,__await:()=>S,__awaiter:()=>m,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>L,__classPrivateFieldSet:()=>R,__createBinding:()=>h,__decorate:()=>l,__disposeResources:()=>I,__esDecorate:()=>u,__exportStar:()=>y,__extends:()=>o,__generator:()=>g,__importDefault:()=>P,__importStar:()=>j,__makeTemplateObject:()=>A,__metadata:()=>f,__param:()=>s,__propKey:()=>d,__read:()=>v,__rest:()=>i,__runInitializers:()=>c,__setFunctionName:()=>p,__spread:()=>w,__spreadArray:()=>x,__spreadArrays:()=>k,__values:()=>b,default:()=>F});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function l(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function s(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,s=r.kind,u="getter"===s?"get":"setter"===s?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),p=!1,f=n.length-1;f>=0;f--){var m={};for(var g in r)m[g]="access"===g?{}:r[g];for(var g in r.access)m.access[g]=r.access[g];m.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var h=(0,n[f])("accessor"===s?{get:d.get,set:d.set}:d[u],m);if("accessor"===s){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw new TypeError("Object expected");(l=i(h.get))&&(d.get=l),(l=i(h.set))&&(d.set=l),(l=i(h.init))&&o.unshift(l)}else(l=i(h))&&("field"===s?o.unshift(l):d[u]=l)}c&&Object.defineProperty(c,r.name,d),p=!0}function c(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(t){a(t)}}function l(e){try{s(r.throw(e))}catch(t){a(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((r=r.apply(e,t||[])).next())}))}function g(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(s){l=[6,s],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}var h=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function y(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||h(t,e,n)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function k(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,l=a.length;i<l;i++,o++)r[o]=a[i];return r}function x(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function E(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),a=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||l(e,t)}))})}function l(e,t){try{(n=o[e](t)).value instanceof S?Promise.resolve(n.value.v).then(s,u):c(a[0][2],n)}catch(r){c(a[0][3],r)}var n}function s(e){l("next",e)}function u(e){l("throw",e)}function c(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}}function _(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:S(e[r](t)),done:!1}:o?o(t):t}:o}}function C(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function A(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function j(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&h(t,e,n);return T(t,e),t}function P(e){return e&&e.__esModule?e:{default:e}}function N(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function R(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function L(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function O(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if("function"!=typeof r)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var D="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function I(e){function t(t){e.error=e.hasError?new D(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var o=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(o).then(n,(function(e){return t(e),n()}))}catch(a){t(a)}}if(e.hasError)throw e.error}()}const F={__extends:o,__assign:a,__rest:i,__decorate:l,__param:s,__metadata:f,__awaiter:m,__generator:g,__createBinding:h,__exportStar:y,__values:b,__read:v,__spread:w,__spreadArrays:k,__spreadArray:x,__await:S,__asyncGenerator:E,__asyncDelegator:_,__asyncValues:C,__makeTemplateObject:A,__importStar:j,__importDefault:P,__classPrivateFieldGet:N,__classPrivateFieldSet:R,__classPrivateFieldIn:L,__addDisposableResource:O,__disposeResources:I}},2654:e=>{"use strict";e.exports={}},4054:e=>{"use strict";e.exports=JSON.parse('{"/tagreader-python/docs-7f5":{"__comp":"5e95c892","__context":{"plugin":"aba21aa0"}},"/tagreader-python/docs-30d":{"__comp":"a7bd4aaa","__props":"2662fbc1"},"/tagreader-python/docs-697":{"__comp":"a94703ab"},"/tagreader-python/docs/about/introduction-141":{"__comp":"17896441","content":"51515e66"},"/tagreader-python/docs/about/usage/basic-usage-f74":{"__comp":"17896441","content":"4f9ad5cc"},"/tagreader-python/docs/about/usage/caching-577":{"__comp":"17896441","content":"7438851d"},"/tagreader-python/docs/about/usage/data-source-f77":{"__comp":"17896441","content":"df9ca9a0"},"/tagreader-python/docs/about/usage/fetching-metadata-eaf":{"__comp":"17896441","content":"3a55b9ff"},"/tagreader-python/docs/about/usage/time-zone-04b":{"__comp":"17896441","content":"b0ef962e"},"/tagreader-python/docs/category/developer-guide-101":{"__comp":"14eb3368","__props":"0bdfdd3e"},"/tagreader-python/docs/category/usage-a67":{"__comp":"14eb3368","__props":"ebd56198"},"/tagreader-python/docs/contribute/development-guide/publishing-567":{"__comp":"17896441","content":"11859ee7"},"/tagreader-python/docs/contribute/development-guide/setup-71f":{"__comp":"17896441","content":"67db73f0"},"/tagreader-python/docs/contribute/development-guide/testing-e80":{"__comp":"17896441","content":"7dbb84ad"},"/tagreader-python/docs/contribute/development-guide/upgrading-9b9":{"__comp":"17896441","content":"59f922ef"},"/tagreader-python/docs/contribute/documentation-f6c":{"__comp":"17896441","content":"f146017a"},"/tagreader-python/docs/contribute/ground-rules-30b":{"__comp":"17896441","content":"69795df0"},"/tagreader-python/docs/contribute/how-to-start-contributing-6b1":{"__comp":"17896441","content":"980a27ad"},"/tagreader-python/docs/contribute/overview-e02":{"__comp":"17896441","content":"3b435a04"},"/tagreader-python/-19d":{"__comp":"1df93b7f","__context":{"plugin":"a7456010"},"config":"5e9f5e1a"}}')}},e=>{e.O(0,[1869],(()=>{return t=7815,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/assets/js/main.099aabdf.js.LICENSE.txt b/assets/js/main.099aabdf.js.LICENSE.txt new file mode 100644 index 00000000..91dc8949 --- /dev/null +++ b/assets/js/main.099aabdf.js.LICENSE.txt @@ -0,0 +1,64 @@ +/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress + * @license MIT */ + +/*! Bundled license information: + +prismjs/prism.js: + (** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT <https://opensource.org/licenses/MIT> + * @author Lea Verou <https://lea.verou.me> + * @namespace + * @public + *) +*/ + +/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ diff --git a/assets/js/runtime~main.aebe066b.js b/assets/js/runtime~main.aebe066b.js new file mode 100644 index 00000000..03acdd2d --- /dev/null +++ b/assets/js/runtime~main.aebe066b.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,a,t,r,f,o={},d={};function b(e){var a=d[e];if(void 0!==a)return a.exports;var t=d[e]={id:e,loaded:!1,exports:{}};return o[e].call(t.exports,t,t.exports,b),t.loaded=!0,t.exports}b.m=o,b.c=d,e=[],b.O=(a,t,r,f)=>{if(!t){var o=1/0;for(i=0;i<e.length;i++){t=e[i][0],r=e[i][1],f=e[i][2];for(var d=!0,n=0;n<t.length;n++)(!1&f||o>=f)&&Object.keys(b.O).every((e=>b.O[e](t[n])))?t.splice(n--,1):(d=!1,f<o&&(o=f));if(d){e.splice(i--,1);var c=r();void 0!==c&&(a=c)}}return a}f=f||0;for(var i=e.length;i>0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[t,r,f]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var f=Object.create(null);b.r(f);var o={};a=a||[null,t({}),t([]),t(t)];for(var d=2&r&&e;"object"==typeof d&&!~a.indexOf(d);d=t(d))Object.getOwnPropertyNames(d).forEach((a=>o[a]=()=>e[a]));return o.default=()=>e,b.d(f,o),f},b.d=(e,a)=>{for(var t in a)b.o(a,t)&&!b.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((a,t)=>(b.f[t](e,a),a)),[])),b.u=e=>"assets/js/"+({785:"69795df0",1235:"a7456010",1252:"df9ca9a0",1847:"2662fbc1",2076:"common",2567:"ebd56198",3347:"f146017a",3887:"59f922ef",4583:"1df93b7f",4825:"7dbb84ad",4828:"4f9ad5cc",4930:"b0ef962e",5742:"aba21aa0",6233:"7438851d",6631:"0bdfdd3e",6969:"14eb3368",7098:"a7bd4aaa",7405:"3b435a04",7505:"51515e66",8356:"67db73f0",8401:"17896441",9048:"a94703ab",9303:"980a27ad",9538:"11859ee7",9647:"5e95c892",9742:"3a55b9ff"}[e]||e)+"."+{4:"d4e84adf",358:"7f285e68",751:"ef6780cb",785:"ec00bcca",1176:"c653568f",1235:"51a4a774",1252:"40b4d145",1555:"924b970a",1847:"16d1fb5d",2076:"020bfe42",2130:"3d3496a1",2235:"de976e0b",2237:"3ee39997",2317:"e4f1577d",2567:"35101d17",2746:"90938529",3347:"4804e705",3771:"5dded75d",3863:"4e79c37a",3887:"d5e41fd4",4583:"add0d0ab",4825:"de990a0e",4828:"d8973fd1",4930:"4c4597cd",5642:"92622fe6",5688:"9d57ae43",5742:"49179dbc",6063:"c242930b",6216:"9c87e670",6233:"1e66115a",6292:"4446f967",6506:"9bc7806f",6631:"80e95944",6969:"c4cc24ac",7098:"3b66ce73",7121:"4973c936",7147:"4c64959b",7200:"a1f6288d",7211:"a0650c88",7308:"998b0e41",7405:"119fc3ad",7440:"6f324626",7505:"559d977c",8159:"f171b590",8327:"dda91e63",8356:"e7ff6635",8401:"244ddac3",8609:"f71bdfb8",8747:"7d832047",8947:"2ac7d40e",9048:"52311314",9303:"1e6de9b3",9469:"d0368221",9538:"bc3b29fc",9647:"ad8f2bde",9688:"ee807478",9742:"2fb2e80e"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},f="documentation:",b.l=(e,a,t,o)=>{if(r[e])r[e].push(a);else{var d,n;if(void 0!==t)for(var c=document.getElementsByTagName("script"),i=0;i<c.length;i++){var u=c[i];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==f+t){d=u;break}}d||(n=!0,(d=document.createElement("script")).charset="utf-8",d.timeout=120,b.nc&&d.setAttribute("nonce",b.nc),d.setAttribute("data-webpack",f+t),d.src=e),r[e]=[a];var l=(a,t)=>{d.onerror=d.onload=null,clearTimeout(s);var f=r[e];if(delete r[e],d.parentNode&&d.parentNode.removeChild(d),f&&f.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=l.bind(null,d.onerror),d.onload=l.bind(null,d.onload),n&&document.head.appendChild(d)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/tagreader-python/",b.gca=function(e){return e={17896441:"8401","69795df0":"785",a7456010:"1235",df9ca9a0:"1252","2662fbc1":"1847",common:"2076",ebd56198:"2567",f146017a:"3347","59f922ef":"3887","1df93b7f":"4583","7dbb84ad":"4825","4f9ad5cc":"4828",b0ef962e:"4930",aba21aa0:"5742","7438851d":"6233","0bdfdd3e":"6631","14eb3368":"6969",a7bd4aaa:"7098","3b435a04":"7405","51515e66":"7505","67db73f0":"8356",a94703ab:"9048","980a27ad":"9303","11859ee7":"9538","5e95c892":"9647","3a55b9ff":"9742"}[e]||e,b.p+b.u(e)},(()=>{var e={5354:0,1869:0};b.f.j=(a,t)=>{var r=b.o(e,a)?e[a]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var f=new Promise(((t,f)=>r=e[a]=[t,f]));t.push(r[2]=f);var o=b.p+b.u(a),d=new Error;b.l(o,(t=>{if(b.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var f=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;d.message="Loading chunk "+a+" failed.\n("+f+": "+o+")",d.name="ChunkLoadError",d.type=f,d.request=o,r[1](d)}}),"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,t)=>{var r,f,o=t[0],d=t[1],n=t[2],c=0;if(o.some((a=>0!==e[a]))){for(r in d)b.o(d,r)&&(b.m[r]=d[r]);if(n)var i=n(b)}for(a&&a(t);c<o.length;c++)f=o[c],b.o(e,f)&&e[f]&&e[f][0](),e[f]=0;return b.O(i)},t=self.webpackChunkdocumentation=self.webpackChunkdocumentation||[];t.forEach(a.bind(null,0)),t.push=a.bind(null,t.push.bind(t))})()})(); \ No newline at end of file diff --git a/docs/about/introduction/index.html b/docs/about/introduction/index.html new file mode 100644 index 00000000..7e01cb2a --- /dev/null +++ b/docs/about/introduction/index.html @@ -0,0 +1,46 @@ +<!doctype html> +<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-about/introduction" data-has-hydrated="false"> +<head> +<meta charset="UTF-8"> +<meta name="generator" content="Docusaurus v3.5.2"> +<title data-rh="true">Introduction | Tagreader + + + + +

Introduction

+

Tagreader is a Python package for reading timeseries data from the OSIsoft PI and Aspen Infoplus.21 +Information Manufacturing Systems (IMS) systems. It is intended to be easy to use, and present as similar interfaces +as possible to the backend historians.

+

System requirements

+

The only requirements are Python >= 3.8, with Windows, Linux or macOS.

+

Installation

+

You can install tagreader directly into your project from pypi by using pip +or another package manager.

+
pip install tagreader
+

The following are required and will be installed:

+
    +
  • pandas
  • +
  • requests
  • +
  • requests-kerberos
  • +
  • certifi
  • +
  • diskcache
  • +
+

Usage

+

Tagreader easy to use for both Equinor internal IMS services, and non-internal usage. For non-internal usage +you simply need to provide the corresponding IMS service URLs and IMSType. See data source for details.

+

Usage example

+
import tagreader
c = tagreader.IMSClient("mysource", "aspenone")
print(c.search("tag*"))
df = c.read_tags(["tag1", "tag2"], "18.06.2020 08:00:00", "18.06.2020 09:00:00", 60)
+

Jupyter Notebook Quickstart

+

Jupyter Notebook examples can be found in /examples. In order to run these examples, you need to install the +optional dependencies.

+
pip install tagreader[notebooks]
+

The quickstart Jupyter Notebook can be found here

+

For more details, see the Usage section.

+

Contribute

+

As Tagreader is an open source project, all contributions are welcome. This includes code, bug reports, issues, +feature requests, and documentation. The preferred way of submitting a contribution is to either create an issue on +GitHub or to fork the project and make a pull request.

+

For starting contributing, see the contribute section

+ + \ No newline at end of file diff --git a/docs/about/usage/basic-usage/index.html b/docs/about/usage/basic-usage/index.html new file mode 100644 index 00000000..8bc9c484 --- /dev/null +++ b/docs/about/usage/basic-usage/index.html @@ -0,0 +1,160 @@ + + + + + +Basic usage | Tagreader + + + + +

Basic usage

+

The module is imported with

+
import tagreader
+

The Client

+

The client presents the interface for communicating with the data source to the user. The interface shall be as unified +as possible, regardless of the IMS type that is used. A handler object specifically designed for each IMS type is +attached to the client when the client is created. The handler is responsible for handling the communication and data +interpretation between the server and the client object.

+
SSL verification

Equinor root certificates are automatically added when using an Equinor Managed computer, which allow SSL verification.

For non-Equinor users: If you run info SSL verification errors and prefer to not set verifySSL=False , +you can try the procedure outlined here.

+
ODBC support

Tagreader as of version 5 does no longer support ODBC clients, which has been deprecated in favor of REST services. +To use ODBC, please refer to Tagreader v4 on PyPI. +Versioned documentation is available in the source code on GitHub Releases.

Use at your own discretion.

+

Creating a client

+

A connection to a data source is prepared by creating an instance of tagreader.IMSClient with the following input +arguments:

+
    +
  • +

    datasource : Name of data source

    +
  • +
  • +

    imstype : The name of the IMS type to query. Indicates the type of data source +that is requested, and therefore determines which handler type to use. Valid values are +piwebapi and aspenone.

    +
  • +
  • +

    tz (optional): Time zone naive time stamps will be interpreted as belonging to this time zone. Similarly, +the returned data points will be localized to this time zone. Default: "Europe/Oslo".

    +
  • +
+

The following input arguments can be used when connecting to either piwebapi or to aspenone. None of these +should be necessary to supply when connecting to Equinor servers.

+
    +
  • url (optional): Path to server root, e.g. "https://aspenone/ProcessData/AtProcessDataREST.dll" +or "https://piwebapi/piwebapi". Default: Path to Equinor server corresponding to selected imstype.
  • +
  • verifySSL (optional): Whether to verify SSL certificate sent from server. Default: True.
  • +
  • auth (optional): Auth object to pass to the server for authentication. Default: Kerberos-based auth object +that works with Equinor servers.
  • +
  • cache (optional): Cache data locally in order to avoid re-reading the same data multiple times.
  • +
+

Connecting to data source

+

After creating the client as described above, connect to the server with the connect() method.

+

Example

+

Connecting to the PINO PI data source using REST Web API:

+
c = tagreader.IMSClient("PINO", "piwebapi")
c.connect()
+

Connecting to the Peregrino IP.21 data source using AspenTech Process Data REST Web API, specifying that all naive time +stamps as well as the returned data shall use Rio local time, and using the local endpoint in Brazil:

+
c = tagreader.IMSClient(datasource="PER",
imstype="aspenone",
tz="Brazil/East",
url="https://aspenone-per.equinor.com/ProcessExplorer/ProcessData/AtProcessDataREST.dll")
c.connect()
+

Connecting to some other AspenTech Web API URL using NTLM authentication instead of default Kerberos and ignoring the +server's host certificate:

+
import getpass
from requests_ntlm import HttpNtlmAuth
user = "mydomain\\" + getpass.getuser()
pwd = getpass.getpass()
auth = HttpNtlmAuth(user, pwd)
c = tagreader.IMSClient(datasource="myplant",
url="https://api.mycompany.com/aspenone",
imstype="aspenone",
auth=auth,
verifySSL=False)
c.connect()
+

Searching for tags

+

The client method search() can be used to search for tags using either tag name, tag description or both.

+

Supply at least one of the following arguments:

+
    +
  • tag : Name of tag
  • +
  • desc : Description of tag
  • +
+

If both arguments are provided, the both must match.

+

* can be used as wildcard.

+

Examples

+
c = tagreader.IMSClient("PINO", "piwebapi")
c.connect()
c.search("cd*158")
c.search(desc="*reactor*")
c.search(tag="BA:*", desc="*Temperature*")
+

Reading data

+

Data is read by calling the client method read() with the following input arguments:

+
    +
  • +

    tags : List of tagnames. Wildcards are not allowed.

    +

    Tags with maps (relevant for some InfoPlus.21 servers) can be on the form 'tag;map' , e.g. '109-HIC005;CS A_AUTO'.

    +
  • +
  • +

    start_time : Start of time period.

    +
  • +
  • +

    end_time : End of time period.

    +

    Both start_time and end_time can be either datetime object or string. Strings are interpreted by the

    +
  • +
  • +

    Timestamp method from Pandas. +Both timestamps can be left out when read_type = ReaderType.SNAPSHOT . However, when using either of the Web APIs, end_time provides the time at which the snapshot is taken.

    +
  • +
  • +

    ts : The interval between samples when querying interpolated or aggregated data. Ignored and can be left out when +read_type = ReaderType.SNAPSHOT . Default 60 seconds.

    +
  • +
  • +

    read_type (optional): What kind of data to read. More info immediately below. Default Interpolated.

    +
  • +
  • +

    get_status (optonal): When set to True will fetch status information in addition to values. Default False.

    +
  • +
+

Selecting what to read

+

By specifying the optional parameter read_type to read() , it is possible to specify what kind of data should be +returned. The default query method is interpolated. All valid values for read_type are defined in the +utils.ReaderType class (mirrored for convenience as tagreader.ReaderType ), although not all are currently +implemented. Below is the list of implemented read types.

+
    +
  • INT : The raw data points are interpolated so that one new data point is generated at each step of length ts
  • +
  • starting at start_time and ending at or less than ts seconds before end_time .
  • +
  • The following aggregated read types perform a weighted calculation of the raw data within each interval. +Where relevant, time-weighted calculations are used. Returned time stamps are anchored at the beginning of each +interval. So for the 60 seconds long interval between 08:11:00 and 08:12:00, the time stamp will be 08:11:00. +
      +
    • MIN : The minimum value.
    • +
    • MAX : The maximum value.
    • +
    • AVG : The average value.
    • +
    • VAR : The variance.
    • +
    • STD : The standard deviation.
    • +
    • RNG : The range (max-min).
    • +
    +
  • +
  • RAW : Returns actual data points stored in the database.
  • +
  • SNAPSHOT : Returns the last recorded value. Only one tag can be read at a time. When using either of the Web API +based handlers, providing end_time is possible in which case a snapshot at the specific time is returned.
  • +
+

Examples

+

Read interpolated data for the provided tag with 3-minute intervals between the two time stamps:

+
c = tagreader.IMSClient("PINO", "piwebapi")
c.connect()
df = c.read(['BA:ACTIVE.1'], '05-Jan-2020 08:00:00', '05/01/20 11:30am', 180)

+

Read the average value for the two provided tags within each 3-minute interval between the two time stamps:

+
df = c.read(['BA:CONC.1'], '05-Jan-2020 08:00:00', '05/01/20 11:30am', 180, read_type=tagreader.ReaderType.AVG)
+

Status information

+

The optional parameter get_status was added to IMSClient.read() in release 2.6.0. If set to True, the resulting +dataframe will be expanded with one additional column per tag. The column contains integer numbers that indicate the +status, or quality, of the returned values.

+

In an effort to unify the status value for all IMS types, the following schema based on AspenTech was selected:

+

0: Good +1: Suspect +2: Bad +4: Good/Modified +5: Suspect/Modified +6: Bad/Modified

+

The status value is obtained differently for the four IMS types:

+
    +
  • Aspen Web API: Read directly from the l ("Level") field in the json output.
  • +
  • PI Web API: Calculated as Questionable + 2 * (1 - Good) + 4 * Substituted. +negative for various reasons for being bad.
  • +
+

For the two PI IMS types, it is assumed that Questionable is never True if Good is False or status != 0. +This may be an incorrect assumption with resulting erroneous status value.

+

In summary, here is the resulting status value from tagreader for different combinations of status field values from +the IMS types:

+
tagreaderAspen Web APIPI Web API
0l = 0Good = True
Questionable = False
Substituted = False
1l = 1Good = True
Questionable = True
Substituted = False
2l = 2Good = False
Questionable = False
Substituted = False
4l = 4Good = True
Questionable = False
Substituted = True
5l = 5Good = True
Questionable = True
Substituted = True
6l = 6Good = False
Questionable = False
Substituted = True
+

Please keep in mind when using get_status:

+
    +
  • This is an experimental feature. It may work as intended, or it may result in erroneous status values in some cases. +If that happens, please create an issue.
  • +
  • Both how fetching status is activated and how it is returned may be changed at a later time.
  • +
+ + \ No newline at end of file diff --git a/docs/about/usage/caching/index.html b/docs/about/usage/caching/index.html new file mode 100644 index 00000000..66bd8ed4 --- /dev/null +++ b/docs/about/usage/caching/index.html @@ -0,0 +1,27 @@ + + + + + +Caching results | Tagreader + + + + +

Caching results

+

It is possible to cache data locally using SQLite-files that will be attached to the client upon client creation. Whenever +IMSClient.read() is called, the cache is queried for existing data. Any data that is not already in the cache will be +queried from the data source. The cache can significantly speed up queries, and it is therefore recommended to always +have it enabled. The cache file will be created on use.

+

Data in the cache never expires. If the data for some reason becomes invalid, then the cache and data source will no +longer produce the same data set. An existing cache file can safely be deleted at any time, at least as long as there +is no ongoing query.

+

If, for any reason, you want to disable the cache, simply set it to the default value None.

+
c = tagreader.IMSClient("PINO", "pi", cache=None)
c.connect()
+

If you want to cache data, we recommend using the provided SmartCache like this:

+
from pathlib import Path
from tagreader.cache import SmartCache

c = tagreader.IMSClient("PINO", "pi", cache=SmartCache(path=Path(".cache"))
c.connect()
+

Snapshots ( read_type = ReaderType.SNAPSHOT ) are of course never cached.

+

Note: Raw read_type = ReaderType.RAW data values are currently not cached pending a rewrite of the caching +mechanisms.

+ + \ No newline at end of file diff --git a/docs/about/usage/data-source/index.html b/docs/about/usage/data-source/index.html new file mode 100644 index 00000000..66bb1ce8 --- /dev/null +++ b/docs/about/usage/data-source/index.html @@ -0,0 +1,48 @@ + + + + + +Data sources | Tagreader + + + + +

Data sources

+

Tagreader supports connecting to PI and IP.21 servers using a Web API interfaces. When calling certain +methods, the user will need to tell tagreader which system and which connection method to use. This input argument is +called imstype , and can be one of the following case-insensitive strings:

+
    +
  • piwebapi : For connecting to OSISoft PI Web API
  • +
  • aspenone : For connecting to AspenTech Process Data REST Web API
  • +
+

Listing available data sources

+

The method tagreader.list_sources() can query for available PI and IP.21 servers available. Input arguments:

+
    +
  • imstype : The name of the IMS type to query. Valid values: piwebapi and aspenone.
  • +
+

The following input arguments are only relevant when calling list_sources() with a Web API imstype ( piwebapi or +aspenone ):

+
    +
  • url (optional): Path to server root, e.g. "https://aspenone/ProcessData/AtProcessDataREST.dll" or +"https://piwebapi/piwebapi". Default: Path to Equinor server corresponding to selected imstype if
  • +
  • imstype is piwebapi or aspenone .
  • +
  • verifySSL (optional): Whether to verify SSL certificate sent from server. Default: True.
  • +
  • auth (optional): Auth object to pass to the server for authentication. Default: Kerberos-based auth objects +that work with Equinor servers. If not connecting to an Equinor server, you may have to create your own auth.
  • +
+

When called with imstype set to pi , list_sources() will search the registry at +HKEY_CURRENT_USER\Software\AspenTech\ADSA\Caches\AspenADSA{username} for available PI servers. Similarly, +if called with imstype set to ip21 , HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\PISystem\PI-SDK will be searched +for available IP.21 servers. Servers found through the registry are normally servers to which the user is authorized, +and does not necessarily include all available data sources in the organization.

+

Example:

+
from tagreader import list_sources
list_sources("ip21")
list_sources("piwebapi")
+

When called with imstype set to piwebapi or aspenone , list_sources() will connect to the web server URL and +query for the available list of data sources. This list is normally the complete set of data sources available on the +server, and does not indicate whether the user is authorized to query the source or not.

+

When querying Equinor Web API for data sources, list_sources() should require no input argument except +imstype="piwebapi" or imstype="aspenone". For non-Equinor servers, url will need to be specified, as may auth +and verifySSL .

+ + \ No newline at end of file diff --git a/docs/about/usage/fetching-metadata/index.html b/docs/about/usage/fetching-metadata/index.html new file mode 100644 index 00000000..f9affc51 --- /dev/null +++ b/docs/about/usage/fetching-metadata/index.html @@ -0,0 +1,22 @@ + + + + + +Fetching metadata | Tagreader + + + + +

Fetching metadata

+

Two client methods have been created to fetch basic metadata for one or more tags.

+

get_units()

+

Fetches the engineering unit(s) for the tag(s) provided. The argument tags can be either a single tagname as string, +or a list of tagnames.

+

get_description()

+

Fetches the description(s) for the tag(s) provided. The argument tags can be either a single tagname as string, +or a list of tagnames.

+

Example:

+
tags = ["BA:ACTIVE.1", "BA:LEVEL.1", "BA:CONC.1"]
units = c.get_units(tags)
desc = c.get_descriptions(tags)
tag = "BA:CONC.1"
df[tag].plot(grid=True, title=desc[tag]).set_ylabel(units[tag])
+ + \ No newline at end of file diff --git a/docs/about/usage/time-zone/index.html b/docs/about/usage/time-zone/index.html new file mode 100644 index 00000000..9a61b94a --- /dev/null +++ b/docs/about/usage/time-zone/index.html @@ -0,0 +1,35 @@ + + + + + +Time zones | Tagreader + + + + +

Time zones

+

It is important to understand how Tagreader uses and interprets time zones. Queries to the backend servers are always +performed in UTC time, and return data is also always in UTC. However, it is usually not convenient to ensure all time +stamps are in UTC time. The client and handlers therefore have functionality for converting between UTC and +user-specified time zones.

+

There are two levels of determining which time zone input arguments should be interpreted as, and which time zone +return data should be converted to:

+
    +
  1. Time zone aware input arguments will use their corresponding time zone.
  2. +
  3. Time zone naive input arguments are assumed to have time zone as provided by the client.
  4. +
+

The client-provided time zone can be specified with the optional tz argument (string, e.g. "US/Central") during +client creation. If it is not specified, then the default value Europe/Oslo is used. Note that for the most common +use case where Equinor employees want to fetch data from Norwegian assets and display them with Norwegian time stamps, +nothing needs to be done.

+

Note: It is a good idea to update the pytz package rather frequently (at least twice per year) to ensure that time +zone information is up-to-date. pip install --upgrade pytz .

+

Example (advanced usage)

+

An employee in Houston is contacted by her colleague in Brazil about an event that she needs to investigate. +The colleague identified the time of the event at July 20th 2020 at 15:05:00 Rio time. The Houston employee wishes to +extract interpolated data with 60-second intervals and display the data in her local time zone. She also wishes to send +the data to her Norwegian colleague with datestamps in Norwegian time. One way of doing this is :

+
import tagreader
from datetime import datetime, timedelta
from dateutil import tz
c = tagreader.IMSClient("PINO", "pi", tz="US/Central") # Force output data to Houston time
c.connect()
tzinfo = tz.gettz("Brazil/East") # Generate timezone object for Rio local time
event_time = datetime(2020, 7, 20, 15, 5, 0, tzinfo=tzinfo)
start_time = event_time - timedelta(minutes=30)
end_time = event_time + timedelta(minutes=10)
df = c.read(["BA:CONC.1"], start_time, end_time, ts=60)
df_to_Norway = df.tz_convert("Europe/Oslo") # Create a copy of the dataframe with Norwegian time stamps
+ + \ No newline at end of file diff --git a/docs/category/developer-guide/index.html b/docs/category/developer-guide/index.html new file mode 100644 index 00000000..3497de36 --- /dev/null +++ b/docs/category/developer-guide/index.html @@ -0,0 +1,13 @@ + + + + + +Developer guide | Tagreader + + + + + + + \ No newline at end of file diff --git a/docs/category/usage/index.html b/docs/category/usage/index.html new file mode 100644 index 00000000..d5cf1245 --- /dev/null +++ b/docs/category/usage/index.html @@ -0,0 +1,13 @@ + + + + + +Usage | Tagreader + + + + + + + \ No newline at end of file diff --git a/docs/contribute/development-guide/publishing/index.html b/docs/contribute/development-guide/publishing/index.html new file mode 100644 index 00000000..789fc020 --- /dev/null +++ b/docs/contribute/development-guide/publishing/index.html @@ -0,0 +1,14 @@ + + + + + +Publishing | Tagreader + + + + + + + \ No newline at end of file diff --git a/docs/contribute/development-guide/setup/index.html b/docs/contribute/development-guide/setup/index.html new file mode 100644 index 00000000..0a9124cf --- /dev/null +++ b/docs/contribute/development-guide/setup/index.html @@ -0,0 +1,46 @@ + + + + + +Setup | Tagreader + + + + +

Setup

+ +

Prerequisites

+

To work with the tagreader code you'll need to install:

+

Python >=3.8 with the following packages:

+
    +
  • pandas >= 1.0.0
  • +
  • requests
  • +
  • requests-kerberos
  • +
  • certifi >= 2023.5.7
  • +
  • diskcache
  • +
  • pyodbc (If using ODBC connection)
  • +
+
ODBC Connection

If using ODBC connections, you must also install proprietary drivers for PI ODBC and/or Aspen IP.21 SQLPlus. These +drivers are only available for Microsoft Windows. Pyodbc will therefore not be installed for non-Windows systems.

+

Pre-commit

+

When contributing to this project, pre-commits are necessary, as they run certain tests, sanitisers, and formatters.

+

The project provides a .pre-commit-config.yaml file that is used to set up git pre-commit hooks.

+

On commit locally, code is automatically formatted and checked for security vulnerabilities using pre-commit git hooks.

+

Installation

+

To initialize pre-commit in your local repository, run

+
pre-commit install
+

This tells pre-commit to run for this repository on every commit.

+

Usage

+

Pre-commit will run on every commit, but can also be run manually on all files:

+
pre-commit run --all-files
+

Pre-commit tests can be skipped on commits with git commit --no-verify.

+
caution

If you have to skip the pre-commit tests, you're probably doing something you're not supposed to, and whoever commits after you might have to fix your "mistakes". Consider updating the pre-commit hooks if your code is non-compliant.

+

Install Poetry

+

Poetry is used to manage Python package dependencies.

+
$ pip install poetry
+

The installation instructions can be found here.

+

Install packages

+
$ poetry install
+ + \ No newline at end of file diff --git a/docs/contribute/development-guide/testing/index.html b/docs/contribute/development-guide/testing/index.html new file mode 100644 index 00000000..2cd685cd --- /dev/null +++ b/docs/contribute/development-guide/testing/index.html @@ -0,0 +1,14 @@ + + + + + +Testing | Tagreader + + + + + + + \ No newline at end of file diff --git a/docs/contribute/development-guide/upgrading/index.html b/docs/contribute/development-guide/upgrading/index.html new file mode 100644 index 00000000..0e105201 --- /dev/null +++ b/docs/contribute/development-guide/upgrading/index.html @@ -0,0 +1,14 @@ + + + + + +Upgrading | Tagreader + + + + + + + \ No newline at end of file diff --git a/docs/contribute/documentation/index.html b/docs/contribute/documentation/index.html new file mode 100644 index 00000000..b6b9dbd4 --- /dev/null +++ b/docs/contribute/documentation/index.html @@ -0,0 +1,27 @@ + + + + + +Documentation | Tagreader + + + + +

Documentation

+

This site was generated from the contents of your documentation folder using Docusaurus, and we host it on GitHub Pages.

+

How it works

+

From Docusaurus own documentation:

+
+

Docusaurus is a static-site generator. It builds a single-page application with fast client-side navigation, leveraging the full power of React to make your site interactive. It provides out-of-the-box documentation features but can be used to create any kind of site (personal website, product, blog, marketing landing pages, etc).

+
+

While Docusaurus is rich on features, we use it mostly to host markdown pages. The main bulk of the documentation is located in documentation/docs.

+

Publishing

+

We are using the GitHub Action publish-docs.yaml to build and publish the documentation website. This action is run every time someone pushes to the main branch.

+

This will check out the code, download the changelog from the generate-changelog.yaml action, and build the documentation. Then it will deploy the documentation (placed in the documentation/build/ folder) to GitHub Pages.

+

Initial settings

+

When deployed to GitHub Pages, you do need to configure your site under the settings. Pick the gh-pages branch and select either a private url or a public one. It will show you the site’s url, which should now contain your generated documentation site.

+

Assets

+

All assets files are places under documentation/static

+ + \ No newline at end of file diff --git a/docs/contribute/ground-rules/index.html b/docs/contribute/ground-rules/index.html new file mode 100644 index 00000000..406b9942 --- /dev/null +++ b/docs/contribute/ground-rules/index.html @@ -0,0 +1,25 @@ + + + + + +Ground rules | Tagreader + + + + +

Ground rules

+
    +
  • Always make sure that the main branch is ready to deploy. If something break, we fix it as soon as possible.
  • +
+

Pull Requests

+

Please try to make your pull request easy to review for us.

+
    +
  • Make small pull requests. The smaller, the faster to review and the more likely it will be merged soon.
  • +
+
GitHub Tips

When creating a Pull Request on GitHub, you can add Closes #<Issue number>. When you merge the PR, the issue +will automatically be closed.

+

Git commit format

+

We use conventional commits

+ + \ No newline at end of file diff --git a/docs/contribute/how-to-start-contributing/index.html b/docs/contribute/how-to-start-contributing/index.html new file mode 100644 index 00000000..7279baa8 --- /dev/null +++ b/docs/contribute/how-to-start-contributing/index.html @@ -0,0 +1,33 @@ + + + + + +Get started | Tagreader + + + + +

How to start contributing

+

Welcome! We are glad that you want to contribute to our project! 💖

+

This project accepts contributions via Github pull requests.

+

This document outlines the process to help get your contribution accepted.

+

There are many ways to contribute:

+ +

You can start by looking through the current Issues.

+

Workflow

+
    +
  1. Create a new branch
  2. +
  3. Do work
  4. +
  5. Create a Pull Request
  6. +
  7. Review Pull Request until accepted
  8. +
  9. Rebase and merge on main
  10. +
+

Code review process

+

The core team looks at pull requests on a regular basis. After feedback has been given we expect responses within three weeks. After three weeks we may close the pull request if it isn't showing any activity.

+ + \ No newline at end of file diff --git a/docs/contribute/overview/index.html b/docs/contribute/overview/index.html new file mode 100644 index 00000000..7e0f8200 --- /dev/null +++ b/docs/contribute/overview/index.html @@ -0,0 +1,19 @@ + + + + + +Overview | Tagreader + + + + +

Overview

+

Getting started

+

For setting up a development environment, see the development guide

+

For starting contributing, see the contribute section.

+

Project structure

+

Here’s how the app is organized.

+
├── .github/ - GitHub Actions and more
├── tagreader/ - The source code
├── tests/ - Tests
│── documentation/ - Documentation
└── ...
+ + \ No newline at end of file diff --git a/img/favicon.png b/img/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..fdc98338332ad4a94e8f8fefd11b16660b4040bb GIT binary patch literal 493 zcmVPx$r%6OXR5%fpQawmQQ4~Js84(dyFW*wy&=f7@8U%$;rKF)jsx7D`D4GI?2pt>C zXlZK-rwAHKT`Fj4h=PWKpf)XShyqPLo%`fnd-@2waPK|$JKy)+zk~44M(U&!;Clmr zJeW_bQeaT{g+4L1SaF)U629XIM9Pz&mVJ;QHx8o0sfmq;cDgjQ< zAcvd0%csDg0wvDe0Xlq`OV3~?^DAQb literal 0 HcmV?d00001 diff --git a/img/logo.svg b/img/logo.svg new file mode 100644 index 00000000..c2bbc853 --- /dev/null +++ b/img/logo.svg @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 00000000..13bb204a --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + +Tagreader + + + + +
+ + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 00000000..64b9dfbb --- /dev/null +++ b/sitemap.xml @@ -0,0 +1 @@ +https://awt.app.radix.equinor.com/tagreader-python/docs/about/introductionweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/about/usage/basic-usageweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/about/usage/cachingweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/about/usage/data-sourceweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/about/usage/fetching-metadataweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/about/usage/time-zoneweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/category/developer-guideweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/category/usageweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/contribute/development-guide/publishingweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/contribute/development-guide/setupweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/contribute/development-guide/testingweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/contribute/development-guide/upgradingweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/contribute/documentationweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/contribute/ground-rulesweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/contribute/how-to-start-contributingweekly0.5https://awt.app.radix.equinor.com/tagreader-python/docs/contribute/overviewweekly0.5https://awt.app.radix.equinor.com/tagreader-python/weekly0.5 \ No newline at end of file